summaryrefslogtreecommitdiffstats
path: root/common/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/main')
-rw-r--r--common/src/main/webapp/framework/appserver/api.js287
-rw-r--r--common/src/main/webapp/framework/appserver/server.js48
-rw-r--r--common/src/main/webapp/framework/appserver/start_node.sh22
-rw-r--r--common/src/main/webapp/framework/browser/css/open-ostyle.css937
-rw-r--r--common/src/main/webapp/framework/browser/index.html52
-rw-r--r--common/src/main/webapp/framework/browser/js/DataService.js137
-rw-r--r--common/src/main/webapp/framework/browser/js/app.js1361
-rw-r--r--common/src/main/webapp/framework/browser/template.html376
-rw-r--r--common/src/main/webapp/framework/browser/templates/accordion.html26
-rw-r--r--common/src/main/webapp/framework/browser/templates/buttons.html38
-rw-r--r--common/src/main/webapp/framework/browser/templates/checkBoxes.html25
-rw-r--r--common/src/main/webapp/framework/browser/templates/courses.html32
-rw-r--r--common/src/main/webapp/framework/browser/templates/dropdown.html42
-rw-r--r--common/src/main/webapp/framework/browser/templates/functional.html32
-rw-r--r--common/src/main/webapp/framework/browser/templates/home.html154
-rw-r--r--common/src/main/webapp/framework/browser/templates/list.html47
-rw-r--r--common/src/main/webapp/framework/browser/templates/login.html40
-rw-r--r--common/src/main/webapp/framework/browser/templates/management.html130
-rw-r--r--common/src/main/webapp/framework/browser/templates/notification.html30
-rw-r--r--common/src/main/webapp/framework/browser/templates/radioButtons.html28
-rw-r--r--common/src/main/webapp/framework/browser/templates/register.html47
-rw-r--r--common/src/main/webapp/framework/browser/templates/table.html39
-rw-r--r--common/src/main/webapp/framework/browser/templates/tabs.html27
-rw-r--r--common/src/main/webapp/framework/browser/templates/textarea.html121
-rw-r--r--common/src/main/webapp/framework/browser/templates/tree.html25
-rw-r--r--common/src/main/webapp/framework/browser/templates/verticalTab.html28
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/License.txt362
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/css/bootstrap.min.css7
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/css/img/Thumbs.dbbin0 -> 2560 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/css/img/diy/1_close.pngbin0 -> 601 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/css/img/diy/1_open.pngbin0 -> 580 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/css/img/diy/2.pngbin0 -> 570 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/css/img/diy/3.pngbin0 -> 762 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/css/img/diy/4.pngbin0 -> 399 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/css/img/diy/5.pngbin0 -> 710 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/css/img/diy/6.pngbin0 -> 432 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/css/img/diy/7.pngbin0 -> 534 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/css/img/diy/8.pngbin0 -> 529 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/css/img/diy/9.pngbin0 -> 467 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/css/img/line_conn.gifbin0 -> 45 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/css/img/loading.gifbin0 -> 381 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/css/img/zTreeStandard.gifbin0 -> 5564 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/css/img/zTreeStandard.pngbin0 -> 11173 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/css/magic-check.css123
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/css/zTreeStyle.css97
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/fonts/glyphicons-halflings-regular.eotbin0 -> 20127 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/fonts/glyphicons-halflings-regular.svg288
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/fonts/glyphicons-halflings-regular.ttfbin0 -> 45404 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/fonts/glyphicons-halflings-regular.woffbin0 -> 23424 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/fonts/glyphicons-halflings-regular.woff2bin0 -> 18028 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/images/collapse_arrow.pngbin0 -> 1174 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/images/delete.pngbin0 -> 1100 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/images/edit.pngbin0 -> 3045 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/images/expand_arrow.pngbin0 -> 1182 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/images/openo.pngbin0 -> 49007 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/images/searchicon.pngbin0 -> 366 bytes
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/js/angular-ui-router.min.js8
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/js/angular.min.js295
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/js/bootstrap-table-filter-control.min.js7
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/js/bootstrap-table.min.js8
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/js/bootstrap.min.js6
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/js/jquery.ztree.core-3.5.js70
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/js/jquery_1.12.4.min.js5
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/js/mustache.js630
-rw-r--r--common/src/main/webapp/framework/browser/thirdparty/js/tree.jquery.js3616
-rw-r--r--common/src/main/webapp/framework/css/RMain.css239
-rw-r--r--common/src/main/webapp/framework/css/VMMain.css758
-rw-r--r--common/src/main/webapp/framework/css/open-ostyle.css1020
-rw-r--r--common/src/main/webapp/framework/template.html44
-rw-r--r--common/src/main/webapp/framework/templateContainer.html79
-rw-r--r--common/src/main/webapp/framework/templateFunctional.html82
-rw-r--r--common/src/main/webapp/framework/templateNotification.html48
-rw-r--r--common/src/main/webapp/framework/templateWidget.html213
-rw-r--r--common/src/main/webapp/thirdparty/License.txt362
-rw-r--r--common/src/main/webapp/thirdparty/animate/animate.min.css6
-rw-r--r--common/src/main/webapp/thirdparty/avalon/avalon.js5819
-rw-r--r--common/src/main/webapp/thirdparty/avalon/avalon.modern.js4935
-rw-r--r--common/src/main/webapp/thirdparty/bootbox/LICENSE.md23
-rw-r--r--common/src/main/webapp/thirdparty/bootbox/README.md91
-rw-r--r--common/src/main/webapp/thirdparty/bootbox/bootbox.min.js6
-rw-r--r--common/src/main/webapp/thirdparty/bootstrap-daterangepicker/daterangepicker-bs3.css319
-rw-r--r--common/src/main/webapp/thirdparty/bootstrap-daterangepicker/daterangepicker.js1257
-rw-r--r--common/src/main/webapp/thirdparty/bootstrap-daterangepicker/moment.js2808
-rw-r--r--common/src/main/webapp/thirdparty/bootstrap-daterangepicker/moment.min.js6
-rw-r--r--common/src/main/webapp/thirdparty/bootstrap-growl/bootstrap-growl.min.js2
-rw-r--r--common/src/main/webapp/thirdparty/bootstrap/css/bootstrap-dt.css5804
-rw-r--r--common/src/main/webapp/thirdparty/bootstrap/css/bootstrap.min.css7
-rw-r--r--common/src/main/webapp/thirdparty/bootstrap/fonts/glyphicons-halflings-regular.eotbin0 -> 20127 bytes
-rw-r--r--common/src/main/webapp/thirdparty/bootstrap/fonts/glyphicons-halflings-regular.svg288
-rw-r--r--common/src/main/webapp/thirdparty/bootstrap/fonts/glyphicons-halflings-regular.ttfbin0 -> 45404 bytes
-rw-r--r--common/src/main/webapp/thirdparty/bootstrap/fonts/glyphicons-halflings-regular.woffbin0 -> 23424 bytes
-rw-r--r--common/src/main/webapp/thirdparty/bootstrap/fonts/glyphicons-halflings-regular.woff2bin0 -> 18028 bytes
-rw-r--r--common/src/main/webapp/thirdparty/bootstrap/js/bootstrap.js1951
-rw-r--r--common/src/main/webapp/thirdparty/bootstrap/js/bootstrap.min.js6
-rw-r--r--common/src/main/webapp/thirdparty/bootstrap/js/bootstrap2-typeahead.min.js21
-rw-r--r--common/src/main/webapp/thirdparty/cometd/cometd.js3045
-rw-r--r--common/src/main/webapp/thirdparty/cometd/cometd/AckExtension.js112
-rw-r--r--common/src/main/webapp/thirdparty/cometd/cometd/ReloadExtension.js234
-rw-r--r--common/src/main/webapp/thirdparty/cometd/cometd/TimeStampExtension.js42
-rw-r--r--common/src/main/webapp/thirdparty/cometd/cometd/TimeSyncExtension.js216
-rw-r--r--common/src/main/webapp/thirdparty/cometd/jquery/jquery.cometd-ack.js34
-rw-r--r--common/src/main/webapp/thirdparty/cometd/jquery/jquery.cometd-reload.js42
-rw-r--r--common/src/main/webapp/thirdparty/cometd/jquery/jquery.cometd-timestamp.js34
-rw-r--r--common/src/main/webapp/thirdparty/cometd/jquery/jquery.cometd-timesync.js34
-rw-r--r--common/src/main/webapp/thirdparty/cometd/jquery/jquery.cometd.js139
-rw-r--r--common/src/main/webapp/thirdparty/css/animate-custom.css3945
-rw-r--r--common/src/main/webapp/thirdparty/css/bootstrap.min.css7
-rw-r--r--common/src/main/webapp/thirdparty/css/font-awesome.min.css4
-rw-r--r--common/src/main/webapp/thirdparty/css/img/Thumbs.dbbin0 -> 2560 bytes
-rw-r--r--common/src/main/webapp/thirdparty/css/img/diy/1_close.pngbin0 -> 601 bytes
-rw-r--r--common/src/main/webapp/thirdparty/css/img/diy/1_open.pngbin0 -> 580 bytes
-rw-r--r--common/src/main/webapp/thirdparty/css/img/diy/2.pngbin0 -> 570 bytes
-rw-r--r--common/src/main/webapp/thirdparty/css/img/diy/3.pngbin0 -> 762 bytes
-rw-r--r--common/src/main/webapp/thirdparty/css/img/diy/4.pngbin0 -> 399 bytes
-rw-r--r--common/src/main/webapp/thirdparty/css/img/diy/5.pngbin0 -> 710 bytes
-rw-r--r--common/src/main/webapp/thirdparty/css/img/diy/6.pngbin0 -> 432 bytes
-rw-r--r--common/src/main/webapp/thirdparty/css/img/diy/7.pngbin0 -> 534 bytes
-rw-r--r--common/src/main/webapp/thirdparty/css/img/diy/8.pngbin0 -> 529 bytes
-rw-r--r--common/src/main/webapp/thirdparty/css/img/diy/9.pngbin0 -> 467 bytes
-rw-r--r--common/src/main/webapp/thirdparty/css/img/line_conn.gifbin0 -> 45 bytes
-rw-r--r--common/src/main/webapp/thirdparty/css/img/loading.gifbin0 -> 381 bytes
-rw-r--r--common/src/main/webapp/thirdparty/css/img/zTreeStandard.gifbin0 -> 5564 bytes
-rw-r--r--common/src/main/webapp/thirdparty/css/img/zTreeStandard.pngbin0 -> 11173 bytes
-rw-r--r--common/src/main/webapp/thirdparty/css/magic-check.css123
-rw-r--r--common/src/main/webapp/thirdparty/css/ng-table.min.css2
-rw-r--r--common/src/main/webapp/thirdparty/css/ngict-component.css789
-rw-r--r--common/src/main/webapp/thirdparty/css/plugins.css1561
-rw-r--r--common/src/main/webapp/thirdparty/css/style.css4715
-rw-r--r--common/src/main/webapp/thirdparty/css/uniform.default.min.css1
-rw-r--r--common/src/main/webapp/thirdparty/css/zTreeStyle.css97
-rw-r--r--common/src/main/webapp/thirdparty/data-tables/DT_bootstrap.css240
-rw-r--r--common/src/main/webapp/thirdparty/data-tables/DT_bootstrap.js363
-rw-r--r--common/src/main/webapp/thirdparty/data-tables/DataTableICT.js1459
-rw-r--r--common/src/main/webapp/thirdparty/data-tables/DataTableSmartClient.js1215
-rw-r--r--common/src/main/webapp/thirdparty/data-tables/DataTableSmartClientApp.js1312
-rw-r--r--common/src/main/webapp/thirdparty/data-tables/app-test-i18n-datatable-zh-CN.json51
-rw-r--r--common/src/main/webapp/thirdparty/data-tables/app-universal-i18n-datatable-en-US.json89
-rw-r--r--common/src/main/webapp/thirdparty/data-tables/app-universal-i18n-datatable-zh-CN.json90
-rw-r--r--common/src/main/webapp/thirdparty/data-tables/dataTable.html155
-rw-r--r--common/src/main/webapp/thirdparty/data-tables/dataTables.bootstrap.css331
-rw-r--r--common/src/main/webapp/thirdparty/data-tables/images/loading-spinner-grey.gifbin0 -> 5203 bytes
-rw-r--r--common/src/main/webapp/thirdparty/data-tables/images/sort_asc.pngbin0 -> 1118 bytes
-rw-r--r--common/src/main/webapp/thirdparty/data-tables/images/sort_both.pngbin0 -> 1136 bytes
-rw-r--r--common/src/main/webapp/thirdparty/data-tables/images/sort_desc.pngbin0 -> 1127 bytes
-rw-r--r--common/src/main/webapp/thirdparty/data-tables/jquery.dataTables-1.9.4.js12101
-rw-r--r--common/src/main/webapp/thirdparty/data-tables/jquery.dataTables-1.9.4.min.js155
-rw-r--r--common/src/main/webapp/thirdparty/data-tables/jquery.dataTables.js15268
-rw-r--r--common/src/main/webapp/thirdparty/data-tables/jquery.dataTables.min.css1
-rw-r--r--common/src/main/webapp/thirdparty/data-tables/jquery.dataTables.min.js166
-rw-r--r--common/src/main/webapp/thirdparty/data-tables/style-datatable.css154
-rw-r--r--common/src/main/webapp/thirdparty/echarts/echarts-all.js50
-rw-r--r--common/src/main/webapp/thirdparty/echarts/echarts.js54502
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/css/font-awesome.css1672
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/css/font-awesome.min.css4
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/fonts/FontAwesome.otfbin0 -> 85908 bytes
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/fonts/fontawesome-webfont.eotbin0 -> 56006 bytes
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/fonts/fontawesome-webfont.svg520
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/fonts/fontawesome-webfont.ttfbin0 -> 112160 bytes
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/fonts/fontawesome-webfont.woffbin0 -> 65452 bytes
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/less/bordered-pulled.less16
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/less/core.less11
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/less/fixed-width.less6
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/less/font-awesome.less17
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/less/icons.less552
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/less/larger.less13
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/less/list.less19
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/less/mixins.less25
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/less/path.less14
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/less/rotated-flipped.less20
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/less/spinning.less29
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/less/stacked.less20
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/less/variables.less561
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/scss/_bordered-pulled.scss16
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/scss/_core.scss11
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/scss/_fixed-width.scss6
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/scss/_icons.scss552
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/scss/_larger.scss13
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/scss/_list.scss19
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/scss/_mixins.scss25
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/scss/_path.scss14
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/scss/_rotated-flipped.scss20
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/scss/_spinning.scss29
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/scss/_stacked.scss20
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/scss/_variables.scss561
-rw-r--r--common/src/main/webapp/thirdparty/font-awesome/scss/font-awesome.scss17
-rw-r--r--common/src/main/webapp/thirdparty/fonts/BebasNeue-webfont.eotbin0 -> 10031 bytes
-rw-r--r--common/src/main/webapp/thirdparty/fonts/BebasNeue-webfont.svg146
-rw-r--r--common/src/main/webapp/thirdparty/fonts/BebasNeue-webfont.ttfbin0 -> 21736 bytes
-rw-r--r--common/src/main/webapp/thirdparty/fonts/BebasNeue-webfont.woffbin0 -> 11632 bytes
-rw-r--r--common/src/main/webapp/thirdparty/fonts/fontawesome-webfont.eotbin0 -> 56006 bytes
-rw-r--r--common/src/main/webapp/thirdparty/fonts/fontawesome-webfont.svg520
-rw-r--r--common/src/main/webapp/thirdparty/fonts/fontawesome-webfont.ttfbin0 -> 112160 bytes
-rw-r--r--common/src/main/webapp/thirdparty/fonts/fontawesome-webfont.woffbin0 -> 65452 bytes
-rw-r--r--common/src/main/webapp/thirdparty/fonts/fontomas-webfont.eotbin0 -> 3336 bytes
-rw-r--r--common/src/main/webapp/thirdparty/fonts/fontomas-webfont.svg31
-rw-r--r--common/src/main/webapp/thirdparty/fonts/fontomas-webfont.ttfbin0 -> 3128 bytes
-rw-r--r--common/src/main/webapp/thirdparty/fonts/fontomas-webfont.woffbin0 -> 2280 bytes
-rw-r--r--common/src/main/webapp/thirdparty/fonts/franchise-bold-webfont.eotbin0 -> 29144 bytes
-rw-r--r--common/src/main/webapp/thirdparty/fonts/franchise-bold-webfont.svg175
-rw-r--r--common/src/main/webapp/thirdparty/fonts/franchise-bold-webfont.ttfbin0 -> 28788 bytes
-rw-r--r--common/src/main/webapp/thirdparty/fonts/franchise-bold-webfont.woffbin0 -> 14972 bytes
-rw-r--r--common/src/main/webapp/thirdparty/fonts/glyphicons-halflings-regular.eotbin0 -> 20127 bytes
-rw-r--r--common/src/main/webapp/thirdparty/fonts/glyphicons-halflings-regular.svg288
-rw-r--r--common/src/main/webapp/thirdparty/fonts/glyphicons-halflings-regular.ttfbin0 -> 45404 bytes
-rw-r--r--common/src/main/webapp/thirdparty/fonts/glyphicons-halflings-regular.woffbin0 -> 23424 bytes
-rw-r--r--common/src/main/webapp/thirdparty/fonts/glyphicons-halflings-regular.woff2bin0 -> 18028 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/bower.json42
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/css/Thumbs.dbbin0 -> 5120 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/css/banner.jpgbin0 -> 32768 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/css/custom.css261
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/css/custom.styl1191
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/css/icheck.pngbin0 -> 2382 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/css/ie/arrow-bottom.pngbin0 -> 184 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/css/ie/arrow-top.pngbin0 -> 175 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/css/ie/header-line.pngbin0 -> 611 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/css/ie/icon-fork.pngbin0 -> 213 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/css/ie/icon-github.pngbin0 -> 634 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/css/ie/icon-lab.pngbin0 -> 683 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/css/ie/icon-options.pngbin0 -> 666 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/css/ie/icon-star.pngbin0 -> 348 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-bold.eotbin0 -> 13099 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-bold.svg1490
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-bold.ttfbin0 -> 32768 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-bold.woffbin0 -> 15736 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-regular.eotbin0 -> 13114 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-regular.svg1365
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-regular.ttfbin0 -> 32768 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-regular.woffbin0 -> 15692 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/css/normalize.css527
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/index.html1544
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/js/custom.js109
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/js/custom.min.js5
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/js/jquery.js4
-rw-r--r--common/src/main/webapp/thirdparty/icheck/demo/js/zepto.js41
-rw-r--r--common/src/main/webapp/thirdparty/icheck/icheck.jquery.json48
-rw-r--r--common/src/main/webapp/thirdparty/icheck/icheck.js509
-rw-r--r--common/src/main/webapp/thirdparty/icheck/icheck.min.js11
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/all.css61
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/_all.css530
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/aero.css53
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/aero.pngbin0 -> 1520 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/aero@2x.pngbin0 -> 3218 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/blue.css53
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/blue.pngbin0 -> 1518 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/blue@2x.pngbin0 -> 3217 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/flat.css53
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/flat.pngbin0 -> 1515 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/flat@2x.pngbin0 -> 3217 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/green.css53
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/green.pngbin0 -> 1444 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/green@2x.pngbin0 -> 3117 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/grey.css53
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/grey.pngbin0 -> 1516 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/grey@2x.pngbin0 -> 3217 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/orange.css53
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/orange.pngbin0 -> 1518 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/orange@2x.pngbin0 -> 3275 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/pink.css53
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/pink.pngbin0 -> 1522 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/pink@2x.pngbin0 -> 3218 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/purple.css53
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/purple.pngbin0 -> 1519 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/purple@2x.pngbin0 -> 3218 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/red.css53
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/red.pngbin0 -> 1516 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/red@2x.pngbin0 -> 3276 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/yellow.css53
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/yellow.pngbin0 -> 1516 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/flat/yellow@2x.pngbin0 -> 3216 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/futurico/futurico.css53
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/futurico/futurico.pngbin0 -> 1734 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/futurico/futurico@2x.pngbin0 -> 3446 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/line/Thumbs.dbbin0 -> 4608 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/line/_all.css710
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/line/aero.css71
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/line/blue.css71
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/line/green.css71
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/line/grey.css71
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/line/line.css71
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/line/line.pngbin0 -> 588 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/line/line@2x.pngbin0 -> 1073 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/line/orange.css71
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/line/pink.css71
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/line/purple.css71
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/line/red.css71
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/line/yellow.css71
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/_all.css590
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/aero.css59
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/aero.pngbin0 -> 1151 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/aero@2x.pngbin0 -> 1409 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/blue.css59
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/blue.pngbin0 -> 1132 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/blue@2x.pngbin0 -> 1410 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/green.css59
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/green.pngbin0 -> 1143 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/green@2x.pngbin0 -> 1408 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/grey.css59
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/grey.pngbin0 -> 1142 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/grey@2x.pngbin0 -> 1407 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/minimal.css59
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/minimal.pngbin0 -> 1114 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/minimal@2x.pngbin0 -> 1410 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/orange.css59
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/orange.pngbin0 -> 1139 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/orange@2x.pngbin0 -> 1407 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/pink.css59
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/pink.pngbin0 -> 1150 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/pink@2x.pngbin0 -> 1409 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/purple.css59
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/purple.pngbin0 -> 1132 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/purple@2x.pngbin0 -> 1409 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/red.css59
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/red.pngbin0 -> 1130 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/red@2x.pngbin0 -> 1410 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/yellow.css59
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/yellow.pngbin0 -> 1135 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/minimal/yellow@2x.pngbin0 -> 1406 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/polaris/polaris.css59
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/polaris/polaris.pngbin0 -> 6401 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/polaris/polaris@2x.pngbin0 -> 32768 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/Thumbs.dbbin0 -> 32768 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/_all.css590
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/aero.css59
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/aero.pngbin0 -> 4436 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/aero@2x.pngbin0 -> 4455 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/blue.css59
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/blue.pngbin0 -> 2185 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/blue@2x.pngbin0 -> 4485 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/green.css59
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/green.pngbin0 -> 2193 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/green@2x.pngbin0 -> 4498 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/grey.css59
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/grey.pngbin0 -> 2186 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/grey@2x.pngbin0 -> 4483 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/orange.css59
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/orange.pngbin0 -> 2181 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/orange@2x.pngbin0 -> 4474 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/pink.css59
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/pink.pngbin0 -> 2189 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/pink@2x.pngbin0 -> 4479 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/purple.css59
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/purple.pngbin0 -> 2188 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/purple@2x.pngbin0 -> 4501 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/red.css59
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/red.pngbin0 -> 2190 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/red@2x.pngbin0 -> 4490 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/square.css59
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/square.pngbin0 -> 2175 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/square@2x.pngbin0 -> 4478 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/yellow.css59
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/yellow.pngbin0 -> 2131 bytes
-rw-r--r--common/src/main/webapp/thirdparty/icheck/skins/square/yellow@2x.pngbin0 -> 4385 bytes
-rw-r--r--common/src/main/webapp/thirdparty/images/add.pngbin0 -> 1104 bytes
-rw-r--r--common/src/main/webapp/thirdparty/images/checkbox-radio/checkbox-checked-disabled.pngbin0 -> 3087 bytes
-rw-r--r--common/src/main/webapp/thirdparty/images/checkbox-radio/checkbox-checked.pngbin0 -> 3053 bytes
-rw-r--r--common/src/main/webapp/thirdparty/images/checkbox-radio/checkbox-disabled.pngbin0 -> 2830 bytes
-rw-r--r--common/src/main/webapp/thirdparty/images/checkbox-radio/checkbox-hover.pngbin0 -> 2835 bytes
-rw-r--r--common/src/main/webapp/thirdparty/images/checkbox-radio/checkbox-init.pngbin0 -> 2833 bytes
-rw-r--r--common/src/main/webapp/thirdparty/images/checkbox-radio/radio-checked-disabled.pngbin0 -> 2993 bytes
-rw-r--r--common/src/main/webapp/thirdparty/images/checkbox-radio/radio-checked.pngbin0 -> 3235 bytes
-rw-r--r--common/src/main/webapp/thirdparty/images/checkbox-radio/radio-disabled.pngbin0 -> 3045 bytes
-rw-r--r--common/src/main/webapp/thirdparty/images/checkbox-radio/radio-hover.pngbin0 -> 3068 bytes
-rw-r--r--common/src/main/webapp/thirdparty/images/checkbox-radio/radio-init.pngbin0 -> 3036 bytes
-rw-r--r--common/src/main/webapp/thirdparty/images/collapse_arrow.pngbin0 -> 1174 bytes
-rw-r--r--common/src/main/webapp/thirdparty/images/delete.pngbin0 -> 1100 bytes
-rw-r--r--common/src/main/webapp/thirdparty/images/edit.pngbin0 -> 3045 bytes
-rw-r--r--common/src/main/webapp/thirdparty/images/expand_arrow.pngbin0 -> 1182 bytes
-rw-r--r--common/src/main/webapp/thirdparty/images/openo.pngbin0 -> 49007 bytes
-rw-r--r--common/src/main/webapp/thirdparty/images/searchicon.pngbin0 -> 366 bytes
-rw-r--r--common/src/main/webapp/thirdparty/jQuery-File-Upload/css/jquery.fileupload.css37
-rw-r--r--common/src/main/webapp/thirdparty/jQuery-File-Upload/img/loading.gifbin0 -> 3897 bytes
-rw-r--r--common/src/main/webapp/thirdparty/jQuery-File-Upload/img/progressbar.gifbin0 -> 3323 bytes
-rw-r--r--common/src/main/webapp/thirdparty/jQuery-File-Upload/js/jquery.fileupload.js1477
-rw-r--r--common/src/main/webapp/thirdparty/jQuery-File-Upload/js/jquery.iframe-transport.js217
-rw-r--r--common/src/main/webapp/thirdparty/jQuery-File-Upload/js/vendor/jquery.ui.widget.js572
-rw-r--r--common/src/main/webapp/thirdparty/jquery-cokie/jquery.cokie.min.js9
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/README.md72
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/dist/additional-methods.js617
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/dist/additional-methods.min.js11
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/dist/jquery.validate.js1231
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/dist/jquery.validate.min.js12
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/additional-methods.js928
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/additional-methods.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/jquery.validate.js1357
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/jquery.validate.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ar.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ar.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_bg.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_bg.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ca.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ca.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_cs.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_cs.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_da.js30
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_da.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_de.js30
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_de.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_el.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_el.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_es.js36
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_es.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_es_AR.js37
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_es_AR.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_et.js31
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_et.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_eu.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_eu.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fa.js36
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fa.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fi.js31
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fi.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fr.js59
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fr.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_gl.js38
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_gl.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_he.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_he.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_hr.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_hr.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_hu.js32
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_hu.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_id.js32
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_id.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_is.js31
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_is.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_it.js36
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_it.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ja.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ja.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ka.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ka.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_kk.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_kk.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ko.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ko.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_lt.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_lt.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_lv.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_lv.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_my.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_my.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_nl.js43
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_nl.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_no.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_no.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pl.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pl.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pt_BR.js37
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pt_BR.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pt_PT.js37
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pt_PT.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ro.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ro.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ru.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ru.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_si.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_si.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sk.js30
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sk.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sl.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sl.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sr.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sr.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sr_lat.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sr_lat.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sv.js31
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sv.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_th.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_th.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_tj.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_tj.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_tr.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_tr.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_uk.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_uk.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_vi.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_vi.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_zh.js33
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_zh.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_zh_TW.js34
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_zh_TW.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_de.js22
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_de.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_es_CL.js22
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_es_CL.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_fi.js22
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_fi.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_nl.js19
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_nl.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_pt.js19
-rw-r--r--common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_pt.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js479
-rw-r--r--common/src/main/webapp/thirdparty/jquery/jquery-1.10.2.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery/jquery-1.11.2.js10346
-rw-r--r--common/src/main/webapp/thirdparty/jquery/jquery-1.11.2.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery/jquery-1.11.2.min.map1
-rw-r--r--common/src/main/webapp/thirdparty/jquery/jquery-1.4.4.min.js167
-rw-r--r--common/src/main/webapp/thirdparty/jquery/jquery-2.1.3.js9205
-rw-r--r--common/src/main/webapp/thirdparty/jquery/jquery-2.1.3.min.js4
-rw-r--r--common/src/main/webapp/thirdparty/jquery/jquery-2.1.3.min.map1
-rw-r--r--common/src/main/webapp/thirdparty/jquery/jquery-migrate-1.2.1.js521
-rw-r--r--common/src/main/webapp/thirdparty/jquery/jquery-migrate-1.2.1.min.js2
-rw-r--r--common/src/main/webapp/thirdparty/jquery/jquery.reveal.js152
-rw-r--r--common/src/main/webapp/thirdparty/js/angular-ui-router.min.js8
-rw-r--r--common/src/main/webapp/thirdparty/js/angular.min.js295
-rw-r--r--common/src/main/webapp/thirdparty/js/bootstrap-table-filter-control.min.js7
-rw-r--r--common/src/main/webapp/thirdparty/js/bootstrap-table.min.js8
-rw-r--r--common/src/main/webapp/thirdparty/js/bootstrap.min.js6
-rw-r--r--common/src/main/webapp/thirdparty/js/core/const.js46
-rw-r--r--common/src/main/webapp/thirdparty/js/core/hk.min.js819
-rw-r--r--common/src/main/webapp/thirdparty/js/core/load_menuList.js70
-rw-r--r--common/src/main/webapp/thirdparty/js/core/openoFrameWork.js3701
-rw-r--r--common/src/main/webapp/thirdparty/js/core/pym.min.js16
-rw-r--r--common/src/main/webapp/thirdparty/js/jquery-ui.js18706
-rw-r--r--common/src/main/webapp/thirdparty/js/jquery.cookie.js117
-rw-r--r--common/src/main/webapp/thirdparty/js/jquery.ztree.core-3.5.js70
-rw-r--r--common/src/main/webapp/thirdparty/js/jquery_1.12.4.min.js5
-rw-r--r--common/src/main/webapp/thirdparty/js/mustache.js630
-rw-r--r--common/src/main/webapp/thirdparty/js/ng-table.min.js2
-rw-r--r--common/src/main/webapp/thirdparty/js/tools.js1021
-rw-r--r--common/src/main/webapp/thirdparty/uniform/README.md389
-rw-r--r--common/src/main/webapp/thirdparty/uniform/css/uniform.default.css366
-rw-r--r--common/src/main/webapp/thirdparty/uniform/css/uniform.default.min.css1
-rw-r--r--common/src/main/webapp/thirdparty/uniform/css/uniform.default.scss150
-rw-r--r--common/src/main/webapp/thirdparty/uniform/images/bg-input-focus.pngbin0 -> 143 bytes
-rw-r--r--common/src/main/webapp/thirdparty/uniform/images/bg-input.pngbin0 -> 143 bytes
-rw-r--r--common/src/main/webapp/thirdparty/uniform/images/sprite.pngbin0 -> 31815 bytes
-rw-r--r--common/src/main/webapp/thirdparty/uniform/images/sprite_original.pngbin0 -> 34229 bytes
-rw-r--r--common/src/main/webapp/thirdparty/uniform/jquery.uniform.js1068
-rw-r--r--common/src/main/webapp/thirdparty/uniform/jquery.uniform.min.js1
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/API_cn.html103
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/API_en.html102
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/apiCss/api.js592
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/apiCss/common.css219
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/apiCss/common_ie6.css23
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/apiCss/img/apiMenu.gifbin0 -> 1736 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/apiCss/img/apiMenu.pngbin0 -> 3954 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/apiCss/img/background.jpgbin0 -> 36520 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/apiCss/img/chinese.pngbin0 -> 1556 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/apiCss/img/close.pngbin0 -> 1908 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/apiCss/img/contact-bg.pngbin0 -> 177 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/apiCss/img/english.pngbin0 -> 1356 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/apiCss/img/header-bg.pngbin0 -> 148 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/apiCss/img/lightbulb.pngbin0 -> 27355 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/apiCss/img/overlay_arrow.gifbin0 -> 625 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/apiCss/img/overlay_arrow.pngbin0 -> 830 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/apiCss/img/overlay_bg.pngbin0 -> 109 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/apiCss/img/overlay_close_IE6.gifbin0 -> 441 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/apiCss/img/zTreeStandard.gifbin0 -> 6851 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/apiCss/img/zTreeStandard.pngbin0 -> 12573 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/apiCss/jquery-1.6.2.min.js18
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/apiCss/jquery.ztree.core-3.5.js69
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/apiCss/zTreeStyleForApi.css49
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/fn.zTree._z.html13
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/fn.zTree.destroy.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/fn.zTree.getZTreeObj.html24
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/fn.zTree.init.html74
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.autoParam.html39
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.contentType.html29
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.dataFilter.html45
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.dataType.html29
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.enable.html30
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.otherParam.html40
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.type.html30
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.url.html50
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeAsync.html35
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeCheck.html34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeClick.html49
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeCollapse.html34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeDblClick.html36
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeDrag.html39
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeDragOpen.html37
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeDrop.html48
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeEditName.html38
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeExpand.html34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeMouseDown.html35
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeMouseUp.html35
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeRemove.html37
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeRename.html46
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeRightClick.html35
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onAsyncError.html42
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onAsyncSuccess.html38
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onCheck.html34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onClick.html49
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onCollapse.html34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onDblClick.html35
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onDrag.html34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onDragMove.html34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onDrop.html46
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onExpand.html34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onMouseDown.html35
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onMouseUp.html35
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onNodeCreated.html35
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onRemove.html34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onRename.html40
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onRightClick.html36
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.autoCheckTrigger.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.chkDisabledInherit.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.chkStyle.html48
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.chkboxType.html31
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.enable.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.nocheckInherit.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.radioType.html29
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.keep.leaf.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.keep.parent.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.key.checked.html24
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.key.children.html23
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.key.name.html23
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.key.title.html24
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.key.url.html24
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.simpleData.enable.html38
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.simpleData.idKey.html32
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.simpleData.pIdKey.html32
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.simpleData.rootPId.html32
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.autoExpandTrigger.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.autoOpenTime.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.borderMax.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.borderMin.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.inner.html59
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.isCopy.html32
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.isMove.html32
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.maxShowNodeNum.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.minMoveSize.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.next.html58
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.prev.html58
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.editNameSelectAll.html27
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.enable.html38
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.removeTitle.html48
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.renameTitle.html48
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.showRemoveBtn.html49
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.showRenameBtn.html51
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.treeId.html14
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.treeObj.html14
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.addDiyDom.html40
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.addHoverDom.html45
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.autoCancelSelected.html26
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.dblClickExpand.html44
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.expandSpeed.html31
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.fontCss.html42
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.nameIsHTML.html27
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.removeHoverDom.html45
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.selectedMulti.html27
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.showIcon.html44
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.showLine.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.showTitle.html46
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.txtSelectedEnable.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.check_Child_State.html43
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.check_Focus.html19
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.checked.html32
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.checkedOld.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.children.html35
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.chkDisabled.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.click.html24
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.diy.html15
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.editNameFlag.html19
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.getCheckStatus.html63
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.getNextNode.html27
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.getParentNode.html27
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.getPreNode.html27
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.halfCheck.html29
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.icon.html33
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.iconClose.html33
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.iconOpen.html33
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.iconSkin.html43
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isAjaxing.html26
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isFirstNode.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isHidden.html27
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isHover.html19
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isLastNode.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isParent.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.level.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.name.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.nocheck.html26
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.open.html30
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.parentTId.html27
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.tId.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.target.html24
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.url.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.zAsync.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.addNodes.html42
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.cancelEditName.html30
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.cancelSelectedNode.html35
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.checkAllNodes.html29
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.checkNode.html44
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.copyNode.html44
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.destroy.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.editName.html29
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.expandAll.html30
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.expandNode.html50
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getChangeCheckedNodes.html24
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getCheckedNodes.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodeByParam.html32
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodeByTId.html27
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodeIndex.html30
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodes.html26
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodesByFilter.html43
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodesByParam.html31
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodesByParamFuzzy.html32
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getSelectedNodes.html23
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.hideNode.html29
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.hideNodes.html29
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.moveNode.html46
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.reAsyncChildNodes.html42
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.refresh.html24
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.removeChildNodes.html32
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.removeNode.html34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.selectNode.html34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.setChkDisabled.html44
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.setEditable.html27
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.setting.html13
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.showNode.html31
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.showNodes.html29
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.transformToArray.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.transformTozTreeNodes.html43
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.updateNode.html37
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/fn.zTree._z.html13
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/fn.zTree.destroy.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/fn.zTree.getZTreeObj.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/fn.zTree.init.html75
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.async.autoParam.html39
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.async.contentType.html29
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.async.dataFilter.html45
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.async.dataType.html29
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.async.enable.html30
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.async.otherParam.html40
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.async.type.html30
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.async.url.html50
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeAsync.html35
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeCheck.html34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeClick.html49
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeCollapse.html34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeDblClick.html36
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeDrag.html39
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeDragOpen.html37
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeDrop.html50
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeEditName.html38
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeExpand.html34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeMouseDown.html35
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeMouseUp.html35
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeRemove.html37
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeRename.html46
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeRightClick.html35
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onAsyncError.html42
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onAsyncSuccess.html38
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onCheck.html34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onClick.html49
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onCollapse.html34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onDblClick.html35
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onDrag.html34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onDragMove.html34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onDrop.html48
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onExpand.html34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onMouseDown.html35
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onMouseUp.html35
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onNodeCreated.html35
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onRemove.html34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onRename.html40
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onRightClick.html36
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.check.autoCheckTrigger.html29
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.check.chkDisabledInherit.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.check.chkStyle.html48
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.check.chkboxType.html31
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.check.enable.html26
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.check.nocheckInherit.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.check.radioType.html29
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.data.keep.leaf.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.data.keep.parent.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.data.key.checked.html24
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.data.key.children.html23
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.data.key.name.html23
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.data.key.title.html24
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.data.key.url.html24
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.data.simpleData.enable.html39
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.data.simpleData.idKey.html32
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.data.simpleData.pIdKey.html32
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.data.simpleData.rootPId.html32
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.autoExpandTrigger.html29
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.autoOpenTime.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.borderMax.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.borderMin.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.inner.html60
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.isCopy.html32
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.isMove.html32
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.maxShowNodeNum.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.minMoveSize.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.next.html59
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.prev.html59
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.editNameSelectAll.html27
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.enable.html39
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.removeTitle.html48
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.renameTitle.html48
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.showRemoveBtn.html50
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.showRenameBtn.html52
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.treeId.html14
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.treeObj.html14
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.view.addDiyDom.html40
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.view.addHoverDom.html45
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.view.autoCancelSelected.html27
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.view.dblClickExpand.html45
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.view.expandSpeed.html31
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.view.fontCss.html42
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.view.nameIsHTML.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.view.removeHoverDom.html45
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.view.selectedMulti.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.view.showIcon.html45
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.view.showLine.html26
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.view.showTitle.html47
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/setting.view.txtSelectedEnable.html26
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.check_Child_State.html43
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.check_Focus.html19
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.checked.html32
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.checkedOld.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.children.html35
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.chkDisabled.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.click.html24
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.diy.html15
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.editNameFlag.html19
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.getCheckStatus.html63
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.getNextNode.html27
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.getParentNode.html27
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.getPreNode.html27
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.halfCheck.html29
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.icon.html33
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.iconClose.html33
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.iconOpen.html33
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.iconSkin.html43
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isAjaxing.html26
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isFirstNode.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isHidden.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isHover.html19
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isLastNode.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isParent.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.level.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.name.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.nocheck.html26
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.open.html30
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.parentTId.html27
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.tId.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.target.html24
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.url.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/treeNode.zAsync.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.addNodes.html42
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.cancelEditName.html30
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.cancelSelectedNode.html35
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.checkAllNodes.html29
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.checkNode.html44
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.copyNode.html47
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.destroy.html25
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.editName.html29
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.expandAll.html30
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.expandNode.html50
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getChangeCheckedNodes.html24
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getCheckedNodes.html28
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodeByParam.html32
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodeByTId.html27
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodeIndex.html30
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodes.html26
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodesByFilter.html43
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodesByParam.html31
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodesByParamFuzzy.html32
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getSelectedNodes.html23
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.hideNode.html29
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.hideNodes.html29
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.moveNode.html49
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.reAsyncChildNodes.html42
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.refresh.html24
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.removeChildNodes.html32
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.removeNode.html34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.selectNode.html34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.setChkDisabled.html44
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.setEditable.html27
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.setting.html14
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.showNode.html31
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.showNodes.html29
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.transformToArray.html27
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.transformTozTreeNodes.html44
-rw-r--r--common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.updateNode.html37
-rw-r--r--common/src/main/webapp/thirdparty/zTree/css/demo.css33
-rw-r--r--common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/ReadMe.txt1
-rw-r--r--common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/Thumbs.dbbin0 -> 23552 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/1_close.pngbin0 -> 601 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/1_open.pngbin0 -> 580 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/2.pngbin0 -> 570 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/3.pngbin0 -> 762 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/4.pngbin0 -> 399 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/5.pngbin0 -> 710 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/6.pngbin0 -> 432 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/7.pngbin0 -> 534 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/8.pngbin0 -> 529 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/9.pngbin0 -> 467 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/Thumbs.dbbin0 -> 19968 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/line_conn.gifbin0 -> 45 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/loading.gifbin0 -> 381 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/zTreeStandard.gifbin0 -> 5564 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/zTreeStandard.gifbakbin0 -> 5564 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/zTreeStandard.pngbin0 -> 11206 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/zTreeStandard.pngbakbin0 -> 11173 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/zTreeStandard.psdbin0 -> 93494 bytes
-rw-r--r--common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/zTreeStyle.css107
-rw-r--r--common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.all.js3506
-rw-r--r--common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.all.min.js160
-rw-r--r--common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.core.js1684
-rw-r--r--common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.core.min.js69
-rw-r--r--common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.excheck.js629
-rw-r--r--common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.excheck.min.js34
-rw-r--r--common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.exedit.js1191
-rw-r--r--common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.exedit.min.js53
-rw-r--r--common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.exhide.js363
-rw-r--r--common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.exhide.min.js22
-rw-r--r--common/src/main/webapp/thirdparty/zTree/zTree.v3.jquery.json35
-rw-r--r--common/src/main/webapp/usageguide/appserver/api.js255
-rw-r--r--common/src/main/webapp/usageguide/appserver/data/accordionData.json24
-rw-r--r--common/src/main/webapp/usageguide/appserver/data/buttonsData.json30
-rw-r--r--common/src/main/webapp/usageguide/appserver/data/checkboxData.json8
-rw-r--r--common/src/main/webapp/usageguide/appserver/data/dropdownData.json18
-rw-r--r--common/src/main/webapp/usageguide/appserver/data/functionalData.json6
-rw-r--r--common/src/main/webapp/usageguide/appserver/data/input.json1
-rw-r--r--common/src/main/webapp/usageguide/appserver/data/list.json76
-rw-r--r--common/src/main/webapp/usageguide/appserver/data/notificationData.json42
-rw-r--r--common/src/main/webapp/usageguide/appserver/data/provinceData.json1
-rw-r--r--common/src/main/webapp/usageguide/appserver/data/radioData.json14
-rw-r--r--common/src/main/webapp/usageguide/appserver/data/shortNote.json17
-rw-r--r--common/src/main/webapp/usageguide/appserver/data/tabData.json21
-rw-r--r--common/src/main/webapp/usageguide/appserver/data/tableData.json71
-rw-r--r--common/src/main/webapp/usageguide/appserver/data/textArea.json111
-rw-r--r--common/src/main/webapp/usageguide/appserver/data/treeData.json43
-rw-r--r--common/src/main/webapp/usageguide/appserver/data/vtabData.json21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/License.txt362
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/HISTORY.md464
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/LICENSE23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/README.md409
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/index.js157
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/lib/read.js188
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/lib/types/json.js175
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/lib/types/raw.js101
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/lib/types/text.js121
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/lib/types/urlencoded.js279
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/bytes/History.md70
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/bytes/LICENSE23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/bytes/Readme.md114
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/bytes/index.js157
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/bytes/package.json84
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/content-type/HISTORY.md14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/content-type/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/content-type/README.md92
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/content-type/index.js216
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/content-type/package.json70
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/.jshintrc3
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/.npmignore6
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/History.md195
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/Makefile36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/Readme.md188
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/bower.json28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/browser.js168
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/component.json19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/debug.js197
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node.js209
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/.npmignore5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/History.md66
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/LICENSE20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/README.md35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/index.js125
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/package.json48
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/package.json73
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/History.md84
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/Readme.md281
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/index.js521
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/lib/browser/index.js79
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/lib/compat/buffer-concat.js35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/lib/compat/callsite-tostring.js103
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/lib/compat/event-listener-count.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/lib/compat/index.js84
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/package.json67
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/HISTORY.md103
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/LICENSE23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/README.md132
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/index.js223
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/inherits/LICENSE16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/inherits/README.md42
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/inherits/inherits.js7
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/inherits/inherits_browser.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/inherits/package.json63
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/setprototypeof/LICENSE13
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/setprototypeof/README.md21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/setprototypeof/index.js13
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/setprototypeof/package.json53
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/HISTORY.md55
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/LICENSE23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/README.md103
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/codes.json65
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/index.js110
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/package.json104
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/package.json96
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/.npmignore6
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/.travis.yml20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/Changelog.md93
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/LICENSE21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/README.md157
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-codec.js554
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-data.js170
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/index.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/internal.js187
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-codec.js72
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-data-generated.js451
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-data.js169
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/big5-added.json122
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp936.json264
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp949.json273
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp950.json177
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/eucjp.json182
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/gbk-added.json55
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/shiftjis.json125
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/utf16.js174
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/utf7.js289
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/lib/bom-handling.js52
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/lib/extend-node.js214
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/lib/index.js141
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/lib/streams.js120
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/package.json118
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/HISTORY.md88
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/LICENSE23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/README.md154
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/index.js196
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/README.md80
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/index.js95
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/package.json64
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/package.json71
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/.eslintignore1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/.eslintrc19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/.jscs.json176
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/CHANGELOG.md120
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/CONTRIBUTING.md1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/LICENSE28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/dist/qs.js487
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/lib/index.js9
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/lib/parse.js167
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/lib/stringify.js137
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/lib/utils.js164
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/package.json86
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/test/index.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/test/parse.js423
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/test/stringify.js305
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/test/utils.js9
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/HISTORY.md209
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/README.md126
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/index.js320
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/node_modules/unpipe/HISTORY.md4
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/node_modules/unpipe/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/node_modules/unpipe/README.md43
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/node_modules/unpipe/index.js69
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/node_modules/unpipe/package.json59
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/package.json90
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/HISTORY.md212
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/LICENSE23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/README.md136
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/index.js262
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/media-typer/HISTORY.md22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/media-typer/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/media-typer/README.md81
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/media-typer/index.js270
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/media-typer/package.json58
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/HISTORY.md210
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/LICENSE23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/README.md103
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/index.js188
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/HISTORY.md375
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md82
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json6712
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/index.js11
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json103
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/package.json93
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/package.json86
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/body-parser/package.json88
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/History.md3142
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/LICENSE24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/Readme.md142
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/index.js11
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/lib/application.js643
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/lib/express.js103
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/lib/middleware/init.js36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/lib/middleware/query.js46
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/lib/request.js502
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/lib/response.js1065
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/lib/router/index.js645
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/lib/router/layer.js176
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/lib/router/route.js210
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/lib/utils.js299
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/lib/view.js173
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/HISTORY.md212
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/LICENSE23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/README.md135
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/index.js231
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/HISTORY.md210
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/LICENSE23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/README.md103
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/index.js188
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/HISTORY.md375
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/README.md82
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/db.json6712
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/index.js11
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/package.json102
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/package.json92
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/HISTORY.md98
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/LICENSE24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/README.md203
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/index.js124
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/charset.js169
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/encoding.js184
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/language.js179
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/mediaType.js294
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/package.json90
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/package.json78
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/array-flatten/LICENSE21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/array-flatten/README.md43
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/array-flatten/array-flatten.js64
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/array-flatten/package.json61
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-disposition/HISTORY.md45
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-disposition/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-disposition/README.md141
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-disposition/index.js445
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-disposition/package.json65
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-type/HISTORY.md14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-type/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-type/README.md92
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-type/index.js216
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-type/package.json69
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie-signature/.npmignore4
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie-signature/History.md38
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie-signature/Readme.md42
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie-signature/index.js51
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie-signature/package.json58
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie/HISTORY.md118
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie/LICENSE24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie/README.md220
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie/index.js195
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie/package.json71
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/.jshintrc3
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/.npmignore6
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/History.md195
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/Makefile36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/Readme.md188
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/bower.json28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/browser.js168
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/component.json19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/debug.js197
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node.js209
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/.npmignore5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/History.md66
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/LICENSE20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/README.md35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/index.js125
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/package.json47
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/package.json72
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/History.md84
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/Readme.md281
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/index.js521
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/lib/browser/index.js79
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/lib/compat/buffer-concat.js35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/lib/compat/callsite-tostring.js103
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/lib/compat/event-listener-count.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/lib/compat/index.js84
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/package.json66
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/encodeurl/HISTORY.md9
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/encodeurl/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/encodeurl/README.md124
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/encodeurl/index.js60
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/encodeurl/package.json74
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/escape-html/LICENSE24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/escape-html/Readme.md43
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/escape-html/index.js78
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/escape-html/package.json56
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/etag/HISTORY.md71
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/etag/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/etag/README.md165
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/etag/index.js132
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/etag/package.json72
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/HISTORY.md108
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/README.md142
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/index.js189
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/HISTORY.md55
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/LICENSE23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/README.md103
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/codes.json65
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/index.js110
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/package.json103
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/unpipe/HISTORY.md4
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/unpipe/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/unpipe/README.md43
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/unpipe/index.js69
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/unpipe/package.json58
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/package.json74
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/fresh/HISTORY.md38
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/fresh/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/fresh/README.md58
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/fresh/index.js57
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/fresh/package.json86
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/merge-descriptors/HISTORY.md21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/merge-descriptors/LICENSE23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/merge-descriptors/README.md48
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/merge-descriptors/index.js60
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/merge-descriptors/package.json137
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/methods/HISTORY.md29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/methods/LICENSE24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/methods/README.md51
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/methods/index.js69
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/methods/package.json87
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/HISTORY.md88
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/LICENSE23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/README.md154
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/index.js196
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/node_modules/ee-first/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/node_modules/ee-first/README.md80
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/node_modules/ee-first/index.js95
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/node_modules/ee-first/package.json63
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/package.json70
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/parseurl/HISTORY.md47
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/parseurl/LICENSE24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/parseurl/README.md120
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/parseurl/index.js138
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/parseurl/package.json88
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/path-to-regexp/History.md36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/path-to-regexp/LICENSE21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/path-to-regexp/Readme.md35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/path-to-regexp/index.js129
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/path-to-regexp/package.json184
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/HISTORY.md99
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/README.md136
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/index.js321
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/HISTORY.md4
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/README.md53
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/index.js35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/package.json64
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/.npmignore2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/.travis.yml10
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/Cakefile18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/LICENSE19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/README.md209
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/bower.json29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/ipaddr.min.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/lib/ipaddr.js526
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/package.json62
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/src/ipaddr.coffee450
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/test/ipaddr.test.coffee339
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/package.json74
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/.eslintignore1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/.eslintrc19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/.jscs.json176
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/CHANGELOG.md120
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/CONTRIBUTING.md1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/LICENSE28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/dist/qs.js487
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/lib/index.js9
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/lib/parse.js167
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/lib/stringify.js137
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/lib/utils.js164
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/package.json85
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/test/index.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/test/parse.js423
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/test/stringify.js305
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/test/utils.js9
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/range-parser/HISTORY.md51
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/range-parser/LICENSE23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/range-parser/README.md75
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/range-parser/index.js158
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/range-parser/package.json98
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/HISTORY.md346
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/LICENSE23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/README.md247
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/index.js948
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/.bin/mime15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/.bin/mime.cmd7
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/destroy/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/destroy/README.md60
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/destroy/index.js75
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/destroy/package.json71
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/HISTORY.md103
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/LICENSE23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/README.md132
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/index.js223
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/LICENSE16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/README.md42
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/inherits.js7
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/inherits_browser.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/package.json62
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/setprototypeof/LICENSE13
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/setprototypeof/README.md21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/setprototypeof/index.js13
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/setprototypeof/package.json52
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/package.json95
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/.npmignore0
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/LICENSE19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/README.md90
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/build/build.js11
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/build/test.js57
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/cli.js8
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/mime.js108
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/package.json72
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/types.json1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/.npmignore5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/History.md66
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/LICENSE20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/README.md35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/index.js125
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/package.json47
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/HISTORY.md55
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/LICENSE23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/README.md103
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/codes.json65
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/index.js110
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/package.json103
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/package.json95
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/serve-static/HISTORY.md332
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/serve-static/LICENSE25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/serve-static/README.md245
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/serve-static/index.js188
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/serve-static/package.json73
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/HISTORY.md212
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/LICENSE23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/README.md136
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/index.js262
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/media-typer/HISTORY.md22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/media-typer/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/media-typer/README.md81
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/media-typer/index.js270
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/media-typer/package.json57
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/HISTORY.md210
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/LICENSE23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/README.md103
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/index.js188
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/HISTORY.md375
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md82
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json6712
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/index.js11
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json102
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/package.json92
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/package.json85
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/utils-merge/.travis.yml6
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/utils-merge/LICENSE20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/utils-merge/README.md34
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/utils-merge/index.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/utils-merge/package.json58
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/vary/HISTORY.md29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/vary/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/vary/README.md91
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/vary/index.js124
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/vary/package.json71
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/express/package.json159
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/.coveralls.yml1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/.eslintrc15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/HISTORY.md1593
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/LICENSE201
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/Makefile11
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/README.md415
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/THIRD-PARTY-NOTICES41
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/boot_auth.js52
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/conf.json73
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/index.js55
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/insert_bench.js231
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/admin.js576
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/aggregation_cursor.js429
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/apm.js594
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/bulk/common.js439
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/bulk/ordered.js532
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/bulk/unordered.js534
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/collection.js3354
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/command_cursor.js311
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/cursor.js1181
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/db.js1881
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/gridfs-stream/download.js398
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/gridfs-stream/index.js367
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/gridfs-stream/upload.js520
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/gridfs/chunk.js230
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/gridfs/grid_store.js1951
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/metadata.js64
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/mongo_client.js327
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/mongos.js514
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/read_preference.js131
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/replset.js568
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/server.js511
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/topology_base.js191
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/url_parser.js405
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/utils.js312
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/CHANGELOG.md65
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/LICENSE19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/README.md74
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/dist/es6-promise.js959
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/dist/es6-promise.min.js9
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise.umd.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/-internal.js273
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/asap.js119
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/enumerator.js118
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/polyfill.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise.js384
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/all.js52
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/race.js86
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/reject.js46
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/resolve.js48
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/then.js34
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/utils.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/package.json96
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/.coveralls.yml1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/.eslintrc15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/HISTORY.md595
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/LICENSE201
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/Makefile11
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/README.md228
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/TESTING.md18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/THIRD-PARTY-NOTICES41
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/blocking_test.js0
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/conf.json59
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/connect_test.js72
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/index.js27
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/gssapi.js262
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/mongocr.js181
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/plain.js170
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/scram.js343
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/sspi.js250
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/x509.js164
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/command_result.js34
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/commands.js546
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js582
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/logger.js228
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js1237
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/utils.js91
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js696
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/error.js44
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/tools/smoke_plugin.js59
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/mongos.js1133
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/read_preference.js118
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/replset.js1403
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/replset_state.js972
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js855
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/shared.js225
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/2_4_support.js567
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/2_6_support.js330
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/3_2_support.js533
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/commands.js357
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/shared.js27
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/HISTORY.md191
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/LICENSE.md201
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/README.md141
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/bower.json25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/browser_build/bson.js16734
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/browser_build/package.json8
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/index.js46
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/binary.js347
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/bson.js358
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/code.js24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/db_ref.js32
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/decimal128.js728
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/double.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/float_parser.js121
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/int_32.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/long.js856
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/map.js126
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/max_key.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/min_key.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/objectid.js362
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/parser/calculate_size.js152
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/parser/deserializer.js653
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/parser/serializer.js1001
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/regexp.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/symbol.js47
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/timestamp.js856
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/package.json87
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/.npmignore33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/.travis.yml6
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/LICENSE201
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/README.md2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/index.js109
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/.bin/semver15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/.bin/semver.cmd7
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/index.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/license21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/package.json64
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/readme.md58
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/LICENSE15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/README.md350
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/bin/semver133
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/package.json60
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/range.bnf16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/semver.js1203
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/package.json69
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/test/require_optional_tests.js42
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/package.json77
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/simple_2_document_limit_toArray.dat11000
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/test.js71
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/test1.js72
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/test_bug.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/yarn.lock2485
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/.npmignore8
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/.travis.yml49
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/LICENSE18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/README.md36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/doc/stream.md2015
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md60
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/duplex.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/_stream_duplex.js75
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/_stream_passthrough.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/_stream_readable.js937
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/_stream_transform.js180
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/_stream_writable.js526
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/internal/streams/BufferList.js64
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/index.js108
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/license.md19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/package.json51
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/readme.md21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/LICENSE19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/README.md3
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/float.patch604
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/lib/util.js107
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/package.json60
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/test.js68
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/LICENSE16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/README.md42
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/inherits.js7
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/inherits_browser.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/package.json63
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/.npmignore1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/.travis.yml4
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/Makefile6
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/README.md60
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/component.json19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/index.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/package.json71
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/test.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml12
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/index.js43
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/license.md19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/package.json49
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/readme.md18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/test.js24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/.npmignore2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/LICENSE20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/README.md7
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/index.js221
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/package.json54
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/History.md16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/LICENSE24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/README.md53
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/browser.js67
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/node.js6
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/package.json54
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/package.json92
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/passthrough.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/readable.js16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/transform.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/writable.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/package.json92
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongodb/yarn.lock3184
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/.eslintignore3
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/.eslintrc.yml31
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/.npmignore16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/.travis.yml15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/CONTRIBUTING.md56
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/History.md3328
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/README.md322
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/README.md41
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/aggregate/aggregate.js103
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/aggregate/package.json14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/aggregate/person.js17
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/doc-methods.js77
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/README.md1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/connection-sharing/README.md6
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/connection-sharing/app.js17
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/connection-sharing/modelA.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/connection-sharing/package.json14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/connection-sharing/routes.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/geospatial/geoJSONSchema.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/geospatial/geoJSONexample.js56
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/geospatial/geospatial.js100
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/geospatial/package.json14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/geospatial/person.js27
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/globalschemas/gs_example.js47
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/globalschemas/person.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/lean/lean.js84
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/lean/package.json14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/lean/person.js16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/mapreduce/mapreduce.js100
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/mapreduce/package.json14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/mapreduce/person.js16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-across-three-collections.js134
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-basic.js103
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-of-existing-doc.js109
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-of-multiple-existing-docs.js124
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-options.js138
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-plain-objects.js106
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/promises/package.json14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/promises/person.js15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/promises/promise.js94
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/querybuilder/package.json14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/querybuilder/person.js15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/querybuilder/querybuilder.js79
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/replicasets/package.json14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/replicasets/person.js15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/replicasets/replica-sets.js71
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/schema/schema.js119
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/schema/storing-schemas-as-json/index.js27
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/schema/storing-schemas-as-json/schema.json9
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/statics/person.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/statics/statics.js41
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/index.js7
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/ES6Promise.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/aggregate.js685
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/browser.js126
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/browserDocument.js103
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/cast.js248
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/collection.js210
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/connection.js854
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/connectionstate.js27
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/document.js2615
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/document_provider.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/document_provider.web.js17
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/SPEC.md4
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/browser/ReadPreference.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/browser/binary.js12
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/browser/index.js7
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/browser/objectid.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/index.js17
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/index.web.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/ReadPreference.js45
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/binary.js8
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js267
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js386
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/index.js7
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/objectid.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error.js55
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/browserMissingSchema.js32
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/cast.js60
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/disconnected.js40
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/divergentArray.js42
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/messages.js42
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/missingSchema.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/objectExpected.js35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/overwriteModel.js31
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/strict.js35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/validation.js63
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/validator.js81
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/version.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/index.js818
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/internal.js31
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/model.js3414
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/promise.js314
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/promise_provider.js51
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/query.js3413
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/querycursor.js314
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/queryhelpers.js78
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/querystream.js367
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema.js1768
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/array.js314
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/boolean.js103
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/buffer.js188
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/date.js296
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/documentarray.js313
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/embedded.js177
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/index.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/mixed.js80
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/number.js290
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/objectid.js207
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/operators/bitwise.js36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/operators/geospatial.js100
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/operators/helpers.js34
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/string.js516
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schematype.js931
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/services/common.js87
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/services/setDefaultsOnInsert.js96
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/services/updateValidators.js100
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/statemachine.js178
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/array.js778
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/buffer.js273
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/documentarray.js256
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/embedded.js347
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/index.js15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/objectid.js13
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/subdocument.js152
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/utils.js868
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/virtualtype.js103
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/CHANGELOG.md219
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/LICENSE19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/README.md12
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/apply.js62
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/applyEach.js51
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/applyEachSeries.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/asyncify.js93
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/auto.js285
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/autoInject.js167
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/bower.json17
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/cargo.js95
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/compose.js55
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/concat.js45
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/concatSeries.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/constant.js65
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/detect.js61
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/detectLimit.js48
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/detectSeries.js46
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/dir.js42
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/dist/async.js5427
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/dist/async.min.js2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/doDuring.js60
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/doUntil.js39
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/doWhilst.js54
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/during.js71
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/each.js80
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/eachLimit.js42
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/eachOf.js105
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/eachOfLimit.js39
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/eachOfSeries.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/eachSeries.js38
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/ensureAsync.js69
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/every.js50
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/everyLimit.js42
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/everySeries.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/filter.js45
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/filterLimit.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/filterSeries.js35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/forever.js61
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/index.js505
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/DoublyLinkedList.js63
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/applyEach.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/breakLoop.js9
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/concat.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/consoleFunc.js35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/createTester.js50
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/doLimit.js12
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/doParallel.js19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/doParallelLimit.js19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/doSeries.js19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/eachOfLimit.js71
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/filter.js50
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/findGetResult.js10
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/getIterator.js13
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/initialParams.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/iterator.js58
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/map.js34
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/notId.js10
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/once.js15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/onlyOnce.js15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/parallel.js38
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/queue.js184
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/reject.js25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/setImmediate.js41
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/withoutIndex.js12
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/log.js41
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/map.js54
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/mapLimit.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/mapSeries.js36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/mapValues.js63
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/mapValuesLimit.js56
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/mapValuesSeries.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/memoize.js95
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/nextTick.js51
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/LICENSE47
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/README.md39
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_DataView.js7
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Hash.js32
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_LazyWrapper.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_ListCache.js32
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_LodashWrapper.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Map.js7
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_MapCache.js32
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Promise.js7
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Set.js7
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_SetCache.js27
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Stack.js27
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Symbol.js6
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Uint8Array.js6
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_WeakMap.js7
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_addMapEntry.js15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_addSetEntry.js15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_apply.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayAggregator.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayEach.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayEachRight.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayEvery.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayFilter.js25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayIncludes.js17
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayIncludesWith.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayLikeKeys.js49
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayMap.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayPush.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayReduce.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayReduceRight.js24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arraySample.js15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arraySampleSize.js17
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayShuffle.js15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arraySome.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_asciiSize.js12
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_asciiToArray.js12
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_asciiWords.js15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_assignInDefaults.js27
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_assignMergeValue.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_assignValue.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_assocIndexOf.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseAggregator.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseAssign.js17
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseAssignIn.js17
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseAssignValue.js25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseAt.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseClamp.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseClone.js153
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseConforms.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseConformsTo.js27
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseCreate.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseDelay.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseDifference.js67
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseEach.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseEachRight.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseEvery.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseExtremum.js32
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFill.js32
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFilter.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFindIndex.js24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFindKey.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFlatten.js38
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFor.js16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseForOwn.js16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseForOwnRight.js16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseForRight.js15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFunctions.js19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseGet.js24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseGetAllKeys.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseGetTag.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseGt.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseHas.js19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseHasIn.js13
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseInRange.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIndexOf.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIndexOfWith.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIntersection.js74
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseInverter.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseInvoke.js24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsArguments.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsArrayBuffer.js17
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsDate.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsEqual.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsEqualDeep.js88
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsMap.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsMatch.js62
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsNaN.js12
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsNative.js47
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsRegExp.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsSet.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsTypedArray.js60
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIteratee.js31
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseKeys.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseKeysIn.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseLodash.js10
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseLt.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMap.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMatches.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMatchesProperty.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMean.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMerge.js41
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMergeDeep.js93
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseNth.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseOrderBy.js34
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePick.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePickBy.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseProperty.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePropertyDeep.js16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePropertyOf.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePullAll.js51
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePullAt.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseRandom.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseRange.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseReduce.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseRepeat.js35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseRest.js17
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSample.js15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSampleSize.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSet.js47
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSetData.js17
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSetToString.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseShuffle.js15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSlice.js31
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSome.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSortBy.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSortedIndex.js42
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSortedIndexBy.js64
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSortedUniq.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSum.js24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseTimes.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseToNumber.js24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseToPairs.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseToString.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseUnary.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseUniq.js72
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseUnset.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseUpdate.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseValues.js19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseWhile.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseWrapperValue.js25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseXor.js36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseZipObject.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cacheHas.js13
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_castArrayLikeObject.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_castFunction.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_castPath.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_castRest.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_castSlice.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_charsEndIndex.js19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_charsStartIndex.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneArrayBuffer.js16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneBuffer.js35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneDataView.js16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneMap.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneRegExp.js17
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneSet.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneSymbol.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneTypedArray.js16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_compareAscending.js41
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_compareMultiple.js44
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_composeArgs.js39
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_composeArgsRight.js41
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_copyArray.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_copyObject.js40
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_copySymbols.js16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_copySymbolsIn.js16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_coreJsData.js6
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_countHolders.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createAggregator.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createAssigner.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createBaseEach.js32
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createBaseFor.js25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createBind.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createCaseFirst.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createCompounder.js24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createCtor.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createCurry.js46
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createFind.js25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createFlow.js82
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createHybrid.js92
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createInverter.js17
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createMathOperation.js38
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createOver.js27
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createPadding.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createPartial.js43
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createRange.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createRecurry.js56
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createRelationalOperation.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createRound.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createSet.js19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createToPairs.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createWrap.js106
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_deburrLetter.js71
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_defineProperty.js11
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_equalArrays.js83
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_equalByTag.js112
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_equalObjects.js89
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_escapeHtmlChar.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_escapeStringChar.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_flatRest.js16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_freeGlobal.js4
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getAllKeys.js16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getAllKeysIn.js17
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getData.js15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getFuncName.js31
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getHolder.js13
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getMapData.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getMatchData.js24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getNative.js17
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getPrototype.js6
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getRawTag.js46
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getSymbols.js16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getSymbolsIn.js25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getTag.js58
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getValue.js13
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getView.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getWrapDetails.js17
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hasPath.js39
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hasUnicode.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hasUnicodeWord.js15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hashClear.js15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hashDelete.js17
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hashGet.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hashHas.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hashSet.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_initCloneArray.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_initCloneByTag.js80
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_initCloneObject.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_insertWrapDetails.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isFlattenable.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isIndex.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isIterateeCall.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isKey.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isKeyable.js15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isLaziable.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isMaskable.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isMasked.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isPrototype.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isStrictComparable.js15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_iteratorToArray.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_lazyClone.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_lazyReverse.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_lazyValue.js73
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_listCacheClear.js13
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_listCacheDelete.js35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_listCacheGet.js19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_listCacheHas.js16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_listCacheSet.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapCacheClear.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapCacheDelete.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapCacheGet.js16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapCacheHas.js16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapCacheSet.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapToArray.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_matchesStrictComparable.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_memoizeCapped.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mergeData.js90
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mergeDefaults.js27
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_metaMap.js6
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_nativeCreate.js6
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_nativeKeys.js6
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_nativeKeysIn.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_nodeUtil.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_objectToString.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_overArg.js15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_overRest.js36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_parent.js16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_reEscape.js4
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_reEvaluate.js4
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_reInterpolate.js4
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_realNames.js4
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_reorder.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_replaceHolders.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_root.js9
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setCacheAdd.js19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setCacheHas.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setData.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setToArray.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setToPairs.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setToString.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setWrapToString.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_shortOut.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_shuffleSelf.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stackClear.js15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stackDelete.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stackGet.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stackHas.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stackSet.js34
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_strictIndexOf.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_strictLastIndexOf.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stringSize.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stringToArray.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stringToPath.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_toKey.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_toSource.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_unescapeHtmlChar.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_unicodeSize.js44
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_unicodeToArray.js40
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_unicodeWords.js69
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_updateWrapDetails.js46
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_wrapperClone.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/add.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/after.js42
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/array.js67
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/ary.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/assign.js58
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/assignIn.js40
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/assignInWith.js38
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/assignWith.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/at.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/attempt.js35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/before.js40
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/bind.js57
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/bindAll.js41
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/bindKey.js68
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/camelCase.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/capitalize.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/castArray.js44
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/ceil.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/chain.js38
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/chunk.js50
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/clamp.js39
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/clone.js36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/cloneDeep.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/cloneDeepWith.js40
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/cloneWith.js42
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/collection.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/commit.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/compact.js31
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/concat.js43
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/cond.js60
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/conforms.js35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/conformsTo.js32
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/constant.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/core.js3839
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/core.min.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/countBy.js40
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/create.js43
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/curry.js57
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/curryRight.js54
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/date.js3
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/debounce.js188
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/deburr.js45
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/defaultTo.js25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/defaults.js32
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/defaultsDeep.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/defer.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/delay.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/difference.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/differenceBy.js44
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/differenceWith.js40
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/divide.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/drop.js38
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/dropRight.js39
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/dropRightWhile.js45
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/dropWhile.js45
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/each.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/eachRight.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/endsWith.js43
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/entries.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/entriesIn.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/eq.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/escape.js43
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/escapeRegExp.js32
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/every.js56
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/extend.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/extendWith.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fill.js45
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/filter.js48
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/find.js42
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/findIndex.js55
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/findKey.js44
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/findLast.js25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/findLastIndex.js59
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/findLastKey.js44
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/first.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flatMap.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flatMapDeep.js31
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flatMapDepth.js31
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flatten.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flattenDeep.js25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flattenDepth.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flip.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/floor.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flow.js27
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flowRight.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forEach.js41
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forEachRight.js31
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forIn.js39
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forInRight.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forOwn.js36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forOwnRight.js34
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp.js2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/F.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/T.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/__.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/_baseConvert.js567
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/_convertBrowser.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/_falseOptions.js7
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/_mapping.js367
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/_util.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/add.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/after.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/all.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/allPass.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/always.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/any.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/anyPass.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/apply.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/array.js2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/ary.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assign.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignAll.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignAllWith.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignIn.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignInAll.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignInAllWith.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignInWith.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignWith.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assoc.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assocPath.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/at.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/attempt.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/before.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/bind.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/bindAll.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/bindKey.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/camelCase.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/capitalize.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/castArray.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/ceil.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/chain.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/chunk.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/clamp.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/clone.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/cloneDeep.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/cloneDeepWith.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/cloneWith.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/collection.js2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/commit.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/compact.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/complement.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/compose.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/concat.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/cond.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/conforms.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/conformsTo.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/constant.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/contains.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/convert.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/countBy.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/create.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/curry.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/curryN.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/curryRight.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/curryRightN.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/date.js2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/debounce.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/deburr.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defaultTo.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defaults.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defaultsAll.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defaultsDeep.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defaultsDeepAll.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defer.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/delay.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/difference.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/differenceBy.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/differenceWith.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dissoc.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dissocPath.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/divide.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/drop.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dropLast.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dropLastWhile.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dropRight.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dropRightWhile.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dropWhile.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/each.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/eachRight.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/endsWith.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/entries.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/entriesIn.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/eq.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/equals.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/escape.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/escapeRegExp.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/every.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/extend.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/extendAll.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/extendAllWith.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/extendWith.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/fill.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/filter.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/find.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findFrom.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findIndex.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findIndexFrom.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findKey.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findLast.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findLastFrom.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findLastIndex.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findLastIndexFrom.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findLastKey.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/first.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flatMap.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flatMapDeep.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flatMapDepth.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flatten.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flattenDeep.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flattenDepth.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flip.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/floor.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flow.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flowRight.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forEach.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forEachRight.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forIn.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forInRight.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forOwn.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forOwnRight.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/fromPairs.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/function.js2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/functions.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/functionsIn.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/get.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/getOr.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/groupBy.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/gt.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/gte.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/has.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/hasIn.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/head.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/identical.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/identity.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/inRange.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/includes.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/includesFrom.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/indexBy.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/indexOf.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/indexOfFrom.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/init.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/initial.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/intersection.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/intersectionBy.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/intersectionWith.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invert.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invertBy.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invertObj.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invoke.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invokeArgs.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invokeArgsMap.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invokeMap.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isArguments.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isArray.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isArrayBuffer.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isArrayLike.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isArrayLikeObject.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isBoolean.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isBuffer.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isDate.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isElement.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isEmpty.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isEqual.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isEqualWith.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isError.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isFinite.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isFunction.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isInteger.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isLength.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isMap.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isMatch.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isMatchWith.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isNaN.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isNative.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isNil.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isNull.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isNumber.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isObject.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isObjectLike.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isPlainObject.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isRegExp.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isSafeInteger.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isSet.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isString.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isSymbol.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isTypedArray.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isUndefined.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isWeakMap.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isWeakSet.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/iteratee.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/join.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/juxt.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/kebabCase.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/keyBy.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/keys.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/keysIn.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lang.js2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/last.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lastIndexOf.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lastIndexOfFrom.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lowerCase.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lowerFirst.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lt.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lte.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/map.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mapKeys.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mapValues.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/matches.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/matchesProperty.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/math.js2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/max.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/maxBy.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mean.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/meanBy.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/memoize.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/merge.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mergeAll.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mergeAllWith.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mergeWith.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/method.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/methodOf.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/min.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/minBy.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mixin.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/multiply.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/nAry.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/negate.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/next.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/noop.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/now.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/nth.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/nthArg.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/number.js2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/object.js2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/omit.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/omitAll.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/omitBy.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/once.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/orderBy.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/over.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/overArgs.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/overEvery.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/overSome.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pad.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/padChars.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/padCharsEnd.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/padCharsStart.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/padEnd.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/padStart.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/parseInt.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/partial.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/partialRight.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/partition.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/path.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pathEq.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pathOr.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/paths.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pick.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pickAll.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pickBy.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pipe.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/placeholder.js6
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/plant.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pluck.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/prop.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/propEq.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/propOr.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/property.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/propertyOf.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/props.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pull.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pullAll.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pullAllBy.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pullAllWith.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pullAt.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/random.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/range.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/rangeRight.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/rangeStep.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/rangeStepRight.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/rearg.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/reduce.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/reduceRight.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/reject.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/remove.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/repeat.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/replace.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/rest.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/restFrom.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/result.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/reverse.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/round.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sample.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sampleSize.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/seq.js2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/set.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/setWith.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/shuffle.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/size.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/slice.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/snakeCase.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/some.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortBy.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedIndex.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedIndexBy.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedIndexOf.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedLastIndex.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedLastIndexBy.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedLastIndexOf.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedUniq.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedUniqBy.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/split.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/spread.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/spreadFrom.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/startCase.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/startsWith.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/string.js2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/stubArray.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/stubFalse.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/stubObject.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/stubString.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/stubTrue.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/subtract.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sum.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sumBy.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/symmetricDifference.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/symmetricDifferenceBy.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/symmetricDifferenceWith.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/tail.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/take.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/takeLast.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/takeLastWhile.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/takeRight.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/takeRightWhile.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/takeWhile.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/tap.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/template.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/templateSettings.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/throttle.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/thru.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/times.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toArray.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toFinite.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toInteger.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toIterator.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toJSON.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toLength.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toLower.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toNumber.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toPairs.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toPairsIn.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toPath.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toPlainObject.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toSafeInteger.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toString.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toUpper.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/transform.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trim.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trimChars.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trimCharsEnd.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trimCharsStart.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trimEnd.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trimStart.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/truncate.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unapply.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unary.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unescape.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/union.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unionBy.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unionWith.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/uniq.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/uniqBy.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/uniqWith.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/uniqueId.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unnest.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unset.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unzip.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unzipWith.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/update.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/updateWith.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/upperCase.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/upperFirst.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/useWith.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/util.js2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/value.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/valueOf.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/values.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/valuesIn.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/where.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/whereEq.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/without.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/words.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrap.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrapperAt.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrapperChain.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrapperLodash.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrapperReverse.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrapperValue.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/xor.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/xorBy.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/xorWith.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zip.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zipAll.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zipObj.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zipObject.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zipObjectDeep.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zipWith.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fromPairs.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/function.js25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/functions.js31
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/functionsIn.js31
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/get.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/groupBy.js41
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/gt.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/gte.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/has.js35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/hasIn.js34
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/head.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/identity.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/inRange.js55
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/includes.js53
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/index.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/indexOf.js42
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/initial.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/intersection.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/intersectionBy.js45
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/intersectionWith.js41
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/invert.js27
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/invertBy.js44
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/invoke.js24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/invokeMap.js41
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isArguments.js36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isArray.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isArrayBuffer.js27
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isArrayLike.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isArrayLikeObject.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isBoolean.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isBuffer.js38
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isDate.js27
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isElement.js25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isEmpty.js77
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isEqual.js35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isEqualWith.js41
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isError.js36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isFinite.js36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isFunction.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isInteger.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isLength.js35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isMap.js27
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isMatch.js36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isMatchWith.js41
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isNaN.js38
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isNative.js40
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isNil.js25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isNull.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isNumber.js38
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isObject.js31
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isObjectLike.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isPlainObject.js62
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isRegExp.js27
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isSafeInteger.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isSet.js27
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isString.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isSymbol.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isTypedArray.js27
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isUndefined.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isWeakMap.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isWeakSet.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/iteratee.js53
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/join.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/kebabCase.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/keyBy.js36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/keys.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/keysIn.js32
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lang.js58
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/last.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lastIndexOf.js46
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lodash.js17065
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lodash.min.js136
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lowerCase.js27
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lowerFirst.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lt.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lte.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/map.js53
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/mapKeys.js36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/mapValues.js43
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/matches.js39
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/matchesProperty.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/math.js17
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/max.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/maxBy.js34
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/mean.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/meanBy.js31
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/memoize.js73
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/merge.js39
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/mergeWith.js39
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/method.js34
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/methodOf.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/min.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/minBy.js34
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/mixin.js74
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/multiply.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/negate.js40
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/next.js35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/noop.js17
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/now.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/nth.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/nthArg.js32
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/number.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/object.js49
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/omit.js56
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/omitBy.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/once.js25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/orderBy.js47
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/over.js24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/overArgs.js61
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/overEvery.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/overSome.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/package.json70
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pad.js49
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/padEnd.js39
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/padStart.js39
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/parseInt.js43
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/partial.js50
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/partialRight.js49
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/partition.js43
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pick.js25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pickBy.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/plant.js48
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/property.js32
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/propertyOf.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pull.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pullAll.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pullAllBy.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pullAllWith.js32
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pullAt.js43
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/random.js82
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/range.js46
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/rangeRight.js41
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/rearg.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/reduce.js51
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/reduceRight.js36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/reject.js46
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/remove.js53
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/repeat.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/replace.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/rest.js40
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/result.js56
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/reverse.js34
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/round.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sample.js24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sampleSize.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/seq.js16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/set.js35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/setWith.js32
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/shuffle.js25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/size.js46
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/slice.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/snakeCase.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/some.js51
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortBy.js48
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedIndex.js24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedIndexBy.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedIndexOf.js31
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedLastIndex.js25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedLastIndexBy.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedLastIndexOf.js31
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedUniq.js24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedUniqBy.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/split.js52
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/spread.js63
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/startCase.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/startsWith.js36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/string.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/stubArray.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/stubFalse.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/stubObject.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/stubString.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/stubTrue.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/subtract.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sum.js24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sumBy.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/tail.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/take.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/takeRight.js39
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/takeRightWhile.js45
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/takeWhile.js45
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/tap.js29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/template.js238
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/templateSettings.js67
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/throttle.js69
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/thru.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/times.js51
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toArray.js58
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toFinite.js42
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toInteger.js36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toIterator.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toJSON.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toLength.js38
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toLower.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toNumber.js66
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toPairs.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toPairsIn.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toPath.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toPlainObject.js32
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toSafeInteger.js35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toString.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toUpper.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/transform.js65
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/trim.js49
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/trimEnd.js43
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/trimStart.js43
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/truncate.js111
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unary.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unescape.js34
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/union.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unionBy.js39
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unionWith.js34
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/uniq.js25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/uniqBy.js31
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/uniqWith.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/uniqueId.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unset.js34
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unzip.js45
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unzipWith.js39
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/update.js35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/updateWith.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/upperCase.js27
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/upperFirst.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/util.js34
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/value.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/valueOf.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/values.js34
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/valuesIn.js32
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/without.js31
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/words.js35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrap.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrapperAt.js48
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrapperChain.js34
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrapperLodash.js147
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrapperReverse.js44
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrapperValue.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/xor.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/xorBy.js39
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/xorWith.js34
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/zip.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/zipObject.js24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/zipObjectDeep.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/zipWith.js32
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/package.json121
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/parallel.js87
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/parallelLimit.js41
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/priorityQueue.js99
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/queue.js120
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/race.js67
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/reduce.js73
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/reduceRight.js42
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/reflect.js80
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/reflectAll.js104
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/reject.js44
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/rejectLimit.js36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/rejectSeries.js34
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/retry.js152
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/retryable.js56
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/seq.js79
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/series.js85
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/setImmediate.js45
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/some.js52
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/someLimit.js43
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/someSeries.js38
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/sortBy.js85
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/timeout.js85
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/times.js50
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/timesLimit.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/timesSeries.js32
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/transform.js85
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/unmemoize.js25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/until.js42
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/waterfall.js114
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/whilst.js67
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/HISTORY.md179
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/LICENSE.md201
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/README.md95
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/alternate_parsers/bson.js1574
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/alternate_parsers/faster_bson.js429
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/bower.json25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/browser_build/bson.js4843
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/browser_build/package.json8
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/deserializer_bak.js357
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/binary.js347
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/bson.js327
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/code.js24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/db_ref.js32
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/decimal128.js728
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/double.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/float_parser.js121
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/index.js90
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/int_32.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/long.js856
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/map.js126
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/max_key.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/min_key.js14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/objectid.js343
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/parser/calculate_size.js152
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/parser/deserializer.js653
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/parser/serializer.js991
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/regexp.js30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/symbol.js47
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/timestamp.js856
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/package.json81
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/tools/gleak.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/.npmignore2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/Makefile9
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/README.md369
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/hooks.alt.js134
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/hooks.js188
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/package.json70
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/test.js786
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/.npmignore28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/.travis.yml9
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/LICENSE202
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/Makefile5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/README.md379
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/docs.js37
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/gulpfile.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/index.js312
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/package.json63
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/test/examples.test.js339
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/test/post.test.js155
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/test/pre.test.js256
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/test/wrap.test.js347
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/.coveralls.yml1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/HISTORY.md1547
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/LICENSE201
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/Makefile11
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/README.md415
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/boot_auth.js52
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/conf.json73
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/index.js55
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/insert_bench.js231
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/admin.js581
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/aggregation_cursor.js444
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/apm.js613
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/bulk/common.js440
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/bulk/ordered.js539
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/bulk/unordered.js542
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/collection.js3360
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/command_cursor.js320
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/cursor.js1182
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/db.js1886
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/gridfs-stream/download.js399
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/gridfs-stream/index.js366
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/gridfs-stream/upload.js525
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/gridfs/chunk.js233
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/gridfs/grid_store.js1956
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/metadata.js64
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/mongo_client.js328
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/mongos.js509
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/read_preference.js131
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/replset.js559
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/server.js507
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/topology_base.js191
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/url_parser.js406
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/utils.js313
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/CHANGELOG.md65
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/LICENSE19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/README.md74
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/dist/es6-promise.js959
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/dist/es6-promise.min.js9
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise.umd.js18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/-internal.js273
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/asap.js119
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/enumerator.js118
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/polyfill.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise.js384
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/all.js52
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/race.js86
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/reject.js46
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/resolve.js48
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/then.js34
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/utils.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/package.json95
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/.coveralls.yml1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/HISTORY.md559
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/LICENSE201
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/Makefile11
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/README.md228
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/TESTING.md18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/conf.json59
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/connect_test.js72
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/index.js38
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/gssapi.js266
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/mongocr.js185
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/plain.js170
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/scram.js345
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/sspi.js255
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/x509.js165
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/command_result.js38
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/commands.js555
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js568
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/logger.js229
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js1220
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/utils.js67
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js699
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/error.js44
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/tools/smoke_plugin.js59
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/mongos.js1112
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/read_preference.js119
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/replset.js1365
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/replset_state.js948
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js842
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/shared.js225
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/2_4_support.js569
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/2_6_support.js332
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/3_2_support.js541
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/commands.js357
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/shared.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/.npmignore33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/.travis.yml6
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/LICENSE201
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/README.md2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/index.js109
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/.bin/semver15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/.bin/semver.cmd7
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/index.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/license21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/package.json63
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/readme.md58
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/LICENSE15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/README.md350
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/bin/semver133
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/package.json59
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/range.bnf16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/semver.js1203
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/package.json68
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/test/require_optional_tests.js42
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/package.json74
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/simple_2_document_limit_toArray.dat11000
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/test.js71
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/test1.js72
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/.npmignore8
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/.travis.yml49
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/LICENSE18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/README.md36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/doc/stream.md2015
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md60
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/duplex.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/_stream_duplex.js75
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/_stream_passthrough.js26
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/_stream_readable.js937
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/_stream_transform.js180
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/_stream_writable.js526
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/internal/streams/BufferList.js64
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/index.js108
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/license.md19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/package.json49
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/readme.md21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/LICENSE19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/README.md3
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/float.patch604
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/lib/util.js107
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/package.json59
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/test.js68
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/LICENSE16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/README.md42
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/inherits.js7
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/inherits_browser.js23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/package.json63
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/.npmignore1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/.travis.yml4
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/Makefile6
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/README.md60
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/component.json19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/index.js5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/package.json70
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/test.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml12
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/index.js43
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/license.md19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/package.json48
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/readme.md18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/test.js24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/.npmignore2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/LICENSE20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/README.md7
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/index.js221
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/package.json53
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/History.md16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/LICENSE24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/README.md53
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/browser.js67
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/node.js6
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/package.json53
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/package.json90
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/passthrough.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/readable.js16
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/transform.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/writable.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/package.json90
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/.npmignore2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/.travis.yml4
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/History.md30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/Makefile8
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/README.md278
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/bench.js109
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/bench.log0
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/bench.out69
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/component.json8
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/index.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/lib/index.js215
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/package.json48
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/test/index.js1790
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/.npmignore4
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/.travis.yml5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/History.md80
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/README.md224
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/lib/promise.js445
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/package.json65
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/test/promise.domain.test.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/test/promise.test.js554
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/test/promises.Aplus.js15
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/.npmignore3
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/.travis.yml8
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/History.md265
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/Makefile22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/README.md1219
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/collection/collection.js42
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/collection/index.js13
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/collection/node.js108
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/env.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/mquery.js2728
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/permissions.js88
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/utils.js342
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/LICENSE21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/README.md679
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/changelog.md1723
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/browser/bluebird.js4887
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/browser/bluebird.min.js31
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/any.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/assert.js55
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/async.js150
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/bind.js72
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/bluebird.js11
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/call_get.js123
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/cancel.js48
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/captured_trace.js493
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/catch_filter.js66
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/context.js38
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/debuggability.js162
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/direct_resolve.js63
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/each.js12
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/errors.js111
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/es5.js80
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/filter.js12
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/finally.js98
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/generators.js136
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/join.js107
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/map.js133
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/method.js44
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/nodeify.js59
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/progress.js76
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/promise.js754
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/promise_array.js142
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/promise_resolver.js123
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/promisify.js307
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/props.js79
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/queue.js90
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/race.js47
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/reduce.js148
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/schedule.js35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/settle.js40
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/some.js125
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/synchronous_inspection.js94
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/thenables.js84
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/timers.js64
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/using.js213
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/util.js321
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/package.json100
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/.jshintrc3
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/.npmignore6
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/History.md195
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/Makefile36
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/Readme.md188
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/bower.json28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/browser.js168
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/component.json19
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/debug.js197
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/node.js209
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/package.json73
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/.npmignore2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/.travis.yml4
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/History.md30
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/Makefile5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/README.md62
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/bench.js95
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/component.json14
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/index.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/lib/sliced.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/package.json47
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/test/index.js80
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/package.json72
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/collection/browser.js0
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/collection/mongo.js0
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/collection/node.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/env.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/index.js2857
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/utils.test.js143
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/.npmignore5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/History.md66
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/LICENSE20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/README.md35
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/index.js125
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/package.json48
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/.npmignore2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/.travis.yml4
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/History.md59
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/Makefile5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/README.md46
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/index.js1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/lib/index.js241
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/package.json60
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/test/index.js328
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/.npmignore2
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/.travis.yml5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/History.md5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/Makefile5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/README.md18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/index.js20
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/package.json47
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/test/index.js112
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/sliced/History.md41
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/sliced/LICENSE22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/sliced/README.md62
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/sliced/index.js33
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/sliced/package.json59
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/package.json135
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/release-items.md29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/static.js24
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/website.js87
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/.npmignore18
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/.travis.yml5
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/Makefile29
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/README.md254
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/movies/index.js132
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes.js79
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/index.js25
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/models/index.js11
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/models/note.js28
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/models/user.js13
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/routes/user.js22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/index.js3
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/lib/handlers.js221
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/lib/model.js479
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/lib/restful.js7
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/LICENSE23
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/README.md22
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/package.json69
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/underscore-min.js6
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/underscore-min.map1
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/underscore.js1548
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/package.json65
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/fixtures/config.js32
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/fixtures/data.js101
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/fixtures/movies/index.jade4
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/fixtures/movies/show.jade3
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.chainable.js48
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.excludes.js21
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.filters.js191
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.handle.js54
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.hooks.js52
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.js301
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.template.js62
-rw-r--r--common/src/main/webapp/usageguide/appserver/server.js52
-rw-r--r--common/src/main/webapp/usageguide/appserver/start_node.bat19
-rw-r--r--common/src/main/webapp/usageguide/appserver/start_node.sh19
-rw-r--r--common/src/main/webapp/usageguide/browser/index.html52
-rw-r--r--common/src/main/webapp/usageguide/browser/js/app.js1484
-rw-r--r--common/src/main/webapp/usageguide/browser/js/rest.js150
-rw-r--r--common/src/main/webapp/usageguide/browser/templates/accordion.html46
-rw-r--r--common/src/main/webapp/usageguide/browser/templates/buttons.html130
-rw-r--r--common/src/main/webapp/usageguide/browser/templates/checkBoxes.html60
-rw-r--r--common/src/main/webapp/usageguide/browser/templates/courses.html32
-rw-r--r--common/src/main/webapp/usageguide/browser/templates/dropdown.html83
-rw-r--r--common/src/main/webapp/usageguide/browser/templates/functional.html48
-rw-r--r--common/src/main/webapp/usageguide/browser/templates/home.html159
-rw-r--r--common/src/main/webapp/usageguide/browser/templates/label.html94
-rw-r--r--common/src/main/webapp/usageguide/browser/templates/list.html93
-rw-r--r--common/src/main/webapp/usageguide/browser/templates/login.html40
-rw-r--r--common/src/main/webapp/usageguide/browser/templates/management.html173
-rw-r--r--common/src/main/webapp/usageguide/browser/templates/notification.html48
-rw-r--r--common/src/main/webapp/usageguide/browser/templates/radioButtons.html58
-rw-r--r--common/src/main/webapp/usageguide/browser/templates/register.html47
-rw-r--r--common/src/main/webapp/usageguide/browser/templates/table.html90
-rw-r--r--common/src/main/webapp/usageguide/browser/templates/tabs.html53
-rw-r--r--common/src/main/webapp/usageguide/browser/templates/textarea.html150
-rw-r--r--common/src/main/webapp/usageguide/browser/templates/tree.html41
-rw-r--r--common/src/main/webapp/usageguide/browser/templates/verticalTab.html47
-rw-r--r--common/src/main/webapp/usageguide/readme.txt43
3268 files changed, 579165 insertions, 0 deletions
diff --git a/common/src/main/webapp/framework/appserver/api.js b/common/src/main/webapp/framework/appserver/api.js
new file mode 100644
index 0000000..e4a237b
--- /dev/null
+++ b/common/src/main/webapp/framework/appserver/api.js
@@ -0,0 +1,287 @@
+/*
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*/
+
+var express = require('express');
+var router = express.Router();
+/*var js2xmlparser = require("js2xmlparser");
+var xml2js = require('xml2js');*/
+var fs = require('fs');
+var http = require('http');
+var bodyParser = require('body-parser');
+var path=require('path');
+
+var MongoClient = require('mongodb').MongoClient;
+var ObjectId = require('mongodb').ObjectId;
+
+var url = 'mongodb://localhost/rest_test';
+
+/*var exists = require('file-exists');*/
+
+// ############################################ Sign In code #################################################
+// Routes
+router.post('/signin', function (req, res) {
+ console.log("signin");
+ var obj = {
+ "name": req.body.name,
+ "pswd": req.body.pswd
+ };
+
+ var ObjLst =[] ;
+ var nameExist =0;
+ console.log(obj);
+ ObjLst = JSON.parse(fs.readFileSync('input.json', 'utf8'));
+ for(var index = 0; index < ObjLst.length; index++) {
+ if (ObjLst[index].name === req.body.name && ObjLst[index].pswd === req.body.pswd) {
+ console.log("success");
+ nameExist++;
+ res.statusCode=200;
+ res.statusMessage="Sucessfully loged in";
+ break;
+ }
+ }
+ if (nameExist != 1) {
+ console.log("failed");
+ res.statusCode=404;
+ res.statusMessage="failed to login";
+ }
+ res.send();
+});
+
+// ############################################ Sign Up Code #################################################
+
+router.post('/signup', function (req, res) {
+
+ console.log("in api.js");
+
+ var ObjLst =[] ;
+ var nameNotExist =0;
+ var obj = {
+ "name": req.body.name,
+ "pswd": req.body.pswd,
+ "email": req.body.email
+ };
+ if(fs.existsSync("input.json")) {
+ console.log("File Exist");
+ ObjLst = JSON.parse(fs.readFileSync('input.json', 'utf8'));
+ }
+
+ for(var index = 0; index < ObjLst.length; index++) {
+ if (ObjLst[index].name === req.body.name && ObjLst[index].email === req.body.email) {
+ console.log("success");
+ nameNotExist++;
+ break;
+ }
+ }
+ if (nameNotExist == 0) {
+ ObjLst.push(obj);
+ console.log(ObjLst);
+ fs.writeFile('input.json', JSON.stringify(ObjLst), function(err) {
+ if (err) {
+ return console.error(err);
+ }
+ console.log("Data written successfully!");
+ console.log("Let's read newly written data");
+ res.statusCode=200;
+ res.statusMessage="Sucessfully signed up";
+ });
+ }
+ res.send();
+});
+
+function getDataFrmProvince() {
+ var provinceData =[] ;
+ if(fs.existsSync("provinceData.json")) {
+ console.log("File Exist");
+ provinceData = JSON.parse(fs.readFileSync('provinceData.json', 'utf8'));
+ }
+ return provinceData;
+}
+
+function saveDataToProvince(provinceData) {
+ fs.writeFile('provinceData.json', JSON.stringify(provinceData), function(err) {
+ var statueCode = 0;
+ if (err) {
+ console.error(err);
+ return statueCode = 404;
+ }
+ console.log("Data written successfully!");
+ console.log("Let's read newly written data");
+ return statueCode = 200;
+ });
+}
+
+function getIndexOfIdProvince(id) {
+ var provinceData = getDataFrmProvince();
+ var returnIndx = -1;
+ for (var index = 0; index < provinceData.length; index++) {
+ if(provinceData[index].id == id) {
+ returnIndx = index;
+ break;
+ }
+ }
+ return returnIndx;
+}
+
+function deleteIdFromProvince(idList) {
+ var provinceData = getDataFrmProvince();
+ /*for (var index = 0; index < provinceData.length; index++) {
+ if(provinceData[index].id == id) {
+ console.log("Deleting id : " + index);
+ provinceData.splice(index, 1);
+ break;
+ }
+ }*/
+ for(var i = 0; i < idList.length; i++) {
+ for (var index = 0; index < provinceData.length; index++) {
+ if(provinceData[index].id == idList[i]) {
+ console.log("Deleting id : " + index);
+ provinceData.splice(index, 1);
+ break;
+ }
+ }
+ }
+ return provinceData;
+}
+
+router.get('/getAllProvinceData', function (req, res) {
+ var provinceData = getDataFrmProvince();
+ if(provinceData) {
+ output = '{"provinceData" : ' + JSON.stringify(provinceData) + '}';
+
+ res.setHeader("Content-Type", "application/json");
+ console.log("output : " + JSON.stringify(output));
+ res.end(output);
+ }
+ /*MongoClient.connect(url, function(err, db) {
+ console.log("Connected... :-)");
+ var cursor = db.collection('ProvinceData').find({},function(err, cursor) {
+ cursor.toArray(function (err, items) {
+ output = '{"provinceData" : ' + JSON.stringify(items) + '}';
+
+ res.setHeader("Content-Type", "application/json");
+ //console.log("output : " + JSON.stringify(output));
+ res.end(output);
+ });
+ });
+ db.close(function(){
+ console.log("Connection Closed... :-)");
+ });
+ });*/
+});
+
+
+router.post('/addProvinceData', function(req, res) {
+ var provinceData = getDataFrmProvince();
+ var gen_id = Math.floor(Math.random() * (9999 - 1000 + 1)) + 1000;
+ provinceData.push({
+ "id": gen_id,
+ "province_name": req.body.province_name,
+ "ip": req.body.ip,
+ "port": req.body.port
+ });
+ var statusCode = saveDataToProvince(provinceData);
+ res.statusCode=statusCode;
+
+ if(statusCode == 200) {
+ res.statusMessage="Sucessfully signed up";
+ }
+ else {
+ res.statusMessage="Error";
+ }
+
+ /*MongoClient.connect(url, function(err, db) {
+ db.collection('ProvinceData').insertOne({
+ province_name: req.body.province_name,
+ ip: req.body.ip,
+ port: req.body.port
+ });
+ db.close();
+ });*/
+ res.statusCode=200;
+ res.statusMessage="Sucessfully signed up";
+ res.send();
+});
+
+router.post('/deleteProvinceData', function (req, res) {
+ //var provinceData = getDataFrmProvince();
+ console.log("IdList: "+ req.body.idList);
+ /*for(var i = req.body.idList.length - 1; i >= 0; i--) {
+ var index = getIndexOfIdProvince(req.body.idList[i]);
+ console.log("Deleting id : " + index);
+ if(index != -1) {
+ provinceData.splice(index, 1);
+ }
+ //deleteIdFromProvince(req.body.idList[i]);
+ };*/
+
+ var provinceData = deleteIdFromProvince(req.body.idList);
+
+ saveDataToProvince(provinceData);
+
+ /*MongoClient.connect(url, function(err, db) {
+
+ console.log("Deleting Province Data... " + req.body.idList);
+ for(var i = 0; i < req.body.idList.length; i++) {
+ db.collection('ProvinceData').deleteOne({ "_id": ObjectId(req.body.idList[i])});
+ }
+ /!*db.collection('ProvinceData').deleteOne({ "_id": ObjectId(req.body.idList)});*!/
+
+ db.close(function(){
+ console.log("Connection Closed... :-)");
+ });
+ res.send();
+ });*/
+ res.statusCode=200;
+ res.statusMessage="Sucessfully signed up";
+ res.send();
+});
+
+router.post('/editProvinceData', function (req, res) {
+ var provinceData = getDataFrmProvince();
+ var index = getIndexOfIdProvince(req.body.id);
+ console.log("Editing id : " + index);
+ if(index != -1) {
+ provinceData[index].province_name = req.body.province_name;
+ provinceData[index].ip = req.body.ip;
+ provinceData[index].port = req.body.port;
+ }
+ saveDataToProvince(provinceData);
+
+ res.statusCode=200;
+ res.statusMessage="Sucessfully signed up";
+ res.send();
+ /*MongoClient.connect(url, function(err, db) {
+
+ console.log("Editing Province Data... " + req.body._id);
+ db.collection('ProvinceData').updateOne(
+ { "_id": ObjectId(req.body._id)},
+ {
+ $set: {'province_name': req.body.province_name, 'ip': req.body.ip, 'port': req.body.port}
+ }
+ );
+
+ db.close(function(){
+ console.log("Connection Closed... :-)");
+ });
+ res.send();
+ });*/
+});
+
+// Return router
+module.exports = router;
+
diff --git a/common/src/main/webapp/framework/appserver/server.js b/common/src/main/webapp/framework/appserver/server.js
new file mode 100644
index 0000000..3d58f12
--- /dev/null
+++ b/common/src/main/webapp/framework/appserver/server.js
@@ -0,0 +1,48 @@
+/*
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*/
+
+// Dependencies
+var express = require('express');
+var bodyParser = require('body-parser');
+var http=require("http");
+var path=require('path');
+
+
+// Express
+var app = express();
+app.use(bodyParser.urlencoded({ extended: true}));
+app.use(bodyParser.json());
+app.use(function(req, res, next) {
+ res.header("Access-Control-Allow-Origin", "*");
+ res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
+ next();
+});
+app.use(express.static(__dirname + '/POC_Angular'));
+
+// Routes
+app.use('/api', require('./api'));
+
+// viewed at http://localhost:3000
+app.get('/', function(req, res) {
+ res.sendFile(path.join(__dirname + '/POC_Angular/index.html'));
+});
+
+// Start server
+app.listen(3000);
+console.log('API is running on port 3000');
+console.log('API @@@@'); \ No newline at end of file
diff --git a/common/src/main/webapp/framework/appserver/start_node.sh b/common/src/main/webapp/framework/appserver/start_node.sh
new file mode 100644
index 0000000..c886d08
--- /dev/null
+++ b/common/src/main/webapp/framework/appserver/start_node.sh
@@ -0,0 +1,22 @@
+#
+# Copyright 2016-2017, Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+@ECHO OFF
+ECHO.
+ECHO Starting Node Server
+ECHO.
+node server.js
+EXIT \ No newline at end of file
diff --git a/common/src/main/webapp/framework/browser/css/open-ostyle.css b/common/src/main/webapp/framework/browser/css/open-ostyle.css
new file mode 100644
index 0000000..763797a
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/css/open-ostyle.css
@@ -0,0 +1,937 @@
+/*
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*/
+
+body {
+ margin: 0;
+ padding: 0;
+ width: 100%;
+ height: 100%;
+ font-family: "Microsoft Yahei",Arial,Tahoma,Verdana,SimSun;
+ font-size: 12px;
+}
+
+.container{
+ background: #fafafa;
+}
+
+.accordion_parent {
+ position: relative;
+ width: 220px;
+ background-color: #f5f5f5;
+}
+
+.openo-accordion-resizable-handle {
+ z-index: 1 !important;
+ cursor: e-resize;
+ width: 7px;
+ right: -5px;
+ top: 0;
+ height: 100%;
+ position: absolute;
+ font-size: .1px;
+ display: block;
+}
+
+.openoAccordian_accordionmenu {
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+ line-height: 17px;
+}
+
+.openoAccordian_accordionmenu li {
+ min-width: 75px;
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+ color: #000;
+ clear: both;
+}
+
+.openo_accordion_ui-icon-collapse, .openo_accordion_ui-icon-expand {
+ display: block;
+ float: left;
+ margin-bottom: -1px;
+ border-bottom: 1px solid #e5e5e5;
+ cursor: pointer;
+ width: 13px;
+ padding-top: 26px;
+}
+
+.openo_accordion_ui-icon-expand {
+ background: url(../thirdparty/images/collapse_arrow.png) right 20px no-repeat;
+ margin-top: 8px;
+}
+
+.openo_accordion_ui-icon-expand.current {
+ background: url(../thirdparty/images/expand_arrow.png) right 20px no-repeat;
+}
+
+.openoAccordian_showHideArrow_hide, .openoAccordian_showHideArrow_show {
+ display: block;
+ position: absolute;
+ right: 0;
+ top: 4px;
+ width: 18px;
+ height: 41px;
+ cursor: pointer;
+ background-color: #f5f5f5;
+}
+
+.openoAccordian_showHideArrow_hide {
+ background-image: url(../images/openo.png);
+ background-position: -7px 0 !important;
+ border-collapse: separate;
+ /*box-shadow: inset -1px 0 0 #e5e5e5;*/
+}
+
+a.header.opened, a.header.closed {
+ font-size: 16px;
+ padding-top: 24px;
+ padding-bottom: 25px;
+ color: #999999;
+}
+
+.openoAccordian_accordionmenu .closed, .openoAccordian_accordionmenu .opened {
+ padding-right: 10px;
+ background-position: 98% 50%;
+ background-repeat: no-repeat;
+}
+
+
+.openoAccordian_accordionmenu li a {
+ padding: 11px 10px 12px;
+ color: #333333;
+ margin-top: -1px;
+ text-align: left !important;
+ font-family: "Microsoft Yahei",Arial,Tahoma,Verdana,SimSun;
+ font-size: 14px;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+ border-top: 1px solid #e5e5e5;
+ border-bottom: 1px solid #e5e5e5;
+ /*height: 19px;*/
+}
+
+.openoAccordian_accordionmenu ul {
+ margin: 0;
+ padding: 0;
+ overflow: hidden;
+}
+
+.openoAccordian_accordionmenu a {
+ display: block;
+ text-decoration: none;
+}
+
+a {
+ color: #428bca;
+ text-decoration: none;
+ background: 0 0;
+}
+
+.bar {
+ height: 834px;
+ width: 18px;
+ background: #f8f8f8;
+ display: none;
+}
+
+.bar span {
+ width: 13px;
+ height: 34px;
+ background-image: url(../images/openo.png);
+ background-position: -39px 0 !important;
+ display: block;
+ /*margin-top: -430px;*/
+}
+
+li {
+ cursor: pointer;
+}
+
+#puer_base_openo {
+ border: 1px solid #ddd;
+}
+
+.openo_accordion_selected {
+ margin-left: 0;
+ margin-right: 0;
+ background: #fafafa;
+ border-left: 3px solid #4ac9ff !important;
+ box-shadow: none;
+ position: relative;
+}
+
+a:hover {
+ color: #4ac9ff;
+}
+
+.openoAccordian_accordionmenu li.openo_accordion_selected a {
+ position: relative;
+ left: -3px;
+ color: #009ae7;
+}
+
+.openo-accordion-resizable-handle {
+ z-index: 1 !important;
+ cursor: e-resize;
+ width: 7px;
+ right: -5px;
+ top: 0;
+ height: 100%;
+ position: absolute;
+ font-size: .1px;
+ display: block;
+}
+
+#iframeContainer iframe {
+ width: 100%;
+ height: 100%;
+ border: 0;
+}
+
+#accordionContent, #iframeContainer {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ width: 100%;
+ height: 100%;
+}
+
+.openoAccordian_showHideArrow_show {
+ background-image: url(../images/openo.png);
+ background-position: -39px 0 !important;
+ box-shadow: inset 1px 0 0 #e5e5e5, inset -1px 0 0 #e5e5e5;
+}
+
+.homecontent {
+ text-align: center;
+ letter-spacing: 1.4px;
+}
+
+.homecontent h3, .homecontent h4, .homecontent h5{
+ font-size: 24px;
+ color: #333;
+ text-transform: capitalize;
+ border-top: 2px solid #f1f1f1;
+ border-bottom: 2px solid #f1f1f1;
+ padding: 13px 5px;
+ display: inline-block;
+ letter-spacing: 5px;
+ -webkit-animation: textScroll 500ms linear;
+ animation: textScroll 500ms linear;
+}
+.homecontent h4 {
+ font-size: 28px;
+ font-weight: bold;
+}
+.homecontent h5 {
+ font-size: 16px;
+ text-align: left;
+ border: none;
+}
+@-webkit-keyframes textScroll {
+ from {opacity: 0;}
+ to {opacity: 1;}
+ }
+
+@keyframes textScroll {
+ from {opacity: 0;}
+ to {opacity: 1;}
+}
+
+/*.modal-body span {
+ font-size: 18px;
+ color: #00f;
+}*/
+
+#msgModal .modal-body .container {
+ width: 100%;
+}
+#msgModal .modal-body .icon {
+ /*color: red;*/
+ font-size: 37px;
+}
+#msgModal .modal-body .icon_error {
+ color: red;
+}
+#msgModal .modal-body .icon_info {
+ color: green;
+}
+#msgModal .modal-body .icon_warning{
+ color: orange;
+}
+#msgModal .modal-body .icon_confirm {
+ color: blue;
+}
+#msgModal .modal-body .msg {
+ color: #333;
+ padding-left: 30px;
+}
+/*#msgModal .modal-body .container .row {
+}*/
+#msgModal .modal-body .row {
+ height: 100%;
+ white-space: nowrap;
+}
+#msgModal .modal-body .row:before{
+ content: "";
+ display: inline-block;
+ vertical-align: middle;
+ width: 0;
+ /* adjust for white space between pseudo element and next sibling */
+ margin-right: -.25em;
+ /* stretch line height */
+ height: 100%;
+}
+
+#msgModal .modal-body .row .msg {
+ /*display: inline-block;
+ vertical-align: middle;
+ white-space: normal;*/
+ /* vertical-align: middle; */
+ position: absolute;
+ top: 50%;
+ -webkit-transform: translateY(-50%);
+ -ms-transform: translateY(-50%);
+ transform: translateY(-50%);
+ padding-left: 70px;
+ white-space: normal;
+}
+
+/* Functional */
+
+#funModal .modal-content .modal-header{
+ padding-bottom: 4px;
+ border-radius: 5px 5px 0 0;
+}
+
+
+/* Buttons */
+.btnDefault {
+ border-radius: 6px;
+ /*height: 24px;*/
+ font-size: 12px;
+ font-family: "Microsoft Yahei",Arial,Tahoma,Verdana,SimSun;
+ line-height: 24px;
+ color: #000;
+ border: 1px solid #d3d3d3;
+ text-align: center;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
+ background: linear-gradient(to bottom, #fff, #fafafa);
+ padding: 0 19px;
+}
+.btnDefault:hover {
+ border-color: #4ac9ff;
+ color: #009ae7;
+}
+#iconBtn {
+ padding: 0 15px;
+}
+#iconBtn span {
+ font-size: 12px;
+ margin-top: 4px;
+ width: 16px;
+ height: 16px;
+}
+#iconBtn span.pull-left {
+ margin-right: 5px;
+}
+#iconBtn span.pull-right {
+ margin-left: 5px;
+}
+
+#buttonArea {
+ text-align: left;
+}
+#buttonArea div {
+ margin: 10px 0 20px;
+}
+
+#buttonArea div .btn-block{
+ margin: 10px 0;
+}
+
+/* Dropdown*/
+
+#dropdown {
+ text-align: left;
+}
+
+#dropdown div {
+ margin: 10px 0 20px;
+}
+
+#dropdown .dropup .dropdown-menu {
+ top: auto;
+ bottom: 34% !important;
+ margin-bottom: 1px;
+}
+#dropdown .dropdown-menu {
+ top: auto;
+ left: auto;
+ margin-bottom: 1px;
+}
+
+#plainDropDown > .dropdownplain {
+ position: relative;
+ clear: both;
+ float: left;
+ width: 100%;
+}
+#plainDropDown > .dropdownplain > ul > li {
+ border: 1px solid #c3c3c3;
+ border-radius: 4px;
+ min-width: 200px;
+}
+#plainDropDown ul li a {
+ padding: 5px 10px;
+ color: #333;
+}
+#plainDropDown > .dropdownplain > ul > li > a > span {
+ top: 4px;
+}
+#plainDropDown ul li a:hover {
+ color: #333;
+}
+#plainDropDown .dropdown-menu {
+ width: 100%;
+}
+
+
+
+/* Credit to bootsnipp.com for the css for the color graph */
+.colorgraph {
+ height: 5px;
+ border-top: 0;
+ background: #c4e17f;
+ border-radius: 5px;
+ background-image: -webkit-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4);
+ background-image: -moz-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4);
+ background-image: -o-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4);
+ background-image: linear-gradient(to right, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4);
+}
+
+/* Radio and CheckBoxes------------*/
+
+
+.funkyradio div {
+ clear: both;
+ overflow: hidden;
+}
+
+.funkyradio label {
+ width: 100%;
+ border-radius: 3px;
+ border: 1px solid #D1D3D4;
+ font-weight: normal;
+}
+
+.funkyradio input[type="radio"]:empty,
+.funkyradio input[type="checkbox"]:empty {
+ display: none;
+}
+
+.funkyradio input[type="radio"]:empty ~ label,
+.funkyradio input[type="checkbox"]:empty ~ label {
+ position: relative;
+ line-height: 2.5em;
+ text-indent: 3.25em;
+ margin-top: 2em;
+ cursor: pointer;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.funkyradio input[type="radio"]:empty ~ label:before,
+.funkyradio input[type="checkbox"]:empty ~ label:before {
+ position: absolute;
+ display: block;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ content: '';
+ width: 2.5em;
+ background: #D1D3D4;
+ border-radius: 3px 0 0 3px;
+}
+
+.funkyradio input[type="radio"]:hover:not(:checked) ~ label,
+.funkyradio input[type="checkbox"]:hover:not(:checked) ~ label {
+ color: #888;
+}
+
+.funkyradio input[type="radio"]:hover:not(:checked) ~ label:before,
+.funkyradio input[type="checkbox"]:hover:not(:checked) ~ label:before {
+ content: '\2714';
+ text-indent: .9em;
+ color: #C2C2C2;
+}
+
+.funkyradio input[type="radio"]:checked ~ label,
+.funkyradio input[type="checkbox"]:checked ~ label {
+ color: #777;
+}
+
+.funkyradio input[type="radio"]:checked ~ label:before,
+.funkyradio input[type="checkbox"]:checked ~ label:before {
+ content: '\2714';
+ text-indent: .9em;
+ color: #333;
+ background-color: #ccc;
+}
+
+.funkyradio input[type="radio"]:focus ~ label:before,
+.funkyradio input[type="checkbox"]:focus ~ label:before {
+ box-shadow: 0 0 0 3px #999;
+}
+
+.funkyradio-default input[type="radio"]:checked ~ label:before,
+.funkyradio-default input[type="checkbox"]:checked ~ label:before {
+ color: #333;
+ background-color: #ccc;
+}
+
+.funkyradio-primary input[type="radio"]:checked ~ label:before,
+.funkyradio-primary input[type="checkbox"]:checked ~ label:before {
+ color: #fff;
+ background-color: #337ab7;
+}
+
+.funkyradio-success input[type="radio"]:checked ~ label:before,
+.funkyradio-success input[type="checkbox"]:checked ~ label:before {
+ color: #fff;
+ background-color: #5cb85c;
+}
+
+.funkyradio-danger input[type="radio"]:checked ~ label:before,
+.funkyradio-danger input[type="checkbox"]:checked ~ label:before {
+ color: #fff;
+ background-color: #d9534f;
+}
+
+.funkyradio-warning input[type="radio"]:checked ~ label:before,
+.funkyradio-warning input[type="checkbox"]:checked ~ label:before {
+ color: #fff;
+ background-color: #f0ad4e;
+}
+
+.funkyradio-info input[type="radio"]:checked ~ label:before,
+.funkyradio-info input[type="checkbox"]:checked ~ label:before {
+ color: #fff;
+ background-color: #5bc0de;
+}
+
+.btn-primary {
+ color: #fff;
+ background-color: #428bca;
+ border-color: #357ebd;
+ min-width:70px
+}
+
+.btn.outline {
+ background: none;
+
+}
+.btn-primary.outline {
+ border: 2px solid #0099cc;
+ color: #0099cc;
+}
+.modal-header {
+ /*background-color: #cccccc;*/
+ background: linear-gradient(to bottom, #fbfbfb 0, #f6f6f6 70%, #f0f0f0 100%);
+}
+
+/* Tree */
+
+#tree1 ul li {
+ list-style: none;
+ text-align: left;
+ margin-top: 7px;
+}
+
+/* Accordian Area */
+#accordionArea .panel-group .panel-title a:before {
+ font-family: "Glyphicons Halflings";
+ content:"\e259";/*\e094*/
+ /*position: absolute;
+ right: 20px;*/
+ font-size: 20px;
+ margin-right: 20px;
+ text-decoration: none !important;
+}
+#accordionArea .panel-group .panel-title a.collapsed:before {
+ content:"\e258";/*\e092*/
+}
+
+#accordionArea h3 {
+ width: 100%;
+ text-align: left;
+ background-color: #eaeaea;
+ border: none;
+ padding: 8px;
+ font-size: 20px;
+}
+#accordionArea h3 a {
+ text-decoration: none;
+}
+#accordionArea .panel-group .panel {
+ border: none;
+ box-shadow: none;
+ -webkit-box-shadow: none;
+}
+ div.panel-body {
+ text-align: justify;
+}
+
+/* Tab */
+#tabArea .tab-content div p {
+ text-align: justify;
+}
+
+/*Table*/
+#tableArea h3 {
+ text-align: left;
+ border: none;
+ padding-top: 5px;
+}
+
+#tableArea h3 span {
+ font-size: 12px;
+}
+
+/* Vertical Tab */
+.nav-stacked {
+ margin-top: 20px;
+ text-align: left;
+ border:none;
+}
+
+.nav-tabs>li.active>a {
+ border-top: 3px solid #4ac9ff;
+}
+.nav-tabs>li.active>a:hover, .nav-tabs>li.active>a:focus {
+ border-top: 3px solid #4ac9ff;
+}
+.nav-tabs>li>a:hover {
+ border-color: transparent;
+ background-color: transparent;
+}
+.nav-stacked>li.active>a {
+ background-color: #ccc;
+ border: none;
+ border-radius: 4px;
+}
+
+#vtabArea .tab-content .tab-pane {
+ text-align: left;
+}
+#vtabArea .tab-content .tab-pane p {
+ text-align: justify;
+}
+
+.link_active {
+ /*background-color: lightslategrey;*/
+ font-style: italic;
+ color: #4ac9ff !important;
+ background:#fafafa;
+ border-left: 3px solid #4ac9ff;
+
+
+}
+
+/*input.ng-invalid {
+ background-color:yellow;
+}*/
+
+/* Functional & Notification*/
+
+#myModal .modal-header, #msgModal .modal-header, #funModal .modal-header {
+ padding: 9px 15px;
+ border-radius: 5px 5px 0 0;
+ color: #666;
+}
+
+#msgModal .modal-content {
+ width: 70%;
+ position: absolute;
+ left: 15%;
+ box-shadow: 0 6px 10px rgba(0,0,0,.3);
+ -webkit-box-shadow: 0 6px 10px rgba(0,0,0,.3);
+}
+#msgModal .modal-footer, #funModal .modal-footer {
+ border: none;
+ margin: 0 auto;
+ width: 100%;
+ text-align: center;
+}
+
+
+#myInput {
+ background-image: url('../thirdparty/images/searchicon.png'); /* Add a search icon to input */
+ background-position: 10px 9px; /* Position the search icon */
+ background-repeat: no-repeat; /* Do not repeat the icon image */
+ width: 100%; /* Full-width */
+ font-size: 16px; /* Increase font-size */
+ padding: 5px 20px 5px 40px; /* Add some padding */
+ border: 1px solid #ddd; /* Add a grey border */
+ margin-bottom: 12px; /* Add some space below the input */
+}
+
+#myTable_search {
+ border-collapse: collapse; /* Collapse borders */
+ width: 100%; /* Full-width */
+ border: 1px solid #ddd; /* Add a grey border */
+ font-size: 18px; /* Increase font-size */
+}
+
+#myTable_search th, #myTable td {
+ text-align: left; /* Left-align text */
+ padding: 12px; /* Add padding */
+}
+
+#myTable_search tr {
+ /* Add a bottom border to all table rows */
+ border-bottom: 1px solid #ddd;
+}
+
+#myTable_search tr.header, #myTable tr:hover {
+ /* Add a grey background color to the table header and on hover */
+ background-color: #f1f1f1;
+}
+
+/* List */
+#listArea {
+ margin-top: 25px;
+}
+#listArea .list {
+ /*border: 1px solid #333;*/
+ padding: 5px;
+}
+#listArea .list div {
+ margin: 5px 0;
+}
+
+#menu_accordion {
+ margin-top: 20px;
+}
+
+#menu_accordion li a{
+ padding-left: 42px;
+}
+#menu_accordion li a:hover {
+ color: #4ac9ff;
+}
+
+#rightContainer {
+ margin-top:20px;
+}
+
+#panel1 li:first-child{
+ margin-top:1px;
+}
+
+#menu_accordion #container, #menu_accordion #widgets, #menu_accordion #notifications, #menu_accordion #functional{
+ margin-bottom : 0px;
+ text-align : left;
+ background-color: #F5F5F5;
+}
+
+#menu_accordion h5{
+ margin-bottom : 0px;
+ text-align : left;
+ padding-left : 10px;
+ cursor: pointer;
+ letter-spacing: 3px;
+ width:100%;
+}
+
+.tableAlign{
+ text-align:left;
+}
+
+.chkboxAlign{
+ text-align:center;
+}
+
+#provinceAction {
+ text-align: left;
+}
+#provinceTable th {
+ background-color: #e3e3e3;
+}
+
+#provinceTable.table-striped>tbody>tr:nth-child(even)>td {
+ background-color:#fafafa;
+}
+
+#provinceTable.table-striped>tbody>tr:nth-child(odd)>td {
+ background-color:#f7f7f7
+}
+#provinceTable.table-striped>tbody>tr:hover {
+ background-color: red;
+}
+
+.prvdel{
+ margin-left:20px;
+}
+
+.shortnoteHeader{
+ margin-top:50px;
+ text-align:left;
+ font-weight: bold;
+ font-family: "Microsoft Yahei",Arial,Tahoma,Verdana,SimSun;
+}
+.shortnoteText{
+ margin-top:20px;
+ text-align:left;
+ font-size:10px;
+ font-family: "Microsoft Yahei",Arial,Tahoma,Verdana,SimSun;
+
+}
+
+.ztree *{
+ font-family: "Microsoft Yahei",Arial,Tahoma,Verdana,SimSun;
+}
+
+.noChild_link_active {
+ /*background-color: lightslategrey;*/
+ font-style: italic;
+ color: #4ac9ff !important;
+ background:#fafafa;
+}
+
+.rmpadding{
+ padding-left:0px !important;
+ padding-right:0px !important;
+}
+
+#menu_accordion .collapsed span {
+ background: url(../thirdparty/images/expand_arrow.png) 1px 3px no-repeat;
+ display: block;
+ float: left;
+ margin-bottom: -1px;
+ cursor: pointer;
+ width: 100%;
+ padding-left: 20px;
+}
+#menu_accordion span {
+ background: url(../thirdparty/images/collapse_arrow.png) 1px 3px no-repeat;
+ display: block;
+ float: left;
+ margin-bottom: -1px;
+ cursor: pointer;
+ width: 100%;
+ padding-left: 20px;
+}
+
+.magic-radio + label{
+ font-size:14px;
+}
+
+.panelbr{
+ border-left:0px;
+ border-right:0px;
+}
+
+.popover-title {
+ margin: 0;
+ padding: 8px 14px;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: 18px;}
+
+.customPopover{
+ padding:10px 20px;
+}
+
+
+.css-form input.ng-invalid.ng-touched, textarea.ng-invalid.ng-touched {
+ background-color: #FA787E;
+}
+
+.css-form input.ng-valid.ng-touched, textarea.ng-valid.ng-touched {
+ background-color: white;
+}
+
+.errMsg{
+
+ color:red;
+ float: left;
+}
+
+.customtable thead{
+ background: #ECECEC;
+}
+
+.customtable th,.table td{
+ /* padding-top: 3px!important; */
+ padding-bottom: 3px!important;
+}
+
+.customtable tr,.customtable td, .customtable th{
+ text-align:left;
+
+}
+
+.ng-table th.sortable .sort-indicator {
+ width:100%;
+ float:right;
+}
+
+.btn-group>.btn.active{
+ z-index: 2;
+ color: #fff;
+ background-color: #428bca;
+ border-color: #428bca;
+ cursor: default;
+}
+
+.customtable tbody tr:hover td{
+ background-color: #e6fbe0 !important;
+}
+
+.shortnote{
+ width:100%;
+ float:left;
+}
+
+.pagination{
+ float:left;
+}
+
+.btnmrg{
+ margin:0 5px 0 5px;
+}
+
+.labelstyle{
+ text-align:left;
+ font-size:12px;
+ font-family: "Microsoft Yahei",Arial,Tahoma,Verdana,SimSun;
+}
+
+.titlestyle{
+ font-size:14px !important;
+ font-family: "Microsoft Yahei",Arial,Tahoma,Verdana,SimSun;
+} \ No newline at end of file
diff --git a/common/src/main/webapp/framework/browser/index.html b/common/src/main/webapp/framework/browser/index.html
new file mode 100644
index 0000000..c74b4b6
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/index.html
@@ -0,0 +1,52 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head lang="en">
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>POC</title>
+ <link href="thirdparty/css/bootstrap.min.css" rel="stylesheet"/>
+ <!--Pulling Awesome Font -->
+ <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
+
+ <link href="thirdparty/css/zTreeStyle.css" rel="stylesheet"/>
+ <link href="thirdparty/css/magic-check.css" rel="stylesheet"/>
+ <link rel="stylesheet"; href="https://unpkg.com/ng-table@2.0.2/bundles/ng-table.min.css">
+ <link href="css/open-ostyle.css" rel="stylesheet"/>
+
+ <script src="thirdparty/js/angular.min.js"></script>
+ <script src="thirdparty/js/angular-ui-router.min.js"></script>
+ <script src="https://unpkg.com/ng-table@2.0.2/bundles/ng-table.min.js"></script>
+ <script src="thirdparty/js/jquery_1.12.4.min.js"></script>
+ <script type="text/javascript" src="thirdparty/js/bootstrap.min.js"></script>
+ <script src="js/app.js"></script>
+ <script src="js/DataService.js"></script>
+ <script src="thirdparty/js/mustache.js"></script>
+ <script src="thirdparty/js/tree.jquery.js"></script>
+ <script src="thirdparty/js/jquery.ztree.core-3.5.js"></script>
+
+</head>
+
+<body ng-app="POCApp" onload="loadTemplate()">
+
+<ui-view></ui-view>
+</body>
+</html> \ No newline at end of file
diff --git a/common/src/main/webapp/framework/browser/js/DataService.js b/common/src/main/webapp/framework/browser/js/DataService.js
new file mode 100644
index 0000000..c7da841
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/js/DataService.js
@@ -0,0 +1,137 @@
+/*
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*/
+
+app.factory("DataService", function($http, $log){
+ return {
+ getAllData: function (value) {
+ //var value = $scope.param;
+ return $http({
+ url: 'http://localhost:8080/POC_NodeToServletPorting_Server/?widgetType=' + value,
+ headers: {'Content-Type': 'application/json'},
+ method: 'GET'
+ }).then(function (response) {
+ $log.info(response.data);
+ return response.data;
+ })
+ },
+
+ getAllProvinceData : function() {
+ return $http({
+ url: 'http://localhost:3000/api/getAllProvinceData',
+ method: 'GET',
+ headers: {'Content-Type': 'application/json'}
+ }).then(function(response){
+ //$log.info(response);
+ return response.data;
+ });
+ },
+ addProvinceData : function(provinceDetail) {
+ return $http({
+ url: 'http://localhost:3000/api/addProvinceData',
+ method: 'POST',
+ data: provinceDetail,
+ headers: {'Content-Type': 'application/json '}
+ }).then(function(response){
+ console.log("Response : ");
+ $log.info(response.data);
+ return response.data;
+ });
+ },
+ deleteProvinceData : function(idList) {
+ return $http({
+ url: 'http://localhost:3000/api/deleteProvinceData',
+ method: 'POST',
+ data: {'idList':idList},
+ headers: {'Content-Type': 'application/json'}
+ }).then(function(response){
+ console.log("Successfully Deleted..");
+ $log.info(response);
+ return response.data;
+ });
+ },
+ editProvinceData : function(provinceDetail) {
+ return $http({
+ url: 'http://localhost:3000/api/editProvinceData',
+ method: 'POST',
+ data: provinceDetail,
+ headers: {'Content-Type': 'application/json'}
+ }).then(function(response){
+ console.log("Successfully Edited...");
+ $log.info(response);
+ return response.data;
+ });
+ }
+ }
+});
+
+app.factory('LoginService', function($http, $log) {
+ var admin = 'admin';
+ var pass = 'pass';
+ var isAuthenticated = false;
+
+ return {
+ login : function(user) {
+ console.log(user);
+ return $http({
+ url: 'http://localhost:8081/api/signin',//http://192.168.4.161:3000/api/login
+ method: 'POST',
+ data: {'name':user.username, 'pswd':user.password},
+ headers: {'Content-Type': 'application/json'}
+ }).then(function(response){
+ $log.info(response);
+ if(response.status == 200) {
+ console.log("Success");
+ //Success
+ isAuthenticated = true;
+ }
+ else {
+ console.log("Fail");
+ isAuthenticated = false;
+ }
+ console.log("isAuthenticated: " + isAuthenticated);
+ return isAuthenticated;
+ }, function(reason){
+ $log.info(reason);
+ console.log("Fail");
+ isAuthenticated = false;
+ return reason;
+ });
+ /*isAuthenticated = user.username === admin && user.password === pass;
+ return isAuthenticated;*/
+ },
+ isAuthenticated : function() {
+ return isAuthenticated;
+ },
+ registerUser: function(user){
+ console.log("New Registration: " + JSON.stringify(user));
+ return $http({
+ url: 'http://localhost:8081/api/signup',//http://192.168.4.161:3000/api/login
+ method: 'POST',
+ data: {'name':user.username, 'pswd':user.password, 'email':user.email},
+ headers: {'Content-Type': 'application/json'}
+ }).then(function(response){
+ $log.info(response);
+ },function(reason){
+ $log.info(reason);
+ });
+
+
+ }
+ };
+
+}); \ No newline at end of file
diff --git a/common/src/main/webapp/framework/browser/js/app.js b/common/src/main/webapp/framework/browser/js/app.js
new file mode 100644
index 0000000..558722b
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/js/app.js
@@ -0,0 +1,1361 @@
+/*
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*/
+
+
+var app = angular.module("POCApp", ["ui.router", "ngTable"])
+
+ /*.run(function($rootScope, $location, $state, LoginService) {
+ $rootScope.$on("$stateChangeStart", function(event, toState, toParams, fromState, fromParams){
+ if (toState.authenticate && !LoginService.isAuthenticated()){
+ // User isn’t authenticated
+ $state.transitionTo("login");
+ event.preventDefault();
+ }
+ });
+ })*/
+ .config(function($stateProvider, $urlRouterProvider, $urlMatcherFactoryProvider){
+ //$routeProvider.caseInsensitiveMatch = true;
+ $urlMatcherFactoryProvider.caseInsensitive(true);
+ $urlRouterProvider.otherwise('/login');
+ //$locationProvider.html5Mode(true).hashPrefix('!');
+ $stateProvider
+ .state('login', {
+ url : '/login',
+ templateUrl : 'templates/login.html',
+ controller : 'LoginController',
+ authenticate: false
+ })
+ .state('register', {
+ url : '/register',
+ templateUrl : 'templates/register.html',
+ controller : 'registerController',
+ authenticate: false
+ })
+ .state("home", {
+ url: "/home",
+ templateUrl : "templates/home.html",
+ controller : "homeCtrl",
+ authenticate: true
+ })
+ .state("home.tree", {
+ url: "/tree",
+ templateUrl : "templates/tree.html",
+ controller : "treeCtrl",
+ authenticate: true
+ })
+ .state("home.accordion", {
+ url: "/accordion",
+ templateUrl : "templates/accordion.html",
+ controller : "accordionCtrl",
+ authenticate: true
+ })
+ .state("home.tabs", {
+ url: "/tabs",
+ templateUrl : "templates/tabs.html",
+ controller : "tabsCtrl",
+ authenticate: true
+ })
+ .state("home.vtabs", {
+ url: "/vtabs",
+ templateUrl : "templates/verticalTab.html",
+ controller : "vTabCtrl",
+ authenticate: true
+ })
+ .state("home.table", {
+ url: "/table",
+ templateUrl : "templates/table.html",
+ controller : "tableCtrl",
+ authenticate: true
+ })
+ .state("home.buttons", {
+ url: "/buttons",
+ templateUrl : "templates/buttons.html",
+ controller : "buttonsCtrl",
+ authenticate: true
+ })
+ /*state for radio button and checkboxes-------------------------------------------------*/
+ .state("home.radiobuttons", {
+ url: "/radiobuttons",
+ templateUrl : "templates/radioButtons.html",
+ controller : "radioCtrl",
+ authenticate: true
+ })
+ .state("home.checkboxes", {
+ url: "/checkboxes",
+ templateUrl : "templates/checkBoxes.html",
+ controller : "checkBoxCtrl",
+ authenticate: true
+ })
+ .state("home.dropdown", {
+ url: "/dropdown",
+ templateUrl: "templates/dropdown.html",
+ controller: "dropdownCtrl",
+ authenticate: true
+ })
+
+ .state("home.list", {
+ url: "/list",
+ /*template:"<h3>Under Progress</h3>",*/
+ templateUrl : "templates/list.html",
+ controller : "listCtrl",
+ authenticate: true
+ })
+
+ .state("home.provinceMgmt", {
+ url: "/management",
+ templateUrl : "templates/management.html",
+ controller : "managementCtrl",
+ authenticate: true
+ })
+ .state("home.tooltip", {
+ url: "/textarea",
+ templateUrl : "templates/textarea.html",
+ controller : "toolCtrl",
+ authenticate: true
+ })
+
+ .state("home.notification", {
+ url: "/notification",
+ templateUrl : "templates/notification.html",
+ controller : "notificationCtrl",
+ authenticate: true
+ })
+ .state("home.functional", {
+ url: "/functional",
+ templateUrl : "templates/functional.html",
+ controller : "functionalCtrl",
+ authenticate: true
+ })
+
+
+ })
+ .controller('LoginController', function($scope, $rootScope, $stateParams, $state, LoginService) {
+ $rootScope.title = "AngularJS Login Sample";
+
+ $scope.formSubmit = function() {
+ LoginService.login($scope.user)
+ .then(function (data) {
+ if (data) {
+ $scope.error = '';
+ $scope.user.username = '';
+ $scope.user.password = '';
+ $state.transitionTo('home.tree');
+ }
+ else {
+ $scope.error = "Incorrect username/password !";
+ }
+ }, function (reason) {
+ $scope.error = "Incorrect username/password !";
+ });
+ };
+
+ })
+ .controller('registerController', function($scope, $state, LoginService){
+ $scope.formSubmit = function() {
+ if($scope.user.password === $scope.user.confpassword) {
+ LoginService.registerUser($scope.user)
+ .then(function (data) {
+ $state.transitionTo("login");
+ }, function () {
+ console.log("Failed to register");
+ });
+ }
+ else {
+ console.log("Password not matched...");
+ var dialog_tpl = $(modelTemplate).filter('#personDialog').html();
+ var data = {'title':'Error',showClose:true, 'closeBtnTxt':'Ok', 'icon':'glyphicon glyphicon-exclamation-sign','iconColor':'icon_error','msg':'Password and Confirm password does not match.', buttons:[]};
+ var html = Mustache.to_html(dialog_tpl, data);
+ $(html).modal({backdrop: "static"}); //backdrop: "static" - for grayed out and no outside click work, backdrop: false - no grayed out*/
+ }
+ };
+ })
+ .controller("homeCtrl", function($scope, $state, DataService){
+ $scope.message = "Home Page";
+
+ /*$scope.geticonClass = function() {
+ if($( "#panel1" ).hasClass( "in" )){
+ return "openo_accordion_ui-icon-expand";
+ }
+ else{
+ return "openo_accordion_ui-icon-expand.current";
+ }
+
+
+ }*/
+
+
+
+ /* $scope.accordionLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("left menu loading..");
+ menuaccordion();
+ return true;
+ }
+ console.log("left menu not loading..");
+ return false;
+ }
+
+ function menuaccordion() {
+ var accordion_tpl = $(modelTemplate).filter('#menu_accordion').html();
+
+ $.getJSON('./data/homelinks.json', function (accordion) {
+ var html = Mustache.to_html(accordion_tpl, accordion.accordion_data);
+ $('#accordionmenuid').html(html);
+ });
+ }*/
+
+ })
+
+ /* Tree Controller */
+ .controller("treeCtrl", function($scope,DataService,$log){
+ $scope.message = "Tree Data";
+ var setting = {};
+ /*$scope.treeLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("Tree data loading..");
+ tree();
+ return true;
+ }
+ console.log("Tree data not loading..");
+ return false;
+ }*/
+ $scope.init = function() {
+ $scope.param="treeData";
+ $scope.shortNote="shortNote";
+ DataService.getAllData($scope.param)
+ .then(function(data){
+ $scope.treeData = data;
+ tree();
+ console.log("inside tree");
+ $log.info($scope.treeData);
+ });
+ DataService.getAllData($scope.shortNote)
+ .then(function(data1){
+ $scope.treeTip = data1.treeTip;
+ console.log("inside treeTip");
+ $log.info(data1);
+ });
+ }
+ function tree() {
+ zNodes = $scope.treeData;
+ $.fn.zTree.init($("#tree1"), setting, zNodes);
+
+ }
+ })
+
+ /* Accordian Controller */
+ .controller("accordionCtrl", function($scope,DataService, $log){
+
+ $scope.message = "Accordion";
+
+ $scope.accordionLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("accordion loading..");
+
+ accordion();
+ return true;
+ }
+ console.log("accordion not loading..");
+ return false;
+ }
+
+ $scope.init = function() {
+ $scope.param="accordionData";
+ $scope.accordionTip="shortNote";
+ DataService.getAllData($scope.param)
+ .then(function(data){
+ $scope.accordion = data;
+ accordion();
+ console.log("inside accordion");
+ $log.info(data);
+ });
+ DataService.getAllData($scope.accordionTip)
+ .then(function(data){
+ $scope.accordionTipData = data.accordionTip;
+ console.log("inside accordion");
+ $log.info(data);
+ });
+ }
+
+ function accordion() {
+
+ var accordion_tpl = $(modelTemplate).filter('#accordion').html();
+ console.log("in acc" );
+ var html = Mustache.to_html(accordion_tpl, $scope.accordion.accordion_data);
+ $('#accordion').html(html);
+ }
+ })
+ .controller("tabsCtrl", function($scope, $state, DataService, $log){
+ $scope.message = "Tabs";
+ $scope.tabLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("Tab is loading..");
+ loadTabData();
+ return true;
+ }
+ console.log("Not ready..");
+ return false;
+ }
+
+ $scope.init = function() {
+ $scope.param="tabData";
+ $scope.tabTip="shortNote";
+ DataService.getAllData($scope.param)
+ .then(function(data){
+ $scope.tabdata = data;
+ loadTabData();
+ console.log("inside tabs");
+ $log.info(data);
+ });
+ DataService.getAllData($scope.tabTip)
+ .then(function(data){
+ $scope.tabTipData = data.tabTip;
+ $log.info(data);
+ });
+ }
+
+ function loadTabData() {
+ var tab_tpl = $(modelTemplate).filter('#tabs').html();
+ var html = Mustache.to_html(tab_tpl, $scope.tabdata.tabData);
+ $('#tabArea').html(html);
+ }
+
+ })
+ .controller("vTabCtrl", function($scope, $state, DataService){
+ $scope.message = "Vertical Tabs";
+
+ $scope.vtabLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("Vertical Tab is loading..");
+ loadvTabData();
+ return true;
+ }
+ console.log("Not ready..");
+ return false;
+ }
+
+ $scope.init = function() {
+ $scope.param="vtabData";
+ $scope.vtabTip="shortNote";
+ DataService.getAllData($scope.param)
+ .then(function(vtabdata){
+ $scope.data = vtabdata;
+ loadvTabData();
+ console.log("inside vTab");
+ });
+ DataService.getAllData($scope.vtabTip)
+ .then(function(vtabdata){
+ $scope.vtabTipdata = vtabdata.vtabTip;
+ console.log("inside vTab");
+ });
+ }
+
+ function loadvTabData() {
+
+ var vtab_tpl = $(modelTemplate).filter('#vtabs').html();
+ var html = Mustache.to_html(vtab_tpl, $scope.data.vtabData);
+ $('#vtabArea').html(html);
+ }
+ })
+ .controller("tableCtrl", function($scope, $state, DataService){
+ $scope.message = "Tables";
+
+ $scope.tableLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("Table is loading..");
+ loadTableData();
+ return true;
+ }
+ console.log("Not ready..");
+ return false;
+ }
+
+ $scope.init = function() {
+ $scope.param="tableData";
+ $scope.tableTip="shortNote";
+ DataService.getAllData($scope.param)
+ .then(function(data){
+ $scope.tableData = data;
+ loadTableData();
+ console.log("inside table");
+ });
+
+ DataService.getAllData($scope.tableTip)
+ .then(function(data){
+ $scope.tableTipData = data.tableTip;
+ console.log("inside table");
+ });
+ }
+
+ function loadTableData() {
+
+ var table_tpl = $(modelTemplate).filter('#table').html();
+
+ var html = Mustache.to_html(table_tpl, $scope.tableData.basic_table_data);
+ $('#basictableArea').html(html);
+
+ var html = Mustache.to_html(table_tpl, $scope.tableData.str_table_data);
+ $('#strippedtableArea').html(html);
+
+ var html = Mustache.to_html(table_tpl, $scope.tableData.cond_table_data);
+ $('#condensedtableArea').html(html);
+ }
+ })
+
+ /* Buttons Controller */
+ .controller("buttonsCtrl", function($scope,DataService,$log){
+ $scope.message = "Types of Buttons";
+ $scope.buttonTip="shortNote";
+
+ $scope.init = function() {
+ $scope.param="buttonsData";
+ DataService.getAllData($scope.param)
+ .then(function(data){
+ $scope.buttons = data;
+ defaultButtons();
+ visualButtons();
+ sizeButtons();
+ iconButtons();
+ console.log("inside accordion");
+ $log.info(data);
+ });
+ DataService.getAllData($scope.buttonTip)
+ .then(function(data){
+ $scope.buttonTipData = data.buttonTip;
+ console.log("inside table");
+ });
+ }
+
+ function defaultButtons(){
+ console.log("Default buttons Loaded..");
+ //Here your view content is fully loaded !!
+ var def_button_tpl = $(modelTemplate).filter('#defaultButtons').html();
+ var def_icon_button_tpl = $(modelTemplate).filter('#defaultIconButtons').html();
+
+ var html = Mustache.to_html(def_button_tpl, $scope.buttons.default_btn_data.def_button);
+ $('#defaultButtonArea').html(html);
+
+ var html = Mustache.to_html(def_icon_button_tpl, $scope.buttons.default_btn_data.def_print_button);
+ $('#defaultButtonArea').append(html);
+
+ var html = Mustache.to_html(def_icon_button_tpl, $scope.buttons.default_btn_data.def_print_button_right);
+ $('#defaultButtonArea').append(html);
+ }
+
+
+ function visualButtons(){
+ console.log("Loaded..");
+ //Here your view content is fully loaded !!
+ var visual_button_tpl = $(modelTemplate).filter('#visualButtons').html();
+
+ var html = Mustache.to_html(visual_button_tpl, $scope.buttons.visual_btn_data.vis_pri_btn_data);
+ $('#visualButtonArea').html(html);
+
+ var html = Mustache.to_html(visual_button_tpl, $scope.buttons.visual_btn_data.vis_sec_btn_data);
+ $('#visualButtonArea').append(html);
+
+ var html = Mustache.to_html(visual_button_tpl, $scope.buttons.visual_btn_data.vis_succ_btn_data);
+ $('#visualButtonArea').append(html);
+
+ var html = Mustache.to_html(visual_button_tpl, $scope.buttons.visual_btn_data.vis_inf_btn_data);
+ $('#visualButtonArea').append(html);
+
+ var html = Mustache.to_html(visual_button_tpl, $scope.buttons.visual_btn_data.vis_warn_btn_data);
+ $('#visualButtonArea').append(html);
+
+ var html = Mustache.to_html(visual_button_tpl, $scope.buttons.visual_btn_data.vis_dang_btn_data);
+ $('#visualButtonArea').append(html);
+
+ var html = Mustache.to_html(visual_button_tpl, $scope.buttons.visual_btn_data.vis_link_btn_data);
+ $('#visualButtonArea').append(html);
+ }
+
+ function sizeButtons() {
+ var size_button_tpl = $(modelTemplate).filter('#sizeButtons').html();
+
+ var html = Mustache.to_html(size_button_tpl, $scope.buttons.diffSize_btn_data.size_small_btn_data);
+ $('#sizeButtonArea').html(html);
+
+ var html = Mustache.to_html(size_button_tpl, $scope.buttons.diffSize_btn_data.size_large_btn_data);
+ $('#sizeButtonArea').append(html);
+
+ var html = Mustache.to_html(size_button_tpl, $scope.buttons.diffSize_btn_data.size_block_btn_data);
+ $('#sizeButtonArea').append(html);
+
+ }
+
+ function iconButtons() {
+ var icon_button_tpl = $(modelTemplate).filter('#iconButtons').html();
+
+ var html = Mustache.to_html(icon_button_tpl, $scope.buttons.icon_btn_data.search_icon_btn_data);
+ $('#iconButtonArea').html(html);
+
+ var html = Mustache.to_html(icon_button_tpl, $scope.buttons.icon_btn_data.search_icon_styled_btn_data);
+ $('#iconButtonArea').append(html);
+
+ var html = Mustache.to_html(icon_button_tpl, $scope.buttons.icon_btn_data.print_icon_btn_data);
+ $('#iconButtonArea').append(html);
+
+ }
+
+ $scope.defaultButtonsLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("default buttons loading..");
+ defaultButtons();
+ return true;
+ }
+ console.log("default buttons not loading..");
+ return false;
+ }
+
+ $scope.visualButtonsLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("visual buttons loading..");
+ visualButtons();
+ return true;
+ }
+ console.log("visual buttons not loading..");
+ return false;
+ }
+
+ $scope.sizeButtonsLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("size buttons loading..");
+ sizeButtons();
+ return true;
+ }
+ console.log("size buttons not loading..");
+ return false;
+ }
+
+ $scope.iconButtonsLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("icon buttons loading..");
+ iconButtons();
+ return true;
+ }
+ console.log("icon buttons not loading..");
+ return false;
+ }
+ })
+ /* Drop down----------------------*/
+ .controller("dropdownCtrl", function($scope, DataService) {
+ $scope.message = "You selected drop down";
+ $scope.subIsLoaded = function () {
+ if (modelTemplate != null) {
+ console.log("Loading..");
+ loadDrop();
+ return true;
+ }
+ console.log("Not Loaded..");
+ return false;
+ }
+
+ $scope.init = function() {
+ $scope.param="dropdownData";
+ $scope.dropdownTip="shortNote";
+ DataService.getAllData($scope.param)
+ .then(function(data){
+ $scope.dropdown = data;
+ loadDrop();
+ });
+ DataService.getAllData($scope.dropdownTip)
+ .then(function(data){
+ $scope.dropdownTipData = data.dropdownTip;
+ console.log("inside table");
+ });
+ }
+ function loadDrop() {
+ var drop_tpl = $(modelTemplate).filter('#dropDown').html();
+ var dropHeader_tpl = $(modelTemplate).filter('#dropDownHeader').html();
+ var dropSimple_tpl = $(modelTemplate).filter('#simpleDropdownTmpl').html();
+
+ var html = Mustache.to_html(drop_tpl, $scope.dropdown.dropped_down_data);
+ $('#dropArea').html(html);
+
+ var html = Mustache.to_html(drop_tpl, $scope.dropdown.dropped_up_data);
+ $('#dropAreaUP').html(html);
+
+ var html = Mustache.to_html(dropHeader_tpl, $scope.dropdown.dropHeader_data);
+ $('#dropAreaHeader').html(html);
+
+ var html = Mustache.to_html(dropSimple_tpl, $scope.dropdown.dropSimple_data);
+ $('#plainDropDown').html(html);
+
+ }
+ })
+ .controller("radioCtrl", function($scope, DataService, $log) {
+ $scope.message = "You selected radio button tab";
+ var lodedOnce = false;
+ $scope.subIsLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("Loading..");
+ loadRadioBtn();
+ return true;
+ }
+ console.log("Not Loaded..");
+ return false;
+ }
+
+ $scope.init = function() {
+ $scope.param="radioData";
+ $scope.radioTip="shortNote";
+ DataService.getAllData($scope.param)
+ .then(function(data){
+ $scope.radioButton = data;
+ loadRadioBtn();
+ console.log("inside button");
+ $log.info(data);
+ });
+
+ DataService.getAllData($scope.radioTip)
+ .then(function(data){
+ $scope.radioTipData = data.radioTip;
+ console.log("inside table");
+ });
+ }
+ function loadRadioBtn(){
+ console.log("lodedOnce : "+lodedOnce);
+
+ var radio_button_tpl = $(modelTemplate).filter('#radioButtons').html();
+ var html = Mustache.to_html(radio_button_tpl, $scope.radioButton .radio_btn_default_data);
+ $('#radioBtnArea').html(html);
+
+ var html = Mustache.to_html(radio_button_tpl, $scope.radioButton .radio_btn_primary_data);
+ $('#radioBtnArea').append(html);
+
+ var html = Mustache.to_html(radio_button_tpl, $scope.radioButton .radio_btn_success_data);
+ $('#radioBtnArea').append(html);
+
+ var html = Mustache.to_html(radio_button_tpl, $scope.radioButton .radio_btn_danger_data);
+ $('#radioBtnArea').append(html);
+
+ var html = Mustache.to_html(radio_button_tpl, $scope.radioButton .radio_btn_Warn_data);
+ $('#radioBtnArea').append(html);
+
+ var html = Mustache.to_html(radio_button_tpl, $scope.radioButton .radio_btn_info_data);
+ $('#radioBtnArea').append(html);
+
+ }
+ })
+ .controller("checkBoxCtrl", function($scope, DataService) {
+ $scope.message = "You selected checkbox tab";
+ $scope.subIsLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("Loading..");
+ loadCheckBox();
+ return true;
+ }
+ console.log("Not Loaded..");
+ return false;
+ }
+ $scope.init = function() {
+ $scope.param="checkboxData";
+ $scope.checkboxTip="shortNote";
+ DataService.getAllData($scope.param)
+ .then(function(data){
+ $scope.checkBox = data;
+ loadCheckBox();
+ });
+ DataService.getAllData($scope.checkboxTip)
+ .then(function(data){
+ $scope.checkboxTipData = data.checkboxTip;
+ console.log("inside table");
+ });
+ }
+ function loadCheckBox() {
+ var check_box_tpl = $(modelTemplate).filter('#checkBoxes').html();
+
+ var html = Mustache.to_html(check_box_tpl, $scope.checkBox.checkbox_default_data);
+ $('#CheckBoxArea').html(html);
+
+ var html = Mustache.to_html(check_box_tpl, $scope.checkBox.checkbox_primary_data);
+ $('#CheckBoxArea').append(html);
+
+ var html = Mustache.to_html(check_box_tpl, $scope.checkBox.checkbox_success_data);
+ $('#CheckBoxArea').append(html);
+
+ var html = Mustache.to_html(check_box_tpl, $scope.checkBox.checkbox_danger_data);
+ $('#CheckBoxArea').append(html);
+
+ var html = Mustache.to_html(check_box_tpl, $scope.checkBox.checkbox_warn_data);
+ $('#CheckBoxArea').append(html);
+
+ var html = Mustache.to_html(check_box_tpl, $scope.checkBox.checkbox_info_data);
+ $('#CheckBoxArea').append(html);
+
+ /*$.getJSON('./data/checkboxData.json', function(c_data) {
+ var html = Mustache.to_html(check_box_tpl, c_data.checkbox_default_data);
+ $('#CheckBoxArea').html(html);
+
+ var html = Mustache.to_html(check_box_tpl, c_data.checkbox_primary_data);
+ $('#CheckBoxArea').append(html);
+
+ var html = Mustache.to_html(check_box_tpl, c_data.checkbox_success_data);
+ $('#CheckBoxArea').append(html);
+
+ var html = Mustache.to_html(check_box_tpl, c_data.checkbox_danger_data);
+ $('#CheckBoxArea').append(html);
+
+ var html = Mustache.to_html(check_box_tpl, c_data.checkbox_warn_data);
+ $('#CheckBoxArea').append(html);
+
+ var html = Mustache.to_html(check_box_tpl, c_data.checkbox_info_data);
+ $('#CheckBoxArea').append(html);
+ });*/
+ }
+ })
+
+ /* Reference Code -- Remove after use */
+ .controller("coursesCtrl", function($scope, DataService){
+ $scope.message = "Courses Offered";
+ $scope.courses = ["Java", "C/C++", "JavaScript", "AngularJS", "NodeJS", "HTML", "Python", "Action Script"];
+ $scope.showDialog = function() {
+ /*var dialog_tpl = $(modelTemplate).filter('#personDialog').html();
+ var data = {'title':'Shahid Noor','showClose':true,'closeBtnTxt':'Cancel','icon':'glyphicon glyphicon-off','iconColor':'icon_warn','msg':'Good! There is a message that can be used to show on the screen. There is a message that can be used to show on the screen', buttons:[{"text": "Ok", 'action':'callThis()'},{"text": "Show"}]};
+ var html = Mustache.to_html(dialog_tpl, data);
+ $(html).modal({backdrop: "static"}); //backdrop: "static" - for grayed out and no outside click work, backdrop: false - no grayed out*/
+
+ var def_button_tpl = $(modelTemplate).filter('#visualButtons').html();
+ var def_btn_data = {'title':"asas", 'type':'primary'};
+ var html = Mustache.to_html(def_button_tpl, def_btn_data);
+ $('#sampleArea').html(html);
+ };
+
+ // $scope.$on('$viewContentLoaded', function(){
+ function loaded(){
+ console.log("Loaded..");
+ //Here your view content is fully loaded !!
+ var def_button_tpl = $(modelTemplate).filter('#dropDown').html();
+ var def_btn_data = {'title':'Shahid Noor','position':'down', items:[{"itemLabel": "Ok"},{"itemLabel": "Show"}]};
+ var html = Mustache.to_html(def_button_tpl, def_btn_data);
+ $('#sampleArea').html(html);
+
+ }
+ $scope.subIsLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("Loading..");
+ loaded();
+ return true;
+ }
+ console.log("Not Loaded..");
+ return false;
+ }
+ })
+
+ .controller("toolCtrl", function($scope, DataService, $compile, $log){
+ $scope.toolTip = "shortNote";
+ $scope.toolTipContent = "textArea";
+
+ DataService.getAllData($scope.toolTipContent)
+ .then(function(data){
+ $log.info(data.Note.placement);
+ $scope.noteContent = data.Note.message;
+ $scope.notePlacement = data.Note.placement;
+ $scope.errMsg = data.ErrMsg;
+ console.log($scope.noteContent + " " + $scope.notePlacement);
+ loadTextArea();
+ });
+ DataService.getAllData($scope.toolTip)
+ .then(function(data){
+ $scope.toolTipData = data.toolTip;
+ //loadTextArea();
+ });
+
+ //$('[data-toggle="popover"]').popover();
+
+
+
+ function loadTextArea() {
+ var text = $(modelTemplate).filter('#textfield').html();
+ var email = $(modelTemplate).filter('#email').html();
+ var url = $(modelTemplate).filter('#url').html();
+ var password = $(modelTemplate).filter('#password').html();
+ var numeric = $(modelTemplate).filter('#numeric').html();
+ var dot = $(modelTemplate).filter('#dot').html();
+ var dateinput = $(modelTemplate).filter('#dateinput').html();
+ var monthinput = $(modelTemplate).filter('#monthinput').html();
+ var weekinput = $(modelTemplate).filter('#weekinput').html();
+ var timeinput = $(modelTemplate).filter('#timeinput').html();
+ var ipv4 = $(modelTemplate).filter('#ipv4').html();
+ var ipv6 = $(modelTemplate).filter('#ipv6').html();
+ var textarea = $(modelTemplate).filter('#textarea').html();
+
+ var note = $(modelTemplate).filter('#note').html();
+
+ var dataText = {"errMsg" : {"textboxErr" : "The name is required.", "modalVar":"province.province_name", "placeholder":""}};
+ var html = Mustache.to_html(text, dataText.errMsg);
+ $('#fname').html($compile(html)($scope));
+
+ var html = Mustache.to_html(email, $scope.errMsg);
+ $('#email').html($compile(html)($scope));
+
+ var html = Mustache.to_html(url, $scope.errMsg);
+ $('#url').html($compile(html)($scope));
+
+ var html = Mustache.to_html(password, $scope.errMsg);
+ $('#password').html($compile(html)($scope));
+
+ var dataNum = {"errMsg" : {"numericErr" : "The number is required.", "modalVar":"province.port", "placeholder":""}};
+ var html = Mustache.to_html(numeric, dataNum.errMsg);
+ $('#numeric').html($compile(html)($scope));
+
+
+ var html = Mustache.to_html(dot, $scope.errMsg);
+ $('#dot').html($compile(html)($scope));
+
+ var html = Mustache.to_html(dateinput, $scope.errMsg);
+ $('#dateinput').html($compile(html)($scope));
+
+ var html = Mustache.to_html(monthinput, $scope.errMsg);
+ $('#monthinput').html($compile(html)($scope));
+
+ var html = Mustache.to_html(weekinput, $scope.errMsg);
+ $('#weekinput').html($compile(html)($scope));
+
+ var html = Mustache.to_html(timeinput, $scope.errMsg);
+ $('#timeinput').html($compile(html)($scope));
+
+ var dataIP = {"errMsg" : {"ipv4Err" : "The ipv4 is required.", "modalVar":"province.ip", "placeholder":""}};
+ var html = Mustache.to_html(ipv4, dataIP.errMsg);
+ $('#ipv4').html($compile(html)($scope));
+
+ var html = Mustache.to_html(ipv6, $scope.errMsg);
+ $('#ipv6').html($compile(html)($scope));
+
+ var html = Mustache.to_html(textarea, $scope.errMsg);
+ $('#textarea').html($compile(html)($scope));
+
+
+
+ var html = Mustache.to_html(note, {"placement":$scope.notePlacement});
+ $('#note').html(html);
+ $("#noteanchor").popover({
+ template: '<div class="popover fade bottom in customPopover"><div class="arrow"></div>'+$scope.noteContent+'</div>'
+ });
+
+ $scope.validatetextbox = function (value){
+ if($scope.textbox) {
+ $scope.textboxErr = false;
+ }
+ else
+ $scope.textboxErr = true;
+
+ }
+ $scope.validateemail = function (value){
+ if($scope.email) {
+ $scope.emailErr = false;
+ }
+ else
+ $scope.emailErr = true;
+
+ }
+ $scope.validateurl = function (value){
+ if($scope.url) {
+ $scope.urlErr = false;
+ }
+ else
+ $scope.urlErr = true;
+
+ }
+ $scope.validatepassword = function (value){
+ if($scope.password) {
+ $scope.passwordErr = false;
+ }
+ else
+ $scope.passwordErr = true;
+
+ }
+ $scope.validatenumeric = function (value){
+ if($scope.number) {
+ $scope.numericErr = false;
+ }
+ else
+ $scope.numericErr = true;
+
+ }
+ $scope.validatedot = function (value){
+ if($scope.datetime) {
+ $scope.dotErr = false;
+ }
+ else
+ $scope.dotErr = true;
+
+ }
+ $scope.validatedateinput = function (value){
+ if($scope.date) {
+ $scope.dateinputErr = false;
+ }
+ else
+ $scope.dateinputErr = true;
+
+ }
+ $scope.validatemonthinput = function (value){
+ if($scope.month) {
+ $scope.monthinputErr = false;
+ }
+ else
+ $scope.monthinputErr = true;
+
+ }
+ $scope.validateweek = function (value){
+ if($scope.week) {
+ $scope.weekinputErr = false;
+ }
+ else
+ $scope.weekinputErr = true;
+
+ }
+ $scope.validatetime = function (value){
+ if($scope.time) {
+ $scope.timeinputErr = false;
+ }
+ else
+ $scope.timeinputErr = true;
+
+ }
+ $scope.validateipv4 = function (value){
+ if($scope.ipv4) {
+ $scope.ipv4Err = false;
+ }
+ else
+ $scope.ipv4Err = true;
+
+ }
+ $scope.validateipv6 = function (value){
+ if($scope.ipv6) {
+ $scope.ipv6Err = false;
+ }
+ else
+ $scope.ipv6Err = true;
+
+ }
+
+ $scope.validatetextarea = function (value){
+ if($scope.textarea) {
+ $scope.textareaErr = false;
+ }
+ else
+ $scope.textareaErr = true;
+
+ }
+
+
+
+ }
+
+
+ })
+
+
+
+
+
+
+
+ .controller("notificationCtrl", function($scope, DataService){
+ $scope.message = "Notification and Messages";
+ $scope.notificationTip = "shortNote";
+
+ var dialog_tpl;
+ $scope.templateLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("Loading..");
+
+ return true;
+ }
+ console.log("Not Loaded..");
+ return false;
+ }
+ $scope.init = function() {
+ $scope.param="notificationData";
+ $scope.notificationTip="shortNote";
+ DataService.getAllData($scope.param)
+ .then(function(data){
+ $scope.notification = data;
+ });
+ DataService.getAllData($scope.notificationTip)
+ .then(function(data){
+ $scope.notificationTipData = data.notificationTip;
+ });
+ }
+
+ $scope.showError = function() {
+ dialog_tpl = $(modelTemplate).filter('#personDialog').html();
+ var html = Mustache.to_html(dialog_tpl, $scope.notification.err_data);
+ $(html).modal({backdrop: "static"});//backdrop: "static" - for grayed out and no outside click work, backdrop: false - no grayed out*!
+ }
+
+ $scope.showWarning = function() {
+ dialog_tpl = $(modelTemplate).filter('#personDialog').html();
+ var html = Mustache.to_html(dialog_tpl, $scope.notification.warn_data);
+ $(html).modal();
+ }
+
+ $scope.showInfo = function() {
+ dialog_tpl = $(modelTemplate).filter('#personDialog').html();
+ var html = Mustache.to_html(dialog_tpl, $scope.notification.info_data);
+ $(html).modal();
+ }
+ $scope.showConfirm = function() {
+ dialog_tpl = $(modelTemplate).filter('#personDialog').html();
+ var html = Mustache.to_html(dialog_tpl, $scope.notification.confirm_data);
+ $(html).modal({backdrop: "static"}); //backdrop: "static" - for grayed out and no outside click work, backdrop: false - no grayed out*!/
+ }
+
+ })
+
+ .controller("functionalCtrl", function($scope, DataService){
+ $scope.message = "Functional Flow";
+
+ var dialog_tpl;
+ $scope.templateLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("Loading..");
+
+ return true;
+ }
+ console.log("Not Loaded..");
+ return false;
+ }
+
+ $scope.init = function() {
+ $scope.param="functionalData";
+ $scope.functionalTip="shortNote";
+ DataService.getAllData($scope.param)
+ .then(function(data){
+ $scope.functional = data;
+ });
+ DataService.getAllData($scope.functionalTip)
+ .then(function(data){
+ $scope.functionalTipData = data.functionalTip;
+ });
+ }
+ $scope.showCreate = function() {
+ dialog_tpl = $(modelTemplate).filter('#functionalDialog').html();
+ var html = Mustache.to_html(dialog_tpl, $scope.functional.create_data);
+ $(html).modal();
+ }
+ $scope.showModify = function() {
+ dialog_tpl = $(modelTemplate).filter('#functionalDialog').html();
+ var html = Mustache.to_html(dialog_tpl, $scope.functional.modify_data);
+ $(html).modal();
+ }
+ $scope.showDelete = function() {
+ dialog_tpl = $(modelTemplate).filter('#functionalDialog').html();
+ var html = Mustache.to_html(dialog_tpl, $scope.functional.delete_data);
+ $(html).modal();
+ }
+ $scope.showWorkflow = function() {
+ dialog_tpl = $(modelTemplate).filter('#functionalDialog').html();
+ var html = Mustache.to_html(dialog_tpl, $scope.functional.workflow_data);
+ $(html).modal();
+ }
+ })
+
+ .controller("listCtrl", function($scope, $log, DataService){
+ $scope.message = "List Page";
+ $scope.listTip = "shortNote";
+ $scope.init = function() {
+ console.log("Shahid... ng-init");
+ $scope.param="list";
+ DataService.getAllData($scope.param)
+ .then(function(data){
+ $scope.mainlistItem = data;
+ }, function(reason){
+ $scope.portfolios = [];
+
+ });
+
+ DataService.getAllData($scope.listTip)
+ .then(function(data){
+ $scope.listTipData = data.listTip;
+ });
+ }
+ $scope.loadSubMenuPage = function(index) {
+ $log.info($scope.mainlistItem);
+ $scope.subMenuListItem = $scope.mainlistItem[index].subMenu;
+ $scope.subsubMenuListItem = [];
+ }
+ $scope.loadSubSubMenuPage = function(index) {
+ $log.info($scope.subMenuListItem);
+ console.log("index: "+index);
+ $scope.subsubMenuListItem = $scope.subMenuListItem[index].subsubMenu;
+ }
+ })
+
+ .controller("managementCtrl", function($scope, $log, DataService, $state, $compile, NgTableParams){
+ $scope.message = "Management";
+ $scope.provinceTip = "shortNote";
+ /*$scope.provinceData = [
+ {id:1, province_name:'First', ip:'192.168.1.45', port:'8080'},
+ {id:2, province_name:'Second', ip:'192.168.1.5', port:'8081'},
+ {id:3, province_name:'Third', ip:'192.168.1.15', port:'8082'},
+ {id:4, province_name:'Fourth', ip:'192.168.1.28', port:'8083'},
+ {id:5, province_name:'Fifth', ip:'192.168.1.19', port:'8084'}
+ ];*/
+
+ $scope.init = function() {
+ console.log("Shahid... ng-init");
+ DataService.getAllProvinceData()
+ .then(function(data){
+ $scope.provinceData = data.provinceData;
+ console.log("Data: ");
+ loadButtons();
+ $log.info(data.provinceData);
+ }, function(reason){
+ $scope.message = "Error is :" + JSON.stringify(reason);
+ });
+
+ DataService.getAllData($scope.provinceTip)
+ .then(function(data){
+ $scope.provinceTipData = data.provinceTip;
+ });
+ }
+
+ /*DataService.getAllProvinceData()
+ .then(function(data){
+ $scope.provinceData = data.provinceData;
+ console.log("Data: ");
+ $log.info(data.provinceData);
+ }, function(reason){
+ $scope.message = "Error is :" + JSON.stringify(reason);
+ });*/
+ /*DataService.getAllData($scope.provinceTip)
+ .then(function(data){
+ $scope.provinceTipData = data.provinceTip;
+ });*/
+
+ function loadButtons() {
+ var def_button_tpl = $(modelTemplate).filter('#defaultButtons').html();
+ var add_data = {"title":"Add", "clickAction":"showAddModal()"};
+ var delete_data = {"title":"Delete Selected", "clickAction":"deleteData()"};
+ var addhtml = Mustache.to_html(def_button_tpl, add_data);
+ var deletehtml = Mustache.to_html(def_button_tpl, delete_data);
+ $('#provinceAction').html($compile(addhtml)($scope));
+ $('#provinceAction').append($compile(deletehtml)($scope));
+
+ $scope.checkboxes = { 'checked': false, items: {} };
+
+ //var data = [{id: 1, name: "Moroni", age: 50}, {id: 2, name: "ABC", age: 30}, {id: 3, name: "Morhoni", age: 10}, {id: 4, name: "DABC", age: 31}, {id: 5, name: "Noor", age: 30}, {id: 6, name: "ABCD", age: 40}, {id: 7, name: "DABC", age: 31}, {id: 8, name: "Noor", age: 30}, {id: 9, name: "ABCD", age: 40}, {id: 10, name: "DABC", age: 31}, {id: 11, name: "Noor", age: 30}, {id: 12, name: "ABCD", age: 40}];
+ $scope.tableParams = new NgTableParams({count: 5, sorting: {province_name: 'asc'} //{page: 1,count: 10,filter: {name: 'M'},sorting: {name: 'desc'}
+ }, { counts:[5, 10, 20, 50], dataset: $scope.provinceData});
+
+ $scope.$watch('checkboxes.checked', function(value) {
+ angular.forEach($scope.provinceData, function(item) {
+ if (angular.isDefined(item.id)) {
+ $scope.checkboxes.items[item.id] = value;
+ }
+ });
+ });
+
+ var text = $(modelTemplate).filter('#textfield').html();
+ var ipv4 = $(modelTemplate).filter('#ipv4').html();
+ var number = $(modelTemplate).filter('#numeric').html();
+
+ var dataText = {"ErrMsg" : {"textboxErr" : "The name is required.", "modalVar":"province.province_name", "placeholder":"Name"}};
+ $('#myModal .provinceName').html($compile(Mustache.to_html(text, dataText.ErrMsg))($scope));
+
+ var dataIP = {"ErrMsg" : {"ipv4Err" : "The ipv4 is required.", "modalVar":"province.ip", "placeholder":"IP Address"}};
+ $('#myModal .ipAddress').html($compile(Mustache.to_html(ipv4, dataIP.ErrMsg))($scope));
+
+ var dataNum = {"ErrMsg" : {"numericErr" : "The number is required.", "modalVar":"province.port", "placeholder":"Port"}};
+ $('#myModal .port').html($compile(Mustache.to_html(number, dataNum.ErrMsg))($scope));
+
+ var modelSubmit_data = {"title":"Submit", "clickAction":"saveData(province.id)"};
+ var modelSubmit_html = Mustache.to_html(def_button_tpl, modelSubmit_data);
+ $('#myModal #footerBtns').html($compile(modelSubmit_html)($scope));
+
+ var modelDelete_data = {"title":"Close", "clickAction":"closeModal()"};
+ var modelDelete_html = Mustache.to_html(def_button_tpl, modelDelete_data);
+ $('#myModal #footerBtns').append($compile(modelDelete_html)($scope));
+ }
+
+ $scope.validatetextbox = function (value){
+ if($scope.province.province_name) {
+ $scope.textboxErr = false;
+ }
+ else
+ $scope.textboxErr = true;
+ }
+ $scope.validateipv4 = function (value){
+ if($scope.province.ip) {
+ $scope.ipv4Err = false;
+ }
+ else
+ $scope.ipv4Err = true;
+ }
+ $scope.validatenumeric = function (value){
+ if($scope.province.port) {
+ $scope.numericErr = false;
+ }
+ else
+ $scope.numericErr = true;
+ }
+
+ $scope.closeModal = function() {
+ console.log("Closing Modal...");
+ $('#myModal').modal('hide');
+ }
+
+
+ $scope.checkAll = function() {
+ console.log("Checked ..");
+ angular.forEach($scope.provinceData, function(data) {
+ //data.select = $scope.selectAll;
+ $scope.checkboxes.items[user.id]
+ });
+ };
+
+ $scope.showAddModal = function() {
+ console.log("Showing Modal to Add data");
+ $scope.province = {};
+ $scope.textboxErr = false;
+ $scope.ipv4Err = false;
+ $scope.numericErr = false;
+ $("#myModal").modal();
+ }
+ $scope.saveData = function(id) {
+ if(id) {
+ //edit data
+ console.log("Editing data.." + JSON.stringify($scope.province));
+ DataService.editProvinceData($scope.province)
+ .then(function (data) {
+ $scope.message = "Success :-)";
+ $state.reload();
+ //$state.go($state.current.name, {}, {reload: true})
+ },
+ function (reason) {
+ //$log.info(reason);
+ $scope.message = reason.status + " " + reason.statusText;
+ });
+ }
+ else {
+ console.log("Adding data.." + JSON.stringify($scope.province));
+ DataService.addProvinceData($scope.province)
+ .then(function (data) {
+ $scope.message = "Success :-)";
+ $state.reload();
+ //$state.go($state.current.name, {}, {reload: true})
+ },
+ function (reason) {
+ //$log.info(reason);
+ $scope.message = reason.status + " " + reason.statusText;
+ });
+ }
+ $('#myModal').modal('hide');
+ }
+
+ $scope.deleteData = function() {
+ var deleteArr = [];
+ //$log.info($scope.checkboxes);
+ angular.forEach($scope.checkboxes.items, function(value , key) {
+ //$log.info(data);
+ if(value) {
+ deleteArr.push(key);
+ }
+ });
+
+ console.log("To be deleted : "+deleteArr);
+ //$log.info(deleteArr);
+ DataService.deleteProvinceData(deleteArr)
+ .then(function(data){
+ $scope.message = "Successfully deleted :-)";
+ $state.reload();
+ },
+ function(reason){
+ //$log.info(reason);
+ $scope.message = reason.status + " " + reason.statusText;
+ });
+ }
+
+ $scope.deleteIndividualData = function(id) {
+ var deleteArr = [];
+ //$log.info($scope.checkboxes);
+ deleteArr.push(id);
+
+ console.log("To be deleted : "+deleteArr);
+ //$log.info(deleteArr);
+ DataService.deleteProvinceData(deleteArr)
+ .then(function(data){
+ $scope.message = "Successfully deleted :-)";
+ $state.reload();
+ },
+ function(reason){
+ //$log.info(reason);
+ $scope.message = reason.status + " " + reason.statusText;
+ });
+ }
+
+ $scope.editData = function(id) {
+ $scope.textboxErr = false;
+ $scope.ipv4Err = false;
+ $scope.numericErr = false;
+ console.log("To be edited : " + id);
+ var dataFound = false;
+ angular.forEach($scope.provinceData, function(data) {
+ if(!dataFound) {
+ if (data.id == id) {
+ console.log("Found : " + data.id);
+ $scope.province = data;
+ /*$scope.province.province_name = data.province_name;
+ $scope.province.ip = data.ip;
+ $scope.province.port = data.port;*/
+
+ $("#myModal").modal();
+ dataFound = true;
+ }
+ }
+ });
+ }
+
+ })
+
+var modelTemplate;
+function loadTemplate() {
+ $.get('template.html', function(template) {
+ modelTemplate = template;
+ });
+}
+
+function callThis() {
+ alert("Going Great!");
+}
+
+function searchTable() {
+ var filter, table, tr, td;
+ filter = $("#myInput").val().toUpperCase();
+ table = $("#myTable_search");
+ tr = $("#myTable_search tr");
+
+ // Loop through all table rows, and hide those who don't match the search query
+ for (var i = 0; i < tr.length; i++) {
+ td = tr[i].getElementsByTagName("td")[0];
+ if (td) {
+ if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
+ tr[i].style.display = "";
+ } else {
+ tr[i].style.display = "none";
+ }
+ }
+ }
+}
+
+function linkClicked(state) {
+ console.log("State to : " + state);
+} \ No newline at end of file
diff --git a/common/src/main/webapp/framework/browser/template.html b/common/src/main/webapp/framework/browser/template.html
new file mode 100644
index 0000000..5a7900b
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/template.html
@@ -0,0 +1,376 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<script id="dialogTpl" type="text/html">
+ <h3>{{name}}</h3> <div>Skills are:{{#skills}}<div>{{.}}</div>{{/skills}}</div></div>
+</script>
+
+<script id="person" type="text/html">
+ <ul>{{#depts}}<div><h4>{{fname}} {{lname}} </h4>{{Address}}</div>{{/depts}}</ul>
+</script>
+
+<script id="user" type="text/html">
+ <h3>{{name}}</h3><p>Address: {{address}}</p>
+</script>
+
+<!--Dialog-->
+<script id="personDialog" type="text/html">
+ <div id="msgModal" class="modal fade" role="dialog">
+ <div class="modal-dialog modal-md">
+
+ <!-- Modal content-->
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">&times;</button>
+ <h4 class="modal-title titlestyle">{{title}}</h4>
+ </div>
+ <div class="modal-body">
+ <div class="container center">
+ <div class="row">
+ <div class="col-xs-2 col-sm-2 col-md-1 col-lg-1 icon {{icon}} {{iconColor}}"></div>
+ <div class="msg col-xs-10 col-sm-10 col-md-11 col-lg-11" style="text-align:left;vertical-align: middle;">{{msg}}</div>
+ </div>
+ </div>
+ </div>
+ <div class="modal-footer">
+ <div>{{#buttons}} <button type="button" class="btn btn-primary outline" onclick={{action}}>{{text}}</button> {{/buttons}}
+ {{#showClose}}<button type="button" class="btn btn-primary outline" data-dismiss="modal">{{closeBtnTxt}}</button>{{/showClose}}
+ </div>
+ <!--<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>-->
+ </div>
+ </div>
+
+ </div>
+ </div>
+</script>
+
+<script id="functionalDialog" type="text/html">
+ <div id="funModal" class="modal fade" role="dialog" ng-init="getDetail()">
+ <div class="modal-dialog modal-md">
+
+ <!-- Modal content-->
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">&times;</button>
+ <h4 class="modal-title titlestyle">{{title}}</h4>
+ </div>
+ <div class="modal-body">
+ <div>
+ <form class="form-horizontal" role="form">
+ {{#labels}}
+ <div class="form-group">
+ <label class="control-label col-sm-3 labelstyle" for={{input_id}}>{{text}}</label>
+ <div class="col-sm-7">
+ <input type={{type}} class="form-control" id={{input_id}}>
+ </div>
+ </div>
+ {{/labels}}
+ </form>
+ </div>
+ </div>
+ <div class="modal-footer">
+ <div>{{#buttons}} <button type="button" class="btn btn-primary outline" onclick={{action}}>{{text}}</button> {{/buttons}}
+ {{#showClose}}<button type="button" class="btn btn-primary outline" data-dismiss="modal">{{closeBtnTxt}}</button>{{/showClose}}
+ </div>
+ <!--<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>-->
+ </div>
+ </div>
+
+ </div>
+ </div>
+</script>
+
+<!-- Accordion -->
+<script id="accordion" type="text/html">
+ {{#items}}
+ <div class="panel panel-default">
+ <h3 class="panel-title">
+ <a data-toggle="collapse" data-parent="#accordion" data-target="#{{tabId}}">{{header}}</a>
+ </h3>
+ <div id="{{tabId}}" class="panel-collapse collapse {{#isActive}}in{{/isActive}}">
+ <div class="panel-body"> {{msg}} </div>
+ </div>
+ </div>
+ {{/items}}
+</script>
+
+<!-- Default Buttons <button class="btnDefault" ng-click="{{clickAction}}">{{title}}</button>-->
+<script id="defaultButtons" type="text/html">
+ <input type="button" class="btnDefault btnmrg" ng-click="{{clickAction}}" value="{{title}}"/>
+</script>
+
+<script id="defaultIconButtons" type="text/html">
+ <button id="iconBtn" type="button" class="btnDefault {{type}}">{{title}}
+ <span class="glyphicon {{gType}} pull-{{iconPosition}}"></span>
+ </button>
+</script>
+
+<!-- Visual Buttons -->
+<script id="visualButtons" type="text/html">
+ <button type="button" class="btn btn-{{type}}">{{title}}</button>
+</script>
+
+<!-- Different sized Buttons -->
+<script id="sizeButtons" type="text/html">
+ <button type="button" class="btn btn-{{type}} {{size}}">{{title}}</button>
+</script>
+
+<!-- Icon Buttons -->
+<script id="iconButtons" type="text/html">
+ <button type="button" class="btn btn-{{type}}">{{title}}
+ <span class="glyphicon {{gType}}"></span>
+ </button>
+</script>
+
+<!--Radio Buttons-->
+<script id="radioButtons" type="text/html">
+ <div>
+ <input class="magic-radio" type="radio" name="radio" id="radio{{id}}"/>
+ <label for="radio{{id}}">{{label}}</label></br>
+ </div>
+</script>
+
+<!--Check boxes template-->
+<script id="checkBoxes" type="text/html">
+ <div class="funkyradio-{{type}}">
+ <input type="checkbox" name="check" id="checkbox{{id}}" {{#checked}}checked{{/checked}} />
+ <label for="checkbox{{id}}">{{label}}</label>
+ </div>
+</script>
+
+<!--Dropdown template-->
+<script id="dropDown" type="text/html">
+ <div class="drop{{position}}">
+ <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">{{title}}
+ <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu">
+ {{#items}}<li><a href="#">{{itemLabel}}</a></li>{{/items}}
+ </ul>
+ </div>
+
+</script>
+
+<script id="dropDownHeader" type="text/html">
+ <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">{{title}}
+ <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu">
+ {{#items}}
+ {{#isheader}}<li class="divider"></li><li class="dropdown-header">{{itemLabel}}</li><li class="divider"></li>{{/isheader}}
+ {{^isheader}}<li><a href="#">{{itemLabel}}</a></li>{{/isheader}}
+ {{/items}}
+ </ul>
+</script>
+
+<script id="simpleDropdownTmpl" type="text/html">
+ <div class="dropdownplain">
+ <ul class="nav navbar-nav">
+ <li>
+ <a class="dropdown-toggle" data-toggle="dropdown">{{title}} <span class="glyphicon glyphicon-chevron-down pull-right"></span></a>
+ <ul class="dropdown-menu">
+ {{#items}}<li><a target="_blank">{{itemLabel}}</a></li>{{/items}}
+ </ul>
+ </li>
+ </ul>
+ </div>
+
+
+
+</script>
+
+<!--Tabs-->
+<script id="tabs" type="text/html">
+ <ul class="nav nav-tabs">
+ {{#items}}<li {{#isActive}}class="active"{{/isActive}}><a data-toggle="tab" data-target="#{{target}}">{{tablabel}}</a></li>{{/items}}
+ </ul>
+ <div class="tab-content">
+ {{#items}}
+ <div id="{{target}}" class="tab-pane fade {{#isActive}}in active{{/isActive}}">
+ <h3>{{tablabel}}</h3>
+ <p>{{msg}}</p>
+ </div>
+ {{/items}}
+ </div>
+</script>
+
+<!--Vertical Tabs-->
+<script id="vtabs" type="text/html">
+ <ul class="nav nav-stacked col-sm-4 col-md-4 col-lg-4">
+ {{#items}}<li {{#isActive}}class="active"{{/isActive}}><a data-toggle="tab" data-target="#{{target}}">{{tablabel}}</a></li>{{/items}}
+ </ul>
+ <div class="tab-content col-sm-8 col-md-8 col-lg-8">
+ {{#items}}
+ <div id="{{target}}" class="tab-pane fade {{#isActive}}in active{{/isActive}}">
+ <h3>{{tablabel}}</h3>
+ <p>{{msg}}</p>
+ </div>
+ {{/items}}
+ </div>
+</script>
+
+<script id="table" type="text/html">
+ {{#filter}}<input type="text" id="myInput" onkeyup="{{action}}" placeholder="Search for {{searchField}}">{{/filter}}
+ <table id="myTable{{#filter}}_search{{/filter}}" class="table {{#striped}}table-striped{{/striped}} {{#border}}table-bordered{{/border}} {{#hover}}table-hover{{/hover}} {{#condensed}}table-condensed{{/condensed}}">
+ <thead>
+ <tr>
+ {{#itemHeader}}<th>{{.}}</th>{{/itemHeader}}
+ </tr>
+ </thead>
+ <tbody>
+ {{#rowitem}}
+ <tr>
+ {{#values}}<td>{{.}}</td>{{/values}}
+ </tr>
+ {{/rowitem}}
+ </tbody>
+ </table>
+</script>
+
+<!--text-->
+<script id="textfield" type="text/html">
+ <div class="css-form">
+ <input id ="textbox" name="textbox" class="form-control" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="text" ng-blur="validatetextbox({{modalVar}})" required >
+ <span class="errMsg" ng-show="textboxErr">{{textboxErr}}</span>
+ </div>
+</script>
+
+<!--email-->
+<script id="email" type="text/html">
+ <div class="css-form">
+ <input class="form-control" ng-model="email" type="email" ng-blur="validateemail('email')" required>
+ <span class="errMsg" ng-show="emailErr">{{emailErr}}</span>
+ </div>
+</script>
+
+<!--url-->
+<script id="url" type="text/html">
+ <div class="css-form">
+ <input class="form-control" ng-model="url" type="url" ng-blur="validateurl('url')" required>
+ <span class="errMsg" ng-show="urlErr">{{urlErr}}</span>
+ </div>
+</script>
+
+<!--password-->
+<script id="password" type="text/html">
+ <div class="css-form">
+ <input class="form-control" ng-model="password" type="password" pattern=".{3,}" maxlength="9" ng-blur="validatepassword('password')" required>
+ <span class="errMsg" ng-show="passwordErr">{{passwordErr}}</span>
+ </div>
+</script>
+
+<!--numeric-->
+<script id="numeric" type="text/html">
+ <div class="css-form">
+ <input class="form-control" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="number" ng-blur="validatenumeric({{modalVar}})" required/>
+ <span class="errMsg" ng-show="numericErr">{{numericErr}}</span>
+ </div>
+</script>
+
+<!--dot-->
+<script id="dot" type="text/html">
+ <div class="css-form">
+ <input class="form-control" ng-model="datetime" type="datetime-local" ng-blur="validatedot('dot')" required>
+ <span class="errMsg" ng-show="dotErr">{{dotErr}}</span>
+ </div>
+</script>
+
+<!--date-->
+<script id="dateinput" type="text/html">
+ <div class="css-form">
+ <input class="form-control" ng-model="date" type="date" ng-blur="validatedateinput('dateinput')" required>
+ <span class="errMsg" ng-show="dateinputErr">{{dateinputErr}}</span>
+ </div>
+</script>
+
+<!--Month-->
+<script id="monthinput" type="text/html">
+ <div class="css-form">
+ <input class="form-control"ng-model="month" type="month" ng-blur="validatemonthinput('monthinput')" required>
+ <span class="errMsg" ng-show="monthinputErr">{{monthinputErr}}</span>
+ </div>
+</script>
+
+
+<!--Week-->
+<script id="weekinput" type="text/html">
+ <div class="css-form">
+ <input class="form-control" ng-model="week" type="week" ng-blur="validateweek('week')" required>
+ <span class="errMsg" ng-show="weekinputErr">{{weekinputErr}}</span>
+ </div>
+</script>
+
+<!--time-->
+<script id="timeinput" type="text/html">
+ <div class="css-form">
+ <input class="form-control" ng-model="time" type="time" ng-blur="validatetime('time')" required>
+ <span class="errMsg" ng-show="timeinputErr">{{timeinputErr}}</span>
+ </div>
+</script>
+
+<!--ipv4-->
+<script id="ipv4" type="text/html">
+ <div class="css-form">
+ <input class="form-control" type="ipv4" placeholder="{{placeholder}}" ng-model="{{modalVar}}" pattern="((^|\.)((25[0-5])|(2[0-4]\d)|(1\d\d)|([1-9]?\d))){4}$" ng-blur="validateipv4({{modalVar}})" required>
+ <span class="errMsg" ng-show="ipv4Err">{{ipv4Err}}</span>
+ </div>
+</script>
+
+<!--ipv6-->
+<script id="ipv6" type="text/html">
+ <div class="css-form">
+ <input class="form-control" ng-model="ipv6" type="ipv6" pattern="^([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])" ng-blur="validateipv6('ipv6')" required>
+ <span class="errMsg" ng-show="ipv6Err">{{ipv6Err}}</span>
+ </div>
+</script>
+
+
+<!--textarea-->
+<script id="textarea" type="text/html">
+ <div class="css-form">
+ <textarea class="form-control" ng-model="textarea" rows="4" cols="50" ng-blur="validatetextarea('textarea')" required></textarea>
+ <span class="errMsg" ng-show="textareaErr">{{textareaErr}}</span>
+ </div>
+</script>
+
+
+
+<!--note-->
+
+<script id="note" type="text/html">
+
+ <a id="noteanchor" href="#/home/textarea" title="Note" data-toggle="popover" data-trigger="focus" data-placement="{{placement}}">
+ <span class="glyphicon glyphicon-info-sign "></span></a>
+</script>
+
+
+
+<!-- Left Menu Accordion -->
+<!--
+<script id="menu_accordion" type="text/html">
+ {{#items}}
+ <div class="panel panel-default">
+ <h3 class="panel-title">
+ <a data-toggle="collapse" data-parent="#accordion" data-target="#{{tabId}}">{{header}}</a>
+ </h3>
+ <div id="{{tabId}}" class="panel-collapse collapse {{#isActive}}in{{/isActive}}">
+ {{#subLinks}}<a ui-sref="{{state}}" ui-sref-active="link_active" style="padding-left: 62px;" onclick={{action}}>{{title}}</a>{{/subLinks}}
+ </div>
+ </div>
+ {{/items}}
+</script>-->
diff --git a/common/src/main/webapp/framework/browser/templates/accordion.html b/common/src/main/webapp/framework/browser/templates/accordion.html
new file mode 100644
index 0000000..dcc7547
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/templates/accordion.html
@@ -0,0 +1,26 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<div id="accordionArea" class="container col-sm-12 col-md-12 col-lg-12" ng-init="init()"><!--ng-if="accordionLoaded()"-->
+ <h4>Accordion</h4>
+ <div class="panel-group" id="accordion"></div>
+ <div class="shortnote">
+ <div class="shortnoteHeader">ShortNote</div>
+ <div class="shortnoteText">{{accordionTipData}}</div>
+ </div>
+</div>
diff --git a/common/src/main/webapp/framework/browser/templates/buttons.html b/common/src/main/webapp/framework/browser/templates/buttons.html
new file mode 100644
index 0000000..b80d2e4
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/templates/buttons.html
@@ -0,0 +1,38 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<h4>Types of Buttons</h4>
+
+<div id="buttonArea" ng-init="init()">
+ <h3> Default Buttons</h3>
+ <div id="defaultButtonArea"></div>
+ <h3>Visual Buttons</h3>
+ <div id="visualButtonArea"></div>
+ <h3>Different Sized Buttons</h3>
+ <div id="sizeButtonArea"></div>
+ <h3>Icon Buttons</h3>
+ <div id="iconButtonArea"></div>
+
+</div>
+<div class="shortnote">
+ <div class="shortnoteHeader">ShortNote</div>
+ <div class="shortnoteText">{{buttonTipData}}</div>
+</div>
+
+
+
diff --git a/common/src/main/webapp/framework/browser/templates/checkBoxes.html b/common/src/main/webapp/framework/browser/templates/checkBoxes.html
new file mode 100644
index 0000000..10cf18a
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/templates/checkBoxes.html
@@ -0,0 +1,25 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<h4>Checkboxes</h4>
+
+<div id="CheckBoxArea" class="funkyradio" ng-init="init()"></div>
+<div class="shortnote">
+ <div class="shortnoteHeader">ShortNote</div>
+ <div class="shortnoteText"> {{checkboxTipData}}</div>
+</div>
diff --git a/common/src/main/webapp/framework/browser/templates/courses.html b/common/src/main/webapp/framework/browser/templates/courses.html
new file mode 100644
index 0000000..34dde6c
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/templates/courses.html
@@ -0,0 +1,32 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+
+<h1>{{message}}</h1>
+<ul ng-repeat="course in courses | orderBy : course : false">
+ <li>{{course}}</li>
+</ul>
+<button ng-click="showDialog()">Test</button>
+
+<!--<a ui-sref=".list">List</a>
+<a ui-sref=".details">Paragraph</a>
+
+<div ui-view></div>-->
+
+
+<div id="sampleArea" ng-if="subIsLoaded()"></div>
diff --git a/common/src/main/webapp/framework/browser/templates/dropdown.html b/common/src/main/webapp/framework/browser/templates/dropdown.html
new file mode 100644
index 0000000..1dd3d27
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/templates/dropdown.html
@@ -0,0 +1,42 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+
+<div class="container col-sm-12 col-md-12 col-lg-12">
+ <h4>Drop Down</h4>
+
+ <div id="dropdown" class="container col-sm-12 col-md-12 col-lg-12" ng-init="init()">
+ <h3>Simple Dropdown</h3>
+ <div id="plainDropDown"></div>
+ <h3>Dropdown</h3>
+ <div id="dropArea" type="button"></div>
+ <h3>Dropup</h3>
+ <div id="dropAreaUP" type="button"></div>
+ <h3>Dropdown Header</h3>
+ <div id="dropAreaHeader" type="button"></div>
+
+ </div>
+ <div class="col-sm-12 col-md-12 col-lg-12 shortnote">
+ <div class="shortnoteHeader">ShortNote</div>
+ <div class="shortnoteText">{{dropdownTipData}}</div>
+ </div>
+</div>
+
+
+
+
diff --git a/common/src/main/webapp/framework/browser/templates/functional.html b/common/src/main/webapp/framework/browser/templates/functional.html
new file mode 100644
index 0000000..78f01fd
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/templates/functional.html
@@ -0,0 +1,32 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<h4>{{message}}</h4>
+
+<div id="functionalArea" ng-init="init()">
+ <button type="button" class="btn btn-default" ng-click="showCreate()">Create</button>
+ <button type="button" class="btn btn-default" ng-click="showModify()">Modify</button>
+ <button type="button" class="btn btn-default" ng-click="showDelete()">Delete</button>
+ <button type="button" class="btn btn-default" ng-click="showWorkflow()">Workflow</button>
+ <div class="shortnote">
+ <div class="shortnoteHeader">ShortNote</div>
+ <div class="shortnoteText">{{functionalTipData}}</div>
+ </div>
+</div>
+
+
diff --git a/common/src/main/webapp/framework/browser/templates/home.html b/common/src/main/webapp/framework/browser/templates/home.html
new file mode 100644
index 0000000..cd17030
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/templates/home.html
@@ -0,0 +1,154 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<div class="homecontent center" ng-init="loadTemplate()">
+ <div class="container">
+ <div class="row">
+ <div class="col-sm-4 col-md-3 col-lg-3 rmpadding">
+ <div id="menu_accordion" class="openoAccordian_accordionmenu">
+ <div id="container" class="panel panel-default panelbr">
+ <h5 class="panel-title">
+ <a data-toggle="collapse" data-target="#panel1"><span>Container</span></a>
+ </h5>
+ <div id="panel1" class="panel-collapse collapse in">
+ <ul>
+ <li>
+ <a ui-sref=".tree" ui-sref-active="link_active">Tree</a>
+ </li>
+ <li>
+ <a ui-sref=".accordion" ui-sref-active="link_active">Accordian</a>
+ </li>
+ <li>
+ <a ui-sref=".tabs" ui-sref-active="link_active">Tabs</a>
+ </li>
+ <li>
+ <a ui-sref=".vtabs" ui-sref-active="link_active">Vertical Tab</a>
+ </li>
+ <li>
+ <a ui-sref=".table" ui-sref-active="link_active">Table</a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="widgets" class="panel panel-default panelbr">
+ <h5 class="panel-title">
+ <a data-toggle="collapse" data-target="#panel2"><span>Widgets</span></a>
+ </h5>
+ <div id="panel2" class="panel-collapse collapse in">
+ <li>
+ <a ui-sref=".buttons" ui-sref-active="link_active">Buttons</a>
+ </li>
+ <li>
+ <a ui-sref=".dropdown" ui-sref-active="link_active">Drop Down</a>
+ </li>
+ <li>
+ <a ui-sref=".radiobuttons" ui-sref-active="link_active">Radio Button</a>
+ </li>
+ <li>
+ <a ui-sref=".checkboxes" ui-sref-active="link_active">Check Box</a>
+ </li>
+ <li>
+ <a ui-sref=".tooltip" ui-sref-active="link_active">Text Area</a>
+ </li>
+ <li>
+ <a ui-sref=".list" ui-sref-active="link_active">List</a>
+ </li>
+ <li>
+ <a ui-sref=".provinceMgmt" ui-sref-active="link_active">Management</a>
+ </li>
+ </div>
+ </div>
+ <div id="notifications" class="panel panel-default panelbr">
+ <h5 class="panel-title">
+
+ <a ui-sref=".notification" ui-sref-active="noChid_link_active">Notification & Messages</a>
+ </h5>
+ </div>
+ <div id="functional" class="panel panel-default panelbr">
+ <h5 class="panel-title">
+
+ <a ui-sref=".functional" ui-sref-active="noChid_link_active">Functional Flow</a>
+
+ </h5>
+ </div>
+
+ </div>
+ <!--<div id="accordionmenuid" allow-resize="true" dataset="dataArr" height="resHeight"
+ listeners="callBacklisteners" resize-callback="resizehandler"
+ current-select="currentselect" click="clickHandler"
+ class="ng-isolate-scope accordion_parent openo_accordion_main_menu">
+ <div class="openo-accordion-resizable-handle" style="cursor: auto;"></div>
+ <ul id="accordionmenuid_ul" class="openoAccordian_accordionmenu">
+ <li id="accordionmenuid_ul_0_0_brAppTopMenuID" nodeid="brAppTopMenuID">
+ &lt;!&ndash;<span class="openo_accordion_ui-icon-expand" style="padding-left: 20px;cursor: pointer;"></span>&ndash;&gt;
+ <span class="openoAccordian_showHideArrow_hide" id="accordionmenuid_arrow" style="cursor: pointer;"></span>
+ <a title="brApp" class="header opened" style="padding-left: 10px; cursor: pointer;">Container</a>
+ <ul>
+ <li nodeid="brAppSiteMenuID" class="" style="display: list-item;">
+ <a ui-sref=".tree" ui-sref-active="link_active" class="" style="padding-left: 62px;">Tree</a>
+ </li>
+ <li nodeid="brAppMeMenuID" style="display: list-item;">
+ <a ui-sref=".accordion" ui-sref-active="link_active" style="padding-left: 62px;">Accordian</a>
+ </li>
+ <li nodeid="brAppTpMenuID" style="display: list-item;">
+ <a ui-sref=".tabs" ui-sref-active="link_active" style="padding-left: 62px;">Tabs</a>
+ </li>
+ <li nodeid="brAppTlMenuID" style="display: list-item;">
+ <a ui-sref=".vtabs" ui-sref-active="link_active" style="padding-left: 62px;">Vertical Tab</a>
+ </li>
+ <li nodeid="brAppTlMenuID" style="display: list-item;">
+ <a ui-sref=".table" ui-sref-active="link_active" style="padding-left: 62px;">Table</a>
+ </li>
+ </ul>
+ <a title="brApp" class="header opened" style="padding-left: 10px; cursor: pointer;">Widgets</a>
+ <ul>
+ <li nodeid="brAppSiteMenuID" class="" style="display: list-item;">
+ <a ui-sref=".buttons" ui-sref-active="link_active" style="padding-left: 62px;">Buttons</a>
+ </li>
+ <li nodeid="brAppMeMenuID" style="display: list-item;">
+ <a ui-sref=".dropdown" ui-sref-active="link_active" style="padding-left: 62px;">Drop Down</a>
+ </li>
+ <li nodeid="brAppTpMenuID" style="display: list-item;">
+ <a ui-sref=".radiobuttons" ui-sref-active="link_active" style="padding-left: 62px;">Radio Button</a>
+ </li>
+ <li nodeid="brAppTlMenuID" style="display: list-item;">
+ <a ui-sref=".checkboxes" ui-sref-active="link_active" style="padding-left: 62px;">Check Box</a>
+ </li>
+ <li nodeid="brAppTlMenuID" style="display: list-item;">
+ <a ui-sref=".tooltip" ui-sref-active="link_active" style="padding-left: 62px;">Tool Tip</a>
+ </li>
+ <li nodeid="brAppTlMenuID" style="display: list-item;">
+ <a ui-sref=".list" ui-sref-active="link_active" style="padding-left: 62px;">List</a>
+ </li>
+ </li>
+
+ </ul>
+ <a ui-sref=".notification" ui-sref-active="link_active" class="header opened" style="padding-left: 10px; cursor: pointer;">Notification & Messages</a>
+ <a ui-sref=".functional" ui-sref-active="link_active" class="header opened" style="padding-left: 10px; cursor: pointer;">Functional Flow</a>
+
+ </li>
+ </ul>
+ </div>-->
+ </div>
+ <div id="rightContainer" class="">
+ <!--<div id="sampleArea"></div>-->
+ <ui-view></ui-view>
+ </div>
+ </div>
+ </div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/framework/browser/templates/list.html b/common/src/main/webapp/framework/browser/templates/list.html
new file mode 100644
index 0000000..ede8b83
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/templates/list.html
@@ -0,0 +1,47 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<div class="container col-sm-12 col-md-12 col-lg-12">
+ <h4>{{message}}</h4>
+
+ <div id="listArea" class="container col-sm-12 col-md-12 col-lg-12" ng-init="init()">
+ <div id="list1" class="list col-sm-4 col-md-4 col-lg-4">
+ <div ng-repeat="item in mainlistItem">
+ <button type="button" class="btn btn-primary btn-block" ng-click="loadSubMenuPage($index)">{{item.title}}</button>
+ </div>
+ </div>
+ <div id="list2" class="list col-sm-4 col-md-4 col-lg-4">
+ <div ng-repeat="subitem in subMenuListItem">
+ <button type="button" class="btn btn-primary btn-block" ng-click="loadSubSubMenuPage($index)">{{subitem.title}}</button>
+ </div>
+ </div>
+ <div id="list3" class="list col-sm-4 col-md-4 col-lg-4">
+ <div ng-repeat="subsubitem in subsubMenuListItem">
+ <button type="button" class="btn btn-primary btn-block">{{subsubitem.title}}</button>
+ </div>
+ </div>
+
+ </div>
+
+ <!-- <test method='parentClick()'></test>-->
+ <div class="col-sm-12 col-md-12 col-lg-12 shortnote">
+ <div class="shortnoteHeader">ShortNote</div>
+ <div class="shortnoteText">{{listTipData}}</div>
+ </div>
+</div>
+
diff --git a/common/src/main/webapp/framework/browser/templates/login.html b/common/src/main/webapp/framework/browser/templates/login.html
new file mode 100644
index 0000000..3b058c8
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/templates/login.html
@@ -0,0 +1,40 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<div class="col-sm-offset-3 col-sm-6 col-md-offset-3 col-md-6 col-lg-offset-4 col-lg-4">
+ <h3>Login</h3>
+
+ <form ng-submit="formSubmit()" class="form">
+ <div class="col-sm-12 col-md-12 col-lg-12">
+ <div class="form-group">
+ <input type="text" class="form-control" ng-model="user.username" placeholder="username" required=""/>
+ </div>
+
+ <div class="form-group">
+ <input type="password" class="form-control" ng-model="user.password" placeholder="password" required=""/>
+ </div>
+
+ <div class="form-group">
+ <button type="submit" class="btn btn-success">Login</button>
+ <span class="text-danger">{{ error }}</span>
+ </div>
+ <a ui-sref="register">Register</a>
+
+ </div>
+ </form>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/framework/browser/templates/management.html b/common/src/main/webapp/framework/browser/templates/management.html
new file mode 100644
index 0000000..d6fbcb2
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/templates/management.html
@@ -0,0 +1,130 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<h4>{{message}}</h4>
+<br><br>
+<div id="provinceAction" ng-init="init()">
+ <!--<button ng-click="showAddModal()" class="btnDefault pull-left">Add</button>-->
+ <!--<button ng-click="deleteData()" class="btnDefault pull-left prvdel">Delete Selected</button>-->
+</div>
+<br>
+<br>
+<!--<table id="provinceTable" class="table table-bordered table-striped">
+ <tr>
+ <th class="chkboxAlign"><input type="checkbox" ng-model="selectAll" ng-click="checkAll()" /></th>
+ <th>Province Name</th>
+ <th>IP Address</th>
+ <th>Port</th>
+ <th></th>
+ </tr>
+ <tr ng-repeat="data in provinceData">
+ <td>
+ <input type="checkbox" ng-model="data.select">&lt;!&ndash;ng-true-value="'data.id'" ng-false-value="''" ng-model="province.rows[$index]"&ndash;&gt;
+ </td>
+ <td class="tableAlign">{{data.province_name}}</td>
+ <td class="tableAlign">{{data.ip}}</td>
+ <td class="tableAlign">{{data.port}}</td>
+ <td>
+ <span class="pull-right glyphicon glyphicon-edit" ng-click="editData(data.id)" style="cursor: pointer;margin: 0 5px"></span>
+ <span class="pull-right glyphicon glyphicon-trash" ng-click="editData(data.id)" style="cursor: pointer;margin: 0 5px"></span>
+ </td>
+ </tr>
+</table>-->
+
+<table ng-table="tableParams" class="table table-bordered table-striped customtable" show-filter="true">
+ <tr ng-repeat="provinceData in $data">
+ <td header="'ng-table/headers/checkbox.html'">
+ <input type="checkbox" ng-model="checkboxes.items[provinceData.id]" />
+ </td>
+ <td title="'Name'" filter="{ province_name: 'text'}" sortable="'province_name'">
+ {{provinceData.province_name}}
+ </td>
+ <td title="'IP Address'" filter="{ ip: 'text'}" sortable="'ip'">
+ {{provinceData.ip}}
+ </td>
+ <td title="'Port'" filter="{ port: 'number'}" sortable="'port'">
+ {{provinceData.port}}
+ </td>
+ <td title="'Action'">
+ <span class="pull-right glyphicon glyphicon-edit" ng-click="editData(provinceData.id)" style="cursor: pointer;margin: 0 5px"></span>
+ <span class="pull-right glyphicon glyphicon-trash" ng-click="deleteIndividualData(provinceData.id)" style="cursor: pointer;margin: 0 5px"></span>
+ </td>
+ </tr>
+</table>
+
+
+<script type="text/ng-template" id="ng-table/headers/checkbox.html">
+ <input type="checkbox" ng-model="checkboxes.checked" name="filter-checkbox" value="" />
+</script>
+
+<div id="myTable"></div>
+
+
+<!-- Modal -->
+<div id="myModal" class="modal fade" role="dialog">
+ <div class="modal-dialog">
+
+ <!-- Modal content-->
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">&times;</button>
+ <h5 class="modal-title titlestyle">Modal Header</h5>
+ </div>
+ <form name="provinceForm" method="post"><!-- ng-submit="saveData(province.id)"-->
+ <div class="modal-body">
+
+ <div class="form-group row">
+ <label class="col-xs-4 col-form-label labelstyle">Name</label>
+ <div class="col-xs-8 provinceName" >
+ <!--<input class="form-control" ng-model="province.province_name" type="text" value="" placeholder="Province Name" id="pname" required><br>-->
+ </div>
+ </div>
+ <div class="form-group row">
+ <label class="col-xs-4 col-form-label labelstyle">IP Address</label>
+ <div class="col-xs-8 ipAddress" >
+ <!--<input class="form-control" ng-model="province.ip" type="ipv4" pattern="((^|\.)((25[0-5])|(2[0-4]\d)|(1\d\d)|([1-9]?\d))){4}$" value="" placeholder="IP Address" id="ipaddress" required><br>-->
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="port" class="col-xs-4 col-form-label labelstyle">Port</label>
+ <div class="col-xs-8 port" >
+ <!--<input class="form-control" ng-model="province.port" type="number" value="" placeholder="Port" id="port" required>-->
+
+ </div>
+ </div>
+
+ <!--<input type="submit" class="btn btn-default" value="validate"/>-->
+
+ </div>
+
+ <div id="footerBtns" class="modal-footer">
+ <!--<button type="button" class="btn btn-default" ng-click="addData(province._id)" data-dismiss="modal" ng-disabled="provinceForm.$invalid">OK</button>-->
+ <!--<input type="submit" class="btn btn-default" value="Submit"/>-->
+ <!--<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>-->
+ </div>
+ </form>
+ </div>
+
+
+ </div>
+</div>
+
+<div class="shortnote">
+ <div class="shortnoteHeader">ShortNote</div>
+ <div class="shortnoteText"> {{provinceTipData}}</div>
+</div>
diff --git a/common/src/main/webapp/framework/browser/templates/notification.html b/common/src/main/webapp/framework/browser/templates/notification.html
new file mode 100644
index 0000000..b39907c
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/templates/notification.html
@@ -0,0 +1,30 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<h4>{{message}}</h4>
+
+<div id="notificationArea" ng-init="init()">
+ <button type="button" class="btn btn-default" ng-click="showError()">Error</button>
+ <button type="button" class="btn btn-default" ng-click="showWarning()">Warning</button>
+ <button type="button" class="btn btn-default" ng-click="showInfo()">Information</button>
+ <button type="button" class="btn btn-default" ng-click="showConfirm()">Confirm</button>
+ <div class="shortnote">
+ <div class="shortnoteHeader">ShortNote</div>
+ <div class="shortnoteText">{{notificationTipData}}</div>
+ </div>
+</div>
diff --git a/common/src/main/webapp/framework/browser/templates/radioButtons.html b/common/src/main/webapp/framework/browser/templates/radioButtons.html
new file mode 100644
index 0000000..ce87d2e
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/templates/radioButtons.html
@@ -0,0 +1,28 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+
+<h4>Radio Buttons</h4>
+
+<div id="radioBtnArea" ng-init="init()"></div>
+<div class="shortnote">
+ <div class="shortnoteHeader">ShortNote</div>
+ <div class="shortnoteText">{{radioTipData}}</div>
+</div>
+
+
diff --git a/common/src/main/webapp/framework/browser/templates/register.html b/common/src/main/webapp/framework/browser/templates/register.html
new file mode 100644
index 0000000..1e92385
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/templates/register.html
@@ -0,0 +1,47 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<div class="col-sm-offset-3 col-sm-6 col-md-offset-3 col-md-6 col-lg-offset-4 col-lg-4">
+ <h3>Register</h3>
+
+ <form ng-submit="formSubmit()" class="form">
+ <div class="col-sm-12 col-md-12 col-lg-12">
+ <div class="form-group">
+ <input type="text" class="form-control" ng-model="user.username" placeholder="Username" required=""/>
+ </div>
+
+ <div class="form-group">
+ <input type="email" class="form-control" ng-model="user.email" placeholder="Email" required=""/>
+ </div>
+
+ <div class="form-group">
+ <input type="password" class="form-control" ng-model="user.password" placeholder="Password" required=""/>
+ </div>
+
+ <div class="form-group">
+ <input type="password" class="form-control" ng-model="user.confpassword" placeholder="Confirm password" required=""/>
+ </div>
+
+ <div class="form-group">
+ <button type="submit" class="btn btn-success">Register</button>
+ </div>
+ <a ui-sref="login">Login</a>
+
+ </div>
+ </form>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/framework/browser/templates/table.html b/common/src/main/webapp/framework/browser/templates/table.html
new file mode 100644
index 0000000..603c13a
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/templates/table.html
@@ -0,0 +1,39 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<div class="container col-sm-12 col-md-12 col-lg-12">
+ <h4>{{message}}</h4>
+
+ <div id="tableArea" class="container col-sm-12 col-md-12 col-lg-12" ng-init="init()">
+ <h3 class="col-sm-12 col-md-12 col-lg-12">Basic Table<span> (with hover)</span></h3>
+ <div id="basictableArea" class="col-sm-12 col-md-12 col-lg-12"></div>
+
+ <h3 class="col-sm-12 col-md-12 col-lg-12">Stripped Table<span> (Condensed & with border)</span></h3>
+ <div id="strippedtableArea" class="col-sm-12 col-md-12 col-lg-12"></div>
+
+ <h3 class="col-sm-12 col-md-12 col-lg-12">Search Table</h3>
+ <div id="condensedtableArea" class="col-sm-12 col-md-12 col-lg-12"></div>
+
+
+
+ </div>
+ <div class="col-sm-12 col-md-12 col-lg-12 shortnote">
+ <div class="shortnoteHeader">ShortNote</div>
+ <div class="shortnoteText">{{tableTipData}}</div>
+ </div>
+</div>
diff --git a/common/src/main/webapp/framework/browser/templates/tabs.html b/common/src/main/webapp/framework/browser/templates/tabs.html
new file mode 100644
index 0000000..d2527da
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/templates/tabs.html
@@ -0,0 +1,27 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<div class="container col-sm-12 col-md-12 col-lg-12">
+ <h4>{{message}}</h4>
+ <div id="tabArea" ng-init="init()"></div>
+
+ <div class="col-sm-12 col-md-12 col-lg-12 shortnote">
+ <div class="shortnoteHeader">ShortNote</div>
+ <div class="shortnoteText">{{tabTipData}}</div>
+ </div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/framework/browser/templates/textarea.html b/common/src/main/webapp/framework/browser/templates/textarea.html
new file mode 100644
index 0000000..6f263f9
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/templates/textarea.html
@@ -0,0 +1,121 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<h4>Text Area</h4>
+<body>
+<div name="myForm" method="post">
+ <div class="form-group row">
+ <label for="fname" class="col-xs-2 col-form-label labelstyle">Text</label>
+ <div class="col-xs-10">
+ <div id="fname"></div>
+
+ </div>
+ </div>
+
+ <div class="form-group row">
+ <label for="email" class="col-xs-2 col-form-label labelstyle">Email</label>
+ <div class="col-xs-10">
+ <div id="email" ></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="url" class="col-xs-2 col-form-label labelstyle">URL</label>
+ <div class="col-xs-10">
+ <div id="url"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="password" class="col-xs-2 col-form-label labelstyle">Password</label>
+ <div class="col-xs-10">
+ <div id="password"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="numeric" class="col-xs-2 col-form-label labelstyle">Numeric</label>
+ <div class="col-xs-10">
+ <div id="numeric"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="dot" class="col-xs-2 col-form-label labelstyle">Date and time</label>
+ <div class="col-xs-10">
+ <div id="dot"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="dateinput" class="col-xs-2 col-form-label labelstyle">Date</label>
+ <div class="col-xs-10">
+ <div id="dateinput"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="monthinput" class="col-xs-2 col-form-label labelstyle">Month</label>
+ <div class="col-xs-10">
+ <div id="monthinput"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="weekinput" class="col-xs-2 col-form-label labelstyle">Week</label>
+ <div class="col-xs-10">
+ <div id="weekinput"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="timeinput" class="col-xs-2 col-form-label labelstyle">Time</label>
+ <div class="col-xs-10">
+ <div id="timeinput"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="ipv4" class="col-xs-2 col-form-label labelstyle">IPV4 Address</label>
+ <div class="col-xs-10">
+ <div id="ipv4"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="ipv6" class="col-xs-2 col-form-label labelstyle">IPV6 Address</label>
+ <div class="col-xs-10">
+ <div id="ipv6"></div>
+ </div>
+ </div>
+
+
+ <div class="form-group row">
+ <label for="textarea" class="col-xs-2 col-form-label labelstyle">Text Area</label>
+ <div class="col-xs-10">
+ <div id="textarea"></div>
+
+ </div>
+ </div>
+
+ <div class="form-group row">
+ <label for="note" class="col-xs-2 col-form-label labelstyle">Note</label>
+ <div class="col-xs-10">
+ <div id="note">
+ </div>
+
+ </div>
+ </div>
+
+</div>
+<div class="shortnote">
+ <div class="shortnoteHeader">ShortNote</div>
+ <div class="shortnoteText">{{toolTipData}}</div>
+</div>
+</body>
+
diff --git a/common/src/main/webapp/framework/browser/templates/tree.html b/common/src/main/webapp/framework/browser/templates/tree.html
new file mode 100644
index 0000000..47cb195
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/templates/tree.html
@@ -0,0 +1,25 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<h4>{{message}}</h4>
+<div id="tree1" class="ztree" ng-init="init()"></div><!-- ng-if="treeLoaded()"-->
+
+<div class="shortnote">
+ <div class="shortnoteHeader">ShortNote</div>
+ <div class="shortnoteText">{{treeTip}}</div>
+</div>
diff --git a/common/src/main/webapp/framework/browser/templates/verticalTab.html b/common/src/main/webapp/framework/browser/templates/verticalTab.html
new file mode 100644
index 0000000..41c6b71
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/templates/verticalTab.html
@@ -0,0 +1,28 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<div class="container col-sm-12 col-md-12 col-lg-12">
+ <h4>{{message}}</h4>
+
+ <div id="vtabArea" class="col-sm-12 col-md-12 col-lg-12" ng-init="init()"></div>
+
+ <div class="col-sm-12 col-md-12 col-lg-12 shortnote">
+ <div class="shortnoteHeader">ShortNote</div>
+ <div class="shortnoteText">{{vtabTipdata}}</div>
+ </div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/framework/browser/thirdparty/License.txt b/common/src/main/webapp/framework/browser/thirdparty/License.txt
new file mode 100644
index 0000000..8e698ec
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/License.txt
@@ -0,0 +1,362 @@
+THIS LICENSE FILE CONTAINS THE LICENSE APPLICABLE DEPENDING ON THE TYPE OF CONTRIBUTIONS.
+
+APACHE LICENSE 2 IS APPLICABLE FOR SOURCE CODE, CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL FOR DOCUMENTATION
+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+
+Apache License Version 2.0, January 2004 http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License.
+
+Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License.
+
+Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution.
+
+You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+You must give any other recipients of the Work or Derivative Works a copy of this License; and You must cause any modified files to carry prominent notices stating that You changed the files; and You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions.
+
+Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks.
+
+This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+
+Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability.
+
+In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+
+While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+Attribution 4.0 International
+
+https://creativecommons.org/licenses/by/4.0/legalcode
+
+Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an "as-is" basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
+
+Using Creative Commons Public Licenses
+
+Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
+
+ Considerations for licensors: Our public licenses are
+ intended for use by those authorized to give the public
+ permission to use material in ways otherwise restricted by
+ copyright and certain other rights. Our licenses are
+ irrevocable. Licensors should read and understand the terms
+ and conditions of the license they choose before applying it.
+ Licensors should also secure all rights necessary before
+ applying our licenses so that the public can reuse the
+ material as expected. Licensors should clearly mark any
+ material not subject to the license. This includes other CC-
+ licensed material, or material used under an exception or
+ limitation to copyright. More considerations for licensors:
+ wiki.creativecommons.org/Considerations_for_licensors
+ Considerations for the public: By using one of our public
+ licenses, a licensor grants the public permission to use the
+ licensed material under specified terms and conditions. If
+ the licensor's permission is not necessary for any reason--for
+ example, because of any applicable exception or limitation to
+ copyright--then that use is not regulated by the license. Our
+ licenses grant only permissions under copyright and certain
+ other rights that a licensor has authority to grant. Use of
+ the licensed material may still be restricted for other
+ reasons, including because others have copyright or other
+ rights in the material. A licensor may make special requests,
+ such as asking that all changes be marked or described.
+ Although not required by our licenses, you are encouraged to
+ respect those requests where reasonable. More_considerations
+ for the public:
+ wiki.creativecommons.org/Considerations_for_licensees
+Creative Commons Attribution 4.0 International Public License
+
+By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
+
+
+Section 1 -- Definitions.
+
+ a. Adapted Material means material subject to Copyright and Similar
+ Rights that is derived from or based upon the Licensed Material
+ and in which the Licensed Material is translated, altered,
+ arranged, transformed, or otherwise modified in a manner requiring
+ permission under the Copyright and Similar Rights held by the
+ Licensor. For purposes of this Public License, where the Licensed
+ Material is a musical work, performance, or sound recording,
+ Adapted Material is always produced where the Licensed Material is
+ synched in timed relation with a moving image.
+ b. Adapter's License means the license You apply to Your Copyright
+ and Similar Rights in Your contributions to Adapted Material in
+ accordance with the terms and conditions of this Public License.
+ c. Copyright and Similar Rights means copyright and/or similar rights
+ closely related to copyright including, without limitation,
+ performance, broadcast, sound recording, and Sui Generis Database
+ Rights, without regard to how the rights are labeled or
+ categorized. For purposes of this Public License, the rights
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
+ Rights.
+ d. Effective Technological Measures means those measures that, in the
+ absence of proper authority, may not be circumvented under laws
+ fulfilling obligations under Article 11 of the WIPO Copyright
+ Treaty adopted on December 20, 1996, and/or similar international
+ agreements.
+ e. Exceptions and Limitations means fair use, fair dealing, and/or
+ any other exception or limitation to Copyright and Similar Rights
+ that applies to Your use of the Licensed Material.
+ f. Licensed Material means the artistic or literary work, database,
+ or other material to which the Licensor applied this Public
+ License.
+ g. Licensed Rights means the rights granted to You subject to the
+ terms and conditions of this Public License, which are limited to
+ all Copyright and Similar Rights that apply to Your use of the
+ Licensed Material and that the Licensor has authority to license.
+ h. Licensor means the individual(s) or entity(ies) granting rights
+ under this Public License.
+ i. Share means to provide material to the public by any means or
+ process that requires permission under the Licensed Rights, such
+ as reproduction, public display, public performance, distribution,
+ dissemination, communication, or importation, and to make material
+ available to the public including in ways that members of the
+ public may access the material from a place and at a time
+ individually chosen by them.
+ j. Sui Generis Database Rights means rights other than copyright
+ resulting from Directive 96/9/EC of the European Parliament and of
+ the Council of 11 March 1996 on the legal protection of databases,
+ as amended and/or succeeded, as well as other essentially
+ equivalent rights anywhere in the world.
+ k. You means the individual or entity exercising the Licensed Rights
+ under this Public License. Your has a corresponding meaning.
+
+Section 2 -- Scope.
+
+ a. License grant.
+ 1. Subject to the terms and conditions of this Public License,
+ the Licensor hereby grants You a worldwide, royalty-free,
+ non-sublicensable, non-exclusive, irrevocable license to
+ exercise the Licensed Rights in the Licensed Material to:
+ a. reproduce and Share the Licensed Material, in whole or
+ in part; and
+ b. produce, reproduce, and Share Adapted Material.
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
+ Exceptions and Limitations apply to Your use, this Public
+ License does not apply, and You do not need to comply with
+ its terms and conditions.
+ 3. Term. The term of this Public License is specified in Section
+ 6(a).
+ 4. Media and formats; technical modifications allowed. The
+ Licensor authorizes You to exercise the Licensed Rights in
+ all media and formats whether now known or hereafter created,
+ and to make technical modifications necessary to do so. The
+ Licensor waives and/or agrees not to assert any right or
+ authority to forbid You from making technical modifications
+ necessary to exercise the Licensed Rights, including
+ technical modifications necessary to circumvent Effective
+ Technological Measures. For purposes of this Public License,
+ simply making modifications authorized by this Section 2(a)
+ (4) never produces Adapted Material.
+ 5. Downstream recipients.
+ a. Offer from the Licensor -- Licensed Material. Every
+ recipient of the Licensed Material automatically
+ receives an offer from the Licensor to exercise the
+ Licensed Rights under the terms and conditions of this
+ Public License.
+ b. No downstream restrictions. You may not offer or impose
+ any additional or different terms or conditions on, or
+ apply any Effective Technological Measures to, the
+ Licensed Material if doing so restricts exercise of the
+ Licensed Rights by any recipient of the Licensed
+ Material.
+ 6. No endorsement. Nothing in this Public License constitutes or
+ may be construed as permission to assert or imply that You
+ are, or that Your use of the Licensed Material is, connected
+ with, or sponsored, endorsed, or granted official status by,
+ the Licensor or others designated to receive attribution as
+ provided in Section 3(a)(1)(A)(i).
+ b. Other rights.
+ 1. Moral rights, such as the right of integrity, are not
+ licensed under this Public License, nor are publicity,
+ privacy, and/or other similar personality rights; however, to
+ the extent possible, the Licensor waives and/or agrees not to
+ assert any such rights held by the Licensor to the limited
+ extent necessary to allow You to exercise the Licensed
+ Rights, but not otherwise.
+ 2. Patent and trademark rights are not licensed under this
+ Public License.
+ 3. To the extent possible, the Licensor waives any right to
+ collect royalties from You for the exercise of the Licensed
+ Rights, whether directly or through a collecting society
+ under any voluntary or waivable statutory or compulsory
+ licensing scheme. In all other cases the Licensor expressly
+ reserves any right to collect such royalties.
+
+Section 3 -- License Conditions.
+
+Your exercise of the Licensed Rights is expressly made subject to the following conditions.
+
+ a. Attribution.
+ 1. If You Share the Licensed Material (including in modified
+ form), You must:
+ a. retain the following if it is supplied by the Licensor
+ with the Licensed Material:
+ i. identification of the creator(s) of the Licensed
+ Material and any others designated to receive
+ attribution, in any reasonable manner requested by
+ the Licensor (including by pseudonym if
+ designated);
+ ii. a copyright notice;
+ iii. a notice that refers to this Public License;
+ iv. a notice that refers to the disclaimer of
+ warranties;
+ v. a URI or hyperlink to the Licensed Material to the
+ extent reasonably practicable;
+ b. indicate if You modified the Licensed Material and
+ retain an indication of any previous modifications; and
+ c. indicate the Licensed Material is licensed under this
+ Public License, and include the text of, or the URI or
+ hyperlink to, this Public License.
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
+ reasonable manner based on the medium, means, and context in
+ which You Share the Licensed Material. For example, it may be
+ reasonable to satisfy the conditions by providing a URI or
+ hyperlink to a resource that includes the required
+ information.
+ 3. If requested by the Licensor, You must remove any of the
+ information required by Section 3(a)(1)(A) to the extent
+ reasonably practicable.
+ 4. If You Share Adapted Material You produce, the Adapter's
+ License You apply must not prevent recipients of the Adapted
+ Material from complying with this Public License.
+
+Section 4 -- Sui Generis Database Rights.
+
+Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
+
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
+ to extract, reuse, reproduce, and Share all or a substantial
+ portion of the contents of the database;
+ b. if You include all or a substantial portion of the database
+ contents in a database in which You have Sui Generis Database
+ Rights, then the database in which You have Sui Generis Database
+ Rights (but not its individual contents) is Adapted Material; and
+ c. You must comply with the conditions in Section 3(a) if You Share
+ all or a substantial portion of the contents of the database.
+For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
+
+
+Section 5 -- Disclaimer of Warranties and Limitation of Liability.
+
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
+ c. The disclaimer of warranties and limitation of liability provided
+ above shall be interpreted in a manner that, to the extent
+ possible, most closely approximates an absolute disclaimer and
+ waiver of all liability.
+
+Section 6 -- Term and Termination.
+
+ a. This Public License applies for the term of the Copyright and
+ Similar Rights licensed here. However, if You fail to comply with
+ this Public License, then Your rights under this Public License
+ terminate automatically.
+ b. Where Your right to use the Licensed Material has terminated under
+ Section 6(a), it reinstates:
+ 1. automatically as of the date the violation is cured, provided
+ it is cured within 30 days of Your discovery of the
+ violation; or
+ 2. upon express reinstatement by the Licensor.
+ For the avoidance of doubt, this Section 6(b) does not affect any
+ right the Licensor may have to seek remedies for Your violations
+ of this Public License.
+ c. For the avoidance of doubt, the Licensor may also offer the
+ Licensed Material under separate terms or conditions or stop
+ distributing the Licensed Material at any time; however, doing so
+ will not terminate this Public License.
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
+ License.
+
+Section 7 -- Other Terms and Conditions.
+
+ a. The Licensor shall not be bound by any additional or different
+ terms or conditions communicated by You unless expressly agreed.
+ b. Any arrangements, understandings, or agreements regarding the
+ Licensed Material not stated herein are separate from and
+ independent of the terms and conditions of this Public License.
+
+Section 8 -- Interpretation.
+
+ a. For the avoidance of doubt, this Public License does not, and
+ shall not be interpreted to, reduce, limit, restrict, or impose
+ conditions on any use of the Licensed Material that could lawfully
+ be made without permission under this Public License.
+ b. To the extent possible, if any provision of this Public License is
+ deemed unenforceable, it shall be automatically reformed to the
+ minimum extent necessary to make it enforceable. If the provision
+ cannot be reformed, it shall be severed from this Public License
+ without affecting the enforceability of the remaining terms and
+ conditions.
+ c. No term or condition of this Public License will be waived and no
+ failure to comply consented to unless expressly agreed to by the
+ Licensor.
+ d. Nothing in this Public License constitutes or may be interpreted
+ as a limitation upon, or waiver of, any privileges and immunities
+ that apply to the Licensor or You, including from the legal
+ processes of any jurisdiction or authority.
+Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the "Licensor." The text of the Creative Commons public licenses is dedicated to the public domain under the CC0 Public Domain Dedication. Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
+
+Creative Commons may be contacted at creativecommons.org. \ No newline at end of file
diff --git a/common/src/main/webapp/framework/browser/thirdparty/css/bootstrap.min.css b/common/src/main/webapp/framework/browser/thirdparty/css/bootstrap.min.css
new file mode 100644
index 0000000..2574229
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/css/bootstrap.min.css
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap v3.1.1 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+/*! normalize.css v3.0.0 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}@media print{*{text-shadow:none!important;color:#000!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#999}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-muted{color:#999}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#999}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}blockquote:before,blockquote:after{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;white-space:nowrap;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:0}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:0}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:0}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:0}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:0}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:0}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:0}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:0}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{max-width:100%;background-color:transparent}th{text-align:left}.table{width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#F5F5F5}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{position:static;float:none;display:table-column}table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}@media (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd;-webkit-overflow-scrolling:touch}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}input[type=date]{line-height:34px}.form-group{margin-bottom:15px}.radio,.checkbox{display:block;min-height:20px;margin-top:10px;margin-bottom:10px;padding-left:20px}.radio label,.checkbox label{display:inline;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{float:left;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],.radio[disabled],.radio-inline[disabled],.checkbox[disabled],.checkbox-inline[disabled],fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox],fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}textarea.input-lg,select[multiple].input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.has-feedback .form-control-feedback{position:absolute;top:25px;right:0;display:block;width:34px;height:34px;line-height:34px;text-align:center}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.form-control-static{margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{float:none;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.form-horizontal .form-control-static{padding-top:7px}@media (min-width:768px){.form-horizontal .control-label{text-align:right}}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#999;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#428bca}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#999}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}[data-toggle=buttons]>.btn>input[type=radio],[data-toggle=buttons]>.btn>input[type=checkbox]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#999;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{max-height:340px;overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-left:0;padding-right:0}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{margin-left:-15px;margin-right:-15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin-top:8px;margin-bottom:8px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{float:none;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{background-color:#e7e7e7;color:#555}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a{color:#999}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{background-color:#080808;color:#fff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#999}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.42857143;text-decoration:none;color:#428bca;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca;cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#999;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:20px 0;list-style:none;text-align:center}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;background-color:#fff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.label[href]:hover,.label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#999}.label-default[href]:hover,.label-default[href]:focus{background-color:gray}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;color:#fff;line-height:1;vertical-align:baseline;white-space:nowrap;text-align:center;background-color:#999;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-left:60px;padding-right:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-left:auto;margin-right:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{text-decoration:none;background-color:#f5f5f5}a.list-group-item.active,a.list-group-item.active:hover,a.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}a.list-group-item.active .list-group-item-heading,a.list-group-item.active:hover .list-group-item-heading,a.list-group-item.active:focus .list-group-item-heading{color:inherit}a.list-group-item.active .list-group-item-text,a.list-group-item.active:hover .list-group-item-text,a.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px;overflow:hidden}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse .panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#428bca}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#d6e9c6}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#bce8f1}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#faebcc}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#ebccd1}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ebccd1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:auto;overflow-y:scroll;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.42857143px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:20px}.modal-footer{margin-top:15px;padding:19px 20px 20px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:12px;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;right:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-control.left{background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.5) 0),color-stop(rgba(0,0,0,.0001) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.0001) 0),color-stop(rgba(0,0,0,.5) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:hover,.carousel-control:focus{outline:0;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0)}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#fff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;margin-left:-15px;font-size:30px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{content:" ";display:table}.clearfix:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}}@media print{.hidden-print{display:none!important}} \ No newline at end of file
diff --git a/common/src/main/webapp/framework/browser/thirdparty/css/img/Thumbs.db b/common/src/main/webapp/framework/browser/thirdparty/css/img/Thumbs.db
new file mode 100644
index 0000000..7eb0d3d
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/css/img/Thumbs.db
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/1_close.png b/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/1_close.png
new file mode 100644
index 0000000..68ccb3c
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/1_close.png
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/1_open.png b/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/1_open.png
new file mode 100644
index 0000000..d6ff36d
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/1_open.png
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/2.png b/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/2.png
new file mode 100644
index 0000000..9eff506
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/2.png
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/3.png b/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/3.png
new file mode 100644
index 0000000..d7ba6d0
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/3.png
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/4.png b/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/4.png
new file mode 100644
index 0000000..753e2bf
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/4.png
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/5.png b/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/5.png
new file mode 100644
index 0000000..0c5eccd
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/5.png
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/6.png b/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/6.png
new file mode 100644
index 0000000..070b835
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/6.png
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/7.png b/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/7.png
new file mode 100644
index 0000000..532b037
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/7.png
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/8.png b/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/8.png
new file mode 100644
index 0000000..a8f3a86
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/8.png
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/9.png b/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/9.png
new file mode 100644
index 0000000..4db73cd
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/css/img/diy/9.png
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/css/img/line_conn.gif b/common/src/main/webapp/framework/browser/thirdparty/css/img/line_conn.gif
new file mode 100644
index 0000000..d561d36
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/css/img/line_conn.gif
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/css/img/loading.gif b/common/src/main/webapp/framework/browser/thirdparty/css/img/loading.gif
new file mode 100644
index 0000000..e8c2892
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/css/img/loading.gif
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/css/img/zTreeStandard.gif b/common/src/main/webapp/framework/browser/thirdparty/css/img/zTreeStandard.gif
new file mode 100644
index 0000000..50c94fd
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/css/img/zTreeStandard.gif
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/css/img/zTreeStandard.png b/common/src/main/webapp/framework/browser/thirdparty/css/img/zTreeStandard.png
new file mode 100644
index 0000000..ffda01e
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/css/img/zTreeStandard.png
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/css/magic-check.css b/common/src/main/webapp/framework/browser/thirdparty/css/magic-check.css
new file mode 100644
index 0000000..4a4ccf7
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/css/magic-check.css
@@ -0,0 +1,123 @@
+@keyframes hover-color {
+ from {
+ border-color: #c0c0c0; }
+ to {
+ border-color: #3e97eb; } }
+
+.magic-radio,
+.magic-checkbox {
+ position: absolute;
+ display: none; }
+
+.magic-radio[disabled],
+.magic-checkbox[disabled] {
+ cursor: not-allowed; }
+
+.magic-radio + label,
+.magic-checkbox + label {
+ position: relative;
+ display: block;
+ padding-left: 30px;
+ cursor: pointer;
+ vertical-align: middle;
+ font-weight:normal;
+ text-align: left;}
+.magic-radio + label:hover:before,
+.magic-checkbox + label:hover:before {
+ animation-duration: 0.4s;
+ animation-fill-mode: both;
+ animation-name: hover-color; }
+.magic-radio + label:before,
+.magic-checkbox + label:before {
+ position: absolute;
+ top: 0;
+ left: 0;
+ display: inline-block;
+ width: 20px;
+ height: 20px;
+ content: '';
+ border: 1px solid #4ac9ff; }
+.magic-radio + label:after,
+.magic-checkbox + label:after {
+ position: absolute;
+ display: none;
+ content: ''; }
+
+.magic-radio[disabled] + label,
+.magic-checkbox[disabled] + label {
+ cursor: not-allowed;
+ color: #e4e4e4; }
+.magic-radio[disabled] + label:hover, .magic-radio[disabled] + label:before, .magic-radio[disabled] + label:after,
+.magic-checkbox[disabled] + label:hover,
+.magic-checkbox[disabled] + label:before,
+.magic-checkbox[disabled] + label:after {
+ cursor: not-allowed; }
+.magic-radio[disabled] + label:hover:before,
+.magic-checkbox[disabled] + label:hover:before {
+ border: 1px solid #e4e4e4;
+ animation-name: none; }
+.magic-radio[disabled] + label:before,
+.magic-checkbox[disabled] + label:before {
+ border-color: #e4e4e4; }
+
+.magic-radio:checked + label:before,
+.magic-checkbox:checked + label:before {
+ animation-name: none; }
+
+.magic-radio:checked + label:after,
+.magic-checkbox:checked + label:after {
+ display: block; }
+
+.magic-radio + label:before {
+ border-radius: 50%; }
+
+.magic-radio + label:after {
+ top: 6px;
+ left: 6px;
+ width: 8px;
+ height: 8px;
+ border-radius: 50%;
+ background: #3e97eb; }
+
+.magic-radio:checked + label:before {
+ border: 1px solid #3e97eb; }
+
+.magic-radio:checked[disabled] + label:before {
+ border: 1px solid #c9e2f9; }
+
+.magic-radio:checked[disabled] + label:after {
+ background: #c9e2f9; }
+
+.magic-checkbox + label:before {
+ border-radius: 3px; }
+
+.magic-checkbox + label:after {
+ top: 2px;
+ left: 7px;
+ box-sizing: border-box;
+ width: 6px;
+ height: 12px;
+ transform: rotate(45deg);
+ border-width: 2px;
+ border-style: solid;
+ border-color: #fff;
+ border-top: 0;
+ border-left: 0; }
+
+.magic-checkbox:checked + label:before {
+ border: #3e97eb;
+ background: #3e97eb; }
+
+.magic-checkbox:checked[disabled] + label:before {
+ border: #c9e2f9;
+ background: #c9e2f9; }
+
+.radio-toolbar label {
+ background:Red;
+ border:1px solid green;
+ padding:2px 10px;
+}
+
+.magic-radio:checked + label {
+ font-weight: bold;
+}
diff --git a/common/src/main/webapp/framework/browser/thirdparty/css/zTreeStyle.css b/common/src/main/webapp/framework/browser/thirdparty/css/zTreeStyle.css
new file mode 100644
index 0000000..4a1705b
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/css/zTreeStyle.css
@@ -0,0 +1,97 @@
+/*-------------------------------------
+zTree Style
+
+version: 3.5.19
+author: Hunter.z
+email: hunter.z@263.net
+website: http://code.google.com/p/jquerytree/
+
+-------------------------------------*/
+
+.ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif}
+.ztree {margin:0; padding:5px; color:#333}
+.ztree li{padding:0; margin:0; list-style:none; line-height:14px; text-align:left; white-space:nowrap; outline:0}
+.ztree li ul{ margin:0; padding:0 0 0 18px}
+.ztree li ul.line{ background:url(./img/line_conn.gif) 0 0 repeat-y;}
+
+.ztree li a {padding:1px 3px 0 0; margin:0; cursor:pointer; height:17px; color:#333; background-color: transparent;
+ text-decoration:none; vertical-align:top; display: inline-block}
+.ztree li a:hover {text-decoration:underline}
+.ztree li a.curSelectedNode {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;}
+.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;}
+.ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#316AC5; color:white; height:16px; border:1px #316AC5 solid;
+ opacity:0.8; filter:alpha(opacity=80)}
+.ztree li a.tmpTargetNode_prev {}
+.ztree li a.tmpTargetNode_next {}
+.ztree li a input.rename {height:14px; width:80px; padding:0; margin:0;
+ font-size:12px; border:1px #7EC4CC solid; *border:0px}
+.ztree li span {line-height:16px; margin-right:2px}
+.ztree li span.button {line-height:0; margin:0; width:16px; height:16px; display: inline-block; vertical-align:middle;
+ border:0 none; cursor: pointer;outline:none;
+ background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
+ background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")}
+
+.ztree li span.button.chk {width:13px; height:13px; margin:0 3px 0 0; cursor: auto}
+.ztree li span.button.chk.checkbox_false_full {background-position:0 0}
+.ztree li span.button.chk.checkbox_false_full_focus {background-position:0 -14px}
+.ztree li span.button.chk.checkbox_false_part {background-position:0 -28px}
+.ztree li span.button.chk.checkbox_false_part_focus {background-position:0 -42px}
+.ztree li span.button.chk.checkbox_false_disable {background-position:0 -56px}
+.ztree li span.button.chk.checkbox_true_full {background-position:-14px 0}
+.ztree li span.button.chk.checkbox_true_full_focus {background-position:-14px -14px}
+.ztree li span.button.chk.checkbox_true_part {background-position:-14px -28px}
+.ztree li span.button.chk.checkbox_true_part_focus {background-position:-14px -42px}
+.ztree li span.button.chk.checkbox_true_disable {background-position:-14px -56px}
+.ztree li span.button.chk.radio_false_full {background-position:-28px 0}
+.ztree li span.button.chk.radio_false_full_focus {background-position:-28px -14px}
+.ztree li span.button.chk.radio_false_part {background-position:-28px -28px}
+.ztree li span.button.chk.radio_false_part_focus {background-position:-28px -42px}
+.ztree li span.button.chk.radio_false_disable {background-position:-28px -56px}
+.ztree li span.button.chk.radio_true_full {background-position:-42px 0}
+.ztree li span.button.chk.radio_true_full_focus {background-position:-42px -14px}
+.ztree li span.button.chk.radio_true_part {background-position:-42px -28px}
+.ztree li span.button.chk.radio_true_part_focus {background-position:-42px -42px}
+.ztree li span.button.chk.radio_true_disable {background-position:-42px -56px}
+
+.ztree li span.button.switch {width:18px; height:18px}
+.ztree li span.button.root_open{background-position:-92px -54px}
+.ztree li span.button.root_close{background-position:-74px -54px}
+.ztree li span.button.roots_open{background-position:-92px 0}
+.ztree li span.button.roots_close{background-position:-74px 0}
+.ztree li span.button.center_open{background-position:-92px -18px}
+.ztree li span.button.center_close{background-position:-74px -18px}
+.ztree li span.button.bottom_open{background-position:-92px -36px}
+.ztree li span.button.bottom_close{background-position:-74px -36px}
+.ztree li span.button.noline_open{background-position:-92px -72px}
+.ztree li span.button.noline_close{background-position:-74px -72px}
+.ztree li span.button.root_docu{ background:none;}
+.ztree li span.button.roots_docu{background-position:-56px 0}
+.ztree li span.button.center_docu{background-position:-56px -18px}
+.ztree li span.button.bottom_docu{background-position:-56px -36px}
+.ztree li span.button.noline_docu{ background:none;}
+
+.ztree li span.button.ico_open{margin-right:2px; background-position:-110px -16px; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.ico_close{margin-right:2px; background-position:-110px 0; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.ico_docu{margin-right:2px; background-position:-110px -32px; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.edit {margin-right:2px; background-position:-110px -48px; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.remove {margin-right:2px; background-position:-110px -64px; vertical-align:top; *vertical-align:middle}
+
+.ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
+
+ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)}
+
+span.tmpzTreeMove_arrow {width:16px; height:16px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute;
+ background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
+ background-position:-110px -80px; background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")}
+
+ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)}
+.zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute}
+
+/* level style*/
+/*.ztree li span.button.level0 {
+ display:none;
+}
+.ztree li ul.level0 {
+ padding:0;
+ background:none;
+}*/ \ No newline at end of file
diff --git a/common/src/main/webapp/framework/browser/thirdparty/fonts/glyphicons-halflings-regular.eot b/common/src/main/webapp/framework/browser/thirdparty/fonts/glyphicons-halflings-regular.eot
new file mode 100644
index 0000000..b93a495
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/fonts/glyphicons-halflings-regular.eot
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/fonts/glyphicons-halflings-regular.svg b/common/src/main/webapp/framework/browser/thirdparty/fonts/glyphicons-halflings-regular.svg
new file mode 100644
index 0000000..94fb549
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/fonts/glyphicons-halflings-regular.svg
@@ -0,0 +1,288 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="glyphicons_halflingsregular" horiz-adv-x="1200" >
+<font-face units-per-em="1200" ascent="960" descent="-240" />
+<missing-glyph horiz-adv-x="500" />
+<glyph horiz-adv-x="0" />
+<glyph horiz-adv-x="400" />
+<glyph unicode=" " />
+<glyph unicode="*" d="M600 1100q15 0 34 -1.5t30 -3.5l11 -1q10 -2 17.5 -10.5t7.5 -18.5v-224l158 158q7 7 18 8t19 -6l106 -106q7 -8 6 -19t-8 -18l-158 -158h224q10 0 18.5 -7.5t10.5 -17.5q6 -41 6 -75q0 -15 -1.5 -34t-3.5 -30l-1 -11q-2 -10 -10.5 -17.5t-18.5 -7.5h-224l158 -158 q7 -7 8 -18t-6 -19l-106 -106q-8 -7 -19 -6t-18 8l-158 158v-224q0 -10 -7.5 -18.5t-17.5 -10.5q-41 -6 -75 -6q-15 0 -34 1.5t-30 3.5l-11 1q-10 2 -17.5 10.5t-7.5 18.5v224l-158 -158q-7 -7 -18 -8t-19 6l-106 106q-7 8 -6 19t8 18l158 158h-224q-10 0 -18.5 7.5 t-10.5 17.5q-6 41 -6 75q0 15 1.5 34t3.5 30l1 11q2 10 10.5 17.5t18.5 7.5h224l-158 158q-7 7 -8 18t6 19l106 106q8 7 19 6t18 -8l158 -158v224q0 10 7.5 18.5t17.5 10.5q41 6 75 6z" />
+<glyph unicode="+" d="M450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-350h350q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-350v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v350h-350q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5 h350v350q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xa0;" />
+<glyph unicode="&#xa5;" d="M825 1100h250q10 0 12.5 -5t-5.5 -13l-364 -364q-6 -6 -11 -18h268q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-100h275q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-174q0 -11 -7.5 -18.5t-18.5 -7.5h-148q-11 0 -18.5 7.5t-7.5 18.5v174 h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h125v100h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h118q-5 12 -11 18l-364 364q-8 8 -5.5 13t12.5 5h250q25 0 43 -18l164 -164q8 -8 18 -8t18 8l164 164q18 18 43 18z" />
+<glyph unicode="&#x2000;" horiz-adv-x="650" />
+<glyph unicode="&#x2001;" horiz-adv-x="1300" />
+<glyph unicode="&#x2002;" horiz-adv-x="650" />
+<glyph unicode="&#x2003;" horiz-adv-x="1300" />
+<glyph unicode="&#x2004;" horiz-adv-x="433" />
+<glyph unicode="&#x2005;" horiz-adv-x="325" />
+<glyph unicode="&#x2006;" horiz-adv-x="216" />
+<glyph unicode="&#x2007;" horiz-adv-x="216" />
+<glyph unicode="&#x2008;" horiz-adv-x="162" />
+<glyph unicode="&#x2009;" horiz-adv-x="260" />
+<glyph unicode="&#x200a;" horiz-adv-x="72" />
+<glyph unicode="&#x202f;" horiz-adv-x="260" />
+<glyph unicode="&#x205f;" horiz-adv-x="325" />
+<glyph unicode="&#x20ac;" d="M744 1198q242 0 354 -189q60 -104 66 -209h-181q0 45 -17.5 82.5t-43.5 61.5t-58 40.5t-60.5 24t-51.5 7.5q-19 0 -40.5 -5.5t-49.5 -20.5t-53 -38t-49 -62.5t-39 -89.5h379l-100 -100h-300q-6 -50 -6 -100h406l-100 -100h-300q9 -74 33 -132t52.5 -91t61.5 -54.5t59 -29 t47 -7.5q22 0 50.5 7.5t60.5 24.5t58 41t43.5 61t17.5 80h174q-30 -171 -128 -278q-107 -117 -274 -117q-206 0 -324 158q-36 48 -69 133t-45 204h-217l100 100h112q1 47 6 100h-218l100 100h134q20 87 51 153.5t62 103.5q117 141 297 141z" />
+<glyph unicode="&#x20bd;" d="M428 1200h350q67 0 120 -13t86 -31t57 -49.5t35 -56.5t17 -64.5t6.5 -60.5t0.5 -57v-16.5v-16.5q0 -36 -0.5 -57t-6.5 -61t-17 -65t-35 -57t-57 -50.5t-86 -31.5t-120 -13h-178l-2 -100h288q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-138v-175q0 -11 -5.5 -18 t-15.5 -7h-149q-10 0 -17.5 7.5t-7.5 17.5v175h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v100h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v475q0 10 7.5 17.5t17.5 7.5zM600 1000v-300h203q64 0 86.5 33t22.5 119q0 84 -22.5 116t-86.5 32h-203z" />
+<glyph unicode="&#x2212;" d="M250 700h800q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#x231b;" d="M1000 1200v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-50v-100q0 -91 -49.5 -165.5t-130.5 -109.5q81 -35 130.5 -109.5t49.5 -165.5v-150h50q21 0 35.5 -14.5t14.5 -35.5v-150h-800v150q0 21 14.5 35.5t35.5 14.5h50v150q0 91 49.5 165.5t130.5 109.5q-81 35 -130.5 109.5 t-49.5 165.5v100h-50q-21 0 -35.5 14.5t-14.5 35.5v150h800zM400 1000v-100q0 -60 32.5 -109.5t87.5 -73.5q28 -12 44 -37t16 -55t-16 -55t-44 -37q-55 -24 -87.5 -73.5t-32.5 -109.5v-150h400v150q0 60 -32.5 109.5t-87.5 73.5q-28 12 -44 37t-16 55t16 55t44 37 q55 24 87.5 73.5t32.5 109.5v100h-400z" />
+<glyph unicode="&#x25fc;" horiz-adv-x="500" d="M0 0z" />
+<glyph unicode="&#x2601;" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -206.5q0 -121 -85 -207.5t-205 -86.5h-750q-79 0 -135.5 57t-56.5 137q0 69 42.5 122.5t108.5 67.5q-2 12 -2 37q0 153 108 260.5t260 107.5z" />
+<glyph unicode="&#x26fa;" d="M774 1193.5q16 -9.5 20.5 -27t-5.5 -33.5l-136 -187l467 -746h30q20 0 35 -18.5t15 -39.5v-42h-1200v42q0 21 15 39.5t35 18.5h30l468 746l-135 183q-10 16 -5.5 34t20.5 28t34 5.5t28 -20.5l111 -148l112 150q9 16 27 20.5t34 -5zM600 200h377l-182 112l-195 534v-646z " />
+<glyph unicode="&#x2709;" d="M25 1100h1150q10 0 12.5 -5t-5.5 -13l-564 -567q-8 -8 -18 -8t-18 8l-564 567q-8 8 -5.5 13t12.5 5zM18 882l264 -264q8 -8 8 -18t-8 -18l-264 -264q-8 -8 -13 -5.5t-5 12.5v550q0 10 5 12.5t13 -5.5zM918 618l264 264q8 8 13 5.5t5 -12.5v-550q0 -10 -5 -12.5t-13 5.5 l-264 264q-8 8 -8 18t8 18zM818 482l364 -364q8 -8 5.5 -13t-12.5 -5h-1150q-10 0 -12.5 5t5.5 13l364 364q8 8 18 8t18 -8l164 -164q8 -8 18 -8t18 8l164 164q8 8 18 8t18 -8z" />
+<glyph unicode="&#x270f;" d="M1011 1210q19 0 33 -13l153 -153q13 -14 13 -33t-13 -33l-99 -92l-214 214l95 96q13 14 32 14zM1013 800l-615 -614l-214 214l614 614zM317 96l-333 -112l110 335z" />
+<glyph unicode="&#xe001;" d="M700 650v-550h250q21 0 35.5 -14.5t14.5 -35.5v-50h-800v50q0 21 14.5 35.5t35.5 14.5h250v550l-500 550h1200z" />
+<glyph unicode="&#xe002;" d="M368 1017l645 163q39 15 63 0t24 -49v-831q0 -55 -41.5 -95.5t-111.5 -63.5q-79 -25 -147 -4.5t-86 75t25.5 111.5t122.5 82q72 24 138 8v521l-600 -155v-606q0 -42 -44 -90t-109 -69q-79 -26 -147 -5.5t-86 75.5t25.5 111.5t122.5 82.5q72 24 138 7v639q0 38 14.5 59 t53.5 34z" />
+<glyph unicode="&#xe003;" d="M500 1191q100 0 191 -39t156.5 -104.5t104.5 -156.5t39 -191l-1 -2l1 -5q0 -141 -78 -262l275 -274q23 -26 22.5 -44.5t-22.5 -42.5l-59 -58q-26 -20 -46.5 -20t-39.5 20l-275 274q-119 -77 -261 -77l-5 1l-2 -1q-100 0 -191 39t-156.5 104.5t-104.5 156.5t-39 191 t39 191t104.5 156.5t156.5 104.5t191 39zM500 1022q-88 0 -162 -43t-117 -117t-43 -162t43 -162t117 -117t162 -43t162 43t117 117t43 162t-43 162t-117 117t-162 43z" />
+<glyph unicode="&#xe005;" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104z" />
+<glyph unicode="&#xe006;" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429z" />
+<glyph unicode="&#xe007;" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429zM477 700h-240l197 -142l-74 -226 l193 139l195 -140l-74 229l192 140h-234l-78 211z" />
+<glyph unicode="&#xe008;" d="M600 1200q124 0 212 -88t88 -212v-250q0 -46 -31 -98t-69 -52v-75q0 -10 6 -21.5t15 -17.5l358 -230q9 -5 15 -16.5t6 -21.5v-93q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v93q0 10 6 21.5t15 16.5l358 230q9 6 15 17.5t6 21.5v75q-38 0 -69 52 t-31 98v250q0 124 88 212t212 88z" />
+<glyph unicode="&#xe009;" d="M25 1100h1150q10 0 17.5 -7.5t7.5 -17.5v-1050q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v1050q0 10 7.5 17.5t17.5 7.5zM100 1000v-100h100v100h-100zM875 1000h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5t17.5 -7.5h550 q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM1000 1000v-100h100v100h-100zM100 800v-100h100v100h-100zM1000 800v-100h100v100h-100zM100 600v-100h100v100h-100zM1000 600v-100h100v100h-100zM875 500h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5 t17.5 -7.5h550q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM100 400v-100h100v100h-100zM1000 400v-100h100v100h-100zM100 200v-100h100v100h-100zM1000 200v-100h100v100h-100z" />
+<glyph unicode="&#xe010;" d="M50 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM50 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe011;" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM850 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 700h200q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5 t35.5 14.5z" />
+<glyph unicode="&#xe012;" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h700q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe013;" d="M465 477l571 571q8 8 18 8t17 -8l177 -177q8 -7 8 -17t-8 -18l-783 -784q-7 -8 -17.5 -8t-17.5 8l-384 384q-8 8 -8 18t8 17l177 177q7 8 17 8t18 -8l171 -171q7 -7 18 -7t18 7z" />
+<glyph unicode="&#xe014;" d="M904 1083l178 -179q8 -8 8 -18.5t-8 -17.5l-267 -268l267 -268q8 -7 8 -17.5t-8 -18.5l-178 -178q-8 -8 -18.5 -8t-17.5 8l-268 267l-268 -267q-7 -8 -17.5 -8t-18.5 8l-178 178q-8 8 -8 18.5t8 17.5l267 268l-267 268q-8 7 -8 17.5t8 18.5l178 178q8 8 18.5 8t17.5 -8 l268 -267l268 268q7 7 17.5 7t18.5 -7z" />
+<glyph unicode="&#xe015;" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM425 900h150q10 0 17.5 -7.5t7.5 -17.5v-75h75q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5 t-17.5 -7.5h-75v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-75q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v75q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe016;" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM325 800h350q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-350q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe017;" d="M550 1200h100q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM800 975v166q167 -62 272 -209.5t105 -331.5q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5 t-184.5 123t-123 184.5t-45.5 224q0 184 105 331.5t272 209.5v-166q-103 -55 -165 -155t-62 -220q0 -116 57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5q0 120 -62 220t-165 155z" />
+<glyph unicode="&#xe018;" d="M1025 1200h150q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM725 800h150q10 0 17.5 -7.5t7.5 -17.5v-750q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v750 q0 10 7.5 17.5t17.5 7.5zM425 500h150q10 0 17.5 -7.5t7.5 -17.5v-450q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v450q0 10 7.5 17.5t17.5 7.5zM125 300h150q10 0 17.5 -7.5t7.5 -17.5v-250q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5 v250q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe019;" d="M600 1174q33 0 74 -5l38 -152l5 -1q49 -14 94 -39l5 -2l134 80q61 -48 104 -105l-80 -134l3 -5q25 -44 39 -93l1 -6l152 -38q5 -43 5 -73q0 -34 -5 -74l-152 -38l-1 -6q-15 -49 -39 -93l-3 -5l80 -134q-48 -61 -104 -105l-134 81l-5 -3q-44 -25 -94 -39l-5 -2l-38 -151 q-43 -5 -74 -5q-33 0 -74 5l-38 151l-5 2q-49 14 -94 39l-5 3l-134 -81q-60 48 -104 105l80 134l-3 5q-25 45 -38 93l-2 6l-151 38q-6 42 -6 74q0 33 6 73l151 38l2 6q13 48 38 93l3 5l-80 134q47 61 105 105l133 -80l5 2q45 25 94 39l5 1l38 152q43 5 74 5zM600 815 q-89 0 -152 -63t-63 -151.5t63 -151.5t152 -63t152 63t63 151.5t-63 151.5t-152 63z" />
+<glyph unicode="&#xe020;" d="M500 1300h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-75h-1100v75q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5zM500 1200v-100h300v100h-300zM1100 900v-800q0 -41 -29.5 -70.5t-70.5 -29.5h-700q-41 0 -70.5 29.5t-29.5 70.5 v800h900zM300 800v-700h100v700h-100zM500 800v-700h100v700h-100zM700 800v-700h100v700h-100zM900 800v-700h100v700h-100z" />
+<glyph unicode="&#xe021;" d="M18 618l620 608q8 7 18.5 7t17.5 -7l608 -608q8 -8 5.5 -13t-12.5 -5h-175v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v375h-300v-375q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v575h-175q-10 0 -12.5 5t5.5 13z" />
+<glyph unicode="&#xe022;" d="M600 1200v-400q0 -41 29.5 -70.5t70.5 -29.5h300v-650q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5h450zM1000 800h-250q-21 0 -35.5 14.5t-14.5 35.5v250z" />
+<glyph unicode="&#xe023;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h50q10 0 17.5 -7.5t7.5 -17.5v-275h175q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe024;" d="M1300 0h-538l-41 400h-242l-41 -400h-538l431 1200h209l-21 -300h162l-20 300h208zM515 800l-27 -300h224l-27 300h-170z" />
+<glyph unicode="&#xe025;" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-450h191q20 0 25.5 -11.5t-7.5 -27.5l-327 -400q-13 -16 -32 -16t-32 16l-327 400q-13 16 -7.5 27.5t25.5 11.5h191v450q0 21 14.5 35.5t35.5 14.5zM1125 400h50q10 0 17.5 -7.5t7.5 -17.5v-350q0 -10 -7.5 -17.5t-17.5 -7.5 h-1050q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h50q10 0 17.5 -7.5t7.5 -17.5v-175h900v175q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe026;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -275q-13 -16 -32 -16t-32 16l-223 275q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z " />
+<glyph unicode="&#xe027;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM632 914l223 -275q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5l223 275q13 16 32 16 t32 -16z" />
+<glyph unicode="&#xe028;" d="M225 1200h750q10 0 19.5 -7t12.5 -17l186 -652q7 -24 7 -49v-425q0 -12 -4 -27t-9 -17q-12 -6 -37 -6h-1100q-12 0 -27 4t-17 8q-6 13 -6 38l1 425q0 25 7 49l185 652q3 10 12.5 17t19.5 7zM878 1000h-556q-10 0 -19 -7t-11 -18l-87 -450q-2 -11 4 -18t16 -7h150 q10 0 19.5 -7t11.5 -17l38 -152q2 -10 11.5 -17t19.5 -7h250q10 0 19.5 7t11.5 17l38 152q2 10 11.5 17t19.5 7h150q10 0 16 7t4 18l-87 450q-2 11 -11 18t-19 7z" />
+<glyph unicode="&#xe029;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM540 820l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
+<glyph unicode="&#xe030;" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-362q0 -10 -7.5 -17.5t-17.5 -7.5h-362q-11 0 -13 5.5t5 12.5l133 133q-109 76 -238 76q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5h150q0 -117 -45.5 -224 t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117z" />
+<glyph unicode="&#xe031;" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-361q0 -11 -7.5 -18.5t-18.5 -7.5h-361q-11 0 -13 5.5t5 12.5l134 134q-110 75 -239 75q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5h-150q0 117 45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117zM1027 600h150 q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5q-192 0 -348 118l-134 -134q-7 -8 -12.5 -5.5t-5.5 12.5v360q0 11 7.5 18.5t18.5 7.5h360q10 0 12.5 -5.5t-5.5 -12.5l-133 -133q110 -76 240 -76q116 0 214.5 57t155.5 155.5t57 214.5z" />
+<glyph unicode="&#xe032;" d="M125 1200h1050q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-1050q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM1075 1000h-850q-10 0 -17.5 -7.5t-7.5 -17.5v-850q0 -10 7.5 -17.5t17.5 -7.5h850q10 0 17.5 7.5t7.5 17.5v850 q0 10 -7.5 17.5t-17.5 7.5zM325 900h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 900h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 700h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 700h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 500h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 500h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 300h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 300h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe033;" d="M900 800v200q0 83 -58.5 141.5t-141.5 58.5h-300q-82 0 -141 -59t-59 -141v-200h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h900q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-100zM400 800v150q0 21 15 35.5t35 14.5h200 q20 0 35 -14.5t15 -35.5v-150h-300z" />
+<glyph unicode="&#xe034;" d="M125 1100h50q10 0 17.5 -7.5t7.5 -17.5v-1075h-100v1075q0 10 7.5 17.5t17.5 7.5zM1075 1052q4 0 9 -2q16 -6 16 -23v-421q0 -6 -3 -12q-33 -59 -66.5 -99t-65.5 -58t-56.5 -24.5t-52.5 -6.5q-26 0 -57.5 6.5t-52.5 13.5t-60 21q-41 15 -63 22.5t-57.5 15t-65.5 7.5 q-85 0 -160 -57q-7 -5 -15 -5q-6 0 -11 3q-14 7 -14 22v438q22 55 82 98.5t119 46.5q23 2 43 0.5t43 -7t32.5 -8.5t38 -13t32.5 -11q41 -14 63.5 -21t57 -14t63.5 -7q103 0 183 87q7 8 18 8z" />
+<glyph unicode="&#xe035;" d="M600 1175q116 0 227 -49.5t192.5 -131t131 -192.5t49.5 -227v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v300q0 127 -70.5 231.5t-184.5 161.5t-245 57t-245 -57t-184.5 -161.5t-70.5 -231.5v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50 q-10 0 -17.5 7.5t-7.5 17.5v300q0 116 49.5 227t131 192.5t192.5 131t227 49.5zM220 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460q0 8 6 14t14 6zM820 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460 q0 8 6 14t14 6z" />
+<glyph unicode="&#xe036;" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM900 668l120 120q7 7 17 7t17 -7l34 -34q7 -7 7 -17t-7 -17l-120 -120l120 -120q7 -7 7 -17 t-7 -17l-34 -34q-7 -7 -17 -7t-17 7l-120 119l-120 -119q-7 -7 -17 -7t-17 7l-34 34q-7 7 -7 17t7 17l119 120l-119 120q-7 7 -7 17t7 17l34 34q7 8 17 8t17 -8z" />
+<glyph unicode="&#xe037;" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6 l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238q-6 8 -4.5 18t9.5 17l29 22q7 5 15 5z" />
+<glyph unicode="&#xe038;" d="M967 1004h3q11 -1 17 -10q135 -179 135 -396q0 -105 -34 -206.5t-98 -185.5q-7 -9 -17 -10h-3q-9 0 -16 6l-42 34q-8 6 -9 16t5 18q111 150 111 328q0 90 -29.5 176t-84.5 157q-6 9 -5 19t10 16l42 33q7 5 15 5zM321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5 t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238 q-6 8 -4.5 18.5t9.5 16.5l29 22q7 5 15 5z" />
+<glyph unicode="&#xe039;" d="M500 900h100v-100h-100v-100h-400v-100h-100v600h500v-300zM1200 700h-200v-100h200v-200h-300v300h-200v300h-100v200h600v-500zM100 1100v-300h300v300h-300zM800 1100v-300h300v300h-300zM300 900h-100v100h100v-100zM1000 900h-100v100h100v-100zM300 500h200v-500 h-500v500h200v100h100v-100zM800 300h200v-100h-100v-100h-200v100h-100v100h100v200h-200v100h300v-300zM100 400v-300h300v300h-300zM300 200h-100v100h100v-100zM1200 200h-100v100h100v-100zM700 0h-100v100h100v-100zM1200 0h-300v100h300v-100z" />
+<glyph unicode="&#xe040;" d="M100 200h-100v1000h100v-1000zM300 200h-100v1000h100v-1000zM700 200h-200v1000h200v-1000zM900 200h-100v1000h100v-1000zM1200 200h-200v1000h200v-1000zM400 0h-300v100h300v-100zM600 0h-100v91h100v-91zM800 0h-100v91h100v-91zM1100 0h-200v91h200v-91z" />
+<glyph unicode="&#xe041;" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
+<glyph unicode="&#xe042;" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM800 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-56 56l424 426l-700 700h150zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5 t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
+<glyph unicode="&#xe043;" d="M300 1200h825q75 0 75 -75v-900q0 -25 -18 -43l-64 -64q-8 -8 -13 -5.5t-5 12.5v950q0 10 -7.5 17.5t-17.5 7.5h-700q-25 0 -43 -18l-64 -64q-8 -8 -5.5 -13t12.5 -5h700q10 0 17.5 -7.5t7.5 -17.5v-950q0 -10 -7.5 -17.5t-17.5 -7.5h-850q-10 0 -17.5 7.5t-7.5 17.5v975 q0 25 18 43l139 139q18 18 43 18z" />
+<glyph unicode="&#xe044;" d="M250 1200h800q21 0 35.5 -14.5t14.5 -35.5v-1150l-450 444l-450 -445v1151q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe045;" d="M822 1200h-444q-11 0 -19 -7.5t-9 -17.5l-78 -301q-7 -24 7 -45l57 -108q6 -9 17.5 -15t21.5 -6h450q10 0 21.5 6t17.5 15l62 108q14 21 7 45l-83 301q-1 10 -9 17.5t-19 7.5zM1175 800h-150q-10 0 -21 -6.5t-15 -15.5l-78 -156q-4 -9 -15 -15.5t-21 -6.5h-550 q-10 0 -21 6.5t-15 15.5l-78 156q-4 9 -15 15.5t-21 6.5h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-650q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h750q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5 t7.5 17.5v650q0 10 -7.5 17.5t-17.5 7.5zM850 200h-500q-10 0 -19.5 -7t-11.5 -17l-38 -152q-2 -10 3.5 -17t15.5 -7h600q10 0 15.5 7t3.5 17l-38 152q-2 10 -11.5 17t-19.5 7z" />
+<glyph unicode="&#xe046;" d="M500 1100h200q56 0 102.5 -20.5t72.5 -50t44 -59t25 -50.5l6 -20h150q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5h150q2 8 6.5 21.5t24 48t45 61t72 48t102.5 21.5zM900 800v-100 h100v100h-100zM600 730q-95 0 -162.5 -67.5t-67.5 -162.5t67.5 -162.5t162.5 -67.5t162.5 67.5t67.5 162.5t-67.5 162.5t-162.5 67.5zM600 603q43 0 73 -30t30 -73t-30 -73t-73 -30t-73 30t-30 73t30 73t73 30z" />
+<glyph unicode="&#xe047;" d="M681 1199l385 -998q20 -50 60 -92q18 -19 36.5 -29.5t27.5 -11.5l10 -2v-66h-417v66q53 0 75 43.5t5 88.5l-82 222h-391q-58 -145 -92 -234q-11 -34 -6.5 -57t25.5 -37t46 -20t55 -6v-66h-365v66q56 24 84 52q12 12 25 30.5t20 31.5l7 13l399 1006h93zM416 521h340 l-162 457z" />
+<glyph unicode="&#xe048;" d="M753 641q5 -1 14.5 -4.5t36 -15.5t50.5 -26.5t53.5 -40t50.5 -54.5t35.5 -70t14.5 -87q0 -67 -27.5 -125.5t-71.5 -97.5t-98.5 -66.5t-108.5 -40.5t-102 -13h-500v89q41 7 70.5 32.5t29.5 65.5v827q0 24 -0.5 34t-3.5 24t-8.5 19.5t-17 13.5t-28 12.5t-42.5 11.5v71 l471 -1q57 0 115.5 -20.5t108 -57t80.5 -94t31 -124.5q0 -51 -15.5 -96.5t-38 -74.5t-45 -50.5t-38.5 -30.5zM400 700h139q78 0 130.5 48.5t52.5 122.5q0 41 -8.5 70.5t-29.5 55.5t-62.5 39.5t-103.5 13.5h-118v-350zM400 200h216q80 0 121 50.5t41 130.5q0 90 -62.5 154.5 t-156.5 64.5h-159v-400z" />
+<glyph unicode="&#xe049;" d="M877 1200l2 -57q-83 -19 -116 -45.5t-40 -66.5l-132 -839q-9 -49 13 -69t96 -26v-97h-500v97q186 16 200 98l173 832q3 17 3 30t-1.5 22.5t-9 17.5t-13.5 12.5t-21.5 10t-26 8.5t-33.5 10q-13 3 -19 5v57h425z" />
+<glyph unicode="&#xe050;" d="M1300 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM175 1000h-75v-800h75l-125 -167l-125 167h75v800h-75l125 167z" />
+<glyph unicode="&#xe051;" d="M1100 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-650q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v650h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM1167 50l-167 -125v75h-800v-75l-167 125l167 125v-75h800v75z" />
+<glyph unicode="&#xe052;" d="M50 1100h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe053;" d="M250 1100h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM250 500h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe054;" d="M500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000 q-21 0 -35.5 14.5t-14.5 35.5zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5zM0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5z" />
+<glyph unicode="&#xe055;" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe056;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 1100h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 800h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 500h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 500h800q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 200h800 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe057;" d="M400 0h-100v1100h100v-1100zM550 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM267 550l-167 -125v75h-200v100h200v75zM550 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe058;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM900 0h-100v1100h100v-1100zM50 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM1100 600h200v-100h-200v-75l-167 125l167 125v-75zM50 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe059;" d="M75 1000h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53v650q0 31 22 53t53 22zM1200 300l-300 300l300 300v-600z" />
+<glyph unicode="&#xe060;" d="M44 1100h1112q18 0 31 -13t13 -31v-1012q0 -18 -13 -31t-31 -13h-1112q-18 0 -31 13t-13 31v1012q0 18 13 31t31 13zM100 1000v-737l247 182l298 -131l-74 156l293 318l236 -288v500h-1000zM342 884q56 0 95 -39t39 -94.5t-39 -95t-95 -39.5t-95 39.5t-39 95t39 94.5 t95 39z" />
+<glyph unicode="&#xe062;" d="M648 1169q117 0 216 -60t156.5 -161t57.5 -218q0 -115 -70 -258q-69 -109 -158 -225.5t-143 -179.5l-54 -62q-9 8 -25.5 24.5t-63.5 67.5t-91 103t-98.5 128t-95.5 148q-60 132 -60 249q0 88 34 169.5t91.5 142t137 96.5t166.5 36zM652.5 974q-91.5 0 -156.5 -65 t-65 -157t65 -156.5t156.5 -64.5t156.5 64.5t65 156.5t-65 157t-156.5 65z" />
+<glyph unicode="&#xe063;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 173v854q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57z" />
+<glyph unicode="&#xe064;" d="M554 1295q21 -72 57.5 -143.5t76 -130t83 -118t82.5 -117t70 -116t49.5 -126t18.5 -136.5q0 -71 -25.5 -135t-68.5 -111t-99 -82t-118.5 -54t-125.5 -23q-84 5 -161.5 34t-139.5 78.5t-99 125t-37 164.5q0 69 18 136.5t49.5 126.5t69.5 116.5t81.5 117.5t83.5 119 t76.5 131t58.5 143zM344 710q-23 -33 -43.5 -70.5t-40.5 -102.5t-17 -123q1 -37 14.5 -69.5t30 -52t41 -37t38.5 -24.5t33 -15q21 -7 32 -1t13 22l6 34q2 10 -2.5 22t-13.5 19q-5 4 -14 12t-29.5 40.5t-32.5 73.5q-26 89 6 271q2 11 -6 11q-8 1 -15 -10z" />
+<glyph unicode="&#xe065;" d="M1000 1013l108 115q2 1 5 2t13 2t20.5 -1t25 -9.5t28.5 -21.5q22 -22 27 -43t0 -32l-6 -10l-108 -115zM350 1100h400q50 0 105 -13l-187 -187h-368q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v182l200 200v-332 q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM1009 803l-362 -362l-161 -50l55 170l355 355z" />
+<glyph unicode="&#xe066;" d="M350 1100h361q-164 -146 -216 -200h-195q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-103q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M824 1073l339 -301q8 -7 8 -17.5t-8 -17.5l-340 -306q-7 -6 -12.5 -4t-6.5 11v203q-26 1 -54.5 0t-78.5 -7.5t-92 -17.5t-86 -35t-70 -57q10 59 33 108t51.5 81.5t65 58.5t68.5 40.5t67 24.5t56 13.5t40 4.5v210q1 10 6.5 12.5t13.5 -4.5z" />
+<glyph unicode="&#xe067;" d="M350 1100h350q60 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-219q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M643 639l395 395q7 7 17.5 7t17.5 -7l101 -101q7 -7 7 -17.5t-7 -17.5l-531 -532q-7 -7 -17.5 -7t-17.5 7l-248 248q-7 7 -7 17.5t7 17.5l101 101q7 7 17.5 7t17.5 -7l111 -111q8 -7 18 -7t18 7z" />
+<glyph unicode="&#xe068;" d="M318 918l264 264q8 8 18 8t18 -8l260 -264q7 -8 4.5 -13t-12.5 -5h-170v-200h200v173q0 10 5 12t13 -5l264 -260q8 -7 8 -17.5t-8 -17.5l-264 -265q-8 -7 -13 -5t-5 12v173h-200v-200h170q10 0 12.5 -5t-4.5 -13l-260 -264q-8 -8 -18 -8t-18 8l-264 264q-8 8 -5.5 13 t12.5 5h175v200h-200v-173q0 -10 -5 -12t-13 5l-264 265q-8 7 -8 17.5t8 17.5l264 260q8 7 13 5t5 -12v-173h200v200h-175q-10 0 -12.5 5t5.5 13z" />
+<glyph unicode="&#xe069;" d="M250 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe070;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5 t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe071;" d="M1200 1050v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-492 480q-15 14 -15 35t15 35l492 480q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25z" />
+<glyph unicode="&#xe072;" d="M243 1074l814 -498q18 -11 18 -26t-18 -26l-814 -498q-18 -11 -30.5 -4t-12.5 28v1000q0 21 12.5 28t30.5 -4z" />
+<glyph unicode="&#xe073;" d="M250 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM650 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800 q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe074;" d="M1100 950v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5z" />
+<glyph unicode="&#xe075;" d="M500 612v438q0 21 10.5 25t25.5 -10l492 -480q15 -14 15 -35t-15 -35l-492 -480q-15 -14 -25.5 -10t-10.5 25v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10z" />
+<glyph unicode="&#xe076;" d="M1048 1102l100 1q20 0 35 -14.5t15 -35.5l5 -1000q0 -21 -14.5 -35.5t-35.5 -14.5l-100 -1q-21 0 -35.5 14.5t-14.5 35.5l-2 437l-463 -454q-14 -15 -24.5 -10.5t-10.5 25.5l-2 437l-462 -455q-15 -14 -25.5 -9.5t-10.5 24.5l-5 1000q0 21 10.5 25.5t25.5 -10.5l466 -450 l-2 438q0 20 10.5 24.5t25.5 -9.5l466 -451l-2 438q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe077;" d="M850 1100h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10l464 -453v438q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe078;" d="M686 1081l501 -540q15 -15 10.5 -26t-26.5 -11h-1042q-22 0 -26.5 11t10.5 26l501 540q15 15 36 15t36 -15zM150 400h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe079;" d="M885 900l-352 -353l352 -353l-197 -198l-552 552l552 550z" />
+<glyph unicode="&#xe080;" d="M1064 547l-551 -551l-198 198l353 353l-353 353l198 198z" />
+<glyph unicode="&#xe081;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM650 900h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-150 q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5h150v-150q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v150h150q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-150v150q0 21 -14.5 35.5t-35.5 14.5z" />
+<glyph unicode="&#xe082;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM850 700h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5 t35.5 -14.5h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5z" />
+<glyph unicode="&#xe083;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM741.5 913q-12.5 0 -21.5 -9l-120 -120l-120 120q-9 9 -21.5 9 t-21.5 -9l-141 -141q-9 -9 -9 -21.5t9 -21.5l120 -120l-120 -120q-9 -9 -9 -21.5t9 -21.5l141 -141q9 -9 21.5 -9t21.5 9l120 120l120 -120q9 -9 21.5 -9t21.5 9l141 141q9 9 9 21.5t-9 21.5l-120 120l120 120q9 9 9 21.5t-9 21.5l-141 141q-9 9 -21.5 9z" />
+<glyph unicode="&#xe084;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM546 623l-84 85q-7 7 -17.5 7t-18.5 -7l-139 -139q-7 -8 -7 -18t7 -18 l242 -241q7 -8 17.5 -8t17.5 8l375 375q7 7 7 17.5t-7 18.5l-139 139q-7 7 -17.5 7t-17.5 -7z" />
+<glyph unicode="&#xe085;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM588 941q-29 0 -59 -5.5t-63 -20.5t-58 -38.5t-41.5 -63t-16.5 -89.5 q0 -25 20 -25h131q30 -5 35 11q6 20 20.5 28t45.5 8q20 0 31.5 -10.5t11.5 -28.5q0 -23 -7 -34t-26 -18q-1 0 -13.5 -4t-19.5 -7.5t-20 -10.5t-22 -17t-18.5 -24t-15.5 -35t-8 -46q-1 -8 5.5 -16.5t20.5 -8.5h173q7 0 22 8t35 28t37.5 48t29.5 74t12 100q0 47 -17 83 t-42.5 57t-59.5 34.5t-64 18t-59 4.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="&#xe086;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM675 1000h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5 t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5zM675 700h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h75v-200h-75q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h350q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5 t-17.5 7.5h-75v275q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="&#xe087;" d="M525 1200h150q10 0 17.5 -7.5t7.5 -17.5v-194q103 -27 178.5 -102.5t102.5 -178.5h194q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-194q-27 -103 -102.5 -178.5t-178.5 -102.5v-194q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v194 q-103 27 -178.5 102.5t-102.5 178.5h-194q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h194q27 103 102.5 178.5t178.5 102.5v194q0 10 7.5 17.5t17.5 7.5zM700 893v-168q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v168q-68 -23 -119 -74 t-74 -119h168q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-168q23 -68 74 -119t119 -74v168q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-168q68 23 119 74t74 119h-168q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h168 q-23 68 -74 119t-119 74z" />
+<glyph unicode="&#xe088;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM759 823l64 -64q7 -7 7 -17.5t-7 -17.5l-124 -124l124 -124q7 -7 7 -17.5t-7 -17.5l-64 -64q-7 -7 -17.5 -7t-17.5 7l-124 124l-124 -124q-7 -7 -17.5 -7t-17.5 7l-64 64 q-7 7 -7 17.5t7 17.5l124 124l-124 124q-7 7 -7 17.5t7 17.5l64 64q7 7 17.5 7t17.5 -7l124 -124l124 124q7 7 17.5 7t17.5 -7z" />
+<glyph unicode="&#xe089;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM782 788l106 -106q7 -7 7 -17.5t-7 -17.5l-320 -321q-8 -7 -18 -7t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l197 197q7 7 17.5 7t17.5 -7z" />
+<glyph unicode="&#xe090;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5q0 -120 65 -225 l587 587q-105 65 -225 65zM965 819l-584 -584q104 -62 219 -62q116 0 214.5 57t155.5 155.5t57 214.5q0 115 -62 219z" />
+<glyph unicode="&#xe091;" d="M39 582l522 427q16 13 27.5 8t11.5 -26v-291h550q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-550v-291q0 -21 -11.5 -26t-27.5 8l-522 427q-16 13 -16 32t16 32z" />
+<glyph unicode="&#xe092;" d="M639 1009l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291h-550q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h550v291q0 21 11.5 26t27.5 -8z" />
+<glyph unicode="&#xe093;" d="M682 1161l427 -522q13 -16 8 -27.5t-26 -11.5h-291v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v550h-291q-21 0 -26 11.5t8 27.5l427 522q13 16 32 16t32 -16z" />
+<glyph unicode="&#xe094;" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-550h291q21 0 26 -11.5t-8 -27.5l-427 -522q-13 -16 -32 -16t-32 16l-427 522q-13 16 -8 27.5t26 11.5h291v550q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe095;" d="M639 1109l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291q-94 -2 -182 -20t-170.5 -52t-147 -92.5t-100.5 -135.5q5 105 27 193.5t67.5 167t113 135t167 91.5t225.5 42v262q0 21 11.5 26t27.5 -8z" />
+<glyph unicode="&#xe096;" d="M850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5zM350 0h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249 q8 7 18 7t18 -7l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5z" />
+<glyph unicode="&#xe097;" d="M1014 1120l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249q8 7 18 7t18 -7zM250 600h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5z" />
+<glyph unicode="&#xe101;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM704 900h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5 t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="&#xe102;" d="M260 1200q9 0 19 -2t15 -4l5 -2q22 -10 44 -23l196 -118q21 -13 36 -24q29 -21 37 -12q11 13 49 35l196 118q22 13 45 23q17 7 38 7q23 0 47 -16.5t37 -33.5l13 -16q14 -21 18 -45l25 -123l8 -44q1 -9 8.5 -14.5t17.5 -5.5h61q10 0 17.5 -7.5t7.5 -17.5v-50 q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 -7.5t-7.5 -17.5v-175h-400v300h-200v-300h-400v175q0 10 -7.5 17.5t-17.5 7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5h61q11 0 18 3t7 8q0 4 9 52l25 128q5 25 19 45q2 3 5 7t13.5 15t21.5 19.5t26.5 15.5 t29.5 7zM915 1079l-166 -162q-7 -7 -5 -12t12 -5h219q10 0 15 7t2 17l-51 149q-3 10 -11 12t-15 -6zM463 917l-177 157q-8 7 -16 5t-11 -12l-51 -143q-3 -10 2 -17t15 -7h231q11 0 12.5 5t-5.5 12zM500 0h-375q-10 0 -17.5 7.5t-7.5 17.5v375h400v-400zM1100 400v-375 q0 -10 -7.5 -17.5t-17.5 -7.5h-375v400h400z" />
+<glyph unicode="&#xe103;" d="M1165 1190q8 3 21 -6.5t13 -17.5q-2 -178 -24.5 -323.5t-55.5 -245.5t-87 -174.5t-102.5 -118.5t-118 -68.5t-118.5 -33t-120 -4.5t-105 9.5t-90 16.5q-61 12 -78 11q-4 1 -12.5 0t-34 -14.5t-52.5 -40.5l-153 -153q-26 -24 -37 -14.5t-11 43.5q0 64 42 102q8 8 50.5 45 t66.5 58q19 17 35 47t13 61q-9 55 -10 102.5t7 111t37 130t78 129.5q39 51 80 88t89.5 63.5t94.5 45t113.5 36t129 31t157.5 37t182 47.5zM1116 1098q-8 9 -22.5 -3t-45.5 -50q-38 -47 -119 -103.5t-142 -89.5l-62 -33q-56 -30 -102 -57t-104 -68t-102.5 -80.5t-85.5 -91 t-64 -104.5q-24 -56 -31 -86t2 -32t31.5 17.5t55.5 59.5q25 30 94 75.5t125.5 77.5t147.5 81q70 37 118.5 69t102 79.5t99 111t86.5 148.5q22 50 24 60t-6 19z" />
+<glyph unicode="&#xe104;" d="M653 1231q-39 -67 -54.5 -131t-10.5 -114.5t24.5 -96.5t47.5 -80t63.5 -62.5t68.5 -46.5t65 -30q-4 7 -17.5 35t-18.5 39.5t-17 39.5t-17 43t-13 42t-9.5 44.5t-2 42t4 43t13.5 39t23 38.5q96 -42 165 -107.5t105 -138t52 -156t13 -159t-19 -149.5q-13 -55 -44 -106.5 t-68 -87t-78.5 -64.5t-72.5 -45t-53 -22q-72 -22 -127 -11q-31 6 -13 19q6 3 17 7q13 5 32.5 21t41 44t38.5 63.5t21.5 81.5t-6.5 94.5t-50 107t-104 115.5q10 -104 -0.5 -189t-37 -140.5t-65 -93t-84 -52t-93.5 -11t-95 24.5q-80 36 -131.5 114t-53.5 171q-2 23 0 49.5 t4.5 52.5t13.5 56t27.5 60t46 64.5t69.5 68.5q-8 -53 -5 -102.5t17.5 -90t34 -68.5t44.5 -39t49 -2q31 13 38.5 36t-4.5 55t-29 64.5t-36 75t-26 75.5q-15 85 2 161.5t53.5 128.5t85.5 92.5t93.5 61t81.5 25.5z" />
+<glyph unicode="&#xe105;" d="M600 1094q82 0 160.5 -22.5t140 -59t116.5 -82.5t94.5 -95t68 -95t42.5 -82.5t14 -57.5t-14 -57.5t-43 -82.5t-68.5 -95t-94.5 -95t-116.5 -82.5t-140 -59t-159.5 -22.5t-159.5 22.5t-140 59t-116.5 82.5t-94.5 95t-68.5 95t-43 82.5t-14 57.5t14 57.5t42.5 82.5t68 95 t94.5 95t116.5 82.5t140 59t160.5 22.5zM888 829q-15 15 -18 12t5 -22q25 -57 25 -119q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 59 23 114q8 19 4.5 22t-17.5 -12q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q22 -36 47 -71t70 -82t92.5 -81t113 -58.5t133.5 -24.5 t133.5 24t113 58.5t92.5 81.5t70 81.5t47 70.5q11 18 9 42.5t-14 41.5q-90 117 -163 189zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l35 34q14 15 12.5 33.5t-16.5 33.5q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
+<glyph unicode="&#xe106;" d="M592 0h-148l31 120q-91 20 -175.5 68.5t-143.5 106.5t-103.5 119t-66.5 110t-22 76q0 21 14 57.5t42.5 82.5t68 95t94.5 95t116.5 82.5t140 59t160.5 22.5q61 0 126 -15l32 121h148zM944 770l47 181q108 -85 176.5 -192t68.5 -159q0 -26 -19.5 -71t-59.5 -102t-93 -112 t-129 -104.5t-158 -75.5l46 173q77 49 136 117t97 131q11 18 9 42.5t-14 41.5q-54 70 -107 130zM310 824q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q18 -30 39 -60t57 -70.5t74 -73t90 -61t105 -41.5l41 154q-107 18 -178.5 101.5t-71.5 193.5q0 59 23 114q8 19 4.5 22 t-17.5 -12zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l12 11l22 86l-3 4q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
+<glyph unicode="&#xe107;" d="M-90 100l642 1066q20 31 48 28.5t48 -35.5l642 -1056q21 -32 7.5 -67.5t-50.5 -35.5h-1294q-37 0 -50.5 34t7.5 66zM155 200h345v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h345l-445 723zM496 700h208q20 0 32 -14.5t8 -34.5l-58 -252 q-4 -20 -21.5 -34.5t-37.5 -14.5h-54q-20 0 -37.5 14.5t-21.5 34.5l-58 252q-4 20 8 34.5t32 14.5z" />
+<glyph unicode="&#xe108;" d="M650 1200q62 0 106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -93 100 -113v-64q0 -21 -13 -29t-32 1l-205 128l-205 -128q-19 -9 -32 -1t-13 29v64q0 20 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5v41 q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44z" />
+<glyph unicode="&#xe109;" d="M850 1200h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-150h-1100v150q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-50h500v50q0 21 14.5 35.5t35.5 14.5zM1100 800v-750q0 -21 -14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v750h1100zM100 600v-100h100v100h-100zM300 600v-100h100v100h-100zM500 600v-100h100v100h-100zM700 600v-100h100v100h-100zM900 600v-100h100v100h-100zM100 400v-100h100v100h-100zM300 400v-100h100v100h-100zM500 400 v-100h100v100h-100zM700 400v-100h100v100h-100zM900 400v-100h100v100h-100zM100 200v-100h100v100h-100zM300 200v-100h100v100h-100zM500 200v-100h100v100h-100zM700 200v-100h100v100h-100zM900 200v-100h100v100h-100z" />
+<glyph unicode="&#xe110;" d="M1135 1165l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-159l-600 -600h-291q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h209l600 600h241v150q0 21 10.5 25t24.5 -10zM522 819l-141 -141l-122 122h-209q-21 0 -35.5 14.5 t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h291zM1135 565l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-241l-181 181l141 141l122 -122h159v150q0 21 10.5 25t24.5 -10z" />
+<glyph unicode="&#xe111;" d="M100 1100h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5z" />
+<glyph unicode="&#xe112;" d="M150 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM850 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM1100 800v-300q0 -41 -3 -77.5t-15 -89.5t-32 -96t-58 -89t-89 -77t-129 -51t-174 -20t-174 20 t-129 51t-89 77t-58 89t-32 96t-15 89.5t-3 77.5v300h300v-250v-27v-42.5t1.5 -41t5 -38t10 -35t16.5 -30t25.5 -24.5t35 -19t46.5 -12t60 -4t60 4.5t46.5 12.5t35 19.5t25 25.5t17 30.5t10 35t5 38t2 40.5t-0.5 42v25v250h300z" />
+<glyph unicode="&#xe113;" d="M1100 411l-198 -199l-353 353l-353 -353l-197 199l551 551z" />
+<glyph unicode="&#xe114;" d="M1101 789l-550 -551l-551 551l198 199l353 -353l353 353z" />
+<glyph unicode="&#xe115;" d="M404 1000h746q21 0 35.5 -14.5t14.5 -35.5v-551h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v401h-381zM135 984l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-400h385l215 -200h-750q-21 0 -35.5 14.5 t-14.5 35.5v550h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
+<glyph unicode="&#xe116;" d="M56 1200h94q17 0 31 -11t18 -27l38 -162h896q24 0 39 -18.5t10 -42.5l-100 -475q-5 -21 -27 -42.5t-55 -21.5h-633l48 -200h535q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-50q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-300v-50 q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-31q-18 0 -32.5 10t-20.5 19l-5 10l-201 961h-54q-20 0 -35 14.5t-15 35.5t15 35.5t35 14.5z" />
+<glyph unicode="&#xe117;" d="M1200 1000v-100h-1200v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500zM0 800h1200v-800h-1200v800z" />
+<glyph unicode="&#xe118;" d="M200 800l-200 -400v600h200q0 41 29.5 70.5t70.5 29.5h300q42 0 71 -29.5t29 -70.5h500v-200h-1000zM1500 700l-300 -700h-1200l300 700h1200z" />
+<glyph unicode="&#xe119;" d="M635 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-601h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v601h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
+<glyph unicode="&#xe120;" d="M936 864l249 -229q14 -15 14 -35.5t-14 -35.5l-249 -229q-15 -15 -25.5 -10.5t-10.5 24.5v151h-600v-151q0 -20 -10.5 -24.5t-25.5 10.5l-249 229q-14 15 -14 35.5t14 35.5l249 229q15 15 25.5 10.5t10.5 -25.5v-149h600v149q0 21 10.5 25.5t25.5 -10.5z" />
+<glyph unicode="&#xe121;" d="M1169 400l-172 732q-5 23 -23 45.5t-38 22.5h-672q-20 0 -38 -20t-23 -41l-172 -739h1138zM1100 300h-1000q-41 0 -70.5 -29.5t-29.5 -70.5v-100q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v100q0 41 -29.5 70.5t-70.5 29.5zM800 100v100h100v-100h-100 zM1000 100v100h100v-100h-100z" />
+<glyph unicode="&#xe122;" d="M1150 1100q21 0 35.5 -14.5t14.5 -35.5v-850q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v850q0 21 14.5 35.5t35.5 14.5zM1000 200l-675 200h-38l47 -276q3 -16 -5.5 -20t-29.5 -4h-7h-84q-20 0 -34.5 14t-18.5 35q-55 337 -55 351v250v6q0 16 1 23.5t6.5 14 t17.5 6.5h200l675 250v-850zM0 750v-250q-4 0 -11 0.5t-24 6t-30 15t-24 30t-11 48.5v50q0 26 10.5 46t25 30t29 16t25.5 7z" />
+<glyph unicode="&#xe123;" d="M553 1200h94q20 0 29 -10.5t3 -29.5l-18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q19 0 33 -14.5t14 -35t-13 -40.5t-31 -27q-8 -4 -23 -9.5t-65 -19.5t-103 -25t-132.5 -20t-158.5 -9q-57 0 -115 5t-104 12t-88.5 15.5t-73.5 17.5t-54.5 16t-35.5 12l-11 4 q-18 8 -31 28t-13 40.5t14 35t33 14.5h17l118 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3.5 32t28.5 13zM498 110q50 -6 102 -6q53 0 102 6q-12 -49 -39.5 -79.5t-62.5 -30.5t-63 30.5t-39 79.5z" />
+<glyph unicode="&#xe124;" d="M800 946l224 78l-78 -224l234 -45l-180 -155l180 -155l-234 -45l78 -224l-224 78l-45 -234l-155 180l-155 -180l-45 234l-224 -78l78 224l-234 45l180 155l-180 155l234 45l-78 224l224 -78l45 234l155 -180l155 180z" />
+<glyph unicode="&#xe125;" d="M650 1200h50q40 0 70 -40.5t30 -84.5v-150l-28 -125h328q40 0 70 -40.5t30 -84.5v-100q0 -45 -29 -74l-238 -344q-16 -24 -38 -40.5t-45 -16.5h-250q-7 0 -42 25t-66 50l-31 25h-61q-45 0 -72.5 18t-27.5 57v400q0 36 20 63l145 196l96 198q13 28 37.5 48t51.5 20z M650 1100l-100 -212l-150 -213v-375h100l136 -100h214l250 375v125h-450l50 225v175h-50zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe126;" d="M600 1100h250q23 0 45 -16.5t38 -40.5l238 -344q29 -29 29 -74v-100q0 -44 -30 -84.5t-70 -40.5h-328q28 -118 28 -125v-150q0 -44 -30 -84.5t-70 -40.5h-50q-27 0 -51.5 20t-37.5 48l-96 198l-145 196q-20 27 -20 63v400q0 39 27.5 57t72.5 18h61q124 100 139 100z M50 1000h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM636 1000l-136 -100h-100v-375l150 -213l100 -212h50v175l-50 225h450v125l-250 375h-214z" />
+<glyph unicode="&#xe127;" d="M356 873l363 230q31 16 53 -6l110 -112q13 -13 13.5 -32t-11.5 -34l-84 -121h302q84 0 138 -38t54 -110t-55 -111t-139 -39h-106l-131 -339q-6 -21 -19.5 -41t-28.5 -20h-342q-7 0 -90 81t-83 94v525q0 17 14 35.5t28 28.5zM400 792v-503l100 -89h293l131 339 q6 21 19.5 41t28.5 20h203q21 0 30.5 25t0.5 50t-31 25h-456h-7h-6h-5.5t-6 0.5t-5 1.5t-5 2t-4 2.5t-4 4t-2.5 4.5q-12 25 5 47l146 183l-86 83zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500 q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe128;" d="M475 1103l366 -230q2 -1 6 -3.5t14 -10.5t18 -16.5t14.5 -20t6.5 -22.5v-525q0 -13 -86 -94t-93 -81h-342q-15 0 -28.5 20t-19.5 41l-131 339h-106q-85 0 -139.5 39t-54.5 111t54 110t138 38h302l-85 121q-11 15 -10.5 34t13.5 32l110 112q22 22 53 6zM370 945l146 -183 q17 -22 5 -47q-2 -2 -3.5 -4.5t-4 -4t-4 -2.5t-5 -2t-5 -1.5t-6 -0.5h-6h-6.5h-6h-475v-100h221q15 0 29 -20t20 -41l130 -339h294l106 89v503l-342 236zM1050 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5 v500q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe129;" d="M550 1294q72 0 111 -55t39 -139v-106l339 -131q21 -6 41 -19.5t20 -28.5v-342q0 -7 -81 -90t-94 -83h-525q-17 0 -35.5 14t-28.5 28l-9 14l-230 363q-16 31 6 53l112 110q13 13 32 13.5t34 -11.5l121 -84v302q0 84 38 138t110 54zM600 972v203q0 21 -25 30.5t-50 0.5 t-25 -31v-456v-7v-6v-5.5t-0.5 -6t-1.5 -5t-2 -5t-2.5 -4t-4 -4t-4.5 -2.5q-25 -12 -47 5l-183 146l-83 -86l236 -339h503l89 100v293l-339 131q-21 6 -41 19.5t-20 28.5zM450 200h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe130;" d="M350 1100h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5zM600 306v-106q0 -84 -39 -139t-111 -55t-110 54t-38 138v302l-121 -84q-15 -12 -34 -11.5t-32 13.5l-112 110 q-22 22 -6 53l230 363q1 2 3.5 6t10.5 13.5t16.5 17t20 13.5t22.5 6h525q13 0 94 -83t81 -90v-342q0 -15 -20 -28.5t-41 -19.5zM308 900l-236 -339l83 -86l183 146q22 17 47 5q2 -1 4.5 -2.5t4 -4t2.5 -4t2 -5t1.5 -5t0.5 -6v-5.5v-6v-7v-456q0 -22 25 -31t50 0.5t25 30.5 v203q0 15 20 28.5t41 19.5l339 131v293l-89 100h-503z" />
+<glyph unicode="&#xe131;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM914 632l-275 223q-16 13 -27.5 8t-11.5 -26v-137h-275 q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h275v-137q0 -21 11.5 -26t27.5 8l275 223q16 13 16 32t-16 32z" />
+<glyph unicode="&#xe132;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM561 855l-275 -223q-16 -13 -16 -32t16 -32l275 -223q16 -13 27.5 -8 t11.5 26v137h275q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5h-275v137q0 21 -11.5 26t-27.5 -8z" />
+<glyph unicode="&#xe133;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM855 639l-223 275q-13 16 -32 16t-32 -16l-223 -275q-13 -16 -8 -27.5 t26 -11.5h137v-275q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v275h137q21 0 26 11.5t-8 27.5z" />
+<glyph unicode="&#xe134;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM675 900h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-275h-137q-21 0 -26 -11.5 t8 -27.5l223 -275q13 -16 32 -16t32 16l223 275q13 16 8 27.5t-26 11.5h-137v275q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="&#xe135;" d="M600 1176q116 0 222.5 -46t184 -123.5t123.5 -184t46 -222.5t-46 -222.5t-123.5 -184t-184 -123.5t-222.5 -46t-222.5 46t-184 123.5t-123.5 184t-46 222.5t46 222.5t123.5 184t184 123.5t222.5 46zM627 1101q-15 -12 -36.5 -20.5t-35.5 -12t-43 -8t-39 -6.5 q-15 -3 -45.5 0t-45.5 -2q-20 -7 -51.5 -26.5t-34.5 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -91t-29.5 -79q-9 -34 5 -93t8 -87q0 -9 17 -44.5t16 -59.5q12 0 23 -5t23.5 -15t19.5 -14q16 -8 33 -15t40.5 -15t34.5 -12q21 -9 52.5 -32t60 -38t57.5 -11 q7 -15 -3 -34t-22.5 -40t-9.5 -38q13 -21 23 -34.5t27.5 -27.5t36.5 -18q0 -7 -3.5 -16t-3.5 -14t5 -17q104 -2 221 112q30 29 46.5 47t34.5 49t21 63q-13 8 -37 8.5t-36 7.5q-15 7 -49.5 15t-51.5 19q-18 0 -41 -0.5t-43 -1.5t-42 -6.5t-38 -16.5q-51 -35 -66 -12 q-4 1 -3.5 25.5t0.5 25.5q-6 13 -26.5 17.5t-24.5 6.5q1 15 -0.5 30.5t-7 28t-18.5 11.5t-31 -21q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q7 -12 18 -24t21.5 -20.5t20 -15t15.5 -10.5l5 -3q2 12 7.5 30.5t8 34.5t-0.5 32q-3 18 3.5 29 t18 22.5t15.5 24.5q6 14 10.5 35t8 31t15.5 22.5t34 22.5q-6 18 10 36q8 0 24 -1.5t24.5 -1.5t20 4.5t20.5 15.5q-10 23 -31 42.5t-37.5 29.5t-49 27t-43.5 23q0 1 2 8t3 11.5t1.5 10.5t-1 9.5t-4.5 4.5q31 -13 58.5 -14.5t38.5 2.5l12 5q5 28 -9.5 46t-36.5 24t-50 15 t-41 20q-18 -4 -37 0zM613 994q0 -17 8 -42t17 -45t9 -23q-8 1 -39.5 5.5t-52.5 10t-37 16.5q3 11 16 29.5t16 25.5q10 -10 19 -10t14 6t13.5 14.5t16.5 12.5z" />
+<glyph unicode="&#xe136;" d="M756 1157q164 92 306 -9l-259 -138l145 -232l251 126q6 -89 -34 -156.5t-117 -110.5q-60 -34 -127 -39.5t-126 16.5l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5t15 37.5l600 599q-34 101 5.5 201.5t135.5 154.5z" />
+<glyph unicode="&#xe137;" horiz-adv-x="1220" d="M100 1196h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 1096h-200v-100h200v100zM100 796h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 696h-500v-100h500v100zM100 396h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 296h-300v-100h300v100z " />
+<glyph unicode="&#xe138;" d="M150 1200h900q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM700 500v-300l-200 -200v500l-350 500h900z" />
+<glyph unicode="&#xe139;" d="M500 1200h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5zM500 1100v-100h200v100h-200zM1200 400v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v200h1200z" />
+<glyph unicode="&#xe140;" d="M50 1200h300q21 0 25 -10.5t-10 -24.5l-94 -94l199 -199q7 -8 7 -18t-7 -18l-106 -106q-8 -7 -18 -7t-18 7l-199 199l-94 -94q-14 -14 -24.5 -10t-10.5 25v300q0 21 14.5 35.5t35.5 14.5zM850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-199 -199q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l199 199l-94 94q-14 14 -10 24.5t25 10.5zM364 470l106 -106q7 -8 7 -18t-7 -18l-199 -199l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l199 199 q8 7 18 7t18 -7zM1071 271l94 94q14 14 24.5 10t10.5 -25v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -25 10.5t10 24.5l94 94l-199 199q-7 8 -7 18t7 18l106 106q8 7 18 7t18 -7z" />
+<glyph unicode="&#xe141;" d="M596 1192q121 0 231.5 -47.5t190 -127t127 -190t47.5 -231.5t-47.5 -231.5t-127 -190.5t-190 -127t-231.5 -47t-231.5 47t-190.5 127t-127 190.5t-47 231.5t47 231.5t127 190t190.5 127t231.5 47.5zM596 1010q-112 0 -207.5 -55.5t-151 -151t-55.5 -207.5t55.5 -207.5 t151 -151t207.5 -55.5t207.5 55.5t151 151t55.5 207.5t-55.5 207.5t-151 151t-207.5 55.5zM454.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38.5 -16.5t-38.5 16.5t-16 39t16 38.5t38.5 16zM754.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38 -16.5q-14 0 -29 10l-55 -145 q17 -23 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5q0 32 20.5 56.5t51.5 29.5l122 126l1 1q-9 14 -9 28q0 23 16 39t38.5 16zM345.5 709q22.5 0 38.5 -16t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16zM854.5 709q22.5 0 38.5 -16 t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16z" />
+<glyph unicode="&#xe142;" d="M546 173l469 470q91 91 99 192q7 98 -52 175.5t-154 94.5q-22 4 -47 4q-34 0 -66.5 -10t-56.5 -23t-55.5 -38t-48 -41.5t-48.5 -47.5q-376 -375 -391 -390q-30 -27 -45 -41.5t-37.5 -41t-32 -46.5t-16 -47.5t-1.5 -56.5q9 -62 53.5 -95t99.5 -33q74 0 125 51l548 548 q36 36 20 75q-7 16 -21.5 26t-32.5 10q-26 0 -50 -23q-13 -12 -39 -38l-341 -338q-15 -15 -35.5 -15.5t-34.5 13.5t-14 34.5t14 34.5q327 333 361 367q35 35 67.5 51.5t78.5 16.5q14 0 29 -1q44 -8 74.5 -35.5t43.5 -68.5q14 -47 2 -96.5t-47 -84.5q-12 -11 -32 -32 t-79.5 -81t-114.5 -115t-124.5 -123.5t-123 -119.5t-96.5 -89t-57 -45q-56 -27 -120 -27q-70 0 -129 32t-93 89q-48 78 -35 173t81 163l511 511q71 72 111 96q91 55 198 55q80 0 152 -33q78 -36 129.5 -103t66.5 -154q17 -93 -11 -183.5t-94 -156.5l-482 -476 q-15 -15 -36 -16t-37 14t-17.5 34t14.5 35z" />
+<glyph unicode="&#xe143;" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104zM896 972q-33 0 -64.5 -19t-56.5 -46t-47.5 -53.5t-43.5 -45.5t-37.5 -19t-36 19t-40 45.5t-43 53.5t-54 46t-65.5 19q-67 0 -122.5 -55.5t-55.5 -132.5q0 -23 13.5 -51t46 -65t57.5 -63t76 -75l22 -22q15 -14 44 -44t50.5 -51t46 -44t41 -35t23 -12 t23.5 12t42.5 36t46 44t52.5 52t44 43q4 4 12 13q43 41 63.5 62t52 55t46 55t26 46t11.5 44q0 79 -53 133.5t-120 54.5z" />
+<glyph unicode="&#xe144;" d="M776.5 1214q93.5 0 159.5 -66l141 -141q66 -66 66 -160q0 -42 -28 -95.5t-62 -87.5l-29 -29q-31 53 -77 99l-18 18l95 95l-247 248l-389 -389l212 -212l-105 -106l-19 18l-141 141q-66 66 -66 159t66 159l283 283q65 66 158.5 66zM600 706l105 105q10 -8 19 -17l141 -141 q66 -66 66 -159t-66 -159l-283 -283q-66 -66 -159 -66t-159 66l-141 141q-66 66 -66 159.5t66 159.5l55 55q29 -55 75 -102l18 -17l-95 -95l247 -248l389 389z" />
+<glyph unicode="&#xe145;" d="M603 1200q85 0 162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5v953q0 21 30 46.5t81 48t129 37.5t163 15zM300 1000v-700h600v700h-600zM600 254q-43 0 -73.5 -30.5t-30.5 -73.5t30.5 -73.5t73.5 -30.5t73.5 30.5 t30.5 73.5t-30.5 73.5t-73.5 30.5z" />
+<glyph unicode="&#xe146;" d="M902 1185l283 -282q15 -15 15 -36t-14.5 -35.5t-35.5 -14.5t-35 15l-36 35l-279 -267v-300l-212 210l-308 -307l-280 -203l203 280l307 308l-210 212h300l267 279l-35 36q-15 14 -15 35t14.5 35.5t35.5 14.5t35 -15z" />
+<glyph unicode="&#xe148;" d="M700 1248v-78q38 -5 72.5 -14.5t75.5 -31.5t71 -53.5t52 -84t24 -118.5h-159q-4 36 -10.5 59t-21 45t-40 35.5t-64.5 20.5v-307l64 -13q34 -7 64 -16.5t70 -32t67.5 -52.5t47.5 -80t20 -112q0 -139 -89 -224t-244 -97v-77h-100v79q-150 16 -237 103q-40 40 -52.5 93.5 t-15.5 139.5h139q5 -77 48.5 -126t117.5 -65v335l-27 8q-46 14 -79 26.5t-72 36t-63 52t-40 72.5t-16 98q0 70 25 126t67.5 92t94.5 57t110 27v77h100zM600 754v274q-29 -4 -50 -11t-42 -21.5t-31.5 -41.5t-10.5 -65q0 -29 7 -50.5t16.5 -34t28.5 -22.5t31.5 -14t37.5 -10 q9 -3 13 -4zM700 547v-310q22 2 42.5 6.5t45 15.5t41.5 27t29 42t12 59.5t-12.5 59.5t-38 44.5t-53 31t-66.5 24.5z" />
+<glyph unicode="&#xe149;" d="M561 1197q84 0 160.5 -40t123.5 -109.5t47 -147.5h-153q0 40 -19.5 71.5t-49.5 48.5t-59.5 26t-55.5 9q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -26 13.5 -63t26.5 -61t37 -66q6 -9 9 -14h241v-100h-197q8 -50 -2.5 -115t-31.5 -95q-45 -62 -99 -112 q34 10 83 17.5t71 7.5q32 1 102 -16t104 -17q83 0 136 30l50 -147q-31 -19 -58 -30.5t-55 -15.5t-42 -4.5t-46 -0.5q-23 0 -76 17t-111 32.5t-96 11.5q-39 -3 -82 -16t-67 -25l-23 -11l-55 145q4 3 16 11t15.5 10.5t13 9t15.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221v100h166q-23 47 -44 104q-7 20 -12 41.5t-6 55.5t6 66.5t29.5 70.5t58.5 71q97 88 263 88z" />
+<glyph unicode="&#xe150;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM935 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-900h-200v900h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
+<glyph unicode="&#xe151;" d="M1000 700h-100v100h-100v-100h-100v500h300v-500zM400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM801 1100v-200h100v200h-100zM1000 350l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150z " />
+<glyph unicode="&#xe152;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 1050l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150zM1000 0h-100v100h-100v-100h-100v500h300v-500zM801 400v-200h100v200h-100z " />
+<glyph unicode="&#xe153;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 700h-100v400h-100v100h200v-500zM1100 0h-100v100h-200v400h300v-500zM901 400v-200h100v200h-100z" />
+<glyph unicode="&#xe154;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1100 700h-100v100h-200v400h300v-500zM901 1100v-200h100v200h-100zM1000 0h-100v400h-100v100h200v-500z" />
+<glyph unicode="&#xe155;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM900 1000h-200v200h200v-200zM1000 700h-300v200h300v-200zM1100 400h-400v200h400v-200zM1200 100h-500v200h500v-200z" />
+<glyph unicode="&#xe156;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1200 1000h-500v200h500v-200zM1100 700h-400v200h400v-200zM1000 400h-300v200h300v-200zM900 100h-200v200h200v-200z" />
+<glyph unicode="&#xe157;" d="M350 1100h400q162 0 256 -93.5t94 -256.5v-400q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5z" />
+<glyph unicode="&#xe158;" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-163 0 -256.5 92.5t-93.5 257.5v400q0 163 94 256.5t256 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM440 770l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
+<glyph unicode="&#xe159;" d="M350 1100h400q163 0 256.5 -94t93.5 -256v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 163 92.5 256.5t257.5 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM350 700h400q21 0 26.5 -12t-6.5 -28l-190 -253q-12 -17 -30 -17t-30 17l-190 253q-12 16 -6.5 28t26.5 12z" />
+<glyph unicode="&#xe160;" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -163 -92.5 -256.5t-257.5 -93.5h-400q-163 0 -256.5 94t-93.5 256v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM580 693l190 -253q12 -16 6.5 -28t-26.5 -12h-400q-21 0 -26.5 12t6.5 28l190 253q12 17 30 17t30 -17z" />
+<glyph unicode="&#xe161;" d="M550 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h450q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-450q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM338 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
+<glyph unicode="&#xe162;" d="M793 1182l9 -9q8 -10 5 -27q-3 -11 -79 -225.5t-78 -221.5l300 1q24 0 32.5 -17.5t-5.5 -35.5q-1 0 -133.5 -155t-267 -312.5t-138.5 -162.5q-12 -15 -26 -15h-9l-9 8q-9 11 -4 32q2 9 42 123.5t79 224.5l39 110h-302q-23 0 -31 19q-10 21 6 41q75 86 209.5 237.5 t228 257t98.5 111.5q9 16 25 16h9z" />
+<glyph unicode="&#xe163;" d="M350 1100h400q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-450q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h450q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400 q0 165 92.5 257.5t257.5 92.5zM938 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
+<glyph unicode="&#xe164;" d="M750 1200h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -10.5 -25t-24.5 10l-109 109l-312 -312q-15 -15 -35.5 -15t-35.5 15l-141 141q-15 15 -15 35.5t15 35.5l312 312l-109 109q-14 14 -10 24.5t25 10.5zM456 900h-156q-41 0 -70.5 -29.5t-29.5 -70.5v-500 q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v148l200 200v-298q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5h300z" />
+<glyph unicode="&#xe165;" d="M600 1186q119 0 227.5 -46.5t187 -125t125 -187t46.5 -227.5t-46.5 -227.5t-125 -187t-187 -125t-227.5 -46.5t-227.5 46.5t-187 125t-125 187t-46.5 227.5t46.5 227.5t125 187t187 125t227.5 46.5zM600 1022q-115 0 -212 -56.5t-153.5 -153.5t-56.5 -212t56.5 -212 t153.5 -153.5t212 -56.5t212 56.5t153.5 153.5t56.5 212t-56.5 212t-153.5 153.5t-212 56.5zM600 794q80 0 137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137t57 137t137 57z" />
+<glyph unicode="&#xe166;" d="M450 1200h200q21 0 35.5 -14.5t14.5 -35.5v-350h245q20 0 25 -11t-9 -26l-383 -426q-14 -15 -33.5 -15t-32.5 15l-379 426q-13 15 -8.5 26t25.5 11h250v350q0 21 14.5 35.5t35.5 14.5zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
+<glyph unicode="&#xe167;" d="M583 1182l378 -435q14 -15 9 -31t-26 -16h-244v-250q0 -20 -17 -35t-39 -15h-200q-20 0 -32 14.5t-12 35.5v250h-250q-20 0 -25.5 16.5t8.5 31.5l383 431q14 16 33.5 17t33.5 -14zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
+<glyph unicode="&#xe168;" d="M396 723l369 369q7 7 17.5 7t17.5 -7l139 -139q7 -8 7 -18.5t-7 -17.5l-525 -525q-7 -8 -17.5 -8t-17.5 8l-292 291q-7 8 -7 18t7 18l139 139q8 7 18.5 7t17.5 -7zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50 h-100z" />
+<glyph unicode="&#xe169;" d="M135 1023l142 142q14 14 35 14t35 -14l77 -77l-212 -212l-77 76q-14 15 -14 36t14 35zM655 855l210 210q14 14 24.5 10t10.5 -25l-2 -599q-1 -20 -15.5 -35t-35.5 -15l-597 -1q-21 0 -25 10.5t10 24.5l208 208l-154 155l212 212zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5 v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
+<glyph unicode="&#xe170;" d="M350 1200l599 -2q20 -1 35 -15.5t15 -35.5l1 -597q0 -21 -10.5 -25t-24.5 10l-208 208l-155 -154l-212 212l155 154l-210 210q-14 14 -10 24.5t25 10.5zM524 512l-76 -77q-15 -14 -36 -14t-35 14l-142 142q-14 14 -14 35t14 35l77 77zM50 300h1000q21 0 35.5 -14.5 t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
+<glyph unicode="&#xe171;" d="M1200 103l-483 276l-314 -399v423h-399l1196 796v-1096zM483 424v-230l683 953z" />
+<glyph unicode="&#xe172;" d="M1100 1000v-850q0 -21 -14.5 -35.5t-35.5 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200z" />
+<glyph unicode="&#xe173;" d="M1100 1000l-2 -149l-299 -299l-95 95q-9 9 -21.5 9t-21.5 -9l-149 -147h-312v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1132 638l106 -106q7 -7 7 -17.5t-7 -17.5l-420 -421q-8 -7 -18 -7 t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l297 297q7 7 17.5 7t17.5 -7z" />
+<glyph unicode="&#xe174;" d="M1100 1000v-269l-103 -103l-134 134q-15 15 -33.5 16.5t-34.5 -12.5l-266 -266h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1202 572l70 -70q15 -15 15 -35.5t-15 -35.5l-131 -131 l131 -131q15 -15 15 -35.5t-15 -35.5l-70 -70q-15 -15 -35.5 -15t-35.5 15l-131 131l-131 -131q-15 -15 -35.5 -15t-35.5 15l-70 70q-15 15 -15 35.5t15 35.5l131 131l-131 131q-15 15 -15 35.5t15 35.5l70 70q15 15 35.5 15t35.5 -15l131 -131l131 131q15 15 35.5 15 t35.5 -15z" />
+<glyph unicode="&#xe175;" d="M1100 1000v-300h-350q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM850 600h100q21 0 35.5 -14.5t14.5 -35.5v-250h150q21 0 25 -10.5t-10 -24.5 l-230 -230q-14 -14 -35 -14t-35 14l-230 230q-14 14 -10 24.5t25 10.5h150v250q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe176;" d="M1100 1000v-400l-165 165q-14 15 -35 15t-35 -15l-263 -265h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM935 565l230 -229q14 -15 10 -25.5t-25 -10.5h-150v-250q0 -20 -14.5 -35 t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35v250h-150q-21 0 -25 10.5t10 25.5l230 229q14 15 35 15t35 -15z" />
+<glyph unicode="&#xe177;" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-150h-1200v150q0 21 14.5 35.5t35.5 14.5zM1200 800v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v550h1200zM100 500v-200h400v200h-400z" />
+<glyph unicode="&#xe178;" d="M935 1165l248 -230q14 -14 14 -35t-14 -35l-248 -230q-14 -14 -24.5 -10t-10.5 25v150h-400v200h400v150q0 21 10.5 25t24.5 -10zM200 800h-50q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v-200zM400 800h-100v200h100v-200zM18 435l247 230 q14 14 24.5 10t10.5 -25v-150h400v-200h-400v-150q0 -21 -10.5 -25t-24.5 10l-247 230q-15 14 -15 35t15 35zM900 300h-100v200h100v-200zM1000 500h51q20 0 34.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-34.5 -14.5h-51v200z" />
+<glyph unicode="&#xe179;" d="M862 1073l276 116q25 18 43.5 8t18.5 -41v-1106q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v397q-4 1 -11 5t-24 17.5t-30 29t-24 42t-11 56.5v359q0 31 18.5 65t43.5 52zM550 1200q22 0 34.5 -12.5t14.5 -24.5l1 -13v-450q0 -28 -10.5 -59.5 t-25 -56t-29 -45t-25.5 -31.5l-10 -11v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447q-4 4 -11 11.5t-24 30.5t-30 46t-24 55t-11 60v450q0 2 0.5 5.5t4 12t8.5 15t14.5 12t22.5 5.5q20 0 32.5 -12.5t14.5 -24.5l3 -13v-350h100v350v5.5t2.5 12 t7 15t15 12t25.5 5.5q23 0 35.5 -12.5t13.5 -24.5l1 -13v-350h100v350q0 2 0.5 5.5t3 12t7 15t15 12t24.5 5.5z" />
+<glyph unicode="&#xe180;" d="M1200 1100v-56q-4 0 -11 -0.5t-24 -3t-30 -7.5t-24 -15t-11 -24v-888q0 -22 25 -34.5t50 -13.5l25 -2v-56h-400v56q75 0 87.5 6.5t12.5 43.5v394h-500v-394q0 -37 12.5 -43.5t87.5 -6.5v-56h-400v56q4 0 11 0.5t24 3t30 7.5t24 15t11 24v888q0 22 -25 34.5t-50 13.5 l-25 2v56h400v-56q-75 0 -87.5 -6.5t-12.5 -43.5v-394h500v394q0 37 -12.5 43.5t-87.5 6.5v56h400z" />
+<glyph unicode="&#xe181;" d="M675 1000h375q21 0 35.5 -14.5t14.5 -35.5v-150h-105l-295 -98v98l-200 200h-400l100 100h375zM100 900h300q41 0 70.5 -29.5t29.5 -70.5v-500q0 -41 -29.5 -70.5t-70.5 -29.5h-300q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5zM100 800v-200h300v200 h-300zM1100 535l-400 -133v163l400 133v-163zM100 500v-200h300v200h-300zM1100 398v-248q0 -21 -14.5 -35.5t-35.5 -14.5h-375l-100 -100h-375l-100 100h400l200 200h105z" />
+<glyph unicode="&#xe182;" d="M17 1007l162 162q17 17 40 14t37 -22l139 -194q14 -20 11 -44.5t-20 -41.5l-119 -118q102 -142 228 -268t267 -227l119 118q17 17 42.5 19t44.5 -12l192 -136q19 -14 22.5 -37.5t-13.5 -40.5l-163 -162q-3 -1 -9.5 -1t-29.5 2t-47.5 6t-62.5 14.5t-77.5 26.5t-90 42.5 t-101.5 60t-111 83t-119 108.5q-74 74 -133.5 150.5t-94.5 138.5t-60 119.5t-34.5 100t-15 74.5t-4.5 48z" />
+<glyph unicode="&#xe183;" d="M600 1100q92 0 175 -10.5t141.5 -27t108.5 -36.5t81.5 -40t53.5 -37t31 -27l9 -10v-200q0 -21 -14.5 -33t-34.5 -9l-202 34q-20 3 -34.5 20t-14.5 38v146q-141 24 -300 24t-300 -24v-146q0 -21 -14.5 -38t-34.5 -20l-202 -34q-20 -3 -34.5 9t-14.5 33v200q3 4 9.5 10.5 t31 26t54 37.5t80.5 39.5t109 37.5t141 26.5t175 10.5zM600 795q56 0 97 -9.5t60 -23.5t30 -28t12 -24l1 -10v-50l365 -303q14 -15 24.5 -40t10.5 -45v-212q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v212q0 20 10.5 45t24.5 40l365 303v50 q0 4 1 10.5t12 23t30 29t60 22.5t97 10z" />
+<glyph unicode="&#xe184;" d="M1100 700l-200 -200h-600l-200 200v500h200v-200h200v200h200v-200h200v200h200v-500zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5 t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe185;" d="M700 1100h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-1000h300v1000q0 41 -29.5 70.5t-70.5 29.5zM1100 800h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-700h300v700q0 41 -29.5 70.5t-70.5 29.5zM400 0h-300v400q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-400z " />
+<glyph unicode="&#xe186;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
+<glyph unicode="&#xe187;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 300h-100v200h-100v-200h-100v500h100v-200h100v200h100v-500zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
+<glyph unicode="&#xe188;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-300h200v-100h-300v500h300v-100zM900 700h-200v-300h200v-100h-300v500h300v-100z" />
+<glyph unicode="&#xe189;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 400l-300 150l300 150v-300zM900 550l-300 -150v300z" />
+<glyph unicode="&#xe190;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM900 300h-700v500h700v-500zM800 700h-130q-38 0 -66.5 -43t-28.5 -108t27 -107t68 -42h130v300zM300 700v-300 h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130z" />
+<glyph unicode="&#xe191;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 300h-100v400h-100v100h200v-500z M700 300h-100v100h100v-100z" />
+<glyph unicode="&#xe192;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM300 700h200v-400h-300v500h100v-100zM900 300h-100v400h-100v100h200v-500zM300 600v-200h100v200h-100z M700 300h-100v100h100v-100z" />
+<glyph unicode="&#xe193;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 500l-199 -200h-100v50l199 200v150h-200v100h300v-300zM900 300h-100v400h-100v100h200v-500zM701 300h-100 v100h100v-100z" />
+<glyph unicode="&#xe194;" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700h-300v-200h300v-100h-300l-100 100v200l100 100h300v-100z" />
+<glyph unicode="&#xe195;" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700v-100l-50 -50l100 -100v-50h-100l-100 100h-150v-100h-100v400h300zM500 700v-100h200v100h-200z" />
+<glyph unicode="&#xe197;" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -207t-85 -207t-205 -86.5h-128v250q0 21 -14.5 35.5t-35.5 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-250h-222q-80 0 -136 57.5t-56 136.5q0 69 43 122.5t108 67.5q-2 19 -2 37q0 100 49 185 t134 134t185 49zM525 500h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -244q-13 -16 -32 -16t-32 16l-223 244q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe198;" d="M502 1089q110 0 201 -59.5t135 -156.5q43 15 89 15q121 0 206 -86.5t86 -206.5q0 -99 -60 -181t-150 -110l-378 360q-13 16 -31.5 16t-31.5 -16l-381 -365h-9q-79 0 -135.5 57.5t-56.5 136.5q0 69 43 122.5t108 67.5q-2 19 -2 38q0 100 49 184.5t133.5 134t184.5 49.5z M632 467l223 -228q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5q199 204 223 228q19 19 31.5 19t32.5 -19z" />
+<glyph unicode="&#xe199;" d="M700 100v100h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170l-270 -300h400v-100h-50q-21 0 -35.5 -14.5t-14.5 -35.5v-50h400v50q0 21 -14.5 35.5t-35.5 14.5h-50z" />
+<glyph unicode="&#xe200;" d="M600 1179q94 0 167.5 -56.5t99.5 -145.5q89 -6 150.5 -71.5t61.5 -155.5q0 -61 -29.5 -112.5t-79.5 -82.5q9 -29 9 -55q0 -74 -52.5 -126.5t-126.5 -52.5q-55 0 -100 30v-251q21 0 35.5 -14.5t14.5 -35.5v-50h-300v50q0 21 14.5 35.5t35.5 14.5v251q-45 -30 -100 -30 q-74 0 -126.5 52.5t-52.5 126.5q0 18 4 38q-47 21 -75.5 65t-28.5 97q0 74 52.5 126.5t126.5 52.5q5 0 23 -2q0 2 -1 10t-1 13q0 116 81.5 197.5t197.5 81.5z" />
+<glyph unicode="&#xe201;" d="M1010 1010q111 -111 150.5 -260.5t0 -299t-150.5 -260.5q-83 -83 -191.5 -126.5t-218.5 -43.5t-218.5 43.5t-191.5 126.5q-111 111 -150.5 260.5t0 299t150.5 260.5q83 83 191.5 126.5t218.5 43.5t218.5 -43.5t191.5 -126.5zM476 1065q-4 0 -8 -1q-121 -34 -209.5 -122.5 t-122.5 -209.5q-4 -12 2.5 -23t18.5 -14l36 -9q3 -1 7 -1q23 0 29 22q27 96 98 166q70 71 166 98q11 3 17.5 13.5t3.5 22.5l-9 35q-3 13 -14 19q-7 4 -15 4zM512 920q-4 0 -9 -2q-80 -24 -138.5 -82.5t-82.5 -138.5q-4 -13 2 -24t19 -14l34 -9q4 -1 8 -1q22 0 28 21 q18 58 58.5 98.5t97.5 58.5q12 3 18 13.5t3 21.5l-9 35q-3 12 -14 19q-7 4 -15 4zM719.5 719.5q-49.5 49.5 -119.5 49.5t-119.5 -49.5t-49.5 -119.5t49.5 -119.5t119.5 -49.5t119.5 49.5t49.5 119.5t-49.5 119.5zM855 551q-22 0 -28 -21q-18 -58 -58.5 -98.5t-98.5 -57.5 q-11 -4 -17 -14.5t-3 -21.5l9 -35q3 -12 14 -19q7 -4 15 -4q4 0 9 2q80 24 138.5 82.5t82.5 138.5q4 13 -2.5 24t-18.5 14l-34 9q-4 1 -8 1zM1000 515q-23 0 -29 -22q-27 -96 -98 -166q-70 -71 -166 -98q-11 -3 -17.5 -13.5t-3.5 -22.5l9 -35q3 -13 14 -19q7 -4 15 -4 q4 0 8 1q121 34 209.5 122.5t122.5 209.5q4 12 -2.5 23t-18.5 14l-36 9q-3 1 -7 1z" />
+<glyph unicode="&#xe202;" d="M700 800h300v-380h-180v200h-340v-200h-380v755q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM700 300h162l-212 -212l-212 212h162v200h100v-200zM520 0h-395q-10 0 -17.5 7.5t-7.5 17.5v395zM1000 220v-195q0 -10 -7.5 -17.5t-17.5 -7.5h-195z" />
+<glyph unicode="&#xe203;" d="M700 800h300v-520l-350 350l-550 -550v1095q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM862 200h-162v-200h-100v200h-162l212 212zM480 0h-355q-10 0 -17.5 7.5t-7.5 17.5v55h380v-80zM1000 80v-55q0 -10 -7.5 -17.5t-17.5 -7.5h-155v80h180z" />
+<glyph unicode="&#xe204;" d="M1162 800h-162v-200h100l100 -100h-300v300h-162l212 212zM200 800h200q27 0 40 -2t29.5 -10.5t23.5 -30t7 -57.5h300v-100h-600l-200 -350v450h100q0 36 7 57.5t23.5 30t29.5 10.5t40 2zM800 400h240l-240 -400h-800l300 500h500v-100z" />
+<glyph unicode="&#xe205;" d="M650 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM1000 850v150q41 0 70.5 -29.5t29.5 -70.5v-800 q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-1 0 -20 4l246 246l-326 326v324q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM412 250l-212 -212v162h-200v100h200v162z" />
+<glyph unicode="&#xe206;" d="M450 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM800 850v150q41 0 70.5 -29.5t29.5 -70.5v-500 h-200v-300h200q0 -36 -7 -57.5t-23.5 -30t-29.5 -10.5t-40 -2h-600q-41 0 -70.5 29.5t-29.5 70.5v800q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM1212 250l-212 -212v162h-200v100h200v162z" />
+<glyph unicode="&#xe209;" d="M658 1197l637 -1104q23 -38 7 -65.5t-60 -27.5h-1276q-44 0 -60 27.5t7 65.5l637 1104q22 39 54 39t54 -39zM704 800h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM500 300v-100h200 v100h-200z" />
+<glyph unicode="&#xe210;" d="M425 1100h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM825 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM25 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5zM425 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5 v150q0 10 7.5 17.5t17.5 7.5zM25 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe211;" d="M700 1200h100v-200h-100v-100h350q62 0 86.5 -39.5t-3.5 -94.5l-66 -132q-41 -83 -81 -134h-772q-40 51 -81 134l-66 132q-28 55 -3.5 94.5t86.5 39.5h350v100h-100v200h100v100h200v-100zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100 h-950l138 100h-13q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe212;" d="M600 1300q40 0 68.5 -29.5t28.5 -70.5h-194q0 41 28.5 70.5t68.5 29.5zM443 1100h314q18 -37 18 -75q0 -8 -3 -25h328q41 0 44.5 -16.5t-30.5 -38.5l-175 -145h-678l-178 145q-34 22 -29 38.5t46 16.5h328q-3 17 -3 25q0 38 18 75zM250 700h700q21 0 35.5 -14.5 t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-150v-200l275 -200h-950l275 200v200h-150q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe213;" d="M600 1181q75 0 128 -53t53 -128t-53 -128t-128 -53t-128 53t-53 128t53 128t128 53zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13 l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe214;" d="M600 1300q47 0 92.5 -53.5t71 -123t25.5 -123.5q0 -78 -55.5 -133.5t-133.5 -55.5t-133.5 55.5t-55.5 133.5q0 62 34 143l144 -143l111 111l-163 163q34 26 63 26zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45 zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe215;" d="M600 1200l300 -161v-139h-300q0 -57 18.5 -108t50 -91.5t63 -72t70 -67.5t57.5 -61h-530q-60 83 -90.5 177.5t-30.5 178.5t33 164.5t87.5 139.5t126 96.5t145.5 41.5v-98zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100 h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe216;" d="M600 1300q41 0 70.5 -29.5t29.5 -70.5v-78q46 -26 73 -72t27 -100v-50h-400v50q0 54 27 100t73 72v78q0 41 29.5 70.5t70.5 29.5zM400 800h400q54 0 100 -27t72 -73h-172v-100h200v-100h-200v-100h200v-100h-200v-100h200q0 -83 -58.5 -141.5t-141.5 -58.5h-400 q-83 0 -141.5 58.5t-58.5 141.5v400q0 83 58.5 141.5t141.5 58.5z" />
+<glyph unicode="&#xe218;" d="M150 1100h900q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM125 400h950q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-283l224 -224q13 -13 13 -31.5t-13 -32 t-31.5 -13.5t-31.5 13l-88 88h-524l-87 -88q-13 -13 -32 -13t-32 13.5t-13 32t13 31.5l224 224h-289q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM541 300l-100 -100h324l-100 100h-124z" />
+<glyph unicode="&#xe219;" d="M200 1100h800q83 0 141.5 -58.5t58.5 -141.5v-200h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100v200q0 83 58.5 141.5t141.5 58.5zM100 600h1000q41 0 70.5 -29.5 t29.5 -70.5v-300h-1200v300q0 41 29.5 70.5t70.5 29.5zM300 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200zM1100 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200z" />
+<glyph unicode="&#xe221;" d="M480 1165l682 -683q31 -31 31 -75.5t-31 -75.5l-131 -131h-481l-517 518q-32 31 -32 75.5t32 75.5l295 296q31 31 75.5 31t76.5 -31zM108 794l342 -342l303 304l-341 341zM250 100h800q21 0 35.5 -14.5t14.5 -35.5v-50h-900v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe223;" d="M1057 647l-189 506q-8 19 -27.5 33t-40.5 14h-400q-21 0 -40.5 -14t-27.5 -33l-189 -506q-8 -19 1.5 -33t30.5 -14h625v-150q0 -21 14.5 -35.5t35.5 -14.5t35.5 14.5t14.5 35.5v150h125q21 0 30.5 14t1.5 33zM897 0h-595v50q0 21 14.5 35.5t35.5 14.5h50v50 q0 21 14.5 35.5t35.5 14.5h48v300h200v-300h47q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-50z" />
+<glyph unicode="&#xe224;" d="M900 800h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-375v591l-300 300v84q0 10 7.5 17.5t17.5 7.5h375v-400zM1200 900h-200v200zM400 600h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-650q-10 0 -17.5 7.5t-7.5 17.5v950q0 10 7.5 17.5t17.5 7.5h375v-400zM700 700h-200v200z " />
+<glyph unicode="&#xe225;" d="M484 1095h195q75 0 146 -32.5t124 -86t89.5 -122.5t48.5 -142q18 -14 35 -20q31 -10 64.5 6.5t43.5 48.5q10 34 -15 71q-19 27 -9 43q5 8 12.5 11t19 -1t23.5 -16q41 -44 39 -105q-3 -63 -46 -106.5t-104 -43.5h-62q-7 -55 -35 -117t-56 -100l-39 -234q-3 -20 -20 -34.5 t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l12 70q-49 -14 -91 -14h-195q-24 0 -65 8l-11 -64q-3 -20 -20 -34.5t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l26 157q-84 74 -128 175l-159 53q-19 7 -33 26t-14 40v50q0 21 14.5 35.5t35.5 14.5h124q11 87 56 166l-111 95 q-16 14 -12.5 23.5t24.5 9.5h203q116 101 250 101zM675 1000h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h250q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="&#xe226;" d="M641 900l423 247q19 8 42 2.5t37 -21.5l32 -38q14 -15 12.5 -36t-17.5 -34l-139 -120h-390zM50 1100h106q67 0 103 -17t66 -71l102 -212h823q21 0 35.5 -14.5t14.5 -35.5v-50q0 -21 -14 -40t-33 -26l-737 -132q-23 -4 -40 6t-26 25q-42 67 -100 67h-300q-62 0 -106 44 t-44 106v200q0 62 44 106t106 44zM173 928h-80q-19 0 -28 -14t-9 -35v-56q0 -51 42 -51h134q16 0 21.5 8t5.5 24q0 11 -16 45t-27 51q-18 28 -43 28zM550 727q-32 0 -54.5 -22.5t-22.5 -54.5t22.5 -54.5t54.5 -22.5t54.5 22.5t22.5 54.5t-22.5 54.5t-54.5 22.5zM130 389 l152 130q18 19 34 24t31 -3.5t24.5 -17.5t25.5 -28q28 -35 50.5 -51t48.5 -13l63 5l48 -179q13 -61 -3.5 -97.5t-67.5 -79.5l-80 -69q-47 -40 -109 -35.5t-103 51.5l-130 151q-40 47 -35.5 109.5t51.5 102.5zM380 377l-102 -88q-31 -27 2 -65l37 -43q13 -15 27.5 -19.5 t31.5 6.5l61 53q19 16 14 49q-2 20 -12 56t-17 45q-11 12 -19 14t-23 -8z" />
+<glyph unicode="&#xe227;" d="M625 1200h150q10 0 17.5 -7.5t7.5 -17.5v-109q79 -33 131 -87.5t53 -128.5q1 -46 -15 -84.5t-39 -61t-46 -38t-39 -21.5l-17 -6q6 0 15 -1.5t35 -9t50 -17.5t53 -30t50 -45t35.5 -64t14.5 -84q0 -59 -11.5 -105.5t-28.5 -76.5t-44 -51t-49.5 -31.5t-54.5 -16t-49.5 -6.5 t-43.5 -1v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-100v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-175q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v600h-75q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5h175v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h100v75q0 10 7.5 17.5t17.5 7.5zM400 900v-200h263q28 0 48.5 10.5t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-263zM400 500v-200h363q28 0 48.5 10.5 t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-363z" />
+<glyph unicode="&#xe230;" d="M212 1198h780q86 0 147 -61t61 -147v-416q0 -51 -18 -142.5t-36 -157.5l-18 -66q-29 -87 -93.5 -146.5t-146.5 -59.5h-572q-82 0 -147 59t-93 147q-8 28 -20 73t-32 143.5t-20 149.5v416q0 86 61 147t147 61zM600 1045q-70 0 -132.5 -11.5t-105.5 -30.5t-78.5 -41.5 t-57 -45t-36 -41t-20.5 -30.5l-6 -12l156 -243h560l156 243q-2 5 -6 12.5t-20 29.5t-36.5 42t-57 44.5t-79 42t-105 29.5t-132.5 12zM762 703h-157l195 261z" />
+<glyph unicode="&#xe231;" d="M475 1300h150q103 0 189 -86t86 -189v-500q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
+<glyph unicode="&#xe232;" d="M475 1300h96q0 -150 89.5 -239.5t239.5 -89.5v-446q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
+<glyph unicode="&#xe233;" d="M1294 767l-638 -283l-378 170l-78 -60v-224l100 -150v-199l-150 148l-150 -149v200l100 150v250q0 4 -0.5 10.5t0 9.5t1 8t3 8t6.5 6l47 40l-147 65l642 283zM1000 380l-350 -166l-350 166v147l350 -165l350 165v-147z" />
+<glyph unicode="&#xe234;" d="M250 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM650 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM1050 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
+<glyph unicode="&#xe235;" d="M550 1100q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 700q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 300q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
+<glyph unicode="&#xe236;" d="M125 1100h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM125 700h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM125 300h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe237;" d="M350 1200h500q162 0 256 -93.5t94 -256.5v-500q0 -165 -93.5 -257.5t-256.5 -92.5h-500q-165 0 -257.5 92.5t-92.5 257.5v500q0 165 92.5 257.5t257.5 92.5zM900 1000h-600q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h600q41 0 70.5 29.5 t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5zM350 900h500q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-500q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 14.5 35.5t35.5 14.5zM400 800v-200h400v200h-400z" />
+<glyph unicode="&#xe238;" d="M150 1100h1000q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe239;" d="M650 1187q87 -67 118.5 -156t0 -178t-118.5 -155q-87 66 -118.5 155t0 178t118.5 156zM300 800q124 0 212 -88t88 -212q-124 0 -212 88t-88 212zM1000 800q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM300 500q124 0 212 -88t88 -212q-124 0 -212 88t-88 212z M1000 500q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM700 199v-144q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v142q40 -4 43 -4q17 0 57 6z" />
+<glyph unicode="&#xe240;" d="M745 878l69 19q25 6 45 -12l298 -295q11 -11 15 -26.5t-2 -30.5q-5 -14 -18 -23.5t-28 -9.5h-8q1 0 1 -13q0 -29 -2 -56t-8.5 -62t-20 -63t-33 -53t-51 -39t-72.5 -14h-146q-184 0 -184 288q0 24 10 47q-20 4 -62 4t-63 -4q11 -24 11 -47q0 -288 -184 -288h-142 q-48 0 -84.5 21t-56 51t-32 71.5t-16 75t-3.5 68.5q0 13 2 13h-7q-15 0 -27.5 9.5t-18.5 23.5q-6 15 -2 30.5t15 25.5l298 296q20 18 46 11l76 -19q20 -5 30.5 -22.5t5.5 -37.5t-22.5 -31t-37.5 -5l-51 12l-182 -193h891l-182 193l-44 -12q-20 -5 -37.5 6t-22.5 31t6 37.5 t31 22.5z" />
+<glyph unicode="&#xe241;" d="M1200 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM500 450h-25q0 15 -4 24.5t-9 14.5t-17 7.5t-20 3t-25 0.5h-100v-425q0 -11 12.5 -17.5t25.5 -7.5h12v-50h-200v50q50 0 50 25v425h-100q-17 0 -25 -0.5t-20 -3t-17 -7.5t-9 -14.5t-4 -24.5h-25v150h500v-150z" />
+<glyph unicode="&#xe242;" d="M1000 300v50q-25 0 -55 32q-14 14 -25 31t-16 27l-4 11l-289 747h-69l-300 -754q-18 -35 -39 -56q-9 -9 -24.5 -18.5t-26.5 -14.5l-11 -5v-50h273v50q-49 0 -78.5 21.5t-11.5 67.5l69 176h293l61 -166q13 -34 -3.5 -66.5t-55.5 -32.5v-50h312zM412 691l134 342l121 -342 h-255zM1100 150v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5z" />
+<glyph unicode="&#xe243;" d="M50 1200h1100q21 0 35.5 -14.5t14.5 -35.5v-1100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5zM611 1118h-70q-13 0 -18 -12l-299 -753q-17 -32 -35 -51q-18 -18 -56 -34q-12 -5 -12 -18v-50q0 -8 5.5 -14t14.5 -6 h273q8 0 14 6t6 14v50q0 8 -6 14t-14 6q-55 0 -71 23q-10 14 0 39l63 163h266l57 -153q11 -31 -6 -55q-12 -17 -36 -17q-8 0 -14 -6t-6 -14v-50q0 -8 6 -14t14 -6h313q8 0 14 6t6 14v50q0 7 -5.5 13t-13.5 7q-17 0 -42 25q-25 27 -40 63h-1l-288 748q-5 12 -19 12zM639 611 h-197l103 264z" />
+<glyph unicode="&#xe244;" d="M1200 1100h-1200v100h1200v-100zM50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 1000h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM700 900v-300h300v300h-300z" />
+<glyph unicode="&#xe245;" d="M50 1200h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 700h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM700 600v-300h300v300h-300zM1200 0h-1200v100h1200v-100z" />
+<glyph unicode="&#xe246;" d="M50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-350h100v150q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-150h100v-100h-100v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v150h-100v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM700 700v-300h300v300h-300z" />
+<glyph unicode="&#xe247;" d="M100 0h-100v1200h100v-1200zM250 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM300 1000v-300h300v300h-300zM250 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe248;" d="M600 1100h150q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-100h450q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h350v100h-150q-21 0 -35.5 14.5 t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h150v100h100v-100zM400 1000v-300h300v300h-300z" />
+<glyph unicode="&#xe249;" d="M1200 0h-100v1200h100v-1200zM550 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM600 1000v-300h300v300h-300zM50 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe250;" d="M865 565l-494 -494q-23 -23 -41 -23q-14 0 -22 13.5t-8 38.5v1000q0 25 8 38.5t22 13.5q18 0 41 -23l494 -494q14 -14 14 -35t-14 -35z" />
+<glyph unicode="&#xe251;" d="M335 635l494 494q29 29 50 20.5t21 -49.5v-1000q0 -41 -21 -49.5t-50 20.5l-494 494q-14 14 -14 35t14 35z" />
+<glyph unicode="&#xe252;" d="M100 900h1000q41 0 49.5 -21t-20.5 -50l-494 -494q-14 -14 -35 -14t-35 14l-494 494q-29 29 -20.5 50t49.5 21z" />
+<glyph unicode="&#xe253;" d="M635 865l494 -494q29 -29 20.5 -50t-49.5 -21h-1000q-41 0 -49.5 21t20.5 50l494 494q14 14 35 14t35 -14z" />
+<glyph unicode="&#xe254;" d="M700 741v-182l-692 -323v221l413 193l-413 193v221zM1200 0h-800v200h800v-200z" />
+<glyph unicode="&#xe255;" d="M1200 900h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300zM0 700h50q0 21 4 37t9.5 26.5t18 17.5t22 11t28.5 5.5t31 2t37 0.5h100v-550q0 -22 -25 -34.5t-50 -13.5l-25 -2v-100h400v100q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v550h100q25 0 37 -0.5t31 -2 t28.5 -5.5t22 -11t18 -17.5t9.5 -26.5t4 -37h50v300h-800v-300z" />
+<glyph unicode="&#xe256;" d="M800 700h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-100v-550q0 -22 25 -34.5t50 -14.5l25 -1v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v550h-100q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h800v-300zM1100 200h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300z" />
+<glyph unicode="&#xe257;" d="M701 1098h160q16 0 21 -11t-7 -23l-464 -464l464 -464q12 -12 7 -23t-21 -11h-160q-13 0 -23 9l-471 471q-7 8 -7 18t7 18l471 471q10 9 23 9z" />
+<glyph unicode="&#xe258;" d="M339 1098h160q13 0 23 -9l471 -471q7 -8 7 -18t-7 -18l-471 -471q-10 -9 -23 -9h-160q-16 0 -21 11t7 23l464 464l-464 464q-12 12 -7 23t21 11z" />
+<glyph unicode="&#xe259;" d="M1087 882q11 -5 11 -21v-160q0 -13 -9 -23l-471 -471q-8 -7 -18 -7t-18 7l-471 471q-9 10 -9 23v160q0 16 11 21t23 -7l464 -464l464 464q12 12 23 7z" />
+<glyph unicode="&#xe260;" d="M618 993l471 -471q9 -10 9 -23v-160q0 -16 -11 -21t-23 7l-464 464l-464 -464q-12 -12 -23 -7t-11 21v160q0 13 9 23l471 471q8 7 18 7t18 -7z" />
+<glyph unicode="&#xf8ff;" d="M1000 1200q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM450 1000h100q21 0 40 -14t26 -33l79 -194q5 1 16 3q34 6 54 9.5t60 7t65.5 1t61 -10t56.5 -23t42.5 -42t29 -64t5 -92t-19.5 -121.5q-1 -7 -3 -19.5t-11 -50t-20.5 -73t-32.5 -81.5t-46.5 -83t-64 -70 t-82.5 -50q-13 -5 -42 -5t-65.5 2.5t-47.5 2.5q-14 0 -49.5 -3.5t-63 -3.5t-43.5 7q-57 25 -104.5 78.5t-75 111.5t-46.5 112t-26 90l-7 35q-15 63 -18 115t4.5 88.5t26 64t39.5 43.5t52 25.5t58.5 13t62.5 2t59.5 -4.5t55.5 -8l-147 192q-12 18 -5.5 30t27.5 12z" />
+<glyph unicode="&#x1f511;" d="M250 1200h600q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-500l-255 -178q-19 -9 -32 -1t-13 29v650h-150q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM400 1100v-100h300v100h-300z" />
+<glyph unicode="&#x1f6aa;" d="M250 1200h750q39 0 69.5 -40.5t30.5 -84.5v-933l-700 -117v950l600 125h-700v-1000h-100v1025q0 23 15.5 49t34.5 26zM500 525v-100l100 20v100z" />
+</font>
+</defs></svg> \ No newline at end of file
diff --git a/common/src/main/webapp/framework/browser/thirdparty/fonts/glyphicons-halflings-regular.ttf b/common/src/main/webapp/framework/browser/thirdparty/fonts/glyphicons-halflings-regular.ttf
new file mode 100644
index 0000000..1413fc6
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/fonts/glyphicons-halflings-regular.ttf
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/fonts/glyphicons-halflings-regular.woff b/common/src/main/webapp/framework/browser/thirdparty/fonts/glyphicons-halflings-regular.woff
new file mode 100644
index 0000000..9e61285
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/fonts/glyphicons-halflings-regular.woff
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/fonts/glyphicons-halflings-regular.woff2 b/common/src/main/webapp/framework/browser/thirdparty/fonts/glyphicons-halflings-regular.woff2
new file mode 100644
index 0000000..64539b5
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/fonts/glyphicons-halflings-regular.woff2
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/images/collapse_arrow.png b/common/src/main/webapp/framework/browser/thirdparty/images/collapse_arrow.png
new file mode 100644
index 0000000..8830741
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/images/collapse_arrow.png
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/images/delete.png b/common/src/main/webapp/framework/browser/thirdparty/images/delete.png
new file mode 100644
index 0000000..737f879
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/images/delete.png
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/images/edit.png b/common/src/main/webapp/framework/browser/thirdparty/images/edit.png
new file mode 100644
index 0000000..68d7625
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/images/edit.png
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/images/expand_arrow.png b/common/src/main/webapp/framework/browser/thirdparty/images/expand_arrow.png
new file mode 100644
index 0000000..f8935e1
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/images/expand_arrow.png
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/images/openo.png b/common/src/main/webapp/framework/browser/thirdparty/images/openo.png
new file mode 100644
index 0000000..328b735
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/images/openo.png
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/images/searchicon.png b/common/src/main/webapp/framework/browser/thirdparty/images/searchicon.png
new file mode 100644
index 0000000..960dea1
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/images/searchicon.png
Binary files differ
diff --git a/common/src/main/webapp/framework/browser/thirdparty/js/angular-ui-router.min.js b/common/src/main/webapp/framework/browser/thirdparty/js/angular-ui-router.min.js
new file mode 100644
index 0000000..ef1e08e
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/js/angular-ui-router.min.js
@@ -0,0 +1,8 @@
+/**
+ * State-based routing for AngularJS
+ * @version v0.3.1
+ * @link http://angular-ui.github.com/
+ * @license MIT License, http://www.opensource.org/licenses/MIT
+ */
+"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(a,b,c){"use strict";function d(a,b){return R(new(R(function(){},{prototype:a})),b)}function e(a){return Q(arguments,function(b){b!==a&&Q(b,function(b,c){a.hasOwnProperty(c)||(a[c]=b)})}),a}function f(a,b){var c=[];for(var d in a.path){if(a.path[d]!==b.path[d])break;c.push(a.path[d])}return c}function g(a){if(Object.keys)return Object.keys(a);var b=[];return Q(a,function(a,c){b.push(c)}),b}function h(a,b){if(Array.prototype.indexOf)return a.indexOf(b,Number(arguments[2])||0);var c=a.length>>>0,d=Number(arguments[2])||0;for(d=0>d?Math.ceil(d):Math.floor(d),0>d&&(d+=c);c>d;d++)if(d in a&&a[d]===b)return d;return-1}function i(a,b,c,d){var e,i=f(c,d),j={},k=[];for(var l in i)if(i[l]&&i[l].params&&(e=g(i[l].params),e.length))for(var m in e)h(k,e[m])>=0||(k.push(e[m]),j[e[m]]=a[e[m]]);return R({},j,b)}function j(a,b,c){if(!c){c=[];for(var d in a)c.push(d)}for(var e=0;e<c.length;e++){var f=c[e];if(a[f]!=b[f])return!1}return!0}function k(a,b){var c={};return Q(a,function(a){c[a]=b[a]}),c}function l(a){var b={},c=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));return Q(c,function(c){c in a&&(b[c]=a[c])}),b}function m(a){var b={},c=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));for(var d in a)-1==h(c,d)&&(b[d]=a[d]);return b}function n(a,b){var c=P(a),d=c?[]:{};return Q(a,function(a,e){b(a,e)&&(d[c?d.length:e]=a)}),d}function o(a,b){var c=P(a)?[]:{};return Q(a,function(a,d){c[d]=b(a,d)}),c}function p(a,b){var d=1,f=2,i={},j=[],k=i,l=R(a.when(i),{$$promises:i,$$values:i});this.study=function(i){function n(a,c){if(s[c]!==f){if(r.push(c),s[c]===d)throw r.splice(0,h(r,c)),new Error("Cyclic dependency: "+r.join(" -> "));if(s[c]=d,N(a))q.push(c,[function(){return b.get(a)}],j);else{var e=b.annotate(a);Q(e,function(a){a!==c&&i.hasOwnProperty(a)&&n(i[a],a)}),q.push(c,a,e)}r.pop(),s[c]=f}}function o(a){return O(a)&&a.then&&a.$$promises}if(!O(i))throw new Error("'invocables' must be an object");var p=g(i||{}),q=[],r=[],s={};return Q(i,n),i=r=s=null,function(d,f,g){function h(){--u||(v||e(t,f.$$values),r.$$values=t,r.$$promises=r.$$promises||!0,delete r.$$inheritedValues,n.resolve(t))}function i(a){r.$$failure=a,n.reject(a)}function j(c,e,f){function j(a){l.reject(a),i(a)}function k(){if(!L(r.$$failure))try{l.resolve(b.invoke(e,g,t)),l.promise.then(function(a){t[c]=a,h()},j)}catch(a){j(a)}}var l=a.defer(),m=0;Q(f,function(a){s.hasOwnProperty(a)&&!d.hasOwnProperty(a)&&(m++,s[a].then(function(b){t[a]=b,--m||k()},j))}),m||k(),s[c]=l.promise}if(o(d)&&g===c&&(g=f,f=d,d=null),d){if(!O(d))throw new Error("'locals' must be an object")}else d=k;if(f){if(!o(f))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else f=l;var n=a.defer(),r=n.promise,s=r.$$promises={},t=R({},d),u=1+q.length/3,v=!1;if(L(f.$$failure))return i(f.$$failure),r;f.$$inheritedValues&&e(t,m(f.$$inheritedValues,p)),R(s,f.$$promises),f.$$values?(v=e(t,m(f.$$values,p)),r.$$inheritedValues=m(f.$$values,p),h()):(f.$$inheritedValues&&(r.$$inheritedValues=m(f.$$inheritedValues,p)),f.then(h,i));for(var w=0,x=q.length;x>w;w+=3)d.hasOwnProperty(q[w])?h():j(q[w],q[w+1],q[w+2]);return r}},this.resolve=function(a,b,c,d){return this.study(a)(b,c,d)}}function q(a,b,c){this.fromConfig=function(a,b,c){return L(a.template)?this.fromString(a.template,b):L(a.templateUrl)?this.fromUrl(a.templateUrl,b):L(a.templateProvider)?this.fromProvider(a.templateProvider,b,c):null},this.fromString=function(a,b){return M(a)?a(b):a},this.fromUrl=function(c,d){return M(c)&&(c=c(d)),null==c?null:a.get(c,{cache:b,headers:{Accept:"text/html"}}).then(function(a){return a.data})},this.fromProvider=function(a,b,d){return c.invoke(a,null,d||{params:b})}}function r(a,b,e){function f(b,c,d,e){if(q.push(b),o[b])return o[b];if(!/^\w+([-.]+\w+)*(?:\[\])?$/.test(b))throw new Error("Invalid parameter name '"+b+"' in pattern '"+a+"'");if(p[b])throw new Error("Duplicate parameter name '"+b+"' in pattern '"+a+"'");return p[b]=new U.Param(b,c,d,e),p[b]}function g(a,b,c,d){var e=["",""],f=a.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!b)return f;switch(c){case!1:e=["(",")"+(d?"?":"")];break;case!0:f=f.replace(/\/$/,""),e=["(?:/(",")|/)?"];break;default:e=["("+c+"|",")?"]}return f+e[0]+b+e[1]}function h(e,f){var g,h,i,j,k;return g=e[2]||e[3],k=b.params[g],i=a.substring(m,e.index),h=f?e[4]:e[4]||("*"==e[1]?".*":null),h&&(j=U.type(h)||d(U.type("string"),{pattern:new RegExp(h,b.caseInsensitive?"i":c)})),{id:g,regexp:h,segment:i,type:j,cfg:k}}b=R({params:{}},O(b)?b:{});var i,j=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,k=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,l="^",m=0,n=this.segments=[],o=e?e.params:{},p=this.params=e?e.params.$$new():new U.ParamSet,q=[];this.source=a;for(var r,s,t;(i=j.exec(a))&&(r=h(i,!1),!(r.segment.indexOf("?")>=0));)s=f(r.id,r.type,r.cfg,"path"),l+=g(r.segment,s.type.pattern.source,s.squash,s.isOptional),n.push(r.segment),m=j.lastIndex;t=a.substring(m);var u=t.indexOf("?");if(u>=0){var v=this.sourceSearch=t.substring(u);if(t=t.substring(0,u),this.sourcePath=a.substring(0,m+u),v.length>0)for(m=0;i=k.exec(v);)r=h(i,!0),s=f(r.id,r.type,r.cfg,"search"),m=j.lastIndex}else this.sourcePath=a,this.sourceSearch="";l+=g(t)+(b.strict===!1?"/?":"")+"$",n.push(t),this.regexp=new RegExp(l,b.caseInsensitive?"i":c),this.prefix=n[0],this.$$paramNames=q}function s(a){R(this,a)}function t(){function a(a){return null!=a?a.toString().replace(/~/g,"~~").replace(/\//g,"~2F"):a}function e(a){return null!=a?a.toString().replace(/~2F/g,"/").replace(/~~/g,"~"):a}function f(){return{strict:p,caseInsensitive:m}}function i(a){return M(a)||P(a)&&M(a[a.length-1])}function j(){for(;w.length;){var a=w.shift();if(a.pattern)throw new Error("You cannot override a type's .pattern at runtime.");b.extend(u[a.name],l.invoke(a.def))}}function k(a){R(this,a||{})}U=this;var l,m=!1,p=!0,q=!1,u={},v=!0,w=[],x={string:{encode:a,decode:e,is:function(a){return null==a||!L(a)||"string"==typeof a},pattern:/[^\/]*/},"int":{encode:a,decode:function(a){return parseInt(a,10)},is:function(a){return L(a)&&this.decode(a.toString())===a},pattern:/\d+/},bool:{encode:function(a){return a?1:0},decode:function(a){return 0!==parseInt(a,10)},is:function(a){return a===!0||a===!1},pattern:/0|1/},date:{encode:function(a){return this.is(a)?[a.getFullYear(),("0"+(a.getMonth()+1)).slice(-2),("0"+a.getDate()).slice(-2)].join("-"):c},decode:function(a){if(this.is(a))return a;var b=this.capture.exec(a);return b?new Date(b[1],b[2]-1,b[3]):c},is:function(a){return a instanceof Date&&!isNaN(a.valueOf())},equals:function(a,b){return this.is(a)&&this.is(b)&&a.toISOString()===b.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:b.toJson,decode:b.fromJson,is:b.isObject,equals:b.equals,pattern:/[^\/]*/},any:{encode:b.identity,decode:b.identity,equals:b.equals,pattern:/.*/}};t.$$getDefaultValue=function(a){if(!i(a.value))return a.value;if(!l)throw new Error("Injectable functions cannot be called at configuration time");return l.invoke(a.value)},this.caseInsensitive=function(a){return L(a)&&(m=a),m},this.strictMode=function(a){return L(a)&&(p=a),p},this.defaultSquashPolicy=function(a){if(!L(a))return q;if(a!==!0&&a!==!1&&!N(a))throw new Error("Invalid squash policy: "+a+". Valid policies: false, true, arbitrary-string");return q=a,a},this.compile=function(a,b){return new r(a,R(f(),b))},this.isMatcher=function(a){if(!O(a))return!1;var b=!0;return Q(r.prototype,function(c,d){M(c)&&(b=b&&L(a[d])&&M(a[d]))}),b},this.type=function(a,b,c){if(!L(b))return u[a];if(u.hasOwnProperty(a))throw new Error("A type named '"+a+"' has already been defined.");return u[a]=new s(R({name:a},b)),c&&(w.push({name:a,def:c}),v||j()),this},Q(x,function(a,b){u[b]=new s(R({name:b},a))}),u=d(u,{}),this.$get=["$injector",function(a){return l=a,v=!1,j(),Q(x,function(a,b){u[b]||(u[b]=new s(a))}),this}],this.Param=function(a,d,e,f){function j(a){var b=O(a)?g(a):[],c=-1===h(b,"value")&&-1===h(b,"type")&&-1===h(b,"squash")&&-1===h(b,"array");return c&&(a={value:a}),a.$$fn=i(a.value)?a.value:function(){return a.value},a}function k(c,d,e){if(c.type&&d)throw new Error("Param '"+a+"' has two type configurations.");return d?d:c.type?b.isString(c.type)?u[c.type]:c.type instanceof s?c.type:new s(c.type):"config"===e?u.any:u.string}function m(){var b={array:"search"===f?"auto":!1},c=a.match(/\[\]$/)?{array:!0}:{};return R(b,c,e).array}function p(a,b){var c=a.squash;if(!b||c===!1)return!1;if(!L(c)||null==c)return q;if(c===!0||N(c))return c;throw new Error("Invalid squash policy: '"+c+"'. Valid policies: false, true, or arbitrary string")}function r(a,b,d,e){var f,g,i=[{from:"",to:d||b?c:""},{from:null,to:d||b?c:""}];return f=P(a.replace)?a.replace:[],N(e)&&f.push({from:e,to:c}),g=o(f,function(a){return a.from}),n(i,function(a){return-1===h(g,a.from)}).concat(f)}function t(){if(!l)throw new Error("Injectable functions cannot be called at configuration time");var a=l.invoke(e.$$fn);if(null!==a&&a!==c&&!x.type.is(a))throw new Error("Default value ("+a+") for parameter '"+x.id+"' is not an instance of Type ("+x.type.name+")");return a}function v(a){function b(a){return function(b){return b.from===a}}function c(a){var c=o(n(x.replace,b(a)),function(a){return a.to});return c.length?c[0]:a}return a=c(a),L(a)?x.type.$normalize(a):t()}function w(){return"{Param:"+a+" "+d+" squash: '"+A+"' optional: "+z+"}"}var x=this;e=j(e),d=k(e,d,f);var y=m();d=y?d.$asArray(y,"search"===f):d,"string"!==d.name||y||"path"!==f||e.value!==c||(e.value="");var z=e.value!==c,A=p(e,z),B=r(e,y,z,A);R(this,{id:a,type:d,location:f,array:y,squash:A,replace:B,isOptional:z,value:v,dynamic:c,config:e,toString:w})},k.prototype={$$new:function(){return d(this,R(new k,{$$parent:this}))},$$keys:function(){for(var a=[],b=[],c=this,d=g(k.prototype);c;)b.push(c),c=c.$$parent;return b.reverse(),Q(b,function(b){Q(g(b),function(b){-1===h(a,b)&&-1===h(d,b)&&a.push(b)})}),a},$$values:function(a){var b={},c=this;return Q(c.$$keys(),function(d){b[d]=c[d].value(a&&a[d])}),b},$$equals:function(a,b){var c=!0,d=this;return Q(d.$$keys(),function(e){var f=a&&a[e],g=b&&b[e];d[e].type.equals(f,g)||(c=!1)}),c},$$validates:function(a){var d,e,f,g,h,i=this.$$keys();for(d=0;d<i.length&&(e=this[i[d]],f=a[i[d]],f!==c&&null!==f||!e.isOptional);d++){if(g=e.type.$normalize(f),!e.type.is(g))return!1;if(h=e.type.encode(g),b.isString(h)&&!e.type.pattern.exec(h))return!1}return!0},$$parent:c},this.ParamSet=k}function u(a,d){function e(a){var b=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(a.source);return null!=b?b[1].replace(/\\(.)/g,"$1"):""}function f(a,b){return a.replace(/\$(\$|\d{1,2})/,function(a,c){return b["$"===c?0:Number(c)]})}function g(a,b,c){if(!c)return!1;var d=a.invoke(b,b,{$match:c});return L(d)?d:!0}function h(d,e,f,g,h){function m(a,b,c){return"/"===q?a:b?q.slice(0,-1)+a:c?q.slice(1)+a:a}function n(a){function b(a){var b=a(f,d);return b?(N(b)&&d.replace().url(b),!0):!1}if(!a||!a.defaultPrevented){p&&d.url()===p;p=c;var e,g=j.length;for(e=0;g>e;e++)if(b(j[e]))return;k&&b(k)}}function o(){return i=i||e.$on("$locationChangeSuccess",n)}var p,q=g.baseHref(),r=d.url();return l||o(),{sync:function(){n()},listen:function(){return o()},update:function(a){return a?void(r=d.url()):void(d.url()!==r&&(d.url(r),d.replace()))},push:function(a,b,e){var f=a.format(b||{});null!==f&&b&&b["#"]&&(f+="#"+b["#"]),d.url(f),p=e&&e.$$avoidResync?d.url():c,e&&e.replace&&d.replace()},href:function(c,e,f){if(!c.validates(e))return null;var g=a.html5Mode();b.isObject(g)&&(g=g.enabled),g=g&&h.history;var i=c.format(e);if(f=f||{},g||null===i||(i="#"+a.hashPrefix()+i),null!==i&&e&&e["#"]&&(i+="#"+e["#"]),i=m(i,g,f.absolute),!f.absolute||!i)return i;var j=!g&&i?"/":"",k=d.port();return k=80===k||443===k?"":":"+k,[d.protocol(),"://",d.host(),k,j,i].join("")}}}var i,j=[],k=null,l=!1;this.rule=function(a){if(!M(a))throw new Error("'rule' must be a function");return j.push(a),this},this.otherwise=function(a){if(N(a)){var b=a;a=function(){return b}}else if(!M(a))throw new Error("'rule' must be a function");return k=a,this},this.when=function(a,b){var c,h=N(b);if(N(a)&&(a=d.compile(a)),!h&&!M(b)&&!P(b))throw new Error("invalid 'handler' in when()");var i={matcher:function(a,b){return h&&(c=d.compile(b),b=["$match",function(a){return c.format(a)}]),R(function(c,d){return g(c,b,a.exec(d.path(),d.search()))},{prefix:N(a.prefix)?a.prefix:""})},regex:function(a,b){if(a.global||a.sticky)throw new Error("when() RegExp must not be global or sticky");return h&&(c=b,b=["$match",function(a){return f(c,a)}]),R(function(c,d){return g(c,b,a.exec(d.path()))},{prefix:e(a)})}},j={matcher:d.isMatcher(a),regex:a instanceof RegExp};for(var k in j)if(j[k])return this.rule(i[k](a,b));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(a){a===c&&(a=!0),l=a},this.$get=h,h.$inject=["$location","$rootScope","$injector","$browser","$sniffer"]}function v(a,e){function f(a){return 0===a.indexOf(".")||0===a.indexOf("^")}function m(a,b){if(!a)return c;var d=N(a),e=d?a:a.name,g=f(e);if(g){if(!b)throw new Error("No reference point given for path '"+e+"'");b=m(b);for(var h=e.split("."),i=0,j=h.length,k=b;j>i;i++)if(""!==h[i]||0!==i){if("^"!==h[i])break;if(!k.parent)throw new Error("Path '"+e+"' not valid for state '"+b.name+"'");k=k.parent}else k=b;h=h.slice(i).join("."),e=k.name+(k.name&&h?".":"")+h}var l=z[e];return!l||!d&&(d||l!==a&&l.self!==a)?c:l}function n(a,b){A[a]||(A[a]=[]),A[a].push(b)}function p(a){for(var b=A[a]||[];b.length;)q(b.shift())}function q(b){b=d(b,{self:b,resolve:b.resolve||{},toString:function(){return this.name}});var c=b.name;if(!N(c)||c.indexOf("@")>=0)throw new Error("State must have a valid name");if(z.hasOwnProperty(c))throw new Error("State '"+c+"' is already defined");var e=-1!==c.indexOf(".")?c.substring(0,c.lastIndexOf(".")):N(b.parent)?b.parent:O(b.parent)&&N(b.parent.name)?b.parent.name:"";if(e&&!z[e])return n(e,b.self);for(var f in C)M(C[f])&&(b[f]=C[f](b,C.$delegates[f]));return z[c]=b,!b[B]&&b.url&&a.when(b.url,["$match","$stateParams",function(a,c){y.$current.navigable==b&&j(a,c)||y.transitionTo(b,a,{inherit:!0,location:!1})}]),p(c),b}function r(a){return a.indexOf("*")>-1}function s(a){for(var b=a.split("."),c=y.$current.name.split("."),d=0,e=b.length;e>d;d++)"*"===b[d]&&(c[d]="*");return"**"===b[0]&&(c=c.slice(h(c,b[1])),c.unshift("**")),"**"===b[b.length-1]&&(c.splice(h(c,b[b.length-2])+1,Number.MAX_VALUE),c.push("**")),b.length!=c.length?!1:c.join("")===b.join("")}function t(a,b){return N(a)&&!L(b)?C[a]:M(b)&&N(a)?(C[a]&&!C.$delegates[a]&&(C.$delegates[a]=C[a]),C[a]=b,this):this}function u(a,b){return O(a)?b=a:b.name=a,q(b),this}function v(a,e,f,h,l,n,p,q,t){function u(b,c,d,f){var g=a.$broadcast("$stateNotFound",b,c,d);if(g.defaultPrevented)return p.update(),D;if(!g.retry)return null;if(f.$retry)return p.update(),E;var h=y.transition=e.when(g.retry);return h.then(function(){return h!==y.transition?A:(b.options.$retry=!0,y.transitionTo(b.to,b.toParams,b.options))},function(){return D}),p.update(),h}function v(a,c,d,g,i,j){function m(){var c=[];return Q(a.views,function(d,e){var g=d.resolve&&d.resolve!==a.resolve?d.resolve:{};g.$template=[function(){return f.load(e,{view:d,locals:i.globals,params:n,notify:j.notify})||""}],c.push(l.resolve(g,i.globals,i.resolve,a).then(function(c){if(M(d.controllerProvider)||P(d.controllerProvider)){var f=b.extend({},g,i.globals);c.$$controller=h.invoke(d.controllerProvider,null,f)}else c.$$controller=d.controller;c.$$state=a,c.$$controllerAs=d.controllerAs,c.$$resolveAs=d.resolveAs,i[e]=c}))}),e.all(c).then(function(){return i.globals})}var n=d?c:k(a.params.$$keys(),c),o={$stateParams:n};i.resolve=l.resolve(a.resolve,o,i.resolve,a);var p=[i.resolve.then(function(a){i.globals=a})];return g&&p.push(g),e.all(p).then(m).then(function(a){return i})}var A=e.reject(new Error("transition superseded")),C=e.reject(new Error("transition prevented")),D=e.reject(new Error("transition aborted")),E=e.reject(new Error("transition failed"));return x.locals={resolve:null,globals:{$stateParams:{}}},y={params:{},current:x.self,$current:x,transition:null},y.reload=function(a){return y.transitionTo(y.current,n,{reload:a||!0,inherit:!1,notify:!0})},y.go=function(a,b,c){return y.transitionTo(a,b,R({inherit:!0,relative:y.$current},c))},y.transitionTo=function(b,c,f){c=c||{},f=R({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},f||{});var g,j=y.$current,l=y.params,o=j.path,q=m(b,f.relative),r=c["#"];if(!L(q)){var s={to:b,toParams:c,options:f},t=u(s,j.self,l,f);if(t)return t;if(b=s.to,c=s.toParams,f=s.options,q=m(b,f.relative),!L(q)){if(!f.relative)throw new Error("No such state '"+b+"'");throw new Error("Could not resolve '"+b+"' from state '"+f.relative+"'")}}if(q[B])throw new Error("Cannot transition to abstract state '"+b+"'");if(f.inherit&&(c=i(n,c||{},y.$current,q)),!q.params.$$validates(c))return E;c=q.params.$$values(c),b=q;var z=b.path,D=0,F=z[D],G=x.locals,H=[];if(f.reload){if(N(f.reload)||O(f.reload)){if(O(f.reload)&&!f.reload.name)throw new Error("Invalid reload state object");var I=f.reload===!0?o[0]:m(f.reload);if(f.reload&&!I)throw new Error("No such reload state '"+(N(f.reload)?f.reload:f.reload.name)+"'");for(;F&&F===o[D]&&F!==I;)G=H[D]=F.locals,D++,F=z[D]}}else for(;F&&F===o[D]&&F.ownParams.$$equals(c,l);)G=H[D]=F.locals,D++,F=z[D];if(w(b,c,j,l,G,f))return r&&(c["#"]=r),y.params=c,S(y.params,n),S(k(b.params.$$keys(),n),b.locals.globals.$stateParams),f.location&&b.navigable&&b.navigable.url&&(p.push(b.navigable.url,c,{$$avoidResync:!0,replace:"replace"===f.location}),p.update(!0)),y.transition=null,e.when(y.current);if(c=k(b.params.$$keys(),c||{}),r&&(c["#"]=r),f.notify&&a.$broadcast("$stateChangeStart",b.self,c,j.self,l,f).defaultPrevented)return a.$broadcast("$stateChangeCancel",b.self,c,j.self,l),null==y.transition&&p.update(),C;for(var J=e.when(G),K=D;K<z.length;K++,F=z[K])G=H[K]=d(G),J=v(F,c,F===b,J,G,f);var M=y.transition=J.then(function(){var d,e,g;if(y.transition!==M)return A;for(d=o.length-1;d>=D;d--)g=o[d],g.self.onExit&&h.invoke(g.self.onExit,g.self,g.locals.globals),g.locals=null;for(d=D;d<z.length;d++)e=z[d],e.locals=H[d],e.self.onEnter&&h.invoke(e.self.onEnter,e.self,e.locals.globals);return y.transition!==M?A:(y.$current=b,y.current=b.self,y.params=c,S(y.params,n),y.transition=null,f.location&&b.navigable&&p.push(b.navigable.url,b.navigable.locals.globals.$stateParams,{$$avoidResync:!0,replace:"replace"===f.location}),f.notify&&a.$broadcast("$stateChangeSuccess",b.self,c,j.self,l),p.update(!0),y.current)}).then(null,function(d){return y.transition!==M?A:(y.transition=null,g=a.$broadcast("$stateChangeError",b.self,c,j.self,l,d),g.defaultPrevented||p.update(),e.reject(d))});return M},y.is=function(a,b,d){d=R({relative:y.$current},d||{});var e=m(a,d.relative);return L(e)?y.$current!==e?!1:b?j(e.params.$$values(b),n):!0:c},y.includes=function(a,b,d){if(d=R({relative:y.$current},d||{}),N(a)&&r(a)){if(!s(a))return!1;a=y.$current.name}var e=m(a,d.relative);return L(e)?L(y.$current.includes[e.name])?b?j(e.params.$$values(b),n,g(b)):!0:!1:c},y.href=function(a,b,d){d=R({lossy:!0,inherit:!0,absolute:!1,relative:y.$current},d||{});var e=m(a,d.relative);if(!L(e))return null;d.inherit&&(b=i(n,b||{},y.$current,e));var f=e&&d.lossy?e.navigable:e;return f&&f.url!==c&&null!==f.url?p.href(f.url,k(e.params.$$keys().concat("#"),b||{}),{absolute:d.absolute}):null},y.get=function(a,b){if(0===arguments.length)return o(g(z),function(a){return z[a].self});var c=m(a,b||y.$current);return c&&c.self?c.self:null},y}function w(a,b,c,d,e,f){function g(a,b,c){function d(b){return"search"!=a.params[b].location}var e=a.params.$$keys().filter(d),f=l.apply({},[a.params].concat(e)),g=new U.ParamSet(f);return g.$$equals(b,c)}return!f.reload&&a===c&&(e===c.locals||a.self.reloadOnSearch===!1&&g(c,d,b))?!0:void 0}var x,y,z={},A={},B="abstract",C={parent:function(a){if(L(a.parent)&&a.parent)return m(a.parent);var b=/^(.+)\.[^.]+$/.exec(a.name);return b?m(b[1]):x},data:function(a){return a.parent&&a.parent.data&&(a.data=a.self.data=d(a.parent.data,a.data)),a.data},url:function(a){var b=a.url,c={params:a.params||{}};if(N(b))return"^"==b.charAt(0)?e.compile(b.substring(1),c):(a.parent.navigable||x).url.concat(b,c);if(!b||e.isMatcher(b))return b;throw new Error("Invalid url '"+b+"' in state '"+a+"'")},navigable:function(a){return a.url?a:a.parent?a.parent.navigable:null},ownParams:function(a){var b=a.url&&a.url.params||new U.ParamSet;return Q(a.params||{},function(a,c){b[c]||(b[c]=new U.Param(c,null,a,"config"))}),b},params:function(a){var b=l(a.ownParams,a.ownParams.$$keys());return a.parent&&a.parent.params?R(a.parent.params.$$new(),b):new U.ParamSet},views:function(a){var b={};return Q(L(a.views)?a.views:{"":a},function(c,d){d.indexOf("@")<0&&(d+="@"+a.parent.name),c.resolveAs=c.resolveAs||a.resolveAs||"$resolve",b[d]=c}),b},path:function(a){return a.parent?a.parent.path.concat(a):[]},includes:function(a){var b=a.parent?R({},a.parent.includes):{};return b[a.name]=!0,b},$delegates:{}};x=q({name:"",url:"^",views:null,"abstract":!0}),x.navigable=null,this.decorator=t,this.state=u,this.$get=v,v.$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$urlRouter","$location","$urlMatcherFactory"]}function w(){function a(a,b){return{load:function(a,c){var d,e={template:null,controller:null,view:null,locals:null,notify:!0,async:!0,params:{}};return c=R(e,c),c.view&&(d=b.fromConfig(c.view,c.params,c.locals)),d}}}this.$get=a,a.$inject=["$rootScope","$templateFactory"]}function x(){var a=!1;this.useAnchorScroll=function(){a=!0},this.$get=["$anchorScroll","$timeout",function(b,c){return a?b:function(a){return c(function(){a[0].scrollIntoView()},0,!1)}}]}function y(a,c,d,e,f){function g(){return c.has?function(a){return c.has(a)?c.get(a):null}:function(a){try{return c.get(a)}catch(b){return null}}}function h(a,c){var d=function(){return{enter:function(a,b,c){b.after(a),c()},leave:function(a,b){a.remove(),b()}}};if(k)return{enter:function(a,c,d){b.version.minor>2?k.enter(a,null,c).then(d):k.enter(a,null,c,d)},leave:function(a,c){b.version.minor>2?k.leave(a).then(c):k.leave(a,c)}};if(j){var e=j&&j(c,a);return{enter:function(a,b,c){e.enter(a,null,b),c()},leave:function(a,b){e.leave(a),b()}}}return d()}var i=g(),j=i("$animator"),k=i("$animate"),l={restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(c,g,i){return function(c,g,j){function k(){if(m&&(m.remove(),m=null),o&&(o.$destroy(),o=null),n){var a=n.data("$uiViewAnim");s.leave(n,function(){a.$$animLeave.resolve(),m=null}),m=n,n=null}}function l(h){var l,m=A(c,j,g,e),t=m&&a.$current&&a.$current.locals[m];if(h||t!==p){l=c.$new(),p=a.$current.locals[m],l.$emit("$viewContentLoading",m);var u=i(l,function(a){var e=f.defer(),h=f.defer(),i={$animEnter:e.promise,$animLeave:h.promise,$$animLeave:h};a.data("$uiViewAnim",i),s.enter(a,g,function(){e.resolve(),o&&o.$emit("$viewContentAnimationEnded"),(b.isDefined(r)&&!r||c.$eval(r))&&d(a)}),k()});n=u,o=l,o.$emit("$viewContentLoaded",m),o.$eval(q)}}var m,n,o,p,q=j.onload||"",r=j.autoscroll,s=h(j,c);g.inheritedData("$uiView");c.$on("$stateChangeSuccess",function(){l(!1)}),l(!0)}}};return l}function z(a,c,d,e){return{restrict:"ECA",priority:-400,compile:function(f){var g=f.html();return function(f,h,i){var j=d.$current,k=A(f,i,h,e),l=j&&j.locals[k];if(l){h.data("$uiView",{name:k,state:l.$$state}),h.html(l.$template?l.$template:g);var m=b.extend({},l);f[l.$$resolveAs]=m;var n=a(h.contents());if(l.$$controller){l.$scope=f,l.$element=h;var o=c(l.$$controller,l);l.$$controllerAs&&(f[l.$$controllerAs]=o,f[l.$$controllerAs][l.$$resolveAs]=m),M(o.$onInit)&&o.$onInit(),h.data("$ngControllerController",o),h.children().data("$ngControllerController",o)}n(f)}}}}}function A(a,b,c,d){var e=d(b.uiView||b.name||"")(a),f=c.inheritedData("$uiView");return e.indexOf("@")>=0?e:e+"@"+(f?f.state.name:"")}function B(a,b){var c,d=a.match(/^\s*({[^}]*})\s*$/);if(d&&(a=b+"("+d[1]+")"),c=a.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!c||4!==c.length)throw new Error("Invalid state ref '"+a+"'");return{state:c[1],paramExpr:c[3]||null}}function C(a){var b=a.parent().inheritedData("$uiView");return b&&b.state&&b.state.name?b.state:void 0}function D(a){var b="[object SVGAnimatedString]"===Object.prototype.toString.call(a.prop("href")),c="FORM"===a[0].nodeName;return{attr:c?"action":b?"xlink:href":"href",isAnchor:"A"===a.prop("tagName").toUpperCase(),clickable:!c}}function E(a,b,c,d,e){return function(f){var g=f.which||f.button,h=e();if(!(g>1||f.ctrlKey||f.metaKey||f.shiftKey||a.attr("target"))){var i=c(function(){b.go(h.state,h.params,h.options)});f.preventDefault();var j=d.isAnchor&&!h.href?1:0;f.preventDefault=function(){j--<=0&&c.cancel(i)}}}}function F(a,b){return{relative:C(a)||b.$current,inherit:!0}}function G(a,c){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(d,e,f,g){var h,i=B(f.uiSref,a.current.name),j={state:i.state,href:null,params:null},k=D(e),l=g[1]||g[0],m=null;j.options=R(F(e,a),f.uiSrefOpts?d.$eval(f.uiSrefOpts):{});var n=function(c){c&&(j.params=b.copy(c)),j.href=a.href(i.state,j.params,j.options),m&&m(),l&&(m=l.$$addStateInfo(i.state,j.params)),null!==j.href&&f.$set(k.attr,j.href)};i.paramExpr&&(d.$watch(i.paramExpr,function(a){a!==j.params&&n(a)},!0),j.params=b.copy(d.$eval(i.paramExpr))),n(),k.clickable&&(h=E(e,a,c,k,function(){return j}),e.bind("click",h),d.$on("$destroy",function(){e.unbind("click",h)}))}}}function H(a,b){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(c,d,e,f){function g(b){m.state=b[0],m.params=b[1],m.options=b[2],m.href=a.href(m.state,m.params,m.options),n&&n(),j&&(n=j.$$addStateInfo(m.state,m.params)),m.href&&e.$set(i.attr,m.href)}var h,i=D(d),j=f[1]||f[0],k=[e.uiState,e.uiStateParams||null,e.uiStateOpts||null],l="["+k.map(function(a){return a||"null"}).join(", ")+"]",m={state:null,params:null,options:null,href:null},n=null;c.$watch(l,g,!0),g(c.$eval(l)),i.clickable&&(h=E(d,a,b,i,function(){return m}),d.bind("click",h),c.$on("$destroy",function(){d.unbind("click",h)}))}}}function I(a,b,c){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(b,d,e,f){function g(b,c,e){var f=a.get(b,C(d)),g=h(b,c),i={state:f||{name:b},params:c,hash:g};return p.push(i),q[g]=e,function(){var a=p.indexOf(i);-1!==a&&p.splice(a,1)}}function h(a,c){if(!N(a))throw new Error("state should be a string");return O(c)?a+T(c):(c=b.$eval(c),O(c)?a+T(c):a)}function i(){for(var a=0;a<p.length;a++)l(p[a].state,p[a].params)?j(d,q[p[a].hash]):k(d,q[p[a].hash]),m(p[a].state,p[a].params)?j(d,n):k(d,n)}function j(a,b){f(function(){a.addClass(b)})}function k(a,b){a.removeClass(b)}function l(b,c){return a.includes(b.name,c)}function m(b,c){return a.is(b.name,c)}var n,o,p=[],q={};n=c(e.uiSrefActiveEq||"",!1)(b);try{o=b.$eval(e.uiSrefActive)}catch(r){}o=o||c(e.uiSrefActive||"",!1)(b),O(o)&&Q(o,function(c,d){if(N(c)){var e=B(c,a.current.name);g(e.state,b.$eval(e.paramExpr),d)}}),this.$$addStateInfo=function(a,b){if(!(O(o)&&p.length>0)){var c=g(a,b,o);return i(),c}},b.$on("$stateChangeSuccess",i),i()}]}}function J(a){var b=function(b,c){return a.is(b,c)};return b.$stateful=!0,b}function K(a){var b=function(b,c,d){return a.includes(b,c,d)};return b.$stateful=!0,b}var L=b.isDefined,M=b.isFunction,N=b.isString,O=b.isObject,P=b.isArray,Q=b.forEach,R=b.extend,S=b.copy,T=b.toJson;b.module("ui.router.util",["ng"]),b.module("ui.router.router",["ui.router.util"]),b.module("ui.router.state",["ui.router.router","ui.router.util"]),b.module("ui.router",["ui.router.state"]),b.module("ui.router.compat",["ui.router"]),p.$inject=["$q","$injector"],b.module("ui.router.util").service("$resolve",p),q.$inject=["$http","$templateCache","$injector"],b.module("ui.router.util").service("$templateFactory",q);var U;r.prototype.concat=function(a,b){var c={caseInsensitive:U.caseInsensitive(),strict:U.strictMode(),squash:U.defaultSquashPolicy()};return new r(this.sourcePath+a+this.sourceSearch,R(c,b),this)},r.prototype.toString=function(){return this.source},r.prototype.exec=function(a,b){function c(a){function b(a){return a.split("").reverse().join("")}function c(a){return a.replace(/\\-/g,"-")}var d=b(a).split(/-(?!\\)/),e=o(d,b);return o(e,c).reverse()}var d=this.regexp.exec(a);if(!d)return null;b=b||{};var e,f,g,h=this.parameters(),i=h.length,j=this.segments.length-1,k={};if(j!==d.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");var l,m;for(e=0;j>e;e++){for(g=h[e],l=this.params[g],m=d[e+1],f=0;f<l.replace.length;f++)l.replace[f].from===m&&(m=l.replace[f].to);m&&l.array===!0&&(m=c(m)),L(m)&&(m=l.type.decode(m)),k[g]=l.value(m)}for(;i>e;e++){for(g=h[e],k[g]=this.params[g].value(b[g]),l=this.params[g],m=b[g],f=0;f<l.replace.length;f++)l.replace[f].from===m&&(m=l.replace[f].to);L(m)&&(m=l.type.decode(m)),k[g]=l.value(m)}return k},r.prototype.parameters=function(a){return L(a)?this.params[a]||null:this.$$paramNames},r.prototype.validates=function(a){return this.params.$$validates(a)},r.prototype.format=function(a){function b(a){return encodeURIComponent(a).replace(/-/g,function(a){return"%5C%"+a.charCodeAt(0).toString(16).toUpperCase()})}a=a||{};var c=this.segments,d=this.parameters(),e=this.params;if(!this.validates(a))return null;var f,g=!1,h=c.length-1,i=d.length,j=c[0];for(f=0;i>f;f++){var k=h>f,l=d[f],m=e[l],n=m.value(a[l]),p=m.isOptional&&m.type.equals(m.value(),n),q=p?m.squash:!1,r=m.type.encode(n);if(k){var s=c[f+1],t=f+1===h;if(q===!1)null!=r&&(j+=P(r)?o(r,b).join("-"):encodeURIComponent(r)),j+=s;else if(q===!0){var u=j.match(/\/$/)?/\/?(.*)/:/(.*)/;j+=s.match(u)[1]}else N(q)&&(j+=q+s);t&&m.squash===!0&&"/"===j.slice(-1)&&(j=j.slice(0,-1))}else{if(null==r||p&&q!==!1)continue;if(P(r)||(r=[r]),0===r.length)continue;r=o(r,encodeURIComponent).join("&"+l+"="),j+=(g?"&":"?")+(l+"="+r),g=!0}}return j},s.prototype.is=function(a,b){return!0},s.prototype.encode=function(a,b){return a},s.prototype.decode=function(a,b){return a},s.prototype.equals=function(a,b){return a==b},s.prototype.$subPattern=function(){var a=this.pattern.toString();return a.substr(1,a.length-2)},s.prototype.pattern=/.*/,s.prototype.toString=function(){return"{Type:"+this.name+"}"},s.prototype.$normalize=function(a){return this.is(a)?a:this.decode(a)},s.prototype.$asArray=function(a,b){function d(a,b){function d(a,b){return function(){return a[b].apply(a,arguments)}}function e(a){return P(a)?a:L(a)?[a]:[]}function f(a){switch(a.length){case 0:return c;case 1:return"auto"===b?a[0]:a;default:return a}}function g(a){return!a}function h(a,b){return function(c){if(P(c)&&0===c.length)return c;c=e(c);var d=o(c,a);return b===!0?0===n(d,g).length:f(d)}}function i(a){return function(b,c){var d=e(b),f=e(c);if(d.length!==f.length)return!1;for(var g=0;g<d.length;g++)if(!a(d[g],f[g]))return!1;return!0}}this.encode=h(d(a,"encode")),this.decode=h(d(a,"decode")),this.is=h(d(a,"is"),!0),this.equals=i(d(a,"equals")),this.pattern=a.pattern,this.$normalize=h(d(a,"$normalize")),this.name=a.name,this.$arrayMode=b}if(!a)return this;if("auto"===a&&!b)throw new Error("'auto' array mode is for query parameters only");return new d(this,a)},b.module("ui.router.util").provider("$urlMatcherFactory",t),b.module("ui.router.util").run(["$urlMatcherFactory",function(a){}]),u.$inject=["$locationProvider","$urlMatcherFactoryProvider"],b.module("ui.router.router").provider("$urlRouter",u),v.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"],b.module("ui.router.state").factory("$stateParams",function(){return{}}).constant("$state.runtime",{autoinject:!0}).provider("$state",v).run(["$injector",function(a){
+a.get("$state.runtime").autoinject&&a.get("$state")}]),w.$inject=[],b.module("ui.router.state").provider("$view",w),b.module("ui.router.state").provider("$uiViewScroll",x),y.$inject=["$state","$injector","$uiViewScroll","$interpolate","$q"],z.$inject=["$compile","$controller","$state","$interpolate"],b.module("ui.router.state").directive("uiView",y),b.module("ui.router.state").directive("uiView",z),G.$inject=["$state","$timeout"],H.$inject=["$state","$timeout"],I.$inject=["$state","$stateParams","$interpolate"],b.module("ui.router.state").directive("uiSref",G).directive("uiSrefActive",I).directive("uiSrefActiveEq",I).directive("uiState",H),J.$inject=["$state"],K.$inject=["$state"],b.module("ui.router.state").filter("isState",J).filter("includedByState",K)}(window,window.angular); \ No newline at end of file
diff --git a/common/src/main/webapp/framework/browser/thirdparty/js/angular.min.js b/common/src/main/webapp/framework/browser/thirdparty/js/angular.min.js
new file mode 100644
index 0000000..89d4aaa
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/js/angular.min.js
@@ -0,0 +1,295 @@
+/*
+ AngularJS v1.4.8
+ (c) 2010-2015 Google, Inc. http://angularjs.org
+ License: MIT
+ */
+(function(S,X,u){'use strict';function G(a){return function(){var b=arguments[0],d;d="["+(a?a+":":"")+b+"] http://errors.angularjs.org/1.4.8/"+(a?a+"/":"")+b;for(b=1;b<arguments.length;b++){d=d+(1==b?"?":"&")+"p"+(b-1)+"=";var c=encodeURIComponent,e;e=arguments[b];e="function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof e?"undefined":"string"!=typeof e?JSON.stringify(e):e;d+=c(e)}return Error(d)}}function za(a){if(null==a||Xa(a))return!1;if(I(a)||E(a)||B&&a instanceof B)return!0;
+ var b="length"in Object(a)&&a.length;return Q(b)&&(0<=b&&b-1 in a||"function"==typeof a.item)}function n(a,b,d){var c,e;if(a)if(z(a))for(c in a)"prototype"==c||"length"==c||"name"==c||a.hasOwnProperty&&!a.hasOwnProperty(c)||b.call(d,a[c],c,a);else if(I(a)||za(a)){var f="object"!==typeof a;c=0;for(e=a.length;c<e;c++)(f||c in a)&&b.call(d,a[c],c,a)}else if(a.forEach&&a.forEach!==n)a.forEach(b,d,a);else if(nc(a))for(c in a)b.call(d,a[c],c,a);else if("function"===typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&
+b.call(d,a[c],c,a);else for(c in a)qa.call(a,c)&&b.call(d,a[c],c,a);return a}function oc(a,b,d){for(var c=Object.keys(a).sort(),e=0;e<c.length;e++)b.call(d,a[c[e]],c[e]);return c}function pc(a){return function(b,d){a(d,b)}}function Td(){return++nb}function Mb(a,b,d){for(var c=a.$$hashKey,e=0,f=b.length;e<f;++e){var g=b[e];if(H(g)||z(g))for(var h=Object.keys(g),k=0,l=h.length;k<l;k++){var m=h[k],r=g[m];d&&H(r)?da(r)?a[m]=new Date(r.valueOf()):Ma(r)?a[m]=new RegExp(r):r.nodeName?a[m]=r.cloneNode(!0):
+ Nb(r)?a[m]=r.clone():(H(a[m])||(a[m]=I(r)?[]:{}),Mb(a[m],[r],!0)):a[m]=r}}c?a.$$hashKey=c:delete a.$$hashKey;return a}function M(a){return Mb(a,ra.call(arguments,1),!1)}function Ud(a){return Mb(a,ra.call(arguments,1),!0)}function ea(a){return parseInt(a,10)}function Ob(a,b){return M(Object.create(a),b)}function x(){}function Ya(a){return a}function na(a){return function(){return a}}function qc(a){return z(a.toString)&&a.toString!==sa}function q(a){return"undefined"===typeof a}function y(a){return"undefined"!==
+ typeof a}function H(a){return null!==a&&"object"===typeof a}function nc(a){return null!==a&&"object"===typeof a&&!rc(a)}function E(a){return"string"===typeof a}function Q(a){return"number"===typeof a}function da(a){return"[object Date]"===sa.call(a)}function z(a){return"function"===typeof a}function Ma(a){return"[object RegExp]"===sa.call(a)}function Xa(a){return a&&a.window===a}function Za(a){return a&&a.$evalAsync&&a.$watch}function $a(a){return"boolean"===typeof a}function sc(a){return a&&Q(a.length)&&
+ Vd.test(sa.call(a))}function Nb(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function Wd(a){var b={};a=a.split(",");var d;for(d=0;d<a.length;d++)b[a[d]]=!0;return b}function ta(a){return F(a.nodeName||a[0]&&a[0].nodeName)}function ab(a,b){var d=a.indexOf(b);0<=d&&a.splice(d,1);return d}function bb(a,b){function d(a,b){var d=b.$$hashKey,e;if(I(a)){e=0;for(var f=a.length;e<f;e++)b.push(c(a[e]))}else if(nc(a))for(e in a)b[e]=c(a[e]);else if(a&&"function"===typeof a.hasOwnProperty)for(e in a)a.hasOwnProperty(e)&&
+(b[e]=c(a[e]));else for(e in a)qa.call(a,e)&&(b[e]=c(a[e]));d?b.$$hashKey=d:delete b.$$hashKey;return b}function c(a){if(!H(a))return a;var b=e.indexOf(a);if(-1!==b)return f[b];if(Xa(a)||Za(a))throw Aa("cpws");var b=!1,c;I(a)?(c=[],b=!0):sc(a)?c=new a.constructor(a):da(a)?c=new Date(a.getTime()):Ma(a)?(c=new RegExp(a.source,a.toString().match(/[^\/]*$/)[0]),c.lastIndex=a.lastIndex):z(a.cloneNode)?c=a.cloneNode(!0):(c=Object.create(rc(a)),b=!0);e.push(a);f.push(c);return b?d(a,c):c}var e=[],f=[];if(b){if(sc(b))throw Aa("cpta");
+ if(a===b)throw Aa("cpi");I(b)?b.length=0:n(b,function(a,c){"$$hashKey"!==c&&delete b[c]});e.push(a);f.push(b);return d(a,b)}return c(a)}function ia(a,b){if(I(a)){b=b||[];for(var d=0,c=a.length;d<c;d++)b[d]=a[d]}else if(H(a))for(d in b=b||{},a)if("$"!==d.charAt(0)||"$"!==d.charAt(1))b[d]=a[d];return b||a}function ma(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var d=typeof a,c;if(d==typeof b&&"object"==d)if(I(a)){if(!I(b))return!1;if((d=a.length)==b.length){for(c=
+ 0;c<d;c++)if(!ma(a[c],b[c]))return!1;return!0}}else{if(da(a))return da(b)?ma(a.getTime(),b.getTime()):!1;if(Ma(a))return Ma(b)?a.toString()==b.toString():!1;if(Za(a)||Za(b)||Xa(a)||Xa(b)||I(b)||da(b)||Ma(b))return!1;d=$();for(c in a)if("$"!==c.charAt(0)&&!z(a[c])){if(!ma(a[c],b[c]))return!1;d[c]=!0}for(c in b)if(!(c in d)&&"$"!==c.charAt(0)&&y(b[c])&&!z(b[c]))return!1;return!0}return!1}function cb(a,b,d){return a.concat(ra.call(b,d))}function tc(a,b){var d=2<arguments.length?ra.call(arguments,2):
+ [];return!z(b)||b instanceof RegExp?b:d.length?function(){return arguments.length?b.apply(a,cb(d,arguments,0)):b.apply(a,d)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function Xd(a,b){var d=b;"string"===typeof a&&"$"===a.charAt(0)&&"$"===a.charAt(1)?d=u:Xa(b)?d="$WINDOW":b&&X===b?d="$DOCUMENT":Za(b)&&(d="$SCOPE");return d}function db(a,b){if("undefined"===typeof a)return u;Q(b)||(b=b?2:null);return JSON.stringify(a,Xd,b)}function uc(a){return E(a)?JSON.parse(a):a}function vc(a,
+ b){var d=Date.parse("Jan 01, 1970 00:00:00 "+a)/6E4;return isNaN(d)?b:d}function Pb(a,b,d){d=d?-1:1;var c=vc(b,a.getTimezoneOffset());b=a;a=d*(c-a.getTimezoneOffset());b=new Date(b.getTime());b.setMinutes(b.getMinutes()+a);return b}function ua(a){a=B(a).clone();try{a.empty()}catch(b){}var d=B("<div>").append(a).html();try{return a[0].nodeType===Na?F(d):d.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+F(b)})}catch(c){return F(d)}}function wc(a){try{return decodeURIComponent(a)}catch(b){}}
+ function xc(a){var b={};n((a||"").split("&"),function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=wc(e),y(e)&&(f=y(f)?wc(f):!0,qa.call(b,e)?I(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function Qb(a){var b=[];n(a,function(a,c){I(a)?n(a,function(a){b.push(ja(c,!0)+(!0===a?"":"="+ja(a,!0)))}):b.push(ja(c,!0)+(!0===a?"":"="+ja(a,!0)))});return b.length?b.join("&"):""}function ob(a){return ja(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,
+ "=").replace(/%2B/gi,"+")}function ja(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function Yd(a,b){var d,c,e=Oa.length;for(c=0;c<e;++c)if(d=Oa[c]+b,E(d=a.getAttribute(d)))return d;return null}function Zd(a,b){var d,c,e={};n(Oa,function(b){b+="app";!d&&a.hasAttribute&&a.hasAttribute(b)&&(d=a,c=a.getAttribute(b))});n(Oa,function(b){b+="app";var e;!d&&(e=a.querySelector("["+b.replace(":",
+ "\\:")+"]"))&&(d=e,c=e.getAttribute(b))});d&&(e.strictDi=null!==Yd(d,"strict-di"),b(d,c?[c]:[],e))}function yc(a,b,d){H(d)||(d={});d=M({strictDi:!1},d);var c=function(){a=B(a);if(a.injector()){var c=a[0]===X?"document":ua(a);throw Aa("btstrpd",c.replace(/</,"&lt;").replace(/>/,"&gt;"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]);b.unshift("ng");c=eb(b,d.strictDi);c.invoke(["$rootScope",
+ "$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;S&&e.test(S.name)&&(d.debugInfoEnabled=!0,S.name=S.name.replace(e,""));if(S&&!f.test(S.name))return c();S.name=S.name.replace(f,"");fa.resumeBootstrap=function(a){n(a,function(a){b.push(a)});return c()};z(fa.resumeDeferredBootstrap)&&fa.resumeDeferredBootstrap()}function $d(){S.name="NG_ENABLE_DEBUG_INFO!"+S.name;S.location.reload()}
+ function ae(a){a=fa.element(a).injector();if(!a)throw Aa("test");return a.get("$$testability")}function zc(a,b){b=b||"_";return a.replace(be,function(a,c){return(c?b:"")+a.toLowerCase()})}function ce(){var a;if(!Ac){var b=pb();(oa=q(b)?S.jQuery:b?S[b]:u)&&oa.fn.on?(B=oa,M(oa.fn,{scope:Pa.scope,isolateScope:Pa.isolateScope,controller:Pa.controller,injector:Pa.injector,inheritedData:Pa.inheritedData}),a=oa.cleanData,oa.cleanData=function(b){var c;if(Rb)Rb=!1;else for(var e=0,f;null!=(f=b[e]);e++)(c=
+ oa._data(f,"events"))&&c.$destroy&&oa(f).triggerHandler("$destroy");a(b)}):B=N;fa.element=B;Ac=!0}}function qb(a,b,d){if(!a)throw Aa("areq",b||"?",d||"required");return a}function Qa(a,b,d){d&&I(a)&&(a=a[a.length-1]);qb(z(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Ra(a,b){if("hasOwnProperty"===a)throw Aa("badname",b);}function Bc(a,b,d){if(!b)return a;b=b.split(".");for(var c,e=a,f=b.length,g=0;g<f;g++)c=b[g],a&&(a=(e=a)[c]);return!d&&
+ z(a)?tc(e,a):a}function rb(a){for(var b=a[0],d=a[a.length-1],c,e=1;b!==d&&(b=b.nextSibling);e++)if(c||a[e]!==b)c||(c=B(ra.call(a,0,e))),c.push(b);return c||a}function $(){return Object.create(null)}function de(a){function b(a,b,c){return a[b]||(a[b]=c())}var d=G("$injector"),c=G("ng");a=b(a,"angular",Object);a.$$minErr=a.$$minErr||G;return b(a,"module",function(){var a={};return function(f,g,h){if("hasOwnProperty"===f)throw c("badname","module");g&&a.hasOwnProperty(f)&&(a[f]=null);return b(a,f,function(){function a(b,
+ d,e,f){f||(f=c);return function(){f[e||"push"]([b,d,arguments]);return v}}function b(a,d){return function(b,e){e&&z(e)&&(e.$$moduleName=f);c.push([a,d,arguments]);return v}}if(!g)throw d("nomod",f);var c=[],e=[],t=[],A=a("$injector","invoke","push",e),v={_invokeQueue:c,_configBlocks:e,_runBlocks:t,requires:g,name:f,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:b("$provide",
+ "decorator"),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider","directive"),config:A,run:function(a){t.push(a);return this}};h&&A(h);return v})}})}function ee(a){M(a,{bootstrap:yc,copy:bb,extend:M,merge:Ud,equals:ma,element:B,forEach:n,injector:eb,noop:x,bind:tc,toJson:db,fromJson:uc,identity:Ya,isUndefined:q,isDefined:y,isString:E,isFunction:z,isObject:H,isNumber:Q,isElement:Nb,isArray:I,
+ version:fe,isDate:da,lowercase:F,uppercase:sb,callbacks:{counter:0},getTestability:ae,$$minErr:G,$$csp:Ba,reloadWithDebugInfo:$d});Sb=de(S);Sb("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:ge});a.provider("$compile",Cc).directive({a:he,input:Dc,textarea:Dc,form:ie,script:je,select:ke,style:le,option:me,ngBind:ne,ngBindHtml:oe,ngBindTemplate:pe,ngClass:qe,ngClassEven:re,ngClassOdd:se,ngCloak:te,ngController:ue,ngForm:ve,ngHide:we,ngIf:xe,ngInclude:ye,ngInit:ze,ngNonBindable:Ae,
+ ngPluralize:Be,ngRepeat:Ce,ngShow:De,ngStyle:Ee,ngSwitch:Fe,ngSwitchWhen:Ge,ngSwitchDefault:He,ngOptions:Ie,ngTransclude:Je,ngModel:Ke,ngList:Le,ngChange:Me,pattern:Ec,ngPattern:Ec,required:Fc,ngRequired:Fc,minlength:Gc,ngMinlength:Gc,maxlength:Hc,ngMaxlength:Hc,ngValue:Ne,ngModelOptions:Oe}).directive({ngInclude:Pe}).directive(tb).directive(Ic);a.provider({$anchorScroll:Qe,$animate:Re,$animateCss:Se,$$animateQueue:Te,$$AnimateRunner:Ue,$browser:Ve,$cacheFactory:We,$controller:Xe,$document:Ye,$exceptionHandler:Ze,
+ $filter:Jc,$$forceReflow:$e,$interpolate:af,$interval:bf,$http:cf,$httpParamSerializer:df,$httpParamSerializerJQLike:ef,$httpBackend:ff,$xhrFactory:gf,$location:hf,$log:jf,$parse:kf,$rootScope:lf,$q:mf,$$q:nf,$sce:of,$sceDelegate:pf,$sniffer:qf,$templateCache:rf,$templateRequest:sf,$$testability:tf,$timeout:uf,$window:vf,$$rAF:wf,$$jqLite:xf,$$HashMap:yf,$$cookieReader:zf})}])}function fb(a){return a.replace(Af,function(a,d,c,e){return e?c.toUpperCase():c}).replace(Bf,"Moz$1")}function Kc(a){a=a.nodeType;
+ return 1===a||!a||9===a}function Lc(a,b){var d,c,e=b.createDocumentFragment(),f=[];if(Tb.test(a)){d=d||e.appendChild(b.createElement("div"));c=(Cf.exec(a)||["",""])[1].toLowerCase();c=ka[c]||ka._default;d.innerHTML=c[1]+a.replace(Df,"<$1></$2>")+c[2];for(c=c[0];c--;)d=d.lastChild;f=cb(f,d.childNodes);d=e.firstChild;d.textContent=""}else f.push(b.createTextNode(a));e.textContent="";e.innerHTML="";n(f,function(a){e.appendChild(a)});return e}function N(a){if(a instanceof N)return a;var b;E(a)&&(a=U(a),
+ b=!0);if(!(this instanceof N)){if(b&&"<"!=a.charAt(0))throw Ub("nosel");return new N(a)}if(b){b=X;var d;a=(d=Ef.exec(a))?[b.createElement(d[1])]:(d=Lc(a,b))?d.childNodes:[]}Mc(this,a)}function Vb(a){return a.cloneNode(!0)}function ub(a,b){b||vb(a);if(a.querySelectorAll)for(var d=a.querySelectorAll("*"),c=0,e=d.length;c<e;c++)vb(d[c])}function Nc(a,b,d,c){if(y(c))throw Ub("offargs");var e=(c=wb(a))&&c.events,f=c&&c.handle;if(f)if(b){var g=function(b){var c=e[b];y(d)&&ab(c||[],d);y(d)&&c&&0<c.length||
+ (a.removeEventListener(b,f,!1),delete e[b])};n(b.split(" "),function(a){g(a);xb[a]&&g(xb[a])})}else for(b in e)"$destroy"!==b&&a.removeEventListener(b,f,!1),delete e[b]}function vb(a,b){var d=a.ng339,c=d&&gb[d];c&&(b?delete c.data[b]:(c.handle&&(c.events.$destroy&&c.handle({},"$destroy"),Nc(a)),delete gb[d],a.ng339=u))}function wb(a,b){var d=a.ng339,d=d&&gb[d];b&&!d&&(a.ng339=d=++Ff,d=gb[d]={events:{},data:{},handle:u});return d}function Wb(a,b,d){if(Kc(a)){var c=y(d),e=!c&&b&&!H(b),f=!b;a=(a=wb(a,
+ !e))&&a.data;if(c)a[b]=d;else{if(f)return a;if(e)return a&&a[b];M(a,b)}}}function yb(a,b){return a.getAttribute?-1<(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" "):!1}function zb(a,b){b&&a.setAttribute&&n(b.split(" "),function(b){a.setAttribute("class",U((" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+U(b)+" "," ")))})}function Ab(a,b){if(b&&a.setAttribute){var d=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");n(b.split(" "),
+ function(a){a=U(a);-1===d.indexOf(" "+a+" ")&&(d+=a+" ")});a.setAttribute("class",U(d))}}function Mc(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var d=b.length;if("number"===typeof d&&b.window!==b){if(d)for(var c=0;c<d;c++)a[a.length++]=b[c]}else a[a.length++]=b}}function Oc(a,b){return Bb(a,"$"+(b||"ngController")+"Controller")}function Bb(a,b,d){9==a.nodeType&&(a=a.documentElement);for(b=I(b)?b:[b];a;){for(var c=0,e=b.length;c<e;c++)if(y(d=B.data(a,b[c])))return d;a=a.parentNode||11===a.nodeType&&
+ a.host}}function Pc(a){for(ub(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Xb(a,b){b||ub(a);var d=a.parentNode;d&&d.removeChild(a)}function Gf(a,b){b=b||S;if("complete"===b.document.readyState)b.setTimeout(a);else B(b).on("load",a)}function Qc(a,b){var d=Cb[b.toLowerCase()];return d&&Rc[ta(a)]&&d}function Hf(a,b){var d=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var f=b[d||c.type],g=f?f.length:0;if(g){if(q(c.immediatePropagationStopped)){var h=c.stopImmediatePropagation;
+ c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0;c.stopPropagation&&c.stopPropagation();h&&h.call(c)}}c.isImmediatePropagationStopped=function(){return!0===c.immediatePropagationStopped};var k=f.specialHandlerWrapper||If;1<g&&(f=ia(f));for(var l=0;l<g;l++)c.isImmediatePropagationStopped()||k(a,c,f[l])}};d.elem=a;return d}function If(a,b,d){d.call(a,b)}function Jf(a,b,d){var c=b.relatedTarget;c&&(c===a||Kf.call(a,c))||d.call(a,b)}function xf(){this.$get=function(){return M(N,
+ {hasClass:function(a,b){a.attr&&(a=a[0]);return yb(a,b)},addClass:function(a,b){a.attr&&(a=a[0]);return Ab(a,b)},removeClass:function(a,b){a.attr&&(a=a[0]);return zb(a,b)}})}}function Ca(a,b){var d=a&&a.$$hashKey;if(d)return"function"===typeof d&&(d=a.$$hashKey()),d;d=typeof a;return d="function"==d||"object"==d&&null!==a?a.$$hashKey=d+":"+(b||Td)():d+":"+a}function Sa(a,b){if(b){var d=0;this.nextUid=function(){return++d}}n(a,this.put,this)}function Lf(a){return(a=a.toString().replace(Sc,"").match(Tc))?
+ "function("+(a[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function eb(a,b){function d(a){return function(b,c){if(H(b))n(b,pc(a));else return a(b,c)}}function c(a,b){Ra(a,"service");if(z(b)||I(b))b=t.instantiate(b);if(!b.$get)throw Da("pget",a);return r[a+"Provider"]=b}function e(a,b){return function(){var c=v.invoke(b,this);if(q(c))throw Da("undef",a);return c}}function f(a,b,d){return c(a,{$get:!1!==d?e(a,b):b})}function g(a){qb(q(a)||I(a),"modulesToLoad","not an array");var b=[],c;n(a,function(a){function d(a){var b,
+ c;b=0;for(c=a.length;b<c;b++){var e=a[b],f=t.get(e[0]);f[e[1]].apply(f,e[2])}}if(!m.get(a)){m.put(a,!0);try{E(a)?(c=Sb(a),b=b.concat(g(c.requires)).concat(c._runBlocks),d(c._invokeQueue),d(c._configBlocks)):z(a)?b.push(t.invoke(a)):I(a)?b.push(t.invoke(a)):Qa(a,"module")}catch(e){throw I(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Da("modulerr",a,e.stack||e.message||e);}}});return b}function h(a,c){function d(b,e){if(a.hasOwnProperty(b)){if(a[b]===
+ k)throw Da("cdep",b+" <- "+l.join(" <- "));return a[b]}try{return l.unshift(b),a[b]=k,a[b]=c(b,e)}catch(f){throw a[b]===k&&delete a[b],f;}finally{l.shift()}}function e(a,c,f,g){"string"===typeof f&&(g=f,f=null);var h=[],k=eb.$$annotate(a,b,g),l,m,t;m=0;for(l=k.length;m<l;m++){t=k[m];if("string"!==typeof t)throw Da("itkn",t);h.push(f&&f.hasOwnProperty(t)?f[t]:d(t,g))}I(a)&&(a=a[l]);return a.apply(c,h)}return{invoke:e,instantiate:function(a,b,c){var d=Object.create((I(a)?a[a.length-1]:a).prototype||
+ null);a=e(a,d,b,c);return H(a)||z(a)?a:d},get:d,annotate:eb.$$annotate,has:function(b){return r.hasOwnProperty(b+"Provider")||a.hasOwnProperty(b)}}}b=!0===b;var k={},l=[],m=new Sa([],!0),r={$provide:{provider:d(c),factory:d(f),service:d(function(a,b){return f(a,["$injector",function(a){return a.instantiate(b)}])}),value:d(function(a,b){return f(a,na(b),!1)}),constant:d(function(a,b){Ra(a,"constant");r[a]=b;A[a]=b}),decorator:function(a,b){var c=t.get(a+"Provider"),d=c.$get;c.$get=function(){var a=
+ v.invoke(d,c);return v.invoke(b,null,{$delegate:a})}}}},t=r.$injector=h(r,function(a,b){fa.isString(b)&&l.push(b);throw Da("unpr",l.join(" <- "));}),A={},v=A.$injector=h(A,function(a,b){var c=t.get(a+"Provider",b);return v.invoke(c.$get,c,u,a)});n(g(a),function(a){a&&v.invoke(a)});return v}function Qe(){var a=!0;this.disableAutoScrolling=function(){a=!1};this.$get=["$window","$location","$rootScope",function(b,d,c){function e(a){var b=null;Array.prototype.some.call(a,function(a){if("a"===ta(a))return b=
+ a,!0});return b}function f(a){if(a){a.scrollIntoView();var c;c=g.yOffset;z(c)?c=c():Nb(c)?(c=c[0],c="fixed"!==b.getComputedStyle(c).position?0:c.getBoundingClientRect().bottom):Q(c)||(c=0);c&&(a=a.getBoundingClientRect().top,b.scrollBy(0,a-c))}else b.scrollTo(0,0)}function g(a){a=E(a)?a:d.hash();var b;a?(b=h.getElementById(a))?f(b):(b=e(h.getElementsByName(a)))?f(b):"top"===a&&f(null):f(null)}var h=b.document;a&&c.$watch(function(){return d.hash()},function(a,b){a===b&&""===a||Gf(function(){c.$evalAsync(g)})});
+ return g}]}function hb(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;I(a)&&(a=a.join(" "));I(b)&&(b=b.join(" "));return a+" "+b}function Mf(a){E(a)&&(a=a.split(" "));var b=$();n(a,function(a){a.length&&(b[a]=!0)});return b}function Ea(a){return H(a)?a:{}}function Nf(a,b,d,c){function e(a){try{a.apply(null,ra.call(arguments,1))}finally{if(v--,0===v)for(;T.length;)try{T.pop()()}catch(b){d.error(b)}}}function f(){L=null;g();h()}function g(){a:{try{p=m.state;break a}catch(a){}p=void 0}p=q(p)?
+ null:p;ma(p,J)&&(p=J);J=p}function h(){if(w!==k.url()||C!==p)w=k.url(),C=p,n(aa,function(a){a(k.url(),p)})}var k=this,l=a.location,m=a.history,r=a.setTimeout,t=a.clearTimeout,A={};k.isMock=!1;var v=0,T=[];k.$$completeOutstandingRequest=e;k.$$incOutstandingRequestCount=function(){v++};k.notifyWhenNoOutstandingRequests=function(a){0===v?a():T.push(a)};var p,C,w=l.href,ga=b.find("base"),L=null;g();C=p;k.url=function(b,d,e){q(e)&&(e=null);l!==a.location&&(l=a.location);m!==a.history&&(m=a.history);if(b){var f=
+ C===e;if(w===b&&(!c.history||f))return k;var h=w&&Fa(w)===Fa(b);w=b;C=e;if(!c.history||h&&f){if(!h||L)L=b;d?l.replace(b):h?(d=l,e=b.indexOf("#"),e=-1===e?"":b.substr(e),d.hash=e):l.href=b;l.href!==b&&(L=b)}else m[d?"replaceState":"pushState"](e,"",b),g(),C=p;return k}return L||l.href.replace(/%27/g,"'")};k.state=function(){return p};var aa=[],D=!1,J=null;k.onUrlChange=function(b){if(!D){if(c.history)B(a).on("popstate",f);B(a).on("hashchange",f);D=!0}aa.push(b);return b};k.$$applicationDestroyed=function(){B(a).off("hashchange popstate",
+ f)};k.$$checkUrlChange=h;k.baseHref=function(){var a=ga.attr("href");return a?a.replace(/^(https?\:)?\/\/[^\/]*/,""):""};k.defer=function(a,b){var c;v++;c=r(function(){delete A[c];e(a)},b||0);A[c]=!0;return c};k.defer.cancel=function(a){return A[a]?(delete A[a],t(a),e(x),!0):!1}}function Ve(){this.$get=["$window","$log","$sniffer","$document",function(a,b,d,c){return new Nf(a,c,b,d)}]}function We(){this.$get=function(){function a(a,c){function e(a){a!=r&&(t?t==a&&(t=a.n):t=a,f(a.n,a.p),f(a,r),r=a,
+ r.n=null)}function f(a,b){a!=b&&(a&&(a.p=b),b&&(b.n=a))}if(a in b)throw G("$cacheFactory")("iid",a);var g=0,h=M({},c,{id:a}),k=$(),l=c&&c.capacity||Number.MAX_VALUE,m=$(),r=null,t=null;return b[a]={put:function(a,b){if(!q(b)){if(l<Number.MAX_VALUE){var c=m[a]||(m[a]={key:a});e(c)}a in k||g++;k[a]=b;g>l&&this.remove(t.key);return b}},get:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;e(b)}return k[a]},remove:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;b==r&&(r=b.p);b==t&&
+ (t=b.n);f(b.n,b.p);delete m[a]}a in k&&(delete k[a],g--)},removeAll:function(){k=$();g=0;m=$();r=t=null},destroy:function(){m=h=k=null;delete b[a]},info:function(){return M({},h,{size:g})}}}var b={};a.info=function(){var a={};n(b,function(b,e){a[e]=b.info()});return a};a.get=function(a){return b[a]};return a}}function rf(){this.$get=["$cacheFactory",function(a){return a("templates")}]}function Cc(a,b){function d(a,b,c){var d=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,e={};n(a,function(a,f){var g=a.match(d);
+ if(!g)throw ha("iscp",b,f,a,c?"controller bindings definition":"isolate scope definition");e[f]={mode:g[1][0],collection:"*"===g[2],optional:"?"===g[3],attrName:g[4]||f}});return e}function c(a){var b=a.charAt(0);if(!b||b!==F(b))throw ha("baddir",a);if(a!==a.trim())throw ha("baddir",a);}var e={},f=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,g=/(([\w\-]+)(?:\:([^;]+))?;?)/,h=Wd("ngSrc,ngSrcset,src,srcset"),k=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,l=/^(on[a-z]+|formaction)$/;this.directive=function t(b,f){Ra(b,"directive");
+ E(b)?(c(b),qb(f,"directiveFactory"),e.hasOwnProperty(b)||(e[b]=[],a.factory(b+"Directive",["$injector","$exceptionHandler",function(a,c){var f=[];n(e[b],function(e,g){try{var h=a.invoke(e);z(h)?h={compile:na(h)}:!h.compile&&h.link&&(h.compile=na(h.link));h.priority=h.priority||0;h.index=g;h.name=h.name||b;h.require=h.require||h.controller&&h.name;h.restrict=h.restrict||"EA";var k=h,l=h,m=h.name,t={isolateScope:null,bindToController:null};H(l.scope)&&(!0===l.bindToController?(t.bindToController=d(l.scope,
+ m,!0),t.isolateScope={}):t.isolateScope=d(l.scope,m,!1));H(l.bindToController)&&(t.bindToController=d(l.bindToController,m,!0));if(H(t.bindToController)){var v=l.controller,R=l.controllerAs;if(!v)throw ha("noctrl",m);var V;a:if(R&&E(R))V=R;else{if(E(v)){var n=Uc.exec(v);if(n){V=n[3];break a}}V=void 0}if(!V)throw ha("noident",m);}var s=k.$$bindings=t;H(s.isolateScope)&&(h.$$isolateBindings=s.isolateScope);h.$$moduleName=e.$$moduleName;f.push(h)}catch(u){c(u)}});return f}])),e[b].push(f)):n(b,pc(t));
+ return this};this.aHrefSanitizationWhitelist=function(a){return y(a)?(b.aHrefSanitizationWhitelist(a),this):b.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(a){return y(a)?(b.imgSrcSanitizationWhitelist(a),this):b.imgSrcSanitizationWhitelist()};var m=!0;this.debugInfoEnabled=function(a){return y(a)?(m=a,this):m};this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(a,
+ b,c,d,p,C,w,ga,L,aa,D){function J(a,b){try{a.addClass(b)}catch(c){}}function K(a,b,c,d,e){a instanceof B||(a=B(a));n(a,function(b,c){b.nodeType==Na&&b.nodeValue.match(/\S+/)&&(a[c]=B(b).wrap("<span></span>").parent()[0])});var f=O(a,b,a,c,d,e);K.$$addScopeClass(a);var g=null;return function(b,c,d){qb(b,"scope");e&&e.needsNewScope&&(b=b.$parent.$new());d=d||{};var h=d.parentBoundTranscludeFn,k=d.transcludeControllers;d=d.futureParentElement;h&&h.$$boundTransclude&&(h=h.$$boundTransclude);g||(g=(d=
+ d&&d[0])?"foreignobject"!==ta(d)&&d.toString().match(/SVG/)?"svg":"html":"html");d="html"!==g?B(Yb(g,B("<div>").append(a).html())):c?Pa.clone.call(a):a;if(k)for(var l in k)d.data("$"+l+"Controller",k[l].instance);K.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,h);return d}}function O(a,b,c,d,e,f){function g(a,c,d,e){var f,k,l,m,t,w,D;if(p)for(D=Array(c.length),m=0;m<h.length;m+=3)f=h[m],D[f]=c[f];else D=c;m=0;for(t=h.length;m<t;)k=D[h[m++]],c=h[m++],f=h[m++],c?(c.scope?(l=a.$new(),K.$$addScopeInfo(B(k),
+ l)):l=a,w=c.transcludeOnThisElement?R(a,c.transclude,e):!c.templateOnThisElement&&e?e:!e&&b?R(a,b):null,c(f,l,k,d,w)):f&&f(a,k.childNodes,u,e)}for(var h=[],k,l,m,t,p,w=0;w<a.length;w++){k=new fa;l=V(a[w],[],k,0===w?d:u,e);(f=l.length?Z(l,a[w],k,b,c,null,[],[],f):null)&&f.scope&&K.$$addScopeClass(k.$$element);k=f&&f.terminal||!(m=a[w].childNodes)||!m.length?null:O(m,f?(f.transcludeOnThisElement||!f.templateOnThisElement)&&f.transclude:b);if(f||k)h.push(w,f,k),t=!0,p=p||f;f=null}return t?g:null}function R(a,
+ b,c){return function(d,e,f,g,h){d||(d=a.$new(!1,h),d.$$transcluded=!0);return b(d,e,{parentBoundTranscludeFn:c,transcludeControllers:f,futureParentElement:g})}}function V(a,b,c,d,e){var h=c.$attr,k;switch(a.nodeType){case 1:P(b,va(ta(a)),"E",d,e);for(var l,m,t,p=a.attributes,w=0,D=p&&p.length;w<D;w++){var K=!1,A=!1;l=p[w];k=l.name;m=U(l.value);l=va(k);if(t=ka.test(l))k=k.replace(Vc,"").substr(8).replace(/_(.)/g,function(a,b){return b.toUpperCase()});(l=l.match(la))&&G(l[1])&&(K=k,A=k.substr(0,k.length-
+ 5)+"end",k=k.substr(0,k.length-6));l=va(k.toLowerCase());h[l]=k;if(t||!c.hasOwnProperty(l))c[l]=m,Qc(a,l)&&(c[l]=!0);W(a,b,m,l,t);P(b,l,"A",d,e,K,A)}a=a.className;H(a)&&(a=a.animVal);if(E(a)&&""!==a)for(;k=g.exec(a);)l=va(k[2]),P(b,l,"C",d,e)&&(c[l]=U(k[3])),a=a.substr(k.index+k[0].length);break;case Na:if(11===Ha)for(;a.parentNode&&a.nextSibling&&a.nextSibling.nodeType===Na;)a.nodeValue+=a.nextSibling.nodeValue,a.parentNode.removeChild(a.nextSibling);N(b,a.nodeValue);break;case 8:try{if(k=f.exec(a.nodeValue))l=
+ va(k[1]),P(b,l,"M",d,e)&&(c[l]=U(k[2]))}catch(R){}}b.sort(Ia);return b}function Ta(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw ha("uterdir",b,c);1==a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return B(d)}function s(a,b,c){return function(d,e,f,g,h){e=Ta(e[0],b,c);return a(d,e,f,g,h)}}function Z(a,b,d,e,f,g,h,l,m){function t(a,b,c,d){if(a){c&&(a=s(a,c,d));a.require=q.require;a.directiveName=x;if(O===
+ q||q.$$isolateScope)a=ca(a,{isolateScope:!0});h.push(a)}if(b){c&&(b=s(b,c,d));b.require=q.require;b.directiveName=x;if(O===q||q.$$isolateScope)b=ca(b,{isolateScope:!0});l.push(b)}}function p(a,b,c,d){var e;if(E(b)){var f=b.match(k);b=b.substring(f[0].length);var g=f[1]||f[3],f="?"===f[2];"^^"===g?c=c.parent():e=(e=d&&d[b])&&e.instance;e||(d="$"+b+"Controller",e=g?c.inheritedData(d):c.data(d));if(!e&&!f)throw ha("ctreq",b,a);}else if(I(b))for(e=[],g=0,f=b.length;g<f;g++)e[g]=p(a,b[g],c,d);return e||
+ null}function w(a,b,c,d,e,f){var g=$(),h;for(h in d){var k=d[h],l={$scope:k===O||k.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},m=k.controller;"@"==m&&(m=b[k.name]);l=C(m,l,!0,k.controllerAs);g[k.name]=l;aa||a.data("$"+k.name+"Controller",l.instance)}return g}function D(a,c,e,f,g){function k(a,b,c){var d;Za(a)||(c=b,b=a,a=u);aa&&(d=v);c||(c=aa?V.parent():V);return g(a,b,d,c,Ta)}var m,t,A,v,C,V,Ga;b===e?(f=d,V=d.$$element):(V=B(e),f=new fa(V,d));A=c;O?t=c.$new(!0):R&&(A=c.$parent);g&&(C=k,
+ C.$$boundTransclude=g);T&&(v=w(V,f,C,T,t,c));O&&(K.$$addScopeInfo(V,t,!0,!(J&&(J===O||J===O.$$originalDirective))),K.$$addScopeClass(V,!0),t.$$isolateBindings=O.$$isolateBindings,(Ga=ba(c,f,t,t.$$isolateBindings,O))&&t.$on("$destroy",Ga));for(var n in v){Ga=T[n];var ga=v[n],L=Ga.$$bindings.bindToController;ga.identifier&&L&&(m=ba(A,f,ga.instance,L,Ga));var q=ga();q!==ga.instance&&(ga.instance=q,V.data("$"+Ga.name+"Controller",q),m&&m(),m=ba(A,f,ga.instance,L,Ga))}F=0;for(M=h.length;F<M;F++)m=h[F],
+ ea(m,m.isolateScope?t:c,V,f,m.require&&p(m.directiveName,m.require,V,v),C);var Ta=c;O&&(O.template||null===O.templateUrl)&&(Ta=t);a&&a(Ta,e.childNodes,u,g);for(F=l.length-1;0<=F;F--)m=l[F],ea(m,m.isolateScope?t:c,V,f,m.require&&p(m.directiveName,m.require,V,v),C)}m=m||{};for(var A=-Number.MAX_VALUE,R=m.newScopeDirective,T=m.controllerDirectives,O=m.newIsolateScopeDirective,J=m.templateDirective,n=m.nonTlbTranscludeDirective,ga=!1,L=!1,aa=m.hasElementTranscludeDirective,Z=d.$$element=B(b),q,x,P,Ia=
+ e,G,F=0,M=a.length;F<M;F++){q=a[F];var N=q.$$start,Q=q.$$end;N&&(Z=Ta(b,N,Q));P=u;if(A>q.priority)break;if(P=q.scope)q.templateUrl||(H(P)?(Ua("new/isolated scope",O||R,q,Z),O=q):Ua("new/isolated scope",O,q,Z)),R=R||q;x=q.name;!q.templateUrl&&q.controller&&(P=q.controller,T=T||$(),Ua("'"+x+"' controller",T[x],q,Z),T[x]=q);if(P=q.transclude)ga=!0,q.$$tlb||(Ua("transclusion",n,q,Z),n=q),"element"==P?(aa=!0,A=q.priority,P=Z,Z=d.$$element=B(X.createComment(" "+x+": "+d[x]+" ")),b=Z[0],Y(f,ra.call(P,0),
+ b),Ia=K(P,e,A,g&&g.name,{nonTlbTranscludeDirective:n})):(P=B(Vb(b)).contents(),Z.empty(),Ia=K(P,e,u,u,{needsNewScope:q.$$isolateScope||q.$$newScope}));if(q.template)if(L=!0,Ua("template",J,q,Z),J=q,P=z(q.template)?q.template(Z,d):q.template,P=ja(P),q.replace){g=q;P=Tb.test(P)?Xc(Yb(q.templateNamespace,U(P))):[];b=P[0];if(1!=P.length||1!==b.nodeType)throw ha("tplrt",x,"");Y(f,Z,b);P={$attr:{}};var Wc=V(b,[],P),W=a.splice(F+1,a.length-(F+1));(O||R)&&y(Wc,O,R);a=a.concat(Wc).concat(W);S(d,P);M=a.length}else Z.html(P);
+ if(q.templateUrl)L=!0,Ua("template",J,q,Z),J=q,q.replace&&(g=q),D=Of(a.splice(F,a.length-F),Z,d,f,ga&&Ia,h,l,{controllerDirectives:T,newScopeDirective:R!==q&&R,newIsolateScopeDirective:O,templateDirective:J,nonTlbTranscludeDirective:n}),M=a.length;else if(q.compile)try{G=q.compile(Z,d,Ia),z(G)?t(null,G,N,Q):G&&t(G.pre,G.post,N,Q)}catch(da){c(da,ua(Z))}q.terminal&&(D.terminal=!0,A=Math.max(A,q.priority))}D.scope=R&&!0===R.scope;D.transcludeOnThisElement=ga;D.templateOnThisElement=L;D.transclude=Ia;
+ m.hasElementTranscludeDirective=aa;return D}function y(a,b,c){for(var d=0,e=a.length;d<e;d++)a[d]=Ob(a[d],{$$isolateScope:b,$$newScope:c})}function P(b,d,f,g,h,k,l){if(d===h)return null;h=null;if(e.hasOwnProperty(d)){var m;d=a.get(d+"Directive");for(var p=0,w=d.length;p<w;p++)try{m=d[p],(q(g)||g>m.priority)&&-1!=m.restrict.indexOf(f)&&(k&&(m=Ob(m,{$$start:k,$$end:l})),b.push(m),h=m)}catch(D){c(D)}}return h}function G(b){if(e.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,f=c.length;d<f;d++)if(b=
+ c[d],b.multiElement)return!0;return!1}function S(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;n(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});n(b,function(b,f){"class"==f?(J(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):"style"==f?(e.attr("style",e.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==f.charAt(0)||a.hasOwnProperty(f)||(a[f]=b,d[f]=c[f])})}function Of(a,b,c,e,f,g,h,k){var l=[],m,t,p=b[0],w=a.shift(),D=Ob(w,{templateUrl:null,
+ transclude:null,replace:null,$$originalDirective:w}),A=z(w.templateUrl)?w.templateUrl(b,c):w.templateUrl,K=w.templateNamespace;b.empty();d(A).then(function(d){var T,v;d=ja(d);if(w.replace){d=Tb.test(d)?Xc(Yb(K,U(d))):[];T=d[0];if(1!=d.length||1!==T.nodeType)throw ha("tplrt",w.name,A);d={$attr:{}};Y(e,b,T);var C=V(T,[],d);H(w.scope)&&y(C,!0);a=C.concat(a);S(c,d)}else T=p,b.html(d);a.unshift(D);m=Z(a,T,c,f,b,w,g,h,k);n(e,function(a,c){a==T&&(e[c]=b[0])});for(t=O(b[0].childNodes,f);l.length;){d=l.shift();
+ v=l.shift();var ga=l.shift(),L=l.shift(),C=b[0];if(!d.$$destroyed){if(v!==p){var q=v.className;k.hasElementTranscludeDirective&&w.replace||(C=Vb(T));Y(ga,B(v),C);J(B(C),q)}v=m.transcludeOnThisElement?R(d,m.transclude,L):L;m(t,d,C,e,v)}}l=null});return function(a,b,c,d,e){a=e;b.$$destroyed||(l?l.push(b,c,d,a):(m.transcludeOnThisElement&&(a=R(b,m.transclude,e)),m(t,b,c,d,a)))}}function Ia(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function Ua(a,
+ b,c,d){function e(a){return a?" (module: "+a+")":""}if(b)throw ha("multidir",b.name,e(b.$$moduleName),c.name,e(c.$$moduleName),a,ua(d));}function N(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:function(a){a=a.parent();var b=!!a.length;b&&K.$$addBindingClass(a);return function(a,c){var e=c.parent();b||K.$$addBindingClass(e);K.$$addBindingInfo(e,d.expressions);a.$watch(d,function(a){c[0].nodeValue=a})}}})}function Yb(a,b){a=F(a||"html");switch(a){case "svg":case "math":var c=X.createElement("div");
+ c.innerHTML="<"+a+">"+b+"</"+a+">";return c.childNodes[0].childNodes;default:return b}}function Q(a,b){if("srcdoc"==b)return L.HTML;var c=ta(a);if("xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b))return L.RESOURCE_URL}function W(a,c,d,e,f){var g=Q(a,e);f=h[e]||f;var k=b(d,!0,g,f);if(k){if("multiple"===e&&"select"===ta(a))throw ha("selmulti",ua(a));c.push({priority:100,compile:function(){return{pre:function(a,c,h){c=h.$$observers||(h.$$observers=$());if(l.test(e))throw ha("nodomevents");
+ var m=h[e];m!==d&&(k=m&&b(m,!0,g,f),d=m);k&&(h[e]=k(a),(c[e]||(c[e]=[])).$$inter=!0,(h.$$observers&&h.$$observers[e].$$scope||a).$watch(k,function(a,b){"class"===e&&a!=b?h.$updateClass(a,b):h.$set(e,a)}))}}}})}}function Y(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g<h;g++)if(a[g]==d){a[g++]=c;h=g+e-1;for(var k=a.length;g<k;g++,h++)h<k?a[g]=a[h]:delete a[g];a.length-=e-1;a.context===d&&(a.context=c);break}f&&f.replaceChild(c,d);a=X.createDocumentFragment();a.appendChild(d);
+ B.hasData(d)&&(B.data(c,B.data(d)),oa?(Rb=!0,oa.cleanData([d])):delete B.cache[d[B.expando]]);d=1;for(e=b.length;d<e;d++)f=b[d],B(f).remove(),a.appendChild(f),delete b[d];b[0]=c;b.length=1}function ca(a,b){return M(function(){return a.apply(null,arguments)},a,b)}function ea(a,b,d,e,f,g){try{a(b,d,e,f,g)}catch(h){c(h,ua(d))}}function ba(a,c,d,e,f){var g=[];n(e,function(e,h){var k=e.attrName,l=e.optional,m,t,w,D;switch(e.mode){case "@":l||qa.call(c,k)||(d[h]=c[k]=void 0);c.$observe(k,function(a){E(a)&&
+ (d[h]=a)});c.$$observers[k].$$scope=a;E(c[k])&&(d[h]=b(c[k])(a));break;case "=":if(!qa.call(c,k)){if(l)break;c[k]=void 0}if(l&&!c[k])break;t=p(c[k]);D=t.literal?ma:function(a,b){return a===b||a!==a&&b!==b};w=t.assign||function(){m=d[h]=t(a);throw ha("nonassign",c[k],f.name);};m=d[h]=t(a);l=function(b){D(b,d[h])||(D(b,m)?w(a,b=d[h]):d[h]=b);return m=b};l.$stateful=!0;l=e.collection?a.$watchCollection(c[k],l):a.$watch(p(c[k],l),null,t.literal);g.push(l);break;case "&":t=c.hasOwnProperty(k)?p(c[k]):
+ x;if(t===x&&l)break;d[h]=function(b){return t(a,b)}}});return g.length&&function(){for(var a=0,b=g.length;a<b;++a)g[a]()}}var fa=function(a,b){if(b){var c=Object.keys(b),d,e,f;d=0;for(e=c.length;d<e;d++)f=c[d],this[f]=b[f]}else this.$attr={};this.$$element=a};fa.prototype={$normalize:va,$addClass:function(a){a&&0<a.length&&aa.addClass(this.$$element,a)},$removeClass:function(a){a&&0<a.length&&aa.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=Yc(a,b);c&&c.length&&aa.addClass(this.$$element,
+ c);(c=Yc(b,a))&&c.length&&aa.removeClass(this.$$element,c)},$set:function(a,b,d,e){var f=Qc(this.$$element[0],a),g=Zc[a],h=a;f?(this.$$element.prop(a,b),e=f):g&&(this[g]=b,h=g);this[a]=b;e?this.$attr[a]=e:(e=this.$attr[a])||(this.$attr[a]=e=zc(a,"-"));f=ta(this.$$element);if("a"===f&&"href"===a||"img"===f&&"src"===a)this[a]=b=D(b,"src"===a);else if("img"===f&&"srcset"===a){for(var f="",g=U(b),k=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,k=/\s/.test(g)?k:/(,)/,g=g.split(k),k=Math.floor(g.length/2),l=0;l<
+ k;l++)var m=2*l,f=f+D(U(g[m]),!0),f=f+(" "+U(g[m+1]));g=U(g[2*l]).split(/\s/);f+=D(U(g[0]),!0);2===g.length&&(f+=" "+U(g[1]));this[a]=b=f}!1!==d&&(null===b||q(b)?this.$$element.removeAttr(e):this.$$element.attr(e,b));(a=this.$$observers)&&n(a[h],function(a){try{a(b)}catch(d){c(d)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=$()),e=d[a]||(d[a]=[]);e.push(b);w.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||q(c[a])||b(c[a])});return function(){ab(e,b)}}};var da=b.startSymbol(),
+ ia=b.endSymbol(),ja="{{"==da||"}}"==ia?Ya:function(a){return a.replace(/\{\{/g,da).replace(/}}/g,ia)},ka=/^ngAttr[A-Z]/,la=/^(.+)Start$/;K.$$addBindingInfo=m?function(a,b){var c=a.data("$binding")||[];I(b)?c=c.concat(b):c.push(b);a.data("$binding",c)}:x;K.$$addBindingClass=m?function(a){J(a,"ng-binding")}:x;K.$$addScopeInfo=m?function(a,b,c,d){a.data(c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope",b)}:x;K.$$addScopeClass=m?function(a,b){J(a,b?"ng-isolate-scope":"ng-scope")}:x;return K}]}function va(a){return fb(a.replace(Vc,
+ ""))}function Yc(a,b){var d="",c=a.split(/\s+/),e=b.split(/\s+/),f=0;a:for(;f<c.length;f++){for(var g=c[f],h=0;h<e.length;h++)if(g==e[h])continue a;d+=(0<d.length?" ":"")+g}return d}function Xc(a){a=B(a);var b=a.length;if(1>=b)return a;for(;b--;)8===a[b].nodeType&&Pf.call(a,b,1);return a}function Xe(){var a={},b=!1;this.register=function(b,c){Ra(b,"controller");H(b)?M(a,b):a[b]=c};this.allowGlobals=function(){b=!0};this.$get=["$injector","$window",function(d,c){function e(a,b,c,d){if(!a||!H(a.$scope))throw G("$controller")("noscp",
+ d,b);a.$scope[b]=c}return function(f,g,h,k){var l,m,r;h=!0===h;k&&E(k)&&(r=k);if(E(f)){k=f.match(Uc);if(!k)throw Qf("ctrlfmt",f);m=k[1];r=r||k[3];f=a.hasOwnProperty(m)?a[m]:Bc(g.$scope,m,!0)||(b?Bc(c,m,!0):u);Qa(f,m,!0)}if(h)return h=(I(f)?f[f.length-1]:f).prototype,l=Object.create(h||null),r&&e(g,r,l,m||f.name),M(function(){var a=d.invoke(f,l,g,m);a!==l&&(H(a)||z(a))&&(l=a,r&&e(g,r,l,m||f.name));return l},{instance:l,identifier:r});l=d.instantiate(f,g,m);r&&e(g,r,l,m||f.name);return l}}]}function Ye(){this.$get=
+ ["$window",function(a){return B(a.document)}]}function Ze(){this.$get=["$log",function(a){return function(b,d){a.error.apply(a,arguments)}}]}function Zb(a){return H(a)?da(a)?a.toISOString():db(a):a}function df(){this.$get=function(){return function(a){if(!a)return"";var b=[];oc(a,function(a,c){null===a||q(a)||(I(a)?n(a,function(a,d){b.push(ja(c)+"="+ja(Zb(a)))}):b.push(ja(c)+"="+ja(Zb(a))))});return b.join("&")}}}function ef(){this.$get=function(){return function(a){function b(a,e,f){null===a||q(a)||
+ (I(a)?n(a,function(a,c){b(a,e+"["+(H(a)?c:"")+"]")}):H(a)&&!da(a)?oc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):d.push(ja(e)+"="+ja(Zb(a))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function $b(a,b){if(E(a)){var d=a.replace(Rf,"").trim();if(d){var c=b("Content-Type");(c=c&&0===c.indexOf($c))||(c=(c=d.match(Sf))&&Tf[c[0]].test(d));c&&(a=uc(d))}}return a}function ad(a){var b=$(),d;E(a)?n(a.split("\n"),function(a){d=a.indexOf(":");var e=F(U(a.substr(0,d)));a=U(a.substr(d+1));e&&
+ (b[e]=b[e]?b[e]+", "+a:a)}):H(a)&&n(a,function(a,d){var f=F(d),g=U(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function bd(a){var b;return function(d){b||(b=ad(a));return d?(d=b[F(d)],void 0===d&&(d=null),d):b}}function cd(a,b,d,c){if(z(c))return c(a,b,d);n(c,function(c){a=c(a,b,d)});return a}function cf(){var a=this.defaults={transformResponse:[$b],transformRequest:[function(a){return H(a)&&"[object File]"!==sa.call(a)&&"[object Blob]"!==sa.call(a)&&"[object FormData]"!==sa.call(a)?db(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},
+ post:ia(ac),put:ia(ac),patch:ia(ac)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},b=!1;this.useApplyAsync=function(a){return y(a)?(b=!!a,this):b};var d=!0;this.useLegacyPromiseExtensions=function(a){return y(a)?(d=!!a,this):d};var c=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(e,f,g,h,k,l){function m(b){function c(a){var b=M({},a);b.data=cd(a.data,a.headers,a.status,f.transformResponse);
+ a=a.status;return 200<=a&&300>a?b:k.reject(b)}function e(a,b){var c,d={};n(a,function(a,e){z(a)?(c=a(b),null!=c&&(d[e]=c)):d[e]=a});return d}if(!fa.isObject(b))throw G("$http")("badreq",b);var f=M({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer},b);f.headers=function(b){var c=a.headers,d=M({},b.headers),f,g,h,c=M({},c.common,c[F(b.method)]);a:for(f in c){g=F(f);for(h in d)if(F(h)===g)continue a;d[f]=c[f]}return e(d,ia(b))}(b);
+ f.method=sb(f.method);f.paramSerializer=E(f.paramSerializer)?l.get(f.paramSerializer):f.paramSerializer;var g=[function(b){var d=b.headers,e=cd(b.data,bd(d),u,b.transformRequest);q(e)&&n(d,function(a,b){"content-type"===F(b)&&delete d[b]});q(b.withCredentials)&&!q(a.withCredentials)&&(b.withCredentials=a.withCredentials);return r(b,e).then(c,c)},u],h=k.when(f);for(n(v,function(a){(a.request||a.requestError)&&g.unshift(a.request,a.requestError);(a.response||a.responseError)&&g.push(a.response,a.responseError)});g.length;){b=
+ g.shift();var m=g.shift(),h=h.then(b,m)}d?(h.success=function(a){Qa(a,"fn");h.then(function(b){a(b.data,b.status,b.headers,f)});return h},h.error=function(a){Qa(a,"fn");h.then(null,function(b){a(b.data,b.status,b.headers,f)});return h}):(h.success=dd("success"),h.error=dd("error"));return h}function r(c,d){function g(a,c,d,e){function f(){l(c,a,d,e)}J&&(200<=a&&300>a?J.put(R,[a,c,ad(d),e]):J.remove(R));b?h.$applyAsync(f):(f(),h.$$phase||h.$apply())}function l(a,b,d,e){b=-1<=b?b:0;(200<=b&&300>b?n.resolve:
+ n.reject)({data:a,status:b,headers:bd(d),config:c,statusText:e})}function r(a){l(a.data,a.status,ia(a.headers()),a.statusText)}function v(){var a=m.pendingRequests.indexOf(c);-1!==a&&m.pendingRequests.splice(a,1)}var n=k.defer(),D=n.promise,J,K,O=c.headers,R=t(c.url,c.paramSerializer(c.params));m.pendingRequests.push(c);D.then(v,v);!c.cache&&!a.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(J=H(c.cache)?c.cache:H(a.cache)?a.cache:A);J&&(K=J.get(R),y(K)?K&&z(K.then)?K.then(r,r):I(K)?l(K[1],
+ K[0],ia(K[2]),K[3]):l(K,200,{},"OK"):J.put(R,D));q(K)&&((K=ed(c.url)?f()[c.xsrfCookieName||a.xsrfCookieName]:u)&&(O[c.xsrfHeaderName||a.xsrfHeaderName]=K),e(c.method,R,d,g,O,c.timeout,c.withCredentials,c.responseType));return D}function t(a,b){0<b.length&&(a+=(-1==a.indexOf("?")?"?":"&")+b);return a}var A=g("$http");a.paramSerializer=E(a.paramSerializer)?l.get(a.paramSerializer):a.paramSerializer;var v=[];n(c,function(a){v.unshift(E(a)?l.get(a):l.invoke(a))});m.pendingRequests=[];(function(a){n(arguments,
+ function(a){m[a]=function(b,c){return m(M({},c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){n(arguments,function(a){m[a]=function(b,c,d){return m(M({},d||{},{method:a,url:b,data:c}))}})})("post","put","patch");m.defaults=a;return m}]}function gf(){this.$get=function(){return function(){return new S.XMLHttpRequest}}}function ff(){this.$get=["$browser","$window","$document","$xhrFactory",function(a,b,d,c){return Uf(a,c,a.defer,b.angular.callbacks,d[0])}]}function Uf(a,b,d,
+ c,e){function f(a,b,d){var f=e.createElement("script"),m=null;f.type="text/javascript";f.src=a;f.async=!0;m=function(a){f.removeEventListener("load",m,!1);f.removeEventListener("error",m,!1);e.body.removeChild(f);f=null;var g=-1,A="unknown";a&&("load"!==a.type||c[b].called||(a={type:"error"}),A=a.type,g="error"===a.type?404:200);d&&d(g,A)};f.addEventListener("load",m,!1);f.addEventListener("error",m,!1);e.body.appendChild(f);return m}return function(e,h,k,l,m,r,t,A){function v(){C&&C();w&&w.abort()}
+ function T(b,c,e,f,g){y(L)&&d.cancel(L);C=w=null;b(c,e,f,g);a.$$completeOutstandingRequest(x)}a.$$incOutstandingRequestCount();h=h||a.url();if("jsonp"==F(e)){var p="_"+(c.counter++).toString(36);c[p]=function(a){c[p].data=a;c[p].called=!0};var C=f(h.replace("JSON_CALLBACK","angular.callbacks."+p),p,function(a,b){T(l,a,c[p].data,"",b);c[p]=x})}else{var w=b(e,h);w.open(e,h,!0);n(m,function(a,b){y(a)&&w.setRequestHeader(b,a)});w.onload=function(){var a=w.statusText||"",b="response"in w?w.response:w.responseText,
+ c=1223===w.status?204:w.status;0===c&&(c=b?200:"file"==wa(h).protocol?404:0);T(l,c,b,w.getAllResponseHeaders(),a)};e=function(){T(l,-1,null,null,"")};w.onerror=e;w.onabort=e;t&&(w.withCredentials=!0);if(A)try{w.responseType=A}catch(ga){if("json"!==A)throw ga;}w.send(q(k)?null:k)}if(0<r)var L=d(v,r);else r&&z(r.then)&&r.then(v)}}function af(){var a="{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a};this.endSymbol=function(a){return a?(b=a,this):b};this.$get=["$parse","$exceptionHandler",
+ "$sce",function(d,c,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(m,a).replace(r,b)}function h(f,h,m,r){function p(a){try{var b=a;a=m?e.getTrusted(m,b):e.valueOf(b);var d;if(r&&!y(a))d=a;else if(null==a)d="";else{switch(typeof a){case "string":break;case "number":a=""+a;break;default:a=db(a)}d=a}return d}catch(g){c(Ja.interr(f,g))}}r=!!r;for(var C,w,n=0,L=[],s=[],D=f.length,J=[],K=[];n<D;)if(-1!=(C=f.indexOf(a,n))&&-1!=(w=f.indexOf(b,C+k)))n!==C&&J.push(g(f.substring(n,C))),n=f.substring(C+
+ k,w),L.push(n),s.push(d(n,p)),n=w+l,K.push(J.length),J.push("");else{n!==D&&J.push(g(f.substring(n)));break}m&&1<J.length&&Ja.throwNoconcat(f);if(!h||L.length){var O=function(a){for(var b=0,c=L.length;b<c;b++){if(r&&q(a[b]))return;J[K[b]]=a[b]}return J.join("")};return M(function(a){var b=0,d=L.length,e=Array(d);try{for(;b<d;b++)e[b]=s[b](a);return O(e)}catch(g){c(Ja.interr(f,g))}},{exp:f,expressions:L,$$watchDelegate:function(a,b){var c;return a.$watchGroup(s,function(d,e){var f=O(d);z(b)&&b.call(this,
+ f,d!==e?c:f,a);c=f})}})}}var k=a.length,l=b.length,m=new RegExp(a.replace(/./g,f),"g"),r=new RegExp(b.replace(/./g,f),"g");h.startSymbol=function(){return a};h.endSymbol=function(){return b};return h}]}function bf(){this.$get=["$rootScope","$window","$q","$$q",function(a,b,d,c){function e(e,h,k,l){var m=4<arguments.length,r=m?ra.call(arguments,4):[],t=b.setInterval,A=b.clearInterval,v=0,n=y(l)&&!l,p=(n?c:d).defer(),C=p.promise;k=y(k)?k:0;C.then(null,null,m?function(){e.apply(null,r)}:e);C.$$intervalId=
+ t(function(){p.notify(v++);0<k&&v>=k&&(p.resolve(v),A(C.$$intervalId),delete f[C.$$intervalId]);n||a.$apply()},h);f[C.$$intervalId]=p;return C}var f={};e.cancel=function(a){return a&&a.$$intervalId in f?(f[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),delete f[a.$$intervalId],!0):!1};return e}]}function bc(a){a=a.split("/");for(var b=a.length;b--;)a[b]=ob(a[b]);return a.join("/")}function fd(a,b){var d=wa(a);b.$$protocol=d.protocol;b.$$host=d.hostname;b.$$port=ea(d.port)||Vf[d.protocol]||
+ null}function gd(a,b){var d="/"!==a.charAt(0);d&&(a="/"+a);var c=wa(a);b.$$path=decodeURIComponent(d&&"/"===c.pathname.charAt(0)?c.pathname.substring(1):c.pathname);b.$$search=xc(c.search);b.$$hash=decodeURIComponent(c.hash);b.$$path&&"/"!=b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function pa(a,b){if(0===b.indexOf(a))return b.substr(a.length)}function Fa(a){var b=a.indexOf("#");return-1==b?a:a.substr(0,b)}function ib(a){return a.replace(/(#.+)|#$/,"$1")}function cc(a,b,d){this.$$html5=!0;d=d||"";
+ fd(a,this);this.$$parse=function(a){var d=pa(b,a);if(!E(d))throw Db("ipthprfx",a,b);gd(d,this);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Qb(this.$$search),d=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=bc(this.$$path)+(a?"?"+a:"")+d;this.$$absUrl=b+this.$$url.substr(1)};this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;y(f=pa(a,c))?(g=f,g=y(f=pa(d,f))?b+(pa("/",f)||f):a+g):y(f=pa(b,c))?g=b+f:b==c+"/"&&(g=b);g&&this.$$parse(g);
+ return!!g}}function dc(a,b,d){fd(a,this);this.$$parse=function(c){var e=pa(a,c)||pa(b,c),f;q(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",q(e)&&(a=c,this.replace())):(f=pa(d,e),q(f)&&(f=e));gd(f,this);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;0===f.indexOf(e)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))?f[1]:c);this.$$path=c;this.$$compose()};this.$$compose=function(){var b=Qb(this.$$search),e=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=bc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+(this.$$url?
+ d+this.$$url:"")};this.$$parseLinkUrl=function(b,d){return Fa(a)==Fa(b)?(this.$$parse(b),!0):!1}}function hd(a,b,d){this.$$html5=!0;dc.apply(this,arguments);this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a==Fa(c)?f=c:(g=pa(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$compose=function(){var b=Qb(this.$$search),e=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=bc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+d+this.$$url}}function Eb(a){return function(){return this[a]}}
+ function id(a,b){return function(d){if(q(d))return this[a];this[a]=b(d);this.$$compose();return this}}function hf(){var a="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return y(b)?(a=b,this):a};this.html5Mode=function(a){return $a(a)?(b.enabled=a,this):H(a)?($a(a.enabled)&&(b.enabled=a.enabled),$a(a.requireBase)&&(b.requireBase=a.requireBase),$a(a.rewriteLinks)&&(b.rewriteLinks=a.rewriteLinks),this):b};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",
+ function(d,c,e,f,g){function h(a,b,d){var e=l.url(),f=l.$$state;try{c.url(a,b,d),l.$$state=c.state()}catch(g){throw l.url(e),l.$$state=f,g;}}function k(a,b){d.$broadcast("$locationChangeSuccess",l.absUrl(),a,l.$$state,b)}var l,m;m=c.baseHref();var r=c.url(),t;if(b.enabled){if(!m&&b.requireBase)throw Db("nobase");t=r.substring(0,r.indexOf("/",r.indexOf("//")+2))+(m||"/");m=e.history?cc:hd}else t=Fa(r),m=dc;var A=t.substr(0,Fa(t).lastIndexOf("/")+1);l=new m(t,A,"#"+a);l.$$parseLinkUrl(r,r);l.$$state=
+ c.state();var v=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(b.rewriteLinks&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!=a.which&&2!=a.button){for(var e=B(a.target);"a"!==ta(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),k=e.attr("href")||e.attr("xlink:href");H(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=wa(h.animVal).href);v.test(h)||!h||e.attr("target")||a.isDefaultPrevented()||!l.$$parseLinkUrl(h,k)||(a.preventDefault(),l.absUrl()!=c.url()&&(d.$apply(),g.angular["ff-684208-preventDefault"]=
+ !0))}});ib(l.absUrl())!=ib(r)&&c.url(l.absUrl(),!0);var n=!0;c.onUrlChange(function(a,b){q(pa(A,a))?g.location.href=a:(d.$evalAsync(function(){var c=l.absUrl(),e=l.$$state,f;a=ib(a);l.$$parse(a);l.$$state=b;f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented;l.absUrl()===a&&(f?(l.$$parse(c),l.$$state=e,h(c,!1,e)):(n=!1,k(c,e)))}),d.$$phase||d.$digest())});d.$watch(function(){var a=ib(c.url()),b=ib(l.absUrl()),f=c.state(),g=l.$$replace,m=a!==b||l.$$html5&&e.history&&f!==l.$$state;if(n||
+ m)n=!1,d.$evalAsync(function(){var b=l.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,l.$$state,f).defaultPrevented;l.absUrl()===b&&(c?(l.$$parse(a),l.$$state=f):(m&&h(b,g,f===l.$$state?null:l.$$state),k(a,f)))});l.$$replace=!1});return l}]}function jf(){var a=!0,b=this;this.debugEnabled=function(b){return y(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&
+ (a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=d.console||{},e=b[a]||b.log||x;a=!1;try{a=!!e.apply}catch(k){}return a?function(){var a=[];n(arguments,function(b){a.push(c(b))});return e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function Va(a,b){if("__defineGetter__"===a||"__defineSetter__"===a||"__lookupGetter__"===a||"__lookupSetter__"===
+ a||"__proto__"===a)throw ba("isecfld",b);return a}function jd(a,b){a+="";if(!E(a))throw ba("iseccst",b);return a}function xa(a,b){if(a){if(a.constructor===a)throw ba("isecfn",b);if(a.window===a)throw ba("isecwindow",b);if(a.children&&(a.nodeName||a.prop&&a.attr&&a.find))throw ba("isecdom",b);if(a===Object)throw ba("isecobj",b);}return a}function kd(a,b){if(a){if(a.constructor===a)throw ba("isecfn",b);if(a===Wf||a===Xf||a===Yf)throw ba("isecff",b);}}function ld(a,b){if(a&&(a===(0).constructor||a===
+ (!1).constructor||a==="".constructor||a==={}.constructor||a===[].constructor||a===Function.constructor))throw ba("isecaf",b);}function Zf(a,b){return"undefined"!==typeof a?a:b}function md(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function W(a,b){var d,c;switch(a.type){case s.Program:d=!0;n(a.body,function(a){W(a.expression,b);d=d&&a.expression.constant});a.constant=d;break;case s.Literal:a.constant=!0;a.toWatch=[];break;case s.UnaryExpression:W(a.argument,b);a.constant=a.argument.constant;
+ a.toWatch=a.argument.toWatch;break;case s.BinaryExpression:W(a.left,b);W(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case s.LogicalExpression:W(a.left,b);W(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case s.ConditionalExpression:W(a.test,b);W(a.alternate,b);W(a.consequent,b);a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case s.Identifier:a.constant=
+ !1;a.toWatch=[a];break;case s.MemberExpression:W(a.object,b);a.computed&&W(a.property,b);a.constant=a.object.constant&&(!a.computed||a.property.constant);a.toWatch=[a];break;case s.CallExpression:d=a.filter?!b(a.callee.name).$stateful:!1;c=[];n(a.arguments,function(a){W(a,b);d=d&&a.constant;a.constant||c.push.apply(c,a.toWatch)});a.constant=d;a.toWatch=a.filter&&!b(a.callee.name).$stateful?c:[a];break;case s.AssignmentExpression:W(a.left,b);W(a.right,b);a.constant=a.left.constant&&a.right.constant;
+ a.toWatch=[a];break;case s.ArrayExpression:d=!0;c=[];n(a.elements,function(a){W(a,b);d=d&&a.constant;a.constant||c.push.apply(c,a.toWatch)});a.constant=d;a.toWatch=c;break;case s.ObjectExpression:d=!0;c=[];n(a.properties,function(a){W(a.value,b);d=d&&a.value.constant;a.value.constant||c.push.apply(c,a.value.toWatch)});a.constant=d;a.toWatch=c;break;case s.ThisExpression:a.constant=!1,a.toWatch=[]}}function nd(a){if(1==a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:u}}
+ function od(a){return a.type===s.Identifier||a.type===s.MemberExpression}function pd(a){if(1===a.body.length&&od(a.body[0].expression))return{type:s.AssignmentExpression,left:a.body[0].expression,right:{type:s.NGValueParameter},operator:"="}}function qd(a){return 0===a.body.length||1===a.body.length&&(a.body[0].expression.type===s.Literal||a.body[0].expression.type===s.ArrayExpression||a.body[0].expression.type===s.ObjectExpression)}function rd(a,b){this.astBuilder=a;this.$filter=b}function sd(a,
+ b){this.astBuilder=a;this.$filter=b}function Fb(a){return"constructor"==a}function ec(a){return z(a.valueOf)?a.valueOf():$f.call(a)}function kf(){var a=$(),b=$();this.$get=["$filter",function(d){function c(a,b){return null==a||null==b?a===b:"object"===typeof a&&(a=ec(a),"object"===typeof a)?!1:a===b||a!==a&&b!==b}function e(a,b,d,e,f){var g=e.inputs,h;if(1===g.length){var k=c,g=g[0];return a.$watch(function(a){var b=g(a);c(b,k)||(h=e(a,u,u,[b]),k=b&&ec(b));return h},b,d,f)}for(var l=[],m=[],r=0,n=
+ g.length;r<n;r++)l[r]=c,m[r]=null;return a.$watch(function(a){for(var b=!1,d=0,f=g.length;d<f;d++){var k=g[d](a);if(b||(b=!c(k,l[d])))m[d]=k,l[d]=k&&ec(k)}b&&(h=e(a,u,u,m));return h},b,d,f)}function f(a,b,c,d){var e,f;return e=a.$watch(function(a){return d(a)},function(a,c,d){f=a;z(b)&&b.apply(this,arguments);y(a)&&d.$$postDigest(function(){y(f)&&e()})},c)}function g(a,b,c,d){function e(a){var b=!0;n(a,function(a){y(a)||(b=!1)});return b}var f,g;return f=a.$watch(function(a){return d(a)},function(a,
+ c,d){g=a;z(b)&&b.call(this,a,c,d);e(a)&&d.$$postDigest(function(){e(g)&&f()})},c)}function h(a,b,c,d){var e;return e=a.$watch(function(a){return d(a)},function(a,c,d){z(b)&&b.apply(this,arguments);e()},c)}function k(a,b){if(!b)return a;var c=a.$$watchDelegate,d=!1,c=c!==g&&c!==f?function(c,e,f,g){f=d&&g?g[0]:a(c,e,f,g);return b(f,c,e)}:function(c,d,e,f){e=a(c,d,e,f);c=b(e,c,d);return y(e)?c:e};a.$$watchDelegate&&a.$$watchDelegate!==e?c.$$watchDelegate=a.$$watchDelegate:b.$stateful||(c.$$watchDelegate=
+ e,d=!a.inputs,c.inputs=a.inputs?a.inputs:[a]);return c}var l=Ba().noUnsafeEval,m={csp:l,expensiveChecks:!1},r={csp:l,expensiveChecks:!0};return function(c,l,v){var n,p,q;switch(typeof c){case "string":q=c=c.trim();var w=v?b:a;n=w[q];n||(":"===c.charAt(0)&&":"===c.charAt(1)&&(p=!0,c=c.substring(2)),v=v?r:m,n=new fc(v),n=(new gc(n,d,v)).parse(c),n.constant?n.$$watchDelegate=h:p?n.$$watchDelegate=n.literal?g:f:n.inputs&&(n.$$watchDelegate=e),w[q]=n);return k(n,l);case "function":return k(c,l);default:return x}}}]}
+ function mf(){this.$get=["$rootScope","$exceptionHandler",function(a,b){return td(function(b){a.$evalAsync(b)},b)}]}function nf(){this.$get=["$browser","$exceptionHandler",function(a,b){return td(function(b){a.defer(b)},b)}]}function td(a,b){function d(a,b,c){function d(b){return function(c){e||(e=!0,b.call(a,c))}}var e=!1;return[d(b),d(c)]}function c(){this.$$state={status:0}}function e(a,b){return function(c){b.call(a,c)}}function f(c){!c.processScheduled&&c.pending&&(c.processScheduled=!0,a(function(){var a,
+ d,e;e=c.pending;c.processScheduled=!1;c.pending=u;for(var f=0,g=e.length;f<g;++f){d=e[f][0];a=e[f][c.status];try{z(a)?d.resolve(a(c.value)):1===c.status?d.resolve(c.value):d.reject(c.value)}catch(h){d.reject(h),b(h)}}}))}function g(){this.promise=new c;this.resolve=e(this,this.resolve);this.reject=e(this,this.reject);this.notify=e(this,this.notify)}var h=G("$q",TypeError);M(c.prototype,{then:function(a,b,c){if(q(a)&&q(b)&&q(c))return this;var d=new g;this.$$state.pending=this.$$state.pending||[];
+ this.$$state.pending.push([d,a,b,c]);0<this.$$state.status&&f(this.$$state);return d.promise},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return l(b,!0,a)},function(b){return l(b,!1,a)},b)}});M(g.prototype,{resolve:function(a){this.promise.$$state.status||(a===this.promise?this.$$reject(h("qcycle",a)):this.$$resolve(a))},$$resolve:function(a){var c,e;e=d(this,this.$$resolve,this.$$reject);try{if(H(a)||z(a))c=a&&a.then;z(c)?(this.promise.$$state.status=
+ -1,c.call(a,e[0],e[1],this.notify)):(this.promise.$$state.value=a,this.promise.$$state.status=1,f(this.promise.$$state))}catch(g){e[1](g),b(g)}},reject:function(a){this.promise.$$state.status||this.$$reject(a)},$$reject:function(a){this.promise.$$state.value=a;this.promise.$$state.status=2;f(this.promise.$$state)},notify:function(c){var d=this.promise.$$state.pending;0>=this.promise.$$state.status&&d&&d.length&&a(function(){for(var a,e,f=0,g=d.length;f<g;f++){e=d[f][0];a=d[f][3];try{e.notify(z(a)?
+ a(c):c)}catch(h){b(h)}}})}});var k=function(a,b){var c=new g;b?c.resolve(a):c.reject(a);return c.promise},l=function(a,b,c){var d=null;try{z(c)&&(d=c())}catch(e){return k(e,!1)}return d&&z(d.then)?d.then(function(){return k(a,b)},function(a){return k(a,!1)}):k(a,b)},m=function(a,b,c,d){var e=new g;e.resolve(a);return e.promise.then(b,c,d)},r=function A(a){if(!z(a))throw h("norslvr",a);if(!(this instanceof A))return new A(a);var b=new g;a(function(a){b.resolve(a)},function(a){b.reject(a)});return b.promise};
+ r.defer=function(){return new g};r.reject=function(a){var b=new g;b.reject(a);return b.promise};r.when=m;r.resolve=m;r.all=function(a){var b=new g,c=0,d=I(a)?[]:{};n(a,function(a,e){c++;m(a).then(function(a){d.hasOwnProperty(e)||(d[e]=a,--c||b.resolve(d))},function(a){d.hasOwnProperty(e)||b.reject(a)})});0===c&&b.resolve(d);return b.promise};return r}function wf(){this.$get=["$window","$timeout",function(a,b){var d=a.requestAnimationFrame||a.webkitRequestAnimationFrame,c=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||
+ a.webkitCancelRequestAnimationFrame,e=!!d,f=e?function(a){var b=d(a);return function(){c(b)}}:function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};f.supported=e;return f}]}function lf(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$id=++nb;this.$$ChildScope=null}b.prototype=a;return b}var b=10,d=G("$rootScope"),c=null,e=null;this.digestTtl=function(a){arguments.length&&
+ (b=a);return b};this.$get=["$injector","$exceptionHandler","$parse","$browser",function(f,g,h,k){function l(a){a.currentScope.$$destroyed=!0}function m(a){9===Ha&&(a.$$childHead&&m(a.$$childHead),a.$$nextSibling&&m(a.$$nextSibling));a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function r(){this.$id=++nb;this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this.$root=this;this.$$destroyed=
+ !1;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$$isolateBindings=null}function t(a){if(w.$$phase)throw d("inprog",w.$$phase);w.$$phase=a}function A(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function v(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function s(){}function p(){for(;aa.length;)try{aa.shift()()}catch(a){g(a)}e=null}function C(){null===e&&(e=k.defer(function(){w.$apply(p)}))}r.prototype={constructor:r,
+ $new:function(b,c){var d;c=c||this;b?(d=new r,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope);d.$parent=c;d.$$prevSibling=c.$$childTail;c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d;(b||c!=this)&&d.$on("$destroy",l);return d},$watch:function(a,b,d,e){var f=h(a);if(f.$$watchDelegate)return f.$$watchDelegate(this,b,d,f,a);var g=this,k=g.$$watchers,l={fn:b,last:s,get:f,exp:e||a,eq:!!d};c=null;z(b)||(l.fn=x);k||
+ (k=g.$$watchers=[]);k.unshift(l);A(this,1);return function(){0<=ab(k,l)&&A(g,-1);c=null}},$watchGroup:function(a,b){function c(){h=!1;k?(k=!1,b(e,e,g)):b(e,d,g)}var d=Array(a.length),e=Array(a.length),f=[],g=this,h=!1,k=!0;if(!a.length){var l=!0;g.$evalAsync(function(){l&&b(e,e,g)});return function(){l=!1}}if(1===a.length)return this.$watch(a[0],function(a,c,f){e[0]=a;d[0]=c;b(e,a===c?e:d,f)});n(a,function(a,b){var k=g.$watch(a,function(a,f){e[b]=a;d[b]=f;h||(h=!0,g.$evalAsync(c))});f.push(k)});return function(){for(;f.length;)f.shift()()}},
+ $watchCollection:function(a,b){function c(a){e=a;var b,d,g,h;if(!q(e)){if(H(e))if(za(e))for(f!==r&&(f=r,n=f.length=0,l++),a=e.length,n!==a&&(l++,f.length=n=a),b=0;b<a;b++)h=f[b],g=e[b],d=h!==h&&g!==g,d||h===g||(l++,f[b]=g);else{f!==t&&(f=t={},n=0,l++);a=0;for(b in e)qa.call(e,b)&&(a++,g=e[b],h=f[b],b in f?(d=h!==h&&g!==g,d||h===g||(l++,f[b]=g)):(n++,f[b]=g,l++));if(n>a)for(b in l++,f)qa.call(e,b)||(n--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$stateful=!0;var d=this,e,f,g,k=1<b.length,l=0,m=
+ h(a,c),r=[],t={},p=!0,n=0;return this.$watch(m,function(){p?(p=!1,b(e,e,d)):b(e,g,d);if(k)if(H(e))if(za(e)){g=Array(e.length);for(var a=0;a<e.length;a++)g[a]=e[a]}else for(a in g={},e)qa.call(e,a)&&(g[a]=e[a]);else g=e})},$digest:function(){var a,f,h,l,m,r,n=b,A,q=[],v,C;t("$digest");k.$$checkUrlChange();this===w&&null!==e&&(k.defer.cancel(e),p());c=null;do{r=!1;for(A=this;u.length;){try{C=u.shift(),C.scope.$eval(C.expression,C.locals)}catch(aa){g(aa)}c=null}a:do{if(l=A.$$watchers)for(m=l.length;m--;)try{if(a=
+ l[m])if((f=a.get(A))!==(h=a.last)&&!(a.eq?ma(f,h):"number"===typeof f&&"number"===typeof h&&isNaN(f)&&isNaN(h)))r=!0,c=a,a.last=a.eq?bb(f,null):f,a.fn(f,h===s?f:h,A),5>n&&(v=4-n,q[v]||(q[v]=[]),q[v].push({msg:z(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:f,oldVal:h}));else if(a===c){r=!1;break a}}catch(y){g(y)}if(!(l=A.$$watchersCount&&A.$$childHead||A!==this&&A.$$nextSibling))for(;A!==this&&!(l=A.$$nextSibling);)A=A.$parent}while(A=l);if((r||u.length)&&!n--)throw w.$$phase=null,d("infdig",
+ b,q);}while(r||u.length);for(w.$$phase=null;L.length;)try{L.shift()()}catch(x){g(x)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this===w&&k.$$applicationDestroyed();A(this,-this.$$watchersCount);for(var b in this.$$listenerCount)v(this,this.$$listenerCount[b],b);a&&a.$$childHead==this&&(a.$$childHead=this.$$nextSibling);a&&a.$$childTail==this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=
+ this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=x;this.$on=this.$watch=this.$watchGroup=function(){return x};this.$$listeners={};this.$$nextSibling=null;m(this)}},$eval:function(a,b){return h(a)(this,b)},$evalAsync:function(a,b){w.$$phase||u.length||k.defer(function(){u.length&&w.$digest()});u.push({scope:this,expression:a,locals:b})},$$postDigest:function(a){L.push(a)},$apply:function(a){try{t("$apply");
+ try{return this.$eval(a)}finally{w.$$phase=null}}catch(b){g(b)}finally{try{w.$digest()}catch(c){throw g(c),c;}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&aa.push(b);C()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(c[d]=null,v(e,1,a))}},$emit:function(a,b){var c=[],d,e=this,f=!1,h=
+ {name:a,targetScope:e,stopPropagation:function(){f=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},k=cb([h],arguments,1),l,m;do{d=e.$$listeners[a]||c;h.currentScope=e;l=0;for(m=d.length;l<m;l++)if(d[l])try{d[l].apply(null,k)}catch(r){g(r)}else d.splice(l,1),l--,m--;if(f)return h.currentScope=null,h;e=e.$parent}while(e);h.currentScope=null;return h},$broadcast:function(a,b){var c=this,d=this,e={name:a,targetScope:this,preventDefault:function(){e.defaultPrevented=!0},defaultPrevented:!1};
+ if(!this.$$listenerCount[a])return e;for(var f=cb([e],arguments,1),h,k;c=d;){e.currentScope=c;d=c.$$listeners[a]||[];h=0;for(k=d.length;h<k;h++)if(d[h])try{d[h].apply(null,f)}catch(l){g(l)}else d.splice(h,1),h--,k--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}e.currentScope=null;return e}};var w=new r,u=w.$$asyncQueue=[],L=w.$$postDigestQueue=[],aa=w.$$applyAsyncQueue=[];return w}]}function ge(){var a=/^\s*(https?|ftp|mailto|tel|file):/,
+ b=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(b){return y(b)?(a=b,this):a};this.imgSrcSanitizationWhitelist=function(a){return y(a)?(b=a,this):b};this.$get=function(){return function(d,c){var e=c?b:a,f;f=wa(d).href;return""===f||f.match(e)?d:"unsafe:"+f}}}function ag(a){if("self"===a)return a;if(E(a)){if(-1<a.indexOf("***"))throw ya("iwcard",a);a=ud(a).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*");return new RegExp("^"+a+"$")}if(Ma(a))return new RegExp("^"+
+ a.source+"$");throw ya("imatcher");}function vd(a){var b=[];y(a)&&n(a,function(a){b.push(ag(a))});return b}function pf(){this.SCE_CONTEXTS=la;var a=["self"],b=[];this.resourceUrlWhitelist=function(b){arguments.length&&(a=vd(b));return a};this.resourceUrlBlacklist=function(a){arguments.length&&(b=vd(a));return b};this.$get=["$injector",function(d){function c(a,b){return"self"===a?ed(b):!!a.exec(b.href)}function e(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=
+ new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()};return b}var f=function(a){throw ya("unsafe");};d.has("$sanitize")&&(f=d.get("$sanitize"));var g=e(),h={};h[la.HTML]=e(g);h[la.CSS]=e(g);h[la.URL]=e(g);h[la.JS]=e(g);h[la.RESOURCE_URL]=e(h[la.URL]);return{trustAs:function(a,b){var c=h.hasOwnProperty(a)?h[a]:null;if(!c)throw ya("icontext",a,b);if(null===b||q(b)||""===b)return b;if("string"!==typeof b)throw ya("itype",
+ a);return new c(b)},getTrusted:function(d,e){if(null===e||q(e)||""===e)return e;var g=h.hasOwnProperty(d)?h[d]:null;if(g&&e instanceof g)return e.$$unwrapTrustedValue();if(d===la.RESOURCE_URL){var g=wa(e.toString()),r,t,n=!1;r=0;for(t=a.length;r<t;r++)if(c(a[r],g)){n=!0;break}if(n)for(r=0,t=b.length;r<t;r++)if(c(b[r],g)){n=!1;break}if(n)return e;throw ya("insecurl",e.toString());}if(d===la.HTML)return f(e);throw ya("unsafe");},valueOf:function(a){return a instanceof g?a.$$unwrapTrustedValue():a}}}]}
+ function of(){var a=!0;this.enabled=function(b){arguments.length&&(a=!!b);return a};this.$get=["$parse","$sceDelegate",function(b,d){if(a&&8>Ha)throw ya("iequirks");var c=ia(la);c.isEnabled=function(){return a};c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b},c.valueOf=Ya);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;n(la,function(a,
+ b){var d=F(b);c[fb("parse_as_"+d)]=function(b){return e(a,b)};c[fb("get_trusted_"+d)]=function(b){return f(a,b)};c[fb("trust_as_"+d)]=function(b){return g(a,b)}});return c}]}function qf(){this.$get=["$window","$document",function(a,b){var d={},c=ea((/android (\d+)/.exec(F((a.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((a.navigator||{}).userAgent),f=b[0]||{},g,h=/^(Moz|webkit|ms)(?=[A-Z])/,k=f.body&&f.body.style,l=!1,m=!1;if(k){for(var r in k)if(l=h.exec(r)){g=l[0];g=g.substr(0,1).toUpperCase()+
+ g.substr(1);break}g||(g="WebkitOpacity"in k&&"webkit");l=!!("transition"in k||g+"Transition"in k);m=!!("animation"in k||g+"Animation"in k);!c||l&&m||(l=E(k.webkitTransition),m=E(k.webkitAnimation))}return{history:!(!a.history||!a.history.pushState||4>c||e),hasEvent:function(a){if("input"===a&&11>=Ha)return!1;if(q(d[a])){var b=f.createElement("div");d[a]="on"+a in b}return d[a]},csp:Ba(),vendorPrefix:g,transitions:l,animations:m,android:c}}]}function sf(){this.$get=["$templateCache","$http","$q","$sce",
+ function(a,b,d,c){function e(f,g){e.totalPendingRequests++;E(f)&&a.get(f)||(f=c.getTrustedResourceUrl(f));var h=b.defaults&&b.defaults.transformResponse;I(h)?h=h.filter(function(a){return a!==$b}):h===$b&&(h=null);return b.get(f,{cache:a,transformResponse:h})["finally"](function(){e.totalPendingRequests--}).then(function(b){a.put(f,b.data);return b.data},function(a){if(!g)throw ha("tpload",f,a.status,a.statusText);return d.reject(a)})}e.totalPendingRequests=0;return e}]}function tf(){this.$get=["$rootScope",
+ "$browser","$location",function(a,b,d){return{findBindings:function(a,b,d){a=a.getElementsByClassName("ng-binding");var g=[];n(a,function(a){var c=fa.element(a).data("$binding");c&&n(c,function(c){d?(new RegExp("(^|\\s)"+ud(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!=c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-","data-ng-","ng\\:"],h=0;h<g.length;++h){var k=a.querySelectorAll("["+g[h]+"model"+(d?"=":"*=")+'"'+b+'"]');if(k.length)return k}},getLocation:function(){return d.url()},
+ setLocation:function(b){b!==d.url()&&(d.url(b),a.$digest())},whenStable:function(a){b.notifyWhenNoOutstandingRequests(a)}}}]}function uf(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(a,b,d,c,e){function f(f,k,l){z(f)||(l=k,k=f,f=x);var m=ra.call(arguments,3),r=y(l)&&!l,t=(r?c:d).defer(),n=t.promise,q;q=b.defer(function(){try{t.resolve(f.apply(null,m))}catch(b){t.reject(b),e(b)}finally{delete g[n.$$timeoutId]}r||a.$apply()},k);n.$$timeoutId=q;g[q]=t;return n}var g={};
+ f.cancel=function(a){return a&&a.$$timeoutId in g?(g[a.$$timeoutId].reject("canceled"),delete g[a.$$timeoutId],b.defer.cancel(a.$$timeoutId)):!1};return f}]}function wa(a){Ha&&(Y.setAttribute("href",a),a=Y.href);Y.setAttribute("href",a);return{href:Y.href,protocol:Y.protocol?Y.protocol.replace(/:$/,""):"",host:Y.host,search:Y.search?Y.search.replace(/^\?/,""):"",hash:Y.hash?Y.hash.replace(/^#/,""):"",hostname:Y.hostname,port:Y.port,pathname:"/"===Y.pathname.charAt(0)?Y.pathname:"/"+Y.pathname}}function ed(a){a=
+ E(a)?wa(a):a;return a.protocol===wd.protocol&&a.host===wd.host}function vf(){this.$get=na(S)}function xd(a){function b(a){try{return decodeURIComponent(a)}catch(b){return a}}var d=a[0]||{},c={},e="";return function(){var a,g,h,k,l;a=d.cookie||"";if(a!==e)for(e=a,a=e.split("; "),c={},h=0;h<a.length;h++)g=a[h],k=g.indexOf("="),0<k&&(l=b(g.substring(0,k)),q(c[l])&&(c[l]=b(g.substring(k+1))));return c}}function zf(){this.$get=xd}function Jc(a){function b(d,c){if(H(d)){var e={};n(d,function(a,c){e[c]=
+ b(c,a)});return e}return a.factory(d+"Filter",c)}this.register=b;this.$get=["$injector",function(a){return function(b){return a.get(b+"Filter")}}];b("currency",yd);b("date",zd);b("filter",bg);b("json",cg);b("limitTo",dg);b("lowercase",eg);b("number",Ad);b("orderBy",Bd);b("uppercase",fg)}function bg(){return function(a,b,d){if(!za(a)){if(null==a)return a;throw G("filter")("notarray",a);}var c;switch(hc(b)){case "function":break;case "boolean":case "null":case "number":case "string":c=!0;case "object":b=
+ gg(b,d,c);break;default:return a}return Array.prototype.filter.call(a,b)}}function gg(a,b,d){var c=H(a)&&"$"in a;!0===b?b=ma:z(b)||(b=function(a,b){if(q(a))return!1;if(null===a||null===b)return a===b;if(H(b)||H(a)&&!qc(a))return!1;a=F(""+a);b=F(""+b);return-1!==a.indexOf(b)});return function(e){return c&&!H(e)?Ka(e,a.$,b,!1):Ka(e,a,b,d)}}function Ka(a,b,d,c,e){var f=hc(a),g=hc(b);if("string"===g&&"!"===b.charAt(0))return!Ka(a,b.substring(1),d,c);if(I(a))return a.some(function(a){return Ka(a,b,d,c)});
+ switch(f){case "object":var h;if(c){for(h in a)if("$"!==h.charAt(0)&&Ka(a[h],b,d,!0))return!0;return e?!1:Ka(a,b,d,!1)}if("object"===g){for(h in b)if(e=b[h],!z(e)&&!q(e)&&(f="$"===h,!Ka(f?a:a[h],e,d,f,f)))return!1;return!0}return d(a,b);case "function":return!1;default:return d(a,b)}}function hc(a){return null===a?"null":typeof a}function yd(a){var b=a.NUMBER_FORMATS;return function(a,c,e){q(c)&&(c=b.CURRENCY_SYM);q(e)&&(e=b.PATTERNS[1].maxFrac);return null==a?a:Cd(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,
+ e).replace(/\u00A4/g,c)}}function Ad(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Cd(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function Cd(a,b,d,c,e){if(H(a))return"";var f=0>a;a=Math.abs(a);var g=Infinity===a;if(!g&&!isFinite(a))return"";var h=a+"",k="",l=!1,m=[];g&&(k="\u221e");if(!g&&-1!==h.indexOf("e")){var r=h.match(/([\d\.]+)e(-?)(\d+)/);r&&"-"==r[2]&&r[3]>e+1?a=0:(k=h,l=!0)}if(g||l)0<e&&1>a&&(k=a.toFixed(e),a=parseFloat(k),k=k.replace(ic,c));else{g=(h.split(ic)[1]||"").length;
+ q(e)&&(e=Math.min(Math.max(b.minFrac,g),b.maxFrac));a=+(Math.round(+(a.toString()+"e"+e)).toString()+"e"+-e);var g=(""+a).split(ic),h=g[0],g=g[1]||"",r=0,t=b.lgSize,n=b.gSize;if(h.length>=t+n)for(r=h.length-t,l=0;l<r;l++)0===(r-l)%n&&0!==l&&(k+=d),k+=h.charAt(l);for(l=r;l<h.length;l++)0===(h.length-l)%t&&0!==l&&(k+=d),k+=h.charAt(l);for(;g.length<e;)g+="0";e&&"0"!==e&&(k+=c+g.substr(0,e))}0===a&&(f=!1);m.push(f?b.negPre:b.posPre,k,f?b.negSuf:b.posSuf);return m.join("")}function Gb(a,b,d){var c="";
+ 0>a&&(c="-",a=-a);for(a=""+a;a.length<b;)a="0"+a;d&&(a=a.substr(a.length-b));return c+a}function ca(a,b,d,c){d=d||0;return function(e){e=e["get"+a]();if(0<d||e>-d)e+=d;0===e&&-12==d&&(e=12);return Gb(e,b,c)}}function Hb(a,b){return function(d,c){var e=d["get"+a](),f=sb(b?"SHORT"+a:a);return c[f][e]}}function Dd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Ed(a){return function(b){var d=Dd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-
+ +d;b=1+Math.round(b/6048E5);return Gb(b,a)}}function jc(a,b){return 0>=a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function zd(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,h=b[8]?a.setUTCFullYear:a.setFullYear,k=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=ea(b[9]+b[10]),g=ea(b[9]+b[11]));h.call(a,ea(b[1]),ea(b[2])-1,ea(b[3]));f=ea(b[4]||0)-f;g=ea(b[5]||0)-g;h=ea(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));k.call(a,f,g,h,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;
+ return function(c,d,f){var g="",h=[],k,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;E(c)&&(c=hg.test(c)?ea(c):b(c));Q(c)&&(c=new Date(c));if(!da(c)||!isFinite(c.getTime()))return c;for(;d;)(l=ig.exec(d))?(h=cb(h,l,1),d=h.pop()):(h.push(d),d=null);var m=c.getTimezoneOffset();f&&(m=vc(f,c.getTimezoneOffset()),c=Pb(c,f,!0));n(h,function(b){k=jg[b];g+=k?k(c,a.DATETIME_FORMATS,m):b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function cg(){return function(a,b){q(b)&&(b=2);return db(a,b)}}function dg(){return function(a,
+ b,d){b=Infinity===Math.abs(Number(b))?Number(b):ea(b);if(isNaN(b))return a;Q(a)&&(a=a.toString());if(!I(a)&&!E(a))return a;d=!d||isNaN(d)?0:ea(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?a.slice(d,d+b):0===d?a.slice(b,a.length):a.slice(Math.max(0,d+b),d)}}function Bd(a){function b(b,d){d=d?-1:1;return b.map(function(b){var c=1,h=Ya;if(z(b))h=b;else if(E(b)){if("+"==b.charAt(0)||"-"==b.charAt(0))c="-"==b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(h=a(b),h.constant))var k=h(),h=function(a){return a[k]}}return{get:h,
+ descending:c*d}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}return function(a,e,f){if(!za(a))return a;I(e)||(e=[e]);0===e.length&&(e=["+"]);var g=b(e,f);g.push({get:function(){return{}},descending:f?-1:1});a=Array.prototype.map.call(a,function(a,b){return{value:a,predicateValues:g.map(function(c){var e=c.get(a);c=typeof e;if(null===e)c="string",e="null";else if("string"===c)e=e.toLowerCase();else if("object"===c)a:{if("function"===typeof e.valueOf&&
+ (e=e.valueOf(),d(e)))break a;if(qc(e)&&(e=e.toString(),d(e)))break a;e=b}return{value:e,type:c}})}});a.sort(function(a,b){for(var c=0,d=0,e=g.length;d<e;++d){var c=a.predicateValues[d],f=b.predicateValues[d],n=0;c.type===f.type?c.value!==f.value&&(n=c.value<f.value?-1:1):n=c.type<f.type?-1:1;if(c=n*g[d].descending)break}return c});return a=a.map(function(a){return a.value})}}function La(a){z(a)&&(a={link:a});a.restrict=a.restrict||"AC";return na(a)}function Fd(a,b,d,c,e){var f=this,g=[];f.$error=
+ {};f.$$success={};f.$pending=u;f.$name=e(b.name||b.ngForm||"")(d);f.$dirty=!1;f.$pristine=!0;f.$valid=!0;f.$invalid=!1;f.$submitted=!1;f.$$parentForm=Ib;f.$rollbackViewValue=function(){n(g,function(a){a.$rollbackViewValue()})};f.$commitViewValue=function(){n(g,function(a){a.$commitViewValue()})};f.$addControl=function(a){Ra(a.$name,"input");g.push(a);a.$name&&(f[a.$name]=a);a.$$parentForm=f};f.$$renameControl=function(a,b){var c=a.$name;f[c]===a&&delete f[c];f[b]=a;a.$name=b};f.$removeControl=function(a){a.$name&&
+ f[a.$name]===a&&delete f[a.$name];n(f.$pending,function(b,c){f.$setValidity(c,null,a)});n(f.$error,function(b,c){f.$setValidity(c,null,a)});n(f.$$success,function(b,c){f.$setValidity(c,null,a)});ab(g,a);a.$$parentForm=Ib};Gd({ctrl:this,$element:a,set:function(a,b,c){var d=a[b];d?-1===d.indexOf(c)&&d.push(c):a[b]=[c]},unset:function(a,b,c){var d=a[b];d&&(ab(d,c),0===d.length&&delete a[b])},$animate:c});f.$setDirty=function(){c.removeClass(a,Wa);c.addClass(a,Jb);f.$dirty=!0;f.$pristine=!1;f.$$parentForm.$setDirty()};
+ f.$setPristine=function(){c.setClass(a,Wa,Jb+" ng-submitted");f.$dirty=!1;f.$pristine=!0;f.$submitted=!1;n(g,function(a){a.$setPristine()})};f.$setUntouched=function(){n(g,function(a){a.$setUntouched()})};f.$setSubmitted=function(){c.addClass(a,"ng-submitted");f.$submitted=!0;f.$$parentForm.$setSubmitted()}}function kc(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function jb(a,b,d,c,e,f){var g=F(b[0].type);if(!e.android){var h=!1;b.on("compositionstart",function(a){h=!0});
+ b.on("compositionend",function(){h=!1;k()})}var k=function(a){l&&(f.defer.cancel(l),l=null);if(!h){var e=b.val();a=a&&a.type;"password"===g||d.ngTrim&&"false"===d.ngTrim||(e=U(e));(c.$viewValue!==e||""===e&&c.$$hasNativeValidators)&&c.$setViewValue(e,a)}};if(e.hasEvent("input"))b.on("input",k);else{var l,m=function(a,b,c){l||(l=f.defer(function(){l=null;b&&b.value===c||k(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||15<b&&19>b||37<=b&&40>=b||m(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut",
+ m)}b.on("change",k);c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Kb(a,b){return function(d,c){var e,f;if(da(d))return d;if(E(d)){'"'==d.charAt(0)&&'"'==d.charAt(d.length-1)&&(d=d.substring(1,d.length-1));if(kg.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(),ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,
+ mm:0,ss:0,sss:0},n(e,function(a,c){c<b.length&&(f[b[c]]=+a)}),new Date(f.yyyy,f.MM-1,f.dd,f.HH,f.mm,f.ss||0,1E3*f.sss||0)}return NaN}}function kb(a,b,d,c){return function(e,f,g,h,k,l,m){function r(a){return a&&!(a.getTime&&a.getTime()!==a.getTime())}function n(a){return y(a)&&!da(a)?d(a)||u:a}Hd(e,f,g,h);jb(e,f,g,h,k,l);var A=h&&h.$options&&h.$options.timezone,v;h.$$parserName=a;h.$parsers.push(function(a){return h.$isEmpty(a)?null:b.test(a)?(a=d(a,v),A&&(a=Pb(a,A)),a):u});h.$formatters.push(function(a){if(a&&
+ !da(a))throw lb("datefmt",a);if(r(a))return(v=a)&&A&&(v=Pb(v,A,!0)),m("date")(a,c,A);v=null;return""});if(y(g.min)||g.ngMin){var s;h.$validators.min=function(a){return!r(a)||q(s)||d(a)>=s};g.$observe("min",function(a){s=n(a);h.$validate()})}if(y(g.max)||g.ngMax){var p;h.$validators.max=function(a){return!r(a)||q(p)||d(a)<=p};g.$observe("max",function(a){p=n(a);h.$validate()})}}}function Hd(a,b,d,c){(c.$$hasNativeValidators=H(b[0].validity))&&c.$parsers.push(function(a){var c=b.prop("validity")||{};
+ return c.badInput&&!c.typeMismatch?u:a})}function Id(a,b,d,c,e){if(y(c)){a=a(c);if(!a.constant)throw lb("constexpr",d,c);return a(b)}return e}function lc(a,b){a="ngClass"+a;return["$animate",function(d){function c(a,b){var c=[],d=0;a:for(;d<a.length;d++){for(var e=a[d],m=0;m<b.length;m++)if(e==b[m])continue a;c.push(e)}return c}function e(a){var b=[];return I(a)?(n(a,function(a){b=b.concat(e(a))}),b):E(a)?a.split(" "):H(a)?(n(a,function(a,c){a&&(b=b.concat(c.split(" ")))}),b):a}return{restrict:"AC",
+ link:function(f,g,h){function k(a,b){var c=g.data("$classCounts")||$(),d=[];n(a,function(a){if(0<b||c[a])c[a]=(c[a]||0)+b,c[a]===+(0<b)&&d.push(a)});g.data("$classCounts",c);return d.join(" ")}function l(a){if(!0===b||f.$index%2===b){var l=e(a||[]);if(!m){var n=k(l,1);h.$addClass(n)}else if(!ma(a,m)){var q=e(m),n=c(l,q),l=c(q,l),n=k(n,1),l=k(l,-1);n&&n.length&&d.addClass(g,n);l&&l.length&&d.removeClass(g,l)}}m=ia(a)}var m;f.$watch(h[a],l,!0);h.$observe("class",function(b){l(f.$eval(h[a]))});"ngClass"!==
+ a&&f.$watch("$index",function(c,d){var g=c&1;if(g!==(d&1)){var l=e(f.$eval(h[a]));g===b?(g=k(l,1),h.$addClass(g)):(g=k(l,-1),h.$removeClass(g))}})}}}]}function Gd(a){function b(a,b){b&&!f[a]?(k.addClass(e,a),f[a]=!0):!b&&f[a]&&(k.removeClass(e,a),f[a]=!1)}function d(a,c){a=a?"-"+zc(a,"-"):"";b(mb+a,!0===c);b(Jd+a,!1===c)}var c=a.ctrl,e=a.$element,f={},g=a.set,h=a.unset,k=a.$animate;f[Jd]=!(f[mb]=e.hasClass(mb));c.$setValidity=function(a,e,f){q(e)?(c.$pending||(c.$pending={}),g(c.$pending,a,f)):(c.$pending&&
+ h(c.$pending,a,f),Kd(c.$pending)&&(c.$pending=u));$a(e)?e?(h(c.$error,a,f),g(c.$$success,a,f)):(g(c.$error,a,f),h(c.$$success,a,f)):(h(c.$error,a,f),h(c.$$success,a,f));c.$pending?(b(Ld,!0),c.$valid=c.$invalid=u,d("",null)):(b(Ld,!1),c.$valid=Kd(c.$error),c.$invalid=!c.$valid,d("",c.$valid));e=c.$pending&&c.$pending[a]?u:c.$error[a]?!1:c.$$success[a]?!0:null;d(a,e);c.$$parentForm.$setValidity(a,e,c)}}function Kd(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}var lg=/^\/(.+)\/([a-z]*)$/,
+ F=function(a){return E(a)?a.toLowerCase():a},qa=Object.prototype.hasOwnProperty,sb=function(a){return E(a)?a.toUpperCase():a},Ha,B,oa,ra=[].slice,Pf=[].splice,mg=[].push,sa=Object.prototype.toString,rc=Object.getPrototypeOf,Aa=G("ng"),fa=S.angular||(S.angular={}),Sb,nb=0;Ha=X.documentMode;x.$inject=[];Ya.$inject=[];var I=Array.isArray,Vd=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,U=function(a){return E(a)?a.trim():a},ud=function(a){return a.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,
+ "\\$1").replace(/\x08/g,"\\x08")},Ba=function(){if(!y(Ba.rules)){var a=X.querySelector("[ng-csp]")||X.querySelector("[data-ng-csp]");if(a){var b=a.getAttribute("ng-csp")||a.getAttribute("data-ng-csp");Ba.rules={noUnsafeEval:!b||-1!==b.indexOf("no-unsafe-eval"),noInlineStyle:!b||-1!==b.indexOf("no-inline-style")}}else{a=Ba;try{new Function(""),b=!1}catch(d){b=!0}a.rules={noUnsafeEval:b,noInlineStyle:!1}}}return Ba.rules},pb=function(){if(y(pb.name_))return pb.name_;var a,b,d=Oa.length,c,e;for(b=0;b<
+ d;++b)if(c=Oa[b],a=X.querySelector("["+c.replace(":","\\:")+"jq]")){e=a.getAttribute(c+"jq");break}return pb.name_=e},Oa=["ng-","data-ng-","ng:","x-ng-"],be=/[A-Z]/g,Ac=!1,Rb,Na=3,fe={full:"1.4.8",major:1,minor:4,dot:8,codeName:"ice-manipulation"};N.expando="ng339";var gb=N.cache={},Ff=1;N._data=function(a){return this.cache[a[this.expando]]||{}};var Af=/([\:\-\_]+(.))/g,Bf=/^moz([A-Z])/,xb={mouseleave:"mouseout",mouseenter:"mouseover"},Ub=G("jqLite"),Ef=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Tb=/<|&#?\w+;/,
+ Cf=/<([\w:-]+)/,Df=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ka={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ka.optgroup=ka.option;ka.tbody=ka.tfoot=ka.colgroup=ka.caption=ka.thead;ka.th=ka.td;var Kf=Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&
+ 16)},Pa=N.prototype={ready:function(a){function b(){d||(d=!0,a())}var d=!1;"complete"===X.readyState?setTimeout(b):(this.on("DOMContentLoaded",b),N(S).on("load",b))},toString:function(){var a=[];n(this,function(b){a.push(""+b)});return"["+a.join(", ")+"]"},eq:function(a){return 0<=a?B(this[a]):B(this[this.length+a])},length:0,push:mg,sort:[].sort,splice:[].splice},Cb={};n("multiple selected checked disabled readOnly required open".split(" "),function(a){Cb[F(a)]=a});var Rc={};n("input select option textarea button form details".split(" "),
+ function(a){Rc[a]=!0});var Zc={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};n({data:Wb,removeData:vb,hasData:function(a){for(var b in gb[a.ng339])return!0;return!1}},function(a,b){N[b]=a});n({data:Wb,inheritedData:Bb,scope:function(a){return B.data(a,"$scope")||Bb(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return B.data(a,"$isolateScope")||B.data(a,"$isolateScopeNoTemplate")},controller:Oc,injector:function(a){return Bb(a,
+ "$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:yb,css:function(a,b,d){b=fb(b);if(y(d))a.style[b]=d;else return a.style[b]},attr:function(a,b,d){var c=a.nodeType;if(c!==Na&&2!==c&&8!==c)if(c=F(b),Cb[c])if(y(d))d?(a[b]=!0,a.setAttribute(b,c)):(a[b]=!1,a.removeAttribute(c));else return a[b]||(a.attributes.getNamedItem(b)||x).specified?c:u;else if(y(d))a.setAttribute(b,d);else if(a.getAttribute)return a=a.getAttribute(b,2),null===a?u:a},prop:function(a,b,d){if(y(d))a[b]=d;else return a[b]},
+ text:function(){function a(a,d){if(q(d)){var c=a.nodeType;return 1===c||c===Na?a.textContent:""}a.textContent=d}a.$dv="";return a}(),val:function(a,b){if(q(b)){if(a.multiple&&"select"===ta(a)){var d=[];n(a.options,function(a){a.selected&&d.push(a.value||a.text)});return 0===d.length?null:d}return a.value}a.value=b},html:function(a,b){if(q(b))return a.innerHTML;ub(a,!0);a.innerHTML=b},empty:Pc},function(a,b){N.prototype[b]=function(b,c){var e,f,g=this.length;if(a!==Pc&&q(2==a.length&&a!==yb&&a!==Oc?
+ b:c)){if(H(b)){for(e=0;e<g;e++)if(a===Wb)a(this[e],b);else for(f in b)a(this[e],f,b[f]);return this}e=a.$dv;g=q(e)?Math.min(g,1):g;for(f=0;f<g;f++){var h=a(this[f],b,c);e=e?e+h:h}return e}for(e=0;e<g;e++)a(this[e],b,c);return this}});n({removeData:vb,on:function(a,b,d,c){if(y(c))throw Ub("onargs");if(Kc(a)){c=wb(a,!0);var e=c.events,f=c.handle;f||(f=c.handle=Hf(a,e));c=0<=b.indexOf(" ")?b.split(" "):[b];for(var g=c.length,h=function(b,c,g){var h=e[b];h||(h=e[b]=[],h.specialHandlerWrapper=c,"$destroy"===
+ b||g||a.addEventListener(b,f,!1));h.push(d)};g--;)b=c[g],xb[b]?(h(xb[b],Jf),h(b,u,!0)):h(b)}},off:Nc,one:function(a,b,d){a=B(a);a.on(b,function e(){a.off(b,d);a.off(b,e)});a.on(b,d)},replaceWith:function(a,b){var d,c=a.parentNode;ub(a);n(new N(b),function(b){d?c.insertBefore(b,d.nextSibling):c.replaceChild(b,a);d=b})},children:function(a){var b=[];n(a.childNodes,function(a){1===a.nodeType&&b.push(a)});return b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var d=
+ a.nodeType;if(1===d||11===d){b=new N(b);for(var d=0,c=b.length;d<c;d++)a.appendChild(b[d])}},prepend:function(a,b){if(1===a.nodeType){var d=a.firstChild;n(new N(b),function(b){a.insertBefore(b,d)})}},wrap:function(a,b){b=B(b).eq(0).clone()[0];var d=a.parentNode;d&&d.replaceChild(b,a);b.appendChild(a)},remove:Xb,detach:function(a){Xb(a,!0)},after:function(a,b){var d=a,c=a.parentNode;b=new N(b);for(var e=0,f=b.length;e<f;e++){var g=b[e];c.insertBefore(g,d.nextSibling);d=g}},addClass:Ab,removeClass:zb,
+ toggleClass:function(a,b,d){b&&n(b.split(" "),function(b){var e=d;q(e)&&(e=!yb(a,b));(e?Ab:zb)(a,b)})},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){return a.nextElementSibling},find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:Vb,triggerHandler:function(a,b,d){var c,e,f=b.type||b,g=wb(a);if(g=(g=g&&g.events)&&g[f])c={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},
+ stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:x,type:f,target:a},b.type&&(c=M(c,b)),b=ia(g),e=d?[c].concat(d):[c],n(b,function(b){c.isImmediatePropagationStopped()||b.apply(a,e)})}},function(a,b){N.prototype[b]=function(b,c,e){for(var f,g=0,h=this.length;g<h;g++)q(f)?(f=a(this[g],b,c,e),y(f)&&(f=B(f))):Mc(f,a(this[g],b,c,e));return y(f)?f:this};N.prototype.bind=N.prototype.on;
+ N.prototype.unbind=N.prototype.off});Sa.prototype={put:function(a,b){this[Ca(a,this.nextUid)]=b},get:function(a){return this[Ca(a,this.nextUid)]},remove:function(a){var b=this[a=Ca(a,this.nextUid)];delete this[a];return b}};var yf=[function(){this.$get=[function(){return Sa}]}],Tc=/^[^\(]*\(\s*([^\)]*)\)/m,ng=/,/,og=/^\s*(_?)(\S+?)\1\s*$/,Sc=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Da=G("$injector");eb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw E(d)&&
+ d||(d=a.name||Lf(a)),Da("strictdi",d);b=a.toString().replace(Sc,"");b=b.match(Tc);n(b[1].split(ng),function(a){a.replace(og,function(a,b,d){c.push(d)})})}a.$inject=c}}else I(a)?(b=a.length-1,Qa(a[b],"fn"),c=a.slice(0,b)):Qa(a,"fn",!0);return c};var Md=G("$animate"),Ue=function(){this.$get=["$q","$$rAF",function(a,b){function d(){}d.all=x;d.chain=x;d.prototype={end:x,cancel:x,resume:x,pause:x,complete:x,then:function(c,d){return a(function(a){b(function(){a()})}).then(c,d)}};return d}]},Te=function(){var a=
+ new Sa,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;b&&(b=E(b)?b.split(" "):I(b)?b:[],n(b,function(b){b&&(d=!0,a[b]=c)}));return d}function f(){n(b,function(b){var c=a.get(b);if(c){var d=Mf(b.attr("class")),e="",f="";n(c,function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)});n(b,function(a){e&&Ab(a,e);f&&zb(a,f)});a.remove(b)}});b.length=0}return{enabled:x,on:x,off:x,pin:x,push:function(g,h,k,l){l&&l();k=k||{};k.from&&g.css(k.from);
+ k.to&&g.css(k.to);if(k.addClass||k.removeClass)if(h=k.addClass,l=k.removeClass,k=a.get(g)||{},h=e(k,h,!0),l=e(k,l,!1),h||l)a.put(g,k),b.push(g),1===b.length&&c.$$postDigest(f);return new d}}}]},Re=["$provide",function(a){var b=this;this.$$registeredAnimations=Object.create(null);this.register=function(d,c){if(d&&"."!==d.charAt(0))throw Md("notcsel",d);var e=d+"-animation";b.$$registeredAnimations[d.substr(1)]=e;a.factory(e,c)};this.classNameFilter=function(a){if(1===arguments.length&&(this.$$classNameFilter=
+ a instanceof RegExp?a:null)&&/(\s+|\/)ng-animate(\s+|\/)/.test(this.$$classNameFilter.toString()))throw Md("nongcls","ng-animate");return this.$$classNameFilter};this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var h;a:{for(h=0;h<d.length;h++){var k=d[h];if(1===k.nodeType){h=k;break a}}h=void 0}!h||h.parentNode||h.previousElementSibling||(d=null)}d?d.after(a):c.prepend(a)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.end&&a.end()},enter:function(e,f,g,h){f=
+ f&&B(f);g=g&&B(g);f=f||g.parent();b(e,f,g);return a.push(e,"enter",Ea(h))},move:function(e,f,g,h){f=f&&B(f);g=g&&B(g);f=f||g.parent();b(e,f,g);return a.push(e,"move",Ea(h))},leave:function(b,c){return a.push(b,"leave",Ea(c),function(){b.remove()})},addClass:function(b,c,g){g=Ea(g);g.addClass=hb(g.addclass,c);return a.push(b,"addClass",g)},removeClass:function(b,c,g){g=Ea(g);g.removeClass=hb(g.removeClass,c);return a.push(b,"removeClass",g)},setClass:function(b,c,g,h){h=Ea(h);h.addClass=hb(h.addClass,
+ c);h.removeClass=hb(h.removeClass,g);return a.push(b,"setClass",h)},animate:function(b,c,g,h,k){k=Ea(k);k.from=k.from?M(k.from,c):c;k.to=k.to?M(k.to,g):g;k.tempClasses=hb(k.tempClasses,h||"ng-inline-animate");return a.push(b,"animate",k)}}}]}],Se=function(){this.$get=["$$rAF","$q",function(a,b){var d=function(){};d.prototype={done:function(a){this.defer&&this.defer[!0===a?"reject":"resolve"]()},end:function(){this.done()},cancel:function(){this.done(!0)},getPromise:function(){this.defer||(this.defer=
+ b.defer());return this.defer.promise},then:function(a,b){return this.getPromise().then(a,b)},"catch":function(a){return this.getPromise()["catch"](a)},"finally":function(a){return this.getPromise()["finally"](a)}};return function(b,e){function f(){a(function(){e.addClass&&(b.addClass(e.addClass),e.addClass=null);e.removeClass&&(b.removeClass(e.removeClass),e.removeClass=null);e.to&&(b.css(e.to),e.to=null);g||h.done();g=!0});return h}e.cleanupStyles&&(e.from=e.to=null);e.from&&(b.css(e.from),e.from=
+ null);var g,h=new d;return{start:f,end:f}}}]},ha=G("$compile");Cc.$inject=["$provide","$$sanitizeUriProvider"];var Vc=/^((?:x|data)[\:\-_])/i,Qf=G("$controller"),Uc=/^(\S+)(\s+as\s+(\w+))?$/,$e=function(){this.$get=["$document",function(a){return function(b){b?!b.nodeType&&b instanceof B&&(b=b[0]):b=a[0].body;return b.offsetWidth+1}}]},$c="application/json",ac={"Content-Type":$c+";charset=utf-8"},Sf=/^\[|^\{(?!\{)/,Tf={"[":/]$/,"{":/}$/},Rf=/^\)\]\}',?\n/,pg=G("$http"),dd=function(a){return function(){throw pg("legacy",
+ a);}},Ja=fa.$interpolateMinErr=G("$interpolate");Ja.throwNoconcat=function(a){throw Ja("noconcat",a);};Ja.interr=function(a,b){return Ja("interr",a,b.toString())};var qg=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,Vf={http:80,https:443,ftp:21},Db=G("$location"),rg={$$html5:!1,$$replace:!1,absUrl:Eb("$$absUrl"),url:function(a){if(q(a))return this.$$url;var b=qg.exec(a);(b[1]||""===a)&&this.path(decodeURIComponent(b[1]));(b[2]||b[1]||""===a)&&this.search(b[3]||"");this.hash(b[5]||"");return this},protocol:Eb("$$protocol"),
+ host:Eb("$$host"),port:Eb("$$port"),path:id("$$path",function(a){a=null!==a?a.toString():"";return"/"==a.charAt(0)?a:"/"+a}),search:function(a,b){switch(arguments.length){case 0:return this.$$search;case 1:if(E(a)||Q(a))a=a.toString(),this.$$search=xc(a);else if(H(a))a=bb(a,{}),n(a,function(b,c){null==b&&delete a[c]}),this.$$search=a;else throw Db("isrcharg");break;default:q(b)||null===b?delete this.$$search[a]:this.$$search[a]=b}this.$$compose();return this},hash:id("$$hash",function(a){return null!==
+ a?a.toString():""}),replace:function(){this.$$replace=!0;return this}};n([hd,dc,cc],function(a){a.prototype=Object.create(rg);a.prototype.state=function(b){if(!arguments.length)return this.$$state;if(a!==cc||!this.$$html5)throw Db("nostate");this.$$state=q(b)?null:b;return this}});var ba=G("$parse"),Wf=Function.prototype.call,Xf=Function.prototype.apply,Yf=Function.prototype.bind,Lb=$();n("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(a){Lb[a]=!0});var sg={n:"\n",f:"\f",r:"\r",
+ t:"\t",v:"\v","'":"'",'"':'"'},fc=function(a){this.options=a};fc.prototype={constructor:fc,lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index<this.text.length;)if(a=this.text.charAt(this.index),'"'===a||"'"===a)this.readString(a);else if(this.isNumber(a)||"."===a&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(a))this.readIdent();else if(this.is(a,"(){}[].,;:?"))this.tokens.push({index:this.index,text:a}),this.index++;else if(this.isWhitespace(a))this.index++;
+ else{var b=a+this.peek(),d=b+this.peek(2),c=Lb[b],e=Lb[d];Lb[a]||c||e?(a=e?d:c?b:a,this.tokens.push({index:this.index,text:a,operator:!0}),this.index+=a.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(a,b){return-1!==b.indexOf(a)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=a&&"string"===typeof a},isWhitespace:function(a){return" "===a||"\r"===a||
+ "\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdent:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b=y(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw ba("lexerr",a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index<this.text.length;){var d=F(this.text.charAt(this.index));if("."==d||this.isNumber(d))a+=d;else{var c=this.peek();
+ if("e"==d&&this.isExpOperator(c))a+=d;else if(this.isExpOperator(d)&&c&&this.isNumber(c)&&"e"==a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||c&&this.isNumber(c)||"e"!=a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}this.tokens.push({index:b,text:a,constant:!0,value:Number(a)})},readIdent:function(){for(var a=this.index;this.index<this.text.length;){var b=this.text.charAt(this.index);if(!this.isIdent(b)&&!this.isNumber(b))break;this.index++}this.tokens.push({index:a,
+ text:this.text.slice(a,this.index),identifier:!0})},readString:function(a){var b=this.index;this.index++;for(var d="",c=a,e=!1;this.index<this.text.length;){var f=this.text.charAt(this.index),c=c+f;if(e)"u"===f?(e=this.text.substring(this.index+1,this.index+5),e.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+e+"]"),this.index+=4,d+=String.fromCharCode(parseInt(e,16))):d+=sg[f]||f,e=!1;else if("\\"===f)e=!0;else{if(f===a){this.index++;this.tokens.push({index:b,text:c,constant:!0,
+ value:d});return}d+=f}this.index++}this.throwError("Unterminated quote",b)}};var s=function(a,b){this.lexer=a;this.options=b};s.Program="Program";s.ExpressionStatement="ExpressionStatement";s.AssignmentExpression="AssignmentExpression";s.ConditionalExpression="ConditionalExpression";s.LogicalExpression="LogicalExpression";s.BinaryExpression="BinaryExpression";s.UnaryExpression="UnaryExpression";s.CallExpression="CallExpression";s.MemberExpression="MemberExpression";s.Identifier="Identifier";s.Literal=
+ "Literal";s.ArrayExpression="ArrayExpression";s.Property="Property";s.ObjectExpression="ObjectExpression";s.ThisExpression="ThisExpression";s.NGValueParameter="NGValueParameter";s.prototype={ast:function(a){this.text=a;this.tokens=this.lexer.lex(a);a=this.program();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);return a},program:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:s.Program,
+ body:a}},expressionStatement:function(){return{type:s.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a=this.expression();this.expect("|");)a=this.filter(a);return a},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();this.expect("=")&&(a={type:s.AssignmentExpression,left:a,right:this.assignment(),operator:"="});return a},ternary:function(){var a=this.logicalOR(),b,d;return this.expect("?")&&(b=this.expression(),this.consume(":"))?
+ (d=this.expression(),{type:s.ConditionalExpression,test:a,alternate:b,consequent:d}):a},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:s.LogicalExpression,operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a={type:s.LogicalExpression,operator:"&&",left:a,right:this.equality()};return a},equality:function(){for(var a=this.relational(),b;b=this.expect("==","!=","===","!==");)a={type:s.BinaryExpression,
+ operator:b.text,left:a,right:this.relational()};return a},relational:function(){for(var a=this.additive(),b;b=this.expect("<",">","<=",">=");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),b;b=this.expect("+","-");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:s.BinaryExpression,operator:b.text,
+ left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:s.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.constants.hasOwnProperty(this.peek().text)?a=bb(this.constants[this.consume().text]):this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():
+ this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:s.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:s.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:s.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:s.CallExpression,callee:this.identifier(),
+ arguments:a,filter:!0};this.expect(":");)a.push(this.expression());return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.expression());while(this.expect(","))}return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:s.Identifier,name:a.text}},constant:function(){return{type:s.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;
+ a.push(this.expression())}while(this.expect(","))}this.consume("]");return{type:s.ArrayExpression,elements:a}},object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;b={type:s.Property,kind:"init"};this.peek().constant?b.key=this.constant():this.peek().identifier?b.key=this.identifier():this.throwError("invalid key",this.peek());this.consume(":");b.value=this.expression();a.push(b)}while(this.expect(","))}this.consume("}");return{type:s.ObjectExpression,properties:a}},
+ throwError:function(a,b){throw ba("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0===this.tokens.length)throw ba("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw ba("ueoe",this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,e){if(this.tokens.length>a){a=this.tokens[a];
+ var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))?(this.tokens.shift(),a):!1},constants:{"true":{type:s.Literal,value:!0},"false":{type:s.Literal,value:!1},"null":{type:s.Literal,value:null},undefined:{type:s.Literal,value:u},"this":{type:s.ThisExpression}}};rd.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.state={nextId:0,filters:{},expensiveChecks:b,fn:{vars:[],body:[],own:{}},assign:{vars:[],
+ body:[],own:{}},inputs:[]};W(c,d.$filter);var e="",f;this.stage="assign";if(f=pd(c))this.state.computing="assign",e=this.nextId(),this.recurse(f,e),this.return_(e),e="fn.assign="+this.generateFunction("assign","s,v,l");f=nd(c.body);d.stage="inputs";n(f,function(a,b){var c="fn"+b;d.state[c]={vars:[],body:[],own:{}};d.state.computing=c;var e=d.nextId();d.recurse(a,e);d.return_(e);d.state.inputs.push(c);a.watchId=b});this.state.computing="fn";this.stage="main";this.recurse(c);e='"'+this.USE+" "+this.STRICT+
+ '";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+e+this.watchFns()+"return fn;";e=(new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",e))(this.$filter,Va,xa,kd,jd,ld,Zf,md,a);this.state=this.stage=u;e.literal=qd(c);e.constant=c.constant;return e},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;n(b,function(b){a.push("var "+b+"="+d.generateFunction(b,
+ "s"))});b.length&&a.push("fn.inputs=["+b.join(",")+"];");return a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;n(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,
+ d,c,e,f){var g,h,k=this,l,m;c=c||x;if(!f&&y(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case s.Program:n(a.body,function(b,c){k.recurse(b.expression,u,u,function(a){h=a});c!==a.body.length-1?k.current().body.push(h,";"):k.return_(h)});break;case s.Literal:m=this.escape(a.value);this.assign(b,m);c(m);break;case s.UnaryExpression:this.recurse(a.argument,u,u,function(a){h=a});m=a.operator+"("+this.ifDefined(h,
+ 0)+")";this.assign(b,m);c(m);break;case s.BinaryExpression:this.recurse(a.left,u,u,function(a){g=a});this.recurse(a.right,u,u,function(a){h=a});m="+"===a.operator?this.plus(g,h):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(h,0):"("+g+")"+a.operator+"("+h+")";this.assign(b,m);c(m);break;case s.LogicalExpression:b=b||this.nextId();k.recurse(a.left,b);k.if_("&&"===a.operator?b:k.not(b),k.lazyRecurse(a.right,b));c(b);break;case s.ConditionalExpression:b=b||this.nextId();k.recurse(a.test,
+ b);k.if_(b,k.lazyRecurse(a.alternate,b),k.lazyRecurse(a.consequent,b));c(b);break;case s.Identifier:b=b||this.nextId();d&&(d.context="inputs"===k.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name);Va(a.name);k.if_("inputs"===k.stage||k.not(k.getHasOwnProperty("l",a.name)),function(){k.if_("inputs"===k.stage||"s",function(){e&&1!==e&&k.if_(k.not(k.nonComputedMember("s",a.name)),k.lazyAssign(k.nonComputedMember("s",a.name),"{}"));k.assign(b,k.nonComputedMember("s",
+ a.name))})},b&&k.lazyAssign(b,k.nonComputedMember("l",a.name)));(k.state.expensiveChecks||Fb(a.name))&&k.addEnsureSafeObject(b);c(b);break;case s.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId();b=b||this.nextId();k.recurse(a.object,g,u,function(){k.if_(k.notNull(g),function(){if(a.computed)h=k.nextId(),k.recurse(a.property,h),k.getStringValue(h),k.addEnsureSafeMemberName(h),e&&1!==e&&k.if_(k.not(k.computedMember(g,h)),k.lazyAssign(k.computedMember(g,h),"{}")),m=k.ensureSafeObject(k.computedMember(g,
+ h)),k.assign(b,m),d&&(d.computed=!0,d.name=h);else{Va(a.property.name);e&&1!==e&&k.if_(k.not(k.nonComputedMember(g,a.property.name)),k.lazyAssign(k.nonComputedMember(g,a.property.name),"{}"));m=k.nonComputedMember(g,a.property.name);if(k.state.expensiveChecks||Fb(a.property.name))m=k.ensureSafeObject(m);k.assign(b,m);d&&(d.computed=!1,d.name=a.property.name)}},function(){k.assign(b,"undefined")});c(b)},!!e);break;case s.CallExpression:b=b||this.nextId();a.filter?(h=k.filter(a.callee.name),l=[],n(a.arguments,
+ function(a){var b=k.nextId();k.recurse(a,b);l.push(b)}),m=h+"("+l.join(",")+")",k.assign(b,m),c(b)):(h=k.nextId(),g={},l=[],k.recurse(a.callee,h,g,function(){k.if_(k.notNull(h),function(){k.addEnsureSafeFunction(h);n(a.arguments,function(a){k.recurse(a,k.nextId(),u,function(a){l.push(k.ensureSafeObject(a))})});g.name?(k.state.expensiveChecks||k.addEnsureSafeObject(g.context),m=k.member(g.context,g.name,g.computed)+"("+l.join(",")+")"):m=h+"("+l.join(",")+")";m=k.ensureSafeObject(m);k.assign(b,m)},
+ function(){k.assign(b,"undefined")});c(b)}));break;case s.AssignmentExpression:h=this.nextId();g={};if(!od(a.left))throw ba("lval");this.recurse(a.left,u,g,function(){k.if_(k.notNull(g.context),function(){k.recurse(a.right,h);k.addEnsureSafeObject(k.member(g.context,g.name,g.computed));k.addEnsureSafeAssignContext(g.context);m=k.member(g.context,g.name,g.computed)+a.operator+h;k.assign(b,m);c(b||m)})},1);break;case s.ArrayExpression:l=[];n(a.elements,function(a){k.recurse(a,k.nextId(),u,function(a){l.push(a)})});
+ m="["+l.join(",")+"]";this.assign(b,m);c(m);break;case s.ObjectExpression:l=[];n(a.properties,function(a){k.recurse(a.value,k.nextId(),u,function(b){l.push(k.escape(a.key.type===s.Identifier?a.key.name:""+a.key.value)+":"+b)})});m="{"+l.join(",")+"}";this.assign(b,m);c(m);break;case s.ThisExpression:this.assign(b,"s");c("s");break;case s.NGValueParameter:this.assign(b,"v"),c("v")}},getHasOwnProperty:function(a,b){var d=a+"."+b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+
+ this.escape(b)+" in "+a+")"));return c[d]},assign:function(a,b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,
+ "){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){return a+"."+b},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a,b)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),";")},
+ addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a),";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},getStringValue:function(a){this.assign(a,"getStringValue("+a+",text)")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+
+ a+",text)"},lazyRecurse:function(a,b,d,c,e,f){var g=this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(E(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(Q(a))return a.toString();if(!0===a)return"true";if(!1===a)return"false";if(null===a)return"null";if("undefined"===
+ typeof a)return"undefined";throw ba("esc");},nextId:function(a,b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};sd.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.expression=a;this.expensiveChecks=b;W(c,d.$filter);var e,f;if(e=pd(c))f=this.recurse(e);e=nd(c.body);var g;e&&(g=[],n(e,function(a,b){var c=d.recurse(a);a.input=c;g.push(c);a.watchId=b}));var h=[];n(c.body,function(a){h.push(d.recurse(a.expression))});
+ e=0===c.body.length?function(){}:1===c.body.length?h[0]:function(a,b){var c;n(h,function(d){c=d(a,b)});return c};f&&(e.assign=function(a,b,c){return f(a,c,b)});g&&(e.inputs=g);e.literal=qd(c);e.constant=c.constant;return e},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case s.Literal:return this.value(a.value,b);case s.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case s.BinaryExpression:return c=this.recurse(a.left),
+ e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case s.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case s.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case s.Identifier:return Va(a.name,f.expression),f.identifier(a.name,f.expensiveChecks||Fb(a.name),b,d,f.expression);case s.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(Va(a.property.name,
+ f.expression),e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c,e,b,d,f.expression):this.nonComputedMember(c,e,f.expensiveChecks,b,d,f.expression);case s.CallExpression:return g=[],n(a.arguments,function(a){g.push(f.recurse(a))}),a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var r=[],n=0;n<g.length;++n)r.push(g[n](a,c,d,f));a=e.apply(u,r,f);return b?{context:u,name:u,value:a}:a}:function(a,
+ c,d,m){var r=e(a,c,d,m),n;if(null!=r.value){xa(r.context,f.expression);kd(r.value,f.expression);n=[];for(var q=0;q<g.length;++q)n.push(xa(g[q](a,c,d,m),f.expression));n=xa(r.value.apply(r.context,n),f.expression)}return b?{value:n}:n};case s.AssignmentExpression:return c=this.recurse(a.left,!0,1),e=this.recurse(a.right),function(a,d,g,m){var n=c(a,d,g,m);a=e(a,d,g,m);xa(n.value,f.expression);ld(n.context);n.context[n.name]=a;return b?{value:a}:a};case s.ArrayExpression:return g=[],n(a.elements,function(a){g.push(f.recurse(a))}),
+ function(a,c,d,e){for(var f=[],n=0;n<g.length;++n)f.push(g[n](a,c,d,e));return b?{value:f}:f};case s.ObjectExpression:return g=[],n(a.properties,function(a){g.push({key:a.key.type===s.Identifier?a.key.name:""+a.key.value,value:f.recurse(a.value)})}),function(a,c,d,e){for(var f={},n=0;n<g.length;++n)f[g[n].key]=g[n].value(a,c,d,e);return b?{value:f}:f};case s.ThisExpression:return function(a){return b?{value:a}:a};case s.NGValueParameter:return function(a,c,d,e){return b?{value:d}:d}}},"unary+":function(a,
+ b){return function(d,c,e,f){d=a(d,c,e,f);d=y(d)?+d:0;return b?{value:d}:d}},"unary-":function(a,b){return function(d,c,e,f){d=a(d,c,e,f);d=y(d)?-d:0;return b?{value:d}:d}},"unary!":function(a,b){return function(d,c,e,f){d=!a(d,c,e,f);return b?{value:d}:d}},"binary+":function(a,b,d){return function(c,e,f,g){var h=a(c,e,f,g);c=b(c,e,f,g);h=md(h,c);return d?{value:h}:h}},"binary-":function(a,b,d){return function(c,e,f,g){var h=a(c,e,f,g);c=b(c,e,f,g);h=(y(h)?h:0)-(y(c)?c:0);return d?{value:h}:h}},"binary*":function(a,
+ b,d){return function(c,e,f,g){c=a(c,e,f,g)*b(c,e,f,g);return d?{value:c}:c}},"binary/":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)/b(c,e,f,g);return d?{value:c}:c}},"binary%":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)%b(c,e,f,g);return d?{value:c}:c}},"binary===":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)===b(c,e,f,g);return d?{value:c}:c}},"binary!==":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!==b(c,e,f,g);return d?{value:c}:c}},"binary==":function(a,b,
+ d){return function(c,e,f,g){c=a(c,e,f,g)==b(c,e,f,g);return d?{value:c}:c}},"binary!=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!=b(c,e,f,g);return d?{value:c}:c}},"binary<":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<b(c,e,f,g);return d?{value:c}:c}},"binary>":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,
+ e,f,g){c=a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,h){e=a(e,f,g,h)?b(e,f,g,h):d(e,f,g,h);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:u,name:u,value:a}:a}},identifier:function(a,b,d,c,e){return function(f,g,h,k){f=
+ g&&a in g?g:f;c&&1!==c&&f&&!f[a]&&(f[a]={});g=f?f[a]:u;b&&xa(g,e);return d?{context:f,name:a,value:g}:g}},computedMember:function(a,b,d,c,e){return function(f,g,h,k){var l=a(f,g,h,k),m,n;null!=l&&(m=b(f,g,h,k),m=jd(m),Va(m,e),c&&1!==c&&l&&!l[m]&&(l[m]={}),n=l[m],xa(n,e));return d?{context:l,name:m,value:n}:n}},nonComputedMember:function(a,b,d,c,e,f){return function(g,h,k,l){g=a(g,h,k,l);e&&1!==e&&g&&!g[b]&&(g[b]={});h=null!=g?g[b]:u;(d||Fb(b))&&xa(h,f);return c?{context:g,name:b,value:h}:h}},inputs:function(a,
+ b){return function(d,c,e,f){return f?f[b]:a(d,c,e)}}};var gc=function(a,b,d){this.lexer=a;this.$filter=b;this.options=d;this.ast=new s(this.lexer);this.astCompiler=d.csp?new sd(this.ast,b):new rd(this.ast,b)};gc.prototype={constructor:gc,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};$();$();var $f=Object.prototype.valueOf,ya=G("$sce"),la={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},ha=G("$compile"),Y=X.createElement("a"),wd=wa(S.location.href);
+ xd.$inject=["$document"];Jc.$inject=["$provide"];yd.$inject=["$locale"];Ad.$inject=["$locale"];var ic=".",jg={yyyy:ca("FullYear",4),yy:ca("FullYear",2,0,!0),y:ca("FullYear",1),MMMM:Hb("Month"),MMM:Hb("Month",!0),MM:ca("Month",2,1),M:ca("Month",1,1),dd:ca("Date",2),d:ca("Date",1),HH:ca("Hours",2),H:ca("Hours",1),hh:ca("Hours",2,-12),h:ca("Hours",1,-12),mm:ca("Minutes",2),m:ca("Minutes",1),ss:ca("Seconds",2),s:ca("Seconds",1),sss:ca("Milliseconds",3),EEEE:Hb("Day"),EEE:Hb("Day",!0),a:function(a,b){return 12>
+ a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Gb(Math[0<a?"floor":"ceil"](a/60),2)+Gb(Math.abs(a%60),2))},ww:Ed(2),w:Ed(1),G:jc,GG:jc,GGG:jc,GGGG:function(a,b){return 0>=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},ig=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,hg=/^\-?\d+$/;zd.$inject=["$locale"];var eg=na(F),fg=na(sb);Bd.$inject=["$parse"];var he=na({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,
+ b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===sa.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),tb={};n(Cb,function(a,b){function d(a,d,e){a.$watch(e[c],function(a){e.$set(b,!!a)})}if("multiple"!=a){var c=va("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)});tb[c]=function(){return{restrict:"A",priority:100,link:e}}}});n(Zc,function(a,b){tb[b]=function(){return{priority:100,link:function(a,
+ c,e){if("ngPattern"===b&&"/"==e.ngPattern.charAt(0)&&(c=e.ngPattern.match(lg))){e.$set("ngPattern",new RegExp(c[1],c[2]));return}a.$watch(e[b],function(a){e.$set(b,a)})}}}});n(["src","srcset","href"],function(a){var b=va("ng-"+a);tb[b]=function(){return{priority:99,link:function(d,c,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"===sa.call(c.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null);e.$observe(b,function(b){b?(e.$set(g,b),Ha&&f&&c.prop(f,e[g])):"href"===a&&e.$set(g,null)})}}}});
+ var Ib={$addControl:x,$$renameControl:function(a,b){a.$name=b},$removeControl:x,$setValidity:x,$setDirty:x,$setPristine:x,$setSubmitted:x};Fd.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Nd=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||x}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Fd,compile:function(d,f){d.addClass(Wa).addClass(mb);var g=f.name?"name":a&&f.ngForm?"ngForm":
+ !1;return{pre:function(a,d,e,f){var n=f[0];if(!("action"in e)){var q=function(b){a.$apply(function(){n.$commitViewValue();n.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",q,!1);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",q,!1)},0,!1)})}(f[1]||n.$$parentForm).$addControl(n);var s=g?c(n.$name):x;g&&(s(a,n),e.$observe(g,function(b){n.$name!==b&&(s(a,u),n.$$parentForm.$$renameControl(n,b),s=c(n.$name),s(a,n))}));d.on("$destroy",function(){n.$$parentForm.$removeControl(n);
+ s(a,u);M(n,Ib)})}}}}}]},ie=Nd(),ve=Nd(!0),kg=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,tg=/^[A-Za-z][A-Za-z\d.+-]*:\/*(?:\w+(?::\w+)?@)?[^\s/]+(?::\d+)?(?:\/[\w#!:.?+=&%@\-/]*)?$/,ug=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,vg=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Od=/^(\d{4})-(\d{2})-(\d{2})$/,Pd=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,mc=/^(\d{4})-W(\d\d)$/,Qd=/^(\d{4})-(\d\d)$/,
+ Rd=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Sd={text:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);kc(c)},date:kb("date",Od,Kb(Od,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":kb("datetimelocal",Pd,Kb(Pd,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:kb("time",Rd,Kb(Rd,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:kb("week",mc,function(a,b){if(da(a))return a;if(E(a)){mc.lastIndex=0;var d=mc.exec(a);if(d){var c=+d[1],e=+d[2],f=d=0,g=0,h=0,k=Dd(c),e=7*(e-1);b&&(d=b.getHours(),f=
+ b.getMinutes(),g=b.getSeconds(),h=b.getMilliseconds());return new Date(c,0,k.getDate()+e,d,f,g,h)}}return NaN},"yyyy-Www"),month:kb("month",Qd,Kb(Qd,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f){Hd(a,b,d,c);jb(a,b,d,c,e,f);c.$$parserName="number";c.$parsers.push(function(a){return c.$isEmpty(a)?null:vg.test(a)?parseFloat(a):u});c.$formatters.push(function(a){if(!c.$isEmpty(a)){if(!Q(a))throw lb("numfmt",a);a=a.toString()}return a});if(y(d.min)||d.ngMin){var g;c.$validators.min=function(a){return c.$isEmpty(a)||
+ q(g)||a>=g};d.$observe("min",function(a){y(a)&&!Q(a)&&(a=parseFloat(a,10));g=Q(a)&&!isNaN(a)?a:u;c.$validate()})}if(y(d.max)||d.ngMax){var h;c.$validators.max=function(a){return c.$isEmpty(a)||q(h)||a<=h};d.$observe("max",function(a){y(a)&&!Q(a)&&(a=parseFloat(a,10));h=Q(a)&&!isNaN(a)?a:u;c.$validate()})}},url:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);kc(c);c.$$parserName="url";c.$validators.url=function(a,b){var d=a||b;return c.$isEmpty(d)||tg.test(d)}},email:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);kc(c);
+ c.$$parserName="email";c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||ug.test(d)}},radio:function(a,b,d,c){q(d.name)&&b.attr("name",++nb);b.on("click",function(a){b[0].checked&&c.$setViewValue(d.value,a&&a.type)});c.$render=function(){b[0].checked=d.value==c.$viewValue};d.$observe("value",c.$render)},checkbox:function(a,b,d,c,e,f,g,h){var k=Id(h,a,"ngTrueValue",d.ngTrueValue,!0),l=Id(h,a,"ngFalseValue",d.ngFalseValue,!1);b.on("click",function(a){c.$setViewValue(b[0].checked,a&&
+ a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty=function(a){return!1===a};c.$formatters.push(function(a){return ma(a,k)});c.$parsers.push(function(a){return a?k:l})},hidden:x,button:x,submit:x,reset:x,file:x},Dc=["$browser","$sniffer","$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,h){h[0]&&(Sd[F(g.type)]||Sd.text)(e,f,g,h[0],b,a,d,c)}}}}],wg=/^(true|false|\d+)$/,Ne=function(){return{restrict:"A",priority:100,compile:function(a,
+ b){return wg.test(b.ngValue)?function(a,b,e){e.$set("value",a.$eval(e.ngValue))}:function(a,b,e){a.$watch(e.ngValue,function(a){e.$set("value",a)})}}}},ne=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b);return function(b,c,e){a.$$addBindingInfo(c,e.ngBind);c=c[0];b.$watch(e.ngBind,function(a){c.textContent=q(a)?"":a})}}}}],pe=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate));
+ b.$$addBindingInfo(d,c.expressions);d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=q(a)?"":a})}}}}],oe=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(a){return(a||"").toString()});d.$$addBindingClass(c);return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){c.html(a.getTrustedHtml(f(b))||"")})}}}}],Me=na({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),
+ qe=lc("",!0),se=lc("Odd",0),re=lc("Even",1),te=La({compile:function(a,b){b.$set("ngCloak",u);a.removeClass("ng-cloak")}}),ue=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Ic={},xg={blur:!0,focus:!0};n("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=va("ng-"+a);Ic[b]=["$parse","$rootScope",function(d,c){return{restrict:"A",compile:function(e,f){var g=
+ d(f[b],null,!0);return function(b,d){d.on(a,function(d){var e=function(){g(b,{$event:d})};xg[a]&&c.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var xe=["$animate",function(a){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(b,d,c,e,f){var g,h,k;b.$watch(c.ngIf,function(b){b?h||f(function(b,e){h=e;b[b.length++]=X.createComment(" end ngIf: "+c.ngIf+" ");g={clone:b};a.enter(b,d.parent(),d)}):(k&&(k.remove(),k=null),h&&(h.$destroy(),h=null),g&&(k=
+ rb(g.clone),a.leave(k).then(function(){k=null}),g=null))})}}}],ye=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:fa.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",h=e.autoscroll;return function(c,e,m,n,q){var s=0,v,u,p,C=function(){u&&(u.remove(),u=null);v&&(v.$destroy(),v=null);p&&(d.leave(p).then(function(){u=null}),u=p,p=null)};c.$watch(f,function(f){var m=function(){!y(h)||h&&!c.$eval(h)||
+ b()},u=++s;f?(a(f,!0).then(function(a){if(u===s){var b=c.$new();n.template=a;a=q(b,function(a){C();d.enter(a,null,e).then(m)});v=b;p=a;v.$emit("$includeContentLoaded",f);c.$eval(g)}},function(){u===s&&(C(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(C(),n.template=null)})}}}}],Pe=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){/SVG/.test(d[0].toString())?(d.empty(),a(Lc(e.template,X).childNodes)(b,function(a){d.append(a)},
+ {futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],ze=La({priority:450,compile:function(){return{pre:function(a,b,d){a.$eval(d.ngInit)}}}}),Le=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=b.attr(d.$attr.ngList)||", ",f="false"!==d.ngTrim,g=f?U(e):e;c.$parsers.push(function(a){if(!q(a)){var b=[];a&&n(a.split(g),function(a){a&&b.push(f?U(a):a)});return b}});c.$formatters.push(function(a){return I(a)?a.join(e):u});c.$isEmpty=function(a){return!a||
+ !a.length}}}},mb="ng-valid",Jd="ng-invalid",Wa="ng-pristine",Jb="ng-dirty",Ld="ng-pending",lb=G("ngModel"),yg=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,b,d,c,e,f,g,h,k,l){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=u;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$untouched=!0;this.$touched=!1;this.$pristine=!0;this.$dirty=!1;
+ this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success={};this.$pending=u;this.$name=l(d.name||"",!1)(a);this.$$parentForm=Ib;var m=e(d.ngModel),r=m.assign,t=m,s=r,v=null,B,p=this;this.$$setOptions=function(a){if((p.$options=a)&&a.getterSetter){var b=e(d.ngModel+"()"),f=e(d.ngModel+"($$$p)");t=function(a){var c=m(a);z(c)&&(c=b(a));return c};s=function(a,b){z(m(a))?f(a,{$$$p:p.$modelValue}):r(a,p.$modelValue)}}else if(!m.assign)throw lb("nonassign",d.ngModel,ua(c));};this.$render=x;this.$isEmpty=
+ function(a){return q(a)||""===a||null===a||a!==a};var C=0;Gd({ctrl:this,$element:c,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]},$animate:f});this.$setPristine=function(){p.$dirty=!1;p.$pristine=!0;f.removeClass(c,Jb);f.addClass(c,Wa)};this.$setDirty=function(){p.$dirty=!0;p.$pristine=!1;f.removeClass(c,Wa);f.addClass(c,Jb);p.$$parentForm.$setDirty()};this.$setUntouched=function(){p.$touched=!1;p.$untouched=!0;f.setClass(c,"ng-untouched","ng-touched")};this.$setTouched=function(){p.$touched=
+ !0;p.$untouched=!1;f.setClass(c,"ng-touched","ng-untouched")};this.$rollbackViewValue=function(){g.cancel(v);p.$viewValue=p.$$lastCommittedViewValue;p.$render()};this.$validate=function(){if(!Q(p.$modelValue)||!isNaN(p.$modelValue)){var a=p.$$rawModelValue,b=p.$valid,c=p.$modelValue,d=p.$options&&p.$options.allowInvalid;p.$$runValidators(a,p.$$lastCommittedViewValue,function(e){d||b===e||(p.$modelValue=e?a:u,p.$modelValue!==c&&p.$$writeModelToScope())})}};this.$$runValidators=function(a,b,c){function d(){var c=
+ !0;n(p.$validators,function(d,e){var g=d(a,b);c=c&&g;f(e,g)});return c?!0:(n(p.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;n(p.$asyncValidators,function(e,g){var h=e(a,b);if(!h||!z(h.then))throw lb("$asyncValidators",h);f(g,u);c.push(h.then(function(){f(g,!0)},function(a){d=!1;f(g,!1)}))});c.length?k.all(c).then(function(){g(d)},x):g(!0)}function f(a,b){h===C&&p.$setValidity(a,b)}function g(a){h===C&&c(a)}C++;var h=C;(function(){var a=p.$$parserName||"parse";if(q(B))f(a,
+ null);else return B||(n(p.$validators,function(a,b){f(b,null)}),n(p.$asyncValidators,function(a,b){f(b,null)})),f(a,B),B;return!0})()?d()?e():g(!1):g(!1)};this.$commitViewValue=function(){var a=p.$viewValue;g.cancel(v);if(p.$$lastCommittedViewValue!==a||""===a&&p.$$hasNativeValidators)p.$$lastCommittedViewValue=a,p.$pristine&&this.$setDirty(),this.$$parseAndValidate()};this.$$parseAndValidate=function(){var b=p.$$lastCommittedViewValue;if(B=q(b)?u:!0)for(var c=0;c<p.$parsers.length;c++)if(b=p.$parsers[c](b),
+ q(b)){B=!1;break}Q(p.$modelValue)&&isNaN(p.$modelValue)&&(p.$modelValue=t(a));var d=p.$modelValue,e=p.$options&&p.$options.allowInvalid;p.$$rawModelValue=b;e&&(p.$modelValue=b,p.$modelValue!==d&&p.$$writeModelToScope());p.$$runValidators(b,p.$$lastCommittedViewValue,function(a){e||(p.$modelValue=a?b:u,p.$modelValue!==d&&p.$$writeModelToScope())})};this.$$writeModelToScope=function(){s(a,p.$modelValue);n(p.$viewChangeListeners,function(a){try{a()}catch(c){b(c)}})};this.$setViewValue=function(a,b){p.$viewValue=
+ a;p.$options&&!p.$options.updateOnDefault||p.$$debounceViewValueCommit(b)};this.$$debounceViewValueCommit=function(b){var c=0,d=p.$options;d&&y(d.debounce)&&(d=d.debounce,Q(d)?c=d:Q(d[b])?c=d[b]:Q(d["default"])&&(c=d["default"]));g.cancel(v);c?v=g(function(){p.$commitViewValue()},c):h.$$phase?p.$commitViewValue():a.$apply(function(){p.$commitViewValue()})};a.$watch(function(){var b=t(a);if(b!==p.$modelValue&&(p.$modelValue===p.$modelValue||b===b)){p.$modelValue=p.$$rawModelValue=b;B=u;for(var c=p.$formatters,
+ d=c.length,e=b;d--;)e=c[d](e);p.$viewValue!==e&&(p.$viewValue=p.$$lastCommittedViewValue=e,p.$render(),p.$$runValidators(b,e,x))}return b})}],Ke=["$rootScope",function(a){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:yg,priority:1,compile:function(b){b.addClass(Wa).addClass("ng-untouched").addClass(mb);return{pre:function(a,b,e,f){var g=f[0];b=f[1]||g.$$parentForm;g.$$setOptions(f[2]&&f[2].$options);b.$addControl(g);e.$observe("name",function(a){g.$name!==a&&g.$$parentForm.$$renameControl(g,
+ a)});a.$on("$destroy",function(){g.$$parentForm.$removeControl(g)})},post:function(b,c,e,f){var g=f[0];if(g.$options&&g.$options.updateOn)c.on(g.$options.updateOn,function(a){g.$$debounceViewValueCommit(a&&a.type)});c.on("blur",function(c){g.$touched||(a.$$phase?b.$evalAsync(g.$setTouched):b.$apply(g.$setTouched))})}}}}}],zg=/(\s+|^)default(\s+|$)/,Oe=function(){return{restrict:"A",controller:["$scope","$attrs",function(a,b){var d=this;this.$options=bb(a.$eval(b.ngModelOptions));y(this.$options.updateOn)?
+ (this.$options.updateOnDefault=!1,this.$options.updateOn=U(this.$options.updateOn.replace(zg,function(){d.$options.updateOnDefault=!0;return" "}))):this.$options.updateOnDefault=!0}]}},Ae=La({terminal:!0,priority:1E3}),Ag=G("ngOptions"),Bg=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,Ie=["$compile","$parse",function(a,
+ b){function d(a,c,d){function e(a,b,c,d,f){this.selectValue=a;this.viewValue=b;this.label=c;this.group=d;this.disabled=f}function l(a){var b;if(!q&&za(a))b=a;else{b=[];for(var c in a)a.hasOwnProperty(c)&&"$"!==c.charAt(0)&&b.push(c)}return b}var m=a.match(Bg);if(!m)throw Ag("iexp",a,ua(c));var n=m[5]||m[7],q=m[6];a=/ as /.test(m[0])&&m[1];var s=m[9];c=b(m[2]?m[1]:n);var v=a&&b(a)||c,u=s&&b(s),p=s?function(a,b){return u(d,b)}:function(a){return Ca(a)},C=function(a,b){return p(a,z(a,b))},w=b(m[2]||
+ m[1]),y=b(m[3]||""),B=b(m[4]||""),x=b(m[8]),D={},z=q?function(a,b){D[q]=b;D[n]=a;return D}:function(a){D[n]=a;return D};return{trackBy:s,getTrackByValue:C,getWatchables:b(x,function(a){var b=[];a=a||[];for(var c=l(a),e=c.length,f=0;f<e;f++){var g=a===c?f:c[f],k=z(a[g],g),g=p(a[g],k);b.push(g);if(m[2]||m[1])g=w(d,k),b.push(g);m[4]&&(k=B(d,k),b.push(k))}return b}),getOptions:function(){for(var a=[],b={},c=x(d)||[],f=l(c),g=f.length,m=0;m<g;m++){var n=c===f?m:f[m],r=z(c[n],n),q=v(d,r),n=p(q,r),t=w(d,
+ r),u=y(d,r),r=B(d,r),q=new e(n,q,t,u,r);a.push(q);b[n]=q}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[C(a)]},getViewValueFromOption:function(a){return s?fa.copy(a.viewValue):a.viewValue}}}}}var c=X.createElement("option"),e=X.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","?ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=x},post:function(b,g,h,k){function l(a,b){a.element=b;b.disabled=a.disabled;a.label!==b.label&&(b.label=a.label,
+ b.textContent=a.label);a.value!==b.value&&(b.value=a.selectValue)}function m(a,b,c,d){b&&F(b.nodeName)===c?c=b:(c=d.cloneNode(!1),b?a.insertBefore(c,b):a.appendChild(c));return c}function r(a){for(var b;a;)b=a.nextSibling,Xb(a),a=b}function q(a){var b=p&&p[0],c=z&&z[0];if(b||c)for(;a&&(a===b||a===c||8===a.nodeType||""===a.value);)a=a.nextSibling;return a}function s(){var a=D&&u.readValue();D=E.getOptions();var b={},d=g[0].firstChild;x&&g.prepend(p);d=q(d);D.items.forEach(function(a){var f,h;a.group?
+ (f=b[a.group],f||(f=m(g[0],d,"optgroup",e),d=f.nextSibling,f.label=a.group,f=b[a.group]={groupElement:f,currentOptionElement:f.firstChild}),h=m(f.groupElement,f.currentOptionElement,"option",c),l(a,h),f.currentOptionElement=h.nextSibling):(h=m(g[0],d,"option",c),l(a,h),d=h.nextSibling)});Object.keys(b).forEach(function(a){r(b[a].currentOptionElement)});r(d);v.$render();if(!v.$isEmpty(a)){var f=u.readValue();(E.trackBy?ma(a,f):a===f)||(v.$setViewValue(f),v.$render())}}var v=k[1];if(v){var u=k[0];k=
+ h.multiple;for(var p,C=0,w=g.children(),y=w.length;C<y;C++)if(""===w[C].value){p=w.eq(C);break}var x=!!p,z=B(c.cloneNode(!1));z.val("?");var D,E=d(h.ngOptions,g,b);k?(v.$isEmpty=function(a){return!a||0===a.length},u.writeValue=function(a){D.items.forEach(function(a){a.element.selected=!1});a&&a.forEach(function(a){(a=D.getOptionFromViewValue(a))&&!a.disabled&&(a.element.selected=!0)})},u.readValue=function(){var a=g.val()||[],b=[];n(a,function(a){(a=D.selectValueMap[a])&&!a.disabled&&b.push(D.getViewValueFromOption(a))});
+ return b},E.trackBy&&b.$watchCollection(function(){if(I(v.$viewValue))return v.$viewValue.map(function(a){return E.getTrackByValue(a)})},function(){v.$render()})):(u.writeValue=function(a){var b=D.getOptionFromViewValue(a);b&&!b.disabled?g[0].value!==b.selectValue&&(z.remove(),x||p.remove(),g[0].value=b.selectValue,b.element.selected=!0,b.element.setAttribute("selected","selected")):null===a||x?(z.remove(),x||g.prepend(p),g.val(""),p.prop("selected",!0),p.attr("selected",!0)):(x||p.remove(),g.prepend(z),
+ g.val("?"),z.prop("selected",!0),z.attr("selected",!0))},u.readValue=function(){var a=D.selectValueMap[g.val()];return a&&!a.disabled?(x||p.remove(),z.remove(),D.getViewValueFromOption(a)):null},E.trackBy&&b.$watch(function(){return E.getTrackByValue(v.$viewValue)},function(){v.$render()}));x?(p.remove(),a(p)(b),p.removeClass("ng-scope")):p=B(c.cloneNode(!1));s();b.$watchCollection(E.getWatchables,s)}}}}}],Be=["$locale","$interpolate","$log",function(a,b,d){var c=/{}/g,e=/^when(Minus)?(.+)$/;return{link:function(f,
+ g,h){function k(a){g.text(a||"")}var l=h.count,m=h.$attr.when&&g.attr(h.$attr.when),r=h.offset||0,s=f.$eval(m)||{},u={},v=b.startSymbol(),y=b.endSymbol(),p=v+l+"-"+r+y,C=fa.noop,w;n(h,function(a,b){var c=e.exec(b);c&&(c=(c[1]?"-":"")+F(c[2]),s[c]=g.attr(h.$attr[b]))});n(s,function(a,d){u[d]=b(a.replace(c,p))});f.$watch(l,function(b){var c=parseFloat(b),e=isNaN(c);e||c in s||(c=a.pluralCat(c-r));c===w||e&&Q(w)&&isNaN(w)||(C(),e=u[c],q(e)?(null!=b&&d.debug("ngPluralize: no rule defined for '"+c+"' in "+
+ m),C=x,k()):C=f.$watch(e,k),w=c)})}}}],Ce=["$parse","$animate",function(a,b){var d=G("ngRepeat"),c=function(a,b,c,d,k,l,m){a[c]=d;k&&(a[k]=l);a.$index=b;a.$first=0===b;a.$last=b===m-1;a.$middle=!(a.$first||a.$last);a.$odd=!(a.$even=0===(b&1))};return{restrict:"A",multiElement:!0,transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,compile:function(e,f){var g=f.ngRepeat,h=X.createComment(" end ngRepeat: "+g+" "),k=g.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);
+ if(!k)throw d("iexp",g);var l=k[1],m=k[2],r=k[3],q=k[4],k=l.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/);if(!k)throw d("iidexp",l);var s=k[3]||k[1],v=k[2];if(r&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(r)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(r)))throw d("badident",r);var x,p,y,w,z={$id:Ca};q?x=a(q):(y=function(a,b){return Ca(b)},w=function(a){return a});return function(a,e,f,k,l){x&&(p=function(b,c,d){v&&(z[v]=b);z[s]=c;z.$index=
+ d;return x(a,z)});var q=$();a.$watchCollection(m,function(f){var k,m,t=e[0],x,z=$(),D,E,H,F,I,G,J;r&&(a[r]=f);if(za(f))I=f,m=p||y;else for(J in m=p||w,I=[],f)qa.call(f,J)&&"$"!==J.charAt(0)&&I.push(J);D=I.length;J=Array(D);for(k=0;k<D;k++)if(E=f===I?k:I[k],H=f[E],F=m(E,H,k),q[F])G=q[F],delete q[F],z[F]=G,J[k]=G;else{if(z[F])throw n(J,function(a){a&&a.scope&&(q[a.id]=a)}),d("dupes",g,F,H);J[k]={id:F,scope:u,clone:u};z[F]=!0}for(x in q){G=q[x];F=rb(G.clone);b.leave(F);if(F[0].parentNode)for(k=0,m=F.length;k<
+ m;k++)F[k].$$NG_REMOVED=!0;G.scope.$destroy()}for(k=0;k<D;k++)if(E=f===I?k:I[k],H=f[E],G=J[k],G.scope){x=t;do x=x.nextSibling;while(x&&x.$$NG_REMOVED);G.clone[0]!=x&&b.move(rb(G.clone),null,B(t));t=G.clone[G.clone.length-1];c(G.scope,k,s,H,v,E,D)}else l(function(a,d){G.scope=d;var e=h.cloneNode(!1);a[a.length++]=e;b.enter(a,null,B(t));t=e;G.clone=a;z[G.id]=G;c(G.scope,k,s,H,v,E,D)});q=z})}}}}],De=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngShow,function(b){a[b?
+ "removeClass":"addClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],we=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngHide,function(b){a[b?"addClass":"removeClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],Ee=La(function(a,b,d){a.$watch(d.ngStyle,function(a,d){d&&a!==d&&n(d,function(a,c){b.css(c,"")});a&&b.css(a)},!0)}),Fe=["$animate",function(a){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(b,
+ d,c,e){var f=[],g=[],h=[],k=[],l=function(a,b){return function(){a.splice(b,1)}};b.$watch(c.ngSwitch||c.on,function(b){var c,d;c=0;for(d=h.length;c<d;++c)a.cancel(h[c]);c=h.length=0;for(d=k.length;c<d;++c){var q=rb(g[c].clone);k[c].$destroy();(h[c]=a.leave(q)).then(l(h,c))}g.length=0;k.length=0;(f=e.cases["!"+b]||e.cases["?"])&&n(f,function(b){b.transclude(function(c,d){k.push(d);var e=b.element;c[c.length++]=X.createComment(" end ngSwitchWhen: ");g.push({clone:c});a.enter(c,e.parent(),e)})})})}}}],
+ Ge=La({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){c.cases["!"+d.ngSwitchWhen]=c.cases["!"+d.ngSwitchWhen]||[];c.cases["!"+d.ngSwitchWhen].push({transclude:e,element:b})}}),He=La({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){c.cases["?"]=c.cases["?"]||[];c.cases["?"].push({transclude:e,element:b})}}),Je=La({restrict:"EAC",link:function(a,b,d,c,e){if(!e)throw G("ngTransclude")("orphan",ua(b));e(function(a){b.empty();
+ b.append(a)})}}),je=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,d){"text/ng-template"==d.type&&a.put(d.id,b[0].text)}}}],Cg={$setViewValue:x,$render:x},Dg=["$element","$scope","$attrs",function(a,b,d){var c=this,e=new Sa;c.ngModelCtrl=Cg;c.unknownOption=B(X.createElement("option"));c.renderUnknownOption=function(b){b="? "+Ca(b)+" ?";c.unknownOption.val(b);a.prepend(c.unknownOption);a.val(b)};b.$on("$destroy",function(){c.renderUnknownOption=x});c.removeUnknownOption=
+ function(){c.unknownOption.parent()&&c.unknownOption.remove()};c.readValue=function(){c.removeUnknownOption();return a.val()};c.writeValue=function(b){c.hasOption(b)?(c.removeUnknownOption(),a.val(b),""===b&&c.emptyOption.prop("selected",!0)):null==b&&c.emptyOption?(c.removeUnknownOption(),a.val("")):c.renderUnknownOption(b)};c.addOption=function(a,b){Ra(a,'"option value"');""===a&&(c.emptyOption=b);var d=e.get(a)||0;e.put(a,d+1);c.ngModelCtrl.$render();b[0].hasAttribute("selected")&&(b[0].selected=
+ !0)};c.removeOption=function(a){var b=e.get(a);b&&(1===b?(e.remove(a),""===a&&(c.emptyOption=u)):e.put(a,b-1))};c.hasOption=function(a){return!!e.get(a)};c.registerOption=function(a,b,d,e,l){if(e){var m;d.$observe("value",function(a){y(m)&&c.removeOption(m);m=a;c.addOption(a,b)})}else l?a.$watch(l,function(a,e){d.$set("value",a);e!==a&&c.removeOption(e);c.addOption(a,b)}):c.addOption(d.value,b);b.on("$destroy",function(){c.removeOption(d.value);c.ngModelCtrl.$render()})}}],ke=function(){return{restrict:"E",
+ require:["select","?ngModel"],controller:Dg,priority:1,link:{pre:function(a,b,d,c){var e=c[1];if(e){var f=c[0];f.ngModelCtrl=e;e.$render=function(){f.writeValue(e.$viewValue)};b.on("change",function(){a.$apply(function(){e.$setViewValue(f.readValue())})});if(d.multiple){f.readValue=function(){var a=[];n(b.find("option"),function(b){b.selected&&a.push(b.value)});return a};f.writeValue=function(a){var c=new Sa(a);n(b.find("option"),function(a){a.selected=y(c.get(a.value))})};var g,h=NaN;a.$watch(function(){h!==
+ e.$viewValue||ma(g,e.$viewValue)||(g=ia(e.$viewValue),e.$render());h=e.$viewValue});e.$isEmpty=function(a){return!a||0===a.length}}}}}}},me=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,d){if(y(d.value))var c=a(d.value,!0);else{var e=a(b.text(),!0);e||d.$set("value",b.text())}return function(a,b,d){var k=b.parent();(k=k.data("$selectController")||k.parent().data("$selectController"))&&k.registerOption(a,b,d,c,e)}}}}],le=na({restrict:"E",terminal:!1}),Fc=function(){return{restrict:"A",
+ require:"?ngModel",link:function(a,b,d,c){c&&(d.required=!0,c.$validators.required=function(a,b){return!d.required||!c.$isEmpty(b)},d.$observe("required",function(){c.$validate()}))}}},Ec=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e,f=d.ngPattern||d.pattern;d.$observe("pattern",function(a){E(a)&&0<a.length&&(a=new RegExp("^"+a+"$"));if(a&&!a.test)throw G("ngPattern")("noregexp",f,a,ua(b));e=a||u;c.$validate()});c.$validators.pattern=function(a,b){return c.$isEmpty(b)||
+ q(e)||e.test(b)}}}}},Hc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e=-1;d.$observe("maxlength",function(a){a=ea(a);e=isNaN(a)?-1:a;c.$validate()});c.$validators.maxlength=function(a,b){return 0>e||c.$isEmpty(b)||b.length<=e}}}}},Gc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e=0;d.$observe("minlength",function(a){e=ea(a)||0;c.$validate()});c.$validators.minlength=function(a,b){return c.$isEmpty(b)||b.length>=e}}}}};S.angular.bootstrap?
+ console.log("WARNING: Tried to load angular more than once."):(ce(),ee(fa),fa.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),
+ SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-\u00a4",
+ negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",pluralCat:function(a,c){var e=a|0,f=c;u===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),B(X).ready(function(){Zd(X,yc)}))})(window,document);!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>');
+//# sourceMappingURL=angular.min.js.map
diff --git a/common/src/main/webapp/framework/browser/thirdparty/js/bootstrap-table-filter-control.min.js b/common/src/main/webapp/framework/browser/thirdparty/js/bootstrap-table-filter-control.min.js
new file mode 100644
index 0000000..d321a08
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/js/bootstrap-table-filter-control.min.js
@@ -0,0 +1,7 @@
+/*
+ * bootstrap-table - v1.11.0 - 2016-07-02
+ * https://github.com/wenzhixin/bootstrap-table
+ * Copyright (c) 2016 zhixin wen
+ * Licensed MIT License
+ */
+!function(a){"use strict";var b=a.fn.bootstrapTable.utils.sprintf,c=a.fn.bootstrapTable.utils.objectKeys,d=function(b,c,d){c=a.trim(c),b=a(b.get(b.length-1)),f(b,c)||b.append(a("<option></option>").attr("value",c).text(a("<div />").html(d).text()))},e=function(b){var c=b.find("option:gt(0)");c.sort(function(b,c){return b=a(b).text().toLowerCase(),c=a(c).text().toLowerCase(),a.isNumeric(b)&&a.isNumeric(c)&&(b=parseFloat(b),c=parseFloat(c)),b>c?1:c>b?-1:0}),b.find("option:gt(0)").remove(),b.append(c)},f=function(a,b){for(var c=a.get(a.length-1).options,d=0;d<c.length;d++)if(c[d].value===b.toString())return!0;return!1},g=function(a){a.$tableHeader.css("height","77px")},h=function(a){var b=a.$header;return a.options.height&&(b=a.$tableHeader),b},i=function(a){var b="select, input";return a.options.height&&(b="table select, table input"),b},j=function(b){if(a.fn.bootstrapTable.utils.isIEBrowser()){if(a(b).is("input")){var c=0;if("selectionStart"in b)c=b.selectionStart;else if("selection"in document){b.focus();var d=document.selection.createRange(),e=document.selection.createRange().text.length;d.moveStart("character",-b.value.length),c=d.text.length-e}return c}return-1}return-1},k=function(b,c){a.fn.bootstrapTable.utils.isIEBrowser()&&(void 0!==b.setSelectionRange?b.setSelectionRange(c,c):a(b).val(b.value))},l=function(b){var c=h(b),d=i(b);b.options.valuesFilterControl=[],c.find(d).each(function(){b.options.valuesFilterControl.push({field:a(this).closest("[data-field]").data("field"),value:a(this).val(),position:j(a(this).get(0))})})},m=function(b){var c=null,d=[],e=h(b),f=i(b);b.options.valuesFilterControl.length>0&&e.find(f).each(function(){c=a(this).closest("[data-field]").data("field"),d=a.grep(b.options.valuesFilterControl,function(a){return a.field===c}),d.length>0&&(a(this).val(d[0].value),k(a(this).get(0),d[0].position))})},n=function(){var b=[],c=document.cookie.match(/(?:bs.table.)(\w*)/g);return c?(a.each(c,function(c,d){/./.test(d)&&(d=d.split(".").pop()),-1===a.inArray(d,b)&&b.push(d)}),b):void 0},o=function(b){var c=b.options.data,f=(b.pageTo<b.options.data.length?b.options.data.length:b.pageTo,function(a){return a.filterControl&&"select"===a.filterControl.toLowerCase()&&a.searchable}),g=function(a){return void 0===a.filterData||"column"===a.filterData.toLowerCase()},h=function(a){return a&&a.length>0},i=b.options.pagination?"server"===b.options.sidePagination?b.pageTo:b.options.totalRows:b.pageTo;a.each(b.header.fields,function(j,k){var l=b.columns[a.fn.bootstrapTable.utils.getFieldIndex(b.columns,k)],m=a(".bootstrap-table-filter-control-"+p(l.field));if(f(l)&&g(l)&&h(m)){0===m.get(m.length-1).options.length&&d(m,"","");for(var n={},o=0;i>o;o++){var q=c[o][k],r=a.fn.bootstrapTable.utils.calculateObjectValue(b.header,b.header.formatters[j],[q,c[o],o],q);n[r]=q}for(var s in n)d(m,n[s],s);e(m)}})},p=function(a){return String(a).replace(/(:|\.|\[|\]|,)/g,"\\$1")},q=function(b,c){var f,g,h=!1,i=0;a.each(b.columns,function(i,j){if(f="hidden",g=[],j.visible){if(j.filterControl){g.push('<div style="margin: 0 2px 2px 2px;" class="filterControl">');var k=j.filterControl.toLowerCase();j.searchable&&b.options.filterTemplate[k]&&(h=!0,f="visible",g.push(b.options.filterTemplate[k](b,j.field,f)))}else g.push('<div style="height: 34px;"></div>');if(a.each(c.children().children(),function(b,c){return c=a(c),c.data("field")===j.field?(c.find(".fht-cell").append(g.join("")),!1):void 0}),void 0!==j.filterData&&"column"!==j.filterData.toLowerCase()){var l,m,n=t(s,j.filterData.substring(0,j.filterData.indexOf(":")));if(null===n)throw new SyntaxError('Error. You should use any of these allowed filter data methods: var, json, url. Use like this: var: {key: "value"}');l=j.filterData.substring(j.filterData.indexOf(":")+1,j.filterData.length),m=a(".bootstrap-table-filter-control-"+p(j.field)),d(m,"",""),n(l,m);var o,q;switch(n){case"url":a.ajax({url:l,dataType:"json",success:function(a){for(var b in a)d(m,b,a[b]);e(m)}});break;case"var":o=window[l];for(q in o)d(m,q,o[q]);e(m);break;case"jso":o=JSON.parse(l);for(q in o)d(m,q,o[q]);e(m)}}}}),h?(c.off("keyup","input").on("keyup","input",function(a){clearTimeout(i),i=setTimeout(function(){b.onColumnSearch(a)},b.options.searchTimeOut)}),c.off("change","select").on("change","select",function(a){clearTimeout(i),i=setTimeout(function(){b.onColumnSearch(a)},b.options.searchTimeOut)}),c.off("mouseup","input").on("mouseup","input",function(c){var d=a(this),e=d.val();""!==e&&setTimeout(function(){var a=d.val();""===a&&(clearTimeout(i),i=setTimeout(function(){b.onColumnSearch(c)},b.options.searchTimeOut))},1)}),c.find(".date-filter-control").length>0&&a.each(b.columns,function(b,d){void 0!==d.filterControl&&"datepicker"===d.filterControl.toLowerCase()&&c.find(".date-filter-control.bootstrap-table-filter-control-"+d.field).datepicker(d.filterDatepickerOptions).on("changeDate",function(b){a(b.currentTarget).keyup()})})):c.find(".filterControl").hide()},r=function(a){switch(a=void 0===a?"left":a.toLowerCase()){case"left":return"ltr";case"right":return"rtl";case"auto":return"auto";default:return"ltr"}},s={"var":function(a,b){var c=window[a];for(var f in c)d(b,f,c[f]);e(b)},url:function(b,c){a.ajax({url:b,dataType:"json",success:function(a){for(var b in a)d(c,b,a[b]);e(c)}})},json:function(a,b){var c=JSON.parse(a);for(var f in c)d(b,f,c[f]);e(b)}},t=function(a,b){for(var c=Object.keys(a),d=0;d<c.length;d++)if(c[d]===b)return a[b];return null};a.extend(a.fn.bootstrapTable.defaults,{filterControl:!1,onColumnSearch:function(){return!1},filterShowClear:!1,alignmentSelectControlOptions:void 0,filterTemplate:{input:function(a,c,d){return b('<input type="text" class="form-control bootstrap-table-filter-control-%s" style="width: 100%; visibility: %s">',c,d)},select:function(a,c,d){return b('<select class="form-control bootstrap-table-filter-control-%s" style="width: 100%; visibility: %s" dir="%s"></select>',c,d,r(a.options.alignmentSelectControlOptions))},datepicker:function(a,c,d){return b('<input type="text" class="form-control date-filter-control bootstrap-table-filter-control-%s" style="width: 100%; visibility: %s">',c,d)}},valuesFilterControl:[]}),a.extend(a.fn.bootstrapTable.COLUMN_DEFAULTS,{filterControl:void 0,filterData:void 0,filterDatepickerOptions:void 0,filterStrictSearch:!1,filterStartsWithSearch:!1}),a.extend(a.fn.bootstrapTable.Constructor.EVENTS,{"column-search.bs.table":"onColumnSearch"}),a.extend(a.fn.bootstrapTable.defaults.icons,{clear:"glyphicon-trash icon-clear"}),a.extend(a.fn.bootstrapTable.locales,{formatClearFilters:function(){return"Clear Filters"}}),a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales);var u=a.fn.bootstrapTable.Constructor,v=u.prototype.init,w=u.prototype.initToolbar,x=u.prototype.initHeader,y=u.prototype.initBody,z=u.prototype.initSearch;u.prototype.init=function(){if(this.options.filterControl){var a=this;Object.keys||c(),this.options.valuesFilterControl=[],this.$el.on("reset-view.bs.table",function(){a.options.height&&(a.$tableHeader.find("select").length>0||a.$tableHeader.find("input").length>0||q(a,a.$tableHeader))}).on("post-header.bs.table",function(){m(a)}).on("post-body.bs.table",function(){a.options.height&&g(a)}).on("column-switch.bs.table",function(){m(a)})}v.apply(this,Array.prototype.slice.apply(arguments))},u.prototype.initToolbar=function(){if(this.showToolbar=this.options.filterControl&&this.options.filterShowClear,w.apply(this,Array.prototype.slice.apply(arguments)),this.options.filterControl&&this.options.filterShowClear){var c=this.$toolbar.find(">.btn-group"),d=c.find(".filter-show-clear");d.length||(d=a(['<button class="btn btn-default filter-show-clear" ',b('type="button" title="%s">',this.options.formatClearFilters()),b('<i class="%s %s"></i> ',this.options.iconsPrefix,this.options.icons.clear),"</button>"].join("")).appendTo(c),d.off("click").on("click",a.proxy(this.clearFilterControl,this)))}},u.prototype.initHeader=function(){x.apply(this,Array.prototype.slice.apply(arguments)),this.options.filterControl&&q(this,this.$header)},u.prototype.initBody=function(){y.apply(this,Array.prototype.slice.apply(arguments)),o(this)},u.prototype.initSearch=function(){if(z.apply(this,Array.prototype.slice.apply(arguments)),"server"!==this.options.sidePagination){var b=this,c=a.isEmptyObject(this.filterColumnsPartial)?null:this.filterColumnsPartial;this.data=c?a.grep(this.data,function(d,e){for(var f in c){var g=b.columns[a.fn.bootstrapTable.utils.getFieldIndex(b.columns,f)],h=c[f].toLowerCase(),i=d[f];if(g&&g.searchFormatter&&(i=a.fn.bootstrapTable.utils.calculateObjectValue(b.header,b.header.formatters[a.inArray(f,b.header.fields)],[i,d,e],i)),g.filterStrictSearch){if(-1===a.inArray(f,b.header.fields)||"string"!=typeof i&&"number"!=typeof i||i.toString().toLowerCase()!==h.toString().toLowerCase())return!1}else if(g.filterStartsWithSearch){if(-1===a.inArray(f,b.header.fields)||"string"!=typeof i&&"number"!=typeof i||0!==(i+"").toLowerCase().indexOf(h))return!1}else if(-1===a.inArray(f,b.header.fields)||"string"!=typeof i&&"number"!=typeof i||-1===(i+"").toLowerCase().indexOf(h))return!1}return!0}):this.data}},u.prototype.initColumnSearch=function(a){if(l(this),a){this.filterColumnsPartial=a,this.updatePagination();for(var b in a)this.trigger("column-search",b,a[b])}},u.prototype.onColumnSearch=function(b){if(!(a.inArray(b.keyCode,[37,38,39,40])>-1)){l(this);var c=a.trim(a(b.currentTarget).val()),d=a(b.currentTarget).closest("[data-field]").data("field");a.isEmptyObject(this.filterColumnsPartial)&&(this.filterColumnsPartial={}),c?this.filterColumnsPartial[d]=c:delete this.filterColumnsPartial[d],this.searchText+="randomText",this.options.pageNumber=1,this.onSearch(b),this.trigger("column-search",d,c)}},u.prototype.clearFilterControl=function(){if(this.options.filterControl&&this.options.filterShowClear){var c=this,d=n(),e=h(c),f=e.closest("table"),g=e.find(i(c)),j=c.$toolbar.find(".search input"),k=0;if(a.each(c.options.valuesFilterControl,function(a,b){b.value=""}),m(c),!(g.length>0))return;if(this.filterColumnsPartial={},a(g[0]).trigger("INPUT"===g[0].tagName?"keyup":"change"),j.length>0&&c.resetSearch(),c.options.sortName!==f.data("sortName")||c.options.sortOrder!==f.data("sortOrder")){var l=e.find(b('[data-field="%s"]',a(g[0]).closest("table").data("sortName")));l.length>0&&(c.onSort(f.data("sortName"),f.data("sortName")),a(l).find(".sortable").trigger("click"))}clearTimeout(k),k=setTimeout(function(){d&&d.length>0&&a.each(d,function(a,b){void 0!==c.deleteCookie&&c.deleteCookie(b)})},c.options.searchTimeOut)}}}(jQuery); \ No newline at end of file
diff --git a/common/src/main/webapp/framework/browser/thirdparty/js/bootstrap-table.min.js b/common/src/main/webapp/framework/browser/thirdparty/js/bootstrap-table.min.js
new file mode 100644
index 0000000..b6602c3
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/js/bootstrap-table.min.js
@@ -0,0 +1,8 @@
+/*
+* bootstrap-table - v1.11.0 - 2016-07-02
+* https://github.com/wenzhixin/bootstrap-table
+* Copyright 2016 zhixin wen
+* Licensed MIT License
+*/
+!function(a){"use strict";var b=null,c=function(a){var b=arguments,c=!0,d=1;return a=a.replace(/%s/g,function(){var a=b[d++];return"undefined"==typeof a?(c=!1,""):a}),c?a:""},d=function(b,c,d,e){var f="";return a.each(b,function(a,b){return b[c]===e?(f=b[d],!1):!0}),f},e=function(b,c){var d=-1;return a.each(b,function(a,b){return b.field===c?(d=a,!1):!0}),d},f=function(b){var c,d,e,f=0,g=[];for(c=0;c<b[0].length;c++)f+=b[0][c].colspan||1;for(c=0;c<b.length;c++)for(g[c]=[],d=0;f>d;d++)g[c][d]=!1;for(c=0;c<b.length;c++)for(d=0;d<b[c].length;d++){var h=b[c][d],i=h.rowspan||1,j=h.colspan||1,k=a.inArray(!1,g[c]);for(1===j&&(h.fieldIndex=k,"undefined"==typeof h.field&&(h.field=k)),e=0;i>e;e++)g[c+e][k]=!0;for(e=0;j>e;e++)g[c][k+e]=!0}},g=function(){if(null===b){var c,d,e=a("<p/>").addClass("fixed-table-scroll-inner"),f=a("<div/>").addClass("fixed-table-scroll-outer");f.append(e),a("body").append(f),c=e[0].offsetWidth,f.css("overflow","scroll"),d=e[0].offsetWidth,c===d&&(d=f[0].clientWidth),f.remove(),b=c-d}return b},h=function(b,d,e,f){var g=d;if("string"==typeof d){var h=d.split(".");h.length>1?(g=window,a.each(h,function(a,b){g=g[b]})):g=window[d]}return"object"==typeof g?g:"function"==typeof g?g.apply(b,e):!g&&"string"==typeof d&&c.apply(this,[d].concat(e))?c.apply(this,[d].concat(e)):f},i=function(b,c,d){var e=Object.getOwnPropertyNames(b),f=Object.getOwnPropertyNames(c),g="";if(d&&e.length!==f.length)return!1;for(var h=0;h<e.length;h++)if(g=e[h],a.inArray(g,f)>-1&&b[g]!==c[g])return!1;return!0},j=function(a){return"string"==typeof a?a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/`/g,"&#x60;"):a},k=function(b){var c=0;return b.children().each(function(){c<a(this).outerHeight(!0)&&(c=a(this).outerHeight(!0))}),c},l=function(a){for(var b in a){var c=b.split(/(?=[A-Z])/).join("-").toLowerCase();c!==b&&(a[c]=a[b],delete a[b])}return a},m=function(a,b,c){var d=a;if("string"!=typeof b||a.hasOwnProperty(b))return c?j(a[b]):a[b];var e=b.split(".");for(var f in e)d=d&&d[e[f]];return c?j(d):d},n=function(){return!!(navigator.userAgent.indexOf("MSIE ")>0||navigator.userAgent.match(/Trident.*rv\:11\./))},o=function(){Object.keys||(Object.keys=function(){var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=c.length;return function(e){if("object"!=typeof e&&("function"!=typeof e||null===e))throw new TypeError("Object.keys called on non-object");var f,g,h=[];for(f in e)a.call(e,f)&&h.push(f);if(b)for(g=0;d>g;g++)a.call(e,c[g])&&h.push(c[g]);return h}}())},p=function(b,c){this.options=c,this.$el=a(b),this.$el_=this.$el.clone(),this.timeoutId_=0,this.timeoutFooter_=0,this.init()};p.DEFAULTS={classes:"table table-hover",locale:void 0,height:void 0,undefinedText:"-",sortName:void 0,sortOrder:"asc",sortStable:!1,striped:!1,columns:[[]],data:[],dataField:"rows",method:"get",url:void 0,ajax:void 0,cache:!0,contentType:"application/json",dataType:"json",ajaxOptions:{},queryParams:function(a){return a},queryParamsType:"limit",responseHandler:function(a){return a},pagination:!1,onlyInfoPagination:!1,sidePagination:"client",totalRows:0,pageNumber:1,pageSize:10,pageList:[10,25,50,100],paginationHAlign:"right",paginationVAlign:"bottom",paginationDetailHAlign:"left",paginationPreText:"&lsaquo;",paginationNextText:"&rsaquo;",search:!1,searchOnEnterKey:!1,strictSearch:!1,searchAlign:"right",selectItemName:"btSelectItem",showHeader:!0,showFooter:!1,showColumns:!1,showPaginationSwitch:!1,showRefresh:!1,showToggle:!1,buttonsAlign:"right",smartDisplay:!0,escape:!1,minimumCountColumns:1,idField:void 0,uniqueId:void 0,cardView:!1,detailView:!1,detailFormatter:function(){return""},trimOnSearch:!0,clickToSelect:!1,singleSelect:!1,toolbar:void 0,toolbarAlign:"left",checkboxHeader:!0,sortable:!0,silentSort:!0,maintainSelected:!1,searchTimeOut:500,searchText:"",iconSize:void 0,buttonsClass:"default",iconsPrefix:"glyphicon",icons:{paginationSwitchDown:"glyphicon-collapse-down icon-chevron-down",paginationSwitchUp:"glyphicon-collapse-up icon-chevron-up",refresh:"glyphicon-refresh icon-refresh",toggle:"glyphicon-list-alt icon-list-alt",columns:"glyphicon-th icon-th",detailOpen:"glyphicon-plus icon-plus",detailClose:"glyphicon-minus icon-minus"},customSearch:a.noop,customSort:a.noop,rowStyle:function(){return{}},rowAttributes:function(){return{}},footerStyle:function(){return{}},onAll:function(){return!1},onClickCell:function(){return!1},onDblClickCell:function(){return!1},onClickRow:function(){return!1},onDblClickRow:function(){return!1},onSort:function(){return!1},onCheck:function(){return!1},onUncheck:function(){return!1},onCheckAll:function(){return!1},onUncheckAll:function(){return!1},onCheckSome:function(){return!1},onUncheckSome:function(){return!1},onLoadSuccess:function(){return!1},onLoadError:function(){return!1},onColumnSwitch:function(){return!1},onPageChange:function(){return!1},onSearch:function(){return!1},onToggle:function(){return!1},onPreBody:function(){return!1},onPostBody:function(){return!1},onPostHeader:function(){return!1},onExpandRow:function(){return!1},onCollapseRow:function(){return!1},onRefreshOptions:function(){return!1},onRefresh:function(){return!1},onResetView:function(){return!1}},p.LOCALES={},p.LOCALES["en-US"]=p.LOCALES.en={formatLoadingMessage:function(){return"Loading, please wait..."},formatRecordsPerPage:function(a){return c("%s rows per page",a)},formatShowingRows:function(a,b,d){return c("Showing %s to %s of %s rows",a,b,d)},formatDetailPagination:function(a){return c("Showing %s rows",a)},formatSearch:function(){return"Search"},formatNoMatches:function(){return"No matching records found"},formatPaginationSwitch:function(){return"Hide/Show pagination"},formatRefresh:function(){return"Refresh"},formatToggle:function(){return"Toggle"},formatColumns:function(){return"Columns"},formatAllRows:function(){return"All"}},a.extend(p.DEFAULTS,p.LOCALES["en-US"]),p.COLUMN_DEFAULTS={radio:!1,checkbox:!1,checkboxEnabled:!0,field:void 0,title:void 0,titleTooltip:void 0,"class":void 0,align:void 0,halign:void 0,falign:void 0,valign:void 0,width:void 0,sortable:!1,order:"asc",visible:!0,switchable:!0,clickToSelect:!0,formatter:void 0,footerFormatter:void 0,events:void 0,sorter:void 0,sortName:void 0,cellStyle:void 0,searchable:!0,searchFormatter:!0,cardVisible:!0},p.EVENTS={"all.bs.table":"onAll","click-cell.bs.table":"onClickCell","dbl-click-cell.bs.table":"onDblClickCell","click-row.bs.table":"onClickRow","dbl-click-row.bs.table":"onDblClickRow","sort.bs.table":"onSort","check.bs.table":"onCheck","uncheck.bs.table":"onUncheck","check-all.bs.table":"onCheckAll","uncheck-all.bs.table":"onUncheckAll","check-some.bs.table":"onCheckSome","uncheck-some.bs.table":"onUncheckSome","load-success.bs.table":"onLoadSuccess","load-error.bs.table":"onLoadError","column-switch.bs.table":"onColumnSwitch","page-change.bs.table":"onPageChange","search.bs.table":"onSearch","toggle.bs.table":"onToggle","pre-body.bs.table":"onPreBody","post-body.bs.table":"onPostBody","post-header.bs.table":"onPostHeader","expand-row.bs.table":"onExpandRow","collapse-row.bs.table":"onCollapseRow","refresh-options.bs.table":"onRefreshOptions","reset-view.bs.table":"onResetView","refresh.bs.table":"onRefresh"},p.prototype.init=function(){this.initLocale(),this.initContainer(),this.initTable(),this.initHeader(),this.initData(),this.initFooter(),this.initToolbar(),this.initPagination(),this.initBody(),this.initSearchText(),this.initServer()},p.prototype.initLocale=function(){if(this.options.locale){var b=this.options.locale.split(/-|_/);b[0].toLowerCase(),b[1]&&b[1].toUpperCase(),a.fn.bootstrapTable.locales[this.options.locale]?a.extend(this.options,a.fn.bootstrapTable.locales[this.options.locale]):a.fn.bootstrapTable.locales[b.join("-")]?a.extend(this.options,a.fn.bootstrapTable.locales[b.join("-")]):a.fn.bootstrapTable.locales[b[0]]&&a.extend(this.options,a.fn.bootstrapTable.locales[b[0]])}},p.prototype.initContainer=function(){this.$container=a(['<div class="bootstrap-table">','<div class="fixed-table-toolbar"></div>',"top"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'<div class="fixed-table-pagination" style="clear: both;"></div>':"",'<div class="fixed-table-container">','<div class="fixed-table-header"><table></table></div>','<div class="fixed-table-body">','<div class="fixed-table-loading">',this.options.formatLoadingMessage(),"</div>","</div>",'<div class="fixed-table-footer"><table><tr></tr></table></div>',"bottom"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'<div class="fixed-table-pagination"></div>':"","</div>","</div>"].join("")),this.$container.insertAfter(this.$el),this.$tableContainer=this.$container.find(".fixed-table-container"),this.$tableHeader=this.$container.find(".fixed-table-header"),this.$tableBody=this.$container.find(".fixed-table-body"),this.$tableLoading=this.$container.find(".fixed-table-loading"),this.$tableFooter=this.$container.find(".fixed-table-footer"),this.$toolbar=this.$container.find(".fixed-table-toolbar"),this.$pagination=this.$container.find(".fixed-table-pagination"),this.$tableBody.append(this.$el),this.$container.after('<div class="clearfix"></div>'),this.$el.addClass(this.options.classes),this.options.striped&&this.$el.addClass("table-striped"),-1!==a.inArray("table-no-bordered",this.options.classes.split(" "))&&this.$tableContainer.addClass("table-no-bordered")},p.prototype.initTable=function(){var b=this,c=[],d=[];if(this.$header=this.$el.find(">thead"),this.$header.length||(this.$header=a("<thead></thead>").appendTo(this.$el)),this.$header.find("tr").each(function(){var b=[];a(this).find("th").each(function(){"undefined"!=typeof a(this).data("field")&&a(this).data("field",a(this).data("field")+""),b.push(a.extend({},{title:a(this).html(),"class":a(this).attr("class"),titleTooltip:a(this).attr("title"),rowspan:a(this).attr("rowspan")?+a(this).attr("rowspan"):void 0,colspan:a(this).attr("colspan")?+a(this).attr("colspan"):void 0},a(this).data()))}),c.push(b)}),a.isArray(this.options.columns[0])||(this.options.columns=[this.options.columns]),this.options.columns=a.extend(!0,[],c,this.options.columns),this.columns=[],f(this.options.columns),a.each(this.options.columns,function(c,d){a.each(d,function(d,e){e=a.extend({},p.COLUMN_DEFAULTS,e),"undefined"!=typeof e.fieldIndex&&(b.columns[e.fieldIndex]=e),b.options.columns[c][d]=e})}),!this.options.data.length){var e=[];this.$el.find(">tbody>tr").each(function(c){var f={};f._id=a(this).attr("id"),f._class=a(this).attr("class"),f._data=l(a(this).data()),a(this).find(">td").each(function(d){for(var g,h,i=a(this),j=+i.attr("colspan")||1,k=+i.attr("rowspan")||1;e[c]&&e[c][d];d++);for(g=d;d+j>g;g++)for(h=c;c+k>h;h++)e[h]||(e[h]=[]),e[h][g]=!0;var m=b.columns[d].field;f[m]=a(this).html(),f["_"+m+"_id"]=a(this).attr("id"),f["_"+m+"_class"]=a(this).attr("class"),f["_"+m+"_rowspan"]=a(this).attr("rowspan"),f["_"+m+"_colspan"]=a(this).attr("colspan"),f["_"+m+"_title"]=a(this).attr("title"),f["_"+m+"_data"]=l(a(this).data())}),d.push(f)}),this.options.data=d,d.length&&(this.fromHtml=!0)}},p.prototype.initHeader=function(){var b=this,d={},e=[];this.header={fields:[],styles:[],classes:[],formatters:[],events:[],sorters:[],sortNames:[],cellStyles:[],searchables:[]},a.each(this.options.columns,function(f,g){e.push("<tr>"),0===f&&!b.options.cardView&&b.options.detailView&&e.push(c('<th class="detail" rowspan="%s"><div class="fht-cell"></div></th>',b.options.columns.length)),a.each(g,function(a,f){var g="",h="",i="",j="",k=c(' class="%s"',f["class"]),l=(b.options.sortOrder||f.order,"px"),m=f.width;if(void 0===f.width||b.options.cardView||"string"==typeof f.width&&-1!==f.width.indexOf("%")&&(l="%"),f.width&&"string"==typeof f.width&&(m=f.width.replace("%","").replace("px","")),h=c("text-align: %s; ",f.halign?f.halign:f.align),i=c("text-align: %s; ",f.align),j=c("vertical-align: %s; ",f.valign),j+=c("width: %s; ",!f.checkbox&&!f.radio||m?m?m+l:void 0:"36px"),"undefined"!=typeof f.fieldIndex){if(b.header.fields[f.fieldIndex]=f.field,b.header.styles[f.fieldIndex]=i+j,b.header.classes[f.fieldIndex]=k,b.header.formatters[f.fieldIndex]=f.formatter,b.header.events[f.fieldIndex]=f.events,b.header.sorters[f.fieldIndex]=f.sorter,b.header.sortNames[f.fieldIndex]=f.sortName,b.header.cellStyles[f.fieldIndex]=f.cellStyle,b.header.searchables[f.fieldIndex]=f.searchable,!f.visible)return;if(b.options.cardView&&!f.cardVisible)return;d[f.field]=f}e.push("<th"+c(' title="%s"',f.titleTooltip),f.checkbox||f.radio?c(' class="bs-checkbox %s"',f["class"]||""):k,c(' style="%s"',h+j),c(' rowspan="%s"',f.rowspan),c(' colspan="%s"',f.colspan),c(' data-field="%s"',f.field),"tabindex='0'",">"),e.push(c('<div class="th-inner %s">',b.options.sortable&&f.sortable?"sortable both":"")),g=f.title,f.checkbox&&(!b.options.singleSelect&&b.options.checkboxHeader&&(g='<input name="btSelectAll" type="checkbox" />'),b.header.stateField=f.field),f.radio&&(g="",b.header.stateField=f.field,b.options.singleSelect=!0),e.push(g),e.push("</div>"),e.push('<div class="fht-cell"></div>'),e.push("</div>"),e.push("</th>")}),e.push("</tr>")}),this.$header.html(e.join("")),this.$header.find("th[data-field]").each(function(){a(this).data(d[a(this).data("field")])}),this.$container.off("click",".th-inner").on("click",".th-inner",function(c){var d=a(this);return b.options.detailView&&d.closest(".bootstrap-table")[0]!==b.$container[0]?!1:void(b.options.sortable&&d.parent().data().sortable&&b.onSort(c))}),this.$header.children().children().off("keypress").on("keypress",function(c){if(b.options.sortable&&a(this).data().sortable){var d=c.keyCode||c.which;13==d&&b.onSort(c)}}),a(window).off("resize.bootstrap-table"),!this.options.showHeader||this.options.cardView?(this.$header.hide(),this.$tableHeader.hide(),this.$tableLoading.css("top",0)):(this.$header.show(),this.$tableHeader.show(),this.$tableLoading.css("top",this.$header.outerHeight()+1),this.getCaret(),a(window).on("resize.bootstrap-table",a.proxy(this.resetWidth,this))),this.$selectAll=this.$header.find('[name="btSelectAll"]'),this.$selectAll.off("click").on("click",function(){var c=a(this).prop("checked");b[c?"checkAll":"uncheckAll"](),b.updateSelected()})},p.prototype.initFooter=function(){!this.options.showFooter||this.options.cardView?this.$tableFooter.hide():this.$tableFooter.show()},p.prototype.initData=function(a,b){this.data="append"===b?this.data.concat(a):"prepend"===b?[].concat(a).concat(this.data):a||this.options.data,this.options.data="append"===b?this.options.data.concat(a):"prepend"===b?[].concat(a).concat(this.options.data):this.data,"server"!==this.options.sidePagination&&this.initSort()},p.prototype.initSort=function(){var b=this,c=this.options.sortName,d="desc"===this.options.sortOrder?-1:1,e=a.inArray(this.options.sortName,this.header.fields);return this.options.customSort!==a.noop?void this.options.customSort.apply(this,[this.options.sortName,this.options.sortOrder]):void(-1!==e&&(this.options.sortStable&&a.each(this.data,function(a,b){b.hasOwnProperty("_position")||(b._position=a)}),this.data.sort(function(f,g){b.header.sortNames[e]&&(c=b.header.sortNames[e]);var i=m(f,c,b.options.escape),j=m(g,c,b.options.escape),k=h(b.header,b.header.sorters[e],[i,j]);return void 0!==k?d*k:((void 0===i||null===i)&&(i=""),(void 0===j||null===j)&&(j=""),b.options.sortStable&&i===j&&(i=f._position,j=g._position),a.isNumeric(i)&&a.isNumeric(j)?(i=parseFloat(i),j=parseFloat(j),j>i?-1*d:d):i===j?0:("string"!=typeof i&&(i=i.toString()),-1===i.localeCompare(j)?-1*d:d))})))},p.prototype.onSort=function(b){var c="keypress"===b.type?a(b.currentTarget):a(b.currentTarget).parent(),d=this.$header.find("th").eq(c.index());return this.$header.add(this.$header_).find("span.order").remove(),this.options.sortName===c.data("field")?this.options.sortOrder="asc"===this.options.sortOrder?"desc":"asc":(this.options.sortName=c.data("field"),this.options.sortOrder="asc"===c.data("order")?"desc":"asc"),this.trigger("sort",this.options.sortName,this.options.sortOrder),c.add(d).data("order",this.options.sortOrder),this.getCaret(),"server"===this.options.sidePagination?void this.initServer(this.options.silentSort):(this.initSort(),void this.initBody())},p.prototype.initToolbar=function(){var b,d,e=this,f=[],g=0,i=0;this.$toolbar.find(".bs-bars").children().length&&a("body").append(a(this.options.toolbar)),this.$toolbar.html(""),("string"==typeof this.options.toolbar||"object"==typeof this.options.toolbar)&&a(c('<div class="bs-bars pull-%s"></div>',this.options.toolbarAlign)).appendTo(this.$toolbar).append(a(this.options.toolbar)),f=[c('<div class="columns columns-%s btn-group pull-%s">',this.options.buttonsAlign,this.options.buttonsAlign)],"string"==typeof this.options.icons&&(this.options.icons=h(null,this.options.icons)),this.options.showPaginationSwitch&&f.push(c('<button class="btn'+c(" btn-%s",this.options.buttonsClass)+c(" btn-%s",this.options.iconSize)+'" type="button" name="paginationSwitch" title="%s">',this.options.formatPaginationSwitch()),c('<i class="%s %s"></i>',this.options.iconsPrefix,this.options.icons.paginationSwitchDown),"</button>"),this.options.showRefresh&&f.push(c('<button class="btn'+c(" btn-%s",this.options.buttonsClass)+c(" btn-%s",this.options.iconSize)+'" type="button" name="refresh" title="%s">',this.options.formatRefresh()),c('<i class="%s %s"></i>',this.options.iconsPrefix,this.options.icons.refresh),"</button>"),this.options.showToggle&&f.push(c('<button class="btn'+c(" btn-%s",this.options.buttonsClass)+c(" btn-%s",this.options.iconSize)+'" type="button" name="toggle" title="%s">',this.options.formatToggle()),c('<i class="%s %s"></i>',this.options.iconsPrefix,this.options.icons.toggle),"</button>"),this.options.showColumns&&(f.push(c('<div class="keep-open btn-group" title="%s">',this.options.formatColumns()),'<button type="button" class="btn'+c(" btn-%s",this.options.buttonsClass)+c(" btn-%s",this.options.iconSize)+' dropdown-toggle" data-toggle="dropdown">',c('<i class="%s %s"></i>',this.options.iconsPrefix,this.options.icons.columns),' <span class="caret"></span>',"</button>",'<ul class="dropdown-menu" role="menu">'),a.each(this.columns,function(a,b){if(!(b.radio||b.checkbox||e.options.cardView&&!b.cardVisible)){var d=b.visible?' checked="checked"':"";b.switchable&&(f.push(c('<li><label><input type="checkbox" data-field="%s" value="%s"%s> %s</label></li>',b.field,a,d,b.title)),i++)}}),f.push("</ul>","</div>")),f.push("</div>"),(this.showToolbar||f.length>2)&&this.$toolbar.append(f.join("")),this.options.showPaginationSwitch&&this.$toolbar.find('button[name="paginationSwitch"]').off("click").on("click",a.proxy(this.togglePagination,this)),this.options.showRefresh&&this.$toolbar.find('button[name="refresh"]').off("click").on("click",a.proxy(this.refresh,this)),this.options.showToggle&&this.$toolbar.find('button[name="toggle"]').off("click").on("click",function(){e.toggleView()}),this.options.showColumns&&(b=this.$toolbar.find(".keep-open"),i<=this.options.minimumCountColumns&&b.find("input").prop("disabled",!0),b.find("li").off("click").on("click",function(a){a.stopImmediatePropagation()}),b.find("input").off("click").on("click",function(){var b=a(this);e.toggleColumn(a(this).val(),b.prop("checked"),!1),e.trigger("column-switch",a(this).data("field"),b.prop("checked"))})),this.options.search&&(f=[],f.push('<div class="pull-'+this.options.searchAlign+' search">',c('<input class="form-control'+c(" input-%s",this.options.iconSize)+'" type="text" placeholder="%s">',this.options.formatSearch()),"</div>"),this.$toolbar.append(f.join("")),d=this.$toolbar.find(".search input"),d.off("keyup drop").on("keyup drop",function(b){e.options.searchOnEnterKey&&13!==b.keyCode||a.inArray(b.keyCode,[37,38,39,40])>-1||(clearTimeout(g),g=setTimeout(function(){e.onSearch(b)},e.options.searchTimeOut))}),n()&&d.off("mouseup").on("mouseup",function(a){clearTimeout(g),g=setTimeout(function(){e.onSearch(a)},e.options.searchTimeOut)}))},p.prototype.onSearch=function(b){var c=a.trim(a(b.currentTarget).val());this.options.trimOnSearch&&a(b.currentTarget).val()!==c&&a(b.currentTarget).val(c),c!==this.searchText&&(this.searchText=c,this.options.searchText=c,this.options.pageNumber=1,this.initSearch(),this.updatePagination(),this.trigger("search",c))},p.prototype.initSearch=function(){var b=this;if("server"!==this.options.sidePagination){if(this.options.customSearch!==a.noop)return void this.options.customSearch.apply(this,[this.searchText]);var c=this.searchText&&(this.options.escape?j(this.searchText):this.searchText).toLowerCase(),d=a.isEmptyObject(this.filterColumns)?null:this.filterColumns;this.data=d?a.grep(this.options.data,function(b){for(var c in d)if(a.isArray(d[c])&&-1===a.inArray(b[c],d[c])||b[c]!==d[c])return!1;return!0}):this.options.data,this.data=c?a.grep(this.data,function(d,f){for(var g=0;g<b.header.fields.length;g++)if(b.header.searchables[g]){var i,j=a.isNumeric(b.header.fields[g])?parseInt(b.header.fields[g],10):b.header.fields[g],k=b.columns[e(b.columns,j)];if("string"==typeof j){i=d;for(var l=j.split("."),m=0;m<l.length;m++)i=i[l[m]];k&&k.searchFormatter&&(i=h(k,b.header.formatters[g],[i,d,f],i))}else i=d[j];if("string"==typeof i||"number"==typeof i)if(b.options.strictSearch){if((i+"").toLowerCase()===c)return!0}else if(-1!==(i+"").toLowerCase().indexOf(c))return!0}return!1}):this.data}},p.prototype.initPagination=function(){if(!this.options.pagination)return void this.$pagination.hide();this.$pagination.show();var b,d,e,f,g,h,i,j,k,l=this,m=[],n=!1,o=this.getData(),p=this.options.pageList;if("server"!==this.options.sidePagination&&(this.options.totalRows=o.length),this.totalPages=0,this.options.totalRows){if(this.options.pageSize===this.options.formatAllRows())this.options.pageSize=this.options.totalRows,n=!0;else if(this.options.pageSize===this.options.totalRows){var q="string"==typeof this.options.pageList?this.options.pageList.replace("[","").replace("]","").replace(/ /g,"").toLowerCase().split(","):this.options.pageList;a.inArray(this.options.formatAllRows().toLowerCase(),q)>-1&&(n=!0)}this.totalPages=~~((this.options.totalRows-1)/this.options.pageSize)+1,this.options.totalPages=this.totalPages}if(this.totalPages>0&&this.options.pageNumber>this.totalPages&&(this.options.pageNumber=this.totalPages),this.pageFrom=(this.options.pageNumber-1)*this.options.pageSize+1,this.pageTo=this.options.pageNumber*this.options.pageSize,this.pageTo>this.options.totalRows&&(this.pageTo=this.options.totalRows),m.push('<div class="pull-'+this.options.paginationDetailHAlign+' pagination-detail">','<span class="pagination-info">',this.options.onlyInfoPagination?this.options.formatDetailPagination(this.options.totalRows):this.options.formatShowingRows(this.pageFrom,this.pageTo,this.options.totalRows),"</span>"),!this.options.onlyInfoPagination){m.push('<span class="page-list">');var r=[c('<span class="btn-group %s">',"top"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?"dropdown":"dropup"),'<button type="button" class="btn'+c(" btn-%s",this.options.buttonsClass)+c(" btn-%s",this.options.iconSize)+' dropdown-toggle" data-toggle="dropdown">','<span class="page-size">',n?this.options.formatAllRows():this.options.pageSize,"</span>",' <span class="caret"></span>',"</button>",'<ul class="dropdown-menu" role="menu">'];if("string"==typeof this.options.pageList){var s=this.options.pageList.replace("[","").replace("]","").replace(/ /g,"").split(",");p=[],a.each(s,function(a,b){p.push(b.toUpperCase()===l.options.formatAllRows().toUpperCase()?l.options.formatAllRows():+b)})}for(a.each(p,function(a,b){if(!l.options.smartDisplay||0===a||p[a-1]<=l.options.totalRows){var d;d=n?b===l.options.formatAllRows()?' class="active"':"":b===l.options.pageSize?' class="active"':"",r.push(c('<li%s><a href="javascript:void(0)">%s</a></li>',d,b))}}),r.push("</ul></span>"),m.push(this.options.formatRecordsPerPage(r.join(""))),m.push("</span>"),m.push("</div>",'<div class="pull-'+this.options.paginationHAlign+' pagination">','<ul class="pagination'+c(" pagination-%s",this.options.iconSize)+'">','<li class="page-pre"><a href="javascript:void(0)">'+this.options.paginationPreText+"</a></li>"),this.totalPages<5?(d=1,e=this.totalPages):(d=this.options.pageNumber-2,e=d+4,1>d&&(d=1,e=5),e>this.totalPages&&(e=this.totalPages,d=e-4)),this.totalPages>=6&&(this.options.pageNumber>=3&&(m.push('<li class="page-first'+(1===this.options.pageNumber?" active":"")+'">','<a href="javascript:void(0)">',1,"</a>","</li>"),d++),this.options.pageNumber>=4&&(4==this.options.pageNumber||6==this.totalPages||7==this.totalPages?d--:m.push('<li class="page-first-separator disabled">','<a href="javascript:void(0)">...</a>',"</li>"),e--)),this.totalPages>=7&&this.options.pageNumber>=this.totalPages-2&&d--,6==this.totalPages?this.options.pageNumber>=this.totalPages-2&&e++:this.totalPages>=7&&(7==this.totalPages||this.options.pageNumber>=this.totalPages-3)&&e++,b=d;e>=b;b++)m.push('<li class="page-number'+(b===this.options.pageNumber?" active":"")+'">','<a href="javascript:void(0)">',b,"</a>","</li>");this.totalPages>=8&&this.options.pageNumber<=this.totalPages-4&&m.push('<li class="page-last-separator disabled">','<a href="javascript:void(0)">...</a>',"</li>"),this.totalPages>=6&&this.options.pageNumber<=this.totalPages-3&&m.push('<li class="page-last'+(this.totalPages===this.options.pageNumber?" active":"")+'">','<a href="javascript:void(0)">',this.totalPages,"</a>","</li>"),m.push('<li class="page-next"><a href="javascript:void(0)">'+this.options.paginationNextText+"</a></li>","</ul>","</div>")}this.$pagination.html(m.join("")),this.options.onlyInfoPagination||(f=this.$pagination.find(".page-list a"),g=this.$pagination.find(".page-first"),h=this.$pagination.find(".page-pre"),i=this.$pagination.find(".page-next"),j=this.$pagination.find(".page-last"),k=this.$pagination.find(".page-number"),this.options.smartDisplay&&(this.totalPages<=1&&this.$pagination.find("div.pagination").hide(),(p.length<2||this.options.totalRows<=p[0])&&this.$pagination.find("span.page-list").hide(),this.$pagination[this.getData().length?"show":"hide"]()),n&&(this.options.pageSize=this.options.formatAllRows()),f.off("click").on("click",a.proxy(this.onPageListChange,this)),g.off("click").on("click",a.proxy(this.onPageFirst,this)),h.off("click").on("click",a.proxy(this.onPagePre,this)),i.off("click").on("click",a.proxy(this.onPageNext,this)),j.off("click").on("click",a.proxy(this.onPageLast,this)),k.off("click").on("click",a.proxy(this.onPageNumber,this)))},p.prototype.updatePagination=function(b){b&&a(b.currentTarget).hasClass("disabled")||(this.options.maintainSelected||this.resetRows(),this.initPagination(),"server"===this.options.sidePagination?this.initServer():this.initBody(),this.trigger("page-change",this.options.pageNumber,this.options.pageSize))},p.prototype.onPageListChange=function(b){var c=a(b.currentTarget);c.parent().addClass("active").siblings().removeClass("active"),this.options.pageSize=c.text().toUpperCase()===this.options.formatAllRows().toUpperCase()?this.options.formatAllRows():+c.text(),this.$toolbar.find(".page-size").text(this.options.pageSize),this.updatePagination(b)},p.prototype.onPageFirst=function(a){this.options.pageNumber=1,this.updatePagination(a)},p.prototype.onPagePre=function(a){this.options.pageNumber-1===0?this.options.pageNumber=this.options.totalPages:this.options.pageNumber--,this.updatePagination(a)},p.prototype.onPageNext=function(a){this.options.pageNumber+1>this.options.totalPages?this.options.pageNumber=1:this.options.pageNumber++,this.updatePagination(a)},p.prototype.onPageLast=function(a){this.options.pageNumber=this.totalPages,this.updatePagination(a)},p.prototype.onPageNumber=function(b){this.options.pageNumber!==+a(b.currentTarget).text()&&(this.options.pageNumber=+a(b.currentTarget).text(),this.updatePagination(b))},p.prototype.initBody=function(b){var f=this,g=[],i=this.getData();this.trigger("pre-body",i),this.$body=this.$el.find(">tbody"),this.$body.length||(this.$body=a("<tbody></tbody>").appendTo(this.$el)),this.options.pagination&&"server"!==this.options.sidePagination||(this.pageFrom=1,this.pageTo=i.length);for(var k=this.pageFrom-1;k<this.pageTo;k++){var l,n=i[k],o={},p=[],q="",r={},s=[];if(o=h(this.options,this.options.rowStyle,[n,k],o),o&&o.css)for(l in o.css)p.push(l+": "+o.css[l]);if(r=h(this.options,this.options.rowAttributes,[n,k],r))for(l in r)s.push(c('%s="%s"',l,j(r[l])));n._data&&!a.isEmptyObject(n._data)&&a.each(n._data,function(a,b){"index"!==a&&(q+=c(' data-%s="%s"',a,b))}),g.push("<tr",c(" %s",s.join(" ")),c(' id="%s"',a.isArray(n)?void 0:n._id),c(' class="%s"',o.classes||(a.isArray(n)?void 0:n._class)),c(' data-index="%s"',k),c(' data-uniqueid="%s"',n[this.options.uniqueId]),c("%s",q),">"),this.options.cardView&&g.push(c('<td colspan="%s"><div class="card-views">',this.header.fields.length)),!this.options.cardView&&this.options.detailView&&g.push("<td>",'<a class="detail-icon" href="javascript:">',c('<i class="%s %s"></i>',this.options.iconsPrefix,this.options.icons.detailOpen),"</a>","</td>"),a.each(this.header.fields,function(b,e){var i="",j=m(n,e,f.options.escape),l="",q={},r="",s=f.header.classes[b],t="",u="",v="",w="",x=f.columns[b];if(!(f.fromHtml&&"undefined"==typeof j||!x.visible||f.options.cardView&&!x.cardVisible)){if(o=c('style="%s"',p.concat(f.header.styles[b]).join("; ")),n["_"+e+"_id"]&&(r=c(' id="%s"',n["_"+e+"_id"])),n["_"+e+"_class"]&&(s=c(' class="%s"',n["_"+e+"_class"])),n["_"+e+"_rowspan"]&&(u=c(' rowspan="%s"',n["_"+e+"_rowspan"])),n["_"+e+"_colspan"]&&(v=c(' colspan="%s"',n["_"+e+"_colspan"])),n["_"+e+"_title"]&&(w=c(' title="%s"',n["_"+e+"_title"])),q=h(f.header,f.header.cellStyles[b],[j,n,k,e],q),q.classes&&(s=c(' class="%s"',q.classes)),q.css){var y=[];for(var z in q.css)y.push(z+": "+q.css[z]);o=c('style="%s"',y.concat(f.header.styles[b]).join("; "))}j=h(x,f.header.formatters[b],[j,n,k],j),n["_"+e+"_data"]&&!a.isEmptyObject(n["_"+e+"_data"])&&a.each(n["_"+e+"_data"],function(a,b){"index"!==a&&(t+=c(' data-%s="%s"',a,b))}),x.checkbox||x.radio?(l=x.checkbox?"checkbox":l,l=x.radio?"radio":l,i=[c(f.options.cardView?'<div class="card-view %s">':'<td class="bs-checkbox %s">',x["class"]||""),"<input"+c(' data-index="%s"',k)+c(' name="%s"',f.options.selectItemName)+c(' type="%s"',l)+c(' value="%s"',n[f.options.idField])+c(' checked="%s"',j===!0||j&&j.checked?"checked":void 0)+c(' disabled="%s"',!x.checkboxEnabled||j&&j.disabled?"disabled":void 0)+" />",f.header.formatters[b]&&"string"==typeof j?j:"",f.options.cardView?"</div>":"</td>"].join(""),n[f.header.stateField]=j===!0||j&&j.checked):(j="undefined"==typeof j||null===j?f.options.undefinedText:j,i=f.options.cardView?['<div class="card-view">',f.options.showHeader?c('<span class="title" %s>%s</span>',o,d(f.columns,"field","title",e)):"",c('<span class="value">%s</span>',j),"</div>"].join(""):[c("<td%s %s %s %s %s %s %s>",r,s,o,t,u,v,w),j,"</td>"].join(""),f.options.cardView&&f.options.smartDisplay&&""===j&&(i='<div class="card-view"></div>')),g.push(i)}}),this.options.cardView&&g.push("</div></td>"),g.push("</tr>")}g.length||g.push('<tr class="no-records-found">',c('<td colspan="%s">%s</td>',this.$header.find("th").length,this.options.formatNoMatches()),"</tr>"),this.$body.html(g.join("")),b||this.scrollTo(0),this.$body.find("> tr[data-index] > td").off("click dblclick").on("click dblclick",function(b){var d=a(this),g=d.parent(),h=f.data[g.data("index")],i=d[0].cellIndex,j=f.getVisibleFields(),k=j[f.options.detailView&&!f.options.cardView?i-1:i],l=f.columns[e(f.columns,k)],n=m(h,k,f.options.escape);if(!d.find(".detail-icon").length&&(f.trigger("click"===b.type?"click-cell":"dbl-click-cell",k,n,h,d),f.trigger("click"===b.type?"click-row":"dbl-click-row",h,g,k),
+"click"===b.type&&f.options.clickToSelect&&l.clickToSelect)){var o=g.find(c('[name="%s"]',f.options.selectItemName));o.length&&o[0].click()}}),this.$body.find("> tr[data-index] > td > .detail-icon").off("click").on("click",function(){var b=a(this),d=b.parent().parent(),e=d.data("index"),g=i[e];if(d.next().is("tr.detail-view"))b.find("i").attr("class",c("%s %s",f.options.iconsPrefix,f.options.icons.detailOpen)),d.next().remove(),f.trigger("collapse-row",e,g);else{b.find("i").attr("class",c("%s %s",f.options.iconsPrefix,f.options.icons.detailClose)),d.after(c('<tr class="detail-view"><td colspan="%s"></td></tr>',d.find("td").length));var j=d.next().find("td"),k=h(f.options,f.options.detailFormatter,[e,g,j],"");1===j.length&&j.append(k),f.trigger("expand-row",e,g,j)}f.resetView()}),this.$selectItem=this.$body.find(c('[name="%s"]',this.options.selectItemName)),this.$selectItem.off("click").on("click",function(b){b.stopImmediatePropagation();var c=a(this),d=c.prop("checked"),e=f.data[c.data("index")];f.options.maintainSelected&&a(this).is(":radio")&&a.each(f.options.data,function(a,b){b[f.header.stateField]=!1}),e[f.header.stateField]=d,f.options.singleSelect&&(f.$selectItem.not(this).each(function(){f.data[a(this).data("index")][f.header.stateField]=!1}),f.$selectItem.filter(":checked").not(this).prop("checked",!1)),f.updateSelected(),f.trigger(d?"check":"uncheck",e,c)}),a.each(this.header.events,function(b,c){if(c){"string"==typeof c&&(c=h(null,c));var d=f.header.fields[b],e=a.inArray(d,f.getVisibleFields());f.options.detailView&&!f.options.cardView&&(e+=1);for(var g in c)f.$body.find(">tr:not(.no-records-found)").each(function(){var b=a(this),h=b.find(f.options.cardView?".card-view":"td").eq(e),i=g.indexOf(" "),j=g.substring(0,i),k=g.substring(i+1),l=c[g];h.find(k).off(j).on(j,function(a){var c=b.data("index"),e=f.data[c],g=e[d];l.apply(this,[a,g,e,c])})})}}),this.updateSelected(),this.resetView(),this.trigger("post-body",i)},p.prototype.initServer=function(b,c,d){var e,f=this,g={},i={searchText:this.searchText,sortName:this.options.sortName,sortOrder:this.options.sortOrder};this.options.pagination&&(i.pageSize=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize,i.pageNumber=this.options.pageNumber),(d||this.options.url||this.options.ajax)&&("limit"===this.options.queryParamsType&&(i={search:i.searchText,sort:i.sortName,order:i.sortOrder},this.options.pagination&&(i.offset=this.options.pageSize===this.options.formatAllRows()?0:this.options.pageSize*(this.options.pageNumber-1),i.limit=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize)),a.isEmptyObject(this.filterColumnsPartial)||(i.filter=JSON.stringify(this.filterColumnsPartial,null)),g=h(this.options,this.options.queryParams,[i],g),a.extend(g,c||{}),g!==!1&&(b||this.$tableLoading.show(),e=a.extend({},h(null,this.options.ajaxOptions),{type:this.options.method,url:d||this.options.url,data:"application/json"===this.options.contentType&&"post"===this.options.method?JSON.stringify(g):g,cache:this.options.cache,contentType:this.options.contentType,dataType:this.options.dataType,success:function(a){a=h(f.options,f.options.responseHandler,[a],a),f.load(a),f.trigger("load-success",a),b||f.$tableLoading.hide()},error:function(a){f.trigger("load-error",a.status,a),b||f.$tableLoading.hide()}}),this.options.ajax?h(this,this.options.ajax,[e],null):(this._xhr&&4!==this._xhr.readyState&&this._xhr.abort(),this._xhr=a.ajax(e))))},p.prototype.initSearchText=function(){if(this.options.search&&""!==this.options.searchText){var a=this.$toolbar.find(".search input");a.val(this.options.searchText),this.onSearch({currentTarget:a})}},p.prototype.getCaret=function(){var b=this;a.each(this.$header.find("th"),function(c,d){a(d).find(".sortable").removeClass("desc asc").addClass(a(d).data("field")===b.options.sortName?b.options.sortOrder:"both")})},p.prototype.updateSelected=function(){var b=this.$selectItem.filter(":enabled").length&&this.$selectItem.filter(":enabled").length===this.$selectItem.filter(":enabled").filter(":checked").length;this.$selectAll.add(this.$selectAll_).prop("checked",b),this.$selectItem.each(function(){a(this).closest("tr")[a(this).prop("checked")?"addClass":"removeClass"]("selected")})},p.prototype.updateRows=function(){var b=this;this.$selectItem.each(function(){b.data[a(this).data("index")][b.header.stateField]=a(this).prop("checked")})},p.prototype.resetRows=function(){var b=this;a.each(this.data,function(a,c){b.$selectAll.prop("checked",!1),b.$selectItem.prop("checked",!1),b.header.stateField&&(c[b.header.stateField]=!1)})},p.prototype.trigger=function(b){var c=Array.prototype.slice.call(arguments,1);b+=".bs.table",this.options[p.EVENTS[b]].apply(this.options,c),this.$el.trigger(a.Event(b),c),this.options.onAll(b,c),this.$el.trigger(a.Event("all.bs.table"),[b,c])},p.prototype.resetHeader=function(){clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(a.proxy(this.fitHeader,this),this.$el.is(":hidden")?100:0)},p.prototype.fitHeader=function(){var b,d,e,f,h=this;if(h.$el.is(":hidden"))return void(h.timeoutId_=setTimeout(a.proxy(h.fitHeader,h),100));if(b=this.$tableBody.get(0),d=b.scrollWidth>b.clientWidth&&b.scrollHeight>b.clientHeight+this.$header.outerHeight()?g():0,this.$el.css("margin-top",-this.$header.outerHeight()),e=a(":focus"),e.length>0){var i=e.parents("th");if(i.length>0){var j=i.attr("data-field");if(void 0!==j){var k=this.$header.find("[data-field='"+j+"']");k.length>0&&k.find(":input").addClass("focus-temp")}}}this.$header_=this.$header.clone(!0,!0),this.$selectAll_=this.$header_.find('[name="btSelectAll"]'),this.$tableHeader.css({"margin-right":d}).find("table").css("width",this.$el.outerWidth()).html("").attr("class",this.$el.attr("class")).append(this.$header_),f=a(".focus-temp:visible:eq(0)"),f.length>0&&(f.focus(),this.$header.find(".focus-temp").removeClass("focus-temp")),this.$header.find("th[data-field]").each(function(){h.$header_.find(c('th[data-field="%s"]',a(this).data("field"))).data(a(this).data())});var l=this.getVisibleFields(),m=this.$header_.find("th");this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(b){var d=a(this),e=b;h.options.detailView&&!h.options.cardView&&(0===b&&h.$header_.find("th.detail").find(".fht-cell").width(d.innerWidth()),e=b-1);var f=h.$header_.find(c('th[data-field="%s"]',l[e]));f.length>1&&(f=a(m[d[0].cellIndex])),f.find(".fht-cell").width(d.innerWidth())}),this.$tableBody.off("scroll").on("scroll",function(){h.$tableHeader.scrollLeft(a(this).scrollLeft()),h.options.showFooter&&!h.options.cardView&&h.$tableFooter.scrollLeft(a(this).scrollLeft())}),h.trigger("post-header")},p.prototype.resetFooter=function(){var b=this,d=b.getData(),e=[];this.options.showFooter&&!this.options.cardView&&(!this.options.cardView&&this.options.detailView&&e.push('<td><div class="th-inner">&nbsp;</div><div class="fht-cell"></div></td>'),a.each(this.columns,function(a,f){var g,i="",j="",k=[],l={},m=c(' class="%s"',f["class"]);if(f.visible&&(!b.options.cardView||f.cardVisible)){if(i=c("text-align: %s; ",f.falign?f.falign:f.align),j=c("vertical-align: %s; ",f.valign),l=h(null,b.options.footerStyle),l&&l.css)for(g in l.css)k.push(g+": "+l.css[g]);e.push("<td",m,c(' style="%s"',i+j+k.concat().join("; ")),">"),e.push('<div class="th-inner">'),e.push(h(f,f.footerFormatter,[d],"&nbsp;")||"&nbsp;"),e.push("</div>"),e.push('<div class="fht-cell"></div>'),e.push("</div>"),e.push("</td>")}}),this.$tableFooter.find("tr").html(e.join("")),this.$tableFooter.show(),clearTimeout(this.timeoutFooter_),this.timeoutFooter_=setTimeout(a.proxy(this.fitFooter,this),this.$el.is(":hidden")?100:0))},p.prototype.fitFooter=function(){var b,c,d;return clearTimeout(this.timeoutFooter_),this.$el.is(":hidden")?void(this.timeoutFooter_=setTimeout(a.proxy(this.fitFooter,this),100)):(c=this.$el.css("width"),d=c>this.$tableBody.width()?g():0,this.$tableFooter.css({"margin-right":d}).find("table").css("width",c).attr("class",this.$el.attr("class")),b=this.$tableFooter.find("td"),void this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(c){var d=a(this);b.eq(c).find(".fht-cell").width(d.innerWidth())}))},p.prototype.toggleColumn=function(a,b,d){if(-1!==a&&(this.columns[a].visible=b,this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns)){var e=this.$toolbar.find(".keep-open input").prop("disabled",!1);d&&e.filter(c('[value="%s"]',a)).prop("checked",b),e.filter(":checked").length<=this.options.minimumCountColumns&&e.filter(":checked").prop("disabled",!0)}},p.prototype.toggleRow=function(a,b,d){-1!==a&&this.$body.find("undefined"!=typeof a?c('tr[data-index="%s"]',a):c('tr[data-uniqueid="%s"]',b))[d?"show":"hide"]()},p.prototype.getVisibleFields=function(){var b=this,c=[];return a.each(this.header.fields,function(a,d){var f=b.columns[e(b.columns,d)];f.visible&&c.push(d)}),c},p.prototype.resetView=function(a){var b=0;if(a&&a.height&&(this.options.height=a.height),this.$selectAll.prop("checked",this.$selectItem.length>0&&this.$selectItem.length===this.$selectItem.filter(":checked").length),this.options.height){var c=k(this.$toolbar),d=k(this.$pagination),e=this.options.height-c-d;this.$tableContainer.css("height",e+"px")}return this.options.cardView?(this.$el.css("margin-top","0"),this.$tableContainer.css("padding-bottom","0"),void this.$tableFooter.hide()):(this.options.showHeader&&this.options.height?(this.$tableHeader.show(),this.resetHeader(),b+=this.$header.outerHeight()):(this.$tableHeader.hide(),this.trigger("post-header")),this.options.showFooter&&(this.resetFooter(),this.options.height&&(b+=this.$tableFooter.outerHeight()+1)),this.getCaret(),this.$tableContainer.css("padding-bottom",b+"px"),void this.trigger("reset-view"))},p.prototype.getData=function(b){return!this.searchText&&a.isEmptyObject(this.filterColumns)&&a.isEmptyObject(this.filterColumnsPartial)?b?this.options.data.slice(this.pageFrom-1,this.pageTo):this.options.data:b?this.data.slice(this.pageFrom-1,this.pageTo):this.data},p.prototype.load=function(b){var c=!1;"server"===this.options.sidePagination?(this.options.totalRows=b.total,c=b.fixedScroll,b=b[this.options.dataField]):a.isArray(b)||(c=b.fixedScroll,b=b.data),this.initData(b),this.initSearch(),this.initPagination(),this.initBody(c)},p.prototype.append=function(a){this.initData(a,"append"),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},p.prototype.prepend=function(a){this.initData(a,"prepend"),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},p.prototype.remove=function(b){var c,d,e=this.options.data.length;if(b.hasOwnProperty("field")&&b.hasOwnProperty("values")){for(c=e-1;c>=0;c--)d=this.options.data[c],d.hasOwnProperty(b.field)&&-1!==a.inArray(d[b.field],b.values)&&this.options.data.splice(c,1);e!==this.options.data.length&&(this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0))}},p.prototype.removeAll=function(){this.options.data.length>0&&(this.options.data.splice(0,this.options.data.length),this.initSearch(),this.initPagination(),this.initBody(!0))},p.prototype.getRowByUniqueId=function(a){var b,c,d,e=this.options.uniqueId,f=this.options.data.length,g=null;for(b=f-1;b>=0;b--){if(c=this.options.data[b],c.hasOwnProperty(e))d=c[e];else{if(!c._data.hasOwnProperty(e))continue;d=c._data[e]}if("string"==typeof d?a=a.toString():"number"==typeof d&&(Number(d)===d&&d%1===0?a=parseInt(a):d===Number(d)&&0!==d&&(a=parseFloat(a))),d===a){g=c;break}}return g},p.prototype.removeByUniqueId=function(a){var b=this.options.data.length,c=this.getRowByUniqueId(a);c&&this.options.data.splice(this.options.data.indexOf(c),1),b!==this.options.data.length&&(this.initSearch(),this.initPagination(),this.initBody(!0))},p.prototype.updateByUniqueId=function(b){var c=this,d=a.isArray(b)?b:[b];a.each(d,function(b,d){var e;d.hasOwnProperty("id")&&d.hasOwnProperty("row")&&(e=a.inArray(c.getRowByUniqueId(d.id),c.options.data),-1!==e&&a.extend(c.options.data[e],d.row))}),this.initSearch(),this.initSort(),this.initBody(!0)},p.prototype.insertRow=function(a){a.hasOwnProperty("index")&&a.hasOwnProperty("row")&&(this.data.splice(a.index,0,a.row),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0))},p.prototype.updateRow=function(b){var c=this,d=a.isArray(b)?b:[b];a.each(d,function(b,d){d.hasOwnProperty("index")&&d.hasOwnProperty("row")&&a.extend(c.options.data[d.index],d.row)}),this.initSearch(),this.initSort(),this.initBody(!0)},p.prototype.showRow=function(a){(a.hasOwnProperty("index")||a.hasOwnProperty("uniqueId"))&&this.toggleRow(a.index,a.uniqueId,!0)},p.prototype.hideRow=function(a){(a.hasOwnProperty("index")||a.hasOwnProperty("uniqueId"))&&this.toggleRow(a.index,a.uniqueId,!1)},p.prototype.getRowsHidden=function(b){var c=a(this.$body[0]).children().filter(":hidden"),d=0;if(b)for(;d<c.length;d++)a(c[d]).show();return c},p.prototype.mergeCells=function(b){var c,d,e,f=b.index,g=a.inArray(b.field,this.getVisibleFields()),h=b.rowspan||1,i=b.colspan||1,j=this.$body.find(">tr");if(this.options.detailView&&!this.options.cardView&&(g+=1),e=j.eq(f).find(">td").eq(g),!(0>f||0>g||f>=this.data.length)){for(c=f;f+h>c;c++)for(d=g;g+i>d;d++)j.eq(c).find(">td").eq(d).hide();e.attr("rowspan",h).attr("colspan",i).show()}},p.prototype.updateCell=function(a){a.hasOwnProperty("index")&&a.hasOwnProperty("field")&&a.hasOwnProperty("value")&&(this.data[a.index][a.field]=a.value,a.reinit!==!1&&(this.initSort(),this.initBody(!0)))},p.prototype.getOptions=function(){return this.options},p.prototype.getSelections=function(){var b=this;return a.grep(this.options.data,function(a){return a[b.header.stateField]})},p.prototype.getAllSelections=function(){var b=this;return a.grep(this.options.data,function(a){return a[b.header.stateField]})},p.prototype.checkAll=function(){this.checkAll_(!0)},p.prototype.uncheckAll=function(){this.checkAll_(!1)},p.prototype.checkInvert=function(){var b=this,c=b.$selectItem.filter(":enabled"),d=c.filter(":checked");c.each(function(){a(this).prop("checked",!a(this).prop("checked"))}),b.updateRows(),b.updateSelected(),b.trigger("uncheck-some",d),d=b.getSelections(),b.trigger("check-some",d)},p.prototype.checkAll_=function(a){var b;a||(b=this.getSelections()),this.$selectAll.add(this.$selectAll_).prop("checked",a),this.$selectItem.filter(":enabled").prop("checked",a),this.updateRows(),a&&(b=this.getSelections()),this.trigger(a?"check-all":"uncheck-all",b)},p.prototype.check=function(a){this.check_(!0,a)},p.prototype.uncheck=function(a){this.check_(!1,a)},p.prototype.check_=function(a,b){var d=this.$selectItem.filter(c('[data-index="%s"]',b)).prop("checked",a);this.data[b][this.header.stateField]=a,this.updateSelected(),this.trigger(a?"check":"uncheck",this.data[b],d)},p.prototype.checkBy=function(a){this.checkBy_(!0,a)},p.prototype.uncheckBy=function(a){this.checkBy_(!1,a)},p.prototype.checkBy_=function(b,d){if(d.hasOwnProperty("field")&&d.hasOwnProperty("values")){var e=this,f=[];a.each(this.options.data,function(g,h){if(!h.hasOwnProperty(d.field))return!1;if(-1!==a.inArray(h[d.field],d.values)){var i=e.$selectItem.filter(":enabled").filter(c('[data-index="%s"]',g)).prop("checked",b);h[e.header.stateField]=b,f.push(h),e.trigger(b?"check":"uncheck",h,i)}}),this.updateSelected(),this.trigger(b?"check-some":"uncheck-some",f)}},p.prototype.destroy=function(){this.$el.insertBefore(this.$container),a(this.options.toolbar).insertBefore(this.$el),this.$container.next().remove(),this.$container.remove(),this.$el.html(this.$el_.html()).css("margin-top","0").attr("class",this.$el_.attr("class")||"")},p.prototype.showLoading=function(){this.$tableLoading.show()},p.prototype.hideLoading=function(){this.$tableLoading.hide()},p.prototype.togglePagination=function(){this.options.pagination=!this.options.pagination;var a=this.$toolbar.find('button[name="paginationSwitch"] i');this.options.pagination?a.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchDown):a.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchUp),this.updatePagination()},p.prototype.refresh=function(a){a&&a.url&&(this.options.pageNumber=1),this.initServer(a&&a.silent,a&&a.query,a&&a.url),this.trigger("refresh",a)},p.prototype.resetWidth=function(){this.options.showHeader&&this.options.height&&this.fitHeader(),this.options.showFooter&&this.fitFooter()},p.prototype.showColumn=function(a){this.toggleColumn(e(this.columns,a),!0,!0)},p.prototype.hideColumn=function(a){this.toggleColumn(e(this.columns,a),!1,!0)},p.prototype.getHiddenColumns=function(){return a.grep(this.columns,function(a){return!a.visible})},p.prototype.getVisibleColumns=function(){return a.grep(this.columns,function(a){return a.visible})},p.prototype.toggleAllColumns=function(b){if(a.each(this.columns,function(a){this.columns[a].visible=b}),this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns){var c=this.$toolbar.find(".keep-open input").prop("disabled",!1);c.filter(":checked").length<=this.options.minimumCountColumns&&c.filter(":checked").prop("disabled",!0)}},p.prototype.showAllColumns=function(){this.toggleAllColumns(!0)},p.prototype.hideAllColumns=function(){this.toggleAllColumns(!1)},p.prototype.filterBy=function(b){this.filterColumns=a.isEmptyObject(b)?{}:b,this.options.pageNumber=1,this.initSearch(),this.updatePagination()},p.prototype.scrollTo=function(a){return"string"==typeof a&&(a="bottom"===a?this.$tableBody[0].scrollHeight:0),"number"==typeof a&&this.$tableBody.scrollTop(a),"undefined"==typeof a?this.$tableBody.scrollTop():void 0},p.prototype.getScrollPosition=function(){return this.scrollTo()},p.prototype.selectPage=function(a){a>0&&a<=this.options.totalPages&&(this.options.pageNumber=a,this.updatePagination())},p.prototype.prevPage=function(){this.options.pageNumber>1&&(this.options.pageNumber--,this.updatePagination())},p.prototype.nextPage=function(){this.options.pageNumber<this.options.totalPages&&(this.options.pageNumber++,this.updatePagination())},p.prototype.toggleView=function(){this.options.cardView=!this.options.cardView,this.initHeader(),this.initBody(),this.trigger("toggle",this.options.cardView)},p.prototype.refreshOptions=function(b){i(this.options,b,!0)||(this.options=a.extend(this.options,b),this.trigger("refresh-options",this.options),this.destroy(),this.init())},p.prototype.resetSearch=function(a){var b=this.$toolbar.find(".search input");b.val(a||""),this.onSearch({currentTarget:b})},p.prototype.expandRow_=function(a,b){var d=this.$body.find(c('> tr[data-index="%s"]',b));d.next().is("tr.detail-view")===(a?!1:!0)&&d.find("> td > .detail-icon").click()},p.prototype.expandRow=function(a){this.expandRow_(!0,a)},p.prototype.collapseRow=function(a){this.expandRow_(!1,a)},p.prototype.expandAllRows=function(b){if(b){var d=this.$body.find(c('> tr[data-index="%s"]',0)),e=this,f=null,g=!1,h=-1;if(d.next().is("tr.detail-view")?d.next().next().is("tr.detail-view")||(d.next().find(".detail-icon").click(),g=!0):(d.find("> td > .detail-icon").click(),g=!0),g)try{h=setInterval(function(){f=e.$body.find("tr.detail-view").last().find(".detail-icon"),f.length>0?f.click():clearInterval(h)},1)}catch(i){clearInterval(h)}}else for(var j=this.$body.children(),k=0;k<j.length;k++)this.expandRow_(!0,a(j[k]).data("index"))},p.prototype.collapseAllRows=function(b){if(b)this.expandRow_(!1,0);else for(var c=this.$body.children(),d=0;d<c.length;d++)this.expandRow_(!1,a(c[d]).data("index"))},p.prototype.updateFormatText=function(a,b){this.options[c("format%s",a)]&&("string"==typeof b?this.options[c("format%s",a)]=function(){return b}:"function"==typeof b&&(this.options[c("format%s",a)]=b)),this.initToolbar(),this.initPagination(),this.initBody()};var q=["getOptions","getSelections","getAllSelections","getData","load","append","prepend","remove","removeAll","insertRow","updateRow","updateCell","updateByUniqueId","removeByUniqueId","getRowByUniqueId","showRow","hideRow","getRowsHidden","mergeCells","checkAll","uncheckAll","checkInvert","check","uncheck","checkBy","uncheckBy","refresh","resetView","resetWidth","destroy","showLoading","hideLoading","showColumn","hideColumn","getHiddenColumns","getVisibleColumns","showAllColumns","hideAllColumns","filterBy","scrollTo","getScrollPosition","selectPage","prevPage","nextPage","togglePagination","toggleView","refreshOptions","resetSearch","expandRow","collapseRow","expandAllRows","collapseAllRows","updateFormatText"];a.fn.bootstrapTable=function(b){var c,d=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=a(this),f=e.data("bootstrap.table"),g=a.extend({},p.DEFAULTS,e.data(),"object"==typeof b&&b);if("string"==typeof b){if(a.inArray(b,q)<0)throw new Error("Unknown method: "+b);if(!f)return;c=f[b].apply(f,d),"destroy"===b&&e.removeData("bootstrap.table")}f||e.data("bootstrap.table",f=new p(this,g))}),"undefined"==typeof c?this:c},a.fn.bootstrapTable.Constructor=p,a.fn.bootstrapTable.defaults=p.DEFAULTS,a.fn.bootstrapTable.columnDefaults=p.COLUMN_DEFAULTS,a.fn.bootstrapTable.locales=p.LOCALES,a.fn.bootstrapTable.methods=q,a.fn.bootstrapTable.utils={sprintf:c,getFieldIndex:e,compareObjects:i,calculateObjectValue:h,getItemField:m,objectKeys:o,isIEBrowser:n},a(function(){a('[data-toggle="table"]').bootstrapTable()})}(jQuery); \ No newline at end of file
diff --git a/common/src/main/webapp/framework/browser/thirdparty/js/bootstrap.min.js b/common/src/main/webapp/framework/browser/thirdparty/js/bootstrap.min.js
new file mode 100644
index 0000000..b04a0e8
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/js/bootstrap.min.js
@@ -0,0 +1,6 @@
+/*!
+ * Bootstrap v3.1.1 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown",h),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=" li:not(.divider):visible a",i=f.find("[role=menu]"+h+", [role=listbox]"+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j<i.length-1&&j++,~j||(j=0),i.eq(j).focus()}}}};var g=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new f(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=f,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=g,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",e,f.prototype.toggle).on("keydown.bs.dropdown.data-api",e+", [role=menu], [role=listbox]",f.prototype.keydown)}(jQuery),+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};b.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isShown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body),c.$element.show().scrollTop(0),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulateTransitionEnd(300):c.$element.focus().trigger(e)}))},b.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},b.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.focus()},this))},b.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());c.is("a")&&b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this,d=this.tip();this.setContent(),this.options.animation&&d.addClass("fade");var e="function"==typeof this.options.placement?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,f=/\s?auto?\s?/i,g=f.test(e);g&&(e=e.replace(f,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(e),this.options.container?d.appendTo(this.options.container):d.insertAfter(this.$element);var h=this.getPosition(),i=d[0].offsetWidth,j=d[0].offsetHeight;if(g){var k=this.$element.parent(),l=e,m=document.documentElement.scrollTop||document.body.scrollTop,n="body"==this.options.container?window.innerWidth:k.outerWidth(),o="body"==this.options.container?window.innerHeight:k.outerHeight(),p="body"==this.options.container?0:k.offset().left;e="bottom"==e&&h.top+h.height+j-m>o?"top":"top"==e&&h.top-m-j<0?"bottom":"right"==e&&h.right+i>n?"left":"left"==e&&h.left-i<p?"right":e,d.removeClass(l).addClass(e)}var q=this.getCalculatedOffset(e,h,i,j);this.applyPlacement(q,e),this.hoverState=null;var r=function(){c.$element.trigger("shown.bs."+c.type)};a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,r).emulateTransitionEnd(150):r()}},b.prototype.applyPlacement=function(b,c){var d,e=this.tip(),f=e[0].offsetWidth,g=e[0].offsetHeight,h=parseInt(e.css("margin-top"),10),i=parseInt(e.css("margin-left"),10);isNaN(h)&&(h=0),isNaN(i)&&(i=0),b.top=b.top+h,b.left=b.left+i,a.offset.setOffset(e[0],a.extend({using:function(a){e.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),e.addClass("in");var j=e[0].offsetWidth,k=e[0].offsetHeight;if("top"==c&&k!=g&&(d=!0,b.top=b.top+g-k),/bottom|top/.test(c)){var l=0;b.left<0&&(l=-2*b.left,b.left=0,e.offset(b),j=e[0].offsetWidth,k=e[0].offsetHeight),this.replaceArrow(l-f+j,j,"left")}else this.replaceArrow(k-g,k,"top");d&&e.offset(b)},b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},b.prototype.hide=function(){function b(){"in"!=c.hoverState&&d.detach(),c.$element.trigger("hidden.bs."+c.type)}var c=this,d=this.tip(),e=a.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(d.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,b).emulateTransitionEnd(150):b(),this.hoverState=null,this)},b.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},b.prototype.hasContent=function(){return this.getTitle()},b.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},b.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},b.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},b.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},b.prototype.enable=function(){this.enabled=!0},b.prototype.disable=function(){this.enabled=!1},b.prototype.toggleEnabled=function(){this.enabled=!this.enabled},b.prototype.toggle=function(b){var c=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;c.tip().hasClass("in")?c.leave(c):c.enter(c)},b.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.tooltip",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.tooltip.Constructor=b,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(jQuery),+function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");b.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery); \ No newline at end of file
diff --git a/common/src/main/webapp/framework/browser/thirdparty/js/jquery.ztree.core-3.5.js b/common/src/main/webapp/framework/browser/thirdparty/js/jquery.ztree.core-3.5.js
new file mode 100644
index 0000000..f1c2127
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/js/jquery.ztree.core-3.5.js
@@ -0,0 +1,70 @@
+/*
+ * JQuery zTree core v3.5.18
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2015-06-18
+ */
+(function(p){var G,H,I,J,K,L,r={},u={},v={},M={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{children:"children",name:"name",title:"",url:"url"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",url:"",autoParam:[],
+otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},w=[function(b){var a=b.treeObj,c=e.event;a.bind(c.NODECREATED,function(a,c,g){j.apply(b.callback.onNodeCreated,
+[a,c,g])});a.bind(c.CLICK,function(a,c,g,l,h){j.apply(b.callback.onClick,[c,g,l,h])});a.bind(c.EXPAND,function(a,c,g){j.apply(b.callback.onExpand,[a,c,g])});a.bind(c.COLLAPSE,function(a,c,g){j.apply(b.callback.onCollapse,[a,c,g])});a.bind(c.ASYNC_SUCCESS,function(a,c,g,l){j.apply(b.callback.onAsyncSuccess,[a,c,g,l])});a.bind(c.ASYNC_ERROR,function(a,c,g,l,h,e){j.apply(b.callback.onAsyncError,[a,c,g,l,h,e])});a.bind(c.REMOVE,function(a,c,g){j.apply(b.callback.onRemove,[a,c,g])});a.bind(c.SELECTED,
+function(a,c,g,l){j.apply(b.callback.onSelected,[c,g,l])});a.bind(c.UNSELECTED,function(a,c,g,l){j.apply(b.callback.onUnSelected,[c,g,l])})}],x=[function(b){var a=e.event;b.treeObj.unbind(a.NODECREATED).unbind(a.CLICK).unbind(a.EXPAND).unbind(a.COLLAPSE).unbind(a.ASYNC_SUCCESS).unbind(a.ASYNC_ERROR).unbind(a.REMOVE).unbind(a.SELECTED).unbind(a.UNSELECTED)}],y=[function(b){var a=h.getCache(b);a||(a={},h.setCache(b,a));a.nodes=[];a.doms=[]}],z=[function(b,a,c,d,f,g){if(c){var l=h.getRoot(b),e=b.data.key.children;
+c.level=a;c.tId=b.treeId+"_"+ ++l.zId;c.parentTId=d?d.tId:null;c.open=typeof c.open=="string"?j.eqs(c.open,"true"):!!c.open;c[e]&&c[e].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent=typeof c.isParent=="string"?j.eqs(c.isParent,"true"):!!c.isParent,c.open=c.isParent&&!b.async.enable?c.open:!1,c.zAsync=!c.isParent);c.isFirstNode=f;c.isLastNode=g;c.getParentNode=function(){return h.getNodeCache(b,c.parentTId)};c.getPreNode=function(){return h.getPreNode(b,c)};c.getNextNode=function(){return h.getNextNode(b,
+c)};c.isAjaxing=!1;h.fixPIdKeyValue(b,c)}}],s=[function(b){var a=b.target,c=h.getSetting(b.data.treeId),d="",f=null,g="",l="",i=null,o=null,k=null;if(j.eqs(b.type,"mousedown"))l="mousedown";else if(j.eqs(b.type,"mouseup"))l="mouseup";else if(j.eqs(b.type,"contextmenu"))l="contextmenu";else if(j.eqs(b.type,"click"))if(j.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+e.id.SWITCH)!==null)d=j.getNodeMainDom(a).id,g="switchNode";else{if(k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}]))d=j.getNodeMainDom(k).id,
+g="clickNode"}else if(j.eqs(b.type,"dblclick")&&(l="dblclick",k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}])))d=j.getNodeMainDom(k).id,g="switchNode";if(l.length>0&&d.length==0&&(k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}])))d=j.getNodeMainDom(k).id;if(d.length>0)switch(f=h.getNodeCache(c,d),g){case "switchNode":f.isParent?j.eqs(b.type,"click")||j.eqs(b.type,"dblclick")&&j.apply(c.view.dblClickExpand,[c.treeId,f],c.view.dblClickExpand)?i=G:g="":g="";break;case "clickNode":i=
+H}switch(l){case "mousedown":o=I;break;case "mouseup":o=J;break;case "dblclick":o=K;break;case "contextmenu":o=L}return{stop:!1,node:f,nodeEventType:g,nodeEventCallback:i,treeEventType:l,treeEventCallback:o}}],A=[function(b){var a=h.getRoot(b);a||(a={},h.setRoot(b,a));a[b.data.key.children]=[];a.expandTriggerFlag=!1;a.curSelectedList=[];a.noSelection=!0;a.createdNodes=[];a.zId=0;a._ver=(new Date).getTime()}],B=[],C=[],D=[],E=[],F=[],h={addNodeCache:function(b,a){h.getCache(b).nodes[h.getNodeCacheId(a.tId)]=
+a},getNodeCacheId:function(b){return b.substring(b.lastIndexOf("_")+1)},addAfterA:function(b){C.push(b)},addBeforeA:function(b){B.push(b)},addInnerAfterA:function(b){E.push(b)},addInnerBeforeA:function(b){D.push(b)},addInitBind:function(b){w.push(b)},addInitUnBind:function(b){x.push(b)},addInitCache:function(b){y.push(b)},addInitNode:function(b){z.push(b)},addInitProxy:function(b,a){a?s.splice(0,0,b):s.push(b)},addInitRoot:function(b){A.push(b)},addNodesData:function(b,a,c){var d=b.data.key.children;
+a[d]||(a[d]=[]);if(a[d].length>0)a[d][a[d].length-1].isLastNode=!1,i.setNodeLineIcos(b,a[d][a[d].length-1]);a.isParent=!0;a[d]=a[d].concat(c)},addSelectedNode:function(b,a){var c=h.getRoot(b);h.isSelectedNode(b,a)||c.curSelectedList.push(a)},addCreatedNode:function(b,a){(b.callback.onNodeCreated||b.view.addDiyDom)&&h.getRoot(b).createdNodes.push(a)},addZTreeTools:function(b){F.push(b)},exSetting:function(b){p.extend(!0,M,b)},fixPIdKeyValue:function(b,a){b.data.simpleData.enable&&(a[b.data.simpleData.pIdKey]=
+a.parentTId?a.getParentNode()[b.data.simpleData.idKey]:b.data.simpleData.rootPId)},getAfterA:function(b,a,c){for(var d=0,f=C.length;d<f;d++)C[d].apply(this,arguments)},getBeforeA:function(b,a,c){for(var d=0,f=B.length;d<f;d++)B[d].apply(this,arguments)},getInnerAfterA:function(b,a,c){for(var d=0,f=E.length;d<f;d++)E[d].apply(this,arguments)},getInnerBeforeA:function(b,a,c){for(var d=0,f=D.length;d<f;d++)D[d].apply(this,arguments)},getCache:function(b){return v[b.treeId]},getNextNode:function(b,a){if(!a)return null;
+for(var c=b.data.key.children,d=a.parentTId?a.getParentNode():h.getRoot(b),f=0,g=d[c].length-1;f<=g;f++)if(d[c][f]===a)return f==g?null:d[c][f+1];return null},getNodeByParam:function(b,a,c,d){if(!a||!c)return null;for(var f=b.data.key.children,g=0,l=a.length;g<l;g++){if(a[g][c]==d)return a[g];var e=h.getNodeByParam(b,a[g][f],c,d);if(e)return e}return null},getNodeCache:function(b,a){if(!a)return null;var c=v[b.treeId].nodes[h.getNodeCacheId(a)];return c?c:null},getNodeName:function(b,a){return""+
+a[b.data.key.name]},getNodeTitle:function(b,a){return""+a[b.data.key.title===""?b.data.key.name:b.data.key.title]},getNodes:function(b){return h.getRoot(b)[b.data.key.children]},getNodesByParam:function(b,a,c,d){if(!a||!c)return[];for(var f=b.data.key.children,g=[],l=0,e=a.length;l<e;l++)a[l][c]==d&&g.push(a[l]),g=g.concat(h.getNodesByParam(b,a[l][f],c,d));return g},getNodesByParamFuzzy:function(b,a,c,d){if(!a||!c)return[];for(var f=b.data.key.children,g=[],d=d.toLowerCase(),l=0,e=a.length;l<e;l++)typeof a[l][c]==
+"string"&&a[l][c].toLowerCase().indexOf(d)>-1&&g.push(a[l]),g=g.concat(h.getNodesByParamFuzzy(b,a[l][f],c,d));return g},getNodesByFilter:function(b,a,c,d,f){if(!a)return d?null:[];for(var g=b.data.key.children,e=d?null:[],i=0,o=a.length;i<o;i++){if(j.apply(c,[a[i],f],!1)){if(d)return a[i];e.push(a[i])}var k=h.getNodesByFilter(b,a[i][g],c,d,f);if(d&&k)return k;e=d?k:e.concat(k)}return e},getPreNode:function(b,a){if(!a)return null;for(var c=b.data.key.children,d=a.parentTId?a.getParentNode():h.getRoot(b),
+f=0,g=d[c].length;f<g;f++)if(d[c][f]===a)return f==0?null:d[c][f-1];return null},getRoot:function(b){return b?u[b.treeId]:null},getRoots:function(){return u},getSetting:function(b){return r[b]},getSettings:function(){return r},getZTreeTools:function(b){return(b=this.getRoot(this.getSetting(b)))?b.treeTools:null},initCache:function(b){for(var a=0,c=y.length;a<c;a++)y[a].apply(this,arguments)},initNode:function(b,a,c,d,f,g){for(var e=0,h=z.length;e<h;e++)z[e].apply(this,arguments)},initRoot:function(b){for(var a=
+0,c=A.length;a<c;a++)A[a].apply(this,arguments)},isSelectedNode:function(b,a){for(var c=h.getRoot(b),d=0,f=c.curSelectedList.length;d<f;d++)if(a===c.curSelectedList[d])return!0;return!1},removeNodeCache:function(b,a){var c=b.data.key.children;if(a[c])for(var d=0,f=a[c].length;d<f;d++)arguments.callee(b,a[c][d]);h.getCache(b).nodes[h.getNodeCacheId(a.tId)]=null},removeSelectedNode:function(b,a){for(var c=h.getRoot(b),d=0,f=c.curSelectedList.length;d<f;d++)if(a===c.curSelectedList[d]||!h.getNodeCache(b,
+c.curSelectedList[d].tId))c.curSelectedList.splice(d,1),d--,f--},setCache:function(b,a){v[b.treeId]=a},setRoot:function(b,a){u[b.treeId]=a},setZTreeTools:function(b,a){for(var c=0,d=F.length;c<d;c++)F[c].apply(this,arguments)},transformToArrayFormat:function(b,a){if(!a)return[];var c=b.data.key.children,d=[];if(j.isArray(a))for(var f=0,g=a.length;f<g;f++)d.push(a[f]),a[f][c]&&(d=d.concat(h.transformToArrayFormat(b,a[f][c])));else d.push(a),a[c]&&(d=d.concat(h.transformToArrayFormat(b,a[c])));return d},
+transformTozTreeFormat:function(b,a){var c,d,f=b.data.simpleData.idKey,g=b.data.simpleData.pIdKey,e=b.data.key.children;if(!f||f==""||!a)return[];if(j.isArray(a)){var h=[],i=[];for(c=0,d=a.length;c<d;c++)i[a[c][f]]=a[c];for(c=0,d=a.length;c<d;c++)i[a[c][g]]&&a[c][f]!=a[c][g]?(i[a[c][g]][e]||(i[a[c][g]][e]=[]),i[a[c][g]][e].push(a[c])):h.push(a[c]);return h}else return[a]}},m={bindEvent:function(b){for(var a=0,c=w.length;a<c;a++)w[a].apply(this,arguments)},unbindEvent:function(b){for(var a=0,c=x.length;a<
+c;a++)x[a].apply(this,arguments)},bindTree:function(b){var a={treeId:b.treeId},c=b.treeObj;b.view.txtSelectedEnable||c.bind("selectstart",function(a){a=a.originalEvent.srcElement.nodeName.toLowerCase();return a==="input"||a==="textarea"}).css({"-moz-user-select":"-moz-none"});c.bind("click",a,m.proxy);c.bind("dblclick",a,m.proxy);c.bind("mouseover",a,m.proxy);c.bind("mouseout",a,m.proxy);c.bind("mousedown",a,m.proxy);c.bind("mouseup",a,m.proxy);c.bind("contextmenu",a,m.proxy)},unbindTree:function(b){b.treeObj.unbind("click",
+m.proxy).unbind("dblclick",m.proxy).unbind("mouseover",m.proxy).unbind("mouseout",m.proxy).unbind("mousedown",m.proxy).unbind("mouseup",m.proxy).unbind("contextmenu",m.proxy)},doProxy:function(b){for(var a=[],c=0,d=s.length;c<d;c++){var f=s[c].apply(this,arguments);a.push(f);if(f.stop)break}return a},proxy:function(b){var a=h.getSetting(b.data.treeId);if(!j.uCanDo(a,b))return!0;for(var a=m.doProxy(b),c=!0,d=0,f=a.length;d<f;d++){var g=a[d];g.nodeEventCallback&&(c=g.nodeEventCallback.apply(g,[b,g.node])&&
+c);g.treeEventCallback&&(c=g.treeEventCallback.apply(g,[b,g.node])&&c)}return c}};G=function(b,a){var c=h.getSetting(b.data.treeId);if(a.open){if(j.apply(c.callback.beforeCollapse,[c.treeId,a],!0)==!1)return!0}else if(j.apply(c.callback.beforeExpand,[c.treeId,a],!0)==!1)return!0;h.getRoot(c).expandTriggerFlag=!0;i.switchNode(c,a);return!0};H=function(b,a){var c=h.getSetting(b.data.treeId),d=c.view.autoCancelSelected&&(b.ctrlKey||b.metaKey)&&h.isSelectedNode(c,a)?0:c.view.autoCancelSelected&&(b.ctrlKey||
+b.metaKey)&&c.view.selectedMulti?2:1;if(j.apply(c.callback.beforeClick,[c.treeId,a,d],!0)==!1)return!0;d===0?i.cancelPreSelectedNode(c,a):i.selectNode(c,a,d===2);c.treeObj.trigger(e.event.CLICK,[b,c.treeId,a,d]);return!0};I=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeMouseDown,[c.treeId,a],!0)&&j.apply(c.callback.onMouseDown,[b,c.treeId,a]);return!0};J=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeMouseUp,[c.treeId,a],!0)&&j.apply(c.callback.onMouseUp,
+[b,c.treeId,a]);return!0};K=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeDblClick,[c.treeId,a],!0)&&j.apply(c.callback.onDblClick,[b,c.treeId,a]);return!0};L=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeRightClick,[c.treeId,a],!0)&&j.apply(c.callback.onRightClick,[b,c.treeId,a]);return typeof c.callback.onRightClick!="function"};var j={apply:function(b,a,c){return typeof b=="function"?b.apply(N,a?a:[]):c},canAsync:function(b,a){var c=b.data.key.children;
+return b.async.enable&&a&&a.isParent&&!(a.zAsync||a[c]&&a[c].length>0)},clone:function(b){if(b===null)return null;var a=j.isArray(b)?[]:{},c;for(c in b)a[c]=b[c]instanceof Date?new Date(b[c].getTime()):typeof b[c]==="object"?arguments.callee(b[c]):b[c];return a},eqs:function(b,a){return b.toLowerCase()===a.toLowerCase()},isArray:function(b){return Object.prototype.toString.apply(b)==="[object Array]"},$:function(b,a,c){a&&typeof a!="string"&&(c=a,a="");return typeof b=="string"?p(b,c?c.treeObj.get(0).ownerDocument:
+null):p("#"+b.tId+a,c?c.treeObj:null)},getMDom:function(b,a,c){if(!a)return null;for(;a&&a.id!==b.treeId;){for(var d=0,f=c.length;a.tagName&&d<f;d++)if(j.eqs(a.tagName,c[d].tagName)&&a.getAttribute(c[d].attrName)!==null)return a;a=a.parentNode}return null},getNodeMainDom:function(b){return p(b).parent("li").get(0)||p(b).parentsUntil("li").parent().get(0)},isChildOrSelf:function(b,a){return p(b).closest("#"+a).length>0},uCanDo:function(){return!0}},i={addNodes:function(b,a,c,d){if(!b.data.keep.leaf||
+!a||a.isParent)if(j.isArray(c)||(c=[c]),b.data.simpleData.enable&&(c=h.transformTozTreeFormat(b,c)),a){var f=k(a,e.id.SWITCH,b),g=k(a,e.id.ICON,b),l=k(a,e.id.UL,b);if(!a.open)i.replaceSwitchClass(a,f,e.folder.CLOSE),i.replaceIcoClass(a,g,e.folder.CLOSE),a.open=!1,l.css({display:"none"});h.addNodesData(b,a,c);i.createNodes(b,a.level+1,c,a);d||i.expandCollapseParentNode(b,a,!0)}else h.addNodesData(b,h.getRoot(b),c),i.createNodes(b,0,c,null)},appendNodes:function(b,a,c,d,f,g){if(!c)return[];for(var e=
+[],j=b.data.key.children,k=0,m=c.length;k<m;k++){var n=c[k];if(f){var t=(d?d:h.getRoot(b))[j].length==c.length&&k==0;h.initNode(b,a,n,d,t,k==c.length-1,g);h.addNodeCache(b,n)}t=[];n[j]&&n[j].length>0&&(t=i.appendNodes(b,a+1,n[j],n,f,g&&n.open));g&&(i.makeDOMNodeMainBefore(e,b,n),i.makeDOMNodeLine(e,b,n),h.getBeforeA(b,n,e),i.makeDOMNodeNameBefore(e,b,n),h.getInnerBeforeA(b,n,e),i.makeDOMNodeIcon(e,b,n),h.getInnerAfterA(b,n,e),i.makeDOMNodeNameAfter(e,b,n),h.getAfterA(b,n,e),n.isParent&&n.open&&i.makeUlHtml(b,
+n,e,t.join("")),i.makeDOMNodeMainAfter(e,b,n),h.addCreatedNode(b,n))}return e},appendParentULDom:function(b,a){var c=[],d=k(a,b);!d.get(0)&&a.parentTId&&(i.appendParentULDom(b,a.getParentNode()),d=k(a,b));var f=k(a,e.id.UL,b);f.get(0)&&f.remove();f=i.appendNodes(b,a.level+1,a[b.data.key.children],a,!1,!0);i.makeUlHtml(b,a,c,f.join(""));d.append(c.join(""))},asyncNode:function(b,a,c,d){var f,g;if(a&&!a.isParent)return j.apply(d),!1;else if(a&&a.isAjaxing)return!1;else if(j.apply(b.callback.beforeAsync,
+[b.treeId,a],!0)==!1)return j.apply(d),!1;if(a)a.isAjaxing=!0,k(a,e.id.ICON,b).attr({style:"","class":e.className.BUTTON+" "+e.className.ICO_LOADING});var l={};for(f=0,g=b.async.autoParam.length;a&&f<g;f++){var q=b.async.autoParam[f].split("="),o=q;q.length>1&&(o=q[1],q=q[0]);l[o]=a[q]}if(j.isArray(b.async.otherParam))for(f=0,g=b.async.otherParam.length;f<g;f+=2)l[b.async.otherParam[f]]=b.async.otherParam[f+1];else for(var m in b.async.otherParam)l[m]=b.async.otherParam[m];var n=h.getRoot(b)._ver;
+p.ajax({contentType:b.async.contentType,cache:!1,type:b.async.type,url:j.apply(b.async.url,[b.treeId,a],b.async.url),data:l,dataType:b.async.dataType,success:function(f){if(n==h.getRoot(b)._ver){var g=[];try{g=!f||f.length==0?[]:typeof f=="string"?eval("("+f+")"):f}catch(l){g=f}if(a)a.isAjaxing=null,a.zAsync=!0;i.setNodeLineIcos(b,a);g&&g!==""?(g=j.apply(b.async.dataFilter,[b.treeId,a,g],g),i.addNodes(b,a,g?j.clone(g):[],!!c)):i.addNodes(b,a,[],!!c);b.treeObj.trigger(e.event.ASYNC_SUCCESS,[b.treeId,
+a,f]);j.apply(d)}},error:function(c,d,f){if(n==h.getRoot(b)._ver){if(a)a.isAjaxing=null;i.setNodeLineIcos(b,a);b.treeObj.trigger(e.event.ASYNC_ERROR,[b.treeId,a,c,d,f])}}});return!0},cancelPreSelectedNode:function(b,a,c){var d=h.getRoot(b).curSelectedList,f,g;for(f=d.length-1;f>=0;f--)if(g=d[f],a===g||!a&&(!c||c!==g))if(k(g,e.id.A,b).removeClass(e.node.CURSELECTED),a){h.removeSelectedNode(b,a);b.treeObj.trigger(e.event.UNSELECTED,[m,b.treeId,g]);break}else d.splice(f,1),b.treeObj.trigger(e.event.UNSELECTED,
+[m,b.treeId,g])},createNodeCallback:function(b){if(b.callback.onNodeCreated||b.view.addDiyDom)for(var a=h.getRoot(b);a.createdNodes.length>0;){var c=a.createdNodes.shift();j.apply(b.view.addDiyDom,[b.treeId,c]);b.callback.onNodeCreated&&b.treeObj.trigger(e.event.NODECREATED,[b.treeId,c])}},createNodes:function(b,a,c,d){if(c&&c.length!=0){var f=h.getRoot(b),g=b.data.key.children,g=!d||d.open||!!k(d[g][0],b).get(0);f.createdNodes=[];a=i.appendNodes(b,a,c,d,!0,g);d?(d=k(d,e.id.UL,b),d.get(0)&&d.append(a.join(""))):
+b.treeObj.append(a.join(""));i.createNodeCallback(b)}},destroy:function(b){b&&(h.initCache(b),h.initRoot(b),m.unbindTree(b),m.unbindEvent(b),b.treeObj.empty(),delete r[b.treeId])},expandCollapseNode:function(b,a,c,d,f){var g=h.getRoot(b),l=b.data.key.children;if(a){if(g.expandTriggerFlag){var q=f,f=function(){q&&q();a.open?b.treeObj.trigger(e.event.EXPAND,[b.treeId,a]):b.treeObj.trigger(e.event.COLLAPSE,[b.treeId,a])};g.expandTriggerFlag=!1}if(!a.open&&a.isParent&&(!k(a,e.id.UL,b).get(0)||a[l]&&a[l].length>
+0&&!k(a[l][0],b).get(0)))i.appendParentULDom(b,a),i.createNodeCallback(b);if(a.open==c)j.apply(f,[]);else{var c=k(a,e.id.UL,b),g=k(a,e.id.SWITCH,b),o=k(a,e.id.ICON,b);a.isParent?(a.open=!a.open,a.iconOpen&&a.iconClose&&o.attr("style",i.makeNodeIcoStyle(b,a)),a.open?(i.replaceSwitchClass(a,g,e.folder.OPEN),i.replaceIcoClass(a,o,e.folder.OPEN),d==!1||b.view.expandSpeed==""?(c.show(),j.apply(f,[])):a[l]&&a[l].length>0?c.slideDown(b.view.expandSpeed,f):(c.show(),j.apply(f,[]))):(i.replaceSwitchClass(a,
+g,e.folder.CLOSE),i.replaceIcoClass(a,o,e.folder.CLOSE),d==!1||b.view.expandSpeed==""||!(a[l]&&a[l].length>0)?(c.hide(),j.apply(f,[])):c.slideUp(b.view.expandSpeed,f))):j.apply(f,[])}}else j.apply(f,[])},expandCollapseParentNode:function(b,a,c,d,f){a&&(a.parentTId?(i.expandCollapseNode(b,a,c,d),a.parentTId&&i.expandCollapseParentNode(b,a.getParentNode(),c,d,f)):i.expandCollapseNode(b,a,c,d,f))},expandCollapseSonNode:function(b,a,c,d,f){var g=h.getRoot(b),e=b.data.key.children,g=a?a[e]:g[e],e=a?!1:
+d,j=h.getRoot(b).expandTriggerFlag;h.getRoot(b).expandTriggerFlag=!1;if(g)for(var k=0,m=g.length;k<m;k++)g[k]&&i.expandCollapseSonNode(b,g[k],c,e);h.getRoot(b).expandTriggerFlag=j;i.expandCollapseNode(b,a,c,d,f)},isSelectedNode:function(b,a){if(!a)return!1;var c=h.getRoot(b).curSelectedList,d;for(d=c.length-1;d>=0;d--)if(a===c[d])return!0;return!1},makeDOMNodeIcon:function(b,a,c){var d=h.getNodeName(a,c),d=a.view.nameIsHTML?d:d.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");b.push("<span id='",
+c.tId,e.id.ICON,"' title='' treeNode",e.id.ICON," class='",i.makeNodeIcoClass(a,c),"' style='",i.makeNodeIcoStyle(a,c),"'></span><span id='",c.tId,e.id.SPAN,"'>",d,"</span>")},makeDOMNodeLine:function(b,a,c){b.push("<span id='",c.tId,e.id.SWITCH,"' title='' class='",i.makeNodeLineClass(a,c),"' treeNode",e.id.SWITCH,"></span>")},makeDOMNodeMainAfter:function(b){b.push("</li>")},makeDOMNodeMainBefore:function(b,a,c){b.push("<li id='",c.tId,"' class='",e.className.LEVEL,c.level,"' tabindex='0' hidefocus='true' treenode>")},
+makeDOMNodeNameAfter:function(b){b.push("</a>")},makeDOMNodeNameBefore:function(b,a,c){var d=h.getNodeTitle(a,c),f=i.makeNodeUrl(a,c),g=i.makeNodeFontCss(a,c),l=[],k;for(k in g)l.push(k,":",g[k],";");b.push("<a id='",c.tId,e.id.A,"' class='",e.className.LEVEL,c.level,"' treeNode",e.id.A,' onclick="',c.click||"",'" ',f!=null&&f.length>0?"href='"+f+"'":""," target='",i.makeNodeTarget(c),"' style='",l.join(""),"'");j.apply(a.view.showTitle,[a.treeId,c],a.view.showTitle)&&d&&b.push("title='",d.replace(/'/g,
+"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"'");b.push(">")},makeNodeFontCss:function(b,a){var c=j.apply(b.view.fontCss,[b.treeId,a],b.view.fontCss);return c&&typeof c!="function"?c:{}},makeNodeIcoClass:function(b,a){var c=["ico"];a.isAjaxing||(c[0]=(a.iconSkin?a.iconSkin+"_":"")+c[0],a.isParent?c.push(a.open?e.folder.OPEN:e.folder.CLOSE):c.push(e.folder.DOCU));return e.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(b,a){var c=[];if(!a.isAjaxing){var d=a.isParent&&a.iconOpen&&
+a.iconClose?a.open?a.iconOpen:a.iconClose:a.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;");(b.view.showIcon==!1||!j.apply(b.view.showIcon,[b.treeId,a],!0))&&c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(b,a){var c=[];b.view.showLine?a.level==0&&a.isFirstNode&&a.isLastNode?c.push(e.line.ROOT):a.level==0&&a.isFirstNode?c.push(e.line.ROOTS):a.isLastNode?c.push(e.line.BOTTOM):c.push(e.line.CENTER):c.push(e.line.NOLINE);a.isParent?c.push(a.open?e.folder.OPEN:e.folder.CLOSE):
+c.push(e.folder.DOCU);return i.makeNodeLineClassEx(a)+c.join("_")},makeNodeLineClassEx:function(b){return e.className.BUTTON+" "+e.className.LEVEL+b.level+" "+e.className.SWITCH+" "},makeNodeTarget:function(b){return b.target||"_blank"},makeNodeUrl:function(b,a){var c=b.data.key.url;return a[c]?a[c]:null},makeUlHtml:function(b,a,c,d){c.push("<ul id='",a.tId,e.id.UL,"' class='",e.className.LEVEL,a.level," ",i.makeUlLineClass(b,a),"' style='display:",a.open?"block":"none","'>");c.push(d);c.push("</ul>")},
+makeUlLineClass:function(b,a){return b.view.showLine&&!a.isLastNode?e.line.LINE:""},removeChildNodes:function(b,a){if(a){var c=b.data.key.children,d=a[c];if(d){for(var f=0,g=d.length;f<g;f++)h.removeNodeCache(b,d[f]);h.removeSelectedNode(b);delete a[c];b.data.keep.parent?k(a,e.id.UL,b).empty():(a.isParent=!1,a.open=!1,c=k(a,e.id.SWITCH,b),d=k(a,e.id.ICON,b),i.replaceSwitchClass(a,c,e.folder.DOCU),i.replaceIcoClass(a,d,e.folder.DOCU),k(a,e.id.UL,b).remove())}}},setFirstNode:function(b,a){var c=b.data.key.children;
+if(a[c].length>0)a[c][0].isFirstNode=!0},setLastNode:function(b,a){var c=b.data.key.children,d=a[c].length;if(d>0)a[c][d-1].isLastNode=!0},removeNode:function(b,a){var c=h.getRoot(b),d=b.data.key.children,f=a.parentTId?a.getParentNode():c;a.isFirstNode=!1;a.isLastNode=!1;a.getPreNode=function(){return null};a.getNextNode=function(){return null};if(h.getNodeCache(b,a.tId)){k(a,b).remove();h.removeNodeCache(b,a);h.removeSelectedNode(b,a);for(var g=0,l=f[d].length;g<l;g++)if(f[d][g].tId==a.tId){f[d].splice(g,
+1);break}i.setFirstNode(b,f);i.setLastNode(b,f);var j,g=f[d].length;if(!b.data.keep.parent&&g==0)f.isParent=!1,f.open=!1,g=k(f,e.id.UL,b),l=k(f,e.id.SWITCH,b),j=k(f,e.id.ICON,b),i.replaceSwitchClass(f,l,e.folder.DOCU),i.replaceIcoClass(f,j,e.folder.DOCU),g.css("display","none");else if(b.view.showLine&&g>0){var o=f[d][g-1],g=k(o,e.id.UL,b),l=k(o,e.id.SWITCH,b);j=k(o,e.id.ICON,b);f==c?f[d].length==1?i.replaceSwitchClass(o,l,e.line.ROOT):(c=k(f[d][0],e.id.SWITCH,b),i.replaceSwitchClass(f[d][0],c,e.line.ROOTS),
+i.replaceSwitchClass(o,l,e.line.BOTTOM)):i.replaceSwitchClass(o,l,e.line.BOTTOM);g.removeClass(e.line.LINE)}}},replaceIcoClass:function(b,a,c){if(a&&!b.isAjaxing&&(b=a.attr("class"),b!=void 0)){b=b.split("_");switch(c){case e.folder.OPEN:case e.folder.CLOSE:case e.folder.DOCU:b[b.length-1]=c}a.attr("class",b.join("_"))}},replaceSwitchClass:function(b,a,c){if(a){var d=a.attr("class");if(d!=void 0){d=d.split("_");switch(c){case e.line.ROOT:case e.line.ROOTS:case e.line.CENTER:case e.line.BOTTOM:case e.line.NOLINE:d[0]=
+i.makeNodeLineClassEx(b)+c;break;case e.folder.OPEN:case e.folder.CLOSE:case e.folder.DOCU:d[1]=c}a.attr("class",d.join("_"));c!==e.folder.DOCU?a.removeAttr("disabled"):a.attr("disabled","disabled")}}},selectNode:function(b,a,c){c||i.cancelPreSelectedNode(b,null,a);k(a,e.id.A,b).addClass(e.node.CURSELECTED);h.addSelectedNode(b,a);b.treeObj.trigger(e.event.SELECTED,[m,b.treeId,a])},setNodeFontCss:function(b,a){var c=k(a,e.id.A,b),d=i.makeNodeFontCss(b,a);d&&c.css(d)},setNodeLineIcos:function(b,a){if(a){var c=
+k(a,e.id.SWITCH,b),d=k(a,e.id.UL,b),f=k(a,e.id.ICON,b),g=i.makeUlLineClass(b,a);g.length==0?d.removeClass(e.line.LINE):d.addClass(g);c.attr("class",i.makeNodeLineClass(b,a));a.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled");f.removeAttr("style");f.attr("style",i.makeNodeIcoStyle(b,a));f.attr("class",i.makeNodeIcoClass(b,a))}},setNodeName:function(b,a){var c=h.getNodeTitle(b,a),d=k(a,e.id.SPAN,b);d.empty();b.view.nameIsHTML?d.html(h.getNodeName(b,a)):d.text(h.getNodeName(b,a));j.apply(b.view.showTitle,
+[b.treeId,a],b.view.showTitle)&&k(a,e.id.A,b).attr("title",!c?"":c)},setNodeTarget:function(b,a){k(a,e.id.A,b).attr("target",i.makeNodeTarget(a))},setNodeUrl:function(b,a){var c=k(a,e.id.A,b),d=i.makeNodeUrl(b,a);d==null||d.length==0?c.removeAttr("href"):c.attr("href",d)},switchNode:function(b,a){a.open||!j.canAsync(b,a)?i.expandCollapseNode(b,a,!a.open):b.async.enable?i.asyncNode(b,a)||i.expandCollapseNode(b,a,!a.open):a&&i.expandCollapseNode(b,a,!a.open)}};p.fn.zTree={consts:{className:{BUTTON:"button",
+LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch"},event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove",SELECTED:"ztree_selected",UNSELECTED:"ztree_unselected"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",
+DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_z:{tools:j,view:i,event:m,data:h},getZTreeObj:function(b){return(b=h.getZTreeTools(b))?b:null},destroy:function(b){if(b&&b.length>0)i.destroy(h.getSetting(b));else for(var a in r)i.destroy(r[a])},init:function(b,a,c){var d=j.clone(M);p.extend(!0,d,a);d.treeId=b.attr("id");d.treeObj=b;d.treeObj.empty();r[d.treeId]=d;if(typeof document.body.style.maxHeight==="undefined")d.view.expandSpeed="";h.initRoot(d);b=h.getRoot(d);a=d.data.key.children;c=c?j.clone(j.isArray(c)?
+c:[c]):[];b[a]=d.data.simpleData.enable?h.transformTozTreeFormat(d,c):c;h.initCache(d);m.unbindTree(d);m.bindTree(d);m.unbindEvent(d);m.bindEvent(d);c={setting:d,addNodes:function(a,b,c){function e(){i.addNodes(d,a,h,c==!0)}if(!b)return null;a||(a=null);if(a&&!a.isParent&&d.data.keep.leaf)return null;var h=j.clone(j.isArray(b)?b:[b]);j.canAsync(d,a)?i.asyncNode(d,a,c,e):e();return h},cancelSelectedNode:function(a){i.cancelPreSelectedNode(d,a)},destroy:function(){i.destroy(d)},expandAll:function(a){a=
+!!a;i.expandCollapseSonNode(d,null,a,!0);return a},expandNode:function(a,b,c,e,m){if(!a||!a.isParent)return null;b!==!0&&b!==!1&&(b=!a.open);if((m=!!m)&&b&&j.apply(d.callback.beforeExpand,[d.treeId,a],!0)==!1)return null;else if(m&&!b&&j.apply(d.callback.beforeCollapse,[d.treeId,a],!0)==!1)return null;b&&a.parentTId&&i.expandCollapseParentNode(d,a.getParentNode(),b,!1);if(b===a.open&&!c)return null;h.getRoot(d).expandTriggerFlag=m;if(!j.canAsync(d,a)&&c)i.expandCollapseSonNode(d,a,b,!0,function(){if(e!==
+!1)try{k(a,d).focus().blur()}catch(b){}});else if(a.open=!b,i.switchNode(this.setting,a),e!==!1)try{k(a,d).focus().blur()}catch(p){}return b},getNodes:function(){return h.getNodes(d)},getNodeByParam:function(a,b,c){return!a?null:h.getNodeByParam(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodeByTId:function(a){return h.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return!a?null:h.getNodesByParam(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodesByParamFuzzy:function(a,b,c){return!a?
+null:h.getNodesByParamFuzzy(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodesByFilter:function(a,b,c,e){b=!!b;return!a||typeof a!="function"?b?null:[]:h.getNodesByFilter(d,c?c[d.data.key.children]:h.getNodes(d),a,b,e)},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():h.getRoot(d),e=0,i=c[b].length;e<i;e++)if(c[b][e]==a)return e;return-1},getSelectedNodes:function(){for(var a=[],b=h.getRoot(d).curSelectedList,c=0,e=b.length;c<e;c++)a.push(b[c]);
+return a},isSelectedNode:function(a){return h.isSelectedNode(d,a)},reAsyncChildNodes:function(a,b,c){if(this.setting.async.enable){var j=!a;j&&(a=h.getRoot(d));if(b=="refresh"){for(var b=this.setting.data.key.children,m=0,p=a[b]?a[b].length:0;m<p;m++)h.removeNodeCache(d,a[b][m]);h.removeSelectedNode(d);a[b]=[];j?this.setting.treeObj.empty():k(a,e.id.UL,d).empty()}i.asyncNode(this.setting,j?null:a,!!c)}},refresh:function(){this.setting.treeObj.empty();var a=h.getRoot(d),b=a[d.data.key.children];h.initRoot(d);
+a[d.data.key.children]=b;h.initCache(d);i.createNodes(d,0,a[d.data.key.children])},removeChildNodes:function(a){if(!a)return null;var b=a[d.data.key.children];i.removeChildNodes(d,a);return b?b:null},removeNode:function(a,b){a&&(b=!!b,b&&j.apply(d.callback.beforeRemove,[d.treeId,a],!0)==!1||(i.removeNode(d,a),b&&this.setting.treeObj.trigger(e.event.REMOVE,[d.treeId,a])))},selectNode:function(a,b){if(a&&j.uCanDo(d)){b=d.view.selectedMulti&&b;if(a.parentTId)i.expandCollapseParentNode(d,a.getParentNode(),
+!0,!1,function(){try{k(a,d).focus().blur()}catch(b){}});else try{k(a,d).focus().blur()}catch(c){}i.selectNode(d,a,b)}},transformTozTreeNodes:function(a){return h.transformTozTreeFormat(d,a)},transformToArray:function(a){return h.transformToArrayFormat(d,a)},updateNode:function(a){a&&k(a,d).get(0)&&j.uCanDo(d)&&(i.setNodeName(d,a),i.setNodeTarget(d,a),i.setNodeUrl(d,a),i.setNodeLineIcos(d,a),i.setNodeFontCss(d,a))}};b.treeTools=c;h.setZTreeTools(d,c);b[a]&&b[a].length>0?i.createNodes(d,0,b[a]):d.async.enable&&
+d.async.url&&d.async.url!==""&&i.asyncNode(d);return c}};var N=p.fn.zTree,k=j.$,e=N.consts})(jQuery);
diff --git a/common/src/main/webapp/framework/browser/thirdparty/js/jquery_1.12.4.min.js b/common/src/main/webapp/framework/browser/thirdparty/js/jquery_1.12.4.min.js
new file mode 100644
index 0000000..bfe47d6
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/js/jquery_1.12.4.min.js
@@ -0,0 +1,5 @@
+/*! jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license */
+!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 id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",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;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=la(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=ma(b);function pa(){}pa.prototype=d.filters=d.pseudos,d.setFilters=new pa,g=fa.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=R.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=S.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(Q," ")}),h=h.slice(c.length));for(g in d.filter)!(e=W[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fa.error(a):z(a,i).slice(0)};function qa(a){for(var b=0,c=a.length,d="";c>b;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 href='#'></a>","#"===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="<input/>",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<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){n.each(b,function(b,c){n.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==n.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return n.each(arguments,function(a,b){var c;while((c=n.inArray(b,f,c))>-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;
+}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.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}}),function(){var a;l.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,e;return 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="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(d.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(e),a):void 0}}();var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),V=["Top","Right","Bottom","Left"],W=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function X(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNumber[b]||"px"!==j&&+i)&&U.exec(n.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,n.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var Y=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)Y(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;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=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",l.leadingWhitespace=3===a.firstChild.nodeType,l.tbody=!a.getElementsByTagName("tbody").length,l.htmlSerialize=!!a.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==d.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,b.appendChild(c),l.appendChecked=c.checked,a.innerHTML="<textarea>x</textarea>",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,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};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=/<tbody/i;function ia(a){Z.test(a.type)&&(a.defaultChecked=a.checked)}function ja(a,b,c,d,e){for(var f,g,h,i,j,k,m,o=a.length,p=ca(b),q=[],r=0;o>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)?"<table>"!==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<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,e,f=a.type,g=a,h=this.fixHooks[f];h||(this.fixHooks[f]=h=ma.test(f)?this.mouseHooks:la.test(f)?this.keyHooks:{}),e=h.props?this.props.concat(h.props):this.props,a=new n.Event(g),b=e.length;while(b--)c=e[b],a[c]=g[c];return a.target||(a.target=g.srcElement||d),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,h.filter?h.filter(a,g):a},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,e,f,g=b.button,h=b.fromElement;return null==a.pageX&&null!=b.clientX&&(e=a.target.ownerDocument||d,f=e.documentElement,c=e.body,a.pageX=b.clientX+(f&&f.scrollLeft||c&&c.scrollLeft||0)-(f&&f.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(f&&f.scrollTop||c&&c.scrollTop||0)-(f&&f.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&h&&(a.relatedTarget=h===a.target?b.toElement:h),a.which||void 0===g||(a.which=1&g?1:2&g?3:4&g?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ra()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ra()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c){var d=n.extend(new n.Event,c,{type:a,isSimulated:!0});n.event.trigger(d,null,b),d.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=d.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)}:function(a,b,c){var d="on"+b;a.detachEvent&&("undefined"==typeof a[d]&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?pa:qa):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={constructor:n.Event,isDefaultPrevented:qa,isPropagationStopped:qa,isImmediatePropagationStopped:qa,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=pa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=pa,a&&!this.isSimulated&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=pa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||n.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submit||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?n.prop(b,"form"):void 0;c&&!n._data(c,"submit")&&(n.event.add(c,"submit._submit",function(a){a._submitBubble=!0}),n._data(c,"submit",!0))})},postDispatch:function(a){a._submitBubble&&(delete a._submitBubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.change||(n.event.special.change={setup:function(){return ka.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._justChanged=!0)}),n.event.add(this,"click._change",function(a){this._justChanged&&!a.isTrigger&&(this._justChanged=!1),n.event.simulate("change",this,a)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;ka.test(b.nodeName)&&!n._data(b,"change")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a)}),n._data(b,"change",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!ka.test(this.nodeName)}}),l.focusin||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a))};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d){return sa(this,a,b,c,d)},one:function(a,b,c,d){return sa(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=qa),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ta=/ jQuery\d+="(?:null|\d+)"/g,ua=new RegExp("<(?:"+ba+")[\\s/>]","i"),va=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,wa=/<script|<style|<link/i,xa=/checked\s*(?:[^=]|=\s*.checked.)/i,ya=/^true\/(.*)/,za=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\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></$2>")},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("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ja[0].contentWindow||Ja[0].contentDocument).document,b.write(),b.close(),c=La(a,b),Ja.detach()),Ka[a]=c),c}var Na=/^margin/,Oa=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Pa=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},Qa=d.documentElement;!function(){var b,c,e,f,g,h,i=d.createElement("div"),j=d.createElement("div");if(j.style){j.style.cssText="float:left;opacity:.5",l.opacity="0.5"===j.style.opacity,l.cssFloat=!!j.style.cssFloat,j.style.backgroundClip="content-box",j.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===j.style.backgroundClip,i=d.createElement("div"),i.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",j.innerHTML="",i.appendChild(j),l.boxSizing=""===j.style.boxSizing||""===j.style.MozBoxSizing||""===j.style.WebkitBoxSizing,n.extend(l,{reliableHiddenOffsets:function(){return null==b&&k(),f},boxSizingReliable:function(){return null==b&&k(),e},pixelMarginRight:function(){return null==b&&k(),c},pixelPosition:function(){return null==b&&k(),b},reliableMarginRight:function(){return null==b&&k(),g},reliableMarginLeft:function(){return null==b&&k(),h}});function k(){var k,l,m=d.documentElement;m.appendChild(i),j.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",b=e=h=!1,c=g=!0,a.getComputedStyle&&(l=a.getComputedStyle(j),b="1%"!==(l||{}).top,h="2px"===(l||{}).marginLeft,e="4px"===(l||{width:"4px"}).width,j.style.marginRight="50%",c="4px"===(l||{marginRight:"4px"}).marginRight,k=j.appendChild(d.createElement("div")),k.style.cssText=j.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",k.style.marginRight=k.style.width="0",j.style.width="1px",g=!parseFloat((a.getComputedStyle(k)||{}).marginRight),j.removeChild(k)),j.style.display="none",f=0===j.getClientRects().length,f&&(j.style.display="",j.innerHTML="<table><tr><td></td><td>t</td></tr></table>",j.childNodes[0].style.borderCollapse="separate",k=j.getElementsByTagName("td"),k[0].style.cssText="margin:0;border:0;padding:0;display:none",f=0===k[0].offsetHeight,f&&(k[0].style.display="",k[1].style.display="none",f=0===k[0].offsetHeight)),m.removeChild(i)}}}();var Ra,Sa,Ta=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ra=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c.getPropertyValue(b)||c[b]:void 0,""!==g&&void 0!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),c&&!l.pixelMarginRight()&&Oa.test(g)&&Na.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f),void 0===g?g:g+""}):Qa.currentStyle&&(Ra=function(a){return a.currentStyle},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Oa.test(g)&&!Ta.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Ua(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Va=/alpha\([^)]*\)/i,Wa=/opacity\s*=\s*([^)]*)/i,Xa=/^(none|table(?!-c[ea]).+)/,Ya=new RegExp("^("+T+")(.*)$","i"),Za={position:"absolute",visibility:"hidden",display:"block"},$a={letterSpacing:"0",fontWeight:"400"},_a=["Webkit","O","Moz","ms"],ab=d.createElement("div").style;function bb(a){if(a in ab)return a;var b=a.charAt(0).toUpperCase()+a.slice(1),c=_a.length;while(c--)if(a=_a[c]+b,a in ab)return a}function cb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&W(d)&&(f[g]=n._data(d,"olddisplay",Ma(d.nodeName)))):(e=W(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function db(a,b,c){var d=Ya.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function eb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+V[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+V[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+V[f]+"Width",!0,e))):(g+=n.css(a,"padding"+V[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+V[f]+"Width",!0,e)));return g}function fb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ra(a),g=l.boxSizing&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Sa(a,b,f),(0>e||null==e)&&(e=a.style[b]),Oa.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+eb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Sa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=U.exec(c))&&e[1]&&(c=X(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(n.cssNumber[h]?"":"px")),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Sa(a,b,d)),"normal"===f&&b in $a&&(f=$a[b]),""===c||c?(e=parseFloat(f),c===!0||isFinite(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?Xa.test(n.css(a,"display"))&&0===a.offsetWidth?Pa(a,Za,function(){return fb(a,b,d)}):fb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ra(a);return db(a,c,d?eb(a,b,d,l.boxSizing&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Wa.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Va,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Va.test(f)?f.replace(Va,e):f+" "+e)}}),n.cssHooks.marginRight=Ua(l.reliableMarginRight,function(a,b){return b?Pa(a,{display:"inline-block"},Sa,[a,"marginRight"]):void 0}),n.cssHooks.marginLeft=Ua(l.reliableMarginLeft,function(a,b){return b?(parseFloat(Sa(a,"marginLeft"))||(n.contains(a.ownerDocument,a)?a.getBoundingClientRect().left-Pa(a,{
+ marginLeft:0},function(){return a.getBoundingClientRect().left}):0))+"px":void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+V[d]+b]=f[d]||f[d-2]||f[0];return e}},Na.test(a)||(n.cssHooks[a+b].set=db)}),n.fn.extend({css:function(a,b){return Y(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Ra(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return cb(this,!0)},hide:function(){return cb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){W(this)?n(this).show():n(this).hide()})}});function gb(a,b,c,d,e){return new gb.prototype.init(a,b,c,d,e)}n.Tween=gb,gb.prototype={constructor:gb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||n.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=gb.propHooks[this.prop];return a&&a.get?a.get(this):gb.propHooks._default.get(this)},run:function(a){var b,c=gb.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):gb.propHooks._default.set(this),this}},gb.prototype.init.prototype=gb.prototype,gb.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[n.cssProps[a.prop]]&&!n.cssHooks[a.prop]?a.elem[a.prop]=a.now:n.style(a.elem,a.prop,a.now+a.unit)}}},gb.propHooks.scrollTop=gb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},n.fx=gb.prototype.init,n.fx.step={};var hb,ib,jb=/^(?:toggle|show|hide)$/,kb=/queueHooks$/;function lb(){return a.setTimeout(function(){hb=void 0}),hb=n.now()}function mb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=V[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function nb(a,b,c){for(var d,e=(qb.tweeners[b]||[]).concat(qb.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ob(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&W(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k="none"===j?n._data(a,"olddisplay")||Ma(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==Ma(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],jb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(o))"inline"===("none"===j?Ma(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=nb(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function pb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function qb(a,b,c){var d,e,f=0,g=qb.prefilters.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=hb||lb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{},easing:n.easing._default},c),originalProperties:b,originalOptions:c,startTime:hb||lb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(pb(k,j.opts.specialEasing);g>f;f++)if(d=qb.prefilters[f].call(j,a,k,j.opts))return n.isFunction(d.stop)&&(n._queueHooks(j.elem,j.opts.queue).stop=n.proxy(d.stop,d)),d;return n.map(k,nb,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(qb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return X(c.elem,a,U.exec(b),c),c}]},tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.match(G);for(var c,d=0,e=a.length;e>d;d++)c=a[d],qb.tweeners[c]=qb.tweeners[c]||[],qb.tweeners[c].unshift(b)},prefilters:[ob],prefilter:function(a,b){b?qb.prefilters.unshift(a):qb.prefilters.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(W).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=qb(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&kb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(mb(b,!0),a,d,e)}}),n.each({slideDown:mb("show"),slideUp:mb("hide"),slideToggle:mb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(hb=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),hb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ib||(ib=a.setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){a.clearInterval(ib),ib=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(b,c){return b=n.fx?n.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a,b=d.createElement("input"),c=d.createElement("div"),e=d.createElement("select"),f=e.appendChild(d.createElement("option"));c=d.createElement("div"),c.setAttribute("className","t"),c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],b.setAttribute("type","checkbox"),c.appendChild(b),a=c.getElementsByTagName("a")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==c.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=f.selected,l.enctype=!!d.createElement("form").enctype,e.disabled=!0,l.optDisabled=!f.disabled,b=d.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value}();var rb=/\r/g,sb=/[\x20\t\r\n\f]+/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a)).replace(sb," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&(l.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>-1)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>-1:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var tb,ub,vb=n.expr.attrHandle,wb=/^(?:checked|selected)$/i,xb=l.getSetAttribute,yb=l.input;n.fn.extend({attr:function(a,b){return Y(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),e=n.attrHooks[b]||(n.expr.match.bool.test(b)?ub:tb)),void 0!==c?null===c?void n.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=n.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(G);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?yb&&xb||!wb.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(xb?c:d)}}),ub={set:function(a,b,c){return b===!1?n.removeAttr(a,c):yb&&xb||!wb.test(c)?a.setAttribute(!xb&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=vb[b]||n.find.attr;yb&&xb||!wb.test(b)?vb[b]=function(a,b,d){var e,f;return d||(f=vb[b],vb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,vb[b]=f),e}:vb[b]=function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),yb&&xb||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):tb&&tb.set(a,b,c)}}),xb||(tb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},vb.id=vb.name=vb.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:tb.set},n.attrHooks.contenteditable={set:function(a,b,c){tb.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var zb=/^(?:input|select|textarea|button|object)$/i,Ab=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return Y(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&n.isXMLDoc(a)||(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):zb.test(a.nodeName)||Ab.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var Bb=/[\t\r\n\f]/g;function Cb(a){return n.attr(a,"class")||""}n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,Cb(this)))});if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Cb(c),d=1===c.nodeType&&(" "+e+" ").replace(Bb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,Cb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Cb(c),d=1===c.nodeType&&(" "+e+" ").replace(Bb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,Cb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=n(this),f=a.match(G)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=Cb(this),b&&n._data(this,"__className__",b),n.attr(this,"class",b||a===!1?"":n._data(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+Cb(c)+" ").replace(Bb," ").indexOf(b)>-1)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Db=a.location,Eb=n.now(),Fb=/\?/,Gb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(Gb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new a.DOMParser,c=d.parseFromString(b,"text/xml")):(c=new a.ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var Hb=/#.*$/,Ib=/([?&])_=[^&]*/,Jb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Kb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Lb=/^(?:GET|HEAD)$/,Mb=/^\/\//,Nb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ob={},Pb={},Qb="*/".concat("*"),Rb=Db.href,Sb=Nb.exec(Rb.toLowerCase())||[];function Tb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(G)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Ub(a,b,c,d){var e={},f=a===Pb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Vb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Wb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Xb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Rb,type:"GET",isLocal:Kb.test(Sb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Vb(Vb(a,n.ajaxSettings),b):Vb(n.ajaxSettings,a)},ajaxPrefilter:Tb(Ob),ajaxTransport:Tb(Pb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var d,e,f,g,h,i,j,k,l=n.ajaxSetup({},c),m=l.context||l,o=l.context&&(m.nodeType||m.jquery)?n(m):n.event,p=n.Deferred(),q=n.Callbacks("once memory"),r=l.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!k){k={};while(b=Jb.exec(g))k[b[1].toLowerCase()]=b[2]}b=k[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(l.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>u)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return j&&j.abort(b),y(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,l.url=((b||l.url||Rb)+"").replace(Hb,"").replace(Mb,Sb[1]+"//"),l.type=c.method||c.type||l.method||l.type,l.dataTypes=n.trim(l.dataType||"*").toLowerCase().match(G)||[""],null==l.crossDomain&&(d=Nb.exec(l.url.toLowerCase()),l.crossDomain=!(!d||d[1]===Sb[1]&&d[2]===Sb[2]&&(d[3]||("http:"===d[1]?"80":"443"))===(Sb[3]||("http:"===Sb[1]?"80":"443")))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=n.param(l.data,l.traditional)),Ub(Ob,l,c,w),2===u)return w;i=n.event&&l.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!Lb.test(l.type),f=l.url,l.hasContent||(l.data&&(f=l.url+=(Fb.test(f)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=Ib.test(f)?f.replace(Ib,"$1_="+Eb++):f+(Fb.test(f)?"&":"?")+"_="+Eb++)),l.ifModified&&(n.lastModified[f]&&w.setRequestHeader("If-Modified-Since",n.lastModified[f]),n.etag[f]&&w.setRequestHeader("If-None-Match",n.etag[f])),(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",l.contentType),w.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+Qb+"; q=0.01":""):l.accepts["*"]);for(e in l.headers)w.setRequestHeader(e,l.headers[e]);if(l.beforeSend&&(l.beforeSend.call(m,w,l)===!1||2===u))return w.abort();v="abort";for(e in{success:1,error:1,complete:1})w[e](l[e]);if(j=Ub(Pb,l,c,w)){if(w.readyState=1,i&&o.trigger("ajaxSend",[w,l]),2===u)return w;l.async&&l.timeout>0&&(h=a.setTimeout(function(){w.abort("timeout")},l.timeout));try{u=1,j.send(s,y)}catch(x){if(!(2>u))throw x;y(-1,x)}}else y(-1,"No Transport");function y(b,c,d,e){var k,s,t,v,x,y=c;2!==u&&(u=2,h&&a.clearTimeout(h),j=void 0,g=e||"",w.readyState=b>0?4:0,k=b>=200&&300>b||304===b,d&&(v=Wb(l,w,d)),v=Xb(l,v,w,k),k?(l.ifModified&&(x=w.getResponseHeader("Last-Modified"),x&&(n.lastModified[f]=x),x=w.getResponseHeader("etag"),x&&(n.etag[f]=x)),204===b||"HEAD"===l.type?y="nocontent":304===b?y="notmodified":(y=v.state,s=v.data,t=v.error,k=!t)):(t=y,!b&&y||(y="error",0>b&&(b=0))),w.status=b,w.statusText=(c||y)+"",k?p.resolveWith(m,[s,y,w]):p.rejectWith(m,[w,y,t]),w.statusCode(r),r=void 0,i&&o.trigger(k?"ajaxSuccess":"ajaxError",[w,l,k?s:t]),q.fireWith(m,[w,y]),i&&(o.trigger("ajaxComplete",[w,l]),--n.active||n.event.trigger("ajaxStop")))}return w},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax(n.extend({url:a,type:b,dataType:e,data:c,success:d},n.isPlainObject(a)&&a))}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return n.isFunction(a)?this.each(function(b){n(this).wrapInner(a.call(this,b))}):this.each(function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}});function Yb(a){return a.style&&a.style.display||n.css(a,"display")}function Zb(a){if(!n.contains(a.ownerDocument||d,a))return!0;while(a&&1===a.nodeType){if("none"===Yb(a)||"hidden"===a.type)return!0;a=a.parentNode}return!1}n.expr.filters.hidden=function(a){return l.reliableHiddenOffsets()?a.offsetWidth<=0&&a.offsetHeight<=0&&!a.getClientRects().length:Zb(a)},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var $b=/%20/g,_b=/\[\]$/,ac=/\r?\n/g,bc=/^(?:submit|button|image|reset|file)$/i,cc=/^(?:input|select|textarea|keygen)/i;function dc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||_b.test(a)?d(a,e):dc(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)dc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)dc(c,a[c],b,e);return d.join("&").replace($b,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&cc.test(this.nodeName)&&!bc.test(a)&&(this.checked||!Z.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(ac,"\r\n")}}):{name:b.name,value:c.replace(ac,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return this.isLocal?ic():d.documentMode>8?hc():/^(get|post|head|put|delete|options)$/i.test(this.type)&&hc()||ic()}:hc;var ec=0,fc={},gc=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in fc)fc[a](void 0,!0)}),l.cors=!!gc&&"withCredentials"in gc,gc=l.ajax=!!gc,gc&&n.ajaxTransport(function(b){if(!b.crossDomain||l.cors){var c;return{send:function(d,e){var f,g=b.xhr(),h=++ec;if(g.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(f in b.xhrFields)g[f]=b.xhrFields[f];b.mimeType&&g.overrideMimeType&&g.overrideMimeType(b.mimeType),b.crossDomain||d["X-Requested-With"]||(d["X-Requested-With"]="XMLHttpRequest");for(f in d)void 0!==d[f]&&g.setRequestHeader(f,d[f]+"");g.send(b.hasContent&&b.data||null),c=function(a,d){var f,i,j;if(c&&(d||4===g.readyState))if(delete fc[h],c=void 0,g.onreadystatechange=n.noop,d)4!==g.readyState&&g.abort();else{j={},f=g.status,"string"==typeof g.responseText&&(j.text=g.responseText);try{i=g.statusText}catch(k){i=""}f||!b.isLocal||b.crossDomain?1223===f&&(f=204):f=j.text?200:404}j&&e(f,i,j,g.getAllResponseHeaders())},b.async?4===g.readyState?a.setTimeout(c):g.onreadystatechange=fc[h]=c:c()},abort:function(){c&&c(void 0,!0)}}}});function hc(){try{return new a.XMLHttpRequest}catch(b){}}function ic(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=d.head||n("head")[0]||d.documentElement;return{send:function(e,f){b=d.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||f(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var jc=[],kc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=jc.pop()||n.expando+"_"+Eb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(kc.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&kc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(kc,"$1"+e):b.jsonp!==!1&&(b.url+=(Fb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?n(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,jc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||d;var e=x.exec(a),f=!c&&[];return e?[b.createElement(e[1])]:(e=ja([a],b,f),f&&f.length&&n(f).remove(),n.merge([],e.childNodes))};var lc=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&lc)return lc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=n.trim(a.slice(h,a.length)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};function mc(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,n.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?("undefined"!=typeof e.getBoundingClientRect&&(d=e.getBoundingClientRect()),c=mc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Qa})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return Y(this,function(a,d,e){var f=mc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Ua(l.pixelPosition,function(a,c){return c?(c=Sa(a,b),Oa.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({
+ padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return Y(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var nc=a.jQuery,oc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=oc),b&&a.jQuery===n&&(a.jQuery=nc),n},b||(a.jQuery=a.$=n),n}); \ No newline at end of file
diff --git a/common/src/main/webapp/framework/browser/thirdparty/js/mustache.js b/common/src/main/webapp/framework/browser/thirdparty/js/mustache.js
new file mode 100644
index 0000000..d55bcce
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/js/mustache.js
@@ -0,0 +1,630 @@
+/*!
+ * mustache.js - Logic-less {{mustache}} templates with JavaScript
+ * http://github.com/janl/mustache.js
+ */
+
+/*global define: false Mustache: true*/
+
+(function defineMustache (global, factory) {
+ if (typeof exports === 'object' && exports && typeof exports.nodeName !== 'string') {
+ factory(exports); // CommonJS
+ } else if (typeof define === 'function' && define.amd) {
+ define(['exports'], factory); // AMD
+ } else {
+ global.Mustache = {};
+ factory(global.Mustache); // script, wsh, asp
+ }
+}(this, function mustacheFactory (mustache) {
+
+ var objectToString = Object.prototype.toString;
+ var isArray = Array.isArray || function isArrayPolyfill (object) {
+ return objectToString.call(object) === '[object Array]';
+ };
+
+ function isFunction (object) {
+ return typeof object === 'function';
+ }
+
+ /**
+ * More correct typeof string handling array
+ * which normally returns typeof 'object'
+ */
+ function typeStr (obj) {
+ return isArray(obj) ? 'array' : typeof obj;
+ }
+
+ function escapeRegExp (string) {
+ return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&');
+ }
+
+ /**
+ * Null safe way of checking whether or not an object,
+ * including its prototype, has a given property
+ */
+ function hasProperty (obj, propName) {
+ return obj != null && typeof obj === 'object' && (propName in obj);
+ }
+
+ // Workaround for https://issues.apache.org/jira/browse/COUCHDB-577
+ // See https://github.com/janl/mustache.js/issues/189
+ var regExpTest = RegExp.prototype.test;
+ function testRegExp (re, string) {
+ return regExpTest.call(re, string);
+ }
+
+ var nonSpaceRe = /\S/;
+ function isWhitespace (string) {
+ return !testRegExp(nonSpaceRe, string);
+ }
+
+ var entityMap = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#39;',
+ '/': '&#x2F;',
+ '`': '&#x60;',
+ '=': '&#x3D;'
+ };
+
+ function escapeHtml (string) {
+ return String(string).replace(/[&<>"'`=\/]/g, function fromEntityMap (s) {
+ return entityMap[s];
+ });
+ }
+
+ var whiteRe = /\s*/;
+ var spaceRe = /\s+/;
+ var equalsRe = /\s*=/;
+ var curlyRe = /\s*\}/;
+ var tagRe = /#|\^|\/|>|\{|&|=|!/;
+
+ /**
+ * Breaks up the given `template` string into a tree of tokens. If the `tags`
+ * argument is given here it must be an array with two string values: the
+ * opening and closing tags used in the template (e.g. [ "<%", "%>" ]). Of
+ * course, the default is to use mustaches (i.e. mustache.tags).
+ *
+ * A token is an array with at least 4 elements. The first element is the
+ * mustache symbol that was used inside the tag, e.g. "#" or "&". If the tag
+ * did not contain a symbol (i.e. {{myValue}}) this element is "name". For
+ * all text that appears outside a symbol this element is "text".
+ *
+ * The second element of a token is its "value". For mustache tags this is
+ * whatever else was inside the tag besides the opening symbol. For text tokens
+ * this is the text itself.
+ *
+ * The third and fourth elements of the token are the start and end indices,
+ * respectively, of the token in the original template.
+ *
+ * Tokens that are the root node of a subtree contain two more elements: 1) an
+ * array of tokens in the subtree and 2) the index in the original template at
+ * which the closing tag for that section begins.
+ */
+ function parseTemplate (template, tags) {
+ if (!template)
+ return [];
+
+ var sections = []; // Stack to hold section tokens
+ var tokens = []; // Buffer to hold the tokens
+ var spaces = []; // Indices of whitespace tokens on the current line
+ var hasTag = false; // Is there a {{tag}} on the current line?
+ var nonSpace = false; // Is there a non-space char on the current line?
+
+ // Strips all whitespace tokens array for the current line
+ // if there was a {{#tag}} on it and otherwise only space.
+ function stripSpace () {
+ if (hasTag && !nonSpace) {
+ while (spaces.length)
+ delete tokens[spaces.pop()];
+ } else {
+ spaces = [];
+ }
+
+ hasTag = false;
+ nonSpace = false;
+ }
+
+ var openingTagRe, closingTagRe, closingCurlyRe;
+ function compileTags (tagsToCompile) {
+ if (typeof tagsToCompile === 'string')
+ tagsToCompile = tagsToCompile.split(spaceRe, 2);
+
+ if (!isArray(tagsToCompile) || tagsToCompile.length !== 2)
+ throw new Error('Invalid tags: ' + tagsToCompile);
+
+ openingTagRe = new RegExp(escapeRegExp(tagsToCompile[0]) + '\\s*');
+ closingTagRe = new RegExp('\\s*' + escapeRegExp(tagsToCompile[1]));
+ closingCurlyRe = new RegExp('\\s*' + escapeRegExp('}' + tagsToCompile[1]));
+ }
+
+ compileTags(tags || mustache.tags);
+
+ var scanner = new Scanner(template);
+
+ var start, type, value, chr, token, openSection;
+ while (!scanner.eos()) {
+ start = scanner.pos;
+
+ // Match any text between tags.
+ value = scanner.scanUntil(openingTagRe);
+
+ if (value) {
+ for (var i = 0, valueLength = value.length; i < valueLength; ++i) {
+ chr = value.charAt(i);
+
+ if (isWhitespace(chr)) {
+ spaces.push(tokens.length);
+ } else {
+ nonSpace = true;
+ }
+
+ tokens.push([ 'text', chr, start, start + 1 ]);
+ start += 1;
+
+ // Check for whitespace on the current line.
+ if (chr === '\n')
+ stripSpace();
+ }
+ }
+
+ // Match the opening tag.
+ if (!scanner.scan(openingTagRe))
+ break;
+
+ hasTag = true;
+
+ // Get the tag type.
+ type = scanner.scan(tagRe) || 'name';
+ scanner.scan(whiteRe);
+
+ // Get the tag value.
+ if (type === '=') {
+ value = scanner.scanUntil(equalsRe);
+ scanner.scan(equalsRe);
+ scanner.scanUntil(closingTagRe);
+ } else if (type === '{') {
+ value = scanner.scanUntil(closingCurlyRe);
+ scanner.scan(curlyRe);
+ scanner.scanUntil(closingTagRe);
+ type = '&';
+ } else {
+ value = scanner.scanUntil(closingTagRe);
+ }
+
+ // Match the closing tag.
+ if (!scanner.scan(closingTagRe))
+ throw new Error('Unclosed tag at ' + scanner.pos);
+
+ token = [ type, value, start, scanner.pos ];
+ tokens.push(token);
+
+ if (type === '#' || type === '^') {
+ sections.push(token);
+ } else if (type === '/') {
+ // Check section nesting.
+ openSection = sections.pop();
+
+ if (!openSection)
+ throw new Error('Unopened section "' + value + '" at ' + start);
+
+ if (openSection[1] !== value)
+ throw new Error('Unclosed section "' + openSection[1] + '" at ' + start);
+ } else if (type === 'name' || type === '{' || type === '&') {
+ nonSpace = true;
+ } else if (type === '=') {
+ // Set the tags for the next time around.
+ compileTags(value);
+ }
+ }
+
+ // Make sure there are no open sections when we're done.
+ openSection = sections.pop();
+
+ if (openSection)
+ throw new Error('Unclosed section "' + openSection[1] + '" at ' + scanner.pos);
+
+ return nestTokens(squashTokens(tokens));
+ }
+
+ /**
+ * Combines the values of consecutive text tokens in the given `tokens` array
+ * to a single token.
+ */
+ function squashTokens (tokens) {
+ var squashedTokens = [];
+
+ var token, lastToken;
+ for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {
+ token = tokens[i];
+
+ if (token) {
+ if (token[0] === 'text' && lastToken && lastToken[0] === 'text') {
+ lastToken[1] += token[1];
+ lastToken[3] = token[3];
+ } else {
+ squashedTokens.push(token);
+ lastToken = token;
+ }
+ }
+ }
+
+ return squashedTokens;
+ }
+
+ /**
+ * Forms the given array of `tokens` into a nested tree structure where
+ * tokens that represent a section have two additional items: 1) an array of
+ * all tokens that appear in that section and 2) the index in the original
+ * template that represents the end of that section.
+ */
+ function nestTokens (tokens) {
+ var nestedTokens = [];
+ var collector = nestedTokens;
+ var sections = [];
+
+ var token, section;
+ for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {
+ token = tokens[i];
+
+ switch (token[0]) {
+ case '#':
+ case '^':
+ collector.push(token);
+ sections.push(token);
+ collector = token[4] = [];
+ break;
+ case '/':
+ section = sections.pop();
+ section[5] = token[2];
+ collector = sections.length > 0 ? sections[sections.length - 1][4] : nestedTokens;
+ break;
+ default:
+ collector.push(token);
+ }
+ }
+
+ return nestedTokens;
+ }
+
+ /**
+ * A simple string scanner that is used by the template parser to find
+ * tokens in template strings.
+ */
+ function Scanner (string) {
+ this.string = string;
+ this.tail = string;
+ this.pos = 0;
+ }
+
+ /**
+ * Returns `true` if the tail is empty (end of string).
+ */
+ Scanner.prototype.eos = function eos () {
+ return this.tail === '';
+ };
+
+ /**
+ * Tries to match the given regular expression at the current position.
+ * Returns the matched text if it can match, the empty string otherwise.
+ */
+ Scanner.prototype.scan = function scan (re) {
+ var match = this.tail.match(re);
+
+ if (!match || match.index !== 0)
+ return '';
+
+ var string = match[0];
+
+ this.tail = this.tail.substring(string.length);
+ this.pos += string.length;
+
+ return string;
+ };
+
+ /**
+ * Skips all text until the given regular expression can be matched. Returns
+ * the skipped string, which is the entire tail if no match can be made.
+ */
+ Scanner.prototype.scanUntil = function scanUntil (re) {
+ var index = this.tail.search(re), match;
+
+ switch (index) {
+ case -1:
+ match = this.tail;
+ this.tail = '';
+ break;
+ case 0:
+ match = '';
+ break;
+ default:
+ match = this.tail.substring(0, index);
+ this.tail = this.tail.substring(index);
+ }
+
+ this.pos += match.length;
+
+ return match;
+ };
+
+ /**
+ * Represents a rendering context by wrapping a view object and
+ * maintaining a reference to the parent context.
+ */
+ function Context (view, parentContext) {
+ this.view = view;
+ this.cache = { '.': this.view };
+ this.parent = parentContext;
+ }
+
+ /**
+ * Creates a new context using the given view with this context
+ * as the parent.
+ */
+ Context.prototype.push = function push (view) {
+ return new Context(view, this);
+ };
+
+ /**
+ * Returns the value of the given name in this context, traversing
+ * up the context hierarchy if the value is absent in this context's view.
+ */
+ Context.prototype.lookup = function lookup (name) {
+ var cache = this.cache;
+
+ var value;
+ if (cache.hasOwnProperty(name)) {
+ value = cache[name];
+ } else {
+ var context = this, names, index, lookupHit = false;
+
+ while (context) {
+ if (name.indexOf('.') > 0) {
+ value = context.view;
+ names = name.split('.');
+ index = 0;
+
+ /**
+ * Using the dot notion path in `name`, we descend through the
+ * nested objects.
+ *
+ * To be certain that the lookup has been successful, we have to
+ * check if the last object in the path actually has the property
+ * we are looking for. We store the result in `lookupHit`.
+ *
+ * This is specially necessary for when the value has been set to
+ * `undefined` and we want to avoid looking up parent contexts.
+ **/
+ while (value != null && index < names.length) {
+ if (index === names.length - 1)
+ lookupHit = hasProperty(value, names[index]);
+
+ value = value[names[index++]];
+ }
+ } else {
+ value = context.view[name];
+ lookupHit = hasProperty(context.view, name);
+ }
+
+ if (lookupHit)
+ break;
+
+ context = context.parent;
+ }
+
+ cache[name] = value;
+ }
+
+ if (isFunction(value))
+ value = value.call(this.view);
+
+ return value;
+ };
+
+ /**
+ * A Writer knows how to take a stream of tokens and render them to a
+ * string, given a context. It also maintains a cache of templates to
+ * avoid the need to parse the same template twice.
+ */
+ function Writer () {
+ this.cache = {};
+ }
+
+ /**
+ * Clears all cached templates in this writer.
+ */
+ Writer.prototype.clearCache = function clearCache () {
+ this.cache = {};
+ };
+
+ /**
+ * Parses and caches the given `template` and returns the array of tokens
+ * that is generated from the parse.
+ */
+ Writer.prototype.parse = function parse (template, tags) {
+ var cache = this.cache;
+ var tokens = cache[template];
+
+ if (tokens == null)
+ tokens = cache[template] = parseTemplate(template, tags);
+
+ return tokens;
+ };
+
+ /**
+ * High-level method that is used to render the given `template` with
+ * the given `view`.
+ *
+ * The optional `partials` argument may be an object that contains the
+ * names and templates of partials that are used in the template. It may
+ * also be a function that is used to load partial templates on the fly
+ * that takes a single argument: the name of the partial.
+ */
+ Writer.prototype.render = function render (template, view, partials) {
+ var tokens = this.parse(template);
+ var context = (view instanceof Context) ? view : new Context(view);
+ return this.renderTokens(tokens, context, partials, template);
+ };
+
+ /**
+ * Low-level method that renders the given array of `tokens` using
+ * the given `context` and `partials`.
+ *
+ * Note: The `originalTemplate` is only ever used to extract the portion
+ * of the original template that was contained in a higher-order section.
+ * If the template doesn't use higher-order sections, this argument may
+ * be omitted.
+ */
+ Writer.prototype.renderTokens = function renderTokens (tokens, context, partials, originalTemplate) {
+ var buffer = '';
+
+ var token, symbol, value;
+ for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {
+ value = undefined;
+ token = tokens[i];
+ symbol = token[0];
+
+ if (symbol === '#') value = this.renderSection(token, context, partials, originalTemplate);
+ else if (symbol === '^') value = this.renderInverted(token, context, partials, originalTemplate);
+ else if (symbol === '>') value = this.renderPartial(token, context, partials, originalTemplate);
+ else if (symbol === '&') value = this.unescapedValue(token, context);
+ else if (symbol === 'name') value = this.escapedValue(token, context);
+ else if (symbol === 'text') value = this.rawValue(token);
+
+ if (value !== undefined)
+ buffer += value;
+ }
+
+ return buffer;
+ };
+
+ Writer.prototype.renderSection = function renderSection (token, context, partials, originalTemplate) {
+ var self = this;
+ var buffer = '';
+ var value = context.lookup(token[1]);
+
+ // This function is used to render an arbitrary template
+ // in the current context by higher-order sections.
+ function subRender (template) {
+ return self.render(template, context, partials);
+ }
+
+ if (!value) return;
+
+ if (isArray(value)) {
+ for (var j = 0, valueLength = value.length; j < valueLength; ++j) {
+ buffer += this.renderTokens(token[4], context.push(value[j]), partials, originalTemplate);
+ }
+ } else if (typeof value === 'object' || typeof value === 'string' || typeof value === 'number') {
+ buffer += this.renderTokens(token[4], context.push(value), partials, originalTemplate);
+ } else if (isFunction(value)) {
+ if (typeof originalTemplate !== 'string')
+ throw new Error('Cannot use higher-order sections without the original template');
+
+ // Extract the portion of the original template that the section contains.
+ value = value.call(context.view, originalTemplate.slice(token[3], token[5]), subRender);
+
+ if (value != null)
+ buffer += value;
+ } else {
+ buffer += this.renderTokens(token[4], context, partials, originalTemplate);
+ }
+ return buffer;
+ };
+
+ Writer.prototype.renderInverted = function renderInverted (token, context, partials, originalTemplate) {
+ var value = context.lookup(token[1]);
+
+ // Use JavaScript's definition of falsy. Include empty arrays.
+ // See https://github.com/janl/mustache.js/issues/186
+ if (!value || (isArray(value) && value.length === 0))
+ return this.renderTokens(token[4], context, partials, originalTemplate);
+ };
+
+ Writer.prototype.renderPartial = function renderPartial (token, context, partials) {
+ if (!partials) return;
+
+ var value = isFunction(partials) ? partials(token[1]) : partials[token[1]];
+ if (value != null)
+ return this.renderTokens(this.parse(value), context, partials, value);
+ };
+
+ Writer.prototype.unescapedValue = function unescapedValue (token, context) {
+ var value = context.lookup(token[1]);
+ if (value != null)
+ return value;
+ };
+
+ Writer.prototype.escapedValue = function escapedValue (token, context) {
+ var value = context.lookup(token[1]);
+ if (value != null)
+ return mustache.escape(value);
+ };
+
+ Writer.prototype.rawValue = function rawValue (token) {
+ return token[1];
+ };
+
+ mustache.name = 'mustache.js';
+ mustache.version = '2.3.0';
+ mustache.tags = [ '{{', '}}' ];
+
+ // All high-level mustache.* functions use this writer.
+ var defaultWriter = new Writer();
+
+ /**
+ * Clears all cached templates in the default writer.
+ */
+ mustache.clearCache = function clearCache () {
+ return defaultWriter.clearCache();
+ };
+
+ /**
+ * Parses and caches the given template in the default writer and returns the
+ * array of tokens it contains. Doing this ahead of time avoids the need to
+ * parse templates on the fly as they are rendered.
+ */
+ mustache.parse = function parse (template, tags) {
+ return defaultWriter.parse(template, tags);
+ };
+
+ /**
+ * Renders the `template` with the given `view` and `partials` using the
+ * default writer.
+ */
+ mustache.render = function render (template, view, partials) {
+ if (typeof template !== 'string') {
+ throw new TypeError('Invalid template! Template should be a "string" ' +
+ 'but "' + typeStr(template) + '" was given as the first ' +
+ 'argument for mustache#render(template, view, partials)');
+ }
+
+ return defaultWriter.render(template, view, partials);
+ };
+
+ // This is here for backwards compatibility with 0.4.x.,
+ /*eslint-disable */ // eslint wants camel cased function name
+ mustache.to_html = function to_html (template, view, partials, send) {
+ /*eslint-enable*/
+
+ var result = mustache.render(template, view, partials);
+
+ if (isFunction(send)) {
+ send(result);
+ } else {
+ return result;
+ }
+ };
+
+ // Export the escaping function so that the user may override it.
+ // See https://github.com/janl/mustache.js/issues/244
+ mustache.escape = escapeHtml;
+
+ // Export these mainly for testing, but also for advanced usage.
+ mustache.Scanner = Scanner;
+ mustache.Context = Context;
+ mustache.Writer = Writer;
+
+ return mustache;
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/framework/browser/thirdparty/js/tree.jquery.js b/common/src/main/webapp/framework/browser/thirdparty/js/tree.jquery.js
new file mode 100644
index 0000000..489d4e7
--- /dev/null
+++ b/common/src/main/webapp/framework/browser/thirdparty/js/tree.jquery.js
@@ -0,0 +1,3616 @@
+/*
+ JqTree 1.3.6
+
+ Copyright 2015 Marco Braak
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+ var $, DragAndDropHandler, DragElement, HitAreasGenerator, Position, VisibleNodeIterator, node_module, util,
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
+
+ node_module = require('./node');
+
+ util = require('./util');
+
+ Position = node_module.Position;
+
+ $ = jQuery;
+
+ DragAndDropHandler = (function() {
+ function DragAndDropHandler(tree_widget) {
+ this.tree_widget = tree_widget;
+ this.hovered_area = null;
+ this.$ghost = null;
+ this.hit_areas = [];
+ this.is_dragging = false;
+ this.current_item = null;
+ }
+
+ DragAndDropHandler.prototype.mouseCapture = function(position_info) {
+ var $element, node_element;
+ $element = $(position_info.target);
+ if (!this.mustCaptureElement($element)) {
+ return null;
+ }
+ if (this.tree_widget.options.onIsMoveHandle && !this.tree_widget.options.onIsMoveHandle($element)) {
+ return null;
+ }
+ node_element = this.tree_widget._getNodeElement($element);
+ if (node_element && this.tree_widget.options.onCanMove) {
+ if (!this.tree_widget.options.onCanMove(node_element.node)) {
+ node_element = null;
+ }
+ }
+ this.current_item = node_element;
+ return this.current_item !== null;
+ };
+
+ DragAndDropHandler.prototype.mouseStart = function(position_info) {
+ var node, node_name, offset;
+ this.refresh();
+ offset = $(position_info.target).offset();
+ node = this.current_item.node;
+ if (this.tree_widget.options.autoEscape) {
+ node_name = util.html_escape(node.name);
+ } else {
+ node_name = node.name;
+ }
+ this.drag_element = new DragElement(node_name, position_info.page_x - offset.left, position_info.page_y - offset.top, this.tree_widget.element);
+ this.is_dragging = true;
+ this.current_item.$element.addClass('jqtree-moving');
+ return true;
+ };
+
+ DragAndDropHandler.prototype.mouseDrag = function(position_info) {
+ var area, can_move_to;
+ this.drag_element.move(position_info.page_x, position_info.page_y);
+ area = this.findHoveredArea(position_info.page_x, position_info.page_y);
+ can_move_to = this.canMoveToArea(area);
+ if (can_move_to && area) {
+ if (!area.node.isFolder()) {
+ this.stopOpenFolderTimer();
+ }
+ if (this.hovered_area !== area) {
+ this.hovered_area = area;
+ if (this.mustOpenFolderTimer(area)) {
+ this.startOpenFolderTimer(area.node);
+ } else {
+ this.stopOpenFolderTimer();
+ }
+ this.updateDropHint();
+ }
+ } else {
+ this.removeHover();
+ this.removeDropHint();
+ this.stopOpenFolderTimer();
+ }
+ if (!area) {
+ if (this.tree_widget.options.onDragMove != null) {
+ this.tree_widget.options.onDragMove(this.current_item.node, position_info.original_event);
+ }
+ }
+ return true;
+ };
+
+ DragAndDropHandler.prototype.mustCaptureElement = function($element) {
+ return !$element.is('input,select,textarea');
+ };
+
+ DragAndDropHandler.prototype.canMoveToArea = function(area) {
+ var position_name;
+ if (!area) {
+ return false;
+ } else if (this.tree_widget.options.onCanMoveTo) {
+ position_name = Position.getName(area.position);
+ return this.tree_widget.options.onCanMoveTo(this.current_item.node, area.node, position_name);
+ } else {
+ return true;
+ }
+ };
+
+ DragAndDropHandler.prototype.mouseStop = function(position_info) {
+ var current_item;
+ this.moveItem(position_info);
+ this.clear();
+ this.removeHover();
+ this.removeDropHint();
+ this.removeHitAreas();
+ current_item = this.current_item;
+ if (this.current_item) {
+ this.current_item.$element.removeClass('jqtree-moving');
+ this.current_item = null;
+ }
+ this.is_dragging = false;
+ if (!this.hovered_area && current_item) {
+ if (this.tree_widget.options.onDragStop != null) {
+ this.tree_widget.options.onDragStop(current_item.node, position_info.original_event);
+ }
+ }
+ return false;
+ };
+
+ DragAndDropHandler.prototype.refresh = function() {
+ this.removeHitAreas();
+ if (this.current_item) {
+ this.generateHitAreas();
+ this.current_item = this.tree_widget._getNodeElementForNode(this.current_item.node);
+ if (this.is_dragging) {
+ return this.current_item.$element.addClass('jqtree-moving');
+ }
+ }
+ };
+
+ DragAndDropHandler.prototype.removeHitAreas = function() {
+ return this.hit_areas = [];
+ };
+
+ DragAndDropHandler.prototype.clear = function() {
+ this.drag_element.remove();
+ return this.drag_element = null;
+ };
+
+ DragAndDropHandler.prototype.removeDropHint = function() {
+ if (this.previous_ghost) {
+ return this.previous_ghost.remove();
+ }
+ };
+
+ DragAndDropHandler.prototype.removeHover = function() {
+ return this.hovered_area = null;
+ };
+
+ DragAndDropHandler.prototype.generateHitAreas = function() {
+ var hit_areas_generator;
+ hit_areas_generator = new HitAreasGenerator(this.tree_widget.tree, this.current_item.node, this.getTreeDimensions().bottom);
+ return this.hit_areas = hit_areas_generator.generate();
+ };
+
+ DragAndDropHandler.prototype.findHoveredArea = function(x, y) {
+ var area, dimensions, high, low, mid;
+ dimensions = this.getTreeDimensions();
+ if (x < dimensions.left || y < dimensions.top || x > dimensions.right || y > dimensions.bottom) {
+ return null;
+ }
+ low = 0;
+ high = this.hit_areas.length;
+ while (low < high) {
+ mid = (low + high) >> 1;
+ area = this.hit_areas[mid];
+ if (y < area.top) {
+ high = mid;
+ } else if (y > area.bottom) {
+ low = mid + 1;
+ } else {
+ return area;
+ }
+ }
+ return null;
+ };
+
+ DragAndDropHandler.prototype.mustOpenFolderTimer = function(area) {
+ var node;
+ node = area.node;
+ return node.isFolder() && !node.is_open && area.position === Position.INSIDE;
+ };
+
+ DragAndDropHandler.prototype.updateDropHint = function() {
+ var node_element;
+ if (!this.hovered_area) {
+ return;
+ }
+ this.removeDropHint();
+ node_element = this.tree_widget._getNodeElementForNode(this.hovered_area.node);
+ return this.previous_ghost = node_element.addDropHint(this.hovered_area.position);
+ };
+
+ DragAndDropHandler.prototype.startOpenFolderTimer = function(folder) {
+ var openFolder;
+ openFolder = (function(_this) {
+ return function() {
+ return _this.tree_widget._openNode(folder, _this.tree_widget.options.slide, function() {
+ _this.refresh();
+ return _this.updateDropHint();
+ });
+ };
+ })(this);
+ this.stopOpenFolderTimer();
+ return this.open_folder_timer = setTimeout(openFolder, this.tree_widget.options.openFolderDelay);
+ };
+
+ DragAndDropHandler.prototype.stopOpenFolderTimer = function() {
+ if (this.open_folder_timer) {
+ clearTimeout(this.open_folder_timer);
+ return this.open_folder_timer = null;
+ }
+ };
+
+ DragAndDropHandler.prototype.moveItem = function(position_info) {
+ var doMove, event, moved_node, position, previous_parent, target_node;
+ if (this.hovered_area && this.hovered_area.position !== Position.NONE && this.canMoveToArea(this.hovered_area)) {
+ moved_node = this.current_item.node;
+ target_node = this.hovered_area.node;
+ position = this.hovered_area.position;
+ previous_parent = moved_node.parent;
+ if (position === Position.INSIDE) {
+ this.hovered_area.node.is_open = true;
+ }
+ doMove = (function(_this) {
+ return function() {
+ _this.tree_widget.tree.moveNode(moved_node, target_node, position);
+ _this.tree_widget.element.empty();
+ return _this.tree_widget._refreshElements();
+ };
+ })(this);
+ event = this.tree_widget._triggerEvent('tree.move', {
+ move_info: {
+ moved_node: moved_node,
+ target_node: target_node,
+ position: Position.getName(position),
+ previous_parent: previous_parent,
+ do_move: doMove,
+ original_event: position_info.original_event
+ }
+ });
+ if (!event.isDefaultPrevented()) {
+ return doMove();
+ }
+ }
+ };
+
+ DragAndDropHandler.prototype.getTreeDimensions = function() {
+ var offset;
+ offset = this.tree_widget.element.offset();
+ return {
+ left: offset.left,
+ top: offset.top,
+ right: offset.left + this.tree_widget.element.width(),
+ bottom: offset.top + this.tree_widget.element.height() + 16
+ };
+ };
+
+ return DragAndDropHandler;
+
+ })();
+
+ VisibleNodeIterator = (function() {
+ function VisibleNodeIterator(tree) {
+ this.tree = tree;
+ }
+
+ VisibleNodeIterator.prototype.iterate = function() {
+ var _iterateNode, is_first_node;
+ is_first_node = true;
+ _iterateNode = (function(_this) {
+ return function(node, next_node) {
+ var $element, child, children_length, i, j, len, must_iterate_inside, ref;
+ must_iterate_inside = (node.is_open || !node.element) && node.hasChildren();
+ if (node.element) {
+ $element = $(node.element);
+ if (!$element.is(':visible')) {
+ return;
+ }
+ if (is_first_node) {
+ _this.handleFirstNode(node, $element);
+ is_first_node = false;
+ }
+ if (!node.hasChildren()) {
+ _this.handleNode(node, next_node, $element);
+ } else if (node.is_open) {
+ if (!_this.handleOpenFolder(node, $element)) {
+ must_iterate_inside = false;
+ }
+ } else {
+ _this.handleClosedFolder(node, next_node, $element);
+ }
+ }
+ if (must_iterate_inside) {
+ children_length = node.children.length;
+ ref = node.children;
+ for (i = j = 0, len = ref.length; j < len; i = ++j) {
+ child = ref[i];
+ if (i === (children_length - 1)) {
+ _iterateNode(node.children[i], null);
+ } else {
+ _iterateNode(node.children[i], node.children[i + 1]);
+ }
+ }
+ if (node.is_open) {
+ return _this.handleAfterOpenFolder(node, next_node, $element);
+ }
+ }
+ };
+ })(this);
+ return _iterateNode(this.tree, null);
+ };
+
+ VisibleNodeIterator.prototype.handleNode = function(node, next_node, $element) {};
+
+ VisibleNodeIterator.prototype.handleOpenFolder = function(node, $element) {};
+
+ VisibleNodeIterator.prototype.handleClosedFolder = function(node, next_node, $element) {};
+
+ VisibleNodeIterator.prototype.handleAfterOpenFolder = function(node, next_node, $element) {};
+
+ VisibleNodeIterator.prototype.handleFirstNode = function(node, $element) {};
+
+ return VisibleNodeIterator;
+
+ })();
+
+ HitAreasGenerator = (function(superClass) {
+ extend(HitAreasGenerator, superClass);
+
+ function HitAreasGenerator(tree, current_node, tree_bottom) {
+ HitAreasGenerator.__super__.constructor.call(this, tree);
+ this.current_node = current_node;
+ this.tree_bottom = tree_bottom;
+ }
+
+ HitAreasGenerator.prototype.generate = function() {
+ this.positions = [];
+ this.last_top = 0;
+ this.iterate();
+ return this.generateHitAreas(this.positions);
+ };
+
+ HitAreasGenerator.prototype.getTop = function($element) {
+ return $element.offset().top;
+ };
+
+ HitAreasGenerator.prototype.addPosition = function(node, position, top) {
+ var area;
+ area = {
+ top: top,
+ node: node,
+ position: position
+ };
+ this.positions.push(area);
+ return this.last_top = top;
+ };
+
+ HitAreasGenerator.prototype.handleNode = function(node, next_node, $element) {
+ var top;
+ top = this.getTop($element);
+ if (node === this.current_node) {
+ this.addPosition(node, Position.NONE, top);
+ } else {
+ this.addPosition(node, Position.INSIDE, top);
+ }
+ if (next_node === this.current_node || node === this.current_node) {
+ return this.addPosition(node, Position.NONE, top);
+ } else {
+ return this.addPosition(node, Position.AFTER, top);
+ }
+ };
+
+ HitAreasGenerator.prototype.handleOpenFolder = function(node, $element) {
+ if (node === this.current_node) {
+ return false;
+ }
+ if (node.children[0] !== this.current_node) {
+ this.addPosition(node, Position.INSIDE, this.getTop($element));
+ }
+ return true;
+ };
+
+ HitAreasGenerator.prototype.handleClosedFolder = function(node, next_node, $element) {
+ var top;
+ top = this.getTop($element);
+ if (node === this.current_node) {
+ return this.addPosition(node, Position.NONE, top);
+ } else {
+ this.addPosition(node, Position.INSIDE, top);
+ if (next_node !== this.current_node) {
+ return this.addPosition(node, Position.AFTER, top);
+ }
+ }
+ };
+
+ HitAreasGenerator.prototype.handleFirstNode = function(node, $element) {
+ if (node !== this.current_node) {
+ return this.addPosition(node, Position.BEFORE, this.getTop($(node.element)));
+ }
+ };
+
+ HitAreasGenerator.prototype.handleAfterOpenFolder = function(node, next_node, $element) {
+ if (node === this.current_node.node || next_node === this.current_node.node) {
+ return this.addPosition(node, Position.NONE, this.last_top);
+ } else {
+ return this.addPosition(node, Position.AFTER, this.last_top);
+ }
+ };
+
+ HitAreasGenerator.prototype.generateHitAreas = function(positions) {
+ var group, hit_areas, j, len, position, previous_top;
+ previous_top = -1;
+ group = [];
+ hit_areas = [];
+ for (j = 0, len = positions.length; j < len; j++) {
+ position = positions[j];
+ if (position.top !== previous_top && group.length) {
+ if (group.length) {
+ this.generateHitAreasForGroup(hit_areas, group, previous_top, position.top);
+ }
+ previous_top = position.top;
+ group = [];
+ }
+ group.push(position);
+ }
+ this.generateHitAreasForGroup(hit_areas, group, previous_top, this.tree_bottom);
+ return hit_areas;
+ };
+
+ HitAreasGenerator.prototype.generateHitAreasForGroup = function(hit_areas, positions_in_group, top, bottom) {
+ var area_height, area_top, i, position, position_count;
+ position_count = Math.min(positions_in_group.length, 4);
+ area_height = Math.round((bottom - top) / position_count);
+ area_top = top;
+ i = 0;
+ while (i < position_count) {
+ position = positions_in_group[i];
+ hit_areas.push({
+ top: area_top,
+ bottom: area_top + area_height,
+ node: position.node,
+ position: position.position
+ });
+ area_top += area_height;
+ i += 1;
+ }
+ return null;
+ };
+
+ return HitAreasGenerator;
+
+ })(VisibleNodeIterator);
+
+ DragElement = (function() {
+ function DragElement(node_name, offset_x, offset_y, $tree) {
+ this.offset_x = offset_x;
+ this.offset_y = offset_y;
+ this.$element = $("<span class=\"jqtree-title jqtree-dragging\">" + node_name + "</span>");
+ this.$element.css("position", "absolute");
+ $tree.append(this.$element);
+ }
+
+ DragElement.prototype.move = function(page_x, page_y) {
+ return this.$element.offset({
+ left: page_x - this.offset_x,
+ top: page_y - this.offset_y
+ });
+ };
+
+ DragElement.prototype.remove = function() {
+ return this.$element.remove();
+ };
+
+ return DragElement;
+
+ })();
+
+ module.exports = {
+ DragAndDropHandler: DragAndDropHandler,
+ DragElement: DragElement,
+ HitAreasGenerator: HitAreasGenerator
+ };
+
+},{"./node":5,"./util":12}],2:[function(require,module,exports){
+ var $, ElementsRenderer, NodeElement, html_escape, node_element, util;
+
+ node_element = require('./node_element');
+
+ NodeElement = node_element.NodeElement;
+
+ util = require('./util');
+
+ html_escape = util.html_escape;
+
+ $ = jQuery;
+
+ ElementsRenderer = (function() {
+ function ElementsRenderer(tree_widget) {
+ this.tree_widget = tree_widget;
+ this.opened_icon_element = this.createButtonElement(tree_widget.options.openedIcon);
+ this.closed_icon_element = this.createButtonElement(tree_widget.options.closedIcon);
+ }
+
+ ElementsRenderer.prototype.render = function(from_node) {
+ if (from_node && from_node.parent) {
+ return this.renderFromNode(from_node);
+ } else {
+ return this.renderFromRoot();
+ }
+ };
+
+ ElementsRenderer.prototype.renderFromRoot = function() {
+ var $element;
+ $element = this.tree_widget.element;
+ $element.empty();
+ return this.createDomElements($element[0], this.tree_widget.tree.children, true, true, 1);
+ };
+
+ ElementsRenderer.prototype.renderFromNode = function(node) {
+ var $previous_li, li;
+ $previous_li = $(node.element);
+ li = this.createLi(node, node.getLevel());
+ this.attachNodeData(node, li);
+ $previous_li.after(li);
+ $previous_li.remove();
+ if (node.children) {
+ return this.createDomElements(li, node.children, false, false, node.getLevel() + 1);
+ }
+ };
+
+ ElementsRenderer.prototype.createDomElements = function(element, children, is_root_node, is_open, level) {
+ var child, i, len, li, ul;
+ ul = this.createUl(is_root_node);
+ element.appendChild(ul);
+ for (i = 0, len = children.length; i < len; i++) {
+ child = children[i];
+ li = this.createLi(child, level);
+ ul.appendChild(li);
+ this.attachNodeData(child, li);
+ if (child.hasChildren()) {
+ this.createDomElements(li, child.children, false, child.is_open, level + 1);
+ }
+ }
+ return null;
+ };
+
+ ElementsRenderer.prototype.attachNodeData = function(node, li) {
+ node.element = li;
+ return $(li).data('node', node);
+ };
+
+ ElementsRenderer.prototype.createUl = function(is_root_node) {
+ var class_string, role, ul;
+ if (!is_root_node) {
+ class_string = '';
+ role = 'group';
+ } else {
+ class_string = 'jqtree-tree';
+ role = 'tree';
+ if (this.tree_widget.options.rtl) {
+ class_string += ' jqtree-rtl';
+ }
+ }
+ ul = document.createElement('ul');
+ ul.className = "jqtree_common " + class_string;
+ ul.setAttribute('role', role);
+ return ul;
+ };
+
+ ElementsRenderer.prototype.createLi = function(node, level) {
+ var is_selected, li;
+ is_selected = this.tree_widget.select_node_handler && this.tree_widget.select_node_handler.isNodeSelected(node);
+ if (node.isFolder()) {
+ li = this.createFolderLi(node, level, is_selected);
+ } else {
+ li = this.createNodeLi(node, level, is_selected);
+ }
+ if (this.tree_widget.options.onCreateLi) {
+ this.tree_widget.options.onCreateLi(node, $(li));
+ }
+ return li;
+ };
+
+ ElementsRenderer.prototype.createFolderLi = function(node, level, is_selected) {
+ var button_classes, button_link, div, folder_classes, icon_element, is_folder, li;
+ button_classes = this.getButtonClasses(node);
+ folder_classes = this.getFolderClasses(node, is_selected);
+ if (node.is_open) {
+ icon_element = this.opened_icon_element;
+ } else {
+ icon_element = this.closed_icon_element;
+ }
+ li = document.createElement('li');
+ li.className = "jqtree_common " + folder_classes;
+ li.setAttribute('role', 'presentation');
+ div = document.createElement('div');
+ div.className = "jqtree-element jqtree_common";
+ div.setAttribute('role', 'presentation');
+ li.appendChild(div);
+ button_link = document.createElement('a');
+ button_link.className = button_classes;
+ button_link.appendChild(icon_element.cloneNode(false));
+ button_link.setAttribute('role', 'presentation');
+ button_link.setAttribute('aria-hidden', 'true');
+ if (this.tree_widget.options.buttonLeft) {
+ div.appendChild(button_link);
+ }
+ div.appendChild(this.createTitleSpan(node.name, level, is_selected, node.is_open, is_folder = true));
+ if (!this.tree_widget.options.buttonLeft) {
+ div.appendChild(button_link);
+ }
+ return li;
+ };
+
+ ElementsRenderer.prototype.createNodeLi = function(node, level, is_selected) {
+ var class_string, div, is_folder, li, li_classes;
+ li_classes = ['jqtree_common'];
+ if (is_selected) {
+ li_classes.push('jqtree-selected');
+ }
+ class_string = li_classes.join(' ');
+ li = document.createElement('li');
+ li.className = class_string;
+ li.setAttribute('role', 'presentation');
+ div = document.createElement('div');
+ div.className = "jqtree-element jqtree_common";
+ div.setAttribute('role', 'presentation');
+ li.appendChild(div);
+ div.appendChild(this.createTitleSpan(node.name, level, is_selected, node.is_open, is_folder = false));
+ return li;
+ };
+
+ ElementsRenderer.prototype.createTitleSpan = function(node_name, level, is_selected, is_open, is_folder) {
+ var classes, title_span;
+ title_span = document.createElement('span');
+ classes = "jqtree-title jqtree_common";
+ if (is_folder) {
+ classes += " jqtree-title-folder";
+ }
+ title_span.className = classes;
+ title_span.setAttribute('role', 'treeitem');
+ title_span.setAttribute('aria-level', level);
+ title_span.setAttribute('aria-selected', util.getBoolString(is_selected));
+ title_span.setAttribute('aria-expanded', util.getBoolString(is_open));
+ if (is_selected) {
+ title_span.setAttribute('tabindex', 0);
+ }
+ title_span.innerHTML = this.escapeIfNecessary(node_name);
+ return title_span;
+ };
+
+ ElementsRenderer.prototype.getButtonClasses = function(node) {
+ var classes;
+ classes = ['jqtree-toggler', 'jqtree_common'];
+ if (!node.is_open) {
+ classes.push('jqtree-closed');
+ }
+ if (this.tree_widget.options.buttonLeft) {
+ classes.push('jqtree-toggler-left');
+ } else {
+ classes.push('jqtree-toggler-right');
+ }
+ return classes.join(' ');
+ };
+
+ ElementsRenderer.prototype.getFolderClasses = function(node, is_selected) {
+ var classes;
+ classes = ['jqtree-folder'];
+ if (!node.is_open) {
+ classes.push('jqtree-closed');
+ }
+ if (is_selected) {
+ classes.push('jqtree-selected');
+ }
+ if (node.is_loading) {
+ classes.push('jqtree-loading');
+ }
+ return classes.join(' ');
+ };
+
+ ElementsRenderer.prototype.escapeIfNecessary = function(value) {
+ if (this.tree_widget.options.autoEscape) {
+ return html_escape(value);
+ } else {
+ return value;
+ }
+ };
+
+ ElementsRenderer.prototype.createButtonElement = function(value) {
+ var div;
+ if (typeof value === 'string') {
+ div = document.createElement('div');
+ div.innerHTML = value;
+ return document.createTextNode(div.innerHTML);
+ } else {
+ return $(value)[0];
+ }
+ };
+
+ return ElementsRenderer;
+
+ })();
+
+ module.exports = ElementsRenderer;
+
+},{"./node_element":6,"./util":12}],3:[function(require,module,exports){
+ var $, KeyHandler,
+ bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
+
+ $ = jQuery;
+
+ KeyHandler = (function() {
+ var DOWN, LEFT, RIGHT, UP;
+
+ LEFT = 37;
+
+ UP = 38;
+
+ RIGHT = 39;
+
+ DOWN = 40;
+
+ function KeyHandler(tree_widget) {
+ this.selectNode = bind(this.selectNode, this);
+ this.tree_widget = tree_widget;
+ if (tree_widget.options.keyboardSupport) {
+ $(document).bind('keydown.jqtree', $.proxy(this.handleKeyDown, this));
+ }
+ }
+
+ KeyHandler.prototype.deinit = function() {
+ return $(document).unbind('keydown.jqtree');
+ };
+
+ KeyHandler.prototype.moveDown = function() {
+ var node;
+ node = this.tree_widget.getSelectedNode();
+ if (node) {
+ return this.selectNode(node.getNextNode());
+ } else {
+ return false;
+ }
+ };
+
+ KeyHandler.prototype.moveUp = function() {
+ var node;
+ node = this.tree_widget.getSelectedNode();
+ if (node) {
+ return this.selectNode(node.getPreviousNode());
+ } else {
+ return false;
+ }
+ };
+
+ KeyHandler.prototype.moveRight = function() {
+ var node;
+ node = this.tree_widget.getSelectedNode();
+ if (!node) {
+ return true;
+ } else if (!node.isFolder()) {
+ return true;
+ } else {
+ if (node.is_open) {
+ return this.selectNode(node.getNextNode());
+ } else {
+ this.tree_widget.openNode(node);
+ return false;
+ }
+ }
+ };
+
+ KeyHandler.prototype.moveLeft = function() {
+ var node;
+ node = this.tree_widget.getSelectedNode();
+ if (!node) {
+ return true;
+ } else if (node.isFolder() && node.is_open) {
+ this.tree_widget.closeNode(node);
+ return false;
+ } else {
+ return this.selectNode(node.getParent());
+ }
+ };
+
+ KeyHandler.prototype.handleKeyDown = function(e) {
+ var key;
+ if (!this.tree_widget.options.keyboardSupport) {
+ return true;
+ }
+ if ($(document.activeElement).is('textarea,input,select')) {
+ return true;
+ }
+ if (!this.tree_widget.getSelectedNode()) {
+ return true;
+ }
+ key = e.which;
+ switch (key) {
+ case DOWN:
+ return this.moveDown();
+ case UP:
+ return this.moveUp();
+ case RIGHT:
+ return this.moveRight();
+ case LEFT:
+ return this.moveLeft();
+ }
+ return true;
+ };
+
+ KeyHandler.prototype.selectNode = function(node) {
+ if (!node) {
+ return true;
+ } else {
+ this.tree_widget.selectNode(node);
+ if (this.tree_widget.scroll_handler && (!this.tree_widget.scroll_handler.isScrolledIntoView($(node.element).find('.jqtree-element')))) {
+ this.tree_widget.scrollToNode(node);
+ }
+ return false;
+ }
+ };
+
+ return KeyHandler;
+
+ })();
+
+ module.exports = KeyHandler;
+
+},{}],4:[function(require,module,exports){
+
+ /*
+ This widget does the same a the mouse widget in jqueryui.
+ */
+ var $, MouseWidget, SimpleWidget,
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
+
+ SimpleWidget = require('./simple.widget');
+
+ $ = jQuery;
+
+ MouseWidget = (function(superClass) {
+ extend(MouseWidget, superClass);
+
+ function MouseWidget() {
+ return MouseWidget.__super__.constructor.apply(this, arguments);
+ }
+
+ MouseWidget.is_mouse_handled = false;
+
+ MouseWidget.prototype._init = function() {
+ this.$el.bind('mousedown.mousewidget', $.proxy(this._mouseDown, this));
+ this.$el.bind('touchstart.mousewidget', $.proxy(this._touchStart, this));
+ this.is_mouse_started = false;
+ this.mouse_delay = 0;
+ this._mouse_delay_timer = null;
+ this._is_mouse_delay_met = true;
+ return this.mouse_down_info = null;
+ };
+
+ MouseWidget.prototype._deinit = function() {
+ var $document;
+ this.$el.unbind('mousedown.mousewidget');
+ this.$el.unbind('touchstart.mousewidget');
+ $document = $(document);
+ $document.unbind('mousemove.mousewidget');
+ return $document.unbind('mouseup.mousewidget');
+ };
+
+ MouseWidget.prototype._mouseDown = function(e) {
+ var result;
+ if (e.which !== 1) {
+ return;
+ }
+ result = this._handleMouseDown(e, this._getPositionInfo(e));
+ if (result) {
+ e.preventDefault();
+ }
+ return result;
+ };
+
+ MouseWidget.prototype._handleMouseDown = function(e, position_info) {
+ if (MouseWidget.is_mouse_handled) {
+ return;
+ }
+ if (this.is_mouse_started) {
+ this._handleMouseUp(position_info);
+ }
+ this.mouse_down_info = position_info;
+ if (!this._mouseCapture(position_info)) {
+ return;
+ }
+ this._handleStartMouse();
+ this.is_mouse_handled = true;
+ return true;
+ };
+
+ MouseWidget.prototype._handleStartMouse = function() {
+ var $document;
+ $document = $(document);
+ $document.bind('mousemove.mousewidget', $.proxy(this._mouseMove, this));
+ $document.bind('touchmove.mousewidget', $.proxy(this._touchMove, this));
+ $document.bind('mouseup.mousewidget', $.proxy(this._mouseUp, this));
+ $document.bind('touchend.mousewidget', $.proxy(this._touchEnd, this));
+ if (this.mouse_delay) {
+ return this._startMouseDelayTimer();
+ }
+ };
+
+ MouseWidget.prototype._startMouseDelayTimer = function() {
+ if (this._mouse_delay_timer) {
+ clearTimeout(this._mouse_delay_timer);
+ }
+ this._mouse_delay_timer = setTimeout((function(_this) {
+ return function() {
+ return _this._is_mouse_delay_met = true;
+ };
+ })(this), this.mouse_delay);
+ return this._is_mouse_delay_met = false;
+ };
+
+ MouseWidget.prototype._mouseMove = function(e) {
+ return this._handleMouseMove(e, this._getPositionInfo(e));
+ };
+
+ MouseWidget.prototype._handleMouseMove = function(e, position_info) {
+ if (this.is_mouse_started) {
+ this._mouseDrag(position_info);
+ return e.preventDefault();
+ }
+ if (this.mouse_delay && !this._is_mouse_delay_met) {
+ return true;
+ }
+ this.is_mouse_started = this._mouseStart(this.mouse_down_info) !== false;
+ if (this.is_mouse_started) {
+ this._mouseDrag(position_info);
+ } else {
+ this._handleMouseUp(position_info);
+ }
+ return !this.is_mouse_started;
+ };
+
+ MouseWidget.prototype._getPositionInfo = function(e) {
+ return {
+ page_x: e.pageX,
+ page_y: e.pageY,
+ target: e.target,
+ original_event: e
+ };
+ };
+
+ MouseWidget.prototype._mouseUp = function(e) {
+ return this._handleMouseUp(this._getPositionInfo(e));
+ };
+
+ MouseWidget.prototype._handleMouseUp = function(position_info) {
+ var $document;
+ $document = $(document);
+ $document.unbind('mousemove.mousewidget');
+ $document.unbind('touchmove.mousewidget');
+ $document.unbind('mouseup.mousewidget');
+ $document.unbind('touchend.mousewidget');
+ if (this.is_mouse_started) {
+ this.is_mouse_started = false;
+ this._mouseStop(position_info);
+ }
+ };
+
+ MouseWidget.prototype._mouseCapture = function(position_info) {
+ return true;
+ };
+
+ MouseWidget.prototype._mouseStart = function(position_info) {
+ return null;
+ };
+
+ MouseWidget.prototype._mouseDrag = function(position_info) {
+ return null;
+ };
+
+ MouseWidget.prototype._mouseStop = function(position_info) {
+ return null;
+ };
+
+ MouseWidget.prototype.setMouseDelay = function(mouse_delay) {
+ return this.mouse_delay = mouse_delay;
+ };
+
+ MouseWidget.prototype._touchStart = function(e) {
+ var touch;
+ if (e.originalEvent.touches.length > 1) {
+ return;
+ }
+ touch = e.originalEvent.changedTouches[0];
+ return this._handleMouseDown(e, this._getPositionInfo(touch));
+ };
+
+ MouseWidget.prototype._touchMove = function(e) {
+ var touch;
+ if (e.originalEvent.touches.length > 1) {
+ return;
+ }
+ touch = e.originalEvent.changedTouches[0];
+ return this._handleMouseMove(e, this._getPositionInfo(touch));
+ };
+
+ MouseWidget.prototype._touchEnd = function(e) {
+ var touch;
+ if (e.originalEvent.touches.length > 1) {
+ return;
+ }
+ touch = e.originalEvent.changedTouches[0];
+ return this._handleMouseUp(this._getPositionInfo(touch));
+ };
+
+ return MouseWidget;
+
+ })(SimpleWidget);
+
+ module.exports = MouseWidget;
+
+},{"./simple.widget":10}],5:[function(require,module,exports){
+ var $, Node, Position;
+
+ $ = jQuery;
+
+ Position = {
+ getName: function(position) {
+ return Position.strings[position - 1];
+ },
+ nameToIndex: function(name) {
+ var i, j, ref;
+ for (i = j = 1, ref = Position.strings.length; 1 <= ref ? j <= ref : j >= ref; i = 1 <= ref ? ++j : --j) {
+ if (Position.strings[i - 1] === name) {
+ return i;
+ }
+ }
+ return 0;
+ }
+ };
+
+ Position.BEFORE = 1;
+
+ Position.AFTER = 2;
+
+ Position.INSIDE = 3;
+
+ Position.NONE = 4;
+
+ Position.strings = ['before', 'after', 'inside', 'none'];
+
+ Node = (function() {
+ function Node(o, is_root, node_class) {
+ if (is_root == null) {
+ is_root = false;
+ }
+ if (node_class == null) {
+ node_class = Node;
+ }
+ this.name = '';
+ this.setData(o);
+ this.children = [];
+ this.parent = null;
+ if (is_root) {
+ this.id_mapping = {};
+ this.tree = this;
+ this.node_class = node_class;
+ }
+ }
+
+ Node.prototype.setData = function(o) {
+
+ /*
+ Set the data of this node.
+
+ setData(string): set the name of the node
+ setdata(object): set attributes of the node
+
+ Examples:
+ setdata('node1')
+
+ setData({ name: 'node1', id: 1});
+
+ setData({ name: 'node2', id: 2, color: 'green'});
+
+ * This is an internal function; it is not in the docs
+ * Does not remove existing node values
+ */
+ var key, setName, value;
+ setName = (function(_this) {
+ return function(name) {
+ if (name !== null) {
+ return _this.name = name;
+ }
+ };
+ })(this);
+ if (typeof o !== 'object') {
+ setName(o);
+ } else {
+ for (key in o) {
+ value = o[key];
+ if (key === 'label') {
+ setName(value);
+ } else if (key !== 'children') {
+ this[key] = value;
+ }
+ }
+ }
+ return null;
+ };
+
+ Node.prototype.initFromData = function(data) {
+ var addChildren, addNode;
+ addNode = (function(_this) {
+ return function(node_data) {
+ _this.setData(node_data);
+ if (node_data.children) {
+ return addChildren(node_data.children);
+ }
+ };
+ })(this);
+ addChildren = (function(_this) {
+ return function(children_data) {
+ var child, j, len, node;
+ for (j = 0, len = children_data.length; j < len; j++) {
+ child = children_data[j];
+ node = new _this.tree.node_class('');
+ node.initFromData(child);
+ _this.addChild(node);
+ }
+ return null;
+ };
+ })(this);
+ addNode(data);
+ return null;
+ };
+
+
+ /*
+ Create tree from data.
+
+ Structure of data is:
+ [
+ {
+ label: 'node1',
+ children: [
+ { label: 'child1' },
+ { label: 'child2' }
+ ]
+ },
+ {
+ label: 'node2'
+ }
+ ]
+ */
+
+ Node.prototype.loadFromData = function(data) {
+ var j, len, node, o;
+ this.removeChildren();
+ for (j = 0, len = data.length; j < len; j++) {
+ o = data[j];
+ node = new this.tree.node_class(o);
+ this.addChild(node);
+ if (typeof o === 'object' && o.children) {
+ node.loadFromData(o.children);
+ }
+ }
+ return null;
+ };
+
+
+ /*
+ Add child.
+
+ tree.addChild(
+ new Node('child1')
+ );
+ */
+
+ Node.prototype.addChild = function(node) {
+ this.children.push(node);
+ return node._setParent(this);
+ };
+
+
+ /*
+ Add child at position. Index starts at 0.
+
+ tree.addChildAtPosition(
+ new Node('abc'),
+ 1
+ );
+ */
+
+ Node.prototype.addChildAtPosition = function(node, index) {
+ this.children.splice(index, 0, node);
+ return node._setParent(this);
+ };
+
+ Node.prototype._setParent = function(parent) {
+ this.parent = parent;
+ this.tree = parent.tree;
+ return this.tree.addNodeToIndex(this);
+ };
+
+
+ /*
+ Remove child. This also removes the children of the node.
+
+ tree.removeChild(tree.children[0]);
+ */
+
+ Node.prototype.removeChild = function(node) {
+ node.removeChildren();
+ return this._removeChild(node);
+ };
+
+ Node.prototype._removeChild = function(node) {
+ this.children.splice(this.getChildIndex(node), 1);
+ return this.tree.removeNodeFromIndex(node);
+ };
+
+
+ /*
+ Get child index.
+
+ var index = getChildIndex(node);
+ */
+
+ Node.prototype.getChildIndex = function(node) {
+ return $.inArray(node, this.children);
+ };
+
+
+ /*
+ Does the tree have children?
+
+ if (tree.hasChildren()) {
+ //
+ }
+ */
+
+ Node.prototype.hasChildren = function() {
+ return this.children.length !== 0;
+ };
+
+ Node.prototype.isFolder = function() {
+ return this.hasChildren() || this.load_on_demand;
+ };
+
+
+ /*
+ Iterate over all the nodes in the tree.
+
+ Calls callback with (node, level).
+
+ The callback must return true to continue the iteration on current node.
+
+ tree.iterate(
+ function(node, level) {
+ console.log(node.name);
+
+ // stop iteration after level 2
+ return (level <= 2);
+ }
+ );
+ */
+
+ Node.prototype.iterate = function(callback) {
+ var _iterate;
+ _iterate = function(node, level) {
+ var child, j, len, ref, result;
+ if (node.children) {
+ ref = node.children;
+ for (j = 0, len = ref.length; j < len; j++) {
+ child = ref[j];
+ result = callback(child, level);
+ if (result && child.hasChildren()) {
+ _iterate(child, level + 1);
+ }
+ }
+ return null;
+ }
+ };
+ _iterate(this, 0);
+ return null;
+ };
+
+
+ /*
+ Move node relative to another node.
+
+ Argument position: Position.BEFORE, Position.AFTER or Position.Inside
+
+ // move node1 after node2
+ tree.moveNode(node1, node2, Position.AFTER);
+ */
+
+ Node.prototype.moveNode = function(moved_node, target_node, position) {
+ if (moved_node.isParentOf(target_node)) {
+ return;
+ }
+ moved_node.parent._removeChild(moved_node);
+ if (position === Position.AFTER) {
+ return target_node.parent.addChildAtPosition(moved_node, target_node.parent.getChildIndex(target_node) + 1);
+ } else if (position === Position.BEFORE) {
+ return target_node.parent.addChildAtPosition(moved_node, target_node.parent.getChildIndex(target_node));
+ } else if (position === Position.INSIDE) {
+ return target_node.addChildAtPosition(moved_node, 0);
+ }
+ };
+
+
+ /*
+ Get the tree as data.
+ */
+
+ Node.prototype.getData = function(include_parent) {
+ var getDataFromNodes;
+ if (include_parent == null) {
+ include_parent = false;
+ }
+ getDataFromNodes = function(nodes) {
+ var data, j, k, len, node, tmp_node, v;
+ data = [];
+ for (j = 0, len = nodes.length; j < len; j++) {
+ node = nodes[j];
+ tmp_node = {};
+ for (k in node) {
+ v = node[k];
+ if ((k !== 'parent' && k !== 'children' && k !== 'element' && k !== 'tree') && Object.prototype.hasOwnProperty.call(node, k)) {
+ tmp_node[k] = v;
+ }
+ }
+ if (node.hasChildren()) {
+ tmp_node.children = getDataFromNodes(node.children);
+ }
+ data.push(tmp_node);
+ }
+ return data;
+ };
+ if (include_parent) {
+ return getDataFromNodes([this]);
+ } else {
+ return getDataFromNodes(this.children);
+ }
+ };
+
+ Node.prototype.getNodeByName = function(name) {
+ return this.getNodeByCallback(function(node) {
+ return node.name === name;
+ });
+ };
+
+ Node.prototype.getNodeByCallback = function(callback) {
+ var result;
+ result = null;
+ this.iterate(function(node) {
+ if (callback(node)) {
+ result = node;
+ return false;
+ } else {
+ return true;
+ }
+ });
+ return result;
+ };
+
+ Node.prototype.addAfter = function(node_info) {
+ var child_index, node;
+ if (!this.parent) {
+ return null;
+ } else {
+ node = new this.tree.node_class(node_info);
+ child_index = this.parent.getChildIndex(this);
+ this.parent.addChildAtPosition(node, child_index + 1);
+ if (typeof node_info === 'object' && node_info.children && node_info.children.length) {
+ node.loadFromData(node_info.children);
+ }
+ return node;
+ }
+ };
+
+ Node.prototype.addBefore = function(node_info) {
+ var child_index, node;
+ if (!this.parent) {
+ return null;
+ } else {
+ node = new this.tree.node_class(node_info);
+ child_index = this.parent.getChildIndex(this);
+ this.parent.addChildAtPosition(node, child_index);
+ if (typeof node_info === 'object' && node_info.children && node_info.children.length) {
+ node.loadFromData(node_info.children);
+ }
+ return node;
+ }
+ };
+
+ Node.prototype.addParent = function(node_info) {
+ var child, j, len, new_parent, original_parent, ref;
+ if (!this.parent) {
+ return null;
+ } else {
+ new_parent = new this.tree.node_class(node_info);
+ new_parent._setParent(this.tree);
+ original_parent = this.parent;
+ ref = original_parent.children;
+ for (j = 0, len = ref.length; j < len; j++) {
+ child = ref[j];
+ new_parent.addChild(child);
+ }
+ original_parent.children = [];
+ original_parent.addChild(new_parent);
+ return new_parent;
+ }
+ };
+
+ Node.prototype.remove = function() {
+ if (this.parent) {
+ this.parent.removeChild(this);
+ return this.parent = null;
+ }
+ };
+
+ Node.prototype.append = function(node_info) {
+ var node;
+ node = new this.tree.node_class(node_info);
+ this.addChild(node);
+ if (typeof node_info === 'object' && node_info.children && node_info.children.length) {
+ node.loadFromData(node_info.children);
+ }
+ return node;
+ };
+
+ Node.prototype.prepend = function(node_info) {
+ var node;
+ node = new this.tree.node_class(node_info);
+ this.addChildAtPosition(node, 0);
+ if (typeof node_info === 'object' && node_info.children && node_info.children.length) {
+ node.loadFromData(node_info.children);
+ }
+ return node;
+ };
+
+ Node.prototype.isParentOf = function(node) {
+ var parent;
+ parent = node.parent;
+ while (parent) {
+ if (parent === this) {
+ return true;
+ }
+ parent = parent.parent;
+ }
+ return false;
+ };
+
+ Node.prototype.getLevel = function() {
+ var level, node;
+ level = 0;
+ node = this;
+ while (node.parent) {
+ level += 1;
+ node = node.parent;
+ }
+ return level;
+ };
+
+ Node.prototype.getNodeById = function(node_id) {
+ return this.id_mapping[node_id];
+ };
+
+ Node.prototype.addNodeToIndex = function(node) {
+ if (node.id != null) {
+ return this.id_mapping[node.id] = node;
+ }
+ };
+
+ Node.prototype.removeNodeFromIndex = function(node) {
+ if (node.id != null) {
+ return delete this.id_mapping[node.id];
+ }
+ };
+
+ Node.prototype.removeChildren = function() {
+ this.iterate((function(_this) {
+ return function(child) {
+ _this.tree.removeNodeFromIndex(child);
+ return true;
+ };
+ })(this));
+ return this.children = [];
+ };
+
+ Node.prototype.getPreviousSibling = function() {
+ var previous_index;
+ if (!this.parent) {
+ return null;
+ } else {
+ previous_index = this.parent.getChildIndex(this) - 1;
+ if (previous_index >= 0) {
+ return this.parent.children[previous_index];
+ } else {
+ return null;
+ }
+ }
+ };
+
+ Node.prototype.getNextSibling = function() {
+ var next_index;
+ if (!this.parent) {
+ return null;
+ } else {
+ next_index = this.parent.getChildIndex(this) + 1;
+ if (next_index < this.parent.children.length) {
+ return this.parent.children[next_index];
+ } else {
+ return null;
+ }
+ }
+ };
+
+ Node.prototype.getNodesByProperty = function(key, value) {
+ return this.filter(function(node) {
+ return node[key] === value;
+ });
+ };
+
+ Node.prototype.filter = function(f) {
+ var result;
+ result = [];
+ this.iterate(function(node) {
+ if (f(node)) {
+ result.push(node);
+ }
+ return true;
+ });
+ return result;
+ };
+
+ Node.prototype.getNextNode = function(include_children) {
+ var next_sibling;
+ if (include_children == null) {
+ include_children = true;
+ }
+ if (include_children && this.hasChildren() && this.is_open) {
+ return this.children[0];
+ } else {
+ if (!this.parent) {
+ return null;
+ } else {
+ next_sibling = this.getNextSibling();
+ if (next_sibling) {
+ return next_sibling;
+ } else {
+ return this.parent.getNextNode(false);
+ }
+ }
+ }
+ };
+
+ Node.prototype.getPreviousNode = function() {
+ var previous_sibling;
+ if (!this.parent) {
+ return null;
+ } else {
+ previous_sibling = this.getPreviousSibling();
+ if (previous_sibling) {
+ if (!previous_sibling.hasChildren() || !previous_sibling.is_open) {
+ return previous_sibling;
+ } else {
+ return previous_sibling.getLastChild();
+ }
+ } else {
+ return this.getParent();
+ }
+ }
+ };
+
+ Node.prototype.getParent = function() {
+ if (!this.parent) {
+ return null;
+ } else if (!this.parent.parent) {
+ return null;
+ } else {
+ return this.parent;
+ }
+ };
+
+ Node.prototype.getLastChild = function() {
+ var last_child;
+ if (!this.hasChildren()) {
+ return null;
+ } else {
+ last_child = this.children[this.children.length - 1];
+ if (!last_child.hasChildren() || !last_child.is_open) {
+ return last_child;
+ } else {
+ return last_child.getLastChild();
+ }
+ }
+ };
+
+ return Node;
+
+ })();
+
+ module.exports = {
+ Node: Node,
+ Position: Position
+ };
+
+},{}],6:[function(require,module,exports){
+ var $, BorderDropHint, FolderElement, GhostDropHint, NodeElement, Position, node,
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
+
+ node = require('./node');
+
+ Position = node.Position;
+
+ $ = jQuery;
+
+ NodeElement = (function() {
+ function NodeElement(node, tree_widget) {
+ this.init(node, tree_widget);
+ }
+
+ NodeElement.prototype.init = function(node, tree_widget) {
+ this.node = node;
+ this.tree_widget = tree_widget;
+ if (!node.element) {
+ node.element = this.tree_widget.element;
+ }
+ return this.$element = $(node.element);
+ };
+
+ NodeElement.prototype.getUl = function() {
+ return this.$element.children('ul:first');
+ };
+
+ NodeElement.prototype.getSpan = function() {
+ return this.$element.children('.jqtree-element').find('span.jqtree-title');
+ };
+
+ NodeElement.prototype.getLi = function() {
+ return this.$element;
+ };
+
+ NodeElement.prototype.addDropHint = function(position) {
+ if (position === Position.INSIDE) {
+ return new BorderDropHint(this.$element);
+ } else {
+ return new GhostDropHint(this.node, this.$element, position);
+ }
+ };
+
+ NodeElement.prototype.select = function() {
+ var $li, $span;
+ $li = this.getLi();
+ $li.addClass('jqtree-selected');
+ $li.attr('aria-selected', 'true');
+ $span = this.getSpan();
+ return $span.attr('tabindex', 0);
+ };
+
+ NodeElement.prototype.deselect = function() {
+ var $li, $span;
+ $li = this.getLi();
+ $li.removeClass('jqtree-selected');
+ $li.attr('aria-selected', 'false');
+ $span = this.getSpan();
+ return $span.attr('tabindex', -1);
+ };
+
+ return NodeElement;
+
+ })();
+
+ FolderElement = (function(superClass) {
+ extend(FolderElement, superClass);
+
+ function FolderElement() {
+ return FolderElement.__super__.constructor.apply(this, arguments);
+ }
+
+ FolderElement.prototype.open = function(on_finished, slide) {
+ var $button, doOpen;
+ if (slide == null) {
+ slide = true;
+ }
+ if (!this.node.is_open) {
+ this.node.is_open = true;
+ $button = this.getButton();
+ $button.removeClass('jqtree-closed');
+ $button.html('');
+ $button.append(this.tree_widget.renderer.opened_icon_element.cloneNode(false));
+ doOpen = (function(_this) {
+ return function() {
+ var $li, $span;
+ $li = _this.getLi();
+ $li.removeClass('jqtree-closed');
+ $span = _this.getSpan();
+ $span.attr('aria-expanded', 'true');
+ if (on_finished) {
+ on_finished();
+ }
+ return _this.tree_widget._triggerEvent('tree.open', {
+ node: _this.node
+ });
+ };
+ })(this);
+ if (slide) {
+ return this.getUl().slideDown('fast', doOpen);
+ } else {
+ this.getUl().show();
+ return doOpen();
+ }
+ }
+ };
+
+ FolderElement.prototype.close = function(slide) {
+ var $button, doClose;
+ if (slide == null) {
+ slide = true;
+ }
+ if (this.node.is_open) {
+ this.node.is_open = false;
+ $button = this.getButton();
+ $button.addClass('jqtree-closed');
+ $button.html('');
+ $button.append(this.tree_widget.renderer.closed_icon_element.cloneNode(false));
+ doClose = (function(_this) {
+ return function() {
+ var $li, $span;
+ $li = _this.getLi();
+ $li.addClass('jqtree-closed');
+ $span = _this.getSpan();
+ $span.attr('aria-expanded', 'false');
+ return _this.tree_widget._triggerEvent('tree.close', {
+ node: _this.node
+ });
+ };
+ })(this);
+ if (slide) {
+ return this.getUl().slideUp('fast', doClose);
+ } else {
+ this.getUl().hide();
+ return doClose();
+ }
+ }
+ };
+
+ FolderElement.prototype.getButton = function() {
+ return this.$element.children('.jqtree-element').find('a.jqtree-toggler');
+ };
+
+ FolderElement.prototype.addDropHint = function(position) {
+ if (!this.node.is_open && position === Position.INSIDE) {
+ return new BorderDropHint(this.$element);
+ } else {
+ return new GhostDropHint(this.node, this.$element, position);
+ }
+ };
+
+ return FolderElement;
+
+ })(NodeElement);
+
+ BorderDropHint = (function() {
+ function BorderDropHint($element) {
+ var $div, width;
+ $div = $element.children('.jqtree-element');
+ width = $element.width() - 4;
+ this.$hint = $('<span class="jqtree-border"></span>');
+ $div.append(this.$hint);
+ this.$hint.css({
+ width: width,
+ height: $div.outerHeight() - 4
+ });
+ }
+
+ BorderDropHint.prototype.remove = function() {
+ return this.$hint.remove();
+ };
+
+ return BorderDropHint;
+
+ })();
+
+ GhostDropHint = (function() {
+ function GhostDropHint(node, $element, position) {
+ this.$element = $element;
+ this.node = node;
+ this.$ghost = $('<li class="jqtree_common jqtree-ghost"><span class="jqtree_common jqtree-circle"></span><span class="jqtree_common jqtree-line"></span></li>');
+ if (position === Position.AFTER) {
+ this.moveAfter();
+ } else if (position === Position.BEFORE) {
+ this.moveBefore();
+ } else if (position === Position.INSIDE) {
+ if (node.isFolder() && node.is_open) {
+ this.moveInsideOpenFolder();
+ } else {
+ this.moveInside();
+ }
+ }
+ }
+
+ GhostDropHint.prototype.remove = function() {
+ return this.$ghost.remove();
+ };
+
+ GhostDropHint.prototype.moveAfter = function() {
+ return this.$element.after(this.$ghost);
+ };
+
+ GhostDropHint.prototype.moveBefore = function() {
+ return this.$element.before(this.$ghost);
+ };
+
+ GhostDropHint.prototype.moveInsideOpenFolder = function() {
+ return $(this.node.children[0].element).before(this.$ghost);
+ };
+
+ GhostDropHint.prototype.moveInside = function() {
+ this.$element.after(this.$ghost);
+ return this.$ghost.addClass('jqtree-inside');
+ };
+
+ return GhostDropHint;
+
+ })();
+
+ module.exports = {
+ BorderDropHint: BorderDropHint,
+ FolderElement: FolderElement,
+ GhostDropHint: GhostDropHint,
+ NodeElement: NodeElement
+ };
+
+},{"./node":5}],7:[function(require,module,exports){
+ var $, SaveStateHandler, indexOf, isInt, util;
+
+ util = require('./util');
+
+ indexOf = util.indexOf;
+
+ isInt = util.isInt;
+
+ $ = jQuery;
+
+ SaveStateHandler = (function() {
+ function SaveStateHandler(tree_widget) {
+ this.tree_widget = tree_widget;
+ }
+
+ SaveStateHandler.prototype.saveState = function() {
+ var state;
+ state = JSON.stringify(this.getState());
+ if (this.tree_widget.options.onSetStateFromStorage) {
+ return this.tree_widget.options.onSetStateFromStorage(state);
+ } else if (this.supportsLocalStorage()) {
+ return localStorage.setItem(this.getCookieName(), state);
+ } else if ($.cookie) {
+ $.cookie.raw = true;
+ return $.cookie(this.getCookieName(), state, {
+ path: '/'
+ });
+ }
+ };
+
+ SaveStateHandler.prototype.getStateFromStorage = function() {
+ var json_data;
+ json_data = this._loadFromStorage();
+ if (json_data) {
+ return this._parseState(json_data);
+ } else {
+ return null;
+ }
+ };
+
+ SaveStateHandler.prototype._parseState = function(json_data) {
+ var state;
+ state = $.parseJSON(json_data);
+ if (state && state.selected_node && isInt(state.selected_node)) {
+ state.selected_node = [state.selected_node];
+ }
+ return state;
+ };
+
+ SaveStateHandler.prototype._loadFromStorage = function() {
+ if (this.tree_widget.options.onGetStateFromStorage) {
+ return this.tree_widget.options.onGetStateFromStorage();
+ } else if (this.supportsLocalStorage()) {
+ return localStorage.getItem(this.getCookieName());
+ } else if ($.cookie) {
+ $.cookie.raw = true;
+ return $.cookie(this.getCookieName());
+ } else {
+ return null;
+ }
+ };
+
+ SaveStateHandler.prototype.getState = function() {
+ var getOpenNodeIds, getSelectedNodeIds;
+ getOpenNodeIds = (function(_this) {
+ return function() {
+ var open_nodes;
+ open_nodes = [];
+ _this.tree_widget.tree.iterate(function(node) {
+ if (node.is_open && node.id && node.hasChildren()) {
+ open_nodes.push(node.id);
+ }
+ return true;
+ });
+ return open_nodes;
+ };
+ })(this);
+ getSelectedNodeIds = (function(_this) {
+ return function() {
+ var n;
+ return (function() {
+ var i, len, ref, results;
+ ref = this.tree_widget.getSelectedNodes();
+ results = [];
+ for (i = 0, len = ref.length; i < len; i++) {
+ n = ref[i];
+ results.push(n.id);
+ }
+ return results;
+ }).call(_this);
+ };
+ })(this);
+ return {
+ open_nodes: getOpenNodeIds(),
+ selected_node: getSelectedNodeIds()
+ };
+ };
+
+ SaveStateHandler.prototype.setInitialState = function(state) {
+ var must_load_on_demand;
+ if (!state) {
+ return false;
+ } else {
+ must_load_on_demand = this._openInitialNodes(state.open_nodes);
+ this._selectInitialNodes(state.selected_node);
+ return must_load_on_demand;
+ }
+ };
+
+ SaveStateHandler.prototype._openInitialNodes = function(node_ids) {
+ var i, len, must_load_on_demand, node, node_id;
+ must_load_on_demand = false;
+ for (i = 0, len = node_ids.length; i < len; i++) {
+ node_id = node_ids[i];
+ node = this.tree_widget.getNodeById(node_id);
+ if (node) {
+ if (!node.load_on_demand) {
+ node.is_open = true;
+ } else {
+ must_load_on_demand = true;
+ }
+ }
+ }
+ return must_load_on_demand;
+ };
+
+ SaveStateHandler.prototype._selectInitialNodes = function(node_ids) {
+ var i, len, node, node_id, select_count;
+ select_count = 0;
+ for (i = 0, len = node_ids.length; i < len; i++) {
+ node_id = node_ids[i];
+ node = this.tree_widget.getNodeById(node_id);
+ if (node) {
+ select_count += 1;
+ this.tree_widget.select_node_handler.addToSelection(node);
+ }
+ }
+ return select_count !== 0;
+ };
+
+ SaveStateHandler.prototype.setInitialStateOnDemand = function(state, cb_finished) {
+ if (state) {
+ return this._setInitialStateOnDemand(state.open_nodes, state.selected_node, cb_finished);
+ } else {
+ return cb_finished();
+ }
+ };
+
+ SaveStateHandler.prototype._setInitialStateOnDemand = function(node_ids, selected_nodes, cb_finished) {
+ var loadAndOpenNode, loading_count, openNodes;
+ loading_count = 0;
+ openNodes = (function(_this) {
+ return function() {
+ var i, len, new_nodes_ids, node, node_id;
+ new_nodes_ids = [];
+ for (i = 0, len = node_ids.length; i < len; i++) {
+ node_id = node_ids[i];
+ node = _this.tree_widget.getNodeById(node_id);
+ if (!node) {
+ new_nodes_ids.push(node_id);
+ } else {
+ if (!node.is_loading) {
+ if (node.load_on_demand) {
+ loadAndOpenNode(node);
+ } else {
+ _this.tree_widget._openNode(node, false);
+ }
+ }
+ }
+ }
+ node_ids = new_nodes_ids;
+ if (_this._selectInitialNodes(selected_nodes)) {
+ _this.tree_widget._refreshElements();
+ }
+ if (loading_count === 0) {
+ return cb_finished();
+ }
+ };
+ })(this);
+ loadAndOpenNode = (function(_this) {
+ return function(node) {
+ loading_count += 1;
+ return _this.tree_widget._openNode(node, false, function() {
+ loading_count -= 1;
+ return openNodes();
+ });
+ };
+ })(this);
+ return openNodes();
+ };
+
+ SaveStateHandler.prototype.getCookieName = function() {
+ if (typeof this.tree_widget.options.saveState === 'string') {
+ return this.tree_widget.options.saveState;
+ } else {
+ return 'tree';
+ }
+ };
+
+ SaveStateHandler.prototype.supportsLocalStorage = function() {
+ var testSupport;
+ testSupport = function() {
+ var error, key;
+ if (typeof localStorage === "undefined" || localStorage === null) {
+ return false;
+ } else {
+ try {
+ key = '_storage_test';
+ sessionStorage.setItem(key, true);
+ sessionStorage.removeItem(key);
+ } catch (error1) {
+ error = error1;
+ return false;
+ }
+ return true;
+ }
+ };
+ if (this._supportsLocalStorage == null) {
+ this._supportsLocalStorage = testSupport();
+ }
+ return this._supportsLocalStorage;
+ };
+
+ SaveStateHandler.prototype.getNodeIdToBeSelected = function() {
+ var state;
+ state = this.getStateFromStorage();
+ if (state && state.selected_node) {
+ return state.selected_node[0];
+ } else {
+ return null;
+ }
+ };
+
+ return SaveStateHandler;
+
+ })();
+
+ module.exports = SaveStateHandler;
+
+},{"./util":12}],8:[function(require,module,exports){
+ var $, ScrollHandler;
+
+ $ = jQuery;
+
+ ScrollHandler = (function() {
+ function ScrollHandler(tree_widget) {
+ this.tree_widget = tree_widget;
+ this.previous_top = -1;
+ this.is_initialized = false;
+ this._initScrollParent();
+ }
+
+ ScrollHandler.prototype._initScrollParent = function() {
+ var $scroll_parent, getParentWithOverflow, setDocumentAsScrollParent;
+ getParentWithOverflow = (function(_this) {
+ return function() {
+ var css_values, el, hasOverFlow, i, len, ref;
+ css_values = ['overflow', 'overflow-y'];
+ hasOverFlow = function(el) {
+ var css_value, i, len, ref;
+ for (i = 0, len = css_values.length; i < len; i++) {
+ css_value = css_values[i];
+ if ((ref = $.css(el, css_value)) === 'auto' || ref === 'scroll') {
+ return true;
+ }
+ }
+ return false;
+ };
+ if (hasOverFlow(_this.tree_widget.$el[0])) {
+ return _this.tree_widget.$el;
+ }
+ ref = _this.tree_widget.$el.parents();
+ for (i = 0, len = ref.length; i < len; i++) {
+ el = ref[i];
+ if (hasOverFlow(el)) {
+ return $(el);
+ }
+ }
+ return null;
+ };
+ })(this);
+ setDocumentAsScrollParent = (function(_this) {
+ return function() {
+ _this.scroll_parent_top = 0;
+ return _this.$scroll_parent = null;
+ };
+ })(this);
+ if (this.tree_widget.$el.css('position') === 'fixed') {
+ setDocumentAsScrollParent();
+ }
+ $scroll_parent = getParentWithOverflow();
+ if ($scroll_parent && $scroll_parent.length && $scroll_parent[0].tagName !== 'HTML') {
+ this.$scroll_parent = $scroll_parent;
+ this.scroll_parent_top = this.$scroll_parent.offset().top;
+ } else {
+ setDocumentAsScrollParent();
+ }
+ return this.is_initialized = true;
+ };
+
+ ScrollHandler.prototype._ensureInit = function() {
+ if (!this.is_initialized) {
+ return this._initScrollParent();
+ }
+ };
+
+ ScrollHandler.prototype.checkScrolling = function() {
+ var hovered_area;
+ this._ensureInit();
+ hovered_area = this.tree_widget.dnd_handler.hovered_area;
+ if (hovered_area && hovered_area.top !== this.previous_top) {
+ this.previous_top = hovered_area.top;
+ if (this.$scroll_parent) {
+ return this._handleScrollingWithScrollParent(hovered_area);
+ } else {
+ return this._handleScrollingWithDocument(hovered_area);
+ }
+ }
+ };
+
+ ScrollHandler.prototype._handleScrollingWithScrollParent = function(area) {
+ var distance_bottom;
+ distance_bottom = this.scroll_parent_top + this.$scroll_parent[0].offsetHeight - area.bottom;
+ if (distance_bottom < 20) {
+ this.$scroll_parent[0].scrollTop += 20;
+ this.tree_widget.refreshHitAreas();
+ return this.previous_top = -1;
+ } else if ((area.top - this.scroll_parent_top) < 20) {
+ this.$scroll_parent[0].scrollTop -= 20;
+ this.tree_widget.refreshHitAreas();
+ return this.previous_top = -1;
+ }
+ };
+
+ ScrollHandler.prototype._handleScrollingWithDocument = function(area) {
+ var distance_top;
+ distance_top = area.top - $(document).scrollTop();
+ if (distance_top < 20) {
+ return $(document).scrollTop($(document).scrollTop() - 20);
+ } else if ($(window).height() - (area.bottom - $(document).scrollTop()) < 20) {
+ return $(document).scrollTop($(document).scrollTop() + 20);
+ }
+ };
+
+ ScrollHandler.prototype.scrollTo = function(top) {
+ var tree_top;
+ this._ensureInit();
+ if (this.$scroll_parent) {
+ return this.$scroll_parent[0].scrollTop = top;
+ } else {
+ tree_top = this.tree_widget.$el.offset().top;
+ return $(document).scrollTop(top + tree_top);
+ }
+ };
+
+ ScrollHandler.prototype.isScrolledIntoView = function(element) {
+ var $element, element_bottom, element_top, view_bottom, view_top;
+ this._ensureInit();
+ $element = $(element);
+ if (this.$scroll_parent) {
+ view_top = 0;
+ view_bottom = this.$scroll_parent.height();
+ element_top = $element.offset().top - this.scroll_parent_top;
+ element_bottom = element_top + $element.height();
+ } else {
+ view_top = $(window).scrollTop();
+ view_bottom = view_top + $(window).height();
+ element_top = $element.offset().top;
+ element_bottom = element_top + $element.height();
+ }
+ return (element_bottom <= view_bottom) && (element_top >= view_top);
+ };
+
+ return ScrollHandler;
+
+ })();
+
+ module.exports = ScrollHandler;
+
+},{}],9:[function(require,module,exports){
+ var $, SelectNodeHandler;
+
+ $ = jQuery;
+
+ SelectNodeHandler = (function() {
+ function SelectNodeHandler(tree_widget) {
+ this.tree_widget = tree_widget;
+ this.clear();
+ }
+
+ SelectNodeHandler.prototype.getSelectedNode = function() {
+ var selected_nodes;
+ selected_nodes = this.getSelectedNodes();
+ if (selected_nodes.length) {
+ return selected_nodes[0];
+ } else {
+ return false;
+ }
+ };
+
+ SelectNodeHandler.prototype.getSelectedNodes = function() {
+ var id, node, selected_nodes;
+ if (this.selected_single_node) {
+ return [this.selected_single_node];
+ } else {
+ selected_nodes = [];
+ for (id in this.selected_nodes) {
+ node = this.tree_widget.getNodeById(id);
+ if (node) {
+ selected_nodes.push(node);
+ }
+ }
+ return selected_nodes;
+ }
+ };
+
+ SelectNodeHandler.prototype.getSelectedNodesUnder = function(parent) {
+ var id, node, selected_nodes;
+ if (this.selected_single_node) {
+ if (parent.isParentOf(this.selected_single_node)) {
+ return [this.selected_single_node];
+ } else {
+ return [];
+ }
+ } else {
+ selected_nodes = [];
+ for (id in this.selected_nodes) {
+ node = this.tree_widget.getNodeById(id);
+ if (node && parent.isParentOf(node)) {
+ selected_nodes.push(node);
+ }
+ }
+ return selected_nodes;
+ }
+ };
+
+ SelectNodeHandler.prototype.isNodeSelected = function(node) {
+ if (!node) {
+ return false;
+ } else if (node.id) {
+ if (this.selected_nodes[node.id]) {
+ return true;
+ } else {
+ return false;
+ }
+ } else if (this.selected_single_node) {
+ return this.selected_single_node.element === node.element;
+ } else {
+ return false;
+ }
+ };
+
+ SelectNodeHandler.prototype.clear = function() {
+ this.selected_nodes = {};
+ return this.selected_single_node = null;
+ };
+
+ SelectNodeHandler.prototype.removeFromSelection = function(node, include_children) {
+ if (include_children == null) {
+ include_children = false;
+ }
+ if (!node.id) {
+ if (this.selected_single_node && node.element === this.selected_single_node.element) {
+ return this.selected_single_node = null;
+ }
+ } else {
+ delete this.selected_nodes[node.id];
+ if (include_children) {
+ return node.iterate((function(_this) {
+ return function(n) {
+ delete _this.selected_nodes[node.id];
+ return true;
+ };
+ })(this));
+ }
+ }
+ };
+
+ SelectNodeHandler.prototype.addToSelection = function(node) {
+ if (node.id) {
+ return this.selected_nodes[node.id] = true;
+ } else {
+ return this.selected_single_node = node;
+ }
+ };
+
+ return SelectNodeHandler;
+
+ })();
+
+ module.exports = SelectNodeHandler;
+
+},{}],10:[function(require,module,exports){
+
+ /*
+ Copyright 2013 Marco Braak
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+ var $, SimpleWidget,
+ slice = [].slice;
+
+ $ = jQuery;
+
+ SimpleWidget = (function() {
+ SimpleWidget.prototype.defaults = {};
+
+ function SimpleWidget(el, options) {
+ this.$el = $(el);
+ this.options = $.extend({}, this.defaults, options);
+ }
+
+ SimpleWidget.prototype.destroy = function() {
+ return this._deinit();
+ };
+
+ SimpleWidget.prototype._init = function() {
+ return null;
+ };
+
+ SimpleWidget.prototype._deinit = function() {
+ return null;
+ };
+
+ SimpleWidget.register = function(widget_class, widget_name) {
+ var callFunction, createWidget, destroyWidget, getDataKey, getWidgetData;
+ getDataKey = function() {
+ return "simple_widget_" + widget_name;
+ };
+ getWidgetData = function(el, data_key) {
+ var widget;
+ widget = $.data(el, data_key);
+ if (widget && (widget instanceof SimpleWidget)) {
+ return widget;
+ } else {
+ return null;
+ }
+ };
+ createWidget = function($el, options) {
+ var data_key, el, existing_widget, i, len, widget;
+ data_key = getDataKey();
+ for (i = 0, len = $el.length; i < len; i++) {
+ el = $el[i];
+ existing_widget = getWidgetData(el, data_key);
+ if (!existing_widget) {
+ widget = new widget_class(el, options);
+ if (!$.data(el, data_key)) {
+ $.data(el, data_key, widget);
+ }
+ widget._init();
+ }
+ }
+ return $el;
+ };
+ destroyWidget = function($el) {
+ var data_key, el, i, len, results, widget;
+ data_key = getDataKey();
+ results = [];
+ for (i = 0, len = $el.length; i < len; i++) {
+ el = $el[i];
+ widget = getWidgetData(el, data_key);
+ if (widget) {
+ widget.destroy();
+ }
+ results.push($.removeData(el, data_key));
+ }
+ return results;
+ };
+ callFunction = function($el, function_name, args) {
+ var el, i, len, result, widget, widget_function;
+ result = null;
+ for (i = 0, len = $el.length; i < len; i++) {
+ el = $el[i];
+ widget = $.data(el, getDataKey());
+ if (widget && (widget instanceof SimpleWidget)) {
+ widget_function = widget[function_name];
+ if (widget_function && (typeof widget_function === 'function')) {
+ result = widget_function.apply(widget, args);
+ }
+ }
+ }
+ return result;
+ };
+ return $.fn[widget_name] = function() {
+ var $el, args, argument1, function_name, options;
+ argument1 = arguments[0], args = 2 <= arguments.length ? slice.call(arguments, 1) : [];
+ $el = this;
+ if (argument1 === void 0 || typeof argument1 === 'object') {
+ options = argument1;
+ return createWidget($el, options);
+ } else if (typeof argument1 === 'string' && argument1[0] !== '_') {
+ function_name = argument1;
+ if (function_name === 'destroy') {
+ return destroyWidget($el);
+ } else if (function_name === 'get_widget_class') {
+ return widget_class;
+ } else {
+ return callFunction($el, function_name, args);
+ }
+ }
+ };
+ };
+
+ return SimpleWidget;
+
+ })();
+
+ module.exports = SimpleWidget;
+
+},{}],11:[function(require,module,exports){
+ var $, BorderDropHint, DragAndDropHandler, DragElement, ElementsRenderer, FolderElement, GhostDropHint, HitAreasGenerator, JqTreeWidget, KeyHandler, MouseWidget, Node, NodeElement, Position, SaveStateHandler, ScrollHandler, SelectNodeHandler, SimpleWidget, __version__, drag_and_drop_handler, node_module, ref, util_module,
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
+
+ __version__ = require('./version');
+
+ drag_and_drop_handler = require('./drag_and_drop_handler');
+
+ ElementsRenderer = require('./elements_renderer');
+
+ KeyHandler = require('./key_handler');
+
+ MouseWidget = require('./mouse.widget');
+
+ SaveStateHandler = require('./save_state_handler');
+
+ ScrollHandler = require('./scroll_handler');
+
+ SelectNodeHandler = require('./select_node_handler');
+
+ SimpleWidget = require('./simple.widget');
+
+ node_module = require('./node');
+
+ Node = node_module.Node;
+
+ Position = node_module.Position;
+
+ util_module = require('./util');
+
+ ref = require('./node_element'), BorderDropHint = ref.BorderDropHint, FolderElement = ref.FolderElement, GhostDropHint = ref.GhostDropHint, NodeElement = ref.NodeElement;
+
+ DragAndDropHandler = drag_and_drop_handler.DragAndDropHandler, DragElement = drag_and_drop_handler.DragElement, HitAreasGenerator = drag_and_drop_handler.HitAreasGenerator;
+
+ $ = jQuery;
+
+ JqTreeWidget = (function(superClass) {
+ extend(JqTreeWidget, superClass);
+
+ function JqTreeWidget() {
+ return JqTreeWidget.__super__.constructor.apply(this, arguments);
+ }
+
+ JqTreeWidget.prototype.BorderDropHint = BorderDropHint;
+
+ JqTreeWidget.prototype.DragElement = DragElement;
+
+ JqTreeWidget.prototype.DragAndDropHandler = DragAndDropHandler;
+
+ JqTreeWidget.prototype.ElementsRenderer = ElementsRenderer;
+
+ JqTreeWidget.prototype.GhostDropHint = GhostDropHint;
+
+ JqTreeWidget.prototype.HitAreasGenerator = HitAreasGenerator;
+
+ JqTreeWidget.prototype.Node = Node;
+
+ JqTreeWidget.prototype.SaveStateHandler = SaveStateHandler;
+
+ JqTreeWidget.prototype.ScrollHandler = ScrollHandler;
+
+ JqTreeWidget.prototype.SelectNodeHandler = SelectNodeHandler;
+
+ JqTreeWidget.prototype.defaults = {
+ autoOpen: false,
+ saveState: false,
+ dragAndDrop: false,
+ selectable: true,
+ useContextMenu: true,
+ onCanSelectNode: null,
+ onSetStateFromStorage: null,
+ onGetStateFromStorage: null,
+ onCreateLi: null,
+ onIsMoveHandle: null,
+ onCanMove: null,
+ onCanMoveTo: null,
+ onLoadFailed: null,
+ autoEscape: true,
+ dataUrl: null,
+ closedIcon: null,
+ openedIcon: '&#x25bc;',
+ slide: true,
+ nodeClass: Node,
+ dataFilter: null,
+ keyboardSupport: true,
+ openFolderDelay: 500,
+ rtl: null,
+ onDragMove: null,
+ onDragStop: null,
+ buttonLeft: true,
+ onLoading: null
+ };
+
+ JqTreeWidget.prototype.toggle = function(node, slide) {
+ if (slide == null) {
+ slide = null;
+ }
+ if (slide === null) {
+ slide = this.options.slide;
+ }
+ if (node.is_open) {
+ this.closeNode(node, slide);
+ } else {
+ this.openNode(node, slide);
+ }
+ return this.element;
+ };
+
+ JqTreeWidget.prototype.getTree = function() {
+ return this.tree;
+ };
+
+ JqTreeWidget.prototype.selectNode = function(node) {
+ this._selectNode(node, false);
+ return this.element;
+ };
+
+ JqTreeWidget.prototype._selectNode = function(node, must_toggle) {
+ var canSelect, deselected_node, openParents, saveState;
+ if (must_toggle == null) {
+ must_toggle = false;
+ }
+ if (!this.select_node_handler) {
+ return;
+ }
+ canSelect = (function(_this) {
+ return function() {
+ if (_this.options.onCanSelectNode) {
+ return _this.options.selectable && _this.options.onCanSelectNode(node);
+ } else {
+ return _this.options.selectable;
+ }
+ };
+ })(this);
+ openParents = (function(_this) {
+ return function() {
+ var parent;
+ parent = node.parent;
+ if (parent && parent.parent && !parent.is_open) {
+ return _this.openNode(parent, false);
+ }
+ };
+ })(this);
+ saveState = (function(_this) {
+ return function() {
+ if (_this.options.saveState) {
+ return _this.save_state_handler.saveState();
+ }
+ };
+ })(this);
+ if (!node) {
+ this._deselectCurrentNode();
+ saveState();
+ return;
+ }
+ if (!canSelect()) {
+ return;
+ }
+ if (this.select_node_handler.isNodeSelected(node)) {
+ if (must_toggle) {
+ this._deselectCurrentNode();
+ this._triggerEvent('tree.select', {
+ node: null,
+ previous_node: node
+ });
+ }
+ } else {
+ deselected_node = this.getSelectedNode();
+ this._deselectCurrentNode();
+ this.addToSelection(node);
+ this._triggerEvent('tree.select', {
+ node: node,
+ deselected_node: deselected_node
+ });
+ openParents();
+ }
+ return saveState();
+ };
+
+ JqTreeWidget.prototype.getSelectedNode = function() {
+ if (this.select_node_handler) {
+ return this.select_node_handler.getSelectedNode();
+ } else {
+ return null;
+ }
+ };
+
+ JqTreeWidget.prototype.toJson = function() {
+ return JSON.stringify(this.tree.getData());
+ };
+
+ JqTreeWidget.prototype.loadData = function(data, parent_node) {
+ this._loadData(data, parent_node);
+ return this.element;
+ };
+
+
+ /*
+ signatures:
+ - loadDataFromUrl(url, parent_node=null, on_finished=null)
+ loadDataFromUrl('/my_data');
+ loadDataFromUrl('/my_data', node1);
+ loadDataFromUrl('/my_data', node1, function() { console.log('finished'); });
+ loadDataFromUrl('/my_data', null, function() { console.log('finished'); });
+
+ - loadDataFromUrl(parent_node=null, on_finished=null)
+ loadDataFromUrl();
+ loadDataFromUrl(node1);
+ loadDataFromUrl(null, function() { console.log('finished'); });
+ loadDataFromUrl(node1, function() { console.log('finished'); });
+ */
+
+ JqTreeWidget.prototype.loadDataFromUrl = function(param1, param2, param3) {
+ if ($.type(param1) === 'string') {
+ this._loadDataFromUrl(param1, param2, param3);
+ } else {
+ this._loadDataFromUrl(null, param1, param2);
+ }
+ return this.element;
+ };
+
+ JqTreeWidget.prototype.reload = function(on_finished) {
+ this._loadDataFromUrl(null, null, on_finished);
+ return this.element;
+ };
+
+ JqTreeWidget.prototype._loadDataFromUrl = function(url_info, parent_node, on_finished) {
+ var $el, addLoadingClass, handeLoadData, handleError, handleSuccess, loadDataFromUrlInfo, parseUrlInfo, removeLoadingClass;
+ $el = null;
+ addLoadingClass = (function(_this) {
+ return function() {
+ if (parent_node) {
+ $el = $(parent_node.element);
+ } else {
+ $el = _this.element;
+ }
+ $el.addClass('jqtree-loading');
+ return _this._notifyLoading(true, parent_node, $el);
+ };
+ })(this);
+ removeLoadingClass = (function(_this) {
+ return function() {
+ if ($el) {
+ $el.removeClass('jqtree-loading');
+ return _this._notifyLoading(false, parent_node, $el);
+ }
+ };
+ })(this);
+ parseUrlInfo = function() {
+ if ($.type(url_info) === 'string') {
+ return {
+ url: url_info
+ };
+ }
+ if (!url_info.method) {
+ url_info.method = 'get';
+ }
+ return url_info;
+ };
+ handeLoadData = (function(_this) {
+ return function(data) {
+ removeLoadingClass();
+ _this._loadData(data, parent_node);
+ if (on_finished && $.isFunction(on_finished)) {
+ return on_finished();
+ }
+ };
+ })(this);
+ handleSuccess = (function(_this) {
+ return function(response) {
+ var data;
+ if ($.isArray(response) || typeof response === 'object') {
+ data = response;
+ } else if (data != null) {
+ data = $.parseJSON(response);
+ } else {
+ data = [];
+ }
+ if (_this.options.dataFilter) {
+ data = _this.options.dataFilter(data);
+ }
+ return handeLoadData(data);
+ };
+ })(this);
+ handleError = (function(_this) {
+ return function(response) {
+ removeLoadingClass();
+ if (_this.options.onLoadFailed) {
+ return _this.options.onLoadFailed(response);
+ }
+ };
+ })(this);
+ loadDataFromUrlInfo = function() {
+ url_info = parseUrlInfo();
+ return $.ajax($.extend({}, url_info, {
+ method: url_info.method != null ? url_info.method.toUpperCase() : 'GET',
+ cache: false,
+ dataType: 'json',
+ success: handleSuccess,
+ error: handleError
+ }));
+ };
+ if (!url_info) {
+ url_info = this._getDataUrlInfo(parent_node);
+ }
+ addLoadingClass();
+ if (!url_info) {
+ removeLoadingClass();
+ } else if ($.isArray(url_info)) {
+ handeLoadData(url_info);
+ } else {
+ loadDataFromUrlInfo();
+ }
+ };
+
+ JqTreeWidget.prototype._loadData = function(data, parent_node) {
+ var deselectNodes, loadSubtree;
+ if (parent_node == null) {
+ parent_node = null;
+ }
+ deselectNodes = (function(_this) {
+ return function() {
+ var i, len, n, selected_nodes_under_parent;
+ if (_this.select_node_handler) {
+ selected_nodes_under_parent = _this.select_node_handler.getSelectedNodesUnder(parent_node);
+ for (i = 0, len = selected_nodes_under_parent.length; i < len; i++) {
+ n = selected_nodes_under_parent[i];
+ _this.select_node_handler.removeFromSelection(n);
+ }
+ }
+ return null;
+ };
+ })(this);
+ loadSubtree = (function(_this) {
+ return function() {
+ parent_node.loadFromData(data);
+ parent_node.load_on_demand = false;
+ parent_node.is_loading = false;
+ return _this._refreshElements(parent_node);
+ };
+ })(this);
+ if (!data) {
+ return;
+ }
+ this._triggerEvent('tree.load_data', {
+ tree_data: data
+ });
+ if (!parent_node) {
+ this._initTree(data);
+ } else {
+ deselectNodes();
+ loadSubtree();
+ }
+ if (this.isDragging()) {
+ return this.dnd_handler.refresh();
+ }
+ };
+
+ JqTreeWidget.prototype.getNodeById = function(node_id) {
+ return this.tree.getNodeById(node_id);
+ };
+
+ JqTreeWidget.prototype.getNodeByName = function(name) {
+ return this.tree.getNodeByName(name);
+ };
+
+ JqTreeWidget.prototype.getNodesByProperty = function(key, value) {
+ return this.tree.getNodesByProperty(key, value);
+ };
+
+ JqTreeWidget.prototype.getNodeByHtmlElement = function(element) {
+ return this._getNode($(element));
+ };
+
+ JqTreeWidget.prototype.getNodeByCallback = function(callback) {
+ return this.tree.getNodeByCallback(callback);
+ };
+
+ JqTreeWidget.prototype.openNode = function(node, slide) {
+ if (slide == null) {
+ slide = null;
+ }
+ if (node) {
+ if (slide === null) {
+ slide = this.options.slide;
+ }
+ this._openNode(node, slide);
+ }
+ return this.element;
+ };
+
+ JqTreeWidget.prototype._openNode = function(node, slide, on_finished) {
+ var doOpenNode, parent;
+ if (slide == null) {
+ slide = true;
+ }
+ doOpenNode = (function(_this) {
+ return function(_node, _slide, _on_finished) {
+ var folder_element;
+ folder_element = new FolderElement(_node, _this);
+ return folder_element.open(_on_finished, _slide);
+ };
+ })(this);
+ if (node.isFolder()) {
+ if (node.load_on_demand) {
+ return this._loadFolderOnDemand(node, slide, on_finished);
+ } else {
+ parent = node.parent;
+ while (parent) {
+ if (parent.parent) {
+ doOpenNode(parent, false, null);
+ }
+ parent = parent.parent;
+ }
+ doOpenNode(node, slide, on_finished);
+ return this._saveState();
+ }
+ }
+ };
+
+ JqTreeWidget.prototype._loadFolderOnDemand = function(node, slide, on_finished) {
+ if (slide == null) {
+ slide = true;
+ }
+ node.is_loading = true;
+ return this._loadDataFromUrl(null, node, (function(_this) {
+ return function() {
+ return _this._openNode(node, slide, on_finished);
+ };
+ })(this));
+ };
+
+ JqTreeWidget.prototype.closeNode = function(node, slide) {
+ if (slide == null) {
+ slide = null;
+ }
+ if (slide === null) {
+ slide = this.options.slide;
+ }
+ if (node.isFolder()) {
+ new FolderElement(node, this).close(slide);
+ this._saveState();
+ }
+ return this.element;
+ };
+
+ JqTreeWidget.prototype.isDragging = function() {
+ if (this.dnd_handler) {
+ return this.dnd_handler.is_dragging;
+ } else {
+ return false;
+ }
+ };
+
+ JqTreeWidget.prototype.refreshHitAreas = function() {
+ this.dnd_handler.refresh();
+ return this.element;
+ };
+
+ JqTreeWidget.prototype.addNodeAfter = function(new_node_info, existing_node) {
+ var new_node;
+ new_node = existing_node.addAfter(new_node_info);
+ this._refreshElements(existing_node.parent);
+ return new_node;
+ };
+
+ JqTreeWidget.prototype.addNodeBefore = function(new_node_info, existing_node) {
+ var new_node;
+ new_node = existing_node.addBefore(new_node_info);
+ this._refreshElements(existing_node.parent);
+ return new_node;
+ };
+
+ JqTreeWidget.prototype.addParentNode = function(new_node_info, existing_node) {
+ var new_node;
+ new_node = existing_node.addParent(new_node_info);
+ this._refreshElements(new_node.parent);
+ return new_node;
+ };
+
+ JqTreeWidget.prototype.removeNode = function(node) {
+ var parent;
+ parent = node.parent;
+ if (parent) {
+ this.select_node_handler.removeFromSelection(node, true);
+ node.remove();
+ this._refreshElements(parent);
+ }
+ return this.element;
+ };
+
+ JqTreeWidget.prototype.appendNode = function(new_node_info, parent_node) {
+ var node;
+ parent_node = parent_node || this.tree;
+ node = parent_node.append(new_node_info);
+ this._refreshElements(parent_node);
+ return node;
+ };
+
+ JqTreeWidget.prototype.prependNode = function(new_node_info, parent_node) {
+ var node;
+ if (!parent_node) {
+ parent_node = this.tree;
+ }
+ node = parent_node.prepend(new_node_info);
+ this._refreshElements(parent_node);
+ return node;
+ };
+
+ JqTreeWidget.prototype.updateNode = function(node, data) {
+ var id_is_changed;
+ id_is_changed = data.id && data.id !== node.id;
+ if (id_is_changed) {
+ this.tree.removeNodeFromIndex(node);
+ }
+ node.setData(data);
+ if (id_is_changed) {
+ this.tree.addNodeToIndex(node);
+ }
+ if (typeof data === 'object' && data.children) {
+ node.removeChildren();
+ if (data.children.length) {
+ node.loadFromData(data.children);
+ }
+ }
+ this.renderer.renderFromNode(node);
+ this._selectCurrentNode();
+ return this.element;
+ };
+
+ JqTreeWidget.prototype.moveNode = function(node, target_node, position) {
+ var position_index;
+ position_index = Position.nameToIndex(position);
+ this.tree.moveNode(node, target_node, position_index);
+ this._refreshElements();
+ return this.element;
+ };
+
+ JqTreeWidget.prototype.getStateFromStorage = function() {
+ return this.save_state_handler.getStateFromStorage();
+ };
+
+ JqTreeWidget.prototype.addToSelection = function(node) {
+ if (node) {
+ this.select_node_handler.addToSelection(node);
+ this._getNodeElementForNode(node).select();
+ this._saveState();
+ }
+ return this.element;
+ };
+
+ JqTreeWidget.prototype.getSelectedNodes = function() {
+ return this.select_node_handler.getSelectedNodes();
+ };
+
+ JqTreeWidget.prototype.isNodeSelected = function(node) {
+ return this.select_node_handler.isNodeSelected(node);
+ };
+
+ JqTreeWidget.prototype.removeFromSelection = function(node) {
+ this.select_node_handler.removeFromSelection(node);
+ this._getNodeElementForNode(node).deselect();
+ this._saveState();
+ return this.element;
+ };
+
+ JqTreeWidget.prototype.scrollToNode = function(node) {
+ var $element, top;
+ $element = $(node.element);
+ top = $element.offset().top - this.$el.offset().top;
+ this.scroll_handler.scrollTo(top);
+ return this.element;
+ };
+
+ JqTreeWidget.prototype.getState = function() {
+ return this.save_state_handler.getState();
+ };
+
+ JqTreeWidget.prototype.setState = function(state) {
+ this.save_state_handler.setInitialState(state);
+ this._refreshElements();
+ return this.element;
+ };
+
+ JqTreeWidget.prototype.setOption = function(option, value) {
+ this.options[option] = value;
+ return this.element;
+ };
+
+ JqTreeWidget.prototype.moveDown = function() {
+ if (this.key_handler) {
+ this.key_handler.moveDown();
+ }
+ return this.element;
+ };
+
+ JqTreeWidget.prototype.moveUp = function() {
+ if (this.key_handler) {
+ this.key_handler.moveUp();
+ }
+ return this.element;
+ };
+
+ JqTreeWidget.prototype.getVersion = function() {
+ return __version__;
+ };
+
+ JqTreeWidget.prototype._init = function() {
+ JqTreeWidget.__super__._init.call(this);
+ this.element = this.$el;
+ this.mouse_delay = 300;
+ this.is_initialized = false;
+ this.options.rtl = this._getRtlOption();
+ if (!this.options.closedIcon) {
+ this.options.closedIcon = this._getDefaultClosedIcon();
+ }
+ this.renderer = new ElementsRenderer(this);
+ if (SaveStateHandler != null) {
+ this.save_state_handler = new SaveStateHandler(this);
+ } else {
+ this.options.saveState = false;
+ }
+ if (SelectNodeHandler != null) {
+ this.select_node_handler = new SelectNodeHandler(this);
+ }
+ if (DragAndDropHandler != null) {
+ this.dnd_handler = new DragAndDropHandler(this);
+ } else {
+ this.options.dragAndDrop = false;
+ }
+ if (ScrollHandler != null) {
+ this.scroll_handler = new ScrollHandler(this);
+ }
+ if ((KeyHandler != null) && (SelectNodeHandler != null)) {
+ this.key_handler = new KeyHandler(this);
+ }
+ this._initData();
+ this.element.click($.proxy(this._click, this));
+ this.element.dblclick($.proxy(this._dblclick, this));
+ if (this.options.useContextMenu) {
+ return this.element.bind('contextmenu', $.proxy(this._contextmenu, this));
+ }
+ };
+
+ JqTreeWidget.prototype._deinit = function() {
+ this.element.empty();
+ this.element.unbind();
+ if (this.key_handler) {
+ this.key_handler.deinit();
+ }
+ this.tree = null;
+ return JqTreeWidget.__super__._deinit.call(this);
+ };
+
+ JqTreeWidget.prototype._initData = function() {
+ var data_url;
+ if (this.options.data) {
+ return this._loadData(this.options.data);
+ } else {
+ data_url = this._getDataUrlInfo();
+ if (data_url) {
+ return this._loadDataFromUrl();
+ } else {
+ return this._loadData([]);
+ }
+ }
+ };
+
+ JqTreeWidget.prototype._getDataUrlInfo = function(node) {
+ var data_url, getUrlFromString;
+ data_url = this.options.dataUrl || this.element.data('url');
+ getUrlFromString = (function(_this) {
+ return function() {
+ var data, selected_node_id, url_info;
+ url_info = {
+ url: data_url
+ };
+ if (node && node.id) {
+ data = {
+ node: node.id
+ };
+ url_info['data'] = data;
+ } else {
+ selected_node_id = _this._getNodeIdToBeSelected();
+ if (selected_node_id) {
+ data = {
+ selected_node: selected_node_id
+ };
+ url_info['data'] = data;
+ }
+ }
+ return url_info;
+ };
+ })(this);
+ if ($.isFunction(data_url)) {
+ return data_url(node);
+ } else if ($.type(data_url) === 'string') {
+ return getUrlFromString();
+ } else {
+ return data_url;
+ }
+ };
+
+ JqTreeWidget.prototype._getNodeIdToBeSelected = function() {
+ if (this.options.saveState) {
+ return this.save_state_handler.getNodeIdToBeSelected();
+ } else {
+ return null;
+ }
+ };
+
+ JqTreeWidget.prototype._initTree = function(data) {
+ var doInit, must_load_on_demand;
+ doInit = (function(_this) {
+ return function() {
+ if (!_this.is_initialized) {
+ _this.is_initialized = true;
+ return _this._triggerEvent('tree.init');
+ }
+ };
+ })(this);
+ this.tree = new this.options.nodeClass(null, true, this.options.nodeClass);
+ if (this.select_node_handler) {
+ this.select_node_handler.clear();
+ }
+ this.tree.loadFromData(data);
+ must_load_on_demand = this._setInitialState();
+ this._refreshElements();
+ if (!must_load_on_demand) {
+ return doInit();
+ } else {
+ return this._setInitialStateOnDemand(doInit);
+ }
+ };
+
+ JqTreeWidget.prototype._setInitialState = function() {
+ var autoOpenNodes, is_restored, must_load_on_demand, ref1, restoreState;
+ restoreState = (function(_this) {
+ return function() {
+ var must_load_on_demand, state;
+ if (!(_this.options.saveState && _this.save_state_handler)) {
+ return [false, false];
+ } else {
+ state = _this.save_state_handler.getStateFromStorage();
+ if (!state) {
+ return [false, false];
+ } else {
+ must_load_on_demand = _this.save_state_handler.setInitialState(state);
+ return [true, must_load_on_demand];
+ }
+ }
+ };
+ })(this);
+ autoOpenNodes = (function(_this) {
+ return function() {
+ var max_level, must_load_on_demand;
+ if (_this.options.autoOpen === false) {
+ return false;
+ }
+ max_level = _this._getAutoOpenMaxLevel();
+ must_load_on_demand = false;
+ _this.tree.iterate(function(node, level) {
+ if (node.load_on_demand) {
+ must_load_on_demand = true;
+ return false;
+ } else if (!node.hasChildren()) {
+ return false;
+ } else {
+ node.is_open = true;
+ return level !== max_level;
+ }
+ });
+ return must_load_on_demand;
+ };
+ })(this);
+ ref1 = restoreState(), is_restored = ref1[0], must_load_on_demand = ref1[1];
+ if (!is_restored) {
+ must_load_on_demand = autoOpenNodes();
+ }
+ return must_load_on_demand;
+ };
+
+ JqTreeWidget.prototype._setInitialStateOnDemand = function(cb_finished) {
+ var autoOpenNodes, restoreState;
+ restoreState = (function(_this) {
+ return function() {
+ var state;
+ if (!(_this.options.saveState && _this.save_state_handler)) {
+ return false;
+ } else {
+ state = _this.save_state_handler.getStateFromStorage();
+ if (!state) {
+ return false;
+ } else {
+ _this.save_state_handler.setInitialStateOnDemand(state, cb_finished);
+ return true;
+ }
+ }
+ };
+ })(this);
+ autoOpenNodes = (function(_this) {
+ return function() {
+ var loadAndOpenNode, loading_count, max_level, openNodes;
+ max_level = _this._getAutoOpenMaxLevel();
+ loading_count = 0;
+ loadAndOpenNode = function(node) {
+ loading_count += 1;
+ return _this._openNode(node, false, function() {
+ loading_count -= 1;
+ return openNodes();
+ });
+ };
+ openNodes = function() {
+ _this.tree.iterate(function(node, level) {
+ if (node.load_on_demand) {
+ if (!node.is_loading) {
+ loadAndOpenNode(node);
+ }
+ return false;
+ } else {
+ _this._openNode(node, false);
+ return level !== max_level;
+ }
+ });
+ if (loading_count === 0) {
+ return cb_finished();
+ }
+ };
+ return openNodes();
+ };
+ })(this);
+ if (!restoreState()) {
+ return autoOpenNodes();
+ }
+ };
+
+ JqTreeWidget.prototype._getAutoOpenMaxLevel = function() {
+ if (this.options.autoOpen === true) {
+ return -1;
+ } else {
+ return parseInt(this.options.autoOpen);
+ }
+ };
+
+
+ /*
+ Redraw the tree or part of the tree.
+ * from_node: redraw this subtree
+ */
+
+ JqTreeWidget.prototype._refreshElements = function(from_node) {
+ if (from_node == null) {
+ from_node = null;
+ }
+ this.renderer.render(from_node);
+ return this._triggerEvent('tree.refresh');
+ };
+
+ JqTreeWidget.prototype._click = function(e) {
+ var click_target, event, node;
+ click_target = this._getClickTarget(e.target);
+ if (click_target) {
+ if (click_target.type === 'button') {
+ this.toggle(click_target.node, this.options.slide);
+ e.preventDefault();
+ return e.stopPropagation();
+ } else if (click_target.type === 'label') {
+ node = click_target.node;
+ event = this._triggerEvent('tree.click', {
+ node: node,
+ click_event: e
+ });
+ if (!event.isDefaultPrevented()) {
+ return this._selectNode(node, true);
+ }
+ }
+ }
+ };
+
+ JqTreeWidget.prototype._dblclick = function(e) {
+ var click_target;
+ click_target = this._getClickTarget(e.target);
+ if (click_target && click_target.type === 'label') {
+ return this._triggerEvent('tree.dblclick', {
+ node: click_target.node,
+ click_event: e
+ });
+ }
+ };
+
+ JqTreeWidget.prototype._getClickTarget = function(element) {
+ var $button, $el, $target, node;
+ $target = $(element);
+ $button = $target.closest('.jqtree-toggler');
+ if ($button.length) {
+ node = this._getNode($button);
+ if (node) {
+ return {
+ type: 'button',
+ node: node
+ };
+ }
+ } else {
+ $el = $target.closest('.jqtree-element');
+ if ($el.length) {
+ node = this._getNode($el);
+ if (node) {
+ return {
+ type: 'label',
+ node: node
+ };
+ }
+ }
+ }
+ return null;
+ };
+
+ JqTreeWidget.prototype._getNode = function($element) {
+ var $li;
+ $li = $element.closest('li.jqtree_common');
+ if ($li.length === 0) {
+ return null;
+ } else {
+ return $li.data('node');
+ }
+ };
+
+ JqTreeWidget.prototype._getNodeElementForNode = function(node) {
+ if (node.isFolder()) {
+ return new FolderElement(node, this);
+ } else {
+ return new NodeElement(node, this);
+ }
+ };
+
+ JqTreeWidget.prototype._getNodeElement = function($element) {
+ var node;
+ node = this._getNode($element);
+ if (node) {
+ return this._getNodeElementForNode(node);
+ } else {
+ return null;
+ }
+ };
+
+ JqTreeWidget.prototype._contextmenu = function(e) {
+ var $div, node;
+ $div = $(e.target).closest('ul.jqtree-tree .jqtree-element');
+ if ($div.length) {
+ node = this._getNode($div);
+ if (node) {
+ e.preventDefault();
+ e.stopPropagation();
+ this._triggerEvent('tree.contextmenu', {
+ node: node,
+ click_event: e
+ });
+ return false;
+ }
+ }
+ };
+
+ JqTreeWidget.prototype._saveState = function() {
+ if (this.options.saveState) {
+ return this.save_state_handler.saveState();
+ }
+ };
+
+ JqTreeWidget.prototype._mouseCapture = function(position_info) {
+ if (this.options.dragAndDrop) {
+ return this.dnd_handler.mouseCapture(position_info);
+ } else {
+ return false;
+ }
+ };
+
+ JqTreeWidget.prototype._mouseStart = function(position_info) {
+ if (this.options.dragAndDrop) {
+ return this.dnd_handler.mouseStart(position_info);
+ } else {
+ return false;
+ }
+ };
+
+ JqTreeWidget.prototype._mouseDrag = function(position_info) {
+ var result;
+ if (this.options.dragAndDrop) {
+ result = this.dnd_handler.mouseDrag(position_info);
+ if (this.scroll_handler) {
+ this.scroll_handler.checkScrolling();
+ }
+ return result;
+ } else {
+ return false;
+ }
+ };
+
+ JqTreeWidget.prototype._mouseStop = function(position_info) {
+ if (this.options.dragAndDrop) {
+ return this.dnd_handler.mouseStop(position_info);
+ } else {
+ return false;
+ }
+ };
+
+ JqTreeWidget.prototype._triggerEvent = function(event_name, values) {
+ var event;
+ event = $.Event(event_name);
+ $.extend(event, values);
+ this.element.trigger(event);
+ return event;
+ };
+
+ JqTreeWidget.prototype.testGenerateHitAreas = function(moving_node) {
+ this.dnd_handler.current_item = this._getNodeElementForNode(moving_node);
+ this.dnd_handler.generateHitAreas();
+ return this.dnd_handler.hit_areas;
+ };
+
+ JqTreeWidget.prototype._selectCurrentNode = function() {
+ var node, node_element;
+ node = this.getSelectedNode();
+ if (node) {
+ node_element = this._getNodeElementForNode(node);
+ if (node_element) {
+ return node_element.select();
+ }
+ }
+ };
+
+ JqTreeWidget.prototype._deselectCurrentNode = function() {
+ var node;
+ node = this.getSelectedNode();
+ if (node) {
+ return this.removeFromSelection(node);
+ }
+ };
+
+ JqTreeWidget.prototype._getDefaultClosedIcon = function() {
+ if (this.options.rtl) {
+ return '&#x25c0;';
+ } else {
+ return '&#x25ba;';
+ }
+ };
+
+ JqTreeWidget.prototype._getRtlOption = function() {
+ var data_rtl;
+ if (this.options.rtl !== null) {
+ return this.options.rtl;
+ } else {
+ data_rtl = this.element.data('rtl');
+ if ((data_rtl != null) && data_rtl !== false) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+ };
+
+ JqTreeWidget.prototype._notifyLoading = function(is_loading, node, $el) {
+ if (this.options.onLoading) {
+ return this.options.onLoading(is_loading, node, $el);
+ }
+ };
+
+ return JqTreeWidget;
+
+ })(MouseWidget);
+
+ JqTreeWidget.getModule = function(name) {
+ var modules;
+ modules = {
+ 'node': node_module,
+ 'util': util_module,
+ 'drag_and_drop_handler': drag_and_drop_handler
+ };
+ return modules[name];
+ };
+
+ SimpleWidget.register(JqTreeWidget, 'tree');
+
+},{"./drag_and_drop_handler":1,"./elements_renderer":2,"./key_handler":3,"./mouse.widget":4,"./node":5,"./node_element":6,"./save_state_handler":7,"./scroll_handler":8,"./select_node_handler":9,"./simple.widget":10,"./util":12,"./version":13}],12:[function(require,module,exports){
+ var _indexOf, getBoolString, html_escape, indexOf, isInt;
+
+ _indexOf = function(array, item) {
+ var i, j, len, value;
+ for (i = j = 0, len = array.length; j < len; i = ++j) {
+ value = array[i];
+ if (value === item) {
+ return i;
+ }
+ }
+ return -1;
+ };
+
+ indexOf = function(array, item) {
+ if (array.indexOf) {
+ return array.indexOf(item);
+ } else {
+ return _indexOf(array, item);
+ }
+ };
+
+ isInt = function(n) {
+ return typeof n === 'number' && n % 1 === 0;
+ };
+
+ html_escape = function(string) {
+ return ('' + string).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g, '&#x2F;');
+ };
+
+ getBoolString = function(value) {
+ if (value) {
+ return 'true';
+ } else {
+ return 'false';
+ }
+ };
+
+ module.exports = {
+ _indexOf: _indexOf,
+ getBoolString: getBoolString,
+ html_escape: html_escape,
+ indexOf: indexOf,
+ isInt: isInt
+ };
+
+},{}],13:[function(require,module,exports){
+ module.exports = '1.3.6';
+
+},{}]},{},[11]); \ No newline at end of file
diff --git a/common/src/main/webapp/framework/css/RMain.css b/common/src/main/webapp/framework/css/RMain.css
new file mode 100644
index 0000000..0a74032
--- /dev/null
+++ b/common/src/main/webapp/framework/css/RMain.css
@@ -0,0 +1,239 @@
+/* Copyright 2016, Huawei Technologies Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#iemp_layout_container {
+ padding: 0px;
+ margin: 1px auto;
+ width: 100%;
+ height: 100%;
+}
+
+#iemp_layout_container .three-cols-layout {
+ width: 100%;
+ height: 100%;
+ border-collapse: collapse;
+ margin-left: 0px;
+ margin-top: 0px;
+ margin-right: 0px;
+ margin-bottom: 0px;
+}
+
+#iemp_layout_container .three-cols-layout {
+ width: 100%;
+ height: 100%;
+ border-collapse: collapse;
+ margin-left: 0px;
+ margin-top: 0px;
+ margin-right: 0px;
+ margin-bottom: 0px;
+}
+
+#iemp_layout_container .three-cols-column.three-cols-left {
+ width: 215px;
+ background-color: #f5f5f5;
+}
+
+.accordion_parent {
+ position: relative;
+ width: 220px;
+ background-color: #f5f5f5;
+}
+
+.openo-accordion-resizable-handle {
+ z-index: 1 !important;
+ cursor: e-resize;
+ width: 7px;
+ right: -5px;
+ top: 0;
+ height: 100%;
+ position: absolute;
+ font-size: .1px;
+ display: block;
+}
+
+.openoAccordian_accordionmenu {
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+ line-height: 17px;
+}
+
+.openoAccordian_accordionmenu li {
+ min-width: 75px;
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+ color: #000;
+ clear: both;
+}
+
+.openo_accordion_ui-icon-collapse, .openo_accordion_ui-icon-expand {
+ display: block;
+ float: left;
+ margin-bottom: -1px;
+ border-bottom: 1px solid #e5e5e5;
+ cursor: pointer;
+ width: 13px;
+ padding-top: 26px;
+}
+
+.openo_accordion_ui-icon-expand {
+ background: url(../images/collapse_arrow.png) right 20px no-repeat;
+ margin-top: 8px;
+}
+
+.openo_accordion_ui-icon-expand.current {
+ background: url(../images/expand_arrow.png) right 20px no-repeat;
+}
+
+.openoAccordian_showHideArrow_hide, .openoAccordian_showHideArrow_show {
+ display: block;
+ position: absolute;
+ right: 0;
+ top: 4px;
+ width: 18px;
+ height: 41px;
+ cursor: pointer;
+ background-color: #f5f5f5;
+}
+
+.openoAccordian_showHideArrow_hide {
+ background-image: url(../images/openo.png);
+ background-position: -7px 0 !important;
+ border-collapse: separate;
+ /*box-shadow: inset -1px 0 0 #e5e5e5;*/
+}
+
+a.header.opened, a.header.closed {
+ font-size: 16px;
+ padding-top: 24px;
+ padding-bottom: 25px;
+ color: #999999;
+}
+
+.openoAccordian_accordionmenu .closed, .openoAccordian_accordionmenu .opened {
+ padding-right: 10px;
+ background-position: 98% 50%;
+ background-repeat: no-repeat;
+}
+
+.openoAccordian_accordionmenu li a {
+ padding: 11px 10px 12px;
+ color: #333333;
+ margin-right: 1px;
+ margin-top: -1px;
+ text-align: left !important;
+ font-family: "Microsoft Yahei", SimSun, Arial, Tahoma;
+ font-size: 14px;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+ border-top: 1px solid #e5e5e5;
+ border-bottom: 1px solid #e5e5e5;
+ /*height: 19px;*/
+}
+
+.openoAccordian_accordionmenu ul {
+ margin: 0;
+ padding: 0;
+ overflow: hidden;
+}
+
+.openoAccordian_accordionmenu a {
+ display: block;
+ text-decoration: none;
+}
+
+a {
+ color: #428bca;
+ text-decoration: none;
+ background: 0 0;
+}
+
+.bar {
+ height: 834px;
+ width: 18px;
+ background: #f8f8f8;
+ display: none;
+}
+
+.bar span {
+ width: 13px;
+ height: 34px;
+ background-image: url(../images/openo.png);
+ background-position: -39px 0 !important;
+ display: block;
+ /*margin-top: -430px;*/
+}
+
+#accordionmenuid_ul_0_0_brAppTopMenuID_UL li {
+ cursor: pointer;
+}
+
+#puer_base_openo {
+ border: 1px solid #ddd;
+}
+
+.openo_accordion_selected {
+ margin-left: 0;
+ margin-right: 0;
+ background: #fafafa;
+ border-left: 3px solid #4ac9ff !important;
+ box-shadow: none;
+ position: relative;
+}
+
+a:hover {
+ color: #4ac9ff !important;
+}
+
+.openoAccordian_accordionmenu li.openo_accordion_selected a {
+ position: relative;
+ left: -3px;
+ color: #009ae7;
+}
+
+.openo-accordion-resizable-handle {
+ z-index: 1 !important;
+ cursor: e-resize;
+ width: 7px;
+ right: -5px;
+ top: 0;
+ height: 100%;
+ position: absolute;
+ font-size: .1px;
+ display: block;
+}
+
+#iframeContainer iframe {
+ width: 100%;
+ height: 100%;
+ border: 0;
+}
+
+#accordionContent, #iframeContainer {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ width: 100%;
+ height: 100%;
+}
+
+.openoAccordian_showHideArrow_show {
+ background-image: url(../images/openo.png);
+ background-position: -39px 0 !important;
+ box-shadow: inset 1px 0 0 #e5e5e5, inset -1px 0 0 #e5e5e5;
+} \ No newline at end of file
diff --git a/common/src/main/webapp/framework/css/VMMain.css b/common/src/main/webapp/framework/css/VMMain.css
new file mode 100644
index 0000000..a1c0866
--- /dev/null
+++ b/common/src/main/webapp/framework/css/VMMain.css
@@ -0,0 +1,758 @@
+/* Copyright 2016, Huawei Technologies Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+body {
+ font-family: '微软雅黑';
+ font-size: 12px;
+ color: #333;
+ background: #fafafa;
+}
+
+button {
+ outline: none;
+}
+
+ul, li {
+ list-style: none;
+ padding: 0;
+ margin: 0;
+}
+
+.titleFont {
+ font-size: 16px;
+}
+
+.separator-line {
+ height: 1px;
+ width: 100%;
+ border: 1px solid #ddd;
+ margin: 6px 0 15px 0;
+}
+
+.uploadBtn {
+ overflow: hidden;
+}
+
+.creat-btn {
+ padding: 0 14px;
+ height: 24px;
+ float: left;
+ cursor: pointer;
+ text-decoration: none;
+ outline: 0;
+ border: 1px solid #d3d3d3;
+ text-align: center;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
+ background: #fafafa;
+ background: -moz-linear-gradient(top, #fff, #fafafa);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(100%, #fafafa));
+ background: -webkit-linear-gradient(top, #fff, #fafafa);
+ background: linear-gradient(to bottom, #fff, #fafafa);
+ border-radius: 6px;
+ background: #fff url(../images/add.png) no-repeat 5px center;
+ padding-left: 20px;
+}
+
+.creat-btn:hover {
+ color: #009ae7;
+ border: 1px solid #4AC9FF
+}
+
+.creat-btn:active {
+ color: #000;
+ border: 1px solid #4AC9FF
+}
+
+/*.creat-btn{
+ background: #fff url(../image/add.png) no-repeat 5px center;
+ border: 1px solid #ddd;
+ float: left;
+}
+.creat-btn:hover{
+ background: #428bca;
+ color: #fff;
+ border:1px solid #428bca;
+}*/
+.search {
+ width: 310px;
+ height: 30px;
+ float: right;
+}
+
+.search-text {
+ width: 250px;
+ float: left;
+ margin-right: 6px;
+}
+
+.search-btn {
+ height: 30px;
+ background: #fff;
+ border: 1px solid #ddd;
+ float: left;
+}
+
+#ict_virtualApplication_table_div {
+ margin-top: 15px;
+}
+
+.table > thead > tr.active > th {
+ border: 1px solid #ddd !important;
+ border-bottom: 0;
+ background: #f0f0f0;
+}
+
+/*.table tbody tr:hover{
+ background: #e6fbe0!important;
+}*/
+.table tbody tr:last-child {
+ border-bottom: 1px solid #ddd;
+}
+
+.table-btn {
+ border: 1px solid #ccc;
+ border-radius: 3px;
+}
+
+.delete-btn {
+ background: url(../image/delete.png) no-repeat;
+ width: 16px;
+ height: 16px;
+ border: none;
+}
+
+.detail-btn {
+ background: url(../image/openo.png) no-repeat -343px -283px;
+ width: 16px;
+ height: 16px;
+ border: none;
+}
+
+.detail-btn.current {
+ background-position: -7px -314px;
+}
+
+.detail {
+ height: 200px;
+ border: 1px solid #ddd;
+ margin-top: 60px;
+}
+
+.detail-top ul {
+ height: 50px;
+ line-height: 50px;
+ border-bottom: 1px solid #ddd;
+ padding-left: 0px;
+ background: #fafafa;
+}
+
+.detail-top ul li {
+ float: left;
+ width: 120px;
+ text-align: center;
+ border-right: 1px solid #ddd;
+ cursor: pointer;
+}
+
+.detail-top ul li.current {
+ background: #fff;
+}
+
+.vmapp-margin {
+ margin-bottom: 10px;
+}
+
+.control-label .required {
+ color: #e02222;
+ font-size: 12px;
+ padding-left: 2px;
+}
+
+.form-group .control-label {
+ font-size: 12px;
+ font-weight: 400;
+}
+
+legend {
+ font-size: 12px;
+ font-weight: bold;
+}
+
+.pageGro {
+ width: 250px;
+ float: right;
+}
+
+.pageUp, .pageDown, .pageList, .pageList li {
+ float: left;
+ cursor: pointer;
+}
+
+.pageUp, .pageDown {
+ width: 60px;
+ height: 30px;
+ border: 1px solid #ddd;
+ text-align: center;
+ line-height: 30px;
+}
+
+.pageList li {
+ width: 30px;
+ height: 30px;
+ border: 1px solid #ddd;
+ text-align: center;
+ line-height: 30px;
+ border-left: none;
+}
+
+.pageList li.active {
+ background: #428bca;
+ color: #fff;
+ border-color: #428bca;
+}
+
+.pageDown {
+ border-left: none;
+}
+
+.headerLinkP {
+ padding-top: 17px;
+}
+
+.headerLinkP span {
+ font-size: 12px;
+ color: #666;
+ font-weight: normal !important;
+}
+
+label {
+ font-weight: normal !important;
+}
+
+table.userform tbody tr td {
+ display: table-cell;
+ padding-right: 10px;
+ padding-top: 10px;
+ font-size: 12px;
+ color: #333;
+}
+
+.table th, .table td {
+ padding-top: 3px !important;
+ padding-bottom: 3px !important;
+}
+
+.openoBrowseButton_element {
+ display: table;
+}
+
+.openo {
+ font-family: "Microsoft Yahei", SimSun, Arial, Tahoma;
+ font-size: 12px;
+ color: #000;
+}
+
+.openoBrowseButton_input {
+ width: 198px;
+ position: relative;
+ border: 1px solid #c3c3c3 !important;
+ height: 26px;
+ background-color: #f3f3f3;
+ border-radius: 4px 0 0 4px;
+ border-right: none;
+ padding: 0;
+}
+
+.buttonClassDefault, .buttonClassDefault:active {
+ cursor: pointer;
+ background-image: url(../images/openo.png);
+ background-position: -154px -7px !important;
+}
+
+.openoBrowseButton_button {
+ width: 27px;
+ border: 0;
+ float: right;
+ position: relative;
+ height: 26px;
+ right: 0;
+ top: 0;
+ border-radius: 0 4px 4px 0;
+ border-right: 1px solid #c3c3c3;
+ border-left: none;
+}
+
+.openo .openo-input, .openo.openo-input {
+ outline: 0;
+ border: 1px solid #c3c3c3;
+ box-shadow: 1px 1px #f6f6f6 inset;
+ background-color: #fff;
+ height: 26px;
+}
+
+.openoInput_openoDefaultText {
+ padding: 0 0 0 6px;
+ border-radius: 4px;
+ color: #000;
+ display: inline-block;
+ outline: 0;
+ box-shadow: 1px 1px #f6f6f6 inset;
+ font-size: 12px;
+ background: #fff;
+}
+
+div.openo-select {
+ border: 1px solid #c3c3c3;
+ border-radius: 4px;
+ background: url(../images/arrow-down-enable.png) right no-repeat #fff;
+ line-height: 24px;
+ padding-left: 3px;
+ display: block;
+}
+
+div.openo-select > input.openo-select-input {
+ border: none;
+ outline: 0;
+ line-height: 21px;
+ height: 21px;
+ padding-left: 3px;
+ border-right: solid 1px #c3c3c3;
+}
+
+.openo .openo-ellipsis, .openo.openo-ellipsis {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+
+a.openoButton_buttonClass, a.openoButton_buttonDisableClass, div.openoButton_buttonClass, div.openoButton_buttonDisableClass {
+ height: 26px;
+ float: left;
+ cursor: pointer;
+ text-decoration: none;
+ outline: 0;
+ border: 1px solid #d3d3d3;
+ text-align: center;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
+ background: #fafafa;
+ background: -moz-linear-gradient(top, #fff, #fafafa);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(100%, #fafafa));
+ background: -webkit-linear-gradient(top, #fff, #fafafa);
+ background: linear-gradient(to bottom, #fff, #fafafa);
+ border-radius: 6px;
+}
+
+.openoButton_buttonInnerClass {
+ padding: 0 19px;
+ border-radius: 6px;
+}
+
+.openoButton_buttonCenterText {
+ color: #000;
+ line-height: 24px;
+ white-space: nowrap;
+ width: auto !important;
+}
+
+.userHeader {
+ clear: left;
+ overflow: hidden;
+ margin-bottom: 10px;
+ padding: 10px 10px 0px 0px;
+}
+
+.openoButton_buttonGroupClass {
+ display: inline;
+}
+
+.openoButton_buttonGroupClass div.openoButton_buttonClass_parent:first-child {
+ margin-left: 0;
+}
+
+.openoButton_buttonLeftImg {
+ margin-right: 5px;
+}
+
+.openoButton_buttonLeftImg, .openoButton_buttonRightImg {
+ display: inline-block;
+ vertical-align: top;
+ width: 16px;
+ height: 16px;
+ margin-top: 4px;
+}
+
+.openo-table-pagination-wrapper {
+ height: 37px;
+}
+
+.openo-pagination {
+ display: block;
+ float: left;
+ overflow: hidden;
+ padding: 5px 0 0;
+ margin-top: 8px;
+}
+
+.openoPagination_openoPaginationLengthOptions:not(msie8) {
+ line-height: 24px;
+}
+
+.openoPagination_openoPaginationLengthOptions {
+ white-space: normal;
+ height: 24px;
+ float: left;
+ outline: 0;
+ line-height: 20px;
+ margin: 0 5px;
+}
+
+.openo-pagination-select {
+ height: 26px;
+ line-height: 22px;
+ text-align: center;
+ margin-right: -2px;
+ border: 1px solid #e0e0e0;
+ border-radius: 5px 0 0 5px;
+ padding: 1px;
+}
+
+.openoPagination_openoPaginationLengthOptions span {
+ background-color: #fff !important;
+}
+
+.openo-pagination-theme a, .openo-pagination-theme span {
+ float: left;
+ color: #666;
+ font: 12px Lucida Grande, Verdana, Arial, Helvetica, sans-serif;
+ line-height: 24px;
+ font-weight: 400;
+ text-align: center;
+ border: 1px solid #e0e0e0;
+ text-decoration: none !important;
+ padding: 0 7px;
+ border-radius: 3px;
+ background: #fff;
+}
+
+.openo-pagination-selectspan {
+ background: url(../images/ideo_default_select.png) left no-repeat !important;
+ float: right !important;
+ width: 26px;
+ height: 26px;
+ cursor: pointer;
+}
+
+.openo-pagination-theme label {
+ padding-top: 6px;
+ vertical-align: middle;
+ margin-right: 20px;
+ margin-top: -1px;
+ float: left;
+ display: inline-block;
+ height: 20px;
+ font: 12px Lucida Grande, Verdana, Arial, Helvetica, sans-serif;
+}
+
+.openo-pagination li, .openo-pagination ul {
+ list-style: none;
+ padding: 0;
+ margin: 0;
+ float: left;
+}
+
+dd, dl, dt, li {
+ color: #000;
+}
+
+.openo-pagination-theme a, .openo-pagination-theme span.current {
+ margin: 0 5px 0 0;
+}
+
+.openo .openo-disabled, .openo.openo-disabled {
+ border-color: #c3c3c3 !important;
+ color: #666 !important;
+ opacity: .3;
+ filter: alpha(opacity=30);
+}
+
+.openo-pagination-theme .prev {
+ background: 0 0;
+ float: left;
+}
+
+.openo-pagination-theme .current {
+ text-decoration: none !important;
+ float: left;
+ padding-left: 6px;
+ height: 24px;
+ color: #fff;
+ display: inline;
+ border-color: #00adf5;
+ background: #4ad2ff;
+}
+
+.openo-pagination-theme a, .openo-pagination-theme span {
+ float: left;
+ color: #666;
+ font: 12px Lucida Grande, Verdana, Arial, Helvetica, sans-serif;
+ line-height: 24px;
+ font-weight: 400;
+ text-align: center;
+ border: 1px solid #e0e0e0;
+ text-decoration: none !important;
+ padding: 0 7px;
+ border-radius: 3px;
+ background: #fff;
+}
+
+.openo-pagination-theme .prev.openo-disabled:before {
+ background: url(../images/page_left_disabled.png) 50% 45% no-repeat;
+}
+
+.openo-pagination-theme .prev.openo-disabled:before {
+ background: url(../images/page_left_disabled.png) 50% 45% no-repeat;
+}
+
+.openo-pagination-theme .prev:before {
+ background: url(../images/page_l.png) 50% 45% no-repeat;
+}
+
+.openo-pagination-theme .next:after, .openo-pagination-theme .prev:before {
+ display: inline-block;
+ content: "";
+ vertical-align: middle;
+ width: 10px;
+ height: 24px;
+}
+
+.openo-pagination-theme .prev:before {
+ background: url(../images/page_l.png) 50% 45% no-repeat;
+}
+
+.openo-pagination-theme .next:after, .openo-pagination-theme .prev:before {
+ display: inline-block;
+ content: "";
+ vertical-align: middle;
+ width: 10px;
+ height: 24px;
+}
+
+pagination ul {
+ list-style: none;
+ padding: 0;
+ margin: 0;
+ float: left;
+}
+
+.openo-pagination li, .openo-pagination ul {
+ list-style: none;
+ padding: 0;
+ margin: 0;
+ float: left;
+}
+
+.openoPagination_gototext {
+ background: #FFF;
+ outline: 0;
+ width: 29px;
+ float: left;
+ height: 26px;
+ line-height: 24px;
+ border-radius: 4px;
+ border: 1px solid #c3c3c3;
+ padding: 0 0 0 5px;
+ margin: 0;
+ color: #666;
+ min-width: 50px;
+}
+
+.openoPagination_gotoimage {
+ width: 29px;
+ height: 26px;
+ line-height: 26px;
+ background-color: #FFF;
+ background-image: url(/portal/themes/default/components/openo/images/openo.png);
+ padding-left: 21px;
+ float: left;
+ margin-left: 5px;
+ border: 1px solid #e0e0e0;
+ border-radius: 4px;
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ background-position: -184px -181px !important;
+}
+
+.openo-pagination-theme .ellipse {
+ float: left;
+ margin-left: -8px;
+ margin-right: -4px;
+ background: 0 0;
+ border: none;
+ border-radius: 0;
+ box-shadow: none;
+ font-weight: 700;
+ cursor: default;
+}
+
+.openo.openo-disabled {
+ border-color: #c3c3c3 !important;
+ color: #666 !important;
+ opacity: .3;
+ filter: alpha(opacity=30);
+}
+
+.openo-pagination-theme .prev {
+ background: 0 0;
+ float: left;
+}
+
+.openo-pagination-theme .current {
+ text-decoration: none !important;
+ float: left;
+ padding-left: 6px;
+ height: 26px;
+ color: #fff;
+ display: inline;
+ /*border-color: #00adf5;
+ background: #4ad2ff;*/
+ border: 1px solid #e0e0e0;
+}
+
+.openo-pagination-theme .next:after {
+ background: url(../images/page_r.png) 50% 45% no-repeat;
+}
+
+.openoButton_buttonGroupClass div.openoButton_buttonClass_parent, .openoButton_buttonRightImg {
+ margin-left: 5px;
+}
+
+html, body {
+ height: 99%;
+ width: 98%;
+}
+
+.cotentBody {
+ padding: 0px 20px 0px 20px;
+}
+
+div.openoButton_buttonClass:hover {
+ border: 1px solid #4ac9ff;
+}
+
+div.openoButton_button_default:hover .openoButton_buttonCenterText {
+ color: #009ae7;
+}
+
+.header_lineimg {
+ height: 1px;
+ width: 100%;
+ margin-top: 17px;
+}
+
+.openo.openo-hide {
+ display: none;
+}
+
+div.openo-select-popup-container {
+ position: absolute;
+ border: 1px solid #4ac9ff;
+ border-top: none;
+ border-radius: 0 0 4px 4px;
+ max-height: 202px;
+ overflow-y: auto;
+ background-color: #fff;
+ z-index: 880;
+}
+
+div.openo-select-popup-container > div.openo-select-item {
+ display: block;
+}
+
+.openo .openo-ellipsis, .openo.openo-ellipsis {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+
+div.openo-select-popup-container > div.openo-select-item > label {
+ padding-top: 3px;
+ padding-bottom: 3px;
+ line-height: 20px;
+}
+
+.openo .openo-ellipsis, .openo.openo-ellipsis {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+
+.openo-select-item label {
+ margin-left: 4px;
+ margin-right: 4px;
+ white-space: nowrap;
+}
+
+div.openo-select-popup-container > div.openo-select-item.openo-item-selected, div.openo-select-popup-container > div.openo-select-item:hover {
+ background-color: #f1f1f1;
+ color: #008fd6;
+}
+
+div.openo-select.openo-focus {
+ border: 1px solid #4ac9ff;
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0;
+ border-bottom-color: #ddd;
+}
+
+.openo-pagination-theme a:hover {
+ border-color: #4ac9ff;
+ cursor: pointer;
+}
+
+.SDBtn {
+ background: #fff;
+ color: #333;
+ border: 1px solid #ddd;
+}
+
+.SDBtn:hover {
+ color: #009ae7;
+ border: 1px solid #4AC9FF
+}
+
+table tbody tr.even:hover td, table tbody tr.odd:hover td {
+ background-color: #e6fbe0;
+}
+
+table tr.openoTable_row_selected td {
+ background: #e8f8fe !important;
+ border-bottom: 1px solid #e8e8e8 !important;
+}
+
+.modal-body {
+ padding: 0 !important;
+}
+
+.form-control {
+ height: 26px !important;
+}
+
+.form-group .control-label {
+ margin-left: 20px;
+}
+
+.form-horizontal .control-label {
+ text-align: left;
+} \ No newline at end of file
diff --git a/common/src/main/webapp/framework/css/open-ostyle.css b/common/src/main/webapp/framework/css/open-ostyle.css
new file mode 100644
index 0000000..a1c8f5d
--- /dev/null
+++ b/common/src/main/webapp/framework/css/open-ostyle.css
@@ -0,0 +1,1020 @@
+/*
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*/
+
+body {
+ margin: 0;
+ padding: 0;
+ width: 100%;
+ height: 100%;
+ font-family: "Microsoft Yahei",Arial,Tahoma,Verdana,SimSun;
+ font-size: 12px;
+}
+
+.container{
+ background: #fafafa;
+}
+
+.accordion_parent {
+ position: relative;
+ width: 220px;
+ background-color: #f5f5f5;
+}
+
+.openo-accordion-resizable-handle {
+ z-index: 1 !important;
+ cursor: e-resize;
+ width: 7px;
+ right: -5px;
+ top: 0;
+ height: 100%;
+ position: absolute;
+ font-size: .1px;
+ display: block;
+}
+
+.openoAccordian_accordionmenu {
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+ line-height: 17px;
+}
+
+.openoAccordian_accordionmenu li {
+ min-width: 75px;
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+ color: #000;
+ clear: both;
+}
+
+.openo_accordion_ui-icon-collapse, .openo_accordion_ui-icon-expand {
+ display: block;
+ float: left;
+ margin-bottom: -1px;
+ border-bottom: 1px solid #e5e5e5;
+ cursor: pointer;
+ width: 13px;
+ padding-top: 26px;
+}
+
+.openo_accordion_ui-icon-expand {
+ background: url(../thirdparty/images/collapse_arrow.png) right 20px no-repeat;
+ margin-top: 8px;
+}
+
+.openo_accordion_ui-icon-expand.current {
+ background: url(../thirdparty/images/expand_arrow.png) right 20px no-repeat;
+}
+
+.openoAccordian_showHideArrow_hide, .openoAccordian_showHideArrow_show {
+ display: block;
+ position: absolute;
+ right: 0;
+ top: 4px;
+ width: 18px;
+ height: 41px;
+ cursor: pointer;
+ background-color: #f5f5f5;
+}
+
+.openoAccordian_showHideArrow_hide {
+ background-image: url(../images/openo.png);
+ background-position: -7px 0 !important;
+ border-collapse: separate;
+ /*box-shadow: inset -1px 0 0 #e5e5e5;*/
+}
+
+a.header.opened, a.header.closed {
+ font-size: 16px;
+ padding-top: 24px;
+ padding-bottom: 25px;
+ color: #999999;
+}
+
+.openoAccordian_accordionmenu .closed, .openoAccordian_accordionmenu .opened {
+ padding-right: 10px;
+ background-position: 98% 50%;
+ background-repeat: no-repeat;
+}
+
+
+.openoAccordian_accordionmenu li a {
+ padding: 11px 10px 12px;
+ color: #333333;
+ margin-top: -1px;
+ text-align: left !important;
+ font-family: "Microsoft Yahei",Arial,Tahoma,Verdana,SimSun;
+ font-size: 14px;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+ border-top: 1px solid #e5e5e5;
+ border-bottom: 1px solid #e5e5e5;
+ /*height: 19px;*/
+}
+
+.openoAccordian_accordionmenu ul {
+ margin: 0;
+ padding: 0;
+ overflow: hidden;
+}
+
+.openoAccordian_accordionmenu a {
+ display: block;
+ text-decoration: none;
+}
+
+a {
+ color: #428bca;
+ text-decoration: none;
+ background: 0 0;
+}
+
+.bar {
+ height: 834px;
+ width: 18px;
+ background: #f8f8f8;
+ display: none;
+}
+
+.bar span {
+ width: 13px;
+ height: 34px;
+ background-image: url(../images/openo.png);
+ background-position: -39px 0 !important;
+ display: block;
+ /*margin-top: -430px;*/
+}
+
+li {
+ cursor: pointer;
+}
+
+#puer_base_openo {
+ border: 1px solid #ddd;
+}
+
+.openo_accordion_selected {
+ margin-left: 0;
+ margin-right: 0;
+ background: #fafafa;
+ border-left: 3px solid #4ac9ff !important;
+ box-shadow: none;
+ position: relative;
+}
+
+a:hover {
+ color: #4ac9ff;
+}
+
+.openoAccordian_accordionmenu li.openo_accordion_selected a {
+ position: relative;
+ left: -3px;
+ color: #009ae7;
+}
+
+.openo-accordion-resizable-handle {
+ z-index: 1 !important;
+ cursor: e-resize;
+ width: 7px;
+ right: -5px;
+ top: 0;
+ height: 100%;
+ position: absolute;
+ font-size: .1px;
+ display: block;
+}
+
+#iframeContainer iframe {
+ width: 100%;
+ height: 100%;
+ border: 0;
+}
+
+#accordionContent, #iframeContainer {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ width: 100%;
+ height: 100%;
+}
+
+.openoAccordian_showHideArrow_show {
+ background-image: url(../images/openo.png);
+ background-position: -39px 0 !important;
+ box-shadow: inset 1px 0 0 #e5e5e5, inset -1px 0 0 #e5e5e5;
+}
+
+.homecontent {
+ /* text-align: center; */
+ letter-spacing: 1.4px;
+}
+
+.homecontent h3, .homecontent h4, .homecontent h5{
+ font-size: 24px;
+ color: #333;
+ text-transform: capitalize;
+ border-top: 2px solid #f1f1f1;
+ border-bottom: 2px solid #f1f1f1;
+ padding: 13px 5px;
+ display: inline-block;
+ letter-spacing: 5px;
+ -webkit-animation: textScroll 500ms linear;
+ animation: textScroll 500ms linear;
+}
+.homecontent h4 {
+ font-size: 28px;
+ font-weight: bold;
+}
+.homecontent h5 {
+ font-size: 16px;
+ text-align: left;
+ border: none;
+}
+@-webkit-keyframes textScroll {
+ from {opacity: 0;}
+ to {opacity: 1;}
+ }
+
+@keyframes textScroll {
+ from {opacity: 0;}
+ to {opacity: 1;}
+}
+
+/*.modal-body span {
+ font-size: 18px;
+ color: #00f;
+}*/
+
+#msgModal .modal-body .container {
+ width: 100%;
+}
+#msgModal .modal-body .icon {
+ /*color: red;*/
+ font-size: 37px;
+}
+#msgModal .modal-body .icon_error {
+ color: red;
+}
+#msgModal .modal-body .icon_info {
+ color: green;
+}
+#msgModal .modal-body .icon_warning{
+ color: orange;
+}
+#msgModal .modal-body .icon_confirm {
+ color: blue;
+}
+#msgModal .modal-body .msg {
+ color: #333;
+ padding-left: 30px;
+}
+/*#msgModal .modal-body .container .row {
+}*/
+#msgModal .modal-body .row {
+ height: 100%;
+ white-space: nowrap;
+}
+#msgModal .modal-body .row:before{
+ content: "";
+ display: inline-block;
+ vertical-align: middle;
+ width: 0;
+ /* adjust for white space between pseudo element and next sibling */
+ margin-right: -.25em;
+ /* stretch line height */
+ height: 100%;
+}
+
+#msgModal .modal-body .row .msg {
+ /*display: inline-block;
+ vertical-align: middle;
+ white-space: normal;*/
+ /* vertical-align: middle; */
+ position: absolute;
+ top: 50%;
+ -webkit-transform: translateY(-50%);
+ -ms-transform: translateY(-50%);
+ transform: translateY(-50%);
+ padding-left: 70px;
+ white-space: normal;
+}
+
+/* Functional */
+
+#funModal .modal-content .modal-header{
+ padding-bottom: 4px;
+ border-radius: 5px 5px 0 0;
+}
+
+
+/* Buttons */
+.btnDefault {
+ border-radius: 6px;
+ /*height: 24px;*/
+ font-size: 12px;
+ font-family: "Microsoft Yahei",Arial,Tahoma,Verdana,SimSun;
+ line-height: 24px;
+ color: #000;
+ border: 1px solid #d3d3d3;
+ text-align: center;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
+ background: linear-gradient(to bottom, #fff, #fafafa);
+ padding: 0 19px;
+}
+.btnDefault:hover {
+ border-color: #4ac9ff;
+ color: #009ae7;
+}
+#iconBtn {
+ padding: 0 15px;
+}
+#iconBtn span {
+ font-size: 12px;
+ margin-top: 4px;
+ width: 16px;
+ height: 16px;
+}
+#iconBtn span.pull-left {
+ margin-right: 5px;
+}
+#iconBtn span.pull-right {
+ margin-left: 5px;
+}
+
+#buttonArea {
+ text-align: left;
+}
+#buttonArea div {
+ margin: 10px 0 20px;
+}
+
+#buttonArea div .btn-block{
+ margin: 10px 0;
+}
+
+/* Dropdown*/
+
+#dropdown {
+ text-align: left;
+}
+
+#dropdown div {
+ margin: 10px 0 20px;
+}
+
+#dropdown .dropup .dropdown-menu {
+ top: auto;
+ bottom: 34% !important;
+ margin-bottom: 1px;
+}
+#dropdown .dropdown-menu {
+ top: auto;
+ left: auto;
+ margin-bottom: 1px;
+}
+
+#plainDropDown > .dropdownplain {
+ position: relative;
+ clear: both;
+ float: left;
+ width: 100%;
+}
+#plainDropDown > .dropdownplain > ul > li {
+ border: 1px solid #c3c3c3;
+ border-radius: 4px;
+ min-width: 200px;
+}
+#plainDropDown ul li a {
+ padding: 5px 10px;
+ color: #333;
+}
+#plainDropDown > .dropdownplain > ul > li > a > span {
+ top: 4px;
+}
+#plainDropDown ul li a:hover {
+ color: #333;
+}
+#plainDropDown .dropdown-menu {
+ width: 100%;
+}
+
+
+
+/* Credit to bootsnipp.com for the css for the color graph */
+.colorgraph {
+ height: 5px;
+ border-top: 0;
+ background: #c4e17f;
+ border-radius: 5px;
+ background-image: -webkit-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4);
+ background-image: -moz-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4);
+ background-image: -o-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4);
+ background-image: linear-gradient(to right, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4);
+}
+
+/* Radio and CheckBoxes------------*/
+
+
+.funkyradio div {
+ clear: both;
+ overflow: hidden;
+}
+
+.funkyradio label {
+ width: 100%;
+ border-radius: 3px;
+ border: 1px solid #D1D3D4;
+ font-weight: normal;
+}
+
+.funkyradio input[type="radio"]:empty,
+.funkyradio input[type="checkbox"]:empty {
+ display: none;
+}
+
+.funkyradio input[type="radio"]:empty ~ label,
+.funkyradio input[type="checkbox"]:empty ~ label {
+ position: relative;
+ line-height: 2.5em;
+ text-indent: 3.25em;
+ margin-top: 2em;
+ cursor: pointer;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.funkyradio input[type="radio"]:empty ~ label:before,
+.funkyradio input[type="checkbox"]:empty ~ label:before {
+ position: absolute;
+ display: block;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ content: '';
+ width: 2.5em;
+ background: #D1D3D4;
+ border-radius: 3px 0 0 3px;
+}
+
+.funkyradio input[type="radio"]:hover:not(:checked) ~ label,
+.funkyradio input[type="checkbox"]:hover:not(:checked) ~ label {
+ color: #888;
+}
+
+.funkyradio input[type="radio"]:hover:not(:checked) ~ label:before,
+.funkyradio input[type="checkbox"]:hover:not(:checked) ~ label:before {
+ content: '\2714';
+ text-indent: .9em;
+ color: #C2C2C2;
+}
+
+.funkyradio input[type="radio"]:checked ~ label,
+.funkyradio input[type="checkbox"]:checked ~ label {
+ color: #777;
+}
+
+.funkyradio input[type="radio"]:checked ~ label:before,
+.funkyradio input[type="checkbox"]:checked ~ label:before {
+ content: '\2714';
+ text-indent: .9em;
+ color: #333;
+ background-color: #ccc;
+}
+
+.funkyradio input[type="radio"]:focus ~ label:before,
+.funkyradio input[type="checkbox"]:focus ~ label:before {
+ box-shadow: 0 0 0 3px #999;
+}
+
+.funkyradio-default input[type="radio"]:checked ~ label:before,
+.funkyradio-default input[type="checkbox"]:checked ~ label:before {
+ color: #333;
+ background-color: #ccc;
+}
+
+.funkyradio-primary input[type="radio"]:checked ~ label:before,
+.funkyradio-primary input[type="checkbox"]:checked ~ label:before {
+ color: #fff;
+ background-color: #337ab7;
+}
+
+.funkyradio-success input[type="radio"]:checked ~ label:before,
+.funkyradio-success input[type="checkbox"]:checked ~ label:before {
+ color: #fff;
+ background-color: #5cb85c;
+}
+
+.funkyradio-danger input[type="radio"]:checked ~ label:before,
+.funkyradio-danger input[type="checkbox"]:checked ~ label:before {
+ color: #fff;
+ background-color: #d9534f;
+}
+
+.funkyradio-warning input[type="radio"]:checked ~ label:before,
+.funkyradio-warning input[type="checkbox"]:checked ~ label:before {
+ color: #fff;
+ background-color: #f0ad4e;
+}
+
+.funkyradio-info input[type="radio"]:checked ~ label:before,
+.funkyradio-info input[type="checkbox"]:checked ~ label:before {
+ color: #fff;
+ background-color: #5bc0de;
+}
+
+.btn-primary {
+ color: #fff;
+ background-color: #428bca;
+ border-color: #357ebd;
+ min-width:70px
+}
+
+.btn.outline {
+ background: none;
+
+}
+.btn-primary.outline {
+ border: 2px solid #0099cc;
+ color: #0099cc;
+}
+.modal-header {
+ /*background-color: #cccccc;*/
+ background: linear-gradient(to bottom, #fbfbfb 0, #f6f6f6 70%, #f0f0f0 100%);
+ padding:0px;
+}
+
+/* Tree */
+
+#tree1 ul li {
+ list-style: none;
+ text-align: left;
+ margin-top: 7px;
+}
+
+/* Accordian Area */
+#accordionArea .panel-group .panel-title a:before {
+ font-family: "Glyphicons Halflings";
+ content:"\e259";/*\e094*/
+ /*position: absolute;
+ right: 20px;*/
+ font-size: 20px;
+ margin-right: 20px;
+ text-decoration: none !important;
+}
+#accordionArea .panel-group .panel-title a.collapsed:before {
+ content:"\e258";/*\e092*/
+}
+
+#accordionArea h3 {
+ width: 100%;
+ text-align: left;
+ background-color: #eaeaea;
+ border: none;
+ padding: 8px;
+ font-size: 20px;
+}
+#accordionArea h3 a {
+ text-decoration: none;
+}
+#accordionArea .panel-group .panel {
+ border: none;
+ box-shadow: none;
+ -webkit-box-shadow: none;
+}
+ div.panel-body {
+ text-align: justify;
+}
+
+/* Tab */
+#tabArea .tab-content div p {
+ text-align: justify;
+}
+
+/*Table*/
+#tableArea h3 {
+ text-align: left;
+ border: none;
+ padding-top: 5px;
+}
+
+#tableArea h3 span {
+ font-size: 12px;
+}
+
+tr{
+ text-align:center;
+}
+
+/* Vertical Tab */
+.nav-stacked {
+ margin-top: 20px;
+ text-align: left;
+ border:none;
+}
+
+.nav-tabs>li.active>a {
+ border-top: 3px solid #4ac9ff;
+}
+.nav-tabs>li.active>a:hover, .nav-tabs>li.active>a:focus {
+ border-top: 3px solid #4ac9ff;
+}
+.nav-tabs>li>a:hover {
+ border-color: transparent;
+ background-color: transparent;
+}
+.nav-stacked>li.active>a {
+ background-color: #fff;
+ border: none;
+ border-radius: 4px;
+ border-left: 3px solid #4ac9ff;
+}
+
+#vtabArea .tab-content .tab-pane {
+ text-align: left;
+}
+#vtabArea .tab-content .tab-pane p {
+ text-align: justify;
+}
+
+.link_active {
+ /*background-color: lightslategrey;*/
+ font-style: italic;
+ color: #4ac9ff !important;
+ background:#fafafa;
+ border-left: 3px solid #4ac9ff;
+
+
+}
+
+/*input.ng-invalid {
+ background-color:yellow;
+}*/
+
+/* Functional & Notification*/
+
+#myModal .modal-header, #msgModal .modal-header, #funModal .modal-header {
+ padding: 9px 15px;
+ border-radius: 5px 5px 0 0;
+ color: #666;
+}
+
+#msgModal .modal-content {
+ width: 70%;
+ position: absolute;
+ left: 15%;
+ box-shadow: 0 6px 10px rgba(0,0,0,.3);
+ -webkit-box-shadow: 0 6px 10px rgba(0,0,0,.3);
+}
+#msgModal .modal-footer, #funModal .modal-footer {
+ border: none;
+ margin: 0 auto;
+ width: 100%;
+ text-align: center;
+}
+
+
+#myInput {
+ background-image: url('../thirdparty/images/searchicon.png'); /* Add a search icon to input */
+ background-position: 10px 9px; /* Position the search icon */
+ background-repeat: no-repeat; /* Do not repeat the icon image */
+ width: 100%; /* Full-width */
+ font-size: 16px; /* Increase font-size */
+ padding: 5px 20px 5px 40px; /* Add some padding */
+ border: 1px solid #ddd; /* Add a grey border */
+ margin-bottom: 12px; /* Add some space below the input */
+}
+
+#myTable_search {
+ border-collapse: collapse; /* Collapse borders */
+ width: 100%; /* Full-width */
+ border: 1px solid #ddd; /* Add a grey border */
+ font-size: 18px; /* Increase font-size */
+}
+
+#myTable_search th, #myTable td {
+ text-align: left; /* Left-align text */
+ padding: 12px; /* Add padding */
+}
+
+#myTable_search tr {
+ /* Add a bottom border to all table rows */
+ border-bottom: 1px solid #ddd;
+}
+
+#myTable_search tr.header, #myTable tr:hover {
+ /* Add a grey background color to the table header and on hover */
+ background-color: #f1f1f1;
+}
+
+/* List */
+#listArea {
+ margin-top: 25px;
+}
+#listArea .list {
+ /*border: 1px solid #333;*/
+ padding: 5px;
+}
+#listArea .list div {
+ margin: 5px 0;
+}
+
+#menu_accordion {
+ margin-top: 20px;
+}
+
+#menu_accordion li a{
+ padding-left: 42px;
+}
+#menu_accordion li a:hover {
+ color: #4ac9ff;
+}
+
+#rightContainer {
+ margin-top:20px;
+}
+
+#panel1 li:first-child{
+ margin-top:1px;
+}
+
+#menu_accordion #container, #menu_accordion #widgets, #menu_accordion #notifications, #menu_accordion #functional{
+ margin-bottom : 0px;
+ text-align : left;
+ background-color: #F5F5F5;
+}
+
+#menu_accordion h5{
+ margin-bottom : 0px;
+ text-align : left;
+ padding-left : 10px;
+ cursor: pointer;
+ letter-spacing: 3px;
+ width:100%;
+}
+ #functional h5{
+ padding : 0;
+}
+ #functional a{
+ padding: 12px 14px;
+}
+.tableAlign{
+ text-align:left;
+}
+
+.chkboxAlign{
+ text-align:center;
+}
+
+#provinceAction {
+ text-align: left;
+}
+#provinceTable th {
+ background-color: #e3e3e3;
+}
+
+#provinceTable.table-striped>tbody>tr:nth-child(even)>td {
+ background-color:#fafafa;
+}
+
+#provinceTable.table-striped>tbody>tr:nth-child(odd)>td {
+ background-color:#f7f7f7
+}
+#provinceTable.table-striped>tbody>tr:hover {
+ background-color: red;
+}
+
+.prvdel{
+ margin-left:20px;
+}
+
+.shortnoteHeader{
+ margin-top:50px;
+ text-align:left;
+ font-weight: bold;
+ font-family: "Microsoft Yahei",Arial,Tahoma,Verdana,SimSun;
+}
+.shortnoteText{
+ margin-top:20px;
+ text-align:left;
+ font-size:12px;
+ font-family: "Microsoft Yahei",Arial,Tahoma,Verdana,SimSun;
+ color:blue;
+
+}
+
+.ztree *{
+ font-family: "Microsoft Yahei",Arial,Tahoma,Verdana,SimSun;
+}
+
+.noChild_link_active {
+ /*background-color: lightslategrey;*/
+ font-style: italic;
+ color: #4ac9ff !important;
+ background:#fafafa;
+ border-left: 3px solid #4ac9ff;
+}
+
+.rmpadding{
+ padding-left:0px !important;
+ padding-right:0px !important;
+}
+
+#menu_accordion .collapsed span {
+ background: url(../../thirdparty/images/expand_arrow.png) 1px 3px no-repeat;
+ display: block;
+ float: left;
+ margin-bottom: -1px;
+ cursor: pointer;
+ width: 100%;
+ padding-left: 20px;
+}
+#menu_accordion span {
+ background: url(../../thirdparty/images/collapse_arrow.png) 1px 3px no-repeat;
+ display: block;
+ float: left;
+ margin-bottom: -1px;
+ cursor: pointer;
+ width: 100%;
+ padding-left: 20px;
+}
+
+.magic-radio + label{
+ font-size:14px;
+}
+
+.panelbr{
+ border-left:0px;
+ border-right:0px;
+}
+
+.popover-title {
+ margin: 0;
+ padding: 8px 14px;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: 18px;}
+
+.customPopover{
+ padding:10px 20px;
+}
+
+
+.css-form input.ng-invalid.ng-touched, textarea.ng-invalid.ng-touched {
+ background-color: #FA787E;
+}
+
+.css-form input.ng-valid.ng-touched, textarea.ng-valid.ng-touched {
+ background-color: white;
+}
+
+.errMsg{
+
+ color:red;
+ float: left;
+}
+
+.customtable thead{
+ background: #ECECEC;
+}
+
+.customtable th,.table td{
+ /* padding-top: 3px!important; */
+ padding-bottom: 3px!important;
+}
+
+/*
+.customtable tr,.customtable td, .customtable th{
+ text-align:left;
+
+}
+*/
+
+.ng-table th.sortable .sort-indicator {
+ width:100%;
+ float:right;
+}
+
+.btn-group>.btn.active{
+ z-index: 2;
+ color: #fff;
+ background-color: #428bca;
+ border-color: #428bca;
+ cursor: default;
+}
+
+.customtable tbody tr:hover td{
+ background-color: #e6fbe0 !important;
+}
+
+.shortnote{
+ width:100%;
+ float:left;
+}
+
+.ng-table-pager .pagination{
+ float:right;
+}
+.ng-table-pager .ng-table-counts{
+ float:left !important;
+}
+.btnmrg{
+ margin:0 5px 0 5px;
+}
+
+.labelstyle{
+ text-align:left;
+ font-size:14px;
+ font-weight: 700;
+ font-family: "Microsoft Yahei",Arial,Tahoma,Verdana,SimSun;
+}
+
+.titlestyle{
+ font-size:14px !important;
+ font-family: "Microsoft Yahei",Arial,Tahoma,Verdana,SimSun;
+}
+
+.header{
+ text-align:left;
+ font-size:14px;
+ font-family: "Microsoft Yahei",Arial,Tahoma,Verdana,SimSun;
+}
+
+.message{
+ font-size:12px;
+ font-family: "Microsoft Yahei",Arial,Tahoma,Verdana,SimSun;
+}
+
+.shortnoteHeader {
+ color : blue;
+}
+.shortnoteText {
+ font-size : 10px;
+}
+.form-group, .modal-header{
+ text-align: left;
+}
+
+.labelHeader, .labelTitle {
+ font-size: 28px;
+ font-weight: bold;
+ color: #333;
+ text-transform: capitalize;
+ border-top: 2px solid #f1f1f1;
+ border-bottom: 2px solid #f1f1f1;
+ padding: 13px 5px;
+ display: inline-block;
+ letter-spacing: 5px;
+}
+
+.labelTitle {
+ font-size: 24px;
+ font-weight: normal;
+ text-align: left;
+ border: none;
+}
+
+pre code {
+ white-space: pre-line;
+
+}
+.plus-icon {
+ background-image: url("../../thirdparty/images/add.png");
+}
+.edit-icon {
+ background-image: url("../../thirdparty/images/edit.png");
+}
+.delete-icon {
+ background-image: url("../../thirdparty/images/delete.png");
+}
+
+.staricon{
+ color: red;
+ float: right;
+}
+
+.inputfield{
+ width:95%;
+ display:inline-block;
+
+} \ No newline at end of file
diff --git a/common/src/main/webapp/framework/template.html b/common/src/main/webapp/framework/template.html
new file mode 100644
index 0000000..f7cd87d
--- /dev/null
+++ b/common/src/main/webapp/framework/template.html
@@ -0,0 +1,44 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<script id="dialogTpl" type="text/html">
+ <h3>{{name}}</h3> <div>Skills are:{{#skills}}<div>{{.}}</div>{{/skills}}</div></div>
+</script>
+
+<script id="person" type="text/html">
+ <ul>{{#depts}}<div><h4>{{fname}} {{lname}} </h4>{{Address}}</div>{{/depts}}</ul>
+</script>
+
+<script id="user" type="text/html">
+ <h3>{{name}}</h3><p>Address: {{address}}</p>
+</script>
+
+<!-- Left Menu Accordion -->
+<!--
+<script id="menu_accordion" type="text/html">
+ {{#items}}
+ <div class="panel panel-default">
+ <h3 class="panel-title">
+ <a data-toggle="collapse" data-parent="#accordion" data-target="#{{tabId}}">{{header}}</a>
+ </h3>
+ <div id="{{tabId}}" class="panel-collapse collapse {{#isActive}}in{{/isActive}}">
+ {{#subLinks}}<a ui-sref="{{state}}" ui-sref-active="link_active" style="padding-left: 62px;" onclick={{action}}>{{title}}</a>{{/subLinks}}
+ </div>
+ </div>
+ {{/items}}
+</script>-->
diff --git a/common/src/main/webapp/framework/templateContainer.html b/common/src/main/webapp/framework/templateContainer.html
new file mode 100644
index 0000000..ef6f01c
--- /dev/null
+++ b/common/src/main/webapp/framework/templateContainer.html
@@ -0,0 +1,79 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<!-- Accordion -->
+<script id="accordion" type="text/html">
+ {{#items}}
+ <div class="panel panel-default">
+ <h3 class="panel-title">
+ <a data-toggle="collapse" data-parent="#accordion" data-target="#{{tabId}}">{{header}}</a>
+ </h3>
+ <div id="{{tabId}}" class="panel-collapse collapse {{#isActive}}in{{/isActive}}">
+ <div class="panel-body"> {{msg}} </div>
+ </div>
+ </div>
+ {{/items}}
+</script>
+
+<!--Tabs-->
+<script id="tabs" type="text/html">
+ <ul class="nav nav-tabs">
+ {{#items}}<li {{#isActive}}class="active"{{/isActive}}><a data-toggle="tab" data-target="#{{target}}">{{tablabel}}</a></li>{{/items}}
+ </ul>
+ <div class="tab-content">
+ {{#items}}
+ <div id="{{target}}" class="tab-pane fade {{#isActive}}in active{{/isActive}}">
+ <h3>{{tablabel}}</h3>
+ <p>{{msg}}</p>
+ </div>
+ {{/items}}
+ </div>
+</script>
+
+<!--Vertical Tabs-->
+<script id="vtabs" type="text/html">
+ <ul class="nav nav-stacked col-sm-4 col-md-4 col-lg-4">
+ {{#items}}<li {{#isActive}}class="active"{{/isActive}}><a data-toggle="tab" data-target="#{{target}}">{{tablabel}}</a></li>{{/items}}
+ </ul>
+ <div class="tab-content col-sm-8 col-md-8 col-lg-8">
+ {{#items}}
+ <div id="{{target}}" class="tab-pane fade {{#isActive}}in active{{/isActive}}">
+ <h3>{{tablabel}}</h3>
+ <p>{{msg}}</p>
+ </div>
+ {{/items}}
+ </div>
+</script>
+
+<!--Table-->
+<script id="table" type="text/html">
+ {{#filter}}<input type="text" id="myInput" onkeyup="{{action}}" placeholder="Search for {{searchField}}">{{/filter}}
+ <table id="myTable{{#filter}}_search{{/filter}}" class="table {{#striped}}table-striped{{/striped}} {{#border}}table-bordered{{/border}} {{#hover}}table-hover{{/hover}} {{#condensed}}table-condensed{{/condensed}}">
+ <thead>
+ <tr>
+ {{#itemHeader}}<th>{{.}}</th>{{/itemHeader}}
+ </tr>
+ </thead>
+ <tbody>
+ {{#rowitem}}
+ <tr>
+ {{#values}}<td>{{.}}</td>{{/values}}
+ </tr>
+ {{/rowitem}}
+ </tbody>
+ </table>
+</script> \ No newline at end of file
diff --git a/common/src/main/webapp/framework/templateFunctional.html b/common/src/main/webapp/framework/templateFunctional.html
new file mode 100644
index 0000000..ff2f53f
--- /dev/null
+++ b/common/src/main/webapp/framework/templateFunctional.html
@@ -0,0 +1,82 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<script id="functionalDialog" type="text/html">
+ <div id="funModal" class="modal fade" role="dialog" ng-init="getDetail()">
+ <div class="modal-dialog modal-md">
+
+ <!-- Modal content-->
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">&times;</button>
+ <h4 class="modal-title titlestyle">{{title}}</h4>
+ </div>
+ <div class="modal-body">
+ <div>
+ <form class="form-horizontal" role="form">
+ {{#labels}}
+ <div class="form-group">
+ <label class="control-label col-sm-3 labelstyle" for={{input_id}}>{{text}}</label>
+ <div class="col-sm-7">
+ <input type={{type}} class="form-control" id={{input_id}}>
+ </div>
+ </div>
+ {{/labels}}
+ </form>
+ </div>
+ </div>
+ <div class="modal-footer">
+ <div>{{#buttons}} <button type="button" class="btn btnDefault btnmrg" data-dismiss="modal" >{{text}}</button> {{/buttons}}
+ {{#showClose}}<button type="button" class="btn btnDefault btnmrg" data-dismiss="modal">{{closeBtnTxt}}</button>{{/showClose}}
+ </div>
+ <!--<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>-->
+ </div>
+ </div>
+
+ </div>
+ </div>
+</script>
+
+
+<script id="dialog" type="text/html">
+ <div id="uniModal" class="modal fade" role="dialog">
+ <div class="modal-dialog">
+
+ <!-- Modal content-->
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">&times;</button>
+ <div class="modalHeader"></div>
+ </div>
+ <form name="provinceForm" method="post"><!-- ng-submit="saveData(province.id)"-->
+ <div class="modal-body">
+ <div class="modalBodyContent">
+ </div>
+ </div>
+
+ <div id="footerBtns" class="modal-footer">
+ </div>
+
+ </form>
+ </div>
+
+
+ </div>
+ </div>
+
+</script> \ No newline at end of file
diff --git a/common/src/main/webapp/framework/templateNotification.html b/common/src/main/webapp/framework/templateNotification.html
new file mode 100644
index 0000000..97f26e3
--- /dev/null
+++ b/common/src/main/webapp/framework/templateNotification.html
@@ -0,0 +1,48 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<!--Dialog-->
+<script id="personDialog" type="text/html">
+ <div id="msgModal" class="modal fade" role="dialog">
+ <div class="modal-dialog modal-md">
+
+ <!-- Modal content-->
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">&times;</button>
+ <h4 class="modal-title titlestyle">{{title}}</h4>
+ </div>
+ <div class="modal-body">
+ <div class="container center">
+ <div class="row">
+ <div class="col-xs-2 col-sm-2 col-md-1 col-lg-1 icon {{icon}} {{iconColor}}"></div>
+ <div class="msg col-xs-10 col-sm-10 col-md-11 col-lg-11" style="text-align:left;vertical-align: middle;">{{msg}}</div>
+ </div>
+ </div>
+ </div>
+ <div class="modal-footer">
+ <div>{{#buttons}} <button type="button" class="btn btnDefault btnmrg" data-dismiss="modal" ng-click={{action}}>{{text}}</button> {{/buttons}}
+ {{#showClose}}<button type="button" class="btn btnDefault btnmrg" data-dismiss="modal">{{closeBtnTxt}}</button>{{/showClose}}
+ </div>
+ <!--<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>-->
+ </div>
+ </div>
+
+ </div>
+ </div>
+</script> \ No newline at end of file
diff --git a/common/src/main/webapp/framework/templateWidget.html b/common/src/main/webapp/framework/templateWidget.html
new file mode 100644
index 0000000..fcba217
--- /dev/null
+++ b/common/src/main/webapp/framework/templateWidget.html
@@ -0,0 +1,213 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<!-- Default Buttons <button class="btnDefault" ng-click="{{clickAction}}">{{title}}</button>-->
+<script id="defaultButtons" type="text/html">
+ <input type="button" class="btnDefault btnmrg" ng-click="{{clickAction}}" value="{{title}}"/>
+</script>
+
+<script id="defaultIconButtons" type="text/html">
+ <button id="iconBtn" type="button" class="btnDefault btnmrg {{type}}" ng-click="{{clickAction}}">{{title}}
+ <span class="glyphicon {{gType}} pull-{{iconPosition}}"></span>
+ </button>
+</script>
+
+<!-- Visual Buttons -->
+<script id="visualButtons" type="text/html">
+ <button type="button" class="btn btn-{{type}}">{{title}}</button>
+</script>
+
+<!-- Different sized Buttons -->
+<script id="sizeButtons" type="text/html">
+ <button type="button" class="btn btn-{{type}} {{size}}">{{title}}</button>
+</script>
+
+<!-- Icon Buttons -->
+<script id="iconButtons" type="text/html">
+ <button type="button" class="btn btn-{{type}}">{{title}}
+ <span class="glyphicon {{gType}}"></span>
+ </button>
+</script>
+
+<!--Dropdown template-->
+<script id="dropDown" type="text/html">
+ <div class="drop{{position}}">
+ <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">{{title}}
+ <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu">
+ {{#items}}<li><a href="#">{{itemLabel}}</a></li>{{/items}}
+ </ul>
+ </div>
+</script>
+
+<script id="dropDownHeader" type="text/html">
+ <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">{{title}}
+ <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu">
+ {{#items}}
+ {{#isheader}}<li class="divider"></li><li class="dropdown-header">{{itemLabel}}</li><li class="divider"></li>{{/isheader}}
+ {{^isheader}}<li><a href="#">{{itemLabel}}</a></li>{{/isheader}}
+ {{/items}}
+ </ul>
+</script>
+
+<script id="simpleDropdownTmpl" type="text/html">
+ <div class="dropdownplain">
+ <ul class="nav navbar-nav">
+ <li>
+ <a class="dropdown-toggle" data-toggle="dropdown">{{title}} <span class="glyphicon glyphicon-chevron-down pull-right"></span></a>
+ <ul class="dropdown-menu">
+ {{#items}}<li><a target="_blank">{{itemLabel}}</a></li>{{/items}}
+ </ul>
+ </li>
+ </ul>
+ </div>
+</script>
+
+
+<!--Radio Buttons-->
+<script id="radioButtons" type="text/html">
+ <div>
+ <input class="magic-radio" type="radio" name="radio" id="radio{{id}}"/>
+ <label for="radio{{id}}">{{label}}</label></br>
+ </div>
+</script>
+
+<!--Check boxes template-->
+<script id="checkBoxes" type="text/html">
+ <div class="funkyradio-{{type}}">
+ <input type="checkbox" name="check" id="checkbox{{id}}" {{#checked}}checked{{/checked}} />
+ <label for="checkbox{{id}}">{{label}}</label>
+ </div>
+</script>
+
+<!--text-->
+<script id="textfield" type="text/html">
+ <div class="css-form">
+ <input id ="textbox" name="textbox" class="form-control" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="text" ng-blur="{{errfunc}}({{modalVar}})" required >
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--email-->
+<script id="email" type="text/html">
+ <div class="css-form">
+ <input class="form-control" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="email" ng-blur="{{errfunc}}({{modalVar}})" required>
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--url-->
+<script id="url" type="text/html">
+ <div class="css-form">
+ <input class="form-control" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="url" ng-blur="{{errfunc}}({{modalVar}})" required>
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--password-->
+<script id="password" type="text/html">
+ <div class="css-form">
+
+
+ <input class="form-control" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="password" pattern=".{3,}" maxlength="{{#maxLength}}{{maxLength}}{{/maxLength}}{{^maxLength}}9{{/maxLength}}" ng-blur="{{errfunc}}({{modalVar}})" required>
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--numeric-->
+<script id="numeric" type="text/html">
+ <div class="css-form">
+ <input class="form-control" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="number" ng-blur="{{errfunc}}({{modalVar}})" required/>
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--dot-->
+<script id="dot" type="text/html">
+ <div class="css-form">
+ <input class="form-control" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="datetime-local" ng-blur="{{errfunc}}({{modalVar}})" required>
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--date-->
+<script id="dateinput" type="text/html">
+ <div class="css-form">
+ <input class="form-control" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="date" ng-blur="{{errfunc}}({{modalVar}})" required>
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--Month-->
+<script id="monthinput" type="text/html">
+ <div class="css-form">
+ <input class="form-control" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="month" ng-blur="{{errfunc}}({{modalVar}})" required>
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+
+<!--Week-->
+<script id="weekinput" type="text/html">
+ <div class="css-form">
+ <input class="form-control" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="week" ng-blur="{{errfunc}}({{modalVar}})" required>
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--time-->
+<script id="timeinput" type="text/html">
+ <div class="css-form">
+ <input class="form-control" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="time" ng-blur="{{errfunc}}({{modalVar}})" required>
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--ipv4-->
+<script id="ipv4" type="text/html">
+ <div class="css-form">
+ <input class="form-control" type="ipv4" placeholder="{{placeholder}}" ng-model="{{modalVar}}" pattern="((^|\.)((25[0-5])|(2[0-4]\d)|(1\d\d)|([1-9]?\d))){4}$" ng-blur="{{errfunc}}({{modalVar}})" required>
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--ipv6-->
+<script id="ipv6" type="text/html">
+ <div class="css-form">
+ <input class="form-control" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="ipv6" pattern="^([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])" ng-blur="{{errfunc}}({{modalVar}})" required>
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--textarea-->
+<script id="textarea" type="text/html">
+ <div class="css-form">
+ <textarea class="form-control" rows="4" cols="50" placeholder="{{placeholder}}" ng-model="{{modalVar}}" ng-blur="{{errfunc}}({{modalVar}})" required></textarea>
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--note-->
+<script id="note" type="text/html">
+
+ <a id="noteanchor" href="#/home/textarea" title="Note" data-toggle="popover" data-trigger="focus" data-placement="{{placement}}">
+ <span class="glyphicon glyphicon-info-sign "></span></a>
+</script>
diff --git a/common/src/main/webapp/thirdparty/License.txt b/common/src/main/webapp/thirdparty/License.txt
new file mode 100644
index 0000000..8e698ec
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/License.txt
@@ -0,0 +1,362 @@
+THIS LICENSE FILE CONTAINS THE LICENSE APPLICABLE DEPENDING ON THE TYPE OF CONTRIBUTIONS.
+
+APACHE LICENSE 2 IS APPLICABLE FOR SOURCE CODE, CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL FOR DOCUMENTATION
+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+
+Apache License Version 2.0, January 2004 http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License.
+
+Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License.
+
+Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution.
+
+You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+You must give any other recipients of the Work or Derivative Works a copy of this License; and You must cause any modified files to carry prominent notices stating that You changed the files; and You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions.
+
+Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks.
+
+This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+
+Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability.
+
+In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+
+While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+Attribution 4.0 International
+
+https://creativecommons.org/licenses/by/4.0/legalcode
+
+Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an "as-is" basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
+
+Using Creative Commons Public Licenses
+
+Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
+
+ Considerations for licensors: Our public licenses are
+ intended for use by those authorized to give the public
+ permission to use material in ways otherwise restricted by
+ copyright and certain other rights. Our licenses are
+ irrevocable. Licensors should read and understand the terms
+ and conditions of the license they choose before applying it.
+ Licensors should also secure all rights necessary before
+ applying our licenses so that the public can reuse the
+ material as expected. Licensors should clearly mark any
+ material not subject to the license. This includes other CC-
+ licensed material, or material used under an exception or
+ limitation to copyright. More considerations for licensors:
+ wiki.creativecommons.org/Considerations_for_licensors
+ Considerations for the public: By using one of our public
+ licenses, a licensor grants the public permission to use the
+ licensed material under specified terms and conditions. If
+ the licensor's permission is not necessary for any reason--for
+ example, because of any applicable exception or limitation to
+ copyright--then that use is not regulated by the license. Our
+ licenses grant only permissions under copyright and certain
+ other rights that a licensor has authority to grant. Use of
+ the licensed material may still be restricted for other
+ reasons, including because others have copyright or other
+ rights in the material. A licensor may make special requests,
+ such as asking that all changes be marked or described.
+ Although not required by our licenses, you are encouraged to
+ respect those requests where reasonable. More_considerations
+ for the public:
+ wiki.creativecommons.org/Considerations_for_licensees
+Creative Commons Attribution 4.0 International Public License
+
+By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
+
+
+Section 1 -- Definitions.
+
+ a. Adapted Material means material subject to Copyright and Similar
+ Rights that is derived from or based upon the Licensed Material
+ and in which the Licensed Material is translated, altered,
+ arranged, transformed, or otherwise modified in a manner requiring
+ permission under the Copyright and Similar Rights held by the
+ Licensor. For purposes of this Public License, where the Licensed
+ Material is a musical work, performance, or sound recording,
+ Adapted Material is always produced where the Licensed Material is
+ synched in timed relation with a moving image.
+ b. Adapter's License means the license You apply to Your Copyright
+ and Similar Rights in Your contributions to Adapted Material in
+ accordance with the terms and conditions of this Public License.
+ c. Copyright and Similar Rights means copyright and/or similar rights
+ closely related to copyright including, without limitation,
+ performance, broadcast, sound recording, and Sui Generis Database
+ Rights, without regard to how the rights are labeled or
+ categorized. For purposes of this Public License, the rights
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
+ Rights.
+ d. Effective Technological Measures means those measures that, in the
+ absence of proper authority, may not be circumvented under laws
+ fulfilling obligations under Article 11 of the WIPO Copyright
+ Treaty adopted on December 20, 1996, and/or similar international
+ agreements.
+ e. Exceptions and Limitations means fair use, fair dealing, and/or
+ any other exception or limitation to Copyright and Similar Rights
+ that applies to Your use of the Licensed Material.
+ f. Licensed Material means the artistic or literary work, database,
+ or other material to which the Licensor applied this Public
+ License.
+ g. Licensed Rights means the rights granted to You subject to the
+ terms and conditions of this Public License, which are limited to
+ all Copyright and Similar Rights that apply to Your use of the
+ Licensed Material and that the Licensor has authority to license.
+ h. Licensor means the individual(s) or entity(ies) granting rights
+ under this Public License.
+ i. Share means to provide material to the public by any means or
+ process that requires permission under the Licensed Rights, such
+ as reproduction, public display, public performance, distribution,
+ dissemination, communication, or importation, and to make material
+ available to the public including in ways that members of the
+ public may access the material from a place and at a time
+ individually chosen by them.
+ j. Sui Generis Database Rights means rights other than copyright
+ resulting from Directive 96/9/EC of the European Parliament and of
+ the Council of 11 March 1996 on the legal protection of databases,
+ as amended and/or succeeded, as well as other essentially
+ equivalent rights anywhere in the world.
+ k. You means the individual or entity exercising the Licensed Rights
+ under this Public License. Your has a corresponding meaning.
+
+Section 2 -- Scope.
+
+ a. License grant.
+ 1. Subject to the terms and conditions of this Public License,
+ the Licensor hereby grants You a worldwide, royalty-free,
+ non-sublicensable, non-exclusive, irrevocable license to
+ exercise the Licensed Rights in the Licensed Material to:
+ a. reproduce and Share the Licensed Material, in whole or
+ in part; and
+ b. produce, reproduce, and Share Adapted Material.
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
+ Exceptions and Limitations apply to Your use, this Public
+ License does not apply, and You do not need to comply with
+ its terms and conditions.
+ 3. Term. The term of this Public License is specified in Section
+ 6(a).
+ 4. Media and formats; technical modifications allowed. The
+ Licensor authorizes You to exercise the Licensed Rights in
+ all media and formats whether now known or hereafter created,
+ and to make technical modifications necessary to do so. The
+ Licensor waives and/or agrees not to assert any right or
+ authority to forbid You from making technical modifications
+ necessary to exercise the Licensed Rights, including
+ technical modifications necessary to circumvent Effective
+ Technological Measures. For purposes of this Public License,
+ simply making modifications authorized by this Section 2(a)
+ (4) never produces Adapted Material.
+ 5. Downstream recipients.
+ a. Offer from the Licensor -- Licensed Material. Every
+ recipient of the Licensed Material automatically
+ receives an offer from the Licensor to exercise the
+ Licensed Rights under the terms and conditions of this
+ Public License.
+ b. No downstream restrictions. You may not offer or impose
+ any additional or different terms or conditions on, or
+ apply any Effective Technological Measures to, the
+ Licensed Material if doing so restricts exercise of the
+ Licensed Rights by any recipient of the Licensed
+ Material.
+ 6. No endorsement. Nothing in this Public License constitutes or
+ may be construed as permission to assert or imply that You
+ are, or that Your use of the Licensed Material is, connected
+ with, or sponsored, endorsed, or granted official status by,
+ the Licensor or others designated to receive attribution as
+ provided in Section 3(a)(1)(A)(i).
+ b. Other rights.
+ 1. Moral rights, such as the right of integrity, are not
+ licensed under this Public License, nor are publicity,
+ privacy, and/or other similar personality rights; however, to
+ the extent possible, the Licensor waives and/or agrees not to
+ assert any such rights held by the Licensor to the limited
+ extent necessary to allow You to exercise the Licensed
+ Rights, but not otherwise.
+ 2. Patent and trademark rights are not licensed under this
+ Public License.
+ 3. To the extent possible, the Licensor waives any right to
+ collect royalties from You for the exercise of the Licensed
+ Rights, whether directly or through a collecting society
+ under any voluntary or waivable statutory or compulsory
+ licensing scheme. In all other cases the Licensor expressly
+ reserves any right to collect such royalties.
+
+Section 3 -- License Conditions.
+
+Your exercise of the Licensed Rights is expressly made subject to the following conditions.
+
+ a. Attribution.
+ 1. If You Share the Licensed Material (including in modified
+ form), You must:
+ a. retain the following if it is supplied by the Licensor
+ with the Licensed Material:
+ i. identification of the creator(s) of the Licensed
+ Material and any others designated to receive
+ attribution, in any reasonable manner requested by
+ the Licensor (including by pseudonym if
+ designated);
+ ii. a copyright notice;
+ iii. a notice that refers to this Public License;
+ iv. a notice that refers to the disclaimer of
+ warranties;
+ v. a URI or hyperlink to the Licensed Material to the
+ extent reasonably practicable;
+ b. indicate if You modified the Licensed Material and
+ retain an indication of any previous modifications; and
+ c. indicate the Licensed Material is licensed under this
+ Public License, and include the text of, or the URI or
+ hyperlink to, this Public License.
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
+ reasonable manner based on the medium, means, and context in
+ which You Share the Licensed Material. For example, it may be
+ reasonable to satisfy the conditions by providing a URI or
+ hyperlink to a resource that includes the required
+ information.
+ 3. If requested by the Licensor, You must remove any of the
+ information required by Section 3(a)(1)(A) to the extent
+ reasonably practicable.
+ 4. If You Share Adapted Material You produce, the Adapter's
+ License You apply must not prevent recipients of the Adapted
+ Material from complying with this Public License.
+
+Section 4 -- Sui Generis Database Rights.
+
+Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
+
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
+ to extract, reuse, reproduce, and Share all or a substantial
+ portion of the contents of the database;
+ b. if You include all or a substantial portion of the database
+ contents in a database in which You have Sui Generis Database
+ Rights, then the database in which You have Sui Generis Database
+ Rights (but not its individual contents) is Adapted Material; and
+ c. You must comply with the conditions in Section 3(a) if You Share
+ all or a substantial portion of the contents of the database.
+For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
+
+
+Section 5 -- Disclaimer of Warranties and Limitation of Liability.
+
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
+ c. The disclaimer of warranties and limitation of liability provided
+ above shall be interpreted in a manner that, to the extent
+ possible, most closely approximates an absolute disclaimer and
+ waiver of all liability.
+
+Section 6 -- Term and Termination.
+
+ a. This Public License applies for the term of the Copyright and
+ Similar Rights licensed here. However, if You fail to comply with
+ this Public License, then Your rights under this Public License
+ terminate automatically.
+ b. Where Your right to use the Licensed Material has terminated under
+ Section 6(a), it reinstates:
+ 1. automatically as of the date the violation is cured, provided
+ it is cured within 30 days of Your discovery of the
+ violation; or
+ 2. upon express reinstatement by the Licensor.
+ For the avoidance of doubt, this Section 6(b) does not affect any
+ right the Licensor may have to seek remedies for Your violations
+ of this Public License.
+ c. For the avoidance of doubt, the Licensor may also offer the
+ Licensed Material under separate terms or conditions or stop
+ distributing the Licensed Material at any time; however, doing so
+ will not terminate this Public License.
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
+ License.
+
+Section 7 -- Other Terms and Conditions.
+
+ a. The Licensor shall not be bound by any additional or different
+ terms or conditions communicated by You unless expressly agreed.
+ b. Any arrangements, understandings, or agreements regarding the
+ Licensed Material not stated herein are separate from and
+ independent of the terms and conditions of this Public License.
+
+Section 8 -- Interpretation.
+
+ a. For the avoidance of doubt, this Public License does not, and
+ shall not be interpreted to, reduce, limit, restrict, or impose
+ conditions on any use of the Licensed Material that could lawfully
+ be made without permission under this Public License.
+ b. To the extent possible, if any provision of this Public License is
+ deemed unenforceable, it shall be automatically reformed to the
+ minimum extent necessary to make it enforceable. If the provision
+ cannot be reformed, it shall be severed from this Public License
+ without affecting the enforceability of the remaining terms and
+ conditions.
+ c. No term or condition of this Public License will be waived and no
+ failure to comply consented to unless expressly agreed to by the
+ Licensor.
+ d. Nothing in this Public License constitutes or may be interpreted
+ as a limitation upon, or waiver of, any privileges and immunities
+ that apply to the Licensor or You, including from the legal
+ processes of any jurisdiction or authority.
+Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the "Licensor." The text of the Creative Commons public licenses is dedicated to the public domain under the CC0 Public Domain Dedication. Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
+
+Creative Commons may be contacted at creativecommons.org. \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/animate/animate.min.css b/common/src/main/webapp/thirdparty/animate/animate.min.css
new file mode 100644
index 0000000..88b94d5
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/animate/animate.min.css
@@ -0,0 +1,6 @@
+@charset "UTF-8";/*!
+Animate.css - http://daneden.me/animate
+Licensed under the MIT license - http://opensource.org/licenses/MIT
+
+Copyright (c) 2014 Daniel Eden
+*/.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.animated.hinge{-webkit-animation-duration:2s;animation-duration:2s}@-webkit-keyframes bounce{0%,100%,20%,53%,80%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-transition-timing-function:cubic-bezier(0.755,.050,.855,.060);transition-timing-function:cubic-bezier(0.755,.050,.855,.060);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-transition-timing-function:cubic-bezier(0.755,.050,.855,.060);transition-timing-function:cubic-bezier(0.755,.050,.855,.060);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}@keyframes bounce{0%,100%,20%,53%,80%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-transition-timing-function:cubic-bezier(0.755,.050,.855,.060);transition-timing-function:cubic-bezier(0.755,.050,.855,.060);-webkit-transform:translate3d(0,-30px,0);-ms-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-transition-timing-function:cubic-bezier(0.755,.050,.855,.060);transition-timing-function:cubic-bezier(0.755,.050,.855,.060);-webkit-transform:translate3d(0,-15px,0);-ms-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);-ms-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}.bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;-ms-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes flash{0%,100%,50%{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,100%,50%{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{0%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}100%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes pulse{0%{-webkit-transform:scale3d(1,1,1);-ms-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);-ms-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}100%{-webkit-transform:scale3d(1,1,1);-ms-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.pulse{-webkit-animation-name:pulse;animation-name:pulse}@-webkit-keyframes rubberBand{0%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(0.75,1.25,1);transform:scale3d(0.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}100%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes rubberBand{0%{-webkit-transform:scale3d(1,1,1);-ms-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);-ms-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(0.75,1.25,1);-ms-transform:scale3d(0.75,1.25,1);transform:scale3d(0.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);-ms-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);-ms-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);-ms-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}100%{-webkit-transform:scale3d(1,1,1);-ms-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shake{0%,100%{-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);-ms-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);-ms-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.shake{-webkit-animation-name:shake;animation-name:shake}@-webkit-keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}100%{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}@keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);-ms-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);-ms-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);-ms-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);-ms-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}100%{-webkit-transform:rotate3d(0,0,1,0deg);-ms-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}.swing{-webkit-transform-origin:top center;-ms-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{0%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}100%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes tada{0%{-webkit-transform:scale3d(1,1,1);-ms-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);-ms-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);-ms-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);-ms-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}100%{-webkit-transform:scale3d(1,1,1);-ms-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{0%{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}100%{-webkit-transform:none;transform:none}}@keyframes wobble{0%{-webkit-transform:none;-ms-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);-ms-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);-ms-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);-ms-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);-ms-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);-ms-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}100%{-webkit-transform:none;-ms-transform:none;transform:none}}.wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes bounceIn{0%,100%,20%,40%,60%,80%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes bounceIn{0%,100%,20%,40%,60%,80%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);-ms-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);-ms-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);-ms-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);-ms-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);-ms-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.bounceIn{-webkit-animation-name:bounceIn;animation-name:bounceIn;-webkit-animation-duration:.75s;animation-duration:.75s}@-webkit-keyframes bounceInDown{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}100%{-webkit-transform:none;transform:none}}@keyframes bounceInDown{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);-ms-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);-ms-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);-ms-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);-ms-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}100%{-webkit-transform:none;-ms-transform:none;transform:none}}.bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}100%{-webkit-transform:none;transform:none}}@keyframes bounceInLeft{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);-ms-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);-ms-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);-ms-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);-ms-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}100%{-webkit-transform:none;-ms-transform:none;transform:none}}.bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}100%{-webkit-transform:none;transform:none}}@keyframes bounceInRight{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0);-ms-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);-ms-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);-ms-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);-ms-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}100%{-webkit-transform:none;-ms-transform:none;transform:none}}.bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes bounceInUp{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0);-ms-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);-ms-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);-ms-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);-ms-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}100%{-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);-ms-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);-ms-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}.bounceOut{-webkit-animation-name:bounceOut;animation-name:bounceOut;-webkit-animation-duration:.75s;animation-duration:.75s}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}100%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);-ms-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);-ms-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}100%{opacity:0;-webkit-transform:translate3d(0,2000px,0);-ms-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}100%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);-ms-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}100%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);-ms-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}100%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);-ms-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}100%{opacity:0;-webkit-transform:translate3d(2000px,0,0);-ms-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}100%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);-ms-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);-ms-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}100%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);-ms-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);-ms-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}100%{opacity:1;-webkit-transform:none;-ms-transform:none;transform:none}}.fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);-ms-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}100%{opacity:1;-webkit-transform:none;-ms-transform:none;transform:none}}.fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);-ms-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}100%{opacity:1;-webkit-transform:none;-ms-transform:none;transform:none}}.fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);-ms-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}100%{opacity:1;-webkit-transform:none;-ms-transform:none;transform:none}}.fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);-ms-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}100%{opacity:1;-webkit-transform:none;-ms-transform:none;transform:none}}.fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);-ms-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}100%{opacity:1;-webkit-transform:none;-ms-transform:none;transform:none}}.fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);-ms-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}100%{opacity:1;-webkit-transform:none;-ms-transform:none;transform:none}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);-ms-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}100%{opacity:1;-webkit-transform:none;-ms-transform:none;transform:none}}.fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,100%,0);-ms-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,2000px,0);-ms-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(-100%,0,0);-ms-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);-ms-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(100%,0,0);-ms-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(2000px,0,0);-ms-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,-100%,0);-ms-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);-ms-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes flip{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}100%{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);-ms-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-ms-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-ms-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);-ms-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}100%{-webkit-transform:perspective(400px);-ms-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.animated.flip{-webkit-backface-visibility:visible;-ms-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);-ms-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);-ms-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);-ms-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);-ms-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}100%{-webkit-transform:perspective(400px);-ms-transform:perspective(400px);transform:perspective(400px)}}.flipInX{-webkit-backface-visibility:visible!important;-ms-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}@-webkit-keyframes flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);-ms-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);-ms-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);-ms-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);-ms-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}100%{-webkit-transform:perspective(400px);-ms-transform:perspective(400px);transform:perspective(400px)}}.flipInY{-webkit-backface-visibility:visible!important;-ms-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@keyframes flipOutX{0%{-webkit-transform:perspective(400px);-ms-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);-ms-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);-ms-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}.flipOutX{-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-backface-visibility:visible!important;-ms-backface-visibility:visible!important;backface-visibility:visible!important}@-webkit-keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@keyframes flipOutY{0%{-webkit-transform:perspective(400px);-ms-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);-ms-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);-ms-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}.flipOutY{-webkit-backface-visibility:visible!important;-ms-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY;-webkit-animation-duration:.75s;animation-duration:.75s}@-webkit-keyframes lightSpeedIn{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}100%{-webkit-transform:none;transform:none;opacity:1}}@keyframes lightSpeedIn{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);-ms-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);-ms-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);-ms-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}100%{-webkit-transform:none;-ms-transform:none;transform:none;opacity:1}}.lightSpeedIn{-webkit-animation-name:lightSpeedIn;animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOut{0%{opacity:1}100%{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}@keyframes lightSpeedOut{0%{opacity:1}100%{-webkit-transform:translate3d(100%,0,0) skewX(30deg);-ms-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}.lightSpeedOut{-webkit-animation-name:lightSpeedOut;animation-name:lightSpeedOut;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{0%{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}100%{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateIn{0%{-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);-ms-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}100%{-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center;-webkit-transform:none;-ms-transform:none;transform:none;opacity:1}}.rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn}@-webkit-keyframes rotateInDownLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownLeft{0%{-webkit-transform-origin:left bottom;-ms-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);-ms-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}100%{-webkit-transform-origin:left bottom;-ms-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;-ms-transform:none;transform:none;opacity:1}}.rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}@-webkit-keyframes rotateInDownRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownRight{0%{-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);-ms-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}100%{-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;-ms-transform:none;transform:none;opacity:1}}.rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight}@-webkit-keyframes rotateInUpLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpLeft{0%{-webkit-transform-origin:left bottom;-ms-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);-ms-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}100%{-webkit-transform-origin:left bottom;-ms-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;-ms-transform:none;transform:none;opacity:1}}.rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}@-webkit-keyframes rotateInUpRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpRight{0%{-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);-ms-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}100%{-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;-ms-transform:none;transform:none;opacity:1}}.rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight}@-webkit-keyframes rotateOut{0%{-webkit-transform-origin:center;transform-origin:center;opacity:1}100%{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}@keyframes rotateOut{0%{-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center;opacity:1}100%{-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);-ms-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}.rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut}@-webkit-keyframes rotateOutDownLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(0,0,1,45deg);transform:rotate(0,0,1,45deg);opacity:0}}@keyframes rotateOutDownLeft{0%{-webkit-transform-origin:left bottom;-ms-transform-origin:left bottom;transform-origin:left bottom;opacity:1}100%{-webkit-transform-origin:left bottom;-ms-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(0,0,1,45deg);-ms-transform:rotate(0,0,1,45deg);transform:rotate(0,0,1,45deg);opacity:0}}.rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft}@-webkit-keyframes rotateOutDownRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutDownRight{0%{-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom;opacity:1}100%{-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);-ms-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight}@-webkit-keyframes rotateOutUpLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutUpLeft{0%{-webkit-transform-origin:left bottom;-ms-transform-origin:left bottom;transform-origin:left bottom;opacity:1}100%{-webkit-transform-origin:left bottom;-ms-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);-ms-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft}@-webkit-keyframes rotateOutUpRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}@keyframes rotateOutUpRight{0%{-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom;opacity:1}100%{-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);-ms-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}.rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight}@-webkit-keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}100%{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}@keyframes hinge{0%{-webkit-transform-origin:top left;-ms-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);-ms-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;-ms-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);-ms-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;-ms-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}100%{-webkit-transform:translate3d(0,700px,0);-ms-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}.hinge{-webkit-animation-name:hinge;animation-name:hinge}@-webkit-keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);-ms-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}100%{opacity:1;-webkit-transform:none;-ms-transform:none;transform:none}}.rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}@keyframes rollOut{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);-ms-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}.rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}@keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-ms-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-ms-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}.zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}@keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-ms-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-ms-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}.zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}@keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-ms-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-ms-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}.zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}@keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-ms-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-ms-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}.zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}100%{opacity:0}}@keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}100%{opacity:0}}.zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}100%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-ms-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}100%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-ms-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;-ms-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}.zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}100%{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);-ms-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}100%{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);-ms-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;-ms-transform-origin:left center;transform-origin:left center}}.zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}100%{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);-ms-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}100%{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);-ms-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;-ms-transform-origin:right center;transform-origin:right center}}.zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}100%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-ms-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}100%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-ms-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;-ms-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}.zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/avalon/avalon.js b/common/src/main/webapp/thirdparty/avalon/avalon.js
new file mode 100644
index 0000000..a22bb7d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/avalon/avalon.js
@@ -0,0 +1,5819 @@
+/*==================================================
+ Copyright (c) 2013-2015 å¸å¾’正美 and other contributors
+ http://www.cnblogs.com/rubylouvre/
+ https://github.com/RubyLouvre
+ http://weibo.com/jslouvre/
+
+ Released under the MIT license
+ avalon.js 1.45 built in 2015.7.17
+ support IE6+ and other browsers
+ ==================================================*/
+(function(global, factory) {
+
+ if (typeof module === "object" && typeof module.exports === "object") {
+ // For CommonJS and CommonJS-like environments where a proper `window`
+ // is present, execute the factory and get avalon.
+ // For environments that do not have a `window` with a `document`
+ // (such as Node.js), expose a factory as module.exports.
+ // This accentuates the need for the creation of a real `window`.
+ // e.g. var avalon = require("avalon")(window);
+ module.exports = global.document ? factory(global, true) : function(w) {
+ if (!w.document) {
+ throw new Error("Avalon requires a window with a document")
+ }
+ return factory(w)
+ }
+ } else {
+ factory(global)
+ }
+
+// Pass this if window is not defined yet
+}(typeof window !== "undefined" ? window : this, function(window, noGlobal){
+
+/*********************************************************************
+ * 全局å˜é‡åŠæ–¹æ³• *
+ **********************************************************************/
+var expose = new Date() - 0
+//http://stackoverflow.com/questions/7290086/javascript-use-strict-and-nicks-find-global-function
+var DOC = window.document
+var head = DOC.getElementsByTagName("head")[0] //HEAD元素
+var ifGroup = head.insertBefore(document.createElement("avalon"), head.firstChild) //é¿å…IE6 base标签BUG
+ifGroup.innerHTML = "X<style id='avalonStyle'>.avalonHide{ display: none!important }</style>"
+ifGroup.setAttribute("ms-skip", "1")
+ifGroup.className = "avalonHide"
+var rnative = /\[native code\]/ //判定是å¦åŽŸç”Ÿå‡½æ•°
+function log() {
+ if (window.console && avalon.config.debug) {
+ // http://stackoverflow.com/questions/8785624/how-to-safely-wrap-console-log
+ Function.apply.call(console.log, console, arguments)
+ }
+}
+
+
+var subscribers = "$" + expose
+var otherRequire = window.require
+var otherDefine = window.define
+var innerRequire
+var stopRepeatAssign = false
+var rword = /[^, ]+/g //切割字符串为一个个å°å—,以空格或豆å·åˆ†å¼€å®ƒä»¬ï¼Œç»“åˆreplace实现字符串的forEach
+var rcomplexType = /^(?:object|array)$/
+var rsvg = /^\[object SVG\w*Element\]$/
+var rwindow = /^\[object (?:Window|DOMWindow|global)\]$/
+var oproto = Object.prototype
+var ohasOwn = oproto.hasOwnProperty
+var serialize = oproto.toString
+var ap = Array.prototype
+var aslice = ap.slice
+var Registry = {} //将函数æ›å…‰åˆ°æ­¤å¯¹è±¡ä¸Šï¼Œæ–¹ä¾¿è®¿é—®å™¨æ”¶é›†ä¾èµ–
+var W3C = window.dispatchEvent
+var root = DOC.documentElement
+var avalonFragment = DOC.createDocumentFragment()
+var cinerator = DOC.createElement("div")
+var class2type = {}
+"Boolean Number String Function Array Date RegExp Object Error".replace(rword, function (name) {
+ class2type["[object " + name + "]"] = name.toLowerCase()
+})
+
+
+function noop() {
+}
+
+
+function oneObject(array, val) {
+ if (typeof array === "string") {
+ array = array.match(rword) || []
+ }
+ var result = {},
+ value = val !== void 0 ? val : 1
+ for (var i = 0, n = array.length; i < n; i++) {
+ result[array[i]] = value
+ }
+ return result
+}
+
+//生æˆUUID http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
+var generateID = function (prefix) {
+ prefix = prefix || "avalon"
+ return String(Math.random() + Math.random()).replace(/\d\.\d{4}/, prefix)
+}
+function IE() {
+ if (window.VBArray) {
+ var mode = document.documentMode
+ return mode ? mode : window.XMLHttpRequest ? 7 : 6
+ } else {
+ return NaN
+ }
+}
+var IEVersion = IE()
+
+avalon = function (el) { //创建jQueryå¼çš„æ— new 实例化结构
+ return new avalon.init(el)
+}
+
+avalon.profile = function () {
+ if (window.console && avalon.config.profile) {
+ Function.apply.call(console.log, console, arguments)
+ }
+}
+
+/*视æµè§ˆå™¨æƒ…况采用最快的异步回调*/
+avalon.nextTick = new function () {// jshint ignore:line
+ var tickImmediate = window.setImmediate
+ var tickObserver = window.MutationObserver
+ var tickPost = W3C && window.postMessage
+ if (tickImmediate) {
+ return tickImmediate.bind(window)
+ }
+
+ var queue = []
+ function callback() {
+ var n = queue.length
+ for (var i = 0; i < n; i++) {
+ queue[i]()
+ }
+ queue = queue.slice(n)
+ }
+
+ if (tickObserver) {
+ var node = document.createTextNode("avalon")
+ new tickObserver(callback).observe(node, {characterData: true})// jshint ignore:line
+ return function (fn) {
+ queue.push(fn)
+ node.data = Math.random()
+ }
+ }
+
+ if (tickPost) {
+ window.addEventListener("message", function (e) {
+ var source = e.source
+ if ((source === window || source === null) && e.data === "process-tick") {
+ e.stopPropagation()
+ callback()
+ }
+ })
+
+ return function (fn) {
+ queue.push(fn)
+ window.postMessage('process-tick', '*')
+ }
+ }
+
+ return function (fn) {
+ setTimeout(fn, 0)
+ }
+}// jshint ignore:line
+/*********************************************************************
+ * avalonçš„é™æ€æ–¹æ³•å®šä¹‰åŒº *
+ **********************************************************************/
+avalon.init = function (el) {
+ this[0] = this.element = el
+}
+avalon.fn = avalon.prototype = avalon.init.prototype
+
+avalon.type = function (obj) { //å–得目标的类型
+ if (obj == null) {
+ return String(obj)
+ }
+ // 早期的webkit内核æµè§ˆå™¨å®žçŽ°äº†å·²åºŸå¼ƒçš„ecma262v4标准,å¯ä»¥å°†æ­£åˆ™å­—é¢é‡å½“作函数使用,因此typeof在判定正则时会返回function
+ return typeof obj === "object" || typeof obj === "function" ?
+ class2type[serialize.call(obj)] || "object" :
+ typeof obj
+}
+
+var isFunction = typeof alert === "object" ? function (fn) {
+ try {
+ return /^\s*\bfunction\b/.test(fn + "")
+ } catch (e) {
+ return false
+ }
+} : function (fn) {
+ return serialize.call(fn) === "[object Function]"
+}
+avalon.isFunction = isFunction
+
+avalon.isWindow = function (obj) {
+ if (!obj)
+ return false
+ // 利用IE678 window == document为true,document == window竟然为false的神奇特性
+ // 标准æµè§ˆå™¨åŠIE9,IE10等使用 正则检测
+ return obj == obj.document && obj.document != obj //jshint ignore:line
+}
+
+function isWindow(obj) {
+ return rwindow.test(serialize.call(obj))
+}
+if (isWindow(window)) {
+ avalon.isWindow = isWindow
+}
+var enu
+for (enu in avalon({})) {
+ break
+}
+var enumerateBUG = enu !== "0" //IE6下为true, 其他为false
+/*判定是å¦æ˜¯ä¸€ä¸ªæœ´ç´ çš„javascript对象(Object),ä¸æ˜¯DOM对象,ä¸æ˜¯BOM对象,ä¸æ˜¯è‡ªå®šä¹‰ç±»çš„实例*/
+avalon.isPlainObject = function (obj, key) {
+ if (!obj || avalon.type(obj) !== "object" || obj.nodeType || avalon.isWindow(obj)) {
+ return false;
+ }
+ try { //IE内置对象没有constructor
+ if (obj.constructor && !ohasOwn.call(obj, "constructor") && !ohasOwn.call(obj.constructor.prototype, "isPrototypeOf")) {
+ return false;
+ }
+ } catch (e) { //IE8 9会在这里抛错
+ return false;
+ }
+ if (enumerateBUG) {
+ for (key in obj) {
+ return ohasOwn.call(obj, key)
+ }
+ }
+ for (key in obj) {
+ }
+ return key === void 0 || ohasOwn.call(obj, key)
+}
+if (rnative.test(Object.getPrototypeOf)) {
+ avalon.isPlainObject = function (obj) {
+ // 简å•çš„ typeof obj === "object"检测,会致使用isPlainObject(window)在opera下通ä¸è¿‡
+ return serialize.call(obj) === "[object Object]" && Object.getPrototypeOf(obj) === oproto
+ }
+}
+//与jQuery.extend方法,å¯ç”¨äºŽæµ…æ‹·è´ï¼Œæ·±æ‹·è´
+avalon.mix = avalon.fn.mix = function () {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false
+
+ // 如果第一个å‚数为布尔,判定是å¦æ·±æ‹·è´
+ if (typeof target === "boolean") {
+ deep = target
+ target = arguments[1] || {}
+ i++
+ }
+
+ //ç¡®ä¿æŽ¥å—方为一个å¤æ‚çš„æ•°æ®ç±»åž‹
+ if (typeof target !== "object" && !isFunction(target)) {
+ target = {}
+ }
+
+ //如果åªæœ‰ä¸€ä¸ªå‚数,那么新æˆå‘˜æ·»åŠ äºŽmix所在的对象上
+ if (i === length) {
+ target = this
+ i--
+ }
+
+ for (; i < length; i++) {
+ //åªå¤„ç†éžç©ºå‚æ•°
+ if ((options = arguments[i]) != null) {
+ for (name in options) {
+ src = target[name]
+ try {
+ copy = options[name] //当options为VBS对象时报错
+ } catch (e) {
+ continue
+ }
+
+ // 防止环引用
+ if (target === copy) {
+ continue
+ }
+ if (deep && copy && (avalon.isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) {
+
+ if (copyIsArray) {
+ copyIsArray = false
+ clone = src && Array.isArray(src) ? src : []
+
+ } else {
+ clone = src && avalon.isPlainObject(src) ? src : {}
+ }
+
+ target[name] = avalon.mix(deep, clone, copy)
+ } else if (copy !== void 0) {
+ target[name] = copy
+ }
+ }
+ }
+ }
+ return target
+}
+
+function _number(a, len) { //用于模拟slice, splice的效果
+ a = Math.floor(a) || 0
+ return a < 0 ? Math.max(len + a, 0) : Math.min(a, len);
+}
+avalon.mix({
+ rword: rword,
+ subscribers: subscribers,
+ version: 1.45,
+ ui: {},
+ log: log,
+ slice: W3C ? function (nodes, start, end) {
+ return aslice.call(nodes, start, end)
+ } : function (nodes, start, end) {
+ var ret = []
+ var len = nodes.length
+ if (end === void 0)
+ end = len
+ if (typeof end === "number" && isFinite(end)) {
+ start = _number(start, len)
+ end = _number(end, len)
+ for (var i = start; i < end; ++i) {
+ ret[i - start] = nodes[i]
+ }
+ }
+ return ret
+ },
+ noop: noop,
+ /*如果ä¸ç”¨Error对象å°è£…一下,str在控制å°ä¸‹å¯èƒ½ä¼šä¹±ç */
+ error: function (str, e) {
+ throw (e || Error)(str)
+ },
+ /*将一个以空格或逗å·éš”开的字符串或数组,转æ¢æˆä¸€ä¸ªé”®å€¼éƒ½ä¸º1的对象*/
+ oneObject: oneObject,
+ /* avalon.range(10)
+ => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
+ avalon.range(1, 11)
+ => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
+ avalon.range(0, 30, 5)
+ => [0, 5, 10, 15, 20, 25]
+ avalon.range(0, -10, -1)
+ => [0, -1, -2, -3, -4, -5, -6, -7, -8, -9]
+ avalon.range(0)
+ => []*/
+ range: function (start, end, step) { // 用于生æˆæ•´æ•°æ•°ç»„
+ step || (step = 1)
+ if (end == null) {
+ end = start || 0
+ start = 0
+ }
+ var index = -1,
+ length = Math.max(0, Math.ceil((end - start) / step)),
+ result = new Array(length)
+ while (++index < length) {
+ result[index] = start
+ start += step
+ }
+ return result
+ },
+ eventHooks: [],
+ /*绑定事件*/
+ bind: function(el, type, fn, phase) {
+ var hooks = avalon.eventHooks
+ var hook = hooks[type]
+ if (typeof hook === "object") {
+ type = hook.type
+ if (hook.deel) {
+ fn = hook.deel(el, type, fn, phase)
+ }
+ }
+ var callback = W3C ? fn : function(e) {
+ fn.call(el, fixEvent(e));
+ }
+ if (W3C) {
+ el.addEventListener(type, callback, !!phase)
+ } else {
+ el.attachEvent("on" + type, callback)
+ }
+ return callback
+ },
+ /*å¸è½½äº‹ä»¶*/
+ unbind: function(el, type, fn, phase) {
+ var hooks = avalon.eventHooks
+ var hook = hooks[type]
+ var callback = fn || noop
+ if (typeof hook === "object") {
+ type = hook.type
+ if (hook.deel) {
+ fn = hook.deel(el, type, fn, false)
+ }
+ }
+ if (W3C) {
+ el.removeEventListener(type, callback, !!phase)
+ } else {
+ el.detachEvent("on" + type, callback)
+ }
+ },
+ /*读写删除元素节点的样å¼*/
+ css: function (node, name, value) {
+ if (node instanceof avalon) {
+ node = node[0]
+ }
+ var prop = /[_-]/.test(name) ? camelize(name) : name, fn
+ name = avalon.cssName(prop) || prop
+ if (value === void 0 || typeof value === "boolean") { //获å–æ ·å¼
+ fn = cssHooks[prop + ":get"] || cssHooks["@:get"]
+ if (name === "background") {
+ name = "backgroundColor"
+ }
+ var val = fn(node, name)
+ return value === true ? parseFloat(val) || 0 : val
+ } else if (value === "") { //请除样å¼
+ node.style[name] = ""
+ } else { //设置样å¼
+ if (value == null || value !== value) {
+ return
+ }
+ if (isFinite(value) && !avalon.cssNumber[prop]) {
+ value += "px"
+ }
+ fn = cssHooks[prop + ":set"] || cssHooks["@:set"]
+ fn(node, name, value)
+ }
+ },
+ /*é历数组与对象,回调的第一个å‚数为索引或键å,第二个或元素或键值*/
+ each: function (obj, fn) {
+ if (obj) { //排除null, undefined
+ var i = 0
+ if (isArrayLike(obj)) {
+ for (var n = obj.length; i < n; i++) {
+ if (fn(i, obj[i]) === false)
+ break
+ }
+ } else {
+ for (i in obj) {
+ if (obj.hasOwnProperty(i) && fn(i, obj[i]) === false) {
+ break
+ }
+ }
+ }
+ }
+ },
+ //收集元素的data-{{prefix}}-*属性,并转æ¢ä¸ºå¯¹è±¡
+ getWidgetData: function (elem, prefix) {
+ var raw = avalon(elem).data()
+ var result = {}
+ for (var i in raw) {
+ if (i.indexOf(prefix) === 0) {
+ result[i.replace(prefix, "").replace(/\w/, function (a) {
+ return a.toLowerCase()
+ })] = raw[i]
+ }
+ }
+ return result
+ },
+ Array: {
+ /*åªæœ‰å½“å‰æ•°ç»„ä¸å­˜åœ¨æ­¤å…ƒç´ æ—¶åªæ·»åŠ å®ƒ*/
+ ensure: function (target, item) {
+ if (target.indexOf(item) === -1) {
+ return target.push(item)
+ }
+ },
+ /*移除数组中指定ä½ç½®çš„元素,返回布尔表示æˆåŠŸä¸Žå¦*/
+ removeAt: function (target, index) {
+ return !!target.splice(index, 1).length
+ },
+ /*移除数组中第一个匹é…ä¼ å‚的那个元素,返回布尔表示æˆåŠŸä¸Žå¦*/
+ remove: function (target, item) {
+ var index = target.indexOf(item)
+ if (~index)
+ return avalon.Array.removeAt(target, index)
+ return false
+ }
+ }
+})
+
+var bindingHandlers = avalon.bindingHandlers = {}
+var bindingExecutors = avalon.bindingExecutors = {}
+
+/*判定是å¦ç±»æ•°ç»„,如节点集åˆï¼Œçº¯æ•°ç»„,arguments与拥有éžè´Ÿæ•´æ•°çš„length属性的纯JS对象*/
+function isArrayLike(obj) {
+ if (!obj)
+ return false
+ var n = obj.length
+ if (n === (n >>> 0)) { //检测length属性是å¦ä¸ºéžè´Ÿæ•´æ•°
+ var type = serialize.call(obj).slice(8, -1)
+ if (/(?:regexp|string|function|window|global)$/i.test(type))
+ return false
+ if (type === "Array")
+ return true
+ try {
+ if ({}.propertyIsEnumerable.call(obj, "length") === false) { //如果是原生对象
+ return /^\s?function/.test(obj.item || obj.callee)
+ }
+ return true
+ } catch (e) { //IE的NodeList直接抛错
+ return !obj.window //IE6-8 window
+ }
+ }
+ return false
+}
+
+
+// https://github.com/rsms/js-lru
+var Cache = new function() {// jshint ignore:line
+ function LRU(maxLength) {
+ this.size = 0
+ this.limit = maxLength
+ this.head = this.tail = void 0
+ this._keymap = {}
+ }
+
+ var p = LRU.prototype
+
+ p.put = function(key, value) {
+ var entry = {
+ key: key,
+ value: value
+ }
+ this._keymap[key] = entry
+ if (this.tail) {
+ this.tail.newer = entry
+ entry.older = this.tail
+ } else {
+ this.head = entry
+ }
+ this.tail = entry
+ if (this.size === this.limit) {
+ this.shift()
+ } else {
+ this.size++
+ }
+ return value
+ }
+
+ p.shift = function() {
+ var entry = this.head
+ if (entry) {
+ this.head = this.head.newer
+ this.head.older =
+ entry.newer =
+ entry.older =
+ this._keymap[entry.key] = void 0
+ }
+ }
+ p.get = function(key) {
+ var entry = this._keymap[key]
+ if (entry === void 0)
+ return
+ if (entry === this.tail) {
+ return entry.value
+ }
+ // HEAD--------------TAIL
+ // <.older .newer>
+ // <--- add direction --
+ // A B C <D> E
+ if (entry.newer) {
+ if (entry === this.head) {
+ this.head = entry.newer
+ }
+ entry.newer.older = entry.older // C <-- E.
+ }
+ if (entry.older) {
+ entry.older.newer = entry.newer // C. --> E
+ }
+ entry.newer = void 0 // D --x
+ entry.older = this.tail // D. --> E
+ if (this.tail) {
+ this.tail.newer = entry // E. <-- D
+ }
+ this.tail = entry
+ return entry.value
+ }
+ return LRU
+}// jshint ignore:line
+
+/*********************************************************************
+ * javascript åº•å±‚è¡¥ä¸ *
+ **********************************************************************/
+if (!"å¸å¾’正美".trim) {
+ var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g
+ String.prototype.trim = function () {
+ return this.replace(rtrim, "")
+ }
+}
+var hasDontEnumBug = !({
+ 'toString': null
+}).propertyIsEnumerable('toString'),
+ hasProtoEnumBug = (function () {
+ }).propertyIsEnumerable('prototype'),
+ dontEnums = [
+ "toString",
+ "toLocaleString",
+ "valueOf",
+ "hasOwnProperty",
+ "isPrototypeOf",
+ "propertyIsEnumerable",
+ "constructor"
+ ],
+ dontEnumsLength = dontEnums.length;
+if (!Object.keys) {
+ Object.keys = function (object) { //ecma262v5 15.2.3.14
+ var theKeys = []
+ var skipProto = hasProtoEnumBug && typeof object === "function"
+ if (typeof object === "string" || (object && object.callee)) {
+ for (var i = 0; i < object.length; ++i) {
+ theKeys.push(String(i))
+ }
+ } else {
+ for (var name in object) {
+ if (!(skipProto && name === "prototype") && ohasOwn.call(object, name)) {
+ theKeys.push(String(name))
+ }
+ }
+ }
+
+ if (hasDontEnumBug) {
+ var ctor = object.constructor,
+ skipConstructor = ctor && ctor.prototype === object
+ for (var j = 0; j < dontEnumsLength; j++) {
+ var dontEnum = dontEnums[j]
+ if (!(skipConstructor && dontEnum === "constructor") && ohasOwn.call(object, dontEnum)) {
+ theKeys.push(dontEnum)
+ }
+ }
+ }
+ return theKeys
+ }
+}
+if (!Array.isArray) {
+ Array.isArray = function (a) {
+ return serialize.call(a) === "[object Array]"
+ }
+}
+
+if (!noop.bind) {
+ Function.prototype.bind = function (scope) {
+ if (arguments.length < 2 && scope === void 0)
+ return this
+ var fn = this,
+ argv = arguments
+ return function () {
+ var args = [],
+ i
+ for (i = 1; i < argv.length; i++)
+ args.push(argv[i])
+ for (i = 0; i < arguments.length; i++)
+ args.push(arguments[i])
+ return fn.apply(scope, args)
+ }
+ }
+}
+
+function iterator(vars, body, ret) {
+ var fun = 'for(var ' + vars + 'i=0,n = this.length; i < n; i++){' + body.replace('_', '((i in this) && fn.call(scope,this[i],i,this))') + '}' + ret
+ /* jshint ignore:start */
+ return Function("fn,scope", fun)
+ /* jshint ignore:end */
+}
+if (!rnative.test([].map)) {
+ avalon.mix(ap, {
+ //定ä½æ“作,返回数组中第一个等于给定å‚数的元素的索引值。
+ indexOf: function (item, index) {
+ var n = this.length,
+ i = ~~index
+ if (i < 0)
+ i += n
+ for (; i < n; i++)
+ if (this[i] === item)
+ return i
+ return -1
+ },
+ //定ä½æ“作,åŒä¸Šï¼Œä¸è¿‡æ˜¯ä»ŽåŽé历。
+ lastIndexOf: function (item, index) {
+ var n = this.length,
+ i = index == null ? n - 1 : index
+ if (i < 0)
+ i = Math.max(0, n + i)
+ for (; i >= 0; i--)
+ if (this[i] === item)
+ return i
+ return -1
+ },
+ //迭代æ“作,将数组的元素挨个儿传入一个函数中执行。Prototype.js的对应å字为each。
+ forEach: iterator("", '_', ""),
+ //迭代类 在数组中的æ¯ä¸ªé¡¹ä¸Šè¿è¡Œä¸€ä¸ªå‡½æ•°ï¼Œå¦‚果此函数的值为真,则此元素作为新数组的元素收集起æ¥ï¼Œå¹¶è¿”回新数组
+ filter: iterator('r=[],j=0,', 'if(_)r[j++]=this[i]', 'return r'),
+ //收集æ“作,将数组的元素挨个儿传入一个函数中执行,然åŽæŠŠå®ƒä»¬çš„返回值组æˆä¸€ä¸ªæ–°æ•°ç»„返回。Prototype.js的对应å字为collect。
+ map: iterator('r=[],', 'r[i]=_', 'return r'),
+ //åªè¦æ•°ç»„中有一个元素满足æ¡ä»¶ï¼ˆæ”¾è¿›ç»™å®šå‡½æ•°è¿”回true),那么它就返回true。Prototype.js的对应å字为any。
+ some: iterator("", 'if(_)return true', 'return false'),
+ //åªæœ‰æ•°ç»„中的元素都满足æ¡ä»¶ï¼ˆæ”¾è¿›ç»™å®šå‡½æ•°è¿”回true),它æ‰è¿”回true。Prototype.js的对应å字为all。
+ every: iterator("", 'if(!_)return false', 'return true')
+ })
+}
+/*********************************************************************
+ * DOM åº•å±‚è¡¥ä¸ *
+ **********************************************************************/
+
+function fixContains(root, el) {
+ try { //IE6-8,游离于DOM树外的文本节点,访问parentNode有时会抛错
+ while ((el = el.parentNode))
+ if (el === root)
+ return true
+ return false
+ } catch (e) {
+ return false
+ }
+}
+avalon.contains = fixContains
+//IE6-11的文档对象没有contains
+if (!DOC.contains) {
+ DOC.contains = function (b) {
+ return fixContains(DOC, b)
+ }
+}
+
+function outerHTML() {
+ return new XMLSerializer().serializeToString(this)
+}
+
+if (window.SVGElement) {
+ //safari5+是把contains方法放在Element.prototype上而ä¸æ˜¯Node.prototype
+ if (!DOC.createTextNode("x").contains) {
+ Node.prototype.contains = function (arg) {//IE6-8没有Node对象
+ return !!(this.compareDocumentPosition(arg) & 16)
+ }
+ }
+ var svgns = "http://www.w3.org/2000/svg"
+ var svg = DOC.createElementNS(svgns, "svg")
+ svg.innerHTML = '<circle cx="50" cy="50" r="40" fill="red" />'
+ if (!rsvg.test(svg.firstChild)) { // #409
+ function enumerateNode(node, targetNode) {// jshint ignore:line
+ if (node && node.childNodes) {
+ var nodes = node.childNodes
+ for (var i = 0, el; el = nodes[i++]; ) {
+ if (el.tagName) {
+ var svg = DOC.createElementNS(svgns,
+ el.tagName.toLowerCase())
+ ap.forEach.call(el.attributes, function (attr) {
+ svg.setAttribute(attr.name, attr.value) //å¤åˆ¶å±žæ€§
+ })// jshint ignore:line
+ // 递归处ç†å­èŠ‚点
+ enumerateNode(el, svg)
+ targetNode.appendChild(svg)
+ }
+ }
+ }
+ }
+ Object.defineProperties(SVGElement.prototype, {
+ "outerHTML": {//IE9-11,firefoxä¸æ”¯æŒSVG元素的innerHTML,outerHTML属性
+ enumerable: true,
+ configurable: true,
+ get: outerHTML,
+ set: function (html) {
+ var tagName = this.tagName.toLowerCase(),
+ par = this.parentNode,
+ frag = avalon.parseHTML(html)
+ // æ“作的svg,直接æ’å…¥
+ if (tagName === "svg") {
+ par.insertBefore(frag, this)
+ // svg节点的å­èŠ‚点类似
+ } else {
+ var newFrag = DOC.createDocumentFragment()
+ enumerateNode(frag, newFrag)
+ par.insertBefore(newFrag, this)
+ }
+ par.removeChild(this)
+ }
+ },
+ "innerHTML": {
+ enumerable: true,
+ configurable: true,
+ get: function () {
+ var s = this.outerHTML
+ var ropen = new RegExp("<" + this.nodeName + '\\b(?:(["\'])[^"]*?(\\1)|[^>])*>', "i")
+ var rclose = new RegExp("<\/" + this.nodeName + ">$", "i")
+ return s.replace(ropen, "").replace(rclose, "")
+ },
+ set: function (html) {
+ if (avalon.clearHTML) {
+ avalon.clearHTML(this)
+ var frag = avalon.parseHTML(html)
+ enumerateNode(frag, this)
+ }
+ }
+ }
+ })
+ }
+}
+if (!root.outerHTML && window.HTMLElement) { //firefox 到11æ—¶æ‰æœ‰outerHTML
+ HTMLElement.prototype.__defineGetter__("outerHTML", outerHTML);
+}
+
+
+//============================= event binding =======================
+var rmouseEvent = /^(?:mouse|contextmenu|drag)|click/
+function fixEvent(event) {
+ var ret = {}
+ for (var i in event) {
+ ret[i] = event[i]
+ }
+ var target = ret.target = event.srcElement
+ if (event.type.indexOf("key") === 0) {
+ ret.which = event.charCode != null ? event.charCode : event.keyCode
+ } else if (rmouseEvent.test(event.type)) {
+ var doc = target.ownerDocument || DOC
+ var box = doc.compatMode === "BackCompat" ? doc.body : doc.documentElement
+ ret.pageX = event.clientX + (box.scrollLeft >> 0) - (box.clientLeft >> 0)
+ ret.pageY = event.clientY + (box.scrollTop >> 0) - (box.clientTop >> 0)
+ ret.wheelDeltaY = ret.wheelDelta
+ ret.wheelDeltaX = 0
+ }
+ ret.timeStamp = new Date() - 0
+ ret.originalEvent = event
+ ret.preventDefault = function () { //阻止默认行为
+ event.returnValue = false
+ }
+ ret.stopPropagation = function () { //阻止事件在DOM树中的传播
+ event.cancelBubble = true
+ }
+ return ret
+}
+
+var eventHooks = avalon.eventHooks
+//针对firefox, chrome修正mouseenter, mouseleave
+if (!("onmouseenter" in root)) {
+ avalon.each({
+ mouseenter: "mouseover",
+ mouseleave: "mouseout"
+ }, function (origType, fixType) {
+ eventHooks[origType] = {
+ type: fixType,
+ deel: function (elem, _, fn) {
+ return function (e) {
+ var t = e.relatedTarget
+ if (!t || (t !== elem && !(elem.compareDocumentPosition(t) & 16))) {
+ delete e.type
+ e.type = origType
+ return fn.call(elem, e)
+ }
+ }
+ }
+ }
+ })
+}
+//针对IE9+, w3c修正animationend
+avalon.each({
+ AnimationEvent: "animationend",
+ WebKitAnimationEvent: "webkitAnimationEnd"
+}, function (construct, fixType) {
+ if (window[construct] && !eventHooks.animationend) {
+ eventHooks.animationend = {
+ type: fixType
+ }
+ }
+})
+//针对IE6-8修正input
+if (!("oninput" in DOC.createElement("input"))) {
+ eventHooks.input = {
+ type: "propertychange",
+ deel: function (elem, _, fn) {
+ return function (e) {
+ if (e.propertyName === "value") {
+ e.type = "input"
+ return fn.call(elem, e)
+ }
+ }
+ }
+ }
+}
+if (DOC.onmousewheel === void 0) {
+ /* IE6-11 chrome mousewheel wheelDetla 下 -120 上 120
+ firefox DOMMouseScroll detail 下3 上-3
+ firefox wheel detlaY 下3 上-3
+ IE9-11 wheel deltaY 下40 上-40
+ chrome wheel deltaY 下100 上-100 */
+ var fixWheelType = DOC.onwheel !== void 0 ? "wheel" : "DOMMouseScroll"
+ var fixWheelDelta = fixWheelType === "wheel" ? "deltaY" : "detail"
+ eventHooks.mousewheel = {
+ type: fixWheelType,
+ deel: function (elem, _, fn) {
+ return function (e) {
+ e.wheelDeltaY = e.wheelDelta = e[fixWheelDelta] > 0 ? -120 : 120
+ e.wheelDeltaX = 0
+ if (Object.defineProperty) {
+ Object.defineProperty(e, "type", {
+ value: "mousewheel"
+ })
+ }
+ fn.call(elem, e)
+ }
+ }
+ }
+}
+
+
+
+/*********************************************************************
+ * é…置系统 *
+ **********************************************************************/
+
+function kernel(settings) {
+ for (var p in settings) {
+ if (!ohasOwn.call(settings, p))
+ continue
+ var val = settings[p]
+ if (typeof kernel.plugins[p] === "function") {
+ kernel.plugins[p](val)
+ } else if (typeof kernel[p] === "object") {
+ avalon.mix(kernel[p], val)
+ } else {
+ kernel[p] = val
+ }
+ }
+ return this
+}
+var openTag, closeTag, rexpr, rexprg, rbind, rregexp = /[-.*+?^${}()|[\]\/\\]/g
+
+function escapeRegExp(target) {
+ //http://stevenlevithan.com/regex/xregexp/
+ //将字符串安全格å¼åŒ–为正则表达å¼çš„æºç 
+ return (target + "").replace(rregexp, "\\$&")
+}
+
+var plugins = {
+ loader: function (builtin) {
+ var flag = innerRequire && builtin
+ window.require = flag ? innerRequire : otherRequire
+ window.define = flag ? innerRequire.define : otherDefine
+ },
+ interpolate: function (array) {
+ openTag = array[0]
+ closeTag = array[1]
+ if (openTag === closeTag) {
+ throw new SyntaxError("openTag!==closeTag")
+ var test = openTag + "test" + closeTag
+ cinerator.innerHTML = test
+ if (cinerator.innerHTML !== test && cinerator.innerHTML.indexOf("&lt;") > -1) {
+ throw new SyntaxError("此定界符ä¸åˆæ³•")
+ }
+ cinerator.innerHTML = ""
+ }
+ var o = escapeRegExp(openTag),
+ c = escapeRegExp(closeTag)
+ rexpr = new RegExp(o + "(.*?)" + c)
+ rexprg = new RegExp(o + "(.*?)" + c, "g")
+ rbind = new RegExp(o + ".*?" + c + "|\\sms-")
+ }
+}
+
+kernel.debug = true
+kernel.plugins = plugins
+kernel.plugins['interpolate'](["{{", "}}"])
+kernel.paths = {}
+kernel.shim = {}
+kernel.maxRepeatSize = 100
+avalon.config = kernel
+var ravalon = /(\w+)\[(avalonctrl)="(\S+)"\]/
+var findNodes = DOC.querySelectorAll ? function(str) {
+ return DOC.querySelectorAll(str)
+} : function(str) {
+ var match = str.match(ravalon)
+ var all = DOC.getElementsByTagName(match[1])
+ var nodes = []
+ for (var i = 0, el; el = all[i++]; ) {
+ if (el.getAttribute(match[2]) === match[3]) {
+ nodes.push(el)
+ }
+ }
+ return nodes
+}
+/*********************************************************************
+ * 事件总线 *
+ **********************************************************************/
+var EventBus = {
+ $watch: function (type, callback) {
+ if (typeof callback === "function") {
+ var callbacks = this.$events[type]
+ if (callbacks) {
+ callbacks.push(callback)
+ } else {
+ this.$events[type] = [callback]
+ }
+ } else { //é‡æ–°å¼€å§‹ç›‘å¬æ­¤VM的第一é‡ç®€å•å±žæ€§çš„å˜åŠ¨
+ this.$events = this.$watch.backup
+ }
+ return this
+ },
+ $unwatch: function (type, callback) {
+ var n = arguments.length
+ if (n === 0) { //让此VM的所有$watch回调无效化
+ this.$watch.backup = this.$events
+ this.$events = {}
+ } else if (n === 1) {
+ this.$events[type] = []
+ } else {
+ var callbacks = this.$events[type] || []
+ var i = callbacks.length
+ while (~--i < 0) {
+ if (callbacks[i] === callback) {
+ return callbacks.splice(i, 1)
+ }
+ }
+ }
+ return this
+ },
+ $fire: function (type) {
+ var special, i, v, callback
+ if (/^(\w+)!(\S+)$/.test(type)) {
+ special = RegExp.$1
+ type = RegExp.$2
+ }
+ var events = this.$events
+ if (!events)
+ return
+ var args = aslice.call(arguments, 1)
+ var detail = [type].concat(args)
+ if (special === "all") {
+ for (i in avalon.vmodels) {
+ v = avalon.vmodels[i]
+ if (v !== this) {
+ v.$fire.apply(v, detail)
+ }
+ }
+ } else if (special === "up" || special === "down") {
+ var elements = events.expr ? findNodes(events.expr) : []
+ if (elements.length === 0)
+ return
+ for (i in avalon.vmodels) {
+ v = avalon.vmodels[i]
+ if (v !== this) {
+ if (v.$events.expr) {
+ var eventNodes = findNodes(v.$events.expr)
+ if (eventNodes.length === 0) {
+ continue
+ }
+ //循环两个vmodel中的节点,查找匹é…(å‘上匹é…或者å‘下匹é…)的节点并设置标识
+ /* jshint ignore:start */
+ ap.forEach.call(eventNodes, function (node) {
+ ap.forEach.call(elements, function (element) {
+ var ok = special === "down" ? element.contains(node) : //å‘下æ•èŽ·
+ node.contains(element) //å‘上冒泡
+ if (ok) {
+ node._avalon = v //符åˆæ¡ä»¶çš„加一个标识
+ }
+ });
+ })
+ /* jshint ignore:end */
+ }
+ }
+ }
+ var nodes = DOC.getElementsByTagName("*") //实现节点排åº
+ var alls = []
+ ap.forEach.call(nodes, function (el) {
+ if (el._avalon) {
+ alls.push(el._avalon)
+ el._avalon = ""
+ el.removeAttribute("_avalon")
+ }
+ })
+ if (special === "up") {
+ alls.reverse()
+ }
+ for (i = 0; callback = alls[i++]; ) {
+ if (callback.$fire.apply(callback, detail) === false) {
+ break
+ }
+ }
+ } else {
+ var callbacks = events[type] || []
+ var all = events.$all || []
+ for (i = 0; callback = callbacks[i++]; ) {
+ if (isFunction(callback))
+ callback.apply(this, args)
+ }
+ for (i = 0; callback = all[i++]; ) {
+ if (isFunction(callback))
+ callback.apply(this, arguments)
+ }
+ }
+ }
+}
+
+/*********************************************************************
+ * modelFactory *
+ **********************************************************************/
+//avalon最核心的方法的两个方法之一(å¦ä¸€ä¸ªæ˜¯avalon.scan),返回一个ViewModel(VM)
+var VMODELS = avalon.vmodels = {} //所有vmodel都储存在这里
+avalon.define = function (id, factory) {
+ var $id = id.$id || id
+ if (!$id) {
+ log("warning: vm必须指定$id")
+ }
+ if (VMODELS[$id]) {
+ log("warning: " + $id + " å·²ç»å­˜åœ¨äºŽavalon.vmodels中")
+ }
+ if (typeof id === "object") {
+ var model = modelFactory(id)
+ } else {
+ var scope = {
+ $watch: noop
+ }
+ factory(scope) //得到所有定义
+
+ model = modelFactory(scope) //å·å¤©æ¢æ—¥ï¼Œå°†scopeæ¢ä¸ºmodel
+ stopRepeatAssign = true
+ factory(model)
+ stopRepeatAssign = false
+ }
+ model.$id = $id
+ return VMODELS[$id] = model
+}
+
+//一些ä¸éœ€è¦è¢«ç›‘å¬çš„属性
+var $$skipArray = String("$id,$watch,$unwatch,$fire,$events,$model,$skipArray,$proxy,$reinitialize,$propertyNames").match(rword)
+var defineProperty = Object.defineProperty
+var canHideOwn = true
+//如果æµè§ˆå™¨ä¸æ”¯æŒecma262v5çš„Object.defineProperties或者存在BUG,比如IE8
+//标准æµè§ˆå™¨ä½¿ç”¨__defineGetter__, __defineSetter__实现
+try {
+ defineProperty({}, "_", {
+ value: "x"
+ })
+ var defineProperties = Object.defineProperties
+} catch (e) {
+ canHideOwn = false
+}
+
+function modelFactory(source, $special, $model) {
+ if (Array.isArray(source)) {
+ var arr = source.concat()
+ source.length = 0
+ var collection = arrayFactory(source)
+ collection.pushArray(arr)
+ return collection
+ }
+ //0 null undefined || Node || VModel(fix IE6-8 createWithProxy $val: val引å‘çš„BUG)
+ if (!source || source.nodeType > 0 || (source.$id && source.$events)) {
+ return source
+ }
+ var $skipArray = Array.isArray(source.$skipArray) ? source.$skipArray : []
+ $skipArray.$special = $special || {} //强制è¦ç›‘å¬çš„属性
+ var $vmodel = {} //è¦è¿”回的对象, 它在IE6-8下å¯èƒ½è¢«å·é¾™è½¬å‡¤
+ $model = $model || {} //vmodels.$model属性
+ var $events = {} //vmodel.$events属性
+ var accessors = {} //监控属性
+ var computed = []
+ $$skipArray.forEach(function (name) {
+ delete source[name]
+ })
+ var names = Object.keys(source)
+ /* jshint ignore:start */
+ names.forEach(function (name, accessor) {
+ var val = source[name]
+ $model[name] = val
+ if (isObservable(name, val, $skipArray)) {
+ //总共产生三ç§accessor
+ $events[name] = []
+ var valueType = avalon.type(val)
+ //总共产生三ç§accessor
+ if (valueType === "object" && isFunction(val.get) && Object.keys(val).length <= 2) {
+ accessor = makeComputedAccessor(name, val)
+ computed.push(accessor)
+ } else if (rcomplexType.test(valueType)) {
+ accessor = makeComplexAccessor(name, val, valueType, $events[name])
+ } else {
+ accessor = makeSimpleAccessor(name, val)
+ }
+ accessors[name] = accessor
+ }
+ })
+ /* jshint ignore:end */
+
+ $vmodel = defineProperties($vmodel, descriptorFactory(accessors), source) //生æˆä¸€ä¸ªç©ºçš„ViewModel
+ for (var i = 0; i < names.length; i++) {
+ var name = names[i]
+ if (!accessors[name]) {
+ $vmodel[name] = source[name]
+ }
+ }
+ //添加$id, $model, $events, $watch, $unwatch, $fire
+ $vmodel.$propertyNames = names.join("&shy;")
+ $vmodel.$id = generateID()
+ $vmodel.$model = $model
+ $vmodel.$events = $events
+ for (i in EventBus) {
+ var fn = EventBus[i]
+ if (!W3C) { //在IE6-8下,VB对象的方法里的this并ä¸æŒ‡å‘自身,需è¦ç”¨bind处ç†ä¸€ä¸‹
+ fn = fn.bind($vmodel)
+ }
+ $vmodel[i] = fn
+ }
+ if (canHideOwn) {
+ Object.defineProperty($vmodel, "hasOwnProperty", hasOwnDescriptor)
+ } else {
+ /* jshint ignore:start */
+ $vmodel.hasOwnProperty = function (name) {
+ return name in $vmodel.$model
+ }
+ /* jshint ignore:end */
+ }
+
+ $vmodel.$reinitialize = function () {
+ computed.forEach(function (accessor) {
+ delete accessor._value
+ delete accessor.oldArgs
+ accessor.digest = function () {
+ accessor.call($vmodel)
+ }
+ dependencyDetection.begin({
+ callback: function (vm, dependency) {//dependency为一个accessor
+ var name = dependency._name
+ if (dependency !== accessor) {
+ var list = vm.$events[name]
+ injectDependency(list, accessor.digest)
+ }
+ }
+ })
+ try {
+ accessor.get.call($vmodel)
+ } finally {
+ dependencyDetection.end()
+ }
+ })
+ }
+ $vmodel.$reinitialize()
+ return $vmodel
+}
+
+var hasOwnDescriptor = {
+ value: function (name) {
+ return name in this.$model
+ },
+ writable: false,
+ enumerable: false,
+ configurable: true
+}
+//创建一个简å•è®¿é—®å™¨
+function makeSimpleAccessor(name, value) {
+ function accessor(value) {
+ var oldValue = accessor._value
+ if (arguments.length > 0) {
+ if (!stopRepeatAssign && !isEqual(value, oldValue)) {
+ accessor.updateValue(this, value)
+ accessor.notify(this, value, oldValue)
+ }
+ return this
+ } else {
+ dependencyDetection.collectDependency(this, accessor)
+ return oldValue
+ }
+ }
+ accessorFactory(accessor, name)
+ accessor._value = value
+ return accessor;
+}
+
+//创建一个计算访问器
+function makeComputedAccessor(name, options) {
+ function accessor(value) {//计算属性
+ var oldValue = accessor._value
+ var init = ("_value" in accessor)
+ if (arguments.length > 0) {
+ if (stopRepeatAssign) {
+ return this
+ }
+ if (typeof accessor.set === "function") {
+ if (accessor.oldArgs !== value) {
+ accessor.oldArgs = value
+ var $events = this.$events
+ var lock = $events[name]
+ $events[name] = [] //清空回调,防止内部冒泡而触å‘多次$fire
+ accessor.set.call(this, value)
+ $events[name] = lock
+ value = accessor.get.call(this)
+ if (value !== oldValue) {
+ accessor.updateValue(this, value)
+ accessor.notify(this, value, oldValue) //触å‘$watch回调
+ }
+ }
+ }
+ return this
+ } else {
+ //å°†ä¾èµ–于自己的高层访问器或视图刷新函数(以绑定对象形å¼ï¼‰æ”¾åˆ°è‡ªå·±çš„订阅数组中
+ //将自己注入到低层访问器的订阅数组中
+ value = accessor.get.call(this)
+ accessor.updateValue(this, value)
+ if (init && oldValue !== value) {
+ accessor.notify(this, value, oldValue) //触å‘$watch回调
+ }
+ return value
+ }
+ }
+ accessor.set = options.set
+ accessor.get = options.get
+ accessorFactory(accessor, name)
+ return accessor
+}
+
+//创建一个å¤æ‚访问器
+function makeComplexAccessor(name, initValue, valueType, list) {
+ function accessor(value) {
+ var oldValue = accessor._value
+
+ var son = accessor._vmodel
+ if (arguments.length > 0) {
+ if (stopRepeatAssign) {
+ return this
+ }
+ if (valueType === "array") {
+ var a = son, b = value,
+ an = a.length,
+ bn = b.length
+ a.$lock = true
+ if (an > bn) {
+ a.splice(bn, an - bn)
+ } else if (bn > an) {
+ a.push.apply(a, b.slice(an))
+ }
+ var n = Math.min(an, bn)
+ for (var i = 0; i < n; i++) {
+ a.set(i, b[i])
+ }
+ delete a.$lock
+ a._fire("set")
+ } else if (valueType === "object") {
+ var newPropertyNames = Object.keys(value).join("&shy;")
+ if (son.$propertyNames === newPropertyNames) {
+ for (i in value) {
+ son[i] = value[i]
+ }
+ } else {
+ var sson = accessor._vmodel = modelFactory(value)
+ var sevent = sson.$events
+ var oevent = son.$events
+ for (var i in sevent) {
+ var arr = sevent[i]
+ if (Array.isArray(arr)) {
+ arr = arr.concat(oevent[i])
+ }
+ }
+ sevent[subscribers] = oevent[subscribers]
+ sson.$proxy = son.$proxy
+ son = sson
+ }
+ }
+ accessor.updateValue(this, son.$model)
+ accessor.notify(this, this._value, oldValue)
+ return this
+ } else {
+ dependencyDetection.collectDependency(this, accessor)
+ return son
+ }
+ }
+ accessorFactory(accessor, name)
+ var son = accessor._vmodel = modelFactory(initValue)
+ son.$events[subscribers] = list
+ return accessor
+}
+
+function globalUpdateValue(vmodel, value) {
+ vmodel.$model[this._name] = this._value = value
+}
+
+function globalNotify(vmodel, value, oldValue) {
+ var name = this._name
+ var array = vmodel.$events[name] //刷新值
+ if (array) {
+ fireDependencies(array) //åŒæ­¥è§†å›¾
+ EventBus.$fire.call(vmodel, name, value, oldValue) //触å‘$watch回调
+ }
+}
+
+function accessorFactory(accessor, name) {
+ accessor._name = name
+ //åŒæ—¶æ›´æ–°_value与model
+ accessor.updateValue = globalUpdateValue
+ accessor.notify = globalNotify
+}
+
+//比较两个值是å¦ç›¸ç­‰
+var isEqual = Object.is || function (v1, v2) {
+ if (v1 === 0 && v2 === 0) {
+ return 1 / v1 === 1 / v2
+ } else if (v1 !== v1) {
+ return v2 !== v2
+ } else {
+ return v1 === v2
+ }
+}
+
+function isObservable(name, value, $skipArray) {
+ if (isFunction(value) || value && value.nodeType) {
+ return false
+ }
+ if ($skipArray.indexOf(name) !== -1) {
+ return false
+ }
+ var $special = $skipArray.$special
+ if (name && name.charAt(0) === "$" && !$special[name]) {
+ return false
+ }
+ return true
+}
+
+var descriptorFactory = W3C ? function (obj) {
+ var descriptors = {}
+ for (var i in obj) {
+ descriptors[i] = {
+ get: obj[i],
+ set: obj[i],
+ enumerable: true,
+ configurable: true
+ }
+ }
+ return descriptors
+} : function (a) {
+ return a
+}
+
+//===================ä¿®å¤æµè§ˆå™¨å¯¹Object.defineProperties的支æŒ=================
+if (!canHideOwn) {
+ if ("__defineGetter__" in avalon) {
+ defineProperty = function (obj, prop, desc) {
+ if ('value' in desc) {
+ obj[prop] = desc.value
+ }
+ if ("get" in desc) {
+ obj.__defineGetter__(prop, desc.get)
+ }
+ if ('set' in desc) {
+ obj.__defineSetter__(prop, desc.set)
+ }
+ return obj
+ }
+ defineProperties = function (obj, descs) {
+ for (var prop in descs) {
+ if (descs.hasOwnProperty(prop)) {
+ defineProperty(obj, prop, descs[prop])
+ }
+ }
+ return obj
+ }
+ }
+ if (IEVersion) {
+ var VBClassPool = {}
+ window.execScript([// jshint ignore:line
+ "Function parseVB(code)",
+ "\tExecuteGlobal(code)",
+ "End Function" //转æ¢ä¸€æ®µæ–‡æœ¬ä¸ºVB代ç 
+ ].join("\n"), "VBScript")
+ function VBMediator(instance, accessors, name, value) {// jshint ignore:line
+ var accessor = accessors[name]
+ if (arguments.length === 4) {
+ accessor.call(instance, value)
+ } else {
+ return accessor.call(instance)
+ }
+ }
+ defineProperties = function (name, accessors, properties) {
+ // jshint ignore:line
+ var buffer = []
+ buffer.push(
+ "\r\n\tPrivate [__data__], [__proxy__]",
+ "\tPublic Default Function [__const__](d, p)",
+ "\t\tSet [__data__] = d: set [__proxy__] = p",
+ "\t\tSet [__const__] = Me", //链å¼è°ƒç”¨
+ "\tEnd Function")
+ //添加普通属性,因为VBScript对象ä¸èƒ½åƒJS那样éšæ„增删属性,必须在这里预先定义好
+ for (name in properties) {
+ if (!accessors.hasOwnProperty(name)) {
+ buffer.push("\tPublic [" + name + "]")
+ }
+ }
+ $$skipArray.forEach(function (name) {
+ if (!accessors.hasOwnProperty(name)) {
+ buffer.push("\tPublic [" + name + "]")
+ }
+ })
+ buffer.push("\tPublic [" + 'hasOwnProperty' + "]")
+ //添加访问器属性
+ for (name in accessors) {
+ buffer.push(
+ //由于ä¸çŸ¥å¯¹æ–¹ä¼šä¼ å…¥ä»€ä¹ˆ,å› æ­¤set, let都用上
+ "\tPublic Property Let [" + name + "](val" + expose + ")", //setter
+ "\t\tCall [__proxy__](Me,[__data__], \"" + name + "\", val" + expose + ")",
+ "\tEnd Property",
+ "\tPublic Property Set [" + name + "](val" + expose + ")", //setter
+ "\t\tCall [__proxy__](Me,[__data__], \"" + name + "\", val" + expose + ")",
+ "\tEnd Property",
+ "\tPublic Property Get [" + name + "]", //getter
+ "\tOn Error Resume Next", //必须优先使用set语å¥,å¦åˆ™å®ƒä¼šè¯¯å°†æ•°ç»„当字符串返回
+ "\t\tSet[" + name + "] = [__proxy__](Me,[__data__],\"" + name + "\")",
+ "\tIf Err.Number <> 0 Then",
+ "\t\t[" + name + "] = [__proxy__](Me,[__data__],\"" + name + "\")",
+ "\tEnd If",
+ "\tOn Error Goto 0",
+ "\tEnd Property")
+
+ }
+
+ buffer.push("End Class")
+ var body = buffer.join("\r\n")
+ var className =VBClassPool[body]
+ if (!className) {
+ className = generateID("VBClass")
+ window.parseVB("Class " + className + body)
+ window.parseVB([
+ "Function " + className + "Factory(a, b)", //创建实例并传入两个关键的å‚æ•°
+ "\tDim o",
+ "\tSet o = (New " + className + ")(a, b)",
+ "\tSet " + className + "Factory = o",
+ "End Function"
+ ].join("\r\n"))
+ VBClassPool[body] = className
+ }
+ var ret = window[className + "Factory"](accessors, VBMediator) //得到其产å“
+ return ret //得到其产å“
+ }
+ }
+}
+
+/*********************************************************************
+ * 监控数组(与ms-each, ms-repeaté…åˆä½¿ç”¨ï¼‰ *
+ **********************************************************************/
+
+function arrayFactory(model) {
+ var array = []
+ array.$id = generateID()
+ array.$model = model //æ•°æ®æ¨¡åž‹
+ array.$events = {}
+ array.$events[subscribers] = []
+ array._ = modelFactory({
+ length: model.length
+ })
+ array._.$watch("length", function (a, b) {
+ array.$fire("length", a, b)
+ })
+ for (var i in EventBus) {
+ array[i] = EventBus[i]
+ }
+ avalon.mix(array, arrayPrototype)
+ return array
+}
+
+function mutateArray(method, pos, n, index, method2, pos2, n2) {
+ var oldLen = this.length, loop = 2
+ while (--loop) {
+ switch (method) {
+ case "add":
+ /* jshint ignore:start */
+ var array = this.$model.slice(pos, pos + n).map(function (el) {
+ if (rcomplexType.test(avalon.type(el))) {
+ return el.$id ? el : modelFactory(el, 0, el)
+ } else {
+ return el
+ }
+ })
+ /* jshint ignore:end */
+ _splice.apply(this, [pos, 0].concat(array))
+ this._fire("add", pos, n)
+ break
+ case "del":
+ var ret = this._splice(pos, n)
+ this._fire("del", pos, n)
+ break
+ }
+ if (method2) {
+ method = method2
+ pos = pos2
+ n = n2
+ loop = 2
+ method2 = 0
+ }
+ }
+ this._fire("index", index)
+ if (this.length !== oldLen) {
+ this._.length = this.length
+ }
+ return ret
+}
+
+var _splice = ap.splice
+var arrayPrototype = {
+ _splice: _splice,
+ _fire: function (method, a, b) {
+ fireDependencies(this.$events[subscribers], method, a, b)
+ },
+ size: function () { //å–得数组长度,这个函数å¯ä»¥åŒæ­¥è§†å›¾ï¼Œlengthä¸èƒ½
+ return this._.length
+ },
+ pushArray: function (array) {
+ var m = array.length, n = this.length
+ if (m) {
+ ap.push.apply(this.$model, array)
+ mutateArray.call(this, "add", n, m, Math.max(0, n - 1))
+ }
+ return m + n
+ },
+ push: function () {
+ //http://jsperf.com/closure-with-arguments
+ var array = []
+ var i, n = arguments.length
+ for (i = 0; i < n; i++) {
+ array[i] = arguments[i]
+ }
+ return this.pushArray(array)
+ },
+ unshift: function () {
+ var m = arguments.length, n = this.length
+ if (m) {
+ ap.unshift.apply(this.$model, arguments)
+ mutateArray.call(this, "add", 0, m, 0)
+ }
+ return m + n //IE67çš„unshiftä¸ä¼šè¿”回长度
+ },
+ shift: function () {
+ if (this.length) {
+ var el = this.$model.shift()
+ mutateArray.call(this, "del", 0, 1, 0)
+ return el //返回被移除的元素
+ }
+ },
+ pop: function () {
+ var n = this.length
+ if (n) {
+ var el = this.$model.pop()
+ mutateArray.call(this, "del", n - 1, 1, Math.max(0, n - 2))
+ return el //返回被移除的元素
+ }
+ },
+ splice: function (start) {
+ var m = arguments.length, args = [], change
+ var removed = _splice.apply(this.$model, arguments)
+ if (removed.length) { //如果用户删掉了元素
+ args.push("del", start, removed.length, 0)
+ change = true
+ }
+ if (m > 2) { //如果用户添加了元素
+ if (change) {
+ args.splice(3, 1, 0, "add", start, m - 2)
+ } else {
+ args.push("add", start, m - 2, 0)
+ }
+ change = true
+ }
+ if (change) { //返回被移除的元素
+ return mutateArray.apply(this, args)
+ } else {
+ return []
+ }
+ },
+ contains: function (el) { //判定是å¦åŒ…å«
+ return this.indexOf(el) !== -1
+ },
+ remove: function (el) { //移除第一个等于给定值的元素
+ return this.removeAt(this.indexOf(el))
+ },
+ removeAt: function (index) { //移除指定索引上的元素
+ if (index >= 0) {
+ this.$model.splice(index, 1)
+ return mutateArray.call(this, "del", index, 1, 0)
+ }
+ return []
+ },
+ clear: function () {
+ this.$model.length = this.length = this._.length = 0 //清空数组
+ this._fire("clear", 0)
+ return this
+ },
+ removeAll: function (all) { //移除N个元素
+ if (Array.isArray(all)) {
+ for (var i = this.length - 1; i >= 0; i--) {
+ if (all.indexOf(this[i]) !== -1) {
+ this.removeAt(i)
+ }
+ }
+ } else if (typeof all === "function") {
+ for ( i = this.length - 1; i >= 0; i--) {
+ var el = this[i]
+ if (all(el, i)) {
+ this.removeAt(i)
+ }
+ }
+ } else {
+ this.clear()
+ }
+ },
+ ensure: function (el) {
+ if (!this.contains(el)) { //åªæœ‰ä¸å­˜åœ¨æ‰push
+ this.push(el)
+ }
+ return this
+ },
+ set: function (index, val) {
+ if (index >= 0) {
+ var valueType = avalon.type(val)
+ if (val && val.$model) {
+ val = val.$model
+ }
+ var target = this[index]
+ if (valueType === "object") {
+ for (var i in val) {
+ if (target.hasOwnProperty(i)) {
+ target[i] = val[i]
+ }
+ }
+ } else if (valueType === "array") {
+ target.clear().push.apply(target, val)
+ } else if (target !== val) {
+ this[index] = val
+ this.$model[index] = val
+ this._fire("set", index, val)
+ }
+ }
+ return this
+ }
+}
+//相当于原æ¥bindingExecutors.repeat çš„index分支
+function resetIndex(array, pos) {
+ var last = array.length - 1
+ for (var el; el = array[pos]; pos++) {
+ el.$index = pos
+ el.$first = pos === 0
+ el.$last = pos === last
+ }
+}
+
+function sortByIndex(array, indexes) {
+ var map = {};
+ for (var i = 0, n = indexes.length; i < n; i++) {
+ map[i] = array[i] // preserve
+ var j = indexes[i]
+ if (j in map) {
+ array[i] = map[j]
+ delete map[j]
+ } else {
+ array[i] = array[j]
+ }
+ }
+}
+
+"sort,reverse".replace(rword, function (method) {
+ arrayPrototype[method] = function () {
+ var newArray = this.$model//这是è¦æŽ’åºçš„新数组
+ var oldArray = newArray.concat() //ä¿æŒåŽŸæ¥çŠ¶æ€çš„旧数组
+ var mask = Math.random()
+ var indexes = []
+ var hasSort
+ ap[method].apply(newArray, arguments) //排åº
+ for (var i = 0, n = oldArray.length; i < n; i++) {
+ var neo = newArray[i]
+ var old = oldArray[i]
+ if (isEqual(neo, old)) {
+ indexes.push(i)
+ } else {
+ var index = oldArray.indexOf(neo)
+ indexes.push(index)//得到新数组的æ¯ä¸ªå…ƒç´ åœ¨æ—§æ•°ç»„对应的ä½ç½®
+ oldArray[index] = mask //å±è”½å·²ç»æ‰¾è¿‡çš„元素
+ hasSort = true
+ }
+ }
+ if (hasSort) {
+ sortByIndex(this, indexes)
+ // sortByIndex(this.$proxy, indexes)
+ this._fire("move", indexes)
+ this._fire("index", 0)
+ }
+ return this
+ }
+})
+
+
+/*********************************************************************
+ * ä¾èµ–调度系统 *
+ **********************************************************************/
+//检测两个对象间的ä¾èµ–关系
+var dependencyDetection = (function () {
+ var outerFrames = []
+ var currentFrame
+ return {
+ begin: function (accessorObject) {
+ //accessorObject为一个拥有callback的对象
+ outerFrames.push(currentFrame)
+ currentFrame = accessorObject
+ },
+ end: function () {
+ currentFrame = outerFrames.pop()
+ },
+ collectDependency: function (vmodel, accessor) {
+ if (currentFrame) {
+ //被dependencyDetection.begin调用
+ currentFrame.callback(vmodel, accessor);
+ }
+ }
+ };
+})()
+//将绑定对象注入到其ä¾èµ–项的订阅数组中
+var ronduplex = /^(duplex|on)$/
+avalon.injectBinding = function (data) {
+ var valueFn = data.evaluator
+ if (valueFn) { //如果是求值函数
+ dependencyDetection.begin({
+ callback: function (vmodel, dependency) {
+ injectDependency(vmodel.$events[dependency._name], data)
+ }
+ })
+ try {
+ var value = ronduplex.test(data.type) ? data : valueFn.apply(0, data.args)
+ if(value === void 0){
+ delete data.evaluator
+ }
+ data.handler(value, data.element, data)
+ } catch (e) {
+ //log("warning:exception throwed in [avalon.injectBinding] " + e)
+ delete data.evaluator
+ var node = data.element
+ if (node.nodeType === 3) {
+ var parent = node.parentNode
+ if (kernel.commentInterpolate) {
+ parent.replaceChild(DOC.createComment(data.value), node)
+ } else {
+ node.data = openTag + (data.oneTime ? "::" : "") + data.value + closeTag
+ }
+ }
+ } finally {
+ dependencyDetection.end()
+ }
+ }
+}
+
+//å°†ä¾èµ–项(比它高层的访问器或构建视图刷新函数的绑定对象)注入到订阅者数组
+function injectDependency(list, data) {
+ if (data.oneTime)
+ return
+ if (list && avalon.Array.ensure(list, data) && data.element) {
+ injectDisposeQueue(data, list)
+ }
+}
+
+//通知ä¾èµ–于这个访问器的订阅者更新自身
+function fireDependencies(list) {
+ if (list && list.length) {
+ if (new Date() - beginTime > 444 && typeof list[0] === "object") {
+ rejectDisposeQueue()
+ }
+ var args = aslice.call(arguments, 1)
+ for (var i = list.length, fn; fn = list[--i]; ) {
+ var el = fn.element
+ if (el && el.parentNode) {
+ try {
+ var valueFn = fn.evaluator
+ if (fn.$repeat) {
+ fn.handler.apply(fn, args) //处ç†ç›‘控数组的方法
+ }else if("$repeat" in fn || !valueFn ){//如果没有eval,先eval
+ bindingHandlers[fn.type](fn, fn.vmodels)
+ } else if (fn.type !== "on") { //事件绑定åªèƒ½ç”±ç”¨æˆ·è§¦å‘,ä¸èƒ½ç”±ç¨‹åºè§¦å‘
+ var value = valueFn.apply(0, fn.args || [])
+ fn.handler(value, el, fn)
+ }
+ } catch (e) { }
+ }
+ }
+ }
+}
+/*********************************************************************
+ * 定时GC回收机制 *
+ **********************************************************************/
+var disposeCount = 0
+var disposeQueue = avalon.$$subscribers = []
+var beginTime = new Date()
+var oldInfo = {}
+var uuid2Node = {}
+function getUid(obj, makeID) { //IE9+,标准æµè§ˆå™¨
+ if (!obj.uuid && !makeID) {
+ obj.uuid = ++disposeCount
+ uuid2Node[obj.uuid] = obj
+ }
+ return obj.uuid
+}
+function getNode(uuid) {
+ return uuid2Node[uuid]
+}
+//添加到回收列队中
+function injectDisposeQueue(data, list) {
+ var elem = data.element
+ if (!data.uuid) {
+ if (elem.nodeType !== 1) {
+ data.uuid = data.type + (data.pos || 0) + "-" + getUid(elem.parentNode)
+ } else {
+ data.uuid = data.name + "-" + getUid(elem)
+ }
+ }
+ var lists = data.lists || (data.lists = [])
+ avalon.Array.ensure(lists, list)
+ list.$uuid = list.$uuid || generateID()
+ if (!disposeQueue[data.uuid]) {
+ disposeQueue[data.uuid] = 1
+ disposeQueue.push(data)
+ }
+}
+
+function rejectDisposeQueue(data) {
+ if (avalon.optimize)
+ return
+ var i = disposeQueue.length
+ var n = i
+ var allTypes = []
+ var iffishTypes = {}
+ var newInfo = {}
+ //对页é¢ä¸Šæ‰€æœ‰ç»‘定对象进行分门别类, åªæ£€æµ‹ä¸ªæ•°å‘生å˜åŒ–的类型
+ while (data = disposeQueue[--i]) {
+ var type = data.type
+ if (newInfo[type]) {
+ newInfo[type]++
+ } else {
+ newInfo[type] = 1
+ allTypes.push(type)
+ }
+ }
+ var diff = false
+ allTypes.forEach(function (type) {
+ if (oldInfo[type] !== newInfo[type]) {
+ iffishTypes[type] = 1
+ diff = true
+ }
+ })
+ i = n
+ if (diff) {
+ while (data = disposeQueue[--i]) {
+ if (!data.element)
+ continue
+ if (iffishTypes[data.type] && shouldDispose(data.element)) { //如果它没有在DOM树
+ disposeQueue.splice(i, 1)
+ delete disposeQueue[data.uuid]
+ delete uuid2Node[data.element.uuid]
+ var lists = data.lists
+ for (var k = 0, list; list = lists[k++]; ) {
+ avalon.Array.remove(lists, list)
+ avalon.Array.remove(list, data)
+ }
+ disposeData(data)
+ }
+ }
+ }
+ oldInfo = newInfo
+ beginTime = new Date()
+}
+
+function disposeData(data) {
+ data.element = null
+ data.rollback && data.rollback()
+ for (var key in data) {
+ data[key] = null
+ }
+}
+
+function shouldDispose(el) {
+ try {//IE下,如果文本节点脱离DOM树,访问parentNode会报错
+ if (!el.parentNode) {
+ return true
+ }
+ } catch (e) {
+ return true
+ }
+
+ return el.msRetain ? 0 : (el.nodeType === 1 ? !root.contains(el) : !avalon.contains(root, el))
+}
+
+/************************************************************************
+ * HTML处ç†(parseHTML, innerHTML, clearHTML) *
+ ************************************************************************/
+// We have to close these tags to support XHTML
+var tagHooks = {
+ area: [1, "<map>", "</map>"],
+ param: [1, "<object>", "</object>"],
+ col: [2, "<table><colgroup>", "</colgroup></table>"],
+ legend: [1, "<fieldset>", "</fieldset>"],
+ option: [1, "<select multiple='multiple'>", "</select>"],
+ thead: [1, "<table>", "</table>"],
+ tr: [2, "<table>", "</table>"],
+ td: [3, "<table><tr>", "</tr></table>"],
+ g: [1, '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">', '</svg>'],
+ //IE6-8在用innerHTML生æˆèŠ‚点时,ä¸èƒ½ç›´æŽ¥åˆ›å»ºno-scope元素与HTML5的新标签
+ _default: W3C ? [0, "", ""] : [1, "X<div>", "</div>"] //divå¯ä»¥ä¸ç”¨é—­åˆ
+}
+tagHooks.th = tagHooks.td
+tagHooks.optgroup = tagHooks.option
+tagHooks.tbody = tagHooks.tfoot = tagHooks.colgroup = tagHooks.caption = tagHooks.thead
+String("circle,defs,ellipse,image,line,path,polygon,polyline,rect,symbol,text,use").replace(rword, function (tag) {
+ tagHooks[tag] = tagHooks.g //处ç†SVG
+})
+var rtagName = /<([\w:]+)/ //å–å¾—å…¶tagName
+var rxhtml = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig
+var rcreate = W3C ? /[^\d\D]/ : /(<(?:script|link|style|meta|noscript))/ig
+var scriptTypes = oneObject(["", "text/javascript", "text/ecmascript", "application/ecmascript", "application/javascript"])
+var rnest = /<(?:tb|td|tf|th|tr|col|opt|leg|cap|area)/ //需è¦å¤„ç†å¥—嵌关系的标签
+var script = DOC.createElement("script")
+var rhtml = /<|&#?\w+;/
+avalon.parseHTML = function (html) {
+ var fragment = avalonFragment.cloneNode(false)
+ if (typeof html !== "string") {
+ return fragment
+ }
+ if (!rhtml.test(html)) {
+ fragment.appendChild(DOC.createTextNode(html))
+ return fragment
+ }
+ html = html.replace(rxhtml, "<$1></$2>").trim()
+ var tag = (rtagName.exec(html) || ["", ""])[1].toLowerCase(),
+ //å–得其标签å
+ wrap = tagHooks[tag] || tagHooks._default,
+ wrapper = cinerator,
+ firstChild, neo
+ if (!W3C) { //fix IE
+ html = html.replace(rcreate, "<br class=msNoScope>$1") //在link style script等标签之å‰æ·»åŠ ä¸€ä¸ªè¡¥ä¸
+ }
+ wrapper.innerHTML = wrap[1] + html + wrap[2]
+ var els = wrapper.getElementsByTagName("script")
+ if (els.length) { //使用innerHTML生æˆçš„script节点ä¸ä¼šå‘出请求与执行text属性
+ for (var i = 0, el; el = els[i++]; ) {
+ if (scriptTypes[el.type]) {
+ //以å·é¾™è½¬å‡¤æ–¹å¼æ¢å¤æ‰§è¡Œè„šæœ¬åŠŸèƒ½
+ neo = script.cloneNode(false) //FFä¸èƒ½çœç•¥å‚æ•°
+ ap.forEach.call(el.attributes, function (attr) {
+ if (attr && attr.specified) {
+ neo[attr.name] = attr.value //å¤åˆ¶å…¶å±žæ€§
+ neo.setAttribute(attr.name, attr.value)
+ }
+ }) // jshint ignore:line
+ neo.text = el.text
+ el.parentNode.replaceChild(neo, el) //替æ¢èŠ‚点
+ }
+ }
+ }
+ if (!W3C) { //fix IE
+ var target = wrap[1] === "X<div>" ? wrapper.lastChild.firstChild : wrapper.lastChild
+ if (target && target.tagName === "TABLE" && tag !== "tbody") {
+ //IE6-7å¤„ç† <thead> --> <thead>,<tbody>
+ //<tfoot> --> <tfoot>,<tbody>
+ //<table> --> <table><tbody></table>
+ for (els = target.childNodes, i = 0; el = els[i++]; ) {
+ if (el.tagName === "TBODY" && !el.innerHTML) {
+ target.removeChild(el)
+ break
+ }
+ }
+ }
+ els = wrapper.getElementsByTagName("br")
+ var n = els.length
+ while (el = els[--n]) {
+ if (el.className === "msNoScope") {
+ el.parentNode.removeChild(el)
+ }
+ }
+ for (els = wrapper.all, i = 0; el = els[i++]; ) { //fix VML
+ if (isVML(el)) {
+ fixVML(el)
+ }
+ }
+ }
+ //移除我们为了符åˆå¥—嵌关系而添加的标签
+ for (i = wrap[0]; i--; wrapper = wrapper.lastChild) {
+ }
+ while (firstChild = wrapper.firstChild) { // å°†wrapper上的节点转移到文档碎片上ï¼
+ fragment.appendChild(firstChild)
+ }
+ return fragment
+}
+
+function isVML(src) {
+ var nodeName = src.nodeName
+ return nodeName.toLowerCase() === nodeName && src.scopeName && src.outerText === ""
+}
+
+function fixVML(node) {
+ if (node.currentStyle.behavior !== "url(#default#VML)") {
+ node.style.behavior = "url(#default#VML)"
+ node.style.display = "inline-block"
+ node.style.zoom = 1 //hasLayout
+ }
+}
+avalon.innerHTML = function (node, html) {
+ if (!W3C && (!rcreate.test(html) && !rnest.test(html))) {
+ try {
+ node.innerHTML = html
+ return
+ } catch (e) {
+ }
+ }
+ var a = this.parseHTML(html)
+ this.clearHTML(node).appendChild(a)
+}
+avalon.clearHTML = function (node) {
+ node.textContent = ""
+ while (node.firstChild) {
+ node.removeChild(node.firstChild)
+ }
+ return node
+}
+
+/*********************************************************************
+ * avalon的原型方法定义区 *
+ **********************************************************************/
+
+function hyphen(target) {
+ //转æ¢ä¸ºè¿žå­—符线风格
+ return target.replace(/([a-z\d])([A-Z]+)/g, "$1-$2").toLowerCase()
+}
+
+function camelize(target) {
+ //æå‰åˆ¤æ–­ï¼Œæ高getStyle等的效率
+ if (!target || target.indexOf("-") < 0 && target.indexOf("_") < 0) {
+ return target
+ }
+ //转æ¢ä¸ºé©¼å³°é£Žæ ¼
+ return target.replace(/[-_][^-_]/g, function(match) {
+ return match.charAt(1).toUpperCase()
+ })
+}
+
+var fakeClassListMethods = {
+ _toString: function() {
+ var node = this.node
+ var cls = node.className
+ var str = typeof cls === "string" ? cls : cls.baseVal
+ return str.split(/\s+/).join(" ")
+ },
+ _contains: function(cls) {
+ return (" " + this + " ").indexOf(" " + cls + " ") > -1
+ },
+ _add: function(cls) {
+ if (!this.contains(cls)) {
+ this._set(this + " " + cls)
+ }
+ },
+ _remove: function(cls) {
+ this._set((" " + this + " ").replace(" " + cls + " ", " "))
+ },
+ __set: function(cls) {
+ cls = cls.trim()
+ var node = this.node
+ if (rsvg.test(node)) {
+ //SVG元素的className是一个对象 SVGAnimatedString { baseVal="", animVal=""},åªèƒ½é€šè¿‡set/getAttributeæ“作
+ node.setAttribute("class", cls)
+ } else {
+ node.className = cls
+ }
+ } //toggle存在版本差异,因此ä¸ä½¿ç”¨å®ƒ
+}
+
+ function fakeClassList(node) {
+ if (!("classList" in node)) {
+ node.classList = {
+ node: node
+ }
+ for (var k in fakeClassListMethods) {
+ node.classList[k.slice(1)] = fakeClassListMethods[k]
+ }
+ }
+ return node.classList
+ }
+
+
+ "add,remove".replace(rword, function(method) {
+ avalon.fn[method + "Class"] = function(cls) {
+ var el = this[0]
+ //https://developer.mozilla.org/zh-CN/docs/Mozilla/Firefox/Releases/26
+ if (cls && typeof cls === "string" && el && el.nodeType === 1) {
+ cls.replace(/\S+/g, function(c) {
+ fakeClassList(el)[method](c)
+ })
+ }
+ return this
+ }
+ })
+ avalon.fn.mix({
+ hasClass: function(cls) {
+ var el = this[0] || {}
+ return el.nodeType === 1 && fakeClassList(el).contains(cls)
+ },
+ toggleClass: function(value, stateVal) {
+ var className, i = 0
+ var classNames = String(value).split(/\s+/)
+ var isBool = typeof stateVal === "boolean"
+ while ((className = classNames[i++])) {
+ var state = isBool ? stateVal : !this.hasClass(className)
+ this[state ? "addClass" : "removeClass"](className)
+ }
+ return this
+ },
+ attr: function(name, value) {
+ if (arguments.length === 2) {
+ this[0].setAttribute(name, value)
+ return this
+ } else {
+ return this[0].getAttribute(name)
+ }
+ },
+ data: function(name, value) {
+ name = "data-" + hyphen(name || "")
+ switch (arguments.length) {
+ case 2:
+ this.attr(name, value)
+ return this
+ case 1:
+ var val = this.attr(name)
+ return parseData(val)
+ case 0:
+ var ret = {}
+ ap.forEach.call(this[0].attributes, function(attr) {
+ if (attr) {
+ name = attr.name
+ if (!name.indexOf("data-")) {
+ name = camelize(name.slice(5))
+ ret[name] = parseData(attr.value)
+ }
+ }
+ })
+ return ret
+ }
+ },
+ removeData: function(name) {
+ name = "data-" + hyphen(name)
+ this[0].removeAttribute(name)
+ return this
+ },
+ css: function(name, value) {
+ if (avalon.isPlainObject(name)) {
+ for (var i in name) {
+ avalon.css(this, i, name[i])
+ }
+ } else {
+ var ret = avalon.css(this, name, value)
+ }
+ return ret !== void 0 ? ret : this
+ },
+ position: function() {
+ var offsetParent, offset,
+ elem = this[0],
+ parentOffset = {
+ top: 0,
+ left: 0
+ }
+ if (!elem) {
+ return
+ }
+ if (this.css("position") === "fixed") {
+ offset = elem.getBoundingClientRect()
+ } else {
+ offsetParent = this.offsetParent() //得到真正的offsetParent
+ offset = this.offset() // 得到正确的offsetParent
+ if (offsetParent[0].tagName !== "HTML") {
+ parentOffset = offsetParent.offset()
+ }
+ parentOffset.top += avalon.css(offsetParent[0], "borderTopWidth", true)
+ parentOffset.left += avalon.css(offsetParent[0], "borderLeftWidth", true)
+
+ // Subtract offsetParent scroll positions
+ parentOffset.top -= offsetParent.scrollTop()
+ parentOffset.left -= offsetParent.scrollLeft()
+ }
+ return {
+ top: offset.top - parentOffset.top - avalon.css(elem, "marginTop", true),
+ left: offset.left - parentOffset.left - avalon.css(elem, "marginLeft", true)
+ }
+ },
+ offsetParent: function() {
+ var offsetParent = this[0].offsetParent
+ while (offsetParent && avalon.css(offsetParent, "position") === "static") {
+ offsetParent = offsetParent.offsetParent;
+ }
+ return avalon(offsetParent || root)
+ },
+ bind: function(type, fn, phase) {
+ if (this[0]) { //此方法ä¸ä¼šé“¾
+ return avalon.bind(this[0], type, fn, phase)
+ }
+ },
+ unbind: function(type, fn, phase) {
+ if (this[0]) {
+ avalon.unbind(this[0], type, fn, phase)
+ }
+ return this
+ },
+ val: function(value) {
+ var node = this[0]
+ if (node && node.nodeType === 1) {
+ var get = arguments.length === 0
+ var access = get ? ":get" : ":set"
+ var fn = valHooks[getValType(node) + access]
+ if (fn) {
+ var val = fn(node, value)
+ } else if (get) {
+ return (node.value || "").replace(/\r/g, "")
+ } else {
+ node.value = value
+ }
+ }
+ return get ? val : this
+ }
+ })
+
+ function parseData(data) {
+ try {
+ if (typeof data === "object")
+ return data
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null : +data + "" === data ? +data : rbrace.test(data) ? avalon.parseJSON(data) : data
+ } catch (e) {}
+ return data
+ }
+var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
+ rvalidchars = /^[\],:{}\s]*$/,
+ rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+ rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
+ rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g
+avalon.parseJSON = window.JSON ? JSON.parse : function(data) {
+ if (typeof data === "string") {
+ data = data.trim();
+ if (data) {
+ if (rvalidchars.test(data.replace(rvalidescape, "@")
+ .replace(rvalidtokens, "]")
+ .replace(rvalidbraces, ""))) {
+ return (new Function("return " + data))() // jshint ignore:line
+ }
+ }
+ avalon.error("Invalid JSON: " + data)
+ }
+ return data
+}
+
+//生æˆavalon.fn.scrollLeft, avalon.fn.scrollTop方法
+avalon.each({
+ scrollLeft: "pageXOffset",
+ scrollTop: "pageYOffset"
+}, function(method, prop) {
+ avalon.fn[method] = function(val) {
+ var node = this[0] || {}, win = getWindow(node),
+ top = method === "scrollTop"
+ if (!arguments.length) {
+ return win ? (prop in win) ? win[prop] : root[method] : node[method]
+ } else {
+ if (win) {
+ win.scrollTo(!top ? val : avalon(win).scrollLeft(), top ? val : avalon(win).scrollTop())
+ } else {
+ node[method] = val
+ }
+ }
+ }
+})
+
+function getWindow(node) {
+ return node.window && node.document ? node : node.nodeType === 9 ? node.defaultView || node.parentWindow : false;
+}
+//=============================css相关=======================
+var cssHooks = avalon.cssHooks = {}
+var prefixes = ["", "-webkit-", "-o-", "-moz-", "-ms-"]
+var cssMap = {
+ "float": W3C ? "cssFloat" : "styleFloat"
+}
+avalon.cssNumber = oneObject("columnCount,order,fillOpacity,fontWeight,lineHeight,opacity,orphans,widows,zIndex,zoom")
+
+avalon.cssName = function(name, host, camelCase) {
+ if (cssMap[name]) {
+ return cssMap[name]
+ }
+ host = host || root.style
+ for (var i = 0, n = prefixes.length; i < n; i++) {
+ camelCase = camelize(prefixes[i] + name)
+ if (camelCase in host) {
+ return (cssMap[name] = camelCase)
+ }
+ }
+ return null
+}
+cssHooks["@:set"] = function(node, name, value) {
+ try { //node.style.width = NaN;node.style.width = "xxxxxxx";node.style.width = undefine 在旧å¼IE下会抛异常
+ node.style[name] = value
+ } catch (e) {}
+}
+if (window.getComputedStyle) {
+ cssHooks["@:get"] = function(node, name) {
+ if (!node || !node.style) {
+ throw new Error("getComputedStyleè¦æ±‚传入一个节点 " + node)
+ }
+ var ret, styles = getComputedStyle(node, null)
+ if (styles) {
+ ret = name === "filter" ? styles.getPropertyValue(name) : styles[name]
+ if (ret === "") {
+ ret = node.style[name] //其他æµè§ˆå™¨éœ€è¦æˆ‘们手动å–内è”æ ·å¼
+ }
+ }
+ return ret
+ }
+ cssHooks["opacity:get"] = function(node) {
+ var ret = cssHooks["@:get"](node, "opacity")
+ return ret === "" ? "1" : ret
+ }
+} else {
+ var rnumnonpx = /^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i
+ var rposition = /^(top|right|bottom|left)$/
+ var ralpha = /alpha\([^)]*\)/i
+ var ie8 = !! window.XDomainRequest
+ var salpha = "DXImageTransform.Microsoft.Alpha"
+ var border = {
+ thin: ie8 ? '1px' : '2px',
+ medium: ie8 ? '3px' : '4px',
+ thick: ie8 ? '5px' : '6px'
+ }
+ cssHooks["@:get"] = function(node, name) {
+ //å–得精确值,ä¸è¿‡å®ƒæœ‰å¯èƒ½æ˜¯å¸¦em,pc,mm,pt,%ç­‰å•ä½
+ var currentStyle = node.currentStyle
+ var ret = currentStyle[name]
+ if ((rnumnonpx.test(ret) && !rposition.test(ret))) {
+ //①,ä¿å­˜åŽŸæœ‰çš„style.left, runtimeStyle.left,
+ var style = node.style,
+ left = style.left,
+ rsLeft = node.runtimeStyle.left
+ //②由于③处的style.left = xxx会影å“到currentStyle.left,
+ //因此把它currentStyle.left放到runtimeStyle.left,
+ //runtimeStyle.left拥有最高优先级,ä¸ä¼šstyle.leftå½±å“
+ node.runtimeStyle.left = currentStyle.left
+ //③将精确值赋给到style.left,然åŽé€šè¿‡IEçš„å¦ä¸€ä¸ªç§æœ‰å±žæ€§ style.pixelLeft
+ //得到å•ä½ä¸ºpx的结果;fontSize的分支è§http://bugs.jquery.com/ticket/760
+ style.left = name === 'fontSize' ? '1em' : (ret || 0)
+ ret = style.pixelLeft + "px"
+ //④还原 style.left,runtimeStyle.left
+ style.left = left
+ node.runtimeStyle.left = rsLeft
+ }
+ if (ret === "medium") {
+ name = name.replace("Width", "Style")
+ //border width 默认值为medium,å³ä½¿å…¶ä¸º0"
+ if (currentStyle[name] === "none") {
+ ret = "0px"
+ }
+ }
+ return ret === "" ? "auto" : border[ret] || ret
+ }
+ cssHooks["opacity:set"] = function(node, name, value) {
+ var style = node.style
+ var opacity = isFinite(value) && value <= 1 ? "alpha(opacity=" + value * 100 + ")" : ""
+ var filter = style.filter || "";
+ style.zoom = 1
+ //ä¸èƒ½ä½¿ç”¨ä»¥ä¸‹æ–¹å¼è®¾ç½®é€æ˜Žåº¦
+ //node.filters.alpha.opacity = value * 100
+ style.filter = (ralpha.test(filter) ?
+ filter.replace(ralpha, opacity) :
+ filter + " " + opacity).trim()
+ if (!style.filter) {
+ style.removeAttribute("filter")
+ }
+ }
+ cssHooks["opacity:get"] = function(node) {
+ //这是最快的获å–IEé€æ˜Žå€¼çš„æ–¹å¼ï¼Œä¸éœ€è¦åŠ¨ç”¨æ­£åˆ™äº†ï¼
+ var alpha = node.filters.alpha || node.filters[salpha],
+ op = alpha && alpha.enabled ? alpha.opacity : 100
+ return (op / 100) + "" //ç¡®ä¿è¿”回的是字符串
+ }
+}
+
+"top,left".replace(rword, function(name) {
+ cssHooks[name + ":get"] = function(node) {
+ var computed = cssHooks["@:get"](node, name)
+ return /px$/.test(computed) ? computed :
+ avalon(node).position()[name] + "px"
+ }
+})
+
+var cssShow = {
+ position: "absolute",
+ visibility: "hidden",
+ display: "block"
+}
+
+var rdisplayswap = /^(none|table(?!-c[ea]).+)/
+
+ function showHidden(node, array) {
+ //http://www.cnblogs.com/rubylouvre/archive/2012/10/27/2742529.html
+ if (node.offsetWidth <= 0) { //opera.offsetWidthå¯èƒ½å°äºŽ0
+ if (rdisplayswap.test(cssHooks["@:get"](node, "display"))) {
+ var obj = {
+ node: node
+ }
+ for (var name in cssShow) {
+ obj[name] = node.style[name]
+ node.style[name] = cssShow[name]
+ }
+ array.push(obj)
+ }
+ var parent = node.parentNode
+ if (parent && parent.nodeType === 1) {
+ showHidden(parent, array)
+ }
+ }
+ }
+ "Width,Height".replace(rword, function(name) { //fix 481
+ var method = name.toLowerCase(),
+ clientProp = "client" + name,
+ scrollProp = "scroll" + name,
+ offsetProp = "offset" + name
+ cssHooks[method + ":get"] = function(node, which, override) {
+ var boxSizing = -4
+ if (typeof override === "number") {
+ boxSizing = override
+ }
+ which = name === "Width" ? ["Left", "Right"] : ["Top", "Bottom"]
+ var ret = node[offsetProp] // border-box 0
+ if (boxSizing === 2) { // margin-box 2
+ return ret + avalon.css(node, "margin" + which[0], true) + avalon.css(node, "margin" + which[1], true)
+ }
+ if (boxSizing < 0) { // padding-box -2
+ ret = ret - avalon.css(node, "border" + which[0] + "Width", true) - avalon.css(node, "border" + which[1] + "Width", true)
+ }
+ if (boxSizing === -4) { // content-box -4
+ ret = ret - avalon.css(node, "padding" + which[0], true) - avalon.css(node, "padding" + which[1], true)
+ }
+ return ret
+ }
+ cssHooks[method + "&get"] = function(node) {
+ var hidden = [];
+ showHidden(node, hidden);
+ var val = cssHooks[method + ":get"](node)
+ for (var i = 0, obj; obj = hidden[i++];) {
+ node = obj.node
+ for (var n in obj) {
+ if (typeof obj[n] === "string") {
+ node.style[n] = obj[n]
+ }
+ }
+ }
+ return val;
+ }
+ avalon.fn[method] = function(value) { //会忽视其display
+ var node = this[0]
+ if (arguments.length === 0) {
+ if (node.setTimeout) { //å–得窗å£å°ºå¯¸,IE9åŽå¯ä»¥ç”¨node.innerWidth /innerHeight代替
+ return node["inner" + name] || node.document.documentElement[clientProp]
+ }
+ if (node.nodeType === 9) { //å–得页é¢å°ºå¯¸
+ var doc = node.documentElement
+ //FF chrome html.scrollHeight< body.scrollHeight
+ //IE æ ‡å‡†æ¨¡å¼ : html.scrollHeight> body.scrollHeight
+ //IE æ€ªå¼‚æ¨¡å¼ : html.scrollHeight 最大等于å¯è§†çª—å£å¤šä¸€ç‚¹ï¼Ÿ
+ return Math.max(node.body[scrollProp], doc[scrollProp], node.body[offsetProp], doc[offsetProp], doc[clientProp])
+ }
+ return cssHooks[method + "&get"](node)
+ } else {
+ return this.css(method, value)
+ }
+ }
+ avalon.fn["inner" + name] = function() {
+ return cssHooks[method + ":get"](this[0], void 0, -2)
+ }
+ avalon.fn["outer" + name] = function(includeMargin) {
+ return cssHooks[method + ":get"](this[0], void 0, includeMargin === true ? 2 : 0)
+ }
+ })
+ avalon.fn.offset = function() { //å–å¾—è·ç¦»é¡µé¢å·¦å³è§’çš„åæ ‡
+ var node = this[0],
+ box = {
+ left: 0,
+ top: 0
+ }
+ if (!node || !node.tagName || !node.ownerDocument) {
+ return box
+ }
+ var doc = node.ownerDocument,
+ body = doc.body,
+ root = doc.documentElement,
+ win = doc.defaultView || doc.parentWindow
+ if (!avalon.contains(root, node)) {
+ return box
+ }
+ //http://hkom.blog1.fc2.com/?mode=m&no=750 bodyçš„å移é‡æ˜¯ä¸åŒ…å«marginçš„
+ //我们å¯ä»¥é€šè¿‡getBoundingClientRectæ¥èŽ·å¾—元素相对于clientçš„rect.
+ //http://msdn.microsoft.com/en-us/library/ms536433.aspx
+ if (node.getBoundingClientRect) {
+ box = node.getBoundingClientRect() // BlackBerry 5, iOS 3 (original iPhone)
+ }
+ //chrome/IE6: body.scrollTop, firefox/other: root.scrollTop
+ var clientTop = root.clientTop || body.clientTop,
+ clientLeft = root.clientLeft || body.clientLeft,
+ scrollTop = Math.max(win.pageYOffset || 0, root.scrollTop, body.scrollTop),
+ scrollLeft = Math.max(win.pageXOffset || 0, root.scrollLeft, body.scrollLeft)
+ // 把滚动è·ç¦»åŠ åˆ°left,top中去。
+ // IE一些版本中会自动为HTML元素加上2pxçš„border,我们需è¦åŽ»æŽ‰å®ƒ
+ // http://msdn.microsoft.com/en-us/library/ms533564(VS.85).aspx
+ return {
+ top: box.top + scrollTop - clientTop,
+ left: box.left + scrollLeft - clientLeft
+ }
+ }
+
+ //==================================val相关============================
+
+ function getValType(elem) {
+ var ret = elem.tagName.toLowerCase()
+ return ret === "input" && /checkbox|radio/.test(elem.type) ? "checked" : ret
+ }
+var roption = /^<option(?:\s+\w+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+))?)*\s+value[\s=]/i
+var valHooks = {
+ "option:get": IEVersion ? function(node) {
+ //在IE11åŠW3C,如果没有指定value,那么node.value默认为node.text(存在trim作),但IE9-10则是å–innerHTML(没trimæ“作)
+ //specified并ä¸å¯é ï¼Œå› æ­¤é€šè¿‡åˆ†æžouterHTML判定用户有没有显示定义value
+ return roption.test(node.outerHTML) ? node.value : node.text.trim()
+ } : function(node) {
+ return node.value
+ },
+ "select:get": function(node, value) {
+ var option, options = node.options,
+ index = node.selectedIndex,
+ getter = valHooks["option:get"],
+ one = node.type === "select-one" || index < 0,
+ values = one ? null : [],
+ max = one ? index + 1 : options.length,
+ i = index < 0 ? max : one ? index : 0
+ for (; i < max; i++) {
+ option = options[i]
+ //æ—§å¼IE在resetåŽä¸ä¼šæ”¹å˜selected,需è¦æ”¹ç”¨i === index判定
+ //我们过滤所有disabledçš„option元素,但在safari5下,如果设置select为disable,那么其所有孩å­éƒ½disable
+ //因此当一个元素为disable,需è¦æ£€æµ‹å…¶æ˜¯å¦æ˜¾å¼è®¾ç½®äº†disableåŠå…¶çˆ¶èŠ‚点的disable情况
+ if ((option.selected || i === index) && !option.disabled) {
+ value = getter(option)
+ if (one) {
+ return value
+ }
+ //收集所有selected值组æˆæ•°ç»„返回
+ values.push(value)
+ }
+ }
+ return values
+ },
+ "select:set": function(node, values, optionSet) {
+ values = [].concat(values) //强制转æ¢ä¸ºæ•°ç»„
+ var getter = valHooks["option:get"]
+ for (var i = 0, el; el = node.options[i++];) {
+ if ((el.selected = values.indexOf(getter(el)) > -1)) {
+ optionSet = true
+ }
+ }
+ if (!optionSet) {
+ node.selectedIndex = -1
+ }
+ }
+}
+
+/*********************************************************************
+ * 编译系统 *
+ **********************************************************************/
+var meta = {
+ '\b': '\\b',
+ '\t': '\\t',
+ '\n': '\\n',
+ '\f': '\\f',
+ '\r': '\\r',
+ '"': '\\"',
+ '\\': '\\\\'
+}
+var quote = window.JSON && JSON.stringify || function(str) {
+ return '"' + str.replace(/[\\\"\x00-\x1f]/g, function(a) {
+ var c = meta[a];
+ return typeof c === 'string' ? c :
+ '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
+ }) + '"'
+}
+
+var keywords = [
+ "break,case,catch,continue,debugger,default,delete,do,else,false",
+ "finally,for,function,if,in,instanceof,new,null,return,switch,this",
+ "throw,true,try,typeof,var,void,while,with", /* 关键字*/
+ "abstract,boolean,byte,char,class,const,double,enum,export,extends",
+ "final,float,goto,implements,import,int,interface,long,native",
+ "package,private,protected,public,short,static,super,synchronized",
+ "throws,transient,volatile", /*ä¿ç•™å­—*/
+ "arguments,let,yield,undefined" /* ECMA 5 - use strict*/].join(",")
+var rrexpstr = /\/\*[\w\W]*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|"(?:[^"\\]|\\[\w\W])*"|'(?:[^'\\]|\\[\w\W])*'|[\s\t\n]*\.[\s\t\n]*[$\w\.]+/g
+var rsplit = /[^\w$]+/g
+var rkeywords = new RegExp(["\\b" + keywords.replace(/,/g, '\\b|\\b') + "\\b"].join('|'), 'g')
+var rnumber = /\b\d[^,]*/g
+var rcomma = /^,+|,+$/g
+var variablePool = new Cache(512)
+var getVariables = function (code) {
+ var key = "," + code.trim()
+ var ret = variablePool.get(key)
+ if (ret) {
+ return ret
+ }
+ var match = code
+ .replace(rrexpstr, "")
+ .replace(rsplit, ",")
+ .replace(rkeywords, "")
+ .replace(rnumber, "")
+ .replace(rcomma, "")
+ .split(/^$|,+/)
+ return variablePool.put(key, uniqSet(match))
+}
+/*添加赋值语å¥*/
+
+function addAssign(vars, scope, name, data) {
+ var ret = [],
+ prefix = " = " + name + "."
+ for (var i = vars.length, prop; prop = vars[--i]; ) {
+ if (scope.hasOwnProperty(prop)) {
+ ret.push(prop + prefix + prop)
+ data.vars.push(prop)
+ if (data.type === "duplex") {
+ vars.get = name + "." + prop
+ }
+ vars.splice(i, 1)
+ }
+ }
+ return ret
+}
+
+function uniqSet(array) {
+ var ret = [],
+ unique = {}
+ for (var i = 0; i < array.length; i++) {
+ var el = array[i]
+ var id = el && typeof el.$id === "string" ? el.$id : el
+ if (!unique[id]) {
+ unique[id] = ret.push(el)
+ }
+ }
+ return ret
+}
+//缓存求值函数,以便多次利用
+var evaluatorPool = new Cache(128)
+//å–得求值函数åŠå…¶ä¼ å‚
+var rduplex = /\w\[.*\]|\w\.\w/
+var rproxy = /(\$proxy\$[a-z]+)\d+$/
+var rthimRightParentheses = /\)\s*$/
+var rthimOtherParentheses = /\)\s*\|/g
+var rquoteFilterName = /\|\s*([$\w]+)/g
+var rpatchBracket = /"\s*\["/g
+var rthimLeftParentheses = /"\s*\(/g
+function parseFilter(val, filters) {
+ filters = filters
+ .replace(rthimRightParentheses, "")//处ç†æœ€åŽçš„å°æ‹¬å·
+ .replace(rthimOtherParentheses, function () {//处ç†å…¶ä»–å°æ‹¬å·
+ return "],|"
+ })
+ .replace(rquoteFilterName, function (a, b) { //处ç†|åŠå®ƒåŽé¢çš„过滤器的åå­—
+ return "[" + quote(b)
+ })
+ .replace(rpatchBracket, function () {
+ return '"],["'
+ })
+ .replace(rthimLeftParentheses, function () {
+ return '",'
+ }) + "]"
+ return "return avalon.filters.$filter(" + val + ", " + filters + ")"
+}
+
+function parseExpr(code, scopes, data) {
+ var dataType = data.type
+ var filters = data.filters || ""
+ var exprId = scopes.map(function (el) {
+ return String(el.$id).replace(rproxy, "$1")
+ }) + code + dataType + filters
+ var vars = getVariables(code).concat(),
+ assigns = [],
+ names = [],
+ args = [],
+ prefix = ""
+ //args 是一个对象数组, names 是将è¦ç”Ÿæˆçš„求值函数的å‚æ•°
+ scopes = uniqSet(scopes)
+ data.vars = []
+ for (var i = 0, sn = scopes.length; i < sn; i++) {
+ if (vars.length) {
+ var name = "vm" + expose + "_" + i
+ names.push(name)
+ args.push(scopes[i])
+ assigns.push.apply(assigns, addAssign(vars, scopes[i], name, data))
+ }
+ }
+ if (!assigns.length && dataType === "duplex") {
+ return
+ }
+ if (dataType !== "duplex" && (code.indexOf("||") > -1 || code.indexOf("&&") > -1)) {
+ //https://github.com/RubyLouvre/avalon/issues/583
+ data.vars.forEach(function (v) {
+ var reg = new RegExp("\\b" + v + "(?:\\.\\w+|\\[\\w+\\])+", "ig")
+ code = code.replace(reg, function (_) {
+ var c = _.charAt(v.length)
+ var r = IEVersion ? code.slice(arguments[1] + _.length) : RegExp.rightContext
+ var method = /^\s*\(/.test(r)
+ if (c === "." || c === "[" || method) {//比如v为aa,我们åªåŒ¹é…aa.bb,aa[cc],ä¸åŒ¹é…aaa.xxx
+ var name = "var" + String(Math.random()).replace(/^0\./, "")
+ if (method) {//array.size()
+ var array = _.split(".")
+ if (array.length > 2) {
+ var last = array.pop()
+ assigns.push(name + " = " + array.join("."))
+ return name + "." + last
+ } else {
+ return _
+ }
+ }
+ assigns.push(name + " = " + _)
+ return name
+ } else {
+ return _
+ }
+ })
+ })
+ }
+ //---------------args----------------
+ data.args = args
+ //---------------cache----------------
+ delete data.vars
+ var fn = evaluatorPool.get(exprId) //直接从缓存,å…å¾—é‡å¤ç”Ÿæˆ
+ if (fn) {
+ data.evaluator = fn
+ return
+ }
+ prefix = assigns.join(", ")
+ if (prefix) {
+ prefix = "var " + prefix
+ }
+ if (/\S/.test(filters)) { //文本绑定,åŒå·¥ç»‘定æ‰æœ‰è¿‡æ»¤å™¨
+ if (!/text|html/.test(data.type)) {
+ throw Error("ms-" + data.type + "ä¸æ”¯æŒè¿‡æ»¤å™¨")
+ }
+ code = "\nvar ret" + expose + " = " + code + ";\r\n"
+ code += parseFilter("ret" + expose, filters)
+ } else if (dataType === "duplex") { //åŒå·¥ç»‘定
+ var _body = "'use strict';\nreturn function(vvv){\n\t" +
+ prefix +
+ ";\n\tif(!arguments.length){\n\t\treturn " +
+ code +
+ "\n\t}\n\t" + (!rduplex.test(code) ? vars.get : code) +
+ "= vvv;\n} "
+ try {
+ fn = Function.apply(noop, names.concat(_body))
+ data.evaluator = evaluatorPool.put(exprId, fn)
+ } catch (e) {
+ log("debug: parse error," + e.message)
+ }
+ return
+ } else if (dataType === "on") { //事件绑定
+ if (code.indexOf("(") === -1) {
+ code += ".call(this, $event)"
+ } else {
+ code = code.replace("(", ".call(this,")
+ }
+ names.push("$event")
+ code = "\nreturn " + code + ";" //IE全家 Function("return ")出错,需è¦Function("return ;")
+ var lastIndex = code.lastIndexOf("\nreturn")
+ var header = code.slice(0, lastIndex)
+ var footer = code.slice(lastIndex)
+ code = header + "\n" + footer
+ } else { //其他绑定
+ code = "\nreturn " + code + ";" //IE全家 Function("return ")出错,需è¦Function("return ;")
+ }
+ try {
+ fn = Function.apply(noop, names.concat("'use strict';\n" + prefix + code))
+ data.evaluator = evaluatorPool.put(exprId, fn)
+ } catch (e) {
+ log("debug: parse error," + e.message)
+ } finally {
+ vars = assigns = names = null //释放内存
+ }
+}
+
+
+//parseExpr的智能引用代ç†
+
+function parseExprProxy(code, scopes, data, tokens, noRegister) {
+ if (Array.isArray(tokens)) {
+ code = tokens.map(function (el) {
+ return el.expr ? "(" + el.value + ")" : quote(el.value)
+ }).join(" + ")
+ }
+ parseExpr(code, scopes, data)
+ if (data.evaluator && !noRegister) {
+ data.handler = bindingExecutors[data.handlerName || data.type]
+ //方便调试
+ //这里éžå¸¸é‡è¦,我们通过判定视图刷新函数的element是å¦åœ¨DOM树决定
+ //将它移出订阅者列表
+ avalon.injectBinding(data)
+ }
+}
+avalon.parseExprProxy = parseExprProxy
+/*********************************************************************
+ * 扫æ系统 *
+ **********************************************************************/
+
+avalon.scan = function(elem, vmodel) {
+ elem = elem || root
+ var vmodels = vmodel ? [].concat(vmodel) : []
+ scanTag(elem, vmodels)
+}
+
+//http://www.w3.org/TR/html5/syntax.html#void-elements
+var stopScan = oneObject("area,base,basefont,br,col,command,embed,hr,img,input,link,meta,param,source,track,wbr,noscript,script,style,textarea".toUpperCase())
+
+function checkScan(elem, callback, innerHTML) {
+ var id = setTimeout(function() {
+ var currHTML = elem.innerHTML
+ clearTimeout(id)
+ if (currHTML === innerHTML) {
+ callback()
+ } else {
+ checkScan(elem, callback, currHTML)
+ }
+ })
+}
+
+
+function createSignalTower(elem, vmodel) {
+ var id = elem.getAttribute("avalonctrl") || vmodel.$id
+ elem.setAttribute("avalonctrl", id)
+ vmodel.$events.expr = elem.tagName + '[avalonctrl="' + id + '"]'
+}
+
+var getBindingCallback = function(elem, name, vmodels) {
+ var callback = elem.getAttribute(name)
+ if (callback) {
+ for (var i = 0, vm; vm = vmodels[i++]; ) {
+ if (vm.hasOwnProperty(callback) && typeof vm[callback] === "function") {
+ return vm[callback]
+ }
+ }
+ }
+}
+
+function executeBindings(bindings, vmodels) {
+ for (var i = 0, data; data = bindings[i++]; ) {
+ data.vmodels = vmodels
+ bindingHandlers[data.type](data, vmodels)
+ if (data.evaluator && data.element && data.element.nodeType === 1) { //移除数æ®ç»‘定,防止被二次解æž
+ //chrome使用removeAttributeNode移除ä¸å­˜åœ¨çš„特性节点时会报错 https://github.com/RubyLouvre/avalon/issues/99
+ data.element.removeAttribute(data.name)
+ }
+ }
+ bindings.length = 0
+}
+
+//https://github.com/RubyLouvre/avalon/issues/636
+var mergeTextNodes = IEVersion && window.MutationObserver ? function (elem) {
+ var node = elem.firstChild, text
+ while (node) {
+ var aaa = node.nextSibling
+ if (node.nodeType === 3) {
+ if (text) {
+ text.nodeValue += node.nodeValue
+ elem.removeChild(node)
+ } else {
+ text = node
+ }
+ } else {
+ text = null
+ }
+ node = aaa
+ }
+} : 0
+var roneTime = /^\s*::/
+var rmsAttr = /ms-(\w+)-?(.*)/
+var priorityMap = {
+ "if": 10,
+ "repeat": 90,
+ "data": 100,
+ "widget": 110,
+ "each": 1400,
+ "with": 1500,
+ "duplex": 2000,
+ "on": 3000
+}
+
+var events = oneObject("animationend,blur,change,input,click,dblclick,focus,keydown,keypress,keyup,mousedown,mouseenter,mouseleave,mousemove,mouseout,mouseover,mouseup,scan,scroll,submit")
+var obsoleteAttrs = oneObject("value,title,alt,checked,selected,disabled,readonly,enabled")
+function bindingSorter(a, b) {
+ return a.priority - b.priority
+}
+
+function scanAttr(elem, vmodels, match) {
+ var scanNode = true
+ if (vmodels.length) {
+ var attributes = getAttributes ? getAttributes(elem) : elem.attributes
+ var bindings = []
+ var fixAttrs = []
+ var msData = {}
+ for (var i = 0, attr; attr = attributes[i++]; ) {
+ if (attr.specified) {
+ if (match = attr.name.match(rmsAttr)) {
+ //如果是以指定å‰ç¼€å‘½åçš„
+ var type = match[1]
+ var param = match[2] || ""
+ var value = attr.value
+ var name = attr.name
+ if (events[type]) {
+ param = type
+ type = "on"
+ } else if (obsoleteAttrs[type]) {
+ if (type === "enabled") {//åƒæŽ‰ms-enabled绑定,用ms-disabled代替
+ log("warning!ms-enabled或ms-attr-enabledå·²ç»è¢«åºŸå¼ƒ")
+ type = "disabled"
+ value = "!(" + value + ")"
+ }
+ param = type
+ type = "attr"
+ name = "ms-" + type + "-"+ param
+ fixAttrs.push([attr.name, name, value])
+ }
+ msData[name] = value
+ if (typeof bindingHandlers[type] === "function") {
+ var newValue = value.replace(roneTime, "")
+ var oneTime = value !== newValue
+ var binding = {
+ type: type,
+ param: param,
+ element: elem,
+ name: name,
+ value: newValue,
+ oneTime: oneTime,
+ uuid: name+"-"+getUid(elem),
+ //chrome与firefox下Number(param)得到的值ä¸ä¸€æ · #855
+ priority: (priorityMap[type] || type.charCodeAt(0) * 10 )+ (Number(param.replace(/\D/g, "")) || 0)
+ }
+ if (type === "html" || type === "text") {
+ var token = getToken(value)
+ avalon.mix(binding, token)
+ binding.filters = binding.filters.replace(rhasHtml, function () {
+ binding.type = "html"
+ binding.group = 1
+ return ""
+ })// jshint ignore:line
+ } else if (type === "duplex") {
+ var hasDuplex = name
+ } else if (name === "ms-if-loop") {
+ binding.priority += 100
+ }
+ bindings.push(binding)
+ if (type === "widget") {
+ elem.msData = elem.msData || msData
+ }
+ }
+ }
+ }
+ }
+ if (bindings.length) {
+ bindings.sort(bindingSorter)
+ fixAttrs.forEach(function (arr) {
+ log("warning!请改用" + arr[1] + "代替" + arr[0] + "!")
+ elem.removeAttribute(arr[0])
+ elem.setAttribute(arr[1], arr[2])
+ })
+ //http://bugs.jquery.com/ticket/7071
+ //在IE下对VML读å–type属性,会让此元素所有属性都å˜æˆ<Failed>
+ if (hasDuplex) {
+ if (msData["ms-attr-checked"]) {
+ log("warning!一个控件ä¸èƒ½åŒæ—¶å®šä¹‰ms-attr-checked与" + hasDuplex)
+ }
+ if (msData["ms-attr-value"]) {
+ log("warning!一个控件ä¸èƒ½åŒæ—¶å®šä¹‰ms-attr-value与" + hasDuplex)
+ }
+ }
+ for (i = 0; binding = bindings[i]; i++) {
+ type = binding.type
+ if (rnoscanAttrBinding.test(type)) {
+ return executeBindings(bindings.slice(0, i + 1), vmodels)
+ } else if (scanNode) {
+ scanNode = !rnoscanNodeBinding.test(type)
+ }
+ }
+ executeBindings(bindings, vmodels)
+ }
+ }
+ if (scanNode && !stopScan[elem.tagName] && rbind.test(elem.innerHTML.replace(rlt, "<").replace(rgt, ">"))) {
+ mergeTextNodes && mergeTextNodes(elem)
+ scanNodeList(elem, vmodels) //扫æå­å­™å…ƒç´ 
+ }
+}
+var rnoscanAttrBinding = /^if|widget|repeat$/
+var rnoscanNodeBinding = /^each|with|html|include$/
+//IE67下,在循环绑定中,一个节点如果是通过cloneNode得到,自定义属性的specified为false,无法进入里é¢çš„分支,
+//但如果我们去掉scanAttr中的attr.specified检测,一个元素会有80+个特性节点(因为它ä¸åŒºåˆ†å›ºæœ‰å±žæ€§ä¸Žè‡ªå®šä¹‰å±žæ€§ï¼‰ï¼Œå¾ˆå®¹æ˜“å¡æ­»é¡µé¢
+if (!"1" [0]) {
+ var attrPool = new Cache(512)
+ var rattrs = /\s+(ms-[^=\s]+)(?:=("[^"]*"|'[^']*'|[^\s>]+))?/g,
+ rquote = /^['"]/,
+ rtag = /<\w+\b(?:(["'])[^"]*?(\1)|[^>])*>/i,
+ ramp = /&amp;/g
+ //IE6-8解æžHTML5新标签,会将它分解两个元素节点与一个文本节点
+ //<body><section>ddd</section></body>
+ // window.onload = function() {
+ // var body = document.body
+ // for (var i = 0, el; el = body.children[i++]; ) {
+ // avalon.log(el.outerHTML)
+ // }
+ // }
+ //ä¾æ¬¡è¾“出<SECTION>, </SECTION>
+ var getAttributes = function (elem) {
+ var html = elem.outerHTML
+ //处ç†IE6-8解æžHTML5新标签的情况,åŠ<br>ç­‰åŠé—­åˆæ ‡ç­¾outerHTML为空的情况
+ if (html.slice(0, 2) === "</" || !html.trim()) {
+ return []
+ }
+ var str = html.match(rtag)[0]
+ var attributes = [],
+ match,
+ k, v
+ var ret = attrPool.get(str)
+ if (ret) {
+ return ret
+ }
+ while (k = rattrs.exec(str)) {
+ v = k[2]
+ if (v) {
+ v = (rquote.test(v) ? v.slice(1, -1) : v).replace(ramp, "&")
+ }
+ var name = k[1].toLowerCase()
+ match = name.match(rmsAttr)
+ var binding = {
+ name: name,
+ specified: true,
+ value: v || ""
+ }
+ attributes.push(binding)
+ }
+ return attrPool.put(str, attributes)
+ }
+}
+
+function scanNodeList(parent, vmodels) {
+ var nodes = avalon.slice(parent.childNodes)
+ scanNodeArray(nodes, vmodels)
+}
+
+function scanNodeArray(nodes, vmodels) {
+ for (var i = 0, node; node = nodes[i++];) {
+ switch (node.nodeType) {
+ case 1:
+ scanTag(node, vmodels) //扫æ元素节点
+ if (node.msCallback) {
+ node.msCallback()
+ node.msCallback = void 0
+ }
+ break
+ case 3:
+ if(rexpr.test(node.nodeValue)){
+ scanText(node, vmodels, i) //扫æ文本节点
+ }
+ break
+ }
+ }
+}
+
+
+function scanTag(elem, vmodels, node) {
+ //扫æé¡ºåº ms-skip(0) --> ms-important(1) --> ms-controller(2) --> ms-if(10) --> ms-repeat(100)
+ //--> ms-if-loop(110) --> ms-attr(970) ...--> ms-each(1400)-->ms-with(1500)--〉ms-duplex(2000)åž«åŽ
+ var a = elem.getAttribute("ms-skip")
+ //#360 在旧å¼IE中 Object标签在引入Flash等资æºæ—¶,å¯èƒ½å‡ºçŽ°æ²¡æœ‰getAttributeNode,innerHTML的情形
+ if (!elem.getAttributeNode) {
+ return log("warning " + elem.tagName + " no getAttributeNode method")
+ }
+ var b = elem.getAttributeNode("ms-important")
+ var c = elem.getAttributeNode("ms-controller")
+ if (typeof a === "string") {
+ return
+ } else if (node = b || c) {
+ var newVmodel = avalon.vmodels[node.value]
+ if (!newVmodel) {
+ return
+ }
+ //ms-importantä¸åŒ…å«çˆ¶VM,ms-controller相å
+ vmodels = node === b ? [newVmodel] : [newVmodel].concat(vmodels)
+ var name = node.name
+ elem.removeAttribute(name) //removeAttributeNodeä¸ä¼šåˆ·æ–°[ms-controller]æ ·å¼è§„则
+ avalon(elem).removeClass(name)
+ createSignalTower(elem, newVmodel)
+ }
+ scanAttr(elem, vmodels) //扫æ特性节点
+}
+var rhasHtml = /\|\s*html(?:\b|$)/,
+ r11a = /\|\|/g,
+ rlt = /&lt;/g,
+ rgt = /&gt;/g,
+ rstringLiteral = /(['"])(\\\1|.)+?\1/g
+function getToken(value) {
+ if (value.indexOf("|") > 0) {
+ var scapegoat = value.replace(rstringLiteral, function (_) {
+ return Array(_.length + 1).join("1")// jshint ignore:line
+ })
+ var index = scapegoat.replace(r11a, "\u1122\u3344").indexOf("|") //干掉所有短路或
+ if (index > -1) {
+ return {
+ filters: value.slice(index),
+ value: value.slice(0, index),
+ expr: true
+ }
+ }
+ }
+ return {
+ value: value,
+ filters: "",
+ expr: true
+ }
+}
+
+function scanExpr(str) {
+ var tokens = [],
+ value, start = 0,
+ stop
+ do {
+ stop = str.indexOf(openTag, start)
+ if (stop === -1) {
+ break
+ }
+ value = str.slice(start, stop)
+ if (value) { // {{ 左边的文本
+ tokens.push({
+ value: value,
+ filters: "",
+ expr: false
+ })
+ }
+ start = stop + openTag.length
+ stop = str.indexOf(closeTag, start)
+ if (stop === -1) {
+ break
+ }
+ value = str.slice(start, stop)
+ if (value) { //处ç†{{ }}æ’值表达å¼
+ tokens.push(getToken(value, start))
+ }
+ start = stop + closeTag.length
+ } while (1)
+ value = str.slice(start)
+ if (value) { //}} å³è¾¹çš„文本
+ tokens.push({
+ value: value,
+ expr: false,
+ filters: ""
+ })
+ }
+ return tokens
+}
+
+function scanText(textNode, vmodels, index) {
+ var bindings = []
+ tokens = scanExpr(textNode.data)
+ if (tokens.length) {
+ for (var i = 0; token = tokens[i++]; ) {
+ var node = DOC.createTextNode(token.value) //将文本转æ¢ä¸ºæ–‡æœ¬èŠ‚点,并替æ¢åŽŸæ¥çš„文本节点
+ if (token.expr) {
+ token.value = token.value.replace(roneTime, function () {
+ token.oneTime = true
+ return ""
+ })
+ token.type = "text"
+ token.element = node
+ token.filters = token.filters.replace(rhasHtml, function (a, b,c) {
+ token.type = "html"
+ return ""
+ })// jshint ignore:line
+ token.pos = index * 1000 + i
+ bindings.push(token) //收集带有æ’值表达å¼çš„文本
+ }
+ avalonFragment.appendChild(node)
+ }
+ textNode.parentNode.replaceChild(avalonFragment, textNode)
+ if (bindings.length)
+ executeBindings(bindings, vmodels)
+ }
+}
+
+var bools = ["autofocus,autoplay,async,allowTransparency,checked,controls",
+ "declare,disabled,defer,defaultChecked,defaultSelected",
+ "contentEditable,isMap,loop,multiple,noHref,noResize,noShade",
+ "open,readOnly,selected"
+].join(",")
+var boolMap = {}
+bools.replace(rword, function(name) {
+ boolMap[name.toLowerCase()] = name
+})
+
+var propMap = { //属性å映射
+ "accept-charset": "acceptCharset",
+ "char": "ch",
+ "charoff": "chOff",
+ "class": "className",
+ "for": "htmlFor",
+ "http-equiv": "httpEquiv"
+}
+
+var anomaly = ["accessKey,bgColor,cellPadding,cellSpacing,codeBase,codeType,colSpan",
+ "dateTime,defaultValue,frameBorder,longDesc,maxLength,marginWidth,marginHeight",
+ "rowSpan,tabIndex,useMap,vSpace,valueType,vAlign"
+].join(",")
+anomaly.replace(rword, function(name) {
+ propMap[name.toLowerCase()] = name
+})
+
+var rnoscripts = /<noscript.*?>(?:[\s\S]+?)<\/noscript>/img
+var rnoscriptText = /<noscript.*?>([\s\S]+?)<\/noscript>/im
+
+var getXHR = function() {
+ return new(window.XMLHttpRequest || ActiveXObject)("Microsoft.XMLHTTP") // jshint ignore:line
+}
+
+var templatePool = avalon.templateCache = {}
+
+bindingHandlers.attr = function(data, vmodels) {
+ var text = data.value.trim(),
+ simple = true
+ if (text.indexOf(openTag) > -1 && text.indexOf(closeTag) > 2) {
+ simple = false
+ if (rexpr.test(text) && RegExp.rightContext === "" && RegExp.leftContext === "") {
+ simple = true
+ text = RegExp.$1
+ }
+ }
+ if (data.type === "include") {
+ var elem = data.element
+ data.includeRendered = getBindingCallback(elem, "data-include-rendered", vmodels)
+ data.includeLoaded = getBindingCallback(elem, "data-include-loaded", vmodels)
+ var outer = data.includeReplace = !! avalon(elem).data("includeReplace")
+ if (avalon(elem).data("includeCache")) {
+ data.templateCache = {}
+ }
+ data.startInclude = DOC.createComment("ms-include")
+ data.endInclude = DOC.createComment("ms-include-end")
+ if (outer) {
+ data.element = data.startInclude
+ elem.parentNode.insertBefore(data.startInclude, elem)
+ elem.parentNode.insertBefore(data.endInclude, elem.nextSibling)
+ } else {
+ elem.insertBefore(data.startInclude, elem.firstChild)
+ elem.appendChild(data.endInclude)
+ }
+ }
+ data.handlerName = "attr" //handleName用于处ç†å¤šç§ç»‘定共用åŒä¸€ç§bindingExecutor的情况
+ parseExprProxy(text, vmodels, data, (simple ? 0 : scanExpr(data.value)))
+}
+
+bindingExecutors.attr = function(val, elem, data) {
+ var method = data.type,
+ attrName = data.param
+ if (method === "css") {
+ avalon(elem).css(attrName, val)
+ } else if (method === "attr") {
+
+ // ms-attr-class="xxx" vm.xxx="aaa bbb ccc"将元素的className设置为aaa bbb ccc
+ // ms-attr-class="xxx" vm.xxx=false 清空元素的所有类å
+ // ms-attr-name="yyy" vm.yyy="ooo" 为元素设置name属性
+ var toRemove = (val === false) || (val === null) || (val === void 0)
+
+ if (!W3C && propMap[attrName]) { //æ—§å¼IE下需è¦è¿›è¡Œå字映射
+ attrName = propMap[attrName]
+ }
+ var bool = boolMap[attrName]
+ if (typeof elem[bool] === "boolean") {
+ elem[bool] = !! val //布尔属性必须使用el.xxx = true|falseæ–¹å¼è®¾å€¼
+ if (!val) { //如果为false, IE全系列下相当于setAttribute(xxx,''),会影å“到样å¼,需è¦è¿›ä¸€æ­¥å¤„ç†
+ toRemove = true
+ }
+ }
+ if (toRemove) {
+ return elem.removeAttribute(attrName)
+ }
+ //SVGåªèƒ½ä½¿ç”¨setAttribute(xxx, yyy), VMLåªèƒ½ä½¿ç”¨elem.xxx = yyy ,HTML的固有属性必须elem.xxx = yyy
+ var isInnate = rsvg.test(elem) ? false : (DOC.namespaces && isVML(elem)) ? true : attrName in elem.cloneNode(false)
+ if (isInnate) {
+ elem[attrName] = val+""
+ } else {
+ elem.setAttribute(attrName, val)
+ }
+ } else if (method === "include" && val) {
+ var vmodels = data.vmodels
+ var rendered = data.includeRendered
+ var loaded = data.includeLoaded
+ var replace = data.includeReplace
+ var target = replace ? elem.parentNode : elem
+ var scanTemplate = function(text) {
+ if (loaded) {
+ var newText = loaded.apply(target, [text].concat(vmodels))
+ if (typeof newText === "string")
+ text = newText
+ }
+ if (rendered) {
+ checkScan(target, function() {
+ rendered.call(target)
+ }, NaN)
+ }
+ var lastID = data.includeLastID
+ if (data.templateCache && lastID && lastID !== val) {
+ var lastTemplate = data.templateCache[lastID]
+ if (!lastTemplate) {
+ lastTemplate = data.templateCache[lastID] = DOC.createElement("div")
+ ifGroup.appendChild(lastTemplate)
+ }
+ }
+ data.includeLastID = val
+ while (true) {
+ var node = data.startInclude.nextSibling
+ if (node && node !== data.endInclude) {
+ target.removeChild(node)
+ if (lastTemplate)
+ lastTemplate.appendChild(node)
+ } else {
+ break
+ }
+ }
+ var dom = getTemplateNodes(data, val, text)
+ var nodes = avalon.slice(dom.childNodes)
+ target.insertBefore(dom, data.endInclude)
+ scanNodeArray(nodes, vmodels)
+ }
+
+ if (data.param === "src") {
+ if (typeof templatePool[val] === "string") {
+ avalon.nextTick(function() {
+ scanTemplate(templatePool[val])
+ })
+ } else if (Array.isArray(templatePool[val])) { //#805 防止在循环绑定中å‘出许多相åŒçš„请求
+ templatePool[val].push(scanTemplate)
+ } else {
+ var xhr = getXHR()
+ xhr.onreadystatechange = function() {
+ if (xhr.readyState === 4) {
+ var s = xhr.status
+ if (s >= 200 && s < 300 || s === 304 || s === 1223) {
+ var text = xhr.responseText
+ for (var f = 0, fn; fn = templatePool[val][f++];) {
+ fn(text)
+ }
+ templatePool[val] = text
+ }
+ }
+ }
+ templatePool[val] = [scanTemplate]
+ xhr.open("GET", val, true)
+ if ("withCredentials" in xhr) {
+ xhr.withCredentials = true
+ }
+ xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest")
+ xhr.send(null)
+ }
+ } else {
+ //IE系列与够新的标准æµè§ˆå™¨æ”¯æŒé€šè¿‡IDå–得元素(firefox14+)
+ //http://tjvantoll.com/2012/07/19/dom-element-references-as-global-variables/
+ var el = val && val.nodeType === 1 ? val : DOC.getElementById(val)
+ if (el) {
+ if (el.tagName === "NOSCRIPT" && !(el.innerHTML || el.fixIE78)) { //IE7-8 innerText,innerHTML都无法å–得其内容,IE6能å–å¾—å…¶innerHTML
+ xhr = getXHR() //IE9-11与chromeçš„innerHTML会得到转义的内容,它们的innerTextå¯ä»¥
+ xhr.open("GET", location, false) //谢谢Nodejs 乱炖群 深圳-纯属虚构
+ xhr.send(null)
+ //http://bbs.csdn.net/topics/390349046?page=1#post-393492653
+ var noscripts = DOC.getElementsByTagName("noscript")
+ var array = (xhr.responseText || "").match(rnoscripts) || []
+ var n = array.length
+ for (var i = 0; i < n; i++) {
+ var tag = noscripts[i]
+ if (tag) { //IE6-8中noscript标签的innerHTML,innerText是åªè¯»çš„
+ tag.style.display = "none" //http://haslayout.net/css/noscript-Ghost-Bug
+ tag.fixIE78 = (array[i].match(rnoscriptText) || ["", "&nbsp;"])[1]
+ }
+ }
+ }
+ avalon.nextTick(function() {
+ scanTemplate(el.fixIE78 || el.value || el.innerText || el.innerHTML)
+ })
+ }
+ }
+ } else {
+ if (!root.hasAttribute && typeof val === "string" && (method === "src" || method === "href")) {
+ val = val.replace(/&amp;/g, "&") //处ç†IE67自动转义的问题
+ }
+ elem[method] = val
+ if (window.chrome && elem.tagName === "EMBED") {
+ var parent = elem.parentNode //#525 chrome1-37下embed标签动æ€è®¾ç½®srcä¸èƒ½å‘生请求
+ var comment = document.createComment("ms-src")
+ parent.replaceChild(comment, elem)
+ parent.replaceChild(elem, comment)
+ }
+ }
+}
+
+function getTemplateNodes(data, id, text) {
+ var div = data.templateCache && data.templateCache[id]
+ if (div) {
+ var dom = DOC.createDocumentFragment(),
+ firstChild
+ while (firstChild = div.firstChild) {
+ dom.appendChild(firstChild)
+ }
+ return dom
+ }
+ return avalon.parseHTML(text)
+}
+
+//这几个指令都å¯ä»¥ä½¿ç”¨æ’值表达å¼ï¼Œå¦‚ms-src="aaa/{{b}}/{{c}}.html"
+"title,alt,src,value,css,include,href".replace(rword, function(name) {
+ bindingHandlers[name] = bindingHandlers.attr
+})
+//æ ¹æ®VM的属性值或表达å¼çš„值切æ¢ç±»å,ms-class="xxx yyy zzz:flag"
+//http://www.cnblogs.com/rubylouvre/archive/2012/12/17/2818540.html
+bindingHandlers["class"] = function(data, vmodels) {
+ var oldStyle = data.param,
+ text = data.value,
+ rightExpr
+ data.handlerName = "class"
+ if (!oldStyle || isFinite(oldStyle)) {
+ data.param = "" //去掉数字
+ var noExpr = text.replace(rexprg, function(a) {
+ return a.replace(/./g, "0")
+ //return Math.pow(10, a.length - 1) //å°†æ’值表达å¼æ’å…¥10çš„N-1次方æ¥å ä½
+ })
+ var colonIndex = noExpr.indexOf(":") //å–得第一个冒å·çš„ä½ç½®
+ if (colonIndex === -1) { // 比如 ms-class="aaa bbb ccc" 的情况
+ var className = text
+ } else { // 比如 ms-class-1="ui-state-active:checked" 的情况
+ className = text.slice(0, colonIndex)
+ rightExpr = text.slice(colonIndex + 1)
+ parseExpr(rightExpr, vmodels, data) //决定是添加还是删除
+ if (!data.evaluator) {
+ log("debug: ms-class '" + (rightExpr || "").trim() + "' ä¸å­˜åœ¨äºŽVM中")
+ return false
+ } else {
+ data._evaluator = data.evaluator
+ data._args = data.args
+ }
+ }
+ var hasExpr = rexpr.test(className) //比如ms-class="width{{w}}"的情况
+ if (!hasExpr) {
+ data.immobileClass = className
+ }
+ parseExprProxy("", vmodels, data, (hasExpr ? scanExpr(className) : 0))
+ } else {
+ data.immobileClass = data.oldStyle = data.param
+ parseExprProxy(text, vmodels, data)
+ }
+}
+
+bindingExecutors["class"] = function(val, elem, data) {
+ var $elem = avalon(elem),
+ method = data.type
+ if (method === "class" && data.oldStyle) { //如果是旧风格
+ $elem.toggleClass(data.oldStyle, !! val)
+ } else {
+ //如果存在冒å·å°±æœ‰æ±‚值函数
+ data.toggleClass = data._evaluator ? !! data._evaluator.apply(elem, data._args) : true
+ data.newClass = data.immobileClass || val
+ if (data.oldClass && data.newClass !== data.oldClass) {
+ $elem.removeClass(data.oldClass)
+ }
+ data.oldClass = data.newClass
+ switch (method) {
+ case "class":
+ $elem.toggleClass(data.newClass, data.toggleClass)
+ break
+ case "hover":
+ case "active":
+ if (!data.hasBindEvent) { //ç¡®ä¿åªç»‘定一次
+ var activate = "mouseenter" //在移出移入时切æ¢ç±»å
+ var abandon = "mouseleave"
+ if (method === "active") { //在èšç„¦å¤±ç„¦ä¸­åˆ‡æ¢ç±»å
+ elem.tabIndex = elem.tabIndex || -1
+ activate = "mousedown"
+ abandon = "mouseup"
+ var fn0 = $elem.bind("mouseleave", function() {
+ data.toggleClass && $elem.removeClass(data.newClass)
+ })
+ }
+ var fn1 = $elem.bind(activate, function() {
+ data.toggleClass && $elem.addClass(data.newClass)
+ })
+ var fn2 = $elem.bind(abandon, function() {
+ data.toggleClass && $elem.removeClass(data.newClass)
+ })
+ data.rollback = function() {
+ $elem.unbind("mouseleave", fn0)
+ $elem.unbind(activate, fn1)
+ $elem.unbind(abandon, fn2)
+ }
+ data.hasBindEvent = true
+ }
+ break;
+ }
+ }
+}
+
+"hover,active".replace(rword, function(method) {
+ bindingHandlers[method] = bindingHandlers["class"]
+})
+//ms-controller绑定已ç»åœ¨scanTag 方法中实现
+//ms-css绑定已由ms-attr绑定实现
+
+
+// bindingHandlers.data 定义在if.js
+bindingExecutors.data = function(val, elem, data) {
+ var key = "data-" + data.param
+ if (val && typeof val === "object") {
+ elem[key] = val
+ } else {
+ elem.setAttribute(key, String(val))
+ }
+}
+//åŒå·¥ç»‘定
+var duplexBinding = bindingHandlers.duplex = function(data, vmodels) {
+ var elem = data.element,
+ hasCast
+ parseExprProxy(data.value, vmodels, data, 0, 1)
+
+ data.changed = getBindingCallback(elem, "data-duplex-changed", vmodels) || noop
+ if (data.evaluator && data.args) {
+ var params = []
+ var casting = oneObject("string,number,boolean,checked")
+ if (elem.type === "radio" && data.param === "") {
+ data.param = "checked"
+ }
+ if (elem.msData) {
+ elem.msData["ms-duplex"] = data.value
+ }
+ data.param.replace(/\w+/g, function(name) {
+ if (/^(checkbox|radio)$/.test(elem.type) && /^(radio|checked)$/.test(name)) {
+ if (name === "radio")
+ log("ms-duplex-radioå·²ç»æ›´å为ms-duplex-checked")
+ name = "checked"
+ data.isChecked = true
+ }
+ if (name === "bool") {
+ name = "boolean"
+ log("ms-duplex-boolå·²ç»æ›´å为ms-duplex-boolean")
+ } else if (name === "text") {
+ name = "string"
+ log("ms-duplex-textå·²ç»æ›´å为ms-duplex-string")
+ }
+ if (casting[name]) {
+ hasCast = true
+ }
+ avalon.Array.ensure(params, name)
+ })
+ if (!hasCast) {
+ params.push("string")
+ }
+ data.param = params.join("-")
+ data.bound = function(type, callback) {
+ if (elem.addEventListener) {
+ elem.addEventListener(type, callback, false)
+ } else {
+ elem.attachEvent("on" + type, callback)
+ }
+ var old = data.rollback
+ data.rollback = function() {
+ elem.avalonSetter = null
+ avalon.unbind(elem, type, callback)
+ old && old()
+ }
+ }
+ for (var i in avalon.vmodels) {
+ var v = avalon.vmodels[i]
+ v.$fire("avalon-ms-duplex-init", data)
+ }
+ var cpipe = data.pipe || (data.pipe = pipe)
+ cpipe(null, data, "init")
+ var tagName = elem.tagName
+ duplexBinding[tagName] && duplexBinding[tagName](elem, data.evaluator.apply(null, data.args), data)
+ }
+}
+//ä¸å­˜åœ¨ bindingExecutors.duplex
+
+ function fixNull(val) {
+ return val == null ? "" : val
+ }
+avalon.duplexHooks = {
+ checked: {
+ get: function(val, data) {
+ return !data.element.oldValue
+ }
+ },
+ string: {
+ get: function(val) { //åŒæ­¥åˆ°VM
+ return val
+ },
+ set: fixNull
+ },
+ "boolean": {
+ get: function(val) {
+ return val === "true"
+ },
+ set: fixNull
+ },
+ number: {
+ get: function(val, data) {
+ var number = parseFloat(val)
+ if (-val === -number) {
+ return number
+ }
+ var arr = /strong|medium|weak/.exec(data.element.getAttribute("data-duplex-number")) || ["medium"]
+ switch (arr[0]) {
+ case "strong":
+ return 0
+ case "medium":
+ return val === "" ? "" : 0
+ case "weak":
+ return val
+ }
+ },
+ set: fixNull
+ }
+}
+
+function pipe(val, data, action, e) {
+ data.param.replace(/\w+/g, function(name) {
+ var hook = avalon.duplexHooks[name]
+ if (hook && typeof hook[action] === "function") {
+ val = hook[action](val, data)
+ }
+ })
+ return val
+}
+
+var TimerID, ribbon = []
+
+ avalon.tick = function(fn) {
+ if (ribbon.push(fn) === 1) {
+ TimerID = setInterval(ticker, 60)
+ }
+ }
+
+ function ticker() {
+ for (var n = ribbon.length - 1; n >= 0; n--) {
+ var el = ribbon[n]
+ if (el() === false) {
+ ribbon.splice(n, 1)
+ }
+ }
+ if (!ribbon.length) {
+ clearInterval(TimerID)
+ }
+ }
+
+var watchValueInTimer = noop
+var rmsinput = /text|password|hidden/
+new function() { // jshint ignore:line
+ try { //#272 IE9-IE11, firefox
+ var setters = {}
+ var aproto = HTMLInputElement.prototype
+ var bproto = HTMLTextAreaElement.prototype
+ function newSetter(value) { // jshint ignore:line
+ setters[this.tagName].call(this, value)
+ if (rmsinput.test(this.type) && !this.msFocus && this.avalonSetter) {
+ this.avalonSetter()
+ }
+ }
+ var inputProto = HTMLInputElement.prototype
+ Object.getOwnPropertyNames(inputProto) //æ•…æ„引å‘IE6-8ç­‰æµè§ˆå™¨æŠ¥é”™
+ setters["INPUT"] = Object.getOwnPropertyDescriptor(aproto, "value").set
+
+ Object.defineProperty(aproto, "value", {
+ set: newSetter
+ })
+ setters["TEXTAREA"] = Object.getOwnPropertyDescriptor(bproto, "value").set
+ Object.defineProperty(bproto, "value", {
+ set: newSetter
+ })
+ } catch (e) {
+ //在chrome 43中 ms-duplex终于ä¸éœ€è¦ä½¿ç”¨å®šæ—¶å™¨å®žçŽ°åŒå‘绑定了
+ // http://updates.html5rocks.com/2015/04/DOM-attributes-now-on-the-prototype
+ // https://docs.google.com/document/d/1jwA8mtClwxI-QJuHT7872Z0pxpZz8PBkf2bGAbsUtqs/edit?pli=1
+ watchValueInTimer = avalon.tick
+ }
+} // jshint ignore:line
+if (IEVersion) {
+ avalon.bind(DOC, "selectionchange", function(e) {
+ var el = DOC.activeElement
+ if (el && typeof el.avalonSetter === "function") {
+ el.avalonSetter()
+ }
+ })
+}
+
+//处ç†radio, checkbox, text, textarea, password
+duplexBinding.INPUT = function(element, evaluator, data) {
+ var $type = element.type,
+ bound = data.bound,
+ $elem = avalon(element),
+ composing = false
+
+ function callback(value) {
+ data.changed.call(this, value, data)
+ }
+
+ function compositionStart() {
+ composing = true
+ }
+
+ function compositionEnd() {
+ composing = false
+ }
+ //当valueå˜åŒ–时改å˜model的值
+ var updateVModel = function() {
+ if (composing) //处ç†ä¸­æ–‡è¾“入法在minlengh下引å‘çš„BUG
+ return
+ var val = element.oldValue = element.value //防止递归调用形æˆæ­»å¾ªçŽ¯
+ var lastValue = data.pipe(val, data, "get")
+ if ($elem.data("duplexObserve") !== false) {
+ evaluator(lastValue)
+ callback.call(element, lastValue)
+ if ($elem.data("duplex-focus")) {
+ avalon.nextTick(function() {
+ element.focus()
+ })
+ }
+ }
+ }
+ //当modelå˜åŒ–æ—¶,它就会改å˜value的值
+ data.handler = function() {
+ var val = data.pipe(evaluator(), data, "set") + "" //fix #673
+ if (val !== element.oldValue) {
+ element.value = val
+ }
+ }
+ if (data.isChecked || $type === "radio") {
+ var IE6 = IEVersion === 6
+ updateVModel = function() {
+ if ($elem.data("duplexObserve") !== false) {
+ var lastValue = data.pipe(element.value, data, "get")
+ evaluator(lastValue)
+ callback.call(element, lastValue)
+ }
+ }
+ data.handler = function() {
+ var val = evaluator()
+ var checked = data.isChecked ? !! val : val + "" === element.value
+ element.oldValue = checked
+ if (IE6) {
+ setTimeout(function() {
+ //IE8 checkbox, radio是使用defaultChecked控制选中状æ€ï¼Œ
+ //并且è¦å…ˆè®¾ç½®defaultCheckedåŽè®¾ç½®checked
+ //并且必须设置延迟
+ element.defaultChecked = checked
+ element.checked = checked
+ }, 31)
+ } else {
+ element.checked = checked
+ }
+ }
+ bound("click", updateVModel)
+ } else if ($type === "checkbox") {
+ updateVModel = function() {
+ if ($elem.data("duplexObserve") !== false) {
+ var method = element.checked ? "ensure" : "remove"
+ var array = evaluator()
+ if (!Array.isArray(array)) {
+ log("ms-duplex应用于checkbox上è¦å¯¹åº”一个数组")
+ array = [array]
+ }
+ var val = data.pipe(element.value, data, "get")
+ avalon.Array[method](array, val)
+ callback.call(element, array)
+ }
+ }
+
+ data.handler = function() {
+ var array = [].concat(evaluator()) //强制转æ¢ä¸ºæ•°ç»„
+ var val = data.pipe(element.value, data, "get")
+ element.checked = array.indexOf(val) > -1
+ }
+ bound(W3C ? "change" : "click", updateVModel)
+ } else {
+ var events = element.getAttribute("data-duplex-event") || "input"
+ if (element.attributes["data-event"]) {
+ log("data-event指令已ç»åºŸå¼ƒï¼Œè¯·æ”¹ç”¨data-duplex-event")
+ }
+
+ function delay(e) { // jshint ignore:line
+ setTimeout(function() {
+ updateVModel(e)
+ })
+ }
+ events.replace(rword, function(name) {
+ switch (name) {
+ case "input":
+ if (!IEVersion) { // W3C
+ bound("input", updateVModel)
+ //éžIEæµè§ˆå™¨æ‰ç”¨è¿™ä¸ª
+ bound("compositionstart", compositionStart)
+ bound("compositionend", compositionEnd)
+ bound("DOMAutoComplete", updateVModel)
+ } else { //onpropertychange事件无法区分是程åºè§¦å‘还是用户触å‘
+ // IE下通过selectionchange事件监å¬IE9+点击inputå³è¾¹çš„X的清空行为,åŠç²˜è´´ï¼Œå‰ªåˆ‡ï¼Œåˆ é™¤è¡Œä¸º
+ if (IEVersion > 8) {
+ bound("input", updateVModel) //IE9使用propertychange无法监å¬ä¸­æ–‡è¾“入改动
+ } else {
+ bound("propertychange", function(e) { //IE6-8下第一次修改时ä¸ä¼šè§¦å‘,需è¦ä½¿ç”¨keydown或selectionchange修正
+ if (e.propertyName === "value") {
+ updateVModel()
+ }
+ })
+ }
+ bound("dragend", delay)
+ //http://www.cnblogs.com/rubylouvre/archive/2013/02/17/2914604.html
+ //http://www.matts411.com/post/internet-explorer-9-oninput/
+ }
+ break
+ default:
+ bound(name, updateVModel)
+ break
+ }
+ })
+ bound("focus", function() {
+ element.msFocus = true
+ })
+ bound("blur", function() {
+ element.msFocus = false
+ })
+
+ if (rmsinput.test($type)) {
+ watchValueInTimer(function() {
+ if (root.contains(element)) {
+ if (!element.msFocus && element.oldValue !== element.value) {
+ updateVModel()
+ }
+ } else if (!element.msRetain) {
+ return false
+ }
+ })
+ }
+
+ element.avalonSetter = updateVModel //#765
+ }
+
+ element.oldValue = element.value
+ avalon.injectBinding(data)
+ callback.call(element, element.value)
+}
+duplexBinding.TEXTAREA = duplexBinding.INPUT
+duplexBinding.SELECT = function(element, evaluator, data) {
+ var $elem = avalon(element)
+
+ function updateVModel() {
+ if ($elem.data("duplexObserve") !== false) {
+ var val = $elem.val() //字符串或字符串数组
+ if (Array.isArray(val)) {
+ val = val.map(function(v) {
+ return data.pipe(v, data, "get")
+ })
+ } else {
+ val = data.pipe(val, data, "get")
+ }
+ if (val + "" !== element.oldValue) {
+ evaluator(val)
+ }
+ data.changed.call(element, val, data)
+ }
+ }
+ data.handler = function() {
+ var val = evaluator()
+ val = val && val.$model || val
+ if (Array.isArray(val)) {
+ if (!element.multiple) {
+ log("ms-duplex在<select multiple=true>上è¦æ±‚对应一个数组")
+ }
+ } else {
+ if (element.multiple) {
+ log("ms-duplex在<select multiple=false>ä¸èƒ½å¯¹åº”一个数组")
+ }
+ }
+ //å¿…é¡»å˜æˆå­—符串åŽæ‰èƒ½æ¯”较
+ val = Array.isArray(val) ? val.map(String) : val + ""
+ if (val + "" !== element.oldValue) {
+ $elem.val(val)
+ element.oldValue = val + ""
+ }
+ }
+ data.bound("change", updateVModel)
+ element.msCallback = function() {
+ avalon.injectBinding(data)
+ data.changed.call(element, evaluator(), data)
+ }
+}
+// bindingHandlers.html 定义在if.js
+bindingExecutors.html = function (val, elem, data) {
+ var isHtmlFilter = elem.nodeType !== 1
+ var parent = isHtmlFilter ? elem.parentNode : elem
+ if (!parent)
+ return
+ val = val == null ? "" : val
+ if (data.oldText !== val) {
+ data.oldText = val
+ } else {
+ return
+ }
+ if (elem.nodeType === 3) {
+ var signature = generateID("html")
+ parent.insertBefore(DOC.createComment(signature), elem)
+ data.element = DOC.createComment(signature + ":end")
+ parent.replaceChild(data.element, elem)
+ elem = data.element
+ }
+ if (typeof val !== "object") {//string, number, boolean
+ var fragment = avalon.parseHTML(String(val))
+ } else if (val.nodeType === 11) { //å°†val转æ¢ä¸ºæ–‡æ¡£ç¢Žç‰‡
+ fragment = val
+ } else if (val.nodeType === 1 || val.item) {
+ var nodes = val.nodeType === 1 ? val.childNodes : val.item
+ fragment = avalonFragment.cloneNode(true)
+ while (nodes[0]) {
+ fragment.appendChild(nodes[0])
+ }
+ }
+
+ nodes = avalon.slice(fragment.childNodes)
+ //æ’å…¥å ä½ç¬¦, 如果是过滤器,需è¦æœ‰èŠ‚制地移除指定的数é‡,如果是html指令,直接清空
+ if (isHtmlFilter) {
+ var endValue = elem.nodeValue.slice(0, -4)
+ while (true) {
+ var node = elem.previousSibling
+ if (!node || node.nodeType === 8 && node.nodeValue === endValue) {
+ break
+ } else {
+ parent.removeChild(node)
+ }
+ }
+ parent.insertBefore(fragment, elem)
+ } else {
+ avalon.clearHTML(elem).appendChild(fragment)
+ }
+ scanNodeArray(nodes, data.vmodels)
+}
+bindingHandlers["if"] =
+ bindingHandlers.data =
+ bindingHandlers.text =
+ bindingHandlers.html =
+ function(data, vmodels) {
+ parseExprProxy(data.value, vmodels, data)
+}
+
+bindingExecutors["if"] = function(val, elem, data) {
+ try {
+ if(!elem.parentNode) return
+ } catch(e) {return}
+ if (val) { //æ’回DOMæ ‘
+ if (elem.nodeType === 8) {
+ elem.parentNode.replaceChild(data.template, elem)
+ // animate.enter(data.template, elem.parentNode)
+ elem = data.element = data.template //这时å¯èƒ½ä¸ºnull
+ }
+ if (elem.getAttribute(data.name)) {
+ elem.removeAttribute(data.name)
+ scanAttr(elem, data.vmodels)
+ }
+ data.rollback = null
+ } else { //移出DOM树,并用注释节点å æ®åŽŸä½ç½®
+ if (elem.nodeType === 1) {
+ var node = data.element = DOC.createComment("ms-if")
+ elem.parentNode.replaceChild(node, elem)
+ // animate.leave(elem, node.parentNode, node)
+ data.template = elem //元素节点
+ ifGroup.appendChild(elem)
+ data.rollback = function() {
+ if (elem.parentNode === ifGroup) {
+ ifGroup.removeChild(elem)
+ }
+ }
+ }
+ }
+}
+//ms-important绑定已ç»åœ¨scanTag 方法中实现
+//ms-include绑定已由ms-attr绑定实现
+
+var rdash = /\(([^)]*)\)/
+bindingHandlers.on = function(data, vmodels) {
+ var value = data.value
+ data.type = "on"
+ var eventType = data.param.replace(/-\d+$/, "") // ms-on-mousemove-10
+ if (typeof bindingHandlers.on[eventType + "Hook"] === "function") {
+ bindingHandlers.on[eventType + "Hook"](data)
+ }
+ if (value.indexOf("(") > 0 && value.indexOf(")") > -1) {
+ var matched = (value.match(rdash) || ["", ""])[1].trim()
+ if (matched === "" || matched === "$event") { // aaa() aaa($event)当æˆaaa处ç†
+ value = value.replace(rdash, "")
+ }
+ }
+ parseExprProxy(value, vmodels, data)
+}
+
+bindingExecutors.on = function(callback, elem, data) {
+ callback = function(e) {
+ var fn = data.evaluator || noop
+ return fn.apply(this, data.args.concat(e))
+ }
+ var eventType = data.param.replace(/-\d+$/, "") // ms-on-mousemove-10
+ if (eventType === "scan") {
+ callback.call(elem, {
+ type: eventType
+ })
+ } else if (typeof data.specialBind === "function") {
+ data.specialBind(elem, callback)
+ } else {
+ var removeFn = avalon.bind(elem, eventType, callback)
+ }
+ data.rollback = function() {
+ if (typeof data.specialUnbind === "function") {
+ data.specialUnbind()
+ } else {
+ avalon.unbind(elem, eventType, removeFn)
+ }
+ }
+}
+bindingHandlers.repeat = function (data, vmodels) {
+ var type = data.type
+ parseExprProxy(data.value, vmodels, data, 0, 1)
+ data.proxies = []
+ var freturn = false
+ try {
+ var $repeat = data.$repeat = data.evaluator.apply(0, data.args || [])
+ var xtype = avalon.type($repeat)
+ if (xtype !== "object" && xtype !== "array") {
+ freturn = true
+ avalon.log("warning:" + data.value + "åªèƒ½æ˜¯å¯¹è±¡æˆ–数组")
+ }
+ } catch (e) {
+ freturn = true
+ }
+ var arr = data.value.split(".") || []
+ if (arr.length > 1) {
+ arr.pop()
+ var n = arr[0]
+ for (var i = 0, v; v = vmodels[i++]; ) {
+ if (v && v.hasOwnProperty(n)) {
+ var events = v[n].$events || {}
+ events[subscribers] = events[subscribers] || []
+ events[subscribers].push(data)
+ break
+ }
+ }
+ }
+
+ var elem = data.element
+ if (elem.nodeType === 1) {
+ elem.removeAttribute(data.name)
+ data.sortedCallback = getBindingCallback(elem, "data-with-sorted", vmodels)
+ data.renderedCallback = getBindingCallback(elem, "data-" + type + "-rendered", vmodels)
+ var signature = generateID(type)
+ var start = DOC.createComment(signature)
+ var end = DOC.createComment(signature + ":end")
+ data.signature = signature
+ data.template = avalonFragment.cloneNode(false)
+ if (type === "repeat") {
+ var parent = elem.parentNode
+ parent.replaceChild(end, elem)
+ parent.insertBefore(start, end)
+ data.template.appendChild(elem)
+ } else {
+ while (elem.firstChild) {
+ data.template.appendChild(elem.firstChild)
+ }
+ elem.appendChild(start)
+ elem.appendChild(end)
+ }
+ data.element = end
+ data.handler = bindingExecutors.repeat
+ data.rollback = function () {
+ var elem = data.element
+ if (!elem)
+ return
+ data.handler("clear")
+ }
+ }
+
+ if (freturn) {
+ return
+ }
+
+ data.$outer = {}
+ var check0 = "$key"
+ var check1 = "$val"
+ if (Array.isArray($repeat)) {
+ check0 = "$first"
+ check1 = "$last"
+ }
+
+ for (i = 0; v = vmodels[i++]; ) {
+ if (v.hasOwnProperty(check0) && v.hasOwnProperty(check1)) {
+ data.$outer = v
+ break
+ }
+ }
+ var $events = $repeat.$events
+ var $list = ($events || {})[subscribers]
+ injectDependency($list, data)
+ if (xtype === "object") {
+ data.$with = true
+ $repeat.$proxy || ($repeat.$proxy = {})
+ data.handler("append", $repeat)
+ } else if ($repeat.length) {
+ data.handler("add", 0, $repeat.length)
+ }
+}
+
+bindingExecutors.repeat = function (method, pos, el) {
+ if (!method && this.$with) {
+ method = "append"
+ var flag = "update"
+ }
+ if (method) {
+ var data = this, start, fragment
+ var end = data.element
+ var comments = getComments(data)
+ var parent = end.parentNode
+ var proxies = data.proxies
+ var transation = avalonFragment.cloneNode(false)
+ switch (method) {
+ case "add": //在posä½ç½®åŽæ·»åŠ el数组(pos为æ’å…¥ä½ç½®,el为è¦æ’入的个数)
+ var n = pos + el
+ var fragments = []
+ for (var i = pos; i < n; i++) {
+ var proxy = eachProxyAgent(i, data)
+ proxies.splice(i, 0, proxy)
+ shimController(data, transation, proxy, fragments)
+ }
+ var now = new Date() - 0
+ avalon.optimize = avalon.optimize || now
+ for (i = 0; fragment = fragments[i++]; ) {
+ scanNodeArray(fragment.nodes, fragment.vmodels)
+ fragment.nodes = fragment.vmodels = null
+ }
+ if (avalon.optimize === now) {
+ avalon.optimize = null
+ }
+ parent.insertBefore(transation, comments[pos] || end)
+ avalon.profile("æ’å…¥æ“作花费了 " + (new Date - now))
+ break
+ case "del": //å°†posåŽçš„el个元素删掉(pos, el都是数字)
+ sweepNodes(comments[pos], comments[pos + el] || end)
+ var removed = proxies.splice(pos, el)
+ recycleProxies(removed, "each")
+ break
+ case "clear":
+ start = comments[0]
+ if (start) {
+ sweepNodes(start, end)
+ if (data.$with) {
+ parent.insertBefore(start, end)
+ }
+ }
+ recycleProxies(proxies, "each")
+ break
+ case "move":
+ start = comments[0]
+ if (start) {
+ var signature = start.nodeValue
+ var rooms = []
+ var room = [],
+ node
+ sweepNodes(start, end, function () {
+ room.unshift(this)
+ if (this.nodeValue === signature) {
+ rooms.unshift(room)
+ room = []
+ }
+ })
+ sortByIndex(rooms, pos)
+ sortByIndex(proxies, pos)
+ while (room = rooms.shift()) {
+ while (node = room.shift()) {
+ transation.appendChild(node)
+ }
+ }
+ parent.insertBefore(transation, end)
+ }
+ break
+ case "index": //å°†proxies中的第pos个起的所有元素é‡æ–°ç´¢å¼•
+ var last = proxies.length - 1
+ for (; el = proxies[pos]; pos++) {
+ el.$index = pos
+ el.$first = pos === 0
+ el.$last = pos === last
+ }
+ return
+ case "set": //å°†proxies中的第pos个元素的VM设置为el(pos为数字,elä»»æ„)
+ proxy = proxies[pos]
+ if (proxy) {
+ fireDependencies(proxy.$events[data.param || "el"])
+ }
+ break
+ case "append":
+ var object = data.$repeat //原æ¥ç¬¬2å‚数, 被循环对象
+ var oldProxy = object.$proxy //代ç†å¯¹è±¡ç»„æˆçš„hash
+ var keys = []
+ now = new Date() - 0
+ avalon.optimize = avalon.optimize || now
+ if (flag === "update") {
+ if (!data.evaluator) {
+ parseExprProxy(data.value, data.vmodels, data, 0, 1)
+ }
+ object = data.$repeat = data.evaluator.apply(0, data.args || [])
+ object.$proxy = oldProxy
+ }
+ var pool = object.$proxy || {}
+ removed = []
+ var nodes = data.element.parentNode.childNodes
+ var add = false
+ for (i = 0; node = nodes[i++]; ) {
+ if (node.nodeValue === data.signature) {
+ add = true
+ } else if (node.nodeValue === data.signature + ":end") {
+ add = false
+ }
+ if (add) {
+ removed.push(node)
+ }
+ }
+
+ var indexNode = [], item
+ var keyIndex = data.keyIndex || (data.keyIndex = {})
+ //将现有的节点全部移出DOM树
+ for ( i = 0; i < removed.length; i++) {
+ el = removed[i]
+ if (el.nodeValue === data.signature) {
+ item = avalonFragment.cloneNode(false)
+ indexNode.push(item)
+ }
+ item.appendChild(el)
+ }
+
+
+ for (var key in object) { //当å‰å¯¹è±¡çš„所有键å
+ if (object.hasOwnProperty(key) && key !== "hasOwnProperty" && key !== "$proxy") {
+ keys.push(key)
+ }
+ }
+
+ for (var i = 0; key = keys[i++]; ) {
+ if (!pool.hasOwnProperty(key)) {//添加缺失的代ç†VM
+ pool[key] = withProxyAgent(pool[key], key, data)
+ } else {
+ pool[key].$val = object[key]
+ }
+ }
+
+ for ( key in pool) {
+ if (keys.indexOf(key) === -1) {//删除没用的代ç†VM
+ proxyRecycler(pool[key], withProxyPool) //去掉之å‰çš„代ç†VM
+ delete pool[key]
+ }
+ }
+ var fragments = []
+ var renderKeys = keys //需è¦æ¸²æŸ“到DOM树去的键å
+ var end = data.element
+ if (data.sortedCallback) { //如果有回调,则让它们排åº
+ var keys2 = data.sortedCallback.call(parent, keys)
+ if (keys2 && Array.isArray(keys2)) {
+ renderKeys = keys2
+ }
+ }
+
+ for (i = 0; i < renderKeys.length; i++) {
+ key = renderKeys[i]
+ if (typeof keyIndex[key] === "number") {
+ transation.appendChild(indexNode[keyIndex[key]])
+ fragments.push({})
+ } else {
+ shimController(data, transation, pool[key], fragments)
+ }
+ }
+
+ for (i = 0; i < renderKeys.length; i++) {
+ keyIndex[renderKeys[i]] = i
+ }
+
+ for (i = 0; fragment = fragments[i++]; ) {
+ if (fragment.nodes) {
+ scanNodeArray(fragment.nodes, fragment.vmodels)
+ fragment.nodes = fragment.vmodels = null
+ }
+ }
+ if (avalon.optimize === now) {
+ avalon.optimize = null
+ }
+ parent.insertBefore(transation, end)
+ avalon.profile("æ’å…¥æ“作花费了 " + (new Date - now))
+ break
+ }
+ if (!data.$repeat || data.$repeat.hasOwnProperty("$lock")) //IE6-8 VBScript对象会报错, 有时候data.$repeatä¸å­˜åœ¨
+ return
+ if (method === "clear")
+ method = "del"
+ var callback = data.renderedCallback || noop,
+ args = arguments
+ if (parent.oldValue && parent.tagName === "SELECT") { //fix #503
+ avalon(parent).val(parent.oldValue.split(","))
+ }
+ callback.apply(parent, args)
+ }
+}
+"with,each".replace(rword, function (name) {
+ bindingHandlers[name] = bindingHandlers.repeat
+})
+
+function shimController(data, transation, proxy, fragments) {
+ var content = data.template.cloneNode(true)
+ var nodes = avalon.slice(content.childNodes)
+ content.insertBefore(DOC.createComment(data.signature), content.firstChild)
+ transation.appendChild(content)
+ var nv = [proxy].concat(data.vmodels)
+ var fragment = {
+ nodes: nodes,
+ vmodels: nv
+ }
+ fragments.push(fragment)
+}
+
+function getComments(data) {
+ var ret = []
+ var nodes = data.element.parentNode.childNodes
+ for(var i= 0, node; node = nodes[i++];){
+ if(node.nodeValue === data.signature){
+ ret.push( node )
+ }else if(node.nodeValue === data.signature+":end"){
+ break
+ }
+ }
+ return ret
+}
+
+
+//移除掉start与end之间的节点(ä¿ç•™end)
+function sweepNodes(start, end, callback) {
+ while (true) {
+ var node = end.previousSibling
+ if (!node)
+ break
+ node.parentNode.removeChild(node)
+ callback && callback.call(node)
+ if (node === start) {
+ break
+ }
+ }
+}
+
+// 为ms-each,ms-with, ms-repeat会创建一个代ç†VM,
+// 通过它们ä¿æŒä¸€ä¸ªä¸‹ä¸Šæ–‡ï¼Œè®©ç”¨æˆ·èƒ½è°ƒç”¨$index,$first,$last,$remove,$key,$val,$outer等属性与方法
+// 所有代ç†VM的产生,消费,收集,存放通过xxxProxyFactory,xxxProxyAgent, recycleProxies,xxxProxyPool实现
+var withProxyPool = []
+function withProxyFactory() {
+ var proxy = modelFactory({
+ $key: "",
+ $outer: {},
+ $host: {},
+ $val: {
+ get: function () {
+ return this.$host[this.$key]
+ },
+ set: function (val) {
+ this.$host[this.$key] = val
+ }
+ }
+ }, {
+ $val: 1
+ })
+ proxy.$id = generateID("$proxy$with")
+ return proxy
+}
+
+function withProxyAgent(proxy, key, data) {
+ proxy = proxy || withProxyPool.pop()
+ if (!proxy) {
+ proxy = withProxyFactory()
+ } else {
+ proxy.$reinitialize()
+ }
+ var host = data.$repeat
+ proxy.$key = key
+ proxy.$host = host
+ proxy.$outer = data.$outer
+ if (host.$events) {
+ proxy.$events.$val = host.$events[key]
+ } else {
+ proxy.$events = {}
+ }
+ return proxy
+}
+
+
+function recycleProxies(proxies) {
+ eachProxyRecycler(proxies)
+}
+function eachProxyRecycler(proxies) {
+ proxies.forEach(function (proxy) {
+ proxyRecycler(proxy, eachProxyPool)
+ })
+ proxies.length = 0
+}
+
+
+var eachProxyPool = []
+function eachProxyFactory(name) {
+ var source = {
+ $host: [],
+ $outer: {},
+ $index: 0,
+ $first: false,
+ $last: false,
+ $remove: avalon.noop
+ }
+ source[name] = {
+ get: function () {
+ var e = this.$events
+ var array = e.$index
+ e.$index = e[name] //#817 通过$index为el收集ä¾èµ–
+ try {
+ return this.$host[this.$index]
+ } finally {
+ e.$index = array
+ }
+ },
+ set: function (val) {
+ try {
+ var e = this.$events
+ var array = e.$index
+ e.$index = []
+ this.$host.set(this.$index, val)
+ } finally {
+ e.$index = array
+ }
+ }
+ }
+ var second = {
+ $last: 1,
+ $first: 1,
+ $index: 1
+ }
+ var proxy = modelFactory(source, second)
+ proxy.$id = generateID("$proxy$each")
+ return proxy
+}
+
+function eachProxyAgent(index, data) {
+ var param = data.param || "el",
+ proxy
+ for (var i = 0, n = eachProxyPool.length; i < n; i++) {
+ var candidate = eachProxyPool[i]
+ if (candidate && candidate.hasOwnProperty(param)) {
+ proxy = candidate
+ eachProxyPool.splice(i, 1)
+ }
+ }
+ if (!proxy) {
+ proxy = eachProxyFactory(param)
+ }
+ var host = data.$repeat
+ var last = host.length - 1
+ proxy.$index = index
+ proxy.$first = index === 0
+ proxy.$last = index === last
+ proxy.$host = host
+ proxy.$outer = data.$outer
+ proxy.$remove = function () {
+ return host.removeAt(proxy.$index)
+ }
+ return proxy
+}
+
+
+function proxyRecycler(proxy, proxyPool) {
+ for (var i in proxy.$events) {
+ if (Array.isArray(proxy.$events[i])) {
+ proxy.$events[i].forEach(function (data) {
+ if (typeof data === "object")
+ disposeData(data)
+ })// jshint ignore:line
+ proxy.$events[i].length = 0
+ }
+ }
+ proxy.$host = proxy.$outer = {}
+ if (proxyPool.unshift(proxy) > kernel.maxRepeatSize) {
+ proxyPool.pop()
+ }
+}
+/*********************************************************************
+ * å„ç§æŒ‡ä»¤ *
+ **********************************************************************/
+//ms-skip绑定已ç»åœ¨scanTag 方法中实现
+// bindingHandlers.text 定义在if.js
+bindingExecutors.text = function(val, elem) {
+ val = val == null ? "" : val //ä¸åœ¨é¡µé¢ä¸Šæ˜¾ç¤ºundefined null
+ if (elem.nodeType === 3) { //绑定在文本节点上
+ try { //IE对游离于DOM树外的节点赋值会报错
+ elem.data = val
+ } catch (e) {}
+ } else { //绑定在特性节点上
+ if ("textContent" in elem) {
+ elem.textContent = val
+ } else {
+ elem.innerText = val
+ }
+ }
+}
+function parseDisplay(nodeName, val) {
+ //用于å–得此类标签的默认display值
+ var key = "_" + nodeName
+ if (!parseDisplay[key]) {
+ var node = DOC.createElement(nodeName)
+ root.appendChild(node)
+ if (W3C) {
+ val = getComputedStyle(node, null).display
+ } else {
+ val = node.currentStyle.display
+ }
+ root.removeChild(node)
+ parseDisplay[key] = val
+ }
+ return parseDisplay[key]
+}
+
+avalon.parseDisplay = parseDisplay
+
+bindingHandlers.visible = function(data, vmodels) {
+ var elem = data.element
+ var display = elem.style.display
+ if(display === "none"){
+ display = parseDisplay(elem.nodeName)
+ }
+ data.display = display
+ parseExprProxy(data.value, vmodels, data)
+}
+
+bindingExecutors.visible = function(val, elem, data) {
+ elem.style.display = val ? data.display : "none"
+}
+bindingHandlers.widget = function(data, vmodels) {
+ var args = data.value.match(rword)
+ var elem = data.element
+ var widget = args[0]
+ var id = args[1]
+ if (!id || id === "$") { //没有定义或为$时,å–组件å+éšæœºæ•°
+ id = generateID(widget)
+ }
+ var optName = args[2] || widget //没有定义,å–组件å
+ var constructor = avalon.ui[widget]
+ if (typeof constructor === "function") { //ms-widget="tabs,tabsAAA,optname"
+ vmodels = elem.vmodels || vmodels
+ for (var i = 0, v; v = vmodels[i++];) {
+ if (v.hasOwnProperty(optName) && typeof v[optName] === "object") {
+ var vmOptions = v[optName]
+ vmOptions = vmOptions.$model || vmOptions
+ break
+ }
+ }
+ if (vmOptions) {
+ var wid = vmOptions[widget + "Id"]
+ if (typeof wid === "string") {
+ log("warning!ä¸å†æ”¯æŒ" + widget + "Id")
+ id = wid
+ }
+ }
+ //抽å–data-tooltip-textã€data-tooltip-attr属性,组æˆä¸€ä¸ªé…置对象
+ var widgetData = avalon.getWidgetData(elem, widget)
+ data.value = [widget, id, optName].join(",")
+ data[widget + "Id"] = id
+ data.evaluator = noop
+ elem.msData["ms-widget-id"] = id
+ var options = data[widget + "Options"] = avalon.mix({}, constructor.defaults, vmOptions || {}, widgetData)
+ elem.removeAttribute("ms-widget")
+ var vmodel = constructor(elem, data, vmodels) || {} //防止组件ä¸è¿”回VM
+ if (vmodel.$id) {
+ avalon.vmodels[id] = vmodel
+ createSignalTower(elem, vmodel)
+ try {
+ vmodel.$init(function() {
+ avalon.scan(elem, [vmodel].concat(vmodels))
+ if (typeof options.onInit === "function") {
+ options.onInit.call(elem, vmodel, options, vmodels)
+ }
+ })
+ } catch (e) {}
+ data.rollback = function() {
+ try {
+ vmodel.widgetElement = null
+ vmodel.$remove()
+ } catch (e) {}
+ elem.msData = {}
+ delete avalon.vmodels[vmodel.$id]
+ }
+ injectDisposeQueue(data, widgetList)
+ if (window.chrome) {
+ elem.addEventListener("DOMNodeRemovedFromDocument", function() {
+ setTimeout(rejectDisposeQueue)
+ })
+ }
+ } else {
+ avalon.scan(elem, vmodels)
+ }
+ } else if (vmodels.length) { //如果该组件还没有加载,那么ä¿å­˜å½“å‰çš„vmodels
+ elem.vmodels = vmodels
+ }
+}
+var widgetList = []
+//ä¸å­˜åœ¨ bindingExecutors.widget
+/*********************************************************************
+ * 自带过滤器 *
+ **********************************************************************/
+var rscripts = /<script[^>]*>([\S\s]*?)<\/script\s*>/gim
+var ron = /\s+(on[^=\s]+)(?:=("[^"]*"|'[^']*'|[^\s>]+))?/g
+var ropen = /<\w+\b(?:(["'])[^"]*?(\1)|[^>])*>/ig
+var rsanitize = {
+ a: /\b(href)\=("javascript[^"]*"|'javascript[^']*')/ig,
+ img: /\b(src)\=("javascript[^"]*"|'javascript[^']*')/ig,
+ form: /\b(action)\=("javascript[^"]*"|'javascript[^']*')/ig
+}
+var rsurrogate = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g
+var rnoalphanumeric = /([^\#-~| |!])/g;
+
+function numberFormat(number, decimals, point, thousands) {
+ //form http://phpjs.org/functions/number_format/
+ //number 必需,è¦æ ¼å¼åŒ–çš„æ•°å­—
+ //decimals å¯é€‰ï¼Œè§„定多少个å°æ•°ä½ã€‚
+ //point å¯é€‰ï¼Œè§„定用作å°æ•°ç‚¹çš„字符串(默认为 . )。
+ //thousands å¯é€‰ï¼Œè§„定用作åƒä½åˆ†éš”符的字符串(默认为 , ),如果设置了该å‚数,那么所有其他å‚数都是必需的。
+ number = (number + '')
+ .replace(/[^0-9+\-Ee.]/g, '')
+ var n = !isFinite(+number) ? 0 : +number,
+ prec = !isFinite(+decimals) ? 3 : Math.abs(decimals),
+ sep = thousands || ",",
+ dec = point || ".",
+ s = '',
+ toFixedFix = function(n, prec) {
+ var k = Math.pow(10, prec)
+ return '' + (Math.round(n * k) / k)
+ .toFixed(prec)
+ }
+ // Fix for IE parseFloat(0.55).toFixed(0) = 0;
+ s = (prec ? toFixedFix(n, prec) : '' + Math.round(n))
+ .split('.')
+ if (s[0].length > 3) {
+ s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep)
+ }
+ if ((s[1] || '')
+ .length < prec) {
+ s[1] = s[1] || ''
+ s[1] += new Array(prec - s[1].length + 1)
+ .join('0')
+ }
+ return s.join(dec)
+}
+
+
+var filters = avalon.filters = {
+ uppercase: function(str) {
+ return str.toUpperCase()
+ },
+ lowercase: function(str) {
+ return str.toLowerCase()
+ },
+ truncate: function(str, length, truncation) {
+ //length,新字符串长度,truncation,新字符串的结尾的字段,返回新字符串
+ length = length || 30
+ truncation = typeof truncation === "string" ? truncation : "..."
+ return str.length > length ? str.slice(0, length - truncation.length) + truncation : String(str)
+ },
+ $filter: function(val) {
+ for (var i = 1, n = arguments.length; i < n; i++) {
+ var array = arguments[i]
+ var fn = avalon.filters[array.shift()]
+ if (typeof fn === "function") {
+ var arr = [val].concat(array)
+ val = fn.apply(null, arr)
+ }
+ }
+ return val
+ },
+ camelize: camelize,
+ //https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
+ // <a href="javasc&NewLine;ript&colon;alert('XSS')">chrome</a>
+ // <a href="data:text/html;base64, PGltZyBzcmM9eCBvbmVycm9yPWFsZXJ0KDEpPg==">chrome</a>
+ // <a href="jav ascript:alert('XSS');">IE67chrome</a>
+ // <a href="jav&#x09;ascript:alert('XSS');">IE67chrome</a>
+ // <a href="jav&#x0A;ascript:alert('XSS');">IE67chrome</a>
+ sanitize: function(str) {
+ return str.replace(rscripts, "").replace(ropen, function(a, b) {
+ var match = a.toLowerCase().match(/<(\w+)\s/)
+ if (match) { //处ç†a标签的href属性,img标签的src属性,form标签的action属性
+ var reg = rsanitize[match[1]]
+ if (reg) {
+ a = a.replace(reg, function(s, name, value) {
+ var quote = value.charAt(0)
+ return name + "=" + quote + "javascript:void(0)" + quote// jshint ignore:line
+ })
+ }
+ }
+ return a.replace(ron, " ").replace(/\s+/g, " ") //移除onXXX事件
+ })
+ },
+ escape: function(str) {
+ //将字符串ç»è¿‡ str 转义得到适åˆåœ¨é¡µé¢ä¸­æ˜¾ç¤ºçš„内容, ä¾‹å¦‚æ›¿æ¢ < 为 &lt
+ return String(str).
+ replace(/&/g, '&amp;').
+ replace(rsurrogate, function(value) {
+ var hi = value.charCodeAt(0)
+ var low = value.charCodeAt(1)
+ return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';'
+ }).
+ replace(rnoalphanumeric, function(value) {
+ return '&#' + value.charCodeAt(0) + ';'
+ }).
+ replace(/</g, '&lt;').
+ replace(/>/g, '&gt;')
+ },
+ currency: function(amount, symbol, fractionSize) {
+ return (symbol || "\uFFE5") + numberFormat(amount, isFinite(fractionSize) ? fractionSize : 2)
+ },
+ number: numberFormat
+}
+/*
+ 'yyyy': 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010)
+ 'yy': 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)
+ 'y': 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199)
+ 'MMMM': Month in year (January-December)
+ 'MMM': Month in year (Jan-Dec)
+ 'MM': Month in year, padded (01-12)
+ 'M': Month in year (1-12)
+ 'dd': Day in month, padded (01-31)
+ 'd': Day in month (1-31)
+ 'EEEE': Day in Week,(Sunday-Saturday)
+ 'EEE': Day in Week, (Sun-Sat)
+ 'HH': Hour in day, padded (00-23)
+ 'H': Hour in day (0-23)
+ 'hh': Hour in am/pm, padded (01-12)
+ 'h': Hour in am/pm, (1-12)
+ 'mm': Minute in hour, padded (00-59)
+ 'm': Minute in hour (0-59)
+ 'ss': Second in minute, padded (00-59)
+ 's': Second in minute (0-59)
+ 'a': am/pm marker
+ 'Z': 4 digit (+sign) representation of the timezone offset (-1200-+1200)
+ format string can also be one of the following predefined localizable formats:
+
+ 'medium': equivalent to 'MMM d, y h:mm:ss a' for en_US locale (e.g. Sep 3, 2010 12:05:08 pm)
+ 'short': equivalent to 'M/d/yy h:mm a' for en_US locale (e.g. 9/3/10 12:05 pm)
+ 'fullDate': equivalent to 'EEEE, MMMM d,y' for en_US locale (e.g. Friday, September 3, 2010)
+ 'longDate': equivalent to 'MMMM d, y' for en_US locale (e.g. September 3, 2010
+ 'mediumDate': equivalent to 'MMM d, y' for en_US locale (e.g. Sep 3, 2010)
+ 'shortDate': equivalent to 'M/d/yy' for en_US locale (e.g. 9/3/10)
+ 'mediumTime': equivalent to 'h:mm:ss a' for en_US locale (e.g. 12:05:08 pm)
+ 'shortTime': equivalent to 'h:mm a' for en_US locale (e.g. 12:05 pm)
+ */
+new function() {// jshint ignore:line
+ function toInt(str) {
+ return parseInt(str, 10) || 0
+ }
+
+ function padNumber(num, digits, trim) {
+ var neg = ""
+ if (num < 0) {
+ neg = '-'
+ num = -num
+ }
+ num = "" + num
+ while (num.length < digits)
+ num = "0" + num
+ if (trim)
+ num = num.substr(num.length - digits)
+ return neg + num
+ }
+
+ function dateGetter(name, size, offset, trim) {
+ return function(date) {
+ var value = date["get" + name]()
+ if (offset > 0 || value > -offset)
+ value += offset
+ if (value === 0 && offset === -12) {
+ value = 12
+ }
+ return padNumber(value, size, trim)
+ }
+ }
+
+ function dateStrGetter(name, shortForm) {
+ return function(date, formats) {
+ var value = date["get" + name]()
+ var get = (shortForm ? ("SHORT" + name) : name).toUpperCase()
+ return formats[get][value]
+ }
+ }
+
+ function timeZoneGetter(date) {
+ var zone = -1 * date.getTimezoneOffset()
+ var paddedZone = (zone >= 0) ? "+" : ""
+ paddedZone += padNumber(Math[zone > 0 ? "floor" : "ceil"](zone / 60), 2) + padNumber(Math.abs(zone % 60), 2)
+ return paddedZone
+ }
+ //å–得上åˆä¸‹åˆ
+
+ function ampmGetter(date, formats) {
+ return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1]
+ }
+ var DATE_FORMATS = {
+ yyyy: dateGetter("FullYear", 4),
+ yy: dateGetter("FullYear", 2, 0, true),
+ y: dateGetter("FullYear", 1),
+ MMMM: dateStrGetter("Month"),
+ MMM: dateStrGetter("Month", true),
+ MM: dateGetter("Month", 2, 1),
+ M: dateGetter("Month", 1, 1),
+ dd: dateGetter("Date", 2),
+ d: dateGetter("Date", 1),
+ HH: dateGetter("Hours", 2),
+ H: dateGetter("Hours", 1),
+ hh: dateGetter("Hours", 2, -12),
+ h: dateGetter("Hours", 1, -12),
+ mm: dateGetter("Minutes", 2),
+ m: dateGetter("Minutes", 1),
+ ss: dateGetter("Seconds", 2),
+ s: dateGetter("Seconds", 1),
+ sss: dateGetter("Milliseconds", 3),
+ EEEE: dateStrGetter("Day"),
+ EEE: dateStrGetter("Day", true),
+ a: ampmGetter,
+ Z: timeZoneGetter
+ }
+ var rdateFormat = /((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/
+ var raspnetjson = /^\/Date\((\d+)\)\/$/
+ filters.date = function(date, format) {
+ var locate = filters.date.locate,
+ text = "",
+ parts = [],
+ fn, match
+ format = format || "mediumDate"
+ format = locate[format] || format
+ if (typeof date === "string") {
+ if (/^\d+$/.test(date)) {
+ date = toInt(date)
+ } else if (raspnetjson.test(date)) {
+ date = +RegExp.$1
+ } else {
+ var trimDate = date.trim()
+ var dateArray = [0, 0, 0, 0, 0, 0, 0]
+ var oDate = new Date(0)
+ //å–得年月日
+ trimDate = trimDate.replace(/^(\d+)\D(\d+)\D(\d+)/, function(_, a, b, c) {
+ var array = c.length === 4 ? [c, a, b] : [a, b, c]
+ dateArray[0] = toInt(array[0]) //å¹´
+ dateArray[1] = toInt(array[1]) - 1 //月
+ dateArray[2] = toInt(array[2]) //æ—¥
+ return ""
+ })
+ var dateSetter = oDate.setFullYear
+ var timeSetter = oDate.setHours
+ trimDate = trimDate.replace(/[T\s](\d+):(\d+):?(\d+)?\.?(\d)?/, function(_, a, b, c, d) {
+ dateArray[3] = toInt(a) //å°æ—¶
+ dateArray[4] = toInt(b) //分钟
+ dateArray[5] = toInt(c) //秒
+ if (d) { //毫秒
+ dateArray[6] = Math.round(parseFloat("0." + d) * 1000)
+ }
+ return ""
+ })
+ var tzHour = 0
+ var tzMin = 0
+ trimDate = trimDate.replace(/Z|([+-])(\d\d):?(\d\d)/, function(z, symbol, c, d) {
+ dateSetter = oDate.setUTCFullYear
+ timeSetter = oDate.setUTCHours
+ if (symbol) {
+ tzHour = toInt(symbol + c)
+ tzMin = toInt(symbol + d)
+ }
+ return ""
+ })
+
+ dateArray[3] -= tzHour
+ dateArray[4] -= tzMin
+ dateSetter.apply(oDate, dateArray.slice(0, 3))
+ timeSetter.apply(oDate, dateArray.slice(3))
+ date = oDate
+ }
+ }
+ if (typeof date === "number") {
+ date = new Date(date)
+ }
+ if (avalon.type(date) !== "date") {
+ return
+ }
+ while (format) {
+ match = rdateFormat.exec(format)
+ if (match) {
+ parts = parts.concat(match.slice(1))
+ format = parts.pop()
+ } else {
+ parts.push(format)
+ format = null
+ }
+ }
+ parts.forEach(function(value) {
+ fn = DATE_FORMATS[value]
+ text += fn ? fn(date, locate) : value.replace(/(^'|'$)/g, "").replace(/''/g, "'")
+ })
+ return text
+ }
+ var locate = {
+ AMPMS: {
+ 0: "上åˆ",
+ 1: "下åˆ"
+ },
+ DAY: {
+ 0: "星期日",
+ 1: "星期一",
+ 2: "星期二",
+ 3: "星期三",
+ 4: "星期四",
+ 5: "星期五",
+ 6: "星期六"
+ },
+ MONTH: {
+ 0: "1月",
+ 1: "2月",
+ 2: "3月",
+ 3: "4月",
+ 4: "5月",
+ 5: "6月",
+ 6: "7月",
+ 7: "8月",
+ 8: "9月",
+ 9: "10月",
+ 10: "11月",
+ 11: "12月"
+ },
+ SHORTDAY: {
+ "0": "周日",
+ "1": "周一",
+ "2": "周二",
+ "3": "周三",
+ "4": "周四",
+ "5": "周五",
+ "6": "周六"
+ },
+ fullDate: "y年M月d日EEEE",
+ longDate: "y年M月d日",
+ medium: "yyyy-M-d H:mm:ss",
+ mediumDate: "yyyy-M-d",
+ mediumTime: "H:mm:ss",
+ "short": "yy-M-d ah:mm",
+ shortDate: "yy-M-d",
+ shortTime: "ah:mm"
+ }
+ locate.SHORTMONTH = locate.MONTH
+ filters.date.locate = locate
+}// jshint ignore:line
+/*********************************************************************
+ * AMD加载器 *
+ **********************************************************************/
+//https://www.devbridge.com/articles/understanding-amd-requirejs/
+//http://maxogden.com/nested-dependencies.html
+var modules = avalon.modules = {
+ "domReady!": {
+ exports: avalon,
+ state: 3
+ },
+ "avalon": {
+ exports: avalon,
+ state: 4
+ }
+}
+//Object(modules[id]).state拥有如下值
+// undefined 没有定义
+// 1(send) å·²ç»å‘出请求
+// 2(loading) å·²ç»è¢«æ‰§è¡Œä½†è¿˜æ²¡æœ‰æ‰§è¡Œå®Œæˆï¼Œåœ¨è¿™ä¸ªé˜¶æ®µdefine方法会被执行
+// 3(loaded) 执行完毕,通过onload/onreadystatechange回调判定,在这个阶段checkDeps方法会执行
+// 4(execute) å…¶ä¾èµ–也执行完毕, 值放到exports对象上,在这个阶段fireFactory方法会执行
+modules.exports = modules.avalon
+
+new function () {// jshint ignore:line
+ var loadings = [] //正在加载中的模å—列表
+ var factorys = [] //放置define方法的factory函数
+ var rjsext = /\.js$/i
+ function makeRequest(name, config) {
+//1. 去掉资æºå‰ç¼€
+ var res = "js"
+ name = name.replace(/^(\w+)\!/, function (a, b) {
+ res = b
+ return ""
+ })
+ if (res === "ready") {
+ log("debug: ready!å·²ç»è¢«åºŸå¼ƒï¼Œè¯·ä½¿ç”¨domReady!")
+ res = "domReady"
+ }
+//2. 去掉querystring, hash
+ var query = ""
+ name = name.replace(rquery, function (a) {
+ query = a
+ return ""
+ })
+ //3. 去掉扩展å
+ var suffix = "." + res
+ var ext = /js|css/.test(suffix) ? suffix : ""
+ name = name.replace(/\.[a-z0-9]+$/g, function (a) {
+ if (a === suffix) {
+ ext = a
+ return ""
+ } else {
+ return a
+ }
+ })
+ var req = avalon.mix({
+ query: query,
+ ext: ext,
+ res: res,
+ name: name,
+ toUrl: toUrl
+ }, config)
+ req.toUrl(name)
+ return req
+ }
+
+ function fireRequest(req) {
+ var name = req.name
+ var res = req.res
+ //1. 如果该模å—å·²ç»å‘出请求,直接返回
+ var module = modules[name]
+ var urlNoQuery = name && req.urlNoQuery
+ if (module && module.state >= 1) {
+ return name
+ }
+ module = modules[urlNoQuery]
+ if (module && module.state >= 3) {
+ innerRequire(module.deps || [], module.factory, urlNoQuery)
+ return urlNoQuery
+ }
+ if (name && !module) {
+ module = modules[urlNoQuery] = {
+ id: urlNoQuery,
+ state: 1 //send
+ }
+ var wrap = function (obj) {
+ resources[res] = obj
+ obj.load(name, req, function (a) {
+ if (arguments.length && a !== void 0) {
+ module.exports = a
+ }
+ module.state = 4
+ checkDeps()
+ })
+ }
+
+ if (!resources[res]) {
+ innerRequire([res], wrap)
+ } else {
+ wrap(resources[res])
+ }
+ }
+ return name ? urlNoQuery : res + "!"
+ }
+
+//核心API之一 require
+ var requireQueue = []
+ var isUserFirstRequire = false
+ innerRequire = avalon.require = function (array, factory, parentUrl, defineConfig) {
+ if (!isUserFirstRequire) {
+ requireQueue.push(avalon.slice(arguments))
+ if (arguments.length <= 2) {
+ isUserFirstRequire = true
+ var queue = requireQueue.splice(0, requireQueue.length), args
+ while (args = queue.shift()) {
+ innerRequire.apply(null, args)
+ }
+ }
+ return
+ }
+
+ if (!Array.isArray(array)) {
+ avalon.error("require方法的第一个å‚数应为数组 " + array)
+ }
+ var deps = [] // 放置所有ä¾èµ–项的完整路径
+ var uniq = {}
+ var id = parentUrl || "callback" + setTimeout("1")// jshint ignore:line
+ defineConfig = defineConfig || {}
+ defineConfig.baseUrl = kernel.baseUrl
+ var isBuilt = !!defineConfig.built
+ if (parentUrl) {
+ defineConfig.parentUrl = parentUrl.substr(0, parentUrl.lastIndexOf("/"))
+ defineConfig.mapUrl = parentUrl.replace(rjsext, "")
+ }
+ if (isBuilt) {
+ var req = makeRequest(defineConfig.defineName, defineConfig)
+ id = req.urlNoQuery
+ } else {
+ array.forEach(function (name) {
+ var req = makeRequest(name, defineConfig)
+ var url = fireRequest(req) //加载资æºï¼Œå¹¶è¿”回该资æºçš„完整地å€
+ if (url) {
+ if (!uniq[url]) {
+ deps.push(url)
+ uniq[url] = "å¸å¾’正美" //去é‡
+ }
+ }
+ })
+ }
+
+ var module = modules[id]
+ if (!module || module.state !== 4) {
+ modules[id] = {
+ id: id,
+ deps: isBuilt ? array.concat() : deps,
+ factory: factory || noop,
+ state: 3
+ }
+ }
+ if (!module) {
+ //如果此模å—是定义在å¦ä¸€ä¸ªJS文件中, 那必须等该文件加载完毕, æ‰èƒ½æ”¾åˆ°æ£€æµ‹åˆ—队中
+ loadings.push(id)
+ }
+ checkDeps()
+ }
+
+//核心API之二 require
+ innerRequire.define = function (name, deps, factory) { //模å—å,ä¾èµ–列表,模å—本身
+ if (typeof name !== "string") {
+ factory = deps
+ deps = name
+ name = "anonymous"
+ }
+ if (!Array.isArray(deps)) {
+ factory = deps
+ deps = []
+ }
+ var config = {
+ built: !isUserFirstRequire, //用r.js打包åŽ,所有define会放到requirejs之å‰
+ defineName: name
+ }
+ var args = [deps, factory, config]
+ factory.require = function (url) {
+ args.splice(2, 0, url)
+ if (modules[url]) {
+ modules[url].state = 3 //loaded
+ var isCycle = false
+ try {
+ isCycle = checkCycle(modules[url].deps, url)
+ } catch (e) {
+ }
+ if (isCycle) {
+ avalon.error(url + "模å—与之å‰çš„模å—存在循环ä¾èµ–,请ä¸è¦ç›´æŽ¥ç”¨script标签引入" + url + "模å—")
+ }
+ }
+ delete factory.require //释放内存
+ innerRequire.apply(null, args) //0,1,2 --> 1,2,0
+ }
+//æ ¹æ®æ ‡å‡†,所有éµå¾ªW3C标准的æµè§ˆå™¨,script标签会按标签的出现顺åºæ‰§è¡Œã€‚
+//è€çš„æµè§ˆå™¨ä¸­ï¼ŒåŠ è½½ä¹Ÿæ˜¯æŒ‰é¡ºåºçš„:一个文件下载完æˆåŽï¼Œæ‰å¼€å§‹ä¸‹è½½ä¸‹ä¸€ä¸ªæ–‡ä»¶ã€‚
+//较新的æµè§ˆå™¨ä¸­ï¼ˆIE8+ ã€FireFox3.5+ ã€Chrome4+ ã€Safari4+),为了å‡å°è¯·æ±‚时间以优化体验,
+//下载å¯ä»¥æ˜¯å¹¶è¡Œçš„,但是执行顺åºè¿˜æ˜¯æŒ‰ç…§æ ‡ç­¾å‡ºçŽ°çš„顺åºã€‚
+//但如果script标签是动æ€æ’入的, 就未必按照先请求先执行的原则了,目测åªæœ‰firefoxéµå®ˆ
+//唯一比较一致的是,IE10+åŠå…¶ä»–标准æµè§ˆå™¨,一旦开始解æžè„šæœ¬, 就会一直堵在那里,直接脚本解æžå®Œæ¯•
+//亦å³ï¼Œå…ˆè¿›å…¥loading阶段的script标签(模å—)必然会先进入loaded阶段
+ var url = config.built ? "unknown" : getCurrentScript()
+ if (url) {
+ var module = modules[url]
+ if (module) {
+ module.state = 2
+ }
+ factory.require(url)
+ } else {//åˆå¹¶å‰åŽçš„safari,åˆå¹¶åŽçš„IE6-9走此分支
+ factorys.push(factory)
+ }
+ }
+//核心API之三 require.config(settings)
+ innerRequire.config = kernel
+ //核心API之四 define.amd 标识其符åˆAMD规范
+ innerRequire.define.amd = modules
+
+ //==========================对用户é…置项进行å†åŠ å·¥==========================
+ var allpaths = kernel["orig.paths"] = {}
+ var allmaps = kernel["orig.map"] = {}
+ var allpackages = kernel["packages"] = []
+ var allargs = kernel["orig.args"] = {}
+ avalon.mix(plugins, {
+ paths: function (hash) {
+ avalon.mix(allpaths, hash)
+ kernel.paths = makeIndexArray(allpaths)
+ },
+ map: function (hash) {
+ avalon.mix(allmaps, hash)
+ var list = makeIndexArray(allmaps, 1, 1)
+ avalon.each(list, function (_, item) {
+ item.val = makeIndexArray(item.val)
+ })
+ kernel.map = list
+ },
+ packages: function (array) {
+ array = array.concat(allpackages)
+ var uniq = {}
+ var ret = []
+ for (var i = 0, pkg; pkg = array[i++]; ) {
+ pkg = typeof pkg === "string" ? {name: pkg} : pkg
+ var name = pkg.name
+ if (!uniq[name]) {
+ var url = joinPath(pkg.location || name, pkg.main || "main")
+ url = url.replace(rjsext, "")
+ ret.push(pkg)
+ uniq[name] = pkg.location = url
+ pkg.reg = makeMatcher(name)
+ }
+ }
+ kernel.packages = ret.sort()
+ },
+ urlArgs: function (hash) {
+ if (typeof hash === "string") {
+ hash = {"*": hash}
+ }
+ avalon.mix(allargs, hash)
+ kernel.urlArgs = makeIndexArray(allargs, 1)
+ },
+ baseUrl: function (url) {
+ if (!isAbsUrl(url)) {
+ var baseElement = head.getElementsByTagName("base")[0]
+ if (baseElement) {
+ head.removeChild(baseElement)
+ }
+ var node = DOC.createElement("a")
+ node.href = url
+ url = getFullUrl(node, "href")
+ if (baseElement) {
+ head.insertBefore(baseElement, head.firstChild)
+ }
+ }
+ if (url.length > 3)
+ kernel.baseUrl = url
+ },
+ shim: function (obj) {
+ for (var i in obj) {
+ var value = obj[i]
+ if (Array.isArray(value)) {
+ value = obj[i] = {
+ deps: value
+ }
+ }
+ if (!value.exportsFn && (value.exports || value.init)) {
+ value.exportsFn = makeExports(value)
+ }
+ }
+ kernel.shim = obj
+ }
+
+ })
+
+
+ //==============================内部方法=================================
+ function checkCycle(deps, nick) {
+ //检测是å¦å­˜åœ¨å¾ªçŽ¯ä¾èµ–
+ for (var i = 0, id; id = deps[i++]; ) {
+ if (modules[id].state !== 4 &&
+ (id === nick || checkCycle(modules[id].deps, nick))) {
+ return true
+ }
+ }
+ }
+
+ function checkFail(node, onError, fuckIE) {
+ var id = trimQuery(node.src) //检测是å¦æ­»é“¾
+ node.onload = node.onreadystatechange = node.onerror = null
+ if (onError || (fuckIE && modules[id] && !modules[id].state)) {
+ setTimeout(function () {
+ head.removeChild(node)
+ node = null // 处ç†æ—§å¼IE下的循环引用问题
+ })
+ log("debug: 加载 " + id + " 失败" + onError + " " + (!modules[id].state))
+ } else {
+ return true
+ }
+ }
+
+ function checkDeps() {
+ //检测此JS模å—çš„ä¾èµ–是å¦éƒ½å·²å®‰è£…完毕,是则安装自身
+ loop: for (var i = loadings.length, id; id = loadings[--i]; ) {
+ var obj = modules[id],
+ deps = obj.deps
+ if (!deps)
+ continue
+ for (var j = 0, key; key = deps[j]; j++) {
+ if (Object(modules[key]).state !== 4) {
+ continue loop
+ }
+ }
+ //如果deps是空对象或者其ä¾èµ–的模å—的状æ€éƒ½æ˜¯2
+ if (obj.state !== 4) {
+ loadings.splice(i, 1) //必须先移除å†å®‰è£…,防止在IE下DOM树建完åŽæ‰‹åŠ¨åˆ·æ–°é¡µé¢ï¼Œä¼šå¤šæ¬¡æ‰§è¡Œå®ƒ
+ fireFactory(obj.id, obj.deps, obj.factory)
+ checkDeps() //如果æˆåŠŸ,则å†æ‰§è¡Œä¸€æ¬¡,以防有些模å—就差本模å—没有安装好
+ }
+ }
+ }
+
+ var rreadyState = /complete|loaded/
+ function loadJS(url, id, callback) {
+ //通过script节点加载目标模å—
+ var node = DOC.createElement("script")
+ node.className = subscribers //让getCurrentScriptåªå¤„ç†ç±»å为subscribersçš„script节点
+ var supportLoad = "onload" in node
+ var onEvent = supportLoad ? "onload" : "onreadystatechange"
+ function onload() {
+ var factory = factorys.pop()
+ factory && factory.require(id)
+ if (callback) {
+ callback()
+ }
+ if (checkFail(node, false, !supportLoad)) {
+ log("debug: å·²æˆåŠŸåŠ è½½ " + url)
+ id && loadings.push(id)
+ checkDeps()
+ }
+ }
+ var index = 0, loadID
+ node[onEvent] = supportLoad ? onload : function () {
+ if (rreadyState.test(node.readyState)) {
+ ++index
+ if (index === 1) {
+ loadID = setTimeout(onload, 500)
+ } else {
+ clearTimeout(loadID)
+ onload()
+ }
+ }
+ }
+ node.onerror = function () {
+ checkFail(node, true)
+ }
+
+ head.insertBefore(node, head.firstChild) //chrome下第二个å‚æ•°ä¸èƒ½ä¸ºnull
+ node.src = url //æ’入到head的第一个节点å‰ï¼Œé˜²æ­¢IE6下head标签没闭åˆå‰ä½¿ç”¨appendChild抛错
+ log("debug: 正准备加载 " + url) //æ›´é‡è¦çš„是IE6下å¯ä»¥æ”¶çª„getCurrentScript的寻找范围
+ }
+
+ var resources = innerRequire.plugins = {
+ //三大常用资æºæ’件 js!, css!, text!, ready!
+ ready: {
+ load: noop
+ },
+ js: {
+ load: function (name, req, onLoad) {
+ var url = req.url
+ var id = req.urlNoQuery
+ var shim = kernel.shim[name.replace(rjsext, "")]
+ if (shim) { //shim机制
+ innerRequire(shim.deps || [], function () {
+ var args = avalon.slice(arguments)
+ loadJS(url, id, function () {
+ onLoad(shim.exportsFn ? shim.exportsFn.apply(0, args) : void 0)
+ })
+ })
+ } else {
+ loadJS(url, id)
+ }
+ }
+ },
+ css: {
+ load: function (name, req, onLoad) {
+ var url = req.url
+ var node = DOC.createElement("link")
+ node.rel = "stylesheet"
+ node.href = url
+ head.insertBefore(node, head.firstChild)
+ log("debug: å·²æˆåŠŸåŠ è½½ " + url)
+ onLoad()
+ }
+ },
+ text: {
+ load: function (name, req, onLoad) {
+ var url = req.url
+ var xhr = getXHR()
+ xhr.onreadystatechange = function () {
+ if (xhr.readyState === 4) {
+ var status = xhr.status;
+ if (status > 399 && status < 600) {
+ avalon.error(url + " 对应资æºä¸å­˜åœ¨æˆ–æ²¡æœ‰å¼€å¯ CORS")
+ } else {
+ log("debug: å·²æˆåŠŸåŠ è½½ " + url)
+ onLoad(xhr.responseText)
+ }
+ }
+ }
+ var time = "_=" + (new Date() - 0)
+ var _url = url.indexOf("?") === -1 ? url + "?" + time : url + "&" + time
+ xhr.open("GET", _url, true)
+ if ("withCredentials" in xhr) {//这是处ç†è·¨åŸŸ
+ xhr.withCredentials = true
+ }
+ xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest")//告诉åŽç«¯è¿™æ˜¯AJAX请求
+ xhr.send()
+ log("debug: 正准备加载 " + url)
+ }
+ }
+ }
+ innerRequire.checkDeps = checkDeps
+
+ var rquery = /(\?[^#]*)$/
+ function trimQuery(url) {
+ return (url || "").replace(rquery, "")
+ }
+
+ function isAbsUrl(path) {
+ //http://stackoverflow.com/questions/10687099/how-to-test-if-a-url-string-is-absolute-or-relative
+ return /^(?:[a-z]+:)?\/\//i.test(String(path))
+ }
+
+ function getFullUrl(node, src) {
+ return"1"[0] ? node[src] : node.getAttribute(src, 4)
+ }
+
+ function getCurrentScript() {
+ // inspireb by https://github.com/samyk/jiagra/blob/master/jiagra.js
+ var stack
+ try {
+ a.b.c() //强制报错,以便æ•èŽ·e.stack
+ } catch (e) { //safari5çš„sourceURL,firefoxçš„fileName,它们的效果与e.stackä¸ä¸€æ ·
+ stack = e.stack
+ if (!stack && window.opera) {
+ //opera 9没有e.stack,但有e.Backtrace,但ä¸èƒ½ç›´æŽ¥å–å¾—,需è¦å¯¹e对象转字符串进行抽å–
+ stack = (String(e).match(/of linked script \S+/g) || []).join(" ")
+ }
+ }
+ if (stack) {
+ /**e.stack最åŽä¸€è¡Œåœ¨æ‰€æœ‰æ”¯æŒçš„æµè§ˆå™¨å¤§è‡´å¦‚下:
+ *chrome23:
+ * at http://113.93.50.63/data.js:4:1
+ *firefox17:
+ *@http://113.93.50.63/query.js:4
+ *opera12:http://www.oldapps.com/opera.php?system=Windows_XP
+ *@http://113.93.50.63/data.js:4
+ *IE10:
+ * at Global code (http://113.93.50.63/data.js:4:1)
+ * //firefox4+ å¯ä»¥ç”¨document.currentScript
+ */
+ stack = stack.split(/[@ ]/g).pop() //å–得最åŽä¸€è¡Œ,最åŽä¸€ä¸ªç©ºæ ¼æˆ–@之åŽçš„部分
+ stack = stack[0] === "(" ? stack.slice(1, -1) : stack.replace(/\s/, "") //去掉æ¢è¡Œç¬¦
+ return trimQuery(stack.replace(/(:\d+)?:\d+$/i, "")) //去掉行å·ä¸Žæˆ–许存在的出错字符起始ä½ç½®
+ }
+ var nodes = head.getElementsByTagName("script") //åªåœ¨head标签中寻找
+ for (var i = nodes.length, node; node = nodes[--i]; ) {
+ if (node.className === subscribers && node.readyState === "interactive") {
+ var url = getFullUrl(node, "src")
+ return node.className = trimQuery(url)
+ }
+ }
+ }
+
+ var rcallback = /^callback\d+$/
+ function fireFactory(id, deps, factory) {
+ var module = Object(modules[id])
+ module.state = 4
+ for (var i = 0, array = [], d; d = deps[i++]; ) {
+ if (d === "exports") {
+ var obj = module.exports || (module.exports = {})
+ array.push(obj)
+ } else {
+ array.push(modules[d].exports)
+ }
+ }
+ try {
+ var ret = factory.apply(window, array)
+ } catch (e) {
+ log("执行[" + id + "]模å—çš„factory抛错: ", e)
+ }
+ if (ret !== void 0) {
+ module.exports = ret
+ }
+ if (rcallback.test(id)) {
+ delete modules[id]
+ }
+ delete module.factory
+ return ret
+ }
+ function toUrl(id) {
+ if (id.indexOf(this.res + "!") === 0) {
+ id = id.slice(this.res.length + 1) //处ç†define("css!style",[], function(){})的情况
+ }
+ var url = id
+ //1. 是å¦å‘½ä¸­pathsé…置项
+ var usePath = 0
+ var baseUrl = this.baseUrl
+ var rootUrl = this.parentUrl || baseUrl
+ eachIndexArray(id, kernel.paths, function (value, key) {
+ url = url.replace(key, value)
+ usePath = 1
+ })
+ //2. 是å¦å‘½ä¸­packagesé…置项
+ if (!usePath) {
+ eachIndexArray(id, kernel.packages, function (value, key, item) {
+ url = url.replace(item.name, item.location)
+ })
+ }
+ //3. 是å¦å‘½ä¸­mapé…置项
+ if (this.mapUrl) {
+ eachIndexArray(this.mapUrl, kernel.map, function (array) {
+ eachIndexArray(url, array, function (mdValue, mdKey) {
+ url = url.replace(mdKey, mdValue)
+ rootUrl = baseUrl
+ })
+ })
+ }
+ var ext = this.ext
+ if (ext && usePath && url.slice(-ext.length) === ext) {
+ url = url.slice(0, -ext.length)
+ }
+ //4. 转æ¢ä¸ºç»å¯¹è·¯å¾„
+ if (!isAbsUrl(url)) {
+ rootUrl = this.built || /^\w/.test(url) ? baseUrl : rootUrl
+ url = joinPath(rootUrl, url)
+ }
+ //5. 还原扩展å,query
+ var urlNoQuery = url + ext
+ url = urlNoQuery + this.query
+ //6. 处ç†urlArgs
+ eachIndexArray(id, kernel.urlArgs, function (value) {
+ url += (url.indexOf("?") === -1 ? "?" : "&") + value;
+ })
+ this.url = url
+ return this.urlNoQuery = urlNoQuery
+ }
+
+ function makeIndexArray(hash, useStar, part) {
+ //创建一个ç»è¿‡ç‰¹æ®Šç®—法排好åºçš„数组
+ var index = hash2array(hash, useStar, part)
+ index.sort(descSorterByName)
+ return index
+ }
+
+ function makeMatcher(prefix) {
+ return new RegExp('^' + prefix + '(/|$)')
+ }
+
+ function makeExports(value) {
+ return function () {
+ var ret
+ if (value.init) {
+ ret = value.init.apply(window, arguments)
+ }
+ return ret || (value.exports && getGlobal(value.exports))
+ }
+ }
+
+
+ function hash2array(hash, useStar, part) {
+ var array = [];
+ for (var key in hash) {
+ if (ohasOwn.call(hash, key)) {
+ var item = {
+ name: key,
+ val: hash[key]
+ }
+ array.push(item)
+ item.reg = key === "*" && useStar ? /^/ : makeMatcher(key)
+ if (part && key !== "*") {
+ item.reg = new RegExp('\/' + key.replace(/^\//, "") + '(/|$)')
+ }
+ }
+ }
+ return array
+ }
+
+ function eachIndexArray(moduleID, array, matcher) {
+ array = array || []
+ for (var i = 0, el; el = array[i++]; ) {
+ if (el.reg.test(moduleID)) {
+ matcher(el.val, el.name, el)
+ return false
+ }
+ }
+ }
+ // æ ¹æ®å…ƒç´ çš„name项进行数组字符数逆åºçš„排åºå‡½æ•°
+ function descSorterByName(a, b) {
+ var aaa = a.name
+ var bbb = b.name
+ if (bbb === "*") {
+ return -1
+ }
+ if (aaa === "*") {
+ return 1
+ }
+ return bbb.length - aaa.length
+ }
+
+ var rdeuce = /\/\w+\/\.\./
+ function joinPath(a, b) {
+ if (a.charAt(a.length - 1) !== "/") {
+ a += "/"
+ }
+ if (b.slice(0, 2) === "./") { //相对于兄弟路径
+ return a + b.slice(2)
+ }
+ if (b.slice(0, 2) === "..") { //相对于父路径
+ a += b
+ while (rdeuce.test(a)) {
+ a = a.replace(rdeuce, "")
+ }
+ return a
+ }
+ if (b.slice(0, 1) === "/") {
+ return a + b.slice(1)
+ }
+ return a + b
+ }
+
+ function getGlobal(value) {
+ if (!value) {
+ return value
+ }
+ var g = window
+ value.split(".").forEach(function (part) {
+ g = g[part]
+ })
+ return g
+ }
+
+ var mainNode = DOC.scripts[DOC.scripts.length - 1]
+ var dataMain = mainNode.getAttribute("data-main")
+ if (dataMain) {
+ plugins.baseUrl(dataMain)
+ var href = kernel.baseUrl
+ kernel.baseUrl = href.slice(0, href.lastIndexOf("/") + 1)
+ loadJS(href.replace(rjsext, "") + ".js")
+ } else {
+ var loaderUrl = trimQuery(getFullUrl(mainNode, "src"))
+ kernel.baseUrl = loaderUrl.slice(0, loaderUrl.lastIndexOf("/") + 1)
+ }
+}// jshint ignore:line
+
+/*********************************************************************
+ * DOMReady *
+ **********************************************************************/
+
+var readyList = [], isReady
+var fireReady = function(fn) {
+ isReady = true
+ if (innerRequire) {
+ modules["domReady!"].state = 4
+ innerRequire.checkDeps()
+ }
+ while(fn = readyList.shift()){
+ fn(avalon)
+ }
+}
+
+function doScrollCheck() {
+ try { //IE下通过doScrollCheck检测DOM树是å¦å»ºå®Œ
+ root.doScroll("left")
+ fireReady()
+ } catch (e) {
+ setTimeout(doScrollCheck)
+ }
+}
+
+if (DOC.readyState === "complete") {
+ setTimeout(fireReady) //如果在domReady之外加载
+} else if (W3C) {
+ DOC.addEventListener("DOMContentLoaded", fireReady)
+} else {
+ DOC.attachEvent("onreadystatechange", function() {
+ if (DOC.readyState === "complete") {
+ fireReady()
+ }
+ })
+ try {
+ var isTop = window.frameElement === null
+ } catch (e) {
+ }
+ if (root.doScroll && isTop && window.external) {//fix IE iframe BUG
+ doScrollCheck()
+ }
+}
+avalon.bind(window, "load", fireReady)
+
+avalon.ready = function(fn) {
+ if (!isReady) {
+ readyList.push(fn)
+ } else {
+ fn(avalon)
+ }
+}
+
+avalon.config({
+ loader: true
+})
+
+avalon.ready(function() {
+ avalon.scan(DOC.body)
+})
+
+// Register as a named AMD module, since avalon can be concatenated with other
+// files that may use define, but not via a proper concatenation script that
+// understands anonymous AMD modules. A named AMD is safest and most robust
+// way to register. Lowercase avalon is used because AMD module names are
+// derived from file names, and Avalon is normally delivered in a lowercase
+// file name. Do this after creating the global so that if an AMD module wants
+// to call noConflict to hide this version of avalon, it will work.
+
+// Note that for maximum portability, libraries that are not avalon should
+// declare themselves as anonymous modules, and avoid setting a global if an
+// AMD loader is present. avalon is a special case. For more information, see
+// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
+ if (typeof define === "function" && define.amd) {
+ define("avalon", [], function() {
+ return avalon
+ })
+ }
+// Map over avalon in case of overwrite
+ var _avalon = window.avalon
+ avalon.noConflict = function(deep) {
+ if (deep && window.avalon === avalon) {
+ window.avalon = _avalon
+ }
+ return avalon
+ }
+// Expose avalon identifiers, even in AMD
+// and CommonJS for browser emulators
+ if (noGlobal === void 0) {
+ window.avalon = avalon
+ }
+ return avalon
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/avalon/avalon.modern.js b/common/src/main/webapp/thirdparty/avalon/avalon.modern.js
new file mode 100644
index 0000000..048b424
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/avalon/avalon.modern.js
@@ -0,0 +1,4935 @@
+/*==================================================
+ Copyright (c) 2013-2015 å¸å¾’正美 and other contributors
+ http://www.cnblogs.com/rubylouvre/
+ https://github.com/RubyLouvre
+ http://weibo.com/jslouvre/
+
+ Released under the MIT license
+ avalon.modern.js 1.43 built in 2015.5.21
+ support IE10+ and other browsers
+ ==================================================*/
+(function (global, factory) {
+
+ if (typeof module === "object" && typeof module.exports === "object") {
+ // For CommonJS and CommonJS-like environments where a proper `window`
+ // is present, execute the factory and get avalon.
+ // For environments that do not have a `window` with a `document`
+ // (such as Node.js), expose a factory as module.exports.
+ // This accentuates the need for the creation of a real `window`.
+ // e.g. var avalon = require("avalon")(window);
+ module.exports = global.document ? factory(global, true) : function (w) {
+ if (!w.document) {
+ throw new Error("Avalon requires a window with a document")
+ }
+ return factory(w)
+ }
+ } else {
+ factory(global)
+ }
+
+// Pass this if window is not defined yet
+}(typeof window !== "undefined" ? window : this, function (window, noGlobal) {
+
+ /*********************************************************************
+ * 全局å˜é‡åŠæ–¹æ³• *
+ **********************************************************************/
+ var expose = Date.now()
+//http://stackoverflow.com/questions/7290086/javascript-use-strict-and-nicks-find-global-function
+ var DOC = window.document
+ var head = DOC.head //HEAD元素
+ head.insertAdjacentHTML("afterBegin", '<avalon ms-skip class="avalonHide"><style id="avalonStyle">.avalonHide{ display: none!important }</style></avalon>')
+ var ifGroup = head.firstChild
+
+ function log() {
+ if (avalon.config.debug) {
+// http://stackoverflow.com/questions/8785624/how-to-safely-wrap-console-log
+ console.log.apply(console, arguments)
+ }
+ }
+
+ /**
+ * Creates a new object without a prototype. This object is useful for lookup without having to
+ * guard against prototypically inherited properties via hasOwnProperty.
+ *
+ * Related micro-benchmarks:
+ * - http://jsperf.com/object-create2
+ * - http://jsperf.com/proto-map-lookup/2
+ * - http://jsperf.com/for-in-vs-object-keys2
+ */
+ function createMap() {
+ return Object.create(null)
+ }
+
+ var subscribers = "$" + expose
+ var otherRequire = window.require
+ var otherDefine = window.define
+ var innerRequire
+ var stopRepeatAssign = false
+ var rword = /[^, ]+/g //切割字符串为一个个å°å—,以空格或豆å·åˆ†å¼€å®ƒä»¬ï¼Œç»“åˆreplace实现字符串的forEach
+ var rcomplexType = /^(?:object|array)$/
+ var rsvg = /^\[object SVG\w*Element\]$/
+ var rwindow = /^\[object (?:Window|DOMWindow|global)\]$/
+ var oproto = Object.prototype
+ var ohasOwn = oproto.hasOwnProperty
+ var serialize = oproto.toString
+ var ap = Array.prototype
+ var aslice = ap.slice
+ var Registry = {} //将函数æ›å…‰åˆ°æ­¤å¯¹è±¡ä¸Šï¼Œæ–¹ä¾¿è®¿é—®å™¨æ”¶é›†ä¾èµ–
+ var W3C = window.dispatchEvent
+ var root = DOC.documentElement
+ var hyperspace = DOC.createDocumentFragment()
+ var cinerator = DOC.createElement("div")
+ var class2type = {}
+ "Boolean Number String Function Array Date RegExp Object Error".replace(rword, function (name) {
+ class2type["[object " + name + "]"] = name.toLowerCase()
+ })
+
+
+ function noop() {
+ }
+
+
+ function oneObject(array, val) {
+ if (typeof array === "string") {
+ array = array.match(rword) || []
+ }
+ var result = {},
+ value = val !== void 0 ? val : 1
+ for (var i = 0, n = array.length; i < n; i++) {
+ result[array[i]] = value
+ }
+ return result
+ }
+
+//生æˆUUID http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
+ var generateID = function (prefix) {
+ prefix = prefix || "avalon"
+ return String(Math.random() + Math.random()).replace(/\d\.\d{4}/, prefix)
+ }
+
+ function IE() {
+ if (window.VBArray) {
+ var mode = document.documentMode
+ return mode ? mode : window.XMLHttpRequest ? 7 : 6
+ } else {
+ return 0
+ }
+ }
+
+ var IEVersion = IE()
+
+ avalon = function (el) { //创建jQueryå¼çš„æ— new 实例化结构
+ return new avalon.init(el)
+ }
+
+ /*视æµè§ˆå™¨æƒ…况采用最快的异步回调*/
+ avalon.nextTick = new function () {// jshint ignore:line
+ var tickImmediate = window.setImmediate
+ var tickObserver = window.MutationObserver
+ var tickPost = W3C && window.postMessage
+ if (tickImmediate) {
+ return tickImmediate.bind(window)
+ }
+
+ var queue = []
+
+ function callback() {
+ var n = queue.length
+ for (var i = 0; i < n; i++) {
+ queue[i]()
+ }
+ queue = queue.slice(n)
+ }
+
+ if (tickObserver) {
+ var node = document.createTextNode("avalon")
+ new tickObserver(callback).observe(node, {characterData: true})// jshint ignore:line
+ return function (fn) {
+ queue.push(fn)
+ node.data = Math.random()
+ }
+ }
+
+ if (tickPost) {
+ window.addEventListener("message", function (e) {
+ var source = e.source
+ if ((source === window || source === null) && e.data === "process-tick") {
+ e.stopPropagation()
+ callback()
+ }
+ })
+
+ return function (fn) {
+ queue.push(fn)
+ window.postMessage('process-tick', '*')
+ }
+ }
+
+ return function (fn) {
+ setTimeout(fn, 0)
+ }
+ }// jshint ignore:line
+ /*********************************************************************
+ * avalonçš„é™æ€æ–¹æ³•å®šä¹‰åŒº *
+ **********************************************************************/
+ avalon.init = function (el) {
+ this[0] = this.element = el
+ }
+ avalon.fn = avalon.prototype = avalon.init.prototype
+
+ avalon.type = function (obj) { //å–得目标的类型
+ if (obj == null) {
+ return String(obj)
+ }
+ // 早期的webkit内核æµè§ˆå™¨å®žçŽ°äº†å·²åºŸå¼ƒçš„ecma262v4标准,å¯ä»¥å°†æ­£åˆ™å­—é¢é‡å½“作函数使用,因此typeof在判定正则时会返回function
+ return typeof obj === "object" || typeof obj === "function" ?
+ class2type[serialize.call(obj)] || "object" :
+ typeof obj
+ }
+
+ var isFunction = function (fn) {
+ return serialize.call(fn) === "[object Function]"
+ }
+
+ avalon.isFunction = isFunction
+
+ avalon.isWindow = function (obj) {
+ return rwindow.test(serialize.call(obj))
+ }
+
+ /*判定是å¦æ˜¯ä¸€ä¸ªæœ´ç´ çš„javascript对象(Object),ä¸æ˜¯DOM对象,ä¸æ˜¯BOM对象,ä¸æ˜¯è‡ªå®šä¹‰ç±»çš„实例*/
+
+ avalon.isPlainObject = function (obj) {
+ // 简å•çš„ typeof obj === "object"检测,会致使用isPlainObject(window)在opera下通ä¸è¿‡
+ return serialize.call(obj) === "[object Object]" && Object.getPrototypeOf(obj) === oproto
+ }
+
+//与jQuery.extend方法,å¯ç”¨äºŽæµ…æ‹·è´ï¼Œæ·±æ‹·è´
+ avalon.mix = avalon.fn.mix = function () {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false
+
+ // 如果第一个å‚数为布尔,判定是å¦æ·±æ‹·è´
+ if (typeof target === "boolean") {
+ deep = target
+ target = arguments[1] || {}
+ i++
+ }
+
+ //ç¡®ä¿æŽ¥å—方为一个å¤æ‚çš„æ•°æ®ç±»åž‹
+ if (typeof target !== "object" && !isFunction(target)) {
+ target = {}
+ }
+
+ //如果åªæœ‰ä¸€ä¸ªå‚数,那么新æˆå‘˜æ·»åŠ äºŽmix所在的对象上
+ if (i === length) {
+ target = this
+ i--
+ }
+
+ for (; i < length; i++) {
+ //åªå¤„ç†éžç©ºå‚æ•°
+ if ((options = arguments[i]) != null) {
+ for (name in options) {
+ src = target[name]
+ copy = options[name]
+ // 防止环引用
+ if (target === copy) {
+ continue
+ }
+ if (deep && copy && (avalon.isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) {
+
+ if (copyIsArray) {
+ copyIsArray = false
+ clone = src && Array.isArray(src) ? src : []
+
+ } else {
+ clone = src && avalon.isPlainObject(src) ? src : {}
+ }
+
+ target[name] = avalon.mix(deep, clone, copy)
+ } else if (copy !== void 0) {
+ target[name] = copy
+ }
+ }
+ }
+ }
+ return target
+ }
+
+ function _number(a, len) { //用于模拟slice, splice的效果
+ a = Math.floor(a) || 0
+ return a < 0 ? Math.max(len + a, 0) : Math.min(a, len);
+ }
+
+ avalon.mix({
+ rword: rword,
+ subscribers: subscribers,
+ version: 1.43,
+ ui: {},
+ log: log,
+ slice: function (nodes, start, end) {
+ return aslice.call(nodes, start, end)
+ },
+ noop: noop,
+ /*如果ä¸ç”¨Error对象å°è£…一下,str在控制å°ä¸‹å¯èƒ½ä¼šä¹±ç */
+ error: function (str, e) {
+ throw new (e || Error)(str)// jshint ignore:line
+ },
+ /*将一个以空格或逗å·éš”开的字符串或数组,转æ¢æˆä¸€ä¸ªé”®å€¼éƒ½ä¸º1的对象*/
+ oneObject: oneObject,
+ /* avalon.range(10)
+ => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
+ avalon.range(1, 11)
+ => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
+ avalon.range(0, 30, 5)
+ => [0, 5, 10, 15, 20, 25]
+ avalon.range(0, -10, -1)
+ => [0, -1, -2, -3, -4, -5, -6, -7, -8, -9]
+ avalon.range(0)
+ => []*/
+ range: function (start, end, step) { // 用于生æˆæ•´æ•°æ•°ç»„
+ step || (step = 1)
+ if (end == null) {
+ end = start || 0
+ start = 0
+ }
+ var index = -1,
+ length = Math.max(0, Math.ceil((end - start) / step)),
+ result = new Array(length)
+ while (++index < length) {
+ result[index] = start
+ start += step
+ }
+ return result
+ },
+ eventHooks: {},
+ /*绑定事件*/
+ bind: function (el, type, fn, phase) {
+ var hooks = avalon.eventHooks
+ var hook = hooks[type]
+ if (typeof hook === "object") {
+ type = hook.type
+ if (hook.deel) {
+ fn = hook.deel(el, type, fn, phase)
+ }
+ }
+ if (!fn.unbind)
+ el.addEventListener(type, fn, !!phase)
+ return fn
+ },
+ /*å¸è½½äº‹ä»¶*/
+ unbind: function (el, type, fn, phase) {
+ var hooks = avalon.eventHooks
+ var hook = hooks[type]
+ var callback = fn || noop
+ if (typeof hook === "object") {
+ type = hook.type
+ if (hook.deel) {
+ fn = hook.deel(el, type, fn, false)
+ }
+ }
+ el.removeEventListener(type, callback, !!phase)
+ },
+ /*读写删除元素节点的样å¼*/
+ css: function (node, name, value) {
+ if (node instanceof avalon) {
+ node = node[0]
+ }
+ var prop = /[_-]/.test(name) ? camelize(name) : name, fn
+ name = avalon.cssName(prop) || prop
+ if (value === void 0 || typeof value === "boolean") { //获å–æ ·å¼
+ fn = cssHooks[prop + ":get"] || cssHooks["@:get"]
+ if (name === "background") {
+ name = "backgroundColor"
+ }
+ var val = fn(node, name)
+ return value === true ? parseFloat(val) || 0 : val
+ } else if (value === "") { //请除样å¼
+ node.style[name] = ""
+ } else { //设置样å¼
+ if (value == null || value !== value) {
+ return
+ }
+ if (isFinite(value) && !avalon.cssNumber[prop]) {
+ value += "px"
+ }
+ fn = cssHooks[prop + ":set"] || cssHooks["@:set"]
+ fn(node, name, value)
+ }
+ },
+ /*é历数组与对象,回调的第一个å‚数为索引或键å,第二个或元素或键值*/
+ each: function (obj, fn) {
+ if (obj) { //排除null, undefined
+ var i = 0
+ if (isArrayLike(obj)) {
+ for (var n = obj.length; i < n; i++) {
+ if (fn(i, obj[i]) === false)
+ break
+ }
+ } else {
+ for (i in obj) {
+ if (obj.hasOwnProperty(i) && fn(i, obj[i]) === false) {
+ break
+ }
+ }
+ }
+ }
+ },
+ //收集元素的data-{{prefix}}-*属性,并转æ¢ä¸ºå¯¹è±¡
+ getWidgetData: function (elem, prefix) {
+ var raw = avalon(elem).data()
+ var result = {}
+ for (var i in raw) {
+ if (i.indexOf(prefix) === 0) {
+ result[i.replace(prefix, "").replace(/\w/, function (a) {
+ return a.toLowerCase()
+ })] = raw[i]
+ }
+ }
+ return result
+ },
+ Array: {
+ /*åªæœ‰å½“å‰æ•°ç»„ä¸å­˜åœ¨æ­¤å…ƒç´ æ—¶åªæ·»åŠ å®ƒ*/
+ ensure: function (target, item) {
+ if (target.indexOf(item) === -1) {
+ return target.push(item)
+ }
+ },
+ /*移除数组中指定ä½ç½®çš„元素,返回布尔表示æˆåŠŸä¸Žå¦*/
+ removeAt: function (target, index) {
+ return !!target.splice(index, 1).length
+ },
+ /*移除数组中第一个匹é…ä¼ å‚的那个元素,返回布尔表示æˆåŠŸä¸Žå¦*/
+ remove: function (target, item) {
+ var index = target.indexOf(item)
+ if (~index)
+ return avalon.Array.removeAt(target, index)
+ return false
+ }
+ }
+ })
+
+ var bindingHandlers = avalon.bindingHandlers = {}
+ var bindingExecutors = avalon.bindingExecutors = {}
+
+ /*判定是å¦ç±»æ•°ç»„,如节点集åˆï¼Œçº¯æ•°ç»„,arguments与拥有éžè´Ÿæ•´æ•°çš„length属性的纯JS对象*/
+ function isArrayLike(obj) {
+ if (obj && typeof obj === "object") {
+ var n = obj.length,
+ str = serialize.call(obj)
+ if (/(Array|List|Collection|Map|Arguments)\]$/.test(str)) {
+ return true
+ } else if (str === "[object Object]" && n === (n >>> 0)) {
+ return true //由于ecma262v5能修改对象属性的enumerable,因此ä¸èƒ½ç”¨propertyIsEnumerableæ¥åˆ¤å®šäº†
+ }
+ }
+ return false
+ }
+
+
+// https://github.com/rsms/js-lru
+ var Cache = new function () {// jshint ignore:line
+ function LRU(maxLength) {
+ this.size = 0
+ this.limit = maxLength
+ this.head = this.tail = void 0
+ this._keymap = {}
+ }
+
+ var p = LRU.prototype
+
+ p.put = function (key, value) {
+ var entry = {
+ key: key,
+ value: value
+ }
+ this._keymap[key] = entry
+ if (this.tail) {
+ this.tail.newer = entry
+ entry.older = this.tail
+ } else {
+ this.head = entry
+ }
+ this.tail = entry
+ if (this.size === this.limit) {
+ this.shift()
+ } else {
+ this.size++
+ }
+ return value
+ }
+
+ p.shift = function () {
+ var entry = this.head
+ if (entry) {
+ this.head = this.head.newer
+ this.head.older =
+ entry.newer =
+ entry.older =
+ this._keymap[entry.key] = void 0
+ }
+ }
+ p.get = function (key) {
+ var entry = this._keymap[key]
+ if (entry === void 0)
+ return
+ if (entry === this.tail) {
+ return entry.value
+ }
+ // HEAD--------------TAIL
+ // <.older .newer>
+ // <--- add direction --
+ // A B C <D> E
+ if (entry.newer) {
+ if (entry === this.head) {
+ this.head = entry.newer
+ }
+ entry.newer.older = entry.older // C <-- E.
+ }
+ if (entry.older) {
+ entry.older.newer = entry.newer // C. --> E
+ }
+ entry.newer = void 0 // D --x
+ entry.older = this.tail // D. --> E
+ if (this.tail) {
+ this.tail.newer = entry // E. <-- D
+ }
+ this.tail = entry
+ return entry.value
+ }
+ return LRU
+ }// jshint ignore:line
+
+ /*********************************************************************
+ * DOM åº•å±‚è¡¥ä¸ *
+ **********************************************************************/
+//safari5+是把contains方法放在Element.prototype上而ä¸æ˜¯Node.prototype
+ if (!DOC.contains) {
+ Node.prototype.contains = function (arg) {
+ return !!(this.compareDocumentPosition(arg) & 16)
+ }
+ }
+ avalon.contains = function (root, el) {
+ try {
+ while ((el = el.parentNode))
+ if (el === root)
+ return true
+ return false
+ } catch (e) {
+ return false
+ }
+ }
+
+ if (window.SVGElement) {
+ var svgns = "http://www.w3.org/2000/svg"
+ var svg = DOC.createElementNS(svgns, "svg")
+ svg.innerHTML = '<circle cx="50" cy="50" r="40" fill="red" />'
+ if (!rsvg.test(svg.firstChild)) {// #409
+ /* jshint ignore:start */
+ function enumerateNode(node, targetNode) {
+ if (node && node.childNodes) {
+ var nodes = node.childNodes
+ for (var i = 0, el; el = nodes[i++];) {
+ if (el.tagName) {
+ var svg = DOC.createElementNS(svgns,
+ el.tagName.toLowerCase())
+ // copy attrs
+ ap.forEach.call(el.attributes, function (attr) {
+ svg.setAttribute(attr.name, attr.value)
+ })
+ // 递归处ç†å­èŠ‚点
+ enumerateNode(el, svg)
+ targetNode.appendChild(svg)
+ }
+ }
+ }
+ }
+
+ /* jshint ignore:end */
+ Object.defineProperties(SVGElement.prototype, {
+ "outerHTML": {//IE9-11,firefoxä¸æ”¯æŒSVG元素的innerHTML,outerHTML属性
+ enumerable: true,
+ configurable: true,
+ get: function () {
+ return new XMLSerializer().serializeToString(this)
+ },
+ set: function (html) {
+ var tagName = this.tagName.toLowerCase(),
+ par = this.parentNode,
+ frag = avalon.parseHTML(html)
+ // æ“作的svg,直接æ’å…¥
+ if (tagName === "svg") {
+ par.insertBefore(frag, this)
+ // svg节点的å­èŠ‚点类似
+ } else {
+ var newFrag = DOC.createDocumentFragment()
+ enumerateNode(frag, newFrag)
+ par.insertBefore(newFrag, this)
+ }
+ par.removeChild(this)
+ }
+ },
+ "innerHTML": {
+ enumerable: true,
+ configurable: true,
+ get: function () {
+ var s = this.outerHTML
+ var ropen = new RegExp("<" + this.nodeName + '\\b(?:(["\'])[^"]*?(\\1)|[^>])*>', "i")
+ var rclose = new RegExp("<\/" + this.nodeName + ">$", "i")
+ return s.replace(ropen, "").replace(rclose, "")
+ },
+ set: function (html) {
+ if (avalon.clearHTML) {
+ avalon.clearHTML(this)
+ var frag = avalon.parseHTML(html)
+ enumerateNode(frag, this)
+ }
+ }
+ }
+ })
+ }
+ }
+//========================= event binding ====================
+ var eventHooks = avalon.eventHooks
+//针对firefox, chrome修正mouseenter, mouseleave(chrome30+)
+ if (!("onmouseenter" in root)) {
+ avalon.each({
+ mouseenter: "mouseover",
+ mouseleave: "mouseout"
+ }, function (origType, fixType) {
+ eventHooks[origType] = {
+ type: fixType,
+ deel: function (elem, _, fn) {
+ return function (e) {
+ var t = e.relatedTarget
+ if (!t || (t !== elem && !(elem.compareDocumentPosition(t) & 16))) {
+ delete e.type
+ e.type = origType
+ return fn.call(elem, e)
+ }
+ }
+ }
+ }
+ })
+ }
+//针对IE9+, w3c修正animationend
+ avalon.each({
+ AnimationEvent: "animationend",
+ WebKitAnimationEvent: "webkitAnimationEnd"
+ }, function (construct, fixType) {
+ if (window[construct] && !eventHooks.animationend) {
+ eventHooks.animationend = {
+ type: fixType
+ }
+ }
+ })
+
+ if (DOC.onmousewheel === void 0) {
+ /* IE6-11 chrome mousewheel wheelDetla 下 -120 上 120
+ firefox DOMMouseScroll detail 下3 上-3
+ firefox wheel detlaY 下3 上-3
+ IE9-11 wheel deltaY 下40 上-40
+ chrome wheel deltaY 下100 上-100 */
+ eventHooks.mousewheel = {
+ type: "wheel",
+ deel: function (elem, _, fn) {
+ return function (e) {
+ e.wheelDeltaY = e.wheelDelta = e.deltaY > 0 ? -120 : 120
+ e.wheelDeltaX = 0
+ Object.defineProperty(e, "type", {
+ value: "mousewheel"
+ })
+ fn.call(elem, e)
+ }
+ }
+ }
+ }
+
+ /*********************************************************************
+ * é…置系统 *
+ **********************************************************************/
+
+ function kernel(settings) {
+ for (var p in settings) {
+ if (!ohasOwn.call(settings, p))
+ continue
+ var val = settings[p]
+ if (typeof kernel.plugins[p] === "function") {
+ kernel.plugins[p](val)
+ } else if (typeof kernel[p] === "object") {
+ avalon.mix(kernel[p], val)
+ } else {
+ kernel[p] = val
+ }
+ }
+ return this
+ }
+
+ var openTag, closeTag, rexpr, rexprg, rbind, rregexp = /[-.*+?^${}()|[\]\/\\]/g
+
+ function escapeRegExp(target) {
+ //http://stevenlevithan.com/regex/xregexp/
+ //将字符串安全格å¼åŒ–为正则表达å¼çš„æºç 
+ return (target + "").replace(rregexp, "\\$&")
+ }
+
+ var plugins = {
+ loader: function (builtin) {
+ var flag = innerRequire && builtin
+ window.require = flag ? innerRequire : otherRequire
+ window.define = flag ? innerRequire.define : otherDefine
+ },
+ interpolate: function (array) {
+ openTag = array[0]
+ closeTag = array[1]
+ if (openTag === closeTag) {
+ throw new SyntaxError("openTag!==closeTag")
+ } else if (array + "" === "<!--,-->") {
+ kernel.commentInterpolate = true
+ } else {
+ var test = openTag + "test" + closeTag
+ cinerator.innerHTML = test
+ if (cinerator.innerHTML !== test && cinerator.innerHTML.indexOf("&lt;") > -1) {
+ throw new SyntaxError("此定界符ä¸åˆæ³•")
+ }
+ cinerator.innerHTML = ""
+ }
+ var o = escapeRegExp(openTag),
+ c = escapeRegExp(closeTag)
+ rexpr = new RegExp(o + "(.*?)" + c)
+ rexprg = new RegExp(o + "(.*?)" + c, "g")
+ rbind = new RegExp(o + ".*?" + c + "|\\sms-")
+ }
+ }
+
+ kernel.debug = true
+ kernel.plugins = plugins
+ kernel.plugins['interpolate'](["{{", "}}"])
+ kernel.paths = {}
+ kernel.shim = {}
+ kernel.maxRepeatSize = 100
+ avalon.config = kernel
+ var ravalon = /(\w+)\[(avalonctrl)="(\S+)"\]/
+ var findNodes = function (str) {
+ return DOC.querySelectorAll(str)
+ }
+ /*********************************************************************
+ * 事件总线 *
+ **********************************************************************/
+ var EventBus = {
+ $watch: function (type, callback) {
+ if (typeof callback === "function") {
+ var callbacks = this.$events[type]
+ if (callbacks) {
+ callbacks.push(callback)
+ } else {
+ this.$events[type] = [callback]
+ }
+ } else { //é‡æ–°å¼€å§‹ç›‘å¬æ­¤VM的第一é‡ç®€å•å±žæ€§çš„å˜åŠ¨
+ this.$events = this.$watch.backup
+ }
+ return this
+ },
+ $unwatch: function (type, callback) {
+ var n = arguments.length
+ if (n === 0) { //让此VM的所有$watch回调无效化
+ this.$watch.backup = this.$events
+ this.$events = {}
+ } else if (n === 1) {
+ this.$events[type] = []
+ } else {
+ var callbacks = this.$events[type] || []
+ var i = callbacks.length
+ while (~--i < 0) {
+ if (callbacks[i] === callback) {
+ return callbacks.splice(i, 1)
+ }
+ }
+ }
+ return this
+ },
+ $fire: function (type) {
+ var special, i, v, callback
+ if (/^(\w+)!(\S+)$/.test(type)) {
+ special = RegExp.$1
+ type = RegExp.$2
+ }
+ var events = this.$events
+ if (!events)
+ return
+ var args = aslice.call(arguments, 1)
+ var detail = [type].concat(args)
+ if (special === "all") {
+ for (i in avalon.vmodels) {
+ v = avalon.vmodels[i]
+ if (v !== this) {
+ v.$fire.apply(v, detail)
+ }
+ }
+ } else if (special === "up" || special === "down") {
+ var elements = events.expr ? findNodes(events.expr) : []
+ if (elements.length === 0)
+ return
+ for (i in avalon.vmodels) {
+ v = avalon.vmodels[i]
+ if (v !== this) {
+ if (v.$events.expr) {
+ var eventNodes = findNodes(v.$events.expr)
+ if (eventNodes.length === 0) {
+ continue
+ }
+ //循环两个vmodel中的节点,查找匹é…(å‘上匹é…或者å‘下匹é…)的节点并设置标识
+ /* jshint ignore:start */
+ Array.prototype.forEach.call(eventNodes, function (node) {
+ Array.prototype.forEach.call(elements, function (element) {
+ var ok = special === "down" ? element.contains(node) : //å‘下æ•èŽ·
+ node.contains(element) //å‘上冒泡
+ if (ok) {
+ node._avalon = v //符åˆæ¡ä»¶çš„加一个标识
+ }
+ });
+ })
+ /* jshint ignore:end */
+ }
+ }
+ }
+ var nodes = DOC.getElementsByTagName("*") //实现节点排åº
+ var alls = []
+ Array.prototype.forEach.call(nodes, function (el) {
+ if (el._avalon) {
+ alls.push(el._avalon)
+ el._avalon = ""
+ el.removeAttribute("_avalon")
+ }
+ })
+ if (special === "up") {
+ alls.reverse()
+ }
+ for (i = 0; callback = alls[i++];) {
+ if (callback.$fire.apply(callback, detail) === false) {
+ break
+ }
+ }
+ } else {
+ var callbacks = events[type] || []
+ var all = events.$all || []
+ for (i = 0; callback = callbacks[i++];) {
+ if (isFunction(callback))
+ callback.apply(this, args)
+ }
+ for (i = 0; callback = all[i++];) {
+ if (isFunction(callback))
+ callback.apply(this, arguments)
+ }
+ }
+ }
+ }
+
+ /*********************************************************************
+ * modelFactory *
+ **********************************************************************/
+//avalon最核心的方法的两个方法之一(å¦ä¸€ä¸ªæ˜¯avalon.scan),返回一个ViewModel(VM)
+ var VMODELS = avalon.vmodels = createMap() //所有vmodel都储存在这里
+ avalon.define = function (id, factory) {
+ var $id = id.$id || id
+ if (!$id) {
+ log("warning: vm必须指定$id")
+ }
+ if (VMODELS[$id]) {
+ log("warning: " + $id + " å·²ç»å­˜åœ¨äºŽavalon.vmodels中")
+ }
+ if (typeof id === "object") {
+ var model = modelFactory(id)
+ } else {
+ var scope = {
+ $watch: noop
+ }
+ factory(scope) //得到所有定义
+ model = modelFactory(scope) //å·å¤©æ¢æ—¥ï¼Œå°†scopeæ¢ä¸ºmodel
+ stopRepeatAssign = true
+ factory(model)
+ stopRepeatAssign = false
+ }
+ model.$id = $id
+ return VMODELS[$id] = model
+ }
+
+//一些ä¸éœ€è¦è¢«ç›‘å¬çš„属性
+ var $$skipArray = String("$id,$watch,$unwatch,$fire,$events,$model,$skipArray").match(rword)
+
+ function isObservable(name, value, $skipArray) {
+ if (isFunction(value) || value && value.nodeType) {
+ return false
+ }
+ if ($skipArray.indexOf(name) !== -1) {
+ return false
+ }
+ if ($$skipArray.indexOf(name) !== -1) {
+ return false
+ }
+ var $special = $skipArray.$special
+ if (name && name.charAt(0) === "$" && !$special[name]) {
+ return false
+ }
+ return true
+ }
+
+//ms-with,ms-each, ms-repeat绑定生æˆçš„代ç†å¯¹è±¡å‚¨å­˜æ± 
+ var midway = createMap()
+
+ function getNewValue(accessor, name, value, $vmodel) {
+ switch (accessor.type) {
+ case 0://计算属性
+ var getter = accessor.get
+ var setter = accessor.set
+ if (isFunction(setter)) {
+ var $events = $vmodel.$events
+ var lock = $events[name]
+ $events[name] = [] //清空回调,防止内部冒泡而触å‘多次$fire
+ setter.call($vmodel, value)
+ $events[name] = lock
+ }
+ return getter.call($vmodel) //åŒæ­¥$model
+ case 1://监控属性
+ return value
+ case 2://对象属性(包括数组与哈希)
+ if (value !== $vmodel.$model[name]) {
+ var svmodel = accessor.svmodel = objectFactory($vmodel, name, value, accessor.valueType)
+ value = svmodel.$model //åŒæ­¥$model
+ var fn = midway[svmodel.$id]
+ fn && fn() //åŒæ­¥è§†å›¾
+ }
+ return value
+ }
+ }
+
+ function modelFactory(source, $special, $model) {
+ if (Array.isArray(source)) {
+ var arr = source.concat()
+ source.length = 0
+ var collection = Collection(source)// jshint ignore:line
+ collection.pushArray(arr)
+ return collection
+ }
+ //0 null undefined || Node || VModel
+ if (!source || source.nodeType > 0 || (source.$id && source.$events)) {
+ return source
+ }
+ if (!Array.isArray(source.$skipArray)) {
+ source.$skipArray = []
+ }
+ source.$skipArray.$special = $special || createMap() //强制è¦ç›‘å¬çš„属性
+ var $vmodel = {} //è¦è¿”回的对象, 它在IE6-8下å¯èƒ½è¢«å·é¾™è½¬å‡¤
+ $model = $model || {} //vmodels.$model属性
+ var $events = createMap() //vmodel.$events属性
+ var watchedProperties = createMap() //监控属性
+ var initCallbacks = [] //åˆå§‹åŒ–æ‰æ‰§è¡Œçš„函数
+ for (var i in source) {
+ (function (name, val) {
+ $model[name] = val
+ if (!isObservable(name, val, source.$skipArray)) {
+ return //过滤所有éžç›‘控属性
+ }
+ //总共产生三ç§accessor
+ $events[name] = []
+ var valueType = avalon.type(val)
+ var accessor = function (newValue) {
+ var name = accessor._name
+ var $vmodel = this
+ var $model = $vmodel.$model
+ var oldValue = $model[name]
+ var $events = $vmodel.$events
+
+ if (arguments.length) {
+ if (stopRepeatAssign) {
+ return
+ }
+ //计算属性与对象属性需è¦é‡æ–°è®¡ç®—newValue
+ if (accessor.type !== 1) {
+ newValue = getNewValue(accessor, name, newValue, $vmodel)
+ if (!accessor.type)
+ return
+ }
+ if (!isEqual(oldValue, newValue)) {
+ $model[name] = newValue
+ notifySubscribers($events[name]) //åŒæ­¥è§†å›¾
+ safeFire($vmodel, name, newValue, oldValue) //触å‘$watch回调
+ }
+ } else {
+ if (accessor.type === 0) { //type 0 计算属性 1 监控属性 2 对象属性
+ //计算属性ä¸éœ€è¦æ”¶é›†è§†å›¾åˆ·æ–°å‡½æ•°,都是由其他监控属性代劳
+ newValue = accessor.get.call($vmodel)
+ if (oldValue !== newValue) {
+ $model[name] = newValue
+ //这里ä¸ç”¨åŒæ­¥è§†å›¾
+ safeFire($vmodel, name, newValue, oldValue) //触å‘$watch回调
+ }
+ return newValue
+ } else {
+ collectSubscribers($events[name]) //收集视图函数
+ return accessor.svmodel || oldValue
+ }
+ }
+ }
+ //总共产生三ç§accessor
+ if (valueType === "object" && isFunction(val.get) && Object.keys(val).length <= 2) {
+ //第1ç§ä¸ºè®¡ç®—属性, å› å˜é‡ï¼Œé€šè¿‡å…¶ä»–监控属性触å‘其改å˜
+ accessor.set = val.set
+ accessor.get = val.get
+ accessor.type = 0
+ initCallbacks.push(function () {
+ var data = {
+ evaluator: function () {
+ data.type = Math.random(),
+ data.element = null
+ $model[name] = accessor.get.call($vmodel)
+ },
+ element: head,
+ type: Math.random(),
+ handler: noop,
+ args: []
+ }
+ Registry[expose] = data
+ accessor.call($vmodel)
+ delete Registry[expose]
+ })
+ } else if (rcomplexType.test(valueType)) {
+ //第2ç§ä¸ºå¯¹è±¡å±žæ€§ï¼Œäº§ç”Ÿå­VM与监控数组
+ accessor.type = 2
+ accessor.valueType = valueType
+ initCallbacks.push(function () {
+ var svmodel = modelFactory(val, 0, $model[name])
+ accessor.svmodel = svmodel
+ svmodel.$events[subscribers] = $events[name]
+ })
+ } else {
+ accessor.type = 1
+ //第3ç§ä¸ºç›‘控属性,对应简å•çš„æ•°æ®ç±»åž‹ï¼Œè‡ªå˜é‡
+ }
+ accessor._name = name
+ watchedProperties[name] = accessor
+ })(i, source[i])// jshint ignore:line
+ }
+
+ $$skipArray.forEach(function (name) {
+ delete source[name]
+ delete $model[name] //这些特殊属性ä¸åº”该在$model中出现
+ })
+
+ $vmodel = Object.defineProperties($vmodel, descriptorFactory(watchedProperties), source) //生æˆä¸€ä¸ªç©ºçš„ViewModel
+ for (var name in source) {
+ if (!watchedProperties[name]) {
+ $vmodel[name] = source[name]
+ }
+ }
+ //添加$id, $model, $events, $watch, $unwatch, $fire
+ $vmodel.$id = generateID()
+ $vmodel.$model = $model
+ $vmodel.$events = $events
+ for (i in EventBus) {
+ $vmodel[i] = EventBus[i]
+ }
+
+ Object.defineProperty($vmodel, "hasOwnProperty", {
+ value: function (name) {
+ return name in this.$model
+ },
+ writable: false,
+ enumerable: false,
+ configurable: true
+ })
+
+ initCallbacks.forEach(function (cb) { //收集ä¾èµ–
+ cb()
+ })
+ return $vmodel
+ }
+
+//比较两个值是å¦ç›¸ç­‰
+ var isEqual = Object.is || function (v1, v2) {
+ if (v1 === 0 && v2 === 0) {
+ return 1 / v1 === 1 / v2
+ } else if (v1 !== v1) {
+ return v2 !== v2
+ } else {
+ return v1 === v2
+ }
+ }
+
+ function safeFire(a, b, c, d) {
+ if (a.$events) {
+ EventBus.$fire.call(a, b, c, d)
+ }
+ }
+
+ var descriptorFactory = function (obj) {
+ var descriptors = createMap()
+ for (var i in obj) {
+ descriptors[i] = {
+ get: obj[i],
+ set: obj[i],
+ enumerable: true,
+ configurable: true
+ }
+ }
+ return descriptors
+ }
+
+//应用于第2ç§accessor
+ function objectFactory(parent, name, value, valueType) {
+ //a为原æ¥çš„VM, b为新数组或新对象
+ var son = parent[name]
+ if (valueType === "array") {
+ if (!Array.isArray(value) || son === value) {
+ return son //fix https://github.com/RubyLouvre/avalon/issues/261
+ }
+ son._.$unwatch()
+ son.clear()
+ son._.$watch()
+ son.pushArray(value.concat())
+ return son
+ } else {
+ var iterators = parent.$events[name]
+ var ret = modelFactory(value)
+ ret.$events[subscribers] = iterators
+ midway[ret.$id] = function (data) {
+ while (data = iterators.shift()) {
+ (function (el) {
+ avalon.nextTick(function () {
+ var type = el.type
+ if (type && bindingHandlers[type]) { //#753
+ el.rollback && el.rollback() //还原 ms-with ms-on
+ bindingHandlers[type](el, el.vmodels)
+ }
+ })
+ })(data)// jshint ignore:line
+ }
+ delete midway[ret.$id]
+ }
+ return ret
+ }
+ }
+
+ /*********************************************************************
+ * 监控数组(与ms-each, ms-repeaté…åˆä½¿ç”¨ï¼‰ *
+ **********************************************************************/
+
+ function Collection(model) {
+ var array = []
+ array.$id = generateID()
+ array.$model = model //æ•°æ®æ¨¡åž‹
+ array.$events = {}
+ array.$events[subscribers] = []
+ array._ = modelFactory({
+ length: model.length
+ })
+ array._.$watch("length", function (a, b) {
+ array.$fire("length", a, b)
+ })
+ for (var i in EventBus) {
+ array[i] = EventBus[i]
+ }
+ array.$map = {
+ el: 1
+ }
+ array.$proxy = []
+ avalon.mix(array, CollectionPrototype)
+ return array
+ }
+
+ function mutateArray(method, pos, n, index, method2, pos2, n2) {
+ var oldLen = this.length, loop = 2
+ while (--loop) {
+ switch (method) {
+ case "add":
+ /* jshint ignore:start */
+ var m = pos + n
+ var array = this.$model.slice(pos, m).map(function (el) {
+ if (rcomplexType.test(avalon.type(el))) {//转æ¢ä¸ºVM
+ return el.$id ? el : modelFactory(el, 0, el)
+ } else {
+ return el
+ }
+ })
+ /* jshint ignore:end */
+ for (var i = pos; i < m; i++) {//生æˆä»£ç†VM
+ var proxy = eachProxyAgent(i, this)
+ this.$proxy.splice(i, 0, proxy)
+ }
+ _splice.apply(this, [pos, 0].concat(array))
+ this._fire("add", pos, n)
+ break
+ case "del":
+ var ret = this._splice(pos, n)
+ var removed = this.$proxy.splice(pos, n) //回收代ç†VM
+ recycleProxies(removed, "each")
+ this._fire("del", pos, n)
+ break
+ }
+ if (method2) {
+ method = method2
+ pos = pos2
+ n = n2
+ loop = 2
+ method2 = 0
+ }
+ }
+ resetIndex(this.$proxy, index)
+ if (this.length !== oldLen) {
+ this._.length = this.length
+ }
+ return ret
+ }
+
+ var _splice = ap.splice
+ var CollectionPrototype = {
+ _splice: _splice,
+ _fire: function (method, a, b) {
+ notifySubscribers(this.$events[subscribers], method, a, b)
+ },
+ size: function () { //å–得数组长度,这个函数å¯ä»¥åŒæ­¥è§†å›¾ï¼Œlengthä¸èƒ½
+ return this._.length
+ },
+ pushArray: function (array) {
+ var m = array.length, n = this.length
+ if (m) {
+ ap.push.apply(this.$model, array)
+ mutateArray.call(this, "add", n, m, Math.max(0, n - 1))
+ }
+ return m + n
+ },
+ push: function () {
+ //http://jsperf.com/closure-with-arguments
+ var array = []
+ var i, n = arguments.length
+ for (i = 0; i < n; i++) {
+ array[i] = arguments[i]
+ }
+ return this.pushArray(array)
+ },
+ unshift: function () {
+ var m = arguments.length, n = this.length
+ if (m) {
+ ap.unshift.apply(this.$model, arguments)
+ mutateArray.call(this, "add", 0, m, 0)
+ }
+ return m + n //IE67çš„unshiftä¸ä¼šè¿”回长度
+ },
+ shift: function () {
+ if (this.length) {
+ var el = this.$model.shift()
+ mutateArray.call(this, "del", 0, 1, 0)
+ return el //返回被移除的元素
+ }
+ },
+ pop: function () {
+ var n = this.length
+ if (n) {
+ var el = this.$model.pop()
+ mutateArray.call(this, "del", n - 1, 1, Math.max(0, n - 2))
+ return el //返回被移除的元素
+ }
+ },
+ splice: function (start) {
+ var m = arguments.length, args = [], change
+ var removed = _splice.apply(this.$model, arguments)
+ if (removed.length) { //如果用户删掉了元素
+ args.push("del", start, removed.length, 0)
+ change = true
+ }
+ if (m > 2) { //如果用户添加了元素
+ if (change) {
+ args.splice(3, 1, 0, "add", start, m - 2)
+ } else {
+ args.push("add", start, m - 2, 0)
+ }
+ change = true
+ }
+ if (change) { //返回被移除的元素
+ return mutateArray.apply(this, args)
+ } else {
+ return []
+ }
+ },
+ contains: function (el) { //判定是å¦åŒ…å«
+ return this.indexOf(el) !== -1
+ },
+ remove: function (el) { //移除第一个等于给定值的元素
+ return this.removeAt(this.indexOf(el))
+ },
+ removeAt: function (index) { //移除指定索引上的元素
+ if (index >= 0) {
+ this.$model.splice(index, 1)
+ return mutateArray.call(this, "del", index, 1, 0)
+ }
+ return []
+ },
+ clear: function () {
+ recycleProxies(this.$proxy, "each")
+ this.$model.length = this.$proxy.length = this.length = this._.length = 0 //清空数组
+ this._fire("clear", 0)
+ return this
+ },
+ removeAll: function (all) { //移除N个元素
+ if (Array.isArray(all)) {
+ all.forEach(function (el) {
+ this.remove(el)
+ }, this)
+ } else if (typeof all === "function") {
+ for (var i = this.length - 1; i >= 0; i--) {
+ var el = this[i]
+ if (all(el, i)) {
+ this.removeAt(i)
+ }
+ }
+ } else {
+ this.clear()
+ }
+ },
+ ensure: function (el) {
+ if (!this.contains(el)) { //åªæœ‰ä¸å­˜åœ¨æ‰push
+ this.push(el)
+ }
+ return this
+ },
+ set: function (index, val) {
+ if (index >= 0) {
+ var valueType = avalon.type(val)
+ if (val && val.$model) {
+ val = val.$model
+ }
+ var target = this[index]
+ if (valueType === "object") {
+ for (var i in val) {
+ if (target.hasOwnProperty(i)) {
+ target[i] = val[i]
+ }
+ }
+ } else if (valueType === "array") {
+ target.clear().push.apply(target, val)
+ } else if (target !== val) {
+ this[index] = val
+ this.$model[index] = val
+ var proxy = this.$proxy[index]
+ if (proxy) {
+ notifySubscribers(proxy.$events.el)
+ }
+ // this._fire("set", index, val)
+ }
+ }
+ return this
+ }
+ }
+//相当于原æ¥bindingExecutors.repeat çš„index分支
+ function resetIndex(array, pos) {
+ var last = array.length - 1
+ for (var el; el = array[pos]; pos++) {
+ el.$index = pos
+ el.$first = pos === 0
+ el.$last = pos === last
+ }
+ }
+
+ function sortByIndex(array, indexes) {
+ var map = {};
+ for (var i = 0, n = indexes.length; i < n; i++) {
+ map[i] = array[i] // preserve
+ var j = indexes[i]
+ if (j in map) {
+ array[i] = map[j]
+ delete map[j]
+ } else {
+ array[i] = array[j]
+ }
+ }
+ }
+
+ "sort,reverse".replace(rword, function (method) {
+ CollectionPrototype[method] = function () {
+ var newArray = this.$model//这是è¦æŽ’åºçš„新数组
+ var oldArray = newArray.concat() //ä¿æŒåŽŸæ¥çŠ¶æ€çš„旧数组
+ var mask = Math.random()
+ var indexes = []
+ var hasSort
+ ap[method].apply(newArray, arguments) //排åº
+ for (var i = 0, n = oldArray.length; i < n; i++) {
+ var neo = newArray[i]
+ var old = oldArray[i]
+ if (isEqual(neo, old)) {
+ indexes.push(i)
+ } else {
+ var index = oldArray.indexOf(neo)
+ indexes.push(index)//得到新数组的æ¯ä¸ªå…ƒç´ åœ¨æ—§æ•°ç»„对应的ä½ç½®
+ oldArray[index] = mask //å±è”½å·²ç»æ‰¾è¿‡çš„元素
+ hasSort = true
+ }
+ }
+ if (hasSort) {
+ sortByIndex(this, indexes)
+ sortByIndex(this.$proxy, indexes)
+ this._fire("move", indexes)
+ resetIndex(this.$proxy, 0)
+ }
+ return this
+ }
+ })
+
+ /*********************************************************************
+ * ä¾èµ–调度系统 *
+ **********************************************************************/
+ var ronduplex = /^(duplex|on)$/
+
+ avalon.injectBinding = function (data) {
+ Registry[expose] = data //暴光此函数,方便collectSubscribers收集
+ avalon.openComputedCollect = true
+ var fn = data.evaluator
+ if (fn) { //如果是求值函数
+ try {
+ var c = ronduplex.test(data.type) ? data : fn.apply(0, data.args)
+ if (!data.noRefresh)
+ data.handler(c, data.element, data)
+ } catch (e) {
+ //log("warning:exception throwed in [avalon.injectBinding] " + e)
+ delete data.evaluator
+ var node = data.element
+ if (node.nodeType === 3) {
+ var parent = node.parentNode
+ if (kernel.commentInterpolate) {
+ parent.replaceChild(DOC.createComment(data.value), node)
+ } else {
+ node.data = openTag + data.value + closeTag
+ }
+ }
+ }
+ }
+ avalon.openComputedCollect = false
+ delete Registry[expose]
+ }
+
+ function collectSubscribers(list) { //收集ä¾èµ–于这个访问器的订阅者
+ var data = Registry[expose]
+ if (list && data && avalon.Array.ensure(list, data) && data.element) { //åªæœ‰æ•°ç»„ä¸å­˜åœ¨æ­¤å…ƒç´ æ‰push进去
+ addSubscribers(data, list)
+ }
+ }
+
+
+ function addSubscribers(data, list) {
+ data.$uuid = data.$uuid || generateID()
+ list.$uuid = list.$uuid || generateID()
+ var obj = {
+ data: data,
+ list: list,
+ $$uuid: data.$uuid + list.$uuid
+ }
+ if (!$$subscribers[obj.$$uuid]) {
+ $$subscribers[obj.$$uuid] = 1
+ $$subscribers.push(obj)
+ }
+ }
+
+ function disposeData(data) {
+ data.element = null
+ data.rollback && data.rollback()
+ for (var key in data) {
+ data[key] = null
+ }
+ }
+
+ function isRemove(el) {
+ try {//IE下,如果文本节点脱离DOM树,访问parentNode会报错
+ if (!el.parentNode) {
+ return true
+ }
+ } catch (e) {
+ return true
+ }
+ return el.msRetain ? 0 : (el.nodeType === 1 ? typeof el.sourceIndex === "number" ?
+ el.sourceIndex === 0 : !root.contains(el) : !avalon.contains(root, el))
+ }
+
+ var $$subscribers = avalon.$$subscribers = []
+ var beginTime = new Date()
+ var oldInfo = {}
+
+ function removeSubscribers() {
+ var i = $$subscribers.length
+ var n = i
+ var k = 0
+ var obj
+ var types = []
+ var newInfo = {}
+ var needTest = {}
+ while (obj = $$subscribers[--i]) {
+ var data = obj.data
+ var type = data.type
+ if (newInfo[type]) {
+ newInfo[type]++
+ } else {
+ newInfo[type] = 1
+ types.push(type)
+ }
+ }
+ var diff = false
+ types.forEach(function (type) {
+ if (oldInfo[type] !== newInfo[type]) {
+ needTest[type] = 1
+ diff = true
+ }
+ })
+ i = n
+ //avalon.log("需è¦æ£€æµ‹çš„个数 " + i)
+ if (diff) {
+ //avalon.log("有需è¦ç§»é™¤çš„元素")
+ while (obj = $$subscribers[--i]) {
+ data = obj.data
+ if (data.element === void 0)
+ continue
+ if (needTest[data.type] && isRemove(data.element)) { //如果它没有在DOM树
+ k++
+ $$subscribers.splice(i, 1)
+ delete $$subscribers[obj.$$uuid]
+ avalon.Array.remove(obj.list, data)
+ //log("debug: remove " + data.type)
+ disposeData(data)
+ obj.data = obj.list = null
+ }
+ }
+ }
+ oldInfo = newInfo
+ // avalon.log("å·²ç»ç§»é™¤çš„个数 " + k)
+ beginTime = new Date()
+ }
+
+ function notifySubscribers(list) { //通知ä¾èµ–于这个访问器的订阅者更新自身
+ if (list && list.length) {
+ if (new Date() - beginTime > 444 && typeof list[0] === "object") {
+ removeSubscribers()
+ }
+ var args = aslice.call(arguments, 1)
+ for (var i = list.length, fn; fn = list[--i];) {
+ var el = fn.element
+ if (el && el.parentNode) {
+ if (fn.$repeat) {
+ fn.handler.apply(fn, args) //处ç†ç›‘控数组的方法
+ } else if (fn.type !== "on") { //事件绑定åªèƒ½ç”±ç”¨æˆ·è§¦å‘,ä¸èƒ½ç”±ç¨‹åºè§¦å‘
+ var fun = fn.evaluator || noop
+ fn.handler(fun.apply(0, fn.args || []), el, fn)
+ }
+ }
+ }
+ }
+ }
+
+ /************************************************************************
+ * HTML处ç†(parseHTML, innerHTML, clearHTML) *
+ **************************************************************************/
+//parseHTML的辅助å˜é‡
+ var tagHooks = new function () {// jshint ignore:line
+ avalon.mix(this, {
+ option: DOC.createElement("select"),
+ thead: DOC.createElement("table"),
+ td: DOC.createElement("tr"),
+ area: DOC.createElement("map"),
+ tr: DOC.createElement("tbody"),
+ col: DOC.createElement("colgroup"),
+ legend: DOC.createElement("fieldset"),
+ _default: DOC.createElement("div"),
+ "g": DOC.createElementNS("http://www.w3.org/2000/svg", "svg")
+ })
+ this.optgroup = this.option
+ this.tbody = this.tfoot = this.colgroup = this.caption = this.thead
+ this.th = this.td
+ }// jshint ignore:line
+
+ String("circle,defs,ellipse,image,line,path,polygon,polyline,rect,symbol,text,use").replace(rword, function (tag) {
+ tagHooks[tag] = tagHooks.g //处ç†SVG
+ })
+ var rtagName = /<([\w:]+)/
+ var rxhtml = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig
+ var scriptTypes = oneObject(["", "text/javascript", "text/ecmascript", "application/ecmascript", "application/javascript"])
+ var script = DOC.createElement("script")
+ var rhtml = /<|&#?\w+;/
+ avalon.parseHTML = function (html) {
+ var fragment = hyperspace.cloneNode(false)
+ if (typeof html !== "string") {
+ return fragment
+ }
+ if (!rhtml.test(html)) {
+ fragment.appendChild(DOC.createTextNode(html))
+ return fragment
+ }
+ html = html.replace(rxhtml, "<$1></$2>").trim()
+ var tag = (rtagName.exec(html) || ["", ""])[1].toLowerCase(),
+ //å–得其标签å
+ wrapper = tagHooks[tag] || tagHooks._default,
+ firstChild
+ wrapper.innerHTML = html
+ var els = wrapper.getElementsByTagName("script")
+ if (els.length) { //使用innerHTML生æˆçš„script节点ä¸ä¼šå‘出请求与执行text属性
+ for (var i = 0, el; el = els[i++];) {
+ if (scriptTypes[el.type]) {
+ var neo = script.cloneNode(false) //FFä¸èƒ½çœç•¥å‚æ•°
+ ap.forEach.call(el.attributes, function (attr) {
+ neo.setAttribute(attr.name, attr.value)
+ })// jshint ignore:line
+ neo.text = el.text
+ el.parentNode.replaceChild(neo, el)
+ }
+ }
+ }
+
+ while (firstChild = wrapper.firstChild) { // å°†wrapper上的节点转移到文档碎片上ï¼
+ fragment.appendChild(firstChild)
+ }
+ return fragment
+ }
+
+ avalon.innerHTML = function (node, html) {
+ var a = this.parseHTML(html)
+ this.clearHTML(node).appendChild(a)
+ }
+
+ avalon.clearHTML = function (node) {
+ node.textContent = ""
+ while (node.firstChild) {
+ node.removeChild(node.firstChild)
+ }
+ return node
+ }
+
+ /*********************************************************************
+ * 扫æ系统 *
+ **********************************************************************/
+
+ avalon.scan = function (elem, vmodel) {
+ elem = elem || root
+ var vmodels = vmodel ? [].concat(vmodel) : []
+ scanTag(elem, vmodels)
+ }
+
+//http://www.w3.org/TR/html5/syntax.html#void-elements
+ var stopScan = oneObject("area,base,basefont,br,col,command,embed,hr,img,input,link,meta,param,source,track,wbr,noscript,script,style,textarea".toUpperCase())
+
+ function checkScan(elem, callback, innerHTML) {
+ var id = setTimeout(function () {
+ var currHTML = elem.innerHTML
+ clearTimeout(id)
+ if (currHTML === innerHTML) {
+ callback()
+ } else {
+ checkScan(elem, callback, currHTML)
+ }
+ })
+ }
+
+
+ function createSignalTower(elem, vmodel) {
+ var id = elem.getAttribute("avalonctrl") || vmodel.$id
+ elem.setAttribute("avalonctrl", id)
+ vmodel.$events.expr = elem.tagName + '[avalonctrl="' + id + '"]'
+ }
+
+ var getBindingCallback = function (elem, name, vmodels) {
+ var callback = elem.getAttribute(name)
+ if (callback) {
+ for (var i = 0, vm; vm = vmodels[i++];) {
+ if (vm.hasOwnProperty(callback) && typeof vm[callback] === "function") {
+ return vm[callback]
+ }
+ }
+ }
+ }
+
+ function executeBindings(bindings, vmodels) {
+ for (var i = 0, data; data = bindings[i++];) {
+ data.vmodels = vmodels
+ bindingHandlers[data.type](data, vmodels)
+ if (data.evaluator && data.element && data.element.nodeType === 1) { //移除数æ®ç»‘定,防止被二次解æž
+ //chrome使用removeAttributeNode移除ä¸å­˜åœ¨çš„特性节点时会报错 https://github.com/RubyLouvre/avalon/issues/99
+ data.element.removeAttribute(data.name)
+ }
+ }
+ bindings.length = 0
+ }
+
+//https://github.com/RubyLouvre/avalon/issues/636
+ var mergeTextNodes = IEVersion && window.MutationObserver ? function (elem) {
+ var node = elem.firstChild, text
+ while (node) {
+ var aaa = node.nextSibling
+ if (node.nodeType === 3) {
+ if (text) {
+ text.nodeValue += node.nodeValue
+ elem.removeChild(node)
+ } else {
+ text = node
+ }
+ } else {
+ text = null
+ }
+ node = aaa
+ }
+ } : 0
+
+ var rmsAttr = /ms-(\w+)-?(.*)/
+ var priorityMap = {
+ "if": 10,
+ "repeat": 90,
+ "data": 100,
+ "widget": 110,
+ "each": 1400,
+ "with": 1500,
+ "duplex": 2000,
+ "on": 3000
+ }
+
+ var events = oneObject("animationend,blur,change,input,click,dblclick,focus,keydown,keypress,keyup,mousedown,mouseenter,mouseleave,mousemove,mouseout,mouseover,mouseup,scan,scroll,submit")
+ var obsoleteAttrs = oneObject("value,title,alt,checked,selected,disabled,readonly,enabled")
+
+ function bindingSorter(a, b) {
+ return a.priority - b.priority
+ }
+
+ function scanAttr(elem, vmodels) {
+ //防止setAttribute, removeAttributeæ—¶ attributes自动被åŒæ­¥,导致for循环出错
+ var attributes = elem.hasAttributes() ? avalon.slice(elem.attributes) : []
+ var bindings = [],
+ msData = createMap(),
+ match
+ for (var i = 0, attr; attr = attributes[i++];) {
+ if (attr.specified) {
+ if (match = attr.name.match(rmsAttr)) {
+ //如果是以指定å‰ç¼€å‘½åçš„
+ var type = match[1]
+ var param = match[2] || ""
+ var value = attr.value
+ var name = attr.name
+ msData[name] = value
+ if (events[type]) {
+ param = type
+ type = "on"
+ } else if (obsoleteAttrs[type]) {
+ log("warning!请改用ms-attr-" + type + "代替ms-" + type + "ï¼")
+ if (type === "enabled") {//åƒæŽ‰ms-enabled绑定,用ms-disabled代替
+ log("warning!ms-enabled或ms-attr-enabledå·²ç»è¢«åºŸå¼ƒ")
+ type = "disabled"
+ value = "!(" + value + ")"
+ }
+ param = type
+ type = "attr"
+ elem.removeAttribute(name)
+ name = "ms-attr-" + param
+ elem.setAttribute(name, value)
+ match = [name]
+ msData[name] = value
+ }
+ if (typeof bindingHandlers[type] === "function") {
+ var binding = {
+ type: type,
+ param: param,
+ element: elem,
+ name: match[0],
+ value: value,
+ priority: type in priorityMap ? priorityMap[type] : type.charCodeAt(0) * 10 + (Number(param) || 0)
+ }
+ if (type === "html" || type === "text") {
+ var token = getToken(value)
+ avalon.mix(binding, token)
+ binding.filters = binding.filters.replace(rhasHtml, function () {
+ binding.type = "html"
+ binding.group = 1
+ return ""
+ })// jshint ignore:line
+ }
+ if (name === "ms-if-loop") {
+ binding.priority += 100
+ }
+ if (vmodels.length) {
+ bindings.push(binding)
+ if (type === "widget") {
+ elem.msData = elem.msData || msData
+ }
+ }
+ }
+ }
+ }
+ }
+ var control = elem.type
+ if (control && msData["ms-duplex"]) {
+ if (msData["ms-attr-checked"] && /radio|checkbox/.test(control)) {
+ log("warning!" + control + "控件ä¸èƒ½åŒæ—¶å®šä¹‰ms-attr-checked与ms-duplex")
+ }
+ if (msData["ms-attr-value"] && /text|password/.test(control)) {
+ log("warning!" + control + "控件ä¸èƒ½åŒæ—¶å®šä¹‰ms-attr-value与ms-duplex")
+ }
+ }
+ bindings.sort(bindingSorter)
+ var scanNode = true
+ for (i = 0; binding = bindings[i]; i++) {
+ type = binding.type
+ if (rnoscanAttrBinding.test(type)) {
+ return executeBindings(bindings.slice(0, i + 1), vmodels)
+ } else if (scanNode) {
+ scanNode = !rnoscanNodeBinding.test(type)
+ }
+ }
+ executeBindings(bindings, vmodels)
+ if (scanNode && !stopScan[elem.tagName] && rbind.test(elem.innerHTML + elem.textContent)) {
+ mergeTextNodes && mergeTextNodes(elem)
+ scanNodeList(elem, vmodels) //扫æå­å­™å…ƒç´ 
+ }
+ }
+
+ var rnoscanAttrBinding = /^if|widget|repeat$/
+ var rnoscanNodeBinding = /^each|with|html|include$/
+
+ function scanNodeList(parent, vmodels) {
+ var node = parent.firstChild
+ while (node) {
+ var nextNode = node.nextSibling
+ scanNode(node, node.nodeType, vmodels)
+ node = nextNode
+ }
+ }
+
+ function scanNodeArray(nodes, vmodels) {
+ for (var i = 0, node; node = nodes[i++];) {
+ scanNode(node, node.nodeType, vmodels)
+ }
+ }
+
+ function scanNode(node, nodeType, vmodels) {
+ if (nodeType === 1) {
+ scanTag(node, vmodels) //扫æ元素节点
+ if (node.msCallback) {
+ node.msCallback()
+ node.msCallback = void 0
+ }
+ } else if (nodeType === 3 && rexpr.test(node.data)) {
+ scanText(node, vmodels) //扫æ文本节点
+ } else if (kernel.commentInterpolate && nodeType === 8 && !rexpr.test(node.nodeValue)) {
+ scanText(node, vmodels) //扫æ注释节点
+ }
+ }
+
+ function scanTag(elem, vmodels, node) {
+ //扫æé¡ºåº ms-skip(0) --> ms-important(1) --> ms-controller(2) --> ms-if(10) --> ms-repeat(100)
+ //--> ms-if-loop(110) --> ms-attr(970) ...--> ms-each(1400)-->ms-with(1500)--〉ms-duplex(2000)åž«åŽ
+ var a = elem.getAttribute("ms-skip")
+ var b = elem.getAttributeNode("ms-important")
+ var c = elem.getAttributeNode("ms-controller")
+ if (typeof a === "string") {
+ return
+ } else if (node = b || c) {
+ var newVmodel = avalon.vmodels[node.value]
+ if (!newVmodel) {
+ return
+ }
+ //ms-importantä¸åŒ…å«çˆ¶VM,ms-controller相å
+ vmodels = node === b ? [newVmodel] : [newVmodel].concat(vmodels)
+ elem.removeAttribute(node.name) //removeAttributeNodeä¸ä¼šåˆ·æ–°[ms-controller]æ ·å¼è§„则
+ elem.classList.remove(node.name)
+ createSignalTower(elem, newVmodel)
+ }
+ scanAttr(elem, vmodels) //扫æ特性节点
+ }
+
+ var rhasHtml = /\|\s*html\s*/,
+ r11a = /\|\|/g,
+ rlt = /&lt;/g,
+ rgt = /&gt;/g,
+ rstringLiteral = /(['"])(\\\1|.)+?\1/g
+
+ function getToken(value) {
+ if (value.indexOf("|") > 0) {
+ var scapegoat = value.replace(rstringLiteral, function (_) {
+ return Array(_.length + 1).join("1")// jshint ignore:line
+ })
+ var index = scapegoat.replace(r11a, "\u1122\u3344").indexOf("|") //干掉所有短路或
+ if (index > -1) {
+ return {
+ filters: value.slice(index),
+ value: value.slice(0, index),
+ expr: true
+ }
+ }
+ }
+ return {
+ value: value,
+ filters: "",
+ expr: true
+ }
+ }
+
+ function scanExpr(str) {
+ var tokens = [],
+ value, start = 0,
+ stop
+ do {
+ stop = str.indexOf(openTag, start)
+ if (stop === -1) {
+ break
+ }
+ value = str.slice(start, stop)
+ if (value) { // {{ 左边的文本
+ tokens.push({
+ value: value,
+ filters: "",
+ expr: false
+ })
+ }
+ start = stop + openTag.length
+ stop = str.indexOf(closeTag, start)
+ if (stop === -1) {
+ break
+ }
+ value = str.slice(start, stop)
+ if (value) { //处ç†{{ }}æ’值表达å¼
+ tokens.push(getToken(value))
+ }
+ start = stop + closeTag.length
+ } while (1)
+ value = str.slice(start)
+ if (value) { //}} å³è¾¹çš„文本
+ tokens.push({
+ value: value,
+ expr: false,
+ filters: ""
+ })
+ }
+ return tokens
+ }
+
+ function scanText(textNode, vmodels) {
+ var bindings = []
+ if (textNode.nodeType === 8) {
+ var token = getToken(textNode.nodeValue)
+ var tokens = [token]
+ } else {
+ tokens = scanExpr(textNode.data)
+ }
+ if (tokens.length) {
+ for (var i = 0; token = tokens[i++];) {
+ var node = DOC.createTextNode(token.value) //将文本转æ¢ä¸ºæ–‡æœ¬èŠ‚点,并替æ¢åŽŸæ¥çš„文本节点
+ if (token.expr) {
+ token.type = "text"
+ token.element = node
+ token.filters = token.filters.replace(rhasHtml, function () {
+ token.type = "html"
+ token.group = 1
+ return ""
+ })// jshint ignore:line
+ bindings.push(token) //收集带有æ’值表达å¼çš„文本
+ }
+ hyperspace.appendChild(node)
+ }
+ textNode.parentNode.replaceChild(hyperspace, textNode)
+ if (bindings.length)
+ executeBindings(bindings, vmodels)
+ }
+ }
+
+ /*********************************************************************
+ * avalon的原型方法定义区 *
+ **********************************************************************/
+
+ function hyphen(target) {
+ //转æ¢ä¸ºè¿žå­—符线风格
+ return target.replace(/([a-z\d])([A-Z]+)/g, "$1-$2").toLowerCase()
+ }
+
+ function camelize(target) {
+ //转æ¢ä¸ºé©¼å³°é£Žæ ¼
+ if (target.indexOf("-") < 0 && target.indexOf("_") < 0) {
+ return target //æå‰åˆ¤æ–­ï¼Œæ高getStyle等的效率
+ }
+ return target.replace(/[-_][^-_]/g, function (match) {
+ return match.charAt(1).toUpperCase()
+ })
+ }
+
+ "add,remove".replace(rword, function (method) {
+ avalon.fn[method + "Class"] = function (cls) {
+ var el = this[0]
+ //https://developer.mozilla.org/zh-CN/docs/Mozilla/Firefox/Releases/26
+ if (cls && typeof cls === "string" && el && el.nodeType === 1) {
+ cls.replace(/\S+/g, function (c) {
+ el.classList[method](c)
+ })
+ }
+ return this
+ }
+ })
+
+ avalon.fn.mix({
+ hasClass: function (cls) {
+ var el = this[0] || {} //IE10+, chrome8+, firefox3.6+, safari5.1+,opera11.5+支æŒclassList,chrome24+,firefox26+支æŒclassList2.0
+ return el.nodeType === 1 && el.classList.contains(cls)
+ },
+ toggleClass: function (value, stateVal) {
+ var className, i = 0
+ var classNames = String(value).split(/\s+/)
+ var isBool = typeof stateVal === "boolean"
+ while ((className = classNames[i++])) {
+ var state = isBool ? stateVal : !this.hasClass(className)
+ this[state ? "addClass" : "removeClass"](className)
+ }
+ return this
+ },
+ attr: function (name, value) {
+ if (arguments.length === 2) {
+ this[0].setAttribute(name, value)
+ return this
+ } else {
+ return this[0].getAttribute(name)
+ }
+ },
+ data: function (name, value) {
+ name = "data-" + hyphen(name || "")
+ switch (arguments.length) {
+ case 2:
+ this.attr(name, value)
+ return this
+ case 1:
+ var val = this.attr(name)
+ return parseData(val)
+ case 0:
+ var ret = {}
+ ap.forEach.call(this[0].attributes, function (attr) {
+ if (attr) {
+ name = attr.name
+ if (!name.indexOf("data-")) {
+ name = camelize(name.slice(5))
+ ret[name] = parseData(attr.value)
+ }
+ }
+ })
+ return ret
+ }
+ },
+ removeData: function (name) {
+ name = "data-" + hyphen(name)
+ this[0].removeAttribute(name)
+ return this
+ },
+ css: function (name, value) {
+ if (avalon.isPlainObject(name)) {
+ for (var i in name) {
+ avalon.css(this, i, name[i])
+ }
+ } else {
+ var ret = avalon.css(this, name, value)
+ }
+ return ret !== void 0 ? ret : this
+ },
+ position: function () {
+ var offsetParent, offset,
+ elem = this[0],
+ parentOffset = {
+ top: 0,
+ left: 0
+ };
+ if (!elem) {
+ return
+ }
+ if (this.css("position") === "fixed") {
+ offset = elem.getBoundingClientRect()
+ } else {
+ offsetParent = this.offsetParent() //得到真正的offsetParent
+ offset = this.offset() // 得到正确的offsetParent
+ if (offsetParent[0].tagName !== "HTML") {
+ parentOffset = offsetParent.offset()
+ }
+ parentOffset.top += avalon.css(offsetParent[0], "borderTopWidth", true)
+ parentOffset.left += avalon.css(offsetParent[0], "borderLeftWidth", true)
+ // Subtract offsetParent scroll positions
+ parentOffset.top -= offsetParent.scrollTop()
+ parentOffset.left -= offsetParent.scrollLeft()
+ }
+ return {
+ top: offset.top - parentOffset.top - avalon.css(elem, "marginTop", true),
+ left: offset.left - parentOffset.left - avalon.css(elem, "marginLeft", true)
+ }
+ },
+ offsetParent: function () {
+ var offsetParent = this[0].offsetParent
+ while (offsetParent && avalon.css(offsetParent, "position") === "static") {
+ offsetParent = offsetParent.offsetParent;
+ }
+ return avalon(offsetParent || root)
+ },
+ bind: function (type, fn, phase) {
+ if (this[0]) { //此方法ä¸ä¼šé“¾
+ return avalon.bind(this[0], type, fn, phase)
+ }
+ },
+ unbind: function (type, fn, phase) {
+ if (this[0]) {
+ avalon.unbind(this[0], type, fn, phase)
+ }
+ return this
+ },
+ val: function (value) {
+ var node = this[0]
+ if (node && node.nodeType === 1) {
+ var get = arguments.length === 0
+ var access = get ? ":get" : ":set"
+ var fn = valHooks[getValType(node) + access]
+ if (fn) {
+ var val = fn(node, value)
+ } else if (get) {
+ return (node.value || "").replace(/\r/g, "")
+ } else {
+ node.value = value
+ }
+ }
+ return get ? val : this
+ }
+ })
+
+ if (root.dataset) {
+ avalon.fn.data = function (name, val) {
+ name = name && camelize(name)
+ var dataset = this[0].dataset
+ switch (arguments.length) {
+ case 2:
+ dataset[name] = val
+ return this
+ case 1:
+ val = dataset[name]
+ return parseData(val)
+ case 0:
+ var ret = createMap()
+ for (name in dataset) {
+ ret[name] = parseData(dataset[name])
+ }
+ return ret
+ }
+ }
+ }
+ var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/
+ avalon.parseJSON = JSON.parse
+
+ function parseData(data) {
+ try {
+ if (typeof data === "object")
+ return data
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null : +data + "" === data ? +data : rbrace.test(data) ? JSON.parse(data) : data
+ } catch (e) {
+ }
+ return data
+ }
+
+ avalon.each({
+ scrollLeft: "pageXOffset",
+ scrollTop: "pageYOffset"
+ }, function (method, prop) {
+ avalon.fn[method] = function (val) {
+ var node = this[0] || {}, win = getWindow(node),
+ top = method === "scrollTop"
+ if (!arguments.length) {
+ return win ? win[prop] : node[method]
+ } else {
+ if (win) {
+ win.scrollTo(!top ? val : win[prop], top ? val : win[prop])
+ } else {
+ node[method] = val
+ }
+ }
+ }
+ })
+
+ function getWindow(node) {
+ return node.window && node.document ? node : node.nodeType === 9 ? node.defaultView : false
+ }
+
+//=============================css相关==================================
+ var cssHooks = avalon.cssHooks = createMap()
+ var prefixes = ["", "-webkit-", "-moz-", "-ms-"] //去掉opera-15的支æŒ
+ var cssMap = {
+ "float": "cssFloat"
+ }
+ avalon.cssNumber = oneObject("columnCount,order,fillOpacity,fontWeight,lineHeight,opacity,orphans,widows,zIndex,zoom")
+
+ avalon.cssName = function (name, host, camelCase) {
+ if (cssMap[name]) {
+ return cssMap[name]
+ }
+ host = host || root.style
+ for (var i = 0, n = prefixes.length; i < n; i++) {
+ camelCase = camelize(prefixes[i] + name)
+ if (camelCase in host) {
+ return (cssMap[name] = camelCase)
+ }
+ }
+ return null
+ }
+ cssHooks["@:set"] = function (node, name, value) {
+ node.style[name] = value
+ }
+
+ cssHooks["@:get"] = function (node, name) {
+ if (!node || !node.style) {
+ throw new Error("getComputedStyleè¦æ±‚传入一个节点 " + node)
+ }
+ var ret, computed = getComputedStyle(node)
+ if (computed) {
+ ret = name === "filter" ? computed.getPropertyValue(name) : computed[name]
+ if (ret === "") {
+ ret = node.style[name] //其他æµè§ˆå™¨éœ€è¦æˆ‘们手动å–内è”æ ·å¼
+ }
+ }
+ return ret
+ }
+ cssHooks["opacity:get"] = function (node) {
+ var ret = cssHooks["@:get"](node, "opacity")
+ return ret === "" ? "1" : ret
+ }
+
+ "top,left".replace(rword, function (name) {
+ cssHooks[name + ":get"] = function (node) {
+ var computed = cssHooks["@:get"](node, name)
+ return /px$/.test(computed) ? computed :
+ avalon(node).position()[name] + "px"
+ }
+ })
+ var cssShow = {
+ position: "absolute",
+ visibility: "hidden",
+ display: "block"
+ }
+ var rdisplayswap = /^(none|table(?!-c[ea]).+)/
+
+ function showHidden(node, array) {
+ //http://www.cnblogs.com/rubylouvre/archive/2012/10/27/2742529.html
+ if (node.offsetWidth <= 0) { //opera.offsetWidthå¯èƒ½å°äºŽ0
+ var styles = getComputedStyle(node, null)
+ if (rdisplayswap.test(styles["display"])) {
+ var obj = {
+ node: node
+ }
+ for (var name in cssShow) {
+ obj[name] = styles[name]
+ node.style[name] = cssShow[name]
+ }
+ array.push(obj)
+ }
+ var parent = node.parentNode
+ if (parent && parent.nodeType === 1) {
+ showHidden(parent, array)
+ }
+ }
+ }
+
+ "Width,Height".replace(rword, function (name) { //fix 481
+ var method = name.toLowerCase(),
+ clientProp = "client" + name,
+ scrollProp = "scroll" + name,
+ offsetProp = "offset" + name
+ cssHooks[method + ":get"] = function (node, which, override) {
+ var boxSizing = -4
+ if (typeof override === "number") {
+ boxSizing = override
+ }
+ which = name === "Width" ? ["Left", "Right"] : ["Top", "Bottom"]
+ var ret = node[offsetProp] // border-box 0
+ if (boxSizing === 2) { // margin-box 2
+ return ret + avalon.css(node, "margin" + which[0], true) + avalon.css(node, "margin" + which[1], true)
+ }
+ if (boxSizing < 0) { // padding-box -2
+ ret = ret - avalon.css(node, "border" + which[0] + "Width", true) - avalon.css(node, "border" + which[1] + "Width", true)
+ }
+ if (boxSizing === -4) { // content-box -4
+ ret = ret - avalon.css(node, "padding" + which[0], true) - avalon.css(node, "padding" + which[1], true)
+ }
+ return ret
+ }
+ cssHooks[method + "&get"] = function (node) {
+ var hidden = [];
+ showHidden(node, hidden);
+ var val = cssHooks[method + ":get"](node)
+ for (var i = 0, obj; obj = hidden[i++];) {
+ node = obj.node
+ for (var n in obj) {
+ if (typeof obj[n] === "string") {
+ node.style[n] = obj[n]
+ }
+ }
+ }
+ return val;
+ }
+ avalon.fn[method] = function (value) { //会忽视其display
+ var node = this[0]
+ if (arguments.length === 0) {
+ if (node.setTimeout) { //å–得窗å£å°ºå¯¸,IE9åŽå¯ä»¥ç”¨node.innerWidth /innerHeight代替
+ return node["inner" + name]
+ }
+ if (node.nodeType === 9) { //å–得页é¢å°ºå¯¸
+ var doc = node.documentElement
+ //FF chrome html.scrollHeight< body.scrollHeight
+ //IE æ ‡å‡†æ¨¡å¼ : html.scrollHeight> body.scrollHeight
+ //IE æ€ªå¼‚æ¨¡å¼ : html.scrollHeight 最大等于å¯è§†çª—å£å¤šä¸€ç‚¹ï¼Ÿ
+ return Math.max(node.body[scrollProp], doc[scrollProp], node.body[offsetProp], doc[offsetProp], doc[clientProp])
+ }
+ return cssHooks[method + "&get"](node)
+ } else {
+ return this.css(method, value)
+ }
+ }
+ avalon.fn["inner" + name] = function () {
+ return cssHooks[method + ":get"](this[0], void 0, -2)
+ }
+ avalon.fn["outer" + name] = function (includeMargin) {
+ return cssHooks[method + ":get"](this[0], void 0, includeMargin === true ? 2 : 0)
+ }
+ })
+ avalon.fn.offset = function () { //å–å¾—è·ç¦»é¡µé¢å·¦å³è§’çš„åæ ‡
+ var node = this[0]
+ try {
+ var rect = node.getBoundingClientRect()
+ // Make sure element is not hidden (display: none) or disconnected
+ // https://github.com/jquery/jquery/pull/2043/files#r23981494
+ if (rect.width || rect.height || node.getClientRects().length) {
+ var doc = node.ownerDocument
+ var root = doc.documentElement
+ var win = doc.defaultView
+ return {
+ top: rect.top + win.pageYOffset - root.clientTop,
+ left: rect.left + win.pageXOffset - root.clientLeft
+ }
+ }
+ } catch (e) {
+ return {
+ left: 0,
+ top: 0
+ }
+ }
+ }
+ //=============================val相关=======================
+
+ function getValType(elem) {
+ var ret = elem.tagName.toLowerCase()
+ return ret === "input" && /checkbox|radio/.test(elem.type) ? "checked" : ret
+ }
+
+ var valHooks = {
+ "select:get": function (node, value) {
+ var option, options = node.options,
+ index = node.selectedIndex,
+ one = node.type === "select-one" || index < 0,
+ values = one ? null : [],
+ max = one ? index + 1 : options.length,
+ i = index < 0 ? max : one ? index : 0
+ for (; i < max; i++) {
+ option = options[i]
+ //æ—§å¼IE在resetåŽä¸ä¼šæ”¹å˜selected,需è¦æ”¹ç”¨i === index判定
+ //我们过滤所有disabledçš„option元素,但在safari5下,如果设置select为disable,那么其所有孩å­éƒ½disable
+ //因此当一个元素为disable,需è¦æ£€æµ‹å…¶æ˜¯å¦æ˜¾å¼è®¾ç½®äº†disableåŠå…¶çˆ¶èŠ‚点的disable情况
+ if ((option.selected || i === index) && !option.disabled) {
+ value = option.value
+ if (one) {
+ return value
+ }
+ //收集所有selected值组æˆæ•°ç»„返回
+ values.push(value)
+ }
+ }
+ return values
+ },
+ "select:set": function (node, values, optionSet) {
+ values = [].concat(values) //强制转æ¢ä¸ºæ•°ç»„
+ for (var i = 0, el; el = node.options[i++];) {
+ if ((el.selected = values.indexOf(el.value) > -1)) {
+ optionSet = true
+ }
+ }
+ if (!optionSet) {
+ node.selectedIndex = -1
+ }
+ }
+ }
+ /*********************************************************************
+ * 编译系统 *
+ **********************************************************************/
+ var quote = JSON.stringify
+
+ var keywords = [
+ "break,case,catch,continue,debugger,default,delete,do,else,false",
+ "finally,for,function,if,in,instanceof,new,null,return,switch,this",
+ "throw,true,try,typeof,var,void,while,with", /* 关键字*/
+ "abstract,boolean,byte,char,class,const,double,enum,export,extends",
+ "final,float,goto,implements,import,int,interface,long,native",
+ "package,private,protected,public,short,static,super,synchronized",
+ "throws,transient,volatile", /*ä¿ç•™å­—*/
+ "arguments,let,yield,undefined" /* ECMA 5 - use strict*/].join(",")
+ var rrexpstr = /\/\*[\w\W]*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|"(?:[^"\\]|\\[\w\W])*"|'(?:[^'\\]|\\[\w\W])*'|[\s\t\n]*\.[\s\t\n]*[$\w\.]+/g
+ var rsplit = /[^\w$]+/g
+ var rkeywords = new RegExp(["\\b" + keywords.replace(/,/g, '\\b|\\b') + "\\b"].join('|'), 'g')
+ var rnumber = /\b\d[^,]*/g
+ var rcomma = /^,+|,+$/g
+ var cacheVars = new Cache(512)
+ var getVariables = function (code) {
+ var key = "," + code.trim()
+ var ret = cacheVars.get(key)
+ if (ret) {
+ return ret
+ }
+ var match = code
+ .replace(rrexpstr, "")
+ .replace(rsplit, ",")
+ .replace(rkeywords, "")
+ .replace(rnumber, "")
+ .replace(rcomma, "")
+ .split(/^$|,+/)
+ return cacheVars.put(key, uniqSet(match))
+ }
+ /*添加赋值语å¥*/
+
+ function addAssign(vars, scope, name, data) {
+ var ret = [],
+ prefix = " = " + name + "."
+ var isProxy = /\$proxy\$each/.test(scope.$id)
+ for (var i = vars.length, prop; prop = vars[--i];) {
+ var el = isProxy && scope.$map[prop] ? "el" : prop
+ if (scope.hasOwnProperty(el)) {
+ ret.push(prop + prefix + el)
+ data.vars.push(prop)
+ if (data.type === "duplex") {
+ vars.get = name + "." + el
+ }
+ vars.splice(i, 1)
+ }
+ }
+ return ret
+ }
+
+ function uniqSet(array) {
+ var ret = [],
+ unique = {}
+ for (var i = 0; i < array.length; i++) {
+ var el = array[i]
+ var id = el && typeof el.$id === "string" ? el.$id : el
+ if (!unique[id]) {
+ unique[id] = ret.push(el)
+ }
+ }
+ return ret
+ }
+
+//缓存求值函数,以便多次利用
+ var cacheExprs = new Cache(128)
+//å–得求值函数åŠå…¶ä¼ å‚
+ var rduplex = /\w\[.*\]|\w\.\w/
+ var rproxy = /(\$proxy\$[a-z]+)\d+$/
+ var rthimRightParentheses = /\)\s*$/
+ var rthimOtherParentheses = /\)\s*\|/g
+ var rquoteFilterName = /\|\s*([$\w]+)/g
+ var rpatchBracket = /"\s*\["/g
+ var rthimLeftParentheses = /"\s*\(/g
+
+ function parseFilter(val, filters) {
+ filters = filters
+ .replace(rthimRightParentheses, "")//处ç†æœ€åŽçš„å°æ‹¬å·
+ .replace(rthimOtherParentheses, function () {//处ç†å…¶ä»–å°æ‹¬å·
+ return "],|"
+ })
+ .replace(rquoteFilterName, function (a, b) { //处ç†|åŠå®ƒåŽé¢çš„过滤器的åå­—
+ return "[" + quote(b)
+ })
+ .replace(rpatchBracket, function () {
+ return '"],["'
+ })
+ .replace(rthimLeftParentheses, function () {
+ return '",'
+ }) + "]"
+ return "return avalon.filters.$filter(" + val + ", " + filters + ")"
+ }
+
+ function parseExpr(code, scopes, data) {
+ var dataType = data.type
+ var filters = data.filters || ""
+ var exprId = scopes.map(function (el) {
+ return String(el.$id).replace(rproxy, "$1")
+ }) + code + dataType + filters
+ var vars = getVariables(code).concat(),
+ assigns = [],
+ names = [],
+ args = [],
+ prefix = ""
+ //args 是一个对象数组, names 是将è¦ç”Ÿæˆçš„求值函数的å‚æ•°
+ scopes = uniqSet(scopes)
+ data.vars = []
+ for (var i = 0, sn = scopes.length; i < sn; i++) {
+ if (vars.length) {
+ var name = "vm" + expose + "_" + i
+ names.push(name)
+ args.push(scopes[i])
+ assigns.push.apply(assigns, addAssign(vars, scopes[i], name, data))
+ }
+ }
+ if (!assigns.length && dataType === "duplex") {
+ return
+ }
+ if (dataType !== "duplex" && (code.indexOf("||") > -1 || code.indexOf("&&") > -1)) {
+ //https://github.com/RubyLouvre/avalon/issues/583
+ data.vars.forEach(function (v) {
+ var reg = new RegExp("\\b" + v + "(?:\\.\\w+|\\[\\w+\\])+", "ig")
+ code = code.replace(reg, function (_) {
+ var c = _.charAt(v.length)
+ var r = IEVersion ? code.slice(arguments[1] + _.length) : RegExp.rightContext
+ var method = /^\s*\(/.test(r)
+ if (c === "." || c === "[" || method) {//比如v为aa,我们åªåŒ¹é…aa.bb,aa[cc],ä¸åŒ¹é…aaa.xxx
+ var name = "var" + String(Math.random()).replace(/^0\./, "")
+ if (method) {//array.size()
+ var array = _.split(".")
+ if (array.length > 2) {
+ var last = array.pop()
+ assigns.push(name + " = " + array.join("."))
+ return name + "." + last
+ } else {
+ return _
+ }
+ }
+ assigns.push(name + " = " + _)
+ return name
+ } else {
+ return _
+ }
+ })
+ })
+ }
+ //---------------args----------------
+ data.args = args
+ //---------------cache----------------
+ var fn = cacheExprs.get(exprId) //直接从缓存,å…å¾—é‡å¤ç”Ÿæˆ
+ if (fn) {
+ data.evaluator = fn
+ return
+ }
+ prefix = assigns.join(", ")
+ if (prefix) {
+ prefix = "var " + prefix
+ }
+ if (/\S/.test(filters)) { //文本绑定,åŒå·¥ç»‘定æ‰æœ‰è¿‡æ»¤å™¨
+ if (!/text|html/.test(data.type)) {
+ throw Error("ms-" + data.type + "ä¸æ”¯æŒè¿‡æ»¤å™¨")
+ }
+ code = "\nvar ret" + expose + " = " + code + ";\r\n"
+ code += parseFilter("ret" + expose, filters)
+ } else if (dataType === "duplex") { //åŒå·¥ç»‘定
+ var _body = "'use strict';\nreturn function(vvv){\n\t" +
+ prefix +
+ ";\n\tif(!arguments.length){\n\t\treturn " +
+ code +
+ "\n\t}\n\t" + (!rduplex.test(code) ? vars.get : code) +
+ "= vvv;\n} "
+ try {
+ fn = Function.apply(noop, names.concat(_body))
+ data.evaluator = cacheExprs.put(exprId, fn)
+ } catch (e) {
+ log("debug: parse error," + e.message)
+ }
+ return
+ } else if (dataType === "on") { //事件绑定
+ if (code.indexOf("(") === -1) {
+ code += ".call(this, $event)"
+ } else {
+ code = code.replace("(", ".call(this,")
+ }
+ names.push("$event")
+ code = "\nreturn " + code + ";" //IE全家 Function("return ")出错,需è¦Function("return ;")
+ var lastIndex = code.lastIndexOf("\nreturn")
+ var header = code.slice(0, lastIndex)
+ var footer = code.slice(lastIndex)
+ code = header + "\n" + footer
+ } else { //其他绑定
+ code = "\nreturn " + code + ";" //IE全家 Function("return ")出错,需è¦Function("return ;")
+ }
+ try {
+ fn = Function.apply(noop, names.concat("'use strict';\n" + prefix + code))
+ data.evaluator = cacheExprs.put(exprId, fn)
+ } catch (e) {
+ log("debug: parse error," + e.message)
+ } finally {
+ vars = assigns = names = null //释放内存
+ }
+ }
+
+
+//parseExpr的智能引用代ç†
+
+ function parseExprProxy(code, scopes, data, tokens, noRegister) {
+ if (Array.isArray(tokens)) {
+ code = tokens.map(function (el) {
+ return el.expr ? "(" + el.value + ")" : quote(el.value)
+ }).join(" + ")
+ }
+ parseExpr(code, scopes, data)
+ if (data.evaluator && !noRegister) {
+ data.handler = bindingExecutors[data.handlerName || data.type]
+ //方便调试
+ //这里éžå¸¸é‡è¦,我们通过判定视图刷新函数的element是å¦åœ¨DOM树决定
+ //将它移出订阅者列表
+ avalon.injectBinding(data)
+ }
+ }
+
+ avalon.parseExprProxy = parseExprProxy
+ var bools = ["autofocus,autoplay,async,allowTransparency,checked,controls",
+ "declare,disabled,defer,defaultChecked,defaultSelected",
+ "contentEditable,isMap,loop,multiple,noHref,noResize,noShade",
+ "open,readOnly,selected"
+ ].join(",")
+ var boolMap = {}
+ bools.replace(rword, function (name) {
+ boolMap[name.toLowerCase()] = name
+ })
+
+ var propMap = { //属性å映射
+ "accept-charset": "acceptCharset",
+ "char": "ch",
+ "charoff": "chOff",
+ "class": "className",
+ "for": "htmlFor",
+ "http-equiv": "httpEquiv"
+ }
+
+ var anomaly = ["accessKey,bgColor,cellPadding,cellSpacing,codeBase,codeType,colSpan",
+ "dateTime,defaultValue,frameBorder,longDesc,maxLength,marginWidth,marginHeight",
+ "rowSpan,tabIndex,useMap,vSpace,valueType,vAlign"
+ ].join(",")
+ anomaly.replace(rword, function (name) {
+ propMap[name.toLowerCase()] = name
+ })
+
+ var rnoscripts = /<noscript.*?>(?:[\s\S]+?)<\/noscript>/img
+ var rnoscriptText = /<noscript.*?>([\s\S]+?)<\/noscript>/im
+
+ var getXHR = function () {
+ return new (window.XMLHttpRequest || ActiveXObject)("Microsoft.XMLHTTP") // jshint ignore:line
+ }
+
+ var cacheTmpls = avalon.templateCache = {}
+
+ bindingHandlers.attr = function (data, vmodels) {
+ var text = data.value.trim(),
+ simple = true
+ if (text.indexOf(openTag) > -1 && text.indexOf(closeTag) > 2) {
+ simple = false
+ if (rexpr.test(text) && RegExp.rightContext === "" && RegExp.leftContext === "") {
+ simple = true
+ text = RegExp.$1
+ }
+ }
+ if (data.type === "include") {
+ var elem = data.element
+ data.includeRendered = getBindingCallback(elem, "data-include-rendered", vmodels)
+ data.includeLoaded = getBindingCallback(elem, "data-include-loaded", vmodels)
+ var outer = data.includeReplace = !!avalon(elem).data("includeReplace")
+ if (avalon(elem).data("includeCache")) {
+ data.templateCache = {}
+ }
+ data.startInclude = DOC.createComment("ms-include")
+ data.endInclude = DOC.createComment("ms-include-end")
+ if (outer) {
+ data.element = data.startInclude
+ elem.parentNode.insertBefore(data.startInclude, elem)
+ elem.parentNode.insertBefore(data.endInclude, elem.nextSibling)
+ } else {
+ elem.insertBefore(data.startInclude, elem.firstChild)
+ elem.appendChild(data.endInclude)
+ }
+ }
+ data.handlerName = "attr" //handleName用于处ç†å¤šç§ç»‘定共用åŒä¸€ç§bindingExecutor的情况
+ parseExprProxy(text, vmodels, data, (simple ? 0 : scanExpr(data.value)))
+ }
+
+ bindingExecutors.attr = function (val, elem, data) {
+ var method = data.type,
+ attrName = data.param
+ if (method === "css") {
+ avalon(elem).css(attrName, val)
+ } else if (method === "attr") {
+ // ms-attr-class="xxx" vm.xxx="aaa bbb ccc"将元素的className设置为aaa bbb ccc
+ // ms-attr-class="xxx" vm.xxx=false 清空元素的所有类å
+ // ms-attr-name="yyy" vm.yyy="ooo" 为元素设置name属性
+ var toRemove = (val === false) || (val === null) || (val === void 0)
+
+ if (!W3C && propMap[attrName]) { //æ—§å¼IE下需è¦è¿›è¡Œå字映射
+ attrName = propMap[attrName]
+ }
+ var bool = boolMap[attrName]
+ if (typeof elem[bool] === "boolean") {
+ elem[bool] = !!val //布尔属性必须使用el.xxx = true|falseæ–¹å¼è®¾å€¼
+ if (!val) { //如果为false, IE全系列下相当于setAttribute(xxx,''),会影å“到样å¼,需è¦è¿›ä¸€æ­¥å¤„ç†
+ toRemove = true
+ }
+ }
+ if (toRemove) {
+ return elem.removeAttribute(attrName)
+ }
+
+ //SVGåªèƒ½ä½¿ç”¨setAttribute(xxx, yyy), VMLåªèƒ½ä½¿ç”¨elem.xxx = yyy ,HTML的固有属性必须elem.xxx = yyy
+ var isInnate = rsvg.test(elem) ? false : (DOC.namespaces && isVML(elem)) ? true : attrName in elem.cloneNode(false)
+ if (isInnate) {
+ elem[attrName] = val
+ } else {
+ elem.setAttribute(attrName, val)
+ }
+ } else if (method === "include" && val) {
+ var vmodels = data.vmodels
+ var rendered = data.includeRendered
+ var loaded = data.includeLoaded
+ var replace = data.includeReplace
+ var target = replace ? elem.parentNode : elem
+ var scanTemplate = function (text) {
+ if (loaded) {
+ var newText = loaded.apply(target, [text].concat(vmodels))
+ if (typeof newText === "string")
+ text = newText
+ }
+ if (rendered) {
+ checkScan(target, function () {
+ rendered.call(target)
+ }, NaN)
+ }
+ var lastID = data.includeLastID
+ if (data.templateCache && lastID && lastID !== val) {
+ var lastTemplate = data.templateCache[lastID]
+ if (!lastTemplate) {
+ lastTemplate = data.templateCache[lastID] = DOC.createElement("div")
+ ifGroup.appendChild(lastTemplate)
+ }
+ }
+ data.includeLastID = val
+ while (true) {
+ var node = data.startInclude.nextSibling
+ if (node && node !== data.endInclude) {
+ target.removeChild(node)
+ if (lastTemplate)
+ lastTemplate.appendChild(node)
+ } else {
+ break
+ }
+ }
+ var dom = getTemplateNodes(data, val, text)
+ var nodes = avalon.slice(dom.childNodes)
+ target.insertBefore(dom, data.endInclude)
+ scanNodeArray(nodes, vmodels)
+ }
+
+ if (data.param === "src") {
+ if (typeof cacheTmpls[val] === "string") {
+ avalon.nextTick(function () {
+ scanTemplate(cacheTmpls[val])
+ })
+ } else if (Array.isArray(cacheTmpls[val])) { //#805 防止在循环绑定中å‘出许多相åŒçš„请求
+ cacheTmpls[val].push(scanTemplate)
+ } else {
+ var xhr = getXHR()
+ xhr.onreadystatechange = function () {
+ if (xhr.readyState === 4) {
+ var s = xhr.status
+ if (s >= 200 && s < 300 || s === 304 || s === 1223) {
+ var text = xhr.responseText
+ for (var f = 0, fn; fn = cacheTmpls[val][f++];) {
+ fn(text)
+ }
+ cacheTmpls[val] = text
+ }
+ }
+ }
+ cacheTmpls[val] = [scanTemplate]
+ xhr.open("GET", val, true)
+ if ("withCredentials" in xhr) {
+ xhr.withCredentials = true
+ }
+ xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest")
+ xhr.send(null)
+ }
+ } else {
+ //IE系列与够新的标准æµè§ˆå™¨æ”¯æŒé€šè¿‡IDå–得元素(firefox14+)
+ //http://tjvantoll.com/2012/07/19/dom-element-references-as-global-variables/
+ var el = val && val.nodeType === 1 ? val : DOC.getElementById(val)
+ if (el) {
+ if (el.tagName === "NOSCRIPT" && !(el.innerHTML || el.fixIE78)) { //IE7-8 innerText,innerHTML都无法å–得其内容,IE6能å–å¾—å…¶innerHTML
+ xhr = getXHR() //IE9-11与chromeçš„innerHTML会得到转义的内容,它们的innerTextå¯ä»¥
+ xhr.open("GET", location, false) //谢谢Nodejs 乱炖群 深圳-纯属虚构
+ xhr.send(null)
+ //http://bbs.csdn.net/topics/390349046?page=1#post-393492653
+ var noscripts = DOC.getElementsByTagName("noscript")
+ var array = (xhr.responseText || "").match(rnoscripts) || []
+ var n = array.length
+ for (var i = 0; i < n; i++) {
+ var tag = noscripts[i]
+ if (tag) { //IE6-8中noscript标签的innerHTML,innerText是åªè¯»çš„
+ tag.style.display = "none" //http://haslayout.net/css/noscript-Ghost-Bug
+ tag.fixIE78 = (array[i].match(rnoscriptText) || ["", "&nbsp;"])[1]
+ }
+ }
+ }
+ avalon.nextTick(function () {
+ scanTemplate(el.fixIE78 || el.value || el.innerText || el.innerHTML)
+ })
+ }
+ }
+ } else {
+ if (!root.hasAttribute && typeof val === "string" && (method === "src" || method === "href")) {
+ val = val.replace(/&amp;/g, "&") //处ç†IE67自动转义的问题
+ }
+ elem[method] = val
+ if (window.chrome && elem.tagName === "EMBED") {
+ var parent = elem.parentNode //#525 chrome1-37下embed标签动æ€è®¾ç½®srcä¸èƒ½å‘生请求
+ var comment = document.createComment("ms-src")
+ parent.replaceChild(comment, elem)
+ parent.replaceChild(elem, comment)
+ }
+ }
+ }
+
+ function getTemplateNodes(data, id, text) {
+ var div = data.templateCache && data.templateCache[id]
+ if (div) {
+ var dom = DOC.createDocumentFragment(),
+ firstChild
+ while (firstChild = div.firstChild) {
+ dom.appendChild(firstChild)
+ }
+ return dom
+ }
+ return avalon.parseHTML(text)
+ }
+
+//这几个指令都å¯ä»¥ä½¿ç”¨æ’值表达å¼ï¼Œå¦‚ms-src="aaa/{{b}}/{{c}}.html"
+ "title,alt,src,value,css,include,href".replace(rword, function (name) {
+ bindingHandlers[name] = bindingHandlers.attr
+ })
+//æ ¹æ®VM的属性值或表达å¼çš„值切æ¢ç±»å,ms-class="xxx yyy zzz:flag"
+//http://www.cnblogs.com/rubylouvre/archive/2012/12/17/2818540.html
+ bindingHandlers["class"] = function (data, vmodels) {
+ var oldStyle = data.param,
+ text = data.value,
+ rightExpr
+ data.handlerName = "class"
+ if (!oldStyle || isFinite(oldStyle)) {
+ data.param = "" //去掉数字
+ var noExpr = text.replace(rexprg, function (a) {
+ return a.replace(/./g, "0")
+ //return Math.pow(10, a.length - 1) //å°†æ’值表达å¼æ’å…¥10çš„N-1次方æ¥å ä½
+ })
+ var colonIndex = noExpr.indexOf(":") //å–得第一个冒å·çš„ä½ç½®
+ if (colonIndex === -1) { // 比如 ms-class="aaa bbb ccc" 的情况
+ var className = text
+ } else { // 比如 ms-class-1="ui-state-active:checked" 的情况
+ className = text.slice(0, colonIndex)
+ rightExpr = text.slice(colonIndex + 1)
+ parseExpr(rightExpr, vmodels, data) //决定是添加还是删除
+ if (!data.evaluator) {
+ log("debug: ms-class '" + (rightExpr || "").trim() + "' ä¸å­˜åœ¨äºŽVM中")
+ return false
+ } else {
+ data._evaluator = data.evaluator
+ data._args = data.args
+ }
+ }
+ var hasExpr = rexpr.test(className) //比如ms-class="width{{w}}"的情况
+ if (!hasExpr) {
+ data.immobileClass = className
+ }
+ parseExprProxy("", vmodels, data, (hasExpr ? scanExpr(className) : 0))
+ } else {
+ data.immobileClass = data.oldStyle = data.param
+ parseExprProxy(text, vmodels, data)
+ }
+ }
+
+ bindingExecutors["class"] = function (val, elem, data) {
+ var $elem = avalon(elem),
+ method = data.type
+ if (method === "class" && data.oldStyle) { //如果是旧风格
+ $elem.toggleClass(data.oldStyle, !!val)
+ } else {
+ //如果存在冒å·å°±æœ‰æ±‚值函数
+ data.toggleClass = data._evaluator ? !!data._evaluator.apply(elem, data._args) : true
+ data.newClass = data.immobileClass || val
+ if (data.oldClass && data.newClass !== data.oldClass) {
+ $elem.removeClass(data.oldClass)
+ }
+ data.oldClass = data.newClass
+ switch (method) {
+ case "class":
+ $elem.toggleClass(data.newClass, data.toggleClass)
+ break
+ case "hover":
+ case "active":
+ if (!data.hasBindEvent) { //ç¡®ä¿åªç»‘定一次
+ var activate = "mouseenter" //在移出移入时切æ¢ç±»å
+ var abandon = "mouseleave"
+ if (method === "active") { //在èšç„¦å¤±ç„¦ä¸­åˆ‡æ¢ç±»å
+ elem.tabIndex = elem.tabIndex || -1
+ activate = "mousedown"
+ abandon = "mouseup"
+ var fn0 = $elem.bind("mouseleave", function () {
+ data.toggleClass && $elem.removeClass(data.newClass)
+ })
+ }
+ var fn1 = $elem.bind(activate, function () {
+ data.toggleClass && $elem.addClass(data.newClass)
+ })
+ var fn2 = $elem.bind(abandon, function () {
+ data.toggleClass && $elem.removeClass(data.newClass)
+ })
+ data.rollback = function () {
+ $elem.unbind("mouseleave", fn0)
+ $elem.unbind(activate, fn1)
+ $elem.unbind(abandon, fn2)
+ }
+ data.hasBindEvent = true
+ }
+ break;
+ }
+ }
+ }
+
+ "hover,active".replace(rword, function (method) {
+ bindingHandlers[method] = bindingHandlers["class"]
+ })
+//ms-controller绑定已ç»åœ¨scanTag 方法中实现
+//ms-css绑定已由ms-attr绑定实现
+
+
+// bindingHandlers.data 定义在if.js
+ bindingExecutors.data = function (val, elem, data) {
+ var key = "data-" + data.param
+ if (val && typeof val === "object") {
+ elem[key] = val
+ } else {
+ elem.setAttribute(key, String(val))
+ }
+ }
+//åŒå·¥ç»‘定
+ var duplexBinding = bindingHandlers.duplex = function (data, vmodels) {
+ var elem = data.element,
+ hasCast
+ parseExprProxy(data.value, vmodels, data, 0, 1)
+
+ data.changed = getBindingCallback(elem, "data-duplex-changed", vmodels) || noop
+ if (data.evaluator && data.args) {
+ var params = []
+ var casting = oneObject("string,number,boolean,checked")
+ if (elem.type === "radio" && data.param === "") {
+ data.param = "checked"
+ }
+ if (elem.msData) {
+ elem.msData["ms-duplex"] = data.value
+ }
+ data.param.replace(/\w+/g, function (name) {
+ if (/^(checkbox|radio)$/.test(elem.type) && /^(radio|checked)$/.test(name)) {
+ if (name === "radio")
+ log("ms-duplex-radioå·²ç»æ›´å为ms-duplex-checked")
+ name = "checked"
+ data.isChecked = true
+ }
+ if (name === "bool") {
+ name = "boolean"
+ log("ms-duplex-boolå·²ç»æ›´å为ms-duplex-boolean")
+ } else if (name === "text") {
+ name = "string"
+ log("ms-duplex-textå·²ç»æ›´å为ms-duplex-string")
+ }
+ if (casting[name]) {
+ hasCast = true
+ }
+ avalon.Array.ensure(params, name)
+ })
+ if (!hasCast) {
+ params.push("string")
+ }
+ data.param = params.join("-")
+ data.bound = function (type, callback) {
+ if (elem.addEventListener) {
+ elem.addEventListener(type, callback, false)
+ } else {
+ elem.attachEvent("on" + type, callback)
+ }
+ var old = data.rollback
+ data.rollback = function () {
+ elem.avalonSetter = null
+ avalon.unbind(elem, type, callback)
+ old && old()
+ }
+ }
+ for (var i in avalon.vmodels) {
+ var v = avalon.vmodels[i]
+ v.$fire("avalon-ms-duplex-init", data)
+ }
+ var cpipe = data.pipe || (data.pipe = pipe)
+ cpipe(null, data, "init")
+ var tagName = elem.tagName
+ duplexBinding[tagName] && duplexBinding[tagName](elem, data.evaluator.apply(null, data.args), data)
+ }
+ }
+//ä¸å­˜åœ¨ bindingExecutors.duplex
+
+ function fixNull(val) {
+ return val == null ? "" : val
+ }
+
+ avalon.duplexHooks = {
+ checked: {
+ get: function (val, data) {
+ return !data.element.oldValue
+ }
+ },
+ string: {
+ get: function (val) { //åŒæ­¥åˆ°VM
+ return val
+ },
+ set: fixNull
+ },
+ "boolean": {
+ get: function (val) {
+ return val === "true"
+ },
+ set: fixNull
+ },
+ number: {
+ get: function (val, data) {
+ var number = parseFloat(val)
+ if (-val === -number) {
+ return number
+ }
+ var arr = /strong|medium|weak/.exec(data.element.getAttribute("data-duplex-number")) || ["medium"]
+ switch (arr[0]) {
+ case "strong":
+ return 0
+ case "medium":
+ return val === "" ? "" : 0
+ case "weak":
+ return val
+ }
+ },
+ set: fixNull
+ }
+ }
+
+ function pipe(val, data, action, e) {
+ data.param.replace(/\w+/g, function (name) {
+ var hook = avalon.duplexHooks[name]
+ if (hook && typeof hook[action] === "function") {
+ val = hook[action](val, data)
+ }
+ })
+ return val
+ }
+
+ var TimerID, ribbon = []
+
+ avalon.tick = function (fn) {
+ if (ribbon.push(fn) === 1) {
+ TimerID = setInterval(ticker, 60)
+ }
+ }
+
+ function ticker() {
+ for (var n = ribbon.length - 1; n >= 0; n--) {
+ var el = ribbon[n]
+ if (el() === false) {
+ ribbon.splice(n, 1)
+ }
+ }
+ if (!ribbon.length) {
+ clearInterval(TimerID)
+ }
+ }
+
+ var watchValueInTimer = noop
+ var rmsinput = /text|password|hidden/
+ new function () { // jshint ignore:line
+ try { //#272 IE9-IE11, firefox
+ var setters = {}
+ var aproto = HTMLInputElement.prototype
+ var bproto = HTMLTextAreaElement.prototype
+
+ function newSetter(value) { // jshint ignore:line
+ if (avalon.contains(root, this)) {
+ setters[this.tagName].call(this, value)
+ if (!rmsinput.test(this.type))
+ return
+ if (!this.msFocus && this.avalonSetter) {
+ this.avalonSetter()
+ }
+ }
+ }
+
+ var inputProto = HTMLInputElement.prototype
+ Object.getOwnPropertyNames(inputProto) //æ•…æ„引å‘IE6-8ç­‰æµè§ˆå™¨æŠ¥é”™
+ setters["INPUT"] = Object.getOwnPropertyDescriptor(aproto, "value").set
+ Object.defineProperty(aproto, "value", {
+ set: newSetter
+ })
+ setters["TEXTAREA"] = Object.getOwnPropertyDescriptor(bproto, "value").set
+ Object.defineProperty(bproto, "value", {
+ set: newSetter
+ })
+ } catch (e) {
+ //在chrome 43中 ms-duplex终于ä¸éœ€è¦ä½¿ç”¨å®šæ—¶å™¨å®žçŽ°åŒå‘绑定了
+ // http://updates.html5rocks.com/2015/04/DOM-attributes-now-on-the-prototype
+ // https://docs.google.com/document/d/1jwA8mtClwxI-QJuHT7872Z0pxpZz8PBkf2bGAbsUtqs/edit?pli=1
+ watchValueInTimer = avalon.tick
+ }
+ } // jshint ignore:line
+//处ç†radio, checkbox, text, textarea, password
+ duplexBinding.INPUT = function (element, evaluator, data) {
+ var $type = element.type,
+ bound = data.bound,
+ $elem = avalon(element),
+ composing = false
+
+ function callback(value) {
+ data.changed.call(this, value, data)
+ }
+
+ function compositionStart() {
+ composing = true
+ }
+
+ function compositionEnd() {
+ composing = false
+ }
+
+ //当valueå˜åŒ–时改å˜model的值
+
+ var updateVModel = function () {
+ if (composing) //处ç†ä¸­æ–‡è¾“入法在minlengh下引å‘çš„BUG
+ return
+ var val = element.oldValue = element.value //防止递归调用形æˆæ­»å¾ªçŽ¯
+ var lastValue = data.pipe(val, data, "get")
+ if ($elem.data("duplexObserve") !== false) {
+ evaluator(lastValue)
+ callback.call(element, lastValue)
+ if ($elem.data("duplex-focus")) {
+ avalon.nextTick(function () {
+ element.focus()
+ })
+ }
+ }
+ }
+ //当modelå˜åŒ–æ—¶,它就会改å˜value的值
+ data.handler = function () {
+ var val = data.pipe(evaluator(), data, "set") + ""
+ if (val !== element.oldValue) {
+ element.value = val
+ }
+ }
+ if (data.isChecked || $type === "radio") {
+ updateVModel = function () {
+ if ($elem.data("duplexObserve") !== false) {
+ var lastValue = data.pipe(element.value, data, "get")
+ evaluator(lastValue)
+ callback.call(element, lastValue)
+ }
+ }
+ data.handler = function () {
+ var val = evaluator()
+ var checked = data.isChecked ? !!val : val + "" === element.value
+ element.checked = element.oldValue = checked
+ }
+ bound("click", updateVModel)
+ } else if ($type === "checkbox") {
+ updateVModel = function () {
+ if ($elem.data("duplexObserve") !== false) {
+ var method = element.checked ? "ensure" : "remove"
+ var array = evaluator()
+ if (!Array.isArray(array)) {
+ log("ms-duplex应用于checkbox上è¦å¯¹åº”一个数组")
+ array = [array]
+ }
+ avalon.Array[method](array, data.pipe(element.value, data, "get"))
+ callback.call(element, array)
+ }
+ }
+ data.handler = function () {
+ var array = [].concat(evaluator()) //强制转æ¢ä¸ºæ•°ç»„
+ element.checked = array.indexOf(data.pipe(element.value, data, "get")) > -1
+ }
+ bound("change", updateVModel)
+ } else {
+ var events = element.getAttribute("data-duplex-event") || "input"
+ if (element.attributes["data-event"]) {
+ log("data-event指令已ç»åºŸå¼ƒï¼Œè¯·æ”¹ç”¨data-duplex-event")
+ }
+ events.replace(rword, function (name) {
+ switch (name) {
+ case "input":
+ bound("input", updateVModel)
+ bound("DOMAutoComplete", updateVModel)
+ if (!IEVersion) {
+ bound("compositionstart", compositionStart)
+ bound("compositionend", compositionEnd)
+ }
+ break
+ default:
+ bound(name, updateVModel)
+ break
+ }
+ })
+ bound("focus", function () {
+ element.msFocus = true
+ })
+ bound("blur", function () {
+ element.msFocus = false
+ })
+ if (rmsinput.test($type)) {
+ watchValueInTimer(function () {
+ if (root.contains(element)) {
+ if (!element.msFocus && element.oldValue !== element.value) {
+ updateVModel()
+ }
+ } else if (!element.msRetain) {
+ return false
+ }
+ })
+ }
+
+ element.avalonSetter = updateVModel
+ }
+
+ element.oldValue = element.value
+ avalon.injectBinding(data)
+ callback.call(element, element.value)
+ }
+ duplexBinding.TEXTAREA = duplexBinding.INPUT
+ duplexBinding.SELECT = function (element, evaluator, data) {
+ var $elem = avalon(element)
+
+ function updateVModel() {
+ if ($elem.data("duplexObserve") !== false) {
+ var val = $elem.val() //字符串或字符串数组
+ if (Array.isArray(val)) {
+ val = val.map(function (v) {
+ return data.pipe(v, data, "get")
+ })
+ } else {
+ val = data.pipe(val, data, "get")
+ }
+ if (val + "" !== element.oldValue) {
+ evaluator(val)
+ }
+ data.changed.call(element, val, data)
+ }
+ }
+
+ data.handler = function () {
+ var val = evaluator()
+ val = val && val.$model || val
+ if (Array.isArray(val)) {
+ if (!element.multiple) {
+ log("ms-duplex在<select multiple=true>上è¦æ±‚对应一个数组")
+ }
+ } else {
+ if (element.multiple) {
+ log("ms-duplex在<select multiple=false>ä¸èƒ½å¯¹åº”一个数组")
+ }
+ }
+ //å¿…é¡»å˜æˆå­—符串åŽæ‰èƒ½æ¯”较
+ val = Array.isArray(val) ? val.map(String) : val + ""
+ if (val + "" !== element.oldValue) {
+ $elem.val(val)
+ element.oldValue = val + ""
+ }
+ }
+ data.bound("change", updateVModel)
+ element.msCallback = function () {
+ avalon.injectBinding(data)
+ data.changed.call(element, evaluator(), data)
+ }
+ }
+// bindingHandlers.html 定义在if.js
+ bindingExecutors.html = function (val, elem, data) {
+ val = val == null ? "" : val
+ var isHtmlFilter = "group" in data
+ var parent = isHtmlFilter ? elem.parentNode : elem
+ if (!parent)
+ return
+ if (typeof val === "string") {
+ var fragment = avalon.parseHTML(val)
+ } else if (val.nodeType === 11) { //å°†val转æ¢ä¸ºæ–‡æ¡£ç¢Žç‰‡
+ fragment = val
+ } else if (val.nodeType === 1 || val.item) {
+ var nodes = val.nodeType === 1 ? val.childNodes : val.item
+ fragment = hyperspace.cloneNode(true)
+ while (nodes[0]) {
+ fragment.appendChild(nodes[0])
+ }
+ }
+ if (!fragment.firstChild) {
+ fragment.appendChild(DOC.createComment("ms-html"))
+ }
+ nodes = avalon.slice(fragment.childNodes)
+ //æ’å…¥å ä½ç¬¦, 如果是过滤器,需è¦æœ‰èŠ‚制地移除指定的数é‡,如果是html指令,直接清空
+ if (isHtmlFilter) {
+ var n = data.group,
+ i = 1
+
+ data.group = nodes.length
+ data.element = nodes[0]
+
+ while (i < n) {
+ var node = elem.nextSibling
+ if (node) {
+ parent.removeChild(node)
+ i++
+ }
+ }
+ parent.replaceChild(fragment, elem)
+ } else {
+ avalon.clearHTML(parent).appendChild(fragment)
+ }
+ scanNodeArray(nodes, data.vmodels)
+ }
+ bindingHandlers["if"] =
+ bindingHandlers.data =
+ bindingHandlers.text =
+ bindingHandlers.html =
+ function (data, vmodels) {
+ parseExprProxy(data.value, vmodels, data)
+ }
+
+ bindingExecutors["if"] = function (val, elem, data) {
+ if (val) { //æ’回DOMæ ‘
+ if (elem.nodeType === 8) {
+ elem.parentNode.replaceChild(data.template, elem)
+ elem = data.element = data.template //这时å¯èƒ½ä¸ºnull
+ }
+ if (elem.getAttribute(data.name)) {
+ elem.removeAttribute(data.name)
+ scanAttr(elem, data.vmodels)
+ }
+ data.rollback = null
+ } else { //移出DOM树,并用注释节点å æ®åŽŸä½ç½®
+ if (elem.nodeType === 1) {
+ var node = data.element = DOC.createComment("ms-if")
+ elem.parentNode.replaceChild(node, elem)
+ data.template = elem //元素节点
+ ifGroup.appendChild(elem)
+ data.rollback = function () {
+ if (elem.parentNode === ifGroup) {
+ ifGroup.removeChild(elem)
+ }
+ }
+ }
+ }
+ }
+//ms-important绑定已ç»åœ¨scanTag 方法中实现
+//ms-include绑定已由ms-attr绑定实现
+
+ var rdash = /\(([^)]*)\)/
+ bindingHandlers.on = function (data, vmodels) {
+ var value = data.value
+ data.type = "on"
+ var eventType = data.param.replace(/-\d+$/, "") // ms-on-mousemove-10
+ if (typeof bindingHandlers.on[eventType + "Hook"] === "function") {
+ bindingHandlers.on[eventType + "Hook"](data)
+ }
+ if (value.indexOf("(") > 0 && value.indexOf(")") > -1) {
+ var matched = (value.match(rdash) || ["", ""])[1].trim()
+ if (matched === "" || matched === "$event") { // aaa() aaa($event)当æˆaaa处ç†
+ value = value.replace(rdash, "")
+ }
+ }
+ parseExprProxy(value, vmodels, data)
+ }
+
+ bindingExecutors.on = function (callback, elem, data) {
+ callback = function (e) {
+ var fn = data.evaluator || noop
+ return fn.apply(this, data.args.concat(e))
+ }
+ var eventType = data.param.replace(/-\d+$/, "") // ms-on-mousemove-10
+ if (eventType === "scan") {
+ callback.call(elem, {
+ type: eventType
+ })
+ } else if (typeof data.specialBind === "function") {
+ data.specialBind(elem, callback)
+ } else {
+ var removeFn = avalon.bind(elem, eventType, callback)
+ }
+ data.rollback = function () {
+ if (typeof data.specialUnbind === "function") {
+ data.specialUnbind()
+ } else {
+ avalon.unbind(elem, eventType, removeFn)
+ }
+ }
+ }
+ bindingHandlers.repeat = function (data, vmodels) {
+ var type = data.type
+ parseExprProxy(data.value, vmodels, data, 0, 1)
+ var freturn = false
+ try {
+ var $repeat = data.$repeat = data.evaluator.apply(0, data.args || [])
+ var xtype = avalon.type($repeat)
+ if (xtype !== "object" && xtype !== "array") {
+ freturn = true
+ avalon.log("warning:" + data.value + "åªèƒ½æ˜¯å¯¹è±¡æˆ–数组")
+ }
+ } catch (e) {
+ freturn = true
+ }
+
+ var arr = data.value.split(".") || []
+ if (arr.length > 1) {
+ arr.pop()
+ var n = arr[0]
+ for (var i = 0, v; v = vmodels[i++];) {
+ if (v && v.hasOwnProperty(n)) {
+ var events = v[n].$events || {}
+ events[subscribers] = events[subscribers] || []
+ events[subscribers].push(data)
+ break
+ }
+ }
+ }
+ var elem = data.element
+ elem.removeAttribute(data.name)
+
+ data.sortedCallback = getBindingCallback(elem, "data-with-sorted", vmodels)
+ data.renderedCallback = getBindingCallback(elem, "data-" + type + "-rendered", vmodels)
+ var signature = generateID(type)
+ var comment = data.element = DOC.createComment(signature + ":end")
+ data.clone = DOC.createComment(signature)
+ hyperspace.appendChild(comment)
+
+ if (type === "each" || type === "with") {
+ data.template = elem.innerHTML.trim()
+ avalon.clearHTML(elem).appendChild(comment)
+ } else {
+ data.template = elem.outerHTML.trim()
+ elem.parentNode.replaceChild(comment, elem)
+ }
+ data.template = avalon.parseHTML(data.template)
+ data.rollback = function () {
+ var elem = data.element
+ if (!elem)
+ return
+ bindingExecutors.repeat.call(data, "clear")
+ var parentNode = elem.parentNode
+ var content = data.template
+ var target = content.firstChild
+ parentNode.replaceChild(content, elem)
+ var start = data.$with
+ start && start.parentNode && start.parentNode.removeChild(start)
+ target = data.element = data.type === "repeat" ? target : parentNode
+ }
+ if (freturn) {
+ return
+ }
+ data.handler = bindingExecutors.repeat
+ data.$outer = {}
+ var check0 = "$key"
+ var check1 = "$val"
+ if (Array.isArray($repeat)) {
+ $repeat.$map[data.param || "el"] = 1
+ check0 = "$first"
+ check1 = "$last"
+ }
+ for (i = 0; v = vmodels[i++];) {
+ if (v.hasOwnProperty(check0) && v.hasOwnProperty(check1)) {
+ data.$outer = v
+ break
+ }
+ }
+ var $events = $repeat.$events
+ var $list = ($events || {})[subscribers]
+ if ($list && avalon.Array.ensure($list, data)) {
+ addSubscribers(data, $list)
+ }
+ if (xtype === "object") {
+ data.$with = true
+ var pool = !$events ? {} : $events.$withProxyPool || ($events.$withProxyPool = {})
+ data.handler("append", $repeat, pool)
+ } else if ($repeat.length) {
+ data.handler("add", 0, $repeat.length)
+ }
+ }
+
+ bindingExecutors.repeat = function (method, pos, el) {
+ if (method) {
+ var data = this, start, fragment
+ var end = data.element
+ var comments = getComments(data)
+ var parent = end.parentNode
+ var transation = hyperspace.cloneNode(false)
+ switch (method) {
+ case "add": //在posä½ç½®åŽæ·»åŠ el数组(pos为æ’å…¥ä½ç½®,el为è¦æ’入的个数)
+ var n = pos + el
+ var fragments = []
+ var array = data.$repeat
+ for (var i = pos; i < n; i++) {
+ var proxy = array.$proxy[i]
+ proxy.$outer = data.$outer
+ shimController(data, transation, proxy, fragments)
+ }
+ parent.insertBefore(transation, comments[pos] || end)
+ for (i = 0; fragment = fragments[i++];) {
+ scanNodeArray(fragment.nodes, fragment.vmodels)
+ fragment.nodes = fragment.vmodels = null
+ }
+ break
+ case "del": //å°†posåŽçš„el个元素删掉(pos, el都是数字)
+ sweepNodes(comments[pos], comments[pos + el] || end)
+ break
+ case "clear":
+ start = comments[0]
+ if (start) {
+ sweepNodes(start, end)
+ }
+ break
+ case "move":
+ start = comments[0]
+ if (start) {
+ var signature = start.nodeValue
+ var rooms = []
+ var room = [],
+ node
+ sweepNodes(start, end, function () {
+ room.unshift(this)
+ if (this.nodeValue === signature) {
+ rooms.unshift(room)
+ room = []
+ }
+ })
+ sortByIndex(rooms, pos)
+ while (room = rooms.shift()) {
+ while (node = room.shift()) {
+ transation.appendChild(node)
+ }
+ }
+ parent.insertBefore(transation, end)
+ }
+ break
+ case "append": //å°†pos的键值对从el中å–出(pos为一个普通对象,el为预先生æˆå¥½çš„代ç†VM对象池)
+ var pool = el
+ var keys = []
+ fragments = []
+ for (var key in pos) { //得到所有键å
+ if (pos.hasOwnProperty(key) && key !== "hasOwnProperty") {
+ keys.push(key)
+ }
+ }
+ if (data.sortedCallback) { //如果有回调,则让它们排åº
+ var keys2 = data.sortedCallback.call(parent, keys)
+ if (keys2 && Array.isArray(keys2) && keys2.length) {
+ keys = keys2
+ }
+ }
+ for (i = 0; key = keys[i++];) {
+ if (key !== "hasOwnProperty") {
+ if (!pool[key]) {
+ pool[key] = withProxyAgent(key, data)
+ }
+ shimController(data, transation, pool[key], fragments)
+ }
+ }
+ var comment = data.$with = data.clone
+ parent.insertBefore(comment, end)
+ parent.insertBefore(transation, end)
+ for (i = 0; fragment = fragments[i++];) {
+ scanNodeArray(fragment.nodes, fragment.vmodels)
+ fragment.nodes = fragment.vmodels = null
+ }
+ break
+ }
+ if (method === "clear")
+ method = "del"
+ var callback = data.renderedCallback || noop,
+ args = arguments
+ checkScan(parent, function () {
+ callback.apply(parent, args)
+ if (parent.oldValue && parent.tagName === "SELECT") { //fix #503
+ avalon(parent).val(parent.oldValue.split(","))
+ }
+ }, NaN)
+ }
+ }
+
+ "with,each".replace(rword, function (name) {
+ bindingHandlers[name] = bindingHandlers.repeat
+ })
+
+ function shimController(data, transation, proxy, fragments) {
+ var content = data.template.cloneNode(true)
+ var nodes = avalon.slice(content.childNodes)
+ if (!data.$with) {
+ content.insertBefore(data.clone.cloneNode(false), content.firstChild)
+ }
+ transation.appendChild(content)
+ var nv = [proxy].concat(data.vmodels)
+ var fragment = {
+ nodes: nodes,
+ vmodels: nv
+ }
+ fragments.push(fragment)
+ }
+
+ function getComments(data) {
+ var end = data.element
+ var signature = end.nodeValue.replace(":end", "")
+ var node = end.previousSibling
+ var array = []
+ while (node) {
+ if (node.nodeValue === signature) {
+ array.unshift(node)
+ }
+ node = node.previousSibling
+ }
+ return array
+ }
+
+
+//移除掉start与end之间的节点(ä¿ç•™end)
+ function sweepNodes(start, end, callback) {
+ while (true) {
+ var node = end.previousSibling
+ if (!node)
+ break
+ node.parentNode.removeChild(node)
+ callback && callback.call(node)
+ if (node === start) {
+ break
+ }
+ }
+ }
+
+// 为ms-each,ms-with, ms-repeat会创建一个代ç†VM,
+// 通过它们ä¿æŒä¸€ä¸ªä¸‹ä¸Šæ–‡ï¼Œè®©ç”¨æˆ·èƒ½è°ƒç”¨$index,$first,$last,$remove,$key,$val,$outer等属性与方法
+// 所有代ç†VM的产生,消费,收集,存放通过xxxProxyFactory,xxxProxyAgent, recycleProxies,xxxProxyPool实现
+ var eachProxyPool = []
+ var withProxyPool = []
+
+ function eachProxyFactory() {
+ var source = {
+ $index: 0,
+ $first: false,
+ $last: false,
+ $map: {},
+ $host: [],
+ $outer: {},
+ $remove: avalon.noop,
+ el: {
+ get: function () {
+ var e = this.$events
+ var array = e.$index
+ e.$index = e.el //#817 通过$index为el收集ä¾èµ–
+ try {
+ return this.$host[this.$index]
+ } finally {
+ e.$index = array
+ }
+ },
+ set: function (val) {
+ this.$host.set(this.$index, val)
+ }
+ }
+ }
+
+ var second = {
+ $last: 1,
+ $first: 1,
+ $index: 1
+ }
+ var proxy = modelFactory(source, second)
+ proxy.$id = generateID("$proxy$each")
+ return proxy
+ }
+
+ function eachProxyAgent(index, host) {
+ var proxy = eachProxyPool.shift()
+ if (!proxy) {
+ proxy = eachProxyFactory()
+ }
+ var last = host.length - 1
+ proxy.$index = index
+ proxy.$first = index === 0
+ proxy.$last = index === last
+ proxy.$map = host.$map
+ proxy.$host = host
+ proxy.$remove = function () {
+ return host.removeAt(proxy.$index)
+ }
+ return proxy
+ }
+
+ function withProxyFactory() {
+ var proxy = modelFactory({
+ $key: "",
+ $outer: {},
+ $host: {},
+ $val: {
+ get: function () {
+ return this.$host[this.$key]
+ },
+ set: function (val) {
+ this.$host[this.$key] = val
+ }
+ }
+ }, {
+ $val: 1
+ })
+ proxy.$id = generateID("$proxy$with")
+ return proxy
+ }
+
+ function withProxyAgent(key, data) {
+ var proxy = withProxyPool.pop()
+ if (!proxy) {
+ proxy = withProxyFactory()
+ }
+ var host = data.$repeat
+ proxy.$key = key
+ proxy.$host = host
+ proxy.$outer = data.$outer
+ if (host.$events) {
+ proxy.$events.$val = host.$events[key]
+ } else {
+ proxy.$events = {}
+ }
+ return proxy
+ }
+
+ function recycleProxies(proxies, type) {
+ var proxyPool = type === "each" ? eachProxyPool : withProxyPool
+ avalon.each(proxies, function (key, proxy) {
+ if (proxy.$events) {
+ for (var i in proxy.$events) {
+ if (Array.isArray(proxy.$events[i])) {
+ proxy.$events[i].forEach(function (data) {
+ if (typeof data === "object")
+ disposeData(data)
+ }) // jshint ignore:line
+ proxy.$events[i].length = 0
+ }
+ }
+ proxy.$host = proxy.$outer = {}
+ if (proxyPool.unshift(proxy) > kernel.maxRepeatSize) {
+ proxyPool.pop()
+ }
+ }
+ })
+ if (type === "each")
+ proxies.length = 0
+ }
+
+ /*********************************************************************
+ * å„ç§æŒ‡ä»¤ *
+ **********************************************************************/
+//ms-skip绑定已ç»åœ¨scanTag 方法中实现
+// bindingHandlers.text 定义在if.js
+ bindingExecutors.text = function (val, elem) {
+ val = val == null ? "" : val //ä¸åœ¨é¡µé¢ä¸Šæ˜¾ç¤ºundefined null
+ if (elem.nodeType === 3) { //绑定在文本节点上
+ try { //IE对游离于DOM树外的节点赋值会报错
+ elem.data = val
+ } catch (e) {
+ }
+ } else { //绑定在特性节点上
+ elem.textContent = val
+ }
+ }
+ function parseDisplay(nodeName, val) {
+ //用于å–得此类标签的默认display值
+ var key = "_" + nodeName
+ if (!parseDisplay[key]) {
+ var node = DOC.createElement(nodeName)
+ root.appendChild(node)
+ if (W3C) {
+ val = getComputedStyle(node, null).display
+ } else {
+ val = node.currentStyle.display
+ }
+ root.removeChild(node)
+ parseDisplay[key] = val
+ }
+ return parseDisplay[key]
+ }
+
+ avalon.parseDisplay = parseDisplay
+
+ bindingHandlers.visible = function (data, vmodels) {
+ var elem = avalon(data.element)
+ var display = elem.css("display")
+ if (display === "none") {
+ var style = elem[0].style
+ var has = /visibility/i.test(style.cssText)
+ var visible = elem.css("visibility")
+ style.display = ""
+ style.visibility = "hidden"
+ display = elem.css("display")
+ if (display === "none") {
+ display = parseDisplay(elem[0].nodeName)
+ }
+ style.visibility = has ? visible : ""
+ }
+ data.display = display
+ parseExprProxy(data.value, vmodels, data)
+ }
+
+ bindingExecutors.visible = function (val, elem, data) {
+ elem.style.display = val ? data.display : "none"
+ }
+ bindingHandlers.widget = function (data, vmodels) {
+ var args = data.value.match(rword)
+ var elem = data.element
+ var widget = args[0]
+ var id = args[1]
+ if (!id || id === "$") { //没有定义或为$时,å–组件å+éšæœºæ•°
+ id = generateID(widget)
+ }
+ var optName = args[2] || widget //没有定义,å–组件å
+ var constructor = avalon.ui[widget]
+ if (typeof constructor === "function") { //ms-widget="tabs,tabsAAA,optname"
+ vmodels = elem.vmodels || vmodels
+ for (var i = 0, v; v = vmodels[i++];) {
+ if (v.hasOwnProperty(optName) && typeof v[optName] === "object") {
+ var vmOptions = v[optName]
+ vmOptions = vmOptions.$model || vmOptions
+ break
+ }
+ }
+ if (vmOptions) {
+ var wid = vmOptions[widget + "Id"]
+ if (typeof wid === "string") {
+ log("warning!ä¸å†æ”¯æŒ" + widget + "Id")
+ id = wid
+ }
+ }
+ //抽å–data-tooltip-textã€data-tooltip-attr属性,组æˆä¸€ä¸ªé…置对象
+ var widgetData = avalon.getWidgetData(elem, widget)
+ data.value = [widget, id, optName].join(",")
+ data[widget + "Id"] = id
+ data.evaluator = noop
+ elem.msData["ms-widget-id"] = id
+ var options = data[widget + "Options"] = avalon.mix({}, constructor.defaults, vmOptions || {}, widgetData)
+ elem.removeAttribute("ms-widget")
+ var vmodel = constructor(elem, data, vmodels) || {} //防止组件ä¸è¿”回VM
+ if (vmodel.$id) {
+ avalon.vmodels[id] = vmodel
+ createSignalTower(elem, vmodel)
+ try {
+ vmodel.$init(function () {
+ avalon.scan(elem, [vmodel].concat(vmodels))
+ if (typeof options.onInit === "function") {
+ options.onInit.call(elem, vmodel, options, vmodels)
+ }
+ })
+ } catch (e) {
+ }
+ data.rollback = function () {
+ try {
+ vmodel.widgetElement = null
+ vmodel.$remove()
+ } catch (e) {
+ }
+ elem.msData = {}
+ delete avalon.vmodels[vmodel.$id]
+ }
+ addSubscribers(data, widgetList)
+ if (window.chrome) {
+ elem.addEventListener("DOMNodeRemovedFromDocument", function () {
+ setTimeout(removeSubscribers)
+ })
+ }
+ } else {
+ avalon.scan(elem, vmodels)
+ }
+ } else if (vmodels.length) { //如果该组件还没有加载,那么ä¿å­˜å½“å‰çš„vmodels
+ elem.vmodels = vmodels
+ }
+ }
+ var widgetList = []
+//ä¸å­˜åœ¨ bindingExecutors.widget
+ /*********************************************************************
+ * 自带过滤器 *
+ **********************************************************************/
+ var rscripts = /<script[^>]*>([\S\s]*?)<\/script\s*>/gim
+ var ron = /\s+(on[^=\s]+)(?:=("[^"]*"|'[^']*'|[^\s>]+))?/g
+ var ropen = /<\w+\b(?:(["'])[^"]*?(\1)|[^>])*>/ig
+ var rsanitize = {
+ a: /\b(href)\=("javascript[^"]*"|'javascript[^']*')/ig,
+ img: /\b(src)\=("javascript[^"]*"|'javascript[^']*')/ig,
+ form: /\b(action)\=("javascript[^"]*"|'javascript[^']*')/ig
+ }
+ var rsurrogate = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g
+ var rnoalphanumeric = /([^\#-~| |!])/g;
+
+ function numberFormat(number, decimals, point, thousands) {
+ //form http://phpjs.org/functions/number_format/
+ //number 必需,è¦æ ¼å¼åŒ–çš„æ•°å­—
+ //decimals å¯é€‰ï¼Œè§„定多少个å°æ•°ä½ã€‚
+ //point å¯é€‰ï¼Œè§„定用作å°æ•°ç‚¹çš„字符串(默认为 . )。
+ //thousands å¯é€‰ï¼Œè§„定用作åƒä½åˆ†éš”符的字符串(默认为 , ),如果设置了该å‚数,那么所有其他å‚数都是必需的。
+ number = (number + '')
+ .replace(/[^0-9+\-Ee.]/g, '')
+ var n = !isFinite(+number) ? 0 : +number,
+ prec = !isFinite(+decimals) ? 3 : Math.abs(decimals),
+ sep = thousands || ",",
+ dec = point || ".",
+ s = '',
+ toFixedFix = function (n, prec) {
+ var k = Math.pow(10, prec)
+ return '' + (Math.round(n * k) / k)
+ .toFixed(prec)
+ }
+ // Fix for IE parseFloat(0.55).toFixed(0) = 0;
+ s = (prec ? toFixedFix(n, prec) : '' + Math.round(n))
+ .split('.')
+ if (s[0].length > 3) {
+ s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep)
+ }
+ if ((s[1] || '')
+ .length < prec) {
+ s[1] = s[1] || ''
+ s[1] += new Array(prec - s[1].length + 1)
+ .join('0')
+ }
+ return s.join(dec)
+ }
+
+
+ var filters = avalon.filters = {
+ uppercase: function (str) {
+ return str.toUpperCase()
+ },
+ lowercase: function (str) {
+ return str.toLowerCase()
+ },
+ truncate: function (str, length, truncation) {
+ //length,新字符串长度,truncation,新字符串的结尾的字段,返回新字符串
+ length = length || 30
+ truncation = truncation === void(0) ? "..." : truncation
+ return str.length > length ? str.slice(0, length - truncation.length) + truncation : String(str)
+ },
+ $filter: function (val) {
+ for (var i = 1, n = arguments.length; i < n; i++) {
+ var array = arguments[i]
+ var fn = avalon.filters[array.shift()]
+ if (typeof fn === "function") {
+ var arr = [val].concat(array)
+ val = fn.apply(null, arr)
+ }
+ }
+ return val
+ },
+ camelize: camelize,
+ //https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
+ // <a href="javasc&NewLine;ript&colon;alert('XSS')">chrome</a>
+ // <a href="data:text/html;base64, PGltZyBzcmM9eCBvbmVycm9yPWFsZXJ0KDEpPg==">chrome</a>
+ // <a href="jav ascript:alert('XSS');">IE67chrome</a>
+ // <a href="jav&#x09;ascript:alert('XSS');">IE67chrome</a>
+ // <a href="jav&#x0A;ascript:alert('XSS');">IE67chrome</a>
+ sanitize: function (str) {
+ return str.replace(rscripts, "").replace(ropen, function (a, b) {
+ var match = a.toLowerCase().match(/<(\w+)\s/)
+ if (match) { //处ç†a标签的href属性,img标签的src属性,form标签的action属性
+ var reg = rsanitize[match[1]]
+ if (reg) {
+ a = a.replace(reg, function (s, name, value) {
+ var quote = value.charAt(0)
+ return name + "=" + quote + "javascript:void(0)" + quote// jshint ignore:line
+ })
+ }
+ }
+ return a.replace(ron, " ").replace(/\s+/g, " ") //移除onXXX事件
+ })
+ },
+ escape: function (str) {
+ //将字符串ç»è¿‡ str 转义得到适åˆåœ¨é¡µé¢ä¸­æ˜¾ç¤ºçš„内容, ä¾‹å¦‚æ›¿æ¢ < 为 &lt
+ return String(str).
+ replace(/&/g, '&amp;').
+ replace(rsurrogate, function (value) {
+ var hi = value.charCodeAt(0)
+ var low = value.charCodeAt(1)
+ return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';'
+ }).
+ replace(rnoalphanumeric, function (value) {
+ return '&#' + value.charCodeAt(0) + ';'
+ }).
+ replace(/</g, '&lt;').
+ replace(/>/g, '&gt;')
+ },
+ currency: function (amount, symbol, fractionSize) {
+ return (symbol || "\uFFE5") + numberFormat(amount, isFinite(fractionSize) ? fractionSize : 2)
+ },
+ number: numberFormat
+ }
+ /*
+ 'yyyy': 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010)
+ 'yy': 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)
+ 'y': 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199)
+ 'MMMM': Month in year (January-December)
+ 'MMM': Month in year (Jan-Dec)
+ 'MM': Month in year, padded (01-12)
+ 'M': Month in year (1-12)
+ 'dd': Day in month, padded (01-31)
+ 'd': Day in month (1-31)
+ 'EEEE': Day in Week,(Sunday-Saturday)
+ 'EEE': Day in Week, (Sun-Sat)
+ 'HH': Hour in day, padded (00-23)
+ 'H': Hour in day (0-23)
+ 'hh': Hour in am/pm, padded (01-12)
+ 'h': Hour in am/pm, (1-12)
+ 'mm': Minute in hour, padded (00-59)
+ 'm': Minute in hour (0-59)
+ 'ss': Second in minute, padded (00-59)
+ 's': Second in minute (0-59)
+ 'a': am/pm marker
+ 'Z': 4 digit (+sign) representation of the timezone offset (-1200-+1200)
+ format string can also be one of the following predefined localizable formats:
+
+ 'medium': equivalent to 'MMM d, y h:mm:ss a' for en_US locale (e.g. Sep 3, 2010 12:05:08 pm)
+ 'short': equivalent to 'M/d/yy h:mm a' for en_US locale (e.g. 9/3/10 12:05 pm)
+ 'fullDate': equivalent to 'EEEE, MMMM d,y' for en_US locale (e.g. Friday, September 3, 2010)
+ 'longDate': equivalent to 'MMMM d, y' for en_US locale (e.g. September 3, 2010
+ 'mediumDate': equivalent to 'MMM d, y' for en_US locale (e.g. Sep 3, 2010)
+ 'shortDate': equivalent to 'M/d/yy' for en_US locale (e.g. 9/3/10)
+ 'mediumTime': equivalent to 'h:mm:ss a' for en_US locale (e.g. 12:05:08 pm)
+ 'shortTime': equivalent to 'h:mm a' for en_US locale (e.g. 12:05 pm)
+ */
+ new function () {// jshint ignore:line
+ function toInt(str) {
+ return parseInt(str, 10) || 0
+ }
+
+ function padNumber(num, digits, trim) {
+ var neg = ""
+ if (num < 0) {
+ neg = '-'
+ num = -num
+ }
+ num = "" + num
+ while (num.length < digits)
+ num = "0" + num
+ if (trim)
+ num = num.substr(num.length - digits)
+ return neg + num
+ }
+
+ function dateGetter(name, size, offset, trim) {
+ return function (date) {
+ var value = date["get" + name]()
+ if (offset > 0 || value > -offset)
+ value += offset
+ if (value === 0 && offset === -12) {
+ value = 12
+ }
+ return padNumber(value, size, trim)
+ }
+ }
+
+ function dateStrGetter(name, shortForm) {
+ return function (date, formats) {
+ var value = date["get" + name]()
+ var get = (shortForm ? ("SHORT" + name) : name).toUpperCase()
+ return formats[get][value]
+ }
+ }
+
+ function timeZoneGetter(date) {
+ var zone = -1 * date.getTimezoneOffset()
+ var paddedZone = (zone >= 0) ? "+" : ""
+ paddedZone += padNumber(Math[zone > 0 ? "floor" : "ceil"](zone / 60), 2) + padNumber(Math.abs(zone % 60), 2)
+ return paddedZone
+ }
+
+ //å–得上åˆä¸‹åˆ
+
+ function ampmGetter(date, formats) {
+ return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1]
+ }
+
+ var DATE_FORMATS = {
+ yyyy: dateGetter("FullYear", 4),
+ yy: dateGetter("FullYear", 2, 0, true),
+ y: dateGetter("FullYear", 1),
+ MMMM: dateStrGetter("Month"),
+ MMM: dateStrGetter("Month", true),
+ MM: dateGetter("Month", 2, 1),
+ M: dateGetter("Month", 1, 1),
+ dd: dateGetter("Date", 2),
+ d: dateGetter("Date", 1),
+ HH: dateGetter("Hours", 2),
+ H: dateGetter("Hours", 1),
+ hh: dateGetter("Hours", 2, -12),
+ h: dateGetter("Hours", 1, -12),
+ mm: dateGetter("Minutes", 2),
+ m: dateGetter("Minutes", 1),
+ ss: dateGetter("Seconds", 2),
+ s: dateGetter("Seconds", 1),
+ sss: dateGetter("Milliseconds", 3),
+ EEEE: dateStrGetter("Day"),
+ EEE: dateStrGetter("Day", true),
+ a: ampmGetter,
+ Z: timeZoneGetter
+ }
+ var rdateFormat = /((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/
+ var raspnetjson = /^\/Date\((\d+)\)\/$/
+ filters.date = function (date, format) {
+ var locate = filters.date.locate,
+ text = "",
+ parts = [],
+ fn, match
+ format = format || "mediumDate"
+ format = locate[format] || format
+ if (typeof date === "string") {
+ if (/^\d+$/.test(date)) {
+ date = toInt(date)
+ } else if (raspnetjson.test(date)) {
+ date = +RegExp.$1
+ } else {
+ var trimDate = date.trim()
+ var dateArray = [0, 0, 0, 0, 0, 0, 0]
+ var oDate = new Date(0)
+ //å–得年月日
+ trimDate = trimDate.replace(/^(\d+)\D(\d+)\D(\d+)/, function (_, a, b, c) {
+ var array = c.length === 4 ? [c, a, b] : [a, b, c]
+ dateArray[0] = toInt(array[0]) //å¹´
+ dateArray[1] = toInt(array[1]) - 1 //月
+ dateArray[2] = toInt(array[2]) //æ—¥
+ return ""
+ })
+ var dateSetter = oDate.setFullYear
+ var timeSetter = oDate.setHours
+ trimDate = trimDate.replace(/[T\s](\d+):(\d+):?(\d+)?\.?(\d)?/, function (_, a, b, c, d) {
+ dateArray[3] = toInt(a) //å°æ—¶
+ dateArray[4] = toInt(b) //分钟
+ dateArray[5] = toInt(c) //秒
+ if (d) { //毫秒
+ dateArray[6] = Math.round(parseFloat("0." + d) * 1000)
+ }
+ return ""
+ })
+ var tzHour = 0
+ var tzMin = 0
+ trimDate = trimDate.replace(/Z|([+-])(\d\d):?(\d\d)/, function (z, symbol, c, d) {
+ dateSetter = oDate.setUTCFullYear
+ timeSetter = oDate.setUTCHours
+ if (symbol) {
+ tzHour = toInt(symbol + c)
+ tzMin = toInt(symbol + d)
+ }
+ return ""
+ })
+
+ dateArray[3] -= tzHour
+ dateArray[4] -= tzMin
+ dateSetter.apply(oDate, dateArray.slice(0, 3))
+ timeSetter.apply(oDate, dateArray.slice(3))
+ date = oDate
+ }
+ }
+ if (typeof date === "number") {
+ date = new Date(date)
+ }
+ if (avalon.type(date) !== "date") {
+ return
+ }
+ while (format) {
+ match = rdateFormat.exec(format)
+ if (match) {
+ parts = parts.concat(match.slice(1))
+ format = parts.pop()
+ } else {
+ parts.push(format)
+ format = null
+ }
+ }
+ parts.forEach(function (value) {
+ fn = DATE_FORMATS[value]
+ text += fn ? fn(date, locate) : value.replace(/(^'|'$)/g, "").replace(/''/g, "'")
+ })
+ return text
+ }
+ var locate = {
+ AMPMS: {
+ 0: "上åˆ",
+ 1: "下åˆ"
+ },
+ DAY: {
+ 0: "星期日",
+ 1: "星期一",
+ 2: "星期二",
+ 3: "星期三",
+ 4: "星期四",
+ 5: "星期五",
+ 6: "星期六"
+ },
+ MONTH: {
+ 0: "1月",
+ 1: "2月",
+ 2: "3月",
+ 3: "4月",
+ 4: "5月",
+ 5: "6月",
+ 6: "7月",
+ 7: "8月",
+ 8: "9月",
+ 9: "10月",
+ 10: "11月",
+ 11: "12月"
+ },
+ SHORTDAY: {
+ "0": "周日",
+ "1": "周一",
+ "2": "周二",
+ "3": "周三",
+ "4": "周四",
+ "5": "周五",
+ "6": "周六"
+ },
+ fullDate: "y年M月d日EEEE",
+ longDate: "y年M月d日",
+ medium: "yyyy-M-d H:mm:ss",
+ mediumDate: "yyyy-M-d",
+ mediumTime: "H:mm:ss",
+ "short": "yy-M-d ah:mm",
+ shortDate: "yy-M-d",
+ shortTime: "ah:mm"
+ }
+ locate.SHORTMONTH = locate.MONTH
+ filters.date.locate = locate
+ }// jshint ignore:line
+ /*********************************************************************
+ * AMD加载器 *
+ **********************************************************************/
+//https://www.devbridge.com/articles/understanding-amd-requirejs/
+//http://maxogden.com/nested-dependencies.html
+ var modules = avalon.modules = {
+ "domReady!": {
+ exports: avalon,
+ state: 3
+ },
+ "avalon": {
+ exports: avalon,
+ state: 4
+ }
+ }
+//Object(modules[id]).state拥有如下值
+// undefined 没有定义
+// 1(send) å·²ç»å‘出请求
+// 2(loading) å·²ç»è¢«æ‰§è¡Œä½†è¿˜æ²¡æœ‰æ‰§è¡Œå®Œæˆï¼Œåœ¨è¿™ä¸ªé˜¶æ®µdefine方法会被执行
+// 3(loaded) 执行完毕,通过onload/onreadystatechange回调判定,在这个阶段checkDeps方法会执行
+// 4(execute) å…¶ä¾èµ–也执行完毕, 值放到exports对象上,在这个阶段fireFactory方法会执行
+ modules.exports = modules.avalon
+
+ new function () {// jshint ignore:line
+ var loadings = [] //正在加载中的模å—列表
+ var factorys = [] //放置define方法的factory函数
+ var rjsext = /\.js$/i
+
+ function makeRequest(name, config) {
+//1. 去掉资æºå‰ç¼€
+ var res = "js"
+ name = name.replace(/^(\w+)\!/, function (a, b) {
+ res = b
+ return ""
+ })
+ if (res === "ready") {
+ log("debug: ready!å·²ç»è¢«åºŸå¼ƒï¼Œè¯·ä½¿ç”¨domReady!")
+ res = "domReady"
+ }
+//2. 去掉querystring, hash
+ var query = ""
+ name = name.replace(rquery, function (a) {
+ query = a
+ return ""
+ })
+ //3. 去掉扩展å
+ var suffix = "." + res
+ var ext = /js|css/.test(suffix) ? suffix : ""
+ name = name.replace(/\.[a-z0-9]+$/g, function (a) {
+ if (a === suffix) {
+ ext = a
+ return ""
+ } else {
+ return a
+ }
+ })
+ var req = avalon.mix({
+ query: query,
+ ext: ext,
+ res: res,
+ name: name,
+ toUrl: toUrl
+ }, config)
+ req.toUrl(name)
+ return req
+ }
+
+ function fireRequest(req) {
+ var name = req.name
+ var res = req.res
+ //1. 如果该模å—å·²ç»å‘出请求,直接返回
+ var module = modules[name]
+ var urlNoQuery = name && req.urlNoQuery
+ if (module && module.state >= 1) {
+ return name
+ }
+ module = modules[urlNoQuery]
+ if (module && module.state >= 3) {
+ innerRequire(module.deps || [], module.factory, urlNoQuery)
+ return urlNoQuery
+ }
+ if (name && !module) {
+ module = modules[urlNoQuery] = {
+ id: urlNoQuery,
+ state: 1 //send
+ }
+ var wrap = function (obj) {
+ resources[res] = obj
+ obj.load(name, req, function (a) {
+ if (arguments.length && a !== void 0) {
+ module.exports = a
+ }
+ module.state = 4
+ checkDeps()
+ })
+ }
+
+ if (!resources[res]) {
+ innerRequire([res], wrap)
+ } else {
+ wrap(resources[res])
+ }
+ }
+ return name ? urlNoQuery : res + "!"
+ }
+
+//核心API之一 require
+ var requireQueue = []
+ var isUserFirstRequire = false
+ innerRequire = avalon.require = function (array, factory, parentUrl, defineConfig) {
+ if (!isUserFirstRequire) {
+ requireQueue.push(avalon.slice(arguments))
+ if (arguments.length <= 2) {
+ isUserFirstRequire = true
+ var queue = requireQueue.splice(0, requireQueue.length), args
+ while (args = queue.shift()) {
+ innerRequire.apply(null, args)
+ }
+ }
+ return
+ }
+
+ if (!Array.isArray(array)) {
+ avalon.error("require方法的第一个å‚数应为数组 " + array)
+ }
+ var deps = [] // 放置所有ä¾èµ–项的完整路径
+ var uniq = createMap()
+ var id = parentUrl || "callback" + setTimeout("1")// jshint ignore:line
+ defineConfig = defineConfig || createMap()
+ defineConfig.baseUrl = kernel.baseUrl
+ var isBuilt = !!defineConfig.built
+ if (parentUrl) {
+ defineConfig.parentUrl = parentUrl.substr(0, parentUrl.lastIndexOf("/"))
+ defineConfig.mapUrl = parentUrl.replace(rjsext, "")
+ }
+ if (isBuilt) {
+ var req = makeRequest(defineConfig.defineName, defineConfig)
+ id = req.urlNoQuery
+ } else {
+ array.forEach(function (name) {
+ var req = makeRequest(name, defineConfig)
+ var url = fireRequest(req) //加载资æºï¼Œå¹¶è¿”回该资æºçš„完整地å€
+ if (url) {
+ if (!uniq[url]) {
+ deps.push(url)
+ uniq[url] = "å¸å¾’正美" //去é‡
+ }
+ }
+ })
+ }
+
+ var module = modules[id]
+ if (!module || module.state !== 4) {
+ modules[id] = {
+ id: id,
+ deps: isBuilt ? array.concat() : deps,
+ factory: factory || noop,
+ state: 3
+ }
+ }
+ if (!module) {
+ //如果此模å—是定义在å¦ä¸€ä¸ªJS文件中, 那必须等该文件加载完毕, æ‰èƒ½æ”¾åˆ°æ£€æµ‹åˆ—队中
+ loadings.push(id)
+ }
+ checkDeps()
+ }
+
+//核心API之二 require
+ innerRequire.define = function (name, deps, factory) { //模å—å,ä¾èµ–列表,模å—本身
+ if (typeof name !== "string") {
+ factory = deps
+ deps = name
+ name = "anonymous"
+ }
+ if (!Array.isArray(deps)) {
+ factory = deps
+ deps = []
+ }
+ var config = {
+ built: !isUserFirstRequire, //用r.js打包åŽ,所有define会放到requirejs之å‰
+ defineName: name
+ }
+ var args = [deps, factory, config]
+ factory.require = function (url) {
+ args.splice(2, 0, url)
+ if (modules[url]) {
+ modules[url].state = 3 //loaded
+ var isCycle = false
+ try {
+ isCycle = checkCycle(modules[url].deps, url)
+ } catch (e) {
+ }
+ if (isCycle) {
+ avalon.error(url + "模å—与之å‰çš„模å—存在循环ä¾èµ–,请ä¸è¦ç›´æŽ¥ç”¨script标签引入" + url + "模å—")
+ }
+ }
+ delete factory.require //释放内存
+ innerRequire.apply(null, args) //0,1,2 --> 1,2,0
+ }
+//æ ¹æ®æ ‡å‡†,所有éµå¾ªW3C标准的æµè§ˆå™¨,script标签会按标签的出现顺åºæ‰§è¡Œã€‚
+//è€çš„æµè§ˆå™¨ä¸­ï¼ŒåŠ è½½ä¹Ÿæ˜¯æŒ‰é¡ºåºçš„:一个文件下载完æˆåŽï¼Œæ‰å¼€å§‹ä¸‹è½½ä¸‹ä¸€ä¸ªæ–‡ä»¶ã€‚
+//较新的æµè§ˆå™¨ä¸­ï¼ˆIE8+ ã€FireFox3.5+ ã€Chrome4+ ã€Safari4+),为了å‡å°è¯·æ±‚时间以优化体验,
+//下载å¯ä»¥æ˜¯å¹¶è¡Œçš„,但是执行顺åºè¿˜æ˜¯æŒ‰ç…§æ ‡ç­¾å‡ºçŽ°çš„顺åºã€‚
+//但如果script标签是动æ€æ’入的, 就未必按照先请求先执行的原则了,目测åªæœ‰firefoxéµå®ˆ
+//唯一比较一致的是,IE10+åŠå…¶ä»–标准æµè§ˆå™¨,一旦开始解æžè„šæœ¬, 就会一直堵在那里,直接脚本解æžå®Œæ¯•
+//亦å³ï¼Œå…ˆè¿›å…¥loading阶段的script标签(模å—)必然会先进入loaded阶段
+ var url = config.built ? "unknown" : getCurrentScript()
+ if (url) {
+ var module = modules[url]
+ if (module) {
+ module.state = 2
+ }
+ factory.require(url)
+ } else {//åˆå¹¶å‰åŽçš„safari,åˆå¹¶åŽçš„IE6-9走此分支
+ factorys.push(factory)
+ }
+ }
+//核心API之三 require.config(settings)
+ innerRequire.config = kernel
+ //核心API之四 define.amd 标识其符åˆAMD规范
+ innerRequire.define.amd = modules
+
+ //==========================对用户é…置项进行å†åŠ å·¥==========================
+ var allpaths = kernel["orig.paths"] = createMap()
+ var allmaps = kernel["orig.map"] = createMap()
+ var allpackages = kernel["packages"] = []
+ var allargs = kernel["orig.args"] = createMap()
+ avalon.mix(plugins, {
+ paths: function (hash) {
+ avalon.mix(allpaths, hash)
+ kernel.paths = makeIndexArray(allpaths)
+ },
+ map: function (hash) {
+ avalon.mix(allmaps, hash)
+ var list = makeIndexArray(allmaps, 1, 1)
+ avalon.each(list, function (_, item) {
+ item.val = makeIndexArray(item.val)
+ })
+ kernel.map = list
+ },
+ packages: function (array) {
+ array = array.concat(allpackages)
+ var uniq = createMap()
+ var ret = []
+ for (var i = 0, pkg; pkg = array[i++];) {
+ pkg = typeof pkg === "string" ? {name: pkg} : pkg
+ var name = pkg.name
+ if (!uniq[name]) {
+ var url = joinPath(pkg.location || name, pkg.main || "main")
+ url = url.replace(rjsext, "")
+ ret.push(pkg)
+ uniq[name] = pkg.location = url
+ pkg.reg = makeMatcher(name)
+ }
+ }
+ kernel.packages = ret.sort()
+ },
+ urlArgs: function (hash) {
+ if (typeof hash === "string") {
+ hash = {"*": hash}
+ }
+ avalon.mix(allargs, hash)
+ kernel.urlArgs = makeIndexArray(allargs, 1)
+ },
+ baseUrl: function (url) {
+ if (!isAbsUrl(url)) {
+ var baseElement = head.getElementsByTagName("base")[0]
+ if (baseElement) {
+ head.removeChild(baseElement)
+ }
+ var node = DOC.createElement("a")
+ node.href = url
+ url = node.href
+ if (baseElement) {
+ head.insertBefore(baseElement, head.firstChild)
+ }
+ }
+ if (url.length > 3)
+ kernel.baseUrl = url
+ },
+ shim: function (obj) {
+ for (var i in obj) {
+ var value = obj[i]
+ if (Array.isArray(value)) {
+ value = obj[i] = {
+ deps: value
+ }
+ }
+ if (!value.exportsFn && (value.exports || value.init)) {
+ value.exportsFn = makeExports(value)
+ }
+ }
+ kernel.shim = obj
+ }
+
+ })
+
+
+ //==============================内部方法=================================
+ function checkCycle(deps, nick) {
+ //检测是å¦å­˜åœ¨å¾ªçŽ¯ä¾èµ–
+ for (var i = 0, id; id = deps[i++];) {
+ if (modules[id].state !== 4 &&
+ (id === nick || checkCycle(modules[id].deps, nick))) {
+ return true
+ }
+ }
+ }
+
+ function checkFail(node, onError) {
+ var id = trimQuery(node.src) //检测是å¦æ­»é“¾
+ node.onload = node.onerror = null
+ if (onError) {
+ setTimeout(function () {
+ head.removeChild(node)
+ node = null // 处ç†æ—§å¼IE下的循环引用问题
+ })
+ log("debug: 加载 " + id + " 失败" + onError + " " + (!modules[id].state))
+ } else {
+ return true
+ }
+ }
+
+ function checkDeps() {
+ //检测此JS模å—çš„ä¾èµ–是å¦éƒ½å·²å®‰è£…完毕,是则安装自身
+ loop: for (var i = loadings.length, id; id = loadings[--i];) {
+ var obj = modules[id],
+ deps = obj.deps
+ if (!deps)
+ continue
+ for (var j = 0, key; key = deps[j]; j++) {
+ if (Object(modules[key]).state !== 4) {
+ continue loop
+ }
+ }
+ //如果deps是空对象或者其ä¾èµ–的模å—的状æ€éƒ½æ˜¯2
+ if (obj.state !== 4) {
+ loadings.splice(i, 1) //必须先移除å†å®‰è£…,防止在IE下DOM树建完åŽæ‰‹åŠ¨åˆ·æ–°é¡µé¢ï¼Œä¼šå¤šæ¬¡æ‰§è¡Œå®ƒ
+ fireFactory(obj.id, obj.deps, obj.factory)
+ checkDeps() //如果æˆåŠŸ,则å†æ‰§è¡Œä¸€æ¬¡,以防有些模å—就差本模å—没有安装好
+ }
+ }
+ }
+
+ function loadJS(url, id, callback) {
+ //通过script节点加载目标模å—
+ var node = DOC.createElement("script")
+ node.className = subscribers //让getCurrentScriptåªå¤„ç†ç±»å为subscribersçš„script节点
+ node.onload = function () {
+ var factory = factorys.pop()
+ factory && factory.require(id)
+ if (callback) {
+ callback()
+ }
+ log("debug: å·²æˆåŠŸåŠ è½½ " + url)
+ id && loadings.push(id)
+ checkDeps()
+ }
+ node.onerror = function () {
+ checkFail(node, true)
+ }
+
+ head.insertBefore(node, head.firstChild) //chrome下第二个å‚æ•°ä¸èƒ½ä¸ºnull
+ node.src = url //æ’入到head的第一个节点å‰ï¼Œé˜²æ­¢IE6下head标签没闭åˆå‰ä½¿ç”¨appendChild抛错
+ log("debug: 正准备加载 " + url) //æ›´é‡è¦çš„是IE6下å¯ä»¥æ”¶çª„getCurrentScript的寻找范围
+ }
+
+ var resources = innerRequire.plugins = {
+ //三大常用资æºæ’件 js!, css!, text!, ready!
+ ready: {
+ load: noop
+ },
+ js: {
+ load: function (name, req, onLoad) {
+ var url = req.url
+ var id = req.urlNoQuery
+ var shim = kernel.shim[name.replace(rjsext, "")]
+ if (shim) { //shim机制
+ innerRequire(shim.deps || [], function () {
+ var args = avalon.slice(arguments)
+ loadJS(url, id, function () {
+ onLoad(shim.exportsFn ? shim.exportsFn.apply(0, args) : void 0)
+ })
+ })
+ } else {
+ loadJS(url, id)
+ }
+ }
+ },
+ css: {
+ load: function (name, req, onLoad) {
+ var url = req.url
+ head.insertAdjacentHTML("afterBegin", '<link rel="stylesheet" href="' + url + '">')
+ log("debug: å·²æˆåŠŸåŠ è½½ " + url)
+ onLoad()
+ }
+ },
+ text: {
+ load: function (name, req, onLoad) {
+ var url = req.url
+ var xhr = getXHR()
+ xhr.onload = function () {
+ var status = xhr.status;
+ if (status > 399 && status < 600) {
+ avalon.error(url + " 对应资æºä¸å­˜åœ¨æˆ–æ²¡æœ‰å¼€å¯ CORS")
+ } else {
+ log("debug: å·²æˆåŠŸåŠ è½½ " + url)
+ onLoad(xhr.responseText)
+ }
+ }
+ xhr.open("GET", url, true)
+ if ("withCredentials" in xhr) {//这是处ç†è·¨åŸŸ
+ xhr.withCredentials = true
+ }
+ xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest")//告诉åŽç«¯è¿™æ˜¯AJAX请求
+ xhr.send()
+ log("debug: 正准备加载 " + url)
+ }
+ }
+ }
+ innerRequire.checkDeps = checkDeps
+
+ var rquery = /(\?[^#]*)$/
+
+ function trimQuery(url) {
+ return (url || "").replace(rquery, "")
+ }
+
+ function isAbsUrl(path) {
+ //http://stackoverflow.com/questions/10687099/how-to-test-if-a-url-string-is-absolute-or-relative
+ return /^(?:[a-z]+:)?\/\//i.test(String(path))
+ }
+
+
+ function getCurrentScript() {
+ // inspireb by https://github.com/samyk/jiagra/blob/master/jiagra.js
+ var stack
+ try {
+ a.b.c() //强制报错,以便æ•èŽ·e.stack
+ } catch (e) { //safari5çš„sourceURL,firefoxçš„fileName,它们的效果与e.stackä¸ä¸€æ ·
+ stack = e.stack
+ }
+ if (stack) {
+ /**e.stack最åŽä¸€è¡Œåœ¨æ‰€æœ‰æ”¯æŒçš„æµè§ˆå™¨å¤§è‡´å¦‚下:
+ *chrome23:
+ * at http://113.93.50.63/data.js:4:1
+ *firefox17:
+ *@http://113.93.50.63/query.js:4
+ *opera12:http://www.oldapps.com/opera.php?system=Windows_XP
+ *@http://113.93.50.63/data.js:4
+ *IE10:
+ * at Global code (http://113.93.50.63/data.js:4:1)
+ * //firefox4+ å¯ä»¥ç”¨document.currentScript
+ */
+ stack = stack.split(/[@ ]/g).pop() //å–得最åŽä¸€è¡Œ,最åŽä¸€ä¸ªç©ºæ ¼æˆ–@之åŽçš„部分
+ stack = stack[0] === "(" ? stack.slice(1, -1) : stack.replace(/\s/, "") //去掉æ¢è¡Œç¬¦
+ return trimQuery(stack.replace(/(:\d+)?:\d+$/i, "")) //去掉行å·ä¸Žæˆ–许存在的出错字符起始ä½ç½®
+ }
+ var nodes = head.getElementsByTagName("script") //åªåœ¨head标签中寻找
+ for (var i = nodes.length, node; node = nodes[--i];) {
+ if (node.className === subscribers && node.readyState === "interactive") {
+ var url = node.src
+ return node.className = trimQuery(url)
+ }
+ }
+ }
+
+ var rcallback = /^callback\d+$/
+
+ function fireFactory(id, deps, factory) {
+ var module = Object(modules[id])
+ module.state = 4
+ for (var i = 0, array = [], d; d = deps[i++];) {
+ if (d === "exports") {
+ var obj = module.exports || (module.exports = createMap())
+ array.push(obj)
+ } else {
+ array.push(modules[d].exports)
+ }
+ }
+ try {
+ var ret = factory.apply(window, array)
+ } catch (e) {
+ log("执行[" + id + "]模å—çš„factory抛错: " + e)
+ }
+ if (ret !== void 0) {
+ module.exports = ret
+ }
+ if (rcallback.test(id)) {
+ delete modules[id]
+ }
+ delete module.factory
+ return ret
+ }
+
+ function toUrl(id) {
+ if (id.indexOf(this.res + "!") === 0) {
+ id = id.slice(this.res.length + 1) //处ç†define("css!style",[], function(){})的情况
+ }
+ var url = id
+ //1. 是å¦å‘½ä¸­pathsé…置项
+ var usePath = 0
+ var baseUrl = this.baseUrl
+ var rootUrl = this.parentUrl || baseUrl
+ eachIndexArray(id, kernel.paths, function (value, key) {
+ url = url.replace(key, value)
+ usePath = 1
+ })
+ //2. 是å¦å‘½ä¸­packagesé…置项
+ if (!usePath) {
+ eachIndexArray(id, kernel.packages, function (value, key, item) {
+ url = url.replace(item.name, item.location)
+ })
+ }
+ //3. 是å¦å‘½ä¸­mapé…置项
+ if (this.mapUrl) {
+ eachIndexArray(this.mapUrl, kernel.map, function (array) {
+ eachIndexArray(url, array, function (mdValue, mdKey) {
+ url = url.replace(mdKey, mdValue)
+ rootUrl = baseUrl
+ })
+ })
+ }
+ var ext = this.ext
+ if (ext && usePath && url.slice(-ext.length) === ext) {
+ url = url.slice(0, -ext.length)
+ }
+ //4. 转æ¢ä¸ºç»å¯¹è·¯å¾„
+ if (!isAbsUrl(url)) {
+ rootUrl = this.built || /^\w/.test(url) ? baseUrl : rootUrl
+ url = joinPath(rootUrl, url)
+ }
+ //5. 还原扩展å,query
+ var urlNoQuery = url + ext
+ url = urlNoQuery + this.query
+ //6. 处ç†urlArgs
+ eachIndexArray(id, kernel.urlArgs, function (value) {
+ url += (url.indexOf("?") === -1 ? "?" : "&") + value;
+ })
+ this.url = url
+ return this.urlNoQuery = urlNoQuery
+ }
+
+ function makeIndexArray(hash, useStar, part) {
+ //创建一个ç»è¿‡ç‰¹æ®Šç®—法排好åºçš„数组
+ var index = hash2array(hash, useStar, part)
+ index.sort(descSorterByName)
+ return index
+ }
+
+ function makeMatcher(prefix) {
+ return new RegExp('^' + prefix + '(/|$)')
+ }
+
+ function makeExports(value) {
+ return function () {
+ var ret
+ if (value.init) {
+ ret = value.init.apply(window, arguments)
+ }
+ return ret || (value.exports && getGlobal(value.exports))
+ }
+ }
+
+
+ function hash2array(hash, useStar, part) {
+ var array = [];
+ for (var key in hash) {
+ // if (hash.hasOwnProperty(key)) {//hash是由createMap创建没有hasOwnProperty
+ var item = {
+ name: key,
+ val: hash[key]
+ }
+ array.push(item)
+ item.reg = key === "*" && useStar ? /^/ : makeMatcher(key)
+ if (part && key !== "*") {
+ item.reg = new RegExp('\/' + key.replace(/^\//, "") + '(/|$)')
+ }
+ // }
+ }
+ return array
+ }
+
+ function eachIndexArray(moduleID, array, matcher) {
+ array = array || []
+ for (var i = 0, el; el = array[i++];) {
+ if (el.reg.test(moduleID)) {
+ matcher(el.val, el.name, el)
+ return false
+ }
+ }
+ }
+
+ // æ ¹æ®å…ƒç´ çš„name项进行数组字符数逆åºçš„排åºå‡½æ•°
+ function descSorterByName(a, b) {
+ var aaa = a.name
+ var bbb = b.name
+ if (bbb === "*") {
+ return -1
+ }
+ if (aaa === "*") {
+ return 1
+ }
+ return bbb.length - aaa.length
+ }
+
+ var rdeuce = /\/\w+\/\.\./
+
+ function joinPath(a, b) {
+ if (a.charAt(a.length - 1) !== "/") {
+ a += "/"
+ }
+ if (b.slice(0, 2) === "./") { //相对于兄弟路径
+ return a + b.slice(2)
+ }
+ if (b.slice(0, 2) === "..") { //相对于父路径
+ a += b
+ while (rdeuce.test(a)) {
+ a = a.replace(rdeuce, "")
+ }
+ return a
+ }
+ if (b.slice(0, 1) === "/") {
+ return a + b.slice(1)
+ }
+ return a + b
+ }
+
+ function getGlobal(value) {
+ if (!value) {
+ return value
+ }
+ var g = window
+ value.split(".").forEach(function (part) {
+ g = g[part]
+ })
+ return g
+ }
+
+ var mainNode = DOC.scripts[DOC.scripts.length - 1]
+ var dataMain = mainNode.getAttribute("data-main")
+ if (dataMain) {
+ plugins.baseUrl(dataMain)
+ var href = kernel.baseUrl
+ kernel.baseUrl = href.slice(0, href.lastIndexOf("/") + 1)
+ loadJS(href.replace(rjsext, "") + ".js")
+ } else {
+ var loaderUrl = trimQuery(mainNode.src)
+ kernel.baseUrl = loaderUrl.slice(0, loaderUrl.lastIndexOf("/") + 1)
+ }
+ }// jshint ignore:line
+
+ /*********************************************************************
+ * DOMReady *
+ **********************************************************************/
+ var readyList = [], isReady
+ var fireReady = function (fn) {
+ isReady = true
+ if (innerRequire) {
+ modules["domReady!"].state = 4
+ innerRequire.checkDeps()
+ }
+ while (fn = readyList.shift()) {
+ fn(avalon)
+ }
+ }
+
+
+ if (DOC.readyState === "complete") {
+ setTimeout(fireReady) //如果在domReady之外加载
+ } else {
+ DOC.addEventListener("DOMContentLoaded", fireReady)
+ }
+ window.addEventListener("load", fireReady)
+ avalon.ready = function (fn) {
+ if (!isReady) {
+ readyList.push(fn)
+ } else {
+ fn(avalon)
+ }
+ }
+ avalon.config({
+ loader: true
+ })
+ avalon.ready(function () {
+ avalon.scan(DOC.body)
+ })
+
+// Register as a named AMD module, since avalon can be concatenated with other
+// files that may use define, but not via a proper concatenation script that
+// understands anonymous AMD modules. A named AMD is safest and most robust
+// way to register. Lowercase avalon is used because AMD module names are
+// derived from file names, and Avalon is normally delivered in a lowercase
+// file name. Do this after creating the global so that if an AMD module wants
+// to call noConflict to hide this version of avalon, it will work.
+
+// Note that for maximum portability, libraries that are not avalon should
+// declare themselves as anonymous modules, and avoid setting a global if an
+// AMD loader is present. avalon is a special case. For more information, see
+// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
+ if (typeof define === "function" && define.amd) {
+ define("avalon", [], function () {
+ return avalon
+ })
+ }
+// Map over avalon in case of overwrite
+ var _avalon = window.avalon
+ avalon.noConflict = function (deep) {
+ if (deep && window.avalon === avalon) {
+ window.avalon = _avalon
+ }
+ return avalon
+ }
+// Expose avalon identifiers, even in AMD
+// and CommonJS for browser emulators
+ if (noGlobal === void 0) {
+ window.avalon = avalon
+ }
+
+ window._injectTer = function (code) {
+ return eval(code)
+ }
+
+ return avalon
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/bootbox/LICENSE.md b/common/src/main/webapp/thirdparty/bootbox/LICENSE.md
new file mode 100644
index 0000000..8219f59
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/bootbox/LICENSE.md
@@ -0,0 +1,23 @@
+# License
+
+(The MIT License)
+
+Copyright (C) 2011-2014 by Nick Payne <nick@kurai.co.uk>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE
diff --git a/common/src/main/webapp/thirdparty/bootbox/README.md b/common/src/main/webapp/thirdparty/bootbox/README.md
new file mode 100644
index 0000000..eedb721
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/bootbox/README.md
@@ -0,0 +1,91 @@
+# Bootbox - Bootstrap powered alert, confirm and flexible dialog boxes
+
+Please see http://bootboxjs.com for full usage instructions, or head over to http://paynedigital.com/bootbox for
+the original writeup about the project.
+
+## Contact
+
+The easiest thing is to [find me on twitter @makeusabrew](http://twitter.com/makeusabrew).
+
+## Contributing
+
+Please see the [CONTRIBUTING](https://github.com/makeusabrew/bootbox/blob/master/CONTRIBUTING.md) file for guidelines.
+
+## Running Tests [![Build Status](https://api.travis-ci.org/makeusabrew/bootbox.svg)](http://travis-ci.org/makeusabrew/bootbox)
+
+Tests are run using [Karma](http://karma-runner.github.io/0.8/index.html) using the Mocha test adapter.
+To run the tests yourself, simply run ```npm install``` within the project followed by ```npm test```.
+Please note that this will require [PhantomJS](http://phantomjs.org/) being installed and in your path - if
+it is not, you may run the tests and capture browsers manually by running ```karma start``` from the root
+of the project.
+
+The project is also hosted on [Travis CI](https://travis-ci.org/makeusabrew/bootbox) - when submitting
+pull requests **please** ensure your tests pass as failing requests will be rejected. See the
+[CONTRIBUTING](https://github.com/makeusabrew/bootbox/blob/master/CONTRIBUTING.md) file for more information.
+
+## Building a minified release
+
+The repository no longer contains a minified bootbox.min.js file - this is now only generated
+[for releases](https://github.com/makeusabrew/bootbox/releases). To build your own minified copy
+for use in development simply run ```npm install``` if you haven't already, followed by ```grunt uglify```.
+This will generate a bootbox.min.js file in your working directory.
+
+## A note on Bootstrap dependencies
+
+Bootbox **4.0.0** is the first release to support Bootstrap 3.0.0.
+
+Bootbox **3.3.0** is the *last* release to support Bootstrap 2.2.x.
+
+Much more dependency information can be found [on the Bootbox website](http://bootboxjs.com/#dependencies).
+
+### Roadmap
+
+The latest major release of Bootbox - 4.0.0 - involved a total rewrite of the
+internal code and introduced an entirely new public API. It has not re-implemented
+some functionality from the 3.x series as of yet; this will be addressed in the
+coming weeks in the form of new minor releases;
+[a task list for 4.3.0 is available](https://github.com/makeusabrew/bootbox/issues/220) -
+please feel free to add feedback and requests.
+
+There is no new major (e.g. 5.x) release on the roadmap at present.
+
+## Latest Release: 4.2.0
+
+* Add Swedish locale
+* Add Latvian locale
+* Add Turkish locale
+* Add Hebrew locale
+* Add password input type
+* Add textarea input type
+* Add date input type
+* Add time input type
+* Add number input type
+* Support DOM selectors for container argument
+* UMD support
+* Better support on mobile devices
+
+For a full list of releases and changes please see [the changelog](https://github.com/makeusabrew/bootbox/blob/master/CHANGELOG.md).
+
+## License
+
+(The MIT License)
+
+Copyright (C) 2011-2014 by Nick Payne <nick@kurai.co.uk>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE
diff --git a/common/src/main/webapp/thirdparty/bootbox/bootbox.min.js b/common/src/main/webapp/thirdparty/bootbox/bootbox.min.js
new file mode 100644
index 0000000..a7ea24f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/bootbox/bootbox.min.js
@@ -0,0 +1,6 @@
+/**
+ * bootbox.js v4.3.0
+ *
+ * http://bootboxjs.com/license.txt
+ */
+!function(a,b){"use strict";"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.bootbox=b(a.jQuery)}(this,function a(b,c){"use strict";function d(a){var b=q[o.locale];return b?b[a]:q.en[a]}function e(a,c,d){a.stopPropagation(),a.preventDefault();var e=b.isFunction(d)&&d(a)===!1;e||c.modal("hide")}function f(a){var b,c=0;for(b in a)c++;return c}function g(a,c){var d=0;b.each(a,function(a,b){c(a,b,d++)})}function h(a){var c,d;if("object"!=typeof a)throw new Error("Please supply an object of options");if(!a.message)throw new Error("Please specify a message");return a=b.extend({},o,a),a.buttons||(a.buttons={}),a.backdrop=a.backdrop?"static":!1,c=a.buttons,d=f(c),g(c,function(a,e,f){if(b.isFunction(e)&&(e=c[a]={callback:e}),"object"!==b.type(e))throw new Error("button with key "+a+" must be an object");e.label||(e.label=a),e.className||(e.className=2>=d&&f===d-1?"btn-primary":"btn-default")}),a}function i(a,b){var c=a.length,d={};if(1>c||c>2)throw new Error("Invalid argument length");return 2===c||"string"==typeof a[0]?(d[b[0]]=a[0],d[b[1]]=a[1]):d=a[0],d}function j(a,c,d){return b.extend(!0,{},a,i(c,d))}function k(a,b,c,d){var e={className:"bootbox-"+a,buttons:l.apply(null,b)};return m(j(e,d,c),b)}function l(){for(var a={},b=0,c=arguments.length;c>b;b++){var e=arguments[b],f=e.toLowerCase(),g=e.toUpperCase();a[f]={label:d(g)}}return a}function m(a,b){var d={};return g(b,function(a,b){d[b]=!0}),g(a.buttons,function(a){if(d[a]===c)throw new Error("button key "+a+" is not allowed (options are "+b.join("\n")+")")}),a}var n={dialog:"<div class='bootbox modal' tabindex='-1' role='dialog'><div class='modal-dialog'><div class='modal-content'><div class='modal-body'><div class='bootbox-body'></div></div></div></div></div>",header:"<div class='modal-header'><h4 class='modal-title'></h4></div>",footer:"<div class='modal-footer'></div>",closeButton:"<button type='button' class='bootbox-close-button close' data-dismiss='modal' aria-hidden='true'>&times;</button>",form:"<form class='bootbox-form'></form>",inputs:{text:"<input class='bootbox-input bootbox-input-text form-control' autocomplete=off type=text />",textarea:"<textarea class='bootbox-input bootbox-input-textarea form-control'></textarea>",email:"<input class='bootbox-input bootbox-input-email form-control' autocomplete='off' type='email' />",select:"<select class='bootbox-input bootbox-input-select form-control'></select>",checkbox:"<div class='checkbox'><label><input class='bootbox-input bootbox-input-checkbox' type='checkbox' /></label></div>",date:"<input class='bootbox-input bootbox-input-date form-control' autocomplete=off type='date' />",time:"<input class='bootbox-input bootbox-input-time form-control' autocomplete=off type='time' />",number:"<input class='bootbox-input bootbox-input-number form-control' autocomplete=off type='number' />",password:"<input class='bootbox-input bootbox-input-password form-control' autocomplete='off' type='password' />"}},o={locale:"en",backdrop:!0,animate:!0,className:null,closeButton:!0,show:!0,container:"body"},p={};p.alert=function(){var a;if(a=k("alert",["ok"],["message","callback"],arguments),a.callback&&!b.isFunction(a.callback))throw new Error("alert requires callback property to be a function when provided");return a.buttons.ok.callback=a.onEscape=function(){return b.isFunction(a.callback)?a.callback():!0},p.dialog(a)},p.confirm=function(){var a;if(a=k("confirm",["cancel","confirm"],["message","callback"],arguments),a.buttons.cancel.callback=a.onEscape=function(){return a.callback(!1)},a.buttons.confirm.callback=function(){return a.callback(!0)},!b.isFunction(a.callback))throw new Error("confirm requires a callback");return p.dialog(a)},p.prompt=function(){var a,d,e,f,h,i,k;if(f=b(n.form),d={className:"bootbox-prompt",buttons:l("cancel","confirm"),value:"",inputType:"text"},a=m(j(d,arguments,["title","callback"]),["cancel","confirm"]),i=a.show===c?!0:a.show,a.message=f,a.buttons.cancel.callback=a.onEscape=function(){return a.callback(null)},a.buttons.confirm.callback=function(){var c;switch(a.inputType){case"text":case"textarea":case"email":case"select":case"date":case"time":case"number":case"password":c=h.val();break;case"checkbox":var d=h.find("input:checked");c=[],g(d,function(a,d){c.push(b(d).val())})}return a.callback(c)},a.show=!1,!a.title)throw new Error("prompt requires a title");if(!b.isFunction(a.callback))throw new Error("prompt requires a callback");if(!n.inputs[a.inputType])throw new Error("invalid prompt type");switch(h=b(n.inputs[a.inputType]),a.inputType){case"text":case"textarea":case"email":case"date":case"time":case"number":case"password":h.val(a.value);break;case"select":var o={};if(k=a.inputOptions||[],!k.length)throw new Error("prompt with select requires options");g(k,function(a,d){var e=h;if(d.value===c||d.text===c)throw new Error("given options in wrong format");d.group&&(o[d.group]||(o[d.group]=b("<optgroup/>").attr("label",d.group)),e=o[d.group]),e.append("<option value='"+d.value+"'>"+d.text+"</option>")}),g(o,function(a,b){h.append(b)}),h.val(a.value);break;case"checkbox":var q=b.isArray(a.value)?a.value:[a.value];if(k=a.inputOptions||[],!k.length)throw new Error("prompt with checkbox requires options");if(!k[0].value||!k[0].text)throw new Error("given options in wrong format");h=b("<div/>"),g(k,function(c,d){var e=b(n.inputs[a.inputType]);e.find("input").attr("value",d.value),e.find("label").append(d.text),g(q,function(a,b){b===d.value&&e.find("input").prop("checked",!0)}),h.append(e)})}return a.placeholder&&h.attr("placeholder",a.placeholder),a.pattern&&h.attr("pattern",a.pattern),f.append(h),f.on("submit",function(a){a.preventDefault(),a.stopPropagation(),e.find(".btn-primary").click()}),e=p.dialog(a),e.off("shown.bs.modal"),e.on("shown.bs.modal",function(){h.focus()}),i===!0&&e.modal("show"),e},p.dialog=function(a){a=h(a);var c=b(n.dialog),d=c.find(".modal-dialog"),f=c.find(".modal-body"),i=a.buttons,j="",k={onEscape:a.onEscape};if(g(i,function(a,b){j+="<button data-bb-handler='"+a+"' type='button' class='btn "+b.className+"'>"+b.label+"</button>",k[a]=b.callback}),f.find(".bootbox-body").html(a.message),a.animate===!0&&c.addClass("fade"),a.className&&c.addClass(a.className),"large"===a.size&&d.addClass("modal-lg"),"small"===a.size&&d.addClass("modal-sm"),a.title&&f.before(n.header),a.closeButton){var l=b(n.closeButton);a.title?c.find(".modal-header").prepend(l):l.css("margin-top","-10px").prependTo(f)}return a.title&&c.find(".modal-title").html(a.title),j.length&&(f.after(n.footer),c.find(".modal-footer").html(j)),c.on("hidden.bs.modal",function(a){a.target===this&&c.remove()}),c.on("shown.bs.modal",function(){c.find(".btn-primary:first").focus()}),c.on("escape.close.bb",function(a){k.onEscape&&e(a,c,k.onEscape)}),c.on("click",".modal-footer button",function(a){var d=b(this).data("bb-handler");e(a,c,k[d])}),c.on("click",".bootbox-close-button",function(a){e(a,c,k.onEscape)}),c.on("keyup",function(a){27===a.which&&c.trigger("escape.close.bb")}),b(a.container).append(c),c.modal({backdrop:a.backdrop,keyboard:!1,show:!1}),a.show&&c.modal("show"),c},p.setDefaults=function(){var a={};2===arguments.length?a[arguments[0]]=arguments[1]:a=arguments[0],b.extend(o,a)},p.hideAll=function(){return b(".bootbox").modal("hide"),p};var q={br:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Sim"},cs:{OK:"OK",CANCEL:"ZruÅ¡it",CONFIRM:"Potvrdit"},da:{OK:"OK",CANCEL:"Annuller",CONFIRM:"Accepter"},de:{OK:"OK",CANCEL:"Abbrechen",CONFIRM:"Akzeptieren"},el:{OK:"Εντάξει",CANCEL:"ΑκÏÏωση",CONFIRM:"Επιβεβαίωση"},en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},es:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Aceptar"},et:{OK:"OK",CANCEL:"Katkesta",CONFIRM:"OK"},fi:{OK:"OK",CANCEL:"Peruuta",CONFIRM:"OK"},fr:{OK:"OK",CANCEL:"Annuler",CONFIRM:"D'accord"},he:{OK:"×ישור",CANCEL:"ביטול",CONFIRM:"×ישור"},id:{OK:"OK",CANCEL:"Batal",CONFIRM:"OK"},it:{OK:"OK",CANCEL:"Annulla",CONFIRM:"Conferma"},ja:{OK:"OK",CANCEL:"キャンセル",CONFIRM:"確èª"},lt:{OK:"Gerai",CANCEL:"AtÅ¡aukti",CONFIRM:"Patvirtinti"},lv:{OK:"Labi",CANCEL:"Atcelt",CONFIRM:"ApstiprinÄt"},nl:{OK:"OK",CANCEL:"Annuleren",CONFIRM:"Accepteren"},no:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},pl:{OK:"OK",CANCEL:"Anuluj",CONFIRM:"Potwierdź"},pt:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Confirmar"},ru:{OK:"OK",CANCEL:"Отмена",CONFIRM:"Применить"},sv:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},tr:{OK:"Tamam",CANCEL:"Ä°ptal",CONFIRM:"Onayla"},zh_CN:{OK:"OK",CANCEL:"å–消",CONFIRM:"确认"},zh_TW:{OK:"OK",CANCEL:"å–消",CONFIRM:"確èª"}};return p.init=function(c){return a(c||b)},p}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/bootstrap-daterangepicker/daterangepicker-bs3.css b/common/src/main/webapp/thirdparty/bootstrap-daterangepicker/daterangepicker-bs3.css
new file mode 100644
index 0000000..71111cf
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/bootstrap-daterangepicker/daterangepicker-bs3.css
@@ -0,0 +1,319 @@
+/*!
+ * Stylesheet for the Date Range Picker, for use with Bootstrap 3.x
+ *
+ * Copyright 2013-2015 Dan Grossman ( http://www.dangrossman.info )
+ * Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php
+ *
+ * Built for http://www.improvely.com
+ */
+
+ .daterangepicker.dropdown-menu {
+ max-width: none;
+ z-index: 3000;
+}
+
+.daterangepicker.opensleft .ranges, .daterangepicker.opensleft .calendar {
+ float: left;
+ margin: 4px;
+}
+
+.daterangepicker.opensright .ranges, .daterangepicker.opensright .calendar,
+.daterangepicker.openscenter .ranges, .daterangepicker.openscenter .calendar {
+ float: right;
+ margin: 4px;
+}
+
+.daterangepicker.single .ranges, .daterangepicker.single .calendar {
+ float: none;
+}
+
+.daterangepicker .ranges {
+ width: 165px;
+ text-align: left;
+}
+
+.daterangepicker .ranges .range_inputs>div {
+ float: left;
+}
+
+.daterangepicker .ranges .range_inputs>div:nth-child(2) {
+ padding-left: 11px;
+}
+
+.daterangepicker .calendar {
+ display: none;
+ max-width: 270px;
+}
+
+.daterangepicker.show-calendar .calendar {
+ display: block;
+}
+
+.daterangepicker .calendar.single .calendar-date {
+ border: none;
+}
+
+.daterangepicker .calendar th, .daterangepicker .calendar td {
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
+ white-space: nowrap;
+ text-align: center;
+ min-width: 32px;
+}
+
+.daterangepicker .daterangepicker_start_input label,
+.daterangepicker .daterangepicker_end_input label {
+ color: #333;
+ display: block;
+ font-size: 11px;
+ font-weight: normal;
+ height: 20px;
+ line-height: 20px;
+ margin-bottom: 2px;
+ text-shadow: #fff 1px 1px 0px;
+ text-transform: uppercase;
+ width: 74px;
+}
+
+.daterangepicker .ranges input {
+ font-size: 11px;
+}
+
+.daterangepicker .ranges .input-mini {
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ color: #555;
+ display: block;
+ font-size: 11px;
+ height: 30px;
+ line-height: 30px;
+ vertical-align: middle;
+ margin: 0 0 10px 0;
+ padding: 0 6px;
+ width: 77px;
+}
+
+.daterangepicker .ranges ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+
+.daterangepicker .ranges li {
+ font-size: 13px;
+ background: #f5f5f5;
+ border: 1px solid #f5f5f5;
+ color: #08c;
+ padding: 3px 12px;
+ margin-bottom: 8px;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ cursor: pointer;
+}
+
+.daterangepicker .ranges li.active, .daterangepicker .ranges li:hover {
+ background: #08c;
+ border: 1px solid #08c;
+ color: #fff;
+}
+
+.daterangepicker .calendar-date {
+ border: 1px solid #ddd;
+ padding: 4px;
+ border-radius: 4px;
+ background: #fff;
+}
+
+.daterangepicker .calendar-time {
+ text-align: center;
+ margin: 8px auto 0 auto;
+ line-height: 30px;
+}
+
+.daterangepicker {
+ position: absolute;
+ background: #fff;
+ top: 100px;
+ left: 20px;
+ padding: 4px;
+ margin-top: 1px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+
+.daterangepicker.opensleft:before {
+ position: absolute;
+ top: -7px;
+ right: 9px;
+ display: inline-block;
+ border-right: 7px solid transparent;
+ border-bottom: 7px solid #ccc;
+ border-left: 7px solid transparent;
+ border-bottom-color: rgba(0, 0, 0, 0.2);
+ content: '';
+}
+
+.daterangepicker.opensleft:after {
+ position: absolute;
+ top: -6px;
+ right: 10px;
+ display: inline-block;
+ border-right: 6px solid transparent;
+ border-bottom: 6px solid #fff;
+ border-left: 6px solid transparent;
+ content: '';
+}
+
+.daterangepicker.openscenter:before {
+ position: absolute;
+ top: -7px;
+ left: 0;
+ right: 0;
+ width: 0;
+ margin-left: auto;
+ margin-right: auto;
+ display: inline-block;
+ border-right: 7px solid transparent;
+ border-bottom: 7px solid #ccc;
+ border-left: 7px solid transparent;
+ border-bottom-color: rgba(0, 0, 0, 0.2);
+ content: '';
+}
+
+.daterangepicker.openscenter:after {
+ position: absolute;
+ top: -6px;
+ left: 0;
+ right: 0;
+ width: 0;
+ margin-left: auto;
+ margin-right: auto;
+ display: inline-block;
+ border-right: 6px solid transparent;
+ border-bottom: 6px solid #fff;
+ border-left: 6px solid transparent;
+ content: '';
+}
+
+.daterangepicker.opensright:before {
+ position: absolute;
+ top: -7px;
+ left: 9px;
+ display: inline-block;
+ border-right: 7px solid transparent;
+ border-bottom: 7px solid #ccc;
+ border-left: 7px solid transparent;
+ border-bottom-color: rgba(0, 0, 0, 0.2);
+ content: '';
+}
+
+.daterangepicker.opensright:after {
+ position: absolute;
+ top: -6px;
+ left: 10px;
+ display: inline-block;
+ border-right: 6px solid transparent;
+ border-bottom: 6px solid #fff;
+ border-left: 6px solid transparent;
+ content: '';
+}
+
+.daterangepicker table {
+ width: 100%;
+ margin: 0;
+}
+
+.daterangepicker td, .daterangepicker th {
+ text-align: center;
+ width: 20px;
+ height: 20px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ cursor: pointer;
+ white-space: nowrap;
+}
+
+.daterangepicker td.off {
+ color: #999;
+}
+
+.daterangepicker td.disabled, .daterangepicker option.disabled {
+ color: #999;
+}
+
+.daterangepicker td.available:hover, .daterangepicker th.available:hover {
+ background: #eee;
+}
+
+.daterangepicker td.in-range {
+ background: #ebf4f8;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+}
+
+.daterangepicker td.start-date {
+ -webkit-border-radius: 4px 0 0 4px;
+ -moz-border-radius: 4px 0 0 4px;
+ border-radius: 4px 0 0 4px;
+}
+
+.daterangepicker td.end-date {
+ -webkit-border-radius: 0 4px 4px 0;
+ -moz-border-radius: 0 4px 4px 0;
+ border-radius: 0 4px 4px 0;
+}
+
+.daterangepicker td.start-date.end-date {
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+
+.daterangepicker td.active, .daterangepicker td.active:hover {
+ background-color: #357ebd;
+ border-color: #3071a9;
+ color: #fff;
+}
+
+.daterangepicker td.week, .daterangepicker th.week {
+ font-size: 80%;
+ color: #ccc;
+}
+
+.daterangepicker select.monthselect, .daterangepicker select.yearselect {
+ font-size: 12px;
+ padding: 1px;
+ height: auto;
+ margin: 0;
+ cursor: default;
+}
+
+.daterangepicker select.monthselect {
+ margin-right: 2%;
+ width: 56%;
+}
+
+.daterangepicker select.yearselect {
+ width: 40%;
+}
+
+.daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.secondselect, .daterangepicker select.ampmselect {
+ width: 50px;
+ margin-bottom: 0;
+}
+
+.daterangepicker_start_input {
+ float: left;
+}
+
+.daterangepicker_end_input {
+ float: left;
+ padding-left: 11px
+}
+
+.daterangepicker th.month {
+ width: auto;
+}
diff --git a/common/src/main/webapp/thirdparty/bootstrap-daterangepicker/daterangepicker.js b/common/src/main/webapp/thirdparty/bootstrap-daterangepicker/daterangepicker.js
new file mode 100644
index 0000000..c24c0ad
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/bootstrap-daterangepicker/daterangepicker.js
@@ -0,0 +1,1257 @@
+/**
+* @version: 1.3.17
+* @author: Dan Grossman http://www.dangrossman.info/
+* @date: 2014-11-25
+* @copyright: Copyright (c) 2012-2014 Dan Grossman. All rights reserved.
+* @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php
+* @website: http://www.improvely.com/
+*/
+
+(function(root, factory) {
+
+ if (typeof define === 'function' && define.amd) {
+ define(['moment', 'jquery', 'exports'], function(momentjs, $, exports) {
+ root.daterangepicker = factory(root, exports, momentjs, $);
+ });
+
+ } else if (typeof exports !== 'undefined') {
+ var momentjs = require('moment');
+ var jQuery;
+ try {
+ jQuery = require('jquery');
+ } catch (err) {
+ jQuery = window.jQuery;
+ if (!jQuery) throw new Error('jQuery dependency not found');
+ }
+
+ factory(root, exports, momentjs, jQuery);
+
+ // Finally, as a browser global.
+ } else {
+ root.daterangepicker = factory(root, {}, root.moment, (root.jQuery || root.Zepto || root.ender || root.$));
+ }
+
+}(this, function(root, daterangepicker, moment, $) {
+
+ var DateRangePicker = function (element, options, cb) {
+
+ // by default, the daterangepicker element is placed at the bottom of HTML body
+ this.parentEl = 'body';
+
+ //element that triggered the date range picker
+ this.element = $(element);
+
+ //tracks visible state
+ this.isShowing = false;
+
+ //create the picker HTML object
+ var DRPTemplate = '<div class="daterangepicker dropdown-menu">' +
+ '<div class="calendar first left"></div>' +
+ '<div class="calendar second right"></div>' +
+ '<div class="ranges">' +
+ '<div class="range_inputs">' +
+ '<div class="daterangepicker_start_input">' +
+ '<label for="daterangepicker_start"></label>' +
+ '<input class="input-mini" type="text" name="daterangepicker_start" value="" />' +
+ '</div>' +
+ '<div class="daterangepicker_end_input">' +
+ '<label for="daterangepicker_end"></label>' +
+ '<input class="input-mini" type="text" name="daterangepicker_end" value="" />' +
+ '</div>' +
+ '<button class="applyBtn" disabled="disabled"></button>&nbsp;' +
+ '<button class="cancelBtn"></button>' +
+ '</div>' +
+ '</div>' +
+ '</div>';
+
+ //custom options
+ if (typeof options !== 'object' || options === null)
+ options = {};
+
+ this.parentEl = (typeof options === 'object' && options.parentEl && $(options.parentEl).length) ? $(options.parentEl) : $(this.parentEl);
+ this.container = $(DRPTemplate).appendTo(this.parentEl);
+
+ this.setOptions(options, cb);
+
+ //apply CSS classes and labels to buttons
+ var c = this.container;
+ $.each(this.buttonClasses, function (idx, val) {
+ c.find('button').addClass(val);
+ });
+ this.container.find('.daterangepicker_start_input label').html(this.locale.fromLabel);
+ this.container.find('.daterangepicker_end_input label').html(this.locale.toLabel);
+ if (this.applyClass.length)
+ this.container.find('.applyBtn').addClass(this.applyClass);
+ if (this.cancelClass.length)
+ this.container.find('.cancelBtn').addClass(this.cancelClass);
+ this.container.find('.applyBtn').html(this.locale.applyLabel);
+ this.container.find('.cancelBtn').html(this.locale.cancelLabel);
+
+ //event listeners
+
+ this.container.find('.calendar')
+ .on('click.daterangepicker', '.prev', $.proxy(this.clickPrev, this))
+ .on('click.daterangepicker', '.next', $.proxy(this.clickNext, this))
+ .on('click.daterangepicker', 'td.available', $.proxy(this.clickDate, this))
+ .on('mouseenter.daterangepicker', 'td.available', $.proxy(this.hoverDate, this))
+ .on('mouseleave.daterangepicker', 'td.available', $.proxy(this.updateFormInputs, this))
+ .on('change.daterangepicker', 'select.yearselect', $.proxy(this.updateMonthYear, this))
+ .on('change.daterangepicker', 'select.monthselect', $.proxy(this.updateMonthYear, this))
+ .on('change.daterangepicker', 'select.hourselect,select.minuteselect,select.secondselect,select.ampmselect', $.proxy(this.updateTime, this));
+
+ this.container.find('.ranges')
+ .on('click.daterangepicker', 'button.applyBtn', $.proxy(this.clickApply, this))
+ .on('click.daterangepicker', 'button.cancelBtn', $.proxy(this.clickCancel, this))
+ .on('click.daterangepicker', '.daterangepicker_start_input,.daterangepicker_end_input', $.proxy(this.showCalendars, this))
+ .on('change.daterangepicker', '.daterangepicker_start_input,.daterangepicker_end_input', $.proxy(this.inputsChanged, this))
+ .on('keydown.daterangepicker', '.daterangepicker_start_input,.daterangepicker_end_input', $.proxy(this.inputsKeydown, this))
+ .on('click.daterangepicker', 'li', $.proxy(this.clickRange, this))
+ .on('mouseenter.daterangepicker', 'li', $.proxy(this.enterRange, this))
+ .on('mouseleave.daterangepicker', 'li', $.proxy(this.updateFormInputs, this));
+
+ if (this.element.is('input')) {
+ this.element.on({
+ 'click.daterangepicker': $.proxy(this.show, this),
+ 'focus.daterangepicker': $.proxy(this.show, this),
+ 'keyup.daterangepicker': $.proxy(this.updateFromControl, this)
+ });
+ } else {
+ this.element.on('click.daterangepicker', $.proxy(this.toggle, this));
+ }
+
+ };
+
+ DateRangePicker.prototype = {
+
+ constructor: DateRangePicker,
+
+ setOptions: function(options, callback) {
+
+ this.startDate = moment().startOf('day');
+ this.endDate = moment().endOf('day');
+ this.timeZone = moment().zone();
+ this.minDate = false;
+ this.maxDate = false;
+ this.dateLimit = false;
+
+ this.showDropdowns = false;
+ this.showWeekNumbers = false;
+ this.timePicker = false;
+ this.timePickerSeconds = false;
+ this.timePickerIncrement = 30;
+ this.timePicker12Hour = true;
+ this.singleDatePicker = false;
+ this.ranges = {};
+
+ this.opens = 'right';
+ if (this.element.hasClass('pull-right'))
+ this.opens = 'left';
+
+ this.buttonClasses = ['btn', 'btn-small btn-sm'];
+ this.applyClass = 'btn-success';
+ this.cancelClass = 'btn-default';
+
+ this.format = 'MM/DD/YYYY';
+ this.separator = ' - ';
+
+ this.locale = {
+ applyLabel: 'Apply',
+ cancelLabel: 'Cancel',
+ fromLabel: 'From',
+ toLabel: 'To',
+ weekLabel: 'W',
+ customRangeLabel: 'Custom Range',
+ daysOfWeek: moment.weekdaysMin(),
+ monthNames: moment.monthsShort(),
+ firstDay: moment.localeData()._week.dow
+ };
+
+ this.cb = function () { };
+
+ if (typeof options.format === 'string')
+ this.format = options.format;
+
+ if (typeof options.separator === 'string')
+ this.separator = options.separator;
+
+ if (typeof options.startDate === 'string')
+ this.startDate = moment(options.startDate, this.format);
+
+ if (typeof options.endDate === 'string')
+ this.endDate = moment(options.endDate, this.format);
+
+ if (typeof options.minDate === 'string')
+ this.minDate = moment(options.minDate, this.format);
+
+ if (typeof options.maxDate === 'string')
+ this.maxDate = moment(options.maxDate, this.format);
+
+ if (typeof options.startDate === 'object')
+ this.startDate = moment(options.startDate);
+
+ if (typeof options.endDate === 'object')
+ this.endDate = moment(options.endDate);
+
+ if (typeof options.minDate === 'object')
+ this.minDate = moment(options.minDate);
+
+ if (typeof options.maxDate === 'object')
+ this.maxDate = moment(options.maxDate);
+
+ if (typeof options.applyClass === 'string')
+ this.applyClass = options.applyClass;
+
+ if (typeof options.cancelClass === 'string')
+ this.cancelClass = options.cancelClass;
+
+ if (typeof options.dateLimit === 'object')
+ this.dateLimit = options.dateLimit;
+
+ if (typeof options.locale === 'object') {
+
+ if (typeof options.locale.daysOfWeek === 'object') {
+ // Create a copy of daysOfWeek to avoid modification of original
+ // options object for reusability in multiple daterangepicker instances
+ this.locale.daysOfWeek = options.locale.daysOfWeek.slice();
+ }
+
+ if (typeof options.locale.monthNames === 'object') {
+ this.locale.monthNames = options.locale.monthNames.slice();
+ }
+
+ if (typeof options.locale.firstDay === 'number') {
+ this.locale.firstDay = options.locale.firstDay;
+ }
+
+ if (typeof options.locale.applyLabel === 'string') {
+ this.locale.applyLabel = options.locale.applyLabel;
+ }
+
+ if (typeof options.locale.cancelLabel === 'string') {
+ this.locale.cancelLabel = options.locale.cancelLabel;
+ }
+
+ if (typeof options.locale.fromLabel === 'string') {
+ this.locale.fromLabel = options.locale.fromLabel;
+ }
+
+ if (typeof options.locale.toLabel === 'string') {
+ this.locale.toLabel = options.locale.toLabel;
+ }
+
+ if (typeof options.locale.weekLabel === 'string') {
+ this.locale.weekLabel = options.locale.weekLabel;
+ }
+
+ if (typeof options.locale.customRangeLabel === 'string') {
+ this.locale.customRangeLabel = options.locale.customRangeLabel;
+ }
+ }
+
+ if (typeof options.opens === 'string')
+ this.opens = options.opens;
+
+ if (typeof options.showWeekNumbers === 'boolean') {
+ this.showWeekNumbers = options.showWeekNumbers;
+ }
+
+ if (typeof options.buttonClasses === 'string') {
+ this.buttonClasses = [options.buttonClasses];
+ }
+
+ if (typeof options.buttonClasses === 'object') {
+ this.buttonClasses = options.buttonClasses;
+ }
+
+ if (typeof options.showDropdowns === 'boolean') {
+ this.showDropdowns = options.showDropdowns;
+ }
+
+ if (typeof options.singleDatePicker === 'boolean') {
+ this.singleDatePicker = options.singleDatePicker;
+ if (this.singleDatePicker) {
+ this.endDate = this.startDate.clone();
+ }
+ }
+
+ if (typeof options.timePicker === 'boolean') {
+ this.timePicker = options.timePicker;
+ }
+
+ if (typeof options.timePickerSeconds === 'boolean') {
+ this.timePickerSeconds = options.timePickerSeconds;
+ }
+
+ if (typeof options.timePickerIncrement === 'number') {
+ this.timePickerIncrement = options.timePickerIncrement;
+ }
+
+ if (typeof options.timePicker12Hour === 'boolean') {
+ this.timePicker12Hour = options.timePicker12Hour;
+ }
+
+ // update day names order to firstDay
+ if (this.locale.firstDay != 0) {
+ var iterator = this.locale.firstDay;
+ while (iterator > 0) {
+ this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift());
+ iterator--;
+ }
+ }
+
+ var start, end, range;
+
+ //if no start/end dates set, check if an input element contains initial values
+ if (typeof options.startDate === 'undefined' && typeof options.endDate === 'undefined') {
+ if ($(this.element).is('input[type=text]')) {
+ var val = $(this.element).val(),
+ split = val.split(this.separator);
+
+ start = end = null;
+
+ if (split.length == 2) {
+ start = moment(split[0], this.format);
+ end = moment(split[1], this.format);
+ } else if (this.singleDatePicker && val !== "") {
+ start = moment(val, this.format);
+ end = moment(val, this.format);
+ }
+ if (start !== null && end !== null) {
+ this.startDate = start;
+ this.endDate = end;
+ }
+ }
+ }
+
+ // bind the time zone used to build the calendar to either the timeZone passed in through the options or the zone of the startDate (which will be the local time zone by default)
+ if (typeof options.timeZone === 'string' || typeof options.timeZone === 'number') {
+ this.timeZone = options.timeZone;
+ this.startDate.zone(this.timeZone);
+ this.endDate.zone(this.timeZone);
+ } else {
+ this.timeZone = moment(this.startDate).zone();
+ }
+
+ if (typeof options.ranges === 'object') {
+ for (range in options.ranges) {
+
+ if (typeof options.ranges[range][0] === 'string')
+ start = moment(options.ranges[range][0], this.format);
+ else
+ start = moment(options.ranges[range][0]);
+
+ if (typeof options.ranges[range][1] === 'string')
+ end = moment(options.ranges[range][1], this.format);
+ else
+ end = moment(options.ranges[range][1]);
+
+ // If we have a min/max date set, bound this range
+ // to it, but only if it would otherwise fall
+ // outside of the min/max.
+ if (this.minDate && start.isBefore(this.minDate))
+ start = moment(this.minDate);
+
+ if (this.maxDate && end.isAfter(this.maxDate))
+ end = moment(this.maxDate);
+
+ // If the end of the range is before the minimum (if min is set) OR
+ // the start of the range is after the max (also if set) don't display this
+ // range option.
+ if ((this.minDate && end.isBefore(this.minDate)) || (this.maxDate && start.isAfter(this.maxDate))) {
+ continue;
+ }
+
+ this.ranges[range] = [start, end];
+ }
+
+ var list = '<ul>';
+ for (range in this.ranges) {
+ list += '<li>' + range + '</li>';
+ }
+ list += '<li>' + this.locale.customRangeLabel + '</li>';
+ list += '</ul>';
+ this.container.find('.ranges ul').remove();
+ this.container.find('.ranges').prepend(list);
+ }
+
+ if (typeof callback === 'function') {
+ this.cb = callback;
+ }
+
+ if (!this.timePicker) {
+ this.startDate = this.startDate.startOf('day');
+ this.endDate = this.endDate.endOf('day');
+ }
+
+ if (this.singleDatePicker) {
+ this.opens = 'right';
+ this.container.addClass('single');
+ this.container.find('.calendar.right').show();
+ this.container.find('.calendar.left').hide();
+ if (!this.timePicker) {
+ this.container.find('.ranges').hide();
+ } else {
+ this.container.find('.ranges .daterangepicker_start_input, .ranges .daterangepicker_end_input').hide();
+ }
+ if (!this.container.find('.calendar.right').hasClass('single'))
+ this.container.find('.calendar.right').addClass('single');
+ } else {
+ this.container.removeClass('single');
+ this.container.find('.calendar.right').removeClass('single');
+ this.container.find('.ranges').show();
+ }
+
+ this.oldStartDate = this.startDate.clone();
+ this.oldEndDate = this.endDate.clone();
+ this.oldChosenLabel = this.chosenLabel;
+
+ this.leftCalendar = {
+ month: moment([this.startDate.year(), this.startDate.month(), 1, this.startDate.hour(), this.startDate.minute(), this.startDate.second()]),
+ calendar: []
+ };
+
+ this.rightCalendar = {
+ month: moment([this.endDate.year(), this.endDate.month(), 1, this.endDate.hour(), this.endDate.minute(), this.endDate.second()]),
+ calendar: []
+ };
+
+ if (this.opens == 'right' || this.opens == 'center') {
+ //swap calendar positions
+ var first = this.container.find('.calendar.first');
+ var second = this.container.find('.calendar.second');
+
+ if (second.hasClass('single')) {
+ second.removeClass('single');
+ first.addClass('single');
+ }
+
+ first.removeClass('left').addClass('right');
+ second.removeClass('right').addClass('left');
+
+ if (this.singleDatePicker) {
+ first.show();
+ second.hide();
+ }
+ }
+
+ if (typeof options.ranges === 'undefined' && !this.singleDatePicker) {
+ this.container.addClass('show-calendar');
+ }
+
+ this.container.addClass('opens' + this.opens);
+
+ this.updateView();
+ this.updateCalendars();
+
+ },
+
+ setStartDate: function(startDate) {
+ if (typeof startDate === 'string')
+ this.startDate = moment(startDate, this.format).zone(this.timeZone);
+
+ if (typeof startDate === 'object')
+ this.startDate = moment(startDate);
+
+ if (!this.timePicker)
+ this.startDate = this.startDate.startOf('day');
+
+ this.oldStartDate = this.startDate.clone();
+
+ this.updateView();
+ this.updateCalendars();
+ this.updateInputText();
+ },
+
+ setEndDate: function(endDate) {
+ if (typeof endDate === 'string')
+ this.endDate = moment(endDate, this.format).zone(this.timeZone);
+
+ if (typeof endDate === 'object')
+ this.endDate = moment(endDate);
+
+ if (!this.timePicker)
+ this.endDate = this.endDate.endOf('day');
+
+ this.oldEndDate = this.endDate.clone();
+
+ this.updateView();
+ this.updateCalendars();
+ this.updateInputText();
+ },
+
+ updateView: function () {
+ this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()).hour(this.startDate.hour()).minute(this.startDate.minute());
+ this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()).hour(this.endDate.hour()).minute(this.endDate.minute());
+ this.updateFormInputs();
+ },
+
+ updateFormInputs: function () {
+ this.container.find('input[name=daterangepicker_start]').val(this.startDate.format(this.format));
+ this.container.find('input[name=daterangepicker_end]').val(this.endDate.format(this.format));
+
+ if (this.startDate.isSame(this.endDate) || this.startDate.isBefore(this.endDate)) {
+ this.container.find('button.applyBtn').removeAttr('disabled');
+ } else {
+ this.container.find('button.applyBtn').attr('disabled', 'disabled');
+ }
+ },
+
+ updateFromControl: function () {
+ if (!this.element.is('input')) return;
+ if (!this.element.val().length) return;
+
+ var dateString = this.element.val().split(this.separator),
+ start = null,
+ end = null;
+
+ if(dateString.length === 2) {
+ start = moment(dateString[0], this.format).zone(this.timeZone);
+ end = moment(dateString[1], this.format).zone(this.timeZone);
+ }
+
+ if (this.singleDatePicker || start === null || end === null) {
+ start = moment(this.element.val(), this.format).zone(this.timeZone);
+ end = start;
+ }
+
+ if (end.isBefore(start)) return;
+
+ this.oldStartDate = this.startDate.clone();
+ this.oldEndDate = this.endDate.clone();
+
+ this.startDate = start;
+ this.endDate = end;
+
+ if (!this.startDate.isSame(this.oldStartDate) || !this.endDate.isSame(this.oldEndDate))
+ this.notify();
+
+ this.updateCalendars();
+ },
+
+ notify: function () {
+ this.updateView();
+ this.cb(this.startDate, this.endDate, this.chosenLabel);
+ },
+
+ move: function () {
+ var parentOffset = { top: 0, left: 0 };
+ var parentRightEdge = $(window).width();
+ if (!this.parentEl.is('body')) {
+ parentOffset = {
+ top: this.parentEl.offset().top - this.parentEl.scrollTop(),
+ left: this.parentEl.offset().left - this.parentEl.scrollLeft()
+ };
+ parentRightEdge = this.parentEl[0].clientWidth + this.parentEl.offset().left;
+ }
+
+ if (this.opens == 'left') {
+ this.container.css({
+ top: this.element.offset().top + this.element.outerHeight() - parentOffset.top,
+ right: parentRightEdge - this.element.offset().left - this.element.outerWidth(),
+ left: 'auto'
+ });
+ if (this.container.offset().left < 0) {
+ this.container.css({
+ right: 'auto',
+ left: 9
+ });
+ }
+ } else if (this.opens == 'center') {
+ this.container.css({
+ top: this.element.offset().top + this.element.outerHeight() - parentOffset.top,
+ left: this.element.offset().left - parentOffset.left + this.element.outerWidth() / 2
+ - this.container.outerWidth() / 2,
+ right: 'auto'
+ });
+ if (this.container.offset().left < 0) {
+ this.container.css({
+ right: 'auto',
+ left: 9
+ });
+ }
+ } else {
+ this.container.css({
+ top: this.element.offset().top + this.element.outerHeight() - parentOffset.top,
+ left: this.element.offset().left - parentOffset.left,
+ right: 'auto'
+ });
+ if (this.container.offset().left + this.container.outerWidth() > $(window).width()) {
+ this.container.css({
+ left: 'auto',
+ right: 0
+ });
+ }
+ }
+ },
+
+ toggle: function (e) {
+ if (this.element.hasClass('active')) {
+ this.hide();
+ } else {
+ this.show();
+ }
+ },
+
+ show: function (e) {
+ if (this.isShowing) return;
+
+ this.element.addClass('active');
+ this.container.show();
+ this.move();
+
+ // Create a click proxy that is private to this instance of datepicker, for unbinding
+ this._outsideClickProxy = $.proxy(function (e) { this.outsideClick(e); }, this);
+ // Bind global datepicker mousedown for hiding and
+ $(document)
+ .on('mousedown.daterangepicker', this._outsideClickProxy)
+ // also support mobile devices
+ .on('touchend.daterangepicker', this._outsideClickProxy)
+ // also explicitly play nice with Bootstrap dropdowns, which stopPropagation when clicking them
+ .on('click.daterangepicker', '[data-toggle=dropdown]', this._outsideClickProxy)
+ // and also close when focus changes to outside the picker (eg. tabbing between controls)
+ .on('focusin.daterangepicker', this._outsideClickProxy);
+
+ this.isShowing = true;
+ this.element.trigger('show.daterangepicker', this);
+ },
+
+ outsideClick: function (e) {
+ var target = $(e.target);
+ // if the page is clicked anywhere except within the daterangerpicker/button
+ // itself then call this.hide()
+ if (
+ // ie modal dialog fix
+ e.type == "focusin" ||
+ target.closest(this.element).length ||
+ target.closest(this.container).length ||
+ target.closest('.calendar-date').length
+ ) return;
+ this.hide();
+ },
+
+ hide: function (e) {
+ if (!this.isShowing) return;
+
+ $(document)
+ .off('.daterangepicker');
+
+ this.element.removeClass('active');
+ this.container.hide();
+
+ if (!this.startDate.isSame(this.oldStartDate) || !this.endDate.isSame(this.oldEndDate))
+ this.notify();
+
+ this.oldStartDate = this.startDate.clone();
+ this.oldEndDate = this.endDate.clone();
+
+ this.isShowing = false;
+ this.element.trigger('hide.daterangepicker', this);
+ },
+
+ enterRange: function (e) {
+ // mouse pointer has entered a range label
+ var label = e.target.innerHTML;
+ if (label == this.locale.customRangeLabel) {
+ this.updateView();
+ } else {
+ var dates = this.ranges[label];
+ this.container.find('input[name=daterangepicker_start]').val(dates[0].format(this.format));
+ this.container.find('input[name=daterangepicker_end]').val(dates[1].format(this.format));
+ }
+ },
+
+ showCalendars: function() {
+ this.container.addClass('show-calendar');
+ this.move();
+ this.element.trigger('showCalendar.daterangepicker', this);
+ },
+
+ hideCalendars: function() {
+ this.container.removeClass('show-calendar');
+ this.element.trigger('hideCalendar.daterangepicker', this);
+ },
+
+ // when a date is typed into the start to end date textboxes
+ inputsChanged: function (e) {
+ var el = $(e.target);
+ var date = moment(el.val(), this.format);
+ if (!date.isValid()) return;
+
+ var startDate, endDate;
+ if (el.attr('name') === 'daterangepicker_start') {
+ startDate = date;
+ endDate = this.endDate;
+ } else {
+ startDate = this.startDate;
+ endDate = date;
+ }
+ this.setCustomDates(startDate, endDate);
+ },
+
+ inputsKeydown: function(e) {
+ if (e.keyCode === 13) {
+ this.inputsChanged(e);
+ this.notify();
+ }
+ },
+
+ updateInputText: function() {
+ if (this.element.is('input') && !this.singleDatePicker) {
+ this.element.val(this.startDate.format(this.format) + this.separator + this.endDate.format(this.format));
+ } else if (this.element.is('input')) {
+ this.element.val(this.endDate.format(this.format));
+ }
+ },
+
+ clickRange: function (e) {
+ var label = e.target.innerHTML;
+ this.chosenLabel = label;
+ if (label == this.locale.customRangeLabel) {
+ this.showCalendars();
+ } else {
+ var dates = this.ranges[label];
+
+ this.startDate = dates[0];
+ this.endDate = dates[1];
+
+ if (!this.timePicker) {
+ this.startDate.startOf('day');
+ this.endDate.endOf('day');
+ }
+
+ this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()).hour(this.startDate.hour()).minute(this.startDate.minute());
+ this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()).hour(this.endDate.hour()).minute(this.endDate.minute());
+ this.updateCalendars();
+
+ this.updateInputText();
+
+ this.hideCalendars();
+ this.hide();
+ this.element.trigger('apply.daterangepicker', this);
+ }
+ },
+
+ clickPrev: function (e) {
+ var cal = $(e.target).parents('.calendar');
+ if (cal.hasClass('left')) {
+ this.leftCalendar.month.subtract(1, 'month');
+ } else {
+ this.rightCalendar.month.subtract(1, 'month');
+ }
+ this.updateCalendars();
+ },
+
+ clickNext: function (e) {
+ var cal = $(e.target).parents('.calendar');
+ if (cal.hasClass('left')) {
+ this.leftCalendar.month.add(1, 'month');
+ } else {
+ this.rightCalendar.month.add(1, 'month');
+ }
+ this.updateCalendars();
+ },
+
+ hoverDate: function (e) {
+ var title = $(e.target).attr('data-title');
+ var row = title.substr(1, 1);
+ var col = title.substr(3, 1);
+ var cal = $(e.target).parents('.calendar');
+
+ if (cal.hasClass('left')) {
+ this.container.find('input[name=daterangepicker_start]').val(this.leftCalendar.calendar[row][col].format(this.format));
+ } else {
+ this.container.find('input[name=daterangepicker_end]').val(this.rightCalendar.calendar[row][col].format(this.format));
+ }
+ },
+
+ setCustomDates: function(startDate, endDate) {
+ this.chosenLabel = this.locale.customRangeLabel;
+ if (startDate.isAfter(endDate)) {
+ var difference = this.endDate.diff(this.startDate);
+ endDate = moment(startDate).add(difference, 'ms');
+ if (this.maxDate && endDate.isAfter(this.maxDate)) {
+ endDate = this.maxDate;
+ }
+ }
+ this.startDate = startDate;
+ this.endDate = endDate;
+
+ this.updateView();
+ this.updateCalendars();
+ },
+
+ clickDate: function (e) {
+ var title = $(e.target).attr('data-title');
+ var row = title.substr(1, 1);
+ var col = title.substr(3, 1);
+ var cal = $(e.target).parents('.calendar');
+
+ var startDate, endDate;
+ if (cal.hasClass('left')) {
+ startDate = this.leftCalendar.calendar[row][col];
+ endDate = this.endDate;
+ if (typeof this.dateLimit === 'object') {
+ var maxDate = moment(startDate).add(this.dateLimit).startOf('day');
+ if (endDate.isAfter(maxDate)) {
+ endDate = maxDate;
+ }
+ }
+ } else {
+ startDate = this.startDate;
+ endDate = this.rightCalendar.calendar[row][col];
+ if (typeof this.dateLimit === 'object') {
+ var minDate = moment(endDate).subtract(this.dateLimit).startOf('day');
+ if (startDate.isBefore(minDate)) {
+ startDate = minDate;
+ }
+ }
+ }
+
+ if (this.singleDatePicker && cal.hasClass('left')) {
+ endDate = startDate.clone();
+ } else if (this.singleDatePicker && cal.hasClass('right')) {
+ startDate = endDate.clone();
+ }
+
+ cal.find('td').removeClass('active');
+
+ $(e.target).addClass('active');
+
+ this.setCustomDates(startDate, endDate);
+
+ if (!this.timePicker)
+ endDate.endOf('day');
+
+ if (this.singleDatePicker && !this.timePicker)
+ this.clickApply();
+ },
+
+ clickApply: function (e) {
+ this.updateInputText();
+ this.hide();
+ this.element.trigger('apply.daterangepicker', this);
+ },
+
+ clickCancel: function (e) {
+ this.startDate = this.oldStartDate;
+ this.endDate = this.oldEndDate;
+ this.chosenLabel = this.oldChosenLabel;
+ this.updateView();
+ this.updateCalendars();
+ this.hide();
+ this.element.trigger('cancel.daterangepicker', this);
+ },
+
+ updateMonthYear: function (e) {
+ var isLeft = $(e.target).closest('.calendar').hasClass('left'),
+ leftOrRight = isLeft ? 'left' : 'right',
+ cal = this.container.find('.calendar.'+leftOrRight);
+
+ // Month must be Number for new moment versions
+ var month = parseInt(cal.find('.monthselect').val(), 10);
+ var year = cal.find('.yearselect').val();
+
+ this[leftOrRight+'Calendar'].month.month(month).year(year);
+ this.updateCalendars();
+ },
+
+ updateTime: function(e) {
+
+ var cal = $(e.target).closest('.calendar'),
+ isLeft = cal.hasClass('left');
+
+ var hour = parseInt(cal.find('.hourselect').val(), 10);
+ var minute = parseInt(cal.find('.minuteselect').val(), 10);
+ var second = 0;
+
+ if (this.timePickerSeconds) {
+ second = parseInt(cal.find('.secondselect').val(), 10);
+ }
+
+ if (this.timePicker12Hour) {
+ var ampm = cal.find('.ampmselect').val();
+ if (ampm === 'PM' && hour < 12)
+ hour += 12;
+ if (ampm === 'AM' && hour === 12)
+ hour = 0;
+ }
+
+ if (isLeft) {
+ var start = this.startDate.clone();
+ start.hour(hour);
+ start.minute(minute);
+ start.second(second);
+ this.startDate = start;
+ this.leftCalendar.month.hour(hour).minute(minute).second(second);
+ if (this.singleDatePicker)
+ this.endDate = start.clone();
+ } else {
+ var end = this.endDate.clone();
+ end.hour(hour);
+ end.minute(minute);
+ end.second(second);
+ this.endDate = end;
+ if (this.singleDatePicker)
+ this.startDate = end.clone();
+ this.rightCalendar.month.hour(hour).minute(minute).second(second);
+ }
+
+ this.updateView();
+ this.updateCalendars();
+ },
+
+ updateCalendars: function () {
+ this.leftCalendar.calendar = this.buildCalendar(this.leftCalendar.month.month(), this.leftCalendar.month.year(), this.leftCalendar.month.hour(), this.leftCalendar.month.minute(), this.leftCalendar.month.second(), 'left');
+ this.rightCalendar.calendar = this.buildCalendar(this.rightCalendar.month.month(), this.rightCalendar.month.year(), this.rightCalendar.month.hour(), this.rightCalendar.month.minute(), this.rightCalendar.month.second(), 'right');
+ this.container.find('.calendar.left').empty().html(this.renderCalendar(this.leftCalendar.calendar, this.startDate, this.minDate, this.maxDate, 'left'));
+ this.container.find('.calendar.right').empty().html(this.renderCalendar(this.rightCalendar.calendar, this.endDate, this.singleDatePicker ? this.minDate : this.startDate, this.maxDate, 'right'));
+
+ this.container.find('.ranges li').removeClass('active');
+ var customRange = true;
+ var i = 0;
+ for (var range in this.ranges) {
+ if (this.timePicker) {
+ if (this.startDate.isSame(this.ranges[range][0]) && this.endDate.isSame(this.ranges[range][1])) {
+ customRange = false;
+ this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')')
+ .addClass('active').html();
+ }
+ } else {
+ //ignore times when comparing dates if time picker is not enabled
+ if (this.startDate.format('YYYY-MM-DD') == this.ranges[range][0].format('YYYY-MM-DD') && this.endDate.format('YYYY-MM-DD') == this.ranges[range][1].format('YYYY-MM-DD')) {
+ customRange = false;
+ this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')')
+ .addClass('active').html();
+ }
+ }
+ i++;
+ }
+ if (customRange) {
+ this.chosenLabel = this.container.find('.ranges li:last').addClass('active').html();
+ this.showCalendars();
+ }
+ },
+
+ buildCalendar: function (month, year, hour, minute, second, side) {
+ var daysInMonth = moment([year, month]).daysInMonth();
+ var firstDay = moment([year, month, 1]);
+ var lastDay = moment([year, month, daysInMonth]);
+ var lastMonth = moment(firstDay).subtract(1, 'month').month();
+ var lastYear = moment(firstDay).subtract(1, 'month').year();
+
+ var daysInLastMonth = moment([lastYear, lastMonth]).daysInMonth();
+
+ var dayOfWeek = firstDay.day();
+
+ var i;
+
+ //initialize a 6 rows x 7 columns array for the calendar
+ var calendar = [];
+ calendar.firstDay = firstDay;
+ calendar.lastDay = lastDay;
+
+ for (i = 0; i < 6; i++) {
+ calendar[i] = [];
+ }
+
+ //populate the calendar with date objects
+ var startDay = daysInLastMonth - dayOfWeek + this.locale.firstDay + 1;
+ if (startDay > daysInLastMonth)
+ startDay -= 7;
+
+ if (dayOfWeek == this.locale.firstDay)
+ startDay = daysInLastMonth - 6;
+
+ var curDate = moment([lastYear, lastMonth, startDay, 12, minute, second]).zone(this.timeZone);
+
+ var col, row;
+ for (i = 0, col = 0, row = 0; i < 42; i++, col++, curDate = moment(curDate).add(24, 'hour')) {
+ if (i > 0 && col % 7 === 0) {
+ col = 0;
+ row++;
+ }
+ calendar[row][col] = curDate.clone().hour(hour);
+ curDate.hour(12);
+
+ if (this.minDate && calendar[row][col].format('YYYY-MM-DD') == this.minDate.format('YYYY-MM-DD') && calendar[row][col].isBefore(this.minDate) && side == 'left') {
+ calendar[row][col] = this.minDate.clone();
+ }
+
+ if (this.maxDate && calendar[row][col].format('YYYY-MM-DD') == this.maxDate.format('YYYY-MM-DD') && calendar[row][col].isAfter(this.maxDate) && side == 'right') {
+ calendar[row][col] = this.maxDate.clone();
+ }
+
+ }
+
+ return calendar;
+ },
+
+ renderDropdowns: function (selected, minDate, maxDate) {
+ var currentMonth = selected.month();
+ var currentYear = selected.year();
+ var maxYear = (maxDate && maxDate.year()) || (currentYear + 5);
+ var minYear = (minDate && minDate.year()) || (currentYear - 50);
+
+ var monthHtml = '<select class="monthselect">';
+ var inMinYear = currentYear == minYear;
+ var inMaxYear = currentYear == maxYear;
+
+ for (var m = 0; m < 12; m++) {
+ if ((!inMinYear || m >= minDate.month()) && (!inMaxYear || m <= maxDate.month())) {
+ monthHtml += "<option value='" + m + "'" +
+ (m === currentMonth ? " selected='selected'" : "") +
+ ">" + this.locale.monthNames[m] + "</option>";
+ }
+ }
+ monthHtml += "</select>";
+
+ var yearHtml = '<select class="yearselect">';
+
+ for (var y = minYear; y <= maxYear; y++) {
+ yearHtml += '<option value="' + y + '"' +
+ (y === currentYear ? ' selected="selected"' : '') +
+ '>' + y + '</option>';
+ }
+
+ yearHtml += '</select>';
+
+ return monthHtml + yearHtml;
+ },
+
+ renderCalendar: function (calendar, selected, minDate, maxDate, side) {
+
+ var html = '<div class="calendar-date">';
+ html += '<table class="table-condensed">';
+ html += '<thead>';
+ html += '<tr>';
+
+ // add empty cell for week number
+ if (this.showWeekNumbers)
+ html += '<th></th>';
+
+ if (!minDate || minDate.isBefore(calendar.firstDay)) {
+ html += '<th class="prev available"><i class="fa fa-arrow-left icon icon-arrow-left glyphicon glyphicon-arrow-left"></i></th>';
+ } else {
+ html += '<th></th>';
+ }
+
+ var dateHtml = this.locale.monthNames[calendar[1][1].month()] + calendar[1][1].format(" YYYY");
+
+ if (this.showDropdowns) {
+ dateHtml = this.renderDropdowns(calendar[1][1], minDate, maxDate);
+ }
+
+ html += '<th colspan="5" class="month">' + dateHtml + '</th>';
+ if (!maxDate || maxDate.isAfter(calendar.lastDay)) {
+ html += '<th class="next available"><i class="fa fa-arrow-right icon icon-arrow-right glyphicon glyphicon-arrow-right"></i></th>';
+ } else {
+ html += '<th></th>';
+ }
+
+ html += '</tr>';
+ html += '<tr>';
+
+ // add week number label
+ if (this.showWeekNumbers)
+ html += '<th class="week">' + this.locale.weekLabel + '</th>';
+
+ $.each(this.locale.daysOfWeek, function (index, dayOfWeek) {
+ html += '<th>' + dayOfWeek + '</th>';
+ });
+
+ html += '</tr>';
+ html += '</thead>';
+ html += '<tbody>';
+
+ for (var row = 0; row < 6; row++) {
+ html += '<tr>';
+
+ // add week number
+ if (this.showWeekNumbers)
+ html += '<td class="week">' + calendar[row][0].week() + '</td>';
+
+ for (var col = 0; col < 7; col++) {
+ var cname = 'available ';
+ cname += (calendar[row][col].month() == calendar[1][1].month()) ? '' : 'off';
+
+ if ((minDate && calendar[row][col].isBefore(minDate, 'day')) || (maxDate && calendar[row][col].isAfter(maxDate, 'day'))) {
+ cname = ' off disabled ';
+ } else if (calendar[row][col].format('YYYY-MM-DD') == selected.format('YYYY-MM-DD')) {
+ cname += ' active ';
+ if (calendar[row][col].format('YYYY-MM-DD') == this.startDate.format('YYYY-MM-DD')) {
+ cname += ' start-date ';
+ }
+ if (calendar[row][col].format('YYYY-MM-DD') == this.endDate.format('YYYY-MM-DD')) {
+ cname += ' end-date ';
+ }
+ } else if (calendar[row][col] >= this.startDate && calendar[row][col] <= this.endDate) {
+ cname += ' in-range ';
+ if (calendar[row][col].isSame(this.startDate)) { cname += ' start-date '; }
+ if (calendar[row][col].isSame(this.endDate)) { cname += ' end-date '; }
+ }
+
+ var title = 'r' + row + 'c' + col;
+ html += '<td class="' + cname.replace(/\s+/g, ' ').replace(/^\s?(.*?)\s?$/, '$1') + '" data-title="' + title + '">' + calendar[row][col].date() + '</td>';
+ }
+ html += '</tr>';
+ }
+
+ html += '</tbody>';
+ html += '</table>';
+ html += '</div>';
+
+ var i;
+ if (this.timePicker) {
+
+ html += '<div class="calendar-time">';
+ html += '<select class="hourselect">';
+
+ // Disallow selections before the minDate or after the maxDate
+ var min_hour = 0;
+ var max_hour = 23;
+
+ if (minDate && (side == 'left' || this.singleDatePicker) && selected.format('YYYY-MM-DD') == minDate.format('YYYY-MM-DD')) {
+ min_hour = minDate.hour();
+ if (selected.hour() < min_hour)
+ selected.hour(min_hour);
+ if (this.timePicker12Hour && min_hour >= 12 && selected.hour() >= 12)
+ min_hour -= 12;
+ if (this.timePicker12Hour && min_hour == 12)
+ min_hour = 1;
+ }
+
+ if (maxDate && (side == 'right' || this.singleDatePicker) && selected.format('YYYY-MM-DD') == maxDate.format('YYYY-MM-DD')) {
+ max_hour = maxDate.hour();
+ if (selected.hour() > max_hour)
+ selected.hour(max_hour);
+ if (this.timePicker12Hour && max_hour >= 12 && selected.hour() >= 12)
+ max_hour -= 12;
+ }
+
+ var start = 0;
+ var end = 23;
+ var selected_hour = selected.hour();
+ if (this.timePicker12Hour) {
+ start = 1;
+ end = 12;
+ if (selected_hour >= 12)
+ selected_hour -= 12;
+ if (selected_hour === 0)
+ selected_hour = 12;
+ }
+
+ for (i = start; i <= end; i++) {
+
+ if (i == selected_hour) {
+ html += '<option value="' + i + '" selected="selected">' + i + '</option>';
+ } else if (i < min_hour || i > max_hour) {
+ html += '<option value="' + i + '" disabled="disabled" class="disabled">' + i + '</option>';
+ } else {
+ html += '<option value="' + i + '">' + i + '</option>';
+ }
+ }
+
+ html += '</select> : ';
+
+ html += '<select class="minuteselect">';
+
+ // Disallow selections before the minDate or after the maxDate
+ var min_minute = 0;
+ var max_minute = 59;
+
+ if (minDate && (side == 'left' || this.singleDatePicker) && selected.format('YYYY-MM-DD h A') == minDate.format('YYYY-MM-DD h A')) {
+ min_minute = minDate.minute();
+ if (selected.minute() < min_minute)
+ selected.minute(min_minute);
+ }
+
+ if (maxDate && (side == 'right' || this.singleDatePicker) && selected.format('YYYY-MM-DD h A') == maxDate.format('YYYY-MM-DD h A')) {
+ max_minute = maxDate.minute();
+ if (selected.minute() > max_minute)
+ selected.minute(max_minute);
+ }
+
+ for (i = 0; i < 60; i += this.timePickerIncrement) {
+ var num = i;
+ if (num < 10)
+ num = '0' + num;
+ if (i == selected.minute()) {
+ html += '<option value="' + i + '" selected="selected">' + num + '</option>';
+ } else if (i < min_minute || i > max_minute) {
+ html += '<option value="' + i + '" disabled="disabled" class="disabled">' + num + '</option>';
+ } else {
+ html += '<option value="' + i + '">' + num + '</option>';
+ }
+ }
+
+ html += '</select> ';
+
+ if (this.timePickerSeconds) {
+ html += ': <select class="secondselect">';
+
+ for (i = 0; i < 60; i += this.timePickerIncrement) {
+ var num = i;
+ if (num < 10)
+ num = '0' + num;
+ if (i == selected.second()) {
+ html += '<option value="' + i + '" selected="selected">' + num + '</option>';
+ } else {
+ html += '<option value="' + i + '">' + num + '</option>';
+ }
+ }
+
+ html += '</select>';
+ }
+
+ if (this.timePicker12Hour) {
+ html += '<select class="ampmselect">';
+
+ // Disallow selection before the minDate or after the maxDate
+ var am_html = '';
+ var pm_html = '';
+
+ if (minDate && (side == 'left' || this.singleDatePicker) && selected.format('YYYY-MM-DD') == minDate.format('YYYY-MM-DD') && minDate.hour() >= 12) {
+ am_html = ' disabled="disabled" class="disabled"';
+ }
+
+ if (maxDate && (side == 'right' || this.singleDatePicker) && selected.format('YYYY-MM-DD') == maxDate.format('YYYY-MM-DD') && maxDate.hour() < 12) {
+ pm_html = ' disabled="disabled" class="disabled"';
+ }
+
+ if (selected.hour() >= 12) {
+ html += '<option value="AM"' + am_html + '>AM</option><option value="PM" selected="selected"' + pm_html + '>PM</option>';
+ } else {
+ html += '<option value="AM" selected="selected"' + am_html + '>AM</option><option value="PM"' + pm_html + '>PM</option>';
+ }
+ html += '</select>';
+ }
+
+ html += '</div>';
+
+ }
+
+ return html;
+
+ },
+
+ remove: function() {
+
+ this.container.remove();
+ this.element.off('.daterangepicker');
+ this.element.removeData('daterangepicker');
+
+ }
+
+ };
+
+ $.fn.daterangepicker = function (options, cb) {
+ this.each(function () {
+ var el = $(this);
+ if (el.data('daterangepicker'))
+ el.data('daterangepicker').remove();
+ el.data('daterangepicker', new DateRangePicker(el, options, cb));
+ });
+ return this;
+ };
+
+}));
diff --git a/common/src/main/webapp/thirdparty/bootstrap-daterangepicker/moment.js b/common/src/main/webapp/thirdparty/bootstrap-daterangepicker/moment.js
new file mode 100644
index 0000000..1800b5d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/bootstrap-daterangepicker/moment.js
@@ -0,0 +1,2808 @@
+//! moment.js
+//! version : 2.8.1
+//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
+//! license : MIT
+//! momentjs.com
+
+(function (undefined) {
+ /************************************
+ Constants
+ ************************************/
+
+ var moment,
+ VERSION = '2.8.1',
+ // the global-scope this is NOT the global object in Node.js
+ globalScope = typeof global !== 'undefined' ? global : this,
+ oldGlobalMoment,
+ round = Math.round,
+ i,
+
+ YEAR = 0,
+ MONTH = 1,
+ DATE = 2,
+ HOUR = 3,
+ MINUTE = 4,
+ SECOND = 5,
+ MILLISECOND = 6,
+
+ // internal storage for locale config files
+ locales = {},
+
+ // extra moment internal properties (plugins register props here)
+ momentProperties = [],
+
+ // check for nodeJS
+ hasModule = (typeof module !== 'undefined' && module.exports),
+
+ // ASP.NET json date format regex
+ aspNetJsonRegex = /^\/?Date\((\-?\d+)/i,
+ aspNetTimeSpanJsonRegex = /(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,
+
+ // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
+ // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
+ isoDurationRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,
+
+ // format tokens
+ formattingTokens = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,
+ localFormattingTokens = /(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,
+
+ // parsing token regexes
+ parseTokenOneOrTwoDigits = /\d\d?/, // 0 - 99
+ parseTokenOneToThreeDigits = /\d{1,3}/, // 0 - 999
+ parseTokenOneToFourDigits = /\d{1,4}/, // 0 - 9999
+ parseTokenOneToSixDigits = /[+\-]?\d{1,6}/, // -999,999 - 999,999
+ parseTokenDigits = /\d+/, // nonzero number of digits
+ parseTokenWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i, // any word (or two) characters or numbers including two/three word month in arabic.
+ parseTokenTimezone = /Z|[\+\-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
+ parseTokenT = /T/i, // T (ISO separator)
+ parseTokenTimestampMs = /[\+\-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
+ parseTokenOrdinal = /\d{1,2}/,
+
+ //strict parsing regexes
+ parseTokenOneDigit = /\d/, // 0 - 9
+ parseTokenTwoDigits = /\d\d/, // 00 - 99
+ parseTokenThreeDigits = /\d{3}/, // 000 - 999
+ parseTokenFourDigits = /\d{4}/, // 0000 - 9999
+ parseTokenSixDigits = /[+-]?\d{6}/, // -999,999 - 999,999
+ parseTokenSignedNumber = /[+-]?\d+/, // -inf - inf
+
+ // iso 8601 regex
+ // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
+ isoRegex = /^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
+
+ isoFormat = 'YYYY-MM-DDTHH:mm:ssZ',
+
+ isoDates = [
+ ['YYYYYY-MM-DD', /[+-]\d{6}-\d{2}-\d{2}/],
+ ['YYYY-MM-DD', /\d{4}-\d{2}-\d{2}/],
+ ['GGGG-[W]WW-E', /\d{4}-W\d{2}-\d/],
+ ['GGGG-[W]WW', /\d{4}-W\d{2}/],
+ ['YYYY-DDD', /\d{4}-\d{3}/]
+ ],
+
+ // iso time formats and regexes
+ isoTimes = [
+ ['HH:mm:ss.SSSS', /(T| )\d\d:\d\d:\d\d\.\d+/],
+ ['HH:mm:ss', /(T| )\d\d:\d\d:\d\d/],
+ ['HH:mm', /(T| )\d\d:\d\d/],
+ ['HH', /(T| )\d\d/]
+ ],
+
+ // timezone chunker "+10:00" > ["10", "00"] or "-1530" > ["-15", "30"]
+ parseTimezoneChunker = /([\+\-]|\d\d)/gi,
+
+ // getter and setter names
+ proxyGettersAndSetters = 'Date|Hours|Minutes|Seconds|Milliseconds'.split('|'),
+ unitMillisecondFactors = {
+ 'Milliseconds' : 1,
+ 'Seconds' : 1e3,
+ 'Minutes' : 6e4,
+ 'Hours' : 36e5,
+ 'Days' : 864e5,
+ 'Months' : 2592e6,
+ 'Years' : 31536e6
+ },
+
+ unitAliases = {
+ ms : 'millisecond',
+ s : 'second',
+ m : 'minute',
+ h : 'hour',
+ d : 'day',
+ D : 'date',
+ w : 'week',
+ W : 'isoWeek',
+ M : 'month',
+ Q : 'quarter',
+ y : 'year',
+ DDD : 'dayOfYear',
+ e : 'weekday',
+ E : 'isoWeekday',
+ gg: 'weekYear',
+ GG: 'isoWeekYear'
+ },
+
+ camelFunctions = {
+ dayofyear : 'dayOfYear',
+ isoweekday : 'isoWeekday',
+ isoweek : 'isoWeek',
+ weekyear : 'weekYear',
+ isoweekyear : 'isoWeekYear'
+ },
+
+ // format function strings
+ formatFunctions = {},
+
+ // default relative time thresholds
+ relativeTimeThresholds = {
+ s: 45, // seconds to minute
+ m: 45, // minutes to hour
+ h: 22, // hours to day
+ d: 26, // days to month
+ M: 11 // months to year
+ },
+
+ // tokens to ordinalize and pad
+ ordinalizeTokens = 'DDD w W M D d'.split(' '),
+ paddedTokens = 'M D H h m s w W'.split(' '),
+
+ formatTokenFunctions = {
+ M : function () {
+ return this.month() + 1;
+ },
+ MMM : function (format) {
+ return this.localeData().monthsShort(this, format);
+ },
+ MMMM : function (format) {
+ return this.localeData().months(this, format);
+ },
+ D : function () {
+ return this.date();
+ },
+ DDD : function () {
+ return this.dayOfYear();
+ },
+ d : function () {
+ return this.day();
+ },
+ dd : function (format) {
+ return this.localeData().weekdaysMin(this, format);
+ },
+ ddd : function (format) {
+ return this.localeData().weekdaysShort(this, format);
+ },
+ dddd : function (format) {
+ return this.localeData().weekdays(this, format);
+ },
+ w : function () {
+ return this.week();
+ },
+ W : function () {
+ return this.isoWeek();
+ },
+ YY : function () {
+ return leftZeroFill(this.year() % 100, 2);
+ },
+ YYYY : function () {
+ return leftZeroFill(this.year(), 4);
+ },
+ YYYYY : function () {
+ return leftZeroFill(this.year(), 5);
+ },
+ YYYYYY : function () {
+ var y = this.year(), sign = y >= 0 ? '+' : '-';
+ return sign + leftZeroFill(Math.abs(y), 6);
+ },
+ gg : function () {
+ return leftZeroFill(this.weekYear() % 100, 2);
+ },
+ gggg : function () {
+ return leftZeroFill(this.weekYear(), 4);
+ },
+ ggggg : function () {
+ return leftZeroFill(this.weekYear(), 5);
+ },
+ GG : function () {
+ return leftZeroFill(this.isoWeekYear() % 100, 2);
+ },
+ GGGG : function () {
+ return leftZeroFill(this.isoWeekYear(), 4);
+ },
+ GGGGG : function () {
+ return leftZeroFill(this.isoWeekYear(), 5);
+ },
+ e : function () {
+ return this.weekday();
+ },
+ E : function () {
+ return this.isoWeekday();
+ },
+ a : function () {
+ return this.localeData().meridiem(this.hours(), this.minutes(), true);
+ },
+ A : function () {
+ return this.localeData().meridiem(this.hours(), this.minutes(), false);
+ },
+ H : function () {
+ return this.hours();
+ },
+ h : function () {
+ return this.hours() % 12 || 12;
+ },
+ m : function () {
+ return this.minutes();
+ },
+ s : function () {
+ return this.seconds();
+ },
+ S : function () {
+ return toInt(this.milliseconds() / 100);
+ },
+ SS : function () {
+ return leftZeroFill(toInt(this.milliseconds() / 10), 2);
+ },
+ SSS : function () {
+ return leftZeroFill(this.milliseconds(), 3);
+ },
+ SSSS : function () {
+ return leftZeroFill(this.milliseconds(), 3);
+ },
+ Z : function () {
+ var a = -this.zone(),
+ b = '+';
+ if (a < 0) {
+ a = -a;
+ b = '-';
+ }
+ return b + leftZeroFill(toInt(a / 60), 2) + ':' + leftZeroFill(toInt(a) % 60, 2);
+ },
+ ZZ : function () {
+ var a = -this.zone(),
+ b = '+';
+ if (a < 0) {
+ a = -a;
+ b = '-';
+ }
+ return b + leftZeroFill(toInt(a / 60), 2) + leftZeroFill(toInt(a) % 60, 2);
+ },
+ z : function () {
+ return this.zoneAbbr();
+ },
+ zz : function () {
+ return this.zoneName();
+ },
+ X : function () {
+ return this.unix();
+ },
+ Q : function () {
+ return this.quarter();
+ }
+ },
+
+ deprecations = {},
+
+ lists = ['months', 'monthsShort', 'weekdays', 'weekdaysShort', 'weekdaysMin'];
+
+ // Pick the first defined of two or three arguments. dfl comes from
+ // default.
+ function dfl(a, b, c) {
+ switch (arguments.length) {
+ case 2: return a != null ? a : b;
+ case 3: return a != null ? a : b != null ? b : c;
+ default: throw new Error('Implement me');
+ }
+ }
+
+ function defaultParsingFlags() {
+ // We need to deep clone this object, and es5 standard is not very
+ // helpful.
+ return {
+ empty : false,
+ unusedTokens : [],
+ unusedInput : [],
+ overflow : -2,
+ charsLeftOver : 0,
+ nullInput : false,
+ invalidMonth : null,
+ invalidFormat : false,
+ userInvalidated : false,
+ iso: false
+ };
+ }
+
+ function printMsg(msg) {
+ if (moment.suppressDeprecationWarnings === false &&
+ typeof console !== 'undefined' && console.warn) {
+ console.warn("Deprecation warning: " + msg);
+ }
+ }
+
+ function deprecate(msg, fn) {
+ var firstTime = true;
+ return extend(function () {
+ if (firstTime) {
+ printMsg(msg);
+ firstTime = false;
+ }
+ return fn.apply(this, arguments);
+ }, fn);
+ }
+
+ function deprecateSimple(name, msg) {
+ if (!deprecations[name]) {
+ printMsg(msg);
+ deprecations[name] = true;
+ }
+ }
+
+ function padToken(func, count) {
+ return function (a) {
+ return leftZeroFill(func.call(this, a), count);
+ };
+ }
+ function ordinalizeToken(func, period) {
+ return function (a) {
+ return this.localeData().ordinal(func.call(this, a), period);
+ };
+ }
+
+ while (ordinalizeTokens.length) {
+ i = ordinalizeTokens.pop();
+ formatTokenFunctions[i + 'o'] = ordinalizeToken(formatTokenFunctions[i], i);
+ }
+ while (paddedTokens.length) {
+ i = paddedTokens.pop();
+ formatTokenFunctions[i + i] = padToken(formatTokenFunctions[i], 2);
+ }
+ formatTokenFunctions.DDDD = padToken(formatTokenFunctions.DDD, 3);
+
+
+ /************************************
+ Constructors
+ ************************************/
+
+ function Locale() {
+ }
+
+ // Moment prototype object
+ function Moment(config, skipOverflow) {
+ if (skipOverflow !== false) {
+ checkOverflow(config);
+ }
+ copyConfig(this, config);
+ this._d = new Date(+config._d);
+ }
+
+ // Duration Constructor
+ function Duration(duration) {
+ var normalizedInput = normalizeObjectUnits(duration),
+ years = normalizedInput.year || 0,
+ quarters = normalizedInput.quarter || 0,
+ months = normalizedInput.month || 0,
+ weeks = normalizedInput.week || 0,
+ days = normalizedInput.day || 0,
+ hours = normalizedInput.hour || 0,
+ minutes = normalizedInput.minute || 0,
+ seconds = normalizedInput.second || 0,
+ milliseconds = normalizedInput.millisecond || 0;
+
+ // representation for dateAddRemove
+ this._milliseconds = +milliseconds +
+ seconds * 1e3 + // 1000
+ minutes * 6e4 + // 1000 * 60
+ hours * 36e5; // 1000 * 60 * 60
+ // Because of dateAddRemove treats 24 hours as different from a
+ // day when working around DST, we need to store them separately
+ this._days = +days +
+ weeks * 7;
+ // It is impossible translate months into days without knowing
+ // which months you are are talking about, so we have to store
+ // it separately.
+ this._months = +months +
+ quarters * 3 +
+ years * 12;
+
+ this._data = {};
+
+ this._locale = moment.localeData();
+
+ this._bubble();
+ }
+
+ /************************************
+ Helpers
+ ************************************/
+
+
+ function extend(a, b) {
+ for (var i in b) {
+ if (b.hasOwnProperty(i)) {
+ a[i] = b[i];
+ }
+ }
+
+ if (b.hasOwnProperty('toString')) {
+ a.toString = b.toString;
+ }
+
+ if (b.hasOwnProperty('valueOf')) {
+ a.valueOf = b.valueOf;
+ }
+
+ return a;
+ }
+
+ function copyConfig(to, from) {
+ var i, prop, val;
+
+ if (typeof from._isAMomentObject !== 'undefined') {
+ to._isAMomentObject = from._isAMomentObject;
+ }
+ if (typeof from._i !== 'undefined') {
+ to._i = from._i;
+ }
+ if (typeof from._f !== 'undefined') {
+ to._f = from._f;
+ }
+ if (typeof from._l !== 'undefined') {
+ to._l = from._l;
+ }
+ if (typeof from._strict !== 'undefined') {
+ to._strict = from._strict;
+ }
+ if (typeof from._tzm !== 'undefined') {
+ to._tzm = from._tzm;
+ }
+ if (typeof from._isUTC !== 'undefined') {
+ to._isUTC = from._isUTC;
+ }
+ if (typeof from._offset !== 'undefined') {
+ to._offset = from._offset;
+ }
+ if (typeof from._pf !== 'undefined') {
+ to._pf = from._pf;
+ }
+ if (typeof from._locale !== 'undefined') {
+ to._locale = from._locale;
+ }
+
+ if (momentProperties.length > 0) {
+ for (i in momentProperties) {
+ prop = momentProperties[i];
+ val = from[prop];
+ if (typeof val !== 'undefined') {
+ to[prop] = val;
+ }
+ }
+ }
+
+ return to;
+ }
+
+ function absRound(number) {
+ if (number < 0) {
+ return Math.ceil(number);
+ } else {
+ return Math.floor(number);
+ }
+ }
+
+ // left zero fill a number
+ // see http://jsperf.com/left-zero-filling for performance comparison
+ function leftZeroFill(number, targetLength, forceSign) {
+ var output = '' + Math.abs(number),
+ sign = number >= 0;
+
+ while (output.length < targetLength) {
+ output = '0' + output;
+ }
+ return (sign ? (forceSign ? '+' : '') : '-') + output;
+ }
+
+ function positiveMomentsDifference(base, other) {
+ var res = {milliseconds: 0, months: 0};
+
+ res.months = other.month() - base.month() +
+ (other.year() - base.year()) * 12;
+ if (base.clone().add(res.months, 'M').isAfter(other)) {
+ --res.months;
+ }
+
+ res.milliseconds = +other - +(base.clone().add(res.months, 'M'));
+
+ return res;
+ }
+
+ function momentsDifference(base, other) {
+ var res;
+ other = makeAs(other, base);
+ if (base.isBefore(other)) {
+ res = positiveMomentsDifference(base, other);
+ } else {
+ res = positiveMomentsDifference(other, base);
+ res.milliseconds = -res.milliseconds;
+ res.months = -res.months;
+ }
+
+ return res;
+ }
+
+ // TODO: remove 'name' arg after deprecation is removed
+ function createAdder(direction, name) {
+ return function (val, period) {
+ var dur, tmp;
+ //invert the arguments, but complain about it
+ if (period !== null && !isNaN(+period)) {
+ deprecateSimple(name, "moment()." + name + "(period, number) is deprecated. Please use moment()." + name + "(number, period).");
+ tmp = val; val = period; period = tmp;
+ }
+
+ val = typeof val === 'string' ? +val : val;
+ dur = moment.duration(val, period);
+ addOrSubtractDurationFromMoment(this, dur, direction);
+ return this;
+ };
+ }
+
+ function addOrSubtractDurationFromMoment(mom, duration, isAdding, updateOffset) {
+ var milliseconds = duration._milliseconds,
+ days = duration._days,
+ months = duration._months;
+ updateOffset = updateOffset == null ? true : updateOffset;
+
+ if (milliseconds) {
+ mom._d.setTime(+mom._d + milliseconds * isAdding);
+ }
+ if (days) {
+ rawSetter(mom, 'Date', rawGetter(mom, 'Date') + days * isAdding);
+ }
+ if (months) {
+ rawMonthSetter(mom, rawGetter(mom, 'Month') + months * isAdding);
+ }
+ if (updateOffset) {
+ moment.updateOffset(mom, days || months);
+ }
+ }
+
+ // check if is an array
+ function isArray(input) {
+ return Object.prototype.toString.call(input) === '[object Array]';
+ }
+
+ function isDate(input) {
+ return Object.prototype.toString.call(input) === '[object Date]' ||
+ input instanceof Date;
+ }
+
+ // compare two arrays, return the number of differences
+ function compareArrays(array1, array2, dontConvert) {
+ var len = Math.min(array1.length, array2.length),
+ lengthDiff = Math.abs(array1.length - array2.length),
+ diffs = 0,
+ i;
+ for (i = 0; i < len; i++) {
+ if ((dontConvert && array1[i] !== array2[i]) ||
+ (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
+ diffs++;
+ }
+ }
+ return diffs + lengthDiff;
+ }
+
+ function normalizeUnits(units) {
+ if (units) {
+ var lowered = units.toLowerCase().replace(/(.)s$/, '$1');
+ units = unitAliases[units] || camelFunctions[lowered] || lowered;
+ }
+ return units;
+ }
+
+ function normalizeObjectUnits(inputObject) {
+ var normalizedInput = {},
+ normalizedProp,
+ prop;
+
+ for (prop in inputObject) {
+ if (inputObject.hasOwnProperty(prop)) {
+ normalizedProp = normalizeUnits(prop);
+ if (normalizedProp) {
+ normalizedInput[normalizedProp] = inputObject[prop];
+ }
+ }
+ }
+
+ return normalizedInput;
+ }
+
+ function makeList(field) {
+ var count, setter;
+
+ if (field.indexOf('week') === 0) {
+ count = 7;
+ setter = 'day';
+ }
+ else if (field.indexOf('month') === 0) {
+ count = 12;
+ setter = 'month';
+ }
+ else {
+ return;
+ }
+
+ moment[field] = function (format, index) {
+ var i, getter,
+ method = moment._locale[field],
+ results = [];
+
+ if (typeof format === 'number') {
+ index = format;
+ format = undefined;
+ }
+
+ getter = function (i) {
+ var m = moment().utc().set(setter, i);
+ return method.call(moment._locale, m, format || '');
+ };
+
+ if (index != null) {
+ return getter(index);
+ }
+ else {
+ for (i = 0; i < count; i++) {
+ results.push(getter(i));
+ }
+ return results;
+ }
+ };
+ }
+
+ function toInt(argumentForCoercion) {
+ var coercedNumber = +argumentForCoercion,
+ value = 0;
+
+ if (coercedNumber !== 0 && isFinite(coercedNumber)) {
+ if (coercedNumber >= 0) {
+ value = Math.floor(coercedNumber);
+ } else {
+ value = Math.ceil(coercedNumber);
+ }
+ }
+
+ return value;
+ }
+
+ function daysInMonth(year, month) {
+ return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
+ }
+
+ function weeksInYear(year, dow, doy) {
+ return weekOfYear(moment([year, 11, 31 + dow - doy]), dow, doy).week;
+ }
+
+ function daysInYear(year) {
+ return isLeapYear(year) ? 366 : 365;
+ }
+
+ function isLeapYear(year) {
+ return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
+ }
+
+ function checkOverflow(m) {
+ var overflow;
+ if (m._a && m._pf.overflow === -2) {
+ overflow =
+ m._a[MONTH] < 0 || m._a[MONTH] > 11 ? MONTH :
+ m._a[DATE] < 1 || m._a[DATE] > daysInMonth(m._a[YEAR], m._a[MONTH]) ? DATE :
+ m._a[HOUR] < 0 || m._a[HOUR] > 23 ? HOUR :
+ m._a[MINUTE] < 0 || m._a[MINUTE] > 59 ? MINUTE :
+ m._a[SECOND] < 0 || m._a[SECOND] > 59 ? SECOND :
+ m._a[MILLISECOND] < 0 || m._a[MILLISECOND] > 999 ? MILLISECOND :
+ -1;
+
+ if (m._pf._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
+ overflow = DATE;
+ }
+
+ m._pf.overflow = overflow;
+ }
+ }
+
+ function isValid(m) {
+ if (m._isValid == null) {
+ m._isValid = !isNaN(m._d.getTime()) &&
+ m._pf.overflow < 0 &&
+ !m._pf.empty &&
+ !m._pf.invalidMonth &&
+ !m._pf.nullInput &&
+ !m._pf.invalidFormat &&
+ !m._pf.userInvalidated;
+
+ if (m._strict) {
+ m._isValid = m._isValid &&
+ m._pf.charsLeftOver === 0 &&
+ m._pf.unusedTokens.length === 0;
+ }
+ }
+ return m._isValid;
+ }
+
+ function normalizeLocale(key) {
+ return key ? key.toLowerCase().replace('_', '-') : key;
+ }
+
+ // pick the locale from the array
+ // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
+ // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
+ function chooseLocale(names) {
+ var i = 0, j, next, locale, split;
+
+ while (i < names.length) {
+ split = normalizeLocale(names[i]).split('-');
+ j = split.length;
+ next = normalizeLocale(names[i + 1]);
+ next = next ? next.split('-') : null;
+ while (j > 0) {
+ locale = loadLocale(split.slice(0, j).join('-'));
+ if (locale) {
+ return locale;
+ }
+ if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
+ //the next array item is better than a shallower substring of this one
+ break;
+ }
+ j--;
+ }
+ i++;
+ }
+ return null;
+ }
+
+ function loadLocale(name) {
+ var oldLocale = null;
+ if (!locales[name] && hasModule) {
+ try {
+ oldLocale = moment.locale();
+ require('./locale/' + name);
+ // because defineLocale currently also sets the global locale, we want to undo that for lazy loaded locales
+ moment.locale(oldLocale);
+ } catch (e) { }
+ }
+ return locales[name];
+ }
+
+ // Return a moment from input, that is local/utc/zone equivalent to model.
+ function makeAs(input, model) {
+ return model._isUTC ? moment(input).zone(model._offset || 0) :
+ moment(input).local();
+ }
+
+ /************************************
+ Locale
+ ************************************/
+
+
+ extend(Locale.prototype, {
+
+ set : function (config) {
+ var prop, i;
+ for (i in config) {
+ prop = config[i];
+ if (typeof prop === 'function') {
+ this[i] = prop;
+ } else {
+ this['_' + i] = prop;
+ }
+ }
+ },
+
+ _months : '1_2_3_4_May_June_July_August_September_October_November_December'.split('_'),
+ months : function (m) {
+ return this._months[m.month()];
+ },
+
+ _monthsShort : '1_2_3_4_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ monthsShort : function (m) {
+ return this._monthsShort[m.month()];
+ },
+
+ monthsParse : function (monthName) {
+ var i, mom, regex;
+
+ if (!this._monthsParse) {
+ this._monthsParse = [];
+ }
+
+ for (i = 0; i < 12; i++) {
+ // make the regex if we don't have it already
+ if (!this._monthsParse[i]) {
+ mom = moment.utc([2000, i]);
+ regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
+ this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
+ }
+ // test the regex
+ if (this._monthsParse[i].test(monthName)) {
+ return i;
+ }
+ }
+ },
+
+ _weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
+ weekdays : function (m) {
+ return this._weekdays[m.day()];
+ },
+
+ _weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysShort : function (m) {
+ return this._weekdaysShort[m.day()];
+ },
+
+ _weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ weekdaysMin : function (m) {
+ return this._weekdaysMin[m.day()];
+ },
+
+ weekdaysParse : function (weekdayName) {
+ var i, mom, regex;
+
+ if (!this._weekdaysParse) {
+ this._weekdaysParse = [];
+ }
+
+ for (i = 0; i < 7; i++) {
+ // make the regex if we don't have it already
+ if (!this._weekdaysParse[i]) {
+ mom = moment([2000, 1]).day(i);
+ regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
+ this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
+ }
+ // test the regex
+ if (this._weekdaysParse[i].test(weekdayName)) {
+ return i;
+ }
+ }
+ },
+
+ _longDateFormat : {
+ LT : 'h:mm A',
+ L : 'MM/DD/YYYY',
+ LL : 'MMMM D, YYYY',
+ LLL : 'MMMM D, YYYY LT',
+ LLLL : 'dddd, MMMM D, YYYY LT'
+ },
+ longDateFormat : function (key) {
+ var output = this._longDateFormat[key];
+ if (!output && this._longDateFormat[key.toUpperCase()]) {
+ output = this._longDateFormat[key.toUpperCase()].replace(/MMMM|MM|DD|dddd/g, function (val) {
+ return val.slice(1);
+ });
+ this._longDateFormat[key] = output;
+ }
+ return output;
+ },
+
+ isPM : function (input) {
+ // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
+ // Using charAt should be more compatible.
+ return ((input + '').toLowerCase().charAt(0) === 'p');
+ },
+
+ _meridiemParse : /[ap]\.?m?\.?/i,
+ meridiem : function (hours, minutes, isLower) {
+ if (hours > 11) {
+ return isLower ? 'pm' : 'PM';
+ } else {
+ return isLower ? 'am' : 'AM';
+ }
+ },
+
+ _calendar : {
+ sameDay : '[Today at] LT',
+ nextDay : '[Tomorrow at] LT',
+ nextWeek : 'dddd [at] LT',
+ lastDay : '[Yesterday at] LT',
+ lastWeek : '[Last] dddd [at] LT',
+ sameElse : 'L'
+ },
+ calendar : function (key, mom) {
+ var output = this._calendar[key];
+ return typeof output === 'function' ? output.apply(mom) : output;
+ },
+
+ _relativeTime : {
+ future : 'in %s',
+ past : '%s ago',
+ s : 'a few seconds',
+ m : 'a minute',
+ mm : '%d minutes',
+ h : 'an hour',
+ hh : '%d hours',
+ d : 'a day',
+ dd : '%d days',
+ M : 'a month',
+ MM : '%d months',
+ y : 'a year',
+ yy : '%d years'
+ },
+
+ relativeTime : function (number, withoutSuffix, string, isFuture) {
+ var output = this._relativeTime[string];
+ return (typeof output === 'function') ?
+ output(number, withoutSuffix, string, isFuture) :
+ output.replace(/%d/i, number);
+ },
+
+ pastFuture : function (diff, output) {
+ var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
+ return typeof format === 'function' ? format(output) : format.replace(/%s/i, output);
+ },
+
+ ordinal : function (number) {
+ return this._ordinal.replace('%d', number);
+ },
+ _ordinal : '%d',
+
+ preparse : function (string) {
+ return string;
+ },
+
+ postformat : function (string) {
+ return string;
+ },
+
+ week : function (mom) {
+ return weekOfYear(mom, this._week.dow, this._week.doy).week;
+ },
+
+ _week : {
+ dow : 0, // Sunday is the first day of the week.
+ doy : 6 // The week that contains Jan 1st is the first week of the year.
+ },
+
+ _invalidDate: 'Invalid date',
+ invalidDate: function () {
+ return this._invalidDate;
+ }
+ });
+
+ /************************************
+ Formatting
+ ************************************/
+
+
+ function removeFormattingTokens(input) {
+ if (input.match(/\[[\s\S]/)) {
+ return input.replace(/^\[|\]$/g, '');
+ }
+ return input.replace(/\\/g, '');
+ }
+
+ function makeFormatFunction(format) {
+ var array = format.match(formattingTokens), i, length;
+
+ for (i = 0, length = array.length; i < length; i++) {
+ if (formatTokenFunctions[array[i]]) {
+ array[i] = formatTokenFunctions[array[i]];
+ } else {
+ array[i] = removeFormattingTokens(array[i]);
+ }
+ }
+
+ return function (mom) {
+ var output = '';
+ for (i = 0; i < length; i++) {
+ output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];
+ }
+ return output;
+ };
+ }
+
+ // format date using native date object
+ function formatMoment(m, format) {
+ if (!m.isValid()) {
+ return m.localeData().invalidDate();
+ }
+
+ format = expandFormat(format, m.localeData());
+
+ if (!formatFunctions[format]) {
+ formatFunctions[format] = makeFormatFunction(format);
+ }
+
+ return formatFunctions[format](m);
+ }
+
+ function expandFormat(format, locale) {
+ var i = 5;
+
+ function replaceLongDateFormatTokens(input) {
+ return locale.longDateFormat(input) || input;
+ }
+
+ localFormattingTokens.lastIndex = 0;
+ while (i >= 0 && localFormattingTokens.test(format)) {
+ format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
+ localFormattingTokens.lastIndex = 0;
+ i -= 1;
+ }
+
+ return format;
+ }
+
+
+ /************************************
+ Parsing
+ ************************************/
+
+
+ // get the regex to find the next token
+ function getParseRegexForToken(token, config) {
+ var a, strict = config._strict;
+ switch (token) {
+ case 'Q':
+ return parseTokenOneDigit;
+ case 'DDDD':
+ return parseTokenThreeDigits;
+ case 'YYYY':
+ case 'GGGG':
+ case 'gggg':
+ return strict ? parseTokenFourDigits : parseTokenOneToFourDigits;
+ case 'Y':
+ case 'G':
+ case 'g':
+ return parseTokenSignedNumber;
+ case 'YYYYYY':
+ case 'YYYYY':
+ case 'GGGGG':
+ case 'ggggg':
+ return strict ? parseTokenSixDigits : parseTokenOneToSixDigits;
+ case 'S':
+ if (strict) {
+ return parseTokenOneDigit;
+ }
+ /* falls through */
+ case 'SS':
+ if (strict) {
+ return parseTokenTwoDigits;
+ }
+ /* falls through */
+ case 'SSS':
+ if (strict) {
+ return parseTokenThreeDigits;
+ }
+ /* falls through */
+ case 'DDD':
+ return parseTokenOneToThreeDigits;
+ case 'MMM':
+ case 'MMMM':
+ case 'dd':
+ case 'ddd':
+ case 'dddd':
+ return parseTokenWord;
+ case 'a':
+ case 'A':
+ return config._locale._meridiemParse;
+ case 'X':
+ return parseTokenTimestampMs;
+ case 'Z':
+ case 'ZZ':
+ return parseTokenTimezone;
+ case 'T':
+ return parseTokenT;
+ case 'SSSS':
+ return parseTokenDigits;
+ case 'MM':
+ case 'DD':
+ case 'YY':
+ case 'GG':
+ case 'gg':
+ case 'HH':
+ case 'hh':
+ case 'mm':
+ case 'ss':
+ case 'ww':
+ case 'WW':
+ return strict ? parseTokenTwoDigits : parseTokenOneOrTwoDigits;
+ case 'M':
+ case 'D':
+ case 'd':
+ case 'H':
+ case 'h':
+ case 'm':
+ case 's':
+ case 'w':
+ case 'W':
+ case 'e':
+ case 'E':
+ return parseTokenOneOrTwoDigits;
+ case 'Do':
+ return parseTokenOrdinal;
+ default :
+ a = new RegExp(regexpEscape(unescapeFormat(token.replace('\\', '')), 'i'));
+ return a;
+ }
+ }
+
+ function timezoneMinutesFromString(string) {
+ string = string || '';
+ var possibleTzMatches = (string.match(parseTokenTimezone) || []),
+ tzChunk = possibleTzMatches[possibleTzMatches.length - 1] || [],
+ parts = (tzChunk + '').match(parseTimezoneChunker) || ['-', 0, 0],
+ minutes = +(parts[1] * 60) + toInt(parts[2]);
+
+ return parts[0] === '+' ? -minutes : minutes;
+ }
+
+ // function to convert string input to date
+ function addTimeToArrayFromToken(token, input, config) {
+ var a, datePartArray = config._a;
+
+ switch (token) {
+ // QUARTER
+ case 'Q':
+ if (input != null) {
+ datePartArray[MONTH] = (toInt(input) - 1) * 3;
+ }
+ break;
+ // MONTH
+ case 'M' : // fall through to MM
+ case 'MM' :
+ if (input != null) {
+ datePartArray[MONTH] = toInt(input) - 1;
+ }
+ break;
+ case 'MMM' : // fall through to MMMM
+ case 'MMMM' :
+ a = config._locale.monthsParse(input);
+ // if we didn't find a month name, mark the date as invalid.
+ if (a != null) {
+ datePartArray[MONTH] = a;
+ } else {
+ config._pf.invalidMonth = input;
+ }
+ break;
+ // DAY OF MONTH
+ case 'D' : // fall through to DD
+ case 'DD' :
+ if (input != null) {
+ datePartArray[DATE] = toInt(input);
+ }
+ break;
+ case 'Do' :
+ if (input != null) {
+ datePartArray[DATE] = toInt(parseInt(input, 10));
+ }
+ break;
+ // DAY OF YEAR
+ case 'DDD' : // fall through to DDDD
+ case 'DDDD' :
+ if (input != null) {
+ config._dayOfYear = toInt(input);
+ }
+
+ break;
+ // YEAR
+ case 'YY' :
+ datePartArray[YEAR] = moment.parseTwoDigitYear(input);
+ break;
+ case 'YYYY' :
+ case 'YYYYY' :
+ case 'YYYYYY' :
+ datePartArray[YEAR] = toInt(input);
+ break;
+ // AM / PM
+ case 'a' : // fall through to A
+ case 'A' :
+ config._isPm = config._locale.isPM(input);
+ break;
+ // 24 HOUR
+ case 'H' : // fall through to hh
+ case 'HH' : // fall through to hh
+ case 'h' : // fall through to hh
+ case 'hh' :
+ datePartArray[HOUR] = toInt(input);
+ break;
+ // MINUTE
+ case 'm' : // fall through to mm
+ case 'mm' :
+ datePartArray[MINUTE] = toInt(input);
+ break;
+ // SECOND
+ case 's' : // fall through to ss
+ case 'ss' :
+ datePartArray[SECOND] = toInt(input);
+ break;
+ // MILLISECOND
+ case 'S' :
+ case 'SS' :
+ case 'SSS' :
+ case 'SSSS' :
+ datePartArray[MILLISECOND] = toInt(('0.' + input) * 1000);
+ break;
+ // UNIX TIMESTAMP WITH MS
+ case 'X':
+ config._d = new Date(parseFloat(input) * 1000);
+ break;
+ // TIMEZONE
+ case 'Z' : // fall through to ZZ
+ case 'ZZ' :
+ config._useUTC = true;
+ config._tzm = timezoneMinutesFromString(input);
+ break;
+ // WEEKDAY - human
+ case 'dd':
+ case 'ddd':
+ case 'dddd':
+ a = config._locale.weekdaysParse(input);
+ // if we didn't get a weekday name, mark the date as invalid
+ if (a != null) {
+ config._w = config._w || {};
+ config._w['d'] = a;
+ } else {
+ config._pf.invalidWeekday = input;
+ }
+ break;
+ // WEEK, WEEK DAY - numeric
+ case 'w':
+ case 'ww':
+ case 'W':
+ case 'WW':
+ case 'd':
+ case 'e':
+ case 'E':
+ token = token.substr(0, 1);
+ /* falls through */
+ case 'gggg':
+ case 'GGGG':
+ case 'GGGGG':
+ token = token.substr(0, 2);
+ if (input) {
+ config._w = config._w || {};
+ config._w[token] = toInt(input);
+ }
+ break;
+ case 'gg':
+ case 'GG':
+ config._w = config._w || {};
+ config._w[token] = moment.parseTwoDigitYear(input);
+ }
+ }
+
+ function dayOfYearFromWeekInfo(config) {
+ var w, weekYear, week, weekday, dow, doy, temp;
+
+ w = config._w;
+ if (w.GG != null || w.W != null || w.E != null) {
+ dow = 1;
+ doy = 4;
+
+ // TODO: We need to take the current isoWeekYear, but that depends on
+ // how we interpret now (local, utc, fixed offset). So create
+ // a now version of current config (take local/utc/offset flags, and
+ // create now).
+ weekYear = dfl(w.GG, config._a[YEAR], weekOfYear(moment(), 1, 4).year);
+ week = dfl(w.W, 1);
+ weekday = dfl(w.E, 1);
+ } else {
+ dow = config._locale._week.dow;
+ doy = config._locale._week.doy;
+
+ weekYear = dfl(w.gg, config._a[YEAR], weekOfYear(moment(), dow, doy).year);
+ week = dfl(w.w, 1);
+
+ if (w.d != null) {
+ // weekday -- low day numbers are considered next week
+ weekday = w.d;
+ if (weekday < dow) {
+ ++week;
+ }
+ } else if (w.e != null) {
+ // local weekday -- counting starts from begining of week
+ weekday = w.e + dow;
+ } else {
+ // default to begining of week
+ weekday = dow;
+ }
+ }
+ temp = dayOfYearFromWeeks(weekYear, week, weekday, doy, dow);
+
+ config._a[YEAR] = temp.year;
+ config._dayOfYear = temp.dayOfYear;
+ }
+
+ // convert an array to a date.
+ // the array should mirror the parameters below
+ // note: all values past the year are optional and will default to the lowest possible value.
+ // [year, month, day , hour, minute, second, millisecond]
+ function dateFromConfig(config) {
+ var i, date, input = [], currentDate, yearToUse;
+
+ if (config._d) {
+ return;
+ }
+
+ currentDate = currentDateArray(config);
+
+ //compute day of the year from weeks and weekdays
+ if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
+ dayOfYearFromWeekInfo(config);
+ }
+
+ //if the day of the year is set, figure out what it is
+ if (config._dayOfYear) {
+ yearToUse = dfl(config._a[YEAR], currentDate[YEAR]);
+
+ if (config._dayOfYear > daysInYear(yearToUse)) {
+ config._pf._overflowDayOfYear = true;
+ }
+
+ date = makeUTCDate(yearToUse, 0, config._dayOfYear);
+ config._a[MONTH] = date.getUTCMonth();
+ config._a[DATE] = date.getUTCDate();
+ }
+
+ // Default to current date.
+ // * if no year, month, day of month are given, default to today
+ // * if day of month is given, default month and year
+ // * if month is given, default only year
+ // * if year is given, don't default anything
+ for (i = 0; i < 3 && config._a[i] == null; ++i) {
+ config._a[i] = input[i] = currentDate[i];
+ }
+
+ // Zero out whatever was not defaulted, including time
+ for (; i < 7; i++) {
+ config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
+ }
+
+ config._d = (config._useUTC ? makeUTCDate : makeDate).apply(null, input);
+ // Apply timezone offset from input. The actual zone can be changed
+ // with parseZone.
+ if (config._tzm != null) {
+ config._d.setUTCMinutes(config._d.getUTCMinutes() + config._tzm);
+ }
+ }
+
+ function dateFromObject(config) {
+ var normalizedInput;
+
+ if (config._d) {
+ return;
+ }
+
+ normalizedInput = normalizeObjectUnits(config._i);
+ config._a = [
+ normalizedInput.year,
+ normalizedInput.month,
+ normalizedInput.day,
+ normalizedInput.hour,
+ normalizedInput.minute,
+ normalizedInput.second,
+ normalizedInput.millisecond
+ ];
+
+ dateFromConfig(config);
+ }
+
+ function currentDateArray(config) {
+ var now = new Date();
+ if (config._useUTC) {
+ return [
+ now.getUTCFullYear(),
+ now.getUTCMonth(),
+ now.getUTCDate()
+ ];
+ } else {
+ return [now.getFullYear(), now.getMonth(), now.getDate()];
+ }
+ }
+
+ // date from string and format string
+ function makeDateFromStringAndFormat(config) {
+ if (config._f === moment.ISO_8601) {
+ parseISO(config);
+ return;
+ }
+
+ config._a = [];
+ config._pf.empty = true;
+
+ // This array is used to make a Date, either with `new Date` or `Date.UTC`
+ var string = '' + config._i,
+ i, parsedInput, tokens, token, skipped,
+ stringLength = string.length,
+ totalParsedInputLength = 0;
+
+ tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
+
+ for (i = 0; i < tokens.length; i++) {
+ token = tokens[i];
+ parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
+ if (parsedInput) {
+ skipped = string.substr(0, string.indexOf(parsedInput));
+ if (skipped.length > 0) {
+ config._pf.unusedInput.push(skipped);
+ }
+ string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
+ totalParsedInputLength += parsedInput.length;
+ }
+ // don't parse if it's not a known token
+ if (formatTokenFunctions[token]) {
+ if (parsedInput) {
+ config._pf.empty = false;
+ }
+ else {
+ config._pf.unusedTokens.push(token);
+ }
+ addTimeToArrayFromToken(token, parsedInput, config);
+ }
+ else if (config._strict && !parsedInput) {
+ config._pf.unusedTokens.push(token);
+ }
+ }
+
+ // add remaining unparsed input length to the string
+ config._pf.charsLeftOver = stringLength - totalParsedInputLength;
+ if (string.length > 0) {
+ config._pf.unusedInput.push(string);
+ }
+
+ // handle am pm
+ if (config._isPm && config._a[HOUR] < 12) {
+ config._a[HOUR] += 12;
+ }
+ // if is 12 am, change hours to 0
+ if (config._isPm === false && config._a[HOUR] === 12) {
+ config._a[HOUR] = 0;
+ }
+
+ dateFromConfig(config);
+ checkOverflow(config);
+ }
+
+ function unescapeFormat(s) {
+ return s.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
+ return p1 || p2 || p3 || p4;
+ });
+ }
+
+ // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
+ function regexpEscape(s) {
+ return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
+ }
+
+ // date from string and array of format strings
+ function makeDateFromStringAndArray(config) {
+ var tempConfig,
+ bestMoment,
+
+ scoreToBeat,
+ i,
+ currentScore;
+
+ if (config._f.length === 0) {
+ config._pf.invalidFormat = true;
+ config._d = new Date(NaN);
+ return;
+ }
+
+ for (i = 0; i < config._f.length; i++) {
+ currentScore = 0;
+ tempConfig = copyConfig({}, config);
+ tempConfig._pf = defaultParsingFlags();
+ tempConfig._f = config._f[i];
+ makeDateFromStringAndFormat(tempConfig);
+
+ if (!isValid(tempConfig)) {
+ continue;
+ }
+
+ // if there is any input that was not parsed add a penalty for that format
+ currentScore += tempConfig._pf.charsLeftOver;
+
+ //or tokens
+ currentScore += tempConfig._pf.unusedTokens.length * 10;
+
+ tempConfig._pf.score = currentScore;
+
+ if (scoreToBeat == null || currentScore < scoreToBeat) {
+ scoreToBeat = currentScore;
+ bestMoment = tempConfig;
+ }
+ }
+
+ extend(config, bestMoment || tempConfig);
+ }
+
+ // date from iso format
+ function parseISO(config) {
+ var i, l,
+ string = config._i,
+ match = isoRegex.exec(string);
+
+ if (match) {
+ config._pf.iso = true;
+ for (i = 0, l = isoDates.length; i < l; i++) {
+ if (isoDates[i][1].exec(string)) {
+ // match[5] should be "T" or undefined
+ config._f = isoDates[i][0] + (match[6] || ' ');
+ break;
+ }
+ }
+ for (i = 0, l = isoTimes.length; i < l; i++) {
+ if (isoTimes[i][1].exec(string)) {
+ config._f += isoTimes[i][0];
+ break;
+ }
+ }
+ if (string.match(parseTokenTimezone)) {
+ config._f += 'Z';
+ }
+ makeDateFromStringAndFormat(config);
+ } else {
+ config._isValid = false;
+ }
+ }
+
+ // date from iso format or fallback
+ function makeDateFromString(config) {
+ parseISO(config);
+ if (config._isValid === false) {
+ delete config._isValid;
+ moment.createFromInputFallback(config);
+ }
+ }
+
+ function makeDateFromInput(config) {
+ var input = config._i, matched;
+ if (input === undefined) {
+ config._d = new Date();
+ } else if (isDate(input)) {
+ config._d = new Date(+input);
+ } else if ((matched = aspNetJsonRegex.exec(input)) !== null) {
+ config._d = new Date(+matched[1]);
+ } else if (typeof input === 'string') {
+ makeDateFromString(config);
+ } else if (isArray(input)) {
+ config._a = input.slice(0);
+ dateFromConfig(config);
+ } else if (typeof(input) === 'object') {
+ dateFromObject(config);
+ } else if (typeof(input) === 'number') {
+ // from milliseconds
+ config._d = new Date(input);
+ } else {
+ moment.createFromInputFallback(config);
+ }
+ }
+
+ function makeDate(y, m, d, h, M, s, ms) {
+ //can't just apply() to create a date:
+ //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply
+ var date = new Date(y, m, d, h, M, s, ms);
+
+ //the date constructor doesn't accept years < 1970
+ if (y < 1970) {
+ date.setFullYear(y);
+ }
+ return date;
+ }
+
+ function makeUTCDate(y) {
+ var date = new Date(Date.UTC.apply(null, arguments));
+ if (y < 1970) {
+ date.setUTCFullYear(y);
+ }
+ return date;
+ }
+
+ function parseWeekday(input, locale) {
+ if (typeof input === 'string') {
+ if (!isNaN(input)) {
+ input = parseInt(input, 10);
+ }
+ else {
+ input = locale.weekdaysParse(input);
+ if (typeof input !== 'number') {
+ return null;
+ }
+ }
+ }
+ return input;
+ }
+
+ /************************************
+ Relative Time
+ ************************************/
+
+
+ // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
+ function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
+ return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
+ }
+
+ function relativeTime(posNegDuration, withoutSuffix, locale) {
+ var duration = moment.duration(posNegDuration).abs(),
+ seconds = round(duration.as('s')),
+ minutes = round(duration.as('m')),
+ hours = round(duration.as('h')),
+ days = round(duration.as('d')),
+ months = round(duration.as('M')),
+ years = round(duration.as('y')),
+
+ args = seconds < relativeTimeThresholds.s && ['s', seconds] ||
+ minutes === 1 && ['m'] ||
+ minutes < relativeTimeThresholds.m && ['mm', minutes] ||
+ hours === 1 && ['h'] ||
+ hours < relativeTimeThresholds.h && ['hh', hours] ||
+ days === 1 && ['d'] ||
+ days < relativeTimeThresholds.d && ['dd', days] ||
+ months === 1 && ['M'] ||
+ months < relativeTimeThresholds.M && ['MM', months] ||
+ years === 1 && ['y'] || ['yy', years];
+
+ args[2] = withoutSuffix;
+ args[3] = +posNegDuration > 0;
+ args[4] = locale;
+ return substituteTimeAgo.apply({}, args);
+ }
+
+
+ /************************************
+ Week of Year
+ ************************************/
+
+
+ // firstDayOfWeek 0 = sun, 6 = sat
+ // the day of the week that starts the week
+ // (usually sunday or monday)
+ // firstDayOfWeekOfYear 0 = sun, 6 = sat
+ // the first week is the week that contains the first
+ // of this day of the week
+ // (eg. ISO weeks use thursday (4))
+ function weekOfYear(mom, firstDayOfWeek, firstDayOfWeekOfYear) {
+ var end = firstDayOfWeekOfYear - firstDayOfWeek,
+ daysToDayOfWeek = firstDayOfWeekOfYear - mom.day(),
+ adjustedMoment;
+
+
+ if (daysToDayOfWeek > end) {
+ daysToDayOfWeek -= 7;
+ }
+
+ if (daysToDayOfWeek < end - 7) {
+ daysToDayOfWeek += 7;
+ }
+
+ adjustedMoment = moment(mom).add(daysToDayOfWeek, 'd');
+ return {
+ week: Math.ceil(adjustedMoment.dayOfYear() / 7),
+ year: adjustedMoment.year()
+ };
+ }
+
+ //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
+ function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) {
+ var d = makeUTCDate(year, 0, 1).getUTCDay(), daysToAdd, dayOfYear;
+
+ d = d === 0 ? 7 : d;
+ weekday = weekday != null ? weekday : firstDayOfWeek;
+ daysToAdd = firstDayOfWeek - d + (d > firstDayOfWeekOfYear ? 7 : 0) - (d < firstDayOfWeek ? 7 : 0);
+ dayOfYear = 7 * (week - 1) + (weekday - firstDayOfWeek) + daysToAdd + 1;
+
+ return {
+ year: dayOfYear > 0 ? year : year - 1,
+ dayOfYear: dayOfYear > 0 ? dayOfYear : daysInYear(year - 1) + dayOfYear
+ };
+ }
+
+ /************************************
+ Top Level Functions
+ ************************************/
+
+ function makeMoment(config) {
+ var input = config._i,
+ format = config._f;
+
+ config._locale = config._locale || moment.localeData(config._l);
+
+ if (input === null || (format === undefined && input === '')) {
+ return moment.invalid({nullInput: true});
+ }
+
+ if (typeof input === 'string') {
+ config._i = input = config._locale.preparse(input);
+ }
+
+ if (moment.isMoment(input)) {
+ return new Moment(input, true);
+ } else if (format) {
+ if (isArray(format)) {
+ makeDateFromStringAndArray(config);
+ } else {
+ makeDateFromStringAndFormat(config);
+ }
+ } else {
+ makeDateFromInput(config);
+ }
+
+ return new Moment(config);
+ }
+
+ moment = function (input, format, locale, strict) {
+ var c;
+
+ if (typeof(locale) === "boolean") {
+ strict = locale;
+ locale = undefined;
+ }
+ // object construction must be done this way.
+ // https://github.com/moment/moment/issues/1423
+ c = {};
+ c._isAMomentObject = true;
+ c._i = input;
+ c._f = format;
+ c._l = locale;
+ c._strict = strict;
+ c._isUTC = false;
+ c._pf = defaultParsingFlags();
+
+ return makeMoment(c);
+ };
+
+ moment.suppressDeprecationWarnings = false;
+
+ moment.createFromInputFallback = deprecate(
+ 'moment construction falls back to js Date. This is ' +
+ 'discouraged and will be removed in upcoming major ' +
+ 'release. Please refer to ' +
+ 'https://github.com/moment/moment/issues/1407 for more info.',
+ function (config) {
+ config._d = new Date(config._i);
+ }
+ );
+
+ // Pick a moment m from moments so that m[fn](other) is true for all
+ // other. This relies on the function fn to be transitive.
+ //
+ // moments should either be an array of moment objects or an array, whose
+ // first element is an array of moment objects.
+ function pickBy(fn, moments) {
+ var res, i;
+ if (moments.length === 1 && isArray(moments[0])) {
+ moments = moments[0];
+ }
+ if (!moments.length) {
+ return moment();
+ }
+ res = moments[0];
+ for (i = 1; i < moments.length; ++i) {
+ if (moments[i][fn](res)) {
+ res = moments[i];
+ }
+ }
+ return res;
+ }
+
+ moment.min = function () {
+ var args = [].slice.call(arguments, 0);
+
+ return pickBy('isBefore', args);
+ };
+
+ moment.max = function () {
+ var args = [].slice.call(arguments, 0);
+
+ return pickBy('isAfter', args);
+ };
+
+ // creating with utc
+ moment.utc = function (input, format, locale, strict) {
+ var c;
+
+ if (typeof(locale) === "boolean") {
+ strict = locale;
+ locale = undefined;
+ }
+ // object construction must be done this way.
+ // https://github.com/moment/moment/issues/1423
+ c = {};
+ c._isAMomentObject = true;
+ c._useUTC = true;
+ c._isUTC = true;
+ c._l = locale;
+ c._i = input;
+ c._f = format;
+ c._strict = strict;
+ c._pf = defaultParsingFlags();
+
+ return makeMoment(c).utc();
+ };
+
+ // creating with unix timestamp (in seconds)
+ moment.unix = function (input) {
+ return moment(input * 1000);
+ };
+
+ // duration
+ moment.duration = function (input, key) {
+ var duration = input,
+ // matching against regexp is expensive, do it on demand
+ match = null,
+ sign,
+ ret,
+ parseIso,
+ diffRes;
+
+ if (moment.isDuration(input)) {
+ duration = {
+ ms: input._milliseconds,
+ d: input._days,
+ M: input._months
+ };
+ } else if (typeof input === 'number') {
+ duration = {};
+ if (key) {
+ duration[key] = input;
+ } else {
+ duration.milliseconds = input;
+ }
+ } else if (!!(match = aspNetTimeSpanJsonRegex.exec(input))) {
+ sign = (match[1] === '-') ? -1 : 1;
+ duration = {
+ y: 0,
+ d: toInt(match[DATE]) * sign,
+ h: toInt(match[HOUR]) * sign,
+ m: toInt(match[MINUTE]) * sign,
+ s: toInt(match[SECOND]) * sign,
+ ms: toInt(match[MILLISECOND]) * sign
+ };
+ } else if (!!(match = isoDurationRegex.exec(input))) {
+ sign = (match[1] === '-') ? -1 : 1;
+ parseIso = function (inp) {
+ // We'd normally use ~~inp for this, but unfortunately it also
+ // converts floats to ints.
+ // inp may be undefined, so careful calling replace on it.
+ var res = inp && parseFloat(inp.replace(',', '.'));
+ // apply sign while we're at it
+ return (isNaN(res) ? 0 : res) * sign;
+ };
+ duration = {
+ y: parseIso(match[2]),
+ M: parseIso(match[3]),
+ d: parseIso(match[4]),
+ h: parseIso(match[5]),
+ m: parseIso(match[6]),
+ s: parseIso(match[7]),
+ w: parseIso(match[8])
+ };
+ } else if (typeof duration === 'object' &&
+ ('from' in duration || 'to' in duration)) {
+ diffRes = momentsDifference(moment(duration.from), moment(duration.to));
+
+ duration = {};
+ duration.ms = diffRes.milliseconds;
+ duration.M = diffRes.months;
+ }
+
+ ret = new Duration(duration);
+
+ if (moment.isDuration(input) && input.hasOwnProperty('_locale')) {
+ ret._locale = input._locale;
+ }
+
+ return ret;
+ };
+
+ // version number
+ moment.version = VERSION;
+
+ // default format
+ moment.defaultFormat = isoFormat;
+
+ // constant that refers to the ISO standard
+ moment.ISO_8601 = function () {};
+
+ // Plugins that add properties should also add the key here (null value),
+ // so we can properly clone ourselves.
+ moment.momentProperties = momentProperties;
+
+ // This function will be called whenever a moment is mutated.
+ // It is intended to keep the offset in sync with the timezone.
+ moment.updateOffset = function () {};
+
+ // This function allows you to set a threshold for relative time strings
+ moment.relativeTimeThreshold = function (threshold, limit) {
+ if (relativeTimeThresholds[threshold] === undefined) {
+ return false;
+ }
+ if (limit === undefined) {
+ return relativeTimeThresholds[threshold];
+ }
+ relativeTimeThresholds[threshold] = limit;
+ return true;
+ };
+
+ moment.lang = deprecate(
+ "moment.lang is deprecated. Use moment.locale instead.",
+ function (key, value) {
+ return moment.locale(key, value);
+ }
+ );
+
+ // This function will load locale and then set the global locale. If
+ // no arguments are passed in, it will simply return the current global
+ // locale key.
+ moment.locale = function (key, values) {
+ var data;
+ if (key) {
+ if (typeof(values) !== "undefined") {
+ data = moment.defineLocale(key, values);
+ }
+ else {
+ data = moment.localeData(key);
+ }
+
+ if (data) {
+ moment.duration._locale = moment._locale = data;
+ }
+ }
+
+ return moment._locale._abbr;
+ };
+
+ moment.defineLocale = function (name, values) {
+ if (values !== null) {
+ values.abbr = name;
+ if (!locales[name]) {
+ locales[name] = new Locale();
+ }
+ locales[name].set(values);
+
+ // backwards compat for now: also set the locale
+ moment.locale(name);
+
+ return locales[name];
+ } else {
+ // useful for testing
+ delete locales[name];
+ return null;
+ }
+ };
+
+ moment.langData = deprecate(
+ "moment.langData is deprecated. Use moment.localeData instead.",
+ function (key) {
+ return moment.localeData(key);
+ }
+ );
+
+ // returns locale data
+ moment.localeData = function (key) {
+ var locale;
+
+ if (key && key._locale && key._locale._abbr) {
+ key = key._locale._abbr;
+ }
+
+ if (!key) {
+ return moment._locale;
+ }
+
+ if (!isArray(key)) {
+ //short-circuit everything else
+ locale = loadLocale(key);
+ if (locale) {
+ return locale;
+ }
+ key = [key];
+ }
+
+ return chooseLocale(key);
+ };
+
+ // compare moment object
+ moment.isMoment = function (obj) {
+ return obj instanceof Moment ||
+ (obj != null && obj.hasOwnProperty('_isAMomentObject'));
+ };
+
+ // for typechecking Duration objects
+ moment.isDuration = function (obj) {
+ return obj instanceof Duration;
+ };
+
+ for (i = lists.length - 1; i >= 0; --i) {
+ makeList(lists[i]);
+ }
+
+ moment.normalizeUnits = function (units) {
+ return normalizeUnits(units);
+ };
+
+ moment.invalid = function (flags) {
+ var m = moment.utc(NaN);
+ if (flags != null) {
+ extend(m._pf, flags);
+ }
+ else {
+ m._pf.userInvalidated = true;
+ }
+
+ return m;
+ };
+
+ moment.parseZone = function () {
+ return moment.apply(null, arguments).parseZone();
+ };
+
+ moment.parseTwoDigitYear = function (input) {
+ return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
+ };
+
+ /************************************
+ Moment Prototype
+ ************************************/
+
+
+ extend(moment.fn = Moment.prototype, {
+
+ clone : function () {
+ return moment(this);
+ },
+
+ valueOf : function () {
+ return +this._d + ((this._offset || 0) * 60000);
+ },
+
+ unix : function () {
+ return Math.floor(+this / 1000);
+ },
+
+ toString : function () {
+ return this.clone().locale('en').format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");
+ },
+
+ toDate : function () {
+ return this._offset ? new Date(+this) : this._d;
+ },
+
+ toISOString : function () {
+ var m = moment(this).utc();
+ if (0 < m.year() && m.year() <= 9999) {
+ return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
+ } else {
+ return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
+ }
+ },
+
+ toArray : function () {
+ var m = this;
+ return [
+ m.year(),
+ m.month(),
+ m.date(),
+ m.hours(),
+ m.minutes(),
+ m.seconds(),
+ m.milliseconds()
+ ];
+ },
+
+ isValid : function () {
+ return isValid(this);
+ },
+
+ isDSTShifted : function () {
+ if (this._a) {
+ return this.isValid() && compareArrays(this._a, (this._isUTC ? moment.utc(this._a) : moment(this._a)).toArray()) > 0;
+ }
+
+ return false;
+ },
+
+ parsingFlags : function () {
+ return extend({}, this._pf);
+ },
+
+ invalidAt: function () {
+ return this._pf.overflow;
+ },
+
+ utc : function (keepLocalTime) {
+ return this.zone(0, keepLocalTime);
+ },
+
+ local : function (keepLocalTime) {
+ if (this._isUTC) {
+ this.zone(0, keepLocalTime);
+ this._isUTC = false;
+
+ if (keepLocalTime) {
+ this.add(this._d.getTimezoneOffset(), 'm');
+ }
+ }
+ return this;
+ },
+
+ format : function (inputString) {
+ var output = formatMoment(this, inputString || moment.defaultFormat);
+ return this.localeData().postformat(output);
+ },
+
+ add : createAdder(1, 'add'),
+
+ subtract : createAdder(-1, 'subtract'),
+
+ diff : function (input, units, asFloat) {
+ var that = makeAs(input, this),
+ zoneDiff = (this.zone() - that.zone()) * 6e4,
+ diff, output;
+
+ units = normalizeUnits(units);
+
+ if (units === 'year' || units === 'month') {
+ // average number of days in the months in the given dates
+ diff = (this.daysInMonth() + that.daysInMonth()) * 432e5; // 24 * 60 * 60 * 1000 / 2
+ // difference in months
+ output = ((this.year() - that.year()) * 12) + (this.month() - that.month());
+ // adjust by taking difference in days, average number of days
+ // and dst in the given months.
+ output += ((this - moment(this).startOf('month')) -
+ (that - moment(that).startOf('month'))) / diff;
+ // same as above but with zones, to negate all dst
+ output -= ((this.zone() - moment(this).startOf('month').zone()) -
+ (that.zone() - moment(that).startOf('month').zone())) * 6e4 / diff;
+ if (units === 'year') {
+ output = output / 12;
+ }
+ } else {
+ diff = (this - that);
+ output = units === 'second' ? diff / 1e3 : // 1000
+ units === 'minute' ? diff / 6e4 : // 1000 * 60
+ units === 'hour' ? diff / 36e5 : // 1000 * 60 * 60
+ units === 'day' ? (diff - zoneDiff) / 864e5 : // 1000 * 60 * 60 * 24, negate dst
+ units === 'week' ? (diff - zoneDiff) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst
+ diff;
+ }
+ return asFloat ? output : absRound(output);
+ },
+
+ from : function (time, withoutSuffix) {
+ return moment.duration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
+ },
+
+ fromNow : function (withoutSuffix) {
+ return this.from(moment(), withoutSuffix);
+ },
+
+ calendar : function (time) {
+ // We want to compare the start of today, vs this.
+ // Getting start-of-today depends on whether we're zone'd or not.
+ var now = time || moment(),
+ sod = makeAs(now, this).startOf('day'),
+ diff = this.diff(sod, 'days', true),
+ format = diff < -6 ? 'sameElse' :
+ diff < -1 ? 'lastWeek' :
+ diff < 0 ? 'lastDay' :
+ diff < 1 ? 'sameDay' :
+ diff < 2 ? 'nextDay' :
+ diff < 7 ? 'nextWeek' : 'sameElse';
+ return this.format(this.localeData().calendar(format, this));
+ },
+
+ isLeapYear : function () {
+ return isLeapYear(this.year());
+ },
+
+ isDST : function () {
+ return (this.zone() < this.clone().month(0).zone() ||
+ this.zone() < this.clone().month(5).zone());
+ },
+
+ day : function (input) {
+ var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
+ if (input != null) {
+ input = parseWeekday(input, this.localeData());
+ return this.add(input - day, 'd');
+ } else {
+ return day;
+ }
+ },
+
+ month : makeAccessor('Month', true),
+
+ startOf : function (units) {
+ units = normalizeUnits(units);
+ // the following switch intentionally omits break keywords
+ // to utilize falling through the cases.
+ switch (units) {
+ case 'year':
+ this.month(0);
+ /* falls through */
+ case 'quarter':
+ case 'month':
+ this.date(1);
+ /* falls through */
+ case 'week':
+ case 'isoWeek':
+ case 'day':
+ this.hours(0);
+ /* falls through */
+ case 'hour':
+ this.minutes(0);
+ /* falls through */
+ case 'minute':
+ this.seconds(0);
+ /* falls through */
+ case 'second':
+ this.milliseconds(0);
+ /* falls through */
+ }
+
+ // weeks are a special case
+ if (units === 'week') {
+ this.weekday(0);
+ } else if (units === 'isoWeek') {
+ this.isoWeekday(1);
+ }
+
+ // quarters are also special
+ if (units === 'quarter') {
+ this.month(Math.floor(this.month() / 3) * 3);
+ }
+
+ return this;
+ },
+
+ endOf: function (units) {
+ units = normalizeUnits(units);
+ return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');
+ },
+
+ isAfter: function (input, units) {
+ units = typeof units !== 'undefined' ? units : 'millisecond';
+ return +this.clone().startOf(units) > +moment(input).startOf(units);
+ },
+
+ isBefore: function (input, units) {
+ units = typeof units !== 'undefined' ? units : 'millisecond';
+ return +this.clone().startOf(units) < +moment(input).startOf(units);
+ },
+
+ isSame: function (input, units) {
+ units = units || 'ms';
+ return +this.clone().startOf(units) === +makeAs(input, this).startOf(units);
+ },
+
+ min: deprecate(
+ 'moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548',
+ function (other) {
+ other = moment.apply(null, arguments);
+ return other < this ? this : other;
+ }
+ ),
+
+ max: deprecate(
+ 'moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548',
+ function (other) {
+ other = moment.apply(null, arguments);
+ return other > this ? this : other;
+ }
+ ),
+
+ // keepLocalTime = true means only change the timezone, without
+ // affecting the local hour. So 5:31:26 +0300 --[zone(2, true)]-->
+ // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist int zone
+ // +0200, so we adjust the time as needed, to be valid.
+ //
+ // Keeping the time actually adds/subtracts (one hour)
+ // from the actual represented time. That is why we call updateOffset
+ // a second time. In case it wants us to change the offset again
+ // _changeInProgress == true case, then we have to adjust, because
+ // there is no such time in the given timezone.
+ zone : function (input, keepLocalTime) {
+ var offset = this._offset || 0,
+ localAdjust;
+ if (input != null) {
+ if (typeof input === 'string') {
+ input = timezoneMinutesFromString(input);
+ }
+ if (Math.abs(input) < 16) {
+ input = input * 60;
+ }
+ if (!this._isUTC && keepLocalTime) {
+ localAdjust = this._d.getTimezoneOffset();
+ }
+ this._offset = input;
+ this._isUTC = true;
+ if (localAdjust != null) {
+ this.subtract(localAdjust, 'm');
+ }
+ if (offset !== input) {
+ if (!keepLocalTime || this._changeInProgress) {
+ addOrSubtractDurationFromMoment(this,
+ moment.duration(offset - input, 'm'), 1, false);
+ } else if (!this._changeInProgress) {
+ this._changeInProgress = true;
+ moment.updateOffset(this, true);
+ this._changeInProgress = null;
+ }
+ }
+ } else {
+ return this._isUTC ? offset : this._d.getTimezoneOffset();
+ }
+ return this;
+ },
+
+ zoneAbbr : function () {
+ return this._isUTC ? 'UTC' : '';
+ },
+
+ zoneName : function () {
+ return this._isUTC ? 'Coordinated Universal Time' : '';
+ },
+
+ parseZone : function () {
+ if (this._tzm) {
+ this.zone(this._tzm);
+ } else if (typeof this._i === 'string') {
+ this.zone(this._i);
+ }
+ return this;
+ },
+
+ hasAlignedHourOffset : function (input) {
+ if (!input) {
+ input = 0;
+ }
+ else {
+ input = moment(input).zone();
+ }
+
+ return (this.zone() - input) % 60 === 0;
+ },
+
+ daysInMonth : function () {
+ return daysInMonth(this.year(), this.month());
+ },
+
+ dayOfYear : function (input) {
+ var dayOfYear = round((moment(this).startOf('day') - moment(this).startOf('year')) / 864e5) + 1;
+ return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
+ },
+
+ quarter : function (input) {
+ return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
+ },
+
+ weekYear : function (input) {
+ var year = weekOfYear(this, this.localeData()._week.dow, this.localeData()._week.doy).year;
+ return input == null ? year : this.add((input - year), 'y');
+ },
+
+ isoWeekYear : function (input) {
+ var year = weekOfYear(this, 1, 4).year;
+ return input == null ? year : this.add((input - year), 'y');
+ },
+
+ week : function (input) {
+ var week = this.localeData().week(this);
+ return input == null ? week : this.add((input - week) * 7, 'd');
+ },
+
+ isoWeek : function (input) {
+ var week = weekOfYear(this, 1, 4).week;
+ return input == null ? week : this.add((input - week) * 7, 'd');
+ },
+
+ weekday : function (input) {
+ var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
+ return input == null ? weekday : this.add(input - weekday, 'd');
+ },
+
+ isoWeekday : function (input) {
+ // behaves the same as moment#day except
+ // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
+ // as a setter, sunday should belong to the previous week.
+ return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7);
+ },
+
+ isoWeeksInYear : function () {
+ return weeksInYear(this.year(), 1, 4);
+ },
+
+ weeksInYear : function () {
+ var weekInfo = this.localeData()._week;
+ return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
+ },
+
+ get : function (units) {
+ units = normalizeUnits(units);
+ return this[units]();
+ },
+
+ set : function (units, value) {
+ units = normalizeUnits(units);
+ if (typeof this[units] === 'function') {
+ this[units](value);
+ }
+ return this;
+ },
+
+ // If passed a locale key, it will set the locale for this
+ // instance. Otherwise, it will return the locale configuration
+ // variables for this instance.
+ locale : function (key) {
+ if (key === undefined) {
+ return this._locale._abbr;
+ } else {
+ this._locale = moment.localeData(key);
+ return this;
+ }
+ },
+
+ lang : deprecate(
+ "moment().lang() is deprecated. Use moment().localeData() instead.",
+ function (key) {
+ if (key === undefined) {
+ return this.localeData();
+ } else {
+ this._locale = moment.localeData(key);
+ return this;
+ }
+ }
+ ),
+
+ localeData : function () {
+ return this._locale;
+ }
+ });
+
+ function rawMonthSetter(mom, value) {
+ var dayOfMonth;
+
+ // TODO: Move this out of here!
+ if (typeof value === 'string') {
+ value = mom.localeData().monthsParse(value);
+ // TODO: Another silent failure?
+ if (typeof value !== 'number') {
+ return mom;
+ }
+ }
+
+ dayOfMonth = Math.min(mom.date(),
+ daysInMonth(mom.year(), value));
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
+ return mom;
+ }
+
+ function rawGetter(mom, unit) {
+ return mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]();
+ }
+
+ function rawSetter(mom, unit, value) {
+ if (unit === 'Month') {
+ return rawMonthSetter(mom, value);
+ } else {
+ return mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
+ }
+ }
+
+ function makeAccessor(unit, keepTime) {
+ return function (value) {
+ if (value != null) {
+ rawSetter(this, unit, value);
+ moment.updateOffset(this, keepTime);
+ return this;
+ } else {
+ return rawGetter(this, unit);
+ }
+ };
+ }
+
+ moment.fn.millisecond = moment.fn.milliseconds = makeAccessor('Milliseconds', false);
+ moment.fn.second = moment.fn.seconds = makeAccessor('Seconds', false);
+ moment.fn.minute = moment.fn.minutes = makeAccessor('Minutes', false);
+ // Setting the hour should keep the time, because the user explicitly
+ // specified which hour he wants. So trying to maintain the same hour (in
+ // a new timezone) makes sense. Adding/subtracting hours does not follow
+ // this rule.
+ moment.fn.hour = moment.fn.hours = makeAccessor('Hours', true);
+ // moment.fn.month is defined separately
+ moment.fn.date = makeAccessor('Date', true);
+ moment.fn.dates = deprecate('dates accessor is deprecated. Use date instead.', makeAccessor('Date', true));
+ moment.fn.year = makeAccessor('FullYear', true);
+ moment.fn.years = deprecate('years accessor is deprecated. Use year instead.', makeAccessor('FullYear', true));
+
+ // add plural methods
+ moment.fn.days = moment.fn.day;
+ moment.fn.months = moment.fn.month;
+ moment.fn.weeks = moment.fn.week;
+ moment.fn.isoWeeks = moment.fn.isoWeek;
+ moment.fn.quarters = moment.fn.quarter;
+
+ // add aliased format methods
+ moment.fn.toJSON = moment.fn.toISOString;
+
+ /************************************
+ Duration Prototype
+ ************************************/
+
+
+ function daysToYears (days) {
+ // 400 years have 146097 days (taking into account leap year rules)
+ return days * 400 / 146097;
+ }
+
+ function yearsToDays (years) {
+ // years * 365 + absRound(years / 4) -
+ // absRound(years / 100) + absRound(years / 400);
+ return years * 146097 / 400;
+ }
+
+ extend(moment.duration.fn = Duration.prototype, {
+
+ _bubble : function () {
+ var milliseconds = this._milliseconds,
+ days = this._days,
+ months = this._months,
+ data = this._data,
+ seconds, minutes, hours, years = 0;
+
+ // The following code bubbles up values, see the tests for
+ // examples of what that means.
+ data.milliseconds = milliseconds % 1000;
+
+ seconds = absRound(milliseconds / 1000);
+ data.seconds = seconds % 60;
+
+ minutes = absRound(seconds / 60);
+ data.minutes = minutes % 60;
+
+ hours = absRound(minutes / 60);
+ data.hours = hours % 24;
+
+ days += absRound(hours / 24);
+
+ // Accurately convert days to years, assume start from year 0.
+ years = absRound(daysToYears(days));
+ days -= absRound(yearsToDays(years));
+
+ // 30 days to a month
+ // TODO (iskren): Use anchor date (like 1st Jan) to compute this.
+ months += absRound(days / 30);
+ days %= 30;
+
+ // 12 months -> 1 year
+ years += absRound(months / 12);
+ months %= 12;
+
+ data.days = days;
+ data.months = months;
+ data.years = years;
+ },
+
+ abs : function () {
+ this._milliseconds = Math.abs(this._milliseconds);
+ this._days = Math.abs(this._days);
+ this._months = Math.abs(this._months);
+
+ this._data.milliseconds = Math.abs(this._data.milliseconds);
+ this._data.seconds = Math.abs(this._data.seconds);
+ this._data.minutes = Math.abs(this._data.minutes);
+ this._data.hours = Math.abs(this._data.hours);
+ this._data.months = Math.abs(this._data.months);
+ this._data.years = Math.abs(this._data.years);
+
+ return this;
+ },
+
+ weeks : function () {
+ return absRound(this.days() / 7);
+ },
+
+ valueOf : function () {
+ return this._milliseconds +
+ this._days * 864e5 +
+ (this._months % 12) * 2592e6 +
+ toInt(this._months / 12) * 31536e6;
+ },
+
+ humanize : function (withSuffix) {
+ var output = relativeTime(this, !withSuffix, this.localeData());
+
+ if (withSuffix) {
+ output = this.localeData().pastFuture(+this, output);
+ }
+
+ return this.localeData().postformat(output);
+ },
+
+ add : function (input, val) {
+ // supports only 2.0-style add(1, 's') or add(moment)
+ var dur = moment.duration(input, val);
+
+ this._milliseconds += dur._milliseconds;
+ this._days += dur._days;
+ this._months += dur._months;
+
+ this._bubble();
+
+ return this;
+ },
+
+ subtract : function (input, val) {
+ var dur = moment.duration(input, val);
+
+ this._milliseconds -= dur._milliseconds;
+ this._days -= dur._days;
+ this._months -= dur._months;
+
+ this._bubble();
+
+ return this;
+ },
+
+ get : function (units) {
+ units = normalizeUnits(units);
+ return this[units.toLowerCase() + 's']();
+ },
+
+ as : function (units) {
+ var days, months;
+ units = normalizeUnits(units);
+
+ days = this._days + this._milliseconds / 864e5;
+ if (units === 'month' || units === 'year') {
+ months = this._months + daysToYears(days) * 12;
+ return units === 'month' ? months : months / 12;
+ } else {
+ days += yearsToDays(this._months / 12);
+ switch (units) {
+ case 'week': return days / 7;
+ case 'day': return days;
+ case 'hour': return days * 24;
+ case 'minute': return days * 24 * 60;
+ case 'second': return days * 24 * 60 * 60;
+ case 'millisecond': return days * 24 * 60 * 60 * 1000;
+ default: throw new Error('Unknown unit ' + units);
+ }
+ }
+ },
+
+ lang : moment.fn.lang,
+ locale : moment.fn.locale,
+
+ toIsoString : deprecate(
+ "toIsoString() is deprecated. Please use toISOString() instead " +
+ "(notice the capitals)",
+ function () {
+ return this.toISOString();
+ }
+ ),
+
+ toISOString : function () {
+ // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
+ var years = Math.abs(this.years()),
+ months = Math.abs(this.months()),
+ days = Math.abs(this.days()),
+ hours = Math.abs(this.hours()),
+ minutes = Math.abs(this.minutes()),
+ seconds = Math.abs(this.seconds() + this.milliseconds() / 1000);
+
+ if (!this.asSeconds()) {
+ // this is the same as C#'s (Noda) and python (isodate)...
+ // but not other JS (goog.date)
+ return 'P0D';
+ }
+
+ return (this.asSeconds() < 0 ? '-' : '') +
+ 'P' +
+ (years ? years + 'Y' : '') +
+ (months ? months + 'M' : '') +
+ (days ? days + 'D' : '') +
+ ((hours || minutes || seconds) ? 'T' : '') +
+ (hours ? hours + 'H' : '') +
+ (minutes ? minutes + 'M' : '') +
+ (seconds ? seconds + 'S' : '');
+ },
+
+ localeData : function () {
+ return this._locale;
+ }
+ });
+
+ function makeDurationGetter(name) {
+ moment.duration.fn[name] = function () {
+ return this._data[name];
+ };
+ }
+
+ for (i in unitMillisecondFactors) {
+ if (unitMillisecondFactors.hasOwnProperty(i)) {
+ makeDurationGetter(i.toLowerCase());
+ }
+ }
+
+ moment.duration.fn.asMilliseconds = function () {
+ return this.as('ms');
+ };
+ moment.duration.fn.asSeconds = function () {
+ return this.as('s');
+ };
+ moment.duration.fn.asMinutes = function () {
+ return this.as('m');
+ };
+ moment.duration.fn.asHours = function () {
+ return this.as('h');
+ };
+ moment.duration.fn.asDays = function () {
+ return this.as('d');
+ };
+ moment.duration.fn.asWeeks = function () {
+ return this.as('weeks');
+ };
+ moment.duration.fn.asMonths = function () {
+ return this.as('M');
+ };
+ moment.duration.fn.asYears = function () {
+ return this.as('y');
+ };
+
+ /************************************
+ Default Locale
+ ************************************/
+
+
+ // Set default locale, other locale will inherit from English.
+ moment.locale('en', {
+ ordinal : function (number) {
+ var b = number % 10,
+ output = (toInt(number % 100 / 10) === 1) ? 'th' :
+ (b === 1) ? 'st' :
+ (b === 2) ? 'nd' :
+ (b === 3) ? 'rd' : 'th';
+ return number + output;
+ }
+ });
+
+ /* EMBED_LOCALES */
+
+ /************************************
+ Exposing Moment
+ ************************************/
+
+ function makeGlobal(shouldDeprecate) {
+ /*global ender:false */
+ if (typeof ender !== 'undefined') {
+ return;
+ }
+ oldGlobalMoment = globalScope.moment;
+ if (shouldDeprecate) {
+ globalScope.moment = deprecate(
+ 'Accessing Moment through the global scope is ' +
+ 'deprecated, and will be removed in an upcoming ' +
+ 'release.',
+ moment);
+ } else {
+ globalScope.moment = moment;
+ }
+ }
+
+ // CommonJS module is defined
+ if (hasModule) {
+ module.exports = moment;
+ } else if (typeof define === 'function' && define.amd) {
+ define('moment', function (require, exports, module) {
+ if (module.config && module.config() && module.config().noGlobal === true) {
+ // release the global variable
+ globalScope.moment = oldGlobalMoment;
+ }
+
+ return moment;
+ });
+ makeGlobal(true);
+ } else {
+ makeGlobal();
+ }
+}).call(this); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/bootstrap-daterangepicker/moment.min.js b/common/src/main/webapp/thirdparty/bootstrap-daterangepicker/moment.min.js
new file mode 100644
index 0000000..c30bbff
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/bootstrap-daterangepicker/moment.min.js
@@ -0,0 +1,6 @@
+//! moment.js
+//! version : 2.8.1
+//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
+//! license : MIT
+//! momentjs.com
+(function(a){function b(a,b,c){switch(arguments.length){case 2:return null!=a?a:b;case 3:return null!=a?a:null!=b?b:c;default:throw new Error("Implement me")}}function c(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function d(a){rb.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function e(a,b){var c=!0;return l(function(){return c&&(d(a),c=!1),b.apply(this,arguments)},b)}function f(a,b){nc[a]||(d(b),nc[a]=!0)}function g(a,b){return function(c){return o(a.call(this,c),b)}}function h(a,b){return function(c){return this.localeData().ordinal(a.call(this,c),b)}}function i(){}function j(a,b){b!==!1&&E(a),m(this,a),this._d=new Date(+a._d)}function k(a){var b=x(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+36e5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=rb.localeData(),this._bubble()}function l(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return b.hasOwnProperty("toString")&&(a.toString=b.toString),b.hasOwnProperty("valueOf")&&(a.valueOf=b.valueOf),a}function m(a,b){var c,d,e;if("undefined"!=typeof b._isAMomentObject&&(a._isAMomentObject=b._isAMomentObject),"undefined"!=typeof b._i&&(a._i=b._i),"undefined"!=typeof b._f&&(a._f=b._f),"undefined"!=typeof b._l&&(a._l=b._l),"undefined"!=typeof b._strict&&(a._strict=b._strict),"undefined"!=typeof b._tzm&&(a._tzm=b._tzm),"undefined"!=typeof b._isUTC&&(a._isUTC=b._isUTC),"undefined"!=typeof b._offset&&(a._offset=b._offset),"undefined"!=typeof b._pf&&(a._pf=b._pf),"undefined"!=typeof b._locale&&(a._locale=b._locale),Fb.length>0)for(c in Fb)d=Fb[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function n(a){return 0>a?Math.ceil(a):Math.floor(a)}function o(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.length<b;)d="0"+d;return(e?c?"+":"":"-")+d}function p(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function q(a,b){var c;return b=J(b,a),a.isBefore(b)?c=p(a,b):(c=p(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c}function r(a,b){return function(c,d){var e,g;return null===d||isNaN(+d)||(f(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),g=c,c=d,d=g),c="string"==typeof c?+c:c,e=rb.duration(c,d),s(this,e,a),this}}function s(a,b,c,d){var e=b._milliseconds,f=b._days,g=b._months;d=null==d?!0:d,e&&a._d.setTime(+a._d+e*c),f&&lb(a,"Date",kb(a,"Date")+f*c),g&&jb(a,kb(a,"Month")+g*c),d&&rb.updateOffset(a,f||g)}function t(a){return"[object Array]"===Object.prototype.toString.call(a)}function u(a){return"[object Date]"===Object.prototype.toString.call(a)||a instanceof Date}function v(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&z(a[d])!==z(b[d]))&&g++;return g+f}function w(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=gc[a]||hc[b]||b}return a}function x(a){var b,c,d={};for(c in a)a.hasOwnProperty(c)&&(b=w(c),b&&(d[b]=a[c]));return d}function y(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}rb[b]=function(e,f){var g,h,i=rb._locale[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=rb().utc().set(d,a);return i.call(rb._locale,b,e||"")},null!=f)return h(f);for(g=0;c>g;g++)j.push(h(g));return j}}function z(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function A(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function B(a,b,c){return fb(rb([a,11,31+b-c]),b,c).week}function C(a){return D(a)?366:365}function D(a){return a%4===0&&a%100!==0||a%400===0}function E(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[yb]<0||a._a[yb]>11?yb:a._a[zb]<1||a._a[zb]>A(a._a[xb],a._a[yb])?zb:a._a[Ab]<0||a._a[Ab]>23?Ab:a._a[Bb]<0||a._a[Bb]>59?Bb:a._a[Cb]<0||a._a[Cb]>59?Cb:a._a[Db]<0||a._a[Db]>999?Db:-1,a._pf._overflowDayOfYear&&(xb>b||b>zb)&&(b=zb),a._pf.overflow=b)}function F(a){return null==a._isValid&&(a._isValid=!isNaN(a._d.getTime())&&a._pf.overflow<0&&!a._pf.empty&&!a._pf.invalidMonth&&!a._pf.nullInput&&!a._pf.invalidFormat&&!a._pf.userInvalidated,a._strict&&(a._isValid=a._isValid&&0===a._pf.charsLeftOver&&0===a._pf.unusedTokens.length)),a._isValid}function G(a){return a?a.toLowerCase().replace("_","-"):a}function H(a){for(var b,c,d,e,f=0;f<a.length;){for(e=G(a[f]).split("-"),b=e.length,c=G(a[f+1]),c=c?c.split("-"):null;b>0;){if(d=I(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&v(e,c,!0)>=b-1)break;b--}f++}return null}function I(a){var b=null;if(!Eb[a]&&Gb)try{b=rb.locale(),require("./locale/"+a),rb.locale(b)}catch(c){}return Eb[a]}function J(a,b){return b._isUTC?rb(a).zone(b._offset||0):rb(a).local()}function K(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function L(a){var b,c,d=a.match(Kb);for(b=0,c=d.length;c>b;b++)d[b]=mc[d[b]]?mc[d[b]]:K(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function M(a,b){return a.isValid()?(b=N(b,a.localeData()),ic[b]||(ic[b]=L(b)),ic[b](a)):a.localeData().invalidDate()}function N(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Lb.lastIndex=0;d>=0&&Lb.test(a);)a=a.replace(Lb,c),Lb.lastIndex=0,d-=1;return a}function O(a,b){var c,d=b._strict;switch(a){case"Q":return Wb;case"DDDD":return Yb;case"YYYY":case"GGGG":case"gggg":return d?Zb:Ob;case"Y":case"G":case"g":return _b;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?$b:Pb;case"S":if(d)return Wb;case"SS":if(d)return Xb;case"SSS":if(d)return Yb;case"DDD":return Nb;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Rb;case"a":case"A":return b._locale._meridiemParse;case"X":return Ub;case"Z":case"ZZ":return Sb;case"T":return Tb;case"SSSS":return Qb;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?Xb:Mb;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Mb;case"Do":return Vb;default:return c=new RegExp(X(W(a.replace("\\","")),"i"))}}function P(a){a=a||"";var b=a.match(Sb)||[],c=b[b.length-1]||[],d=(c+"").match(ec)||["-",0,0],e=+(60*d[1])+z(d[2]);return"+"===d[0]?-e:e}function Q(a,b,c){var d,e=c._a;switch(a){case"Q":null!=b&&(e[yb]=3*(z(b)-1));break;case"M":case"MM":null!=b&&(e[yb]=z(b)-1);break;case"MMM":case"MMMM":d=c._locale.monthsParse(b),null!=d?e[yb]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[zb]=z(b));break;case"Do":null!=b&&(e[zb]=z(parseInt(b,10)));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=z(b));break;case"YY":e[xb]=rb.parseTwoDigitYear(b);break;case"YYYY":case"YYYYY":case"YYYYYY":e[xb]=z(b);break;case"a":case"A":c._isPm=c._locale.isPM(b);break;case"H":case"HH":case"h":case"hh":e[Ab]=z(b);break;case"m":case"mm":e[Bb]=z(b);break;case"s":case"ss":e[Cb]=z(b);break;case"S":case"SS":case"SSS":case"SSSS":e[Db]=z(1e3*("0."+b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=P(b);break;case"dd":case"ddd":case"dddd":d=c._locale.weekdaysParse(b),null!=d?(c._w=c._w||{},c._w.d=d):c._pf.invalidWeekday=b;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":a=a.substr(0,1);case"gggg":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=z(b));break;case"gg":case"GG":c._w=c._w||{},c._w[a]=rb.parseTwoDigitYear(b)}}function R(a){var c,d,e,f,g,h,i;c=a._w,null!=c.GG||null!=c.W||null!=c.E?(g=1,h=4,d=b(c.GG,a._a[xb],fb(rb(),1,4).year),e=b(c.W,1),f=b(c.E,1)):(g=a._locale._week.dow,h=a._locale._week.doy,d=b(c.gg,a._a[xb],fb(rb(),g,h).year),e=b(c.w,1),null!=c.d?(f=c.d,g>f&&++e):f=null!=c.e?c.e+g:g),i=gb(d,e,f,h,g),a._a[xb]=i.year,a._dayOfYear=i.dayOfYear}function S(a){var c,d,e,f,g=[];if(!a._d){for(e=U(a),a._w&&null==a._a[zb]&&null==a._a[yb]&&R(a),a._dayOfYear&&(f=b(a._a[xb],e[xb]),a._dayOfYear>C(f)&&(a._pf._overflowDayOfYear=!0),d=bb(f,0,a._dayOfYear),a._a[yb]=d.getUTCMonth(),a._a[zb]=d.getUTCDate()),c=0;3>c&&null==a._a[c];++c)a._a[c]=g[c]=e[c];for(;7>c;c++)a._a[c]=g[c]=null==a._a[c]?2===c?1:0:a._a[c];a._d=(a._useUTC?bb:ab).apply(null,g),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()+a._tzm)}}function T(a){var b;a._d||(b=x(a._i),a._a=[b.year,b.month,b.day,b.hour,b.minute,b.second,b.millisecond],S(a))}function U(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function V(a){if(a._f===rb.ISO_8601)return void Z(a);a._a=[],a._pf.empty=!0;var b,c,d,e,f,g=""+a._i,h=g.length,i=0;for(d=N(a._f,a._locale).match(Kb)||[],b=0;b<d.length;b++)e=d[b],c=(g.match(O(e,a))||[])[0],c&&(f=g.substr(0,g.indexOf(c)),f.length>0&&a._pf.unusedInput.push(f),g=g.slice(g.indexOf(c)+c.length),i+=c.length),mc[e]?(c?a._pf.empty=!1:a._pf.unusedTokens.push(e),Q(e,c,a)):a._strict&&!c&&a._pf.unusedTokens.push(e);a._pf.charsLeftOver=h-i,g.length>0&&a._pf.unusedInput.push(g),a._isPm&&a._a[Ab]<12&&(a._a[Ab]+=12),a._isPm===!1&&12===a._a[Ab]&&(a._a[Ab]=0),S(a),E(a)}function W(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function X(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Y(a){var b,d,e,f,g;if(0===a._f.length)return a._pf.invalidFormat=!0,void(a._d=new Date(0/0));for(f=0;f<a._f.length;f++)g=0,b=m({},a),b._pf=c(),b._f=a._f[f],V(b),F(b)&&(g+=b._pf.charsLeftOver,g+=10*b._pf.unusedTokens.length,b._pf.score=g,(null==e||e>g)&&(e=g,d=b));l(a,d||b)}function Z(a){var b,c,d=a._i,e=ac.exec(d);if(e){for(a._pf.iso=!0,b=0,c=cc.length;c>b;b++)if(cc[b][1].exec(d)){a._f=cc[b][0]+(e[6]||" ");break}for(b=0,c=dc.length;c>b;b++)if(dc[b][1].exec(d)){a._f+=dc[b][0];break}d.match(Sb)&&(a._f+="Z"),V(a)}else a._isValid=!1}function $(a){Z(a),a._isValid===!1&&(delete a._isValid,rb.createFromInputFallback(a))}function _(b){var c,d=b._i;d===a?b._d=new Date:u(d)?b._d=new Date(+d):null!==(c=Hb.exec(d))?b._d=new Date(+c[1]):"string"==typeof d?$(b):t(d)?(b._a=d.slice(0),S(b)):"object"==typeof d?T(b):"number"==typeof d?b._d=new Date(d):rb.createFromInputFallback(b)}function ab(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function bb(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function cb(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function db(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function eb(a,b,c){var d=rb.duration(a).abs(),e=wb(d.as("s")),f=wb(d.as("m")),g=wb(d.as("h")),h=wb(d.as("d")),i=wb(d.as("M")),j=wb(d.as("y")),k=e<jc.s&&["s",e]||1===f&&["m"]||f<jc.m&&["mm",f]||1===g&&["h"]||g<jc.h&&["hh",g]||1===h&&["d"]||h<jc.d&&["dd",h]||1===i&&["M"]||i<jc.M&&["MM",i]||1===j&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,db.apply({},k)}function fb(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=rb(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function gb(a,b,c,d,e){var f,g,h=bb(a,0,1).getUTCDay();return h=0===h?7:h,c=null!=c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:C(a-1)+g}}function hb(b){var c=b._i,d=b._f;return b._locale=b._locale||rb.localeData(b._l),null===c||d===a&&""===c?rb.invalid({nullInput:!0}):("string"==typeof c&&(b._i=c=b._locale.preparse(c)),rb.isMoment(c)?new j(c,!0):(d?t(d)?Y(b):V(b):_(b),new j(b)))}function ib(a,b){var c,d;if(1===b.length&&t(b[0])&&(b=b[0]),!b.length)return rb();for(c=b[0],d=1;d<b.length;++d)b[d][a](c)&&(c=b[d]);return c}function jb(a,b){var c;return"string"==typeof b&&(b=a.localeData().monthsParse(b),"number"!=typeof b)?a:(c=Math.min(a.date(),A(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a)}function kb(a,b){return a._d["get"+(a._isUTC?"UTC":"")+b]()}function lb(a,b,c){return"Month"===b?jb(a,c):a._d["set"+(a._isUTC?"UTC":"")+b](c)}function mb(a,b){return function(c){return null!=c?(lb(this,a,c),rb.updateOffset(this,b),this):kb(this,a)}}function nb(a){return 400*a/146097}function ob(a){return 146097*a/400}function pb(a){rb.duration.fn[a]=function(){return this._data[a]}}function qb(a){"undefined"==typeof ender&&(sb=vb.moment,vb.moment=a?e("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",rb):rb)}for(var rb,sb,tb,ub="2.8.1",vb="undefined"!=typeof global?global:this,wb=Math.round,xb=0,yb=1,zb=2,Ab=3,Bb=4,Cb=5,Db=6,Eb={},Fb=[],Gb="undefined"!=typeof module&&module.exports,Hb=/^\/?Date\((\-?\d+)/i,Ib=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Jb=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,Kb=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,Lb=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,Mb=/\d\d?/,Nb=/\d{1,3}/,Ob=/\d{1,4}/,Pb=/[+\-]?\d{1,6}/,Qb=/\d+/,Rb=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Sb=/Z|[\+\-]\d\d:?\d\d/gi,Tb=/T/i,Ub=/[\+\-]?\d+(\.\d{1,3})?/,Vb=/\d{1,2}/,Wb=/\d/,Xb=/\d\d/,Yb=/\d{3}/,Zb=/\d{4}/,$b=/[+-]?\d{6}/,_b=/[+-]?\d+/,ac=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,bc="YYYY-MM-DDTHH:mm:ssZ",cc=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],dc=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],ec=/([\+\-]|\d\d)/gi,fc=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),gc={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},hc={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},ic={},jc={s:45,m:45,h:22,d:26,M:11},kc="DDD w W M D d".split(" "),lc="M D H h m s w W".split(" "),mc={M:function(){return this.month()+1},MMM:function(a){return this.localeData().monthsShort(this,a)},MMMM:function(a){return this.localeData().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.localeData().weekdaysMin(this,a)},ddd:function(a){return this.localeData().weekdaysShort(this,a)},dddd:function(a){return this.localeData().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return o(this.year()%100,2)},YYYY:function(){return o(this.year(),4)},YYYYY:function(){return o(this.year(),5)},YYYYYY:function(){var a=this.year(),b=a>=0?"+":"-";return b+o(Math.abs(a),6)},gg:function(){return o(this.weekYear()%100,2)},gggg:function(){return o(this.weekYear(),4)},ggggg:function(){return o(this.weekYear(),5)},GG:function(){return o(this.isoWeekYear()%100,2)},GGGG:function(){return o(this.isoWeekYear(),4)},GGGGG:function(){return o(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return z(this.milliseconds()/100)},SS:function(){return o(z(this.milliseconds()/10),2)},SSS:function(){return o(this.milliseconds(),3)},SSSS:function(){return o(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+o(z(a/60),2)+":"+o(z(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+o(z(a/60),2)+o(z(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()},Q:function(){return this.quarter()}},nc={},oc=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];kc.length;)tb=kc.pop(),mc[tb+"o"]=h(mc[tb],tb);for(;lc.length;)tb=lc.pop(),mc[tb+tb]=g(mc[tb],2);mc.DDDD=g(mc.DDD,3),l(i.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a){var b,c,d;for(this._monthsParse||(this._monthsParse=[]),b=0;12>b;b++)if(this._monthsParse[b]||(c=rb.utc([2e3,b]),d="^"+this.months(c,"")+"|^"+this.monthsShort(c,""),this._monthsParse[b]=new RegExp(d.replace(".",""),"i")),this._monthsParse[b].test(a))return b},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=rb([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b){var c=this._calendar[a];return"function"==typeof c?c.apply(b):c},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",preparse:function(a){return a},postformat:function(a){return a},week:function(a){return fb(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),rb=function(b,d,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._i=b,g._f=d,g._l=e,g._strict=f,g._isUTC=!1,g._pf=c(),hb(g)},rb.suppressDeprecationWarnings=!1,rb.createFromInputFallback=e("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i)}),rb.min=function(){var a=[].slice.call(arguments,0);return ib("isBefore",a)},rb.max=function(){var a=[].slice.call(arguments,0);return ib("isAfter",a)},rb.utc=function(b,d,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._useUTC=!0,g._isUTC=!0,g._l=e,g._i=b,g._f=d,g._strict=f,g._pf=c(),hb(g).utc()},rb.unix=function(a){return rb(1e3*a)},rb.duration=function(a,b){var c,d,e,f,g=a,h=null;return rb.isDuration(a)?g={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(g={},b?g[b]=a:g.milliseconds=a):(h=Ib.exec(a))?(c="-"===h[1]?-1:1,g={y:0,d:z(h[zb])*c,h:z(h[Ab])*c,m:z(h[Bb])*c,s:z(h[Cb])*c,ms:z(h[Db])*c}):(h=Jb.exec(a))?(c="-"===h[1]?-1:1,e=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*c},g={y:e(h[2]),M:e(h[3]),d:e(h[4]),h:e(h[5]),m:e(h[6]),s:e(h[7]),w:e(h[8])}):"object"==typeof g&&("from"in g||"to"in g)&&(f=q(rb(g.from),rb(g.to)),g={},g.ms=f.milliseconds,g.M=f.months),d=new k(g),rb.isDuration(a)&&a.hasOwnProperty("_locale")&&(d._locale=a._locale),d},rb.version=ub,rb.defaultFormat=bc,rb.ISO_8601=function(){},rb.momentProperties=Fb,rb.updateOffset=function(){},rb.relativeTimeThreshold=function(b,c){return jc[b]===a?!1:c===a?jc[b]:(jc[b]=c,!0)},rb.lang=e("moment.lang is deprecated. Use moment.locale instead.",function(a,b){return rb.locale(a,b)}),rb.locale=function(a,b){var c;return a&&(c="undefined"!=typeof b?rb.defineLocale(a,b):rb.localeData(a),c&&(rb.duration._locale=rb._locale=c)),rb._locale._abbr},rb.defineLocale=function(a,b){return null!==b?(b.abbr=a,Eb[a]||(Eb[a]=new i),Eb[a].set(b),rb.locale(a),Eb[a]):(delete Eb[a],null)},rb.langData=e("moment.langData is deprecated. Use moment.localeData instead.",function(a){return rb.localeData(a)}),rb.localeData=function(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return rb._locale;if(!t(a)){if(b=I(a))return b;a=[a]}return H(a)},rb.isMoment=function(a){return a instanceof j||null!=a&&a.hasOwnProperty("_isAMomentObject")},rb.isDuration=function(a){return a instanceof k};for(tb=oc.length-1;tb>=0;--tb)y(oc[tb]);rb.normalizeUnits=function(a){return w(a)},rb.invalid=function(a){var b=rb.utc(0/0);return null!=a?l(b._pf,a):b._pf.userInvalidated=!0,b},rb.parseZone=function(){return rb.apply(null,arguments).parseZone()},rb.parseTwoDigitYear=function(a){return z(a)+(z(a)>68?1900:2e3)},l(rb.fn=j.prototype,{clone:function(){return rb(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=rb(this).utc();return 0<a.year()&&a.year()<=9999?M(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):M(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return F(this)},isDSTShifted:function(){return this._a?this.isValid()&&v(this._a,(this._isUTC?rb.utc(this._a):rb(this._a)).toArray())>0:!1},parsingFlags:function(){return l({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(a){return this.zone(0,a)},local:function(a){return this._isUTC&&(this.zone(0,a),this._isUTC=!1,a&&this.add(this._d.getTimezoneOffset(),"m")),this},format:function(a){var b=M(this,a||rb.defaultFormat);return this.localeData().postformat(b)},add:r(1,"add"),subtract:r(-1,"subtract"),diff:function(a,b,c){var d,e,f=J(a,this),g=6e4*(this.zone()-f.zone());return b=w(b),"year"===b||"month"===b?(d=432e5*(this.daysInMonth()+f.daysInMonth()),e=12*(this.year()-f.year())+(this.month()-f.month()),e+=(this-rb(this).startOf("month")-(f-rb(f).startOf("month")))/d,e-=6e4*(this.zone()-rb(this).startOf("month").zone()-(f.zone()-rb(f).startOf("month").zone()))/d,"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-g)/864e5:"week"===b?(d-g)/6048e5:d),c?e:n(e)},from:function(a,b){return rb.duration({to:this,from:a}).locale(this.locale()).humanize(!b)},fromNow:function(a){return this.from(rb(),a)},calendar:function(a){var b=a||rb(),c=J(b,this).startOf("day"),d=this.diff(c,"days",!0),e=-6>d?"sameElse":-1>d?"lastWeek":0>d?"lastDay":1>d?"sameDay":2>d?"nextDay":7>d?"nextWeek":"sameElse";return this.format(this.localeData().calendar(e,this))},isLeapYear:function(){return D(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=cb(a,this.localeData()),this.add(a-b,"d")):b},month:mb("Month",!0),startOf:function(a){switch(a=w(a)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(a){return a=w(a),this.startOf(a).add(1,"isoWeek"===a?"week":a).subtract(1,"ms")},isAfter:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)>+rb(a).startOf(b)},isBefore:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)<+rb(a).startOf(b)},isSame:function(a,b){return b=b||"ms",+this.clone().startOf(b)===+J(a,this).startOf(b)},min:e("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(a){return a=rb.apply(null,arguments),this>a?this:a}),max:e("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(a){return a=rb.apply(null,arguments),a>this?this:a}),zone:function(a,b){var c,d=this._offset||0;return null==a?this._isUTC?d:this._d.getTimezoneOffset():("string"==typeof a&&(a=P(a)),Math.abs(a)<16&&(a=60*a),!this._isUTC&&b&&(c=this._d.getTimezoneOffset()),this._offset=a,this._isUTC=!0,null!=c&&this.subtract(c,"m"),d!==a&&(!b||this._changeInProgress?s(this,rb.duration(d-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,rb.updateOffset(this,!0),this._changeInProgress=null)),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(a){return a=a?rb(a).zone():0,(this.zone()-a)%60===0},daysInMonth:function(){return A(this.year(),this.month())},dayOfYear:function(a){var b=wb((rb(this).startOf("day")-rb(this).startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")},quarter:function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)},weekYear:function(a){var b=fb(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")},isoWeekYear:function(a){var b=fb(this,1,4).year;return null==a?b:this.add(a-b,"y")},week:function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")},isoWeek:function(a){var b=fb(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")},weekday:function(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},isoWeeksInYear:function(){return B(this.year(),1,4)},weeksInYear:function(){var a=this.localeData()._week;return B(this.year(),a.dow,a.doy)},get:function(a){return a=w(a),this[a]()},set:function(a,b){return a=w(a),"function"==typeof this[a]&&this[a](b),this},locale:function(b){return b===a?this._locale._abbr:(this._locale=rb.localeData(b),this)},lang:e("moment().lang() is deprecated. Use moment().localeData() instead.",function(b){return b===a?this.localeData():(this._locale=rb.localeData(b),this)}),localeData:function(){return this._locale}}),rb.fn.millisecond=rb.fn.milliseconds=mb("Milliseconds",!1),rb.fn.second=rb.fn.seconds=mb("Seconds",!1),rb.fn.minute=rb.fn.minutes=mb("Minutes",!1),rb.fn.hour=rb.fn.hours=mb("Hours",!0),rb.fn.date=mb("Date",!0),rb.fn.dates=e("dates accessor is deprecated. Use date instead.",mb("Date",!0)),rb.fn.year=mb("FullYear",!0),rb.fn.years=e("years accessor is deprecated. Use year instead.",mb("FullYear",!0)),rb.fn.days=rb.fn.day,rb.fn.months=rb.fn.month,rb.fn.weeks=rb.fn.week,rb.fn.isoWeeks=rb.fn.isoWeek,rb.fn.quarters=rb.fn.quarter,rb.fn.toJSON=rb.fn.toISOString,l(rb.duration.fn=k.prototype,{_bubble:function(){var a,b,c,d=this._milliseconds,e=this._days,f=this._months,g=this._data,h=0;g.milliseconds=d%1e3,a=n(d/1e3),g.seconds=a%60,b=n(a/60),g.minutes=b%60,c=n(b/60),g.hours=c%24,e+=n(c/24),h=n(nb(e)),e-=n(ob(h)),f+=n(e/30),e%=30,h+=n(f/12),f%=12,g.days=e,g.months=f,g.years=h},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return n(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*z(this._months/12)},humanize:function(a){var b=eb(this,!a,this.localeData());return a&&(b=this.localeData().pastFuture(+this,b)),this.localeData().postformat(b)},add:function(a,b){var c=rb.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=rb.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=w(a),this[a.toLowerCase()+"s"]()},as:function(a){var b,c;if(a=w(a),b=this._days+this._milliseconds/864e5,"month"===a||"year"===a)return c=this._months+12*nb(b),"month"===a?c:c/12;switch(b+=ob(this._months/12),a){case"week":return b/7;case"day":return b;case"hour":return 24*b;case"minute":return 24*b*60;case"second":return 24*b*60*60;case"millisecond":return 24*b*60*60*1e3;default:throw new Error("Unknown unit "+a)}},lang:rb.fn.lang,locale:rb.fn.locale,toIsoString:e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"},localeData:function(){return this._locale}});for(tb in fc)fc.hasOwnProperty(tb)&&pb(tb.toLowerCase());rb.duration.fn.asMilliseconds=function(){return this.as("ms")},rb.duration.fn.asSeconds=function(){return this.as("s")},rb.duration.fn.asMinutes=function(){return this.as("m")},rb.duration.fn.asHours=function(){return this.as("h")},rb.duration.fn.asDays=function(){return this.as("d")},rb.duration.fn.asWeeks=function(){return this.as("weeks")},rb.duration.fn.asMonths=function(){return this.as("M")},rb.duration.fn.asYears=function(){return this.as("y")},rb.locale("en",{ordinal:function(a){var b=a%10,c=1===z(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),Gb?module.exports=rb:"function"==typeof define&&define.amd?(define("moment",function(a,b,c){return c.config&&c.config()&&c.config().noGlobal===!0&&(vb.moment=sb),rb}),qb(!0)):qb()}).call(this); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/bootstrap-growl/bootstrap-growl.min.js b/common/src/main/webapp/thirdparty/bootstrap-growl/bootstrap-growl.min.js
new file mode 100644
index 0000000..ce6deb1
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/bootstrap-growl/bootstrap-growl.min.js
@@ -0,0 +1,2 @@
+/* Project: Bootstrap Growl - v2.0.0 | Author: Mouse0270 aka Robert McIntosh | License: MIT License | Website: https://github.com/mouse0270/bootstrap-growl */
+(function(e,t,n,r){var i="growl",s="plugin_"+i,o={element:"body",type:"info",allow_dismiss:true,placement:{from:"top",align:"right"},offset:20,spacing:10,z_index:1031,delay:5e3,timer:1e3,url_target:"_blank",mouse_over:false,animate:{enter:"animated fadeInDown",exit:"animated fadeOutUp"},icon_type:"class",template:'<div data-growl="container" class="alert" role="alert"><button type="button" class="close" data-growl="dismiss"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button><span data-growl="icon"></span><span data-growl="title"></span><span data-growl="message"></span><a href="#" data-growl="url"></a></div>'};var u=function(t,n){o=e.extend(true,{},o,n)},a=function(t,n,r){var n={content:{message:typeof n=="object"?n.message:n,title:n.title?n.title:null,icon:n.icon?n.icon:null,url:n.url?n.url:null}};r=e.extend(true,{},n,r);this.settings=e.extend(true,{},o,r);plugin=this;f(r,this.settings,plugin);this.$template=$template},f=function(t,n,r){var i={settings:n,$element:e(n.element),template:n.template};$template=l(i);c($template,i.settings);h($template,i.settings);p($template,i.settings,r)},l=function(t){var n=e(t.settings.template);n.addClass("alert-"+t.settings.type);n.attr("data-growl-position",t.settings.placement.from+"-"+t.settings.placement.align);n.find('[data-growl="dismiss"]').css("display","none");if(t.settings.allow_dismiss){n.find('[data-growl="dismiss"]').css("display","inline-block")}return n},c=function(e,t){e.find('[data-growl="dismiss"]').css({position:"absolute",top:"5px",right:"10px","z-index":t.z_index-1>=1?t.z_index-1:1});if(t.content.icon){if(t.icon_type.toLowerCase()=="class"){e.find('[data-growl="icon"]').addClass(t.content.icon)}else{if(e.find('[data-growl="icon"]').is("img")){e.find('[data-growl="icon"]').attr("src",t.content.icon)}else{e.find('[data-growl="icon"]').append('<img src="'+t.content.icon+'" />')}}}if(t.content.title){e.find('[data-growl="title"]').html(t.content.title)}if(t.content.message){e.find('[data-growl="message"]').html(t.content.message)}if(t.content.url){e.find('[data-growl="url"]').attr("href",t.content.url).attr("target",t.url_target);e.find('[data-growl="url"]').css({position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%","z-index":t.z_index-2>=1?t.z_index-2:1})}},h=function(t,n){var r=n.offset,i={position:n.element==="body"?"fixed":"absolute",margin:0,"z-index":n.z_index,display:"inline-block"};e('[data-growl-position="'+n.placement.from+"-"+n.placement.align+'"]').each(function(){return r=Math.max(r,parseInt(e(this).css(n.placement.from))+e(this).outerHeight()+n.spacing)});i[n.placement.from]=r+"px";t.css(i);e(n.element).append(t);switch(n.placement.align){case"center":t.css({left:"50%",marginLeft:-(t.outerWidth()/2)+"px"});break;case"left":t.css("left",n.offset+"px");break;case"right":t.css("right",n.offset+"px");break}t.addClass("growl-animated")},p=function(e,t,n){e.addClass(t.animate.enter);e.find('[data-growl="dismiss"]').on("click",function(){n.close()});e.on("mouseover",function(t){e.addClass("hovering")}).on("mouseout",function(){e.removeClass("hovering")});if(t.delay>=1){e.data("growl-delay",t.delay);var r=setInterval(function(){var i=parseInt(e.data("growl-delay"))-t.timer;console.log();if(!e.hasClass("hovering")&&t.mouse_over=="pause"||t.mouse_over!="pause"){e.data("growl-delay",i)}if(i<=0){clearInterval(r);n.close()}},t.timer)}};a.prototype={update:function(e,t){switch(e){case"icon":if(this.settings.icon_type.toLowerCase()=="class"){this.$template.find('[data-growl="icon"]').removeClass(this.settings.content.icon);this.$template.find('[data-growl="icon"]').addClass(t)}else{if(this.$template.find('[data-growl="icon"]').is("img")){this.$template.find('[data-growl="icon"]')}else{this.$template.find('[data-growl="icon"]').find("img").attr().attr("src",t)}}break;case"url":this.$template.find('[data-growl="url"]').attr("href",t);break;case"type":this.$template.removeClass("alert-"+this.settings.type);this.$template.addClass("alert-"+t);break;default:this.$template.find('[data-growl="'+e+'"]').html(t)}return this},close:function(){var t=this.$template,n=this.settings,r=t.css(n.placement.from),i=false;t.addClass(this.settings.animate.exit);t.nextAll('[data-growl-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]').each(function(){e(this).css(n.placement.from,r);r=parseInt(r)+n.spacing+e(this).outerHeight()});t.one("webkitAnimationStart oanimationstart MSAnimationStart animationstart",function(e){i=true});t.one("webkitAnimationEnd oanimationend MSAnimationEnd animationend",function(t){e(this).remove()});setTimeout(function(){console.log(i);if(!i){t.remove()}},100);return this}};e.growl=function(e,t){if(e==false){u(this,t);return false}var n=new a(this,e,t);return n}})(jQuery,window,document) \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/bootstrap/css/bootstrap-dt.css b/common/src/main/webapp/thirdparty/bootstrap/css/bootstrap-dt.css
new file mode 100644
index 0000000..2828337
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/bootstrap/css/bootstrap-dt.css
@@ -0,0 +1,5804 @@
+/*!
+ * Bootstrap v3.1.1 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+/*! normalize.css v3.0.0 | MIT License | git.io/normalize */
+html {
+ font-family: sans-serif;
+ -webkit-text-size-adjust: 100%;
+ -ms-text-size-adjust: 100%;
+}
+body {
+ margin: 0;
+}
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+main,
+nav,
+section,
+summary {
+ display: block;
+}
+audio,
+canvas,
+progress,
+video {
+ display: inline-block;
+ vertical-align: baseline;
+}
+audio:not([controls]) {
+ display: none;
+ height: 0;
+}
+[hidden],
+template {
+ display: none;
+}
+a {
+ background: transparent;
+}
+a:active,
+a:hover {
+ outline: 0;
+}
+abbr[title] {
+ border-bottom: 1px dotted;
+}
+b,
+strong {
+ font-weight: bold;
+}
+dfn {
+ font-style: italic;
+}
+h1 {
+ margin: .67em 0;
+ font-size: 2em;
+}
+mark {
+ color: #000;
+ background: #ff0;
+}
+small {
+ font-size: 80%;
+}
+sub,
+sup {
+ position: relative;
+ font-size: 75%;
+ line-height: 0;
+ vertical-align: baseline;
+}
+sup {
+ top: -.5em;
+}
+sub {
+ bottom: -.25em;
+}
+img {
+ border: 0;
+}
+svg:not(:root) {
+ overflow: hidden;
+}
+figure {
+ margin: 1em 40px;
+}
+hr {
+ height: 0;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+}
+pre {
+ overflow: auto;
+}
+code,
+kbd,
+pre,
+samp {
+ font-family: monospace, monospace;
+ font-size: 1em;
+}
+button,
+input,
+optgroup,
+select,
+textarea {
+ margin: 0;
+ font: inherit;
+ color: inherit;
+}
+button {
+ overflow: visible;
+}
+button,
+select {
+ text-transform: none;
+}
+button,
+html input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+ -webkit-appearance: button;
+ cursor: pointer;
+}
+button[disabled],
+html input[disabled] {
+ cursor: default;
+}
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+ padding: 0;
+ border: 0;
+}
+input {
+ line-height: normal;
+}
+input[type="checkbox"],
+input[type="radio"] {
+ box-sizing: border-box;
+ padding: 0;
+}
+input[type="number"]::-webkit-inner-spin-button,
+input[type="number"]::-webkit-outer-spin-button {
+ height: auto;
+}
+input[type="search"] {
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ -webkit-appearance: textfield;
+}
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+fieldset {
+ padding: .35em .625em .75em;
+ margin: 0 2px;
+ border: 1px solid #c0c0c0;
+}
+legend {
+ padding: 0;
+ border: 0;
+}
+textarea {
+ overflow: auto;
+}
+optgroup {
+ font-weight: bold;
+}
+table {
+ border-spacing: 0;
+ border-collapse: collapse;
+}
+td,
+th {
+}
+@media print {
+ * {
+ color: #000 !important;
+ text-shadow: none !important;
+ background: transparent !important;
+ box-shadow: none !important;
+ }
+ a,
+ a:visited {
+ text-decoration: underline;
+ }
+ a[href]:after {
+ content: " (" attr(href) ")";
+ }
+ abbr[title]:after {
+ content: " (" attr(title) ")";
+ }
+ a[href^="javascript:"]:after,
+ a[href^="#"]:after {
+ content: "";
+ }
+ pre,
+ blockquote {
+ border: 1px solid #999;
+
+ page-break-inside: avoid;
+ }
+ thead {
+ display: table-header-group;
+ }
+ tr,
+ img {
+ page-break-inside: avoid;
+ }
+ img {
+ max-width: 100% !important;
+ }
+ p,
+ h2,
+ h3 {
+ orphans: 3;
+ widows: 3;
+ }
+ h2,
+ h3 {
+ page-break-after: avoid;
+ }
+ select {
+ background: #fff !important;
+ }
+ .navbar {
+ display: none;
+ }
+ .table td,
+ .table th {
+ background-color: #fff !important;
+ }
+ .btn > .caret,
+ .dropup > .btn > .caret {
+ border-top-color: #000 !important;
+ }
+ .label {
+ border: 1px solid #000;
+ }
+ .table {
+ border-collapse: collapse !important;
+ }
+ .table-bordered th,
+ .table-bordered td {
+ border: 1px solid #ddd !important;
+ }
+}
+.dataTableWrapperDiv div {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+*:before,
+*:after {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+html {
+ font-size: 62.5%;
+
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+body {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 14px;
+ line-height: 1.42857143;
+ color: #333;
+ background-color: #fff;
+}
+input,
+button,
+select,
+textarea {
+ font-family: inherit;
+ font-size: inherit;
+ line-height: inherit;
+}
+a {
+ color: #428bca;
+ text-decoration: none;
+}
+a:hover,
+a:focus {
+ color: #2a6496;
+ text-decoration: underline;
+}
+a:focus {
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+figure {
+ margin: 0;
+}
+img {
+ vertical-align: middle;
+}
+.img-responsive,
+.thumbnail > img,
+.thumbnail a > img,
+.carousel-inner > .item > img,
+.carousel-inner > .item > a > img {
+ display: block;
+ max-width: 100%;
+ height: auto;
+}
+.img-rounded {
+ border-radius: 6px;
+}
+.img-thumbnail {
+ display: inline-block;
+ max-width: 100%;
+ height: auto;
+ padding: 4px;
+ line-height: 1.42857143;
+ background-color: #fff;
+ border: 1px solid #ddd;
+ border-radius: 4px;
+ -webkit-transition: all .2s ease-in-out;
+ transition: all .2s ease-in-out;
+}
+.img-circle {
+ border-radius: 50%;
+}
+hr {
+ margin-top: 20px;
+ margin-bottom: 20px;
+ border: 0;
+ border-top: 1px solid #eee;
+}
+.sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ margin: -1px;
+ overflow: hidden;
+ clip: rect(0, 0, 0, 0);
+ border: 0;
+}
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+.h1,
+.h2,
+.h3,
+.h4,
+.h5,
+.h6 {
+ font-family: inherit;
+ font-weight: 500;
+ line-height: 1.1;
+ color: inherit;
+}
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+h5 small,
+h6 small,
+.h1 small,
+.h2 small,
+.h3 small,
+.h4 small,
+.h5 small,
+.h6 small,
+h1 .small,
+h2 .small,
+h3 .small,
+h4 .small,
+h5 .small,
+h6 .small,
+.h1 .small,
+.h2 .small,
+.h3 .small,
+.h4 .small,
+.h5 .small,
+.h6 .small {
+ font-weight: normal;
+ line-height: 1;
+ color: #999;
+}
+h1,
+.h1,
+h2,
+.h2,
+h3,
+.h3 {
+ margin-top: 20px;
+ margin-bottom: 10px;
+}
+h1 small,
+.h1 small,
+h2 small,
+.h2 small,
+h3 small,
+.h3 small,
+h1 .small,
+.h1 .small,
+h2 .small,
+.h2 .small,
+h3 .small,
+.h3 .small {
+ font-size: 65%;
+}
+h4,
+.h4,
+h5,
+.h5,
+h6,
+.h6 {
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+h4 small,
+.h4 small,
+h5 small,
+.h5 small,
+h6 small,
+.h6 small,
+h4 .small,
+.h4 .small,
+h5 .small,
+.h5 .small,
+h6 .small,
+.h6 .small {
+ font-size: 75%;
+}
+h1,
+.h1 {
+ font-size: 36px;
+}
+h2,
+.h2 {
+ font-size: 30px;
+}
+h3,
+.h3 {
+ font-size: 24px;
+}
+h4,
+.h4 {
+ font-size: 18px;
+}
+h5,
+.h5 {
+ font-size: 14px;
+}
+h6,
+.h6 {
+ font-size: 12px;
+}
+p {
+ margin: 0 0 10px;
+}
+.lead {
+ margin-bottom: 20px;
+ font-size: 16px;
+ font-weight: 200;
+ line-height: 1.4;
+}
+@media (min-width: 768px) {
+ .lead {
+ font-size: 21px;
+ }
+}
+small,
+.small {
+ font-size: 85%;
+}
+cite {
+ font-style: normal;
+}
+.text-left {
+ text-align: left;
+}
+.text-right {
+ text-align: right;
+}
+.text-center {
+ text-align: center;
+}
+.text-justify {
+ text-align: justify;
+}
+.text-muted {
+ color: #999;
+}
+.text-primary {
+ color: #428bca;
+}
+a.text-primary:hover {
+ color: #3071a9;
+}
+.text-success {
+ color: #3c763d;
+}
+a.text-success:hover {
+ color: #2b542c;
+}
+.text-info {
+ color: #31708f;
+}
+a.text-info:hover {
+ color: #245269;
+}
+.text-warning {
+ color: #8a6d3b;
+}
+a.text-warning:hover {
+ color: #66512c;
+}
+.text-danger {
+ color: #a94442;
+}
+a.text-danger:hover {
+ color: #843534;
+}
+.bg-primary {
+ color: #fff;
+ background-color: #428bca;
+}
+a.bg-primary:hover {
+ background-color: #3071a9;
+}
+.bg-success {
+ background-color: #dff0d8;
+}
+a.bg-success:hover {
+ background-color: #c1e2b3;
+}
+.bg-info {
+ background-color: #d9edf7;
+}
+a.bg-info:hover {
+ background-color: #afd9ee;
+}
+.bg-warning {
+ background-color: #fcf8e3;
+}
+a.bg-warning:hover {
+ background-color: #f7ecb5;
+}
+.bg-danger {
+ background-color: #f2dede;
+}
+a.bg-danger:hover {
+ background-color: #e4b9b9;
+}
+.page-header {
+ padding-bottom: 9px;
+ margin: 40px 0 20px;
+ border-bottom: 1px solid #eee;
+}
+ul,
+ol {
+ margin-top: 0;
+ margin-bottom: 10px;
+}
+ul ul,
+ol ul,
+ul ol,
+ol ol {
+ margin-bottom: 0;
+}
+.list-unstyled {
+ padding-left: 0;
+ list-style: none;
+}
+.list-inline {
+ padding-left: 0;
+ margin-left: -5px;
+ list-style: none;
+}
+.list-inline > li {
+ display: inline-block;
+ padding-right: 5px;
+ padding-left: 5px;
+}
+dl {
+ margin-top: 0;
+ margin-bottom: 20px;
+}
+dt,
+dd {
+ line-height: 1.42857143;
+}
+dt {
+ font-weight: bold;
+}
+dd {
+ margin-left: 0;
+}
+@media (min-width: 768px) {
+ .dl-horizontal dt {
+ float: left;
+ width: 160px;
+ overflow: hidden;
+ clear: left;
+ text-align: right;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .dl-horizontal dd {
+ margin-left: 180px;
+ }
+}
+abbr[title],
+abbr[data-original-title] {
+ cursor: help;
+ border-bottom: 1px dotted #999;
+}
+.initialism {
+ font-size: 90%;
+ text-transform: uppercase;
+}
+blockquote {
+ padding: 10px 20px;
+ margin: 0 0 20px;
+ font-size: 17.5px;
+ border-left: 5px solid #eee;
+}
+blockquote p:last-child,
+blockquote ul:last-child,
+blockquote ol:last-child {
+ margin-bottom: 0;
+}
+blockquote footer,
+blockquote small,
+blockquote .small {
+ display: block;
+ font-size: 80%;
+ line-height: 1.42857143;
+ color: #999;
+}
+blockquote footer:before,
+blockquote small:before,
+blockquote .small:before {
+ content: '\2014 \00A0';
+}
+.blockquote-reverse,
+blockquote.pull-right {
+ padding-right: 15px;
+ padding-left: 0;
+ text-align: right;
+ border-right: 5px solid #eee;
+ border-left: 0;
+}
+.blockquote-reverse footer:before,
+blockquote.pull-right footer:before,
+.blockquote-reverse small:before,
+blockquote.pull-right small:before,
+.blockquote-reverse .small:before,
+blockquote.pull-right .small:before {
+ content: '';
+}
+.blockquote-reverse footer:after,
+blockquote.pull-right footer:after,
+.blockquote-reverse small:after,
+blockquote.pull-right small:after,
+.blockquote-reverse .small:after,
+blockquote.pull-right .small:after {
+ content: '\00A0 \2014';
+}
+blockquote:before,
+blockquote:after {
+ content: "";
+}
+address {
+ margin-bottom: 20px;
+ font-style: normal;
+ line-height: 1.42857143;
+}
+code,
+kbd,
+pre,
+samp {
+ font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
+}
+code {
+ padding: 2px 4px;
+ font-size: 90%;
+ color: #c7254e;
+ white-space: nowrap;
+ background-color: #f9f2f4;
+ border-radius: 4px;
+}
+kbd {
+ padding: 2px 4px;
+ font-size: 90%;
+ color: #fff;
+ background-color: #333;
+ border-radius: 3px;
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
+}
+pre {
+ display: block;
+ padding: 9.5px;
+ margin: 0 0 10px;
+ font-size: 13px;
+ line-height: 1.42857143;
+ color: #333;
+ word-break: break-all;
+ word-wrap: break-word;
+ background-color: #f5f5f5;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+}
+pre code {
+ padding: 0;
+ font-size: inherit;
+ color: inherit;
+ white-space: pre-wrap;
+ background-color: transparent;
+ border-radius: 0;
+}
+.pre-scrollable {
+ max-height: 340px;
+ overflow-y: scroll;
+}
+.container {
+ padding-right: 15px;
+ padding-left: 15px;
+ margin-right: auto;
+ margin-left: auto;
+}
+@media (min-width: 768px) {
+ .container {
+ width: 750px;
+ }
+}
+@media (min-width: 992px) {
+ .container {
+ width: 970px;
+ }
+}
+@media (min-width: 1200px) {
+ .container {
+ width: 1170px;
+ }
+}
+.container-fluid {
+ padding-right: 15px;
+ padding-left: 15px;
+ margin-right: auto;
+ margin-left: auto;
+}
+.row {
+ margin-right: -15px;
+ margin-left: -15px;
+}
+.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
+ position: relative;
+ min-height: 1px;
+ padding-right: 15px;
+ padding-left: 15px;
+}
+.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
+ float: left;
+}
+.col-xs-12 {
+ width: 100%;
+}
+.col-xs-11 {
+ width: 91.66666667%;
+}
+.col-xs-10 {
+ width: 83.33333333%;
+}
+.col-xs-9 {
+ width: 75%;
+}
+.col-xs-8 {
+ width: 66.66666667%;
+}
+.col-xs-7 {
+ width: 58.33333333%;
+}
+.col-xs-6 {
+ width: 50%;
+}
+.col-xs-5 {
+ width: 41.66666667%;
+}
+.col-xs-4 {
+ width: 33.33333333%;
+}
+.col-xs-3 {
+ width: 25%;
+}
+.col-xs-2 {
+ width: 16.66666667%;
+}
+.col-xs-1 {
+ width: 8.33333333%;
+}
+.col-xs-pull-12 {
+ right: 100%;
+}
+.col-xs-pull-11 {
+ right: 91.66666667%;
+}
+.col-xs-pull-10 {
+ right: 83.33333333%;
+}
+.col-xs-pull-9 {
+ right: 75%;
+}
+.col-xs-pull-8 {
+ right: 66.66666667%;
+}
+.col-xs-pull-7 {
+ right: 58.33333333%;
+}
+.col-xs-pull-6 {
+ right: 50%;
+}
+.col-xs-pull-5 {
+ right: 41.66666667%;
+}
+.col-xs-pull-4 {
+ right: 33.33333333%;
+}
+.col-xs-pull-3 {
+ right: 25%;
+}
+.col-xs-pull-2 {
+ right: 16.66666667%;
+}
+.col-xs-pull-1 {
+ right: 8.33333333%;
+}
+.col-xs-pull-0 {
+ right: 0;
+}
+.col-xs-push-12 {
+ left: 100%;
+}
+.col-xs-push-11 {
+ left: 91.66666667%;
+}
+.col-xs-push-10 {
+ left: 83.33333333%;
+}
+.col-xs-push-9 {
+ left: 75%;
+}
+.col-xs-push-8 {
+ left: 66.66666667%;
+}
+.col-xs-push-7 {
+ left: 58.33333333%;
+}
+.col-xs-push-6 {
+ left: 50%;
+}
+.col-xs-push-5 {
+ left: 41.66666667%;
+}
+.col-xs-push-4 {
+ left: 33.33333333%;
+}
+.col-xs-push-3 {
+ left: 25%;
+}
+.col-xs-push-2 {
+ left: 16.66666667%;
+}
+.col-xs-push-1 {
+ left: 8.33333333%;
+}
+.col-xs-push-0 {
+ left: 0;
+}
+.col-xs-offset-12 {
+ margin-left: 100%;
+}
+.col-xs-offset-11 {
+ margin-left: 91.66666667%;
+}
+.col-xs-offset-10 {
+ margin-left: 83.33333333%;
+}
+.col-xs-offset-9 {
+ margin-left: 75%;
+}
+.col-xs-offset-8 {
+ margin-left: 66.66666667%;
+}
+.col-xs-offset-7 {
+ margin-left: 58.33333333%;
+}
+.col-xs-offset-6 {
+ margin-left: 50%;
+}
+.col-xs-offset-5 {
+ margin-left: 41.66666667%;
+}
+.col-xs-offset-4 {
+ margin-left: 33.33333333%;
+}
+.col-xs-offset-3 {
+ margin-left: 25%;
+}
+.col-xs-offset-2 {
+ margin-left: 16.66666667%;
+}
+.col-xs-offset-1 {
+ margin-left: 8.33333333%;
+}
+.col-xs-offset-0 {
+ margin-left: 0;
+}
+@media (min-width: 768px) {
+ .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
+ float: left;
+ }
+ .col-sm-12 {
+ width: 100%;
+ }
+ .col-sm-11 {
+ width: 91.66666667%;
+ }
+ .col-sm-10 {
+ width: 83.33333333%;
+ }
+ .col-sm-9 {
+ width: 75%;
+ }
+ .col-sm-8 {
+ width: 66.66666667%;
+ }
+ .col-sm-7 {
+ width: 58.33333333%;
+ }
+ .col-sm-6 {
+ width: 50%;
+ }
+ .col-sm-5 {
+ width: 41.66666667%;
+ }
+ .col-sm-4 {
+ width: 33.33333333%;
+ }
+ .col-sm-3 {
+ width: 25%;
+ }
+ .col-sm-2 {
+ width: 16.66666667%;
+ }
+ .col-sm-1 {
+ width: 8.33333333%;
+ }
+ .col-sm-pull-12 {
+ right: 100%;
+ }
+ .col-sm-pull-11 {
+ right: 91.66666667%;
+ }
+ .col-sm-pull-10 {
+ right: 83.33333333%;
+ }
+ .col-sm-pull-9 {
+ right: 75%;
+ }
+ .col-sm-pull-8 {
+ right: 66.66666667%;
+ }
+ .col-sm-pull-7 {
+ right: 58.33333333%;
+ }
+ .col-sm-pull-6 {
+ right: 50%;
+ }
+ .col-sm-pull-5 {
+ right: 41.66666667%;
+ }
+ .col-sm-pull-4 {
+ right: 33.33333333%;
+ }
+ .col-sm-pull-3 {
+ right: 25%;
+ }
+ .col-sm-pull-2 {
+ right: 16.66666667%;
+ }
+ .col-sm-pull-1 {
+ right: 8.33333333%;
+ }
+ .col-sm-pull-0 {
+ right: 0;
+ }
+ .col-sm-push-12 {
+ left: 100%;
+ }
+ .col-sm-push-11 {
+ left: 91.66666667%;
+ }
+ .col-sm-push-10 {
+ left: 83.33333333%;
+ }
+ .col-sm-push-9 {
+ left: 75%;
+ }
+ .col-sm-push-8 {
+ left: 66.66666667%;
+ }
+ .col-sm-push-7 {
+ left: 58.33333333%;
+ }
+ .col-sm-push-6 {
+ left: 50%;
+ }
+ .col-sm-push-5 {
+ left: 41.66666667%;
+ }
+ .col-sm-push-4 {
+ left: 33.33333333%;
+ }
+ .col-sm-push-3 {
+ left: 25%;
+ }
+ .col-sm-push-2 {
+ left: 16.66666667%;
+ }
+ .col-sm-push-1 {
+ left: 8.33333333%;
+ }
+ .col-sm-push-0 {
+ left: 0;
+ }
+ .col-sm-offset-12 {
+ margin-left: 100%;
+ }
+ .col-sm-offset-11 {
+ margin-left: 91.66666667%;
+ }
+ .col-sm-offset-10 {
+ margin-left: 83.33333333%;
+ }
+ .col-sm-offset-9 {
+ margin-left: 75%;
+ }
+ .col-sm-offset-8 {
+ margin-left: 66.66666667%;
+ }
+ .col-sm-offset-7 {
+ margin-left: 58.33333333%;
+ }
+ .col-sm-offset-6 {
+ margin-left: 50%;
+ }
+ .col-sm-offset-5 {
+ margin-left: 41.66666667%;
+ }
+ .col-sm-offset-4 {
+ margin-left: 33.33333333%;
+ }
+ .col-sm-offset-3 {
+ margin-left: 25%;
+ }
+ .col-sm-offset-2 {
+ margin-left: 16.66666667%;
+ }
+ .col-sm-offset-1 {
+ margin-left: 8.33333333%;
+ }
+ .col-sm-offset-0 {
+ margin-left: 0;
+ }
+}
+@media (min-width: 992px) {
+ .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
+ float: left;
+ }
+ .col-md-12 {
+ width: 100%;
+ }
+ .col-md-11 {
+ width: 91.66666667%;
+ }
+ .col-md-10 {
+ width: 83.33333333%;
+ }
+ .col-md-9 {
+ width: 75%;
+ }
+ .col-md-8 {
+ width: 66.66666667%;
+ }
+ .col-md-7 {
+ width: 58.33333333%;
+ }
+ .col-md-6 {
+ width: 50%;
+ }
+ .col-md-5 {
+ width: 41.66666667%;
+ }
+ .col-md-4 {
+ width: 33.33333333%;
+ }
+ .col-md-3 {
+ width: 25%;
+ }
+ .col-md-2 {
+ width: 16.66666667%;
+ }
+ .col-md-1 {
+ width: 8.33333333%;
+ }
+ .col-md-pull-12 {
+ right: 100%;
+ }
+ .col-md-pull-11 {
+ right: 91.66666667%;
+ }
+ .col-md-pull-10 {
+ right: 83.33333333%;
+ }
+ .col-md-pull-9 {
+ right: 75%;
+ }
+ .col-md-pull-8 {
+ right: 66.66666667%;
+ }
+ .col-md-pull-7 {
+ right: 58.33333333%;
+ }
+ .col-md-pull-6 {
+ right: 50%;
+ }
+ .col-md-pull-5 {
+ right: 41.66666667%;
+ }
+ .col-md-pull-4 {
+ right: 33.33333333%;
+ }
+ .col-md-pull-3 {
+ right: 25%;
+ }
+ .col-md-pull-2 {
+ right: 16.66666667%;
+ }
+ .col-md-pull-1 {
+ right: 8.33333333%;
+ }
+ .col-md-pull-0 {
+ right: 0;
+ }
+ .col-md-push-12 {
+ left: 100%;
+ }
+ .col-md-push-11 {
+ left: 91.66666667%;
+ }
+ .col-md-push-10 {
+ left: 83.33333333%;
+ }
+ .col-md-push-9 {
+ left: 75%;
+ }
+ .col-md-push-8 {
+ left: 66.66666667%;
+ }
+ .col-md-push-7 {
+ left: 58.33333333%;
+ }
+ .col-md-push-6 {
+ left: 50%;
+ }
+ .col-md-push-5 {
+ left: 41.66666667%;
+ }
+ .col-md-push-4 {
+ left: 33.33333333%;
+ }
+ .col-md-push-3 {
+ left: 25%;
+ }
+ .col-md-push-2 {
+ left: 16.66666667%;
+ }
+ .col-md-push-1 {
+ left: 8.33333333%;
+ }
+ .col-md-push-0 {
+ left: 0;
+ }
+ .col-md-offset-12 {
+ margin-left: 100%;
+ }
+ .col-md-offset-11 {
+ margin-left: 91.66666667%;
+ }
+ .col-md-offset-10 {
+ margin-left: 83.33333333%;
+ }
+ .col-md-offset-9 {
+ margin-left: 75%;
+ }
+ .col-md-offset-8 {
+ margin-left: 66.66666667%;
+ }
+ .col-md-offset-7 {
+ margin-left: 58.33333333%;
+ }
+ .col-md-offset-6 {
+ margin-left: 50%;
+ }
+ .col-md-offset-5 {
+ margin-left: 41.66666667%;
+ }
+ .col-md-offset-4 {
+ margin-left: 33.33333333%;
+ }
+ .col-md-offset-3 {
+ margin-left: 25%;
+ }
+ .col-md-offset-2 {
+ margin-left: 16.66666667%;
+ }
+ .col-md-offset-1 {
+ margin-left: 8.33333333%;
+ }
+ .col-md-offset-0 {
+ margin-left: 0;
+ }
+}
+@media (min-width: 1200px) {
+ .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
+ float: left;
+ }
+ .col-lg-12 {
+ width: 100%;
+ }
+ .col-lg-11 {
+ width: 91.66666667%;
+ }
+ .col-lg-10 {
+ width: 83.33333333%;
+ }
+ .col-lg-9 {
+ width: 75%;
+ }
+ .col-lg-8 {
+ width: 66.66666667%;
+ }
+ .col-lg-7 {
+ width: 58.33333333%;
+ }
+ .col-lg-6 {
+ width: 50%;
+ }
+ .col-lg-5 {
+ width: 41.66666667%;
+ }
+ .col-lg-4 {
+ width: 33.33333333%;
+ }
+ .col-lg-3 {
+ width: 25%;
+ }
+ .col-lg-2 {
+ width: 16.66666667%;
+ }
+ .col-lg-1 {
+ width: 8.33333333%;
+ }
+ .col-lg-pull-12 {
+ right: 100%;
+ }
+ .col-lg-pull-11 {
+ right: 91.66666667%;
+ }
+ .col-lg-pull-10 {
+ right: 83.33333333%;
+ }
+ .col-lg-pull-9 {
+ right: 75%;
+ }
+ .col-lg-pull-8 {
+ right: 66.66666667%;
+ }
+ .col-lg-pull-7 {
+ right: 58.33333333%;
+ }
+ .col-lg-pull-6 {
+ right: 50%;
+ }
+ .col-lg-pull-5 {
+ right: 41.66666667%;
+ }
+ .col-lg-pull-4 {
+ right: 33.33333333%;
+ }
+ .col-lg-pull-3 {
+ right: 25%;
+ }
+ .col-lg-pull-2 {
+ right: 16.66666667%;
+ }
+ .col-lg-pull-1 {
+ right: 8.33333333%;
+ }
+ .col-lg-pull-0 {
+ right: 0;
+ }
+ .col-lg-push-12 {
+ left: 100%;
+ }
+ .col-lg-push-11 {
+ left: 91.66666667%;
+ }
+ .col-lg-push-10 {
+ left: 83.33333333%;
+ }
+ .col-lg-push-9 {
+ left: 75%;
+ }
+ .col-lg-push-8 {
+ left: 66.66666667%;
+ }
+ .col-lg-push-7 {
+ left: 58.33333333%;
+ }
+ .col-lg-push-6 {
+ left: 50%;
+ }
+ .col-lg-push-5 {
+ left: 41.66666667%;
+ }
+ .col-lg-push-4 {
+ left: 33.33333333%;
+ }
+ .col-lg-push-3 {
+ left: 25%;
+ }
+ .col-lg-push-2 {
+ left: 16.66666667%;
+ }
+ .col-lg-push-1 {
+ left: 8.33333333%;
+ }
+ .col-lg-push-0 {
+ left: 0;
+ }
+ .col-lg-offset-12 {
+ margin-left: 100%;
+ }
+ .col-lg-offset-11 {
+ margin-left: 91.66666667%;
+ }
+ .col-lg-offset-10 {
+ margin-left: 83.33333333%;
+ }
+ .col-lg-offset-9 {
+ margin-left: 75%;
+ }
+ .col-lg-offset-8 {
+ margin-left: 66.66666667%;
+ }
+ .col-lg-offset-7 {
+ margin-left: 58.33333333%;
+ }
+ .col-lg-offset-6 {
+ margin-left: 50%;
+ }
+ .col-lg-offset-5 {
+ margin-left: 41.66666667%;
+ }
+ .col-lg-offset-4 {
+ margin-left: 33.33333333%;
+ }
+ .col-lg-offset-3 {
+ margin-left: 25%;
+ }
+ .col-lg-offset-2 {
+ margin-left: 16.66666667%;
+ }
+ .col-lg-offset-1 {
+ margin-left: 8.33333333%;
+ }
+ .col-lg-offset-0 {
+ margin-left: 0;
+ }
+}
+table {
+ max-width: 100%;
+ background-color: transparent;
+}
+th {
+ text-align: left;
+}
+.table {
+ width: 100%;
+ margin-bottom: 20px;
+}
+.table > thead > tr > th,
+.table > tbody > tr > th,
+.table > tfoot > tr > th,
+.table > thead > tr > td,
+.table > tbody > tr > td,
+.table > tfoot > tr > td {
+ padding: 8px;
+ line-height: 1.42857143;
+ vertical-align: top;
+ border-top: 1px solid #ddd;
+}
+.table > thead > tr > th {
+ vertical-align: bottom;
+ border-bottom: 2px solid #ddd;
+}
+.table > caption + thead > tr:first-child > th,
+.table > colgroup + thead > tr:first-child > th,
+.table > thead:first-child > tr:first-child > th,
+.table > caption + thead > tr:first-child > td,
+.table > colgroup + thead > tr:first-child > td,
+.table > thead:first-child > tr:first-child > td {
+ border-top: 0;
+}
+.table > tbody + tbody {
+ border-top: 2px solid #ddd;
+}
+.table .table {
+ background-color: #fff;
+}
+.table-condensed > thead > tr > th,
+.table-condensed > tbody > tr > th,
+.table-condensed > tfoot > tr > th,
+.table-condensed > thead > tr > td,
+.table-condensed > tbody > tr > td,
+.table-condensed > tfoot > tr > td {
+ padding: 5px;
+}
+.table-bordered {
+ border: 1px solid #ddd;
+}
+.table-bordered > thead > tr > th,
+.table-bordered > tbody > tr > th,
+.table-bordered > tfoot > tr > th,
+.table-bordered > thead > tr > td,
+.table-bordered > tbody > tr > td,
+.table-bordered > tfoot > tr > td {
+ border: 1px solid #ddd;
+}
+.table-bordered > thead > tr > th,
+.table-bordered > thead > tr > td {
+ border-bottom-width: 2px;
+}
+.table-striped > tbody > tr:nth-child(odd) > td,
+.table-striped > tbody > tr:nth-child(odd) > th {
+ background-color: #f9f9f9;
+}
+.table-hover > tbody > tr:hover > td,
+.table-hover > tbody > tr:hover > th {
+ /*background-color: #f5f5f5;*/
+ background-color:#dbedff;
+}
+.dataTableTdSelected{
+ background-color:#dbedff !important;
+}
+table col[class*="col-"] {
+ position: static;
+ display: table-column;
+ float: none;
+}
+table td[class*="col-"],
+table th[class*="col-"] {
+ position: static;
+ display: table-cell;
+ float: none;
+}
+.table > thead > tr > td.active,
+.table > tbody > tr > td.active,
+.table > tfoot > tr > td.active,
+.table > thead > tr > th.active,
+.table > tbody > tr > th.active,
+.table > tfoot > tr > th.active,
+.table > thead > tr.active > td,
+.table > tbody > tr.active > td,
+.table > tfoot > tr.active > td,
+.table > thead > tr.active > th,
+.table > tbody > tr.active > th,
+.table > tfoot > tr.active > th {
+ background-color: #f5f5f5;
+}
+.table-hover > tbody > tr > td.active:hover,
+.table-hover > tbody > tr > th.active:hover,
+.table-hover > tbody > tr.active:hover > td,
+.table-hover > tbody > tr.active:hover > th {
+ background-color: #e8e8e8;
+}
+.table > thead > tr > td.success,
+.table > tbody > tr > td.success,
+.table > tfoot > tr > td.success,
+.table > thead > tr > th.success,
+.table > tbody > tr > th.success,
+.table > tfoot > tr > th.success,
+.table > thead > tr.success > td,
+.table > tbody > tr.success > td,
+.table > tfoot > tr.success > td,
+.table > thead > tr.success > th,
+.table > tbody > tr.success > th,
+.table > tfoot > tr.success > th {
+ background-color: #dff0d8;
+}
+.table-hover > tbody > tr > td.success:hover,
+.table-hover > tbody > tr > th.success:hover,
+.table-hover > tbody > tr.success:hover > td,
+.table-hover > tbody > tr.success:hover > th {
+ background-color: #d0e9c6;
+}
+.table > thead > tr > td.info,
+.table > tbody > tr > td.info,
+.table > tfoot > tr > td.info,
+.table > thead > tr > th.info,
+.table > tbody > tr > th.info,
+.table > tfoot > tr > th.info,
+.table > thead > tr.info > td,
+.table > tbody > tr.info > td,
+.table > tfoot > tr.info > td,
+.table > thead > tr.info > th,
+.table > tbody > tr.info > th,
+.table > tfoot > tr.info > th {
+ background-color: #d9edf7;
+}
+.table-hover > tbody > tr > td.info:hover,
+.table-hover > tbody > tr > th.info:hover,
+.table-hover > tbody > tr.info:hover > td,
+.table-hover > tbody > tr.info:hover > th {
+ background-color: #c4e3f3;
+}
+.table > thead > tr > td.warning,
+.table > tbody > tr > td.warning,
+.table > tfoot > tr > td.warning,
+.table > thead > tr > th.warning,
+.table > tbody > tr > th.warning,
+.table > tfoot > tr > th.warning,
+.table > thead > tr.warning > td,
+.table > tbody > tr.warning > td,
+.table > tfoot > tr.warning > td,
+.table > thead > tr.warning > th,
+.table > tbody > tr.warning > th,
+.table > tfoot > tr.warning > th {
+ background-color: #fcf8e3;
+}
+.table-hover > tbody > tr > td.warning:hover,
+.table-hover > tbody > tr > th.warning:hover,
+.table-hover > tbody > tr.warning:hover > td,
+.table-hover > tbody > tr.warning:hover > th {
+ background-color: #faf2cc;
+}
+.table > thead > tr > td.danger,
+.table > tbody > tr > td.danger,
+.table > tfoot > tr > td.danger,
+.table > thead > tr > th.danger,
+.table > tbody > tr > th.danger,
+.table > tfoot > tr > th.danger,
+.table > thead > tr.danger > td,
+.table > tbody > tr.danger > td,
+.table > tfoot > tr.danger > td,
+.table > thead > tr.danger > th,
+.table > tbody > tr.danger > th,
+.table > tfoot > tr.danger > th {
+ background-color: #f2dede;
+}
+.table-hover > tbody > tr > td.danger:hover,
+.table-hover > tbody > tr > th.danger:hover,
+.table-hover > tbody > tr.danger:hover > td,
+.table-hover > tbody > tr.danger:hover > th {
+ background-color: #ebcccc;
+}
+@media (max-width: 767px) {
+ .table-responsive {
+ width: 100%;
+ margin-bottom: 15px;
+ overflow-x: scroll;
+ overflow-y: hidden;
+ -webkit-overflow-scrolling: touch;
+ -ms-overflow-style: -ms-autohiding-scrollbar;
+ border: 1px solid #ddd;
+ }
+ .table-responsive > .table {
+ margin-bottom: 0;
+ }
+ .table-responsive > .table > thead > tr > th,
+ .table-responsive > .table > tbody > tr > th,
+ .table-responsive > .table > tfoot > tr > th,
+ .table-responsive > .table > thead > tr > td,
+ .table-responsive > .table > tbody > tr > td,
+ .table-responsive > .table > tfoot > tr > td {
+ white-space: nowrap;
+ }
+ .table-responsive > .table-bordered {
+ border: 0;
+ }
+ .table-responsive > .table-bordered > thead > tr > th:first-child,
+ .table-responsive > .table-bordered > tbody > tr > th:first-child,
+ .table-responsive > .table-bordered > tfoot > tr > th:first-child,
+ .table-responsive > .table-bordered > thead > tr > td:first-child,
+ .table-responsive > .table-bordered > tbody > tr > td:first-child,
+ .table-responsive > .table-bordered > tfoot > tr > td:first-child {
+ border-left: 0;
+ }
+ .table-responsive > .table-bordered > thead > tr > th:last-child,
+ .table-responsive > .table-bordered > tbody > tr > th:last-child,
+ .table-responsive > .table-bordered > tfoot > tr > th:last-child,
+ .table-responsive > .table-bordered > thead > tr > td:last-child,
+ .table-responsive > .table-bordered > tbody > tr > td:last-child,
+ .table-responsive > .table-bordered > tfoot > tr > td:last-child {
+ border-right: 0;
+ }
+ .table-responsive > .table-bordered > tbody > tr:last-child > th,
+ .table-responsive > .table-bordered > tfoot > tr:last-child > th,
+ .table-responsive > .table-bordered > tbody > tr:last-child > td,
+ .table-responsive > .table-bordered > tfoot > tr:last-child > td {
+ border-bottom: 0;
+ }
+}
+fieldset {
+ min-width: 0;
+ padding: 0;
+ margin: 0;
+ border: 0;
+}
+legend {
+ display: block;
+ width: 100%;
+ padding: 0;
+ margin-bottom: 20px;
+ font-size: 21px;
+ line-height: inherit;
+ color: #333;
+ border: 0;
+ border-bottom: 1px solid #e5e5e5;
+}
+label {
+ display: inline-block;
+ margin-bottom: 5px;
+ font-weight: bold;
+}
+input[type="search"] {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+input[type="radio"],
+input[type="checkbox"] {
+ margin: 4px 0 0;
+ margin-top: 1px \9;
+ /* IE8-9 */
+ line-height: normal;
+}
+input[type="file"] {
+ display: block;
+}
+input[type="range"] {
+ display: block;
+ width: 100%;
+}
+select[multiple],
+select[size] {
+ height: auto;
+}
+input[type="file"]:focus,
+input[type="radio"]:focus,
+input[type="checkbox"]:focus {
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+output {
+ display: block;
+ padding-top: 7px;
+ font-size: 14px;
+ line-height: 1.42857143;
+ color: #555;
+}
+.form-control {
+ display: block;
+ width: 100%;
+ height: 34px;
+ padding: 6px 12px;
+ font-size: 14px;
+ line-height: 1.42857143;
+ color: #555;
+ background-color: #fff;
+ background-image: none;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+ -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+ transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+}
+.form-control:focus {
+ border-color: #66afe9;
+ outline: 0;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
+ box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
+}
+.form-control::-moz-placeholder {
+ color: #999;
+ opacity: 1;
+}
+.form-control:-ms-input-placeholder {
+ color: #999;
+}
+.form-control::-webkit-input-placeholder {
+ color: #999;
+}
+.form-control[disabled],
+.form-control[readonly],
+fieldset[disabled] .form-control {
+ cursor: not-allowed;
+ background-color: #eee;
+ opacity: 1;
+}
+textarea.form-control {
+ height: auto;
+}
+input[type="search"] {
+ -webkit-appearance: none;
+}
+input[type="date"] {
+ line-height: 34px;
+}
+.form-group {
+ margin-bottom: 15px;
+}
+.radio,
+.checkbox {
+ display: block;
+ min-height: 20px;
+ padding-left: 20px;
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+.radio label,
+.checkbox label {
+ display: inline;
+ font-weight: normal;
+ cursor: pointer;
+}
+.radio input[type="radio"],
+.radio-inline input[type="radio"],
+.checkbox input[type="checkbox"],
+.checkbox-inline input[type="checkbox"] {
+ float: left;
+ margin-left: -20px;
+}
+.radio + .radio,
+.checkbox + .checkbox {
+ margin-top: -5px;
+}
+.radio-inline,
+.checkbox-inline {
+ display: inline-block;
+ padding-left: 20px;
+ margin-bottom: 0;
+ font-weight: normal;
+ vertical-align: middle;
+ cursor: pointer;
+}
+.radio-inline + .radio-inline,
+.checkbox-inline + .checkbox-inline {
+ margin-top: 0;
+ margin-left: 10px;
+}
+input[type="radio"][disabled],
+input[type="checkbox"][disabled],
+.radio[disabled],
+.radio-inline[disabled],
+.checkbox[disabled],
+.checkbox-inline[disabled],
+fieldset[disabled] input[type="radio"],
+fieldset[disabled] input[type="checkbox"],
+fieldset[disabled] .radio,
+fieldset[disabled] .radio-inline,
+fieldset[disabled] .checkbox,
+fieldset[disabled] .checkbox-inline {
+ cursor: not-allowed;
+}
+.input-sm {
+ height: 30px;
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+select.input-sm {
+ height: 30px;
+ line-height: 30px;
+}
+textarea.input-sm,
+select[multiple].input-sm {
+ height: auto;
+}
+.input-lg {
+ height: 46px;
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.33;
+ border-radius: 6px;
+}
+select.input-lg {
+ height: 46px;
+ line-height: 46px;
+}
+textarea.input-lg,
+select[multiple].input-lg {
+ height: auto;
+}
+.has-feedback {
+ position: relative;
+}
+.has-feedback .form-control {
+ padding-right: 42.5px;
+}
+.has-feedback .form-control-feedback {
+ position: absolute;
+ top: 25px;
+ right: 0;
+ display: block;
+ width: 34px;
+ height: 34px;
+ line-height: 34px;
+ text-align: center;
+}
+.has-success .help-block,
+.has-success .control-label,
+.has-success .radio,
+.has-success .checkbox,
+.has-success .radio-inline,
+.has-success .checkbox-inline {
+ color: #3c763d;
+}
+.has-success .form-control {
+ border-color: #3c763d;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+}
+.has-success .form-control:focus {
+ border-color: #2b542c;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
+}
+.has-success .input-group-addon {
+ color: #3c763d;
+ background-color: #dff0d8;
+ border-color: #3c763d;
+}
+.has-success .form-control-feedback {
+ color: #3c763d;
+}
+.has-warning .help-block,
+.has-warning .control-label,
+.has-warning .radio,
+.has-warning .checkbox,
+.has-warning .radio-inline,
+.has-warning .checkbox-inline {
+ color: #8a6d3b;
+}
+.has-warning .form-control {
+ border-color: #8a6d3b;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+}
+.has-warning .form-control:focus {
+ border-color: #66512c;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
+}
+.has-warning .input-group-addon {
+ color: #8a6d3b;
+ background-color: #fcf8e3;
+ border-color: #8a6d3b;
+}
+.has-warning .form-control-feedback {
+ color: #8a6d3b;
+}
+.has-error .help-block,
+.has-error .control-label,
+.has-error .radio,
+.has-error .checkbox,
+.has-error .radio-inline,
+.has-error .checkbox-inline {
+ color: #a94442;
+}
+.has-error .form-control {
+ border-color: #a94442;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+}
+.has-error .form-control:focus {
+ border-color: #843534;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
+}
+.has-error .input-group-addon {
+ color: #a94442;
+ background-color: #f2dede;
+ border-color: #a94442;
+}
+.has-error .form-control-feedback {
+ color: #a94442;
+}
+.form-control-static {
+ margin-bottom: 0;
+}
+.help-block {
+ display: block;
+ margin-top: 5px;
+ margin-bottom: 10px;
+ color: #737373;
+}
+@media (min-width: 768px) {
+ .form-inline .form-group {
+ display: inline-block;
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .form-inline .form-control {
+ display: inline-block;
+ width: auto;
+ vertical-align: middle;
+ }
+ .form-inline .input-group > .form-control {
+ width: 100%;
+ }
+ .form-inline .control-label {
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .form-inline .radio,
+ .form-inline .checkbox {
+ display: inline-block;
+ padding-left: 0;
+ margin-top: 0;
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .form-inline .radio input[type="radio"],
+ .form-inline .checkbox input[type="checkbox"] {
+ float: none;
+ margin-left: 0;
+ }
+ .form-inline .has-feedback .form-control-feedback {
+ top: 0;
+ }
+}
+.form-horizontal .control-label,
+.form-horizontal .radio,
+.form-horizontal .checkbox,
+.form-horizontal .radio-inline,
+.form-horizontal .checkbox-inline {
+ padding-top: 7px;
+ margin-top: 0;
+ margin-bottom: 0;
+}
+.form-horizontal .radio,
+.form-horizontal .checkbox {
+ min-height: 27px;
+}
+.form-horizontal .form-group {
+ margin-right: -15px;
+ margin-left: -15px;
+}
+.form-horizontal .form-control-static {
+ padding-top: 7px;
+}
+@media (min-width: 768px) {
+ .form-horizontal .control-label {
+ text-align: right;
+ }
+}
+.form-horizontal .has-feedback .form-control-feedback {
+ top: 0;
+ right: 15px;
+}
+.btn {
+ display: inline-block;
+ padding: 6px 12px;
+ margin-bottom: 0;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: 1.42857143;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: middle;
+ cursor: pointer;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ background-image: none;
+ border: 1px solid transparent;
+ border-radius: 4px;
+}
+.btn:focus,
+.btn:active:focus,
+.btn.active:focus {
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+.btn:hover,
+.btn:focus {
+ color: #333;
+ text-decoration: none;
+}
+.btn:active,
+.btn.active {
+ background-image: none;
+ outline: 0;
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+}
+.btn.disabled,
+.btn[disabled],
+fieldset[disabled] .btn {
+ pointer-events: none;
+ cursor: not-allowed;
+ filter: alpha(opacity=65);
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ opacity: .65;
+}
+.btn.default {
+ color: #333333;
+ text-shadow: none;
+ background-color: #e5e5e5;
+ height:12px;
+}
+.btn.default:hover,
+.btn.default:focus,
+.btn.default:active,
+.btn.default.active,
+.btn.default[disabled],
+.btn.default.disabled {
+ color: #333333;
+ background-color: #d8d8d8 !important;
+ outline: none !important;
+}
+
+.btn-default:hover,
+.btn-default:focus,
+.btn-default:active,
+.btn-default.active,
+.open .dropdown-toggle.btn-default {
+ color: #333;
+ background-color: #ebebeb;
+ border-color: #adadad;
+}
+.btn-default:active,
+.btn-default.active,
+.open .dropdown-toggle.btn-default {
+ background-image: none;
+}
+.btn-default.disabled,
+.btn-default[disabled],
+fieldset[disabled] .btn-default,
+.btn-default.disabled:hover,
+.btn-default[disabled]:hover,
+fieldset[disabled] .btn-default:hover,
+.btn-default.disabled:focus,
+.btn-default[disabled]:focus,
+fieldset[disabled] .btn-default:focus,
+.btn-default.disabled:active,
+.btn-default[disabled]:active,
+fieldset[disabled] .btn-default:active,
+.btn-default.disabled.active,
+.btn-default[disabled].active,
+fieldset[disabled] .btn-default.active {
+ background-color: #fff;
+ border-color: #ccc;
+}
+.btn-default .badge {
+ color: #fff;
+ background-color: #333;
+}
+.btn-primary {
+ color: #fff;
+ background-color: #428bca;
+ border-color: #357ebd;
+}
+.btn-primary:hover,
+.btn-primary:focus,
+.btn-primary:active,
+.btn-primary.active,
+.open .dropdown-toggle.btn-primary {
+ color: #fff;
+ background-color: #3276b1;
+ border-color: #285e8e;
+}
+.btn-primary:active,
+.btn-primary.active,
+.open .dropdown-toggle.btn-primary {
+ background-image: none;
+}
+.btn-primary.disabled,
+.btn-primary[disabled],
+fieldset[disabled] .btn-primary,
+.btn-primary.disabled:hover,
+.btn-primary[disabled]:hover,
+fieldset[disabled] .btn-primary:hover,
+.btn-primary.disabled:focus,
+.btn-primary[disabled]:focus,
+fieldset[disabled] .btn-primary:focus,
+.btn-primary.disabled:active,
+.btn-primary[disabled]:active,
+fieldset[disabled] .btn-primary:active,
+.btn-primary.disabled.active,
+.btn-primary[disabled].active,
+fieldset[disabled] .btn-primary.active {
+ background-color: #428bca;
+ border-color: #357ebd;
+}
+.btn-primary .badge {
+ color: #428bca;
+ background-color: #fff;
+}
+.btn-success {
+ color: #fff;
+ background-color: #5cb85c;
+ border-color: #4cae4c;
+}
+.btn-success:hover,
+.btn-success:focus,
+.btn-success:active,
+.btn-success.active,
+.open .dropdown-toggle.btn-success {
+ color: #fff;
+ background-color: #47a447;
+ border-color: #398439;
+}
+.btn-success:active,
+.btn-success.active,
+.open .dropdown-toggle.btn-success {
+ background-image: none;
+}
+.btn-success.disabled,
+.btn-success[disabled],
+fieldset[disabled] .btn-success,
+.btn-success.disabled:hover,
+.btn-success[disabled]:hover,
+fieldset[disabled] .btn-success:hover,
+.btn-success.disabled:focus,
+.btn-success[disabled]:focus,
+fieldset[disabled] .btn-success:focus,
+.btn-success.disabled:active,
+.btn-success[disabled]:active,
+fieldset[disabled] .btn-success:active,
+.btn-success.disabled.active,
+.btn-success[disabled].active,
+fieldset[disabled] .btn-success.active {
+ background-color: #5cb85c;
+ border-color: #4cae4c;
+}
+.btn-success .badge {
+ color: #5cb85c;
+ background-color: #fff;
+}
+.btn-info {
+ color: #fff;
+ background-color: #5bc0de;
+ border-color: #46b8da;
+}
+.btn-info:hover,
+.btn-info:focus,
+.btn-info:active,
+.btn-info.active,
+.open .dropdown-toggle.btn-info {
+ color: #fff;
+ background-color: #39b3d7;
+ border-color: #269abc;
+}
+.btn-info:active,
+.btn-info.active,
+.open .dropdown-toggle.btn-info {
+ background-image: none;
+}
+.btn-info.disabled,
+.btn-info[disabled],
+fieldset[disabled] .btn-info,
+.btn-info.disabled:hover,
+.btn-info[disabled]:hover,
+fieldset[disabled] .btn-info:hover,
+.btn-info.disabled:focus,
+.btn-info[disabled]:focus,
+fieldset[disabled] .btn-info:focus,
+.btn-info.disabled:active,
+.btn-info[disabled]:active,
+fieldset[disabled] .btn-info:active,
+.btn-info.disabled.active,
+.btn-info[disabled].active,
+fieldset[disabled] .btn-info.active {
+ background-color: #5bc0de;
+ border-color: #46b8da;
+}
+.btn-info .badge {
+ color: #5bc0de;
+ background-color: #fff;
+}
+.btn-warning {
+ color: #fff;
+ background-color: #f0ad4e;
+ border-color: #eea236;
+}
+.btn-warning:hover,
+.btn-warning:focus,
+.btn-warning:active,
+.btn-warning.active,
+.open .dropdown-toggle.btn-warning {
+ color: #fff;
+ background-color: #ed9c28;
+ border-color: #d58512;
+}
+.btn-warning:active,
+.btn-warning.active,
+.open .dropdown-toggle.btn-warning {
+ background-image: none;
+}
+.btn-warning.disabled,
+.btn-warning[disabled],
+fieldset[disabled] .btn-warning,
+.btn-warning.disabled:hover,
+.btn-warning[disabled]:hover,
+fieldset[disabled] .btn-warning:hover,
+.btn-warning.disabled:focus,
+.btn-warning[disabled]:focus,
+fieldset[disabled] .btn-warning:focus,
+.btn-warning.disabled:active,
+.btn-warning[disabled]:active,
+fieldset[disabled] .btn-warning:active,
+.btn-warning.disabled.active,
+.btn-warning[disabled].active,
+fieldset[disabled] .btn-warning.active {
+ background-color: #f0ad4e;
+ border-color: #eea236;
+}
+.btn-warning .badge {
+ color: #f0ad4e;
+ background-color: #fff;
+}
+.btn-danger {
+ color: #fff;
+ background-color: #d9534f;
+ border-color: #d43f3a;
+}
+.btn-danger:hover,
+.btn-danger:focus,
+.btn-danger:active,
+.btn-danger.active,
+.open .dropdown-toggle.btn-danger {
+ color: #fff;
+ background-color: #d2322d;
+ border-color: #ac2925;
+}
+.btn-danger:active,
+.btn-danger.active,
+.open .dropdown-toggle.btn-danger {
+ background-image: none;
+}
+.btn-danger.disabled,
+.btn-danger[disabled],
+fieldset[disabled] .btn-danger,
+.btn-danger.disabled:hover,
+.btn-danger[disabled]:hover,
+fieldset[disabled] .btn-danger:hover,
+.btn-danger.disabled:focus,
+.btn-danger[disabled]:focus,
+fieldset[disabled] .btn-danger:focus,
+.btn-danger.disabled:active,
+.btn-danger[disabled]:active,
+fieldset[disabled] .btn-danger:active,
+.btn-danger.disabled.active,
+.btn-danger[disabled].active,
+fieldset[disabled] .btn-danger.active {
+ background-color: #d9534f;
+ border-color: #d43f3a;
+}
+.btn-danger .badge {
+ color: #d9534f;
+ background-color: #fff;
+}
+.btn-link {
+ font-weight: normal;
+ color: #428bca;
+ cursor: pointer;
+ border-radius: 0;
+}
+.btn-link,
+.btn-link:active,
+.btn-link[disabled],
+fieldset[disabled] .btn-link {
+ background-color: transparent;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.btn-link,
+.btn-link:hover,
+.btn-link:focus,
+.btn-link:active {
+ border-color: transparent;
+}
+.btn-link:hover,
+.btn-link:focus {
+ color: #2a6496;
+ text-decoration: underline;
+ background-color: transparent;
+}
+.btn-link[disabled]:hover,
+fieldset[disabled] .btn-link:hover,
+.btn-link[disabled]:focus,
+fieldset[disabled] .btn-link:focus {
+ color: #999;
+ text-decoration: none;
+}
+.btn-lg,
+.btn-group-lg > .btn {
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.33;
+ border-radius: 6px;
+}
+.btn-sm,
+.btn-group-sm > .btn {
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+.btn-sm {
+ padding: 2px 10px 8px 10px;
+}
+.btn-xs,
+.btn-group-xs > .btn {
+ padding: 1px 5px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+.btn-block {
+ display: block;
+ width: 100%;
+ padding-right: 0;
+ padding-left: 0;
+}
+.btn-block + .btn-block {
+ margin-top: 5px;
+}
+input[type="submit"].btn-block,
+input[type="reset"].btn-block,
+input[type="button"].btn-block {
+ width: 100%;
+}
+.fade {
+ opacity: 0;
+ -webkit-transition: opacity .15s linear;
+ transition: opacity .15s linear;
+}
+.fade.in {
+ opacity: 1;
+}
+.collapse {
+ display: none;
+}
+.collapse.in {
+ display: block;
+}
+.collapsing {
+ position: relative;
+ height: 0;
+ overflow: hidden;
+ -webkit-transition: height .35s ease;
+ transition: height .35s ease;
+}
+@font-face {
+ font-family: 'Glyphicons Halflings';
+
+ src: url('../fonts/glyphicons-halflings-regular.eot');
+ src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
+}
+.glyphicon {
+ position: relative;
+ top: 1px;
+ display: inline-block;
+ font-family: 'Glyphicons Halflings';
+ font-style: normal;
+ font-weight: normal;
+ line-height: 1;
+
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+.glyphicon-asterisk:before {
+ content: "\2a";
+}
+.glyphicon-plus:before {
+ content: "\2b";
+}
+.glyphicon-euro:before {
+ content: "\20ac";
+}
+.glyphicon-minus:before {
+ content: "\2212";
+}
+.glyphicon-cloud:before {
+ content: "\2601";
+}
+.glyphicon-envelope:before {
+ content: "\2709";
+}
+.glyphicon-pencil:before {
+ content: "\270f";
+}
+.glyphicon-glass:before {
+ content: "\e001";
+}
+.glyphicon-music:before {
+ content: "\e002";
+}
+.glyphicon-search:before {
+ content: "\e003";
+}
+.glyphicon-heart:before {
+ content: "\e005";
+}
+.glyphicon-star:before {
+ content: "\e006";
+}
+.glyphicon-star-empty:before {
+ content: "\e007";
+}
+.glyphicon-user:before {
+ content: "\e008";
+}
+.glyphicon-film:before {
+ content: "\e009";
+}
+.glyphicon-th-large:before {
+ content: "\e010";
+}
+.glyphicon-th:before {
+ content: "\e011";
+}
+.glyphicon-th-list:before {
+ content: "\e012";
+}
+.glyphicon-ok:before {
+ content: "\e013";
+}
+.glyphicon-remove:before {
+ content: "\e014";
+}
+.glyphicon-zoom-in:before {
+ content: "\e015";
+}
+.glyphicon-zoom-out:before {
+ content: "\e016";
+}
+.glyphicon-off:before {
+ content: "\e017";
+}
+.glyphicon-signal:before {
+ content: "\e018";
+}
+.glyphicon-cog:before {
+ content: "\e019";
+}
+.glyphicon-trash:before {
+ content: "\e020";
+}
+.glyphicon-home:before {
+ content: "\e021";
+}
+.glyphicon-file:before {
+ content: "\e022";
+}
+.glyphicon-time:before {
+ content: "\e023";
+}
+.glyphicon-road:before {
+ content: "\e024";
+}
+.glyphicon-download-alt:before {
+ content: "\e025";
+}
+.glyphicon-download:before {
+ content: "\e026";
+}
+.glyphicon-upload:before {
+ content: "\e027";
+}
+.glyphicon-inbox:before {
+ content: "\e028";
+}
+.glyphicon-play-circle:before {
+ content: "\e029";
+}
+.glyphicon-repeat:before {
+ content: "\e030";
+}
+.glyphicon-refresh:before {
+ content: "\e031";
+}
+.glyphicon-list-alt:before {
+ content: "\e032";
+}
+.glyphicon-lock:before {
+ content: "\e033";
+}
+.glyphicon-flag:before {
+ content: "\e034";
+}
+.glyphicon-headphones:before {
+ content: "\e035";
+}
+.glyphicon-volume-off:before {
+ content: "\e036";
+}
+.glyphicon-volume-down:before {
+ content: "\e037";
+}
+.glyphicon-volume-up:before {
+ content: "\e038";
+}
+.glyphicon-qrcode:before {
+ content: "\e039";
+}
+.glyphicon-barcode:before {
+ content: "\e040";
+}
+.glyphicon-tag:before {
+ content: "\e041";
+}
+.glyphicon-tags:before {
+ content: "\e042";
+}
+.glyphicon-book:before {
+ content: "\e043";
+}
+.glyphicon-bookmark:before {
+ content: "\e044";
+}
+.glyphicon-print:before {
+ content: "\e045";
+}
+.glyphicon-camera:before {
+ content: "\e046";
+}
+.glyphicon-font:before {
+ content: "\e047";
+}
+.glyphicon-bold:before {
+ content: "\e048";
+}
+.glyphicon-italic:before {
+ content: "\e049";
+}
+.glyphicon-text-height:before {
+ content: "\e050";
+}
+.glyphicon-text-width:before {
+ content: "\e051";
+}
+.glyphicon-align-left:before {
+ content: "\e052";
+}
+.glyphicon-align-center:before {
+ content: "\e053";
+}
+.glyphicon-align-right:before {
+ content: "\e054";
+}
+.glyphicon-align-justify:before {
+ content: "\e055";
+}
+.glyphicon-list:before {
+ content: "\e056";
+}
+.glyphicon-indent-left:before {
+ content: "\e057";
+}
+.glyphicon-indent-right:before {
+ content: "\e058";
+}
+.glyphicon-facetime-video:before {
+ content: "\e059";
+}
+.glyphicon-picture:before {
+ content: "\e060";
+}
+.glyphicon-map-marker:before {
+ content: "\e062";
+}
+.glyphicon-adjust:before {
+ content: "\e063";
+}
+.glyphicon-tint:before {
+ content: "\e064";
+}
+.glyphicon-edit:before {
+ content: "\e065";
+}
+.glyphicon-share:before {
+ content: "\e066";
+}
+.glyphicon-check:before {
+ content: "\e067";
+}
+.glyphicon-move:before {
+ content: "\e068";
+}
+.glyphicon-step-backward:before {
+ content: "\e069";
+}
+.glyphicon-fast-backward:before {
+ content: "\e070";
+}
+.glyphicon-backward:before {
+ content: "\e071";
+}
+.glyphicon-play:before {
+ content: "\e072";
+}
+.glyphicon-pause:before {
+ content: "\e073";
+}
+.glyphicon-stop:before {
+ content: "\e074";
+}
+.glyphicon-forward:before {
+ content: "\e075";
+}
+.glyphicon-fast-forward:before {
+ content: "\e076";
+}
+.glyphicon-step-forward:before {
+ content: "\e077";
+}
+.glyphicon-eject:before {
+ content: "\e078";
+}
+.glyphicon-chevron-left:before {
+ content: "\e079";
+}
+.glyphicon-chevron-right:before {
+ content: "\e080";
+}
+.glyphicon-plus-sign:before {
+ content: "\e081";
+}
+.glyphicon-minus-sign:before {
+ content: "\e082";
+}
+.glyphicon-remove-sign:before {
+ content: "\e083";
+}
+.glyphicon-ok-sign:before {
+ content: "\e084";
+}
+.glyphicon-question-sign:before {
+ content: "\e085";
+}
+.glyphicon-info-sign:before {
+ content: "\e086";
+}
+.glyphicon-screenshot:before {
+ content: "\e087";
+}
+.glyphicon-remove-circle:before {
+ content: "\e088";
+}
+.glyphicon-ok-circle:before {
+ content: "\e089";
+}
+.glyphicon-ban-circle:before {
+ content: "\e090";
+}
+.glyphicon-arrow-left:before {
+ content: "\e091";
+}
+.glyphicon-arrow-right:before {
+ content: "\e092";
+}
+.glyphicon-arrow-up:before {
+ content: "\e093";
+}
+.glyphicon-arrow-down:before {
+ content: "\e094";
+}
+.glyphicon-share-alt:before {
+ content: "\e095";
+}
+.glyphicon-resize-full:before {
+ content: "\e096";
+}
+.glyphicon-resize-small:before {
+ content: "\e097";
+}
+.glyphicon-exclamation-sign:before {
+ content: "\e101";
+}
+.glyphicon-gift:before {
+ content: "\e102";
+}
+.glyphicon-leaf:before {
+ content: "\e103";
+}
+.glyphicon-fire:before {
+ content: "\e104";
+}
+.glyphicon-eye-open:before {
+ content: "\e105";
+}
+.glyphicon-eye-close:before {
+ content: "\e106";
+}
+.glyphicon-warning-sign:before {
+ content: "\e107";
+}
+.glyphicon-plane:before {
+ content: "\e108";
+}
+.glyphicon-calendar:before {
+ content: "\e109";
+}
+.glyphicon-random:before {
+ content: "\e110";
+}
+.glyphicon-comment:before {
+ content: "\e111";
+}
+.glyphicon-magnet:before {
+ content: "\e112";
+}
+.glyphicon-chevron-up:before {
+ content: "\e113";
+}
+.glyphicon-chevron-down:before {
+ content: "\e114";
+}
+.glyphicon-retweet:before {
+ content: "\e115";
+}
+.glyphicon-shopping-cart:before {
+ content: "\e116";
+}
+.glyphicon-folder-close:before {
+ content: "\e117";
+}
+.glyphicon-folder-open:before {
+ content: "\e118";
+}
+.glyphicon-resize-vertical:before {
+ content: "\e119";
+}
+.glyphicon-resize-horizontal:before {
+ content: "\e120";
+}
+.glyphicon-hdd:before {
+ content: "\e121";
+}
+.glyphicon-bullhorn:before {
+ content: "\e122";
+}
+.glyphicon-bell:before {
+ content: "\e123";
+}
+.glyphicon-certificate:before {
+ content: "\e124";
+}
+.glyphicon-thumbs-up:before {
+ content: "\e125";
+}
+.glyphicon-thumbs-down:before {
+ content: "\e126";
+}
+.glyphicon-hand-right:before {
+ content: "\e127";
+}
+.glyphicon-hand-left:before {
+ content: "\e128";
+}
+.glyphicon-hand-up:before {
+ content: "\e129";
+}
+.glyphicon-hand-down:before {
+ content: "\e130";
+}
+.glyphicon-circle-arrow-right:before {
+ content: "\e131";
+}
+.glyphicon-circle-arrow-left:before {
+ content: "\e132";
+}
+.glyphicon-circle-arrow-up:before {
+ content: "\e133";
+}
+.glyphicon-circle-arrow-down:before {
+ content: "\e134";
+}
+.glyphicon-globe:before {
+ content: "\e135";
+}
+.glyphicon-wrench:before {
+ content: "\e136";
+}
+.glyphicon-tasks:before {
+ content: "\e137";
+}
+.glyphicon-filter:before {
+ content: "\e138";
+}
+.glyphicon-briefcase:before {
+ content: "\e139";
+}
+.glyphicon-fullscreen:before {
+ content: "\e140";
+}
+.glyphicon-dashboard:before {
+ content: "\e141";
+}
+.glyphicon-paperclip:before {
+ content: "\e142";
+}
+.glyphicon-heart-empty:before {
+ content: "\e143";
+}
+.glyphicon-link:before {
+ content: "\e144";
+}
+.glyphicon-phone:before {
+ content: "\e145";
+}
+.glyphicon-pushpin:before {
+ content: "\e146";
+}
+.glyphicon-usd:before {
+ content: "\e148";
+}
+.glyphicon-gbp:before {
+ content: "\e149";
+}
+.glyphicon-sort:before {
+ content: "\e150";
+}
+.glyphicon-sort-by-alphabet:before {
+ content: "\e151";
+}
+.glyphicon-sort-by-alphabet-alt:before {
+ content: "\e152";
+}
+.glyphicon-sort-by-order:before {
+ content: "\e153";
+}
+.glyphicon-sort-by-order-alt:before {
+ content: "\e154";
+}
+.glyphicon-sort-by-attributes:before {
+ content: "\e155";
+}
+.glyphicon-sort-by-attributes-alt:before {
+ content: "\e156";
+}
+.glyphicon-unchecked:before {
+ content: "\e157";
+}
+.glyphicon-expand:before {
+ content: "\e158";
+}
+.glyphicon-collapse-down:before {
+ content: "\e159";
+}
+.glyphicon-collapse-up:before {
+ content: "\e160";
+}
+.glyphicon-log-in:before {
+ content: "\e161";
+}
+.glyphicon-flash:before {
+ content: "\e162";
+}
+.glyphicon-log-out:before {
+ content: "\e163";
+}
+.glyphicon-new-window:before {
+ content: "\e164";
+}
+.glyphicon-record:before {
+ content: "\e165";
+}
+.glyphicon-save:before {
+ content: "\e166";
+}
+.glyphicon-open:before {
+ content: "\e167";
+}
+.glyphicon-saved:before {
+ content: "\e168";
+}
+.glyphicon-import:before {
+ content: "\e169";
+}
+.glyphicon-export:before {
+ content: "\e170";
+}
+.glyphicon-send:before {
+ content: "\e171";
+}
+.glyphicon-floppy-disk:before {
+ content: "\e172";
+}
+.glyphicon-floppy-saved:before {
+ content: "\e173";
+}
+.glyphicon-floppy-remove:before {
+ content: "\e174";
+}
+.glyphicon-floppy-save:before {
+ content: "\e175";
+}
+.glyphicon-floppy-open:before {
+ content: "\e176";
+}
+.glyphicon-credit-card:before {
+ content: "\e177";
+}
+.glyphicon-transfer:before {
+ content: "\e178";
+}
+.glyphicon-cutlery:before {
+ content: "\e179";
+}
+.glyphicon-header:before {
+ content: "\e180";
+}
+.glyphicon-compressed:before {
+ content: "\e181";
+}
+.glyphicon-earphone:before {
+ content: "\e182";
+}
+.glyphicon-phone-alt:before {
+ content: "\e183";
+}
+.glyphicon-tower:before {
+ content: "\e184";
+}
+.glyphicon-stats:before {
+ content: "\e185";
+}
+.glyphicon-sd-video:before {
+ content: "\e186";
+}
+.glyphicon-hd-video:before {
+ content: "\e187";
+}
+.glyphicon-subtitles:before {
+ content: "\e188";
+}
+.glyphicon-sound-stereo:before {
+ content: "\e189";
+}
+.glyphicon-sound-dolby:before {
+ content: "\e190";
+}
+.glyphicon-sound-5-1:before {
+ content: "\e191";
+}
+.glyphicon-sound-6-1:before {
+ content: "\e192";
+}
+.glyphicon-sound-7-1:before {
+ content: "\e193";
+}
+.glyphicon-copyright-mark:before {
+ content: "\e194";
+}
+.glyphicon-registration-mark:before {
+ content: "\e195";
+}
+.glyphicon-cloud-download:before {
+ content: "\e197";
+}
+.glyphicon-cloud-upload:before {
+ content: "\e198";
+}
+.glyphicon-tree-conifer:before {
+ content: "\e199";
+}
+.glyphicon-tree-deciduous:before {
+ content: "\e200";
+}
+.caret {
+ display: inline-block;
+ width: 0;
+ height: 0;
+ margin-left: 2px;
+ vertical-align: middle;
+ border-top: 4px solid;
+ border-right: 4px solid transparent;
+ border-left: 4px solid transparent;
+}
+.dropdown {
+ position: relative;
+}
+.dropdown-toggle:focus {
+ outline: 0;
+}
+.dropdown-menu {
+ position: absolute;
+ top: 100%;
+ left: 0;
+ z-index: 1000;
+ display: none;
+ float: left;
+ min-width: 160px;
+ padding: 5px 0;
+ margin: 2px 0 0;
+ font-size: 14px;
+ list-style: none;
+ background-color: #fff;
+ background-clip: padding-box;
+ border: 1px solid #ccc;
+ border: 1px solid rgba(0, 0, 0, .15);
+ border-radius: 4px;
+ -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
+ box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
+}
+.dropdown-menu.pull-right {
+ right: 0;
+ left: auto;
+}
+.dropdown-menu .divider {
+ height: 1px;
+ margin: 9px 0;
+ overflow: hidden;
+ background-color: #e5e5e5;
+}
+.dropdown-menu > li > a {
+ display: block;
+ padding: 3px 20px;
+ clear: both;
+ font-weight: normal;
+ line-height: 1.42857143;
+ color: #333;
+ white-space: nowrap;
+}
+.dropdown-menu > li > a:hover,
+.dropdown-menu > li > a:focus {
+ color: #262626;
+ text-decoration: none;
+ background-color: #f5f5f5;
+}
+.dropdown-menu > .active > a,
+.dropdown-menu > .active > a:hover,
+.dropdown-menu > .active > a:focus {
+ color: #fff;
+ text-decoration: none;
+ background-color: #428bca;
+ outline: 0;
+}
+.dropdown-menu > .disabled > a,
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
+ color: #999;
+}
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
+ text-decoration: none;
+ cursor: not-allowed;
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.open > .dropdown-menu {
+ display: block;
+}
+.open > a {
+ outline: 0;
+}
+.dropdown-menu-right {
+ right: 0;
+ left: auto;
+}
+.dropdown-menu-left {
+ right: auto;
+ left: 0;
+}
+.dropdown-header {
+ display: block;
+ padding: 3px 20px;
+ font-size: 12px;
+ line-height: 1.42857143;
+ color: #999;
+}
+.dropdown-backdrop {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 990;
+}
+.pull-right > .dropdown-menu {
+ right: 0;
+ left: auto;
+}
+.dropup .caret,
+.navbar-fixed-bottom .dropdown .caret {
+ content: "";
+ border-top: 0;
+ border-bottom: 4px solid;
+}
+.dropup .dropdown-menu,
+.navbar-fixed-bottom .dropdown .dropdown-menu {
+ top: auto;
+ bottom: 100%;
+ margin-bottom: 1px;
+}
+@media (min-width: 768px) {
+ .navbar-right .dropdown-menu {
+ right: 0;
+ left: auto;
+ }
+ .navbar-right .dropdown-menu-left {
+ right: auto;
+ left: 0;
+ }
+}
+.btn-group,
+.btn-group-vertical {
+ position: relative;
+ display: inline-block;
+ vertical-align: middle;
+}
+.btn-group > .btn,
+.btn-group-vertical > .btn {
+ position: relative;
+ float: left;
+}
+.btn-group > .btn:hover,
+.btn-group-vertical > .btn:hover,
+.btn-group > .btn:focus,
+.btn-group-vertical > .btn:focus,
+.btn-group > .btn:active,
+.btn-group-vertical > .btn:active,
+.btn-group > .btn.active,
+.btn-group-vertical > .btn.active {
+ z-index: 2;
+}
+.btn-group > .btn:focus,
+.btn-group-vertical > .btn:focus {
+ outline: none;
+}
+.btn-group .btn + .btn,
+.btn-group .btn + .btn-group,
+.btn-group .btn-group + .btn,
+.btn-group .btn-group + .btn-group {
+ margin-left: -1px;
+}
+.btn-toolbar {
+ margin-left: -5px;
+}
+.btn-toolbar .btn-group,
+.btn-toolbar .input-group {
+ float: left;
+}
+.btn-toolbar > .btn,
+.btn-toolbar > .btn-group,
+.btn-toolbar > .input-group {
+ margin-left: 5px;
+}
+.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
+ border-radius: 0;
+}
+.btn-group > .btn:first-child {
+ margin-left: 0;
+}
+.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+.btn-group > .btn:last-child:not(:first-child),
+.btn-group > .dropdown-toggle:not(:first-child) {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.btn-group > .btn-group {
+ float: left;
+}
+.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
+ border-radius: 0;
+}
+.btn-group > .btn-group:first-child > .btn:last-child,
+.btn-group > .btn-group:first-child > .dropdown-toggle {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+.btn-group > .btn-group:last-child > .btn:first-child {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.btn-group .dropdown-toggle:active,
+.btn-group.open .dropdown-toggle {
+ outline: 0;
+}
+.btn-group > .btn + .dropdown-toggle {
+ padding-right: 8px;
+ padding-left: 8px;
+}
+.btn-group > .btn-lg + .dropdown-toggle {
+ padding-right: 12px;
+ padding-left: 12px;
+}
+.btn-group.open .dropdown-toggle {
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+}
+.btn-group.open .dropdown-toggle.btn-link {
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.btn .caret {
+ margin-left: 0;
+}
+.btn-lg .caret {
+ border-width: 5px 5px 0;
+ border-bottom-width: 0;
+}
+.dropup .btn-lg .caret {
+ border-width: 0 5px 5px;
+}
+.btn-group-vertical > .btn,
+.btn-group-vertical > .btn-group,
+.btn-group-vertical > .btn-group > .btn {
+ display: block;
+ float: none;
+ width: 100%;
+ max-width: 100%;
+}
+.btn-group-vertical > .btn-group > .btn {
+ float: none;
+}
+.btn-group-vertical > .btn + .btn,
+.btn-group-vertical > .btn + .btn-group,
+.btn-group-vertical > .btn-group + .btn,
+.btn-group-vertical > .btn-group + .btn-group {
+ margin-top: -1px;
+ margin-left: 0;
+}
+.btn-group-vertical > .btn:not(:first-child):not(:last-child) {
+ border-radius: 0;
+}
+.btn-group-vertical > .btn:first-child:not(:last-child) {
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.btn-group-vertical > .btn:last-child:not(:first-child) {
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+ border-bottom-left-radius: 4px;
+}
+.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
+ border-radius: 0;
+}
+.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,
+.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+}
+.btn-group-justified {
+ display: table;
+ width: 100%;
+ table-layout: fixed;
+ border-collapse: separate;
+}
+.btn-group-justified > .btn,
+.btn-group-justified > .btn-group {
+ display: table-cell;
+ float: none;
+ width: 1%;
+}
+.btn-group-justified > .btn-group .btn {
+ width: 100%;
+}
+[data-toggle="buttons"] > .btn > input[type="radio"],
+[data-toggle="buttons"] > .btn > input[type="checkbox"] {
+ display: none;
+}
+.input-group {
+ position: relative;
+ display: table;
+ border-collapse: separate;
+}
+.input-group[class*="col-"] {
+ float: none;
+ padding-right: 0;
+ padding-left: 0;
+}
+.input-group .form-control {
+ position: relative;
+ z-index: 2;
+ float: left;
+ width: 100%;
+ margin-bottom: 0;
+}
+.input-group-lg > .form-control,
+.input-group-lg > .input-group-addon,
+.input-group-lg > .input-group-btn > .btn {
+ height: 46px;
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.33;
+ border-radius: 6px;
+}
+select.input-group-lg > .form-control,
+select.input-group-lg > .input-group-addon,
+select.input-group-lg > .input-group-btn > .btn {
+ height: 46px;
+ line-height: 46px;
+}
+textarea.input-group-lg > .form-control,
+textarea.input-group-lg > .input-group-addon,
+textarea.input-group-lg > .input-group-btn > .btn,
+select[multiple].input-group-lg > .form-control,
+select[multiple].input-group-lg > .input-group-addon,
+select[multiple].input-group-lg > .input-group-btn > .btn {
+ height: auto;
+}
+.input-group-sm > .form-control,
+.input-group-sm > .input-group-addon,
+.input-group-sm > .input-group-btn > .btn {
+ height: 30px;
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+select.input-group-sm > .form-control,
+select.input-group-sm > .input-group-addon,
+select.input-group-sm > .input-group-btn > .btn {
+ height: 30px;
+ line-height: 30px;
+}
+textarea.input-group-sm > .form-control,
+textarea.input-group-sm > .input-group-addon,
+textarea.input-group-sm > .input-group-btn > .btn,
+select[multiple].input-group-sm > .form-control,
+select[multiple].input-group-sm > .input-group-addon,
+select[multiple].input-group-sm > .input-group-btn > .btn {
+ height: auto;
+}
+.input-group-addon,
+.input-group-btn,
+.input-group .form-control {
+ display: table-cell;
+}
+.input-group-addon:not(:first-child):not(:last-child),
+.input-group-btn:not(:first-child):not(:last-child),
+.input-group .form-control:not(:first-child):not(:last-child) {
+ border-radius: 0;
+}
+.input-group-addon,
+.input-group-btn {
+ width: 1%;
+ white-space: nowrap;
+ vertical-align: middle;
+}
+.input-group-addon {
+ padding: 6px 12px;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: 1;
+ color: #555;
+ text-align: center;
+ background-color: #eee;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+}
+.input-group-addon.input-sm {
+ padding: 5px 10px;
+ font-size: 12px;
+ border-radius: 3px;
+}
+.input-group-addon.input-lg {
+ padding: 10px 16px;
+ font-size: 18px;
+ border-radius: 6px;
+}
+.input-group-addon input[type="radio"],
+.input-group-addon input[type="checkbox"] {
+ margin-top: 0;
+}
+.input-group .form-control:first-child,
+.input-group-addon:first-child,
+.input-group-btn:first-child > .btn,
+.input-group-btn:first-child > .btn-group > .btn,
+.input-group-btn:first-child > .dropdown-toggle,
+.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
+.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+.input-group-addon:first-child {
+ border-right: 0;
+}
+.input-group .form-control:last-child,
+.input-group-addon:last-child,
+.input-group-btn:last-child > .btn,
+.input-group-btn:last-child > .btn-group > .btn,
+.input-group-btn:last-child > .dropdown-toggle,
+.input-group-btn:first-child > .btn:not(:first-child),
+.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.input-group-addon:last-child {
+ border-left: 0;
+}
+.input-group-btn {
+ position: relative;
+ font-size: 0;
+ white-space: nowrap;
+}
+.input-group-btn > .btn {
+ position: relative;
+}
+.input-group-btn > .btn + .btn {
+ margin-left: -1px;
+}
+.input-group-btn > .btn:hover,
+.input-group-btn > .btn:focus,
+.input-group-btn > .btn:active {
+ z-index: 2;
+}
+.input-group-btn:first-child > .btn,
+.input-group-btn:first-child > .btn-group {
+ margin-right: -1px;
+}
+.input-group-btn:last-child > .btn,
+.input-group-btn:last-child > .btn-group {
+ margin-left: -1px;
+}
+.nav {
+ padding-left: 0;
+ margin-bottom: 0;
+ list-style: none;
+}
+.nav > li {
+ position: relative;
+ display: block;
+}
+.nav > li > a {
+ position: relative;
+ display: block;
+ padding: 10px 15px;
+}
+.nav > li > a:hover,
+.nav > li > a:focus {
+ text-decoration: none;
+ background-color: #eee;
+}
+.nav > li.disabled > a {
+ color: #999;
+}
+.nav > li.disabled > a:hover,
+.nav > li.disabled > a:focus {
+ color: #999;
+ text-decoration: none;
+ cursor: not-allowed;
+ background-color: transparent;
+}
+.nav .open > a,
+.nav .open > a:hover,
+.nav .open > a:focus {
+ background-color: #eee;
+ border-color: #428bca;
+}
+.nav .nav-divider {
+ height: 1px;
+ margin: 9px 0;
+ overflow: hidden;
+ background-color: #e5e5e5;
+}
+.nav > li > a > img {
+ max-width: none;
+}
+.nav-tabs {
+ border-bottom: 1px solid #ddd;
+}
+.nav-tabs > li {
+ float: left;
+ margin-bottom: -1px;
+}
+.nav-tabs > li > a {
+ margin-right: 2px;
+ line-height: 1.42857143;
+ border: 1px solid transparent;
+ border-radius: 4px 4px 0 0;
+}
+.nav-tabs > li > a:hover {
+ border-color: #eee #eee #ddd;
+}
+.nav-tabs > li.active > a,
+.nav-tabs > li.active > a:hover,
+.nav-tabs > li.active > a:focus {
+ color: #555;
+ cursor: default;
+ background-color: #fff;
+ border: 1px solid #ddd;
+ border-bottom-color: transparent;
+}
+.nav-tabs.nav-justified {
+ width: 100%;
+ border-bottom: 0;
+}
+.nav-tabs.nav-justified > li {
+ float: none;
+}
+.nav-tabs.nav-justified > li > a {
+ margin-bottom: 5px;
+ text-align: center;
+}
+.nav-tabs.nav-justified > .dropdown .dropdown-menu {
+ top: auto;
+ left: auto;
+}
+@media (min-width: 768px) {
+ .nav-tabs.nav-justified > li {
+ display: table-cell;
+ width: 1%;
+ }
+ .nav-tabs.nav-justified > li > a {
+ margin-bottom: 0;
+ }
+}
+.nav-tabs.nav-justified > li > a {
+ margin-right: 0;
+ border-radius: 4px;
+}
+.nav-tabs.nav-justified > .active > a,
+.nav-tabs.nav-justified > .active > a:hover,
+.nav-tabs.nav-justified > .active > a:focus {
+ border: 1px solid #ddd;
+}
+@media (min-width: 768px) {
+ .nav-tabs.nav-justified > li > a {
+ border-bottom: 1px solid #ddd;
+ border-radius: 4px 4px 0 0;
+ }
+ .nav-tabs.nav-justified > .active > a,
+ .nav-tabs.nav-justified > .active > a:hover,
+ .nav-tabs.nav-justified > .active > a:focus {
+ border-bottom-color: #fff;
+ }
+}
+.nav-pills > li {
+ float: left;
+}
+.nav-pills > li > a {
+ border-radius: 4px;
+}
+.nav-pills > li + li {
+ margin-left: 2px;
+}
+.nav-pills > li.active > a,
+.nav-pills > li.active > a:hover,
+.nav-pills > li.active > a:focus {
+ color: #fff;
+ background-color: #428bca;
+}
+.nav-stacked > li {
+ float: none;
+}
+.nav-stacked > li + li {
+ margin-top: 2px;
+ margin-left: 0;
+}
+.nav-justified {
+ width: 100%;
+}
+.nav-justified > li {
+ float: none;
+}
+.nav-justified > li > a {
+ margin-bottom: 5px;
+ text-align: center;
+}
+.nav-justified > .dropdown .dropdown-menu {
+ top: auto;
+ left: auto;
+}
+@media (min-width: 768px) {
+ .nav-justified > li {
+ display: table-cell;
+ width: 1%;
+ }
+ .nav-justified > li > a {
+ margin-bottom: 0;
+ }
+}
+.nav-tabs-justified {
+ border-bottom: 0;
+}
+.nav-tabs-justified > li > a {
+ margin-right: 0;
+ border-radius: 4px;
+}
+.nav-tabs-justified > .active > a,
+.nav-tabs-justified > .active > a:hover,
+.nav-tabs-justified > .active > a:focus {
+ border: 1px solid #ddd;
+}
+@media (min-width: 768px) {
+ .nav-tabs-justified > li > a {
+ border-bottom: 1px solid #ddd;
+ border-radius: 4px 4px 0 0;
+ }
+ .nav-tabs-justified > .active > a,
+ .nav-tabs-justified > .active > a:hover,
+ .nav-tabs-justified > .active > a:focus {
+ border-bottom-color: #fff;
+ }
+}
+.tab-content > .tab-pane {
+ display: none;
+}
+.tab-content > .active {
+ display: block;
+}
+.nav-tabs .dropdown-menu {
+ margin-top: -1px;
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+}
+.navbar {
+ position: relative;
+ min-height: 50px;
+ margin-bottom: 20px;
+ border: 1px solid transparent;
+}
+@media (min-width: 768px) {
+ .navbar {
+ border-radius: 4px;
+ }
+}
+@media (min-width: 768px) {
+ .navbar-header {
+ float: left;
+ }
+}
+.navbar-collapse {
+ max-height: 340px;
+ padding-right: 15px;
+ padding-left: 15px;
+ overflow-x: visible;
+ -webkit-overflow-scrolling: touch;
+ border-top: 1px solid transparent;
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
+}
+.navbar-collapse.in {
+ overflow-y: auto;
+}
+@media (min-width: 768px) {
+ .navbar-collapse {
+ width: auto;
+ border-top: 0;
+ box-shadow: none;
+ }
+ .navbar-collapse.collapse {
+ display: block !important;
+ height: auto !important;
+ padding-bottom: 0;
+ overflow: visible !important;
+ }
+ .navbar-collapse.in {
+ overflow-y: visible;
+ }
+ .navbar-fixed-top .navbar-collapse,
+ .navbar-static-top .navbar-collapse,
+ .navbar-fixed-bottom .navbar-collapse {
+ padding-right: 0;
+ padding-left: 0;
+ }
+}
+.container > .navbar-header,
+.container-fluid > .navbar-header,
+.container > .navbar-collapse,
+.container-fluid > .navbar-collapse {
+ margin-right: -15px;
+ margin-left: -15px;
+}
+@media (min-width: 768px) {
+ .container > .navbar-header,
+ .container-fluid > .navbar-header,
+ .container > .navbar-collapse,
+ .container-fluid > .navbar-collapse {
+ margin-right: 0;
+ margin-left: 0;
+ }
+}
+.navbar-static-top {
+ z-index: 1000;
+ border-width: 0 0 1px;
+}
+@media (min-width: 768px) {
+ .navbar-static-top {
+ border-radius: 0;
+ }
+}
+.navbar-fixed-top,
+.navbar-fixed-bottom {
+ position: fixed;
+ right: 0;
+ left: 0;
+ z-index: 1030;
+}
+@media (min-width: 768px) {
+ .navbar-fixed-top,
+ .navbar-fixed-bottom {
+ border-radius: 0;
+ }
+}
+.navbar-fixed-top {
+ top: 0;
+ border-width: 0 0 1px;
+}
+.navbar-fixed-bottom {
+ bottom: 0;
+ margin-bottom: 0;
+ border-width: 1px 0 0;
+}
+.navbar-brand {
+ float: left;
+ height: 50px;
+ padding: 15px 15px;
+ font-size: 18px;
+ line-height: 20px;
+}
+.navbar-brand:hover,
+.navbar-brand:focus {
+ text-decoration: none;
+}
+@media (min-width: 768px) {
+ .navbar > .container .navbar-brand,
+ .navbar > .container-fluid .navbar-brand {
+ margin-left: -15px;
+ }
+}
+.navbar-toggle {
+ position: relative;
+ float: right;
+ padding: 9px 10px;
+ margin-top: 8px;
+ margin-right: 15px;
+ margin-bottom: 8px;
+ background-color: transparent;
+ background-image: none;
+ border: 1px solid transparent;
+ border-radius: 4px;
+}
+.navbar-toggle:focus {
+ outline: none;
+}
+.navbar-toggle .icon-bar {
+ display: block;
+ width: 22px;
+ height: 2px;
+ border-radius: 1px;
+}
+.navbar-toggle .icon-bar + .icon-bar {
+ margin-top: 4px;
+}
+@media (min-width: 768px) {
+ .navbar-toggle {
+ display: none;
+ }
+}
+.navbar-nav {
+ margin: 7.5px -15px;
+}
+.navbar-nav > li > a {
+ padding-top: 10px;
+ padding-bottom: 10px;
+ line-height: 20px;
+}
+@media (max-width: 767px) {
+ .navbar-nav .open .dropdown-menu {
+ position: static;
+ float: none;
+ width: auto;
+ margin-top: 0;
+ background-color: transparent;
+ border: 0;
+ box-shadow: none;
+ }
+ .navbar-nav .open .dropdown-menu > li > a,
+ .navbar-nav .open .dropdown-menu .dropdown-header {
+ padding: 5px 15px 5px 25px;
+ }
+ .navbar-nav .open .dropdown-menu > li > a {
+ line-height: 20px;
+ }
+ .navbar-nav .open .dropdown-menu > li > a:hover,
+ .navbar-nav .open .dropdown-menu > li > a:focus {
+ background-image: none;
+ }
+}
+@media (min-width: 768px) {
+ .navbar-nav {
+ float: left;
+ margin: 0;
+ }
+ .navbar-nav > li {
+ float: left;
+ }
+ .navbar-nav > li > a {
+ padding-top: 15px;
+ padding-bottom: 15px;
+ }
+ .navbar-nav.navbar-right:last-child {
+ margin-right: -15px;
+ }
+}
+@media (min-width: 768px) {
+ .navbar-left {
+ float: left !important;
+ }
+ .navbar-right {
+ float: right !important;
+ }
+}
+.navbar-form {
+ padding: 10px 15px;
+ margin-top: 8px;
+ margin-right: -15px;
+ margin-bottom: 8px;
+ margin-left: -15px;
+ border-top: 1px solid transparent;
+ border-bottom: 1px solid transparent;
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);
+}
+@media (min-width: 768px) {
+ .navbar-form .form-group {
+ display: inline-block;
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .navbar-form .form-control {
+ display: inline-block;
+ width: auto;
+ vertical-align: middle;
+ }
+ .navbar-form .input-group > .form-control {
+ width: 100%;
+ }
+ .navbar-form .control-label {
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .navbar-form .radio,
+ .navbar-form .checkbox {
+ display: inline-block;
+ padding-left: 0;
+ margin-top: 0;
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .navbar-form .radio input[type="radio"],
+ .navbar-form .checkbox input[type="checkbox"] {
+ float: none;
+ margin-left: 0;
+ }
+ .navbar-form .has-feedback .form-control-feedback {
+ top: 0;
+ }
+}
+@media (max-width: 767px) {
+ .navbar-form .form-group {
+ margin-bottom: 5px;
+ }
+}
+@media (min-width: 768px) {
+ .navbar-form {
+ width: auto;
+ padding-top: 0;
+ padding-bottom: 0;
+ margin-right: 0;
+ margin-left: 0;
+ border: 0;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ }
+ .navbar-form.navbar-right:last-child {
+ margin-right: -15px;
+ }
+}
+.navbar-nav > li > .dropdown-menu {
+ margin-top: 0;
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+}
+.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.navbar-btn {
+ margin-top: 8px;
+ margin-bottom: 8px;
+}
+.navbar-btn.btn-sm {
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+.navbar-btn.btn-xs {
+ margin-top: 14px;
+ margin-bottom: 14px;
+}
+.navbar-text {
+ margin-top: 15px;
+ margin-bottom: 15px;
+}
+@media (min-width: 768px) {
+ .navbar-text {
+ float: left;
+ margin-right: 15px;
+ margin-left: 15px;
+ }
+ .navbar-text.navbar-right:last-child {
+ margin-right: 0;
+ }
+}
+.navbar-default {
+ background-color: #f8f8f8;
+ border-color: #e7e7e7;
+}
+.navbar-default .navbar-brand {
+ color: #777;
+}
+.navbar-default .navbar-brand:hover,
+.navbar-default .navbar-brand:focus {
+ color: #5e5e5e;
+ background-color: transparent;
+}
+.navbar-default .navbar-text {
+ color: #777;
+}
+.navbar-default .navbar-nav > li > a {
+ color: #777;
+}
+.navbar-default .navbar-nav > li > a:hover,
+.navbar-default .navbar-nav > li > a:focus {
+ color: #333;
+ background-color: transparent;
+}
+.navbar-default .navbar-nav > .active > a,
+.navbar-default .navbar-nav > .active > a:hover,
+.navbar-default .navbar-nav > .active > a:focus {
+ color: #555;
+ background-color: #e7e7e7;
+}
+.navbar-default .navbar-nav > .disabled > a,
+.navbar-default .navbar-nav > .disabled > a:hover,
+.navbar-default .navbar-nav > .disabled > a:focus {
+ color: #ccc;
+ background-color: transparent;
+}
+.navbar-default .navbar-toggle {
+ border-color: #ddd;
+}
+.navbar-default .navbar-toggle:hover,
+.navbar-default .navbar-toggle:focus {
+ background-color: #ddd;
+}
+.navbar-default .navbar-toggle .icon-bar {
+ background-color: #888;
+}
+.navbar-default .navbar-collapse,
+.navbar-default .navbar-form {
+ border-color: #e7e7e7;
+}
+.navbar-default .navbar-nav > .open > a,
+.navbar-default .navbar-nav > .open > a:hover,
+.navbar-default .navbar-nav > .open > a:focus {
+ color: #555;
+ background-color: #e7e7e7;
+}
+@media (max-width: 767px) {
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a {
+ color: #777;
+ }
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
+ color: #333;
+ background-color: transparent;
+ }
+ .navbar-default .navbar-nav .open .dropdown-menu > .active > a,
+ .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
+ .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
+ color: #555;
+ background-color: #e7e7e7;
+ }
+ .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,
+ .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,
+ .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
+ color: #ccc;
+ background-color: transparent;
+ }
+}
+.navbar-default .navbar-link {
+ color: #777;
+}
+.navbar-default .navbar-link:hover {
+ color: #333;
+}
+.navbar-inverse {
+ background-color: #222;
+ border-color: #080808;
+}
+.navbar-inverse .navbar-brand {
+ color: #999;
+}
+.navbar-inverse .navbar-brand:hover,
+.navbar-inverse .navbar-brand:focus {
+ color: #fff;
+ background-color: transparent;
+}
+.navbar-inverse .navbar-text {
+ color: #999;
+}
+.navbar-inverse .navbar-nav > li > a {
+ color: #999;
+}
+.navbar-inverse .navbar-nav > li > a:hover,
+.navbar-inverse .navbar-nav > li > a:focus {
+ color: #fff;
+ background-color: transparent;
+}
+.navbar-inverse .navbar-nav > .active > a,
+.navbar-inverse .navbar-nav > .active > a:hover,
+.navbar-inverse .navbar-nav > .active > a:focus {
+ color: #fff;
+ background-color: #080808;
+}
+.navbar-inverse .navbar-nav > .disabled > a,
+.navbar-inverse .navbar-nav > .disabled > a:hover,
+.navbar-inverse .navbar-nav > .disabled > a:focus {
+ color: #444;
+ background-color: transparent;
+}
+.navbar-inverse .navbar-toggle {
+ border-color: #333;
+}
+.navbar-inverse .navbar-toggle:hover,
+.navbar-inverse .navbar-toggle:focus {
+ background-color: #333;
+}
+.navbar-inverse .navbar-toggle .icon-bar {
+ background-color: #fff;
+}
+.navbar-inverse .navbar-collapse,
+.navbar-inverse .navbar-form {
+ border-color: #101010;
+}
+.navbar-inverse .navbar-nav > .open > a,
+.navbar-inverse .navbar-nav > .open > a:hover,
+.navbar-inverse .navbar-nav > .open > a:focus {
+ color: #fff;
+ background-color: #080808;
+}
+@media (max-width: 767px) {
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {
+ border-color: #080808;
+ }
+ .navbar-inverse .navbar-nav .open .dropdown-menu .divider {
+ background-color: #080808;
+ }
+ .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
+ color: #999;
+ }
+ .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
+ .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
+ color: #fff;
+ background-color: transparent;
+ }
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
+ color: #fff;
+ background-color: #080808;
+ }
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
+ color: #444;
+ background-color: transparent;
+ }
+}
+.navbar-inverse .navbar-link {
+ color: #999;
+}
+.navbar-inverse .navbar-link:hover {
+ color: #fff;
+}
+.breadcrumb {
+ padding: 8px 15px;
+ margin-bottom: 20px;
+ list-style: none;
+ background-color: #f5f5f5;
+ border-radius: 4px;
+}
+.breadcrumb > li {
+ display: inline-block;
+}
+.breadcrumb > li + li:before {
+ padding: 0 5px;
+ color: #ccc;
+ content: "/\00a0";
+}
+.breadcrumb > .active {
+ color: #999;
+}
+.pagination {
+ display: inline-block;
+ padding-left: 0;
+ margin: 20px 0;
+ border-radius: 4px;
+}
+.pagination > li {
+ display: inline;
+}
+.pagination > li > a,
+.pagination > li > span {
+ position: relative;
+ float: left;
+ padding: 6px 12px;
+ margin-left: -1px;
+ line-height: 1.42857143;
+ color: #428bca;
+ text-decoration: none;
+ background-color: #fff;
+ border: 1px solid #ddd;
+}
+.pagination > li:first-child > a,
+.pagination > li:first-child > span {
+ margin-left: 0;
+ border-top-left-radius: 4px;
+ border-bottom-left-radius: 4px;
+}
+.pagination > li:last-child > a,
+.pagination > li:last-child > span {
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 4px;
+}
+.pagination > li > a:hover,
+.pagination > li > span:hover,
+.pagination > li > a:focus,
+.pagination > li > span:focus {
+ color: #2a6496;
+ background-color: #eee;
+ border-color: #ddd;
+}
+.pagination > .active > a,
+.pagination > .active > span,
+.pagination > .active > a:hover,
+.pagination > .active > span:hover,
+.pagination > .active > a:focus,
+.pagination > .active > span:focus {
+ z-index: 2;
+ color: #fff;
+ cursor: default;
+ background-color: #428bca;
+ border-color: #428bca;
+}
+.pagination > .disabled > span,
+.pagination > .disabled > span:hover,
+.pagination > .disabled > span:focus,
+.pagination > .disabled > a,
+.pagination > .disabled > a:hover,
+.pagination > .disabled > a:focus {
+ color: #999;
+ cursor: not-allowed;
+ background-color: #fff;
+ border-color: #ddd;
+}
+.pagination-lg > li > a,
+.pagination-lg > li > span {
+ padding: 10px 16px;
+ font-size: 18px;
+}
+.pagination-lg > li:first-child > a,
+.pagination-lg > li:first-child > span {
+ border-top-left-radius: 6px;
+ border-bottom-left-radius: 6px;
+}
+.pagination-lg > li:last-child > a,
+.pagination-lg > li:last-child > span {
+ border-top-right-radius: 6px;
+ border-bottom-right-radius: 6px;
+}
+.pagination-sm > li > a,
+.pagination-sm > li > span {
+ padding: 5px 10px;
+ font-size: 12px;
+}
+.pagination-sm > li:first-child > a,
+.pagination-sm > li:first-child > span {
+ border-top-left-radius: 3px;
+ border-bottom-left-radius: 3px;
+}
+.pagination-sm > li:last-child > a,
+.pagination-sm > li:last-child > span {
+ border-top-right-radius: 3px;
+ border-bottom-right-radius: 3px;
+}
+.pager {
+ padding-left: 0;
+ margin: 20px 0;
+ text-align: center;
+ list-style: none;
+}
+.pager li {
+ display: inline;
+}
+.pager li > a,
+.pager li > span {
+ display: inline-block;
+ padding: 5px 14px;
+ background-color: #fff;
+ border: 1px solid #ddd;
+ border-radius: 15px;
+}
+.pager li > a:hover,
+.pager li > a:focus {
+ text-decoration: none;
+ background-color: #eee;
+}
+.pager .next > a,
+.pager .next > span {
+ float: right;
+}
+.pager .previous > a,
+.pager .previous > span {
+ float: left;
+}
+.pager .disabled > a,
+.pager .disabled > a:hover,
+.pager .disabled > a:focus,
+.pager .disabled > span {
+ color: #999;
+ cursor: not-allowed;
+ background-color: #fff;
+}
+.label {
+ display: inline;
+ padding: .2em .6em .3em;
+ font-size: 75%;
+ font-weight: bold;
+ line-height: 1;
+ color: #fff;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: baseline;
+ border-radius: .25em;
+}
+.label[href]:hover,
+.label[href]:focus {
+ color: #fff;
+ text-decoration: none;
+ cursor: pointer;
+}
+.label:empty {
+ display: none;
+}
+.btn .label {
+ position: relative;
+ top: -1px;
+}
+.label-default {
+ background-color: #999;
+}
+.label-default[href]:hover,
+.label-default[href]:focus {
+ background-color: #808080;
+}
+.label-primary {
+ background-color: #428bca;
+}
+.label-primary[href]:hover,
+.label-primary[href]:focus {
+ background-color: #3071a9;
+}
+.label-success {
+ background-color: #5cb85c;
+}
+.label-success[href]:hover,
+.label-success[href]:focus {
+ background-color: #449d44;
+}
+.label-info {
+ background-color: #5bc0de;
+}
+.label-info[href]:hover,
+.label-info[href]:focus {
+ background-color: #31b0d5;
+}
+.label-warning {
+ background-color: #f0ad4e;
+}
+.label-warning[href]:hover,
+.label-warning[href]:focus {
+ background-color: #ec971f;
+}
+.label-danger {
+ background-color: #d9534f;
+}
+.label-danger[href]:hover,
+.label-danger[href]:focus {
+ background-color: #c9302c;
+}
+.badge {
+ display: inline-block;
+ min-width: 10px;
+ padding: 3px 7px;
+ font-size: 12px;
+ font-weight: bold;
+ line-height: 1;
+ color: #fff;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: baseline;
+ background-color: #999;
+ border-radius: 10px;
+}
+.badge:empty {
+ display: none;
+}
+.btn .badge {
+ position: relative;
+ top: -1px;
+}
+.btn-xs .badge {
+ top: 0;
+ padding: 1px 5px;
+}
+a.badge:hover,
+a.badge:focus {
+ color: #fff;
+ text-decoration: none;
+ cursor: pointer;
+}
+a.list-group-item.active > .badge,
+.nav-pills > .active > a > .badge {
+ color: #428bca;
+ background-color: #fff;
+}
+.nav-pills > li > a > .badge {
+ margin-left: 3px;
+}
+.jumbotron {
+ padding: 30px;
+ margin-bottom: 30px;
+ color: inherit;
+ background-color: #eee;
+}
+.jumbotron h1,
+.jumbotron .h1 {
+ color: inherit;
+}
+.jumbotron p {
+ margin-bottom: 15px;
+ font-size: 21px;
+ font-weight: 200;
+}
+.container .jumbotron {
+ border-radius: 6px;
+}
+.jumbotron .container {
+ max-width: 100%;
+}
+@media screen and (min-width: 768px) {
+ .jumbotron {
+ padding-top: 48px;
+ padding-bottom: 48px;
+ }
+ .container .jumbotron {
+ padding-right: 60px;
+ padding-left: 60px;
+ }
+ .jumbotron h1,
+ .jumbotron .h1 {
+ font-size: 63px;
+ }
+}
+.thumbnail {
+ display: block;
+ padding: 4px;
+ margin-bottom: 20px;
+ line-height: 1.42857143;
+ background-color: #fff;
+ border: 1px solid #ddd;
+ border-radius: 4px;
+ -webkit-transition: all .2s ease-in-out;
+ transition: all .2s ease-in-out;
+}
+.thumbnail > img,
+.thumbnail a > img {
+ margin-right: auto;
+ margin-left: auto;
+}
+a.thumbnail:hover,
+a.thumbnail:focus,
+a.thumbnail.active {
+ border-color: #428bca;
+}
+.thumbnail .caption {
+ padding: 9px;
+ color: #333;
+}
+.alert {
+ padding: 15px;
+ margin-bottom: 20px;
+ border: 1px solid transparent;
+ border-radius: 4px;
+}
+.alert h4 {
+ margin-top: 0;
+ color: inherit;
+}
+.alert .alert-link {
+ font-weight: bold;
+}
+.alert > p,
+.alert > ul {
+ margin-bottom: 0;
+}
+.alert > p + p {
+ margin-top: 5px;
+}
+.alert-dismissable {
+ padding-right: 35px;
+}
+.alert-dismissable .close {
+ position: relative;
+ top: -2px;
+ right: -21px;
+ color: inherit;
+}
+.alert-success {
+ color: #3c763d;
+ background-color: #dff0d8;
+ border-color: #d6e9c6;
+}
+.alert-success hr {
+ border-top-color: #c9e2b3;
+}
+.alert-success .alert-link {
+ color: #2b542c;
+}
+.alert-info {
+ color: #31708f;
+ background-color: #d9edf7;
+ border-color: #bce8f1;
+}
+.alert-info hr {
+ border-top-color: #a6e1ec;
+}
+.alert-info .alert-link {
+ color: #245269;
+}
+.alert-warning {
+ color: #8a6d3b;
+ background-color: #fcf8e3;
+ border-color: #faebcc;
+}
+.alert-warning hr {
+ border-top-color: #f7e1b5;
+}
+.alert-warning .alert-link {
+ color: #66512c;
+}
+.alert-danger {
+ color: #a94442;
+ background-color: #f2dede;
+ border-color: #ebccd1;
+}
+.alert-danger hr {
+ border-top-color: #e4b9c0;
+}
+.alert-danger .alert-link {
+ color: #843534;
+}
+@-webkit-keyframes progress-bar-stripes {
+ from {
+ background-position: 40px 0;
+ }
+ to {
+ background-position: 0 0;
+ }
+}
+@keyframes progress-bar-stripes {
+ from {
+ background-position: 40px 0;
+ }
+ to {
+ background-position: 0 0;
+ }
+}
+.progress {
+ height: 20px;
+ margin-bottom: 20px;
+ overflow: hidden;
+ background-color: #f5f5f5;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
+}
+.progress-bar {
+ float: left;
+ width: 0;
+ height: 100%;
+ font-size: 12px;
+ line-height: 20px;
+ color: #fff;
+ text-align: center;
+ background-color: #428bca;
+ -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
+ -webkit-transition: width .6s ease;
+ transition: width .6s ease;
+}
+.progress-striped .progress-bar {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+ background-size: 40px 40px;
+}
+.progress.active .progress-bar {
+ -webkit-animation: progress-bar-stripes 2s linear infinite;
+ animation: progress-bar-stripes 2s linear infinite;
+}
+.progress-bar-success {
+ background-color: #5cb85c;
+}
+.progress-striped .progress-bar-success {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+}
+.progress-bar-info {
+ background-color: #5bc0de;
+}
+.progress-striped .progress-bar-info {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+}
+.progress-bar-warning {
+ background-color: #f0ad4e;
+}
+.progress-striped .progress-bar-warning {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+}
+.progress-bar-danger {
+ background-color: #d9534f;
+}
+.progress-striped .progress-bar-danger {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+}
+.media,
+.media-body {
+ overflow: hidden;
+ zoom: 1;
+}
+.media,
+.media .media {
+ margin-top: 15px;
+}
+.media:first-child {
+ margin-top: 0;
+}
+.media-object {
+ display: block;
+}
+.media-heading {
+ margin: 0 0 5px;
+}
+.media > .pull-left {
+ margin-right: 10px;
+}
+.media > .pull-right {
+ margin-left: 10px;
+}
+.media-list {
+ padding-left: 0;
+ list-style: none;
+}
+.list-group {
+ padding-left: 0;
+ margin-bottom: 20px;
+}
+.list-group-item {
+ position: relative;
+ display: block;
+ padding: 10px 15px;
+ margin-bottom: -1px;
+ background-color: #fff;
+ border: 1px solid #ddd;
+}
+.list-group-item:first-child {
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+}
+.list-group-item:last-child {
+ margin-bottom: 0;
+ border-bottom-right-radius: 4px;
+ border-bottom-left-radius: 4px;
+}
+.list-group-item > .badge {
+ float: right;
+}
+.list-group-item > .badge + .badge {
+ margin-right: 5px;
+}
+a.list-group-item {
+ color: #555;
+}
+a.list-group-item .list-group-item-heading {
+ color: #333;
+}
+a.list-group-item:hover,
+a.list-group-item:focus {
+ text-decoration: none;
+ background-color: #f5f5f5;
+}
+a.list-group-item.active,
+a.list-group-item.active:hover,
+a.list-group-item.active:focus {
+ z-index: 2;
+ color: #fff;
+ background-color: #428bca;
+ border-color: #428bca;
+}
+a.list-group-item.active .list-group-item-heading,
+a.list-group-item.active:hover .list-group-item-heading,
+a.list-group-item.active:focus .list-group-item-heading {
+ color: inherit;
+}
+a.list-group-item.active .list-group-item-text,
+a.list-group-item.active:hover .list-group-item-text,
+a.list-group-item.active:focus .list-group-item-text {
+ color: #e1edf7;
+}
+.list-group-item-success {
+ color: #3c763d;
+ background-color: #dff0d8;
+}
+a.list-group-item-success {
+ color: #3c763d;
+}
+a.list-group-item-success .list-group-item-heading {
+ color: inherit;
+}
+a.list-group-item-success:hover,
+a.list-group-item-success:focus {
+ color: #3c763d;
+ background-color: #d0e9c6;
+}
+a.list-group-item-success.active,
+a.list-group-item-success.active:hover,
+a.list-group-item-success.active:focus {
+ color: #fff;
+ background-color: #3c763d;
+ border-color: #3c763d;
+}
+.list-group-item-info {
+ color: #31708f;
+ background-color: #d9edf7;
+}
+a.list-group-item-info {
+ color: #31708f;
+}
+a.list-group-item-info .list-group-item-heading {
+ color: inherit;
+}
+a.list-group-item-info:hover,
+a.list-group-item-info:focus {
+ color: #31708f;
+ background-color: #c4e3f3;
+}
+a.list-group-item-info.active,
+a.list-group-item-info.active:hover,
+a.list-group-item-info.active:focus {
+ color: #fff;
+ background-color: #31708f;
+ border-color: #31708f;
+}
+.list-group-item-warning {
+ color: #8a6d3b;
+ background-color: #fcf8e3;
+}
+a.list-group-item-warning {
+ color: #8a6d3b;
+}
+a.list-group-item-warning .list-group-item-heading {
+ color: inherit;
+}
+a.list-group-item-warning:hover,
+a.list-group-item-warning:focus {
+ color: #8a6d3b;
+ background-color: #faf2cc;
+}
+a.list-group-item-warning.active,
+a.list-group-item-warning.active:hover,
+a.list-group-item-warning.active:focus {
+ color: #fff;
+ background-color: #8a6d3b;
+ border-color: #8a6d3b;
+}
+.list-group-item-danger {
+ color: #a94442;
+ background-color: #f2dede;
+}
+a.list-group-item-danger {
+ color: #a94442;
+}
+a.list-group-item-danger .list-group-item-heading {
+ color: inherit;
+}
+a.list-group-item-danger:hover,
+a.list-group-item-danger:focus {
+ color: #a94442;
+ background-color: #ebcccc;
+}
+a.list-group-item-danger.active,
+a.list-group-item-danger.active:hover,
+a.list-group-item-danger.active:focus {
+ color: #fff;
+ background-color: #a94442;
+ border-color: #a94442;
+}
+.list-group-item-heading {
+ margin-top: 0;
+ margin-bottom: 5px;
+}
+.list-group-item-text {
+ margin-bottom: 0;
+ line-height: 1.3;
+}
+.panel {
+ margin-bottom: 20px;
+ background-color: #fff;
+ border: 1px solid transparent;
+ border-radius: 4px;
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
+ box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
+}
+.panel-body {
+ padding: 15px;
+}
+.panel-heading {
+ padding: 10px 15px;
+ border-bottom: 1px solid transparent;
+ border-top-left-radius: 3px;
+ border-top-right-radius: 3px;
+}
+.panel-heading > .dropdown .dropdown-toggle {
+ color: inherit;
+}
+.panel-title {
+ margin-top: 0;
+ margin-bottom: 0;
+ font-size: 16px;
+ color: inherit;
+}
+.panel-title > a {
+ color: inherit;
+}
+.panel-footer {
+ padding: 10px 15px;
+ background-color: #f5f5f5;
+ border-top: 1px solid #ddd;
+ border-bottom-right-radius: 3px;
+ border-bottom-left-radius: 3px;
+}
+.panel > .list-group {
+ margin-bottom: 0;
+}
+.panel > .list-group .list-group-item {
+ border-width: 1px 0;
+ border-radius: 0;
+}
+.panel > .list-group:first-child .list-group-item:first-child {
+ border-top: 0;
+ border-top-left-radius: 3px;
+ border-top-right-radius: 3px;
+}
+.panel > .list-group:last-child .list-group-item:last-child {
+ border-bottom: 0;
+ border-bottom-right-radius: 3px;
+ border-bottom-left-radius: 3px;
+}
+.panel-heading + .list-group .list-group-item:first-child {
+ border-top-width: 0;
+}
+.panel > .table,
+.panel > .table-responsive > .table {
+ margin-bottom: 0;
+}
+.panel > .table:first-child,
+.panel > .table-responsive:first-child > .table:first-child {
+ border-top-left-radius: 3px;
+ border-top-right-radius: 3px;
+}
+.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,
+.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,
+.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,
+.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,
+.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,
+.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,
+.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,
+.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {
+ border-top-left-radius: 3px;
+}
+.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,
+.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,
+.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,
+.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,
+.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,
+.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,
+.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,
+.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {
+ border-top-right-radius: 3px;
+}
+.panel > .table:last-child,
+.panel > .table-responsive:last-child > .table:last-child {
+ border-bottom-right-radius: 3px;
+ border-bottom-left-radius: 3px;
+}
+.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,
+.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,
+.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
+.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
+.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,
+.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,
+.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,
+.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {
+ border-bottom-left-radius: 3px;
+}
+.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,
+.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,
+.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
+.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
+.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,
+.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,
+.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,
+.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {
+ border-bottom-right-radius: 3px;
+}
+.panel > .panel-body + .table,
+.panel > .panel-body + .table-responsive {
+ border-top: 1px solid #ddd;
+}
+.panel > .table > tbody:first-child > tr:first-child th,
+.panel > .table > tbody:first-child > tr:first-child td {
+ border-top: 0;
+}
+.panel > .table-bordered,
+.panel > .table-responsive > .table-bordered {
+ border: 0;
+}
+.panel > .table-bordered > thead > tr > th:first-child,
+.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,
+.panel > .table-bordered > tbody > tr > th:first-child,
+.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,
+.panel > .table-bordered > tfoot > tr > th:first-child,
+.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,
+.panel > .table-bordered > thead > tr > td:first-child,
+.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,
+.panel > .table-bordered > tbody > tr > td:first-child,
+.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,
+.panel > .table-bordered > tfoot > tr > td:first-child,
+.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {
+ border-left: 0;
+}
+.panel > .table-bordered > thead > tr > th:last-child,
+.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,
+.panel > .table-bordered > tbody > tr > th:last-child,
+.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,
+.panel > .table-bordered > tfoot > tr > th:last-child,
+.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,
+.panel > .table-bordered > thead > tr > td:last-child,
+.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,
+.panel > .table-bordered > tbody > tr > td:last-child,
+.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,
+.panel > .table-bordered > tfoot > tr > td:last-child,
+.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {
+ border-right: 0;
+}
+.panel > .table-bordered > thead > tr:first-child > td,
+.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,
+.panel > .table-bordered > tbody > tr:first-child > td,
+.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,
+.panel > .table-bordered > thead > tr:first-child > th,
+.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,
+.panel > .table-bordered > tbody > tr:first-child > th,
+.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {
+ border-bottom: 0;
+}
+.panel > .table-bordered > tbody > tr:last-child > td,
+.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,
+.panel > .table-bordered > tfoot > tr:last-child > td,
+.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,
+.panel > .table-bordered > tbody > tr:last-child > th,
+.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,
+.panel > .table-bordered > tfoot > tr:last-child > th,
+.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {
+ border-bottom: 0;
+}
+.panel > .table-responsive {
+ margin-bottom: 0;
+ border: 0;
+}
+.panel-group {
+ margin-bottom: 20px;
+}
+.panel-group .panel {
+ margin-bottom: 0;
+ overflow: hidden;
+ border-radius: 4px;
+}
+.panel-group .panel + .panel {
+ margin-top: 5px;
+}
+.panel-group .panel-heading {
+ border-bottom: 0;
+}
+.panel-group .panel-heading + .panel-collapse .panel-body {
+ border-top: 1px solid #ddd;
+}
+.panel-group .panel-footer {
+ border-top: 0;
+}
+.panel-group .panel-footer + .panel-collapse .panel-body {
+ border-bottom: 1px solid #ddd;
+}
+.panel-default {
+ border-color: #ddd;
+}
+.panel-default > .panel-heading {
+ color: #333;
+ background-color: #f5f5f5;
+ border-color: #ddd;
+}
+.panel-default > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #ddd;
+}
+.panel-default > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #ddd;
+}
+.panel-primary {
+ border-color: #428bca;
+}
+.panel-primary > .panel-heading {
+ color: #fff;
+ background-color: #428bca;
+ border-color: #428bca;
+}
+.panel-primary > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #428bca;
+}
+.panel-primary > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #428bca;
+}
+.panel-success {
+ border-color: #d6e9c6;
+}
+.panel-success > .panel-heading {
+ color: #3c763d;
+ background-color: #dff0d8;
+ border-color: #d6e9c6;
+}
+.panel-success > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #d6e9c6;
+}
+.panel-success > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #d6e9c6;
+}
+.panel-info {
+ border-color: #bce8f1;
+}
+.panel-info > .panel-heading {
+ color: #31708f;
+ background-color: #d9edf7;
+ border-color: #bce8f1;
+}
+.panel-info > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #bce8f1;
+}
+.panel-info > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #bce8f1;
+}
+.panel-warning {
+ border-color: #faebcc;
+}
+.panel-warning > .panel-heading {
+ color: #8a6d3b;
+ background-color: #fcf8e3;
+ border-color: #faebcc;
+}
+.panel-warning > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #faebcc;
+}
+.panel-warning > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #faebcc;
+}
+.panel-danger {
+ border-color: #ebccd1;
+}
+.panel-danger > .panel-heading {
+ color: #a94442;
+ background-color: #f2dede;
+ border-color: #ebccd1;
+}
+.panel-danger > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #ebccd1;
+}
+.panel-danger > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #ebccd1;
+}
+.well {
+ min-height: 20px;
+ padding: 19px;
+ margin-bottom: 20px;
+ background-color: #f5f5f5;
+ border: 1px solid #e3e3e3;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
+}
+.well blockquote {
+ border-color: #ddd;
+ border-color: rgba(0, 0, 0, .15);
+}
+.well-lg {
+ padding: 24px;
+ border-radius: 6px;
+}
+.well-sm {
+ padding: 9px;
+ border-radius: 3px;
+}
+.close {
+ float: right;
+ font-size: 21px;
+ font-weight: bold;
+ line-height: 1;
+ color: #000;
+ text-shadow: 0 1px 0 #fff;
+ filter: alpha(opacity=20);
+ opacity: .2;
+}
+.close:hover,
+.close:focus {
+ color: #000;
+ text-decoration: none;
+ cursor: pointer;
+ filter: alpha(opacity=50);
+ opacity: .5;
+}
+button.close {
+ -webkit-appearance: none;
+ padding: 0;
+ cursor: pointer;
+ background: transparent;
+ border: 0;
+}
+.modal-open {
+ overflow: hidden;
+}
+.modal {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 1050;
+ display: none;
+ overflow: auto;
+ overflow-y: scroll;
+ -webkit-overflow-scrolling: touch;
+ outline: 0;
+}
+.modal.fade .modal-dialog {
+ -webkit-transition: -webkit-transform .3s ease-out;
+ -moz-transition: -moz-transform .3s ease-out;
+ -o-transition: -o-transform .3s ease-out;
+ transition: transform .3s ease-out;
+ -webkit-transform: translate(0, -25%);
+ -ms-transform: translate(0, -25%);
+ transform: translate(0, -25%);
+}
+.modal.in .modal-dialog {
+ -webkit-transform: translate(0, 0);
+ -ms-transform: translate(0, 0);
+ transform: translate(0, 0);
+}
+.modal-dialog {
+ position: relative;
+ width: auto;
+ margin: 10px;
+}
+.modal-content {
+ position: relative;
+ background-color: #fff;
+ background-clip: padding-box;
+ border: 1px solid #999;
+ border: 1px solid rgba(0, 0, 0, .2);
+ border-radius: 6px;
+ outline: none;
+ -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
+ box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
+}
+.modal-backdrop {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 1040;
+ /*background-color: #000;*/
+ background-color: #fff;
+}
+.modal-backdrop.fade {
+ filter: alpha(opacity=0);
+ opacity: 0;
+}
+.modal-backdrop.in {
+ filter: alpha(opacity=50);
+ opacity: .5;
+}
+.modal-header {
+ min-height: 16.42857143px;
+ padding: 15px;
+ border-bottom: 1px solid #e5e5e5;
+}
+.modal-header .close {
+ margin-top: -2px;
+}
+.modal-title {
+ margin: 0;
+ line-height: 1.42857143;
+}
+.modal-body {
+ position: relative;
+ padding: 20px;
+}
+.modal-footer {
+ padding: 19px 20px 20px;
+ margin-top: 15px;
+ text-align: right;
+ border-top: 1px solid #e5e5e5;
+}
+.modal-footer .btn + .btn {
+ margin-bottom: 0;
+ margin-left: 5px;
+}
+.modal-footer .btn-group .btn + .btn {
+ margin-left: -1px;
+}
+.modal-footer .btn-block + .btn-block {
+ margin-left: 0;
+}
+@media (min-width: 768px) {
+ .modal-dialog {
+ width: 600px;
+ margin: 30px auto;
+ }
+ .modal-content {
+ -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
+ box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
+ }
+ .modal-sm {
+ width: 300px;
+ }
+}
+@media (min-width: 992px) {
+ .modal-lg {
+ width: 900px;
+ }
+}
+.tooltip {
+ position: absolute;
+ z-index: 1030;
+ display: block;
+ font-size: 12px;
+ line-height: 1.4;
+ visibility: visible;
+ filter: alpha(opacity=0);
+ opacity: 0;
+}
+.tooltip.in {
+ filter: alpha(opacity=90);
+ opacity: .9;
+}
+.tooltip.top {
+ padding: 5px 0;
+ margin-top: -3px;
+}
+.tooltip.right {
+ padding: 0 5px;
+ margin-left: 3px;
+}
+.tooltip.bottom {
+ padding: 5px 0;
+ margin-top: 3px;
+}
+.tooltip.left {
+ padding: 0 5px;
+ margin-left: -3px;
+}
+.tooltip-inner {
+ max-width: 200px;
+ padding: 3px 8px;
+ color: #fff;
+ text-align: center;
+ text-decoration: none;
+ background-color: #000;
+ border-radius: 4px;
+}
+.tooltip-arrow {
+ position: absolute;
+ width: 0;
+ height: 0;
+ border-color: transparent;
+ border-style: solid;
+}
+.tooltip.top .tooltip-arrow {
+ bottom: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-width: 5px 5px 0;
+ border-top-color: #000;
+}
+.tooltip.top-left .tooltip-arrow {
+ bottom: 0;
+ left: 5px;
+ border-width: 5px 5px 0;
+ border-top-color: #000;
+}
+.tooltip.top-right .tooltip-arrow {
+ right: 5px;
+ bottom: 0;
+ border-width: 5px 5px 0;
+ border-top-color: #000;
+}
+.tooltip.right .tooltip-arrow {
+ top: 50%;
+ left: 0;
+ margin-top: -5px;
+ border-width: 5px 5px 5px 0;
+ border-right-color: #000;
+}
+.tooltip.left .tooltip-arrow {
+ top: 50%;
+ right: 0;
+ margin-top: -5px;
+ border-width: 5px 0 5px 5px;
+ border-left-color: #000;
+}
+.tooltip.bottom .tooltip-arrow {
+ top: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-width: 0 5px 5px;
+ border-bottom-color: #000;
+}
+.tooltip.bottom-left .tooltip-arrow {
+ top: 0;
+ left: 5px;
+ border-width: 0 5px 5px;
+ border-bottom-color: #000;
+}
+.tooltip.bottom-right .tooltip-arrow {
+ top: 0;
+ right: 5px;
+ border-width: 0 5px 5px;
+ border-bottom-color: #000;
+}
+.popover {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 1010;
+ display: none;
+ max-width: 276px;
+ padding: 1px;
+ text-align: left;
+ white-space: normal;
+ background-color: #fff;
+ background-clip: padding-box;
+ border: 1px solid #ccc;
+ border: 1px solid rgba(0, 0, 0, .2);
+ border-radius: 6px;
+ -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
+ box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
+}
+.popover.top {
+ margin-top: -10px;
+}
+.popover.right {
+ margin-left: 10px;
+}
+.popover.bottom {
+ margin-top: 10px;
+}
+.popover.left {
+ margin-left: -10px;
+}
+.popover-title {
+ padding: 8px 14px;
+ margin: 0;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: 18px;
+ background-color: #f7f7f7;
+ border-bottom: 1px solid #ebebeb;
+ border-radius: 5px 5px 0 0;
+}
+.popover-content {
+ padding: 9px 14px;
+}
+.popover > .arrow,
+.popover > .arrow:after {
+ position: absolute;
+ display: block;
+ width: 0;
+ height: 0;
+ border-color: transparent;
+ border-style: solid;
+}
+.popover > .arrow {
+ border-width: 11px;
+}
+.popover > .arrow:after {
+ content: "";
+ border-width: 10px;
+}
+.popover.top > .arrow {
+ bottom: -11px;
+ left: 50%;
+ margin-left: -11px;
+ border-top-color: #999;
+ border-top-color: rgba(0, 0, 0, .25);
+ border-bottom-width: 0;
+}
+.popover.top > .arrow:after {
+ bottom: 1px;
+ margin-left: -10px;
+ content: " ";
+ border-top-color: #fff;
+ border-bottom-width: 0;
+}
+.popover.right > .arrow {
+ top: 50%;
+ left: -11px;
+ margin-top: -11px;
+ border-right-color: #999;
+ border-right-color: rgba(0, 0, 0, .25);
+ border-left-width: 0;
+}
+.popover.right > .arrow:after {
+ bottom: -10px;
+ left: 1px;
+ content: " ";
+ border-right-color: #fff;
+ border-left-width: 0;
+}
+.popover.bottom > .arrow {
+ top: -11px;
+ left: 50%;
+ margin-left: -11px;
+ border-top-width: 0;
+ border-bottom-color: #999;
+ border-bottom-color: rgba(0, 0, 0, .25);
+}
+.popover.bottom > .arrow:after {
+ top: 1px;
+ margin-left: -10px;
+ content: " ";
+ border-top-width: 0;
+ border-bottom-color: #fff;
+}
+.popover.left > .arrow {
+ top: 50%;
+ right: -11px;
+ margin-top: -11px;
+ border-right-width: 0;
+ border-left-color: #999;
+ border-left-color: rgba(0, 0, 0, .25);
+}
+.popover.left > .arrow:after {
+ right: 1px;
+ bottom: -10px;
+ content: " ";
+ border-right-width: 0;
+ border-left-color: #fff;
+}
+.carousel {
+ position: relative;
+}
+.carousel-inner {
+ position: relative;
+ width: 100%;
+ overflow: hidden;
+}
+.carousel-inner > .item {
+ position: relative;
+ display: none;
+ -webkit-transition: .6s ease-in-out left;
+ transition: .6s ease-in-out left;
+}
+.carousel-inner > .item > img,
+.carousel-inner > .item > a > img {
+ line-height: 1;
+}
+.carousel-inner > .active,
+.carousel-inner > .next,
+.carousel-inner > .prev {
+ display: block;
+}
+.carousel-inner > .active {
+ left: 0;
+}
+.carousel-inner > .next,
+.carousel-inner > .prev {
+ position: absolute;
+ top: 0;
+ width: 100%;
+}
+.carousel-inner > .next {
+ left: 100%;
+}
+.carousel-inner > .prev {
+ left: -100%;
+}
+.carousel-inner > .next.left,
+.carousel-inner > .prev.right {
+ left: 0;
+}
+.carousel-inner > .active.left {
+ left: -100%;
+}
+.carousel-inner > .active.right {
+ left: 100%;
+}
+.carousel-control {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ width: 15%;
+ font-size: 20px;
+ color: #fff;
+ text-align: center;
+ text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
+ filter: alpha(opacity=50);
+ opacity: .5;
+}
+.carousel-control.left {
+ background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, .5) 0%), color-stop(rgba(0, 0, 0, .0001) 100%));
+ background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);
+ background-repeat: repeat-x;
+}
+.carousel-control.right {
+ right: 0;
+ left: auto;
+ background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, .0001) 0%), color-stop(rgba(0, 0, 0, .5) 100%));
+ background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);
+ background-repeat: repeat-x;
+}
+.carousel-control:hover,
+.carousel-control:focus {
+ color: #fff;
+ text-decoration: none;
+ filter: alpha(opacity=90);
+ outline: none;
+ opacity: .9;
+}
+.carousel-control .icon-prev,
+.carousel-control .icon-next,
+.carousel-control .glyphicon-chevron-left,
+.carousel-control .glyphicon-chevron-right {
+ position: absolute;
+ top: 50%;
+ z-index: 5;
+ display: inline-block;
+}
+.carousel-control .icon-prev,
+.carousel-control .glyphicon-chevron-left {
+ left: 50%;
+}
+.carousel-control .icon-next,
+.carousel-control .glyphicon-chevron-right {
+ right: 50%;
+}
+.carousel-control .icon-prev,
+.carousel-control .icon-next {
+ width: 20px;
+ height: 20px;
+ margin-top: -10px;
+ margin-left: -10px;
+ font-family: serif;
+}
+.carousel-control .icon-prev:before {
+ content: '\2039';
+}
+.carousel-control .icon-next:before {
+ content: '\203a';
+}
+.carousel-indicators {
+ position: absolute;
+ bottom: 10px;
+ left: 50%;
+ z-index: 15;
+ width: 60%;
+ padding-left: 0;
+ margin-left: -30%;
+ text-align: center;
+ list-style: none;
+}
+.carousel-indicators li {
+ display: inline-block;
+ width: 10px;
+ height: 10px;
+ margin: 1px;
+ text-indent: -999px;
+ cursor: pointer;
+ background-color: #000 \9;
+ background-color: rgba(0, 0, 0, 0);
+ border: 1px solid #fff;
+ border-radius: 10px;
+}
+.carousel-indicators .active {
+ width: 12px;
+ height: 12px;
+ margin: 0;
+ background-color: #fff;
+}
+.carousel-caption {
+ position: absolute;
+ right: 15%;
+ bottom: 20px;
+ left: 15%;
+ z-index: 10;
+ padding-top: 20px;
+ padding-bottom: 20px;
+ color: #fff;
+ text-align: center;
+ text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
+}
+.carousel-caption .btn {
+ text-shadow: none;
+}
+@media screen and (min-width: 768px) {
+ .carousel-control .glyphicon-chevron-left,
+ .carousel-control .glyphicon-chevron-right,
+ .carousel-control .icon-prev,
+ .carousel-control .icon-next {
+ width: 30px;
+ height: 30px;
+ margin-top: -15px;
+ margin-left: -15px;
+ font-size: 30px;
+ }
+ .carousel-caption {
+ right: 20%;
+ left: 20%;
+ padding-bottom: 30px;
+ }
+ .carousel-indicators {
+ bottom: 20px;
+ }
+}
+.clearfix:before,
+.clearfix:after,
+.container:before,
+.container:after,
+.container-fluid:before,
+.container-fluid:after,
+.row:before,
+.row:after,
+.form-horizontal .form-group:before,
+.form-horizontal .form-group:after,
+.btn-toolbar:before,
+.btn-toolbar:after,
+.btn-group-vertical > .btn-group:before,
+.btn-group-vertical > .btn-group:after,
+.nav:before,
+.nav:after,
+.navbar:before,
+.navbar:after,
+.navbar-header:before,
+.navbar-header:after,
+.navbar-collapse:before,
+.navbar-collapse:after,
+.pager:before,
+.pager:after,
+.panel-body:before,
+.panel-body:after,
+.modal-footer:before,
+.modal-footer:after {
+ display: table;
+ content: " ";
+}
+.clearfix:after,
+.container:after,
+.container-fluid:after,
+.row:after,
+.form-horizontal .form-group:after,
+.btn-toolbar:after,
+.btn-group-vertical > .btn-group:after,
+.nav:after,
+.navbar:after,
+.navbar-header:after,
+.navbar-collapse:after,
+.pager:after,
+.panel-body:after,
+.modal-footer:after {
+ clear: both;
+}
+.center-block {
+ display: block;
+ margin-right: auto;
+ margin-left: auto;
+}
+.pull-right {
+ float: right !important;
+}
+.pull-left {
+ float: left !important;
+}
+.hide {
+ display: none !important;
+}
+.show {
+ display: block !important;
+}
+.invisible {
+ visibility: hidden;
+}
+.text-hide {
+ font: 0/0 a;
+ color: transparent;
+ text-shadow: none;
+ background-color: transparent;
+ border: 0;
+}
+.hidden {
+ display: none !important;
+ visibility: hidden !important;
+}
+.affix {
+ position: fixed;
+}
+@-ms-viewport {
+ width: device-width;
+}
+.visible-xs,
+.visible-sm,
+.visible-md,
+.visible-lg {
+ display: none !important;
+}
+@media (max-width: 767px) {
+ .visible-xs {
+ display: block !important;
+ }
+ table.visible-xs {
+ display: table;
+ }
+ tr.visible-xs {
+ display: table-row !important;
+ }
+ th.visible-xs,
+ td.visible-xs {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .visible-sm {
+ display: block !important;
+ }
+ table.visible-sm {
+ display: table;
+ }
+ tr.visible-sm {
+ display: table-row !important;
+ }
+ th.visible-sm,
+ td.visible-sm {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .visible-md {
+ display: block !important;
+ }
+ table.visible-md {
+ display: table;
+ }
+ tr.visible-md {
+ display: table-row !important;
+ }
+ th.visible-md,
+ td.visible-md {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 1200px) {
+ .visible-lg {
+ display: block !important;
+ }
+ table.visible-lg {
+ display: table;
+ }
+ tr.visible-lg {
+ display: table-row !important;
+ }
+ th.visible-lg,
+ td.visible-lg {
+ display: table-cell !important;
+ }
+}
+@media (max-width: 767px) {
+ .hidden-xs {
+ display: none !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .hidden-sm {
+ display: none !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .hidden-md {
+ display: none !important;
+ }
+}
+@media (min-width: 1200px) {
+ .hidden-lg {
+ display: none !important;
+ }
+}
+.visible-print {
+ display: none !important;
+}
+@media print {
+ .visible-print {
+ display: block !important;
+ }
+ table.visible-print {
+ display: table;
+ }
+ tr.visible-print {
+ display: table-row !important;
+ }
+ th.visible-print,
+ td.visible-print {
+ display: table-cell !important;
+ }
+}
+@media print {
+ .hidden-print {
+ display: none !important;
+ }
+}
+/*# sourceMappingURL=bootstrap.css.map */
diff --git a/common/src/main/webapp/thirdparty/bootstrap/css/bootstrap.min.css b/common/src/main/webapp/thirdparty/bootstrap/css/bootstrap.min.css
new file mode 100644
index 0000000..679272d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/bootstrap/css/bootstrap.min.css
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap v3.1.1 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+/*! normalize.css v3.0.0 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}@media print{*{text-shadow:none!important;color:#000!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#999}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-muted{color:#999}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#999}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}blockquote:before,blockquote:after{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;white-space:nowrap;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:0}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:0}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:0}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:0}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:0}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:0}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:0}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:0}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{max-width:100%;background-color:transparent}th{text-align:left}.table{width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{position:static;float:none;display:table-column}table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}@media (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd;-webkit-overflow-scrolling:touch}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}input[type=date]{line-height:34px}.form-group{margin-bottom:15px}.radio,.checkbox{display:block;min-height:20px;margin-top:10px;margin-bottom:10px;padding-left:20px}.radio label,.checkbox label{display:inline;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{float:left;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],.radio[disabled],.radio-inline[disabled],.checkbox[disabled],.checkbox-inline[disabled],fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox],fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}textarea.input-lg,select[multiple].input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.has-feedback .form-control-feedback{position:absolute;top:25px;right:0;display:block;width:34px;height:34px;line-height:34px;text-align:center}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.form-control-static{margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{float:none;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.form-horizontal .form-control-static{padding-top:7px}@media (min-width:768px){.form-horizontal .control-label{text-align:right}}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#999;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#428bca}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#999}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}[data-toggle=buttons]>.btn>input[type=radio],[data-toggle=buttons]>.btn>input[type=checkbox]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#999;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{max-height:340px;overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-left:0;padding-right:0}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{margin-left:-15px;margin-right:-15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin-top:8px;margin-bottom:8px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{float:none;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{background-color:#e7e7e7;color:#555}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a{color:#999}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{background-color:#080808;color:#fff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#999}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.42857143;text-decoration:none;color:#428bca;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca;cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#999;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:20px 0;list-style:none;text-align:center}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;background-color:#fff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.label[href]:hover,.label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#999}.label-default[href]:hover,.label-default[href]:focus{background-color:gray}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;color:#fff;line-height:1;vertical-align:baseline;white-space:nowrap;text-align:center;background-color:#999;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-left:60px;padding-right:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-left:auto;margin-right:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{text-decoration:none;background-color:#f5f5f5}a.list-group-item.active,a.list-group-item.active:hover,a.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}a.list-group-item.active .list-group-item-heading,a.list-group-item.active:hover .list-group-item-heading,a.list-group-item.active:focus .list-group-item-heading{color:inherit}a.list-group-item.active .list-group-item-text,a.list-group-item.active:hover .list-group-item-text,a.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px;overflow:hidden}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse .panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#428bca}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#d6e9c6}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#bce8f1}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#faebcc}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#ebccd1}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ebccd1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:auto;overflow-y:scroll;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.42857143px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:20px}.modal-footer{margin-top:15px;padding:19px 20px 20px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:12px;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;right:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-control.left{background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.5) 0),color-stop(rgba(0,0,0,.0001) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.0001) 0),color-stop(rgba(0,0,0,.5) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:hover,.carousel-control:focus{outline:0;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0)}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#fff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;margin-left:-15px;font-size:30px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{content:" ";display:table}.clearfix:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}}@media print{.hidden-print{display:none!important}} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/bootstrap/fonts/glyphicons-halflings-regular.eot b/common/src/main/webapp/thirdparty/bootstrap/fonts/glyphicons-halflings-regular.eot
new file mode 100644
index 0000000..b93a495
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/bootstrap/fonts/glyphicons-halflings-regular.eot
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/bootstrap/fonts/glyphicons-halflings-regular.svg b/common/src/main/webapp/thirdparty/bootstrap/fonts/glyphicons-halflings-regular.svg
new file mode 100644
index 0000000..94fb549
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/bootstrap/fonts/glyphicons-halflings-regular.svg
@@ -0,0 +1,288 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="glyphicons_halflingsregular" horiz-adv-x="1200" >
+<font-face units-per-em="1200" ascent="960" descent="-240" />
+<missing-glyph horiz-adv-x="500" />
+<glyph horiz-adv-x="0" />
+<glyph horiz-adv-x="400" />
+<glyph unicode=" " />
+<glyph unicode="*" d="M600 1100q15 0 34 -1.5t30 -3.5l11 -1q10 -2 17.5 -10.5t7.5 -18.5v-224l158 158q7 7 18 8t19 -6l106 -106q7 -8 6 -19t-8 -18l-158 -158h224q10 0 18.5 -7.5t10.5 -17.5q6 -41 6 -75q0 -15 -1.5 -34t-3.5 -30l-1 -11q-2 -10 -10.5 -17.5t-18.5 -7.5h-224l158 -158 q7 -7 8 -18t-6 -19l-106 -106q-8 -7 -19 -6t-18 8l-158 158v-224q0 -10 -7.5 -18.5t-17.5 -10.5q-41 -6 -75 -6q-15 0 -34 1.5t-30 3.5l-11 1q-10 2 -17.5 10.5t-7.5 18.5v224l-158 -158q-7 -7 -18 -8t-19 6l-106 106q-7 8 -6 19t8 18l158 158h-224q-10 0 -18.5 7.5 t-10.5 17.5q-6 41 -6 75q0 15 1.5 34t3.5 30l1 11q2 10 10.5 17.5t18.5 7.5h224l-158 158q-7 7 -8 18t6 19l106 106q8 7 19 6t18 -8l158 -158v224q0 10 7.5 18.5t17.5 10.5q41 6 75 6z" />
+<glyph unicode="+" d="M450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-350h350q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-350v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v350h-350q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5 h350v350q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xa0;" />
+<glyph unicode="&#xa5;" d="M825 1100h250q10 0 12.5 -5t-5.5 -13l-364 -364q-6 -6 -11 -18h268q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-100h275q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-174q0 -11 -7.5 -18.5t-18.5 -7.5h-148q-11 0 -18.5 7.5t-7.5 18.5v174 h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h125v100h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h118q-5 12 -11 18l-364 364q-8 8 -5.5 13t12.5 5h250q25 0 43 -18l164 -164q8 -8 18 -8t18 8l164 164q18 18 43 18z" />
+<glyph unicode="&#x2000;" horiz-adv-x="650" />
+<glyph unicode="&#x2001;" horiz-adv-x="1300" />
+<glyph unicode="&#x2002;" horiz-adv-x="650" />
+<glyph unicode="&#x2003;" horiz-adv-x="1300" />
+<glyph unicode="&#x2004;" horiz-adv-x="433" />
+<glyph unicode="&#x2005;" horiz-adv-x="325" />
+<glyph unicode="&#x2006;" horiz-adv-x="216" />
+<glyph unicode="&#x2007;" horiz-adv-x="216" />
+<glyph unicode="&#x2008;" horiz-adv-x="162" />
+<glyph unicode="&#x2009;" horiz-adv-x="260" />
+<glyph unicode="&#x200a;" horiz-adv-x="72" />
+<glyph unicode="&#x202f;" horiz-adv-x="260" />
+<glyph unicode="&#x205f;" horiz-adv-x="325" />
+<glyph unicode="&#x20ac;" d="M744 1198q242 0 354 -189q60 -104 66 -209h-181q0 45 -17.5 82.5t-43.5 61.5t-58 40.5t-60.5 24t-51.5 7.5q-19 0 -40.5 -5.5t-49.5 -20.5t-53 -38t-49 -62.5t-39 -89.5h379l-100 -100h-300q-6 -50 -6 -100h406l-100 -100h-300q9 -74 33 -132t52.5 -91t61.5 -54.5t59 -29 t47 -7.5q22 0 50.5 7.5t60.5 24.5t58 41t43.5 61t17.5 80h174q-30 -171 -128 -278q-107 -117 -274 -117q-206 0 -324 158q-36 48 -69 133t-45 204h-217l100 100h112q1 47 6 100h-218l100 100h134q20 87 51 153.5t62 103.5q117 141 297 141z" />
+<glyph unicode="&#x20bd;" d="M428 1200h350q67 0 120 -13t86 -31t57 -49.5t35 -56.5t17 -64.5t6.5 -60.5t0.5 -57v-16.5v-16.5q0 -36 -0.5 -57t-6.5 -61t-17 -65t-35 -57t-57 -50.5t-86 -31.5t-120 -13h-178l-2 -100h288q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-138v-175q0 -11 -5.5 -18 t-15.5 -7h-149q-10 0 -17.5 7.5t-7.5 17.5v175h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v100h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v475q0 10 7.5 17.5t17.5 7.5zM600 1000v-300h203q64 0 86.5 33t22.5 119q0 84 -22.5 116t-86.5 32h-203z" />
+<glyph unicode="&#x2212;" d="M250 700h800q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#x231b;" d="M1000 1200v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-50v-100q0 -91 -49.5 -165.5t-130.5 -109.5q81 -35 130.5 -109.5t49.5 -165.5v-150h50q21 0 35.5 -14.5t14.5 -35.5v-150h-800v150q0 21 14.5 35.5t35.5 14.5h50v150q0 91 49.5 165.5t130.5 109.5q-81 35 -130.5 109.5 t-49.5 165.5v100h-50q-21 0 -35.5 14.5t-14.5 35.5v150h800zM400 1000v-100q0 -60 32.5 -109.5t87.5 -73.5q28 -12 44 -37t16 -55t-16 -55t-44 -37q-55 -24 -87.5 -73.5t-32.5 -109.5v-150h400v150q0 60 -32.5 109.5t-87.5 73.5q-28 12 -44 37t-16 55t16 55t44 37 q55 24 87.5 73.5t32.5 109.5v100h-400z" />
+<glyph unicode="&#x25fc;" horiz-adv-x="500" d="M0 0z" />
+<glyph unicode="&#x2601;" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -206.5q0 -121 -85 -207.5t-205 -86.5h-750q-79 0 -135.5 57t-56.5 137q0 69 42.5 122.5t108.5 67.5q-2 12 -2 37q0 153 108 260.5t260 107.5z" />
+<glyph unicode="&#x26fa;" d="M774 1193.5q16 -9.5 20.5 -27t-5.5 -33.5l-136 -187l467 -746h30q20 0 35 -18.5t15 -39.5v-42h-1200v42q0 21 15 39.5t35 18.5h30l468 746l-135 183q-10 16 -5.5 34t20.5 28t34 5.5t28 -20.5l111 -148l112 150q9 16 27 20.5t34 -5zM600 200h377l-182 112l-195 534v-646z " />
+<glyph unicode="&#x2709;" d="M25 1100h1150q10 0 12.5 -5t-5.5 -13l-564 -567q-8 -8 -18 -8t-18 8l-564 567q-8 8 -5.5 13t12.5 5zM18 882l264 -264q8 -8 8 -18t-8 -18l-264 -264q-8 -8 -13 -5.5t-5 12.5v550q0 10 5 12.5t13 -5.5zM918 618l264 264q8 8 13 5.5t5 -12.5v-550q0 -10 -5 -12.5t-13 5.5 l-264 264q-8 8 -8 18t8 18zM818 482l364 -364q8 -8 5.5 -13t-12.5 -5h-1150q-10 0 -12.5 5t5.5 13l364 364q8 8 18 8t18 -8l164 -164q8 -8 18 -8t18 8l164 164q8 8 18 8t18 -8z" />
+<glyph unicode="&#x270f;" d="M1011 1210q19 0 33 -13l153 -153q13 -14 13 -33t-13 -33l-99 -92l-214 214l95 96q13 14 32 14zM1013 800l-615 -614l-214 214l614 614zM317 96l-333 -112l110 335z" />
+<glyph unicode="&#xe001;" d="M700 650v-550h250q21 0 35.5 -14.5t14.5 -35.5v-50h-800v50q0 21 14.5 35.5t35.5 14.5h250v550l-500 550h1200z" />
+<glyph unicode="&#xe002;" d="M368 1017l645 163q39 15 63 0t24 -49v-831q0 -55 -41.5 -95.5t-111.5 -63.5q-79 -25 -147 -4.5t-86 75t25.5 111.5t122.5 82q72 24 138 8v521l-600 -155v-606q0 -42 -44 -90t-109 -69q-79 -26 -147 -5.5t-86 75.5t25.5 111.5t122.5 82.5q72 24 138 7v639q0 38 14.5 59 t53.5 34z" />
+<glyph unicode="&#xe003;" d="M500 1191q100 0 191 -39t156.5 -104.5t104.5 -156.5t39 -191l-1 -2l1 -5q0 -141 -78 -262l275 -274q23 -26 22.5 -44.5t-22.5 -42.5l-59 -58q-26 -20 -46.5 -20t-39.5 20l-275 274q-119 -77 -261 -77l-5 1l-2 -1q-100 0 -191 39t-156.5 104.5t-104.5 156.5t-39 191 t39 191t104.5 156.5t156.5 104.5t191 39zM500 1022q-88 0 -162 -43t-117 -117t-43 -162t43 -162t117 -117t162 -43t162 43t117 117t43 162t-43 162t-117 117t-162 43z" />
+<glyph unicode="&#xe005;" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104z" />
+<glyph unicode="&#xe006;" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429z" />
+<glyph unicode="&#xe007;" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429zM477 700h-240l197 -142l-74 -226 l193 139l195 -140l-74 229l192 140h-234l-78 211z" />
+<glyph unicode="&#xe008;" d="M600 1200q124 0 212 -88t88 -212v-250q0 -46 -31 -98t-69 -52v-75q0 -10 6 -21.5t15 -17.5l358 -230q9 -5 15 -16.5t6 -21.5v-93q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v93q0 10 6 21.5t15 16.5l358 230q9 6 15 17.5t6 21.5v75q-38 0 -69 52 t-31 98v250q0 124 88 212t212 88z" />
+<glyph unicode="&#xe009;" d="M25 1100h1150q10 0 17.5 -7.5t7.5 -17.5v-1050q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v1050q0 10 7.5 17.5t17.5 7.5zM100 1000v-100h100v100h-100zM875 1000h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5t17.5 -7.5h550 q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM1000 1000v-100h100v100h-100zM100 800v-100h100v100h-100zM1000 800v-100h100v100h-100zM100 600v-100h100v100h-100zM1000 600v-100h100v100h-100zM875 500h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5 t17.5 -7.5h550q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM100 400v-100h100v100h-100zM1000 400v-100h100v100h-100zM100 200v-100h100v100h-100zM1000 200v-100h100v100h-100z" />
+<glyph unicode="&#xe010;" d="M50 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM50 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe011;" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM850 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 700h200q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5 t35.5 14.5z" />
+<glyph unicode="&#xe012;" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h700q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe013;" d="M465 477l571 571q8 8 18 8t17 -8l177 -177q8 -7 8 -17t-8 -18l-783 -784q-7 -8 -17.5 -8t-17.5 8l-384 384q-8 8 -8 18t8 17l177 177q7 8 17 8t18 -8l171 -171q7 -7 18 -7t18 7z" />
+<glyph unicode="&#xe014;" d="M904 1083l178 -179q8 -8 8 -18.5t-8 -17.5l-267 -268l267 -268q8 -7 8 -17.5t-8 -18.5l-178 -178q-8 -8 -18.5 -8t-17.5 8l-268 267l-268 -267q-7 -8 -17.5 -8t-18.5 8l-178 178q-8 8 -8 18.5t8 17.5l267 268l-267 268q-8 7 -8 17.5t8 18.5l178 178q8 8 18.5 8t17.5 -8 l268 -267l268 268q7 7 17.5 7t18.5 -7z" />
+<glyph unicode="&#xe015;" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM425 900h150q10 0 17.5 -7.5t7.5 -17.5v-75h75q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5 t-17.5 -7.5h-75v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-75q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v75q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe016;" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM325 800h350q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-350q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe017;" d="M550 1200h100q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM800 975v166q167 -62 272 -209.5t105 -331.5q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5 t-184.5 123t-123 184.5t-45.5 224q0 184 105 331.5t272 209.5v-166q-103 -55 -165 -155t-62 -220q0 -116 57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5q0 120 -62 220t-165 155z" />
+<glyph unicode="&#xe018;" d="M1025 1200h150q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM725 800h150q10 0 17.5 -7.5t7.5 -17.5v-750q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v750 q0 10 7.5 17.5t17.5 7.5zM425 500h150q10 0 17.5 -7.5t7.5 -17.5v-450q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v450q0 10 7.5 17.5t17.5 7.5zM125 300h150q10 0 17.5 -7.5t7.5 -17.5v-250q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5 v250q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe019;" d="M600 1174q33 0 74 -5l38 -152l5 -1q49 -14 94 -39l5 -2l134 80q61 -48 104 -105l-80 -134l3 -5q25 -44 39 -93l1 -6l152 -38q5 -43 5 -73q0 -34 -5 -74l-152 -38l-1 -6q-15 -49 -39 -93l-3 -5l80 -134q-48 -61 -104 -105l-134 81l-5 -3q-44 -25 -94 -39l-5 -2l-38 -151 q-43 -5 -74 -5q-33 0 -74 5l-38 151l-5 2q-49 14 -94 39l-5 3l-134 -81q-60 48 -104 105l80 134l-3 5q-25 45 -38 93l-2 6l-151 38q-6 42 -6 74q0 33 6 73l151 38l2 6q13 48 38 93l3 5l-80 134q47 61 105 105l133 -80l5 2q45 25 94 39l5 1l38 152q43 5 74 5zM600 815 q-89 0 -152 -63t-63 -151.5t63 -151.5t152 -63t152 63t63 151.5t-63 151.5t-152 63z" />
+<glyph unicode="&#xe020;" d="M500 1300h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-75h-1100v75q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5zM500 1200v-100h300v100h-300zM1100 900v-800q0 -41 -29.5 -70.5t-70.5 -29.5h-700q-41 0 -70.5 29.5t-29.5 70.5 v800h900zM300 800v-700h100v700h-100zM500 800v-700h100v700h-100zM700 800v-700h100v700h-100zM900 800v-700h100v700h-100z" />
+<glyph unicode="&#xe021;" d="M18 618l620 608q8 7 18.5 7t17.5 -7l608 -608q8 -8 5.5 -13t-12.5 -5h-175v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v375h-300v-375q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v575h-175q-10 0 -12.5 5t5.5 13z" />
+<glyph unicode="&#xe022;" d="M600 1200v-400q0 -41 29.5 -70.5t70.5 -29.5h300v-650q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5h450zM1000 800h-250q-21 0 -35.5 14.5t-14.5 35.5v250z" />
+<glyph unicode="&#xe023;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h50q10 0 17.5 -7.5t7.5 -17.5v-275h175q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe024;" d="M1300 0h-538l-41 400h-242l-41 -400h-538l431 1200h209l-21 -300h162l-20 300h208zM515 800l-27 -300h224l-27 300h-170z" />
+<glyph unicode="&#xe025;" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-450h191q20 0 25.5 -11.5t-7.5 -27.5l-327 -400q-13 -16 -32 -16t-32 16l-327 400q-13 16 -7.5 27.5t25.5 11.5h191v450q0 21 14.5 35.5t35.5 14.5zM1125 400h50q10 0 17.5 -7.5t7.5 -17.5v-350q0 -10 -7.5 -17.5t-17.5 -7.5 h-1050q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h50q10 0 17.5 -7.5t7.5 -17.5v-175h900v175q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe026;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -275q-13 -16 -32 -16t-32 16l-223 275q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z " />
+<glyph unicode="&#xe027;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM632 914l223 -275q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5l223 275q13 16 32 16 t32 -16z" />
+<glyph unicode="&#xe028;" d="M225 1200h750q10 0 19.5 -7t12.5 -17l186 -652q7 -24 7 -49v-425q0 -12 -4 -27t-9 -17q-12 -6 -37 -6h-1100q-12 0 -27 4t-17 8q-6 13 -6 38l1 425q0 25 7 49l185 652q3 10 12.5 17t19.5 7zM878 1000h-556q-10 0 -19 -7t-11 -18l-87 -450q-2 -11 4 -18t16 -7h150 q10 0 19.5 -7t11.5 -17l38 -152q2 -10 11.5 -17t19.5 -7h250q10 0 19.5 7t11.5 17l38 152q2 10 11.5 17t19.5 7h150q10 0 16 7t4 18l-87 450q-2 11 -11 18t-19 7z" />
+<glyph unicode="&#xe029;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM540 820l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
+<glyph unicode="&#xe030;" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-362q0 -10 -7.5 -17.5t-17.5 -7.5h-362q-11 0 -13 5.5t5 12.5l133 133q-109 76 -238 76q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5h150q0 -117 -45.5 -224 t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117z" />
+<glyph unicode="&#xe031;" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-361q0 -11 -7.5 -18.5t-18.5 -7.5h-361q-11 0 -13 5.5t5 12.5l134 134q-110 75 -239 75q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5h-150q0 117 45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117zM1027 600h150 q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5q-192 0 -348 118l-134 -134q-7 -8 -12.5 -5.5t-5.5 12.5v360q0 11 7.5 18.5t18.5 7.5h360q10 0 12.5 -5.5t-5.5 -12.5l-133 -133q110 -76 240 -76q116 0 214.5 57t155.5 155.5t57 214.5z" />
+<glyph unicode="&#xe032;" d="M125 1200h1050q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-1050q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM1075 1000h-850q-10 0 -17.5 -7.5t-7.5 -17.5v-850q0 -10 7.5 -17.5t17.5 -7.5h850q10 0 17.5 7.5t7.5 17.5v850 q0 10 -7.5 17.5t-17.5 7.5zM325 900h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 900h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 700h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 700h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 500h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 500h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 300h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 300h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe033;" d="M900 800v200q0 83 -58.5 141.5t-141.5 58.5h-300q-82 0 -141 -59t-59 -141v-200h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h900q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-100zM400 800v150q0 21 15 35.5t35 14.5h200 q20 0 35 -14.5t15 -35.5v-150h-300z" />
+<glyph unicode="&#xe034;" d="M125 1100h50q10 0 17.5 -7.5t7.5 -17.5v-1075h-100v1075q0 10 7.5 17.5t17.5 7.5zM1075 1052q4 0 9 -2q16 -6 16 -23v-421q0 -6 -3 -12q-33 -59 -66.5 -99t-65.5 -58t-56.5 -24.5t-52.5 -6.5q-26 0 -57.5 6.5t-52.5 13.5t-60 21q-41 15 -63 22.5t-57.5 15t-65.5 7.5 q-85 0 -160 -57q-7 -5 -15 -5q-6 0 -11 3q-14 7 -14 22v438q22 55 82 98.5t119 46.5q23 2 43 0.5t43 -7t32.5 -8.5t38 -13t32.5 -11q41 -14 63.5 -21t57 -14t63.5 -7q103 0 183 87q7 8 18 8z" />
+<glyph unicode="&#xe035;" d="M600 1175q116 0 227 -49.5t192.5 -131t131 -192.5t49.5 -227v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v300q0 127 -70.5 231.5t-184.5 161.5t-245 57t-245 -57t-184.5 -161.5t-70.5 -231.5v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50 q-10 0 -17.5 7.5t-7.5 17.5v300q0 116 49.5 227t131 192.5t192.5 131t227 49.5zM220 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460q0 8 6 14t14 6zM820 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460 q0 8 6 14t14 6z" />
+<glyph unicode="&#xe036;" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM900 668l120 120q7 7 17 7t17 -7l34 -34q7 -7 7 -17t-7 -17l-120 -120l120 -120q7 -7 7 -17 t-7 -17l-34 -34q-7 -7 -17 -7t-17 7l-120 119l-120 -119q-7 -7 -17 -7t-17 7l-34 34q-7 7 -7 17t7 17l119 120l-119 120q-7 7 -7 17t7 17l34 34q7 8 17 8t17 -8z" />
+<glyph unicode="&#xe037;" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6 l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238q-6 8 -4.5 18t9.5 17l29 22q7 5 15 5z" />
+<glyph unicode="&#xe038;" d="M967 1004h3q11 -1 17 -10q135 -179 135 -396q0 -105 -34 -206.5t-98 -185.5q-7 -9 -17 -10h-3q-9 0 -16 6l-42 34q-8 6 -9 16t5 18q111 150 111 328q0 90 -29.5 176t-84.5 157q-6 9 -5 19t10 16l42 33q7 5 15 5zM321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5 t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238 q-6 8 -4.5 18.5t9.5 16.5l29 22q7 5 15 5z" />
+<glyph unicode="&#xe039;" d="M500 900h100v-100h-100v-100h-400v-100h-100v600h500v-300zM1200 700h-200v-100h200v-200h-300v300h-200v300h-100v200h600v-500zM100 1100v-300h300v300h-300zM800 1100v-300h300v300h-300zM300 900h-100v100h100v-100zM1000 900h-100v100h100v-100zM300 500h200v-500 h-500v500h200v100h100v-100zM800 300h200v-100h-100v-100h-200v100h-100v100h100v200h-200v100h300v-300zM100 400v-300h300v300h-300zM300 200h-100v100h100v-100zM1200 200h-100v100h100v-100zM700 0h-100v100h100v-100zM1200 0h-300v100h300v-100z" />
+<glyph unicode="&#xe040;" d="M100 200h-100v1000h100v-1000zM300 200h-100v1000h100v-1000zM700 200h-200v1000h200v-1000zM900 200h-100v1000h100v-1000zM1200 200h-200v1000h200v-1000zM400 0h-300v100h300v-100zM600 0h-100v91h100v-91zM800 0h-100v91h100v-91zM1100 0h-200v91h200v-91z" />
+<glyph unicode="&#xe041;" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
+<glyph unicode="&#xe042;" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM800 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-56 56l424 426l-700 700h150zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5 t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
+<glyph unicode="&#xe043;" d="M300 1200h825q75 0 75 -75v-900q0 -25 -18 -43l-64 -64q-8 -8 -13 -5.5t-5 12.5v950q0 10 -7.5 17.5t-17.5 7.5h-700q-25 0 -43 -18l-64 -64q-8 -8 -5.5 -13t12.5 -5h700q10 0 17.5 -7.5t7.5 -17.5v-950q0 -10 -7.5 -17.5t-17.5 -7.5h-850q-10 0 -17.5 7.5t-7.5 17.5v975 q0 25 18 43l139 139q18 18 43 18z" />
+<glyph unicode="&#xe044;" d="M250 1200h800q21 0 35.5 -14.5t14.5 -35.5v-1150l-450 444l-450 -445v1151q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe045;" d="M822 1200h-444q-11 0 -19 -7.5t-9 -17.5l-78 -301q-7 -24 7 -45l57 -108q6 -9 17.5 -15t21.5 -6h450q10 0 21.5 6t17.5 15l62 108q14 21 7 45l-83 301q-1 10 -9 17.5t-19 7.5zM1175 800h-150q-10 0 -21 -6.5t-15 -15.5l-78 -156q-4 -9 -15 -15.5t-21 -6.5h-550 q-10 0 -21 6.5t-15 15.5l-78 156q-4 9 -15 15.5t-21 6.5h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-650q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h750q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5 t7.5 17.5v650q0 10 -7.5 17.5t-17.5 7.5zM850 200h-500q-10 0 -19.5 -7t-11.5 -17l-38 -152q-2 -10 3.5 -17t15.5 -7h600q10 0 15.5 7t3.5 17l-38 152q-2 10 -11.5 17t-19.5 7z" />
+<glyph unicode="&#xe046;" d="M500 1100h200q56 0 102.5 -20.5t72.5 -50t44 -59t25 -50.5l6 -20h150q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5h150q2 8 6.5 21.5t24 48t45 61t72 48t102.5 21.5zM900 800v-100 h100v100h-100zM600 730q-95 0 -162.5 -67.5t-67.5 -162.5t67.5 -162.5t162.5 -67.5t162.5 67.5t67.5 162.5t-67.5 162.5t-162.5 67.5zM600 603q43 0 73 -30t30 -73t-30 -73t-73 -30t-73 30t-30 73t30 73t73 30z" />
+<glyph unicode="&#xe047;" d="M681 1199l385 -998q20 -50 60 -92q18 -19 36.5 -29.5t27.5 -11.5l10 -2v-66h-417v66q53 0 75 43.5t5 88.5l-82 222h-391q-58 -145 -92 -234q-11 -34 -6.5 -57t25.5 -37t46 -20t55 -6v-66h-365v66q56 24 84 52q12 12 25 30.5t20 31.5l7 13l399 1006h93zM416 521h340 l-162 457z" />
+<glyph unicode="&#xe048;" d="M753 641q5 -1 14.5 -4.5t36 -15.5t50.5 -26.5t53.5 -40t50.5 -54.5t35.5 -70t14.5 -87q0 -67 -27.5 -125.5t-71.5 -97.5t-98.5 -66.5t-108.5 -40.5t-102 -13h-500v89q41 7 70.5 32.5t29.5 65.5v827q0 24 -0.5 34t-3.5 24t-8.5 19.5t-17 13.5t-28 12.5t-42.5 11.5v71 l471 -1q57 0 115.5 -20.5t108 -57t80.5 -94t31 -124.5q0 -51 -15.5 -96.5t-38 -74.5t-45 -50.5t-38.5 -30.5zM400 700h139q78 0 130.5 48.5t52.5 122.5q0 41 -8.5 70.5t-29.5 55.5t-62.5 39.5t-103.5 13.5h-118v-350zM400 200h216q80 0 121 50.5t41 130.5q0 90 -62.5 154.5 t-156.5 64.5h-159v-400z" />
+<glyph unicode="&#xe049;" d="M877 1200l2 -57q-83 -19 -116 -45.5t-40 -66.5l-132 -839q-9 -49 13 -69t96 -26v-97h-500v97q186 16 200 98l173 832q3 17 3 30t-1.5 22.5t-9 17.5t-13.5 12.5t-21.5 10t-26 8.5t-33.5 10q-13 3 -19 5v57h425z" />
+<glyph unicode="&#xe050;" d="M1300 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM175 1000h-75v-800h75l-125 -167l-125 167h75v800h-75l125 167z" />
+<glyph unicode="&#xe051;" d="M1100 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-650q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v650h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM1167 50l-167 -125v75h-800v-75l-167 125l167 125v-75h800v75z" />
+<glyph unicode="&#xe052;" d="M50 1100h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe053;" d="M250 1100h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM250 500h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe054;" d="M500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000 q-21 0 -35.5 14.5t-14.5 35.5zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5zM0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5z" />
+<glyph unicode="&#xe055;" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe056;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 1100h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 800h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 500h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 500h800q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 200h800 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe057;" d="M400 0h-100v1100h100v-1100zM550 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM267 550l-167 -125v75h-200v100h200v75zM550 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe058;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM900 0h-100v1100h100v-1100zM50 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM1100 600h200v-100h-200v-75l-167 125l167 125v-75zM50 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe059;" d="M75 1000h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53v650q0 31 22 53t53 22zM1200 300l-300 300l300 300v-600z" />
+<glyph unicode="&#xe060;" d="M44 1100h1112q18 0 31 -13t13 -31v-1012q0 -18 -13 -31t-31 -13h-1112q-18 0 -31 13t-13 31v1012q0 18 13 31t31 13zM100 1000v-737l247 182l298 -131l-74 156l293 318l236 -288v500h-1000zM342 884q56 0 95 -39t39 -94.5t-39 -95t-95 -39.5t-95 39.5t-39 95t39 94.5 t95 39z" />
+<glyph unicode="&#xe062;" d="M648 1169q117 0 216 -60t156.5 -161t57.5 -218q0 -115 -70 -258q-69 -109 -158 -225.5t-143 -179.5l-54 -62q-9 8 -25.5 24.5t-63.5 67.5t-91 103t-98.5 128t-95.5 148q-60 132 -60 249q0 88 34 169.5t91.5 142t137 96.5t166.5 36zM652.5 974q-91.5 0 -156.5 -65 t-65 -157t65 -156.5t156.5 -64.5t156.5 64.5t65 156.5t-65 157t-156.5 65z" />
+<glyph unicode="&#xe063;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 173v854q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57z" />
+<glyph unicode="&#xe064;" d="M554 1295q21 -72 57.5 -143.5t76 -130t83 -118t82.5 -117t70 -116t49.5 -126t18.5 -136.5q0 -71 -25.5 -135t-68.5 -111t-99 -82t-118.5 -54t-125.5 -23q-84 5 -161.5 34t-139.5 78.5t-99 125t-37 164.5q0 69 18 136.5t49.5 126.5t69.5 116.5t81.5 117.5t83.5 119 t76.5 131t58.5 143zM344 710q-23 -33 -43.5 -70.5t-40.5 -102.5t-17 -123q1 -37 14.5 -69.5t30 -52t41 -37t38.5 -24.5t33 -15q21 -7 32 -1t13 22l6 34q2 10 -2.5 22t-13.5 19q-5 4 -14 12t-29.5 40.5t-32.5 73.5q-26 89 6 271q2 11 -6 11q-8 1 -15 -10z" />
+<glyph unicode="&#xe065;" d="M1000 1013l108 115q2 1 5 2t13 2t20.5 -1t25 -9.5t28.5 -21.5q22 -22 27 -43t0 -32l-6 -10l-108 -115zM350 1100h400q50 0 105 -13l-187 -187h-368q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v182l200 200v-332 q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM1009 803l-362 -362l-161 -50l55 170l355 355z" />
+<glyph unicode="&#xe066;" d="M350 1100h361q-164 -146 -216 -200h-195q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-103q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M824 1073l339 -301q8 -7 8 -17.5t-8 -17.5l-340 -306q-7 -6 -12.5 -4t-6.5 11v203q-26 1 -54.5 0t-78.5 -7.5t-92 -17.5t-86 -35t-70 -57q10 59 33 108t51.5 81.5t65 58.5t68.5 40.5t67 24.5t56 13.5t40 4.5v210q1 10 6.5 12.5t13.5 -4.5z" />
+<glyph unicode="&#xe067;" d="M350 1100h350q60 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-219q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M643 639l395 395q7 7 17.5 7t17.5 -7l101 -101q7 -7 7 -17.5t-7 -17.5l-531 -532q-7 -7 -17.5 -7t-17.5 7l-248 248q-7 7 -7 17.5t7 17.5l101 101q7 7 17.5 7t17.5 -7l111 -111q8 -7 18 -7t18 7z" />
+<glyph unicode="&#xe068;" d="M318 918l264 264q8 8 18 8t18 -8l260 -264q7 -8 4.5 -13t-12.5 -5h-170v-200h200v173q0 10 5 12t13 -5l264 -260q8 -7 8 -17.5t-8 -17.5l-264 -265q-8 -7 -13 -5t-5 12v173h-200v-200h170q10 0 12.5 -5t-4.5 -13l-260 -264q-8 -8 -18 -8t-18 8l-264 264q-8 8 -5.5 13 t12.5 5h175v200h-200v-173q0 -10 -5 -12t-13 5l-264 265q-8 7 -8 17.5t8 17.5l264 260q8 7 13 5t5 -12v-173h200v200h-175q-10 0 -12.5 5t5.5 13z" />
+<glyph unicode="&#xe069;" d="M250 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe070;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5 t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe071;" d="M1200 1050v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-492 480q-15 14 -15 35t15 35l492 480q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25z" />
+<glyph unicode="&#xe072;" d="M243 1074l814 -498q18 -11 18 -26t-18 -26l-814 -498q-18 -11 -30.5 -4t-12.5 28v1000q0 21 12.5 28t30.5 -4z" />
+<glyph unicode="&#xe073;" d="M250 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM650 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800 q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe074;" d="M1100 950v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5z" />
+<glyph unicode="&#xe075;" d="M500 612v438q0 21 10.5 25t25.5 -10l492 -480q15 -14 15 -35t-15 -35l-492 -480q-15 -14 -25.5 -10t-10.5 25v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10z" />
+<glyph unicode="&#xe076;" d="M1048 1102l100 1q20 0 35 -14.5t15 -35.5l5 -1000q0 -21 -14.5 -35.5t-35.5 -14.5l-100 -1q-21 0 -35.5 14.5t-14.5 35.5l-2 437l-463 -454q-14 -15 -24.5 -10.5t-10.5 25.5l-2 437l-462 -455q-15 -14 -25.5 -9.5t-10.5 24.5l-5 1000q0 21 10.5 25.5t25.5 -10.5l466 -450 l-2 438q0 20 10.5 24.5t25.5 -9.5l466 -451l-2 438q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe077;" d="M850 1100h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10l464 -453v438q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe078;" d="M686 1081l501 -540q15 -15 10.5 -26t-26.5 -11h-1042q-22 0 -26.5 11t10.5 26l501 540q15 15 36 15t36 -15zM150 400h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe079;" d="M885 900l-352 -353l352 -353l-197 -198l-552 552l552 550z" />
+<glyph unicode="&#xe080;" d="M1064 547l-551 -551l-198 198l353 353l-353 353l198 198z" />
+<glyph unicode="&#xe081;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM650 900h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-150 q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5h150v-150q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v150h150q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-150v150q0 21 -14.5 35.5t-35.5 14.5z" />
+<glyph unicode="&#xe082;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM850 700h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5 t35.5 -14.5h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5z" />
+<glyph unicode="&#xe083;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM741.5 913q-12.5 0 -21.5 -9l-120 -120l-120 120q-9 9 -21.5 9 t-21.5 -9l-141 -141q-9 -9 -9 -21.5t9 -21.5l120 -120l-120 -120q-9 -9 -9 -21.5t9 -21.5l141 -141q9 -9 21.5 -9t21.5 9l120 120l120 -120q9 -9 21.5 -9t21.5 9l141 141q9 9 9 21.5t-9 21.5l-120 120l120 120q9 9 9 21.5t-9 21.5l-141 141q-9 9 -21.5 9z" />
+<glyph unicode="&#xe084;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM546 623l-84 85q-7 7 -17.5 7t-18.5 -7l-139 -139q-7 -8 -7 -18t7 -18 l242 -241q7 -8 17.5 -8t17.5 8l375 375q7 7 7 17.5t-7 18.5l-139 139q-7 7 -17.5 7t-17.5 -7z" />
+<glyph unicode="&#xe085;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM588 941q-29 0 -59 -5.5t-63 -20.5t-58 -38.5t-41.5 -63t-16.5 -89.5 q0 -25 20 -25h131q30 -5 35 11q6 20 20.5 28t45.5 8q20 0 31.5 -10.5t11.5 -28.5q0 -23 -7 -34t-26 -18q-1 0 -13.5 -4t-19.5 -7.5t-20 -10.5t-22 -17t-18.5 -24t-15.5 -35t-8 -46q-1 -8 5.5 -16.5t20.5 -8.5h173q7 0 22 8t35 28t37.5 48t29.5 74t12 100q0 47 -17 83 t-42.5 57t-59.5 34.5t-64 18t-59 4.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="&#xe086;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM675 1000h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5 t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5zM675 700h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h75v-200h-75q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h350q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5 t-17.5 7.5h-75v275q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="&#xe087;" d="M525 1200h150q10 0 17.5 -7.5t7.5 -17.5v-194q103 -27 178.5 -102.5t102.5 -178.5h194q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-194q-27 -103 -102.5 -178.5t-178.5 -102.5v-194q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v194 q-103 27 -178.5 102.5t-102.5 178.5h-194q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h194q27 103 102.5 178.5t178.5 102.5v194q0 10 7.5 17.5t17.5 7.5zM700 893v-168q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v168q-68 -23 -119 -74 t-74 -119h168q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-168q23 -68 74 -119t119 -74v168q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-168q68 23 119 74t74 119h-168q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h168 q-23 68 -74 119t-119 74z" />
+<glyph unicode="&#xe088;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM759 823l64 -64q7 -7 7 -17.5t-7 -17.5l-124 -124l124 -124q7 -7 7 -17.5t-7 -17.5l-64 -64q-7 -7 -17.5 -7t-17.5 7l-124 124l-124 -124q-7 -7 -17.5 -7t-17.5 7l-64 64 q-7 7 -7 17.5t7 17.5l124 124l-124 124q-7 7 -7 17.5t7 17.5l64 64q7 7 17.5 7t17.5 -7l124 -124l124 124q7 7 17.5 7t17.5 -7z" />
+<glyph unicode="&#xe089;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM782 788l106 -106q7 -7 7 -17.5t-7 -17.5l-320 -321q-8 -7 -18 -7t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l197 197q7 7 17.5 7t17.5 -7z" />
+<glyph unicode="&#xe090;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5q0 -120 65 -225 l587 587q-105 65 -225 65zM965 819l-584 -584q104 -62 219 -62q116 0 214.5 57t155.5 155.5t57 214.5q0 115 -62 219z" />
+<glyph unicode="&#xe091;" d="M39 582l522 427q16 13 27.5 8t11.5 -26v-291h550q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-550v-291q0 -21 -11.5 -26t-27.5 8l-522 427q-16 13 -16 32t16 32z" />
+<glyph unicode="&#xe092;" d="M639 1009l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291h-550q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h550v291q0 21 11.5 26t27.5 -8z" />
+<glyph unicode="&#xe093;" d="M682 1161l427 -522q13 -16 8 -27.5t-26 -11.5h-291v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v550h-291q-21 0 -26 11.5t8 27.5l427 522q13 16 32 16t32 -16z" />
+<glyph unicode="&#xe094;" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-550h291q21 0 26 -11.5t-8 -27.5l-427 -522q-13 -16 -32 -16t-32 16l-427 522q-13 16 -8 27.5t26 11.5h291v550q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe095;" d="M639 1109l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291q-94 -2 -182 -20t-170.5 -52t-147 -92.5t-100.5 -135.5q5 105 27 193.5t67.5 167t113 135t167 91.5t225.5 42v262q0 21 11.5 26t27.5 -8z" />
+<glyph unicode="&#xe096;" d="M850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5zM350 0h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249 q8 7 18 7t18 -7l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5z" />
+<glyph unicode="&#xe097;" d="M1014 1120l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249q8 7 18 7t18 -7zM250 600h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5z" />
+<glyph unicode="&#xe101;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM704 900h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5 t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="&#xe102;" d="M260 1200q9 0 19 -2t15 -4l5 -2q22 -10 44 -23l196 -118q21 -13 36 -24q29 -21 37 -12q11 13 49 35l196 118q22 13 45 23q17 7 38 7q23 0 47 -16.5t37 -33.5l13 -16q14 -21 18 -45l25 -123l8 -44q1 -9 8.5 -14.5t17.5 -5.5h61q10 0 17.5 -7.5t7.5 -17.5v-50 q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 -7.5t-7.5 -17.5v-175h-400v300h-200v-300h-400v175q0 10 -7.5 17.5t-17.5 7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5h61q11 0 18 3t7 8q0 4 9 52l25 128q5 25 19 45q2 3 5 7t13.5 15t21.5 19.5t26.5 15.5 t29.5 7zM915 1079l-166 -162q-7 -7 -5 -12t12 -5h219q10 0 15 7t2 17l-51 149q-3 10 -11 12t-15 -6zM463 917l-177 157q-8 7 -16 5t-11 -12l-51 -143q-3 -10 2 -17t15 -7h231q11 0 12.5 5t-5.5 12zM500 0h-375q-10 0 -17.5 7.5t-7.5 17.5v375h400v-400zM1100 400v-375 q0 -10 -7.5 -17.5t-17.5 -7.5h-375v400h400z" />
+<glyph unicode="&#xe103;" d="M1165 1190q8 3 21 -6.5t13 -17.5q-2 -178 -24.5 -323.5t-55.5 -245.5t-87 -174.5t-102.5 -118.5t-118 -68.5t-118.5 -33t-120 -4.5t-105 9.5t-90 16.5q-61 12 -78 11q-4 1 -12.5 0t-34 -14.5t-52.5 -40.5l-153 -153q-26 -24 -37 -14.5t-11 43.5q0 64 42 102q8 8 50.5 45 t66.5 58q19 17 35 47t13 61q-9 55 -10 102.5t7 111t37 130t78 129.5q39 51 80 88t89.5 63.5t94.5 45t113.5 36t129 31t157.5 37t182 47.5zM1116 1098q-8 9 -22.5 -3t-45.5 -50q-38 -47 -119 -103.5t-142 -89.5l-62 -33q-56 -30 -102 -57t-104 -68t-102.5 -80.5t-85.5 -91 t-64 -104.5q-24 -56 -31 -86t2 -32t31.5 17.5t55.5 59.5q25 30 94 75.5t125.5 77.5t147.5 81q70 37 118.5 69t102 79.5t99 111t86.5 148.5q22 50 24 60t-6 19z" />
+<glyph unicode="&#xe104;" d="M653 1231q-39 -67 -54.5 -131t-10.5 -114.5t24.5 -96.5t47.5 -80t63.5 -62.5t68.5 -46.5t65 -30q-4 7 -17.5 35t-18.5 39.5t-17 39.5t-17 43t-13 42t-9.5 44.5t-2 42t4 43t13.5 39t23 38.5q96 -42 165 -107.5t105 -138t52 -156t13 -159t-19 -149.5q-13 -55 -44 -106.5 t-68 -87t-78.5 -64.5t-72.5 -45t-53 -22q-72 -22 -127 -11q-31 6 -13 19q6 3 17 7q13 5 32.5 21t41 44t38.5 63.5t21.5 81.5t-6.5 94.5t-50 107t-104 115.5q10 -104 -0.5 -189t-37 -140.5t-65 -93t-84 -52t-93.5 -11t-95 24.5q-80 36 -131.5 114t-53.5 171q-2 23 0 49.5 t4.5 52.5t13.5 56t27.5 60t46 64.5t69.5 68.5q-8 -53 -5 -102.5t17.5 -90t34 -68.5t44.5 -39t49 -2q31 13 38.5 36t-4.5 55t-29 64.5t-36 75t-26 75.5q-15 85 2 161.5t53.5 128.5t85.5 92.5t93.5 61t81.5 25.5z" />
+<glyph unicode="&#xe105;" d="M600 1094q82 0 160.5 -22.5t140 -59t116.5 -82.5t94.5 -95t68 -95t42.5 -82.5t14 -57.5t-14 -57.5t-43 -82.5t-68.5 -95t-94.5 -95t-116.5 -82.5t-140 -59t-159.5 -22.5t-159.5 22.5t-140 59t-116.5 82.5t-94.5 95t-68.5 95t-43 82.5t-14 57.5t14 57.5t42.5 82.5t68 95 t94.5 95t116.5 82.5t140 59t160.5 22.5zM888 829q-15 15 -18 12t5 -22q25 -57 25 -119q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 59 23 114q8 19 4.5 22t-17.5 -12q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q22 -36 47 -71t70 -82t92.5 -81t113 -58.5t133.5 -24.5 t133.5 24t113 58.5t92.5 81.5t70 81.5t47 70.5q11 18 9 42.5t-14 41.5q-90 117 -163 189zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l35 34q14 15 12.5 33.5t-16.5 33.5q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
+<glyph unicode="&#xe106;" d="M592 0h-148l31 120q-91 20 -175.5 68.5t-143.5 106.5t-103.5 119t-66.5 110t-22 76q0 21 14 57.5t42.5 82.5t68 95t94.5 95t116.5 82.5t140 59t160.5 22.5q61 0 126 -15l32 121h148zM944 770l47 181q108 -85 176.5 -192t68.5 -159q0 -26 -19.5 -71t-59.5 -102t-93 -112 t-129 -104.5t-158 -75.5l46 173q77 49 136 117t97 131q11 18 9 42.5t-14 41.5q-54 70 -107 130zM310 824q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q18 -30 39 -60t57 -70.5t74 -73t90 -61t105 -41.5l41 154q-107 18 -178.5 101.5t-71.5 193.5q0 59 23 114q8 19 4.5 22 t-17.5 -12zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l12 11l22 86l-3 4q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
+<glyph unicode="&#xe107;" d="M-90 100l642 1066q20 31 48 28.5t48 -35.5l642 -1056q21 -32 7.5 -67.5t-50.5 -35.5h-1294q-37 0 -50.5 34t7.5 66zM155 200h345v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h345l-445 723zM496 700h208q20 0 32 -14.5t8 -34.5l-58 -252 q-4 -20 -21.5 -34.5t-37.5 -14.5h-54q-20 0 -37.5 14.5t-21.5 34.5l-58 252q-4 20 8 34.5t32 14.5z" />
+<glyph unicode="&#xe108;" d="M650 1200q62 0 106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -93 100 -113v-64q0 -21 -13 -29t-32 1l-205 128l-205 -128q-19 -9 -32 -1t-13 29v64q0 20 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5v41 q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44z" />
+<glyph unicode="&#xe109;" d="M850 1200h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-150h-1100v150q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-50h500v50q0 21 14.5 35.5t35.5 14.5zM1100 800v-750q0 -21 -14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v750h1100zM100 600v-100h100v100h-100zM300 600v-100h100v100h-100zM500 600v-100h100v100h-100zM700 600v-100h100v100h-100zM900 600v-100h100v100h-100zM100 400v-100h100v100h-100zM300 400v-100h100v100h-100zM500 400 v-100h100v100h-100zM700 400v-100h100v100h-100zM900 400v-100h100v100h-100zM100 200v-100h100v100h-100zM300 200v-100h100v100h-100zM500 200v-100h100v100h-100zM700 200v-100h100v100h-100zM900 200v-100h100v100h-100z" />
+<glyph unicode="&#xe110;" d="M1135 1165l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-159l-600 -600h-291q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h209l600 600h241v150q0 21 10.5 25t24.5 -10zM522 819l-141 -141l-122 122h-209q-21 0 -35.5 14.5 t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h291zM1135 565l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-241l-181 181l141 141l122 -122h159v150q0 21 10.5 25t24.5 -10z" />
+<glyph unicode="&#xe111;" d="M100 1100h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5z" />
+<glyph unicode="&#xe112;" d="M150 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM850 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM1100 800v-300q0 -41 -3 -77.5t-15 -89.5t-32 -96t-58 -89t-89 -77t-129 -51t-174 -20t-174 20 t-129 51t-89 77t-58 89t-32 96t-15 89.5t-3 77.5v300h300v-250v-27v-42.5t1.5 -41t5 -38t10 -35t16.5 -30t25.5 -24.5t35 -19t46.5 -12t60 -4t60 4.5t46.5 12.5t35 19.5t25 25.5t17 30.5t10 35t5 38t2 40.5t-0.5 42v25v250h300z" />
+<glyph unicode="&#xe113;" d="M1100 411l-198 -199l-353 353l-353 -353l-197 199l551 551z" />
+<glyph unicode="&#xe114;" d="M1101 789l-550 -551l-551 551l198 199l353 -353l353 353z" />
+<glyph unicode="&#xe115;" d="M404 1000h746q21 0 35.5 -14.5t14.5 -35.5v-551h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v401h-381zM135 984l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-400h385l215 -200h-750q-21 0 -35.5 14.5 t-14.5 35.5v550h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
+<glyph unicode="&#xe116;" d="M56 1200h94q17 0 31 -11t18 -27l38 -162h896q24 0 39 -18.5t10 -42.5l-100 -475q-5 -21 -27 -42.5t-55 -21.5h-633l48 -200h535q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-50q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-300v-50 q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-31q-18 0 -32.5 10t-20.5 19l-5 10l-201 961h-54q-20 0 -35 14.5t-15 35.5t15 35.5t35 14.5z" />
+<glyph unicode="&#xe117;" d="M1200 1000v-100h-1200v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500zM0 800h1200v-800h-1200v800z" />
+<glyph unicode="&#xe118;" d="M200 800l-200 -400v600h200q0 41 29.5 70.5t70.5 29.5h300q42 0 71 -29.5t29 -70.5h500v-200h-1000zM1500 700l-300 -700h-1200l300 700h1200z" />
+<glyph unicode="&#xe119;" d="M635 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-601h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v601h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
+<glyph unicode="&#xe120;" d="M936 864l249 -229q14 -15 14 -35.5t-14 -35.5l-249 -229q-15 -15 -25.5 -10.5t-10.5 24.5v151h-600v-151q0 -20 -10.5 -24.5t-25.5 10.5l-249 229q-14 15 -14 35.5t14 35.5l249 229q15 15 25.5 10.5t10.5 -25.5v-149h600v149q0 21 10.5 25.5t25.5 -10.5z" />
+<glyph unicode="&#xe121;" d="M1169 400l-172 732q-5 23 -23 45.5t-38 22.5h-672q-20 0 -38 -20t-23 -41l-172 -739h1138zM1100 300h-1000q-41 0 -70.5 -29.5t-29.5 -70.5v-100q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v100q0 41 -29.5 70.5t-70.5 29.5zM800 100v100h100v-100h-100 zM1000 100v100h100v-100h-100z" />
+<glyph unicode="&#xe122;" d="M1150 1100q21 0 35.5 -14.5t14.5 -35.5v-850q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v850q0 21 14.5 35.5t35.5 14.5zM1000 200l-675 200h-38l47 -276q3 -16 -5.5 -20t-29.5 -4h-7h-84q-20 0 -34.5 14t-18.5 35q-55 337 -55 351v250v6q0 16 1 23.5t6.5 14 t17.5 6.5h200l675 250v-850zM0 750v-250q-4 0 -11 0.5t-24 6t-30 15t-24 30t-11 48.5v50q0 26 10.5 46t25 30t29 16t25.5 7z" />
+<glyph unicode="&#xe123;" d="M553 1200h94q20 0 29 -10.5t3 -29.5l-18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q19 0 33 -14.5t14 -35t-13 -40.5t-31 -27q-8 -4 -23 -9.5t-65 -19.5t-103 -25t-132.5 -20t-158.5 -9q-57 0 -115 5t-104 12t-88.5 15.5t-73.5 17.5t-54.5 16t-35.5 12l-11 4 q-18 8 -31 28t-13 40.5t14 35t33 14.5h17l118 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3.5 32t28.5 13zM498 110q50 -6 102 -6q53 0 102 6q-12 -49 -39.5 -79.5t-62.5 -30.5t-63 30.5t-39 79.5z" />
+<glyph unicode="&#xe124;" d="M800 946l224 78l-78 -224l234 -45l-180 -155l180 -155l-234 -45l78 -224l-224 78l-45 -234l-155 180l-155 -180l-45 234l-224 -78l78 224l-234 45l180 155l-180 155l234 45l-78 224l224 -78l45 234l155 -180l155 180z" />
+<glyph unicode="&#xe125;" d="M650 1200h50q40 0 70 -40.5t30 -84.5v-150l-28 -125h328q40 0 70 -40.5t30 -84.5v-100q0 -45 -29 -74l-238 -344q-16 -24 -38 -40.5t-45 -16.5h-250q-7 0 -42 25t-66 50l-31 25h-61q-45 0 -72.5 18t-27.5 57v400q0 36 20 63l145 196l96 198q13 28 37.5 48t51.5 20z M650 1100l-100 -212l-150 -213v-375h100l136 -100h214l250 375v125h-450l50 225v175h-50zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe126;" d="M600 1100h250q23 0 45 -16.5t38 -40.5l238 -344q29 -29 29 -74v-100q0 -44 -30 -84.5t-70 -40.5h-328q28 -118 28 -125v-150q0 -44 -30 -84.5t-70 -40.5h-50q-27 0 -51.5 20t-37.5 48l-96 198l-145 196q-20 27 -20 63v400q0 39 27.5 57t72.5 18h61q124 100 139 100z M50 1000h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM636 1000l-136 -100h-100v-375l150 -213l100 -212h50v175l-50 225h450v125l-250 375h-214z" />
+<glyph unicode="&#xe127;" d="M356 873l363 230q31 16 53 -6l110 -112q13 -13 13.5 -32t-11.5 -34l-84 -121h302q84 0 138 -38t54 -110t-55 -111t-139 -39h-106l-131 -339q-6 -21 -19.5 -41t-28.5 -20h-342q-7 0 -90 81t-83 94v525q0 17 14 35.5t28 28.5zM400 792v-503l100 -89h293l131 339 q6 21 19.5 41t28.5 20h203q21 0 30.5 25t0.5 50t-31 25h-456h-7h-6h-5.5t-6 0.5t-5 1.5t-5 2t-4 2.5t-4 4t-2.5 4.5q-12 25 5 47l146 183l-86 83zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500 q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe128;" d="M475 1103l366 -230q2 -1 6 -3.5t14 -10.5t18 -16.5t14.5 -20t6.5 -22.5v-525q0 -13 -86 -94t-93 -81h-342q-15 0 -28.5 20t-19.5 41l-131 339h-106q-85 0 -139.5 39t-54.5 111t54 110t138 38h302l-85 121q-11 15 -10.5 34t13.5 32l110 112q22 22 53 6zM370 945l146 -183 q17 -22 5 -47q-2 -2 -3.5 -4.5t-4 -4t-4 -2.5t-5 -2t-5 -1.5t-6 -0.5h-6h-6.5h-6h-475v-100h221q15 0 29 -20t20 -41l130 -339h294l106 89v503l-342 236zM1050 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5 v500q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe129;" d="M550 1294q72 0 111 -55t39 -139v-106l339 -131q21 -6 41 -19.5t20 -28.5v-342q0 -7 -81 -90t-94 -83h-525q-17 0 -35.5 14t-28.5 28l-9 14l-230 363q-16 31 6 53l112 110q13 13 32 13.5t34 -11.5l121 -84v302q0 84 38 138t110 54zM600 972v203q0 21 -25 30.5t-50 0.5 t-25 -31v-456v-7v-6v-5.5t-0.5 -6t-1.5 -5t-2 -5t-2.5 -4t-4 -4t-4.5 -2.5q-25 -12 -47 5l-183 146l-83 -86l236 -339h503l89 100v293l-339 131q-21 6 -41 19.5t-20 28.5zM450 200h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe130;" d="M350 1100h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5zM600 306v-106q0 -84 -39 -139t-111 -55t-110 54t-38 138v302l-121 -84q-15 -12 -34 -11.5t-32 13.5l-112 110 q-22 22 -6 53l230 363q1 2 3.5 6t10.5 13.5t16.5 17t20 13.5t22.5 6h525q13 0 94 -83t81 -90v-342q0 -15 -20 -28.5t-41 -19.5zM308 900l-236 -339l83 -86l183 146q22 17 47 5q2 -1 4.5 -2.5t4 -4t2.5 -4t2 -5t1.5 -5t0.5 -6v-5.5v-6v-7v-456q0 -22 25 -31t50 0.5t25 30.5 v203q0 15 20 28.5t41 19.5l339 131v293l-89 100h-503z" />
+<glyph unicode="&#xe131;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM914 632l-275 223q-16 13 -27.5 8t-11.5 -26v-137h-275 q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h275v-137q0 -21 11.5 -26t27.5 8l275 223q16 13 16 32t-16 32z" />
+<glyph unicode="&#xe132;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM561 855l-275 -223q-16 -13 -16 -32t16 -32l275 -223q16 -13 27.5 -8 t11.5 26v137h275q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5h-275v137q0 21 -11.5 26t-27.5 -8z" />
+<glyph unicode="&#xe133;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM855 639l-223 275q-13 16 -32 16t-32 -16l-223 -275q-13 -16 -8 -27.5 t26 -11.5h137v-275q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v275h137q21 0 26 11.5t-8 27.5z" />
+<glyph unicode="&#xe134;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM675 900h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-275h-137q-21 0 -26 -11.5 t8 -27.5l223 -275q13 -16 32 -16t32 16l223 275q13 16 8 27.5t-26 11.5h-137v275q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="&#xe135;" d="M600 1176q116 0 222.5 -46t184 -123.5t123.5 -184t46 -222.5t-46 -222.5t-123.5 -184t-184 -123.5t-222.5 -46t-222.5 46t-184 123.5t-123.5 184t-46 222.5t46 222.5t123.5 184t184 123.5t222.5 46zM627 1101q-15 -12 -36.5 -20.5t-35.5 -12t-43 -8t-39 -6.5 q-15 -3 -45.5 0t-45.5 -2q-20 -7 -51.5 -26.5t-34.5 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -91t-29.5 -79q-9 -34 5 -93t8 -87q0 -9 17 -44.5t16 -59.5q12 0 23 -5t23.5 -15t19.5 -14q16 -8 33 -15t40.5 -15t34.5 -12q21 -9 52.5 -32t60 -38t57.5 -11 q7 -15 -3 -34t-22.5 -40t-9.5 -38q13 -21 23 -34.5t27.5 -27.5t36.5 -18q0 -7 -3.5 -16t-3.5 -14t5 -17q104 -2 221 112q30 29 46.5 47t34.5 49t21 63q-13 8 -37 8.5t-36 7.5q-15 7 -49.5 15t-51.5 19q-18 0 -41 -0.5t-43 -1.5t-42 -6.5t-38 -16.5q-51 -35 -66 -12 q-4 1 -3.5 25.5t0.5 25.5q-6 13 -26.5 17.5t-24.5 6.5q1 15 -0.5 30.5t-7 28t-18.5 11.5t-31 -21q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q7 -12 18 -24t21.5 -20.5t20 -15t15.5 -10.5l5 -3q2 12 7.5 30.5t8 34.5t-0.5 32q-3 18 3.5 29 t18 22.5t15.5 24.5q6 14 10.5 35t8 31t15.5 22.5t34 22.5q-6 18 10 36q8 0 24 -1.5t24.5 -1.5t20 4.5t20.5 15.5q-10 23 -31 42.5t-37.5 29.5t-49 27t-43.5 23q0 1 2 8t3 11.5t1.5 10.5t-1 9.5t-4.5 4.5q31 -13 58.5 -14.5t38.5 2.5l12 5q5 28 -9.5 46t-36.5 24t-50 15 t-41 20q-18 -4 -37 0zM613 994q0 -17 8 -42t17 -45t9 -23q-8 1 -39.5 5.5t-52.5 10t-37 16.5q3 11 16 29.5t16 25.5q10 -10 19 -10t14 6t13.5 14.5t16.5 12.5z" />
+<glyph unicode="&#xe136;" d="M756 1157q164 92 306 -9l-259 -138l145 -232l251 126q6 -89 -34 -156.5t-117 -110.5q-60 -34 -127 -39.5t-126 16.5l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5t15 37.5l600 599q-34 101 5.5 201.5t135.5 154.5z" />
+<glyph unicode="&#xe137;" horiz-adv-x="1220" d="M100 1196h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 1096h-200v-100h200v100zM100 796h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 696h-500v-100h500v100zM100 396h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 296h-300v-100h300v100z " />
+<glyph unicode="&#xe138;" d="M150 1200h900q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM700 500v-300l-200 -200v500l-350 500h900z" />
+<glyph unicode="&#xe139;" d="M500 1200h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5zM500 1100v-100h200v100h-200zM1200 400v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v200h1200z" />
+<glyph unicode="&#xe140;" d="M50 1200h300q21 0 25 -10.5t-10 -24.5l-94 -94l199 -199q7 -8 7 -18t-7 -18l-106 -106q-8 -7 -18 -7t-18 7l-199 199l-94 -94q-14 -14 -24.5 -10t-10.5 25v300q0 21 14.5 35.5t35.5 14.5zM850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-199 -199q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l199 199l-94 94q-14 14 -10 24.5t25 10.5zM364 470l106 -106q7 -8 7 -18t-7 -18l-199 -199l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l199 199 q8 7 18 7t18 -7zM1071 271l94 94q14 14 24.5 10t10.5 -25v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -25 10.5t10 24.5l94 94l-199 199q-7 8 -7 18t7 18l106 106q8 7 18 7t18 -7z" />
+<glyph unicode="&#xe141;" d="M596 1192q121 0 231.5 -47.5t190 -127t127 -190t47.5 -231.5t-47.5 -231.5t-127 -190.5t-190 -127t-231.5 -47t-231.5 47t-190.5 127t-127 190.5t-47 231.5t47 231.5t127 190t190.5 127t231.5 47.5zM596 1010q-112 0 -207.5 -55.5t-151 -151t-55.5 -207.5t55.5 -207.5 t151 -151t207.5 -55.5t207.5 55.5t151 151t55.5 207.5t-55.5 207.5t-151 151t-207.5 55.5zM454.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38.5 -16.5t-38.5 16.5t-16 39t16 38.5t38.5 16zM754.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38 -16.5q-14 0 -29 10l-55 -145 q17 -23 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5q0 32 20.5 56.5t51.5 29.5l122 126l1 1q-9 14 -9 28q0 23 16 39t38.5 16zM345.5 709q22.5 0 38.5 -16t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16zM854.5 709q22.5 0 38.5 -16 t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16z" />
+<glyph unicode="&#xe142;" d="M546 173l469 470q91 91 99 192q7 98 -52 175.5t-154 94.5q-22 4 -47 4q-34 0 -66.5 -10t-56.5 -23t-55.5 -38t-48 -41.5t-48.5 -47.5q-376 -375 -391 -390q-30 -27 -45 -41.5t-37.5 -41t-32 -46.5t-16 -47.5t-1.5 -56.5q9 -62 53.5 -95t99.5 -33q74 0 125 51l548 548 q36 36 20 75q-7 16 -21.5 26t-32.5 10q-26 0 -50 -23q-13 -12 -39 -38l-341 -338q-15 -15 -35.5 -15.5t-34.5 13.5t-14 34.5t14 34.5q327 333 361 367q35 35 67.5 51.5t78.5 16.5q14 0 29 -1q44 -8 74.5 -35.5t43.5 -68.5q14 -47 2 -96.5t-47 -84.5q-12 -11 -32 -32 t-79.5 -81t-114.5 -115t-124.5 -123.5t-123 -119.5t-96.5 -89t-57 -45q-56 -27 -120 -27q-70 0 -129 32t-93 89q-48 78 -35 173t81 163l511 511q71 72 111 96q91 55 198 55q80 0 152 -33q78 -36 129.5 -103t66.5 -154q17 -93 -11 -183.5t-94 -156.5l-482 -476 q-15 -15 -36 -16t-37 14t-17.5 34t14.5 35z" />
+<glyph unicode="&#xe143;" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104zM896 972q-33 0 -64.5 -19t-56.5 -46t-47.5 -53.5t-43.5 -45.5t-37.5 -19t-36 19t-40 45.5t-43 53.5t-54 46t-65.5 19q-67 0 -122.5 -55.5t-55.5 -132.5q0 -23 13.5 -51t46 -65t57.5 -63t76 -75l22 -22q15 -14 44 -44t50.5 -51t46 -44t41 -35t23 -12 t23.5 12t42.5 36t46 44t52.5 52t44 43q4 4 12 13q43 41 63.5 62t52 55t46 55t26 46t11.5 44q0 79 -53 133.5t-120 54.5z" />
+<glyph unicode="&#xe144;" d="M776.5 1214q93.5 0 159.5 -66l141 -141q66 -66 66 -160q0 -42 -28 -95.5t-62 -87.5l-29 -29q-31 53 -77 99l-18 18l95 95l-247 248l-389 -389l212 -212l-105 -106l-19 18l-141 141q-66 66 -66 159t66 159l283 283q65 66 158.5 66zM600 706l105 105q10 -8 19 -17l141 -141 q66 -66 66 -159t-66 -159l-283 -283q-66 -66 -159 -66t-159 66l-141 141q-66 66 -66 159.5t66 159.5l55 55q29 -55 75 -102l18 -17l-95 -95l247 -248l389 389z" />
+<glyph unicode="&#xe145;" d="M603 1200q85 0 162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5v953q0 21 30 46.5t81 48t129 37.5t163 15zM300 1000v-700h600v700h-600zM600 254q-43 0 -73.5 -30.5t-30.5 -73.5t30.5 -73.5t73.5 -30.5t73.5 30.5 t30.5 73.5t-30.5 73.5t-73.5 30.5z" />
+<glyph unicode="&#xe146;" d="M902 1185l283 -282q15 -15 15 -36t-14.5 -35.5t-35.5 -14.5t-35 15l-36 35l-279 -267v-300l-212 210l-308 -307l-280 -203l203 280l307 308l-210 212h300l267 279l-35 36q-15 14 -15 35t14.5 35.5t35.5 14.5t35 -15z" />
+<glyph unicode="&#xe148;" d="M700 1248v-78q38 -5 72.5 -14.5t75.5 -31.5t71 -53.5t52 -84t24 -118.5h-159q-4 36 -10.5 59t-21 45t-40 35.5t-64.5 20.5v-307l64 -13q34 -7 64 -16.5t70 -32t67.5 -52.5t47.5 -80t20 -112q0 -139 -89 -224t-244 -97v-77h-100v79q-150 16 -237 103q-40 40 -52.5 93.5 t-15.5 139.5h139q5 -77 48.5 -126t117.5 -65v335l-27 8q-46 14 -79 26.5t-72 36t-63 52t-40 72.5t-16 98q0 70 25 126t67.5 92t94.5 57t110 27v77h100zM600 754v274q-29 -4 -50 -11t-42 -21.5t-31.5 -41.5t-10.5 -65q0 -29 7 -50.5t16.5 -34t28.5 -22.5t31.5 -14t37.5 -10 q9 -3 13 -4zM700 547v-310q22 2 42.5 6.5t45 15.5t41.5 27t29 42t12 59.5t-12.5 59.5t-38 44.5t-53 31t-66.5 24.5z" />
+<glyph unicode="&#xe149;" d="M561 1197q84 0 160.5 -40t123.5 -109.5t47 -147.5h-153q0 40 -19.5 71.5t-49.5 48.5t-59.5 26t-55.5 9q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -26 13.5 -63t26.5 -61t37 -66q6 -9 9 -14h241v-100h-197q8 -50 -2.5 -115t-31.5 -95q-45 -62 -99 -112 q34 10 83 17.5t71 7.5q32 1 102 -16t104 -17q83 0 136 30l50 -147q-31 -19 -58 -30.5t-55 -15.5t-42 -4.5t-46 -0.5q-23 0 -76 17t-111 32.5t-96 11.5q-39 -3 -82 -16t-67 -25l-23 -11l-55 145q4 3 16 11t15.5 10.5t13 9t15.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221v100h166q-23 47 -44 104q-7 20 -12 41.5t-6 55.5t6 66.5t29.5 70.5t58.5 71q97 88 263 88z" />
+<glyph unicode="&#xe150;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM935 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-900h-200v900h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
+<glyph unicode="&#xe151;" d="M1000 700h-100v100h-100v-100h-100v500h300v-500zM400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM801 1100v-200h100v200h-100zM1000 350l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150z " />
+<glyph unicode="&#xe152;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 1050l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150zM1000 0h-100v100h-100v-100h-100v500h300v-500zM801 400v-200h100v200h-100z " />
+<glyph unicode="&#xe153;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 700h-100v400h-100v100h200v-500zM1100 0h-100v100h-200v400h300v-500zM901 400v-200h100v200h-100z" />
+<glyph unicode="&#xe154;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1100 700h-100v100h-200v400h300v-500zM901 1100v-200h100v200h-100zM1000 0h-100v400h-100v100h200v-500z" />
+<glyph unicode="&#xe155;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM900 1000h-200v200h200v-200zM1000 700h-300v200h300v-200zM1100 400h-400v200h400v-200zM1200 100h-500v200h500v-200z" />
+<glyph unicode="&#xe156;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1200 1000h-500v200h500v-200zM1100 700h-400v200h400v-200zM1000 400h-300v200h300v-200zM900 100h-200v200h200v-200z" />
+<glyph unicode="&#xe157;" d="M350 1100h400q162 0 256 -93.5t94 -256.5v-400q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5z" />
+<glyph unicode="&#xe158;" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-163 0 -256.5 92.5t-93.5 257.5v400q0 163 94 256.5t256 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM440 770l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
+<glyph unicode="&#xe159;" d="M350 1100h400q163 0 256.5 -94t93.5 -256v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 163 92.5 256.5t257.5 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM350 700h400q21 0 26.5 -12t-6.5 -28l-190 -253q-12 -17 -30 -17t-30 17l-190 253q-12 16 -6.5 28t26.5 12z" />
+<glyph unicode="&#xe160;" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -163 -92.5 -256.5t-257.5 -93.5h-400q-163 0 -256.5 94t-93.5 256v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM580 693l190 -253q12 -16 6.5 -28t-26.5 -12h-400q-21 0 -26.5 12t6.5 28l190 253q12 17 30 17t30 -17z" />
+<glyph unicode="&#xe161;" d="M550 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h450q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-450q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM338 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
+<glyph unicode="&#xe162;" d="M793 1182l9 -9q8 -10 5 -27q-3 -11 -79 -225.5t-78 -221.5l300 1q24 0 32.5 -17.5t-5.5 -35.5q-1 0 -133.5 -155t-267 -312.5t-138.5 -162.5q-12 -15 -26 -15h-9l-9 8q-9 11 -4 32q2 9 42 123.5t79 224.5l39 110h-302q-23 0 -31 19q-10 21 6 41q75 86 209.5 237.5 t228 257t98.5 111.5q9 16 25 16h9z" />
+<glyph unicode="&#xe163;" d="M350 1100h400q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-450q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h450q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400 q0 165 92.5 257.5t257.5 92.5zM938 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
+<glyph unicode="&#xe164;" d="M750 1200h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -10.5 -25t-24.5 10l-109 109l-312 -312q-15 -15 -35.5 -15t-35.5 15l-141 141q-15 15 -15 35.5t15 35.5l312 312l-109 109q-14 14 -10 24.5t25 10.5zM456 900h-156q-41 0 -70.5 -29.5t-29.5 -70.5v-500 q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v148l200 200v-298q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5h300z" />
+<glyph unicode="&#xe165;" d="M600 1186q119 0 227.5 -46.5t187 -125t125 -187t46.5 -227.5t-46.5 -227.5t-125 -187t-187 -125t-227.5 -46.5t-227.5 46.5t-187 125t-125 187t-46.5 227.5t46.5 227.5t125 187t187 125t227.5 46.5zM600 1022q-115 0 -212 -56.5t-153.5 -153.5t-56.5 -212t56.5 -212 t153.5 -153.5t212 -56.5t212 56.5t153.5 153.5t56.5 212t-56.5 212t-153.5 153.5t-212 56.5zM600 794q80 0 137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137t57 137t137 57z" />
+<glyph unicode="&#xe166;" d="M450 1200h200q21 0 35.5 -14.5t14.5 -35.5v-350h245q20 0 25 -11t-9 -26l-383 -426q-14 -15 -33.5 -15t-32.5 15l-379 426q-13 15 -8.5 26t25.5 11h250v350q0 21 14.5 35.5t35.5 14.5zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
+<glyph unicode="&#xe167;" d="M583 1182l378 -435q14 -15 9 -31t-26 -16h-244v-250q0 -20 -17 -35t-39 -15h-200q-20 0 -32 14.5t-12 35.5v250h-250q-20 0 -25.5 16.5t8.5 31.5l383 431q14 16 33.5 17t33.5 -14zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
+<glyph unicode="&#xe168;" d="M396 723l369 369q7 7 17.5 7t17.5 -7l139 -139q7 -8 7 -18.5t-7 -17.5l-525 -525q-7 -8 -17.5 -8t-17.5 8l-292 291q-7 8 -7 18t7 18l139 139q8 7 18.5 7t17.5 -7zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50 h-100z" />
+<glyph unicode="&#xe169;" d="M135 1023l142 142q14 14 35 14t35 -14l77 -77l-212 -212l-77 76q-14 15 -14 36t14 35zM655 855l210 210q14 14 24.5 10t10.5 -25l-2 -599q-1 -20 -15.5 -35t-35.5 -15l-597 -1q-21 0 -25 10.5t10 24.5l208 208l-154 155l212 212zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5 v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
+<glyph unicode="&#xe170;" d="M350 1200l599 -2q20 -1 35 -15.5t15 -35.5l1 -597q0 -21 -10.5 -25t-24.5 10l-208 208l-155 -154l-212 212l155 154l-210 210q-14 14 -10 24.5t25 10.5zM524 512l-76 -77q-15 -14 -36 -14t-35 14l-142 142q-14 14 -14 35t14 35l77 77zM50 300h1000q21 0 35.5 -14.5 t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
+<glyph unicode="&#xe171;" d="M1200 103l-483 276l-314 -399v423h-399l1196 796v-1096zM483 424v-230l683 953z" />
+<glyph unicode="&#xe172;" d="M1100 1000v-850q0 -21 -14.5 -35.5t-35.5 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200z" />
+<glyph unicode="&#xe173;" d="M1100 1000l-2 -149l-299 -299l-95 95q-9 9 -21.5 9t-21.5 -9l-149 -147h-312v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1132 638l106 -106q7 -7 7 -17.5t-7 -17.5l-420 -421q-8 -7 -18 -7 t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l297 297q7 7 17.5 7t17.5 -7z" />
+<glyph unicode="&#xe174;" d="M1100 1000v-269l-103 -103l-134 134q-15 15 -33.5 16.5t-34.5 -12.5l-266 -266h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1202 572l70 -70q15 -15 15 -35.5t-15 -35.5l-131 -131 l131 -131q15 -15 15 -35.5t-15 -35.5l-70 -70q-15 -15 -35.5 -15t-35.5 15l-131 131l-131 -131q-15 -15 -35.5 -15t-35.5 15l-70 70q-15 15 -15 35.5t15 35.5l131 131l-131 131q-15 15 -15 35.5t15 35.5l70 70q15 15 35.5 15t35.5 -15l131 -131l131 131q15 15 35.5 15 t35.5 -15z" />
+<glyph unicode="&#xe175;" d="M1100 1000v-300h-350q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM850 600h100q21 0 35.5 -14.5t14.5 -35.5v-250h150q21 0 25 -10.5t-10 -24.5 l-230 -230q-14 -14 -35 -14t-35 14l-230 230q-14 14 -10 24.5t25 10.5h150v250q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe176;" d="M1100 1000v-400l-165 165q-14 15 -35 15t-35 -15l-263 -265h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM935 565l230 -229q14 -15 10 -25.5t-25 -10.5h-150v-250q0 -20 -14.5 -35 t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35v250h-150q-21 0 -25 10.5t10 25.5l230 229q14 15 35 15t35 -15z" />
+<glyph unicode="&#xe177;" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-150h-1200v150q0 21 14.5 35.5t35.5 14.5zM1200 800v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v550h1200zM100 500v-200h400v200h-400z" />
+<glyph unicode="&#xe178;" d="M935 1165l248 -230q14 -14 14 -35t-14 -35l-248 -230q-14 -14 -24.5 -10t-10.5 25v150h-400v200h400v150q0 21 10.5 25t24.5 -10zM200 800h-50q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v-200zM400 800h-100v200h100v-200zM18 435l247 230 q14 14 24.5 10t10.5 -25v-150h400v-200h-400v-150q0 -21 -10.5 -25t-24.5 10l-247 230q-15 14 -15 35t15 35zM900 300h-100v200h100v-200zM1000 500h51q20 0 34.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-34.5 -14.5h-51v200z" />
+<glyph unicode="&#xe179;" d="M862 1073l276 116q25 18 43.5 8t18.5 -41v-1106q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v397q-4 1 -11 5t-24 17.5t-30 29t-24 42t-11 56.5v359q0 31 18.5 65t43.5 52zM550 1200q22 0 34.5 -12.5t14.5 -24.5l1 -13v-450q0 -28 -10.5 -59.5 t-25 -56t-29 -45t-25.5 -31.5l-10 -11v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447q-4 4 -11 11.5t-24 30.5t-30 46t-24 55t-11 60v450q0 2 0.5 5.5t4 12t8.5 15t14.5 12t22.5 5.5q20 0 32.5 -12.5t14.5 -24.5l3 -13v-350h100v350v5.5t2.5 12 t7 15t15 12t25.5 5.5q23 0 35.5 -12.5t13.5 -24.5l1 -13v-350h100v350q0 2 0.5 5.5t3 12t7 15t15 12t24.5 5.5z" />
+<glyph unicode="&#xe180;" d="M1200 1100v-56q-4 0 -11 -0.5t-24 -3t-30 -7.5t-24 -15t-11 -24v-888q0 -22 25 -34.5t50 -13.5l25 -2v-56h-400v56q75 0 87.5 6.5t12.5 43.5v394h-500v-394q0 -37 12.5 -43.5t87.5 -6.5v-56h-400v56q4 0 11 0.5t24 3t30 7.5t24 15t11 24v888q0 22 -25 34.5t-50 13.5 l-25 2v56h400v-56q-75 0 -87.5 -6.5t-12.5 -43.5v-394h500v394q0 37 -12.5 43.5t-87.5 6.5v56h400z" />
+<glyph unicode="&#xe181;" d="M675 1000h375q21 0 35.5 -14.5t14.5 -35.5v-150h-105l-295 -98v98l-200 200h-400l100 100h375zM100 900h300q41 0 70.5 -29.5t29.5 -70.5v-500q0 -41 -29.5 -70.5t-70.5 -29.5h-300q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5zM100 800v-200h300v200 h-300zM1100 535l-400 -133v163l400 133v-163zM100 500v-200h300v200h-300zM1100 398v-248q0 -21 -14.5 -35.5t-35.5 -14.5h-375l-100 -100h-375l-100 100h400l200 200h105z" />
+<glyph unicode="&#xe182;" d="M17 1007l162 162q17 17 40 14t37 -22l139 -194q14 -20 11 -44.5t-20 -41.5l-119 -118q102 -142 228 -268t267 -227l119 118q17 17 42.5 19t44.5 -12l192 -136q19 -14 22.5 -37.5t-13.5 -40.5l-163 -162q-3 -1 -9.5 -1t-29.5 2t-47.5 6t-62.5 14.5t-77.5 26.5t-90 42.5 t-101.5 60t-111 83t-119 108.5q-74 74 -133.5 150.5t-94.5 138.5t-60 119.5t-34.5 100t-15 74.5t-4.5 48z" />
+<glyph unicode="&#xe183;" d="M600 1100q92 0 175 -10.5t141.5 -27t108.5 -36.5t81.5 -40t53.5 -37t31 -27l9 -10v-200q0 -21 -14.5 -33t-34.5 -9l-202 34q-20 3 -34.5 20t-14.5 38v146q-141 24 -300 24t-300 -24v-146q0 -21 -14.5 -38t-34.5 -20l-202 -34q-20 -3 -34.5 9t-14.5 33v200q3 4 9.5 10.5 t31 26t54 37.5t80.5 39.5t109 37.5t141 26.5t175 10.5zM600 795q56 0 97 -9.5t60 -23.5t30 -28t12 -24l1 -10v-50l365 -303q14 -15 24.5 -40t10.5 -45v-212q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v212q0 20 10.5 45t24.5 40l365 303v50 q0 4 1 10.5t12 23t30 29t60 22.5t97 10z" />
+<glyph unicode="&#xe184;" d="M1100 700l-200 -200h-600l-200 200v500h200v-200h200v200h200v-200h200v200h200v-500zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5 t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe185;" d="M700 1100h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-1000h300v1000q0 41 -29.5 70.5t-70.5 29.5zM1100 800h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-700h300v700q0 41 -29.5 70.5t-70.5 29.5zM400 0h-300v400q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-400z " />
+<glyph unicode="&#xe186;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
+<glyph unicode="&#xe187;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 300h-100v200h-100v-200h-100v500h100v-200h100v200h100v-500zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
+<glyph unicode="&#xe188;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-300h200v-100h-300v500h300v-100zM900 700h-200v-300h200v-100h-300v500h300v-100z" />
+<glyph unicode="&#xe189;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 400l-300 150l300 150v-300zM900 550l-300 -150v300z" />
+<glyph unicode="&#xe190;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM900 300h-700v500h700v-500zM800 700h-130q-38 0 -66.5 -43t-28.5 -108t27 -107t68 -42h130v300zM300 700v-300 h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130z" />
+<glyph unicode="&#xe191;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 300h-100v400h-100v100h200v-500z M700 300h-100v100h100v-100z" />
+<glyph unicode="&#xe192;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM300 700h200v-400h-300v500h100v-100zM900 300h-100v400h-100v100h200v-500zM300 600v-200h100v200h-100z M700 300h-100v100h100v-100z" />
+<glyph unicode="&#xe193;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 500l-199 -200h-100v50l199 200v150h-200v100h300v-300zM900 300h-100v400h-100v100h200v-500zM701 300h-100 v100h100v-100z" />
+<glyph unicode="&#xe194;" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700h-300v-200h300v-100h-300l-100 100v200l100 100h300v-100z" />
+<glyph unicode="&#xe195;" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700v-100l-50 -50l100 -100v-50h-100l-100 100h-150v-100h-100v400h300zM500 700v-100h200v100h-200z" />
+<glyph unicode="&#xe197;" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -207t-85 -207t-205 -86.5h-128v250q0 21 -14.5 35.5t-35.5 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-250h-222q-80 0 -136 57.5t-56 136.5q0 69 43 122.5t108 67.5q-2 19 -2 37q0 100 49 185 t134 134t185 49zM525 500h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -244q-13 -16 -32 -16t-32 16l-223 244q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe198;" d="M502 1089q110 0 201 -59.5t135 -156.5q43 15 89 15q121 0 206 -86.5t86 -206.5q0 -99 -60 -181t-150 -110l-378 360q-13 16 -31.5 16t-31.5 -16l-381 -365h-9q-79 0 -135.5 57.5t-56.5 136.5q0 69 43 122.5t108 67.5q-2 19 -2 38q0 100 49 184.5t133.5 134t184.5 49.5z M632 467l223 -228q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5q199 204 223 228q19 19 31.5 19t32.5 -19z" />
+<glyph unicode="&#xe199;" d="M700 100v100h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170l-270 -300h400v-100h-50q-21 0 -35.5 -14.5t-14.5 -35.5v-50h400v50q0 21 -14.5 35.5t-35.5 14.5h-50z" />
+<glyph unicode="&#xe200;" d="M600 1179q94 0 167.5 -56.5t99.5 -145.5q89 -6 150.5 -71.5t61.5 -155.5q0 -61 -29.5 -112.5t-79.5 -82.5q9 -29 9 -55q0 -74 -52.5 -126.5t-126.5 -52.5q-55 0 -100 30v-251q21 0 35.5 -14.5t14.5 -35.5v-50h-300v50q0 21 14.5 35.5t35.5 14.5v251q-45 -30 -100 -30 q-74 0 -126.5 52.5t-52.5 126.5q0 18 4 38q-47 21 -75.5 65t-28.5 97q0 74 52.5 126.5t126.5 52.5q5 0 23 -2q0 2 -1 10t-1 13q0 116 81.5 197.5t197.5 81.5z" />
+<glyph unicode="&#xe201;" d="M1010 1010q111 -111 150.5 -260.5t0 -299t-150.5 -260.5q-83 -83 -191.5 -126.5t-218.5 -43.5t-218.5 43.5t-191.5 126.5q-111 111 -150.5 260.5t0 299t150.5 260.5q83 83 191.5 126.5t218.5 43.5t218.5 -43.5t191.5 -126.5zM476 1065q-4 0 -8 -1q-121 -34 -209.5 -122.5 t-122.5 -209.5q-4 -12 2.5 -23t18.5 -14l36 -9q3 -1 7 -1q23 0 29 22q27 96 98 166q70 71 166 98q11 3 17.5 13.5t3.5 22.5l-9 35q-3 13 -14 19q-7 4 -15 4zM512 920q-4 0 -9 -2q-80 -24 -138.5 -82.5t-82.5 -138.5q-4 -13 2 -24t19 -14l34 -9q4 -1 8 -1q22 0 28 21 q18 58 58.5 98.5t97.5 58.5q12 3 18 13.5t3 21.5l-9 35q-3 12 -14 19q-7 4 -15 4zM719.5 719.5q-49.5 49.5 -119.5 49.5t-119.5 -49.5t-49.5 -119.5t49.5 -119.5t119.5 -49.5t119.5 49.5t49.5 119.5t-49.5 119.5zM855 551q-22 0 -28 -21q-18 -58 -58.5 -98.5t-98.5 -57.5 q-11 -4 -17 -14.5t-3 -21.5l9 -35q3 -12 14 -19q7 -4 15 -4q4 0 9 2q80 24 138.5 82.5t82.5 138.5q4 13 -2.5 24t-18.5 14l-34 9q-4 1 -8 1zM1000 515q-23 0 -29 -22q-27 -96 -98 -166q-70 -71 -166 -98q-11 -3 -17.5 -13.5t-3.5 -22.5l9 -35q3 -13 14 -19q7 -4 15 -4 q4 0 8 1q121 34 209.5 122.5t122.5 209.5q4 12 -2.5 23t-18.5 14l-36 9q-3 1 -7 1z" />
+<glyph unicode="&#xe202;" d="M700 800h300v-380h-180v200h-340v-200h-380v755q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM700 300h162l-212 -212l-212 212h162v200h100v-200zM520 0h-395q-10 0 -17.5 7.5t-7.5 17.5v395zM1000 220v-195q0 -10 -7.5 -17.5t-17.5 -7.5h-195z" />
+<glyph unicode="&#xe203;" d="M700 800h300v-520l-350 350l-550 -550v1095q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM862 200h-162v-200h-100v200h-162l212 212zM480 0h-355q-10 0 -17.5 7.5t-7.5 17.5v55h380v-80zM1000 80v-55q0 -10 -7.5 -17.5t-17.5 -7.5h-155v80h180z" />
+<glyph unicode="&#xe204;" d="M1162 800h-162v-200h100l100 -100h-300v300h-162l212 212zM200 800h200q27 0 40 -2t29.5 -10.5t23.5 -30t7 -57.5h300v-100h-600l-200 -350v450h100q0 36 7 57.5t23.5 30t29.5 10.5t40 2zM800 400h240l-240 -400h-800l300 500h500v-100z" />
+<glyph unicode="&#xe205;" d="M650 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM1000 850v150q41 0 70.5 -29.5t29.5 -70.5v-800 q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-1 0 -20 4l246 246l-326 326v324q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM412 250l-212 -212v162h-200v100h200v162z" />
+<glyph unicode="&#xe206;" d="M450 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM800 850v150q41 0 70.5 -29.5t29.5 -70.5v-500 h-200v-300h200q0 -36 -7 -57.5t-23.5 -30t-29.5 -10.5t-40 -2h-600q-41 0 -70.5 29.5t-29.5 70.5v800q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM1212 250l-212 -212v162h-200v100h200v162z" />
+<glyph unicode="&#xe209;" d="M658 1197l637 -1104q23 -38 7 -65.5t-60 -27.5h-1276q-44 0 -60 27.5t7 65.5l637 1104q22 39 54 39t54 -39zM704 800h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM500 300v-100h200 v100h-200z" />
+<glyph unicode="&#xe210;" d="M425 1100h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM825 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM25 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5zM425 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5 v150q0 10 7.5 17.5t17.5 7.5zM25 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe211;" d="M700 1200h100v-200h-100v-100h350q62 0 86.5 -39.5t-3.5 -94.5l-66 -132q-41 -83 -81 -134h-772q-40 51 -81 134l-66 132q-28 55 -3.5 94.5t86.5 39.5h350v100h-100v200h100v100h200v-100zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100 h-950l138 100h-13q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe212;" d="M600 1300q40 0 68.5 -29.5t28.5 -70.5h-194q0 41 28.5 70.5t68.5 29.5zM443 1100h314q18 -37 18 -75q0 -8 -3 -25h328q41 0 44.5 -16.5t-30.5 -38.5l-175 -145h-678l-178 145q-34 22 -29 38.5t46 16.5h328q-3 17 -3 25q0 38 18 75zM250 700h700q21 0 35.5 -14.5 t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-150v-200l275 -200h-950l275 200v200h-150q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe213;" d="M600 1181q75 0 128 -53t53 -128t-53 -128t-128 -53t-128 53t-53 128t53 128t128 53zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13 l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe214;" d="M600 1300q47 0 92.5 -53.5t71 -123t25.5 -123.5q0 -78 -55.5 -133.5t-133.5 -55.5t-133.5 55.5t-55.5 133.5q0 62 34 143l144 -143l111 111l-163 163q34 26 63 26zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45 zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe215;" d="M600 1200l300 -161v-139h-300q0 -57 18.5 -108t50 -91.5t63 -72t70 -67.5t57.5 -61h-530q-60 83 -90.5 177.5t-30.5 178.5t33 164.5t87.5 139.5t126 96.5t145.5 41.5v-98zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100 h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe216;" d="M600 1300q41 0 70.5 -29.5t29.5 -70.5v-78q46 -26 73 -72t27 -100v-50h-400v50q0 54 27 100t73 72v78q0 41 29.5 70.5t70.5 29.5zM400 800h400q54 0 100 -27t72 -73h-172v-100h200v-100h-200v-100h200v-100h-200v-100h200q0 -83 -58.5 -141.5t-141.5 -58.5h-400 q-83 0 -141.5 58.5t-58.5 141.5v400q0 83 58.5 141.5t141.5 58.5z" />
+<glyph unicode="&#xe218;" d="M150 1100h900q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM125 400h950q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-283l224 -224q13 -13 13 -31.5t-13 -32 t-31.5 -13.5t-31.5 13l-88 88h-524l-87 -88q-13 -13 -32 -13t-32 13.5t-13 32t13 31.5l224 224h-289q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM541 300l-100 -100h324l-100 100h-124z" />
+<glyph unicode="&#xe219;" d="M200 1100h800q83 0 141.5 -58.5t58.5 -141.5v-200h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100v200q0 83 58.5 141.5t141.5 58.5zM100 600h1000q41 0 70.5 -29.5 t29.5 -70.5v-300h-1200v300q0 41 29.5 70.5t70.5 29.5zM300 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200zM1100 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200z" />
+<glyph unicode="&#xe221;" d="M480 1165l682 -683q31 -31 31 -75.5t-31 -75.5l-131 -131h-481l-517 518q-32 31 -32 75.5t32 75.5l295 296q31 31 75.5 31t76.5 -31zM108 794l342 -342l303 304l-341 341zM250 100h800q21 0 35.5 -14.5t14.5 -35.5v-50h-900v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe223;" d="M1057 647l-189 506q-8 19 -27.5 33t-40.5 14h-400q-21 0 -40.5 -14t-27.5 -33l-189 -506q-8 -19 1.5 -33t30.5 -14h625v-150q0 -21 14.5 -35.5t35.5 -14.5t35.5 14.5t14.5 35.5v150h125q21 0 30.5 14t1.5 33zM897 0h-595v50q0 21 14.5 35.5t35.5 14.5h50v50 q0 21 14.5 35.5t35.5 14.5h48v300h200v-300h47q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-50z" />
+<glyph unicode="&#xe224;" d="M900 800h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-375v591l-300 300v84q0 10 7.5 17.5t17.5 7.5h375v-400zM1200 900h-200v200zM400 600h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-650q-10 0 -17.5 7.5t-7.5 17.5v950q0 10 7.5 17.5t17.5 7.5h375v-400zM700 700h-200v200z " />
+<glyph unicode="&#xe225;" d="M484 1095h195q75 0 146 -32.5t124 -86t89.5 -122.5t48.5 -142q18 -14 35 -20q31 -10 64.5 6.5t43.5 48.5q10 34 -15 71q-19 27 -9 43q5 8 12.5 11t19 -1t23.5 -16q41 -44 39 -105q-3 -63 -46 -106.5t-104 -43.5h-62q-7 -55 -35 -117t-56 -100l-39 -234q-3 -20 -20 -34.5 t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l12 70q-49 -14 -91 -14h-195q-24 0 -65 8l-11 -64q-3 -20 -20 -34.5t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l26 157q-84 74 -128 175l-159 53q-19 7 -33 26t-14 40v50q0 21 14.5 35.5t35.5 14.5h124q11 87 56 166l-111 95 q-16 14 -12.5 23.5t24.5 9.5h203q116 101 250 101zM675 1000h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h250q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="&#xe226;" d="M641 900l423 247q19 8 42 2.5t37 -21.5l32 -38q14 -15 12.5 -36t-17.5 -34l-139 -120h-390zM50 1100h106q67 0 103 -17t66 -71l102 -212h823q21 0 35.5 -14.5t14.5 -35.5v-50q0 -21 -14 -40t-33 -26l-737 -132q-23 -4 -40 6t-26 25q-42 67 -100 67h-300q-62 0 -106 44 t-44 106v200q0 62 44 106t106 44zM173 928h-80q-19 0 -28 -14t-9 -35v-56q0 -51 42 -51h134q16 0 21.5 8t5.5 24q0 11 -16 45t-27 51q-18 28 -43 28zM550 727q-32 0 -54.5 -22.5t-22.5 -54.5t22.5 -54.5t54.5 -22.5t54.5 22.5t22.5 54.5t-22.5 54.5t-54.5 22.5zM130 389 l152 130q18 19 34 24t31 -3.5t24.5 -17.5t25.5 -28q28 -35 50.5 -51t48.5 -13l63 5l48 -179q13 -61 -3.5 -97.5t-67.5 -79.5l-80 -69q-47 -40 -109 -35.5t-103 51.5l-130 151q-40 47 -35.5 109.5t51.5 102.5zM380 377l-102 -88q-31 -27 2 -65l37 -43q13 -15 27.5 -19.5 t31.5 6.5l61 53q19 16 14 49q-2 20 -12 56t-17 45q-11 12 -19 14t-23 -8z" />
+<glyph unicode="&#xe227;" d="M625 1200h150q10 0 17.5 -7.5t7.5 -17.5v-109q79 -33 131 -87.5t53 -128.5q1 -46 -15 -84.5t-39 -61t-46 -38t-39 -21.5l-17 -6q6 0 15 -1.5t35 -9t50 -17.5t53 -30t50 -45t35.5 -64t14.5 -84q0 -59 -11.5 -105.5t-28.5 -76.5t-44 -51t-49.5 -31.5t-54.5 -16t-49.5 -6.5 t-43.5 -1v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-100v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-175q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v600h-75q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5h175v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h100v75q0 10 7.5 17.5t17.5 7.5zM400 900v-200h263q28 0 48.5 10.5t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-263zM400 500v-200h363q28 0 48.5 10.5 t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-363z" />
+<glyph unicode="&#xe230;" d="M212 1198h780q86 0 147 -61t61 -147v-416q0 -51 -18 -142.5t-36 -157.5l-18 -66q-29 -87 -93.5 -146.5t-146.5 -59.5h-572q-82 0 -147 59t-93 147q-8 28 -20 73t-32 143.5t-20 149.5v416q0 86 61 147t147 61zM600 1045q-70 0 -132.5 -11.5t-105.5 -30.5t-78.5 -41.5 t-57 -45t-36 -41t-20.5 -30.5l-6 -12l156 -243h560l156 243q-2 5 -6 12.5t-20 29.5t-36.5 42t-57 44.5t-79 42t-105 29.5t-132.5 12zM762 703h-157l195 261z" />
+<glyph unicode="&#xe231;" d="M475 1300h150q103 0 189 -86t86 -189v-500q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
+<glyph unicode="&#xe232;" d="M475 1300h96q0 -150 89.5 -239.5t239.5 -89.5v-446q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
+<glyph unicode="&#xe233;" d="M1294 767l-638 -283l-378 170l-78 -60v-224l100 -150v-199l-150 148l-150 -149v200l100 150v250q0 4 -0.5 10.5t0 9.5t1 8t3 8t6.5 6l47 40l-147 65l642 283zM1000 380l-350 -166l-350 166v147l350 -165l350 165v-147z" />
+<glyph unicode="&#xe234;" d="M250 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM650 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM1050 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
+<glyph unicode="&#xe235;" d="M550 1100q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 700q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 300q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
+<glyph unicode="&#xe236;" d="M125 1100h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM125 700h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM125 300h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe237;" d="M350 1200h500q162 0 256 -93.5t94 -256.5v-500q0 -165 -93.5 -257.5t-256.5 -92.5h-500q-165 0 -257.5 92.5t-92.5 257.5v500q0 165 92.5 257.5t257.5 92.5zM900 1000h-600q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h600q41 0 70.5 29.5 t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5zM350 900h500q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-500q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 14.5 35.5t35.5 14.5zM400 800v-200h400v200h-400z" />
+<glyph unicode="&#xe238;" d="M150 1100h1000q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe239;" d="M650 1187q87 -67 118.5 -156t0 -178t-118.5 -155q-87 66 -118.5 155t0 178t118.5 156zM300 800q124 0 212 -88t88 -212q-124 0 -212 88t-88 212zM1000 800q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM300 500q124 0 212 -88t88 -212q-124 0 -212 88t-88 212z M1000 500q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM700 199v-144q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v142q40 -4 43 -4q17 0 57 6z" />
+<glyph unicode="&#xe240;" d="M745 878l69 19q25 6 45 -12l298 -295q11 -11 15 -26.5t-2 -30.5q-5 -14 -18 -23.5t-28 -9.5h-8q1 0 1 -13q0 -29 -2 -56t-8.5 -62t-20 -63t-33 -53t-51 -39t-72.5 -14h-146q-184 0 -184 288q0 24 10 47q-20 4 -62 4t-63 -4q11 -24 11 -47q0 -288 -184 -288h-142 q-48 0 -84.5 21t-56 51t-32 71.5t-16 75t-3.5 68.5q0 13 2 13h-7q-15 0 -27.5 9.5t-18.5 23.5q-6 15 -2 30.5t15 25.5l298 296q20 18 46 11l76 -19q20 -5 30.5 -22.5t5.5 -37.5t-22.5 -31t-37.5 -5l-51 12l-182 -193h891l-182 193l-44 -12q-20 -5 -37.5 6t-22.5 31t6 37.5 t31 22.5z" />
+<glyph unicode="&#xe241;" d="M1200 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM500 450h-25q0 15 -4 24.5t-9 14.5t-17 7.5t-20 3t-25 0.5h-100v-425q0 -11 12.5 -17.5t25.5 -7.5h12v-50h-200v50q50 0 50 25v425h-100q-17 0 -25 -0.5t-20 -3t-17 -7.5t-9 -14.5t-4 -24.5h-25v150h500v-150z" />
+<glyph unicode="&#xe242;" d="M1000 300v50q-25 0 -55 32q-14 14 -25 31t-16 27l-4 11l-289 747h-69l-300 -754q-18 -35 -39 -56q-9 -9 -24.5 -18.5t-26.5 -14.5l-11 -5v-50h273v50q-49 0 -78.5 21.5t-11.5 67.5l69 176h293l61 -166q13 -34 -3.5 -66.5t-55.5 -32.5v-50h312zM412 691l134 342l121 -342 h-255zM1100 150v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5z" />
+<glyph unicode="&#xe243;" d="M50 1200h1100q21 0 35.5 -14.5t14.5 -35.5v-1100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5zM611 1118h-70q-13 0 -18 -12l-299 -753q-17 -32 -35 -51q-18 -18 -56 -34q-12 -5 -12 -18v-50q0 -8 5.5 -14t14.5 -6 h273q8 0 14 6t6 14v50q0 8 -6 14t-14 6q-55 0 -71 23q-10 14 0 39l63 163h266l57 -153q11 -31 -6 -55q-12 -17 -36 -17q-8 0 -14 -6t-6 -14v-50q0 -8 6 -14t14 -6h313q8 0 14 6t6 14v50q0 7 -5.5 13t-13.5 7q-17 0 -42 25q-25 27 -40 63h-1l-288 748q-5 12 -19 12zM639 611 h-197l103 264z" />
+<glyph unicode="&#xe244;" d="M1200 1100h-1200v100h1200v-100zM50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 1000h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM700 900v-300h300v300h-300z" />
+<glyph unicode="&#xe245;" d="M50 1200h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 700h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM700 600v-300h300v300h-300zM1200 0h-1200v100h1200v-100z" />
+<glyph unicode="&#xe246;" d="M50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-350h100v150q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-150h100v-100h-100v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v150h-100v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM700 700v-300h300v300h-300z" />
+<glyph unicode="&#xe247;" d="M100 0h-100v1200h100v-1200zM250 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM300 1000v-300h300v300h-300zM250 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe248;" d="M600 1100h150q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-100h450q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h350v100h-150q-21 0 -35.5 14.5 t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h150v100h100v-100zM400 1000v-300h300v300h-300z" />
+<glyph unicode="&#xe249;" d="M1200 0h-100v1200h100v-1200zM550 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM600 1000v-300h300v300h-300zM50 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe250;" d="M865 565l-494 -494q-23 -23 -41 -23q-14 0 -22 13.5t-8 38.5v1000q0 25 8 38.5t22 13.5q18 0 41 -23l494 -494q14 -14 14 -35t-14 -35z" />
+<glyph unicode="&#xe251;" d="M335 635l494 494q29 29 50 20.5t21 -49.5v-1000q0 -41 -21 -49.5t-50 20.5l-494 494q-14 14 -14 35t14 35z" />
+<glyph unicode="&#xe252;" d="M100 900h1000q41 0 49.5 -21t-20.5 -50l-494 -494q-14 -14 -35 -14t-35 14l-494 494q-29 29 -20.5 50t49.5 21z" />
+<glyph unicode="&#xe253;" d="M635 865l494 -494q29 -29 20.5 -50t-49.5 -21h-1000q-41 0 -49.5 21t20.5 50l494 494q14 14 35 14t35 -14z" />
+<glyph unicode="&#xe254;" d="M700 741v-182l-692 -323v221l413 193l-413 193v221zM1200 0h-800v200h800v-200z" />
+<glyph unicode="&#xe255;" d="M1200 900h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300zM0 700h50q0 21 4 37t9.5 26.5t18 17.5t22 11t28.5 5.5t31 2t37 0.5h100v-550q0 -22 -25 -34.5t-50 -13.5l-25 -2v-100h400v100q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v550h100q25 0 37 -0.5t31 -2 t28.5 -5.5t22 -11t18 -17.5t9.5 -26.5t4 -37h50v300h-800v-300z" />
+<glyph unicode="&#xe256;" d="M800 700h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-100v-550q0 -22 25 -34.5t50 -14.5l25 -1v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v550h-100q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h800v-300zM1100 200h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300z" />
+<glyph unicode="&#xe257;" d="M701 1098h160q16 0 21 -11t-7 -23l-464 -464l464 -464q12 -12 7 -23t-21 -11h-160q-13 0 -23 9l-471 471q-7 8 -7 18t7 18l471 471q10 9 23 9z" />
+<glyph unicode="&#xe258;" d="M339 1098h160q13 0 23 -9l471 -471q7 -8 7 -18t-7 -18l-471 -471q-10 -9 -23 -9h-160q-16 0 -21 11t7 23l464 464l-464 464q-12 12 -7 23t21 11z" />
+<glyph unicode="&#xe259;" d="M1087 882q11 -5 11 -21v-160q0 -13 -9 -23l-471 -471q-8 -7 -18 -7t-18 7l-471 471q-9 10 -9 23v160q0 16 11 21t23 -7l464 -464l464 464q12 12 23 7z" />
+<glyph unicode="&#xe260;" d="M618 993l471 -471q9 -10 9 -23v-160q0 -16 -11 -21t-23 7l-464 464l-464 -464q-12 -12 -23 -7t-11 21v160q0 13 9 23l471 471q8 7 18 7t18 -7z" />
+<glyph unicode="&#xf8ff;" d="M1000 1200q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM450 1000h100q21 0 40 -14t26 -33l79 -194q5 1 16 3q34 6 54 9.5t60 7t65.5 1t61 -10t56.5 -23t42.5 -42t29 -64t5 -92t-19.5 -121.5q-1 -7 -3 -19.5t-11 -50t-20.5 -73t-32.5 -81.5t-46.5 -83t-64 -70 t-82.5 -50q-13 -5 -42 -5t-65.5 2.5t-47.5 2.5q-14 0 -49.5 -3.5t-63 -3.5t-43.5 7q-57 25 -104.5 78.5t-75 111.5t-46.5 112t-26 90l-7 35q-15 63 -18 115t4.5 88.5t26 64t39.5 43.5t52 25.5t58.5 13t62.5 2t59.5 -4.5t55.5 -8l-147 192q-12 18 -5.5 30t27.5 12z" />
+<glyph unicode="&#x1f511;" d="M250 1200h600q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-500l-255 -178q-19 -9 -32 -1t-13 29v650h-150q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM400 1100v-100h300v100h-300z" />
+<glyph unicode="&#x1f6aa;" d="M250 1200h750q39 0 69.5 -40.5t30.5 -84.5v-933l-700 -117v950l600 125h-700v-1000h-100v1025q0 23 15.5 49t34.5 26zM500 525v-100l100 20v100z" />
+</font>
+</defs></svg> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/bootstrap/fonts/glyphicons-halflings-regular.ttf b/common/src/main/webapp/thirdparty/bootstrap/fonts/glyphicons-halflings-regular.ttf
new file mode 100644
index 0000000..1413fc6
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/bootstrap/fonts/glyphicons-halflings-regular.ttf
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/bootstrap/fonts/glyphicons-halflings-regular.woff b/common/src/main/webapp/thirdparty/bootstrap/fonts/glyphicons-halflings-regular.woff
new file mode 100644
index 0000000..9e61285
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/bootstrap/fonts/glyphicons-halflings-regular.woff
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/bootstrap/fonts/glyphicons-halflings-regular.woff2 b/common/src/main/webapp/thirdparty/bootstrap/fonts/glyphicons-halflings-regular.woff2
new file mode 100644
index 0000000..64539b5
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/bootstrap/fonts/glyphicons-halflings-regular.woff2
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/bootstrap/js/bootstrap.js b/common/src/main/webapp/thirdparty/bootstrap/js/bootstrap.js
new file mode 100644
index 0000000..8ae571b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/bootstrap/js/bootstrap.js
@@ -0,0 +1,1951 @@
+/*!
+ * Bootstrap v3.1.1 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') }
+
+/* ========================================================================
+ * Bootstrap: transition.js v3.1.1
+ * http://getbootstrap.com/javascript/#transitions
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
+ // ============================================================
+
+ function transitionEnd() {
+ var el = document.createElement('bootstrap')
+
+ var transEndEventNames = {
+ 'WebkitTransition' : 'webkitTransitionEnd',
+ 'MozTransition' : 'transitionend',
+ 'OTransition' : 'oTransitionEnd otransitionend',
+ 'transition' : 'transitionend'
+ }
+
+ for (var name in transEndEventNames) {
+ if (el.style[name] !== undefined) {
+ return { end: transEndEventNames[name] }
+ }
+ }
+
+ return false // explicit for ie8 ( ._.)
+ }
+
+ // http://blog.alexmaccaw.com/css-transitions
+ $.fn.emulateTransitionEnd = function (duration) {
+ var called = false, $el = this
+ $(this).one($.support.transition.end, function () { called = true })
+ var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
+ setTimeout(callback, duration)
+ return this
+ }
+
+ $(function () {
+ $.support.transition = transitionEnd()
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: alert.js v3.1.1
+ * http://getbootstrap.com/javascript/#alerts
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // ALERT CLASS DEFINITION
+ // ======================
+
+ var dismiss = '[data-dismiss="alert"]'
+ var Alert = function (el) {
+ $(el).on('click', dismiss, this.close)
+ }
+
+ Alert.prototype.close = function (e) {
+ var $this = $(this)
+ var selector = $this.attr('data-target')
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
+ }
+
+ var $parent = $(selector)
+
+ if (e) e.preventDefault()
+
+ if (!$parent.length) {
+ $parent = $this.hasClass('alert') ? $this : $this.parent()
+ }
+
+ $parent.trigger(e = $.Event('close.bs.alert'))
+
+ if (e.isDefaultPrevented()) return
+
+ $parent.removeClass('in')
+
+ function removeElement() {
+ $parent.trigger('closed.bs.alert').remove()
+ }
+
+ $.support.transition && $parent.hasClass('fade') ?
+ $parent
+ .one($.support.transition.end, removeElement)
+ .emulateTransitionEnd(150) :
+ removeElement()
+ }
+
+
+ // ALERT PLUGIN DEFINITION
+ // =======================
+
+ var old = $.fn.alert
+
+ $.fn.alert = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.alert')
+
+ if (!data) $this.data('bs.alert', (data = new Alert(this)))
+ if (typeof option == 'string') data[option].call($this)
+ })
+ }
+
+ $.fn.alert.Constructor = Alert
+
+
+ // ALERT NO CONFLICT
+ // =================
+
+ $.fn.alert.noConflict = function () {
+ $.fn.alert = old
+ return this
+ }
+
+
+ // ALERT DATA-API
+ // ==============
+
+ $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: button.js v3.1.1
+ * http://getbootstrap.com/javascript/#buttons
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // BUTTON PUBLIC CLASS DEFINITION
+ // ==============================
+
+ var Button = function (element, options) {
+ this.$element = $(element)
+ this.options = $.extend({}, Button.DEFAULTS, options)
+ this.isLoading = false
+ }
+
+ Button.DEFAULTS = {
+ loadingText: 'loading...'
+ }
+
+ Button.prototype.setState = function (state) {
+ var d = 'disabled'
+ var $el = this.$element
+ var val = $el.is('input') ? 'val' : 'html'
+ var data = $el.data()
+
+ state = state + 'Text'
+
+ if (!data.resetText) $el.data('resetText', $el[val]())
+
+ $el[val](data[state] || this.options[state])
+
+ // push to event loop to allow forms to submit
+ setTimeout($.proxy(function () {
+ if (state == 'loadingText') {
+ this.isLoading = true
+ $el.addClass(d).attr(d, d)
+ } else if (this.isLoading) {
+ this.isLoading = false
+ $el.removeClass(d).removeAttr(d)
+ }
+ }, this), 0)
+ }
+
+ Button.prototype.toggle = function () {
+ var changed = true
+ var $parent = this.$element.closest('[data-toggle="buttons"]')
+
+ if ($parent.length) {
+ var $input = this.$element.find('input')
+ if ($input.prop('type') == 'radio') {
+ if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
+ else $parent.find('.active').removeClass('active')
+ }
+ if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
+ }
+
+ if (changed) this.$element.toggleClass('active')
+ }
+
+
+ // BUTTON PLUGIN DEFINITION
+ // ========================
+
+ var old = $.fn.button
+
+ $.fn.button = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.button')
+ var options = typeof option == 'object' && option
+
+ if (!data) $this.data('bs.button', (data = new Button(this, options)))
+
+ if (option == 'toggle') data.toggle()
+ else if (option) data.setState(option)
+ })
+ }
+
+ $.fn.button.Constructor = Button
+
+
+ // BUTTON NO CONFLICT
+ // ==================
+
+ $.fn.button.noConflict = function () {
+ $.fn.button = old
+ return this
+ }
+
+
+ // BUTTON DATA-API
+ // ===============
+
+ $(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) {
+ var $btn = $(e.target)
+ if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
+ $btn.button('toggle')
+ e.preventDefault()
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: carousel.js v3.1.1
+ * http://getbootstrap.com/javascript/#carousel
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // CAROUSEL CLASS DEFINITION
+ // =========================
+
+ var Carousel = function (element, options) {
+ this.$element = $(element)
+ this.$indicators = this.$element.find('.carousel-indicators')
+ this.options = options
+ this.paused =
+ this.sliding =
+ this.interval =
+ this.$active =
+ this.$items = null
+
+ this.options.pause == 'hover' && this.$element
+ .on('mouseenter', $.proxy(this.pause, this))
+ .on('mouseleave', $.proxy(this.cycle, this))
+ }
+
+ Carousel.DEFAULTS = {
+ interval: 5000,
+ pause: 'hover',
+ wrap: true
+ }
+
+ Carousel.prototype.cycle = function (e) {
+ e || (this.paused = false)
+
+ this.interval && clearInterval(this.interval)
+
+ this.options.interval
+ && !this.paused
+ && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
+
+ return this
+ }
+
+ Carousel.prototype.getActiveIndex = function () {
+ this.$active = this.$element.find('.item.active')
+ this.$items = this.$active.parent().children()
+
+ return this.$items.index(this.$active)
+ }
+
+ Carousel.prototype.to = function (pos) {
+ var that = this
+ var activeIndex = this.getActiveIndex()
+
+ if (pos > (this.$items.length - 1) || pos < 0) return
+
+ if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) })
+ if (activeIndex == pos) return this.pause().cycle()
+
+ return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
+ }
+
+ Carousel.prototype.pause = function (e) {
+ e || (this.paused = true)
+
+ if (this.$element.find('.next, .prev').length && $.support.transition) {
+ this.$element.trigger($.support.transition.end)
+ this.cycle(true)
+ }
+
+ this.interval = clearInterval(this.interval)
+
+ return this
+ }
+
+ Carousel.prototype.next = function () {
+ if (this.sliding) return
+ return this.slide('next')
+ }
+
+ Carousel.prototype.prev = function () {
+ if (this.sliding) return
+ return this.slide('prev')
+ }
+
+ Carousel.prototype.slide = function (type, next) {
+ var $active = this.$element.find('.item.active')
+ var $next = next || $active[type]()
+ var isCycling = this.interval
+ var direction = type == 'next' ? 'left' : 'right'
+ var fallback = type == 'next' ? 'first' : 'last'
+ var that = this
+
+ if (!$next.length) {
+ if (!this.options.wrap) return
+ $next = this.$element.find('.item')[fallback]()
+ }
+
+ if ($next.hasClass('active')) return this.sliding = false
+
+ var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })
+ this.$element.trigger(e)
+ if (e.isDefaultPrevented()) return
+
+ this.sliding = true
+
+ isCycling && this.pause()
+
+ if (this.$indicators.length) {
+ this.$indicators.find('.active').removeClass('active')
+ this.$element.one('slid.bs.carousel', function () {
+ var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
+ $nextIndicator && $nextIndicator.addClass('active')
+ })
+ }
+
+ if ($.support.transition && this.$element.hasClass('slide')) {
+ $next.addClass(type)
+ $next[0].offsetWidth // force reflow
+ $active.addClass(direction)
+ $next.addClass(direction)
+ $active
+ .one($.support.transition.end, function () {
+ $next.removeClass([type, direction].join(' ')).addClass('active')
+ $active.removeClass(['active', direction].join(' '))
+ that.sliding = false
+ setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0)
+ })
+ .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000)
+ } else {
+ $active.removeClass('active')
+ $next.addClass('active')
+ this.sliding = false
+ this.$element.trigger('slid.bs.carousel')
+ }
+
+ isCycling && this.cycle()
+
+ return this
+ }
+
+
+ // CAROUSEL PLUGIN DEFINITION
+ // ==========================
+
+ var old = $.fn.carousel
+
+ $.fn.carousel = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.carousel')
+ var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
+ var action = typeof option == 'string' ? option : options.slide
+
+ if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
+ if (typeof option == 'number') data.to(option)
+ else if (action) data[action]()
+ else if (options.interval) data.pause().cycle()
+ })
+ }
+
+ $.fn.carousel.Constructor = Carousel
+
+
+ // CAROUSEL NO CONFLICT
+ // ====================
+
+ $.fn.carousel.noConflict = function () {
+ $.fn.carousel = old
+ return this
+ }
+
+
+ // CAROUSEL DATA-API
+ // =================
+
+ $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
+ var $this = $(this), href
+ var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
+ var options = $.extend({}, $target.data(), $this.data())
+ var slideIndex = $this.attr('data-slide-to')
+ if (slideIndex) options.interval = false
+
+ $target.carousel(options)
+
+ if (slideIndex = $this.attr('data-slide-to')) {
+ $target.data('bs.carousel').to(slideIndex)
+ }
+
+ e.preventDefault()
+ })
+
+ $(window).on('load', function () {
+ $('[data-ride="carousel"]').each(function () {
+ var $carousel = $(this)
+ $carousel.carousel($carousel.data())
+ })
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: collapse.js v3.1.1
+ * http://getbootstrap.com/javascript/#collapse
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // COLLAPSE PUBLIC CLASS DEFINITION
+ // ================================
+
+ var Collapse = function (element, options) {
+ this.$element = $(element)
+ this.options = $.extend({}, Collapse.DEFAULTS, options)
+ this.transitioning = null
+
+ if (this.options.parent) this.$parent = $(this.options.parent)
+ if (this.options.toggle) this.toggle()
+ }
+
+ Collapse.DEFAULTS = {
+ toggle: true
+ }
+
+ Collapse.prototype.dimension = function () {
+ var hasWidth = this.$element.hasClass('width')
+ return hasWidth ? 'width' : 'height'
+ }
+
+ Collapse.prototype.show = function () {
+ if (this.transitioning || this.$element.hasClass('in')) return
+
+ var startEvent = $.Event('show.bs.collapse')
+ this.$element.trigger(startEvent)
+ if (startEvent.isDefaultPrevented()) return
+
+ var actives = this.$parent && this.$parent.find('> .panel > .in')
+
+ if (actives && actives.length) {
+ var hasData = actives.data('bs.collapse')
+ if (hasData && hasData.transitioning) return
+ actives.collapse('hide')
+ hasData || actives.data('bs.collapse', null)
+ }
+
+ var dimension = this.dimension()
+
+ this.$element
+ .removeClass('collapse')
+ .addClass('collapsing')
+ [dimension](0)
+
+ this.transitioning = 1
+
+ var complete = function () {
+ this.$element
+ .removeClass('collapsing')
+ .addClass('collapse in')
+ [dimension]('auto')
+ this.transitioning = 0
+ this.$element.trigger('shown.bs.collapse')
+ }
+
+ if (!$.support.transition) return complete.call(this)
+
+ var scrollSize = $.camelCase(['scroll', dimension].join('-'))
+
+ this.$element
+ .one($.support.transition.end, $.proxy(complete, this))
+ .emulateTransitionEnd(350)
+ [dimension](this.$element[0][scrollSize])
+ }
+
+ Collapse.prototype.hide = function () {
+ if (this.transitioning || !this.$element.hasClass('in')) return
+
+ var startEvent = $.Event('hide.bs.collapse')
+ this.$element.trigger(startEvent)
+ if (startEvent.isDefaultPrevented()) return
+
+ var dimension = this.dimension()
+
+ this.$element
+ [dimension](this.$element[dimension]())
+ [0].offsetHeight
+
+ this.$element
+ .addClass('collapsing')
+ .removeClass('collapse')
+ .removeClass('in')
+
+ this.transitioning = 1
+
+ var complete = function () {
+ this.transitioning = 0
+ this.$element
+ .trigger('hidden.bs.collapse')
+ .removeClass('collapsing')
+ .addClass('collapse')
+ }
+
+ if (!$.support.transition) return complete.call(this)
+
+ this.$element
+ [dimension](0)
+ .one($.support.transition.end, $.proxy(complete, this))
+ .emulateTransitionEnd(350)
+ }
+
+ Collapse.prototype.toggle = function () {
+ this[this.$element.hasClass('in') ? 'hide' : 'show']()
+ }
+
+
+ // COLLAPSE PLUGIN DEFINITION
+ // ==========================
+
+ var old = $.fn.collapse
+
+ $.fn.collapse = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.collapse')
+ var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
+
+ if (!data && options.toggle && option == 'show') option = !option
+ if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.collapse.Constructor = Collapse
+
+
+ // COLLAPSE NO CONFLICT
+ // ====================
+
+ $.fn.collapse.noConflict = function () {
+ $.fn.collapse = old
+ return this
+ }
+
+
+ // COLLAPSE DATA-API
+ // =================
+
+ $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) {
+ var $this = $(this), href
+ var target = $this.attr('data-target')
+ || e.preventDefault()
+ || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
+ var $target = $(target)
+ var data = $target.data('bs.collapse')
+ var option = data ? 'toggle' : $this.data()
+ var parent = $this.attr('data-parent')
+ var $parent = parent && $(parent)
+
+ if (!data || !data.transitioning) {
+ if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed')
+ $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
+ }
+
+ $target.collapse(option)
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: dropdown.js v3.1.1
+ * http://getbootstrap.com/javascript/#dropdowns
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // DROPDOWN CLASS DEFINITION
+ // =========================
+
+ var backdrop = '.dropdown-backdrop'
+ var toggle = '[data-toggle=dropdown]'
+ var Dropdown = function (element) {
+ $(element).on('click.bs.dropdown', this.toggle)
+ }
+
+ Dropdown.prototype.toggle = function (e) {
+ var $this = $(this)
+
+ if ($this.is('.disabled, :disabled')) return
+
+ var $parent = getParent($this)
+ var isActive = $parent.hasClass('open')
+
+ clearMenus()
+
+ if (!isActive) {
+ if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
+ // if mobile we use a backdrop because click events don't delegate
+ $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
+ }
+
+ var relatedTarget = { relatedTarget: this }
+ $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
+
+ if (e.isDefaultPrevented()) return
+
+ $parent
+ .toggleClass('open')
+ .trigger('shown.bs.dropdown', relatedTarget)
+
+ $this.focus()
+ }
+
+ return false
+ }
+
+ Dropdown.prototype.keydown = function (e) {
+ if (!/(38|40|27)/.test(e.keyCode)) return
+
+ var $this = $(this)
+
+ e.preventDefault()
+ e.stopPropagation()
+
+ if ($this.is('.disabled, :disabled')) return
+
+ var $parent = getParent($this)
+ var isActive = $parent.hasClass('open')
+
+ if (!isActive || (isActive && e.keyCode == 27)) {
+ if (e.which == 27) $parent.find(toggle).focus()
+ return $this.click()
+ }
+
+ var desc = ' li:not(.divider):visible a'
+ var $items = $parent.find('[role=menu]' + desc + ', [role=listbox]' + desc)
+
+ if (!$items.length) return
+
+ var index = $items.index($items.filter(':focus'))
+
+ if (e.keyCode == 38 && index > 0) index-- // up
+ if (e.keyCode == 40 && index < $items.length - 1) index++ // down
+ if (!~index) index = 0
+
+ $items.eq(index).focus()
+ }
+
+ function clearMenus(e) {
+ $(backdrop).remove()
+ $(toggle).each(function () {
+ var $parent = getParent($(this))
+ var relatedTarget = { relatedTarget: this }
+ if (!$parent.hasClass('open')) return
+ $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
+ if (e.isDefaultPrevented()) return
+ $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
+ })
+ }
+
+ function getParent($this) {
+ var selector = $this.attr('data-target')
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+ }
+
+ var $parent = selector && $(selector)
+
+ return $parent && $parent.length ? $parent : $this.parent()
+ }
+
+
+ // DROPDOWN PLUGIN DEFINITION
+ // ==========================
+
+ var old = $.fn.dropdown
+
+ $.fn.dropdown = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.dropdown')
+
+ if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
+ if (typeof option == 'string') data[option].call($this)
+ })
+ }
+
+ $.fn.dropdown.Constructor = Dropdown
+
+
+ // DROPDOWN NO CONFLICT
+ // ====================
+
+ $.fn.dropdown.noConflict = function () {
+ $.fn.dropdown = old
+ return this
+ }
+
+
+ // APPLY TO STANDARD DROPDOWN ELEMENTS
+ // ===================================
+
+ $(document)
+ .on('click.bs.dropdown.data-api', clearMenus)
+ .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
+ .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
+ .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu], [role=listbox]', Dropdown.prototype.keydown)
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: modal.js v3.1.1
+ * http://getbootstrap.com/javascript/#modals
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // MODAL CLASS DEFINITION
+ // ======================
+
+ var Modal = function (element, options) {
+ this.options = options
+ this.$element = $(element)
+ this.$backdrop =
+ this.isShown = null
+
+ if (this.options.remote) {
+ this.$element
+ .find('.modal-content')
+ .load(this.options.remote, $.proxy(function () {
+ this.$element.trigger('loaded.bs.modal')
+ }, this))
+ }
+ }
+
+ Modal.DEFAULTS = {
+ backdrop: true,
+ keyboard: true,
+ show: true
+ }
+
+ Modal.prototype.toggle = function (_relatedTarget) {
+ return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
+ }
+
+ Modal.prototype.show = function (_relatedTarget) {
+ var that = this
+ var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
+
+ this.$element.trigger(e)
+
+ if (this.isShown || e.isDefaultPrevented()) return
+
+ this.isShown = true
+
+ this.escape()
+
+ this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
+
+ this.backdrop(function () {
+ var transition = $.support.transition && that.$element.hasClass('fade')
+
+ if (!that.$element.parent().length) {
+ that.$element.appendTo(document.body) // don't move modals dom position
+ }
+
+ that.$element
+ .show()
+ .scrollTop(0)
+
+ if (transition) {
+ that.$element[0].offsetWidth // force reflow
+ }
+
+ that.$element
+ .addClass('in')
+ .attr('aria-hidden', false)
+
+ that.enforceFocus()
+
+ var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
+
+ transition ?
+ that.$element.find('.modal-dialog') // wait for modal to slide in
+ .one($.support.transition.end, function () {
+ that.$element.focus().trigger(e)
+ })
+ .emulateTransitionEnd(300) :
+ that.$element.focus().trigger(e)
+ })
+ }
+
+ Modal.prototype.hide = function (e) {
+ if (e) e.preventDefault()
+
+ e = $.Event('hide.bs.modal')
+
+ this.$element.trigger(e)
+
+ if (!this.isShown || e.isDefaultPrevented()) return
+
+ this.isShown = false
+
+ this.escape()
+
+ $(document).off('focusin.bs.modal')
+
+ this.$element
+ .removeClass('in')
+ .attr('aria-hidden', true)
+ .off('click.dismiss.bs.modal')
+
+ $.support.transition && this.$element.hasClass('fade') ?
+ this.$element
+ .one($.support.transition.end, $.proxy(this.hideModal, this))
+ .emulateTransitionEnd(300) :
+ this.hideModal()
+ }
+
+ Modal.prototype.enforceFocus = function () {
+ $(document)
+ .off('focusin.bs.modal') // guard against infinite focus loop
+ .on('focusin.bs.modal', $.proxy(function (e) {
+ if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
+ this.$element.focus()
+ }
+ }, this))
+ }
+
+ Modal.prototype.escape = function () {
+ if (this.isShown && this.options.keyboard) {
+ this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {
+ e.which == 27 && this.hide()
+ }, this))
+ } else if (!this.isShown) {
+ this.$element.off('keyup.dismiss.bs.modal')
+ }
+ }
+
+ Modal.prototype.hideModal = function () {
+ var that = this
+ this.$element.hide()
+ this.backdrop(function () {
+ that.removeBackdrop()
+ that.$element.trigger('hidden.bs.modal')
+ })
+ }
+
+ Modal.prototype.removeBackdrop = function () {
+ this.$backdrop && this.$backdrop.remove()
+ this.$backdrop = null
+ }
+
+ Modal.prototype.backdrop = function (callback) {
+ var animate = this.$element.hasClass('fade') ? 'fade' : ''
+
+ if (this.isShown && this.options.backdrop) {
+ var doAnimate = $.support.transition && animate
+
+ this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
+ .appendTo(document.body)
+
+ this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
+ if (e.target !== e.currentTarget) return
+ this.options.backdrop == 'static'
+ ? this.$element[0].focus.call(this.$element[0])
+ : this.hide.call(this)
+ }, this))
+
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
+
+ this.$backdrop.addClass('in')
+
+ if (!callback) return
+
+ doAnimate ?
+ this.$backdrop
+ .one($.support.transition.end, callback)
+ .emulateTransitionEnd(150) :
+ callback()
+
+ } else if (!this.isShown && this.$backdrop) {
+ this.$backdrop.removeClass('in')
+
+ $.support.transition && this.$element.hasClass('fade') ?
+ this.$backdrop
+ .one($.support.transition.end, callback)
+ .emulateTransitionEnd(150) :
+ callback()
+
+ } else if (callback) {
+ callback()
+ }
+ }
+
+
+ // MODAL PLUGIN DEFINITION
+ // =======================
+
+ var old = $.fn.modal
+
+ $.fn.modal = function (option, _relatedTarget) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.modal')
+ var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
+
+ if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
+ if (typeof option == 'string') data[option](_relatedTarget)
+ else if (options.show) data.show(_relatedTarget)
+ })
+ }
+
+ $.fn.modal.Constructor = Modal
+
+
+ // MODAL NO CONFLICT
+ // =================
+
+ $.fn.modal.noConflict = function () {
+ $.fn.modal = old
+ return this
+ }
+
+
+ // MODAL DATA-API
+ // ==============
+
+ $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
+ var $this = $(this)
+ var href = $this.attr('href')
+ var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
+ var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
+
+ if ($this.is('a')) e.preventDefault()
+
+ $target
+ .modal(option, this)
+ .one('hide', function () {
+ $this.is(':visible') && $this.focus()
+ })
+ })
+
+ $(document)
+ .on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
+ .on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: tooltip.js v3.1.1
+ * http://getbootstrap.com/javascript/#tooltip
+ * Inspired by the original jQuery.tipsy by Jason Frame
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // TOOLTIP PUBLIC CLASS DEFINITION
+ // ===============================
+
+ var Tooltip = function (element, options) {
+ this.type =
+ this.options =
+ this.enabled =
+ this.timeout =
+ this.hoverState =
+ this.$element = null
+
+ this.init('tooltip', element, options)
+ }
+
+ Tooltip.DEFAULTS = {
+ animation: true,
+ placement: 'top',
+ selector: false,
+ template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
+ trigger: 'hover focus',
+ title: '',
+ delay: 0,
+ html: false,
+ container: false
+ }
+
+ Tooltip.prototype.init = function (type, element, options) {
+ this.enabled = true
+ this.type = type
+ this.$element = $(element)
+ this.options = this.getOptions(options)
+
+ var triggers = this.options.trigger.split(' ')
+
+ for (var i = triggers.length; i--;) {
+ var trigger = triggers[i]
+
+ if (trigger == 'click') {
+ this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
+ } else if (trigger != 'manual') {
+ var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
+ var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
+
+ this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
+ this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
+ }
+ }
+
+ this.options.selector ?
+ (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
+ this.fixTitle()
+ }
+
+ Tooltip.prototype.getDefaults = function () {
+ return Tooltip.DEFAULTS
+ }
+
+ Tooltip.prototype.getOptions = function (options) {
+ options = $.extend({}, this.getDefaults(), this.$element.data(), options)
+
+ if (options.delay && typeof options.delay == 'number') {
+ options.delay = {
+ show: options.delay,
+ hide: options.delay
+ }
+ }
+
+ return options
+ }
+
+ Tooltip.prototype.getDelegateOptions = function () {
+ var options = {}
+ var defaults = this.getDefaults()
+
+ this._options && $.each(this._options, function (key, value) {
+ if (defaults[key] != value) options[key] = value
+ })
+
+ return options
+ }
+
+ Tooltip.prototype.enter = function (obj) {
+ var self = obj instanceof this.constructor ?
+ obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
+
+ clearTimeout(self.timeout)
+
+ self.hoverState = 'in'
+
+ if (!self.options.delay || !self.options.delay.show) return self.show()
+
+ self.timeout = setTimeout(function () {
+ if (self.hoverState == 'in') self.show()
+ }, self.options.delay.show)
+ }
+
+ Tooltip.prototype.leave = function (obj) {
+ var self = obj instanceof this.constructor ?
+ obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
+
+ clearTimeout(self.timeout)
+
+ self.hoverState = 'out'
+
+ if (!self.options.delay || !self.options.delay.hide) return self.hide()
+
+ self.timeout = setTimeout(function () {
+ if (self.hoverState == 'out') self.hide()
+ }, self.options.delay.hide)
+ }
+
+ Tooltip.prototype.show = function () {
+ var e = $.Event('show.bs.' + this.type)
+
+ if (this.hasContent() && this.enabled) {
+ this.$element.trigger(e)
+
+ if (e.isDefaultPrevented()) return
+ var that = this;
+
+ var $tip = this.tip()
+
+ this.setContent()
+
+ if (this.options.animation) $tip.addClass('fade')
+
+ var placement = typeof this.options.placement == 'function' ?
+ this.options.placement.call(this, $tip[0], this.$element[0]) :
+ this.options.placement
+
+ var autoToken = /\s?auto?\s?/i
+ var autoPlace = autoToken.test(placement)
+ if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
+
+ $tip
+ .detach()
+ .css({ top: 0, left: 0, display: 'block' })
+ .addClass(placement)
+
+ this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
+
+ var pos = this.getPosition()
+ var actualWidth = $tip[0].offsetWidth
+ var actualHeight = $tip[0].offsetHeight
+
+ if (autoPlace) {
+ var $parent = this.$element.parent()
+
+ var orgPlacement = placement
+ var docScroll = document.documentElement.scrollTop || document.body.scrollTop
+ var parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth()
+ var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight()
+ var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left
+
+ placement = placement == 'bottom' && pos.top + pos.height + actualHeight - docScroll > parentHeight ? 'top' :
+ placement == 'top' && pos.top - docScroll - actualHeight < 0 ? 'bottom' :
+ placement == 'right' && pos.right + actualWidth > parentWidth ? 'left' :
+ placement == 'left' && pos.left - actualWidth < parentLeft ? 'right' :
+ placement
+
+ $tip
+ .removeClass(orgPlacement)
+ .addClass(placement)
+ }
+
+ var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
+
+ this.applyPlacement(calculatedOffset, placement)
+ this.hoverState = null
+
+ var complete = function() {
+ that.$element.trigger('shown.bs.' + that.type)
+ }
+
+ $.support.transition && this.$tip.hasClass('fade') ?
+ $tip
+ .one($.support.transition.end, complete)
+ .emulateTransitionEnd(150) :
+ complete()
+ }
+ }
+
+ Tooltip.prototype.applyPlacement = function (offset, placement) {
+ var replace
+ var $tip = this.tip()
+ var width = $tip[0].offsetWidth
+ var height = $tip[0].offsetHeight
+
+ // manually read margins because getBoundingClientRect includes difference
+ var marginTop = parseInt($tip.css('margin-top'), 10)
+ var marginLeft = parseInt($tip.css('margin-left'), 10)
+
+ // we must check for NaN for ie 8/9
+ if (isNaN(marginTop)) marginTop = 0
+ if (isNaN(marginLeft)) marginLeft = 0
+
+ offset.top = offset.top + marginTop
+ offset.left = offset.left + marginLeft
+
+ // $.fn.offset doesn't round pixel values
+ // so we use setOffset directly with our own function B-0
+ $.offset.setOffset($tip[0], $.extend({
+ using: function (props) {
+ $tip.css({
+ top: Math.round(props.top),
+ left: Math.round(props.left)
+ })
+ }
+ }, offset), 0)
+
+ $tip.addClass('in')
+
+ // check to see if placing tip in new offset caused the tip to resize itself
+ var actualWidth = $tip[0].offsetWidth
+ var actualHeight = $tip[0].offsetHeight
+
+ if (placement == 'top' && actualHeight != height) {
+ replace = true
+ offset.top = offset.top + height - actualHeight
+ }
+
+ if (/bottom|top/.test(placement)) {
+ var delta = 0
+
+ if (offset.left < 0) {
+ delta = offset.left * -2
+ offset.left = 0
+
+ $tip.offset(offset)
+
+ actualWidth = $tip[0].offsetWidth
+ actualHeight = $tip[0].offsetHeight
+ }
+
+ this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
+ } else {
+ this.replaceArrow(actualHeight - height, actualHeight, 'top')
+ }
+
+ if (replace) $tip.offset(offset)
+ }
+
+ Tooltip.prototype.replaceArrow = function (delta, dimension, position) {
+ this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + '%') : '')
+ }
+
+ Tooltip.prototype.setContent = function () {
+ var $tip = this.tip()
+ var title = this.getTitle()
+
+ $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
+ $tip.removeClass('fade in top bottom left right')
+ }
+
+ Tooltip.prototype.hide = function () {
+ var that = this
+ var $tip = this.tip()
+ var e = $.Event('hide.bs.' + this.type)
+
+ function complete() {
+ if (that.hoverState != 'in') $tip.detach()
+ that.$element.trigger('hidden.bs.' + that.type)
+ }
+
+ this.$element.trigger(e)
+
+ if (e.isDefaultPrevented()) return
+
+ $tip.removeClass('in')
+
+ $.support.transition && this.$tip.hasClass('fade') ?
+ $tip
+ .one($.support.transition.end, complete)
+ .emulateTransitionEnd(150) :
+ complete()
+
+ this.hoverState = null
+
+ return this
+ }
+
+ Tooltip.prototype.fixTitle = function () {
+ var $e = this.$element
+ if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
+ $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
+ }
+ }
+
+ Tooltip.prototype.hasContent = function () {
+ return this.getTitle()
+ }
+
+ Tooltip.prototype.getPosition = function () {
+ var el = this.$element[0]
+ return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
+ width: el.offsetWidth,
+ height: el.offsetHeight
+ }, this.$element.offset())
+ }
+
+ Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
+ return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
+ placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
+ placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
+ /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
+ }
+
+ Tooltip.prototype.getTitle = function () {
+ var title
+ var $e = this.$element
+ var o = this.options
+
+ title = $e.attr('data-original-title')
+ || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
+
+ return title
+ }
+
+ Tooltip.prototype.tip = function () {
+ return this.$tip = this.$tip || $(this.options.template)
+ }
+
+ Tooltip.prototype.arrow = function () {
+ return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')
+ }
+
+ Tooltip.prototype.validate = function () {
+ if (!this.$element[0].parentNode) {
+ this.hide()
+ this.$element = null
+ this.options = null
+ }
+ }
+
+ Tooltip.prototype.enable = function () {
+ this.enabled = true
+ }
+
+ Tooltip.prototype.disable = function () {
+ this.enabled = false
+ }
+
+ Tooltip.prototype.toggleEnabled = function () {
+ this.enabled = !this.enabled
+ }
+
+ Tooltip.prototype.toggle = function (e) {
+ var self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) : this
+ self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
+ }
+
+ Tooltip.prototype.destroy = function () {
+ clearTimeout(this.timeout)
+ this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
+ }
+
+
+ // TOOLTIP PLUGIN DEFINITION
+ // =========================
+
+ var old = $.fn.tooltip
+
+ $.fn.tooltip = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.tooltip')
+ var options = typeof option == 'object' && option
+
+ if (!data && option == 'destroy') return
+ if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.tooltip.Constructor = Tooltip
+
+
+ // TOOLTIP NO CONFLICT
+ // ===================
+
+ $.fn.tooltip.noConflict = function () {
+ $.fn.tooltip = old
+ return this
+ }
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: popover.js v3.1.1
+ * http://getbootstrap.com/javascript/#popovers
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // POPOVER PUBLIC CLASS DEFINITION
+ // ===============================
+
+ var Popover = function (element, options) {
+ this.init('popover', element, options)
+ }
+
+ if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
+
+ Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
+ placement: 'right',
+ trigger: 'click',
+ content: '',
+ template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
+ })
+
+
+ // NOTE: POPOVER EXTENDS tooltip.js
+ // ================================
+
+ Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
+
+ Popover.prototype.constructor = Popover
+
+ Popover.prototype.getDefaults = function () {
+ return Popover.DEFAULTS
+ }
+
+ Popover.prototype.setContent = function () {
+ var $tip = this.tip()
+ var title = this.getTitle()
+ var content = this.getContent()
+
+ $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
+ $tip.find('.popover-content')[ // we use append for html objects to maintain js events
+ this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
+ ](content)
+
+ $tip.removeClass('fade top bottom left right in')
+
+ // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
+ // this manually by checking the contents.
+ if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
+ }
+
+ Popover.prototype.hasContent = function () {
+ return this.getTitle() || this.getContent()
+ }
+
+ Popover.prototype.getContent = function () {
+ var $e = this.$element
+ var o = this.options
+
+ return $e.attr('data-content')
+ || (typeof o.content == 'function' ?
+ o.content.call($e[0]) :
+ o.content)
+ }
+
+ Popover.prototype.arrow = function () {
+ return this.$arrow = this.$arrow || this.tip().find('.arrow')
+ }
+
+ Popover.prototype.tip = function () {
+ if (!this.$tip) this.$tip = $(this.options.template)
+ return this.$tip
+ }
+
+
+ // POPOVER PLUGIN DEFINITION
+ // =========================
+
+ var old = $.fn.popover
+
+ $.fn.popover = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.popover')
+ var options = typeof option == 'object' && option
+
+ if (!data && option == 'destroy') return
+ if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.popover.Constructor = Popover
+
+
+ // POPOVER NO CONFLICT
+ // ===================
+
+ $.fn.popover.noConflict = function () {
+ $.fn.popover = old
+ return this
+ }
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: scrollspy.js v3.1.1
+ * http://getbootstrap.com/javascript/#scrollspy
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // SCROLLSPY CLASS DEFINITION
+ // ==========================
+
+ function ScrollSpy(element, options) {
+ var href
+ var process = $.proxy(this.process, this)
+
+ this.$element = $(element).is('body') ? $(window) : $(element)
+ this.$body = $('body')
+ this.$scrollElement = this.$element.on('scroll.bs.scroll-spy.data-api', process)
+ this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
+ this.selector = (this.options.target
+ || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
+ || '') + ' .nav li > a'
+ this.offsets = $([])
+ this.targets = $([])
+ this.activeTarget = null
+
+ this.refresh()
+ this.process()
+ }
+
+ ScrollSpy.DEFAULTS = {
+ offset: 10
+ }
+
+ ScrollSpy.prototype.refresh = function () {
+ var offsetMethod = this.$element[0] == window ? 'offset' : 'position'
+
+ this.offsets = $([])
+ this.targets = $([])
+
+ var self = this
+ var $targets = this.$body
+ .find(this.selector)
+ .map(function () {
+ var $el = $(this)
+ var href = $el.data('target') || $el.attr('href')
+ var $href = /^#./.test(href) && $(href)
+
+ return ($href
+ && $href.length
+ && $href.is(':visible')
+ && [[ $href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null
+ })
+ .sort(function (a, b) { return a[0] - b[0] })
+ .each(function () {
+ self.offsets.push(this[0])
+ self.targets.push(this[1])
+ })
+ }
+
+ ScrollSpy.prototype.process = function () {
+ var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
+ var scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
+ var maxScroll = scrollHeight - this.$scrollElement.height()
+ var offsets = this.offsets
+ var targets = this.targets
+ var activeTarget = this.activeTarget
+ var i
+
+ if (scrollTop >= maxScroll) {
+ return activeTarget != (i = targets.last()[0]) && this.activate(i)
+ }
+
+ if (activeTarget && scrollTop <= offsets[0]) {
+ return activeTarget != (i = targets[0]) && this.activate(i)
+ }
+
+ for (i = offsets.length; i--;) {
+ activeTarget != targets[i]
+ && scrollTop >= offsets[i]
+ && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
+ && this.activate( targets[i] )
+ }
+ }
+
+ ScrollSpy.prototype.activate = function (target) {
+ this.activeTarget = target
+
+ $(this.selector)
+ .parentsUntil(this.options.target, '.active')
+ .removeClass('active')
+
+ var selector = this.selector +
+ '[data-target="' + target + '"],' +
+ this.selector + '[href="' + target + '"]'
+
+ var active = $(selector)
+ .parents('li')
+ .addClass('active')
+
+ if (active.parent('.dropdown-menu').length) {
+ active = active
+ .closest('li.dropdown')
+ .addClass('active')
+ }
+
+ active.trigger('activate.bs.scrollspy')
+ }
+
+
+ // SCROLLSPY PLUGIN DEFINITION
+ // ===========================
+
+ var old = $.fn.scrollspy
+
+ $.fn.scrollspy = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.scrollspy')
+ var options = typeof option == 'object' && option
+
+ if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.scrollspy.Constructor = ScrollSpy
+
+
+ // SCROLLSPY NO CONFLICT
+ // =====================
+
+ $.fn.scrollspy.noConflict = function () {
+ $.fn.scrollspy = old
+ return this
+ }
+
+
+ // SCROLLSPY DATA-API
+ // ==================
+
+ $(window).on('load', function () {
+ $('[data-spy="scroll"]').each(function () {
+ var $spy = $(this)
+ $spy.scrollspy($spy.data())
+ })
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: tab.js v3.1.1
+ * http://getbootstrap.com/javascript/#tabs
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // TAB CLASS DEFINITION
+ // ====================
+
+ var Tab = function (element) {
+ this.element = $(element)
+ }
+
+ Tab.prototype.show = function () {
+ var $this = this.element
+ var $ul = $this.closest('ul:not(.dropdown-menu)')
+ var selector = $this.data('target')
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+ }
+
+ if ($this.parent('li').hasClass('active')) return
+
+ var previous = $ul.find('.active:last a')[0]
+ var e = $.Event('show.bs.tab', {
+ relatedTarget: previous
+ })
+
+ $this.trigger(e)
+
+ if (e.isDefaultPrevented()) return
+
+ var $target = $(selector)
+
+ this.activate($this.parent('li'), $ul)
+ this.activate($target, $target.parent(), function () {
+ $this.trigger({
+ type: 'shown.bs.tab',
+ relatedTarget: previous
+ })
+ })
+ }
+
+ Tab.prototype.activate = function (element, container, callback) {
+ var $active = container.find('> .active')
+ var transition = callback
+ && $.support.transition
+ && $active.hasClass('fade')
+
+ function next() {
+ $active
+ .removeClass('active')
+ .find('> .dropdown-menu > .active')
+ .removeClass('active')
+
+ element.addClass('active')
+
+ if (transition) {
+ element[0].offsetWidth // reflow for transition
+ element.addClass('in')
+ } else {
+ element.removeClass('fade')
+ }
+
+ if (element.parent('.dropdown-menu')) {
+ element.closest('li.dropdown').addClass('active')
+ }
+
+ callback && callback()
+ }
+
+ transition ?
+ $active
+ .one($.support.transition.end, next)
+ .emulateTransitionEnd(150) :
+ next()
+
+ $active.removeClass('in')
+ }
+
+
+ // TAB PLUGIN DEFINITION
+ // =====================
+
+ var old = $.fn.tab
+
+ $.fn.tab = function ( option ) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.tab')
+
+ if (!data) $this.data('bs.tab', (data = new Tab(this)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.tab.Constructor = Tab
+
+
+ // TAB NO CONFLICT
+ // ===============
+
+ $.fn.tab.noConflict = function () {
+ $.fn.tab = old
+ return this
+ }
+
+
+ // TAB DATA-API
+ // ============
+
+ $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
+ e.preventDefault()
+ $(this).tab('show')
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: affix.js v3.1.1
+ * http://getbootstrap.com/javascript/#affix
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // AFFIX CLASS DEFINITION
+ // ======================
+
+ var Affix = function (element, options) {
+ this.options = $.extend({}, Affix.DEFAULTS, options)
+ this.$window = $(window)
+ .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
+ .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
+
+ this.$element = $(element)
+ this.affixed =
+ this.unpin =
+ this.pinnedOffset = null
+
+ this.checkPosition()
+ }
+
+ Affix.RESET = 'affix affix-top affix-bottom'
+
+ Affix.DEFAULTS = {
+ offset: 0
+ }
+
+ Affix.prototype.getPinnedOffset = function () {
+ if (this.pinnedOffset) return this.pinnedOffset
+ this.$element.removeClass(Affix.RESET).addClass('affix')
+ var scrollTop = this.$window.scrollTop()
+ var position = this.$element.offset()
+ return (this.pinnedOffset = position.top - scrollTop)
+ }
+
+ Affix.prototype.checkPositionWithEventLoop = function () {
+ setTimeout($.proxy(this.checkPosition, this), 1)
+ }
+
+ Affix.prototype.checkPosition = function () {
+ if (!this.$element.is(':visible')) return
+
+ var scrollHeight = $(document).height()
+ var scrollTop = this.$window.scrollTop()
+ var position = this.$element.offset()
+ var offset = this.options.offset
+ var offsetTop = offset.top
+ var offsetBottom = offset.bottom
+
+ if (this.affixed == 'top') position.top += scrollTop
+
+ if (typeof offset != 'object') offsetBottom = offsetTop = offset
+ if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
+ if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
+
+ var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false :
+ offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
+ offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false
+
+ if (this.affixed === affix) return
+ if (this.unpin) this.$element.css('top', '')
+
+ var affixType = 'affix' + (affix ? '-' + affix : '')
+ var e = $.Event(affixType + '.bs.affix')
+
+ this.$element.trigger(e)
+
+ if (e.isDefaultPrevented()) return
+
+ this.affixed = affix
+ this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
+
+ this.$element
+ .removeClass(Affix.RESET)
+ .addClass(affixType)
+ .trigger($.Event(affixType.replace('affix', 'affixed')))
+
+ if (affix == 'bottom') {
+ this.$element.offset({ top: scrollHeight - offsetBottom - this.$element.height() })
+ }
+ }
+
+
+ // AFFIX PLUGIN DEFINITION
+ // =======================
+
+ var old = $.fn.affix
+
+ $.fn.affix = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.affix')
+ var options = typeof option == 'object' && option
+
+ if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.affix.Constructor = Affix
+
+
+ // AFFIX NO CONFLICT
+ // =================
+
+ $.fn.affix.noConflict = function () {
+ $.fn.affix = old
+ return this
+ }
+
+
+ // AFFIX DATA-API
+ // ==============
+
+ $(window).on('load', function () {
+ $('[data-spy="affix"]').each(function () {
+ var $spy = $(this)
+ var data = $spy.data()
+
+ data.offset = data.offset || {}
+
+ if (data.offsetBottom) data.offset.bottom = data.offsetBottom
+ if (data.offsetTop) data.offset.top = data.offsetTop
+
+ $spy.affix(data)
+ })
+ })
+
+}(jQuery);
diff --git a/common/src/main/webapp/thirdparty/bootstrap/js/bootstrap.min.js b/common/src/main/webapp/thirdparty/bootstrap/js/bootstrap.min.js
new file mode 100644
index 0000000..b04a0e8
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/bootstrap/js/bootstrap.min.js
@@ -0,0 +1,6 @@
+/*!
+ * Bootstrap v3.1.1 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown",h),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=" li:not(.divider):visible a",i=f.find("[role=menu]"+h+", [role=listbox]"+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j<i.length-1&&j++,~j||(j=0),i.eq(j).focus()}}}};var g=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new f(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=f,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=g,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",e,f.prototype.toggle).on("keydown.bs.dropdown.data-api",e+", [role=menu], [role=listbox]",f.prototype.keydown)}(jQuery),+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};b.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isShown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body),c.$element.show().scrollTop(0),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulateTransitionEnd(300):c.$element.focus().trigger(e)}))},b.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},b.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.focus()},this))},b.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());c.is("a")&&b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this,d=this.tip();this.setContent(),this.options.animation&&d.addClass("fade");var e="function"==typeof this.options.placement?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,f=/\s?auto?\s?/i,g=f.test(e);g&&(e=e.replace(f,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(e),this.options.container?d.appendTo(this.options.container):d.insertAfter(this.$element);var h=this.getPosition(),i=d[0].offsetWidth,j=d[0].offsetHeight;if(g){var k=this.$element.parent(),l=e,m=document.documentElement.scrollTop||document.body.scrollTop,n="body"==this.options.container?window.innerWidth:k.outerWidth(),o="body"==this.options.container?window.innerHeight:k.outerHeight(),p="body"==this.options.container?0:k.offset().left;e="bottom"==e&&h.top+h.height+j-m>o?"top":"top"==e&&h.top-m-j<0?"bottom":"right"==e&&h.right+i>n?"left":"left"==e&&h.left-i<p?"right":e,d.removeClass(l).addClass(e)}var q=this.getCalculatedOffset(e,h,i,j);this.applyPlacement(q,e),this.hoverState=null;var r=function(){c.$element.trigger("shown.bs."+c.type)};a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,r).emulateTransitionEnd(150):r()}},b.prototype.applyPlacement=function(b,c){var d,e=this.tip(),f=e[0].offsetWidth,g=e[0].offsetHeight,h=parseInt(e.css("margin-top"),10),i=parseInt(e.css("margin-left"),10);isNaN(h)&&(h=0),isNaN(i)&&(i=0),b.top=b.top+h,b.left=b.left+i,a.offset.setOffset(e[0],a.extend({using:function(a){e.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),e.addClass("in");var j=e[0].offsetWidth,k=e[0].offsetHeight;if("top"==c&&k!=g&&(d=!0,b.top=b.top+g-k),/bottom|top/.test(c)){var l=0;b.left<0&&(l=-2*b.left,b.left=0,e.offset(b),j=e[0].offsetWidth,k=e[0].offsetHeight),this.replaceArrow(l-f+j,j,"left")}else this.replaceArrow(k-g,k,"top");d&&e.offset(b)},b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},b.prototype.hide=function(){function b(){"in"!=c.hoverState&&d.detach(),c.$element.trigger("hidden.bs."+c.type)}var c=this,d=this.tip(),e=a.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(d.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,b).emulateTransitionEnd(150):b(),this.hoverState=null,this)},b.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},b.prototype.hasContent=function(){return this.getTitle()},b.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},b.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},b.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},b.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},b.prototype.enable=function(){this.enabled=!0},b.prototype.disable=function(){this.enabled=!1},b.prototype.toggleEnabled=function(){this.enabled=!this.enabled},b.prototype.toggle=function(b){var c=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;c.tip().hasClass("in")?c.leave(c):c.enter(c)},b.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.tooltip",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.tooltip.Constructor=b,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(jQuery),+function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");b.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/bootstrap/js/bootstrap2-typeahead.min.js b/common/src/main/webapp/thirdparty/bootstrap/js/bootstrap2-typeahead.min.js
new file mode 100644
index 0000000..1d11b34
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/bootstrap/js/bootstrap2-typeahead.min.js
@@ -0,0 +1,21 @@
+/* =============================================================
+ * bootstrap-typeahead.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#typeahead
+ * =============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function(t){"use strict";var e=function(e,s){this.$element=t(e),this.options=t.extend({},t.fn.typeahead.defaults,s),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=t(this.options.menu),this.shown=!1,this.listen()};e.prototype={constructor:e,select:function(){var t=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(t)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:e.top+e.height,left:e.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var e;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(e=t.isFunction(this.source)?this.source(this.query,t.proxy(this.process,this)):this.source,e?this.process(e):this)},process:function(e){var s=this;return e=t.grep(e,function(t){return s.matcher(t)}),e=this.sorter(e),e.length?this.render(e.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(t){return~t.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(t){for(var e,s=[],i=[],n=[];e=t.shift();)e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?i.push(e):n.push(e):s.push(e);return s.concat(i,n)},highlighter:function(t){var e=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return t.replace(new RegExp("("+e+")","ig"),function(t,e){return"<strong>"+e+"</strong>"})},render:function(e){var s=this;return e=t(e).map(function(e,i){return e=t(s.options.item).attr("data-value",i),e.find("a").html(s.highlighter(i)),e[0]}),e.first().addClass("active"),this.$menu.html(e),this},next:function(){var e=this.$menu.find(".active").removeClass("active"),s=e.next();s.length||(s=t(this.$menu.find("li")[0])),s.addClass("active")},prev:function(){var t=this.$menu.find(".active").removeClass("active"),e=t.prev();e.length||(e=this.$menu.find("li").last()),e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(){this.focused=!0},blur:function(){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var s=t.fn.typeahead;t.fn.typeahead=function(s){return this.each(function(){var i=t(this),n=i.data("typeahead"),h="object"==typeof s&&s;n||i.data("typeahead",n=new e(this,h)),"string"==typeof s&&n[s]()})},t.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},t.fn.typeahead.Constructor=e,t.fn.typeahead.noConflict=function(){return t.fn.typeahead=s,this},t(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(){var e=t(this);e.data("typeahead")||e.typeahead(e.data())})}(window.jQuery); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/cometd/cometd.js b/common/src/main/webapp/thirdparty/cometd/cometd.js
new file mode 100644
index 0000000..74f4937
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/cometd/cometd.js
@@ -0,0 +1,3045 @@
+/*
+ * Copyright (c) 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Namespaces for the cometd implementation
+this.org = this.org || {};
+org.cometd = {};
+
+org.cometd.JSON = {};
+org.cometd.JSON.toJSON = org.cometd.JSON.fromJSON = function(object)
+{
+ throw 'Abstract';
+};
+
+org.cometd.Utils = {};
+
+org.cometd.Utils.isString = function(value)
+{
+ if (value === undefined || value === null)
+ {
+ return false;
+ }
+ return typeof value === 'string' || value instanceof String;
+};
+
+org.cometd.Utils.isArray = function(value)
+{
+ if (value === undefined || value === null)
+ {
+ return false;
+ }
+ return value instanceof Array;
+};
+
+/**
+ * Returns whether the given element is contained into the given array.
+ * @param element the element to check presence for
+ * @param array the array to check for the element presence
+ * @return the index of the element, if present, or a negative index if the element is not present
+ */
+org.cometd.Utils.inArray = function(element, array)
+{
+ for (var i = 0; i < array.length; ++i)
+ {
+ if (element === array[i])
+ {
+ return i;
+ }
+ }
+ return -1;
+};
+
+org.cometd.Utils.setTimeout = function(cometd, funktion, delay)
+{
+ return window.setTimeout(function()
+ {
+ try
+ {
+ funktion();
+ }
+ catch (x)
+ {
+ cometd._debug('Exception invoking timed function', funktion, x);
+ }
+ }, delay);
+};
+
+org.cometd.Utils.clearTimeout = function(timeoutHandle)
+{
+ window.clearTimeout(timeoutHandle);
+};
+
+/**
+ * A registry for transports used by the Cometd object.
+ */
+org.cometd.TransportRegistry = function()
+{
+ var _types = [];
+ var _transports = {};
+
+ this.getTransportTypes = function()
+ {
+ return _types.slice(0);
+ };
+
+ this.findTransportTypes = function(version, crossDomain, url)
+ {
+ var result = [];
+ for (var i = 0; i < _types.length; ++i)
+ {
+ var type = _types[i];
+ if (_transports[type].accept(version, crossDomain, url) === true)
+ {
+ result.push(type);
+ }
+ }
+ return result;
+ };
+
+ this.negotiateTransport = function(types, version, crossDomain, url)
+ {
+ for (var i = 0; i < _types.length; ++i)
+ {
+ var type = _types[i];
+ for (var j = 0; j < types.length; ++j)
+ {
+ if (type === types[j])
+ {
+ var transport = _transports[type];
+ if (transport.accept(version, crossDomain, url) === true)
+ {
+ return transport;
+ }
+ }
+ }
+ }
+ return null;
+ };
+
+ this.add = function(type, transport, index)
+ {
+ var existing = false;
+ for (var i = 0; i < _types.length; ++i)
+ {
+ if (_types[i] === type)
+ {
+ existing = true;
+ break;
+ }
+ }
+
+ if (!existing)
+ {
+ if (typeof index !== 'number')
+ {
+ _types.push(type);
+ }
+ else
+ {
+ _types.splice(index, 0, type);
+ }
+ _transports[type] = transport;
+ }
+
+ return !existing;
+ };
+
+ this.find = function(type)
+ {
+ for (var i = 0; i < _types.length; ++i)
+ {
+ if (_types[i] === type)
+ {
+ return _transports[type];
+ }
+ }
+ return null;
+ };
+
+ this.remove = function(type)
+ {
+ for (var i = 0; i < _types.length; ++i)
+ {
+ if (_types[i] === type)
+ {
+ _types.splice(i, 1);
+ var transport = _transports[type];
+ delete _transports[type];
+ return transport;
+ }
+ }
+ return null;
+ };
+
+ this.clear = function()
+ {
+ _types = [];
+ _transports = {};
+ };
+
+ this.reset = function()
+ {
+ for (var i = 0; i < _types.length; ++i)
+ {
+ _transports[_types[i]].reset();
+ }
+ };
+};
+
+/**
+ * Base object with the common functionality for transports.
+ */
+org.cometd.Transport = function()
+{
+ var _type;
+ var _cometd;
+
+ /**
+ * Function invoked just after a transport has been successfully registered.
+ * @param type the type of transport (for example 'long-polling')
+ * @param cometd the cometd object this transport has been registered to
+ * @see #unregistered()
+ */
+ this.registered = function(type, cometd)
+ {
+ _type = type;
+ _cometd = cometd;
+ };
+
+ /**
+ * Function invoked just after a transport has been successfully unregistered.
+ * @see #registered(type, cometd)
+ */
+ this.unregistered = function()
+ {
+ _type = null;
+ _cometd = null;
+ };
+
+ this._debug = function()
+ {
+ _cometd._debug.apply(_cometd, arguments);
+ };
+
+ this._mixin = function()
+ {
+ return _cometd._mixin.apply(_cometd, arguments);
+ };
+
+ this.getConfiguration = function()
+ {
+ return _cometd.getConfiguration();
+ };
+
+ this.getAdvice = function()
+ {
+ return _cometd.getAdvice();
+ };
+
+ this.setTimeout = function(funktion, delay)
+ {
+ return org.cometd.Utils.setTimeout(_cometd, funktion, delay);
+ };
+
+ this.clearTimeout = function(handle)
+ {
+ org.cometd.Utils.clearTimeout(handle);
+ };
+
+ /**
+ * Converts the given response into an array of bayeux messages
+ * @param response the response to convert
+ * @return an array of bayeux messages obtained by converting the response
+ */
+ this.convertToMessages = function (response)
+ {
+ if (org.cometd.Utils.isString(response))
+ {
+ try
+ {
+ return org.cometd.JSON.fromJSON(response);
+ }
+ catch(x)
+ {
+ this._debug('Could not convert to JSON the following string', '"' + response + '"');
+ throw x;
+ }
+ }
+ if (org.cometd.Utils.isArray(response))
+ {
+ return response;
+ }
+ if (response === undefined || response === null)
+ {
+ return [];
+ }
+ if (response instanceof Object)
+ {
+ return [response];
+ }
+ throw 'Conversion Error ' + response + ', typeof ' + (typeof response);
+ };
+
+ /**
+ * Returns whether this transport can work for the given version and cross domain communication case.
+ * @param version a string indicating the transport version
+ * @param crossDomain a boolean indicating whether the communication is cross domain
+ * @return true if this transport can work for the given version and cross domain communication case,
+ * false otherwise
+ */
+ this.accept = function(version, crossDomain, url)
+ {
+ throw 'Abstract';
+ };
+
+ /**
+ * Returns the type of this transport.
+ * @see #registered(type, cometd)
+ */
+ this.getType = function()
+ {
+ return _type;
+ };
+
+ this.send = function(envelope, metaConnect)
+ {
+ throw 'Abstract';
+ };
+
+ this.reset = function()
+ {
+ this._debug('Transport', _type, 'reset');
+ };
+
+ this.abort = function()
+ {
+ this._debug('Transport', _type, 'aborted');
+ };
+
+ this.toString = function()
+ {
+ return this.getType();
+ };
+};
+
+org.cometd.Transport.derive = function(baseObject)
+{
+ function F() {}
+ F.prototype = baseObject;
+ return new F();
+};
+
+/**
+ * Base object with the common functionality for transports based on requests.
+ * The key responsibility is to allow at most 2 outstanding requests to the server,
+ * to avoid that requests are sent behind a long poll.
+ * To achieve this, we have one reserved request for the long poll, and all other
+ * requests are serialized one after the other.
+ */
+org.cometd.RequestTransport = function()
+{
+ var _super = new org.cometd.Transport();
+ var _self = org.cometd.Transport.derive(_super);
+ var _requestIds = 0;
+ var _metaConnectRequest = null;
+ var _requests = [];
+ var _envelopes = [];
+
+ function _coalesceEnvelopes(envelope)
+ {
+ while (_envelopes.length > 0)
+ {
+ var envelopeAndRequest = _envelopes[0];
+ var newEnvelope = envelopeAndRequest[0];
+ var newRequest = envelopeAndRequest[1];
+ if (newEnvelope.url === envelope.url &&
+ newEnvelope.sync === envelope.sync)
+ {
+ _envelopes.shift();
+ envelope.messages = envelope.messages.concat(newEnvelope.messages);
+ this._debug('Coalesced', newEnvelope.messages.length, 'messages from request', newRequest.id);
+ continue;
+ }
+ break;
+ }
+ }
+
+ function _transportSend(envelope, request)
+ {
+ this.transportSend(envelope, request);
+ request.expired = false;
+
+ if (!envelope.sync)
+ {
+ var maxDelay = this.getConfiguration().maxNetworkDelay;
+ var delay = maxDelay;
+ if (request.metaConnect === true)
+ {
+ delay += this.getAdvice().timeout;
+ }
+
+ this._debug('Transport', this.getType(), 'waiting at most', delay, 'ms for the response, maxNetworkDelay', maxDelay);
+
+ var self = this;
+ request.timeout = this.setTimeout(function()
+ {
+ request.expired = true;
+ if (request.xhr)
+ {
+ request.xhr.abort();
+ }
+ var errorMessage = 'Request ' + request.id + ' of transport ' + self.getType() + ' exceeded ' + delay + ' ms max network delay';
+ self._debug(errorMessage);
+ self.complete(request, false, request.metaConnect);
+ envelope.onFailure(request.xhr, envelope.messages, 'timeout', errorMessage);
+ }, delay);
+ }
+ }
+
+ function _queueSend(envelope)
+ {
+ var requestId = ++_requestIds;
+ var request = {
+ id: requestId,
+ metaConnect: false
+ };
+
+ // Consider the metaConnect requests which should always be present
+ if (_requests.length < this.getConfiguration().maxConnections - 1)
+ {
+ _requests.push(request);
+ _transportSend.call(this, envelope, request);
+ }
+ else
+ {
+ this._debug('Transport', this.getType(), 'queueing request', requestId, 'envelope', envelope);
+ _envelopes.push([envelope, request]);
+ }
+ }
+
+ function _metaConnectComplete(request)
+ {
+ var requestId = request.id;
+ this._debug('Transport', this.getType(), 'metaConnect complete, request', requestId);
+ if (_metaConnectRequest !== null && _metaConnectRequest.id !== requestId)
+ {
+ throw 'Longpoll request mismatch, completing request ' + requestId;
+ }
+
+ // Reset metaConnect request
+ _metaConnectRequest = null;
+ }
+
+ function _complete(request, success)
+ {
+ var index = org.cometd.Utils.inArray(request, _requests);
+ // The index can be negative if the request has been aborted
+ if (index >= 0)
+ {
+ _requests.splice(index, 1);
+ }
+
+ if (_envelopes.length > 0)
+ {
+ var envelopeAndRequest = _envelopes.shift();
+ var nextEnvelope = envelopeAndRequest[0];
+ var nextRequest = envelopeAndRequest[1];
+ this._debug('Transport dequeued request', nextRequest.id);
+ if (success)
+ {
+ if (this.getConfiguration().autoBatch)
+ {
+ _coalesceEnvelopes.call(this, nextEnvelope);
+ }
+ _queueSend.call(this, nextEnvelope);
+ this._debug('Transport completed request', request.id, nextEnvelope);
+ }
+ else
+ {
+ // Keep the semantic of calling response callbacks asynchronously after the request
+ var self = this;
+ this.setTimeout(function()
+ {
+ self.complete(nextRequest, false, nextRequest.metaConnect);
+ nextEnvelope.onFailure(nextRequest.xhr, nextEnvelope.messages, 'error', 'Previous request failed');
+ }, 0);
+ }
+ }
+ }
+
+ _self.complete = function(request, success, metaConnect)
+ {
+ if (metaConnect)
+ {
+ _metaConnectComplete.call(this, request);
+ }
+ else
+ {
+ _complete.call(this, request, success);
+ }
+ };
+
+ /**
+ * Performs the actual send depending on the transport type details.
+ * @param envelope the envelope to send
+ * @param request the request information
+ */
+ _self.transportSend = function(envelope, request)
+ {
+ throw 'Abstract';
+ };
+
+ _self.transportSuccess = function(envelope, request, responses)
+ {
+ if (!request.expired)
+ {
+ this.clearTimeout(request.timeout);
+ this.complete(request, true, request.metaConnect);
+ if (responses && responses.length > 0)
+ {
+ envelope.onSuccess(responses);
+ }
+ else
+ {
+ envelope.onFailure(request.xhr, envelope.messages, 'Empty HTTP response');
+ }
+ }
+ };
+
+ _self.transportFailure = function(envelope, request, reason, exception)
+ {
+ if (!request.expired)
+ {
+ this.clearTimeout(request.timeout);
+ this.complete(request, false, request.metaConnect);
+ envelope.onFailure(request.xhr, envelope.messages, reason, exception);
+ }
+ };
+
+ function _metaConnectSend(envelope)
+ {
+ if (_metaConnectRequest !== null)
+ {
+ throw 'Concurrent metaConnect requests not allowed, request id=' + _metaConnectRequest.id + ' not yet completed';
+ }
+
+ var requestId = ++_requestIds;
+ this._debug('Transport', this.getType(), 'metaConnect send, request', requestId, 'envelope', envelope);
+ var request = {
+ id: requestId,
+ metaConnect: true
+ };
+ _transportSend.call(this, envelope, request);
+ _metaConnectRequest = request;
+ }
+
+ _self.send = function(envelope, metaConnect)
+ {
+ if (metaConnect)
+ {
+ _metaConnectSend.call(this, envelope);
+ }
+ else
+ {
+ _queueSend.call(this, envelope);
+ }
+ };
+
+ _self.abort = function()
+ {
+ _super.abort();
+ for (var i = 0; i < _requests.length; ++i)
+ {
+ var request = _requests[i];
+ this._debug('Aborting request', request);
+ if (request.xhr)
+ {
+ request.xhr.abort();
+ }
+ }
+ if (_metaConnectRequest)
+ {
+ this._debug('Aborting metaConnect request', _metaConnectRequest);
+ if (_metaConnectRequest.xhr)
+ {
+ _metaConnectRequest.xhr.abort();
+ }
+ }
+ this.reset();
+ };
+
+ _self.reset = function()
+ {
+ _super.reset();
+ _metaConnectRequest = null;
+ _requests = [];
+ _envelopes = [];
+ };
+
+ return _self;
+};
+
+org.cometd.LongPollingTransport = function()
+{
+ var _super = new org.cometd.RequestTransport();
+ var _self = org.cometd.Transport.derive(_super);
+ // By default, support cross domain
+ var _supportsCrossDomain = true;
+
+ _self.accept = function(version, crossDomain, url)
+ {
+ return _supportsCrossDomain || !crossDomain;
+ };
+
+ _self.xhrSend = function(packet)
+ {
+ throw 'Abstract';
+ };
+
+ _self.transportSend = function(envelope, request)
+ {
+ this._debug('Transport', this.getType(), 'sending request', request.id, 'envelope', envelope);
+
+ var self = this;
+ try
+ {
+ var sameStack = true;
+ request.xhr = this.xhrSend({
+ transport: this,
+ url: envelope.url,
+ sync: envelope.sync,
+ headers: this.getConfiguration().requestHeaders,
+ body: org.cometd.JSON.toJSON(envelope.messages),
+ onSuccess: function(response)
+ {
+ self._debug('Transport', self.getType(), 'received response', response);
+ var success = false;
+ try
+ {
+ var received = self.convertToMessages(response);
+ if (received.length === 0)
+ {
+ _supportsCrossDomain = false;
+ self.transportFailure(envelope, request, 'no response', null);
+ }
+ else
+ {
+ success = true;
+ self.transportSuccess(envelope, request, received);
+ }
+ }
+ catch(x)
+ {
+ self._debug(x);
+ if (!success)
+ {
+ _supportsCrossDomain = false;
+ self.transportFailure(envelope, request, 'bad response', x);
+ }
+ }
+ },
+ onError: function(reason, exception)
+ {
+ _supportsCrossDomain = false;
+ if (sameStack)
+ {
+ // Keep the semantic of calling response callbacks asynchronously after the request
+ self.setTimeout(function()
+ {
+ self.transportFailure(envelope, request, reason, exception);
+ }, 0);
+ }
+ else
+ {
+ self.transportFailure(envelope, request, reason, exception);
+ }
+ }
+ });
+ sameStack = false;
+ }
+ catch (x)
+ {
+ _supportsCrossDomain = false;
+ // Keep the semantic of calling response callbacks asynchronously after the request
+ this.setTimeout(function()
+ {
+ self.transportFailure(envelope, request, 'error', x);
+ }, 0);
+ }
+ };
+
+ _self.reset = function()
+ {
+ _super.reset();
+ _supportsCrossDomain = true;
+ };
+
+ return _self;
+};
+
+org.cometd.CallbackPollingTransport = function()
+{
+ var _super = new org.cometd.RequestTransport();
+ var _self = org.cometd.Transport.derive(_super);
+ var _maxLength = 2000;
+
+ _self.accept = function(version, crossDomain, url)
+ {
+ return true;
+ };
+
+ _self.jsonpSend = function(packet)
+ {
+ throw 'Abstract';
+ };
+
+ _self.transportSend = function(envelope, request)
+ {
+ var self = this;
+
+ // Microsoft Internet Explorer has a 2083 URL max length
+ // We must ensure that we stay within that length
+ var start = 0;
+ var length = envelope.messages.length;
+ var lengths = [];
+ while (length > 0)
+ {
+ // Encode the messages because all brackets, quotes, commas, colons, etc
+ // present in the JSON will be URL encoded, taking many more characters
+ var json = org.cometd.JSON.toJSON(envelope.messages.slice(start, start + length));
+ var urlLength = envelope.url.length + encodeURI(json).length;
+
+ // Let's stay on the safe side and use 2000 instead of 2083
+ // also because we did not count few characters among which
+ // the parameter name 'message' and the parameter 'jsonp',
+ // which sum up to about 50 chars
+ if (urlLength > _maxLength)
+ {
+ if (length === 1)
+ {
+ var x = 'Bayeux message too big (' + urlLength + ' bytes, max is ' + _maxLength + ') ' +
+ 'for transport ' + this.getType();
+ // Keep the semantic of calling response callbacks asynchronously after the request
+ this.setTimeout(function()
+ {
+ self.transportFailure(envelope, request, 'error', x);
+ }, 0);
+ return;
+ }
+
+ --length;
+ continue;
+ }
+
+ lengths.push(length);
+ start += length;
+ length = envelope.messages.length - start;
+ }
+
+ // Here we are sure that the messages can be sent within the URL limit
+
+ var envelopeToSend = envelope;
+ if (lengths.length > 1)
+ {
+ var begin = 0;
+ var end = lengths[0];
+ this._debug('Transport', this.getType(), 'split', envelope.messages.length, 'messages into', lengths.join(' + '));
+ envelopeToSend = this._mixin(false, {}, envelope);
+ envelopeToSend.messages = envelope.messages.slice(begin, end);
+ envelopeToSend.onSuccess = envelope.onSuccess;
+ envelopeToSend.onFailure = envelope.onFailure;
+
+ for (var i = 1; i < lengths.length; ++i)
+ {
+ var nextEnvelope = this._mixin(false, {}, envelope);
+ begin = end;
+ end += lengths[i];
+ nextEnvelope.messages = envelope.messages.slice(begin, end);
+ nextEnvelope.onSuccess = envelope.onSuccess;
+ nextEnvelope.onFailure = envelope.onFailure;
+ this.send(nextEnvelope, request.metaConnect);
+ }
+ }
+
+ this._debug('Transport', this.getType(), 'sending request', request.id, 'envelope', envelopeToSend);
+
+ try
+ {
+ var sameStack = true;
+ this.jsonpSend({
+ transport: this,
+ url: envelopeToSend.url,
+ sync: envelopeToSend.sync,
+ headers: this.getConfiguration().requestHeaders,
+ body: org.cometd.JSON.toJSON(envelopeToSend.messages),
+ onSuccess: function(responses)
+ {
+ var success = false;
+ try
+ {
+ var received = self.convertToMessages(responses);
+ if (received.length === 0)
+ {
+ self.transportFailure(envelopeToSend, request, 'no response');
+ }
+ else
+ {
+ success=true;
+ self.transportSuccess(envelopeToSend, request, received);
+ }
+ }
+ catch (x)
+ {
+ self._debug(x);
+ if (!success)
+ {
+ self.transportFailure(envelopeToSend, request, 'bad response', x);
+ }
+ }
+ },
+ onError: function(reason, exception)
+ {
+ if (sameStack)
+ {
+ // Keep the semantic of calling response callbacks asynchronously after the request
+ self.setTimeout(function()
+ {
+ self.transportFailure(envelopeToSend, request, reason, exception);
+ }, 0);
+ }
+ else
+ {
+ self.transportFailure(envelopeToSend, request, reason, exception);
+ }
+ }
+ });
+ sameStack = false;
+ }
+ catch (xx)
+ {
+ // Keep the semantic of calling response callbacks asynchronously after the request
+ this.setTimeout(function()
+ {
+ self.transportFailure(envelopeToSend, request, 'error', xx);
+ }, 0);
+ }
+ };
+
+ return _self;
+};
+
+org.cometd.WebSocketTransport = function()
+{
+ var _super = new org.cometd.Transport();
+ var _self = org.cometd.Transport.derive(_super);
+ var _cometd;
+ // By default, support WebSocket
+ var _supportsWebSocket = true;
+ // Whether we were able to establish a WebSocket connection
+ var _webSocketSupported = false;
+ // Envelopes that have been sent
+ var _envelopes = {};
+ // Timeouts for messages that have been sent
+ var _timeouts = {};
+ var _webSocket = null;
+ var _opened = false;
+ var _connected = false;
+ var _successCallback;
+
+ function _websocketConnect()
+ {
+ // Mangle the URL, changing the scheme from 'http' to 'ws'
+ var url = _cometd.getURL().replace(/^http/, 'ws');
+ this._debug('Transport', this.getType(), 'connecting to URL', url);
+
+ var self = this;
+ var connectTimer = null;
+
+ var connectTimeout = _cometd.getConfiguration().connectTimeout;
+ if (connectTimeout > 0)
+ {
+ connectTimer = this.setTimeout(function()
+ {
+ connectTimer = null;
+ if (!_opened)
+ {
+ self._debug('Transport', self.getType(), 'timed out while connecting to URL', url, ':', connectTimeout, 'ms');
+ self.onClose(1002, 'Connect Timeout');
+ }
+ }, connectTimeout);
+ }
+
+ var webSocket = new org.cometd.WebSocket(url);
+ var onopen = function()
+ {
+ self._debug('WebSocket opened', webSocket);
+ if (connectTimer)
+ {
+ self.clearTimeout(connectTimer);
+ connectTimer = null;
+ }
+ if (webSocket !== _webSocket)
+ {
+ // It's possible that the onopen callback is invoked
+ // with a delay so that we have already reconnected
+ self._debug('Ignoring open event, WebSocket', _webSocket);
+ return;
+ }
+ self.onOpen();
+ };
+ var onclose = function(event)
+ {
+ var code = event ? event.code : 1000;
+ var reason = event ? event.reason : undefined;
+ self._debug('WebSocket closed', code, '/', reason, webSocket);
+ if (connectTimer)
+ {
+ self.clearTimeout(connectTimer);
+ connectTimer = null;
+ }
+ if (webSocket !== _webSocket)
+ {
+ // The onclose callback may be invoked when the server sends
+ // the close message reply, but after we have already reconnected
+ self._debug('Ignoring close event, WebSocket', _webSocket);
+ return;
+ }
+ self.onClose(code, reason);
+ };
+ var onmessage = function(message)
+ {
+ self._debug('WebSocket message', message, webSocket);
+ if (webSocket !== _webSocket)
+ {
+ self._debug('Ignoring message event, WebSocket', _webSocket);
+ return;
+ }
+ self.onMessage(message);
+ };
+
+ webSocket.onopen = onopen;
+ webSocket.onclose = onclose;
+ webSocket.onerror = function()
+ {
+ onclose({ code: 1002 });
+ };
+ webSocket.onmessage = onmessage;
+
+ _webSocket = webSocket;
+ this._debug('Transport', this.getType(), 'configured callbacks on', webSocket);
+ }
+
+ function _webSocketSend(envelope, metaConnect)
+ {
+ var json = org.cometd.JSON.toJSON(envelope.messages);
+
+ _webSocket.send(json);
+ this._debug('Transport', this.getType(), 'sent', envelope, 'metaConnect =', metaConnect);
+
+ // Manage the timeout waiting for the response
+ var maxDelay = this.getConfiguration().maxNetworkDelay;
+ var delay = maxDelay;
+ if (metaConnect)
+ {
+ delay += this.getAdvice().timeout;
+ _connected = true;
+ }
+
+ var messageIds = [];
+ for (var i = 0; i < envelope.messages.length; ++i)
+ {
+ var message = envelope.messages[i];
+ if (message.id)
+ {
+ messageIds.push(message.id);
+ var self = this;
+ var webSocket = _webSocket;
+ _timeouts[message.id] = this.setTimeout(function()
+ {
+ if (webSocket)
+ {
+ webSocket.close(1000, 'Timeout');
+ }
+ }, delay);
+ }
+ }
+
+ this._debug('Transport', this.getType(), 'waiting at most', delay, 'ms for messages', messageIds, 'maxNetworkDelay', maxDelay, ', timeouts:', _timeouts);
+ }
+
+ function _send(envelope, metaConnect)
+ {
+ try
+ {
+ if (_webSocket === null)
+ {
+ _websocketConnect.call(this);
+ }
+ // We may have a non-null _webSocket, but not be open yet so
+ // to avoid out of order deliveries, we check if we are open
+ else if (_opened)
+ {
+ _webSocketSend.call(this, envelope, metaConnect);
+ }
+ }
+ catch (x)
+ {
+ // Keep the semantic of calling response callbacks asynchronously after the request
+ var webSocket = _webSocket;
+ this.setTimeout(function()
+ {
+ envelope.onFailure(webSocket, envelope.messages, 'error', x);
+ }, 0);
+ }
+ }
+
+ _self.onOpen = function()
+ {
+ this._debug('Transport', this.getType(), 'opened', _webSocket);
+ _opened = true;
+ _webSocketSupported = true;
+
+ this._debug('Sending pending messages', _envelopes);
+ for (var key in _envelopes)
+ {
+ var element = _envelopes[key];
+ var envelope = element[0];
+ var metaConnect = element[1];
+ // Store the success callback, which is independent from the envelope,
+ // so that it can be used to notify arrival of messages.
+ _successCallback = envelope.onSuccess;
+ _webSocketSend.call(this, envelope, metaConnect);
+ }
+ };
+
+ _self.onMessage = function(wsMessage)
+ {
+ this._debug('Transport', this.getType(), 'received websocket message', wsMessage, _webSocket);
+
+ var close = false;
+ var messages = this.convertToMessages(wsMessage.data);
+ var messageIds = [];
+ for (var i = 0; i < messages.length; ++i)
+ {
+ var message = messages[i];
+
+ // Detect if the message is a response to a request we made.
+ // If it's a meta message, for sure it's a response;
+ // otherwise it's a publish message and publish responses lack the data field
+ if (/^\/meta\//.test(message.channel) || message.data === undefined)
+ {
+ if (message.id)
+ {
+ messageIds.push(message.id);
+
+ var timeout = _timeouts[message.id];
+ if (timeout)
+ {
+ this.clearTimeout(timeout);
+ delete _timeouts[message.id];
+ this._debug('Transport', this.getType(), 'removed timeout for message', message.id, ', timeouts', _timeouts);
+ }
+ }
+ }
+
+ if ('/meta/connect' === message.channel)
+ {
+ _connected = false;
+ }
+ if ('/meta/disconnect' === message.channel && !_connected)
+ {
+ close = true;
+ }
+ }
+
+ // Remove the envelope corresponding to the messages
+ var removed = false;
+ for (var j = 0; j < messageIds.length; ++j)
+ {
+ var id = messageIds[j];
+ for (var key in _envelopes)
+ {
+ var ids = key.split(',');
+ var index = org.cometd.Utils.inArray(id, ids);
+ if (index >= 0)
+ {
+ removed = true;
+ ids.splice(index, 1);
+ var envelope = _envelopes[key][0];
+ var metaConnect = _envelopes[key][1];
+ delete _envelopes[key];
+ if (ids.length > 0)
+ {
+ _envelopes[ids.join(',')] = [envelope, metaConnect];
+ }
+ break;
+ }
+ }
+ }
+ if (removed)
+ {
+ this._debug('Transport', this.getType(), 'removed envelope, envelopes', _envelopes);
+ }
+
+ _successCallback.call(this, messages);
+
+ if (close)
+ {
+ _webSocket.close(1000, 'Disconnect');
+ }
+ };
+
+ _self.onClose = function(code, reason)
+ {
+ this._debug('Transport', this.getType(), 'closed', code, reason, _webSocket);
+
+ // Remember if we were able to connect
+ // This close event could be due to server shutdown, and if it restarts we want to try websocket again
+ _supportsWebSocket = _webSocketSupported;
+
+ for (var id in _timeouts)
+ {
+ this.clearTimeout(_timeouts[id]);
+ }
+ _timeouts = {};
+
+ for (var key in _envelopes)
+ {
+ var envelope = _envelopes[key][0];
+ var metaConnect = _envelopes[key][1];
+ if (metaConnect)
+ {
+ _connected = false;
+ }
+ envelope.onFailure(_webSocket, envelope.messages, 'closed ' + code + '/' + reason);
+ }
+ _envelopes = {};
+
+ if (_webSocket !== null && _opened)
+ {
+ _webSocket.close(1000, 'Close');
+ }
+ _opened = false;
+ _webSocket = null;
+ };
+
+ _self.registered = function(type, cometd)
+ {
+ _super.registered(type, cometd);
+ _cometd = cometd;
+ };
+
+ _self.accept = function(version, crossDomain, url)
+ {
+ // Using !! to return a boolean (and not the WebSocket object)
+ return _supportsWebSocket && !!org.cometd.WebSocket && _cometd.websocketEnabled !== false;
+ };
+
+ _self.send = function(envelope, metaConnect)
+ {
+ this._debug('Transport', this.getType(), 'sending', envelope, 'metaConnect =', metaConnect);
+
+ // Store the envelope in any case; if the websocket cannot be opened, we fail it in close()
+ var messageIds = [];
+ for (var i = 0; i < envelope.messages.length; ++i)
+ {
+ var message = envelope.messages[i];
+ if (message.id)
+ {
+ messageIds.push(message.id);
+ }
+ }
+ _envelopes[messageIds.join(',')] = [envelope, metaConnect];
+ this._debug('Transport', this.getType(), 'stored envelope, envelopes', _envelopes);
+
+ _send.call(this, envelope, metaConnect);
+ };
+
+ _self.abort = function()
+ {
+ _super.abort();
+ if (_webSocket !== null)
+ {
+ try
+ {
+ _webSocket.close(1001);
+ }
+ catch (x)
+ {
+ // Firefox may throw, just ignore
+ this._debug(x);
+ }
+ }
+ this.reset();
+ };
+
+ _self.reset = function()
+ {
+ _super.reset();
+ if (_webSocket !== null && _opened)
+ {
+ _webSocket.close(1000, 'Reset');
+ }
+ _supportsWebSocket = true;
+ _webSocketSupported = false;
+ _timeouts = {};
+ _envelopes = {};
+ _webSocket = null;
+ _opened = false;
+ _successCallback = null;
+ };
+
+ return _self;
+};
+
+/**
+ * The constructor for a Cometd object, identified by an optional name.
+ * The default name is the string 'default'.
+ * In the rare case a page needs more than one Bayeux conversation,
+ * a new instance can be created via:
+ * <pre>
+ * var bayeuxUrl2 = ...;
+ *
+ * // Dojo style
+ * var cometd2 = new dojox.Cometd('another_optional_name');
+ *
+ * // jQuery style
+ * var cometd2 = new $.Cometd('another_optional_name');
+ *
+ * cometd2.init({url: bayeuxUrl2});
+ * </pre>
+ * @param name the optional name of this cometd object
+ */
+// IMPLEMENTATION NOTES:
+// Be very careful in not changing the function order and pass this file every time through JSLint (http://jslint.com)
+// The only implied globals must be "dojo", "org" and "window", and check that there are no "unused" warnings
+// Failing to pass JSLint may result in shrinkers/minifiers to create an unusable file.
+org.cometd.Cometd = function(name)
+{
+ var _cometd = this;
+ var _name = name || 'default';
+ var _crossDomain = false;
+ var _transports = new org.cometd.TransportRegistry();
+ var _transport;
+ var _status = 'disconnected';
+ var _messageId = 0;
+ var _clientId = null;
+ var _batch = 0;
+ var _messageQueue = [];
+ var _internalBatch = false;
+ var _listeners = {};
+ var _backoff = 0;
+ var _scheduledSend = null;
+ var _extensions = [];
+ var _advice = {};
+ var _handshakeProps;
+ var _publishCallbacks = {};
+ var _reestablish = false;
+ var _connected = false;
+ var _config = {
+ connectTimeout: 0,
+ maxConnections: 2,
+ backoffIncrement: 1000,
+ maxBackoff: 60000,
+ logLevel: 'info',
+ reverseIncomingExtensions: true,
+ maxNetworkDelay: 10000,
+ requestHeaders: {},
+ appendMessageTypeToURL: true,
+ autoBatch: false,
+ advice: {
+ timeout: 60000,
+ interval: 0,
+ reconnect: 'retry'
+ }
+ };
+
+ /**
+ * Mixes in the given objects into the target object by copying the properties.
+ * @param deep if the copy must be deep
+ * @param target the target object
+ * @param objects the objects whose properties are copied into the target
+ */
+ this._mixin = function(deep, target, objects)
+ {
+ var result = target || {};
+
+ // Skip first 2 parameters (deep and target), and loop over the others
+ for (var i = 2; i < arguments.length; ++i)
+ {
+ var object = arguments[i];
+
+ if (object === undefined || object === null)
+ {
+ continue;
+ }
+
+ for (var propName in object)
+ {
+ var prop = object[propName];
+ var targ = result[propName];
+
+ // Avoid infinite loops
+ if (prop === target)
+ {
+ continue;
+ }
+ // Do not mixin undefined values
+ if (prop === undefined)
+ {
+ continue;
+ }
+
+ if (deep && typeof prop === 'object' && prop !== null)
+ {
+ if (prop instanceof Array)
+ {
+ result[propName] = this._mixin(deep, targ instanceof Array ? targ : [], prop);
+ }
+ else
+ {
+ var source = typeof targ === 'object' && !(targ instanceof Array) ? targ : {};
+ result[propName] = this._mixin(deep, source, prop);
+ }
+ }
+ else
+ {
+ result[propName] = prop;
+ }
+ }
+ }
+
+ return result;
+ };
+
+ function _isString(value)
+ {
+ return org.cometd.Utils.isString(value);
+ }
+
+ function _isFunction(value)
+ {
+ if (value === undefined || value === null)
+ {
+ return false;
+ }
+ return typeof value === 'function';
+ }
+
+ function _log(level, args)
+ {
+ if (window.console)
+ {
+ var logger = window.console[level];
+ if (_isFunction(logger))
+ {
+ logger.apply(window.console, args);
+ }
+ }
+ }
+
+ this._warn = function()
+ {
+ _log('warn', arguments);
+ };
+
+ this._info = function()
+ {
+ if (_config.logLevel !== 'warn')
+ {
+ _log('info', arguments);
+ }
+ };
+
+ this._debug = function()
+ {
+ if (_config.logLevel === 'debug')
+ {
+ _log('debug', arguments);
+ }
+ };
+
+ /**
+ * Returns whether the given hostAndPort is cross domain.
+ * The default implementation checks against window.location.host
+ * but this function can be overridden to make it work in non-browser
+ * environments.
+ *
+ * @param hostAndPort the host and port in format host:port
+ * @return whether the given hostAndPort is cross domain
+ */
+ this._isCrossDomain = function(hostAndPort)
+ {
+ return hostAndPort && hostAndPort !== window.location.host;
+ };
+
+ function _configure(configuration)
+ {
+ _cometd._debug('Configuring cometd object with', configuration);
+ // Support old style param, where only the Bayeux server URL was passed
+ if (_isString(configuration))
+ {
+ configuration = { url: configuration };
+ }
+ if (!configuration)
+ {
+ configuration = {};
+ }
+
+ _config = _cometd._mixin(false, _config, configuration);
+
+ if (!_config.url)
+ {
+ throw 'Missing required configuration parameter \'url\' specifying the Bayeux server URL';
+ }
+
+ // Check if we're cross domain
+ // [1] = protocol://, [2] = host:port, [3] = host, [4] = IPv6_host, [5] = IPv4_host, [6] = :port, [7] = port, [8] = uri, [9] = rest
+ var urlParts = /(^https?:\/\/)?(((\[[^\]]+\])|([^:\/\?#]+))(:(\d+))?)?([^\?#]*)(.*)?/.exec(_config.url);
+ var hostAndPort = urlParts[2];
+ var uri = urlParts[8];
+ var afterURI = urlParts[9];
+ _crossDomain = _cometd._isCrossDomain(hostAndPort);
+
+ // Check if appending extra path is supported
+ if (_config.appendMessageTypeToURL)
+ {
+ if (afterURI !== undefined && afterURI.length > 0)
+ {
+ _cometd._info('Appending message type to URI ' + uri + afterURI + ' is not supported, disabling \'appendMessageTypeToURL\' configuration');
+ _config.appendMessageTypeToURL = false;
+ }
+ else
+ {
+ var uriSegments = uri.split('/');
+ var lastSegmentIndex = uriSegments.length - 1;
+ if (uri.match(/\/$/))
+ {
+ lastSegmentIndex -= 1;
+ }
+ if (uriSegments[lastSegmentIndex].indexOf('.') >= 0)
+ {
+ // Very likely the CometD servlet's URL pattern is mapped to an extension, such as *.cometd
+ // It will be difficult to add the extra path in this case
+ _cometd._info('Appending message type to URI ' + uri + ' is not supported, disabling \'appendMessageTypeToURL\' configuration');
+ _config.appendMessageTypeToURL = false;
+ }
+ }
+ }
+ }
+
+ function _clearSubscriptions()
+ {
+ for (var channel in _listeners)
+ {
+ var subscriptions = _listeners[channel];
+ for (var i = 0; i < subscriptions.length; ++i)
+ {
+ var subscription = subscriptions[i];
+ if (subscription && !subscription.listener)
+ {
+ delete subscriptions[i];
+ _cometd._debug('Removed subscription', subscription, 'for channel', channel);
+ }
+ }
+ }
+ }
+
+ function _setStatus(newStatus)
+ {
+ if (_status !== newStatus)
+ {
+ _cometd._debug('Status', _status, '->', newStatus);
+ _status = newStatus;
+ }
+ }
+
+ function _isDisconnected()
+ {
+ return _status === 'disconnecting' || _status === 'disconnected';
+ }
+
+ function _nextMessageId()
+ {
+ return ++_messageId;
+ }
+
+ function _applyExtension(scope, callback, name, message, outgoing)
+ {
+ try
+ {
+ return callback.call(scope, message);
+ }
+ catch (x)
+ {
+ _cometd._debug('Exception during execution of extension', name, x);
+ var exceptionCallback = _cometd.onExtensionException;
+ if (_isFunction(exceptionCallback))
+ {
+ _cometd._debug('Invoking extension exception callback', name, x);
+ try
+ {
+ exceptionCallback.call(_cometd, x, name, outgoing, message);
+ }
+ catch(xx)
+ {
+ _cometd._info('Exception during execution of exception callback in extension', name, xx);
+ }
+ }
+ return message;
+ }
+ }
+
+ function _applyIncomingExtensions(message)
+ {
+ for (var i = 0; i < _extensions.length; ++i)
+ {
+ if (message === undefined || message === null)
+ {
+ break;
+ }
+
+ var index = _config.reverseIncomingExtensions ? _extensions.length - 1 - i : i;
+ var extension = _extensions[index];
+ var callback = extension.extension.incoming;
+ if (_isFunction(callback))
+ {
+ var result = _applyExtension(extension.extension, callback, extension.name, message, false);
+ message = result === undefined ? message : result;
+ }
+ }
+ return message;
+ }
+
+ function _applyOutgoingExtensions(message)
+ {
+ for (var i = 0; i < _extensions.length; ++i)
+ {
+ if (message === undefined || message === null)
+ {
+ break;
+ }
+
+ var extension = _extensions[i];
+ var callback = extension.extension.outgoing;
+ if (_isFunction(callback))
+ {
+ var result = _applyExtension(extension.extension, callback, extension.name, message, true);
+ message = result === undefined ? message : result;
+ }
+ }
+ return message;
+ }
+
+ function _notify(channel, message)
+ {
+ var subscriptions = _listeners[channel];
+ if (subscriptions && subscriptions.length > 0)
+ {
+ for (var i = 0; i < subscriptions.length; ++i)
+ {
+ var subscription = subscriptions[i];
+ // Subscriptions may come and go, so the array may have 'holes'
+ if (subscription)
+ {
+ try
+ {
+ subscription.callback.call(subscription.scope, message);
+ }
+ catch (x)
+ {
+ _cometd._debug('Exception during notification', subscription, message, x);
+ var listenerCallback = _cometd.onListenerException;
+ if (_isFunction(listenerCallback))
+ {
+ _cometd._debug('Invoking listener exception callback', subscription, x);
+ try
+ {
+ listenerCallback.call(_cometd, x, subscription.handle, subscription.listener, message);
+ }
+ catch (xx)
+ {
+ _cometd._info('Exception during execution of listener callback', subscription, xx);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ function _notifyListeners(channel, message)
+ {
+ // Notify direct listeners
+ _notify(channel, message);
+
+ // Notify the globbing listeners
+ var channelParts = channel.split('/');
+ var last = channelParts.length - 1;
+ for (var i = last; i > 0; --i)
+ {
+ var channelPart = channelParts.slice(0, i).join('/') + '/*';
+ // We don't want to notify /foo/* if the channel is /foo/bar/baz,
+ // so we stop at the first non recursive globbing
+ if (i === last)
+ {
+ _notify(channelPart, message);
+ }
+ // Add the recursive globber and notify
+ channelPart += '*';
+ _notify(channelPart, message);
+ }
+ }
+
+ function _cancelDelayedSend()
+ {
+ if (_scheduledSend !== null)
+ {
+ org.cometd.Utils.clearTimeout(_scheduledSend);
+ }
+ _scheduledSend = null;
+ }
+
+ function _delayedSend(operation)
+ {
+ _cancelDelayedSend();
+ var delay = _advice.interval + _backoff;
+ _cometd._debug('Function scheduled in', delay, 'ms, interval =', _advice.interval, 'backoff =', _backoff, operation);
+ _scheduledSend = org.cometd.Utils.setTimeout(_cometd, operation, delay);
+ }
+
+ // Needed to break cyclic dependencies between function definitions
+ var _handleMessages;
+ var _handleFailure;
+
+ /**
+ * Delivers the messages to the CometD server
+ * @param messages the array of messages to send
+ * @param longpoll true if this send is a long poll
+ */
+ function _send(sync, messages, longpoll, extraPath)
+ {
+ // We must be sure that the messages have a clientId.
+ // This is not guaranteed since the handshake may take time to return
+ // (and hence the clientId is not known yet) and the application
+ // may create other messages.
+ for (var i = 0; i < messages.length; ++i)
+ {
+ var message = messages[i];
+ message.id = '' + _nextMessageId();
+
+ if (_clientId)
+ {
+ message.clientId = _clientId;
+ }
+
+ var callback = undefined;
+ if (_isFunction(message._callback))
+ {
+ callback = message._callback;
+ // Remove the publish callback before calling the extensions
+ delete message._callback;
+ }
+
+ message = _applyOutgoingExtensions(message);
+ if (message !== undefined && message !== null)
+ {
+ messages[i] = message;
+ if (callback)
+ _publishCallbacks[message.id] = callback;
+ }
+ else
+ {
+ messages.splice(i--, 1);
+ }
+ }
+
+ if (messages.length === 0)
+ {
+ return;
+ }
+
+ var url = _config.url;
+ if (_config.appendMessageTypeToURL)
+ {
+ // If url does not end with '/', then append it
+ if (!url.match(/\/$/))
+ {
+ url = url + '/';
+ }
+ if (extraPath)
+ {
+ url = url + extraPath;
+ }
+ }
+
+ var envelope = {
+ url: url,
+ sync: sync,
+ messages: messages,
+ onSuccess: function(rcvdMessages)
+ {
+ try
+ {
+ _handleMessages.call(_cometd, rcvdMessages);
+ }
+ catch (x)
+ {
+ _cometd._debug('Exception during handling of messages', x);
+ }
+ },
+ onFailure: function(conduit, messages, reason, exception)
+ {
+ try
+ {
+ _handleFailure.call(_cometd, conduit, messages, reason, exception);
+ }
+ catch (x)
+ {
+ _cometd._debug('Exception during handling of failure', x);
+ }
+ }
+ };
+ _cometd._debug('Send', envelope);
+ _transport.send(envelope, longpoll);
+ }
+
+ function _queueSend(message)
+ {
+ if (_batch > 0 || _internalBatch === true)
+ {
+ _messageQueue.push(message);
+ }
+ else
+ {
+ _send(false, [message], false);
+ }
+ }
+
+ /**
+ * Sends a complete bayeux message.
+ * This method is exposed as a public so that extensions may use it
+ * to send bayeux message directly, for example in case of re-sending
+ * messages that have already been sent but that for some reason must
+ * be resent.
+ */
+ this.send = _queueSend;
+
+ function _resetBackoff()
+ {
+ _backoff = 0;
+ }
+
+ function _increaseBackoff()
+ {
+ if (_backoff < _config.maxBackoff)
+ {
+ _backoff += _config.backoffIncrement;
+ }
+ }
+
+ /**
+ * Starts a the batch of messages to be sent in a single request.
+ * @see #_endBatch(sendMessages)
+ */
+ function _startBatch()
+ {
+ ++_batch;
+ }
+
+ function _flushBatch()
+ {
+ var messages = _messageQueue;
+ _messageQueue = [];
+ if (messages.length > 0)
+ {
+ _send(false, messages, false);
+ }
+ }
+
+ /**
+ * Ends the batch of messages to be sent in a single request,
+ * optionally sending messages present in the message queue depending
+ * on the given argument.
+ * @see #_startBatch()
+ */
+ function _endBatch()
+ {
+ --_batch;
+ if (_batch < 0)
+ {
+ throw 'Calls to startBatch() and endBatch() are not paired';
+ }
+
+ if (_batch === 0 && !_isDisconnected() && !_internalBatch)
+ {
+ _flushBatch();
+ }
+ }
+
+ /**
+ * Sends the connect message
+ */
+ function _connect()
+ {
+ if (!_isDisconnected())
+ {
+ var message = {
+ channel: '/meta/connect',
+ connectionType: _transport.getType()
+ };
+
+ // In case of reload or temporary loss of connection
+ // we want the next successful connect to return immediately
+ // instead of being held by the server, so that connect listeners
+ // can be notified that the connection has been re-established
+ if (!_connected)
+ {
+ message.advice = { timeout: 0 };
+ }
+
+ _setStatus('connecting');
+ _cometd._debug('Connect sent', message);
+ _send(false, [message], true, 'connect');
+ _setStatus('connected');
+ }
+ }
+
+ function _delayedConnect()
+ {
+ _setStatus('connecting');
+ _delayedSend(function()
+ {
+ _connect();
+ });
+ }
+
+ function _updateAdvice(newAdvice)
+ {
+ if (newAdvice)
+ {
+ _advice = _cometd._mixin(false, {}, _config.advice, newAdvice);
+ _cometd._debug('New advice', _advice);
+ }
+ }
+
+ function _disconnect(abort)
+ {
+ _cancelDelayedSend();
+ if (abort)
+ {
+ _transport.abort();
+ }
+ _clientId = null;
+ _setStatus('disconnected');
+ _batch = 0;
+ _resetBackoff();
+
+ // Fail any existing queued message
+ if (_messageQueue.length > 0)
+ {
+ _handleFailure.call(_cometd, undefined, _messageQueue, 'error', 'Disconnected');
+ _messageQueue = [];
+ }
+ }
+
+ /**
+ * Sends the initial handshake message
+ */
+ function _handshake(handshakeProps)
+ {
+ _clientId = null;
+
+ _clearSubscriptions();
+
+ // Reset the transports if we're not retrying the handshake
+ if (_isDisconnected())
+ {
+ _transports.reset();
+ _updateAdvice(_config.advice);
+ }
+ else
+ {
+ // We are retrying the handshake, either because another handshake failed
+ // and we're backing off, or because the server timed us out and asks us to
+ // re-handshake: in both cases, make sure that if the handshake succeeds
+ // the next action is a connect.
+ _updateAdvice(_cometd._mixin(false, _advice, {reconnect: 'retry'}));
+ }
+
+ _batch = 0;
+
+ // Mark the start of an internal batch.
+ // This is needed because handshake and connect are async.
+ // It may happen that the application calls init() then subscribe()
+ // and the subscribe message is sent before the connect message, if
+ // the subscribe message is not held until the connect message is sent.
+ // So here we start a batch to hold temporarily any message until
+ // the connection is fully established.
+ _internalBatch = true;
+
+ // Save the properties provided by the user, so that
+ // we can reuse them during automatic re-handshake
+ _handshakeProps = handshakeProps;
+
+ var version = '1.0';
+
+ // Figure out the transports to send to the server
+ var transportTypes = _transports.findTransportTypes(version, _crossDomain, _config.url);
+
+ var bayeuxMessage = {
+ version: version,
+ minimumVersion: '0.9',
+ channel: '/meta/handshake',
+ supportedConnectionTypes: transportTypes,
+ advice: {
+ timeout: _advice.timeout,
+ interval: _advice.interval
+ }
+ };
+ // Do not allow the user to mess with the required properties,
+ // so merge first the user properties and *then* the bayeux message
+ var message = _cometd._mixin(false, {}, _handshakeProps, bayeuxMessage);
+
+ // Pick up the first available transport as initial transport
+ // since we don't know if the server supports it
+ _transport = _transports.negotiateTransport(transportTypes, version, _crossDomain, _config.url);
+ _cometd._debug('Initial transport is', _transport.getType());
+
+ // We started a batch to hold the application messages,
+ // so here we must bypass it and send immediately.
+ _setStatus('handshaking');
+ _cometd._debug('Handshake sent', message);
+ _send(false, [message], false, 'handshake');
+ }
+
+ function _delayedHandshake()
+ {
+ _setStatus('handshaking');
+
+ // We will call _handshake() which will reset _clientId, but we want to avoid
+ // that between the end of this method and the call to _handshake() someone may
+ // call publish() (or other methods that call _queueSend()).
+ _internalBatch = true;
+
+ _delayedSend(function()
+ {
+ _handshake(_handshakeProps);
+ });
+ }
+
+ function _failHandshake(message)
+ {
+ _notifyListeners('/meta/handshake', message);
+ _notifyListeners('/meta/unsuccessful', message);
+
+ // Only try again if we haven't been disconnected and
+ // the advice permits us to retry the handshake
+ var retry = !_isDisconnected() && _advice.reconnect !== 'none';
+ if (retry)
+ {
+ _increaseBackoff();
+ _delayedHandshake();
+ }
+ else
+ {
+ _disconnect(false);
+ }
+ }
+
+ function _handshakeResponse(message)
+ {
+ if (message.successful)
+ {
+ // Save clientId, figure out transport, then follow the advice to connect
+ _clientId = message.clientId;
+
+ var newTransport = _transports.negotiateTransport(message.supportedConnectionTypes, message.version, _crossDomain, _config.url);
+ if (newTransport === null)
+ {
+ throw 'Could not negotiate transport with server; client ' +
+ _transports.findTransportTypes(message.version, _crossDomain, _config.url) +
+ ', server ' + message.supportedConnectionTypes;
+ }
+ else if (_transport !== newTransport)
+ {
+ _cometd._debug('Transport', _transport, '->', newTransport);
+ _transport = newTransport;
+ }
+
+ // End the internal batch and allow held messages from the application
+ // to go to the server (see _handshake() where we start the internal batch).
+ _internalBatch = false;
+ _flushBatch();
+
+ // Here the new transport is in place, as well as the clientId, so
+ // the listeners can perform a publish() if they want.
+ // Notify the listeners before the connect below.
+ message.reestablish = _reestablish;
+ _reestablish = true;
+ _notifyListeners('/meta/handshake', message);
+
+ var action = _isDisconnected() ? 'none' : _advice.reconnect;
+ switch (action)
+ {
+ case 'retry':
+ _resetBackoff();
+ _delayedConnect();
+ break;
+ case 'none':
+ _disconnect(false);
+ break;
+ default:
+ throw 'Unrecognized advice action ' + action;
+ }
+ }
+ else
+ {
+ _failHandshake(message);
+ }
+ }
+
+ function _handshakeFailure(xhr, message)
+ {
+ _failHandshake({
+ successful: false,
+ failure: true,
+ channel: '/meta/handshake',
+ request: message,
+ xhr: xhr,
+ advice: {
+ reconnect: 'retry',
+ interval: _backoff
+ }
+ });
+ }
+
+ function _failConnect(message)
+ {
+ // Notify the listeners after the status change but before the next action
+ _notifyListeners('/meta/connect', message);
+ _notifyListeners('/meta/unsuccessful', message);
+
+ // This may happen when the server crashed, the current clientId
+ // will be invalid, and the server will ask to handshake again
+ // Listeners can call disconnect(), so check the state after they run
+ var action = _isDisconnected() ? 'none' : _advice.reconnect;
+ switch (action)
+ {
+ case 'retry':
+ _delayedConnect();
+ _increaseBackoff();
+ break;
+ case 'handshake':
+ // The current transport may be failed (e.g. network disconnection)
+ // Reset the transports so the new handshake picks up the right one
+ _transports.reset();
+ _resetBackoff();
+ _delayedHandshake();
+ break;
+ case 'none':
+ _disconnect(false);
+ break;
+ default:
+ throw 'Unrecognized advice action' + action;
+ }
+ }
+
+ function _connectResponse(message)
+ {
+ _connected = message.successful;
+
+ if (_connected)
+ {
+ _notifyListeners('/meta/connect', message);
+
+ // Normally, the advice will say "reconnect: 'retry', interval: 0"
+ // and the server will hold the request, so when a response returns
+ // we immediately call the server again (long polling)
+ // Listeners can call disconnect(), so check the state after they run
+ var action = _isDisconnected() ? 'none' : _advice.reconnect;
+ switch (action)
+ {
+ case 'retry':
+ _resetBackoff();
+ _delayedConnect();
+ break;
+ case 'none':
+ _disconnect(false);
+ break;
+ default:
+ throw 'Unrecognized advice action ' + action;
+ }
+ }
+ else
+ {
+ _failConnect(message);
+ }
+ }
+
+ function _connectFailure(xhr, message)
+ {
+ _connected = false;
+ _failConnect({
+ successful: false,
+ failure: true,
+ channel: '/meta/connect',
+ request: message,
+ xhr: xhr,
+ advice: {
+ reconnect: 'retry',
+ interval: _backoff
+ }
+ });
+ }
+
+ function _failDisconnect(message)
+ {
+ _disconnect(true);
+ _notifyListeners('/meta/disconnect', message);
+ _notifyListeners('/meta/unsuccessful', message);
+ }
+
+ function _disconnectResponse(message)
+ {
+ if (message.successful)
+ {
+ _disconnect(false);
+ _notifyListeners('/meta/disconnect', message);
+ }
+ else
+ {
+ _failDisconnect(message);
+ }
+ }
+
+ function _disconnectFailure(xhr, message)
+ {
+ _failDisconnect({
+ successful: false,
+ failure: true,
+ channel: '/meta/disconnect',
+ request: message,
+ xhr: xhr,
+ advice: {
+ reconnect: 'none',
+ interval: 0
+ }
+ });
+ }
+
+ function _failSubscribe(message)
+ {
+ _notifyListeners('/meta/subscribe', message);
+ _notifyListeners('/meta/unsuccessful', message);
+ }
+
+ function _subscribeResponse(message)
+ {
+ if (message.successful)
+ {
+ _notifyListeners('/meta/subscribe', message);
+ }
+ else
+ {
+ _failSubscribe(message);
+ }
+ }
+
+ function _subscribeFailure(xhr, message)
+ {
+ _failSubscribe({
+ successful: false,
+ failure: true,
+ channel: '/meta/subscribe',
+ request: message,
+ xhr: xhr,
+ advice: {
+ reconnect: 'none',
+ interval: 0
+ }
+ });
+ }
+
+ function _failUnsubscribe(message)
+ {
+ _notifyListeners('/meta/unsubscribe', message);
+ _notifyListeners('/meta/unsuccessful', message);
+ }
+
+ function _unsubscribeResponse(message)
+ {
+ if (message.successful)
+ {
+ _notifyListeners('/meta/unsubscribe', message);
+ }
+ else
+ {
+ _failUnsubscribe(message);
+ }
+ }
+
+ function _unsubscribeFailure(xhr, message)
+ {
+ _failUnsubscribe({
+ successful: false,
+ failure: true,
+ channel: '/meta/unsubscribe',
+ request: message,
+ xhr: xhr,
+ advice: {
+ reconnect: 'none',
+ interval: 0
+ }
+ });
+ }
+
+ function _handlePublishCallback(message)
+ {
+ var callback = _publishCallbacks[message.id];
+ if (_isFunction(callback))
+ {
+ delete _publishCallbacks[message.id];
+ callback.call(_cometd, message);
+ }
+ }
+
+ function _failMessage(message)
+ {
+ _handlePublishCallback(message);
+ _notifyListeners('/meta/publish', message);
+ _notifyListeners('/meta/unsuccessful', message);
+ }
+
+ function _messageResponse(message)
+ {
+ if (message.successful === undefined)
+ {
+ if (message.data)
+ {
+ // It is a plain message, and not a bayeux meta message
+ _notifyListeners(message.channel, message);
+ }
+ else
+ {
+ _cometd._debug('Unknown message', message);
+ }
+ }
+ else
+ {
+ if (message.successful)
+ {
+ _handlePublishCallback(message);
+ _notifyListeners('/meta/publish', message);
+ }
+ else
+ {
+ _failMessage(message);
+ }
+ }
+ }
+
+ function _messageFailure(xhr, message)
+ {
+ _failMessage({
+ successful: false,
+ failure: true,
+ channel: message.channel,
+ request: message,
+ xhr: xhr,
+ advice: {
+ reconnect: 'none',
+ interval: 0
+ }
+ });
+ }
+
+ function _receive(message)
+ {
+ message = _applyIncomingExtensions(message);
+ if (message === undefined || message === null)
+ {
+ return;
+ }
+
+ _updateAdvice(message.advice);
+
+ var channel = message.channel;
+ switch (channel)
+ {
+ case '/meta/handshake':
+ _handshakeResponse(message);
+ break;
+ case '/meta/connect':
+ _connectResponse(message);
+ break;
+ case '/meta/disconnect':
+ _disconnectResponse(message);
+ break;
+ case '/meta/subscribe':
+ _subscribeResponse(message);
+ break;
+ case '/meta/unsubscribe':
+ _unsubscribeResponse(message);
+ break;
+ default:
+ _messageResponse(message);
+ break;
+ }
+ }
+
+ /**
+ * Receives a message.
+ * This method is exposed as a public so that extensions may inject
+ * messages simulating that they had been received.
+ */
+ this.receive = _receive;
+
+ _handleMessages = function(rcvdMessages)
+ {
+ _cometd._debug('Received', rcvdMessages);
+
+ for (var i = 0; i < rcvdMessages.length; ++i)
+ {
+ var message = rcvdMessages[i];
+ _receive(message);
+ }
+ };
+
+ _handleFailure = function(conduit, messages, reason, exception)
+ {
+ _cometd._debug('handleFailure', conduit, messages, reason, exception);
+
+ for (var i = 0; i < messages.length; ++i)
+ {
+ var message = messages[i];
+ var channel = message.channel;
+ switch (channel)
+ {
+ case '/meta/handshake':
+ _handshakeFailure(conduit, message);
+ break;
+ case '/meta/connect':
+ _connectFailure(conduit, message);
+ break;
+ case '/meta/disconnect':
+ _disconnectFailure(conduit, message);
+ break;
+ case '/meta/subscribe':
+ _subscribeFailure(conduit, message);
+ break;
+ case '/meta/unsubscribe':
+ _unsubscribeFailure(conduit, message);
+ break;
+ default:
+ _messageFailure(conduit, message);
+ break;
+ }
+ }
+ };
+
+ function _hasSubscriptions(channel)
+ {
+ var subscriptions = _listeners[channel];
+ if (subscriptions)
+ {
+ for (var i = 0; i < subscriptions.length; ++i)
+ {
+ if (subscriptions[i])
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ function _resolveScopedCallback(scope, callback)
+ {
+ var delegate = {
+ scope: scope,
+ method: callback
+ };
+ if (_isFunction(scope))
+ {
+ delegate.scope = undefined;
+ delegate.method = scope;
+ }
+ else
+ {
+ if (_isString(callback))
+ {
+ if (!scope)
+ {
+ throw 'Invalid scope ' + scope;
+ }
+ delegate.method = scope[callback];
+ if (!_isFunction(delegate.method))
+ {
+ throw 'Invalid callback ' + callback + ' for scope ' + scope;
+ }
+ }
+ else if (!_isFunction(callback))
+ {
+ throw 'Invalid callback ' + callback;
+ }
+ }
+ return delegate;
+ }
+
+ function _addListener(channel, scope, callback, isListener)
+ {
+ // The data structure is a map<channel, subscription[]>, where each subscription
+ // holds the callback to be called and its scope.
+
+ var delegate = _resolveScopedCallback(scope, callback);
+ _cometd._debug('Adding listener on', channel, 'with scope', delegate.scope, 'and callback', delegate.method);
+
+ var subscription = {
+ channel: channel,
+ scope: delegate.scope,
+ callback: delegate.method,
+ listener: isListener
+ };
+
+ var subscriptions = _listeners[channel];
+ if (!subscriptions)
+ {
+ subscriptions = [];
+ _listeners[channel] = subscriptions;
+ }
+
+ // Pushing onto an array appends at the end and returns the id associated with the element increased by 1.
+ // Note that if:
+ // a.push('a'); var hb=a.push('b'); delete a[hb-1]; var hc=a.push('c');
+ // then:
+ // hc==3, a.join()=='a',,'c', a.length==3
+ var subscriptionID = subscriptions.push(subscription) - 1;
+ subscription.id = subscriptionID;
+ subscription.handle = [channel, subscriptionID];
+
+ _cometd._debug('Added listener', subscription, 'for channel', channel, 'having id =', subscriptionID);
+
+ // The subscription to allow removal of the listener is made of the channel and the index
+ return subscription.handle;
+ }
+
+ function _removeListener(subscription)
+ {
+ var subscriptions = _listeners[subscription[0]];
+ if (subscriptions)
+ {
+ delete subscriptions[subscription[1]];
+ _cometd._debug('Removed listener', subscription);
+ }
+ }
+
+ //
+ // PUBLIC API
+ //
+
+ /**
+ * Registers the given transport under the given transport type.
+ * The optional index parameter specifies the "priority" at which the
+ * transport is registered (where 0 is the max priority).
+ * If a transport with the same type is already registered, this function
+ * does nothing and returns false.
+ * @param type the transport type
+ * @param transport the transport object
+ * @param index the index at which this transport is to be registered
+ * @return true if the transport has been registered, false otherwise
+ * @see #unregisterTransport(type)
+ */
+ this.registerTransport = function(type, transport, index)
+ {
+ var result = _transports.add(type, transport, index);
+ if (result)
+ {
+ this._debug('Registered transport', type);
+
+ if (_isFunction(transport.registered))
+ {
+ transport.registered(type, this);
+ }
+ }
+ return result;
+ };
+
+ /**
+ * @return an array of all registered transport types
+ */
+ this.getTransportTypes = function()
+ {
+ return _transports.getTransportTypes();
+ };
+
+ /**
+ * Unregisters the transport with the given transport type.
+ * @param type the transport type to unregister
+ * @return the transport that has been unregistered,
+ * or null if no transport was previously registered under the given transport type
+ */
+ this.unregisterTransport = function(type)
+ {
+ var transport = _transports.remove(type);
+ if (transport !== null)
+ {
+ this._debug('Unregistered transport', type);
+
+ if (_isFunction(transport.unregistered))
+ {
+ transport.unregistered();
+ }
+ }
+ return transport;
+ };
+
+ this.unregisterTransports = function()
+ {
+ _transports.clear();
+ };
+
+ this.findTransport = function(name)
+ {
+ return _transports.find(name);
+ };
+
+ /**
+ * Configures the initial Bayeux communication with the Bayeux server.
+ * Configuration is passed via an object that must contain a mandatory field <code>url</code>
+ * of type string containing the URL of the Bayeux server.
+ * @param configuration the configuration object
+ */
+ this.configure = function(configuration)
+ {
+ _configure.call(this, configuration);
+ };
+
+ /**
+ * Configures and establishes the Bayeux communication with the Bayeux server
+ * via a handshake and a subsequent connect.
+ * @param configuration the configuration object
+ * @param handshakeProps an object to be merged with the handshake message
+ * @see #configure(configuration)
+ * @see #handshake(handshakeProps)
+ */
+ this.init = function(configuration, handshakeProps)
+ {
+ this.configure(configuration);
+ this.handshake(handshakeProps);
+ };
+
+ /**
+ * Establishes the Bayeux communication with the Bayeux server
+ * via a handshake and a subsequent connect.
+ * @param handshakeProps an object to be merged with the handshake message
+ */
+ this.handshake = function(handshakeProps)
+ {
+ _setStatus('disconnected');
+ _reestablish = false;
+ _handshake(handshakeProps);
+ };
+
+ /**
+ * Disconnects from the Bayeux server.
+ * It is possible to suggest to attempt a synchronous disconnect, but this feature
+ * may only be available in certain transports (for example, long-polling may support
+ * it, callback-polling certainly does not).
+ * @param sync whether attempt to perform a synchronous disconnect
+ * @param disconnectProps an object to be merged with the disconnect message
+ */
+ this.disconnect = function(sync, disconnectProps)
+ {
+ if (_isDisconnected())
+ {
+ return;
+ }
+
+ if (disconnectProps === undefined)
+ {
+ if (typeof sync !== 'boolean')
+ {
+ disconnectProps = sync;
+ sync = false;
+ }
+ }
+
+ var bayeuxMessage = {
+ channel: '/meta/disconnect'
+ };
+ var message = this._mixin(false, {}, disconnectProps, bayeuxMessage);
+ _setStatus('disconnecting');
+ _send(sync === true, [message], false, 'disconnect');
+ };
+
+ /**
+ * Marks the start of a batch of application messages to be sent to the server
+ * in a single request, obtaining a single response containing (possibly) many
+ * application reply messages.
+ * Messages are held in a queue and not sent until {@link #endBatch()} is called.
+ * If startBatch() is called multiple times, then an equal number of endBatch()
+ * calls must be made to close and send the batch of messages.
+ * @see #endBatch()
+ */
+ this.startBatch = function()
+ {
+ _startBatch();
+ };
+
+ /**
+ * Marks the end of a batch of application messages to be sent to the server
+ * in a single request.
+ * @see #startBatch()
+ */
+ this.endBatch = function()
+ {
+ _endBatch();
+ };
+
+ /**
+ * Executes the given callback in the given scope, surrounded by a {@link #startBatch()}
+ * and {@link #endBatch()} calls.
+ * @param scope the scope of the callback, may be omitted
+ * @param callback the callback to be executed within {@link #startBatch()} and {@link #endBatch()} calls
+ */
+ this.batch = function(scope, callback)
+ {
+ var delegate = _resolveScopedCallback(scope, callback);
+ this.startBatch();
+ try
+ {
+ delegate.method.call(delegate.scope);
+ this.endBatch();
+ }
+ catch (x)
+ {
+ this._debug('Exception during execution of batch', x);
+ this.endBatch();
+ throw x;
+ }
+ };
+
+ /**
+ * Adds a listener for bayeux messages, performing the given callback in the given scope
+ * when a message for the given channel arrives.
+ * @param channel the channel the listener is interested to
+ * @param scope the scope of the callback, may be omitted
+ * @param callback the callback to call when a message is sent to the channel
+ * @returns the subscription handle to be passed to {@link #removeListener(object)}
+ * @see #removeListener(subscription)
+ */
+ this.addListener = function(channel, scope, callback)
+ {
+ if (arguments.length < 2)
+ {
+ throw 'Illegal arguments number: required 2, got ' + arguments.length;
+ }
+ if (!_isString(channel))
+ {
+ throw 'Illegal argument type: channel must be a string';
+ }
+
+ return _addListener(channel, scope, callback, true);
+ };
+
+ /**
+ * Removes the subscription obtained with a call to {@link #addListener(string, object, function)}.
+ * @param subscription the subscription to unsubscribe.
+ * @see #addListener(channel, scope, callback)
+ */
+ this.removeListener = function(subscription)
+ {
+ if (!org.cometd.Utils.isArray(subscription))
+ {
+ throw 'Invalid argument: expected subscription, not ' + subscription;
+ }
+
+ _removeListener(subscription);
+ };
+
+ /**
+ * Removes all listeners registered with {@link #addListener(channel, scope, callback)} or
+ * {@link #subscribe(channel, scope, callback)}.
+ */
+ this.clearListeners = function()
+ {
+ _listeners = {};
+ };
+
+ /**
+ * Subscribes to the given channel, performing the given callback in the given scope
+ * when a message for the channel arrives.
+ * @param channel the channel to subscribe to
+ * @param scope the scope of the callback, may be omitted
+ * @param callback the callback to call when a message is sent to the channel
+ * @param subscribeProps an object to be merged with the subscribe message
+ * @return the subscription handle to be passed to {@link #unsubscribe(object)}
+ */
+ this.subscribe = function(channel, scope, callback, subscribeProps)
+ {
+ if (arguments.length < 2)
+ {
+ throw 'Illegal arguments number: required 2, got ' + arguments.length;
+ }
+ if (!_isString(channel))
+ {
+ throw 'Illegal argument type: channel must be a string';
+ }
+ if (_isDisconnected())
+ {
+ throw 'Illegal state: already disconnected';
+ }
+
+ // Normalize arguments
+ if (_isFunction(scope))
+ {
+ subscribeProps = callback;
+ callback = scope;
+ scope = undefined;
+ }
+
+ // Only send the message to the server if this client has not yet subscribed to the channel
+ var send = !_hasSubscriptions(channel);
+
+ var subscription = _addListener(channel, scope, callback, false);
+
+ if (send)
+ {
+ // Send the subscription message after the subscription registration to avoid
+ // races where the server would send a message to the subscribers, but here
+ // on the client the subscription has not been added yet to the data structures
+ var bayeuxMessage = {
+ channel: '/meta/subscribe',
+ subscription: channel
+ };
+ var message = this._mixin(false, {}, subscribeProps, bayeuxMessage);
+ _queueSend(message);
+ }
+
+ return subscription;
+ };
+
+ /**
+ * Unsubscribes the subscription obtained with a call to {@link #subscribe(string, object, function)}.
+ * @param subscription the subscription to unsubscribe.
+ */
+ this.unsubscribe = function(subscription, unsubscribeProps)
+ {
+ if (arguments.length < 1)
+ {
+ throw 'Illegal arguments number: required 1, got ' + arguments.length;
+ }
+ if (_isDisconnected())
+ {
+ throw 'Illegal state: already disconnected';
+ }
+
+ // Remove the local listener before sending the message
+ // This ensures that if the server fails, this client does not get notifications
+ this.removeListener(subscription);
+
+ var channel = subscription[0];
+ // Only send the message to the server if this client unsubscribes the last subscription
+ if (!_hasSubscriptions(channel))
+ {
+ var bayeuxMessage = {
+ channel: '/meta/unsubscribe',
+ subscription: channel
+ };
+ var message = this._mixin(false, {}, unsubscribeProps, bayeuxMessage);
+ _queueSend(message);
+ }
+ };
+
+ /**
+ * Removes all subscriptions added via {@link #subscribe(channel, scope, callback, subscribeProps)},
+ * but does not remove the listeners added via {@link addListener(channel, scope, callback)}.
+ */
+ this.clearSubscriptions = function()
+ {
+ _clearSubscriptions();
+ };
+
+ /**
+ * Publishes a message on the given channel, containing the given content.
+ * @param channel the channel to publish the message to
+ * @param content the content of the message
+ * @param publishProps an object to be merged with the publish message
+ */
+ this.publish = function(channel, content, publishProps, publishCallback)
+ {
+ if (arguments.length < 1)
+ {
+ throw 'Illegal arguments number: required 1, got ' + arguments.length;
+ }
+ if (!_isString(channel))
+ {
+ throw 'Illegal argument type: channel must be a string';
+ }
+ if (_isDisconnected())
+ {
+ throw 'Illegal state: already disconnected';
+ }
+
+ if (_isFunction(content))
+ {
+ publishCallback = content;
+ content = publishProps = {};
+ }
+ else if (_isFunction(publishProps))
+ {
+ publishCallback = publishProps;
+ publishProps = {};
+ }
+
+ var bayeuxMessage = {
+ channel: channel,
+ data: content,
+ _callback: publishCallback
+ };
+ var message = this._mixin(false, {}, publishProps, bayeuxMessage);
+ _queueSend(message);
+ };
+
+ /**
+ * Returns a string representing the status of the bayeux communication with the Bayeux server.
+ */
+ this.getStatus = function()
+ {
+ return _status;
+ };
+
+ /**
+ * Returns whether this instance has been disconnected.
+ */
+ this.isDisconnected = _isDisconnected;
+
+ /**
+ * Sets the backoff period used to increase the backoff time when retrying an unsuccessful or failed message.
+ * Default value is 1 second, which means if there is a persistent failure the retries will happen
+ * after 1 second, then after 2 seconds, then after 3 seconds, etc. So for example with 15 seconds of
+ * elapsed time, there will be 5 retries (at 1, 3, 6, 10 and 15 seconds elapsed).
+ * @param period the backoff period to set
+ * @see #getBackoffIncrement()
+ */
+ this.setBackoffIncrement = function(period)
+ {
+ _config.backoffIncrement = period;
+ };
+
+ /**
+ * Returns the backoff period used to increase the backoff time when retrying an unsuccessful or failed message.
+ * @see #setBackoffIncrement(period)
+ */
+ this.getBackoffIncrement = function()
+ {
+ return _config.backoffIncrement;
+ };
+
+ /**
+ * Returns the backoff period to wait before retrying an unsuccessful or failed message.
+ */
+ this.getBackoffPeriod = function()
+ {
+ return _backoff;
+ };
+
+ /**
+ * Sets the log level for console logging.
+ * Valid values are the strings 'error', 'warn', 'info' and 'debug', from
+ * less verbose to more verbose.
+ * @param level the log level string
+ */
+ this.setLogLevel = function(level)
+ {
+ _config.logLevel = level;
+ };
+
+ /**
+ * Registers an extension whose callbacks are called for every incoming message
+ * (that comes from the server to this client implementation) and for every
+ * outgoing message (that originates from this client implementation for the
+ * server).
+ * The format of the extension object is the following:
+ * <pre>
+ * {
+ * incoming: function(message) { ... },
+ * outgoing: function(message) { ... }
+ * }
+ * </pre>
+ * Both properties are optional, but if they are present they will be called
+ * respectively for each incoming message and for each outgoing message.
+ * @param name the name of the extension
+ * @param extension the extension to register
+ * @return true if the extension was registered, false otherwise
+ * @see #unregisterExtension(name)
+ */
+ this.registerExtension = function(name, extension)
+ {
+ if (arguments.length < 2)
+ {
+ throw 'Illegal arguments number: required 2, got ' + arguments.length;
+ }
+ if (!_isString(name))
+ {
+ throw 'Illegal argument type: extension name must be a string';
+ }
+
+ var existing = false;
+ for (var i = 0; i < _extensions.length; ++i)
+ {
+ var existingExtension = _extensions[i];
+ if (existingExtension.name === name)
+ {
+ existing = true;
+ break;
+ }
+ }
+ if (!existing)
+ {
+ _extensions.push({
+ name: name,
+ extension: extension
+ });
+ this._debug('Registered extension', name);
+
+ // Callback for extensions
+ if (_isFunction(extension.registered))
+ {
+ extension.registered(name, this);
+ }
+
+ return true;
+ }
+ else
+ {
+ this._info('Could not register extension with name', name, 'since another extension with the same name already exists');
+ return false;
+ }
+ };
+
+ /**
+ * Unregister an extension previously registered with
+ * {@link #registerExtension(name, extension)}.
+ * @param name the name of the extension to unregister.
+ * @return true if the extension was unregistered, false otherwise
+ */
+ this.unregisterExtension = function(name)
+ {
+ if (!_isString(name))
+ {
+ throw 'Illegal argument type: extension name must be a string';
+ }
+
+ var unregistered = false;
+ for (var i = 0; i < _extensions.length; ++i)
+ {
+ var extension = _extensions[i];
+ if (extension.name === name)
+ {
+ _extensions.splice(i, 1);
+ unregistered = true;
+ this._debug('Unregistered extension', name);
+
+ // Callback for extensions
+ var ext = extension.extension;
+ if (_isFunction(ext.unregistered))
+ {
+ ext.unregistered();
+ }
+
+ break;
+ }
+ }
+ return unregistered;
+ };
+
+ /**
+ * Find the extension registered with the given name.
+ * @param name the name of the extension to find
+ * @return the extension found or null if no extension with the given name has been registered
+ */
+ this.getExtension = function(name)
+ {
+ for (var i = 0; i < _extensions.length; ++i)
+ {
+ var extension = _extensions[i];
+ if (extension.name === name)
+ {
+ return extension.extension;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Returns the name assigned to this Cometd object, or the string 'default'
+ * if no name has been explicitly passed as parameter to the constructor.
+ */
+ this.getName = function()
+ {
+ return _name;
+ };
+
+ /**
+ * Returns the clientId assigned by the Bayeux server during handshake.
+ */
+ this.getClientId = function()
+ {
+ return _clientId;
+ };
+
+ /**
+ * Returns the URL of the Bayeux server.
+ */
+ this.getURL = function()
+ {
+ return _config.url;
+ };
+
+ this.getTransport = function()
+ {
+ return _transport;
+ };
+
+ this.getConfiguration = function()
+ {
+ return this._mixin(true, {}, _config);
+ };
+
+ this.getAdvice = function()
+ {
+ return this._mixin(true, {}, _advice);
+ };
+
+ // WebSocket handling for Firefox, which deploys WebSocket
+ // under the name of MozWebSocket in Firefox 6, 7, 8 and 9
+ org.cometd.WebSocket = window.WebSocket;
+ if (!org.cometd.WebSocket)
+ {
+ org.cometd.WebSocket = window.MozWebSocket;
+ }
+};
+
+if (typeof define === 'function' && define.amd)
+{
+ define(function()
+ {
+ return org.cometd;
+ });
+}
+
diff --git a/common/src/main/webapp/thirdparty/cometd/cometd/AckExtension.js b/common/src/main/webapp/thirdparty/cometd/cometd/AckExtension.js
new file mode 100644
index 0000000..3b547a6
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/cometd/cometd/AckExtension.js
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+(function()
+{
+ function bind(org_cometd)
+ {
+ /**
+ * This client-side extension enables the client to acknowledge to the server
+ * the messages that the client has received.
+ * For the acknowledgement to work, the server must be configured with the
+ * correspondent server-side ack extension. If both client and server support
+ * the ack extension, then the ack functionality will take place automatically.
+ * By enabling this extension, all messages arriving from the server will arrive
+ * via the long poll, so the comet communication will be slightly chattier.
+ * The fact that all messages will return via long poll means also that the
+ * messages will arrive with total order, which is not guaranteed if messages
+ * can arrive via both long poll and normal response.
+ * Messages are not acknowledged one by one, but instead a group of messages is
+ * acknowledged when long poll returns.
+ */
+ return org_cometd.AckExtension = function()
+ {
+ var _cometd;
+ var _serverSupportsAcks = false;
+ var _ackId = -1;
+
+ function _debug(text, args)
+ {
+ _cometd._debug(text, args);
+ }
+
+ this.registered = function(name, cometd)
+ {
+ _cometd = cometd;
+ _debug('AckExtension: executing registration callback');
+ };
+
+ this.unregistered = function()
+ {
+ _debug('AckExtension: executing unregistration callback');
+ _cometd = null;
+ };
+
+ this.incoming = function(message)
+ {
+ var channel = message.channel;
+ if (channel == '/meta/handshake')
+ {
+ _serverSupportsAcks = message.ext && message.ext.ack;
+ _debug('AckExtension: server supports acks', _serverSupportsAcks);
+ }
+ else if (_serverSupportsAcks && channel == '/meta/connect' && message.successful)
+ {
+ var ext = message.ext;
+ if (ext && typeof ext.ack === 'number')
+ {
+ _ackId = ext.ack;
+ _debug('AckExtension: server sent ack id', _ackId);
+ }
+ }
+ return message;
+ };
+
+ this.outgoing = function(message)
+ {
+ var channel = message.channel;
+ if (channel == '/meta/handshake')
+ {
+ if (!message.ext)
+ {
+ message.ext = {};
+ }
+ message.ext.ack = _cometd && _cometd.ackEnabled !== false;
+ _ackId = -1;
+ }
+ else if (_serverSupportsAcks && channel == '/meta/connect')
+ {
+ if (!message.ext)
+ {
+ message.ext = {};
+ }
+ message.ext.ack = _ackId;
+ _debug('AckExtension: client sending ack id', _ackId);
+ }
+ return message;
+ };
+ };
+ }
+
+ if (typeof define === 'function' && define.amd)
+ {
+ define(['org/cometd'], bind);
+ }
+ else
+ {
+ bind(org.cometd);
+ }
+})();
diff --git a/common/src/main/webapp/thirdparty/cometd/cometd/ReloadExtension.js b/common/src/main/webapp/thirdparty/cometd/cometd/ReloadExtension.js
new file mode 100644
index 0000000..ef6de78
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/cometd/cometd/ReloadExtension.js
@@ -0,0 +1,234 @@
+/*
+ * Copyright (c) 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+(function()
+{
+ function bind(org_cometd)
+ {
+ if (!org_cometd.COOKIE)
+ {
+ org_cometd.COOKIE = {};
+ org_cometd.COOKIE.set = function(name, value, options)
+ {
+ throw 'Abstract';
+ };
+ org_cometd.COOKIE.get = function(name)
+ {
+ throw 'Abstract';
+ };
+ }
+
+ /**
+ * The reload extension allows a page to be loaded (or reloaded)
+ * without having to re-handshake in the new (or reloaded) page,
+ * therefore resuming the existing cometd connection.
+ *
+ * When the reload() method is called, the state of the cometd
+ * connection and of the cometd subscriptions is stored in a cookie
+ * with a short max-age.
+ * The reload() method must therefore be called by page unload
+ * handlers, often provided by JavaScript toolkits.
+ *
+ * When the page is (re)loaded, this extension checks the cookie
+ * and restores the cometd connection and the cometd subscriptions.
+ */
+ return org_cometd.ReloadExtension = function(configuration)
+ {
+ var _cometd;
+ var _debug;
+ var _state = null;
+ var _cookieName = 'org.cometd.reload';
+ var _cookiePath = '/';
+ var _cookieMaxAge = 5;
+ var _batch = false;
+
+ function _reload(config)
+ {
+ if (_state && _state.handshakeResponse !== null)
+ {
+ _configure(config);
+ _state.cookiePath = _cookiePath;
+ var cookie = org_cometd.JSON.toJSON(_state);
+ _debug('Reload extension saving cookie value', cookie);
+ org_cometd.COOKIE.set(_cookieName, cookie, {
+ 'max-age': _cookieMaxAge,
+ path: _cookiePath,
+ expires: new Date(new Date().getTime() + _cookieMaxAge * 1000)
+ });
+ }
+ }
+
+ function _similarState(oldState)
+ {
+ // We want to check here that the CometD object
+ // did not change much between reloads.
+ // We just check the URL for now, but in future
+ // further checks may involve the transport type
+ // and other configuration parameters.
+ return _state.url == oldState.url;
+ }
+
+ function _configure(config)
+ {
+ if (config)
+ {
+ if (typeof config.cookieMaxAge === 'number')
+ {
+ _cookieMaxAge = config.cookieMaxAge;
+ }
+ if (typeof config.cookieName === 'string')
+ {
+ _cookieName = config.cookieName;
+ }
+ if (typeof config.cookiePath === 'string')
+ {
+ _cookiePath = config.cookiePath;
+ }
+ }
+ }
+
+ this.configure = _configure;
+
+ this.registered = function(name, cometd)
+ {
+ _cometd = cometd;
+ _cometd.reload = _reload;
+ _debug = _cometd._debug;
+ };
+
+ this.unregistered = function()
+ {
+ delete _cometd.reload;
+ _cometd = null;
+ };
+
+ this.outgoing = function(message)
+ {
+ var channel = message.channel;
+
+ if (channel == '/meta/handshake')
+ {
+ _state = {};
+ _state.url = _cometd.getURL();
+
+ var cookie = org_cometd.COOKIE.get(_cookieName);
+ _debug('Reload extension found cookie value', cookie);
+ // Is there a saved handshake response from a prior load ?
+ if (cookie)
+ {
+ try
+ {
+ var oldState = org_cometd.JSON.fromJSON(cookie);
+
+ // Remove the cookie, not needed anymore
+ org_cometd.COOKIE.set(_cookieName, '', {
+ 'max-age': -1,
+ path: oldState.cookiePath,
+ expires: -1
+ });
+
+ if (oldState.handshakeResponse && _similarState(oldState))
+ {
+ _debug('Reload extension restoring state', oldState);
+ setTimeout(function()
+ {
+ _debug('Reload extension replaying handshake response', oldState.handshakeResponse);
+ _state.handshakeResponse = oldState.handshakeResponse;
+ _state.transportType = oldState.transportType;
+ _state.reloading = true;
+ var response = _cometd._mixin(true, {}, _state.handshakeResponse, {ext: {reload: true}});
+ response.supportedConnectionTypes = [_state.transportType];
+ _cometd.receive(response);
+ _debug('Reload extension replayed handshake response', response);
+ }, 0);
+
+ // delay any sends until first connect is complete.
+ if (!_batch)
+ {
+ _batch = true;
+ _cometd.startBatch();
+ }
+ // This handshake is aborted, as we will replay the prior handshake response
+ return null;
+ }
+ else
+ {
+ _debug('Reload extension could not restore state', oldState);
+ }
+ }
+ catch(x)
+ {
+ _debug('Reload extension error while trying to restore cookie', x);
+ }
+ }
+ }
+ else if (channel == '/meta/connect')
+ {
+ if (!_state.transportType)
+ {
+ _state.transportType = message.connectionType;
+ _debug('Reload extension tracked transport type', _state.transportType);
+ }
+ }
+ return message;
+ };
+
+ this.incoming = function(message)
+ {
+ if (message.successful)
+ {
+ switch (message.channel)
+ {
+ case '/meta/handshake':
+ // If the handshake response is already present, then we're replaying it.
+ // Since the replay may have modified the handshake response, do not record it here.
+ if (!_state.handshakeResponse)
+ {
+ // Save successful handshake response
+ _state.handshakeResponse = message;
+ _debug('Reload extension tracked handshake response', message);
+ }
+ break;
+ case '/meta/disconnect':
+ _state = null;
+ break;
+ case '/meta/connect':
+ if (_batch)
+ {
+ _cometd.endBatch();
+ _batch = false;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ return message;
+ };
+
+ _configure(configuration);
+ };
+ }
+
+ if (typeof define === 'function' && define.amd)
+ {
+ define(['org/cometd'], bind);
+ }
+ else
+ {
+ bind(org.cometd);
+ }
+})();
diff --git a/common/src/main/webapp/thirdparty/cometd/cometd/TimeStampExtension.js b/common/src/main/webapp/thirdparty/cometd/cometd/TimeStampExtension.js
new file mode 100644
index 0000000..8011a3a
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/cometd/cometd/TimeStampExtension.js
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+(function()
+{
+ function bind(org_cometd)
+ {
+ /**
+ * The timestamp extension adds the optional timestamp field to all outgoing messages.
+ */
+ return org_cometd.TimeStampExtension = function()
+ {
+ this.outgoing = function(message)
+ {
+ message.timestamp = new Date().toUTCString();
+ return message;
+ };
+ };
+ }
+
+ if (typeof define === 'function' && define.amd)
+ {
+ define(['org/cometd'], bind);
+ }
+ else
+ {
+ bind(org.cometd);
+ }
+}());
diff --git a/common/src/main/webapp/thirdparty/cometd/cometd/TimeSyncExtension.js b/common/src/main/webapp/thirdparty/cometd/cometd/TimeSyncExtension.js
new file mode 100644
index 0000000..5063298
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/cometd/cometd/TimeSyncExtension.js
@@ -0,0 +1,216 @@
+/*
+ * Copyright (c) 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+(function()
+{
+ function bind(org_cometd)
+ {
+ /**
+ * With each handshake or connect, the extension sends timestamps within the
+ * ext field like: <code>{ext:{timesync:{tc:12345567890,l:23,o:4567},...},...}</code>
+ * where:<ul>
+ * <li>tc is the client timestamp in ms since 1970 of when the message was sent.
+ * <li>l is the network lag that the client has calculated.
+ * <li>o is the clock offset that the client has calculated.
+ * </ul>
+ *
+ * <p>
+ * A cometd server that supports timesync, can respond with an ext
+ * field like: <code>{ext:{timesync:{tc:12345567890,ts:1234567900,p:123,a:3},...},...}</code>
+ * where:<ul>
+ * <li>tc is the client timestamp of when the message was sent,
+ * <li>ts is the server timestamp of when the message was received
+ * <li>p is the poll duration in ms - ie the time the server took before sending the response.
+ * <li>a is the measured accuracy of the calculated offset and lag sent by the client
+ * </ul>
+ *
+ * <p>
+ * The relationship between tc, ts & l is given by <code>ts=tc+o+l</code> (the
+ * time the server received the messsage is the client time plus the offset plus the
+ * network lag). Thus the accuracy of the o and l settings can be determined with
+ * <code>a=(tc+o+l)-ts</code>.
+ * </p>
+ * <p>
+ * When the client has received the response, it can make a more accurate estimate
+ * of the lag as <code>l2=(now-tc-p)/2</code> (assuming symmetric lag).
+ * A new offset can then be calculated with the relationship on the client
+ * that <code>ts=tc+o2+l2</code>, thus <code>o2=ts-tc-l2</code>.
+ * </p>
+ * <p>
+ * Since the client also receives the a value calculated on the server, it
+ * should be possible to analyse this and compensate for some asymmetry
+ * in the lag. But the current client does not do this.
+ * </p>
+ *
+ * @param configuration
+ */
+ return org_cometd.TimeSyncExtension = function(configuration)
+ {
+ var _cometd;
+ var _maxSamples = configuration && configuration.maxSamples || 10;
+ var _lags = [];
+ var _offsets = [];
+ var _lag = 0;
+ var _offset = 0;
+
+ function _debug(text, args)
+ {
+ _cometd._debug(text, args);
+ }
+
+ this.registered = function(name, cometd)
+ {
+ _cometd = cometd;
+ _debug('TimeSyncExtension: executing registration callback');
+ };
+
+ this.unregistered = function()
+ {
+ _debug('TimeSyncExtension: executing unregistration callback');
+ _cometd = null;
+ _lags = [];
+ _offsets = [];
+ };
+
+ this.incoming = function(message)
+ {
+ var channel = message.channel;
+ if (channel && channel.indexOf('/meta/') === 0)
+ {
+ if (message.ext && message.ext.timesync)
+ {
+ var timesync = message.ext.timesync;
+ _debug('TimeSyncExtension: server sent timesync', timesync);
+
+ var now = new Date().getTime();
+ var l2 = (now - timesync.tc - timesync.p) / 2;
+ var o2 = timesync.ts - timesync.tc - l2;
+
+ _lags.push(l2);
+ _offsets.push(o2);
+ if (_offsets.length > _maxSamples)
+ {
+ _offsets.shift();
+ _lags.shift();
+ }
+
+ var samples = _offsets.length;
+ var lagsSum = 0;
+ var offsetsSum = 0;
+ for (var i = 0; i < samples; ++i)
+ {
+ lagsSum += _lags[i];
+ offsetsSum += _offsets[i];
+ }
+ _lag = parseInt((lagsSum / samples).toFixed());
+ _offset = parseInt((offsetsSum / samples).toFixed());
+ _debug('TimeSyncExtension: network lag', _lag, 'ms, time offset with server', _offset, 'ms', _lag, _offset);
+ }
+ }
+ return message;
+ };
+
+ this.outgoing = function(message)
+ {
+ var channel = message.channel;
+ if (channel && channel.indexOf('/meta/') === 0)
+ {
+ if (!message.ext)
+ {
+ message.ext = {};
+ }
+ message.ext.timesync = {
+ tc: new Date().getTime(),
+ l: _lag,
+ o: _offset
+ };
+ _debug('TimeSyncExtension: client sending timesync', org_cometd.JSON.toJSON(message.ext.timesync));
+ }
+ return message;
+ };
+
+ /**
+ * Get the estimated offset in ms from the clients clock to the
+ * servers clock. The server time is the client time plus the offset.
+ */
+ this.getTimeOffset = function()
+ {
+ return _offset;
+ };
+
+ /**
+ * Get an array of multiple offset samples used to calculate
+ * the offset.
+ */
+ this.getTimeOffsetSamples = function()
+ {
+ return _offsets;
+ };
+
+ /**
+ * Get the estimated network lag in ms from the client to the server.
+ */
+ this.getNetworkLag = function()
+ {
+ return _lag;
+ };
+
+ /**
+ * Get the estimated server time in ms since the epoch.
+ */
+ this.getServerTime = function()
+ {
+ return new Date().getTime() + _offset;
+ };
+
+ /**
+ *
+ * Get the estimated server time as a Date object
+ */
+ this.getServerDate = function()
+ {
+ return new Date(this.getServerTime());
+ };
+
+ /**
+ * Set a timeout to expire at given time on the server.
+ * @param callback The function to call when the timer expires
+ * @param atServerTimeOrDate a js Time or Date object representing the
+ * server time at which the timeout should expire
+ */
+ this.setTimeout = function(callback, atServerTimeOrDate)
+ {
+ var ts = (atServerTimeOrDate instanceof Date) ? atServerTimeOrDate.getTime() : (0 + atServerTimeOrDate);
+ var tc = ts - _offset;
+ var interval = tc - new Date().getTime();
+ if (interval <= 0)
+ {
+ interval = 1;
+ }
+ return org_cometd.Utils.setTimeout(_cometd, callback, interval);
+ };
+ };
+ }
+
+ if (typeof define === 'function' && define.amd)
+ {
+ define(['org/cometd'], bind);
+ }
+ else
+ {
+ bind(org.cometd);
+ }
+})();
diff --git a/common/src/main/webapp/thirdparty/cometd/jquery/jquery.cometd-ack.js b/common/src/main/webapp/thirdparty/cometd/jquery/jquery.cometd-ack.js
new file mode 100644
index 0000000..5b6b153
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/cometd/jquery/jquery.cometd-ack.js
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+(function($)
+{
+ function bind(AckExtension, cometd)
+ {
+ var result = new AckExtension();
+ cometd.registerExtension('ack', result);
+ return result;
+ }
+
+ if (typeof define === 'function' && define.amd)
+ {
+ define(['org/cometd/AckExtension', 'jquery.cometd'], bind);
+ }
+ else
+ {
+ bind(org.cometd.AckExtension, $.cometd);
+ }
+})(jQuery);
diff --git a/common/src/main/webapp/thirdparty/cometd/jquery/jquery.cometd-reload.js b/common/src/main/webapp/thirdparty/cometd/jquery/jquery.cometd-reload.js
new file mode 100644
index 0000000..07982ee
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/cometd/jquery/jquery.cometd-reload.js
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+(function($)
+{
+ function bind(org_cometd, cookie, ReloadExtension, cometd)
+ {
+ // Remap cometd COOKIE functions to jquery cookie functions
+ // Avoid to set to undefined if the jquery cookie plugin is not present
+ if (cookie)
+ {
+ org_cometd.COOKIE.set = cookie;
+ org_cometd.COOKIE.get = cookie;
+ }
+
+ var result = new ReloadExtension();
+ cometd.registerExtension('reload', result);
+ return result;
+ }
+
+ if (typeof define === 'function' && define.amd)
+ {
+ define(['org/cometd', 'jquery.cookie', 'org/cometd/ReloadExtension', 'jquery.cometd'], bind);
+ }
+ else
+ {
+ bind(org.cometd, $.cookie, org.cometd.ReloadExtension, $.cometd);
+ }
+})(jQuery);
diff --git a/common/src/main/webapp/thirdparty/cometd/jquery/jquery.cometd-timestamp.js b/common/src/main/webapp/thirdparty/cometd/jquery/jquery.cometd-timestamp.js
new file mode 100644
index 0000000..3c5a51c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/cometd/jquery/jquery.cometd-timestamp.js
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+(function($)
+{
+ function bind(TimeStampExtension, cometd)
+ {
+ var result = new TimeStampExtension();
+ cometd.registerExtension('timestamp', result);
+ return result;
+ }
+
+ if (typeof define === 'function' && define.amd)
+ {
+ define(['org/cometd/TimeStampExtension', 'jquery.cometd'], bind);
+ }
+ else
+ {
+ bind(org.cometd.TimeStampExtension, $.cometd);
+ }
+})(jQuery);
diff --git a/common/src/main/webapp/thirdparty/cometd/jquery/jquery.cometd-timesync.js b/common/src/main/webapp/thirdparty/cometd/jquery/jquery.cometd-timesync.js
new file mode 100644
index 0000000..d7eb54c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/cometd/jquery/jquery.cometd-timesync.js
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+(function($)
+{
+ function bind(TimeSyncExtension, cometd)
+ {
+ var result = new TimeSyncExtension();
+ cometd.registerExtension('timesync', result);
+ return result;
+ }
+
+ if (typeof define === 'function' && define.amd)
+ {
+ define(['org/cometd/TimeSyncExtension', 'jquery.cometd'], bind);
+ }
+ else
+ {
+ bind(org.cometd.TimeSyncExtension, $.cometd);
+ }
+})(jQuery);
diff --git a/common/src/main/webapp/thirdparty/cometd/jquery/jquery.cometd.js b/common/src/main/webapp/thirdparty/cometd/jquery/jquery.cometd.js
new file mode 100644
index 0000000..39e8003
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/cometd/jquery/jquery.cometd.js
@@ -0,0 +1,139 @@
+/*
+ * Copyright (c) 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+(function($)
+{
+ function bind($, org_cometd)
+ {
+ // Remap cometd JSON functions to jquery JSON functions
+ org_cometd.JSON.toJSON = JSON.stringify;
+ org_cometd.JSON.fromJSON = JSON.parse;
+
+ function _setHeaders(xhr, headers)
+ {
+ if (headers)
+ {
+ for (var headerName in headers)
+ {
+ if (headerName.toLowerCase() === 'content-type')
+ {
+ continue;
+ }
+ xhr.setRequestHeader(headerName, headers[headerName]);
+ }
+ }
+ }
+
+ // Remap toolkit-specific transport calls
+ function LongPollingTransport()
+ {
+ var _super = new org_cometd.LongPollingTransport();
+ var that = org_cometd.Transport.derive(_super);
+
+ that.xhrSend = function(packet)
+ {
+ return $.ajax({
+ url: packet.url,
+ async: packet.sync !== true,
+ type: 'POST',
+ contentType: 'application/json;charset=UTF-8',
+ data: packet.body,
+ xhrFields: {
+ // Has no effect if the request is not cross domain
+ // but if it is, allows cookies to be sent to the server
+ withCredentials: true
+ },
+ beforeSend: function(xhr)
+ {
+ _setHeaders(xhr, packet.headers);
+ // Returning false will abort the XHR send
+ return true;
+ },
+ success: packet.onSuccess,
+ error: function(xhr, reason, exception)
+ {
+ packet.onError(reason, exception);
+ }
+ });
+ };
+
+ return that;
+ }
+
+ function CallbackPollingTransport()
+ {
+ var _super = new org_cometd.CallbackPollingTransport();
+ var that = org_cometd.Transport.derive(_super);
+
+ that.jsonpSend = function(packet)
+ {
+ $.ajax({
+ url: packet.url,
+ async: packet.sync !== true,
+ type: 'GET',
+ dataType: 'jsonp',
+ jsonp: 'jsonp',
+ data: {
+ // In callback-polling, the content must be sent via the 'message' parameter
+ message: packet.body
+ },
+ beforeSend: function(xhr)
+ {
+ _setHeaders(xhr, packet.headers);
+ // Returning false will abort the XHR send
+ return true;
+ },
+ success: packet.onSuccess,
+ error: function(xhr, reason, exception)
+ {
+ packet.onError(reason, exception);
+ }
+ });
+ };
+
+ return that;
+ }
+
+ $.Cometd = function(name)
+ {
+ var cometd = new org_cometd.Cometd(name);
+
+ // Registration order is important
+ if (org_cometd.WebSocket)
+ {
+ cometd.registerTransport('websocket', new org_cometd.WebSocketTransport());
+ }
+ cometd.registerTransport('long-polling', new LongPollingTransport());
+ cometd.registerTransport('callback-polling', new CallbackPollingTransport());
+
+ return cometd;
+ };
+
+ // The default cometd instance
+ $.cometd = new $.Cometd();
+
+ return $.cometd;
+ }
+
+ if (typeof define === 'function' && define.amd)
+ {
+ define(['jquery', 'org/cometd'], bind);
+ }
+ else
+ {
+ bind($, org.cometd);
+ }
+})(jQuery);
diff --git a/common/src/main/webapp/thirdparty/css/animate-custom.css b/common/src/main/webapp/thirdparty/css/animate-custom.css
new file mode 100644
index 0000000..3821288
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/animate-custom.css
@@ -0,0 +1,3945 @@
+/*
+Animate.css - http://daneden.me/animate
+LICENSED UNDER THE MIT LICENSE (MIT)
+
+Copyright (c) 2011 Dan Eden
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+.animated {
+ -webkit-animation-fill-mode: both;
+ -moz-animation-fill-mode: both;
+ -ms-animation-fill-mode: both;
+ -o-animation-fill-mode: both;
+ animation-fill-mode: both;
+ -webkit-animation-duration: 1s;
+ -moz-animation-duration: 1s;
+ -ms-animation-duration: 1s;
+ -o-animation-duration: 1s;
+ animation-duration: 1s;
+}
+
+.animated.hinge {
+ -webkit-animation-duration: 2s;
+ -moz-animation-duration: 2s;
+ -ms-animation-duration: 2s;
+ -o-animation-duration: 2s;
+ animation-duration: 2s;
+}
+
+@-webkit-keyframes flash {
+ 0%, 50%, 100% {opacity: 1;}
+ 25%, 75% {opacity: 0;}
+}
+
+@-moz-keyframes flash {
+ 0%, 50%, 100% {opacity: 1;}
+ 25%, 75% {opacity: 0;}
+}
+
+@-ms-keyframes flash {
+ 0%, 50%, 100% {opacity: 1;}
+ 25%, 75% {opacity: 0;}
+}
+
+@-o-keyframes flash {
+ 0%, 50%, 100% {opacity: 1;}
+ 25%, 75% {opacity: 0;}
+}
+
+@keyframes flash {
+ 0%, 50%, 100% {opacity: 1;}
+ 25%, 75% {opacity: 0;}
+}
+
+.flash {
+ -webkit-animation-name: flash;
+ -moz-animation-name: flash;
+ -ms-animation-name: flash;
+ -o-animation-name: flash;
+ animation-name: flash;
+}
+@-webkit-keyframes shake {
+ 0%, 100% {-webkit-transform: translateX(0);}
+ 10%, 30%, 50%, 70%, 90% {-webkit-transform: translateX(-10px);}
+ 20%, 40%, 60%, 80% {-webkit-transform: translateX(10px);}
+}
+
+@-moz-keyframes shake {
+ 0%, 100% {-moz-transform: translateX(0);}
+ 10%, 30%, 50%, 70%, 90% {-moz-transform: translateX(-10px);}
+ 20%, 40%, 60%, 80% {-moz-transform: translateX(10px);}
+}
+
+@-ms-keyframes shake {
+ 0%, 100% {-ms-transform: translateX(0);}
+ 10%, 30%, 50%, 70%, 90% {-ms-transform: translateX(-10px);}
+ 20%, 40%, 60%, 80% {-ms-transform: translateX(10px);}
+}
+
+@-o-keyframes shake {
+ 0%, 100% {-o-transform: translateX(0);}
+ 10%, 30%, 50%, 70%, 90% {-o-transform: translateX(-10px);}
+ 20%, 40%, 60%, 80% {-o-transform: translateX(10px);}
+}
+
+@keyframes shake {
+ 0%, 100% {transform: translateX(0);}
+ 10%, 30%, 50%, 70%, 90% {transform: translateX(-10px);}
+ 20%, 40%, 60%, 80% {transform: translateX(10px);}
+}
+
+.shake {
+ -webkit-animation-name: shake;
+ -moz-animation-name: shake;
+ -ms-animation-name: shake;
+ -o-animation-name: shake;
+ animation-name: shake;
+}
+@-webkit-keyframes bounce {
+ 0%, 20%, 50%, 80%, 100% {-webkit-transform: translateY(0);}
+ 40% {-webkit-transform: translateY(-30px);}
+ 60% {-webkit-transform: translateY(-15px);}
+}
+
+@-moz-keyframes bounce {
+ 0%, 20%, 50%, 80%, 100% {-moz-transform: translateY(0);}
+ 40% {-moz-transform: translateY(-30px);}
+ 60% {-moz-transform: translateY(-15px);}
+}
+
+@-ms-keyframes bounce {
+ 0%, 20%, 50%, 80%, 100% {-ms-transform: translateY(0);}
+ 40% {-ms-transform: translateY(-30px);}
+ 60% {-ms-transform: translateY(-15px);}
+}
+
+@-o-keyframes bounce {
+ 0%, 20%, 50%, 80%, 100% {-o-transform: translateY(0);}
+ 40% {-o-transform: translateY(-30px);}
+ 60% {-o-transform: translateY(-15px);}
+}
+@keyframes bounce {
+ 0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
+ 40% {transform: translateY(-30px);}
+ 60% {transform: translateY(-15px);}
+}
+
+.bounce {
+ -webkit-animation-name: bounce;
+ -moz-animation-name: bounce;
+ -ms-animation-name: bounce;
+ -o-animation-name: bounce;
+ animation-name: bounce;
+}
+@-webkit-keyframes tada {
+ 0% {-webkit-transform: scale(1);}
+ 10%, 20% {-webkit-transform: scale(0.9) rotate(-3deg);}
+ 30%, 50%, 70%, 90% {-webkit-transform: scale(1.1) rotate(3deg);}
+ 40%, 60%, 80% {-webkit-transform: scale(1.1) rotate(-3deg);}
+ 100% {-webkit-transform: scale(1) rotate(0);}
+}
+
+@-moz-keyframes tada {
+ 0% {-moz-transform: scale(1);}
+ 10%, 20% {-moz-transform: scale(0.9) rotate(-3deg);}
+ 30%, 50%, 70%, 90% {-moz-transform: scale(1.1) rotate(3deg);}
+ 40%, 60%, 80% {-moz-transform: scale(1.1) rotate(-3deg);}
+ 100% {-moz-transform: scale(1) rotate(0);}
+}
+
+@-ms-keyframes tada {
+ 0% {-ms-transform: scale(1);}
+ 10%, 20% {-ms-transform: scale(0.9) rotate(-3deg);}
+ 30%, 50%, 70%, 90% {-ms-transform: scale(1.1) rotate(3deg);}
+ 40%, 60%, 80% {-ms-transform: scale(1.1) rotate(-3deg);}
+ 100% {-ms-transform: scale(1) rotate(0);}
+}
+
+@-o-keyframes tada {
+ 0% {-o-transform: scale(1);}
+ 10%, 20% {-o-transform: scale(0.9) rotate(-3deg);}
+ 30%, 50%, 70%, 90% {-o-transform: scale(1.1) rotate(3deg);}
+ 40%, 60%, 80% {-o-transform: scale(1.1) rotate(-3deg);}
+ 100% {-o-transform: scale(1) rotate(0);}
+}
+
+@keyframes tada {
+ 0% {transform: scale(1);}
+ 10%, 20% {transform: scale(0.9) rotate(-3deg);}
+ 30%, 50%, 70%, 90% {transform: scale(1.1) rotate(3deg);}
+ 40%, 60%, 80% {transform: scale(1.1) rotate(-3deg);}
+ 100% {transform: scale(1) rotate(0);}
+}
+
+.tada {
+ -webkit-animation-name: tada;
+ -moz-animation-name: tada;
+ -ms-animation-name: tada;
+ -o-animation-name: tada;
+ animation-name: tada;
+}
+@-webkit-keyframes swing {
+ 20%, 40%, 60%, 80%, 100% { -webkit-transform-origin: top center; }
+ 20% { -webkit-transform: rotate(15deg); }
+ 40% { -webkit-transform: rotate(-10deg); }
+ 60% { -webkit-transform: rotate(5deg); }
+ 80% { -webkit-transform: rotate(-5deg); }
+ 100% { -webkit-transform: rotate(0deg); }
+}
+
+@-moz-keyframes swing {
+ 20% { -moz-transform: rotate(15deg); }
+ 40% { -moz-transform: rotate(-10deg); }
+ 60% { -moz-transform: rotate(5deg); }
+ 80% { -moz-transform: rotate(-5deg); }
+ 100% { -moz-transform: rotate(0deg); }
+}
+
+@-ms-keyframes swing {
+ 20% { -ms-transform: rotate(15deg); }
+ 40% { -ms-transform: rotate(-10deg); }
+ 60% { -ms-transform: rotate(5deg); }
+ 80% { -ms-transform: rotate(-5deg); }
+ 100% { -ms-transform: rotate(0deg); }
+}
+
+@-o-keyframes swing {
+ 20% { -o-transform: rotate(15deg); }
+ 40% { -o-transform: rotate(-10deg); }
+ 60% { -o-transform: rotate(5deg); }
+ 80% { -o-transform: rotate(-5deg); }
+ 100% { -o-transform: rotate(0deg); }
+}
+
+@keyframes swing {
+ 20% { transform: rotate(15deg); }
+ 40% { transform: rotate(-10deg); }
+ 60% { transform: rotate(5deg); }
+ 80% { transform: rotate(-5deg); }
+ 100% { transform: rotate(0deg); }
+}
+
+.swing {
+ -webkit-transform-origin: top center;
+ -moz-transform-origin: top center;
+ -ms-transform-origin: top center;
+ -o-transform-origin: top center;
+ transform-origin: top center;
+ -webkit-animation-name: swing;
+ -moz-animation-name: swing;
+ -ms-animation-name: swing;
+ -o-animation-name: swing;
+ animation-name: swing;
+}
+/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
+
+@-webkit-keyframes wobble {
+ 0% { -webkit-transform: translateX(0%); }
+ 15% { -webkit-transform: translateX(-25%) rotate(-5deg); }
+ 30% { -webkit-transform: translateX(20%) rotate(3deg); }
+ 45% { -webkit-transform: translateX(-15%) rotate(-3deg); }
+ 60% { -webkit-transform: translateX(10%) rotate(2deg); }
+ 75% { -webkit-transform: translateX(-5%) rotate(-1deg); }
+ 100% { -webkit-transform: translateX(0%); }
+}
+
+@-moz-keyframes wobble {
+ 0% { -moz-transform: translateX(0%); }
+ 15% { -moz-transform: translateX(-25%) rotate(-5deg); }
+ 30% { -moz-transform: translateX(20%) rotate(3deg); }
+ 45% { -moz-transform: translateX(-15%) rotate(-3deg); }
+ 60% { -moz-transform: translateX(10%) rotate(2deg); }
+ 75% { -moz-transform: translateX(-5%) rotate(-1deg); }
+ 100% { -moz-transform: translateX(0%); }
+}
+
+@-ms-keyframes wobble {
+ 0% { -ms-transform: translateX(0%); }
+ 15% { -ms-transform: translateX(-25%) rotate(-5deg); }
+ 30% { -ms-transform: translateX(20%) rotate(3deg); }
+ 45% { -ms-transform: translateX(-15%) rotate(-3deg); }
+ 60% { -ms-transform: translateX(10%) rotate(2deg); }
+ 75% { -ms-transform: translateX(-5%) rotate(-1deg); }
+ 100% { -ms-transform: translateX(0%); }
+}
+
+@-o-keyframes wobble {
+ 0% { -o-transform: translateX(0%); }
+ 15% { -o-transform: translateX(-25%) rotate(-5deg); }
+ 30% { -o-transform: translateX(20%) rotate(3deg); }
+ 45% { -o-transform: translateX(-15%) rotate(-3deg); }
+ 60% { -o-transform: translateX(10%) rotate(2deg); }
+ 75% { -o-transform: translateX(-5%) rotate(-1deg); }
+ 100% { -o-transform: translateX(0%); }
+}
+
+@keyframes wobble {
+ 0% { transform: translateX(0%); }
+ 15% { transform: translateX(-25%) rotate(-5deg); }
+ 30% { transform: translateX(20%) rotate(3deg); }
+ 45% { transform: translateX(-15%) rotate(-3deg); }
+ 60% { transform: translateX(10%) rotate(2deg); }
+ 75% { transform: translateX(-5%) rotate(-1deg); }
+ 100% { transform: translateX(0%); }
+}
+
+.wobble {
+ -webkit-animation-name: wobble;
+ -moz-animation-name: wobble;
+ -ms-animation-name: wobble;
+ -o-animation-name: wobble;
+ animation-name: wobble;
+}
+/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
+
+@-webkit-keyframes pulse {
+ 0% { -webkit-transform: scale(1); }
+ 50% { -webkit-transform: scale(1.1); }
+ 100% { -webkit-transform: scale(1); }
+}
+@-moz-keyframes pulse {
+ 0% { -moz-transform: scale(1); }
+ 50% { -moz-transform: scale(1.1); }
+ 100% { -moz-transform: scale(1); }
+}
+@-ms-keyframes pulse {
+ 0% { -ms-transform: scale(1); }
+ 50% { -ms-transform: scale(1.1); }
+ 100% { -ms-transform: scale(1); }
+}
+@-o-keyframes pulse {
+ 0% { -o-transform: scale(1); }
+ 50% { -o-transform: scale(1.1); }
+ 100% { -o-transform: scale(1); }
+}
+@keyframes pulse {
+ 0% { transform: scale(1); }
+ 50% { transform: scale(1.1); }
+ 100% { transform: scale(1); }
+}
+
+.pulse {
+ -webkit-animation-name: pulse;
+ -moz-animation-name: pulse;
+ -ms-animation-name: pulse;
+ -o-animation-name: pulse;
+ animation-name: pulse;
+}
+@-webkit-keyframes flip {
+ 0% {
+ -webkit-transform: perspective(400px) rotateY(0);
+ -webkit-animation-timing-function: ease-out;
+ }
+ 40% {
+ -webkit-transform: perspective(400px) translateZ(150px) rotateY(170deg);
+ -webkit-animation-timing-function: ease-out;
+ }
+ 50% {
+ -webkit-transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1);
+ -webkit-animation-timing-function: ease-in;
+ }
+ 80% {
+ -webkit-transform: perspective(400px) rotateY(360deg) scale(.95);
+ -webkit-animation-timing-function: ease-in;
+ }
+ 100% {
+ -webkit-transform: perspective(400px) scale(1);
+ -webkit-animation-timing-function: ease-in;
+ }
+}
+@-moz-keyframes flip {
+ 0% {
+ -moz-transform: perspective(400px) rotateY(0);
+ -moz-animation-timing-function: ease-out;
+ }
+ 40% {
+ -moz-transform: perspective(400px) translateZ(150px) rotateY(170deg);
+ -moz-animation-timing-function: ease-out;
+ }
+ 50% {
+ -moz-transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1);
+ -moz-animation-timing-function: ease-in;
+ }
+ 80% {
+ -moz-transform: perspective(400px) rotateY(360deg) scale(.95);
+ -moz-animation-timing-function: ease-in;
+ }
+ 100% {
+ -moz-transform: perspective(400px) scale(1);
+ -moz-animation-timing-function: ease-in;
+ }
+}
+@-ms-keyframes flip {
+ 0% {
+ -ms-transform: perspective(400px) rotateY(0);
+ -ms-animation-timing-function: ease-out;
+ }
+ 40% {
+ -ms-transform: perspective(400px) translateZ(150px) rotateY(170deg);
+ -ms-animation-timing-function: ease-out;
+ }
+ 50% {
+ -ms-transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1);
+ -ms-animation-timing-function: ease-in;
+ }
+ 80% {
+ -ms-transform: perspective(400px) rotateY(360deg) scale(.95);
+ -ms-animation-timing-function: ease-in;
+ }
+ 100% {
+ -ms-transform: perspective(400px) scale(1);
+ -ms-animation-timing-function: ease-in;
+ }
+}
+@-o-keyframes flip {
+ 0% {
+ -o-transform: perspective(400px) rotateY(0);
+ -o-animation-timing-function: ease-out;
+ }
+ 40% {
+ -o-transform: perspective(400px) translateZ(150px) rotateY(170deg);
+ -o-animation-timing-function: ease-out;
+ }
+ 50% {
+ -o-transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1);
+ -o-animation-timing-function: ease-in;
+ }
+ 80% {
+ -o-transform: perspective(400px) rotateY(360deg) scale(.95);
+ -o-animation-timing-function: ease-in;
+ }
+ 100% {
+ -o-transform: perspective(400px) scale(1);
+ -o-animation-timing-function: ease-in;
+ }
+}
+@keyframes flip {
+ 0% {
+ transform: perspective(400px) rotateY(0);
+ animation-timing-function: ease-out;
+ }
+ 40% {
+ transform: perspective(400px) translateZ(150px) rotateY(170deg);
+ animation-timing-function: ease-out;
+ }
+ 50% {
+ transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1);
+ animation-timing-function: ease-in;
+ }
+ 80% {
+ transform: perspective(400px) rotateY(360deg) scale(.95);
+ animation-timing-function: ease-in;
+ }
+ 100% {
+ transform: perspective(400px) scale(1);
+ animation-timing-function: ease-in;
+ }
+}
+
+.flip {
+ -webkit-backface-visibility: visible !important;
+ -webkit-animation-name: flip;
+ -moz-backface-visibility: visible !important;
+ -moz-animation-name: flip;
+ -ms-backface-visibility: visible !important;
+ -ms-animation-name: flip;
+ -o-backface-visibility: visible !important;
+ -o-animation-name: flip;
+ backface-visibility: visible !important;
+ animation-name: flip;
+}
+@-webkit-keyframes flipInX {
+ 0% {
+ -webkit-transform: perspective(400px) rotateX(90deg);
+ opacity: 0;
+ }
+
+ 40% {
+ -webkit-transform: perspective(400px) rotateX(-10deg);
+ }
+
+ 70% {
+ -webkit-transform: perspective(400px) rotateX(10deg);
+ }
+
+ 100% {
+ -webkit-transform: perspective(400px) rotateX(0deg);
+ opacity: 1;
+ }
+}
+@-moz-keyframes flipInX {
+ 0% {
+ -moz-transform: perspective(400px) rotateX(90deg);
+ opacity: 0;
+ }
+
+ 40% {
+ -moz-transform: perspective(400px) rotateX(-10deg);
+ }
+
+ 70% {
+ -moz-transform: perspective(400px) rotateX(10deg);
+ }
+
+ 100% {
+ -moz-transform: perspective(400px) rotateX(0deg);
+ opacity: 1;
+ }
+}
+@-ms-keyframes flipInX {
+ 0% {
+ -ms-transform: perspective(400px) rotateX(90deg);
+ opacity: 0;
+ }
+
+ 40% {
+ -ms-transform: perspective(400px) rotateX(-10deg);
+ }
+
+ 70% {
+ -ms-transform: perspective(400px) rotateX(10deg);
+ }
+
+ 100% {
+ -ms-transform: perspective(400px) rotateX(0deg);
+ opacity: 1;
+ }
+}
+@-o-keyframes flipInX {
+ 0% {
+ -o-transform: perspective(400px) rotateX(90deg);
+ opacity: 0;
+ }
+
+ 40% {
+ -o-transform: perspective(400px) rotateX(-10deg);
+ }
+
+ 70% {
+ -o-transform: perspective(400px) rotateX(10deg);
+ }
+
+ 100% {
+ -o-transform: perspective(400px) rotateX(0deg);
+ opacity: 1;
+ }
+}
+@keyframes flipInX {
+ 0% {
+ transform: perspective(400px) rotateX(90deg);
+ opacity: 0;
+ }
+
+ 40% {
+ transform: perspective(400px) rotateX(-10deg);
+ }
+
+ 70% {
+ transform: perspective(400px) rotateX(10deg);
+ }
+
+ 100% {
+ transform: perspective(400px) rotateX(0deg);
+ opacity: 1;
+ }
+}
+
+.flipInX {
+ -webkit-backface-visibility: visible !important;
+ -webkit-animation-name: flipInX;
+ -moz-backface-visibility: visible !important;
+ -moz-animation-name: flipInX;
+ -ms-backface-visibility: visible !important;
+ -ms-animation-name: flipInX;
+ -o-backface-visibility: visible !important;
+ -o-animation-name: flipInX;
+ backface-visibility: visible !important;
+ animation-name: flipInX;
+}
+@-webkit-keyframes flipOutX {
+ 0% {
+ -webkit-transform: perspective(400px) rotateX(0deg);
+ opacity: 1;
+ }
+ 100% {
+ -webkit-transform: perspective(400px) rotateX(90deg);
+ opacity: 0;
+ }
+}
+
+@-moz-keyframes flipOutX {
+ 0% {
+ -moz-transform: perspective(400px) rotateX(0deg);
+ opacity: 1;
+ }
+ 100% {
+ -moz-transform: perspective(400px) rotateX(90deg);
+ opacity: 0;
+ }
+}
+
+@-ms-keyframes flipOutX {
+ 0% {
+ -ms-transform: perspective(400px) rotateX(0deg);
+ opacity: 1;
+ }
+ 100% {
+ -ms-transform: perspective(400px) rotateX(90deg);
+ opacity: 0;
+ }
+}
+
+@-o-keyframes flipOutX {
+ 0% {
+ -o-transform: perspective(400px) rotateX(0deg);
+ opacity: 1;
+ }
+ 100% {
+ -o-transform: perspective(400px) rotateX(90deg);
+ opacity: 0;
+ }
+}
+
+@keyframes flipOutX {
+ 0% {
+ transform: perspective(400px) rotateX(0deg);
+ opacity: 1;
+ }
+ 100% {
+ transform: perspective(400px) rotateX(90deg);
+ opacity: 0;
+ }
+}
+
+.flipOutX {
+ -webkit-animation-name: flipOutX;
+ -webkit-backface-visibility: visible !important;
+ -moz-animation-name: flipOutX;
+ -moz-backface-visibility: visible !important;
+ -ms-animation-name: flipOutX;
+ -ms-backface-visibility: visible !important;
+ -o-animation-name: flipOutX;
+ -o-backface-visibility: visible !important;
+ animation-name: flipOutX;
+ backface-visibility: visible !important;
+}
+@-webkit-keyframes flipInY {
+ 0% {
+ -webkit-transform: perspective(400px) rotateY(90deg);
+ opacity: 0;
+ }
+
+ 40% {
+ -webkit-transform: perspective(400px) rotateY(-10deg);
+ }
+
+ 70% {
+ -webkit-transform: perspective(400px) rotateY(10deg);
+ }
+
+ 100% {
+ -webkit-transform: perspective(400px) rotateY(0deg);
+ opacity: 1;
+ }
+}
+@-moz-keyframes flipInY {
+ 0% {
+ -moz-transform: perspective(400px) rotateY(90deg);
+ opacity: 0;
+ }
+
+ 40% {
+ -moz-transform: perspective(400px) rotateY(-10deg);
+ }
+
+ 70% {
+ -moz-transform: perspective(400px) rotateY(10deg);
+ }
+
+ 100% {
+ -moz-transform: perspective(400px) rotateY(0deg);
+ opacity: 1;
+ }
+}
+@-ms-keyframes flipInY {
+ 0% {
+ -ms-transform: perspective(400px) rotateY(90deg);
+ opacity: 0;
+ }
+
+ 40% {
+ -ms-transform: perspective(400px) rotateY(-10deg);
+ }
+
+ 70% {
+ -ms-transform: perspective(400px) rotateY(10deg);
+ }
+
+ 100% {
+ -ms-transform: perspective(400px) rotateY(0deg);
+ opacity: 1;
+ }
+}
+@-o-keyframes flipInY {
+ 0% {
+ -o-transform: perspective(400px) rotateY(90deg);
+ opacity: 0;
+ }
+
+ 40% {
+ -o-transform: perspective(400px) rotateY(-10deg);
+ }
+
+ 70% {
+ -o-transform: perspective(400px) rotateY(10deg);
+ }
+
+ 100% {
+ -o-transform: perspective(400px) rotateY(0deg);
+ opacity: 1;
+ }
+}
+@keyframes flipInY {
+ 0% {
+ transform: perspective(400px) rotateY(90deg);
+ opacity: 0;
+ }
+
+ 40% {
+ transform: perspective(400px) rotateY(-10deg);
+ }
+
+ 70% {
+ transform: perspective(400px) rotateY(10deg);
+ }
+
+ 100% {
+ transform: perspective(400px) rotateY(0deg);
+ opacity: 1;
+ }
+}
+
+.flipInY {
+ -webkit-backface-visibility: visible !important;
+ -webkit-animation-name: flipInY;
+ -moz-backface-visibility: visible !important;
+ -moz-animation-name: flipInY;
+ -ms-backface-visibility: visible !important;
+ -ms-animation-name: flipInY;
+ -o-backface-visibility: visible !important;
+ -o-animation-name: flipInY;
+ backface-visibility: visible !important;
+ animation-name: flipInY;
+}
+@-webkit-keyframes flipOutY {
+ 0% {
+ -webkit-transform: perspective(400px) rotateY(0deg);
+ opacity: 1;
+ }
+ 100% {
+ -webkit-transform: perspective(400px) rotateY(90deg);
+ opacity: 0;
+ }
+}
+@-moz-keyframes flipOutY {
+ 0% {
+ -moz-transform: perspective(400px) rotateY(0deg);
+ opacity: 1;
+ }
+ 100% {
+ -moz-transform: perspective(400px) rotateY(90deg);
+ opacity: 0;
+ }
+}
+@-ms-keyframes flipOutY {
+ 0% {
+ -ms-transform: perspective(400px) rotateY(0deg);
+ opacity: 1;
+ }
+ 100% {
+ -ms-transform: perspective(400px) rotateY(90deg);
+ opacity: 0;
+ }
+}
+@-o-keyframes flipOutY {
+ 0% {
+ -o-transform: perspective(400px) rotateY(0deg);
+ opacity: 1;
+ }
+ 100% {
+ -o-transform: perspective(400px) rotateY(90deg);
+ opacity: 0;
+ }
+}
+@keyframes flipOutY {
+ 0% {
+ transform: perspective(400px) rotateY(0deg);
+ opacity: 1;
+ }
+ 100% {
+ transform: perspective(400px) rotateY(90deg);
+ opacity: 0;
+ }
+}
+
+.flipOutY {
+ -webkit-backface-visibility: visible !important;
+ -webkit-animation-name: flipOutY;
+ -moz-backface-visibility: visible !important;
+ -moz-animation-name: flipOutY;
+ -ms-backface-visibility: visible !important;
+ -ms-animation-name: flipOutY;
+ -o-backface-visibility: visible !important;
+ -o-animation-name: flipOutY;
+ backface-visibility: visible !important;
+ animation-name: flipOutY;
+}
+@-webkit-keyframes fadeIn {
+ 0% {opacity: 0;}
+ 100% {opacity: 1;}
+}
+
+@-moz-keyframes fadeIn {
+ 0% {opacity: 0;}
+ 100% {opacity: 1;}
+}
+
+@-ms-keyframes fadeIn {
+ 0% {opacity: 0;}
+ 100% {opacity: 1;}
+}
+
+@-o-keyframes fadeIn {
+ 0% {opacity: 0;}
+ 100% {opacity: 1;}
+}
+
+@keyframes fadeIn {
+ 0% {opacity: 0;}
+ 100% {opacity: 1;}
+}
+
+.fadeIn {
+ -webkit-animation-name: fadeIn;
+ -moz-animation-name: fadeIn;
+ -ms-animation-name: fadeIn;
+ -o-animation-name: fadeIn;
+ animation-name: fadeIn;
+}
+@-webkit-keyframes fadeInUp {
+ 0% {
+ opacity: 0;
+ -webkit-transform: translateY(20px);
+ }
+
+ 100% {
+ opacity: 1;
+ -webkit-transform: translateY(0);
+ }
+}
+
+@-moz-keyframes fadeInUp {
+ 0% {
+ opacity: 0;
+ -moz-transform: translateY(20px);
+ }
+
+ 100% {
+ opacity: 1;
+ -moz-transform: translateY(0);
+ }
+}
+
+@-ms-keyframes fadeInUp {
+ 0% {
+ opacity: 0;
+ -ms-transform: translateY(20px);
+ }
+
+ 100% {
+ opacity: 1;
+ -ms-transform: translateY(0);
+ }
+}
+
+@-o-keyframes fadeInUp {
+ 0% {
+ opacity: 0;
+ -o-transform: translateY(20px);
+ }
+
+ 100% {
+ opacity: 1;
+ -o-transform: translateY(0);
+ }
+}
+
+@keyframes fadeInUp {
+ 0% {
+ opacity: 0;
+ transform: translateY(20px);
+ }
+
+ 100% {
+ opacity: 1;
+ transform: translateY(0);
+ }
+}
+
+.fadeInUp {
+ -webkit-animation-name: fadeInUp;
+ -moz-animation-name: fadeInUp;
+ -ms-animation-name: fadeInUp;
+ -o-animation-name: fadeInUp;
+ animation-name: fadeInUp;
+}
+@-webkit-keyframes fadeInDown {
+ 0% {
+ opacity: 0;
+ -webkit-transform: translateY(-20px);
+ }
+
+ 100% {
+ opacity: 1;
+ -webkit-transform: translateY(0);
+ }
+}
+
+@-moz-keyframes fadeInDown {
+ 0% {
+ opacity: 0;
+ -moz-transform: translateY(-20px);
+ }
+
+ 100% {
+ opacity: 1;
+ -moz-transform: translateY(0);
+ }
+}
+
+@-ms-keyframes fadeInDown {
+ 0% {
+ opacity: 0;
+ -ms-transform: translateY(-20px);
+ }
+
+ 100% {
+ opacity: 1;
+ -ms-transform: translateY(0);
+ }
+}
+
+@-o-keyframes fadeInDown {
+ 0% {
+ opacity: 0;
+ -ms-transform: translateY(-20px);
+ }
+
+ 100% {
+ opacity: 1;
+ -ms-transform: translateY(0);
+ }
+}
+
+@keyframes fadeInDown {
+ 0% {
+ opacity: 0;
+ transform: translateY(-20px);
+ }
+
+ 100% {
+ opacity: 1;
+ transform: translateY(0);
+ }
+}
+
+.fadeInDown {
+ -webkit-animation-name: fadeInDown;
+ -moz-animation-name: fadeInDown;
+ -ms-animation-name: fadeInDown;
+ -o-animation-name: fadeInDown;
+ animation-name: fadeInDown;
+}
+@-webkit-keyframes fadeInLeft {
+ 0% {
+ opacity: 0;
+ -webkit-transform: translateX(-20px);
+ }
+
+ 100% {
+ opacity: 1;
+ -webkit-transform: translateX(0);
+ }
+}
+
+@-moz-keyframes fadeInLeft {
+ 0% {
+ opacity: 0;
+ -moz-transform: translateX(-20px);
+ }
+
+ 100% {
+ opacity: 1;
+ -moz-transform: translateX(0);
+ }
+}
+
+@-ms-keyframes fadeInLeft {
+ 0% {
+ opacity: 0;
+ -ms-transform: translateX(-20px);
+ }
+
+ 100% {
+ opacity: 1;
+ -ms-transform: translateX(0);
+ }
+}
+
+@-o-keyframes fadeInLeft {
+ 0% {
+ opacity: 0;
+ -o-transform: translateX(-20px);
+ }
+
+ 100% {
+ opacity: 1;
+ -o-transform: translateX(0);
+ }
+}
+
+@keyframes fadeInLeft {
+ 0% {
+ opacity: 0;
+ transform: translateX(-20px);
+ }
+
+ 100% {
+ opacity: 1;
+ transform: translateX(0);
+ }
+}
+
+.fadeInLeft {
+ -webkit-animation-name: fadeInLeft;
+ -moz-animation-name: fadeInLeft;
+ -ms-animation-name: fadeInLeft;
+ -o-animation-name: fadeInLeft;
+ animation-name: fadeInLeft;
+}
+@-webkit-keyframes fadeInRight {
+ 0% {
+ opacity: 0;
+ -webkit-transform: translateX(20px);
+ }
+
+ 100% {
+ opacity: 1;
+ -webkit-transform: translateX(0);
+ }
+}
+
+@-moz-keyframes fadeInRight {
+ 0% {
+ opacity: 0;
+ -moz-transform: translateX(20px);
+ }
+
+ 100% {
+ opacity: 1;
+ -moz-transform: translateX(0);
+ }
+}
+
+@-ms-keyframes fadeInRight {
+ 0% {
+ opacity: 0;
+ -ms-transform: translateX(20px);
+ }
+
+ 100% {
+ opacity: 1;
+ -ms-transform: translateX(0);
+ }
+}
+
+@-o-keyframes fadeInRight {
+ 0% {
+ opacity: 0;
+ -o-transform: translateX(20px);
+ }
+
+ 100% {
+ opacity: 1;
+ -o-transform: translateX(0);
+ }
+}
+
+@keyframes fadeInRight {
+ 0% {
+ opacity: 0;
+ transform: translateX(20px);
+ }
+
+ 100% {
+ opacity: 1;
+ transform: translateX(0);
+ }
+}
+
+.fadeInRight {
+ -webkit-animation-name: fadeInRight;
+ -moz-animation-name: fadeInRight;
+ -ms-animation-name: fadeInRight;
+ -o-animation-name: fadeInRight;
+ animation-name: fadeInRight;
+}
+@-webkit-keyframes fadeInUpBig {
+ 0% {
+ opacity: 0;
+ -webkit-transform: translateY(2000px);
+ }
+
+ 100% {
+ opacity: 1;
+ -webkit-transform: translateY(0);
+ }
+}
+
+@-moz-keyframes fadeInUpBig {
+ 0% {
+ opacity: 0;
+ -moz-transform: translateY(2000px);
+ }
+
+ 100% {
+ opacity: 1;
+ -moz-transform: translateY(0);
+ }
+}
+
+@-ms-keyframes fadeInUpBig {
+ 0% {
+ opacity: 0;
+ -ms-transform: translateY(2000px);
+ }
+
+ 100% {
+ opacity: 1;
+ -ms-transform: translateY(0);
+ }
+}
+
+@-o-keyframes fadeInUpBig {
+ 0% {
+ opacity: 0;
+ -o-transform: translateY(2000px);
+ }
+
+ 100% {
+ opacity: 1;
+ -o-transform: translateY(0);
+ }
+}
+
+@keyframes fadeInUpBig {
+ 0% {
+ opacity: 0;
+ transform: translateY(2000px);
+ }
+
+ 100% {
+ opacity: 1;
+ transform: translateY(0);
+ }
+}
+
+.fadeInUpBig {
+ -webkit-animation-name: fadeInUpBig;
+ -moz-animation-name: fadeInUpBig;
+ -ms-animation-name: fadeInUpBig;
+ -o-animation-name: fadeInUpBig;
+ animation-name: fadeInUpBig;
+}
+@-webkit-keyframes fadeInDownBig {
+ 0% {
+ opacity: 0;
+ -webkit-transform: translateY(-2000px);
+ }
+
+ 100% {
+ opacity: 1;
+ -webkit-transform: translateY(0);
+ }
+}
+
+@-moz-keyframes fadeInDownBig {
+ 0% {
+ opacity: 0;
+ -moz-transform: translateY(-2000px);
+ }
+
+ 100% {
+ opacity: 1;
+ -moz-transform: translateY(0);
+ }
+}
+
+@-ms-keyframes fadeInDownBig {
+ 0% {
+ opacity: 0;
+ -ms-transform: translateY(-2000px);
+ }
+
+ 100% {
+ opacity: 1;
+ -ms-transform: translateY(0);
+ }
+}
+
+@-o-keyframes fadeInDownBig {
+ 0% {
+ opacity: 0;
+ -o-transform: translateY(-2000px);
+ }
+
+ 100% {
+ opacity: 1;
+ -o-transform: translateY(0);
+ }
+}
+
+@keyframes fadeInDownBig {
+ 0% {
+ opacity: 0;
+ transform: translateY(-2000px);
+ }
+
+ 100% {
+ opacity: 1;
+ transform: translateY(0);
+ }
+}
+
+.fadeInDownBig {
+ -webkit-animation-name: fadeInDownBig;
+ -moz-animation-name: fadeInDownBig;
+ -ms-animation-name: fadeInDownBig;
+ -o-animation-name: fadeInDownBig;
+ animation-name: fadeInDownBig;
+}
+@-webkit-keyframes fadeInLeftBig {
+ 0% {
+ opacity: 0;
+ -webkit-transform: translateX(-2000px);
+ }
+
+ 100% {
+ opacity: 1;
+ -webkit-transform: translateX(0);
+ }
+}
+@-moz-keyframes fadeInLeftBig {
+ 0% {
+ opacity: 0;
+ -moz-transform: translateX(-2000px);
+ }
+
+ 100% {
+ opacity: 1;
+ -moz-transform: translateX(0);
+ }
+}
+@-ms-keyframes fadeInLeftBig {
+ 0% {
+ opacity: 0;
+ -ms-transform: translateX(-2000px);
+ }
+
+ 100% {
+ opacity: 1;
+ -ms-transform: translateX(0);
+ }
+}
+@-o-keyframes fadeInLeftBig {
+ 0% {
+ opacity: 0;
+ -o-transform: translateX(-2000px);
+ }
+
+ 100% {
+ opacity: 1;
+ -o-transform: translateX(0);
+ }
+}
+@keyframes fadeInLeftBig {
+ 0% {
+ opacity: 0;
+ transform: translateX(-2000px);
+ }
+
+ 100% {
+ opacity: 1;
+ transform: translateX(0);
+ }
+}
+
+.fadeInLeftBig {
+ -webkit-animation-name: fadeInLeftBig;
+ -moz-animation-name: fadeInLeftBig;
+ -ms-animation-name: fadeInLeftBig;
+ -o-animation-name: fadeInLeftBig;
+ animation-name: fadeInLeftBig;
+}
+@-webkit-keyframes fadeInRightBig {
+ 0% {
+ opacity: 0;
+ -webkit-transform: translateX(2000px);
+ }
+
+ 100% {
+ opacity: 1;
+ -webkit-transform: translateX(0);
+ }
+}
+
+@-moz-keyframes fadeInRightBig {
+ 0% {
+ opacity: 0;
+ -moz-transform: translateX(2000px);
+ }
+
+ 100% {
+ opacity: 1;
+ -moz-transform: translateX(0);
+ }
+}
+
+@-ms-keyframes fadeInRightBig {
+ 0% {
+ opacity: 0;
+ -ms-transform: translateX(2000px);
+ }
+
+ 100% {
+ opacity: 1;
+ -ms-transform: translateX(0);
+ }
+}
+
+@-o-keyframes fadeInRightBig {
+ 0% {
+ opacity: 0;
+ -o-transform: translateX(2000px);
+ }
+
+ 100% {
+ opacity: 1;
+ -o-transform: translateX(0);
+ }
+}
+
+@keyframes fadeInRightBig {
+ 0% {
+ opacity: 0;
+ transform: translateX(2000px);
+ }
+
+ 100% {
+ opacity: 1;
+ transform: translateX(0);
+ }
+}
+
+.fadeInRightBig {
+ -webkit-animation-name: fadeInRightBig;
+ -moz-animation-name: fadeInRightBig;
+ -ms-animation-name: fadeInRightBig;
+ -o-animation-name: fadeInRightBig;
+ animation-name: fadeInRightBig;
+}
+@-webkit-keyframes fadeOut {
+ 0% {opacity: 1;}
+ 100% {opacity: 0;}
+}
+
+@-moz-keyframes fadeOut {
+ 0% {opacity: 1;}
+ 100% {opacity: 0;}
+}
+
+@-ms-keyframes fadeOut {
+ 0% {opacity: 1;}
+ 100% {opacity: 0;}
+}
+
+@-o-keyframes fadeOut {
+ 0% {opacity: 1;}
+ 100% {opacity: 0;}
+}
+
+@keyframes fadeOut {
+ 0% {opacity: 1;}
+ 100% {opacity: 0;}
+}
+
+.fadeOut {
+ -webkit-animation-name: fadeOut;
+ -moz-animation-name: fadeOut;
+ -ms-animation-name: fadeOut;
+ -o-animation-name: fadeOut;
+ animation-name: fadeOut;
+}
+@-webkit-keyframes fadeOutUp {
+ 0% {
+ opacity: 1;
+ -webkit-transform: translateY(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -webkit-transform: translateY(-20px);
+ }
+}
+@-moz-keyframes fadeOutUp {
+ 0% {
+ opacity: 1;
+ -moz-transform: translateY(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -moz-transform: translateY(-20px);
+ }
+}
+@-ms-keyframes fadeOutUp {
+ 0% {
+ opacity: 1;
+ -ms-transform: translateY(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -ms-transform: translateY(-20px);
+ }
+}
+@-o-keyframes fadeOutUp {
+ 0% {
+ opacity: 1;
+ -o-transform: translateY(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -o-transform: translateY(-20px);
+ }
+}
+@keyframes fadeOutUp {
+ 0% {
+ opacity: 1;
+ transform: translateY(0);
+ }
+
+ 100% {
+ opacity: 0;
+ transform: translateY(-20px);
+ }
+}
+
+.fadeOutUp {
+ -webkit-animation-name: fadeOutUp;
+ -moz-animation-name: fadeOutUp;
+ -ms-animation-name: fadeOutUp;
+ -o-animation-name: fadeOutUp;
+ animation-name: fadeOutUp;
+}
+@-webkit-keyframes fadeOutDown {
+ 0% {
+ opacity: 1;
+ -webkit-transform: translateY(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -webkit-transform: translateY(20px);
+ }
+}
+
+@-moz-keyframes fadeOutDown {
+ 0% {
+ opacity: 1;
+ -moz-transform: translateY(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -moz-transform: translateY(20px);
+ }
+}
+
+@-ms-keyframes fadeOutDown {
+ 0% {
+ opacity: 1;
+ -ms-transform: translateY(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -ms-transform: translateY(20px);
+ }
+}
+
+@-o-keyframes fadeOutDown {
+ 0% {
+ opacity: 1;
+ -o-transform: translateY(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -o-transform: translateY(20px);
+ }
+}
+
+@keyframes fadeOutDown {
+ 0% {
+ opacity: 1;
+ transform: translateY(0);
+ }
+
+ 100% {
+ opacity: 0;
+ transform: translateY(20px);
+ }
+}
+
+.fadeOutDown {
+ -webkit-animation-name: fadeOutDown;
+ -moz-animation-name: fadeOutDown;
+ -ms-animation-name: fadeOutDown;
+ -o-animation-name: fadeOutDown;
+ animation-name: fadeOutDown;
+}
+@-webkit-keyframes fadeOutLeft {
+ 0% {
+ opacity: 1;
+ -webkit-transform: translateX(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -webkit-transform: translateX(-20px);
+ }
+}
+
+@-moz-keyframes fadeOutLeft {
+ 0% {
+ opacity: 1;
+ -moz-transform: translateX(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -moz-transform: translateX(-20px);
+ }
+}
+
+@-ms-keyframes fadeOutLeft {
+ 0% {
+ opacity: 1;
+ -ms-transform: translateX(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -ms-transform: translateX(-20px);
+ }
+}
+
+@-o-keyframes fadeOutLeft {
+ 0% {
+ opacity: 1;
+ -o-transform: translateX(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -o-transform: translateX(-20px);
+ }
+}
+
+@keyframes fadeOutLeft {
+ 0% {
+ opacity: 1;
+ transform: translateX(0);
+ }
+
+ 100% {
+ opacity: 0;
+ transform: translateX(-20px);
+ }
+}
+
+.fadeOutLeft {
+ -webkit-animation-name: fadeOutLeft;
+ -moz-animation-name: fadeOutLeft;
+ -ms-animation-name: fadeOutLeft;
+ -o-animation-name: fadeOutLeft;
+ animation-name: fadeOutLeft;
+}
+@-webkit-keyframes fadeOutRight {
+ 0% {
+ opacity: 1;
+ -webkit-transform: translateX(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -webkit-transform: translateX(20px);
+ }
+}
+
+@-moz-keyframes fadeOutRight {
+ 0% {
+ opacity: 1;
+ -moz-transform: translateX(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -moz-transform: translateX(20px);
+ }
+}
+
+@-ms-keyframes fadeOutRight {
+ 0% {
+ opacity: 1;
+ -ms-transform: translateX(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -ms-transform: translateX(20px);
+ }
+}
+
+@-o-keyframes fadeOutRight {
+ 0% {
+ opacity: 1;
+ -o-transform: translateX(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -o-transform: translateX(20px);
+ }
+}
+
+@keyframes fadeOutRight {
+ 0% {
+ opacity: 1;
+ transform: translateX(0);
+ }
+
+ 100% {
+ opacity: 0;
+ transform: translateX(20px);
+ }
+}
+
+.fadeOutRight {
+ -webkit-animation-name: fadeOutRight;
+ -moz-animation-name: fadeOutRight;
+ -ms-animation-name: fadeOutRight;
+ -o-animation-name: fadeOutRight;
+ animation-name: fadeOutRight;
+}
+@-webkit-keyframes fadeOutUpBig {
+ 0% {
+ opacity: 1;
+ -webkit-transform: translateY(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -webkit-transform: translateY(-2000px);
+ }
+}
+
+@-moz-keyframes fadeOutUpBig {
+ 0% {
+ opacity: 1;
+ -moz-transform: translateY(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -moz-transform: translateY(-2000px);
+ }
+}
+
+@-ms-keyframes fadeOutUpBig {
+ 0% {
+ opacity: 1;
+ -ms-transform: translateY(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -ms-transform: translateY(-2000px);
+ }
+}
+
+@-o-keyframes fadeOutUpBig {
+ 0% {
+ opacity: 1;
+ -o-transform: translateY(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -o-transform: translateY(-2000px);
+ }
+}
+
+@keyframes fadeOutUpBig {
+ 0% {
+ opacity: 1;
+ transform: translateY(0);
+ }
+
+ 100% {
+ opacity: 0;
+ transform: translateY(-2000px);
+ }
+}
+
+.fadeOutUpBig {
+ -webkit-animation-name: fadeOutUpBig;
+ -moz-animation-name: fadeOutUpBig;
+ -ms-animation-name: fadeOutUpBig;
+ -o-animation-name: fadeOutUpBig;
+ animation-name: fadeOutUpBig;
+}
+@-webkit-keyframes fadeOutDownBig {
+ 0% {
+ opacity: 1;
+ -webkit-transform: translateY(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -webkit-transform: translateY(2000px);
+ }
+}
+
+@-moz-keyframes fadeOutDownBig {
+ 0% {
+ opacity: 1;
+ -moz-transform: translateY(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -moz-transform: translateY(2000px);
+ }
+}
+
+@-ms-keyframes fadeOutDownBig {
+ 0% {
+ opacity: 1;
+ -ms-transform: translateY(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -ms-transform: translateY(2000px);
+ }
+}
+
+@-o-keyframes fadeOutDownBig {
+ 0% {
+ opacity: 1;
+ -o-transform: translateY(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -o-transform: translateY(2000px);
+ }
+}
+
+@keyframes fadeOutDownBig {
+ 0% {
+ opacity: 1;
+ transform: translateY(0);
+ }
+
+ 100% {
+ opacity: 0;
+ transform: translateY(2000px);
+ }
+}
+
+.fadeOutDownBig {
+ -webkit-animation-name: fadeOutDownBig;
+ -moz-animation-name: fadeOutDownBig;
+ -ms-animation-name: fadeOutDownBig;
+ -o-animation-name: fadeOutDownBig;
+ animation-name: fadeOutDownBig;
+}
+@-webkit-keyframes fadeOutLeftBig {
+ 0% {
+ opacity: 1;
+ -webkit-transform: translateX(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -webkit-transform: translateX(-2000px);
+ }
+}
+
+@-moz-keyframes fadeOutLeftBig {
+ 0% {
+ opacity: 1;
+ -moz-transform: translateX(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -moz-transform: translateX(-2000px);
+ }
+}
+
+@-ms-keyframes fadeOutLeftBig {
+ 0% {
+ opacity: 1;
+ -ms-transform: translateX(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -ms-transform: translateX(-2000px);
+ }
+}
+
+@-o-keyframes fadeOutLeftBig {
+ 0% {
+ opacity: 1;
+ -o-transform: translateX(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -o-transform: translateX(-2000px);
+ }
+}
+
+@keyframes fadeOutLeftBig {
+ 0% {
+ opacity: 1;
+ transform: translateX(0);
+ }
+
+ 100% {
+ opacity: 0;
+ transform: translateX(-2000px);
+ }
+}
+
+.fadeOutLeftBig {
+ -webkit-animation-name: fadeOutLeftBig;
+ -moz-animation-name: fadeOutLeftBig;
+ -ms-animation-name: fadeOutLeftBig;
+ -o-animation-name: fadeOutLeftBig;
+ animation-name: fadeOutLeftBig;
+}
+@-webkit-keyframes fadeOutRightBig {
+ 0% {
+ opacity: 1;
+ -webkit-transform: translateX(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -webkit-transform: translateX(2000px);
+ }
+}
+@-moz-keyframes fadeOutRightBig {
+ 0% {
+ opacity: 1;
+ -moz-transform: translateX(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -moz-transform: translateX(2000px);
+ }
+}
+@-ms-keyframes fadeOutRightBig {
+ 0% {
+ opacity: 1;
+ -ms-transform: translateX(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -ms-transform: translateX(2000px);
+ }
+}
+@-o-keyframes fadeOutRightBig {
+ 0% {
+ opacity: 1;
+ -o-transform: translateX(0);
+ }
+
+ 100% {
+ opacity: 0;
+ -o-transform: translateX(2000px);
+ }
+}
+@keyframes fadeOutRightBig {
+ 0% {
+ opacity: 1;
+ transform: translateX(0);
+ }
+
+ 100% {
+ opacity: 0;
+ transform: translateX(2000px);
+ }
+}
+
+.fadeOutRightBig {
+ -webkit-animation-name: fadeOutRightBig;
+ -moz-animation-name: fadeOutRightBig;
+ -ms-animation-name: fadeOutRightBig;
+ -o-animation-name: fadeOutRightBig;
+ animation-name: fadeOutRightBig;
+}
+@-webkit-keyframes bounceIn {
+ 0% {
+ opacity: 0;
+ -webkit-transform: scale(.3);
+ }
+
+ 50% {
+ opacity: 1;
+ -webkit-transform: scale(1.05);
+ }
+
+ 70% {
+ -webkit-transform: scale(.9);
+ }
+
+ 100% {
+ -webkit-transform: scale(1);
+ }
+}
+
+@-moz-keyframes bounceIn {
+ 0% {
+ opacity: 0;
+ -moz-transform: scale(.3);
+ }
+
+ 50% {
+ opacity: 1;
+ -moz-transform: scale(1.05);
+ }
+
+ 70% {
+ -moz-transform: scale(.9);
+ }
+
+ 100% {
+ -moz-transform: scale(1);
+ }
+}
+
+@-ms-keyframes bounceIn {
+ 0% {
+ opacity: 0;
+ -ms-transform: scale(.3);
+ }
+
+ 50% {
+ opacity: 1;
+ -ms-transform: scale(1.05);
+ }
+
+ 70% {
+ -ms-transform: scale(.9);
+ }
+
+ 100% {
+ -ms-transform: scale(1);
+ }
+}
+
+@-o-keyframes bounceIn {
+ 0% {
+ opacity: 0;
+ -o-transform: scale(.3);
+ }
+
+ 50% {
+ opacity: 1;
+ -o-transform: scale(1.05);
+ }
+
+ 70% {
+ -o-transform: scale(.9);
+ }
+
+ 100% {
+ -o-transform: scale(1);
+ }
+}
+
+@keyframes bounceIn {
+ 0% {
+ opacity: 0;
+ transform: scale(.3);
+ }
+
+ 50% {
+ opacity: 1;
+ transform: scale(1.05);
+ }
+
+ 70% {
+ transform: scale(.9);
+ }
+
+ 100% {
+ transform: scale(1);
+ }
+}
+
+.bounceIn {
+ -webkit-animation-name: bounceIn;
+ -moz-animation-name: bounceIn;
+ -ms-animation-name: bounceIn;
+ -o-animation-name: bounceIn;
+ animation-name: bounceIn;
+}
+@-webkit-keyframes bounceInUp {
+ 0% {
+ opacity: 0;
+ -webkit-transform: translateY(2000px);
+ }
+
+ 60% {
+ opacity: 1;
+ -webkit-transform: translateY(-30px);
+ }
+
+ 80% {
+ -webkit-transform: translateY(10px);
+ }
+
+ 100% {
+ -webkit-transform: translateY(0);
+ }
+}
+@-moz-keyframes bounceInUp {
+ 0% {
+ opacity: 0;
+ -moz-transform: translateY(2000px);
+ }
+
+ 60% {
+ opacity: 1;
+ -moz-transform: translateY(-30px);
+ }
+
+ 80% {
+ -moz-transform: translateY(10px);
+ }
+
+ 100% {
+ -moz-transform: translateY(0);
+ }
+}
+@-ms-keyframes bounceInUp {
+ 0% {
+ opacity: 0;
+ -ms-transform: translateY(2000px);
+ }
+
+ 60% {
+ opacity: 1;
+ -ms-transform: translateY(-30px);
+ }
+
+ 80% {
+ -ms-transform: translateY(10px);
+ }
+
+ 100% {
+ -ms-transform: translateY(0);
+ }
+}
+
+@-o-keyframes bounceInUp {
+ 0% {
+ opacity: 0;
+ -o-transform: translateY(2000px);
+ }
+
+ 60% {
+ opacity: 1;
+ -o-transform: translateY(-30px);
+ }
+
+ 80% {
+ -o-transform: translateY(10px);
+ }
+
+ 100% {
+ -o-transform: translateY(0);
+ }
+}
+
+@keyframes bounceInUp {
+ 0% {
+ opacity: 0;
+ transform: translateY(2000px);
+ }
+
+ 60% {
+ opacity: 1;
+ transform: translateY(-30px);
+ }
+
+ 80% {
+ transform: translateY(10px);
+ }
+
+ 100% {
+ transform: translateY(0);
+ }
+}
+
+.bounceInUp {
+ -webkit-animation-name: bounceInUp;
+ -moz-animation-name: bounceInUp;
+ -ms-animation-name: bounceInUp;
+ -o-animation-name: bounceInUp;
+ animation-name: bounceInUp;
+}
+@-webkit-keyframes bounceInDown {
+ 0% {
+ opacity: 0;
+ -webkit-transform: translateY(-2000px);
+ }
+
+ 60% {
+ opacity: 1;
+ -webkit-transform: translateY(30px);
+ }
+
+ 80% {
+ -webkit-transform: translateY(-10px);
+ }
+
+ 100% {
+ -webkit-transform: translateY(0);
+ }
+}
+
+@-moz-keyframes bounceInDown {
+ 0% {
+ opacity: 0;
+ -moz-transform: translateY(-2000px);
+ }
+
+ 60% {
+ opacity: 1;
+ -moz-transform: translateY(30px);
+ }
+
+ 80% {
+ -moz-transform: translateY(-10px);
+ }
+
+ 100% {
+ -moz-transform: translateY(0);
+ }
+}
+
+@-ms-keyframes bounceInDown {
+ 0% {
+ opacity: 0;
+ -ms-transform: translateY(-2000px);
+ }
+
+ 60% {
+ opacity: 1;
+ -ms-transform: translateY(30px);
+ }
+
+ 80% {
+ -ms-transform: translateY(-10px);
+ }
+
+ 100% {
+ -ms-transform: translateY(0);
+ }
+}
+
+@-o-keyframes bounceInDown {
+ 0% {
+ opacity: 0;
+ -o-transform: translateY(-2000px);
+ }
+
+ 60% {
+ opacity: 1;
+ -o-transform: translateY(30px);
+ }
+
+ 80% {
+ -o-transform: translateY(-10px);
+ }
+
+ 100% {
+ -o-transform: translateY(0);
+ }
+}
+
+@keyframes bounceInDown {
+ 0% {
+ opacity: 0;
+ transform: translateY(-2000px);
+ }
+
+ 60% {
+ opacity: 1;
+ transform: translateY(30px);
+ }
+
+ 80% {
+ transform: translateY(-10px);
+ }
+
+ 100% {
+ transform: translateY(0);
+ }
+}
+
+.bounceInDown {
+ -webkit-animation-name: bounceInDown;
+ -moz-animation-name: bounceInDown;
+ -ms-animation-name: bounceInDown;
+ -o-animation-name: bounceInDown;
+ animation-name: bounceInDown;
+}
+@-webkit-keyframes bounceInLeft {
+ 0% {
+ opacity: 0;
+ -webkit-transform: translateX(-2000px);
+ }
+
+ 60% {
+ opacity: 1;
+ -webkit-transform: translateX(30px);
+ }
+
+ 80% {
+ -webkit-transform: translateX(-10px);
+ }
+
+ 100% {
+ -webkit-transform: translateX(0);
+ }
+}
+
+@-moz-keyframes bounceInLeft {
+ 0% {
+ opacity: 0;
+ -moz-transform: translateX(-2000px);
+ }
+
+ 60% {
+ opacity: 1;
+ -moz-transform: translateX(30px);
+ }
+
+ 80% {
+ -moz-transform: translateX(-10px);
+ }
+
+ 100% {
+ -moz-transform: translateX(0);
+ }
+}
+
+@-ms-keyframes bounceInLeft {
+ 0% {
+ opacity: 0;
+ -ms-transform: translateX(-2000px);
+ }
+
+ 60% {
+ opacity: 1;
+ -ms-transform: translateX(30px);
+ }
+
+ 80% {
+ -ms-transform: translateX(-10px);
+ }
+
+ 100% {
+ -ms-transform: translateX(0);
+ }
+}
+
+@-o-keyframes bounceInLeft {
+ 0% {
+ opacity: 0;
+ -o-transform: translateX(-2000px);
+ }
+
+ 60% {
+ opacity: 1;
+ -o-transform: translateX(30px);
+ }
+
+ 80% {
+ -o-transform: translateX(-10px);
+ }
+
+ 100% {
+ -o-transform: translateX(0);
+ }
+}
+
+@keyframes bounceInLeft {
+ 0% {
+ opacity: 0;
+ transform: translateX(-2000px);
+ }
+
+ 60% {
+ opacity: 1;
+ transform: translateX(30px);
+ }
+
+ 80% {
+ transform: translateX(-10px);
+ }
+
+ 100% {
+ transform: translateX(0);
+ }
+}
+
+.bounceInLeft {
+ -webkit-animation-name: bounceInLeft;
+ -moz-animation-name: bounceInLeft;
+ -ms-animation-name: bounceInLeft;
+ -o-animation-name: bounceInLeft;
+ animation-name: bounceInLeft;
+}
+@-webkit-keyframes bounceInRight {
+ 0% {
+ opacity: 0;
+ -webkit-transform: translateX(2000px);
+ }
+
+ 60% {
+ opacity: 1;
+ -webkit-transform: translateX(-30px);
+ }
+
+ 80% {
+ -webkit-transform: translateX(10px);
+ }
+
+ 100% {
+ -webkit-transform: translateX(0);
+ }
+}
+
+@-moz-keyframes bounceInRight {
+ 0% {
+ opacity: 0;
+ -moz-transform: translateX(2000px);
+ }
+
+ 60% {
+ opacity: 1;
+ -moz-transform: translateX(-30px);
+ }
+
+ 80% {
+ -moz-transform: translateX(10px);
+ }
+
+ 100% {
+ -moz-transform: translateX(0);
+ }
+}
+
+@-ms-keyframes bounceInRight {
+ 0% {
+ opacity: 0;
+ -ms-transform: translateX(2000px);
+ }
+
+ 60% {
+ opacity: 1;
+ -ms-transform: translateX(-30px);
+ }
+
+ 80% {
+ -ms-transform: translateX(10px);
+ }
+
+ 100% {
+ -ms-transform: translateX(0);
+ }
+}
+
+@-o-keyframes bounceInRight {
+ 0% {
+ opacity: 0;
+ -o-transform: translateX(2000px);
+ }
+
+ 60% {
+ opacity: 1;
+ -o-transform: translateX(-30px);
+ }
+
+ 80% {
+ -o-transform: translateX(10px);
+ }
+
+ 100% {
+ -o-transform: translateX(0);
+ }
+}
+
+@keyframes bounceInRight {
+ 0% {
+ opacity: 0;
+ transform: translateX(2000px);
+ }
+
+ 60% {
+ opacity: 1;
+ transform: translateX(-30px);
+ }
+
+ 80% {
+ transform: translateX(10px);
+ }
+
+ 100% {
+ transform: translateX(0);
+ }
+}
+
+.bounceInRight {
+ -webkit-animation-name: bounceInRight;
+ -moz-animation-name: bounceInRight;
+ -ms-animation-name: bounceInRight;
+ -o-animation-name: bounceInRight;
+ animation-name: bounceInRight;
+}
+@-webkit-keyframes bounceOut {
+ 0% {
+ -webkit-transform: scale(1);
+ }
+
+ 25% {
+ -webkit-transform: scale(.95);
+ }
+
+ 50% {
+ opacity: 1;
+ -webkit-transform: scale(1.1);
+ }
+
+ 100% {
+ opacity: 0;
+ -webkit-transform: scale(.3);
+ }
+}
+
+@-moz-keyframes bounceOut {
+ 0% {
+ -moz-transform: scale(1);
+ }
+
+ 25% {
+ -moz-transform: scale(.95);
+ }
+
+ 50% {
+ opacity: 1;
+ -moz-transform: scale(1.1);
+ }
+
+ 100% {
+ opacity: 0;
+ -moz-transform: scale(.3);
+ }
+}
+
+@-ms-keyframes bounceOut {
+ 0% {
+ -ms-transform: scale(1);
+ }
+
+ 25% {
+ -ms-transform: scale(.95);
+ }
+
+ 50% {
+ opacity: 1;
+ -ms-transform: scale(1.1);
+ }
+
+ 100% {
+ opacity: 0;
+ -ms-transform: scale(.3);
+ }
+}
+
+@-o-keyframes bounceOut {
+ 0% {
+ -o-transform: scale(1);
+ }
+
+ 25% {
+ -o-transform: scale(.95);
+ }
+
+ 50% {
+ opacity: 1;
+ -o-transform: scale(1.1);
+ }
+
+ 100% {
+ opacity: 0;
+ -o-transform: scale(.3);
+ }
+}
+
+@keyframes bounceOut {
+ 0% {
+ transform: scale(1);
+ }
+
+ 25% {
+ transform: scale(.95);
+ }
+
+ 50% {
+ opacity: 1;
+ transform: scale(1.1);
+ }
+
+ 100% {
+ opacity: 0;
+ transform: scale(.3);
+ }
+}
+
+.bounceOut {
+ -webkit-animation-name: bounceOut;
+ -moz-animation-name: bounceOut;
+ -ms-animation-name: bounceOut;
+ -o-animation-name: bounceOut;
+ animation-name: bounceOut;
+}
+@-webkit-keyframes bounceOutUp {
+ 0% {
+ -webkit-transform: translateY(0);
+ }
+
+ 20% {
+ opacity: 1;
+ -webkit-transform: translateY(20px);
+ }
+
+ 100% {
+ opacity: 0;
+ -webkit-transform: translateY(-2000px);
+ }
+}
+
+@-moz-keyframes bounceOutUp {
+ 0% {
+ -moz-transform: translateY(0);
+ }
+
+ 20% {
+ opacity: 1;
+ -moz-transform: translateY(20px);
+ }
+
+ 100% {
+ opacity: 0;
+ -moz-transform: translateY(-2000px);
+ }
+}
+
+@-ms-keyframes bounceOutUp {
+ 0% {
+ -ms-transform: translateY(0);
+ }
+
+ 20% {
+ opacity: 1;
+ -ms-transform: translateY(20px);
+ }
+
+ 100% {
+ opacity: 0;
+ -ms-transform: translateY(-2000px);
+ }
+}
+
+@-o-keyframes bounceOutUp {
+ 0% {
+ -o-transform: translateY(0);
+ }
+
+ 20% {
+ opacity: 1;
+ -o-transform: translateY(20px);
+ }
+
+ 100% {
+ opacity: 0;
+ -o-transform: translateY(-2000px);
+ }
+}
+
+@keyframes bounceOutUp {
+ 0% {
+ transform: translateY(0);
+ }
+
+ 20% {
+ opacity: 1;
+ transform: translateY(20px);
+ }
+
+ 100% {
+ opacity: 0;
+ transform: translateY(-2000px);
+ }
+}
+
+.bounceOutUp {
+ -webkit-animation-name: bounceOutUp;
+ -moz-animation-name: bounceOutUp;
+ -ms-animation-name: bounceOutUp;
+ -o-animation-name: bounceOutUp;
+ animation-name: bounceOutUp;
+}
+@-webkit-keyframes bounceOutDown {
+ 0% {
+ -webkit-transform: translateY(0);
+ }
+
+ 20% {
+ opacity: 1;
+ -webkit-transform: translateY(-20px);
+ }
+
+ 100% {
+ opacity: 0;
+ -webkit-transform: translateY(2000px);
+ }
+}
+
+@-moz-keyframes bounceOutDown {
+ 0% {
+ -moz-transform: translateY(0);
+ }
+
+ 20% {
+ opacity: 1;
+ -moz-transform: translateY(-20px);
+ }
+
+ 100% {
+ opacity: 0;
+ -moz-transform: translateY(2000px);
+ }
+}
+
+@-ms-keyframes bounceOutDown {
+ 0% {
+ -ms-transform: translateY(0);
+ }
+
+ 20% {
+ opacity: 1;
+ -ms-transform: translateY(-20px);
+ }
+
+ 100% {
+ opacity: 0;
+ -ms-transform: translateY(2000px);
+ }
+}
+
+@keyframes bounceOutDown {
+ 0% {
+ transform: translateY(0);
+ }
+
+ 20% {
+ opacity: 1;
+ transform: translateY(-20px);
+ }
+
+ 100% {
+ opacity: 0;
+ transform: translateY(2000px);
+ }
+}
+
+.bounceOutDown {
+ -webkit-animation-name: bounceOutDown;
+ -moz-animation-name: bounceOutDown;
+ -ms-animation-name: bounceOutDown;
+ animation-name: bounceOutDown;
+}
+@-webkit-keyframes bounceOutLeft {
+ 0% {
+ -webkit-transform: translateX(0);
+ }
+
+ 20% {
+ opacity: 1;
+ -webkit-transform: translateX(20px);
+ }
+
+ 100% {
+ opacity: 0;
+ -webkit-transform: translateX(-2000px);
+ }
+}
+
+@-moz-keyframes bounceOutLeft {
+ 0% {
+ -moz-transform: translateX(0);
+ }
+
+ 20% {
+ opacity: 1;
+ -moz-transform: translateX(20px);
+ }
+
+ 100% {
+ opacity: 0;
+ -moz-transform: translateX(-2000px);
+ }
+}
+
+@-ms-keyframes bounceOutLeft {
+ 0% {
+ -ms-transform: translateX(0);
+ }
+
+ 20% {
+ opacity: 1;
+ -ms-transform: translateX(20px);
+ }
+
+ 100% {
+ opacity: 0;
+ -ms-transform: translateX(-2000px);
+ }
+}
+
+@-o-keyframes bounceOutLeft {
+ 0% {
+ -o-transform: translateX(0);
+ }
+
+ 20% {
+ opacity: 1;
+ -o-transform: translateX(20px);
+ }
+
+ 100% {
+ opacity: 0;
+ -o-transform: translateX(-2000px);
+ }
+}
+
+@keyframes bounceOutLeft {
+ 0% {
+ transform: translateX(0);
+ }
+
+ 20% {
+ opacity: 1;
+ transform: translateX(20px);
+ }
+
+ 100% {
+ opacity: 0;
+ transform: translateX(-2000px);
+ }
+}
+
+.bounceOutLeft {
+ -webkit-animation-name: bounceOutLeft;
+ -moz-animation-name: bounceOutLeft;
+ -ms-animation-name: bounceOutLeft;
+ -o-animation-name: bounceOutLeft;
+ animation-name: bounceOutLeft;
+}
+@-webkit-keyframes bounceOutRight {
+ 0% {
+ -webkit-transform: translateX(0);
+ }
+
+ 20% {
+ opacity: 1;
+ -webkit-transform: translateX(-20px);
+ }
+
+ 100% {
+ opacity: 0;
+ -webkit-transform: translateX(2000px);
+ }
+}
+
+@-moz-keyframes bounceOutRight {
+ 0% {
+ -moz-transform: translateX(0);
+ }
+
+ 20% {
+ opacity: 1;
+ -moz-transform: translateX(-20px);
+ }
+
+ 100% {
+ opacity: 0;
+ -moz-transform: translateX(2000px);
+ }
+}
+
+@-ms-keyframes bounceOutRight {
+ 0% {
+ -ms-transform: translateX(0);
+ }
+
+ 20% {
+ opacity: 1;
+ -ms-transform: translateX(-20px);
+ }
+
+ 100% {
+ opacity: 0;
+ -ms-transform: translateX(2000px);
+ }
+}
+
+@-o-keyframes bounceOutRight {
+ 0% {
+ -o-transform: translateX(0);
+ }
+
+ 20% {
+ opacity: 1;
+ -o-transform: translateX(-20px);
+ }
+
+ 100% {
+ opacity: 0;
+ -o-transform: translateX(2000px);
+ }
+}
+
+@keyframes bounceOutRight {
+ 0% {
+ transform: translateX(0);
+ }
+
+ 20% {
+ opacity: 1;
+ transform: translateX(-20px);
+ }
+
+ 100% {
+ opacity: 0;
+ transform: translateX(2000px);
+ }
+}
+
+.bounceOutRight {
+ -webkit-animation-name: bounceOutRight;
+ -moz-animation-name: bounceOutRight;
+ -ms-animation-name: bounceOutRight;
+ -o-animation-name: bounceOutRight;
+ animation-name: bounceOutRight;
+}
+@-webkit-keyframes rotateIn {
+ 0% {
+ -webkit-transform-origin: center center;
+ -webkit-transform: rotate(-200deg);
+ opacity: 0;
+ }
+
+ 100% {
+ -webkit-transform-origin: center center;
+ -webkit-transform: rotate(0);
+ opacity: 1;
+ }
+}
+@-moz-keyframes rotateIn {
+ 0% {
+ -moz-transform-origin: center center;
+ -moz-transform: rotate(-200deg);
+ opacity: 0;
+ }
+
+ 100% {
+ -moz-transform-origin: center center;
+ -moz-transform: rotate(0);
+ opacity: 1;
+ }
+}
+@-ms-keyframes rotateIn {
+ 0% {
+ -ms-transform-origin: center center;
+ -ms-transform: rotate(-200deg);
+ opacity: 0;
+ }
+
+ 100% {
+ -ms-transform-origin: center center;
+ -ms-transform: rotate(0);
+ opacity: 1;
+ }
+}
+@-o-keyframes rotateIn {
+ 0% {
+ -o-transform-origin: center center;
+ -o-transform: rotate(-200deg);
+ opacity: 0;
+ }
+
+ 100% {
+ -o-transform-origin: center center;
+ -o-transform: rotate(0);
+ opacity: 1;
+ }
+}
+@keyframes rotateIn {
+ 0% {
+ transform-origin: center center;
+ transform: rotate(-200deg);
+ opacity: 0;
+ }
+
+ 100% {
+ transform-origin: center center;
+ transform: rotate(0);
+ opacity: 1;
+ }
+}
+
+.rotateIn {
+ -webkit-animation-name: rotateIn;
+ -moz-animation-name: rotateIn;
+ -ms-animation-name: rotateIn;
+ -o-animation-name: rotateIn;
+ animation-name: rotateIn;
+}
+@-webkit-keyframes rotateInUpLeft {
+ 0% {
+ -webkit-transform-origin: left bottom;
+ -webkit-transform: rotate(90deg);
+ opacity: 0;
+ }
+
+ 100% {
+ -webkit-transform-origin: left bottom;
+ -webkit-transform: rotate(0);
+ opacity: 1;
+ }
+}
+
+@-moz-keyframes rotateInUpLeft {
+ 0% {
+ -moz-transform-origin: left bottom;
+ -moz-transform: rotate(90deg);
+ opacity: 0;
+ }
+
+ 100% {
+ -moz-transform-origin: left bottom;
+ -moz-transform: rotate(0);
+ opacity: 1;
+ }
+}
+
+@-ms-keyframes rotateInUpLeft {
+ 0% {
+ -ms-transform-origin: left bottom;
+ -ms-transform: rotate(90deg);
+ opacity: 0;
+ }
+
+ 100% {
+ -ms-transform-origin: left bottom;
+ -ms-transform: rotate(0);
+ opacity: 1;
+ }
+}
+
+@-o-keyframes rotateInUpLeft {
+ 0% {
+ -o-transform-origin: left bottom;
+ -o-transform: rotate(90deg);
+ opacity: 0;
+ }
+
+ 100% {
+ -o-transform-origin: left bottom;
+ -o-transform: rotate(0);
+ opacity: 1;
+ }
+}
+
+@keyframes rotateInUpLeft {
+ 0% {
+ transform-origin: left bottom;
+ transform: rotate(90deg);
+ opacity: 0;
+ }
+
+ 100% {
+ transform-origin: left bottom;
+ transform: rotate(0);
+ opacity: 1;
+ }
+}
+
+.rotateInUpLeft {
+ -webkit-animation-name: rotateInUpLeft;
+ -moz-animation-name: rotateInUpLeft;
+ -ms-animation-name: rotateInUpLeft;
+ -o-animation-name: rotateInUpLeft;
+ animation-name: rotateInUpLeft;
+}
+@-webkit-keyframes rotateInDownLeft {
+ 0% {
+ -webkit-transform-origin: left bottom;
+ -webkit-transform: rotate(-90deg);
+ opacity: 0;
+ }
+
+ 100% {
+ -webkit-transform-origin: left bottom;
+ -webkit-transform: rotate(0);
+ opacity: 1;
+ }
+}
+
+@-moz-keyframes rotateInDownLeft {
+ 0% {
+ -moz-transform-origin: left bottom;
+ -moz-transform: rotate(-90deg);
+ opacity: 0;
+ }
+
+ 100% {
+ -moz-transform-origin: left bottom;
+ -moz-transform: rotate(0);
+ opacity: 1;
+ }
+}
+
+@-ms-keyframes rotateInDownLeft {
+ 0% {
+ -ms-transform-origin: left bottom;
+ -ms-transform: rotate(-90deg);
+ opacity: 0;
+ }
+
+ 100% {
+ -ms-transform-origin: left bottom;
+ -ms-transform: rotate(0);
+ opacity: 1;
+ }
+}
+
+@-o-keyframes rotateInDownLeft {
+ 0% {
+ -o-transform-origin: left bottom;
+ -o-transform: rotate(-90deg);
+ opacity: 0;
+ }
+
+ 100% {
+ -o-transform-origin: left bottom;
+ -o-transform: rotate(0);
+ opacity: 1;
+ }
+}
+
+@keyframes rotateInDownLeft {
+ 0% {
+ transform-origin: left bottom;
+ transform: rotate(-90deg);
+ opacity: 0;
+ }
+
+ 100% {
+ transform-origin: left bottom;
+ transform: rotate(0);
+ opacity: 1;
+ }
+}
+
+.rotateInDownLeft {
+ -webkit-animation-name: rotateInDownLeft;
+ -moz-animation-name: rotateInDownLeft;
+ -ms-animation-name: rotateInDownLeft;
+ -o-animation-name: rotateInDownLeft;
+ animation-name: rotateInDownLeft;
+}
+@-webkit-keyframes rotateInUpRight {
+ 0% {
+ -webkit-transform-origin: right bottom;
+ -webkit-transform: rotate(-90deg);
+ opacity: 0;
+ }
+
+ 100% {
+ -webkit-transform-origin: right bottom;
+ -webkit-transform: rotate(0);
+ opacity: 1;
+ }
+}
+
+@-moz-keyframes rotateInUpRight {
+ 0% {
+ -moz-transform-origin: right bottom;
+ -moz-transform: rotate(-90deg);
+ opacity: 0;
+ }
+
+ 100% {
+ -moz-transform-origin: right bottom;
+ -moz-transform: rotate(0);
+ opacity: 1;
+ }
+}
+
+@-ms-keyframes rotateInUpRight {
+ 0% {
+ -ms-transform-origin: right bottom;
+ -ms-transform: rotate(-90deg);
+ opacity: 0;
+ }
+
+ 100% {
+ -ms-transform-origin: right bottom;
+ -ms-transform: rotate(0);
+ opacity: 1;
+ }
+}
+
+@-o-keyframes rotateInUpRight {
+ 0% {
+ -o-transform-origin: right bottom;
+ -o-transform: rotate(-90deg);
+ opacity: 0;
+ }
+
+ 100% {
+ -o-transform-origin: right bottom;
+ -o-transform: rotate(0);
+ opacity: 1;
+ }
+}
+
+@keyframes rotateInUpRight {
+ 0% {
+ transform-origin: right bottom;
+ transform: rotate(-90deg);
+ opacity: 0;
+ }
+
+ 100% {
+ transform-origin: right bottom;
+ transform: rotate(0);
+ opacity: 1;
+ }
+}
+
+.rotateInUpRight {
+ -webkit-animation-name: rotateInUpRight;
+ -moz-animation-name: rotateInUpRight;
+ -ms-animation-name: rotateInUpRight;
+ -o-animation-name: rotateInUpRight;
+ animation-name: rotateInUpRight;
+}
+@-webkit-keyframes rotateInDownRight {
+ 0% {
+ -webkit-transform-origin: right bottom;
+ -webkit-transform: rotate(90deg);
+ opacity: 0;
+ }
+
+ 100% {
+ -webkit-transform-origin: right bottom;
+ -webkit-transform: rotate(0);
+ opacity: 1;
+ }
+}
+
+@-moz-keyframes rotateInDownRight {
+ 0% {
+ -moz-transform-origin: right bottom;
+ -moz-transform: rotate(90deg);
+ opacity: 0;
+ }
+
+ 100% {
+ -moz-transform-origin: right bottom;
+ -moz-transform: rotate(0);
+ opacity: 1;
+ }
+}
+
+@-ms-keyframes rotateInDownRight {
+ 0% {
+ -ms-transform-origin: right bottom;
+ -ms-transform: rotate(90deg);
+ opacity: 0;
+ }
+
+ 100% {
+ -ms-transform-origin: right bottom;
+ -ms-transform: rotate(0);
+ opacity: 1;
+ }
+}
+
+@-o-keyframes rotateInDownRight {
+ 0% {
+ -o-transform-origin: right bottom;
+ -o-transform: rotate(90deg);
+ opacity: 0;
+ }
+
+ 100% {
+ -o-transform-origin: right bottom;
+ -o-transform: rotate(0);
+ opacity: 1;
+ }
+}
+
+@keyframes rotateInDownRight {
+ 0% {
+ transform-origin: right bottom;
+ transform: rotate(90deg);
+ opacity: 0;
+ }
+
+ 100% {
+ transform-origin: right bottom;
+ transform: rotate(0);
+ opacity: 1;
+ }
+}
+
+.rotateInDownRight {
+ -webkit-animation-name: rotateInDownRight;
+ -moz-animation-name: rotateInDownRight;
+ -ms-animation-name: rotateInDownRight;
+ -o-animation-name: rotateInDownRight;
+ animation-name: rotateInDownRight;
+}
+@-webkit-keyframes rotateOut {
+ 0% {
+ -webkit-transform-origin: center center;
+ -webkit-transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ -webkit-transform-origin: center center;
+ -webkit-transform: rotate(200deg);
+ opacity: 0;
+ }
+}
+
+@-moz-keyframes rotateOut {
+ 0% {
+ -moz-transform-origin: center center;
+ -moz-transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ -moz-transform-origin: center center;
+ -moz-transform: rotate(200deg);
+ opacity: 0;
+ }
+}
+
+@-ms-keyframes rotateOut {
+ 0% {
+ -ms-transform-origin: center center;
+ -ms-transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ -ms-transform-origin: center center;
+ -ms-transform: rotate(200deg);
+ opacity: 0;
+ }
+}
+
+@-o-keyframes rotateOut {
+ 0% {
+ -o-transform-origin: center center;
+ -o-transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ -o-transform-origin: center center;
+ -o-transform: rotate(200deg);
+ opacity: 0;
+ }
+}
+
+@keyframes rotateOut {
+ 0% {
+ transform-origin: center center;
+ transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ transform-origin: center center;
+ transform: rotate(200deg);
+ opacity: 0;
+ }
+}
+
+.rotateOut {
+ -webkit-animation-name: rotateOut;
+ -moz-animation-name: rotateOut;
+ -ms-animation-name: rotateOut;
+ -o-animation-name: rotateOut;
+ animation-name: rotateOut;
+}
+@-webkit-keyframes rotateOutUpLeft {
+ 0% {
+ -webkit-transform-origin: left bottom;
+ -webkit-transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ -webkit-transform-origin: left bottom;
+ -webkit-transform: rotate(-90deg);
+ opacity: 0;
+ }
+}
+
+@-moz-keyframes rotateOutUpLeft {
+ 0% {
+ -moz-transform-origin: left bottom;
+ -moz-transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ -moz-transform-origin: left bottom;
+ -moz-transform: rotate(-90deg);
+ opacity: 0;
+ }
+}
+
+@-ms-keyframes rotateOutUpLeft {
+ 0% {
+ -ms-transform-origin: left bottom;
+ -ms-transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ -ms-transform-origin: left bottom;
+ -ms-transform: rotate(-90deg);
+ opacity: 0;
+ }
+}
+
+@-o-keyframes rotateOutUpLeft {
+ 0% {
+ -o-transform-origin: left bottom;
+ -o-transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ -o-transform-origin: left bottom;
+ -o-transform: rotate(-90deg);
+ opacity: 0;
+ }
+}
+
+@keyframes rotateOutUpLeft {
+ 0% {
+ transform-origin: left bottom;
+ transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ -transform-origin: left bottom;
+ -transform: rotate(-90deg);
+ opacity: 0;
+ }
+}
+
+.rotateOutUpLeft {
+ -webkit-animation-name: rotateOutUpLeft;
+ -moz-animation-name: rotateOutUpLeft;
+ -ms-animation-name: rotateOutUpLeft;
+ -o-animation-name: rotateOutUpLeft;
+ animation-name: rotateOutUpLeft;
+}
+@-webkit-keyframes rotateOutDownLeft {
+ 0% {
+ -webkit-transform-origin: left bottom;
+ -webkit-transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ -webkit-transform-origin: left bottom;
+ -webkit-transform: rotate(90deg);
+ opacity: 0;
+ }
+}
+
+@-moz-keyframes rotateOutDownLeft {
+ 0% {
+ -moz-transform-origin: left bottom;
+ -moz-transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ -moz-transform-origin: left bottom;
+ -moz-transform: rotate(90deg);
+ opacity: 0;
+ }
+}
+
+@-ms-keyframes rotateOutDownLeft {
+ 0% {
+ -ms-transform-origin: left bottom;
+ -ms-transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ -ms-transform-origin: left bottom;
+ -ms-transform: rotate(90deg);
+ opacity: 0;
+ }
+}
+
+@-o-keyframes rotateOutDownLeft {
+ 0% {
+ -o-transform-origin: left bottom;
+ -o-transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ -o-transform-origin: left bottom;
+ -o-transform: rotate(90deg);
+ opacity: 0;
+ }
+}
+
+@keyframes rotateOutDownLeft {
+ 0% {
+ transform-origin: left bottom;
+ transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ transform-origin: left bottom;
+ transform: rotate(90deg);
+ opacity: 0;
+ }
+}
+
+.rotateOutDownLeft {
+ -webkit-animation-name: rotateOutDownLeft;
+ -moz-animation-name: rotateOutDownLeft;
+ -ms-animation-name: rotateOutDownLeft;
+ -o-animation-name: rotateOutDownLeft;
+ animation-name: rotateOutDownLeft;
+}
+@-webkit-keyframes rotateOutUpRight {
+ 0% {
+ -webkit-transform-origin: right bottom;
+ -webkit-transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ -webkit-transform-origin: right bottom;
+ -webkit-transform: rotate(90deg);
+ opacity: 0;
+ }
+}
+
+@-moz-keyframes rotateOutUpRight {
+ 0% {
+ -moz-transform-origin: right bottom;
+ -moz-transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ -moz-transform-origin: right bottom;
+ -moz-transform: rotate(90deg);
+ opacity: 0;
+ }
+}
+
+@-ms-keyframes rotateOutUpRight {
+ 0% {
+ -ms-transform-origin: right bottom;
+ -ms-transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ -ms-transform-origin: right bottom;
+ -ms-transform: rotate(90deg);
+ opacity: 0;
+ }
+}
+
+@-o-keyframes rotateOutUpRight {
+ 0% {
+ -o-transform-origin: right bottom;
+ -o-transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ -o-transform-origin: right bottom;
+ -o-transform: rotate(90deg);
+ opacity: 0;
+ }
+}
+
+@keyframes rotateOutUpRight {
+ 0% {
+ transform-origin: right bottom;
+ transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ transform-origin: right bottom;
+ transform: rotate(90deg);
+ opacity: 0;
+ }
+}
+
+.rotateOutUpRight {
+ -webkit-animation-name: rotateOutUpRight;
+ -moz-animation-name: rotateOutUpRight;
+ -ms-animation-name: rotateOutUpRight;
+ -o-animation-name: rotateOutUpRight;
+ animation-name: rotateOutUpRight;
+}
+@-webkit-keyframes rotateOutDownRight {
+ 0% {
+ -webkit-transform-origin: right bottom;
+ -webkit-transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ -webkit-transform-origin: right bottom;
+ -webkit-transform: rotate(-90deg);
+ opacity: 0;
+ }
+}
+
+@-moz-keyframes rotateOutDownRight {
+ 0% {
+ -moz-transform-origin: right bottom;
+ -moz-transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ -moz-transform-origin: right bottom;
+ -moz-transform: rotate(-90deg);
+ opacity: 0;
+ }
+}
+
+@-ms-keyframes rotateOutDownRight {
+ 0% {
+ -ms-transform-origin: right bottom;
+ -ms-transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ -ms-transform-origin: right bottom;
+ -ms-transform: rotate(-90deg);
+ opacity: 0;
+ }
+}
+
+@-o-keyframes rotateOutDownRight {
+ 0% {
+ -o-transform-origin: right bottom;
+ -o-transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ -o-transform-origin: right bottom;
+ -o-transform: rotate(-90deg);
+ opacity: 0;
+ }
+}
+
+@keyframes rotateOutDownRight {
+ 0% {
+ transform-origin: right bottom;
+ transform: rotate(0);
+ opacity: 1;
+ }
+
+ 100% {
+ transform-origin: right bottom;
+ transform: rotate(-90deg);
+ opacity: 0;
+ }
+}
+
+.rotateOutDownRight {
+ -webkit-animation-name: rotateOutDownRight;
+ -moz-animation-name: rotateOutDownRight;
+ -ms-animation-name: rotateOutDownRight;
+ -o-animation-name: rotateOutDownRight;
+ animation-name: rotateOutDownRight;
+}
+@-webkit-keyframes hinge {
+ 0% { -webkit-transform: rotate(0); -webkit-transform-origin: top left; -webkit-animation-timing-function: ease-in-out; }
+ 20%, 60% { -webkit-transform: rotate(80deg); -webkit-transform-origin: top left; -webkit-animation-timing-function: ease-in-out; }
+ 40% { -webkit-transform: rotate(60deg); -webkit-transform-origin: top left; -webkit-animation-timing-function: ease-in-out; }
+ 80% { -webkit-transform: rotate(60deg) translateY(0); opacity: 1; -webkit-transform-origin: top left; -webkit-animation-timing-function: ease-in-out; }
+ 100% { -webkit-transform: translateY(700px); opacity: 0; }
+}
+
+@-moz-keyframes hinge {
+ 0% { -moz-transform: rotate(0); -moz-transform-origin: top left; -moz-animation-timing-function: ease-in-out; }
+ 20%, 60% { -moz-transform: rotate(80deg); -moz-transform-origin: top left; -moz-animation-timing-function: ease-in-out; }
+ 40% { -moz-transform: rotate(60deg); -moz-transform-origin: top left; -moz-animation-timing-function: ease-in-out; }
+ 80% { -moz-transform: rotate(60deg) translateY(0); opacity: 1; -moz-transform-origin: top left; -moz-animation-timing-function: ease-in-out; }
+ 100% { -moz-transform: translateY(700px); opacity: 0; }
+}
+
+@-ms-keyframes hinge {
+ 0% { -ms-transform: rotate(0); -ms-transform-origin: top left; -ms-animation-timing-function: ease-in-out; }
+ 20%, 60% { -ms-transform: rotate(80deg); -ms-transform-origin: top left; -ms-animation-timing-function: ease-in-out; }
+ 40% { -ms-transform: rotate(60deg); -ms-transform-origin: top left; -ms-animation-timing-function: ease-in-out; }
+ 80% { -ms-transform: rotate(60deg) translateY(0); opacity: 1; -ms-transform-origin: top left; -ms-animation-timing-function: ease-in-out; }
+ 100% { -ms-transform: translateY(700px); opacity: 0; }
+}
+
+@-o-keyframes hinge {
+ 0% { -o-transform: rotate(0); -o-transform-origin: top left; -o-animation-timing-function: ease-in-out; }
+ 20%, 60% { -o-transform: rotate(80deg); -o-transform-origin: top left; -o-animation-timing-function: ease-in-out; }
+ 40% { -o-transform: rotate(60deg); -o-transform-origin: top left; -o-animation-timing-function: ease-in-out; }
+ 80% { -o-transform: rotate(60deg) translateY(0); opacity: 1; -o-transform-origin: top left; -o-animation-timing-function: ease-in-out; }
+ 100% { -o-transform: translateY(700px); opacity: 0; }
+}
+
+@keyframes hinge {
+ 0% { transform: rotate(0); transform-origin: top left; animation-timing-function: ease-in-out; }
+ 20%, 60% { transform: rotate(80deg); transform-origin: top left; animation-timing-function: ease-in-out; }
+ 40% { transform: rotate(60deg); transform-origin: top left; animation-timing-function: ease-in-out; }
+ 80% { transform: rotate(60deg) translateY(0); opacity: 1; transform-origin: top left; animation-timing-function: ease-in-out; }
+ 100% { transform: translateY(700px); opacity: 0; }
+}
+
+.hinge {
+ -webkit-animation-name: hinge;
+ -moz-animation-name: hinge;
+ -ms-animation-name: hinge;
+ -o-animation-name: hinge;
+ animation-name: hinge;
+}
+/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
+
+@-webkit-keyframes rollIn {
+ 0% { opacity: 0; -webkit-transform: translateX(-100%) rotate(-120deg); }
+ 100% { opacity: 1; -webkit-transform: translateX(0px) rotate(0deg); }
+}
+
+@-moz-keyframes rollIn {
+ 0% { opacity: 0; -moz-transform: translateX(-100%) rotate(-120deg); }
+ 100% { opacity: 1; -moz-transform: translateX(0px) rotate(0deg); }
+}
+
+@-ms-keyframes rollIn {
+ 0% { opacity: 0; -ms-transform: translateX(-100%) rotate(-120deg); }
+ 100% { opacity: 1; -ms-transform: translateX(0px) rotate(0deg); }
+}
+
+@-o-keyframes rollIn {
+ 0% { opacity: 0; -o-transform: translateX(-100%) rotate(-120deg); }
+ 100% { opacity: 1; -o-transform: translateX(0px) rotate(0deg); }
+}
+
+@keyframes rollIn {
+ 0% { opacity: 0; transform: translateX(-100%) rotate(-120deg); }
+ 100% { opacity: 1; transform: translateX(0px) rotate(0deg); }
+}
+
+.rollIn {
+ -webkit-animation-name: rollIn;
+ -moz-animation-name: rollIn;
+ -ms-animation-name: rollIn;
+ -o-animation-name: rollIn;
+ animation-name: rollIn;
+}
+/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
+
+@-webkit-keyframes rollOut {
+ 0% {
+ opacity: 1;
+ -webkit-transform: translateX(0px) rotate(0deg);
+ }
+
+ 100% {
+ opacity: 0;
+ -webkit-transform: translateX(100%) rotate(120deg);
+ }
+}
+
+@-moz-keyframes rollOut {
+ 0% {
+ opacity: 1;
+ -moz-transform: translateX(0px) rotate(0deg);
+ }
+
+ 100% {
+ opacity: 0;
+ -moz-transform: translateX(100%) rotate(120deg);
+ }
+}
+
+@-ms-keyframes rollOut {
+ 0% {
+ opacity: 1;
+ -ms-transform: translateX(0px) rotate(0deg);
+ }
+
+ 100% {
+ opacity: 0;
+ -ms-transform: translateX(100%) rotate(120deg);
+ }
+}
+
+@-o-keyframes rollOut {
+ 0% {
+ opacity: 1;
+ -o-transform: translateX(0px) rotate(0deg);
+ }
+
+ 100% {
+ opacity: 0;
+ -o-transform: translateX(100%) rotate(120deg);
+ }
+}
+
+@keyframes rollOut {
+ 0% {
+ opacity: 1;
+ transform: translateX(0px) rotate(0deg);
+ }
+
+ 100% {
+ opacity: 0;
+ transform: translateX(100%) rotate(120deg);
+ }
+}
+
+.rollOut {
+ -webkit-animation-name: rollOut;
+ -moz-animation-name: rollOut;
+ -ms-animation-name: rollOut;
+ -o-animation-name: rollOut;
+ animation-name: rollOut;
+}
+
+
+
+
+
+
+/* extended by Codrops */
+
+@-webkit-keyframes scaleOut {
+ 0% {
+ opacity: 1;
+ -webkit-transform: scale(1);
+ }
+ 100% {
+ opacity: 0;
+ -webkit-transform: scale(.5);
+ }
+}
+
+@-moz-keyframes scaleOut {
+ 0% {
+ opacity: 1;
+ -moz-transform: scale(1);
+ }
+ 100% {
+ opacity: 0;
+ -moz-transform: scale(.5);
+ }
+}
+
+@-ms-keyframes scaleOut {
+ 0% {
+ opacity: 1;
+ -ms-transform: scale(1);
+ }100% {
+ opacity: 0;
+ -ms-transform: scale(.5);
+ }
+}
+
+@-o-keyframes scaleOut {
+ 0% {
+ opacity: 1;
+ -o-transform: scale(1);
+ }
+ 100% {
+ opacity: 0;
+ -o-transform: scale(.5);
+ }
+}
+
+@keyframes scaleOut {
+ 0% {
+ opacity: 1;
+ transform: scale(1);
+ }
+ 100% {
+ opacity: 0;
+ transform: scale(.5);
+ }
+}
+
+.scaleOut {
+ -webkit-animation-name: scaleOut;
+ -moz-animation-name: scaleOut;
+ -ms-animation-name: scaleOut;
+ -o-animation-name: scaleOut;
+ animation-name: scaleOut;
+}
+
+@-webkit-keyframes scaleIn {
+ 0% {
+ opacity: 0;
+ -webkit-transform: scale(.5);
+ }
+ 100% {
+ opacity: 1;
+ -webkit-transform: scale(1);
+ }
+}
+
+@-moz-keyframes scaleIn {
+ 0% {
+ opacity: 0;
+ -moz-transform: scale(.5);
+ }
+ 100% {
+ opacity: 1;
+ -moz-transform: scale(1);
+ }
+}
+
+@-ms-keyframes scaleIn {
+ 0% {
+ opacity: 0;
+ -ms-transform: scale(.5);
+ }
+ 100% {
+ opacity: 1;
+ -ms-transform: scale(1);
+ }
+}
+
+@-o-keyframes scaleIn {
+ 0% {
+ opacity: 0;
+ -o-transform: scale(.5);
+ }
+ 100% {
+ opacity: 1;
+ -o-transform: scale(1);
+ }
+}
+
+@keyframes scaleIn {
+ 0% {
+ opacity: 0;
+ transform: scale(.5);
+ }
+ 100% {
+ opacity: 1;
+ transform: scale(1);
+ }
+}
+
+.scaleIn {
+ -webkit-animation-name: scaleIn;
+ -moz-animation-name: scaleIn;
+ -ms-animation-name: scaleIn;
+ -o-animation-name: scaleIn;
+ animation-name: scaleIn;
+}
diff --git a/common/src/main/webapp/thirdparty/css/bootstrap.min.css b/common/src/main/webapp/thirdparty/css/bootstrap.min.css
new file mode 100644
index 0000000..2574229
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/bootstrap.min.css
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap v3.1.1 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+/*! normalize.css v3.0.0 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}@media print{*{text-shadow:none!important;color:#000!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#999}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-muted{color:#999}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#999}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}blockquote:before,blockquote:after{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;white-space:nowrap;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:0}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:0}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:0}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:0}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:0}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:0}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:0}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:0}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{max-width:100%;background-color:transparent}th{text-align:left}.table{width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#F5F5F5}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{position:static;float:none;display:table-column}table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}@media (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd;-webkit-overflow-scrolling:touch}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}input[type=date]{line-height:34px}.form-group{margin-bottom:15px}.radio,.checkbox{display:block;min-height:20px;margin-top:10px;margin-bottom:10px;padding-left:20px}.radio label,.checkbox label{display:inline;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{float:left;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],.radio[disabled],.radio-inline[disabled],.checkbox[disabled],.checkbox-inline[disabled],fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox],fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}textarea.input-lg,select[multiple].input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.has-feedback .form-control-feedback{position:absolute;top:25px;right:0;display:block;width:34px;height:34px;line-height:34px;text-align:center}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.form-control-static{margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{float:none;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.form-horizontal .form-control-static{padding-top:7px}@media (min-width:768px){.form-horizontal .control-label{text-align:right}}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#999;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#428bca}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#999}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}[data-toggle=buttons]>.btn>input[type=radio],[data-toggle=buttons]>.btn>input[type=checkbox]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#999;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{max-height:340px;overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-left:0;padding-right:0}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{margin-left:-15px;margin-right:-15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin-top:8px;margin-bottom:8px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{float:none;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{background-color:#e7e7e7;color:#555}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a{color:#999}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{background-color:#080808;color:#fff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#999}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.42857143;text-decoration:none;color:#428bca;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca;cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#999;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:20px 0;list-style:none;text-align:center}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;background-color:#fff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.label[href]:hover,.label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#999}.label-default[href]:hover,.label-default[href]:focus{background-color:gray}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;color:#fff;line-height:1;vertical-align:baseline;white-space:nowrap;text-align:center;background-color:#999;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-left:60px;padding-right:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-left:auto;margin-right:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{text-decoration:none;background-color:#f5f5f5}a.list-group-item.active,a.list-group-item.active:hover,a.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}a.list-group-item.active .list-group-item-heading,a.list-group-item.active:hover .list-group-item-heading,a.list-group-item.active:focus .list-group-item-heading{color:inherit}a.list-group-item.active .list-group-item-text,a.list-group-item.active:hover .list-group-item-text,a.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px;overflow:hidden}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse .panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#428bca}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#d6e9c6}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#bce8f1}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#faebcc}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#ebccd1}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ebccd1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:auto;overflow-y:scroll;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.42857143px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:20px}.modal-footer{margin-top:15px;padding:19px 20px 20px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:12px;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;right:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-control.left{background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.5) 0),color-stop(rgba(0,0,0,.0001) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.0001) 0),color-stop(rgba(0,0,0,.5) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:hover,.carousel-control:focus{outline:0;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0)}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#fff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;margin-left:-15px;font-size:30px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{content:" ";display:table}.clearfix:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}}@media print{.hidden-print{display:none!important}} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/css/font-awesome.min.css b/common/src/main/webapp/thirdparty/css/font-awesome.min.css
new file mode 100644
index 0000000..ec53d4d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/font-awesome.min.css
@@ -0,0 +1,4 @@
+/*!
+ * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome
+ * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
+ */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.2.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/css/img/Thumbs.db b/common/src/main/webapp/thirdparty/css/img/Thumbs.db
new file mode 100644
index 0000000..7eb0d3d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/img/Thumbs.db
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/css/img/diy/1_close.png b/common/src/main/webapp/thirdparty/css/img/diy/1_close.png
new file mode 100644
index 0000000..68ccb3c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/img/diy/1_close.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/css/img/diy/1_open.png b/common/src/main/webapp/thirdparty/css/img/diy/1_open.png
new file mode 100644
index 0000000..d6ff36d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/img/diy/1_open.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/css/img/diy/2.png b/common/src/main/webapp/thirdparty/css/img/diy/2.png
new file mode 100644
index 0000000..9eff506
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/img/diy/2.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/css/img/diy/3.png b/common/src/main/webapp/thirdparty/css/img/diy/3.png
new file mode 100644
index 0000000..d7ba6d0
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/img/diy/3.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/css/img/diy/4.png b/common/src/main/webapp/thirdparty/css/img/diy/4.png
new file mode 100644
index 0000000..753e2bf
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/img/diy/4.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/css/img/diy/5.png b/common/src/main/webapp/thirdparty/css/img/diy/5.png
new file mode 100644
index 0000000..0c5eccd
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/img/diy/5.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/css/img/diy/6.png b/common/src/main/webapp/thirdparty/css/img/diy/6.png
new file mode 100644
index 0000000..070b835
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/img/diy/6.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/css/img/diy/7.png b/common/src/main/webapp/thirdparty/css/img/diy/7.png
new file mode 100644
index 0000000..532b037
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/img/diy/7.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/css/img/diy/8.png b/common/src/main/webapp/thirdparty/css/img/diy/8.png
new file mode 100644
index 0000000..a8f3a86
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/img/diy/8.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/css/img/diy/9.png b/common/src/main/webapp/thirdparty/css/img/diy/9.png
new file mode 100644
index 0000000..4db73cd
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/img/diy/9.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/css/img/line_conn.gif b/common/src/main/webapp/thirdparty/css/img/line_conn.gif
new file mode 100644
index 0000000..d561d36
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/img/line_conn.gif
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/css/img/loading.gif b/common/src/main/webapp/thirdparty/css/img/loading.gif
new file mode 100644
index 0000000..e8c2892
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/img/loading.gif
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/css/img/zTreeStandard.gif b/common/src/main/webapp/thirdparty/css/img/zTreeStandard.gif
new file mode 100644
index 0000000..50c94fd
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/img/zTreeStandard.gif
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/css/img/zTreeStandard.png b/common/src/main/webapp/thirdparty/css/img/zTreeStandard.png
new file mode 100644
index 0000000..ffda01e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/img/zTreeStandard.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/css/magic-check.css b/common/src/main/webapp/thirdparty/css/magic-check.css
new file mode 100644
index 0000000..10178af
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/magic-check.css
@@ -0,0 +1,123 @@
+@keyframes hover-color {
+ from {
+ border-color: #c0c0c0; }
+ to {
+ border-color: #3e97eb; } }
+
+.magic-radio,
+.magic-checkbox {
+ position: absolute;
+ display: none; }
+
+.magic-radio[disabled],
+.magic-checkbox[disabled] {
+ cursor: not-allowed; }
+
+.magic-radio + label,
+.magic-checkbox + label {
+ position: relative;
+ display: block;
+ padding-left: 30px;
+ cursor: pointer;
+ vertical-align: middle;
+ font-weight:normal;
+ text-align: left;}
+.magic-radio + label:hover:before,
+.magic-checkbox + label:hover:before {
+ animation-duration: 0.4s;
+ animation-fill-mode: both;
+ animation-name: hover-color; }
+.magic-radio + label:before,
+.magic-checkbox + label:before {
+ position: absolute;
+ top: 0;
+ left: 0;
+ display: inline-block;
+ width: 20px;
+ height: 20px;
+ content: '';
+ border: 1px solid #4ac9ff; }
+.magic-radio + label:after,
+.magic-checkbox + label:after {
+ position: absolute;
+ display: none;
+ content: ''; }
+
+.magic-radio[disabled] + label,
+.magic-checkbox[disabled] + label {
+ cursor: not-allowed;
+ color: #e4e4e4; }
+.magic-radio[disabled] + label:hover, .magic-radio[disabled] + label:before, .magic-radio[disabled] + label:after,
+.magic-checkbox[disabled] + label:hover,
+.magic-checkbox[disabled] + label:before,
+.magic-checkbox[disabled] + label:after {
+ cursor: not-allowed; }
+.magic-radio[disabled] + label:hover:before,
+.magic-checkbox[disabled] + label:hover:before {
+ border: 1px solid #e4e4e4;
+ animation-name: none; }
+.magic-radio[disabled] + label:before,
+.magic-checkbox[disabled] + label:before {
+ border-color: #e4e4e4; }
+
+.magic-radio:checked + label:before,
+.magic-checkbox:checked + label:before {
+ animation-name: none; }
+
+.magic-radio:checked + label:after,
+.magic-checkbox:checked + label:after {
+ display: block; }
+
+.magic-radio + label:before {
+ border-radius: 50%; }
+
+.magic-radio + label:after {
+ top: 6px;
+ left: 6px;
+ width: 8px;
+ height: 8px;
+ border-radius: 50%;
+ background: #3e97eb; }
+
+.magic-radio:checked + label:before {
+ border: 1px solid #3e97eb; }
+
+.magic-radio:checked[disabled] + label:before {
+ border: 1px solid #c9e2f9; }
+
+.magic-radio:checked[disabled] + label:after {
+ background: #c9e2f9; }
+
+.magic-checkbox + label:before {
+ border-radius: 3px; }
+
+.magic-checkbox + label:after {
+ top: 2px;
+ left: 7px;
+ box-sizing: border-box;
+ width: 6px;
+ height: 12px;
+ transform: rotate(45deg);
+ border-width: 2px;
+ border-style: solid;
+ border-color: #fff;
+ border-top: 0;
+ border-left: 0; }
+
+.magic-checkbox:checked + label:before {
+ border: #3e97eb;
+ background: #3e97eb; }
+
+.magic-checkbox:checked[disabled] + label:before {
+ border: #c9e2f9;
+ background: #c9e2f9; }
+
+.radio-toolbar label {
+ background:Red;
+ border:1px solid green;
+ padding:2px 10px;
+}
+
+.magic-radio:checked + label {
+ font-weight: bold;
+}
diff --git a/common/src/main/webapp/thirdparty/css/ng-table.min.css b/common/src/main/webapp/thirdparty/css/ng-table.min.css
new file mode 100644
index 0000000..1ffb394
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/ng-table.min.css
@@ -0,0 +1,2 @@
+.ng-table th{text-align:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ng-table th.sortable{cursor:pointer}.ng-table th.sortable .sort-indicator{padding-right:18px;position:relative}.ng-table th.sortable .sort-indicator:after,.ng-table th.sortable .sort-indicator:before{content:"";border-width:0 4px 4px;border-style:solid;border-color:#000 transparent;visibility:visible;right:5px;top:50%;position:absolute;opacity:.3;margin-top:-4px}.ng-table th.sortable .sort-indicator:before{margin-top:2px;border-bottom:none;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000}.ng-table th.sortable .sort-indicator:hover:after,.ng-table th.sortable .sort-indicator:hover:before{opacity:1;visibility:visible}.ng-table th.sortable.sort-asc,.ng-table th.sortable.sort-desc{background-color:rgba(141,192,219,.25);text-shadow:0 1px 1px hsla(0,0%,100%,.75)}.ng-table th.sortable.sort-asc .sort-indicator:after,.ng-table th.sortable.sort-desc .sort-indicator:after{margin-top:-2px}.ng-table th.sortable.sort-asc .sort-indicator:before,.ng-table th.sortable.sort-desc .sort-indicator:before{visibility:hidden}.ng-table th.sortable.sort-asc .sort-indicator:after,.ng-table th.sortable.sort-asc .sort-indicator:hover:after,.ng-table th.sortable.sort-desc .sort-indicator:after{visibility:visible;filter:alpha(opacity=60);-khtml-opacity:.6;-moz-opacity:.6;opacity:.6}.ng-table th.sortable.sort-desc .sort-indicator:after{border-bottom:none;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000;box-shadow:none}.ng-table th.filter .input-filter{margin:0;display:block;width:100%;min-height:30px;box-sizing:border-box}.ng-table .ng-table-group-header th{text-align:left}.ng-table .ng-table-group-selector{display:block}.ng-table .ng-table-group-close,.ng-table .ng-table-group-toggle{float:right}.ng-table .ng-table-group-toggle{margin-right:5px}@media only screen and (max-width:800px){.ng-table-responsive{border-bottom:1px solid #999}.ng-table-responsive tr{border-top:1px solid #999;border-left:1px solid #999;border-right:1px solid #999}.ng-table-responsive td:before{position:absolute;padding:8px;left:0;top:0;width:50%;white-space:nowrap;text-align:left;font-weight:700}.ng-table-responsive thead tr th{text-align:left}.ng-table-responsive thead tr.ng-table-filters th{padding:0}.ng-table-responsive thead tr.ng-table-filters th form>div{padding:8px}.ng-table-responsive td{border:none;border-bottom:1px solid #eee;position:relative;padding-left:50%;white-space:normal;text-align:left}.ng-table-responsive td:before{content:attr(data-title-text)}.ng-table-responsive,.ng-table-responsive tbody,.ng-table-responsive td,.ng-table-responsive th,.ng-table-responsive thead,.ng-table-responsive tr{display:block}}.ng-table-pagination{margin-top:0}.filter:after,.filter:before,.ng-table-group-selector:after,.ng-table-group-selector:before{display:table;content:" "}.filter:after,.ng-table-group-selector:after{clear:both}.filter>.filter-cell{float:left;box-sizing:border-box}.filter-horizontal>.filter-cell{padding:0 2px}.filter-horizontal>.filter-cell:first-child{padding-left:0}.filter-horizontal>.filter-cell.last,.filter-horizontal>.filter-cell:last-child{padding-right:0}.s12{width:100%}.s11{width:91.66666666666666%}.s10{width:83.33333333333334%}.s9{width:75%}.s8{width:66.66666666666666%}.s7{width:58.333333333333336%}.s6{width:50%}.s5{width:41.66666666666667%}.s4{width:33.33333333333333%}.s3{width:25%}.s2{width:16.666666666666664%}.s1{width:8.333333333333332%}@media all and (max-width:468px){.s1,.s2,.s3,.s4,.s5,.s6,.s7,.s8,.s9,.s10,.s11,.s12{width:100%}.filter>.filter-cell{padding:0}}
+/*# sourceMappingURL=ng-table.min.css.map*/ \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/css/ngict-component.css b/common/src/main/webapp/thirdparty/css/ngict-component.css
new file mode 100644
index 0000000..7053904
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/ngict-component.css
@@ -0,0 +1,789 @@
+/**
+ * Copyright 2016, CMCC Technologies Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+body {
+ color: #333;
+ font-size: 14px;
+ font-family: "Microsoft yahei", Arial !important;
+ background-color: transparent;
+}
+
+/*fontIcon*/
+
+[class^="ict-"],
+[class*=" ict-"] {
+ padding-right: 3px;
+}
+
+/*common color*/
+
+.blue1 {
+ background-color: #5b9bd1;
+ color: #fff;
+}
+
+.blue1:hover {
+ background-color: #487ca9;
+ color: #fff;
+}
+
+.blue2 {
+ background-color: #57b5e3;
+ color: #fff;
+}
+
+.blue2:hover {
+ background-color: #43a1cf;
+ color: #fff;
+}
+
+.red {
+ background-color: #e35b5a;
+ color: #fff;
+}
+
+.red:hover {
+ background-color: #d45150;
+ color: #fff;
+}
+
+.green {
+ background-color: #44b6ae;
+ color: #fff;
+}
+
+.green:hover {
+ background-color: #329d96;
+ color: #fff;
+}
+
+.gold {
+ background-color: #c0af69;
+ color: #fff;
+}
+
+.gold:hover {
+ background-color: #ad9a4d;
+ color: #fff;
+}
+
+.grey {
+ background-color: #e5e5e5;
+ color: #333;
+}
+
+.grey:hover {
+ background-color: #d8d8d8;
+ color: #333;
+}
+
+.dark_grey {
+ background-color: #333;
+ color: #fff;
+}
+
+.dark_grey:hover {
+ background-color: #101010;
+ color: #fff;
+}
+
+.white {
+ background-color: #fff;
+ border: 1px solid #ddd;
+ color: #333;
+}
+
+.white:hover {
+ background-color: #e5e5e5;
+ color: #333;
+}
+
+/***
+Responsive & Scrollable Tables
+***/
+
+.table-scrollable {
+ width: 100%;
+ overflow-x: auto;
+ overflow-y: hidden;
+ border: 1px solid #dddddd;
+}
+
+.table-scrollable > .table {
+ width: 100% !important;
+ margin: 0 !important;
+ margin-bottom: 0;
+ background-color: #fff;
+}
+
+.table-scrollable > .table > thead > tr > th,
+.table-scrollable > .table > tbody > tr > th,
+.table-scrollable > .table > tfoot > tr > th,
+.table-scrollable > .table > thead > tr > td,
+.table-scrollable > .table > tbody > tr > td,
+.table-scrollable > .table > tfoot > tr > td {
+ white-space: nowrap;
+}
+
+.table-scrollable > .table-bordered {
+ border: 0;
+}
+
+.table-scrollable > .table-bordered > thead > tr > th:first-child,
+.table-scrollable > .table-bordered > tbody > tr > th:first-child,
+.table-scrollable > .table-bordered > tfoot > tr > th:first-child,
+.table-scrollable > .table-bordered > thead > tr > td:first-child,
+.table-scrollable > .table-bordered > tbody > tr > td:first-child,
+.table-scrollable > .table-bordered > tfoot > tr > td:first-child {
+ border-left: 0;
+}
+
+.table-scrollable > .table-bordered > thead > tr > th:last-child,
+.table-scrollable > .table-bordered > tbody > tr > th:last-child,
+.table-scrollable > .table-bordered > tfoot > tr > th:last-child,
+.table-scrollable > .table-bordered > thead > tr > td:last-child,
+.table-scrollable > .table-bordered > tbody > tr > td:last-child,
+.table-scrollable > .table-bordered > tfoot > tr > td:last-child {
+ border-right: 0;
+}
+
+.table-scrollable > .table-bordered > thead > tr:last-child > th,
+.table-scrollable > .table-bordered > tbody > tr:last-child > th,
+.table-scrollable > .table-bordered > tfoot > tr:last-child > th,
+.table-scrollable > .table-bordered > thead > tr:last-child > td,
+.table-scrollable > .table-bordered > tbody > tr:last-child > td,
+.table-scrollable > .table-bordered > tfoot > tr:last-child > td {
+ border-bottom: 0;
+}
+
+/*form*/
+
+.form {
+ padding: 0 !important;
+}
+
+.form-group .multiRow {
+ margin-bottom: 15px;
+}
+
+.form-group,
+.form-group .btn {
+ font-size: 12px;
+}
+
+.form-body {
+ padding: 10px;
+}
+
+.form-actions {
+ padding-top: 20px
+}
+
+.form-actions.nobg {
+ background-color: transparent;
+}
+
+.form-actions.top {
+ margin-top: 0;
+ margin-bottom: 20px;
+ border-top: 0;
+ border-bottom: 1px solid #e5e5e5;
+}
+
+/*.form-actions.fluid {
+ padding: 20px 0;
+}*/
+
+.form-actions .btnGroup {
+ padding-left: 0;
+}
+
+.form-actions.fluid > [class^="col-"] {
+ padding-left: 13px;
+}
+
+.form-actions:before,
+.form-actions:after {
+ display: table;
+ line-height: 0;
+ content: "";
+}
+
+.form-actions:after {
+ clear: both;
+}
+
+.form-section {
+ margin: 30px 0px 25px 0px;
+ padding-bottom: 5px;
+ border-bottom: 1px solid #eee;
+}
+
+.form .form-section:first-child {
+ margin-top: 5px;
+}
+
+.help-inline {
+ font-size: 13px;
+ color: #737373;
+ display: inline-block;
+ padding: 5px;
+}
+
+.submBtn {
+ text-align: center;
+}
+.subm-iconMargin {
+margin-left:-40px;
+}
+.subm-margin {
+margin-left:-40px;
+}
+
+/* left, right aligned form actions */
+
+.form-actions.right {
+ padding-left: 0;
+ padding-right: 10px;
+ text-align: right;
+}
+
+.form-actions.left {
+ padding-left: 10px;
+ padding-right: 0;
+ text-align: left;
+}
+
+/* Checkbox */
+
+.form-group .checkbox {
+ padding-left: 0;
+}
+
+.form-title {
+ padding: 8px;
+ margin-bottom: 25px;
+ border-left: 2px solid #5b9bd1;
+ color: #1A78CA;
+ font-size: 16px;
+}
+
+.checkbox-list > label {
+ display: block;
+}
+
+.checkbox-list > label.checkbox-inline {
+ display: inline-block;
+}
+
+.checkbox-list > label.checkbox-inline:first-child {
+ padding-left: 0;
+}
+
+/* Radios */
+input[type="radio"]{
+ cursor:pointer
+}
+.radio-list > label {
+ display: block;
+}
+
+.radio-list > label.radio-inline {
+ display: inline-block;
+}
+
+.radio-list > label.radio-inline:first-child {
+ padding-left: 0;
+}
+
+.form-horizontal .radio-list .radio {
+ padding-top: 1px;
+}
+
+.form-horizontal .radio-list > label {
+ margin-bottom: 0;
+}
+
+.form-horizontal .radio > span {
+ margin-top: 2px;
+}
+
+.help-block {
+ margin-top: 5px;
+ margin-bottom: 5px;
+ color: #a94442 !important;
+}
+
+.form-inline input {
+ margin-bottom: 0px !important;
+}
+.form-horizontal .control-label{
+ padding-top:4px;
+ text-align:right;
+}
+
+.form-control-static {
+ font-size: 14px;
+ padding-top: 7px;
+}
+
+.control-label .required {
+ color: #e02222;
+ font-size: 12px;
+ padding-left: 2px;
+}
+
+/*TAB*/
+
+.nav-tabs {
+ border: 0;
+ font-weight: bold;
+}
+
+.nav-tabs > li.active > a,
+.nav-tabs > li.active > a:hover,
+.nav-tabs > li.active > a:focus {
+ border: 0;
+ border-top: 3px solid #F3565D;
+}
+
+.nav-tabs > li > a {
+ border-radius: 0;
+ font-weight: bold;
+}
+
+.nav-tabs > li > a:hover {
+ background-color: #f1f3fa;
+ border: 1Px solid #f1f3fa;
+}
+
+/*button*/
+
+.btn {
+ min-width: 80px;
+ letter-spacing: 1px;
+}
+
+.btnGroup .btn {
+ margin-right: 15px;
+}
+
+.pagination-panel .btn {
+ min-width: 4px;
+}
+
+.btn.dropdown-toggle,
+.btn-group .btn.dropdown-toggle,
+.btn:hover,
+.btn:disabled,
+.btn[disabled],
+.btn:focus,
+.btn:active,
+.btn.active {
+ outline: none !important;
+ background-image: none !important;
+ filter: none;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+ text-shadow: none;
+}
+.btn-xs:hover{
+text-decoration:none ;
+}
+/*radius*/
+
+.radius_l {
+ border-radius: 20px;
+}
+
+.radius_m {
+ border-radius: 8px;
+}
+
+.radius_s {
+ border-radius: 3px;
+}
+
+/*Progress Bars*/
+
+.progress {
+ border: 0;
+ background-image: none !important;
+ filter: none !important;
+ -webkit-box-shadow: none !important;
+ -moz-box-shadow: none !important;
+ box-shadow: none !important;
+}
+
+.form-wizard .steps > li.active > a.step .number {
+ background-color: #45B6AF
+}
+
+.progress > .progress-bar-success {
+ background-color: #45B6AF
+}
+
+/*label*/
+
+.label,
+label {
+ font-weight: 400;
+ /*margin-bottom:15px;*/
+}
+
+/*表å•ä¸­çš„组åˆ*/
+
+.input-group-btn-vertical.fa {
+ font-size: 12px;
+}
+
+.spinner {
+ width: 60px;
+ margin-left: 10px;
+ margin-right: 30px;
+}
+
+.spinner input {
+ text-align: right;
+}
+
+.input-group-btn-vertical {
+ position: relative;
+ white-space: nowrap;
+ width: 1%;
+ vertical-align: middle;
+ display: table-cell;
+}
+
+.input-group-btn-vertical > .btn {
+ display: block;
+ float: none;
+ width: 100%;
+ max-width: 100%;
+ padding: 6px;
+ margin-left: -1px;
+ position: relative;
+ border-radius: 0;
+}
+
+.input-group-btn-vertical > .btn {
+ min-width: 20px;
+}
+
+.input-group-btn-vertical > .btn:first-child {
+ border-top-right-radius: 4px;
+}
+
+.input-group-btn-vertical > .btn:last-child {
+ margin-top: -2px;
+ border-bottom-right-radius: 4px;
+}
+
+.input-group-btn-vertical i {
+ position: absolute;
+ top: -2px;
+ left: 5px;
+}
+
+.input-group .form-control {
+ height: 26px !important;
+}
+
+/*separator & title*/
+
+.separator-line {
+ height: 1px;
+ width: 100%;
+ background: #ddd;
+ overflow: hidden;
+ margin-bottom: 15px;
+ margin-top: 6px;
+ opacity: 0.6;
+}
+
+.separator {
+ opacity: 0.7;
+}
+
+.separator:hover {
+ opacity: 1;
+}
+
+.titlefont {
+ font-size: 16px;
+ margin-top:15px;
+}
+
+/*link*/
+
+a {
+ color: #428bca;
+ text-decoration: none ;
+ cursor:pointer;
+}
+a:hover{
+ text-decoration: underline;
+}
+/*html滑å—组件*/
+
+input[type="range"] {
+ margin-top: 2px;
+ background-color: #f0f3f9;
+ border: 1px solid #ccd6e8;
+ border-radius: 15px;
+ width: 400px;
+ -webkit-appearance: none;
+ height: 15px;
+}
+
+input[type="range"]::-webkit-slider-thumb {
+ -webkit-appearance: none;
+ cursor: pointer;
+ top: -5px;
+ height: 28px;
+ width: 15px;
+ transform: translateY(-4px);
+ background: none repeat scroll 0 0 #f0f3f9;
+ background-color: #9cc2cb;
+ border-radius: 20px;
+}
+
+input[type="range"]:focus {
+ outline: none;
+}
+
+/*ztree*/
+
+.ztree * {
+ font-family: "microsoft yahei";
+ font-size: 12px;
+}
+
+.ztree {
+ padding: 15px 30px 0 5px;
+}
+
+.ztree li a.curSelectedNode {
+ height: 28px;
+}
+
+.ztree li span {
+ line-height: 16px;
+ margin-right: 2px;
+ margin-left: 6px
+}
+
+.ztree li span.button.chk {
+ width: 13px;
+ height: 13px;
+ margin-left: 10px;
+ cursor: auto
+}
+
+.ztree li span.button.add {
+ margin-left: 2px;
+ /* margin-right: -1px; */
+
+ margin-right: 4px;
+ background-position: -144px 0;
+ vertical-align: top;
+ *vertical-align: middle;
+ float: right;
+}
+
+.ztree li span.button.edit {
+ margin-right: 4px;
+ background-position: -110px -48px;
+ vertical-align: top;
+ *vertical-align: middle;
+ float: right;
+}
+
+.ztree li span.button.remove {
+ margin-right: 4px;
+ background-position: -110px -64px;
+ vertical-align: top;
+ *vertical-align: middle;
+ float: right;
+}
+
+.ztree-select .ztree li a {
+ border: 1px solid #fff !important;
+}
+
+/*table*/
+
+table,
+.dataTables_length,
+.dataTables_info,
+.dataTables_paginate {
+ font-size: 12px;
+}
+
+table .heading {
+ font-size: 14px;
+ background: #fff !important;
+}
+
+table.dataTable tbody th,
+table.dataTable tbody td {
+ padding: 8px 10px 4px 10px !important;
+}
+
+table tr:nth-of-type(odd) {
+ background: #f9f9f9;
+}
+
+table tr:nth-of-type(even) {
+ background: #fff;
+}
+
+table td:hover {
+ background-color: #f5f5f5;
+ border-bottom: 1px solid #d0d0d0;
+ border-top: 1px solid #d0d0d0;
+}
+
+table tr td label {
+ cursor: pointer;
+}
+
+.table-btn span {
+ padding-left: 5px;
+ padding-right: 5px;
+}
+.table-bordered>thead>tr>th, .table-bordered>thead>tr>td{
+border-bottom-width:1px;
+}
+/*select-box with icon*/
+
+.iconselect-box .col-xs-1 {
+ width: 15px;
+ padding: 110px 0 0 0;
+}
+
+.iconPosition > div {
+ margin: 20px 0px 0px 0px;
+}
+
+/*-------------C3.css-------------*/
+.c3 path, .c3 line {
+ stroke: #008acd;
+}
+
+.c3-line {
+ stroke-width: 3px;
+}
+
+.c3-tooltip {
+ width: auto;
+}
+
+.c3-tooltip td {
+ color: #000;
+}
+
+.c3-axis.c3-axis-y {
+ stroke-width: 1px;
+}
+
+.c3-axis.c3-axis-x {
+ stroke-width: 1px;
+}
+
+/*checkbox & radio*/
+input[type="checkbox"] {
+ -webkit-appearance: none;
+ background: #fff url(../images/checkbox-radio/checkbox-init.png);
+ height: 18px;
+ vertical-align: middle;
+ width: 18px;
+ margin-bottom:5px;
+ margin-right:5px;
+}
+
+input[type="checkbox"]:checked {
+ -webkit-appearance: none;
+ background: #fff url(../images/checkbox-radio/checkbox-checked.png);
+ height: 18px;
+ vertical-align: middle;
+ width: 18px;
+}
+
+input[type="checkbox"]:focus,
+input[type="checkbox"]:hover {
+ outline: none;
+}
+
+input[type="checkbox"][disabled] {
+ -webkit-appearance: none;
+ background: #fff url(../images/checkbox-radio/checkbox-disabled.png);
+ height: 18px;
+ vertical-align: middle;
+ width: 18px;
+ margin-bottom:5px;
+ margin-right:5px;
+}
+
+input[type="checkbox"][disabled]:checked {
+ -webkit-appearance: none;
+ background: #fff url(../images/checkbox-radio/checkbox-checked-disabled.png);
+ height: 18px;
+ vertical-align: middle;
+ width: 18px;
+}
+
+input[type="radio"] {
+ -webkit-appearance: none;
+ background: #fff url(../images/checkbox-radio/radio-init.png);
+ height: 18px;
+ vertical-align: middle;
+ width: 18px;
+ margin-bottom:5px;
+ margin-right:5px;
+}
+
+input[type="radio"]:checked {
+ -webkit-appearance: none;
+ background: #fff url(../images/checkbox-radio/radio-checked.png);
+ height: 18px;
+ vertical-align: middle;
+ width: 18px;
+}
+
+input[type="radio"]:focus,
+input[type="radio"]:hover {
+ outline: none;
+}
+
+input[type="radio"][disabled] {
+ -webkit-appearance: none;
+ background: #fff url(../images/checkbox-radio/radio-disabled.png);
+ height: 18px;
+ vertical-align: middle;
+ width: 18px;
+ margin-bottom:5px;
+ margin-right:5px;
+}
+
+input[type="radio"][disabled]:checked {
+ -webkit-appearance: none;
+ background: #fff url(../images/checkbox-radio/radio-checked-disabled.png);
+ height: 18px;
+ vertical-align: middle;
+ width: 18px;
+}
diff --git a/common/src/main/webapp/thirdparty/css/plugins.css b/common/src/main/webapp/thirdparty/css/plugins.css
new file mode 100644
index 0000000..0abc096
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/plugins.css
@@ -0,0 +1,1561 @@
+/**
+ * Copyright 2016, CMCC Technologies Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**************************
+ PLUGIN CSS CUSTOMIZATIONS
+**************************/
+
+/***
+Calendar with full calendar
+***/
+.external-event {
+ display: inline-block ;
+ cursor:move;
+ margin-bottom: 5px ;
+ margin-left: 5px ;
+}
+
+.portlet .event-form-title {
+ font-size: 14px;
+ margin-top: 4px;
+ font-weight: 400;
+ margin-bottom: 10px;
+}
+
+.portlet.calendar .fc-button {
+ -webkit-box-shadow: none ;
+ -moz-box-shadow: none ;
+ box-shadow: none ;
+ text-shadow: none;
+ border: 0 ;
+ padding: 6px 8px 30px 8px ;
+ margin-left:2px;
+ border-top-style: none;
+ border-bottom-style: none;
+ border-right-style: solid;
+ border-left-style: solid;
+ border-color: #ddd;
+ background: transparent;
+ color: #fff;
+ top: -46px;
+}
+
+.portlet.calendar .fc-header {
+ margin-bottom:-21px;
+}
+
+.portlet.calendar .fc-button-prev {
+ padding-right: 10px;
+ padding-left: 8px;
+}
+
+.portlet.calendar .fc-button-next {
+ padding-right: 8px;
+ padding-left: 10px;
+}
+
+.portlet.calendar .fc-button.fc-state-active,
+.portlet.calendar .fc-button.fc-state-hover {
+ color: #666 ;
+ background-color: #F9F9F9 ;
+}
+
+.portlet.calendar .fc-button.fc-state-disabled {
+ color: #ddd ;
+}
+
+.portlet.calendar .fc-text-arrow {
+ font-size: 22px;
+ font-family: "Courier New", Courier, monospace;
+ vertical-align: baseline;
+}
+
+/* begin: event element */
+.portlet.calendar .fc-event {
+ border: 0px;
+ background-color: #69a4e0;
+ color: #fff;
+}
+
+.portlet.calendar .fc-event-inner {
+ border: 0px;
+}
+
+.portlet.calendar .fc-event-time {
+ float: left;
+ text-align: left;
+ color: #fff;
+ font-size: 13px;
+ font-weight: 300;
+}
+
+.portlet.calendar .fc-event-title {
+ text-align: left;
+ float: left;
+ color: #fff;
+ font-size: 13px;
+ font-weight: 300;
+}
+/* end: event element */
+
+.portlet.calendar .fc-header-title h2 {
+ font-size: 14px ;
+ line-height: 20px;
+ font-weight: 400;
+ color: #111;
+}
+
+.portlet.calendar .fc-widget-header {
+ background-image: none ;
+ filter:none;
+ background-color: #eee ;
+ text-transform: uppercase;
+ font-weight: 300;
+}
+
+.portlet.calendar .mobile .fc-button {
+ margin-left: 2px ;
+}
+
+.portlet.calendar .mobile .fc-button {
+ padding: 0px 6px 20px 6px ;
+ margin-left:2px ;
+ border: 0;
+ background-color: #ddd ;
+ background-image: none;
+ -webkit-box-shadow: none ;
+ -moz-box-shadow: none ;
+ box-shadow: none ;
+ -webkit-border-radius: 0 ;
+ -moz-border-radius: 0 ;
+ border-radius: 0 ;
+ color: #000;
+ text-shadow: none ;
+ text-align: center;
+}
+
+.portlet.calendar .mobile .fc-state-hover,
+.portlet.calendar .mobile .fc-state-active {
+ background-color: #eee ;
+}
+
+.portlet.calendar .mobile .fc-button-prev {
+ margin-right: 5px;
+ margin-top: -2px;
+}
+
+.portlet.calendar .mobile .fc-button-next {
+ margin-right: -0px;
+ margin-top: -2px;
+}
+
+.portlet.calendar .mobile .fc-header-space {
+ margin: 0px ;
+ padding: 0px ;
+ width: 0px ;
+}
+
+ .portlet.calendar .mobile .fc-state-disabled {
+ color: #bbb ;
+ }
+
+ .portlet.calendar .mobile .fc-header-left {
+ position: absolute;
+ z-index: 10;
+ }
+
+ .portlet.calendar .mobile .fc-header-right {
+ position: absolute;
+ z-index: 9;
+ }
+
+ .portlet.calendar .mobile .fc-header-left .fc-button {
+ top: -2px ;
+ }
+
+ .portlet.calendar .mobile .fc-header-right {
+ position: relative;
+ right:0;
+ }
+
+ .portlet.calendar .mobile .fc-header-right .fc-button {
+ top: 35px ;
+ }
+
+ .portlet.calendar .mobile .fc-content {
+ margin-top: 53px;
+ }
+
+
+/***
+Form wizard
+***/
+
+.form-wizard .progress {
+ margin-bottom: 30px;
+}
+
+.form-wizard .steps {
+ //padding: 10px 0;
+ //margin-bottom: 15px;
+}
+
+.form-wizard .steps {
+ background-color: #fff ;
+ background-image: none ;
+ filter:none ;
+ border: 0px;
+ box-shadow: none ;
+}
+
+.form-wizard .steps li a {
+ background-color: #fff ;
+ background-image: none ;
+ filter:none;
+ border: 0px;
+ box-shadow: none ;
+}
+
+.form-wizard .steps li a:hover {
+ background: none;
+}
+
+.form-wizard .step:hover {
+ text-decoration: none;
+}
+
+.form-wizard .step .number {
+ background-color: #eee;
+ display: inline-block;
+ text-align: center !important;
+ font-size: 16px;
+ font-weight: 300;
+ padding: 11px 15px 13px 15px;
+ margin-right: 10px;
+ height: 45px;
+ width: 45px;
+ -webkit-border-radius: 50% !important;
+ -moz-border-radius: 50% !important;
+ border-radius: 50% !important;
+}
+
+.form-wizard .step .desc {
+ display: inline-block;
+ font-size: 16px;
+ font-weight: 300;
+}
+
+.form-wizard .active .step .number {
+ background-color: #35aa47;
+ color: #fff;
+}
+
+.form-wizard .active .step .desc {
+ color: #333;
+ font-weight: 400;
+}
+
+.form-wizard .step i {
+ display: none;
+}
+
+.form-wizard .done .step .number {
+ background-color: #f2ae43;
+ color: #fff;
+}
+
+.form-wizard .done .step .desc {
+ font-weight: 400;
+}
+
+.form-wizard .done .step i {
+ font-size: 12px;
+ font-weight: normal;
+ color: #999;
+ display: inline-block;
+}
+
+
+@media (min-width: 600px) and (max-width: 1280px) {
+ .form-wizard .step .desc {
+ margin-top: 10px;
+ display: block;
+ }
+}
+
+@media (max-width: 600px) {
+ .form-wizard .steps > li > a {
+ text-align: left;
+ }
+}
+
+@media (min-width: 600px){
+ .nav-justified>li{
+ display:table-cell;
+ width:1%;
+ }
+}
+
+/***
+Google Maps
+***/
+.gmaps {
+ height: 300px;
+ width: 100%;
+}
+
+/* important! bootstrap sets max-width on img to 100% which conflicts with google map canvas*/
+.gmaps img {
+ max-width: none;
+}
+
+#gmap_static div{
+ background-repeat: no-repeat ;
+ background-position: 50% 50% ;
+ height:100%;
+ display:block;
+ height: 300px;
+}
+
+#gmap_routes_instructions {
+ margin-top: 10px;
+ margin-bottom: 0px;
+}
+
+/***
+SlimScrollBar plugins css changes
+***/
+.scroller {
+ padding: 0px ;
+ margin: 0px ;
+ padding-right: 12px ;
+ overflow: hidden;
+}
+
+.scroller-footer {
+ margin-top: 10px;
+}
+
+.scroller-footer:after,
+.scroller-footer:before {
+ content: "";
+ display: table;
+ line-height: 0;
+}
+
+.scroller-footer:after {
+ clear: both;
+}
+
+.portlet-body .slimScrollBar {
+ margin-right: 0px ;
+}
+
+/***
+jqvmap changes
+***/
+.jqvmap-zoomin {
+ height: 16px;
+ width: 16px;
+ background-color: #666 ;
+}
+
+.jqvmap-zoomout {
+ height: 16px;
+ width: 16px;
+ background-color: #666 ;
+}
+
+.vmaps {
+ position: relative;
+ overflow: hidden;
+ height: 300px;
+}
+
+
+/***
+Error state for WYSIWYG Editors
+***/
+.has-error .md-editor,
+.has-error .wysihtml5-sandbox,
+.has-error .cke {
+ border: 1px solid #B94A48 !important;
+}
+
+.has-success .md-editor,
+.has-success .wysihtml5-sandbox,
+.has-success .cke {
+ border: 1px solid #468847 !important;
+}
+
+/***
+Select2 plugin css changes
+***/
+
+/* enable form validation classes for select2 dropdowns */
+.has-error .select2-container .select2-choice {
+ border-color: #B94A48;
+}
+
+.has-error .select2-container.select2-dropdown-open .select2-choice {
+ border-color: #e5e5e5;
+}
+
+.has-error .select2-container.select2-dropdown-open .select2-choice > span {
+ color: #999999;
+}
+
+.has-success .select2-container .select2-choice {
+ border-color: #468847;
+}
+
+.has-success .select2-container.select2-dropdown-open .select2-choice {
+ border-color: #e5e5e5;
+}
+
+.has-success .select2-container.select2-dropdown-open .select2-choice > span {
+ color: #999999;
+}
+
+
+/***
+Jansy File Input plugin css changes
+***/
+.fileinput {
+ margin-bottom: 0;
+}
+
+
+/***
+WYSIWYG
+***/
+.wysihtml5-toolbar li {
+ margin: 0px;
+ height: 29px;
+}
+
+.wysihtml5-toolbar li .dropdown-menu {
+ margin-top: 5px;
+}
+
+/***
+CKEditor css changes
+***/
+.cke_bottom,
+.cke_inner,
+.cke_top,
+.cke_reset,
+.cke_dialog_title,
+.cke_dialog_footer,
+.cke_dialog {
+ background-image: none !important;
+ filter:none ;
+ border-top: 0 ;
+ border-bottom: 0 ;
+ -webkit-box-shadow: none !important;
+ -moz-box-shadow: none !important;
+ box-shadow: none !important;
+ text-shadow:none ;
+}
+
+.cke_dialog_ui_button,
+.cke_dialog_tab {
+ background-image: none !important;
+ filter:none ;
+ -webkit-box-shadow: none !important;
+ -moz-box-shadow: none !important;
+ box-shadow: none !important;
+ text-shadow:none !important;
+}
+
+.cke_dialog_ui_button:hover,
+.cke_dialog_tab:hover {
+ text-decoration: none;
+ text-shadow:none ;
+}
+
+.cke_dialog_ui_input_text {
+ background-image: none !important;
+ filter:none ;
+ -webkit-box-shadow: none !important;
+ -moz-box-shadow: none !important;
+ box-shadow: none !important;
+}
+
+.cke_combo_button,
+.cke_button,
+.cke_toolbar,
+.cke_toolgroup {
+ background-image: none !important;
+ filter:none !important;
+ border: 0 ;
+ -webkit-box-shadow: none !important;
+ -moz-box-shadow: none !important;
+ box-shadow: none !important;
+}
+
+.cke_button,
+.cke_combo_button,
+.cke_panel_grouptitle,
+.cke_hc.cke_panel_listItem a {
+ background-image: none !important;
+ filter:none ;
+ text-shadow:none ;
+ -webkit-border-radius: 0px !important;
+ -moz-border-radius: 0px !important;
+ -ms-border-radius: 0px !important;
+ -o-border-radius: 0px !important;
+}
+
+.cke_button:hover,
+.cke_combo_button:hover {
+ background-color: #ddd;
+}
+
+.cke_toolbar_break {
+ background-image: none !important;
+ filter:none !important;
+ border: 0 ;
+ box-shadow: none !important;
+ -webkit-box-shadow : none !important;
+ -moz-box-shadow: none !important;
+ -ms-box-shadow: none !important;
+ -o-box-shadow: none !important;
+}
+
+/***
+Modify tags input plugin css
+***/
+div.tagsinput {
+ min-height: 35px;
+ height: auto !important;
+ margin: 0;
+ padding: 5px 5px 0px 5px;
+ overflow: auto;
+}
+
+div.tagsinput span.tag {
+ background: #aaa ;
+ color: #fff ;
+ border: 0 ;
+ padding: 3px 6px;
+ margin-top: 0;
+ margin-bottom: 5px;
+}
+
+div.tagsinput input {
+ padding: 3px 6px ;
+ width: 75px !important;
+}
+
+div.tagsinput span.tag a {
+ color: #fff ;
+}
+
+div.tagsinput .not_valid {
+ color: #fff ;
+ padding: 3px 6px ;
+ background-color: #e02222 ;
+}
+
+/***
+Gritter notification modify
+***/
+
+#gritter-notice-wrapper {
+ right:1px !important;
+}
+
+.gritter-close {
+ left:auto !important;
+ right: 3px !important;
+}
+
+.gritter-title {
+ font-family: 'Open Sans' ;
+ font-size: 18px ;
+ font-weight: 300 ;
+}
+
+/***
+jQuery UI Sliders(new in v1.1.1)
+***/
+.slider {
+ border: 0;
+ padding: 0;
+ display: block;
+ margin: 12px 5px;
+ min-height: 11px;
+}
+
+.ui-slider-vertical {
+ width: 11px;
+}
+
+.ui-slider-horizontal .ui-slider-handle {
+ top: -3px;
+}
+
+.ui-slider-vertical .ui-slider-handle {
+ left: -3px;
+}
+
+.ui-slider-vertical,
+.ui-slider-handle {
+ filter: none !important;
+ background-image: none !important;
+}
+
+/***
+Dropzone css changes(new in v1.1.1)
+***/
+.dropzone {
+ -webkit-border-radius: 0px ;
+ -moz-border-radius: 0px ;
+ border-radius: 0px ;
+}
+
+
+/***
+Dashboard Charts(new in v1.2.1)
+***/
+.easy-pie-chart,
+.sparkline-chart {
+ text-align: center;
+}
+
+.sparkline-chart {
+ margin-top: 15px;
+ position:relative ;
+}
+
+.easy-pie-chart .number {
+ font-size: 16px;
+ font-weight: 300;
+ width: 85px;
+ margin: 0 auto;
+}
+
+.sparkline-chart .number {
+ width: 100px;
+ margin: 0 auto;
+ margin-bottom: 10px;
+}
+
+.sparkline-chart .title,
+.easy-pie-chart .title {
+ display: block;
+ text-align: center;
+ color: #333;
+ font-weight: 300;
+ font-size: 16px;
+ margin-top: 5px;
+ margin-bottom: 10px;
+}
+
+.sparkline-chart .title:hover,
+.easy-pie-chart .title:hover {
+ color: #666;
+ text-decoration: none;
+}
+
+.sparkline-chart .title > i,
+.easy-pie-chart .title > i {
+ margin-top: 5px;
+}
+
+/***
+Fancy box fix overlay fix(in v1.2.4)
+***/
+.fancybox-overlay {
+ z-index: 10000 ;
+}
+
+/***
+Datatables Plugin(in v1.3)
+***/
+.dataTable {
+ width: 100% !important;
+ clear: both;
+ /*margin-top: 5px;*/
+}
+
+.dataTables_filter label {
+ line-height: 32px ;
+}
+
+.dataTable .row-details {
+ margin-top: 3px;
+ display: inline-block;
+ cursor: pointer;
+ width: 14px;
+ height: 14px;
+}
+
+.dataTable .row-details.row-details-close {
+ background: url("../image/datatable-row-openclose.png") no-repeat 0 0;
+}
+
+.dataTable .row-details.row-details-open {
+ background: url("../image/datatable-row-openclose.png") no-repeat 0 -23px ;
+}
+
+.dataTable .details {
+ background-color: #eee ;
+}
+
+.dataTable .details td,
+.dataTable .details th {
+ padding: 4px;
+ background: none ;
+ border: 0;
+}
+
+.dataTable .details tr:hover td,
+.dataTable .details tr:hover th {
+ background: none ;
+}
+
+.dataTable .details tr:nth-child(odd) td,
+.dataTable .details tr:nth-child(odd) th {
+ background-color: #fff ;
+}
+
+.dataTable .details tr:nth-child(even) td,
+.dataTable .details tr:nth-child(even) th {
+ background-color: #eee ;
+}
+
+.dataTable > thead > tr > th.sorting,
+.dataTable > thead > tr > th.sorting_asc,
+.dataTable > thead > tr > th.sorting_desc {
+ padding-right: 18px;
+}
+
+.dataTable .table-checkbox {
+ width: 8px !important;
+}
+
+@media (max-width: 768px) {
+ .dataTables_wrapper .dataTables_length .form-control,
+ .dataTables_wrapper .dataTables_filter .form-control {
+ display: inline-block;
+ }
+
+ /* .dataTables_wrapper .dataTables_info {
+ top: 17px;
+ }*/
+
+/* .dataTables_wrapper .dataTables_paginate {
+ margin-top: -15px;
+ }*/
+}
+
+@media (max-width: 480px) {
+ .dataTables_wrapper .dataTables_filter .form-control {
+ width: 175px !important;
+ }
+
+ .dataTables_wrapper .dataTables_paginate {
+ float: left;
+ margin-top: 20px;
+ }
+}
+
+.dataTables_processing {
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ min-width: 125px;
+ margin-left: 0;
+ padding: 7px;
+ text-align: center;
+ color: #333;
+ font-size: 13px;
+ border: 1px solid #ddd;
+ background-color: #eee;
+ vertical-align: middle;
+ -webkit-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
+ -moz-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
+ box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
+}
+
+.dataTables_processing span {
+ line-height:15px;
+ vertical-align: middle;
+}
+
+.dataTables_empty {
+ text-align: center;
+}
+
+/***
+Extended Datatable
+***/
+.dataTables_extended_wrapper {
+ position: relative !important;
+ clear: both !important;
+}
+.dataTables_extended_wrapper .seperator {
+ padding: 0 2px;
+}
+
+.dataTables_extended_wrapper .dataTables_paginate,
+.dataTables_extended_wrapper .dataTables_length,
+.dataTables_extended_wrapper .dataTables_info {
+ display: inline-block;
+ float: none !important;
+ padding: 0 !important;
+ margin: 0 !important;
+ position: static !important;
+ font-size: 13px;
+}
+
+@media (max-width: 480px) {
+
+ .dataTables_extended_wrapper .dataTables_paginate,
+ .dataTables_extended_wrapper .dataTables_length,
+ .dataTables_extended_wrapper .dataTables_info {
+ display: block;
+ margin-bottom: 10px !important;
+ }
+
+ .dataTables_extended_wrapper .seperator {
+ display: none;
+ }
+}
+
+.dataTables_extended_wrapper .dataTables_length label {
+ margin: 0 !important;
+ padding: 0 !important;
+ font-size: 13px;
+ float: none !important;
+ display: inline-block !important;
+}
+
+.table-container .table-actions-wrapper {
+ display: none;
+}
+
+/***
+Password Strength(in v1.4)
+***/
+.password-strength .password-verdict {
+ display: inline-block;
+ margin-top: 6px;
+ margin-left: 5px;
+}
+
+.password-strength .progress {
+ margin-top: 5px;
+ margin-bottom: 0;
+}
+
+.password-strength .progress-bar {
+ padding: 2px;
+}
+
+/***
+Uniform disabled checkbox, radio button fix(in v1.4)
+***/
+
+.table .uniform-inline {
+ padding: 0;
+ margin: 0;
+}
+
+.checker {
+ margin-top: -2px !important;
+ margin-right: 2px !important;
+ display:inline;
+}
+
+.checker input,
+.radio input {
+ outline: none !important;
+}
+
+div.checker.disabled span,
+div.checker.disabled.active span{
+ background-position: -152px -260px;
+}
+
+div.checker.disabled:hover,
+div.radio.disabled:hover {
+ cursor: not-allowed;
+}
+
+div.radio,
+div.checker {
+ margin-right: 0;
+ margin-left: 3px;
+}
+
+/***
+jQuery Sparkline
+***/
+.jqstooltip {
+ width: auto !important;
+ height: auto !important;
+}
+
+
+/***
+jQuery Multi Select
+***/
+
+.ms-container .ms-list {
+ border: 1px solid #e5e5e5;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+
+}
+
+.ms-container .ms-optgroup-label{
+ font-size: 14px;
+}
+
+.ms-container .ms-selectable li.ms-elem-selectable,
+.ms-container .ms-selection li.ms-elem-selection{
+ font-size: 13px;
+}
+
+.ms-container .ms-list.ms-focus {
+ border-color: #999999;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+}
+
+.ms-container .ms-selectable li.ms-hover,
+.ms-container .ms-selection li.ms-hover{
+ color: #333;
+ background-color: #eee;
+}
+
+.ms-container .form-control {
+ margin-bottom: 5px;
+}
+
+/***
+Bootstrap Colorpicker
+***/
+.input-group.color .input-group-btn i {
+ position: absolute;
+ display: block;
+ cursor: pointer;
+ width: 20px;
+ height: 20px;
+ right: 6px;
+}
+
+.colorpicker.dropdown-menu {
+ padding: 5px;
+}
+
+/* change z-index when opened in modal */
+.modal-open .colorpicker {
+ z-index: 10055 !important;
+}
+
+/***
+Bootstrap Datetimepicker
+***/
+
+.datetimepicker table td {
+ font-weight: 300 !important;
+ font-family: 'Open Sans' !important;
+}
+
+.datetimepicker table th {
+ font-family: 'Open Sans' !important;
+ font-weight: 400 !important;
+}
+
+.datetimepicker.dropdown-menu {
+ padding: 5px;
+}
+
+.datetimepicker .active {
+ background-color:#4b8df8 !important;
+ background-image: none !important;
+ filter: none !important;
+}
+
+.datetimepicker .active:hover {
+ background-color: #2678FC !important;
+ background-image: none !important;
+ filter: none !important;
+
+}
+
+/* change z-index when opened in modal */
+.modal-open .datetimepicker {
+ z-index: 10055 !important;
+}
+
+/***
+Bootstrap Time Picker
+***/
+.bootstrap-timepicker-widget table td a {
+ padding: 4px 0;
+}
+
+.bootstrap-timepicker-widget input,
+.bootstrap-timepicker-widget input:focus {
+ outline: none !important;
+ border: 0;
+}
+
+.modal-open .bootstrap-timepicker-widget {
+ z-index: 10055 !important;
+}
+
+.bootstrap-timepicker-widget.timepicker-orient-bottom:before,
+.bootstrap-timepicker-widget.timepicker-orient-bottom:after {
+ top: auto;
+}
+
+/***
+Bootstrap Datepicker
+***/
+
+.datepicker.dropdown-menu {
+ padding: 5px;
+}
+
+.datepicker .selected {
+ background-color:#909090 !important;
+ background-image: none !important;
+ filter: none !important;
+}
+
+.datepicker .active {
+ background-color:#4b8df8 !important;
+ background-image: none !important;
+ filter: none !important;
+}
+
+.datepicker .active:hover {
+ background-color: #2678FC !important;
+ background-image: none !important;
+ filter: none !important;
+}
+
+.datepicker .input-daterange input {
+ text-align: left;
+}
+
+/* change z-index when opened in modal */
+.modal-open .datepicker {
+ z-index: 10055 !important;
+}
+
+.datepicker table td {
+ font-weight: 300 !important;
+ font-family: 'Open Sans' !important;
+}
+
+.datepicker table th {
+ font-family: 'Open Sans' !important;
+ font-weight: 400 !important;
+}
+
+
+/***
+Clockface
+***/
+
+.modal-open .clockface {
+ z-index: 10055 !important;
+}
+
+.clockface .cell .inner.active,
+.clockface .cell .outer.active {
+ background-color:#4b8df8 !important;
+ background-image: none ;
+ filter:none ;
+}
+
+
+/***
+Bootstrap Daterangepicker
+***/
+
+.modal-open .daterangepicker {
+ z-index: 10055 !important;
+}
+
+.daterangepicker td {
+ text-shadow: none ;
+}
+
+.daterangepicker td.active {
+ background-color: #4b8df8 ;
+ background-image: none ;
+ filter:none ;
+}
+
+.daterangepicker th {
+ font-weight: 400;
+ font-size: 14px;
+}
+
+.daterangepicker .ranges input[type="text"] {
+ width: 70px !important;
+ font-size: 11px;
+ vertical-align: middle;
+}
+
+.daterangepicker .ranges label {
+ font-weight: 300;
+ display: block;
+}
+
+.daterangepicker .ranges .btn {
+ margin-top: 10px;
+}
+
+.daterangepicker.dropdown-menu {
+ padding: 5px;
+}
+
+.daterangepicker .ranges li {
+ color: #333;
+}
+
+.daterangepicker .ranges li.active,
+.daterangepicker .ranges li:hover {
+ background: #4b8df8 !important;
+ border: 1px solid #4b8df8 !important;
+ color: #fff;
+}
+
+.daterangepicker .range_inputs input {
+ margin-bottom: 0 !important;
+}
+
+/***
+Bootstrap Editable
+***/
+
+.editable-input table,
+.editable-input table th,
+.editable-input table td,
+.editable-input table tr {
+ border: 0 !important;
+}
+
+.editable-input .combodate select {
+ margin-bottom: 5px;
+}
+
+/***
+FuelUX Spinners
+***/
+
+.spinner-buttons.btn-group-vertical .btn {
+ text-align: center;
+ margin: 0;
+ height: 17px;
+ width: 22px;
+ padding-left: 6px;
+ padding-right: 6px;
+ padding-top: 0px;
+}
+
+
+/***
+NoUI Range Sliders
+***/
+.noUi-handle {
+ height: 20px;
+ width: 20px;
+ margin: -3px 0 0 -20px;
+}
+
+.noUi-base {
+ height: 16px;
+}
+
+.noUi-connect {
+ background: #ffb848;
+}
+
+/***
+Toastr Notifications
+***/
+.toast {
+ -webkit-box-shadow: none !important;
+ -moz-box-shadow: none !important;
+ box-shadow: none !important;
+}
+
+.toast {
+ background-color: #030303;
+}
+.toast-success {
+ background-color: #51a351;
+}
+.toast-error {
+ background-color: #bd362f;
+}
+.toast-info {
+ background-color: #2f96b4;
+}
+.toast-warning {
+ background-color: #f89406;
+}
+
+.toast .toast-close-button {
+ display: inline-block;
+ margin-top: 0px;
+ margin-right: 0px;
+ text-indent: -100000px;
+ width: 11px;
+ height: 16px;
+ background-repeat: no-repeat !important;
+ background-image: url("../image/portlet-remove-icon-white.png") !important;
+}
+
+.toast-top-center {
+ top: 12px;
+ margin: 0 auto;
+ left: 50%;
+ margin-left: -150px;
+}
+
+.toast-bottom-center {
+ bottom: 12px;
+ margin: 0 auto;
+ left: 50%;
+ margin-left: -150px;
+}
+
+/***
+Google reCaptcha
+***/
+.form-recaptcha-img {
+ margin-bottom: 10px;
+ clear: both;
+ border: 1px solid #e5e5e5;
+ padding: 5px;
+}
+
+iframe[src="about:blank"] {
+ display:none;
+}
+
+/***
+Bootstrap Markdown
+***/
+.md-input {
+ padding: 5px !important;
+ border-bottom: 0 !important;
+}
+
+.md-editor .btn-toolbar {
+ margin-left: 0px;
+}
+
+.md-editor.active {
+ border: 1px solid #999999;
+ -webkit-box-shadow: none !important;
+ -moz-box-shadow: none !important;
+ box-shadow: none !important;
+}
+
+/***
+Bootstrap Datepaginator
+***/
+.datepaginator a {
+ font-family: 'Open Sans';
+ font-size: 13px;
+ font-weight: 300;
+}
+
+.datepicker .today {
+ background-image: none !important;
+ filter: none !important;
+}
+
+#dp-calendar {
+ right: 4px !important;
+}
+
+/***
+Font Awesome 4.0 Demo
+***/
+.fa-item {
+ font-size: 14px;
+ padding: 10px 10px 10px 20px;
+}
+
+.fa-item i {
+ font-size: 16px;
+ display: inline-block;
+ width: 20px;
+}
+
+.fa-item:hover {
+ cursor: pointer;
+ background: #eee;
+}
+
+/***
+Bootstrap Modal
+***/
+/* fix: content shifting to the right on modal open */
+.modal-open.page-overflow .page-container,
+.modal-open.page-overflow .page-container .navbar-fixed-top,
+.modal-open.page-overflow .page-container .navbar-fixed-bottom,
+.modal-open.page-overflow .modal-scrollable {
+ overflow-y: auto !important;
+}
+
+.modal-scrollable {
+ overflow: hidden !important;
+}
+
+
+/***
+jQuery Notific8 Plugin
+***/
+
+.jquery-notific8-message {
+ font-size: 13px;
+}
+
+[class*="jquery-notific8"],
+[class*="jquery-notific8"]:after,
+[class*="jquery-notific8"]:before {
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+}
+
+.right .jquery-notific8-close-sticky span,
+.left .jquery-notific8-close-sticky span {
+ font-size: 10px;
+}
+
+.jquery-notific8-heading {
+ font-weight: 300;
+ font-size: 16px;
+}
+
+/***
+jQuery File Upload
+***/
+
+.blueimp-gallery .close {
+ background-image: url("../image/portlet-remove-icon-white.png") !important;
+ margin-top: -2px;
+}
+
+.blueimp-gallery .prev,
+.blueimp-gallery .next {
+ border-radius: 23px !important;
+}
+
+/***
+Bootstrap Switch
+***/
+
+.has-switch {
+ border-color: #e5e5e5;
+}
+
+.has-switch:focus {
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+
+/***
+Jstree
+***/
+
+.jstree-default .jstree-clicked {
+ border: 0;
+ background-color: #e1e1e1;
+ box-shadow:none;
+}
+
+.jstree-default .jstree-hovered {
+ border: 0;
+ background-color: #eee;
+ box-shadow:none;
+}
+
+.jstree-default .jstree-wholerow-clicked,
+.jstree-wholerow .jstree-wholerow-clicked {
+ background: none;
+ border: 0;
+ background-color: #e1e1e1;
+ box-shadow:none;
+}
+
+.jstree-default .jstree-wholerow-hovered,
+.jstree-wholerow .jstree-wholerow-hovered {
+ border: 0;
+ background-color: #eee;
+ box-shadow:none;
+}
+
+.jstree-icon.icon-lg {
+ margin-top: 1px;
+}
+
+.jstree-open > .jstree-anchor > .fa-folder:before {
+ margin-left: 2px;
+ content: "\f07c";
+}
+
+.jstree-default.jstree-rtl .jstree-last {
+ background: transparent;
+ background-repeat: no-repeat;
+}
+
+.vakata-context,
+.vakata-context ul {
+ padding: 0;
+ min-width: 125px;
+ background-color: #ffffff;
+ -webkit-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
+ -moz-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
+ box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
+ font-size: 14px;
+ font-family: "Segoe UI",Helvetica, Arial, sans-serif;
+ border: 1px solid #ddd;
+}
+
+.vakata-context li a {
+ padding: 0 10px;
+}
+
+.vakata-context .vakata-context-hover > a,
+.vakata-context li a:hover {
+ background-color: #eee;
+ color: #333;
+ box-shadow: none;
+}
+
+.vakata-context li a span,
+.vakata-context li a ins {
+ display: none;
+}
+
+.vakata-context .vakata-context-separator a,
+.vakata-context-rtl .vakata-context-separator a {
+ margin: 0;
+}
+
+.jstree-rename-input {
+ background-color: #ffffff !important;
+ border: 1px solid #e5e5e5 !important;
+ outline: none !important;
+ padding: 2px 6px !important;
+ margin-right: -4px !important;
+}
+
+/***
+Bootstrap Select
+***/
+
+.bootstrap-select .btn {
+ border-color: #e5e5e5;
+}
+
+.bootstrap-select.open .btn1 {
+ border-color: #999999;
+}
+
+.bootstrap-select.open.dropup .btn1 {
+ border-color: #999999;
+}
+
+.bootstrap-select .btn:focus {
+ outline: none !important;
+ outline-offset: 0;
+}
+
+.bootstrap-select.btn-group .dropdown-menu {
+ margin-top: 1px;
+}
+
+.bootstrap-select.btn-group .dropdown-menu > li > dt > .text {
+ font-weight: 600;
+ font-family: 'Open Sans';
+ font-size: 14px;
+}
+
+.bootstrap-select.btn-group .dropdown-menu .text-muted {
+ color: #999 !important;
+}
+
+.bootstrap-select .caret {
+ border: 0;
+ width: auto;
+ height: auto;
+ margin-top: -10px !important;
+}
+
+.bootstrap-select .caret:before {
+ content: "\f107";
+ display: inline-block;
+ border: 0;
+ font-family: FontAwesome;
+ font-style: normal;
+ font-weight: normal;
+}
+
+.bootstrap-select .selected i {
+ color: #aaa;
+}
+
+/***
+Pace - Page Progress
+***/
+
+.pace .pace-progress {
+ z-index: 10000;
+ top: 40px;
+ height: 2px;
+}
+
+.pace .pace-progress-inner {
+ box-shadow: none;
+}
+
+.pace .pace-activity {
+ top: 44px;
+ right: 22px;
+ border-radius: 10px !important;
+}
+
+
+@media (max-width: 480px) {
+
+ .page-header-fixed .pace .pace-progress {
+ top: 82px;
+ }
+
+ .page-header-fixed .pace .pace-activity {
+ top: 88px;
+ right: 15px;
+ }
+
+}
diff --git a/common/src/main/webapp/thirdparty/css/style.css b/common/src/main/webapp/thirdparty/css/style.css
new file mode 100644
index 0000000..fc070b9
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/style.css
@@ -0,0 +1,4715 @@
+/**
+ * Copyright 2016, CMCC Technologies Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/***
+Colors
+blue: #4b8df8
+light blue: #bfd5fa
+red: #e02222
+yellow: #ffb848
+green: #35aa47
+purple: #852b99
+dark: #555555;
+light grey: #fafafa;
+***/
+/*fontIcon*/
+[class^="ict-"], [class*=" ict-"]{
+ padding-right:3px;
+ display: inline-block;
+ width: 1.25em;
+ text-align: center;
+}
+.page-sidebar-menu [class^="ict-"], .page-sidebar-menu [class*=" ict-"]{
+padding-right:0;
+}
+/*********************
+ GENERAL RESET & SETUP
+*********************/
+
+/***
+Reset and overrides
+***/
+body {
+ color: #333;
+ /*font-family: 'Open Sans', sans-serif;
+ font-size:13px; */
+ font-family: "Microsoft yahei", Verdana, Arial, Helvetica, sans-serif !important;
+ padding: 0px !important;
+ margin: 0px !important;
+ direction: ltr;
+}
+.page-content-body{
+padding-left:15px;
+padding-right:15px;
+padding-top:10px;
+}
+/*
+Internet Explorer 10 doesn't differentiate device width from viewport width, and thus doesn't
+properly apply the media queries in Bootstrap's CSS. To address this,
+you can optionally include the following CSS and JavaScript to work around this problem until Microsoft issues a fix.
+*/
+@-webkit-viewport {
+ width: device-width;
+}
+
+@-moz-viewport {
+ width: device-width;
+}
+
+@-ms-viewport {
+ width: device-width;
+}
+
+@-o-viewport {
+ width: device-width;
+}
+
+@viewport {
+ width: device-width;
+}
+
+/* Internet Explorer 10 doesn't differentiate device width from viewport width,
+and thus doesn't properly apply the media queries in Bootstrap's CSS. To address this, following CSS code applied */
+@-ms-viewport {
+ width: auto !important;
+}
+
+/***
+Custom Scrollbars
+***/
+
+::-webkit-scrollbar {
+ width: 12px;
+}
+
+::-webkit-scrollbar-track {
+ background-color: #eaeaea;
+ border-left: 1px solid #cecece;
+}
+
+::-webkit-scrollbar-thumb {
+ background-color: #cecece;
+}
+
+::-webkit-scrollbar-thumb:hover {
+ background-color: #aaa;
+}
+
+::-webkit-scrollbar-track {
+ border-radius: 0;
+ box-shadow: none;
+ border: 0;
+}
+
+::-webkit-scrollbar-thumb {
+ border-radius: 0;
+ box-shadow: none;
+ border: 0;
+}
+
+/***
+General typography
+***/
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+h5 small,
+h6 small {
+ color: #444;
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ font-family: Arial, sans-serif;
+ font-weight: 300 !important;
+}
+
+h1.block,
+h2.block,
+h3.block,
+h4.block,
+h5.block,
+h6.block {
+ padding-top: 10px;
+ padding-bottom: 10px;
+}
+
+a {
+ text-shadow: none !important;
+ color: #5b9bd1;
+}
+
+/***
+Fix link outlines after click
+***/
+a,a:focus, a:hover, a:active {
+ outline: 0;
+}
+
+/***
+General backgrounds. Can be applied to any block or panel
+***/
+
+.bg-blue {
+ background-image: none !important;
+ background-color: #4b8df8 !important;
+ border-color:#4b8df8 !important;
+ color: #fff !important;
+}
+
+.bg-red {
+ background-image: none !important;
+ background-color: #e02222 !important;
+ border-color: #e02222 !important;
+ color: #fff !important;
+}
+
+.bg-yellow {
+ background-image: none !important;
+ background-color: #ffb848 !important;
+ border-color: #ffb848 !important;
+ color: #fff !important;
+}
+
+.bg-green {
+ background-image: none !important;
+ background-color: #35aa47 !important;
+ border-color: #35aa47 !important;
+ color: #fff !important;
+}
+
+.bg-purple {
+ background-image: none !important;
+ background-color: #852b99 !important;
+ border-color: #852b99 !important;
+ color: #fff !important;
+}
+
+.bg-dark {
+ background-image: none !important;
+ background-color: #555555 !important;
+ border-color: #555555 !important;
+ color: #fff !important;
+}
+
+.bg-grey {
+ background-image: none !important;
+ background-color: #fafafa !important;
+ border-color: #fafafa !important;
+}
+
+/***
+Font Awesome Icons
+***/
+
+[class^="fa-"],
+[class*=" fa-"] {
+ display: inline-block;
+/* margin-top: 1px;*/
+ font-size: 14px;
+ *margin-right: .3em;
+ line-height: 14px;
+}
+
+/***
+Make font awesome icons fixed width(latest version issue)
+***/
+
+li [class^="fa-"],
+li [class*=" fa-"] {
+ display: inline-block;
+ width: 1.25em;
+ text-align: center;
+}
+li [class^="fa-"].icon-large,
+li [class*=" fa-"].icon-large {
+ /* increased font size for icon-large */
+ width: 1.5625em;
+}
+
+.page-breadcrumb .fa-angle-right{
+ display:inline-block;
+ margin-left:8px;
+ margin-right:8px;
+}
+
+.page-breadcrumb i[class^="fa-"], [class*=" fa-"],.page-breadcrumb i[class^="ict-"], [class*=" ict-"]{
+ display:none;
+}
+
+
+
+.fa-lg,
+.icon-lg {
+ font-size: 16px;
+}
+
+.fa-2x {
+ font-size: 2em;
+}
+.fa-3x {
+ font-size: 3em;
+}
+.fa-4x {
+ font-size: 4em;
+}
+.fa-5x {
+ font-size: 5em;
+}
+
+.icon-default {
+ color: #ccc;
+}
+
+.icon-success {
+ color: #468847;
+}
+
+.icon-info {
+ color: #27a9e3;
+}
+
+.icon-warning {
+ color: #dbc056;
+}
+
+.icon-danger {
+ color: #B94A48;
+}
+
+/***
+Close icon used for modal dialog and other UI element close buttons
+***/
+.close {
+ display: inline-block;
+ margin-top: 0px;
+ margin-right: 0px;
+ width: 9px;
+ height: 9px;
+ background-repeat: no-repeat !important;
+ text-indent: -10000px;
+ outline: none;
+ background-image: url("../image/remove-icon-small.png") !important;
+}
+
+.about{
+ height:345px;
+ width:528px;
+}
+
+.aboutmain{
+ background-image: url("../image/about/about-bg-light.png");
+}
+
+.aboutinfo{
+ background-image: url("../image/about/about-bg-dark.png");
+}
+
+.about a{
+ color: white;
+
+ margin-left:15px;
+ text-decoration: none;
+}
+
+.about a.about_close{
+ float:right;
+ margin-right:20px;
+ font-size: 1.2em;
+}
+
+.about div{
+ padding-top:10px;
+
+}
+
+.about div.info{
+ float: right;
+ margin-right: 15px;
+ margin-top: 130px;
+ color: white;
+ font-size: 13px;
+}
+
+.about div.info div{
+ margin-left:15px;
+}
+
+.about div.info img{
+ margin-right: 55px;
+}
+
+.aboutDlg{
+ width: 530px;
+ margin-left:150px;
+}
+
+/***
+General HR
+***/
+
+hr {
+ margin: 20px 0;
+ border: 0;
+ border-top: 1px solid #E0DFDF;
+ border-bottom: 1px solid #FEFEFE;
+}
+
+/***
+Tools
+***/
+
+.display-none,
+.display-hide {
+ display: none;
+}
+
+.no-space {
+ margin: 0px !important;
+ padding: 0px !important;
+}
+
+.no-margin {
+ margin:0;
+}
+
+.no-border {
+ border:0 !important;
+}
+
+.margin-bottom-5 {
+ margin-bottom: 5px;
+}
+
+.margin-bottom-10 {
+ margin-bottom: 10px !important;
+}
+
+.margin-top-10 {
+ margin-top: 10px !important;
+}
+
+.margin-bottom-15 {
+ margin-bottom: 15px !important;
+}
+
+.margin-bottom-20 {
+ margin-bottom: 20px !important;
+}
+
+.margin-top-20 {
+ margin-top: 20px !important;
+}
+
+.margin-bottom-25 {
+ margin-bottom: 25px !important;
+}
+
+.margin-right-10 {
+ margin-right: 10px !important;
+}
+
+.bold {
+ font-weight:600 !important;
+}
+
+.fix-margin {
+ margin-left: 0px !important
+}
+
+.border {
+ border: 1px solid red;
+}
+
+.inline {
+ display: inline;
+}
+
+.text-align-reverse {
+ text-align: right;
+}
+
+/***
+ie8 & ie9 modes
+***/
+
+.visible-ie8 {
+ display: none;
+}
+
+.ie8 .visible-ie8 {
+ display: inherit !important;
+}
+
+.visible-ie9 {
+ display: none;
+}
+
+.ie9 .visible-ie9 {
+ display: inherit !important;
+}
+
+.hidden-ie8 {
+ display: inherit;
+}
+
+.ie8 .hidden-ie8 {
+ display: none !important;
+}
+
+.hidden-ie9 {
+ display: inherit;
+}
+
+.ie9 .hidden-ie9 {
+ display: none !important;
+}
+
+/********************
+ GENERAL LAYOUT
+*********************/
+
+/***
+Header and header elements.
+***/
+
+.header.navbar {
+ width: 100%;
+ padding: 0 20px 0 20px;
+ margin: 0;
+ border: 0px;
+ padding: 0px;
+ box-shadow: none;
+ height: 42px;
+ min-height: 42px;
+}
+
+.header.navbar.navbar-fixed-top {
+ z-index: 9995 !important;
+}
+
+.header.navbar .navbar-brand {
+ display: inline-block;
+ margin-top: -1px;
+ margin-right: 0;
+ padding-left: 0;
+ padding-right: 0;
+ width: 225px;
+ height: 42px;
+}
+
+.header.navbar .navbar-brand img {
+ margin-left: 20px;
+}
+
+.header.navbar .navbar-brand.text-logo {
+ padding-left: 20px;
+ padding-top: 12px;
+}
+
+.header.navbar .navbar-toggle {
+ margin: 8px 6px 4px 6px;
+ padding: 0;
+ padding-top:2px;
+ padding-bottom: 6px;
+ background-image: none;
+ filter:none;
+ box-shadow: none;
+ color: #fff;
+ border: 0;
+}
+
+.header.navbar .navbar-toggle:hover {
+ text-decoration: none;
+ background: none;
+}
+
+.header.navbar .navbar-nav {
+ margin-right: 20px;
+ display: block;
+}
+
+.header.navbar .navbar-nav > li {
+ margin: 0px;
+ padding: 0px;
+}
+
+.header.navbar .navbar-nav > li.dropdown,
+.header.navbar .navbar-nav > li.dropdown > a {
+ padding-left: 4px;
+ padding-right: 4px;
+}
+
+.header.navbar .navbar-nav > li.dropdown > a:last-child {
+ padding-right: 0;
+}
+
+.header.navbar .navbar-nav > li.dropdown:last-child {
+ padding-right: 2px;
+}
+
+.header.navbar .navbar-nav > li.dropdown .dropdown-toggle {
+ margin: 0px;
+ padding: 15px 10px 7px 10px;
+}
+
+.header.navbar .navbar-nav > li.dropdown .dropdown-toggle > i {
+ font-size: 18px;
+}
+
+.header.navbar .navbar-nav > li.dropdown .dropdown-menu > li > a > i {
+ font-size: 14px;
+}
+
+.header.navbar .navbar-nav > li.dropdown.user .dropdown-toggle {
+ padding-top: 9px;
+ *padding: 9px 18px 6px 6px;
+}
+
+.header.navbar .navbar-nav > li.dropdown.user .dropdown-toggle:hover {
+ text-decoration: none;
+}
+
+.header.navbar .navbar-nav > li.dropdown.user .dropdown-toggle .username {
+ color: #ddd;
+}
+
+.header.navbar .navbar-nav > li.dropdown.user .dropdown-toggle i {
+ display: inline-block;
+ margin-top: 5px;
+ margin: 0;
+ font-size: 16px;
+}
+
+.header.navbar .navbar-nav > li.dropdown.user .dropdown-menu i {
+ width: 15px;
+ display: inline-block;
+}
+
+.header.navbar .navbar-nav > li.dropdown .dropdown-toggle .badge {
+ position: absolute;
+ top: 8px;
+ right: 20px;
+}
+
+
+.header.navbar .navbar-nav > li.dropdown.system .dropdown-toggle {
+ padding: 13px 0px 6px 6px;
+}
+
+.header.navbar .navbar-nav > li.dropdown.system .dropdown-toggle:hover {
+ text-decoration: none;
+}
+
+.header.navbar .navbar-nav > li.dropdown.system .dropdown-toggle .sysname {
+ color: #ddd;
+}
+
+.header.navbar .navbar-nav > li.dropdown.system .dropdown-toggle i {
+ display: inline-block;
+ margin-top: 5px;
+ margin: 0;
+ font-size: 16px;
+}
+
+.header.navbar .navbar-nav > li.dropdown.system .dropdown-menu i {
+ width: 15px;
+ display: inline-block;
+}
+
+/***
+Header Search
+***/
+.header.navbar .search-form {
+ float: left;
+ display: inline-block;
+ padding: 0;
+ height: 41px;
+ margin:0;
+}
+
+.header.navbar .search-form .form-control{
+ margin-top: 8px;
+ border: 0;
+ padding-top: 1px;
+ padding-right: 27px;
+}
+
+.header.navbar .search-form .submit {
+ position: relative;
+ display: block;
+ float: right;
+ margin-top: -21px;
+ margin-right: 8px;
+ width: 13px;
+ height: 15px;
+ box-shadow: none;
+ border: 0px;
+ padding: 0px;
+ background-color: none;
+ background-repeat: no-repeat !important;
+ outline: none !important;
+ opacity: 0.8;
+ filter: alpha(opacity=80);
+}
+
+.header.navbar .search-form .submit:hover {
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
+
+/***
+Language Bar
+***/
+
+.header.navbar .navbar-nav > li.dropdown.language {
+ padding-left: 0;
+ padding-right: 0;
+ margin: 0;
+}
+
+.header.navbar .navbar-nav > li.dropdown.language > a {
+ color: #ddd;
+ font-size: 13px;
+ padding: 11px 1px 11px 5px;
+}
+
+.header.navbar .navbar-nav > li.dropdown.language > a > img {
+ margin-bottom: 2px;
+}
+
+.header.navbar .navbar-nav > li.dropdown.language > a > i {
+ font-size: 16px;
+}
+
+.header.navbar .navbar-nav > li.dropdown.language > .dropdown-menu > li > a > img {
+ margin-bottom: 2px;
+}
+
+.header.navbar .navbar-nav .dropdown-menu {
+ margin-top: 3px;
+}
+
+/***
+Page container
+***/
+
+.page-container {
+ margin: 0px;
+ padding: 0px;
+ position: relative;
+}
+
+.page-container:before,
+.page-container:after {
+ display: table;
+ content: " ";
+}
+
+.page-container:after {
+ clear: both;
+}
+
+.page-header-fixed .page-container {
+ margin-top: 42px;
+}
+
+/*** IE 8 Fixes ***/
+/***
+Page sidebar
+***/
+
+.ie8 .page-sidebar {
+ width: 225px;
+ float: left;
+ position: relative;
+ margin-right: -100%;
+}
+
+/***
+Page content
+***/
+
+.ie8 .page-content-wrapper {
+ float: left;
+ width: 100%;
+ }
+
+.ie8 .page-content {
+ margin-left: 225px;
+ margin-top: 0px;
+ min-height: 540px;
+ padding: 20px 20px 20px 20px;
+ }
+/*** IE 8 Fixes ***/
+
+/***
+Page sidebar
+***/
+
+.page-sidebar.navbar-collapse {
+ padding: 0;
+}
+
+.page-sidebar-menu {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ margin: 0;
+ padding: 0;
+}
+
+.page-sidebar-menu > li {
+ display: block;
+ margin: 0;
+ padding: 0;
+ border: 0px;
+}
+
+.page-sidebar-menu > li.start > a {
+ border-top-color: transparent !important;
+}
+
+.page-sidebar-menu > li:last-child > a,
+.page-sidebar-menu > li.last > a {
+ border-bottom-color: transparent !important;
+}
+
+.page-sidebar-menu > li > a {
+ display: block;
+ position: relative;
+ margin: 0;
+ border: 0px;
+ padding: 10px 15px;
+ text-decoration: none;
+ font-size: 14px;
+ font-weight: 300;
+}
+
+.page-sidebar-fixed .page-sidebar-menu > li > a {
+ -webkit-transition: all 0.2s ease;
+ -moz-transition: all 0.2s ease;
+ -o-transition: all 0.2s ease;
+ transition: all 0.2s ease;
+}
+
+.page-sidebar-reversed.page-sidebar-fixed .page-sidebar-menu > li > a{
+ -webkit-transition: none;
+ -moz-transition: none;
+ -o-transition: none;
+ transition: none;
+}
+
+.page-sidebar-menu > li > a i {
+ font-size: 16px;
+ margin-right: 5px;
+ text-shadow:none;
+}
+
+.page-sidebar-menu > li.break {
+ margin-bottom: 20px;
+}
+
+.page-sidebar-menu > li.open > a {
+ font-size: 14px;
+}
+
+.page-sidebar-menu > li.active > a {
+ border: none;
+ text-shadow:none;
+ font-size: 14px;
+}
+
+.page-sidebar-menu > li.active > a .selected {
+ display: block;
+ width: 8px;
+ height: 25px;
+ background-image: url("../image/sidebar-menu-arrow.png");
+ float: right;
+ position: absolute;
+ right:0px;
+ top:8px;
+}
+
+.page-sidebar-reversed .page-sidebar-menu > li.active > a .selected {
+ background-image: url("../image/sidebar-menu-arrow-reverse.png");
+ right: auto;
+ left:0;
+}
+
+.page-sidebar ul > li > a > .arrow:before {
+ float: right;
+ margin-top: 0px;
+ margin-right: 5px;
+ display: inline;
+ font-size: 16px;
+ font-family: FontAwesome;
+ height: auto;
+ content: "\f104";
+ font-weight: 300;
+ text-shadow:none;
+}
+
+.page-sidebar-menu > li > a > .arrow.open:before {
+ float: right;
+ margin-top: 0px;
+ margin-right: 3px;
+ display: inline;
+ font-family: FontAwesome;
+ height: auto;
+ font-size: 16px;
+ content: "\f107";
+ font-weight: 300;
+ text-shadow:none;
+}
+
+/* bagin: sidebar menu badges */
+.page-sidebar-menu li > a > .badge {
+ float: right;
+ margin-top: 1px;
+ margin-right: 13px;
+}
+
+/* end: sidebar menu badges */
+
+.page-sidebar-menu .sub-menu {
+ padding: 0;
+}
+
+.page-sidebar-menu > li > ul.sub-menu {
+ display: none;
+ list-style: none;
+ clear: both;
+ margin: 8px 0px 8px 0px;
+}
+
+.page-sidebar-menu > li.active > ul.sub-menu {
+ display: block;
+}
+
+.page-sidebar-menu > li > ul.sub-menu > li {
+ background: none;
+ margin: 0px;
+ padding: 0px;
+ margin-top: 1px !important;
+}
+
+.page-sidebar-menu > li > ul.sub-menu > li > a {
+ display: block;
+ margin: 0px 0px 0px 0px;
+ padding: 5px 0px;
+ padding-left: 44px !important;
+ text-decoration: none;
+ font-size: 14px;
+ font-weight: 300;
+ background: none;
+}
+
+/* 3rd level sub menu */
+.page-sidebar-menu > li > ul.sub-menu > li ul.sub-menu {
+ display: none;
+ list-style: none;
+ clear: both;
+ margin: 0px 0px 0px 0px;
+}
+
+.page-sidebar-menu > li > ul.sub-menu li > a > .arrow:before {
+ float: right;
+ margin-top: 1px;
+ margin-right: 20px;
+ display: inline;
+ font-size: 16px;
+ font-family: FontAwesome;
+ height: auto;
+ content: "\f104";
+ font-weight: 300;
+ text-shadow:none;
+}
+
+.page-sidebar-menu > li > ul.sub-menu li > a > .arrow.open:before {
+ float: right;
+ margin-top: 1px;
+ margin-right: 18px;
+ display: inline;
+ font-family: FontAwesome;
+ height: auto;
+ font-size: 16px;
+ content: "\f107";
+ font-weight: 300;
+ text-shadow:none;
+}
+
+.page-sidebar-menu > li.active > ul.sub-menu > li.active ul.sub-menu {
+ display: block;
+}
+
+.page-sidebar-menu > li > ul.sub-menu > li ul.sub-menu li {
+ background: none;
+ margin: 0px;
+ padding: 0px;
+ margin-top: 1px !important;
+}
+
+.page-sidebar-menu > li > ul.sub-menu li > ul.sub-menu > li > a {
+ display: block;
+ margin: 0px 0px 0px 0px;
+ padding: 5px 0px;
+ text-decoration: none;
+ font-size: 14px;
+ font-weight: 300;
+ background: none;
+}
+
+.page-sidebar-menu > li > ul.sub-menu > li > ul.sub-menu > li > a {
+ padding-left: 60px;
+}
+
+.page-sidebar-menu > li > ul.sub-menu > li > ul.sub-menu > li > ul.sub-menu > li > a {
+ padding-left: 80px;
+}
+
+.page-sidebar-menu > li.active > ul.sub-menu > li.active ul.sub-menu > li.active ul.sub-menu {
+ display: block;
+}
+
+
+.page-sidebar-menu > li > ul.sub-menu li > ul.sub-menu > li > a > i {
+ font-size: 13px;
+}
+
+/***
+Sidebar Search
+***/
+
+.page-sidebar .sidebar-search {
+ padding:0;
+ margin: 0;
+}
+
+.page-sidebar .header.navbar-responsive-search {
+ display: none;
+}
+
+.page-sidebar .sidebar-search .form-container {
+ margin: 15px 20px 15px 20px;
+ height: 35px;
+ padding-top: 7px;
+}
+
+.page-sidebar .sidebar-search .form-container .submit {
+ display: block;
+ float: right;
+ margin-top: 3px;
+ width: 13px;
+ height: 15px;
+ background-repeat: no-repeat;
+ box-shadow: none;
+ border: 0px;
+ padding: 0px;
+ outline: none !important;
+}
+
+.page-sidebar .sidebar-search .form-container input[type="text"] {
+ margin: 0px;
+ width: 165px;
+ border: 0px;
+ padding: 0 !important;
+ font-size: 14px !important;
+ box-shadow: none !important;
+ font-size: 14px;
+ font-weight: normal;
+}
+
+.page-sidebar .sidebar-search .form-container input[type="text"]:focus {
+ outline: none !important;
+}
+
+/***
+Sidebar toggler(show/hide)
+***/
+.sidebar-toggler {
+ cursor: pointer;
+ opacity: 0.5;
+ filter: alpha(opacity=50);
+ width: 29px;
+ height: 29px;
+ background-repeat: no-repeat;
+}
+
+.sidebar-toggler:hover {
+ filter: alpha(opacity=100);
+ opacity: 1;
+}
+
+.page-sidebar .sidebar-toggler {
+ margin-top: 15px;
+ /* margin-left: 175px;*/
+}
+
+.header.navbar .sidebar-toggler {
+ float: left;
+ display: inline-block;
+ margin-top: 6px;
+ margin-left: -42px;
+}
+
+/***
+Page content
+***/
+.page-content {
+ margin-top: 0px;
+ padding: 0px;
+ background-color: #fff;
+}
+
+.ie8 .page-content {
+ padding: 20px;
+ margin-left: 225px;
+ margin-top: 0px;
+ min-height: 760px;
+}
+
+.ie8 .page-sidebar-fixed .page-content {
+ min-height: 600px;
+}
+
+.ie8 .page-content.no-min-height {
+ min-height: auto;
+}
+
+.page-full-width .page-content {
+ margin-left: 0px !important;
+}
+
+.page-full-width .page-sidebar-menu {
+ display: none;
+}
+
+/***
+Page title
+***/
+.page-title {
+ padding: 0px;
+ font-size: 30px;
+ letter-spacing: -1px;
+ display: block;
+ color: #666;
+ margin: 0px 0px 15px 0px;
+ font-weight: 300;
+ font-family: 'Open Sans', sans-serif;
+}
+
+.page-title small {
+ font-size: 14px;
+ letter-spacing: 0px;
+ font-weight: 300;
+ color: #888;
+}
+
+/***
+Page breadcrumb
+***/
+
+.ie8 .row .page-breadcrumb.breadcrumb > li {
+ margin-right: 1px;
+}
+
+.page-content .page-breadcrumb.breadcrumb {
+ -webkit-border-radius: 0px;
+ -moz-border-radius: 0px;
+ border-radius: 0px;
+ box-shadow: none;
+ padding-right: 30px;
+ padding-left: 8px;
+ margin-top: 15px;
+ margin-bottom: 25px;
+ border:0px !important;
+ background-color: #fff;
+}
+
+.page-content .page-breadcrumb.breadcrumb > li > a,
+.page-content .page-breadcrumb.breadcrumb > li > i,
+.page-content .page-breadcrumb.breadcrumb > li > span {
+ color: #333;
+ font-size: 14px;
+ text-shadow:none;
+}
+
+.page-content .page-breadcrumb.breadcrumb > li > i {
+ color: #666;
+}
+
+.page-content .page-breadcrumb.breadcrumb > li+li:before {
+ display: none;
+}
+
+/* Dashboard breadcrumb Dropdown */
+.page-content .page-breadcrumb.breadcrumb .more-botton-zone .btn-group {
+ right: 15px;
+ position: absolute;
+ margin-top: -8px;
+}
+.page-content .page-breadcrumb.breadcrumb .more-botton-zone {
+ position:inherit;
+}
+
+.page-content .page-breadcrumb.breadcrumb .more-botton-zone .btn-group .btn {
+ padding-top: 8px;
+ padding-bottom: 8px;
+ font-size: 12px;
+}
+
+/* Dashboard date range panel */
+.page-content .page-breadcrumb.breadcrumb .dashboard-date-range {
+ position: relative;
+ top: -8px;
+ margin-right: -30px;
+ display: none;
+ padding: 9px 9px 8px 9px;
+ cursor: pointer;
+ color: #fff;
+ background-color: #e02222;
+}
+
+/* hack for chrome and safari */
+@media all and (-webkit-min-device-pixel-ratio:0) {
+ .page-content .page-breadcrumb.breadcrumb .dashboard-date-range {
+ padding: 9px;
+ }
+}
+
+.page-content .page-breadcrumb.breadcrumb .dashboard-date-range > span {
+ font-size: 12px;
+ font-weight: 300;
+ color: #fff;
+ text-transform: uppercase;
+}
+
+.page-content .page-breadcrumb.breadcrumb .dashboard-date-range > .fa-calendar {
+ text-transform: none;
+ color: #fff;
+ margin-top: 0px;
+ font-size: 14px;
+}
+
+.page-content .page-breadcrumb.breadcrumb .dashboard-date-range > .fa-angle-down {
+ color:#fff;
+ font-size: 16px;
+}
+
+/***
+Footer
+***/
+
+.footer {
+ padding: 8px 20px 5px 20px;
+ font-size: 12px;
+}
+
+.footer:after,
+.footer:before {
+ content: "";
+ display: table;
+ line-height: 0;
+}
+
+.footer:after {
+ clear: both;
+}
+
+.footer .footer-inner {
+ float: left;
+ display: inline-block;
+}
+
+.footer .footer-tools {
+ float: right;
+ display: inline-block;
+}
+
+.footer .footer-tools .go-top {
+ display: block;
+ text-decoration: none;
+ cursor: pointer;
+ margin-top: -2px;
+ margin-right: 0px;
+ margin-bottom: 0px;
+ font-size: 16px;
+ padding: 0px 6px 0px 6px;
+}
+
+.footer .footer-tools .go-top i {
+ font-size: 22px;
+ margin-bottom: 5px;
+}
+
+
+/********************
+ GENERAL UI ELEMENTS
+*********************/
+
+/***
+Icon stuff
+***/
+i.icon, a.icon {
+ color: #999;
+ margin-right: 5px;
+ font-weight: normal;
+ font-size: 13px;
+}
+
+i.icon-black {
+ color: #000 !important;
+}
+
+a.icon:hover {
+ text-decoration: none;
+ -webkit-transition: all 0.1s ease-in-out;
+ -moz-transition: all 0.1s ease-in-out;
+ -o-transition: all 0.1s ease-in-out;
+ -ms-transition: all 0.1s ease-in-out;
+ transition: all 0.1s ease-in-out;
+ opacity: .4;
+ filter:alpha(opacity=40);
+}
+
+a.icon.huge i{
+ font-size: 16px !important;
+}
+
+i.big {
+ font-size: 20px;
+}
+
+i.warning {
+ color: #d12610;
+}
+
+i.critical {
+ color: #37b7f3;
+}
+
+i.normal {
+ color: #52e136;
+}
+
+/***
+Custom wells
+***/
+.well {
+ background-color: #fafafa;
+ border: 1px solid #eee;
+ -webkit-border-radius: 0px;
+ -moz-border-radius: 0px;
+ border-radius: 0px;
+ -webkit-box-shadow: none !important;
+ -moz-box-shadow: none !important;
+ box-shadow: none !important;
+}
+
+.well.mini {
+ padding: 7px !important;
+}
+
+/***
+Form stuff
+***/
+
+
+/***
+Bordered form layout
+***/
+
+/***
+Input icons
+***/
+
+/* input with right aligned and colored icons */
+
+/* input with left aligned icons */
+.input-icon {
+ position: relative;
+}
+
+
+.input-icon input {
+ padding-left: 33px !important;
+}
+
+.input-icon i {
+ color: #ccc;
+ display: block;
+ position: absolute;
+ margin: 11px 2px 4px 10px;
+ width: 16px;
+ height: 16px;
+ font-size: 16px;
+ text-align: center;
+}
+
+.input-icon.right input {
+ padding-left: 12px !important;
+ padding-right: 33px !important;
+}
+
+.input-icon.right i {
+ right: 8px;
+ float: right;
+}
+
+.has-success .input-icon > i {
+ color: #468847;
+}
+
+.has-warning .input-icon > i {
+ color: #c09853;
+}
+
+.has-error .input-icon > i {
+ color: #b94a48;
+}
+
+/***
+Portlets
+***/
+.portlet {
+ clear: both;
+ margin-top: 0px;
+ margin-bottom: 25px;
+ padding: 0px;
+}
+
+.portlet > .portlet-title {
+ margin-bottom: 15px;
+ border-bottom: 1px solid #eee;
+}
+
+.portlet > .portlet-title:after,
+.portlet > .portlet-title:before {
+ content: "";
+ display: table;
+ line-height: 0;
+}
+
+.portlet > .portlet-title:after {
+ clear: both;
+}
+
+.portlet > .portlet-title > .caption {
+ float: left;
+ display: inline-block;
+ font-size: 18px;
+ line-height: 18px;
+ font-weight: 400;
+ margin: 0;
+ padding: 0;
+ margin-bottom: 8px;
+}
+
+.portlet > .portlet-title > .caption > i {
+ float: left;
+ margin-top: 4px;
+ display: inline-block !important;
+ font-size: 13px;
+ margin-right: 5px;
+ color: #666;
+}
+
+.portlet.blue > .portlet-title > .caption,
+.portlet.green > .portlet-title > .caption,
+.portlet.yellow > .portlet-title > .caption,
+.portlet.red > .portlet-title > .caption,
+.portlet.purple > .portlet-title > .caption,
+.portlet.grey > .portlet-title > .caption {
+ color: #fff;
+}
+
+.portlet.box.blue > .portlet-title > .caption > i,
+.portlet.box.green > .portlet-title > .caption > i,
+.portlet.box.grey > .portlet-title > .caption > i,
+.portlet.box.yellow > .portlet-title > .caption > i,
+.portlet.box.red > .portlet-title > .caption > i,
+.portlet.box.purple > .portlet-title > .caption > i,
+.portlet.box.light-grey > .portlet-title > .caption > i{
+ color: #fff;
+}
+
+.sortable .portlet > .portlet-title {
+ cursor: move;
+}
+
+.portlet > .portlet-title > .tools,
+.portlet > .portlet-title > .actions
+ {
+ display: inline-block;
+ padding: 0;
+ margin: 0;
+ margin-top: 6px;
+ float: right;
+}
+
+.portlet > .portlet-title > .tools > a {
+ display: inline-block;
+ height: 16px;
+ margin-left:5px;
+}
+
+.portlet > .portlet-title > .actions > .dropdown-menu i {
+ color: #000 !important;
+}
+
+.portlet > .portlet-title > .tools > a.remove {
+ margin-bottom: 2px;
+ background-image:url(../image/portlet-remove-icon.png);
+ background-repeat: no-repeat;
+ width: 11px;
+}
+
+.portlet > .portlet-title > .tools > a.config {
+ margin-bottom: 2px;
+ background-image:url(../image/portlet-config-icon.png);
+ background-repeat: no-repeat;
+ width: 12px;
+}
+
+.portlet > .portlet-title > .tools > a.reload {
+ margin-bottom: 2px;
+ background-image:url(../image/portlet-reload-icon.png);
+ width: 13px;
+}
+
+.portlet > .portlet-title > .tools > a.expand {
+ margin-bottom: 2px;
+ background-image:url(../image/portlet-expand-icon.png);
+ width: 14px;
+}
+
+.portlet > .portlet-title > .tools > a.collapse {
+ margin-bottom: 2px;
+ background-image:url(../image/portlet-collapse-icon.png);
+ width: 14px;
+}
+
+.portlet > .portlet-title > .tools > a:hover {
+ text-decoration: none;
+ -webkit-transition: all 0.1s ease-in-out;
+ -moz-transition: all 0.1s ease-in-out;
+ -o-transition: all 0.1s ease-in-out;
+ -ms-transition: all 0.1s ease-in-out;
+ transition: all 0.1s ease-in-out;
+ opacity:.6;
+ filter:'alpha(opacity=60)';
+}
+
+.portlet > .portlet-title > .actions > .btn-group {
+ margin-top: -13px;
+}
+
+.portlet > .portlet-title > .actions > .btn {
+ padding: 4px 10px;
+ margin-top: -14px;
+}
+
+.portlet > .portlet-title > .actions > .btn-group > .btn {
+ padding: 4px 10px;
+ margin-top: -1px;
+}
+
+.portlet > .portlet-title > .actions > .btn.btn-sm {
+ padding: 3px 8px;
+ margin-top: -13px;
+}
+
+.portlet > .portlet-title > .actions > .btn-group > .btn-sm {
+ padding: 3px 8px;
+ margin-top: -1px;
+}
+
+.portlet > .portlet-title > .pagination.pagination-sm {
+ float: right !important;
+ display: inline-block !important;
+ margin: 0px;
+ margin-top: -4px;
+}
+
+@media (max-width: 767px) {
+ .portlet > .portlet-title > .actions.btn-set > .btn-group,
+ .portlet > .portlet-title > .actions.btn-set > .btn {
+ margin-top: 0px;
+ margin-bottom: 5px;
+ }
+}
+
+.portlet > .portlet-body {
+ clear: both;
+ padding: 0;
+}
+
+.portlet > .portlet-empty {
+ min-height: 125px;
+}
+
+.portlet > .portlet-body.light-blue, .portlet.light-blue {
+ background-color: #bfd5fa !important;
+}
+
+.portlet > .portlet-body.blue, .portlet.blue {
+ background-color: #4b8df8 !important;
+}
+
+.portlet > .portlet-body.red, .portlet.red {
+ background-color: #e02222 !important;
+}
+
+.portlet > .portlet-body.yellow, .portlet.yellow {
+ background-color: #ffb848 !important;
+}
+
+.portlet > .portlet-body.green, .portlet.green {
+ background-color: #35aa47 !important;
+}
+
+.portlet > .portlet-body.purple, .portlet.purple {
+ background-color: #852b99 !important;
+}
+
+.portlet > .portlet-body.light-grey, .portlet.light-grey {
+ background-color: #fafafa !important;
+}
+
+.portlet > .portlet-body.grey, .portlet.grey {
+ background-color: #555555 !important;
+}
+
+/* draggable girds */
+
+.ui-sortable-placeholder {
+ border: 1px dotted black;
+ visibility: visible !important;
+ height: 100% !important;
+}
+
+.ui-sortable-placeholder * {
+ visibility: hidden;
+}
+
+.sortable-box-placeholder {
+ background-color: #f5f5f5;
+ border: 1px dashed #DDDDDD;
+ display: block;
+ /* float: left;*/
+ margin-top: 0px !important;
+ margin-bottom: 24px !important;
+}
+
+.sortable-box-placeholder * {
+ visibility:hidden;
+}
+
+/***
+Solid colored portlet
+***/
+.portlet.solid {
+ padding: 10px;
+}
+
+.portlet.solid > .portlet-title > .tools {
+ margin-top: 2px;
+ border: 0px;
+}
+
+.portlet.solid > .portlet-title {
+ margin-bottom: 5px;
+ border: 0px;
+}
+
+.portlet.solid.bordered > .portlet-title {
+ margin-bottom: 15px;
+}
+
+.portlet.solid.red > .portlet-title,
+.portlet.solid.red > .portlet-title > .caption > i,
+.portlet.solid.red > .portlet-body,
+
+.portlet.solid.green > .portlet-title,
+.portlet.solid.green > .portlet-title > .caption > i,
+.portlet.solid.green > .portlet-body,
+
+.portlet.solid.yellow > .portlet-title,
+.portlet.solid.yellow > .portlet-title > .caption > i,
+.portlet.solid.yellow > .portlet-body,
+
+.portlet.solid.grey > .portlet-title,
+.portlet.solid.grey > .portlet-title > .caption > i,
+.portlet.solid.grey > .portlet-body,
+
+.portlet.solid.purple > .portlet-title,
+.portlet.solid.purple > .portlet-title > .caption > i,
+.portlet.solid.purple > .portlet-body,
+
+.portlet.solid.blue > .portlet-title,
+.portlet.solid.blue > .portlet-title > .caption > i,
+.portlet.solid.blue > .portlet-body {
+ border: 0;
+ color: #fff;
+}
+
+.portlet.bordered {
+ border-left: 2px solid #ddd;
+}
+
+/***
+Box portlet
+***/
+
+.portlet.box {
+ padding:0px !important
+}
+
+.portlet.box > .portlet-title {
+ padding:8px 10px 2px 10px;
+ border-bottom: 1px solid #eee;
+ color: #fff !important;
+}
+
+.portlet.box > .portlet-title > .tools {
+ margin-top: 3px;
+}
+
+.portlet.box > .portlet-title > .tools > a.remove,
+.portlet.solid > .portlet-title > .tools > a.remove {
+ background-image:url(../image/portlet-remove-icon-white.png);
+}
+
+.portlet.box > .portlet-title > .tools > a.config,
+.portlet.solid > .portlet-title > .tools > a.config {
+ background-image:url(../image/portlet-config-icon-white.png);
+}
+
+.portlet.box > .portlet-title > .tools > a.reload,
+.portlet.solid > .portlet-title > .tools > a.reload {
+ background-image:url(../image/portlet-reload-icon-white.png);
+}
+
+.portlet.box > .portlet-title > .tools > a.expand,
+.portlet.solid > .portlet-title > .tools > a.expand {
+ background-image:url(../image/portlet-expand-icon-white.png);
+}
+
+.portlet.box > .portlet-title > .tools > a.collapse,
+.portlet.solid > .portlet-title > .tools > a.collapse {
+ background-image:url(../image/portlet-collapse-icon-white.png);
+}
+
+/* portlet buttons */
+.portlet.box > .portlet-body {
+ background-color: #fff;
+ padding: 10px;
+}
+
+.portlet.box > .portlet-title {
+ margin-bottom: 0px;
+}
+
+.portlet.box.blue > .portlet-title {
+ background-color: #4b8df8;
+}
+
+.portlet.box.blue {
+ border: 1px solid #b4cef8;
+ border-top: 0;
+}
+
+.portlet.box.red > .portlet-title {
+ background-color: #e02222;
+}
+
+.portlet.box.red {
+ border: 1px solid #ef8476;
+ border-top: 0;
+}
+
+.portlet.box.yellow > .portlet-title {
+ background-color: #ffb848;
+}
+
+.portlet.box.yellow {
+ border: 1px solid #fccb7e;
+ border-top: 0;
+}
+
+.portlet.box.green > .portlet-title {
+ background-color: #35aa47;
+}
+
+.portlet.box.green {
+ border: 1px solid #77e588;
+ border-top: 0;
+}
+
+.portlet.box.purple > .portlet-title {
+ background-color: #852b99;
+}
+
+.portlet.box.purple {
+ border: 1px solid #af5cc1;
+ border-top: 0;
+}
+
+.portlet.box.grey > .portlet-title {
+ background-color: #555555;
+}
+
+.portlet.box.grey {
+ border: 1px solid #9d9c9c;
+ border-top: 0;
+}
+
+.portlet.box.light-grey > .portlet-title {
+ background-color: #aaa;
+}
+
+.portlet.box.light-grey {
+ border: 1px solid #bbb;
+ border-top: 0;
+}
+
+/***
+Charts and statistics
+***/
+.chart, .pie, .bars {
+ overflow: hidden;
+ height: 300px;
+}
+
+/***
+Statistic lists
+***/
+.item-list.table .percent {
+ width: 30px;
+ float: right;
+ margin-right: 10px;
+ margin-top: 3px;
+}
+
+/***
+Chart tooltips
+***/
+.chart-tooltip {
+ clear: both;
+ z-index: 100;
+ background-color: #736e6e !important;
+ padding: 5px !important;
+ color: #fff;
+}
+
+.chart-tooltip .label {
+ clear: both;
+ display: block;
+ margin-bottom: 2px;
+}
+
+/***
+Mini chart containers
+***/
+.bar-chart {
+ display: none
+}
+
+.line-chart {
+ display: none
+}
+
+/***
+Custom icon buttons
+***/
+.icon-btn {
+ height: 60px;
+ min-width: 80px;
+ margin: 5px 5px 0 0;
+ border: 1px solid #ddd;
+ padding: 12px 0px 0px 0px;
+ background-color: #fafafa !important;
+ background-image: none !important;
+ filter:none !important;
+ -webkit-box-shadow: none !important;
+ -moz-box-shadow: none !important;
+ box-shadow: none !important;
+ display:inline-block !important;
+ color: #646464 !important;
+ text-shadow: none !important;
+ text-align: center;
+ cursor: pointer;
+ position: relative;
+ -webkit-transition: all 0.3s ease !important;
+ -moz-transition: all 0.3s ease !important;
+ -ms-transition: all 0.3s ease !important;
+ -o-transition: all 0.3s ease !important;
+ transition: all 0.3s ease !important;
+}
+
+.icon-btn i {
+ font-size: 18px;
+}
+
+.ie8 .icon-btn:hover {
+ filter: none !important;
+}
+
+.icon-btn:hover {
+ text-decoration: none !important;
+ border-color: #999 !important;
+ color: #444 !important;
+ text-shadow: 0 1px 0px rgba(255, 255, 255, 1) !important;
+ -webkit-transition: all 0.3s ease !important;
+ -moz-transition: all 0.3s ease !important;
+ -ms-transition: all 0.3s ease !important;
+ -o-transition: all 0.3s ease !important;
+ transition: all 0.3s ease !important;
+ -webkit-box-shadow: none !important;
+ -moz-box-shadow: none !important;
+ box-shadow: none !important;
+}
+
+.icon-btn:hover .badge {
+ -webkit-transition: all 0.3s ease !important;
+ -moz-transition: all 0.3s ease !important;
+ -ms-transition: all 0.3s ease !important;
+ -o-transition: all 0.3s ease !important;
+ transition: all 0.3s ease !important;
+ -webkit-box-shadow: none !important;
+ -moz-box-shadow: none !important;
+ box-shadow: none !important;
+}
+
+.icon-btn div {
+ font-family: 'Open Sans', sans-serif;
+ margin-top: 5px;
+ margin-bottom: 20px;
+ color: #000;
+ font-size: 12px;
+ font-weight: 300;
+}
+
+.icon-btn .badge {
+ position: absolute;
+ font-family: 'Open Sans', sans-serif;
+ font-size: 11px !important;
+ font-weight: 300;
+ top: -5px;
+ right: -5px;
+ padding: 3px 6px 3px 6px;
+ color: white !important;
+ text-shadow: none;
+ border-width: 0;
+ border-style: solid;
+ -webkit-border-radius: 12px !important;
+ -moz-border-radius: 12px !important;
+ border-radius: 12px !important;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+}
+
+/* extended dropdowns */
+.dropdown-menu.extended {
+ min-width: 160px !important;
+ max-width: 300px !important;
+ width: 233px !important;
+ background-color: #ffffff !important;
+}
+
+.dropdown-menu.extended:before,
+.dropdown-menu.extended:after {
+ border-bottom-color: #ddd !important;
+}
+
+.dropdown-menu.extended li a{
+ display: block;
+ padding: 5px 10px !important;
+ clear: both;
+ font-weight: normal;
+ line-height: 20px;
+ white-space: normal !important;
+}
+
+.dropdown-menu.extended li i{
+ margin-right: 3px;
+}
+
+.dropdown-menu.extended li a{
+ font-size: 13px;
+ padding: 10px !important;
+ background-color: #ffffff;
+}
+
+.dropdown-menu.extended li a:hover {
+ background-image: none;
+ background-color: #f5f5f5;
+ color: #000;
+ filter:none;
+}
+
+.dropdown-menu.extended li p{
+ padding: 10px;
+ background-color: #eee;
+ margin: 0px;
+ font-size: 14px;
+ font-weight: 300;
+ color: #000;
+}
+
+.dropdown-menu.extended li a{
+ padding: 7px 0 5px 0px;
+ list-style: none;
+ border-bottom: 1px solid #f4f4f4 !important;
+ font-size: 12px;
+ text-shadow: none;
+}
+
+.dropdown-menu.extended li:first-child a {
+ border-top: none;
+ border-bottom: 1px solid #f4f4f4 !important;
+}
+
+.dropdown-menu.extended li:last-child a {
+ border-top: 1px solid white !important;
+ border-bottom: 1px solid #f4f4f4 !important;
+}
+
+.dropdown-menu.extended li.external > a {
+ font-size: 13px;
+ font-weight: 400;
+}
+
+.dropdown-menu.extended li.external > a > i{
+ margin-top: 3px;
+ float: right;
+}
+
+/* header notifications dropdowns */
+.dropdown-menu .dropdown-menu-list.scroller {
+ padding-right: 0 !important;
+ padding-left: 0;
+ list-style: none;
+}
+
+.dropdown-menu.notification li > a .time {
+ font-size: 12px;
+ font-weight: 600;
+ text-align: right;
+ font-style: italic;
+}
+
+/* header inbox dropdowns */
+.dropdown-menu.inbox li > a .photo {
+ float: left;
+ padding-right: 6px;
+}
+
+.dropdown-menu.inbox li > a .photo > img {
+ height: 40px;
+ width: 40px;
+}
+
+.dropdown-menu.inbox li > a .subject {
+ display: block;
+}
+
+.dropdown-menu.inbox li > a .subject .from {
+ font-size: 14px;
+ font-weight: 400;
+ color: #02689b;
+}
+
+.dropdown-menu.inbox li > a .subject .time {
+ font-size: 12px;
+ font-weight: 600;
+ font-style: italic;
+ position: relative;
+ float: right;
+}
+
+.dropdown-menu.inbox li > a .message {
+ display: block !important;
+ font-size: 12px;
+}
+
+/* header tasks */
+.dropdown-menu.tasks .task {
+ margin-bottom: 5px;
+}
+
+.dropdown-menu.tasks .task .desc {
+ font-size: 13px;
+ font-weight: 300;
+}
+
+.dropdown-menu.tasks .task .percent {
+ font-size: 14px;
+ font-weight: 600;
+ font-family: 'Open Sans', sans-serif;
+ float: right;
+ display: inline-block;
+}
+
+.dropdown-menu.tasks .progress {
+ display: block;
+ height: 11px;
+ margin: 0px;
+}
+
+/***
+General list for item with image
+***/
+.item-list li .img {
+ height: 50px;
+ width: 50px;
+ float: left;
+ margin-top: 3px;
+ margin-right: 5px;
+}
+
+.item-list {
+ margin: 0px;
+ list-style: none;
+}
+
+.item-list li {
+ padding: 7px 0 5px 0px;
+ list-style: none;
+ border-top: 1px solid white;
+ border-bottom: 1px solid #EBEBEB;
+ font-size: 12px;
+}
+
+.item-list li:first-child {
+ border-top: none;
+ border-bottom: 1px solid #EBEBEB;
+}
+
+.item-list li:last-child {
+ border-top: none;
+ border-bottom: none;
+}
+
+.item-list li .label {
+ margin-right: 5px;
+}
+
+.item-list.todo li .label {
+ position: absolute;
+ right: 80px;
+}
+
+.item-list.todo li .actions {
+ position: absolute;
+ right: 45px;
+}
+
+/***
+Custom tables
+***/
+.table-toolbar {
+ margin-bottom: 15px;
+}
+
+.table.table-full-width {
+ width: 100% !important;
+}
+
+.table .m-btn {
+ margin-top: 0px;
+ margin-left: 0px;
+ margin-right: 5px;
+}
+
+.table thead tr th {
+ font-size: 14px;
+ font-weight: 600;
+}
+
+.table-advance {
+ margin-bottom: 10px !important;
+}
+
+.table-advance thead {
+ color: #999;
+}
+
+.table-advance thead tr th{
+ background-color: #DDD;
+ font-size: 14px;
+ font-weight: 400;
+ color: #666;
+}
+
+.table-advance div.success,
+.table-advance div.info,
+.table-advance div.important,
+.table-advance div.warning,
+.table-advance div.danger {
+ position: absolute;
+ margin-top:-5px;
+ float: left;
+ width: 2px;
+ height: 30px;
+ margin-right: 20px !important;
+}
+
+.table-advance tr td {
+ border-left-width: 0px;
+}
+.table-advance tr td:first-child {
+ border-left-width: 1px !important;
+}
+
+.table-advance tr td.highlight:first-child a {
+ margin-left: 15px;
+}
+
+.table-advance td.highlight div.success {
+ border-left: 2px solid #66ee66;
+}
+
+.table-advance td.highlight div.info {
+ border-left: 2px solid #87ceeb;
+}
+
+.table-advance td.highlight div.important {
+ border-left: 2px solid #f02c71;
+}
+
+.table-advance td.highlight div.warning {
+ border-left: 2px solid #fdbb39;
+}
+
+.table-advance td.highlight div.danger {
+ border-left: 2px solid #e23e29;
+}
+
+/***
+Star rating
+***/
+.rating {
+ unicode-bidi: bidi-override;
+ direction: rtl;
+ font-size: 30px;
+}
+
+.rating span.star {
+ font-family: FontAwesome;
+ font-weight: normal;
+ font-style: normal;
+ display: inline-block;
+}
+
+.rating span.star:hover {
+ cursor: pointer;
+}
+
+.rating span.star:before {
+ content: "\f006";
+ padding-right: 5px;
+ color: #999999;
+}
+
+.rating span.star:hover:before,
+.rating span.star:hover ~ span.star:before {
+ content: "\f005";
+ color: #e3cf7a;
+}
+
+
+/***
+Item block with details shown on hover
+***/
+.item {
+ overflow: hidden;
+ display: block;
+ margin-bottom: 20px;
+}
+
+.item .details {
+ width: 100%;
+ display: none;
+ background-color: #000;
+ color: #fff !important;
+ padding: 5px;
+ text-align: center;
+ position: relative;
+ bottom:30px;
+ margin-bottom:-30px;
+ overflow: hidden;
+ z-index: 6;
+}
+
+.item:hover .details {
+ display: block;
+ opacity: 0.7;
+ filter: alpha(opacity = 70);
+}
+
+.item:hover .zoom-icon{
+ opacity:0.5;
+ filter: alpha(opacity = 50);
+}
+
+/***
+Zoom icon overlay on images
+***/
+.zoom {
+ cursor: pointer;
+ width: 100%;
+ height: 100%;
+ position: relative;
+ z-index: 5;
+}
+
+.zoom .zoom-icon {
+ background-image:url("../image/overlay-icon.png");
+ background-color: #222;
+ background-repeat: no-repeat;
+ background-position: 50%;
+ position: absolute;
+ width: inherit;
+ height: inherit;
+ opacity: 0;
+ filter: alpha(opacity = 0);
+ z-index: 6;
+ top:0;
+}
+
+/***
+Chats
+***/
+.chats {
+ margin:0;
+ padding: 0;
+ margin-top: -15px;
+}
+
+.chats li {
+ list-style: none;
+ padding: 5px 0;
+ margin: 10px auto;
+ font-size: 12px;
+}
+
+.chats li img.avatar {
+ height: 45px;
+ width: 45px;
+ -webkit-border-radius: 50% !important;
+ -moz-border-radius: 50% !important;
+ border-radius: 50% !important;
+}
+
+.chats li.in img.avatar {
+ float: left;
+ margin-right: 10px;
+}
+
+.chats li .name {
+ color:#3590c1;
+ font-size: 13px;
+ font-weight: 400;
+}
+
+.chats li .datetime {
+ color:#333;
+ font-size: 13px;
+ font-weight: 400;
+}
+
+.chats li.out img.avatar {
+ float: right;
+ margin-left: 10px;
+}
+
+.chats li .message {
+ display: block;
+ padding: 5px;
+ position: relative;
+}
+
+.chats li.in .message {
+ text-align: left;
+ border-left: 2px solid #35aa47;
+ margin-left: 65px;
+ background: #fafafa
+}
+
+.chats li.in .message .arrow {
+ display: block;
+ position: absolute;
+ top: 5px;
+ left: -8px;
+ width: 0;
+ height: 0;
+
+ border-top: 8px solid transparent;
+ border-bottom: 8px solid transparent;
+ border-right: 8px solid #35aa47;
+}
+
+.chats li.out .message .arrow {
+ display: block;
+ position: absolute;
+ top: 5px;
+ right: -8px;
+ border-top: 8px solid transparent;
+ border-bottom: 8px solid transparent;
+ border-left: 8px solid #da4a38;
+}
+
+.chats li.out .message {
+ border-right: 2px solid #da4a38;
+ margin-right: 65px;
+ background: #fafafa;
+ text-align: right;
+}
+
+.chats li.out .name,
+.chats li.out .datetime {
+ text-align: right;
+}
+
+.chats li .message .body {
+ display: block;
+}
+
+.chat-form {
+ margin-top: 15px;
+ padding: 10px;
+ background-color: #e9eff3;
+ overflow: hidden;
+ clear: both;
+}
+
+.chat-form .input-cont {
+ margin-right: 40px;
+}
+
+.chat-form .input-cont .form-control {
+ width: 100% !important;
+ margin-bottom: 0px;
+}
+
+.chat-form .input-cont input{
+ border: 1px solid #ddd;
+ width: 100% !important;
+ margin-top: 0;
+}
+
+.chat-form .input-cont input {
+ background-color: #fff !important;
+}
+
+.chat-form .input-cont input:focus{
+ border: 1px solid #4b8df9 !important;
+}
+
+.chat-form .btn-cont {
+ margin-top: -42px;
+ position: relative;
+ float: right;
+ width:44px;
+}
+
+.chat-form .btn-cont .arrow {
+ position: absolute;
+ top: 17px;
+ right: 43px;
+ border-top: 8px solid transparent;
+ border-bottom: 8px solid transparent;
+ border-right: 8px solid #4d90fe;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+.chat-form .btn-cont:hover .arrow {
+ border-right-color: #0362fd;
+}
+
+.chat-form .btn-cont:hover .btn {
+ background-color: #0362fd;
+}
+
+.chat-form .btn-cont .btn {
+ margin-top: 8px;
+}
+
+/***
+System feeds
+***/
+.feeds {
+ margin: 0px;
+ padding: 0px;
+ list-style: none;
+}
+
+.feeds li {
+ background-color: #fafafa;
+ margin-bottom: 7px;
+}
+
+.feeds li:before,
+.feeds li:after {
+ display: table;
+ line-height: 0;
+ content: "";
+}
+
+.feeds li:after {
+ clear: both;
+}
+
+.feeds li:last-child {
+ margin-bottom: 0px;
+}
+
+.feeds .col1 {
+ float:left;
+ width:100%;
+ clear: both;
+}
+
+.feeds .col2 {
+ float:left;
+ width:75px;
+ margin-left:-75px;
+}
+
+.feeds .col1 .cont {
+ float:left;
+ margin-right:75px;
+ overflow:hidden;
+}
+
+.feeds .col1 .cont .cont-col1 {
+ float:left;
+ margin-right:-100%;
+}
+
+.feeds .col1 .cont .cont-col1 .label {
+ display: inline-block;
+ padding: 5px 4px 6px 5px;
+ vertical-align: middle;
+ text-align: center;
+}
+.feeds .col1 .cont .cont-col1 .label > i {
+ text-align: center;
+ font-size: 14px;
+}
+
+.feeds .col1 .cont .cont-col2 {
+ float:left;
+ width:100%;
+}
+
+.feeds .col1 .cont .cont-col2 .desc {
+ margin-left:35px;
+ padding-top: 4px;
+ padding-bottom: 5px;
+ overflow:hidden;
+}
+
+.feeds .col2 .date {
+ padding: 4px 9px 5px 4px;
+ text-align: right;
+ font-style: italic;
+ color:#c1cbd0;
+}
+
+/***
+Users
+***/
+.user-info {
+ margin-bottom: 10px !important;
+}
+
+.user-info img {
+ float: left;
+ margin-right: 5px;
+}
+
+.user-info .details {
+ display: inline-block;
+}
+
+.user-info .label {
+ font-weight: 300;
+ font-size: 11px;
+}
+
+/***
+Accordions
+***/
+.accordion-heading {
+ background:#eee;
+}
+
+.accordion-heading a {
+ text-decoration:none;
+}
+
+.accordion-heading a:hover {
+ text-decoration:none;
+}
+
+/***
+Vertical inline menu
+***/
+.ver-inline-menu {
+ padding: 0;
+ margin: 0;
+ list-style: none;
+}
+
+.ver-inline-menu li {
+ position:relative;
+ margin-bottom:1px;
+}
+
+.ver-inline-menu li i {
+ width: 37px;
+ height: 37px;
+ display: inline-block;
+ color:#b9cbd5;
+ font-size:15px;
+ padding:12px 10px 10px 8px;
+ margin:0 8px 0 0;
+ text-align: center;
+ background:#e0eaf0 !important;
+}
+
+.ver-inline-menu li a {
+ font-size: 13px;
+ color:#557386;
+ display:block;
+ background:#f0f6fa;
+ border-left:solid 2px #c4d5df;
+}
+
+.ver-inline-menu li:hover a,
+.ver-inline-menu li:hover i {
+ background:#e0eaf0;
+ text-decoration:none;
+}
+
+.ver-inline-menu li:hover i {
+ color:#fff;
+ background:#c4d5df !important;
+}
+
+.ver-inline-menu li.active a,
+.ver-inline-menu li:hover a {
+ font-size: 13px;
+}
+
+.ver-inline-menu li.active a {
+ border-left:solid 2px #0c91e5;
+}
+
+.ver-inline-menu li.active a,
+.ver-inline-menu li.active i {
+ color:#fff;
+ background:#169ef4;
+ text-decoration:none;
+}
+
+.ver-inline-menu li.active i {
+ background:#0c91e5 !important;
+}
+
+.ver-inline-menu li.active:after {
+ content: '';
+ display: inline-block;
+ border-bottom: 6px solid transparent;
+ border-top: 6px solid transparent;
+ border-left: 6px solid #169ef4;
+ position: absolute;
+ top: 12px;
+ right: -5px;
+}
+
+/***
+Custom tabs
+***/
+.nav-tabs > li > a > .badge,
+.nav-pills > li > a > .badge {
+ margin-top: -3px;
+}
+
+.nav-tabs > li > a,
+.nav-pills > li > a {
+ font-size: 14px;
+}
+
+.nav-tabs-sm > li > a,
+.nav-pills-sm > li > a {
+ font-size: 13px;
+}
+
+.tabbable-custom {
+ margin-bottom: 15px;
+ padding: 0px;
+ overflow: hidden;
+}
+
+.tabbable-custom > .nav-tabs {
+ border: none;
+ margin: 0px;
+}
+
+.tabbable-custom > .tab-content {
+ background-color: #fff;
+ border: 1px solid #ddd;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+ padding: 10px;
+}
+
+.tabbable-custom.nav-justified .tab-content {
+ margin-top: -1px;
+}
+
+.tabs-below.tabbable-custom.nav-justified .tab-content {
+ margin-top: 0px;
+ margin-bottom: -2px;
+}
+
+.tabbable-custom.boxless > .tab-content {
+ padding:15px 0;
+ border-left:none;
+ border-right:none;
+ border-bottom:none;
+}
+
+.tabbable-custom .nav-tabs > li {
+ margin-right: 2px;
+ border-top: 2px solid transparent;
+}
+
+.tabbable-custom .nav-tabs > li > a {
+ margin-right: 0;
+ }
+
+.tabbable-custom .nav-tabs > li > a:hover {
+ background: none;
+ border-color:transparent;
+}
+
+.tabbable-custom .nav-tabs > li.active {
+ border-top: 3px solid #d12610;
+ margin-top: 0;
+ position: relative;
+}
+
+.tabbable-custom .nav-tabs > li.active > a {
+ border-top: none;
+ font-weight: 400;
+}
+
+.tabbable-custom .nav-tabs > li.active > a:hover {
+ border-top: none;
+ background: #fff;
+ border-color: #d4d4d4 #d4d4d4 transparent;
+}
+
+.tabbable-custom .nav-tabs > li {
+ margin-right: 2px;
+ border-top: 2px solid transparent;
+}
+
+/* below tabs */
+
+.tabs-below.tabbable-custom .nav-tabs > li > a {
+ border-top: none;
+ border-bottom: 2px solid transparent;
+ margin-top: -1px;
+}
+
+.tabs-below.tabbable-custom .nav-tabs > li.active {
+ border-top: none;
+ border-bottom: 3px solid #d12610;
+ margin-bottom: 0;
+ position: relative;
+}
+
+.tabs-below.tabbable-custom .nav-tabs > li.active > a {
+ border-bottom: none
+}
+
+.tabs-below.tabbable-custom .nav-tabs > li.active > a:hover {
+ background: #fff;
+ border-color: #d4d4d4 #d4d4d4 transparent;
+}
+
+/*full width tabs with bigger titles */
+.tabbable-custom.tabbable-full-width > .tab-content {
+ padding:15px 0;
+ border-left:none;
+ border-right:none;
+ border-bottom:none;
+}
+
+.tabbable-custom.tabbable-full-width .nav-tabs > li > a {
+ color:#424242;
+ font-size:15px;
+ padding:9px 15px;
+}
+
+/***
+Custom portlet tabs
+***/
+
+.portlet-tabs > .nav-tabs {
+ position: relative;
+ top: -41px;
+ margin-right: 10px;
+ overflow: hidden;
+}
+
+.portlet-tabs > .nav-tabs > li {
+ float: right;
+}
+
+.portlet-tabs > .nav-tabs {
+ border-bottom: none;
+}
+
+.portlet-tabs > .nav-tabs > li > a {
+ color: #fff;
+ padding-top: 8px;
+ padding-bottom: 10px;
+ line-height: 16px;
+ margin-top: 6px;
+ margin-left: 0px;
+ margin-right: 0px;
+ border-left: 0;
+ border-right: 0;
+ -webkit-border-radius: 0px;
+ -moz-border-radius: 0px;
+ border-radius: 0px;
+}
+
+.portlet-tabs > .nav-tabs > li:last-child > a {
+ border-right:0;
+}
+
+.portlet-tabs > .nav-tabs > li {
+ margin-left: 1px;
+}
+
+.portlet-tabs > .nav-tabs > li.active {
+ color: #333;
+ border-top-color: transparent;
+}
+
+.portlet-tabs > .nav-tabs > li.active > a {
+ margin-bottom: 0px;
+ border-bottom: 0;
+ margin-left: 0px;
+ margin-right: 0px;
+ border-left: 0;
+ border-right: 0;
+ border-top-color:transparent !important;
+}
+
+.portlet-tabs > .nav-tabs > li > a:hover {
+ color: #333;
+ margin-bottom: 0;
+ border-bottom-color: transparent;
+ margin-left: 0;
+ margin-right: 0;
+ border-left: 0;
+ border-right: 0;
+ border-top-color:transparent;
+ background-color: #fff;
+}
+
+.portlet-tabs > .nav-tabs > .active > a {
+ color: #555555;
+ cursor: default;
+ background-color: #fff;
+}
+
+.portlet-tabs > .nav-tabs > .active > a:hover {
+ background-color: #fff !important;
+}
+
+.portlet-tabs > .tab-content {
+ padding: 10px !important;
+ margin: 0px;
+ margin-top: -50px !important;
+}
+
+.portlet.tabbable .portlet-body {
+ padding: 0px;
+}
+
+.tab-pane > p:last-child {
+ margin-bottom: 0px;
+}
+
+/* reverse aligned tabs */
+
+.tabs-reversed > li {
+ float: right;
+}
+
+.tabs-reversed > li,
+.tabs-reversed > li > a {
+ margin-right: 0;
+}
+
+/***
+Dashboard container
+***/
+
+#dashboard {
+ overflow: hidden;
+}
+
+/***
+Dashboard stats
+***/
+.dashboard-stat {
+ margin-bottom: 25px;
+}
+
+.portlet .dashboard-stat:last-child {
+ margin-bottom: 0;
+}
+
+.dashboard-stat:before,
+.dashboard-stat:after {
+ display: table;
+ line-height: 0;
+ content: "";
+}
+.dashboard-stat:after {
+ clear: both;
+}
+
+.dashboard-stat .visual {
+ width: 80px;
+ height:80px;
+ display: block;
+ float: left;
+ padding-top: 10px;
+ padding-left: 15px;
+ margin-bottom: 10px;
+}
+
+.dashboard-stat .visual i {
+ font-size: 65px;
+ line-height: 65px;
+ color: #fff;
+}
+
+.dashboard-stat .visual {
+ font-size: 35px;
+ line-height: 35px;
+}
+
+@media (min-width: 992px) and (max-width: 1024px) {
+
+ .dashboard-stat .visual i {
+ font-size: 28px;
+ line-height: 28px;
+ }
+
+}
+
+.dashboard-stat .details {
+ position: absolute;
+ right: 15px;
+ padding-right: 10px;
+}
+
+.dashboard-stat .details .number {
+ padding-top: 15px;
+ text-align: right;
+ font-size: 34px;
+ line-height: 34px;
+ letter-spacing: -1px;
+ margin-bottom: 5px;
+ font-weight: 300;
+ color: #fff;
+}
+
+.dashboard-stat .details .desc {
+ text-align: right;
+ font-size: 16px;
+ letter-spacing: 0px;
+ font-weight: 300;
+ color: #fff;
+}
+
+.dashboard-stat .more {
+ clear: both;
+ display: block;
+ padding: 5px 10px 5px 10px;
+ text-transform: uppercase;
+ font-weight: 300;
+ font-size: 11px;
+ color: #fff;
+ opacity: 0.7;
+ filter: alpha(opacity=70);
+}
+
+.dashboard-stat .more:hover {
+ text-decoration: none;
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
+
+.dashboard-stat .more > i {
+ display: inline-block;
+ margin-top: 1px;
+ float: right;
+}
+
+.dashboard-stat.blue {
+ background-color: #27a9e3;
+}
+
+.dashboard-stat.blue .more {
+ background-color: #208dbe;
+}
+
+.dashboard-stat.green {
+ background-color: #28b779;
+}
+
+.dashboard-stat.green .more {
+ background-color: #10a062;
+}
+
+.dashboard-stat.red {
+ background-color: #e7191b;
+}
+
+.dashboard-stat.red .more {
+ background-color:#bc0d0e;
+}
+
+.dashboard-stat.yellow {
+ background-color: #ffb848;
+}
+
+.dashboard-stat.yellow .more {
+ background-color: #cb871b;
+}
+
+.dashboard-stat.purple {
+ background-color: #852b99;
+}
+
+.dashboard-stat.purple .more {
+ background-color: #6e1881;
+}
+
+/***
+Text Stats
+***/
+
+.text-stat h3 {
+ margin-top: 5px;
+ margin-bottom: 0px;
+ font-size: 18px;
+}
+
+.text-stat span {
+ font-size: 12px;
+ text-transform: uppercase;
+}
+
+@media (max-width: 767px) {
+
+ .text-stat {
+ margin-top: 20px;
+ }
+
+}
+
+/***
+Tiles(new in v1.1.1)
+***/
+
+.tiles {
+ margin-right: -10px;
+}
+
+.tiles:before,
+.tiles:after {
+ display: table;
+ content: " ";
+}
+
+.tiles:after {
+ clear: both;
+}
+
+.tile {
+ display: block;
+ letter-spacing: 0.02em;
+ float: left;
+ height: 135px;
+ width: 135px !important;
+ cursor: pointer;
+ text-decoration: none;
+ color: #ffffff;
+ position: relative;
+ font-weight: 300;
+ font-size: 12px;
+ letter-spacing: 0.02em;
+ line-height: 20px;
+ overflow: hidden;
+ border: 4px solid transparent;
+ margin: 0 10px 10px 0;
+}
+
+.tile:after,
+.tile:before {
+ content: "";
+ float: left;
+}
+
+.tile.double {
+ width: 280px !important;
+}
+
+.tile.double-down {
+ height: 280px !important;
+}
+
+.tile:active, .tile.selected {
+ border-color: #ccc !important;
+}
+
+.tile:hover {
+ border-color: #aaa !important;
+}
+
+.tile.selected .corner:after {
+ content: "";
+ display: inline-block;
+ border-left: 40px solid transparent;
+ border-bottom: 40px solid transparent;
+ border-right: 40px solid #ccc;
+ position: absolute;
+ top: -3px;
+ right: -3px;
+}
+
+.tile.selected .check:after {
+ content: "";
+ font-family: FontAwesome;
+ font-size: 13px;
+ content: "\f00c";
+ display: inline-block;
+ position: absolute;
+ top: 2px;
+ right: 2px;
+}
+
+.tile * {
+ color: #ffffff;
+}
+
+.tile .tile-body {
+ height: 100%;
+ vertical-align: top;
+ padding: 10px 10px;
+ overflow: hidden;
+ position: relative;
+ font-weight: 400;
+ font-size: 12px;
+ color: #000000;
+ color: #ffffff;
+ margin-bottom: 10px;
+}
+
+.tile .tile-body img {
+ float: left;
+ margin-right: 10px;
+}
+
+.tile .tile-body img.pull-right {
+ float: right !important;
+ margin-left: 10px;
+ margin-right: 0px;
+}
+
+.tile .tile-body .content {
+ display: inline-block;
+}
+
+.tile .tile-body > i {
+ margin-top: 17px;
+ display: block;
+ font-size: 56px;
+ line-height: 56px;
+ text-align: center;
+}
+
+
+.tile.double-down i {
+ margin-top: 95px;
+}
+
+.tile .tile-body h1,
+.tile .tile-body h2,
+.tile .tile-body h3,
+.tile .tile-body h4,
+.tile .tile-body h5,
+.tile .tile-body h6,
+.tile .tile-body p {
+ padding: 0;
+ margin: 0;
+ line-height: 14px;
+}
+
+.tile .tile-body h3,
+.tile .tile-body h4 {
+ margin-bottom: 5px;
+}
+
+.tile .tile-body h1:hover,
+.tile .tile-body h2:hover,
+.tile .tile-body h3:hover,
+.tile .tile-body h4:hover,
+.tile .tile-body h5:hover,
+.tile .tile-body h6:hover,
+.tile .tile-body p:hover {
+ color: #ffffff;
+}
+
+.tile .tile-body p {
+ font-weight: 400;
+ font-size: 13px;
+ color: #000000;
+ color: #ffffff;
+ line-height: 20px;
+ overflow: hidden;
+}
+
+.tile .tile-body p:hover {
+ color: rgba(0, 0, 0, 0.8);
+}
+
+.tile .tile-body p:active {
+ color: rgba(0, 0, 0, 0.4);
+}
+
+.tile .tile-body p:hover {
+ color: #ffffff;
+}
+
+.tile.icon > .tile-body {
+ padding: 0;
+}
+
+.tile .tile-object {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ min-height: 30px;
+ background-color: transparent;
+ *zoom: 1;
+}
+
+.tile .tile-object:before,
+.tile .tile-object:after {
+ display: table;
+ content: "";
+}
+
+.tile .tile-object:after {
+ clear: both;
+}
+
+.tile .tile-object > .name {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ margin-bottom: 5px;
+ margin-left: 10px;
+ margin-right: 15px;
+ font-weight: 400;
+ font-size: 13px;
+ color: #ffffff;
+}
+
+.tile .tile-object > .name > i {
+ vertical-align: middle;
+ display: block;
+ font-size: 24px;
+ height: 18px;
+ width: 24px;
+}
+
+.tile .tile-object > .number {
+ position: absolute;
+ bottom: 0;
+ right: 0;
+ margin-bottom: 0;
+ color: #ffffff;
+ text-align: center;
+ font-weight: 600;
+ font-size: 14px;
+ letter-spacing: 0.01em;
+ line-height: 14px;
+ margin-bottom: 8px;
+ margin-right: 10px;
+}
+
+.tile.image > .tile-body {
+ padding: 0 !important;
+}
+
+.tile.image > .tile-body > img{
+ width: 100%;
+ height: auto;
+ min-height: 100%;
+ max-width: 100%;
+}
+
+.tile.image .tile-body h3 {
+ display: inline-block;
+}
+
+/***
+Theme Panel
+***/
+
+.theme-panel {
+ width: 400px;
+ margin-top: 0px;
+ margin-right: 1px;
+ z-index: 999;
+ float: right;
+ position:relative;
+}
+
+.theme-panel > .toggler {
+ top:4px;
+ right:0;
+ padding:20px;
+ cursor:pointer;
+ position:absolute;
+ background:#c9c9c9 url(../image/icon-color.png) center no-repeat;
+}
+
+.theme-panel > .toggler:hover {
+ background-color: #3d3d3d !important;
+}
+
+.theme-panel > .toggler-close {
+ display: none;
+ top:4px;
+ right:0;
+ padding:20px;
+ cursor:pointer;
+ position:absolute;
+ background: #3d3d3d url(../image/icon-color-close.png) center no-repeat !important;
+}
+
+.theme-panel > .toggler-close:hover {
+ background-color:#222 !important;
+}
+
+.theme-panel > .theme-options {
+ top:4px;
+ right:40px;
+ display:none;
+ position:absolute;
+ background:#3d3d3d;
+}
+
+.theme-panel > .theme-options > .theme-option {
+ color:#cfcfcf;
+ padding: 15px;
+ border-top:1px solid #585858;
+ margin-top: 0px;
+ margin-bottom: 0px;
+}
+
+.theme-panel > .theme-options > .theme-option.theme-colors {
+ border-top: 0;
+}
+
+.theme-panel > .theme-options > .theme-option > span {
+ text-transform:uppercase;
+ display: inline-block;
+ width: 138px;
+ font-size: 14px;
+}
+
+.theme-panel > .theme-options > .theme-option.theme-colors > span {
+ display: block;
+ width: auto;
+}
+
+.theme-panel > .theme-options > .theme-option > select.form-control {
+ display: inline;
+ width: 100px;
+ text-transform: lowercase;
+}
+
+.theme-panel > .theme-options > .theme-option.theme-colors > ul {
+ list-style:none;
+ padding: 0;
+ display: block;
+ margin-bottom: 1px !important;
+ margin-top: 10px;
+}
+
+.theme-panel > .theme-options > .theme-option.theme-colors > ul > li {
+ width:37px;
+ height:37px;
+ margin:0 4px;
+ cursor:pointer;
+ list-style:none;
+ float: left;
+ border:solid 1px #707070;
+}
+
+.theme-panel > .theme-options > .theme-option.theme-colors > ul > li:first-child {
+ margin-left: 0;
+}
+
+.theme-panel > .theme-options > .theme-option.theme-colors > ul > li:hover,
+.theme-panel > .theme-options > .theme-option.theme-colors > ul > li.current {
+ border:solid 2px #ebebeb;
+}
+
+.theme-panel > .theme-options > .theme-option.theme-colors > ul > li.color-black {
+ background:#333438;
+}
+
+.theme-panel > .theme-options > .theme-option.theme-colors > ul > li.color-grey {
+ background:#6d6d6d;
+}
+
+.theme-panel > .theme-options > .theme-option.theme-colors > ul > li.color-ztebluelight {
+ background:#3366cc;
+}
+.theme-panel > .theme-options > .theme-option.theme-colors > ul > li.color-ztebluelight {
+ background:#1ab3ec;
+}
+
+.theme-panel > .theme-options > .theme-option.theme-colors > ul > li.color-blue {
+ background:#124f94;
+}
+
+.theme-panel > .theme-options > .theme-option.theme-colors > ul > li.color-brown {
+ background:#623f18;
+}
+
+.theme-panel > .theme-options > .theme-option.theme-colors > ul > li.color-purple {
+ background:#701584;
+}
+
+.theme-panel > .theme-options > .theme-option.theme-colors > ul > li.color-white {
+ background:#fff;
+}
+
+/***
+Top bar menu
+***/
+
+/* enable arrow for dropdown menu */
+.header.navbar .nav > li > .dropdown-menu:before {
+ position: absolute;
+ top: -7px;
+ right: 9px;
+ display: inline-block !important;
+ border-right: 7px solid transparent;
+ border-bottom: 7px solid #ccc;
+ border-left: 7px solid transparent;
+ border-bottom-color: rgba(0, 0, 0, 0.2);
+ content: '';
+}
+
+.header.navbar .nav > li > .dropdown-menu:after {
+ position: absolute;
+ top: -6px;
+ right: 10px;
+ display: inline-block !important;
+ border-right: 6px solid transparent;
+ border-bottom: 6px solid #fff;
+ border-left: 6px solid transparent;
+ content: '';
+}
+
+/***
+Mega Menu(new in v1.6)
+***/
+
+.mega-menu .nav,
+.mega-menu .collapse,
+.mega-menu .mega-menu-dropup,
+.mega-menu .mega-menu-dropdown {
+ position: static;
+}
+.mega-menu .container {
+ position: relative;
+}
+.mega-menu .mega-menu-dropdown .dropdown-menu {
+ left: auto;
+ width: auto;
+}
+.mega-menu .nav.navbar-right .dropdown-menu {
+ left: auto;
+ right: 0;
+}
+.mega-menu .mega-menu-content {
+ padding: 10px;
+ margin: 0;
+}
+.mega-menu .mega-menu-full .dropdown-menu {
+ left: 20px;
+ right: 20px;
+}
+
+.mega-menu-responsive-content {
+ padding: 10px 15px 10px 60px;
+}
+
+.page-boxed .mega-menu .mega-menu-dropdown .dropdown-menu {
+ top: 42px;
+}
+
+.page-boxed .mega-menu .mega-menu-dropdown.mega-menu-full .dropdown-menu {
+ margin: 0;
+ padding: 0;
+ left: 18px;
+ right: 18px;
+}
+
+.mega-menu .mega-menu-submenu {
+ width: auto !important;
+ padding: 0px 30px 0px 0px !important;
+ margin: 0 !important;
+}
+
+
+ .mega-menu-content .row :last-child>ul{
+ border-right: 0 !important;
+}
+
+.mega-menu .mega-menu-submenu li > h3 {
+ font-size: 14px;
+ margin-top: 10px;
+ padding-left: 5px;
+}
+
+.mega-menu .mega-menu-submenu li {
+ padding: 2px !important;
+ margin: 0 !important;
+ list-style: none;
+}
+
+.mega-menu .mega-menu-submenu li > a {
+ padding: 5px !important;
+ margin: 0 !important;
+}
+
+/***
+Horezantal Menu(new in v1.2)
+***/
+
+.header.navbar .hor-menu {
+ margin: 0;
+ float: left;
+}
+
+.header.navbar .hor-menu ul.nav li > a {
+ font-size: 15px;
+ padding: 11px 10px;
+}
+
+.header.navbar .hor-menu ul.nav li.current .selected,
+.header.navbar .hor-menu ul.nav li.active .selected {
+ left: 50%;
+ bottom:0;
+ position: absolute;
+ border-left: 6px solid transparent;
+ border-right: 6px solid transparent;
+ /*border-top: 6px solid #e02222;*/
+ display: inline-block;
+ margin: 0;
+ width: 0px;
+ height:0px;
+ margin-left: -7px;
+ margin-bottom:-6px;
+}
+
+/*drop-down*/
+.header.navbar .hor-menu .dropdown-menu {
+ margin-top: 0;
+ border: none;
+ box-shadow: none;
+}
+
+.header.navbar .hor-menu .classic-menu-dropdown .dropdown-submenu > .dropdown-menu {
+ top: 0;
+}
+
+.header.navbar .hor-menu .classic-menu-dropdown .dropdown-submenu > a:after {
+ top: 8px;
+ margin-right: 0px;
+}
+
+.header.navbar .hor-menu .classic-menu-dropdown .dropdown-menu li > a {
+ padding: 7px 18px !important;
+ margin-bottom:1px;
+}
+
+.header.navbar .hor-menu .classic-menu-dropdown .dropdown-menu .arrow {
+ display: none;
+}
+
+.header.navbar .hor-menu .classic-menu-dropdown .dropdown-menu li > a:hover,
+.header.navbar .hor-menu .classic-menu-dropdown .dropdown-menu li:hover > a,
+.header.navbar .hor-menu .classic-menu-dropdown .dropdown-menu li.active > a {
+ filter:none !important;
+}
+
+.header.navbar .hor-menu .nav > li > .dropdown-menu:after,
+.header.navbar .hor-menu .nav > li > .dropdown-menu:before {
+ border-bottom: none !important;
+}
+
+/*search*/
+.header.navbar .hor-menu .hor-menu-search-form-toggler {
+ display: inline-block;
+ padding: 12px 22px 12px 22px !important;
+ cursor: pointer;
+ background: url(../image/hor-menu-search.png) no-repeat center;
+}
+
+.header.navbar .hor-menu .hor-menu-search-form-toggler:hover {
+ opacity: 0.8;
+ filter: alpha(opacity=80);
+}
+
+.header.navbar .hor-menu a.hor-menu-search-form-toggler-close {
+ display: none;
+}
+
+.header.navbar .hor-menu .search-form {
+ margin: 0;
+ top:42px;
+ right:0px;
+ padding:0 4px;
+ display:none;
+ z-index:999;
+ position:absolute;
+}
+
+.header.navbar .hor-menu .search-form .btn {
+ padding: 7px 20px;
+ height: 32px;
+ width: 10px;
+ display: inline-block;
+}
+
+.header.navbar .hor-menu .search-form .btn:hover {
+ opacity: 0.8;
+ filter: alpha(opacity=80);
+}
+
+.header.navbar .hor-menu .search-form form {
+ margin-bottom: 0;
+}
+
+.header.navbar .hor-menu .search-form form input {
+ background: none;
+ width: 200px;
+ border: none;
+ margin-top: 6px;
+}
+
+/***
+Top News Blocks(new in v1.2.2)
+***/
+.top-news {
+ color: #fff;
+ margin: 8px 0;
+}
+
+.top-news a,
+.top-news em,
+.top-news span {
+ display: block;
+ text-align: left;
+}
+
+.top-news a {
+ padding: 10px;
+ position: relative;
+ margin-bottom: 10px;
+}
+
+.top-news a .top-news-icon {
+ right: 8px;
+ bottom: 15px;
+ opacity:0.3;
+ font-size: 35px;
+ position: absolute;
+ filter: alpha(opacity=30); /*For IE8*/
+}
+
+.top-news em {
+ margin-bottom: 0;
+ font-style: normal;
+}
+
+.top-news span {
+ font-size: 18px;
+ margin-bottom: 5px;
+}
+
+/***
+Block Images(new in v1.2.2)
+***/
+.blog-images {
+ margin-bottom: 0;
+}
+
+.blog-images li {
+ padding: 0;
+ margin: 0;
+ display: inline;
+}
+
+.blog-images li a:hover {
+ text-decoration: none;
+}
+
+.blog-images li img {
+ width: 50px;
+ height: 50px;
+ opacity: 0.6;
+ margin: 0 2px 8px;
+}
+
+.blog-images li img:hover {
+ opacity: 1;
+ box-shadow: 0 0 0 4px #72c02c;
+ transition: all 0.4s ease-in-out 0s;
+ -moz-transition: all 0.4s ease-in-out 0s;
+ -webkit-transition: all 0.4s ease-in-out 0s;
+}
+
+/*Sidebar Tags*/
+ul.sidebar-tags a {
+ color: #555;
+ font-size:12px;
+ padding:3px 5px;
+ background:#f7f7f7;
+ margin:0 2px 5px 0;
+ display:inline-block;
+}
+
+ul.sidebar-tags a:hover,
+ul.sidebar-tags a:hover i {
+ background: #EEE;
+ text-decoration:none;
+ -webkit-transition:all 0.3s ease-in-out;
+ -moz-transition:all 0.3s ease-in-out;
+ -o-transition:all 0.3s ease-in-out;
+ transition:all 0.3s ease-in-out;
+}
+
+ul.sidebar-tags a i {
+ color:#777;
+}
+
+ul.sidebar-tags li {
+ padding: 0;
+}
+
+/***
+Social Icons(new in v1.2.2)
+***/
+.social-icons {
+ padding: 0;
+ margin:0;
+}
+
+.social-icons:after,
+.social-icons:before {
+ content: "";
+ display: table;
+}
+
+.social-icons:after {
+ clear: both;
+}
+
+.social-icons li {
+ float:left;
+ display:inline;
+ list-style:none;
+ margin-right:5px;
+ margin-bottom:5px;
+ text-indent:-9999px;
+}
+.social-icons li a, a.social-icon {
+ width:28px;
+ height:28px;
+ display:block;
+ background-position:0 0;
+ background-repeat:no-repeat;
+ transition: all 0.3s ease-in-out;
+ -o-transition: all 0.3s ease-in-out;
+ -ms-transition: all 0.3s ease-in-out;
+ -moz-transition: all 0.3s ease-in-out;
+ -webkit-transition: all 0.3s ease-in-out;
+}
+.social-icons li:hover a {
+ background-position:0 -38px;
+}
+
+.social-icons-color li a {
+ opacity: 0.7;
+ background-position:0 -38px !important;
+}
+
+.social-icons-color li a:hover {
+ opacity: 1;
+}
+
+.social-icons .amazon {background: url(../image/social/amazon.png) no-repeat;}
+.social-icons .behance {background: url(../image/social/behance.png) no-repeat;}
+.social-icons .blogger {background: url(../image/social/blogger.png) no-repeat;}
+.social-icons .deviantart {background: url(../image/social/deviantart.png) no-repeat;}
+.social-icons .dribbble {background: url(../image/social/dribbble.png) no-repeat;}
+.social-icons .dropbox {background: url(../image/social/dropbox.png) no-repeat;}
+.social-icons .evernote {background: url(../image/social/evernote.png) no-repeat;}
+.social-icons .facebook {background: url(../image/social/facebook.png) no-repeat;}
+.social-icons .forrst {background: url(../image/social/forrst.png) no-repeat;}
+.social-icons .github {background: url(../image/social/github.png) no-repeat;}
+.social-icons .googleplus {background: url(../image/social/googleplus.png) no-repeat;}
+.social-icons .jolicloud {background: url(../image/social/jolicloud.png) no-repeat;}
+.social-icons .last-fm {background: url(../image/social/last-fm.png) no-repeat;}
+.social-icons .linkedin {background: url(../image/social/linkedin.png) no-repeat;}
+.social-icons .picasa {background: url(../image/social/picasa.png) no-repeat;}
+.social-icons .pintrest {background: url(../image/social/pintrest.png) no-repeat;}
+.social-icons .rss {background: url(../image/social/rss.png) no-repeat;}
+.social-icons .skype {background: url(../image/social/skype.png) no-repeat;}
+.social-icons .spotify {background: url(../image/social/spotify.png) no-repeat;}
+.social-icons .stumbleupon {background: url(../image/social/stumbleupon.png) no-repeat;}
+.social-icons .tumblr {background: url(../image/social/tumblr.png) no-repeat;}
+.social-icons .twitter {background: url(../image/social/twitter.png) no-repeat;}
+.social-icons .vimeo {background: url(../image/social/vimeo.png) no-repeat;}
+.social-icons .wordpress {background: url(../image/social/wordpress.png) no-repeat;}
+.social-icons .xing {background: url(../image/social/xing.png) no-repeat;}
+.social-icons .yahoo {background: url(../image/social/yahoo.png) no-repeat;}
+.social-icons .youtube {background: url(../image/social/youtube.png) no-repeat;}
+.social-icons .vk {background: url(../image/social/vk.png) no-repeat;}
+.social-icons .instagram {background: url(../image/social/instagram.png) no-repeat;}
+.social-icons .reddit {background: url(../image/social/reddit.png) no-repeat;}
+.social-icons .aboutme {background: url(../image/social/aboutme.png) no-repeat;}
+.social-icons .flickr {background: url(../image/social/flickr.png) no-repeat;}
+.social-icons .foursquare {background: url(../image/social/foursquare.png) no-repeat;}
+.social-icons .gravatar {background: url(../image/social/gravatar.png) no-repeat;}
+.social-icons .klout {background: url(../image/social/klout.png) no-repeat;}
+.social-icons .myspace {background: url(../image/social/myspace.png) no-repeat;}
+.social-icons .quora {background: url(../image/social/quora.png) no-repeat;}
+
+/***
+Inline Social Icons
+***/
+
+.social-icon {
+ display:inline-block !important;
+ width:28px;
+ height:28px;
+ background-position:0 0;
+ background-repeat:no-repeat;
+ transition: all 0.3s ease-in-out;
+ -o-transition: all 0.3s ease-in-out;
+ -ms-transition: all 0.3s ease-in-out;
+ -moz-transition: all 0.3s ease-in-out;
+ -webkit-transition: all 0.3s ease-in-out;
+}
+
+.social-icon.amazon {background: url(../image/social/amazon.png) no-repeat;}
+.social-icon.behance {background: url(../image/social/behance.png) no-repeat;}
+.social-icon.blogger {background: url(../image/social/blogger.png) no-repeat;}
+.social-icon.deviantart {background: url(../image/social/deviantart.png) no-repeat;}
+.social-icon.dribbble {background: url(../image/social/dribbble.png) no-repeat;}
+.social-icon.dropbox {background: url(../image/social/dropbox.png) no-repeat;}
+.social-icon.evernote {background: url(../image/social/evernote.png) no-repeat;}
+.social-icon.facebook {background: url(../image/social/facebook.png) no-repeat;}
+.social-icon.forrst {background: url(../image/social/forrst.png) no-repeat;}
+.social-icon.github {background: url(../image/social/github.png) no-repeat;}
+.social-icon.googleplus {background: url(../image/social/googleplus.png) no-repeat;}
+.social-icon.jolicloud {background: url(../image/social/jolicloud.png) no-repeat;}
+.social-icon.last-fm {background: url(../image/social/last-fm.png) no-repeat;}
+.social-icon.linkedin {background: url(../image/social/linkedin.png) no-repeat;}
+.social-icon.picasa {background: url(../image/social/picasa.png) no-repeat;}
+.social-icon.pintrest {background: url(../image/social/pintrest.png) no-repeat;}
+.social-icon.rss {background: url(../image/social/rss.png) no-repeat;}
+.social-icon.skype {background: url(../image/social/skype.png) no-repeat;}
+.social-icon.spotify {background: url(../image/social/spotify.png) no-repeat;}
+.social-icon.stumbleupon {background: url(../image/social/stumbleupon.png) no-repeat;}
+.social-icon.tumblr {background: url(../image/social/tumblr.png) no-repeat;}
+.social-icon.twitter {background: url(../image/social/twitter.png) no-repeat;}
+.social-icon.vimeo {background: url(../image/social/vimeo.png) no-repeat;}
+.social-icon.wordpress {background: url(../image/social/wordpress.png) no-repeat;}
+.social-icon.xing {background: url(../image/social/xing.png) no-repeat;}
+.social-icon.yahoo {background: url(../image/social/yahoo.png) no-repeat;}
+.social-icon.youtube {background: url(../image/social/youtube.png) no-repeat;}
+.social-icon.vk {background: url(../image/social/vk.png) no-repeat;}
+.social-icon.instagram {background: url(../image/social/instagram.png) no-repeat;}
+.social-icon.reddit {background: url(../image/social/reddit.png) no-repeat;}
+.social-icon.aboutme {background: url(../image/social/aboutme.png) no-repeat;}
+.social-icon.flickr {background: url(../image/social/flickr.png) no-repeat;}
+.social-icon.foursquare {background: url(../image/social/foursquare.png) no-repeat;}
+.social-icon.gravatar {background: url(../image/social/gravatar.png) no-repeat;}
+.social-icon.klout {background: url(../image/social/klout.png) no-repeat;}
+.social-icon.myspace {background: url(../image/social/myspace.png) no-repeat;}
+.social-icon.quora {background: url(../image/social/quora.png) no-repeat;}
+
+.social-icon:hover {
+ background-position:0 -38px;
+}
+
+.social-icon-color {
+ opacity: 0.7;
+ background-position:0 -38px !important;
+}
+
+.social-icon-color:hover {
+ opacity: 1;
+}
+
+/***
+Notes
+***/
+
+/* Common styles for all types */
+.note {
+ margin: 0 0 20px 0;
+ padding: 15px 30px 15px 15px;
+ border-left: 5px solid #eee;
+}
+
+.note h1,
+.note h2,
+.note h3,
+.note h4 {
+ margin-top: 0;
+}
+
+.note p:last-child {
+ margin-bottom: 0;
+}
+.note code,
+.note .highlight {
+ background-color: #fff;
+}
+
+/* Variations */
+.note-danger {
+ background-color: #FAEAE6;
+ border-color: #ed4e2a;
+}
+
+.note-warning {
+ background-color: #FCF3E1;
+ border-color: #fcb322;
+}
+
+.note-info {
+ background-color: #E8F6FC;
+ border-color: #57b5e3;
+}
+
+.note-success {
+ background-color: #EBFCEE;
+ border-color: #3cc051;
+}
+
+/***
+Demo Utils
+***/
+.scrollspy-example {
+ position: relative;
+ height: 200px;
+ margin-top: 10px;
+ overflow: auto;
+}
+
+.util-btn-margin-bottom-5 .btn {
+ margin-bottom: 5px !important;
+}
+
+.util-btn-group-margin-bottom-5 .btn-group {
+ margin-bottom: 5px !important;
+}
+
+.fontawesome-demo i {
+ font-size: 18px;
+}
+
+.fontawesome-demo li {
+ padding-top: 5px;
+ padding-bottom: 5px;
+}
+
+.glyphicons-demo ul {
+ padding-left: 0;
+ padding-bottom: 1px;
+ margin-bottom: 20px;
+ list-style: none;
+ overflow: hidden;
+}
+
+.bs-glyphicons {
+ padding-left: 0;
+ padding-bottom: 1px;
+ margin-bottom: 20px;
+ list-style: none;
+ overflow: hidden;
+}
+.glyphicons-demo ul li {
+ float: left;
+ width: 25%;
+ height: 115px;
+ padding: 10px;
+ margin: 0 -1px -1px 0;
+ font-size: 12px;
+ line-height: 1.4;
+ text-align: center;
+ border: 1px solid #ddd;
+}
+
+.glyphicons-demo .glyphicon {
+ display: block;
+ margin: 5px auto 10px;
+ font-size: 24px;
+}
+.glyphicons-demo ul li:hover {
+ background-color: rgba(86,61,124,.1);
+}
+
+@media (min-width: 768px) {
+ .glyphicons-demo ul li {
+ width: 12.5%;
+ }
+}
+
+/***
+Forms
+****/
+
+.static-info {
+ margin-bottom: 10px;
+}
+
+.static-info .name {
+ font-size: 14px;
+}
+
+.static-info .value {
+ font-size: 14px;
+ font-weight: 600;
+}
+
+.static-info.align-reverse .name,
+.static-info.align-reverse .value {
+ text-align: right;
+}
+
+input.placeholder,
+textarea.placeholder {
+ color: #aaa !important;
+}
+
+.help-block {
+ margin-top: 5px;
+ margin-bottom: 5px;
+}
+
+.form-inline input {
+ margin-bottom: 0px !important;
+}
+
+.control-label {
+ margin-top: 2px;
+}
+
+.form-control-static {
+ font-size: 14px;
+ padding-top: 7px;
+}
+
+.control-label .required {
+ color: #e02222;
+ font-size: 12px;
+ padding-left: 2px;
+}
+
+.switch-wrapper {
+ display: inline-block;
+}
+
+.form {
+ padding: 0 !important;
+}
+
+.form-body {
+ padding: 10px;
+}
+
+.form-actions {
+ padding: 20px 10px;
+ margin-top: 20px;
+/* background-color: #f5f5f5;
+ border-top: 1px solid #e5e5e5;*/
+ *zoom: 1;
+}
+
+.form-actions.nobg {
+ background-color: transparent;
+}
+
+.form-actions.top {
+ margin-top: 0;
+ margin-bottom: 20px;
+ border-top: 0;
+ border-bottom: 1px solid #e5e5e5;
+}
+
+.form-actions.fluid {
+ padding: 20px 0;
+}
+
+.form-actions.fluid > [class^="col-"] {
+ padding-left: 13px;
+}
+
+.form-actions:before,
+.form-actions:after {
+ display: table;
+ line-height: 0;
+ content: "";
+}
+
+.form-actions:after {
+ clear: both;
+}
+
+.form-section {
+ margin: 30px 0px 25px 0px;
+ padding-bottom: 5px;
+ border-bottom: 1px solid #eee;
+}
+
+.form .form-section:first-child {
+ margin-top: 5px;
+}
+
+.help-inline {
+ font-size: 13px;
+ color: #737373;
+ display: inline-block;
+ padding: 5px;
+}
+
+/* left, right aligned form actions */
+.form-actions.right {
+ padding-left: 0;
+ padding-right: 10px;
+ text-align: right;
+}
+
+.form-actions.left {
+ padding-left: 10px;
+ padding-right: 0;
+ text-align: left;
+}
+
+/* Checkboxes */
+.form-group .checkbox {
+ padding-left: 0;
+}
+
+.checkbox-list > label {
+ display: block;
+}
+
+.checkbox-list > label.checkbox-inline {
+ display: inline-block;
+}
+
+.checkbox-list > label.checkbox-inline:first-child {
+ padding-left: 0;
+}
+
+/* Radios */
+
+.radio-list > label {
+ display: block;
+}
+
+.radio-list > label.radio-inline {
+ display: inline-block;
+}
+
+.radio-list > label.radio-inline:first-child {
+ padding-left: 0;
+}
+
+.form-horizontal .radio-list .radio {
+ padding-top: 1px;
+}
+
+.form-horizontal .radio-list > label {
+ margin-bottom: 0;
+}
+
+.form-horizontal .radio > span {
+ margin-top: 2px;
+}
+
+/* Rows seperated form layout */
+.form-row-seperated .form-group {
+ margin: 0;
+ border-bottom: 1px solid #efefef;
+ padding: 10px 0px 10px 0px;
+}
+
+.form-row-seperated .form-group.last {
+ border-bottom: 0;
+ margin-bottom: 0;
+ padding-bottom: 10px;
+}
+
+.form-row-seperated .form-actions {
+ margin-top: 0;
+}
+
+.form-row-seperated .form-body {
+ padding: 0;
+ margin-top: 0;
+}
+
+.form-row-seperated .help-block {
+ margin-bottom: 0;
+}
+
+/* form bordered */
+.form-bordered .form-body {
+ margin: 0;
+ padding: 0;
+}
+
+.form-bordered .form-actions {
+ margin-top: 0;
+}
+
+.form-bordered .form-group {
+ margin: 0;
+ border-bottom: 1px solid #efefef;
+}
+
+.form-bordered .form-group.last {
+ border-bottom: 0;
+}
+
+.form-bordered .help-block {
+ margin-bottom: 0;
+}
+
+.form-bordered .control-label {
+ padding-top: 16px;
+}
+
+.form-bordered .form-group > div {
+ padding: 10px;
+ border-left: 1px solid #efefef;
+}
+
+.form-bordered .form-actions.fluid > .row > div {
+ padding-left: 10px;
+}
+
+.form-horizontal.form-bordered.form-row-stripped .form-group:nth-child(even) {
+ background-color: #fcfcfc;
+}
+
+.form-horizontal.form-bordered.form-label-stripped .form-group:nth-child(even) {
+ background-color: #fcfcfc;
+}
+
+.form-horizontal.form-bordered.form-row-stripped .form-control {
+ background: #fff !important;
+}
+
+.form-horizontal.form-bordered.form-label-stripped .form-group:nth-child(even) > div {
+ background-color: #ffffff;
+}
+
+/***
+Bordered form layout
+***/
+
+.form-bordered .form-control {
+ margin: 0;
+}
+
+
+/***
+Disabled Menu Link
+***/
+
+.disabled-link > a > span.text,
+.disabled-link > a > span.title {
+ font-style: italic !important;
+ color: #888 !important;
+}
+
+.disabled-link > a:hover {
+ cursor: not-allowed !important;
+}
+
+
+/***
+Responsive & Scrollable Tables
+***/
+
+.table-scrollable {
+ width: 100%;
+ overflow-x: auto;
+ overflow-y: hidden;
+ border: 1px solid #dddddd;
+ margin: 10px 0 !important;
+}
+
+.table-scrollable > .table {
+ width: 100% !important;
+ margin: 0 !important;
+ margin-bottom: 0;
+ background-color: #fff;
+}
+
+.table-scrollable > .table > thead > tr > th,
+.table-scrollable > .table > tbody > tr > th,
+.table-scrollable > .table > tfoot > tr > th,
+.table-scrollable > .table > thead > tr > td,
+.table-scrollable > .table > tbody > tr > td,
+.table-scrollable > .table > tfoot > tr > td {
+ white-space: nowrap;
+}
+
+.table-scrollable > .table-bordered {
+ border: 0;
+}
+
+.table-scrollable > .table-bordered > thead > tr > th:first-child,
+.table-scrollable > .table-bordered > tbody > tr > th:first-child,
+.table-scrollable > .table-bordered > tfoot > tr > th:first-child,
+.table-scrollable > .table-bordered > thead > tr > td:first-child,
+.table-scrollable > .table-bordered > tbody > tr > td:first-child,
+.table-scrollable > .table-bordered > tfoot > tr > td:first-child {
+ border-left: 0;
+}
+
+.table-scrollable > .table-bordered > thead > tr > th:last-child,
+.table-scrollable > .table-bordered > tbody > tr > th:last-child,
+.table-scrollable > .table-bordered > tfoot > tr > th:last-child,
+.table-scrollable > .table-bordered > thead > tr > td:last-child,
+.table-scrollable > .table-bordered > tbody > tr > td:last-child,
+.table-scrollable > .table-bordered > tfoot > tr > td:last-child {
+ border-right: 0;
+}
+
+.table-scrollable > .table-bordered > thead > tr:last-child > th,
+.table-scrollable > .table-bordered > tbody > tr:last-child > th,
+.table-scrollable > .table-bordered > tfoot > tr:last-child > th,
+.table-scrollable > .table-bordered > thead > tr:last-child > td,
+.table-scrollable > .table-bordered > tbody > tr:last-child > td,
+.table-scrollable > .table-bordered > tfoot > tr:last-child > td {
+ border-bottom: 0;
+}
+
+/***
+Responsive Flip Scroll Tables
+***/
+
+.flip-scroll table { width: 100%; }
+
+@media only screen and (max-width: 768px) {
+
+ .flip-scroll .flip-content:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; }
+ .flip-scroll * html .flip-content { zoom: 1; }
+ .flip-scroll *:first-child+html .flip-content { zoom: 1; }
+
+ .flip-scroll table { width: 100%; border-collapse: collapse; border-spacing: 0; }
+
+ .flip-scroll th,
+ .flip-scroll td { margin: 0; vertical-align: top; }
+ .flip-scroll th {
+ text-align: left;
+ border: 0 !important;
+ border-bottom: 1px solid #ddd !important;
+ border-right: 1px solid #ddd !important;
+ font-size: 13px !important;
+ padding: 5px;
+ width: auto !important;
+ }
+
+ .flip-scroll table { display: block; position: relative; width: 100%; }
+ .flip-scroll thead {
+ display: block;
+ float: left;
+ }
+ .flip-scroll tbody {
+ display: block;
+ width: auto;
+ position: relative;
+ overflow-x: auto;
+ white-space: nowrap;
+ }
+ .flip-scroll thead tr { display: block; }
+ .flip-scroll th { display: block; text-align: right; }
+ .flip-scroll tbody tr { display: inline-block; vertical-align: top; margin-left: -5px; }
+ .flip-scroll td { display: block; min-height: 1.25em; text-align: left; border-top: 0 !important; border-left: 0 !important; border-right: 0 !important}
+
+ /* sort out borders */
+
+ .flip-scroll th { border-bottom: 0; border-left: 0; }
+ .flip-scroll td { border-left: 0; border-right: 0; border-bottom: 0; }
+ .flip-scroll tbody tr { border-left: 1px solid #ddd; }
+ .flip-scroll th:last-child,
+ .flip-scroll td:last-child { border-bottom: 1px solid #ddd; }
+
+}
+
+/***
+UI Loading
+***/
+
+.loading-message {
+ display: inline-block;
+ min-width: 125px;
+ padding: 10px;
+ margin: 0 auto;
+ color: #000 !important;
+ font-size: 13px;
+ font-weight: 400;
+ text-align: center;
+ vertical-align: middle;
+}
+
+.loading-message span {
+ line-height:20px;
+ vertical-align: middle;
+}
+
+.loading-message.loading-message-boxed {
+ border: 1px solid #ddd;
+ background-color: #eee;
+ -webkit-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
+ -moz-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
+ box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
+}
+
+.page-loading {
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ min-width: 125px;
+ margin-left: -50px;
+ margin-top: -30px;
+ padding: 7px;
+ text-align: center;
+ color: #333;
+ font-size: 13px;
+ border: 1px solid #ddd;
+ background-color: #eee;
+ vertical-align: middle;
+ -webkit-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
+ -moz-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
+ box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
+}
+
+.page-loading span {
+ line-height:20px;
+ vertical-align: middle;
+}
+
+.zteDivWidth
+{
+ width:auto !important
+}
+
+
+
+.nav-load-error {}
+
+.nav-pos-option {}
+
+/*TAB*/
+.nav-tabs{
+border:0;
+}
+.nav-tabs>li.active>a, .nav-tabs>li.active>a:hover, .nav-tabs>li.active>a:focus{
+border:0;
+border-top:3px solid #F3565D;
+}
+.nav-tabs>li>a{
+border-radius:0;
+}
+.nav-tabs>li>a:hover{
+background-color:#f1f3fa;
+border:1Px solid #f1f3fa;
+}
+/*button*/
+.btn{
+min-width: 80px;
+letter-spacing:1px;
+}
+.btnGroup .btn{
+margin-left:15px;
+margin-right:15px;
+}
+.pagination-panel .btn{
+min-width: 4px; }
+/*radius*/
+.radius_l{
+border-radius: 20px;
+}
+.radius_m{
+border-radius: 8px;
+}
+.radius_s{
+border-radius: 3px;
+}
+/*common color*/
+.blue1 {
+ background-color:#5b9bd1;
+ color:#fff;
+}
+.blue1:hover{
+ background-color:#487ca9;
+ color:#fff;
+}
+.blue2{
+ background-color:#57b5e3;
+ color:#fff;
+}
+.blue2:hover{
+ background-color:#43a1cf;
+ color:#fff;
+}
+.red{
+ background-color:#E35B5A;
+ color:#fff;
+}
+.red:hover{
+ background-color:#ad9a4d;
+ color:#fff;
+}
+.green{
+ background-color:#44B6AE;
+}
+.green:hover{
+ background-color:#329d96;
+}
+.yellow{
+ background-color:#C0AF69;
+ color:#fff;
+}
+.yellow:hover{
+ background-color:#d45150;
+ color:#fff;
+}
+.grey{
+ background-color:#e5e5e5;
+ color:#333;
+}
+.grey:hover{
+ background-color:#d8d8d8;
+ color:#333;
+}
+/*Progress Bars*/
+.progress {
+ border: 0;
+ background-image: none !important;
+ filter: none !important;
+ -webkit-box-shadow: none !important;
+ -moz-box-shadow: none !important;
+ box-shadow: none !important;
+
+}
+.form-wizard .steps > li.active > a.step .number{
+background-color:#45B6AF
+}
+.progress > .progress-bar-success{
+background-color:#45B6AF
+}
+/*label*/
+label{
+font-weight:400;
+margin-bottom:15px;
+}
+/**/
+.input-group-btn-vertical.fa{
+font-size:12px;
+}
+.spinner {
+ width: 60px;
+ margin-left:10px;
+ margin-right:30px;
+}
+.spinner input {
+ text-align: right;
+}
+.input-group-btn-vertical {
+ position: relative;
+ white-space: nowrap;
+ width: 1%;
+ vertical-align: middle;
+ display: table-cell;
+}
+.input-group-btn-vertical > .btn {
+ display: block;
+ float: none;
+ width: 100%;
+ max-width: 100%;
+ padding: 6px;
+ margin-left: -1px;
+ position: relative;
+ border-radius: 0;
+}
+.input-group-btn-vertical > .btn{
+ min-width:20px;
+}
+.input-group-btn-vertical > .btn:first-child {
+ border-top-right-radius: 4px;
+}
+.input-group-btn-vertical > .btn:last-child {
+ margin-top: -2px;
+ border-bottom-right-radius: 4px;
+}
+.input-group-btn-vertical i{
+ position: absolute;
+ top: -2px;
+ left: 5px;
+}
+.input-group .form-control{
+height:26px !important;
+}
+
+.about{
+ height:345px;
+ width:528px;
+}
+
+.aboutmain{
+ background-image: url("../image/about/about-bg-light.png");
+}
+
+.aboutinfo{
+ background-image: url("../image/about/about-bg-dark.png");
+}
+
+.about a{
+ color: white;
+
+ margin-left:15px;
+ text-decoration: none;
+}
+
+.about a.about_close{
+ float:right;
+ margin-right:20px;
+ font-size: 1.2em;
+}
+
+.about div{
+ padding-top:7px;
+
+}
+
+.about div.info{
+ float: right;
+ margin-right: 15px;
+ margin-top: 130px;
+ color: white;
+ font-size: 13px;
+}
+
+.about div.info div{
+ margin-left:15px;
+}
+
+.about div.info img{
+ margin-right: 55px;
+}
+
+.aboutDlg{
+ width: 530px;
+ margin-left:150px;
+}
+
+.aboutDlg .dataTable{
+ background-color: white;
+
+}
+
+.aboutDlg table.dataTable .heading>th.sorting_disabled {
+ background-color: white !important;
+}
+
+.aboutDlg #abouttable_wrapper{
+ height:285px;
+ background-color: white;
+ padding:0px;
+ overflow:auto;
+}
+
+.aboutDlg td , .aboutDlg .table thead tr th{
+ font-size:13px;
+ font-weight:100;
+}
+
+.aboutDlg{
+ font-family:microsoft yahei,Arial;
+ letter-spacing:1px;
+}
+
+.aboutDlg tr {
+ height:37px;
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/css/uniform.default.min.css b/common/src/main/webapp/thirdparty/css/uniform.default.min.css
new file mode 100644
index 0000000..ef4ee10
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/uniform.default.min.css
@@ -0,0 +1 @@
+div.selector,div.selector span,div.checker span,div.radio span,div.uploader,div.uploader span.action,div.button,div.button span{background-image:url("../images/sprite.png");background-repeat:no-repeat;-webkit-font-smoothing:antialiased}div.selector,div.checker,div.button,div.radio,div.uploader{display:-moz-inline-box;display:inline-block;*display:inline;zoom:1;vertical-align:middle}div.selector:focus,div.checker:focus,div.button:focus,div.radio:focus,div.uploader:focus{outline:0}div.selector,div.selector *,div.radio,div.radio *,div.checker,div.checker *,div.uploader,div.uploader *,div.button,div.button *{margin:0;padding:0}.highContrastDetect{background:url("../images/bg-input.png") repeat-x 0 0;width:0px;height:0px}input.uniform-input,select.uniform-multiselect,textarea.uniform{padding:3px;background:url("../images/bg-input.png") repeat-x 0 0;outline:0}input.uniform-input.active,select.uniform-multiselect.active,textarea.uniform.active{background:url("../images/bg-input-focus.png") repeat-x 0 0}div.checker input,input[type="search"],input[type="search"]:active{-moz-appearance:none;-webkit-appearance:none}div.selector{background-position:0 -130px;line-height:26px;height:26px;padding:0 0 0 10px;position:relative;overflow:hidden}div.selector span{text-overflow:ellipsis;display:block;overflow:hidden;white-space:nowrap;background-position:right 0;height:26px;line-height:26px;padding-right:25px;cursor:pointer;width:100%;display:block}div.selector.fixedWidth{width:190px}div.selector.fixedWidth span{width:155px}div.selector select{opacity:0;filter:alpha(opacity=0);-moz-opacity:0;border:none;background:none;position:absolute;height:22px;top:2px;left:0px;width:100%}div.selector.active{background-position:0 -156px}div.selector.active span{background-position:right -26px}div.selector.hover,div.selector.focus{background-position:0 -182px}div.selector.hover span,div.selector.focus span{background-position:right -52px}div.selector.hover.active,div.selector.focus.active{background-position:0 -208px}div.selector.hover.active span,div.selector.focus.active span{background-position:right -78px}div.selector.disabled,div.selector.disabled.active{background-position:0 -234px}div.selector.disabled span,div.selector.disabled.active span{background-position:right -104px}div.checker{position:relative}div.checker,div.checker span,div.checker input{width:19px;height:19px}div.checker span{display:-moz-inline-box;display:inline-block;*display:inline;zoom:1;text-align:center;background-position:0 -260px}div.checker span.checked{background-position:-76px -260px}div.checker input{opacity:0;filter:alpha(opacity=0);-moz-opacity:0;border:none;background:none;display:-moz-inline-box;display:inline-block;*display:inline;zoom:1}div.checker.active span{background-position:-19px -260px}div.checker.active span.checked{background-position:-95px -260px}div.checker.hover span,div.checker.focus span{background-position:-38px -260px}div.checker.hover span.checked,div.checker.focus span.checked{background-position:-114px -260px}div.checker.hover.active span,div.checker.focus.active span{background-position:-57px -260px}div.checker.hover.active span.checked,div.checker.focus.active span.checked{background-position:-133px -260px}div.checker.disabled,div.checker.disabled.active{background-position:-152px -260px}div.checker.disabled span.checked,div.checker.disabled.active span.checked{background-position:-171px -260px}div.radio{position:relative}div.radio,div.radio span,div.radio input{width:18px;height:18px}div.radio span{display:-moz-inline-box;display:inline-block;*display:inline;zoom:1;text-align:center;background-position:0 -279px}div.radio span.checked{background-position:-72px -279px}div.radio input{opacity:0;filter:alpha(opacity=0);-moz-opacity:0;border:none;background:none;display:-moz-inline-box;display:inline-block;*display:inline;zoom:1;text-align:center}div.radio.active span{background-position:-18px -18px -279px}div.radio.active span.checked{background-position:-90px -279px}div.radio.hover span,div.radio.focus span{background-position:-36px -36px -279px}div.radio.hover span.checked,div.radio.focus span.checked{background-position:-108px -279px}div.radio.hover.active span,div.radio.focus.active span{background-position:-54px -279px}div.radio.hover.active span.checked,div.radio.focus.active span.checked{background-position:-126px -279px}div.radio.disabled span,div.radio.disabled.active span{background-position:-144px -279px}div.radio.disabled span.checked,div.radio.disabled.active span.checked{background-position:-162px -279px}div.uploader{background-position:0 -297px;height:28px;width:190px;cursor:pointer;position:relative;overflow:hidden}div.uploader span.action{background-position:right -409px;height:28px;line-height:28px;width:82px;text-align:center;float:left;display:inline;overflow:hidden;cursor:pointer}div.uploader span.filename{text-overflow:ellipsis;display:block;overflow:hidden;white-space:nowrap;float:left;cursor:default;height:24px;margin:2px 0 2px 2px;line-height:24px;width:85px;padding:0 10px}div.uploader input{opacity:0;filter:alpha(opacity=0);-moz-opacity:0;border:none;background:none;position:absolute;top:0;right:0;float:right;cursor:default;width:100%;height:100%}div.uploader.active span.action{background-position:right -465px}div.uploader.hover,div.uploader.focus{background-position:0 -353px}div.uploader.hover span.action,div.uploader.focus span.action{background-position:right -437px}div.uploader.hover.active span.action,div.uploader.focus.active span.action{background-position:right -493px}div.uploader.disabled,div.uploader.disabled.active{background-position:0 -325px}div.uploader.disabled span.action,div.uploader.disabled.active span.action{background-position:right -381px}div.button{background-position:0 -641px;height:30px;cursor:pointer;position:relative}div.button a,div.button button,div.button input{opacity:0.01;filter:alpha(opacity=1);-moz-opacity:0.01;display:block;top:0;left:0;right:0;bottom:0;position:absolute}div.button span{display:-moz-inline-box;display:inline-block;*display:inline;zoom:1;line-height:22px;text-align:center;background-position:right -521px;height:22px;margin-left:13px;padding:8px 15px 0 2px}div.button.active{background-position:0 -671px}div.button.active span{background-position:right -551px;cursor:default}div.button.hover,div.button.focus{background-position:0 -701px}div.button.hover span,div.button.focus span{background-position:right -581px}div.button.disabled,div.button.disabled.active{background-position:0 -731px}div.button.disabled span,div.button.disabled.active span{background-position:right -611px;cursor:default}input.uniform-input,select.uniform-multiselect,textarea.uniform{font-size:12px;font-family:"Helvetica Neue",Arial,Helvetica,sans-serif;font-weight:normal;color:#777;border-top:solid 1px #aaa;border-left:solid 1px #aaa;border-bottom:solid 1px #ccc;border-right:solid 1px #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}input.uniform-input.hover,input.uniform-input.focus,select.uniform-multiselect.hover,select.uniform-multiselect.focus,textarea.uniform.hover,textarea.uniform.focus{-webkit-box-shadow:0px 0px 4px rgba(0,0,0,0.3);-moz-box-shadow:0px 0px 4px rgba(0,0,0,0.3);box-shadow:0px 0px 4px rgba(0,0,0,0.3);border-color:#999}div.button span{font-weight:bold;font-family:"Helvetica Neue",Arial,Helvetica,sans-serif;font-size:12px;letter-spacing:1px;text-transform:uppercase}div.button.hover span,div.button.focus span{color:#555}div.button.disabled span,div.button.disabled.active span{color:#bbb}div.selector{font-size:12px}div.selector span{color:#666;text-shadow:0 1px 0 #fff}div.selector select{font-family:"Helvetica Neue",Arial,Helvetica,sans-serif;font-size:12px}div.selector.disabled span,div.selector.disabled.active span{color:#bbb}div.checker{margin-right:5px}div.radio{margin-right:3px}div.uploader span.action{text-shadow:#fff 0px 1px 0px;background-color:#fff;font-size:11px;font-weight:bold}div.uploader span.filename{color:#777;border-right:solid 1px #bbb;font-size:11px}div.uploader.disabled span.action,div.uploader.disabled.active span.action{color:#aaa}div.uploader.disabled span.filename,div.uploader.disabled.active span.filename{border-color:#ddd;color:#aaa}input.uniform-input,input.uniform-input:focus{background-color:#fff}
diff --git a/common/src/main/webapp/thirdparty/css/zTreeStyle.css b/common/src/main/webapp/thirdparty/css/zTreeStyle.css
new file mode 100644
index 0000000..4a1705b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/css/zTreeStyle.css
@@ -0,0 +1,97 @@
+/*-------------------------------------
+zTree Style
+
+version: 3.5.19
+author: Hunter.z
+email: hunter.z@263.net
+website: http://code.google.com/p/jquerytree/
+
+-------------------------------------*/
+
+.ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif}
+.ztree {margin:0; padding:5px; color:#333}
+.ztree li{padding:0; margin:0; list-style:none; line-height:14px; text-align:left; white-space:nowrap; outline:0}
+.ztree li ul{ margin:0; padding:0 0 0 18px}
+.ztree li ul.line{ background:url(./img/line_conn.gif) 0 0 repeat-y;}
+
+.ztree li a {padding:1px 3px 0 0; margin:0; cursor:pointer; height:17px; color:#333; background-color: transparent;
+ text-decoration:none; vertical-align:top; display: inline-block}
+.ztree li a:hover {text-decoration:underline}
+.ztree li a.curSelectedNode {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;}
+.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;}
+.ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#316AC5; color:white; height:16px; border:1px #316AC5 solid;
+ opacity:0.8; filter:alpha(opacity=80)}
+.ztree li a.tmpTargetNode_prev {}
+.ztree li a.tmpTargetNode_next {}
+.ztree li a input.rename {height:14px; width:80px; padding:0; margin:0;
+ font-size:12px; border:1px #7EC4CC solid; *border:0px}
+.ztree li span {line-height:16px; margin-right:2px}
+.ztree li span.button {line-height:0; margin:0; width:16px; height:16px; display: inline-block; vertical-align:middle;
+ border:0 none; cursor: pointer;outline:none;
+ background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
+ background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")}
+
+.ztree li span.button.chk {width:13px; height:13px; margin:0 3px 0 0; cursor: auto}
+.ztree li span.button.chk.checkbox_false_full {background-position:0 0}
+.ztree li span.button.chk.checkbox_false_full_focus {background-position:0 -14px}
+.ztree li span.button.chk.checkbox_false_part {background-position:0 -28px}
+.ztree li span.button.chk.checkbox_false_part_focus {background-position:0 -42px}
+.ztree li span.button.chk.checkbox_false_disable {background-position:0 -56px}
+.ztree li span.button.chk.checkbox_true_full {background-position:-14px 0}
+.ztree li span.button.chk.checkbox_true_full_focus {background-position:-14px -14px}
+.ztree li span.button.chk.checkbox_true_part {background-position:-14px -28px}
+.ztree li span.button.chk.checkbox_true_part_focus {background-position:-14px -42px}
+.ztree li span.button.chk.checkbox_true_disable {background-position:-14px -56px}
+.ztree li span.button.chk.radio_false_full {background-position:-28px 0}
+.ztree li span.button.chk.radio_false_full_focus {background-position:-28px -14px}
+.ztree li span.button.chk.radio_false_part {background-position:-28px -28px}
+.ztree li span.button.chk.radio_false_part_focus {background-position:-28px -42px}
+.ztree li span.button.chk.radio_false_disable {background-position:-28px -56px}
+.ztree li span.button.chk.radio_true_full {background-position:-42px 0}
+.ztree li span.button.chk.radio_true_full_focus {background-position:-42px -14px}
+.ztree li span.button.chk.radio_true_part {background-position:-42px -28px}
+.ztree li span.button.chk.radio_true_part_focus {background-position:-42px -42px}
+.ztree li span.button.chk.radio_true_disable {background-position:-42px -56px}
+
+.ztree li span.button.switch {width:18px; height:18px}
+.ztree li span.button.root_open{background-position:-92px -54px}
+.ztree li span.button.root_close{background-position:-74px -54px}
+.ztree li span.button.roots_open{background-position:-92px 0}
+.ztree li span.button.roots_close{background-position:-74px 0}
+.ztree li span.button.center_open{background-position:-92px -18px}
+.ztree li span.button.center_close{background-position:-74px -18px}
+.ztree li span.button.bottom_open{background-position:-92px -36px}
+.ztree li span.button.bottom_close{background-position:-74px -36px}
+.ztree li span.button.noline_open{background-position:-92px -72px}
+.ztree li span.button.noline_close{background-position:-74px -72px}
+.ztree li span.button.root_docu{ background:none;}
+.ztree li span.button.roots_docu{background-position:-56px 0}
+.ztree li span.button.center_docu{background-position:-56px -18px}
+.ztree li span.button.bottom_docu{background-position:-56px -36px}
+.ztree li span.button.noline_docu{ background:none;}
+
+.ztree li span.button.ico_open{margin-right:2px; background-position:-110px -16px; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.ico_close{margin-right:2px; background-position:-110px 0; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.ico_docu{margin-right:2px; background-position:-110px -32px; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.edit {margin-right:2px; background-position:-110px -48px; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.remove {margin-right:2px; background-position:-110px -64px; vertical-align:top; *vertical-align:middle}
+
+.ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
+
+ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)}
+
+span.tmpzTreeMove_arrow {width:16px; height:16px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute;
+ background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
+ background-position:-110px -80px; background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")}
+
+ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)}
+.zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute}
+
+/* level style*/
+/*.ztree li span.button.level0 {
+ display:none;
+}
+.ztree li ul.level0 {
+ padding:0;
+ background:none;
+}*/ \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/data-tables/DT_bootstrap.css b/common/src/main/webapp/thirdparty/data-tables/DT_bootstrap.css
new file mode 100644
index 0000000..599fb0d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/data-tables/DT_bootstrap.css
@@ -0,0 +1,240 @@
+div.dataTables_length label {
+ float: left;
+ text-align: left;
+}
+
+div.dataTables_length label .form-control {
+ display: inline-block;
+ width: auto;
+ vertical-align: middle;
+}
+
+div.dataTables_length select {
+ width: 75px;
+}
+
+div.dataTables_filter label {
+ float: right;
+}
+
+div.dataTables_info {
+ position: relative;
+ top:15px;
+}
+
+div.dataTables_paginate {
+ float: right;
+ margin: 0;
+}
+
+table.table {
+ clear: both;
+ margin-bottom: 6px !important;
+ max-width: none !important;
+}
+
+table.table thead .sorting,
+table.table thead .sorting_asc,
+table.table thead .sorting_desc,
+table.table thead .sorting_asc_disabled,
+table.table thead .sorting_desc_disabled {
+ cursor: pointer;
+ *cursor: hand;
+}
+
+table.table thead .sorting { background: url('images/sort_both.png') no-repeat center right; }
+table.table thead .sorting_asc { background: url('images/sort_asc.png') no-repeat center right; }
+table.table thead .sorting_desc { background: url('images/sort_desc.png') no-repeat center right; }
+
+table.table thead .sorting_asc_disabled { background: url('images/sort_asc_disabled.png') no-repeat center right; }
+table.table thead .sorting_desc_disabled { background: url('images/sort_desc_disabled.png') no-repeat center right; }
+
+table.dataTable th:active {
+ outline: none;
+}
+
+table.dataTable tbody {
+ font-size:13px;
+}
+
+/* Scrolling */
+div.dataTables_scroll {
+ margin-bottom: 5px;
+ margin-top: 5px;
+}
+div.dataTables_scrollHead table {
+ margin-bottom: 0 !important;
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0;
+}
+
+div.dataTables_scrollHead table thead tr:last-child th:first-child,
+div.dataTables_scrollHead table thead tr:last-child td:first-child {
+ border-bottom-left-radius: 0 !important;
+ border-bottom-right-radius: 0 !important;
+}
+
+div.dataTables_scrollBody table {
+ border-top: none;
+ margin-bottom: 0 !important;
+}
+
+div.dataTables_scrollBody tbody tr:first-child th,
+div.dataTables_scrollBody tbody tr:first-child td {
+ border-top: none;
+}
+
+/*
+div.dataTables_scrollBody tbody tr td {
+ padding-left: 10px !important;
+ padding-right: 10px !important;
+}
+div.dataTables_scrollHeadInner table thead tr th,
+div.dataTables_scrollBody table thead tr th{
+ padding-left: 10px !important;
+ padding-right: 18px !important;
+ text-align: center !important;
+}*/
+
+div.dataTables_scrollFoot table {
+ border-top: none;
+}
+
+/*
+ * TableTools styles
+ */
+
+table.DTTT_selectable tbody tr {
+ cursor: pointer;
+ *cursor: hand;
+}
+
+div.DTTT .btn {
+ color: #333 !important;
+ font-size: 12px;
+}
+
+div.DTTT .btn:hover {
+ text-decoration: none !important;
+}
+
+
+ul.DTTT_dropdown.dropdown-menu a {
+ color: #333 !important; /* needed only when demo_page.css is included */
+}
+
+ul.DTTT_dropdown.dropdown-menu li:hover a {
+ background-color: #0088cc;
+ color: white !important;
+}
+
+/* TableTools information display */
+div.DTTT_print_info.modal {
+ height: 150px;
+ margin-top: -75px;
+ text-align: center;
+}
+
+div.DTTT_print_info h6 {
+ font-weight: normal;
+ font-size: 28px;
+ line-height: 28px;
+ margin: 1em;
+}
+
+div.DTTT_print_info p {
+ font-size: 14px;
+ line-height: 20px;
+}
+
+
+
+/*
+ * FixedColumns styles
+ */
+div.DTFC_LeftHeadWrapper table,
+div.DTFC_LeftFootWrapper table,
+table.DTFC_Cloned tr.even {
+ background-color: white;
+}
+
+div.DTFC_LeftHeadWrapper table {
+ margin-bottom: 0 !important;
+ border-top-right-radius: 0 !important;
+ border-bottom-left-radius: 0 !important;
+ border-bottom-right-radius: 0 !important;
+}
+
+div.DTFC_LeftHeadWrapper table thead tr:last-child th:first-child,
+div.DTFC_LeftHeadWrapper table thead tr:last-child td:first-child {
+ border-bottom-left-radius: 0 !important;
+ border-bottom-right-radius: 0 !important;
+}
+
+div.DTFC_LeftBodyWrapper table {
+ border-top: none;
+ margin-bottom: 0 !important;
+}
+
+div.DTFC_LeftBodyWrapper tbody tr:first-child th,
+div.DTFC_LeftBodyWrapper tbody tr:first-child td {
+ border-top: none;
+}
+
+div.DTFC_LeftFootWrapper table {
+ border-top: none;
+}
+
+/*浮动的确认åç¡®è®¤æ ·å¼ */
+td.buttonRounded {
+ background-color: #e5e5e5;
+ color: #333333;
+ border: 0px solid #b15a59;
+ -webkit-border-radius: 0px;
+ -moz-border-radius: 0px;
+ -ms-border-radius: 0px;
+ -o-border-radius: 0px;
+ border-radius: 0px;
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 12px;
+ /*padding: 0 3px;*/
+ padding-left:5px !important;
+ padding-right:5px !important;
+ height:30px !important;
+}
+
+td.buttonRoundedDisabled {
+ opacity: .65;
+ height:30px !important;
+}
+
+div.buttonConfirm{
+ position: absolute; left: 0px; top: 0px; width: 120px; height: 30px; z-index: 201224; overflow: visible;
+ font-size: 13px;
+}
+div.buttonUnConfirm{
+ position: absolute; left: 120px; top: 0px; width: 100px; height: 30px; z-index: 201242; overflow: visible;
+ font-size: 13px;
+}
+div.buttonDelete{
+ position: absolute; left: 250px; top: 0px; width: 60px; height: 30px; z-index: 201260; overflow: visible;
+ font-size: 13px;
+}
+
+button.btn-confirm {
+ width:90px;
+}
+
+/***
+Extended pagination
+***/
+.paging_bootstrap_extended {
+ margin: 0 !important;
+ padding: 0 !important;
+ float: none !important;
+ font-size: 13px;
+}
+
+.modal-body {
+ font-size: 13px;
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/data-tables/DT_bootstrap.js b/common/src/main/webapp/thirdparty/data-tables/DT_bootstrap.js
new file mode 100644
index 0000000..5b95e4a
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/data-tables/DT_bootstrap.js
@@ -0,0 +1,363 @@
+/* Set the defaults for DataTables initialisation */
+
+$.extend( true, $.fn.dataTable.defaults, {
+ "sDom": "<'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r><'table-scrollable't><'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>", // horizobtal scrollable datatable
+ //"sDom": "<'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r>t<'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>", // defaukt datatable without horizobtal scroll
+ "sPaginationType": "bootstrap",
+ "oLanguage": {
+ "sLengthMenu": " _MENU_ records ",
+ }
+} );
+
+
+/* Default class modification */
+
+$.extend( $.fn.dataTableExt.oStdClasses, {
+ "sWrapper": "dataTables_wrapper"
+} );
+
+
+/* API method to get paging information */
+
+$.fn.dataTableExt.oApi.fnPagingInfo = function ( oSettings )
+{
+ return {
+ "iStart": oSettings._iDisplayStart,
+ "iEnd": oSettings.fnDisplayEnd(),
+ "iLength": oSettings._iDisplayLength,
+ "iTotal": oSettings.fnRecordsTotal(),
+ "iFilteredTotal": oSettings.fnRecordsDisplay(),
+ "iPage": Math.ceil( oSettings._iDisplayStart / oSettings._iDisplayLength ),
+ "iTotalPages": Math.ceil( oSettings.fnRecordsDisplay() / oSettings._iDisplayLength )
+ };
+};
+
+
+/* Bootstrap style pagination control */
+$.extend( $.fn.dataTableExt.oPagination, {
+ "bootstrap": {
+ "fnInit": function( oSettings, nPaging, fnDraw ) {
+ var oLang = oSettings.oLanguage.oPaginate;
+ var fnClickHandler = function ( e ) {
+ e.preventDefault();
+ if ( oSettings.oApi._fnPageChange(oSettings, e.data.action) ) {
+ fnDraw( oSettings );
+ }
+ };
+
+ // pagination with prev, next link icons
+ $(nPaging).append(
+ '<ul class="pagination">'+
+ '<li class="prev disabled"><a href="#" title="'+oLang.sPrevious+'"><i class="fa fa-angle-left"></i></a></li>'+
+ '<li class="next disabled"><a href="#" title="'+oLang.sNext+'"><i class="fa fa-angle-right"></i></a></li>'+
+ '</ul>'
+ );
+
+ var els = $('a', nPaging);
+ $(els[0]).bind( 'click.DT', { action: "previous" }, fnClickHandler );
+ $(els[1]).bind( 'click.DT', { action: "next" }, fnClickHandler );
+ },
+
+ "fnUpdate": function ( oSettings, fnDraw ) {
+ var iListLength = 5;
+ var oPaging = oSettings.oInstance.fnPagingInfo();
+ var an = oSettings.aanFeatures.p;
+ var i, j, sClass, iStart, iEnd, iHalf=Math.floor(iListLength/2);
+
+ if ( oPaging.iTotalPages < iListLength) {
+ iStart = 1;
+ iEnd = oPaging.iTotalPages;
+ }
+ else if ( oPaging.iPage <= iHalf ) {
+ iStart = 1;
+ iEnd = iListLength;
+ } else if ( oPaging.iPage >= (oPaging.iTotalPages-iHalf) ) {
+ iStart = oPaging.iTotalPages - iListLength + 1;
+ iEnd = oPaging.iTotalPages;
+ } else {
+ iStart = oPaging.iPage - iHalf + 1;
+ iEnd = iStart + iListLength - 1;
+ }
+
+ for ( i=0, iLen=an.length ; i<iLen ; i++ ) {
+
+ if (oPaging.iTotalPages < 0) {
+ $('.pagination', an[i]).css('visibility', 'hidden');
+ } else {
+ $('.pagination', an[i]).css('visibility', 'visible');
+ }
+
+ // Remove the middle elements
+ $('li:gt(0)', an[i]).filter(':not(:last)').remove();
+
+ // Add the new list items and their event handlers
+ for ( j=iStart ; j<=iEnd ; j++ ) {
+ sClass = (j==oPaging.iPage+1) ? 'class="active"' : '';
+ $('<li '+sClass+'><a href="#">'+j+'</a></li>')
+ .insertBefore( $('li:last', an[i])[0] )
+ .bind('click', function (e) {
+ e.preventDefault();
+ oSettings._iDisplayStart = (parseInt($('a', this).text(),10)-1) * oPaging.iLength;
+ fnDraw( oSettings );
+ } );
+ }
+
+ // Add / remove disabled classes from the static elements
+ if ( oPaging.iPage === 0 ) {
+ $('li:first', an[i]).addClass('disabled');
+ } else {
+ $('li:first', an[i]).removeClass('disabled');
+ }
+
+ if ( oPaging.iPage === oPaging.iTotalPages-1 || oPaging.iTotalPages === 0 ) {
+ $('li:last', an[i]).addClass('disabled');
+ } else {
+ $('li:last', an[i]).removeClass('disabled');
+ }
+ }
+ }
+ }
+} );
+
+/* Bootstrap style full number pagination control */
+$.extend( $.fn.dataTableExt.oPagination, {
+ "bootstrap_full_number": {
+ "fnInit": function( oSettings, nPaging, fnDraw ) {
+ var oLang = oSettings.oLanguage.oPaginate;
+ var fnClickHandler = function ( e ) {
+ e.preventDefault();
+ if ( oSettings.oApi._fnPageChange(oSettings, e.data.action) ) {
+ fnDraw( oSettings );
+ }
+ };
+
+ $(nPaging).append(
+ '<ul class="pagination">' +
+ '<li class="prev disabled"><a href="#" title="' + oLang.sFirst + '"><i class="fa fa-angle-double-left"></i></a></li>' +
+ '<li class="prev disabled"><a href="#" title="' + oLang.sPrevious + '"><i class="fa fa-angle-left"></i></a></li>'+
+ '<li class="next disabled"><a href="#" title="' + oLang.sNext + '"><i class="fa fa-angle-right"></i></a></li>' +
+ '<li class="next disabled"><a href="#" title="' + oLang.sLast + '"><i class="fa fa-angle-double-right"></i></a></li>' +
+ '</ul>'
+ );
+ var els = $('a', nPaging);
+ $(els[0]).bind('click.DT', { action: "first" }, fnClickHandler);
+ $(els[1]).bind( 'click.DT', { action: "previous" }, fnClickHandler );
+ $(els[2]).bind('click.DT', { action: "next" }, fnClickHandler);
+ $(els[3]).bind('click.DT', { action: "last" }, fnClickHandler);
+ },
+
+ "fnUpdate": function ( oSettings, fnDraw ) {
+ var iListLength = 5;
+ var oPaging = oSettings.oInstance.fnPagingInfo();
+ var an = oSettings.aanFeatures.p;
+ var i, j, sClass, iStart, iEnd, iHalf=Math.floor(iListLength/2);
+
+ if ( oPaging.iTotalPages < iListLength) {
+ iStart = 1;
+ iEnd = oPaging.iTotalPages;
+ }
+ else if ( oPaging.iPage <= iHalf ) {
+ iStart = 1;
+ iEnd = iListLength;
+ } else if ( oPaging.iPage >= (oPaging.iTotalPages-iHalf) ) {
+ iStart = oPaging.iTotalPages - iListLength + 1;
+ iEnd = oPaging.iTotalPages;
+ } else {
+ iStart = oPaging.iPage - iHalf + 1;
+ iEnd = iStart + iListLength - 1;
+ }
+
+
+
+ for ( i=0, iLen=an.length ; i<iLen ; i++ ) {
+ if (oPaging.iTotalPages < 0) {
+ $('.pagination', an[i]).css('visibility', 'hidden');
+ } else {
+ $('.pagination', an[i]).css('visibility', 'visible');
+ }
+
+ // Remove the middle elements
+ $('li:gt(1)', an[i]).filter(':not(.next)').remove();
+
+ // Add the new list items and their event handlers
+ for ( j=iStart ; j<=iEnd ; j++ ) {
+ sClass = (j==oPaging.iPage+1) ? 'class="active"' : '';
+ $('<li '+sClass+'><a href="#">'+j+'</a></li>')
+ .insertBefore( $('li.next:first', an[i])[0] )
+ .bind('click', function (e) {
+ e.preventDefault();
+ oSettings._iDisplayStart = (parseInt($('a', this).text(),10)-1) * oPaging.iLength;
+ fnDraw( oSettings );
+ } );
+ }
+
+ // Add / remove disabled classes from the static elements
+ if ( oPaging.iPage === 0 ) {
+ $('li.prev', an[i]).addClass('disabled');
+ } else {
+ $('li.prev', an[i]).removeClass('disabled');
+ }
+
+ if ( oPaging.iPage === oPaging.iTotalPages-1 || oPaging.iTotalPages === 0 ) {
+ $('li.next', an[i]).addClass('disabled');
+ } else {
+ $('li.next', an[i]).removeClass('disabled');
+ }
+ }
+ }
+ }
+} );
+
+/* Bootstrap style full number pagination control */
+$.extend( $.fn.dataTableExt.oPagination, {
+ "bootstrap_extended": {
+ "fnInit": function( oSettings, nPaging, fnDraw ) {
+ var oLang = oSettings.oLanguage.oPaginate;
+ var oPaging = oSettings.oInstance.fnPagingInfo();
+
+ var fnClickHandler = function ( e ) {
+ e.preventDefault();
+ if ( oSettings.oApi._fnPageChange(oSettings, e.data.action) ) {
+ fnDraw( oSettings );
+ }
+ };
+
+ $(nPaging).append(
+ '<div class="pagination-panel"> ' + oLang.sPage + ' ' +
+ '<a href="#" class="btn btn-sm default prev disabled" title="' + oLang.sPrevious + '"><i class="fa fa-angle-left"></i></a>' +
+ '<input type="text" class="pagination-panel-input form-control input-mini input-inline input-sm" maxlenght="5" style="text-align:center; margin: 0 5px;">' +
+ '<a href="#" class="btn btn-sm default next disabled" title="' + oLang.sNext + '"><i class="fa fa-angle-right"></i></a> ' +
+ oLang.sPageOf + ' <span class="pagination-panel-total"></span>' +
+ '</div>'
+ );
+
+ var els = $('a', nPaging);
+
+ $(els[0]).bind('click.DT', { action: "previous" }, fnClickHandler );
+ $(els[1]).bind('click.DT', { action: "next" }, fnClickHandler);
+
+ $('.pagination-panel-input', nPaging).bind('change.DT', function(e) {
+ var oPaging = oSettings.oInstance.fnPagingInfo();
+ e.preventDefault();
+ var page = parseInt($(this).val());
+ if (page > 0 && page < oPaging.iTotalPages) {
+ if ( oSettings.oApi._fnPageChange(oSettings, page-1) ) {
+ fnDraw( oSettings );
+ }
+ } else {
+ $(this).val(oPaging.iPage + 1);
+ }
+ });
+
+ $('.pagination-panel-input', nPaging).bind('keypress.DT', function(e) {
+ var oPaging = oSettings.oInstance.fnPagingInfo();
+ if (e.which == 13) {
+ var page = parseInt($(this).val());
+ if (page > 0 && page < oSettings.oInstance.fnPagingInfo().iTotalPages) {
+ if ( oSettings.oApi._fnPageChange(oSettings, page-1) ) {
+ fnDraw( oSettings );
+ }
+ } else {
+ $(this).val(oPaging.iPage + 1);
+ }
+ e.preventDefault();
+ }
+ });
+ },
+
+ "fnUpdate": function ( oSettings, fnDraw ) {
+ var iListLength = 5;
+ var oPaging = oSettings.oInstance.fnPagingInfo();
+ var an = oSettings.aanFeatures.p;
+ var i, j, sClass, iStart, iEnd, iHalf=Math.floor(iListLength/2);
+
+ if ( oPaging.iTotalPages < iListLength) {
+ iStart = 1;
+ iEnd = oPaging.iTotalPages;
+ }
+ else if ( oPaging.iPage <= iHalf ) {
+ iStart = 1;
+ iEnd = iListLength;
+ } else if ( oPaging.iPage >= (oPaging.iTotalPages-iHalf) ) {
+ iStart = oPaging.iTotalPages - iListLength + 1;
+ iEnd = oPaging.iTotalPages;
+ } else {
+ iStart = oPaging.iPage - iHalf + 1;
+ iEnd = iStart + iListLength - 1;
+ }
+
+
+ for ( i=0, iLen=an.length ; i<iLen ; i++ ) {
+ var wrapper = $(an[i]).parents(".dataTables_wrapper");
+
+ if (oPaging.iTotalPages <= 0) {
+ $('.pagination-panel, .dataTables_length', wrapper).hide();
+ } else {
+ $('.pagination-panel, .dataTables_length', wrapper).show();
+ }
+
+ $('.pagination-panel-total', an[i]).html(oPaging.iTotalPages);
+ $('.pagination-panel-input', an[i]).val(oPaging.iPage + 1);
+
+ // Remove the middle elements
+ $('li:gt(1)', an[i]).filter(':not(.next)').remove();
+
+ // Add the new list items and their event handlers
+ for ( j=iStart ; j<=iEnd ; j++ ) {
+ sClass = (j==oPaging.iPage+1) ? 'class="active"' : '';
+ $('<li '+sClass+'><a href="#">'+j+'</a></li>')
+ .insertBefore( $('li.next:first', an[i])[0] )
+ .bind('click', function (e) {
+ e.preventDefault();
+ oSettings._iDisplayStart = (parseInt($('a', this).text(),10)-1) * oPaging.iLength;
+ fnDraw( oSettings );
+ } );
+ }
+
+ // Add / remove disabled classes from the static elements
+ if ( oPaging.iPage === 0 ) {
+ $('a.prev', an[i]).addClass('disabled');
+ } else {
+ $('a.prev', an[i]).removeClass('disabled');
+ }
+
+ if ( oPaging.iPage === oPaging.iTotalPages-1 || oPaging.iTotalPages === 0 ) {
+ $('a.next', an[i]).addClass('disabled');
+ } else {
+ $('a.next', an[i]).removeClass('disabled');
+ }
+ }
+ }
+ }
+} );
+
+/*
+ * TableTools Bootstrap compatibility
+ * Required TableTools 2.1+
+ */
+if ( $.fn.DataTable.TableTools ) {
+ // Set the classes that TableTools uses to something suitable for Bootstrap
+ $.extend( true, $.fn.DataTable.TableTools.classes, {
+ "container": "btn-group",
+ "buttons": {
+ "normal": "btn default",
+ "disabled": "btn disabled"
+ },
+ "collection": {
+ "container": "DTTT_dropdown dropdown-menu",
+ "buttons": {
+ "normal": "",
+ "disabled": "disabled"
+ }
+ }
+ } );
+
+ // Have the collection use a bootstrap compatible dropdown
+ $.extend( true, $.fn.DataTable.TableTools.DEFAULTS.oTags, {
+ "collection": {
+ "container": "ul",
+ "button": "li",
+ "liner": "a"
+ }
+ } );
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/data-tables/DataTableICT.js b/common/src/main/webapp/thirdparty/data-tables/DataTableICT.js
new file mode 100644
index 0000000..ef85de3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/data-tables/DataTableICT.js
@@ -0,0 +1,1459 @@
+/***
+ Wrapper/Helper Class for datagrid based on jQuery Datatable Plugin
+ ***/
+var DatatableICT = function () {
+
+ var contextData;
+ var tableOptions; // main options
+ var dataTable; // datatable object
+ var table; // actual table jquery object
+ var tableContainer; // actual table container object
+ var tableWrapper; // actual table wrapper jquery object
+ var tableInitialized = false;
+ var ajaxParams = []; // set filter mode
+ var columns;
+ var xsHiddenColumns;
+ var smHiddenColumns;
+ var columnMaxLength = 30;
+ var columnsTooLong;
+ var hidden_xs_maxWidth = 768;
+ var hidden_sm_maxWidth = 991;
+
+ var openRowFlag = false;
+ var rowOverFlag = false;
+ var rowCheckable = false;
+
+ var aTargetsAll;
+ var sTotalRecordsSource;
+ var totalRecords;
+ var tableHeight;
+
+ var requestType="GET";
+ var callbackList = [];
+ var checkedRowDatas = [];
+ var currentPageData;
+
+ var includedInXsHiddenColumns = function(columnId){
+ for(var i=0;i<xsHiddenColumns.length; i++ ){
+ var column = xsHiddenColumns[i];
+ if(columnId == column.columnId){
+ return true;
+ }
+ }
+ return false;
+ }
+
+ var includedInSmHiddenColumns = function(columnId){
+ for(var i=0;i<smHiddenColumns.length; i++ ){
+ var column = smHiddenColumns[i];
+ if(columnId == column.columnId){
+ return true;
+ }
+ }
+ return false;
+ }
+
+ var countSelectedRecords = function() {
+ var selected = $('tbody > tr > td:nth-child(1) input[type="checkbox"]:checked', table).size();
+ var text = tableOptions.dataTable.oLanguage.sGroupActions;
+ if (selected > 0) {
+ $('.table-group-actions > span', tableWrapper).text(text.replace("_TOTAL_", selected));
+ } else {
+ $('.table-group-actions > span', tableWrapper).text("");
+ }
+ }
+
+ var jsonObjectToArray = function(json, columns, iDraw){
+ var jsonToDatatable = {aaData:[], sEcho:iDraw, iTotalRecords:0, iTotalDisplayRecords:0 };
+ //获å–æ•°æ®çš„属性
+ var dataField;
+ //性能的情况
+ if(json.data){
+ dataField = json.data;
+ }
+ //告警的情况
+ if(json.response && json.response.data){
+ dataField = json.response.data;
+ }
+ for(var i=0; i<dataField.length; i++){
+ jsonToDatatable.aaData[i] = [];
+ var resRowObject;
+ //性能的情况
+ if(json.data){
+ resRowObject = json.data[i].data;
+ }
+ //告警的情况
+ if(json.response && json.response.data){
+ resRowObject = json.response.data[i];
+ }
+ if(rowCheckable){
+ jsonToDatatable.aaData[i].push("<input type=\"checkbox\" name=\"id[]\" rowDataNo='rowNo_" + i + "' value=\"1\">");
+ }
+ if(openRowFlag){
+ jsonToDatatable.aaData[i].push("<span class=\"row-details row-details-close\"></span>");
+ }
+ for(var j=0; j<columns.length; j++){
+
+ if($(window).width() >= hidden_xs_maxWidth && $(window).width() < hidden_sm_maxWidth && includedInSmHiddenColumns(columns[j].columnId )){
+ /*éšè—pad尺寸需è¦éšè—的列*/
+ }else if($(window).width() < hidden_xs_maxWidth && includedInXsHiddenColumns(columns[j].columnId )){
+ /*éšè—手机尺寸需è¦éšè—的列*/
+ }else{
+ var currentColumnId = columns[j].columnId;
+ if(jQuery.inArray(currentColumnId, columnsTooLong) > -1){
+ var rawText = "";
+ for(var k=0;k<columnsTooLong.length;k++){
+ if(currentColumnId == columnsTooLong[k]){
+ rawText = resRowObject[currentColumnId];
+ break;
+ }
+ }
+ if(rawText.length > columnMaxLength){
+ jsonToDatatable.aaData[i].push(rawText.slice(0, columnMaxLength) + '...');
+ }else{
+ jsonToDatatable.aaData[i].push(resRowObject[currentColumnId]);
+ }
+ } else {
+ jsonToDatatable.aaData[i].push(resRowObject[currentColumnId]);
+ }
+
+ }
+ }
+ }
+ jsonToDatatable.sEcho++;
+ //å–得总行数
+ var totalRow = 0;
+ if(requestType == "POST"){ //性能的情况å•ç‹¬å‘请求获得总行数
+ totalRow = totalRecords;
+ }else{
+ var totalRecordsSource = eval('json.' + sTotalRecordsSource);
+ if(totalRecordsSource && totalRecordsSource.length >0){
+ totalRow = parseInt(totalRecordsSource);
+ }
+ }
+ if(isNaN(totalRow)){
+ alert('All rows counting number got fail!');
+ }else{
+ jsonToDatatable.iTotalRecords = totalRow;
+ jsonToDatatable.iTotalDisplayRecords = totalRow;
+ }
+ return jsonToDatatable;
+ }
+
+ var singleAlarmDel = function(divOverlay){
+
+ //æ ¹æ®æµ®åŠ¨æ¡†çš„当å‰id获å–需è¦åˆ é™¤çš„è¡Œ
+ var trId = divOverlay.attr('id_tr');
+ tr=$('tr#' + trId);
+ var tds = $(tr).children();
+ var tdAlarmId = "";
+ if(rowCheckable){
+ tdAlarmId = $(tds.eq(2)).text();
+ }else{
+ tdAlarmId = $(tds.eq(1)).text();
+ }
+
+ var data= {
+ "alarmId":[parseInt(tdAlarmId)]
+ };
+
+ var sSource = "/web/rest/web/fm/curalarms?data=" + JSON.stringify(data) + "&_operationType=remove&_dataSource=isc_PageRestDataSource_0&isc_metaDataPrefix=_&isc_dataFormat=json";
+
+ $.ajax( {
+ "dataType": 'json',
+ "type": "DELETE",
+ "url": sSource,
+ "data" : null,
+ "contentType" : 'application/json; charset=utf-8',
+ "success": function(json) {
+ if(json.response.status == 0){
+ var resRowObject = json.response.data[0];
+ //alert('删除æˆåŠŸ');
+ }
+ if(json.response.status == -1){
+ //alert('删除失败');
+ }
+ },
+ "error": function() {
+ alert('Communication Error!');
+ }
+ } );
+ }
+
+ var singleAlarmAckUnAck = function(divOverlay, ackType){
+
+ //æ ¹æ®æµ®åŠ¨æ¡†çš„当å‰id获å–需è¦ç¡®è®¤çš„è¡Œ
+ var trId = divOverlay.attr('id_tr');
+ var tr = $('tr#' + trId);
+
+ //å–å¾—éšè—的头部表格的相应行
+ var $tableHead = $('div.dataTables_scrollHeadInner > table.dataTable', contextData.wrapperDivContext);
+ //var trHead = $('tbody > tr:nth-child(' + trId + ')', $tableHead);
+ var trHead = $('tr#' + trId.replace('body', 'head'), $tableHead);
+ var tdDivs = $('td > div', trHead);
+
+ var tds = $(tr).children();
+ var tdAlarmId = "";
+ if(rowCheckable){
+ tdAlarmId = $(tds.eq(2)).text();
+ }else{
+ tdAlarmId = $(tds.eq(1)).text();
+ }
+
+ var aoData =
+ {
+ "dataSource":"isc_PageRestDataSource_0",
+ "operationType":"update",
+ "componentId":"isc_com_zte_ums_aos_fm_view_eventview_table_AlarmTable_0",
+ "data":{
+ "viewType":1,
+ "state":ackType,
+ "alarmId":[
+ parseInt(tdAlarmId)
+ ]
+ },
+ "oldValues":null
+ };
+
+ var sSource = "/web/rest/web/fm/curalarms?isc_dataFormat=json";
+
+ $.ajax( {
+ "dataType": 'json',
+ "type": "PUT",
+ "url": sSource,
+ "contentType": 'application/json; charset=utf-8',
+ "data": JSON.stringify(aoData),
+ "success": function(json) {
+ if(callbackList[1]){
+ json = callbackList[1](json);
+ }
+ if(json.response.status == 0){
+ var resRowObject = json.response.data[0];
+ var columnsCopy = $.extend(true, [], columns);
+ //éšè—列的情况下需è¦ç‰¹æ®Šå¤„ç†
+ if($(window).width()>=hidden_xs_maxWidth && $(window).width()<hidden_sm_maxWidth){
+ columnsCopy = [];
+ for(var i=0;i<columns.length;i++){
+ if(!includedInSmHiddenColumns(columns[i].columnId)){
+ columnsCopy.push(columns[i]);
+ }
+ }
+ } else if($(window).width()<hidden_xs_maxWidth){
+ columnsCopy = [];
+ for(var i=0;i<columns.length;i++){
+ if(!includedInXsHiddenColumns(columns[i].columnId)){
+ columnsCopy.push(columns[i]);
+ }
+ }
+ }
+ var iIndex = 1;
+ if(rowCheckable){
+ iIndex = 2;
+ }
+ for(var i=iIndex;i<tds.length && (i-iIndex)<columnsCopy.length;i++){
+ var currentColumnId = columnsCopy[i-iIndex].columnId;
+ if(jQuery.inArray(currentColumnId, columnsTooLong) > -1) {
+ var rawText = "";
+ for(var k=0;k<columnsTooLong.length;k++){
+ if(currentColumnId == columnsTooLong[k]){
+ rawText = resRowObject[currentColumnId];
+ break;
+ }
+ }
+ if(rawText.length > columnMaxLength){
+ $(tds.eq(i)).html(rawText.slice(0, columnMaxLength) + '...');
+ $(tdDivs.eq(i)).html(rawText.slice(0, columnMaxLength) + '...');
+ }else{
+ $(tds.eq(i)).html(resRowObject[currentColumnId]);
+ $(tdDivs.eq(i)).html(resRowObject[currentColumnId]);
+ }
+ } else {
+ $(tds.eq(i)).html(resRowObject[currentColumnId]);
+ $(tdDivs.eq(i)).html(resRowObject[currentColumnId]);
+ }
+ }
+ //更新缓存中的当å‰è¡Œæ•°æ®
+ for (var t = 0; t < dataTable.datas.length; t++) {
+ var temp = dataTable.datas[t];
+ if (temp.alarmId == resRowObject['alarmId']) {
+ dataTable.datas[t] = resRowObject;
+ break;
+ }
+ }
+ }
+ if(json.response.status == -1){
+ $('div#myModalConfirm' + contextData.curentDatableId).modal({
+ keyboard: false,
+ backdrop: 'static'
+ });
+ $('span#alarm_number' + contextData.curentDatableId).html(tdAlarmId);
+ //国际化信æ¯
+ if(ackType==1){
+ $('span#aos_fm_alarm_opeater_ack_already').html($.i18n.prop('aos_fm_alarm_opeater_ack_already_ok').replace(/\"/g,"").replace(";", ""));
+ }else{
+ $('span#aos_fm_alarm_opeater_ack_already').html($.i18n.prop('aos_fm_alarm_opeater_ack_already_un').replace(/\"/g,"").replace(";", ""));
+ }
+ }
+ },
+ "error": function() {
+ alert('Communication Error!');
+ }
+ } );
+ }
+
+ var addRowOverlap = function(){
+ var $tableData = $('table#datatable_ajax' + contextData.curentDatableId);
+ //å–å¾—éšè—的头部表格的相应行
+ var $tableHead = $('div.dataTables_scrollHeadInner > table.dataTable', contextData.wrapperDivContext);
+ var trHeads = $tableHead.find('tr').get();
+ $.each( trHeads, function( index, trHead ){
+ $(trHead).attr('id', 'headTableTR' + index);
+ });
+ //å–得浮动div
+ var $divOverlay = $('div#divOverlay' + contextData.curentDatableId);
+ var divScrollHead = $('div.dataTables_scrollHead', contextData.wrapperDivContext);
+ var divRightPadding = $('div#divRightPadding' + contextData.curentDatableId);
+ //å–表头下边沿ä½ç½®
+ var tableHeadBottomHeight = $(divScrollHead).position().top + $(divScrollHead).height();
+ var tableBottom = $tableData.position().top + $tableData.height() + 3;
+ //å–表格å³è¾¹æ²¿ä½ç½®
+ var tableRightEdgePosition = $(divRightPadding).position().left;
+ var trs = $tableData.find('tr').get();
+ $.each( trs, function( index, tr ){
+ var tdEmpty = $('td.dataTables_empty',tr);
+ if(!tdEmpty || tdEmpty.length ==0 ){
+ $(tr).attr('id', 'bodyTableTR' + index + contextData.curentDatableId);
+ //$divOverlay.attr('id_tr', 'bodyTableTR' + index);
+ $(tr).one('hover', function(){
+ var rowPos = $(tr).position();
+ var currentTrTop = rowPos.top;
+ //var bottomLeft = rowPos.left;
+ $divOverlay.attr('id_tr', 'bodyTableTR' + index + contextData.curentDatableId);
+ $divOverlay.css({
+ display: 'block',
+ position: 'absolute',
+ 'background-color': '#e5e5e5',
+ //opacity: 0.7,
+ border: 'solid 0px',
+ top: currentTrTop + 6,
+ left: tableRightEdgePosition - 308,
+ width: 300,
+ height: 30
+ });
+ //防止浮动框跳出表格内容区域
+ if( $divOverlay.position().top < tableHeadBottomHeight || $divOverlay.position().top + $divOverlay.height() > tableBottom){
+ $divOverlay.css('display', 'none');
+ }
+ var buttonConfirm = $('div#buttonConfirm', $divOverlay);
+ var buttonUnConfirm = $('div#buttonUnConfirm', $divOverlay);
+ $(buttonConfirm).one('click', function(){
+ var buttonRoundedTDsConfirm = $(buttonConfirm).find('td.buttonRounded');
+ var buttonRoundedTDsUnConfirm = $(buttonUnConfirm).find('td.buttonRoundedDisabled');
+ if(buttonRoundedTDsConfirm && buttonRoundedTDsConfirm.length > 0){
+ $.each(buttonRoundedTDsConfirm, function(index, td){
+ $(td).removeClass('buttonRounded').addClass('buttonRoundedDisabled');
+ });
+ $.each(buttonRoundedTDsUnConfirm, function(index, td){
+ $(td).removeClass('buttonRoundedDisabled').addClass('buttonRounded');
+ });
+ $divOverlay.css('display', 'none');
+ singleAlarmAckUnAck($divOverlay, 1);
+ }
+ });
+ $(buttonUnConfirm).one('click', function(){
+ var buttonRoundedTDsUnConfirm = $(buttonUnConfirm).find('td.buttonRounded');
+ var buttonRoundedTDsConfirm = $(buttonConfirm).find('td.buttonRoundedDisabled');
+ if(buttonRoundedTDsUnConfirm && buttonRoundedTDsUnConfirm.length > 0){
+ $.each(buttonRoundedTDsUnConfirm, function(index, td){
+ $(td).removeClass('buttonRounded').addClass('buttonRoundedDisabled');
+ });
+ $.each(buttonRoundedTDsConfirm, function(index, td){
+ $(td).removeClass('buttonRoundedDisabled').addClass('buttonRounded');
+ });
+ $divOverlay.css('display', 'none');
+ singleAlarmAckUnAck($divOverlay, 2);
+ }
+ });
+ var buttonDelete = $('div#buttonDelete', $divOverlay);
+ $(buttonDelete).die().live('click', function(){
+ //弹出删除确认对è¯æ¡†
+ $('div#myModal' + contextData.curentDatableId).modal({
+ keyboard: false,
+ backdrop: 'static'
+ });
+ $('#delConfirm' + contextData.curentDatableId).die().live('click', function(){
+ $divOverlay.css('display', 'none');
+ dataTable.fnClose(tr);
+ $(tr).remove();
+ //删除表头表格的相应行
+ $('tr#' + $(tr).attr('id').replace('body', 'head'), $tableHead).remove();
+ //删除åŽç«¯æ•°æ®
+ singleAlarmDel($divOverlay);
+ //刷新表格
+ dataTable.fnAdjustColumnSizing();
+ });
+ });
+ //展开行的情况éšè—
+ $('td.details > table.detailTable').on('hover', function(){
+ $divOverlay.css('display', 'none');
+ });
+ });
+ }
+ });
+ }
+
+ return {
+
+ //main function to initiate the module
+ init: function (options, columnsDefined, xsHiddenColumnsDefined, smHiddenColumnsDefined) {
+
+ if (!$().dataTable) {
+ return;
+ }
+
+ var the = this;
+
+ //记录需è¦ç¦æŽ‰é»˜è®¤æŽ’åºçš„列
+ var aTargets = [];
+ var targetsLength = columnsDefined.length;
+ if(rowCheckable)targetsLength++;
+ if(openRowFlag)targetsLength++;
+ for(var i=0;i<targetsLength;i++){
+ aTargets.push(i);
+ }
+ aTargetsAll = aTargets;
+
+ // default settings
+ options = $.extend(true, {
+ src: "", // actual table
+ filterApplyAction: "filter",
+ filterCancelAction: "filter_cancel",
+ resetGroupActionInputOnSuccess: true,
+ dataTable: {
+ //"sDom" : "<'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'<'table-group-actions pull-right'>>r><'table-scrollable't><'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'>r>>", // datatable layout
+
+ "aoColumnDefs" : [{ // define columns sorting options(by default all columns are sortable extept the first checkbox column)
+ 'bSortable' : false,
+ 'aTargets' : aTargets
+ }],
+
+ "bAutoWidth": false, // disable fixed width and enable fluid table
+ //"bSortCellsTop": true, // make sortable only the first row in thead
+ "sPaginationType": "bootstrap_extended", // pagination type(bootstrap, bootstrap_full_number or bootstrap_extended)
+ "bProcessing": true, // enable/disable display message box on record load
+ "bServerSide": true, // enable/disable server side ajax loading
+ "sAjaxSource": "", // define ajax source URL
+ //"sServerMethod": "GET",
+
+ // handle ajax request
+ "fnServerData": function ( sSource, aoData, fnCallback, oSettings ) {
+ //for ICT Paging
+ //var startIndex = aoData[3].value;//"iDisplayStart"
+ //var pageLength = aoData[4].value;//"iDisplayLength"
+ var oPaging = oSettings.oInstance.fnPagingInfo();
+ //var startIndex = oPaging.iStart;
+ var pageLength = oPaging.iLength;
+ var curPageNo = oPaging.iPage + 1;
+
+ for(var k=aoData.length-1;k>=0;k--){
+ var flag = -1;
+ if(aoData[k].name=='pageSize'){
+ aoData[k].value=pageLength;
+ flag++;
+ }
+ if(aoData[k].name=='pageNo'){
+ aoData[k].value=curPageNo;
+ flag++
+ }
+ if(flag == 1)break;
+ }
+
+ if(requestType == "POST"){
+
+ var postData;
+ for(var k=aoData.length-1;k>=0;k--){
+ if(aoData[k].name=='data'){
+ postData = aoData[k].value;
+ postData.pageSize = pageLength;
+ postData.pageNo = curPageNo;
+ break;
+ }
+ }
+
+ oSettings.jqXHR = $.ajax( {
+ "dataType": 'json',
+ "type": "POST",
+ "url": sSource,
+ "data": JSON.stringify(postData),
+ "contentType": 'application/json; charset=utf-8',
+ "success": function(res, textStatus, jqXHR) {
+ if (res.sMessage) {
+ openoFrameWork.alert({type: (res.sStatus == 'OK' ? 'success' : 'danger'), icon: (res.sStatus == 'OK' ? 'check' : 'warning'), message: res.sMessage, container: tableWrapper, place: 'prepend'});
+ }
+ if ($('.group-checkable', tableContainer).size() === 1) {
+ $('.group-checkable', tableContainer).attr("checked", false);
+ $.uniform.update($('.group-checkable', tableContainer));
+ }
+ if (tableOptions.onSuccess) {
+ tableOptions.onSuccess.call(the);
+ }
+
+ if(callbackList[1]){
+ res = callbackList[1](res);
+ }
+
+ //转æ¢è¿”回数æ®ç»™datatable
+ res = jsonObjectToArray(res, columns, oSettings.iDraw);
+
+ //é‡ç»˜è¡¨æ ¼
+ fnCallback(res, textStatus, jqXHR);
+ },
+ "error": function() {
+ if (tableOptions.onError) {
+ tableOptions.onError.call(the);
+ }
+ openoFrameWork.alert({type: 'danger', icon: 'warning', message: tableOptions.dataTable.oLanguage.sAjaxRequestGeneralError, container: tableWrapper, place: 'prepend'});
+ $('.dataTables_processing', tableWrapper).remove();
+ }
+ } );
+
+ } else {
+
+ oSettings.jqXHR = $.ajax( {
+ "dataType": 'json',
+ "type": "GET",
+ "url": sSource,
+ "data": aoData,
+ "success": function(res, textStatus, jqXHR) {
+ if (res.sMessage) {
+ openoFrameWork.alert({type: (res.sStatus == 'OK' ? 'success' : 'danger'), icon: (res.sStatus == 'OK' ? 'check' : 'warning'), message: res.sMessage, container: tableWrapper, place: 'prepend'});
+ }
+ if ($('.group-checkable', tableContainer).size() === 1) {
+ $('.group-checkable', tableContainer).attr("checked", false);
+ $.uniform.update($('.group-checkable', tableContainer));
+ }
+ if (tableOptions.onSuccess) {
+ tableOptions.onSuccess.call(the);
+ }
+ //ä¿å­˜æ•°æ®åœ¨dataTable对象中给行详细信æ¯é¢æ¿ç”¨
+ if(res.response){ //告警的情况,返回数æ®åœ¨response属性里
+ dataTable.datas = res.response.data;
+ if(res.response.status < 0){
+ alert(res.response.data);
+ return;
+ }
+ }
+
+ //ä¿å­˜å½“å‰é¡µåŽŸå§‹æ•°æ®çš„备份
+ currentPageData = $.extend(true, {}, res.response.data);;
+
+ if(callbackList[1]){
+ res = callbackList[1](res);
+ }
+
+ //转æ¢è¿”回数æ®ç»™datatable
+ res = jsonObjectToArray(res, columns, oSettings.iDraw);
+
+ //é‡ç»˜è¡¨æ ¼
+ fnCallback(res, textStatus, jqXHR);
+ },
+ "error": function() {
+ if (tableOptions.onError) {
+ tableOptions.onError.call(the);
+ }
+ openoFrameWork.alert({type: 'danger', icon: 'warning', message: tableOptions.dataTable.oLanguage.sAjaxRequestGeneralError, container: tableWrapper, place: 'prepend'});
+ $('.dataTables_processing', tableWrapper).remove();
+ }
+ } );
+ }
+
+ },
+
+ // pass additional parameter
+ "fnServerParams": function ( aoData ) {
+ //here can be added an external ajax request parameters.
+ //for(var i in ajaxParams) {
+ for(var i=0; i<ajaxParams.length; i++){
+ var param = ajaxParams[i];
+ aoData.push({"name" : param.name, "value": param.value});
+ }
+ },
+
+ "fnDrawCallback": function( oSettings ) { // run some code on table redraw
+ if (tableInitialized === false) { // check if table has been initialized
+ tableInitialized = true; // set table initialized
+ table.show(); // display table
+ }
+ openoFrameWork.initUniform($('input[type="checkbox"]', tableContainer)); // reinitialize uniform checkboxes on each table reload
+ countSelectedRecords(); // reset selected records indicator
+ //所有tdä¸æ¢è¡Œ
+ $('table#datatable_ajax' + contextData.curentDatableId).find('td').css('white-space', 'nowrap');
+
+ //自适应对é½è¡¨å¤´
+ var $tableHead = $('div.dataTables_scrollHeadInner > table.dataTable', tableWrapper);
+ var tbodyHead = $('tbody', $tableHead);
+ if(tbodyHead && tbodyHead.length >0){
+ $(tbodyHead).remove();
+ }
+
+ var $tableBody = $('table#datatable_ajax' + contextData.curentDatableId, tableWrapper);
+ var trIn = $('thead > tr:nth-child(1)', $tableHead);
+ var trBodyHead = $('thead > tr:nth-child(1)', $tableBody);
+ var tds = $(trIn).children();
+ var ths = $(trBodyHead).children();
+ for(var k=0;k<tds.length;k++){
+ $(ths.eq(k)).html('<div style="height: 0;overflow: hidden;">' + tds.eq(k).html() + '</div>');
+ }
+ var bodyRows = $('tbody > tr', $tableBody);
+ for(var i=0;i<bodyRows.length;i++){
+ var rowClone = $(bodyRows.eq(i)).clone();
+ var tds = $(rowClone).children();
+ for(var j=0;j<tds.length;j++){
+ $(tds.eq(j)).html('<div style="height: 0;overflow: hidden;">' + tds.eq(j).html() + '</div>');
+ $(tds.eq(j)).height('0px');
+ $(tds.eq(j)).css('padding-top','0px');
+ $(tds.eq(j)).css('padding-bottom','0px');
+ $(tds.eq(j)).css('border-top-width','0px');
+ $(tds.eq(j)).css('border-bottom-width','0px');
+ }
+ $(rowClone).height('0px');
+ $tableHead.append($(rowClone).prop("outerHTML"));
+ }
+
+ $('div.dataTables_scrollBody', tableWrapper).css('width','100%');
+ $('div.dataTables_scrollHead', tableWrapper).css('width','98.5%');
+ $('div.dataTables_scrollHeadInner', tableWrapper).css('padding-right', 0);
+
+ //添加浮动确认å确认按钮
+ if(rowOverFlag){
+ addRowOverlap();
+ }
+
+ //设置表格本体高度
+ $('div.dataTables_scrollBody', tableWrapper).css('height', tableHeight);
+ }
+ }
+ }, options);
+
+ tableOptions = options;
+
+ columns = columnsDefined;
+ xsHiddenColumns = xsHiddenColumnsDefined;
+ smHiddenColumns = smHiddenColumnsDefined;
+ // create table's jquery object
+ table = $(options.src);
+ tableContainer = table.parents("div#table-container" + contextData.curentDatableId);
+ // apply the special class that used to restyle the default datatable
+
+ $.fn.dataTableExt.oStdClasses.sWrapper = $.fn.dataTableExt.oStdClasses.sWrapper + " dataTables_extended_wrapper";
+
+ // initialize a datatable
+ dataTable = table.dataTable(options.dataTable);
+
+ tableWrapper = table.parents('div.dataTables_wrapper', tableContainer);
+
+ // modify table per page dropdown input by appliying some classes
+ $('.dataTables_length select', tableWrapper).addClass("form-control input-xsmall input-sm");
+
+ // handle group checkboxes check/uncheck
+ $('.group-checkable', tableContainer).change(function () {
+ var set = $('tbody > tr > td:nth-child(1) input[type="checkbox"]', table);
+ var checked = $(this).is(":checked");
+ $(set).each(function () {
+ $(this).attr("checked", checked);
+ });
+ $.uniform.update(set);
+ countSelectedRecords();
+ });
+
+ // handle row's checkbox click
+ table.on('change', 'tbody > tr > td:nth-child(1) input[type="checkbox"]', function(){
+ countSelectedRecords();
+ });
+
+ //if ($.browser.safari) {
+ // $('.table-container').css('width','100%');
+ //}
+ //填充表头å³è¾¹ç•Œ
+ $('div.dataTables_scrollHead', tableContainer).css('display','inline-block');
+ //var dataTables_scrollHead_height = $('.dataTables_scrollHead').css( "height" );
+ $("div.dataTables_scrollHead", tableContainer).after("<div id='divRightPadding" + contextData.curentDatableId + "' style='overflow: hidden; background:#eee; position: relative; float:right; border: 1px solid #ddd; height:" + 38 + "px; width: 1.4%;'></div>");
+ if($.browser.mozilla){
+ $('div#divRightPadding', tableContainer).css('height', '40');
+ }
+
+ //éšè—掉æŸäº›åˆ—
+ var $tableHead = $('div.dataTables_scrollHeadInner > table.dataTable', tableWrapper);
+ var $tableBody = $('table#datatable_ajax' + contextData.curentDatableId, tableWrapper);
+
+ for(var i=0;i<xsHiddenColumns.length;i++){
+ for(var j=0;j<columns.length;j++){
+ if(xsHiddenColumns[i].columnId == columns[j].columnId){
+ $('thead > tr > th#' + columns[j].columnId, $tableHead).addClass('hidden-xs');
+ $('thead > tr > th#' + columns[j].columnId, $tableBody).addClass('hidden-xs');
+ break;
+ }
+ }
+ }
+
+ for(var i=0;i<smHiddenColumns.length;i++){
+ for(var j=0;j<columns.length;j++){
+ if(smHiddenColumns[i].columnId == columns[j].columnId){
+ $('thead > tr > th#' + columns[j].columnId, $tableHead).addClass('hidden-sm');
+ $('thead > tr > th#' + columns[j].columnId, $tableBody).addClass('hidden-sm');
+ break;
+ }
+ }
+ }
+ },//end init------------------------------------------------------------------------------------
+
+ getSelectedRowsCount: function() {
+ return $('tbody > tr > td:nth-child(1) input[type="checkbox"]:checked', table).size();
+ },
+
+ getSelectedRows: function() {
+ var rows = [];
+ $('tbody > tr > td:nth-child(1) input[type="checkbox"]:checked', table).each(function(){
+ rows.push({rowDataNo: $(this).attr("rowDataNo"), name: $(this).attr("name"), value: $(this).val()});
+ });
+
+ return rows;
+ },
+
+ addAjaxParam: function(name, value) {
+ ajaxParams.push({"name": name, "value": value});
+ },
+
+ clearAjaxParams: function(name, value) {
+ ajaxParams = [];
+ },
+
+ getDataTable: function() {
+ return dataTable;
+ },
+
+ getTableWrapper: function() {
+ return tableWrapper;
+ },
+
+ gettableContainer: function() {
+ return tableContainer;
+ },
+
+ getTable: function() {
+ return table;
+ },
+
+ setOpenRowFlag: function(openRowFlagInput) {
+ openRowFlag = openRowFlagInput;
+ },
+
+ setRowOverFlag: function(rowOverFlagInput) {
+ rowOverFlag = rowOverFlagInput;
+ },
+
+ setRowCheckable: function(rowCheckableInput) {
+ rowCheckable = rowCheckableInput;
+ },
+
+ setColumnsTooLong: function(columnsTooLongInput) {
+ columnsTooLong = columnsTooLongInput;
+ },
+
+ setSTotalRecordsSource: function(sTotalRecordsSourceInput){
+ sTotalRecordsSource = sTotalRecordsSourceInput;
+ },
+
+ setTotalRecords: function(totalRecordsInput){
+ totalRecords = totalRecordsInput;
+ },
+
+ setTableHeight: function(tableHeightInput){
+ tableHeight = tableHeightInput;
+ },
+
+ setCallbackList: function(list){
+ if($.isArray(list)){
+ callbackList = list;
+ }
+ },
+
+ getCheckedRowDatas:function(){
+ checkedRowDatas = [];
+ $('tbody > tr > td:nth-child(1) input[type="checkbox"]:checked', table).each(function(){
+ var rowNoId = $(this).attr("rowDataNo");
+ var rowNoIndex = rowNoId.slice(rowNoId.indexOf("_") + 1);
+ checkedRowDatas.push(currentPageData[parseInt(rowNoIndex)]);
+ });
+ return checkedRowDatas;
+ },
+
+ setRequestType: function(requestTypeInput){
+ requestType = requestTypeInput;
+ },
+
+ setContextData: function(newContextData){
+ contextData = newContextData;
+ },
+
+ setTotalPage: function(newTotalPage){
+ $("#datatable_ajax" + contextData.curentDatableId + "_info").html(tableOptions.dataTable.oLanguage.sInfo.replace("_TOTAL_", newTotalPage + ""));
+ }
+
+ };
+
+};
+
+var TableAjaxICT = function () {
+
+ var contextData;
+
+ var initPickers = function () {
+ //init date pickers
+ $('.date-picker').datepicker({
+ //rtl: App.isRTL(),
+ autoclose: true
+ });
+ }
+
+ //判断a数组是å¦åŒ…å«b数组
+ function isContained(largeArray, smallArray){
+ if(!(largeArray instanceof Array) || !(smallArray instanceof Array))
+ return false;
+ if(largeArray.length < smallArray.length)
+ return false;
+ for(var i = 0; i < smallArray.length; i++){
+ var flag = false;
+ for(j=0;j<largeArray.length;j++){
+ if(largeArray[j].columnId == smallArray[i].columnId){
+ flag = true;
+ break;
+ }
+ }
+ if(flag==false)return false;
+ }
+ return true;
+ }
+
+ //var grid = DatatableICT();
+ var grid;
+
+ /* Formatting function for row details */
+ function fnFormatDetails(oTable, nTr, columns, rowCheckable) {
+ //å–得当å‰è¡Œæ˜¾ç¤ºæ•°æ®
+ var tds = $(nTr).children();
+ var alarmId="";
+ if(rowCheckable){
+ alarmId = $(tds.eq(2)).html();
+ }else{
+ alarmId = $(tds.eq(1)).html();
+ }
+ //å–得当å‰è¡Œå®Œæ•´æ•°æ®
+ var systemType = 0;
+ var code = 0;
+ //所有字段
+ var resDisplayName="";
+ var moc="";
+ var alarmRaisedTime="";
+ var perceivedSeverity="";
+ var probableCauseDesc="";
+ var neip="";
+ var alarmType="";
+ var ackState="";
+ var ackTime="";
+ var ackUserId="";
+ var ackSystemId="";
+ var alarmChangedTime="";
+ var componentname="";
+ var position1="";
+ var specificproblem="";
+ var additionalText="";
+ for (var i = 0; i < oTable.datas.length; i++) {
+ var temp = oTable.datas[i];
+ if (temp.alarmId == alarmId) {
+ alarmId = temp.alarmId;
+ resDisplayName = temp.resDisplayName;
+ alarmRaisedTime = temp.alarmRaisedTime;
+ perceivedSeverity = temp.perceivedSeverity;
+ probableCauseDesc = temp.probableCauseDesc;
+ neip = temp.neip;
+ alarmType = temp.alarmType;
+ ackState = temp.ackState;
+ ackTime = temp.ackTime;
+ ackUserId = temp.ackUserId;
+ ackSystemId = temp.ackSystemId;
+ alarmChangedTime = temp.alarmChangedTime;
+
+ systemType = temp.systemType;
+ code = temp.probableCauseCode;
+ moc = temp.moc;
+ componentname = temp.componentname;
+ position1 = temp.position1;
+ specificproblem = temp.specificproblem;
+ additionalText = temp.additionalText;
+ break;
+ }
+ }
+
+ var id = alarmId;
+ var sOut = '<table class = "detailTable" width = 900>';
+ sOut += '<tr><td class = "detailTitleStyle" width = 80><span class = "label label-primary">' + columns[0].columnTitle + '</span></td><td class = "detailCellStyle" width = 160>' + alarmId + '</td>';
+ sOut += '<td class = "detailTitleStyle" width = 80><span class = "label label-primary">' + columns[4].columnTitle + '</span></td><td class = "detailCellStyle" width = 160>' + perceivedSeverity + '</td>';
+ sOut += '<td class = "detailTitleStyle" width = 80><span class = "label label-primary">' + columns[9].columnTitle + '</span></td><td class = "detailCellStyle" width = 160>' + alarmType + '</td>';
+ sOut += '<td class = "detailTitleStyle" width = 80><span class = "label label-primary">' + columns[3].columnTitle + '</span></td><td class = "detailCellStyle" width = 160>' + alarmRaisedTime + '</td></tr>';
+
+ sOut += '<tr><td class = "detailTitleStyle"><span class = "label label-primary">' + columns[5].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 3>' + probableCauseDesc + '</td>';
+ sOut += '<td class = "detailTitleStyle"><span class = "label label-primary">' + columns[15].columnTitle + '</span></td><td class = "detailCellStyle">' + alarmChangedTime + '</td>';
+ sOut += '<td class = "detailTitleStyle"><span class = "label label-primary">' + columns[11].columnTitle + '</span></td><td class = "detailCellStyle">' + ackState + '</td></tr>';
+
+ sOut += '<tr><td class = "detailTitleStyle"><span class = "label label-primary">' + columns[12].columnTitle + '</span></td><td class = "detailCellStyle">' + ackTime + '</td>';
+ sOut += '<td class = "detailTitleStyle"><span class = "label label-primary">' + columns[13].columnTitle + '</span></td><td class = "detailCellStyle">' + ackUserId + '</td>';
+ sOut += '<td class = "detailTitleStyle"><span class = "label label-primary">' + columns[14].columnTitle + '</span></td><td class = "detailCellStyle">' + ackSystemId + '</td>';
+ sOut += '<td class = "detailTitleStyle"><span class = "label label-primary">' + columns[7].columnTitle + '</span></td><td class = "detailCellStyle">' + neip + '</td></tr>';
+
+ sOut += '<tr><td class = "detailTitleStyle"><span class = "label label-primary">' + columns[2].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 3>' + moc + '</td>';
+ sOut += '<td class = "detailTitleStyle"><span class = "label label-primary">' + columns[1].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 3>' + resDisplayName + '</td></tr>';
+
+ sOut += '<tr><td class = "detailTitleStyle"><span class = "label label-primary">' + columns[8].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 3>' + componentname + '</td>';
+ sOut += '<td class = "detailTitleStyle"><span class = "label label-primary">' + columns[16].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 3>' + position1 + '</td></tr>';
+
+ sOut += '<tr><td class = "detailTitleStyle"><span class = "label label-primary">' + columns[10].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 7>' + specificproblem + '</td></tr>';
+
+ sOut += '<tr><td class = "detailTitleStyle"><span class = "label label-primary">' + columns[6].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 7>' + additionalText + '</td></tr>';
+
+ sOut += '<tr><td class = "detailTitleStyle"><span class = "label label-primary">' + $.i18n.prop('aos_fm_SuggestionSetting_view_DefaultSuggestionGroupTitle').replace(';', '').replace(/\"/g,'') + '</span></td><td id = "defaulInfo' + id + '" class = "detailCellStyle" colspan = 7>' + '</td></tr>';
+
+ sOut += '<tr><td class = "detailTitleStyle"><span class = "label label-primary">' + $.i18n.prop('aos_fm_SuggestionSetting_view_SettingSuggestionGroupTitle').replace(';', '').replace(/\"/g,'') + '</span></td><td id = "customInfo' + id + '" class = "detailCellStyle" colspan = 7><td align="right"><button id = "customInfoModify' + id + '" class="btn-toolbar" type="button"><span id = "modifyBtnSpan' + id + '"class="fa fa-pencil-square-o"></span></button></td><td id="cancelDiv' + id + '"></td></td></tr>';
+
+ sOut += '</table>';
+
+ /*
+ var systemType = 0;
+ var code = 0;
+ for (var i = 0; i < oTable.datas.length; i++) {
+ var temp = oTable.datas[i];
+ if (temp.alarmId == oTr['alarmId'].value) {
+ systemType = temp.systemType;
+ code = temp.probableCauseCode;
+ }
+ }*/
+ var data = {
+ "systemType" : systemType,
+ "code" : code
+ };
+ var sendData = JSON.stringify(data);
+ $.ajax({
+ "dataType" : 'json',
+ "type" : "GET",
+ "url" : "/web/rest/web/fm/Maintenance" + "?" + "data=" + sendData,
+ "contentType" : 'application/json; charset=utf-8',
+ "data" : null,
+ "success" : function (json) {
+ $('tr').find('td#defaulInfo' + id).text(json.defaulInfo);
+ $('tr').find('td#customInfo' + id).text(json.customInfo);
+ var modify = $('#customInfoModify' + id);
+ modify.on('click', function () {
+ var span = $('#modifyBtnSpan' + id);
+ var customInfo = $('tr').find('td#customInfo' + id);
+ var cancel = $('#cancelDiv' + id);
+ if (span['0'].className === 'fa fa-pencil-square-o') {
+ var value = customInfo['0'].textContent;
+ customInfo['0'].textContent = '';
+ customInfo['0'].innerHTML = '<textarea id="customInfoInput' + id + '" type="textarea" cols=100 rows=4>' + value + '</textarea>';
+ span['0'].className = 'fa fa-floppy-o';
+ cancel['0'].innerHTML = '<button id = "cancelBtn' + id + '" class="btn-toolbar" type="button"><span class="fa fa-sign-out"></span></button>';
+ $('#cancelBtn' + id).on('click', function () {
+ customInfo['0'].innerHTML = '';
+ customInfo['0'].textContent = value;
+ cancel['0'].innerHTML = '';
+ span['0'].className = 'fa fa-pencil-square-o';
+ });
+ } else {
+ var inputValue = $('#customInfoInput' + id)['0'].value;
+ customInfo['0'].innerHTML = '';
+ customInfo['0'].textContent = inputValue;
+ span['0'].className = 'fa fa-pencil-square-o';
+ cancel['0'].innerHTML = '';
+ var modifyData = {
+ "systemType" : systemType,
+ "code" : code,
+ "defaulInfo" : json.defaulInfo,
+ "customInfo" : inputValue
+ };
+ $.ajax({
+ "dataType" : 'json',
+ "type" : "PUT",
+ "url" : "/web/rest/web/fm/Maintenance",
+ "contentType" : 'application/json; charset=utf-8',
+ "data" : JSON.stringify(modifyData),
+ "error" : function () {
+ alert('Modify Error!');
+ }
+ });
+ }
+ });
+ },
+ "error" : function () {
+ alert('Communication Error!');
+ }
+ });
+
+ return sOut;
+ }
+
+ var generateColumns = function(columns, openRowFlag, rowCheckable){
+ var $tableData = $('table#datatable_ajax' + contextData.curentDatableId);
+ var theadTR = $('thead > tr', $tableData);
+ if(rowCheckable){
+ theadTR.append('<th><input type="checkbox" class="group-checkable"></th>');
+ }
+ if(openRowFlag){
+ theadTR.append('<th>&nbsp;&nbsp;</th>');
+ }
+ for(var i=0;i<columns.length;i++){
+ theadTR.append('<TH id="' + columns[i].columnId + '" style="white-space: nowrap;">' + columns[i].columnTitle + '</TH>');
+ }
+ }
+
+ var sortHandling = function(oTable, openRowFlag, rowCheckable){
+ var indexSkip = -1;
+ if(openRowFlag&&rowCheckable){
+ indexSkip = 1;
+ }else if(openRowFlag&&!rowCheckable||!openRowFlag&&rowCheckable){
+ indexSkip = 0;
+ }
+ var $sortOrder = 0; //排åºç±»åž‹ 1表示å‡åºï¼Œ0表示é™åº
+ var tableWrapper = $('div.dataTables_wrapper', contextData.wrapperDivContext);
+ var $tableHead = $('div.dataTables_scrollHeadInner > table.dataTable', tableWrapper);
+ var $tableData = $('table#datatable_ajax' + contextData.curentDatableId);
+ var clearSort = function(currentTh){
+ var ths = $tableHead.find('th').get();
+ var tableDataHeadTHs = $tableData.find('th').get();
+ $.each( ths, function( index, th ){
+ if(index > indexSkip){
+ if($(th).text() != currentTh.text()){
+ if($(th).is('.sorting_disabled')){
+ //do nothing;
+ }else if($(th).is('.sorting_asc')){
+ $(th).removeClass('sorting_asc').addClass('sorting_disabled');
+ $(tableDataHeadTHs[index]).removeClass('sorting_asc').addClass('sorting_disabled');
+ }else if($(th).is('.sorting_desc')){
+ $(th).removeClass('sorting_desc').addClass('sorting_disabled');
+ $(tableDataHeadTHs[index]).removeClass('sorting_desc').addClass('sorting_disabled');
+ }
+ }
+ }
+ });
+ }
+
+ $('th', $tableHead).each(function( column )
+ {
+ if(column>indexSkip){
+ //处ç†ä¸‰ç§æœ‰å¯èƒ½å­˜åœ¨çš„排åºå­—段,比较方法
+ var findSortKey;
+ if( $(this).is('.sort-title') || $(this).is('.sorting_disabled') )
+ {
+ findSortKey = function( $cell )
+ {
+ var cellText = $cell.text();
+ if(isNaN(cellText)){
+ return $cell.text().toUpperCase();
+ }else{
+ return parseFloat(cellText);
+ }
+ //return $cell.text().toUpperCase();
+ }
+ }
+ else if( $(this).is('.sort-date') )
+ {
+ findSortKey = function( $cell )
+ {
+ return Date.parse('1' + $cell.text());
+ }
+ }
+ else if( $(this).is('.sort-price') )
+ {
+ findSortKey = function( $cell )
+ {
+ var key = parseFloat($cell.text().replace(/^[^\d.]*/, ''))
+ return isNaN(key) ? 0 : key;
+ }
+ }
+
+ //排åº
+ if( findSortKey )
+ {
+ $(this).click(function()
+ {
+ $sortOrder = $sortOrder == 0 ? 1 : 0;
+ var tableDataHeadTHs = $tableData.find('th').get();
+
+ if($sortOrder == 1){
+ if($(this).is('.sorting_disabled')){
+ $(this).removeClass('sorting_disabled').addClass('sorting_asc');
+ $(tableDataHeadTHs[column]).removeClass('sorting_disabled').addClass('sorting_asc');
+ }else if($(this).is('.sorting_asc')){
+ $(this).removeClass('sorting_asc').addClass('sorting_desc');
+ $(tableDataHeadTHs[column]).removeClass('sorting_asc').addClass('sorting_desc');
+ }else if($(this).is('.sorting_desc')){
+ $(this).removeClass('sorting_desc').addClass('sorting_asc');
+ $(tableDataHeadTHs[column]).removeClass('sorting_desc').addClass('sorting_asc');
+ }
+ }else{
+ if($(this).is('.sorting_disabled')){
+ $(this).removeClass('sorting_disabled').addClass('sorting_desc');
+ $(tableDataHeadTHs[column]).removeClass('sorting_disabled').addClass('sorting_desc');
+ }else if($(this).is('.sorting_asc')){
+ $(this).removeClass('sorting_asc').addClass('sorting_desc');
+ $(tableDataHeadTHs[column]).removeClass('sorting_asc').addClass('sorting_desc');
+ }else if($(this).is('.sorting_desc')){
+ $(this).removeClass('sorting_desc').addClass('sorting_asc');
+ $(tableDataHeadTHs[column]).removeClass('sorting_desc').addClass('sorting_asc');
+ }
+ }
+ clearSort($(this));
+
+ var rows = $tableData.find('tbody > tr').get();
+
+ $.each( rows, function( index, row )
+ {
+ //先关掉所有行
+ if ( oTable.fnIsOpen(row) )
+ {
+ $(row).find('.row-details').click();
+ }
+ });
+
+ //é‡æ–°å–得所有行,å¦åˆ™æŽ’åºåŽè¡¨æ ¼æ˜¾ç¤ºå¼‚常
+ rows = $tableData.find('tbody > tr').get();
+
+ $.each( rows, function( index, row )
+ {
+ row.sortKey = findSortKey($(row).children('td').eq(column));
+ });
+ //排åºæ–¹æ³•
+ rows.sort(function( a, b )
+ {
+ if( $sortOrder == 1 )
+ {
+ //å‡åº
+ if(a.sortKey < b.sortKey) return -1;
+ if(a.sortKey > b.sortKey) return 1;
+ return 0;
+ }
+ else
+ {
+ //é™åº
+ if(a.sortKey < b.sortKey) return 1;
+ if(a.sortKey > b.sortKey) return -1;
+ return 0;
+ }
+ });
+ //排åºåŽçš„对象添加给$table
+ $.each( rows, function( index, row )
+ {
+ $tableData.children('tbody').append(row);
+ row.sortKey = null;
+ });
+ });
+ }
+ }
+ });
+ }
+
+ var handleRecords = function(requestDatas, columns, xsHiddenColumns, smHiddenColumns, oLanguage, openRowFlag, rowCheckable, rowOverFlag, requestURL, requestParameters, tableHeight, columnsTooLong, sTotalRecordsSource, callbackList, totalRecords, requestType) {
+
+ /*
+ jQuery.getJSON('/web/newict/framework/thirdparty/data-tables/app-universal-i18n-datatable-' + lang + '.json',
+ function(data) {
+ oLanguage = data;
+ });
+ */
+ grid = DatatableICT();
+ grid.setCallbackList(callbackList);
+ grid.setContextData(contextData);
+ grid.setOpenRowFlag(openRowFlag);
+ grid.setRowCheckable(rowCheckable);
+ grid.setRowOverFlag(rowOverFlag);
+ grid.setColumnsTooLong(columnsTooLong);
+ grid.setSTotalRecordsSource(sTotalRecordsSource);
+ grid.setTotalRecords(totalRecords);
+ grid.setTableHeight(tableHeight);
+ grid.setRequestType(requestType);
+ //å–得查询æ¡ä»¶
+// if(!requestStr || requestStr.length == 0){
+// requestStr = JSON.stringify(requestAllData);
+// }
+ grid.clearAjaxParams();
+ if(requestType == "GET"){
+ grid.addAjaxParam('data', JSON.stringify(requestDatas));
+ }else{
+ grid.addAjaxParam('data', requestDatas);
+ }
+ //å–得其他å‚æ•°
+ for(var i=0;i<requestParameters.length;i++){
+ grid.addAjaxParam(requestParameters[i].paraId,requestParameters[i].paraValue);
+ }
+
+ grid.init({
+ src: $("table#datatable_ajax" + contextData.curentDatableId),
+ onSuccess: function(grid) {
+ // execute some code after table records loaded
+ var tableWrapper = $('div#datatable_ajax_wrapper', contextData.wrapperDivContext);
+ var $tableHead = $('div.dataTables_scrollHeadInner > table.dataTable', tableWrapper);
+ var ths = $tableHead.find('th').get();
+ var $tableData = $('table#datatable_ajax' + contextData.curentDatableId);
+ var tableDataHeadTHs = $tableData.find('th').get();
+ $.each( ths, function( index, th ){
+ //clear all sort direction
+ if($(th).is('.sorting_disabled')){
+ //do nothing;
+ }else if($(th).is('.sorting_asc')){
+ $(th).removeClass('sorting_asc').addClass('sorting_disabled');
+ $(tableDataHeadTHs[index]).removeClass('sorting_asc').addClass('sorting_disabled');
+ }else if($(th).is('.sorting_desc')){
+ $(th).removeClass('sorting_desc').addClass('sorting_disabled');
+ $(tableDataHeadTHs[index]).removeClass('sorting_desc').addClass('sorting_disabled');
+ }
+ });
+
+ },
+ onError: function(grid) {
+ // execute some code on network or other general error
+ },
+ dataTable: {
+ "sDom" : "tr<'row'<'col-md-6 col-sm-12'><'col-md-6 col-sm-12'pli>>", // datatable layout
+ "oLanguage": oLanguage,
+ //"bAutoWidth": true,
+ "sScrollY": tableHeight,
+ "bScrollCollapse": true,
+ "sScrollX": "100%",
+ //"sScrollXInner": "110%",
+ "aLengthMenu": [
+ [20, 50, 100],
+ [20, 50, 100] // change per page values here
+ ],
+ "iDisplayLength": 100, // default record count per page
+ "bServerSide": true, // server side processing
+ "sAjaxSource": requestURL // ajax source
+ }
+ }, columns, xsHiddenColumns, smHiddenColumns, openRowFlag, rowCheckable);
+ }
+
+ /*
+ * Insert a 'details' column to the table
+ */
+ var insertDetails = function (oTable, columns, rowCheckable) {
+
+ var $tableData = $('table#datatable_ajax' + contextData.curentDatableId);
+
+ $tableData.on('click', ' tbody td .row-details', function () {
+ var nTr = $(this).parents('tr')[0];
+ if (oTable.fnIsOpen(nTr)) {
+ /* This row is already open - close it */
+ $(this).addClass("row-details-close").removeClass("row-details-open");
+ oTable.fnClose(nTr);
+ } else {
+ /* Open this row */
+ $(this).addClass("row-details-open").removeClass("row-details-close");
+ oTable.fnOpen(nTr, fnFormatDetails(oTable, nTr, columns, rowCheckable), 'details');
+ }
+ });
+ }
+
+ return {
+
+ //main function to initiate the module
+ init: function (requestDatas, lang, configPathPrefix, callbackList, newColumns, totalPage) {
+
+ var oLanguage;
+ var columns;
+ var xsHiddenColumns;
+ var smHiddenColumns;
+ var columnsAll;
+
+ var openRowFlag = false;
+ var rowOverFlag = false;
+ var rowCheckable = false;
+ var requestURL="";
+ var requestAllData;
+ var requestParameters;
+
+ var tableHeight;
+ var tableWidth;
+
+ var columnsTooLong;
+ var sTotalRecordsSource="";
+ var totalRecords = 0;
+
+ var requestType = "GET";
+
+ //å–得当å‰é…ç½®åŠå›½é™…化信æ¯
+ $.ajax({
+ dataType: 'json',
+ url: configPathPrefix + '-' + lang + '.json',
+ async: false,
+ contentType:'application/json; charset=utf-8',
+ "success": function(data) {
+ oLanguage = data.language;
+ columns = data.columns;
+ if(newColumns){
+ columns = newColumns;
+ }
+ xsHiddenColumns = data.xsHiddenColumns;
+ smHiddenColumns = data.smHiddenColumns;
+ columnsAll = data.columnsAll;
+ if(newColumns){
+ columnsAll = newColumns;
+ }
+ openRowFlag = data.openRowFlag == 'true'? true: false;
+ rowOverFlag = data.rowOverFlag == 'true'? true: false;
+ rowCheckable = data.rowCheckable == 'true'? true: false;
+ requestURL = data.requestURL;
+ //requestAllData = data.requestAllData;
+ requestParameters = data.requestParameters;
+ tableHeight = data.tableHeight;
+ tableWidth = data.tableWidth;
+ columnsTooLong = data.columnsTooLong;
+ sTotalRecordsSource = data.sTotalRecordsSource;
+ if(data.sTotalRecords){ //性能的情况直接指定总行数
+ totalRecords = parseInt(data.sTotalRecords);
+ }
+ if(totalPage){ //å¯ä»¥ä»Žå‚数指定总行数,适用于å•ç‹¬å‘请求获得总行数的场景
+ totalRecords = totalPage;
+ }
+ if(data.requestType){
+ requestType = data.requestType;
+ }
+ },
+ "error" : function (xhr, info) {
+ alert('Communication Error! Error reason:' + info);
+ }
+ });
+
+ $('div#dataTableWrapperDiv' + contextData.curentDatableId).css('width', tableWidth);
+
+ if(!isContained(xsHiddenColumns, smHiddenColumns) || !isContained(columns, xsHiddenColumns) || !isContained(columnsAll, columns)){
+ alert('Columns claim error: (smHiddenColumns <= xsHiddenColumns <= columns <= columnsAll) Please!');
+ return;
+ }
+
+ generateColumns(columns, openRowFlag, rowCheckable);
+ //initPickers();
+ handleRecords(requestDatas, columns, xsHiddenColumns, smHiddenColumns, oLanguage, openRowFlag, rowCheckable, rowOverFlag, requestURL, requestParameters, tableHeight, columnsTooLong, sTotalRecordsSource, callbackList, totalRecords, requestType);
+ //获得åˆå§‹åŒ–完毕的DataTable对象
+ var oTable = grid.getDataTable();
+ if(openRowFlag){
+ insertDetails(oTable, columnsAll, rowCheckable);
+ }
+ sortHandling(oTable, openRowFlag, rowCheckable);
+ //oTable.fnAdjustColumnSizing(true);
+ return oTable;
+ },
+
+ getDataGrid: function(){
+ return grid;
+ },
+
+ setContextData: function(newContextData){
+ contextData = newContextData;
+ }
+
+ };
+
+}();
+
+var addTableElementsId = function(){
+
+ var outterDivs = $('div.dataTableWrapperDiv');
+ var currentId;
+
+ if(outterDivs && outterDivs.length > 0) {
+ var maxId = -1;
+ var divIdNo;
+ $.each(outterDivs, function (index, div) {
+ var divId = $(div).attr("id");
+ divIdNo = divId.substring(20);
+ if (divIdNo || divIdNo.length > 0){
+ if (parseInt(divIdNo) > maxId) {
+ maxId = parseInt(divIdNo);
+ }
+ }
+ });
+ currentId = maxId + 1;
+ }
+
+ var curentDatableId = "_" + currentId;
+
+ var dataTableWrapperDiv = $('div#dataTableWrapperDiv');//新添加的outterDiv
+ $(dataTableWrapperDiv).attr("id", "dataTableWrapperDiv" + curentDatableId);
+ var dataTableWrapperDivContext = dataTableWrapperDiv;
+ $('div.table-container', dataTableWrapperDiv).attr("id", "table-container" + curentDatableId);
+ $('table#datatable_ajax', dataTableWrapperDiv).attr("id", "datatable_ajax" + curentDatableId);
+ $('div#divOverlay', dataTableWrapperDiv).attr("id", "divOverlay" + curentDatableId);
+ //$('div#buttonConfirm', dataTableWrapperDiv).attr("id", "buttonConfirm" + curentDatableId);
+ //$('div#buttonUnConfirm', dataTableWrapperDiv).attr("id", "buttonUnConfirm" + curentDatableId);
+ $('div#myModal', dataTableWrapperDiv).attr("id", "myModal" + curentDatableId);
+ $('div#myModalConfirm', dataTableWrapperDiv).attr("id", "myModalConfirm" + curentDatableId);
+ $('span#alarm_number', dataTableWrapperDiv).attr("id", "alarm_number" + curentDatableId);
+
+ return {
+ "curentDatableId": curentDatableId,
+ "wrapperDivContext":dataTableWrapperDivContext
+ }
+}
+
+var DataTableICT = function(requestDatas, tableDivId, tableDivPath, configPathPrefix, callbackList, newColumns, totalPage){
+
+ /* var requestStr = "";
+ if(datas){
+ requestStr = JSON.stringify(datas);
+ } */
+
+ var lang = getLanguage();
+ //lang = 'en-US';
+
+ /**å–得表格组件所需html片段 **/
+ /*jQuery('div#' + tableDivId).load(tableDivPath, function() {
+ var contextData = addTableElementsId();
+ TableAjaxICT.setContextData(contextData);
+
+ var lang = getLanguage();
+ //lang = 'en-US';
+ var oTable = TableAjaxICT.init(requestStr, lang, configPathPrefix);
+
+ //é‡æ–°è°ƒèŠ‚列宽以适应window resize
+ $(window).bind('resize', function () {
+ //oTable.DataTable.models.oSettings.bAjaxDataGet = false;
+ oTable.fnAdjustColumnSizing();
+ } );
+ });*/
+
+ /**åŒæ­¥å–得表格组件所需html片段 **/
+ $.ajax({
+ async : false,
+ "dataType" : "html",
+ "type" : "GET",
+ "url" : tableDivPath,
+ "data" : null,
+ "success" : function (html, textStatus, jqXHR) {
+ $('div#' + tableDivId).html(html);
+ },
+ "error" : function () {
+ alert("Communication error!");
+ }
+ });
+
+ var contextData = addTableElementsId();
+ TableAjaxICT.setContextData(contextData);
+
+ var oTable = TableAjaxICT.init(requestDatas, lang, configPathPrefix, callbackList, newColumns, totalPage);
+
+ //é‡æ–°è°ƒèŠ‚列宽以适应window resize
+ $(window).bind('resize', function () {
+ //oTable.DataTable.models.oSettings.bAjaxDataGet = false;
+ oTable.fnAdjustColumnSizing();
+ } );
+
+ return TableAjaxICT.getDataGrid();
+}
diff --git a/common/src/main/webapp/thirdparty/data-tables/DataTableSmartClient.js b/common/src/main/webapp/thirdparty/data-tables/DataTableSmartClient.js
new file mode 100644
index 0000000..4cb8cb5
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/data-tables/DataTableSmartClient.js
@@ -0,0 +1,1215 @@
+/***
+ Wrapper/Helper Class for datagrid based on jQuery Datatable Plugin
+ ***/
+var DatatableICT = function () {
+
+ var tableOptions; // main options
+ var dataTable; // datatable object
+ var table; // actual table jquery object
+ var tableContainer; // actual table container object
+ var tableWrapper; // actual table wrapper jquery object
+ var tableInitialized = false;
+ var ajaxParams = []; // set filter mode
+ var columns;
+ var xsHiddenColumns;
+ var smHiddenColumns;
+ var columnMaxLength = 30;
+ var columnsTooLong;
+ var hidden_xs_maxWidth = 768;
+ var hidden_sm_maxWidth = 991;
+
+ var openRowFlag = false;
+ var rowOverFlag = false;
+ var rowCheckable = false;
+
+ var aTargetsAll;
+ var sTotalRecordsSource;
+ var tableHeight;
+
+ var includedInXsHiddenColumns = function(columnId){
+ for(var i=0;i<xsHiddenColumns.length; i++ ){
+ var column = xsHiddenColumns[i];
+ if(columnId == column.columnId){
+ return true;
+ }
+ }
+ return false;
+ }
+
+ var includedInSmHiddenColumns = function(columnId){
+ for(var i=0;i<smHiddenColumns.length; i++ ){
+ var column = smHiddenColumns[i];
+ if(columnId == column.columnId){
+ return true;
+ }
+ }
+ return false;
+ }
+
+ var countSelectedRecords = function() {
+ var selected = $('tbody > tr > td:nth-child(1) input[type="checkbox"]:checked', table).size();
+ var text = tableOptions.dataTable.oLanguage.sGroupActions;
+ if (selected > 0) {
+ $('.table-group-actions > span', tableWrapper).text(text.replace("_TOTAL_", selected));
+ } else {
+ $('.table-group-actions > span', tableWrapper).text("");
+ }
+ }
+
+ var jsonObjectToArray = function(json, columns, iDraw){
+ var jsonToDatatable = {aaData:[], sEcho:iDraw, iTotalRecords:0, iTotalDisplayRecords:0 };
+ for(var i=0; i<json.response.data.length; i++){
+ jsonToDatatable.aaData[i] = [];
+ var resRowObject = json.response.data[i];
+ if(rowCheckable){
+ jsonToDatatable.aaData[i].push("<input type=\"checkbox\" name=\"id[]\" value=\"1\">");
+ }
+ if(openRowFlag){
+ jsonToDatatable.aaData[i].push("<span class=\"row-details row-details-close\"></span>");
+ }
+ for(var j=0; j<columns.length; j++){
+
+ if($(window).width() >= hidden_xs_maxWidth && $(window).width() < hidden_sm_maxWidth && includedInSmHiddenColumns(columns[j].columnId )){
+ /*éšè—pad尺寸需è¦éšè—的列*/
+ }else if($(window).width() < hidden_xs_maxWidth && includedInXsHiddenColumns(columns[j].columnId )){
+ /*éšè—手机尺寸需è¦éšè—的列*/
+ }else{
+ var currentColumnId = columns[j].columnId;
+ if(jQuery.inArray(currentColumnId, columnsTooLong) > -1){
+ var rawText = "";
+ for(var k=0;k<columnsTooLong.length;k++){
+ if(currentColumnId == columnsTooLong[k]){
+ rawText = resRowObject[currentColumnId];
+ break;
+ }
+ }
+ if(rawText.length > columnMaxLength){
+ jsonToDatatable.aaData[i].push(rawText.slice(0, columnMaxLength) + '...');
+ }else{
+ jsonToDatatable.aaData[i].push(resRowObject[currentColumnId]);
+ }
+ } else {
+ jsonToDatatable.aaData[i].push(resRowObject[currentColumnId]);
+ }
+
+ }
+ }
+ }
+ jsonToDatatable.sEcho++;
+ var totalRow = 0;
+ var totalRecordsSource = eval('json.' + sTotalRecordsSource);
+ if(totalRecordsSource && totalRecordsSource.length >0){
+ totalRow = parseInt(totalRecordsSource);
+ }
+ if(isNaN(totalRow)){
+ alert('All rows counting number got fail!');
+ }else{
+ jsonToDatatable.iTotalRecords = totalRow;
+ jsonToDatatable.iTotalDisplayRecords = totalRow;
+ }
+ return jsonToDatatable;
+ }
+
+ var singleAlarmDel = function(divOverlay){
+
+ //æ ¹æ®æµ®åŠ¨æ¡†çš„当å‰id获å–需è¦åˆ é™¤çš„è¡Œ
+ var trId = divOverlay.attr('id_tr');
+ tr=$('tr#' + trId);
+ var tds = $(tr).children();
+ var tdAlarmId = $(tds.eq(2)).text();
+
+ var data= {
+ "alarmId":[parseInt(tdAlarmId)]
+ };
+
+ var sSource = "/web/rest/web/fm/curalarms?data=" + JSON.stringify(data) + "&_operationType=remove&_dataSource=isc_PageRestDataSource_0&isc_metaDataPrefix=_&isc_dataFormat=json";
+
+ $.ajax( {
+ "dataType": 'json',
+ "type": "DELETE",
+ "url": sSource,
+ "data" : null,
+ "contentType" : 'application/json; charset=utf-8',
+ "success": function(json) {
+ if(json.response.status == 0){
+ var resRowObject = json.response.data[0];
+ //alert('删除æˆåŠŸ');
+ }
+ if(json.response.status == -1){
+ //alert('删除失败');
+ }
+ },
+ "error": function() {
+ alert('Communication Error!');
+ }
+ } );
+ }
+
+ var singleAlarmAckUnAck = function(divOverlay, ackType){
+
+ //æ ¹æ®æµ®åŠ¨æ¡†çš„当å‰id获å–需è¦ç¡®è®¤çš„è¡Œ
+ var trId = divOverlay.attr('id_tr');
+ var tr = $('tr#' + trId);
+
+ //å–å¾—éšè—的头部表格的相应行
+ var $tableHead = $('div.dataTables_scrollHeadInner > table.dataTable');
+ //var trHead = $('tbody > tr:nth-child(' + trId + ')', $tableHead);
+ var trHead = $('tr#' + trId.replace('body', 'head'), $tableHead);
+ var tdDivs = $('td > div', trHead);
+
+ var tds = $(tr).children();
+ var tdAlarmId = "";
+ if(rowCheckable){
+ tdAlarmId = $(tds.eq(2)).text();
+ }else{
+ tdAlarmId = $(tds.eq(1)).text();
+ }
+
+ var aoData =
+ {
+ "dataSource":"isc_PageRestDataSource_0",
+ "operationType":"update",
+ "componentId":"isc_com_zte_ums_aos_fm_view_eventview_table_AlarmTable_0",
+ "data":{
+ "viewType":1,
+ "state":ackType,
+ "alarmId":[
+ parseInt(tdAlarmId)
+ ]
+ },
+ "oldValues":null
+ };
+
+ var sSource = "/web/rest/web/fm/curalarms?isc_dataFormat=json";
+
+ $.ajax( {
+ "dataType": 'json',
+ "type": "PUT",
+ "url": sSource,
+ "contentType": 'application/json; charset=utf-8',
+ "data": JSON.stringify(aoData),
+ "success": function(json) {
+ json = AlarmLabels.transformFieldNames(json);
+ if(json.response.status == 0){
+ var resRowObject = json.response.data[0];
+ var columnsCopy = $.extend(true, [], columns);
+ //éšè—列的情况下需è¦ç‰¹æ®Šå¤„ç†
+ if($(window).width()>=hidden_xs_maxWidth && $(window).width()<hidden_sm_maxWidth){
+ columnsCopy = [];
+ for(var i=0;i<columns.length;i++){
+ if(!includedInSmHiddenColumns(columns[i].columnId)){
+ columnsCopy.push(columns[i]);
+ }
+ }
+ } else if($(window).width()<hidden_xs_maxWidth){
+ columnsCopy = [];
+ for(var i=0;i<columns.length;i++){
+ if(!includedInXsHiddenColumns(columns[i].columnId)){
+ columnsCopy.push(columns[i]);
+ }
+ }
+ }
+ var iIndex = 1;
+ if(rowCheckable){
+ iIndex = 2;
+ }
+ for(var i=iIndex;i<tds.length && (i-iIndex)<columnsCopy.length;i++){
+ var currentColumnId = columnsCopy[i-iIndex].columnId;
+ if(jQuery.inArray(currentColumnId, columnsTooLong) > -1) {
+ var rawText = "";
+ for(var k=0;k<columnsTooLong.length;k++){
+ if(currentColumnId == columnsTooLong[k]){
+ rawText = resRowObject[currentColumnId];
+ break;
+ }
+ }
+ if(rawText.length > columnMaxLength){
+ $(tds.eq(i)).html(rawText.slice(0, columnMaxLength) + '...');
+ $(tdDivs.eq(i)).html(rawText.slice(0, columnMaxLength) + '...');
+ }else{
+ $(tds.eq(i)).html(resRowObject[currentColumnId]);
+ $(tdDivs.eq(i)).html(resRowObject[currentColumnId]);
+ }
+ } else {
+ $(tds.eq(i)).html(resRowObject[currentColumnId]);
+ $(tdDivs.eq(i)).html(resRowObject[currentColumnId]);
+ }
+ }
+ //更新缓存中的当å‰è¡Œæ•°æ®
+ for (var t = 0; t < dataTable.datas.length; t++) {
+ var temp = dataTable.datas[t];
+ if (temp.alarmId == resRowObject['alarmId']) {
+ dataTable.datas[t] = resRowObject;
+ break;
+ }
+ }
+ }
+ if(json.response.status == -1){
+ $('div#myModalConfirm').modal({
+ keyboard: false,
+ backdrop: 'static'
+ });
+ $('span#alarm_number').html(tdAlarmId);
+ //国际化信æ¯
+ if(ackType==1){
+ $('span#aos_fm_alarm_opeater_ack_already').html($.i18n.prop('aos_fm_alarm_opeater_ack_already_ok'));
+ }else{
+ $('span#aos_fm_alarm_opeater_ack_already').html($.i18n.prop('aos_fm_alarm_opeater_ack_already_un'));
+ }
+ }
+ },
+ "error": function() {
+ alert('Communication Error!');
+ }
+ } );
+ }
+
+ var addRowOverlap = function(){
+ var $tableData = $('table#datatable_ajax');
+ //å–å¾—éšè—的头部表格的相应行
+ var $tableHead = $('div.dataTables_scrollHeadInner > table.dataTable');
+ var trHeads = $tableHead.find('tr').get();
+ $.each( trHeads, function( index, trHead ){
+ $(trHead).attr('id', 'headTableTR' + index);
+ });
+ //å–得浮动div
+ var $divOverlay = $('div#divOverlay');
+ var divScrollHead = $('div.dataTables_scrollHead');
+ var divRightPadding = $('div#divRightPadding');
+ //å–表头下边沿ä½ç½®
+ var tableHeadBottomHeight = $(divScrollHead).position().top + $(divScrollHead).height();
+ var tableBottom = $tableData.position().top + $tableData.height();
+ //å–表格å³è¾¹æ²¿ä½ç½®
+ var tableRightEdgePosition = $(divRightPadding).position().left;
+ var trs = $tableData.find('tr').get();
+ $.each( trs, function( index, tr ){
+ var tdEmpty = $('td.dataTables_empty',tr);
+ if(!tdEmpty || tdEmpty.length ==0 ){
+ $(tr).attr('id', 'bodyTableTR' + index);
+ //$divOverlay.attr('id_tr', 'bodyTableTR' + index);
+ $(tr).one('hover', function(){
+ var rowPos = $(tr).position();
+ var currentTrTop = rowPos.top;
+ //var bottomLeft = rowPos.left;
+ $divOverlay.attr('id_tr', 'bodyTableTR' + index);
+ $divOverlay.css({
+ display: 'block',
+ position: 'absolute',
+ 'background-color': '#e5e5e5',
+ //opacity: 0.7,
+ border: 'solid 0px',
+ top: currentTrTop + 6,
+ left: tableRightEdgePosition - 308,
+ width: 300,
+ height: 30
+ });
+ //防止浮动框跳出表格内容区域
+ if( $divOverlay.position().top < tableHeadBottomHeight || $divOverlay.position().top + $divOverlay.height() > tableBottom){
+ $divOverlay.css('display', 'none');
+ }
+ var buttonConfirm = $('div#buttonConfirm', $divOverlay);
+ var buttonUnConfirm = $('div#buttonUnConfirm', $divOverlay);
+ $(buttonConfirm).one('click', function(){
+ var buttonRoundedTDsConfirm = $(buttonConfirm).find('td.buttonRounded');
+ var buttonRoundedTDsUnConfirm = $(buttonUnConfirm).find('td.buttonRoundedDisabled');
+ if(buttonRoundedTDsConfirm && buttonRoundedTDsConfirm.length > 0){
+ $.each(buttonRoundedTDsConfirm, function(index, td){
+ $(td).removeClass('buttonRounded').addClass('buttonRoundedDisabled');
+ });
+ $.each(buttonRoundedTDsUnConfirm, function(index, td){
+ $(td).removeClass('buttonRoundedDisabled').addClass('buttonRounded');
+ });
+ $divOverlay.css('display', 'none');
+ singleAlarmAckUnAck($divOverlay, 1);
+ }
+ });
+ $(buttonUnConfirm).one('click', function(){
+ var buttonRoundedTDsUnConfirm = $(buttonUnConfirm).find('td.buttonRounded');
+ var buttonRoundedTDsConfirm = $(buttonConfirm).find('td.buttonRoundedDisabled');
+ if(buttonRoundedTDsUnConfirm && buttonRoundedTDsUnConfirm.length > 0){
+ $.each(buttonRoundedTDsUnConfirm, function(index, td){
+ $(td).removeClass('buttonRounded').addClass('buttonRoundedDisabled');
+ });
+ $.each(buttonRoundedTDsConfirm, function(index, td){
+ $(td).removeClass('buttonRoundedDisabled').addClass('buttonRounded');
+ });
+ $divOverlay.css('display', 'none');
+ singleAlarmAckUnAck($divOverlay, 2);
+ }
+ });
+ var buttonDelete = $('div#buttonDelete', $divOverlay);
+ $(buttonDelete).die().live('click', function(){
+ //弹出删除确认对è¯æ¡†
+ $('div#myModal').modal({
+ keyboard: false,
+ backdrop: 'static'
+ });
+ $('#delConfirm').die().live('click', function(){
+ $divOverlay.css('display', 'none');
+ dataTable.fnClose(tr);
+ $(tr).remove();
+ //删除表头表格的相应行
+ $('tr#' + $(tr).attr('id').replace('body', 'head'), $tableHead).remove();
+ //删除åŽç«¯æ•°æ®
+ singleAlarmDel($divOverlay);
+ //刷新表格
+ dataTable.fnAdjustColumnSizing();
+ });
+ });
+ //展开行的情况éšè—
+ $('td.details > table.detailTable').on('hover', function(){
+ $divOverlay.css('display', 'none');
+ });
+ });
+ }
+ });
+ }
+
+ return {
+
+ //main function to initiate the module
+ init: function (options, columnsDefined, xsHiddenColumnsDefined, smHiddenColumnsDefined) {
+
+ if (!$().dataTable) {
+ return;
+ }
+
+ var the = this;
+
+ //记录需è¦ç¦æŽ‰é»˜è®¤æŽ’åºçš„列
+ var aTargets = [];
+ var targetsLength = columnsDefined.length;
+ if(rowCheckable)targetsLength++;
+ if(openRowFlag)targetsLength++;
+ for(var i=0;i<targetsLength;i++){
+ aTargets.push(i);
+ }
+ aTargetsAll = aTargets;
+
+ // default settings
+ options = $.extend(true, {
+ src: "", // actual table
+ filterApplyAction: "filter",
+ filterCancelAction: "filter_cancel",
+ resetGroupActionInputOnSuccess: true,
+ dataTable: {
+ //"sDom" : "<'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'<'table-group-actions pull-right'>>r><'table-scrollable't><'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'>r>>", // datatable layout
+
+ "aoColumnDefs" : [{ // define columns sorting options(by default all columns are sortable extept the first checkbox column)
+ 'bSortable' : false,
+ 'aTargets' : aTargets
+ }],
+
+ "bAutoWidth": false, // disable fixed width and enable fluid table
+ //"bSortCellsTop": true, // make sortable only the first row in thead
+ "sPaginationType": "bootstrap_extended", // pagination type(bootstrap, bootstrap_full_number or bootstrap_extended)
+ "bProcessing": true, // enable/disable display message box on record load
+ "bServerSide": true, // enable/disable server side ajax loading
+ "sAjaxSource": "", // define ajax source URL
+ //"sServerMethod": "GET",
+
+ // handle ajax request
+ "fnServerData": function ( sSource, aoData, fnCallback, oSettings ) {
+ //for ICT Paging
+ //var startIndex = aoData[3].value;//"iDisplayStart"
+ //var pageLength = aoData[4].value;//"iDisplayLength"
+ var oPaging = oSettings.oInstance.fnPagingInfo();
+ //var startIndex = oPaging.iStart;
+ var pageLength = oPaging.iLength;
+ var curPageNo = oPaging.iPage + 1;
+
+ for(var k=aoData.length-1;k>=0;k--){
+ var flag = -1;
+ if(aoData[k].name=='pageSize'){
+ aoData[k].value=pageLength;
+ flag++;
+ }
+ if(aoData[k].name=='pageNo'){
+ aoData[k].value=curPageNo;
+ flag++
+ }
+ if(flag == 1)break;
+ }
+
+ oSettings.jqXHR = $.ajax( {
+ "dataType": 'json',
+ "type": "GET",
+ "url": sSource,
+ "data": aoData,
+ "success": function(res, textStatus, jqXHR) {
+ if (res.sMessage) {
+ openoFrameWork.alert({type: (res.sStatus == 'OK' ? 'success' : 'danger'), icon: (res.sStatus == 'OK' ? 'check' : 'warning'), message: res.sMessage, container: tableWrapper, place: 'prepend'});
+ }
+ if ($('.group-checkable', tableContainer).size() === 1) {
+ $('.group-checkable', tableContainer).attr("checked", false);
+ $.uniform.update($('.group-checkable', tableContainer));
+ }
+ if (tableOptions.onSuccess) {
+ tableOptions.onSuccess.call(the);
+ }
+ //ä¿å­˜æ•°æ®åœ¨dataTable对象中给行详细信æ¯é¢æ¿ç”¨
+ dataTable.datas = res.response.data;
+ if(res.response.status < 0){
+ alert(res.response.data);
+ return;
+ }
+
+ //告警字段值转æ¢
+ res = AlarmLabels.transformFieldNames(res);
+
+ res = jsonObjectToArray(res, columns, oSettings.iDraw);
+
+ //é‡ç»˜è¡¨æ ¼
+ fnCallback(res, textStatus, jqXHR);
+ },
+ "error": function() {
+ if (tableOptions.onError) {
+ tableOptions.onError.call(the);
+ }
+ openoFrameWork.alert({type: 'danger', icon: 'warning', message: tableOptions.dataTable.oLanguage.sAjaxRequestGeneralError, container: tableWrapper, place: 'prepend'});
+ $('.dataTables_processing', tableWrapper).remove();
+ }
+ } );
+
+ },
+
+ // pass additional parameter
+ "fnServerParams": function ( aoData ) {
+ //here can be added an external ajax request parameters.
+ //for(var i in ajaxParams) {
+ for(var i=0; i<ajaxParams.length; i++){
+ var param = ajaxParams[i];
+ aoData.push({"name" : param.name, "value": param.value});
+ }
+ },
+
+ "fnDrawCallback": function( oSettings ) { // run some code on table redraw
+ if (tableInitialized === false) { // check if table has been initialized
+ tableInitialized = true; // set table initialized
+ table.show(); // display table
+ }
+ openoFrameWork.initUniform($('input[type="checkbox"]', tableContainer)); // reinitialize uniform checkboxes on each table reload
+ countSelectedRecords(); // reset selected records indicator
+ //所有tdä¸æ¢è¡Œ
+ $('table#datatable_ajax').find('td').css('white-space', 'nowrap');
+
+ //自适应对é½è¡¨å¤´
+ var $tableHead = $('div.dataTables_scrollHeadInner > table.dataTable', tableWrapper);
+ var tbodyHead = $('tbody', $tableHead);
+ if(tbodyHead && tbodyHead.length >0){
+ $(tbodyHead).remove();
+ }
+
+ var $tableBody = $('table#datatable_ajax', tableWrapper);
+ var trIn = $('thead > tr:nth-child(1)', $tableHead);
+ var trBodyHead = $('thead > tr:nth-child(1)', $tableBody);
+ var tds = $(trIn).children();
+ var ths = $(trBodyHead).children();
+ for(var k=0;k<tds.length;k++){
+ $(ths.eq(k)).html('<div style="height: 0;overflow: hidden;">' + tds.eq(k).html() + '</div>');
+ }
+ var bodyRows = $('tbody > tr', $tableBody);
+ for(var i=0;i<bodyRows.length;i++){
+ var rowClone = $(bodyRows.eq(i)).clone();
+ var tds = $(rowClone).children();
+ for(var j=0;j<tds.length;j++){
+ $(tds.eq(j)).html('<div style="height: 0;overflow: hidden;">' + tds.eq(j).html() + '</div>');
+ $(tds.eq(j)).height('0px');
+ $(tds.eq(j)).css('padding-top','0px');
+ $(tds.eq(j)).css('padding-bottom','0px');
+ $(tds.eq(j)).css('border-top-width','0px');
+ $(tds.eq(j)).css('border-bottom-width','0px');
+ }
+ $(rowClone).height('0px');
+ $tableHead.append($(rowClone).prop("outerHTML"));
+ }
+
+ $('.dataTables_scrollBody').css('width','100%');
+ $('.dataTables_scrollHead').css('width','98.5%');
+ $('.dataTables_scrollHeadInner').css('padding-right', 0);
+
+ //添加浮动确认å确认按钮
+ if(rowOverFlag){
+ addRowOverlap();
+ }
+
+ //设置表格本体高度
+ $('div.dataTables_scrollBody').css('height', tableHeight);
+ }
+ }
+ }, options);
+
+ tableOptions = options;
+
+ columns = columnsDefined;
+ xsHiddenColumns = xsHiddenColumnsDefined;
+ smHiddenColumns = smHiddenColumnsDefined;
+ // create table's jquery object
+ table = $(options.src);
+ tableContainer = table.parents(".table-container");
+ // apply the special class that used to restyle the default datatable
+
+ $.fn.dataTableExt.oStdClasses.sWrapper = $.fn.dataTableExt.oStdClasses.sWrapper + " dataTables_extended_wrapper";
+
+ // initialize a datatable
+ dataTable = table.dataTable(options.dataTable);
+
+ tableWrapper = table.parents('.dataTables_wrapper');
+
+ // modify table per page dropdown input by appliying some classes
+ $('.dataTables_length select', tableWrapper).addClass("form-control input-xsmall input-sm");
+
+ // handle group checkboxes check/uncheck
+ $('.group-checkable', tableContainer).change(function () {
+ var set = $('tbody > tr > td:nth-child(1) input[type="checkbox"]', table);
+ var checked = $(this).is(":checked");
+ $(set).each(function () {
+ $(this).attr("checked", checked);
+ });
+ $.uniform.update(set);
+ countSelectedRecords();
+ });
+
+ // handle row's checkbox click
+ table.on('change', 'tbody > tr > td:nth-child(1) input[type="checkbox"]', function(){
+ countSelectedRecords();
+ });
+
+ //填充表头å³è¾¹ç•Œ
+ $('.dataTables_scrollHead').css('display','inline-block');
+ //var dataTables_scrollHead_height = $('.dataTables_scrollHead').css( "height" );
+ $(".dataTables_scrollHead").after("<div id='divRightPadding' style='overflow: hidden; background:#eee; position: relative; float:right; border: 1px solid #ddd; height:" + 38 + "px; width: 1.4%;'></div>");
+ if($.browser.mozilla){
+ $('#divRightPadding').css('height', '40');
+ }
+
+ //éšè—掉æŸäº›åˆ—
+ var $tableHead = $('div.dataTables_scrollHeadInner > table.dataTable', tableWrapper);
+ var $tableBody = $('table#datatable_ajax', tableWrapper);
+
+ for(var i=0;i<xsHiddenColumns.length;i++){
+ for(var j=0;j<columns.length;j++){
+ if(xsHiddenColumns[i].columnId == columns[j].columnId){
+ $('thead > tr > th#' + columns[j].columnId, $tableHead).addClass('hidden-xs');
+ $('thead > tr > th#' + columns[j].columnId, $tableBody).addClass('hidden-xs');
+ break;
+ }
+ }
+ }
+
+ for(var i=0;i<smHiddenColumns.length;i++){
+ for(var j=0;j<columns.length;j++){
+ if(smHiddenColumns[i].columnId == columns[j].columnId){
+ $('thead > tr > th#' + columns[j].columnId, $tableHead).addClass('hidden-sm');
+ $('thead > tr > th#' + columns[j].columnId, $tableBody).addClass('hidden-sm');
+ break;
+ }
+ }
+ }
+ },//end init------------------------------------------------------------------------------------
+
+ getSelectedRowsCount: function() {
+ return $('tbody > tr > td:nth-child(1) input[type="checkbox"]:checked', table).size();
+ },
+
+ getSelectedRows: function() {
+ var rows = [];
+ $('tbody > tr > td:nth-child(1) input[type="checkbox"]:checked', table).each(function(){
+ rows.push({name: $(this).attr("name"), value: $(this).val()});
+ });
+
+ return rows;
+ },
+
+ addAjaxParam: function(name, value) {
+ ajaxParams.push({"name": name, "value": value});
+ },
+
+ clearAjaxParams: function(name, value) {
+ ajaxParams = [];
+ },
+
+ getDataTable: function() {
+ return dataTable;
+ },
+
+ getTableWrapper: function() {
+ return tableWrapper;
+ },
+
+ gettableContainer: function() {
+ return tableContainer;
+ },
+
+ getTable: function() {
+ return table;
+ },
+
+ setOpenRowFlag: function(openRowFlagInput) {
+ openRowFlag = openRowFlagInput;
+ },
+
+ setRowOverFlag: function(rowOverFlagInput) {
+ rowOverFlag = rowOverFlagInput;
+ },
+
+ setRowCheckable: function(rowCheckableInput) {
+ rowCheckable = rowCheckableInput;
+ },
+
+ setColumnsTooLong: function(columnsTooLongInput) {
+ columnsTooLong = columnsTooLongInput;
+ },
+
+ setSTotalRecordsSource: function(sTotalRecordsSourceInput){
+ sTotalRecordsSource = sTotalRecordsSourceInput;
+ },
+
+ setTableHeight: function(tableHeightInput){
+ tableHeight = tableHeightInput;
+ }
+
+ };
+
+};
+
+var TableAjaxICT = function () {
+
+ var initPickers = function () {
+ //init date pickers
+ $('.date-picker').datepicker({
+ //rtl: App.isRTL(),
+ autoclose: true
+ });
+ }
+
+ //判断a数组是å¦åŒ…å«b数组
+ function isContained(largeArray, smallArray){
+ if(!(largeArray instanceof Array) || !(smallArray instanceof Array))
+ return false;
+ if(largeArray.length < smallArray.length)
+ return false;
+ for(var i = 0; i < smallArray.length; i++){
+ var flag = false;
+ for(j=0;j<largeArray.length;j++){
+ if(largeArray[j].columnId == smallArray[i].columnId){
+ flag = true;
+ break;
+ }
+ }
+ if(flag==false)return false;
+ }
+ return true;
+ }
+
+ var grid = new DatatableICT();
+
+ /* Formatting function for row details */
+ function fnFormatDetails(oTable, nTr, columns, rowCheckable) {
+ //å–得当å‰è¡Œæ˜¾ç¤ºæ•°æ®
+ var tds = $(nTr).children();
+ var alarmId="";
+ if(rowCheckable){
+ alarmId = $(tds.eq(2)).html();
+ }else{
+ alarmId = $(tds.eq(1)).html();
+ }
+ //å–得当å‰è¡Œå®Œæ•´æ•°æ®
+ var systemType = 0;
+ var code = 0;
+ //所有字段
+ var resDisplayName="";
+ var moc="";
+ var alarmRaisedTime="";
+ var perceivedSeverity="";
+ var probableCauseDesc="";
+ var neip="";
+ var alarmType="";
+ var ackState="";
+ var ackTime="";
+ var ackUserId="";
+ var ackSystemId="";
+ var alarmChangedTime="";
+ var componentname="";
+ var position1="";
+ var specificproblem="";
+ var additionalText="";
+ for (var i = 0; i < oTable.datas.length; i++) {
+ var temp = oTable.datas[i];
+ if (temp.alarmId == alarmId) {
+ alarmId = temp.alarmId;
+ resDisplayName = temp.resDisplayName;
+ alarmRaisedTime = temp.alarmRaisedTime;
+ perceivedSeverity = temp.perceivedSeverity;
+ probableCauseDesc = temp.probableCauseDesc;
+ neip = temp.neip;
+ alarmType = temp.alarmType;
+ ackState = temp.ackState;
+ ackTime = temp.ackTime;
+ ackUserId = temp.ackUserId;
+ ackSystemId = temp.ackSystemId;
+ alarmChangedTime = temp.alarmChangedTime;
+
+ systemType = temp.systemType;
+ code = temp.probableCauseCode;
+ moc = temp.moc;
+ componentname = temp.componentname;
+ position1 = temp.position1;
+ specificproblem = temp.specificproblem;
+ additionalText = temp.additionalText;
+ break;
+ }
+ }
+
+ var id = alarmId;
+ var sOut = '<table class = "detailTable" width = 900>';
+ sOut += '<tr class="oddDetailTable"><td class = "detailTitleStyle" width = 80><span class = "labelDetailTable">' + columns[0].columnTitle + '</span></td><td class = "detailCellStyle" width = 160>' + alarmId + '</td>';
+ sOut += '<td class = "detailTitleStyle" width = 80><span class = "labelDetailTable">' + columns[4].columnTitle + '</span></td><td class = "detailCellStyle" width = 160>' + perceivedSeverity + '</td>';
+ sOut += '<td class = "detailTitleStyle" width = 80><span class = "labelDetailTable">' + columns[9].columnTitle + '</span></td><td class = "detailCellStyle" width = 160>' + alarmType + '</td>';
+ sOut += '<td class = "detailTitleStyle" width = 80><span class = "labelDetailTable">' + columns[3].columnTitle + '</span></td><td class = "detailCellStyle" width = 160>' + alarmRaisedTime + '</td></tr>';
+
+ sOut += '<tr class="evenDetailTable"><td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[5].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 3>' + probableCauseDesc + '</td>';
+ sOut += '<td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[15].columnTitle + '</span></td><td class = "detailCellStyle">' + alarmChangedTime + '</td>';
+ sOut += '<td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[11].columnTitle + '</span></td><td class = "detailCellStyle">' + ackState + '</td></tr>';
+
+ sOut += '<tr class="oddDetailTable"><td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[12].columnTitle + '</span></td><td class = "detailCellStyle">' + ackTime + '</td>';
+ sOut += '<td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[13].columnTitle + '</span></td><td class = "detailCellStyle">' + ackUserId + '</td>';
+ sOut += '<td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[14].columnTitle + '</span></td><td class = "detailCellStyle">' + ackSystemId + '</td>';
+ sOut += '<td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[7].columnTitle + '</span></td><td class = "detailCellStyle">' + neip + '</td></tr>';
+
+ sOut += '<tr class="evenDetailTable"><td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[2].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 3>' + moc + '</td>';
+ sOut += '<td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[1].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 3>' + resDisplayName + '</td></tr>';
+
+ sOut += '<tr class="oddDetailTable"><td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[8].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 3>' + componentname + '</td>';
+ sOut += '<td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[16].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 3>' + position1 + '</td></tr>';
+
+ sOut += '<tr class="evenDetailTable"><td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[10].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 7>' + specificproblem + '</td></tr>';
+
+ sOut += '<tr class="oddDetailTable"><td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[6].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 7>' + additionalText + '</td></tr>';
+
+ sOut += '<tr class="evenDetailTable"><td class = "detailTitleStyle"><span class = "labelDetailTable">' + $.i18n.prop('aos_fm_SuggestionSetting_view_DefaultSuggestionGroupTitle').replace(';', '').replace(/\"/g,'') + '</span></td><td id = "defaulInfo' + id + '" class = "detailCellStyle" colspan = 7>' + '</td></tr>';
+
+ sOut += '<tr class="oddDetailTable"><td class = "detailTitleStyle"><span class = "labelDetailTable">' + $.i18n.prop('aos_fm_SuggestionSetting_view_SettingSuggestionGroupTitle').replace(';', '').replace(/\"/g,'') + '</span></td><td id = "customInfo' + id + '" class = "detailCellStyle" colspan = 7><td align="right"><button id = "customInfoModify' + id + '" class="btn-toolbar" type="button"><span id = "modifyBtnSpan' + id + '"class="fa fa-pencil-square-o"></span></button></td><td id="cancelDiv' + id + '"></td></td></tr>';
+
+ sOut += '</table>';
+
+ /*
+ var systemType = 0;
+ var code = 0;
+ for (var i = 0; i < oTable.datas.length; i++) {
+ var temp = oTable.datas[i];
+ if (temp.alarmId == oTr['alarmId'].value) {
+ systemType = temp.systemType;
+ code = temp.probableCauseCode;
+ }
+ }*/
+ var data = {
+ "systemType" : systemType,
+ "code" : code
+ };
+ var sendData = JSON.stringify(data);
+ $.ajax({
+ "dataType" : 'json',
+ "type" : "GET",
+ "url" : "/web/rest/web/fm/Maintenance" + "?" + "data=" + sendData,
+ "contentType" : 'application/json; charset=utf-8',
+ "data" : null,
+ "success" : function (json) {
+ $('tr').find('td#defaulInfo' + id).text(json.defaulInfo);
+ $('tr').find('td#customInfo' + id).text(json.customInfo);
+ var modify = $('#customInfoModify' + id);
+ modify.on('click', function () {
+ var span = $('#modifyBtnSpan' + id);
+ var customInfo = $('tr').find('td#customInfo' + id);
+ var cancel = $('#cancelDiv' + id);
+ if (span['0'].className === 'fa fa-pencil-square-o') {
+ var value = customInfo['0'].textContent;
+ customInfo['0'].textContent = '';
+ customInfo['0'].innerHTML = '<textarea id="customInfoInput' + id + '" type="textarea" cols=100 rows=4>' + value + '</textarea>';
+ span['0'].className = 'fa fa-floppy-o';
+ cancel['0'].innerHTML = '<button id = "cancelBtn' + id + '" class="btn-toolbar" type="button"><span class="fa fa-sign-out"></span></button>';
+ $('#cancelBtn' + id).on('click', function () {
+ customInfo['0'].innerHTML = '';
+ customInfo['0'].textContent = value;
+ cancel['0'].innerHTML = '';
+ span['0'].className = 'fa fa-pencil-square-o';
+ });
+ } else {
+ var inputValue = $('#customInfoInput' + id)['0'].value;
+ customInfo['0'].innerHTML = '';
+ customInfo['0'].textContent = inputValue;
+ span['0'].className = 'fa fa-pencil-square-o';
+ cancel['0'].innerHTML = '';
+ var modifyData = {
+ "systemType" : systemType,
+ "code" : code,
+ "defaulInfo" : json.defaulInfo,
+ "customInfo" : inputValue
+ };
+ $.ajax({
+ "dataType" : 'json',
+ "type" : "PUT",
+ "url" : "/web/rest/web/fm/Maintenance",
+ "contentType" : 'application/json; charset=utf-8',
+ "data" : JSON.stringify(modifyData),
+ "error" : function () {
+ alert('Modify Error!');
+ }
+ });
+ }
+ });
+ },
+ "error" : function () {
+ alert('Communication Error!');
+ }
+ });
+
+ return sOut;
+ }
+
+ var generateColumns = function(columns, openRowFlag, rowCheckable){
+ var $tableData = $('table#datatable_ajax');
+ var theadTR = $('thead > tr', $tableData);
+ if(rowCheckable){
+ theadTR.append('<th><input type="checkbox" class="group-checkable"></th>');
+ }
+ if(openRowFlag){
+ theadTR.append('<th>&nbsp;&nbsp;</th>');
+ }
+ for(var i=0;i<columns.length;i++){
+ theadTR.append('<TH id="' + columns[i].columnId + '" style="white-space: nowrap;">' + columns[i].columnTitle + '</TH>');
+ }
+ }
+
+ var sortHandling = function(oTable, openRowFlag, rowCheckable){
+ var indexSkip = -1;
+ if(openRowFlag&&rowCheckable){
+ indexSkip = 1;
+ }else if(openRowFlag&&!rowCheckable||!openRowFlag&&rowCheckable){
+ indexSkip = 0;
+ }
+ var $sortOrder = 0; //排åºç±»åž‹ 1表示å‡åºï¼Œ0表示é™åº
+ var tableWrapper = $('div#datatable_ajax_wrapper');
+ var $tableHead = $('div.dataTables_scrollHeadInner > table.dataTable', tableWrapper);
+ var $tableData = $('table#datatable_ajax');
+ var clearSort = function(currentTh){
+ var ths = $tableHead.find('th').get();
+ var tableDataHeadTHs = $tableData.find('th').get();
+ $.each( ths, function( index, th ){
+ if(index > indexSkip){
+ if($(th).text() != currentTh.text()){
+ if($(th).is('.sorting_disabled')){
+ //do nothing;
+ }else if($(th).is('.sorting_asc')){
+ $(th).removeClass('sorting_asc').addClass('sorting_disabled');
+ $(tableDataHeadTHs[index]).removeClass('sorting_asc').addClass('sorting_disabled');
+ }else if($(th).is('.sorting_desc')){
+ $(th).removeClass('sorting_desc').addClass('sorting_disabled');
+ $(tableDataHeadTHs[index]).removeClass('sorting_desc').addClass('sorting_disabled');
+ }
+ }
+ }
+ });
+ }
+
+ $('th', $tableHead).each(function( column )
+ {
+ if(column>indexSkip){
+ //处ç†ä¸‰ç§æœ‰å¯èƒ½å­˜åœ¨çš„排åºå­—段,比较方法
+ var findSortKey;
+ if( $(this).is('.sort-title') || $(this).is('.sorting_disabled') )
+ {
+ findSortKey = function( $cell )
+ {
+ var cellText = $cell.text();
+ if(isNaN(cellText)){
+ return $cell.text().toUpperCase();
+ }else{
+ return parseFloat(cellText);
+ }
+ //return $cell.text().toUpperCase();
+ }
+ }
+ else if( $(this).is('.sort-date') )
+ {
+ findSortKey = function( $cell )
+ {
+ return Date.parse('1' + $cell.text());
+ }
+ }
+ else if( $(this).is('.sort-price') )
+ {
+ findSortKey = function( $cell )
+ {
+ var key = parseFloat($cell.text().replace(/^[^\d.]*/, ''))
+ return isNaN(key) ? 0 : key;
+ }
+ }
+
+ //排åº
+ if( findSortKey )
+ {
+ $(this).click(function()
+ {
+ $sortOrder = $sortOrder == 0 ? 1 : 0;
+ var tableDataHeadTHs = $tableData.find('th').get();
+
+ if($sortOrder == 1){
+ if($(this).is('.sorting_disabled')){
+ $(this).removeClass('sorting_disabled').addClass('sorting_asc');
+ $(tableDataHeadTHs[column]).removeClass('sorting_disabled').addClass('sorting_asc');
+ }else if($(this).is('.sorting_asc')){
+ $(this).removeClass('sorting_asc').addClass('sorting_desc');
+ $(tableDataHeadTHs[column]).removeClass('sorting_asc').addClass('sorting_desc');
+ }else if($(this).is('.sorting_desc')){
+ $(this).removeClass('sorting_desc').addClass('sorting_asc');
+ $(tableDataHeadTHs[column]).removeClass('sorting_desc').addClass('sorting_asc');
+ }
+ }else{
+ if($(this).is('.sorting_disabled')){
+ $(this).removeClass('sorting_disabled').addClass('sorting_desc');
+ $(tableDataHeadTHs[column]).removeClass('sorting_disabled').addClass('sorting_desc');
+ }else if($(this).is('.sorting_asc')){
+ $(this).removeClass('sorting_asc').addClass('sorting_desc');
+ $(tableDataHeadTHs[column]).removeClass('sorting_asc').addClass('sorting_desc');
+ }else if($(this).is('.sorting_desc')){
+ $(this).removeClass('sorting_desc').addClass('sorting_asc');
+ $(tableDataHeadTHs[column]).removeClass('sorting_desc').addClass('sorting_asc');
+ }
+ }
+ clearSort($(this));
+
+ var rows = $tableData.find('tbody > tr').get();
+
+ $.each( rows, function( index, row )
+ {
+ //先关掉所有行
+ if ( oTable.fnIsOpen(row) )
+ {
+ $(row).find('.row-details').click();
+ }
+ });
+
+ //é‡æ–°å–得所有行,å¦åˆ™æŽ’åºåŽè¡¨æ ¼æ˜¾ç¤ºå¼‚常
+ rows = $tableData.find('tbody > tr').get();
+
+ $.each( rows, function( index, row )
+ {
+ row.sortKey = findSortKey($(row).children('td').eq(column));
+ });
+ //排åºæ–¹æ³•
+ rows.sort(function( a, b )
+ {
+ if( $sortOrder == 1 )
+ {
+ //å‡åº
+ if(a.sortKey < b.sortKey) return -1;
+ if(a.sortKey > b.sortKey) return 1;
+ return 0;
+ }
+ else
+ {
+ //é™åº
+ if(a.sortKey < b.sortKey) return 1;
+ if(a.sortKey > b.sortKey) return -1;
+ return 0;
+ }
+ });
+ //排åºåŽçš„对象添加给$table
+ $.each( rows, function( index, row )
+ {
+ $tableData.children('tbody').append(row);
+ row.sortKey = null;
+ });
+ });
+ }
+ }
+ });
+ }
+
+ var handleRecords = function(requestStr, columns, xsHiddenColumns, smHiddenColumns, oLanguage, openRowFlag, rowCheckable, rowOverFlag, requestURL, requestParameters, tableHeight, columnsTooLong, sTotalRecordsSource) {
+
+ /*
+ jQuery.getJSON('/web/newict/framework/thirdparty/data-tables/app-universal-i18n-datatable-' + lang + '.json',
+ function(data) {
+ oLanguage = data;
+ });
+ */
+ grid.setOpenRowFlag(openRowFlag);
+ grid.setRowCheckable(rowCheckable);
+ grid.setRowOverFlag(rowOverFlag);
+ grid.setColumnsTooLong(columnsTooLong);
+ grid.setSTotalRecordsSource(sTotalRecordsSource);
+ grid.setTableHeight(tableHeight);
+ //å–得查询æ¡ä»¶
+// if(!requestStr || requestStr.length == 0){
+// requestStr = JSON.stringify(requestAllData);
+// }
+ grid.clearAjaxParams();
+ grid.addAjaxParam('data', requestStr);
+ //å–得其他å‚æ•°
+ for(var i=0;i<requestParameters.length;i++){
+ grid.addAjaxParam(requestParameters[i].paraId,requestParameters[i].paraValue);
+ }
+
+ grid.init({
+ src: $("#datatable_ajax"),
+ onSuccess: function(grid) {
+ // execute some code after table records loaded
+ var tableWrapper = $('div#datatable_ajax_wrapper');
+ var $tableHead = $('div.dataTables_scrollHeadInner > table.dataTable', tableWrapper);
+ var ths = $tableHead.find('th').get();
+ var $tableData = $('table#datatable_ajax');
+ var tableDataHeadTHs = $tableData.find('th').get();
+ $.each( ths, function( index, th ){
+ //clear all sort direction
+ if($(th).is('.sorting_disabled')){
+ //do nothing;
+ }else if($(th).is('.sorting_asc')){
+ $(th).removeClass('sorting_asc').addClass('sorting_disabled');
+ $(tableDataHeadTHs[index]).removeClass('sorting_asc').addClass('sorting_disabled');
+ }else if($(th).is('.sorting_desc')){
+ $(th).removeClass('sorting_desc').addClass('sorting_disabled');
+ $(tableDataHeadTHs[index]).removeClass('sorting_desc').addClass('sorting_disabled');
+ }
+ });
+
+ },
+ onError: function(grid) {
+ // execute some code on network or other general error
+ },
+ dataTable: {
+ "sDom" : "tr<'row'<'col-md-6 col-sm-12'><'col-md-6 col-sm-12'pli>>", // datatable layout
+ "oLanguage": oLanguage,
+ //"bAutoWidth": true,
+ "sScrollY": tableHeight,
+ "bScrollCollapse": true,
+ "sScrollX": "100%",
+ //"sScrollXInner": "110%",
+ "aLengthMenu": [
+ [20, 50, 100],
+ [20, 50, 100] // change per page values here
+ ],
+ "iDisplayLength": 20, // default record count per page
+ "bServerSide": true, // server side processing
+ "sAjaxSource": requestURL // ajax source
+ }
+ }, columns, xsHiddenColumns, smHiddenColumns, openRowFlag, rowCheckable);
+ }
+
+ /*
+ * Insert a 'details' column to the table
+ */
+ var insertDetails = function (oTable, columns, rowCheckable) {
+
+ var $tableData = $('table#datatable_ajax');
+
+ $tableData.on('click', ' tbody td .row-details', function () {
+ var nTr = $(this).parents('tr')[0];
+ if (oTable.fnIsOpen(nTr)) {
+ /* This row is already open - close it */
+ $(this).addClass("row-details-close").removeClass("row-details-open");
+ oTable.fnClose(nTr);
+ } else {
+ /* Open this row */
+ $(this).addClass("row-details-open").removeClass("row-details-close");
+ oTable.fnOpen(nTr, fnFormatDetails(oTable, nTr, columns, rowCheckable), 'details');
+ }
+ });
+ }
+
+ return {
+
+ //main function to initiate the module
+ init: function (requestStr, lang, configPathPrefix) {
+
+ var oLanguage;
+ var columns;
+ var xsHiddenColumns;
+ var smHiddenColumns;
+ var columnsAll;
+
+ var openRowFlag = false;
+ var rowOverFlag = false;
+ var rowCheckable = false;
+ var requestURL="";
+ var requestAllData;
+ var requestParameters;
+
+ var tableHeight;
+ var tableWidth;
+
+ var columnsTooLong;
+ var sTotalRecordsSource="";
+
+ //å–得当å‰é…ç½®åŠå›½é™…化信æ¯
+ $.ajax({
+ dataType: 'json',
+ url: configPathPrefix + '-' + lang + '.json',
+ async: false,
+ contentType:'application/json; charset=utf-8',
+ "success": function(data) {
+ oLanguage = data.language;
+ columns = data.columns;
+ xsHiddenColumns = data.xsHiddenColumns;
+ smHiddenColumns = data.smHiddenColumns;
+ columnsAll = data.columnsAll;
+ openRowFlag = data.openRowFlag == 'true'? true: false;
+ rowOverFlag = data.rowOverFlag == 'true'? true: false;
+ rowCheckable = data.rowCheckable == 'true'? true: false;
+ requestURL = data.requestURL;
+ //requestAllData = data.requestAllData;
+ requestParameters = data.requestParameters;
+ tableHeight = data.tableHeight;
+ tableWidth = data.tableWidth;
+ columnsTooLong = data.columnsTooLong;
+ sTotalRecordsSource = data.sTotalRecordsSource;
+ },
+ "error" : function (xhr, info) {
+ alert('Communication Error! Error reason:' + info);
+ }
+ });
+
+ $('#dataTableWrapperDiv').css('width', tableWidth);
+
+ if(!isContained(xsHiddenColumns, smHiddenColumns) || !isContained(columns, xsHiddenColumns) || !isContained(columnsAll, columns)){
+ alert('Columns claim error: (smHiddenColumns <= xsHiddenColumns <= columns <= columnsAll) Please!');
+ return;
+ }
+
+ generateColumns(columns, openRowFlag, rowCheckable);
+ //initPickers();
+ handleRecords(requestStr, columns, xsHiddenColumns, smHiddenColumns, oLanguage, openRowFlag, rowCheckable, rowOverFlag, requestURL, requestParameters, tableHeight, columnsTooLong, sTotalRecordsSource);
+ //获得åˆå§‹åŒ–完毕的DataTable对象
+ var oTable = grid.getDataTable();
+ if(openRowFlag){
+ insertDetails(oTable, columnsAll, rowCheckable);
+ }
+ sortHandling(oTable, openRowFlag, rowCheckable);
+ //oTable.fnAdjustColumnSizing(true);
+ return oTable;
+ }
+
+ };
+
+}();
+
+var DataTableSmartClient = function(datas, configPathPrefix){
+
+ var requestStr = "";
+ if(datas){
+ requestStr = JSON.stringify(datas);
+ }
+
+ var lang = getLanguage();
+ //lang = 'en-US';
+ loadi18n_FM(lang);
+ //requestStr = "";
+ var oTable = TableAjaxICT.init(requestStr, lang, configPathPrefix);
+
+ //é‡æ–°è°ƒèŠ‚列宽以适应window resize
+ $(window).one('resize', function () {
+ //oTable.DataTable.models.oSettings.bAjaxDataGet = false;
+ oTable.fnAdjustColumnSizing(false);
+ } );
+}
diff --git a/common/src/main/webapp/thirdparty/data-tables/DataTableSmartClientApp.js b/common/src/main/webapp/thirdparty/data-tables/DataTableSmartClientApp.js
new file mode 100644
index 0000000..8584aae
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/data-tables/DataTableSmartClientApp.js
@@ -0,0 +1,1312 @@
+/***
+ Wrapper/Helper Class for datagrid based on jQuery Datatable Plugin
+ ***/
+var DatatableICT = function () {
+
+ var tableOptions; // main options
+ var dataTable; // datatable object
+ var table; // actual table jquery object
+ var tableContainer; // actual table container object
+ var tableWrapper; // actual table wrapper jquery object
+ var tableInitialized = false;
+ var ajaxParams = []; // set filter mode
+ var columns;
+ var xsHiddenColumns;
+ var smHiddenColumns;
+ var columnMaxLength = 30;
+ var columnsTooLong;
+ var hidden_xs_maxWidth = 768;
+ var hidden_sm_maxWidth = 991;
+
+ var openRowFlag = false;
+ var rowOverFlag = false;
+ var rowCheckable = false;
+
+ var aTargetsAll;
+ var sTotalRecordsSource;
+ var tableHeight;
+
+ var callbackList = [];
+
+ var includedInXsHiddenColumns = function(columnId){
+ for(var i=0;i<xsHiddenColumns.length; i++ ){
+ var column = xsHiddenColumns[i];
+ if(columnId == column.columnId){
+ return true;
+ }
+ }
+ return false;
+ }
+
+ var includedInSmHiddenColumns = function(columnId){
+ for(var i=0;i<smHiddenColumns.length; i++ ){
+ var column = smHiddenColumns[i];
+ if(columnId == column.columnId){
+ return true;
+ }
+ }
+ return false;
+ }
+
+ var countSelectedRecords = function() {
+ var selected = $('tbody > tr > td:nth-child(1) input[type="checkbox"]:checked', table).size();
+ var text = tableOptions.dataTable.oLanguage.sGroupActions;
+ if (selected > 0) {
+ $('.table-group-actions > span', tableWrapper).text(text.replace("_TOTAL_", selected));
+ } else {
+ $('.table-group-actions > span', tableWrapper).text("");
+ }
+ }
+
+ var jsonObjectToArray = function(json, columns, iDraw){
+ var jsonToDatatable = {aaData:[], sEcho:iDraw, iTotalRecords:0, iTotalDisplayRecords:0 };
+ for(var i=0; i<json.response.data.length; i++){
+ jsonToDatatable.aaData[i] = [];
+ var resRowObject = json.response.data[i];
+ if(rowCheckable){
+ jsonToDatatable.aaData[i].push("<input type=\"checkbox\" name=\"id[]\" value=\"1\">");
+ }
+ if(openRowFlag){
+ jsonToDatatable.aaData[i].push("<span class=\"row-details row-details-close\"></span>");
+ }
+ for(var j=0; j<columns.length; j++){
+
+ if($(window).width() >= hidden_xs_maxWidth && $(window).width() < hidden_sm_maxWidth && includedInSmHiddenColumns(columns[j].columnId )){
+ /*éšè—pad尺寸需è¦éšè—的列*/
+ }else if($(window).width() < hidden_xs_maxWidth && includedInXsHiddenColumns(columns[j].columnId )){
+ /*éšè—手机尺寸需è¦éšè—的列*/
+ }else{
+ var currentColumnId = columns[j].columnId;
+ if(jQuery.inArray(currentColumnId, columnsTooLong) > -1){
+ var rawText = "";
+ for(var k=0;k<columnsTooLong.length;k++){
+ if(currentColumnId == columnsTooLong[k]){
+ rawText = resRowObject[currentColumnId];
+ break;
+ }
+ }
+ if(rawText.length > columnMaxLength){
+ jsonToDatatable.aaData[i].push(rawText.slice(0, columnMaxLength) + '...');
+ }else{
+ jsonToDatatable.aaData[i].push(resRowObject[currentColumnId]);
+ }
+ } else {
+ jsonToDatatable.aaData[i].push(resRowObject[currentColumnId]);
+ }
+
+ }
+ }
+ }
+ jsonToDatatable.sEcho++;
+ var totalRow = 0;
+ var totalRecordsSource = eval('json.' + sTotalRecordsSource);
+ if(totalRecordsSource && totalRecordsSource.length >0){
+ totalRow = parseInt(totalRecordsSource);
+ }
+ if(isNaN(totalRow)){
+ alert('All rows counting number got fail!');
+ }else{
+ jsonToDatatable.iTotalRecords = totalRow;
+ jsonToDatatable.iTotalDisplayRecords = totalRow;
+ }
+ return jsonToDatatable;
+ }
+
+ var singleAlarmDel = function(divOverlay){
+
+ //æ ¹æ®æµ®åŠ¨æ¡†çš„当å‰id获å–需è¦åˆ é™¤çš„è¡Œ
+ var trId = divOverlay.attr('id_tr');
+ tr=$('tr#' + trId);
+ var tds = $(tr).children();
+ var tdAlarmId = "";
+ if(rowCheckable){
+ tdAlarmId = $(tds.eq(2)).text();
+ }else{
+ tdAlarmId = $(tds.eq(1)).text();
+ }
+
+ var data= {
+ "alarmId":[parseInt(tdAlarmId)]
+ };
+
+ var sSource = "/web/rest/web/fm/curalarms?data=" + JSON.stringify(data) + "&_operationType=remove&_dataSource=isc_PageRestDataSource_0&isc_metaDataPrefix=_&isc_dataFormat=json";
+
+ $.ajax( {
+ "dataType": 'json',
+ "type": "DELETE",
+ "url": sSource,
+ "data" : null,
+ "contentType" : 'application/json; charset=utf-8',
+ "success": function(json) {
+ if(json.response.status == 0){
+ var resRowObject = json.response.data[0];
+ //alert('删除æˆåŠŸ');
+ }
+ if(json.response.status == -1){
+ //alert('删除失败');
+ }
+ },
+ "error": function() {
+ alert('Communication Error!');
+ }
+ } );
+ }
+
+ var singleAlarmAckUnAck = function(divOverlay, ackType){
+
+ //æ ¹æ®æµ®åŠ¨æ¡†çš„当å‰id获å–需è¦ç¡®è®¤çš„è¡Œ
+ var trId = divOverlay.attr('id_tr');
+ var tr = $('tr#' + trId);
+
+ //å–å¾—éšè—的头部表格的相应行
+ var $tableHead = $('div.dataTables_scrollHeadInner > table.dataTable');
+ //var trHead = $('tbody > tr:nth-child(' + trId + ')', $tableHead);
+ var trHead = $('tr#' + trId.replace('body', 'head'), $tableHead);
+ var tdDivs = $('td > div', trHead);
+
+ var tds = $(tr).children();
+ var tdAlarmId = "";
+ if(rowCheckable){
+ tdAlarmId = $(tds.eq(2)).text();
+ }else{
+ tdAlarmId = $(tds.eq(1)).text();
+ }
+
+ var aoData =
+ {
+ "dataSource":"isc_PageRestDataSource_0",
+ "operationType":"update",
+ "componentId":"isc_com_zte_ums_aos_fm_view_eventview_table_AlarmTable_0",
+ "data":{
+ "viewType":1,
+ "state":ackType,
+ "alarmId":[
+ parseInt(tdAlarmId)
+ ]
+ },
+ "oldValues":null
+ };
+
+ var sSource = "/web/rest/web/fm/curalarms?isc_dataFormat=json";
+
+ $.ajax( {
+ "dataType": 'json',
+ "type": "PUT",
+ "url": sSource,
+ "contentType": 'application/json; charset=utf-8',
+ "data": JSON.stringify(aoData),
+ "success": function(json) {
+ /*for(var i=0;i<callbackList.length;i++){
+ if(getFnName(callbackList[i]).indexOf("transformFieldNames")>0){
+ json = callbackList[i](json);
+ break;
+ }
+ }*/
+ //json = AlarmLabels.transformFieldNames(json);
+ if(callbackList[1]){
+ json = callbackList[1](json);
+ }
+ if(json.response.status == 0){
+ var resRowObject = json.response.data[0];
+ var columnsCopy = $.extend(true, [], columns);
+ //éšè—列的情况下需è¦ç‰¹æ®Šå¤„ç†
+ if($(window).width()>=hidden_xs_maxWidth && $(window).width()<hidden_sm_maxWidth){
+ columnsCopy = [];
+ for(var i=0;i<columns.length;i++){
+ if(!includedInSmHiddenColumns(columns[i].columnId)){
+ columnsCopy.push(columns[i]);
+ }
+ }
+ } else if($(window).width()<hidden_xs_maxWidth){
+ columnsCopy = [];
+ for(var i=0;i<columns.length;i++){
+ if(!includedInXsHiddenColumns(columns[i].columnId)){
+ columnsCopy.push(columns[i]);
+ }
+ }
+ }
+ var iIndex = 1;
+ if(rowCheckable){
+ iIndex = 2;
+ }
+ for(var i=iIndex;i<tds.length && (i-iIndex)<columnsCopy.length;i++){
+ var currentColumnId = columnsCopy[i-iIndex].columnId;
+ if(jQuery.inArray(currentColumnId, columnsTooLong) > -1) {
+ var rawText = "";
+ for(var k=0;k<columnsTooLong.length;k++){
+ if(currentColumnId == columnsTooLong[k]){
+ rawText = resRowObject[currentColumnId];
+ break;
+ }
+ }
+ if(rawText.length > columnMaxLength){
+ $(tds.eq(i)).html(rawText.slice(0, columnMaxLength) + '...');
+ $(tdDivs.eq(i)).html(rawText.slice(0, columnMaxLength) + '...');
+ }else{
+ $(tds.eq(i)).html(resRowObject[currentColumnId]);
+ $(tdDivs.eq(i)).html(resRowObject[currentColumnId]);
+ }
+ } else {
+ $(tds.eq(i)).html(resRowObject[currentColumnId]);
+ $(tdDivs.eq(i)).html(resRowObject[currentColumnId]);
+ }
+ }
+ //更新缓存中的当å‰è¡Œæ•°æ®
+ for (var t = 0; t < dataTable.datas.length; t++) {
+ var temp = dataTable.datas[t];
+ if (temp.alarmId == resRowObject['alarmId']) {
+ dataTable.datas[t] = resRowObject;
+ break;
+ }
+ }
+ }
+ if(json.response.status == -1){
+ $('div#myModalConfirm').modal({
+ keyboard: false,
+ backdrop: 'static'
+ });
+ $('span#alarm_number').html(tdAlarmId);
+ //国际化信æ¯
+ if(ackType==1){
+ $('span#aos_fm_alarm_opeater_ack_already').html($.i18n.prop('aos_fm_alarm_opeater_ack_already_ok'));
+ }else{
+ $('span#aos_fm_alarm_opeater_ack_already').html($.i18n.prop('aos_fm_alarm_opeater_ack_already_un'));
+ }
+ }
+ //å¡«å……å•å…ƒæ ¼é¢œè‰²
+ var divColor = $("div.cellBackgroundColor", tr);
+ $(divColor).parent().css("background", $(divColor).css("background-color"));
+ },
+ "error": function() {
+ alert('Communication Error!');
+ }
+ } );
+ }
+
+ var addRowOverlap = function(){
+ var $tableData = $('table#datatable_ajax');
+ //å–å¾—éšè—的头部表格的相应行
+ var $tableHead = $('div.dataTables_scrollHeadInner > table.dataTable');
+ var trHeads = $tableHead.find('tr').get();
+ $.each( trHeads, function( index, trHead ){
+ $(trHead).attr('id', 'headTableTR' + index);
+ });
+ //å–得浮动div
+ var $divOverlay = $('div#divOverlay');
+ var divScrollHead = $('div.dataTables_scrollHead');
+ var divRightPadding = $('div#divRightPadding');
+ //å–表头下边沿ä½ç½®
+ var tableHeadBottomHeight = $(divScrollHead).position().top + $(divScrollHead).height();
+ var tableBottom = $tableData.position().top + $tableData.height() + 3;
+ //å–表格å³è¾¹æ²¿ä½ç½®
+ var tableRightEdgePosition = $(divRightPadding).position().left;
+ var trs = $tableData.find('tr').get();
+ $.each( trs, function( index, tr ){
+ var tdEmpty = $('td.dataTables_empty',tr);
+ if(!tdEmpty || tdEmpty.length ==0 ){
+ $(tr).attr('id', 'bodyTableTR' + index);
+ //$divOverlay.attr('id_tr', 'bodyTableTR' + index);
+ $(tr).one('hover', function(){
+ var rowPos = $(tr).position();
+ var currentTrTop = rowPos.top;
+ //var bottomLeft = rowPos.left;
+ $divOverlay.attr('id_tr', 'bodyTableTR' + index);
+ $divOverlay.css({
+ display: 'block',
+ position: 'absolute',
+ 'background-color': '#e5e5e5',
+ //opacity: 0.7,
+ border: 'solid 0px',
+ top: currentTrTop + 6,
+ left: tableRightEdgePosition - 308,
+ width: 300,
+ height: 30
+ });
+ //防止浮动框跳出表格内容区域
+ if( $divOverlay.position().top < tableHeadBottomHeight || $divOverlay.position().top + $divOverlay.height() > tableBottom){
+ $divOverlay.css('display', 'none');
+ }
+ var buttonConfirm = $('div#buttonConfirm', $divOverlay);
+ var buttonUnConfirm = $('div#buttonUnConfirm', $divOverlay);
+ //åˆå§‹åŒ–悬浮按钮当å‰è¡Œçš„确认å确认状æ€
+ if($(tr).find('span.alarmAck') && $(tr).find('span.alarmAck').length >0){
+ var spanAck = $(tr).find('span.alarmAck');
+ var ackState = $(spanAck).attr('ack_id');
+ var buttonTDsConfirm = $(buttonConfirm).find('td');
+ var buttonTDsUnConfirm = $(buttonUnConfirm).find('td');
+ if(ackState=="2"){
+ if(buttonTDsConfirm && buttonTDsConfirm.length > 0 && buttonTDsUnConfirm && buttonTDsUnConfirm.length > 0){
+ $.each(buttonTDsConfirm, function(index, td){
+ $(td).removeClass('buttonRoundedDisabled').addClass('buttonRounded');
+ });
+ $.each(buttonTDsUnConfirm, function(index, td){
+ $(td).removeClass('buttonRounded').addClass('buttonRoundedDisabled');
+ });
+ }
+ }else{
+ if(buttonTDsConfirm && buttonTDsConfirm.length > 0 && buttonTDsUnConfirm && buttonTDsUnConfirm.length > 0){
+ $.each(buttonTDsConfirm, function(index, td){
+ $(td).removeClass('buttonRounded').addClass('buttonRoundedDisabled');
+ });
+ $.each(buttonTDsUnConfirm, function(index, td){
+ $(td).removeClass('buttonRoundedDisabled').addClass('buttonRounded');
+ });
+ }
+ }
+ }
+ //添加确认å确认点击事件
+ $(buttonConfirm).one('click', function(){
+ var buttonRoundedTDsConfirm = $(buttonConfirm).find('td.buttonRounded');
+ var buttonRoundedTDsUnConfirm = $(buttonUnConfirm).find('td.buttonRoundedDisabled');
+ if(buttonRoundedTDsConfirm && buttonRoundedTDsConfirm.length > 0){
+ $.each(buttonRoundedTDsConfirm, function(index, td){
+ $(td).removeClass('buttonRounded').addClass('buttonRoundedDisabled');
+ });
+ $.each(buttonRoundedTDsUnConfirm, function(index, td){
+ $(td).removeClass('buttonRoundedDisabled').addClass('buttonRounded');
+ });
+ $divOverlay.css('display', 'none');
+ singleAlarmAckUnAck($divOverlay, 1);
+ }
+ });
+ $(buttonUnConfirm).one('click', function(){
+ var buttonRoundedTDsUnConfirm = $(buttonUnConfirm).find('td.buttonRounded');
+ var buttonRoundedTDsConfirm = $(buttonConfirm).find('td.buttonRoundedDisabled');
+ if(buttonRoundedTDsUnConfirm && buttonRoundedTDsUnConfirm.length > 0){
+ $.each(buttonRoundedTDsUnConfirm, function(index, td){
+ $(td).removeClass('buttonRounded').addClass('buttonRoundedDisabled');
+ });
+ $.each(buttonRoundedTDsConfirm, function(index, td){
+ $(td).removeClass('buttonRoundedDisabled').addClass('buttonRounded');
+ });
+ $divOverlay.css('display', 'none');
+ singleAlarmAckUnAck($divOverlay, 2);
+ }
+ });
+ var buttonDelete = $('div#buttonDelete', $divOverlay);
+ $(buttonDelete).die().live('click', function(){
+ $divOverlay.css('display', 'none');
+ var trIdToDelete = $divOverlay.attr('id_tr');
+ var toDeleteTr=$('tr#' + trIdToDelete);
+ $("td", toDeleteTr).addClass('dataTableTdSelected');
+ //弹出删除确认对è¯æ¡†
+ $('div#myModal').modal({
+ keyboard: false,
+ backdrop: 'static'
+ });
+ $('#delConfirm').die().live('click', function(){
+ //$divOverlay.css('display', 'none');
+ dataTable.fnClose(tr);
+ //删除åŽç«¯æ•°æ®
+ singleAlarmDel($divOverlay);
+ //删除当å‰è¡Œ
+ $(tr).remove();
+ //删除表头表格的相应行
+ $('tr#' + $(tr).attr('id').replace('body', 'head'), $tableHead).remove();
+ //刷新表格
+ //dataTable.fnAdjustColumnSizing();
+ });
+ $('#myModal').on('hidden.bs.modal', function (e) {
+ $("td", toDeleteTr).removeClass('dataTableTdSelected');
+ })
+ });
+ //展开行的情况éšè—
+ $('td.details > table.detailTable').on('hover', function(){
+ $divOverlay.css('display', 'none');
+ });
+ $('div#myModal').on('hover', function(){
+ $divOverlay.css('display', 'none');
+ });
+ });
+ }
+ });
+ }
+
+ return {
+
+ //main function to initiate the module
+ init: function (options, columnsDefined, xsHiddenColumnsDefined, smHiddenColumnsDefined) {
+
+ if (!$().dataTable) {
+ return;
+ }
+
+ var the = this;
+
+ //记录需è¦ç¦æŽ‰é»˜è®¤æŽ’åºçš„列
+ var aTargets = [];
+ var targetsLength = columnsDefined.length;
+ if(rowCheckable)targetsLength++;
+ if(openRowFlag)targetsLength++;
+ for(var i=0;i<targetsLength;i++){
+ aTargets.push(i);
+ }
+ aTargetsAll = aTargets;
+
+ // default settings
+ options = $.extend(true, {
+ src: "", // actual table
+ filterApplyAction: "filter",
+ filterCancelAction: "filter_cancel",
+ resetGroupActionInputOnSuccess: true,
+ dataTable: {
+ //"sDom" : "<'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'<'table-group-actions pull-right'>>r><'table-scrollable't><'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'>r>>", // datatable layout
+
+ "aoColumnDefs" : [{ // define columns sorting options(by default all columns are sortable extept the first checkbox column)
+ 'bSortable' : false,
+ 'aTargets' : aTargets
+ }],
+
+ "bAutoWidth": false, // disable fixed width and enable fluid table
+ //"bSortCellsTop": true, // make sortable only the first row in thead
+ "sPaginationType": "bootstrap_extended", // pagination type(bootstrap, bootstrap_full_number or bootstrap_extended)
+ "bProcessing": true, // enable/disable display message box on record load
+ "bServerSide": true, // enable/disable server side ajax loading
+ "sAjaxSource": "", // define ajax source URL
+ //"sServerMethod": "GET",
+
+ // handle ajax request
+ "fnServerData": function ( sSource, aoData, fnCallback, oSettings ) {
+ //for ICT Paging
+ //var startIndex = aoData[3].value;//"iDisplayStart"
+ //var pageLength = aoData[4].value;//"iDisplayLength"
+ var oPaging = oSettings.oInstance.fnPagingInfo();
+ //var startIndex = oPaging.iStart;
+ var pageLength = oPaging.iLength;
+ var curPageNo = oPaging.iPage + 1;
+
+ for(var k=aoData.length-1;k>=0;k--){
+ var flag = -1;
+ if(aoData[k].name=='pageSize'){
+ aoData[k].value=pageLength;
+ flag++;
+ }
+ if(aoData[k].name=='pageNo'){
+ aoData[k].value=curPageNo;
+ flag++
+ }
+ if(flag == 1)break;
+ }
+
+ oSettings.jqXHR = $.ajax( {
+ "dataType": 'json',
+ "type": "GET",
+ "url": sSource,
+ "data": aoData,
+ "success": function(res, textStatus, jqXHR) {
+ if (res.sMessage) {
+ openoFrameWork.alert({type: (res.sStatus == 'OK' ? 'success' : 'danger'), icon: (res.sStatus == 'OK' ? 'check' : 'warning'), message: res.sMessage, container: tableWrapper, place: 'prepend'});
+ }
+ if ($('.group-checkable', tableContainer).size() === 1) {
+ $('.group-checkable', tableContainer).attr("checked", false);
+ $.uniform.update($('.group-checkable', tableContainer));
+ }
+ if (tableOptions.onSuccess) {
+ tableOptions.onSuccess.call(the);
+ }
+ //ä¿å­˜æ•°æ®åœ¨dataTable对象中给行详细信æ¯é¢æ¿ç”¨
+ dataTable.datas = res.response.data;
+ if(res.response.status < 0){
+ alert(res.response.data);
+ return;
+ }
+
+ //告警字段值转æ¢
+ //res = AlarmLabels.transformFieldNames(res);
+ /*for(var i=0;i<callbackList.length;i++){
+ if(getFnName(callbackList[i]).indexOf("transformFieldNames")>0){
+ res = callbackList[i](res);
+ break;
+ }
+ }*/
+ if(callbackList[1]){
+ res = callbackList[1](res);
+ }
+
+ res = jsonObjectToArray(res, columns, oSettings.iDraw);
+
+ //é‡ç»˜è¡¨æ ¼
+ fnCallback(res, textStatus, jqXHR);
+ },
+ "error": function() {
+ if (tableOptions.onError) {
+ tableOptions.onError.call(the);
+ }
+ openoFrameWork.alert({type: 'danger', icon: 'warning', message: tableOptions.dataTable.oLanguage.sAjaxRequestGeneralError, container: tableWrapper, place: 'prepend'});
+ $('.dataTables_processing', tableWrapper).remove();
+ }
+ } );
+
+ },
+
+ // pass additional parameter
+ "fnServerParams": function ( aoData ) {
+ //here can be added an external ajax request parameters.
+ //for(var i in ajaxParams) {
+ for(var i=0; i<ajaxParams.length; i++){
+ var param = ajaxParams[i];
+ aoData.push({"name" : param.name, "value": param.value});
+ }
+ },
+
+ "fnDrawCallback": function( oSettings ) { // run some code on table redraw
+ if (tableInitialized === false) { // check if table has been initialized
+ tableInitialized = true; // set table initialized
+ table.show(); // display table
+ }
+ openoFrameWork.initUniform($('input[type="checkbox"]', tableContainer)); // reinitialize uniform checkboxes on each table reload
+ countSelectedRecords(); // reset selected records indicator
+ //所有tdä¸æ¢è¡Œ
+ $('table#datatable_ajax').find('td').css('white-space', 'nowrap');
+
+ //自适应对é½è¡¨å¤´
+ var $tableHead = $('div.dataTables_scrollHeadInner > table.dataTable', tableWrapper);
+ var tbodyHead = $('tbody', $tableHead);
+ if(tbodyHead && tbodyHead.length >0){
+ $(tbodyHead).remove();
+ }
+
+ var $tableBody = $('table#datatable_ajax', tableWrapper);
+ var trIn = $('thead > tr:nth-child(1)', $tableHead);
+ var trBodyHead = $('thead > tr:nth-child(1)', $tableBody);
+ var tds = $(trIn).children();
+ var ths = $(trBodyHead).children();
+ for(var k=0;k<tds.length;k++){
+ $(ths.eq(k)).html('<div style="height: 0;overflow: hidden;">' + tds.eq(k).html() + '</div>');
+ }
+ var bodyRows = $('tbody > tr', $tableBody);
+ for(var i=0;i<bodyRows.length;i++){
+ var rowClone = $(bodyRows.eq(i)).clone();
+ var tds = $(rowClone).children();
+ for(var j=0;j<tds.length;j++){
+ $(tds.eq(j)).html('<div style="height: 0;overflow: hidden;">' + tds.eq(j).html() + '</div>');
+ $(tds.eq(j)).height('0px');
+ $(tds.eq(j)).css('padding-top','0px');
+ $(tds.eq(j)).css('padding-bottom','0px');
+ $(tds.eq(j)).css('border-top-width','0px');
+ $(tds.eq(j)).css('border-bottom-width','0px');
+ }
+ $(rowClone).height('0px');
+ $tableHead.append($(rowClone).prop("outerHTML"));
+ }
+
+ $('.dataTables_scrollBody').css('width','100%');
+ $('.dataTables_scrollHead').css('width','98.5%');
+ $('.dataTables_scrollHeadInner').css('padding-right', 0);
+
+ //添加浮动确认å确认按钮
+ if(rowOverFlag){
+ addRowOverlap();
+ }
+
+ //å¡«å……å•å…ƒæ ¼é¢œè‰²
+ var divColors = $("div.cellBackgroundColor", $tableBody);
+ $.each( divColors, function( index, divColor ){
+ $(divColor).parent().css("background", $(divColor).css("background-color"));
+ });
+
+ //设置表格本体高度
+ $('div.dataTables_scrollBody').css('height', tableHeight);
+ }
+ }
+ }, options);
+
+ tableOptions = options;
+
+ columns = columnsDefined;
+ xsHiddenColumns = xsHiddenColumnsDefined;
+ smHiddenColumns = smHiddenColumnsDefined;
+ // create table's jquery object
+ table = $(options.src);
+ tableContainer = table.parents(".table-container");
+ // apply the special class that used to restyle the default datatable
+
+ $.fn.dataTableExt.oStdClasses.sWrapper = $.fn.dataTableExt.oStdClasses.sWrapper + " dataTables_extended_wrapper";
+
+ // initialize a datatable
+ dataTable = table.dataTable(options.dataTable);
+
+ tableWrapper = table.parents('.dataTables_wrapper');
+
+ // modify table per page dropdown input by appliying some classes
+ $('.dataTables_length select', tableWrapper).addClass("form-control input-xsmall input-sm");
+
+ // handle group checkboxes check/uncheck
+ $('.group-checkable', tableContainer).change(function () {
+ var set = $('tbody > tr > td:nth-child(1) input[type="checkbox"]', table);
+ var checked = $(this).is(":checked");
+ $(set).each(function () {
+ $(this).attr("checked", checked);
+ });
+ $.uniform.update(set);
+ countSelectedRecords();
+ });
+
+ // handle row's checkbox click
+ table.on('change', 'tbody > tr > td:nth-child(1) input[type="checkbox"]', function(){
+ countSelectedRecords();
+ });
+
+ //填充表头å³è¾¹ç•Œ
+ $('.dataTables_scrollHead').css('display','inline-block');
+ //var dataTables_scrollHead_height = $('.dataTables_scrollHead').css( "height" );
+ $(".dataTables_scrollHead").after("<div id='divRightPadding' style='overflow: hidden; background:#eee; position: relative; float:right; border: 1px solid #ddd; height:" + 38 + "px; width: 1.4%;'></div>");
+ if($.browser.mozilla){
+ $('#divRightPadding').css('height', '40');
+ }
+
+ //éšè—掉æŸäº›åˆ—
+ var $tableHead = $('div.dataTables_scrollHeadInner > table.dataTable', tableWrapper);
+ var $tableBody = $('table#datatable_ajax', tableWrapper);
+
+ for(var i=0;i<xsHiddenColumns.length;i++){
+ for(var j=0;j<columns.length;j++){
+ if(xsHiddenColumns[i].columnId == columns[j].columnId){
+ $('thead > tr > th#' + columns[j].columnId, $tableHead).addClass('hidden-xs');
+ $('thead > tr > th#' + columns[j].columnId, $tableBody).addClass('hidden-xs');
+ break;
+ }
+ }
+ }
+
+ for(var i=0;i<smHiddenColumns.length;i++){
+ for(var j=0;j<columns.length;j++){
+ if(smHiddenColumns[i].columnId == columns[j].columnId){
+ $('thead > tr > th#' + columns[j].columnId, $tableHead).addClass('hidden-sm');
+ $('thead > tr > th#' + columns[j].columnId, $tableBody).addClass('hidden-sm');
+ break;
+ }
+ }
+ }
+ },//end init------------------------------------------------------------------------------------
+
+ getSelectedRowsCount: function() {
+ return $('tbody > tr > td:nth-child(1) input[type="checkbox"]:checked', table).size();
+ },
+
+ getSelectedRows: function() {
+ var rows = [];
+ $('tbody > tr > td:nth-child(1) input[type="checkbox"]:checked', table).each(function(){
+ rows.push({name: $(this).attr("name"), value: $(this).val()});
+ });
+
+ return rows;
+ },
+
+ addAjaxParam: function(name, value) {
+ ajaxParams.push({"name": name, "value": value});
+ },
+
+ clearAjaxParams: function(name, value) {
+ ajaxParams = [];
+ },
+
+ getDataTable: function() {
+ return dataTable;
+ },
+
+ getTableWrapper: function() {
+ return tableWrapper;
+ },
+
+ gettableContainer: function() {
+ return tableContainer;
+ },
+
+ getTable: function() {
+ return table;
+ },
+
+ setOpenRowFlag: function(openRowFlagInput) {
+ openRowFlag = openRowFlagInput;
+ },
+
+ setRowOverFlag: function(rowOverFlagInput) {
+ rowOverFlag = rowOverFlagInput;
+ },
+
+ setRowCheckable: function(rowCheckableInput) {
+ rowCheckable = rowCheckableInput;
+ },
+
+ setColumnsTooLong: function(columnsTooLongInput) {
+ columnsTooLong = columnsTooLongInput;
+ },
+
+ setSTotalRecordsSource: function(sTotalRecordsSourceInput){
+ sTotalRecordsSource = sTotalRecordsSourceInput;
+ },
+
+ setTableHeight: function(tableHeightInput){
+ tableHeight = tableHeightInput;
+ },
+
+ setCallbackList: function(list){
+ if($.isArray(list)){
+ callbackList = list;
+ }
+ }
+
+ };
+
+};
+
+var TableAjaxICT = function () {
+
+ var initPickers = function () {
+ //init date pickers
+ $('.date-picker').datepicker({
+ //rtl: App.isRTL(),
+ autoclose: true
+ });
+ }
+
+ //判断a数组是å¦åŒ…å«b数组
+ function isContained(largeArray, smallArray){
+ if(!(largeArray instanceof Array) || !(smallArray instanceof Array))
+ return false;
+ if(largeArray.length < smallArray.length)
+ return false;
+ for(var i = 0; i < smallArray.length; i++){
+ var flag = false;
+ for(j=0;j<largeArray.length;j++){
+ if(largeArray[j].columnId == smallArray[i].columnId){
+ flag = true;
+ break;
+ }
+ }
+ if(flag==false)return false;
+ }
+ return true;
+ }
+
+ var grid = new DatatableICT();
+
+ var detailTableId = "alarmDetailInfo";
+
+ /* Formatting function for row details */
+ function fnFormatDetails(oTable, nTr, columns, rowCheckable) {
+ //å–得当å‰è¡Œæ˜¾ç¤ºæ•°æ®
+ var tds = $(nTr).children();
+ var alarmId="";
+ if(rowCheckable){
+ alarmId = $(tds.eq(2)).html();
+ }else{
+ alarmId = $(tds.eq(1)).html();
+ }
+ //å–得当å‰è¡Œå®Œæ•´æ•°æ®
+ var systemType = 0;
+ var code = 0;
+ //所有字段
+ var resDisplayName="";
+ var moc="";
+ var alarmRaisedTime="";
+ var perceivedSeverity="";
+ var probableCauseDesc="";
+ var neip="";
+ var alarmType="";
+ var ackState="";
+ var ackTime="";
+ var ackUserId="";
+ var ackSystemId="";
+ var alarmChangedTime="";
+ var componentname="";
+ var position1="";
+ var specificproblem="";
+ var additionalText="";
+ for (var i = 0; i < oTable.datas.length; i++) {
+ var temp = oTable.datas[i];
+ if (temp.alarmId == alarmId) {
+ alarmId = temp.alarmId;
+ resDisplayName = temp.resDisplayName;
+ alarmRaisedTime = temp.alarmRaisedTime;
+ perceivedSeverity = temp.perceivedSeverity;
+ probableCauseDesc = temp.probableCauseDesc;
+ neip = temp.neip;
+ alarmType = temp.alarmType;
+ ackState = temp.ackState;
+ ackTime = temp.ackTime;
+ ackUserId = temp.ackUserId;
+ ackSystemId = temp.ackSystemId;
+ alarmChangedTime = temp.alarmChangedTime;
+
+ systemType = temp.systemType;
+ code = temp.probableCauseCode;
+ moc = temp.moc;
+ componentname = temp.componentname;
+ position1 = temp.position1;
+ specificproblem = temp.specificproblem;
+ additionalText = temp.additionalText;
+ break;
+ }
+ }
+
+ var id = alarmId;
+ //获å–所有展开的详细信æ¯é¢æ¿ç”Ÿæˆå½“å‰çš„é¢æ¿id用于定ä½
+ var detailTables = $('[class_id=detailTableAlarm]');
+ if(detailTables && detailTables.length > 0){
+ detailTableId = "alarmDetailInfo" + detailTables.length;
+ }
+ var sOut = '<table id="' + detailTableId + '" class_id="detailTableAlarm" class = "detailTable" width = "800" style="table-layout: fixed;">';
+ sOut += '<tr class="oddDetailTable"><td class = "detailTitleStyle" width = 130><span class = "labelDetailTable">' + columns[0].columnTitle + '</span></td><td class = "detailCellStyle" width = 160>' + alarmId + '</td>';
+ sOut += '<td class = "detailTitleStyle" width = 130><span class = "labelDetailTable">' + columns[4].columnTitle + '</span></td><td class = "detailCellStyle" width = 130>' + perceivedSeverity + '</td>';
+ sOut += '<td class = "detailTitleStyle" width = 130><span class = "labelDetailTable">' + columns[9].columnTitle + '</span></td><td class = "detailCellStyle" width = 160>' + alarmType + '</td>';
+ sOut += '<td class = "detailTitleStyle" width = 130><span class = "labelDetailTable">' + columns[3].columnTitle + '</span></td><td class = "detailCellStyle" width = 160 colspan = 2>' + alarmRaisedTime + '</td></tr>';
+
+ sOut += '<tr class="evenDetailTable"><td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[5].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 3>' + probableCauseDesc + '</td>';
+ sOut += '<td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[15].columnTitle + '</span></td><td class = "detailCellStyle">' + alarmChangedTime + '</td>';
+ sOut += '<td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[11].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 2>' + ackState + '</td></tr>';
+
+ sOut += '<tr class="oddDetailTable"><td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[12].columnTitle + '</span></td><td class = "detailCellStyle">' + ackTime + '</td>';
+ sOut += '<td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[13].columnTitle + '</span></td><td class = "detailCellStyle">' + ackUserId + '</td>';
+ sOut += '<td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[14].columnTitle + '</span></td><td class = "detailCellStyle">' + ackSystemId + '</td>';
+ sOut += '<td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[7].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 2>' + neip + '</td></tr>';
+
+ sOut += '<tr class="evenDetailTable"><td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[2].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 3>' + moc + '</td>';
+ sOut += '<td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[1].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 4>' + resDisplayName + '</td></tr>';
+
+ sOut += '<tr class="oddDetailTable"><td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[8].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 3>' + componentname + '</td>';
+ sOut += '<td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[16].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 4>' + position1 + '</td></tr>';
+
+ sOut += '<tr class="evenDetailTable"><td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[10].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 8>' + specificproblem + '</td></tr>';
+
+ sOut += '<tr class="oddDetailTable"><td class = "detailTitleStyle"><span class = "labelDetailTable">' + columns[6].columnTitle + '</span></td><td class = "detailCellStyle" colspan = 8>' + additionalText + '</td></tr>';
+
+ sOut += '<tr class="evenDetailTable"><td class = "detailTitleStyle"><span class = "labelDetailTable">' + $.i18n.prop('aos_fm_SuggestionSetting_view_DefaultSuggestionGroupTitle').replace(';', '').replace(/\"/g,'') + '</span></td><td id = "defaulInfo' + id + '" class = "detailCellStyle" colspan = 8>' + '</td></tr>';
+
+ sOut += '<tr class="oddDetailTable"><td class = "detailTitleStyle"><span class = "labelDetailTable">' + $.i18n.prop('aos_fm_SuggestionSetting_view_SettingSuggestionGroupTitle').replace(';', '').replace(/\"/g,'') + '</span></td><td id = "customInfo' + id + '" class = "detailCellStyle" colspan = 6><td style="width:80px" align="right"><button id = "customInfoModify' + id + '" class="btn-toolbar" type="button"><span id = "modifyBtnSpan' + id + '"class="fa fa-pencil-square-o"></span></button></td><td style="width:80px" id="cancelDiv' + id + '"></td></tr>';
+
+ sOut += '</table>';
+
+ /*
+ var systemType = 0;
+ var code = 0;
+ for (var i = 0; i < oTable.datas.length; i++) {
+ var temp = oTable.datas[i];
+ if (temp.alarmId == oTr['alarmId'].value) {
+ systemType = temp.systemType;
+ code = temp.probableCauseCode;
+ }
+ }*/
+ var data = {
+ "systemType" : systemType,
+ "code" : code
+ };
+ var sendData = JSON.stringify(data);
+ $.ajax({
+ "dataType" : 'json',
+ "type" : "GET",
+ "url" : "/web/rest/web/fm/Maintenance" + "?" + "data=" + sendData,
+ "contentType" : 'application/json; charset=utf-8',
+ "data" : null,
+ "success" : function (json) {
+ $('tr').find('td#defaulInfo' + id).text(json.defaulInfo);
+ $('tr').find('td#customInfo' + id).text(json.customInfo);
+ var modify = $('#customInfoModify' + id);
+ modify.on('click', function () {
+ var span = $('#modifyBtnSpan' + id);
+ var customInfo = $('tr').find('td#customInfo' + id);
+ var cancel = $('#cancelDiv' + id);
+ if (span['0'].className === 'fa fa-pencil-square-o') {
+ var value = customInfo['0'].textContent;
+ customInfo['0'].textContent = '';
+ customInfo['0'].innerHTML = '<textarea id="customInfoInput' + id + '" type="textarea" cols=110 rows=4 onKeyUp="if(this.value.length > 700) this.value=this.value.substr(0,700)">' + value + '</textarea>';
+ span['0'].className = 'fa fa-floppy-o';
+ cancel['0'].innerHTML = '<button id = "cancelBtn' + id + '" class="btn-toolbar" type="button"><span class="fa fa-sign-out"></span></button>';
+ $('#cancelBtn' + id).on('click', function () {
+ customInfo['0'].innerHTML = '';
+ customInfo['0'].textContent = value;
+ cancel['0'].innerHTML = '';
+ span['0'].className = 'fa fa-pencil-square-o';
+ });
+ } else {
+ var inputValue = $('#customInfoInput' + id)['0'].value;
+ customInfo['0'].innerHTML = '';
+ customInfo['0'].textContent = inputValue;
+ span['0'].className = 'fa fa-pencil-square-o';
+ cancel['0'].innerHTML = '';
+ var modifyData = {
+ "systemType" : systemType,
+ "code" : code,
+ "defaulInfo" : json.defaulInfo,
+ "customInfo" : inputValue
+ };
+ $.ajax({
+ "dataType" : 'json',
+ "type" : "PUT",
+ "url" : "/web/rest/web/fm/Maintenance",
+ "contentType" : 'application/json; charset=utf-8',
+ "data" : JSON.stringify(modifyData),
+ "error" : function () {
+ alert('Modify Error!');
+ }
+ });
+ }
+ });
+ },
+ "error" : function () {
+ alert('Communication Error!');
+ }
+ });
+
+ return sOut;
+ }
+
+ var generateColumns = function(columns, openRowFlag, rowCheckable){
+ var $tableData = $('table#datatable_ajax');
+ var theadTR = $('thead > tr', $tableData);
+ if(rowCheckable){
+ theadTR.append('<th><input type="checkbox" class="group-checkable"></th>');
+ }
+ if(openRowFlag){
+ theadTR.append('<th>&nbsp;&nbsp;</th>');
+ }
+ for(var i=0;i<columns.length;i++){
+ theadTR.append('<TH id="' + columns[i].columnId + '" style="white-space: nowrap;">' + columns[i].columnTitle + '</TH>');
+ }
+ }
+
+ var sortHandling = function(oTable, openRowFlag, rowCheckable){
+ var indexSkip = -1;
+ if(openRowFlag&&rowCheckable){
+ indexSkip = 1;
+ }else if(openRowFlag&&!rowCheckable||!openRowFlag&&rowCheckable){
+ indexSkip = 0;
+ }
+ var $sortOrder = 0; //排åºç±»åž‹ 1表示å‡åºï¼Œ0表示é™åº
+ var tableWrapper = $('div#datatable_ajax_wrapper');
+ var $tableHead = $('div.dataTables_scrollHeadInner > table.dataTable', tableWrapper);
+ var $tableData = $('table#datatable_ajax');
+ var clearSort = function(currentTh){
+ var ths = $tableHead.find('th').get();
+ var tableDataHeadTHs = $tableData.find('th').get();
+ $.each( ths, function( index, th ){
+ if(index > indexSkip){
+ if($(th).text() != currentTh.text()){
+ if($(th).is('.sorting_disabled')){
+ //do nothing;
+ }else if($(th).is('.sorting_asc')){
+ $(th).removeClass('sorting_asc').addClass('sorting_disabled');
+ $(tableDataHeadTHs[index]).removeClass('sorting_asc').addClass('sorting_disabled');
+ }else if($(th).is('.sorting_desc')){
+ $(th).removeClass('sorting_desc').addClass('sorting_disabled');
+ $(tableDataHeadTHs[index]).removeClass('sorting_desc').addClass('sorting_disabled');
+ }
+ }
+ }
+ });
+ }
+
+ $('th', $tableHead).each(function( column )
+ {
+ if(column>indexSkip){
+ //处ç†ä¸‰ç§æœ‰å¯èƒ½å­˜åœ¨çš„排åºå­—段,比较方法
+ var findSortKey;
+ if( $(this).is('.sort-title') || $(this).is('.sorting_disabled') )
+ {
+ findSortKey = function( $cell )
+ {
+ var cellText = $cell.text();
+ if(isNaN(cellText)){
+ return $cell.text().toUpperCase();
+ }else{
+ return parseFloat(cellText);
+ }
+ //return $cell.text().toUpperCase();
+ }
+ }
+ else if( $(this).is('.sort-date') )
+ {
+ findSortKey = function( $cell )
+ {
+ return Date.parse('1' + $cell.text());
+ }
+ }
+ else if( $(this).is('.sort-price') )
+ {
+ findSortKey = function( $cell )
+ {
+ var key = parseFloat($cell.text().replace(/^[^\d.]*/, ''))
+ return isNaN(key) ? 0 : key;
+ }
+ }
+
+ //排åº
+ if( findSortKey )
+ {
+ $(this).click(function()
+ {
+ $sortOrder = $sortOrder == 0 ? 1 : 0;
+ var tableDataHeadTHs = $tableData.find('th').get();
+
+ if($sortOrder == 1){
+ if($(this).is('.sorting_disabled')){
+ $(this).removeClass('sorting_disabled').addClass('sorting_asc');
+ $(tableDataHeadTHs[column]).removeClass('sorting_disabled').addClass('sorting_asc');
+ }else if($(this).is('.sorting_asc')){
+ $(this).removeClass('sorting_asc').addClass('sorting_desc');
+ $(tableDataHeadTHs[column]).removeClass('sorting_asc').addClass('sorting_desc');
+ }else if($(this).is('.sorting_desc')){
+ $(this).removeClass('sorting_desc').addClass('sorting_asc');
+ $(tableDataHeadTHs[column]).removeClass('sorting_desc').addClass('sorting_asc');
+ }
+ }else{
+ if($(this).is('.sorting_disabled')){
+ $(this).removeClass('sorting_disabled').addClass('sorting_desc');
+ $(tableDataHeadTHs[column]).removeClass('sorting_disabled').addClass('sorting_desc');
+ }else if($(this).is('.sorting_asc')){
+ $(this).removeClass('sorting_asc').addClass('sorting_desc');
+ $(tableDataHeadTHs[column]).removeClass('sorting_asc').addClass('sorting_desc');
+ }else if($(this).is('.sorting_desc')){
+ $(this).removeClass('sorting_desc').addClass('sorting_asc');
+ $(tableDataHeadTHs[column]).removeClass('sorting_desc').addClass('sorting_asc');
+ }
+ }
+ clearSort($(this));
+
+ var rows = $tableData.find('tbody > tr').get();
+
+ $.each( rows, function( index, row )
+ {
+ //先关掉所有行
+ if ( oTable.fnIsOpen(row) )
+ {
+ $(row).find('.row-details').click();
+ }
+ });
+
+ //é‡æ–°å–得所有行,å¦åˆ™æŽ’åºåŽè¡¨æ ¼æ˜¾ç¤ºå¼‚常
+ rows = $tableData.find('tbody > tr').get();
+
+ $.each( rows, function( index, row )
+ {
+ row.sortKey = findSortKey($(row).children('td').eq(column));
+ });
+ //排åºæ–¹æ³•
+ rows.sort(function( a, b )
+ {
+ if( $sortOrder == 1 )
+ {
+ //å‡åº
+ if(a.sortKey < b.sortKey) return -1;
+ if(a.sortKey > b.sortKey) return 1;
+ return 0;
+ }
+ else
+ {
+ //é™åº
+ if(a.sortKey < b.sortKey) return 1;
+ if(a.sortKey > b.sortKey) return -1;
+ return 0;
+ }
+ });
+ //排åºåŽçš„对象添加给$table
+ $.each( rows, function( index, row )
+ {
+ $tableData.children('tbody').append(row);
+ row.sortKey = null;
+ });
+ });
+ }
+ }
+ });
+ }
+
+ var handleRecords = function(requestStr, columns, xsHiddenColumns, smHiddenColumns, oLanguage, openRowFlag, rowCheckable, rowOverFlag, requestURL, requestParameters, tableHeight, columnsTooLong, sTotalRecordsSource, callbackList) {
+
+ /*
+ jQuery.getJSON('/web/newict/framework/thirdparty/data-tables/app-universal-i18n-datatable-' + lang + '.json',
+ function(data) {
+ oLanguage = data;
+ });
+ */
+ grid.setCallbackList(callbackList);
+ grid.setOpenRowFlag(openRowFlag);
+ grid.setRowCheckable(rowCheckable);
+ grid.setRowOverFlag(rowOverFlag);
+ grid.setColumnsTooLong(columnsTooLong);
+ grid.setSTotalRecordsSource(sTotalRecordsSource);
+ grid.setTableHeight(tableHeight);
+ //å–得查询æ¡ä»¶
+// if(!requestStr || requestStr.length == 0){
+// requestStr = JSON.stringify(requestAllData);
+// }
+ grid.clearAjaxParams();
+ grid.addAjaxParam('data', requestStr);
+ //å–得其他å‚æ•°
+ for(var i=0;i<requestParameters.length;i++){
+ grid.addAjaxParam(requestParameters[i].paraId,requestParameters[i].paraValue);
+ }
+
+ grid.init({
+ src: $("#datatable_ajax"),
+ onSuccess: function(grid) {
+ // execute some code after table records loaded
+ var tableWrapper = $('div#datatable_ajax_wrapper');
+ var $tableHead = $('div.dataTables_scrollHeadInner > table.dataTable', tableWrapper);
+ var ths = $tableHead.find('th').get();
+ var $tableData = $('table#datatable_ajax');
+ var tableDataHeadTHs = $tableData.find('th').get();
+ $.each( ths, function( index, th ){
+ //clear all sort direction
+ if($(th).is('.sorting_disabled')){
+ //do nothing;
+ }else if($(th).is('.sorting_asc')){
+ $(th).removeClass('sorting_asc').addClass('sorting_disabled');
+ $(tableDataHeadTHs[index]).removeClass('sorting_asc').addClass('sorting_disabled');
+ }else if($(th).is('.sorting_desc')){
+ $(th).removeClass('sorting_desc').addClass('sorting_disabled');
+ $(tableDataHeadTHs[index]).removeClass('sorting_desc').addClass('sorting_disabled');
+ }
+ });
+
+ },
+ onError: function(grid) {
+ // execute some code on network or other general error
+ },
+ dataTable: {
+ "sDom" : "tr<'row'<'col-md-6 col-sm-12'><'col-md-6 col-sm-12'pli>>", // datatable layout
+ "oLanguage": oLanguage,
+ //"bAutoWidth": true,
+ "sScrollY": tableHeight,
+ "bScrollCollapse": true,
+ "sScrollX": "100%",
+ //"sScrollXInner": "110%",
+ "aLengthMenu": [
+ [20, 50, 100],
+ [20, 50, 100] // change per page values here
+ ],
+ "iDisplayLength": 20, // default record count per page
+ "bServerSide": true, // server side processing
+ "sAjaxSource": requestURL // ajax source
+ }
+ }, columns, xsHiddenColumns, smHiddenColumns, openRowFlag, rowCheckable);
+ }
+
+ /*
+ * Insert a 'details' column to the table
+ */
+ var insertDetails = function (oTable, columns, rowCheckable) {
+
+ var $tableData = $('table#datatable_ajax');
+
+ $tableData.on('click', ' tbody td .row-details', function () {
+ var nTr = $(this).parents('tr')[0];
+ if (oTable.fnIsOpen(nTr)) {
+ /* This row is already open - close it */
+ $(this).addClass("row-details-close").removeClass("row-details-open");
+ oTable.fnClose(nTr);
+ } else {
+ /* Open this row */
+ $(this).addClass("row-details-open").removeClass("row-details-close");
+ oTable.fnOpen(nTr, fnFormatDetails(oTable, nTr, columns, rowCheckable), 'details');
+ //å¡«å……å•å…ƒæ ¼é¢œè‰²
+ var divColor = $("div.cellBackgroundColor", $("table#" + detailTableId));
+ $(divColor).parent().css("background", $(divColor).css("background-color"));
+ }
+ });
+ }
+
+ return {
+
+ //main function to initiate the module
+ init: function (requestStr, lang, configPathPrefix, callbackList) {
+
+ var oLanguage;
+ var columns;
+ var xsHiddenColumns;
+ var smHiddenColumns;
+ var columnsAll;
+
+ var openRowFlag = false;
+ var rowOverFlag = false;
+ var rowCheckable = false;
+ var requestURL="";
+ var requestAllData;
+ var requestParameters;
+
+ var tableHeight;
+ var tableWidth;
+
+ var columnsTooLong;
+ var sTotalRecordsSource="";
+
+ //å–得当å‰é…ç½®åŠå›½é™…化信æ¯
+ $.ajax({
+ dataType: 'json',
+ url: configPathPrefix + '-' + lang + '.json',
+ async: false,
+ contentType:'application/json; charset=utf-8',
+ "success": function(data) {
+ oLanguage = data.language;
+ columns = data.columns;
+ xsHiddenColumns = data.xsHiddenColumns;
+ smHiddenColumns = data.smHiddenColumns;
+ columnsAll = data.columnsAll;
+ openRowFlag = data.openRowFlag == 'true'? true: false;
+ rowOverFlag = data.rowOverFlag == 'true'? true: false;
+ rowCheckable = data.rowCheckable == 'true'? true: false;
+ requestURL = data.requestURL;
+ //requestAllData = data.requestAllData;
+ requestParameters = data.requestParameters;
+ tableHeight = data.tableHeight;
+ tableWidth = data.tableWidth;
+ columnsTooLong = data.columnsTooLong;
+ sTotalRecordsSource = data.sTotalRecordsSource;
+ },
+ "error" : function (xhr, info) {
+ alert('Communication Error! Error reason:' + info);
+ }
+ });
+
+ $('#dataTableWrapperDiv').css('width', tableWidth);
+
+ if(!isContained(xsHiddenColumns, smHiddenColumns) || !isContained(columns, xsHiddenColumns) || !isContained(columnsAll, columns)){
+ alert('Columns claim error: (smHiddenColumns <= xsHiddenColumns <= columns <= columnsAll) Please!');
+ return;
+ }
+
+ generateColumns(columns, openRowFlag, rowCheckable);
+ //initPickers();
+ handleRecords(requestStr, columns, xsHiddenColumns, smHiddenColumns, oLanguage, openRowFlag, rowCheckable, rowOverFlag, requestURL, requestParameters, tableHeight, columnsTooLong, sTotalRecordsSource, callbackList);
+ //获得åˆå§‹åŒ–完毕的DataTable对象
+ var oTable = grid.getDataTable();
+ if(openRowFlag){
+ insertDetails(oTable, columnsAll, rowCheckable);
+ }
+ sortHandling(oTable, openRowFlag, rowCheckable);
+ //oTable.fnAdjustColumnSizing(true);
+ return oTable;
+ }
+
+ };
+
+}();
+
+var DataTableSmartClientApp = function(datas, configPathPrefix, callbackList){
+
+ var requestStr = "";
+ if(datas){
+ requestStr = JSON.stringify(datas);
+ }
+
+ var lang = getLanguage();
+ //lang = 'en-US';
+ /*for(var i=0;i<callbackList.length;i++){
+ if(getFnName(callbackList[i]).indexOf("i18n")>0){
+ callbackList[i](lang);
+ break;
+ }
+ }*/
+ if(callbackList && callbackList[0]){
+ callbackList[0](lang);
+ }
+ //requestStr = "";
+ var oTable = TableAjaxICT.init(requestStr, lang, configPathPrefix, callbackList);
+
+ //é‡æ–°è°ƒèŠ‚列宽以适应window resize
+ $(window).one('resize', function () {
+ //oTable.DataTable.models.oSettings.bAjaxDataGet = false;
+ oTable.fnAdjustColumnSizing(false);
+ } );
+}
diff --git a/common/src/main/webapp/thirdparty/data-tables/app-test-i18n-datatable-zh-CN.json b/common/src/main/webapp/thirdparty/data-tables/app-test-i18n-datatable-zh-CN.json
new file mode 100644
index 0000000..fa20902
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/data-tables/app-test-i18n-datatable-zh-CN.json
@@ -0,0 +1,51 @@
+{
+ "language":{
+ "sProcessing": "<img src='/web/newict/framework/thirdparty/data-tables/images/loading-spinner-grey.gif'/><span>&nbsp;&nbsp;处ç†ä¸­...</span>",
+ "sLengthMenu": "<span class='seperator'>|</span>æ¯é¡µ _MENU_ æ¡ç»“æžœ",
+ "sZeroRecords": "没有匹é…结果",
+ "sInfo": "<span class='seperator'>|</span>总共找到 _TOTAL_ æ¡ç»“æžœ",
+ "sInfoEmpty": "共 0 项",
+ "sGroupActions": "_TOTAL_ æ¡ç»“果被选择: ",
+ "sAjaxRequestGeneralError": "ä¸èƒ½å®Œæˆè¯·æ±‚,请检查您的网络连接情况。",
+ "sEmptyTable": "表中数æ®ä¸ºç©º",
+ "oPaginate": {
+ "sPrevious": "å‰é¡µ",
+ "sNext": "下页",
+ "sPage": "第",
+ "sPageOf": "页,总页数:"
+ }
+ },
+ "columnsAll":[
+ {"columnId":"0", "columnTitle":"开始时间"},
+ {"columnId":"1", "columnTitle":"结æŸæ—¶é—´"},
+ {"columnId":"2", "columnTitle":"查询粒度"},
+ {"columnId":"3", "columnTitle":"网元ä½ç½®"},
+ {"columnId":"4", "columnTitle":"CPU使用率(百分比)"}
+ ],
+ "columns":[
+ {"columnId":"0", "columnTitle":"开始时间"},
+ {"columnId":"1", "columnTitle":"结æŸæ—¶é—´"},
+ {"columnId":"2", "columnTitle":"查询粒度"},
+ {"columnId":"3", "columnTitle":"网元ä½ç½®"},
+ {"columnId":"4", "columnTitle":"CPU使用率(百分比)"}
+ ],
+ "xsHiddenColumns":[
+ ],
+ "smHiddenColumns":[
+ ],
+ "columnsTooLong":["3"],
+
+ "rowCheckable": "true",
+ "openRowFlag" : "false",
+ "rowOverFlag" : "false",
+
+ "tableHeight":"250px",
+ "tableWidth":"100%",
+
+ "requestType": "POST",
+ "requestURL": "/web/rest/web-pm/queryPmPageData",
+ "requestParameters":[
+ ],
+ "sTotalRecordsSource":"response.extData",
+ "sTotalRecords":"108"
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/data-tables/app-universal-i18n-datatable-en-US.json b/common/src/main/webapp/thirdparty/data-tables/app-universal-i18n-datatable-en-US.json
new file mode 100644
index 0000000..809daa3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/data-tables/app-universal-i18n-datatable-en-US.json
@@ -0,0 +1,89 @@
+{
+ "language":{
+ "sProcessing": "<img src='/web/newict/framework/thirdparty/data-tables/images/loading-spinner-grey.gif'/><span>&nbsp;&nbsp;Loading...</span>",
+ "sLengthMenu": "<span class='seperator'>|</span>View _MENU_ records",
+ "sInfo": "<span class='seperator'>|</span>Found total _TOTAL_ records",
+ "sInfoEmpty": "No records found to show",
+ "sGroupActions": "_TOTAL_ records selected: ",
+ "sAjaxRequestGeneralError": "Could not complete request. Please check your internet connection",
+ "sEmptyTable": "No data available in table",
+ "sZeroRecords": "No matching records found",
+ "oPaginate": {
+ "sPrevious": "Prev",
+ "sNext": "Next",
+ "sPage": "Page",
+ "sPageOf": "of"
+ }
+ },
+ "columnsAll":[
+ {"columnId":"alarmId", "columnTitle":"Alarm Id"},
+ {"columnId":"resDisplayName", "columnTitle":"NE"},
+ {"columnId":"moc", "columnTitle":"NE Type"},
+ {"columnId":"alarmRaisedTime", "columnTitle":"Raised Time"},
+ {"columnId":"perceivedSeverity", "columnTitle":"Severity"},
+ {"columnId":"probableCauseDesc", "columnTitle":"Alarm Code"},
+ {"columnId":"additionalText", "columnTitle":"Appendix Text"},
+ {"columnId":"neip", "columnTitle":"NE IP"},
+ {"columnId":"componentname", "columnTitle":"Location"},
+ {"columnId":"alarmType", "columnTitle":"Alarm Type"},
+ {"columnId":"specificproblem", "columnTitle":"Specific Problem"},
+ {"columnId":"ackState", "columnTitle":"Acknowledged State"},
+ {"columnId":"ackTime", "columnTitle":"Acknowledge Time"},
+ {"columnId":"ackUserId", "columnTitle":"Acknowledge User"},
+ {"columnId":"ackSystemId", "columnTitle":"Acknowledge System"},
+ {"columnId":"alarmChangedTime", "columnTitle":"Changed Time"},
+ {"columnId":"position1", "columnTitle":"Resource ID"}
+ ],
+ "columns":[
+ {"columnId":"alarmId", "columnTitle":"Alarm Id"},
+ {"columnId":"resDisplayName", "columnTitle":"NE"},
+ {"columnId":"moc", "columnTitle":"NE Type"},
+ {"columnId":"alarmRaisedTime", "columnTitle":"Raised Time"},
+ {"columnId":"perceivedSeverity", "columnTitle":"Severity"},
+ {"columnId":"probableCauseDesc", "columnTitle":"Alarm Code"},
+ {"columnId":"additionalText", "columnTitle":"Appendix Text"},
+ {"columnId":"neip", "columnTitle":"NE IP"},
+ {"columnId":"componentname", "columnTitle":"Location"},
+ {"columnId":"alarmType", "columnTitle":"Alarm Type"},
+ {"columnId":"specificproblem", "columnTitle":"Specific Problem"},
+ {"columnId":"ackState", "columnTitle":"Acknowledged State"},
+ {"columnId":"ackTime", "columnTitle":"Acknowledge Time"},
+ {"columnId":"ackUserId", "columnTitle":"Acknowledge User"},
+ {"columnId":"ackSystemId", "columnTitle":"Acknowledge System"},
+ {"columnId":"alarmChangedTime", "columnTitle":"Changed Time"},
+ {"columnId":"position1", "columnTitle":"Resource ID"}
+ ],
+ "xsHiddenColumns":[
+ {"columnId":"additionalText", "columnTitle":"Appendix Text"},
+ {"columnId":"neip", "columnTitle":"NE IP"},
+ {"columnId":"componentname", "columnTitle":"Location"},
+ {"columnId":"position1", "columnTitle":"Resource ID"}
+ ],
+ "smHiddenColumns":[
+ {"columnId":"position1", "columnTitle":"Resource ID"}
+ ],
+ "columnsTooLong":["additionalText", "moc", "componentname", "specificproblem", "position1"],
+ "sTotalRecordsSource":"response.extData",
+
+ "rowCheckable": "true",
+ "openRowFlag" : "true",
+ "rowOverFlag" : "true",
+
+ "tableHeight":"520px",
+ "tableWidth":"100%",
+
+ "requestURL": "/web/rest/web/fm/curalarms",
+ "requestParameters":[
+ {"paraId":"pageSize", "paraValue":"20"},
+ {"paraId":"pageNo", "paraValue":"1"},
+ {"paraId":"_operationType", "paraValue":"fetch"},
+ {"paraId":"_startRow", "paraValue":"0"},
+ {"paraId":"_endRow", "paraValue":"75"},
+ {"paraId":"_textMatchStyle", "paraValue":"exact"},
+ {"paraId":"_componentId", "paraValue":"isc_com_zte_ums_aos_fm_view_eventview_table_AlarmTable_0"},
+ {"paraId":"_dataSource", "paraValue":"isc_PageRestDataSource_0"},
+ {"paraId":"isc_metaDataPrefix", "paraValue":"_"},
+ {"paraId":"isc_dataFormat", "paraValue":"json"}
+ ],
+ "sTotalRecordsSource":"response.extData"
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/data-tables/app-universal-i18n-datatable-zh-CN.json b/common/src/main/webapp/thirdparty/data-tables/app-universal-i18n-datatable-zh-CN.json
new file mode 100644
index 0000000..8a270a4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/data-tables/app-universal-i18n-datatable-zh-CN.json
@@ -0,0 +1,90 @@
+{
+ "language":{
+ "sProcessing": "<img src='/web/newict/framework/thirdparty/data-tables/images/loading-spinner-grey.gif'/><span>&nbsp;&nbsp;处ç†ä¸­...</span>",
+ "sLengthMenu": "<span class='seperator'>|</span>æ¯é¡µ _MENU_ æ¡ç»“æžœ",
+ "sZeroRecords": "没有匹é…结果",
+ "sInfo": "<span class='seperator'>|</span>总共找到 _TOTAL_ æ¡ç»“æžœ",
+ "sInfoEmpty": "共 0 项",
+ "sGroupActions": "_TOTAL_ æ¡ç»“果被选择: ",
+ "sAjaxRequestGeneralError": "ä¸èƒ½å®Œæˆè¯·æ±‚,请检查您的网络连接情况。",
+ "sEmptyTable": "表中数æ®ä¸ºç©º",
+ "oPaginate": {
+ "sPrevious": "å‰é¡µ",
+ "sNext": "下页",
+ "sPage": "第",
+ "sPageOf": "页,总页数:"
+ }
+ },
+ "columnsAll":[
+ {"columnId":"alarmId", "columnTitle":"告警编å·"},
+ {"columnId":"resDisplayName", "columnTitle":"网元"},
+ {"columnId":"moc", "columnTitle":"网元类型"},
+ {"columnId":"alarmRaisedTime", "columnTitle":"å‘生时间"},
+ {"columnId":"perceivedSeverity", "columnTitle":"级别"},
+ {"columnId":"probableCauseDesc", "columnTitle":"å‘Šè­¦ç "},
+ {"columnId":"additionalText", "columnTitle":"附加文本"},
+ {"columnId":"neip", "columnTitle":"网元IP"},
+ {"columnId":"componentname", "columnTitle":"网元内定ä½"},
+ {"columnId":"alarmType", "columnTitle":"告警类型"},
+ {"columnId":"specificproblem", "columnTitle":"告警原因"},
+ {"columnId":"ackState", "columnTitle":"确认状æ€"},
+ {"columnId":"ackTime", "columnTitle":"确认时间"},
+ {"columnId":"ackUserId", "columnTitle":"确认用户"},
+ {"columnId":"ackSystemId", "columnTitle":"确认系统"},
+ {"columnId":"alarmChangedTime", "columnTitle":"修改时间"},
+ {"columnId":"position1", "columnTitle":"资æºID"}
+ ],
+ "columns":[
+ {"columnId":"alarmId", "columnTitle":"告警编å·"},
+ {"columnId":"resDisplayName", "columnTitle":"网元"},
+ {"columnId":"moc", "columnTitle":"网元类型"},
+ {"columnId":"alarmRaisedTime", "columnTitle":"å‘生时间"},
+ {"columnId":"perceivedSeverity", "columnTitle":"级别"},
+ {"columnId":"probableCauseDesc", "columnTitle":"å‘Šè­¦ç "},
+ {"columnId":"additionalText", "columnTitle":"附加文本"},
+ {"columnId":"neip", "columnTitle":"网元IP"},
+ {"columnId":"componentname", "columnTitle":"网元内定ä½"},
+ {"columnId":"alarmType", "columnTitle":"告警类型"},
+ {"columnId":"specificproblem", "columnTitle":"告警原因"},
+ {"columnId":"ackState", "columnTitle":"确认状æ€"},
+ {"columnId":"ackTime", "columnTitle":"确认时间"},
+ {"columnId":"ackUserId", "columnTitle":"确认用户"},
+ {"columnId":"ackSystemId", "columnTitle":"确认系统"},
+ {"columnId":"alarmChangedTime", "columnTitle":"修改时间"},
+ {"columnId":"position1", "columnTitle":"资æºID"}
+ ],
+ "xsHiddenColumns":[
+ {"columnId":"additionalText", "columnTitle":"附加文本"},
+ {"columnId":"neip", "columnTitle":"网元IP"},
+ {"columnId":"componentname", "columnTitle":"网元内定ä½"},
+ {"columnId":"position1", "columnTitle":"资æºID"}
+ ],
+ "smHiddenColumns":[
+ {"columnId":"position1", "columnTitle":"资æºID"}
+ ],
+ "columnsTooLong":["additionalText", "moc", "componentname", "specificproblem", "position1"],
+
+ "rowCheckable": "true",
+ "openRowFlag" : "true",
+ "rowOverFlag" : "true",
+
+ "tableHeight":"520px",
+ "tableWidth":"100%",
+
+ "requestURL": "/web/rest/web/fm/curalarms",
+ "requestAllData": {"rule":{"ruleId":-1,"name":"当å‰å‘Šè­¦","creator":"admin","createTime":1397439767310,"modifier":"","modifyTime":0,"description":"","state":true,"ruleType":1,"ruleSort":1,"owner":"","attrs":"<Attrs/>","ruleData":"<CompoundCond><FilterState value='1' /></CompoundCond>"}},
+ "requestParameters":[
+ {"paraId":"pageSize", "paraValue":"20"},
+ {"paraId":"pageNo", "paraValue":"1"},
+ {"paraId":"_operationType", "paraValue":"fetch"},
+ {"paraId":"_startRow", "paraValue":"0"},
+ {"paraId":"_endRow", "paraValue":"75"},
+ {"paraId":"_textMatchStyle", "paraValue":"exact"},
+ {"paraId":"_componentId", "paraValue":"isc_com_zte_ums_aos_fm_view_eventview_table_AlarmTable_0"},
+ {"paraId":"_dataSource", "paraValue":"isc_PageRestDataSource_0"},
+ {"paraId":"isc_metaDataPrefix", "paraValue":"_"},
+ {"paraId":"isc_dataFormat", "paraValue":"json"}
+ ],
+ "sTotalRecordsSource":"response.extData"
+}
+
diff --git a/common/src/main/webapp/thirdparty/data-tables/dataTable.html b/common/src/main/webapp/thirdparty/data-tables/dataTable.html
new file mode 100644
index 0000000..afae5e3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/data-tables/dataTable.html
@@ -0,0 +1,155 @@
+<!-- FOR TEST -->
+<link href="/web/newict/framework/thirdparty/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
+<link href="/web/newict/framework/thirdparty/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
+<link href="/web/newict/framework/thirdparty/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
+<link href="/web/newict/framework/css/style-custom.css" rel="stylesheet" type="text/css"/>
+<link href="/web/newict/framework/css/style.css" rel="stylesheet" type="text/css"/>
+<link href="/web/newict/framework/css/plugins.css" rel="stylesheet" type="text/css"/>
+<link href="/web/newict/framework/thirdparty/data-tables/DT_bootstrap.css" rel="stylesheet" type="text/css"/>
+<!-- FOR TEST -->
+<div id="dataTableWrapperDiv" class="dataTableWrapperDiv" style="overflow: auto; overflow-y: hidden; padding: 0;z-index: 200999;">
+ <div class="col-md-12">
+ <div class="portlet">
+ <div class="portlet-body">
+ <div class="table-container" >
+ <table class="table table-striped table-bordered table-hover" cellpadding="0" cellspacing="0" border="0"id="datatable_ajax" >
+ <thead>
+ <tr role="row" class="heading">
+ </tr>
+ </thead>
+ <tbody></tbody>
+ </table>
+ <div id="divOverlay" style="display:none;Z-INDEX:10000;">
+ <div id="isc_3A" style="POSITION:relative;-webkit-margin-collapse:separate separate;VISIBILITY:inherit;Z-INDEX:1100;CURSOR:default;">&nbsp;
+ <div id="buttonConfirm" role="button" class="buttonConfirm" >
+ <div id="isc_3B" style="POSITION:relative;-webkit-margin-collapse:separate separate;VISIBILITY:inherit;Z-INDEX:201224;CURSOR:default;">
+ <table cellspacing="0" cellpadding="0" width="70" height="22">
+ <tbody>
+ <tr>
+ <td nowrap="true" class="buttonRounded" align="center" valign="center" tabindex="-1" >
+ <table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr>
+ <td class="buttonRounded" style="margin:0px;border:0px;padding:0px;background-image:none;background-color:transparent;-webkit-box-shadow:none;box-shadow:none;font-size:1px;padding-right:6px">
+ <img id="img_acknownledge" src= "/web/res/web-common/comp/skins/EnterpriseBlue/images/Common/web-modulePrivate/fm/aos_acknownledge.gif" width="16" height="16" align="absmiddle" style="vertical-align:middle" name="isc_3Bicon" eventpart="icon" border="0" suppress="TRUE">
+ </td>
+ <td class="buttonRounded" style="margin:0px;border:0px;padding:0px;background-image:none;background-color:transparent;-webkit-box-shadow:none;box-shadow:none;" nowrap="true">
+ <span id="aos_fm_alarm_opeater_ack" name_i18n="com_zte_ums_ict_framework_ui_i18n_fm"></span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ <div id="buttonUnConfirm" role="button" tabindex="1336" class="buttonUnConfirm" >
+ <div id="isc_3D" style="POSITION:relative;-webkit-margin-collapse:separate separate;VISIBILITY:inherit;Z-INDEX:201242;CURSOR:hand;">
+ <table cellspacing="0" cellpadding="0" width="82" height="22">
+ <tbody>
+ <tr>
+ <td nowrap="true" class="buttonRoundedDisabled" align="center" valign="center" tabindex="-1" >
+ <table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr>
+ <td class="buttonRoundedDisabled" style="margin:0px;border:0px;padding:0px;background-image:none;background-color:transparent;-webkit-box-shadow:none;box-shadow:none;font-size:1px;padding-right:6px">
+ <img src="/web/res/web-common/comp/skins/EnterpriseBlue/images/Common/web-modulePrivate/fm/aos_unacknownledge.gif" width="16" height="16" align="absmiddle" style="vertical-align:middle" name="isc_3Dicon" eventpart="icon" border="0" suppress="TRUE">
+ </td>
+ <td class="buttonRoundedDisabled" style="margin:0px;border:0px;padding:0px;background-image:none;background-color:transparent;-webkit-box-shadow:none;box-shadow:none;" nowrap="true">
+ <span id="aos_fm_alarm_opeater_unack" name_i18n="com_zte_ums_ict_framework_ui_i18n_fm"></span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ <div id="buttonDelete" role="button" tabindex="1337" class="buttonDelete" >
+ <div id="isc_3F" style="POSITION:relative;-webkit-margin-collapse:separate separate;VISIBILITY:inherit;Z-INDEX:201260;CURSOR:hand;">
+ <table cellspacing="0" cellpadding="0" width="70" height="22">
+ <tbody>
+ <tr>
+ <td nowrap="true" class="buttonRounded" align="center" valign="center" tabindex="-1" >
+ <table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr>
+ <td class="buttonRounded" style="margin:0px;border:0px;padding:0px;background-image:none;background-color:transparent;-webkit-box-shadow:none;box-shadow:none;font-size:1px;padding-right:6px">
+ <img src="/web/res/web-common/comp/skins/EnterpriseBlue/images/Common/web-common/aos_delete.gif" width="16" height="16" align="absmiddle" style="vertical-align:middle" name="isc_3Ficon" eventpart="icon" border="0" suppress="TRUE">
+ </td>
+ <td class="buttonRounded" style="margin:0px;border:0px;padding:0px;background-image:none;background-color:transparent;-webkit-box-shadow:none;box-shadow:none;" nowrap="true">
+ <span id="aos_fm_alarm_opeater_clean" name_i18n="com_zte_ums_ict_framework_ui_i18n_fm"></span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </div><!-- end of overlap -->
+ <!-- Modal 消除确认对è¯æ¡†-->
+ <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+ <h4 class="modal-title" id="myModalLabel"><span id="aos_fm_SuggestionSetting_dialog_title" name_i18n="com_zte_ums_ict_framework_ui_i18n_fm"></span></h4>
+ </div>
+ <div class="modal-body">
+ <span id="aos_fm_fmalarm_view_confirm_deletedata" name_i18n="com_zte_ums_ict_framework_ui_i18n_fm"></span>
+ </div>
+ <div class="modal-footer">
+ <button id="delConfirm" type="button" class="btn btn-default btn-confirm" data-dismiss="modal"><span id="aos_fm_condition_dialog_ok" name_i18n="com_zte_ums_ict_framework_ui_i18n_fm"></span></button>
+ <button type="button" class="btn btn-primary btn-confirm" data-dismiss="modal"><span id="aos_fm_condition_dialog_cancel" name_i18n="com_zte_ums_ict_framework_ui_i18n_fm"></span></button>
+ </div>
+ </div><!-- /.modal-content -->
+ </div><!-- /.modal-dialog -->
+ </div><!-- /.modal -->
+ <!-- Modal 已确认æ示对è¯æ¡†-->
+ <div class="modal fade" id="myModalConfirm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+ <h4 class="modal-title" id="myModalLabel"><span id="aos_fm_level_title_4" name_i18n="com_zte_ums_ict_framework_ui_i18n_fm"></span></h4>
+ </div>
+ <div class="modal-body">
+ <span id="aos_fm_alarm_title" name_i18n="com_zte_ums_ict_framework_ui_i18n_fm"></span>
+ <span id="alarm_number"></span>
+ <span id="aos_fm_alarm_opeater_ack_already" ></span>
+ </div>
+ <div class="modal-footer">
+ <button id="confirmAlready" type="button" class="btn btn-default btn-confirm" data-dismiss="modal"><span id="aos_fm_condition_dialog_ok" name_i18n="com_zte_ums_ict_framework_ui_i18n_fm"></span></button>
+
+ </div>
+ </div><!-- /.modal-content -->
+ </div><!-- /.modal-dialog -->
+ </div><!-- /.modal -->
+ </div>
+ </div>
+ </div>
+ <!-- End: life time stats -->
+ </div>
+</div>
+<!-- FOR TEST-->
+<script type="text/javascript" src="/web/newict/framework/thirdparty/bootstrap/js/bootstrap.min.js"></script>
+<script type="text/javascript" src="/web/newict/framework/zte/scripts/core/openoFrameWork.min.js"></script>
+<script type="text/javascript" src="/web/newict/framework/thirdparty/uniform/jquery.uniform.min.js"></script>
+<script type="text/javascript" src="/web/newict/framework/thirdparty/data-tables/jquery.dataTables.js"></script>
+<script type="text/javascript" src="/web/newict/framework/thirdparty/data-tables/DT_bootstrap.js"></script>
+<script src="/web/res/web-fm/i18n/jquery.i18n.properties-1.0.9-fm.js"></script>
+<script src="/web/res/web-fm/i18n/loadi18n-fm.js"></script>
+<script>
+var lang = getLanguage();
+//lang = "en-US";
+loadi18n_FM(lang);
+</script>
+<!-- END PAGE LEVEL PLUGINS -->
diff --git a/common/src/main/webapp/thirdparty/data-tables/dataTables.bootstrap.css b/common/src/main/webapp/thirdparty/data-tables/dataTables.bootstrap.css
new file mode 100644
index 0000000..ada85f7
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/data-tables/dataTables.bootstrap.css
@@ -0,0 +1,331 @@
+div.dataTables_length label {
+ font-weight: normal;
+ text-align: left;
+ white-space: nowrap;
+}
+
+div.dataTables_length select {
+ height: 28px;
+ display: inline-block;
+}
+
+div.dataTables_filter {
+ text-align: right;
+}
+
+div.dataTables_filter label {
+ font-weight: normal;
+ white-space: nowrap;
+ text-align: left;
+}
+
+div.dataTables_filter input {
+ margin-left: 0.5em;
+ display: inline-block;
+}
+
+div.dataTables_info {
+ padding-top: 8px;
+ white-space: nowrap;
+}
+
+div.dataTables_paginate {
+ margin: 0;
+ white-space: nowrap;
+ text-align: right;
+}
+
+div.dataTables_paginate ul.pagination {
+ margin: 2px 0;
+ white-space: nowrap;
+}
+
+@media screen and (max-width: 767px) {
+ div.dataTables_length,
+ div.dataTables_filter,
+ div.dataTables_info,
+ div.dataTables_paginate {
+ text-align: center;
+ }
+}
+
+
+table.dataTable td,
+table.dataTable th {
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+}
+
+
+table.dataTable {
+ clear: both;
+ margin-top: 6px !important;
+ margin-bottom: 6px !important;
+ max-width: none !important;
+}
+
+table.dataTable thead .sorting,
+table.dataTable thead .sorting_asc,
+table.dataTable thead .sorting_desc,
+table.dataTable thead .sorting_asc_disabled,
+table.dataTable thead .sorting_desc_disabled {
+ cursor: pointer;
+}
+
+table.dataTable thead .sorting { background: url('../images/sort_both.png') no-repeat center right; }
+table.dataTable thead .sorting_asc { background: url('../images/sort_asc.png') no-repeat center right; }
+table.dataTable thead .sorting_desc { background: url('../images/sort_desc.png') no-repeat center right; }
+
+table.dataTable thead .sorting_asc_disabled { background: url('../images/sort_asc_disabled.png') no-repeat center right; }
+table.dataTable thead .sorting_desc_disabled { background: url('../images/sort_desc_disabled.png') no-repeat center right; }
+
+table.dataTable thead > tr > th {
+ padding-left: 18px;
+ padding-right: 18px;
+}
+
+table.dataTable th:active {
+ outline: none;
+}
+
+/* Scrolling */
+div.dataTables_scrollHead table {
+ margin-bottom: 0 !important;
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0;
+}
+
+div.dataTables_scrollHead table thead tr:last-child th:first-child,
+div.dataTables_scrollHead table thead tr:last-child td:first-child {
+ border-bottom-left-radius: 0 !important;
+ border-bottom-right-radius: 0 !important;
+}
+
+div.dataTables_scrollBody table {
+ border-top: none;
+ margin-top: 0 !important;
+ margin-bottom: 0 !important;
+}
+
+div.dataTables_scrollBody tbody tr:first-child th,
+div.dataTables_scrollBody tbody tr:first-child td {
+ border-top: none;
+}
+
+div.dataTables_scrollFoot table {
+ margin-top: 0 !important;
+ border-top: none;
+}
+
+/* Frustratingly the border-collapse:collapse used by Bootstrap makes the column
+ width calculations when using scrolling impossible to align columns. We have
+ to use separate
+ */
+table.table-bordered.dataTable {
+ border-collapse: separate !important;
+}
+table.table-bordered thead th,
+table.table-bordered thead td {
+ border-left-width: 0;
+ border-top-width: 0;
+}
+table.table-bordered tbody th,
+table.table-bordered tbody td {
+ border-left-width: 0;
+ border-bottom-width: 0;
+}
+table.table-bordered th:last-child,
+table.table-bordered td:last-child {
+ border-right-width: 0;
+}
+div.dataTables_scrollHead table.table-bordered {
+ border-bottom-width: 0;
+}
+
+
+
+
+/*
+ * TableTools styles
+ */
+.table.dataTable tbody tr.active td,
+.table.dataTable tbody tr.active th {
+ background-color: #08C;
+ color: white;
+}
+
+.table.dataTable tbody tr.active:hover td,
+.table.dataTable tbody tr.active:hover th {
+ background-color: #0075b0 !important;
+}
+
+.table.dataTable tbody tr.active th > a,
+.table.dataTable tbody tr.active td > a {
+ color: white;
+}
+
+.table-striped.dataTable tbody tr.active:nth-child(odd) td,
+.table-striped.dataTable tbody tr.active:nth-child(odd) th {
+ background-color: #017ebc;
+}
+
+table.DTTT_selectable tbody tr {
+ cursor: pointer;
+}
+
+div.DTTT .btn:hover {
+ text-decoration: none !important;
+}
+
+ul.DTTT_dropdown.dropdown-menu {
+ z-index: 2003;
+}
+
+ul.DTTT_dropdown.dropdown-menu a {
+ color: #333 !important; /* needed only when demo_page.css is included */
+}
+
+ul.DTTT_dropdown.dropdown-menu li {
+ position: relative;
+}
+
+ul.DTTT_dropdown.dropdown-menu li:hover a {
+ background-color: #0088cc;
+ color: white !important;
+}
+
+div.DTTT_collection_background {
+ z-index: 2002;
+}
+
+/* TableTools information display */
+div.DTTT_print_info {
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ width: 400px;
+ height: 150px;
+ margin-left: -200px;
+ margin-top: -75px;
+ text-align: center;
+ color: #333;
+ padding: 10px 30px;
+ opacity: 0.95;
+
+ background-color: white;
+ border: 1px solid rgba(0, 0, 0, 0.2);
+ border-radius: 6px;
+
+ -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5);
+ box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5);
+}
+
+div.DTTT_print_info h6 {
+ font-weight: normal;
+ font-size: 28px;
+ line-height: 28px;
+ margin: 1em;
+}
+
+div.DTTT_print_info p {
+ font-size: 14px;
+ line-height: 20px;
+}
+
+div.dataTables_processing {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 100%;
+ height: 60px;
+ margin-left: -50%;
+ margin-top: -25px;
+ padding-top: 20px;
+ padding-bottom: 20px;
+ text-align: center;
+ font-size: 1.2em;
+ background-color: white;
+ background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255,255,255,0)), color-stop(25%, rgba(255,255,255,0.9)), color-stop(75%, rgba(255,255,255,0.9)), color-stop(100%, rgba(255,255,255,0)));
+ background: -webkit-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);
+ background: -moz-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);
+ background: -ms-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);
+ background: -o-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);
+ background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);
+}
+
+
+
+/*
+ * FixedColumns styles
+ */
+div.DTFC_LeftHeadWrapper table,
+div.DTFC_LeftFootWrapper table,
+div.DTFC_RightHeadWrapper table,
+div.DTFC_RightFootWrapper table,
+table.DTFC_Cloned tr.even {
+ background-color: white;
+ margin-bottom: 0;
+}
+
+div.DTFC_RightHeadWrapper table ,
+div.DTFC_LeftHeadWrapper table {
+ border-bottom: none !important;
+ margin-bottom: 0 !important;
+ border-top-right-radius: 0 !important;
+ border-bottom-left-radius: 0 !important;
+ border-bottom-right-radius: 0 !important;
+}
+
+div.DTFC_RightHeadWrapper table thead tr:last-child th:first-child,
+div.DTFC_RightHeadWrapper table thead tr:last-child td:first-child,
+div.DTFC_LeftHeadWrapper table thead tr:last-child th:first-child,
+div.DTFC_LeftHeadWrapper table thead tr:last-child td:first-child {
+ border-bottom-left-radius: 0 !important;
+ border-bottom-right-radius: 0 !important;
+}
+
+div.DTFC_RightBodyWrapper table,
+div.DTFC_LeftBodyWrapper table {
+ border-top: none;
+ margin: 0 !important;
+}
+
+div.DTFC_RightBodyWrapper tbody tr:first-child th,
+div.DTFC_RightBodyWrapper tbody tr:first-child td,
+div.DTFC_LeftBodyWrapper tbody tr:first-child th,
+div.DTFC_LeftBodyWrapper tbody tr:first-child td {
+ border-top: none;
+}
+
+div.DTFC_RightFootWrapper table,
+div.DTFC_LeftFootWrapper table {
+ border-top: none;
+ margin-top: 0 !important;
+}
+
+
+/*
+ * FixedHeader styles
+ */
+div.FixedHeader_Cloned table {
+ margin: 0 !important
+}
+
+
+
+
+div.dataTables_length, div.dataTables_info {
+ display: inline;
+}
+
+div.dataTables_paginate {
+ display: inline;
+ float: right !important;
+}
+
+input.pagination-panel-input {
+ width: 50px;
+}
+
+
diff --git a/common/src/main/webapp/thirdparty/data-tables/images/loading-spinner-grey.gif b/common/src/main/webapp/thirdparty/data-tables/images/loading-spinner-grey.gif
new file mode 100644
index 0000000..6d614d3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/data-tables/images/loading-spinner-grey.gif
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/data-tables/images/sort_asc.png b/common/src/main/webapp/thirdparty/data-tables/images/sort_asc.png
new file mode 100644
index 0000000..a88d797
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/data-tables/images/sort_asc.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/data-tables/images/sort_both.png b/common/src/main/webapp/thirdparty/data-tables/images/sort_both.png
new file mode 100644
index 0000000..1867040
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/data-tables/images/sort_both.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/data-tables/images/sort_desc.png b/common/src/main/webapp/thirdparty/data-tables/images/sort_desc.png
new file mode 100644
index 0000000..def071e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/data-tables/images/sort_desc.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/data-tables/jquery.dataTables-1.9.4.js b/common/src/main/webapp/thirdparty/data-tables/jquery.dataTables-1.9.4.js
new file mode 100644
index 0000000..367680d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/data-tables/jquery.dataTables-1.9.4.js
@@ -0,0 +1,12101 @@
+/**
+ * @summary DataTables
+ * @description Paginate, search and sort HTML tables
+ * @version 1.9.4
+ * @file jquery.dataTables.js
+ * @author Allan Jardine (www.sprymedia.co.uk)
+ * @contact www.sprymedia.co.uk/contact
+ *
+ * @copyright Copyright 2008-2012 Allan Jardine, all rights reserved.
+ *
+ * This source file is free software, under either the GPL v2 license or a
+ * BSD style license, available at:
+ * http://datatables.net/license_gpl2
+ * http://datatables.net/license_bsd
+ *
+ * This source file is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
+ *
+ * For details please refer to: http://www.datatables.net
+ */
+
+/*jslint evil: true, undef: true, browser: true */
+/*globals $, jQuery,define,_fnExternApiFunc,_fnInitialise,_fnInitComplete,_fnLanguageCompat,_fnAddColumn,_fnColumnOptions,_fnAddData,_fnCreateTr,_fnGatherData,_fnBuildHead,_fnDrawHead,_fnDraw,_fnReDraw,_fnAjaxUpdate,_fnAjaxParameters,_fnAjaxUpdateDraw,_fnServerParams,_fnAddOptionsHtml,_fnFeatureHtmlTable,_fnScrollDraw,_fnAdjustColumnSizing,_fnFeatureHtmlFilter,_fnFilterComplete,_fnFilterCustom,_fnFilterColumn,_fnFilter,_fnBuildSearchArray,_fnBuildSearchRow,_fnFilterCreateSearch,_fnDataToSearch,_fnSort,_fnSortAttachListener,_fnSortingClasses,_fnFeatureHtmlPaginate,_fnPageChange,_fnFeatureHtmlInfo,_fnUpdateInfo,_fnFeatureHtmlLength,_fnFeatureHtmlProcessing,_fnProcessingDisplay,_fnVisibleToColumnIndex,_fnColumnIndexToVisible,_fnNodeToDataIndex,_fnVisbleColumns,_fnCalculateEnd,_fnConvertToWidth,_fnCalculateColumnWidths,_fnScrollingWidthAdjust,_fnGetWidestNode,_fnGetMaxLenString,_fnStringToCss,_fnDetectType,_fnSettingsFromNode,_fnGetDataMaster,_fnGetTrNodes,_fnGetTdNodes,_fnEscapeRegex,_fnDeleteIndex,_fnReOrderIndex,_fnColumnOrdering,_fnLog,_fnClearTable,_fnSaveState,_fnLoadState,_fnCreateCookie,_fnReadCookie,_fnDetectHeader,_fnGetUniqueThs,_fnScrollBarWidth,_fnApplyToChildren,_fnMap,_fnGetRowData,_fnGetCellData,_fnSetCellData,_fnGetObjectDataFn,_fnSetObjectDataFn,_fnApplyColumnDefs,_fnBindAction,_fnCallbackReg,_fnCallbackFire,_fnJsonString,_fnRender,_fnNodeToColumnIndex,_fnInfoMacros,_fnBrowserDetect,_fnGetColumns*/
+
+(/** @lends <global> */function( window, document, undefined ) {
+
+(function( factory ) {
+ "use strict";
+
+ // Define as an AMD module if possible
+ if ( typeof define === 'function' && define.amd )
+ {
+ define( ['jquery'], factory );
+ }
+ /* Define using browser globals otherwise
+ * Prevent multiple instantiations if the script is loaded twice
+ */
+ else if ( jQuery && !jQuery.fn.dataTable )
+ {
+ factory( jQuery );
+ }
+}
+(/** @lends <global> */function( $ ) {
+ "use strict";
+ /**
+ * DataTables is a plug-in for the jQuery Javascript library. It is a
+ * highly flexible tool, based upon the foundations of progressive
+ * enhancement, which will add advanced interaction controls to any
+ * HTML table. For a full list of features please refer to
+ * <a href="http://datatables.net">DataTables.net</a>.
+ *
+ * Note that the <i>DataTable</i> object is not a global variable but is
+ * aliased to <i>jQuery.fn.DataTable</i> and <i>jQuery.fn.dataTable</i> through which
+ * it may be accessed.
+ *
+ * @class
+ * @param {object} [oInit={}] Configuration object for DataTables. Options
+ * are defined by {@link DataTable.defaults}
+ * @requires jQuery 1.3+
+ *
+ * @example
+ * // Basic initialisation
+ * $(document).ready( function {
+ * $('#example').dataTable();
+ * } );
+ *
+ * @example
+ * // Initialisation with configuration options - in this case, disable
+ * // pagination and sorting.
+ * $(document).ready( function {
+ * $('#example').dataTable( {
+ * "bPaginate": false,
+ * "bSort": false
+ * } );
+ * } );
+ */
+ var DataTable = function( oInit )
+ {
+
+
+ /**
+ * Add a column to the list used for the table with default values
+ * @param {object} oSettings dataTables settings object
+ * @param {node} nTh The th element for this column
+ * @memberof DataTable#oApi
+ */
+ function _fnAddColumn( oSettings, nTh )
+ {
+ var oDefaults = DataTable.defaults.columns;
+ var iCol = oSettings.aoColumns.length;
+ var oCol = $.extend( {}, DataTable.models.oColumn, oDefaults, {
+ "sSortingClass": oSettings.oClasses.sSortable,
+ "sSortingClassJUI": oSettings.oClasses.sSortJUI,
+ "nTh": nTh ? nTh : document.createElement('th'),
+ "sTitle": oDefaults.sTitle ? oDefaults.sTitle : nTh ? nTh.innerHTML : '',
+ "aDataSort": oDefaults.aDataSort ? oDefaults.aDataSort : [iCol],
+ "mData": oDefaults.mData ? oDefaults.oDefaults : iCol
+ } );
+ oSettings.aoColumns.push( oCol );
+
+ /* Add a column specific filter */
+ if ( oSettings.aoPreSearchCols[ iCol ] === undefined || oSettings.aoPreSearchCols[ iCol ] === null )
+ {
+ oSettings.aoPreSearchCols[ iCol ] = $.extend( {}, DataTable.models.oSearch );
+ }
+ else
+ {
+ var oPre = oSettings.aoPreSearchCols[ iCol ];
+
+ /* Don't require that the user must specify bRegex, bSmart or bCaseInsensitive */
+ if ( oPre.bRegex === undefined )
+ {
+ oPre.bRegex = true;
+ }
+
+ if ( oPre.bSmart === undefined )
+ {
+ oPre.bSmart = true;
+ }
+
+ if ( oPre.bCaseInsensitive === undefined )
+ {
+ oPre.bCaseInsensitive = true;
+ }
+ }
+
+ /* Use the column options function to initialise classes etc */
+ _fnColumnOptions( oSettings, iCol, null );
+ }
+
+
+ /**
+ * Apply options for a column
+ * @param {object} oSettings dataTables settings object
+ * @param {int} iCol column index to consider
+ * @param {object} oOptions object with sType, bVisible and bSearchable etc
+ * @memberof DataTable#oApi
+ */
+ function _fnColumnOptions( oSettings, iCol, oOptions )
+ {
+ var oCol = oSettings.aoColumns[ iCol ];
+
+ /* User specified column options */
+ if ( oOptions !== undefined && oOptions !== null )
+ {
+ /* Backwards compatibility for mDataProp */
+ if ( oOptions.mDataProp && !oOptions.mData )
+ {
+ oOptions.mData = oOptions.mDataProp;
+ }
+
+ if ( oOptions.sType !== undefined )
+ {
+ oCol.sType = oOptions.sType;
+ oCol._bAutoType = false;
+ }
+
+ $.extend( oCol, oOptions );
+ _fnMap( oCol, oOptions, "sWidth", "sWidthOrig" );
+
+ /* iDataSort to be applied (backwards compatibility), but aDataSort will take
+ * priority if defined
+ */
+ if ( oOptions.iDataSort !== undefined )
+ {
+ oCol.aDataSort = [ oOptions.iDataSort ];
+ }
+ _fnMap( oCol, oOptions, "aDataSort" );
+ }
+
+ /* Cache the data get and set functions for speed */
+ var mRender = oCol.mRender ? _fnGetObjectDataFn( oCol.mRender ) : null;
+ var mData = _fnGetObjectDataFn( oCol.mData );
+
+ oCol.fnGetData = function (oData, sSpecific) {
+ var innerData = mData( oData, sSpecific );
+
+ if ( oCol.mRender && (sSpecific && sSpecific !== '') )
+ {
+ return mRender( innerData, sSpecific, oData );
+ }
+ return innerData;
+ };
+ oCol.fnSetData = _fnSetObjectDataFn( oCol.mData );
+
+ /* Feature sorting overrides column specific when off */
+ if ( !oSettings.oFeatures.bSort )
+ {
+ oCol.bSortable = false;
+ }
+
+ /* Check that the class assignment is correct for sorting */
+ if ( !oCol.bSortable ||
+ ($.inArray('asc', oCol.asSorting) == -1 && $.inArray('desc', oCol.asSorting) == -1) )
+ {
+ oCol.sSortingClass = oSettings.oClasses.sSortableNone;
+ oCol.sSortingClassJUI = "";
+ }
+ else if ( $.inArray('asc', oCol.asSorting) == -1 && $.inArray('desc', oCol.asSorting) == -1 )
+ {
+ oCol.sSortingClass = oSettings.oClasses.sSortable;
+ oCol.sSortingClassJUI = oSettings.oClasses.sSortJUI;
+ }
+ else if ( $.inArray('asc', oCol.asSorting) != -1 && $.inArray('desc', oCol.asSorting) == -1 )
+ {
+ oCol.sSortingClass = oSettings.oClasses.sSortableAsc;
+ oCol.sSortingClassJUI = oSettings.oClasses.sSortJUIAscAllowed;
+ }
+ else if ( $.inArray('asc', oCol.asSorting) == -1 && $.inArray('desc', oCol.asSorting) != -1 )
+ {
+ oCol.sSortingClass = oSettings.oClasses.sSortableDesc;
+ oCol.sSortingClassJUI = oSettings.oClasses.sSortJUIDescAllowed;
+ }
+ }
+
+
+ /**
+ * Adjust the table column widths for new data. Note: you would probably want to
+ * do a redraw after calling this function!
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnAdjustColumnSizing ( oSettings )
+ {
+ /* Not interested in doing column width calculation if auto-width is disabled */
+ if ( oSettings.oFeatures.bAutoWidth === false )
+ {
+ return false;
+ }
+
+ _fnCalculateColumnWidths( oSettings );
+ for ( var i=0 , iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
+ {
+ oSettings.aoColumns[i].nTh.style.width = oSettings.aoColumns[i].sWidth;
+ }
+ }
+
+
+ /**
+ * Covert the index of a visible column to the index in the data array (take account
+ * of hidden columns)
+ * @param {object} oSettings dataTables settings object
+ * @param {int} iMatch Visible column index to lookup
+ * @returns {int} i the data index
+ * @memberof DataTable#oApi
+ */
+ function _fnVisibleToColumnIndex( oSettings, iMatch )
+ {
+ var aiVis = _fnGetColumns( oSettings, 'bVisible' );
+
+ return typeof aiVis[iMatch] === 'number' ?
+ aiVis[iMatch] :
+ null;
+ }
+
+
+ /**
+ * Covert the index of an index in the data array and convert it to the visible
+ * column index (take account of hidden columns)
+ * @param {int} iMatch Column index to lookup
+ * @param {object} oSettings dataTables settings object
+ * @returns {int} i the data index
+ * @memberof DataTable#oApi
+ */
+ function _fnColumnIndexToVisible( oSettings, iMatch )
+ {
+ var aiVis = _fnGetColumns( oSettings, 'bVisible' );
+ var iPos = $.inArray( iMatch, aiVis );
+
+ return iPos !== -1 ? iPos : null;
+ }
+
+
+ /**
+ * Get the number of visible columns
+ * @param {object} oSettings dataTables settings object
+ * @returns {int} i the number of visible columns
+ * @memberof DataTable#oApi
+ */
+ function _fnVisbleColumns( oSettings )
+ {
+ return _fnGetColumns( oSettings, 'bVisible' ).length;
+ }
+
+
+ /**
+ * Get an array of column indexes that match a given property
+ * @param {object} oSettings dataTables settings object
+ * @param {string} sParam Parameter in aoColumns to look for - typically
+ * bVisible or bSearchable
+ * @returns {array} Array of indexes with matched properties
+ * @memberof DataTable#oApi
+ */
+ function _fnGetColumns( oSettings, sParam )
+ {
+ var a = [];
+
+ $.map( oSettings.aoColumns, function(val, i) {
+ if ( val[sParam] ) {
+ a.push( i );
+ }
+ } );
+
+ return a;
+ }
+
+
+ /**
+ * Get the sort type based on an input string
+ * @param {string} sData data we wish to know the type of
+ * @returns {string} type (defaults to 'string' if no type can be detected)
+ * @memberof DataTable#oApi
+ */
+ function _fnDetectType( sData )
+ {
+ var aTypes = DataTable.ext.aTypes;
+ var iLen = aTypes.length;
+
+ for ( var i=0 ; i<iLen ; i++ )
+ {
+ var sType = aTypes[i]( sData );
+ if ( sType !== null )
+ {
+ return sType;
+ }
+ }
+
+ return 'string';
+ }
+
+
+ /**
+ * Figure out how to reorder a display list
+ * @param {object} oSettings dataTables settings object
+ * @returns array {int} aiReturn index list for reordering
+ * @memberof DataTable#oApi
+ */
+ function _fnReOrderIndex ( oSettings, sColumns )
+ {
+ var aColumns = sColumns.split(',');
+ var aiReturn = [];
+
+ for ( var i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
+ {
+ for ( var j=0 ; j<iLen ; j++ )
+ {
+ if ( oSettings.aoColumns[i].sName == aColumns[j] )
+ {
+ aiReturn.push( j );
+ break;
+ }
+ }
+ }
+
+ return aiReturn;
+ }
+
+
+ /**
+ * Get the column ordering that DataTables expects
+ * @param {object} oSettings dataTables settings object
+ * @returns {string} comma separated list of names
+ * @memberof DataTable#oApi
+ */
+ function _fnColumnOrdering ( oSettings )
+ {
+ var sNames = '';
+ for ( var i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
+ {
+ sNames += oSettings.aoColumns[i].sName+',';
+ }
+ if ( sNames.length == iLen )
+ {
+ return "";
+ }
+ return sNames.slice(0, -1);
+ }
+
+
+ /**
+ * Take the column definitions and static columns arrays and calculate how
+ * they relate to column indexes. The callback function will then apply the
+ * definition found for a column to a suitable configuration object.
+ * @param {object} oSettings dataTables settings object
+ * @param {array} aoColDefs The aoColumnDefs array that is to be applied
+ * @param {array} aoCols The aoColumns array that defines columns individually
+ * @param {function} fn Callback function - takes two parameters, the calculated
+ * column index and the definition for that column.
+ * @memberof DataTable#oApi
+ */
+ function _fnApplyColumnDefs( oSettings, aoColDefs, aoCols, fn )
+ {
+ var i, iLen, j, jLen, k, kLen;
+
+ // Column definitions with aTargets
+ if ( aoColDefs )
+ {
+ /* Loop over the definitions array - loop in reverse so first instance has priority */
+ for ( i=aoColDefs.length-1 ; i>=0 ; i-- )
+ {
+ /* Each definition can target multiple columns, as it is an array */
+ var aTargets = aoColDefs[i].aTargets;
+ if ( !$.isArray( aTargets ) )
+ {
+ _fnLog( oSettings, 1, 'aTargets must be an array of targets, not a '+(typeof aTargets) );
+ }
+
+ for ( j=0, jLen=aTargets.length ; j<jLen ; j++ )
+ {
+ if ( typeof aTargets[j] === 'number' && aTargets[j] >= 0 )
+ {
+ /* Add columns that we don't yet know about */
+ while( oSettings.aoColumns.length <= aTargets[j] )
+ {
+ _fnAddColumn( oSettings );
+ }
+
+ /* Integer, basic index */
+ fn( aTargets[j], aoColDefs[i] );
+ }
+ else if ( typeof aTargets[j] === 'number' && aTargets[j] < 0 )
+ {
+ /* Negative integer, right to left column counting */
+ fn( oSettings.aoColumns.length+aTargets[j], aoColDefs[i] );
+ }
+ else if ( typeof aTargets[j] === 'string' )
+ {
+ /* Class name matching on TH element */
+ for ( k=0, kLen=oSettings.aoColumns.length ; k<kLen ; k++ )
+ {
+ if ( aTargets[j] == "_all" ||
+ $(oSettings.aoColumns[k].nTh).hasClass( aTargets[j] ) )
+ {
+ fn( k, aoColDefs[i] );
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // Statically defined columns array
+ if ( aoCols )
+ {
+ for ( i=0, iLen=aoCols.length ; i<iLen ; i++ )
+ {
+ fn( i, aoCols[i] );
+ }
+ }
+ }
+
+ /**
+ * Add a data array to the table, creating DOM node etc. This is the parallel to
+ * _fnGatherData, but for adding rows from a Javascript source, rather than a
+ * DOM source.
+ * @param {object} oSettings dataTables settings object
+ * @param {array} aData data array to be added
+ * @returns {int} >=0 if successful (index of new aoData entry), -1 if failed
+ * @memberof DataTable#oApi
+ */
+ function _fnAddData ( oSettings, aDataSupplied )
+ {
+ var oCol;
+
+ /* Take an independent copy of the data source so we can bash it about as we wish */
+ var aDataIn = ($.isArray(aDataSupplied)) ?
+ aDataSupplied.slice() :
+ $.extend( true, {}, aDataSupplied );
+
+ /* Create the object for storing information about this new row */
+ var iRow = oSettings.aoData.length;
+ var oData = $.extend( true, {}, DataTable.models.oRow );
+ oData._aData = aDataIn;
+ oSettings.aoData.push( oData );
+
+ /* Create the cells */
+ var nTd, sThisType;
+ for ( var i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
+ {
+ oCol = oSettings.aoColumns[i];
+
+ /* Use rendered data for filtering / sorting */
+ if ( typeof oCol.fnRender === 'function' && oCol.bUseRendered && oCol.mData !== null )
+ {
+ _fnSetCellData( oSettings, iRow, i, _fnRender(oSettings, iRow, i) );
+ }
+ else
+ {
+ _fnSetCellData( oSettings, iRow, i, _fnGetCellData( oSettings, iRow, i ) );
+ }
+
+ /* See if we should auto-detect the column type */
+ if ( oCol._bAutoType && oCol.sType != 'string' )
+ {
+ /* Attempt to auto detect the type - same as _fnGatherData() */
+ var sVarType = _fnGetCellData( oSettings, iRow, i, 'type' );
+ if ( sVarType !== null && sVarType !== '' )
+ {
+ sThisType = _fnDetectType( sVarType );
+ if ( oCol.sType === null )
+ {
+ oCol.sType = sThisType;
+ }
+ else if ( oCol.sType != sThisType && oCol.sType != "html" )
+ {
+ /* String is always the 'fallback' option */
+ oCol.sType = 'string';
+ }
+ }
+ }
+ }
+
+ /* Add to the display array */
+ oSettings.aiDisplayMaster.push( iRow );
+
+ /* Create the DOM information */
+ if ( !oSettings.oFeatures.bDeferRender )
+ {
+ _fnCreateTr( oSettings, iRow );
+ }
+
+ return iRow;
+ }
+
+
+ /**
+ * Read in the data from the target table from the DOM
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnGatherData( oSettings )
+ {
+ var iLoop, i, iLen, j, jLen, jInner,
+ nTds, nTrs, nTd, nTr, aLocalData, iThisIndex,
+ iRow, iRows, iColumn, iColumns, sNodeName,
+ oCol, oData;
+
+ /*
+ * Process by row first
+ * Add the data object for the whole table - storing the tr node. Note - no point in getting
+ * DOM based data if we are going to go and replace it with Ajax source data.
+ */
+ if ( oSettings.bDeferLoading || oSettings.sAjaxSource === null )
+ {
+ nTr = oSettings.nTBody.firstChild;
+ while ( nTr )
+ {
+ if ( nTr.nodeName.toUpperCase() == "TR" )
+ {
+ iThisIndex = oSettings.aoData.length;
+ nTr._DT_RowIndex = iThisIndex;
+ oSettings.aoData.push( $.extend( true, {}, DataTable.models.oRow, {
+ "nTr": nTr
+ } ) );
+
+ oSettings.aiDisplayMaster.push( iThisIndex );
+ nTd = nTr.firstChild;
+ jInner = 0;
+ while ( nTd )
+ {
+ sNodeName = nTd.nodeName.toUpperCase();
+ if ( sNodeName == "TD" || sNodeName == "TH" )
+ {
+ _fnSetCellData( oSettings, iThisIndex, jInner, $.trim(nTd.innerHTML) );
+ jInner++;
+ }
+ nTd = nTd.nextSibling;
+ }
+ }
+ nTr = nTr.nextSibling;
+ }
+ }
+
+ /* Gather in the TD elements of the Table - note that this is basically the same as
+ * fnGetTdNodes, but that function takes account of hidden columns, which we haven't yet
+ * setup!
+ */
+ nTrs = _fnGetTrNodes( oSettings );
+ nTds = [];
+ for ( i=0, iLen=nTrs.length ; i<iLen ; i++ )
+ {
+ nTd = nTrs[i].firstChild;
+ while ( nTd )
+ {
+ sNodeName = nTd.nodeName.toUpperCase();
+ if ( sNodeName == "TD" || sNodeName == "TH" )
+ {
+ nTds.push( nTd );
+ }
+ nTd = nTd.nextSibling;
+ }
+ }
+
+ /* Now process by column */
+ for ( iColumn=0, iColumns=oSettings.aoColumns.length ; iColumn<iColumns ; iColumn++ )
+ {
+ oCol = oSettings.aoColumns[iColumn];
+
+ /* Get the title of the column - unless there is a user set one */
+ if ( oCol.sTitle === null )
+ {
+ oCol.sTitle = oCol.nTh.innerHTML;
+ }
+
+ var
+ bAutoType = oCol._bAutoType,
+ bRender = typeof oCol.fnRender === 'function',
+ bClass = oCol.sClass !== null,
+ bVisible = oCol.bVisible,
+ nCell, sThisType, sRendered, sValType;
+
+ /* A single loop to rule them all (and be more efficient) */
+ if ( bAutoType || bRender || bClass || !bVisible )
+ {
+ for ( iRow=0, iRows=oSettings.aoData.length ; iRow<iRows ; iRow++ )
+ {
+ oData = oSettings.aoData[iRow];
+ nCell = nTds[ (iRow*iColumns) + iColumn ];
+
+ /* Type detection */
+ if ( bAutoType && oCol.sType != 'string' )
+ {
+ sValType = _fnGetCellData( oSettings, iRow, iColumn, 'type' );
+ if ( sValType !== '' )
+ {
+ sThisType = _fnDetectType( sValType );
+ if ( oCol.sType === null )
+ {
+ oCol.sType = sThisType;
+ }
+ else if ( oCol.sType != sThisType &&
+ oCol.sType != "html" )
+ {
+ /* String is always the 'fallback' option */
+ oCol.sType = 'string';
+ }
+ }
+ }
+
+ if ( oCol.mRender )
+ {
+ // mRender has been defined, so we need to get the value and set it
+ nCell.innerHTML = _fnGetCellData( oSettings, iRow, iColumn, 'display' );
+ }
+ else if ( oCol.mData !== iColumn )
+ {
+ // If mData is not the same as the column number, then we need to
+ // get the dev set value. If it is the column, no point in wasting
+ // time setting the value that is already there!
+ nCell.innerHTML = _fnGetCellData( oSettings, iRow, iColumn, 'display' );
+ }
+
+ /* Rendering */
+ if ( bRender )
+ {
+ sRendered = _fnRender( oSettings, iRow, iColumn );
+ nCell.innerHTML = sRendered;
+ if ( oCol.bUseRendered )
+ {
+ /* Use the rendered data for filtering / sorting */
+ _fnSetCellData( oSettings, iRow, iColumn, sRendered );
+ }
+ }
+
+ /* Classes */
+ if ( bClass )
+ {
+ nCell.className += ' '+oCol.sClass;
+ }
+
+ /* Column visibility */
+ if ( !bVisible )
+ {
+ oData._anHidden[iColumn] = nCell;
+ nCell.parentNode.removeChild( nCell );
+ }
+ else
+ {
+ oData._anHidden[iColumn] = null;
+ }
+
+ if ( oCol.fnCreatedCell )
+ {
+ oCol.fnCreatedCell.call( oSettings.oInstance,
+ nCell, _fnGetCellData( oSettings, iRow, iColumn, 'display' ), oData._aData, iRow, iColumn
+ );
+ }
+ }
+ }
+ }
+
+ /* Row created callbacks */
+ if ( oSettings.aoRowCreatedCallback.length !== 0 )
+ {
+ for ( i=0, iLen=oSettings.aoData.length ; i<iLen ; i++ )
+ {
+ oData = oSettings.aoData[i];
+ _fnCallbackFire( oSettings, 'aoRowCreatedCallback', null, [oData.nTr, oData._aData, i] );
+ }
+ }
+ }
+
+
+ /**
+ * Take a TR element and convert it to an index in aoData
+ * @param {object} oSettings dataTables settings object
+ * @param {node} n the TR element to find
+ * @returns {int} index if the node is found, null if not
+ * @memberof DataTable#oApi
+ */
+ function _fnNodeToDataIndex( oSettings, n )
+ {
+ return (n._DT_RowIndex!==undefined) ? n._DT_RowIndex : null;
+ }
+
+
+ /**
+ * Take a TD element and convert it into a column data index (not the visible index)
+ * @param {object} oSettings dataTables settings object
+ * @param {int} iRow The row number the TD/TH can be found in
+ * @param {node} n The TD/TH element to find
+ * @returns {int} index if the node is found, -1 if not
+ * @memberof DataTable#oApi
+ */
+ function _fnNodeToColumnIndex( oSettings, iRow, n )
+ {
+ var anCells = _fnGetTdNodes( oSettings, iRow );
+
+ for ( var i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
+ {
+ if ( anCells[i] === n )
+ {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+
+ /**
+ * Get an array of data for a given row from the internal data cache
+ * @param {object} oSettings dataTables settings object
+ * @param {int} iRow aoData row id
+ * @param {string} sSpecific data get type ('type' 'filter' 'sort')
+ * @param {array} aiColumns Array of column indexes to get data from
+ * @returns {array} Data array
+ * @memberof DataTable#oApi
+ */
+ function _fnGetRowData( oSettings, iRow, sSpecific, aiColumns )
+ {
+ var out = [];
+ for ( var i=0, iLen=aiColumns.length ; i<iLen ; i++ )
+ {
+ out.push( _fnGetCellData( oSettings, iRow, aiColumns[i], sSpecific ) );
+ }
+ return out;
+ }
+
+
+ /**
+ * Get the data for a given cell from the internal cache, taking into account data mapping
+ * @param {object} oSettings dataTables settings object
+ * @param {int} iRow aoData row id
+ * @param {int} iCol Column index
+ * @param {string} sSpecific data get type ('display', 'type' 'filter' 'sort')
+ * @returns {*} Cell data
+ * @memberof DataTable#oApi
+ */
+ function _fnGetCellData( oSettings, iRow, iCol, sSpecific )
+ {
+ var sData;
+ var oCol = oSettings.aoColumns[iCol];
+ var oData = oSettings.aoData[iRow]._aData;
+
+ if ( (sData=oCol.fnGetData( oData, sSpecific )) === undefined )
+ {
+ if ( oSettings.iDrawError != oSettings.iDraw && oCol.sDefaultContent === null )
+ {
+ _fnLog( oSettings, 1, "Requested unknown parameter "+
+ (typeof oCol.mData=='function' ? '{mData function}' : "'"+oCol.mData+"'")+
+ " from the data source for row "+iRow );
+ oSettings.iDrawError = oSettings.iDraw;
+ }
+ return oCol.sDefaultContent;
+ }
+
+ /* When the data source is null, we can use default column data */
+ if ( sData === null && oCol.sDefaultContent !== null )
+ {
+ sData = oCol.sDefaultContent;
+ }
+ else if ( typeof sData === 'function' )
+ {
+ /* If the data source is a function, then we run it and use the return */
+ return sData();
+ }
+
+ if ( sSpecific == 'display' && sData === null )
+ {
+ return '';
+ }
+ return sData;
+ }
+
+
+ /**
+ * Set the value for a specific cell, into the internal data cache
+ * @param {object} oSettings dataTables settings object
+ * @param {int} iRow aoData row id
+ * @param {int} iCol Column index
+ * @param {*} val Value to set
+ * @memberof DataTable#oApi
+ */
+ function _fnSetCellData( oSettings, iRow, iCol, val )
+ {
+ var oCol = oSettings.aoColumns[iCol];
+ var oData = oSettings.aoData[iRow]._aData;
+
+ oCol.fnSetData( oData, val );
+ }
+
+
+ // Private variable that is used to match array syntax in the data property object
+ var __reArray = /\[.*?\]$/;
+
+ /**
+ * Return a function that can be used to get data from a source object, taking
+ * into account the ability to use nested objects as a source
+ * @param {string|int|function} mSource The data source for the object
+ * @returns {function} Data get function
+ * @memberof DataTable#oApi
+ */
+ function _fnGetObjectDataFn( mSource )
+ {
+ if ( mSource === null )
+ {
+ /* Give an empty string for rendering / sorting etc */
+ return function (data, type) {
+ return null;
+ };
+ }
+ else if ( typeof mSource === 'function' )
+ {
+ return function (data, type, extra) {
+ return mSource( data, type, extra );
+ };
+ }
+ else if ( typeof mSource === 'string' && (mSource.indexOf('.') !== -1 || mSource.indexOf('[') !== -1) )
+ {
+ /* If there is a . in the source string then the data source is in a
+ * nested object so we loop over the data for each level to get the next
+ * level down. On each loop we test for undefined, and if found immediately
+ * return. This allows entire objects to be missing and sDefaultContent to
+ * be used if defined, rather than throwing an error
+ */
+ var fetchData = function (data, type, src) {
+ var a = src.split('.');
+ var arrayNotation, out, innerSrc;
+
+ if ( src !== "" )
+ {
+ for ( var i=0, iLen=a.length ; i<iLen ; i++ )
+ {
+ // Check if we are dealing with an array notation request
+ arrayNotation = a[i].match(__reArray);
+
+ if ( arrayNotation ) {
+ a[i] = a[i].replace(__reArray, '');
+
+ // Condition allows simply [] to be passed in
+ if ( a[i] !== "" ) {
+ data = data[ a[i] ];
+ }
+ out = [];
+
+ // Get the remainder of the nested object to get
+ a.splice( 0, i+1 );
+ innerSrc = a.join('.');
+
+ // Traverse each entry in the array getting the properties requested
+ for ( var j=0, jLen=data.length ; j<jLen ; j++ ) {
+ out.push( fetchData( data[j], type, innerSrc ) );
+ }
+
+ // If a string is given in between the array notation indicators, that
+ // is used to join the strings together, otherwise an array is returned
+ var join = arrayNotation[0].substring(1, arrayNotation[0].length-1);
+ data = (join==="") ? out : out.join(join);
+
+ // The inner call to fetchData has already traversed through the remainder
+ // of the source requested, so we exit from the loop
+ break;
+ }
+
+ if ( data === null || data[ a[i] ] === undefined )
+ {
+ return undefined;
+ }
+ data = data[ a[i] ];
+ }
+ }
+
+ return data;
+ };
+
+ return function (data, type) {
+ return fetchData( data, type, mSource );
+ };
+ }
+ else
+ {
+ /* Array or flat object mapping */
+ return function (data, type) {
+ return data[mSource];
+ };
+ }
+ }
+
+
+ /**
+ * Return a function that can be used to set data from a source object, taking
+ * into account the ability to use nested objects as a source
+ * @param {string|int|function} mSource The data source for the object
+ * @returns {function} Data set function
+ * @memberof DataTable#oApi
+ */
+ function _fnSetObjectDataFn( mSource )
+ {
+ if ( mSource === null )
+ {
+ /* Nothing to do when the data source is null */
+ return function (data, val) {};
+ }
+ else if ( typeof mSource === 'function' )
+ {
+ return function (data, val) {
+ mSource( data, 'set', val );
+ };
+ }
+ else if ( typeof mSource === 'string' && (mSource.indexOf('.') !== -1 || mSource.indexOf('[') !== -1) )
+ {
+ /* Like the get, we need to get data from a nested object */
+ var setData = function (data, val, src) {
+ var a = src.split('.'), b;
+ var arrayNotation, o, innerSrc;
+
+ for ( var i=0, iLen=a.length-1 ; i<iLen ; i++ )
+ {
+ // Check if we are dealing with an array notation request
+ arrayNotation = a[i].match(__reArray);
+
+ if ( arrayNotation )
+ {
+ a[i] = a[i].replace(__reArray, '');
+ data[ a[i] ] = [];
+
+ // Get the remainder of the nested object to set so we can recurse
+ b = a.slice();
+ b.splice( 0, i+1 );
+ innerSrc = b.join('.');
+
+ // Traverse each entry in the array setting the properties requested
+ for ( var j=0, jLen=val.length ; j<jLen ; j++ )
+ {
+ o = {};
+ setData( o, val[j], innerSrc );
+ data[ a[i] ].push( o );
+ }
+
+ // The inner call to setData has already traversed through the remainder
+ // of the source and has set the data, thus we can exit here
+ return;
+ }
+
+ // If the nested object doesn't currently exist - since we are
+ // trying to set the value - create it
+ if ( data[ a[i] ] === null || data[ a[i] ] === undefined )
+ {
+ data[ a[i] ] = {};
+ }
+ data = data[ a[i] ];
+ }
+
+ // If array notation is used, we just want to strip it and use the property name
+ // and assign the value. If it isn't used, then we get the result we want anyway
+ data[ a[a.length-1].replace(__reArray, '') ] = val;
+ };
+
+ return function (data, val) {
+ return setData( data, val, mSource );
+ };
+ }
+ else
+ {
+ /* Array or flat object mapping */
+ return function (data, val) {
+ data[mSource] = val;
+ };
+ }
+ }
+
+
+ /**
+ * Return an array with the full table data
+ * @param {object} oSettings dataTables settings object
+ * @returns array {array} aData Master data array
+ * @memberof DataTable#oApi
+ */
+ function _fnGetDataMaster ( oSettings )
+ {
+ var aData = [];
+ var iLen = oSettings.aoData.length;
+ for ( var i=0 ; i<iLen; i++ )
+ {
+ aData.push( oSettings.aoData[i]._aData );
+ }
+ return aData;
+ }
+
+
+ /**
+ * Nuke the table
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnClearTable( oSettings )
+ {
+ oSettings.aoData.splice( 0, oSettings.aoData.length );
+ oSettings.aiDisplayMaster.splice( 0, oSettings.aiDisplayMaster.length );
+ oSettings.aiDisplay.splice( 0, oSettings.aiDisplay.length );
+ _fnCalculateEnd( oSettings );
+ }
+
+
+ /**
+ * Take an array of integers (index array) and remove a target integer (value - not
+ * the key!)
+ * @param {array} a Index array to target
+ * @param {int} iTarget value to find
+ * @memberof DataTable#oApi
+ */
+ function _fnDeleteIndex( a, iTarget )
+ {
+ var iTargetIndex = -1;
+
+ for ( var i=0, iLen=a.length ; i<iLen ; i++ )
+ {
+ if ( a[i] == iTarget )
+ {
+ iTargetIndex = i;
+ }
+ else if ( a[i] > iTarget )
+ {
+ a[i]--;
+ }
+ }
+
+ if ( iTargetIndex != -1 )
+ {
+ a.splice( iTargetIndex, 1 );
+ }
+ }
+
+
+ /**
+ * Call the developer defined fnRender function for a given cell (row/column) with
+ * the required parameters and return the result.
+ * @param {object} oSettings dataTables settings object
+ * @param {int} iRow aoData index for the row
+ * @param {int} iCol aoColumns index for the column
+ * @returns {*} Return of the developer's fnRender function
+ * @memberof DataTable#oApi
+ */
+ function _fnRender( oSettings, iRow, iCol )
+ {
+ var oCol = oSettings.aoColumns[iCol];
+
+ return oCol.fnRender( {
+ "iDataRow": iRow,
+ "iDataColumn": iCol,
+ "oSettings": oSettings,
+ "aData": oSettings.aoData[iRow]._aData,
+ "mDataProp": oCol.mData
+ }, _fnGetCellData(oSettings, iRow, iCol, 'display') );
+ }
+ /**
+ * Create a new TR element (and it's TD children) for a row
+ * @param {object} oSettings dataTables settings object
+ * @param {int} iRow Row to consider
+ * @memberof DataTable#oApi
+ */
+ function _fnCreateTr ( oSettings, iRow )
+ {
+ var oData = oSettings.aoData[iRow];
+ var nTd;
+
+ if ( oData.nTr === null )
+ {
+ oData.nTr = document.createElement('tr');
+
+ /* Use a private property on the node to allow reserve mapping from the node
+ * to the aoData array for fast look up
+ */
+ oData.nTr._DT_RowIndex = iRow;
+
+ /* Special parameters can be given by the data source to be used on the row */
+ if ( oData._aData.DT_RowId )
+ {
+ oData.nTr.id = oData._aData.DT_RowId;
+ }
+
+ if ( oData._aData.DT_RowClass )
+ {
+ oData.nTr.className = oData._aData.DT_RowClass;
+ }
+
+ /* Process each column */
+ for ( var i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
+ {
+ var oCol = oSettings.aoColumns[i];
+ nTd = document.createElement( oCol.sCellType );
+
+ /* Render if needed - if bUseRendered is true then we already have the rendered
+ * value in the data source - so can just use that
+ */
+ nTd.innerHTML = (typeof oCol.fnRender === 'function' && (!oCol.bUseRendered || oCol.mData === null)) ?
+ _fnRender( oSettings, iRow, i ) :
+ _fnGetCellData( oSettings, iRow, i, 'display' );
+
+ /* Add user defined class */
+ if ( oCol.sClass !== null )
+ {
+ nTd.className = oCol.sClass;
+ }
+
+ if ( oCol.bVisible )
+ {
+ oData.nTr.appendChild( nTd );
+ oData._anHidden[i] = null;
+ }
+ else
+ {
+ oData._anHidden[i] = nTd;
+ }
+
+ if ( oCol.fnCreatedCell )
+ {
+ oCol.fnCreatedCell.call( oSettings.oInstance,
+ nTd, _fnGetCellData( oSettings, iRow, i, 'display' ), oData._aData, iRow, i
+ );
+ }
+ }
+
+ _fnCallbackFire( oSettings, 'aoRowCreatedCallback', null, [oData.nTr, oData._aData, iRow] );
+ }
+ }
+
+
+ /**
+ * Create the HTML header for the table
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnBuildHead( oSettings )
+ {
+ var i, nTh, iLen, j, jLen;
+ var iThs = $('th, td', oSettings.nTHead).length;
+ var iCorrector = 0;
+ var jqChildren;
+
+ /* If there is a header in place - then use it - otherwise it's going to get nuked... */
+ if ( iThs !== 0 )
+ {
+ /* We've got a thead from the DOM, so remove hidden columns and apply width to vis cols */
+ for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
+ {
+ nTh = oSettings.aoColumns[i].nTh;
+ nTh.setAttribute('role', 'columnheader');
+ if ( oSettings.aoColumns[i].bSortable )
+ {
+ nTh.setAttribute('tabindex', oSettings.iTabIndex);
+ nTh.setAttribute('aria-controls', oSettings.sTableId);
+ }
+
+ if ( oSettings.aoColumns[i].sClass !== null )
+ {
+ $(nTh).addClass( oSettings.aoColumns[i].sClass );
+ }
+
+ /* Set the title of the column if it is user defined (not what was auto detected) */
+ if ( oSettings.aoColumns[i].sTitle != nTh.innerHTML )
+ {
+ nTh.innerHTML = oSettings.aoColumns[i].sTitle;
+ }
+ }
+ }
+ else
+ {
+ /* We don't have a header in the DOM - so we are going to have to create one */
+ var nTr = document.createElement( "tr" );
+
+ for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
+ {
+ nTh = oSettings.aoColumns[i].nTh;
+ nTh.innerHTML = oSettings.aoColumns[i].sTitle;
+ nTh.setAttribute('tabindex', '0');
+
+ if ( oSettings.aoColumns[i].sClass !== null )
+ {
+ $(nTh).addClass( oSettings.aoColumns[i].sClass );
+ }
+
+ nTr.appendChild( nTh );
+ }
+ $(oSettings.nTHead).html( '' )[0].appendChild( nTr );
+ _fnDetectHeader( oSettings.aoHeader, oSettings.nTHead );
+ }
+
+ /* ARIA role for the rows */
+ $(oSettings.nTHead).children('tr').attr('role', 'row');
+
+ /* Add the extra markup needed by jQuery UI's themes */
+ if ( oSettings.bJUI )
+ {
+ for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
+ {
+ nTh = oSettings.aoColumns[i].nTh;
+
+ var nDiv = document.createElement('div');
+ nDiv.className = oSettings.oClasses.sSortJUIWrapper;
+ $(nTh).contents().appendTo(nDiv);
+
+ var nSpan = document.createElement('span');
+ nSpan.className = oSettings.oClasses.sSortIcon;
+ nDiv.appendChild( nSpan );
+ nTh.appendChild( nDiv );
+ }
+ }
+
+ if ( oSettings.oFeatures.bSort )
+ {
+ for ( i=0 ; i<oSettings.aoColumns.length ; i++ )
+ {
+ if ( oSettings.aoColumns[i].bSortable !== false )
+ {
+ _fnSortAttachListener( oSettings, oSettings.aoColumns[i].nTh, i );
+ }
+ else
+ {
+ $(oSettings.aoColumns[i].nTh).addClass( oSettings.oClasses.sSortableNone );
+ }
+ }
+ }
+
+ /* Deal with the footer - add classes if required */
+ if ( oSettings.oClasses.sFooterTH !== "" )
+ {
+ $(oSettings.nTFoot).children('tr').children('th').addClass( oSettings.oClasses.sFooterTH );
+ }
+
+ /* Cache the footer elements */
+ if ( oSettings.nTFoot !== null )
+ {
+ var anCells = _fnGetUniqueThs( oSettings, null, oSettings.aoFooter );
+ for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
+ {
+ if ( anCells[i] )
+ {
+ oSettings.aoColumns[i].nTf = anCells[i];
+ if ( oSettings.aoColumns[i].sClass )
+ {
+ $(anCells[i]).addClass( oSettings.aoColumns[i].sClass );
+ }
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Draw the header (or footer) element based on the column visibility states. The
+ * methodology here is to use the layout array from _fnDetectHeader, modified for
+ * the instantaneous column visibility, to construct the new layout. The grid is
+ * traversed over cell at a time in a rows x columns grid fashion, although each
+ * cell insert can cover multiple elements in the grid - which is tracks using the
+ * aApplied array. Cell inserts in the grid will only occur where there isn't
+ * already a cell in that position.
+ * @param {object} oSettings dataTables settings object
+ * @param array {objects} aoSource Layout array from _fnDetectHeader
+ * @param {boolean} [bIncludeHidden=false] If true then include the hidden columns in the calc,
+ * @memberof DataTable#oApi
+ */
+ function _fnDrawHead( oSettings, aoSource, bIncludeHidden )
+ {
+ var i, iLen, j, jLen, k, kLen, n, nLocalTr;
+ var aoLocal = [];
+ var aApplied = [];
+ var iColumns = oSettings.aoColumns.length;
+ var iRowspan, iColspan;
+
+ if ( bIncludeHidden === undefined )
+ {
+ bIncludeHidden = false;
+ }
+
+ /* Make a copy of the master layout array, but without the visible columns in it */
+ for ( i=0, iLen=aoSource.length ; i<iLen ; i++ )
+ {
+ aoLocal[i] = aoSource[i].slice();
+ aoLocal[i].nTr = aoSource[i].nTr;
+
+ /* Remove any columns which are currently hidden */
+ for ( j=iColumns-1 ; j>=0 ; j-- )
+ {
+ if ( !oSettings.aoColumns[j].bVisible && !bIncludeHidden )
+ {
+ aoLocal[i].splice( j, 1 );
+ }
+ }
+
+ /* Prep the applied array - it needs an element for each row */
+ aApplied.push( [] );
+ }
+
+ for ( i=0, iLen=aoLocal.length ; i<iLen ; i++ )
+ {
+ nLocalTr = aoLocal[i].nTr;
+
+ /* All cells are going to be replaced, so empty out the row */
+ if ( nLocalTr )
+ {
+ while( (n = nLocalTr.firstChild) )
+ {
+ nLocalTr.removeChild( n );
+ }
+ }
+
+ for ( j=0, jLen=aoLocal[i].length ; j<jLen ; j++ )
+ {
+ iRowspan = 1;
+ iColspan = 1;
+
+ /* Check to see if there is already a cell (row/colspan) covering our target
+ * insert point. If there is, then there is nothing to do.
+ */
+ if ( aApplied[i][j] === undefined )
+ {
+ nLocalTr.appendChild( aoLocal[i][j].cell );
+ aApplied[i][j] = 1;
+
+ /* Expand the cell to cover as many rows as needed */
+ while ( aoLocal[i+iRowspan] !== undefined &&
+ aoLocal[i][j].cell == aoLocal[i+iRowspan][j].cell )
+ {
+ aApplied[i+iRowspan][j] = 1;
+ iRowspan++;
+ }
+
+ /* Expand the cell to cover as many columns as needed */
+ while ( aoLocal[i][j+iColspan] !== undefined &&
+ aoLocal[i][j].cell == aoLocal[i][j+iColspan].cell )
+ {
+ /* Must update the applied array over the rows for the columns */
+ for ( k=0 ; k<iRowspan ; k++ )
+ {
+ aApplied[i+k][j+iColspan] = 1;
+ }
+ iColspan++;
+ }
+
+ /* Do the actual expansion in the DOM */
+ aoLocal[i][j].cell.rowSpan = iRowspan;
+ aoLocal[i][j].cell.colSpan = iColspan;
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Insert the required TR nodes into the table for display
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnDraw( oSettings )
+ {
+ /* Provide a pre-callback function which can be used to cancel the draw is false is returned */
+ var aPreDraw = _fnCallbackFire( oSettings, 'aoPreDrawCallback', 'preDraw', [oSettings] );
+ if ( $.inArray( false, aPreDraw ) !== -1 )
+ {
+ _fnProcessingDisplay( oSettings, false );
+ return;
+ }
+
+ var i, iLen, n;
+ var anRows = [];
+ var iRowCount = 0;
+ var iStripes = oSettings.asStripeClasses.length;
+ var iOpenRows = oSettings.aoOpenRows.length;
+
+ oSettings.bDrawing = true;
+
+ /* Check and see if we have an initial draw position from state saving */
+ if ( oSettings.iInitDisplayStart !== undefined && oSettings.iInitDisplayStart != -1 )
+ {
+ if ( oSettings.oFeatures.bServerSide )
+ {
+ oSettings._iDisplayStart = oSettings.iInitDisplayStart;
+ }
+ else
+ {
+ oSettings._iDisplayStart = (oSettings.iInitDisplayStart >= oSettings.fnRecordsDisplay()) ?
+ 0 : oSettings.iInitDisplayStart;
+ }
+ oSettings.iInitDisplayStart = -1;
+ _fnCalculateEnd( oSettings );
+ }
+
+ /* Server-side processing draw intercept */
+ if ( oSettings.bDeferLoading )
+ {
+ oSettings.bDeferLoading = false;
+ oSettings.iDraw++;
+ }
+ else if ( !oSettings.oFeatures.bServerSide )
+ {
+ oSettings.iDraw++;
+ }
+ else if ( !oSettings.bDestroying && !_fnAjaxUpdate( oSettings ) )
+ {
+ return;
+ }
+
+ if ( oSettings.aiDisplay.length !== 0 )
+ {
+ var iStart = oSettings._iDisplayStart;
+ var iEnd = oSettings._iDisplayEnd;
+
+ if ( oSettings.oFeatures.bServerSide )
+ {
+ iStart = 0;
+ iEnd = oSettings.aoData.length;
+ }
+
+ for ( var j=iStart ; j<iEnd ; j++ )
+ {
+ var aoData = oSettings.aoData[ oSettings.aiDisplay[j] ];
+ if ( aoData.nTr === null )
+ {
+ _fnCreateTr( oSettings, oSettings.aiDisplay[j] );
+ }
+
+ var nRow = aoData.nTr;
+
+ /* Remove the old striping classes and then add the new one */
+ if ( iStripes !== 0 )
+ {
+ var sStripe = oSettings.asStripeClasses[ iRowCount % iStripes ];
+ if ( aoData._sRowStripe != sStripe )
+ {
+ $(nRow).removeClass( aoData._sRowStripe ).addClass( sStripe );
+ aoData._sRowStripe = sStripe;
+ }
+ }
+
+ /* Row callback functions - might want to manipulate the row */
+ _fnCallbackFire( oSettings, 'aoRowCallback', null,
+ [nRow, oSettings.aoData[ oSettings.aiDisplay[j] ]._aData, iRowCount, j] );
+
+ anRows.push( nRow );
+ iRowCount++;
+
+ /* If there is an open row - and it is attached to this parent - attach it on redraw */
+ if ( iOpenRows !== 0 )
+ {
+ for ( var k=0 ; k<iOpenRows ; k++ )
+ {
+ if ( nRow == oSettings.aoOpenRows[k].nParent )
+ {
+ anRows.push( oSettings.aoOpenRows[k].nTr );
+ break;
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ /* Table is empty - create a row with an empty message in it */
+ anRows[ 0 ] = document.createElement( 'tr' );
+
+ if ( oSettings.asStripeClasses[0] )
+ {
+ anRows[ 0 ].className = oSettings.asStripeClasses[0];
+ }
+
+ var oLang = oSettings.oLanguage;
+ var sZero = oLang.sZeroRecords;
+ if ( oSettings.iDraw == 1 && oSettings.sAjaxSource !== null && !oSettings.oFeatures.bServerSide )
+ {
+ sZero = oLang.sLoadingRecords;
+ }
+ else if ( oLang.sEmptyTable && oSettings.fnRecordsTotal() === 0 )
+ {
+ sZero = oLang.sEmptyTable;
+ }
+
+ var nTd = document.createElement( 'td' );
+ nTd.setAttribute( 'valign', "top" );
+ nTd.colSpan = _fnVisbleColumns( oSettings );
+ nTd.className = oSettings.oClasses.sRowEmpty;
+ nTd.innerHTML = _fnInfoMacros( oSettings, sZero );
+
+ anRows[ iRowCount ].appendChild( nTd );
+ }
+
+ /* Header and footer callbacks */
+ _fnCallbackFire( oSettings, 'aoHeaderCallback', 'header', [ $(oSettings.nTHead).children('tr')[0],
+ _fnGetDataMaster( oSettings ), oSettings._iDisplayStart, oSettings.fnDisplayEnd(), oSettings.aiDisplay ] );
+
+ _fnCallbackFire( oSettings, 'aoFooterCallback', 'footer', [ $(oSettings.nTFoot).children('tr')[0],
+ _fnGetDataMaster( oSettings ), oSettings._iDisplayStart, oSettings.fnDisplayEnd(), oSettings.aiDisplay ] );
+
+ /*
+ * Need to remove any old row from the display - note we can't just empty the tbody using
+ * $().html('') since this will unbind the jQuery event handlers (even although the node
+ * still exists!) - equally we can't use innerHTML, since IE throws an exception.
+ */
+ var
+ nAddFrag = document.createDocumentFragment(),
+ nRemoveFrag = document.createDocumentFragment(),
+ nBodyPar, nTrs;
+
+ if ( oSettings.nTBody )
+ {
+ nBodyPar = oSettings.nTBody.parentNode;
+ nRemoveFrag.appendChild( oSettings.nTBody );
+
+ /* When doing infinite scrolling, only remove child rows when sorting, filtering or start
+ * up. When not infinite scroll, always do it.
+ */
+ if ( !oSettings.oScroll.bInfinite || !oSettings._bInitComplete ||
+ oSettings.bSorted || oSettings.bFiltered )
+ {
+ while( (n = oSettings.nTBody.firstChild) )
+ {
+ oSettings.nTBody.removeChild( n );
+ }
+ }
+
+ /* Put the draw table into the dom */
+ for ( i=0, iLen=anRows.length ; i<iLen ; i++ )
+ {
+ nAddFrag.appendChild( anRows[i] );
+ }
+
+ oSettings.nTBody.appendChild( nAddFrag );
+ if ( nBodyPar !== null )
+ {
+ nBodyPar.appendChild( oSettings.nTBody );
+ }
+ }
+
+ /* Call all required callback functions for the end of a draw */
+ _fnCallbackFire( oSettings, 'aoDrawCallback', 'draw', [oSettings] );
+
+ /* Draw is complete, sorting and filtering must be as well */
+ oSettings.bSorted = false;
+ oSettings.bFiltered = false;
+ oSettings.bDrawing = false;
+
+ if ( oSettings.oFeatures.bServerSide )
+ {
+ _fnProcessingDisplay( oSettings, false );
+ if ( !oSettings._bInitComplete )
+ {
+ _fnInitComplete( oSettings );
+ }
+ }
+ }
+
+
+ /**
+ * Redraw the table - taking account of the various features which are enabled
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnReDraw( oSettings )
+ {
+ if ( oSettings.oFeatures.bSort )
+ {
+ /* Sorting will refilter and draw for us */
+ _fnSort( oSettings, oSettings.oPreviousSearch );
+ }
+ else if ( oSettings.oFeatures.bFilter )
+ {
+ /* Filtering will redraw for us */
+ _fnFilterComplete( oSettings, oSettings.oPreviousSearch );
+ }
+ else
+ {
+ _fnCalculateEnd( oSettings );
+ _fnDraw( oSettings );
+ }
+ }
+
+
+ /**
+ * Add the options to the page HTML for the table
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnAddOptionsHtml ( oSettings )
+ {
+ /*
+ * Create a temporary, empty, div which we can later on replace with what we have generated
+ * we do it this way to rendering the 'options' html offline - speed :-)
+ */
+ var nHolding = $('<div></div>')[0];
+ oSettings.nTable.parentNode.insertBefore( nHolding, oSettings.nTable );
+
+ /*
+ * All DataTables are wrapped in a div
+ */
+ oSettings.nTableWrapper = $('<div id="'+oSettings.sTableId+'_wrapper" class="'+oSettings.oClasses.sWrapper+'" role="grid"></div>')[0];
+ oSettings.nTableReinsertBefore = oSettings.nTable.nextSibling;
+
+ /* Track where we want to insert the option */
+ var nInsertNode = oSettings.nTableWrapper;
+
+ /* Loop over the user set positioning and place the elements as needed */
+ var aDom = oSettings.sDom.split('');
+ var nTmp, iPushFeature, cOption, nNewNode, cNext, sAttr, j;
+ for ( var i=0 ; i<aDom.length ; i++ )
+ {
+ iPushFeature = 0;
+ cOption = aDom[i];
+
+ if ( cOption == '<' )
+ {
+ /* New container div */
+ nNewNode = $('<div></div>')[0];
+
+ /* Check to see if we should append an id and/or a class name to the container */
+ cNext = aDom[i+1];
+ if ( cNext == "'" || cNext == '"' )
+ {
+ sAttr = "";
+ j = 2;
+ while ( aDom[i+j] != cNext )
+ {
+ sAttr += aDom[i+j];
+ j++;
+ }
+
+ /* Replace jQuery UI constants */
+ if ( sAttr == "H" )
+ {
+ sAttr = oSettings.oClasses.sJUIHeader;
+ }
+ else if ( sAttr == "F" )
+ {
+ sAttr = oSettings.oClasses.sJUIFooter;
+ }
+
+ /* The attribute can be in the format of "#id.class", "#id" or "class" This logic
+ * breaks the string into parts and applies them as needed
+ */
+ if ( sAttr.indexOf('.') != -1 )
+ {
+ var aSplit = sAttr.split('.');
+ nNewNode.id = aSplit[0].substr(1, aSplit[0].length-1);
+ nNewNode.className = aSplit[1];
+ }
+ else if ( sAttr.charAt(0) == "#" )
+ {
+ nNewNode.id = sAttr.substr(1, sAttr.length-1);
+ }
+ else
+ {
+ nNewNode.className = sAttr;
+ }
+
+ i += j; /* Move along the position array */
+ }
+
+ nInsertNode.appendChild( nNewNode );
+ nInsertNode = nNewNode;
+ }
+ else if ( cOption == '>' )
+ {
+ /* End container div */
+ nInsertNode = nInsertNode.parentNode;
+ }
+ else if ( cOption == 'l' && oSettings.oFeatures.bPaginate && oSettings.oFeatures.bLengthChange )
+ {
+ /* Length */
+ nTmp = _fnFeatureHtmlLength( oSettings );
+ iPushFeature = 1;
+ }
+ else if ( cOption == 'f' && oSettings.oFeatures.bFilter )
+ {
+ /* Filter */
+ nTmp = _fnFeatureHtmlFilter( oSettings );
+ iPushFeature = 1;
+ }
+ else if ( cOption == 'r' && oSettings.oFeatures.bProcessing )
+ {
+ /* pRocessing */
+ nTmp = _fnFeatureHtmlProcessing( oSettings );
+ iPushFeature = 1;
+ }
+ else if ( cOption == 't' )
+ {
+ /* Table */
+ nTmp = _fnFeatureHtmlTable( oSettings );
+ iPushFeature = 1;
+ }
+ else if ( cOption == 'i' && oSettings.oFeatures.bInfo )
+ {
+ /* Info */
+ nTmp = _fnFeatureHtmlInfo( oSettings );
+ iPushFeature = 1;
+ }
+ else if ( cOption == 'p' && oSettings.oFeatures.bPaginate )
+ {
+ /* Pagination */
+ nTmp = _fnFeatureHtmlPaginate( oSettings );
+ iPushFeature = 1;
+ }
+ else if ( DataTable.ext.aoFeatures.length !== 0 )
+ {
+ /* Plug-in features */
+ var aoFeatures = DataTable.ext.aoFeatures;
+ for ( var k=0, kLen=aoFeatures.length ; k<kLen ; k++ )
+ {
+ if ( cOption == aoFeatures[k].cFeature )
+ {
+ nTmp = aoFeatures[k].fnInit( oSettings );
+ if ( nTmp )
+ {
+ iPushFeature = 1;
+ }
+ break;
+ }
+ }
+ }
+
+ /* Add to the 2D features array */
+ if ( iPushFeature == 1 && nTmp !== null )
+ {
+ if ( typeof oSettings.aanFeatures[cOption] !== 'object' )
+ {
+ oSettings.aanFeatures[cOption] = [];
+ }
+ oSettings.aanFeatures[cOption].push( nTmp );
+ nInsertNode.appendChild( nTmp );
+ }
+ }
+
+ /* Built our DOM structure - replace the holding div with what we want */
+ nHolding.parentNode.replaceChild( oSettings.nTableWrapper, nHolding );
+ }
+
+
+ /**
+ * Use the DOM source to create up an array of header cells. The idea here is to
+ * create a layout grid (array) of rows x columns, which contains a reference
+ * to the cell that that point in the grid (regardless of col/rowspan), such that
+ * any column / row could be removed and the new grid constructed
+ * @param array {object} aLayout Array to store the calculated layout in
+ * @param {node} nThead The header/footer element for the table
+ * @memberof DataTable#oApi
+ */
+ function _fnDetectHeader ( aLayout, nThead )
+ {
+ var nTrs = $(nThead).children('tr');
+ var nTr, nCell;
+ var i, k, l, iLen, jLen, iColShifted, iColumn, iColspan, iRowspan;
+ var bUnique;
+ var fnShiftCol = function ( a, i, j ) {
+ var k = a[i];
+ while ( k[j] ) {
+ j++;
+ }
+ return j;
+ };
+
+ aLayout.splice( 0, aLayout.length );
+
+ /* We know how many rows there are in the layout - so prep it */
+ for ( i=0, iLen=nTrs.length ; i<iLen ; i++ )
+ {
+ aLayout.push( [] );
+ }
+
+ /* Calculate a layout array */
+ for ( i=0, iLen=nTrs.length ; i<iLen ; i++ )
+ {
+ nTr = nTrs[i];
+ iColumn = 0;
+
+ /* For every cell in the row... */
+ nCell = nTr.firstChild;
+ while ( nCell ) {
+ if ( nCell.nodeName.toUpperCase() == "TD" ||
+ nCell.nodeName.toUpperCase() == "TH" )
+ {
+ /* Get the col and rowspan attributes from the DOM and sanitise them */
+ iColspan = nCell.getAttribute('colspan') * 1;
+ iRowspan = nCell.getAttribute('rowspan') * 1;
+ iColspan = (!iColspan || iColspan===0 || iColspan===1) ? 1 : iColspan;
+ iRowspan = (!iRowspan || iRowspan===0 || iRowspan===1) ? 1 : iRowspan;
+
+ /* There might be colspan cells already in this row, so shift our target
+ * accordingly
+ */
+ iColShifted = fnShiftCol( aLayout, i, iColumn );
+
+ /* Cache calculation for unique columns */
+ bUnique = iColspan === 1 ? true : false;
+
+ /* If there is col / rowspan, copy the information into the layout grid */
+ for ( l=0 ; l<iColspan ; l++ )
+ {
+ for ( k=0 ; k<iRowspan ; k++ )
+ {
+ aLayout[i+k][iColShifted+l] = {
+ "cell": nCell,
+ "unique": bUnique
+ };
+ aLayout[i+k].nTr = nTr;
+ }
+ }
+ }
+ nCell = nCell.nextSibling;
+ }
+ }
+ }
+
+
+ /**
+ * Get an array of unique th elements, one for each column
+ * @param {object} oSettings dataTables settings object
+ * @param {node} nHeader automatically detect the layout from this node - optional
+ * @param {array} aLayout thead/tfoot layout from _fnDetectHeader - optional
+ * @returns array {node} aReturn list of unique th's
+ * @memberof DataTable#oApi
+ */
+ function _fnGetUniqueThs ( oSettings, nHeader, aLayout )
+ {
+ var aReturn = [];
+ if ( !aLayout )
+ {
+ aLayout = oSettings.aoHeader;
+ if ( nHeader )
+ {
+ aLayout = [];
+ _fnDetectHeader( aLayout, nHeader );
+ }
+ }
+
+ for ( var i=0, iLen=aLayout.length ; i<iLen ; i++ )
+ {
+ for ( var j=0, jLen=aLayout[i].length ; j<jLen ; j++ )
+ {
+ if ( aLayout[i][j].unique &&
+ (!aReturn[j] || !oSettings.bSortCellsTop) )
+ {
+ aReturn[j] = aLayout[i][j].cell;
+ }
+ }
+ }
+
+ return aReturn;
+ }
+
+
+
+ /**
+ * Update the table using an Ajax call
+ * @param {object} oSettings dataTables settings object
+ * @returns {boolean} Block the table drawing or not
+ * @memberof DataTable#oApi
+ */
+ function _fnAjaxUpdate( oSettings )
+ {
+ if ( oSettings.bAjaxDataGet )
+ {
+ oSettings.iDraw++;
+ _fnProcessingDisplay( oSettings, true );
+ var iColumns = oSettings.aoColumns.length;
+ var aoData = _fnAjaxParameters( oSettings );
+ _fnServerParams( oSettings, aoData );
+
+ oSettings.fnServerData.call( oSettings.oInstance, oSettings.sAjaxSource, aoData,
+ function(json) {
+ _fnAjaxUpdateDraw( oSettings, json );
+ }, oSettings );
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+
+
+ /**
+ * Build up the parameters in an object needed for a server-side processing request
+ * @param {object} oSettings dataTables settings object
+ * @returns {bool} block the table drawing or not
+ * @memberof DataTable#oApi
+ */
+ function _fnAjaxParameters( oSettings )
+ {
+ var iColumns = oSettings.aoColumns.length;
+ var aoData = [], mDataProp, aaSort, aDataSort;
+ var i, j;
+
+ aoData.push( { "name": "sEcho", "value": oSettings.iDraw } );
+ aoData.push( { "name": "iColumns", "value": iColumns } );
+ aoData.push( { "name": "sColumns", "value": _fnColumnOrdering(oSettings) } );
+ aoData.push( { "name": "iDisplayStart", "value": oSettings._iDisplayStart } );
+ aoData.push( { "name": "iDisplayLength", "value": oSettings.oFeatures.bPaginate !== false ?
+ oSettings._iDisplayLength : -1 } );
+
+ for ( i=0 ; i<iColumns ; i++ )
+ {
+ mDataProp = oSettings.aoColumns[i].mData;
+ aoData.push( { "name": "mDataProp_"+i, "value": typeof(mDataProp)==="function" ? 'function' : mDataProp } );
+ }
+
+ /* Filtering */
+ if ( oSettings.oFeatures.bFilter !== false )
+ {
+ aoData.push( { "name": "sSearch", "value": oSettings.oPreviousSearch.sSearch } );
+ aoData.push( { "name": "bRegex", "value": oSettings.oPreviousSearch.bRegex } );
+ for ( i=0 ; i<iColumns ; i++ )
+ {
+ aoData.push( { "name": "sSearch_"+i, "value": oSettings.aoPreSearchCols[i].sSearch } );
+ aoData.push( { "name": "bRegex_"+i, "value": oSettings.aoPreSearchCols[i].bRegex } );
+ aoData.push( { "name": "bSearchable_"+i, "value": oSettings.aoColumns[i].bSearchable } );
+ }
+ }
+
+ /* Sorting */
+ if ( oSettings.oFeatures.bSort !== false )
+ {
+ var iCounter = 0;
+
+ aaSort = ( oSettings.aaSortingFixed !== null ) ?
+ oSettings.aaSortingFixed.concat( oSettings.aaSorting ) :
+ oSettings.aaSorting.slice();
+
+ for ( i=0 ; i<aaSort.length ; i++ )
+ {
+ aDataSort = oSettings.aoColumns[ aaSort[i][0] ].aDataSort;
+
+ for ( j=0 ; j<aDataSort.length ; j++ )
+ {
+ aoData.push( { "name": "iSortCol_"+iCounter, "value": aDataSort[j] } );
+ aoData.push( { "name": "sSortDir_"+iCounter, "value": aaSort[i][1] } );
+ iCounter++;
+ }
+ }
+ aoData.push( { "name": "iSortingCols", "value": iCounter } );
+
+ for ( i=0 ; i<iColumns ; i++ )
+ {
+ aoData.push( { "name": "bSortable_"+i, "value": oSettings.aoColumns[i].bSortable } );
+ }
+ }
+
+ return aoData;
+ }
+
+
+ /**
+ * Add Ajax parameters from plug-ins
+ * @param {object} oSettings dataTables settings object
+ * @param array {objects} aoData name/value pairs to send to the server
+ * @memberof DataTable#oApi
+ */
+ function _fnServerParams( oSettings, aoData )
+ {
+ _fnCallbackFire( oSettings, 'aoServerParams', 'serverParams', [aoData] );
+ }
+
+
+ /**
+ * Data the data from the server (nuking the old) and redraw the table
+ * @param {object} oSettings dataTables settings object
+ * @param {object} json json data return from the server.
+ * @param {string} json.sEcho Tracking flag for DataTables to match requests
+ * @param {int} json.iTotalRecords Number of records in the data set, not accounting for filtering
+ * @param {int} json.iTotalDisplayRecords Number of records in the data set, accounting for filtering
+ * @param {array} json.aaData The data to display on this page
+ * @param {string} [json.sColumns] Column ordering (sName, comma separated)
+ * @memberof DataTable#oApi
+ */
+ function _fnAjaxUpdateDraw ( oSettings, json )
+ {
+ if ( json.sEcho !== undefined )
+ {
+ /* Protect against old returns over-writing a new one. Possible when you get
+ * very fast interaction, and later queries are completed much faster
+ */
+ if ( json.sEcho*1 < oSettings.iDraw )
+ {
+ return;
+ }
+ else
+ {
+ oSettings.iDraw = json.sEcho * 1;
+ }
+ }
+
+ if ( !oSettings.oScroll.bInfinite ||
+ (oSettings.oScroll.bInfinite && (oSettings.bSorted || oSettings.bFiltered)) )
+ {
+ _fnClearTable( oSettings );
+ }
+ oSettings._iRecordsTotal = parseInt(json.iTotalRecords, 10);
+ oSettings._iRecordsDisplay = parseInt(json.iTotalDisplayRecords, 10);
+
+ /* Determine if reordering is required */
+ var sOrdering = _fnColumnOrdering(oSettings);
+ var bReOrder = (json.sColumns !== undefined && sOrdering !== "" && json.sColumns != sOrdering );
+ var aiIndex;
+ if ( bReOrder )
+ {
+ aiIndex = _fnReOrderIndex( oSettings, json.sColumns );
+ }
+
+ var aData = _fnGetObjectDataFn( oSettings.sAjaxDataProp )( json );
+ for ( var i=0, iLen=aData.length ; i<iLen ; i++ )
+ {
+ if ( bReOrder )
+ {
+ /* If we need to re-order, then create a new array with the correct order and add it */
+ var aDataSorted = [];
+ for ( var j=0, jLen=oSettings.aoColumns.length ; j<jLen ; j++ )
+ {
+ aDataSorted.push( aData[i][ aiIndex[j] ] );
+ }
+ _fnAddData( oSettings, aDataSorted );
+ }
+ else
+ {
+ /* No re-order required, sever got it "right" - just straight add */
+ _fnAddData( oSettings, aData[i] );
+ }
+ }
+ oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
+
+ oSettings.bAjaxDataGet = false;
+ _fnDraw( oSettings );
+ oSettings.bAjaxDataGet = true;
+ _fnProcessingDisplay( oSettings, false );
+ }
+
+
+
+ /**
+ * Generate the node required for filtering text
+ * @returns {node} Filter control element
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnFeatureHtmlFilter ( oSettings )
+ {
+ var oPreviousSearch = oSettings.oPreviousSearch;
+
+ var sSearchStr = oSettings.oLanguage.sSearch;
+ sSearchStr = (sSearchStr.indexOf('_INPUT_') !== -1) ?
+ sSearchStr.replace('_INPUT_', '<input type="text" />') :
+ sSearchStr==="" ? '<input type="text" />' : sSearchStr+' <input type="text" />';
+
+ var nFilter = document.createElement( 'div' );
+ nFilter.className = oSettings.oClasses.sFilter;
+ nFilter.innerHTML = '<label>'+sSearchStr+'</label>';
+ if ( !oSettings.aanFeatures.f )
+ {
+ nFilter.id = oSettings.sTableId+'_filter';
+ }
+
+ var jqFilter = $('input[type="text"]', nFilter);
+
+ // Store a reference to the input element, so other input elements could be
+ // added to the filter wrapper if needed (submit button for example)
+ nFilter._DT_Input = jqFilter[0];
+
+ jqFilter.val( oPreviousSearch.sSearch.replace('"','&quot;') );
+ jqFilter.bind( 'keyup.DT', function(e) {
+ /* Update all other filter input elements for the new display */
+ var n = oSettings.aanFeatures.f;
+ var val = this.value==="" ? "" : this.value; // mental IE8 fix :-(
+
+ for ( var i=0, iLen=n.length ; i<iLen ; i++ )
+ {
+ if ( n[i] != $(this).parents('div.dataTables_filter')[0] )
+ {
+ $(n[i]._DT_Input).val( val );
+ }
+ }
+
+ /* Now do the filter */
+ if ( val != oPreviousSearch.sSearch )
+ {
+ _fnFilterComplete( oSettings, {
+ "sSearch": val,
+ "bRegex": oPreviousSearch.bRegex,
+ "bSmart": oPreviousSearch.bSmart ,
+ "bCaseInsensitive": oPreviousSearch.bCaseInsensitive
+ } );
+ }
+ } );
+
+ jqFilter
+ .attr('aria-controls', oSettings.sTableId)
+ .bind( 'keypress.DT', function(e) {
+ /* Prevent form submission */
+ if ( e.keyCode == 13 )
+ {
+ return false;
+ }
+ }
+ );
+
+ return nFilter;
+ }
+
+
+ /**
+ * Filter the table using both the global filter and column based filtering
+ * @param {object} oSettings dataTables settings object
+ * @param {object} oSearch search information
+ * @param {int} [iForce] force a research of the master array (1) or not (undefined or 0)
+ * @memberof DataTable#oApi
+ */
+ function _fnFilterComplete ( oSettings, oInput, iForce )
+ {
+ var oPrevSearch = oSettings.oPreviousSearch;
+ var aoPrevSearch = oSettings.aoPreSearchCols;
+ var fnSaveFilter = function ( oFilter ) {
+ /* Save the filtering values */
+ oPrevSearch.sSearch = oFilter.sSearch;
+ oPrevSearch.bRegex = oFilter.bRegex;
+ oPrevSearch.bSmart = oFilter.bSmart;
+ oPrevSearch.bCaseInsensitive = oFilter.bCaseInsensitive;
+ };
+
+ /* In server-side processing all filtering is done by the server, so no point hanging around here */
+ if ( !oSettings.oFeatures.bServerSide )
+ {
+ /* Global filter */
+ _fnFilter( oSettings, oInput.sSearch, iForce, oInput.bRegex, oInput.bSmart, oInput.bCaseInsensitive );
+ fnSaveFilter( oInput );
+
+ /* Now do the individual column filter */
+ for ( var i=0 ; i<oSettings.aoPreSearchCols.length ; i++ )
+ {
+ _fnFilterColumn( oSettings, aoPrevSearch[i].sSearch, i, aoPrevSearch[i].bRegex,
+ aoPrevSearch[i].bSmart, aoPrevSearch[i].bCaseInsensitive );
+ }
+
+ /* Custom filtering */
+ _fnFilterCustom( oSettings );
+ }
+ else
+ {
+ fnSaveFilter( oInput );
+ }
+
+ /* Tell the draw function we have been filtering */
+ oSettings.bFiltered = true;
+ $(oSettings.oInstance).trigger('filter', oSettings);
+
+ /* Redraw the table */
+ oSettings._iDisplayStart = 0;
+ _fnCalculateEnd( oSettings );
+ _fnDraw( oSettings );
+
+ /* Rebuild search array 'offline' */
+ _fnBuildSearchArray( oSettings, 0 );
+ }
+
+
+ /**
+ * Apply custom filtering functions
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnFilterCustom( oSettings )
+ {
+ var afnFilters = DataTable.ext.afnFiltering;
+ var aiFilterColumns = _fnGetColumns( oSettings, 'bSearchable' );
+
+ for ( var i=0, iLen=afnFilters.length ; i<iLen ; i++ )
+ {
+ var iCorrector = 0;
+ for ( var j=0, jLen=oSettings.aiDisplay.length ; j<jLen ; j++ )
+ {
+ var iDisIndex = oSettings.aiDisplay[j-iCorrector];
+ var bTest = afnFilters[i](
+ oSettings,
+ _fnGetRowData( oSettings, iDisIndex, 'filter', aiFilterColumns ),
+ iDisIndex
+ );
+
+ /* Check if we should use this row based on the filtering function */
+ if ( !bTest )
+ {
+ oSettings.aiDisplay.splice( j-iCorrector, 1 );
+ iCorrector++;
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Filter the table on a per-column basis
+ * @param {object} oSettings dataTables settings object
+ * @param {string} sInput string to filter on
+ * @param {int} iColumn column to filter
+ * @param {bool} bRegex treat search string as a regular expression or not
+ * @param {bool} bSmart use smart filtering or not
+ * @param {bool} bCaseInsensitive Do case insenstive matching or not
+ * @memberof DataTable#oApi
+ */
+ function _fnFilterColumn ( oSettings, sInput, iColumn, bRegex, bSmart, bCaseInsensitive )
+ {
+ if ( sInput === "" )
+ {
+ return;
+ }
+
+ var iIndexCorrector = 0;
+ var rpSearch = _fnFilterCreateSearch( sInput, bRegex, bSmart, bCaseInsensitive );
+
+ for ( var i=oSettings.aiDisplay.length-1 ; i>=0 ; i-- )
+ {
+ var sData = _fnDataToSearch( _fnGetCellData( oSettings, oSettings.aiDisplay[i], iColumn, 'filter' ),
+ oSettings.aoColumns[iColumn].sType );
+ if ( ! rpSearch.test( sData ) )
+ {
+ oSettings.aiDisplay.splice( i, 1 );
+ iIndexCorrector++;
+ }
+ }
+ }
+
+
+ /**
+ * Filter the data table based on user input and draw the table
+ * @param {object} oSettings dataTables settings object
+ * @param {string} sInput string to filter on
+ * @param {int} iForce optional - force a research of the master array (1) or not (undefined or 0)
+ * @param {bool} bRegex treat as a regular expression or not
+ * @param {bool} bSmart perform smart filtering or not
+ * @param {bool} bCaseInsensitive Do case insenstive matching or not
+ * @memberof DataTable#oApi
+ */
+ function _fnFilter( oSettings, sInput, iForce, bRegex, bSmart, bCaseInsensitive )
+ {
+ var i;
+ var rpSearch = _fnFilterCreateSearch( sInput, bRegex, bSmart, bCaseInsensitive );
+ var oPrevSearch = oSettings.oPreviousSearch;
+
+ /* Check if we are forcing or not - optional parameter */
+ if ( !iForce )
+ {
+ iForce = 0;
+ }
+
+ /* Need to take account of custom filtering functions - always filter */
+ if ( DataTable.ext.afnFiltering.length !== 0 )
+ {
+ iForce = 1;
+ }
+
+ /*
+ * If the input is blank - we want the full data set
+ */
+ if ( sInput.length <= 0 )
+ {
+ oSettings.aiDisplay.splice( 0, oSettings.aiDisplay.length);
+ oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
+ }
+ else
+ {
+ /*
+ * We are starting a new search or the new search string is smaller
+ * then the old one (i.e. delete). Search from the master array
+ */
+ if ( oSettings.aiDisplay.length == oSettings.aiDisplayMaster.length ||
+ oPrevSearch.sSearch.length > sInput.length || iForce == 1 ||
+ sInput.indexOf(oPrevSearch.sSearch) !== 0 )
+ {
+ /* Nuke the old display array - we are going to rebuild it */
+ oSettings.aiDisplay.splice( 0, oSettings.aiDisplay.length);
+
+ /* Force a rebuild of the search array */
+ _fnBuildSearchArray( oSettings, 1 );
+
+ /* Search through all records to populate the search array
+ * The the oSettings.aiDisplayMaster and asDataSearch arrays have 1 to 1
+ * mapping
+ */
+ for ( i=0 ; i<oSettings.aiDisplayMaster.length ; i++ )
+ {
+ if ( rpSearch.test(oSettings.asDataSearch[i]) )
+ {
+ oSettings.aiDisplay.push( oSettings.aiDisplayMaster[i] );
+ }
+ }
+ }
+ else
+ {
+ /* Using old search array - refine it - do it this way for speed
+ * Don't have to search the whole master array again
+ */
+ var iIndexCorrector = 0;
+
+ /* Search the current results */
+ for ( i=0 ; i<oSettings.asDataSearch.length ; i++ )
+ {
+ if ( ! rpSearch.test(oSettings.asDataSearch[i]) )
+ {
+ oSettings.aiDisplay.splice( i-iIndexCorrector, 1 );
+ iIndexCorrector++;
+ }
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Create an array which can be quickly search through
+ * @param {object} oSettings dataTables settings object
+ * @param {int} iMaster use the master data array - optional
+ * @memberof DataTable#oApi
+ */
+ function _fnBuildSearchArray ( oSettings, iMaster )
+ {
+ if ( !oSettings.oFeatures.bServerSide )
+ {
+ /* Clear out the old data */
+ oSettings.asDataSearch = [];
+
+ var aiFilterColumns = _fnGetColumns( oSettings, 'bSearchable' );
+ var aiIndex = (iMaster===1) ?
+ oSettings.aiDisplayMaster :
+ oSettings.aiDisplay;
+
+ for ( var i=0, iLen=aiIndex.length ; i<iLen ; i++ )
+ {
+ oSettings.asDataSearch[i] = _fnBuildSearchRow(
+ oSettings,
+ _fnGetRowData( oSettings, aiIndex[i], 'filter', aiFilterColumns )
+ );
+ }
+ }
+ }
+
+
+ /**
+ * Create a searchable string from a single data row
+ * @param {object} oSettings dataTables settings object
+ * @param {array} aData Row data array to use for the data to search
+ * @memberof DataTable#oApi
+ */
+ function _fnBuildSearchRow( oSettings, aData )
+ {
+ var sSearch = aData.join(' ');
+
+ /* If it looks like there is an HTML entity in the string, attempt to decode it */
+ if ( sSearch.indexOf('&') !== -1 )
+ {
+ sSearch = $('<div>').html(sSearch).text();
+ }
+
+ // Strip newline characters
+ return sSearch.replace( /[\n\r]/g, " " );
+ }
+
+ /**
+ * Build a regular expression object suitable for searching a table
+ * @param {string} sSearch string to search for
+ * @param {bool} bRegex treat as a regular expression or not
+ * @param {bool} bSmart perform smart filtering or not
+ * @param {bool} bCaseInsensitive Do case insensitive matching or not
+ * @returns {RegExp} constructed object
+ * @memberof DataTable#oApi
+ */
+ function _fnFilterCreateSearch( sSearch, bRegex, bSmart, bCaseInsensitive )
+ {
+ var asSearch, sRegExpString;
+
+ if ( bSmart )
+ {
+ /* Generate the regular expression to use. Something along the lines of:
+ * ^(?=.*?\bone\b)(?=.*?\btwo\b)(?=.*?\bthree\b).*$
+ */
+ asSearch = bRegex ? sSearch.split( ' ' ) : _fnEscapeRegex( sSearch ).split( ' ' );
+ sRegExpString = '^(?=.*?'+asSearch.join( ')(?=.*?' )+').*$';
+ return new RegExp( sRegExpString, bCaseInsensitive ? "i" : "" );
+ }
+ else
+ {
+ sSearch = bRegex ? sSearch : _fnEscapeRegex( sSearch );
+ return new RegExp( sSearch, bCaseInsensitive ? "i" : "" );
+ }
+ }
+
+
+ /**
+ * Convert raw data into something that the user can search on
+ * @param {string} sData data to be modified
+ * @param {string} sType data type
+ * @returns {string} search string
+ * @memberof DataTable#oApi
+ */
+ function _fnDataToSearch ( sData, sType )
+ {
+ if ( typeof DataTable.ext.ofnSearch[sType] === "function" )
+ {
+ return DataTable.ext.ofnSearch[sType]( sData );
+ }
+ else if ( sData === null )
+ {
+ return '';
+ }
+ else if ( sType == "html" )
+ {
+ return sData.replace(/[\r\n]/g," ").replace( /<.*?>/g, "" );
+ }
+ else if ( typeof sData === "string" )
+ {
+ return sData.replace(/[\r\n]/g," ");
+ }
+ return sData;
+ }
+
+
+ /**
+ * scape a string such that it can be used in a regular expression
+ * @param {string} sVal string to escape
+ * @returns {string} escaped string
+ * @memberof DataTable#oApi
+ */
+ function _fnEscapeRegex ( sVal )
+ {
+ var acEscape = [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\', '$', '^', '-' ];
+ var reReplace = new RegExp( '(\\' + acEscape.join('|\\') + ')', 'g' );
+ return sVal.replace(reReplace, '\\$1');
+ }
+
+
+ /**
+ * Generate the node required for the info display
+ * @param {object} oSettings dataTables settings object
+ * @returns {node} Information element
+ * @memberof DataTable#oApi
+ */
+ function _fnFeatureHtmlInfo ( oSettings )
+ {
+ var nInfo = document.createElement( 'div' );
+ nInfo.className = oSettings.oClasses.sInfo;
+
+ /* Actions that are to be taken once only for this feature */
+ if ( !oSettings.aanFeatures.i )
+ {
+ /* Add draw callback */
+ oSettings.aoDrawCallback.push( {
+ "fn": _fnUpdateInfo,
+ "sName": "information"
+ } );
+
+ /* Add id */
+ nInfo.id = oSettings.sTableId+'_info';
+ }
+ oSettings.nTable.setAttribute( 'aria-describedby', oSettings.sTableId+'_info' );
+
+ return nInfo;
+ }
+
+
+ /**
+ * Update the information elements in the display
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnUpdateInfo ( oSettings )
+ {
+ /* Show information about the table */
+ if ( !oSettings.oFeatures.bInfo || oSettings.aanFeatures.i.length === 0 )
+ {
+ return;
+ }
+
+ var
+ oLang = oSettings.oLanguage,
+ iStart = oSettings._iDisplayStart+1,
+ iEnd = oSettings.fnDisplayEnd(),
+ iMax = oSettings.fnRecordsTotal(),
+ iTotal = oSettings.fnRecordsDisplay(),
+ sOut;
+
+ if ( iTotal === 0 )
+ {
+ /* Empty record set */
+ sOut = oLang.sInfoEmpty;
+ }
+ else {
+ /* Normal record set */
+ sOut = oLang.sInfo;
+ }
+
+ if ( iTotal != iMax )
+ {
+ /* Record set after filtering */
+ sOut += ' ' + oLang.sInfoFiltered;
+ }
+
+ // Convert the macros
+ sOut += oLang.sInfoPostFix;
+ sOut = _fnInfoMacros( oSettings, sOut );
+
+ if ( oLang.fnInfoCallback !== null )
+ {
+ sOut = oLang.fnInfoCallback.call( oSettings.oInstance,
+ oSettings, iStart, iEnd, iMax, iTotal, sOut );
+ }
+
+ var n = oSettings.aanFeatures.i;
+ for ( var i=0, iLen=n.length ; i<iLen ; i++ )
+ {
+ $(n[i]).html( sOut );
+ }
+ }
+
+
+ function _fnInfoMacros ( oSettings, str )
+ {
+ var
+ iStart = oSettings._iDisplayStart+1,
+ sStart = oSettings.fnFormatNumber( iStart ),
+ iEnd = oSettings.fnDisplayEnd(),
+ sEnd = oSettings.fnFormatNumber( iEnd ),
+ iTotal = oSettings.fnRecordsDisplay(),
+ sTotal = oSettings.fnFormatNumber( iTotal ),
+ iMax = oSettings.fnRecordsTotal(),
+ sMax = oSettings.fnFormatNumber( iMax );
+
+ // When infinite scrolling, we are always starting at 1. _iDisplayStart is used only
+ // internally
+ if ( oSettings.oScroll.bInfinite )
+ {
+ sStart = oSettings.fnFormatNumber( 1 );
+ }
+
+ return str.
+ replace(/_START_/g, sStart).
+ replace(/_END_/g, sEnd).
+ replace(/_TOTAL_/g, sTotal).
+ replace(/_MAX_/g, sMax);
+ }
+
+
+
+ /**
+ * Draw the table for the first time, adding all required features
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnInitialise ( oSettings )
+ {
+ var i, iLen, iAjaxStart=oSettings.iInitDisplayStart;
+
+ /* Ensure that the table data is fully initialised */
+ if ( oSettings.bInitialised === false )
+ {
+ setTimeout( function(){ _fnInitialise( oSettings ); }, 200 );
+ return;
+ }
+
+ /* Show the display HTML options */
+ _fnAddOptionsHtml( oSettings );
+
+ /* Build and draw the header / footer for the table */
+ _fnBuildHead( oSettings );
+ _fnDrawHead( oSettings, oSettings.aoHeader );
+ if ( oSettings.nTFoot )
+ {
+ _fnDrawHead( oSettings, oSettings.aoFooter );
+ }
+
+ /* Okay to show that something is going on now */
+ _fnProcessingDisplay( oSettings, true );
+
+ /* Calculate sizes for columns */
+ if ( oSettings.oFeatures.bAutoWidth )
+ {
+ _fnCalculateColumnWidths( oSettings );
+ }
+
+ for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
+ {
+ if ( oSettings.aoColumns[i].sWidth !== null )
+ {
+ oSettings.aoColumns[i].nTh.style.width = _fnStringToCss( oSettings.aoColumns[i].sWidth );
+ }
+ }
+
+ /* If there is default sorting required - let's do it. The sort function will do the
+ * drawing for us. Otherwise we draw the table regardless of the Ajax source - this allows
+ * the table to look initialised for Ajax sourcing data (show 'loading' message possibly)
+ */
+ if ( oSettings.oFeatures.bSort )
+ {
+ _fnSort( oSettings );
+ }
+ else if ( oSettings.oFeatures.bFilter )
+ {
+ _fnFilterComplete( oSettings, oSettings.oPreviousSearch );
+ }
+ else
+ {
+ oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
+ _fnCalculateEnd( oSettings );
+ _fnDraw( oSettings );
+ }
+
+ /* if there is an ajax source load the data */
+ if ( oSettings.sAjaxSource !== null && !oSettings.oFeatures.bServerSide )
+ {
+ var aoData = [];
+ _fnServerParams( oSettings, aoData );
+ oSettings.fnServerData.call( oSettings.oInstance, oSettings.sAjaxSource, aoData, function(json) {
+ var aData = (oSettings.sAjaxDataProp !== "") ?
+ _fnGetObjectDataFn( oSettings.sAjaxDataProp )(json) : json;
+
+ /* Got the data - add it to the table */
+ for ( i=0 ; i<aData.length ; i++ )
+ {
+ _fnAddData( oSettings, aData[i] );
+ }
+
+ /* Reset the init display for cookie saving. We've already done a filter, and
+ * therefore cleared it before. So we need to make it appear 'fresh'
+ */
+ oSettings.iInitDisplayStart = iAjaxStart;
+
+ if ( oSettings.oFeatures.bSort )
+ {
+ _fnSort( oSettings );
+ }
+ else
+ {
+ oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
+ _fnCalculateEnd( oSettings );
+ _fnDraw( oSettings );
+ }
+
+ _fnProcessingDisplay( oSettings, false );
+ _fnInitComplete( oSettings, json );
+ }, oSettings );
+ return;
+ }
+
+ /* Server-side processing initialisation complete is done at the end of _fnDraw */
+ if ( !oSettings.oFeatures.bServerSide )
+ {
+ _fnProcessingDisplay( oSettings, false );
+ _fnInitComplete( oSettings );
+ }
+ }
+
+
+ /**
+ * Draw the table for the first time, adding all required features
+ * @param {object} oSettings dataTables settings object
+ * @param {object} [json] JSON from the server that completed the table, if using Ajax source
+ * with client-side processing (optional)
+ * @memberof DataTable#oApi
+ */
+ function _fnInitComplete ( oSettings, json )
+ {
+ oSettings._bInitComplete = true;
+ _fnCallbackFire( oSettings, 'aoInitComplete', 'init', [oSettings, json] );
+ }
+
+
+ /**
+ * Language compatibility - when certain options are given, and others aren't, we
+ * need to duplicate the values over, in order to provide backwards compatibility
+ * with older language files.
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnLanguageCompat( oLanguage )
+ {
+ var oDefaults = DataTable.defaults.oLanguage;
+
+ /* Backwards compatibility - if there is no sEmptyTable given, then use the same as
+ * sZeroRecords - assuming that is given.
+ */
+ if ( !oLanguage.sEmptyTable && oLanguage.sZeroRecords &&
+ oDefaults.sEmptyTable === "No data available in table" )
+ {
+ _fnMap( oLanguage, oLanguage, 'sZeroRecords', 'sEmptyTable' );
+ }
+
+ /* Likewise with loading records */
+ if ( !oLanguage.sLoadingRecords && oLanguage.sZeroRecords &&
+ oDefaults.sLoadingRecords === "Loading..." )
+ {
+ _fnMap( oLanguage, oLanguage, 'sZeroRecords', 'sLoadingRecords' );
+ }
+ }
+
+
+
+ /**
+ * Generate the node required for user display length changing
+ * @param {object} oSettings dataTables settings object
+ * @returns {node} Display length feature node
+ * @memberof DataTable#oApi
+ */
+ function _fnFeatureHtmlLength ( oSettings )
+ {
+ if ( oSettings.oScroll.bInfinite )
+ {
+ return null;
+ }
+
+ /* This can be overruled by not using the _MENU_ var/macro in the language variable */
+ var sName = 'name="'+oSettings.sTableId+'_length"';
+ var sStdMenu = '<select size="1" '+sName+'>';
+ var i, iLen;
+ var aLengthMenu = oSettings.aLengthMenu;
+
+ if ( aLengthMenu.length == 2 && typeof aLengthMenu[0] === 'object' &&
+ typeof aLengthMenu[1] === 'object' )
+ {
+ for ( i=0, iLen=aLengthMenu[0].length ; i<iLen ; i++ )
+ {
+ sStdMenu += '<option value="'+aLengthMenu[0][i]+'">'+aLengthMenu[1][i]+'</option>';
+ }
+ }
+ else
+ {
+ for ( i=0, iLen=aLengthMenu.length ; i<iLen ; i++ )
+ {
+ sStdMenu += '<option value="'+aLengthMenu[i]+'">'+aLengthMenu[i]+'</option>';
+ }
+ }
+ sStdMenu += '</select>';
+
+ var nLength = document.createElement( 'div' );
+ if ( !oSettings.aanFeatures.l )
+ {
+ nLength.id = oSettings.sTableId+'_length';
+ }
+ nLength.className = oSettings.oClasses.sLength;
+ nLength.innerHTML = '<label>'+oSettings.oLanguage.sLengthMenu.replace( '_MENU_', sStdMenu )+'</label>';
+
+ /*
+ * Set the length to the current display length - thanks to Andrea Pavlovic for this fix,
+ * and Stefan Skopnik for fixing the fix!
+ */
+ $('select option[value="'+oSettings._iDisplayLength+'"]', nLength).attr("selected", true);
+
+ $('select', nLength).bind( 'change.DT', function(e) {
+ var iVal = $(this).val();
+
+ /* Update all other length options for the new display */
+ var n = oSettings.aanFeatures.l;
+ for ( i=0, iLen=n.length ; i<iLen ; i++ )
+ {
+ if ( n[i] != this.parentNode )
+ {
+ $('select', n[i]).val( iVal );
+ }
+ }
+
+ /* Redraw the table */
+ oSettings._iDisplayLength = parseInt(iVal, 10);
+ _fnCalculateEnd( oSettings );
+
+ /* If we have space to show extra rows (backing up from the end point - then do so */
+ if ( oSettings.fnDisplayEnd() == oSettings.fnRecordsDisplay() )
+ {
+ oSettings._iDisplayStart = oSettings.fnDisplayEnd() - oSettings._iDisplayLength;
+ if ( oSettings._iDisplayStart < 0 )
+ {
+ oSettings._iDisplayStart = 0;
+ }
+ }
+
+ if ( oSettings._iDisplayLength == -1 )
+ {
+ oSettings._iDisplayStart = 0;
+ }
+
+ _fnDraw( oSettings );
+ } );
+
+
+ $('select', nLength).attr('aria-controls', oSettings.sTableId);
+
+ return nLength;
+ }
+
+
+ /**
+ * Recalculate the end point based on the start point
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnCalculateEnd( oSettings )
+ {
+ if ( oSettings.oFeatures.bPaginate === false )
+ {
+ oSettings._iDisplayEnd = oSettings.aiDisplay.length;
+ }
+ else
+ {
+ /* Set the end point of the display - based on how many elements there are
+ * still to display
+ */
+ if ( oSettings._iDisplayStart + oSettings._iDisplayLength > oSettings.aiDisplay.length ||
+ oSettings._iDisplayLength == -1 )
+ {
+ oSettings._iDisplayEnd = oSettings.aiDisplay.length;
+ }
+ else
+ {
+ oSettings._iDisplayEnd = oSettings._iDisplayStart + oSettings._iDisplayLength;
+ }
+ }
+ }
+
+
+
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Note that most of the paging logic is done in
+ * DataTable.ext.oPagination
+ */
+
+ /**
+ * Generate the node required for default pagination
+ * @param {object} oSettings dataTables settings object
+ * @returns {node} Pagination feature node
+ * @memberof DataTable#oApi
+ */
+ function _fnFeatureHtmlPaginate ( oSettings )
+ {
+ if ( oSettings.oScroll.bInfinite )
+ {
+ return null;
+ }
+
+ var nPaginate = document.createElement( 'div' );
+ nPaginate.className = oSettings.oClasses.sPaging+oSettings.sPaginationType;
+
+ DataTable.ext.oPagination[ oSettings.sPaginationType ].fnInit( oSettings, nPaginate,
+ function( oSettings ) {
+ _fnCalculateEnd( oSettings );
+ _fnDraw( oSettings );
+ }
+ );
+
+ /* Add a draw callback for the pagination on first instance, to update the paging display */
+ if ( !oSettings.aanFeatures.p )
+ {
+ oSettings.aoDrawCallback.push( {
+ "fn": function( oSettings ) {
+ DataTable.ext.oPagination[ oSettings.sPaginationType ].fnUpdate( oSettings, function( oSettings ) {
+ _fnCalculateEnd( oSettings );
+ _fnDraw( oSettings );
+ } );
+ },
+ "sName": "pagination"
+ } );
+ }
+ return nPaginate;
+ }
+
+
+ /**
+ * Alter the display settings to change the page
+ * @param {object} oSettings dataTables settings object
+ * @param {string|int} mAction Paging action to take: "first", "previous", "next" or "last"
+ * or page number to jump to (integer)
+ * @returns {bool} true page has changed, false - no change (no effect) eg 'first' on page 1
+ * @memberof DataTable#oApi
+ */
+ function _fnPageChange ( oSettings, mAction )
+ {
+ var iOldStart = oSettings._iDisplayStart;
+
+ if ( typeof mAction === "number" )
+ {
+ oSettings._iDisplayStart = mAction * oSettings._iDisplayLength;
+ if ( oSettings._iDisplayStart > oSettings.fnRecordsDisplay() )
+ {
+ oSettings._iDisplayStart = 0;
+ }
+ }
+ else if ( mAction == "first" )
+ {
+ oSettings._iDisplayStart = 0;
+ }
+ else if ( mAction == "previous" )
+ {
+ oSettings._iDisplayStart = oSettings._iDisplayLength>=0 ?
+ oSettings._iDisplayStart - oSettings._iDisplayLength :
+ 0;
+
+ /* Correct for under-run */
+ if ( oSettings._iDisplayStart < 0 )
+ {
+ oSettings._iDisplayStart = 0;
+ }
+ }
+ else if ( mAction == "next" )
+ {
+ if ( oSettings._iDisplayLength >= 0 )
+ {
+ /* Make sure we are not over running the display array */
+ if ( oSettings._iDisplayStart + oSettings._iDisplayLength < oSettings.fnRecordsDisplay() )
+ {
+ oSettings._iDisplayStart += oSettings._iDisplayLength;
+ }
+ }
+ else
+ {
+ oSettings._iDisplayStart = 0;
+ }
+ }
+ else if ( mAction == "last" )
+ {
+ if ( oSettings._iDisplayLength >= 0 )
+ {
+ var iPages = parseInt( (oSettings.fnRecordsDisplay()-1) / oSettings._iDisplayLength, 10 ) + 1;
+ oSettings._iDisplayStart = (iPages-1) * oSettings._iDisplayLength;
+ }
+ else
+ {
+ oSettings._iDisplayStart = 0;
+ }
+ }
+ else
+ {
+ _fnLog( oSettings, 0, "Unknown paging action: "+mAction );
+ }
+ $(oSettings.oInstance).trigger('page', oSettings);
+
+ return iOldStart != oSettings._iDisplayStart;
+ }
+
+
+
+ /**
+ * Generate the node required for the processing node
+ * @param {object} oSettings dataTables settings object
+ * @returns {node} Processing element
+ * @memberof DataTable#oApi
+ */
+ function _fnFeatureHtmlProcessing ( oSettings )
+ {
+ var nProcessing = document.createElement( 'div' );
+
+ if ( !oSettings.aanFeatures.r )
+ {
+ nProcessing.id = oSettings.sTableId+'_processing';
+ }
+ nProcessing.innerHTML = oSettings.oLanguage.sProcessing;
+ nProcessing.className = oSettings.oClasses.sProcessing;
+ oSettings.nTable.parentNode.insertBefore( nProcessing, oSettings.nTable );
+
+ return nProcessing;
+ }
+
+
+ /**
+ * Display or hide the processing indicator
+ * @param {object} oSettings dataTables settings object
+ * @param {bool} bShow Show the processing indicator (true) or not (false)
+ * @memberof DataTable#oApi
+ */
+ function _fnProcessingDisplay ( oSettings, bShow )
+ {
+ if ( oSettings.oFeatures.bProcessing )
+ {
+ var an = oSettings.aanFeatures.r;
+ for ( var i=0, iLen=an.length ; i<iLen ; i++ )
+ {
+ an[i].style.visibility = bShow ? "visible" : "hidden";
+ }
+ }
+
+ $(oSettings.oInstance).trigger('processing', [oSettings, bShow]);
+ }
+
+ /**
+ * Add any control elements for the table - specifically scrolling
+ * @param {object} oSettings dataTables settings object
+ * @returns {node} Node to add to the DOM
+ * @memberof DataTable#oApi
+ */
+ function _fnFeatureHtmlTable ( oSettings )
+ {
+ /* Check if scrolling is enabled or not - if not then leave the DOM unaltered */
+ if ( oSettings.oScroll.sX === "" && oSettings.oScroll.sY === "" )
+ {
+ return oSettings.nTable;
+ }
+
+ /*
+ * The HTML structure that we want to generate in this function is:
+ * div - nScroller
+ * div - nScrollHead
+ * div - nScrollHeadInner
+ * table - nScrollHeadTable
+ * thead - nThead
+ * div - nScrollBody
+ * table - oSettings.nTable
+ * thead - nTheadSize
+ * tbody - nTbody
+ * div - nScrollFoot
+ * div - nScrollFootInner
+ * table - nScrollFootTable
+ * tfoot - nTfoot
+ */
+ var
+ nScroller = document.createElement('div'),
+ nScrollHead = document.createElement('div'),
+ nScrollHeadInner = document.createElement('div'),
+ nScrollBody = document.createElement('div'),
+ nScrollFoot = document.createElement('div'),
+ nScrollFootInner = document.createElement('div'),
+ nScrollHeadTable = oSettings.nTable.cloneNode(false),
+ nScrollFootTable = oSettings.nTable.cloneNode(false),
+ nThead = oSettings.nTable.getElementsByTagName('thead')[0],
+ nTfoot = oSettings.nTable.getElementsByTagName('tfoot').length === 0 ? null :
+ oSettings.nTable.getElementsByTagName('tfoot')[0],
+ oClasses = oSettings.oClasses;
+
+ nScrollHead.appendChild( nScrollHeadInner );
+ nScrollFoot.appendChild( nScrollFootInner );
+ nScrollBody.appendChild( oSettings.nTable );
+ nScroller.appendChild( nScrollHead );
+ nScroller.appendChild( nScrollBody );
+ nScrollHeadInner.appendChild( nScrollHeadTable );
+ nScrollHeadTable.appendChild( nThead );
+ if ( nTfoot !== null )
+ {
+ nScroller.appendChild( nScrollFoot );
+ nScrollFootInner.appendChild( nScrollFootTable );
+ nScrollFootTable.appendChild( nTfoot );
+ }
+
+ nScroller.className = oClasses.sScrollWrapper;
+ nScrollHead.className = oClasses.sScrollHead;
+ nScrollHeadInner.className = oClasses.sScrollHeadInner;
+ nScrollBody.className = oClasses.sScrollBody;
+ nScrollFoot.className = oClasses.sScrollFoot;
+ nScrollFootInner.className = oClasses.sScrollFootInner;
+
+ if ( oSettings.oScroll.bAutoCss )
+ {
+ nScrollHead.style.overflow = "hidden";
+ nScrollHead.style.position = "relative";
+ nScrollFoot.style.overflow = "hidden";
+ nScrollBody.style.overflow = "auto";
+ }
+
+ nScrollHead.style.border = "0";
+ nScrollHead.style.width = "100%";
+ nScrollFoot.style.border = "0";
+ nScrollHeadInner.style.width = oSettings.oScroll.sXInner !== "" ?
+ oSettings.oScroll.sXInner : "100%"; /* will be overwritten */
+
+ /* Modify attributes to respect the clones */
+ nScrollHeadTable.removeAttribute('id');
+ nScrollHeadTable.style.marginLeft = "0";
+ oSettings.nTable.style.marginLeft = "0";
+ if ( nTfoot !== null )
+ {
+ nScrollFootTable.removeAttribute('id');
+ nScrollFootTable.style.marginLeft = "0";
+ }
+
+ /* Move caption elements from the body to the header, footer or leave where it is
+ * depending on the configuration. Note that the DTD says there can be only one caption */
+ var nCaption = $(oSettings.nTable).children('caption');
+ if ( nCaption.length > 0 )
+ {
+ nCaption = nCaption[0];
+ if ( nCaption._captionSide === "top" )
+ {
+ nScrollHeadTable.appendChild( nCaption );
+ }
+ else if ( nCaption._captionSide === "bottom" && nTfoot )
+ {
+ nScrollFootTable.appendChild( nCaption );
+ }
+ }
+
+ /*
+ * Sizing
+ */
+ /* When x-scrolling add the width and a scroller to move the header with the body */
+ if ( oSettings.oScroll.sX !== "" )
+ {
+ nScrollHead.style.width = _fnStringToCss( oSettings.oScroll.sX );
+ nScrollBody.style.width = _fnStringToCss( oSettings.oScroll.sX );
+
+ if ( nTfoot !== null )
+ {
+ nScrollFoot.style.width = _fnStringToCss( oSettings.oScroll.sX );
+ }
+
+ /* When the body is scrolled, then we also want to scroll the headers */
+ $(nScrollBody).scroll( function (e) {
+ nScrollHead.scrollLeft = this.scrollLeft;
+
+ if ( nTfoot !== null )
+ {
+ nScrollFoot.scrollLeft = this.scrollLeft;
+ }
+ } );
+ }
+
+ /* When yscrolling, add the height */
+ if ( oSettings.oScroll.sY !== "" )
+ {
+ nScrollBody.style.height = _fnStringToCss( oSettings.oScroll.sY );
+ }
+
+ /* Redraw - align columns across the tables */
+ oSettings.aoDrawCallback.push( {
+ "fn": _fnScrollDraw,
+ "sName": "scrolling"
+ } );
+
+ /* Infinite scrolling event handlers */
+ if ( oSettings.oScroll.bInfinite )
+ {
+ $(nScrollBody).scroll( function() {
+ /* Use a blocker to stop scrolling from loading more data while other data is still loading */
+ if ( !oSettings.bDrawing && $(this).scrollTop() !== 0 )
+ {
+ /* Check if we should load the next data set */
+ if ( $(this).scrollTop() + $(this).height() >
+ $(oSettings.nTable).height() - oSettings.oScroll.iLoadGap )
+ {
+ /* Only do the redraw if we have to - we might be at the end of the data */
+ if ( oSettings.fnDisplayEnd() < oSettings.fnRecordsDisplay() )
+ {
+ _fnPageChange( oSettings, 'next' );
+ _fnCalculateEnd( oSettings );
+ _fnDraw( oSettings );
+ }
+ }
+ }
+ } );
+ }
+
+ oSettings.nScrollHead = nScrollHead;
+ oSettings.nScrollFoot = nScrollFoot;
+
+ return nScroller;
+ }
+
+
+ /**
+ * Update the various tables for resizing. It's a bit of a pig this function, but
+ * basically the idea to:
+ * 1. Re-create the table inside the scrolling div
+ * 2. Take live measurements from the DOM
+ * 3. Apply the measurements
+ * 4. Clean up
+ * @param {object} o dataTables settings object
+ * @returns {node} Node to add to the DOM
+ * @memberof DataTable#oApi
+ */
+ function _fnScrollDraw ( o )
+ {
+ var
+ nScrollHeadInner = o.nScrollHead.getElementsByTagName('div')[0],
+ nScrollHeadTable = nScrollHeadInner.getElementsByTagName('table')[0],
+ nScrollBody = o.nTable.parentNode,
+ i, iLen, j, jLen, anHeadToSize, anHeadSizers, anFootSizers, anFootToSize, oStyle, iVis,
+ nTheadSize, nTfootSize,
+ iWidth, aApplied=[], aAppliedFooter=[], iSanityWidth,
+ nScrollFootInner = (o.nTFoot !== null) ? o.nScrollFoot.getElementsByTagName('div')[0] : null,
+ nScrollFootTable = (o.nTFoot !== null) ? nScrollFootInner.getElementsByTagName('table')[0] : null,
+ ie67 = o.oBrowser.bScrollOversize,
+ zeroOut = function(nSizer) {
+ oStyle = nSizer.style;
+ oStyle.paddingTop = "0";
+ oStyle.paddingBottom = "0";
+ oStyle.borderTopWidth = "0";
+ oStyle.borderBottomWidth = "0";
+ oStyle.height = 0;
+ };
+
+ /*
+ * 1. Re-create the table inside the scrolling div
+ */
+
+ /* Remove the old minimised thead and tfoot elements in the inner table */
+ $(o.nTable).children('thead, tfoot').remove();
+
+ /* Clone the current header and footer elements and then place it into the inner table */
+ nTheadSize = $(o.nTHead).clone()[0];
+ o.nTable.insertBefore( nTheadSize, o.nTable.childNodes[0] );
+ anHeadToSize = o.nTHead.getElementsByTagName('tr');
+ anHeadSizers = nTheadSize.getElementsByTagName('tr');
+
+ if ( o.nTFoot !== null )
+ {
+ nTfootSize = $(o.nTFoot).clone()[0];
+ o.nTable.insertBefore( nTfootSize, o.nTable.childNodes[1] );
+ anFootToSize = o.nTFoot.getElementsByTagName('tr');
+ anFootSizers = nTfootSize.getElementsByTagName('tr');
+ }
+
+ /*
+ * 2. Take live measurements from the DOM - do not alter the DOM itself!
+ */
+
+ /* Remove old sizing and apply the calculated column widths
+ * Get the unique column headers in the newly created (cloned) header. We want to apply the
+ * calculated sizes to this header
+ */
+ if ( o.oScroll.sX === "" )
+ {
+ nScrollBody.style.width = '100%';
+ nScrollHeadInner.parentNode.style.width = '100%';
+ }
+
+ var nThs = _fnGetUniqueThs( o, nTheadSize );
+ for ( i=0, iLen=nThs.length ; i<iLen ; i++ )
+ {
+ iVis = _fnVisibleToColumnIndex( o, i );
+ nThs[i].style.width = o.aoColumns[iVis].sWidth;
+ }
+
+ if ( o.nTFoot !== null )
+ {
+ _fnApplyToChildren( function(n) {
+ n.style.width = "";
+ }, anFootSizers );
+ }
+
+ // If scroll collapse is enabled, when we put the headers back into the body for sizing, we
+ // will end up forcing the scrollbar to appear, making our measurements wrong for when we
+ // then hide it (end of this function), so add the header height to the body scroller.
+ if ( o.oScroll.bCollapse && o.oScroll.sY !== "" )
+ {
+ nScrollBody.style.height = (nScrollBody.offsetHeight + o.nTHead.offsetHeight)+"px";
+ }
+
+ /* Size the table as a whole */
+ iSanityWidth = $(o.nTable).outerWidth();
+ if ( o.oScroll.sX === "" )
+ {
+ /* No x scrolling */
+ o.nTable.style.width = "100%";
+
+ /* I know this is rubbish - but IE7 will make the width of the table when 100% include
+ * the scrollbar - which is shouldn't. When there is a scrollbar we need to take this
+ * into account.
+ */
+ if ( ie67 && ($('tbody', nScrollBody).height() > nScrollBody.offsetHeight ||
+ $(nScrollBody).css('overflow-y') == "scroll") )
+ {
+ o.nTable.style.width = _fnStringToCss( $(o.nTable).outerWidth() - o.oScroll.iBarWidth);
+ }
+ }
+ else
+ {
+ if ( o.oScroll.sXInner !== "" )
+ {
+ /* x scroll inner has been given - use it */
+ o.nTable.style.width = _fnStringToCss(o.oScroll.sXInner);
+ }
+ else if ( iSanityWidth == $(nScrollBody).width() &&
+ $(nScrollBody).height() < $(o.nTable).height() )
+ {
+ /* There is y-scrolling - try to take account of the y scroll bar */
+ o.nTable.style.width = _fnStringToCss( iSanityWidth-o.oScroll.iBarWidth );
+ if ( $(o.nTable).outerWidth() > iSanityWidth-o.oScroll.iBarWidth )
+ {
+ /* Not possible to take account of it */
+ o.nTable.style.width = _fnStringToCss( iSanityWidth );
+ }
+ }
+ else
+ {
+ /* All else fails */
+ o.nTable.style.width = _fnStringToCss( iSanityWidth );
+ }
+ }
+
+ /* Recalculate the sanity width - now that we've applied the required width, before it was
+ * a temporary variable. This is required because the column width calculation is done
+ * before this table DOM is created.
+ */
+ iSanityWidth = $(o.nTable).outerWidth();
+
+ /* We want the hidden header to have zero height, so remove padding and borders. Then
+ * set the width based on the real headers
+ */
+
+ // Apply all styles in one pass. Invalidates layout only once because we don't read any
+ // DOM properties.
+ _fnApplyToChildren( zeroOut, anHeadSizers );
+
+ // Read all widths in next pass. Forces layout only once because we do not change
+ // any DOM properties.
+ _fnApplyToChildren( function(nSizer) {
+ aApplied.push( _fnStringToCss( $(nSizer).width() ) );
+ }, anHeadSizers );
+
+ // Apply all widths in final pass. Invalidates layout only once because we do not
+ // read any DOM properties.
+ _fnApplyToChildren( function(nToSize, i) {
+ nToSize.style.width = aApplied[i];
+ }, anHeadToSize );
+
+ $(anHeadSizers).height(0);
+
+ /* Same again with the footer if we have one */
+ if ( o.nTFoot !== null )
+ {
+ _fnApplyToChildren( zeroOut, anFootSizers );
+
+ _fnApplyToChildren( function(nSizer) {
+ aAppliedFooter.push( _fnStringToCss( $(nSizer).width() ) );
+ }, anFootSizers );
+
+ _fnApplyToChildren( function(nToSize, i) {
+ nToSize.style.width = aAppliedFooter[i];
+ }, anFootToSize );
+
+ $(anFootSizers).height(0);
+ }
+
+ /*
+ * 3. Apply the measurements
+ */
+
+ /* "Hide" the header and footer that we used for the sizing. We want to also fix their width
+ * to what they currently are
+ */
+ _fnApplyToChildren( function(nSizer, i) {
+ nSizer.innerHTML = "";
+ nSizer.style.width = aApplied[i];
+ //fix column align
+ nSizer.style.minWidth =nSizer.style.width;
+ }, anHeadSizers );
+
+ if ( o.nTFoot !== null )
+ {
+ _fnApplyToChildren( function(nSizer, i) {
+ nSizer.innerHTML = "";
+ nSizer.style.width = aAppliedFooter[i];
+ }, anFootSizers );
+ }
+
+ /* Sanity check that the table is of a sensible width. If not then we are going to get
+ * misalignment - try to prevent this by not allowing the table to shrink below its min width
+ */
+ if ( $(o.nTable).outerWidth() < iSanityWidth )
+ {
+ /* The min width depends upon if we have a vertical scrollbar visible or not */
+ var iCorrection = ((nScrollBody.scrollHeight > nScrollBody.offsetHeight ||
+ $(nScrollBody).css('overflow-y') == "scroll")) ?
+ iSanityWidth+o.oScroll.iBarWidth : iSanityWidth;
+
+ /* IE6/7 are a law unto themselves... */
+ if ( ie67 && (nScrollBody.scrollHeight >
+ nScrollBody.offsetHeight || $(nScrollBody).css('overflow-y') == "scroll") )
+ {
+ o.nTable.style.width = _fnStringToCss( iCorrection-o.oScroll.iBarWidth );
+ }
+
+ /* Apply the calculated minimum width to the table wrappers */
+ nScrollBody.style.width = _fnStringToCss( iCorrection );
+ o.nScrollHead.style.width = _fnStringToCss( iCorrection );
+
+ if ( o.nTFoot !== null )
+ {
+ o.nScrollFoot.style.width = _fnStringToCss( iCorrection );
+ }
+
+ /* And give the user a warning that we've stopped the table getting too small */
+ if ( o.oScroll.sX === "" )
+ {
+ _fnLog( o, 1, "The table cannot fit into the current element which will cause column"+
+ " misalignment. The table has been drawn at its minimum possible width." );
+ }
+ else if ( o.oScroll.sXInner !== "" )
+ {
+ _fnLog( o, 1, "The table cannot fit into the current element which will cause column"+
+ " misalignment. Increase the sScrollXInner value or remove it to allow automatic"+
+ " calculation" );
+ }
+ }
+ else
+ {
+ nScrollBody.style.width = _fnStringToCss( '100%' );
+ o.nScrollHead.style.width = _fnStringToCss( '100%' );
+
+ if ( o.nTFoot !== null )
+ {
+ o.nScrollFoot.style.width = _fnStringToCss( '100%' );
+ }
+ }
+
+
+ /*
+ * 4. Clean up
+ */
+ if ( o.oScroll.sY === "" )
+ {
+ /* IE7< puts a vertical scrollbar in place (when it shouldn't be) due to subtracting
+ * the scrollbar height from the visible display, rather than adding it on. We need to
+ * set the height in order to sort this. Don't want to do it in any other browsers.
+ */
+ if ( ie67 )
+ {
+ nScrollBody.style.height = _fnStringToCss( o.nTable.offsetHeight+o.oScroll.iBarWidth );
+ }
+ }
+
+ if ( o.oScroll.sY !== "" && o.oScroll.bCollapse )
+ {
+ nScrollBody.style.height = _fnStringToCss( o.oScroll.sY );
+
+ var iExtra = (o.oScroll.sX !== "" && o.nTable.offsetWidth > nScrollBody.offsetWidth) ?
+ o.oScroll.iBarWidth : 0;
+ if ( o.nTable.offsetHeight < nScrollBody.offsetHeight )
+ {
+ nScrollBody.style.height = _fnStringToCss( o.nTable.offsetHeight+iExtra );
+ }
+ }
+
+ /* Finally set the width's of the header and footer tables */
+ var iOuterWidth = $(o.nTable).outerWidth();
+ nScrollHeadTable.style.width = _fnStringToCss( iOuterWidth );
+ nScrollHeadInner.style.width = _fnStringToCss( iOuterWidth );
+
+ // Figure out if there are scrollbar present - if so then we need a the header and footer to
+ // provide a bit more space to allow "overflow" scrolling (i.e. past the scrollbar)
+ var bScrolling = $(o.nTable).height() > nScrollBody.clientHeight || $(nScrollBody).css('overflow-y') == "scroll";
+ nScrollHeadInner.style.paddingRight = bScrolling ? o.oScroll.iBarWidth+"px" : "0px";
+
+ if ( o.nTFoot !== null )
+ {
+ nScrollFootTable.style.width = _fnStringToCss( iOuterWidth );
+ nScrollFootInner.style.width = _fnStringToCss( iOuterWidth );
+ nScrollFootInner.style.paddingRight = bScrolling ? o.oScroll.iBarWidth+"px" : "0px";
+ }
+
+ /* Adjust the position of the header in case we loose the y-scrollbar */
+ $(nScrollBody).scroll();
+
+ /* If sorting or filtering has occurred, jump the scrolling back to the top */
+ if ( o.bSorted || o.bFiltered )
+ {
+ nScrollBody.scrollTop = 0;
+ }
+ }
+
+
+ /**
+ * Apply a given function to the display child nodes of an element array (typically
+ * TD children of TR rows
+ * @param {function} fn Method to apply to the objects
+ * @param array {nodes} an1 List of elements to look through for display children
+ * @param array {nodes} an2 Another list (identical structure to the first) - optional
+ * @memberof DataTable#oApi
+ */
+ function _fnApplyToChildren( fn, an1, an2 )
+ {
+ var index=0, i=0, iLen=an1.length;
+ var nNode1, nNode2;
+
+ while ( i < iLen )
+ {
+ nNode1 = an1[i].firstChild;
+ nNode2 = an2 ? an2[i].firstChild : null;
+ while ( nNode1 )
+ {
+ if ( nNode1.nodeType === 1 )
+ {
+ if ( an2 )
+ {
+ fn( nNode1, nNode2, index );
+ }
+ else
+ {
+ fn( nNode1, index );
+ }
+ index++;
+ }
+ nNode1 = nNode1.nextSibling;
+ nNode2 = an2 ? nNode2.nextSibling : null;
+ }
+ i++;
+ }
+ }
+
+ /**
+ * Convert a CSS unit width to pixels (e.g. 2em)
+ * @param {string} sWidth width to be converted
+ * @param {node} nParent parent to get the with for (required for relative widths) - optional
+ * @returns {int} iWidth width in pixels
+ * @memberof DataTable#oApi
+ */
+ function _fnConvertToWidth ( sWidth, nParent )
+ {
+ if ( !sWidth || sWidth === null || sWidth === '' )
+ {
+ return 0;
+ }
+
+ if ( !nParent )
+ {
+ nParent = document.body;
+ }
+
+ var iWidth;
+ var nTmp = document.createElement( "div" );
+ nTmp.style.width = _fnStringToCss( sWidth );
+
+ nParent.appendChild( nTmp );
+ iWidth = nTmp.offsetWidth;
+ nParent.removeChild( nTmp );
+
+ return ( iWidth );
+ }
+
+
+ /**
+ * Calculate the width of columns for the table
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnCalculateColumnWidths ( oSettings )
+ {
+ var iTableWidth = oSettings.nTable.offsetWidth;
+ var iUserInputs = 0;
+ var iTmpWidth;
+ var iVisibleColumns = 0;
+ var iColums = oSettings.aoColumns.length;
+ var i, iIndex, iCorrector, iWidth;
+ var oHeaders = $('th', oSettings.nTHead);
+ var widthAttr = oSettings.nTable.getAttribute('width');
+ var nWrapper = oSettings.nTable.parentNode;
+
+ /* Convert any user input sizes into pixel sizes */
+ for ( i=0 ; i<iColums ; i++ )
+ {
+ if ( oSettings.aoColumns[i].bVisible )
+ {
+ iVisibleColumns++;
+
+ if ( oSettings.aoColumns[i].sWidth !== null )
+ {
+ iTmpWidth = _fnConvertToWidth( oSettings.aoColumns[i].sWidthOrig,
+ nWrapper );
+ if ( iTmpWidth !== null )
+ {
+ oSettings.aoColumns[i].sWidth = _fnStringToCss( iTmpWidth );
+ }
+
+ iUserInputs++;
+ }
+ }
+ }
+
+ /* If the number of columns in the DOM equals the number that we have to process in
+ * DataTables, then we can use the offsets that are created by the web-browser. No custom
+ * sizes can be set in order for this to happen, nor scrolling used
+ */
+ if ( iColums == oHeaders.length && iUserInputs === 0 && iVisibleColumns == iColums &&
+ oSettings.oScroll.sX === "" && oSettings.oScroll.sY === "" )
+ {
+ for ( i=0 ; i<oSettings.aoColumns.length ; i++ )
+ {
+ iTmpWidth = $(oHeaders[i]).width();
+ if ( iTmpWidth !== null )
+ {
+ oSettings.aoColumns[i].sWidth = _fnStringToCss( iTmpWidth );
+ }
+ }
+ }
+ else
+ {
+ /* Otherwise we are going to have to do some calculations to get the width of each column.
+ * Construct a 1 row table with the widest node in the data, and any user defined widths,
+ * then insert it into the DOM and allow the browser to do all the hard work of
+ * calculating table widths.
+ */
+ var
+ nCalcTmp = oSettings.nTable.cloneNode( false ),
+ nTheadClone = oSettings.nTHead.cloneNode(true),
+ nBody = document.createElement( 'tbody' ),
+ nTr = document.createElement( 'tr' ),
+ nDivSizing;
+
+ nCalcTmp.removeAttribute( "id" );
+ nCalcTmp.appendChild( nTheadClone );
+ if ( oSettings.nTFoot !== null )
+ {
+ nCalcTmp.appendChild( oSettings.nTFoot.cloneNode(true) );
+ _fnApplyToChildren( function(n) {
+ n.style.width = "";
+ }, nCalcTmp.getElementsByTagName('tr') );
+ }
+
+ nCalcTmp.appendChild( nBody );
+ nBody.appendChild( nTr );
+
+ /* Remove any sizing that was previously applied by the styles */
+ var jqColSizing = $('thead th', nCalcTmp);
+ if ( jqColSizing.length === 0 )
+ {
+ jqColSizing = $('tbody tr:eq(0)>td', nCalcTmp);
+ }
+
+ /* Apply custom sizing to the cloned header */
+ var nThs = _fnGetUniqueThs( oSettings, nTheadClone );
+ iCorrector = 0;
+ for ( i=0 ; i<iColums ; i++ )
+ {
+ var oColumn = oSettings.aoColumns[i];
+ if ( oColumn.bVisible && oColumn.sWidthOrig !== null && oColumn.sWidthOrig !== "" )
+ {
+ nThs[i-iCorrector].style.width = _fnStringToCss( oColumn.sWidthOrig );
+ }
+ else if ( oColumn.bVisible )
+ {
+ nThs[i-iCorrector].style.width = "";
+ }
+ else
+ {
+ iCorrector++;
+ }
+ }
+
+ /* Find the biggest td for each column and put it into the table */
+ for ( i=0 ; i<iColums ; i++ )
+ {
+ if ( oSettings.aoColumns[i].bVisible )
+ {
+ var nTd = _fnGetWidestNode( oSettings, i );
+ if ( nTd !== null )
+ {
+ nTd = nTd.cloneNode(true);
+ if ( oSettings.aoColumns[i].sContentPadding !== "" )
+ {
+ nTd.innerHTML += oSettings.aoColumns[i].sContentPadding;
+ }
+ nTr.appendChild( nTd );
+ }
+ }
+ }
+
+ /* Build the table and 'display' it */
+ nWrapper.appendChild( nCalcTmp );
+
+ /* When scrolling (X or Y) we want to set the width of the table as appropriate. However,
+ * when not scrolling leave the table width as it is. This results in slightly different,
+ * but I think correct behaviour
+ */
+ if ( oSettings.oScroll.sX !== "" && oSettings.oScroll.sXInner !== "" )
+ {
+ nCalcTmp.style.width = _fnStringToCss(oSettings.oScroll.sXInner);
+ }
+ else if ( oSettings.oScroll.sX !== "" )
+ {
+ nCalcTmp.style.width = "";
+ if ( $(nCalcTmp).width() < nWrapper.offsetWidth )
+ {
+ nCalcTmp.style.width = _fnStringToCss( nWrapper.offsetWidth );
+ }
+ }
+ else if ( oSettings.oScroll.sY !== "" )
+ {
+ nCalcTmp.style.width = _fnStringToCss( nWrapper.offsetWidth );
+ }
+ else if ( widthAttr )
+ {
+ nCalcTmp.style.width = _fnStringToCss( widthAttr );
+ }
+ nCalcTmp.style.visibility = "hidden";
+
+ /* Scrolling considerations */
+ _fnScrollingWidthAdjust( oSettings, nCalcTmp );
+
+ /* Read the width's calculated by the browser and store them for use by the caller. We
+ * first of all try to use the elements in the body, but it is possible that there are
+ * no elements there, under which circumstances we use the header elements
+ */
+ var oNodes = $("tbody tr:eq(0)", nCalcTmp).children();
+ if ( oNodes.length === 0 )
+ {
+ oNodes = _fnGetUniqueThs( oSettings, $('thead', nCalcTmp)[0] );
+ }
+
+ /* Browsers need a bit of a hand when a width is assigned to any columns when
+ * x-scrolling as they tend to collapse the table to the min-width, even if
+ * we sent the column widths. So we need to keep track of what the table width
+ * should be by summing the user given values, and the automatic values
+ */
+ if ( oSettings.oScroll.sX !== "" )
+ {
+ var iTotal = 0;
+ iCorrector = 0;
+ for ( i=0 ; i<oSettings.aoColumns.length ; i++ )
+ {
+ if ( oSettings.aoColumns[i].bVisible )
+ {
+ if ( oSettings.aoColumns[i].sWidthOrig === null )
+ {
+ iTotal += $(oNodes[iCorrector]).outerWidth();
+ }
+ else
+ {
+ iTotal += parseInt(oSettings.aoColumns[i].sWidth.replace('px',''), 10) +
+ ($(oNodes[iCorrector]).outerWidth() - $(oNodes[iCorrector]).width());
+ }
+ iCorrector++;
+ }
+ }
+
+ nCalcTmp.style.width = _fnStringToCss( iTotal );
+ oSettings.nTable.style.width = _fnStringToCss( iTotal );
+ }
+
+ iCorrector = 0;
+ for ( i=0 ; i<oSettings.aoColumns.length ; i++ )
+ {
+ if ( oSettings.aoColumns[i].bVisible )
+ {
+ iWidth = $(oNodes[iCorrector]).width();
+ if ( iWidth !== null && iWidth > 0 )
+ {
+ oSettings.aoColumns[i].sWidth = _fnStringToCss( iWidth );
+ }
+ iCorrector++;
+ }
+ }
+
+ var cssWidth = $(nCalcTmp).css('width');
+ oSettings.nTable.style.width = (cssWidth.indexOf('%') !== -1) ?
+ cssWidth : _fnStringToCss( $(nCalcTmp).outerWidth() );
+ nCalcTmp.parentNode.removeChild( nCalcTmp );
+ }
+
+ if ( widthAttr )
+ {
+ oSettings.nTable.style.width = _fnStringToCss( widthAttr );
+ }
+ }
+
+
+ /**
+ * Adjust a table's width to take account of scrolling
+ * @param {object} oSettings dataTables settings object
+ * @param {node} n table node
+ * @memberof DataTable#oApi
+ */
+ function _fnScrollingWidthAdjust ( oSettings, n )
+ {
+ if ( oSettings.oScroll.sX === "" && oSettings.oScroll.sY !== "" )
+ {
+ /* When y-scrolling only, we want to remove the width of the scroll bar so the table
+ * + scroll bar will fit into the area avaialble.
+ */
+ var iOrigWidth = $(n).width();
+ n.style.width = _fnStringToCss( $(n).outerWidth()-oSettings.oScroll.iBarWidth );
+ }
+ else if ( oSettings.oScroll.sX !== "" )
+ {
+ /* When x-scrolling both ways, fix the table at it's current size, without adjusting */
+ n.style.width = _fnStringToCss( $(n).outerWidth() );
+ }
+ }
+
+
+ /**
+ * Get the widest node
+ * @param {object} oSettings dataTables settings object
+ * @param {int} iCol column of interest
+ * @returns {node} widest table node
+ * @memberof DataTable#oApi
+ */
+ function _fnGetWidestNode( oSettings, iCol )
+ {
+ var iMaxIndex = _fnGetMaxLenString( oSettings, iCol );
+ if ( iMaxIndex < 0 )
+ {
+ return null;
+ }
+
+ if ( oSettings.aoData[iMaxIndex].nTr === null )
+ {
+ var n = document.createElement('td');
+ n.innerHTML = _fnGetCellData( oSettings, iMaxIndex, iCol, '' );
+ return n;
+ }
+ return _fnGetTdNodes(oSettings, iMaxIndex)[iCol];
+ }
+
+
+ /**
+ * Get the maximum strlen for each data column
+ * @param {object} oSettings dataTables settings object
+ * @param {int} iCol column of interest
+ * @returns {string} max string length for each column
+ * @memberof DataTable#oApi
+ */
+ function _fnGetMaxLenString( oSettings, iCol )
+ {
+ var iMax = -1;
+ var iMaxIndex = -1;
+
+ for ( var i=0 ; i<oSettings.aoData.length ; i++ )
+ {
+ var s = _fnGetCellData( oSettings, i, iCol, 'display' )+"";
+ s = s.replace( /<.*?>/g, "" );
+ if ( s.length > iMax )
+ {
+ iMax = s.length;
+ iMaxIndex = i;
+ }
+ }
+
+ return iMaxIndex;
+ }
+
+
+ /**
+ * Append a CSS unit (only if required) to a string
+ * @param {array} aArray1 first array
+ * @param {array} aArray2 second array
+ * @returns {int} 0 if match, 1 if length is different, 2 if no match
+ * @memberof DataTable#oApi
+ */
+ function _fnStringToCss( s )
+ {
+ if ( s === null )
+ {
+ return "0px";
+ }
+
+ if ( typeof s == 'number' )
+ {
+ if ( s < 0 )
+ {
+ return "0px";
+ }
+ return s+"px";
+ }
+
+ /* Check if the last character is not 0-9 */
+ var c = s.charCodeAt( s.length-1 );
+ if (c < 0x30 || c > 0x39)
+ {
+ return s;
+ }
+ return s+"px";
+ }
+
+
+ /**
+ * Get the width of a scroll bar in this browser being used
+ * @returns {int} width in pixels
+ * @memberof DataTable#oApi
+ */
+ function _fnScrollBarWidth ()
+ {
+ var inner = document.createElement('p');
+ var style = inner.style;
+ style.width = "100%";
+ style.height = "200px";
+ style.padding = "0px";
+
+ var outer = document.createElement('div');
+ style = outer.style;
+ style.position = "absolute";
+ style.top = "0px";
+ style.left = "0px";
+ style.visibility = "hidden";
+ style.width = "200px";
+ style.height = "150px";
+ style.padding = "0px";
+ style.overflow = "hidden";
+ outer.appendChild(inner);
+
+ document.body.appendChild(outer);
+ var w1 = inner.offsetWidth;
+ outer.style.overflow = 'scroll';
+ var w2 = inner.offsetWidth;
+ if ( w1 == w2 )
+ {
+ w2 = outer.clientWidth;
+ }
+
+ document.body.removeChild(outer);
+ return (w1 - w2);
+ }
+
+ /**
+ * Change the order of the table
+ * @param {object} oSettings dataTables settings object
+ * @param {bool} bApplyClasses optional - should we apply classes or not
+ * @memberof DataTable#oApi
+ */
+ function _fnSort ( oSettings, bApplyClasses )
+ {
+ var
+ i, iLen, j, jLen, k, kLen,
+ sDataType, nTh,
+ aaSort = [],
+ aiOrig = [],
+ oSort = DataTable.ext.oSort,
+ aoData = oSettings.aoData,
+ aoColumns = oSettings.aoColumns,
+ oAria = oSettings.oLanguage.oAria;
+
+ /* No sorting required if server-side or no sorting array */
+ if ( !oSettings.oFeatures.bServerSide &&
+ (oSettings.aaSorting.length !== 0 || oSettings.aaSortingFixed !== null) )
+ {
+ aaSort = ( oSettings.aaSortingFixed !== null ) ?
+ oSettings.aaSortingFixed.concat( oSettings.aaSorting ) :
+ oSettings.aaSorting.slice();
+
+ /* If there is a sorting data type, and a function belonging to it, then we need to
+ * get the data from the developer's function and apply it for this column
+ */
+ for ( i=0 ; i<aaSort.length ; i++ )
+ {
+ var iColumn = aaSort[i][0];
+ var iVisColumn = _fnColumnIndexToVisible( oSettings, iColumn );
+ sDataType = oSettings.aoColumns[ iColumn ].sSortDataType;
+ if ( DataTable.ext.afnSortData[sDataType] )
+ {
+ var aData = DataTable.ext.afnSortData[sDataType].call(
+ oSettings.oInstance, oSettings, iColumn, iVisColumn
+ );
+ if ( aData.length === aoData.length )
+ {
+ for ( j=0, jLen=aoData.length ; j<jLen ; j++ )
+ {
+ _fnSetCellData( oSettings, j, iColumn, aData[j] );
+ }
+ }
+ else
+ {
+ _fnLog( oSettings, 0, "Returned data sort array (col "+iColumn+") is the wrong length" );
+ }
+ }
+ }
+
+ /* Create a value - key array of the current row positions such that we can use their
+ * current position during the sort, if values match, in order to perform stable sorting
+ */
+ for ( i=0, iLen=oSettings.aiDisplayMaster.length ; i<iLen ; i++ )
+ {
+ aiOrig[ oSettings.aiDisplayMaster[i] ] = i;
+ }
+
+ /* Build an internal data array which is specific to the sort, so we can get and prep
+ * the data to be sorted only once, rather than needing to do it every time the sorting
+ * function runs. This make the sorting function a very simple comparison
+ */
+ var iSortLen = aaSort.length;
+ var fnSortFormat, aDataSort;
+ for ( i=0, iLen=aoData.length ; i<iLen ; i++ )
+ {
+ for ( j=0 ; j<iSortLen ; j++ )
+ {
+ aDataSort = aoColumns[ aaSort[j][0] ].aDataSort;
+
+ for ( k=0, kLen=aDataSort.length ; k<kLen ; k++ )
+ {
+ sDataType = aoColumns[ aDataSort[k] ].sType;
+ fnSortFormat = oSort[ (sDataType ? sDataType : 'string')+"-pre" ];
+
+ aoData[i]._aSortData[ aDataSort[k] ] = fnSortFormat ?
+ fnSortFormat( _fnGetCellData( oSettings, i, aDataSort[k], 'sort' ) ) :
+ _fnGetCellData( oSettings, i, aDataSort[k], 'sort' );
+ }
+ }
+ }
+
+ /* Do the sort - here we want multi-column sorting based on a given data source (column)
+ * and sorting function (from oSort) in a certain direction. It's reasonably complex to
+ * follow on it's own, but this is what we want (example two column sorting):
+ * fnLocalSorting = function(a,b){
+ * var iTest;
+ * iTest = oSort['string-asc']('data11', 'data12');
+ * if (iTest !== 0)
+ * return iTest;
+ * iTest = oSort['numeric-desc']('data21', 'data22');
+ * if (iTest !== 0)
+ * return iTest;
+ * return oSort['numeric-asc']( aiOrig[a], aiOrig[b] );
+ * }
+ * Basically we have a test for each sorting column, if the data in that column is equal,
+ * test the next column. If all columns match, then we use a numeric sort on the row
+ * positions in the original data array to provide a stable sort.
+ */
+ oSettings.aiDisplayMaster.sort( function ( a, b ) {
+ var k, l, lLen, iTest, aDataSort, sDataType;
+ for ( k=0 ; k<iSortLen ; k++ )
+ {
+ aDataSort = aoColumns[ aaSort[k][0] ].aDataSort;
+
+ for ( l=0, lLen=aDataSort.length ; l<lLen ; l++ )
+ {
+ sDataType = aoColumns[ aDataSort[l] ].sType;
+
+ iTest = oSort[ (sDataType ? sDataType : 'string')+"-"+aaSort[k][1] ](
+ aoData[a]._aSortData[ aDataSort[l] ],
+ aoData[b]._aSortData[ aDataSort[l] ]
+ );
+
+ if ( iTest !== 0 )
+ {
+ return iTest;
+ }
+ }
+ }
+
+ return oSort['numeric-asc']( aiOrig[a], aiOrig[b] );
+ } );
+ }
+
+ /* Alter the sorting classes to take account of the changes */
+ if ( (bApplyClasses === undefined || bApplyClasses) && !oSettings.oFeatures.bDeferRender )
+ {
+ _fnSortingClasses( oSettings );
+ }
+
+ for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
+ {
+ var sTitle = aoColumns[i].sTitle.replace( /<.*?>/g, "" );
+ nTh = aoColumns[i].nTh;
+ nTh.removeAttribute('aria-sort');
+ nTh.removeAttribute('aria-label');
+
+ /* In ARIA only the first sorting column can be marked as sorting - no multi-sort option */
+ if ( aoColumns[i].bSortable )
+ {
+ if ( aaSort.length > 0 && aaSort[0][0] == i )
+ {
+ nTh.setAttribute('aria-sort', aaSort[0][1]=="asc" ? "ascending" : "descending" );
+
+ var nextSort = (aoColumns[i].asSorting[ aaSort[0][2]+1 ]) ?
+ aoColumns[i].asSorting[ aaSort[0][2]+1 ] : aoColumns[i].asSorting[0];
+ nTh.setAttribute('aria-label', sTitle+
+ (nextSort=="asc" ? oAria.sSortAscending : oAria.sSortDescending) );
+ }
+ else
+ {
+ nTh.setAttribute('aria-label', sTitle+
+ (aoColumns[i].asSorting[0]=="asc" ? oAria.sSortAscending : oAria.sSortDescending) );
+ }
+ }
+ else
+ {
+ nTh.setAttribute('aria-label', sTitle);
+ }
+ }
+
+ /* Tell the draw function that we have sorted the data */
+ oSettings.bSorted = true;
+ $(oSettings.oInstance).trigger('sort', oSettings);
+
+ /* Copy the master data into the draw array and re-draw */
+ if ( oSettings.oFeatures.bFilter )
+ {
+ /* _fnFilter() will redraw the table for us */
+ _fnFilterComplete( oSettings, oSettings.oPreviousSearch, 1 );
+ }
+ else
+ {
+ oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
+ oSettings._iDisplayStart = 0; /* reset display back to page 0 */
+ _fnCalculateEnd( oSettings );
+ _fnDraw( oSettings );
+ }
+ }
+
+
+ /**
+ * Attach a sort handler (click) to a node
+ * @param {object} oSettings dataTables settings object
+ * @param {node} nNode node to attach the handler to
+ * @param {int} iDataIndex column sorting index
+ * @param {function} [fnCallback] callback function
+ * @memberof DataTable#oApi
+ */
+ function _fnSortAttachListener ( oSettings, nNode, iDataIndex, fnCallback )
+ {
+ _fnBindAction( nNode, {}, function (e) {
+ /* If the column is not sortable - don't to anything */
+ if ( oSettings.aoColumns[iDataIndex].bSortable === false )
+ {
+ return;
+ }
+
+ /*
+ * This is a little bit odd I admit... I declare a temporary function inside the scope of
+ * _fnBuildHead and the click handler in order that the code presented here can be used
+ * twice - once for when bProcessing is enabled, and another time for when it is
+ * disabled, as we need to perform slightly different actions.
+ * Basically the issue here is that the Javascript engine in modern browsers don't
+ * appear to allow the rendering engine to update the display while it is still executing
+ * it's thread (well - it does but only after long intervals). This means that the
+ * 'processing' display doesn't appear for a table sort. To break the js thread up a bit
+ * I force an execution break by using setTimeout - but this breaks the expected
+ * thread continuation for the end-developer's point of view (their code would execute
+ * too early), so we only do it when we absolutely have to.
+ */
+ var fnInnerSorting = function () {
+ var iColumn, iNextSort;
+
+ /* If the shift key is pressed then we are multiple column sorting */
+ if ( e.shiftKey )
+ {
+ /* Are we already doing some kind of sort on this column? */
+ var bFound = false;
+ for ( var i=0 ; i<oSettings.aaSorting.length ; i++ )
+ {
+ if ( oSettings.aaSorting[i][0] == iDataIndex )
+ {
+ bFound = true;
+ iColumn = oSettings.aaSorting[i][0];
+ iNextSort = oSettings.aaSorting[i][2]+1;
+
+ if ( !oSettings.aoColumns[iColumn].asSorting[iNextSort] )
+ {
+ /* Reached the end of the sorting options, remove from multi-col sort */
+ oSettings.aaSorting.splice( i, 1 );
+ }
+ else
+ {
+ /* Move onto next sorting direction */
+ oSettings.aaSorting[i][1] = oSettings.aoColumns[iColumn].asSorting[iNextSort];
+ oSettings.aaSorting[i][2] = iNextSort;
+ }
+ break;
+ }
+ }
+
+ /* No sort yet - add it in */
+ if ( bFound === false )
+ {
+ oSettings.aaSorting.push( [ iDataIndex,
+ oSettings.aoColumns[iDataIndex].asSorting[0], 0 ] );
+ }
+ }
+ else
+ {
+ /* If no shift key then single column sort */
+ if ( oSettings.aaSorting.length == 1 && oSettings.aaSorting[0][0] == iDataIndex )
+ {
+ iColumn = oSettings.aaSorting[0][0];
+ iNextSort = oSettings.aaSorting[0][2]+1;
+ if ( !oSettings.aoColumns[iColumn].asSorting[iNextSort] )
+ {
+ iNextSort = 0;
+ }
+ oSettings.aaSorting[0][1] = oSettings.aoColumns[iColumn].asSorting[iNextSort];
+ oSettings.aaSorting[0][2] = iNextSort;
+ }
+ else
+ {
+ oSettings.aaSorting.splice( 0, oSettings.aaSorting.length );
+ oSettings.aaSorting.push( [ iDataIndex,
+ oSettings.aoColumns[iDataIndex].asSorting[0], 0 ] );
+ }
+ }
+
+ /* Run the sort */
+ _fnSort( oSettings );
+ }; /* /fnInnerSorting */
+
+ if ( !oSettings.oFeatures.bProcessing )
+ {
+ fnInnerSorting();
+ }
+ else
+ {
+ _fnProcessingDisplay( oSettings, true );
+ setTimeout( function() {
+ fnInnerSorting();
+ if ( !oSettings.oFeatures.bServerSide )
+ {
+ _fnProcessingDisplay( oSettings, false );
+ }
+ }, 0 );
+ }
+
+ /* Call the user specified callback function - used for async user interaction */
+ if ( typeof fnCallback == 'function' )
+ {
+ fnCallback( oSettings );
+ }
+ } );
+ }
+
+
+ /**
+ * Set the sorting classes on the header, Note: it is safe to call this function
+ * when bSort and bSortClasses are false
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnSortingClasses( oSettings )
+ {
+ var i, iLen, j, jLen, iFound;
+ var aaSort, sClass;
+ var iColumns = oSettings.aoColumns.length;
+ var oClasses = oSettings.oClasses;
+
+ for ( i=0 ; i<iColumns ; i++ )
+ {
+ if ( oSettings.aoColumns[i].bSortable )
+ {
+ $(oSettings.aoColumns[i].nTh).removeClass( oClasses.sSortAsc +" "+ oClasses.sSortDesc +
+ " "+ oSettings.aoColumns[i].sSortingClass );
+ }
+ }
+
+ if ( oSettings.aaSortingFixed !== null )
+ {
+ aaSort = oSettings.aaSortingFixed.concat( oSettings.aaSorting );
+ }
+ else
+ {
+ aaSort = oSettings.aaSorting.slice();
+ }
+
+ /* Apply the required classes to the header */
+ for ( i=0 ; i<oSettings.aoColumns.length ; i++ )
+ {
+ if ( oSettings.aoColumns[i].bSortable )
+ {
+ sClass = oSettings.aoColumns[i].sSortingClass;
+ iFound = -1;
+ for ( j=0 ; j<aaSort.length ; j++ )
+ {
+ if ( aaSort[j][0] == i )
+ {
+ sClass = ( aaSort[j][1] == "asc" ) ?
+ oClasses.sSortAsc : oClasses.sSortDesc;
+ iFound = j;
+ break;
+ }
+ }
+ $(oSettings.aoColumns[i].nTh).addClass( sClass );
+
+ if ( oSettings.bJUI )
+ {
+ /* jQuery UI uses extra markup */
+ var jqSpan = $("span."+oClasses.sSortIcon, oSettings.aoColumns[i].nTh);
+ jqSpan.removeClass(oClasses.sSortJUIAsc +" "+ oClasses.sSortJUIDesc +" "+
+ oClasses.sSortJUI +" "+ oClasses.sSortJUIAscAllowed +" "+ oClasses.sSortJUIDescAllowed );
+
+ var sSpanClass;
+ if ( iFound == -1 )
+ {
+ sSpanClass = oSettings.aoColumns[i].sSortingClassJUI;
+ }
+ else if ( aaSort[iFound][1] == "asc" )
+ {
+ sSpanClass = oClasses.sSortJUIAsc;
+ }
+ else
+ {
+ sSpanClass = oClasses.sSortJUIDesc;
+ }
+
+ jqSpan.addClass( sSpanClass );
+ }
+ }
+ else
+ {
+ /* No sorting on this column, so add the base class. This will have been assigned by
+ * _fnAddColumn
+ */
+ $(oSettings.aoColumns[i].nTh).addClass( oSettings.aoColumns[i].sSortingClass );
+ }
+ }
+
+ /*
+ * Apply the required classes to the table body
+ * Note that this is given as a feature switch since it can significantly slow down a sort
+ * on large data sets (adding and removing of classes is always slow at the best of times..)
+ * Further to this, note that this code is admittedly fairly ugly. It could be made a lot
+ * simpler using jQuery selectors and add/removeClass, but that is significantly slower
+ * (on the order of 5 times slower) - hence the direct DOM manipulation here.
+ * Note that for deferred drawing we do use jQuery - the reason being that taking the first
+ * row found to see if the whole column needs processed can miss classes since the first
+ * column might be new.
+ */
+ sClass = oClasses.sSortColumn;
+
+ if ( oSettings.oFeatures.bSort && oSettings.oFeatures.bSortClasses )
+ {
+ var nTds = _fnGetTdNodes( oSettings );
+
+ /* Determine what the sorting class for each column should be */
+ var iClass, iTargetCol;
+ var asClasses = [];
+ for (i = 0; i < iColumns; i++)
+ {
+ asClasses.push("");
+ }
+ for (i = 0, iClass = 1; i < aaSort.length; i++)
+ {
+ iTargetCol = parseInt( aaSort[i][0], 10 );
+ asClasses[iTargetCol] = sClass + iClass;
+
+ if ( iClass < 3 )
+ {
+ iClass++;
+ }
+ }
+
+ /* Make changes to the classes for each cell as needed */
+ var reClass = new RegExp(sClass + "[123]");
+ var sTmpClass, sCurrentClass, sNewClass;
+ for ( i=0, iLen=nTds.length; i<iLen; i++ )
+ {
+ /* Determine which column we're looking at */
+ iTargetCol = i % iColumns;
+
+ /* What is the full list of classes now */
+ sCurrentClass = nTds[i].className;
+ /* What sorting class should be applied? */
+ sNewClass = asClasses[iTargetCol];
+ /* What would the new full list be if we did a replacement? */
+ sTmpClass = sCurrentClass.replace(reClass, sNewClass);
+
+ if ( sTmpClass != sCurrentClass )
+ {
+ /* We changed something */
+ nTds[i].className = $.trim( sTmpClass );
+ }
+ else if ( sNewClass.length > 0 && sCurrentClass.indexOf(sNewClass) == -1 )
+ {
+ /* We need to add a class */
+ nTds[i].className = sCurrentClass + " " + sNewClass;
+ }
+ }
+ }
+ }
+
+
+
+ /**
+ * Save the state of a table in a cookie such that the page can be reloaded
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnSaveState ( oSettings )
+ {
+ if ( !oSettings.oFeatures.bStateSave || oSettings.bDestroying )
+ {
+ return;
+ }
+
+ /* Store the interesting variables */
+ var i, iLen, bInfinite=oSettings.oScroll.bInfinite;
+ var oState = {
+ "iCreate": new Date().getTime(),
+ "iStart": (bInfinite ? 0 : oSettings._iDisplayStart),
+ "iEnd": (bInfinite ? oSettings._iDisplayLength : oSettings._iDisplayEnd),
+ "iLength": oSettings._iDisplayLength,
+ "aaSorting": $.extend( true, [], oSettings.aaSorting ),
+ "oSearch": $.extend( true, {}, oSettings.oPreviousSearch ),
+ "aoSearchCols": $.extend( true, [], oSettings.aoPreSearchCols ),
+ "abVisCols": []
+ };
+
+ for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
+ {
+ oState.abVisCols.push( oSettings.aoColumns[i].bVisible );
+ }
+
+ _fnCallbackFire( oSettings, "aoStateSaveParams", 'stateSaveParams', [oSettings, oState] );
+
+ oSettings.fnStateSave.call( oSettings.oInstance, oSettings, oState );
+ }
+
+
+ /**
+ * Attempt to load a saved table state from a cookie
+ * @param {object} oSettings dataTables settings object
+ * @param {object} oInit DataTables init object so we can override settings
+ * @memberof DataTable#oApi
+ */
+ function _fnLoadState ( oSettings, oInit )
+ {
+ if ( !oSettings.oFeatures.bStateSave )
+ {
+ return;
+ }
+
+ var oData = oSettings.fnStateLoad.call( oSettings.oInstance, oSettings );
+ if ( !oData )
+ {
+ return;
+ }
+
+ /* Allow custom and plug-in manipulation functions to alter the saved data set and
+ * cancelling of loading by returning false
+ */
+ var abStateLoad = _fnCallbackFire( oSettings, 'aoStateLoadParams', 'stateLoadParams', [oSettings, oData] );
+ if ( $.inArray( false, abStateLoad ) !== -1 )
+ {
+ return;
+ }
+
+ /* Store the saved state so it might be accessed at any time */
+ oSettings.oLoadedState = $.extend( true, {}, oData );
+
+ /* Restore key features */
+ oSettings._iDisplayStart = oData.iStart;
+ oSettings.iInitDisplayStart = oData.iStart;
+ oSettings._iDisplayEnd = oData.iEnd;
+ oSettings._iDisplayLength = oData.iLength;
+ oSettings.aaSorting = oData.aaSorting.slice();
+ oSettings.saved_aaSorting = oData.aaSorting.slice();
+
+ /* Search filtering */
+ $.extend( oSettings.oPreviousSearch, oData.oSearch );
+ $.extend( true, oSettings.aoPreSearchCols, oData.aoSearchCols );
+
+ /* Column visibility state
+ * Pass back visibility settings to the init handler, but to do not here override
+ * the init object that the user might have passed in
+ */
+ oInit.saved_aoColumns = [];
+ for ( var i=0 ; i<oData.abVisCols.length ; i++ )
+ {
+ oInit.saved_aoColumns[i] = {};
+ oInit.saved_aoColumns[i].bVisible = oData.abVisCols[i];
+ }
+
+ _fnCallbackFire( oSettings, 'aoStateLoaded', 'stateLoaded', [oSettings, oData] );
+ }
+
+
+ /**
+ * Create a new cookie with a value to store the state of a table
+ * @param {string} sName name of the cookie to create
+ * @param {string} sValue the value the cookie should take
+ * @param {int} iSecs duration of the cookie
+ * @param {string} sBaseName sName is made up of the base + file name - this is the base
+ * @param {function} fnCallback User definable function to modify the cookie
+ * @memberof DataTable#oApi
+ */
+ function _fnCreateCookie ( sName, sValue, iSecs, sBaseName, fnCallback )
+ {
+ var date = new Date();
+ date.setTime( date.getTime()+(iSecs*1000) );
+
+ /*
+ * Shocking but true - it would appear IE has major issues with having the path not having
+ * a trailing slash on it. We need the cookie to be available based on the path, so we
+ * have to append the file name to the cookie name. Appalling. Thanks to vex for adding the
+ * patch to use at least some of the path
+ */
+ var aParts = window.location.pathname.split('/');
+ var sNameFile = sName + '_' + aParts.pop().replace(/[\/:]/g,"").toLowerCase();
+ var sFullCookie, oData;
+
+ if ( fnCallback !== null )
+ {
+ oData = (typeof $.parseJSON === 'function') ?
+ $.parseJSON( sValue ) : eval( '('+sValue+')' );
+ sFullCookie = fnCallback( sNameFile, oData, date.toGMTString(),
+ aParts.join('/')+"/" );
+ }
+ else
+ {
+ sFullCookie = sNameFile + "=" + encodeURIComponent(sValue) +
+ "; expires=" + date.toGMTString() +"; path=" + aParts.join('/')+"/";
+ }
+
+ /* Are we going to go over the cookie limit of 4KiB? If so, try to delete a cookies
+ * belonging to DataTables.
+ */
+ var
+ aCookies =document.cookie.split(';'),
+ iNewCookieLen = sFullCookie.split(';')[0].length,
+ aOldCookies = [];
+
+ if ( iNewCookieLen+document.cookie.length+10 > 4096 ) /* Magic 10 for padding */
+ {
+ for ( var i=0, iLen=aCookies.length ; i<iLen ; i++ )
+ {
+ if ( aCookies[i].indexOf( sBaseName ) != -1 )
+ {
+ /* It's a DataTables cookie, so eval it and check the time stamp */
+ var aSplitCookie = aCookies[i].split('=');
+ try {
+ oData = eval( '('+decodeURIComponent(aSplitCookie[1])+')' );
+
+ if ( oData && oData.iCreate )
+ {
+ aOldCookies.push( {
+ "name": aSplitCookie[0],
+ "time": oData.iCreate
+ } );
+ }
+ }
+ catch( e ) {}
+ }
+ }
+
+ // Make sure we delete the oldest ones first
+ aOldCookies.sort( function (a, b) {
+ return b.time - a.time;
+ } );
+
+ // Eliminate as many old DataTables cookies as we need to
+ while ( iNewCookieLen + document.cookie.length + 10 > 4096 ) {
+ if ( aOldCookies.length === 0 ) {
+ // Deleted all DT cookies and still not enough space. Can't state save
+ return;
+ }
+
+ var old = aOldCookies.pop();
+ document.cookie = old.name+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+
+ aParts.join('/') + "/";
+ }
+ }
+
+ document.cookie = sFullCookie;
+ }
+
+
+ /**
+ * Read an old cookie to get a cookie with an old table state
+ * @param {string} sName name of the cookie to read
+ * @returns {string} contents of the cookie - or null if no cookie with that name found
+ * @memberof DataTable#oApi
+ */
+ function _fnReadCookie ( sName )
+ {
+ var
+ aParts = window.location.pathname.split('/'),
+ sNameEQ = sName + '_' + aParts[aParts.length-1].replace(/[\/:]/g,"").toLowerCase() + '=',
+ sCookieContents = document.cookie.split(';');
+
+ for( var i=0 ; i<sCookieContents.length ; i++ )
+ {
+ var c = sCookieContents[i];
+
+ while (c.charAt(0)==' ')
+ {
+ c = c.substring(1,c.length);
+ }
+
+ if (c.indexOf(sNameEQ) === 0)
+ {
+ return decodeURIComponent( c.substring(sNameEQ.length,c.length) );
+ }
+ }
+ return null;
+ }
+
+
+ /**
+ * Return the settings object for a particular table
+ * @param {node} nTable table we are using as a dataTable
+ * @returns {object} Settings object - or null if not found
+ * @memberof DataTable#oApi
+ */
+ function _fnSettingsFromNode ( nTable )
+ {
+ for ( var i=0 ; i<DataTable.settings.length ; i++ )
+ {
+ if ( DataTable.settings[i].nTable === nTable )
+ {
+ return DataTable.settings[i];
+ }
+ }
+
+ return null;
+ }
+
+
+ /**
+ * Return an array with the TR nodes for the table
+ * @param {object} oSettings dataTables settings object
+ * @returns {array} TR array
+ * @memberof DataTable#oApi
+ */
+ function _fnGetTrNodes ( oSettings )
+ {
+ var aNodes = [];
+ var aoData = oSettings.aoData;
+ for ( var i=0, iLen=aoData.length ; i<iLen ; i++ )
+ {
+ if ( aoData[i].nTr !== null )
+ {
+ aNodes.push( aoData[i].nTr );
+ }
+ }
+ return aNodes;
+ }
+
+
+ /**
+ * Return an flat array with all TD nodes for the table, or row
+ * @param {object} oSettings dataTables settings object
+ * @param {int} [iIndividualRow] aoData index to get the nodes for - optional
+ * if not given then the return array will contain all nodes for the table
+ * @returns {array} TD array
+ * @memberof DataTable#oApi
+ */
+ function _fnGetTdNodes ( oSettings, iIndividualRow )
+ {
+ var anReturn = [];
+ var iCorrector;
+ var anTds, nTd;
+ var iRow, iRows=oSettings.aoData.length,
+ iColumn, iColumns, oData, sNodeName, iStart=0, iEnd=iRows;
+
+ /* Allow the collection to be limited to just one row */
+ if ( iIndividualRow !== undefined )
+ {
+ iStart = iIndividualRow;
+ iEnd = iIndividualRow+1;
+ }
+
+ for ( iRow=iStart ; iRow<iEnd ; iRow++ )
+ {
+ oData = oSettings.aoData[iRow];
+ if ( oData.nTr !== null )
+ {
+ /* get the TD child nodes - taking into account text etc nodes */
+ anTds = [];
+ nTd = oData.nTr.firstChild;
+ while ( nTd )
+ {
+ sNodeName = nTd.nodeName.toLowerCase();
+ if ( sNodeName == 'td' || sNodeName == 'th' )
+ {
+ anTds.push( nTd );
+ }
+ nTd = nTd.nextSibling;
+ }
+
+ iCorrector = 0;
+ for ( iColumn=0, iColumns=oSettings.aoColumns.length ; iColumn<iColumns ; iColumn++ )
+ {
+ if ( oSettings.aoColumns[iColumn].bVisible )
+ {
+ anReturn.push( anTds[iColumn-iCorrector] );
+ }
+ else
+ {
+ anReturn.push( oData._anHidden[iColumn] );
+ iCorrector++;
+ }
+ }
+ }
+ }
+
+ return anReturn;
+ }
+
+
+ /**
+ * Log an error message
+ * @param {object} oSettings dataTables settings object
+ * @param {int} iLevel log error messages, or display them to the user
+ * @param {string} sMesg error message
+ * @memberof DataTable#oApi
+ */
+ function _fnLog( oSettings, iLevel, sMesg )
+ {
+ var sAlert = (oSettings===null) ?
+ "DataTables warning: "+sMesg :
+ "DataTables warning (table id = '"+oSettings.sTableId+"'): "+sMesg;
+
+ if ( iLevel === 0 )
+ {
+ if ( DataTable.ext.sErrMode == 'alert' )
+ {
+ alert( sAlert );
+ }
+ else
+ {
+ throw new Error(sAlert);
+ }
+ return;
+ }
+ else if ( window.console && console.log )
+ {
+ console.log( sAlert );
+ }
+ }
+
+
+ /**
+ * See if a property is defined on one object, if so assign it to the other object
+ * @param {object} oRet target object
+ * @param {object} oSrc source object
+ * @param {string} sName property
+ * @param {string} [sMappedName] name to map too - optional, sName used if not given
+ * @memberof DataTable#oApi
+ */
+ function _fnMap( oRet, oSrc, sName, sMappedName )
+ {
+ if ( sMappedName === undefined )
+ {
+ sMappedName = sName;
+ }
+ if ( oSrc[sName] !== undefined )
+ {
+ oRet[sMappedName] = oSrc[sName];
+ }
+ }
+
+
+ /**
+ * Extend objects - very similar to jQuery.extend, but deep copy objects, and shallow
+ * copy arrays. The reason we need to do this, is that we don't want to deep copy array
+ * init values (such as aaSorting) since the dev wouldn't be able to override them, but
+ * we do want to deep copy arrays.
+ * @param {object} oOut Object to extend
+ * @param {object} oExtender Object from which the properties will be applied to oOut
+ * @returns {object} oOut Reference, just for convenience - oOut === the return.
+ * @memberof DataTable#oApi
+ * @todo This doesn't take account of arrays inside the deep copied objects.
+ */
+ function _fnExtend( oOut, oExtender )
+ {
+ var val;
+
+ for ( var prop in oExtender )
+ {
+ if ( oExtender.hasOwnProperty(prop) )
+ {
+ val = oExtender[prop];
+
+ if ( typeof oInit[prop] === 'object' && val !== null && $.isArray(val) === false )
+ {
+ $.extend( true, oOut[prop], val );
+ }
+ else
+ {
+ oOut[prop] = val;
+ }
+ }
+ }
+
+ return oOut;
+ }
+
+
+ /**
+ * Bind an event handers to allow a click or return key to activate the callback.
+ * This is good for accessibility since a return on the keyboard will have the
+ * same effect as a click, if the element has focus.
+ * @param {element} n Element to bind the action to
+ * @param {object} oData Data object to pass to the triggered function
+ * @param {function} fn Callback function for when the event is triggered
+ * @memberof DataTable#oApi
+ */
+ function _fnBindAction( n, oData, fn )
+ {
+ $(n)
+ .bind( 'click.DT', oData, function (e) {
+ n.blur(); // Remove focus outline for mouse users
+ fn(e);
+ } )
+ .bind( 'keypress.DT', oData, function (e){
+ if ( e.which === 13 ) {
+ fn(e);
+ } } )
+ .bind( 'selectstart.DT', function () {
+ /* Take the brutal approach to cancelling text selection */
+ return false;
+ } );
+ }
+
+
+ /**
+ * Register a callback function. Easily allows a callback function to be added to
+ * an array store of callback functions that can then all be called together.
+ * @param {object} oSettings dataTables settings object
+ * @param {string} sStore Name of the array storage for the callbacks in oSettings
+ * @param {function} fn Function to be called back
+ * @param {string} sName Identifying name for the callback (i.e. a label)
+ * @memberof DataTable#oApi
+ */
+ function _fnCallbackReg( oSettings, sStore, fn, sName )
+ {
+ if ( fn )
+ {
+ oSettings[sStore].push( {
+ "fn": fn,
+ "sName": sName
+ } );
+ }
+ }
+
+
+ /**
+ * Fire callback functions and trigger events. Note that the loop over the callback
+ * array store is done backwards! Further note that you do not want to fire off triggers
+ * in time sensitive applications (for example cell creation) as its slow.
+ * @param {object} oSettings dataTables settings object
+ * @param {string} sStore Name of the array storage for the callbacks in oSettings
+ * @param {string} sTrigger Name of the jQuery custom event to trigger. If null no trigger
+ * is fired
+ * @param {array} aArgs Array of arguments to pass to the callback function / trigger
+ * @memberof DataTable#oApi
+ */
+ function _fnCallbackFire( oSettings, sStore, sTrigger, aArgs )
+ {
+ var aoStore = oSettings[sStore];
+ var aRet =[];
+
+ for ( var i=aoStore.length-1 ; i>=0 ; i-- )
+ {
+ aRet.push( aoStore[i].fn.apply( oSettings.oInstance, aArgs ) );
+ }
+
+ if ( sTrigger !== null )
+ {
+ $(oSettings.oInstance).trigger(sTrigger, aArgs);
+ }
+
+ return aRet;
+ }
+
+
+ /**
+ * JSON stringify. If JSON.stringify it provided by the browser, json2.js or any other
+ * library, then we use that as it is fast, safe and accurate. If the function isn't
+ * available then we need to built it ourselves - the inspiration for this function comes
+ * from Craig Buckler ( http://www.sitepoint.com/javascript-json-serialization/ ). It is
+ * not perfect and absolutely should not be used as a replacement to json2.js - but it does
+ * do what we need, without requiring a dependency for DataTables.
+ * @param {object} o JSON object to be converted
+ * @returns {string} JSON string
+ * @memberof DataTable#oApi
+ */
+ var _fnJsonString = (window.JSON) ? JSON.stringify : function( o )
+ {
+ /* Not an object or array */
+ var sType = typeof o;
+ if (sType !== "object" || o === null)
+ {
+ // simple data type
+ if (sType === "string")
+ {
+ o = '"'+o+'"';
+ }
+ return o+"";
+ }
+
+ /* If object or array, need to recurse over it */
+ var
+ sProp, mValue,
+ json = [],
+ bArr = $.isArray(o);
+
+ for (sProp in o)
+ {
+ mValue = o[sProp];
+ sType = typeof mValue;
+
+ if (sType === "string")
+ {
+ mValue = '"'+mValue+'"';
+ }
+ else if (sType === "object" && mValue !== null)
+ {
+ mValue = _fnJsonString(mValue);
+ }
+
+ json.push((bArr ? "" : '"'+sProp+'":') + mValue);
+ }
+
+ return (bArr ? "[" : "{") + json + (bArr ? "]" : "}");
+ };
+
+
+ /**
+ * From some browsers (specifically IE6/7) we need special handling to work around browser
+ * bugs - this function is used to detect when these workarounds are needed.
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnBrowserDetect( oSettings )
+ {
+ /* IE6/7 will oversize a width 100% element inside a scrolling element, to include the
+ * width of the scrollbar, while other browsers ensure the inner element is contained
+ * without forcing scrolling
+ */
+ var n = $(
+ '<div style="position:absolute; top:0; left:0; height:1px; width:1px; overflow:hidden">'+
+ '<div style="position:absolute; top:1px; left:1px; width:100px; overflow:scroll;">'+
+ '<div id="DT_BrowserTest" style="width:100%; height:10px;"></div>'+
+ '</div>'+
+ '</div>')[0];
+
+ document.body.appendChild( n );
+ oSettings.oBrowser.bScrollOversize = $('#DT_BrowserTest', n)[0].offsetWidth === 100 ? true : false;
+ document.body.removeChild( n );
+ }
+
+
+ /**
+ * Perform a jQuery selector action on the table's TR elements (from the tbody) and
+ * return the resulting jQuery object.
+ * @param {string|node|jQuery} sSelector jQuery selector or node collection to act on
+ * @param {object} [oOpts] Optional parameters for modifying the rows to be included
+ * @param {string} [oOpts.filter=none] Select TR elements that meet the current filter
+ * criterion ("applied") or all TR elements (i.e. no filter).
+ * @param {string} [oOpts.order=current] Order of the TR elements in the processed array.
+ * Can be either 'current', whereby the current sorting of the table is used, or
+ * 'original' whereby the original order the data was read into the table is used.
+ * @param {string} [oOpts.page=all] Limit the selection to the currently displayed page
+ * ("current") or not ("all"). If 'current' is given, then order is assumed to be
+ * 'current' and filter is 'applied', regardless of what they might be given as.
+ * @returns {object} jQuery object, filtered by the given selector.
+ * @dtopt API
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Highlight every second row
+ * oTable.$('tr:odd').css('backgroundColor', 'blue');
+ * } );
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Filter to rows with 'Webkit' in them, add a background colour and then
+ * // remove the filter, thus highlighting the 'Webkit' rows only.
+ * oTable.fnFilter('Webkit');
+ * oTable.$('tr', {"filter": "applied"}).css('backgroundColor', 'blue');
+ * oTable.fnFilter('');
+ * } );
+ */
+ this.$ = function ( sSelector, oOpts )
+ {
+ var i, iLen, a = [], tr;
+ var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
+ var aoData = oSettings.aoData;
+ var aiDisplay = oSettings.aiDisplay;
+ var aiDisplayMaster = oSettings.aiDisplayMaster;
+
+ if ( !oOpts )
+ {
+ oOpts = {};
+ }
+
+ oOpts = $.extend( {}, {
+ "filter": "none", // applied
+ "order": "current", // "original"
+ "page": "all" // current
+ }, oOpts );
+
+ // Current page implies that order=current and fitler=applied, since it is fairly
+ // senseless otherwise
+ if ( oOpts.page == 'current' )
+ {
+ for ( i=oSettings._iDisplayStart, iLen=oSettings.fnDisplayEnd() ; i<iLen ; i++ )
+ {
+ tr = aoData[ aiDisplay[i] ].nTr;
+ if ( tr )
+ {
+ a.push( tr );
+ }
+ }
+ }
+ else if ( oOpts.order == "current" && oOpts.filter == "none" )
+ {
+ for ( i=0, iLen=aiDisplayMaster.length ; i<iLen ; i++ )
+ {
+ tr = aoData[ aiDisplayMaster[i] ].nTr;
+ if ( tr )
+ {
+ a.push( tr );
+ }
+ }
+ }
+ else if ( oOpts.order == "current" && oOpts.filter == "applied" )
+ {
+ for ( i=0, iLen=aiDisplay.length ; i<iLen ; i++ )
+ {
+ tr = aoData[ aiDisplay[i] ].nTr;
+ if ( tr )
+ {
+ a.push( tr );
+ }
+ }
+ }
+ else if ( oOpts.order == "original" && oOpts.filter == "none" )
+ {
+ for ( i=0, iLen=aoData.length ; i<iLen ; i++ )
+ {
+ tr = aoData[ i ].nTr ;
+ if ( tr )
+ {
+ a.push( tr );
+ }
+ }
+ }
+ else if ( oOpts.order == "original" && oOpts.filter == "applied" )
+ {
+ for ( i=0, iLen=aoData.length ; i<iLen ; i++ )
+ {
+ tr = aoData[ i ].nTr;
+ if ( $.inArray( i, aiDisplay ) !== -1 && tr )
+ {
+ a.push( tr );
+ }
+ }
+ }
+ else
+ {
+ _fnLog( oSettings, 1, "Unknown selection options" );
+ }
+
+ /* We need to filter on the TR elements and also 'find' in their descendants
+ * to make the selector act like it would in a full table - so we need
+ * to build both results and then combine them together
+ */
+ var jqA = $(a);
+ var jqTRs = jqA.filter( sSelector );
+ var jqDescendants = jqA.find( sSelector );
+
+ return $( [].concat($.makeArray(jqTRs), $.makeArray(jqDescendants)) );
+ };
+
+
+ /**
+ * Almost identical to $ in operation, but in this case returns the data for the matched
+ * rows - as such, the jQuery selector used should match TR row nodes or TD/TH cell nodes
+ * rather than any descendants, so the data can be obtained for the row/cell. If matching
+ * rows are found, the data returned is the original data array/object that was used to
+ * create the row (or a generated array if from a DOM source).
+ *
+ * This method is often useful in-combination with $ where both functions are given the
+ * same parameters and the array indexes will match identically.
+ * @param {string|node|jQuery} sSelector jQuery selector or node collection to act on
+ * @param {object} [oOpts] Optional parameters for modifying the rows to be included
+ * @param {string} [oOpts.filter=none] Select elements that meet the current filter
+ * criterion ("applied") or all elements (i.e. no filter).
+ * @param {string} [oOpts.order=current] Order of the data in the processed array.
+ * Can be either 'current', whereby the current sorting of the table is used, or
+ * 'original' whereby the original order the data was read into the table is used.
+ * @param {string} [oOpts.page=all] Limit the selection to the currently displayed page
+ * ("current") or not ("all"). If 'current' is given, then order is assumed to be
+ * 'current' and filter is 'applied', regardless of what they might be given as.
+ * @returns {array} Data for the matched elements. If any elements, as a result of the
+ * selector, were not TR, TD or TH elements in the DataTable, they will have a null
+ * entry in the array.
+ * @dtopt API
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Get the data from the first row in the table
+ * var data = oTable._('tr:first');
+ *
+ * // Do something useful with the data
+ * alert( "First cell is: "+data[0] );
+ * } );
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Filter to 'Webkit' and get all data for
+ * oTable.fnFilter('Webkit');
+ * var data = oTable._('tr', {"filter": "applied"});
+ *
+ * // Do something with the data
+ * alert( data.length+" rows matched the filter" );
+ * } );
+ */
+ this._ = function ( sSelector, oOpts )
+ {
+ var aOut = [];
+ var i, iLen, iIndex;
+ var aTrs = this.$( sSelector, oOpts );
+
+ for ( i=0, iLen=aTrs.length ; i<iLen ; i++ )
+ {
+ aOut.push( this.fnGetData(aTrs[i]) );
+ }
+
+ return aOut;
+ };
+
+
+ /**
+ * Add a single new row or multiple rows of data to the table. Please note
+ * that this is suitable for client-side processing only - if you are using
+ * server-side processing (i.e. "bServerSide": true), then to add data, you
+ * must add it to the data source, i.e. the server-side, through an Ajax call.
+ * @param {array|object} mData The data to be added to the table. This can be:
+ * <ul>
+ * <li>1D array of data - add a single row with the data provided</li>
+ * <li>2D array of arrays - add multiple rows in a single call</li>
+ * <li>object - data object when using <i>mData</i></li>
+ * <li>array of objects - multiple data objects when using <i>mData</i></li>
+ * </ul>
+ * @param {bool} [bRedraw=true] redraw the table or not
+ * @returns {array} An array of integers, representing the list of indexes in
+ * <i>aoData</i> ({@link DataTable.models.oSettings}) that have been added to
+ * the table.
+ * @dtopt API
+ *
+ * @example
+ * // Global var for counter
+ * var giCount = 2;
+ *
+ * $(document).ready(function() {
+ * $('#example').dataTable();
+ * } );
+ *
+ * function fnClickAddRow() {
+ * $('#example').dataTable().fnAddData( [
+ * giCount+".1",
+ * giCount+".2",
+ * giCount+".3",
+ * giCount+".4" ]
+ * );
+ *
+ * giCount++;
+ * }
+ */
+ this.fnAddData = function( mData, bRedraw )
+ {
+ if ( mData.length === 0 )
+ {
+ return [];
+ }
+
+ var aiReturn = [];
+ var iTest;
+
+ /* Find settings from table node */
+ var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
+
+ /* Check if we want to add multiple rows or not */
+ if ( typeof mData[0] === "object" && mData[0] !== null )
+ {
+ for ( var i=0 ; i<mData.length ; i++ )
+ {
+ iTest = _fnAddData( oSettings, mData[i] );
+ if ( iTest == -1 )
+ {
+ return aiReturn;
+ }
+ aiReturn.push( iTest );
+ }
+ }
+ else
+ {
+ iTest = _fnAddData( oSettings, mData );
+ if ( iTest == -1 )
+ {
+ return aiReturn;
+ }
+ aiReturn.push( iTest );
+ }
+
+ oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
+
+ if ( bRedraw === undefined || bRedraw )
+ {
+ _fnReDraw( oSettings );
+ }
+ return aiReturn;
+ };
+
+
+ /**
+ * This function will make DataTables recalculate the column sizes, based on the data
+ * contained in the table and the sizes applied to the columns (in the DOM, CSS or
+ * through the sWidth parameter). This can be useful when the width of the table's
+ * parent element changes (for example a window resize).
+ * @param {boolean} [bRedraw=true] Redraw the table or not, you will typically want to
+ * @dtopt API
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable( {
+ * "sScrollY": "200px",
+ * "bPaginate": false
+ * } );
+ *
+ * $(window).bind('resize', function () {
+ * oTable.fnAdjustColumnSizing();
+ * } );
+ * } );
+ */
+ this.fnAdjustColumnSizing = function ( bRedraw )
+ {
+ var oSettings = _fnSettingsFromNode(this[DataTable.ext.iApiIndex]);
+ _fnAdjustColumnSizing( oSettings );
+
+ if ( bRedraw === undefined || bRedraw )
+ {
+ this.fnDraw( false );
+ }
+ else if ( oSettings.oScroll.sX !== "" || oSettings.oScroll.sY !== "" )
+ {
+ /* If not redrawing, but scrolling, we want to apply the new column sizes anyway */
+ this.oApi._fnScrollDraw(oSettings);
+ }
+ };
+
+
+ /**
+ * Quickly and simply clear a table
+ * @param {bool} [bRedraw=true] redraw the table or not
+ * @dtopt API
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Immediately 'nuke' the current rows (perhaps waiting for an Ajax callback...)
+ * oTable.fnClearTable();
+ * } );
+ */
+ this.fnClearTable = function( bRedraw )
+ {
+ /* Find settings from table node */
+ var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
+ _fnClearTable( oSettings );
+
+ if ( bRedraw === undefined || bRedraw )
+ {
+ _fnDraw( oSettings );
+ }
+ };
+
+
+ /**
+ * The exact opposite of 'opening' a row, this function will close any rows which
+ * are currently 'open'.
+ * @param {node} nTr the table row to 'close'
+ * @returns {int} 0 on success, or 1 if failed (can't find the row)
+ * @dtopt API
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable;
+ *
+ * // 'open' an information row when a row is clicked on
+ * $('#example tbody tr').click( function () {
+ * if ( oTable.fnIsOpen(this) ) {
+ * oTable.fnClose( this );
+ * } else {
+ * oTable.fnOpen( this, "Temporary row opened", "info_row" );
+ * }
+ * } );
+ *
+ * oTable = $('#example').dataTable();
+ * } );
+ */
+ this.fnClose = function( nTr )
+ {
+ /* Find settings from table node */
+ var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
+
+ for ( var i=0 ; i<oSettings.aoOpenRows.length ; i++ )
+ {
+ if ( oSettings.aoOpenRows[i].nParent == nTr )
+ {
+ var nTrParent = oSettings.aoOpenRows[i].nTr.parentNode;
+ if ( nTrParent )
+ {
+ /* Remove it if it is currently on display */
+ nTrParent.removeChild( oSettings.aoOpenRows[i].nTr );
+ }
+ oSettings.aoOpenRows.splice( i, 1 );
+ return 0;
+ }
+ }
+ return 1;
+ };
+
+
+ /**
+ * Remove a row for the table
+ * @param {mixed} mTarget The index of the row from aoData to be deleted, or
+ * the TR element you want to delete
+ * @param {function|null} [fnCallBack] Callback function
+ * @param {bool} [bRedraw=true] Redraw the table or not
+ * @returns {array} The row that was deleted
+ * @dtopt API
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Immediately remove the first row
+ * oTable.fnDeleteRow( 0 );
+ * } );
+ */
+ this.fnDeleteRow = function( mTarget, fnCallBack, bRedraw )
+ {
+ /* Find settings from table node */
+ var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
+ var i, iLen, iAODataIndex;
+
+ iAODataIndex = (typeof mTarget === 'object') ?
+ _fnNodeToDataIndex(oSettings, mTarget) : mTarget;
+
+ /* Return the data array from this row */
+ var oData = oSettings.aoData.splice( iAODataIndex, 1 );
+
+ /* Update the _DT_RowIndex parameter */
+ for ( i=0, iLen=oSettings.aoData.length ; i<iLen ; i++ )
+ {
+ if ( oSettings.aoData[i].nTr !== null )
+ {
+ oSettings.aoData[i].nTr._DT_RowIndex = i;
+ }
+ }
+
+ /* Remove the target row from the search array */
+ var iDisplayIndex = $.inArray( iAODataIndex, oSettings.aiDisplay );
+ oSettings.asDataSearch.splice( iDisplayIndex, 1 );
+
+ /* Delete from the display arrays */
+ _fnDeleteIndex( oSettings.aiDisplayMaster, iAODataIndex );
+ _fnDeleteIndex( oSettings.aiDisplay, iAODataIndex );
+
+ /* If there is a user callback function - call it */
+ if ( typeof fnCallBack === "function" )
+ {
+ fnCallBack.call( this, oSettings, oData );
+ }
+
+ /* Check for an 'overflow' they case for displaying the table */
+ if ( oSettings._iDisplayStart >= oSettings.fnRecordsDisplay() )
+ {
+ oSettings._iDisplayStart -= oSettings._iDisplayLength;
+ if ( oSettings._iDisplayStart < 0 )
+ {
+ oSettings._iDisplayStart = 0;
+ }
+ }
+
+ if ( bRedraw === undefined || bRedraw )
+ {
+ _fnCalculateEnd( oSettings );
+ _fnDraw( oSettings );
+ }
+
+ return oData;
+ };
+
+
+ /**
+ * Restore the table to it's original state in the DOM by removing all of DataTables
+ * enhancements, alterations to the DOM structure of the table and event listeners.
+ * @param {boolean} [bRemove=false] Completely remove the table from the DOM
+ * @dtopt API
+ *
+ * @example
+ * $(document).ready(function() {
+ * // This example is fairly pointless in reality, but shows how fnDestroy can be used
+ * var oTable = $('#example').dataTable();
+ * oTable.fnDestroy();
+ * } );
+ */
+ this.fnDestroy = function ( bRemove )
+ {
+ var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
+ var nOrig = oSettings.nTableWrapper.parentNode;
+ var nBody = oSettings.nTBody;
+ var i, iLen;
+
+ bRemove = (bRemove===undefined) ? false : bRemove;
+
+ /* Flag to note that the table is currently being destroyed - no action should be taken */
+ oSettings.bDestroying = true;
+
+ /* Fire off the destroy callbacks for plug-ins etc */
+ _fnCallbackFire( oSettings, "aoDestroyCallback", "destroy", [oSettings] );
+
+ /* If the table is not being removed, restore the hidden columns */
+ if ( !bRemove )
+ {
+ for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
+ {
+ if ( oSettings.aoColumns[i].bVisible === false )
+ {
+ this.fnSetColumnVis( i, true );
+ }
+ }
+ }
+
+ /* Blitz all DT events */
+ $(oSettings.nTableWrapper).find('*').andSelf().unbind('.DT');
+
+ /* If there is an 'empty' indicator row, remove it */
+ $('tbody>tr>td.'+oSettings.oClasses.sRowEmpty, oSettings.nTable).parent().remove();
+
+ /* When scrolling we had to break the table up - restore it */
+ if ( oSettings.nTable != oSettings.nTHead.parentNode )
+ {
+ $(oSettings.nTable).children('thead').remove();
+ oSettings.nTable.appendChild( oSettings.nTHead );
+ }
+
+ if ( oSettings.nTFoot && oSettings.nTable != oSettings.nTFoot.parentNode )
+ {
+ $(oSettings.nTable).children('tfoot').remove();
+ oSettings.nTable.appendChild( oSettings.nTFoot );
+ }
+
+ /* Remove the DataTables generated nodes, events and classes */
+ oSettings.nTable.parentNode.removeChild( oSettings.nTable );
+ $(oSettings.nTableWrapper).remove();
+
+ oSettings.aaSorting = [];
+ oSettings.aaSortingFixed = [];
+ _fnSortingClasses( oSettings );
+
+ $(_fnGetTrNodes( oSettings )).removeClass( oSettings.asStripeClasses.join(' ') );
+
+ $('th, td', oSettings.nTHead).removeClass( [
+ oSettings.oClasses.sSortable,
+ oSettings.oClasses.sSortableAsc,
+ oSettings.oClasses.sSortableDesc,
+ oSettings.oClasses.sSortableNone ].join(' ')
+ );
+ if ( oSettings.bJUI )
+ {
+ $('th span.'+oSettings.oClasses.sSortIcon
+ + ', td span.'+oSettings.oClasses.sSortIcon, oSettings.nTHead).remove();
+
+ $('th, td', oSettings.nTHead).each( function () {
+ var jqWrapper = $('div.'+oSettings.oClasses.sSortJUIWrapper, this);
+ var kids = jqWrapper.contents();
+ $(this).append( kids );
+ jqWrapper.remove();
+ } );
+ }
+
+ /* Add the TR elements back into the table in their original order */
+ if ( !bRemove && oSettings.nTableReinsertBefore )
+ {
+ nOrig.insertBefore( oSettings.nTable, oSettings.nTableReinsertBefore );
+ }
+ else if ( !bRemove )
+ {
+ nOrig.appendChild( oSettings.nTable );
+ }
+
+ for ( i=0, iLen=oSettings.aoData.length ; i<iLen ; i++ )
+ {
+ if ( oSettings.aoData[i].nTr !== null )
+ {
+ nBody.appendChild( oSettings.aoData[i].nTr );
+ }
+ }
+
+ /* Restore the width of the original table */
+ if ( oSettings.oFeatures.bAutoWidth === true )
+ {
+ oSettings.nTable.style.width = _fnStringToCss(oSettings.sDestroyWidth);
+ }
+
+ /* If the were originally stripe classes - then we add them back here. Note
+ * this is not fool proof (for example if not all rows had stripe classes - but
+ * it's a good effort without getting carried away
+ */
+ iLen = oSettings.asDestroyStripes.length;
+ if (iLen)
+ {
+ var anRows = $(nBody).children('tr');
+ for ( i=0 ; i<iLen ; i++ )
+ {
+ anRows.filter(':nth-child(' + iLen + 'n + ' + i + ')').addClass( oSettings.asDestroyStripes[i] );
+ }
+ }
+
+ /* Remove the settings object from the settings array */
+ for ( i=0, iLen=DataTable.settings.length ; i<iLen ; i++ )
+ {
+ if ( DataTable.settings[i] == oSettings )
+ {
+ DataTable.settings.splice( i, 1 );
+ }
+ }
+
+ /* End it all */
+ oSettings = null;
+ oInit = null;
+ };
+
+
+ /**
+ * Redraw the table
+ * @param {bool} [bComplete=true] Re-filter and resort (if enabled) the table before the draw.
+ * @dtopt API
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Re-draw the table - you wouldn't want to do it here, but it's an example :-)
+ * oTable.fnDraw();
+ * } );
+ */
+ this.fnDraw = function( bComplete )
+ {
+ var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
+ if ( bComplete === false )
+ {
+ _fnCalculateEnd( oSettings );
+ _fnDraw( oSettings );
+ }
+ else
+ {
+ _fnReDraw( oSettings );
+ }
+ };
+
+
+ /**
+ * Filter the input based on data
+ * @param {string} sInput String to filter the table on
+ * @param {int|null} [iColumn] Column to limit filtering to
+ * @param {bool} [bRegex=false] Treat as regular expression or not
+ * @param {bool} [bSmart=true] Perform smart filtering or not
+ * @param {bool} [bShowGlobal=true] Show the input global filter in it's input box(es)
+ * @param {bool} [bCaseInsensitive=true] Do case-insensitive matching (true) or not (false)
+ * @dtopt API
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Sometime later - filter...
+ * oTable.fnFilter( 'test string' );
+ * } );
+ */
+ this.fnFilter = function( sInput, iColumn, bRegex, bSmart, bShowGlobal, bCaseInsensitive )
+ {
+ var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
+
+ if ( !oSettings.oFeatures.bFilter )
+ {
+ return;
+ }
+
+ if ( bRegex === undefined || bRegex === null )
+ {
+ bRegex = false;
+ }
+
+ if ( bSmart === undefined || bSmart === null )
+ {
+ bSmart = true;
+ }
+
+ if ( bShowGlobal === undefined || bShowGlobal === null )
+ {
+ bShowGlobal = true;
+ }
+
+ if ( bCaseInsensitive === undefined || bCaseInsensitive === null )
+ {
+ bCaseInsensitive = true;
+ }
+
+ if ( iColumn === undefined || iColumn === null )
+ {
+ /* Global filter */
+ _fnFilterComplete( oSettings, {
+ "sSearch":sInput+"",
+ "bRegex": bRegex,
+ "bSmart": bSmart,
+ "bCaseInsensitive": bCaseInsensitive
+ }, 1 );
+
+ if ( bShowGlobal && oSettings.aanFeatures.f )
+ {
+ var n = oSettings.aanFeatures.f;
+ for ( var i=0, iLen=n.length ; i<iLen ; i++ )
+ {
+ // IE9 throws an 'unknown error' if document.activeElement is used
+ // inside an iframe or frame...
+ try {
+ if ( n[i]._DT_Input != document.activeElement )
+ {
+ $(n[i]._DT_Input).val( sInput );
+ }
+ }
+ catch ( e ) {
+ $(n[i]._DT_Input).val( sInput );
+ }
+ }
+ }
+ }
+ else
+ {
+ /* Single column filter */
+ $.extend( oSettings.aoPreSearchCols[ iColumn ], {
+ "sSearch": sInput+"",
+ "bRegex": bRegex,
+ "bSmart": bSmart,
+ "bCaseInsensitive": bCaseInsensitive
+ } );
+ _fnFilterComplete( oSettings, oSettings.oPreviousSearch, 1 );
+ }
+ };
+
+
+ /**
+ * Get the data for the whole table, an individual row or an individual cell based on the
+ * provided parameters.
+ * @param {int|node} [mRow] A TR row node, TD/TH cell node or an integer. If given as
+ * a TR node then the data source for the whole row will be returned. If given as a
+ * TD/TH cell node then iCol will be automatically calculated and the data for the
+ * cell returned. If given as an integer, then this is treated as the aoData internal
+ * data index for the row (see fnGetPosition) and the data for that row used.
+ * @param {int} [iCol] Optional column index that you want the data of.
+ * @returns {array|object|string} If mRow is undefined, then the data for all rows is
+ * returned. If mRow is defined, just data for that row, and is iCol is
+ * defined, only data for the designated cell is returned.
+ * @dtopt API
+ *
+ * @example
+ * // Row data
+ * $(document).ready(function() {
+ * oTable = $('#example').dataTable();
+ *
+ * oTable.$('tr').click( function () {
+ * var data = oTable.fnGetData( this );
+ * // ... do something with the array / object of data for the row
+ * } );
+ * } );
+ *
+ * @example
+ * // Individual cell data
+ * $(document).ready(function() {
+ * oTable = $('#example').dataTable();
+ *
+ * oTable.$('td').click( function () {
+ * var sData = oTable.fnGetData( this );
+ * alert( 'The cell clicked on had the value of '+sData );
+ * } );
+ * } );
+ */
+ this.fnGetData = function( mRow, iCol )
+ {
+ var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
+
+ if ( mRow !== undefined )
+ {
+ var iRow = mRow;
+ if ( typeof mRow === 'object' )
+ {
+ var sNode = mRow.nodeName.toLowerCase();
+ if (sNode === "tr" )
+ {
+ iRow = _fnNodeToDataIndex(oSettings, mRow);
+ }
+ else if ( sNode === "td" )
+ {
+ iRow = _fnNodeToDataIndex(oSettings, mRow.parentNode);
+ iCol = _fnNodeToColumnIndex( oSettings, iRow, mRow );
+ }
+ }
+
+ if ( iCol !== undefined )
+ {
+ return _fnGetCellData( oSettings, iRow, iCol, '' );
+ }
+ return (oSettings.aoData[iRow]!==undefined) ?
+ oSettings.aoData[iRow]._aData : null;
+ }
+ return _fnGetDataMaster( oSettings );
+ };
+
+
+ /**
+ * Get an array of the TR nodes that are used in the table's body. Note that you will
+ * typically want to use the '$' API method in preference to this as it is more
+ * flexible.
+ * @param {int} [iRow] Optional row index for the TR element you want
+ * @returns {array|node} If iRow is undefined, returns an array of all TR elements
+ * in the table's body, or iRow is defined, just the TR element requested.
+ * @dtopt API
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Get the nodes from the table
+ * var nNodes = oTable.fnGetNodes( );
+ * } );
+ */
+ this.fnGetNodes = function( iRow )
+ {
+ var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
+
+ if ( iRow !== undefined ) {
+ return (oSettings.aoData[iRow]!==undefined) ?
+ oSettings.aoData[iRow].nTr : null;
+ }
+ return _fnGetTrNodes( oSettings );
+ };
+
+
+ /**
+ * Get the array indexes of a particular cell from it's DOM element
+ * and column index including hidden columns
+ * @param {node} nNode this can either be a TR, TD or TH in the table's body
+ * @returns {int} If nNode is given as a TR, then a single index is returned, or
+ * if given as a cell, an array of [row index, column index (visible),
+ * column index (all)] is given.
+ * @dtopt API
+ *
+ * @example
+ * $(document).ready(function() {
+ * $('#example tbody td').click( function () {
+ * // Get the position of the current data from the node
+ * var aPos = oTable.fnGetPosition( this );
+ *
+ * // Get the data array for this row
+ * var aData = oTable.fnGetData( aPos[0] );
+ *
+ * // Update the data array and return the value
+ * aData[ aPos[1] ] = 'clicked';
+ * this.innerHTML = 'clicked';
+ * } );
+ *
+ * // Init DataTables
+ * oTable = $('#example').dataTable();
+ * } );
+ */
+ this.fnGetPosition = function( nNode )
+ {
+ var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
+ var sNodeName = nNode.nodeName.toUpperCase();
+
+ if ( sNodeName == "TR" )
+ {
+ return _fnNodeToDataIndex(oSettings, nNode);
+ }
+ else if ( sNodeName == "TD" || sNodeName == "TH" )
+ {
+ var iDataIndex = _fnNodeToDataIndex( oSettings, nNode.parentNode );
+ var iColumnIndex = _fnNodeToColumnIndex( oSettings, iDataIndex, nNode );
+ return [ iDataIndex, _fnColumnIndexToVisible(oSettings, iColumnIndex ), iColumnIndex ];
+ }
+ return null;
+ };
+
+
+ /**
+ * Check to see if a row is 'open' or not.
+ * @param {node} nTr the table row to check
+ * @returns {boolean} true if the row is currently open, false otherwise
+ * @dtopt API
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable;
+ *
+ * // 'open' an information row when a row is clicked on
+ * $('#example tbody tr').click( function () {
+ * if ( oTable.fnIsOpen(this) ) {
+ * oTable.fnClose( this );
+ * } else {
+ * oTable.fnOpen( this, "Temporary row opened", "info_row" );
+ * }
+ * } );
+ *
+ * oTable = $('#example').dataTable();
+ * } );
+ */
+ this.fnIsOpen = function( nTr )
+ {
+ var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
+ var aoOpenRows = oSettings.aoOpenRows;
+
+ for ( var i=0 ; i<oSettings.aoOpenRows.length ; i++ )
+ {
+ if ( oSettings.aoOpenRows[i].nParent == nTr )
+ {
+ return true;
+ }
+ }
+ return false;
+ };
+
+
+ /**
+ * This function will place a new row directly after a row which is currently
+ * on display on the page, with the HTML contents that is passed into the
+ * function. This can be used, for example, to ask for confirmation that a
+ * particular record should be deleted.
+ * @param {node} nTr The table row to 'open'
+ * @param {string|node|jQuery} mHtml The HTML to put into the row
+ * @param {string} sClass Class to give the new TD cell
+ * @returns {node} The row opened. Note that if the table row passed in as the
+ * first parameter, is not found in the table, this method will silently
+ * return.
+ * @dtopt API
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable;
+ *
+ * // 'open' an information row when a row is clicked on
+ * $('#example tbody tr').click( function () {
+ * if ( oTable.fnIsOpen(this) ) {
+ * oTable.fnClose( this );
+ * } else {
+ * oTable.fnOpen( this, "Temporary row opened", "info_row" );
+ * }
+ * } );
+ *
+ * oTable = $('#example').dataTable();
+ * } );
+ */
+ this.fnOpen = function( nTr, mHtml, sClass )
+ {
+ /* Find settings from table node */
+ var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
+
+ /* Check that the row given is in the table */
+ var nTableRows = _fnGetTrNodes( oSettings );
+ if ( $.inArray(nTr, nTableRows) === -1 )
+ {
+ return;
+ }
+
+ /* the old open one if there is one */
+ this.fnClose( nTr );
+
+ var nNewRow = document.createElement("tr");
+ var nNewCell = document.createElement("td");
+ nNewRow.appendChild( nNewCell );
+ nNewCell.className = sClass;
+ nNewCell.colSpan = _fnVisbleColumns( oSettings );
+
+ if (typeof mHtml === "string")
+ {
+ nNewCell.innerHTML = mHtml;
+ }
+ else
+ {
+ $(nNewCell).html( mHtml );
+ }
+
+ /* If the nTr isn't on the page at the moment - then we don't insert at the moment */
+ var nTrs = $('tr', oSettings.nTBody);
+ if ( $.inArray(nTr, nTrs) != -1 )
+ {
+ $(nNewRow).insertAfter(nTr);
+ }
+
+ oSettings.aoOpenRows.push( {
+ "nTr": nNewRow,
+ "nParent": nTr
+ } );
+
+ return nNewRow;
+ };
+
+
+ /**
+ * Change the pagination - provides the internal logic for pagination in a simple API
+ * function. With this function you can have a DataTables table go to the next,
+ * previous, first or last pages.
+ * @param {string|int} mAction Paging action to take: "first", "previous", "next" or "last"
+ * or page number to jump to (integer), note that page 0 is the first page.
+ * @param {bool} [bRedraw=true] Redraw the table or not
+ * @dtopt API
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ * oTable.fnPageChange( 'next' );
+ * } );
+ */
+ this.fnPageChange = function ( mAction, bRedraw )
+ {
+ var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
+ _fnPageChange( oSettings, mAction );
+ _fnCalculateEnd( oSettings );
+
+ if ( bRedraw === undefined || bRedraw )
+ {
+ _fnDraw( oSettings );
+ }
+ };
+
+
+ /**
+ * Show a particular column
+ * @param {int} iCol The column whose display should be changed
+ * @param {bool} bShow Show (true) or hide (false) the column
+ * @param {bool} [bRedraw=true] Redraw the table or not
+ * @dtopt API
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Hide the second column after initialisation
+ * oTable.fnSetColumnVis( 1, false );
+ * } );
+ */
+ this.fnSetColumnVis = function ( iCol, bShow, bRedraw )
+ {
+ var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
+ var i, iLen;
+ var aoColumns = oSettings.aoColumns;
+ var aoData = oSettings.aoData;
+ var nTd, bAppend, iBefore;
+
+ /* No point in doing anything if we are requesting what is already true */
+ if ( aoColumns[iCol].bVisible == bShow )
+ {
+ return;
+ }
+
+ /* Show the column */
+ if ( bShow )
+ {
+ var iInsert = 0;
+ for ( i=0 ; i<iCol ; i++ )
+ {
+ if ( aoColumns[i].bVisible )
+ {
+ iInsert++;
+ }
+ }
+
+ /* Need to decide if we should use appendChild or insertBefore */
+ bAppend = (iInsert >= _fnVisbleColumns( oSettings ));
+
+ /* Which coloumn should we be inserting before? */
+ if ( !bAppend )
+ {
+ for ( i=iCol ; i<aoColumns.length ; i++ )
+ {
+ if ( aoColumns[i].bVisible )
+ {
+ iBefore = i;
+ break;
+ }
+ }
+ }
+
+ for ( i=0, iLen=aoData.length ; i<iLen ; i++ )
+ {
+ if ( aoData[i].nTr !== null )
+ {
+ if ( bAppend )
+ {
+ aoData[i].nTr.appendChild(
+ aoData[i]._anHidden[iCol]
+ );
+ }
+ else
+ {
+ aoData[i].nTr.insertBefore(
+ aoData[i]._anHidden[iCol],
+ _fnGetTdNodes( oSettings, i )[iBefore] );
+ }
+ }
+ }
+ }
+ else
+ {
+ /* Remove a column from display */
+ for ( i=0, iLen=aoData.length ; i<iLen ; i++ )
+ {
+ if ( aoData[i].nTr !== null )
+ {
+ nTd = _fnGetTdNodes( oSettings, i )[iCol];
+ aoData[i]._anHidden[iCol] = nTd;
+ nTd.parentNode.removeChild( nTd );
+ }
+ }
+ }
+
+ /* Clear to set the visible flag */
+ aoColumns[iCol].bVisible = bShow;
+
+ /* Redraw the header and footer based on the new column visibility */
+ _fnDrawHead( oSettings, oSettings.aoHeader );
+ if ( oSettings.nTFoot )
+ {
+ _fnDrawHead( oSettings, oSettings.aoFooter );
+ }
+
+ /* If there are any 'open' rows, then we need to alter the colspan for this col change */
+ for ( i=0, iLen=oSettings.aoOpenRows.length ; i<iLen ; i++ )
+ {
+ oSettings.aoOpenRows[i].nTr.colSpan = _fnVisbleColumns( oSettings );
+ }
+
+ /* Do a redraw incase anything depending on the table columns needs it
+ * (built-in: scrolling)
+ */
+ if ( bRedraw === undefined || bRedraw )
+ {
+ _fnAdjustColumnSizing( oSettings );
+ _fnDraw( oSettings );
+ }
+
+ _fnSaveState( oSettings );
+ };
+
+
+ /**
+ * Get the settings for a particular table for external manipulation
+ * @returns {object} DataTables settings object. See
+ * {@link DataTable.models.oSettings}
+ * @dtopt API
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ * var oSettings = oTable.fnSettings();
+ *
+ * // Show an example parameter from the settings
+ * alert( oSettings._iDisplayStart );
+ * } );
+ */
+ this.fnSettings = function()
+ {
+ return _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
+ };
+
+
+ /**
+ * Sort the table by a particular column
+ * @param {int} iCol the data index to sort on. Note that this will not match the
+ * 'display index' if you have hidden data entries
+ * @dtopt API
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Sort immediately with columns 0 and 1
+ * oTable.fnSort( [ [0,'asc'], [1,'asc'] ] );
+ * } );
+ */
+ this.fnSort = function( aaSort )
+ {
+ var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
+ oSettings.aaSorting = aaSort;
+ _fnSort( oSettings );
+ };
+
+
+ /**
+ * Attach a sort listener to an element for a given column
+ * @param {node} nNode the element to attach the sort listener to
+ * @param {int} iColumn the column that a click on this node will sort on
+ * @param {function} [fnCallback] callback function when sort is run
+ * @dtopt API
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Sort on column 1, when 'sorter' is clicked on
+ * oTable.fnSortListener( document.getElementById('sorter'), 1 );
+ * } );
+ */
+ this.fnSortListener = function( nNode, iColumn, fnCallback )
+ {
+ _fnSortAttachListener( _fnSettingsFromNode( this[DataTable.ext.iApiIndex] ), nNode, iColumn,
+ fnCallback );
+ };
+
+
+ /**
+ * Update a table cell or row - this method will accept either a single value to
+ * update the cell with, an array of values with one element for each column or
+ * an object in the same format as the original data source. The function is
+ * self-referencing in order to make the multi column updates easier.
+ * @param {object|array|string} mData Data to update the cell/row with
+ * @param {node|int} mRow TR element you want to update or the aoData index
+ * @param {int} [iColumn] The column to update (not used of mData is an array or object)
+ * @param {bool} [bRedraw=true] Redraw the table or not
+ * @param {bool} [bAction=true] Perform pre-draw actions or not
+ * @returns {int} 0 on success, 1 on error
+ * @dtopt API
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ * oTable.fnUpdate( 'Example update', 0, 0 ); // Single cell
+ * oTable.fnUpdate( ['a', 'b', 'c', 'd', 'e'], 1, 0 ); // Row
+ * } );
+ */
+ this.fnUpdate = function( mData, mRow, iColumn, bRedraw, bAction )
+ {
+ var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
+ var i, iLen, sDisplay;
+ var iRow = (typeof mRow === 'object') ?
+ _fnNodeToDataIndex(oSettings, mRow) : mRow;
+
+ if ( $.isArray(mData) && iColumn === undefined )
+ {
+ /* Array update - update the whole row */
+ oSettings.aoData[iRow]._aData = mData.slice();
+
+ /* Flag to the function that we are recursing */
+ for ( i=0 ; i<oSettings.aoColumns.length ; i++ )
+ {
+ this.fnUpdate( _fnGetCellData( oSettings, iRow, i ), iRow, i, false, false );
+ }
+ }
+ else if ( $.isPlainObject(mData) && iColumn === undefined )
+ {
+ /* Object update - update the whole row - assume the developer gets the object right */
+ oSettings.aoData[iRow]._aData = $.extend( true, {}, mData );
+
+ for ( i=0 ; i<oSettings.aoColumns.length ; i++ )
+ {
+ this.fnUpdate( _fnGetCellData( oSettings, iRow, i ), iRow, i, false, false );
+ }
+ }
+ else
+ {
+ /* Individual cell update */
+ _fnSetCellData( oSettings, iRow, iColumn, mData );
+ sDisplay = _fnGetCellData( oSettings, iRow, iColumn, 'display' );
+
+ var oCol = oSettings.aoColumns[iColumn];
+ if ( oCol.fnRender !== null )
+ {
+ sDisplay = _fnRender( oSettings, iRow, iColumn );
+ if ( oCol.bUseRendered )
+ {
+ _fnSetCellData( oSettings, iRow, iColumn, sDisplay );
+ }
+ }
+
+ if ( oSettings.aoData[iRow].nTr !== null )
+ {
+ /* Do the actual HTML update */
+ _fnGetTdNodes( oSettings, iRow )[iColumn].innerHTML = sDisplay;
+ }
+ }
+
+ /* Modify the search index for this row (strictly this is likely not needed, since fnReDraw
+ * will rebuild the search array - however, the redraw might be disabled by the user)
+ */
+ var iDisplayIndex = $.inArray( iRow, oSettings.aiDisplay );
+ oSettings.asDataSearch[iDisplayIndex] = _fnBuildSearchRow(
+ oSettings,
+ _fnGetRowData( oSettings, iRow, 'filter', _fnGetColumns( oSettings, 'bSearchable' ) )
+ );
+
+ /* Perform pre-draw actions */
+ if ( bAction === undefined || bAction )
+ {
+ _fnAdjustColumnSizing( oSettings );
+ }
+
+ /* Redraw the table */
+ if ( bRedraw === undefined || bRedraw )
+ {
+ _fnReDraw( oSettings );
+ }
+ return 0;
+ };
+
+
+ /**
+ * Provide a common method for plug-ins to check the version of DataTables being used, in order
+ * to ensure compatibility.
+ * @param {string} sVersion Version string to check for, in the format "X.Y.Z". Note that the
+ * formats "X" and "X.Y" are also acceptable.
+ * @returns {boolean} true if this version of DataTables is greater or equal to the required
+ * version, or false if this version of DataTales is not suitable
+ * @method
+ * @dtopt API
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ * alert( oTable.fnVersionCheck( '1.9.0' ) );
+ * } );
+ */
+ this.fnVersionCheck = DataTable.ext.fnVersionCheck;
+
+
+ /*
+ * This is really a good bit rubbish this method of exposing the internal methods
+ * publicly... - To be fixed in 2.0 using methods on the prototype
+ */
+
+
+ /**
+ * Create a wrapper function for exporting an internal functions to an external API.
+ * @param {string} sFunc API function name
+ * @returns {function} wrapped function
+ * @memberof DataTable#oApi
+ */
+ function _fnExternApiFunc (sFunc)
+ {
+ return function() {
+ var aArgs = [_fnSettingsFromNode(this[DataTable.ext.iApiIndex])].concat(
+ Array.prototype.slice.call(arguments) );
+ return DataTable.ext.oApi[sFunc].apply( this, aArgs );
+ };
+ }
+
+
+ /**
+ * Reference to internal functions for use by plug-in developers. Note that these
+ * methods are references to internal functions and are considered to be private.
+ * If you use these methods, be aware that they are liable to change between versions
+ * (check the upgrade notes).
+ * @namespace
+ */
+ this.oApi = {
+ "_fnExternApiFunc": _fnExternApiFunc,
+ "_fnInitialise": _fnInitialise,
+ "_fnInitComplete": _fnInitComplete,
+ "_fnLanguageCompat": _fnLanguageCompat,
+ "_fnAddColumn": _fnAddColumn,
+ "_fnColumnOptions": _fnColumnOptions,
+ "_fnAddData": _fnAddData,
+ "_fnCreateTr": _fnCreateTr,
+ "_fnGatherData": _fnGatherData,
+ "_fnBuildHead": _fnBuildHead,
+ "_fnDrawHead": _fnDrawHead,
+ "_fnDraw": _fnDraw,
+ "_fnReDraw": _fnReDraw,
+ "_fnAjaxUpdate": _fnAjaxUpdate,
+ "_fnAjaxParameters": _fnAjaxParameters,
+ "_fnAjaxUpdateDraw": _fnAjaxUpdateDraw,
+ "_fnServerParams": _fnServerParams,
+ "_fnAddOptionsHtml": _fnAddOptionsHtml,
+ "_fnFeatureHtmlTable": _fnFeatureHtmlTable,
+ "_fnScrollDraw": _fnScrollDraw,
+ "_fnAdjustColumnSizing": _fnAdjustColumnSizing,
+ "_fnFeatureHtmlFilter": _fnFeatureHtmlFilter,
+ "_fnFilterComplete": _fnFilterComplete,
+ "_fnFilterCustom": _fnFilterCustom,
+ "_fnFilterColumn": _fnFilterColumn,
+ "_fnFilter": _fnFilter,
+ "_fnBuildSearchArray": _fnBuildSearchArray,
+ "_fnBuildSearchRow": _fnBuildSearchRow,
+ "_fnFilterCreateSearch": _fnFilterCreateSearch,
+ "_fnDataToSearch": _fnDataToSearch,
+ "_fnSort": _fnSort,
+ "_fnSortAttachListener": _fnSortAttachListener,
+ "_fnSortingClasses": _fnSortingClasses,
+ "_fnFeatureHtmlPaginate": _fnFeatureHtmlPaginate,
+ "_fnPageChange": _fnPageChange,
+ "_fnFeatureHtmlInfo": _fnFeatureHtmlInfo,
+ "_fnUpdateInfo": _fnUpdateInfo,
+ "_fnFeatureHtmlLength": _fnFeatureHtmlLength,
+ "_fnFeatureHtmlProcessing": _fnFeatureHtmlProcessing,
+ "_fnProcessingDisplay": _fnProcessingDisplay,
+ "_fnVisibleToColumnIndex": _fnVisibleToColumnIndex,
+ "_fnColumnIndexToVisible": _fnColumnIndexToVisible,
+ "_fnNodeToDataIndex": _fnNodeToDataIndex,
+ "_fnVisbleColumns": _fnVisbleColumns,
+ "_fnCalculateEnd": _fnCalculateEnd,
+ "_fnConvertToWidth": _fnConvertToWidth,
+ "_fnCalculateColumnWidths": _fnCalculateColumnWidths,
+ "_fnScrollingWidthAdjust": _fnScrollingWidthAdjust,
+ "_fnGetWidestNode": _fnGetWidestNode,
+ "_fnGetMaxLenString": _fnGetMaxLenString,
+ "_fnStringToCss": _fnStringToCss,
+ "_fnDetectType": _fnDetectType,
+ "_fnSettingsFromNode": _fnSettingsFromNode,
+ "_fnGetDataMaster": _fnGetDataMaster,
+ "_fnGetTrNodes": _fnGetTrNodes,
+ "_fnGetTdNodes": _fnGetTdNodes,
+ "_fnEscapeRegex": _fnEscapeRegex,
+ "_fnDeleteIndex": _fnDeleteIndex,
+ "_fnReOrderIndex": _fnReOrderIndex,
+ "_fnColumnOrdering": _fnColumnOrdering,
+ "_fnLog": _fnLog,
+ "_fnClearTable": _fnClearTable,
+ "_fnSaveState": _fnSaveState,
+ "_fnLoadState": _fnLoadState,
+ "_fnCreateCookie": _fnCreateCookie,
+ "_fnReadCookie": _fnReadCookie,
+ "_fnDetectHeader": _fnDetectHeader,
+ "_fnGetUniqueThs": _fnGetUniqueThs,
+ "_fnScrollBarWidth": _fnScrollBarWidth,
+ "_fnApplyToChildren": _fnApplyToChildren,
+ "_fnMap": _fnMap,
+ "_fnGetRowData": _fnGetRowData,
+ "_fnGetCellData": _fnGetCellData,
+ "_fnSetCellData": _fnSetCellData,
+ "_fnGetObjectDataFn": _fnGetObjectDataFn,
+ "_fnSetObjectDataFn": _fnSetObjectDataFn,
+ "_fnApplyColumnDefs": _fnApplyColumnDefs,
+ "_fnBindAction": _fnBindAction,
+ "_fnExtend": _fnExtend,
+ "_fnCallbackReg": _fnCallbackReg,
+ "_fnCallbackFire": _fnCallbackFire,
+ "_fnJsonString": _fnJsonString,
+ "_fnRender": _fnRender,
+ "_fnNodeToColumnIndex": _fnNodeToColumnIndex,
+ "_fnInfoMacros": _fnInfoMacros,
+ "_fnBrowserDetect": _fnBrowserDetect,
+ "_fnGetColumns": _fnGetColumns
+ };
+
+ $.extend( DataTable.ext.oApi, this.oApi );
+
+ for ( var sFunc in DataTable.ext.oApi )
+ {
+ if ( sFunc )
+ {
+ this[sFunc] = _fnExternApiFunc(sFunc);
+ }
+ }
+
+
+ var _that = this;
+ this.each(function() {
+ var i=0, iLen, j, jLen, k, kLen;
+ var sId = this.getAttribute( 'id' );
+ var bInitHandedOff = false;
+ var bUsePassedData = false;
+
+
+ /* Sanity check */
+ if ( this.nodeName.toLowerCase() != 'table' )
+ {
+ _fnLog( null, 0, "Attempted to initialise DataTables on a node which is not a "+
+ "table: "+this.nodeName );
+ return;
+ }
+
+ /* Check to see if we are re-initialising a table */
+ for ( i=0, iLen=DataTable.settings.length ; i<iLen ; i++ )
+ {
+ /* Base check on table node */
+ if ( DataTable.settings[i].nTable == this )
+ {
+ if ( oInit === undefined || oInit.bRetrieve )
+ {
+ return DataTable.settings[i].oInstance;
+ }
+ else if ( oInit.bDestroy )
+ {
+ DataTable.settings[i].oInstance.fnDestroy();
+ break;
+ }
+ else
+ {
+ _fnLog( DataTable.settings[i], 0, "Cannot reinitialise DataTable.\n\n"+
+ "To retrieve the DataTables object for this table, pass no arguments or see "+
+ "the docs for bRetrieve and bDestroy" );
+ return;
+ }
+ }
+
+ /* If the element we are initialising has the same ID as a table which was previously
+ * initialised, but the table nodes don't match (from before) then we destroy the old
+ * instance by simply deleting it. This is under the assumption that the table has been
+ * destroyed by other methods. Anyone using non-id selectors will need to do this manually
+ */
+ if ( DataTable.settings[i].sTableId == this.id )
+ {
+ DataTable.settings.splice( i, 1 );
+ break;
+ }
+ }
+
+ /* Ensure the table has an ID - required for accessibility */
+ if ( sId === null || sId === "" )
+ {
+ sId = "DataTables_Table_"+(DataTable.ext._oExternConfig.iNextUnique++);
+ this.id = sId;
+ }
+
+ /* Create the settings object for this table and set some of the default parameters */
+ var oSettings = $.extend( true, {}, DataTable.models.oSettings, {
+ "nTable": this,
+ "oApi": _that.oApi,
+ "oInit": oInit,
+ "sDestroyWidth": $(this).width(),
+ "sInstance": sId,
+ "sTableId": sId
+ } );
+ DataTable.settings.push( oSettings );
+
+ // Need to add the instance after the instance after the settings object has been added
+ // to the settings array, so we can self reference the table instance if more than one
+ oSettings.oInstance = (_that.length===1) ? _that : $(this).dataTable();
+
+ /* Setting up the initialisation object */
+ if ( !oInit )
+ {
+ oInit = {};
+ }
+
+ // Backwards compatibility, before we apply all the defaults
+ if ( oInit.oLanguage )
+ {
+ _fnLanguageCompat( oInit.oLanguage );
+ }
+
+ oInit = _fnExtend( $.extend(true, {}, DataTable.defaults), oInit );
+
+ // Map the initialisation options onto the settings object
+ _fnMap( oSettings.oFeatures, oInit, "bPaginate" );
+ _fnMap( oSettings.oFeatures, oInit, "bLengthChange" );
+ _fnMap( oSettings.oFeatures, oInit, "bFilter" );
+ _fnMap( oSettings.oFeatures, oInit, "bSort" );
+ _fnMap( oSettings.oFeatures, oInit, "bInfo" );
+ _fnMap( oSettings.oFeatures, oInit, "bProcessing" );
+ _fnMap( oSettings.oFeatures, oInit, "bAutoWidth" );
+ _fnMap( oSettings.oFeatures, oInit, "bSortClasses" );
+ _fnMap( oSettings.oFeatures, oInit, "bServerSide" );
+ _fnMap( oSettings.oFeatures, oInit, "bDeferRender" );
+ _fnMap( oSettings.oScroll, oInit, "sScrollX", "sX" );
+ _fnMap( oSettings.oScroll, oInit, "sScrollXInner", "sXInner" );
+ _fnMap( oSettings.oScroll, oInit, "sScrollY", "sY" );
+ _fnMap( oSettings.oScroll, oInit, "bScrollCollapse", "bCollapse" );
+ _fnMap( oSettings.oScroll, oInit, "bScrollInfinite", "bInfinite" );
+ _fnMap( oSettings.oScroll, oInit, "iScrollLoadGap", "iLoadGap" );
+ _fnMap( oSettings.oScroll, oInit, "bScrollAutoCss", "bAutoCss" );
+ _fnMap( oSettings, oInit, "asStripeClasses" );
+ _fnMap( oSettings, oInit, "asStripClasses", "asStripeClasses" ); // legacy
+ _fnMap( oSettings, oInit, "fnServerData" );
+ _fnMap( oSettings, oInit, "fnFormatNumber" );
+ _fnMap( oSettings, oInit, "sServerMethod" );
+ _fnMap( oSettings, oInit, "aaSorting" );
+ _fnMap( oSettings, oInit, "aaSortingFixed" );
+ _fnMap( oSettings, oInit, "aLengthMenu" );
+ _fnMap( oSettings, oInit, "sPaginationType" );
+ _fnMap( oSettings, oInit, "sAjaxSource" );
+ _fnMap( oSettings, oInit, "sAjaxDataProp" );
+ _fnMap( oSettings, oInit, "iCookieDuration" );
+ _fnMap( oSettings, oInit, "sCookiePrefix" );
+ _fnMap( oSettings, oInit, "sDom" );
+ _fnMap( oSettings, oInit, "bSortCellsTop" );
+ _fnMap( oSettings, oInit, "iTabIndex" );
+ _fnMap( oSettings, oInit, "oSearch", "oPreviousSearch" );
+ _fnMap( oSettings, oInit, "aoSearchCols", "aoPreSearchCols" );
+ _fnMap( oSettings, oInit, "iDisplayLength", "_iDisplayLength" );
+ _fnMap( oSettings, oInit, "bJQueryUI", "bJUI" );
+ _fnMap( oSettings, oInit, "fnCookieCallback" );
+ _fnMap( oSettings, oInit, "fnStateLoad" );
+ _fnMap( oSettings, oInit, "fnStateSave" );
+ _fnMap( oSettings.oLanguage, oInit, "fnInfoCallback" );
+
+ /* Callback functions which are array driven */
+ _fnCallbackReg( oSettings, 'aoDrawCallback', oInit.fnDrawCallback, 'user' );
+ _fnCallbackReg( oSettings, 'aoServerParams', oInit.fnServerParams, 'user' );
+ _fnCallbackReg( oSettings, 'aoStateSaveParams', oInit.fnStateSaveParams, 'user' );
+ _fnCallbackReg( oSettings, 'aoStateLoadParams', oInit.fnStateLoadParams, 'user' );
+ _fnCallbackReg( oSettings, 'aoStateLoaded', oInit.fnStateLoaded, 'user' );
+ _fnCallbackReg( oSettings, 'aoRowCallback', oInit.fnRowCallback, 'user' );
+ _fnCallbackReg( oSettings, 'aoRowCreatedCallback', oInit.fnCreatedRow, 'user' );
+ _fnCallbackReg( oSettings, 'aoHeaderCallback', oInit.fnHeaderCallback, 'user' );
+ _fnCallbackReg( oSettings, 'aoFooterCallback', oInit.fnFooterCallback, 'user' );
+ _fnCallbackReg( oSettings, 'aoInitComplete', oInit.fnInitComplete, 'user' );
+ _fnCallbackReg( oSettings, 'aoPreDrawCallback', oInit.fnPreDrawCallback, 'user' );
+
+ if ( oSettings.oFeatures.bServerSide && oSettings.oFeatures.bSort &&
+ oSettings.oFeatures.bSortClasses )
+ {
+ /* Enable sort classes for server-side processing. Safe to do it here, since server-side
+ * processing must be enabled by the developer
+ */
+ _fnCallbackReg( oSettings, 'aoDrawCallback', _fnSortingClasses, 'server_side_sort_classes' );
+ }
+ else if ( oSettings.oFeatures.bDeferRender )
+ {
+ _fnCallbackReg( oSettings, 'aoDrawCallback', _fnSortingClasses, 'defer_sort_classes' );
+ }
+
+ if ( oInit.bJQueryUI )
+ {
+ /* Use the JUI classes object for display. You could clone the oStdClasses object if
+ * you want to have multiple tables with multiple independent classes
+ */
+ $.extend( oSettings.oClasses, DataTable.ext.oJUIClasses );
+
+ if ( oInit.sDom === DataTable.defaults.sDom && DataTable.defaults.sDom === "lfrtip" )
+ {
+ /* Set the DOM to use a layout suitable for jQuery UI's theming */
+ oSettings.sDom = '<"H"lfr>t<"F"ip>';
+ }
+ }
+ else
+ {
+ $.extend( oSettings.oClasses, DataTable.ext.oStdClasses );
+ }
+ $(this).addClass( oSettings.oClasses.sTable );
+
+ /* Calculate the scroll bar width and cache it for use later on */
+ if ( oSettings.oScroll.sX !== "" || oSettings.oScroll.sY !== "" )
+ {
+ oSettings.oScroll.iBarWidth = _fnScrollBarWidth();
+ }
+
+ if ( oSettings.iInitDisplayStart === undefined )
+ {
+ /* Display start point, taking into account the save saving */
+ oSettings.iInitDisplayStart = oInit.iDisplayStart;
+ oSettings._iDisplayStart = oInit.iDisplayStart;
+ }
+
+ /* Must be done after everything which can be overridden by a cookie! */
+ if ( oInit.bStateSave )
+ {
+ oSettings.oFeatures.bStateSave = true;
+ _fnLoadState( oSettings, oInit );
+ _fnCallbackReg( oSettings, 'aoDrawCallback', _fnSaveState, 'state_save' );
+ }
+
+ if ( oInit.iDeferLoading !== null )
+ {
+ oSettings.bDeferLoading = true;
+ var tmp = $.isArray( oInit.iDeferLoading );
+ oSettings._iRecordsDisplay = tmp ? oInit.iDeferLoading[0] : oInit.iDeferLoading;
+ oSettings._iRecordsTotal = tmp ? oInit.iDeferLoading[1] : oInit.iDeferLoading;
+ }
+
+ if ( oInit.aaData !== null )
+ {
+ bUsePassedData = true;
+ }
+
+ /* Language definitions */
+ if ( oInit.oLanguage.sUrl !== "" )
+ {
+ /* Get the language definitions from a file - because this Ajax call makes the language
+ * get async to the remainder of this function we use bInitHandedOff to indicate that
+ * _fnInitialise will be fired by the returned Ajax handler, rather than the constructor
+ */
+ oSettings.oLanguage.sUrl = oInit.oLanguage.sUrl;
+ $.getJSON( oSettings.oLanguage.sUrl, null, function( json ) {
+ _fnLanguageCompat( json );
+ $.extend( true, oSettings.oLanguage, oInit.oLanguage, json );
+ _fnInitialise( oSettings );
+ } );
+ bInitHandedOff = true;
+ }
+ else
+ {
+ $.extend( true, oSettings.oLanguage, oInit.oLanguage );
+ }
+
+
+ /*
+ * Stripes
+ */
+ if ( oInit.asStripeClasses === null )
+ {
+ oSettings.asStripeClasses =[
+ oSettings.oClasses.sStripeOdd,
+ oSettings.oClasses.sStripeEven
+ ];
+ }
+
+ /* Remove row stripe classes if they are already on the table row */
+ iLen=oSettings.asStripeClasses.length;
+ oSettings.asDestroyStripes = [];
+ if (iLen)
+ {
+ var bStripeRemove = false;
+ var anRows = $(this).children('tbody').children('tr:lt(' + iLen + ')');
+ for ( i=0 ; i<iLen ; i++ )
+ {
+ if ( anRows.hasClass( oSettings.asStripeClasses[i] ) )
+ {
+ bStripeRemove = true;
+
+ /* Store the classes which we are about to remove so they can be re-added on destroy */
+ oSettings.asDestroyStripes.push( oSettings.asStripeClasses[i] );
+ }
+ }
+
+ if ( bStripeRemove )
+ {
+ anRows.removeClass( oSettings.asStripeClasses.join(' ') );
+ }
+ }
+
+ /*
+ * Columns
+ * See if we should load columns automatically or use defined ones
+ */
+ var anThs = [];
+ var aoColumnsInit;
+ var nThead = this.getElementsByTagName('thead');
+ if ( nThead.length !== 0 )
+ {
+ _fnDetectHeader( oSettings.aoHeader, nThead[0] );
+ anThs = _fnGetUniqueThs( oSettings );
+ }
+
+ /* If not given a column array, generate one with nulls */
+ if ( oInit.aoColumns === null )
+ {
+ aoColumnsInit = [];
+ for ( i=0, iLen=anThs.length ; i<iLen ; i++ )
+ {
+ aoColumnsInit.push( null );
+ }
+ }
+ else
+ {
+ aoColumnsInit = oInit.aoColumns;
+ }
+
+ /* Add the columns */
+ for ( i=0, iLen=aoColumnsInit.length ; i<iLen ; i++ )
+ {
+ /* Short cut - use the loop to check if we have column visibility state to restore */
+ if ( oInit.saved_aoColumns !== undefined && oInit.saved_aoColumns.length == iLen )
+ {
+ if ( aoColumnsInit[i] === null )
+ {
+ aoColumnsInit[i] = {};
+ }
+ aoColumnsInit[i].bVisible = oInit.saved_aoColumns[i].bVisible;
+ }
+
+ _fnAddColumn( oSettings, anThs ? anThs[i] : null );
+ }
+
+ /* Apply the column definitions */
+ _fnApplyColumnDefs( oSettings, oInit.aoColumnDefs, aoColumnsInit, function (iCol, oDef) {
+ _fnColumnOptions( oSettings, iCol, oDef );
+ } );
+
+
+ /*
+ * Sorting
+ * Check the aaSorting array
+ */
+ for ( i=0, iLen=oSettings.aaSorting.length ; i<iLen ; i++ )
+ {
+ if ( oSettings.aaSorting[i][0] >= oSettings.aoColumns.length )
+ {
+ oSettings.aaSorting[i][0] = 0;
+ }
+ var oColumn = oSettings.aoColumns[ oSettings.aaSorting[i][0] ];
+
+ /* Add a default sorting index */
+ if ( oSettings.aaSorting[i][2] === undefined )
+ {
+ oSettings.aaSorting[i][2] = 0;
+ }
+
+ /* If aaSorting is not defined, then we use the first indicator in asSorting */
+ if ( oInit.aaSorting === undefined && oSettings.saved_aaSorting === undefined )
+ {
+ oSettings.aaSorting[i][1] = oColumn.asSorting[0];
+ }
+
+ /* Set the current sorting index based on aoColumns.asSorting */
+ for ( j=0, jLen=oColumn.asSorting.length ; j<jLen ; j++ )
+ {
+ if ( oSettings.aaSorting[i][1] == oColumn.asSorting[j] )
+ {
+ oSettings.aaSorting[i][2] = j;
+ break;
+ }
+ }
+ }
+
+ /* Do a first pass on the sorting classes (allows any size changes to be taken into
+ * account, and also will apply sorting disabled classes if disabled
+ */
+ _fnSortingClasses( oSettings );
+
+
+ /*
+ * Final init
+ * Cache the header, body and footer as required, creating them if needed
+ */
+
+ /* Browser support detection */
+ _fnBrowserDetect( oSettings );
+
+ // Work around for Webkit bug 83867 - store the caption-side before removing from doc
+ var captions = $(this).children('caption').each( function () {
+ this._captionSide = $(this).css('caption-side');
+ } );
+
+ var thead = $(this).children('thead');
+ if ( thead.length === 0 )
+ {
+ thead = [ document.createElement( 'thead' ) ];
+ this.appendChild( thead[0] );
+ }
+ oSettings.nTHead = thead[0];
+
+ var tbody = $(this).children('tbody');
+ if ( tbody.length === 0 )
+ {
+ tbody = [ document.createElement( 'tbody' ) ];
+ this.appendChild( tbody[0] );
+ }
+ oSettings.nTBody = tbody[0];
+ oSettings.nTBody.setAttribute( "role", "alert" );
+ oSettings.nTBody.setAttribute( "aria-live", "polite" );
+ oSettings.nTBody.setAttribute( "aria-relevant", "all" );
+
+ var tfoot = $(this).children('tfoot');
+ if ( tfoot.length === 0 && captions.length > 0 && (oSettings.oScroll.sX !== "" || oSettings.oScroll.sY !== "") )
+ {
+ // If we are a scrolling table, and no footer has been given, then we need to create
+ // a tfoot element for the caption element to be appended to
+ tfoot = [ document.createElement( 'tfoot' ) ];
+ this.appendChild( tfoot[0] );
+ }
+
+ if ( tfoot.length > 0 )
+ {
+ oSettings.nTFoot = tfoot[0];
+ _fnDetectHeader( oSettings.aoFooter, oSettings.nTFoot );
+ }
+
+ /* Check if there is data passing into the constructor */
+ if ( bUsePassedData )
+ {
+ for ( i=0 ; i<oInit.aaData.length ; i++ )
+ {
+ _fnAddData( oSettings, oInit.aaData[ i ] );
+ }
+ }
+ else
+ {
+ /* Grab the data from the page */
+ _fnGatherData( oSettings );
+ }
+
+ /* Copy the data index array */
+ oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
+
+ /* Initialisation complete - table can be drawn */
+ oSettings.bInitialised = true;
+
+ /* Check if we need to initialise the table (it might not have been handed off to the
+ * language processor)
+ */
+ if ( bInitHandedOff === false )
+ {
+ _fnInitialise( oSettings );
+ }
+ } );
+ _that = null;
+ return this;
+ };
+
+
+
+ /**
+ * Provide a common method for plug-ins to check the version of DataTables being used, in order
+ * to ensure compatibility.
+ * @param {string} sVersion Version string to check for, in the format "X.Y.Z". Note that the
+ * formats "X" and "X.Y" are also acceptable.
+ * @returns {boolean} true if this version of DataTables is greater or equal to the required
+ * version, or false if this version of DataTales is not suitable
+ * @static
+ * @dtopt API-Static
+ *
+ * @example
+ * alert( $.fn.dataTable.fnVersionCheck( '1.9.0' ) );
+ */
+ DataTable.fnVersionCheck = function( sVersion )
+ {
+ /* This is cheap, but effective */
+ var fnZPad = function (Zpad, count)
+ {
+ while(Zpad.length < count) {
+ Zpad += '0';
+ }
+ return Zpad;
+ };
+ var aThis = DataTable.ext.sVersion.split('.');
+ var aThat = sVersion.split('.');
+ var sThis = '', sThat = '';
+
+ for ( var i=0, iLen=aThat.length ; i<iLen ; i++ )
+ {
+ sThis += fnZPad( aThis[i], 3 );
+ sThat += fnZPad( aThat[i], 3 );
+ }
+
+ return parseInt(sThis, 10) >= parseInt(sThat, 10);
+ };
+
+
+ /**
+ * Check if a TABLE node is a DataTable table already or not.
+ * @param {node} nTable The TABLE node to check if it is a DataTable or not (note that other
+ * node types can be passed in, but will always return false).
+ * @returns {boolean} true the table given is a DataTable, or false otherwise
+ * @static
+ * @dtopt API-Static
+ *
+ * @example
+ * var ex = document.getElementById('example');
+ * if ( ! $.fn.DataTable.fnIsDataTable( ex ) ) {
+ * $(ex).dataTable();
+ * }
+ */
+ DataTable.fnIsDataTable = function ( nTable )
+ {
+ var o = DataTable.settings;
+
+ for ( var i=0 ; i<o.length ; i++ )
+ {
+ if ( o[i].nTable === nTable || o[i].nScrollHead === nTable || o[i].nScrollFoot === nTable )
+ {
+ return true;
+ }
+ }
+
+ return false;
+ };
+
+
+ /**
+ * Get all DataTable tables that have been initialised - optionally you can select to
+ * get only currently visible tables.
+ * @param {boolean} [bVisible=false] Flag to indicate if you want all (default) or
+ * visible tables only.
+ * @returns {array} Array of TABLE nodes (not DataTable instances) which are DataTables
+ * @static
+ * @dtopt API-Static
+ *
+ * @example
+ * var table = $.fn.dataTable.fnTables(true);
+ * if ( table.length > 0 ) {
+ * $(table).dataTable().fnAdjustColumnSizing();
+ * }
+ */
+ DataTable.fnTables = function ( bVisible )
+ {
+ var out = [];
+
+ jQuery.each( DataTable.settings, function (i, o) {
+ if ( !bVisible || (bVisible === true && $(o.nTable).is(':visible')) )
+ {
+ out.push( o.nTable );
+ }
+ } );
+
+ return out;
+ };
+
+
+ /**
+ * Version string for plug-ins to check compatibility. Allowed format is
+ * a.b.c.d.e where: a:int, b:int, c:int, d:string(dev|beta), e:int. d and
+ * e are optional
+ * @member
+ * @type string
+ * @default Version number
+ */
+ DataTable.version = "1.9.4";
+
+ /**
+ * Private data store, containing all of the settings objects that are created for the
+ * tables on a given page.
+ *
+ * Note that the <i>DataTable.settings</i> object is aliased to <i>jQuery.fn.dataTableExt</i>
+ * through which it may be accessed and manipulated, or <i>jQuery.fn.dataTable.settings</i>.
+ * @member
+ * @type array
+ * @default []
+ * @private
+ */
+ DataTable.settings = [];
+
+ /**
+ * Object models container, for the various models that DataTables has available
+ * to it. These models define the objects that are used to hold the active state
+ * and configuration of the table.
+ * @namespace
+ */
+ DataTable.models = {};
+
+
+ /**
+ * DataTables extension options and plug-ins. This namespace acts as a collection "area"
+ * for plug-ins that can be used to extend the default DataTables behaviour - indeed many
+ * of the build in methods use this method to provide their own capabilities (sorting methods
+ * for example).
+ *
+ * Note that this namespace is aliased to jQuery.fn.dataTableExt so it can be readily accessed
+ * and modified by plug-ins.
+ * @namespace
+ */
+ DataTable.models.ext = {
+ /**
+ * Plug-in filtering functions - this method of filtering is complimentary to the default
+ * type based filtering, and a lot more comprehensive as it allows you complete control
+ * over the filtering logic. Each element in this array is a function (parameters
+ * described below) that is called for every row in the table, and your logic decides if
+ * it should be included in the filtered data set or not.
+ * <ul>
+ * <li>
+ * Function input parameters:
+ * <ul>
+ * <li>{object} DataTables settings object: see {@link DataTable.models.oSettings}.</li>
+ * <li>{array|object} Data for the row to be processed (same as the original format
+ * that was passed in as the data source, or an array from a DOM data source</li>
+ * <li>{int} Row index in aoData ({@link DataTable.models.oSettings.aoData}), which can
+ * be useful to retrieve the TR element if you need DOM interaction.</li>
+ * </ul>
+ * </li>
+ * <li>
+ * Function return:
+ * <ul>
+ * <li>{boolean} Include the row in the filtered result set (true) or not (false)</li>
+ * </ul>
+ * </il>
+ * </ul>
+ * @type array
+ * @default []
+ *
+ * @example
+ * // The following example shows custom filtering being applied to the fourth column (i.e.
+ * // the aData[3] index) based on two input values from the end-user, matching the data in
+ * // a certain range.
+ * $.fn.dataTableExt.afnFiltering.push(
+ * function( oSettings, aData, iDataIndex ) {
+ * var iMin = document.getElementById('min').value * 1;
+ * var iMax = document.getElementById('max').value * 1;
+ * var iVersion = aData[3] == "-" ? 0 : aData[3]*1;
+ * if ( iMin == "" && iMax == "" ) {
+ * return true;
+ * }
+ * else if ( iMin == "" && iVersion < iMax ) {
+ * return true;
+ * }
+ * else if ( iMin < iVersion && "" == iMax ) {
+ * return true;
+ * }
+ * else if ( iMin < iVersion && iVersion < iMax ) {
+ * return true;
+ * }
+ * return false;
+ * }
+ * );
+ */
+ "afnFiltering": [],
+
+
+ /**
+ * Plug-in sorting functions - this method of sorting is complimentary to the default type
+ * based sorting that DataTables does automatically, allowing much greater control over the
+ * the data that is being used to sort a column. This is useful if you want to do sorting
+ * based on live data (for example the contents of an 'input' element) rather than just the
+ * static string that DataTables knows of. The way these plug-ins work is that you create
+ * an array of the values you wish to be sorted for the column in question and then return
+ * that array. Which pre-sorting function is run here depends on the sSortDataType parameter
+ * that is used for the column (if any). This is the corollary of <i>ofnSearch</i> for sort
+ * data.
+ * <ul>
+ * <li>
+ * Function input parameters:
+ * <ul>
+ * <li>{object} DataTables settings object: see {@link DataTable.models.oSettings}.</li>
+ * <li>{int} Target column index</li>
+ * </ul>
+ * </li>
+ * <li>
+ * Function return:
+ * <ul>
+ * <li>{array} Data for the column to be sorted upon</li>
+ * </ul>
+ * </il>
+ * </ul>
+ *
+ * Note that as of v1.9, it is typically preferable to use <i>mData</i> to prepare data for
+ * the different uses that DataTables can put the data to. Specifically <i>mData</i> when
+ * used as a function will give you a 'type' (sorting, filtering etc) that you can use to
+ * prepare the data as required for the different types. As such, this method is deprecated.
+ * @type array
+ * @default []
+ * @deprecated
+ *
+ * @example
+ * // Updating the cached sorting information with user entered values in HTML input elements
+ * jQuery.fn.dataTableExt.afnSortData['dom-text'] = function ( oSettings, iColumn )
+ * {
+ * var aData = [];
+ * $( 'td:eq('+iColumn+') input', oSettings.oApi._fnGetTrNodes(oSettings) ).each( function () {
+ * aData.push( this.value );
+ * } );
+ * return aData;
+ * }
+ */
+ "afnSortData": [],
+
+
+ /**
+ * Feature plug-ins - This is an array of objects which describe the feature plug-ins that are
+ * available to DataTables. These feature plug-ins are accessible through the sDom initialisation
+ * option. As such, each feature plug-in must describe a function that is used to initialise
+ * itself (fnInit), a character so the feature can be enabled by sDom (cFeature) and the name
+ * of the feature (sFeature). Thus the objects attached to this method must provide:
+ * <ul>
+ * <li>{function} fnInit Initialisation of the plug-in
+ * <ul>
+ * <li>
+ * Function input parameters:
+ * <ul>
+ * <li>{object} DataTables settings object: see {@link DataTable.models.oSettings}.</li>
+ * </ul>
+ * </li>
+ * <li>
+ * Function return:
+ * <ul>
+ * <li>{node|null} The element which contains your feature. Note that the return
+ * may also be void if your plug-in does not require to inject any DOM elements
+ * into DataTables control (sDom) - for example this might be useful when
+ * developing a plug-in which allows table control via keyboard entry.</li>
+ * </ul>
+ * </il>
+ * </ul>
+ * </li>
+ * <li>{character} cFeature Character that will be matched in sDom - case sensitive</li>
+ * <li>{string} sFeature Feature name</li>
+ * </ul>
+ * @type array
+ * @default []
+ *
+ * @example
+ * // How TableTools initialises itself.
+ * $.fn.dataTableExt.aoFeatures.push( {
+ * "fnInit": function( oSettings ) {
+ * return new TableTools( { "oDTSettings": oSettings } );
+ * },
+ * "cFeature": "T",
+ * "sFeature": "TableTools"
+ * } );
+ */
+ "aoFeatures": [],
+
+
+ /**
+ * Type detection plug-in functions - DataTables utilises types to define how sorting and
+ * filtering behave, and types can be either be defined by the developer (sType for the
+ * column) or they can be automatically detected by the methods in this array. The functions
+ * defined in the array are quite simple, taking a single parameter (the data to analyse)
+ * and returning the type if it is a known type, or null otherwise.
+ * <ul>
+ * <li>
+ * Function input parameters:
+ * <ul>
+ * <li>{*} Data from the column cell to be analysed</li>
+ * </ul>
+ * </li>
+ * <li>
+ * Function return:
+ * <ul>
+ * <li>{string|null} Data type detected, or null if unknown (and thus pass it
+ * on to the other type detection functions.</li>
+ * </ul>
+ * </il>
+ * </ul>
+ * @type array
+ * @default []
+ *
+ * @example
+ * // Currency type detection plug-in:
+ * jQuery.fn.dataTableExt.aTypes.push(
+ * function ( sData ) {
+ * var sValidChars = "0123456789.-";
+ * var Char;
+ *
+ * // Check the numeric part
+ * for ( i=1 ; i<sData.length ; i++ ) {
+ * Char = sData.charAt(i);
+ * if (sValidChars.indexOf(Char) == -1) {
+ * return null;
+ * }
+ * }
+ *
+ * // Check prefixed by currency
+ * if ( sData.charAt(0) == '$' || sData.charAt(0) == '&pound;' ) {
+ * return 'currency';
+ * }
+ * return null;
+ * }
+ * );
+ */
+ "aTypes": [],
+
+
+ /**
+ * Provide a common method for plug-ins to check the version of DataTables being used,
+ * in order to ensure compatibility.
+ * @type function
+ * @param {string} sVersion Version string to check for, in the format "X.Y.Z". Note
+ * that the formats "X" and "X.Y" are also acceptable.
+ * @returns {boolean} true if this version of DataTables is greater or equal to the
+ * required version, or false if this version of DataTales is not suitable
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ * alert( oTable.fnVersionCheck( '1.9.0' ) );
+ * } );
+ */
+ "fnVersionCheck": DataTable.fnVersionCheck,
+
+
+ /**
+ * Index for what 'this' index API functions should use
+ * @type int
+ * @default 0
+ */
+ "iApiIndex": 0,
+
+
+ /**
+ * Pre-processing of filtering data plug-ins - When you assign the sType for a column
+ * (or have it automatically detected for you by DataTables or a type detection plug-in),
+ * you will typically be using this for custom sorting, but it can also be used to provide
+ * custom filtering by allowing you to pre-processing the data and returning the data in
+ * the format that should be filtered upon. This is done by adding functions this object
+ * with a parameter name which matches the sType for that target column. This is the
+ * corollary of <i>afnSortData</i> for filtering data.
+ * <ul>
+ * <li>
+ * Function input parameters:
+ * <ul>
+ * <li>{*} Data from the column cell to be prepared for filtering</li>
+ * </ul>
+ * </li>
+ * <li>
+ * Function return:
+ * <ul>
+ * <li>{string|null} Formatted string that will be used for the filtering.</li>
+ * </ul>
+ * </il>
+ * </ul>
+ *
+ * Note that as of v1.9, it is typically preferable to use <i>mData</i> to prepare data for
+ * the different uses that DataTables can put the data to. Specifically <i>mData</i> when
+ * used as a function will give you a 'type' (sorting, filtering etc) that you can use to
+ * prepare the data as required for the different types. As such, this method is deprecated.
+ * @type object
+ * @default {}
+ * @deprecated
+ *
+ * @example
+ * $.fn.dataTableExt.ofnSearch['title-numeric'] = function ( sData ) {
+ * return sData.replace(/\n/g," ").replace( /<.*?>/g, "" );
+ * }
+ */
+ "ofnSearch": {},
+
+
+ /**
+ * Container for all private functions in DataTables so they can be exposed externally
+ * @type object
+ * @default {}
+ */
+ "oApi": {},
+
+
+ /**
+ * Storage for the various classes that DataTables uses
+ * @type object
+ * @default {}
+ */
+ "oStdClasses": {},
+
+
+ /**
+ * Storage for the various classes that DataTables uses - jQuery UI suitable
+ * @type object
+ * @default {}
+ */
+ "oJUIClasses": {},
+
+
+ /**
+ * Pagination plug-in methods - The style and controls of the pagination can significantly
+ * impact on how the end user interacts with the data in your table, and DataTables allows
+ * the addition of pagination controls by extending this object, which can then be enabled
+ * through the <i>sPaginationType</i> initialisation parameter. Each pagination type that
+ * is added is an object (the property name of which is what <i>sPaginationType</i> refers
+ * to) that has two properties, both methods that are used by DataTables to update the
+ * control's state.
+ * <ul>
+ * <li>
+ * fnInit - Initialisation of the paging controls. Called only during initialisation
+ * of the table. It is expected that this function will add the required DOM elements
+ * to the page for the paging controls to work. The element pointer
+ * 'oSettings.aanFeatures.p' array is provided by DataTables to contain the paging
+ * controls (note that this is a 2D array to allow for multiple instances of each
+ * DataTables DOM element). It is suggested that you add the controls to this element
+ * as children
+ * <ul>
+ * <li>
+ * Function input parameters:
+ * <ul>
+ * <li>{object} DataTables settings object: see {@link DataTable.models.oSettings}.</li>
+ * <li>{node} Container into which the pagination controls must be inserted</li>
+ * <li>{function} Draw callback function - whenever the controls cause a page
+ * change, this method must be called to redraw the table.</li>
+ * </ul>
+ * </li>
+ * <li>
+ * Function return:
+ * <ul>
+ * <li>No return required</li>
+ * </ul>
+ * </il>
+ * </ul>
+ * </il>
+ * <li>
+ * fnInit - This function is called whenever the paging status of the table changes and is
+ * typically used to update classes and/or text of the paging controls to reflex the new
+ * status.
+ * <ul>
+ * <li>
+ * Function input parameters:
+ * <ul>
+ * <li>{object} DataTables settings object: see {@link DataTable.models.oSettings}.</li>
+ * <li>{function} Draw callback function - in case you need to redraw the table again
+ * or attach new event listeners</li>
+ * </ul>
+ * </li>
+ * <li>
+ * Function return:
+ * <ul>
+ * <li>No return required</li>
+ * </ul>
+ * </il>
+ * </ul>
+ * </il>
+ * </ul>
+ * @type object
+ * @default {}
+ *
+ * @example
+ * $.fn.dataTableExt.oPagination.four_button = {
+ * "fnInit": function ( oSettings, nPaging, fnCallbackDraw ) {
+ * nFirst = document.createElement( 'span' );
+ * nPrevious = document.createElement( 'span' );
+ * nNext = document.createElement( 'span' );
+ * nLast = document.createElement( 'span' );
+ *
+ * nFirst.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sFirst ) );
+ * nPrevious.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sPrevious ) );
+ * nNext.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sNext ) );
+ * nLast.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sLast ) );
+ *
+ * nFirst.className = "paginate_button first";
+ * nPrevious.className = "paginate_button previous";
+ * nNext.className="paginate_button next";
+ * nLast.className = "paginate_button last";
+ *
+ * nPaging.appendChild( nFirst );
+ * nPaging.appendChild( nPrevious );
+ * nPaging.appendChild( nNext );
+ * nPaging.appendChild( nLast );
+ *
+ * $(nFirst).click( function () {
+ * oSettings.oApi._fnPageChange( oSettings, "first" );
+ * fnCallbackDraw( oSettings );
+ * } );
+ *
+ * $(nPrevious).click( function() {
+ * oSettings.oApi._fnPageChange( oSettings, "previous" );
+ * fnCallbackDraw( oSettings );
+ * } );
+ *
+ * $(nNext).click( function() {
+ * oSettings.oApi._fnPageChange( oSettings, "next" );
+ * fnCallbackDraw( oSettings );
+ * } );
+ *
+ * $(nLast).click( function() {
+ * oSettings.oApi._fnPageChange( oSettings, "last" );
+ * fnCallbackDraw( oSettings );
+ * } );
+ *
+ * $(nFirst).bind( 'selectstart', function () { return false; } );
+ * $(nPrevious).bind( 'selectstart', function () { return false; } );
+ * $(nNext).bind( 'selectstart', function () { return false; } );
+ * $(nLast).bind( 'selectstart', function () { return false; } );
+ * },
+ *
+ * "fnUpdate": function ( oSettings, fnCallbackDraw ) {
+ * if ( !oSettings.aanFeatures.p ) {
+ * return;
+ * }
+ *
+ * // Loop over each instance of the pager
+ * var an = oSettings.aanFeatures.p;
+ * for ( var i=0, iLen=an.length ; i<iLen ; i++ ) {
+ * var buttons = an[i].getElementsByTagName('span');
+ * if ( oSettings._iDisplayStart === 0 ) {
+ * buttons[0].className = "paginate_disabled_previous";
+ * buttons[1].className = "paginate_disabled_previous";
+ * }
+ * else {
+ * buttons[0].className = "paginate_enabled_previous";
+ * buttons[1].className = "paginate_enabled_previous";
+ * }
+ *
+ * if ( oSettings.fnDisplayEnd() == oSettings.fnRecordsDisplay() ) {
+ * buttons[2].className = "paginate_disabled_next";
+ * buttons[3].className = "paginate_disabled_next";
+ * }
+ * else {
+ * buttons[2].className = "paginate_enabled_next";
+ * buttons[3].className = "paginate_enabled_next";
+ * }
+ * }
+ * }
+ * };
+ */
+ "oPagination": {},
+
+
+ /**
+ * Sorting plug-in methods - Sorting in DataTables is based on the detected type of the
+ * data column (you can add your own type detection functions, or override automatic
+ * detection using sType). With this specific type given to the column, DataTables will
+ * apply the required sort from the functions in the object. Each sort type must provide
+ * two mandatory methods, one each for ascending and descending sorting, and can optionally
+ * provide a pre-formatting method that will help speed up sorting by allowing DataTables
+ * to pre-format the sort data only once (rather than every time the actual sort functions
+ * are run). The two sorting functions are typical Javascript sort methods:
+ * <ul>
+ * <li>
+ * Function input parameters:
+ * <ul>
+ * <li>{*} Data to compare to the second parameter</li>
+ * <li>{*} Data to compare to the first parameter</li>
+ * </ul>
+ * </li>
+ * <li>
+ * Function return:
+ * <ul>
+ * <li>{int} Sorting match: <0 if first parameter should be sorted lower than
+ * the second parameter, ===0 if the two parameters are equal and >0 if
+ * the first parameter should be sorted height than the second parameter.</li>
+ * </ul>
+ * </il>
+ * </ul>
+ * @type object
+ * @default {}
+ *
+ * @example
+ * // Case-sensitive string sorting, with no pre-formatting method
+ * $.extend( $.fn.dataTableExt.oSort, {
+ * "string-case-asc": function(x,y) {
+ * return ((x < y) ? -1 : ((x > y) ? 1 : 0));
+ * },
+ * "string-case-desc": function(x,y) {
+ * return ((x < y) ? 1 : ((x > y) ? -1 : 0));
+ * }
+ * } );
+ *
+ * @example
+ * // Case-insensitive string sorting, with pre-formatting
+ * $.extend( $.fn.dataTableExt.oSort, {
+ * "string-pre": function(x) {
+ * return x.toLowerCase();
+ * },
+ * "string-asc": function(x,y) {
+ * return ((x < y) ? -1 : ((x > y) ? 1 : 0));
+ * },
+ * "string-desc": function(x,y) {
+ * return ((x < y) ? 1 : ((x > y) ? -1 : 0));
+ * }
+ * } );
+ */
+ "oSort": {},
+
+
+ /**
+ * Version string for plug-ins to check compatibility. Allowed format is
+ * a.b.c.d.e where: a:int, b:int, c:int, d:string(dev|beta), e:int. d and
+ * e are optional
+ * @type string
+ * @default Version number
+ */
+ "sVersion": DataTable.version,
+
+
+ /**
+ * How should DataTables report an error. Can take the value 'alert' or 'throw'
+ * @type string
+ * @default alert
+ */
+ "sErrMode": "alert",
+
+
+ /**
+ * Store information for DataTables to access globally about other instances
+ * @namespace
+ * @private
+ */
+ "_oExternConfig": {
+ /* int:iNextUnique - next unique number for an instance */
+ "iNextUnique": 0
+ }
+ };
+
+
+
+
+ /**
+ * Template object for the way in which DataTables holds information about
+ * search information for the global filter and individual column filters.
+ * @namespace
+ */
+ DataTable.models.oSearch = {
+ /**
+ * Flag to indicate if the filtering should be case insensitive or not
+ * @type boolean
+ * @default true
+ */
+ "bCaseInsensitive": true,
+
+ /**
+ * Applied search term
+ * @type string
+ * @default <i>Empty string</i>
+ */
+ "sSearch": "",
+
+ /**
+ * Flag to indicate if the search term should be interpreted as a
+ * regular expression (true) or not (false) and therefore and special
+ * regex characters escaped.
+ * @type boolean
+ * @default false
+ */
+ "bRegex": false,
+
+ /**
+ * Flag to indicate if DataTables is to use its smart filtering or not.
+ * @type boolean
+ * @default true
+ */
+ "bSmart": true
+ };
+
+
+
+
+ /**
+ * Template object for the way in which DataTables holds information about
+ * each individual row. This is the object format used for the settings
+ * aoData array.
+ * @namespace
+ */
+ DataTable.models.oRow = {
+ /**
+ * TR element for the row
+ * @type node
+ * @default null
+ */
+ "nTr": null,
+
+ /**
+ * Data object from the original data source for the row. This is either
+ * an array if using the traditional form of DataTables, or an object if
+ * using mData options. The exact type will depend on the passed in
+ * data from the data source, or will be an array if using DOM a data
+ * source.
+ * @type array|object
+ * @default []
+ */
+ "_aData": [],
+
+ /**
+ * Sorting data cache - this array is ostensibly the same length as the
+ * number of columns (although each index is generated only as it is
+ * needed), and holds the data that is used for sorting each column in the
+ * row. We do this cache generation at the start of the sort in order that
+ * the formatting of the sort data need be done only once for each cell
+ * per sort. This array should not be read from or written to by anything
+ * other than the master sorting methods.
+ * @type array
+ * @default []
+ * @private
+ */
+ "_aSortData": [],
+
+ /**
+ * Array of TD elements that are cached for hidden rows, so they can be
+ * reinserted into the table if a column is made visible again (or to act
+ * as a store if a column is made hidden). Only hidden columns have a
+ * reference in the array. For non-hidden columns the value is either
+ * undefined or null.
+ * @type array nodes
+ * @default []
+ * @private
+ */
+ "_anHidden": [],
+
+ /**
+ * Cache of the class name that DataTables has applied to the row, so we
+ * can quickly look at this variable rather than needing to do a DOM check
+ * on className for the nTr property.
+ * @type string
+ * @default <i>Empty string</i>
+ * @private
+ */
+ "_sRowStripe": ""
+ };
+
+
+
+ /**
+ * Template object for the column information object in DataTables. This object
+ * is held in the settings aoColumns array and contains all the information that
+ * DataTables needs about each individual column.
+ *
+ * Note that this object is related to {@link DataTable.defaults.columns}
+ * but this one is the internal data store for DataTables's cache of columns.
+ * It should NOT be manipulated outside of DataTables. Any configuration should
+ * be done through the initialisation options.
+ * @namespace
+ */
+ DataTable.models.oColumn = {
+ /**
+ * A list of the columns that sorting should occur on when this column
+ * is sorted. That this property is an array allows multi-column sorting
+ * to be defined for a column (for example first name / last name columns
+ * would benefit from this). The values are integers pointing to the
+ * columns to be sorted on (typically it will be a single integer pointing
+ * at itself, but that doesn't need to be the case).
+ * @type array
+ */
+ "aDataSort": null,
+
+ /**
+ * Define the sorting directions that are applied to the column, in sequence
+ * as the column is repeatedly sorted upon - i.e. the first value is used
+ * as the sorting direction when the column if first sorted (clicked on).
+ * Sort it again (click again) and it will move on to the next index.
+ * Repeat until loop.
+ * @type array
+ */
+ "asSorting": null,
+
+ /**
+ * Flag to indicate if the column is searchable, and thus should be included
+ * in the filtering or not.
+ * @type boolean
+ */
+ "bSearchable": null,
+
+ /**
+ * Flag to indicate if the column is sortable or not.
+ * @type boolean
+ */
+ "bSortable": null,
+
+ /**
+ * <code>Deprecated</code> When using fnRender, you have two options for what
+ * to do with the data, and this property serves as the switch. Firstly, you
+ * can have the sorting and filtering use the rendered value (true - default),
+ * or you can have the sorting and filtering us the original value (false).
+ *
+ * Please note that this option has now been deprecated and will be removed
+ * in the next version of DataTables. Please use mRender / mData rather than
+ * fnRender.
+ * @type boolean
+ * @deprecated
+ */
+ "bUseRendered": null,
+
+ /**
+ * Flag to indicate if the column is currently visible in the table or not
+ * @type boolean
+ */
+ "bVisible": null,
+
+ /**
+ * Flag to indicate to the type detection method if the automatic type
+ * detection should be used, or if a column type (sType) has been specified
+ * @type boolean
+ * @default true
+ * @private
+ */
+ "_bAutoType": true,
+
+ /**
+ * Developer definable function that is called whenever a cell is created (Ajax source,
+ * etc) or processed for input (DOM source). This can be used as a compliment to mRender
+ * allowing you to modify the DOM element (add background colour for example) when the
+ * element is available.
+ * @type function
+ * @param {element} nTd The TD node that has been created
+ * @param {*} sData The Data for the cell
+ * @param {array|object} oData The data for the whole row
+ * @param {int} iRow The row index for the aoData data store
+ * @default null
+ */
+ "fnCreatedCell": null,
+
+ /**
+ * Function to get data from a cell in a column. You should <b>never</b>
+ * access data directly through _aData internally in DataTables - always use
+ * the method attached to this property. It allows mData to function as
+ * required. This function is automatically assigned by the column
+ * initialisation method
+ * @type function
+ * @param {array|object} oData The data array/object for the array
+ * (i.e. aoData[]._aData)
+ * @param {string} sSpecific The specific data type you want to get -
+ * 'display', 'type' 'filter' 'sort'
+ * @returns {*} The data for the cell from the given row's data
+ * @default null
+ */
+ "fnGetData": null,
+
+ /**
+ * <code>Deprecated</code> Custom display function that will be called for the
+ * display of each cell in this column.
+ *
+ * Please note that this option has now been deprecated and will be removed
+ * in the next version of DataTables. Please use mRender / mData rather than
+ * fnRender.
+ * @type function
+ * @param {object} o Object with the following parameters:
+ * @param {int} o.iDataRow The row in aoData
+ * @param {int} o.iDataColumn The column in question
+ * @param {array} o.aData The data for the row in question
+ * @param {object} o.oSettings The settings object for this DataTables instance
+ * @returns {string} The string you which to use in the display
+ * @default null
+ * @deprecated
+ */
+ "fnRender": null,
+
+ /**
+ * Function to set data for a cell in the column. You should <b>never</b>
+ * set the data directly to _aData internally in DataTables - always use
+ * this method. It allows mData to function as required. This function
+ * is automatically assigned by the column initialisation method
+ * @type function
+ * @param {array|object} oData The data array/object for the array
+ * (i.e. aoData[]._aData)
+ * @param {*} sValue Value to set
+ * @default null
+ */
+ "fnSetData": null,
+
+ /**
+ * Property to read the value for the cells in the column from the data
+ * source array / object. If null, then the default content is used, if a
+ * function is given then the return from the function is used.
+ * @type function|int|string|null
+ * @default null
+ */
+ "mData": null,
+
+ /**
+ * Partner property to mData which is used (only when defined) to get
+ * the data - i.e. it is basically the same as mData, but without the
+ * 'set' option, and also the data fed to it is the result from mData.
+ * This is the rendering method to match the data method of mData.
+ * @type function|int|string|null
+ * @default null
+ */
+ "mRender": null,
+
+ /**
+ * Unique header TH/TD element for this column - this is what the sorting
+ * listener is attached to (if sorting is enabled.)
+ * @type node
+ * @default null
+ */
+ "nTh": null,
+
+ /**
+ * Unique footer TH/TD element for this column (if there is one). Not used
+ * in DataTables as such, but can be used for plug-ins to reference the
+ * footer for each column.
+ * @type node
+ * @default null
+ */
+ "nTf": null,
+
+ /**
+ * The class to apply to all TD elements in the table's TBODY for the column
+ * @type string
+ * @default null
+ */
+ "sClass": null,
+
+ /**
+ * When DataTables calculates the column widths to assign to each column,
+ * it finds the longest string in each column and then constructs a
+ * temporary table and reads the widths from that. The problem with this
+ * is that "mmm" is much wider then "iiii", but the latter is a longer
+ * string - thus the calculation can go wrong (doing it properly and putting
+ * it into an DOM object and measuring that is horribly(!) slow). Thus as
+ * a "work around" we provide this option. It will append its value to the
+ * text that is found to be the longest string for the column - i.e. padding.
+ * @type string
+ */
+ "sContentPadding": null,
+
+ /**
+ * Allows a default value to be given for a column's data, and will be used
+ * whenever a null data source is encountered (this can be because mData
+ * is set to null, or because the data source itself is null).
+ * @type string
+ * @default null
+ */
+ "sDefaultContent": null,
+
+ /**
+ * Name for the column, allowing reference to the column by name as well as
+ * by index (needs a lookup to work by name).
+ * @type string
+ */
+ "sName": null,
+
+ /**
+ * Custom sorting data type - defines which of the available plug-ins in
+ * afnSortData the custom sorting will use - if any is defined.
+ * @type string
+ * @default std
+ */
+ "sSortDataType": 'std',
+
+ /**
+ * Class to be applied to the header element when sorting on this column
+ * @type string
+ * @default null
+ */
+ "sSortingClass": null,
+
+ /**
+ * Class to be applied to the header element when sorting on this column -
+ * when jQuery UI theming is used.
+ * @type string
+ * @default null
+ */
+ "sSortingClassJUI": null,
+
+ /**
+ * Title of the column - what is seen in the TH element (nTh).
+ * @type string
+ */
+ "sTitle": null,
+
+ /**
+ * Column sorting and filtering type
+ * @type string
+ * @default null
+ */
+ "sType": null,
+
+ /**
+ * Width of the column
+ * @type string
+ * @default null
+ */
+ "sWidth": null,
+
+ /**
+ * Width of the column when it was first "encountered"
+ * @type string
+ * @default null
+ */
+ "sWidthOrig": null
+ };
+
+
+
+ /**
+ * Initialisation options that can be given to DataTables at initialisation
+ * time.
+ * @namespace
+ */
+ DataTable.defaults = {
+ /**
+ * An array of data to use for the table, passed in at initialisation which
+ * will be used in preference to any data which is already in the DOM. This is
+ * particularly useful for constructing tables purely in Javascript, for
+ * example with a custom Ajax call.
+ * @type array
+ * @default null
+ * @dtopt Option
+ *
+ * @example
+ * // Using a 2D array data source
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "aaData": [
+ * ['Trident', 'Internet Explorer 4.0', 'Win 95+', 4, 'X'],
+ * ['Trident', 'Internet Explorer 5.0', 'Win 95+', 5, 'C'],
+ * ],
+ * "aoColumns": [
+ * { "sTitle": "Engine" },
+ * { "sTitle": "Browser" },
+ * { "sTitle": "Platform" },
+ * { "sTitle": "Version" },
+ * { "sTitle": "Grade" }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using an array of objects as a data source (mData)
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "aaData": [
+ * {
+ * "engine": "Trident",
+ * "browser": "Internet Explorer 4.0",
+ * "platform": "Win 95+",
+ * "version": 4,
+ * "grade": "X"
+ * },
+ * {
+ * "engine": "Trident",
+ * "browser": "Internet Explorer 5.0",
+ * "platform": "Win 95+",
+ * "version": 5,
+ * "grade": "C"
+ * }
+ * ],
+ * "aoColumns": [
+ * { "sTitle": "Engine", "mData": "engine" },
+ * { "sTitle": "Browser", "mData": "browser" },
+ * { "sTitle": "Platform", "mData": "platform" },
+ * { "sTitle": "Version", "mData": "version" },
+ * { "sTitle": "Grade", "mData": "grade" }
+ * ]
+ * } );
+ * } );
+ */
+ "aaData": null,
+
+
+ /**
+ * If sorting is enabled, then DataTables will perform a first pass sort on
+ * initialisation. You can define which column(s) the sort is performed upon,
+ * and the sorting direction, with this variable. The aaSorting array should
+ * contain an array for each column to be sorted initially containing the
+ * column's index and a direction string ('asc' or 'desc').
+ * @type array
+ * @default [[0,'asc']]
+ * @dtopt Option
+ *
+ * @example
+ * // Sort by 3rd column first, and then 4th column
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aaSorting": [[2,'asc'], [3,'desc']]
+ * } );
+ * } );
+ *
+ * // No initial sorting
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aaSorting": []
+ * } );
+ * } );
+ */
+ "aaSorting": [[0,'asc']],
+
+
+ /**
+ * This parameter is basically identical to the aaSorting parameter, but
+ * cannot be overridden by user interaction with the table. What this means
+ * is that you could have a column (visible or hidden) which the sorting will
+ * always be forced on first - any sorting after that (from the user) will
+ * then be performed as required. This can be useful for grouping rows
+ * together.
+ * @type array
+ * @default null
+ * @dtopt Option
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aaSortingFixed": [[0,'asc']]
+ * } );
+ * } )
+ */
+ "aaSortingFixed": null,
+
+
+ /**
+ * This parameter allows you to readily specify the entries in the length drop
+ * down menu that DataTables shows when pagination is enabled. It can be
+ * either a 1D array of options which will be used for both the displayed
+ * option and the value, or a 2D array which will use the array in the first
+ * position as the value, and the array in the second position as the
+ * displayed options (useful for language strings such as 'All').
+ * @type array
+ * @default [ 10, 25, 50, 100 ]
+ * @dtopt Option
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
+ * } );
+ * } );
+ *
+ * @example
+ * // Setting the default display length as well as length menu
+ * // This is likely to be wanted if you remove the '10' option which
+ * // is the iDisplayLength default.
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "iDisplayLength": 25,
+ * "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]]
+ * } );
+ * } );
+ */
+ "aLengthMenu": [ 10, 25, 50, 100 ],
+
+
+ /**
+ * The aoColumns option in the initialisation parameter allows you to define
+ * details about the way individual columns behave. For a full list of
+ * column options that can be set, please see
+ * {@link DataTable.defaults.columns}. Note that if you use aoColumns to
+ * define your columns, you must have an entry in the array for every single
+ * column that you have in your table (these can be null if you don't which
+ * to specify any options).
+ * @member
+ */
+ "aoColumns": null,
+
+ /**
+ * Very similar to aoColumns, aoColumnDefs allows you to target a specific
+ * column, multiple columns, or all columns, using the aTargets property of
+ * each object in the array. This allows great flexibility when creating
+ * tables, as the aoColumnDefs arrays can be of any length, targeting the
+ * columns you specifically want. aoColumnDefs may use any of the column
+ * options available: {@link DataTable.defaults.columns}, but it _must_
+ * have aTargets defined in each object in the array. Values in the aTargets
+ * array may be:
+ * <ul>
+ * <li>a string - class name will be matched on the TH for the column</li>
+ * <li>0 or a positive integer - column index counting from the left</li>
+ * <li>a negative integer - column index counting from the right</li>
+ * <li>the string "_all" - all columns (i.e. assign a default)</li>
+ * </ul>
+ * @member
+ */
+ "aoColumnDefs": null,
+
+
+ /**
+ * Basically the same as oSearch, this parameter defines the individual column
+ * filtering state at initialisation time. The array must be of the same size
+ * as the number of columns, and each element be an object with the parameters
+ * "sSearch" and "bEscapeRegex" (the latter is optional). 'null' is also
+ * accepted and the default will be used.
+ * @type array
+ * @default []
+ * @dtopt Option
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoSearchCols": [
+ * null,
+ * { "sSearch": "My filter" },
+ * null,
+ * { "sSearch": "^[0-9]", "bEscapeRegex": false }
+ * ]
+ * } );
+ * } )
+ */
+ "aoSearchCols": [],
+
+
+ /**
+ * An array of CSS classes that should be applied to displayed rows. This
+ * array may be of any length, and DataTables will apply each class
+ * sequentially, looping when required.
+ * @type array
+ * @default null <i>Will take the values determined by the oClasses.sStripe*
+ * options</i>
+ * @dtopt Option
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "asStripeClasses": [ 'strip1', 'strip2', 'strip3' ]
+ * } );
+ * } )
+ */
+ "asStripeClasses": null,
+
+
+ /**
+ * Enable or disable automatic column width calculation. This can be disabled
+ * as an optimisation (it takes some time to calculate the widths) if the
+ * tables widths are passed in using aoColumns.
+ * @type boolean
+ * @default true
+ * @dtopt Features
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "bAutoWidth": false
+ * } );
+ * } );
+ */
+ "bAutoWidth": true,
+
+
+ /**
+ * Deferred rendering can provide DataTables with a huge speed boost when you
+ * are using an Ajax or JS data source for the table. This option, when set to
+ * true, will cause DataTables to defer the creation of the table elements for
+ * each row until they are needed for a draw - saving a significant amount of
+ * time.
+ * @type boolean
+ * @default false
+ * @dtopt Features
+ *
+ * @example
+ * $(document).ready( function() {
+ * var oTable = $('#example').dataTable( {
+ * "sAjaxSource": "sources/arrays.txt",
+ * "bDeferRender": true
+ * } );
+ * } );
+ */
+ "bDeferRender": false,
+
+
+ /**
+ * Replace a DataTable which matches the given selector and replace it with
+ * one which has the properties of the new initialisation object passed. If no
+ * table matches the selector, then the new DataTable will be constructed as
+ * per normal.
+ * @type boolean
+ * @default false
+ * @dtopt Options
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "sScrollY": "200px",
+ * "bPaginate": false
+ * } );
+ *
+ * // Some time later....
+ * $('#example').dataTable( {
+ * "bFilter": false,
+ * "bDestroy": true
+ * } );
+ * } );
+ */
+ "bDestroy": false,
+
+
+ /**
+ * Enable or disable filtering of data. Filtering in DataTables is "smart" in
+ * that it allows the end user to input multiple words (space separated) and
+ * will match a row containing those words, even if not in the order that was
+ * specified (this allow matching across multiple columns). Note that if you
+ * wish to use filtering in DataTables this must remain 'true' - to remove the
+ * default filtering input box and retain filtering abilities, please use
+ * {@link DataTable.defaults.sDom}.
+ * @type boolean
+ * @default true
+ * @dtopt Features
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "bFilter": false
+ * } );
+ * } );
+ */
+ "bFilter": true,
+
+
+ /**
+ * Enable or disable the table information display. This shows information
+ * about the data that is currently visible on the page, including information
+ * about filtered data if that action is being performed.
+ * @type boolean
+ * @default true
+ * @dtopt Features
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "bInfo": false
+ * } );
+ * } );
+ */
+ "bInfo": true,
+
+
+ /**
+ * Enable jQuery UI ThemeRoller support (required as ThemeRoller requires some
+ * slightly different and additional mark-up from what DataTables has
+ * traditionally used).
+ * @type boolean
+ * @default false
+ * @dtopt Features
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "bJQueryUI": true
+ * } );
+ * } );
+ */
+ "bJQueryUI": false,
+
+
+ /**
+ * Allows the end user to select the size of a formatted page from a select
+ * menu (sizes are 10, 25, 50 and 100). Requires pagination (bPaginate).
+ * @type boolean
+ * @default true
+ * @dtopt Features
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "bLengthChange": false
+ * } );
+ * } );
+ */
+ "bLengthChange": true,
+
+
+ /**
+ * Enable or disable pagination.
+ * @type boolean
+ * @default true
+ * @dtopt Features
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "bPaginate": false
+ * } );
+ * } );
+ */
+ "bPaginate": true,
+
+
+ /**
+ * Enable or disable the display of a 'processing' indicator when the table is
+ * being processed (e.g. a sort). This is particularly useful for tables with
+ * large amounts of data where it can take a noticeable amount of time to sort
+ * the entries.
+ * @type boolean
+ * @default false
+ * @dtopt Features
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "bProcessing": true
+ * } );
+ * } );
+ */
+ "bProcessing": false,
+
+
+ /**
+ * Retrieve the DataTables object for the given selector. Note that if the
+ * table has already been initialised, this parameter will cause DataTables
+ * to simply return the object that has already been set up - it will not take
+ * account of any changes you might have made to the initialisation object
+ * passed to DataTables (setting this parameter to true is an acknowledgement
+ * that you understand this). bDestroy can be used to reinitialise a table if
+ * you need.
+ * @type boolean
+ * @default false
+ * @dtopt Options
+ *
+ * @example
+ * $(document).ready( function() {
+ * initTable();
+ * tableActions();
+ * } );
+ *
+ * function initTable ()
+ * {
+ * return $('#example').dataTable( {
+ * "sScrollY": "200px",
+ * "bPaginate": false,
+ * "bRetrieve": true
+ * } );
+ * }
+ *
+ * function tableActions ()
+ * {
+ * var oTable = initTable();
+ * // perform API operations with oTable
+ * }
+ */
+ "bRetrieve": false,
+
+
+ /**
+ * Indicate if DataTables should be allowed to set the padding / margin
+ * etc for the scrolling header elements or not. Typically you will want
+ * this.
+ * @type boolean
+ * @default true
+ * @dtopt Options
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "bScrollAutoCss": false,
+ * "sScrollY": "200px"
+ * } );
+ * } );
+ */
+ "bScrollAutoCss": true,
+
+
+ /**
+ * When vertical (y) scrolling is enabled, DataTables will force the height of
+ * the table's viewport to the given height at all times (useful for layout).
+ * However, this can look odd when filtering data down to a small data set,
+ * and the footer is left "floating" further down. This parameter (when
+ * enabled) will cause DataTables to collapse the table's viewport down when
+ * the result set will fit within the given Y height.
+ * @type boolean
+ * @default false
+ * @dtopt Options
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "sScrollY": "200",
+ * "bScrollCollapse": true
+ * } );
+ * } );
+ */
+ "bScrollCollapse": false,
+
+
+ /**
+ * Enable infinite scrolling for DataTables (to be used in combination with
+ * sScrollY). Infinite scrolling means that DataTables will continually load
+ * data as a user scrolls through a table, which is very useful for large
+ * dataset. This cannot be used with pagination, which is automatically
+ * disabled. Note - the Scroller extra for DataTables is recommended in
+ * in preference to this option.
+ * @type boolean
+ * @default false
+ * @dtopt Features
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "bScrollInfinite": true,
+ * "bScrollCollapse": true,
+ * "sScrollY": "200px"
+ * } );
+ * } );
+ */
+ "bScrollInfinite": false,
+
+
+ /**
+ * Configure DataTables to use server-side processing. Note that the
+ * sAjaxSource parameter must also be given in order to give DataTables a
+ * source to obtain the required data for each draw.
+ * @type boolean
+ * @default false
+ * @dtopt Features
+ * @dtopt Server-side
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "bServerSide": true,
+ * "sAjaxSource": "xhr.php"
+ * } );
+ * } );
+ */
+ "bServerSide": false,
+
+
+ /**
+ * Enable or disable sorting of columns. Sorting of individual columns can be
+ * disabled by the "bSortable" option for each column.
+ * @type boolean
+ * @default true
+ * @dtopt Features
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "bSort": false
+ * } );
+ * } );
+ */
+ "bSort": true,
+
+
+ /**
+ * Allows control over whether DataTables should use the top (true) unique
+ * cell that is found for a single column, or the bottom (false - default).
+ * This is useful when using complex headers.
+ * @type boolean
+ * @default false
+ * @dtopt Options
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "bSortCellsTop": true
+ * } );
+ * } );
+ */
+ "bSortCellsTop": false,
+
+
+ /**
+ * Enable or disable the addition of the classes 'sorting_1', 'sorting_2' and
+ * 'sorting_3' to the columns which are currently being sorted on. This is
+ * presented as a feature switch as it can increase processing time (while
+ * classes are removed and added) so for large data sets you might want to
+ * turn this off.
+ * @type boolean
+ * @default true
+ * @dtopt Features
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "bSortClasses": false
+ * } );
+ * } );
+ */
+ "bSortClasses": true,
+
+
+ /**
+ * Enable or disable state saving. When enabled a cookie will be used to save
+ * table display information such as pagination information, display length,
+ * filtering and sorting. As such when the end user reloads the page the
+ * display display will match what thy had previously set up.
+ * @type boolean
+ * @default false
+ * @dtopt Features
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "bStateSave": true
+ * } );
+ * } );
+ */
+ "bStateSave": false,
+
+
+ /**
+ * Customise the cookie and / or the parameters being stored when using
+ * DataTables with state saving enabled. This function is called whenever
+ * the cookie is modified, and it expects a fully formed cookie string to be
+ * returned. Note that the data object passed in is a Javascript object which
+ * must be converted to a string (JSON.stringify for example).
+ * @type function
+ * @param {string} sName Name of the cookie defined by DataTables
+ * @param {object} oData Data to be stored in the cookie
+ * @param {string} sExpires Cookie expires string
+ * @param {string} sPath Path of the cookie to set
+ * @returns {string} Cookie formatted string (which should be encoded by
+ * using encodeURIComponent())
+ * @dtopt Callbacks
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "fnCookieCallback": function (sName, oData, sExpires, sPath) {
+ * // Customise oData or sName or whatever else here
+ * return sName + "="+JSON.stringify(oData)+"; expires=" + sExpires +"; path=" + sPath;
+ * }
+ * } );
+ * } );
+ */
+ "fnCookieCallback": null,
+
+
+ /**
+ * This function is called when a TR element is created (and all TD child
+ * elements have been inserted), or registered if using a DOM source, allowing
+ * manipulation of the TR element (adding classes etc).
+ * @type function
+ * @param {node} nRow "TR" element for the current row
+ * @param {array} aData Raw data array for this row
+ * @param {int} iDataIndex The index of this row in aoData
+ * @dtopt Callbacks
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "fnCreatedRow": function( nRow, aData, iDataIndex ) {
+ * // Bold the grade for all 'A' grade browsers
+ * if ( aData[4] == "A" )
+ * {
+ * $('td:eq(4)', nRow).html( '<b>A</b>' );
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "fnCreatedRow": null,
+
+
+ /**
+ * This function is called on every 'draw' event, and allows you to
+ * dynamically modify any aspect you want about the created DOM.
+ * @type function
+ * @param {object} oSettings DataTables settings object
+ * @dtopt Callbacks
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "fnDrawCallback": function( oSettings ) {
+ * alert( 'DataTables has redrawn the table' );
+ * }
+ * } );
+ * } );
+ */
+ "fnDrawCallback": null,
+
+
+ /**
+ * Identical to fnHeaderCallback() but for the table footer this function
+ * allows you to modify the table footer on every 'draw' even.
+ * @type function
+ * @param {node} nFoot "TR" element for the footer
+ * @param {array} aData Full table data (as derived from the original HTML)
+ * @param {int} iStart Index for the current display starting point in the
+ * display array
+ * @param {int} iEnd Index for the current display ending point in the
+ * display array
+ * @param {array int} aiDisplay Index array to translate the visual position
+ * to the full data array
+ * @dtopt Callbacks
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "fnFooterCallback": function( nFoot, aData, iStart, iEnd, aiDisplay ) {
+ * nFoot.getElementsByTagName('th')[0].innerHTML = "Starting index is "+iStart;
+ * }
+ * } );
+ * } )
+ */
+ "fnFooterCallback": null,
+
+
+ /**
+ * When rendering large numbers in the information element for the table
+ * (i.e. "Showing 1 to 10 of 57 entries") DataTables will render large numbers
+ * to have a comma separator for the 'thousands' units (e.g. 1 million is
+ * rendered as "1,000,000") to help readability for the end user. This
+ * function will override the default method DataTables uses.
+ * @type function
+ * @member
+ * @param {int} iIn number to be formatted
+ * @returns {string} formatted string for DataTables to show the number
+ * @dtopt Callbacks
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "fnFormatNumber": function ( iIn ) {
+ * if ( iIn &lt; 1000 ) {
+ * return iIn;
+ * } else {
+ * var
+ * s=(iIn+""),
+ * a=s.split(""), out="",
+ * iLen=s.length;
+ *
+ * for ( var i=0 ; i&lt;iLen ; i++ ) {
+ * if ( i%3 === 0 &amp;&amp; i !== 0 ) {
+ * out = "'"+out;
+ * }
+ * out = a[iLen-i-1]+out;
+ * }
+ * }
+ * return out;
+ * };
+ * } );
+ * } );
+ */
+ "fnFormatNumber": function ( iIn ) {
+ if ( iIn < 1000 )
+ {
+ // A small optimisation for what is likely to be the majority of use cases
+ return iIn;
+ }
+
+ var s=(iIn+""), a=s.split(""), out="", iLen=s.length;
+
+ for ( var i=0 ; i<iLen ; i++ )
+ {
+ if ( i%3 === 0 && i !== 0 )
+ {
+ out = this.oLanguage.sInfoThousands+out;
+ }
+ out = a[iLen-i-1]+out;
+ }
+ return out;
+ },
+
+
+ /**
+ * This function is called on every 'draw' event, and allows you to
+ * dynamically modify the header row. This can be used to calculate and
+ * display useful information about the table.
+ * @type function
+ * @param {node} nHead "TR" element for the header
+ * @param {array} aData Full table data (as derived from the original HTML)
+ * @param {int} iStart Index for the current display starting point in the
+ * display array
+ * @param {int} iEnd Index for the current display ending point in the
+ * display array
+ * @param {array int} aiDisplay Index array to translate the visual position
+ * to the full data array
+ * @dtopt Callbacks
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "fnHeaderCallback": function( nHead, aData, iStart, iEnd, aiDisplay ) {
+ * nHead.getElementsByTagName('th')[0].innerHTML = "Displaying "+(iEnd-iStart)+" records";
+ * }
+ * } );
+ * } )
+ */
+ "fnHeaderCallback": null,
+
+
+ /**
+ * The information element can be used to convey information about the current
+ * state of the table. Although the internationalisation options presented by
+ * DataTables are quite capable of dealing with most customisations, there may
+ * be times where you wish to customise the string further. This callback
+ * allows you to do exactly that.
+ * @type function
+ * @param {object} oSettings DataTables settings object
+ * @param {int} iStart Starting position in data for the draw
+ * @param {int} iEnd End position in data for the draw
+ * @param {int} iMax Total number of rows in the table (regardless of
+ * filtering)
+ * @param {int} iTotal Total number of rows in the data set, after filtering
+ * @param {string} sPre The string that DataTables has formatted using it's
+ * own rules
+ * @returns {string} The string to be displayed in the information element.
+ * @dtopt Callbacks
+ *
+ * @example
+ * $('#example').dataTable( {
+ * "fnInfoCallback": function( oSettings, iStart, iEnd, iMax, iTotal, sPre ) {
+ * return iStart +" to "+ iEnd;
+ * }
+ * } );
+ */
+ "fnInfoCallback": null,
+
+
+ /**
+ * Called when the table has been initialised. Normally DataTables will
+ * initialise sequentially and there will be no need for this function,
+ * however, this does not hold true when using external language information
+ * since that is obtained using an async XHR call.
+ * @type function
+ * @param {object} oSettings DataTables settings object
+ * @param {object} json The JSON object request from the server - only
+ * present if client-side Ajax sourced data is used
+ * @dtopt Callbacks
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "fnInitComplete": function(oSettings, json) {
+ * alert( 'DataTables has finished its initialisation.' );
+ * }
+ * } );
+ * } )
+ */
+ "fnInitComplete": null,
+
+
+ /**
+ * Called at the very start of each table draw and can be used to cancel the
+ * draw by returning false, any other return (including undefined) results in
+ * the full draw occurring).
+ * @type function
+ * @param {object} oSettings DataTables settings object
+ * @returns {boolean} False will cancel the draw, anything else (including no
+ * return) will allow it to complete.
+ * @dtopt Callbacks
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "fnPreDrawCallback": function( oSettings ) {
+ * if ( $('#test').val() == 1 ) {
+ * return false;
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "fnPreDrawCallback": null,
+
+
+ /**
+ * This function allows you to 'post process' each row after it have been
+ * generated for each table draw, but before it is rendered on screen. This
+ * function might be used for setting the row class name etc.
+ * @type function
+ * @param {node} nRow "TR" element for the current row
+ * @param {array} aData Raw data array for this row
+ * @param {int} iDisplayIndex The display index for the current table draw
+ * @param {int} iDisplayIndexFull The index of the data in the full list of
+ * rows (after filtering)
+ * @dtopt Callbacks
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
+ * // Bold the grade for all 'A' grade browsers
+ * if ( aData[4] == "A" )
+ * {
+ * $('td:eq(4)', nRow).html( '<b>A</b>' );
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "fnRowCallback": null,
+
+
+ /**
+ * This parameter allows you to override the default function which obtains
+ * the data from the server ($.getJSON) so something more suitable for your
+ * application. For example you could use POST data, or pull information from
+ * a Gears or AIR database.
+ * @type function
+ * @member
+ * @param {string} sSource HTTP source to obtain the data from (sAjaxSource)
+ * @param {array} aoData A key/value pair object containing the data to send
+ * to the server
+ * @param {function} fnCallback to be called on completion of the data get
+ * process that will draw the data on the page.
+ * @param {object} oSettings DataTables settings object
+ * @dtopt Callbacks
+ * @dtopt Server-side
+ *
+ * @example
+ * // POST data to server
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "bProcessing": true,
+ * "bServerSide": true,
+ * "sAjaxSource": "xhr.php",
+ * "fnServerData": function ( sSource, aoData, fnCallback, oSettings ) {
+ * oSettings.jqXHR = $.ajax( {
+ * "dataType": 'json',
+ * "type": "POST",
+ * "url": sSource,
+ * "data": aoData,
+ * "success": fnCallback
+ * } );
+ * }
+ * } );
+ * } );
+ */
+ "fnServerData": function ( sUrl, aoData, fnCallback, oSettings ) {
+ oSettings.jqXHR = $.ajax( {
+ "url": sUrl,
+ "data": aoData,
+ "success": function (json) {
+ if ( json.sError ) {
+ oSettings.oApi._fnLog( oSettings, 0, json.sError );
+ }
+
+ $(oSettings.oInstance).trigger('xhr', [oSettings, json]);
+ fnCallback( json );
+ },
+ "dataType": "json",
+ "cache": false,
+ "type": oSettings.sServerMethod,
+ "error": function (xhr, error, thrown) {
+ if ( error == "parsererror" ) {
+ oSettings.oApi._fnLog( oSettings, 0, "DataTables warning: JSON data from "+
+ "server could not be parsed. This is caused by a JSON formatting error." );
+ }
+ }
+ } );
+ },
+
+
+ /**
+ * It is often useful to send extra data to the server when making an Ajax
+ * request - for example custom filtering information, and this callback
+ * function makes it trivial to send extra information to the server. The
+ * passed in parameter is the data set that has been constructed by
+ * DataTables, and you can add to this or modify it as you require.
+ * @type function
+ * @param {array} aoData Data array (array of objects which are name/value
+ * pairs) that has been constructed by DataTables and will be sent to the
+ * server. In the case of Ajax sourced data with server-side processing
+ * this will be an empty array, for server-side processing there will be a
+ * significant number of parameters!
+ * @returns {undefined} Ensure that you modify the aoData array passed in,
+ * as this is passed by reference.
+ * @dtopt Callbacks
+ * @dtopt Server-side
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "bProcessing": true,
+ * "bServerSide": true,
+ * "sAjaxSource": "scripts/server_processing.php",
+ * "fnServerParams": function ( aoData ) {
+ * aoData.push( { "name": "more_data", "value": "my_value" } );
+ * }
+ * } );
+ * } );
+ */
+ "fnServerParams": null,
+
+
+ /**
+ * Load the table state. With this function you can define from where, and how, the
+ * state of a table is loaded. By default DataTables will load from its state saving
+ * cookie, but you might wish to use local storage (HTML5) or a server-side database.
+ * @type function
+ * @member
+ * @param {object} oSettings DataTables settings object
+ * @return {object} The DataTables state object to be loaded
+ * @dtopt Callbacks
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "bStateSave": true,
+ * "fnStateLoad": function (oSettings) {
+ * var o;
+ *
+ * // Send an Ajax request to the server to get the data. Note that
+ * // this is a synchronous request.
+ * $.ajax( {
+ * "url": "/state_load",
+ * "async": false,
+ * "dataType": "json",
+ * "success": function (json) {
+ * o = json;
+ * }
+ * } );
+ *
+ * return o;
+ * }
+ * } );
+ * } );
+ */
+ "fnStateLoad": function ( oSettings ) {
+ var sData = this.oApi._fnReadCookie( oSettings.sCookiePrefix+oSettings.sInstance );
+ var oData;
+
+ try {
+ oData = (typeof $.parseJSON === 'function') ?
+ $.parseJSON(sData) : eval( '('+sData+')' );
+ } catch (e) {
+ oData = null;
+ }
+
+ return oData;
+ },
+
+
+ /**
+ * Callback which allows modification of the saved state prior to loading that state.
+ * This callback is called when the table is loading state from the stored data, but
+ * prior to the settings object being modified by the saved state. Note that for
+ * plug-in authors, you should use the 'stateLoadParams' event to load parameters for
+ * a plug-in.
+ * @type function
+ * @param {object} oSettings DataTables settings object
+ * @param {object} oData The state object that is to be loaded
+ * @dtopt Callbacks
+ *
+ * @example
+ * // Remove a saved filter, so filtering is never loaded
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "bStateSave": true,
+ * "fnStateLoadParams": function (oSettings, oData) {
+ * oData.oSearch.sSearch = "";
+ * }
+ * } );
+ * } );
+ *
+ * @example
+ * // Disallow state loading by returning false
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "bStateSave": true,
+ * "fnStateLoadParams": function (oSettings, oData) {
+ * return false;
+ * }
+ * } );
+ * } );
+ */
+ "fnStateLoadParams": null,
+
+
+ /**
+ * Callback that is called when the state has been loaded from the state saving method
+ * and the DataTables settings object has been modified as a result of the loaded state.
+ * @type function
+ * @param {object} oSettings DataTables settings object
+ * @param {object} oData The state object that was loaded
+ * @dtopt Callbacks
+ *
+ * @example
+ * // Show an alert with the filtering value that was saved
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "bStateSave": true,
+ * "fnStateLoaded": function (oSettings, oData) {
+ * alert( 'Saved filter was: '+oData.oSearch.sSearch );
+ * }
+ * } );
+ * } );
+ */
+ "fnStateLoaded": null,
+
+
+ /**
+ * Save the table state. This function allows you to define where and how the state
+ * information for the table is stored - by default it will use a cookie, but you
+ * might want to use local storage (HTML5) or a server-side database.
+ * @type function
+ * @member
+ * @param {object} oSettings DataTables settings object
+ * @param {object} oData The state object to be saved
+ * @dtopt Callbacks
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "bStateSave": true,
+ * "fnStateSave": function (oSettings, oData) {
+ * // Send an Ajax request to the server with the state object
+ * $.ajax( {
+ * "url": "/state_save",
+ * "data": oData,
+ * "dataType": "json",
+ * "method": "POST"
+ * "success": function () {}
+ * } );
+ * }
+ * } );
+ * } );
+ */
+ "fnStateSave": function ( oSettings, oData ) {
+ this.oApi._fnCreateCookie(
+ oSettings.sCookiePrefix+oSettings.sInstance,
+ this.oApi._fnJsonString(oData),
+ oSettings.iCookieDuration,
+ oSettings.sCookiePrefix,
+ oSettings.fnCookieCallback
+ );
+ },
+
+
+ /**
+ * Callback which allows modification of the state to be saved. Called when the table
+ * has changed state a new state save is required. This method allows modification of
+ * the state saving object prior to actually doing the save, including addition or
+ * other state properties or modification. Note that for plug-in authors, you should
+ * use the 'stateSaveParams' event to save parameters for a plug-in.
+ * @type function
+ * @param {object} oSettings DataTables settings object
+ * @param {object} oData The state object to be saved
+ * @dtopt Callbacks
+ *
+ * @example
+ * // Remove a saved filter, so filtering is never saved
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "bStateSave": true,
+ * "fnStateSaveParams": function (oSettings, oData) {
+ * oData.oSearch.sSearch = "";
+ * }
+ * } );
+ * } );
+ */
+ "fnStateSaveParams": null,
+
+
+ /**
+ * Duration of the cookie which is used for storing session information. This
+ * value is given in seconds.
+ * @type int
+ * @default 7200 <i>(2 hours)</i>
+ * @dtopt Options
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "iCookieDuration": 60*60*24; // 1 day
+ * } );
+ * } )
+ */
+ "iCookieDuration": 7200,
+
+
+ /**
+ * When enabled DataTables will not make a request to the server for the first
+ * page draw - rather it will use the data already on the page (no sorting etc
+ * will be applied to it), thus saving on an XHR at load time. iDeferLoading
+ * is used to indicate that deferred loading is required, but it is also used
+ * to tell DataTables how many records there are in the full table (allowing
+ * the information element and pagination to be displayed correctly). In the case
+ * where a filtering is applied to the table on initial load, this can be
+ * indicated by giving the parameter as an array, where the first element is
+ * the number of records available after filtering and the second element is the
+ * number of records without filtering (allowing the table information element
+ * to be shown correctly).
+ * @type int | array
+ * @default null
+ * @dtopt Options
+ *
+ * @example
+ * // 57 records available in the table, no filtering applied
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "bServerSide": true,
+ * "sAjaxSource": "scripts/server_processing.php",
+ * "iDeferLoading": 57
+ * } );
+ * } );
+ *
+ * @example
+ * // 57 records after filtering, 100 without filtering (an initial filter applied)
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "bServerSide": true,
+ * "sAjaxSource": "scripts/server_processing.php",
+ * "iDeferLoading": [ 57, 100 ],
+ * "oSearch": {
+ * "sSearch": "my_filter"
+ * }
+ * } );
+ * } );
+ */
+ "iDeferLoading": null,
+
+
+ /**
+ * Number of rows to display on a single page when using pagination. If
+ * feature enabled (bLengthChange) then the end user will be able to override
+ * this to a custom setting using a pop-up menu.
+ * @type int
+ * @default 10
+ * @dtopt Options
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "iDisplayLength": 50
+ * } );
+ * } )
+ */
+ "iDisplayLength": 10,
+
+
+ /**
+ * Define the starting point for data display when using DataTables with
+ * pagination. Note that this parameter is the number of records, rather than
+ * the page number, so if you have 10 records per page and want to start on
+ * the third page, it should be "20".
+ * @type int
+ * @default 0
+ * @dtopt Options
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "iDisplayStart": 20
+ * } );
+ * } )
+ */
+ "iDisplayStart": 0,
+
+
+ /**
+ * The scroll gap is the amount of scrolling that is left to go before
+ * DataTables will load the next 'page' of data automatically. You typically
+ * want a gap which is big enough that the scrolling will be smooth for the
+ * user, while not so large that it will load more data than need.
+ * @type int
+ * @default 100
+ * @dtopt Options
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "bScrollInfinite": true,
+ * "bScrollCollapse": true,
+ * "sScrollY": "200px",
+ * "iScrollLoadGap": 50
+ * } );
+ * } );
+ */
+ "iScrollLoadGap": 100,
+
+
+ /**
+ * By default DataTables allows keyboard navigation of the table (sorting, paging,
+ * and filtering) by adding a tabindex attribute to the required elements. This
+ * allows you to tab through the controls and press the enter key to activate them.
+ * The tabindex is default 0, meaning that the tab follows the flow of the document.
+ * You can overrule this using this parameter if you wish. Use a value of -1 to
+ * disable built-in keyboard navigation.
+ * @type int
+ * @default 0
+ * @dtopt Options
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "iTabIndex": 1
+ * } );
+ * } );
+ */
+ "iTabIndex": 0,
+
+
+ /**
+ * All strings that DataTables uses in the user interface that it creates
+ * are defined in this object, allowing you to modified them individually or
+ * completely replace them all as required.
+ * @namespace
+ */
+ "oLanguage": {
+ /**
+ * Strings that are used for WAI-ARIA labels and controls only (these are not
+ * actually visible on the page, but will be read by screenreaders, and thus
+ * must be internationalised as well).
+ * @namespace
+ */
+ "oAria": {
+ /**
+ * ARIA label that is added to the table headers when the column may be
+ * sorted ascending by activing the column (click or return when focused).
+ * Note that the column header is prefixed to this string.
+ * @type string
+ * @default : activate to sort column ascending
+ * @dtopt Language
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "oLanguage": {
+ * "oAria": {
+ * "sSortAscending": " - click/return to sort ascending"
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "sSortAscending": ": activate to sort column ascending",
+
+ /**
+ * ARIA label that is added to the table headers when the column may be
+ * sorted descending by activing the column (click or return when focused).
+ * Note that the column header is prefixed to this string.
+ * @type string
+ * @default : activate to sort column ascending
+ * @dtopt Language
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "oLanguage": {
+ * "oAria": {
+ * "sSortDescending": " - click/return to sort descending"
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "sSortDescending": ": activate to sort column descending"
+ },
+
+ /**
+ * Pagination string used by DataTables for the two built-in pagination
+ * control types ("two_button" and "full_numbers")
+ * @namespace
+ */
+ "oPaginate": {
+ /**
+ * Text to use when using the 'full_numbers' type of pagination for the
+ * button to take the user to the first page.
+ * @type string
+ * @default First
+ * @dtopt Language
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "oLanguage": {
+ * "oPaginate": {
+ * "sFirst": "First page"
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "sFirst": "First",
+
+
+ /**
+ * Text to use when using the 'full_numbers' type of pagination for the
+ * button to take the user to the last page.
+ * @type string
+ * @default Last
+ * @dtopt Language
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "oLanguage": {
+ * "oPaginate": {
+ * "sLast": "Last page"
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "sLast": "Last",
+
+
+ /**
+ * Text to use for the 'next' pagination button (to take the user to the
+ * next page).
+ * @type string
+ * @default Next
+ * @dtopt Language
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "oLanguage": {
+ * "oPaginate": {
+ * "sNext": "Next page"
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "sNext": "Next",
+
+
+ /**
+ * Text to use for the 'previous' pagination button (to take the user to
+ * the previous page).
+ * @type string
+ * @default Previous
+ * @dtopt Language
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "oLanguage": {
+ * "oPaginate": {
+ * "sPrevious": "Previous page"
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "sPrevious": "Previous"
+ },
+
+ /**
+ * This string is shown in preference to sZeroRecords when the table is
+ * empty of data (regardless of filtering). Note that this is an optional
+ * parameter - if it is not given, the value of sZeroRecords will be used
+ * instead (either the default or given value).
+ * @type string
+ * @default No data available in table
+ * @dtopt Language
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "oLanguage": {
+ * "sEmptyTable": "No data available in table"
+ * }
+ * } );
+ * } );
+ */
+ "sEmptyTable": "No data available in table",
+
+
+ /**
+ * This string gives information to the end user about the information that
+ * is current on display on the page. The _START_, _END_ and _TOTAL_
+ * variables are all dynamically replaced as the table display updates, and
+ * can be freely moved or removed as the language requirements change.
+ * @type string
+ * @default Showing _START_ to _END_ of _TOTAL_ entries
+ * @dtopt Language
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "oLanguage": {
+ * "sInfo": "Got a total of _TOTAL_ entries to show (_START_ to _END_)"
+ * }
+ * } );
+ * } );
+ */
+ "sInfo": "Showing _START_ to _END_ of _TOTAL_ entries",
+
+
+ /**
+ * Display information string for when the table is empty. Typically the
+ * format of this string should match sInfo.
+ * @type string
+ * @default Showing 0 to 0 of 0 entries
+ * @dtopt Language
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "oLanguage": {
+ * "sInfoEmpty": "No entries to show"
+ * }
+ * } );
+ * } );
+ */
+ "sInfoEmpty": "Showing 0 to 0 of 0 entries",
+
+
+ /**
+ * When a user filters the information in a table, this string is appended
+ * to the information (sInfo) to give an idea of how strong the filtering
+ * is. The variable _MAX_ is dynamically updated.
+ * @type string
+ * @default (filtered from _MAX_ total entries)
+ * @dtopt Language
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "oLanguage": {
+ * "sInfoFiltered": " - filtering from _MAX_ records"
+ * }
+ * } );
+ * } );
+ */
+ "sInfoFiltered": "(filtered from _MAX_ total entries)",
+
+
+ /**
+ * If can be useful to append extra information to the info string at times,
+ * and this variable does exactly that. This information will be appended to
+ * the sInfo (sInfoEmpty and sInfoFiltered in whatever combination they are
+ * being used) at all times.
+ * @type string
+ * @default <i>Empty string</i>
+ * @dtopt Language
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "oLanguage": {
+ * "sInfoPostFix": "All records shown are derived from real information."
+ * }
+ * } );
+ * } );
+ */
+ "sInfoPostFix": "",
+
+
+ /**
+ * DataTables has a build in number formatter (fnFormatNumber) which is used
+ * to format large numbers that are used in the table information. By
+ * default a comma is used, but this can be trivially changed to any
+ * character you wish with this parameter.
+ * @type string
+ * @default ,
+ * @dtopt Language
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "oLanguage": {
+ * "sInfoThousands": "'"
+ * }
+ * } );
+ * } );
+ */
+ "sInfoThousands": ",",
+
+
+ /**
+ * Detail the action that will be taken when the drop down menu for the
+ * pagination length option is changed. The '_MENU_' variable is replaced
+ * with a default select list of 10, 25, 50 and 100, and can be replaced
+ * with a custom select box if required.
+ * @type string
+ * @default Show _MENU_ entries
+ * @dtopt Language
+ *
+ * @example
+ * // Language change only
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "oLanguage": {
+ * "sLengthMenu": "Display _MENU_ records"
+ * }
+ * } );
+ * } );
+ *
+ * @example
+ * // Language and options change
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "oLanguage": {
+ * "sLengthMenu": 'Display <select>'+
+ * '<option value="10">10</option>'+
+ * '<option value="20">20</option>'+
+ * '<option value="30">30</option>'+
+ * '<option value="40">40</option>'+
+ * '<option value="50">50</option>'+
+ * '<option value="-1">All</option>'+
+ * '</select> records'
+ * }
+ * } );
+ * } );
+ */
+ "sLengthMenu": "Show _MENU_ entries",
+
+
+ /**
+ * When using Ajax sourced data and during the first draw when DataTables is
+ * gathering the data, this message is shown in an empty row in the table to
+ * indicate to the end user the the data is being loaded. Note that this
+ * parameter is not used when loading data by server-side processing, just
+ * Ajax sourced data with client-side processing.
+ * @type string
+ * @default Loading...
+ * @dtopt Language
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "oLanguage": {
+ * "sLoadingRecords": "Please wait - loading..."
+ * }
+ * } );
+ * } );
+ */
+ "sLoadingRecords": "Loading...",
+
+
+ /**
+ * Text which is displayed when the table is processing a user action
+ * (usually a sort command or similar).
+ * @type string
+ * @default Processing...
+ * @dtopt Language
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "oLanguage": {
+ * "sProcessing": "DataTables is currently busy"
+ * }
+ * } );
+ * } );
+ */
+ "sProcessing": "Processing...",
+
+
+ /**
+ * Details the actions that will be taken when the user types into the
+ * filtering input text box. The variable "_INPUT_", if used in the string,
+ * is replaced with the HTML text box for the filtering input allowing
+ * control over where it appears in the string. If "_INPUT_" is not given
+ * then the input box is appended to the string automatically.
+ * @type string
+ * @default Search:
+ * @dtopt Language
+ *
+ * @example
+ * // Input text box will be appended at the end automatically
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "oLanguage": {
+ * "sSearch": "Filter records:"
+ * }
+ * } );
+ * } );
+ *
+ * @example
+ * // Specify where the filter should appear
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "oLanguage": {
+ * "sSearch": "Apply filter _INPUT_ to table"
+ * }
+ * } );
+ * } );
+ */
+ "sSearch": "Search:",
+
+
+ /**
+ * All of the language information can be stored in a file on the
+ * server-side, which DataTables will look up if this parameter is passed.
+ * It must store the URL of the language file, which is in a JSON format,
+ * and the object has the same properties as the oLanguage object in the
+ * initialiser object (i.e. the above parameters). Please refer to one of
+ * the example language files to see how this works in action.
+ * @type string
+ * @default <i>Empty string - i.e. disabled</i>
+ * @dtopt Language
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "oLanguage": {
+ * "sUrl": "http://www.sprymedia.co.uk/dataTables/lang.txt"
+ * }
+ * } );
+ * } );
+ */
+ "sUrl": "",
+
+
+ /**
+ * Text shown inside the table records when the is no information to be
+ * displayed after filtering. sEmptyTable is shown when there is simply no
+ * information in the table at all (regardless of filtering).
+ * @type string
+ * @default No matching records found
+ * @dtopt Language
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "oLanguage": {
+ * "sZeroRecords": "No records to display"
+ * }
+ * } );
+ * } );
+ */
+ "sZeroRecords": "No matching records found"
+ },
+
+
+ /**
+ * This parameter allows you to have define the global filtering state at
+ * initialisation time. As an object the "sSearch" parameter must be
+ * defined, but all other parameters are optional. When "bRegex" is true,
+ * the search string will be treated as a regular expression, when false
+ * (default) it will be treated as a straight string. When "bSmart"
+ * DataTables will use it's smart filtering methods (to word match at
+ * any point in the data), when false this will not be done.
+ * @namespace
+ * @extends DataTable.models.oSearch
+ * @dtopt Options
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "oSearch": {"sSearch": "Initial search"}
+ * } );
+ * } )
+ */
+ "oSearch": $.extend( {}, DataTable.models.oSearch ),
+
+
+ /**
+ * By default DataTables will look for the property 'aaData' when obtaining
+ * data from an Ajax source or for server-side processing - this parameter
+ * allows that property to be changed. You can use Javascript dotted object
+ * notation to get a data source for multiple levels of nesting.
+ * @type string
+ * @default aaData
+ * @dtopt Options
+ * @dtopt Server-side
+ *
+ * @example
+ * // Get data from { "data": [...] }
+ * $(document).ready( function() {
+ * var oTable = $('#example').dataTable( {
+ * "sAjaxSource": "sources/data.txt",
+ * "sAjaxDataProp": "data"
+ * } );
+ * } );
+ *
+ * @example
+ * // Get data from { "data": { "inner": [...] } }
+ * $(document).ready( function() {
+ * var oTable = $('#example').dataTable( {
+ * "sAjaxSource": "sources/data.txt",
+ * "sAjaxDataProp": "data.inner"
+ * } );
+ * } );
+ */
+ "sAjaxDataProp": "aaData",
+
+
+ /**
+ * You can instruct DataTables to load data from an external source using this
+ * parameter (use aData if you want to pass data in you already have). Simply
+ * provide a url a JSON object can be obtained from. This object must include
+ * the parameter 'aaData' which is the data source for the table.
+ * @type string
+ * @default null
+ * @dtopt Options
+ * @dtopt Server-side
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "sAjaxSource": "http://www.sprymedia.co.uk/dataTables/json.php"
+ * } );
+ * } )
+ */
+ "sAjaxSource": null,
+
+
+ /**
+ * This parameter can be used to override the default prefix that DataTables
+ * assigns to a cookie when state saving is enabled.
+ * @type string
+ * @default SpryMedia_DataTables_
+ * @dtopt Options
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "sCookiePrefix": "my_datatable_",
+ * } );
+ * } );
+ */
+ "sCookiePrefix": "SpryMedia_DataTables_",
+
+
+ /**
+ * This initialisation variable allows you to specify exactly where in the
+ * DOM you want DataTables to inject the various controls it adds to the page
+ * (for example you might want the pagination controls at the top of the
+ * table). DIV elements (with or without a custom class) can also be added to
+ * aid styling. The follow syntax is used:
+ * <ul>
+ * <li>The following options are allowed:
+ * <ul>
+ * <li>'l' - Length changing</li
+ * <li>'f' - Filtering input</li>
+ * <li>'t' - The table!</li>
+ * <li>'i' - Information</li>
+ * <li>'p' - Pagination</li>
+ * <li>'r' - pRocessing</li>
+ * </ul>
+ * </li>
+ * <li>The following constants are allowed:
+ * <ul>
+ * <li>'H' - jQueryUI theme "header" classes ('fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix')</li>
+ * <li>'F' - jQueryUI theme "footer" classes ('fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix')</li>
+ * </ul>
+ * </li>
+ * <li>The following syntax is expected:
+ * <ul>
+ * <li>'&lt;' and '&gt;' - div elements</li>
+ * <li>'&lt;"class" and '&gt;' - div with a class</li>
+ * <li>'&lt;"#id" and '&gt;' - div with an ID</li>
+ * </ul>
+ * </li>
+ * <li>Examples:
+ * <ul>
+ * <li>'&lt;"wrapper"flipt&gt;'</li>
+ * <li>'&lt;lf&lt;t&gt;ip&gt;'</li>
+ * </ul>
+ * </li>
+ * </ul>
+ * @type string
+ * @default lfrtip <i>(when bJQueryUI is false)</i> <b>or</b>
+ * <"H"lfr>t<"F"ip> <i>(when bJQueryUI is true)</i>
+ * @dtopt Options
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "sDom": '&lt;"top"i&gt;rt&lt;"bottom"flp&gt;&lt;"clear"&gt;'
+ * } );
+ * } );
+ */
+ "sDom": "lfrtip",
+
+
+ /**
+ * DataTables features two different built-in pagination interaction methods
+ * ('two_button' or 'full_numbers') which present different page controls to
+ * the end user. Further methods can be added using the API (see below).
+ * @type string
+ * @default two_button
+ * @dtopt Options
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "sPaginationType": "full_numbers"
+ * } );
+ * } )
+ */
+ "sPaginationType": "two_button",
+
+
+ /**
+ * Enable horizontal scrolling. When a table is too wide to fit into a certain
+ * layout, or you have a large number of columns in the table, you can enable
+ * x-scrolling to show the table in a viewport, which can be scrolled. This
+ * property can be any CSS unit, or a number (in which case it will be treated
+ * as a pixel measurement).
+ * @type string
+ * @default <i>blank string - i.e. disabled</i>
+ * @dtopt Features
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "sScrollX": "100%",
+ * "bScrollCollapse": true
+ * } );
+ * } );
+ */
+ "sScrollX": "",
+
+
+ /**
+ * This property can be used to force a DataTable to use more width than it
+ * might otherwise do when x-scrolling is enabled. For example if you have a
+ * table which requires to be well spaced, this parameter is useful for
+ * "over-sizing" the table, and thus forcing scrolling. This property can by
+ * any CSS unit, or a number (in which case it will be treated as a pixel
+ * measurement).
+ * @type string
+ * @default <i>blank string - i.e. disabled</i>
+ * @dtopt Options
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "sScrollX": "100%",
+ * "sScrollXInner": "110%"
+ * } );
+ * } );
+ */
+ "sScrollXInner": "",
+
+
+ /**
+ * Enable vertical scrolling. Vertical scrolling will constrain the DataTable
+ * to the given height, and enable scrolling for any data which overflows the
+ * current viewport. This can be used as an alternative to paging to display
+ * a lot of data in a small area (although paging and scrolling can both be
+ * enabled at the same time). This property can be any CSS unit, or a number
+ * (in which case it will be treated as a pixel measurement).
+ * @type string
+ * @default <i>blank string - i.e. disabled</i>
+ * @dtopt Features
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "sScrollY": "200px",
+ * "bPaginate": false
+ * } );
+ * } );
+ */
+ "sScrollY": "",
+
+
+ /**
+ * Set the HTTP method that is used to make the Ajax call for server-side
+ * processing or Ajax sourced data.
+ * @type string
+ * @default GET
+ * @dtopt Options
+ * @dtopt Server-side
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "bServerSide": true,
+ * "sAjaxSource": "scripts/post.php",
+ * "sServerMethod": "POST"
+ * } );
+ * } );
+ */
+ "sServerMethod": "GET"
+ };
+
+
+
+ /**
+ * Column options that can be given to DataTables at initialisation time.
+ * @namespace
+ */
+ DataTable.defaults.columns = {
+ /**
+ * Allows a column's sorting to take multiple columns into account when
+ * doing a sort. For example first name / last name columns make sense to
+ * do a multi-column sort over the two columns.
+ * @type array
+ * @default null <i>Takes the value of the column index automatically</i>
+ * @dtopt Columns
+ *
+ * @example
+ * // Using aoColumnDefs
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumnDefs": [
+ * { "aDataSort": [ 0, 1 ], "aTargets": [ 0 ] },
+ * { "aDataSort": [ 1, 0 ], "aTargets": [ 1 ] },
+ * { "aDataSort": [ 2, 3, 4 ], "aTargets": [ 2 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using aoColumns
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumns": [
+ * { "aDataSort": [ 0, 1 ] },
+ * { "aDataSort": [ 1, 0 ] },
+ * { "aDataSort": [ 2, 3, 4 ] },
+ * null,
+ * null
+ * ]
+ * } );
+ * } );
+ */
+ "aDataSort": null,
+
+
+ /**
+ * You can control the default sorting direction, and even alter the behaviour
+ * of the sort handler (i.e. only allow ascending sorting etc) using this
+ * parameter.
+ * @type array
+ * @default [ 'asc', 'desc' ]
+ * @dtopt Columns
+ *
+ * @example
+ * // Using aoColumnDefs
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumnDefs": [
+ * { "asSorting": [ "asc" ], "aTargets": [ 1 ] },
+ * { "asSorting": [ "desc", "asc", "asc" ], "aTargets": [ 2 ] },
+ * { "asSorting": [ "desc" ], "aTargets": [ 3 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using aoColumns
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumns": [
+ * null,
+ * { "asSorting": [ "asc" ] },
+ * { "asSorting": [ "desc", "asc", "asc" ] },
+ * { "asSorting": [ "desc" ] },
+ * null
+ * ]
+ * } );
+ * } );
+ */
+ "asSorting": [ 'asc', 'desc' ],
+
+
+ /**
+ * Enable or disable filtering on the data in this column.
+ * @type boolean
+ * @default true
+ * @dtopt Columns
+ *
+ * @example
+ * // Using aoColumnDefs
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumnDefs": [
+ * { "bSearchable": false, "aTargets": [ 0 ] }
+ * ] } );
+ * } );
+ *
+ * @example
+ * // Using aoColumns
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumns": [
+ * { "bSearchable": false },
+ * null,
+ * null,
+ * null,
+ * null
+ * ] } );
+ * } );
+ */
+ "bSearchable": true,
+
+
+ /**
+ * Enable or disable sorting on this column.
+ * @type boolean
+ * @default true
+ * @dtopt Columns
+ *
+ * @example
+ * // Using aoColumnDefs
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumnDefs": [
+ * { "bSortable": false, "aTargets": [ 0 ] }
+ * ] } );
+ * } );
+ *
+ * @example
+ * // Using aoColumns
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumns": [
+ * { "bSortable": false },
+ * null,
+ * null,
+ * null,
+ * null
+ * ] } );
+ * } );
+ */
+ "bSortable": true,
+
+
+ /**
+ * <code>Deprecated</code> When using fnRender() for a column, you may wish
+ * to use the original data (before rendering) for sorting and filtering
+ * (the default is to used the rendered data that the user can see). This
+ * may be useful for dates etc.
+ *
+ * Please note that this option has now been deprecated and will be removed
+ * in the next version of DataTables. Please use mRender / mData rather than
+ * fnRender.
+ * @type boolean
+ * @default true
+ * @dtopt Columns
+ * @deprecated
+ */
+ "bUseRendered": true,
+
+
+ /**
+ * Enable or disable the display of this column.
+ * @type boolean
+ * @default true
+ * @dtopt Columns
+ *
+ * @example
+ * // Using aoColumnDefs
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumnDefs": [
+ * { "bVisible": false, "aTargets": [ 0 ] }
+ * ] } );
+ * } );
+ *
+ * @example
+ * // Using aoColumns
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumns": [
+ * { "bVisible": false },
+ * null,
+ * null,
+ * null,
+ * null
+ * ] } );
+ * } );
+ */
+ "bVisible": true,
+
+
+ /**
+ * Developer definable function that is called whenever a cell is created (Ajax source,
+ * etc) or processed for input (DOM source). This can be used as a compliment to mRender
+ * allowing you to modify the DOM element (add background colour for example) when the
+ * element is available.
+ * @type function
+ * @param {element} nTd The TD node that has been created
+ * @param {*} sData The Data for the cell
+ * @param {array|object} oData The data for the whole row
+ * @param {int} iRow The row index for the aoData data store
+ * @param {int} iCol The column index for aoColumns
+ * @dtopt Columns
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumnDefs": [ {
+ * "aTargets": [3],
+ * "fnCreatedCell": function (nTd, sData, oData, iRow, iCol) {
+ * if ( sData == "1.7" ) {
+ * $(nTd).css('color', 'blue')
+ * }
+ * }
+ * } ]
+ * });
+ * } );
+ */
+ "fnCreatedCell": null,
+
+
+ /**
+ * <code>Deprecated</code> Custom display function that will be called for the
+ * display of each cell in this column.
+ *
+ * Please note that this option has now been deprecated and will be removed
+ * in the next version of DataTables. Please use mRender / mData rather than
+ * fnRender.
+ * @type function
+ * @param {object} o Object with the following parameters:
+ * @param {int} o.iDataRow The row in aoData
+ * @param {int} o.iDataColumn The column in question
+ * @param {array} o.aData The data for the row in question
+ * @param {object} o.oSettings The settings object for this DataTables instance
+ * @param {object} o.mDataProp The data property used for this column
+ * @param {*} val The current cell value
+ * @returns {string} The string you which to use in the display
+ * @dtopt Columns
+ * @deprecated
+ */
+ "fnRender": null,
+
+
+ /**
+ * The column index (starting from 0!) that you wish a sort to be performed
+ * upon when this column is selected for sorting. This can be used for sorting
+ * on hidden columns for example.
+ * @type int
+ * @default -1 <i>Use automatically calculated column index</i>
+ * @dtopt Columns
+ *
+ * @example
+ * // Using aoColumnDefs
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumnDefs": [
+ * { "iDataSort": 1, "aTargets": [ 0 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using aoColumns
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumns": [
+ * { "iDataSort": 1 },
+ * null,
+ * null,
+ * null,
+ * null
+ * ]
+ * } );
+ * } );
+ */
+ "iDataSort": -1,
+
+
+ /**
+ * This parameter has been replaced by mData in DataTables to ensure naming
+ * consistency. mDataProp can still be used, as there is backwards compatibility
+ * in DataTables for this option, but it is strongly recommended that you use
+ * mData in preference to mDataProp.
+ * @name DataTable.defaults.columns.mDataProp
+ */
+
+
+ /**
+ * This property can be used to read data from any JSON data source property,
+ * including deeply nested objects / properties. mData can be given in a
+ * number of different ways which effect its behaviour:
+ * <ul>
+ * <li>integer - treated as an array index for the data source. This is the
+ * default that DataTables uses (incrementally increased for each column).</li>
+ * <li>string - read an object property from the data source. Note that you can
+ * use Javascript dotted notation to read deep properties / arrays from the
+ * data source.</li>
+ * <li>null - the sDefaultContent option will be used for the cell (null
+ * by default, so you will need to specify the default content you want -
+ * typically an empty string). This can be useful on generated columns such
+ * as edit / delete action columns.</li>
+ * <li>function - the function given will be executed whenever DataTables
+ * needs to set or get the data for a cell in the column. The function
+ * takes three parameters:
+ * <ul>
+ * <li>{array|object} The data source for the row</li>
+ * <li>{string} The type call data requested - this will be 'set' when
+ * setting data or 'filter', 'display', 'type', 'sort' or undefined when
+ * gathering data. Note that when <i>undefined</i> is given for the type
+ * DataTables expects to get the raw data for the object back</li>
+ * <li>{*} Data to set when the second parameter is 'set'.</li>
+ * </ul>
+ * The return value from the function is not required when 'set' is the type
+ * of call, but otherwise the return is what will be used for the data
+ * requested.</li>
+ * </ul>
+ *
+ * Note that prior to DataTables 1.9.2 mData was called mDataProp. The name change
+ * reflects the flexibility of this property and is consistent with the naming of
+ * mRender. If 'mDataProp' is given, then it will still be used by DataTables, as
+ * it automatically maps the old name to the new if required.
+ * @type string|int|function|null
+ * @default null <i>Use automatically calculated column index</i>
+ * @dtopt Columns
+ *
+ * @example
+ * // Read table data from objects
+ * $(document).ready( function() {
+ * var oTable = $('#example').dataTable( {
+ * "sAjaxSource": "sources/deep.txt",
+ * "aoColumns": [
+ * { "mData": "engine" },
+ * { "mData": "browser" },
+ * { "mData": "platform.inner" },
+ * { "mData": "platform.details.0" },
+ * { "mData": "platform.details.1" }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using mData as a function to provide different information for
+ * // sorting, filtering and display. In this case, currency (price)
+ * $(document).ready( function() {
+ * var oTable = $('#example').dataTable( {
+ * "aoColumnDefs": [ {
+ * "aTargets": [ 0 ],
+ * "mData": function ( source, type, val ) {
+ * if (type === 'set') {
+ * source.price = val;
+ * // Store the computed dislay and filter values for efficiency
+ * source.price_display = val=="" ? "" : "$"+numberFormat(val);
+ * source.price_filter = val=="" ? "" : "$"+numberFormat(val)+" "+val;
+ * return;
+ * }
+ * else if (type === 'display') {
+ * return source.price_display;
+ * }
+ * else if (type === 'filter') {
+ * return source.price_filter;
+ * }
+ * // 'sort', 'type' and undefined all just use the integer
+ * return source.price;
+ * }
+ * } ]
+ * } );
+ * } );
+ */
+ "mData": null,
+
+
+ /**
+ * This property is the rendering partner to mData and it is suggested that
+ * when you want to manipulate data for display (including filtering, sorting etc)
+ * but not altering the underlying data for the table, use this property. mData
+ * can actually do everything this property can and more, but this parameter is
+ * easier to use since there is no 'set' option. Like mData is can be given
+ * in a number of different ways to effect its behaviour, with the addition of
+ * supporting array syntax for easy outputting of arrays (including arrays of
+ * objects):
+ * <ul>
+ * <li>integer - treated as an array index for the data source. This is the
+ * default that DataTables uses (incrementally increased for each column).</li>
+ * <li>string - read an object property from the data source. Note that you can
+ * use Javascript dotted notation to read deep properties / arrays from the
+ * data source and also array brackets to indicate that the data reader should
+ * loop over the data source array. When characters are given between the array
+ * brackets, these characters are used to join the data source array together.
+ * For example: "accounts[, ].name" would result in a comma separated list with
+ * the 'name' value from the 'accounts' array of objects.</li>
+ * <li>function - the function given will be executed whenever DataTables
+ * needs to set or get the data for a cell in the column. The function
+ * takes three parameters:
+ * <ul>
+ * <li>{array|object} The data source for the row (based on mData)</li>
+ * <li>{string} The type call data requested - this will be 'filter', 'display',
+ * 'type' or 'sort'.</li>
+ * <li>{array|object} The full data source for the row (not based on mData)</li>
+ * </ul>
+ * The return value from the function is what will be used for the data
+ * requested.</li>
+ * </ul>
+ * @type string|int|function|null
+ * @default null <i>Use mData</i>
+ * @dtopt Columns
+ *
+ * @example
+ * // Create a comma separated list from an array of objects
+ * $(document).ready( function() {
+ * var oTable = $('#example').dataTable( {
+ * "sAjaxSource": "sources/deep.txt",
+ * "aoColumns": [
+ * { "mData": "engine" },
+ * { "mData": "browser" },
+ * {
+ * "mData": "platform",
+ * "mRender": "[, ].name"
+ * }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Use as a function to create a link from the data source
+ * $(document).ready( function() {
+ * var oTable = $('#example').dataTable( {
+ * "aoColumnDefs": [
+ * {
+ * "aTargets": [ 0 ],
+ * "mData": "download_link",
+ * "mRender": function ( data, type, full ) {
+ * return '<a href="'+data+'">Download</a>';
+ * }
+ * ]
+ * } );
+ * } );
+ */
+ "mRender": null,
+
+
+ /**
+ * Change the cell type created for the column - either TD cells or TH cells. This
+ * can be useful as TH cells have semantic meaning in the table body, allowing them
+ * to act as a header for a row (you may wish to add scope='row' to the TH elements).
+ * @type string
+ * @default td
+ * @dtopt Columns
+ *
+ * @example
+ * // Make the first column use TH cells
+ * $(document).ready( function() {
+ * var oTable = $('#example').dataTable( {
+ * "aoColumnDefs": [ {
+ * "aTargets": [ 0 ],
+ * "sCellType": "th"
+ * } ]
+ * } );
+ * } );
+ */
+ "sCellType": "td",
+
+
+ /**
+ * Class to give to each cell in this column.
+ * @type string
+ * @default <i>Empty string</i>
+ * @dtopt Columns
+ *
+ * @example
+ * // Using aoColumnDefs
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumnDefs": [
+ * { "sClass": "my_class", "aTargets": [ 0 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using aoColumns
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumns": [
+ * { "sClass": "my_class" },
+ * null,
+ * null,
+ * null,
+ * null
+ * ]
+ * } );
+ * } );
+ */
+ "sClass": "",
+
+ /**
+ * When DataTables calculates the column widths to assign to each column,
+ * it finds the longest string in each column and then constructs a
+ * temporary table and reads the widths from that. The problem with this
+ * is that "mmm" is much wider then "iiii", but the latter is a longer
+ * string - thus the calculation can go wrong (doing it properly and putting
+ * it into an DOM object and measuring that is horribly(!) slow). Thus as
+ * a "work around" we provide this option. It will append its value to the
+ * text that is found to be the longest string for the column - i.e. padding.
+ * Generally you shouldn't need this, and it is not documented on the
+ * general DataTables.net documentation
+ * @type string
+ * @default <i>Empty string<i>
+ * @dtopt Columns
+ *
+ * @example
+ * // Using aoColumns
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumns": [
+ * null,
+ * null,
+ * null,
+ * {
+ * "sContentPadding": "mmm"
+ * }
+ * ]
+ * } );
+ * } );
+ */
+ "sContentPadding": "",
+
+
+ /**
+ * Allows a default value to be given for a column's data, and will be used
+ * whenever a null data source is encountered (this can be because mData
+ * is set to null, or because the data source itself is null).
+ * @type string
+ * @default null
+ * @dtopt Columns
+ *
+ * @example
+ * // Using aoColumnDefs
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumnDefs": [
+ * {
+ * "mData": null,
+ * "sDefaultContent": "Edit",
+ * "aTargets": [ -1 ]
+ * }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using aoColumns
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumns": [
+ * null,
+ * null,
+ * null,
+ * {
+ * "mData": null,
+ * "sDefaultContent": "Edit"
+ * }
+ * ]
+ * } );
+ * } );
+ */
+ "sDefaultContent": null,
+
+
+ /**
+ * This parameter is only used in DataTables' server-side processing. It can
+ * be exceptionally useful to know what columns are being displayed on the
+ * client side, and to map these to database fields. When defined, the names
+ * also allow DataTables to reorder information from the server if it comes
+ * back in an unexpected order (i.e. if you switch your columns around on the
+ * client-side, your server-side code does not also need updating).
+ * @type string
+ * @default <i>Empty string</i>
+ * @dtopt Columns
+ *
+ * @example
+ * // Using aoColumnDefs
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumnDefs": [
+ * { "sName": "engine", "aTargets": [ 0 ] },
+ * { "sName": "browser", "aTargets": [ 1 ] },
+ * { "sName": "platform", "aTargets": [ 2 ] },
+ * { "sName": "version", "aTargets": [ 3 ] },
+ * { "sName": "grade", "aTargets": [ 4 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using aoColumns
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumns": [
+ * { "sName": "engine" },
+ * { "sName": "browser" },
+ * { "sName": "platform" },
+ * { "sName": "version" },
+ * { "sName": "grade" }
+ * ]
+ * } );
+ * } );
+ */
+ "sName": "",
+
+
+ /**
+ * Defines a data source type for the sorting which can be used to read
+ * real-time information from the table (updating the internally cached
+ * version) prior to sorting. This allows sorting to occur on user editable
+ * elements such as form inputs.
+ * @type string
+ * @default std
+ * @dtopt Columns
+ *
+ * @example
+ * // Using aoColumnDefs
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumnDefs": [
+ * { "sSortDataType": "dom-text", "aTargets": [ 2, 3 ] },
+ * { "sType": "numeric", "aTargets": [ 3 ] },
+ * { "sSortDataType": "dom-select", "aTargets": [ 4 ] },
+ * { "sSortDataType": "dom-checkbox", "aTargets": [ 5 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using aoColumns
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumns": [
+ * null,
+ * null,
+ * { "sSortDataType": "dom-text" },
+ * { "sSortDataType": "dom-text", "sType": "numeric" },
+ * { "sSortDataType": "dom-select" },
+ * { "sSortDataType": "dom-checkbox" }
+ * ]
+ * } );
+ * } );
+ */
+ "sSortDataType": "std",
+
+
+ /**
+ * The title of this column.
+ * @type string
+ * @default null <i>Derived from the 'TH' value for this column in the
+ * original HTML table.</i>
+ * @dtopt Columns
+ *
+ * @example
+ * // Using aoColumnDefs
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumnDefs": [
+ * { "sTitle": "My column title", "aTargets": [ 0 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using aoColumns
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumns": [
+ * { "sTitle": "My column title" },
+ * null,
+ * null,
+ * null,
+ * null
+ * ]
+ * } );
+ * } );
+ */
+ "sTitle": null,
+
+
+ /**
+ * The type allows you to specify how the data for this column will be sorted.
+ * Four types (string, numeric, date and html (which will strip HTML tags
+ * before sorting)) are currently available. Note that only date formats
+ * understood by Javascript's Date() object will be accepted as type date. For
+ * example: "Mar 26, 2008 5:03 PM". May take the values: 'string', 'numeric',
+ * 'date' or 'html' (by default). Further types can be adding through
+ * plug-ins.
+ * @type string
+ * @default null <i>Auto-detected from raw data</i>
+ * @dtopt Columns
+ *
+ * @example
+ * // Using aoColumnDefs
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumnDefs": [
+ * { "sType": "html", "aTargets": [ 0 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using aoColumns
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumns": [
+ * { "sType": "html" },
+ * null,
+ * null,
+ * null,
+ * null
+ * ]
+ * } );
+ * } );
+ */
+ "sType": null,
+
+
+ /**
+ * Defining the width of the column, this parameter may take any CSS value
+ * (3em, 20px etc). DataTables apples 'smart' widths to columns which have not
+ * been given a specific width through this interface ensuring that the table
+ * remains readable.
+ * @type string
+ * @default null <i>Automatic</i>
+ * @dtopt Columns
+ *
+ * @example
+ * // Using aoColumnDefs
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumnDefs": [
+ * { "sWidth": "20%", "aTargets": [ 0 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using aoColumns
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "aoColumns": [
+ * { "sWidth": "20%" },
+ * null,
+ * null,
+ * null,
+ * null
+ * ]
+ * } );
+ * } );
+ */
+ "sWidth": null
+ };
+
+
+
+ /**
+ * DataTables settings object - this holds all the information needed for a
+ * given table, including configuration, data and current application of the
+ * table options. DataTables does not have a single instance for each DataTable
+ * with the settings attached to that instance, but rather instances of the
+ * DataTable "class" are created on-the-fly as needed (typically by a
+ * $().dataTable() call) and the settings object is then applied to that
+ * instance.
+ *
+ * Note that this object is related to {@link DataTable.defaults} but this
+ * one is the internal data store for DataTables's cache of columns. It should
+ * NOT be manipulated outside of DataTables. Any configuration should be done
+ * through the initialisation options.
+ * @namespace
+ * @todo Really should attach the settings object to individual instances so we
+ * don't need to create new instances on each $().dataTable() call (if the
+ * table already exists). It would also save passing oSettings around and
+ * into every single function. However, this is a very significant
+ * architecture change for DataTables and will almost certainly break
+ * backwards compatibility with older installations. This is something that
+ * will be done in 2.0.
+ */
+ DataTable.models.oSettings = {
+ /**
+ * Primary features of DataTables and their enablement state.
+ * @namespace
+ */
+ "oFeatures": {
+
+ /**
+ * Flag to say if DataTables should automatically try to calculate the
+ * optimum table and columns widths (true) or not (false).
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bAutoWidth": null,
+
+ /**
+ * Delay the creation of TR and TD elements until they are actually
+ * needed by a driven page draw. This can give a significant speed
+ * increase for Ajax source and Javascript source data, but makes no
+ * difference at all fro DOM and server-side processing tables.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bDeferRender": null,
+
+ /**
+ * Enable filtering on the table or not. Note that if this is disabled
+ * then there is no filtering at all on the table, including fnFilter.
+ * To just remove the filtering input use sDom and remove the 'f' option.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bFilter": null,
+
+ /**
+ * Table information element (the 'Showing x of y records' div) enable
+ * flag.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bInfo": null,
+
+ /**
+ * Present a user control allowing the end user to change the page size
+ * when pagination is enabled.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bLengthChange": null,
+
+ /**
+ * Pagination enabled or not. Note that if this is disabled then length
+ * changing must also be disabled.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bPaginate": null,
+
+ /**
+ * Processing indicator enable flag whenever DataTables is enacting a
+ * user request - typically an Ajax request for server-side processing.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bProcessing": null,
+
+ /**
+ * Server-side processing enabled flag - when enabled DataTables will
+ * get all data from the server for every draw - there is no filtering,
+ * sorting or paging done on the client-side.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bServerSide": null,
+
+ /**
+ * Sorting enablement flag.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bSort": null,
+
+ /**
+ * Apply a class to the columns which are being sorted to provide a
+ * visual highlight or not. This can slow things down when enabled since
+ * there is a lot of DOM interaction.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bSortClasses": null,
+
+ /**
+ * State saving enablement flag.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bStateSave": null
+ },
+
+
+ /**
+ * Scrolling settings for a table.
+ * @namespace
+ */
+ "oScroll": {
+ /**
+ * Indicate if DataTables should be allowed to set the padding / margin
+ * etc for the scrolling header elements or not. Typically you will want
+ * this.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bAutoCss": null,
+
+ /**
+ * When the table is shorter in height than sScrollY, collapse the
+ * table container down to the height of the table (when true).
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bCollapse": null,
+
+ /**
+ * Infinite scrolling enablement flag. Now deprecated in favour of
+ * using the Scroller plug-in.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bInfinite": null,
+
+ /**
+ * Width of the scrollbar for the web-browser's platform. Calculated
+ * during table initialisation.
+ * @type int
+ * @default 0
+ */
+ "iBarWidth": 0,
+
+ /**
+ * Space (in pixels) between the bottom of the scrolling container and
+ * the bottom of the scrolling viewport before the next page is loaded
+ * when using infinite scrolling.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type int
+ */
+ "iLoadGap": null,
+
+ /**
+ * Viewport width for horizontal scrolling. Horizontal scrolling is
+ * disabled if an empty string.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ */
+ "sX": null,
+
+ /**
+ * Width to expand the table to when using x-scrolling. Typically you
+ * should not need to use this.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ * @deprecated
+ */
+ "sXInner": null,
+
+ /**
+ * Viewport height for vertical scrolling. Vertical scrolling is disabled
+ * if an empty string.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ */
+ "sY": null
+ },
+
+ /**
+ * Language information for the table.
+ * @namespace
+ * @extends DataTable.defaults.oLanguage
+ */
+ "oLanguage": {
+ /**
+ * Information callback function. See
+ * {@link DataTable.defaults.fnInfoCallback}
+ * @type function
+ * @default null
+ */
+ "fnInfoCallback": null
+ },
+
+ /**
+ * Browser support parameters
+ * @namespace
+ */
+ "oBrowser": {
+ /**
+ * Indicate if the browser incorrectly calculates width:100% inside a
+ * scrolling element (IE6/7)
+ * @type boolean
+ * @default false
+ */
+ "bScrollOversize": false
+ },
+
+ /**
+ * Array referencing the nodes which are used for the features. The
+ * parameters of this object match what is allowed by sDom - i.e.
+ * <ul>
+ * <li>'l' - Length changing</li>
+ * <li>'f' - Filtering input</li>
+ * <li>'t' - The table!</li>
+ * <li>'i' - Information</li>
+ * <li>'p' - Pagination</li>
+ * <li>'r' - pRocessing</li>
+ * </ul>
+ * @type array
+ * @default []
+ */
+ "aanFeatures": [],
+
+ /**
+ * Store data information - see {@link DataTable.models.oRow} for detailed
+ * information.
+ * @type array
+ * @default []
+ */
+ "aoData": [],
+
+ /**
+ * Array of indexes which are in the current display (after filtering etc)
+ * @type array
+ * @default []
+ */
+ "aiDisplay": [],
+
+ /**
+ * Array of indexes for display - no filtering
+ * @type array
+ * @default []
+ */
+ "aiDisplayMaster": [],
+
+ /**
+ * Store information about each column that is in use
+ * @type array
+ * @default []
+ */
+ "aoColumns": [],
+
+ /**
+ * Store information about the table's header
+ * @type array
+ * @default []
+ */
+ "aoHeader": [],
+
+ /**
+ * Store information about the table's footer
+ * @type array
+ * @default []
+ */
+ "aoFooter": [],
+
+ /**
+ * Search data array for regular expression searching
+ * @type array
+ * @default []
+ */
+ "asDataSearch": [],
+
+ /**
+ * Store the applied global search information in case we want to force a
+ * research or compare the old search to a new one.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @namespace
+ * @extends DataTable.models.oSearch
+ */
+ "oPreviousSearch": {},
+
+ /**
+ * Store the applied search for each column - see
+ * {@link DataTable.models.oSearch} for the format that is used for the
+ * filtering information for each column.
+ * @type array
+ * @default []
+ */
+ "aoPreSearchCols": [],
+
+ /**
+ * Sorting that is applied to the table. Note that the inner arrays are
+ * used in the following manner:
+ * <ul>
+ * <li>Index 0 - column number</li>
+ * <li>Index 1 - current sorting direction</li>
+ * <li>Index 2 - index of asSorting for this column</li>
+ * </ul>
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type array
+ * @todo These inner arrays should really be objects
+ */
+ "aaSorting": null,
+
+ /**
+ * Sorting that is always applied to the table (i.e. prefixed in front of
+ * aaSorting).
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type array|null
+ * @default null
+ */
+ "aaSortingFixed": null,
+
+ /**
+ * Classes to use for the striping of a table.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type array
+ * @default []
+ */
+ "asStripeClasses": null,
+
+ /**
+ * If restoring a table - we should restore its striping classes as well
+ * @type array
+ * @default []
+ */
+ "asDestroyStripes": [],
+
+ /**
+ * If restoring a table - we should restore its width
+ * @type int
+ * @default 0
+ */
+ "sDestroyWidth": 0,
+
+ /**
+ * Callback functions array for every time a row is inserted (i.e. on a draw).
+ * @type array
+ * @default []
+ */
+ "aoRowCallback": [],
+
+ /**
+ * Callback functions for the header on each draw.
+ * @type array
+ * @default []
+ */
+ "aoHeaderCallback": [],
+
+ /**
+ * Callback function for the footer on each draw.
+ * @type array
+ * @default []
+ */
+ "aoFooterCallback": [],
+
+ /**
+ * Array of callback functions for draw callback functions
+ * @type array
+ * @default []
+ */
+ "aoDrawCallback": [],
+
+ /**
+ * Array of callback functions for row created function
+ * @type array
+ * @default []
+ */
+ "aoRowCreatedCallback": [],
+
+ /**
+ * Callback functions for just before the table is redrawn. A return of
+ * false will be used to cancel the draw.
+ * @type array
+ * @default []
+ */
+ "aoPreDrawCallback": [],
+
+ /**
+ * Callback functions for when the table has been initialised.
+ * @type array
+ * @default []
+ */
+ "aoInitComplete": [],
+
+
+ /**
+ * Callbacks for modifying the settings to be stored for state saving, prior to
+ * saving state.
+ * @type array
+ * @default []
+ */
+ "aoStateSaveParams": [],
+
+ /**
+ * Callbacks for modifying the settings that have been stored for state saving
+ * prior to using the stored values to restore the state.
+ * @type array
+ * @default []
+ */
+ "aoStateLoadParams": [],
+
+ /**
+ * Callbacks for operating on the settings object once the saved state has been
+ * loaded
+ * @type array
+ * @default []
+ */
+ "aoStateLoaded": [],
+
+ /**
+ * Cache the table ID for quick access
+ * @type string
+ * @default <i>Empty string</i>
+ */
+ "sTableId": "",
+
+ /**
+ * The TABLE node for the main table
+ * @type node
+ * @default null
+ */
+ "nTable": null,
+
+ /**
+ * Permanent ref to the thead element
+ * @type node
+ * @default null
+ */
+ "nTHead": null,
+
+ /**
+ * Permanent ref to the tfoot element - if it exists
+ * @type node
+ * @default null
+ */
+ "nTFoot": null,
+
+ /**
+ * Permanent ref to the tbody element
+ * @type node
+ * @default null
+ */
+ "nTBody": null,
+
+ /**
+ * Cache the wrapper node (contains all DataTables controlled elements)
+ * @type node
+ * @default null
+ */
+ "nTableWrapper": null,
+
+ /**
+ * Indicate if when using server-side processing the loading of data
+ * should be deferred until the second draw.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ * @default false
+ */
+ "bDeferLoading": false,
+
+ /**
+ * Indicate if all required information has been read in
+ * @type boolean
+ * @default false
+ */
+ "bInitialised": false,
+
+ /**
+ * Information about open rows. Each object in the array has the parameters
+ * 'nTr' and 'nParent'
+ * @type array
+ * @default []
+ */
+ "aoOpenRows": [],
+
+ /**
+ * Dictate the positioning of DataTables' control elements - see
+ * {@link DataTable.model.oInit.sDom}.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ * @default null
+ */
+ "sDom": null,
+
+ /**
+ * Which type of pagination should be used.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ * @default two_button
+ */
+ "sPaginationType": "two_button",
+
+ /**
+ * The cookie duration (for bStateSave) in seconds.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type int
+ * @default 0
+ */
+ "iCookieDuration": 0,
+
+ /**
+ * The cookie name prefix.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ * @default <i>Empty string</i>
+ */
+ "sCookiePrefix": "",
+
+ /**
+ * Callback function for cookie creation.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type function
+ * @default null
+ */
+ "fnCookieCallback": null,
+
+ /**
+ * Array of callback functions for state saving. Each array element is an
+ * object with the following parameters:
+ * <ul>
+ * <li>function:fn - function to call. Takes two parameters, oSettings
+ * and the JSON string to save that has been thus far created. Returns
+ * a JSON string to be inserted into a json object
+ * (i.e. '"param": [ 0, 1, 2]')</li>
+ * <li>string:sName - name of callback</li>
+ * </ul>
+ * @type array
+ * @default []
+ */
+ "aoStateSave": [],
+
+ /**
+ * Array of callback functions for state loading. Each array element is an
+ * object with the following parameters:
+ * <ul>
+ * <li>function:fn - function to call. Takes two parameters, oSettings
+ * and the object stored. May return false to cancel state loading</li>
+ * <li>string:sName - name of callback</li>
+ * </ul>
+ * @type array
+ * @default []
+ */
+ "aoStateLoad": [],
+
+ /**
+ * State that was loaded from the cookie. Useful for back reference
+ * @type object
+ * @default null
+ */
+ "oLoadedState": null,
+
+ /**
+ * Source url for AJAX data for the table.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ * @default null
+ */
+ "sAjaxSource": null,
+
+ /**
+ * Property from a given object from which to read the table data from. This
+ * can be an empty string (when not server-side processing), in which case
+ * it is assumed an an array is given directly.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ */
+ "sAjaxDataProp": null,
+
+ /**
+ * Note if draw should be blocked while getting data
+ * @type boolean
+ * @default true
+ */
+ "bAjaxDataGet": true,
+
+ /**
+ * The last jQuery XHR object that was used for server-side data gathering.
+ * This can be used for working with the XHR information in one of the
+ * callbacks
+ * @type object
+ * @default null
+ */
+ "jqXHR": null,
+
+ /**
+ * Function to get the server-side data.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type function
+ */
+ "fnServerData": null,
+
+ /**
+ * Functions which are called prior to sending an Ajax request so extra
+ * parameters can easily be sent to the server
+ * @type array
+ * @default []
+ */
+ "aoServerParams": [],
+
+ /**
+ * Send the XHR HTTP method - GET or POST (could be PUT or DELETE if
+ * required).
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ */
+ "sServerMethod": null,
+
+ /**
+ * Format numbers for display.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type function
+ */
+ "fnFormatNumber": null,
+
+ /**
+ * List of options that can be used for the user selectable length menu.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type array
+ * @default []
+ */
+ "aLengthMenu": null,
+
+ /**
+ * Counter for the draws that the table does. Also used as a tracker for
+ * server-side processing
+ * @type int
+ * @default 0
+ */
+ "iDraw": 0,
+
+ /**
+ * Indicate if a redraw is being done - useful for Ajax
+ * @type boolean
+ * @default false
+ */
+ "bDrawing": false,
+
+ /**
+ * Draw index (iDraw) of the last error when parsing the returned data
+ * @type int
+ * @default -1
+ */
+ "iDrawError": -1,
+
+ /**
+ * Paging display length
+ * @type int
+ * @default 10
+ */
+ "_iDisplayLength": 10,
+
+ /**
+ * Paging start point - aiDisplay index
+ * @type int
+ * @default 0
+ */
+ "_iDisplayStart": 0,
+
+ /**
+ * Paging end point - aiDisplay index. Use fnDisplayEnd rather than
+ * this property to get the end point
+ * @type int
+ * @default 10
+ * @private
+ */
+ "_iDisplayEnd": 10,
+
+ /**
+ * Server-side processing - number of records in the result set
+ * (i.e. before filtering), Use fnRecordsTotal rather than
+ * this property to get the value of the number of records, regardless of
+ * the server-side processing setting.
+ * @type int
+ * @default 0
+ * @private
+ */
+ "_iRecordsTotal": 0,
+
+ /**
+ * Server-side processing - number of records in the current display set
+ * (i.e. after filtering). Use fnRecordsDisplay rather than
+ * this property to get the value of the number of records, regardless of
+ * the server-side processing setting.
+ * @type boolean
+ * @default 0
+ * @private
+ */
+ "_iRecordsDisplay": 0,
+
+ /**
+ * Flag to indicate if jQuery UI marking and classes should be used.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bJUI": null,
+
+ /**
+ * The classes to use for the table
+ * @type object
+ * @default {}
+ */
+ "oClasses": {},
+
+ /**
+ * Flag attached to the settings object so you can check in the draw
+ * callback if filtering has been done in the draw. Deprecated in favour of
+ * events.
+ * @type boolean
+ * @default false
+ * @deprecated
+ */
+ "bFiltered": false,
+
+ /**
+ * Flag attached to the settings object so you can check in the draw
+ * callback if sorting has been done in the draw. Deprecated in favour of
+ * events.
+ * @type boolean
+ * @default false
+ * @deprecated
+ */
+ "bSorted": false,
+
+ /**
+ * Indicate that if multiple rows are in the header and there is more than
+ * one unique cell per column, if the top one (true) or bottom one (false)
+ * should be used for sorting / title by DataTables.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bSortCellsTop": null,
+
+ /**
+ * Initialisation object that is used for the table
+ * @type object
+ * @default null
+ */
+ "oInit": null,
+
+ /**
+ * Destroy callback functions - for plug-ins to attach themselves to the
+ * destroy so they can clean up markup and events.
+ * @type array
+ * @default []
+ */
+ "aoDestroyCallback": [],
+
+
+ /**
+ * Get the number of records in the current record set, before filtering
+ * @type function
+ */
+ "fnRecordsTotal": function ()
+ {
+ if ( this.oFeatures.bServerSide ) {
+ return parseInt(this._iRecordsTotal, 10);
+ } else {
+ return this.aiDisplayMaster.length;
+ }
+ },
+
+ /**
+ * Get the number of records in the current record set, after filtering
+ * @type function
+ */
+ "fnRecordsDisplay": function ()
+ {
+ if ( this.oFeatures.bServerSide ) {
+ return parseInt(this._iRecordsDisplay, 10);
+ } else {
+ return this.aiDisplay.length;
+ }
+ },
+
+ /**
+ * Set the display end point - aiDisplay index
+ * @type function
+ * @todo Should do away with _iDisplayEnd and calculate it on-the-fly here
+ */
+ "fnDisplayEnd": function ()
+ {
+ if ( this.oFeatures.bServerSide ) {
+ if ( this.oFeatures.bPaginate === false || this._iDisplayLength == -1 ) {
+ return this._iDisplayStart+this.aiDisplay.length;
+ } else {
+ return Math.min( this._iDisplayStart+this._iDisplayLength,
+ this._iRecordsDisplay );
+ }
+ } else {
+ return this._iDisplayEnd;
+ }
+ },
+
+ /**
+ * The DataTables object for this table
+ * @type object
+ * @default null
+ */
+ "oInstance": null,
+
+ /**
+ * Unique identifier for each instance of the DataTables object. If there
+ * is an ID on the table node, then it takes that value, otherwise an
+ * incrementing internal counter is used.
+ * @type string
+ * @default null
+ */
+ "sInstance": null,
+
+ /**
+ * tabindex attribute value that is added to DataTables control elements, allowing
+ * keyboard navigation of the table and its controls.
+ */
+ "iTabIndex": 0,
+
+ /**
+ * DIV container for the footer scrolling table if scrolling
+ */
+ "nScrollHead": null,
+
+ /**
+ * DIV container for the footer scrolling table if scrolling
+ */
+ "nScrollFoot": null
+ };
+
+ /**
+ * Extension object for DataTables that is used to provide all extension options.
+ *
+ * Note that the <i>DataTable.ext</i> object is available through
+ * <i>jQuery.fn.dataTable.ext</i> where it may be accessed and manipulated. It is
+ * also aliased to <i>jQuery.fn.dataTableExt</i> for historic reasons.
+ * @namespace
+ * @extends DataTable.models.ext
+ */
+ DataTable.ext = $.extend( true, {}, DataTable.models.ext );
+
+ $.extend( DataTable.ext.oStdClasses, {
+ "sTable": "dataTable",
+
+ /* Two buttons buttons */
+ "sPagePrevEnabled": "paginate_enabled_previous",
+ "sPagePrevDisabled": "paginate_disabled_previous",
+ "sPageNextEnabled": "paginate_enabled_next",
+ "sPageNextDisabled": "paginate_disabled_next",
+ "sPageJUINext": "",
+ "sPageJUIPrev": "",
+
+ /* Full numbers paging buttons */
+ "sPageButton": "paginate_button",
+ "sPageButtonActive": "paginate_active",
+ "sPageButtonStaticDisabled": "paginate_button paginate_button_disabled",
+ "sPageFirst": "first",
+ "sPagePrevious": "previous",
+ "sPageNext": "next",
+ "sPageLast": "last",
+
+ /* Striping classes */
+ "sStripeOdd": "odd",
+ "sStripeEven": "even",
+
+ /* Empty row */
+ "sRowEmpty": "dataTables_empty",
+
+ /* Features */
+ "sWrapper": "dataTables_wrapper",
+ "sFilter": "dataTables_filter",
+ "sInfo": "dataTables_info",
+ "sPaging": "dataTables_paginate paging_", /* Note that the type is postfixed */
+ "sLength": "dataTables_length",
+ "sProcessing": "dataTables_processing",
+
+ /* Sorting */
+ "sSortAsc": "sorting_asc",
+ "sSortDesc": "sorting_desc",
+ "sSortable": "sorting", /* Sortable in both directions */
+ "sSortableAsc": "sorting_asc_disabled",
+ "sSortableDesc": "sorting_desc_disabled",
+ "sSortableNone": "sorting_disabled",
+ "sSortColumn": "sorting_", /* Note that an int is postfixed for the sorting order */
+ "sSortJUIAsc": "",
+ "sSortJUIDesc": "",
+ "sSortJUI": "",
+ "sSortJUIAscAllowed": "",
+ "sSortJUIDescAllowed": "",
+ "sSortJUIWrapper": "",
+ "sSortIcon": "",
+
+ /* Scrolling */
+ "sScrollWrapper": "dataTables_scroll",
+ "sScrollHead": "dataTables_scrollHead",
+ "sScrollHeadInner": "dataTables_scrollHeadInner",
+ "sScrollBody": "dataTables_scrollBody",
+ "sScrollFoot": "dataTables_scrollFoot",
+ "sScrollFootInner": "dataTables_scrollFootInner",
+
+ /* Misc */
+ "sFooterTH": "",
+ "sJUIHeader": "",
+ "sJUIFooter": ""
+ } );
+
+
+ $.extend( DataTable.ext.oJUIClasses, DataTable.ext.oStdClasses, {
+ /* Two buttons buttons */
+ "sPagePrevEnabled": "fg-button ui-button ui-state-default ui-corner-left",
+ "sPagePrevDisabled": "fg-button ui-button ui-state-default ui-corner-left ui-state-disabled",
+ "sPageNextEnabled": "fg-button ui-button ui-state-default ui-corner-right",
+ "sPageNextDisabled": "fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",
+ "sPageJUINext": "ui-icon ui-icon-circle-arrow-e",
+ "sPageJUIPrev": "ui-icon ui-icon-circle-arrow-w",
+
+ /* Full numbers paging buttons */
+ "sPageButton": "fg-button ui-button ui-state-default",
+ "sPageButtonActive": "fg-button ui-button ui-state-default ui-state-disabled",
+ "sPageButtonStaticDisabled": "fg-button ui-button ui-state-default ui-state-disabled",
+ "sPageFirst": "first ui-corner-tl ui-corner-bl",
+ "sPageLast": "last ui-corner-tr ui-corner-br",
+
+ /* Features */
+ "sPaging": "dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi "+
+ "ui-buttonset-multi paging_", /* Note that the type is postfixed */
+
+ /* Sorting */
+ "sSortAsc": "ui-state-default",
+ "sSortDesc": "ui-state-default",
+ "sSortable": "ui-state-default",
+ "sSortableAsc": "ui-state-default",
+ "sSortableDesc": "ui-state-default",
+ "sSortableNone": "ui-state-default",
+ "sSortJUIAsc": "css_right ui-icon ui-icon-triangle-1-n",
+ "sSortJUIDesc": "css_right ui-icon ui-icon-triangle-1-s",
+ "sSortJUI": "css_right ui-icon ui-icon-carat-2-n-s",
+ "sSortJUIAscAllowed": "css_right ui-icon ui-icon-carat-1-n",
+ "sSortJUIDescAllowed": "css_right ui-icon ui-icon-carat-1-s",
+ "sSortJUIWrapper": "DataTables_sort_wrapper",
+ "sSortIcon": "DataTables_sort_icon",
+
+ /* Scrolling */
+ "sScrollHead": "dataTables_scrollHead ui-state-default",
+ "sScrollFoot": "dataTables_scrollFoot ui-state-default",
+
+ /* Misc */
+ "sFooterTH": "ui-state-default",
+ "sJUIHeader": "fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix",
+ "sJUIFooter": "fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix"
+ } );
+
+ /*
+ * Variable: oPagination
+ * Purpose:
+ * Scope: jQuery.fn.dataTableExt
+ */
+ $.extend( DataTable.ext.oPagination, {
+ /*
+ * Variable: two_button
+ * Purpose: Standard two button (forward/back) pagination
+ * Scope: jQuery.fn.dataTableExt.oPagination
+ */
+ "two_button": {
+ /*
+ * Function: oPagination.two_button.fnInit
+ * Purpose: Initialise dom elements required for pagination with forward/back buttons only
+ * Returns: -
+ * Inputs: object:oSettings - dataTables settings object
+ * node:nPaging - the DIV which contains this pagination control
+ * function:fnCallbackDraw - draw function which must be called on update
+ */
+ "fnInit": function ( oSettings, nPaging, fnCallbackDraw )
+ {
+ var oLang = oSettings.oLanguage.oPaginate;
+ var oClasses = oSettings.oClasses;
+ var fnClickHandler = function ( e ) {
+ if ( oSettings.oApi._fnPageChange( oSettings, e.data.action ) )
+ {
+ fnCallbackDraw( oSettings );
+ }
+ };
+
+ var sAppend = (!oSettings.bJUI) ?
+ '<a class="'+oSettings.oClasses.sPagePrevDisabled+'" tabindex="'+oSettings.iTabIndex+'" role="button">'+oLang.sPrevious+'</a>'+
+ '<a class="'+oSettings.oClasses.sPageNextDisabled+'" tabindex="'+oSettings.iTabIndex+'" role="button">'+oLang.sNext+'</a>'
+ :
+ '<a class="'+oSettings.oClasses.sPagePrevDisabled+'" tabindex="'+oSettings.iTabIndex+'" role="button"><span class="'+oSettings.oClasses.sPageJUIPrev+'"></span></a>'+
+ '<a class="'+oSettings.oClasses.sPageNextDisabled+'" tabindex="'+oSettings.iTabIndex+'" role="button"><span class="'+oSettings.oClasses.sPageJUINext+'"></span></a>';
+ $(nPaging).append( sAppend );
+
+ var els = $('a', nPaging);
+ var nPrevious = els[0],
+ nNext = els[1];
+
+ oSettings.oApi._fnBindAction( nPrevious, {action: "previous"}, fnClickHandler );
+ oSettings.oApi._fnBindAction( nNext, {action: "next"}, fnClickHandler );
+
+ /* ID the first elements only */
+ if ( !oSettings.aanFeatures.p )
+ {
+ nPaging.id = oSettings.sTableId+'_paginate';
+ nPrevious.id = oSettings.sTableId+'_previous';
+ nNext.id = oSettings.sTableId+'_next';
+
+ nPrevious.setAttribute('aria-controls', oSettings.sTableId);
+ nNext.setAttribute('aria-controls', oSettings.sTableId);
+ }
+ },
+
+ /*
+ * Function: oPagination.two_button.fnUpdate
+ * Purpose: Update the two button pagination at the end of the draw
+ * Returns: -
+ * Inputs: object:oSettings - dataTables settings object
+ * function:fnCallbackDraw - draw function to call on page change
+ */
+ "fnUpdate": function ( oSettings, fnCallbackDraw )
+ {
+ if ( !oSettings.aanFeatures.p )
+ {
+ return;
+ }
+
+ var oClasses = oSettings.oClasses;
+ var an = oSettings.aanFeatures.p;
+ var nNode;
+
+ /* Loop over each instance of the pager */
+ for ( var i=0, iLen=an.length ; i<iLen ; i++ )
+ {
+ nNode = an[i].firstChild;
+ if ( nNode )
+ {
+ /* Previous page */
+ nNode.className = ( oSettings._iDisplayStart === 0 ) ?
+ oClasses.sPagePrevDisabled : oClasses.sPagePrevEnabled;
+
+ /* Next page */
+ nNode = nNode.nextSibling;
+ nNode.className = ( oSettings.fnDisplayEnd() == oSettings.fnRecordsDisplay() ) ?
+ oClasses.sPageNextDisabled : oClasses.sPageNextEnabled;
+ }
+ }
+ }
+ },
+
+
+ /*
+ * Variable: iFullNumbersShowPages
+ * Purpose: Change the number of pages which can be seen
+ * Scope: jQuery.fn.dataTableExt.oPagination
+ */
+ "iFullNumbersShowPages": 5,
+
+ /*
+ * Variable: full_numbers
+ * Purpose: Full numbers pagination
+ * Scope: jQuery.fn.dataTableExt.oPagination
+ */
+ "full_numbers": {
+ /*
+ * Function: oPagination.full_numbers.fnInit
+ * Purpose: Initialise dom elements required for pagination with a list of the pages
+ * Returns: -
+ * Inputs: object:oSettings - dataTables settings object
+ * node:nPaging - the DIV which contains this pagination control
+ * function:fnCallbackDraw - draw function which must be called on update
+ */
+ "fnInit": function ( oSettings, nPaging, fnCallbackDraw )
+ {
+ var oLang = oSettings.oLanguage.oPaginate;
+ var oClasses = oSettings.oClasses;
+ var fnClickHandler = function ( e ) {
+ if ( oSettings.oApi._fnPageChange( oSettings, e.data.action ) )
+ {
+ fnCallbackDraw( oSettings );
+ }
+ };
+
+ $(nPaging).append(
+ '<a tabindex="'+oSettings.iTabIndex+'" class="'+oClasses.sPageButton+" "+oClasses.sPageFirst+'">'+oLang.sFirst+'</a>'+
+ '<a tabindex="'+oSettings.iTabIndex+'" class="'+oClasses.sPageButton+" "+oClasses.sPagePrevious+'">'+oLang.sPrevious+'</a>'+
+ '<span></span>'+
+ '<a tabindex="'+oSettings.iTabIndex+'" class="'+oClasses.sPageButton+" "+oClasses.sPageNext+'">'+oLang.sNext+'</a>'+
+ '<a tabindex="'+oSettings.iTabIndex+'" class="'+oClasses.sPageButton+" "+oClasses.sPageLast+'">'+oLang.sLast+'</a>'
+ );
+ var els = $('a', nPaging);
+ var nFirst = els[0],
+ nPrev = els[1],
+ nNext = els[2],
+ nLast = els[3];
+
+ oSettings.oApi._fnBindAction( nFirst, {action: "first"}, fnClickHandler );
+ oSettings.oApi._fnBindAction( nPrev, {action: "previous"}, fnClickHandler );
+ oSettings.oApi._fnBindAction( nNext, {action: "next"}, fnClickHandler );
+ oSettings.oApi._fnBindAction( nLast, {action: "last"}, fnClickHandler );
+
+ /* ID the first elements only */
+ if ( !oSettings.aanFeatures.p )
+ {
+ nPaging.id = oSettings.sTableId+'_paginate';
+ nFirst.id =oSettings.sTableId+'_first';
+ nPrev.id =oSettings.sTableId+'_previous';
+ nNext.id =oSettings.sTableId+'_next';
+ nLast.id =oSettings.sTableId+'_last';
+ }
+ },
+
+ /*
+ * Function: oPagination.full_numbers.fnUpdate
+ * Purpose: Update the list of page buttons shows
+ * Returns: -
+ * Inputs: object:oSettings - dataTables settings object
+ * function:fnCallbackDraw - draw function to call on page change
+ */
+ "fnUpdate": function ( oSettings, fnCallbackDraw )
+ {
+ if ( !oSettings.aanFeatures.p )
+ {
+ return;
+ }
+
+ var iPageCount = DataTable.ext.oPagination.iFullNumbersShowPages;
+ var iPageCountHalf = Math.floor(iPageCount / 2);
+ var iPages = Math.ceil((oSettings.fnRecordsDisplay()) / oSettings._iDisplayLength);
+ var iCurrentPage = Math.ceil(oSettings._iDisplayStart / oSettings._iDisplayLength) + 1;
+ var sList = "";
+ var iStartButton, iEndButton, i, iLen;
+ var oClasses = oSettings.oClasses;
+ var anButtons, anStatic, nPaginateList, nNode;
+ var an = oSettings.aanFeatures.p;
+ var fnBind = function (j) {
+ oSettings.oApi._fnBindAction( this, {"page": j+iStartButton-1}, function(e) {
+ /* Use the information in the element to jump to the required page */
+ oSettings.oApi._fnPageChange( oSettings, e.data.page );
+ fnCallbackDraw( oSettings );
+ e.preventDefault();
+ } );
+ };
+
+ /* Pages calculation */
+ if ( oSettings._iDisplayLength === -1 )
+ {
+ iStartButton = 1;
+ iEndButton = 1;
+ iCurrentPage = 1;
+ }
+ else if (iPages < iPageCount)
+ {
+ iStartButton = 1;
+ iEndButton = iPages;
+ }
+ else if (iCurrentPage <= iPageCountHalf)
+ {
+ iStartButton = 1;
+ iEndButton = iPageCount;
+ }
+ else if (iCurrentPage >= (iPages - iPageCountHalf))
+ {
+ iStartButton = iPages - iPageCount + 1;
+ iEndButton = iPages;
+ }
+ else
+ {
+ iStartButton = iCurrentPage - Math.ceil(iPageCount / 2) + 1;
+ iEndButton = iStartButton + iPageCount - 1;
+ }
+
+
+ /* Build the dynamic list */
+ for ( i=iStartButton ; i<=iEndButton ; i++ )
+ {
+ sList += (iCurrentPage !== i) ?
+ '<a tabindex="'+oSettings.iTabIndex+'" class="'+oClasses.sPageButton+'">'+oSettings.fnFormatNumber(i)+'</a>' :
+ '<a tabindex="'+oSettings.iTabIndex+'" class="'+oClasses.sPageButtonActive+'">'+oSettings.fnFormatNumber(i)+'</a>';
+ }
+
+ /* Loop over each instance of the pager */
+ for ( i=0, iLen=an.length ; i<iLen ; i++ )
+ {
+ nNode = an[i];
+ if ( !nNode.hasChildNodes() )
+ {
+ continue;
+ }
+
+ /* Build up the dynamic list first - html and listeners */
+ $('span:eq(0)', nNode)
+ .html( sList )
+ .children('a').each( fnBind );
+
+ /* Update the permanent button's classes */
+ anButtons = nNode.getElementsByTagName('a');
+ anStatic = [
+ anButtons[0], anButtons[1],
+ anButtons[anButtons.length-2], anButtons[anButtons.length-1]
+ ];
+
+ $(anStatic).removeClass( oClasses.sPageButton+" "+oClasses.sPageButtonActive+" "+oClasses.sPageButtonStaticDisabled );
+ $([anStatic[0], anStatic[1]]).addClass(
+ (iCurrentPage==1) ?
+ oClasses.sPageButtonStaticDisabled :
+ oClasses.sPageButton
+ );
+ $([anStatic[2], anStatic[3]]).addClass(
+ (iPages===0 || iCurrentPage===iPages || oSettings._iDisplayLength===-1) ?
+ oClasses.sPageButtonStaticDisabled :
+ oClasses.sPageButton
+ );
+ }
+ }
+ }
+ } );
+
+ $.extend( DataTable.ext.oSort, {
+ /*
+ * text sorting
+ */
+ "string-pre": function ( a )
+ {
+ if ( typeof a != 'string' ) {
+ a = (a !== null && a.toString) ? a.toString() : '';
+ }
+ return a.toLowerCase();
+ },
+
+ "string-asc": function ( x, y )
+ {
+ return ((x < y) ? -1 : ((x > y) ? 1 : 0));
+ },
+
+ "string-desc": function ( x, y )
+ {
+ return ((x < y) ? 1 : ((x > y) ? -1 : 0));
+ },
+
+
+ /*
+ * html sorting (ignore html tags)
+ */
+ "html-pre": function ( a )
+ {
+ return a.replace( /<.*?>/g, "" ).toLowerCase();
+ },
+
+ "html-asc": function ( x, y )
+ {
+ return ((x < y) ? -1 : ((x > y) ? 1 : 0));
+ },
+
+ "html-desc": function ( x, y )
+ {
+ return ((x < y) ? 1 : ((x > y) ? -1 : 0));
+ },
+
+
+ /*
+ * date sorting
+ */
+ "date-pre": function ( a )
+ {
+ var x = Date.parse( a );
+
+ if ( isNaN(x) || x==="" )
+ {
+ x = Date.parse( "01/01/1970 00:00:00" );
+ }
+ return x;
+ },
+
+ "date-asc": function ( x, y )
+ {
+ return x - y;
+ },
+
+ "date-desc": function ( x, y )
+ {
+ return y - x;
+ },
+
+
+ /*
+ * numerical sorting
+ */
+ "numeric-pre": function ( a )
+ {
+ return (a=="-" || a==="") ? 0 : a*1;
+ },
+
+ "numeric-asc": function ( x, y )
+ {
+ return x - y;
+ },
+
+ "numeric-desc": function ( x, y )
+ {
+ return y - x;
+ }
+ } );
+
+
+ $.extend( DataTable.ext.aTypes, [
+ /*
+ * Function: -
+ * Purpose: Check to see if a string is numeric
+ * Returns: string:'numeric' or null
+ * Inputs: mixed:sText - string to check
+ */
+ function ( sData )
+ {
+ /* Allow zero length strings as a number */
+ if ( typeof sData === 'number' )
+ {
+ return 'numeric';
+ }
+ else if ( typeof sData !== 'string' )
+ {
+ return null;
+ }
+
+ var sValidFirstChars = "0123456789-";
+ var sValidChars = "0123456789.";
+ var Char;
+ var bDecimal = false;
+
+ /* Check for a valid first char (no period and allow negatives) */
+ Char = sData.charAt(0);
+ if (sValidFirstChars.indexOf(Char) == -1)
+ {
+ return null;
+ }
+
+ /* Check all the other characters are valid */
+ for ( var i=1 ; i<sData.length ; i++ )
+ {
+ Char = sData.charAt(i);
+ if (sValidChars.indexOf(Char) == -1)
+ {
+ return null;
+ }
+
+ /* Only allowed one decimal place... */
+ if ( Char == "." )
+ {
+ if ( bDecimal )
+ {
+ return null;
+ }
+ bDecimal = true;
+ }
+ }
+
+ return 'numeric';
+ },
+
+ /*
+ * Function: -
+ * Purpose: Check to see if a string is actually a formatted date
+ * Returns: string:'date' or null
+ * Inputs: string:sText - string to check
+ */
+ function ( sData )
+ {
+ var iParse = Date.parse(sData);
+ if ( (iParse !== null && !isNaN(iParse)) || (typeof sData === 'string' && sData.length === 0) )
+ {
+ return 'date';
+ }
+ return null;
+ },
+
+ /*
+ * Function: -
+ * Purpose: Check to see if a string should be treated as an HTML string
+ * Returns: string:'html' or null
+ * Inputs: string:sText - string to check
+ */
+ function ( sData )
+ {
+ if ( typeof sData === 'string' && sData.indexOf('<') != -1 && sData.indexOf('>') != -1 )
+ {
+ return 'html';
+ }
+ return null;
+ }
+ ] );
+
+
+ // jQuery aliases
+ $.fn.DataTable = DataTable;
+ $.fn.dataTable = DataTable;
+ $.fn.dataTableSettings = DataTable.settings;
+ $.fn.dataTableExt = DataTable.ext;
+
+
+ // Information about events fired by DataTables - for documentation.
+ /**
+ * Draw event, fired whenever the table is redrawn on the page, at the same point as
+ * fnDrawCallback. This may be useful for binding events or performing calculations when
+ * the table is altered at all.
+ * @name DataTable#draw
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ */
+
+ /**
+ * Filter event, fired when the filtering applied to the table (using the build in global
+ * global filter, or column filters) is altered.
+ * @name DataTable#filter
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ */
+
+ /**
+ * Page change event, fired when the paging of the table is altered.
+ * @name DataTable#page
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ */
+
+ /**
+ * Sort event, fired when the sorting applied to the table is altered.
+ * @name DataTable#sort
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ */
+
+ /**
+ * DataTables initialisation complete event, fired when the table is fully drawn,
+ * including Ajax data loaded, if Ajax data is required.
+ * @name DataTable#init
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} oSettings DataTables settings object
+ * @param {object} json The JSON object request from the server - only
+ * present if client-side Ajax sourced data is used</li></ol>
+ */
+
+ /**
+ * State save event, fired when the table has changed state a new state save is required.
+ * This method allows modification of the state saving object prior to actually doing the
+ * save, including addition or other state properties (for plug-ins) or modification
+ * of a DataTables core property.
+ * @name DataTable#stateSaveParams
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} oSettings DataTables settings object
+ * @param {object} json The state information to be saved
+ */
+
+ /**
+ * State load event, fired when the table is loading state from the stored data, but
+ * prior to the settings object being modified by the saved state - allowing modification
+ * of the saved state is required or loading of state for a plug-in.
+ * @name DataTable#stateLoadParams
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} oSettings DataTables settings object
+ * @param {object} json The saved state information
+ */
+
+ /**
+ * State loaded event, fired when state has been loaded from stored data and the settings
+ * object has been modified by the loaded data.
+ * @name DataTable#stateLoaded
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} oSettings DataTables settings object
+ * @param {object} json The saved state information
+ */
+
+ /**
+ * Processing event, fired when DataTables is doing some kind of processing (be it,
+ * sort, filter or anything else). Can be used to indicate to the end user that
+ * there is something happening, or that something has finished.
+ * @name DataTable#processing
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} oSettings DataTables settings object
+ * @param {boolean} bShow Flag for if DataTables is doing processing or not
+ */
+
+ /**
+ * Ajax (XHR) event, fired whenever an Ajax request is completed from a request to
+ * made to the server for new data (note that this trigger is called in fnServerData,
+ * if you override fnServerData and which to use this event, you need to trigger it in
+ * you success function).
+ * @name DataTable#xhr
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ * @param {object} json JSON returned from the server
+ */
+
+ /**
+ * Destroy event, fired when the DataTable is destroyed by calling fnDestroy or passing
+ * the bDestroy:true parameter in the initialisation object. This can be used to remove
+ * bound events, added DOM nodes, etc.
+ * @name DataTable#destroy
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ */
+}));
+
+}(window, document));
+
diff --git a/common/src/main/webapp/thirdparty/data-tables/jquery.dataTables-1.9.4.min.js b/common/src/main/webapp/thirdparty/data-tables/jquery.dataTables-1.9.4.min.js
new file mode 100644
index 0000000..02694a4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/data-tables/jquery.dataTables-1.9.4.min.js
@@ -0,0 +1,155 @@
+/*
+ * File: jquery.dataTables.min.js
+ * Version: 1.9.4
+ * Author: Allan Jardine (www.sprymedia.co.uk)
+ * Info: www.datatables.net
+ *
+ * Copyright 2008-2012 Allan Jardine, all rights reserved.
+ *
+ * This source file is free software, under either the GPL v2 license or a
+ * BSD style license, available at:
+ * http://datatables.net/license_gpl2
+ * http://datatables.net/license_bsd
+ *
+ * This source file is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
+ */
+(function(X,l,n){var L=function(h){var j=function(e){function o(a,b){var c=j.defaults.columns,d=a.aoColumns.length,c=h.extend({},j.models.oColumn,c,{sSortingClass:a.oClasses.sSortable,sSortingClassJUI:a.oClasses.sSortJUI,nTh:b?b:l.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.oDefaults:d});a.aoColumns.push(c);if(a.aoPreSearchCols[d]===n||null===a.aoPreSearchCols[d])a.aoPreSearchCols[d]=h.extend({},j.models.oSearch);else if(c=a.aoPreSearchCols[d],
+c.bRegex===n&&(c.bRegex=!0),c.bSmart===n&&(c.bSmart=!0),c.bCaseInsensitive===n)c.bCaseInsensitive=!0;m(a,d,null)}function m(a,b,c){var d=a.aoColumns[b];c!==n&&null!==c&&(c.mDataProp&&!c.mData&&(c.mData=c.mDataProp),c.sType!==n&&(d.sType=c.sType,d._bAutoType=!1),h.extend(d,c),p(d,c,"sWidth","sWidthOrig"),c.iDataSort!==n&&(d.aDataSort=[c.iDataSort]),p(d,c,"aDataSort"));var i=d.mRender?Q(d.mRender):null,f=Q(d.mData);d.fnGetData=function(a,b){var c=f(a,b);return d.mRender&&b&&""!==b?i(c,b,a):c};d.fnSetData=
+L(d.mData);a.oFeatures.bSort||(d.bSortable=!1);!d.bSortable||-1==h.inArray("asc",d.asSorting)&&-1==h.inArray("desc",d.asSorting)?(d.sSortingClass=a.oClasses.sSortableNone,d.sSortingClassJUI=""):-1==h.inArray("asc",d.asSorting)&&-1==h.inArray("desc",d.asSorting)?(d.sSortingClass=a.oClasses.sSortable,d.sSortingClassJUI=a.oClasses.sSortJUI):-1!=h.inArray("asc",d.asSorting)&&-1==h.inArray("desc",d.asSorting)?(d.sSortingClass=a.oClasses.sSortableAsc,d.sSortingClassJUI=a.oClasses.sSortJUIAscAllowed):-1==
+h.inArray("asc",d.asSorting)&&-1!=h.inArray("desc",d.asSorting)&&(d.sSortingClass=a.oClasses.sSortableDesc,d.sSortingClassJUI=a.oClasses.sSortJUIDescAllowed)}function k(a){if(!1===a.oFeatures.bAutoWidth)return!1;da(a);for(var b=0,c=a.aoColumns.length;b<c;b++)a.aoColumns[b].nTh.style.width=a.aoColumns[b].sWidth}function G(a,b){var c=r(a,"bVisible");return"number"===typeof c[b]?c[b]:null}function R(a,b){var c=r(a,"bVisible"),c=h.inArray(b,c);return-1!==c?c:null}function t(a){return r(a,"bVisible").length}
+function r(a,b){var c=[];h.map(a.aoColumns,function(a,i){a[b]&&c.push(i)});return c}function B(a){for(var b=j.ext.aTypes,c=b.length,d=0;d<c;d++){var i=b[d](a);if(null!==i)return i}return"string"}function u(a,b){for(var c=b.split(","),d=[],i=0,f=a.aoColumns.length;i<f;i++)for(var g=0;g<f;g++)if(a.aoColumns[i].sName==c[g]){d.push(g);break}return d}function M(a){for(var b="",c=0,d=a.aoColumns.length;c<d;c++)b+=a.aoColumns[c].sName+",";return b.length==d?"":b.slice(0,-1)}function ta(a,b,c,d){var i,f,
+g,e,w;if(b)for(i=b.length-1;0<=i;i--){var j=b[i].aTargets;h.isArray(j)||D(a,1,"aTargets must be an array of targets, not a "+typeof j);f=0;for(g=j.length;f<g;f++)if("number"===typeof j[f]&&0<=j[f]){for(;a.aoColumns.length<=j[f];)o(a);d(j[f],b[i])}else if("number"===typeof j[f]&&0>j[f])d(a.aoColumns.length+j[f],b[i]);else if("string"===typeof j[f]){e=0;for(w=a.aoColumns.length;e<w;e++)("_all"==j[f]||h(a.aoColumns[e].nTh).hasClass(j[f]))&&d(e,b[i])}}if(c){i=0;for(a=c.length;i<a;i++)d(i,c[i])}}function H(a,
+b){var c;c=h.isArray(b)?b.slice():h.extend(!0,{},b);var d=a.aoData.length,i=h.extend(!0,{},j.models.oRow);i._aData=c;a.aoData.push(i);for(var f,i=0,g=a.aoColumns.length;i<g;i++)c=a.aoColumns[i],"function"===typeof c.fnRender&&c.bUseRendered&&null!==c.mData?F(a,d,i,S(a,d,i)):F(a,d,i,v(a,d,i)),c._bAutoType&&"string"!=c.sType&&(f=v(a,d,i,"type"),null!==f&&""!==f&&(f=B(f),null===c.sType?c.sType=f:c.sType!=f&&"html"!=c.sType&&(c.sType="string")));a.aiDisplayMaster.push(d);a.oFeatures.bDeferRender||ea(a,
+d);return d}function ua(a){var b,c,d,i,f,g,e;if(a.bDeferLoading||null===a.sAjaxSource)for(b=a.nTBody.firstChild;b;){if("TR"==b.nodeName.toUpperCase()){c=a.aoData.length;b._DT_RowIndex=c;a.aoData.push(h.extend(!0,{},j.models.oRow,{nTr:b}));a.aiDisplayMaster.push(c);f=b.firstChild;for(d=0;f;){g=f.nodeName.toUpperCase();if("TD"==g||"TH"==g)F(a,c,d,h.trim(f.innerHTML)),d++;f=f.nextSibling}}b=b.nextSibling}i=T(a);d=[];b=0;for(c=i.length;b<c;b++)for(f=i[b].firstChild;f;)g=f.nodeName.toUpperCase(),("TD"==
+g||"TH"==g)&&d.push(f),f=f.nextSibling;c=0;for(i=a.aoColumns.length;c<i;c++){e=a.aoColumns[c];null===e.sTitle&&(e.sTitle=e.nTh.innerHTML);var w=e._bAutoType,o="function"===typeof e.fnRender,k=null!==e.sClass,n=e.bVisible,m,p;if(w||o||k||!n){g=0;for(b=a.aoData.length;g<b;g++)f=a.aoData[g],m=d[g*i+c],w&&"string"!=e.sType&&(p=v(a,g,c,"type"),""!==p&&(p=B(p),null===e.sType?e.sType=p:e.sType!=p&&"html"!=e.sType&&(e.sType="string"))),e.mRender?m.innerHTML=v(a,g,c,"display"):e.mData!==c&&(m.innerHTML=v(a,
+g,c,"display")),o&&(p=S(a,g,c),m.innerHTML=p,e.bUseRendered&&F(a,g,c,p)),k&&(m.className+=" "+e.sClass),n?f._anHidden[c]=null:(f._anHidden[c]=m,m.parentNode.removeChild(m)),e.fnCreatedCell&&e.fnCreatedCell.call(a.oInstance,m,v(a,g,c,"display"),f._aData,g,c)}}if(0!==a.aoRowCreatedCallback.length){b=0;for(c=a.aoData.length;b<c;b++)f=a.aoData[b],A(a,"aoRowCreatedCallback",null,[f.nTr,f._aData,b])}}function I(a,b){return b._DT_RowIndex!==n?b._DT_RowIndex:null}function fa(a,b,c){for(var b=J(a,b),d=0,a=
+a.aoColumns.length;d<a;d++)if(b[d]===c)return d;return-1}function Y(a,b,c,d){for(var i=[],f=0,g=d.length;f<g;f++)i.push(v(a,b,d[f],c));return i}function v(a,b,c,d){var i=a.aoColumns[c];if((c=i.fnGetData(a.aoData[b]._aData,d))===n)return a.iDrawError!=a.iDraw&&null===i.sDefaultContent&&(D(a,0,"Requested unknown parameter "+("function"==typeof i.mData?"{mData function}":"'"+i.mData+"'")+" from the data source for row "+b),a.iDrawError=a.iDraw),i.sDefaultContent;if(null===c&&null!==i.sDefaultContent)c=
+i.sDefaultContent;else if("function"===typeof c)return c();return"display"==d&&null===c?"":c}function F(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d)}function Q(a){if(null===a)return function(){return null};if("function"===typeof a)return function(b,d,i){return a(b,d,i)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("["))){var b=function(a,d,i){var f=i.split("."),g;if(""!==i){var e=0;for(g=f.length;e<g;e++){if(i=f[e].match(U)){f[e]=f[e].replace(U,"");""!==f[e]&&(a=a[f[e]]);
+g=[];f.splice(0,e+1);for(var f=f.join("."),e=0,h=a.length;e<h;e++)g.push(b(a[e],d,f));a=i[0].substring(1,i[0].length-1);a=""===a?g:g.join(a);break}if(null===a||a[f[e]]===n)return n;a=a[f[e]]}}return a};return function(c,d){return b(c,d,a)}}return function(b){return b[a]}}function L(a){if(null===a)return function(){};if("function"===typeof a)return function(b,d){a(b,"set",d)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("["))){var b=function(a,d,i){var i=i.split("."),f,g,e=0;for(g=
+i.length-1;e<g;e++){if(f=i[e].match(U)){i[e]=i[e].replace(U,"");a[i[e]]=[];f=i.slice();f.splice(0,e+1);g=f.join(".");for(var h=0,j=d.length;h<j;h++)f={},b(f,d[h],g),a[i[e]].push(f);return}if(null===a[i[e]]||a[i[e]]===n)a[i[e]]={};a=a[i[e]]}a[i[i.length-1].replace(U,"")]=d};return function(c,d){return b(c,d,a)}}return function(b,d){b[a]=d}}function Z(a){for(var b=[],c=a.aoData.length,d=0;d<c;d++)b.push(a.aoData[d]._aData);return b}function ga(a){a.aoData.splice(0,a.aoData.length);a.aiDisplayMaster.splice(0,
+a.aiDisplayMaster.length);a.aiDisplay.splice(0,a.aiDisplay.length);y(a)}function ha(a,b){for(var c=-1,d=0,i=a.length;d<i;d++)a[d]==b?c=d:a[d]>b&&a[d]--; -1!=c&&a.splice(c,1)}function S(a,b,c){var d=a.aoColumns[c];return d.fnRender({iDataRow:b,iDataColumn:c,oSettings:a,aData:a.aoData[b]._aData,mDataProp:d.mData},v(a,b,c,"display"))}function ea(a,b){var c=a.aoData[b],d;if(null===c.nTr){c.nTr=l.createElement("tr");c.nTr._DT_RowIndex=b;c._aData.DT_RowId&&(c.nTr.id=c._aData.DT_RowId);c._aData.DT_RowClass&&
+(c.nTr.className=c._aData.DT_RowClass);for(var i=0,f=a.aoColumns.length;i<f;i++){var g=a.aoColumns[i];d=l.createElement(g.sCellType);d.innerHTML="function"===typeof g.fnRender&&(!g.bUseRendered||null===g.mData)?S(a,b,i):v(a,b,i,"display");null!==g.sClass&&(d.className=g.sClass);g.bVisible?(c.nTr.appendChild(d),c._anHidden[i]=null):c._anHidden[i]=d;g.fnCreatedCell&&g.fnCreatedCell.call(a.oInstance,d,v(a,b,i,"display"),c._aData,b,i)}A(a,"aoRowCreatedCallback",null,[c.nTr,c._aData,b])}}function va(a){var b,
+c,d;if(0!==h("th, td",a.nTHead).length){b=0;for(d=a.aoColumns.length;b<d;b++)if(c=a.aoColumns[b].nTh,c.setAttribute("role","columnheader"),a.aoColumns[b].bSortable&&(c.setAttribute("tabindex",a.iTabIndex),c.setAttribute("aria-controls",a.sTableId)),null!==a.aoColumns[b].sClass&&h(c).addClass(a.aoColumns[b].sClass),a.aoColumns[b].sTitle!=c.innerHTML)c.innerHTML=a.aoColumns[b].sTitle}else{var i=l.createElement("tr");b=0;for(d=a.aoColumns.length;b<d;b++)c=a.aoColumns[b].nTh,c.innerHTML=a.aoColumns[b].sTitle,
+c.setAttribute("tabindex","0"),null!==a.aoColumns[b].sClass&&h(c).addClass(a.aoColumns[b].sClass),i.appendChild(c);h(a.nTHead).html("")[0].appendChild(i);V(a.aoHeader,a.nTHead)}h(a.nTHead).children("tr").attr("role","row");if(a.bJUI){b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;i=l.createElement("div");i.className=a.oClasses.sSortJUIWrapper;h(c).contents().appendTo(i);var f=l.createElement("span");f.className=a.oClasses.sSortIcon;i.appendChild(f);c.appendChild(i)}}if(a.oFeatures.bSort)for(b=
+0;b<a.aoColumns.length;b++)!1!==a.aoColumns[b].bSortable?ia(a,a.aoColumns[b].nTh,b):h(a.aoColumns[b].nTh).addClass(a.oClasses.sSortableNone);""!==a.oClasses.sFooterTH&&h(a.nTFoot).children("tr").children("th").addClass(a.oClasses.sFooterTH);if(null!==a.nTFoot){c=N(a,null,a.aoFooter);b=0;for(d=a.aoColumns.length;b<d;b++)c[b]&&(a.aoColumns[b].nTf=c[b],a.aoColumns[b].sClass&&h(c[b]).addClass(a.aoColumns[b].sClass))}}function W(a,b,c){var d,i,f,g=[],e=[],h=a.aoColumns.length,j;c===n&&(c=!1);d=0;for(i=
+b.length;d<i;d++){g[d]=b[d].slice();g[d].nTr=b[d].nTr;for(f=h-1;0<=f;f--)!a.aoColumns[f].bVisible&&!c&&g[d].splice(f,1);e.push([])}d=0;for(i=g.length;d<i;d++){if(a=g[d].nTr)for(;f=a.firstChild;)a.removeChild(f);f=0;for(b=g[d].length;f<b;f++)if(j=h=1,e[d][f]===n){a.appendChild(g[d][f].cell);for(e[d][f]=1;g[d+h]!==n&&g[d][f].cell==g[d+h][f].cell;)e[d+h][f]=1,h++;for(;g[d][f+j]!==n&&g[d][f].cell==g[d][f+j].cell;){for(c=0;c<h;c++)e[d+c][f+j]=1;j++}g[d][f].cell.rowSpan=h;g[d][f].cell.colSpan=j}}}function x(a){var b=
+A(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==h.inArray(!1,b))E(a,!1);else{var c,d,b=[],i=0,f=a.asStripeClasses.length;c=a.aoOpenRows.length;a.bDrawing=!0;a.iInitDisplayStart!==n&&-1!=a.iInitDisplayStart&&(a._iDisplayStart=a.oFeatures.bServerSide?a.iInitDisplayStart:a.iInitDisplayStart>=a.fnRecordsDisplay()?0:a.iInitDisplayStart,a.iInitDisplayStart=-1,y(a));if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++;else if(a.oFeatures.bServerSide){if(!a.bDestroying&&!wa(a))return}else a.iDraw++;if(0!==a.aiDisplay.length){var g=
+a._iDisplayStart;d=a._iDisplayEnd;a.oFeatures.bServerSide&&(g=0,d=a.aoData.length);for(;g<d;g++){var e=a.aoData[a.aiDisplay[g]];null===e.nTr&&ea(a,a.aiDisplay[g]);var j=e.nTr;if(0!==f){var o=a.asStripeClasses[i%f];e._sRowStripe!=o&&(h(j).removeClass(e._sRowStripe).addClass(o),e._sRowStripe=o)}A(a,"aoRowCallback",null,[j,a.aoData[a.aiDisplay[g]]._aData,i,g]);b.push(j);i++;if(0!==c)for(e=0;e<c;e++)if(j==a.aoOpenRows[e].nParent){b.push(a.aoOpenRows[e].nTr);break}}}else b[0]=l.createElement("tr"),a.asStripeClasses[0]&&
+(b[0].className=a.asStripeClasses[0]),c=a.oLanguage,f=c.sZeroRecords,1==a.iDraw&&null!==a.sAjaxSource&&!a.oFeatures.bServerSide?f=c.sLoadingRecords:c.sEmptyTable&&0===a.fnRecordsTotal()&&(f=c.sEmptyTable),c=l.createElement("td"),c.setAttribute("valign","top"),c.colSpan=t(a),c.className=a.oClasses.sRowEmpty,c.innerHTML=ja(a,f),b[i].appendChild(c);A(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],Z(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay]);A(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],
+Z(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay]);i=l.createDocumentFragment();c=l.createDocumentFragment();if(a.nTBody){f=a.nTBody.parentNode;c.appendChild(a.nTBody);if(!a.oScroll.bInfinite||!a._bInitComplete||a.bSorted||a.bFiltered)for(;c=a.nTBody.firstChild;)a.nTBody.removeChild(c);c=0;for(d=b.length;c<d;c++)i.appendChild(b[c]);a.nTBody.appendChild(i);null!==f&&f.appendChild(a.nTBody)}A(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1;a.oFeatures.bServerSide&&(E(a,!1),
+a._bInitComplete||$(a))}}function aa(a){a.oFeatures.bSort?O(a,a.oPreviousSearch):a.oFeatures.bFilter?K(a,a.oPreviousSearch):(y(a),x(a))}function xa(a){var b=h("<div></div>")[0];a.nTable.parentNode.insertBefore(b,a.nTable);a.nTableWrapper=h('<div id="'+a.sTableId+'_wrapper" class="'+a.oClasses.sWrapper+'" role="grid"></div>')[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var c=a.nTableWrapper,d=a.sDom.split(""),i,f,g,e,w,o,k,m=0;m<d.length;m++){f=0;g=d[m];if("<"==g){e=h("<div></div>")[0];w=d[m+
+1];if("'"==w||'"'==w){o="";for(k=2;d[m+k]!=w;)o+=d[m+k],k++;"H"==o?o=a.oClasses.sJUIHeader:"F"==o&&(o=a.oClasses.sJUIFooter);-1!=o.indexOf(".")?(w=o.split("."),e.id=w[0].substr(1,w[0].length-1),e.className=w[1]):"#"==o.charAt(0)?e.id=o.substr(1,o.length-1):e.className=o;m+=k}c.appendChild(e);c=e}else if(">"==g)c=c.parentNode;else if("l"==g&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange)i=ya(a),f=1;else if("f"==g&&a.oFeatures.bFilter)i=za(a),f=1;else if("r"==g&&a.oFeatures.bProcessing)i=Aa(a),f=
+1;else if("t"==g)i=Ba(a),f=1;else if("i"==g&&a.oFeatures.bInfo)i=Ca(a),f=1;else if("p"==g&&a.oFeatures.bPaginate)i=Da(a),f=1;else if(0!==j.ext.aoFeatures.length){e=j.ext.aoFeatures;k=0;for(w=e.length;k<w;k++)if(g==e[k].cFeature){(i=e[k].fnInit(a))&&(f=1);break}}1==f&&null!==i&&("object"!==typeof a.aanFeatures[g]&&(a.aanFeatures[g]=[]),a.aanFeatures[g].push(i),c.appendChild(i))}b.parentNode.replaceChild(a.nTableWrapper,b)}function V(a,b){var c=h(b).children("tr"),d,i,f,g,e,j,o,k,m,p;a.splice(0,a.length);
+f=0;for(j=c.length;f<j;f++)a.push([]);f=0;for(j=c.length;f<j;f++){d=c[f];for(i=d.firstChild;i;){if("TD"==i.nodeName.toUpperCase()||"TH"==i.nodeName.toUpperCase()){k=1*i.getAttribute("colspan");m=1*i.getAttribute("rowspan");k=!k||0===k||1===k?1:k;m=!m||0===m||1===m?1:m;g=0;for(e=a[f];e[g];)g++;o=g;p=1===k?!0:!1;for(e=0;e<k;e++)for(g=0;g<m;g++)a[f+g][o+e]={cell:i,unique:p},a[f+g].nTr=d}i=i.nextSibling}}}function N(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],V(c,b)));for(var b=0,i=c.length;b<i;b++)for(var f=
+0,g=c[b].length;f<g;f++)if(c[b][f].unique&&(!d[f]||!a.bSortCellsTop))d[f]=c[b][f].cell;return d}function wa(a){if(a.bAjaxDataGet){a.iDraw++;E(a,!0);var b=Ea(a);ka(a,b);a.fnServerData.call(a.oInstance,a.sAjaxSource,b,function(b){Fa(a,b)},a);return!1}return!0}function Ea(a){var b=a.aoColumns.length,c=[],d,i,f,g;c.push({name:"sEcho",value:a.iDraw});c.push({name:"iColumns",value:b});c.push({name:"sColumns",value:M(a)});c.push({name:"iDisplayStart",value:a._iDisplayStart});c.push({name:"iDisplayLength",
+value:!1!==a.oFeatures.bPaginate?a._iDisplayLength:-1});for(f=0;f<b;f++)d=a.aoColumns[f].mData,c.push({name:"mDataProp_"+f,value:"function"===typeof d?"function":d});if(!1!==a.oFeatures.bFilter){c.push({name:"sSearch",value:a.oPreviousSearch.sSearch});c.push({name:"bRegex",value:a.oPreviousSearch.bRegex});for(f=0;f<b;f++)c.push({name:"sSearch_"+f,value:a.aoPreSearchCols[f].sSearch}),c.push({name:"bRegex_"+f,value:a.aoPreSearchCols[f].bRegex}),c.push({name:"bSearchable_"+f,value:a.aoColumns[f].bSearchable})}if(!1!==
+a.oFeatures.bSort){var e=0;d=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(f=0;f<d.length;f++){i=a.aoColumns[d[f][0]].aDataSort;for(g=0;g<i.length;g++)c.push({name:"iSortCol_"+e,value:i[g]}),c.push({name:"sSortDir_"+e,value:d[f][1]}),e++}c.push({name:"iSortingCols",value:e});for(f=0;f<b;f++)c.push({name:"bSortable_"+f,value:a.aoColumns[f].bSortable})}return c}function ka(a,b){A(a,"aoServerParams","serverParams",[b])}function Fa(a,b){if(b.sEcho!==n){if(1*b.sEcho<
+a.iDraw)return;a.iDraw=1*b.sEcho}(!a.oScroll.bInfinite||a.oScroll.bInfinite&&(a.bSorted||a.bFiltered))&&ga(a);a._iRecordsTotal=parseInt(b.iTotalRecords,10);a._iRecordsDisplay=parseInt(b.iTotalDisplayRecords,10);var c=M(a),c=b.sColumns!==n&&""!==c&&b.sColumns!=c,d;c&&(d=u(a,b.sColumns));for(var i=Q(a.sAjaxDataProp)(b),f=0,g=i.length;f<g;f++)if(c){for(var e=[],h=0,j=a.aoColumns.length;h<j;h++)e.push(i[f][d[h]]);H(a,e)}else H(a,i[f]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;x(a);a.bAjaxDataGet=
+!0;E(a,!1)}function za(a){var b=a.oPreviousSearch,c=a.oLanguage.sSearch,c=-1!==c.indexOf("_INPUT_")?c.replace("_INPUT_",'<input type="text" />'):""===c?'<input type="text" />':c+' <input type="text" />',d=l.createElement("div");d.className=a.oClasses.sFilter;d.innerHTML="<label>"+c+"</label>";a.aanFeatures.f||(d.id=a.sTableId+"_filter");c=h('input[type="text"]',d);d._DT_Input=c[0];c.val(b.sSearch.replace('"',"&quot;"));c.bind("keyup.DT",function(){for(var c=a.aanFeatures.f,d=this.value===""?"":this.value,
+g=0,e=c.length;g<e;g++)c[g]!=h(this).parents("div.dataTables_filter")[0]&&h(c[g]._DT_Input).val(d);d!=b.sSearch&&K(a,{sSearch:d,bRegex:b.bRegex,bSmart:b.bSmart,bCaseInsensitive:b.bCaseInsensitive})});c.attr("aria-controls",a.sTableId).bind("keypress.DT",function(a){if(a.keyCode==13)return false});return d}function K(a,b,c){var d=a.oPreviousSearch,i=a.aoPreSearchCols,f=function(a){d.sSearch=a.sSearch;d.bRegex=a.bRegex;d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};if(a.oFeatures.bServerSide)f(b);
+else{Ga(a,b.sSearch,c,b.bRegex,b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<a.aoPreSearchCols.length;b++)Ha(a,i[b].sSearch,b,i[b].bRegex,i[b].bSmart,i[b].bCaseInsensitive);Ia(a)}a.bFiltered=!0;h(a.oInstance).trigger("filter",a);a._iDisplayStart=0;y(a);x(a);la(a,0)}function Ia(a){for(var b=j.ext.afnFiltering,c=r(a,"bSearchable"),d=0,i=b.length;d<i;d++)for(var f=0,g=0,e=a.aiDisplay.length;g<e;g++){var h=a.aiDisplay[g-f];b[d](a,Y(a,h,"filter",c),h)||(a.aiDisplay.splice(g-f,1),f++)}}function Ha(a,b,c,
+d,i,f){if(""!==b)for(var g=0,b=ma(b,d,i,f),d=a.aiDisplay.length-1;0<=d;d--)i=Ja(v(a,a.aiDisplay[d],c,"filter"),a.aoColumns[c].sType),b.test(i)||(a.aiDisplay.splice(d,1),g++)}function Ga(a,b,c,d,i,f){d=ma(b,d,i,f);i=a.oPreviousSearch;c||(c=0);0!==j.ext.afnFiltering.length&&(c=1);if(0>=b.length)a.aiDisplay.splice(0,a.aiDisplay.length),a.aiDisplay=a.aiDisplayMaster.slice();else if(a.aiDisplay.length==a.aiDisplayMaster.length||i.sSearch.length>b.length||1==c||0!==b.indexOf(i.sSearch)){a.aiDisplay.splice(0,
+a.aiDisplay.length);la(a,1);for(b=0;b<a.aiDisplayMaster.length;b++)d.test(a.asDataSearch[b])&&a.aiDisplay.push(a.aiDisplayMaster[b])}else for(b=c=0;b<a.asDataSearch.length;b++)d.test(a.asDataSearch[b])||(a.aiDisplay.splice(b-c,1),c++)}function la(a,b){if(!a.oFeatures.bServerSide){a.asDataSearch=[];for(var c=r(a,"bSearchable"),d=1===b?a.aiDisplayMaster:a.aiDisplay,i=0,f=d.length;i<f;i++)a.asDataSearch[i]=na(a,Y(a,d[i],"filter",c))}}function na(a,b){var c=b.join(" ");-1!==c.indexOf("&")&&(c=h("<div>").html(c).text());
+return c.replace(/[\n\r]/g," ")}function ma(a,b,c,d){if(c)return a=b?a.split(" "):oa(a).split(" "),a="^(?=.*?"+a.join(")(?=.*?")+").*$",RegExp(a,d?"i":"");a=b?a:oa(a);return RegExp(a,d?"i":"")}function Ja(a,b){return"function"===typeof j.ext.ofnSearch[b]?j.ext.ofnSearch[b](a):null===a?"":"html"==b?a.replace(/[\r\n]/g," ").replace(/<.*?>/g,""):"string"===typeof a?a.replace(/[\r\n]/g," "):a}function oa(a){return a.replace(RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),
+"\\$1")}function Ca(a){var b=l.createElement("div");b.className=a.oClasses.sInfo;a.aanFeatures.i||(a.aoDrawCallback.push({fn:Ka,sName:"information"}),b.id=a.sTableId+"_info");a.nTable.setAttribute("aria-describedby",a.sTableId+"_info");return b}function Ka(a){if(a.oFeatures.bInfo&&0!==a.aanFeatures.i.length){var b=a.oLanguage,c=a._iDisplayStart+1,d=a.fnDisplayEnd(),i=a.fnRecordsTotal(),f=a.fnRecordsDisplay(),g;g=0===f?b.sInfoEmpty:b.sInfo;f!=i&&(g+=" "+b.sInfoFiltered);g+=b.sInfoPostFix;g=ja(a,g);
+null!==b.fnInfoCallback&&(g=b.fnInfoCallback.call(a.oInstance,a,c,d,i,f,g));a=a.aanFeatures.i;b=0;for(c=a.length;b<c;b++)h(a[b]).html(g)}}function ja(a,b){var c=a.fnFormatNumber(a._iDisplayStart+1),d=a.fnDisplayEnd(),d=a.fnFormatNumber(d),i=a.fnRecordsDisplay(),i=a.fnFormatNumber(i),f=a.fnRecordsTotal(),f=a.fnFormatNumber(f);a.oScroll.bInfinite&&(c=a.fnFormatNumber(1));return b.replace(/_START_/g,c).replace(/_END_/g,d).replace(/_TOTAL_/g,i).replace(/_MAX_/g,f)}function ba(a){var b,c,d=a.iInitDisplayStart;
+if(!1===a.bInitialised)setTimeout(function(){ba(a)},200);else{xa(a);va(a);W(a,a.aoHeader);a.nTFoot&&W(a,a.aoFooter);E(a,!0);a.oFeatures.bAutoWidth&&da(a);b=0;for(c=a.aoColumns.length;b<c;b++)null!==a.aoColumns[b].sWidth&&(a.aoColumns[b].nTh.style.width=q(a.aoColumns[b].sWidth));a.oFeatures.bSort?O(a):a.oFeatures.bFilter?K(a,a.oPreviousSearch):(a.aiDisplay=a.aiDisplayMaster.slice(),y(a),x(a));null!==a.sAjaxSource&&!a.oFeatures.bServerSide?(c=[],ka(a,c),a.fnServerData.call(a.oInstance,a.sAjaxSource,
+c,function(c){var f=a.sAjaxDataProp!==""?Q(a.sAjaxDataProp)(c):c;for(b=0;b<f.length;b++)H(a,f[b]);a.iInitDisplayStart=d;if(a.oFeatures.bSort)O(a);else{a.aiDisplay=a.aiDisplayMaster.slice();y(a);x(a)}E(a,false);$(a,c)},a)):a.oFeatures.bServerSide||(E(a,!1),$(a))}}function $(a,b){a._bInitComplete=!0;A(a,"aoInitComplete","init",[a,b])}function pa(a){var b=j.defaults.oLanguage;!a.sEmptyTable&&(a.sZeroRecords&&"No data available in table"===b.sEmptyTable)&&p(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&
+(a.sZeroRecords&&"Loading..."===b.sLoadingRecords)&&p(a,a,"sZeroRecords","sLoadingRecords")}function ya(a){if(a.oScroll.bInfinite)return null;var b='<select size="1" '+('name="'+a.sTableId+'_length"')+">",c,d,i=a.aLengthMenu;if(2==i.length&&"object"===typeof i[0]&&"object"===typeof i[1]){c=0;for(d=i[0].length;c<d;c++)b+='<option value="'+i[0][c]+'">'+i[1][c]+"</option>"}else{c=0;for(d=i.length;c<d;c++)b+='<option value="'+i[c]+'">'+i[c]+"</option>"}b+="</select>";i=l.createElement("div");a.aanFeatures.l||
+(i.id=a.sTableId+"_length");i.className=a.oClasses.sLength;i.innerHTML="<label>"+a.oLanguage.sLengthMenu.replace("_MENU_",b)+"</label>";h('select option[value="'+a._iDisplayLength+'"]',i).attr("selected",!0);h("select",i).bind("change.DT",function(){var b=h(this).val(),i=a.aanFeatures.l;c=0;for(d=i.length;c<d;c++)i[c]!=this.parentNode&&h("select",i[c]).val(b);a._iDisplayLength=parseInt(b,10);y(a);if(a.fnDisplayEnd()==a.fnRecordsDisplay()){a._iDisplayStart=a.fnDisplayEnd()-a._iDisplayLength;if(a._iDisplayStart<
+0)a._iDisplayStart=0}if(a._iDisplayLength==-1)a._iDisplayStart=0;x(a)});h("select",i).attr("aria-controls",a.sTableId);return i}function y(a){a._iDisplayEnd=!1===a.oFeatures.bPaginate?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength>a.aiDisplay.length||-1==a._iDisplayLength?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}function Da(a){if(a.oScroll.bInfinite)return null;var b=l.createElement("div");b.className=a.oClasses.sPaging+a.sPaginationType;j.ext.oPagination[a.sPaginationType].fnInit(a,
+b,function(a){y(a);x(a)});a.aanFeatures.p||a.aoDrawCallback.push({fn:function(a){j.ext.oPagination[a.sPaginationType].fnUpdate(a,function(a){y(a);x(a)})},sName:"pagination"});return b}function qa(a,b){var c=a._iDisplayStart;if("number"===typeof b)a._iDisplayStart=b*a._iDisplayLength,a._iDisplayStart>a.fnRecordsDisplay()&&(a._iDisplayStart=0);else if("first"==b)a._iDisplayStart=0;else if("previous"==b)a._iDisplayStart=0<=a._iDisplayLength?a._iDisplayStart-a._iDisplayLength:0,0>a._iDisplayStart&&(a._iDisplayStart=
+0);else if("next"==b)0<=a._iDisplayLength?a._iDisplayStart+a._iDisplayLength<a.fnRecordsDisplay()&&(a._iDisplayStart+=a._iDisplayLength):a._iDisplayStart=0;else if("last"==b)if(0<=a._iDisplayLength){var d=parseInt((a.fnRecordsDisplay()-1)/a._iDisplayLength,10)+1;a._iDisplayStart=(d-1)*a._iDisplayLength}else a._iDisplayStart=0;else D(a,0,"Unknown paging action: "+b);h(a.oInstance).trigger("page",a);return c!=a._iDisplayStart}function Aa(a){var b=l.createElement("div");a.aanFeatures.r||(b.id=a.sTableId+
+"_processing");b.innerHTML=a.oLanguage.sProcessing;b.className=a.oClasses.sProcessing;a.nTable.parentNode.insertBefore(b,a.nTable);return b}function E(a,b){if(a.oFeatures.bProcessing)for(var c=a.aanFeatures.r,d=0,i=c.length;d<i;d++)c[d].style.visibility=b?"visible":"hidden";h(a.oInstance).trigger("processing",[a,b])}function Ba(a){if(""===a.oScroll.sX&&""===a.oScroll.sY)return a.nTable;var b=l.createElement("div"),c=l.createElement("div"),d=l.createElement("div"),i=l.createElement("div"),f=l.createElement("div"),
+g=l.createElement("div"),e=a.nTable.cloneNode(!1),j=a.nTable.cloneNode(!1),o=a.nTable.getElementsByTagName("thead")[0],k=0===a.nTable.getElementsByTagName("tfoot").length?null:a.nTable.getElementsByTagName("tfoot")[0],m=a.oClasses;c.appendChild(d);f.appendChild(g);i.appendChild(a.nTable);b.appendChild(c);b.appendChild(i);d.appendChild(e);e.appendChild(o);null!==k&&(b.appendChild(f),g.appendChild(j),j.appendChild(k));b.className=m.sScrollWrapper;c.className=m.sScrollHead;d.className=m.sScrollHeadInner;
+i.className=m.sScrollBody;f.className=m.sScrollFoot;g.className=m.sScrollFootInner;a.oScroll.bAutoCss&&(c.style.overflow="hidden",c.style.position="relative",f.style.overflow="hidden",i.style.overflow="auto");c.style.border="0";c.style.width="100%";f.style.border="0";d.style.width=""!==a.oScroll.sXInner?a.oScroll.sXInner:"100%";e.removeAttribute("id");e.style.marginLeft="0";a.nTable.style.marginLeft="0";null!==k&&(j.removeAttribute("id"),j.style.marginLeft="0");d=h(a.nTable).children("caption");0<
+d.length&&(d=d[0],"top"===d._captionSide?e.appendChild(d):"bottom"===d._captionSide&&k&&j.appendChild(d));""!==a.oScroll.sX&&(c.style.width=q(a.oScroll.sX),i.style.width=q(a.oScroll.sX),null!==k&&(f.style.width=q(a.oScroll.sX)),h(i).scroll(function(){c.scrollLeft=this.scrollLeft;if(k!==null)f.scrollLeft=this.scrollLeft}));""!==a.oScroll.sY&&(i.style.height=q(a.oScroll.sY));a.aoDrawCallback.push({fn:La,sName:"scrolling"});a.oScroll.bInfinite&&h(i).scroll(function(){if(!a.bDrawing&&h(this).scrollTop()!==
+0&&h(this).scrollTop()+h(this).height()>h(a.nTable).height()-a.oScroll.iLoadGap&&a.fnDisplayEnd()<a.fnRecordsDisplay()){qa(a,"next");y(a);x(a)}});a.nScrollHead=c;a.nScrollFoot=f;return b}function La(a){var b=a.nScrollHead.getElementsByTagName("div")[0],c=b.getElementsByTagName("table")[0],d=a.nTable.parentNode,i,f,g,e,j,o,k,m,p=[],n=[],l=null!==a.nTFoot?a.nScrollFoot.getElementsByTagName("div")[0]:null,R=null!==a.nTFoot?l.getElementsByTagName("table")[0]:null,r=a.oBrowser.bScrollOversize,s=function(a){k=
+a.style;k.paddingTop="0";k.paddingBottom="0";k.borderTopWidth="0";k.borderBottomWidth="0";k.height=0};h(a.nTable).children("thead, tfoot").remove();i=h(a.nTHead).clone()[0];a.nTable.insertBefore(i,a.nTable.childNodes[0]);g=a.nTHead.getElementsByTagName("tr");e=i.getElementsByTagName("tr");null!==a.nTFoot&&(j=h(a.nTFoot).clone()[0],a.nTable.insertBefore(j,a.nTable.childNodes[1]),o=a.nTFoot.getElementsByTagName("tr"),j=j.getElementsByTagName("tr"));""===a.oScroll.sX&&(d.style.width="100%",b.parentNode.style.width=
+"100%");var t=N(a,i);i=0;for(f=t.length;i<f;i++)m=G(a,i),t[i].style.width=a.aoColumns[m].sWidth;null!==a.nTFoot&&C(function(a){a.style.width=""},j);a.oScroll.bCollapse&&""!==a.oScroll.sY&&(d.style.height=d.offsetHeight+a.nTHead.offsetHeight+"px");i=h(a.nTable).outerWidth();if(""===a.oScroll.sX){if(a.nTable.style.width="100%",r&&(h("tbody",d).height()>d.offsetHeight||"scroll"==h(d).css("overflow-y")))a.nTable.style.width=q(h(a.nTable).outerWidth()-a.oScroll.iBarWidth)}else""!==a.oScroll.sXInner?a.nTable.style.width=
+q(a.oScroll.sXInner):i==h(d).width()&&h(d).height()<h(a.nTable).height()?(a.nTable.style.width=q(i-a.oScroll.iBarWidth),h(a.nTable).outerWidth()>i-a.oScroll.iBarWidth&&(a.nTable.style.width=q(i))):a.nTable.style.width=q(i);i=h(a.nTable).outerWidth();C(s,e);C(function(a){p.push(q(h(a).width()))},e);C(function(a,b){a.style.width=p[b]},g);h(e).height(0);null!==a.nTFoot&&(C(s,j),C(function(a){n.push(q(h(a).width()))},j),C(function(a,b){a.style.width=n[b]},o),h(j).height(0));C(function(a,b){a.innerHTML=
+"";a.style.width=p[b]},e);null!==a.nTFoot&&C(function(a,b){a.innerHTML="";a.style.width=n[b]},j);if(h(a.nTable).outerWidth()<i){g=d.scrollHeight>d.offsetHeight||"scroll"==h(d).css("overflow-y")?i+a.oScroll.iBarWidth:i;if(r&&(d.scrollHeight>d.offsetHeight||"scroll"==h(d).css("overflow-y")))a.nTable.style.width=q(g-a.oScroll.iBarWidth);d.style.width=q(g);a.nScrollHead.style.width=q(g);null!==a.nTFoot&&(a.nScrollFoot.style.width=q(g));""===a.oScroll.sX?D(a,1,"The table cannot fit into the current element which will cause column misalignment. The table has been drawn at its minimum possible width."):
+""!==a.oScroll.sXInner&&D(a,1,"The table cannot fit into the current element which will cause column misalignment. Increase the sScrollXInner value or remove it to allow automatic calculation")}else d.style.width=q("100%"),a.nScrollHead.style.width=q("100%"),null!==a.nTFoot&&(a.nScrollFoot.style.width=q("100%"));""===a.oScroll.sY&&r&&(d.style.height=q(a.nTable.offsetHeight+a.oScroll.iBarWidth));""!==a.oScroll.sY&&a.oScroll.bCollapse&&(d.style.height=q(a.oScroll.sY),r=""!==a.oScroll.sX&&a.nTable.offsetWidth>
+d.offsetWidth?a.oScroll.iBarWidth:0,a.nTable.offsetHeight<d.offsetHeight&&(d.style.height=q(a.nTable.offsetHeight+r)));r=h(a.nTable).outerWidth();c.style.width=q(r);b.style.width=q(r);c=h(a.nTable).height()>d.clientHeight||"scroll"==h(d).css("overflow-y");b.style.paddingRight=c?a.oScroll.iBarWidth+"px":"0px";null!==a.nTFoot&&(R.style.width=q(r),l.style.width=q(r),l.style.paddingRight=c?a.oScroll.iBarWidth+"px":"0px");h(d).scroll();if(a.bSorted||a.bFiltered)d.scrollTop=0}function C(a,b,c){for(var d=
+0,i=0,f=b.length,g,e;i<f;){g=b[i].firstChild;for(e=c?c[i].firstChild:null;g;)1===g.nodeType&&(c?a(g,e,d):a(g,d),d++),g=g.nextSibling,e=c?e.nextSibling:null;i++}}function Ma(a,b){if(!a||null===a||""===a)return 0;b||(b=l.body);var c,d=l.createElement("div");d.style.width=q(a);b.appendChild(d);c=d.offsetWidth;b.removeChild(d);return c}function da(a){var b=0,c,d=0,i=a.aoColumns.length,f,e,j=h("th",a.nTHead),o=a.nTable.getAttribute("width");e=a.nTable.parentNode;for(f=0;f<i;f++)a.aoColumns[f].bVisible&&
+(d++,null!==a.aoColumns[f].sWidth&&(c=Ma(a.aoColumns[f].sWidthOrig,e),null!==c&&(a.aoColumns[f].sWidth=q(c)),b++));if(i==j.length&&0===b&&d==i&&""===a.oScroll.sX&&""===a.oScroll.sY)for(f=0;f<a.aoColumns.length;f++)c=h(j[f]).width(),null!==c&&(a.aoColumns[f].sWidth=q(c));else{b=a.nTable.cloneNode(!1);f=a.nTHead.cloneNode(!0);d=l.createElement("tbody");c=l.createElement("tr");b.removeAttribute("id");b.appendChild(f);null!==a.nTFoot&&(b.appendChild(a.nTFoot.cloneNode(!0)),C(function(a){a.style.width=
+""},b.getElementsByTagName("tr")));b.appendChild(d);d.appendChild(c);d=h("thead th",b);0===d.length&&(d=h("tbody tr:eq(0)>td",b));j=N(a,f);for(f=d=0;f<i;f++){var k=a.aoColumns[f];k.bVisible&&null!==k.sWidthOrig&&""!==k.sWidthOrig?j[f-d].style.width=q(k.sWidthOrig):k.bVisible?j[f-d].style.width="":d++}for(f=0;f<i;f++)a.aoColumns[f].bVisible&&(d=Na(a,f),null!==d&&(d=d.cloneNode(!0),""!==a.aoColumns[f].sContentPadding&&(d.innerHTML+=a.aoColumns[f].sContentPadding),c.appendChild(d)));e.appendChild(b);
+""!==a.oScroll.sX&&""!==a.oScroll.sXInner?b.style.width=q(a.oScroll.sXInner):""!==a.oScroll.sX?(b.style.width="",h(b).width()<e.offsetWidth&&(b.style.width=q(e.offsetWidth))):""!==a.oScroll.sY?b.style.width=q(e.offsetWidth):o&&(b.style.width=q(o));b.style.visibility="hidden";Oa(a,b);i=h("tbody tr:eq(0)",b).children();0===i.length&&(i=N(a,h("thead",b)[0]));if(""!==a.oScroll.sX){for(f=d=e=0;f<a.aoColumns.length;f++)a.aoColumns[f].bVisible&&(e=null===a.aoColumns[f].sWidthOrig?e+h(i[d]).outerWidth():
+e+(parseInt(a.aoColumns[f].sWidth.replace("px",""),10)+(h(i[d]).outerWidth()-h(i[d]).width())),d++);b.style.width=q(e);a.nTable.style.width=q(e)}for(f=d=0;f<a.aoColumns.length;f++)a.aoColumns[f].bVisible&&(e=h(i[d]).width(),null!==e&&0<e&&(a.aoColumns[f].sWidth=q(e)),d++);i=h(b).css("width");a.nTable.style.width=-1!==i.indexOf("%")?i:q(h(b).outerWidth());b.parentNode.removeChild(b)}o&&(a.nTable.style.width=q(o))}function Oa(a,b){""===a.oScroll.sX&&""!==a.oScroll.sY?(h(b).width(),b.style.width=q(h(b).outerWidth()-
+a.oScroll.iBarWidth)):""!==a.oScroll.sX&&(b.style.width=q(h(b).outerWidth()))}function Na(a,b){var c=Pa(a,b);if(0>c)return null;if(null===a.aoData[c].nTr){var d=l.createElement("td");d.innerHTML=v(a,c,b,"");return d}return J(a,c)[b]}function Pa(a,b){for(var c=-1,d=-1,i=0;i<a.aoData.length;i++){var e=v(a,i,b,"display")+"",e=e.replace(/<.*?>/g,"");e.length>c&&(c=e.length,d=i)}return d}function q(a){if(null===a)return"0px";if("number"==typeof a)return 0>a?"0px":a+"px";var b=a.charCodeAt(a.length-1);
+return 48>b||57<b?a:a+"px"}function Qa(){var a=l.createElement("p"),b=a.style;b.width="100%";b.height="200px";b.padding="0px";var c=l.createElement("div"),b=c.style;b.position="absolute";b.top="0px";b.left="0px";b.visibility="hidden";b.width="200px";b.height="150px";b.padding="0px";b.overflow="hidden";c.appendChild(a);l.body.appendChild(c);b=a.offsetWidth;c.style.overflow="scroll";a=a.offsetWidth;b==a&&(a=c.clientWidth);l.body.removeChild(c);return b-a}function O(a,b){var c,d,i,e,g,k,o=[],m=[],p=
+j.ext.oSort,l=a.aoData,q=a.aoColumns,G=a.oLanguage.oAria;if(!a.oFeatures.bServerSide&&(0!==a.aaSorting.length||null!==a.aaSortingFixed)){o=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(c=0;c<o.length;c++)if(d=o[c][0],i=R(a,d),e=a.aoColumns[d].sSortDataType,j.ext.afnSortData[e])if(g=j.ext.afnSortData[e].call(a.oInstance,a,d,i),g.length===l.length){i=0;for(e=l.length;i<e;i++)F(a,i,d,g[i])}else D(a,0,"Returned data sort array (col "+d+") is the wrong length");c=
+0;for(d=a.aiDisplayMaster.length;c<d;c++)m[a.aiDisplayMaster[c]]=c;var r=o.length,s;c=0;for(d=l.length;c<d;c++)for(i=0;i<r;i++){s=q[o[i][0]].aDataSort;g=0;for(k=s.length;g<k;g++)e=q[s[g]].sType,e=p[(e?e:"string")+"-pre"],l[c]._aSortData[s[g]]=e?e(v(a,c,s[g],"sort")):v(a,c,s[g],"sort")}a.aiDisplayMaster.sort(function(a,b){var c,d,e,i,f;for(c=0;c<r;c++){f=q[o[c][0]].aDataSort;d=0;for(e=f.length;d<e;d++)if(i=q[f[d]].sType,i=p[(i?i:"string")+"-"+o[c][1]](l[a]._aSortData[f[d]],l[b]._aSortData[f[d]]),0!==
+i)return i}return p["numeric-asc"](m[a],m[b])})}(b===n||b)&&!a.oFeatures.bDeferRender&&P(a);c=0;for(d=a.aoColumns.length;c<d;c++)e=q[c].sTitle.replace(/<.*?>/g,""),i=q[c].nTh,i.removeAttribute("aria-sort"),i.removeAttribute("aria-label"),q[c].bSortable?0<o.length&&o[0][0]==c?(i.setAttribute("aria-sort","asc"==o[0][1]?"ascending":"descending"),i.setAttribute("aria-label",e+("asc"==(q[c].asSorting[o[0][2]+1]?q[c].asSorting[o[0][2]+1]:q[c].asSorting[0])?G.sSortAscending:G.sSortDescending))):i.setAttribute("aria-label",
+e+("asc"==q[c].asSorting[0]?G.sSortAscending:G.sSortDescending)):i.setAttribute("aria-label",e);a.bSorted=!0;h(a.oInstance).trigger("sort",a);a.oFeatures.bFilter?K(a,a.oPreviousSearch,1):(a.aiDisplay=a.aiDisplayMaster.slice(),a._iDisplayStart=0,y(a),x(a))}function ia(a,b,c,d){Ra(b,{},function(b){if(!1!==a.aoColumns[c].bSortable){var e=function(){var d,e;if(b.shiftKey){for(var f=!1,h=0;h<a.aaSorting.length;h++)if(a.aaSorting[h][0]==c){f=!0;d=a.aaSorting[h][0];e=a.aaSorting[h][2]+1;a.aoColumns[d].asSorting[e]?
+(a.aaSorting[h][1]=a.aoColumns[d].asSorting[e],a.aaSorting[h][2]=e):a.aaSorting.splice(h,1);break}!1===f&&a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0])}else 1==a.aaSorting.length&&a.aaSorting[0][0]==c?(d=a.aaSorting[0][0],e=a.aaSorting[0][2]+1,a.aoColumns[d].asSorting[e]||(e=0),a.aaSorting[0][1]=a.aoColumns[d].asSorting[e],a.aaSorting[0][2]=e):(a.aaSorting.splice(0,a.aaSorting.length),a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0]));O(a)};a.oFeatures.bProcessing?(E(a,!0),setTimeout(function(){e();
+a.oFeatures.bServerSide||E(a,!1)},0)):e();"function"==typeof d&&d(a)}})}function P(a){var b,c,d,e,f,g=a.aoColumns.length,j=a.oClasses;for(b=0;b<g;b++)a.aoColumns[b].bSortable&&h(a.aoColumns[b].nTh).removeClass(j.sSortAsc+" "+j.sSortDesc+" "+a.aoColumns[b].sSortingClass);c=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable){f=a.aoColumns[b].sSortingClass;e=-1;for(d=0;d<c.length;d++)if(c[d][0]==b){f="asc"==c[d][1]?
+j.sSortAsc:j.sSortDesc;e=d;break}h(a.aoColumns[b].nTh).addClass(f);a.bJUI&&(f=h("span."+j.sSortIcon,a.aoColumns[b].nTh),f.removeClass(j.sSortJUIAsc+" "+j.sSortJUIDesc+" "+j.sSortJUI+" "+j.sSortJUIAscAllowed+" "+j.sSortJUIDescAllowed),f.addClass(-1==e?a.aoColumns[b].sSortingClassJUI:"asc"==c[e][1]?j.sSortJUIAsc:j.sSortJUIDesc))}else h(a.aoColumns[b].nTh).addClass(a.aoColumns[b].sSortingClass);f=j.sSortColumn;if(a.oFeatures.bSort&&a.oFeatures.bSortClasses){a=J(a);e=[];for(b=0;b<g;b++)e.push("");b=0;
+for(d=1;b<c.length;b++)j=parseInt(c[b][0],10),e[j]=f+d,3>d&&d++;f=RegExp(f+"[123]");var o;b=0;for(c=a.length;b<c;b++)j=b%g,d=a[b].className,o=e[j],j=d.replace(f,o),j!=d?a[b].className=h.trim(j):0<o.length&&-1==d.indexOf(o)&&(a[b].className=d+" "+o)}}function ra(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b,c;b=a.oScroll.bInfinite;var d={iCreate:(new Date).getTime(),iStart:b?0:a._iDisplayStart,iEnd:b?a._iDisplayLength:a._iDisplayEnd,iLength:a._iDisplayLength,aaSorting:h.extend(!0,[],a.aaSorting),
+oSearch:h.extend(!0,{},a.oPreviousSearch),aoSearchCols:h.extend(!0,[],a.aoPreSearchCols),abVisCols:[]};b=0;for(c=a.aoColumns.length;b<c;b++)d.abVisCols.push(a.aoColumns[b].bVisible);A(a,"aoStateSaveParams","stateSaveParams",[a,d]);a.fnStateSave.call(a.oInstance,a,d)}}function Sa(a,b){if(a.oFeatures.bStateSave){var c=a.fnStateLoad.call(a.oInstance,a);if(c){var d=A(a,"aoStateLoadParams","stateLoadParams",[a,c]);if(-1===h.inArray(!1,d)){a.oLoadedState=h.extend(!0,{},c);a._iDisplayStart=c.iStart;a.iInitDisplayStart=
+c.iStart;a._iDisplayEnd=c.iEnd;a._iDisplayLength=c.iLength;a.aaSorting=c.aaSorting.slice();a.saved_aaSorting=c.aaSorting.slice();h.extend(a.oPreviousSearch,c.oSearch);h.extend(!0,a.aoPreSearchCols,c.aoSearchCols);b.saved_aoColumns=[];for(d=0;d<c.abVisCols.length;d++)b.saved_aoColumns[d]={},b.saved_aoColumns[d].bVisible=c.abVisCols[d];A(a,"aoStateLoaded","stateLoaded",[a,c])}}}}function s(a){for(var b=0;b<j.settings.length;b++)if(j.settings[b].nTable===a)return j.settings[b];return null}function T(a){for(var b=
+[],a=a.aoData,c=0,d=a.length;c<d;c++)null!==a[c].nTr&&b.push(a[c].nTr);return b}function J(a,b){var c=[],d,e,f,g,h,j;e=0;var o=a.aoData.length;b!==n&&(e=b,o=b+1);for(f=e;f<o;f++)if(j=a.aoData[f],null!==j.nTr){e=[];for(d=j.nTr.firstChild;d;)g=d.nodeName.toLowerCase(),("td"==g||"th"==g)&&e.push(d),d=d.nextSibling;g=d=0;for(h=a.aoColumns.length;g<h;g++)a.aoColumns[g].bVisible?c.push(e[g-d]):(c.push(j._anHidden[g]),d++)}return c}function D(a,b,c){a=null===a?"DataTables warning: "+c:"DataTables warning (table id = '"+
+a.sTableId+"'): "+c;if(0===b)if("alert"==j.ext.sErrMode)alert(a);else throw Error(a);else X.console&&console.log&&console.log(a)}function p(a,b,c,d){d===n&&(d=c);b[c]!==n&&(a[d]=b[c])}function Ta(a,b){var c,d;for(d in b)b.hasOwnProperty(d)&&(c=b[d],"object"===typeof e[d]&&null!==c&&!1===h.isArray(c)?h.extend(!0,a[d],c):a[d]=c);return a}function Ra(a,b,c){h(a).bind("click.DT",b,function(b){a.blur();c(b)}).bind("keypress.DT",b,function(a){13===a.which&&c(a)}).bind("selectstart.DT",function(){return!1})}
+function z(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function A(a,b,c,d){for(var b=a[b],e=[],f=b.length-1;0<=f;f--)e.push(b[f].fn.apply(a.oInstance,d));null!==c&&h(a.oInstance).trigger(c,d);return e}function Ua(a){var b=h('<div style="position:absolute; top:0; left:0; height:1px; width:1px; overflow:hidden"><div style="position:absolute; top:1px; left:1px; width:100px; overflow:scroll;"><div id="DT_BrowserTest" style="width:100%; height:10px;"></div></div></div>')[0];l.body.appendChild(b);a.oBrowser.bScrollOversize=
+100===h("#DT_BrowserTest",b)[0].offsetWidth?!0:!1;l.body.removeChild(b)}function Va(a){return function(){var b=[s(this[j.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return j.ext.oApi[a].apply(this,b)}}var U=/\[.*?\]$/,Wa=X.JSON?JSON.stringify:function(a){var b=typeof a;if("object"!==b||null===a)return"string"===b&&(a='"'+a+'"'),a+"";var c,d,e=[],f=h.isArray(a);for(c in a)d=a[c],b=typeof d,"string"===b?d='"'+d+'"':"object"===b&&null!==d&&(d=Wa(d)),e.push((f?"":'"'+c+'":')+d);return(f?
+"[":"{")+e+(f?"]":"}")};this.$=function(a,b){var c,d,e=[],f;d=s(this[j.ext.iApiIndex]);var g=d.aoData,o=d.aiDisplay,k=d.aiDisplayMaster;b||(b={});b=h.extend({},{filter:"none",order:"current",page:"all"},b);if("current"==b.page){c=d._iDisplayStart;for(d=d.fnDisplayEnd();c<d;c++)(f=g[o[c]].nTr)&&e.push(f)}else if("current"==b.order&&"none"==b.filter){c=0;for(d=k.length;c<d;c++)(f=g[k[c]].nTr)&&e.push(f)}else if("current"==b.order&&"applied"==b.filter){c=0;for(d=o.length;c<d;c++)(f=g[o[c]].nTr)&&e.push(f)}else if("original"==
+b.order&&"none"==b.filter){c=0;for(d=g.length;c<d;c++)(f=g[c].nTr)&&e.push(f)}else if("original"==b.order&&"applied"==b.filter){c=0;for(d=g.length;c<d;c++)f=g[c].nTr,-1!==h.inArray(c,o)&&f&&e.push(f)}else D(d,1,"Unknown selection options");e=h(e);c=e.filter(a);e=e.find(a);return h([].concat(h.makeArray(c),h.makeArray(e)))};this._=function(a,b){var c=[],d,e,f=this.$(a,b);d=0;for(e=f.length;d<e;d++)c.push(this.fnGetData(f[d]));return c};this.fnAddData=function(a,b){if(0===a.length)return[];var c=[],
+d,e=s(this[j.ext.iApiIndex]);if("object"===typeof a[0]&&null!==a[0])for(var f=0;f<a.length;f++){d=H(e,a[f]);if(-1==d)return c;c.push(d)}else{d=H(e,a);if(-1==d)return c;c.push(d)}e.aiDisplay=e.aiDisplayMaster.slice();(b===n||b)&&aa(e);return c};this.fnAdjustColumnSizing=function(a){var b=s(this[j.ext.iApiIndex]);k(b);a===n||a?this.fnDraw(!1):(""!==b.oScroll.sX||""!==b.oScroll.sY)&&this.oApi._fnScrollDraw(b)};this.fnClearTable=function(a){var b=s(this[j.ext.iApiIndex]);ga(b);(a===n||a)&&x(b)};this.fnClose=
+function(a){for(var b=s(this[j.ext.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a)return(a=b.aoOpenRows[c].nTr.parentNode)&&a.removeChild(b.aoOpenRows[c].nTr),b.aoOpenRows.splice(c,1),0;return 1};this.fnDeleteRow=function(a,b,c){var d=s(this[j.ext.iApiIndex]),e,f,a="object"===typeof a?I(d,a):a,g=d.aoData.splice(a,1);e=0;for(f=d.aoData.length;e<f;e++)null!==d.aoData[e].nTr&&(d.aoData[e].nTr._DT_RowIndex=e);e=h.inArray(a,d.aiDisplay);d.asDataSearch.splice(e,1);ha(d.aiDisplayMaster,
+a);ha(d.aiDisplay,a);"function"===typeof b&&b.call(this,d,g);d._iDisplayStart>=d.fnRecordsDisplay()&&(d._iDisplayStart-=d._iDisplayLength,0>d._iDisplayStart&&(d._iDisplayStart=0));if(c===n||c)y(d),x(d);return g};this.fnDestroy=function(a){var b=s(this[j.ext.iApiIndex]),c=b.nTableWrapper.parentNode,d=b.nTBody,i,f,a=a===n?!1:a;b.bDestroying=!0;A(b,"aoDestroyCallback","destroy",[b]);if(!a){i=0;for(f=b.aoColumns.length;i<f;i++)!1===b.aoColumns[i].bVisible&&this.fnSetColumnVis(i,!0)}h(b.nTableWrapper).find("*").andSelf().unbind(".DT");
+h("tbody>tr>td."+b.oClasses.sRowEmpty,b.nTable).parent().remove();b.nTable!=b.nTHead.parentNode&&(h(b.nTable).children("thead").remove(),b.nTable.appendChild(b.nTHead));b.nTFoot&&b.nTable!=b.nTFoot.parentNode&&(h(b.nTable).children("tfoot").remove(),b.nTable.appendChild(b.nTFoot));b.nTable.parentNode.removeChild(b.nTable);h(b.nTableWrapper).remove();b.aaSorting=[];b.aaSortingFixed=[];P(b);h(T(b)).removeClass(b.asStripeClasses.join(" "));h("th, td",b.nTHead).removeClass([b.oClasses.sSortable,b.oClasses.sSortableAsc,
+b.oClasses.sSortableDesc,b.oClasses.sSortableNone].join(" "));b.bJUI&&(h("th span."+b.oClasses.sSortIcon+", td span."+b.oClasses.sSortIcon,b.nTHead).remove(),h("th, td",b.nTHead).each(function(){var a=h("div."+b.oClasses.sSortJUIWrapper,this),c=a.contents();h(this).append(c);a.remove()}));!a&&b.nTableReinsertBefore?c.insertBefore(b.nTable,b.nTableReinsertBefore):a||c.appendChild(b.nTable);i=0;for(f=b.aoData.length;i<f;i++)null!==b.aoData[i].nTr&&d.appendChild(b.aoData[i].nTr);!0===b.oFeatures.bAutoWidth&&
+(b.nTable.style.width=q(b.sDestroyWidth));if(f=b.asDestroyStripes.length){a=h(d).children("tr");for(i=0;i<f;i++)a.filter(":nth-child("+f+"n + "+i+")").addClass(b.asDestroyStripes[i])}i=0;for(f=j.settings.length;i<f;i++)j.settings[i]==b&&j.settings.splice(i,1);e=b=null};this.fnDraw=function(a){var b=s(this[j.ext.iApiIndex]);!1===a?(y(b),x(b)):aa(b)};this.fnFilter=function(a,b,c,d,e,f){var g=s(this[j.ext.iApiIndex]);if(g.oFeatures.bFilter){if(c===n||null===c)c=!1;if(d===n||null===d)d=!0;if(e===n||null===
+e)e=!0;if(f===n||null===f)f=!0;if(b===n||null===b){if(K(g,{sSearch:a+"",bRegex:c,bSmart:d,bCaseInsensitive:f},1),e&&g.aanFeatures.f){b=g.aanFeatures.f;c=0;for(d=b.length;c<d;c++)try{b[c]._DT_Input!=l.activeElement&&h(b[c]._DT_Input).val(a)}catch(o){h(b[c]._DT_Input).val(a)}}}else h.extend(g.aoPreSearchCols[b],{sSearch:a+"",bRegex:c,bSmart:d,bCaseInsensitive:f}),K(g,g.oPreviousSearch,1)}};this.fnGetData=function(a,b){var c=s(this[j.ext.iApiIndex]);if(a!==n){var d=a;if("object"===typeof a){var e=a.nodeName.toLowerCase();
+"tr"===e?d=I(c,a):"td"===e&&(d=I(c,a.parentNode),b=fa(c,d,a))}return b!==n?v(c,d,b,""):c.aoData[d]!==n?c.aoData[d]._aData:null}return Z(c)};this.fnGetNodes=function(a){var b=s(this[j.ext.iApiIndex]);return a!==n?b.aoData[a]!==n?b.aoData[a].nTr:null:T(b)};this.fnGetPosition=function(a){var b=s(this[j.ext.iApiIndex]),c=a.nodeName.toUpperCase();return"TR"==c?I(b,a):"TD"==c||"TH"==c?(c=I(b,a.parentNode),a=fa(b,c,a),[c,R(b,a),a]):null};this.fnIsOpen=function(a){for(var b=s(this[j.ext.iApiIndex]),c=0;c<
+b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a)return!0;return!1};this.fnOpen=function(a,b,c){var d=s(this[j.ext.iApiIndex]),e=T(d);if(-1!==h.inArray(a,e)){this.fnClose(a);var e=l.createElement("tr"),f=l.createElement("td");e.appendChild(f);f.className=c;f.colSpan=t(d);"string"===typeof b?f.innerHTML=b:h(f).html(b);b=h("tr",d.nTBody);-1!=h.inArray(a,b)&&h(e).insertAfter(a);d.aoOpenRows.push({nTr:e,nParent:a});return e}};this.fnPageChange=function(a,b){var c=s(this[j.ext.iApiIndex]);qa(c,a);
+y(c);(b===n||b)&&x(c)};this.fnSetColumnVis=function(a,b,c){var d=s(this[j.ext.iApiIndex]),e,f,g=d.aoColumns,h=d.aoData,o,m;if(g[a].bVisible!=b){if(b){for(e=f=0;e<a;e++)g[e].bVisible&&f++;m=f>=t(d);if(!m)for(e=a;e<g.length;e++)if(g[e].bVisible){o=e;break}e=0;for(f=h.length;e<f;e++)null!==h[e].nTr&&(m?h[e].nTr.appendChild(h[e]._anHidden[a]):h[e].nTr.insertBefore(h[e]._anHidden[a],J(d,e)[o]))}else{e=0;for(f=h.length;e<f;e++)null!==h[e].nTr&&(o=J(d,e)[a],h[e]._anHidden[a]=o,o.parentNode.removeChild(o))}g[a].bVisible=
+b;W(d,d.aoHeader);d.nTFoot&&W(d,d.aoFooter);e=0;for(f=d.aoOpenRows.length;e<f;e++)d.aoOpenRows[e].nTr.colSpan=t(d);if(c===n||c)k(d),x(d);ra(d)}};this.fnSettings=function(){return s(this[j.ext.iApiIndex])};this.fnSort=function(a){var b=s(this[j.ext.iApiIndex]);b.aaSorting=a;O(b)};this.fnSortListener=function(a,b,c){ia(s(this[j.ext.iApiIndex]),a,b,c)};this.fnUpdate=function(a,b,c,d,e){var f=s(this[j.ext.iApiIndex]),b="object"===typeof b?I(f,b):b;if(h.isArray(a)&&c===n){f.aoData[b]._aData=a.slice();
+for(c=0;c<f.aoColumns.length;c++)this.fnUpdate(v(f,b,c),b,c,!1,!1)}else if(h.isPlainObject(a)&&c===n){f.aoData[b]._aData=h.extend(!0,{},a);for(c=0;c<f.aoColumns.length;c++)this.fnUpdate(v(f,b,c),b,c,!1,!1)}else{F(f,b,c,a);var a=v(f,b,c,"display"),g=f.aoColumns[c];null!==g.fnRender&&(a=S(f,b,c),g.bUseRendered&&F(f,b,c,a));null!==f.aoData[b].nTr&&(J(f,b)[c].innerHTML=a)}c=h.inArray(b,f.aiDisplay);f.asDataSearch[c]=na(f,Y(f,b,"filter",r(f,"bSearchable")));(e===n||e)&&k(f);(d===n||d)&&aa(f);return 0};
+this.fnVersionCheck=j.ext.fnVersionCheck;this.oApi={_fnExternApiFunc:Va,_fnInitialise:ba,_fnInitComplete:$,_fnLanguageCompat:pa,_fnAddColumn:o,_fnColumnOptions:m,_fnAddData:H,_fnCreateTr:ea,_fnGatherData:ua,_fnBuildHead:va,_fnDrawHead:W,_fnDraw:x,_fnReDraw:aa,_fnAjaxUpdate:wa,_fnAjaxParameters:Ea,_fnAjaxUpdateDraw:Fa,_fnServerParams:ka,_fnAddOptionsHtml:xa,_fnFeatureHtmlTable:Ba,_fnScrollDraw:La,_fnAdjustColumnSizing:k,_fnFeatureHtmlFilter:za,_fnFilterComplete:K,_fnFilterCustom:Ia,_fnFilterColumn:Ha,
+_fnFilter:Ga,_fnBuildSearchArray:la,_fnBuildSearchRow:na,_fnFilterCreateSearch:ma,_fnDataToSearch:Ja,_fnSort:O,_fnSortAttachListener:ia,_fnSortingClasses:P,_fnFeatureHtmlPaginate:Da,_fnPageChange:qa,_fnFeatureHtmlInfo:Ca,_fnUpdateInfo:Ka,_fnFeatureHtmlLength:ya,_fnFeatureHtmlProcessing:Aa,_fnProcessingDisplay:E,_fnVisibleToColumnIndex:G,_fnColumnIndexToVisible:R,_fnNodeToDataIndex:I,_fnVisbleColumns:t,_fnCalculateEnd:y,_fnConvertToWidth:Ma,_fnCalculateColumnWidths:da,_fnScrollingWidthAdjust:Oa,_fnGetWidestNode:Na,
+_fnGetMaxLenString:Pa,_fnStringToCss:q,_fnDetectType:B,_fnSettingsFromNode:s,_fnGetDataMaster:Z,_fnGetTrNodes:T,_fnGetTdNodes:J,_fnEscapeRegex:oa,_fnDeleteIndex:ha,_fnReOrderIndex:u,_fnColumnOrdering:M,_fnLog:D,_fnClearTable:ga,_fnSaveState:ra,_fnLoadState:Sa,_fnCreateCookie:function(a,b,c,d,e){var f=new Date;f.setTime(f.getTime()+1E3*c);var c=X.location.pathname.split("/"),a=a+"_"+c.pop().replace(/[\/:]/g,"").toLowerCase(),g;null!==e?(g="function"===typeof h.parseJSON?h.parseJSON(b):eval("("+b+")"),
+b=e(a,g,f.toGMTString(),c.join("/")+"/")):b=a+"="+encodeURIComponent(b)+"; expires="+f.toGMTString()+"; path="+c.join("/")+"/";a=l.cookie.split(";");e=b.split(";")[0].length;f=[];if(4096<e+l.cookie.length+10){for(var j=0,o=a.length;j<o;j++)if(-1!=a[j].indexOf(d)){var k=a[j].split("=");try{(g=eval("("+decodeURIComponent(k[1])+")"))&&g.iCreate&&f.push({name:k[0],time:g.iCreate})}catch(m){}}for(f.sort(function(a,b){return b.time-a.time});4096<e+l.cookie.length+10;){if(0===f.length)return;d=f.pop();l.cookie=
+d.name+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+c.join("/")+"/"}}l.cookie=b},_fnReadCookie:function(a){for(var b=X.location.pathname.split("/"),a=a+"_"+b[b.length-1].replace(/[\/:]/g,"").toLowerCase()+"=",b=l.cookie.split(";"),c=0;c<b.length;c++){for(var d=b[c];" "==d.charAt(0);)d=d.substring(1,d.length);if(0===d.indexOf(a))return decodeURIComponent(d.substring(a.length,d.length))}return null},_fnDetectHeader:V,_fnGetUniqueThs:N,_fnScrollBarWidth:Qa,_fnApplyToChildren:C,_fnMap:p,_fnGetRowData:Y,
+_fnGetCellData:v,_fnSetCellData:F,_fnGetObjectDataFn:Q,_fnSetObjectDataFn:L,_fnApplyColumnDefs:ta,_fnBindAction:Ra,_fnExtend:Ta,_fnCallbackReg:z,_fnCallbackFire:A,_fnJsonString:Wa,_fnRender:S,_fnNodeToColumnIndex:fa,_fnInfoMacros:ja,_fnBrowserDetect:Ua,_fnGetColumns:r};h.extend(j.ext.oApi,this.oApi);for(var sa in j.ext.oApi)sa&&(this[sa]=Va(sa));var ca=this;this.each(function(){var a=0,b,c,d;c=this.getAttribute("id");var i=!1,f=!1;if("table"!=this.nodeName.toLowerCase())D(null,0,"Attempted to initialise DataTables on a node which is not a table: "+
+this.nodeName);else{a=0;for(b=j.settings.length;a<b;a++){if(j.settings[a].nTable==this){if(e===n||e.bRetrieve)return j.settings[a].oInstance;if(e.bDestroy){j.settings[a].oInstance.fnDestroy();break}else{D(j.settings[a],0,"Cannot reinitialise DataTable.\n\nTo retrieve the DataTables object for this table, pass no arguments or see the docs for bRetrieve and bDestroy");return}}if(j.settings[a].sTableId==this.id){j.settings.splice(a,1);break}}if(null===c||""===c)this.id=c="DataTables_Table_"+j.ext._oExternConfig.iNextUnique++;
+var g=h.extend(!0,{},j.models.oSettings,{nTable:this,oApi:ca.oApi,oInit:e,sDestroyWidth:h(this).width(),sInstance:c,sTableId:c});j.settings.push(g);g.oInstance=1===ca.length?ca:h(this).dataTable();e||(e={});e.oLanguage&&pa(e.oLanguage);e=Ta(h.extend(!0,{},j.defaults),e);p(g.oFeatures,e,"bPaginate");p(g.oFeatures,e,"bLengthChange");p(g.oFeatures,e,"bFilter");p(g.oFeatures,e,"bSort");p(g.oFeatures,e,"bInfo");p(g.oFeatures,e,"bProcessing");p(g.oFeatures,e,"bAutoWidth");p(g.oFeatures,e,"bSortClasses");
+p(g.oFeatures,e,"bServerSide");p(g.oFeatures,e,"bDeferRender");p(g.oScroll,e,"sScrollX","sX");p(g.oScroll,e,"sScrollXInner","sXInner");p(g.oScroll,e,"sScrollY","sY");p(g.oScroll,e,"bScrollCollapse","bCollapse");p(g.oScroll,e,"bScrollInfinite","bInfinite");p(g.oScroll,e,"iScrollLoadGap","iLoadGap");p(g.oScroll,e,"bScrollAutoCss","bAutoCss");p(g,e,"asStripeClasses");p(g,e,"asStripClasses","asStripeClasses");p(g,e,"fnServerData");p(g,e,"fnFormatNumber");p(g,e,"sServerMethod");p(g,e,"aaSorting");p(g,
+e,"aaSortingFixed");p(g,e,"aLengthMenu");p(g,e,"sPaginationType");p(g,e,"sAjaxSource");p(g,e,"sAjaxDataProp");p(g,e,"iCookieDuration");p(g,e,"sCookiePrefix");p(g,e,"sDom");p(g,e,"bSortCellsTop");p(g,e,"iTabIndex");p(g,e,"oSearch","oPreviousSearch");p(g,e,"aoSearchCols","aoPreSearchCols");p(g,e,"iDisplayLength","_iDisplayLength");p(g,e,"bJQueryUI","bJUI");p(g,e,"fnCookieCallback");p(g,e,"fnStateLoad");p(g,e,"fnStateSave");p(g.oLanguage,e,"fnInfoCallback");z(g,"aoDrawCallback",e.fnDrawCallback,"user");
+z(g,"aoServerParams",e.fnServerParams,"user");z(g,"aoStateSaveParams",e.fnStateSaveParams,"user");z(g,"aoStateLoadParams",e.fnStateLoadParams,"user");z(g,"aoStateLoaded",e.fnStateLoaded,"user");z(g,"aoRowCallback",e.fnRowCallback,"user");z(g,"aoRowCreatedCallback",e.fnCreatedRow,"user");z(g,"aoHeaderCallback",e.fnHeaderCallback,"user");z(g,"aoFooterCallback",e.fnFooterCallback,"user");z(g,"aoInitComplete",e.fnInitComplete,"user");z(g,"aoPreDrawCallback",e.fnPreDrawCallback,"user");g.oFeatures.bServerSide&&
+g.oFeatures.bSort&&g.oFeatures.bSortClasses?z(g,"aoDrawCallback",P,"server_side_sort_classes"):g.oFeatures.bDeferRender&&z(g,"aoDrawCallback",P,"defer_sort_classes");e.bJQueryUI?(h.extend(g.oClasses,j.ext.oJUIClasses),e.sDom===j.defaults.sDom&&"lfrtip"===j.defaults.sDom&&(g.sDom='<"H"lfr>t<"F"ip>')):h.extend(g.oClasses,j.ext.oStdClasses);h(this).addClass(g.oClasses.sTable);if(""!==g.oScroll.sX||""!==g.oScroll.sY)g.oScroll.iBarWidth=Qa();g.iInitDisplayStart===n&&(g.iInitDisplayStart=e.iDisplayStart,
+g._iDisplayStart=e.iDisplayStart);e.bStateSave&&(g.oFeatures.bStateSave=!0,Sa(g,e),z(g,"aoDrawCallback",ra,"state_save"));null!==e.iDeferLoading&&(g.bDeferLoading=!0,a=h.isArray(e.iDeferLoading),g._iRecordsDisplay=a?e.iDeferLoading[0]:e.iDeferLoading,g._iRecordsTotal=a?e.iDeferLoading[1]:e.iDeferLoading);null!==e.aaData&&(f=!0);""!==e.oLanguage.sUrl?(g.oLanguage.sUrl=e.oLanguage.sUrl,h.getJSON(g.oLanguage.sUrl,null,function(a){pa(a);h.extend(true,g.oLanguage,e.oLanguage,a);ba(g)}),i=!0):h.extend(!0,
+g.oLanguage,e.oLanguage);null===e.asStripeClasses&&(g.asStripeClasses=[g.oClasses.sStripeOdd,g.oClasses.sStripeEven]);b=g.asStripeClasses.length;g.asDestroyStripes=[];if(b){c=!1;d=h(this).children("tbody").children("tr:lt("+b+")");for(a=0;a<b;a++)d.hasClass(g.asStripeClasses[a])&&(c=!0,g.asDestroyStripes.push(g.asStripeClasses[a]));c&&d.removeClass(g.asStripeClasses.join(" "))}c=[];a=this.getElementsByTagName("thead");0!==a.length&&(V(g.aoHeader,a[0]),c=N(g));if(null===e.aoColumns){d=[];a=0;for(b=
+c.length;a<b;a++)d.push(null)}else d=e.aoColumns;a=0;for(b=d.length;a<b;a++)e.saved_aoColumns!==n&&e.saved_aoColumns.length==b&&(null===d[a]&&(d[a]={}),d[a].bVisible=e.saved_aoColumns[a].bVisible),o(g,c?c[a]:null);ta(g,e.aoColumnDefs,d,function(a,b){m(g,a,b)});a=0;for(b=g.aaSorting.length;a<b;a++){g.aaSorting[a][0]>=g.aoColumns.length&&(g.aaSorting[a][0]=0);var k=g.aoColumns[g.aaSorting[a][0]];g.aaSorting[a][2]===n&&(g.aaSorting[a][2]=0);e.aaSorting===n&&g.saved_aaSorting===n&&(g.aaSorting[a][1]=
+k.asSorting[0]);c=0;for(d=k.asSorting.length;c<d;c++)if(g.aaSorting[a][1]==k.asSorting[c]){g.aaSorting[a][2]=c;break}}P(g);Ua(g);a=h(this).children("caption").each(function(){this._captionSide=h(this).css("caption-side")});b=h(this).children("thead");0===b.length&&(b=[l.createElement("thead")],this.appendChild(b[0]));g.nTHead=b[0];b=h(this).children("tbody");0===b.length&&(b=[l.createElement("tbody")],this.appendChild(b[0]));g.nTBody=b[0];g.nTBody.setAttribute("role","alert");g.nTBody.setAttribute("aria-live",
+"polite");g.nTBody.setAttribute("aria-relevant","all");b=h(this).children("tfoot");if(0===b.length&&0<a.length&&(""!==g.oScroll.sX||""!==g.oScroll.sY))b=[l.createElement("tfoot")],this.appendChild(b[0]);0<b.length&&(g.nTFoot=b[0],V(g.aoFooter,g.nTFoot));if(f)for(a=0;a<e.aaData.length;a++)H(g,e.aaData[a]);else ua(g);g.aiDisplay=g.aiDisplayMaster.slice();g.bInitialised=!0;!1===i&&ba(g)}});ca=null;return this};j.fnVersionCheck=function(e){for(var h=function(e,h){for(;e.length<h;)e+="0";return e},m=j.ext.sVersion.split("."),
+e=e.split("."),k="",n="",l=0,t=e.length;l<t;l++)k+=h(m[l],3),n+=h(e[l],3);return parseInt(k,10)>=parseInt(n,10)};j.fnIsDataTable=function(e){for(var h=j.settings,m=0;m<h.length;m++)if(h[m].nTable===e||h[m].nScrollHead===e||h[m].nScrollFoot===e)return!0;return!1};j.fnTables=function(e){var o=[];jQuery.each(j.settings,function(j,k){(!e||!0===e&&h(k.nTable).is(":visible"))&&o.push(k.nTable)});return o};j.version="1.9.4";j.settings=[];j.models={};j.models.ext={afnFiltering:[],afnSortData:[],aoFeatures:[],
+aTypes:[],fnVersionCheck:j.fnVersionCheck,iApiIndex:0,ofnSearch:{},oApi:{},oStdClasses:{},oJUIClasses:{},oPagination:{},oSort:{},sVersion:j.version,sErrMode:"alert",_oExternConfig:{iNextUnique:0}};j.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};j.models.oRow={nTr:null,_aData:[],_aSortData:[],_anHidden:[],_sRowStripe:""};j.models.oColumn={aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bUseRendered:null,bVisible:null,_bAutoType:!0,fnCreatedCell:null,fnGetData:null,
+fnRender:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};j.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,
+bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollAutoCss:!0,bScrollCollapse:!1,bScrollInfinite:!1,bServerSide:!1,bSort:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCookieCallback:null,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(e){if(1E3>e)return e;for(var h=e+"",e=h.split(""),j="",h=h.length,k=0;k<h;k++)0===k%3&&0!==k&&(j=this.oLanguage.sInfoThousands+j),j=e[h-k-1]+j;return j},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,
+fnRowCallback:null,fnServerData:function(e,j,m,k){k.jqXHR=h.ajax({url:e,data:j,success:function(e){e.sError&&k.oApi._fnLog(k,0,e.sError);h(k.oInstance).trigger("xhr",[k,e]);m(e)},dataType:"json",cache:!1,type:k.sServerMethod,error:function(e,h){"parsererror"==h&&k.oApi._fnLog(k,0,"DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})},fnServerParams:null,fnStateLoad:function(e){var e=this.oApi._fnReadCookie(e.sCookiePrefix+e.sInstance),j;try{j=
+"function"===typeof h.parseJSON?h.parseJSON(e):eval("("+e+")")}catch(m){j=null}return j},fnStateLoadParams:null,fnStateLoaded:null,fnStateSave:function(e,h){this.oApi._fnCreateCookie(e.sCookiePrefix+e.sInstance,this.oApi._fnJsonString(h),e.iCookieDuration,e.sCookiePrefix,e.fnCookieCallback)},fnStateSaveParams:null,iCookieDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iScrollLoadGap:100,iTabIndex:0,oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},
+oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sInfoThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sUrl:"",sZeroRecords:"No matching records found"},oSearch:h.extend({},j.models.oSearch),sAjaxDataProp:"aaData",
+sAjaxSource:null,sCookiePrefix:"SpryMedia_DataTables_",sDom:"lfrtip",sPaginationType:"two_button",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET"};j.defaults.columns={aDataSort:null,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bUseRendered:!0,bVisible:!0,fnCreatedCell:null,fnRender:null,iDataSort:-1,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};j.models.oSettings={oFeatures:{bAutoWidth:null,
+bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortClasses:null,bStateSave:null},oScroll:{bAutoCss:null,bCollapse:null,bInfinite:null,iBarWidth:0,iLoadGap:null,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1},aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aoColumns:[],aoHeader:[],aoFooter:[],asDataSearch:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:null,
+asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,sPaginationType:"two_button",iCookieDuration:0,sCookiePrefix:"",fnCookieCallback:null,aoStateSave:[],aoStateLoad:[],
+oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iDisplayEnd:10,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsTotal,10):this.aiDisplayMaster.length},
+fnRecordsDisplay:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsDisplay,10):this.aiDisplay.length},fnDisplayEnd:function(){return this.oFeatures.bServerSide?!1===this.oFeatures.bPaginate||-1==this._iDisplayLength?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay):this._iDisplayEnd},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null};j.ext=h.extend(!0,{},j.models.ext);h.extend(j.ext.oStdClasses,
+{sTable:"dataTable",sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active",sPageButtonStaticDisabled:"paginate_button paginate_button_disabled",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",
+sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",
+sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:"",sJUIHeader:"",sJUIFooter:""});h.extend(j.ext.oJUIClasses,j.ext.oStdClasses,{sPagePrevEnabled:"fg-button ui-button ui-state-default ui-corner-left",sPagePrevDisabled:"fg-button ui-button ui-state-default ui-corner-left ui-state-disabled",sPageNextEnabled:"fg-button ui-button ui-state-default ui-corner-right",
+sPageNextDisabled:"fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"fg-button ui-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-button ui-state-default ui-state-disabled",sPageFirst:"first ui-corner-tl ui-corner-bl",sPageLast:"last ui-corner-tr ui-corner-br",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",
+sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default",sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",
+sScrollHead:"dataTables_scrollHead ui-state-default",sScrollFoot:"dataTables_scrollFoot ui-state-default",sFooterTH:"ui-state-default",sJUIHeader:"fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix",sJUIFooter:"fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix"});h.extend(j.ext.oPagination,{two_button:{fnInit:function(e,j,m){var k=e.oLanguage.oPaginate,n=function(h){e.oApi._fnPageChange(e,h.data.action)&&m(e)},k=!e.bJUI?'<a class="'+
+e.oClasses.sPagePrevDisabled+'" tabindex="'+e.iTabIndex+'" role="button">'+k.sPrevious+'</a><a class="'+e.oClasses.sPageNextDisabled+'" tabindex="'+e.iTabIndex+'" role="button">'+k.sNext+"</a>":'<a class="'+e.oClasses.sPagePrevDisabled+'" tabindex="'+e.iTabIndex+'" role="button"><span class="'+e.oClasses.sPageJUIPrev+'"></span></a><a class="'+e.oClasses.sPageNextDisabled+'" tabindex="'+e.iTabIndex+'" role="button"><span class="'+e.oClasses.sPageJUINext+'"></span></a>';h(j).append(k);var l=h("a",j),
+k=l[0],l=l[1];e.oApi._fnBindAction(k,{action:"previous"},n);e.oApi._fnBindAction(l,{action:"next"},n);e.aanFeatures.p||(j.id=e.sTableId+"_paginate",k.id=e.sTableId+"_previous",l.id=e.sTableId+"_next",k.setAttribute("aria-controls",e.sTableId),l.setAttribute("aria-controls",e.sTableId))},fnUpdate:function(e){if(e.aanFeatures.p)for(var h=e.oClasses,j=e.aanFeatures.p,k,l=0,n=j.length;l<n;l++)if(k=j[l].firstChild)k.className=0===e._iDisplayStart?h.sPagePrevDisabled:h.sPagePrevEnabled,k=k.nextSibling,
+k.className=e.fnDisplayEnd()==e.fnRecordsDisplay()?h.sPageNextDisabled:h.sPageNextEnabled}},iFullNumbersShowPages:5,full_numbers:{fnInit:function(e,j,m){var k=e.oLanguage.oPaginate,l=e.oClasses,n=function(h){e.oApi._fnPageChange(e,h.data.action)&&m(e)};h(j).append('<a tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPageFirst+'">'+k.sFirst+'</a><a tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPagePrevious+'">'+k.sPrevious+'</a><span></span><a tabindex="'+e.iTabIndex+'" class="'+
+l.sPageButton+" "+l.sPageNext+'">'+k.sNext+'</a><a tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPageLast+'">'+k.sLast+"</a>");var t=h("a",j),k=t[0],l=t[1],r=t[2],t=t[3];e.oApi._fnBindAction(k,{action:"first"},n);e.oApi._fnBindAction(l,{action:"previous"},n);e.oApi._fnBindAction(r,{action:"next"},n);e.oApi._fnBindAction(t,{action:"last"},n);e.aanFeatures.p||(j.id=e.sTableId+"_paginate",k.id=e.sTableId+"_first",l.id=e.sTableId+"_previous",r.id=e.sTableId+"_next",t.id=e.sTableId+"_last")},
+fnUpdate:function(e,o){if(e.aanFeatures.p){var m=j.ext.oPagination.iFullNumbersShowPages,k=Math.floor(m/2),l=Math.ceil(e.fnRecordsDisplay()/e._iDisplayLength),n=Math.ceil(e._iDisplayStart/e._iDisplayLength)+1,t="",r,B=e.oClasses,u,M=e.aanFeatures.p,L=function(h){e.oApi._fnBindAction(this,{page:h+r-1},function(h){e.oApi._fnPageChange(e,h.data.page);o(e);h.preventDefault()})};-1===e._iDisplayLength?n=k=r=1:l<m?(r=1,k=l):n<=k?(r=1,k=m):n>=l-k?(r=l-m+1,k=l):(r=n-Math.ceil(m/2)+1,k=r+m-1);for(m=r;m<=k;m++)t+=
+n!==m?'<a tabindex="'+e.iTabIndex+'" class="'+B.sPageButton+'">'+e.fnFormatNumber(m)+"</a>":'<a tabindex="'+e.iTabIndex+'" class="'+B.sPageButtonActive+'">'+e.fnFormatNumber(m)+"</a>";m=0;for(k=M.length;m<k;m++)u=M[m],u.hasChildNodes()&&(h("span:eq(0)",u).html(t).children("a").each(L),u=u.getElementsByTagName("a"),u=[u[0],u[1],u[u.length-2],u[u.length-1]],h(u).removeClass(B.sPageButton+" "+B.sPageButtonActive+" "+B.sPageButtonStaticDisabled),h([u[0],u[1]]).addClass(1==n?B.sPageButtonStaticDisabled:
+B.sPageButton),h([u[2],u[3]]).addClass(0===l||n===l||-1===e._iDisplayLength?B.sPageButtonStaticDisabled:B.sPageButton))}}}});h.extend(j.ext.oSort,{"string-pre":function(e){"string"!=typeof e&&(e=null!==e&&e.toString?e.toString():"");return e.toLowerCase()},"string-asc":function(e,h){return e<h?-1:e>h?1:0},"string-desc":function(e,h){return e<h?1:e>h?-1:0},"html-pre":function(e){return e.replace(/<.*?>/g,"").toLowerCase()},"html-asc":function(e,h){return e<h?-1:e>h?1:0},"html-desc":function(e,h){return e<
+h?1:e>h?-1:0},"date-pre":function(e){e=Date.parse(e);if(isNaN(e)||""===e)e=Date.parse("01/01/1970 00:00:00");return e},"date-asc":function(e,h){return e-h},"date-desc":function(e,h){return h-e},"numeric-pre":function(e){return"-"==e||""===e?0:1*e},"numeric-asc":function(e,h){return e-h},"numeric-desc":function(e,h){return h-e}});h.extend(j.ext.aTypes,[function(e){if("number"===typeof e)return"numeric";if("string"!==typeof e)return null;var h,j=!1;h=e.charAt(0);if(-1=="0123456789-".indexOf(h))return null;
+for(var k=1;k<e.length;k++){h=e.charAt(k);if(-1=="0123456789.".indexOf(h))return null;if("."==h){if(j)return null;j=!0}}return"numeric"},function(e){var h=Date.parse(e);return null!==h&&!isNaN(h)||"string"===typeof e&&0===e.length?"date":null},function(e){return"string"===typeof e&&-1!=e.indexOf("<")&&-1!=e.indexOf(">")?"html":null}]);h.fn.DataTable=j;h.fn.dataTable=j;h.fn.dataTableSettings=j.settings;h.fn.dataTableExt=j.ext};"function"===typeof define&&define.amd?define(["jquery"],L):jQuery&&!jQuery.fn.dataTable&&
+L(jQuery)})(window,document);
diff --git a/common/src/main/webapp/thirdparty/data-tables/jquery.dataTables.js b/common/src/main/webapp/thirdparty/data-tables/jquery.dataTables.js
new file mode 100644
index 0000000..380ab1e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/data-tables/jquery.dataTables.js
@@ -0,0 +1,15268 @@
+/*! DataTables 1.10.11
+ * ©2008-2015 SpryMedia Ltd - datatables.net/license
+ */
+
+/**
+ * @summary DataTables
+ * @description Paginate, search and order HTML tables
+ * @version 1.10.11
+ * @file jquery.dataTables.js
+ * @author SpryMedia Ltd (www.sprymedia.co.uk)
+ * @contact www.sprymedia.co.uk/contact
+ * @copyright Copyright 2008-2015 SpryMedia Ltd.
+ *
+ * This source file is free software, available under the following license:
+ * MIT license - http://datatables.net/license
+ *
+ * This source file is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
+ *
+ * For details please refer to: http://www.datatables.net
+ */
+
+/*jslint evil: true, undef: true, browser: true */
+/*globals $,require,jQuery,define,_selector_run,_selector_opts,_selector_first,_selector_row_indexes,_ext,_Api,_api_register,_api_registerPlural,_re_new_lines,_re_html,_re_formatted_numeric,_re_escape_regex,_empty,_intVal,_numToDecimal,_isNumber,_isHtml,_htmlNumeric,_pluck,_pluck_order,_range,_stripHtml,_unique,_fnBuildAjax,_fnAjaxUpdate,_fnAjaxParameters,_fnAjaxUpdateDraw,_fnAjaxDataSrc,_fnAddColumn,_fnColumnOptions,_fnAdjustColumnSizing,_fnVisibleToColumnIndex,_fnColumnIndexToVisible,_fnVisbleColumns,_fnGetColumns,_fnColumnTypes,_fnApplyColumnDefs,_fnHungarianMap,_fnCamelToHungarian,_fnLanguageCompat,_fnBrowserDetect,_fnAddData,_fnAddTr,_fnNodeToDataIndex,_fnNodeToColumnIndex,_fnGetCellData,_fnSetCellData,_fnSplitObjNotation,_fnGetObjectDataFn,_fnSetObjectDataFn,_fnGetDataMaster,_fnClearTable,_fnDeleteIndex,_fnInvalidate,_fnGetRowElements,_fnCreateTr,_fnBuildHead,_fnDrawHead,_fnDraw,_fnReDraw,_fnAddOptionsHtml,_fnDetectHeader,_fnGetUniqueThs,_fnFeatureHtmlFilter,_fnFilterComplete,_fnFilterCustom,_fnFilterColumn,_fnFilter,_fnFilterCreateSearch,_fnEscapeRegex,_fnFilterData,_fnFeatureHtmlInfo,_fnUpdateInfo,_fnInfoMacros,_fnInitialise,_fnInitComplete,_fnLengthChange,_fnFeatureHtmlLength,_fnFeatureHtmlPaginate,_fnPageChange,_fnFeatureHtmlProcessing,_fnProcessingDisplay,_fnFeatureHtmlTable,_fnScrollDraw,_fnApplyToChildren,_fnCalculateColumnWidths,_fnThrottle,_fnConvertToWidth,_fnGetWidestNode,_fnGetMaxLenString,_fnStringToCss,_fnSortFlatten,_fnSort,_fnSortAria,_fnSortListener,_fnSortAttachListener,_fnSortingClasses,_fnSortData,_fnSaveState,_fnLoadState,_fnSettingsFromNode,_fnLog,_fnMap,_fnBindAction,_fnCallbackReg,_fnCallbackFire,_fnLengthOverflow,_fnRenderer,_fnDataSource,_fnRowAttributes*/
+
+(function( factory ) {
+ "use strict";
+
+ if ( typeof define === 'function' && define.amd ) {
+ // AMD
+ define( ['jquery'], function ( $ ) {
+ return factory( $, window, document );
+ } );
+ }
+ else if ( typeof exports === 'object' ) {
+ // CommonJS
+ module.exports = function (root, $) {
+ if ( ! root ) {
+ // CommonJS environments without a window global must pass a
+ // root. This will give an error otherwise
+ root = window;
+ }
+
+ if ( ! $ ) {
+ $ = typeof window !== 'undefined' ? // jQuery's factory checks for a global window
+ require('jquery') :
+ require('jquery')( root );
+ }
+
+ return factory( $, root, root.document );
+ };
+ }
+ else {
+ // Browser
+ factory( jQuery, window, document );
+ }
+}
+(function( $, window, document, undefined ) {
+ "use strict";
+
+ /**
+ * DataTables is a plug-in for the jQuery Javascript library. It is a highly
+ * flexible tool, based upon the foundations of progressive enhancement,
+ * which will add advanced interaction controls to any HTML table. For a
+ * full list of features please refer to
+ * [DataTables.net](href="http://datatables.net).
+ *
+ * Note that the `DataTable` object is not a global variable but is aliased
+ * to `jQuery.fn.DataTable` and `jQuery.fn.dataTable` through which it may
+ * be accessed.
+ *
+ * @class
+ * @param {object} [init={}] Configuration object for DataTables. Options
+ * are defined by {@link DataTable.defaults}
+ * @requires jQuery 1.7+
+ *
+ * @example
+ * // Basic initialisation
+ * $(document).ready( function {
+ * $('#example').dataTable();
+ * } );
+ *
+ * @example
+ * // Initialisation with configuration options - in this case, disable
+ * // pagination and sorting.
+ * $(document).ready( function {
+ * $('#example').dataTable( {
+ * "paginate": false,
+ * "sort": false
+ * } );
+ * } );
+ */
+ var DataTable;
+
+
+ /*
+ * It is useful to have variables which are scoped locally so only the
+ * DataTables functions can access them and they don't leak into global space.
+ * At the same time these functions are often useful over multiple files in the
+ * core and API, so we list, or at least document, all variables which are used
+ * by DataTables as private variables here. This also ensures that there is no
+ * clashing of variable names and that they can easily referenced for reuse.
+ */
+
+
+ // Defined else where
+ // _selector_run
+ // _selector_opts
+ // _selector_first
+ // _selector_row_indexes
+
+ var _ext; // DataTable.ext
+ var _Api; // DataTable.Api
+ var _api_register; // DataTable.Api.register
+ var _api_registerPlural; // DataTable.Api.registerPlural
+
+ var _re_dic = {};
+ var _re_new_lines = /[\r\n]/g;
+ var _re_html = /<.*?>/g;
+ var _re_date_start = /^[\w\+\-]/;
+ var _re_date_end = /[\w\+\-]$/;
+
+ // Escape regular expression special characters
+ var _re_escape_regex = new RegExp( '(\\' + [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\', '$', '^', '-' ].join('|\\') + ')', 'g' );
+
+ // http://en.wikipedia.org/wiki/Foreign_exchange_market
+ // - \u20BD - Russian ruble.
+ // - \u20a9 - South Korean Won
+ // - \u20BA - Turkish Lira
+ // - \u20B9 - Indian Rupee
+ // - R - Brazil (R$) and South Africa
+ // - fr - Swiss Franc
+ // - kr - Swedish krona, Norwegian krone and Danish krone
+ // - \u2009 is thin space and \u202F is narrow no-break space, both used in many
+ // standards as thousands separators.
+ var _re_formatted_numeric = /[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi;
+
+
+ var _empty = function ( d ) {
+ return !d || d === true || d === '-' ? true : false;
+ };
+
+
+ var _intVal = function ( s ) {
+ var integer = parseInt( s, 10 );
+ return !isNaN(integer) && isFinite(s) ? integer : null;
+ };
+
+ // Convert from a formatted number with characters other than `.` as the
+ // decimal place, to a Javascript number
+ var _numToDecimal = function ( num, decimalPoint ) {
+ // Cache created regular expressions for speed as this function is called often
+ if ( ! _re_dic[ decimalPoint ] ) {
+ _re_dic[ decimalPoint ] = new RegExp( _fnEscapeRegex( decimalPoint ), 'g' );
+ }
+ return typeof num === 'string' && decimalPoint !== '.' ?
+ num.replace( /\./g, '' ).replace( _re_dic[ decimalPoint ], '.' ) :
+ num;
+ };
+
+
+ var _isNumber = function ( d, decimalPoint, formatted ) {
+ var strType = typeof d === 'string';
+
+ // If empty return immediately so there must be a number if it is a
+ // formatted string (this stops the string "k", or "kr", etc being detected
+ // as a formatted number for currency
+ if ( _empty( d ) ) {
+ return true;
+ }
+
+ if ( decimalPoint && strType ) {
+ d = _numToDecimal( d, decimalPoint );
+ }
+
+ if ( formatted && strType ) {
+ d = d.replace( _re_formatted_numeric, '' );
+ }
+
+ return !isNaN( parseFloat(d) ) && isFinite( d );
+ };
+
+
+ // A string without HTML in it can be considered to be HTML still
+ var _isHtml = function ( d ) {
+ return _empty( d ) || typeof d === 'string';
+ };
+
+
+ var _htmlNumeric = function ( d, decimalPoint, formatted ) {
+ if ( _empty( d ) ) {
+ return true;
+ }
+
+ var html = _isHtml( d );
+ return ! html ?
+ null :
+ _isNumber( _stripHtml( d ), decimalPoint, formatted ) ?
+ true :
+ null;
+ };
+
+
+ var _pluck = function ( a, prop, prop2 ) {
+ var out = [];
+ var i=0, ien=a.length;
+
+ // Could have the test in the loop for slightly smaller code, but speed
+ // is essential here
+ if ( prop2 !== undefined ) {
+ for ( ; i<ien ; i++ ) {
+ if ( a[i] && a[i][ prop ] ) {
+ out.push( a[i][ prop ][ prop2 ] );
+ }
+ }
+ }
+ else {
+ for ( ; i<ien ; i++ ) {
+ if ( a[i] ) {
+ out.push( a[i][ prop ] );
+ }
+ }
+ }
+
+ return out;
+ };
+
+
+ // Basically the same as _pluck, but rather than looping over `a` we use `order`
+ // as the indexes to pick from `a`
+ var _pluck_order = function ( a, order, prop, prop2 )
+ {
+ var out = [];
+ var i=0, ien=order.length;
+
+ // Could have the test in the loop for slightly smaller code, but speed
+ // is essential here
+ if ( prop2 !== undefined ) {
+ for ( ; i<ien ; i++ ) {
+ if ( a[ order[i] ][ prop ] ) {
+ out.push( a[ order[i] ][ prop ][ prop2 ] );
+ }
+ }
+ }
+ else {
+ for ( ; i<ien ; i++ ) {
+ out.push( a[ order[i] ][ prop ] );
+ }
+ }
+
+ return out;
+ };
+
+
+ var _range = function ( len, start )
+ {
+ var out = [];
+ var end;
+
+ if ( start === undefined ) {
+ start = 0;
+ end = len;
+ }
+ else {
+ end = start;
+ start = len;
+ }
+
+ for ( var i=start ; i<end ; i++ ) {
+ out.push( i );
+ }
+
+ return out;
+ };
+
+
+ var _removeEmpty = function ( a )
+ {
+ var out = [];
+
+ for ( var i=0, ien=a.length ; i<ien ; i++ ) {
+ if ( a[i] ) { // careful - will remove all falsy values!
+ out.push( a[i] );
+ }
+ }
+
+ return out;
+ };
+
+
+ var _stripHtml = function ( d ) {
+ return d.replace( _re_html, '' );
+ };
+
+
+ /**
+ * Find the unique elements in a source array.
+ *
+ * @param {array} src Source array
+ * @return {array} Array of unique items
+ * @ignore
+ */
+ var _unique = function ( src )
+ {
+ // A faster unique method is to use object keys to identify used values,
+ // but this doesn't work with arrays or objects, which we must also
+ // consider. See jsperf.com/compare-array-unique-versions/4 for more
+ // information.
+ var
+ out = [],
+ val,
+ i, ien=src.length,
+ j, k=0;
+
+ again: for ( i=0 ; i<ien ; i++ ) {
+ val = src[i];
+
+ for ( j=0 ; j<k ; j++ ) {
+ if ( out[j] === val ) {
+ continue again;
+ }
+ }
+
+ out.push( val );
+ k++;
+ }
+
+ return out;
+ };
+
+
+
+ /**
+ * Create a mapping object that allows camel case parameters to be looked up
+ * for their Hungarian counterparts. The mapping is stored in a private
+ * parameter called `_hungarianMap` which can be accessed on the source object.
+ * @param {object} o
+ * @memberof DataTable#oApi
+ */
+ function _fnHungarianMap ( o )
+ {
+ var
+ hungarian = 'a aa ai ao as b fn i m o s ',
+ match,
+ newKey,
+ map = {};
+
+ $.each( o, function (key, val) {
+ match = key.match(/^([^A-Z]+?)([A-Z])/);
+
+ if ( match && hungarian.indexOf(match[1]+' ') !== -1 )
+ {
+ newKey = key.replace( match[0], match[2].toLowerCase() );
+ map[ newKey ] = key;
+
+ if ( match[1] === 'o' )
+ {
+ _fnHungarianMap( o[key] );
+ }
+ }
+ } );
+
+ o._hungarianMap = map;
+ }
+
+
+ /**
+ * Convert from camel case parameters to Hungarian, based on a Hungarian map
+ * created by _fnHungarianMap.
+ * @param {object} src The model object which holds all parameters that can be
+ * mapped.
+ * @param {object} user The object to convert from camel case to Hungarian.
+ * @param {boolean} force When set to `true`, properties which already have a
+ * Hungarian value in the `user` object will be overwritten. Otherwise they
+ * won't be.
+ * @memberof DataTable#oApi
+ */
+ function _fnCamelToHungarian ( src, user, force )
+ {
+ if ( ! src._hungarianMap ) {
+ _fnHungarianMap( src );
+ }
+
+ var hungarianKey;
+
+ $.each( user, function (key, val) {
+ hungarianKey = src._hungarianMap[ key ];
+
+ if ( hungarianKey !== undefined && (force || user[hungarianKey] === undefined) )
+ {
+ // For objects, we need to buzz down into the object to copy parameters
+ if ( hungarianKey.charAt(0) === 'o' )
+ {
+ // Copy the camelCase options over to the hungarian
+ if ( ! user[ hungarianKey ] ) {
+ user[ hungarianKey ] = {};
+ }
+ $.extend( true, user[hungarianKey], user[key] );
+
+ _fnCamelToHungarian( src[hungarianKey], user[hungarianKey], force );
+ }
+ else {
+ user[hungarianKey] = user[ key ];
+ }
+ }
+ } );
+ }
+
+
+ /**
+ * Language compatibility - when certain options are given, and others aren't, we
+ * need to duplicate the values over, in order to provide backwards compatibility
+ * with older language files.
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnLanguageCompat( lang )
+ {
+ var defaults = DataTable.defaults.oLanguage;
+ var zeroRecords = lang.sZeroRecords;
+
+ /* Backwards compatibility - if there is no sEmptyTable given, then use the same as
+ * sZeroRecords - assuming that is given.
+ */
+ if ( ! lang.sEmptyTable && zeroRecords &&
+ defaults.sEmptyTable === "No data available in table" )
+ {
+ _fnMap( lang, lang, 'sZeroRecords', 'sEmptyTable' );
+ }
+
+ /* Likewise with loading records */
+ if ( ! lang.sLoadingRecords && zeroRecords &&
+ defaults.sLoadingRecords === "Loading..." )
+ {
+ _fnMap( lang, lang, 'sZeroRecords', 'sLoadingRecords' );
+ }
+
+ // Old parameter name of the thousands separator mapped onto the new
+ if ( lang.sInfoThousands ) {
+ lang.sThousands = lang.sInfoThousands;
+ }
+
+ var decimal = lang.sDecimal;
+ if ( decimal ) {
+ _addNumericSort( decimal );
+ }
+ }
+
+
+ /**
+ * Map one parameter onto another
+ * @param {object} o Object to map
+ * @param {*} knew The new parameter name
+ * @param {*} old The old parameter name
+ */
+ var _fnCompatMap = function ( o, knew, old ) {
+ if ( o[ knew ] !== undefined ) {
+ o[ old ] = o[ knew ];
+ }
+ };
+
+
+ /**
+ * Provide backwards compatibility for the main DT options. Note that the new
+ * options are mapped onto the old parameters, so this is an external interface
+ * change only.
+ * @param {object} init Object to map
+ */
+ function _fnCompatOpts ( init )
+ {
+ _fnCompatMap( init, 'ordering', 'bSort' );
+ _fnCompatMap( init, 'orderMulti', 'bSortMulti' );
+ _fnCompatMap( init, 'orderClasses', 'bSortClasses' );
+ _fnCompatMap( init, 'orderCellsTop', 'bSortCellsTop' );
+ _fnCompatMap( init, 'order', 'aaSorting' );
+ _fnCompatMap( init, 'orderFixed', 'aaSortingFixed' );
+ _fnCompatMap( init, 'paging', 'bPaginate' );
+ _fnCompatMap( init, 'pagingType', 'sPaginationType' );
+ _fnCompatMap( init, 'pageLength', 'iDisplayLength' );
+ _fnCompatMap( init, 'searching', 'bFilter' );
+
+ // Boolean initialisation of x-scrolling
+ if ( typeof init.sScrollX === 'boolean' ) {
+ init.sScrollX = init.sScrollX ? '100%' : '';
+ }
+ if ( typeof init.scrollX === 'boolean' ) {
+ init.scrollX = init.scrollX ? '100%' : '';
+ }
+
+ // Column search objects are in an array, so it needs to be converted
+ // element by element
+ var searchCols = init.aoSearchCols;
+
+ if ( searchCols ) {
+ for ( var i=0, ien=searchCols.length ; i<ien ; i++ ) {
+ if ( searchCols[i] ) {
+ _fnCamelToHungarian( DataTable.models.oSearch, searchCols[i] );
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Provide backwards compatibility for column options. Note that the new options
+ * are mapped onto the old parameters, so this is an external interface change
+ * only.
+ * @param {object} init Object to map
+ */
+ function _fnCompatCols ( init )
+ {
+ _fnCompatMap( init, 'orderable', 'bSortable' );
+ _fnCompatMap( init, 'orderData', 'aDataSort' );
+ _fnCompatMap( init, 'orderSequence', 'asSorting' );
+ _fnCompatMap( init, 'orderDataType', 'sortDataType' );
+
+ // orderData can be given as an integer
+ var dataSort = init.aDataSort;
+ if ( dataSort && ! $.isArray( dataSort ) ) {
+ init.aDataSort = [ dataSort ];
+ }
+ }
+
+
+ /**
+ * Browser feature detection for capabilities, quirks
+ * @param {object} settings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnBrowserDetect( settings )
+ {
+ // We don't need to do this every time DataTables is constructed, the values
+ // calculated are specific to the browser and OS configuration which we
+ // don't expect to change between initialisations
+ if ( ! DataTable.__browser ) {
+ var browser = {};
+ DataTable.__browser = browser;
+
+ // Scrolling feature / quirks detection
+ var n = $('<div/>')
+ .css( {
+ position: 'fixed',
+ top: 0,
+ left: 0,
+ height: 1,
+ width: 1,
+ overflow: 'hidden'
+ } )
+ .append(
+ $('<div/>')
+ .css( {
+ position: 'absolute',
+ top: 1,
+ left: 1,
+ width: 100,
+ overflow: 'scroll'
+ } )
+ .append(
+ $('<div/>')
+ .css( {
+ width: '100%',
+ height: 10
+ } )
+ )
+ )
+ .appendTo( 'body' );
+
+ var outer = n.children();
+ var inner = outer.children();
+
+ // Numbers below, in order, are:
+ // inner.offsetWidth, inner.clientWidth, outer.offsetWidth, outer.clientWidth
+ //
+ // IE6 XP: 100 100 100 83
+ // IE7 Vista: 100 100 100 83
+ // IE 8+ Windows: 83 83 100 83
+ // Evergreen Windows: 83 83 100 83
+ // Evergreen Mac with scrollbars: 85 85 100 85
+ // Evergreen Mac without scrollbars: 100 100 100 100
+
+ // Get scrollbar width
+ browser.barWidth = outer[0].offsetWidth - outer[0].clientWidth;
+
+ // IE6/7 will oversize a width 100% element inside a scrolling element, to
+ // include the width of the scrollbar, while other browsers ensure the inner
+ // element is contained without forcing scrolling
+ browser.bScrollOversize = inner[0].offsetWidth === 100 && outer[0].clientWidth !== 100;
+
+ // In rtl text layout, some browsers (most, but not all) will place the
+ // scrollbar on the left, rather than the right.
+ browser.bScrollbarLeft = Math.round( inner.offset().left ) !== 1;
+
+ // IE8- don't provide height and width for getBoundingClientRect
+ browser.bBounding = n[0].getBoundingClientRect().width ? true : false;
+
+ n.remove();
+ }
+
+ $.extend( settings.oBrowser, DataTable.__browser );
+ settings.oScroll.iBarWidth = DataTable.__browser.barWidth;
+ }
+
+
+ /**
+ * Array.prototype reduce[Right] method, used for browsers which don't support
+ * JS 1.6. Done this way to reduce code size, since we iterate either way
+ * @param {object} settings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnReduce ( that, fn, init, start, end, inc )
+ {
+ var
+ i = start,
+ value,
+ isSet = false;
+
+ if ( init !== undefined ) {
+ value = init;
+ isSet = true;
+ }
+
+ while ( i !== end ) {
+ if ( ! that.hasOwnProperty(i) ) {
+ continue;
+ }
+
+ value = isSet ?
+ fn( value, that[i], i, that ) :
+ that[i];
+
+ isSet = true;
+ i += inc;
+ }
+
+ return value;
+ }
+
+ /**
+ * Add a column to the list used for the table with default values
+ * @param {object} oSettings dataTables settings object
+ * @param {node} nTh The th element for this column
+ * @memberof DataTable#oApi
+ */
+ function _fnAddColumn( oSettings, nTh )
+ {
+ // Add column to aoColumns array
+ var oDefaults = DataTable.defaults.column;
+ var iCol = oSettings.aoColumns.length;
+ var oCol = $.extend( {}, DataTable.models.oColumn, oDefaults, {
+ "nTh": nTh ? nTh : document.createElement('th'),
+ "sTitle": oDefaults.sTitle ? oDefaults.sTitle : nTh ? nTh.innerHTML : '',
+ "aDataSort": oDefaults.aDataSort ? oDefaults.aDataSort : [iCol],
+ "mData": oDefaults.mData ? oDefaults.mData : iCol,
+ idx: iCol
+ } );
+ oSettings.aoColumns.push( oCol );
+
+ // Add search object for column specific search. Note that the `searchCols[ iCol ]`
+ // passed into extend can be undefined. This allows the user to give a default
+ // with only some of the parameters defined, and also not give a default
+ var searchCols = oSettings.aoPreSearchCols;
+ searchCols[ iCol ] = $.extend( {}, DataTable.models.oSearch, searchCols[ iCol ] );
+
+ // Use the default column options function to initialise classes etc
+ _fnColumnOptions( oSettings, iCol, $(nTh).data() );
+ }
+
+
+ /**
+ * Apply options for a column
+ * @param {object} oSettings dataTables settings object
+ * @param {int} iCol column index to consider
+ * @param {object} oOptions object with sType, bVisible and bSearchable etc
+ * @memberof DataTable#oApi
+ */
+ function _fnColumnOptions( oSettings, iCol, oOptions )
+ {
+ var oCol = oSettings.aoColumns[ iCol ];
+ var oClasses = oSettings.oClasses;
+ var th = $(oCol.nTh);
+
+ // Try to get width information from the DOM. We can't get it from CSS
+ // as we'd need to parse the CSS stylesheet. `width` option can override
+ if ( ! oCol.sWidthOrig ) {
+ // Width attribute
+ oCol.sWidthOrig = th.attr('width') || null;
+
+ // Style attribute
+ var t = (th.attr('style') || '').match(/width:\s*(\d+[pxem%]+)/);
+ if ( t ) {
+ oCol.sWidthOrig = t[1];
+ }
+ }
+
+ /* User specified column options */
+ if ( oOptions !== undefined && oOptions !== null )
+ {
+ // Backwards compatibility
+ _fnCompatCols( oOptions );
+
+ // Map camel case parameters to their Hungarian counterparts
+ _fnCamelToHungarian( DataTable.defaults.column, oOptions );
+
+ /* Backwards compatibility for mDataProp */
+ if ( oOptions.mDataProp !== undefined && !oOptions.mData )
+ {
+ oOptions.mData = oOptions.mDataProp;
+ }
+
+ if ( oOptions.sType )
+ {
+ oCol._sManualType = oOptions.sType;
+ }
+
+ // `class` is a reserved word in Javascript, so we need to provide
+ // the ability to use a valid name for the camel case input
+ if ( oOptions.className && ! oOptions.sClass )
+ {
+ oOptions.sClass = oOptions.className;
+ }
+
+ $.extend( oCol, oOptions );
+ _fnMap( oCol, oOptions, "sWidth", "sWidthOrig" );
+
+ /* iDataSort to be applied (backwards compatibility), but aDataSort will take
+ * priority if defined
+ */
+ if ( oOptions.iDataSort !== undefined )
+ {
+ oCol.aDataSort = [ oOptions.iDataSort ];
+ }
+ _fnMap( oCol, oOptions, "aDataSort" );
+ }
+
+ /* Cache the data get and set functions for speed */
+ var mDataSrc = oCol.mData;
+ var mData = _fnGetObjectDataFn( mDataSrc );
+ var mRender = oCol.mRender ? _fnGetObjectDataFn( oCol.mRender ) : null;
+
+ var attrTest = function( src ) {
+ return typeof src === 'string' && src.indexOf('@') !== -1;
+ };
+ oCol._bAttrSrc = $.isPlainObject( mDataSrc ) && (
+ attrTest(mDataSrc.sort) || attrTest(mDataSrc.type) || attrTest(mDataSrc.filter)
+ );
+ oCol._setter = null;
+
+ oCol.fnGetData = function (rowData, type, meta) {
+ var innerData = mData( rowData, type, undefined, meta );
+
+ return mRender && type ?
+ mRender( innerData, type, rowData, meta ) :
+ innerData;
+ };
+ oCol.fnSetData = function ( rowData, val, meta ) {
+ return _fnSetObjectDataFn( mDataSrc )( rowData, val, meta );
+ };
+
+ // Indicate if DataTables should read DOM data as an object or array
+ // Used in _fnGetRowElements
+ if ( typeof mDataSrc !== 'number' ) {
+ oSettings._rowReadObject = true;
+ }
+
+ /* Feature sorting overrides column specific when off */
+ if ( !oSettings.oFeatures.bSort )
+ {
+ oCol.bSortable = false;
+ th.addClass( oClasses.sSortableNone ); // Have to add class here as order event isn't called
+ }
+
+ /* Check that the class assignment is correct for sorting */
+ var bAsc = $.inArray('asc', oCol.asSorting) !== -1;
+ var bDesc = $.inArray('desc', oCol.asSorting) !== -1;
+ if ( !oCol.bSortable || (!bAsc && !bDesc) )
+ {
+ oCol.sSortingClass = oClasses.sSortableNone;
+ oCol.sSortingClassJUI = "";
+ }
+ else if ( bAsc && !bDesc )
+ {
+ oCol.sSortingClass = oClasses.sSortableAsc;
+ oCol.sSortingClassJUI = oClasses.sSortJUIAscAllowed;
+ }
+ else if ( !bAsc && bDesc )
+ {
+ oCol.sSortingClass = oClasses.sSortableDesc;
+ oCol.sSortingClassJUI = oClasses.sSortJUIDescAllowed;
+ }
+ else
+ {
+ oCol.sSortingClass = oClasses.sSortable;
+ oCol.sSortingClassJUI = oClasses.sSortJUI;
+ }
+ }
+
+
+ /**
+ * Adjust the table column widths for new data. Note: you would probably want to
+ * do a redraw after calling this function!
+ * @param {object} settings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnAdjustColumnSizing ( settings )
+ {
+ /* Not interested in doing column width calculation if auto-width is disabled */
+ if ( settings.oFeatures.bAutoWidth !== false )
+ {
+ var columns = settings.aoColumns;
+
+ _fnCalculateColumnWidths( settings );
+ for ( var i=0 , iLen=columns.length ; i<iLen ; i++ )
+ {
+ columns[i].nTh.style.width = columns[i].sWidth;
+ }
+ }
+
+ var scroll = settings.oScroll;
+ if ( scroll.sY !== '' || scroll.sX !== '')
+ {
+ _fnScrollDraw( settings );
+ }
+
+ _fnCallbackFire( settings, null, 'column-sizing', [settings] );
+ }
+
+
+ /**
+ * Covert the index of a visible column to the index in the data array (take account
+ * of hidden columns)
+ * @param {object} oSettings dataTables settings object
+ * @param {int} iMatch Visible column index to lookup
+ * @returns {int} i the data index
+ * @memberof DataTable#oApi
+ */
+ function _fnVisibleToColumnIndex( oSettings, iMatch )
+ {
+ var aiVis = _fnGetColumns( oSettings, 'bVisible' );
+
+ return typeof aiVis[iMatch] === 'number' ?
+ aiVis[iMatch] :
+ null;
+ }
+
+
+ /**
+ * Covert the index of an index in the data array and convert it to the visible
+ * column index (take account of hidden columns)
+ * @param {int} iMatch Column index to lookup
+ * @param {object} oSettings dataTables settings object
+ * @returns {int} i the data index
+ * @memberof DataTable#oApi
+ */
+ function _fnColumnIndexToVisible( oSettings, iMatch )
+ {
+ var aiVis = _fnGetColumns( oSettings, 'bVisible' );
+ var iPos = $.inArray( iMatch, aiVis );
+
+ return iPos !== -1 ? iPos : null;
+ }
+
+
+ /**
+ * Get the number of visible columns
+ * @param {object} oSettings dataTables settings object
+ * @returns {int} i the number of visible columns
+ * @memberof DataTable#oApi
+ */
+ function _fnVisbleColumns( oSettings )
+ {
+ return $( _pluck( oSettings.aoColumns, 'nTh' ) ).filter(':visible').length;
+ }
+
+
+ /**
+ * Get an array of column indexes that match a given property
+ * @param {object} oSettings dataTables settings object
+ * @param {string} sParam Parameter in aoColumns to look for - typically
+ * bVisible or bSearchable
+ * @returns {array} Array of indexes with matched properties
+ * @memberof DataTable#oApi
+ */
+ function _fnGetColumns( oSettings, sParam )
+ {
+ var a = [];
+
+ $.map( oSettings.aoColumns, function(val, i) {
+ if ( val[sParam] ) {
+ a.push( i );
+ }
+ } );
+
+ return a;
+ }
+
+
+ /**
+ * Calculate the 'type' of a column
+ * @param {object} settings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnColumnTypes ( settings )
+ {
+ var columns = settings.aoColumns;
+ var data = settings.aoData;
+ var types = DataTable.ext.type.detect;
+ var i, ien, j, jen, k, ken;
+ var col, cell, detectedType, cache;
+
+ // For each column, spin over the
+ for ( i=0, ien=columns.length ; i<ien ; i++ ) {
+ col = columns[i];
+ cache = [];
+
+ if ( ! col.sType && col._sManualType ) {
+ col.sType = col._sManualType;
+ }
+ else if ( ! col.sType ) {
+ for ( j=0, jen=types.length ; j<jen ; j++ ) {
+ for ( k=0, ken=data.length ; k<ken ; k++ ) {
+ // Use a cache array so we only need to get the type data
+ // from the formatter once (when using multiple detectors)
+ if ( cache[k] === undefined ) {
+ cache[k] = _fnGetCellData( settings, k, i, 'type' );
+ }
+
+ detectedType = types[j]( cache[k], settings );
+
+ // If null, then this type can't apply to this column, so
+ // rather than testing all cells, break out. There is an
+ // exception for the last type which is `html`. We need to
+ // scan all rows since it is possible to mix string and HTML
+ // types
+ if ( ! detectedType && j !== types.length-1 ) {
+ break;
+ }
+
+ // Only a single match is needed for html type since it is
+ // bottom of the pile and very similar to string
+ if ( detectedType === 'html' ) {
+ break;
+ }
+ }
+
+ // Type is valid for all data points in the column - use this
+ // type
+ if ( detectedType ) {
+ col.sType = detectedType;
+ break;
+ }
+ }
+
+ // Fall back - if no type was detected, always use string
+ if ( ! col.sType ) {
+ col.sType = 'string';
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Take the column definitions and static columns arrays and calculate how
+ * they relate to column indexes. The callback function will then apply the
+ * definition found for a column to a suitable configuration object.
+ * @param {object} oSettings dataTables settings object
+ * @param {array} aoColDefs The aoColumnDefs array that is to be applied
+ * @param {array} aoCols The aoColumns array that defines columns individually
+ * @param {function} fn Callback function - takes two parameters, the calculated
+ * column index and the definition for that column.
+ * @memberof DataTable#oApi
+ */
+ function _fnApplyColumnDefs( oSettings, aoColDefs, aoCols, fn )
+ {
+ var i, iLen, j, jLen, k, kLen, def;
+ var columns = oSettings.aoColumns;
+
+ // Column definitions with aTargets
+ if ( aoColDefs )
+ {
+ /* Loop over the definitions array - loop in reverse so first instance has priority */
+ for ( i=aoColDefs.length-1 ; i>=0 ; i-- )
+ {
+ def = aoColDefs[i];
+
+ /* Each definition can target multiple columns, as it is an array */
+ var aTargets = def.targets !== undefined ?
+ def.targets :
+ def.aTargets;
+
+ if ( ! $.isArray( aTargets ) )
+ {
+ aTargets = [ aTargets ];
+ }
+
+ for ( j=0, jLen=aTargets.length ; j<jLen ; j++ )
+ {
+ if ( typeof aTargets[j] === 'number' && aTargets[j] >= 0 )
+ {
+ /* Add columns that we don't yet know about */
+ while( columns.length <= aTargets[j] )
+ {
+ _fnAddColumn( oSettings );
+ }
+
+ /* Integer, basic index */
+ fn( aTargets[j], def );
+ }
+ else if ( typeof aTargets[j] === 'number' && aTargets[j] < 0 )
+ {
+ /* Negative integer, right to left column counting */
+ fn( columns.length+aTargets[j], def );
+ }
+ else if ( typeof aTargets[j] === 'string' )
+ {
+ /* Class name matching on TH element */
+ for ( k=0, kLen=columns.length ; k<kLen ; k++ )
+ {
+ if ( aTargets[j] == "_all" ||
+ $(columns[k].nTh).hasClass( aTargets[j] ) )
+ {
+ fn( k, def );
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // Statically defined columns array
+ if ( aoCols )
+ {
+ for ( i=0, iLen=aoCols.length ; i<iLen ; i++ )
+ {
+ fn( i, aoCols[i] );
+ }
+ }
+ }
+
+ /**
+ * Add a data array to the table, creating DOM node etc. This is the parallel to
+ * _fnGatherData, but for adding rows from a Javascript source, rather than a
+ * DOM source.
+ * @param {object} oSettings dataTables settings object
+ * @param {array} aData data array to be added
+ * @param {node} [nTr] TR element to add to the table - optional. If not given,
+ * DataTables will create a row automatically
+ * @param {array} [anTds] Array of TD|TH elements for the row - must be given
+ * if nTr is.
+ * @returns {int} >=0 if successful (index of new aoData entry), -1 if failed
+ * @memberof DataTable#oApi
+ */
+ function _fnAddData ( oSettings, aDataIn, nTr, anTds )
+ {
+ /* Create the object for storing information about this new row */
+ var iRow = oSettings.aoData.length;
+ var oData = $.extend( true, {}, DataTable.models.oRow, {
+ src: nTr ? 'dom' : 'data',
+ idx: iRow
+ } );
+
+ oData._aData = aDataIn;
+ oSettings.aoData.push( oData );
+
+ /* Create the cells */
+ var nTd, sThisType;
+ var columns = oSettings.aoColumns;
+
+ // Invalidate the column types as the new data needs to be revalidated
+ for ( var i=0, iLen=columns.length ; i<iLen ; i++ )
+ {
+ columns[i].sType = null;
+ }
+
+ /* Add to the display array */
+ oSettings.aiDisplayMaster.push( iRow );
+
+ var id = oSettings.rowIdFn( aDataIn );
+ if ( id !== undefined ) {
+ oSettings.aIds[ id ] = oData;
+ }
+
+ /* Create the DOM information, or register it if already present */
+ if ( nTr || ! oSettings.oFeatures.bDeferRender )
+ {
+ _fnCreateTr( oSettings, iRow, nTr, anTds );
+ }
+
+ return iRow;
+ }
+
+
+ /**
+ * Add one or more TR elements to the table. Generally we'd expect to
+ * use this for reading data from a DOM sourced table, but it could be
+ * used for an TR element. Note that if a TR is given, it is used (i.e.
+ * it is not cloned).
+ * @param {object} settings dataTables settings object
+ * @param {array|node|jQuery} trs The TR element(s) to add to the table
+ * @returns {array} Array of indexes for the added rows
+ * @memberof DataTable#oApi
+ */
+ function _fnAddTr( settings, trs )
+ {
+ var row;
+
+ // Allow an individual node to be passed in
+ if ( ! (trs instanceof $) ) {
+ trs = $(trs);
+ }
+
+ return trs.map( function (i, el) {
+ row = _fnGetRowElements( settings, el );
+ return _fnAddData( settings, row.data, el, row.cells );
+ } );
+ }
+
+
+ /**
+ * Take a TR element and convert it to an index in aoData
+ * @param {object} oSettings dataTables settings object
+ * @param {node} n the TR element to find
+ * @returns {int} index if the node is found, null if not
+ * @memberof DataTable#oApi
+ */
+ function _fnNodeToDataIndex( oSettings, n )
+ {
+ return (n._DT_RowIndex!==undefined) ? n._DT_RowIndex : null;
+ }
+
+
+ /**
+ * Take a TD element and convert it into a column data index (not the visible index)
+ * @param {object} oSettings dataTables settings object
+ * @param {int} iRow The row number the TD/TH can be found in
+ * @param {node} n The TD/TH element to find
+ * @returns {int} index if the node is found, -1 if not
+ * @memberof DataTable#oApi
+ */
+ function _fnNodeToColumnIndex( oSettings, iRow, n )
+ {
+ return $.inArray( n, oSettings.aoData[ iRow ].anCells );
+ }
+
+
+ /**
+ * Get the data for a given cell from the internal cache, taking into account data mapping
+ * @param {object} settings dataTables settings object
+ * @param {int} rowIdx aoData row id
+ * @param {int} colIdx Column index
+ * @param {string} type data get type ('display', 'type' 'filter' 'sort')
+ * @returns {*} Cell data
+ * @memberof DataTable#oApi
+ */
+ function _fnGetCellData( settings, rowIdx, colIdx, type )
+ {
+ var draw = settings.iDraw;
+ var col = settings.aoColumns[colIdx];
+ var rowData = settings.aoData[rowIdx]._aData;
+ var defaultContent = col.sDefaultContent;
+ var cellData = col.fnGetData( rowData, type, {
+ settings: settings,
+ row: rowIdx,
+ col: colIdx
+ } );
+
+ if ( cellData === undefined ) {
+ if ( settings.iDrawError != draw && defaultContent === null ) {
+ _fnLog( settings, 0, "Requested unknown parameter "+
+ (typeof col.mData=='function' ? '{function}' : "'"+col.mData+"'")+
+ " for row "+rowIdx+", column "+colIdx, 4 );
+ settings.iDrawError = draw;
+ }
+ return defaultContent;
+ }
+
+ // When the data source is null and a specific data type is requested (i.e.
+ // not the original data), we can use default column data
+ if ( (cellData === rowData || cellData === null) && defaultContent !== null && type !== undefined ) {
+ cellData = defaultContent;
+ }
+ else if ( typeof cellData === 'function' ) {
+ // If the data source is a function, then we run it and use the return,
+ // executing in the scope of the data object (for instances)
+ return cellData.call( rowData );
+ }
+
+ if ( cellData === null && type == 'display' ) {
+ return '';
+ }
+ return cellData;
+ }
+
+
+ /**
+ * Set the value for a specific cell, into the internal data cache
+ * @param {object} settings dataTables settings object
+ * @param {int} rowIdx aoData row id
+ * @param {int} colIdx Column index
+ * @param {*} val Value to set
+ * @memberof DataTable#oApi
+ */
+ function _fnSetCellData( settings, rowIdx, colIdx, val )
+ {
+ var col = settings.aoColumns[colIdx];
+ var rowData = settings.aoData[rowIdx]._aData;
+
+ col.fnSetData( rowData, val, {
+ settings: settings,
+ row: rowIdx,
+ col: colIdx
+ } );
+ }
+
+
+ // Private variable that is used to match action syntax in the data property object
+ var __reArray = /\[.*?\]$/;
+ var __reFn = /\(\)$/;
+
+ /**
+ * Split string on periods, taking into account escaped periods
+ * @param {string} str String to split
+ * @return {array} Split string
+ */
+ function _fnSplitObjNotation( str )
+ {
+ return $.map( str.match(/(\\.|[^\.])+/g) || [''], function ( s ) {
+ return s.replace(/\\./g, '.');
+ } );
+ }
+
+
+ /**
+ * Return a function that can be used to get data from a source object, taking
+ * into account the ability to use nested objects as a source
+ * @param {string|int|function} mSource The data source for the object
+ * @returns {function} Data get function
+ * @memberof DataTable#oApi
+ */
+ function _fnGetObjectDataFn( mSource )
+ {
+ if ( $.isPlainObject( mSource ) )
+ {
+ /* Build an object of get functions, and wrap them in a single call */
+ var o = {};
+ $.each( mSource, function (key, val) {
+ if ( val ) {
+ o[key] = _fnGetObjectDataFn( val );
+ }
+ } );
+
+ return function (data, type, row, meta) {
+ var t = o[type] || o._;
+ return t !== undefined ?
+ t(data, type, row, meta) :
+ data;
+ };
+ }
+ else if ( mSource === null )
+ {
+ /* Give an empty string for rendering / sorting etc */
+ return function (data) { // type, row and meta also passed, but not used
+ return data;
+ };
+ }
+ else if ( typeof mSource === 'function' )
+ {
+ return function (data, type, row, meta) {
+ return mSource( data, type, row, meta );
+ };
+ }
+ else if ( typeof mSource === 'string' && (mSource.indexOf('.') !== -1 ||
+ mSource.indexOf('[') !== -1 || mSource.indexOf('(') !== -1) )
+ {
+ /* If there is a . in the source string then the data source is in a
+ * nested object so we loop over the data for each level to get the next
+ * level down. On each loop we test for undefined, and if found immediately
+ * return. This allows entire objects to be missing and sDefaultContent to
+ * be used if defined, rather than throwing an error
+ */
+ var fetchData = function (data, type, src) {
+ var arrayNotation, funcNotation, out, innerSrc;
+
+ if ( src !== "" )
+ {
+ var a = _fnSplitObjNotation( src );
+
+ for ( var i=0, iLen=a.length ; i<iLen ; i++ )
+ {
+ // Check if we are dealing with special notation
+ arrayNotation = a[i].match(__reArray);
+ funcNotation = a[i].match(__reFn);
+
+ if ( arrayNotation )
+ {
+ // Array notation
+ a[i] = a[i].replace(__reArray, '');
+
+ // Condition allows simply [] to be passed in
+ if ( a[i] !== "" ) {
+ data = data[ a[i] ];
+ }
+ out = [];
+
+ // Get the remainder of the nested object to get
+ a.splice( 0, i+1 );
+ innerSrc = a.join('.');
+
+ // Traverse each entry in the array getting the properties requested
+ if ( $.isArray( data ) ) {
+ for ( var j=0, jLen=data.length ; j<jLen ; j++ ) {
+ out.push( fetchData( data[j], type, innerSrc ) );
+ }
+ }
+
+ // If a string is given in between the array notation indicators, that
+ // is used to join the strings together, otherwise an array is returned
+ var join = arrayNotation[0].substring(1, arrayNotation[0].length-1);
+ data = (join==="") ? out : out.join(join);
+
+ // The inner call to fetchData has already traversed through the remainder
+ // of the source requested, so we exit from the loop
+ break;
+ }
+ else if ( funcNotation )
+ {
+ // Function call
+ a[i] = a[i].replace(__reFn, '');
+ data = data[ a[i] ]();
+ continue;
+ }
+
+ if ( data === null || data[ a[i] ] === undefined )
+ {
+ return undefined;
+ }
+ data = data[ a[i] ];
+ }
+ }
+
+ return data;
+ };
+
+ return function (data, type) { // row and meta also passed, but not used
+ return fetchData( data, type, mSource );
+ };
+ }
+ else
+ {
+ /* Array or flat object mapping */
+ return function (data, type) { // row and meta also passed, but not used
+ return data[mSource];
+ };
+ }
+ }
+
+
+ /**
+ * Return a function that can be used to set data from a source object, taking
+ * into account the ability to use nested objects as a source
+ * @param {string|int|function} mSource The data source for the object
+ * @returns {function} Data set function
+ * @memberof DataTable#oApi
+ */
+ function _fnSetObjectDataFn( mSource )
+ {
+ if ( $.isPlainObject( mSource ) )
+ {
+ /* Unlike get, only the underscore (global) option is used for for
+ * setting data since we don't know the type here. This is why an object
+ * option is not documented for `mData` (which is read/write), but it is
+ * for `mRender` which is read only.
+ */
+ return _fnSetObjectDataFn( mSource._ );
+ }
+ else if ( mSource === null )
+ {
+ /* Nothing to do when the data source is null */
+ return function () {};
+ }
+ else if ( typeof mSource === 'function' )
+ {
+ return function (data, val, meta) {
+ mSource( data, 'set', val, meta );
+ };
+ }
+ else if ( typeof mSource === 'string' && (mSource.indexOf('.') !== -1 ||
+ mSource.indexOf('[') !== -1 || mSource.indexOf('(') !== -1) )
+ {
+ /* Like the get, we need to get data from a nested object */
+ var setData = function (data, val, src) {
+ var a = _fnSplitObjNotation( src ), b;
+ var aLast = a[a.length-1];
+ var arrayNotation, funcNotation, o, innerSrc;
+
+ for ( var i=0, iLen=a.length-1 ; i<iLen ; i++ )
+ {
+ // Check if we are dealing with an array notation request
+ arrayNotation = a[i].match(__reArray);
+ funcNotation = a[i].match(__reFn);
+
+ if ( arrayNotation )
+ {
+ a[i] = a[i].replace(__reArray, '');
+ data[ a[i] ] = [];
+
+ // Get the remainder of the nested object to set so we can recurse
+ b = a.slice();
+ b.splice( 0, i+1 );
+ innerSrc = b.join('.');
+
+ // Traverse each entry in the array setting the properties requested
+ if ( $.isArray( val ) )
+ {
+ for ( var j=0, jLen=val.length ; j<jLen ; j++ )
+ {
+ o = {};
+ setData( o, val[j], innerSrc );
+ data[ a[i] ].push( o );
+ }
+ }
+ else
+ {
+ // We've been asked to save data to an array, but it
+ // isn't array data to be saved. Best that can be done
+ // is to just save the value.
+ data[ a[i] ] = val;
+ }
+
+ // The inner call to setData has already traversed through the remainder
+ // of the source and has set the data, thus we can exit here
+ return;
+ }
+ else if ( funcNotation )
+ {
+ // Function call
+ a[i] = a[i].replace(__reFn, '');
+ data = data[ a[i] ]( val );
+ }
+
+ // If the nested object doesn't currently exist - since we are
+ // trying to set the value - create it
+ if ( data[ a[i] ] === null || data[ a[i] ] === undefined )
+ {
+ data[ a[i] ] = {};
+ }
+ data = data[ a[i] ];
+ }
+
+ // Last item in the input - i.e, the actual set
+ if ( aLast.match(__reFn ) )
+ {
+ // Function call
+ data = data[ aLast.replace(__reFn, '') ]( val );
+ }
+ else
+ {
+ // If array notation is used, we just want to strip it and use the property name
+ // and assign the value. If it isn't used, then we get the result we want anyway
+ data[ aLast.replace(__reArray, '') ] = val;
+ }
+ };
+
+ return function (data, val) { // meta is also passed in, but not used
+ return setData( data, val, mSource );
+ };
+ }
+ else
+ {
+ /* Array or flat object mapping */
+ return function (data, val) { // meta is also passed in, but not used
+ data[mSource] = val;
+ };
+ }
+ }
+
+
+ /**
+ * Return an array with the full table data
+ * @param {object} oSettings dataTables settings object
+ * @returns array {array} aData Master data array
+ * @memberof DataTable#oApi
+ */
+ function _fnGetDataMaster ( settings )
+ {
+ return _pluck( settings.aoData, '_aData' );
+ }
+
+
+ /**
+ * Nuke the table
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnClearTable( settings )
+ {
+ settings.aoData.length = 0;
+ settings.aiDisplayMaster.length = 0;
+ settings.aiDisplay.length = 0;
+ settings.aIds = {};
+ }
+
+
+ /**
+ * Take an array of integers (index array) and remove a target integer (value - not
+ * the key!)
+ * @param {array} a Index array to target
+ * @param {int} iTarget value to find
+ * @memberof DataTable#oApi
+ */
+ function _fnDeleteIndex( a, iTarget, splice )
+ {
+ var iTargetIndex = -1;
+
+ for ( var i=0, iLen=a.length ; i<iLen ; i++ )
+ {
+ if ( a[i] == iTarget )
+ {
+ iTargetIndex = i;
+ }
+ else if ( a[i] > iTarget )
+ {
+ a[i]--;
+ }
+ }
+
+ if ( iTargetIndex != -1 && splice === undefined )
+ {
+ a.splice( iTargetIndex, 1 );
+ }
+ }
+
+
+ /**
+ * Mark cached data as invalid such that a re-read of the data will occur when
+ * the cached data is next requested. Also update from the data source object.
+ *
+ * @param {object} settings DataTables settings object
+ * @param {int} rowIdx Row index to invalidate
+ * @param {string} [src] Source to invalidate from: undefined, 'auto', 'dom'
+ * or 'data'
+ * @param {int} [colIdx] Column index to invalidate. If undefined the whole
+ * row will be invalidated
+ * @memberof DataTable#oApi
+ *
+ * @todo For the modularisation of v1.11 this will need to become a callback, so
+ * the sort and filter methods can subscribe to it. That will required
+ * initialisation options for sorting, which is why it is not already baked in
+ */
+ function _fnInvalidate( settings, rowIdx, src, colIdx )
+ {
+ var row = settings.aoData[ rowIdx ];
+ var i, ien;
+ var cellWrite = function ( cell, col ) {
+ // This is very frustrating, but in IE if you just write directly
+ // to innerHTML, and elements that are overwritten are GC'ed,
+ // even if there is a reference to them elsewhere
+ while ( cell.childNodes.length ) {
+ cell.removeChild( cell.firstChild );
+ }
+
+ cell.innerHTML = _fnGetCellData( settings, rowIdx, col, 'display' );
+ };
+
+ // Are we reading last data from DOM or the data object?
+ if ( src === 'dom' || ((! src || src === 'auto') && row.src === 'dom') ) {
+ // Read the data from the DOM
+ row._aData = _fnGetRowElements(
+ settings, row, colIdx, colIdx === undefined ? undefined : row._aData
+ )
+ .data;
+ }
+ else {
+ // Reading from data object, update the DOM
+ var cells = row.anCells;
+
+ if ( cells ) {
+ if ( colIdx !== undefined ) {
+ cellWrite( cells[colIdx], colIdx );
+ }
+ else {
+ for ( i=0, ien=cells.length ; i<ien ; i++ ) {
+ cellWrite( cells[i], i );
+ }
+ }
+ }
+ }
+
+ // For both row and cell invalidation, the cached data for sorting and
+ // filtering is nulled out
+ row._aSortData = null;
+ row._aFilterData = null;
+
+ // Invalidate the type for a specific column (if given) or all columns since
+ // the data might have changed
+ var cols = settings.aoColumns;
+ if ( colIdx !== undefined ) {
+ cols[ colIdx ].sType = null;
+ }
+ else {
+ for ( i=0, ien=cols.length ; i<ien ; i++ ) {
+ cols[i].sType = null;
+ }
+
+ // Update DataTables special `DT_*` attributes for the row
+ _fnRowAttributes( settings, row );
+ }
+ }
+
+
+ /**
+ * Build a data source object from an HTML row, reading the contents of the
+ * cells that are in the row.
+ *
+ * @param {object} settings DataTables settings object
+ * @param {node|object} TR element from which to read data or existing row
+ * object from which to re-read the data from the cells
+ * @param {int} [colIdx] Optional column index
+ * @param {array|object} [d] Data source object. If `colIdx` is given then this
+ * parameter should also be given and will be used to write the data into.
+ * Only the column in question will be written
+ * @returns {object} Object with two parameters: `data` the data read, in
+ * document order, and `cells` and array of nodes (they can be useful to the
+ * caller, so rather than needing a second traversal to get them, just return
+ * them from here).
+ * @memberof DataTable#oApi
+ */
+ function _fnGetRowElements( settings, row, colIdx, d )
+ {
+ var
+ tds = [],
+ td = row.firstChild,
+ name, col, o, i=0, contents,
+ columns = settings.aoColumns,
+ objectRead = settings._rowReadObject;
+
+ // Allow the data object to be passed in, or construct
+ d = d !== undefined ?
+ d :
+ objectRead ?
+ {} :
+ [];
+
+ var attr = function ( str, td ) {
+ if ( typeof str === 'string' ) {
+ var idx = str.indexOf('@');
+
+ if ( idx !== -1 ) {
+ var attr = str.substring( idx+1 );
+ var setter = _fnSetObjectDataFn( str );
+ setter( d, td.getAttribute( attr ) );
+ }
+ }
+ };
+
+ // Read data from a cell and store into the data object
+ var cellProcess = function ( cell ) {
+ if ( colIdx === undefined || colIdx === i ) {
+ col = columns[i];
+ contents = $.trim(cell.innerHTML);
+
+ if ( col && col._bAttrSrc ) {
+ var setter = _fnSetObjectDataFn( col.mData._ );
+ setter( d, contents );
+
+ attr( col.mData.sort, cell );
+ attr( col.mData.type, cell );
+ attr( col.mData.filter, cell );
+ }
+ else {
+ // Depending on the `data` option for the columns the data can
+ // be read to either an object or an array.
+ if ( objectRead ) {
+ if ( ! col._setter ) {
+ // Cache the setter function
+ col._setter = _fnSetObjectDataFn( col.mData );
+ }
+ col._setter( d, contents );
+ }
+ else {
+ d[i] = contents;
+ }
+ }
+ }
+
+ i++;
+ };
+
+ if ( td ) {
+ // `tr` element was passed in
+ while ( td ) {
+ name = td.nodeName.toUpperCase();
+
+ if ( name == "TD" || name == "TH" ) {
+ cellProcess( td );
+ tds.push( td );
+ }
+
+ td = td.nextSibling;
+ }
+ }
+ else {
+ // Existing row object passed in
+ tds = row.anCells;
+
+ for ( var j=0, jen=tds.length ; j<jen ; j++ ) {
+ cellProcess( tds[j] );
+ }
+ }
+
+ // Read the ID from the DOM if present
+ var rowNode = row.firstChild ? row : row.nTr;
+
+ if ( rowNode ) {
+ var id = rowNode.getAttribute( 'id' );
+
+ if ( id ) {
+ _fnSetObjectDataFn( settings.rowId )( d, id );
+ }
+ }
+
+ return {
+ data: d,
+ cells: tds
+ };
+ }
+ /**
+ * Create a new TR element (and it's TD children) for a row
+ * @param {object} oSettings dataTables settings object
+ * @param {int} iRow Row to consider
+ * @param {node} [nTrIn] TR element to add to the table - optional. If not given,
+ * DataTables will create a row automatically
+ * @param {array} [anTds] Array of TD|TH elements for the row - must be given
+ * if nTr is.
+ * @memberof DataTable#oApi
+ */
+ function _fnCreateTr ( oSettings, iRow, nTrIn, anTds )
+ {
+ var
+ row = oSettings.aoData[iRow],
+ rowData = row._aData,
+ cells = [],
+ nTr, nTd, oCol,
+ i, iLen;
+
+ if ( row.nTr === null )
+ {
+ nTr = nTrIn || document.createElement('tr');
+
+ row.nTr = nTr;
+ row.anCells = cells;
+
+ /* Use a private property on the node to allow reserve mapping from the node
+ * to the aoData array for fast look up
+ */
+ nTr._DT_RowIndex = iRow;
+
+ /* Special parameters can be given by the data source to be used on the row */
+ _fnRowAttributes( oSettings, row );
+
+ /* Process each column */
+ for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
+ {
+ oCol = oSettings.aoColumns[i];
+
+ nTd = nTrIn ? anTds[i] : document.createElement( oCol.sCellType );
+ nTd._DT_CellIndex = {
+ row: iRow,
+ column: i
+ };
+
+ cells.push( nTd );
+
+ // Need to create the HTML if new, or if a rendering function is defined
+ if ( (!nTrIn || oCol.mRender || oCol.mData !== i) &&
+ (!$.isPlainObject(oCol.mData) || oCol.mData._ !== i+'.display')
+ ) {
+ nTd.innerHTML = _fnGetCellData( oSettings, iRow, i, 'display' );
+ }
+
+ /* Add user defined class */
+ if ( oCol.sClass )
+ {
+ nTd.className += ' '+oCol.sClass;
+ }
+
+ // Visibility - add or remove as required
+ if ( oCol.bVisible && ! nTrIn )
+ {
+ nTr.appendChild( nTd );
+ }
+ else if ( ! oCol.bVisible && nTrIn )
+ {
+ nTd.parentNode.removeChild( nTd );
+ }
+
+ if ( oCol.fnCreatedCell )
+ {
+ oCol.fnCreatedCell.call( oSettings.oInstance,
+ nTd, _fnGetCellData( oSettings, iRow, i ), rowData, iRow, i
+ );
+ }
+ }
+
+ _fnCallbackFire( oSettings, 'aoRowCreatedCallback', null, [nTr, rowData, iRow] );
+ }
+
+ // Remove once webkit bug 131819 and Chromium bug 365619 have been resolved
+ // and deployed
+ row.nTr.setAttribute( 'role', 'row' );
+ }
+
+
+ /**
+ * Add attributes to a row based on the special `DT_*` parameters in a data
+ * source object.
+ * @param {object} settings DataTables settings object
+ * @param {object} DataTables row object for the row to be modified
+ * @memberof DataTable#oApi
+ */
+ function _fnRowAttributes( settings, row )
+ {
+ var tr = row.nTr;
+ var data = row._aData;
+
+ if ( tr ) {
+ var id = settings.rowIdFn( data );
+
+ if ( id ) {
+ tr.id = id;
+ }
+
+ if ( data.DT_RowClass ) {
+ // Remove any classes added by DT_RowClass before
+ var a = data.DT_RowClass.split(' ');
+ row.__rowc = row.__rowc ?
+ _unique( row.__rowc.concat( a ) ) :
+ a;
+
+ $(tr)
+ .removeClass( row.__rowc.join(' ') )
+ .addClass( data.DT_RowClass );
+ }
+
+ if ( data.DT_RowAttr ) {
+ $(tr).attr( data.DT_RowAttr );
+ }
+
+ if ( data.DT_RowData ) {
+ $(tr).data( data.DT_RowData );
+ }
+ }
+ }
+
+
+ /**
+ * Create the HTML header for the table
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnBuildHead( oSettings )
+ {
+ var i, ien, cell, row, column;
+ var thead = oSettings.nTHead;
+ var tfoot = oSettings.nTFoot;
+ var createHeader = $('th, td', thead).length === 0;
+ var classes = oSettings.oClasses;
+ var columns = oSettings.aoColumns;
+
+ if ( createHeader ) {
+ row = $('<tr/>').appendTo( thead );
+ }
+
+ for ( i=0, ien=columns.length ; i<ien ; i++ ) {
+ column = columns[i];
+ cell = $( column.nTh ).addClass( column.sClass );
+
+ if ( createHeader ) {
+ cell.appendTo( row );
+ }
+
+ // 1.11 move into sorting
+ if ( oSettings.oFeatures.bSort ) {
+ cell.addClass( column.sSortingClass );
+
+ if ( column.bSortable !== false ) {
+ cell
+ .attr( 'tabindex', oSettings.iTabIndex )
+ .attr( 'aria-controls', oSettings.sTableId );
+
+ _fnSortAttachListener( oSettings, column.nTh, i );
+ }
+ }
+
+ if ( column.sTitle != cell[0].innerHTML ) {
+ cell.html( column.sTitle );
+ }
+
+ _fnRenderer( oSettings, 'header' )(
+ oSettings, cell, column, classes
+ );
+ }
+
+ if ( createHeader ) {
+ _fnDetectHeader( oSettings.aoHeader, thead );
+ }
+
+ /* ARIA role for the rows */
+ $(thead).find('>tr').attr('role', 'row');
+
+ /* Deal with the footer - add classes if required */
+ $(thead).find('>tr>th, >tr>td').addClass( classes.sHeaderTH );
+ $(tfoot).find('>tr>th, >tr>td').addClass( classes.sFooterTH );
+
+ // Cache the footer cells. Note that we only take the cells from the first
+ // row in the footer. If there is more than one row the user wants to
+ // interact with, they need to use the table().foot() method. Note also this
+ // allows cells to be used for multiple columns using colspan
+ if ( tfoot !== null ) {
+ var cells = oSettings.aoFooter[0];
+
+ for ( i=0, ien=cells.length ; i<ien ; i++ ) {
+ column = columns[i];
+ column.nTf = cells[i].cell;
+
+ if ( column.sClass ) {
+ $(column.nTf).addClass( column.sClass );
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Draw the header (or footer) element based on the column visibility states. The
+ * methodology here is to use the layout array from _fnDetectHeader, modified for
+ * the instantaneous column visibility, to construct the new layout. The grid is
+ * traversed over cell at a time in a rows x columns grid fashion, although each
+ * cell insert can cover multiple elements in the grid - which is tracks using the
+ * aApplied array. Cell inserts in the grid will only occur where there isn't
+ * already a cell in that position.
+ * @param {object} oSettings dataTables settings object
+ * @param array {objects} aoSource Layout array from _fnDetectHeader
+ * @param {boolean} [bIncludeHidden=false] If true then include the hidden columns in the calc,
+ * @memberof DataTable#oApi
+ */
+ function _fnDrawHead( oSettings, aoSource, bIncludeHidden )
+ {
+ var i, iLen, j, jLen, k, kLen, n, nLocalTr;
+ var aoLocal = [];
+ var aApplied = [];
+ var iColumns = oSettings.aoColumns.length;
+ var iRowspan, iColspan;
+
+ if ( ! aoSource )
+ {
+ return;
+ }
+
+ if ( bIncludeHidden === undefined )
+ {
+ bIncludeHidden = false;
+ }
+
+ /* Make a copy of the master layout array, but without the visible columns in it */
+ for ( i=0, iLen=aoSource.length ; i<iLen ; i++ )
+ {
+ aoLocal[i] = aoSource[i].slice();
+ aoLocal[i].nTr = aoSource[i].nTr;
+
+ /* Remove any columns which are currently hidden */
+ for ( j=iColumns-1 ; j>=0 ; j-- )
+ {
+ if ( !oSettings.aoColumns[j].bVisible && !bIncludeHidden )
+ {
+ aoLocal[i].splice( j, 1 );
+ }
+ }
+
+ /* Prep the applied array - it needs an element for each row */
+ aApplied.push( [] );
+ }
+
+ for ( i=0, iLen=aoLocal.length ; i<iLen ; i++ )
+ {
+ nLocalTr = aoLocal[i].nTr;
+
+ /* All cells are going to be replaced, so empty out the row */
+ if ( nLocalTr )
+ {
+ while( (n = nLocalTr.firstChild) )
+ {
+ nLocalTr.removeChild( n );
+ }
+ }
+
+ for ( j=0, jLen=aoLocal[i].length ; j<jLen ; j++ )
+ {
+ iRowspan = 1;
+ iColspan = 1;
+
+ /* Check to see if there is already a cell (row/colspan) covering our target
+ * insert point. If there is, then there is nothing to do.
+ */
+ if ( aApplied[i][j] === undefined )
+ {
+ nLocalTr.appendChild( aoLocal[i][j].cell );
+ aApplied[i][j] = 1;
+
+ /* Expand the cell to cover as many rows as needed */
+ while ( aoLocal[i+iRowspan] !== undefined &&
+ aoLocal[i][j].cell == aoLocal[i+iRowspan][j].cell )
+ {
+ aApplied[i+iRowspan][j] = 1;
+ iRowspan++;
+ }
+
+ /* Expand the cell to cover as many columns as needed */
+ while ( aoLocal[i][j+iColspan] !== undefined &&
+ aoLocal[i][j].cell == aoLocal[i][j+iColspan].cell )
+ {
+ /* Must update the applied array over the rows for the columns */
+ for ( k=0 ; k<iRowspan ; k++ )
+ {
+ aApplied[i+k][j+iColspan] = 1;
+ }
+ iColspan++;
+ }
+
+ /* Do the actual expansion in the DOM */
+ $(aoLocal[i][j].cell)
+ .attr('rowspan', iRowspan)
+ .attr('colspan', iColspan);
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Insert the required TR nodes into the table for display
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnDraw( oSettings )
+ {
+ /* Provide a pre-callback function which can be used to cancel the draw is false is returned */
+ var aPreDraw = _fnCallbackFire( oSettings, 'aoPreDrawCallback', 'preDraw', [oSettings] );
+ if ( $.inArray( false, aPreDraw ) !== -1 )
+ {
+ _fnProcessingDisplay( oSettings, false );
+ return;
+ }
+
+ var i, iLen, n;
+ var anRows = [];
+ var iRowCount = 0;
+ var asStripeClasses = oSettings.asStripeClasses;
+ var iStripes = asStripeClasses.length;
+ var iOpenRows = oSettings.aoOpenRows.length;
+ var oLang = oSettings.oLanguage;
+ var iInitDisplayStart = oSettings.iInitDisplayStart;
+ var bServerSide = _fnDataSource( oSettings ) == 'ssp';
+ var aiDisplay = oSettings.aiDisplay;
+
+ oSettings.bDrawing = true;
+
+ /* Check and see if we have an initial draw position from state saving */
+ if ( iInitDisplayStart !== undefined && iInitDisplayStart !== -1 )
+ {
+ oSettings._iDisplayStart = bServerSide ?
+ iInitDisplayStart :
+ iInitDisplayStart >= oSettings.fnRecordsDisplay() ?
+ 0 :
+ iInitDisplayStart;
+
+ oSettings.iInitDisplayStart = -1;
+ }
+
+ var iDisplayStart = oSettings._iDisplayStart;
+ var iDisplayEnd = oSettings.fnDisplayEnd();
+
+ /* Server-side processing draw intercept */
+ if ( oSettings.bDeferLoading )
+ {
+ oSettings.bDeferLoading = false;
+ oSettings.iDraw++;
+ _fnProcessingDisplay( oSettings, false );
+ }
+ else if ( !bServerSide )
+ {
+ oSettings.iDraw++;
+ }
+ else if ( !oSettings.bDestroying && !_fnAjaxUpdate( oSettings ) )
+ {
+ return;
+ }
+
+ if ( aiDisplay.length !== 0 )
+ {
+ var iStart = bServerSide ? 0 : iDisplayStart;
+ var iEnd = bServerSide ? oSettings.aoData.length : iDisplayEnd;
+
+ for ( var j=iStart ; j<iEnd ; j++ )
+ {
+ var iDataIndex = aiDisplay[j];
+ var aoData = oSettings.aoData[ iDataIndex ];
+ if ( aoData.nTr === null )
+ {
+ _fnCreateTr( oSettings, iDataIndex );
+ }
+
+ var nRow = aoData.nTr;
+
+ /* Remove the old striping classes and then add the new one */
+ if ( iStripes !== 0 )
+ {
+ var sStripe = asStripeClasses[ iRowCount % iStripes ];
+ if ( aoData._sRowStripe != sStripe )
+ {
+ $(nRow).removeClass( aoData._sRowStripe ).addClass( sStripe );
+ aoData._sRowStripe = sStripe;
+ }
+ }
+
+ // Row callback functions - might want to manipulate the row
+ // iRowCount and j are not currently documented. Are they at all
+ // useful?
+ _fnCallbackFire( oSettings, 'aoRowCallback', null,
+ [nRow, aoData._aData, iRowCount, j] );
+
+ anRows.push( nRow );
+ iRowCount++;
+ }
+ }
+ else
+ {
+ /* Table is empty - create a row with an empty message in it */
+ var sZero = oLang.sZeroRecords;
+ if ( oSettings.iDraw == 1 && _fnDataSource( oSettings ) == 'ajax' )
+ {
+ sZero = oLang.sLoadingRecords;
+ }
+ else if ( oLang.sEmptyTable && oSettings.fnRecordsTotal() === 0 )
+ {
+ sZero = oLang.sEmptyTable;
+ }
+
+ anRows[ 0 ] = $( '<tr/>', { 'class': iStripes ? asStripeClasses[0] : '' } )
+ .append( $('<td />', {
+ 'valign': 'top',
+ 'colSpan': _fnVisbleColumns( oSettings ),
+ 'class': oSettings.oClasses.sRowEmpty
+ } ).html( sZero ) )[0];
+ }
+
+ /* Header and footer callbacks */
+ _fnCallbackFire( oSettings, 'aoHeaderCallback', 'header', [ $(oSettings.nTHead).children('tr')[0],
+ _fnGetDataMaster( oSettings ), iDisplayStart, iDisplayEnd, aiDisplay ] );
+
+ _fnCallbackFire( oSettings, 'aoFooterCallback', 'footer', [ $(oSettings.nTFoot).children('tr')[0],
+ _fnGetDataMaster( oSettings ), iDisplayStart, iDisplayEnd, aiDisplay ] );
+
+ var body = $(oSettings.nTBody);
+
+ body.children().detach();
+ body.append( $(anRows) );
+
+ /* Call all required callback functions for the end of a draw */
+ _fnCallbackFire( oSettings, 'aoDrawCallback', 'draw', [oSettings] );
+
+ /* Draw is complete, sorting and filtering must be as well */
+ oSettings.bSorted = false;
+ oSettings.bFiltered = false;
+ oSettings.bDrawing = false;
+ }
+
+
+ /**
+ * Redraw the table - taking account of the various features which are enabled
+ * @param {object} oSettings dataTables settings object
+ * @param {boolean} [holdPosition] Keep the current paging position. By default
+ * the paging is reset to the first page
+ * @memberof DataTable#oApi
+ */
+ function _fnReDraw( settings, holdPosition )
+ {
+ var
+ features = settings.oFeatures,
+ sort = features.bSort,
+ filter = features.bFilter;
+
+ if ( sort ) {
+ _fnSort( settings );
+ }
+
+ if ( filter ) {
+ _fnFilterComplete( settings, settings.oPreviousSearch );
+ }
+ else {
+ // No filtering, so we want to just use the display master
+ settings.aiDisplay = settings.aiDisplayMaster.slice();
+ }
+
+ if ( holdPosition !== true ) {
+ settings._iDisplayStart = 0;
+ }
+
+ // Let any modules know about the draw hold position state (used by
+ // scrolling internally)
+ settings._drawHold = holdPosition;
+
+ _fnDraw( settings );
+
+ settings._drawHold = false;
+ }
+
+
+ /**
+ * Add the options to the page HTML for the table
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnAddOptionsHtml ( oSettings )
+ {
+ var classes = oSettings.oClasses;
+ var table = $(oSettings.nTable);
+ var holding = $('<div/>').insertBefore( table ); // Holding element for speed
+ var features = oSettings.oFeatures;
+
+ // All DataTables are wrapped in a div
+ var insert = $('<div/>', {
+ id: oSettings.sTableId+'_wrapper',
+ 'class': classes.sWrapper + (oSettings.nTFoot ? '' : ' '+classes.sNoFooter)
+ } );
+
+ oSettings.nHolding = holding[0];
+ oSettings.nTableWrapper = insert[0];
+ oSettings.nTableReinsertBefore = oSettings.nTable.nextSibling;
+
+ /* Loop over the user set positioning and place the elements as needed */
+ var aDom = oSettings.sDom.split('');
+ var featureNode, cOption, nNewNode, cNext, sAttr, j;
+ for ( var i=0 ; i<aDom.length ; i++ )
+ {
+ featureNode = null;
+ cOption = aDom[i];
+
+ if ( cOption == '<' )
+ {
+ /* New container div */
+ nNewNode = $('<div/>')[0];
+
+ /* Check to see if we should append an id and/or a class name to the container */
+ cNext = aDom[i+1];
+ if ( cNext == "'" || cNext == '"' )
+ {
+ sAttr = "";
+ j = 2;
+ while ( aDom[i+j] != cNext )
+ {
+ sAttr += aDom[i+j];
+ j++;
+ }
+
+ /* Replace jQuery UI constants @todo depreciated */
+ if ( sAttr == "H" )
+ {
+ sAttr = classes.sJUIHeader;
+ }
+ else if ( sAttr == "F" )
+ {
+ sAttr = classes.sJUIFooter;
+ }
+
+ /* The attribute can be in the format of "#id.class", "#id" or "class" This logic
+ * breaks the string into parts and applies them as needed
+ */
+ if ( sAttr.indexOf('.') != -1 )
+ {
+ var aSplit = sAttr.split('.');
+ nNewNode.id = aSplit[0].substr(1, aSplit[0].length-1);
+ nNewNode.className = aSplit[1];
+ }
+ else if ( sAttr.charAt(0) == "#" )
+ {
+ nNewNode.id = sAttr.substr(1, sAttr.length-1);
+ }
+ else
+ {
+ nNewNode.className = sAttr;
+ }
+
+ i += j; /* Move along the position array */
+ }
+
+ insert.append( nNewNode );
+ insert = $(nNewNode);
+ }
+ else if ( cOption == '>' )
+ {
+ /* End container div */
+ insert = insert.parent();
+ }
+ // @todo Move options into their own plugins?
+ else if ( cOption == 'l' && features.bPaginate && features.bLengthChange )
+ {
+ /* Length */
+ featureNode = _fnFeatureHtmlLength( oSettings );
+ }
+ else if ( cOption == 'f' && features.bFilter )
+ {
+ /* Filter */
+ featureNode = _fnFeatureHtmlFilter( oSettings );
+ }
+ else if ( cOption == 'r' && features.bProcessing )
+ {
+ /* pRocessing */
+ featureNode = _fnFeatureHtmlProcessing( oSettings );
+ }
+ else if ( cOption == 't' )
+ {
+ /* Table */
+ featureNode = _fnFeatureHtmlTable( oSettings );
+ }
+ else if ( cOption == 'i' && features.bInfo )
+ {
+ /* Info */
+ featureNode = _fnFeatureHtmlInfo( oSettings );
+ }
+ else if ( cOption == 'p' && features.bPaginate )
+ {
+ /* Pagination */
+ featureNode = _fnFeatureHtmlPaginate( oSettings );
+ }
+ else if ( DataTable.ext.feature.length !== 0 )
+ {
+ /* Plug-in features */
+ var aoFeatures = DataTable.ext.feature;
+ for ( var k=0, kLen=aoFeatures.length ; k<kLen ; k++ )
+ {
+ if ( cOption == aoFeatures[k].cFeature )
+ {
+ featureNode = aoFeatures[k].fnInit( oSettings );
+ break;
+ }
+ }
+ }
+
+ /* Add to the 2D features array */
+ if ( featureNode )
+ {
+ var aanFeatures = oSettings.aanFeatures;
+
+ if ( ! aanFeatures[cOption] )
+ {
+ aanFeatures[cOption] = [];
+ }
+
+ aanFeatures[cOption].push( featureNode );
+ insert.append( featureNode );
+ }
+ }
+
+ /* Built our DOM structure - replace the holding div with what we want */
+ holding.replaceWith( insert );
+ oSettings.nHolding = null;
+ }
+
+
+ /**
+ * Use the DOM source to create up an array of header cells. The idea here is to
+ * create a layout grid (array) of rows x columns, which contains a reference
+ * to the cell that that point in the grid (regardless of col/rowspan), such that
+ * any column / row could be removed and the new grid constructed
+ * @param array {object} aLayout Array to store the calculated layout in
+ * @param {node} nThead The header/footer element for the table
+ * @memberof DataTable#oApi
+ */
+ function _fnDetectHeader ( aLayout, nThead )
+ {
+ var nTrs = $(nThead).children('tr');
+ var nTr, nCell;
+ var i, k, l, iLen, jLen, iColShifted, iColumn, iColspan, iRowspan;
+ var bUnique;
+ var fnShiftCol = function ( a, i, j ) {
+ var k = a[i];
+ while ( k[j] ) {
+ j++;
+ }
+ return j;
+ };
+
+ aLayout.splice( 0, aLayout.length );
+
+ /* We know how many rows there are in the layout - so prep it */
+ for ( i=0, iLen=nTrs.length ; i<iLen ; i++ )
+ {
+ aLayout.push( [] );
+ }
+
+ /* Calculate a layout array */
+ for ( i=0, iLen=nTrs.length ; i<iLen ; i++ )
+ {
+ nTr = nTrs[i];
+ iColumn = 0;
+
+ /* For every cell in the row... */
+ nCell = nTr.firstChild;
+ while ( nCell ) {
+ if ( nCell.nodeName.toUpperCase() == "TD" ||
+ nCell.nodeName.toUpperCase() == "TH" )
+ {
+ /* Get the col and rowspan attributes from the DOM and sanitise them */
+ iColspan = nCell.getAttribute('colspan') * 1;
+ iRowspan = nCell.getAttribute('rowspan') * 1;
+ iColspan = (!iColspan || iColspan===0 || iColspan===1) ? 1 : iColspan;
+ iRowspan = (!iRowspan || iRowspan===0 || iRowspan===1) ? 1 : iRowspan;
+
+ /* There might be colspan cells already in this row, so shift our target
+ * accordingly
+ */
+ iColShifted = fnShiftCol( aLayout, i, iColumn );
+
+ /* Cache calculation for unique columns */
+ bUnique = iColspan === 1 ? true : false;
+
+ /* If there is col / rowspan, copy the information into the layout grid */
+ for ( l=0 ; l<iColspan ; l++ )
+ {
+ for ( k=0 ; k<iRowspan ; k++ )
+ {
+ aLayout[i+k][iColShifted+l] = {
+ "cell": nCell,
+ "unique": bUnique
+ };
+ aLayout[i+k].nTr = nTr;
+ }
+ }
+ }
+ nCell = nCell.nextSibling;
+ }
+ }
+ }
+
+
+ /**
+ * Get an array of unique th elements, one for each column
+ * @param {object} oSettings dataTables settings object
+ * @param {node} nHeader automatically detect the layout from this node - optional
+ * @param {array} aLayout thead/tfoot layout from _fnDetectHeader - optional
+ * @returns array {node} aReturn list of unique th's
+ * @memberof DataTable#oApi
+ */
+ function _fnGetUniqueThs ( oSettings, nHeader, aLayout )
+ {
+ var aReturn = [];
+ if ( !aLayout )
+ {
+ aLayout = oSettings.aoHeader;
+ if ( nHeader )
+ {
+ aLayout = [];
+ _fnDetectHeader( aLayout, nHeader );
+ }
+ }
+
+ for ( var i=0, iLen=aLayout.length ; i<iLen ; i++ )
+ {
+ for ( var j=0, jLen=aLayout[i].length ; j<jLen ; j++ )
+ {
+ if ( aLayout[i][j].unique &&
+ (!aReturn[j] || !oSettings.bSortCellsTop) )
+ {
+ aReturn[j] = aLayout[i][j].cell;
+ }
+ }
+ }
+
+ return aReturn;
+ }
+
+ /**
+ * Create an Ajax call based on the table's settings, taking into account that
+ * parameters can have multiple forms, and backwards compatibility.
+ *
+ * @param {object} oSettings dataTables settings object
+ * @param {array} data Data to send to the server, required by
+ * DataTables - may be augmented by developer callbacks
+ * @param {function} fn Callback function to run when data is obtained
+ */
+ function _fnBuildAjax( oSettings, data, fn )
+ {
+ // Compatibility with 1.9-, allow fnServerData and event to manipulate
+ _fnCallbackFire( oSettings, 'aoServerParams', 'serverParams', [data] );
+
+ // Convert to object based for 1.10+ if using the old array scheme which can
+ // come from server-side processing or serverParams
+ if ( data && $.isArray(data) ) {
+ var tmp = {};
+ var rbracket = /(.*?)\[\]$/;
+
+ $.each( data, function (key, val) {
+ var match = val.name.match(rbracket);
+
+ if ( match ) {
+ // Support for arrays
+ var name = match[0];
+
+ if ( ! tmp[ name ] ) {
+ tmp[ name ] = [];
+ }
+ tmp[ name ].push( val.value );
+ }
+ else {
+ tmp[val.name] = val.value;
+ }
+ } );
+ data = tmp;
+ }
+
+ var ajaxData;
+ var ajax = oSettings.ajax;
+ var instance = oSettings.oInstance;
+ var callback = function ( json ) {
+ _fnCallbackFire( oSettings, null, 'xhr', [oSettings, json, oSettings.jqXHR] );
+ fn( json );
+ };
+
+ if ( $.isPlainObject( ajax ) && ajax.data )
+ {
+ ajaxData = ajax.data;
+
+ var newData = $.isFunction( ajaxData ) ?
+ ajaxData( data, oSettings ) : // fn can manipulate data or return
+ ajaxData; // an object object or array to merge
+
+ // If the function returned something, use that alone
+ data = $.isFunction( ajaxData ) && newData ?
+ newData :
+ $.extend( true, data, newData );
+
+ // Remove the data property as we've resolved it already and don't want
+ // jQuery to do it again (it is restored at the end of the function)
+ delete ajax.data;
+ }
+
+ var baseAjax = {
+ "data": data,
+ "success": function (json) {
+ var error = json.error || json.sError;
+ if ( error ) {
+ _fnLog( oSettings, 0, error );
+ }
+
+ oSettings.json = json;
+ callback( json );
+ },
+ "dataType": "json",
+ "cache": false,
+ "type": oSettings.sServerMethod,
+ "error": function (xhr, error, thrown) {
+ var ret = _fnCallbackFire( oSettings, null, 'xhr', [oSettings, null, oSettings.jqXHR] );
+
+ if ( $.inArray( true, ret ) === -1 ) {
+ if ( error == "parsererror" ) {
+ _fnLog( oSettings, 0, 'Invalid JSON response', 1 );
+ }
+ else if ( xhr.readyState === 4 ) {
+ _fnLog( oSettings, 0, 'Ajax error', 7 );
+ }
+ }
+
+ _fnProcessingDisplay( oSettings, false );
+ }
+ };
+
+ // Store the data submitted for the API
+ oSettings.oAjaxData = data;
+
+ // Allow plug-ins and external processes to modify the data
+ _fnCallbackFire( oSettings, null, 'preXhr', [oSettings, data] );
+
+ if ( oSettings.fnServerData )
+ {
+ // DataTables 1.9- compatibility
+ oSettings.fnServerData.call( instance,
+ oSettings.sAjaxSource,
+ $.map( data, function (val, key) { // Need to convert back to 1.9 trad format
+ return { name: key, value: val };
+ } ),
+ callback,
+ oSettings
+ );
+ }
+ else if ( oSettings.sAjaxSource || typeof ajax === 'string' )
+ {
+ // DataTables 1.9- compatibility
+ oSettings.jqXHR = $.ajax( $.extend( baseAjax, {
+ url: ajax || oSettings.sAjaxSource
+ } ) );
+ }
+ else if ( $.isFunction( ajax ) )
+ {
+ // Is a function - let the caller define what needs to be done
+ oSettings.jqXHR = ajax.call( instance, data, callback, oSettings );
+ }
+ else
+ {
+ // Object to extend the base settings
+ oSettings.jqXHR = $.ajax( $.extend( baseAjax, ajax ) );
+
+ // Restore for next time around
+ ajax.data = ajaxData;
+ }
+ }
+
+
+ /**
+ * Update the table using an Ajax call
+ * @param {object} settings dataTables settings object
+ * @returns {boolean} Block the table drawing or not
+ * @memberof DataTable#oApi
+ */
+ function _fnAjaxUpdate( settings )
+ {
+ if ( settings.bAjaxDataGet ) {
+ settings.iDraw++;
+ _fnProcessingDisplay( settings, true );
+
+ _fnBuildAjax(
+ settings,
+ _fnAjaxParameters( settings ),
+ function(json) {
+ _fnAjaxUpdateDraw( settings, json );
+ }
+ );
+
+ return false;
+ }
+ return true;
+ }
+
+
+ /**
+ * Build up the parameters in an object needed for a server-side processing
+ * request. Note that this is basically done twice, is different ways - a modern
+ * method which is used by default in DataTables 1.10 which uses objects and
+ * arrays, or the 1.9- method with is name / value pairs. 1.9 method is used if
+ * the sAjaxSource option is used in the initialisation, or the legacyAjax
+ * option is set.
+ * @param {object} oSettings dataTables settings object
+ * @returns {bool} block the table drawing or not
+ * @memberof DataTable#oApi
+ */
+ function _fnAjaxParameters( settings )
+ {
+ var
+ columns = settings.aoColumns,
+ columnCount = columns.length,
+ features = settings.oFeatures,
+ preSearch = settings.oPreviousSearch,
+ preColSearch = settings.aoPreSearchCols,
+ i, data = [], dataProp, column, columnSearch,
+ sort = _fnSortFlatten( settings ),
+ displayStart = settings._iDisplayStart,
+ displayLength = features.bPaginate !== false ?
+ settings._iDisplayLength :
+ -1;
+
+ var param = function ( name, value ) {
+ data.push( { 'name': name, 'value': value } );
+ };
+
+ // DataTables 1.9- compatible method
+ param( 'sEcho', settings.iDraw );
+ param( 'iColumns', columnCount );
+ param( 'sColumns', _pluck( columns, 'sName' ).join(',') );
+ param( 'iDisplayStart', displayStart );
+ param( 'iDisplayLength', displayLength );
+
+ // DataTables 1.10+ method
+ var d = {
+ draw: settings.iDraw,
+ columns: [],
+ order: [],
+ start: displayStart,
+ length: displayLength,
+ search: {
+ value: preSearch.sSearch,
+ regex: preSearch.bRegex
+ }
+ };
+
+ for ( i=0 ; i<columnCount ; i++ ) {
+ column = columns[i];
+ columnSearch = preColSearch[i];
+ dataProp = typeof column.mData=="function" ? 'function' : column.mData ;
+
+ d.columns.push( {
+ data: dataProp,
+ name: column.sName,
+ searchable: column.bSearchable,
+ orderable: column.bSortable,
+ search: {
+ value: columnSearch.sSearch,
+ regex: columnSearch.bRegex
+ }
+ } );
+
+ param( "mDataProp_"+i, dataProp );
+
+ if ( features.bFilter ) {
+ param( 'sSearch_'+i, columnSearch.sSearch );
+ param( 'bRegex_'+i, columnSearch.bRegex );
+ param( 'bSearchable_'+i, column.bSearchable );
+ }
+
+ if ( features.bSort ) {
+ param( 'bSortable_'+i, column.bSortable );
+ }
+ }
+
+ if ( features.bFilter ) {
+ param( 'sSearch', preSearch.sSearch );
+ param( 'bRegex', preSearch.bRegex );
+ }
+
+ if ( features.bSort ) {
+ $.each( sort, function ( i, val ) {
+ d.order.push( { column: val.col, dir: val.dir } );
+
+ param( 'iSortCol_'+i, val.col );
+ param( 'sSortDir_'+i, val.dir );
+ } );
+
+ param( 'iSortingCols', sort.length );
+ }
+
+ // If the legacy.ajax parameter is null, then we automatically decide which
+ // form to use, based on sAjaxSource
+ var legacy = DataTable.ext.legacy.ajax;
+ if ( legacy === null ) {
+ return settings.sAjaxSource ? data : d;
+ }
+
+ // Otherwise, if legacy has been specified then we use that to decide on the
+ // form
+ return legacy ? data : d;
+ }
+
+
+ /**
+ * Data the data from the server (nuking the old) and redraw the table
+ * @param {object} oSettings dataTables settings object
+ * @param {object} json json data return from the server.
+ * @param {string} json.sEcho Tracking flag for DataTables to match requests
+ * @param {int} json.iTotalRecords Number of records in the data set, not accounting for filtering
+ * @param {int} json.iTotalDisplayRecords Number of records in the data set, accounting for filtering
+ * @param {array} json.aaData The data to display on this page
+ * @param {string} [json.sColumns] Column ordering (sName, comma separated)
+ * @memberof DataTable#oApi
+ */
+ function _fnAjaxUpdateDraw ( settings, json )
+ {
+ // v1.10 uses camelCase variables, while 1.9 uses Hungarian notation.
+ // Support both
+ var compat = function ( old, modern ) {
+ return json[old] !== undefined ? json[old] : json[modern];
+ };
+
+ var data = _fnAjaxDataSrc( settings, json );
+ var draw = compat( 'sEcho', 'draw' );
+ var recordsTotal = compat( 'iTotalRecords', 'recordsTotal' );
+ var recordsFiltered = compat( 'iTotalDisplayRecords', 'recordsFiltered' );
+
+ if ( draw ) {
+ // Protect against out of sequence returns
+ if ( draw*1 < settings.iDraw ) {
+ return;
+ }
+ settings.iDraw = draw * 1;
+ }
+
+ _fnClearTable( settings );
+ settings._iRecordsTotal = parseInt(recordsTotal, 10);
+ settings._iRecordsDisplay = parseInt(recordsFiltered, 10);
+
+ for ( var i=0, ien=data.length ; i<ien ; i++ ) {
+ _fnAddData( settings, data[i] );
+ }
+ settings.aiDisplay = settings.aiDisplayMaster.slice();
+
+ settings.bAjaxDataGet = false;
+ _fnDraw( settings );
+
+ if ( ! settings._bInitComplete ) {
+ _fnInitComplete( settings, json );
+ }
+
+ settings.bAjaxDataGet = true;
+ _fnProcessingDisplay( settings, false );
+ }
+
+
+ /**
+ * Get the data from the JSON data source to use for drawing a table. Using
+ * `_fnGetObjectDataFn` allows the data to be sourced from a property of the
+ * source object, or from a processing function.
+ * @param {object} oSettings dataTables settings object
+ * @param {object} json Data source object / array from the server
+ * @return {array} Array of data to use
+ */
+ function _fnAjaxDataSrc ( oSettings, json )
+ {
+ var dataSrc = $.isPlainObject( oSettings.ajax ) && oSettings.ajax.dataSrc !== undefined ?
+ oSettings.ajax.dataSrc :
+ oSettings.sAjaxDataProp; // Compatibility with 1.9-.
+
+ // Compatibility with 1.9-. In order to read from aaData, check if the
+ // default has been changed, if not, check for aaData
+ if ( dataSrc === 'data' ) {
+ return json.aaData || json[dataSrc];
+ }
+
+ return dataSrc !== "" ?
+ _fnGetObjectDataFn( dataSrc )( json ) :
+ json;
+ }
+
+ /**
+ * Generate the node required for filtering text
+ * @returns {node} Filter control element
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnFeatureHtmlFilter ( settings )
+ {
+ var classes = settings.oClasses;
+ var tableId = settings.sTableId;
+ var language = settings.oLanguage;
+ var previousSearch = settings.oPreviousSearch;
+ var features = settings.aanFeatures;
+ var input = '<input type="search" class="'+classes.sFilterInput+'"/>';
+
+ var str = language.sSearch;
+ str = str.match(/_INPUT_/) ?
+ str.replace('_INPUT_', input) :
+ str+input;
+
+ var filter = $('<div/>', {
+ 'id': ! features.f ? tableId+'_filter' : null,
+ 'class': classes.sFilter
+ } )
+ .append( $('<label/>' ).append( str ) );
+
+ var searchFn = function() {
+ /* Update all other filter input elements for the new display */
+ var n = features.f;
+ var val = !this.value ? "" : this.value; // mental IE8 fix :-(
+
+ /* Now do the filter */
+ if ( val != previousSearch.sSearch ) {
+ _fnFilterComplete( settings, {
+ "sSearch": val,
+ "bRegex": previousSearch.bRegex,
+ "bSmart": previousSearch.bSmart ,
+ "bCaseInsensitive": previousSearch.bCaseInsensitive
+ } );
+
+ // Need to redraw, without resorting
+ settings._iDisplayStart = 0;
+ _fnDraw( settings );
+ }
+ };
+
+ var searchDelay = settings.searchDelay !== null ?
+ settings.searchDelay :
+ _fnDataSource( settings ) === 'ssp' ?
+ 400 :
+ 0;
+
+ var jqFilter = $('input', filter)
+ .val( previousSearch.sSearch )
+ .attr( 'placeholder', language.sSearchPlaceholder )
+ .bind(
+ 'keyup.DT search.DT input.DT paste.DT cut.DT',
+ searchDelay ?
+ _fnThrottle( searchFn, searchDelay ) :
+ searchFn
+ )
+ .bind( 'keypress.DT', function(e) {
+ /* Prevent form submission */
+ if ( e.keyCode == 13 ) {
+ return false;
+ }
+ } )
+ .attr('aria-controls', tableId);
+
+ // Update the input elements whenever the table is filtered
+ $(settings.nTable).on( 'search.dt.DT', function ( ev, s ) {
+ if ( settings === s ) {
+ // IE9 throws an 'unknown error' if document.activeElement is used
+ // inside an iframe or frame...
+ try {
+ if ( jqFilter[0] !== document.activeElement ) {
+ jqFilter.val( previousSearch.sSearch );
+ }
+ }
+ catch ( e ) {}
+ }
+ } );
+
+ return filter[0];
+ }
+
+
+ /**
+ * Filter the table using both the global filter and column based filtering
+ * @param {object} oSettings dataTables settings object
+ * @param {object} oSearch search information
+ * @param {int} [iForce] force a research of the master array (1) or not (undefined or 0)
+ * @memberof DataTable#oApi
+ */
+ function _fnFilterComplete ( oSettings, oInput, iForce )
+ {
+ var oPrevSearch = oSettings.oPreviousSearch;
+ var aoPrevSearch = oSettings.aoPreSearchCols;
+ var fnSaveFilter = function ( oFilter ) {
+ /* Save the filtering values */
+ oPrevSearch.sSearch = oFilter.sSearch;
+ oPrevSearch.bRegex = oFilter.bRegex;
+ oPrevSearch.bSmart = oFilter.bSmart;
+ oPrevSearch.bCaseInsensitive = oFilter.bCaseInsensitive;
+ };
+ var fnRegex = function ( o ) {
+ // Backwards compatibility with the bEscapeRegex option
+ return o.bEscapeRegex !== undefined ? !o.bEscapeRegex : o.bRegex;
+ };
+
+ // Resolve any column types that are unknown due to addition or invalidation
+ // @todo As per sort - can this be moved into an event handler?
+ _fnColumnTypes( oSettings );
+
+ /* In server-side processing all filtering is done by the server, so no point hanging around here */
+ if ( _fnDataSource( oSettings ) != 'ssp' )
+ {
+ /* Global filter */
+ _fnFilter( oSettings, oInput.sSearch, iForce, fnRegex(oInput), oInput.bSmart, oInput.bCaseInsensitive );
+ fnSaveFilter( oInput );
+
+ /* Now do the individual column filter */
+ for ( var i=0 ; i<aoPrevSearch.length ; i++ )
+ {
+ _fnFilterColumn( oSettings, aoPrevSearch[i].sSearch, i, fnRegex(aoPrevSearch[i]),
+ aoPrevSearch[i].bSmart, aoPrevSearch[i].bCaseInsensitive );
+ }
+
+ /* Custom filtering */
+ _fnFilterCustom( oSettings );
+ }
+ else
+ {
+ fnSaveFilter( oInput );
+ }
+
+ /* Tell the draw function we have been filtering */
+ oSettings.bFiltered = true;
+ _fnCallbackFire( oSettings, null, 'search', [oSettings] );
+ }
+
+
+ /**
+ * Apply custom filtering functions
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnFilterCustom( settings )
+ {
+ var filters = DataTable.ext.search;
+ var displayRows = settings.aiDisplay;
+ var row, rowIdx;
+
+ for ( var i=0, ien=filters.length ; i<ien ; i++ ) {
+ var rows = [];
+
+ // Loop over each row and see if it should be included
+ for ( var j=0, jen=displayRows.length ; j<jen ; j++ ) {
+ rowIdx = displayRows[ j ];
+ row = settings.aoData[ rowIdx ];
+
+ if ( filters[i]( settings, row._aFilterData, rowIdx, row._aData, j ) ) {
+ rows.push( rowIdx );
+ }
+ }
+
+ // So the array reference doesn't break set the results into the
+ // existing array
+ displayRows.length = 0;
+ $.merge( displayRows, rows );
+ }
+ }
+
+
+ /**
+ * Filter the table on a per-column basis
+ * @param {object} oSettings dataTables settings object
+ * @param {string} sInput string to filter on
+ * @param {int} iColumn column to filter
+ * @param {bool} bRegex treat search string as a regular expression or not
+ * @param {bool} bSmart use smart filtering or not
+ * @param {bool} bCaseInsensitive Do case insenstive matching or not
+ * @memberof DataTable#oApi
+ */
+ function _fnFilterColumn ( settings, searchStr, colIdx, regex, smart, caseInsensitive )
+ {
+ if ( searchStr === '' ) {
+ return;
+ }
+
+ var data;
+ var display = settings.aiDisplay;
+ var rpSearch = _fnFilterCreateSearch( searchStr, regex, smart, caseInsensitive );
+
+ for ( var i=display.length-1 ; i>=0 ; i-- ) {
+ data = settings.aoData[ display[i] ]._aFilterData[ colIdx ];
+
+ if ( ! rpSearch.test( data ) ) {
+ display.splice( i, 1 );
+ }
+ }
+ }
+
+
+ /**
+ * Filter the data table based on user input and draw the table
+ * @param {object} settings dataTables settings object
+ * @param {string} input string to filter on
+ * @param {int} force optional - force a research of the master array (1) or not (undefined or 0)
+ * @param {bool} regex treat as a regular expression or not
+ * @param {bool} smart perform smart filtering or not
+ * @param {bool} caseInsensitive Do case insenstive matching or not
+ * @memberof DataTable#oApi
+ */
+ function _fnFilter( settings, input, force, regex, smart, caseInsensitive )
+ {
+ var rpSearch = _fnFilterCreateSearch( input, regex, smart, caseInsensitive );
+ var prevSearch = settings.oPreviousSearch.sSearch;
+ var displayMaster = settings.aiDisplayMaster;
+ var display, invalidated, i;
+
+ // Need to take account of custom filtering functions - always filter
+ if ( DataTable.ext.search.length !== 0 ) {
+ force = true;
+ }
+
+ // Check if any of the rows were invalidated
+ invalidated = _fnFilterData( settings );
+
+ // If the input is blank - we just want the full data set
+ if ( input.length <= 0 ) {
+ settings.aiDisplay = displayMaster.slice();
+ }
+ else {
+ // New search - start from the master array
+ if ( invalidated ||
+ force ||
+ prevSearch.length > input.length ||
+ input.indexOf(prevSearch) !== 0 ||
+ settings.bSorted // On resort, the display master needs to be
+ // re-filtered since indexes will have changed
+ ) {
+ settings.aiDisplay = displayMaster.slice();
+ }
+
+ // Search the display array
+ display = settings.aiDisplay;
+
+ for ( i=display.length-1 ; i>=0 ; i-- ) {
+ if ( ! rpSearch.test( settings.aoData[ display[i] ]._sFilterRow ) ) {
+ display.splice( i, 1 );
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Build a regular expression object suitable for searching a table
+ * @param {string} sSearch string to search for
+ * @param {bool} bRegex treat as a regular expression or not
+ * @param {bool} bSmart perform smart filtering or not
+ * @param {bool} bCaseInsensitive Do case insensitive matching or not
+ * @returns {RegExp} constructed object
+ * @memberof DataTable#oApi
+ */
+ function _fnFilterCreateSearch( search, regex, smart, caseInsensitive )
+ {
+ search = regex ?
+ search :
+ _fnEscapeRegex( search );
+
+ if ( smart ) {
+ /* For smart filtering we want to allow the search to work regardless of
+ * word order. We also want double quoted text to be preserved, so word
+ * order is important - a la google. So this is what we want to
+ * generate:
+ *
+ * ^(?=.*?\bone\b)(?=.*?\btwo three\b)(?=.*?\bfour\b).*$
+ */
+ var a = $.map( search.match( /"[^"]+"|[^ ]+/g ) || [''], function ( word ) {
+ if ( word.charAt(0) === '"' ) {
+ var m = word.match( /^"(.*)"$/ );
+ word = m ? m[1] : word;
+ }
+
+ return word.replace('"', '');
+ } );
+
+ search = '^(?=.*?'+a.join( ')(?=.*?' )+').*$';
+ }
+
+ return new RegExp( search, caseInsensitive ? 'i' : '' );
+ }
+
+
+ /**
+ * Escape a string such that it can be used in a regular expression
+ * @param {string} sVal string to escape
+ * @returns {string} escaped string
+ * @memberof DataTable#oApi
+ */
+ function _fnEscapeRegex ( sVal )
+ {
+ return sVal.replace( _re_escape_regex, '\\$1' );
+ }
+
+
+
+ var __filter_div = $('<div>')[0];
+ var __filter_div_textContent = __filter_div.textContent !== undefined;
+
+ // Update the filtering data for each row if needed (by invalidation or first run)
+ function _fnFilterData ( settings )
+ {
+ var columns = settings.aoColumns;
+ var column;
+ var i, j, ien, jen, filterData, cellData, row;
+ var fomatters = DataTable.ext.type.search;
+ var wasInvalidated = false;
+
+ for ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
+ row = settings.aoData[i];
+
+ if ( ! row._aFilterData ) {
+ filterData = [];
+
+ for ( j=0, jen=columns.length ; j<jen ; j++ ) {
+ column = columns[j];
+
+ if ( column.bSearchable ) {
+ cellData = _fnGetCellData( settings, i, j, 'filter' );
+
+ if ( fomatters[ column.sType ] ) {
+ cellData = fomatters[ column.sType ]( cellData );
+ }
+
+ // Search in DataTables 1.10 is string based. In 1.11 this
+ // should be altered to also allow strict type checking.
+ if ( cellData === null ) {
+ cellData = '';
+ }
+
+ if ( typeof cellData !== 'string' && cellData.toString ) {
+ cellData = cellData.toString();
+ }
+ }
+ else {
+ cellData = '';
+ }
+
+ // If it looks like there is an HTML entity in the string,
+ // attempt to decode it so sorting works as expected. Note that
+ // we could use a single line of jQuery to do this, but the DOM
+ // method used here is much faster http://jsperf.com/html-decode
+ if ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {
+ __filter_div.innerHTML = cellData;
+ cellData = __filter_div_textContent ?
+ __filter_div.textContent :
+ __filter_div.innerText;
+ }
+
+ if ( cellData.replace ) {
+ cellData = cellData.replace(/[\r\n]/g, '');
+ }
+
+ filterData.push( cellData );
+ }
+
+ row._aFilterData = filterData;
+ row._sFilterRow = filterData.join(' ');
+ wasInvalidated = true;
+ }
+ }
+
+ return wasInvalidated;
+ }
+
+
+ /**
+ * Convert from the internal Hungarian notation to camelCase for external
+ * interaction
+ * @param {object} obj Object to convert
+ * @returns {object} Inverted object
+ * @memberof DataTable#oApi
+ */
+ function _fnSearchToCamel ( obj )
+ {
+ return {
+ search: obj.sSearch,
+ smart: obj.bSmart,
+ regex: obj.bRegex,
+ caseInsensitive: obj.bCaseInsensitive
+ };
+ }
+
+
+
+ /**
+ * Convert from camelCase notation to the internal Hungarian. We could use the
+ * Hungarian convert function here, but this is cleaner
+ * @param {object} obj Object to convert
+ * @returns {object} Inverted object
+ * @memberof DataTable#oApi
+ */
+ function _fnSearchToHung ( obj )
+ {
+ return {
+ sSearch: obj.search,
+ bSmart: obj.smart,
+ bRegex: obj.regex,
+ bCaseInsensitive: obj.caseInsensitive
+ };
+ }
+
+ /**
+ * Generate the node required for the info display
+ * @param {object} oSettings dataTables settings object
+ * @returns {node} Information element
+ * @memberof DataTable#oApi
+ */
+ function _fnFeatureHtmlInfo ( settings )
+ {
+ var
+ tid = settings.sTableId,
+ nodes = settings.aanFeatures.i,
+ n = $('<div/>', {
+ 'class': settings.oClasses.sInfo,
+ 'id': ! nodes ? tid+'_info' : null
+ } );
+
+ if ( ! nodes ) {
+ // Update display on each draw
+ settings.aoDrawCallback.push( {
+ "fn": _fnUpdateInfo,
+ "sName": "information"
+ } );
+
+ n
+ .attr( 'role', 'status' )
+ .attr( 'aria-live', 'polite' );
+
+ // Table is described by our info div
+ $(settings.nTable).attr( 'aria-describedby', tid+'_info' );
+ }
+
+ return n[0];
+ }
+
+
+ /**
+ * Update the information elements in the display
+ * @param {object} settings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnUpdateInfo ( settings )
+ {
+ /* Show information about the table */
+ var nodes = settings.aanFeatures.i;
+ if ( nodes.length === 0 ) {
+ return;
+ }
+
+ var
+ lang = settings.oLanguage,
+ start = settings._iDisplayStart+1,
+ end = settings.fnDisplayEnd(),
+ max = settings.fnRecordsTotal(),
+ total = settings.fnRecordsDisplay(),
+ out = total ?
+ lang.sInfo :
+ lang.sInfoEmpty;
+
+ if ( total !== max ) {
+ /* Record set after filtering */
+ out += ' ' + lang.sInfoFiltered;
+ }
+
+ // Convert the macros
+ out += lang.sInfoPostFix;
+ out = _fnInfoMacros( settings, out );
+
+ var callback = lang.fnInfoCallback;
+ if ( callback !== null ) {
+ out = callback.call( settings.oInstance,
+ settings, start, end, max, total, out
+ );
+ }
+
+ $(nodes).html( out );
+ }
+
+
+ function _fnInfoMacros ( settings, str )
+ {
+ // When infinite scrolling, we are always starting at 1. _iDisplayStart is used only
+ // internally
+ var
+ formatter = settings.fnFormatNumber,
+ start = settings._iDisplayStart+1,
+ len = settings._iDisplayLength,
+ vis = settings.fnRecordsDisplay(),
+ all = len === -1;
+
+ return str.
+ replace(/_START_/g, formatter.call( settings, start ) ).
+ replace(/_END_/g, formatter.call( settings, settings.fnDisplayEnd() ) ).
+ replace(/_MAX_/g, formatter.call( settings, settings.fnRecordsTotal() ) ).
+ replace(/_TOTAL_/g, formatter.call( settings, vis ) ).
+ replace(/_PAGE_/g, formatter.call( settings, all ? 1 : Math.ceil( start / len ) ) ).
+ replace(/_PAGES_/g, formatter.call( settings, all ? 1 : Math.ceil( vis / len ) ) );
+ }
+
+
+
+ /**
+ * Draw the table for the first time, adding all required features
+ * @param {object} settings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnInitialise ( settings )
+ {
+ var i, iLen, iAjaxStart=settings.iInitDisplayStart;
+ var columns = settings.aoColumns, column;
+ var features = settings.oFeatures;
+ var deferLoading = settings.bDeferLoading; // value modified by the draw
+
+ /* Ensure that the table data is fully initialised */
+ if ( ! settings.bInitialised ) {
+ setTimeout( function(){ _fnInitialise( settings ); }, 200 );
+ return;
+ }
+
+ /* Show the display HTML options */
+ _fnAddOptionsHtml( settings );
+
+ /* Build and draw the header / footer for the table */
+ _fnBuildHead( settings );
+ _fnDrawHead( settings, settings.aoHeader );
+ _fnDrawHead( settings, settings.aoFooter );
+
+ /* Okay to show that something is going on now */
+ _fnProcessingDisplay( settings, true );
+
+ /* Calculate sizes for columns */
+ if ( features.bAutoWidth ) {
+ _fnCalculateColumnWidths( settings );
+ }
+
+ for ( i=0, iLen=columns.length ; i<iLen ; i++ ) {
+ column = columns[i];
+
+ if ( column.sWidth ) {
+ column.nTh.style.width = _fnStringToCss( column.sWidth );
+ }
+ }
+
+ _fnCallbackFire( settings, null, 'preInit', [settings] );
+
+ // If there is default sorting required - let's do it. The sort function
+ // will do the drawing for us. Otherwise we draw the table regardless of the
+ // Ajax source - this allows the table to look initialised for Ajax sourcing
+ // data (show 'loading' message possibly)
+ _fnReDraw( settings );
+
+ // Server-side processing init complete is done by _fnAjaxUpdateDraw
+ var dataSrc = _fnDataSource( settings );
+ if ( dataSrc != 'ssp' || deferLoading ) {
+ // if there is an ajax source load the data
+ if ( dataSrc == 'ajax' ) {
+ _fnBuildAjax( settings, [], function(json) {
+ var aData = _fnAjaxDataSrc( settings, json );
+
+ // Got the data - add it to the table
+ for ( i=0 ; i<aData.length ; i++ ) {
+ _fnAddData( settings, aData[i] );
+ }
+
+ // Reset the init display for cookie saving. We've already done
+ // a filter, and therefore cleared it before. So we need to make
+ // it appear 'fresh'
+ settings.iInitDisplayStart = iAjaxStart;
+
+ _fnReDraw( settings );
+
+ _fnProcessingDisplay( settings, false );
+ _fnInitComplete( settings, json );
+ }, settings );
+ }
+ else {
+ _fnProcessingDisplay( settings, false );
+ _fnInitComplete( settings );
+ }
+ }
+ }
+
+
+ /**
+ * Draw the table for the first time, adding all required features
+ * @param {object} oSettings dataTables settings object
+ * @param {object} [json] JSON from the server that completed the table, if using Ajax source
+ * with client-side processing (optional)
+ * @memberof DataTable#oApi
+ */
+ function _fnInitComplete ( settings, json )
+ {
+ settings._bInitComplete = true;
+
+ // When data was added after the initialisation (data or Ajax) we need to
+ // calculate the column sizing
+ if ( json || settings.oInit.aaData ) {
+ _fnAdjustColumnSizing( settings );
+ }
+
+ _fnCallbackFire( settings, null, 'plugin-init', [settings, json] );
+ _fnCallbackFire( settings, 'aoInitComplete', 'init', [settings, json] );
+ }
+
+
+ function _fnLengthChange ( settings, val )
+ {
+ var len = parseInt( val, 10 );
+ settings._iDisplayLength = len;
+
+ _fnLengthOverflow( settings );
+
+ // Fire length change event
+ _fnCallbackFire( settings, null, 'length', [settings, len] );
+ }
+
+
+ /**
+ * Generate the node required for user display length changing
+ * @param {object} settings dataTables settings object
+ * @returns {node} Display length feature node
+ * @memberof DataTable#oApi
+ */
+ function _fnFeatureHtmlLength ( settings )
+ {
+ var
+ classes = settings.oClasses,
+ tableId = settings.sTableId,
+ menu = settings.aLengthMenu,
+ d2 = $.isArray( menu[0] ),
+ lengths = d2 ? menu[0] : menu,
+ language = d2 ? menu[1] : menu;
+
+ var select = $('<select/>', {
+ 'name': tableId+'_length',
+ 'aria-controls': tableId,
+ 'class': classes.sLengthSelect
+ } );
+
+ for ( var i=0, ien=lengths.length ; i<ien ; i++ ) {
+ select[0][ i ] = new Option( language[i], lengths[i] );
+ }
+
+ var div = $('<div><label/></div>').addClass( classes.sLength );
+ if ( ! settings.aanFeatures.l ) {
+ div[0].id = tableId+'_length';
+ }
+
+ div.children().append(
+ settings.oLanguage.sLengthMenu.replace( '_MENU_', select[0].outerHTML )
+ );
+
+ // Can't use `select` variable as user might provide their own and the
+ // reference is broken by the use of outerHTML
+ $('select', div)
+ .val( settings._iDisplayLength )
+ .bind( 'change.DT', function(e) {
+ _fnLengthChange( settings, $(this).val() );
+ _fnDraw( settings );
+ } );
+
+ // Update node value whenever anything changes the table's length
+ $(settings.nTable).bind( 'length.dt.DT', function (e, s, len) {
+ if ( settings === s ) {
+ $('select', div).val( len );
+ }
+ } );
+
+ return div[0];
+ }
+
+
+
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Note that most of the paging logic is done in
+ * DataTable.ext.pager
+ */
+
+ /**
+ * Generate the node required for default pagination
+ * @param {object} oSettings dataTables settings object
+ * @returns {node} Pagination feature node
+ * @memberof DataTable#oApi
+ */
+ function _fnFeatureHtmlPaginate ( settings )
+ {
+ var
+ type = settings.sPaginationType,
+ plugin = DataTable.ext.pager[ type ],
+ modern = typeof plugin === 'function',
+ redraw = function( settings ) {
+ _fnDraw( settings );
+ },
+ node = $('<div/>').addClass( settings.oClasses.sPaging + type )[0],
+ features = settings.aanFeatures;
+
+ if ( ! modern ) {
+ plugin.fnInit( settings, node, redraw );
+ }
+
+ /* Add a draw callback for the pagination on first instance, to update the paging display */
+ if ( ! features.p )
+ {
+ node.id = settings.sTableId+'_paginate';
+
+ settings.aoDrawCallback.push( {
+ "fn": function( settings ) {
+ if ( modern ) {
+ var
+ start = settings._iDisplayStart,
+ len = settings._iDisplayLength,
+ visRecords = settings.fnRecordsDisplay(),
+ all = len === -1,
+ page = all ? 0 : Math.ceil( start / len ),
+ pages = all ? 1 : Math.ceil( visRecords / len ),
+ buttons = plugin(page, pages),
+ i, ien;
+
+ for ( i=0, ien=features.p.length ; i<ien ; i++ ) {
+ _fnRenderer( settings, 'pageButton' )(
+ settings, features.p[i], i, buttons, page, pages
+ );
+ }
+ }
+ else {
+ plugin.fnUpdate( settings, redraw );
+ }
+ },
+ "sName": "pagination"
+ } );
+ }
+
+ return node;
+ }
+
+
+ /**
+ * Alter the display settings to change the page
+ * @param {object} settings DataTables settings object
+ * @param {string|int} action Paging action to take: "first", "previous",
+ * "next" or "last" or page number to jump to (integer)
+ * @param [bool] redraw Automatically draw the update or not
+ * @returns {bool} true page has changed, false - no change
+ * @memberof DataTable#oApi
+ */
+ function _fnPageChange ( settings, action, redraw )
+ {
+ var
+ start = settings._iDisplayStart,
+ len = settings._iDisplayLength,
+ records = settings.fnRecordsDisplay();
+
+ if ( records === 0 || len === -1 )
+ {
+ start = 0;
+ }
+ else if ( typeof action === "number" )
+ {
+ start = action * len;
+
+ if ( start > records )
+ {
+ start = 0;
+ }
+ }
+ else if ( action == "first" )
+ {
+ start = 0;
+ }
+ else if ( action == "previous" )
+ {
+ start = len >= 0 ?
+ start - len :
+ 0;
+
+ if ( start < 0 )
+ {
+ start = 0;
+ }
+ }
+ else if ( action == "next" )
+ {
+ if ( start + len < records )
+ {
+ start += len;
+ }
+ }
+ else if ( action == "last" )
+ {
+ start = Math.floor( (records-1) / len) * len;
+ }
+ else
+ {
+ _fnLog( settings, 0, "Unknown paging action: "+action, 5 );
+ }
+
+ var changed = settings._iDisplayStart !== start;
+ settings._iDisplayStart = start;
+
+ if ( changed ) {
+ _fnCallbackFire( settings, null, 'page', [settings] );
+
+ if ( redraw ) {
+ _fnDraw( settings );
+ }
+ }
+
+ return changed;
+ }
+
+
+
+ /**
+ * Generate the node required for the processing node
+ * @param {object} settings dataTables settings object
+ * @returns {node} Processing element
+ * @memberof DataTable#oApi
+ */
+ function _fnFeatureHtmlProcessing ( settings )
+ {
+ return $('<div/>', {
+ 'id': ! settings.aanFeatures.r ? settings.sTableId+'_processing' : null,
+ 'class': settings.oClasses.sProcessing
+ } )
+ .html( settings.oLanguage.sProcessing )
+ .insertBefore( settings.nTable )[0];
+ }
+
+
+ /**
+ * Display or hide the processing indicator
+ * @param {object} settings dataTables settings object
+ * @param {bool} show Show the processing indicator (true) or not (false)
+ * @memberof DataTable#oApi
+ */
+ function _fnProcessingDisplay ( settings, show )
+ {
+ if ( settings.oFeatures.bProcessing ) {
+ $(settings.aanFeatures.r).css( 'display', show ? 'block' : 'none' );
+ }
+
+ _fnCallbackFire( settings, null, 'processing', [settings, show] );
+ }
+
+ /**
+ * Add any control elements for the table - specifically scrolling
+ * @param {object} settings dataTables settings object
+ * @returns {node} Node to add to the DOM
+ * @memberof DataTable#oApi
+ */
+ function _fnFeatureHtmlTable ( settings )
+ {
+ var table = $(settings.nTable);
+
+ // Add the ARIA grid role to the table
+ table.attr( 'role', 'grid' );
+
+ // Scrolling from here on in
+ var scroll = settings.oScroll;
+
+ if ( scroll.sX === '' && scroll.sY === '' ) {
+ return settings.nTable;
+ }
+
+ var scrollX = scroll.sX;
+ var scrollY = scroll.sY;
+ var classes = settings.oClasses;
+ var caption = table.children('caption');
+ var captionSide = caption.length ? caption[0]._captionSide : null;
+ var headerClone = $( table[0].cloneNode(false) );
+ var footerClone = $( table[0].cloneNode(false) );
+ var footer = table.children('tfoot');
+ var _div = '<div/>';
+ var size = function ( s ) {
+ return !s ? null : _fnStringToCss( s );
+ };
+
+ if ( ! footer.length ) {
+ footer = null;
+ }
+
+ /*
+ * The HTML structure that we want to generate in this function is:
+ * div - scroller
+ * div - scroll head
+ * div - scroll head inner
+ * table - scroll head table
+ * thead - thead
+ * div - scroll body
+ * table - table (master table)
+ * thead - thead clone for sizing
+ * tbody - tbody
+ * div - scroll foot
+ * div - scroll foot inner
+ * table - scroll foot table
+ * tfoot - tfoot
+ */
+ var scroller = $( _div, { 'class': classes.sScrollWrapper } )
+ .append(
+ $(_div, { 'class': classes.sScrollHead } )
+ .css( {
+ overflow: 'hidden',
+ position: 'relative',
+ border: 0,
+ width: scrollX ? size(scrollX) : '100%'
+ } )
+ .append(
+ $(_div, { 'class': classes.sScrollHeadInner } )
+ .css( {
+ 'box-sizing': 'content-box',
+ width: scroll.sXInner || '100%'
+ } )
+ .append(
+ headerClone
+ .removeAttr('id')
+ .css( 'margin-left', 0 )
+ .append( captionSide === 'top' ? caption : null )
+ .append(
+ table.children('thead')
+ )
+ )
+ )
+ )
+ .append(
+ $(_div, { 'class': classes.sScrollBody } )
+ .css( {
+ position: 'relative',
+ overflow: 'auto',
+ width: size( scrollX )
+ } )
+ .append( table )
+ );
+
+ if ( footer ) {
+ scroller.append(
+ $(_div, { 'class': classes.sScrollFoot } )
+ .css( {
+ overflow: 'hidden',
+ border: 0,
+ width: scrollX ? size(scrollX) : '100%'
+ } )
+ .append(
+ $(_div, { 'class': classes.sScrollFootInner } )
+ .append(
+ footerClone
+ .removeAttr('id')
+ .css( 'margin-left', 0 )
+ .append( captionSide === 'bottom' ? caption : null )
+ .append(
+ table.children('tfoot')
+ )
+ )
+ )
+ );
+ }
+
+ var children = scroller.children();
+ var scrollHead = children[0];
+ var scrollBody = children[1];
+ var scrollFoot = footer ? children[2] : null;
+
+ // When the body is scrolled, then we also want to scroll the headers
+ if ( scrollX ) {
+ $(scrollBody).on( 'scroll.DT', function (e) {
+ var scrollLeft = this.scrollLeft;
+
+ scrollHead.scrollLeft = scrollLeft;
+
+ if ( footer ) {
+ scrollFoot.scrollLeft = scrollLeft;
+ }
+ } );
+ }
+
+ $(scrollBody).css(
+ scrollY && scroll.bCollapse ? 'max-height' : 'height',
+ scrollY
+ );
+
+ settings.nScrollHead = scrollHead;
+ settings.nScrollBody = scrollBody;
+ settings.nScrollFoot = scrollFoot;
+
+ // On redraw - align columns
+ settings.aoDrawCallback.push( {
+ "fn": _fnScrollDraw,
+ "sName": "scrolling"
+ } );
+
+ return scroller[0];
+ }
+
+
+
+ /**
+ * Update the header, footer and body tables for resizing - i.e. column
+ * alignment.
+ *
+ * Welcome to the most horrible function DataTables. The process that this
+ * function follows is basically:
+ * 1. Re-create the table inside the scrolling div
+ * 2. Take live measurements from the DOM
+ * 3. Apply the measurements to align the columns
+ * 4. Clean up
+ *
+ * @param {object} settings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnScrollDraw ( settings )
+ {
+ // Given that this is such a monster function, a lot of variables are use
+ // to try and keep the minimised size as small as possible
+ var
+ scroll = settings.oScroll,
+ scrollX = scroll.sX,
+ scrollXInner = scroll.sXInner,
+ scrollY = scroll.sY,
+ barWidth = scroll.iBarWidth,
+ divHeader = $(settings.nScrollHead),
+ divHeaderStyle = divHeader[0].style,
+ divHeaderInner = divHeader.children('div'),
+ divHeaderInnerStyle = divHeaderInner[0].style,
+ divHeaderTable = divHeaderInner.children('table'),
+ divBodyEl = settings.nScrollBody,
+ divBody = $(divBodyEl),
+ divBodyStyle = divBodyEl.style,
+ divFooter = $(settings.nScrollFoot),
+ divFooterInner = divFooter.children('div'),
+ divFooterTable = divFooterInner.children('table'),
+ header = $(settings.nTHead),
+ table = $(settings.nTable),
+ tableEl = table[0],
+ tableStyle = tableEl.style,
+ footer = settings.nTFoot ? $(settings.nTFoot) : null,
+ browser = settings.oBrowser,
+ ie67 = browser.bScrollOversize,
+ dtHeaderCells = _pluck( settings.aoColumns, 'nTh' ),
+ headerTrgEls, footerTrgEls,
+ headerSrcEls, footerSrcEls,
+ headerCopy, footerCopy,
+ headerWidths=[], footerWidths=[],
+ headerContent=[], footerContent=[],
+ idx, correction, sanityWidth,
+ zeroOut = function(nSizer) {
+ var style = nSizer.style;
+ style.paddingTop = "0";
+ style.paddingBottom = "0";
+ style.borderTopWidth = "0";
+ style.borderBottomWidth = "0";
+ style.height = 0;
+ };
+
+ // If the scrollbar visibility has changed from the last draw, we need to
+ // adjust the column sizes as the table width will have changed to account
+ // for the scrollbar
+ var scrollBarVis = divBodyEl.scrollHeight > divBodyEl.clientHeight;
+
+ if ( settings.scrollBarVis !== scrollBarVis && settings.scrollBarVis !== undefined ) {
+ settings.scrollBarVis = scrollBarVis;
+ _fnAdjustColumnSizing( settings );
+ return; // adjust column sizing will call this function again
+ }
+ else {
+ settings.scrollBarVis = scrollBarVis;
+ }
+
+ /*
+ * 1. Re-create the table inside the scrolling div
+ */
+
+ // Remove the old minimised thead and tfoot elements in the inner table
+ table.children('thead, tfoot').remove();
+
+ if ( footer ) {
+ footerCopy = footer.clone().prependTo( table );
+ footerTrgEls = footer.find('tr'); // the original tfoot is in its own table and must be sized
+ footerSrcEls = footerCopy.find('tr');
+ }
+
+ // Clone the current header and footer elements and then place it into the inner table
+ headerCopy = header.clone().prependTo( table );
+ headerTrgEls = header.find('tr'); // original header is in its own table
+ headerSrcEls = headerCopy.find('tr');
+ headerCopy.find('th, td').removeAttr('tabindex');
+
+
+ /*
+ * 2. Take live measurements from the DOM - do not alter the DOM itself!
+ */
+
+ // Remove old sizing and apply the calculated column widths
+ // Get the unique column headers in the newly created (cloned) header. We want to apply the
+ // calculated sizes to this header
+ if ( ! scrollX )
+ {
+ divBodyStyle.width = '100%';
+ divHeader[0].style.width = '100%';
+ }
+
+ $.each( _fnGetUniqueThs( settings, headerCopy ), function ( i, el ) {
+ idx = _fnVisibleToColumnIndex( settings, i );
+ el.style.width = settings.aoColumns[idx].sWidth;
+ } );
+
+ if ( footer ) {
+ _fnApplyToChildren( function(n) {
+ n.style.width = "";
+ }, footerSrcEls );
+ }
+
+ // Size the table as a whole
+ sanityWidth = table.outerWidth();
+ if ( scrollX === "" ) {
+ // No x scrolling
+ tableStyle.width = "100%";
+
+ // IE7 will make the width of the table when 100% include the scrollbar
+ // - which is shouldn't. When there is a scrollbar we need to take this
+ // into account.
+ if ( ie67 && (table.find('tbody').height() > divBodyEl.offsetHeight ||
+ divBody.css('overflow-y') == "scroll")
+ ) {
+ tableStyle.width = _fnStringToCss( table.outerWidth() - barWidth);
+ }
+
+ // Recalculate the sanity width
+ sanityWidth = table.outerWidth();
+ }
+ else if ( scrollXInner !== "" ) {
+ // legacy x scroll inner has been given - use it
+ tableStyle.width = _fnStringToCss(scrollXInner);
+
+ // Recalculate the sanity width
+ sanityWidth = table.outerWidth();
+ }
+
+ // Hidden header should have zero height, so remove padding and borders. Then
+ // set the width based on the real headers
+
+ // Apply all styles in one pass
+ _fnApplyToChildren( zeroOut, headerSrcEls );
+
+ // Read all widths in next pass
+ _fnApplyToChildren( function(nSizer) {
+ headerContent.push( nSizer.innerHTML );
+ headerWidths.push( _fnStringToCss( $(nSizer).css('width') ) );
+ }, headerSrcEls );
+
+ // Apply all widths in final pass
+ _fnApplyToChildren( function(nToSize, i) {
+ // Only apply widths to the DataTables detected header cells - this
+ // prevents complex headers from having contradictory sizes applied
+ if ( $.inArray( nToSize, dtHeaderCells ) !== -1 ) {
+ nToSize.style.width = headerWidths[i];
+ }
+ }, headerTrgEls );
+
+ $(headerSrcEls).height(0);
+
+ /* Same again with the footer if we have one */
+ if ( footer )
+ {
+ _fnApplyToChildren( zeroOut, footerSrcEls );
+
+ _fnApplyToChildren( function(nSizer) {
+ footerContent.push( nSizer.innerHTML );
+ footerWidths.push( _fnStringToCss( $(nSizer).css('width') ) );
+ }, footerSrcEls );
+
+ _fnApplyToChildren( function(nToSize, i) {
+ nToSize.style.width = footerWidths[i];
+ }, footerTrgEls );
+
+ $(footerSrcEls).height(0);
+ }
+
+
+ /*
+ * 3. Apply the measurements
+ */
+
+ // "Hide" the header and footer that we used for the sizing. We need to keep
+ // the content of the cell so that the width applied to the header and body
+ // both match, but we want to hide it completely. We want to also fix their
+ // width to what they currently are
+ _fnApplyToChildren( function(nSizer, i) {
+ nSizer.innerHTML = '<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+headerContent[i]+'</div>';
+ nSizer.style.width = headerWidths[i];
+ }, headerSrcEls );
+
+ if ( footer )
+ {
+ _fnApplyToChildren( function(nSizer, i) {
+ nSizer.innerHTML = '<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+footerContent[i]+'</div>';
+ nSizer.style.width = footerWidths[i];
+ }, footerSrcEls );
+ }
+
+ // Sanity check that the table is of a sensible width. If not then we are going to get
+ // misalignment - try to prevent this by not allowing the table to shrink below its min width
+ if ( table.outerWidth() < sanityWidth )
+ {
+ // The min width depends upon if we have a vertical scrollbar visible or not */
+ correction = ((divBodyEl.scrollHeight > divBodyEl.offsetHeight ||
+ divBody.css('overflow-y') == "scroll")) ?
+ sanityWidth+barWidth :
+ sanityWidth;
+
+ // IE6/7 are a law unto themselves...
+ if ( ie67 && (divBodyEl.scrollHeight >
+ divBodyEl.offsetHeight || divBody.css('overflow-y') == "scroll")
+ ) {
+ tableStyle.width = _fnStringToCss( correction-barWidth );
+ }
+
+ // And give the user a warning that we've stopped the table getting too small
+ if ( scrollX === "" || scrollXInner !== "" ) {
+ _fnLog( settings, 1, 'Possible column misalignment', 6 );
+ }
+ }
+ else
+ {
+ correction = '100%';
+ }
+
+ // Apply to the container elements
+ divBodyStyle.width = _fnStringToCss( correction );
+ divHeaderStyle.width = _fnStringToCss( correction );
+
+ if ( footer ) {
+ settings.nScrollFoot.style.width = _fnStringToCss( correction );
+ }
+
+
+ /*
+ * 4. Clean up
+ */
+ if ( ! scrollY ) {
+ /* IE7< puts a vertical scrollbar in place (when it shouldn't be) due to subtracting
+ * the scrollbar height from the visible display, rather than adding it on. We need to
+ * set the height in order to sort this. Don't want to do it in any other browsers.
+ */
+ if ( ie67 ) {
+ divBodyStyle.height = _fnStringToCss( tableEl.offsetHeight+barWidth );
+ }
+ }
+
+ /* Finally set the width's of the header and footer tables */
+ var iOuterWidth = table.outerWidth();
+ divHeaderTable[0].style.width = _fnStringToCss( iOuterWidth );
+ divHeaderInnerStyle.width = _fnStringToCss( iOuterWidth );
+
+ // Figure out if there are scrollbar present - if so then we need a the header and footer to
+ // provide a bit more space to allow "overflow" scrolling (i.e. past the scrollbar)
+ var bScrolling = table.height() > divBodyEl.clientHeight || divBody.css('overflow-y') == "scroll";
+ var padding = 'padding' + (browser.bScrollbarLeft ? 'Left' : 'Right' );
+ divHeaderInnerStyle[ padding ] = bScrolling ? barWidth+"px" : "0px";
+
+ if ( footer ) {
+ divFooterTable[0].style.width = _fnStringToCss( iOuterWidth );
+ divFooterInner[0].style.width = _fnStringToCss( iOuterWidth );
+ divFooterInner[0].style[padding] = bScrolling ? barWidth+"px" : "0px";
+ }
+
+ // Correct DOM ordering for colgroup - comes before the thead
+ table.children('colgroup').insertBefore( table.children('thead') );
+
+ /* Adjust the position of the header in case we loose the y-scrollbar */
+ divBody.scroll();
+
+ // If sorting or filtering has occurred, jump the scrolling back to the top
+ // only if we aren't holding the position
+ if ( (settings.bSorted || settings.bFiltered) && ! settings._drawHold ) {
+ divBodyEl.scrollTop = 0;
+ }
+ }
+
+
+
+ /**
+ * Apply a given function to the display child nodes of an element array (typically
+ * TD children of TR rows
+ * @param {function} fn Method to apply to the objects
+ * @param array {nodes} an1 List of elements to look through for display children
+ * @param array {nodes} an2 Another list (identical structure to the first) - optional
+ * @memberof DataTable#oApi
+ */
+ function _fnApplyToChildren( fn, an1, an2 )
+ {
+ var index=0, i=0, iLen=an1.length;
+ var nNode1, nNode2;
+
+ while ( i < iLen ) {
+ nNode1 = an1[i].firstChild;
+ nNode2 = an2 ? an2[i].firstChild : null;
+
+ while ( nNode1 ) {
+ if ( nNode1.nodeType === 1 ) {
+ if ( an2 ) {
+ fn( nNode1, nNode2, index );
+ }
+ else {
+ fn( nNode1, index );
+ }
+
+ index++;
+ }
+
+ nNode1 = nNode1.nextSibling;
+ nNode2 = an2 ? nNode2.nextSibling : null;
+ }
+
+ i++;
+ }
+ }
+
+
+
+ var __re_html_remove = /<.*?>/g;
+
+
+ /**
+ * Calculate the width of columns for the table
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnCalculateColumnWidths ( oSettings )
+ {
+ var
+ table = oSettings.nTable,
+ columns = oSettings.aoColumns,
+ scroll = oSettings.oScroll,
+ scrollY = scroll.sY,
+ scrollX = scroll.sX,
+ scrollXInner = scroll.sXInner,
+ columnCount = columns.length,
+ visibleColumns = _fnGetColumns( oSettings, 'bVisible' ),
+ headerCells = $('th', oSettings.nTHead),
+ tableWidthAttr = table.getAttribute('width'), // from DOM element
+ tableContainer = table.parentNode,
+ userInputs = false,
+ i, column, columnIdx, width, outerWidth,
+ browser = oSettings.oBrowser,
+ ie67 = browser.bScrollOversize;
+
+ var styleWidth = table.style.width;
+ if ( styleWidth && styleWidth.indexOf('%') !== -1 ) {
+ tableWidthAttr = styleWidth;
+ }
+
+ /* Convert any user input sizes into pixel sizes */
+ for ( i=0 ; i<visibleColumns.length ; i++ ) {
+ column = columns[ visibleColumns[i] ];
+
+ if ( column.sWidth !== null ) {
+ column.sWidth = _fnConvertToWidth( column.sWidthOrig, tableContainer );
+
+ userInputs = true;
+ }
+ }
+
+ /* If the number of columns in the DOM equals the number that we have to
+ * process in DataTables, then we can use the offsets that are created by
+ * the web- browser. No custom sizes can be set in order for this to happen,
+ * nor scrolling used
+ */
+ if ( ie67 || ! userInputs && ! scrollX && ! scrollY &&
+ columnCount == _fnVisbleColumns( oSettings ) &&
+ columnCount == headerCells.length
+ ) {
+ for ( i=0 ; i<columnCount ; i++ ) {
+ var colIdx = _fnVisibleToColumnIndex( oSettings, i );
+
+ if ( colIdx !== null ) {
+ columns[ colIdx ].sWidth = _fnStringToCss( headerCells.eq(i).width() );
+ }
+ }
+ }
+ else
+ {
+ // Otherwise construct a single row, worst case, table with the widest
+ // node in the data, assign any user defined widths, then insert it into
+ // the DOM and allow the browser to do all the hard work of calculating
+ // table widths
+ var tmpTable = $(table).clone() // don't use cloneNode - IE8 will remove events on the main table
+ .css( 'visibility', 'hidden' )
+ .removeAttr( 'id' );
+
+ // Clean up the table body
+ tmpTable.find('tbody tr').remove();
+ var tr = $('<tr/>').appendTo( tmpTable.find('tbody') );
+
+ // Clone the table header and footer - we can't use the header / footer
+ // from the cloned table, since if scrolling is active, the table's
+ // real header and footer are contained in different table tags
+ tmpTable.find('thead, tfoot').remove();
+ tmpTable
+ .append( $(oSettings.nTHead).clone() )
+ .append( $(oSettings.nTFoot).clone() );
+
+ // Remove any assigned widths from the footer (from scrolling)
+ tmpTable.find('tfoot th, tfoot td').css('width', '');
+
+ // Apply custom sizing to the cloned header
+ headerCells = _fnGetUniqueThs( oSettings, tmpTable.find('thead')[0] );
+
+ for ( i=0 ; i<visibleColumns.length ; i++ ) {
+ column = columns[ visibleColumns[i] ];
+
+ headerCells[i].style.width = column.sWidthOrig !== null && column.sWidthOrig !== '' ?
+ _fnStringToCss( column.sWidthOrig ) :
+ '';
+
+ // For scrollX we need to force the column width otherwise the
+ // browser will collapse it. If this width is smaller than the
+ // width the column requires, then it will have no effect
+ if ( column.sWidthOrig && scrollX ) {
+ $( headerCells[i] ).append( $('<div/>').css( {
+ width: column.sWidthOrig,
+ margin: 0,
+ padding: 0,
+ border: 0,
+ height: 1
+ } ) );
+ }
+ }
+
+ // Find the widest cell for each column and put it into the table
+ if ( oSettings.aoData.length ) {
+ for ( i=0 ; i<visibleColumns.length ; i++ ) {
+ columnIdx = visibleColumns[i];
+ column = columns[ columnIdx ];
+
+ $( _fnGetWidestNode( oSettings, columnIdx ) )
+ .clone( false )
+ .append( column.sContentPadding )
+ .appendTo( tr );
+ }
+ }
+
+ // Tidy the temporary table - remove name attributes so there aren't
+ // duplicated in the dom (radio elements for example)
+ $('[name]', tmpTable).removeAttr('name');
+
+ // Table has been built, attach to the document so we can work with it.
+ // A holding element is used, positioned at the top of the container
+ // with minimal height, so it has no effect on if the container scrolls
+ // or not. Otherwise it might trigger scrolling when it actually isn't
+ // needed
+ var holder = $('<div/>').css( scrollX || scrollY ?
+ {
+ position: 'absolute',
+ top: 0,
+ left: 0,
+ height: 1,
+ right: 0,
+ overflow: 'hidden'
+ } :
+ {}
+ )
+ .append( tmpTable )
+ .appendTo( tableContainer );
+
+ // When scrolling (X or Y) we want to set the width of the table as
+ // appropriate. However, when not scrolling leave the table width as it
+ // is. This results in slightly different, but I think correct behaviour
+ if ( scrollX && scrollXInner ) {
+ tmpTable.width( scrollXInner );
+ }
+ else if ( scrollX ) {
+ tmpTable.css( 'width', 'auto' );
+ tmpTable.removeAttr('width');
+
+ // If there is no width attribute or style, then allow the table to
+ // collapse
+ if ( tmpTable.width() < tableContainer.clientWidth && tableWidthAttr ) {
+ tmpTable.width( tableContainer.clientWidth );
+ }
+ }
+ else if ( scrollY ) {
+ tmpTable.width( tableContainer.clientWidth );
+ }
+ else if ( tableWidthAttr ) {
+ tmpTable.width( tableWidthAttr );
+ }
+
+ // Get the width of each column in the constructed table - we need to
+ // know the inner width (so it can be assigned to the other table's
+ // cells) and the outer width so we can calculate the full width of the
+ // table. This is safe since DataTables requires a unique cell for each
+ // column, but if ever a header can span multiple columns, this will
+ // need to be modified.
+ var total = 0;
+ for ( i=0 ; i<visibleColumns.length ; i++ ) {
+ var cell = $(headerCells[i]);
+ var border = cell.outerWidth() - cell.width();
+
+ // Use getBounding... where possible (not IE8-) because it can give
+ // sub-pixel accuracy, which we then want to round up!
+ var bounding = browser.bBounding ?
+ Math.ceil( headerCells[i].getBoundingClientRect().width ) :
+ cell.outerWidth();
+
+ // Total is tracked to remove any sub-pixel errors as the outerWidth
+ // of the table might not equal the total given here (IE!).
+ total += bounding;
+
+ // Width for each column to use
+ columns[ visibleColumns[i] ].sWidth = _fnStringToCss( bounding - border );
+ }
+
+ table.style.width = _fnStringToCss( total );
+
+ // Finished with the table - ditch it
+ holder.remove();
+ }
+
+ // If there is a width attr, we want to attach an event listener which
+ // allows the table sizing to automatically adjust when the window is
+ // resized. Use the width attr rather than CSS, since we can't know if the
+ // CSS is a relative value or absolute - DOM read is always px.
+ if ( tableWidthAttr ) {
+ table.style.width = _fnStringToCss( tableWidthAttr );
+ }
+
+ if ( (tableWidthAttr || scrollX) && ! oSettings._reszEvt ) {
+ var bindResize = function () {
+ $(window).bind('resize.DT-'+oSettings.sInstance, _fnThrottle( function () {
+ _fnAdjustColumnSizing( oSettings );
+ } ) );
+ };
+
+ // IE6/7 will crash if we bind a resize event handler on page load.
+ // To be removed in 1.11 which drops IE6/7 support
+ if ( ie67 ) {
+ setTimeout( bindResize, 1000 );
+ }
+ else {
+ bindResize();
+ }
+
+ oSettings._reszEvt = true;
+ }
+ }
+
+
+ /**
+ * Throttle the calls to a function. Arguments and context are maintained for
+ * the throttled function
+ * @param {function} fn Function to be called
+ * @param {int} [freq=200] call frequency in mS
+ * @returns {function} wrapped function
+ * @memberof DataTable#oApi
+ */
+ function _fnThrottle( fn, freq ) {
+ var
+ frequency = freq !== undefined ? freq : 200,
+ last,
+ timer;
+
+ return function () {
+ var
+ that = this,
+ now = +new Date(),
+ args = arguments;
+
+ if ( last && now < last + frequency ) {
+ clearTimeout( timer );
+
+ timer = setTimeout( function () {
+ last = undefined;
+ fn.apply( that, args );
+ }, frequency );
+ }
+ else {
+ last = now;
+ fn.apply( that, args );
+ }
+ };
+ }
+
+
+ /**
+ * Convert a CSS unit width to pixels (e.g. 2em)
+ * @param {string} width width to be converted
+ * @param {node} parent parent to get the with for (required for relative widths) - optional
+ * @returns {int} width in pixels
+ * @memberof DataTable#oApi
+ */
+ function _fnConvertToWidth ( width, parent )
+ {
+ if ( ! width ) {
+ return 0;
+ }
+
+ var n = $('<div/>')
+ .css( 'width', _fnStringToCss( width ) )
+ .appendTo( parent || document.body );
+
+ var val = n[0].offsetWidth;
+ n.remove();
+
+ return val;
+ }
+
+
+ /**
+ * Get the widest node
+ * @param {object} settings dataTables settings object
+ * @param {int} colIdx column of interest
+ * @returns {node} widest table node
+ * @memberof DataTable#oApi
+ */
+ function _fnGetWidestNode( settings, colIdx )
+ {
+ var idx = _fnGetMaxLenString( settings, colIdx );
+ if ( idx < 0 ) {
+ return null;
+ }
+
+ var data = settings.aoData[ idx ];
+ return ! data.nTr ? // Might not have been created when deferred rendering
+ $('<td/>').html( _fnGetCellData( settings, idx, colIdx, 'display' ) )[0] :
+ data.anCells[ colIdx ];
+ }
+
+
+ /**
+ * Get the maximum strlen for each data column
+ * @param {object} settings dataTables settings object
+ * @param {int} colIdx column of interest
+ * @returns {string} max string length for each column
+ * @memberof DataTable#oApi
+ */
+ function _fnGetMaxLenString( settings, colIdx )
+ {
+ var s, max=-1, maxIdx = -1;
+
+ for ( var i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
+ s = _fnGetCellData( settings, i, colIdx, 'display' )+'';
+ s = s.replace( __re_html_remove, '' );
+ s = s.replace( /&nbsp;/g, ' ' );
+
+ if ( s.length > max ) {
+ max = s.length;
+ maxIdx = i;
+ }
+ }
+
+ return maxIdx;
+ }
+
+
+ /**
+ * Append a CSS unit (only if required) to a string
+ * @param {string} value to css-ify
+ * @returns {string} value with css unit
+ * @memberof DataTable#oApi
+ */
+ function _fnStringToCss( s )
+ {
+ if ( s === null ) {
+ return '0px';
+ }
+
+ if ( typeof s == 'number' ) {
+ return s < 0 ?
+ '0px' :
+ s+'px';
+ }
+
+ // Check it has a unit character already
+ return s.match(/\d$/) ?
+ s+'px' :
+ s;
+ }
+
+
+
+ function _fnSortFlatten ( settings )
+ {
+ var
+ i, iLen, k, kLen,
+ aSort = [],
+ aiOrig = [],
+ aoColumns = settings.aoColumns,
+ aDataSort, iCol, sType, srcCol,
+ fixed = settings.aaSortingFixed,
+ fixedObj = $.isPlainObject( fixed ),
+ nestedSort = [],
+ add = function ( a ) {
+ if ( a.length && ! $.isArray( a[0] ) ) {
+ // 1D array
+ nestedSort.push( a );
+ }
+ else {
+ // 2D array
+ $.merge( nestedSort, a );
+ }
+ };
+
+ // Build the sort array, with pre-fix and post-fix options if they have been
+ // specified
+ if ( $.isArray( fixed ) ) {
+ add( fixed );
+ }
+
+ if ( fixedObj && fixed.pre ) {
+ add( fixed.pre );
+ }
+
+ add( settings.aaSorting );
+
+ if (fixedObj && fixed.post ) {
+ add( fixed.post );
+ }
+
+ for ( i=0 ; i<nestedSort.length ; i++ )
+ {
+ srcCol = nestedSort[i][0];
+ aDataSort = aoColumns[ srcCol ].aDataSort;
+
+ for ( k=0, kLen=aDataSort.length ; k<kLen ; k++ )
+ {
+ iCol = aDataSort[k];
+ sType = aoColumns[ iCol ].sType || 'string';
+
+ if ( nestedSort[i]._idx === undefined ) {
+ nestedSort[i]._idx = $.inArray( nestedSort[i][1], aoColumns[iCol].asSorting );
+ }
+
+ aSort.push( {
+ src: srcCol,
+ col: iCol,
+ dir: nestedSort[i][1],
+ index: nestedSort[i]._idx,
+ type: sType,
+ formatter: DataTable.ext.type.order[ sType+"-pre" ]
+ } );
+ }
+ }
+
+ return aSort;
+ }
+
+ /**
+ * Change the order of the table
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ * @todo This really needs split up!
+ */
+ function _fnSort ( oSettings )
+ {
+ var
+ i, ien, iLen, j, jLen, k, kLen,
+ sDataType, nTh,
+ aiOrig = [],
+ oExtSort = DataTable.ext.type.order,
+ aoData = oSettings.aoData,
+ aoColumns = oSettings.aoColumns,
+ aDataSort, data, iCol, sType, oSort,
+ formatters = 0,
+ sortCol,
+ displayMaster = oSettings.aiDisplayMaster,
+ aSort;
+
+ // Resolve any column types that are unknown due to addition or invalidation
+ // @todo Can this be moved into a 'data-ready' handler which is called when
+ // data is going to be used in the table?
+ _fnColumnTypes( oSettings );
+
+ aSort = _fnSortFlatten( oSettings );
+
+ for ( i=0, ien=aSort.length ; i<ien ; i++ ) {
+ sortCol = aSort[i];
+
+ // Track if we can use the fast sort algorithm
+ if ( sortCol.formatter ) {
+ formatters++;
+ }
+
+ // Load the data needed for the sort, for each cell
+ _fnSortData( oSettings, sortCol.col );
+ }
+
+ /* No sorting required if server-side or no sorting array */
+ if ( _fnDataSource( oSettings ) != 'ssp' && aSort.length !== 0 )
+ {
+ // Create a value - key array of the current row positions such that we can use their
+ // current position during the sort, if values match, in order to perform stable sorting
+ for ( i=0, iLen=displayMaster.length ; i<iLen ; i++ ) {
+ aiOrig[ displayMaster[i] ] = i;
+ }
+
+ /* Do the sort - here we want multi-column sorting based on a given data source (column)
+ * and sorting function (from oSort) in a certain direction. It's reasonably complex to
+ * follow on it's own, but this is what we want (example two column sorting):
+ * fnLocalSorting = function(a,b){
+ * var iTest;
+ * iTest = oSort['string-asc']('data11', 'data12');
+ * if (iTest !== 0)
+ * return iTest;
+ * iTest = oSort['numeric-desc']('data21', 'data22');
+ * if (iTest !== 0)
+ * return iTest;
+ * return oSort['numeric-asc']( aiOrig[a], aiOrig[b] );
+ * }
+ * Basically we have a test for each sorting column, if the data in that column is equal,
+ * test the next column. If all columns match, then we use a numeric sort on the row
+ * positions in the original data array to provide a stable sort.
+ *
+ * Note - I know it seems excessive to have two sorting methods, but the first is around
+ * 15% faster, so the second is only maintained for backwards compatibility with sorting
+ * methods which do not have a pre-sort formatting function.
+ */
+ if ( formatters === aSort.length ) {
+ // All sort types have formatting functions
+ displayMaster.sort( function ( a, b ) {
+ var
+ x, y, k, test, sort,
+ len=aSort.length,
+ dataA = aoData[a]._aSortData,
+ dataB = aoData[b]._aSortData;
+
+ for ( k=0 ; k<len ; k++ ) {
+ sort = aSort[k];
+
+ x = dataA[ sort.col ];
+ y = dataB[ sort.col ];
+
+ test = x<y ? -1 : x>y ? 1 : 0;
+ if ( test !== 0 ) {
+ return sort.dir === 'asc' ? test : -test;
+ }
+ }
+
+ x = aiOrig[a];
+ y = aiOrig[b];
+ return x<y ? -1 : x>y ? 1 : 0;
+ } );
+ }
+ else {
+ // Depreciated - remove in 1.11 (providing a plug-in option)
+ // Not all sort types have formatting methods, so we have to call their sorting
+ // methods.
+ displayMaster.sort( function ( a, b ) {
+ var
+ x, y, k, l, test, sort, fn,
+ len=aSort.length,
+ dataA = aoData[a]._aSortData,
+ dataB = aoData[b]._aSortData;
+
+ for ( k=0 ; k<len ; k++ ) {
+ sort = aSort[k];
+
+ x = dataA[ sort.col ];
+ y = dataB[ sort.col ];
+
+ fn = oExtSort[ sort.type+"-"+sort.dir ] || oExtSort[ "string-"+sort.dir ];
+ test = fn( x, y );
+ if ( test !== 0 ) {
+ return test;
+ }
+ }
+
+ x = aiOrig[a];
+ y = aiOrig[b];
+ return x<y ? -1 : x>y ? 1 : 0;
+ } );
+ }
+ }
+
+ /* Tell the draw function that we have sorted the data */
+ oSettings.bSorted = true;
+ }
+
+
+ function _fnSortAria ( settings )
+ {
+ var label;
+ var nextSort;
+ var columns = settings.aoColumns;
+ var aSort = _fnSortFlatten( settings );
+ var oAria = settings.oLanguage.oAria;
+
+ // ARIA attributes - need to loop all columns, to update all (removing old
+ // attributes as needed)
+ for ( var i=0, iLen=columns.length ; i<iLen ; i++ )
+ {
+ var col = columns[i];
+ var asSorting = col.asSorting;
+ var sTitle = col.sTitle.replace( /<.*?>/g, "" );
+ var th = col.nTh;
+
+ // IE7 is throwing an error when setting these properties with jQuery's
+ // attr() and removeAttr() methods...
+ th.removeAttribute('aria-sort');
+
+ /* In ARIA only the first sorting column can be marked as sorting - no multi-sort option */
+ if ( col.bSortable ) {
+ if ( aSort.length > 0 && aSort[0].col == i ) {
+ th.setAttribute('aria-sort', aSort[0].dir=="asc" ? "ascending" : "descending" );
+ nextSort = asSorting[ aSort[0].index+1 ] || asSorting[0];
+ }
+ else {
+ nextSort = asSorting[0];
+ }
+
+ label = sTitle + ( nextSort === "asc" ?
+ oAria.sSortAscending :
+ oAria.sSortDescending
+ );
+ }
+ else {
+ label = sTitle;
+ }
+
+ th.setAttribute('aria-label', label);
+ }
+ }
+
+
+ /**
+ * Function to run on user sort request
+ * @param {object} settings dataTables settings object
+ * @param {node} attachTo node to attach the handler to
+ * @param {int} colIdx column sorting index
+ * @param {boolean} [append=false] Append the requested sort to the existing
+ * sort if true (i.e. multi-column sort)
+ * @param {function} [callback] callback function
+ * @memberof DataTable#oApi
+ */
+ function _fnSortListener ( settings, colIdx, append, callback )
+ {
+ var col = settings.aoColumns[ colIdx ];
+ var sorting = settings.aaSorting;
+ var asSorting = col.asSorting;
+ var nextSortIdx;
+ var next = function ( a, overflow ) {
+ var idx = a._idx;
+ if ( idx === undefined ) {
+ idx = $.inArray( a[1], asSorting );
+ }
+
+ return idx+1 < asSorting.length ?
+ idx+1 :
+ overflow ?
+ null :
+ 0;
+ };
+
+ // Convert to 2D array if needed
+ if ( typeof sorting[0] === 'number' ) {
+ sorting = settings.aaSorting = [ sorting ];
+ }
+
+ // If appending the sort then we are multi-column sorting
+ if ( append && settings.oFeatures.bSortMulti ) {
+ // Are we already doing some kind of sort on this column?
+ var sortIdx = $.inArray( colIdx, _pluck(sorting, '0') );
+
+ if ( sortIdx !== -1 ) {
+ // Yes, modify the sort
+ nextSortIdx = next( sorting[sortIdx], true );
+
+ if ( nextSortIdx === null && sorting.length === 1 ) {
+ nextSortIdx = 0; // can't remove sorting completely
+ }
+
+ if ( nextSortIdx === null ) {
+ sorting.splice( sortIdx, 1 );
+ }
+ else {
+ sorting[sortIdx][1] = asSorting[ nextSortIdx ];
+ sorting[sortIdx]._idx = nextSortIdx;
+ }
+ }
+ else {
+ // No sort on this column yet
+ sorting.push( [ colIdx, asSorting[0], 0 ] );
+ sorting[sorting.length-1]._idx = 0;
+ }
+ }
+ else if ( sorting.length && sorting[0][0] == colIdx ) {
+ // Single column - already sorting on this column, modify the sort
+ nextSortIdx = next( sorting[0] );
+
+ sorting.length = 1;
+ sorting[0][1] = asSorting[ nextSortIdx ];
+ sorting[0]._idx = nextSortIdx;
+ }
+ else {
+ // Single column - sort only on this column
+ sorting.length = 0;
+ sorting.push( [ colIdx, asSorting[0] ] );
+ sorting[0]._idx = 0;
+ }
+
+ // Run the sort by calling a full redraw
+ _fnReDraw( settings );
+
+ // callback used for async user interaction
+ if ( typeof callback == 'function' ) {
+ callback( settings );
+ }
+ }
+
+
+ /**
+ * Attach a sort handler (click) to a node
+ * @param {object} settings dataTables settings object
+ * @param {node} attachTo node to attach the handler to
+ * @param {int} colIdx column sorting index
+ * @param {function} [callback] callback function
+ * @memberof DataTable#oApi
+ */
+ function _fnSortAttachListener ( settings, attachTo, colIdx, callback )
+ {
+ var col = settings.aoColumns[ colIdx ];
+
+ _fnBindAction( attachTo, {}, function (e) {
+ /* If the column is not sortable - don't to anything */
+ if ( col.bSortable === false ) {
+ return;
+ }
+
+ // If processing is enabled use a timeout to allow the processing
+ // display to be shown - otherwise to it synchronously
+ if ( settings.oFeatures.bProcessing ) {
+ _fnProcessingDisplay( settings, true );
+
+ setTimeout( function() {
+ _fnSortListener( settings, colIdx, e.shiftKey, callback );
+
+ // In server-side processing, the draw callback will remove the
+ // processing display
+ if ( _fnDataSource( settings ) !== 'ssp' ) {
+ _fnProcessingDisplay( settings, false );
+ }
+ }, 0 );
+ }
+ else {
+ _fnSortListener( settings, colIdx, e.shiftKey, callback );
+ }
+ } );
+ }
+
+
+ /**
+ * Set the sorting classes on table's body, Note: it is safe to call this function
+ * when bSort and bSortClasses are false
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnSortingClasses( settings )
+ {
+ var oldSort = settings.aLastSort;
+ var sortClass = settings.oClasses.sSortColumn;
+ var sort = _fnSortFlatten( settings );
+ var features = settings.oFeatures;
+ var i, ien, colIdx;
+
+ if ( features.bSort && features.bSortClasses ) {
+ // Remove old sorting classes
+ for ( i=0, ien=oldSort.length ; i<ien ; i++ ) {
+ colIdx = oldSort[i].src;
+
+ // Remove column sorting
+ $( _pluck( settings.aoData, 'anCells', colIdx ) )
+ .removeClass( sortClass + (i<2 ? i+1 : 3) );
+ }
+
+ // Add new column sorting
+ for ( i=0, ien=sort.length ; i<ien ; i++ ) {
+ colIdx = sort[i].src;
+
+ $( _pluck( settings.aoData, 'anCells', colIdx ) )
+ .addClass( sortClass + (i<2 ? i+1 : 3) );
+ }
+ }
+
+ settings.aLastSort = sort;
+ }
+
+
+ // Get the data to sort a column, be it from cache, fresh (populating the
+ // cache), or from a sort formatter
+ function _fnSortData( settings, idx )
+ {
+ // Custom sorting function - provided by the sort data type
+ var column = settings.aoColumns[ idx ];
+ var customSort = DataTable.ext.order[ column.sSortDataType ];
+ var customData;
+
+ if ( customSort ) {
+ customData = customSort.call( settings.oInstance, settings, idx,
+ _fnColumnIndexToVisible( settings, idx )
+ );
+ }
+
+ // Use / populate cache
+ var row, cellData;
+ var formatter = DataTable.ext.type.order[ column.sType+"-pre" ];
+
+ for ( var i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
+ row = settings.aoData[i];
+
+ if ( ! row._aSortData ) {
+ row._aSortData = [];
+ }
+
+ if ( ! row._aSortData[idx] || customSort ) {
+ cellData = customSort ?
+ customData[i] : // If there was a custom sort function, use data from there
+ _fnGetCellData( settings, i, idx, 'sort' );
+
+ row._aSortData[ idx ] = formatter ?
+ formatter( cellData ) :
+ cellData;
+ }
+ }
+ }
+
+
+
+ /**
+ * Save the state of a table
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnSaveState ( settings )
+ {
+ if ( !settings.oFeatures.bStateSave || settings.bDestroying )
+ {
+ return;
+ }
+
+ /* Store the interesting variables */
+ var state = {
+ time: +new Date(),
+ start: settings._iDisplayStart,
+ length: settings._iDisplayLength,
+ order: $.extend( true, [], settings.aaSorting ),
+ search: _fnSearchToCamel( settings.oPreviousSearch ),
+ columns: $.map( settings.aoColumns, function ( col, i ) {
+ return {
+ visible: col.bVisible,
+ search: _fnSearchToCamel( settings.aoPreSearchCols[i] )
+ };
+ } )
+ };
+
+ _fnCallbackFire( settings, "aoStateSaveParams", 'stateSaveParams', [settings, state] );
+
+ settings.oSavedState = state;
+ settings.fnStateSaveCallback.call( settings.oInstance, settings, state );
+ }
+
+
+ /**
+ * Attempt to load a saved table state
+ * @param {object} oSettings dataTables settings object
+ * @param {object} oInit DataTables init object so we can override settings
+ * @memberof DataTable#oApi
+ */
+ function _fnLoadState ( settings, oInit )
+ {
+ var i, ien;
+ var columns = settings.aoColumns;
+
+ if ( ! settings.oFeatures.bStateSave ) {
+ return;
+ }
+
+ var state = settings.fnStateLoadCallback.call( settings.oInstance, settings );
+ if ( ! state || ! state.time ) {
+ return;
+ }
+
+ /* Allow custom and plug-in manipulation functions to alter the saved data set and
+ * cancelling of loading by returning false
+ */
+ var abStateLoad = _fnCallbackFire( settings, 'aoStateLoadParams', 'stateLoadParams', [settings, state] );
+ if ( $.inArray( false, abStateLoad ) !== -1 ) {
+ return;
+ }
+
+ /* Reject old data */
+ var duration = settings.iStateDuration;
+ if ( duration > 0 && state.time < +new Date() - (duration*1000) ) {
+ return;
+ }
+
+ // Number of columns have changed - all bets are off, no restore of settings
+ if ( columns.length !== state.columns.length ) {
+ return;
+ }
+
+ // Store the saved state so it might be accessed at any time
+ settings.oLoadedState = $.extend( true, {}, state );
+
+ // Restore key features - todo - for 1.11 this needs to be done by
+ // subscribed events
+ if ( state.start !== undefined ) {
+ settings._iDisplayStart = state.start;
+ settings.iInitDisplayStart = state.start;
+ }
+ if ( state.length !== undefined ) {
+ settings._iDisplayLength = state.length;
+ }
+
+ // Order
+ if ( state.order !== undefined ) {
+ settings.aaSorting = [];
+ $.each( state.order, function ( i, col ) {
+ settings.aaSorting.push( col[0] >= columns.length ?
+ [ 0, col[1] ] :
+ col
+ );
+ } );
+ }
+
+ // Search
+ if ( state.search !== undefined ) {
+ $.extend( settings.oPreviousSearch, _fnSearchToHung( state.search ) );
+ }
+
+ // Columns
+ for ( i=0, ien=state.columns.length ; i<ien ; i++ ) {
+ var col = state.columns[i];
+
+ // Visibility
+ if ( col.visible !== undefined ) {
+ columns[i].bVisible = col.visible;
+ }
+
+ // Search
+ if ( col.search !== undefined ) {
+ $.extend( settings.aoPreSearchCols[i], _fnSearchToHung( col.search ) );
+ }
+ }
+
+ _fnCallbackFire( settings, 'aoStateLoaded', 'stateLoaded', [settings, state] );
+ }
+
+
+ /**
+ * Return the settings object for a particular table
+ * @param {node} table table we are using as a dataTable
+ * @returns {object} Settings object - or null if not found
+ * @memberof DataTable#oApi
+ */
+ function _fnSettingsFromNode ( table )
+ {
+ var settings = DataTable.settings;
+ var idx = $.inArray( table, _pluck( settings, 'nTable' ) );
+
+ return idx !== -1 ?
+ settings[ idx ] :
+ null;
+ }
+
+
+ /**
+ * Log an error message
+ * @param {object} settings dataTables settings object
+ * @param {int} level log error messages, or display them to the user
+ * @param {string} msg error message
+ * @param {int} tn Technical note id to get more information about the error.
+ * @memberof DataTable#oApi
+ */
+ function _fnLog( settings, level, msg, tn )
+ {
+ msg = 'DataTables warning: '+
+ (settings ? 'table id='+settings.sTableId+' - ' : '')+msg;
+
+ if ( tn ) {
+ msg += '. For more information about this error, please see '+
+ 'http://datatables.net/tn/'+tn;
+ }
+
+ if ( ! level ) {
+ // Backwards compatibility pre 1.10
+ var ext = DataTable.ext;
+ var type = ext.sErrMode || ext.errMode;
+
+ if ( settings ) {
+ _fnCallbackFire( settings, null, 'error', [ settings, tn, msg ] );
+ }
+
+ if ( type == 'alert' ) {
+ alert( msg );
+ }
+ else if ( type == 'throw' ) {
+ throw new Error(msg);
+ }
+ else if ( typeof type == 'function' ) {
+ type( settings, tn, msg );
+ }
+ }
+ else if ( window.console && console.log ) {
+ console.log( msg );
+ }
+ }
+
+
+ /**
+ * See if a property is defined on one object, if so assign it to the other object
+ * @param {object} ret target object
+ * @param {object} src source object
+ * @param {string} name property
+ * @param {string} [mappedName] name to map too - optional, name used if not given
+ * @memberof DataTable#oApi
+ */
+ function _fnMap( ret, src, name, mappedName )
+ {
+ if ( $.isArray( name ) ) {
+ $.each( name, function (i, val) {
+ if ( $.isArray( val ) ) {
+ _fnMap( ret, src, val[0], val[1] );
+ }
+ else {
+ _fnMap( ret, src, val );
+ }
+ } );
+
+ return;
+ }
+
+ if ( mappedName === undefined ) {
+ mappedName = name;
+ }
+
+ if ( src[name] !== undefined ) {
+ ret[mappedName] = src[name];
+ }
+ }
+
+
+ /**
+ * Extend objects - very similar to jQuery.extend, but deep copy objects, and
+ * shallow copy arrays. The reason we need to do this, is that we don't want to
+ * deep copy array init values (such as aaSorting) since the dev wouldn't be
+ * able to override them, but we do want to deep copy arrays.
+ * @param {object} out Object to extend
+ * @param {object} extender Object from which the properties will be applied to
+ * out
+ * @param {boolean} breakRefs If true, then arrays will be sliced to take an
+ * independent copy with the exception of the `data` or `aaData` parameters
+ * if they are present. This is so you can pass in a collection to
+ * DataTables and have that used as your data source without breaking the
+ * references
+ * @returns {object} out Reference, just for convenience - out === the return.
+ * @memberof DataTable#oApi
+ * @todo This doesn't take account of arrays inside the deep copied objects.
+ */
+ function _fnExtend( out, extender, breakRefs )
+ {
+ var val;
+
+ for ( var prop in extender ) {
+ if ( extender.hasOwnProperty(prop) ) {
+ val = extender[prop];
+
+ if ( $.isPlainObject( val ) ) {
+ if ( ! $.isPlainObject( out[prop] ) ) {
+ out[prop] = {};
+ }
+ $.extend( true, out[prop], val );
+ }
+ else if ( breakRefs && prop !== 'data' && prop !== 'aaData' && $.isArray(val) ) {
+ out[prop] = val.slice();
+ }
+ else {
+ out[prop] = val;
+ }
+ }
+ }
+
+ return out;
+ }
+
+
+ /**
+ * Bind an event handers to allow a click or return key to activate the callback.
+ * This is good for accessibility since a return on the keyboard will have the
+ * same effect as a click, if the element has focus.
+ * @param {element} n Element to bind the action to
+ * @param {object} oData Data object to pass to the triggered function
+ * @param {function} fn Callback function for when the event is triggered
+ * @memberof DataTable#oApi
+ */
+ function _fnBindAction( n, oData, fn )
+ {
+ $(n)
+ .bind( 'click.DT', oData, function (e) {
+ n.blur(); // Remove focus outline for mouse users
+ fn(e);
+ } )
+ .bind( 'keypress.DT', oData, function (e){
+ if ( e.which === 13 ) {
+ e.preventDefault();
+ fn(e);
+ }
+ } )
+ .bind( 'selectstart.DT', function () {
+ /* Take the brutal approach to cancelling text selection */
+ return false;
+ } );
+ }
+
+
+ /**
+ * Register a callback function. Easily allows a callback function to be added to
+ * an array store of callback functions that can then all be called together.
+ * @param {object} oSettings dataTables settings object
+ * @param {string} sStore Name of the array storage for the callbacks in oSettings
+ * @param {function} fn Function to be called back
+ * @param {string} sName Identifying name for the callback (i.e. a label)
+ * @memberof DataTable#oApi
+ */
+ function _fnCallbackReg( oSettings, sStore, fn, sName )
+ {
+ if ( fn )
+ {
+ oSettings[sStore].push( {
+ "fn": fn,
+ "sName": sName
+ } );
+ }
+ }
+
+
+ /**
+ * Fire callback functions and trigger events. Note that the loop over the
+ * callback array store is done backwards! Further note that you do not want to
+ * fire off triggers in time sensitive applications (for example cell creation)
+ * as its slow.
+ * @param {object} settings dataTables settings object
+ * @param {string} callbackArr Name of the array storage for the callbacks in
+ * oSettings
+ * @param {string} eventName Name of the jQuery custom event to trigger. If
+ * null no trigger is fired
+ * @param {array} args Array of arguments to pass to the callback function /
+ * trigger
+ * @memberof DataTable#oApi
+ */
+ function _fnCallbackFire( settings, callbackArr, eventName, args )
+ {
+ var ret = [];
+
+ if ( callbackArr ) {
+ ret = $.map( settings[callbackArr].slice().reverse(), function (val, i) {
+ return val.fn.apply( settings.oInstance, args );
+ } );
+ }
+
+ if ( eventName !== null ) {
+ var e = $.Event( eventName+'.dt' );
+
+ $(settings.nTable).trigger( e, args );
+
+ ret.push( e.result );
+ }
+
+ return ret;
+ }
+
+
+ function _fnLengthOverflow ( settings )
+ {
+ var
+ start = settings._iDisplayStart,
+ end = settings.fnDisplayEnd(),
+ len = settings._iDisplayLength;
+
+ /* If we have space to show extra rows (backing up from the end point - then do so */
+ if ( start >= end )
+ {
+ start = end - len;
+ }
+
+ // Keep the start record on the current page
+ start -= (start % len);
+
+ if ( len === -1 || start < 0 )
+ {
+ start = 0;
+ }
+
+ settings._iDisplayStart = start;
+ }
+
+
+ function _fnRenderer( settings, type )
+ {
+ var renderer = settings.renderer;
+ var host = DataTable.ext.renderer[type];
+
+ if ( $.isPlainObject( renderer ) && renderer[type] ) {
+ // Specific renderer for this type. If available use it, otherwise use
+ // the default.
+ return host[renderer[type]] || host._;
+ }
+ else if ( typeof renderer === 'string' ) {
+ // Common renderer - if there is one available for this type use it,
+ // otherwise use the default
+ return host[renderer] || host._;
+ }
+
+ // Use the default
+ return host._;
+ }
+
+
+ /**
+ * Detect the data source being used for the table. Used to simplify the code
+ * a little (ajax) and to make it compress a little smaller.
+ *
+ * @param {object} settings dataTables settings object
+ * @returns {string} Data source
+ * @memberof DataTable#oApi
+ */
+ function _fnDataSource ( settings )
+ {
+ if ( settings.oFeatures.bServerSide ) {
+ return 'ssp';
+ }
+ else if ( settings.ajax || settings.sAjaxSource ) {
+ return 'ajax';
+ }
+ return 'dom';
+ }
+
+
+ DataTable = function( options )
+ {
+ /**
+ * Perform a jQuery selector action on the table's TR elements (from the tbody) and
+ * return the resulting jQuery object.
+ * @param {string|node|jQuery} sSelector jQuery selector or node collection to act on
+ * @param {object} [oOpts] Optional parameters for modifying the rows to be included
+ * @param {string} [oOpts.filter=none] Select TR elements that meet the current filter
+ * criterion ("applied") or all TR elements (i.e. no filter).
+ * @param {string} [oOpts.order=current] Order of the TR elements in the processed array.
+ * Can be either 'current', whereby the current sorting of the table is used, or
+ * 'original' whereby the original order the data was read into the table is used.
+ * @param {string} [oOpts.page=all] Limit the selection to the currently displayed page
+ * ("current") or not ("all"). If 'current' is given, then order is assumed to be
+ * 'current' and filter is 'applied', regardless of what they might be given as.
+ * @returns {object} jQuery object, filtered by the given selector.
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Highlight every second row
+ * oTable.$('tr:odd').css('backgroundColor', 'blue');
+ * } );
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Filter to rows with 'Webkit' in them, add a background colour and then
+ * // remove the filter, thus highlighting the 'Webkit' rows only.
+ * oTable.fnFilter('Webkit');
+ * oTable.$('tr', {"search": "applied"}).css('backgroundColor', 'blue');
+ * oTable.fnFilter('');
+ * } );
+ */
+ this.$ = function ( sSelector, oOpts )
+ {
+ return this.api(true).$( sSelector, oOpts );
+ };
+
+
+ /**
+ * Almost identical to $ in operation, but in this case returns the data for the matched
+ * rows - as such, the jQuery selector used should match TR row nodes or TD/TH cell nodes
+ * rather than any descendants, so the data can be obtained for the row/cell. If matching
+ * rows are found, the data returned is the original data array/object that was used to
+ * create the row (or a generated array if from a DOM source).
+ *
+ * This method is often useful in-combination with $ where both functions are given the
+ * same parameters and the array indexes will match identically.
+ * @param {string|node|jQuery} sSelector jQuery selector or node collection to act on
+ * @param {object} [oOpts] Optional parameters for modifying the rows to be included
+ * @param {string} [oOpts.filter=none] Select elements that meet the current filter
+ * criterion ("applied") or all elements (i.e. no filter).
+ * @param {string} [oOpts.order=current] Order of the data in the processed array.
+ * Can be either 'current', whereby the current sorting of the table is used, or
+ * 'original' whereby the original order the data was read into the table is used.
+ * @param {string} [oOpts.page=all] Limit the selection to the currently displayed page
+ * ("current") or not ("all"). If 'current' is given, then order is assumed to be
+ * 'current' and filter is 'applied', regardless of what they might be given as.
+ * @returns {array} Data for the matched elements. If any elements, as a result of the
+ * selector, were not TR, TD or TH elements in the DataTable, they will have a null
+ * entry in the array.
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Get the data from the first row in the table
+ * var data = oTable._('tr:first');
+ *
+ * // Do something useful with the data
+ * alert( "First cell is: "+data[0] );
+ * } );
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Filter to 'Webkit' and get all data for
+ * oTable.fnFilter('Webkit');
+ * var data = oTable._('tr', {"search": "applied"});
+ *
+ * // Do something with the data
+ * alert( data.length+" rows matched the search" );
+ * } );
+ */
+ this._ = function ( sSelector, oOpts )
+ {
+ return this.api(true).rows( sSelector, oOpts ).data();
+ };
+
+
+ /**
+ * Create a DataTables Api instance, with the currently selected tables for
+ * the Api's context.
+ * @param {boolean} [traditional=false] Set the API instance's context to be
+ * only the table referred to by the `DataTable.ext.iApiIndex` option, as was
+ * used in the API presented by DataTables 1.9- (i.e. the traditional mode),
+ * or if all tables captured in the jQuery object should be used.
+ * @return {DataTables.Api}
+ */
+ this.api = function ( traditional )
+ {
+ return traditional ?
+ new _Api(
+ _fnSettingsFromNode( this[ _ext.iApiIndex ] )
+ ) :
+ new _Api( this );
+ };
+
+
+ /**
+ * Add a single new row or multiple rows of data to the table. Please note
+ * that this is suitable for client-side processing only - if you are using
+ * server-side processing (i.e. "bServerSide": true), then to add data, you
+ * must add it to the data source, i.e. the server-side, through an Ajax call.
+ * @param {array|object} data The data to be added to the table. This can be:
+ * <ul>
+ * <li>1D array of data - add a single row with the data provided</li>
+ * <li>2D array of arrays - add multiple rows in a single call</li>
+ * <li>object - data object when using <i>mData</i></li>
+ * <li>array of objects - multiple data objects when using <i>mData</i></li>
+ * </ul>
+ * @param {bool} [redraw=true] redraw the table or not
+ * @returns {array} An array of integers, representing the list of indexes in
+ * <i>aoData</i> ({@link DataTable.models.oSettings}) that have been added to
+ * the table.
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * // Global var for counter
+ * var giCount = 2;
+ *
+ * $(document).ready(function() {
+ * $('#example').dataTable();
+ * } );
+ *
+ * function fnClickAddRow() {
+ * $('#example').dataTable().fnAddData( [
+ * giCount+".1",
+ * giCount+".2",
+ * giCount+".3",
+ * giCount+".4" ]
+ * );
+ *
+ * giCount++;
+ * }
+ */
+ this.fnAddData = function( data, redraw )
+ {
+ var api = this.api( true );
+
+ /* Check if we want to add multiple rows or not */
+ var rows = $.isArray(data) && ( $.isArray(data[0]) || $.isPlainObject(data[0]) ) ?
+ api.rows.add( data ) :
+ api.row.add( data );
+
+ if ( redraw === undefined || redraw ) {
+ api.draw();
+ }
+
+ return rows.flatten().toArray();
+ };
+
+
+ /**
+ * This function will make DataTables recalculate the column sizes, based on the data
+ * contained in the table and the sizes applied to the columns (in the DOM, CSS or
+ * through the sWidth parameter). This can be useful when the width of the table's
+ * parent element changes (for example a window resize).
+ * @param {boolean} [bRedraw=true] Redraw the table or not, you will typically want to
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable( {
+ * "sScrollY": "200px",
+ * "bPaginate": false
+ * } );
+ *
+ * $(window).bind('resize', function () {
+ * oTable.fnAdjustColumnSizing();
+ * } );
+ * } );
+ */
+ this.fnAdjustColumnSizing = function ( bRedraw )
+ {
+ var api = this.api( true ).columns.adjust();
+ var settings = api.settings()[0];
+ var scroll = settings.oScroll;
+
+ if ( bRedraw === undefined || bRedraw ) {
+ api.draw( false );
+ }
+ else if ( scroll.sX !== "" || scroll.sY !== "" ) {
+ /* If not redrawing, but scrolling, we want to apply the new column sizes anyway */
+ _fnScrollDraw( settings );
+ }
+ };
+
+
+ /**
+ * Quickly and simply clear a table
+ * @param {bool} [bRedraw=true] redraw the table or not
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Immediately 'nuke' the current rows (perhaps waiting for an Ajax callback...)
+ * oTable.fnClearTable();
+ * } );
+ */
+ this.fnClearTable = function( bRedraw )
+ {
+ var api = this.api( true ).clear();
+
+ if ( bRedraw === undefined || bRedraw ) {
+ api.draw();
+ }
+ };
+
+
+ /**
+ * The exact opposite of 'opening' a row, this function will close any rows which
+ * are currently 'open'.
+ * @param {node} nTr the table row to 'close'
+ * @returns {int} 0 on success, or 1 if failed (can't find the row)
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable;
+ *
+ * // 'open' an information row when a row is clicked on
+ * $('#example tbody tr').click( function () {
+ * if ( oTable.fnIsOpen(this) ) {
+ * oTable.fnClose( this );
+ * } else {
+ * oTable.fnOpen( this, "Temporary row opened", "info_row" );
+ * }
+ * } );
+ *
+ * oTable = $('#example').dataTable();
+ * } );
+ */
+ this.fnClose = function( nTr )
+ {
+ this.api( true ).row( nTr ).child.hide();
+ };
+
+
+ /**
+ * Remove a row for the table
+ * @param {mixed} target The index of the row from aoData to be deleted, or
+ * the TR element you want to delete
+ * @param {function|null} [callBack] Callback function
+ * @param {bool} [redraw=true] Redraw the table or not
+ * @returns {array} The row that was deleted
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Immediately remove the first row
+ * oTable.fnDeleteRow( 0 );
+ * } );
+ */
+ this.fnDeleteRow = function( target, callback, redraw )
+ {
+ var api = this.api( true );
+ var rows = api.rows( target );
+ var settings = rows.settings()[0];
+ var data = settings.aoData[ rows[0][0] ];
+
+ rows.remove();
+
+ if ( callback ) {
+ callback.call( this, settings, data );
+ }
+
+ if ( redraw === undefined || redraw ) {
+ api.draw();
+ }
+
+ return data;
+ };
+
+
+ /**
+ * Restore the table to it's original state in the DOM by removing all of DataTables
+ * enhancements, alterations to the DOM structure of the table and event listeners.
+ * @param {boolean} [remove=false] Completely remove the table from the DOM
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * // This example is fairly pointless in reality, but shows how fnDestroy can be used
+ * var oTable = $('#example').dataTable();
+ * oTable.fnDestroy();
+ * } );
+ */
+ this.fnDestroy = function ( remove )
+ {
+ this.api( true ).destroy( remove );
+ };
+
+
+ /**
+ * Redraw the table
+ * @param {bool} [complete=true] Re-filter and resort (if enabled) the table before the draw.
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Re-draw the table - you wouldn't want to do it here, but it's an example :-)
+ * oTable.fnDraw();
+ * } );
+ */
+ this.fnDraw = function( complete )
+ {
+ // Note that this isn't an exact match to the old call to _fnDraw - it takes
+ // into account the new data, but can hold position.
+ this.api( true ).draw( complete );
+ };
+
+
+ /**
+ * Filter the input based on data
+ * @param {string} sInput String to filter the table on
+ * @param {int|null} [iColumn] Column to limit filtering to
+ * @param {bool} [bRegex=false] Treat as regular expression or not
+ * @param {bool} [bSmart=true] Perform smart filtering or not
+ * @param {bool} [bShowGlobal=true] Show the input global filter in it's input box(es)
+ * @param {bool} [bCaseInsensitive=true] Do case-insensitive matching (true) or not (false)
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Sometime later - filter...
+ * oTable.fnFilter( 'test string' );
+ * } );
+ */
+ this.fnFilter = function( sInput, iColumn, bRegex, bSmart, bShowGlobal, bCaseInsensitive )
+ {
+ var api = this.api( true );
+
+ if ( iColumn === null || iColumn === undefined ) {
+ api.search( sInput, bRegex, bSmart, bCaseInsensitive );
+ }
+ else {
+ api.column( iColumn ).search( sInput, bRegex, bSmart, bCaseInsensitive );
+ }
+
+ api.draw();
+ };
+
+
+ /**
+ * Get the data for the whole table, an individual row or an individual cell based on the
+ * provided parameters.
+ * @param {int|node} [src] A TR row node, TD/TH cell node or an integer. If given as
+ * a TR node then the data source for the whole row will be returned. If given as a
+ * TD/TH cell node then iCol will be automatically calculated and the data for the
+ * cell returned. If given as an integer, then this is treated as the aoData internal
+ * data index for the row (see fnGetPosition) and the data for that row used.
+ * @param {int} [col] Optional column index that you want the data of.
+ * @returns {array|object|string} If mRow is undefined, then the data for all rows is
+ * returned. If mRow is defined, just data for that row, and is iCol is
+ * defined, only data for the designated cell is returned.
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * // Row data
+ * $(document).ready(function() {
+ * oTable = $('#example').dataTable();
+ *
+ * oTable.$('tr').click( function () {
+ * var data = oTable.fnGetData( this );
+ * // ... do something with the array / object of data for the row
+ * } );
+ * } );
+ *
+ * @example
+ * // Individual cell data
+ * $(document).ready(function() {
+ * oTable = $('#example').dataTable();
+ *
+ * oTable.$('td').click( function () {
+ * var sData = oTable.fnGetData( this );
+ * alert( 'The cell clicked on had the value of '+sData );
+ * } );
+ * } );
+ */
+ this.fnGetData = function( src, col )
+ {
+ var api = this.api( true );
+
+ if ( src !== undefined ) {
+ var type = src.nodeName ? src.nodeName.toLowerCase() : '';
+
+ return col !== undefined || type == 'td' || type == 'th' ?
+ api.cell( src, col ).data() :
+ api.row( src ).data() || null;
+ }
+
+ return api.data().toArray();
+ };
+
+
+ /**
+ * Get an array of the TR nodes that are used in the table's body. Note that you will
+ * typically want to use the '$' API method in preference to this as it is more
+ * flexible.
+ * @param {int} [iRow] Optional row index for the TR element you want
+ * @returns {array|node} If iRow is undefined, returns an array of all TR elements
+ * in the table's body, or iRow is defined, just the TR element requested.
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Get the nodes from the table
+ * var nNodes = oTable.fnGetNodes( );
+ * } );
+ */
+ this.fnGetNodes = function( iRow )
+ {
+ var api = this.api( true );
+
+ return iRow !== undefined ?
+ api.row( iRow ).node() :
+ api.rows().nodes().flatten().toArray();
+ };
+
+
+ /**
+ * Get the array indexes of a particular cell from it's DOM element
+ * and column index including hidden columns
+ * @param {node} node this can either be a TR, TD or TH in the table's body
+ * @returns {int} If nNode is given as a TR, then a single index is returned, or
+ * if given as a cell, an array of [row index, column index (visible),
+ * column index (all)] is given.
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * $('#example tbody td').click( function () {
+ * // Get the position of the current data from the node
+ * var aPos = oTable.fnGetPosition( this );
+ *
+ * // Get the data array for this row
+ * var aData = oTable.fnGetData( aPos[0] );
+ *
+ * // Update the data array and return the value
+ * aData[ aPos[1] ] = 'clicked';
+ * this.innerHTML = 'clicked';
+ * } );
+ *
+ * // Init DataTables
+ * oTable = $('#example').dataTable();
+ * } );
+ */
+ this.fnGetPosition = function( node )
+ {
+ var api = this.api( true );
+ var nodeName = node.nodeName.toUpperCase();
+
+ if ( nodeName == 'TR' ) {
+ return api.row( node ).index();
+ }
+ else if ( nodeName == 'TD' || nodeName == 'TH' ) {
+ var cell = api.cell( node ).index();
+
+ return [
+ cell.row,
+ cell.columnVisible,
+ cell.column
+ ];
+ }
+ return null;
+ };
+
+
+ /**
+ * Check to see if a row is 'open' or not.
+ * @param {node} nTr the table row to check
+ * @returns {boolean} true if the row is currently open, false otherwise
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable;
+ *
+ * // 'open' an information row when a row is clicked on
+ * $('#example tbody tr').click( function () {
+ * if ( oTable.fnIsOpen(this) ) {
+ * oTable.fnClose( this );
+ * } else {
+ * oTable.fnOpen( this, "Temporary row opened", "info_row" );
+ * }
+ * } );
+ *
+ * oTable = $('#example').dataTable();
+ * } );
+ */
+ this.fnIsOpen = function( nTr )
+ {
+ return this.api( true ).row( nTr ).child.isShown();
+ };
+
+
+ /**
+ * This function will place a new row directly after a row which is currently
+ * on display on the page, with the HTML contents that is passed into the
+ * function. This can be used, for example, to ask for confirmation that a
+ * particular record should be deleted.
+ * @param {node} nTr The table row to 'open'
+ * @param {string|node|jQuery} mHtml The HTML to put into the row
+ * @param {string} sClass Class to give the new TD cell
+ * @returns {node} The row opened. Note that if the table row passed in as the
+ * first parameter, is not found in the table, this method will silently
+ * return.
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable;
+ *
+ * // 'open' an information row when a row is clicked on
+ * $('#example tbody tr').click( function () {
+ * if ( oTable.fnIsOpen(this) ) {
+ * oTable.fnClose( this );
+ * } else {
+ * oTable.fnOpen( this, "Temporary row opened", "info_row" );
+ * }
+ * } );
+ *
+ * oTable = $('#example').dataTable();
+ * } );
+ */
+ this.fnOpen = function( nTr, mHtml, sClass )
+ {
+ return this.api( true )
+ .row( nTr )
+ .child( mHtml, sClass )
+ .show()
+ .child()[0];
+ };
+
+
+ /**
+ * Change the pagination - provides the internal logic for pagination in a simple API
+ * function. With this function you can have a DataTables table go to the next,
+ * previous, first or last pages.
+ * @param {string|int} mAction Paging action to take: "first", "previous", "next" or "last"
+ * or page number to jump to (integer), note that page 0 is the first page.
+ * @param {bool} [bRedraw=true] Redraw the table or not
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ * oTable.fnPageChange( 'next' );
+ * } );
+ */
+ this.fnPageChange = function ( mAction, bRedraw )
+ {
+ var api = this.api( true ).page( mAction );
+
+ if ( bRedraw === undefined || bRedraw ) {
+ api.draw(false);
+ }
+ };
+
+
+ /**
+ * Show a particular column
+ * @param {int} iCol The column whose display should be changed
+ * @param {bool} bShow Show (true) or hide (false) the column
+ * @param {bool} [bRedraw=true] Redraw the table or not
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Hide the second column after initialisation
+ * oTable.fnSetColumnVis( 1, false );
+ * } );
+ */
+ this.fnSetColumnVis = function ( iCol, bShow, bRedraw )
+ {
+ var api = this.api( true ).column( iCol ).visible( bShow );
+
+ if ( bRedraw === undefined || bRedraw ) {
+ api.columns.adjust().draw();
+ }
+ };
+
+
+ /**
+ * Get the settings for a particular table for external manipulation
+ * @returns {object} DataTables settings object. See
+ * {@link DataTable.models.oSettings}
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ * var oSettings = oTable.fnSettings();
+ *
+ * // Show an example parameter from the settings
+ * alert( oSettings._iDisplayStart );
+ * } );
+ */
+ this.fnSettings = function()
+ {
+ return _fnSettingsFromNode( this[_ext.iApiIndex] );
+ };
+
+
+ /**
+ * Sort the table by a particular column
+ * @param {int} iCol the data index to sort on. Note that this will not match the
+ * 'display index' if you have hidden data entries
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Sort immediately with columns 0 and 1
+ * oTable.fnSort( [ [0,'asc'], [1,'asc'] ] );
+ * } );
+ */
+ this.fnSort = function( aaSort )
+ {
+ this.api( true ).order( aaSort ).draw();
+ };
+
+
+ /**
+ * Attach a sort listener to an element for a given column
+ * @param {node} nNode the element to attach the sort listener to
+ * @param {int} iColumn the column that a click on this node will sort on
+ * @param {function} [fnCallback] callback function when sort is run
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Sort on column 1, when 'sorter' is clicked on
+ * oTable.fnSortListener( document.getElementById('sorter'), 1 );
+ * } );
+ */
+ this.fnSortListener = function( nNode, iColumn, fnCallback )
+ {
+ this.api( true ).order.listener( nNode, iColumn, fnCallback );
+ };
+
+
+ /**
+ * Update a table cell or row - this method will accept either a single value to
+ * update the cell with, an array of values with one element for each column or
+ * an object in the same format as the original data source. The function is
+ * self-referencing in order to make the multi column updates easier.
+ * @param {object|array|string} mData Data to update the cell/row with
+ * @param {node|int} mRow TR element you want to update or the aoData index
+ * @param {int} [iColumn] The column to update, give as null or undefined to
+ * update a whole row.
+ * @param {bool} [bRedraw=true] Redraw the table or not
+ * @param {bool} [bAction=true] Perform pre-draw actions or not
+ * @returns {int} 0 on success, 1 on error
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ * oTable.fnUpdate( 'Example update', 0, 0 ); // Single cell
+ * oTable.fnUpdate( ['a', 'b', 'c', 'd', 'e'], $('tbody tr')[0] ); // Row
+ * } );
+ */
+ this.fnUpdate = function( mData, mRow, iColumn, bRedraw, bAction )
+ {
+ var api = this.api( true );
+
+ if ( iColumn === undefined || iColumn === null ) {
+ api.row( mRow ).data( mData );
+ }
+ else {
+ api.cell( mRow, iColumn ).data( mData );
+ }
+
+ if ( bAction === undefined || bAction ) {
+ api.columns.adjust();
+ }
+
+ if ( bRedraw === undefined || bRedraw ) {
+ api.draw();
+ }
+ return 0;
+ };
+
+
+ /**
+ * Provide a common method for plug-ins to check the version of DataTables being used, in order
+ * to ensure compatibility.
+ * @param {string} sVersion Version string to check for, in the format "X.Y.Z". Note that the
+ * formats "X" and "X.Y" are also acceptable.
+ * @returns {boolean} true if this version of DataTables is greater or equal to the required
+ * version, or false if this version of DataTales is not suitable
+ * @method
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ * alert( oTable.fnVersionCheck( '1.9.0' ) );
+ * } );
+ */
+ this.fnVersionCheck = _ext.fnVersionCheck;
+
+
+ var _that = this;
+ var emptyInit = options === undefined;
+ var len = this.length;
+
+ if ( emptyInit ) {
+ options = {};
+ }
+
+ this.oApi = this.internal = _ext.internal;
+
+ // Extend with old style plug-in API methods
+ for ( var fn in DataTable.ext.internal ) {
+ if ( fn ) {
+ this[fn] = _fnExternApiFunc(fn);
+ }
+ }
+
+ this.each(function() {
+ // For each initialisation we want to give it a clean initialisation
+ // object that can be bashed around
+ var o = {};
+ var oInit = len > 1 ? // optimisation for single table case
+ _fnExtend( o, options, true ) :
+ options;
+
+ /*global oInit,_that,emptyInit*/
+ var i=0, iLen, j, jLen, k, kLen;
+ var sId = this.getAttribute( 'id' );
+ var bInitHandedOff = false;
+ var defaults = DataTable.defaults;
+ var $this = $(this);
+
+
+ /* Sanity check */
+ if ( this.nodeName.toLowerCase() != 'table' )
+ {
+ _fnLog( null, 0, 'Non-table node initialisation ('+this.nodeName+')', 2 );
+ return;
+ }
+
+ /* Backwards compatibility for the defaults */
+ _fnCompatOpts( defaults );
+ _fnCompatCols( defaults.column );
+
+ /* Convert the camel-case defaults to Hungarian */
+ _fnCamelToHungarian( defaults, defaults, true );
+ _fnCamelToHungarian( defaults.column, defaults.column, true );
+
+ /* Setting up the initialisation object */
+ _fnCamelToHungarian( defaults, $.extend( oInit, $this.data() ) );
+
+
+
+ /* Check to see if we are re-initialising a table */
+ var allSettings = DataTable.settings;
+ for ( i=0, iLen=allSettings.length ; i<iLen ; i++ )
+ {
+ var s = allSettings[i];
+
+ /* Base check on table node */
+ if ( s.nTable == this || s.nTHead.parentNode == this || (s.nTFoot && s.nTFoot.parentNode == this) )
+ {
+ var bRetrieve = oInit.bRetrieve !== undefined ? oInit.bRetrieve : defaults.bRetrieve;
+ var bDestroy = oInit.bDestroy !== undefined ? oInit.bDestroy : defaults.bDestroy;
+
+ if ( emptyInit || bRetrieve )
+ {
+ return s.oInstance;
+ }
+ else if ( bDestroy )
+ {
+ s.oInstance.fnDestroy();
+ break;
+ }
+ else
+ {
+ _fnLog( s, 0, 'Cannot reinitialise DataTable', 3 );
+ return;
+ }
+ }
+
+ /* If the element we are initialising has the same ID as a table which was previously
+ * initialised, but the table nodes don't match (from before) then we destroy the old
+ * instance by simply deleting it. This is under the assumption that the table has been
+ * destroyed by other methods. Anyone using non-id selectors will need to do this manually
+ */
+ if ( s.sTableId == this.id )
+ {
+ allSettings.splice( i, 1 );
+ break;
+ }
+ }
+
+ /* Ensure the table has an ID - required for accessibility */
+ if ( sId === null || sId === "" )
+ {
+ sId = "DataTables_Table_"+(DataTable.ext._unique++);
+ this.id = sId;
+ }
+
+ /* Create the settings object for this table and set some of the default parameters */
+ var oSettings = $.extend( true, {}, DataTable.models.oSettings, {
+ "sDestroyWidth": $this[0].style.width,
+ "sInstance": sId,
+ "sTableId": sId
+ } );
+ oSettings.nTable = this;
+ oSettings.oApi = _that.internal;
+ oSettings.oInit = oInit;
+
+ allSettings.push( oSettings );
+
+ // Need to add the instance after the instance after the settings object has been added
+ // to the settings array, so we can self reference the table instance if more than one
+ oSettings.oInstance = (_that.length===1) ? _that : $this.dataTable();
+
+ // Backwards compatibility, before we apply all the defaults
+ _fnCompatOpts( oInit );
+
+ if ( oInit.oLanguage )
+ {
+ _fnLanguageCompat( oInit.oLanguage );
+ }
+
+ // If the length menu is given, but the init display length is not, use the length menu
+ if ( oInit.aLengthMenu && ! oInit.iDisplayLength )
+ {
+ oInit.iDisplayLength = $.isArray( oInit.aLengthMenu[0] ) ?
+ oInit.aLengthMenu[0][0] : oInit.aLengthMenu[0];
+ }
+
+ // Apply the defaults and init options to make a single init object will all
+ // options defined from defaults and instance options.
+ oInit = _fnExtend( $.extend( true, {}, defaults ), oInit );
+
+
+ // Map the initialisation options onto the settings object
+ _fnMap( oSettings.oFeatures, oInit, [
+ "bPaginate",
+ "bLengthChange",
+ "bFilter",
+ "bSort",
+ "bSortMulti",
+ "bInfo",
+ "bProcessing",
+ "bAutoWidth",
+ "bSortClasses",
+ "bServerSide",
+ "bDeferRender"
+ ] );
+ _fnMap( oSettings, oInit, [
+ "asStripeClasses",
+ "ajax",
+ "fnServerData",
+ "fnFormatNumber",
+ "sServerMethod",
+ "aaSorting",
+ "aaSortingFixed",
+ "aLengthMenu",
+ "sPaginationType",
+ "sAjaxSource",
+ "sAjaxDataProp",
+ "iStateDuration",
+ "sDom",
+ "bSortCellsTop",
+ "iTabIndex",
+ "fnStateLoadCallback",
+ "fnStateSaveCallback",
+ "renderer",
+ "searchDelay",
+ "rowId",
+ [ "iCookieDuration", "iStateDuration" ], // backwards compat
+ [ "oSearch", "oPreviousSearch" ],
+ [ "aoSearchCols", "aoPreSearchCols" ],
+ [ "iDisplayLength", "_iDisplayLength" ],
+ [ "bJQueryUI", "bJUI" ]
+ ] );
+ _fnMap( oSettings.oScroll, oInit, [
+ [ "sScrollX", "sX" ],
+ [ "sScrollXInner", "sXInner" ],
+ [ "sScrollY", "sY" ],
+ [ "bScrollCollapse", "bCollapse" ]
+ ] );
+ _fnMap( oSettings.oLanguage, oInit, "fnInfoCallback" );
+
+ /* Callback functions which are array driven */
+ _fnCallbackReg( oSettings, 'aoDrawCallback', oInit.fnDrawCallback, 'user' );
+ _fnCallbackReg( oSettings, 'aoServerParams', oInit.fnServerParams, 'user' );
+ _fnCallbackReg( oSettings, 'aoStateSaveParams', oInit.fnStateSaveParams, 'user' );
+ _fnCallbackReg( oSettings, 'aoStateLoadParams', oInit.fnStateLoadParams, 'user' );
+ _fnCallbackReg( oSettings, 'aoStateLoaded', oInit.fnStateLoaded, 'user' );
+ _fnCallbackReg( oSettings, 'aoRowCallback', oInit.fnRowCallback, 'user' );
+ _fnCallbackReg( oSettings, 'aoRowCreatedCallback', oInit.fnCreatedRow, 'user' );
+ _fnCallbackReg( oSettings, 'aoHeaderCallback', oInit.fnHeaderCallback, 'user' );
+ _fnCallbackReg( oSettings, 'aoFooterCallback', oInit.fnFooterCallback, 'user' );
+ _fnCallbackReg( oSettings, 'aoInitComplete', oInit.fnInitComplete, 'user' );
+ _fnCallbackReg( oSettings, 'aoPreDrawCallback', oInit.fnPreDrawCallback, 'user' );
+
+ oSettings.rowIdFn = _fnGetObjectDataFn( oInit.rowId );
+
+ /* Browser support detection */
+ _fnBrowserDetect( oSettings );
+
+ var oClasses = oSettings.oClasses;
+
+ // @todo Remove in 1.11
+ if ( oInit.bJQueryUI )
+ {
+ /* Use the JUI classes object for display. You could clone the oStdClasses object if
+ * you want to have multiple tables with multiple independent classes
+ */
+ $.extend( oClasses, DataTable.ext.oJUIClasses, oInit.oClasses );
+
+ if ( oInit.sDom === defaults.sDom && defaults.sDom === "lfrtip" )
+ {
+ /* Set the DOM to use a layout suitable for jQuery UI's theming */
+ oSettings.sDom = '<"H"lfr>t<"F"ip>';
+ }
+
+ if ( ! oSettings.renderer ) {
+ oSettings.renderer = 'jqueryui';
+ }
+ else if ( $.isPlainObject( oSettings.renderer ) && ! oSettings.renderer.header ) {
+ oSettings.renderer.header = 'jqueryui';
+ }
+ }
+ else
+ {
+ $.extend( oClasses, DataTable.ext.classes, oInit.oClasses );
+ }
+ $this.addClass( oClasses.sTable );
+
+
+ if ( oSettings.iInitDisplayStart === undefined )
+ {
+ /* Display start point, taking into account the save saving */
+ oSettings.iInitDisplayStart = oInit.iDisplayStart;
+ oSettings._iDisplayStart = oInit.iDisplayStart;
+ }
+
+ if ( oInit.iDeferLoading !== null )
+ {
+ oSettings.bDeferLoading = true;
+ var tmp = $.isArray( oInit.iDeferLoading );
+ oSettings._iRecordsDisplay = tmp ? oInit.iDeferLoading[0] : oInit.iDeferLoading;
+ oSettings._iRecordsTotal = tmp ? oInit.iDeferLoading[1] : oInit.iDeferLoading;
+ }
+
+ /* Language definitions */
+ var oLanguage = oSettings.oLanguage;
+ $.extend( true, oLanguage, oInit.oLanguage );
+
+ if ( oLanguage.sUrl !== "" )
+ {
+ /* Get the language definitions from a file - because this Ajax call makes the language
+ * get async to the remainder of this function we use bInitHandedOff to indicate that
+ * _fnInitialise will be fired by the returned Ajax handler, rather than the constructor
+ */
+ $.ajax( {
+ dataType: 'json',
+ url: oLanguage.sUrl,
+ success: function ( json ) {
+ _fnLanguageCompat( json );
+ _fnCamelToHungarian( defaults.oLanguage, json );
+ $.extend( true, oLanguage, json );
+ _fnInitialise( oSettings );
+ },
+ error: function () {
+ // Error occurred loading language file, continue on as best we can
+ _fnInitialise( oSettings );
+ }
+ } );
+ bInitHandedOff = true;
+ }
+
+ /*
+ * Stripes
+ */
+ if ( oInit.asStripeClasses === null )
+ {
+ oSettings.asStripeClasses =[
+ oClasses.sStripeOdd,
+ oClasses.sStripeEven
+ ];
+ }
+
+ /* Remove row stripe classes if they are already on the table row */
+ var stripeClasses = oSettings.asStripeClasses;
+ var rowOne = $this.children('tbody').find('tr').eq(0);
+ if ( $.inArray( true, $.map( stripeClasses, function(el, i) {
+ return rowOne.hasClass(el);
+ } ) ) !== -1 ) {
+ $('tbody tr', this).removeClass( stripeClasses.join(' ') );
+ oSettings.asDestroyStripes = stripeClasses.slice();
+ }
+
+ /*
+ * Columns
+ * See if we should load columns automatically or use defined ones
+ */
+ var anThs = [];
+ var aoColumnsInit;
+ var nThead = this.getElementsByTagName('thead');
+ if ( nThead.length !== 0 )
+ {
+ _fnDetectHeader( oSettings.aoHeader, nThead[0] );
+ anThs = _fnGetUniqueThs( oSettings );
+ }
+
+ /* If not given a column array, generate one with nulls */
+ if ( oInit.aoColumns === null )
+ {
+ aoColumnsInit = [];
+ for ( i=0, iLen=anThs.length ; i<iLen ; i++ )
+ {
+ aoColumnsInit.push( null );
+ }
+ }
+ else
+ {
+ aoColumnsInit = oInit.aoColumns;
+ }
+
+ /* Add the columns */
+ for ( i=0, iLen=aoColumnsInit.length ; i<iLen ; i++ )
+ {
+ _fnAddColumn( oSettings, anThs ? anThs[i] : null );
+ }
+
+ /* Apply the column definitions */
+ _fnApplyColumnDefs( oSettings, oInit.aoColumnDefs, aoColumnsInit, function (iCol, oDef) {
+ _fnColumnOptions( oSettings, iCol, oDef );
+ } );
+
+ /* HTML5 attribute detection - build an mData object automatically if the
+ * attributes are found
+ */
+ if ( rowOne.length ) {
+ var a = function ( cell, name ) {
+ return cell.getAttribute( 'data-'+name ) !== null ? name : null;
+ };
+
+ $( rowOne[0] ).children('th, td').each( function (i, cell) {
+ var col = oSettings.aoColumns[i];
+
+ if ( col.mData === i ) {
+ var sort = a( cell, 'sort' ) || a( cell, 'order' );
+ var filter = a( cell, 'filter' ) || a( cell, 'search' );
+
+ if ( sort !== null || filter !== null ) {
+ col.mData = {
+ _: i+'.display',
+ sort: sort !== null ? i+'.@data-'+sort : undefined,
+ type: sort !== null ? i+'.@data-'+sort : undefined,
+ filter: filter !== null ? i+'.@data-'+filter : undefined
+ };
+
+ _fnColumnOptions( oSettings, i );
+ }
+ }
+ } );
+ }
+
+ var features = oSettings.oFeatures;
+
+ /* Must be done after everything which can be overridden by the state saving! */
+ if ( oInit.bStateSave )
+ {
+ features.bStateSave = true;
+ _fnLoadState( oSettings, oInit );
+ _fnCallbackReg( oSettings, 'aoDrawCallback', _fnSaveState, 'state_save' );
+ }
+
+
+ /*
+ * Sorting
+ * @todo For modularisation (1.11) this needs to do into a sort start up handler
+ */
+
+ // If aaSorting is not defined, then we use the first indicator in asSorting
+ // in case that has been altered, so the default sort reflects that option
+ if ( oInit.aaSorting === undefined )
+ {
+ var sorting = oSettings.aaSorting;
+ for ( i=0, iLen=sorting.length ; i<iLen ; i++ )
+ {
+ sorting[i][1] = oSettings.aoColumns[ i ].asSorting[0];
+ }
+ }
+
+ /* Do a first pass on the sorting classes (allows any size changes to be taken into
+ * account, and also will apply sorting disabled classes if disabled
+ */
+ _fnSortingClasses( oSettings );
+
+ if ( features.bSort )
+ {
+ _fnCallbackReg( oSettings, 'aoDrawCallback', function () {
+ if ( oSettings.bSorted ) {
+ var aSort = _fnSortFlatten( oSettings );
+ var sortedColumns = {};
+
+ $.each( aSort, function (i, val) {
+ sortedColumns[ val.src ] = val.dir;
+ } );
+
+ _fnCallbackFire( oSettings, null, 'order', [oSettings, aSort, sortedColumns] );
+ _fnSortAria( oSettings );
+ }
+ } );
+ }
+
+ _fnCallbackReg( oSettings, 'aoDrawCallback', function () {
+ if ( oSettings.bSorted || _fnDataSource( oSettings ) === 'ssp' || features.bDeferRender ) {
+ _fnSortingClasses( oSettings );
+ }
+ }, 'sc' );
+
+
+ /*
+ * Final init
+ * Cache the header, body and footer as required, creating them if needed
+ */
+
+ // Work around for Webkit bug 83867 - store the caption-side before removing from doc
+ var captions = $this.children('caption').each( function () {
+ this._captionSide = $this.css('caption-side');
+ } );
+
+ var thead = $this.children('thead');
+ if ( thead.length === 0 )
+ {
+ thead = $('<thead/>').appendTo(this);
+ }
+ oSettings.nTHead = thead[0];
+
+ var tbody = $this.children('tbody');
+ if ( tbody.length === 0 )
+ {
+ tbody = $('<tbody/>').appendTo(this);
+ }
+ oSettings.nTBody = tbody[0];
+
+ var tfoot = $this.children('tfoot');
+ if ( tfoot.length === 0 && captions.length > 0 && (oSettings.oScroll.sX !== "" || oSettings.oScroll.sY !== "") )
+ {
+ // If we are a scrolling table, and no footer has been given, then we need to create
+ // a tfoot element for the caption element to be appended to
+ tfoot = $('<tfoot/>').appendTo(this);
+ }
+
+ if ( tfoot.length === 0 || tfoot.children().length === 0 ) {
+ $this.addClass( oClasses.sNoFooter );
+ }
+ else if ( tfoot.length > 0 ) {
+ oSettings.nTFoot = tfoot[0];
+ _fnDetectHeader( oSettings.aoFooter, oSettings.nTFoot );
+ }
+
+ /* Check if there is data passing into the constructor */
+ if ( oInit.aaData )
+ {
+ for ( i=0 ; i<oInit.aaData.length ; i++ )
+ {
+ _fnAddData( oSettings, oInit.aaData[ i ] );
+ }
+ }
+ else if ( oSettings.bDeferLoading || _fnDataSource( oSettings ) == 'dom' )
+ {
+ /* Grab the data from the page - only do this when deferred loading or no Ajax
+ * source since there is no point in reading the DOM data if we are then going
+ * to replace it with Ajax data
+ */
+ _fnAddTr( oSettings, $(oSettings.nTBody).children('tr') );
+ }
+
+ /* Copy the data index array */
+ oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
+
+ /* Initialisation complete - table can be drawn */
+ oSettings.bInitialised = true;
+
+ /* Check if we need to initialise the table (it might not have been handed off to the
+ * language processor)
+ */
+ if ( bInitHandedOff === false )
+ {
+ _fnInitialise( oSettings );
+ }
+ } );
+ _that = null;
+ return this;
+ };
+
+
+
+ /**
+ * Computed structure of the DataTables API, defined by the options passed to
+ * `DataTable.Api.register()` when building the API.
+ *
+ * The structure is built in order to speed creation and extension of the Api
+ * objects since the extensions are effectively pre-parsed.
+ *
+ * The array is an array of objects with the following structure, where this
+ * base array represents the Api prototype base:
+ *
+ * [
+ * {
+ * name: 'data' -- string - Property name
+ * val: function () {}, -- function - Api method (or undefined if just an object
+ * methodExt: [ ... ], -- array - Array of Api object definitions to extend the method result
+ * propExt: [ ... ] -- array - Array of Api object definitions to extend the property
+ * },
+ * {
+ * name: 'row'
+ * val: {},
+ * methodExt: [ ... ],
+ * propExt: [
+ * {
+ * name: 'data'
+ * val: function () {},
+ * methodExt: [ ... ],
+ * propExt: [ ... ]
+ * },
+ * ...
+ * ]
+ * }
+ * ]
+ *
+ * @type {Array}
+ * @ignore
+ */
+ var __apiStruct = [];
+
+
+ /**
+ * `Array.prototype` reference.
+ *
+ * @type object
+ * @ignore
+ */
+ var __arrayProto = Array.prototype;
+
+
+ /**
+ * Abstraction for `context` parameter of the `Api` constructor to allow it to
+ * take several different forms for ease of use.
+ *
+ * Each of the input parameter types will be converted to a DataTables settings
+ * object where possible.
+ *
+ * @param {string|node|jQuery|object} mixed DataTable identifier. Can be one
+ * of:
+ *
+ * * `string` - jQuery selector. Any DataTables' matching the given selector
+ * with be found and used.
+ * * `node` - `TABLE` node which has already been formed into a DataTable.
+ * * `jQuery` - A jQuery object of `TABLE` nodes.
+ * * `object` - DataTables settings object
+ * * `DataTables.Api` - API instance
+ * @return {array|null} Matching DataTables settings objects. `null` or
+ * `undefined` is returned if no matching DataTable is found.
+ * @ignore
+ */
+ var _toSettings = function ( mixed )
+ {
+ var idx, jq;
+ var settings = DataTable.settings;
+ var tables = $.map( settings, function (el, i) {
+ return el.nTable;
+ } );
+
+ if ( ! mixed ) {
+ return [];
+ }
+ else if ( mixed.nTable && mixed.oApi ) {
+ // DataTables settings object
+ return [ mixed ];
+ }
+ else if ( mixed.nodeName && mixed.nodeName.toLowerCase() === 'table' ) {
+ // Table node
+ idx = $.inArray( mixed, tables );
+ return idx !== -1 ? [ settings[idx] ] : null;
+ }
+ else if ( mixed && typeof mixed.settings === 'function' ) {
+ return mixed.settings().toArray();
+ }
+ else if ( typeof mixed === 'string' ) {
+ // jQuery selector
+ jq = $(mixed);
+ }
+ else if ( mixed instanceof $ ) {
+ // jQuery object (also DataTables instance)
+ jq = mixed;
+ }
+
+ if ( jq ) {
+ return jq.map( function(i) {
+ idx = $.inArray( this, tables );
+ return idx !== -1 ? settings[idx] : null;
+ } ).toArray();
+ }
+ };
+
+
+ /**
+ * DataTables API class - used to control and interface with one or more
+ * DataTables enhanced tables.
+ *
+ * The API class is heavily based on jQuery, presenting a chainable interface
+ * that you can use to interact with tables. Each instance of the API class has
+ * a "context" - i.e. the tables that it will operate on. This could be a single
+ * table, all tables on a page or a sub-set thereof.
+ *
+ * Additionally the API is designed to allow you to easily work with the data in
+ * the tables, retrieving and manipulating it as required. This is done by
+ * presenting the API class as an array like interface. The contents of the
+ * array depend upon the actions requested by each method (for example
+ * `rows().nodes()` will return an array of nodes, while `rows().data()` will
+ * return an array of objects or arrays depending upon your table's
+ * configuration). The API object has a number of array like methods (`push`,
+ * `pop`, `reverse` etc) as well as additional helper methods (`each`, `pluck`,
+ * `unique` etc) to assist your working with the data held in a table.
+ *
+ * Most methods (those which return an Api instance) are chainable, which means
+ * the return from a method call also has all of the methods available that the
+ * top level object had. For example, these two calls are equivalent:
+ *
+ * // Not chained
+ * api.row.add( {...} );
+ * api.draw();
+ *
+ * // Chained
+ * api.row.add( {...} ).draw();
+ *
+ * @class DataTable.Api
+ * @param {array|object|string|jQuery} context DataTable identifier. This is
+ * used to define which DataTables enhanced tables this API will operate on.
+ * Can be one of:
+ *
+ * * `string` - jQuery selector. Any DataTables' matching the given selector
+ * with be found and used.
+ * * `node` - `TABLE` node which has already been formed into a DataTable.
+ * * `jQuery` - A jQuery object of `TABLE` nodes.
+ * * `object` - DataTables settings object
+ * @param {array} [data] Data to initialise the Api instance with.
+ *
+ * @example
+ * // Direct initialisation during DataTables construction
+ * var api = $('#example').DataTable();
+ *
+ * @example
+ * // Initialisation using a DataTables jQuery object
+ * var api = $('#example').dataTable().api();
+ *
+ * @example
+ * // Initialisation as a constructor
+ * var api = new $.fn.DataTable.Api( 'table.dataTable' );
+ */
+ _Api = function ( context, data )
+ {
+ if ( ! (this instanceof _Api) ) {
+ return new _Api( context, data );
+ }
+
+ var settings = [];
+ var ctxSettings = function ( o ) {
+ var a = _toSettings( o );
+ if ( a ) {
+ settings = settings.concat( a );
+ }
+ };
+
+ if ( $.isArray( context ) ) {
+ for ( var i=0, ien=context.length ; i<ien ; i++ ) {
+ ctxSettings( context[i] );
+ }
+ }
+ else {
+ ctxSettings( context );
+ }
+
+ // Remove duplicates
+ this.context = _unique( settings );
+
+ // Initial data
+ if ( data ) {
+ $.merge( this, data );
+ }
+
+ // selector
+ this.selector = {
+ rows: null,
+ cols: null,
+ opts: null
+ };
+
+ _Api.extend( this, this, __apiStruct );
+ };
+
+ DataTable.Api = _Api;
+
+ // Don't destroy the existing prototype, just extend it. Required for jQuery 2's
+ // isPlainObject.
+ $.extend( _Api.prototype, {
+ any: function ()
+ {
+ return this.count() !== 0;
+ },
+
+
+ concat: __arrayProto.concat,
+
+
+ context: [], // array of table settings objects
+
+
+ count: function ()
+ {
+ return this.flatten().length;
+ },
+
+
+ each: function ( fn )
+ {
+ for ( var i=0, ien=this.length ; i<ien; i++ ) {
+ fn.call( this, this[i], i, this );
+ }
+
+ return this;
+ },
+
+
+ eq: function ( idx )
+ {
+ var ctx = this.context;
+
+ return ctx.length > idx ?
+ new _Api( ctx[idx], this[idx] ) :
+ null;
+ },
+
+
+ filter: function ( fn )
+ {
+ var a = [];
+
+ if ( __arrayProto.filter ) {
+ a = __arrayProto.filter.call( this, fn, this );
+ }
+ else {
+ // Compatibility for browsers without EMCA-252-5 (JS 1.6)
+ for ( var i=0, ien=this.length ; i<ien ; i++ ) {
+ if ( fn.call( this, this[i], i, this ) ) {
+ a.push( this[i] );
+ }
+ }
+ }
+
+ return new _Api( this.context, a );
+ },
+
+
+ flatten: function ()
+ {
+ var a = [];
+ return new _Api( this.context, a.concat.apply( a, this.toArray() ) );
+ },
+
+
+ join: __arrayProto.join,
+
+
+ indexOf: __arrayProto.indexOf || function (obj, start)
+ {
+ for ( var i=(start || 0), ien=this.length ; i<ien ; i++ ) {
+ if ( this[i] === obj ) {
+ return i;
+ }
+ }
+ return -1;
+ },
+
+ iterator: function ( flatten, type, fn, alwaysNew ) {
+ var
+ a = [], ret,
+ i, ien, j, jen,
+ context = this.context,
+ rows, items, item,
+ selector = this.selector;
+
+ // Argument shifting
+ if ( typeof flatten === 'string' ) {
+ alwaysNew = fn;
+ fn = type;
+ type = flatten;
+ flatten = false;
+ }
+
+ for ( i=0, ien=context.length ; i<ien ; i++ ) {
+ var apiInst = new _Api( context[i] );
+
+ if ( type === 'table' ) {
+ ret = fn.call( apiInst, context[i], i );
+
+ if ( ret !== undefined ) {
+ a.push( ret );
+ }
+ }
+ else if ( type === 'columns' || type === 'rows' ) {
+ // this has same length as context - one entry for each table
+ ret = fn.call( apiInst, context[i], this[i], i );
+
+ if ( ret !== undefined ) {
+ a.push( ret );
+ }
+ }
+ else if ( type === 'column' || type === 'column-rows' || type === 'row' || type === 'cell' ) {
+ // columns and rows share the same structure.
+ // 'this' is an array of column indexes for each context
+ items = this[i];
+
+ if ( type === 'column-rows' ) {
+ rows = _selector_row_indexes( context[i], selector.opts );
+ }
+
+ for ( j=0, jen=items.length ; j<jen ; j++ ) {
+ item = items[j];
+
+ if ( type === 'cell' ) {
+ ret = fn.call( apiInst, context[i], item.row, item.column, i, j );
+ }
+ else {
+ ret = fn.call( apiInst, context[i], item, i, j, rows );
+ }
+
+ if ( ret !== undefined ) {
+ a.push( ret );
+ }
+ }
+ }
+ }
+
+ if ( a.length || alwaysNew ) {
+ var api = new _Api( context, flatten ? a.concat.apply( [], a ) : a );
+ var apiSelector = api.selector;
+ apiSelector.rows = selector.rows;
+ apiSelector.cols = selector.cols;
+ apiSelector.opts = selector.opts;
+ return api;
+ }
+ return this;
+ },
+
+
+ lastIndexOf: __arrayProto.lastIndexOf || function (obj, start)
+ {
+ // Bit cheeky...
+ return this.indexOf.apply( this.toArray.reverse(), arguments );
+ },
+
+
+ length: 0,
+
+
+ map: function ( fn )
+ {
+ var a = [];
+
+ if ( __arrayProto.map ) {
+ a = __arrayProto.map.call( this, fn, this );
+ }
+ else {
+ // Compatibility for browsers without EMCA-252-5 (JS 1.6)
+ for ( var i=0, ien=this.length ; i<ien ; i++ ) {
+ a.push( fn.call( this, this[i], i ) );
+ }
+ }
+
+ return new _Api( this.context, a );
+ },
+
+
+ pluck: function ( prop )
+ {
+ return this.map( function ( el ) {
+ return el[ prop ];
+ } );
+ },
+
+ pop: __arrayProto.pop,
+
+
+ push: __arrayProto.push,
+
+
+ // Does not return an API instance
+ reduce: __arrayProto.reduce || function ( fn, init )
+ {
+ return _fnReduce( this, fn, init, 0, this.length, 1 );
+ },
+
+
+ reduceRight: __arrayProto.reduceRight || function ( fn, init )
+ {
+ return _fnReduce( this, fn, init, this.length-1, -1, -1 );
+ },
+
+
+ reverse: __arrayProto.reverse,
+
+
+ // Object with rows, columns and opts
+ selector: null,
+
+
+ shift: __arrayProto.shift,
+
+
+ sort: __arrayProto.sort, // ? name - order?
+
+
+ splice: __arrayProto.splice,
+
+
+ toArray: function ()
+ {
+ return __arrayProto.slice.call( this );
+ },
+
+
+ to$: function ()
+ {
+ return $( this );
+ },
+
+
+ toJQuery: function ()
+ {
+ return $( this );
+ },
+
+
+ unique: function ()
+ {
+ return new _Api( this.context, _unique(this) );
+ },
+
+
+ unshift: __arrayProto.unshift
+ } );
+
+
+ _Api.extend = function ( scope, obj, ext )
+ {
+ // Only extend API instances and static properties of the API
+ if ( ! ext.length || ! obj || ( ! (obj instanceof _Api) && ! obj.__dt_wrapper ) ) {
+ return;
+ }
+
+ var
+ i, ien,
+ j, jen,
+ struct, inner,
+ methodScoping = function ( scope, fn, struc ) {
+ return function () {
+ var ret = fn.apply( scope, arguments );
+
+ // Method extension
+ _Api.extend( ret, ret, struc.methodExt );
+ return ret;
+ };
+ };
+
+ for ( i=0, ien=ext.length ; i<ien ; i++ ) {
+ struct = ext[i];
+
+ // Value
+ obj[ struct.name ] = typeof struct.val === 'function' ?
+ methodScoping( scope, struct.val, struct ) :
+ $.isPlainObject( struct.val ) ?
+ {} :
+ struct.val;
+
+ obj[ struct.name ].__dt_wrapper = true;
+
+ // Property extension
+ _Api.extend( scope, obj[ struct.name ], struct.propExt );
+ }
+ };
+
+
+ // @todo - Is there need for an augment function?
+ // _Api.augment = function ( inst, name )
+ // {
+ // // Find src object in the structure from the name
+ // var parts = name.split('.');
+
+ // _Api.extend( inst, obj );
+ // };
+
+
+ // [
+ // {
+ // name: 'data' -- string - Property name
+ // val: function () {}, -- function - Api method (or undefined if just an object
+ // methodExt: [ ... ], -- array - Array of Api object definitions to extend the method result
+ // propExt: [ ... ] -- array - Array of Api object definitions to extend the property
+ // },
+ // {
+ // name: 'row'
+ // val: {},
+ // methodExt: [ ... ],
+ // propExt: [
+ // {
+ // name: 'data'
+ // val: function () {},
+ // methodExt: [ ... ],
+ // propExt: [ ... ]
+ // },
+ // ...
+ // ]
+ // }
+ // ]
+
+ _Api.register = _api_register = function ( name, val )
+ {
+ if ( $.isArray( name ) ) {
+ for ( var j=0, jen=name.length ; j<jen ; j++ ) {
+ _Api.register( name[j], val );
+ }
+ return;
+ }
+
+ var
+ i, ien,
+ heir = name.split('.'),
+ struct = __apiStruct,
+ key, method;
+
+ var find = function ( src, name ) {
+ for ( var i=0, ien=src.length ; i<ien ; i++ ) {
+ if ( src[i].name === name ) {
+ return src[i];
+ }
+ }
+ return null;
+ };
+
+ for ( i=0, ien=heir.length ; i<ien ; i++ ) {
+ method = heir[i].indexOf('()') !== -1;
+ key = method ?
+ heir[i].replace('()', '') :
+ heir[i];
+
+ var src = find( struct, key );
+ if ( ! src ) {
+ src = {
+ name: key,
+ val: {},
+ methodExt: [],
+ propExt: []
+ };
+ struct.push( src );
+ }
+
+ if ( i === ien-1 ) {
+ src.val = val;
+ }
+ else {
+ struct = method ?
+ src.methodExt :
+ src.propExt;
+ }
+ }
+ };
+
+
+ _Api.registerPlural = _api_registerPlural = function ( pluralName, singularName, val ) {
+ _Api.register( pluralName, val );
+
+ _Api.register( singularName, function () {
+ var ret = val.apply( this, arguments );
+
+ if ( ret === this ) {
+ // Returned item is the API instance that was passed in, return it
+ return this;
+ }
+ else if ( ret instanceof _Api ) {
+ // New API instance returned, want the value from the first item
+ // in the returned array for the singular result.
+ return ret.length ?
+ $.isArray( ret[0] ) ?
+ new _Api( ret.context, ret[0] ) : // Array results are 'enhanced'
+ ret[0] :
+ undefined;
+ }
+
+ // Non-API return - just fire it back
+ return ret;
+ } );
+ };
+
+
+ /**
+ * Selector for HTML tables. Apply the given selector to the give array of
+ * DataTables settings objects.
+ *
+ * @param {string|integer} [selector] jQuery selector string or integer
+ * @param {array} Array of DataTables settings objects to be filtered
+ * @return {array}
+ * @ignore
+ */
+ var __table_selector = function ( selector, a )
+ {
+ // Integer is used to pick out a table by index
+ if ( typeof selector === 'number' ) {
+ return [ a[ selector ] ];
+ }
+
+ // Perform a jQuery selector on the table nodes
+ var nodes = $.map( a, function (el, i) {
+ return el.nTable;
+ } );
+
+ return $(nodes)
+ .filter( selector )
+ .map( function (i) {
+ // Need to translate back from the table node to the settings
+ var idx = $.inArray( this, nodes );
+ return a[ idx ];
+ } )
+ .toArray();
+ };
+
+
+
+ /**
+ * Context selector for the API's context (i.e. the tables the API instance
+ * refers to.
+ *
+ * @name DataTable.Api#tables
+ * @param {string|integer} [selector] Selector to pick which tables the iterator
+ * should operate on. If not given, all tables in the current context are
+ * used. This can be given as a jQuery selector (for example `':gt(0)'`) to
+ * select multiple tables or as an integer to select a single table.
+ * @returns {DataTable.Api} Returns a new API instance if a selector is given.
+ */
+ _api_register( 'tables()', function ( selector ) {
+ // A new instance is created if there was a selector specified
+ return selector ?
+ new _Api( __table_selector( selector, this.context ) ) :
+ this;
+ } );
+
+
+ _api_register( 'table()', function ( selector ) {
+ var tables = this.tables( selector );
+ var ctx = tables.context;
+
+ // Truncate to the first matched table
+ return ctx.length ?
+ new _Api( ctx[0] ) :
+ tables;
+ } );
+
+
+ _api_registerPlural( 'tables().nodes()', 'table().node()' , function () {
+ return this.iterator( 'table', function ( ctx ) {
+ return ctx.nTable;
+ }, 1 );
+ } );
+
+
+ _api_registerPlural( 'tables().body()', 'table().body()' , function () {
+ return this.iterator( 'table', function ( ctx ) {
+ return ctx.nTBody;
+ }, 1 );
+ } );
+
+
+ _api_registerPlural( 'tables().header()', 'table().header()' , function () {
+ return this.iterator( 'table', function ( ctx ) {
+ return ctx.nTHead;
+ }, 1 );
+ } );
+
+
+ _api_registerPlural( 'tables().footer()', 'table().footer()' , function () {
+ return this.iterator( 'table', function ( ctx ) {
+ return ctx.nTFoot;
+ }, 1 );
+ } );
+
+
+ _api_registerPlural( 'tables().containers()', 'table().container()' , function () {
+ return this.iterator( 'table', function ( ctx ) {
+ return ctx.nTableWrapper;
+ }, 1 );
+ } );
+
+
+
+ /**
+ * Redraw the tables in the current context.
+ */
+ _api_register( 'draw()', function ( paging ) {
+ return this.iterator( 'table', function ( settings ) {
+ if ( paging === 'page' ) {
+ _fnDraw( settings );
+ }
+ else {
+ if ( typeof paging === 'string' ) {
+ paging = paging === 'full-hold' ?
+ false :
+ true;
+ }
+
+ _fnReDraw( settings, paging===false );
+ }
+ } );
+ } );
+
+
+
+ /**
+ * Get the current page index.
+ *
+ * @return {integer} Current page index (zero based)
+ *//**
+ * Set the current page.
+ *
+ * Note that if you attempt to show a page which does not exist, DataTables will
+ * not throw an error, but rather reset the paging.
+ *
+ * @param {integer|string} action The paging action to take. This can be one of:
+ * * `integer` - The page index to jump to
+ * * `string` - An action to take:
+ * * `first` - Jump to first page.
+ * * `next` - Jump to the next page
+ * * `previous` - Jump to previous page
+ * * `last` - Jump to the last page.
+ * @returns {DataTables.Api} this
+ */
+ _api_register( 'page()', function ( action ) {
+ if ( action === undefined ) {
+ return this.page.info().page; // not an expensive call
+ }
+
+ // else, have an action to take on all tables
+ return this.iterator( 'table', function ( settings ) {
+ _fnPageChange( settings, action );
+ } );
+ } );
+
+
+ /**
+ * Paging information for the first table in the current context.
+ *
+ * If you require paging information for another table, use the `table()` method
+ * with a suitable selector.
+ *
+ * @return {object} Object with the following properties set:
+ * * `page` - Current page index (zero based - i.e. the first page is `0`)
+ * * `pages` - Total number of pages
+ * * `start` - Display index for the first record shown on the current page
+ * * `end` - Display index for the last record shown on the current page
+ * * `length` - Display length (number of records). Note that generally `start
+ * + length = end`, but this is not always true, for example if there are
+ * only 2 records to show on the final page, with a length of 10.
+ * * `recordsTotal` - Full data set length
+ * * `recordsDisplay` - Data set length once the current filtering criterion
+ * are applied.
+ */
+ _api_register( 'page.info()', function ( action ) {
+ if ( this.context.length === 0 ) {
+ return undefined;
+ }
+
+ var
+ settings = this.context[0],
+ start = settings._iDisplayStart,
+ len = settings.oFeatures.bPaginate ? settings._iDisplayLength : -1,
+ visRecords = settings.fnRecordsDisplay(),
+ all = len === -1;
+
+ return {
+ "page": all ? 0 : Math.floor( start / len ),
+ "pages": all ? 1 : Math.ceil( visRecords / len ),
+ "start": start,
+ "end": settings.fnDisplayEnd(),
+ "length": len,
+ "recordsTotal": settings.fnRecordsTotal(),
+ "recordsDisplay": visRecords,
+ "serverSide": _fnDataSource( settings ) === 'ssp'
+ };
+ } );
+
+
+ /**
+ * Get the current page length.
+ *
+ * @return {integer} Current page length. Note `-1` indicates that all records
+ * are to be shown.
+ *//**
+ * Set the current page length.
+ *
+ * @param {integer} Page length to set. Use `-1` to show all records.
+ * @returns {DataTables.Api} this
+ */
+ _api_register( 'page.len()', function ( len ) {
+ // Note that we can't call this function 'length()' because `length`
+ // is a Javascript property of functions which defines how many arguments
+ // the function expects.
+ if ( len === undefined ) {
+ return this.context.length !== 0 ?
+ this.context[0]._iDisplayLength :
+ undefined;
+ }
+
+ // else, set the page length
+ return this.iterator( 'table', function ( settings ) {
+ _fnLengthChange( settings, len );
+ } );
+ } );
+
+
+
+ var __reload = function ( settings, holdPosition, callback ) {
+ // Use the draw event to trigger a callback
+ if ( callback ) {
+ var api = new _Api( settings );
+
+ api.one( 'draw', function () {
+ callback( api.ajax.json() );
+ } );
+ }
+
+ if ( _fnDataSource( settings ) == 'ssp' ) {
+ _fnReDraw( settings, holdPosition );
+ }
+ else {
+ _fnProcessingDisplay( settings, true );
+
+ // Cancel an existing request
+ var xhr = settings.jqXHR;
+ if ( xhr && xhr.readyState !== 4 ) {
+ xhr.abort();
+ }
+
+ // Trigger xhr
+ _fnBuildAjax( settings, [], function( json ) {
+ _fnClearTable( settings );
+
+ var data = _fnAjaxDataSrc( settings, json );
+ for ( var i=0, ien=data.length ; i<ien ; i++ ) {
+ _fnAddData( settings, data[i] );
+ }
+
+ _fnReDraw( settings, holdPosition );
+ _fnProcessingDisplay( settings, false );
+ } );
+ }
+ };
+
+
+ /**
+ * Get the JSON response from the last Ajax request that DataTables made to the
+ * server. Note that this returns the JSON from the first table in the current
+ * context.
+ *
+ * @return {object} JSON received from the server.
+ */
+ _api_register( 'ajax.json()', function () {
+ var ctx = this.context;
+
+ if ( ctx.length > 0 ) {
+ return ctx[0].json;
+ }
+
+ // else return undefined;
+ } );
+
+
+ /**
+ * Get the data submitted in the last Ajax request
+ */
+ _api_register( 'ajax.params()', function () {
+ var ctx = this.context;
+
+ if ( ctx.length > 0 ) {
+ return ctx[0].oAjaxData;
+ }
+
+ // else return undefined;
+ } );
+
+
+ /**
+ * Reload tables from the Ajax data source. Note that this function will
+ * automatically re-draw the table when the remote data has been loaded.
+ *
+ * @param {boolean} [reset=true] Reset (default) or hold the current paging
+ * position. A full re-sort and re-filter is performed when this method is
+ * called, which is why the pagination reset is the default action.
+ * @returns {DataTables.Api} this
+ */
+ _api_register( 'ajax.reload()', function ( callback, resetPaging ) {
+ return this.iterator( 'table', function (settings) {
+ __reload( settings, resetPaging===false, callback );
+ } );
+ } );
+
+
+ /**
+ * Get the current Ajax URL. Note that this returns the URL from the first
+ * table in the current context.
+ *
+ * @return {string} Current Ajax source URL
+ *//**
+ * Set the Ajax URL. Note that this will set the URL for all tables in the
+ * current context.
+ *
+ * @param {string} url URL to set.
+ * @returns {DataTables.Api} this
+ */
+ _api_register( 'ajax.url()', function ( url ) {
+ var ctx = this.context;
+
+ if ( url === undefined ) {
+ // get
+ if ( ctx.length === 0 ) {
+ return undefined;
+ }
+ ctx = ctx[0];
+
+ return ctx.ajax ?
+ $.isPlainObject( ctx.ajax ) ?
+ ctx.ajax.url :
+ ctx.ajax :
+ ctx.sAjaxSource;
+ }
+
+ // set
+ return this.iterator( 'table', function ( settings ) {
+ if ( $.isPlainObject( settings.ajax ) ) {
+ settings.ajax.url = url;
+ }
+ else {
+ settings.ajax = url;
+ }
+ // No need to consider sAjaxSource here since DataTables gives priority
+ // to `ajax` over `sAjaxSource`. So setting `ajax` here, renders any
+ // value of `sAjaxSource` redundant.
+ } );
+ } );
+
+
+ /**
+ * Load data from the newly set Ajax URL. Note that this method is only
+ * available when `ajax.url()` is used to set a URL. Additionally, this method
+ * has the same effect as calling `ajax.reload()` but is provided for
+ * convenience when setting a new URL. Like `ajax.reload()` it will
+ * automatically redraw the table once the remote data has been loaded.
+ *
+ * @returns {DataTables.Api} this
+ */
+ _api_register( 'ajax.url().load()', function ( callback, resetPaging ) {
+ // Same as a reload, but makes sense to present it for easy access after a
+ // url change
+ return this.iterator( 'table', function ( ctx ) {
+ __reload( ctx, resetPaging===false, callback );
+ } );
+ } );
+
+
+
+
+ var _selector_run = function ( type, selector, selectFn, settings, opts )
+ {
+ var
+ out = [], res,
+ a, i, ien, j, jen,
+ selectorType = typeof selector;
+
+ // Can't just check for isArray here, as an API or jQuery instance might be
+ // given with their array like look
+ if ( ! selector || selectorType === 'string' || selectorType === 'function' || selector.length === undefined ) {
+ selector = [ selector ];
+ }
+
+ for ( i=0, ien=selector.length ; i<ien ; i++ ) {
+ a = selector[i] && selector[i].split ?
+ selector[i].split(',') :
+ [ selector[i] ];
+
+ for ( j=0, jen=a.length ; j<jen ; j++ ) {
+ res = selectFn( typeof a[j] === 'string' ? $.trim(a[j]) : a[j] );
+
+ if ( res && res.length ) {
+ out = out.concat( res );
+ }
+ }
+ }
+
+ // selector extensions
+ var ext = _ext.selector[ type ];
+ if ( ext.length ) {
+ for ( i=0, ien=ext.length ; i<ien ; i++ ) {
+ out = ext[i]( settings, opts, out );
+ }
+ }
+
+ return _unique( out );
+ };
+
+
+ var _selector_opts = function ( opts )
+ {
+ if ( ! opts ) {
+ opts = {};
+ }
+
+ // Backwards compatibility for 1.9- which used the terminology filter rather
+ // than search
+ if ( opts.filter && opts.search === undefined ) {
+ opts.search = opts.filter;
+ }
+
+ return $.extend( {
+ search: 'none',
+ order: 'current',
+ page: 'all'
+ }, opts );
+ };
+
+
+ var _selector_first = function ( inst )
+ {
+ // Reduce the API instance to the first item found
+ for ( var i=0, ien=inst.length ; i<ien ; i++ ) {
+ if ( inst[i].length > 0 ) {
+ // Assign the first element to the first item in the instance
+ // and truncate the instance and context
+ inst[0] = inst[i];
+ inst[0].length = 1;
+ inst.length = 1;
+ inst.context = [ inst.context[i] ];
+
+ return inst;
+ }
+ }
+
+ // Not found - return an empty instance
+ inst.length = 0;
+ return inst;
+ };
+
+
+ var _selector_row_indexes = function ( settings, opts )
+ {
+ var
+ i, ien, tmp, a=[],
+ displayFiltered = settings.aiDisplay,
+ displayMaster = settings.aiDisplayMaster;
+
+ var
+ search = opts.search, // none, applied, removed
+ order = opts.order, // applied, current, index (original - compatibility with 1.9)
+ page = opts.page; // all, current
+
+ if ( _fnDataSource( settings ) == 'ssp' ) {
+ // In server-side processing mode, most options are irrelevant since
+ // rows not shown don't exist and the index order is the applied order
+ // Removed is a special case - for consistency just return an empty
+ // array
+ return search === 'removed' ?
+ [] :
+ _range( 0, displayMaster.length );
+ }
+ else if ( page == 'current' ) {
+ // Current page implies that order=current and fitler=applied, since it is
+ // fairly senseless otherwise, regardless of what order and search actually
+ // are
+ for ( i=settings._iDisplayStart, ien=settings.fnDisplayEnd() ; i<ien ; i++ ) {
+ a.push( displayFiltered[i] );
+ }
+ }
+ else if ( order == 'current' || order == 'applied' ) {
+ a = search == 'none' ?
+ displayMaster.slice() : // no search
+ search == 'applied' ?
+ displayFiltered.slice() : // applied search
+ $.map( displayMaster, function (el, i) { // removed search
+ return $.inArray( el, displayFiltered ) === -1 ? el : null;
+ } );
+ }
+ else if ( order == 'index' || order == 'original' ) {
+ for ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
+ if ( search == 'none' ) {
+ a.push( i );
+ }
+ else { // applied | removed
+ tmp = $.inArray( i, displayFiltered );
+
+ if ((tmp === -1 && search == 'removed') ||
+ (tmp >= 0 && search == 'applied') )
+ {
+ a.push( i );
+ }
+ }
+ }
+ }
+
+ return a;
+ };
+
+
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Rows
+ *
+ * {} - no selector - use all available rows
+ * {integer} - row aoData index
+ * {node} - TR node
+ * {string} - jQuery selector to apply to the TR elements
+ * {array} - jQuery array of nodes, or simply an array of TR nodes
+ *
+ */
+
+
+ var __row_selector = function ( settings, selector, opts )
+ {
+ var run = function ( sel ) {
+ var selInt = _intVal( sel );
+ var i, ien;
+
+ // Short cut - selector is a number and no options provided (default is
+ // all records, so no need to check if the index is in there, since it
+ // must be - dev error if the index doesn't exist).
+ if ( selInt !== null && ! opts ) {
+ return [ selInt ];
+ }
+
+ var rows = _selector_row_indexes( settings, opts );
+
+ if ( selInt !== null && $.inArray( selInt, rows ) !== -1 ) {
+ // Selector - integer
+ return [ selInt ];
+ }
+ else if ( ! sel ) {
+ // Selector - none
+ return rows;
+ }
+
+ // Selector - function
+ if ( typeof sel === 'function' ) {
+ return $.map( rows, function (idx) {
+ var row = settings.aoData[ idx ];
+ return sel( idx, row._aData, row.nTr ) ? idx : null;
+ } );
+ }
+
+ // Get nodes in the order from the `rows` array with null values removed
+ var nodes = _removeEmpty(
+ _pluck_order( settings.aoData, rows, 'nTr' )
+ );
+
+ // Selector - node
+ if ( sel.nodeName ) {
+ if ( sel._DT_RowIndex !== undefined ) {
+ return [ sel._DT_RowIndex ]; // Property added by DT for fast lookup
+ }
+ else if ( sel._DT_CellIndex ) {
+ return [ sel._DT_CellIndex.row ];
+ }
+ else {
+ var host = $(sel).closest('*[data-dt-row]');
+ return host.length ?
+ [ host.data('dt-row') ] :
+ [];
+ }
+ }
+
+ // ID selector. Want to always be able to select rows by id, regardless
+ // of if the tr element has been created or not, so can't rely upon
+ // jQuery here - hence a custom implementation. This does not match
+ // Sizzle's fast selector or HTML4 - in HTML5 the ID can be anything,
+ // but to select it using a CSS selector engine (like Sizzle or
+ // querySelect) it would need to need to be escaped for some characters.
+ // DataTables simplifies this for row selectors since you can select
+ // only a row. A # indicates an id any anything that follows is the id -
+ // unescaped.
+ if ( typeof sel === 'string' && sel.charAt(0) === '#' ) {
+ // get row index from id
+ var rowObj = settings.aIds[ sel.replace( /^#/, '' ) ];
+ if ( rowObj !== undefined ) {
+ return [ rowObj.idx ];
+ }
+
+ // need to fall through to jQuery in case there is DOM id that
+ // matches
+ }
+
+ // Selector - jQuery selector string, array of nodes or jQuery object/
+ // As jQuery's .filter() allows jQuery objects to be passed in filter,
+ // it also allows arrays, so this will cope with all three options
+ return $(nodes)
+ .filter( sel )
+ .map( function () {
+ return this._DT_RowIndex;
+ } )
+ .toArray();
+ };
+
+ return _selector_run( 'row', selector, run, settings, opts );
+ };
+
+
+ _api_register( 'rows()', function ( selector, opts ) {
+ // argument shifting
+ if ( selector === undefined ) {
+ selector = '';
+ }
+ else if ( $.isPlainObject( selector ) ) {
+ opts = selector;
+ selector = '';
+ }
+
+ opts = _selector_opts( opts );
+
+ var inst = this.iterator( 'table', function ( settings ) {
+ return __row_selector( settings, selector, opts );
+ }, 1 );
+
+ // Want argument shifting here and in __row_selector?
+ inst.selector.rows = selector;
+ inst.selector.opts = opts;
+
+ return inst;
+ } );
+
+ _api_register( 'rows().nodes()', function () {
+ return this.iterator( 'row', function ( settings, row ) {
+ return settings.aoData[ row ].nTr || undefined;
+ }, 1 );
+ } );
+
+ _api_register( 'rows().data()', function () {
+ return this.iterator( true, 'rows', function ( settings, rows ) {
+ return _pluck_order( settings.aoData, rows, '_aData' );
+ }, 1 );
+ } );
+
+ _api_registerPlural( 'rows().cache()', 'row().cache()', function ( type ) {
+ return this.iterator( 'row', function ( settings, row ) {
+ var r = settings.aoData[ row ];
+ return type === 'search' ? r._aFilterData : r._aSortData;
+ }, 1 );
+ } );
+
+ _api_registerPlural( 'rows().invalidate()', 'row().invalidate()', function ( src ) {
+ return this.iterator( 'row', function ( settings, row ) {
+ _fnInvalidate( settings, row, src );
+ } );
+ } );
+
+ _api_registerPlural( 'rows().indexes()', 'row().index()', function () {
+ return this.iterator( 'row', function ( settings, row ) {
+ return row;
+ }, 1 );
+ } );
+
+ _api_registerPlural( 'rows().ids()', 'row().id()', function ( hash ) {
+ var a = [];
+ var context = this.context;
+
+ // `iterator` will drop undefined values, but in this case we want them
+ for ( var i=0, ien=context.length ; i<ien ; i++ ) {
+ for ( var j=0, jen=this[i].length ; j<jen ; j++ ) {
+ var id = context[i].rowIdFn( context[i].aoData[ this[i][j] ]._aData );
+ a.push( (hash === true ? '#' : '' )+ id );
+ }
+ }
+
+ return new _Api( context, a );
+ } );
+
+ _api_registerPlural( 'rows().remove()', 'row().remove()', function () {
+ var that = this;
+
+ this.iterator( 'row', function ( settings, row, thatIdx ) {
+ var data = settings.aoData;
+ var rowData = data[ row ];
+ var i, ien, j, jen;
+ var loopRow, loopCells;
+
+ data.splice( row, 1 );
+
+ // Update the cached indexes
+ for ( i=0, ien=data.length ; i<ien ; i++ ) {
+ loopRow = data[i];
+ loopCells = loopRow.anCells;
+
+ // Rows
+ if ( loopRow.nTr !== null ) {
+ loopRow.nTr._DT_RowIndex = i;
+ }
+
+ // Cells
+ if ( loopCells !== null ) {
+ for ( j=0, jen=loopCells.length ; j<jen ; j++ ) {
+ loopCells[j]._DT_CellIndex.row = i;
+ }
+ }
+ }
+
+ // Delete from the display arrays
+ _fnDeleteIndex( settings.aiDisplayMaster, row );
+ _fnDeleteIndex( settings.aiDisplay, row );
+ _fnDeleteIndex( that[ thatIdx ], row, false ); // maintain local indexes
+
+ // Check for an 'overflow' they case for displaying the table
+ _fnLengthOverflow( settings );
+
+ // Remove the row's ID reference if there is one
+ var id = settings.rowIdFn( rowData._aData );
+ if ( id !== undefined ) {
+ delete settings.aIds[ id ];
+ }
+ } );
+
+ this.iterator( 'table', function ( settings ) {
+ for ( var i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
+ settings.aoData[i].idx = i;
+ }
+ } );
+
+ return this;
+ } );
+
+
+ _api_register( 'rows.add()', function ( rows ) {
+ var newRows = this.iterator( 'table', function ( settings ) {
+ var row, i, ien;
+ var out = [];
+
+ for ( i=0, ien=rows.length ; i<ien ; i++ ) {
+ row = rows[i];
+
+ if ( row.nodeName && row.nodeName.toUpperCase() === 'TR' ) {
+ out.push( _fnAddTr( settings, row )[0] );
+ }
+ else {
+ out.push( _fnAddData( settings, row ) );
+ }
+ }
+
+ return out;
+ }, 1 );
+
+ // Return an Api.rows() extended instance, so rows().nodes() etc can be used
+ var modRows = this.rows( -1 );
+ modRows.pop();
+ $.merge( modRows, newRows );
+
+ return modRows;
+ } );
+
+
+
+
+
+ /**
+ *
+ */
+ _api_register( 'row()', function ( selector, opts ) {
+ return _selector_first( this.rows( selector, opts ) );
+ } );
+
+
+ _api_register( 'row().data()', function ( data ) {
+ var ctx = this.context;
+
+ if ( data === undefined ) {
+ // Get
+ return ctx.length && this.length ?
+ ctx[0].aoData[ this[0] ]._aData :
+ undefined;
+ }
+
+ // Set
+ ctx[0].aoData[ this[0] ]._aData = data;
+
+ // Automatically invalidate
+ _fnInvalidate( ctx[0], this[0], 'data' );
+
+ return this;
+ } );
+
+
+ _api_register( 'row().node()', function () {
+ var ctx = this.context;
+
+ return ctx.length && this.length ?
+ ctx[0].aoData[ this[0] ].nTr || null :
+ null;
+ } );
+
+
+ _api_register( 'row.add()', function ( row ) {
+ // Allow a jQuery object to be passed in - only a single row is added from
+ // it though - the first element in the set
+ if ( row instanceof $ && row.length ) {
+ row = row[0];
+ }
+
+ var rows = this.iterator( 'table', function ( settings ) {
+ if ( row.nodeName && row.nodeName.toUpperCase() === 'TR' ) {
+ return _fnAddTr( settings, row )[0];
+ }
+ return _fnAddData( settings, row );
+ } );
+
+ // Return an Api.rows() extended instance, with the newly added row selected
+ return this.row( rows[0] );
+ } );
+
+
+
+ var __details_add = function ( ctx, row, data, klass )
+ {
+ // Convert to array of TR elements
+ var rows = [];
+ var addRow = function ( r, k ) {
+ // Recursion to allow for arrays of jQuery objects
+ if ( $.isArray( r ) || r instanceof $ ) {
+ for ( var i=0, ien=r.length ; i<ien ; i++ ) {
+ addRow( r[i], k );
+ }
+ return;
+ }
+
+ // If we get a TR element, then just add it directly - up to the dev
+ // to add the correct number of columns etc
+ if ( r.nodeName && r.nodeName.toLowerCase() === 'tr' ) {
+ rows.push( r );
+ }
+ else {
+ // Otherwise create a row with a wrapper
+ var created = $('<tr><td/></tr>').addClass( k );
+ $('td', created)
+ .addClass( k )
+ .html( r )
+ [0].colSpan = _fnVisbleColumns( ctx );
+
+ rows.push( created[0] );
+ }
+ };
+
+ addRow( data, klass );
+
+ if ( row._details ) {
+ row._details.remove();
+ }
+
+ row._details = $(rows);
+
+ // If the children were already shown, that state should be retained
+ if ( row._detailsShow ) {
+ row._details.insertAfter( row.nTr );
+ }
+ };
+
+
+ var __details_remove = function ( api, idx )
+ {
+ var ctx = api.context;
+
+ if ( ctx.length ) {
+ var row = ctx[0].aoData[ idx !== undefined ? idx : api[0] ];
+
+ if ( row && row._details ) {
+ row._details.remove();
+
+ row._detailsShow = undefined;
+ row._details = undefined;
+ }
+ }
+ };
+
+
+ var __details_display = function ( api, show ) {
+ var ctx = api.context;
+
+ if ( ctx.length && api.length ) {
+ var row = ctx[0].aoData[ api[0] ];
+
+ if ( row._details ) {
+ row._detailsShow = show;
+
+ if ( show ) {
+ row._details.insertAfter( row.nTr );
+ }
+ else {
+ row._details.detach();
+ }
+
+ __details_events( ctx[0] );
+ }
+ }
+ };
+
+
+ var __details_events = function ( settings )
+ {
+ var api = new _Api( settings );
+ var namespace = '.dt.DT_details';
+ var drawEvent = 'draw'+namespace;
+ var colvisEvent = 'column-visibility'+namespace;
+ var destroyEvent = 'destroy'+namespace;
+ var data = settings.aoData;
+
+ api.off( drawEvent +' '+ colvisEvent +' '+ destroyEvent );
+
+ if ( _pluck( data, '_details' ).length > 0 ) {
+ // On each draw, insert the required elements into the document
+ api.on( drawEvent, function ( e, ctx ) {
+ if ( settings !== ctx ) {
+ return;
+ }
+
+ api.rows( {page:'current'} ).eq(0).each( function (idx) {
+ // Internal data grab
+ var row = data[ idx ];
+
+ if ( row._detailsShow ) {
+ row._details.insertAfter( row.nTr );
+ }
+ } );
+ } );
+
+ // Column visibility change - update the colspan
+ api.on( colvisEvent, function ( e, ctx, idx, vis ) {
+ if ( settings !== ctx ) {
+ return;
+ }
+
+ // Update the colspan for the details rows (note, only if it already has
+ // a colspan)
+ var row, visible = _fnVisbleColumns( ctx );
+
+ for ( var i=0, ien=data.length ; i<ien ; i++ ) {
+ row = data[i];
+
+ if ( row._details ) {
+ row._details.children('td[colspan]').attr('colspan', visible );
+ }
+ }
+ } );
+
+ // Table destroyed - nuke any child rows
+ api.on( destroyEvent, function ( e, ctx ) {
+ if ( settings !== ctx ) {
+ return;
+ }
+
+ for ( var i=0, ien=data.length ; i<ien ; i++ ) {
+ if ( data[i]._details ) {
+ __details_remove( api, i );
+ }
+ }
+ } );
+ }
+ };
+
+ // Strings for the method names to help minification
+ var _emp = '';
+ var _child_obj = _emp+'row().child';
+ var _child_mth = _child_obj+'()';
+
+ // data can be:
+ // tr
+ // string
+ // jQuery or array of any of the above
+ _api_register( _child_mth, function ( data, klass ) {
+ var ctx = this.context;
+
+ if ( data === undefined ) {
+ // get
+ return ctx.length && this.length ?
+ ctx[0].aoData[ this[0] ]._details :
+ undefined;
+ }
+ else if ( data === true ) {
+ // show
+ this.child.show();
+ }
+ else if ( data === false ) {
+ // remove
+ __details_remove( this );
+ }
+ else if ( ctx.length && this.length ) {
+ // set
+ __details_add( ctx[0], ctx[0].aoData[ this[0] ], data, klass );
+ }
+
+ return this;
+ } );
+
+
+ _api_register( [
+ _child_obj+'.show()',
+ _child_mth+'.show()' // only when `child()` was called with parameters (without
+ ], function ( show ) { // it returns an object and this method is not executed)
+ __details_display( this, true );
+ return this;
+ } );
+
+
+ _api_register( [
+ _child_obj+'.hide()',
+ _child_mth+'.hide()' // only when `child()` was called with parameters (without
+ ], function () { // it returns an object and this method is not executed)
+ __details_display( this, false );
+ return this;
+ } );
+
+
+ _api_register( [
+ _child_obj+'.remove()',
+ _child_mth+'.remove()' // only when `child()` was called with parameters (without
+ ], function () { // it returns an object and this method is not executed)
+ __details_remove( this );
+ return this;
+ } );
+
+
+ _api_register( _child_obj+'.isShown()', function () {
+ var ctx = this.context;
+
+ if ( ctx.length && this.length ) {
+ // _detailsShown as false or undefined will fall through to return false
+ return ctx[0].aoData[ this[0] ]._detailsShow || false;
+ }
+ return false;
+ } );
+
+
+
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Columns
+ *
+ * {integer} - column index (>=0 count from left, <0 count from right)
+ * "{integer}:visIdx" - visible column index (i.e. translate to column index) (>=0 count from left, <0 count from right)
+ * "{integer}:visible" - alias for {integer}:visIdx (>=0 count from left, <0 count from right)
+ * "{string}:name" - column name
+ * "{string}" - jQuery selector on column header nodes
+ *
+ */
+
+ // can be an array of these items, comma separated list, or an array of comma
+ // separated lists
+
+ var __re_column_selector = /^(.+):(name|visIdx|visible)$/;
+
+
+ // r1 and r2 are redundant - but it means that the parameters match for the
+ // iterator callback in columns().data()
+ var __columnData = function ( settings, column, r1, r2, rows ) {
+ var a = [];
+ for ( var row=0, ien=rows.length ; row<ien ; row++ ) {
+ a.push( _fnGetCellData( settings, rows[row], column ) );
+ }
+ return a;
+ };
+
+
+ var __column_selector = function ( settings, selector, opts )
+ {
+ var
+ columns = settings.aoColumns,
+ names = _pluck( columns, 'sName' ),
+ nodes = _pluck( columns, 'nTh' );
+
+ var run = function ( s ) {
+ var selInt = _intVal( s );
+
+ // Selector - all
+ if ( s === '' ) {
+ return _range( columns.length );
+ }
+
+ // Selector - index
+ if ( selInt !== null ) {
+ return [ selInt >= 0 ?
+ selInt : // Count from left
+ columns.length + selInt // Count from right (+ because its a negative value)
+ ];
+ }
+
+ // Selector = function
+ if ( typeof s === 'function' ) {
+ var rows = _selector_row_indexes( settings, opts );
+
+ return $.map( columns, function (col, idx) {
+ return s(
+ idx,
+ __columnData( settings, idx, 0, 0, rows ),
+ nodes[ idx ]
+ ) ? idx : null;
+ } );
+ }
+
+ // jQuery or string selector
+ var match = typeof s === 'string' ?
+ s.match( __re_column_selector ) :
+ '';
+
+ if ( match ) {
+ switch( match[2] ) {
+ case 'visIdx':
+ case 'visible':
+ var idx = parseInt( match[1], 10 );
+ // Visible index given, convert to column index
+ if ( idx < 0 ) {
+ // Counting from the right
+ var visColumns = $.map( columns, function (col,i) {
+ return col.bVisible ? i : null;
+ } );
+ return [ visColumns[ visColumns.length + idx ] ];
+ }
+ // Counting from the left
+ return [ _fnVisibleToColumnIndex( settings, idx ) ];
+
+ case 'name':
+ // match by name. `names` is column index complete and in order
+ return $.map( names, function (name, i) {
+ return name === match[1] ? i : null;
+ } );
+
+ default:
+ return [];
+ }
+ }
+
+ // Cell in the table body
+ if ( s.nodeName && s._DT_CellIndex ) {
+ return [ s._DT_CellIndex.column ];
+ }
+
+ // jQuery selector on the TH elements for the columns
+ var jqResult = $( nodes )
+ .filter( s )
+ .map( function () {
+ return $.inArray( this, nodes ); // `nodes` is column index complete and in order
+ } )
+ .toArray();
+
+ if ( jqResult.length || ! s.nodeName ) {
+ return jqResult;
+ }
+
+ // Otherwise a node which might have a `dt-column` data attribute, or be
+ // a child or such an element
+ var host = $(s).closest('*[data-dt-column]');
+ return host.length ?
+ [ host.data('dt-column') ] :
+ [];
+ };
+
+ return _selector_run( 'column', selector, run, settings, opts );
+ };
+
+
+ var __setColumnVis = function ( settings, column, vis, recalc ) {
+ var
+ cols = settings.aoColumns,
+ col = cols[ column ],
+ data = settings.aoData,
+ row, cells, i, ien, tr;
+
+ // Get
+ if ( vis === undefined ) {
+ return col.bVisible;
+ }
+
+ // Set
+ // No change
+ if ( col.bVisible === vis ) {
+ return;
+ }
+
+ if ( vis ) {
+ // Insert column
+ // Need to decide if we should use appendChild or insertBefore
+ var insertBefore = $.inArray( true, _pluck(cols, 'bVisible'), column+1 );
+
+ for ( i=0, ien=data.length ; i<ien ; i++ ) {
+ tr = data[i].nTr;
+ cells = data[i].anCells;
+
+ if ( tr ) {
+ // insertBefore can act like appendChild if 2nd arg is null
+ tr.insertBefore( cells[ column ], cells[ insertBefore ] || null );
+ }
+ }
+ }
+ else {
+ // Remove column
+ $( _pluck( settings.aoData, 'anCells', column ) ).detach();
+ }
+
+ // Common actions
+ col.bVisible = vis;
+ _fnDrawHead( settings, settings.aoHeader );
+ _fnDrawHead( settings, settings.aoFooter );
+
+ if ( recalc === undefined || recalc ) {
+ // Automatically adjust column sizing
+ _fnAdjustColumnSizing( settings );
+ }
+
+ _fnCallbackFire( settings, null, 'column-visibility', [settings, column, vis, recalc] );
+
+ _fnSaveState( settings );
+ };
+
+
+ _api_register( 'columns()', function ( selector, opts ) {
+ // argument shifting
+ if ( selector === undefined ) {
+ selector = '';
+ }
+ else if ( $.isPlainObject( selector ) ) {
+ opts = selector;
+ selector = '';
+ }
+
+ opts = _selector_opts( opts );
+
+ var inst = this.iterator( 'table', function ( settings ) {
+ return __column_selector( settings, selector, opts );
+ }, 1 );
+
+ // Want argument shifting here and in _row_selector?
+ inst.selector.cols = selector;
+ inst.selector.opts = opts;
+
+ return inst;
+ } );
+
+ _api_registerPlural( 'columns().header()', 'column().header()', function ( selector, opts ) {
+ return this.iterator( 'column', function ( settings, column ) {
+ return settings.aoColumns[column].nTh;
+ }, 1 );
+ } );
+
+ _api_registerPlural( 'columns().footer()', 'column().footer()', function ( selector, opts ) {
+ return this.iterator( 'column', function ( settings, column ) {
+ return settings.aoColumns[column].nTf;
+ }, 1 );
+ } );
+
+ _api_registerPlural( 'columns().data()', 'column().data()', function () {
+ return this.iterator( 'column-rows', __columnData, 1 );
+ } );
+
+ _api_registerPlural( 'columns().dataSrc()', 'column().dataSrc()', function () {
+ return this.iterator( 'column', function ( settings, column ) {
+ return settings.aoColumns[column].mData;
+ }, 1 );
+ } );
+
+ _api_registerPlural( 'columns().cache()', 'column().cache()', function ( type ) {
+ return this.iterator( 'column-rows', function ( settings, column, i, j, rows ) {
+ return _pluck_order( settings.aoData, rows,
+ type === 'search' ? '_aFilterData' : '_aSortData', column
+ );
+ }, 1 );
+ } );
+
+ _api_registerPlural( 'columns().nodes()', 'column().nodes()', function () {
+ return this.iterator( 'column-rows', function ( settings, column, i, j, rows ) {
+ return _pluck_order( settings.aoData, rows, 'anCells', column ) ;
+ }, 1 );
+ } );
+
+ _api_registerPlural( 'columns().visible()', 'column().visible()', function ( vis, calc ) {
+ return this.iterator( 'column', function ( settings, column ) {
+ if ( vis === undefined ) {
+ return settings.aoColumns[ column ].bVisible;
+ } // else
+ __setColumnVis( settings, column, vis, calc );
+ } );
+ } );
+
+ _api_registerPlural( 'columns().indexes()', 'column().index()', function ( type ) {
+ return this.iterator( 'column', function ( settings, column ) {
+ return type === 'visible' ?
+ _fnColumnIndexToVisible( settings, column ) :
+ column;
+ }, 1 );
+ } );
+
+ _api_register( 'columns.adjust()', function () {
+ return this.iterator( 'table', function ( settings ) {
+ _fnAdjustColumnSizing( settings );
+ }, 1 );
+ } );
+
+ _api_register( 'column.index()', function ( type, idx ) {
+ if ( this.context.length !== 0 ) {
+ var ctx = this.context[0];
+
+ if ( type === 'fromVisible' || type === 'toData' ) {
+ return _fnVisibleToColumnIndex( ctx, idx );
+ }
+ else if ( type === 'fromData' || type === 'toVisible' ) {
+ return _fnColumnIndexToVisible( ctx, idx );
+ }
+ }
+ } );
+
+ _api_register( 'column()', function ( selector, opts ) {
+ return _selector_first( this.columns( selector, opts ) );
+ } );
+
+
+
+
+ var __cell_selector = function ( settings, selector, opts )
+ {
+ var data = settings.aoData;
+ var rows = _selector_row_indexes( settings, opts );
+ var cells = _removeEmpty( _pluck_order( data, rows, 'anCells' ) );
+ var allCells = $( [].concat.apply([], cells) );
+ var row;
+ var columns = settings.aoColumns.length;
+ var a, i, ien, j, o, host;
+
+ var run = function ( s ) {
+ var fnSelector = typeof s === 'function';
+
+ if ( s === null || s === undefined || fnSelector ) {
+ // All cells and function selectors
+ a = [];
+
+ for ( i=0, ien=rows.length ; i<ien ; i++ ) {
+ row = rows[i];
+
+ for ( j=0 ; j<columns ; j++ ) {
+ o = {
+ row: row,
+ column: j
+ };
+
+ if ( fnSelector ) {
+ // Selector - function
+ host = data[ row ];
+
+ if ( s( o, _fnGetCellData(settings, row, j), host.anCells ? host.anCells[j] : null ) ) {
+ a.push( o );
+ }
+ }
+ else {
+ // Selector - all
+ a.push( o );
+ }
+ }
+ }
+
+ return a;
+ }
+
+ // Selector - index
+ if ( $.isPlainObject( s ) ) {
+ return [s];
+ }
+
+ // Selector - jQuery filtered cells
+ var jqResult = allCells
+ .filter( s )
+ .map( function (i, el) {
+ return { // use a new object, in case someone changes the values
+ row: el._DT_CellIndex.row,
+ column: el._DT_CellIndex.column
+ };
+ } )
+ .toArray();
+
+ if ( jqResult.length || ! s.nodeName ) {
+ return jqResult;
+ }
+
+ // Otherwise the selector is a node, and there is one last option - the
+ // element might be a child of an element which has dt-row and dt-column
+ // data attributes
+ host = $(s).closest('*[data-dt-row]');
+ return host.length ?
+ [ {
+ row: host.data('dt-row'),
+ column: host.data('dt-column')
+ } ] :
+ [];
+ };
+
+ return _selector_run( 'cell', selector, run, settings, opts );
+ };
+
+
+
+
+ _api_register( 'cells()', function ( rowSelector, columnSelector, opts ) {
+ // Argument shifting
+ if ( $.isPlainObject( rowSelector ) ) {
+ // Indexes
+ if ( rowSelector.row === undefined ) {
+ // Selector options in first parameter
+ opts = rowSelector;
+ rowSelector = null;
+ }
+ else {
+ // Cell index objects in first parameter
+ opts = columnSelector;
+ columnSelector = null;
+ }
+ }
+ if ( $.isPlainObject( columnSelector ) ) {
+ opts = columnSelector;
+ columnSelector = null;
+ }
+
+ // Cell selector
+ if ( columnSelector === null || columnSelector === undefined ) {
+ return this.iterator( 'table', function ( settings ) {
+ return __cell_selector( settings, rowSelector, _selector_opts( opts ) );
+ } );
+ }
+
+ // Row + column selector
+ var columns = this.columns( columnSelector, opts );
+ var rows = this.rows( rowSelector, opts );
+ var a, i, ien, j, jen;
+
+ var cells = this.iterator( 'table', function ( settings, idx ) {
+ a = [];
+
+ for ( i=0, ien=rows[idx].length ; i<ien ; i++ ) {
+ for ( j=0, jen=columns[idx].length ; j<jen ; j++ ) {
+ a.push( {
+ row: rows[idx][i],
+ column: columns[idx][j]
+ } );
+ }
+ }
+
+ return a;
+ }, 1 );
+
+ $.extend( cells.selector, {
+ cols: columnSelector,
+ rows: rowSelector,
+ opts: opts
+ } );
+
+ return cells;
+ } );
+
+
+ _api_registerPlural( 'cells().nodes()', 'cell().node()', function () {
+ return this.iterator( 'cell', function ( settings, row, column ) {
+ var data = settings.aoData[ row ];
+
+ return data && data.anCells ?
+ data.anCells[ column ] :
+ undefined;
+ }, 1 );
+ } );
+
+
+ _api_register( 'cells().data()', function () {
+ return this.iterator( 'cell', function ( settings, row, column ) {
+ return _fnGetCellData( settings, row, column );
+ }, 1 );
+ } );
+
+
+ _api_registerPlural( 'cells().cache()', 'cell().cache()', function ( type ) {
+ type = type === 'search' ? '_aFilterData' : '_aSortData';
+
+ return this.iterator( 'cell', function ( settings, row, column ) {
+ return settings.aoData[ row ][ type ][ column ];
+ }, 1 );
+ } );
+
+
+ _api_registerPlural( 'cells().render()', 'cell().render()', function ( type ) {
+ return this.iterator( 'cell', function ( settings, row, column ) {
+ return _fnGetCellData( settings, row, column, type );
+ }, 1 );
+ } );
+
+
+ _api_registerPlural( 'cells().indexes()', 'cell().index()', function () {
+ return this.iterator( 'cell', function ( settings, row, column ) {
+ return {
+ row: row,
+ column: column,
+ columnVisible: _fnColumnIndexToVisible( settings, column )
+ };
+ }, 1 );
+ } );
+
+
+ _api_registerPlural( 'cells().invalidate()', 'cell().invalidate()', function ( src ) {
+ return this.iterator( 'cell', function ( settings, row, column ) {
+ _fnInvalidate( settings, row, src, column );
+ } );
+ } );
+
+
+
+ _api_register( 'cell()', function ( rowSelector, columnSelector, opts ) {
+ return _selector_first( this.cells( rowSelector, columnSelector, opts ) );
+ } );
+
+
+ _api_register( 'cell().data()', function ( data ) {
+ var ctx = this.context;
+ var cell = this[0];
+
+ if ( data === undefined ) {
+ // Get
+ return ctx.length && cell.length ?
+ _fnGetCellData( ctx[0], cell[0].row, cell[0].column ) :
+ undefined;
+ }
+
+ // Set
+ _fnSetCellData( ctx[0], cell[0].row, cell[0].column, data );
+ _fnInvalidate( ctx[0], cell[0].row, 'data', cell[0].column );
+
+ return this;
+ } );
+
+
+
+ /**
+ * Get current ordering (sorting) that has been applied to the table.
+ *
+ * @returns {array} 2D array containing the sorting information for the first
+ * table in the current context. Each element in the parent array represents
+ * a column being sorted upon (i.e. multi-sorting with two columns would have
+ * 2 inner arrays). The inner arrays may have 2 or 3 elements. The first is
+ * the column index that the sorting condition applies to, the second is the
+ * direction of the sort (`desc` or `asc`) and, optionally, the third is the
+ * index of the sorting order from the `column.sorting` initialisation array.
+ *//**
+ * Set the ordering for the table.
+ *
+ * @param {integer} order Column index to sort upon.
+ * @param {string} direction Direction of the sort to be applied (`asc` or `desc`)
+ * @returns {DataTables.Api} this
+ *//**
+ * Set the ordering for the table.
+ *
+ * @param {array} order 1D array of sorting information to be applied.
+ * @param {array} [...] Optional additional sorting conditions
+ * @returns {DataTables.Api} this
+ *//**
+ * Set the ordering for the table.
+ *
+ * @param {array} order 2D array of sorting information to be applied.
+ * @returns {DataTables.Api} this
+ */
+ _api_register( 'order()', function ( order, dir ) {
+ var ctx = this.context;
+
+ if ( order === undefined ) {
+ // get
+ return ctx.length !== 0 ?
+ ctx[0].aaSorting :
+ undefined;
+ }
+
+ // set
+ if ( typeof order === 'number' ) {
+ // Simple column / direction passed in
+ order = [ [ order, dir ] ];
+ }
+ else if ( ! $.isArray( order[0] ) ) {
+ // Arguments passed in (list of 1D arrays)
+ order = Array.prototype.slice.call( arguments );
+ }
+ // otherwise a 2D array was passed in
+
+ return this.iterator( 'table', function ( settings ) {
+ settings.aaSorting = order.slice();
+ } );
+ } );
+
+
+ /**
+ * Attach a sort listener to an element for a given column
+ *
+ * @param {node|jQuery|string} node Identifier for the element(s) to attach the
+ * listener to. This can take the form of a single DOM node, a jQuery
+ * collection of nodes or a jQuery selector which will identify the node(s).
+ * @param {integer} column the column that a click on this node will sort on
+ * @param {function} [callback] callback function when sort is run
+ * @returns {DataTables.Api} this
+ */
+ _api_register( 'order.listener()', function ( node, column, callback ) {
+ return this.iterator( 'table', function ( settings ) {
+ _fnSortAttachListener( settings, node, column, callback );
+ } );
+ } );
+
+
+ _api_register( 'order.fixed()', function ( set ) {
+ if ( ! set ) {
+ var ctx = this.context;
+ var fixed = ctx.length ?
+ ctx[0].aaSortingFixed :
+ undefined;
+
+ return $.isArray( fixed ) ?
+ { pre: fixed } :
+ fixed;
+ }
+
+ return this.iterator( 'table', function ( settings ) {
+ settings.aaSortingFixed = $.extend( true, {}, set );
+ } );
+ } );
+
+
+ // Order by the selected column(s)
+ _api_register( [
+ 'columns().order()',
+ 'column().order()'
+ ], function ( dir ) {
+ var that = this;
+
+ return this.iterator( 'table', function ( settings, i ) {
+ var sort = [];
+
+ $.each( that[i], function (j, col) {
+ sort.push( [ col, dir ] );
+ } );
+
+ settings.aaSorting = sort;
+ } );
+ } );
+
+
+
+ _api_register( 'search()', function ( input, regex, smart, caseInsen ) {
+ var ctx = this.context;
+
+ if ( input === undefined ) {
+ // get
+ return ctx.length !== 0 ?
+ ctx[0].oPreviousSearch.sSearch :
+ undefined;
+ }
+
+ // set
+ return this.iterator( 'table', function ( settings ) {
+ if ( ! settings.oFeatures.bFilter ) {
+ return;
+ }
+
+ _fnFilterComplete( settings, $.extend( {}, settings.oPreviousSearch, {
+ "sSearch": input+"",
+ "bRegex": regex === null ? false : regex,
+ "bSmart": smart === null ? true : smart,
+ "bCaseInsensitive": caseInsen === null ? true : caseInsen
+ } ), 1 );
+ } );
+ } );
+
+
+ _api_registerPlural(
+ 'columns().search()',
+ 'column().search()',
+ function ( input, regex, smart, caseInsen ) {
+ return this.iterator( 'column', function ( settings, column ) {
+ var preSearch = settings.aoPreSearchCols;
+
+ if ( input === undefined ) {
+ // get
+ return preSearch[ column ].sSearch;
+ }
+
+ // set
+ if ( ! settings.oFeatures.bFilter ) {
+ return;
+ }
+
+ $.extend( preSearch[ column ], {
+ "sSearch": input+"",
+ "bRegex": regex === null ? false : regex,
+ "bSmart": smart === null ? true : smart,
+ "bCaseInsensitive": caseInsen === null ? true : caseInsen
+ } );
+
+ _fnFilterComplete( settings, settings.oPreviousSearch, 1 );
+ } );
+ }
+ );
+
+ /*
+ * State API methods
+ */
+
+ _api_register( 'state()', function () {
+ return this.context.length ?
+ this.context[0].oSavedState :
+ null;
+ } );
+
+
+ _api_register( 'state.clear()', function () {
+ return this.iterator( 'table', function ( settings ) {
+ // Save an empty object
+ settings.fnStateSaveCallback.call( settings.oInstance, settings, {} );
+ } );
+ } );
+
+
+ _api_register( 'state.loaded()', function () {
+ return this.context.length ?
+ this.context[0].oLoadedState :
+ null;
+ } );
+
+
+ _api_register( 'state.save()', function () {
+ return this.iterator( 'table', function ( settings ) {
+ _fnSaveState( settings );
+ } );
+ } );
+
+
+
+ /**
+ * Provide a common method for plug-ins to check the version of DataTables being
+ * used, in order to ensure compatibility.
+ *
+ * @param {string} version Version string to check for, in the format "X.Y.Z".
+ * Note that the formats "X" and "X.Y" are also acceptable.
+ * @returns {boolean} true if this version of DataTables is greater or equal to
+ * the required version, or false if this version of DataTales is not
+ * suitable
+ * @static
+ * @dtopt API-Static
+ *
+ * @example
+ * alert( $.fn.dataTable.versionCheck( '1.9.0' ) );
+ */
+ DataTable.versionCheck = DataTable.fnVersionCheck = function( version )
+ {
+ var aThis = DataTable.version.split('.');
+ var aThat = version.split('.');
+ var iThis, iThat;
+
+ for ( var i=0, iLen=aThat.length ; i<iLen ; i++ ) {
+ iThis = parseInt( aThis[i], 10 ) || 0;
+ iThat = parseInt( aThat[i], 10 ) || 0;
+
+ // Parts are the same, keep comparing
+ if (iThis === iThat) {
+ continue;
+ }
+
+ // Parts are different, return immediately
+ return iThis > iThat;
+ }
+
+ return true;
+ };
+
+
+ /**
+ * Check if a `<table>` node is a DataTable table already or not.
+ *
+ * @param {node|jquery|string} table Table node, jQuery object or jQuery
+ * selector for the table to test. Note that if more than more than one
+ * table is passed on, only the first will be checked
+ * @returns {boolean} true the table given is a DataTable, or false otherwise
+ * @static
+ * @dtopt API-Static
+ *
+ * @example
+ * if ( ! $.fn.DataTable.isDataTable( '#example' ) ) {
+ * $('#example').dataTable();
+ * }
+ */
+ DataTable.isDataTable = DataTable.fnIsDataTable = function ( table )
+ {
+ var t = $(table).get(0);
+ var is = false;
+
+ $.each( DataTable.settings, function (i, o) {
+ var head = o.nScrollHead ? $('table', o.nScrollHead)[0] : null;
+ var foot = o.nScrollFoot ? $('table', o.nScrollFoot)[0] : null;
+
+ if ( o.nTable === t || head === t || foot === t ) {
+ is = true;
+ }
+ } );
+
+ return is;
+ };
+
+
+ /**
+ * Get all DataTable tables that have been initialised - optionally you can
+ * select to get only currently visible tables.
+ *
+ * @param {boolean} [visible=false] Flag to indicate if you want all (default)
+ * or visible tables only.
+ * @returns {array} Array of `table` nodes (not DataTable instances) which are
+ * DataTables
+ * @static
+ * @dtopt API-Static
+ *
+ * @example
+ * $.each( $.fn.dataTable.tables(true), function () {
+ * $(table).DataTable().columns.adjust();
+ * } );
+ */
+ DataTable.tables = DataTable.fnTables = function ( visible )
+ {
+ var api = false;
+
+ if ( $.isPlainObject( visible ) ) {
+ api = visible.api;
+ visible = visible.visible;
+ }
+
+ var a = $.map( DataTable.settings, function (o) {
+ if ( !visible || (visible && $(o.nTable).is(':visible')) ) {
+ return o.nTable;
+ }
+ } );
+
+ return api ?
+ new _Api( a ) :
+ a;
+ };
+
+
+ /**
+ * DataTables utility methods
+ *
+ * This namespace provides helper methods that DataTables uses internally to
+ * create a DataTable, but which are not exclusively used only for DataTables.
+ * These methods can be used by extension authors to save the duplication of
+ * code.
+ *
+ * @namespace
+ */
+ DataTable.util = {
+ /**
+ * Throttle the calls to a function. Arguments and context are maintained
+ * for the throttled function.
+ *
+ * @param {function} fn Function to be called
+ * @param {integer} freq Call frequency in mS
+ * @return {function} Wrapped function
+ */
+ throttle: _fnThrottle,
+
+
+ /**
+ * Escape a string such that it can be used in a regular expression
+ *
+ * @param {string} sVal string to escape
+ * @returns {string} escaped string
+ */
+ escapeRegex: _fnEscapeRegex
+ };
+
+
+ /**
+ * Convert from camel case parameters to Hungarian notation. This is made public
+ * for the extensions to provide the same ability as DataTables core to accept
+ * either the 1.9 style Hungarian notation, or the 1.10+ style camelCase
+ * parameters.
+ *
+ * @param {object} src The model object which holds all parameters that can be
+ * mapped.
+ * @param {object} user The object to convert from camel case to Hungarian.
+ * @param {boolean} force When set to `true`, properties which already have a
+ * Hungarian value in the `user` object will be overwritten. Otherwise they
+ * won't be.
+ */
+ DataTable.camelToHungarian = _fnCamelToHungarian;
+
+
+
+ /**
+ *
+ */
+ _api_register( '$()', function ( selector, opts ) {
+ var
+ rows = this.rows( opts ).nodes(), // Get all rows
+ jqRows = $(rows);
+
+ return $( [].concat(
+ jqRows.filter( selector ).toArray(),
+ jqRows.find( selector ).toArray()
+ ) );
+ } );
+
+
+ // jQuery functions to operate on the tables
+ $.each( [ 'on', 'one', 'off' ], function (i, key) {
+ _api_register( key+'()', function ( /* event, handler */ ) {
+ var args = Array.prototype.slice.call(arguments);
+
+ // Add the `dt` namespace automatically if it isn't already present
+ if ( ! args[0].match(/\.dt\b/) ) {
+ args[0] += '.dt';
+ }
+
+ var inst = $( this.tables().nodes() );
+ inst[key].apply( inst, args );
+ return this;
+ } );
+ } );
+
+
+ _api_register( 'clear()', function () {
+ return this.iterator( 'table', function ( settings ) {
+ _fnClearTable( settings );
+ } );
+ } );
+
+
+ _api_register( 'settings()', function () {
+ return new _Api( this.context, this.context );
+ } );
+
+
+ _api_register( 'init()', function () {
+ var ctx = this.context;
+ return ctx.length ? ctx[0].oInit : null;
+ } );
+
+
+ _api_register( 'data()', function () {
+ return this.iterator( 'table', function ( settings ) {
+ return _pluck( settings.aoData, '_aData' );
+ } ).flatten();
+ } );
+
+
+ _api_register( 'destroy()', function ( remove ) {
+ remove = remove || false;
+
+ return this.iterator( 'table', function ( settings ) {
+ var orig = settings.nTableWrapper.parentNode;
+ var classes = settings.oClasses;
+ var table = settings.nTable;
+ var tbody = settings.nTBody;
+ var thead = settings.nTHead;
+ var tfoot = settings.nTFoot;
+ var jqTable = $(table);
+ var jqTbody = $(tbody);
+ var jqWrapper = $(settings.nTableWrapper);
+ var rows = $.map( settings.aoData, function (r) { return r.nTr; } );
+ var i, ien;
+
+ // Flag to note that the table is currently being destroyed - no action
+ // should be taken
+ settings.bDestroying = true;
+
+ // Fire off the destroy callbacks for plug-ins etc
+ _fnCallbackFire( settings, "aoDestroyCallback", "destroy", [settings] );
+
+ // If not being removed from the document, make all columns visible
+ if ( ! remove ) {
+ new _Api( settings ).columns().visible( true );
+ }
+
+ // Blitz all `DT` namespaced events (these are internal events, the
+ // lowercase, `dt` events are user subscribed and they are responsible
+ // for removing them
+ jqWrapper.unbind('.DT').find(':not(tbody *)').unbind('.DT');
+ $(window).unbind('.DT-'+settings.sInstance);
+
+ // When scrolling we had to break the table up - restore it
+ if ( table != thead.parentNode ) {
+ jqTable.children('thead').detach();
+ jqTable.append( thead );
+ }
+
+ if ( tfoot && table != tfoot.parentNode ) {
+ jqTable.children('tfoot').detach();
+ jqTable.append( tfoot );
+ }
+
+ settings.aaSorting = [];
+ settings.aaSortingFixed = [];
+ _fnSortingClasses( settings );
+
+ $( rows ).removeClass( settings.asStripeClasses.join(' ') );
+
+ $('th, td', thead).removeClass( classes.sSortable+' '+
+ classes.sSortableAsc+' '+classes.sSortableDesc+' '+classes.sSortableNone
+ );
+
+ if ( settings.bJUI ) {
+ $('th span.'+classes.sSortIcon+ ', td span.'+classes.sSortIcon, thead).detach();
+ $('th, td', thead).each( function () {
+ var wrapper = $('div.'+classes.sSortJUIWrapper, this);
+ $(this).append( wrapper.contents() );
+ wrapper.detach();
+ } );
+ }
+
+ // Add the TR elements back into the table in their original order
+ jqTbody.children().detach();
+ jqTbody.append( rows );
+
+ // Remove the DataTables generated nodes, events and classes
+ var removedMethod = remove ? 'remove' : 'detach';
+ jqTable[ removedMethod ]();
+ jqWrapper[ removedMethod ]();
+
+ // If we need to reattach the table to the document
+ if ( ! remove && orig ) {
+ // insertBefore acts like appendChild if !arg[1]
+ orig.insertBefore( table, settings.nTableReinsertBefore );
+
+ // Restore the width of the original table - was read from the style property,
+ // so we can restore directly to that
+ jqTable
+ .css( 'width', settings.sDestroyWidth )
+ .removeClass( classes.sTable );
+
+ // If the were originally stripe classes - then we add them back here.
+ // Note this is not fool proof (for example if not all rows had stripe
+ // classes - but it's a good effort without getting carried away
+ ien = settings.asDestroyStripes.length;
+
+ if ( ien ) {
+ jqTbody.children().each( function (i) {
+ $(this).addClass( settings.asDestroyStripes[i % ien] );
+ } );
+ }
+ }
+
+ /* Remove the settings object from the settings array */
+ var idx = $.inArray( settings, DataTable.settings );
+ if ( idx !== -1 ) {
+ DataTable.settings.splice( idx, 1 );
+ }
+ } );
+ } );
+
+
+ // Add the `every()` method for rows, columns and cells in a compact form
+ $.each( [ 'column', 'row', 'cell' ], function ( i, type ) {
+ _api_register( type+'s().every()', function ( fn ) {
+ var opts = this.selector.opts;
+ var api = this;
+
+ return this.iterator( type, function ( settings, arg1, arg2, arg3, arg4 ) {
+ // Rows and columns:
+ // arg1 - index
+ // arg2 - table counter
+ // arg3 - loop counter
+ // arg4 - undefined
+ // Cells:
+ // arg1 - row index
+ // arg2 - column index
+ // arg3 - table counter
+ // arg4 - loop counter
+ fn.call(
+ api[ type ](
+ arg1,
+ type==='cell' ? arg2 : opts,
+ type==='cell' ? opts : undefined
+ ),
+ arg1, arg2, arg3, arg4
+ );
+ } );
+ } );
+ } );
+
+
+ // i18n method for extensions to be able to use the language object from the
+ // DataTable
+ _api_register( 'i18n()', function ( token, def, plural ) {
+ var ctx = this.context[0];
+ var resolved = _fnGetObjectDataFn( token )( ctx.oLanguage );
+
+ if ( resolved === undefined ) {
+ resolved = def;
+ }
+
+ if ( plural !== undefined && $.isPlainObject( resolved ) ) {
+ resolved = resolved[ plural ] !== undefined ?
+ resolved[ plural ] :
+ resolved._;
+ }
+
+ return resolved.replace( '%d', plural ); // nb: plural might be undefined,
+ } );
+
+ /**
+ * Version string for plug-ins to check compatibility. Allowed format is
+ * `a.b.c-d` where: a:int, b:int, c:int, d:string(dev|beta|alpha). `d` is used
+ * only for non-release builds. See http://semver.org/ for more information.
+ * @member
+ * @type string
+ * @default Version number
+ */
+ DataTable.version = "1.10.11";
+
+ /**
+ * Private data store, containing all of the settings objects that are
+ * created for the tables on a given page.
+ *
+ * Note that the `DataTable.settings` object is aliased to
+ * `jQuery.fn.dataTableExt` through which it may be accessed and
+ * manipulated, or `jQuery.fn.dataTable.settings`.
+ * @member
+ * @type array
+ * @default []
+ * @private
+ */
+ DataTable.settings = [];
+
+ /**
+ * Object models container, for the various models that DataTables has
+ * available to it. These models define the objects that are used to hold
+ * the active state and configuration of the table.
+ * @namespace
+ */
+ DataTable.models = {};
+
+
+
+ /**
+ * Template object for the way in which DataTables holds information about
+ * search information for the global filter and individual column filters.
+ * @namespace
+ */
+ DataTable.models.oSearch = {
+ /**
+ * Flag to indicate if the filtering should be case insensitive or not
+ * @type boolean
+ * @default true
+ */
+ "bCaseInsensitive": true,
+
+ /**
+ * Applied search term
+ * @type string
+ * @default <i>Empty string</i>
+ */
+ "sSearch": "",
+
+ /**
+ * Flag to indicate if the search term should be interpreted as a
+ * regular expression (true) or not (false) and therefore and special
+ * regex characters escaped.
+ * @type boolean
+ * @default false
+ */
+ "bRegex": false,
+
+ /**
+ * Flag to indicate if DataTables is to use its smart filtering or not.
+ * @type boolean
+ * @default true
+ */
+ "bSmart": true
+ };
+
+
+
+
+ /**
+ * Template object for the way in which DataTables holds information about
+ * each individual row. This is the object format used for the settings
+ * aoData array.
+ * @namespace
+ */
+ DataTable.models.oRow = {
+ /**
+ * TR element for the row
+ * @type node
+ * @default null
+ */
+ "nTr": null,
+
+ /**
+ * Array of TD elements for each row. This is null until the row has been
+ * created.
+ * @type array nodes
+ * @default []
+ */
+ "anCells": null,
+
+ /**
+ * Data object from the original data source for the row. This is either
+ * an array if using the traditional form of DataTables, or an object if
+ * using mData options. The exact type will depend on the passed in
+ * data from the data source, or will be an array if using DOM a data
+ * source.
+ * @type array|object
+ * @default []
+ */
+ "_aData": [],
+
+ /**
+ * Sorting data cache - this array is ostensibly the same length as the
+ * number of columns (although each index is generated only as it is
+ * needed), and holds the data that is used for sorting each column in the
+ * row. We do this cache generation at the start of the sort in order that
+ * the formatting of the sort data need be done only once for each cell
+ * per sort. This array should not be read from or written to by anything
+ * other than the master sorting methods.
+ * @type array
+ * @default null
+ * @private
+ */
+ "_aSortData": null,
+
+ /**
+ * Per cell filtering data cache. As per the sort data cache, used to
+ * increase the performance of the filtering in DataTables
+ * @type array
+ * @default null
+ * @private
+ */
+ "_aFilterData": null,
+
+ /**
+ * Filtering data cache. This is the same as the cell filtering cache, but
+ * in this case a string rather than an array. This is easily computed with
+ * a join on `_aFilterData`, but is provided as a cache so the join isn't
+ * needed on every search (memory traded for performance)
+ * @type array
+ * @default null
+ * @private
+ */
+ "_sFilterRow": null,
+
+ /**
+ * Cache of the class name that DataTables has applied to the row, so we
+ * can quickly look at this variable rather than needing to do a DOM check
+ * on className for the nTr property.
+ * @type string
+ * @default <i>Empty string</i>
+ * @private
+ */
+ "_sRowStripe": "",
+
+ /**
+ * Denote if the original data source was from the DOM, or the data source
+ * object. This is used for invalidating data, so DataTables can
+ * automatically read data from the original source, unless uninstructed
+ * otherwise.
+ * @type string
+ * @default null
+ * @private
+ */
+ "src": null,
+
+ /**
+ * Index in the aoData array. This saves an indexOf lookup when we have the
+ * object, but want to know the index
+ * @type integer
+ * @default -1
+ * @private
+ */
+ "idx": -1
+ };
+
+
+ /**
+ * Template object for the column information object in DataTables. This object
+ * is held in the settings aoColumns array and contains all the information that
+ * DataTables needs about each individual column.
+ *
+ * Note that this object is related to {@link DataTable.defaults.column}
+ * but this one is the internal data store for DataTables's cache of columns.
+ * It should NOT be manipulated outside of DataTables. Any configuration should
+ * be done through the initialisation options.
+ * @namespace
+ */
+ DataTable.models.oColumn = {
+ /**
+ * Column index. This could be worked out on-the-fly with $.inArray, but it
+ * is faster to just hold it as a variable
+ * @type integer
+ * @default null
+ */
+ "idx": null,
+
+ /**
+ * A list of the columns that sorting should occur on when this column
+ * is sorted. That this property is an array allows multi-column sorting
+ * to be defined for a column (for example first name / last name columns
+ * would benefit from this). The values are integers pointing to the
+ * columns to be sorted on (typically it will be a single integer pointing
+ * at itself, but that doesn't need to be the case).
+ * @type array
+ */
+ "aDataSort": null,
+
+ /**
+ * Define the sorting directions that are applied to the column, in sequence
+ * as the column is repeatedly sorted upon - i.e. the first value is used
+ * as the sorting direction when the column if first sorted (clicked on).
+ * Sort it again (click again) and it will move on to the next index.
+ * Repeat until loop.
+ * @type array
+ */
+ "asSorting": null,
+
+ /**
+ * Flag to indicate if the column is searchable, and thus should be included
+ * in the filtering or not.
+ * @type boolean
+ */
+ "bSearchable": null,
+
+ /**
+ * Flag to indicate if the column is sortable or not.
+ * @type boolean
+ */
+ "bSortable": null,
+
+ /**
+ * Flag to indicate if the column is currently visible in the table or not
+ * @type boolean
+ */
+ "bVisible": null,
+
+ /**
+ * Store for manual type assignment using the `column.type` option. This
+ * is held in store so we can manipulate the column's `sType` property.
+ * @type string
+ * @default null
+ * @private
+ */
+ "_sManualType": null,
+
+ /**
+ * Flag to indicate if HTML5 data attributes should be used as the data
+ * source for filtering or sorting. True is either are.
+ * @type boolean
+ * @default false
+ * @private
+ */
+ "_bAttrSrc": false,
+
+ /**
+ * Developer definable function that is called whenever a cell is created (Ajax source,
+ * etc) or processed for input (DOM source). This can be used as a compliment to mRender
+ * allowing you to modify the DOM element (add background colour for example) when the
+ * element is available.
+ * @type function
+ * @param {element} nTd The TD node that has been created
+ * @param {*} sData The Data for the cell
+ * @param {array|object} oData The data for the whole row
+ * @param {int} iRow The row index for the aoData data store
+ * @default null
+ */
+ "fnCreatedCell": null,
+
+ /**
+ * Function to get data from a cell in a column. You should <b>never</b>
+ * access data directly through _aData internally in DataTables - always use
+ * the method attached to this property. It allows mData to function as
+ * required. This function is automatically assigned by the column
+ * initialisation method
+ * @type function
+ * @param {array|object} oData The data array/object for the array
+ * (i.e. aoData[]._aData)
+ * @param {string} sSpecific The specific data type you want to get -
+ * 'display', 'type' 'filter' 'sort'
+ * @returns {*} The data for the cell from the given row's data
+ * @default null
+ */
+ "fnGetData": null,
+
+ /**
+ * Function to set data for a cell in the column. You should <b>never</b>
+ * set the data directly to _aData internally in DataTables - always use
+ * this method. It allows mData to function as required. This function
+ * is automatically assigned by the column initialisation method
+ * @type function
+ * @param {array|object} oData The data array/object for the array
+ * (i.e. aoData[]._aData)
+ * @param {*} sValue Value to set
+ * @default null
+ */
+ "fnSetData": null,
+
+ /**
+ * Property to read the value for the cells in the column from the data
+ * source array / object. If null, then the default content is used, if a
+ * function is given then the return from the function is used.
+ * @type function|int|string|null
+ * @default null
+ */
+ "mData": null,
+
+ /**
+ * Partner property to mData which is used (only when defined) to get
+ * the data - i.e. it is basically the same as mData, but without the
+ * 'set' option, and also the data fed to it is the result from mData.
+ * This is the rendering method to match the data method of mData.
+ * @type function|int|string|null
+ * @default null
+ */
+ "mRender": null,
+
+ /**
+ * Unique header TH/TD element for this column - this is what the sorting
+ * listener is attached to (if sorting is enabled.)
+ * @type node
+ * @default null
+ */
+ "nTh": null,
+
+ /**
+ * Unique footer TH/TD element for this column (if there is one). Not used
+ * in DataTables as such, but can be used for plug-ins to reference the
+ * footer for each column.
+ * @type node
+ * @default null
+ */
+ "nTf": null,
+
+ /**
+ * The class to apply to all TD elements in the table's TBODY for the column
+ * @type string
+ * @default null
+ */
+ "sClass": null,
+
+ /**
+ * When DataTables calculates the column widths to assign to each column,
+ * it finds the longest string in each column and then constructs a
+ * temporary table and reads the widths from that. The problem with this
+ * is that "mmm" is much wider then "iiii", but the latter is a longer
+ * string - thus the calculation can go wrong (doing it properly and putting
+ * it into an DOM object and measuring that is horribly(!) slow). Thus as
+ * a "work around" we provide this option. It will append its value to the
+ * text that is found to be the longest string for the column - i.e. padding.
+ * @type string
+ */
+ "sContentPadding": null,
+
+ /**
+ * Allows a default value to be given for a column's data, and will be used
+ * whenever a null data source is encountered (this can be because mData
+ * is set to null, or because the data source itself is null).
+ * @type string
+ * @default null
+ */
+ "sDefaultContent": null,
+
+ /**
+ * Name for the column, allowing reference to the column by name as well as
+ * by index (needs a lookup to work by name).
+ * @type string
+ */
+ "sName": null,
+
+ /**
+ * Custom sorting data type - defines which of the available plug-ins in
+ * afnSortData the custom sorting will use - if any is defined.
+ * @type string
+ * @default std
+ */
+ "sSortDataType": 'std',
+
+ /**
+ * Class to be applied to the header element when sorting on this column
+ * @type string
+ * @default null
+ */
+ "sSortingClass": null,
+
+ /**
+ * Class to be applied to the header element when sorting on this column -
+ * when jQuery UI theming is used.
+ * @type string
+ * @default null
+ */
+ "sSortingClassJUI": null,
+
+ /**
+ * Title of the column - what is seen in the TH element (nTh).
+ * @type string
+ */
+ "sTitle": null,
+
+ /**
+ * Column sorting and filtering type
+ * @type string
+ * @default null
+ */
+ "sType": null,
+
+ /**
+ * Width of the column
+ * @type string
+ * @default null
+ */
+ "sWidth": null,
+
+ /**
+ * Width of the column when it was first "encountered"
+ * @type string
+ * @default null
+ */
+ "sWidthOrig": null
+ };
+
+
+ /*
+ * Developer note: The properties of the object below are given in Hungarian
+ * notation, that was used as the interface for DataTables prior to v1.10, however
+ * from v1.10 onwards the primary interface is camel case. In order to avoid
+ * breaking backwards compatibility utterly with this change, the Hungarian
+ * version is still, internally the primary interface, but is is not documented
+ * - hence the @name tags in each doc comment. This allows a Javascript function
+ * to create a map from Hungarian notation to camel case (going the other direction
+ * would require each property to be listed, which would at around 3K to the size
+ * of DataTables, while this method is about a 0.5K hit.
+ *
+ * Ultimately this does pave the way for Hungarian notation to be dropped
+ * completely, but that is a massive amount of work and will break current
+ * installs (therefore is on-hold until v2).
+ */
+
+ /**
+ * Initialisation options that can be given to DataTables at initialisation
+ * time.
+ * @namespace
+ */
+ DataTable.defaults = {
+ /**
+ * An array of data to use for the table, passed in at initialisation which
+ * will be used in preference to any data which is already in the DOM. This is
+ * particularly useful for constructing tables purely in Javascript, for
+ * example with a custom Ajax call.
+ * @type array
+ * @default null
+ *
+ * @dtopt Option
+ * @name DataTable.defaults.data
+ *
+ * @example
+ * // Using a 2D array data source
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "data": [
+ * ['Trident', 'Internet Explorer 4.0', 'Win 95+', 4, 'X'],
+ * ['Trident', 'Internet Explorer 5.0', 'Win 95+', 5, 'C'],
+ * ],
+ * "columns": [
+ * { "title": "Engine" },
+ * { "title": "Browser" },
+ * { "title": "Platform" },
+ * { "title": "Version" },
+ * { "title": "Grade" }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using an array of objects as a data source (`data`)
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "data": [
+ * {
+ * "engine": "Trident",
+ * "browser": "Internet Explorer 4.0",
+ * "platform": "Win 95+",
+ * "version": 4,
+ * "grade": "X"
+ * },
+ * {
+ * "engine": "Trident",
+ * "browser": "Internet Explorer 5.0",
+ * "platform": "Win 95+",
+ * "version": 5,
+ * "grade": "C"
+ * }
+ * ],
+ * "columns": [
+ * { "title": "Engine", "data": "engine" },
+ * { "title": "Browser", "data": "browser" },
+ * { "title": "Platform", "data": "platform" },
+ * { "title": "Version", "data": "version" },
+ * { "title": "Grade", "data": "grade" }
+ * ]
+ * } );
+ * } );
+ */
+ "aaData": null,
+
+
+ /**
+ * If ordering is enabled, then DataTables will perform a first pass sort on
+ * initialisation. You can define which column(s) the sort is performed
+ * upon, and the sorting direction, with this variable. The `sorting` array
+ * should contain an array for each column to be sorted initially containing
+ * the column's index and a direction string ('asc' or 'desc').
+ * @type array
+ * @default [[0,'asc']]
+ *
+ * @dtopt Option
+ * @name DataTable.defaults.order
+ *
+ * @example
+ * // Sort by 3rd column first, and then 4th column
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "order": [[2,'asc'], [3,'desc']]
+ * } );
+ * } );
+ *
+ * // No initial sorting
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "order": []
+ * } );
+ * } );
+ */
+ "aaSorting": [[0,'asc']],
+
+
+ /**
+ * This parameter is basically identical to the `sorting` parameter, but
+ * cannot be overridden by user interaction with the table. What this means
+ * is that you could have a column (visible or hidden) which the sorting
+ * will always be forced on first - any sorting after that (from the user)
+ * will then be performed as required. This can be useful for grouping rows
+ * together.
+ * @type array
+ * @default null
+ *
+ * @dtopt Option
+ * @name DataTable.defaults.orderFixed
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "orderFixed": [[0,'asc']]
+ * } );
+ * } )
+ */
+ "aaSortingFixed": [],
+
+
+ /**
+ * DataTables can be instructed to load data to display in the table from a
+ * Ajax source. This option defines how that Ajax call is made and where to.
+ *
+ * The `ajax` property has three different modes of operation, depending on
+ * how it is defined. These are:
+ *
+ * * `string` - Set the URL from where the data should be loaded from.
+ * * `object` - Define properties for `jQuery.ajax`.
+ * * `function` - Custom data get function
+ *
+ * `string`
+ * --------
+ *
+ * As a string, the `ajax` property simply defines the URL from which
+ * DataTables will load data.
+ *
+ * `object`
+ * --------
+ *
+ * As an object, the parameters in the object are passed to
+ * [jQuery.ajax](http://api.jquery.com/jQuery.ajax/) allowing fine control
+ * of the Ajax request. DataTables has a number of default parameters which
+ * you can override using this option. Please refer to the jQuery
+ * documentation for a full description of the options available, although
+ * the following parameters provide additional options in DataTables or
+ * require special consideration:
+ *
+ * * `data` - As with jQuery, `data` can be provided as an object, but it
+ * can also be used as a function to manipulate the data DataTables sends
+ * to the server. The function takes a single parameter, an object of
+ * parameters with the values that DataTables has readied for sending. An
+ * object may be returned which will be merged into the DataTables
+ * defaults, or you can add the items to the object that was passed in and
+ * not return anything from the function. This supersedes `fnServerParams`
+ * from DataTables 1.9-.
+ *
+ * * `dataSrc` - By default DataTables will look for the property `data` (or
+ * `aaData` for compatibility with DataTables 1.9-) when obtaining data
+ * from an Ajax source or for server-side processing - this parameter
+ * allows that property to be changed. You can use Javascript dotted
+ * object notation to get a data source for multiple levels of nesting, or
+ * it my be used as a function. As a function it takes a single parameter,
+ * the JSON returned from the server, which can be manipulated as
+ * required, with the returned value being that used by DataTables as the
+ * data source for the table. This supersedes `sAjaxDataProp` from
+ * DataTables 1.9-.
+ *
+ * * `success` - Should not be overridden it is used internally in
+ * DataTables. To manipulate / transform the data returned by the server
+ * use `ajax.dataSrc`, or use `ajax` as a function (see below).
+ *
+ * `function`
+ * ----------
+ *
+ * As a function, making the Ajax call is left up to yourself allowing
+ * complete control of the Ajax request. Indeed, if desired, a method other
+ * than Ajax could be used to obtain the required data, such as Web storage
+ * or an AIR database.
+ *
+ * The function is given four parameters and no return is required. The
+ * parameters are:
+ *
+ * 1. _object_ - Data to send to the server
+ * 2. _function_ - Callback function that must be executed when the required
+ * data has been obtained. That data should be passed into the callback
+ * as the only parameter
+ * 3. _object_ - DataTables settings object for the table
+ *
+ * Note that this supersedes `fnServerData` from DataTables 1.9-.
+ *
+ * @type string|object|function
+ * @default null
+ *
+ * @dtopt Option
+ * @name DataTable.defaults.ajax
+ * @since 1.10.0
+ *
+ * @example
+ * // Get JSON data from a file via Ajax.
+ * // Note DataTables expects data in the form `{ data: [ ...data... ] }` by default).
+ * $('#example').dataTable( {
+ * "ajax": "data.json"
+ * } );
+ *
+ * @example
+ * // Get JSON data from a file via Ajax, using `dataSrc` to change
+ * // `data` to `tableData` (i.e. `{ tableData: [ ...data... ] }`)
+ * $('#example').dataTable( {
+ * "ajax": {
+ * "url": "data.json",
+ * "dataSrc": "tableData"
+ * }
+ * } );
+ *
+ * @example
+ * // Get JSON data from a file via Ajax, using `dataSrc` to read data
+ * // from a plain array rather than an array in an object
+ * $('#example').dataTable( {
+ * "ajax": {
+ * "url": "data.json",
+ * "dataSrc": ""
+ * }
+ * } );
+ *
+ * @example
+ * // Manipulate the data returned from the server - add a link to data
+ * // (note this can, should, be done using `render` for the column - this
+ * // is just a simple example of how the data can be manipulated).
+ * $('#example').dataTable( {
+ * "ajax": {
+ * "url": "data.json",
+ * "dataSrc": function ( json ) {
+ * for ( var i=0, ien=json.length ; i<ien ; i++ ) {
+ * json[i][0] = '<a href="/message/'+json[i][0]+'>View message</a>';
+ * }
+ * return json;
+ * }
+ * }
+ * } );
+ *
+ * @example
+ * // Add data to the request
+ * $('#example').dataTable( {
+ * "ajax": {
+ * "url": "data.json",
+ * "data": function ( d ) {
+ * return {
+ * "extra_search": $('#extra').val()
+ * };
+ * }
+ * }
+ * } );
+ *
+ * @example
+ * // Send request as POST
+ * $('#example').dataTable( {
+ * "ajax": {
+ * "url": "data.json",
+ * "type": "POST"
+ * }
+ * } );
+ *
+ * @example
+ * // Get the data from localStorage (could interface with a form for
+ * // adding, editing and removing rows).
+ * $('#example').dataTable( {
+ * "ajax": function (data, callback, settings) {
+ * callback(
+ * JSON.parse( localStorage.getItem('dataTablesData') )
+ * );
+ * }
+ * } );
+ */
+ "ajax": null,
+
+
+ /**
+ * This parameter allows you to readily specify the entries in the length drop
+ * down menu that DataTables shows when pagination is enabled. It can be
+ * either a 1D array of options which will be used for both the displayed
+ * option and the value, or a 2D array which will use the array in the first
+ * position as the value, and the array in the second position as the
+ * displayed options (useful for language strings such as 'All').
+ *
+ * Note that the `pageLength` property will be automatically set to the
+ * first value given in this array, unless `pageLength` is also provided.
+ * @type array
+ * @default [ 10, 25, 50, 100 ]
+ *
+ * @dtopt Option
+ * @name DataTable.defaults.lengthMenu
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
+ * } );
+ * } );
+ */
+ "aLengthMenu": [ 10, 25, 50, 100 ],
+
+
+ /**
+ * The `columns` option in the initialisation parameter allows you to define
+ * details about the way individual columns behave. For a full list of
+ * column options that can be set, please see
+ * {@link DataTable.defaults.column}. Note that if you use `columns` to
+ * define your columns, you must have an entry in the array for every single
+ * column that you have in your table (these can be null if you don't which
+ * to specify any options).
+ * @member
+ *
+ * @name DataTable.defaults.column
+ */
+ "aoColumns": null,
+
+ /**
+ * Very similar to `columns`, `columnDefs` allows you to target a specific
+ * column, multiple columns, or all columns, using the `targets` property of
+ * each object in the array. This allows great flexibility when creating
+ * tables, as the `columnDefs` arrays can be of any length, targeting the
+ * columns you specifically want. `columnDefs` may use any of the column
+ * options available: {@link DataTable.defaults.column}, but it _must_
+ * have `targets` defined in each object in the array. Values in the `targets`
+ * array may be:
+ * <ul>
+ * <li>a string - class name will be matched on the TH for the column</li>
+ * <li>0 or a positive integer - column index counting from the left</li>
+ * <li>a negative integer - column index counting from the right</li>
+ * <li>the string "_all" - all columns (i.e. assign a default)</li>
+ * </ul>
+ * @member
+ *
+ * @name DataTable.defaults.columnDefs
+ */
+ "aoColumnDefs": null,
+
+
+ /**
+ * Basically the same as `search`, this parameter defines the individual column
+ * filtering state at initialisation time. The array must be of the same size
+ * as the number of columns, and each element be an object with the parameters
+ * `search` and `escapeRegex` (the latter is optional). 'null' is also
+ * accepted and the default will be used.
+ * @type array
+ * @default []
+ *
+ * @dtopt Option
+ * @name DataTable.defaults.searchCols
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "searchCols": [
+ * null,
+ * { "search": "My filter" },
+ * null,
+ * { "search": "^[0-9]", "escapeRegex": false }
+ * ]
+ * } );
+ * } )
+ */
+ "aoSearchCols": [],
+
+
+ /**
+ * An array of CSS classes that should be applied to displayed rows. This
+ * array may be of any length, and DataTables will apply each class
+ * sequentially, looping when required.
+ * @type array
+ * @default null <i>Will take the values determined by the `oClasses.stripe*`
+ * options</i>
+ *
+ * @dtopt Option
+ * @name DataTable.defaults.stripeClasses
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "stripeClasses": [ 'strip1', 'strip2', 'strip3' ]
+ * } );
+ * } )
+ */
+ "asStripeClasses": null,
+
+
+ /**
+ * Enable or disable automatic column width calculation. This can be disabled
+ * as an optimisation (it takes some time to calculate the widths) if the
+ * tables widths are passed in using `columns`.
+ * @type boolean
+ * @default true
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.autoWidth
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "autoWidth": false
+ * } );
+ * } );
+ */
+ "bAutoWidth": true,
+
+
+ /**
+ * Deferred rendering can provide DataTables with a huge speed boost when you
+ * are using an Ajax or JS data source for the table. This option, when set to
+ * true, will cause DataTables to defer the creation of the table elements for
+ * each row until they are needed for a draw - saving a significant amount of
+ * time.
+ * @type boolean
+ * @default false
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.deferRender
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "ajax": "sources/arrays.txt",
+ * "deferRender": true
+ * } );
+ * } );
+ */
+ "bDeferRender": false,
+
+
+ /**
+ * Replace a DataTable which matches the given selector and replace it with
+ * one which has the properties of the new initialisation object passed. If no
+ * table matches the selector, then the new DataTable will be constructed as
+ * per normal.
+ * @type boolean
+ * @default false
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.destroy
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "srollY": "200px",
+ * "paginate": false
+ * } );
+ *
+ * // Some time later....
+ * $('#example').dataTable( {
+ * "filter": false,
+ * "destroy": true
+ * } );
+ * } );
+ */
+ "bDestroy": false,
+
+
+ /**
+ * Enable or disable filtering of data. Filtering in DataTables is "smart" in
+ * that it allows the end user to input multiple words (space separated) and
+ * will match a row containing those words, even if not in the order that was
+ * specified (this allow matching across multiple columns). Note that if you
+ * wish to use filtering in DataTables this must remain 'true' - to remove the
+ * default filtering input box and retain filtering abilities, please use
+ * {@link DataTable.defaults.dom}.
+ * @type boolean
+ * @default true
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.searching
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "searching": false
+ * } );
+ * } );
+ */
+ "bFilter": true,
+
+
+ /**
+ * Enable or disable the table information display. This shows information
+ * about the data that is currently visible on the page, including information
+ * about filtered data if that action is being performed.
+ * @type boolean
+ * @default true
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.info
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "info": false
+ * } );
+ * } );
+ */
+ "bInfo": true,
+
+
+ /**
+ * Enable jQuery UI ThemeRoller support (required as ThemeRoller requires some
+ * slightly different and additional mark-up from what DataTables has
+ * traditionally used).
+ * @type boolean
+ * @default false
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.jQueryUI
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "jQueryUI": true
+ * } );
+ * } );
+ */
+ "bJQueryUI": false,
+
+
+ /**
+ * Allows the end user to select the size of a formatted page from a select
+ * menu (sizes are 10, 25, 50 and 100). Requires pagination (`paginate`).
+ * @type boolean
+ * @default true
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.lengthChange
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "lengthChange": false
+ * } );
+ * } );
+ */
+ "bLengthChange": true,
+
+
+ /**
+ * Enable or disable pagination.
+ * @type boolean
+ * @default true
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.paging
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "paging": false
+ * } );
+ * } );
+ */
+ "bPaginate": true,
+
+
+ /**
+ * Enable or disable the display of a 'processing' indicator when the table is
+ * being processed (e.g. a sort). This is particularly useful for tables with
+ * large amounts of data where it can take a noticeable amount of time to sort
+ * the entries.
+ * @type boolean
+ * @default false
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.processing
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "processing": true
+ * } );
+ * } );
+ */
+ "bProcessing": false,
+
+
+ /**
+ * Retrieve the DataTables object for the given selector. Note that if the
+ * table has already been initialised, this parameter will cause DataTables
+ * to simply return the object that has already been set up - it will not take
+ * account of any changes you might have made to the initialisation object
+ * passed to DataTables (setting this parameter to true is an acknowledgement
+ * that you understand this). `destroy` can be used to reinitialise a table if
+ * you need.
+ * @type boolean
+ * @default false
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.retrieve
+ *
+ * @example
+ * $(document).ready( function() {
+ * initTable();
+ * tableActions();
+ * } );
+ *
+ * function initTable ()
+ * {
+ * return $('#example').dataTable( {
+ * "scrollY": "200px",
+ * "paginate": false,
+ * "retrieve": true
+ * } );
+ * }
+ *
+ * function tableActions ()
+ * {
+ * var table = initTable();
+ * // perform API operations with oTable
+ * }
+ */
+ "bRetrieve": false,
+
+
+ /**
+ * When vertical (y) scrolling is enabled, DataTables will force the height of
+ * the table's viewport to the given height at all times (useful for layout).
+ * However, this can look odd when filtering data down to a small data set,
+ * and the footer is left "floating" further down. This parameter (when
+ * enabled) will cause DataTables to collapse the table's viewport down when
+ * the result set will fit within the given Y height.
+ * @type boolean
+ * @default false
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.scrollCollapse
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "scrollY": "200",
+ * "scrollCollapse": true
+ * } );
+ * } );
+ */
+ "bScrollCollapse": false,
+
+
+ /**
+ * Configure DataTables to use server-side processing. Note that the
+ * `ajax` parameter must also be given in order to give DataTables a
+ * source to obtain the required data for each draw.
+ * @type boolean
+ * @default false
+ *
+ * @dtopt Features
+ * @dtopt Server-side
+ * @name DataTable.defaults.serverSide
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "serverSide": true,
+ * "ajax": "xhr.php"
+ * } );
+ * } );
+ */
+ "bServerSide": false,
+
+
+ /**
+ * Enable or disable sorting of columns. Sorting of individual columns can be
+ * disabled by the `sortable` option for each column.
+ * @type boolean
+ * @default true
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.ordering
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "ordering": false
+ * } );
+ * } );
+ */
+ "bSort": true,
+
+
+ /**
+ * Enable or display DataTables' ability to sort multiple columns at the
+ * same time (activated by shift-click by the user).
+ * @type boolean
+ * @default true
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.orderMulti
+ *
+ * @example
+ * // Disable multiple column sorting ability
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "orderMulti": false
+ * } );
+ * } );
+ */
+ "bSortMulti": true,
+
+
+ /**
+ * Allows control over whether DataTables should use the top (true) unique
+ * cell that is found for a single column, or the bottom (false - default).
+ * This is useful when using complex headers.
+ * @type boolean
+ * @default false
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.orderCellsTop
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "orderCellsTop": true
+ * } );
+ * } );
+ */
+ "bSortCellsTop": false,
+
+
+ /**
+ * Enable or disable the addition of the classes `sorting\_1`, `sorting\_2` and
+ * `sorting\_3` to the columns which are currently being sorted on. This is
+ * presented as a feature switch as it can increase processing time (while
+ * classes are removed and added) so for large data sets you might want to
+ * turn this off.
+ * @type boolean
+ * @default true
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.orderClasses
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "orderClasses": false
+ * } );
+ * } );
+ */
+ "bSortClasses": true,
+
+
+ /**
+ * Enable or disable state saving. When enabled HTML5 `localStorage` will be
+ * used to save table display information such as pagination information,
+ * display length, filtering and sorting. As such when the end user reloads
+ * the page the display display will match what thy had previously set up.
+ *
+ * Due to the use of `localStorage` the default state saving is not supported
+ * in IE6 or 7. If state saving is required in those browsers, use
+ * `stateSaveCallback` to provide a storage solution such as cookies.
+ * @type boolean
+ * @default false
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.stateSave
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "stateSave": true
+ * } );
+ * } );
+ */
+ "bStateSave": false,
+
+
+ /**
+ * This function is called when a TR element is created (and all TD child
+ * elements have been inserted), or registered if using a DOM source, allowing
+ * manipulation of the TR element (adding classes etc).
+ * @type function
+ * @param {node} row "TR" element for the current row
+ * @param {array} data Raw data array for this row
+ * @param {int} dataIndex The index of this row in the internal aoData array
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.createdRow
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "createdRow": function( row, data, dataIndex ) {
+ * // Bold the grade for all 'A' grade browsers
+ * if ( data[4] == "A" )
+ * {
+ * $('td:eq(4)', row).html( '<b>A</b>' );
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "fnCreatedRow": null,
+
+
+ /**
+ * This function is called on every 'draw' event, and allows you to
+ * dynamically modify any aspect you want about the created DOM.
+ * @type function
+ * @param {object} settings DataTables settings object
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.drawCallback
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "drawCallback": function( settings ) {
+ * alert( 'DataTables has redrawn the table' );
+ * }
+ * } );
+ * } );
+ */
+ "fnDrawCallback": null,
+
+
+ /**
+ * Identical to fnHeaderCallback() but for the table footer this function
+ * allows you to modify the table footer on every 'draw' event.
+ * @type function
+ * @param {node} foot "TR" element for the footer
+ * @param {array} data Full table data (as derived from the original HTML)
+ * @param {int} start Index for the current display starting point in the
+ * display array
+ * @param {int} end Index for the current display ending point in the
+ * display array
+ * @param {array int} display Index array to translate the visual position
+ * to the full data array
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.footerCallback
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "footerCallback": function( tfoot, data, start, end, display ) {
+ * tfoot.getElementsByTagName('th')[0].innerHTML = "Starting index is "+start;
+ * }
+ * } );
+ * } )
+ */
+ "fnFooterCallback": null,
+
+
+ /**
+ * When rendering large numbers in the information element for the table
+ * (i.e. "Showing 1 to 10 of 57 entries") DataTables will render large numbers
+ * to have a comma separator for the 'thousands' units (e.g. 1 million is
+ * rendered as "1,000,000") to help readability for the end user. This
+ * function will override the default method DataTables uses.
+ * @type function
+ * @member
+ * @param {int} toFormat number to be formatted
+ * @returns {string} formatted string for DataTables to show the number
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.formatNumber
+ *
+ * @example
+ * // Format a number using a single quote for the separator (note that
+ * // this can also be done with the language.thousands option)
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "formatNumber": function ( toFormat ) {
+ * return toFormat.toString().replace(
+ * /\B(?=(\d{3})+(?!\d))/g, "'"
+ * );
+ * };
+ * } );
+ * } );
+ */
+ "fnFormatNumber": function ( toFormat ) {
+ return toFormat.toString().replace(
+ /\B(?=(\d{3})+(?!\d))/g,
+ this.oLanguage.sThousands
+ );
+ },
+
+
+ /**
+ * This function is called on every 'draw' event, and allows you to
+ * dynamically modify the header row. This can be used to calculate and
+ * display useful information about the table.
+ * @type function
+ * @param {node} head "TR" element for the header
+ * @param {array} data Full table data (as derived from the original HTML)
+ * @param {int} start Index for the current display starting point in the
+ * display array
+ * @param {int} end Index for the current display ending point in the
+ * display array
+ * @param {array int} display Index array to translate the visual position
+ * to the full data array
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.headerCallback
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "fheaderCallback": function( head, data, start, end, display ) {
+ * head.getElementsByTagName('th')[0].innerHTML = "Displaying "+(end-start)+" records";
+ * }
+ * } );
+ * } )
+ */
+ "fnHeaderCallback": null,
+
+
+ /**
+ * The information element can be used to convey information about the current
+ * state of the table. Although the internationalisation options presented by
+ * DataTables are quite capable of dealing with most customisations, there may
+ * be times where you wish to customise the string further. This callback
+ * allows you to do exactly that.
+ * @type function
+ * @param {object} oSettings DataTables settings object
+ * @param {int} start Starting position in data for the draw
+ * @param {int} end End position in data for the draw
+ * @param {int} max Total number of rows in the table (regardless of
+ * filtering)
+ * @param {int} total Total number of rows in the data set, after filtering
+ * @param {string} pre The string that DataTables has formatted using it's
+ * own rules
+ * @returns {string} The string to be displayed in the information element.
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.infoCallback
+ *
+ * @example
+ * $('#example').dataTable( {
+ * "infoCallback": function( settings, start, end, max, total, pre ) {
+ * return start +" to "+ end;
+ * }
+ * } );
+ */
+ "fnInfoCallback": null,
+
+
+ /**
+ * Called when the table has been initialised. Normally DataTables will
+ * initialise sequentially and there will be no need for this function,
+ * however, this does not hold true when using external language information
+ * since that is obtained using an async XHR call.
+ * @type function
+ * @param {object} settings DataTables settings object
+ * @param {object} json The JSON object request from the server - only
+ * present if client-side Ajax sourced data is used
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.initComplete
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "initComplete": function(settings, json) {
+ * alert( 'DataTables has finished its initialisation.' );
+ * }
+ * } );
+ * } )
+ */
+ "fnInitComplete": null,
+
+
+ /**
+ * Called at the very start of each table draw and can be used to cancel the
+ * draw by returning false, any other return (including undefined) results in
+ * the full draw occurring).
+ * @type function
+ * @param {object} settings DataTables settings object
+ * @returns {boolean} False will cancel the draw, anything else (including no
+ * return) will allow it to complete.
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.preDrawCallback
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "preDrawCallback": function( settings ) {
+ * if ( $('#test').val() == 1 ) {
+ * return false;
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "fnPreDrawCallback": null,
+
+
+ /**
+ * This function allows you to 'post process' each row after it have been
+ * generated for each table draw, but before it is rendered on screen. This
+ * function might be used for setting the row class name etc.
+ * @type function
+ * @param {node} row "TR" element for the current row
+ * @param {array} data Raw data array for this row
+ * @param {int} displayIndex The display index for the current table draw
+ * @param {int} displayIndexFull The index of the data in the full list of
+ * rows (after filtering)
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.rowCallback
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "rowCallback": function( row, data, displayIndex, displayIndexFull ) {
+ * // Bold the grade for all 'A' grade browsers
+ * if ( data[4] == "A" ) {
+ * $('td:eq(4)', row).html( '<b>A</b>' );
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "fnRowCallback": null,
+
+
+ /**
+ * __Deprecated__ The functionality provided by this parameter has now been
+ * superseded by that provided through `ajax`, which should be used instead.
+ *
+ * This parameter allows you to override the default function which obtains
+ * the data from the server so something more suitable for your application.
+ * For example you could use POST data, or pull information from a Gears or
+ * AIR database.
+ * @type function
+ * @member
+ * @param {string} source HTTP source to obtain the data from (`ajax`)
+ * @param {array} data A key/value pair object containing the data to send
+ * to the server
+ * @param {function} callback to be called on completion of the data get
+ * process that will draw the data on the page.
+ * @param {object} settings DataTables settings object
+ *
+ * @dtopt Callbacks
+ * @dtopt Server-side
+ * @name DataTable.defaults.serverData
+ *
+ * @deprecated 1.10. Please use `ajax` for this functionality now.
+ */
+ "fnServerData": null,
+
+
+ /**
+ * __Deprecated__ The functionality provided by this parameter has now been
+ * superseded by that provided through `ajax`, which should be used instead.
+ *
+ * It is often useful to send extra data to the server when making an Ajax
+ * request - for example custom filtering information, and this callback
+ * function makes it trivial to send extra information to the server. The
+ * passed in parameter is the data set that has been constructed by
+ * DataTables, and you can add to this or modify it as you require.
+ * @type function
+ * @param {array} data Data array (array of objects which are name/value
+ * pairs) that has been constructed by DataTables and will be sent to the
+ * server. In the case of Ajax sourced data with server-side processing
+ * this will be an empty array, for server-side processing there will be a
+ * significant number of parameters!
+ * @returns {undefined} Ensure that you modify the data array passed in,
+ * as this is passed by reference.
+ *
+ * @dtopt Callbacks
+ * @dtopt Server-side
+ * @name DataTable.defaults.serverParams
+ *
+ * @deprecated 1.10. Please use `ajax` for this functionality now.
+ */
+ "fnServerParams": null,
+
+
+ /**
+ * Load the table state. With this function you can define from where, and how, the
+ * state of a table is loaded. By default DataTables will load from `localStorage`
+ * but you might wish to use a server-side database or cookies.
+ * @type function
+ * @member
+ * @param {object} settings DataTables settings object
+ * @return {object} The DataTables state object to be loaded
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.stateLoadCallback
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "stateSave": true,
+ * "stateLoadCallback": function (settings) {
+ * var o;
+ *
+ * // Send an Ajax request to the server to get the data. Note that
+ * // this is a synchronous request.
+ * $.ajax( {
+ * "url": "/state_load",
+ * "async": false,
+ * "dataType": "json",
+ * "success": function (json) {
+ * o = json;
+ * }
+ * } );
+ *
+ * return o;
+ * }
+ * } );
+ * } );
+ */
+ "fnStateLoadCallback": function ( settings ) {
+ try {
+ return JSON.parse(
+ (settings.iStateDuration === -1 ? sessionStorage : localStorage).getItem(
+ 'DataTables_'+settings.sInstance+'_'+location.pathname
+ )
+ );
+ } catch (e) {}
+ },
+
+
+ /**
+ * Callback which allows modification of the saved state prior to loading that state.
+ * This callback is called when the table is loading state from the stored data, but
+ * prior to the settings object being modified by the saved state. Note that for
+ * plug-in authors, you should use the `stateLoadParams` event to load parameters for
+ * a plug-in.
+ * @type function
+ * @param {object} settings DataTables settings object
+ * @param {object} data The state object that is to be loaded
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.stateLoadParams
+ *
+ * @example
+ * // Remove a saved filter, so filtering is never loaded
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "stateSave": true,
+ * "stateLoadParams": function (settings, data) {
+ * data.oSearch.sSearch = "";
+ * }
+ * } );
+ * } );
+ *
+ * @example
+ * // Disallow state loading by returning false
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "stateSave": true,
+ * "stateLoadParams": function (settings, data) {
+ * return false;
+ * }
+ * } );
+ * } );
+ */
+ "fnStateLoadParams": null,
+
+
+ /**
+ * Callback that is called when the state has been loaded from the state saving method
+ * and the DataTables settings object has been modified as a result of the loaded state.
+ * @type function
+ * @param {object} settings DataTables settings object
+ * @param {object} data The state object that was loaded
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.stateLoaded
+ *
+ * @example
+ * // Show an alert with the filtering value that was saved
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "stateSave": true,
+ * "stateLoaded": function (settings, data) {
+ * alert( 'Saved filter was: '+data.oSearch.sSearch );
+ * }
+ * } );
+ * } );
+ */
+ "fnStateLoaded": null,
+
+
+ /**
+ * Save the table state. This function allows you to define where and how the state
+ * information for the table is stored By default DataTables will use `localStorage`
+ * but you might wish to use a server-side database or cookies.
+ * @type function
+ * @member
+ * @param {object} settings DataTables settings object
+ * @param {object} data The state object to be saved
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.stateSaveCallback
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "stateSave": true,
+ * "stateSaveCallback": function (settings, data) {
+ * // Send an Ajax request to the server with the state object
+ * $.ajax( {
+ * "url": "/state_save",
+ * "data": data,
+ * "dataType": "json",
+ * "method": "POST"
+ * "success": function () {}
+ * } );
+ * }
+ * } );
+ * } );
+ */
+ "fnStateSaveCallback": function ( settings, data ) {
+ try {
+ (settings.iStateDuration === -1 ? sessionStorage : localStorage).setItem(
+ 'DataTables_'+settings.sInstance+'_'+location.pathname,
+ JSON.stringify( data )
+ );
+ } catch (e) {}
+ },
+
+
+ /**
+ * Callback which allows modification of the state to be saved. Called when the table
+ * has changed state a new state save is required. This method allows modification of
+ * the state saving object prior to actually doing the save, including addition or
+ * other state properties or modification. Note that for plug-in authors, you should
+ * use the `stateSaveParams` event to save parameters for a plug-in.
+ * @type function
+ * @param {object} settings DataTables settings object
+ * @param {object} data The state object to be saved
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.stateSaveParams
+ *
+ * @example
+ * // Remove a saved filter, so filtering is never saved
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "stateSave": true,
+ * "stateSaveParams": function (settings, data) {
+ * data.oSearch.sSearch = "";
+ * }
+ * } );
+ * } );
+ */
+ "fnStateSaveParams": null,
+
+
+ /**
+ * Duration for which the saved state information is considered valid. After this period
+ * has elapsed the state will be returned to the default.
+ * Value is given in seconds.
+ * @type int
+ * @default 7200 <i>(2 hours)</i>
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.stateDuration
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "stateDuration": 60*60*24; // 1 day
+ * } );
+ * } )
+ */
+ "iStateDuration": 7200,
+
+
+ /**
+ * When enabled DataTables will not make a request to the server for the first
+ * page draw - rather it will use the data already on the page (no sorting etc
+ * will be applied to it), thus saving on an XHR at load time. `deferLoading`
+ * is used to indicate that deferred loading is required, but it is also used
+ * to tell DataTables how many records there are in the full table (allowing
+ * the information element and pagination to be displayed correctly). In the case
+ * where a filtering is applied to the table on initial load, this can be
+ * indicated by giving the parameter as an array, where the first element is
+ * the number of records available after filtering and the second element is the
+ * number of records without filtering (allowing the table information element
+ * to be shown correctly).
+ * @type int | array
+ * @default null
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.deferLoading
+ *
+ * @example
+ * // 57 records available in the table, no filtering applied
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "serverSide": true,
+ * "ajax": "scripts/server_processing.php",
+ * "deferLoading": 57
+ * } );
+ * } );
+ *
+ * @example
+ * // 57 records after filtering, 100 without filtering (an initial filter applied)
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "serverSide": true,
+ * "ajax": "scripts/server_processing.php",
+ * "deferLoading": [ 57, 100 ],
+ * "search": {
+ * "search": "my_filter"
+ * }
+ * } );
+ * } );
+ */
+ "iDeferLoading": null,
+
+
+ /**
+ * Number of rows to display on a single page when using pagination. If
+ * feature enabled (`lengthChange`) then the end user will be able to override
+ * this to a custom setting using a pop-up menu.
+ * @type int
+ * @default 10
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.pageLength
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "pageLength": 50
+ * } );
+ * } )
+ */
+ "iDisplayLength": 10,
+
+
+ /**
+ * Define the starting point for data display when using DataTables with
+ * pagination. Note that this parameter is the number of records, rather than
+ * the page number, so if you have 10 records per page and want to start on
+ * the third page, it should be "20".
+ * @type int
+ * @default 0
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.displayStart
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "displayStart": 20
+ * } );
+ * } )
+ */
+ "iDisplayStart": 0,
+
+
+ /**
+ * By default DataTables allows keyboard navigation of the table (sorting, paging,
+ * and filtering) by adding a `tabindex` attribute to the required elements. This
+ * allows you to tab through the controls and press the enter key to activate them.
+ * The tabindex is default 0, meaning that the tab follows the flow of the document.
+ * You can overrule this using this parameter if you wish. Use a value of -1 to
+ * disable built-in keyboard navigation.
+ * @type int
+ * @default 0
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.tabIndex
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "tabIndex": 1
+ * } );
+ * } );
+ */
+ "iTabIndex": 0,
+
+
+ /**
+ * Classes that DataTables assigns to the various components and features
+ * that it adds to the HTML table. This allows classes to be configured
+ * during initialisation in addition to through the static
+ * {@link DataTable.ext.oStdClasses} object).
+ * @namespace
+ * @name DataTable.defaults.classes
+ */
+ "oClasses": {},
+
+
+ /**
+ * All strings that DataTables uses in the user interface that it creates
+ * are defined in this object, allowing you to modified them individually or
+ * completely replace them all as required.
+ * @namespace
+ * @name DataTable.defaults.language
+ */
+ "oLanguage": {
+ /**
+ * Strings that are used for WAI-ARIA labels and controls only (these are not
+ * actually visible on the page, but will be read by screenreaders, and thus
+ * must be internationalised as well).
+ * @namespace
+ * @name DataTable.defaults.language.aria
+ */
+ "oAria": {
+ /**
+ * ARIA label that is added to the table headers when the column may be
+ * sorted ascending by activing the column (click or return when focused).
+ * Note that the column header is prefixed to this string.
+ * @type string
+ * @default : activate to sort column ascending
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.aria.sortAscending
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "aria": {
+ * "sortAscending": " - click/return to sort ascending"
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "sSortAscending": ": activate to sort column ascending",
+
+ /**
+ * ARIA label that is added to the table headers when the column may be
+ * sorted descending by activing the column (click or return when focused).
+ * Note that the column header is prefixed to this string.
+ * @type string
+ * @default : activate to sort column ascending
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.aria.sortDescending
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "aria": {
+ * "sortDescending": " - click/return to sort descending"
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "sSortDescending": ": activate to sort column descending"
+ },
+
+ /**
+ * Pagination string used by DataTables for the built-in pagination
+ * control types.
+ * @namespace
+ * @name DataTable.defaults.language.paginate
+ */
+ "oPaginate": {
+ /**
+ * Text to use when using the 'full_numbers' type of pagination for the
+ * button to take the user to the first page.
+ * @type string
+ * @default First
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.paginate.first
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "paginate": {
+ * "first": "First page"
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "sFirst": "First",
+
+
+ /**
+ * Text to use when using the 'full_numbers' type of pagination for the
+ * button to take the user to the last page.
+ * @type string
+ * @default Last
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.paginate.last
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "paginate": {
+ * "last": "Last page"
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "sLast": "Last",
+
+
+ /**
+ * Text to use for the 'next' pagination button (to take the user to the
+ * next page).
+ * @type string
+ * @default Next
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.paginate.next
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "paginate": {
+ * "next": "Next page"
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "sNext": "Next",
+
+
+ /**
+ * Text to use for the 'previous' pagination button (to take the user to
+ * the previous page).
+ * @type string
+ * @default Previous
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.paginate.previous
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "paginate": {
+ * "previous": "Previous page"
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "sPrevious": "Previous"
+ },
+
+ /**
+ * This string is shown in preference to `zeroRecords` when the table is
+ * empty of data (regardless of filtering). Note that this is an optional
+ * parameter - if it is not given, the value of `zeroRecords` will be used
+ * instead (either the default or given value).
+ * @type string
+ * @default No data available in table
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.emptyTable
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "emptyTable": "No data available in table"
+ * }
+ * } );
+ * } );
+ */
+ "sEmptyTable": "No data available in table",
+
+
+ /**
+ * This string gives information to the end user about the information
+ * that is current on display on the page. The following tokens can be
+ * used in the string and will be dynamically replaced as the table
+ * display updates. This tokens can be placed anywhere in the string, or
+ * removed as needed by the language requires:
+ *
+ * * `\_START\_` - Display index of the first record on the current page
+ * * `\_END\_` - Display index of the last record on the current page
+ * * `\_TOTAL\_` - Number of records in the table after filtering
+ * * `\_MAX\_` - Number of records in the table without filtering
+ * * `\_PAGE\_` - Current page number
+ * * `\_PAGES\_` - Total number of pages of data in the table
+ *
+ * @type string
+ * @default Showing _START_ to _END_ of _TOTAL_ entries
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.info
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "info": "Showing page _PAGE_ of _PAGES_"
+ * }
+ * } );
+ * } );
+ */
+ "sInfo": "Showing _START_ to _END_ of _TOTAL_ entries",
+
+
+ /**
+ * Display information string for when the table is empty. Typically the
+ * format of this string should match `info`.
+ * @type string
+ * @default Showing 0 to 0 of 0 entries
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.infoEmpty
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "infoEmpty": "No entries to show"
+ * }
+ * } );
+ * } );
+ */
+ "sInfoEmpty": "Showing 0 to 0 of 0 entries",
+
+
+ /**
+ * When a user filters the information in a table, this string is appended
+ * to the information (`info`) to give an idea of how strong the filtering
+ * is. The variable _MAX_ is dynamically updated.
+ * @type string
+ * @default (filtered from _MAX_ total entries)
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.infoFiltered
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "infoFiltered": " - filtering from _MAX_ records"
+ * }
+ * } );
+ * } );
+ */
+ "sInfoFiltered": "(filtered from _MAX_ total entries)",
+
+
+ /**
+ * If can be useful to append extra information to the info string at times,
+ * and this variable does exactly that. This information will be appended to
+ * the `info` (`infoEmpty` and `infoFiltered` in whatever combination they are
+ * being used) at all times.
+ * @type string
+ * @default <i>Empty string</i>
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.infoPostFix
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "infoPostFix": "All records shown are derived from real information."
+ * }
+ * } );
+ * } );
+ */
+ "sInfoPostFix": "",
+
+
+ /**
+ * This decimal place operator is a little different from the other
+ * language options since DataTables doesn't output floating point
+ * numbers, so it won't ever use this for display of a number. Rather,
+ * what this parameter does is modify the sort methods of the table so
+ * that numbers which are in a format which has a character other than
+ * a period (`.`) as a decimal place will be sorted numerically.
+ *
+ * Note that numbers with different decimal places cannot be shown in
+ * the same table and still be sortable, the table must be consistent.
+ * However, multiple different tables on the page can use different
+ * decimal place characters.
+ * @type string
+ * @default
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.decimal
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "decimal": ","
+ * "thousands": "."
+ * }
+ * } );
+ * } );
+ */
+ "sDecimal": "",
+
+
+ /**
+ * DataTables has a build in number formatter (`formatNumber`) which is
+ * used to format large numbers that are used in the table information.
+ * By default a comma is used, but this can be trivially changed to any
+ * character you wish with this parameter.
+ * @type string
+ * @default ,
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.thousands
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "thousands": "'"
+ * }
+ * } );
+ * } );
+ */
+ "sThousands": ",",
+
+
+ /**
+ * Detail the action that will be taken when the drop down menu for the
+ * pagination length option is changed. The '_MENU_' variable is replaced
+ * with a default select list of 10, 25, 50 and 100, and can be replaced
+ * with a custom select box if required.
+ * @type string
+ * @default Show _MENU_ entries
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.lengthMenu
+ *
+ * @example
+ * // Language change only
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "lengthMenu": "Display _MENU_ records"
+ * }
+ * } );
+ * } );
+ *
+ * @example
+ * // Language and options change
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "lengthMenu": 'Display <select>'+
+ * '<option value="10">10</option>'+
+ * '<option value="20">20</option>'+
+ * '<option value="30">30</option>'+
+ * '<option value="40">40</option>'+
+ * '<option value="50">50</option>'+
+ * '<option value="-1">All</option>'+
+ * '</select> records'
+ * }
+ * } );
+ * } );
+ */
+ "sLengthMenu": "Show _MENU_ entries",
+
+
+ /**
+ * When using Ajax sourced data and during the first draw when DataTables is
+ * gathering the data, this message is shown in an empty row in the table to
+ * indicate to the end user the the data is being loaded. Note that this
+ * parameter is not used when loading data by server-side processing, just
+ * Ajax sourced data with client-side processing.
+ * @type string
+ * @default Loading...
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.loadingRecords
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "loadingRecords": "Please wait - loading..."
+ * }
+ * } );
+ * } );
+ */
+ "sLoadingRecords": "Loading...",
+
+
+ /**
+ * Text which is displayed when the table is processing a user action
+ * (usually a sort command or similar).
+ * @type string
+ * @default Processing...
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.processing
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "processing": "DataTables is currently busy"
+ * }
+ * } );
+ * } );
+ */
+ "sProcessing": "Processing...",
+
+
+ /**
+ * Details the actions that will be taken when the user types into the
+ * filtering input text box. The variable "_INPUT_", if used in the string,
+ * is replaced with the HTML text box for the filtering input allowing
+ * control over where it appears in the string. If "_INPUT_" is not given
+ * then the input box is appended to the string automatically.
+ * @type string
+ * @default Search:
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.search
+ *
+ * @example
+ * // Input text box will be appended at the end automatically
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "search": "Filter records:"
+ * }
+ * } );
+ * } );
+ *
+ * @example
+ * // Specify where the filter should appear
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "search": "Apply filter _INPUT_ to table"
+ * }
+ * } );
+ * } );
+ */
+ "sSearch": "Search:",
+
+
+ /**
+ * Assign a `placeholder` attribute to the search `input` element
+ * @type string
+ * @default
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.searchPlaceholder
+ */
+ "sSearchPlaceholder": "",
+
+
+ /**
+ * All of the language information can be stored in a file on the
+ * server-side, which DataTables will look up if this parameter is passed.
+ * It must store the URL of the language file, which is in a JSON format,
+ * and the object has the same properties as the oLanguage object in the
+ * initialiser object (i.e. the above parameters). Please refer to one of
+ * the example language files to see how this works in action.
+ * @type string
+ * @default <i>Empty string - i.e. disabled</i>
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.url
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "url": "http://www.sprymedia.co.uk/dataTables/lang.txt"
+ * }
+ * } );
+ * } );
+ */
+ "sUrl": "",
+
+
+ /**
+ * Text shown inside the table records when the is no information to be
+ * displayed after filtering. `emptyTable` is shown when there is simply no
+ * information in the table at all (regardless of filtering).
+ * @type string
+ * @default No matching records found
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.zeroRecords
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "zeroRecords": "No records to display"
+ * }
+ * } );
+ * } );
+ */
+ "sZeroRecords": "No matching records found"
+ },
+
+
+ /**
+ * This parameter allows you to have define the global filtering state at
+ * initialisation time. As an object the `search` parameter must be
+ * defined, but all other parameters are optional. When `regex` is true,
+ * the search string will be treated as a regular expression, when false
+ * (default) it will be treated as a straight string. When `smart`
+ * DataTables will use it's smart filtering methods (to word match at
+ * any point in the data), when false this will not be done.
+ * @namespace
+ * @extends DataTable.models.oSearch
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.search
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "search": {"search": "Initial search"}
+ * } );
+ * } )
+ */
+ "oSearch": $.extend( {}, DataTable.models.oSearch ),
+
+
+ /**
+ * __Deprecated__ The functionality provided by this parameter has now been
+ * superseded by that provided through `ajax`, which should be used instead.
+ *
+ * By default DataTables will look for the property `data` (or `aaData` for
+ * compatibility with DataTables 1.9-) when obtaining data from an Ajax
+ * source or for server-side processing - this parameter allows that
+ * property to be changed. You can use Javascript dotted object notation to
+ * get a data source for multiple levels of nesting.
+ * @type string
+ * @default data
+ *
+ * @dtopt Options
+ * @dtopt Server-side
+ * @name DataTable.defaults.ajaxDataProp
+ *
+ * @deprecated 1.10. Please use `ajax` for this functionality now.
+ */
+ "sAjaxDataProp": "data",
+
+
+ /**
+ * __Deprecated__ The functionality provided by this parameter has now been
+ * superseded by that provided through `ajax`, which should be used instead.
+ *
+ * You can instruct DataTables to load data from an external
+ * source using this parameter (use aData if you want to pass data in you
+ * already have). Simply provide a url a JSON object can be obtained from.
+ * @type string
+ * @default null
+ *
+ * @dtopt Options
+ * @dtopt Server-side
+ * @name DataTable.defaults.ajaxSource
+ *
+ * @deprecated 1.10. Please use `ajax` for this functionality now.
+ */
+ "sAjaxSource": null,
+
+
+ /**
+ * This initialisation variable allows you to specify exactly where in the
+ * DOM you want DataTables to inject the various controls it adds to the page
+ * (for example you might want the pagination controls at the top of the
+ * table). DIV elements (with or without a custom class) can also be added to
+ * aid styling. The follow syntax is used:
+ * <ul>
+ * <li>The following options are allowed:
+ * <ul>
+ * <li>'l' - Length changing</li>
+ * <li>'f' - Filtering input</li>
+ * <li>'t' - The table!</li>
+ * <li>'i' - Information</li>
+ * <li>'p' - Pagination</li>
+ * <li>'r' - pRocessing</li>
+ * </ul>
+ * </li>
+ * <li>The following constants are allowed:
+ * <ul>
+ * <li>'H' - jQueryUI theme "header" classes ('fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix')</li>
+ * <li>'F' - jQueryUI theme "footer" classes ('fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix')</li>
+ * </ul>
+ * </li>
+ * <li>The following syntax is expected:
+ * <ul>
+ * <li>'&lt;' and '&gt;' - div elements</li>
+ * <li>'&lt;"class" and '&gt;' - div with a class</li>
+ * <li>'&lt;"#id" and '&gt;' - div with an ID</li>
+ * </ul>
+ * </li>
+ * <li>Examples:
+ * <ul>
+ * <li>'&lt;"wrapper"flipt&gt;'</li>
+ * <li>'&lt;lf&lt;t&gt;ip&gt;'</li>
+ * </ul>
+ * </li>
+ * </ul>
+ * @type string
+ * @default lfrtip <i>(when `jQueryUI` is false)</i> <b>or</b>
+ * <"H"lfr>t<"F"ip> <i>(when `jQueryUI` is true)</i>
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.dom
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "dom": '&lt;"top"i&gt;rt&lt;"bottom"flp&gt;&lt;"clear"&gt;'
+ * } );
+ * } );
+ */
+ "sDom": "lfrtip",
+
+
+ /**
+ * Search delay option. This will throttle full table searches that use the
+ * DataTables provided search input element (it does not effect calls to
+ * `dt-api search()`, providing a delay before the search is made.
+ * @type integer
+ * @default 0
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.searchDelay
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "searchDelay": 200
+ * } );
+ * } )
+ */
+ "searchDelay": null,
+
+
+ /**
+ * DataTables features four different built-in options for the buttons to
+ * display for pagination control:
+ *
+ * * `simple` - 'Previous' and 'Next' buttons only
+ * * 'simple_numbers` - 'Previous' and 'Next' buttons, plus page numbers
+ * * `full` - 'First', 'Previous', 'Next' and 'Last' buttons
+ * * `full_numbers` - 'First', 'Previous', 'Next' and 'Last' buttons, plus
+ * page numbers
+ *
+ * Further methods can be added using {@link DataTable.ext.oPagination}.
+ * @type string
+ * @default simple_numbers
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.pagingType
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "pagingType": "full_numbers"
+ * } );
+ * } )
+ */
+ "sPaginationType": "simple_numbers",
+
+
+ /**
+ * Enable horizontal scrolling. When a table is too wide to fit into a
+ * certain layout, or you have a large number of columns in the table, you
+ * can enable x-scrolling to show the table in a viewport, which can be
+ * scrolled. This property can be `true` which will allow the table to
+ * scroll horizontally when needed, or any CSS unit, or a number (in which
+ * case it will be treated as a pixel measurement). Setting as simply `true`
+ * is recommended.
+ * @type boolean|string
+ * @default <i>blank string - i.e. disabled</i>
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.scrollX
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "scrollX": true,
+ * "scrollCollapse": true
+ * } );
+ * } );
+ */
+ "sScrollX": "",
+
+
+ /**
+ * This property can be used to force a DataTable to use more width than it
+ * might otherwise do when x-scrolling is enabled. For example if you have a
+ * table which requires to be well spaced, this parameter is useful for
+ * "over-sizing" the table, and thus forcing scrolling. This property can by
+ * any CSS unit, or a number (in which case it will be treated as a pixel
+ * measurement).
+ * @type string
+ * @default <i>blank string - i.e. disabled</i>
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.scrollXInner
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "scrollX": "100%",
+ * "scrollXInner": "110%"
+ * } );
+ * } );
+ */
+ "sScrollXInner": "",
+
+
+ /**
+ * Enable vertical scrolling. Vertical scrolling will constrain the DataTable
+ * to the given height, and enable scrolling for any data which overflows the
+ * current viewport. This can be used as an alternative to paging to display
+ * a lot of data in a small area (although paging and scrolling can both be
+ * enabled at the same time). This property can be any CSS unit, or a number
+ * (in which case it will be treated as a pixel measurement).
+ * @type string
+ * @default <i>blank string - i.e. disabled</i>
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.scrollY
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "scrollY": "200px",
+ * "paginate": false
+ * } );
+ * } );
+ */
+ "sScrollY": "",
+
+
+ /**
+ * __Deprecated__ The functionality provided by this parameter has now been
+ * superseded by that provided through `ajax`, which should be used instead.
+ *
+ * Set the HTTP method that is used to make the Ajax call for server-side
+ * processing or Ajax sourced data.
+ * @type string
+ * @default GET
+ *
+ * @dtopt Options
+ * @dtopt Server-side
+ * @name DataTable.defaults.serverMethod
+ *
+ * @deprecated 1.10. Please use `ajax` for this functionality now.
+ */
+ "sServerMethod": "GET",
+
+
+ /**
+ * DataTables makes use of renderers when displaying HTML elements for
+ * a table. These renderers can be added or modified by plug-ins to
+ * generate suitable mark-up for a site. For example the Bootstrap
+ * integration plug-in for DataTables uses a paging button renderer to
+ * display pagination buttons in the mark-up required by Bootstrap.
+ *
+ * For further information about the renderers available see
+ * DataTable.ext.renderer
+ * @type string|object
+ * @default null
+ *
+ * @name DataTable.defaults.renderer
+ *
+ */
+ "renderer": null,
+
+
+ /**
+ * Set the data property name that DataTables should use to get a row's id
+ * to set as the `id` property in the node.
+ * @type string
+ * @default DT_RowId
+ *
+ * @name DataTable.defaults.rowId
+ */
+ "rowId": "DT_RowId"
+ };
+
+ _fnHungarianMap( DataTable.defaults );
+
+
+
+ /*
+ * Developer note - See note in model.defaults.js about the use of Hungarian
+ * notation and camel case.
+ */
+
+ /**
+ * Column options that can be given to DataTables at initialisation time.
+ * @namespace
+ */
+ DataTable.defaults.column = {
+ /**
+ * Define which column(s) an order will occur on for this column. This
+ * allows a column's ordering to take multiple columns into account when
+ * doing a sort or use the data from a different column. For example first
+ * name / last name columns make sense to do a multi-column sort over the
+ * two columns.
+ * @type array|int
+ * @default null <i>Takes the value of the column index automatically</i>
+ *
+ * @name DataTable.defaults.column.orderData
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * { "orderData": [ 0, 1 ], "targets": [ 0 ] },
+ * { "orderData": [ 1, 0 ], "targets": [ 1 ] },
+ * { "orderData": 2, "targets": [ 2 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * { "orderData": [ 0, 1 ] },
+ * { "orderData": [ 1, 0 ] },
+ * { "orderData": 2 },
+ * null,
+ * null
+ * ]
+ * } );
+ * } );
+ */
+ "aDataSort": null,
+ "iDataSort": -1,
+
+
+ /**
+ * You can control the default ordering direction, and even alter the
+ * behaviour of the sort handler (i.e. only allow ascending ordering etc)
+ * using this parameter.
+ * @type array
+ * @default [ 'asc', 'desc' ]
+ *
+ * @name DataTable.defaults.column.orderSequence
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * { "orderSequence": [ "asc" ], "targets": [ 1 ] },
+ * { "orderSequence": [ "desc", "asc", "asc" ], "targets": [ 2 ] },
+ * { "orderSequence": [ "desc" ], "targets": [ 3 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * null,
+ * { "orderSequence": [ "asc" ] },
+ * { "orderSequence": [ "desc", "asc", "asc" ] },
+ * { "orderSequence": [ "desc" ] },
+ * null
+ * ]
+ * } );
+ * } );
+ */
+ "asSorting": [ 'asc', 'desc' ],
+
+
+ /**
+ * Enable or disable filtering on the data in this column.
+ * @type boolean
+ * @default true
+ *
+ * @name DataTable.defaults.column.searchable
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * { "searchable": false, "targets": [ 0 ] }
+ * ] } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * { "searchable": false },
+ * null,
+ * null,
+ * null,
+ * null
+ * ] } );
+ * } );
+ */
+ "bSearchable": true,
+
+
+ /**
+ * Enable or disable ordering on this column.
+ * @type boolean
+ * @default true
+ *
+ * @name DataTable.defaults.column.orderable
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * { "orderable": false, "targets": [ 0 ] }
+ * ] } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * { "orderable": false },
+ * null,
+ * null,
+ * null,
+ * null
+ * ] } );
+ * } );
+ */
+ "bSortable": true,
+
+
+ /**
+ * Enable or disable the display of this column.
+ * @type boolean
+ * @default true
+ *
+ * @name DataTable.defaults.column.visible
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * { "visible": false, "targets": [ 0 ] }
+ * ] } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * { "visible": false },
+ * null,
+ * null,
+ * null,
+ * null
+ * ] } );
+ * } );
+ */
+ "bVisible": true,
+
+
+ /**
+ * Developer definable function that is called whenever a cell is created (Ajax source,
+ * etc) or processed for input (DOM source). This can be used as a compliment to mRender
+ * allowing you to modify the DOM element (add background colour for example) when the
+ * element is available.
+ * @type function
+ * @param {element} td The TD node that has been created
+ * @param {*} cellData The Data for the cell
+ * @param {array|object} rowData The data for the whole row
+ * @param {int} row The row index for the aoData data store
+ * @param {int} col The column index for aoColumns
+ *
+ * @name DataTable.defaults.column.createdCell
+ * @dtopt Columns
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [ {
+ * "targets": [3],
+ * "createdCell": function (td, cellData, rowData, row, col) {
+ * if ( cellData == "1.7" ) {
+ * $(td).css('color', 'blue')
+ * }
+ * }
+ * } ]
+ * });
+ * } );
+ */
+ "fnCreatedCell": null,
+
+
+ /**
+ * This parameter has been replaced by `data` in DataTables to ensure naming
+ * consistency. `dataProp` can still be used, as there is backwards
+ * compatibility in DataTables for this option, but it is strongly
+ * recommended that you use `data` in preference to `dataProp`.
+ * @name DataTable.defaults.column.dataProp
+ */
+
+
+ /**
+ * This property can be used to read data from any data source property,
+ * including deeply nested objects / properties. `data` can be given in a
+ * number of different ways which effect its behaviour:
+ *
+ * * `integer` - treated as an array index for the data source. This is the
+ * default that DataTables uses (incrementally increased for each column).
+ * * `string` - read an object property from the data source. There are
+ * three 'special' options that can be used in the string to alter how
+ * DataTables reads the data from the source object:
+ * * `.` - Dotted Javascript notation. Just as you use a `.` in
+ * Javascript to read from nested objects, so to can the options
+ * specified in `data`. For example: `browser.version` or
+ * `browser.name`. If your object parameter name contains a period, use
+ * `\\` to escape it - i.e. `first\\.name`.
+ * * `[]` - Array notation. DataTables can automatically combine data
+ * from and array source, joining the data with the characters provided
+ * between the two brackets. For example: `name[, ]` would provide a
+ * comma-space separated list from the source array. If no characters
+ * are provided between the brackets, the original array source is
+ * returned.
+ * * `()` - Function notation. Adding `()` to the end of a parameter will
+ * execute a function of the name given. For example: `browser()` for a
+ * simple function on the data source, `browser.version()` for a
+ * function in a nested property or even `browser().version` to get an
+ * object property if the function called returns an object. Note that
+ * function notation is recommended for use in `render` rather than
+ * `data` as it is much simpler to use as a renderer.
+ * * `null` - use the original data source for the row rather than plucking
+ * data directly from it. This action has effects on two other
+ * initialisation options:
+ * * `defaultContent` - When null is given as the `data` option and
+ * `defaultContent` is specified for the column, the value defined by
+ * `defaultContent` will be used for the cell.
+ * * `render` - When null is used for the `data` option and the `render`
+ * option is specified for the column, the whole data source for the
+ * row is used for the renderer.
+ * * `function` - the function given will be executed whenever DataTables
+ * needs to set or get the data for a cell in the column. The function
+ * takes three parameters:
+ * * Parameters:
+ * * `{array|object}` The data source for the row
+ * * `{string}` The type call data requested - this will be 'set' when
+ * setting data or 'filter', 'display', 'type', 'sort' or undefined
+ * when gathering data. Note that when `undefined` is given for the
+ * type DataTables expects to get the raw data for the object back<
+ * * `{*}` Data to set when the second parameter is 'set'.
+ * * Return:
+ * * The return value from the function is not required when 'set' is
+ * the type of call, but otherwise the return is what will be used
+ * for the data requested.
+ *
+ * Note that `data` is a getter and setter option. If you just require
+ * formatting of data for output, you will likely want to use `render` which
+ * is simply a getter and thus simpler to use.
+ *
+ * Note that prior to DataTables 1.9.2 `data` was called `mDataProp`. The
+ * name change reflects the flexibility of this property and is consistent
+ * with the naming of mRender. If 'mDataProp' is given, then it will still
+ * be used by DataTables, as it automatically maps the old name to the new
+ * if required.
+ *
+ * @type string|int|function|null
+ * @default null <i>Use automatically calculated column index</i>
+ *
+ * @name DataTable.defaults.column.data
+ * @dtopt Columns
+ *
+ * @example
+ * // Read table data from objects
+ * // JSON structure for each row:
+ * // {
+ * // "engine": {value},
+ * // "browser": {value},
+ * // "platform": {value},
+ * // "version": {value},
+ * // "grade": {value}
+ * // }
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "ajaxSource": "sources/objects.txt",
+ * "columns": [
+ * { "data": "engine" },
+ * { "data": "browser" },
+ * { "data": "platform" },
+ * { "data": "version" },
+ * { "data": "grade" }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Read information from deeply nested objects
+ * // JSON structure for each row:
+ * // {
+ * // "engine": {value},
+ * // "browser": {value},
+ * // "platform": {
+ * // "inner": {value}
+ * // },
+ * // "details": [
+ * // {value}, {value}
+ * // ]
+ * // }
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "ajaxSource": "sources/deep.txt",
+ * "columns": [
+ * { "data": "engine" },
+ * { "data": "browser" },
+ * { "data": "platform.inner" },
+ * { "data": "platform.details.0" },
+ * { "data": "platform.details.1" }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using `data` as a function to provide different information for
+ * // sorting, filtering and display. In this case, currency (price)
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [ {
+ * "targets": [ 0 ],
+ * "data": function ( source, type, val ) {
+ * if (type === 'set') {
+ * source.price = val;
+ * // Store the computed dislay and filter values for efficiency
+ * source.price_display = val=="" ? "" : "$"+numberFormat(val);
+ * source.price_filter = val=="" ? "" : "$"+numberFormat(val)+" "+val;
+ * return;
+ * }
+ * else if (type === 'display') {
+ * return source.price_display;
+ * }
+ * else if (type === 'filter') {
+ * return source.price_filter;
+ * }
+ * // 'sort', 'type' and undefined all just use the integer
+ * return source.price;
+ * }
+ * } ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using default content
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [ {
+ * "targets": [ 0 ],
+ * "data": null,
+ * "defaultContent": "Click to edit"
+ * } ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using array notation - outputting a list from an array
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [ {
+ * "targets": [ 0 ],
+ * "data": "name[, ]"
+ * } ]
+ * } );
+ * } );
+ *
+ */
+ "mData": null,
+
+
+ /**
+ * This property is the rendering partner to `data` and it is suggested that
+ * when you want to manipulate data for display (including filtering,
+ * sorting etc) without altering the underlying data for the table, use this
+ * property. `render` can be considered to be the the read only companion to
+ * `data` which is read / write (then as such more complex). Like `data`
+ * this option can be given in a number of different ways to effect its
+ * behaviour:
+ *
+ * * `integer` - treated as an array index for the data source. This is the
+ * default that DataTables uses (incrementally increased for each column).
+ * * `string` - read an object property from the data source. There are
+ * three 'special' options that can be used in the string to alter how
+ * DataTables reads the data from the source object:
+ * * `.` - Dotted Javascript notation. Just as you use a `.` in
+ * Javascript to read from nested objects, so to can the options
+ * specified in `data`. For example: `browser.version` or
+ * `browser.name`. If your object parameter name contains a period, use
+ * `\\` to escape it - i.e. `first\\.name`.
+ * * `[]` - Array notation. DataTables can automatically combine data
+ * from and array source, joining the data with the characters provided
+ * between the two brackets. For example: `name[, ]` would provide a
+ * comma-space separated list from the source array. If no characters
+ * are provided between the brackets, the original array source is
+ * returned.
+ * * `()` - Function notation. Adding `()` to the end of a parameter will
+ * execute a function of the name given. For example: `browser()` for a
+ * simple function on the data source, `browser.version()` for a
+ * function in a nested property or even `browser().version` to get an
+ * object property if the function called returns an object.
+ * * `object` - use different data for the different data types requested by
+ * DataTables ('filter', 'display', 'type' or 'sort'). The property names
+ * of the object is the data type the property refers to and the value can
+ * defined using an integer, string or function using the same rules as
+ * `render` normally does. Note that an `_` option _must_ be specified.
+ * This is the default value to use if you haven't specified a value for
+ * the data type requested by DataTables.
+ * * `function` - the function given will be executed whenever DataTables
+ * needs to set or get the data for a cell in the column. The function
+ * takes three parameters:
+ * * Parameters:
+ * * {array|object} The data source for the row (based on `data`)
+ * * {string} The type call data requested - this will be 'filter',
+ * 'display', 'type' or 'sort'.
+ * * {array|object} The full data source for the row (not based on
+ * `data`)
+ * * Return:
+ * * The return value from the function is what will be used for the
+ * data requested.
+ *
+ * @type string|int|function|object|null
+ * @default null Use the data source value.
+ *
+ * @name DataTable.defaults.column.render
+ * @dtopt Columns
+ *
+ * @example
+ * // Create a comma separated list from an array of objects
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "ajaxSource": "sources/deep.txt",
+ * "columns": [
+ * { "data": "engine" },
+ * { "data": "browser" },
+ * {
+ * "data": "platform",
+ * "render": "[, ].name"
+ * }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Execute a function to obtain data
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [ {
+ * "targets": [ 0 ],
+ * "data": null, // Use the full data source object for the renderer's source
+ * "render": "browserName()"
+ * } ]
+ * } );
+ * } );
+ *
+ * @example
+ * // As an object, extracting different data for the different types
+ * // This would be used with a data source such as:
+ * // { "phone": 5552368, "phone_filter": "5552368 555-2368", "phone_display": "555-2368" }
+ * // Here the `phone` integer is used for sorting and type detection, while `phone_filter`
+ * // (which has both forms) is used for filtering for if a user inputs either format, while
+ * // the formatted phone number is the one that is shown in the table.
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [ {
+ * "targets": [ 0 ],
+ * "data": null, // Use the full data source object for the renderer's source
+ * "render": {
+ * "_": "phone",
+ * "filter": "phone_filter",
+ * "display": "phone_display"
+ * }
+ * } ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Use as a function to create a link from the data source
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [ {
+ * "targets": [ 0 ],
+ * "data": "download_link",
+ * "render": function ( data, type, full ) {
+ * return '<a href="'+data+'">Download</a>';
+ * }
+ * } ]
+ * } );
+ * } );
+ */
+ "mRender": null,
+
+
+ /**
+ * Change the cell type created for the column - either TD cells or TH cells. This
+ * can be useful as TH cells have semantic meaning in the table body, allowing them
+ * to act as a header for a row (you may wish to add scope='row' to the TH elements).
+ * @type string
+ * @default td
+ *
+ * @name DataTable.defaults.column.cellType
+ * @dtopt Columns
+ *
+ * @example
+ * // Make the first column use TH cells
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [ {
+ * "targets": [ 0 ],
+ * "cellType": "th"
+ * } ]
+ * } );
+ * } );
+ */
+ "sCellType": "td",
+
+
+ /**
+ * Class to give to each cell in this column.
+ * @type string
+ * @default <i>Empty string</i>
+ *
+ * @name DataTable.defaults.column.class
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * { "class": "my_class", "targets": [ 0 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * { "class": "my_class" },
+ * null,
+ * null,
+ * null,
+ * null
+ * ]
+ * } );
+ * } );
+ */
+ "sClass": "",
+
+ /**
+ * When DataTables calculates the column widths to assign to each column,
+ * it finds the longest string in each column and then constructs a
+ * temporary table and reads the widths from that. The problem with this
+ * is that "mmm" is much wider then "iiii", but the latter is a longer
+ * string - thus the calculation can go wrong (doing it properly and putting
+ * it into an DOM object and measuring that is horribly(!) slow). Thus as
+ * a "work around" we provide this option. It will append its value to the
+ * text that is found to be the longest string for the column - i.e. padding.
+ * Generally you shouldn't need this!
+ * @type string
+ * @default <i>Empty string<i>
+ *
+ * @name DataTable.defaults.column.contentPadding
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * null,
+ * null,
+ * null,
+ * {
+ * "contentPadding": "mmm"
+ * }
+ * ]
+ * } );
+ * } );
+ */
+ "sContentPadding": "",
+
+
+ /**
+ * Allows a default value to be given for a column's data, and will be used
+ * whenever a null data source is encountered (this can be because `data`
+ * is set to null, or because the data source itself is null).
+ * @type string
+ * @default null
+ *
+ * @name DataTable.defaults.column.defaultContent
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * {
+ * "data": null,
+ * "defaultContent": "Edit",
+ * "targets": [ -1 ]
+ * }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * null,
+ * null,
+ * null,
+ * {
+ * "data": null,
+ * "defaultContent": "Edit"
+ * }
+ * ]
+ * } );
+ * } );
+ */
+ "sDefaultContent": null,
+
+
+ /**
+ * This parameter is only used in DataTables' server-side processing. It can
+ * be exceptionally useful to know what columns are being displayed on the
+ * client side, and to map these to database fields. When defined, the names
+ * also allow DataTables to reorder information from the server if it comes
+ * back in an unexpected order (i.e. if you switch your columns around on the
+ * client-side, your server-side code does not also need updating).
+ * @type string
+ * @default <i>Empty string</i>
+ *
+ * @name DataTable.defaults.column.name
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * { "name": "engine", "targets": [ 0 ] },
+ * { "name": "browser", "targets": [ 1 ] },
+ * { "name": "platform", "targets": [ 2 ] },
+ * { "name": "version", "targets": [ 3 ] },
+ * { "name": "grade", "targets": [ 4 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * { "name": "engine" },
+ * { "name": "browser" },
+ * { "name": "platform" },
+ * { "name": "version" },
+ * { "name": "grade" }
+ * ]
+ * } );
+ * } );
+ */
+ "sName": "",
+
+
+ /**
+ * Defines a data source type for the ordering which can be used to read
+ * real-time information from the table (updating the internally cached
+ * version) prior to ordering. This allows ordering to occur on user
+ * editable elements such as form inputs.
+ * @type string
+ * @default std
+ *
+ * @name DataTable.defaults.column.orderDataType
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * { "orderDataType": "dom-text", "targets": [ 2, 3 ] },
+ * { "type": "numeric", "targets": [ 3 ] },
+ * { "orderDataType": "dom-select", "targets": [ 4 ] },
+ * { "orderDataType": "dom-checkbox", "targets": [ 5 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * null,
+ * null,
+ * { "orderDataType": "dom-text" },
+ * { "orderDataType": "dom-text", "type": "numeric" },
+ * { "orderDataType": "dom-select" },
+ * { "orderDataType": "dom-checkbox" }
+ * ]
+ * } );
+ * } );
+ */
+ "sSortDataType": "std",
+
+
+ /**
+ * The title of this column.
+ * @type string
+ * @default null <i>Derived from the 'TH' value for this column in the
+ * original HTML table.</i>
+ *
+ * @name DataTable.defaults.column.title
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * { "title": "My column title", "targets": [ 0 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * { "title": "My column title" },
+ * null,
+ * null,
+ * null,
+ * null
+ * ]
+ * } );
+ * } );
+ */
+ "sTitle": null,
+
+
+ /**
+ * The type allows you to specify how the data for this column will be
+ * ordered. Four types (string, numeric, date and html (which will strip
+ * HTML tags before ordering)) are currently available. Note that only date
+ * formats understood by Javascript's Date() object will be accepted as type
+ * date. For example: "Mar 26, 2008 5:03 PM". May take the values: 'string',
+ * 'numeric', 'date' or 'html' (by default). Further types can be adding
+ * through plug-ins.
+ * @type string
+ * @default null <i>Auto-detected from raw data</i>
+ *
+ * @name DataTable.defaults.column.type
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * { "type": "html", "targets": [ 0 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * { "type": "html" },
+ * null,
+ * null,
+ * null,
+ * null
+ * ]
+ * } );
+ * } );
+ */
+ "sType": null,
+
+
+ /**
+ * Defining the width of the column, this parameter may take any CSS value
+ * (3em, 20px etc). DataTables applies 'smart' widths to columns which have not
+ * been given a specific width through this interface ensuring that the table
+ * remains readable.
+ * @type string
+ * @default null <i>Automatic</i>
+ *
+ * @name DataTable.defaults.column.width
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * { "width": "20%", "targets": [ 0 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * { "width": "20%" },
+ * null,
+ * null,
+ * null,
+ * null
+ * ]
+ * } );
+ * } );
+ */
+ "sWidth": null
+ };
+
+ _fnHungarianMap( DataTable.defaults.column );
+
+
+
+ /**
+ * DataTables settings object - this holds all the information needed for a
+ * given table, including configuration, data and current application of the
+ * table options. DataTables does not have a single instance for each DataTable
+ * with the settings attached to that instance, but rather instances of the
+ * DataTable "class" are created on-the-fly as needed (typically by a
+ * $().dataTable() call) and the settings object is then applied to that
+ * instance.
+ *
+ * Note that this object is related to {@link DataTable.defaults} but this
+ * one is the internal data store for DataTables's cache of columns. It should
+ * NOT be manipulated outside of DataTables. Any configuration should be done
+ * through the initialisation options.
+ * @namespace
+ * @todo Really should attach the settings object to individual instances so we
+ * don't need to create new instances on each $().dataTable() call (if the
+ * table already exists). It would also save passing oSettings around and
+ * into every single function. However, this is a very significant
+ * architecture change for DataTables and will almost certainly break
+ * backwards compatibility with older installations. This is something that
+ * will be done in 2.0.
+ */
+ DataTable.models.oSettings = {
+ /**
+ * Primary features of DataTables and their enablement state.
+ * @namespace
+ */
+ "oFeatures": {
+
+ /**
+ * Flag to say if DataTables should automatically try to calculate the
+ * optimum table and columns widths (true) or not (false).
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bAutoWidth": null,
+
+ /**
+ * Delay the creation of TR and TD elements until they are actually
+ * needed by a driven page draw. This can give a significant speed
+ * increase for Ajax source and Javascript source data, but makes no
+ * difference at all fro DOM and server-side processing tables.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bDeferRender": null,
+
+ /**
+ * Enable filtering on the table or not. Note that if this is disabled
+ * then there is no filtering at all on the table, including fnFilter.
+ * To just remove the filtering input use sDom and remove the 'f' option.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bFilter": null,
+
+ /**
+ * Table information element (the 'Showing x of y records' div) enable
+ * flag.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bInfo": null,
+
+ /**
+ * Present a user control allowing the end user to change the page size
+ * when pagination is enabled.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bLengthChange": null,
+
+ /**
+ * Pagination enabled or not. Note that if this is disabled then length
+ * changing must also be disabled.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bPaginate": null,
+
+ /**
+ * Processing indicator enable flag whenever DataTables is enacting a
+ * user request - typically an Ajax request for server-side processing.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bProcessing": null,
+
+ /**
+ * Server-side processing enabled flag - when enabled DataTables will
+ * get all data from the server for every draw - there is no filtering,
+ * sorting or paging done on the client-side.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bServerSide": null,
+
+ /**
+ * Sorting enablement flag.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bSort": null,
+
+ /**
+ * Multi-column sorting
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bSortMulti": null,
+
+ /**
+ * Apply a class to the columns which are being sorted to provide a
+ * visual highlight or not. This can slow things down when enabled since
+ * there is a lot of DOM interaction.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bSortClasses": null,
+
+ /**
+ * State saving enablement flag.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bStateSave": null
+ },
+
+
+ /**
+ * Scrolling settings for a table.
+ * @namespace
+ */
+ "oScroll": {
+ /**
+ * When the table is shorter in height than sScrollY, collapse the
+ * table container down to the height of the table (when true).
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bCollapse": null,
+
+ /**
+ * Width of the scrollbar for the web-browser's platform. Calculated
+ * during table initialisation.
+ * @type int
+ * @default 0
+ */
+ "iBarWidth": 0,
+
+ /**
+ * Viewport width for horizontal scrolling. Horizontal scrolling is
+ * disabled if an empty string.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ */
+ "sX": null,
+
+ /**
+ * Width to expand the table to when using x-scrolling. Typically you
+ * should not need to use this.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ * @deprecated
+ */
+ "sXInner": null,
+
+ /**
+ * Viewport height for vertical scrolling. Vertical scrolling is disabled
+ * if an empty string.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ */
+ "sY": null
+ },
+
+ /**
+ * Language information for the table.
+ * @namespace
+ * @extends DataTable.defaults.oLanguage
+ */
+ "oLanguage": {
+ /**
+ * Information callback function. See
+ * {@link DataTable.defaults.fnInfoCallback}
+ * @type function
+ * @default null
+ */
+ "fnInfoCallback": null
+ },
+
+ /**
+ * Browser support parameters
+ * @namespace
+ */
+ "oBrowser": {
+ /**
+ * Indicate if the browser incorrectly calculates width:100% inside a
+ * scrolling element (IE6/7)
+ * @type boolean
+ * @default false
+ */
+ "bScrollOversize": false,
+
+ /**
+ * Determine if the vertical scrollbar is on the right or left of the
+ * scrolling container - needed for rtl language layout, although not
+ * all browsers move the scrollbar (Safari).
+ * @type boolean
+ * @default false
+ */
+ "bScrollbarLeft": false,
+
+ /**
+ * Flag for if `getBoundingClientRect` is fully supported or not
+ * @type boolean
+ * @default false
+ */
+ "bBounding": false,
+
+ /**
+ * Browser scrollbar width
+ * @type integer
+ * @default 0
+ */
+ "barWidth": 0
+ },
+
+
+ "ajax": null,
+
+
+ /**
+ * Array referencing the nodes which are used for the features. The
+ * parameters of this object match what is allowed by sDom - i.e.
+ * <ul>
+ * <li>'l' - Length changing</li>
+ * <li>'f' - Filtering input</li>
+ * <li>'t' - The table!</li>
+ * <li>'i' - Information</li>
+ * <li>'p' - Pagination</li>
+ * <li>'r' - pRocessing</li>
+ * </ul>
+ * @type array
+ * @default []
+ */
+ "aanFeatures": [],
+
+ /**
+ * Store data information - see {@link DataTable.models.oRow} for detailed
+ * information.
+ * @type array
+ * @default []
+ */
+ "aoData": [],
+
+ /**
+ * Array of indexes which are in the current display (after filtering etc)
+ * @type array
+ * @default []
+ */
+ "aiDisplay": [],
+
+ /**
+ * Array of indexes for display - no filtering
+ * @type array
+ * @default []
+ */
+ "aiDisplayMaster": [],
+
+ /**
+ * Map of row ids to data indexes
+ * @type object
+ * @default {}
+ */
+ "aIds": {},
+
+ /**
+ * Store information about each column that is in use
+ * @type array
+ * @default []
+ */
+ "aoColumns": [],
+
+ /**
+ * Store information about the table's header
+ * @type array
+ * @default []
+ */
+ "aoHeader": [],
+
+ /**
+ * Store information about the table's footer
+ * @type array
+ * @default []
+ */
+ "aoFooter": [],
+
+ /**
+ * Store the applied global search information in case we want to force a
+ * research or compare the old search to a new one.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @namespace
+ * @extends DataTable.models.oSearch
+ */
+ "oPreviousSearch": {},
+
+ /**
+ * Store the applied search for each column - see
+ * {@link DataTable.models.oSearch} for the format that is used for the
+ * filtering information for each column.
+ * @type array
+ * @default []
+ */
+ "aoPreSearchCols": [],
+
+ /**
+ * Sorting that is applied to the table. Note that the inner arrays are
+ * used in the following manner:
+ * <ul>
+ * <li>Index 0 - column number</li>
+ * <li>Index 1 - current sorting direction</li>
+ * </ul>
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type array
+ * @todo These inner arrays should really be objects
+ */
+ "aaSorting": null,
+
+ /**
+ * Sorting that is always applied to the table (i.e. prefixed in front of
+ * aaSorting).
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type array
+ * @default []
+ */
+ "aaSortingFixed": [],
+
+ /**
+ * Classes to use for the striping of a table.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type array
+ * @default []
+ */
+ "asStripeClasses": null,
+
+ /**
+ * If restoring a table - we should restore its striping classes as well
+ * @type array
+ * @default []
+ */
+ "asDestroyStripes": [],
+
+ /**
+ * If restoring a table - we should restore its width
+ * @type int
+ * @default 0
+ */
+ "sDestroyWidth": 0,
+
+ /**
+ * Callback functions array for every time a row is inserted (i.e. on a draw).
+ * @type array
+ * @default []
+ */
+ "aoRowCallback": [],
+
+ /**
+ * Callback functions for the header on each draw.
+ * @type array
+ * @default []
+ */
+ "aoHeaderCallback": [],
+
+ /**
+ * Callback function for the footer on each draw.
+ * @type array
+ * @default []
+ */
+ "aoFooterCallback": [],
+
+ /**
+ * Array of callback functions for draw callback functions
+ * @type array
+ * @default []
+ */
+ "aoDrawCallback": [],
+
+ /**
+ * Array of callback functions for row created function
+ * @type array
+ * @default []
+ */
+ "aoRowCreatedCallback": [],
+
+ /**
+ * Callback functions for just before the table is redrawn. A return of
+ * false will be used to cancel the draw.
+ * @type array
+ * @default []
+ */
+ "aoPreDrawCallback": [],
+
+ /**
+ * Callback functions for when the table has been initialised.
+ * @type array
+ * @default []
+ */
+ "aoInitComplete": [],
+
+
+ /**
+ * Callbacks for modifying the settings to be stored for state saving, prior to
+ * saving state.
+ * @type array
+ * @default []
+ */
+ "aoStateSaveParams": [],
+
+ /**
+ * Callbacks for modifying the settings that have been stored for state saving
+ * prior to using the stored values to restore the state.
+ * @type array
+ * @default []
+ */
+ "aoStateLoadParams": [],
+
+ /**
+ * Callbacks for operating on the settings object once the saved state has been
+ * loaded
+ * @type array
+ * @default []
+ */
+ "aoStateLoaded": [],
+
+ /**
+ * Cache the table ID for quick access
+ * @type string
+ * @default <i>Empty string</i>
+ */
+ "sTableId": "",
+
+ /**
+ * The TABLE node for the main table
+ * @type node
+ * @default null
+ */
+ "nTable": null,
+
+ /**
+ * Permanent ref to the thead element
+ * @type node
+ * @default null
+ */
+ "nTHead": null,
+
+ /**
+ * Permanent ref to the tfoot element - if it exists
+ * @type node
+ * @default null
+ */
+ "nTFoot": null,
+
+ /**
+ * Permanent ref to the tbody element
+ * @type node
+ * @default null
+ */
+ "nTBody": null,
+
+ /**
+ * Cache the wrapper node (contains all DataTables controlled elements)
+ * @type node
+ * @default null
+ */
+ "nTableWrapper": null,
+
+ /**
+ * Indicate if when using server-side processing the loading of data
+ * should be deferred until the second draw.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ * @default false
+ */
+ "bDeferLoading": false,
+
+ /**
+ * Indicate if all required information has been read in
+ * @type boolean
+ * @default false
+ */
+ "bInitialised": false,
+
+ /**
+ * Information about open rows. Each object in the array has the parameters
+ * 'nTr' and 'nParent'
+ * @type array
+ * @default []
+ */
+ "aoOpenRows": [],
+
+ /**
+ * Dictate the positioning of DataTables' control elements - see
+ * {@link DataTable.model.oInit.sDom}.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ * @default null
+ */
+ "sDom": null,
+
+ /**
+ * Search delay (in mS)
+ * @type integer
+ * @default null
+ */
+ "searchDelay": null,
+
+ /**
+ * Which type of pagination should be used.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ * @default two_button
+ */
+ "sPaginationType": "two_button",
+
+ /**
+ * The state duration (for `stateSave`) in seconds.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type int
+ * @default 0
+ */
+ "iStateDuration": 0,
+
+ /**
+ * Array of callback functions for state saving. Each array element is an
+ * object with the following parameters:
+ * <ul>
+ * <li>function:fn - function to call. Takes two parameters, oSettings
+ * and the JSON string to save that has been thus far created. Returns
+ * a JSON string to be inserted into a json object
+ * (i.e. '"param": [ 0, 1, 2]')</li>
+ * <li>string:sName - name of callback</li>
+ * </ul>
+ * @type array
+ * @default []
+ */
+ "aoStateSave": [],
+
+ /**
+ * Array of callback functions for state loading. Each array element is an
+ * object with the following parameters:
+ * <ul>
+ * <li>function:fn - function to call. Takes two parameters, oSettings
+ * and the object stored. May return false to cancel state loading</li>
+ * <li>string:sName - name of callback</li>
+ * </ul>
+ * @type array
+ * @default []
+ */
+ "aoStateLoad": [],
+
+ /**
+ * State that was saved. Useful for back reference
+ * @type object
+ * @default null
+ */
+ "oSavedState": null,
+
+ /**
+ * State that was loaded. Useful for back reference
+ * @type object
+ * @default null
+ */
+ "oLoadedState": null,
+
+ /**
+ * Source url for AJAX data for the table.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ * @default null
+ */
+ "sAjaxSource": null,
+
+ /**
+ * Property from a given object from which to read the table data from. This
+ * can be an empty string (when not server-side processing), in which case
+ * it is assumed an an array is given directly.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ */
+ "sAjaxDataProp": null,
+
+ /**
+ * Note if draw should be blocked while getting data
+ * @type boolean
+ * @default true
+ */
+ "bAjaxDataGet": true,
+
+ /**
+ * The last jQuery XHR object that was used for server-side data gathering.
+ * This can be used for working with the XHR information in one of the
+ * callbacks
+ * @type object
+ * @default null
+ */
+ "jqXHR": null,
+
+ /**
+ * JSON returned from the server in the last Ajax request
+ * @type object
+ * @default undefined
+ */
+ "json": undefined,
+
+ /**
+ * Data submitted as part of the last Ajax request
+ * @type object
+ * @default undefined
+ */
+ "oAjaxData": undefined,
+
+ /**
+ * Function to get the server-side data.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type function
+ */
+ "fnServerData": null,
+
+ /**
+ * Functions which are called prior to sending an Ajax request so extra
+ * parameters can easily be sent to the server
+ * @type array
+ * @default []
+ */
+ "aoServerParams": [],
+
+ /**
+ * Send the XHR HTTP method - GET or POST (could be PUT or DELETE if
+ * required).
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ */
+ "sServerMethod": null,
+
+ /**
+ * Format numbers for display.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type function
+ */
+ "fnFormatNumber": null,
+
+ /**
+ * List of options that can be used for the user selectable length menu.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type array
+ * @default []
+ */
+ "aLengthMenu": null,
+
+ /**
+ * Counter for the draws that the table does. Also used as a tracker for
+ * server-side processing
+ * @type int
+ * @default 0
+ */
+ "iDraw": 0,
+
+ /**
+ * Indicate if a redraw is being done - useful for Ajax
+ * @type boolean
+ * @default false
+ */
+ "bDrawing": false,
+
+ /**
+ * Draw index (iDraw) of the last error when parsing the returned data
+ * @type int
+ * @default -1
+ */
+ "iDrawError": -1,
+
+ /**
+ * Paging display length
+ * @type int
+ * @default 10
+ */
+ "_iDisplayLength": 10,
+
+ /**
+ * Paging start point - aiDisplay index
+ * @type int
+ * @default 0
+ */
+ "_iDisplayStart": 0,
+
+ /**
+ * Server-side processing - number of records in the result set
+ * (i.e. before filtering), Use fnRecordsTotal rather than
+ * this property to get the value of the number of records, regardless of
+ * the server-side processing setting.
+ * @type int
+ * @default 0
+ * @private
+ */
+ "_iRecordsTotal": 0,
+
+ /**
+ * Server-side processing - number of records in the current display set
+ * (i.e. after filtering). Use fnRecordsDisplay rather than
+ * this property to get the value of the number of records, regardless of
+ * the server-side processing setting.
+ * @type boolean
+ * @default 0
+ * @private
+ */
+ "_iRecordsDisplay": 0,
+
+ /**
+ * Flag to indicate if jQuery UI marking and classes should be used.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bJUI": null,
+
+ /**
+ * The classes to use for the table
+ * @type object
+ * @default {}
+ */
+ "oClasses": {},
+
+ /**
+ * Flag attached to the settings object so you can check in the draw
+ * callback if filtering has been done in the draw. Deprecated in favour of
+ * events.
+ * @type boolean
+ * @default false
+ * @deprecated
+ */
+ "bFiltered": false,
+
+ /**
+ * Flag attached to the settings object so you can check in the draw
+ * callback if sorting has been done in the draw. Deprecated in favour of
+ * events.
+ * @type boolean
+ * @default false
+ * @deprecated
+ */
+ "bSorted": false,
+
+ /**
+ * Indicate that if multiple rows are in the header and there is more than
+ * one unique cell per column, if the top one (true) or bottom one (false)
+ * should be used for sorting / title by DataTables.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bSortCellsTop": null,
+
+ /**
+ * Initialisation object that is used for the table
+ * @type object
+ * @default null
+ */
+ "oInit": null,
+
+ /**
+ * Destroy callback functions - for plug-ins to attach themselves to the
+ * destroy so they can clean up markup and events.
+ * @type array
+ * @default []
+ */
+ "aoDestroyCallback": [],
+
+
+ /**
+ * Get the number of records in the current record set, before filtering
+ * @type function
+ */
+ "fnRecordsTotal": function ()
+ {
+ return _fnDataSource( this ) == 'ssp' ?
+ this._iRecordsTotal * 1 :
+ this.aiDisplayMaster.length;
+ },
+
+ /**
+ * Get the number of records in the current record set, after filtering
+ * @type function
+ */
+ "fnRecordsDisplay": function ()
+ {
+ return _fnDataSource( this ) == 'ssp' ?
+ this._iRecordsDisplay * 1 :
+ this.aiDisplay.length;
+ },
+
+ /**
+ * Get the display end point - aiDisplay index
+ * @type function
+ */
+ "fnDisplayEnd": function ()
+ {
+ var
+ len = this._iDisplayLength,
+ start = this._iDisplayStart,
+ calc = start + len,
+ records = this.aiDisplay.length,
+ features = this.oFeatures,
+ paginate = features.bPaginate;
+
+ if ( features.bServerSide ) {
+ return paginate === false || len === -1 ?
+ start + records :
+ Math.min( start+len, this._iRecordsDisplay );
+ }
+ else {
+ return ! paginate || calc>records || len===-1 ?
+ records :
+ calc;
+ }
+ },
+
+ /**
+ * The DataTables object for this table
+ * @type object
+ * @default null
+ */
+ "oInstance": null,
+
+ /**
+ * Unique identifier for each instance of the DataTables object. If there
+ * is an ID on the table node, then it takes that value, otherwise an
+ * incrementing internal counter is used.
+ * @type string
+ * @default null
+ */
+ "sInstance": null,
+
+ /**
+ * tabindex attribute value that is added to DataTables control elements, allowing
+ * keyboard navigation of the table and its controls.
+ */
+ "iTabIndex": 0,
+
+ /**
+ * DIV container for the footer scrolling table if scrolling
+ */
+ "nScrollHead": null,
+
+ /**
+ * DIV container for the footer scrolling table if scrolling
+ */
+ "nScrollFoot": null,
+
+ /**
+ * Last applied sort
+ * @type array
+ * @default []
+ */
+ "aLastSort": [],
+
+ /**
+ * Stored plug-in instances
+ * @type object
+ * @default {}
+ */
+ "oPlugins": {},
+
+ /**
+ * Function used to get a row's id from the row's data
+ * @type function
+ * @default null
+ */
+ "rowIdFn": null,
+
+ /**
+ * Data location where to store a row's id
+ * @type string
+ * @default null
+ */
+ "rowId": null
+ };
+
+ /**
+ * Extension object for DataTables that is used to provide all extension
+ * options.
+ *
+ * Note that the `DataTable.ext` object is available through
+ * `jQuery.fn.dataTable.ext` where it may be accessed and manipulated. It is
+ * also aliased to `jQuery.fn.dataTableExt` for historic reasons.
+ * @namespace
+ * @extends DataTable.models.ext
+ */
+
+
+ /**
+ * DataTables extensions
+ *
+ * This namespace acts as a collection area for plug-ins that can be used to
+ * extend DataTables capabilities. Indeed many of the build in methods
+ * use this method to provide their own capabilities (sorting methods for
+ * example).
+ *
+ * Note that this namespace is aliased to `jQuery.fn.dataTableExt` for legacy
+ * reasons
+ *
+ * @namespace
+ */
+ DataTable.ext = _ext = {
+ /**
+ * Buttons. For use with the Buttons extension for DataTables. This is
+ * defined here so other extensions can define buttons regardless of load
+ * order. It is _not_ used by DataTables core.
+ *
+ * @type object
+ * @default {}
+ */
+ buttons: {},
+
+
+ /**
+ * Element class names
+ *
+ * @type object
+ * @default {}
+ */
+ classes: {},
+
+
+ /**
+ * DataTables build type (expanded by the download builder)
+ *
+ * @type string
+ */
+ builder: "-source-",
+
+
+ /**
+ * Error reporting.
+ *
+ * How should DataTables report an error. Can take the value 'alert',
+ * 'throw', 'none' or a function.
+ *
+ * @type string|function
+ * @default alert
+ */
+ errMode: "alert",
+
+
+ /**
+ * Feature plug-ins.
+ *
+ * This is an array of objects which describe the feature plug-ins that are
+ * available to DataTables. These feature plug-ins are then available for
+ * use through the `dom` initialisation option.
+ *
+ * Each feature plug-in is described by an object which must have the
+ * following properties:
+ *
+ * * `fnInit` - function that is used to initialise the plug-in,
+ * * `cFeature` - a character so the feature can be enabled by the `dom`
+ * instillation option. This is case sensitive.
+ *
+ * The `fnInit` function has the following input parameters:
+ *
+ * 1. `{object}` DataTables settings object: see
+ * {@link DataTable.models.oSettings}
+ *
+ * And the following return is expected:
+ *
+ * * {node|null} The element which contains your feature. Note that the
+ * return may also be void if your plug-in does not require to inject any
+ * DOM elements into DataTables control (`dom`) - for example this might
+ * be useful when developing a plug-in which allows table control via
+ * keyboard entry
+ *
+ * @type array
+ *
+ * @example
+ * $.fn.dataTable.ext.features.push( {
+ * "fnInit": function( oSettings ) {
+ * return new TableTools( { "oDTSettings": oSettings } );
+ * },
+ * "cFeature": "T"
+ * } );
+ */
+ feature: [],
+
+
+ /**
+ * Row searching.
+ *
+ * This method of searching is complimentary to the default type based
+ * searching, and a lot more comprehensive as it allows you complete control
+ * over the searching logic. Each element in this array is a function
+ * (parameters described below) that is called for every row in the table,
+ * and your logic decides if it should be included in the searching data set
+ * or not.
+ *
+ * Searching functions have the following input parameters:
+ *
+ * 1. `{object}` DataTables settings object: see
+ * {@link DataTable.models.oSettings}
+ * 2. `{array|object}` Data for the row to be processed (same as the
+ * original format that was passed in as the data source, or an array
+ * from a DOM data source
+ * 3. `{int}` Row index ({@link DataTable.models.oSettings.aoData}), which
+ * can be useful to retrieve the `TR` element if you need DOM interaction.
+ *
+ * And the following return is expected:
+ *
+ * * {boolean} Include the row in the searched result set (true) or not
+ * (false)
+ *
+ * Note that as with the main search ability in DataTables, technically this
+ * is "filtering", since it is subtractive. However, for consistency in
+ * naming we call it searching here.
+ *
+ * @type array
+ * @default []
+ *
+ * @example
+ * // The following example shows custom search being applied to the
+ * // fourth column (i.e. the data[3] index) based on two input values
+ * // from the end-user, matching the data in a certain range.
+ * $.fn.dataTable.ext.search.push(
+ * function( settings, data, dataIndex ) {
+ * var min = document.getElementById('min').value * 1;
+ * var max = document.getElementById('max').value * 1;
+ * var version = data[3] == "-" ? 0 : data[3]*1;
+ *
+ * if ( min == "" && max == "" ) {
+ * return true;
+ * }
+ * else if ( min == "" && version < max ) {
+ * return true;
+ * }
+ * else if ( min < version && "" == max ) {
+ * return true;
+ * }
+ * else if ( min < version && version < max ) {
+ * return true;
+ * }
+ * return false;
+ * }
+ * );
+ */
+ search: [],
+
+
+ /**
+ * Selector extensions
+ *
+ * The `selector` option can be used to extend the options available for the
+ * selector modifier options (`selector-modifier` object data type) that
+ * each of the three built in selector types offer (row, column and cell +
+ * their plural counterparts). For example the Select extension uses this
+ * mechanism to provide an option to select only rows, columns and cells
+ * that have been marked as selected by the end user (`{selected: true}`),
+ * which can be used in conjunction with the existing built in selector
+ * options.
+ *
+ * Each property is an array to which functions can be pushed. The functions
+ * take three attributes:
+ *
+ * * Settings object for the host table
+ * * Options object (`selector-modifier` object type)
+ * * Array of selected item indexes
+ *
+ * The return is an array of the resulting item indexes after the custom
+ * selector has been applied.
+ *
+ * @type object
+ */
+ selector: {
+ cell: [],
+ column: [],
+ row: []
+ },
+
+
+ /**
+ * Internal functions, exposed for used in plug-ins.
+ *
+ * Please note that you should not need to use the internal methods for
+ * anything other than a plug-in (and even then, try to avoid if possible).
+ * The internal function may change between releases.
+ *
+ * @type object
+ * @default {}
+ */
+ internal: {},
+
+
+ /**
+ * Legacy configuration options. Enable and disable legacy options that
+ * are available in DataTables.
+ *
+ * @type object
+ */
+ legacy: {
+ /**
+ * Enable / disable DataTables 1.9 compatible server-side processing
+ * requests
+ *
+ * @type boolean
+ * @default null
+ */
+ ajax: null
+ },
+
+
+ /**
+ * Pagination plug-in methods.
+ *
+ * Each entry in this object is a function and defines which buttons should
+ * be shown by the pagination rendering method that is used for the table:
+ * {@link DataTable.ext.renderer.pageButton}. The renderer addresses how the
+ * buttons are displayed in the document, while the functions here tell it
+ * what buttons to display. This is done by returning an array of button
+ * descriptions (what each button will do).
+ *
+ * Pagination types (the four built in options and any additional plug-in
+ * options defined here) can be used through the `paginationType`
+ * initialisation parameter.
+ *
+ * The functions defined take two parameters:
+ *
+ * 1. `{int} page` The current page index
+ * 2. `{int} pages` The number of pages in the table
+ *
+ * Each function is expected to return an array where each element of the
+ * array can be one of:
+ *
+ * * `first` - Jump to first page when activated
+ * * `last` - Jump to last page when activated
+ * * `previous` - Show previous page when activated
+ * * `next` - Show next page when activated
+ * * `{int}` - Show page of the index given
+ * * `{array}` - A nested array containing the above elements to add a
+ * containing 'DIV' element (might be useful for styling).
+ *
+ * Note that DataTables v1.9- used this object slightly differently whereby
+ * an object with two functions would be defined for each plug-in. That
+ * ability is still supported by DataTables 1.10+ to provide backwards
+ * compatibility, but this option of use is now decremented and no longer
+ * documented in DataTables 1.10+.
+ *
+ * @type object
+ * @default {}
+ *
+ * @example
+ * // Show previous, next and current page buttons only
+ * $.fn.dataTableExt.oPagination.current = function ( page, pages ) {
+ * return [ 'previous', page, 'next' ];
+ * };
+ */
+ pager: {},
+
+
+ renderer: {
+ pageButton: {},
+ header: {}
+ },
+
+
+ /**
+ * Ordering plug-ins - custom data source
+ *
+ * The extension options for ordering of data available here is complimentary
+ * to the default type based ordering that DataTables typically uses. It
+ * allows much greater control over the the data that is being used to
+ * order a column, but is necessarily therefore more complex.
+ *
+ * This type of ordering is useful if you want to do ordering based on data
+ * live from the DOM (for example the contents of an 'input' element) rather
+ * than just the static string that DataTables knows of.
+ *
+ * The way these plug-ins work is that you create an array of the values you
+ * wish to be ordering for the column in question and then return that
+ * array. The data in the array much be in the index order of the rows in
+ * the table (not the currently ordering order!). Which order data gathering
+ * function is run here depends on the `dt-init columns.orderDataType`
+ * parameter that is used for the column (if any).
+ *
+ * The functions defined take two parameters:
+ *
+ * 1. `{object}` DataTables settings object: see
+ * {@link DataTable.models.oSettings}
+ * 2. `{int}` Target column index
+ *
+ * Each function is expected to return an array:
+ *
+ * * `{array}` Data for the column to be ordering upon
+ *
+ * @type array
+ *
+ * @example
+ * // Ordering using `input` node values
+ * $.fn.dataTable.ext.order['dom-text'] = function ( settings, col )
+ * {
+ * return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
+ * return $('input', td).val();
+ * } );
+ * }
+ */
+ order: {},
+
+
+ /**
+ * Type based plug-ins.
+ *
+ * Each column in DataTables has a type assigned to it, either by automatic
+ * detection or by direct assignment using the `type` option for the column.
+ * The type of a column will effect how it is ordering and search (plug-ins
+ * can also make use of the column type if required).
+ *
+ * @namespace
+ */
+ type: {
+ /**
+ * Type detection functions.
+ *
+ * The functions defined in this object are used to automatically detect
+ * a column's type, making initialisation of DataTables super easy, even
+ * when complex data is in the table.
+ *
+ * The functions defined take two parameters:
+ *
+ * 1. `{*}` Data from the column cell to be analysed
+ * 2. `{settings}` DataTables settings object. This can be used to
+ * perform context specific type detection - for example detection
+ * based on language settings such as using a comma for a decimal
+ * place. Generally speaking the options from the settings will not
+ * be required
+ *
+ * Each function is expected to return:
+ *
+ * * `{string|null}` Data type detected, or null if unknown (and thus
+ * pass it on to the other type detection functions.
+ *
+ * @type array
+ *
+ * @example
+ * // Currency type detection plug-in:
+ * $.fn.dataTable.ext.type.detect.push(
+ * function ( data, settings ) {
+ * // Check the numeric part
+ * if ( ! $.isNumeric( data.substring(1) ) ) {
+ * return null;
+ * }
+ *
+ * // Check prefixed by currency
+ * if ( data.charAt(0) == '$' || data.charAt(0) == '&pound;' ) {
+ * return 'currency';
+ * }
+ * return null;
+ * }
+ * );
+ */
+ detect: [],
+
+
+ /**
+ * Type based search formatting.
+ *
+ * The type based searching functions can be used to pre-format the
+ * data to be search on. For example, it can be used to strip HTML
+ * tags or to de-format telephone numbers for numeric only searching.
+ *
+ * Note that is a search is not defined for a column of a given type,
+ * no search formatting will be performed.
+ *
+ * Pre-processing of searching data plug-ins - When you assign the sType
+ * for a column (or have it automatically detected for you by DataTables
+ * or a type detection plug-in), you will typically be using this for
+ * custom sorting, but it can also be used to provide custom searching
+ * by allowing you to pre-processing the data and returning the data in
+ * the format that should be searched upon. This is done by adding
+ * functions this object with a parameter name which matches the sType
+ * for that target column. This is the corollary of <i>afnSortData</i>
+ * for searching data.
+ *
+ * The functions defined take a single parameter:
+ *
+ * 1. `{*}` Data from the column cell to be prepared for searching
+ *
+ * Each function is expected to return:
+ *
+ * * `{string|null}` Formatted string that will be used for the searching.
+ *
+ * @type object
+ * @default {}
+ *
+ * @example
+ * $.fn.dataTable.ext.type.search['title-numeric'] = function ( d ) {
+ * return d.replace(/\n/g," ").replace( /<.*?>/g, "" );
+ * }
+ */
+ search: {},
+
+
+ /**
+ * Type based ordering.
+ *
+ * The column type tells DataTables what ordering to apply to the table
+ * when a column is sorted upon. The order for each type that is defined,
+ * is defined by the functions available in this object.
+ *
+ * Each ordering option can be described by three properties added to
+ * this object:
+ *
+ * * `{type}-pre` - Pre-formatting function
+ * * `{type}-asc` - Ascending order function
+ * * `{type}-desc` - Descending order function
+ *
+ * All three can be used together, only `{type}-pre` or only
+ * `{type}-asc` and `{type}-desc` together. It is generally recommended
+ * that only `{type}-pre` is used, as this provides the optimal
+ * implementation in terms of speed, although the others are provided
+ * for compatibility with existing Javascript sort functions.
+ *
+ * `{type}-pre`: Functions defined take a single parameter:
+ *
+ * 1. `{*}` Data from the column cell to be prepared for ordering
+ *
+ * And return:
+ *
+ * * `{*}` Data to be sorted upon
+ *
+ * `{type}-asc` and `{type}-desc`: Functions are typical Javascript sort
+ * functions, taking two parameters:
+ *
+ * 1. `{*}` Data to compare to the second parameter
+ * 2. `{*}` Data to compare to the first parameter
+ *
+ * And returning:
+ *
+ * * `{*}` Ordering match: <0 if first parameter should be sorted lower
+ * than the second parameter, ===0 if the two parameters are equal and
+ * >0 if the first parameter should be sorted height than the second
+ * parameter.
+ *
+ * @type object
+ * @default {}
+ *
+ * @example
+ * // Numeric ordering of formatted numbers with a pre-formatter
+ * $.extend( $.fn.dataTable.ext.type.order, {
+ * "string-pre": function(x) {
+ * a = (a === "-" || a === "") ? 0 : a.replace( /[^\d\-\.]/g, "" );
+ * return parseFloat( a );
+ * }
+ * } );
+ *
+ * @example
+ * // Case-sensitive string ordering, with no pre-formatting method
+ * $.extend( $.fn.dataTable.ext.order, {
+ * "string-case-asc": function(x,y) {
+ * return ((x < y) ? -1 : ((x > y) ? 1 : 0));
+ * },
+ * "string-case-desc": function(x,y) {
+ * return ((x < y) ? 1 : ((x > y) ? -1 : 0));
+ * }
+ * } );
+ */
+ order: {}
+ },
+
+ /**
+ * Unique DataTables instance counter
+ *
+ * @type int
+ * @private
+ */
+ _unique: 0,
+
+
+ //
+ // Depreciated
+ // The following properties are retained for backwards compatiblity only.
+ // The should not be used in new projects and will be removed in a future
+ // version
+ //
+
+ /**
+ * Version check function.
+ * @type function
+ * @depreciated Since 1.10
+ */
+ fnVersionCheck: DataTable.fnVersionCheck,
+
+
+ /**
+ * Index for what 'this' index API functions should use
+ * @type int
+ * @deprecated Since v1.10
+ */
+ iApiIndex: 0,
+
+
+ /**
+ * jQuery UI class container
+ * @type object
+ * @deprecated Since v1.10
+ */
+ oJUIClasses: {},
+
+
+ /**
+ * Software version
+ * @type string
+ * @deprecated Since v1.10
+ */
+ sVersion: DataTable.version
+ };
+
+
+ //
+ // Backwards compatibility. Alias to pre 1.10 Hungarian notation counter parts
+ //
+ $.extend( _ext, {
+ afnFiltering: _ext.search,
+ aTypes: _ext.type.detect,
+ ofnSearch: _ext.type.search,
+ oSort: _ext.type.order,
+ afnSortData: _ext.order,
+ aoFeatures: _ext.feature,
+ oApi: _ext.internal,
+ oStdClasses: _ext.classes,
+ oPagination: _ext.pager
+ } );
+
+
+ $.extend( DataTable.ext.classes, {
+ "sTable": "dataTable",
+ "sNoFooter": "no-footer",
+
+ /* Paging buttons */
+ "sPageButton": "paginate_button",
+ "sPageButtonActive": "current",
+ "sPageButtonDisabled": "disabled",
+
+ /* Striping classes */
+ "sStripeOdd": "odd",
+ "sStripeEven": "even",
+
+ /* Empty row */
+ "sRowEmpty": "dataTables_empty",
+
+ /* Features */
+ "sWrapper": "dataTables_wrapper",
+ "sFilter": "dataTables_filter",
+ "sInfo": "dataTables_info",
+ "sPaging": "dataTables_paginate paging_", /* Note that the type is postfixed */
+ "sLength": "dataTables_length",
+ "sProcessing": "dataTables_processing",
+
+ /* Sorting */
+ "sSortAsc": "sorting_asc",
+ "sSortDesc": "sorting_desc",
+ "sSortable": "sorting", /* Sortable in both directions */
+ "sSortableAsc": "sorting_asc_disabled",
+ "sSortableDesc": "sorting_desc_disabled",
+ "sSortableNone": "sorting_disabled",
+ "sSortColumn": "sorting_", /* Note that an int is postfixed for the sorting order */
+
+ /* Filtering */
+ "sFilterInput": "",
+
+ /* Page length */
+ "sLengthSelect": "",
+
+ /* Scrolling */
+ "sScrollWrapper": "dataTables_scroll",
+ "sScrollHead": "dataTables_scrollHead",
+ "sScrollHeadInner": "dataTables_scrollHeadInner",
+ "sScrollBody": "dataTables_scrollBody",
+ "sScrollFoot": "dataTables_scrollFoot",
+ "sScrollFootInner": "dataTables_scrollFootInner",
+
+ /* Misc */
+ "sHeaderTH": "",
+ "sFooterTH": "",
+
+ // Deprecated
+ "sSortJUIAsc": "",
+ "sSortJUIDesc": "",
+ "sSortJUI": "",
+ "sSortJUIAscAllowed": "",
+ "sSortJUIDescAllowed": "",
+ "sSortJUIWrapper": "",
+ "sSortIcon": "",
+ "sJUIHeader": "",
+ "sJUIFooter": ""
+ } );
+
+
+ (function() {
+
+ // Reused strings for better compression. Closure compiler appears to have a
+ // weird edge case where it is trying to expand strings rather than use the
+ // variable version. This results in about 200 bytes being added, for very
+ // little preference benefit since it this run on script load only.
+ var _empty = '';
+ _empty = '';
+
+ var _stateDefault = _empty + 'ui-state-default';
+ var _sortIcon = _empty + 'css_right ui-icon ui-icon-';
+ var _headerFooter = _empty + 'fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix';
+
+ $.extend( DataTable.ext.oJUIClasses, DataTable.ext.classes, {
+ /* Full numbers paging buttons */
+ "sPageButton": "fg-button ui-button "+_stateDefault,
+ "sPageButtonActive": "ui-state-disabled",
+ "sPageButtonDisabled": "ui-state-disabled",
+
+ /* Features */
+ "sPaging": "dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi "+
+ "ui-buttonset-multi paging_", /* Note that the type is postfixed */
+
+ /* Sorting */
+ "sSortAsc": _stateDefault+" sorting_asc",
+ "sSortDesc": _stateDefault+" sorting_desc",
+ "sSortable": _stateDefault+" sorting",
+ "sSortableAsc": _stateDefault+" sorting_asc_disabled",
+ "sSortableDesc": _stateDefault+" sorting_desc_disabled",
+ "sSortableNone": _stateDefault+" sorting_disabled",
+ "sSortJUIAsc": _sortIcon+"triangle-1-n",
+ "sSortJUIDesc": _sortIcon+"triangle-1-s",
+ "sSortJUI": _sortIcon+"carat-2-n-s",
+ "sSortJUIAscAllowed": _sortIcon+"carat-1-n",
+ "sSortJUIDescAllowed": _sortIcon+"carat-1-s",
+ "sSortJUIWrapper": "DataTables_sort_wrapper",
+ "sSortIcon": "DataTables_sort_icon",
+
+ /* Scrolling */
+ "sScrollHead": "dataTables_scrollHead "+_stateDefault,
+ "sScrollFoot": "dataTables_scrollFoot "+_stateDefault,
+
+ /* Misc */
+ "sHeaderTH": _stateDefault,
+ "sFooterTH": _stateDefault,
+ "sJUIHeader": _headerFooter+" ui-corner-tl ui-corner-tr",
+ "sJUIFooter": _headerFooter+" ui-corner-bl ui-corner-br"
+ } );
+
+ }());
+
+
+
+ var extPagination = DataTable.ext.pager;
+
+ function _numbers ( page, pages ) {
+ var
+ numbers = [],
+ buttons = extPagination.numbers_length,
+ half = Math.floor( buttons / 2 ),
+ i = 1;
+
+ if ( pages <= buttons ) {
+ numbers = _range( 0, pages );
+ }
+ else if ( page <= half ) {
+ numbers = _range( 0, buttons-2 );
+ numbers.push( 'ellipsis' );
+ numbers.push( pages-1 );
+ }
+ else if ( page >= pages - 1 - half ) {
+ numbers = _range( pages-(buttons-2), pages );
+ numbers.splice( 0, 0, 'ellipsis' ); // no unshift in ie6
+ numbers.splice( 0, 0, 0 );
+ }
+ else {
+ numbers = _range( page-half+2, page+half-1 );
+ numbers.push( 'ellipsis' );
+ numbers.push( pages-1 );
+ numbers.splice( 0, 0, 'ellipsis' );
+ numbers.splice( 0, 0, 0 );
+ }
+
+ numbers.DT_el = 'span';
+ return numbers;
+ }
+
+
+ $.extend( extPagination, {
+ simple: function ( page, pages ) {
+ return [ 'previous', 'next' ];
+ },
+
+ full: function ( page, pages ) {
+ return [ 'first', 'previous', 'next', 'last' ];
+ },
+
+ numbers: function ( page, pages ) {
+ return [ _numbers(page, pages) ];
+ },
+
+ simple_numbers: function ( page, pages ) {
+ return [ 'previous', _numbers(page, pages), 'next' ];
+ },
+
+ full_numbers: function ( page, pages ) {
+ return [ 'first', 'previous', _numbers(page, pages), 'next', 'last' ];
+ },
+
+ // For testing and plug-ins to use
+ _numbers: _numbers,
+
+ // Number of number buttons (including ellipsis) to show. _Must be odd!_
+ numbers_length: 7
+ } );
+
+
+ $.extend( true, DataTable.ext.renderer, {
+ pageButton: {
+ _: function ( settings, host, idx, buttons, page, pages ) {
+ var classes = settings.oClasses;
+ var lang = settings.oLanguage.oPaginate;
+ var aria = settings.oLanguage.oAria.paginate || {};
+ var btnDisplay, btnClass, counter=0;
+
+ var attach = function( container, buttons ) {
+ var i, ien, node, button;
+ var clickHandler = function ( e ) {
+ _fnPageChange( settings, e.data.action, true );
+ };
+
+ for ( i=0, ien=buttons.length ; i<ien ; i++ ) {
+ button = buttons[i];
+
+ if ( $.isArray( button ) ) {
+ var inner = $( '<'+(button.DT_el || 'div')+'/>' )
+ .appendTo( container );
+ attach( inner, button );
+ }
+ else {
+ btnDisplay = null;
+ btnClass = '';
+
+ switch ( button ) {
+ case 'ellipsis':
+ container.append('<span class="ellipsis">&#x2026;</span>');
+ break;
+
+ case 'first':
+ btnDisplay = lang.sFirst;
+ btnClass = button + (page > 0 ?
+ '' : ' '+classes.sPageButtonDisabled);
+ break;
+
+ case 'previous':
+ btnDisplay = lang.sPrevious;
+ btnClass = button + (page > 0 ?
+ '' : ' '+classes.sPageButtonDisabled);
+ break;
+
+ case 'next':
+ btnDisplay = lang.sNext;
+ btnClass = button + (page < pages-1 ?
+ '' : ' '+classes.sPageButtonDisabled);
+ break;
+
+ case 'last':
+ btnDisplay = lang.sLast;
+ btnClass = button + (page < pages-1 ?
+ '' : ' '+classes.sPageButtonDisabled);
+ break;
+
+ default:
+ btnDisplay = button + 1;
+ btnClass = page === button ?
+ classes.sPageButtonActive : '';
+ break;
+ }
+
+ if ( btnDisplay !== null ) {
+ node = $('<a>', {
+ 'class': classes.sPageButton+' '+btnClass,
+ 'aria-controls': settings.sTableId,
+ 'aria-label': aria[ button ],
+ 'data-dt-idx': counter,
+ 'tabindex': settings.iTabIndex,
+ 'id': idx === 0 && typeof button === 'string' ?
+ settings.sTableId +'_'+ button :
+ null
+ } )
+ .html( btnDisplay )
+ .appendTo( container );
+
+ _fnBindAction(
+ node, {action: button}, clickHandler
+ );
+
+ counter++;
+ }
+ }
+ }
+ };
+
+ // IE9 throws an 'unknown error' if document.activeElement is used
+ // inside an iframe or frame. Try / catch the error. Not good for
+ // accessibility, but neither are frames.
+ var activeEl;
+
+ try {
+ // Because this approach is destroying and recreating the paging
+ // elements, focus is lost on the select button which is bad for
+ // accessibility. So we want to restore focus once the draw has
+ // completed
+ activeEl = $(host).find(document.activeElement).data('dt-idx');
+ }
+ catch (e) {}
+
+ attach( $(host).empty(), buttons );
+
+ if ( activeEl ) {
+ $(host).find( '[data-dt-idx='+activeEl+']' ).focus();
+ }
+ }
+ }
+ } );
+
+
+
+ // Built in type detection. See model.ext.aTypes for information about
+ // what is required from this methods.
+ $.extend( DataTable.ext.type.detect, [
+ // Plain numbers - first since V8 detects some plain numbers as dates
+ // e.g. Date.parse('55') (but not all, e.g. Date.parse('22')...).
+ function ( d, settings )
+ {
+ var decimal = settings.oLanguage.sDecimal;
+ return _isNumber( d, decimal ) ? 'num'+decimal : null;
+ },
+
+ // Dates (only those recognised by the browser's Date.parse)
+ function ( d, settings )
+ {
+ // V8 will remove any unknown characters at the start and end of the
+ // expression, leading to false matches such as `$245.12` or `10%` being
+ // a valid date. See forum thread 18941 for detail.
+ if ( d && !(d instanceof Date) && ( ! _re_date_start.test(d) || ! _re_date_end.test(d) ) ) {
+ return null;
+ }
+ var parsed = Date.parse(d);
+ return (parsed !== null && !isNaN(parsed)) || _empty(d) ? 'date' : null;
+ },
+
+ // Formatted numbers
+ function ( d, settings )
+ {
+ var decimal = settings.oLanguage.sDecimal;
+ return _isNumber( d, decimal, true ) ? 'num-fmt'+decimal : null;
+ },
+
+ // HTML numeric
+ function ( d, settings )
+ {
+ var decimal = settings.oLanguage.sDecimal;
+ return _htmlNumeric( d, decimal ) ? 'html-num'+decimal : null;
+ },
+
+ // HTML numeric, formatted
+ function ( d, settings )
+ {
+ var decimal = settings.oLanguage.sDecimal;
+ return _htmlNumeric( d, decimal, true ) ? 'html-num-fmt'+decimal : null;
+ },
+
+ // HTML (this is strict checking - there must be html)
+ function ( d, settings )
+ {
+ return _empty( d ) || (typeof d === 'string' && d.indexOf('<') !== -1) ?
+ 'html' : null;
+ }
+ ] );
+
+
+
+ // Filter formatting functions. See model.ext.ofnSearch for information about
+ // what is required from these methods.
+ //
+ // Note that additional search methods are added for the html numbers and
+ // html formatted numbers by `_addNumericSort()` when we know what the decimal
+ // place is
+
+
+ $.extend( DataTable.ext.type.search, {
+ html: function ( data ) {
+ return _empty(data) ?
+ data :
+ typeof data === 'string' ?
+ data
+ .replace( _re_new_lines, " " )
+ .replace( _re_html, "" ) :
+ '';
+ },
+
+ string: function ( data ) {
+ return _empty(data) ?
+ data :
+ typeof data === 'string' ?
+ data.replace( _re_new_lines, " " ) :
+ data;
+ }
+ } );
+
+
+
+ var __numericReplace = function ( d, decimalPlace, re1, re2 ) {
+ if ( d !== 0 && (!d || d === '-') ) {
+ return -Infinity;
+ }
+
+ // If a decimal place other than `.` is used, it needs to be given to the
+ // function so we can detect it and replace with a `.` which is the only
+ // decimal place Javascript recognises - it is not locale aware.
+ if ( decimalPlace ) {
+ d = _numToDecimal( d, decimalPlace );
+ }
+
+ if ( d.replace ) {
+ if ( re1 ) {
+ d = d.replace( re1, '' );
+ }
+
+ if ( re2 ) {
+ d = d.replace( re2, '' );
+ }
+ }
+
+ return d * 1;
+ };
+
+
+ // Add the numeric 'deformatting' functions for sorting and search. This is done
+ // in a function to provide an easy ability for the language options to add
+ // additional methods if a non-period decimal place is used.
+ function _addNumericSort ( decimalPlace ) {
+ $.each(
+ {
+ // Plain numbers
+ "num": function ( d ) {
+ return __numericReplace( d, decimalPlace );
+ },
+
+ // Formatted numbers
+ "num-fmt": function ( d ) {
+ return __numericReplace( d, decimalPlace, _re_formatted_numeric );
+ },
+
+ // HTML numeric
+ "html-num": function ( d ) {
+ return __numericReplace( d, decimalPlace, _re_html );
+ },
+
+ // HTML numeric, formatted
+ "html-num-fmt": function ( d ) {
+ return __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );
+ }
+ },
+ function ( key, fn ) {
+ // Add the ordering method
+ _ext.type.order[ key+decimalPlace+'-pre' ] = fn;
+
+ // For HTML types add a search formatter that will strip the HTML
+ if ( key.match(/^html\-/) ) {
+ _ext.type.search[ key+decimalPlace ] = _ext.type.search.html;
+ }
+ }
+ );
+ }
+
+
+ // Default sort methods
+ $.extend( _ext.type.order, {
+ // Dates
+ "date-pre": function ( d ) {
+ return Date.parse( d ) || 0;
+ },
+
+ // html
+ "html-pre": function ( a ) {
+ return _empty(a) ?
+ '' :
+ a.replace ?
+ a.replace( /<.*?>/g, "" ).toLowerCase() :
+ a+'';
+ },
+
+ // string
+ "string-pre": function ( a ) {
+ // This is a little complex, but faster than always calling toString,
+ // http://jsperf.com/tostring-v-check
+ return _empty(a) ?
+ '' :
+ typeof a === 'string' ?
+ a.toLowerCase() :
+ ! a.toString ?
+ '' :
+ a.toString();
+ },
+
+ // string-asc and -desc are retained only for compatibility with the old
+ // sort methods
+ "string-asc": function ( x, y ) {
+ return ((x < y) ? -1 : ((x > y) ? 1 : 0));
+ },
+
+ "string-desc": function ( x, y ) {
+ return ((x < y) ? 1 : ((x > y) ? -1 : 0));
+ }
+ } );
+
+
+ // Numeric sorting types - order doesn't matter here
+ _addNumericSort( '' );
+
+
+ $.extend( true, DataTable.ext.renderer, {
+ header: {
+ _: function ( settings, cell, column, classes ) {
+ // No additional mark-up required
+ // Attach a sort listener to update on sort - note that using the
+ // `DT` namespace will allow the event to be removed automatically
+ // on destroy, while the `dt` namespaced event is the one we are
+ // listening for
+ $(settings.nTable).on( 'order.dt.DT', function ( e, ctx, sorting, columns ) {
+ if ( settings !== ctx ) { // need to check this this is the host
+ return; // table, not a nested one
+ }
+
+ var colIdx = column.idx;
+
+ cell
+ .removeClass(
+ column.sSortingClass +' '+
+ classes.sSortAsc +' '+
+ classes.sSortDesc
+ )
+ .addClass( columns[ colIdx ] == 'asc' ?
+ classes.sSortAsc : columns[ colIdx ] == 'desc' ?
+ classes.sSortDesc :
+ column.sSortingClass
+ );
+ } );
+ },
+
+ jqueryui: function ( settings, cell, column, classes ) {
+ $('<div/>')
+ .addClass( classes.sSortJUIWrapper )
+ .append( cell.contents() )
+ .append( $('<span/>')
+ .addClass( classes.sSortIcon+' '+column.sSortingClassJUI )
+ )
+ .appendTo( cell );
+
+ // Attach a sort listener to update on sort
+ $(settings.nTable).on( 'order.dt.DT', function ( e, ctx, sorting, columns ) {
+ if ( settings !== ctx ) {
+ return;
+ }
+
+ var colIdx = column.idx;
+
+ cell
+ .removeClass( classes.sSortAsc +" "+classes.sSortDesc )
+ .addClass( columns[ colIdx ] == 'asc' ?
+ classes.sSortAsc : columns[ colIdx ] == 'desc' ?
+ classes.sSortDesc :
+ column.sSortingClass
+ );
+
+ cell
+ .find( 'span.'+classes.sSortIcon )
+ .removeClass(
+ classes.sSortJUIAsc +" "+
+ classes.sSortJUIDesc +" "+
+ classes.sSortJUI +" "+
+ classes.sSortJUIAscAllowed +" "+
+ classes.sSortJUIDescAllowed
+ )
+ .addClass( columns[ colIdx ] == 'asc' ?
+ classes.sSortJUIAsc : columns[ colIdx ] == 'desc' ?
+ classes.sSortJUIDesc :
+ column.sSortingClassJUI
+ );
+ } );
+ }
+ }
+ } );
+
+ /*
+ * Public helper functions. These aren't used internally by DataTables, or
+ * called by any of the options passed into DataTables, but they can be used
+ * externally by developers working with DataTables. They are helper functions
+ * to make working with DataTables a little bit easier.
+ */
+
+ var __htmlEscapeEntities = function ( d ) {
+ return typeof d === 'string' ?
+ d.replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;') :
+ d;
+ };
+
+ /**
+ * Helpers for `columns.render`.
+ *
+ * The options defined here can be used with the `columns.render` initialisation
+ * option to provide a display renderer. The following functions are defined:
+ *
+ * * `number` - Will format numeric data (defined by `columns.data`) for
+ * display, retaining the original unformatted data for sorting and filtering.
+ * It takes 5 parameters:
+ * * `string` - Thousands grouping separator
+ * * `string` - Decimal point indicator
+ * * `integer` - Number of decimal points to show
+ * * `string` (optional) - Prefix.
+ * * `string` (optional) - Postfix (/suffix).
+ * * `text` - Escape HTML to help prevent XSS attacks. It has no optional
+ * parameters.
+ *
+ * @example
+ * // Column definition using the number renderer
+ * {
+ * data: "salary",
+ * render: $.fn.dataTable.render.number( '\'', '.', 0, '$' )
+ * }
+ *
+ * @namespace
+ */
+ DataTable.render = {
+ number: function ( thousands, decimal, precision, prefix, postfix ) {
+ return {
+ display: function ( d ) {
+ if ( typeof d !== 'number' && typeof d !== 'string' ) {
+ return d;
+ }
+
+ var negative = d < 0 ? '-' : '';
+ var flo = parseFloat( d );
+
+ // If NaN then there isn't much formatting that we can do - just
+ // return immediately, escaping any HTML (this was supposed to
+ // be a number after all)
+ if ( isNaN( flo ) ) {
+ return __htmlEscapeEntities( d );
+ }
+
+ d = Math.abs( flo );
+
+ var intPart = parseInt( d, 10 );
+ var floatPart = precision ?
+ decimal+(d - intPart).toFixed( precision ).substring( 2 ):
+ '';
+
+ return negative + (prefix||'') +
+ intPart.toString().replace(
+ /\B(?=(\d{3})+(?!\d))/g, thousands
+ ) +
+ floatPart +
+ (postfix||'');
+ }
+ };
+ },
+
+ text: function () {
+ return {
+ display: __htmlEscapeEntities
+ };
+ }
+ };
+
+
+ /*
+ * This is really a good bit rubbish this method of exposing the internal methods
+ * publicly... - To be fixed in 2.0 using methods on the prototype
+ */
+
+
+ /**
+ * Create a wrapper function for exporting an internal functions to an external API.
+ * @param {string} fn API function name
+ * @returns {function} wrapped function
+ * @memberof DataTable#internal
+ */
+ function _fnExternApiFunc (fn)
+ {
+ return function() {
+ var args = [_fnSettingsFromNode( this[DataTable.ext.iApiIndex] )].concat(
+ Array.prototype.slice.call(arguments)
+ );
+ return DataTable.ext.internal[fn].apply( this, args );
+ };
+ }
+
+
+ /**
+ * Reference to internal functions for use by plug-in developers. Note that
+ * these methods are references to internal functions and are considered to be
+ * private. If you use these methods, be aware that they are liable to change
+ * between versions.
+ * @namespace
+ */
+ $.extend( DataTable.ext.internal, {
+ _fnExternApiFunc: _fnExternApiFunc,
+ _fnBuildAjax: _fnBuildAjax,
+ _fnAjaxUpdate: _fnAjaxUpdate,
+ _fnAjaxParameters: _fnAjaxParameters,
+ _fnAjaxUpdateDraw: _fnAjaxUpdateDraw,
+ _fnAjaxDataSrc: _fnAjaxDataSrc,
+ _fnAddColumn: _fnAddColumn,
+ _fnColumnOptions: _fnColumnOptions,
+ _fnAdjustColumnSizing: _fnAdjustColumnSizing,
+ _fnVisibleToColumnIndex: _fnVisibleToColumnIndex,
+ _fnColumnIndexToVisible: _fnColumnIndexToVisible,
+ _fnVisbleColumns: _fnVisbleColumns,
+ _fnGetColumns: _fnGetColumns,
+ _fnColumnTypes: _fnColumnTypes,
+ _fnApplyColumnDefs: _fnApplyColumnDefs,
+ _fnHungarianMap: _fnHungarianMap,
+ _fnCamelToHungarian: _fnCamelToHungarian,
+ _fnLanguageCompat: _fnLanguageCompat,
+ _fnBrowserDetect: _fnBrowserDetect,
+ _fnAddData: _fnAddData,
+ _fnAddTr: _fnAddTr,
+ _fnNodeToDataIndex: _fnNodeToDataIndex,
+ _fnNodeToColumnIndex: _fnNodeToColumnIndex,
+ _fnGetCellData: _fnGetCellData,
+ _fnSetCellData: _fnSetCellData,
+ _fnSplitObjNotation: _fnSplitObjNotation,
+ _fnGetObjectDataFn: _fnGetObjectDataFn,
+ _fnSetObjectDataFn: _fnSetObjectDataFn,
+ _fnGetDataMaster: _fnGetDataMaster,
+ _fnClearTable: _fnClearTable,
+ _fnDeleteIndex: _fnDeleteIndex,
+ _fnInvalidate: _fnInvalidate,
+ _fnGetRowElements: _fnGetRowElements,
+ _fnCreateTr: _fnCreateTr,
+ _fnBuildHead: _fnBuildHead,
+ _fnDrawHead: _fnDrawHead,
+ _fnDraw: _fnDraw,
+ _fnReDraw: _fnReDraw,
+ _fnAddOptionsHtml: _fnAddOptionsHtml,
+ _fnDetectHeader: _fnDetectHeader,
+ _fnGetUniqueThs: _fnGetUniqueThs,
+ _fnFeatureHtmlFilter: _fnFeatureHtmlFilter,
+ _fnFilterComplete: _fnFilterComplete,
+ _fnFilterCustom: _fnFilterCustom,
+ _fnFilterColumn: _fnFilterColumn,
+ _fnFilter: _fnFilter,
+ _fnFilterCreateSearch: _fnFilterCreateSearch,
+ _fnEscapeRegex: _fnEscapeRegex,
+ _fnFilterData: _fnFilterData,
+ _fnFeatureHtmlInfo: _fnFeatureHtmlInfo,
+ _fnUpdateInfo: _fnUpdateInfo,
+ _fnInfoMacros: _fnInfoMacros,
+ _fnInitialise: _fnInitialise,
+ _fnInitComplete: _fnInitComplete,
+ _fnLengthChange: _fnLengthChange,
+ _fnFeatureHtmlLength: _fnFeatureHtmlLength,
+ _fnFeatureHtmlPaginate: _fnFeatureHtmlPaginate,
+ _fnPageChange: _fnPageChange,
+ _fnFeatureHtmlProcessing: _fnFeatureHtmlProcessing,
+ _fnProcessingDisplay: _fnProcessingDisplay,
+ _fnFeatureHtmlTable: _fnFeatureHtmlTable,
+ _fnScrollDraw: _fnScrollDraw,
+ _fnApplyToChildren: _fnApplyToChildren,
+ _fnCalculateColumnWidths: _fnCalculateColumnWidths,
+ _fnThrottle: _fnThrottle,
+ _fnConvertToWidth: _fnConvertToWidth,
+ _fnGetWidestNode: _fnGetWidestNode,
+ _fnGetMaxLenString: _fnGetMaxLenString,
+ _fnStringToCss: _fnStringToCss,
+ _fnSortFlatten: _fnSortFlatten,
+ _fnSort: _fnSort,
+ _fnSortAria: _fnSortAria,
+ _fnSortListener: _fnSortListener,
+ _fnSortAttachListener: _fnSortAttachListener,
+ _fnSortingClasses: _fnSortingClasses,
+ _fnSortData: _fnSortData,
+ _fnSaveState: _fnSaveState,
+ _fnLoadState: _fnLoadState,
+ _fnSettingsFromNode: _fnSettingsFromNode,
+ _fnLog: _fnLog,
+ _fnMap: _fnMap,
+ _fnBindAction: _fnBindAction,
+ _fnCallbackReg: _fnCallbackReg,
+ _fnCallbackFire: _fnCallbackFire,
+ _fnLengthOverflow: _fnLengthOverflow,
+ _fnRenderer: _fnRenderer,
+ _fnDataSource: _fnDataSource,
+ _fnRowAttributes: _fnRowAttributes,
+ _fnCalculateEnd: function () {} // Used by a lot of plug-ins, but redundant
+ // in 1.10, so this dead-end function is
+ // added to prevent errors
+ } );
+
+
+ // jQuery access
+ $.fn.dataTable = DataTable;
+
+ // Provide access to the host jQuery object (circular reference)
+ DataTable.$ = $;
+
+ // Legacy aliases
+ $.fn.dataTableSettings = DataTable.settings;
+ $.fn.dataTableExt = DataTable.ext;
+
+ // With a capital `D` we return a DataTables API instance rather than a
+ // jQuery object
+ $.fn.DataTable = function ( opts ) {
+ return $(this).dataTable( opts ).api();
+ };
+
+ // All properties that are available to $.fn.dataTable should also be
+ // available on $.fn.DataTable
+ $.each( DataTable, function ( prop, val ) {
+ $.fn.DataTable[ prop ] = val;
+ } );
+
+
+ // Information about events fired by DataTables - for documentation.
+ /**
+ * Draw event, fired whenever the table is redrawn on the page, at the same
+ * point as fnDrawCallback. This may be useful for binding events or
+ * performing calculations when the table is altered at all.
+ * @name DataTable#draw.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ */
+
+ /**
+ * Search event, fired when the searching applied to the table (using the
+ * built-in global search, or column filters) is altered.
+ * @name DataTable#search.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ */
+
+ /**
+ * Page change event, fired when the paging of the table is altered.
+ * @name DataTable#page.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ */
+
+ /**
+ * Order event, fired when the ordering applied to the table is altered.
+ * @name DataTable#order.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ */
+
+ /**
+ * DataTables initialisation complete event, fired when the table is fully
+ * drawn, including Ajax data loaded, if Ajax data is required.
+ * @name DataTable#init.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} oSettings DataTables settings object
+ * @param {object} json The JSON object request from the server - only
+ * present if client-side Ajax sourced data is used</li></ol>
+ */
+
+ /**
+ * State save event, fired when the table has changed state a new state save
+ * is required. This event allows modification of the state saving object
+ * prior to actually doing the save, including addition or other state
+ * properties (for plug-ins) or modification of a DataTables core property.
+ * @name DataTable#stateSaveParams.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} oSettings DataTables settings object
+ * @param {object} json The state information to be saved
+ */
+
+ /**
+ * State load event, fired when the table is loading state from the stored
+ * data, but prior to the settings object being modified by the saved state
+ * - allowing modification of the saved state is required or loading of
+ * state for a plug-in.
+ * @name DataTable#stateLoadParams.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} oSettings DataTables settings object
+ * @param {object} json The saved state information
+ */
+
+ /**
+ * State loaded event, fired when state has been loaded from stored data and
+ * the settings object has been modified by the loaded data.
+ * @name DataTable#stateLoaded.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} oSettings DataTables settings object
+ * @param {object} json The saved state information
+ */
+
+ /**
+ * Processing event, fired when DataTables is doing some kind of processing
+ * (be it, order, searcg or anything else). It can be used to indicate to
+ * the end user that there is something happening, or that something has
+ * finished.
+ * @name DataTable#processing.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} oSettings DataTables settings object
+ * @param {boolean} bShow Flag for if DataTables is doing processing or not
+ */
+
+ /**
+ * Ajax (XHR) event, fired whenever an Ajax request is completed from a
+ * request to made to the server for new data. This event is called before
+ * DataTables processed the returned data, so it can also be used to pre-
+ * process the data returned from the server, if needed.
+ *
+ * Note that this trigger is called in `fnServerData`, if you override
+ * `fnServerData` and which to use this event, you need to trigger it in you
+ * success function.
+ * @name DataTable#xhr.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ * @param {object} json JSON returned from the server
+ *
+ * @example
+ * // Use a custom property returned from the server in another DOM element
+ * $('#table').dataTable().on('xhr.dt', function (e, settings, json) {
+ * $('#status').html( json.status );
+ * } );
+ *
+ * @example
+ * // Pre-process the data returned from the server
+ * $('#table').dataTable().on('xhr.dt', function (e, settings, json) {
+ * for ( var i=0, ien=json.aaData.length ; i<ien ; i++ ) {
+ * json.aaData[i].sum = json.aaData[i].one + json.aaData[i].two;
+ * }
+ * // Note no return - manipulate the data directly in the JSON object.
+ * } );
+ */
+
+ /**
+ * Destroy event, fired when the DataTable is destroyed by calling fnDestroy
+ * or passing the bDestroy:true parameter in the initialisation object. This
+ * can be used to remove bound events, added DOM nodes, etc.
+ * @name DataTable#destroy.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ */
+
+ /**
+ * Page length change event, fired when number of records to show on each
+ * page (the length) is changed.
+ * @name DataTable#length.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ * @param {integer} len New length
+ */
+
+ /**
+ * Column sizing has changed.
+ * @name DataTable#column-sizing.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ */
+
+ /**
+ * Column visibility has changed.
+ * @name DataTable#column-visibility.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ * @param {int} column Column index
+ * @param {bool} vis `false` if column now hidden, or `true` if visible
+ */
+
+ return $.fn.dataTable;
+}));
diff --git a/common/src/main/webapp/thirdparty/data-tables/jquery.dataTables.min.css b/common/src/main/webapp/thirdparty/data-tables/jquery.dataTables.min.css
new file mode 100644
index 0000000..b6fb737
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/data-tables/jquery.dataTables.min.css
@@ -0,0 +1 @@
+table.dataTable{width:100%;margin:0 auto;clear:both;border-collapse:separate;border-spacing:0}table.dataTable thead th,table.dataTable tfoot th{font-weight:bold}table.dataTable thead th,table.dataTable thead td{padding:10px 18px;border-bottom:1px solid #111}table.dataTable thead th:active,table.dataTable thead td:active{outline:none}table.dataTable tfoot th,table.dataTable tfoot td{padding:10px 18px 6px 18px;border-top:1px solid #111}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc{cursor:pointer;*cursor:hand}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{background-repeat:no-repeat;background-position:center right}table.dataTable thead .sorting{background-image:url("../images/sort_both.png")}table.dataTable thead .sorting_asc{background-image:url("../images/sort_asc.png")}table.dataTable thead .sorting_desc{background-image:url("../images/sort_desc.png")}table.dataTable thead .sorting_asc_disabled{background-image:url("../images/sort_asc_disabled.png")}table.dataTable thead .sorting_desc_disabled{background-image:url("../images/sort_desc_disabled.png")}table.dataTable tbody tr{background-color:#ffffff}table.dataTable tbody tr.selected{background-color:#B0BED9}table.dataTable tbody th,table.dataTable tbody td{padding:8px 10px}table.dataTable.row-border tbody th,table.dataTable.row-border tbody td,table.dataTable.display tbody th,table.dataTable.display tbody td{border-top:1px solid #ddd}table.dataTable.row-border tbody tr:first-child th,table.dataTable.row-border tbody tr:first-child td,table.dataTable.display tbody tr:first-child th,table.dataTable.display tbody tr:first-child td{border-top:none}table.dataTable.cell-border tbody th,table.dataTable.cell-border tbody td{border-top:1px solid #ddd;border-right:1px solid #ddd}table.dataTable.cell-border tbody tr th:first-child,table.dataTable.cell-border tbody tr td:first-child{border-left:1px solid #ddd}table.dataTable.cell-border tbody tr:first-child th,table.dataTable.cell-border tbody tr:first-child td{border-top:none}table.dataTable.stripe tbody tr.odd,table.dataTable.display tbody tr.odd{background-color:#f9f9f9}table.dataTable.stripe tbody tr.odd.selected,table.dataTable.display tbody tr.odd.selected{background-color:#acbad4}table.dataTable.hover tbody tr:hover,table.dataTable.display tbody tr:hover{background-color:#f6f6f6}table.dataTable.hover tbody tr:hover.selected,table.dataTable.display tbody tr:hover.selected{background-color:#aab7d1}table.dataTable.order-column tbody tr>.sorting_1,table.dataTable.order-column tbody tr>.sorting_2,table.dataTable.order-column tbody tr>.sorting_3,table.dataTable.display tbody tr>.sorting_1,table.dataTable.display tbody tr>.sorting_2,table.dataTable.display tbody tr>.sorting_3{background-color:#fafafa}table.dataTable.order-column tbody tr.selected>.sorting_1,table.dataTable.order-column tbody tr.selected>.sorting_2,table.dataTable.order-column tbody tr.selected>.sorting_3,table.dataTable.display tbody tr.selected>.sorting_1,table.dataTable.display tbody tr.selected>.sorting_2,table.dataTable.display tbody tr.selected>.sorting_3{background-color:#acbad5}table.dataTable.display tbody tr.odd>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd>.sorting_1{background-color:#f1f1f1}table.dataTable.display tbody tr.odd>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd>.sorting_2{background-color:#f3f3f3}table.dataTable.display tbody tr.odd>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd>.sorting_3{background-color:whitesmoke}table.dataTable.display tbody tr.odd.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1{background-color:#a6b4cd}table.dataTable.display tbody tr.odd.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2{background-color:#a8b5cf}table.dataTable.display tbody tr.odd.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3{background-color:#a9b7d1}table.dataTable.display tbody tr.even>.sorting_1,table.dataTable.order-column.stripe tbody tr.even>.sorting_1{background-color:#fafafa}table.dataTable.display tbody tr.even>.sorting_2,table.dataTable.order-column.stripe tbody tr.even>.sorting_2{background-color:#fcfcfc}table.dataTable.display tbody tr.even>.sorting_3,table.dataTable.order-column.stripe tbody tr.even>.sorting_3{background-color:#fefefe}table.dataTable.display tbody tr.even.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_1{background-color:#acbad5}table.dataTable.display tbody tr.even.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_2{background-color:#aebcd6}table.dataTable.display tbody tr.even.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_3{background-color:#afbdd8}table.dataTable.display tbody tr:hover>.sorting_1,table.dataTable.order-column.hover tbody tr:hover>.sorting_1{background-color:#eaeaea}table.dataTable.display tbody tr:hover>.sorting_2,table.dataTable.order-column.hover tbody tr:hover>.sorting_2{background-color:#ececec}table.dataTable.display tbody tr:hover>.sorting_3,table.dataTable.order-column.hover tbody tr:hover>.sorting_3{background-color:#efefef}table.dataTable.display tbody tr:hover.selected>.sorting_1,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_1{background-color:#a2aec7}table.dataTable.display tbody tr:hover.selected>.sorting_2,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_2{background-color:#a3b0c9}table.dataTable.display tbody tr:hover.selected>.sorting_3,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_3{background-color:#a5b2cb}table.dataTable.no-footer{border-bottom:1px solid #111}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}table.dataTable.compact thead th,table.dataTable.compact thead td{padding:4px 17px 4px 4px}table.dataTable.compact tfoot th,table.dataTable.compact tfoot td{padding:4px}table.dataTable.compact tbody th,table.dataTable.compact tbody td{padding:4px}table.dataTable th.dt-left,table.dataTable td.dt-left{text-align:left}table.dataTable th.dt-center,table.dataTable td.dt-center,table.dataTable td.dataTables_empty{text-align:center}table.dataTable th.dt-right,table.dataTable td.dt-right{text-align:right}table.dataTable th.dt-justify,table.dataTable td.dt-justify{text-align:justify}table.dataTable th.dt-nowrap,table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable thead th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody th.dt-body-left,table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center,table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right,table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify,table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap,table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}table.dataTable,table.dataTable th,table.dataTable td{-webkit-box-sizing:content-box;box-sizing:content-box}.dataTables_wrapper{position:relative;clear:both;*zoom:1;zoom:1}.dataTables_wrapper .dataTables_length{float:left}.dataTables_wrapper .dataTables_filter{float:right;text-align:right}.dataTables_wrapper .dataTables_filter input{margin-left:0.5em}.dataTables_wrapper .dataTables_info{clear:both;float:left;padding-top:0.755em}.dataTables_wrapper .dataTables_paginate{float:right;text-align:right;padding-top:0.25em}.dataTables_wrapper .dataTables_paginate .paginate_button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:0.5em 1em;margin-left:2px;text-align:center;text-decoration:none !important;cursor:pointer;*cursor:hand;color:#333 !important;border:1px solid transparent;border-radius:2px}.dataTables_wrapper .dataTables_paginate .paginate_button.current,.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{color:#333 !important;border:1px solid #979797;background-color:white;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #dcdcdc));background:-webkit-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-moz-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-ms-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-o-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:linear-gradient(to bottom, #fff 0%, #dcdcdc 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active{cursor:default;color:#666 !important;border:1px solid transparent;background:transparent;box-shadow:none}.dataTables_wrapper .dataTables_paginate .paginate_button:hover{color:white !important;border:1px solid #111;background-color:#585858;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));background:-webkit-linear-gradient(top, #585858 0%, #111 100%);background:-moz-linear-gradient(top, #585858 0%, #111 100%);background:-ms-linear-gradient(top, #585858 0%, #111 100%);background:-o-linear-gradient(top, #585858 0%, #111 100%);background:linear-gradient(to bottom, #585858 0%, #111 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button:active{outline:none;background-color:#2b2b2b;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));background:-webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);box-shadow:inset 0 0 3px #111}.dataTables_wrapper .dataTables_paginate .ellipsis{padding:0 1em}.dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:white;background:-webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255,255,255,0)), color-stop(25%, rgba(255,255,255,0.9)), color-stop(75%, rgba(255,255,255,0.9)), color-stop(100%, rgba(255,255,255,0)));background:-webkit-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-moz-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-o-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%)}.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_processing,.dataTables_wrapper .dataTables_paginate{color:#333}.dataTables_wrapper .dataTables_scroll{clear:both}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody{*margin-top:-1px;-webkit-overflow-scrolling:touch}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td{vertical-align:middle}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td>div.dataTables_sizing{height:0;overflow:hidden;margin:0 !important;padding:0 !important}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #111}.dataTables_wrapper.no-footer div.dataTables_scrollHead table,.dataTables_wrapper.no-footer div.dataTables_scrollBody table{border-bottom:none}.dataTables_wrapper:after{visibility:hidden;display:block;content:"";clear:both;height:0}@media screen and (max-width: 767px){.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_paginate{float:none;text-align:center}.dataTables_wrapper .dataTables_paginate{margin-top:0.5em}}@media screen and (max-width: 640px){.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter{float:none;text-align:center}.dataTables_wrapper .dataTables_filter{margin-top:0.5em}} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/data-tables/jquery.dataTables.min.js b/common/src/main/webapp/thirdparty/data-tables/jquery.dataTables.min.js
new file mode 100644
index 0000000..e28e037
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/data-tables/jquery.dataTables.min.js
@@ -0,0 +1,166 @@
+/*!
+ DataTables 1.10.11
+ ©2008-2015 SpryMedia Ltd - datatables.net/license
+*/
+(function(h){"function"===typeof define&&define.amd?define(["jquery"],function(D){return h(D,window,document)}):"object"===typeof exports?module.exports=function(D,I){D||(D=window);I||(I="undefined"!==typeof window?require("jquery"):require("jquery")(D));return h(I,D,D.document)}:h(jQuery,window,document)})(function(h,D,I,k){function Y(a){var b,c,d={};h.each(a,function(e){if((b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=e.replace(b[0],b[2].toLowerCase()),
+d[c]=e,"o"===b[1]&&Y(a[e])});a._hungarianMap=d}function K(a,b,c){a._hungarianMap||Y(a);var d;h.each(b,function(e){d=a._hungarianMap[e];if(d!==k&&(c||b[d]===k))"o"===d.charAt(0)?(b[d]||(b[d]={}),h.extend(!0,b[d],b[e]),K(a[d],b[d],c)):b[d]=b[e]})}function Fa(a){var b=m.defaults.oLanguage,c=a.sZeroRecords;!a.sEmptyTable&&(c&&"No data available in table"===b.sEmptyTable)&&E(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(c&&"Loading..."===b.sLoadingRecords)&&E(a,a,"sZeroRecords","sLoadingRecords");
+a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&db(a)}function eb(a){A(a,"ordering","bSort");A(a,"orderMulti","bSortMulti");A(a,"orderClasses","bSortClasses");A(a,"orderCellsTop","bSortCellsTop");A(a,"order","aaSorting");A(a,"orderFixed","aaSortingFixed");A(a,"paging","bPaginate");A(a,"pagingType","sPaginationType");A(a,"pageLength","iDisplayLength");A(a,"searching","bFilter");"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%":"");"boolean"===typeof a.scrollX&&(a.scrollX=
+a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b<c;b++)a[b]&&K(m.models.oSearch,a[b])}function fb(a){A(a,"orderable","bSortable");A(a,"orderData","aDataSort");A(a,"orderSequence","asSorting");A(a,"orderDataType","sortDataType");var b=a.aDataSort;b&&!h.isArray(b)&&(a.aDataSort=[b])}function gb(a){if(!m.__browser){var b={};m.__browser=b;var c=h("<div/>").css({position:"fixed",top:0,left:0,height:1,width:1,overflow:"hidden"}).append(h("<div/>").css({position:"absolute",top:1,left:1,
+width:100,overflow:"scroll"}).append(h("<div/>").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}h.extend(a.oBrowser,m.__browser);a.oScroll.iBarWidth=m.__browser.barWidth}function hb(a,b,c,d,e,f){var g,j=!1;c!==k&&(g=c,j=!0);for(;d!==e;)a.hasOwnProperty(d)&&
+(g=j?b(g,a[d],d,a):a[d],j=!0,d+=f);return g}function Ga(a,b){var c=m.defaults.column,d=a.aoColumns.length,c=h.extend({},m.models.oColumn,c,{nTh:b?b:I.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=h.extend({},m.models.oSearch,c[d]);ja(a,d,h(b).data())}function ja(a,b,c){var b=a.aoColumns[b],d=a.oClasses,e=h(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var f=
+(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==k&&null!==c&&(fb(c),K(m.defaults.column,c),c.mDataProp!==k&&!c.mData&&(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),h.extend(b,c),E(b,c,"sWidth","sWidthOrig"),c.iDataSort!==k&&(b.aDataSort=[c.iDataSort]),E(b,c,"aDataSort"));var g=b.mData,j=Q(g),i=b.mRender?Q(b.mRender):null,c=function(a){return"string"===typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=h.isPlainObject(g)&&
+(c(g.sort)||c(g.type)||c(g.filter));b._setter=null;b.fnGetData=function(a,b,c){var d=j(a,b,k,c);return i&&b?i(d,b,a,c):d};b.fnSetData=function(a,b,c){return R(g)(a,b,c)};"number"!==typeof g&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==h.inArray("asc",b.asSorting);c=-1!==h.inArray("desc",b.asSorting);!b.bSortable||!a&&!c?(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI=""):a&&!c?(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):
+!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI)}function U(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Ha(a);for(var c=0,d=b.length;c<d;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;(""!==b.sY||""!==b.sX)&&ka(a);u(a,null,"column-sizing",[a])}function Z(a,b){var c=la(a,"bVisible");return"number"===typeof c[b]?c[b]:null}function $(a,b){var c=la(a,"bVisible"),c=h.inArray(b,c);return-1!==c?c:null}
+function aa(a){return h(F(a.aoColumns,"nTh")).filter(":visible").length}function la(a,b){var c=[];h.map(a.aoColumns,function(a,e){a[b]&&c.push(e)});return c}function Ia(a){var b=a.aoColumns,c=a.aoData,d=m.ext.type.detect,e,f,g,j,i,h,l,q,t;e=0;for(f=b.length;e<f;e++)if(l=b[e],t=[],!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){g=0;for(j=d.length;g<j;g++){i=0;for(h=c.length;i<h;i++){t[i]===k&&(t[i]=B(a,i,e,"type"));q=d[g](t[i],a);if(!q&&g!==d.length-1)break;if("html"===q)break}if(q){l.sType=
+q;break}}l.sType||(l.sType="string")}}function ib(a,b,c,d){var e,f,g,j,i,n,l=a.aoColumns;if(b)for(e=b.length-1;0<=e;e--){n=b[e];var q=n.targets!==k?n.targets:n.aTargets;h.isArray(q)||(q=[q]);f=0;for(g=q.length;f<g;f++)if("number"===typeof q[f]&&0<=q[f]){for(;l.length<=q[f];)Ga(a);d(q[f],n)}else if("number"===typeof q[f]&&0>q[f])d(l.length+q[f],n);else if("string"===typeof q[f]){j=0;for(i=l.length;j<i;j++)("_all"==q[f]||h(l[j].nTh).hasClass(q[f]))&&d(j,n)}}if(c){e=0;for(a=c.length;e<a;e++)d(e,c[e])}}
+function N(a,b,c,d){var e=a.aoData.length,f=h.extend(!0,{},m.models.oRow,{src:c?"dom":"data",idx:e});f._aData=b;a.aoData.push(f);for(var g=a.aoColumns,j=0,i=g.length;j<i;j++)g[j].sType=null;a.aiDisplayMaster.push(e);b=a.rowIdFn(b);b!==k&&(a.aIds[b]=f);(c||!a.oFeatures.bDeferRender)&&Ja(a,e,c,d);return e}function ma(a,b){var c;b instanceof h||(b=h(b));return b.map(function(b,e){c=Ka(a,e);return N(a,c.data,e,c.cells)})}function B(a,b,c,d){var e=a.iDraw,f=a.aoColumns[c],g=a.aoData[b]._aData,j=f.sDefaultContent,
+i=f.fnGetData(g,d,{settings:a,row:b,col:c});if(i===k)return a.iDrawError!=e&&null===j&&(L(a,0,"Requested unknown parameter "+("function"==typeof f.mData?"{function}":"'"+f.mData+"'")+" for row "+b+", column "+c,4),a.iDrawError=e),j;if((i===g||null===i)&&null!==j&&d!==k)i=j;else if("function"===typeof i)return i.call(g);return null===i&&"display"==d?"":i}function jb(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d,{settings:a,row:b,col:c})}function La(a){return h.map(a.match(/(\\.|[^\.])+/g)||
+[""],function(a){return a.replace(/\\./g,".")})}function Q(a){if(h.isPlainObject(a)){var b={};h.each(a,function(a,c){c&&(b[a]=Q(c))});return function(a,c,f,g){var j=b[c]||b._;return j!==k?j(a,c,f,g):a}}if(null===a)return function(a){return a};if("function"===typeof a)return function(b,c,f,g){return a(b,c,f,g)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var c=function(a,b,f){var g,j;if(""!==f){j=La(f);for(var i=0,n=j.length;i<n;i++){f=j[i].match(ba);g=
+j[i].match(V);if(f){j[i]=j[i].replace(ba,"");""!==j[i]&&(a=a[j[i]]);g=[];j.splice(0,i+1);j=j.join(".");if(h.isArray(a)){i=0;for(n=a.length;i<n;i++)g.push(c(a[i],b,j))}a=f[0].substring(1,f[0].length-1);a=""===a?g:g.join(a);break}else if(g){j[i]=j[i].replace(V,"");a=a[j[i]]();continue}if(null===a||a[j[i]]===k)return k;a=a[j[i]]}}return a};return function(b,e){return c(b,e,a)}}return function(b){return b[a]}}function R(a){if(h.isPlainObject(a))return R(a._);if(null===a)return function(){};if("function"===
+typeof a)return function(b,d,e){a(b,"set",d,e)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var b=function(a,d,e){var e=La(e),f;f=e[e.length-1];for(var g,j,i=0,n=e.length-1;i<n;i++){g=e[i].match(ba);j=e[i].match(V);if(g){e[i]=e[i].replace(ba,"");a[e[i]]=[];f=e.slice();f.splice(0,i+1);g=f.join(".");if(h.isArray(d)){j=0;for(n=d.length;j<n;j++)f={},b(f,d[j],g),a[e[i]].push(f)}else a[e[i]]=d;return}j&&(e[i]=e[i].replace(V,""),a=a[e[i]](d));if(null===a[e[i]]||
+a[e[i]]===k)a[e[i]]={};a=a[e[i]]}if(f.match(V))a[f.replace(V,"")](d);else a[f.replace(ba,"")]=d};return function(c,d){return b(c,d,a)}}return function(b,d){b[a]=d}}function Ma(a){return F(a.aoData,"_aData")}function na(a){a.aoData.length=0;a.aiDisplayMaster.length=0;a.aiDisplay.length=0;a.aIds={}}function oa(a,b,c){for(var d=-1,e=0,f=a.length;e<f;e++)a[e]==b?d=e:a[e]>b&&a[e]--; -1!=d&&c===k&&a.splice(d,1)}function ca(a,b,c,d){var e=a.aoData[b],f,g=function(c,d){for(;c.childNodes.length;)c.removeChild(c.firstChild);
+c.innerHTML=B(a,b,d,"display")};if("dom"===c||(!c||"auto"===c)&&"dom"===e.src)e._aData=Ka(a,e,d,d===k?k:e._aData).data;else{var j=e.anCells;if(j)if(d!==k)g(j[d],d);else{c=0;for(f=j.length;c<f;c++)g(j[c],c)}}e._aSortData=null;e._aFilterData=null;g=a.aoColumns;if(d!==k)g[d].sType=null;else{c=0;for(f=g.length;c<f;c++)g[c].sType=null;Na(a,e)}}function Ka(a,b,c,d){var e=[],f=b.firstChild,g,j,i=0,n,l=a.aoColumns,q=a._rowReadObject,d=d!==k?d:q?{}:[],t=function(a,b){if("string"===typeof a){var c=a.indexOf("@");
+-1!==c&&(c=a.substring(c+1),R(a)(d,b.getAttribute(c)))}},S=function(a){if(c===k||c===i)j=l[i],n=h.trim(a.innerHTML),j&&j._bAttrSrc?(R(j.mData._)(d,n),t(j.mData.sort,a),t(j.mData.type,a),t(j.mData.filter,a)):q?(j._setter||(j._setter=R(j.mData)),j._setter(d,n)):d[i]=n;i++};if(f)for(;f;){g=f.nodeName.toUpperCase();if("TD"==g||"TH"==g)S(f),e.push(f);f=f.nextSibling}else{e=b.anCells;f=0;for(g=e.length;f<g;f++)S(e[f])}if(b=b.firstChild?b:b.nTr)(b=b.getAttribute("id"))&&R(a.rowId)(d,b);return{data:d,cells:e}}
+function Ja(a,b,c,d){var e=a.aoData[b],f=e._aData,g=[],j,i,n,l,q;if(null===e.nTr){j=c||I.createElement("tr");e.nTr=j;e.anCells=g;j._DT_RowIndex=b;Na(a,e);l=0;for(q=a.aoColumns.length;l<q;l++){n=a.aoColumns[l];i=c?d[l]:I.createElement(n.sCellType);i._DT_CellIndex={row:b,column:l};g.push(i);if((!c||n.mRender||n.mData!==l)&&(!h.isPlainObject(n.mData)||n.mData._!==l+".display"))i.innerHTML=B(a,b,l,"display");n.sClass&&(i.className+=" "+n.sClass);n.bVisible&&!c?j.appendChild(i):!n.bVisible&&c&&i.parentNode.removeChild(i);
+n.fnCreatedCell&&n.fnCreatedCell.call(a.oInstance,i,B(a,b,l),f,b,l)}u(a,"aoRowCreatedCallback",null,[j,f,b])}e.nTr.setAttribute("role","row")}function Na(a,b){var c=b.nTr,d=b._aData;if(c){var e=a.rowIdFn(d);e&&(c.id=e);d.DT_RowClass&&(e=d.DT_RowClass.split(" "),b.__rowc=b.__rowc?pa(b.__rowc.concat(e)):e,h(c).removeClass(b.__rowc.join(" ")).addClass(d.DT_RowClass));d.DT_RowAttr&&h(c).attr(d.DT_RowAttr);d.DT_RowData&&h(c).data(d.DT_RowData)}}function kb(a){var b,c,d,e,f,g=a.nTHead,j=a.nTFoot,i=0===
+h("th, td",g).length,n=a.oClasses,l=a.aoColumns;i&&(e=h("<tr/>").appendTo(g));b=0;for(c=l.length;b<c;b++)f=l[b],d=h(f.nTh).addClass(f.sClass),i&&d.appendTo(e),a.oFeatures.bSort&&(d.addClass(f.sSortingClass),!1!==f.bSortable&&(d.attr("tabindex",a.iTabIndex).attr("aria-controls",a.sTableId),Oa(a,f.nTh,b))),f.sTitle!=d[0].innerHTML&&d.html(f.sTitle),Pa(a,"header")(a,d,f,n);i&&da(a.aoHeader,g);h(g).find(">tr").attr("role","row");h(g).find(">tr>th, >tr>td").addClass(n.sHeaderTH);h(j).find(">tr>th, >tr>td").addClass(n.sFooterTH);
+if(null!==j){a=a.aoFooter[0];b=0;for(c=a.length;b<c;b++)f=l[b],f.nTf=a[b].cell,f.sClass&&h(f.nTf).addClass(f.sClass)}}function ea(a,b,c){var d,e,f,g=[],j=[],i=a.aoColumns.length,n;if(b){c===k&&(c=!1);d=0;for(e=b.length;d<e;d++){g[d]=b[d].slice();g[d].nTr=b[d].nTr;for(f=i-1;0<=f;f--)!a.aoColumns[f].bVisible&&!c&&g[d].splice(f,1);j.push([])}d=0;for(e=g.length;d<e;d++){if(a=g[d].nTr)for(;f=a.firstChild;)a.removeChild(f);f=0;for(b=g[d].length;f<b;f++)if(n=i=1,j[d][f]===k){a.appendChild(g[d][f].cell);
+for(j[d][f]=1;g[d+i]!==k&&g[d][f].cell==g[d+i][f].cell;)j[d+i][f]=1,i++;for(;g[d][f+n]!==k&&g[d][f].cell==g[d][f+n].cell;){for(c=0;c<i;c++)j[d+c][f+n]=1;n++}h(g[d][f].cell).attr("rowspan",i).attr("colspan",n)}}}}function O(a){var b=u(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==h.inArray(!1,b))C(a,!1);else{var b=[],c=0,d=a.asStripeClasses,e=d.length,f=a.oLanguage,g=a.iInitDisplayStart,j="ssp"==y(a),i=a.aiDisplay;a.bDrawing=!0;g!==k&&-1!==g&&(a._iDisplayStart=j?g:g>=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart=
+-1);var g=a._iDisplayStart,n=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,C(a,!1);else if(j){if(!a.bDestroying&&!lb(a))return}else a.iDraw++;if(0!==i.length){f=j?a.aoData.length:n;for(j=j?0:g;j<f;j++){var l=i[j],q=a.aoData[l];null===q.nTr&&Ja(a,l);l=q.nTr;if(0!==e){var t=d[c%e];q._sRowStripe!=t&&(h(l).removeClass(q._sRowStripe).addClass(t),q._sRowStripe=t)}u(a,"aoRowCallback",null,[l,q._aData,c,j]);b.push(l);c++}}else c=f.sZeroRecords,1==a.iDraw&&"ajax"==y(a)?c=f.sLoadingRecords:
+f.sEmptyTable&&0===a.fnRecordsTotal()&&(c=f.sEmptyTable),b[0]=h("<tr/>",{"class":e?d[0]:""}).append(h("<td />",{valign:"top",colSpan:aa(a),"class":a.oClasses.sRowEmpty}).html(c))[0];u(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],Ma(a),g,n,i]);u(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],Ma(a),g,n,i]);d=h(a.nTBody);d.children().detach();d.append(h(b));u(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function T(a,b){var c=a.oFeatures,d=c.bFilter;
+c.bSort&&mb(a);d?fa(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;O(a);a._drawHold=!1}function nb(a){var b=a.oClasses,c=h(a.nTable),c=h("<div/>").insertBefore(c),d=a.oFeatures,e=h("<div/>",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var f=a.sDom.split(""),g,j,i,n,l,q,t=0;t<f.length;t++){g=null;j=f[t];if("<"==j){i=h("<div/>")[0];
+n=f[t+1];if("'"==n||'"'==n){l="";for(q=2;f[t+q]!=n;)l+=f[t+q],q++;"H"==l?l=b.sJUIHeader:"F"==l&&(l=b.sJUIFooter);-1!=l.indexOf(".")?(n=l.split("."),i.id=n[0].substr(1,n[0].length-1),i.className=n[1]):"#"==l.charAt(0)?i.id=l.substr(1,l.length-1):i.className=l;t+=q}e.append(i);e=h(i)}else if(">"==j)e=e.parent();else if("l"==j&&d.bPaginate&&d.bLengthChange)g=ob(a);else if("f"==j&&d.bFilter)g=pb(a);else if("r"==j&&d.bProcessing)g=qb(a);else if("t"==j)g=rb(a);else if("i"==j&&d.bInfo)g=sb(a);else if("p"==
+j&&d.bPaginate)g=tb(a);else if(0!==m.ext.feature.length){i=m.ext.feature;q=0;for(n=i.length;q<n;q++)if(j==i[q].cFeature){g=i[q].fnInit(a);break}}g&&(i=a.aanFeatures,i[j]||(i[j]=[]),i[j].push(g),e.append(g))}c.replaceWith(e);a.nHolding=null}function da(a,b){var c=h(b).children("tr"),d,e,f,g,j,i,n,l,q,t;a.splice(0,a.length);f=0;for(i=c.length;f<i;f++)a.push([]);f=0;for(i=c.length;f<i;f++){d=c[f];for(e=d.firstChild;e;){if("TD"==e.nodeName.toUpperCase()||"TH"==e.nodeName.toUpperCase()){l=1*e.getAttribute("colspan");
+q=1*e.getAttribute("rowspan");l=!l||0===l||1===l?1:l;q=!q||0===q||1===q?1:q;g=0;for(j=a[f];j[g];)g++;n=g;t=1===l?!0:!1;for(j=0;j<l;j++)for(g=0;g<q;g++)a[f+g][n+j]={cell:e,unique:t},a[f+g].nTr=d}e=e.nextSibling}}}function qa(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],da(c,b)));for(var b=0,e=c.length;b<e;b++)for(var f=0,g=c[b].length;f<g;f++)if(c[b][f].unique&&(!d[f]||!a.bSortCellsTop))d[f]=c[b][f].cell;return d}function ra(a,b,c){u(a,"aoServerParams","serverParams",[b]);if(b&&h.isArray(b)){var d={},
+e=/(.*?)\[\]$/;h.each(b,function(a,b){var c=b.name.match(e);c?(c=c[0],d[c]||(d[c]=[]),d[c].push(b.value)):d[b.name]=b.value});b=d}var f,g=a.ajax,j=a.oInstance,i=function(b){u(a,null,"xhr",[a,b,a.jqXHR]);c(b)};if(h.isPlainObject(g)&&g.data){f=g.data;var n=h.isFunction(f)?f(b,a):f,b=h.isFunction(f)&&n?n:h.extend(!0,b,n);delete g.data}n={data:b,success:function(b){var c=b.error||b.sError;c&&L(a,0,c);a.json=b;i(b)},dataType:"json",cache:!1,type:a.sServerMethod,error:function(b,c){var d=u(a,null,"xhr",
+[a,null,a.jqXHR]);-1===h.inArray(!0,d)&&("parsererror"==c?L(a,0,"Invalid JSON response",1):4===b.readyState&&L(a,0,"Ajax error",7));C(a,!1)}};a.oAjaxData=b;u(a,null,"preXhr",[a,b]);a.fnServerData?a.fnServerData.call(j,a.sAjaxSource,h.map(b,function(a,b){return{name:b,value:a}}),i,a):a.sAjaxSource||"string"===typeof g?a.jqXHR=h.ajax(h.extend(n,{url:g||a.sAjaxSource})):h.isFunction(g)?a.jqXHR=g.call(j,b,i,a):(a.jqXHR=h.ajax(h.extend(n,g)),g.data=f)}function lb(a){return a.bAjaxDataGet?(a.iDraw++,C(a,
+!0),ra(a,ub(a),function(b){vb(a,b)}),!1):!0}function ub(a){var b=a.aoColumns,c=b.length,d=a.oFeatures,e=a.oPreviousSearch,f=a.aoPreSearchCols,g,j=[],i,n,l,q=W(a);g=a._iDisplayStart;i=!1!==d.bPaginate?a._iDisplayLength:-1;var k=function(a,b){j.push({name:a,value:b})};k("sEcho",a.iDraw);k("iColumns",c);k("sColumns",F(b,"sName").join(","));k("iDisplayStart",g);k("iDisplayLength",i);var S={draw:a.iDraw,columns:[],order:[],start:g,length:i,search:{value:e.sSearch,regex:e.bRegex}};for(g=0;g<c;g++)n=b[g],
+l=f[g],i="function"==typeof n.mData?"function":n.mData,S.columns.push({data:i,name:n.sName,searchable:n.bSearchable,orderable:n.bSortable,search:{value:l.sSearch,regex:l.bRegex}}),k("mDataProp_"+g,i),d.bFilter&&(k("sSearch_"+g,l.sSearch),k("bRegex_"+g,l.bRegex),k("bSearchable_"+g,n.bSearchable)),d.bSort&&k("bSortable_"+g,n.bSortable);d.bFilter&&(k("sSearch",e.sSearch),k("bRegex",e.bRegex));d.bSort&&(h.each(q,function(a,b){S.order.push({column:b.col,dir:b.dir});k("iSortCol_"+a,b.col);k("sSortDir_"+
+a,b.dir)}),k("iSortingCols",q.length));b=m.ext.legacy.ajax;return null===b?a.sAjaxSource?j:S:b?j:S}function vb(a,b){var c=sa(a,b),d=b.sEcho!==k?b.sEcho:b.draw,e=b.iTotalRecords!==k?b.iTotalRecords:b.recordsTotal,f=b.iTotalDisplayRecords!==k?b.iTotalDisplayRecords:b.recordsFiltered;if(d){if(1*d<a.iDraw)return;a.iDraw=1*d}na(a);a._iRecordsTotal=parseInt(e,10);a._iRecordsDisplay=parseInt(f,10);d=0;for(e=c.length;d<e;d++)N(a,c[d]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;O(a);a._bInitComplete||
+ta(a,b);a.bAjaxDataGet=!0;C(a,!1)}function sa(a,b){var c=h.isPlainObject(a.ajax)&&a.ajax.dataSrc!==k?a.ajax.dataSrc:a.sAjaxDataProp;return"data"===c?b.aaData||b[c]:""!==c?Q(c)(b):b}function pb(a){var b=a.oClasses,c=a.sTableId,d=a.oLanguage,e=a.oPreviousSearch,f=a.aanFeatures,g='<input type="search" class="'+b.sFilterInput+'"/>',j=d.sSearch,j=j.match(/_INPUT_/)?j.replace("_INPUT_",g):j+g,b=h("<div/>",{id:!f.f?c+"_filter":null,"class":b.sFilter}).append(h("<label/>").append(j)),f=function(){var b=!this.value?
+"":this.value;b!=e.sSearch&&(fa(a,{sSearch:b,bRegex:e.bRegex,bSmart:e.bSmart,bCaseInsensitive:e.bCaseInsensitive}),a._iDisplayStart=0,O(a))},g=null!==a.searchDelay?a.searchDelay:"ssp"===y(a)?400:0,i=h("input",b).val(e.sSearch).attr("placeholder",d.sSearchPlaceholder).bind("keyup.DT search.DT input.DT paste.DT cut.DT",g?ua(f,g):f).bind("keypress.DT",function(a){if(13==a.keyCode)return!1}).attr("aria-controls",c);h(a.nTable).on("search.dt.DT",function(b,c){if(a===c)try{i[0]!==I.activeElement&&i.val(e.sSearch)}catch(d){}});
+return b[0]}function fa(a,b,c){var d=a.oPreviousSearch,e=a.aoPreSearchCols,f=function(a){d.sSearch=a.sSearch;d.bRegex=a.bRegex;d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};Ia(a);if("ssp"!=y(a)){wb(a,b.sSearch,c,b.bEscapeRegex!==k?!b.bEscapeRegex:b.bRegex,b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<e.length;b++)xb(a,e[b].sSearch,b,e[b].bEscapeRegex!==k?!e[b].bEscapeRegex:e[b].bRegex,e[b].bSmart,e[b].bCaseInsensitive);yb(a)}else f(b);a.bFiltered=!0;u(a,null,"search",[a])}function yb(a){for(var b=
+m.ext.search,c=a.aiDisplay,d,e,f=0,g=b.length;f<g;f++){for(var j=[],i=0,n=c.length;i<n;i++)e=c[i],d=a.aoData[e],b[f](a,d._aFilterData,e,d._aData,i)&&j.push(e);c.length=0;h.merge(c,j)}}function xb(a,b,c,d,e,f){if(""!==b)for(var g=a.aiDisplay,d=Qa(b,d,e,f),e=g.length-1;0<=e;e--)b=a.aoData[g[e]]._aFilterData[c],d.test(b)||g.splice(e,1)}function wb(a,b,c,d,e,f){var d=Qa(b,d,e,f),e=a.oPreviousSearch.sSearch,f=a.aiDisplayMaster,g;0!==m.ext.search.length&&(c=!0);g=zb(a);if(0>=b.length)a.aiDisplay=f.slice();
+else{if(g||c||e.length>b.length||0!==b.indexOf(e)||a.bSorted)a.aiDisplay=f.slice();b=a.aiDisplay;for(c=b.length-1;0<=c;c--)d.test(a.aoData[b[c]]._sFilterRow)||b.splice(c,1)}}function Qa(a,b,c,d){a=b?a:va(a);c&&(a="^(?=.*?"+h.map(a.match(/"[^"]+"|[^ ]+/g)||[""],function(a){if('"'===a.charAt(0))var b=a.match(/^"(.*)"$/),a=b?b[1]:a;return a.replace('"',"")}).join(")(?=.*?")+").*$");return RegExp(a,d?"i":"")}function va(a){return a.replace(Zb,"\\$1")}function zb(a){var b=a.aoColumns,c,d,e,f,g,j,i,h,l=
+m.ext.type.search;c=!1;d=0;for(f=a.aoData.length;d<f;d++)if(h=a.aoData[d],!h._aFilterData){j=[];e=0;for(g=b.length;e<g;e++)c=b[e],c.bSearchable?(i=B(a,d,e,"filter"),l[c.sType]&&(i=l[c.sType](i)),null===i&&(i=""),"string"!==typeof i&&i.toString&&(i=i.toString())):i="",i.indexOf&&-1!==i.indexOf("&")&&(wa.innerHTML=i,i=$b?wa.textContent:wa.innerText),i.replace&&(i=i.replace(/[\r\n]/g,"")),j.push(i);h._aFilterData=j;h._sFilterRow=j.join(" ");c=!0}return c}function Ab(a){return{search:a.sSearch,smart:a.bSmart,
+regex:a.bRegex,caseInsensitive:a.bCaseInsensitive}}function Bb(a){return{sSearch:a.search,bSmart:a.smart,bRegex:a.regex,bCaseInsensitive:a.caseInsensitive}}function sb(a){var b=a.sTableId,c=a.aanFeatures.i,d=h("<div/>",{"class":a.oClasses.sInfo,id:!c?b+"_info":null});c||(a.aoDrawCallback.push({fn:Cb,sName:"information"}),d.attr("role","status").attr("aria-live","polite"),h(a.nTable).attr("aria-describedby",b+"_info"));return d[0]}function Cb(a){var b=a.aanFeatures.i;if(0!==b.length){var c=a.oLanguage,
+d=a._iDisplayStart+1,e=a.fnDisplayEnd(),f=a.fnRecordsTotal(),g=a.fnRecordsDisplay(),j=g?c.sInfo:c.sInfoEmpty;g!==f&&(j+=" "+c.sInfoFiltered);j+=c.sInfoPostFix;j=Db(a,j);c=c.fnInfoCallback;null!==c&&(j=c.call(a.oInstance,a,d,e,f,g,j));h(b).html(j)}}function Db(a,b){var c=a.fnFormatNumber,d=a._iDisplayStart+1,e=a._iDisplayLength,f=a.fnRecordsDisplay(),g=-1===e;return b.replace(/_START_/g,c.call(a,d)).replace(/_END_/g,c.call(a,a.fnDisplayEnd())).replace(/_MAX_/g,c.call(a,a.fnRecordsTotal())).replace(/_TOTAL_/g,
+c.call(a,f)).replace(/_PAGE_/g,c.call(a,g?1:Math.ceil(d/e))).replace(/_PAGES_/g,c.call(a,g?1:Math.ceil(f/e)))}function ga(a){var b,c,d=a.iInitDisplayStart,e=a.aoColumns,f;c=a.oFeatures;var g=a.bDeferLoading;if(a.bInitialised){nb(a);kb(a);ea(a,a.aoHeader);ea(a,a.aoFooter);C(a,!0);c.bAutoWidth&&Ha(a);b=0;for(c=e.length;b<c;b++)f=e[b],f.sWidth&&(f.nTh.style.width=x(f.sWidth));u(a,null,"preInit",[a]);T(a);e=y(a);if("ssp"!=e||g)"ajax"==e?ra(a,[],function(c){var f=sa(a,c);for(b=0;b<f.length;b++)N(a,f[b]);
+a.iInitDisplayStart=d;T(a);C(a,!1);ta(a,c)},a):(C(a,!1),ta(a))}else setTimeout(function(){ga(a)},200)}function ta(a,b){a._bInitComplete=!0;(b||a.oInit.aaData)&&U(a);u(a,null,"plugin-init",[a,b]);u(a,"aoInitComplete","init",[a,b])}function Ra(a,b){var c=parseInt(b,10);a._iDisplayLength=c;Sa(a);u(a,null,"length",[a,c])}function ob(a){for(var b=a.oClasses,c=a.sTableId,d=a.aLengthMenu,e=h.isArray(d[0]),f=e?d[0]:d,d=e?d[1]:d,e=h("<select/>",{name:c+"_length","aria-controls":c,"class":b.sLengthSelect}),
+g=0,j=f.length;g<j;g++)e[0][g]=new Option(d[g],f[g]);var i=h("<div><label/></div>").addClass(b.sLength);a.aanFeatures.l||(i[0].id=c+"_length");i.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));h("select",i).val(a._iDisplayLength).bind("change.DT",function(){Ra(a,h(this).val());O(a)});h(a.nTable).bind("length.dt.DT",function(b,c,d){a===c&&h("select",i).val(d)});return i[0]}function tb(a){var b=a.sPaginationType,c=m.ext.pager[b],d="function"===typeof c,e=function(a){O(a)},
+b=h("<div/>").addClass(a.oClasses.sPaging+b)[0],f=a.aanFeatures;d||c.fnInit(a,b,e);f.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(a){if(d){var b=a._iDisplayStart,i=a._iDisplayLength,h=a.fnRecordsDisplay(),l=-1===i,b=l?0:Math.ceil(b/i),i=l?1:Math.ceil(h/i),h=c(b,i),k,l=0;for(k=f.p.length;l<k;l++)Pa(a,"pageButton")(a,f.p[l],l,h,b,i)}else c.fnUpdate(a,e)},sName:"pagination"}));return b}function Ta(a,b,c){var d=a._iDisplayStart,e=a._iDisplayLength,f=a.fnRecordsDisplay();0===f||-1===
+e?d=0:"number"===typeof b?(d=b*e,d>f&&(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e<f&&(d+=e):"last"==b?d=Math.floor((f-1)/e)*e:L(a,0,"Unknown paging action: "+b,5);b=a._iDisplayStart!==d;a._iDisplayStart=d;b&&(u(a,null,"page",[a]),c&&O(a));return b}function qb(a){return h("<div/>",{id:!a.aanFeatures.r?a.sTableId+"_processing":null,"class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}function C(a,b){a.oFeatures.bProcessing&&h(a.aanFeatures.r).css("display",
+b?"block":"none");u(a,null,"processing",[a,b])}function rb(a){var b=h(a.nTable);b.attr("role","grid");var c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,f=a.oClasses,g=b.children("caption"),j=g.length?g[0]._captionSide:null,i=h(b[0].cloneNode(!1)),n=h(b[0].cloneNode(!1)),l=b.children("tfoot");l.length||(l=null);i=h("<div/>",{"class":f.sScrollWrapper}).append(h("<div/>",{"class":f.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:d?!d?null:x(d):"100%"}).append(h("<div/>",
+{"class":f.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(i.removeAttr("id").css("margin-left",0).append("top"===j?g:null).append(b.children("thead"))))).append(h("<div/>",{"class":f.sScrollBody}).css({position:"relative",overflow:"auto",width:!d?null:x(d)}).append(b));l&&i.append(h("<div/>",{"class":f.sScrollFoot}).css({overflow:"hidden",border:0,width:d?!d?null:x(d):"100%"}).append(h("<div/>",{"class":f.sScrollFootInner}).append(n.removeAttr("id").css("margin-left",
+0).append("bottom"===j?g:null).append(b.children("tfoot")))));var b=i.children(),k=b[0],f=b[1],t=l?b[2]:null;if(d)h(f).on("scroll.DT",function(){var a=this.scrollLeft;k.scrollLeft=a;l&&(t.scrollLeft=a)});h(f).css(e&&c.bCollapse?"max-height":"height",e);a.nScrollHead=k;a.nScrollBody=f;a.nScrollFoot=t;a.aoDrawCallback.push({fn:ka,sName:"scrolling"});return i[0]}function ka(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY,b=b.iBarWidth,f=h(a.nScrollHead),g=f[0].style,j=f.children("div"),i=j[0].style,n=j.children("table"),
+j=a.nScrollBody,l=h(j),q=j.style,t=h(a.nScrollFoot).children("div"),m=t.children("table"),o=h(a.nTHead),G=h(a.nTable),p=G[0],r=p.style,u=a.nTFoot?h(a.nTFoot):null,Eb=a.oBrowser,Ua=Eb.bScrollOversize,s=F(a.aoColumns,"nTh"),P,v,w,y,z=[],A=[],B=[],C=[],D,E=function(a){a=a.style;a.paddingTop="0";a.paddingBottom="0";a.borderTopWidth="0";a.borderBottomWidth="0";a.height=0};v=j.scrollHeight>j.clientHeight;if(a.scrollBarVis!==v&&a.scrollBarVis!==k)a.scrollBarVis=v,U(a);else{a.scrollBarVis=v;G.children("thead, tfoot").remove();
+u&&(w=u.clone().prependTo(G),P=u.find("tr"),w=w.find("tr"));y=o.clone().prependTo(G);o=o.find("tr");v=y.find("tr");y.find("th, td").removeAttr("tabindex");c||(q.width="100%",f[0].style.width="100%");h.each(qa(a,y),function(b,c){D=Z(a,b);c.style.width=a.aoColumns[D].sWidth});u&&J(function(a){a.style.width=""},w);f=G.outerWidth();if(""===c){r.width="100%";if(Ua&&(G.find("tbody").height()>j.offsetHeight||"scroll"==l.css("overflow-y")))r.width=x(G.outerWidth()-b);f=G.outerWidth()}else""!==d&&(r.width=
+x(d),f=G.outerWidth());J(E,v);J(function(a){B.push(a.innerHTML);z.push(x(h(a).css("width")))},v);J(function(a,b){if(h.inArray(a,s)!==-1)a.style.width=z[b]},o);h(v).height(0);u&&(J(E,w),J(function(a){C.push(a.innerHTML);A.push(x(h(a).css("width")))},w),J(function(a,b){a.style.width=A[b]},P),h(w).height(0));J(function(a,b){a.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+B[b]+"</div>";a.style.width=z[b]},v);u&&J(function(a,b){a.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+
+C[b]+"</div>";a.style.width=A[b]},w);if(G.outerWidth()<f){P=j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")?f+b:f;if(Ua&&(j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")))r.width=x(P-b);(""===c||""!==d)&&L(a,1,"Possible column misalignment",6)}else P="100%";q.width=x(P);g.width=x(P);u&&(a.nScrollFoot.style.width=x(P));!e&&Ua&&(q.height=x(p.offsetHeight+b));c=G.outerWidth();n[0].style.width=x(c);i.width=x(c);d=G.height()>j.clientHeight||"scroll"==l.css("overflow-y");e="padding"+
+(Eb.bScrollbarLeft?"Left":"Right");i[e]=d?b+"px":"0px";u&&(m[0].style.width=x(c),t[0].style.width=x(c),t[0].style[e]=d?b+"px":"0px");G.children("colgroup").insertBefore(G.children("thead"));l.scroll();if((a.bSorted||a.bFiltered)&&!a._drawHold)j.scrollTop=0}}function J(a,b,c){for(var d=0,e=0,f=b.length,g,j;e<f;){g=b[e].firstChild;for(j=c?c[e].firstChild:null;g;)1===g.nodeType&&(c?a(g,j,d):a(g,d),d++),g=g.nextSibling,j=c?j.nextSibling:null;e++}}function Ha(a){var b=a.nTable,c=a.aoColumns,d=a.oScroll,
+e=d.sY,f=d.sX,g=d.sXInner,j=c.length,i=la(a,"bVisible"),n=h("th",a.nTHead),l=b.getAttribute("width"),k=b.parentNode,t=!1,m,o,p=a.oBrowser,d=p.bScrollOversize;(m=b.style.width)&&-1!==m.indexOf("%")&&(l=m);for(m=0;m<i.length;m++)o=c[i[m]],null!==o.sWidth&&(o.sWidth=Fb(o.sWidthOrig,k),t=!0);if(d||!t&&!f&&!e&&j==aa(a)&&j==n.length)for(m=0;m<j;m++)i=Z(a,m),null!==i&&(c[i].sWidth=x(n.eq(m).width()));else{j=h(b).clone().css("visibility","hidden").removeAttr("id");j.find("tbody tr").remove();var r=h("<tr/>").appendTo(j.find("tbody"));
+j.find("thead, tfoot").remove();j.append(h(a.nTHead).clone()).append(h(a.nTFoot).clone());j.find("tfoot th, tfoot td").css("width","");n=qa(a,j.find("thead")[0]);for(m=0;m<i.length;m++)o=c[i[m]],n[m].style.width=null!==o.sWidthOrig&&""!==o.sWidthOrig?x(o.sWidthOrig):"",o.sWidthOrig&&f&&h(n[m]).append(h("<div/>").css({width:o.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(m=0;m<i.length;m++)t=i[m],o=c[t],h(Gb(a,t)).clone(!1).append(o.sContentPadding).appendTo(r);h("[name]",
+j).removeAttr("name");o=h("<div/>").css(f||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(j).appendTo(k);f&&g?j.width(g):f?(j.css("width","auto"),j.removeAttr("width"),j.width()<k.clientWidth&&l&&j.width(k.clientWidth)):e?j.width(k.clientWidth):l&&j.width(l);for(m=e=0;m<i.length;m++)k=h(n[m]),g=k.outerWidth()-k.width(),k=p.bBounding?Math.ceil(n[m].getBoundingClientRect().width):k.outerWidth(),e+=k,c[i[m]].sWidth=x(k-g);b.style.width=x(e);o.remove()}l&&(b.style.width=
+x(l));if((l||f)&&!a._reszEvt)b=function(){h(D).bind("resize.DT-"+a.sInstance,ua(function(){U(a)}))},d?setTimeout(b,1E3):b(),a._reszEvt=!0}function ua(a,b){var c=b!==k?b:200,d,e;return function(){var b=this,g=+new Date,j=arguments;d&&g<d+c?(clearTimeout(e),e=setTimeout(function(){d=k;a.apply(b,j)},c)):(d=g,a.apply(b,j))}}function Fb(a,b){if(!a)return 0;var c=h("<div/>").css("width",x(a)).appendTo(b||I.body),d=c[0].offsetWidth;c.remove();return d}function Gb(a,b){var c=Hb(a,b);if(0>c)return null;var d=
+a.aoData[c];return!d.nTr?h("<td/>").html(B(a,c,b,"display"))[0]:d.anCells[b]}function Hb(a,b){for(var c,d=-1,e=-1,f=0,g=a.aoData.length;f<g;f++)c=B(a,f,b,"display")+"",c=c.replace(ac,""),c=c.replace(/&nbsp;/g," "),c.length>d&&(d=c.length,e=f);return e}function x(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function W(a){var b,c,d=[],e=a.aoColumns,f,g,j,i;b=a.aaSortingFixed;c=h.isPlainObject(b);var n=[];f=function(a){a.length&&!h.isArray(a[0])?n.push(a):h.merge(n,
+a)};h.isArray(b)&&f(b);c&&b.pre&&f(b.pre);f(a.aaSorting);c&&b.post&&f(b.post);for(a=0;a<n.length;a++){i=n[a][0];f=e[i].aDataSort;b=0;for(c=f.length;b<c;b++)g=f[b],j=e[g].sType||"string",n[a]._idx===k&&(n[a]._idx=h.inArray(n[a][1],e[g].asSorting)),d.push({src:i,col:g,dir:n[a][1],index:n[a]._idx,type:j,formatter:m.ext.type.order[j+"-pre"]})}return d}function mb(a){var b,c,d=[],e=m.ext.type.order,f=a.aoData,g=0,j,i=a.aiDisplayMaster,h;Ia(a);h=W(a);b=0;for(c=h.length;b<c;b++)j=h[b],j.formatter&&g++,Ib(a,
+j.col);if("ssp"!=y(a)&&0!==h.length){b=0;for(c=i.length;b<c;b++)d[i[b]]=b;g===h.length?i.sort(function(a,b){var c,e,g,j,i=h.length,k=f[a]._aSortData,m=f[b]._aSortData;for(g=0;g<i;g++)if(j=h[g],c=k[j.col],e=m[j.col],c=c<e?-1:c>e?1:0,0!==c)return"asc"===j.dir?c:-c;c=d[a];e=d[b];return c<e?-1:c>e?1:0}):i.sort(function(a,b){var c,g,j,i,k=h.length,m=f[a]._aSortData,p=f[b]._aSortData;for(j=0;j<k;j++)if(i=h[j],c=m[i.col],g=p[i.col],i=e[i.type+"-"+i.dir]||e["string-"+i.dir],c=i(c,g),0!==c)return c;c=d[a];
+g=d[b];return c<g?-1:c>g?1:0})}a.bSorted=!0}function Jb(a){for(var b,c,d=a.aoColumns,e=W(a),a=a.oLanguage.oAria,f=0,g=d.length;f<g;f++){c=d[f];var j=c.asSorting;b=c.sTitle.replace(/<.*?>/g,"");var i=c.nTh;i.removeAttribute("aria-sort");c.bSortable&&(0<e.length&&e[0].col==f?(i.setAttribute("aria-sort","asc"==e[0].dir?"ascending":"descending"),c=j[e[0].index+1]||j[0]):c=j[0],b+="asc"===c?a.sSortAscending:a.sSortDescending);i.setAttribute("aria-label",b)}}function Va(a,b,c,d){var e=a.aaSorting,f=a.aoColumns[b].asSorting,
+g=function(a,b){var c=a._idx;c===k&&(c=h.inArray(a[1],f));return c+1<f.length?c+1:b?null:0};"number"===typeof e[0]&&(e=a.aaSorting=[e]);c&&a.oFeatures.bSortMulti?(c=h.inArray(b,F(e,"0")),-1!==c?(b=g(e[c],!0),null===b&&1===e.length&&(b=0),null===b?e.splice(c,1):(e[c][1]=f[b],e[c]._idx=b)):(e.push([b,f[0],0]),e[e.length-1]._idx=0)):e.length&&e[0][0]==b?(b=g(e[0]),e.length=1,e[0][1]=f[b],e[0]._idx=b):(e.length=0,e.push([b,f[0]]),e[0]._idx=0);T(a);"function"==typeof d&&d(a)}function Oa(a,b,c,d){var e=
+a.aoColumns[c];Wa(b,{},function(b){!1!==e.bSortable&&(a.oFeatures.bProcessing?(C(a,!0),setTimeout(function(){Va(a,c,b.shiftKey,d);"ssp"!==y(a)&&C(a,!1)},0)):Va(a,c,b.shiftKey,d))})}function xa(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,d=W(a),e=a.oFeatures,f,g;if(e.bSort&&e.bSortClasses){e=0;for(f=b.length;e<f;e++)g=b[e].src,h(F(a.aoData,"anCells",g)).removeClass(c+(2>e?e+1:3));e=0;for(f=d.length;e<f;e++)g=d[e].src,h(F(a.aoData,"anCells",g)).addClass(c+(2>e?e+1:3))}a.aLastSort=d}function Ib(a,
+b){var c=a.aoColumns[b],d=m.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,$(a,b)));for(var f,g=m.ext.type.order[c.sType+"-pre"],j=0,i=a.aoData.length;j<i;j++)if(c=a.aoData[j],c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)f=d?e[j]:B(a,j,b,"sort"),c._aSortData[b]=g?g(f):f}function ya(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:h.extend(!0,[],a.aaSorting),search:Ab(a.oPreviousSearch),columns:h.map(a.aoColumns,
+function(b,d){return{visible:b.bVisible,search:Ab(a.aoPreSearchCols[d])}})};u(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oSavedState=b;a.fnStateSaveCallback.call(a.oInstance,a,b)}}function Kb(a){var b,c,d=a.aoColumns;if(a.oFeatures.bStateSave){var e=a.fnStateLoadCallback.call(a.oInstance,a);if(e&&e.time&&(b=u(a,"aoStateLoadParams","stateLoadParams",[a,e]),-1===h.inArray(!1,b)&&(b=a.iStateDuration,!(0<b&&e.time<+new Date-1E3*b)&&d.length===e.columns.length))){a.oLoadedState=h.extend(!0,{},e);
+e.start!==k&&(a._iDisplayStart=e.start,a.iInitDisplayStart=e.start);e.length!==k&&(a._iDisplayLength=e.length);e.order!==k&&(a.aaSorting=[],h.each(e.order,function(b,c){a.aaSorting.push(c[0]>=d.length?[0,c[1]]:c)}));e.search!==k&&h.extend(a.oPreviousSearch,Bb(e.search));b=0;for(c=e.columns.length;b<c;b++){var f=e.columns[b];f.visible!==k&&(d[b].bVisible=f.visible);f.search!==k&&h.extend(a.aoPreSearchCols[b],Bb(f.search))}u(a,"aoStateLoaded","stateLoaded",[a,e])}}}function za(a){var b=m.settings,a=
+h.inArray(a,F(b,"nTable"));return-1!==a?b[a]:null}function L(a,b,c,d){c="DataTables warning: "+(a?"table id="+a.sTableId+" - ":"")+c;d&&(c+=". For more information about this error, please see http://datatables.net/tn/"+d);if(b)D.console&&console.log&&console.log(c);else if(b=m.ext,b=b.sErrMode||b.errMode,a&&u(a,null,"error",[a,d,c]),"alert"==b)alert(c);else{if("throw"==b)throw Error(c);"function"==typeof b&&b(a,d,c)}}function E(a,b,c,d){h.isArray(c)?h.each(c,function(c,d){h.isArray(d)?E(a,b,d[0],
+d[1]):E(a,b,d)}):(d===k&&(d=c),b[c]!==k&&(a[d]=b[c]))}function Lb(a,b,c){var d,e;for(e in b)b.hasOwnProperty(e)&&(d=b[e],h.isPlainObject(d)?(h.isPlainObject(a[e])||(a[e]={}),h.extend(!0,a[e],d)):a[e]=c&&"data"!==e&&"aaData"!==e&&h.isArray(d)?d.slice():d);return a}function Wa(a,b,c){h(a).bind("click.DT",b,function(b){a.blur();c(b)}).bind("keypress.DT",b,function(a){13===a.which&&(a.preventDefault(),c(a))}).bind("selectstart.DT",function(){return!1})}function z(a,b,c,d){c&&a[b].push({fn:c,sName:d})}
+function u(a,b,c,d){var e=[];b&&(e=h.map(a[b].slice().reverse(),function(b){return b.fn.apply(a.oInstance,d)}));null!==c&&(b=h.Event(c+".dt"),h(a.nTable).trigger(b,d),e.push(b.result));return e}function Sa(a){var b=a._iDisplayStart,c=a.fnDisplayEnd(),d=a._iDisplayLength;b>=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function Pa(a,b){var c=a.renderer,d=m.ext.renderer[b];return h.isPlainObject(c)&&c[b]?d[c[b]]||d._:"string"===typeof c?d[c]||d._:d._}function y(a){return a.oFeatures.bServerSide?
+"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function Aa(a,b){var c=[],c=Mb.numbers_length,d=Math.floor(c/2);b<=c?c=X(0,b):a<=d?(c=X(0,c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-d?c=X(b-(c-2),b):(c=X(a-d+2,a+d-1),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function db(a){h.each({num:function(b){return Ba(b,a)},"num-fmt":function(b){return Ba(b,a,Xa)},"html-num":function(b){return Ba(b,a,Ca)},"html-num-fmt":function(b){return Ba(b,a,Ca,Xa)}},function(b,
+c){v.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(v.type.search[b+a]=v.type.search.html)})}function Nb(a){return function(){var b=[za(this[m.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return m.ext.internal[a].apply(this,b)}}var m,v,r,p,s,Ya={},Ob=/[\r\n]/g,Ca=/<.*?>/g,bc=/^[\w\+\-]/,cc=/[\w\+\-]$/,Zb=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),Xa=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi,M=function(a){return!a||!0===a||"-"===a?!0:!1},
+Pb=function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},Qb=function(a,b){Ya[b]||(Ya[b]=RegExp(va(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(Ya[b],"."):a},Za=function(a,b,c){var d="string"===typeof a;if(M(a))return!0;b&&d&&(a=Qb(a,b));c&&d&&(a=a.replace(Xa,""));return!isNaN(parseFloat(a))&&isFinite(a)},Rb=function(a,b,c){return M(a)?!0:!(M(a)||"string"===typeof a)?null:Za(a.replace(Ca,""),b,c)?!0:null},F=function(a,b,c){var d=[],e=0,f=a.length;if(c!==k)for(;e<
+f;e++)a[e]&&a[e][b]&&d.push(a[e][b][c]);else for(;e<f;e++)a[e]&&d.push(a[e][b]);return d},ha=function(a,b,c,d){var e=[],f=0,g=b.length;if(d!==k)for(;f<g;f++)a[b[f]][c]&&e.push(a[b[f]][c][d]);else for(;f<g;f++)e.push(a[b[f]][c]);return e},X=function(a,b){var c=[],d;b===k?(b=0,d=a):(d=b,b=a);for(var e=b;e<d;e++)c.push(e);return c},Sb=function(a){for(var b=[],c=0,d=a.length;c<d;c++)a[c]&&b.push(a[c]);return b},pa=function(a){var b=[],c,d,e=a.length,f,g=0;d=0;a:for(;d<e;d++){c=a[d];for(f=0;f<g;f++)if(b[f]===
+c)continue a;b.push(c);g++}return b},A=function(a,b,c){a[b]!==k&&(a[c]=a[b])},ba=/\[.*?\]$/,V=/\(\)$/,wa=h("<div>")[0],$b=wa.textContent!==k,ac=/<.*?>/g;m=function(a){this.$=function(a,b){return this.api(!0).$(a,b)};this._=function(a,b){return this.api(!0).rows(a,b).data()};this.api=function(a){return a?new r(za(this[v.iApiIndex])):new r(this)};this.fnAddData=function(a,b){var c=this.api(!0),d=h.isArray(a)&&(h.isArray(a[0])||h.isPlainObject(a[0]))?c.rows.add(a):c.row.add(a);(b===k||b)&&c.draw();return d.flatten().toArray()};
+this.fnAdjustColumnSizing=function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],d=c.oScroll;a===k||a?b.draw(!1):(""!==d.sX||""!==d.sY)&&ka(c)};this.fnClearTable=function(a){var b=this.api(!0).clear();(a===k||a)&&b.draw()};this.fnClose=function(a){this.api(!0).row(a).child.hide()};this.fnDeleteRow=function(a,b,c){var d=this.api(!0),a=d.rows(a),e=a.settings()[0],h=e.aoData[a[0][0]];a.remove();b&&b.call(this,e,h);(c===k||c)&&d.draw();return h};this.fnDestroy=function(a){this.api(!0).destroy(a)};
+this.fnDraw=function(a){this.api(!0).draw(a)};this.fnFilter=function(a,b,c,d,e,h){e=this.api(!0);null===b||b===k?e.search(a,c,d,h):e.column(b).search(a,c,d,h);e.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==k){var d=a.nodeName?a.nodeName.toLowerCase():"";return b!==k||"td"==d||"th"==d?c.cell(a,b).data():c.row(a).data()||null}return c.data().toArray()};this.fnGetNodes=function(a){var b=this.api(!0);return a!==k?b.row(a).node():b.rows().nodes().flatten().toArray()};this.fnGetPosition=
+function(a){var b=this.api(!0),c=a.nodeName.toUpperCase();return"TR"==c?b.row(a).index():"TD"==c||"TH"==c?(a=b.cell(a).index(),[a.row,a.columnVisible,a.column]):null};this.fnIsOpen=function(a){return this.api(!0).row(a).child.isShown()};this.fnOpen=function(a,b,c){return this.api(!0).row(a).child(b,c).show().child()[0]};this.fnPageChange=function(a,b){var c=this.api(!0).page(a);(b===k||b)&&c.draw(!1)};this.fnSetColumnVis=function(a,b,c){a=this.api(!0).column(a).visible(b);(c===k||c)&&a.columns.adjust().draw()};
+this.fnSettings=function(){return za(this[v.iApiIndex])};this.fnSort=function(a){this.api(!0).order(a).draw()};this.fnSortListener=function(a,b,c){this.api(!0).order.listener(a,b,c)};this.fnUpdate=function(a,b,c,d,e){var h=this.api(!0);c===k||null===c?h.row(b).data(a):h.cell(b,c).data(a);(e===k||e)&&h.columns.adjust();(d===k||d)&&h.draw();return 0};this.fnVersionCheck=v.fnVersionCheck;var b=this,c=a===k,d=this.length;c&&(a={});this.oApi=this.internal=v.internal;for(var e in m.ext.internal)e&&(this[e]=
+Nb(e));this.each(function(){var e={},e=1<d?Lb(e,a,!0):a,g=0,j,i=this.getAttribute("id"),n=!1,l=m.defaults,q=h(this);if("table"!=this.nodeName.toLowerCase())L(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{eb(l);fb(l.column);K(l,l,!0);K(l.column,l.column,!0);K(l,h.extend(e,q.data()));var t=m.settings,g=0;for(j=t.length;g<j;g++){var p=t[g];if(p.nTable==this||p.nTHead.parentNode==this||p.nTFoot&&p.nTFoot.parentNode==this){g=e.bRetrieve!==k?e.bRetrieve:l.bRetrieve;if(c||g)return p.oInstance;
+if(e.bDestroy!==k?e.bDestroy:l.bDestroy){p.oInstance.fnDestroy();break}else{L(p,0,"Cannot reinitialise DataTable",3);return}}if(p.sTableId==this.id){t.splice(g,1);break}}if(null===i||""===i)this.id=i="DataTables_Table_"+m.ext._unique++;var o=h.extend(!0,{},m.models.oSettings,{sDestroyWidth:q[0].style.width,sInstance:i,sTableId:i});o.nTable=this;o.oApi=b.internal;o.oInit=e;t.push(o);o.oInstance=1===b.length?b:q.dataTable();eb(e);e.oLanguage&&Fa(e.oLanguage);e.aLengthMenu&&!e.iDisplayLength&&(e.iDisplayLength=
+h.isArray(e.aLengthMenu[0])?e.aLengthMenu[0][0]:e.aLengthMenu[0]);e=Lb(h.extend(!0,{},l),e);E(o.oFeatures,e,"bPaginate bLengthChange bFilter bSort bSortMulti bInfo bProcessing bAutoWidth bSortClasses bServerSide bDeferRender".split(" "));E(o,e,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback",
+"renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"],["bJQueryUI","bJUI"]]);E(o.oScroll,e,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]);E(o.oLanguage,e,"fnInfoCallback");z(o,"aoDrawCallback",e.fnDrawCallback,"user");z(o,"aoServerParams",e.fnServerParams,"user");z(o,"aoStateSaveParams",e.fnStateSaveParams,"user");z(o,"aoStateLoadParams",
+e.fnStateLoadParams,"user");z(o,"aoStateLoaded",e.fnStateLoaded,"user");z(o,"aoRowCallback",e.fnRowCallback,"user");z(o,"aoRowCreatedCallback",e.fnCreatedRow,"user");z(o,"aoHeaderCallback",e.fnHeaderCallback,"user");z(o,"aoFooterCallback",e.fnFooterCallback,"user");z(o,"aoInitComplete",e.fnInitComplete,"user");z(o,"aoPreDrawCallback",e.fnPreDrawCallback,"user");o.rowIdFn=Q(e.rowId);gb(o);i=o.oClasses;e.bJQueryUI?(h.extend(i,m.ext.oJUIClasses,e.oClasses),e.sDom===l.sDom&&"lfrtip"===l.sDom&&(o.sDom=
+'<"H"lfr>t<"F"ip>'),o.renderer)?h.isPlainObject(o.renderer)&&!o.renderer.header&&(o.renderer.header="jqueryui"):o.renderer="jqueryui":h.extend(i,m.ext.classes,e.oClasses);q.addClass(i.sTable);o.iInitDisplayStart===k&&(o.iInitDisplayStart=e.iDisplayStart,o._iDisplayStart=e.iDisplayStart);null!==e.iDeferLoading&&(o.bDeferLoading=!0,g=h.isArray(e.iDeferLoading),o._iRecordsDisplay=g?e.iDeferLoading[0]:e.iDeferLoading,o._iRecordsTotal=g?e.iDeferLoading[1]:e.iDeferLoading);var r=o.oLanguage;h.extend(!0,
+r,e.oLanguage);""!==r.sUrl&&(h.ajax({dataType:"json",url:r.sUrl,success:function(a){Fa(a);K(l.oLanguage,a);h.extend(true,r,a);ga(o)},error:function(){ga(o)}}),n=!0);null===e.asStripeClasses&&(o.asStripeClasses=[i.sStripeOdd,i.sStripeEven]);var g=o.asStripeClasses,v=q.children("tbody").find("tr").eq(0);-1!==h.inArray(!0,h.map(g,function(a){return v.hasClass(a)}))&&(h("tbody tr",this).removeClass(g.join(" ")),o.asDestroyStripes=g.slice());t=[];g=this.getElementsByTagName("thead");0!==g.length&&(da(o.aoHeader,
+g[0]),t=qa(o));if(null===e.aoColumns){p=[];g=0;for(j=t.length;g<j;g++)p.push(null)}else p=e.aoColumns;g=0;for(j=p.length;g<j;g++)Ga(o,t?t[g]:null);ib(o,e.aoColumnDefs,p,function(a,b){ja(o,a,b)});if(v.length){var s=function(a,b){return a.getAttribute("data-"+b)!==null?b:null};h(v[0]).children("th, td").each(function(a,b){var c=o.aoColumns[a];if(c.mData===a){var d=s(b,"sort")||s(b,"order"),e=s(b,"filter")||s(b,"search");if(d!==null||e!==null){c.mData={_:a+".display",sort:d!==null?a+".@data-"+d:k,type:d!==
+null?a+".@data-"+d:k,filter:e!==null?a+".@data-"+e:k};ja(o,a)}}})}var w=o.oFeatures;e.bStateSave&&(w.bStateSave=!0,Kb(o,e),z(o,"aoDrawCallback",ya,"state_save"));if(e.aaSorting===k){t=o.aaSorting;g=0;for(j=t.length;g<j;g++)t[g][1]=o.aoColumns[g].asSorting[0]}xa(o);w.bSort&&z(o,"aoDrawCallback",function(){if(o.bSorted){var a=W(o),b={};h.each(a,function(a,c){b[c.src]=c.dir});u(o,null,"order",[o,a,b]);Jb(o)}});z(o,"aoDrawCallback",function(){(o.bSorted||y(o)==="ssp"||w.bDeferRender)&&xa(o)},"sc");g=
+q.children("caption").each(function(){this._captionSide=q.css("caption-side")});j=q.children("thead");0===j.length&&(j=h("<thead/>").appendTo(this));o.nTHead=j[0];j=q.children("tbody");0===j.length&&(j=h("<tbody/>").appendTo(this));o.nTBody=j[0];j=q.children("tfoot");if(0===j.length&&0<g.length&&(""!==o.oScroll.sX||""!==o.oScroll.sY))j=h("<tfoot/>").appendTo(this);0===j.length||0===j.children().length?q.addClass(i.sNoFooter):0<j.length&&(o.nTFoot=j[0],da(o.aoFooter,o.nTFoot));if(e.aaData)for(g=0;g<
+e.aaData.length;g++)N(o,e.aaData[g]);else(o.bDeferLoading||"dom"==y(o))&&ma(o,h(o.nTBody).children("tr"));o.aiDisplay=o.aiDisplayMaster.slice();o.bInitialised=!0;!1===n&&ga(o)}});b=null;return this};var Tb=[],w=Array.prototype,dc=function(a){var b,c,d=m.settings,e=h.map(d,function(a){return a.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase())return b=h.inArray(a,e),-1!==b?[d[b]]:null;if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===
+typeof a?c=h(a):a instanceof h&&(c=a)}else return[];if(c)return c.map(function(){b=h.inArray(this,e);return-1!==b?d[b]:null}).toArray()};r=function(a,b){if(!(this instanceof r))return new r(a,b);var c=[],d=function(a){(a=dc(a))&&(c=c.concat(a))};if(h.isArray(a))for(var e=0,f=a.length;e<f;e++)d(a[e]);else d(a);this.context=pa(c);b&&h.merge(this,b);this.selector={rows:null,cols:null,opts:null};r.extend(this,this,Tb)};m.Api=r;h.extend(r.prototype,{any:function(){return 0!==this.count()},concat:w.concat,
+context:[],count:function(){return this.flatten().length},each:function(a){for(var b=0,c=this.length;b<c;b++)a.call(this,this[b],b,this);return this},eq:function(a){var b=this.context;return b.length>a?new r(b[a],this[a]):null},filter:function(a){var b=[];if(w.filter)b=w.filter.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)a.call(this,this[c],c,this)&&b.push(this[c]);return new r(this.context,b)},flatten:function(){var a=[];return new r(this.context,a.concat.apply(a,this.toArray()))},join:w.join,
+indexOf:w.indexOf||function(a,b){for(var c=b||0,d=this.length;c<d;c++)if(this[c]===a)return c;return-1},iterator:function(a,b,c,d){var e=[],f,g,h,i,n,l=this.context,m,t,p=this.selector;"string"===typeof a&&(d=c,c=b,b=a,a=!1);g=0;for(h=l.length;g<h;g++){var o=new r(l[g]);if("table"===b)f=c.call(o,l[g],g),f!==k&&e.push(f);else if("columns"===b||"rows"===b)f=c.call(o,l[g],this[g],g),f!==k&&e.push(f);else if("column"===b||"column-rows"===b||"row"===b||"cell"===b){t=this[g];"column-rows"===b&&(m=Da(l[g],
+p.opts));i=0;for(n=t.length;i<n;i++)f=t[i],f="cell"===b?c.call(o,l[g],f.row,f.column,g,i):c.call(o,l[g],f,g,i,m),f!==k&&e.push(f)}}return e.length||d?(a=new r(l,a?e.concat.apply([],e):e),b=a.selector,b.rows=p.rows,b.cols=p.cols,b.opts=p.opts,a):this},lastIndexOf:w.lastIndexOf||function(a,b){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(a){var b=[];if(w.map)b=w.map.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)b.push(a.call(this,this[c],c));return new r(this.context,
+b)},pluck:function(a){return this.map(function(b){return b[a]})},pop:w.pop,push:w.push,reduce:w.reduce||function(a,b){return hb(this,a,b,0,this.length,1)},reduceRight:w.reduceRight||function(a,b){return hb(this,a,b,this.length-1,-1,-1)},reverse:w.reverse,selector:null,shift:w.shift,sort:w.sort,splice:w.splice,toArray:function(){return w.slice.call(this)},to$:function(){return h(this)},toJQuery:function(){return h(this)},unique:function(){return new r(this.context,pa(this))},unshift:w.unshift});r.extend=
+function(a,b,c){if(c.length&&b&&(b instanceof r||b.__dt_wrapper)){var d,e,f,g=function(a,b,c){return function(){var d=b.apply(a,arguments);r.extend(d,d,c.methodExt);return d}};d=0;for(e=c.length;d<e;d++)f=c[d],b[f.name]="function"===typeof f.val?g(a,f.val,f):h.isPlainObject(f.val)?{}:f.val,b[f.name].__dt_wrapper=!0,r.extend(a,b[f.name],f.propExt)}};r.register=p=function(a,b){if(h.isArray(a))for(var c=0,d=a.length;c<d;c++)r.register(a[c],b);else for(var e=a.split("."),f=Tb,g,j,c=0,d=e.length;c<d;c++){g=
+(j=-1!==e[c].indexOf("()"))?e[c].replace("()",""):e[c];var i;a:{i=0;for(var n=f.length;i<n;i++)if(f[i].name===g){i=f[i];break a}i=null}i||(i={name:g,val:{},methodExt:[],propExt:[]},f.push(i));c===d-1?i.val=b:f=j?i.methodExt:i.propExt}};r.registerPlural=s=function(a,b,c){r.register(a,c);r.register(b,function(){var a=c.apply(this,arguments);return a===this?this:a instanceof r?a.length?h.isArray(a[0])?new r(a.context,a[0]):a[0]:k:a})};p("tables()",function(a){var b;if(a){b=r;var c=this.context;if("number"===
+typeof a)a=[c[a]];else var d=h.map(c,function(a){return a.nTable}),a=h(d).filter(a).map(function(){var a=h.inArray(this,d);return c[a]}).toArray();b=new b(a)}else b=this;return b});p("table()",function(a){var a=this.tables(a),b=a.context;return b.length?new r(b[0]):a});s("tables().nodes()","table().node()",function(){return this.iterator("table",function(a){return a.nTable},1)});s("tables().body()","table().body()",function(){return this.iterator("table",function(a){return a.nTBody},1)});s("tables().header()",
+"table().header()",function(){return this.iterator("table",function(a){return a.nTHead},1)});s("tables().footer()","table().footer()",function(){return this.iterator("table",function(a){return a.nTFoot},1)});s("tables().containers()","table().container()",function(){return this.iterator("table",function(a){return a.nTableWrapper},1)});p("draw()",function(a){return this.iterator("table",function(b){"page"===a?O(b):("string"===typeof a&&(a="full-hold"===a?!1:!0),T(b,!1===a))})});p("page()",function(a){return a===
+k?this.page.info().page:this.iterator("table",function(b){Ta(b,a)})});p("page.info()",function(){if(0===this.context.length)return k;var a=this.context[0],b=a._iDisplayStart,c=a.oFeatures.bPaginate?a._iDisplayLength:-1,d=a.fnRecordsDisplay(),e=-1===c;return{page:e?0:Math.floor(b/c),pages:e?1:Math.ceil(d/c),start:b,end:a.fnDisplayEnd(),length:c,recordsTotal:a.fnRecordsTotal(),recordsDisplay:d,serverSide:"ssp"===y(a)}});p("page.len()",function(a){return a===k?0!==this.context.length?this.context[0]._iDisplayLength:
+k:this.iterator("table",function(b){Ra(b,a)})});var Ub=function(a,b,c){if(c){var d=new r(a);d.one("draw",function(){c(d.ajax.json())})}if("ssp"==y(a))T(a,b);else{C(a,!0);var e=a.jqXHR;e&&4!==e.readyState&&e.abort();ra(a,[],function(c){na(a);for(var c=sa(a,c),d=0,e=c.length;d<e;d++)N(a,c[d]);T(a,b);C(a,!1)})}};p("ajax.json()",function(){var a=this.context;if(0<a.length)return a[0].json});p("ajax.params()",function(){var a=this.context;if(0<a.length)return a[0].oAjaxData});p("ajax.reload()",function(a,
+b){return this.iterator("table",function(c){Ub(c,!1===b,a)})});p("ajax.url()",function(a){var b=this.context;if(a===k){if(0===b.length)return k;b=b[0];return b.ajax?h.isPlainObject(b.ajax)?b.ajax.url:b.ajax:b.sAjaxSource}return this.iterator("table",function(b){h.isPlainObject(b.ajax)?b.ajax.url=a:b.ajax=a})});p("ajax.url().load()",function(a,b){return this.iterator("table",function(c){Ub(c,!1===b,a)})});var $a=function(a,b,c,d,e){var f=[],g,j,i,n,l,m;i=typeof b;if(!b||"string"===i||"function"===
+i||b.length===k)b=[b];i=0;for(n=b.length;i<n;i++){j=b[i]&&b[i].split?b[i].split(","):[b[i]];l=0;for(m=j.length;l<m;l++)(g=c("string"===typeof j[l]?h.trim(j[l]):j[l]))&&g.length&&(f=f.concat(g))}a=v.selector[a];if(a.length){i=0;for(n=a.length;i<n;i++)f=a[i](d,e,f)}return pa(f)},ab=function(a){a||(a={});a.filter&&a.search===k&&(a.search=a.filter);return h.extend({search:"none",order:"current",page:"all"},a)},bb=function(a){for(var b=0,c=a.length;b<c;b++)if(0<a[b].length)return a[0]=a[b],a[0].length=
+1,a.length=1,a.context=[a.context[b]],a;a.length=0;return a},Da=function(a,b){var c,d,e,f=[],g=a.aiDisplay;c=a.aiDisplayMaster;var j=b.search;d=b.order;e=b.page;if("ssp"==y(a))return"removed"===j?[]:X(0,c.length);if("current"==e){c=a._iDisplayStart;for(d=a.fnDisplayEnd();c<d;c++)f.push(g[c])}else if("current"==d||"applied"==d)f="none"==j?c.slice():"applied"==j?g.slice():h.map(c,function(a){return-1===h.inArray(a,g)?a:null});else if("index"==d||"original"==d){c=0;for(d=a.aoData.length;c<d;c++)"none"==
+j?f.push(c):(e=h.inArray(c,g),(-1===e&&"removed"==j||0<=e&&"applied"==j)&&f.push(c))}return f};p("rows()",function(a,b){a===k?a="":h.isPlainObject(a)&&(b=a,a="");var b=ab(b),c=this.iterator("table",function(c){var e=b;return $a("row",a,function(a){var b=Pb(a);if(b!==null&&!e)return[b];var j=Da(c,e);if(b!==null&&h.inArray(b,j)!==-1)return[b];if(!a)return j;if(typeof a==="function")return h.map(j,function(b){var e=c.aoData[b];return a(b,e._aData,e.nTr)?b:null});b=Sb(ha(c.aoData,j,"nTr"));if(a.nodeName){if(a._DT_RowIndex!==
+k)return[a._DT_RowIndex];if(a._DT_CellIndex)return[a._DT_CellIndex.row];b=h(a).closest("*[data-dt-row]");return b.length?[b.data("dt-row")]:[]}if(typeof a==="string"&&a.charAt(0)==="#"){j=c.aIds[a.replace(/^#/,"")];if(j!==k)return[j.idx]}return h(b).filter(a).map(function(){return this._DT_RowIndex}).toArray()},c,e)},1);c.selector.rows=a;c.selector.opts=b;return c});p("rows().nodes()",function(){return this.iterator("row",function(a,b){return a.aoData[b].nTr||k},1)});p("rows().data()",function(){return this.iterator(!0,
+"rows",function(a,b){return ha(a.aoData,b,"_aData")},1)});s("rows().cache()","row().cache()",function(a){return this.iterator("row",function(b,c){var d=b.aoData[c];return"search"===a?d._aFilterData:d._aSortData},1)});s("rows().invalidate()","row().invalidate()",function(a){return this.iterator("row",function(b,c){ca(b,c,a)})});s("rows().indexes()","row().index()",function(){return this.iterator("row",function(a,b){return b},1)});s("rows().ids()","row().id()",function(a){for(var b=[],c=this.context,
+d=0,e=c.length;d<e;d++)for(var f=0,g=this[d].length;f<g;f++){var h=c[d].rowIdFn(c[d].aoData[this[d][f]]._aData);b.push((!0===a?"#":"")+h)}return new r(c,b)});s("rows().remove()","row().remove()",function(){var a=this;this.iterator("row",function(b,c,d){var e=b.aoData,f=e[c],g,h,i,n,l;e.splice(c,1);g=0;for(h=e.length;g<h;g++)if(i=e[g],l=i.anCells,null!==i.nTr&&(i.nTr._DT_RowIndex=g),null!==l){i=0;for(n=l.length;i<n;i++)l[i]._DT_CellIndex.row=g}oa(b.aiDisplayMaster,c);oa(b.aiDisplay,c);oa(a[d],c,!1);
+Sa(b);c=b.rowIdFn(f._aData);c!==k&&delete b.aIds[c]});this.iterator("table",function(a){for(var c=0,d=a.aoData.length;c<d;c++)a.aoData[c].idx=c});return this});p("rows.add()",function(a){var b=this.iterator("table",function(b){var c,f,g,h=[];f=0;for(g=a.length;f<g;f++)c=a[f],c.nodeName&&"TR"===c.nodeName.toUpperCase()?h.push(ma(b,c)[0]):h.push(N(b,c));return h},1),c=this.rows(-1);c.pop();h.merge(c,b);return c});p("row()",function(a,b){return bb(this.rows(a,b))});p("row().data()",function(a){var b=
+this.context;if(a===k)return b.length&&this.length?b[0].aoData[this[0]]._aData:k;b[0].aoData[this[0]]._aData=a;ca(b[0],this[0],"data");return this});p("row().node()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]].nTr||null:null});p("row.add()",function(a){a instanceof h&&a.length&&(a=a[0]);var b=this.iterator("table",function(b){return a.nodeName&&"TR"===a.nodeName.toUpperCase()?ma(b,a)[0]:N(b,a)});return this.row(b[0])});var cb=function(a,b){var c=a.context;if(c.length&&
+(c=c[0].aoData[b!==k?b:a[0]])&&c._details)c._details.remove(),c._detailsShow=k,c._details=k},Vb=function(a,b){var c=a.context;if(c.length&&a.length){var d=c[0].aoData[a[0]];if(d._details){(d._detailsShow=b)?d._details.insertAfter(d.nTr):d._details.detach();var e=c[0],f=new r(e),g=e.aoData;f.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details");0<F(g,"_details").length&&(f.on("draw.dt.DT_details",function(a,b){e===b&&f.rows({page:"current"}).eq(0).each(function(a){a=g[a];
+a._detailsShow&&a._details.insertAfter(a.nTr)})}),f.on("column-visibility.dt.DT_details",function(a,b){if(e===b)for(var c,d=aa(b),f=0,h=g.length;f<h;f++)c=g[f],c._details&&c._details.children("td[colspan]").attr("colspan",d)}),f.on("destroy.dt.DT_details",function(a,b){if(e===b)for(var c=0,d=g.length;c<d;c++)g[c]._details&&cb(f,c)}))}}};p("row().child()",function(a,b){var c=this.context;if(a===k)return c.length&&this.length?c[0].aoData[this[0]]._details:k;if(!0===a)this.child.show();else if(!1===
+a)cb(this);else if(c.length&&this.length){var d=c[0],c=c[0].aoData[this[0]],e=[],f=function(a,b){if(h.isArray(a)||a instanceof h)for(var c=0,k=a.length;c<k;c++)f(a[c],b);else a.nodeName&&"tr"===a.nodeName.toLowerCase()?e.push(a):(c=h("<tr><td/></tr>").addClass(b),h("td",c).addClass(b).html(a)[0].colSpan=aa(d),e.push(c[0]))};f(a,b);c._details&&c._details.remove();c._details=h(e);c._detailsShow&&c._details.insertAfter(c.nTr)}return this});p(["row().child.show()","row().child().show()"],function(){Vb(this,
+!0);return this});p(["row().child.hide()","row().child().hide()"],function(){Vb(this,!1);return this});p(["row().child.remove()","row().child().remove()"],function(){cb(this);return this});p("row().child.isShown()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var ec=/^(.+):(name|visIdx|visible)$/,Wb=function(a,b,c,d,e){for(var c=[],d=0,f=e.length;d<f;d++)c.push(B(a,e[d],b));return c};p("columns()",function(a,b){a===k?a="":h.isPlainObject(a)&&
+(b=a,a="");var b=ab(b),c=this.iterator("table",function(c){var e=a,f=b,g=c.aoColumns,j=F(g,"sName"),i=F(g,"nTh");return $a("column",e,function(a){var b=Pb(a);if(a==="")return X(g.length);if(b!==null)return[b>=0?b:g.length+b];if(typeof a==="function"){var e=Da(c,f);return h.map(g,function(b,f){return a(f,Wb(c,f,0,0,e),i[f])?f:null})}var k=typeof a==="string"?a.match(ec):"";if(k)switch(k[2]){case "visIdx":case "visible":b=parseInt(k[1],10);if(b<0){var m=h.map(g,function(a,b){return a.bVisible?b:null});
+return[m[m.length+b]]}return[Z(c,b)];case "name":return h.map(j,function(a,b){return a===k[1]?b:null});default:return[]}if(a.nodeName&&a._DT_CellIndex)return[a._DT_CellIndex.column];b=h(i).filter(a).map(function(){return h.inArray(this,i)}).toArray();if(b.length||!a.nodeName)return b;b=h(a).closest("*[data-dt-column]");return b.length?[b.data("dt-column")]:[]},c,f)},1);c.selector.cols=a;c.selector.opts=b;return c});s("columns().header()","column().header()",function(){return this.iterator("column",
+function(a,b){return a.aoColumns[b].nTh},1)});s("columns().footer()","column().footer()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTf},1)});s("columns().data()","column().data()",function(){return this.iterator("column-rows",Wb,1)});s("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});s("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b,
+c,d,e,f){return ha(b.aoData,f,"search"===a?"_aFilterData":"_aSortData",c)},1)});s("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,d,e){return ha(a.aoData,e,"anCells",b)},1)});s("columns().visible()","column().visible()",function(a,b){return this.iterator("column",function(c,d){if(a===k)return c.aoColumns[d].bVisible;var e=c.aoColumns,f=e[d],g=c.aoData,j,i,n;if(a!==k&&f.bVisible!==a){if(a){var l=h.inArray(!0,F(e,"bVisible"),d+1);j=0;for(i=g.length;j<
+i;j++)n=g[j].nTr,e=g[j].anCells,n&&n.insertBefore(e[d],e[l]||null)}else h(F(c.aoData,"anCells",d)).detach();f.bVisible=a;ea(c,c.aoHeader);ea(c,c.aoFooter);(b===k||b)&&U(c);u(c,null,"column-visibility",[c,d,a,b]);ya(c)}})});s("columns().indexes()","column().index()",function(a){return this.iterator("column",function(b,c){return"visible"===a?$(b,c):c},1)});p("columns.adjust()",function(){return this.iterator("table",function(a){U(a)},1)});p("column.index()",function(a,b){if(0!==this.context.length){var c=
+this.context[0];if("fromVisible"===a||"toData"===a)return Z(c,b);if("fromData"===a||"toVisible"===a)return $(c,b)}});p("column()",function(a,b){return bb(this.columns(a,b))});p("cells()",function(a,b,c){h.isPlainObject(a)&&(a.row===k?(c=a,a=null):(c=b,b=null));h.isPlainObject(b)&&(c=b,b=null);if(null===b||b===k)return this.iterator("table",function(b){var d=a,e=ab(c),f=b.aoData,g=Da(b,e),j=Sb(ha(f,g,"anCells")),i=h([].concat.apply([],j)),l,n=b.aoColumns.length,m,p,r,u,v,s;return $a("cell",d,function(a){var c=
+typeof a==="function";if(a===null||a===k||c){m=[];p=0;for(r=g.length;p<r;p++){l=g[p];for(u=0;u<n;u++){v={row:l,column:u};if(c){s=f[l];a(v,B(b,l,u),s.anCells?s.anCells[u]:null)&&m.push(v)}else m.push(v)}}return m}if(h.isPlainObject(a))return[a];c=i.filter(a).map(function(a,b){return{row:b._DT_CellIndex.row,column:b._DT_CellIndex.column}}).toArray();if(c.length||!a.nodeName)return c;s=h(a).closest("*[data-dt-row]");return s.length?[{row:s.data("dt-row"),column:s.data("dt-column")}]:[]},b,e)});var d=
+this.columns(b,c),e=this.rows(a,c),f,g,j,i,n,l=this.iterator("table",function(a,b){f=[];g=0;for(j=e[b].length;g<j;g++){i=0;for(n=d[b].length;i<n;i++)f.push({row:e[b][g],column:d[b][i]})}return f},1);h.extend(l.selector,{cols:b,rows:a,opts:c});return l});s("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(a,b,c){return(a=a.aoData[b])&&a.anCells?a.anCells[c]:k},1)});p("cells().data()",function(){return this.iterator("cell",function(a,b,c){return B(a,b,c)},1)});s("cells().cache()",
+"cell().cache()",function(a){a="search"===a?"_aFilterData":"_aSortData";return this.iterator("cell",function(b,c,d){return b.aoData[c][a][d]},1)});s("cells().render()","cell().render()",function(a){return this.iterator("cell",function(b,c,d){return B(b,c,d,a)},1)});s("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(a,b,c){return{row:b,column:c,columnVisible:$(a,c)}},1)});s("cells().invalidate()","cell().invalidate()",function(a){return this.iterator("cell",function(b,
+c,d){ca(b,c,a,d)})});p("cell()",function(a,b,c){return bb(this.cells(a,b,c))});p("cell().data()",function(a){var b=this.context,c=this[0];if(a===k)return b.length&&c.length?B(b[0],c[0].row,c[0].column):k;jb(b[0],c[0].row,c[0].column,a);ca(b[0],c[0].row,"data",c[0].column);return this});p("order()",function(a,b){var c=this.context;if(a===k)return 0!==c.length?c[0].aaSorting:k;"number"===typeof a?a=[[a,b]]:h.isArray(a[0])||(a=Array.prototype.slice.call(arguments));return this.iterator("table",function(b){b.aaSorting=
+a.slice()})});p("order.listener()",function(a,b,c){return this.iterator("table",function(d){Oa(d,a,b,c)})});p("order.fixed()",function(a){if(!a){var b=this.context,b=b.length?b[0].aaSortingFixed:k;return h.isArray(b)?{pre:b}:b}return this.iterator("table",function(b){b.aaSortingFixed=h.extend(!0,{},a)})});p(["columns().order()","column().order()"],function(a){var b=this;return this.iterator("table",function(c,d){var e=[];h.each(b[d],function(b,c){e.push([c,a])});c.aaSorting=e})});p("search()",function(a,
+b,c,d){var e=this.context;return a===k?0!==e.length?e[0].oPreviousSearch.sSearch:k:this.iterator("table",function(e){e.oFeatures.bFilter&&fa(e,h.extend({},e.oPreviousSearch,{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),1)})});s("columns().search()","column().search()",function(a,b,c,d){return this.iterator("column",function(e,f){var g=e.aoPreSearchCols;if(a===k)return g[f].sSearch;e.oFeatures.bFilter&&(h.extend(g[f],{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===
+c?!0:c,bCaseInsensitive:null===d?!0:d}),fa(e,e.oPreviousSearch,1))})});p("state()",function(){return this.context.length?this.context[0].oSavedState:null});p("state.clear()",function(){return this.iterator("table",function(a){a.fnStateSaveCallback.call(a.oInstance,a,{})})});p("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null});p("state.save()",function(){return this.iterator("table",function(a){ya(a)})});m.versionCheck=m.fnVersionCheck=function(a){for(var b=
+m.version.split("."),a=a.split("."),c,d,e=0,f=a.length;e<f;e++)if(c=parseInt(b[e],10)||0,d=parseInt(a[e],10)||0,c!==d)return c>d;return!0};m.isDataTable=m.fnIsDataTable=function(a){var b=h(a).get(0),c=!1;h.each(m.settings,function(a,e){var f=e.nScrollHead?h("table",e.nScrollHead)[0]:null,g=e.nScrollFoot?h("table",e.nScrollFoot)[0]:null;if(e.nTable===b||f===b||g===b)c=!0});return c};m.tables=m.fnTables=function(a){var b=!1;h.isPlainObject(a)&&(b=a.api,a=a.visible);var c=h.map(m.settings,function(b){if(!a||
+a&&h(b.nTable).is(":visible"))return b.nTable});return b?new r(c):c};m.util={throttle:ua,escapeRegex:va};m.camelToHungarian=K;p("$()",function(a,b){var c=this.rows(b).nodes(),c=h(c);return h([].concat(c.filter(a).toArray(),c.find(a).toArray()))});h.each(["on","one","off"],function(a,b){p(b+"()",function(){var a=Array.prototype.slice.call(arguments);a[0].match(/\.dt\b/)||(a[0]+=".dt");var d=h(this.tables().nodes());d[b].apply(d,a);return this})});p("clear()",function(){return this.iterator("table",
+function(a){na(a)})});p("settings()",function(){return new r(this.context,this.context)});p("init()",function(){var a=this.context;return a.length?a[0].oInit:null});p("data()",function(){return this.iterator("table",function(a){return F(a.aoData,"_aData")}).flatten()});p("destroy()",function(a){a=a||!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,d=b.oClasses,e=b.nTable,f=b.nTBody,g=b.nTHead,j=b.nTFoot,i=h(e),f=h(f),k=h(b.nTableWrapper),l=h.map(b.aoData,function(a){return a.nTr}),
+p;b.bDestroying=!0;u(b,"aoDestroyCallback","destroy",[b]);a||(new r(b)).columns().visible(!0);k.unbind(".DT").find(":not(tbody *)").unbind(".DT");h(D).unbind(".DT-"+b.sInstance);e!=g.parentNode&&(i.children("thead").detach(),i.append(g));j&&e!=j.parentNode&&(i.children("tfoot").detach(),i.append(j));b.aaSorting=[];b.aaSortingFixed=[];xa(b);h(l).removeClass(b.asStripeClasses.join(" "));h("th, td",g).removeClass(d.sSortable+" "+d.sSortableAsc+" "+d.sSortableDesc+" "+d.sSortableNone);b.bJUI&&(h("th span."+
+d.sSortIcon+", td span."+d.sSortIcon,g).detach(),h("th, td",g).each(function(){var a=h("div."+d.sSortJUIWrapper,this);h(this).append(a.contents());a.detach()}));f.children().detach();f.append(l);g=a?"remove":"detach";i[g]();k[g]();!a&&c&&(c.insertBefore(e,b.nTableReinsertBefore),i.css("width",b.sDestroyWidth).removeClass(d.sTable),(p=b.asDestroyStripes.length)&&f.children().each(function(a){h(this).addClass(b.asDestroyStripes[a%p])}));c=h.inArray(b,m.settings);-1!==c&&m.settings.splice(c,1)})});h.each(["column",
+"row","cell"],function(a,b){p(b+"s().every()",function(a){var d=this.selector.opts,e=this;return this.iterator(b,function(f,g,h,i,n){a.call(e[b](g,"cell"===b?h:d,"cell"===b?d:k),g,h,i,n)})})});p("i18n()",function(a,b,c){var d=this.context[0],a=Q(a)(d.oLanguage);a===k&&(a=b);c!==k&&h.isPlainObject(a)&&(a=a[c]!==k?a[c]:a._);return a.replace("%d",c)});m.version="1.10.11";m.settings=[];m.models={};m.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};m.models.oRow={nTr:null,anCells:null,
+_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1};m.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};m.defaults=
+{aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,
+this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+
+"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",
+sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:h.extend({},m.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};
+Y(m.defaults);m.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};Y(m.defaults.column);m.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,
+bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],
+aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:k,oAjaxData:k,fnServerData:null,
+aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==y(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==y(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=
+this._iDisplayLength,b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,f=e.bPaginate;return e.bServerSide?!1===f||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!f||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};m.ext=v={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},
+header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:m.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:m.version};h.extend(v,{afnFiltering:v.search,aTypes:v.type.detect,ofnSearch:v.type.search,oSort:v.type.order,afnSortData:v.order,aoFeatures:v.feature,oApi:v.internal,oStdClasses:v.classes,oPagination:v.pager});h.extend(m.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",
+sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",
+sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var Ea="",Ea="",H=Ea+"ui-state-default",ia=Ea+"css_right ui-icon ui-icon-",Xb=Ea+"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix";h.extend(m.ext.oJUIClasses,
+m.ext.classes,{sPageButton:"fg-button ui-button "+H,sPageButtonActive:"ui-state-disabled",sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:H+" sorting_asc",sSortDesc:H+" sorting_desc",sSortable:H+" sorting",sSortableAsc:H+" sorting_asc_disabled",sSortableDesc:H+" sorting_desc_disabled",sSortableNone:H+" sorting_disabled",sSortJUIAsc:ia+"triangle-1-n",sSortJUIDesc:ia+"triangle-1-s",sSortJUI:ia+"carat-2-n-s",
+sSortJUIAscAllowed:ia+"carat-1-n",sSortJUIDescAllowed:ia+"carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead "+H,sScrollFoot:"dataTables_scrollFoot "+H,sHeaderTH:H,sFooterTH:H,sJUIHeader:Xb+" ui-corner-tl ui-corner-tr",sJUIFooter:Xb+" ui-corner-bl ui-corner-br"});var Mb=m.ext.pager;h.extend(Mb,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},numbers:function(a,b){return[Aa(a,
+b)]},simple_numbers:function(a,b){return["previous",Aa(a,b),"next"]},full_numbers:function(a,b){return["first","previous",Aa(a,b),"next","last"]},_numbers:Aa,numbers_length:7});h.extend(!0,m.ext.renderer,{pageButton:{_:function(a,b,c,d,e,f){var g=a.oClasses,j=a.oLanguage.oPaginate,i=a.oLanguage.oAria.paginate||{},k,l,m=0,p=function(b,d){var o,r,u,s,v=function(b){Ta(a,b.data.action,true)};o=0;for(r=d.length;o<r;o++){s=d[o];if(h.isArray(s)){u=h("<"+(s.DT_el||"div")+"/>").appendTo(b);p(u,s)}else{k=null;
+l="";switch(s){case "ellipsis":b.append('<span class="ellipsis">&#x2026;</span>');break;case "first":k=j.sFirst;l=s+(e>0?"":" "+g.sPageButtonDisabled);break;case "previous":k=j.sPrevious;l=s+(e>0?"":" "+g.sPageButtonDisabled);break;case "next":k=j.sNext;l=s+(e<f-1?"":" "+g.sPageButtonDisabled);break;case "last":k=j.sLast;l=s+(e<f-1?"":" "+g.sPageButtonDisabled);break;default:k=s+1;l=e===s?g.sPageButtonActive:""}if(k!==null){u=h("<a>",{"class":g.sPageButton+" "+l,"aria-controls":a.sTableId,"aria-label":i[s],
+"data-dt-idx":m,tabindex:a.iTabIndex,id:c===0&&typeof s==="string"?a.sTableId+"_"+s:null}).html(k).appendTo(b);Wa(u,{action:s},v);m++}}}},r;try{r=h(b).find(I.activeElement).data("dt-idx")}catch(o){}p(h(b).empty(),d);r&&h(b).find("[data-dt-idx="+r+"]").focus()}}});h.extend(m.ext.type.detect,[function(a,b){var c=b.oLanguage.sDecimal;return Za(a,c)?"num"+c:null},function(a){if(a&&!(a instanceof Date)&&(!bc.test(a)||!cc.test(a)))return null;var b=Date.parse(a);return null!==b&&!isNaN(b)||M(a)?"date":
+null},function(a,b){var c=b.oLanguage.sDecimal;return Za(a,c,!0)?"num-fmt"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Rb(a,c)?"html-num"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Rb(a,c,!0)?"html-num-fmt"+c:null},function(a){return M(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);h.extend(m.ext.type.search,{html:function(a){return M(a)?a:"string"===typeof a?a.replace(Ob," ").replace(Ca,""):""},string:function(a){return M(a)?a:"string"===typeof a?a.replace(Ob,
+" "):a}});var Ba=function(a,b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=Qb(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};h.extend(v.type.order,{"date-pre":function(a){return Date.parse(a)||0},"html-pre":function(a){return M(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return M(a)?"":"string"===typeof a?a.toLowerCase():!a.toString?"":a.toString()},"string-asc":function(a,b){return a<b?-1:a>b?1:0},"string-desc":function(a,
+b){return a<b?1:a>b?-1:0}});db("");h.extend(!0,m.ext.renderer,{header:{_:function(a,b,c,d){h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(c.sSortingClass+" "+d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass)}})},jqueryui:function(a,b,c,d){h("<div/>").addClass(d.sSortJUIWrapper).append(b.contents()).append(h("<span/>").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);h(a.nTable).on("order.dt.DT",function(e,
+f,g,h){if(a===f){e=c.idx;b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass);b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass(h[e]=="asc"?d.sSortJUIAsc:h[e]=="desc"?d.sSortJUIDesc:c.sSortingClassJUI)}})}}});var Yb=function(a){return"string"===typeof a?a.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):a};m.render={number:function(a,
+b,c,d,e){return{display:function(f){if("number"!==typeof f&&"string"!==typeof f)return f;var g=0>f?"-":"",h=parseFloat(f);if(isNaN(h))return Yb(f);f=Math.abs(h);h=parseInt(f,10);f=c?b+(f-h).toFixed(c).substring(2):"";return g+(d||"")+h.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+f+(e||"")}}},text:function(){return{display:Yb}}};h.extend(m.ext.internal,{_fnExternApiFunc:Nb,_fnBuildAjax:ra,_fnAjaxUpdate:lb,_fnAjaxParameters:ub,_fnAjaxUpdateDraw:vb,_fnAjaxDataSrc:sa,_fnAddColumn:Ga,_fnColumnOptions:ja,
+_fnAdjustColumnSizing:U,_fnVisibleToColumnIndex:Z,_fnColumnIndexToVisible:$,_fnVisbleColumns:aa,_fnGetColumns:la,_fnColumnTypes:Ia,_fnApplyColumnDefs:ib,_fnHungarianMap:Y,_fnCamelToHungarian:K,_fnLanguageCompat:Fa,_fnBrowserDetect:gb,_fnAddData:N,_fnAddTr:ma,_fnNodeToDataIndex:function(a,b){return b._DT_RowIndex!==k?b._DT_RowIndex:null},_fnNodeToColumnIndex:function(a,b,c){return h.inArray(c,a.aoData[b].anCells)},_fnGetCellData:B,_fnSetCellData:jb,_fnSplitObjNotation:La,_fnGetObjectDataFn:Q,_fnSetObjectDataFn:R,
+_fnGetDataMaster:Ma,_fnClearTable:na,_fnDeleteIndex:oa,_fnInvalidate:ca,_fnGetRowElements:Ka,_fnCreateTr:Ja,_fnBuildHead:kb,_fnDrawHead:ea,_fnDraw:O,_fnReDraw:T,_fnAddOptionsHtml:nb,_fnDetectHeader:da,_fnGetUniqueThs:qa,_fnFeatureHtmlFilter:pb,_fnFilterComplete:fa,_fnFilterCustom:yb,_fnFilterColumn:xb,_fnFilter:wb,_fnFilterCreateSearch:Qa,_fnEscapeRegex:va,_fnFilterData:zb,_fnFeatureHtmlInfo:sb,_fnUpdateInfo:Cb,_fnInfoMacros:Db,_fnInitialise:ga,_fnInitComplete:ta,_fnLengthChange:Ra,_fnFeatureHtmlLength:ob,
+_fnFeatureHtmlPaginate:tb,_fnPageChange:Ta,_fnFeatureHtmlProcessing:qb,_fnProcessingDisplay:C,_fnFeatureHtmlTable:rb,_fnScrollDraw:ka,_fnApplyToChildren:J,_fnCalculateColumnWidths:Ha,_fnThrottle:ua,_fnConvertToWidth:Fb,_fnGetWidestNode:Gb,_fnGetMaxLenString:Hb,_fnStringToCss:x,_fnSortFlatten:W,_fnSort:mb,_fnSortAria:Jb,_fnSortListener:Va,_fnSortAttachListener:Oa,_fnSortingClasses:xa,_fnSortData:Ib,_fnSaveState:ya,_fnLoadState:Kb,_fnSettingsFromNode:za,_fnLog:L,_fnMap:E,_fnBindAction:Wa,_fnCallbackReg:z,
+_fnCallbackFire:u,_fnLengthOverflow:Sa,_fnRenderer:Pa,_fnDataSource:y,_fnRowAttributes:Na,_fnCalculateEnd:function(){}});h.fn.dataTable=m;m.$=h;h.fn.dataTableSettings=m.settings;h.fn.dataTableExt=m.ext;h.fn.DataTable=function(a){return h(this).dataTable(a).api()};h.each(m,function(a,b){h.fn.DataTable[a]=b});return h.fn.dataTable});
diff --git a/common/src/main/webapp/thirdparty/data-tables/style-datatable.css b/common/src/main/webapp/thirdparty/data-tables/style-datatable.css
new file mode 100644
index 0000000..516848f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/data-tables/style-datatable.css
@@ -0,0 +1,154 @@
+/* remove rounds from all elements */
+
+div,
+input,
+select,
+textarea,
+span,
+img,
+table,
+td,
+th,
+p,
+a,
+button,
+ul,
+code,
+pre,
+li {
+ -webkit-border-radius: 0 !important;
+ -moz-border-radius: 0 !important;
+ border-radius: 0 !important;
+}
+
+.input-mini {
+ width: 25px !important;
+ height:15px !important;
+ padding-top: 2px !important;
+ margin: 0 2px !important;
+}
+
+.input-xsmall {
+ width: 80px !important;
+ height:25px !important;
+ padding-top: 2%;
+}
+
+.input-small {
+ width: 120px !important;
+}
+
+.input-medium {
+ width: 240px !important;
+}
+
+.input-large {
+ width: 320px !important;
+}
+
+.input-xlarge {
+ width: 480px !important;
+}
+
+.input-inline {
+ display: inline-block;
+ width: auto;
+ vertical-align: middle;
+}
+
+.form-control {
+ font-size: 14px;
+ font-weight: normal;
+ color: #333333;
+ background-color: #ffffff;
+ border: 1px solid #e5e5e5;
+ border-radius: 0;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+ transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+}
+
+.pagination-panel {
+ font-size: 13px !important;
+}
+
+.dataTables_length label {
+ font-weight: 400;
+ font-size: 13px !important;
+}
+
+.dataTables_info {
+ font-size: 13px !important;
+}
+
+.dataTable tbody {
+ font-size: 13px;
+}
+
+/***
+Bootstrap Tables
+***/
+
+.table thead > tr > th {
+ border-bottom: 0;
+}
+
+.table tbody tr.active td,
+.table tbody tr.active th {
+ background-color: #e9e9e9 !important;
+}
+
+.table tbody tr.active:hover td,
+.table tbody tr.active:hover th {
+ background-color: #e1e1e1 !important;
+}
+
+.table-striped tbody tr.active:nth-child(odd) td,
+.table-striped tbody tr.active:nth-child(odd) th {
+ background-color: #017ebc;
+}
+
+.table .heading > th {
+ background-color: #eee !important;
+}
+
+.detailTable {
+ border-collapse:collapse;border-spacing:0;border-left:1px solid #888;border-top:1px solid #888;
+}
+
+.detailTable td{border:1px solid #ddd !important;}
+
+/*
+.detailTitleStyle {
+ background-color: #428bca !important;
+}
+*/
+
+.labelDetailTable {
+ display: inline;
+ padding: .2em .6em .3em;
+ font-size: 75%;
+ font-weight: bold;
+ line-height: 1;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: baseline;
+ border-radius: .25em;
+}
+/*
+.oddDetailTable td{
+ background-color: #fff !important;
+}
+*/
+.evenDetailTable td{
+ background-color: #f9f9f9 !important;
+}
+
+.detailCellStyle{
+ WORD-WRAP: break-word;
+}
+
+#buttonConfirm:hover {
+ cursor:pointer !important;
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/echarts/echarts-all.js b/common/src/main/webapp/thirdparty/echarts/echarts-all.js
new file mode 100644
index 0000000..e45bf99
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/echarts/echarts-all.js
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2015 ZTE, Inc. and others. All rights reserved. (ZTE)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+!function(e){var t,i;!function(){function e(e,t){if(!t)return e;if(0===e.indexOf(".")){var i=t.split("/"),n=e.split("/"),a=i.length-1,o=n.length,r=0,s=0;e:for(var l=0;o>l;l++)switch(n[l]){case"..":if(!(a>r))break e;r++,s++;break;case".":s++;break;default:break e}return i.length=a-r,n=n.slice(s),i.concat(n).join("/")}return e}function n(t){function i(i,r){if("string"==typeof i){var s=n[i];return s||(s=o(e(i,t)),n[i]=s),s}i instanceof Array&&(r=r||function(){},r.apply(this,a(i,r,t)))}var n={};return i}function a(i,n,a){for(var s=[],l=r[a],h=0,m=Math.min(i.length,n.length);m>h;h++){var V,U=e(i[h],a);switch(U){case"require":V=l&&l.require||t;break;case"exports":V=l.exports;break;case"module":V=l;break;default:V=o(U)}s.push(V)}return s}function o(e){var t=r[e];if(!t)throw new Error("No "+e);if(!t.defined){var i=t.factory,n=i.apply(this,a(t.deps||[],i,e));"undefined"!=typeof n&&(t.exports=n),t.defined=1}return t.exports}var r={};i=function(e,t,i){r[e]={id:e,deps:t,factory:i,defined:0,exports:{},require:n(e)}},t=n("")}(),i("echarts",["echarts/echarts"],function(e){return e}),i("echarts/echarts",["require","./config","zrender/tool/util","zrender/tool/event","zrender/tool/env","zrender","zrender/config","./chart/island","./component/toolbox","./component","./component/title","./component/tooltip","./component/legend","./util/ecData","./chart","zrender/tool/color","./component/timeline","zrender/shape/Image","zrender/loadingEffect/Bar","zrender/loadingEffect/Bubble","zrender/loadingEffect/DynamicLine","zrender/loadingEffect/Ring","zrender/loadingEffect/Spin","zrender/loadingEffect/Whirling","./theme/macarons","./theme/infographic"],function(e){function t(){r.Dispatcher.call(this)}function i(e){e.innerHTML="",this._themeConfig={},this.dom=e,this._connected=!1,this._status={dragIn:!1,dragOut:!1,needRefresh:!1},this._curEventType=!1,this._chartList=[],this._messageCenter=new t,this._messageCenterOutSide=new t,this.resize=this.resize(),this._init()}function n(e,t,i,n,a){for(var o=e._chartList,r=o.length;r--;){var s=o[r];"function"==typeof s[t]&&s[t](i,n,a)}}var a=e("./config"),o=e("zrender/tool/util"),r=e("zrender/tool/event"),s={},l=e("zrender/tool/env").canvasSupported,h=new Date-0,m={},V="_echarts_instance_";s.version="2.2.7",s.dependencies={zrender:"2.1.1"},s.init=function(t,n){var a=e("zrender");a.version.replace(".","")-0<s.dependencies.zrender.replace(".","")-0&&console.error("ZRender "+a.version+" is too old for ECharts "+s.version+". Current version need ZRender "+s.dependencies.zrender+"+"),t=t instanceof Array?t[0]:t;var o=t.getAttribute(V);return o||(o=h++,t.setAttribute(V,o)),m[o]&&m[o].dispose(),m[o]=new i(t),m[o].id=o,m[o].canvasSupported=l,m[o].setTheme(n),m[o]},s.getInstanceById=function(e){return m[e]},o.merge(t.prototype,r.Dispatcher.prototype,!0);var U=e("zrender/config").EVENT,d=["CLICK","DBLCLICK","MOUSEOVER","MOUSEOUT","DRAGSTART","DRAGEND","DRAGENTER","DRAGOVER","DRAGLEAVE","DROP"];return i.prototype={_init:function(){var t=this,i=e("zrender").init(this.dom);this._zr=i,this._messageCenter.dispatch=function(e,i,n,a){n=n||{},n.type=e,n.event=i,t._messageCenter.dispatchWithContext(e,n,a),t._messageCenterOutSide.dispatchWithContext(e,n,a)},this._onevent=function(e){return t.__onevent(e)};for(var n in a.EVENT)"CLICK"!=n&&"DBLCLICK"!=n&&"HOVER"!=n&&"MOUSEOUT"!=n&&"MAP_ROAM"!=n&&this._messageCenter.bind(a.EVENT[n],this._onevent,this);var o={};this._onzrevent=function(e){return t[o[e.type]](e)};for(var r=0,s=d.length;s>r;r++){var l=d[r],h=U[l];o[h]="_on"+l.toLowerCase(),i.on(h,this._onzrevent)}this.chart={},this.component={};var m=e("./chart/island");this._island=new m(this._themeConfig,this._messageCenter,i,{},this),this.chart.island=this._island;var V=e("./component/toolbox");this._toolbox=new V(this._themeConfig,this._messageCenter,i,{},this),this.component.toolbox=this._toolbox;var p=e("./component");p.define("title",e("./component/title")),p.define("tooltip",e("./component/tooltip")),p.define("legend",e("./component/legend")),(0===i.getWidth()||0===i.getHeight())&&console.error("Dom’s width & height should be ready before init.")},__onevent:function(e){e.__echartsId=e.__echartsId||this.id;var t=e.__echartsId===this.id;switch(this._curEventType||(this._curEventType=e.type),e.type){case a.EVENT.LEGEND_SELECTED:this._onlegendSelected(e);break;case a.EVENT.DATA_ZOOM:if(!t){var i=this.component.dataZoom;i&&(i.silence(!0),i.absoluteZoom(e.zoom),i.silence(!1))}this._ondataZoom(e);break;case a.EVENT.DATA_RANGE:t&&this._ondataRange(e);break;case a.EVENT.MAGIC_TYPE_CHANGED:if(!t){var n=this.component.toolbox;n&&(n.silence(!0),n.setMagicType(e.magicType),n.silence(!1))}this._onmagicTypeChanged(e);break;case a.EVENT.DATA_VIEW_CHANGED:t&&this._ondataViewChanged(e);break;case a.EVENT.TOOLTIP_HOVER:t&&this._tooltipHover(e);break;case a.EVENT.RESTORE:this._onrestore();break;case a.EVENT.REFRESH:t&&this._onrefresh(e);break;case a.EVENT.TOOLTIP_IN_GRID:case a.EVENT.TOOLTIP_OUT_GRID:if(t){if(this._connected){var o=this.component.grid;o&&(e.x=(e.event.zrenderX-o.getX())/o.getWidth(),e.y=(e.event.zrenderY-o.getY())/o.getHeight())}}else{var o=this.component.grid;o&&this._zr.trigger("mousemove",{connectTrigger:!0,zrenderX:o.getX()+e.x*o.getWidth(),zrenderY:o.getY()+e.y*o.getHeight()})}}if(this._connected&&t&&this._curEventType===e.type){for(var r in this._connected)this._connected[r].connectedEventHandler(e);this._curEventType=null}(!t||!this._connected&&t)&&(this._curEventType=null)},_onclick:function(e){if(n(this,"onclick",e),e.target){var t=this._eventPackage(e.target);t&&null!=t.seriesIndex&&this._messageCenter.dispatch(a.EVENT.CLICK,e.event,t,this)}},_ondblclick:function(e){if(n(this,"ondblclick",e),e.target){var t=this._eventPackage(e.target);t&&null!=t.seriesIndex&&this._messageCenter.dispatch(a.EVENT.DBLCLICK,e.event,t,this)}},_onmouseover:function(e){if(e.target){var t=this._eventPackage(e.target);t&&null!=t.seriesIndex&&this._messageCenter.dispatch(a.EVENT.HOVER,e.event,t,this)}},_onmouseout:function(e){if(e.target){var t=this._eventPackage(e.target);t&&null!=t.seriesIndex&&this._messageCenter.dispatch(a.EVENT.MOUSEOUT,e.event,t,this)}},_ondragstart:function(e){this._status={dragIn:!1,dragOut:!1,needRefresh:!1},n(this,"ondragstart",e)},_ondragenter:function(e){n(this,"ondragenter",e)},_ondragover:function(e){n(this,"ondragover",e)},_ondragleave:function(e){n(this,"ondragleave",e)},_ondrop:function(e){n(this,"ondrop",e,this._status),this._island.ondrop(e,this._status)},_ondragend:function(e){if(n(this,"ondragend",e,this._status),this._timeline&&this._timeline.ondragend(e,this._status),this._island.ondragend(e,this._status),this._status.needRefresh){this._syncBackupData(this._option);var t=this._messageCenter;t.dispatch(a.EVENT.DATA_CHANGED,e.event,this._eventPackage(e.target),this),t.dispatch(a.EVENT.REFRESH,null,null,this)}},_onlegendSelected:function(e){this._status.needRefresh=!1,n(this,"onlegendSelected",e,this._status),this._status.needRefresh&&this._messageCenter.dispatch(a.EVENT.REFRESH,null,null,this)},_ondataZoom:function(e){this._status.needRefresh=!1,n(this,"ondataZoom",e,this._status),this._status.needRefresh&&this._messageCenter.dispatch(a.EVENT.REFRESH,null,null,this)},_ondataRange:function(e){this._clearEffect(),this._status.needRefresh=!1,n(this,"ondataRange",e,this._status),this._status.needRefresh&&this._zr.refreshNextFrame()},_onmagicTypeChanged:function(){this._clearEffect(),this._render(this._toolbox.getMagicOption())},_ondataViewChanged:function(e){this._syncBackupData(e.option),this._messageCenter.dispatch(a.EVENT.DATA_CHANGED,null,e,this),this._messageCenter.dispatch(a.EVENT.REFRESH,null,null,this)},_tooltipHover:function(e){var t=[];n(this,"ontooltipHover",e,t)},_onrestore:function(){this.restore()},_onrefresh:function(e){this._refreshInside=!0,this.refresh(e),this._refreshInside=!1},_syncBackupData:function(e){this.component.dataZoom&&this.component.dataZoom.syncBackupData(e)},_eventPackage:function(t){if(t){var i=e("./util/ecData"),n=i.get(t,"seriesIndex"),a=i.get(t,"dataIndex");return a=-1!=n&&this.component.dataZoom?this.component.dataZoom.getRealDataIndex(n,a):a,{seriesIndex:n,seriesName:(i.get(t,"series")||{}).name,dataIndex:a,data:i.get(t,"data"),name:i.get(t,"name"),value:i.get(t,"value"),special:i.get(t,"special")}}},_noDataCheck:function(e){for(var t=e.series,i=0,n=t.length;n>i;i++)if(t[i].type==a.CHART_TYPE_MAP||t[i].data&&t[i].data.length>0||t[i].markPoint&&t[i].markPoint.data&&t[i].markPoint.data.length>0||t[i].markLine&&t[i].markLine.data&&t[i].markLine.data.length>0||t[i].nodes&&t[i].nodes.length>0||t[i].links&&t[i].links.length>0||t[i].matrix&&t[i].matrix.length>0||t[i].eventList&&t[i].eventList.length>0)return!1;var o=this._option&&this._option.noDataLoadingOption||this._themeConfig.noDataLoadingOption||a.noDataLoadingOption||{text:this._option&&this._option.noDataText||this._themeConfig.noDataText||a.noDataText,effect:this._option&&this._option.noDataEffect||this._themeConfig.noDataEffect||a.noDataEffect};return this.clear(),this.showLoading(o),!0},_render:function(t){if(this._mergeGlobalConifg(t),!this._noDataCheck(t)){var i=t.backgroundColor;if(i)if(l||-1==i.indexOf("rgba"))this.dom.style.backgroundColor=i;else{var n=i.split(",");this.dom.style.filter="alpha(opacity="+100*n[3].substring(0,n[3].lastIndexOf(")"))+")",n.length=3,n[0]=n[0].replace("a",""),this.dom.style.backgroundColor=n.join(",")+")"}this._zr.clearAnimation(),this._chartList=[];var o=e("./chart"),r=e("./component");(t.xAxis||t.yAxis)&&(t.grid=t.grid||{},t.dataZoom=t.dataZoom||{});for(var s,h,m,V=["title","legend","tooltip","dataRange","roamController","grid","dataZoom","xAxis","yAxis","polar"],U=0,d=V.length;d>U;U++)h=V[U],m=this.component[h],t[h]?(m?m.refresh&&m.refresh(t):(s=r.get(/^[xy]Axis$/.test(h)?"axis":h),m=new s(this._themeConfig,this._messageCenter,this._zr,t,this,h),this.component[h]=m),this._chartList.push(m)):m&&(m.dispose(),this.component[h]=null,delete this.component[h]);for(var p,c,u,y={},U=0,d=t.series.length;d>U;U++)c=t.series[U].type,c?y[c]||(y[c]=!0,p=o.get(c),p?(this.chart[c]?(u=this.chart[c],u.refresh(t)):u=new p(this._themeConfig,this._messageCenter,this._zr,t,this),this._chartList.push(u),this.chart[c]=u):console.error(c+" has not been required.")):console.error("series["+U+"] chart type has not been defined.");for(c in this.chart)c==a.CHART_TYPE_ISLAND||y[c]||(this.chart[c].dispose(),this.chart[c]=null,delete this.chart[c]);this.component.grid&&this.component.grid.refixAxisShape(this.component),this._island.refresh(t),this._toolbox.refresh(t),t.animation&&!t.renderAsImage?this._zr.refresh():this._zr.render();var g="IMG"+this.id,b=document.getElementById(g);t.renderAsImage&&l?(b?b.src=this.getDataURL(t.renderAsImage):(b=this.getImage(t.renderAsImage),b.id=g,b.style.position="absolute",b.style.left=0,b.style.top=0,this.dom.firstChild.appendChild(b)),this.un(),this._zr.un(),this._disposeChartList(),this._zr.clear()):b&&b.parentNode.removeChild(b),b=null,this._option=t}},restore:function(){this._clearEffect(),this._option=o.clone(this._optionRestore),this._disposeChartList(),this._island.clear(),this._toolbox.reset(this._option,!0),this._render(this._option)},refresh:function(e){this._clearEffect(),e=e||{};var t=e.option;!this._refreshInside&&t&&(t=this.getOption(),o.merge(t,e.option,!0),o.merge(this._optionRestore,e.option,!0),this._toolbox.reset(t)),this._island.refresh(t),this._toolbox.refresh(t),this._zr.clearAnimation();for(var i=0,n=this._chartList.length;n>i;i++)this._chartList[i].refresh&&this._chartList[i].refresh(t);this.component.grid&&this.component.grid.refixAxisShape(this.component),this._zr.refresh()},_disposeChartList:function(){this._clearEffect(),this._zr.clearAnimation();for(var e=this._chartList.length;e--;){var t=this._chartList[e];if(t){var i=t.type;this.chart[i]&&delete this.chart[i],this.component[i]&&delete this.component[i],t.dispose&&t.dispose()}}this._chartList=[]},_mergeGlobalConifg:function(t){for(var i=["backgroundColor","calculable","calculableColor","calculableHolderColor","nameConnector","valueConnector","animation","animationThreshold","animationDuration","animationDurationUpdate","animationEasing","addDataAnimation","symbolList","DRAG_ENABLE_TIME"],n=i.length;n--;){var o=i[n];null==t[o]&&(t[o]=null!=this._themeConfig[o]?this._themeConfig[o]:a[o])}var r=t.color;r&&r.length||(r=this._themeConfig.color||a.color),this._zr.getColor=function(t){var i=e("zrender/tool/color");return i.getColor(t,r)},l||(t.animation=!1,t.addDataAnimation=!1)},setOption:function(e,t){return e.timeline?this._setTimelineOption(e):this._setOption(e,t)},_setOption:function(e,t,i){return!t&&this._option?this._option=o.merge(this.getOption(),o.clone(e),!0):(this._option=o.clone(e),!i&&this._timeline&&this._timeline.dispose()),this._optionRestore=o.clone(this._option),this._option.series&&0!==this._option.series.length?(this.component.dataZoom&&(this._option.dataZoom||this._option.toolbox&&this._option.toolbox.feature&&this._option.toolbox.feature.dataZoom&&this._option.toolbox.feature.dataZoom.show)&&this.component.dataZoom.syncOption(this._option),this._toolbox.reset(this._option),this._render(this._option),this):void this._zr.clear()},getOption:function(){function e(e){var n=i._optionRestore[e];if(n)if(n instanceof Array)for(var a=n.length;a--;)t[e][a].data=o.clone(n[a].data);else t[e].data=o.clone(n.data)}var t=o.clone(this._option),i=this;return e("xAxis"),e("yAxis"),e("series"),t},setSeries:function(e,t){return t?(this._option.series=e,this.setOption(this._option,t)):this.setOption({series:e}),this},getSeries:function(){return this.getOption().series},_setTimelineOption:function(t){this._timeline&&this._timeline.dispose();var i=e("./component/timeline"),n=new i(this._themeConfig,this._messageCenter,this._zr,t,this);return this._timeline=n,this.component.timeline=this._timeline,this},addData:function(e,t,i,n,r){function s(){if(V._zr){V._zr.clearAnimation();for(var e=0,t=X.length;t>e;e++)X[e].motionlessOnce=h.addDataAnimation&&X[e].addDataAnimation;V._messageCenter.dispatch(a.EVENT.REFRESH,null,{option:h},V)}}for(var l=e instanceof Array?e:[[e,t,i,n,r]],h=this.getOption(),m=this._optionRestore,V=this,U=0,d=l.length;d>U;U++){e=l[U][0],t=l[U][1],i=l[U][2],n=l[U][3],r=l[U][4];var p=m.series[e],c=i?"unshift":"push",u=i?"pop":"shift";if(p){var y=p.data,g=h.series[e].data;if(y[c](t),g[c](t),n||(y[u](),t=g[u]()),null!=r){var b,f;if(p.type===a.CHART_TYPE_PIE&&(b=m.legend)&&(f=b.data)){var k=h.legend.data;if(f[c](r),k[c](r),!n){var x=o.indexOf(f,t.name);-1!=x&&f.splice(x,1),x=o.indexOf(k,t.name),-1!=x&&k.splice(x,1)}}else if(null!=m.xAxis&&null!=m.yAxis){var _,L,W=p.xAxisIndex||0;(null==m.xAxis[W].type||"category"===m.xAxis[W].type)&&(_=m.xAxis[W].data,L=h.xAxis[W].data,_[c](r),L[c](r),n||(_[u](),L[u]())),W=p.yAxisIndex||0,"category"===m.yAxis[W].type&&(_=m.yAxis[W].data,L=h.yAxis[W].data,_[c](r),L[c](r),n||(_[u](),L[u]()))}}this._option.series[e].data=h.series[e].data}}this._zr.clearAnimation();for(var X=this._chartList,v=0,w=function(){v--,0===v&&s()},U=0,d=X.length;d>U;U++)h.addDataAnimation&&X[U].addDataAnimation&&(v++,X[U].addDataAnimation(l,w));return this.component.dataZoom&&this.component.dataZoom.syncOption(h),this._option=h,h.addDataAnimation||setTimeout(s,0),this},addMarkPoint:function(e,t){return this._addMark(e,t,"markPoint")},addMarkLine:function(e,t){return this._addMark(e,t,"markLine")},_addMark:function(e,t,i){var n,a=this._option.series;if(a&&(n=a[e])){var r=this._optionRestore.series,s=r[e],l=n[i],h=s[i];l=n[i]=l||{data:[]},h=s[i]=h||{data:[]};for(var m in t)"data"===m?(l.data=l.data.concat(t.data),h.data=h.data.concat(t.data)):"object"!=typeof t[m]||null==l[m]?l[m]=h[m]=t[m]:(o.merge(l[m],t[m],!0),o.merge(h[m],t[m],!0));var V=this.chart[n.type];V&&V.addMark(e,t,i)}return this},delMarkPoint:function(e,t){return this._delMark(e,t,"markPoint")},delMarkLine:function(e,t){return this._delMark(e,t,"markLine")},_delMark:function(e,t,i){var n,a,o,r=this._option.series;if(!(r&&(n=r[e])&&(a=n[i])&&(o=a.data)))return this;t=t.split(" > ");for(var s=-1,l=0,h=o.length;h>l;l++){var m=o[l];if(m instanceof Array){if(m[0].name===t[0]&&m[1].name===t[1]){s=l;break}}else if(m.name===t[0]){s=l;break}}if(s>-1){o.splice(s,1),this._optionRestore.series[e][i].data.splice(s,1);var V=this.chart[n.type];V&&V.delMark(e,t.join(" > "),i)}return this},getDom:function(){return this.dom},getZrender:function(){return this._zr},getDataURL:function(e){if(!l)return"";if(0===this._chartList.length){var t="IMG"+this.id,i=document.getElementById(t);if(i)return i.src}var n=this.component.tooltip;switch(n&&n.hideTip(),e){case"jpeg":break;default:e="png"}var a=this._option.backgroundColor;return a&&"rgba(0,0,0,0)"===a.replace(" ","")&&(a="#fff"),this._zr.toDataURL("image/"+e,a)},getImage:function(e){var t=this._optionRestore.title,i=document.createElement("img");return i.src=this.getDataURL(e),i.title=t&&t.text||"ECharts",i},getConnectedDataURL:function(t){if(!this.isConnected())return this.getDataURL(t);var i=this.dom,n={self:{img:this.getDataURL(t),left:i.offsetLeft,top:i.offsetTop,right:i.offsetLeft+i.offsetWidth,bottom:i.offsetTop+i.offsetHeight}},a=n.self.left,o=n.self.top,r=n.self.right,s=n.self.bottom;for(var l in this._connected)i=this._connected[l].getDom(),n[l]={img:this._connected[l].getDataURL(t),left:i.offsetLeft,top:i.offsetTop,right:i.offsetLeft+i.offsetWidth,bottom:i.offsetTop+i.offsetHeight},a=Math.min(a,n[l].left),o=Math.min(o,n[l].top),r=Math.max(r,n[l].right),s=Math.max(s,n[l].bottom);var h=document.createElement("div");h.style.position="absolute",h.style.left="-4000px",h.style.width=r-a+"px",h.style.height=s-o+"px",document.body.appendChild(h);var m=e("zrender").init(h),V=e("zrender/shape/Image");for(var l in n)m.addShape(new V({style:{x:n[l].left-a,y:n[l].top-o,image:n[l].img}}));m.render();var U=this._option.backgroundColor;U&&"rgba(0,0,0,0)"===U.replace(/ /g,"")&&(U="#fff");var d=m.toDataURL("image/png",U);return setTimeout(function(){m.dispose(),h.parentNode.removeChild(h),h=null},100),d},getConnectedImage:function(e){var t=this._optionRestore.title,i=document.createElement("img");return i.src=this.getConnectedDataURL(e),i.title=t&&t.text||"ECharts",i},on:function(e,t){return this._messageCenterOutSide.bind(e,t,this),this},un:function(e,t){return this._messageCenterOutSide.unbind(e,t),this},connect:function(e){if(!e)return this;if(this._connected||(this._connected={}),e instanceof Array)for(var t=0,i=e.length;i>t;t++)this._connected[e[t].id]=e[t];else this._connected[e.id]=e;return this},disConnect:function(e){if(!e||!this._connected)return this;if(e instanceof Array)for(var t=0,i=e.length;i>t;t++)delete this._connected[e[t].id];else delete this._connected[e.id];for(var n in this._connected)return this;return this._connected=!1,this},connectedEventHandler:function(e){e.__echartsId!=this.id&&this._onevent(e)},isConnected:function(){return!!this._connected},showLoading:function(t){var i={bar:e("zrender/loadingEffect/Bar"),bubble:e("zrender/loadingEffect/Bubble"),dynamicLine:e("zrender/loadingEffect/DynamicLine"),ring:e("zrender/loadingEffect/Ring"),spin:e("zrender/loadingEffect/Spin"),whirling:e("zrender/loadingEffect/Whirling")};this._toolbox.hideDataView(),t=t||{};var n=t.textStyle||{};t.textStyle=n;var r=o.merge(o.merge(o.clone(n),this._themeConfig.textStyle),a.textStyle);n.textFont=r.fontStyle+" "+r.fontWeight+" "+r.fontSize+"px "+r.fontFamily,n.text=t.text||this._option&&this._option.loadingText||this._themeConfig.loadingText||a.loadingText,null!=t.x&&(n.x=t.x),null!=t.y&&(n.y=t.y),t.effectOption=t.effectOption||{},t.effectOption.textStyle=n;var s=t.effect;return("string"==typeof s||null==s)&&(s=i[t.effect||this._option&&this._option.loadingEffect||this._themeConfig.loadingEffect||a.loadingEffect]||i.spin),this._zr.showLoading(new s(t.effectOption)),this},hideLoading:function(){return this._zr.hideLoading(),this},setTheme:function(t){if(t){if("string"==typeof t)switch(t){case"macarons":t=e("./theme/macarons");break;case"infographic":t=e("./theme/infographic");break;default:t={}}else t=t||{};this._themeConfig=t}if(!l){var i=this._themeConfig.textStyle;i&&i.fontFamily&&i.fontFamily2&&(i.fontFamily=i.fontFamily2),i=a.textStyle,i.fontFamily=i.fontFamily2}this._timeline&&this._timeline.setTheme(!0),this._optionRestore&&this.restore()},resize:function(){var e=this;return function(){if(e._clearEffect(),e._zr.resize(),e._option&&e._option.renderAsImage&&l)return e._render(e._option),e;e._zr.clearAnimation(),e._island.resize(),e._toolbox.resize(),e._timeline&&e._timeline.resize();for(var t=0,i=e._chartList.length;i>t;t++)e._chartList[t].resize&&e._chartList[t].resize();return e.component.grid&&e.component.grid.refixAxisShape(e.component),e._zr.refresh(),e._messageCenter.dispatch(a.EVENT.RESIZE,null,null,e),e}},_clearEffect:function(){this._zr.modLayer(a.EFFECT_ZLEVEL,{motionBlur:!1}),this._zr.painter.clearLayer(a.EFFECT_ZLEVEL)},clear:function(){return this._disposeChartList(),this._zr.clear(),this._option={},this._optionRestore={},this.dom.style.backgroundColor=null,this},dispose:function(){var e=this.dom.getAttribute(V);e&&delete m[e],this._island.dispose(),this._toolbox.dispose(),this._timeline&&this._timeline.dispose(),this._messageCenter.unbind(),this.clear(),this._zr.dispose(),this._zr=null}},s}),i("echarts/config",[],function(){var e={CHART_TYPE_LINE:"line",CHART_TYPE_BAR:"bar",CHART_TYPE_SCATTER:"scatter",CHART_TYPE_PIE:"pie",CHART_TYPE_RADAR:"radar",CHART_TYPE_VENN:"venn",CHART_TYPE_TREEMAP:"treemap",CHART_TYPE_TREE:"tree",CHART_TYPE_MAP:"map",CHART_TYPE_K:"k",CHART_TYPE_ISLAND:"island",CHART_TYPE_FORCE:"force",CHART_TYPE_CHORD:"chord",CHART_TYPE_GAUGE:"gauge",CHART_TYPE_FUNNEL:"funnel",CHART_TYPE_EVENTRIVER:"eventRiver",CHART_TYPE_WORDCLOUD:"wordCloud",CHART_TYPE_HEATMAP:"heatmap",COMPONENT_TYPE_TITLE:"title",COMPONENT_TYPE_LEGEND:"legend",COMPONENT_TYPE_DATARANGE:"dataRange",COMPONENT_TYPE_DATAVIEW:"dataView",COMPONENT_TYPE_DATAZOOM:"dataZoom",COMPONENT_TYPE_TOOLBOX:"toolbox",COMPONENT_TYPE_TOOLTIP:"tooltip",COMPONENT_TYPE_GRID:"grid",COMPONENT_TYPE_AXIS:"axis",COMPONENT_TYPE_POLAR:"polar",COMPONENT_TYPE_X_AXIS:"xAxis",COMPONENT_TYPE_Y_AXIS:"yAxis",COMPONENT_TYPE_AXIS_CATEGORY:"categoryAxis",COMPONENT_TYPE_AXIS_VALUE:"valueAxis",COMPONENT_TYPE_TIMELINE:"timeline",COMPONENT_TYPE_ROAMCONTROLLER:"roamController",backgroundColor:"rgba(0,0,0,0)",color:["#ff7f50","#87cefa","#da70d6","#32cd32","#6495ed","#ff69b4","#ba55d3","#cd5c5c","#ffa500","#40e0d0","#1e90ff","#ff6347","#7b68ee","#00fa9a","#ffd700","#6699FF","#ff6666","#3cb371","#b8860b","#30e0e0"],markPoint:{clickable:!0,symbol:"pin",symbolSize:10,large:!1,effect:{show:!1,loop:!0,period:15,type:"scale",scaleSize:2,bounceDistance:10},itemStyle:{normal:{borderWidth:2,label:{show:!0,position:"inside"}},emphasis:{label:{show:!0}}}},markLine:{clickable:!0,symbol:["circle","arrow"],symbolSize:[2,4],smoothness:.2,precision:2,effect:{show:!1,loop:!0,period:15,scaleSize:2},bundling:{enable:!1,maxTurningAngle:45},itemStyle:{normal:{borderWidth:1.5,label:{show:!0,position:"end"},lineStyle:{type:"dashed"}},emphasis:{label:{show:!1},lineStyle:{}}}},textStyle:{decoration:"none",fontFamily:"Arial, Verdana, sans-serif",fontFamily2:"微软雅黑",fontSize:12,fontStyle:"normal",fontWeight:"normal"},EVENT:{REFRESH:"refresh",RESTORE:"restore",RESIZE:"resize",CLICK:"click",DBLCLICK:"dblclick",HOVER:"hover",MOUSEOUT:"mouseout",DATA_CHANGED:"dataChanged",DATA_ZOOM:"dataZoom",DATA_RANGE:"dataRange",DATA_RANGE_SELECTED:"dataRangeSelected",DATA_RANGE_HOVERLINK:"dataRangeHoverLink",LEGEND_SELECTED:"legendSelected",LEGEND_HOVERLINK:"legendHoverLink",MAP_SELECTED:"mapSelected",PIE_SELECTED:"pieSelected",MAGIC_TYPE_CHANGED:"magicTypeChanged",DATA_VIEW_CHANGED:"dataViewChanged",TIMELINE_CHANGED:"timelineChanged",MAP_ROAM:"mapRoam",FORCE_LAYOUT_END:"forceLayoutEnd",TOOLTIP_HOVER:"tooltipHover",TOOLTIP_IN_GRID:"tooltipInGrid",TOOLTIP_OUT_GRID:"tooltipOutGrid",ROAMCONTROLLER:"roamController"},DRAG_ENABLE_TIME:120,EFFECT_ZLEVEL:10,effectBlendAlpha:.95,symbolList:["circle","rectangle","triangle","diamond","emptyCircle","emptyRectangle","emptyTriangle","emptyDiamond"],loadingEffect:"spin",loadingText:"æ•°æ®è¯»å–中...",noDataEffect:"bubble",noDataText:"æš‚æ— æ•°æ®",calculable:!1,calculableColor:"rgba(255,165,0,0.6)",calculableHolderColor:"#ccc",nameConnector:" & ",valueConnector:": ",animation:!0,addDataAnimation:!0,animationThreshold:2e3,animationDuration:2e3,animationDurationUpdate:500,animationEasing:"ExponentialOut"};return e}),i("zrender/tool/util",["require","../dep/excanvas"],function(e){function t(e){return e&&1===e.nodeType&&"string"==typeof e.nodeName}function i(e){if("object"==typeof e&&null!==e){var n=e;if(e instanceof Array){n=[];for(var a=0,o=e.length;o>a;a++)n[a]=i(e[a])}else if(!y[g.call(e)]&&!t(e)){n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=i(e[r]))}return n}return e}function n(e,i,n,o){if(i.hasOwnProperty(n)){var r=e[n];"object"!=typeof r||y[g.call(r)]||t(r)?!o&&n in e||(e[n]=i[n]):a(e[n],i[n],o)}}function a(e,t,i){for(var a in t)n(e,t,a,i);return e}function o(){if(!U)if(e("../dep/excanvas"),window.G_vmlCanvasManager){var t=document.createElement("div");t.style.position="absolute",t.style.top="-1000px",document.body.appendChild(t),U=G_vmlCanvasManager.initElement(t).getContext("2d")}else U=document.createElement("canvas").getContext("2d");return U}function r(e,t){if(e.indexOf)return e.indexOf(t);for(var i=0,n=e.length;n>i;i++)if(e[i]===t)return i;return-1}function s(e,t){function i(){}var n=e.prototype;i.prototype=t.prototype,e.prototype=new i;for(var a in n)e.prototype[a]=n[a];e.constructor=e}function l(e,t,i){if(e&&t)if(e.forEach&&e.forEach===p)e.forEach(t,i);else if(e.length===+e.length)for(var n=0,a=e.length;a>n;n++)t.call(i,e[n],n,e);else for(var o in e)e.hasOwnProperty(o)&&t.call(i,e[o],o,e)}function h(e,t,i){if(e&&t){if(e.map&&e.map===c)return e.map(t,i);for(var n=[],a=0,o=e.length;o>a;a++)n.push(t.call(i,e[a],a,e));return n}}function m(e,t,i){if(e&&t){if(e.filter&&e.filter===u)return e.filter(t,i);for(var n=[],a=0,o=e.length;o>a;a++)t.call(i,e[a],a,e)&&n.push(e[a]);return n}}function V(e,t){return function(){e.apply(t,arguments)}}var U,d=Array.prototype,p=d.forEach,c=d.map,u=d.filter,y={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1},g=Object.prototype.toString;return{inherits:s,clone:i,merge:a,getContext:o,indexOf:r,each:l,map:h,filter:m,bind:V}}),i("zrender/tool/event",["require","../mixin/Eventful"],function(e){"use strict";function t(e){return"undefined"!=typeof e.zrenderX&&e.zrenderX||"undefined"!=typeof e.offsetX&&e.offsetX||"undefined"!=typeof e.layerX&&e.layerX||"undefined"!=typeof e.clientX&&e.clientX}function i(e){return"undefined"!=typeof e.zrenderY&&e.zrenderY||"undefined"!=typeof e.offsetY&&e.offsetY||"undefined"!=typeof e.layerY&&e.layerY||"undefined"!=typeof e.clientY&&e.clientY}function n(e){return"undefined"!=typeof e.zrenderDelta&&e.zrenderDelta||"undefined"!=typeof e.wheelDelta&&e.wheelDelta||"undefined"!=typeof e.detail&&-e.detail}var a=e("../mixin/Eventful"),o="function"==typeof window.addEventListener?function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0}:function(e){e.returnValue=!1,e.cancelBubble=!0};return{getX:t,getY:i,getDelta:n,stop:o,Dispatcher:a}}),i("zrender/tool/env",[],function(){function e(e){var t=this.os={},i=this.browser={},n=e.match(/Web[kK]it[\/]{0,1}([\d.]+)/),a=e.match(/(Android);?[\s\/]+([\d.]+)?/),o=e.match(/(iPad).*OS\s([\d_]+)/),r=e.match(/(iPod)(.*OS\s([\d_]+))?/),s=!o&&e.match(/(iPhone\sOS)\s([\d_]+)/),l=e.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),h=l&&e.match(/TouchPad/),m=e.match(/Kindle\/([\d.]+)/),V=e.match(/Silk\/([\d._]+)/),U=e.match(/(BlackBerry).*Version\/([\d.]+)/),d=e.match(/(BB10).*Version\/([\d.]+)/),p=e.match(/(RIM\sTablet\sOS)\s([\d.]+)/),c=e.match(/PlayBook/),u=e.match(/Chrome\/([\d.]+)/)||e.match(/CriOS\/([\d.]+)/),y=e.match(/Firefox\/([\d.]+)/),g=e.match(/MSIE ([\d.]+)/),b=n&&e.match(/Mobile\//)&&!u,f=e.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/)&&!u,g=e.match(/MSIE\s([\d.]+)/);return(i.webkit=!!n)&&(i.version=n[1]),a&&(t.android=!0,t.version=a[2]),s&&!r&&(t.ios=t.iphone=!0,t.version=s[2].replace(/_/g,".")),o&&(t.ios=t.ipad=!0,t.version=o[2].replace(/_/g,".")),r&&(t.ios=t.ipod=!0,t.version=r[3]?r[3].replace(/_/g,"."):null),l&&(t.webos=!0,t.version=l[2]),h&&(t.touchpad=!0),U&&(t.blackberry=!0,t.version=U[2]),d&&(t.bb10=!0,t.version=d[2]),p&&(t.rimtabletos=!0,t.version=p[2]),c&&(i.playbook=!0),m&&(t.kindle=!0,t.version=m[1]),V&&(i.silk=!0,i.version=V[1]),!V&&t.android&&e.match(/Kindle Fire/)&&(i.silk=!0),u&&(i.chrome=!0,i.version=u[1]),y&&(i.firefox=!0,i.version=y[1]),g&&(i.ie=!0,i.version=g[1]),b&&(e.match(/Safari/)||t.ios)&&(i.safari=!0),f&&(i.webview=!0),g&&(i.ie=!0,i.version=g[1]),t.tablet=!!(o||c||a&&!e.match(/Mobile/)||y&&e.match(/Tablet/)||g&&!e.match(/Phone/)&&e.match(/Touch/)),t.phone=!(t.tablet||t.ipod||!(a||s||l||U||d||u&&e.match(/Android/)||u&&e.match(/CriOS\/([\d.]+)/)||y&&e.match(/Mobile/)||g&&e.match(/Touch/))),{browser:i,os:t,canvasSupported:document.createElement("canvas").getContext?!0:!1}}return e(navigator.userAgent)}),i("zrender",["zrender/zrender"],function(e){return e}),i("zrender/zrender",["require","./dep/excanvas","./tool/util","./tool/log","./tool/guid","./Handler","./Painter","./Storage","./animation/Animation","./tool/env"],function(e){function t(e){return function(){e._needsRefreshNextFrame&&e.refresh()}}e("./dep/excanvas");var i=e("./tool/util"),n=e("./tool/log"),a=e("./tool/guid"),o=e("./Handler"),r=e("./Painter"),s=e("./Storage"),l=e("./animation/Animation"),h={},m={};m.version="2.1.1",m.init=function(e){var t=new V(a(),e);return h[t.id]=t,t},m.dispose=function(e){if(e)e.dispose();else{for(var t in h)h[t].dispose();h={}}return m},m.getInstance=function(e){return h[e]},m.delInstance=function(e){return delete h[e],m};var V=function(i,n){this.id=i,this.env=e("./tool/env"),this.storage=new s,this.painter=new r(n,this.storage),this.handler=new o(n,this.storage,this.painter),this.animation=new l({stage:{update:t(this)}}),this.animation.start();var a=this;this.painter.refreshNextFrame=function(){a.refreshNextFrame()},this._needsRefreshNextFrame=!1;var a=this,h=this.storage,m=h.delFromMap;h.delFromMap=function(e){var t=h.get(e);a.stopAnimation(t),m.call(h,e)}};return V.prototype.getId=function(){return this.id},V.prototype.addShape=function(e){return this.addElement(e),this},V.prototype.addGroup=function(e){return this.addElement(e),this},V.prototype.delShape=function(e){return this.delElement(e),this},V.prototype.delGroup=function(e){return this.delElement(e),this},V.prototype.modShape=function(e,t){return this.modElement(e,t),this},V.prototype.modGroup=function(e,t){return this.modElement(e,t),this},V.prototype.addElement=function(e){return this.storage.addRoot(e),this._needsRefreshNextFrame=!0,this},V.prototype.delElement=function(e){return this.storage.delRoot(e),this._needsRefreshNextFrame=!0,this},V.prototype.modElement=function(e,t){return this.storage.mod(e,t),this._needsRefreshNextFrame=!0,this},V.prototype.modLayer=function(e,t){return this.painter.modLayer(e,t),this._needsRefreshNextFrame=!0,this},V.prototype.addHoverShape=function(e){return this.storage.addHover(e),this},V.prototype.render=function(e){return this.painter.render(e),this._needsRefreshNextFrame=!1,this},V.prototype.refresh=function(e){return this.painter.refresh(e),this._needsRefreshNextFrame=!1,this},V.prototype.refreshNextFrame=function(){return this._needsRefreshNextFrame=!0,this},V.prototype.refreshHover=function(e){return this.painter.refreshHover(e),this},V.prototype.refreshShapes=function(e,t){return this.painter.refreshShapes(e,t),this},V.prototype.resize=function(){return this.painter.resize(),this},V.prototype.animate=function(e,t,a){var o=this;if("string"==typeof e&&(e=this.storage.get(e)),e){var r;if(t){for(var s=t.split("."),l=e,h=0,m=s.length;m>h;h++)l&&(l=l[s[h]]);l&&(r=l)}else r=e;if(!r)return void n('Property "'+t+'" is not existed in element '+e.id);
+
+null==e.__animators&&(e.__animators=[]);var V=e.__animators,U=this.animation.animate(r,{loop:a}).during(function(){o.modShape(e)}).done(function(){var t=i.indexOf(e.__animators,U);t>=0&&V.splice(t,1)});return V.push(U),U}n("Element not existed")},V.prototype.stopAnimation=function(e){if(e.__animators){for(var t=e.__animators,i=t.length,n=0;i>n;n++)t[n].stop();t.length=0}return this},V.prototype.clearAnimation=function(){return this.animation.clear(),this},V.prototype.showLoading=function(e){return this.painter.showLoading(e),this},V.prototype.hideLoading=function(){return this.painter.hideLoading(),this},V.prototype.getWidth=function(){return this.painter.getWidth()},V.prototype.getHeight=function(){return this.painter.getHeight()},V.prototype.toDataURL=function(e,t,i){return this.painter.toDataURL(e,t,i)},V.prototype.shapeToImage=function(e,t,i){var n=a();return this.painter.shapeToImage(n,e,t,i)},V.prototype.on=function(e,t,i){return this.handler.on(e,t,i),this},V.prototype.un=function(e,t){return this.handler.un(e,t),this},V.prototype.trigger=function(e,t){return this.handler.trigger(e,t),this},V.prototype.clear=function(){return this.storage.delRoot(),this.painter.clear(),this},V.prototype.dispose=function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,m.delInstance(this.id)},m}),i("zrender/config",[],function(){var e={EVENT:{RESIZE:"resize",CLICK:"click",DBLCLICK:"dblclick",MOUSEWHEEL:"mousewheel",MOUSEMOVE:"mousemove",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",GLOBALOUT:"globalout",DRAGSTART:"dragstart",DRAGEND:"dragend",DRAGENTER:"dragenter",DRAGOVER:"dragover",DRAGLEAVE:"dragleave",DROP:"drop",touchClickDelay:300},elementClassName:"zr-element",catchBrushException:!1,debugMode:0,devicePixelRatio:Math.max(window.devicePixelRatio||1,1)};return e}),i("echarts/chart/island",["require","./base","zrender/shape/Circle","../config","../util/ecData","zrender/tool/util","zrender/tool/event","zrender/tool/color","../util/accMath","../chart"],function(e){function t(e,t,n,a,r){i.call(this,e,t,n,a,r),this._nameConnector,this._valueConnector,this._zrHeight=this.zr.getHeight(),this._zrWidth=this.zr.getWidth();var l=this;l.shapeHandler.onmousewheel=function(e){var t=e.target,i=e.event,n=s.getDelta(i);n=n>0?-1:1,t.style.r-=n,t.style.r=t.style.r<5?5:t.style.r;var a=o.get(t,"value"),r=a*l.option.island.calculateStep;a=r>1?Math.round(a-r*n):+(a-r*n).toFixed(2);var h=o.get(t,"name");t.style.text=h+":"+a,o.set(t,"value",a),o.set(t,"name",h),l.zr.modShape(t.id),l.zr.refreshNextFrame(),s.stop(i)}}var i=e("./base"),n=e("zrender/shape/Circle"),a=e("../config");a.island={zlevel:0,z:5,r:15,calculateStep:.1};var o=e("../util/ecData"),r=e("zrender/tool/util"),s=e("zrender/tool/event");return t.prototype={type:a.CHART_TYPE_ISLAND,_combine:function(t,i){var n=e("zrender/tool/color"),a=e("../util/accMath"),r=a.accAdd(o.get(t,"value"),o.get(i,"value")),s=o.get(t,"name")+this._nameConnector+o.get(i,"name");t.style.text=s+this._valueConnector+r,o.set(t,"value",r),o.set(t,"name",s),t.style.r=this.option.island.r,t.style.color=n.mix(t.style.color,i.style.color)},refresh:function(e){e&&(e.island=this.reformOption(e.island),this.option=e,this._nameConnector=this.option.nameConnector,this._valueConnector=this.option.valueConnector)},getOption:function(){return this.option},resize:function(){var e=this.zr.getWidth(),t=this.zr.getHeight(),i=e/(this._zrWidth||e),n=t/(this._zrHeight||t);if(1!==i||1!==n){this._zrWidth=e,this._zrHeight=t;for(var a=0,o=this.shapeList.length;o>a;a++)this.zr.modShape(this.shapeList[a].id,{style:{x:Math.round(this.shapeList[a].style.x*i),y:Math.round(this.shapeList[a].style.y*n)}})}},add:function(e){var t=o.get(e,"name"),i=o.get(e,"value"),a=null!=o.get(e,"series")?o.get(e,"series").name:"",r=this.getFont(this.option.island.textStyle),s=this.option.island,l={zlevel:s.zlevel,z:s.z,style:{x:e.style.x,y:e.style.y,r:this.option.island.r,color:e.style.color||e.style.strokeColor,text:t+this._valueConnector+i,textFont:r},draggable:!0,hoverable:!0,onmousewheel:this.shapeHandler.onmousewheel,_type:"island"};"#fff"===l.style.color&&(l.style.color=e.style.strokeColor),this.setCalculable(l),l.dragEnableTime=0,o.pack(l,{name:a},-1,i,-1,t),l=new n(l),this.shapeList.push(l),this.zr.addShape(l)},del:function(e){this.zr.delShape(e.id);for(var t=[],i=0,n=this.shapeList.length;n>i;i++)this.shapeList[i].id!=e.id&&t.push(this.shapeList[i]);this.shapeList=t},ondrop:function(e,t){if(this.isDrop&&e.target){var i=e.target,n=e.dragged;this._combine(i,n),this.zr.modShape(i.id),t.dragIn=!0,this.isDrop=!1}},ondragend:function(e,t){var i=e.target;this.isDragend?t.dragIn&&(this.del(i),t.needRefresh=!0):t.dragIn||(i.style.x=s.getX(e.event),i.style.y=s.getY(e.event),this.add(i),t.needRefresh=!0),this.isDragend=!1}},r.inherits(t,i),e("../chart").define("island",t),t}),i("echarts/component/toolbox",["require","./base","zrender/shape/Line","zrender/shape/Image","zrender/shape/Rectangle","../util/shape/Icon","../config","zrender/tool/util","zrender/config","zrender/tool/event","./dataView","../component"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o),this.dom=o.dom,this._magicType={},this._magicMap={},this._isSilence=!1,this._iconList,this._iconShapeMap={},this._featureTitle={},this._featureIcon={},this._featureColor={},this._featureOption={},this._enableColor="red",this._disableColor="#ccc",this._markShapeList=[];var r=this;r._onMark=function(e){r.__onMark(e)},r._onMarkUndo=function(e){r.__onMarkUndo(e)},r._onMarkClear=function(e){r.__onMarkClear(e)},r._onDataZoom=function(e){r.__onDataZoom(e)},r._onDataZoomReset=function(e){r.__onDataZoomReset(e)},r._onDataView=function(e){r.__onDataView(e)},r._onRestore=function(e){r.__onRestore(e)},r._onSaveAsImage=function(e){r.__onSaveAsImage(e)},r._onMagicType=function(e){r.__onMagicType(e)},r._onCustomHandler=function(e){r.__onCustomHandler(e)},r._onmousemove=function(e){return r.__onmousemove(e)},r._onmousedown=function(e){return r.__onmousedown(e)},r._onmouseup=function(e){return r.__onmouseup(e)},r._onclick=function(e){return r.__onclick(e)}}var i=e("./base"),n=e("zrender/shape/Line"),a=e("zrender/shape/Image"),o=e("zrender/shape/Rectangle"),r=e("../util/shape/Icon"),s=e("../config");s.toolbox={zlevel:0,z:6,show:!1,orient:"horizontal",x:"right",y:"top",color:["#1e90ff","#22bb22","#4b0082","#d2691e"],disableColor:"#ddd",effectiveColor:"red",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,itemSize:16,showTitle:!0,feature:{mark:{show:!1,title:{mark:"辅助线开关",markUndo:"删除辅助线",markClear:"清空辅助线"},lineStyle:{width:1,color:"#1e90ff",type:"dashed"}},dataZoom:{show:!1,title:{dataZoom:"区域缩放",dataZoomReset:"区域缩放åŽé€€"}},dataView:{show:!1,title:"æ•°æ®è§†å›¾",readOnly:!1,lang:["æ•°æ®è§†å›¾","关闭","刷新"]},magicType:{show:!1,title:{line:"折线图切æ¢",bar:"柱形图切æ¢",stack:"堆积",tiled:"平铺",force:"力导å‘布局图切æ¢",chord:"和弦图切æ¢",pie:"饼图切æ¢",funnel:"æ¼æ–—图切æ¢"},type:[]},restore:{show:!1,title:"还原"},saveAsImage:{show:!1,title:"ä¿å­˜ä¸ºå›¾ç‰‡",type:"png",lang:["点击ä¿å­˜"]}}};var l=e("zrender/tool/util"),h=e("zrender/config"),m=e("zrender/tool/event"),V="stack",U="tiled";return t.prototype={type:s.COMPONENT_TYPE_TOOLBOX,_buildShape:function(){this._iconList=[];var e=this.option.toolbox;this._enableColor=e.effectiveColor,this._disableColor=e.disableColor;var t=e.feature,i=[];for(var n in t)if(t[n].show)switch(n){case"mark":i.push({key:n,name:"mark"}),i.push({key:n,name:"markUndo"}),i.push({key:n,name:"markClear"});break;case"magicType":for(var a=0,o=t[n].type.length;o>a;a++)t[n].title[t[n].type[a]+"Chart"]=t[n].title[t[n].type[a]],t[n].option&&(t[n].option[t[n].type[a]+"Chart"]=t[n].option[t[n].type[a]]),i.push({key:n,name:t[n].type[a]+"Chart"});break;case"dataZoom":i.push({key:n,name:"dataZoom"}),i.push({key:n,name:"dataZoomReset"});break;case"saveAsImage":this.canvasSupported&&i.push({key:n,name:"saveAsImage"});break;default:i.push({key:n,name:n})}if(i.length>0){for(var r,n,a=0,o=i.length;o>a;a++)r=i[a].name,n=i[a].key,this._iconList.push(r),this._featureTitle[r]=t[n].title[r]||t[n].title,t[n].icon&&(this._featureIcon[r]=t[n].icon[r]||t[n].icon),t[n].color&&(this._featureColor[r]=t[n].color[r]||t[n].color),t[n].option&&(this._featureOption[r]=t[n].option[r]||t[n].option);this._itemGroupLocation=this._getItemGroupLocation(),this._buildBackground(),this._buildItem();for(var a=0,o=this.shapeList.length;o>a;a++)this.zr.addShape(this.shapeList[a]);this._iconShapeMap.mark&&(this._iconDisable(this._iconShapeMap.markUndo),this._iconDisable(this._iconShapeMap.markClear)),this._iconShapeMap.dataZoomReset&&0===this._zoomQueue.length&&this._iconDisable(this._iconShapeMap.dataZoomReset)}},_buildItem:function(){var t,i,n,o,s=this.option.toolbox,l=this._iconList.length,h=this._itemGroupLocation.x,m=this._itemGroupLocation.y,V=s.itemSize,U=s.itemGap,d=s.color instanceof Array?s.color:[s.color],p=this.getFont(s.textStyle);"horizontal"===s.orient?(i=this._itemGroupLocation.y/this.zr.getHeight()<.5?"bottom":"top",n=this._itemGroupLocation.x/this.zr.getWidth()<.5?"left":"right",o=this._itemGroupLocation.y/this.zr.getHeight()<.5?"top":"bottom"):i=this._itemGroupLocation.x/this.zr.getWidth()<.5?"right":"left",this._iconShapeMap={};for(var c=this,u=0;l>u;u++){switch(t={type:"icon",zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:h,y:m,width:V,height:V,iconType:this._iconList[u],lineWidth:1,strokeColor:this._featureColor[this._iconList[u]]||d[u%d.length],brushType:"stroke"},highlightStyle:{lineWidth:1,text:s.showTitle?this._featureTitle[this._iconList[u]]:void 0,textFont:p,textPosition:i,strokeColor:this._featureColor[this._iconList[u]]||d[u%d.length]},hoverable:!0,clickable:!0},this._featureIcon[this._iconList[u]]&&(t.style.image=this._featureIcon[this._iconList[u]].replace(new RegExp("^image:\\/\\/"),""),t.style.opacity=.8,t.highlightStyle.opacity=1,t.type="image"),"horizontal"===s.orient&&(0===u&&"left"===n&&(t.highlightStyle.textPosition="specific",t.highlightStyle.textAlign=n,t.highlightStyle.textBaseline=o,t.highlightStyle.textX=h,t.highlightStyle.textY="top"===o?m+V+10:m-10),u===l-1&&"right"===n&&(t.highlightStyle.textPosition="specific",t.highlightStyle.textAlign=n,t.highlightStyle.textBaseline=o,t.highlightStyle.textX=h+V,t.highlightStyle.textY="top"===o?m+V+10:m-10)),this._iconList[u]){case"mark":t.onclick=c._onMark;break;case"markUndo":t.onclick=c._onMarkUndo;break;case"markClear":t.onclick=c._onMarkClear;break;case"dataZoom":t.onclick=c._onDataZoom;break;case"dataZoomReset":t.onclick=c._onDataZoomReset;break;case"dataView":if(!this._dataView){var y=e("./dataView");this._dataView=new y(this.ecTheme,this.messageCenter,this.zr,this.option,this.myChart)}t.onclick=c._onDataView;break;case"restore":t.onclick=c._onRestore;break;case"saveAsImage":t.onclick=c._onSaveAsImage;break;default:this._iconList[u].match("Chart")?(t._name=this._iconList[u].replace("Chart",""),t.onclick=c._onMagicType):t.onclick=c._onCustomHandler}"icon"===t.type?t=new r(t):"image"===t.type&&(t=new a(t)),this.shapeList.push(t),this._iconShapeMap[this._iconList[u]]=t,"horizontal"===s.orient?h+=V+U:m+=V+U}},_buildBackground:function(){var e=this.option.toolbox,t=this.reformCssArray(this.option.toolbox.padding);this.shapeList.push(new o({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._itemGroupLocation.x-t[3],y:this._itemGroupLocation.y-t[0],width:this._itemGroupLocation.width+t[3]+t[1],height:this._itemGroupLocation.height+t[0]+t[2],brushType:0===e.borderWidth?"fill":"both",color:e.backgroundColor,strokeColor:e.borderColor,lineWidth:e.borderWidth}}))},_getItemGroupLocation:function(){var e=this.option.toolbox,t=this.reformCssArray(this.option.toolbox.padding),i=this._iconList.length,n=e.itemGap,a=e.itemSize,o=0,r=0;"horizontal"===e.orient?(o=(a+n)*i-n,r=a):(r=(a+n)*i-n,o=a);var s,l=this.zr.getWidth();switch(e.x){case"center":s=Math.floor((l-o)/2);break;case"left":s=t[3]+e.borderWidth;break;case"right":s=l-o-t[1]-e.borderWidth;break;default:s=e.x-0,s=isNaN(s)?0:s}var h,m=this.zr.getHeight();switch(e.y){case"top":h=t[0]+e.borderWidth;break;case"bottom":h=m-r-t[2]-e.borderWidth;break;case"center":h=Math.floor((m-r)/2);break;default:h=e.y-0,h=isNaN(h)?0:h}return{x:s,y:h,width:o,height:r}},__onmousemove:function(e){this._marking&&(this._markShape.style.xEnd=m.getX(e.event),this._markShape.style.yEnd=m.getY(e.event),this.zr.addHoverShape(this._markShape)),this._zooming&&(this._zoomShape.style.width=m.getX(e.event)-this._zoomShape.style.x,this._zoomShape.style.height=m.getY(e.event)-this._zoomShape.style.y,this.zr.addHoverShape(this._zoomShape),this.dom.style.cursor="crosshair",m.stop(e.event)),this._zoomStart&&"pointer"!=this.dom.style.cursor&&"move"!=this.dom.style.cursor&&(this.dom.style.cursor="crosshair")},__onmousedown:function(e){if(!e.target){this._zooming=!0;var t=m.getX(e.event),i=m.getY(e.event),n=this.option.dataZoom||{};return this._zoomShape=new o({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:t,y:i,width:1,height:1,brushType:"both"},highlightStyle:{lineWidth:2,color:n.fillerColor||s.dataZoom.fillerColor,strokeColor:n.handleColor||s.dataZoom.handleColor,brushType:"both"}}),this.zr.addHoverShape(this._zoomShape),!0}},__onmouseup:function(){if(!this._zoomShape||Math.abs(this._zoomShape.style.width)<10||Math.abs(this._zoomShape.style.height)<10)return this._zooming=!1,!0;if(this._zooming&&this.component.dataZoom){this._zooming=!1;var e=this.component.dataZoom.rectZoom(this._zoomShape.style);e&&(this._zoomQueue.push({start:e.start,end:e.end,start2:e.start2,end2:e.end2}),this._iconEnable(this._iconShapeMap.dataZoomReset),this.zr.refreshNextFrame())}return!0},__onclick:function(e){if(!e.target)if(this._marking)this._marking=!1,this._markShapeList.push(this._markShape),this._iconEnable(this._iconShapeMap.markUndo),this._iconEnable(this._iconShapeMap.markClear),this.zr.addShape(this._markShape),this.zr.refreshNextFrame();else if(this._markStart){this._marking=!0;var t=m.getX(e.event),i=m.getY(e.event);this._markShape=new n({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{xStart:t,yStart:i,xEnd:t,yEnd:i,lineWidth:this.query(this.option,"toolbox.feature.mark.lineStyle.width"),strokeColor:this.query(this.option,"toolbox.feature.mark.lineStyle.color"),lineType:this.query(this.option,"toolbox.feature.mark.lineStyle.type")}}),this.zr.addHoverShape(this._markShape)}},__onMark:function(e){var t=e.target;if(this._marking||this._markStart)this._resetMark(),this.zr.refreshNextFrame();else{this._resetZoom(),this.zr.modShape(t.id,{style:{strokeColor:this._enableColor}}),this.zr.refreshNextFrame(),this._markStart=!0;var i=this;setTimeout(function(){i.zr&&i.zr.on(h.EVENT.CLICK,i._onclick)&&i.zr.on(h.EVENT.MOUSEMOVE,i._onmousemove)},10)}return!0},__onMarkUndo:function(){if(this._marking)this._marking=!1;else{var e=this._markShapeList.length;if(e>=1){var t=this._markShapeList[e-1];this.zr.delShape(t.id),this.zr.refreshNextFrame(),this._markShapeList.pop(),1===e&&(this._iconDisable(this._iconShapeMap.markUndo),this._iconDisable(this._iconShapeMap.markClear))}}return!0},__onMarkClear:function(){this._marking&&(this._marking=!1);var e=this._markShapeList.length;if(e>0){for(;e--;)this.zr.delShape(this._markShapeList.pop().id);this._iconDisable(this._iconShapeMap.markUndo),this._iconDisable(this._iconShapeMap.markClear),this.zr.refreshNextFrame()}return!0},__onDataZoom:function(e){var t=e.target;if(this._zooming||this._zoomStart)this._resetZoom(),this.zr.refreshNextFrame(),this.dom.style.cursor="default";else{this._resetMark(),this.zr.modShape(t.id,{style:{strokeColor:this._enableColor}}),this.zr.refreshNextFrame(),this._zoomStart=!0;var i=this;setTimeout(function(){i.zr&&i.zr.on(h.EVENT.MOUSEDOWN,i._onmousedown)&&i.zr.on(h.EVENT.MOUSEUP,i._onmouseup)&&i.zr.on(h.EVENT.MOUSEMOVE,i._onmousemove)},10),this.dom.style.cursor="crosshair"}return!0},__onDataZoomReset:function(){return this._zooming&&(this._zooming=!1),this._zoomQueue.pop(),this._zoomQueue.length>0?this.component.dataZoom.absoluteZoom(this._zoomQueue[this._zoomQueue.length-1]):(this.component.dataZoom.rectZoom(),this._iconDisable(this._iconShapeMap.dataZoomReset),this.zr.refreshNextFrame()),!0},_resetMark:function(){this._marking=!1,this._markStart&&(this._markStart=!1,this._iconShapeMap.mark&&this.zr.modShape(this._iconShapeMap.mark.id,{style:{strokeColor:this._iconShapeMap.mark.highlightStyle.strokeColor}}),this.zr.un(h.EVENT.CLICK,this._onclick),this.zr.un(h.EVENT.MOUSEMOVE,this._onmousemove))},_resetZoom:function(){this._zooming=!1,this._zoomStart&&(this._zoomStart=!1,this._iconShapeMap.dataZoom&&this.zr.modShape(this._iconShapeMap.dataZoom.id,{style:{strokeColor:this._iconShapeMap.dataZoom.highlightStyle.strokeColor}}),this.zr.un(h.EVENT.MOUSEDOWN,this._onmousedown),this.zr.un(h.EVENT.MOUSEUP,this._onmouseup),this.zr.un(h.EVENT.MOUSEMOVE,this._onmousemove))},_iconDisable:function(e){"image"!=e.type?this.zr.modShape(e.id,{hoverable:!1,clickable:!1,style:{strokeColor:this._disableColor}}):this.zr.modShape(e.id,{hoverable:!1,clickable:!1,style:{opacity:.3}})},_iconEnable:function(e){"image"!=e.type?this.zr.modShape(e.id,{hoverable:!0,clickable:!0,style:{strokeColor:e.highlightStyle.strokeColor}}):this.zr.modShape(e.id,{hoverable:!0,clickable:!0,style:{opacity:.8}})},__onDataView:function(){return this._dataView.show(this.option),!0},__onRestore:function(){return this._resetMark(),this._resetZoom(),this.messageCenter.dispatch(s.EVENT.RESTORE,null,null,this.myChart),!0},__onSaveAsImage:function(){var e=this.option.toolbox.feature.saveAsImage,t=e.type||"png";"png"!=t&&"jpeg"!=t&&(t="png");var i;i=this.myChart.isConnected()?this.myChart.getConnectedDataURL(t):this.zr.toDataURL("image/"+t,this.option.backgroundColor&&"rgba(0,0,0,0)"===this.option.backgroundColor.replace(" ","")?"#fff":this.option.backgroundColor);var n=document.createElement("div");n.id="__echarts_download_wrap__",n.style.cssText="position:fixed;z-index:99999;display:block;top:0;left:0;background-color:rgba(33,33,33,0.5);text-align:center;width:100%;height:100%;line-height:"+document.documentElement.clientHeight+"px;";var a=document.createElement("a");a.href=i,a.setAttribute("download",(e.name?e.name:this.option.title&&(this.option.title.text||this.option.title.subtext)?this.option.title.text||this.option.title.subtext:"ECharts")+"."+t),a.innerHTML='<img style="vertical-align:middle" src="'+i+'" title="'+(window.ActiveXObject||"ActiveXObject"in window?"å³é”®->图片å¦å­˜ä¸º":e.lang?e.lang[0]:"点击ä¿å­˜")+'"/>',n.appendChild(a),document.body.appendChild(n),a=null,n=null,setTimeout(function(){var e=document.getElementById("__echarts_download_wrap__");e&&(e.onclick=function(){var e=document.getElementById("__echarts_download_wrap__");e.onclick=null,e.innerHTML="",document.body.removeChild(e),e=null},e=null)},500)},__onMagicType:function(e){this._resetMark();var t=e.target._name;return this._magicType[t]||(this._magicType[t]=!0,t===s.CHART_TYPE_LINE?this._magicType[s.CHART_TYPE_BAR]=!1:t===s.CHART_TYPE_BAR&&(this._magicType[s.CHART_TYPE_LINE]=!1),t===s.CHART_TYPE_PIE?this._magicType[s.CHART_TYPE_FUNNEL]=!1:t===s.CHART_TYPE_FUNNEL&&(this._magicType[s.CHART_TYPE_PIE]=!1),t===s.CHART_TYPE_FORCE?this._magicType[s.CHART_TYPE_CHORD]=!1:t===s.CHART_TYPE_CHORD&&(this._magicType[s.CHART_TYPE_FORCE]=!1),t===V?this._magicType[U]=!1:t===U&&(this._magicType[V]=!1),this.messageCenter.dispatch(s.EVENT.MAGIC_TYPE_CHANGED,e.event,{magicType:this._magicType},this.myChart)),!0},setMagicType:function(e){this._resetMark(),this._magicType=e,!this._isSilence&&this.messageCenter.dispatch(s.EVENT.MAGIC_TYPE_CHANGED,null,{magicType:this._magicType},this.myChart)},__onCustomHandler:function(e){var t=e.target.style.iconType,i=this.option.toolbox.feature[t].onclick;"function"==typeof i&&i.call(this,this.option)},reset:function(e,t){if(t&&this.clear(),this.query(e,"toolbox.show")&&this.query(e,"toolbox.feature.magicType.show")){var i=e.toolbox.feature.magicType.type,n=i.length;for(this._magicMap={};n--;)this._magicMap[i[n]]=!0;n=e.series.length;for(var a,o;n--;)a=e.series[n].type,this._magicMap[a]&&(o=e.xAxis instanceof Array?e.xAxis[e.series[n].xAxisIndex||0]:e.xAxis,o&&"category"===(o.type||"category")&&(o.__boundaryGap=null!=o.boundaryGap?o.boundaryGap:!0),o=e.yAxis instanceof Array?e.yAxis[e.series[n].yAxisIndex||0]:e.yAxis,o&&"category"===o.type&&(o.__boundaryGap=null!=o.boundaryGap?o.boundaryGap:!0),e.series[n].__type=a,e.series[n].__itemStyle=l.clone(e.series[n].itemStyle||{})),(this._magicMap[V]||this._magicMap[U])&&(e.series[n].__stack=e.series[n].stack)}this._magicType=t?{}:this._magicType||{};for(var r in this._magicType)if(this._magicType[r]){this.option=e,this.getMagicOption();break}var s=e.dataZoom;if(s&&s.show){var h=null!=s.start&&s.start>=0&&s.start<=100?s.start:0,m=null!=s.end&&s.end>=0&&s.end<=100?s.end:100;h>m&&(h+=m,m=h-m,h-=m),this._zoomQueue=[{start:h,end:m,start2:0,end2:100}]}else this._zoomQueue=[]},getMagicOption:function(){var e,t;if(this._magicType[s.CHART_TYPE_LINE]||this._magicType[s.CHART_TYPE_BAR]){for(var i=this._magicType[s.CHART_TYPE_LINE]?!1:!0,n=0,a=this.option.series.length;a>n;n++)t=this.option.series[n].type,(t==s.CHART_TYPE_LINE||t==s.CHART_TYPE_BAR)&&(e=this.option.xAxis instanceof Array?this.option.xAxis[this.option.series[n].xAxisIndex||0]:this.option.xAxis,e&&"category"===(e.type||"category")&&(e.boundaryGap=i?!0:e.__boundaryGap),e=this.option.yAxis instanceof Array?this.option.yAxis[this.option.series[n].yAxisIndex||0]:this.option.yAxis,e&&"category"===e.type&&(e.boundaryGap=i?!0:e.__boundaryGap));this._defaultMagic(s.CHART_TYPE_LINE,s.CHART_TYPE_BAR)}if(this._defaultMagic(s.CHART_TYPE_CHORD,s.CHART_TYPE_FORCE),this._defaultMagic(s.CHART_TYPE_PIE,s.CHART_TYPE_FUNNEL),this._magicType[V]||this._magicType[U])for(var n=0,a=this.option.series.length;a>n;n++)this._magicType[V]?(this.option.series[n].stack="_ECHARTS_STACK_KENER_2014_",t=V):this._magicType[U]&&(this.option.series[n].stack=null,t=U),this._featureOption[t+"Chart"]&&l.merge(this.option.series[n],this._featureOption[t+"Chart"]||{},!0);return this.option},_defaultMagic:function(e,t){if(this._magicType[e]||this._magicType[t])for(var i=0,n=this.option.series.length;n>i;i++){var a=this.option.series[i].type;(a==e||a==t)&&(this.option.series[i].type=this._magicType[e]?e:t,this.option.series[i].itemStyle=l.clone(this.option.series[i].__itemStyle),a=this.option.series[i].type,this._featureOption[a+"Chart"]&&l.merge(this.option.series[i],this._featureOption[a+"Chart"]||{},!0))}},silence:function(e){this._isSilence=e},resize:function(){this._resetMark(),this.clear(),this.option&&this.option.toolbox&&this.option.toolbox.show&&this._buildShape(),this._dataView&&this._dataView.resize()},hideDataView:function(){this._dataView&&this._dataView.hide()},clear:function(e){this.zr&&(this.zr.delShape(this.shapeList),this.shapeList=[],e||(this.zr.delShape(this._markShapeList),this._markShapeList=[]))},onbeforDispose:function(){this._dataView&&(this._dataView.dispose(),this._dataView=null),this._markShapeList=null},refresh:function(e){e&&(this._resetMark(),this._resetZoom(),e.toolbox=this.reformOption(e.toolbox),this.option=e,this.clear(!0),e.toolbox.show&&this._buildShape(),this.hideDataView())}},l.inherits(t,i),e("../component").define("toolbox",t),t}),i("echarts/component",[],function(){var e={},t={};return e.define=function(i,n){return t[i]=n,e},e.get=function(e){return t[e]},e}),i("echarts/component/title",["require","./base","zrender/shape/Text","zrender/shape/Rectangle","../config","zrender/tool/util","zrender/tool/area","zrender/tool/color","../component"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o),this.refresh(a)}var i=e("./base"),n=e("zrender/shape/Text"),a=e("zrender/shape/Rectangle"),o=e("../config");o.title={zlevel:0,z:6,show:!0,text:"",subtext:"",x:"left",y:"top",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:5,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}};var r=e("zrender/tool/util"),s=e("zrender/tool/area"),l=e("zrender/tool/color");return t.prototype={type:o.COMPONENT_TYPE_TITLE,_buildShape:function(){if(this.titleOption.show){this._itemGroupLocation=this._getItemGroupLocation(),this._buildBackground(),this._buildItem();for(var e=0,t=this.shapeList.length;t>e;e++)this.zr.addShape(this.shapeList[e])}},_buildItem:function(){var e=this.titleOption.text,t=this.titleOption.link,i=this.titleOption.target,a=this.titleOption.subtext,o=this.titleOption.sublink,r=this.titleOption.subtarget,s=this.getFont(this.titleOption.textStyle),h=this.getFont(this.titleOption.subtextStyle),m=this._itemGroupLocation.x,V=this._itemGroupLocation.y,U=this._itemGroupLocation.width,d=this._itemGroupLocation.height,p={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{y:V,color:this.titleOption.textStyle.color,text:e,textFont:s,textBaseline:"top"},highlightStyle:{color:l.lift(this.titleOption.textStyle.color,1),brushType:"fill"},hoverable:!1};t&&(p.hoverable=!0,p.clickable=!0,p.onclick=function(){i&&"self"==i?window.location=t:window.open(t)});var c={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{y:V+d,color:this.titleOption.subtextStyle.color,text:a,textFont:h,textBaseline:"bottom"},highlightStyle:{color:l.lift(this.titleOption.subtextStyle.color,1),brushType:"fill"},hoverable:!1};switch(o&&(c.hoverable=!0,c.clickable=!0,c.onclick=function(){r&&"self"==r?window.location=o:window.open(o)}),this.titleOption.x){case"center":p.style.x=c.style.x=m+U/2,p.style.textAlign=c.style.textAlign="center";break;case"left":p.style.x=c.style.x=m,p.style.textAlign=c.style.textAlign="left";break;case"right":p.style.x=c.style.x=m+U,p.style.textAlign=c.style.textAlign="right";break;default:m=this.titleOption.x-0,m=isNaN(m)?0:m,p.style.x=c.style.x=m}this.titleOption.textAlign&&(p.style.textAlign=c.style.textAlign=this.titleOption.textAlign),this.shapeList.push(new n(p)),""!==a&&this.shapeList.push(new n(c))},_buildBackground:function(){var e=this.reformCssArray(this.titleOption.padding);this.shapeList.push(new a({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._itemGroupLocation.x-e[3],y:this._itemGroupLocation.y-e[0],width:this._itemGroupLocation.width+e[3]+e[1],height:this._itemGroupLocation.height+e[0]+e[2],brushType:0===this.titleOption.borderWidth?"fill":"both",color:this.titleOption.backgroundColor,strokeColor:this.titleOption.borderColor,lineWidth:this.titleOption.borderWidth}}))},_getItemGroupLocation:function(){var e,t=this.reformCssArray(this.titleOption.padding),i=this.titleOption.text,n=this.titleOption.subtext,a=this.getFont(this.titleOption.textStyle),o=this.getFont(this.titleOption.subtextStyle),r=Math.max(s.getTextWidth(i,a),s.getTextWidth(n,o)),l=s.getTextHeight(i,a)+(""===n?0:this.titleOption.itemGap+s.getTextHeight(n,o)),h=this.zr.getWidth();switch(this.titleOption.x){case"center":e=Math.floor((h-r)/2);break;case"left":e=t[3]+this.titleOption.borderWidth;break;case"right":e=h-r-t[1]-this.titleOption.borderWidth;break;default:e=this.titleOption.x-0,e=isNaN(e)?0:e}var m,V=this.zr.getHeight();switch(this.titleOption.y){case"top":m=t[0]+this.titleOption.borderWidth;break;case"bottom":m=V-l-t[2]-this.titleOption.borderWidth;break;case"center":m=Math.floor((V-l)/2);break;default:m=this.titleOption.y-0,m=isNaN(m)?0:m}return{x:e,y:m,width:r,height:l}},refresh:function(e){e&&(this.option=e,this.option.title=this.reformOption(this.option.title),this.titleOption=this.option.title,this.titleOption.textStyle=this.getTextStyle(this.titleOption.textStyle),this.titleOption.subtextStyle=this.getTextStyle(this.titleOption.subtextStyle)),this.clear(),this._buildShape()}},r.inherits(t,i),e("../component").define("title",t),t}),i("echarts/component/tooltip",["require","./base","../util/shape/Cross","zrender/shape/Line","zrender/shape/Rectangle","../config","../util/ecData","zrender/config","zrender/tool/event","zrender/tool/area","zrender/tool/color","zrender/tool/util","zrender/shape/Base","../component"],function(e){function t(e,t,o,r,s){i.call(this,e,t,o,r,s),this.dom=s.dom;var l=this;l._onmousemove=function(e){return l.__onmousemove(e)},l._onglobalout=function(e){return l.__onglobalout(e)},this.zr.on(h.EVENT.MOUSEMOVE,l._onmousemove),this.zr.on(h.EVENT.GLOBALOUT,l._onglobalout),l._hide=function(e){return l.__hide(e)},l._tryShow=function(e){return l.__tryShow(e)},l._refixed=function(e){return l.__refixed(e)},l._setContent=function(e,t){return l.__setContent(e,t)},this._tDom=this._tDom||document.createElement("div"),this._tDom.onselectstart=function(){return!1},this._tDom.onmouseover=function(){l._mousein=!0},this._tDom.onmouseout=function(){l._mousein=!1},this._tDom.className="echarts-tooltip",this._tDom.style.position="absolute",this.hasAppend=!1,this._axisLineShape&&this.zr.delShape(this._axisLineShape.id),this._axisLineShape=new a({zlevel:this.getZlevelBase(),z:this.getZBase(),invisible:!0,hoverable:!1}),this.shapeList.push(this._axisLineShape),this.zr.addShape(this._axisLineShape),this._axisShadowShape&&this.zr.delShape(this._axisShadowShape.id),this._axisShadowShape=new a({zlevel:this.getZlevelBase(),z:1,invisible:!0,hoverable:!1}),this.shapeList.push(this._axisShadowShape),this.zr.addShape(this._axisShadowShape),this._axisCrossShape&&this.zr.delShape(this._axisCrossShape.id),this._axisCrossShape=new n({zlevel:this.getZlevelBase(),z:this.getZBase(),invisible:!0,hoverable:!1}),this.shapeList.push(this._axisCrossShape),this.zr.addShape(this._axisCrossShape),this.showing=!1,this.refresh(r)}var i=e("./base"),n=e("../util/shape/Cross"),a=e("zrender/shape/Line"),o=e("zrender/shape/Rectangle"),r=new o({}),s=e("../config");s.tooltip={zlevel:1,z:8,show:!0,showContent:!0,trigger:"item",islandFormatter:"{a} <br/>{b} : {c}",showDelay:20,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(0,0,0,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,axisPointer:{type:"line",lineStyle:{color:"#48b",width:2,type:"solid"},crossStyle:{color:"#1e90ff",width:1,type:"dashed"},shadowStyle:{color:"rgba(150,150,150,0.3)",width:"auto",type:"default"}},textStyle:{color:"#fff"}};var l=e("../util/ecData"),h=e("zrender/config"),m=e("zrender/tool/event"),V=e("zrender/tool/area"),U=e("zrender/tool/color"),d=e("zrender/tool/util"),p=e("zrender/shape/Base");return t.prototype={type:s.COMPONENT_TYPE_TOOLTIP,_gCssText:"position:absolute;display:block;border-style:solid;white-space:nowrap;",_style:function(e){if(!e)return"";var t=[];if(e.transitionDuration){var i="left "+e.transitionDuration+"s,top "+e.transitionDuration+"s";t.push("transition:"+i),t.push("-moz-transition:"+i),t.push("-webkit-transition:"+i),t.push("-o-transition:"+i)}e.backgroundColor&&(t.push("background-Color:"+U.toHex(e.backgroundColor)),t.push("filter:alpha(opacity=70)"),t.push("background-Color:"+e.backgroundColor)),null!=e.borderWidth&&t.push("border-width:"+e.borderWidth+"px"),null!=e.borderColor&&t.push("border-color:"+e.borderColor),null!=e.borderRadius&&(t.push("border-radius:"+e.borderRadius+"px"),t.push("-moz-border-radius:"+e.borderRadius+"px"),t.push("-webkit-border-radius:"+e.borderRadius+"px"),t.push("-o-border-radius:"+e.borderRadius+"px"));var n=e.textStyle;n&&(n.color&&t.push("color:"+n.color),n.decoration&&t.push("text-decoration:"+n.decoration),n.align&&t.push("text-align:"+n.align),n.fontFamily&&t.push("font-family:"+n.fontFamily),n.fontSize&&t.push("font-size:"+n.fontSize+"px"),n.fontSize&&t.push("line-height:"+Math.round(3*n.fontSize/2)+"px"),n.fontStyle&&t.push("font-style:"+n.fontStyle),n.fontWeight&&t.push("font-weight:"+n.fontWeight));var a=e.padding;return null!=a&&(a=this.reformCssArray(a),t.push("padding:"+a[0]+"px "+a[1]+"px "+a[2]+"px "+a[3]+"px")),t=t.join(";")+";"},__hide:function(){this._lastDataIndex=-1,this._lastSeriesIndex=-1,this._lastItemTriggerId=-1,this._tDom&&(this._tDom.style.display="none");var e=!1;this._axisLineShape.invisible||(this._axisLineShape.invisible=!0,
+this.zr.modShape(this._axisLineShape.id),e=!0),this._axisShadowShape.invisible||(this._axisShadowShape.invisible=!0,this.zr.modShape(this._axisShadowShape.id),e=!0),this._axisCrossShape.invisible||(this._axisCrossShape.invisible=!0,this.zr.modShape(this._axisCrossShape.id),e=!0),this._lastTipShape&&this._lastTipShape.tipShape.length>0&&(this.zr.delShape(this._lastTipShape.tipShape),this._lastTipShape=!1,this.shapeList.length=2),e&&this.zr.refreshNextFrame(),this.showing=!1},_show:function(e,t,i,n){var a=this._tDom.offsetHeight,o=this._tDom.offsetWidth;e&&("function"==typeof e&&(e=e([t,i])),e instanceof Array&&(t=e[0],i=e[1])),t+o>this._zrWidth&&(t-=o+40),i+a>this._zrHeight&&(i-=a-20),20>i&&(i=0),this._tDom.style.cssText=this._gCssText+this._defaultCssText+(n?n:"")+"left:"+t+"px;top:"+i+"px;",(10>a||10>o)&&setTimeout(this._refixed,20),this.showing=!0},__refixed:function(){if(this._tDom){var e="",t=this._tDom.offsetHeight,i=this._tDom.offsetWidth;this._tDom.offsetLeft+i>this._zrWidth&&(e+="left:"+(this._zrWidth-i-20)+"px;"),this._tDom.offsetTop+t>this._zrHeight&&(e+="top:"+(this._zrHeight-t-10)+"px;"),""!==e&&(this._tDom.style.cssText+=e)}},__tryShow:function(){var e,t;if(this._curTarget){if("island"===this._curTarget._type&&this.option.tooltip.show)return void this._showItemTrigger();var i=l.get(this._curTarget,"series"),n=l.get(this._curTarget,"data");e=this.deepQuery([n,i,this.option],"tooltip.show"),null!=i&&null!=n&&e?(t=this.deepQuery([n,i,this.option],"tooltip.trigger"),"axis"===t?this._showAxisTrigger(i.xAxisIndex,i.yAxisIndex,l.get(this._curTarget,"dataIndex")):this._showItemTrigger()):(clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),this._hidingTicket=setTimeout(this._hide,this._hideDelay))}else this._findPolarTrigger()||this._findAxisTrigger()},_findAxisTrigger:function(){if(!this.component.xAxis||!this.component.yAxis)return void(this._hidingTicket=setTimeout(this._hide,this._hideDelay));for(var e,t,i=this.option.series,n=0,a=i.length;a>n;n++)if("axis"===this.deepQuery([i[n],this.option],"tooltip.trigger"))return e=i[n].xAxisIndex||0,t=i[n].yAxisIndex||0,this.component.xAxis.getAxis(e)&&this.component.xAxis.getAxis(e).type===s.COMPONENT_TYPE_AXIS_CATEGORY?void this._showAxisTrigger(e,t,this._getNearestDataIndex("x",this.component.xAxis.getAxis(e))):this.component.yAxis.getAxis(t)&&this.component.yAxis.getAxis(t).type===s.COMPONENT_TYPE_AXIS_CATEGORY?void this._showAxisTrigger(e,t,this._getNearestDataIndex("y",this.component.yAxis.getAxis(t))):void this._showAxisTrigger(e,t,-1);"cross"===this.option.tooltip.axisPointer.type&&this._showAxisTrigger(-1,-1,-1)},_findPolarTrigger:function(){if(!this.component.polar)return!1;var e,t=m.getX(this._event),i=m.getY(this._event),n=this.component.polar.getNearestIndex([t,i]);return n?(e=n.valueIndex,n=n.polarIndex):n=-1,-1!=n?this._showPolarTrigger(n,e):!1},_getNearestDataIndex:function(e,t){var i=-1,n=m.getX(this._event),a=m.getY(this._event);if("x"===e){for(var o,r,s=this.component.grid.getXend(),l=t.getCoordByIndex(i);s>l&&(r=l,n>=l);)o=l,l=t.getCoordByIndex(++i);return 0>=i?i=0:r-n>=n-o?i-=1:null==t.getNameByIndex(i)&&(i-=1),i}for(var h,V,U=this.component.grid.getY(),l=t.getCoordByIndex(i);l>U&&(h=l,l>=a);)V=l,l=t.getCoordByIndex(++i);return 0>=i?i=0:a-h>=V-a?i-=1:null==t.getNameByIndex(i)&&(i-=1),i},_showAxisTrigger:function(e,t,i){if(!this._event.connectTrigger&&this.messageCenter.dispatch(s.EVENT.TOOLTIP_IN_GRID,this._event,null,this.myChart),null==this.component.xAxis||null==this.component.yAxis||null==e||null==t)return clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),void(this._hidingTicket=setTimeout(this._hide,this._hideDelay));var n,a,o,r,l=this.option.series,h=[],V=[],U="";if("axis"===this.option.tooltip.trigger){if(!this.option.tooltip.show)return;a=this.option.tooltip.formatter,o=this.option.tooltip.position}var d,p,c=-1!=e&&this.component.xAxis.getAxis(e).type===s.COMPONENT_TYPE_AXIS_CATEGORY?"xAxis":-1!=t&&this.component.yAxis.getAxis(t).type===s.COMPONENT_TYPE_AXIS_CATEGORY?"yAxis":!1;if(c){var u="xAxis"==c?e:t;n=this.component[c].getAxis(u);for(var y=0,g=l.length;g>y;y++)this._isSelected(l[y].name)&&l[y][c+"Index"]===u&&"axis"===this.deepQuery([l[y],this.option],"tooltip.trigger")&&(r=this.query(l[y],"tooltip.showContent")||r,a=this.query(l[y],"tooltip.formatter")||a,o=this.query(l[y],"tooltip.position")||o,U+=this._style(this.query(l[y],"tooltip")),null!=l[y].stack&&"xAxis"==c?(h.unshift(l[y]),V.unshift(y)):(h.push(l[y]),V.push(y)));this.messageCenter.dispatch(s.EVENT.TOOLTIP_HOVER,this._event,{seriesIndex:V,dataIndex:i},this.myChart);var b;"xAxis"==c?(d=this.subPixelOptimize(n.getCoordByIndex(i),this._axisLineWidth),p=m.getY(this._event),b=[d,this.component.grid.getY(),d,this.component.grid.getYend()]):(d=m.getX(this._event),p=this.subPixelOptimize(n.getCoordByIndex(i),this._axisLineWidth),b=[this.component.grid.getX(),p,this.component.grid.getXend(),p]),this._styleAxisPointer(h,b[0],b[1],b[2],b[3],n.getGap(),d,p)}else d=m.getX(this._event),p=m.getY(this._event),this._styleAxisPointer(l,this.component.grid.getX(),p,this.component.grid.getXend(),p,0,d,p),i>=0?this._showItemTrigger(!0):(clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),this._tDom.style.display="none");if(h.length>0){if(this._lastItemTriggerId=-1,this._lastDataIndex!=i||this._lastSeriesIndex!=V[0]){this._lastDataIndex=i,this._lastSeriesIndex=V[0];var f,k;if("function"==typeof a){for(var x=[],y=0,g=h.length;g>y;y++)f=h[y].data[i],k=this.getDataFromOption(f,"-"),x.push({seriesIndex:V[y],seriesName:h[y].name||"",series:h[y],dataIndex:i,data:f,name:n.getNameByIndex(i),value:k,0:h[y].name||"",1:n.getNameByIndex(i),2:k,3:f});this._curTicket="axis:"+i,this._tDom.innerHTML=a.call(this.myChart,x,this._curTicket,this._setContent)}else if("string"==typeof a){this._curTicket=0/0,a=a.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}");for(var y=0,g=h.length;g>y;y++)a=a.replace("{a"+y+"}",this._encodeHTML(h[y].name||"")),a=a.replace("{b"+y+"}",this._encodeHTML(n.getNameByIndex(i))),f=h[y].data[i],f=this.getDataFromOption(f,"-"),a=a.replace("{c"+y+"}",f instanceof Array?f:this.numAddCommas(f));this._tDom.innerHTML=a}else{this._curTicket=0/0,a=this._encodeHTML(n.getNameByIndex(i));for(var y=0,g=h.length;g>y;y++)a+="<br/>"+this._encodeHTML(h[y].name||"")+" : ",f=h[y].data[i],f=this.getDataFromOption(f,"-"),a+=f instanceof Array?f:this.numAddCommas(f);this._tDom.innerHTML=a}}if(r===!1||!this.option.tooltip.showContent)return;this.hasAppend||(this._tDom.style.left=this._zrWidth/2+"px",this._tDom.style.top=this._zrHeight/2+"px",this.dom.firstChild.appendChild(this._tDom),this.hasAppend=!0),this._show(o,d+10,p+10,U)}},_showPolarTrigger:function(e,t){if(null==this.component.polar||null==e||null==t||0>t)return!1;var i,n,a,o=this.option.series,r=[],s=[],l="";if("axis"===this.option.tooltip.trigger){if(!this.option.tooltip.show)return!1;i=this.option.tooltip.formatter,n=this.option.tooltip.position}for(var h=this.option.polar[e].indicator[t].text,V=0,U=o.length;U>V;V++)this._isSelected(o[V].name)&&o[V].polarIndex===e&&"axis"===this.deepQuery([o[V],this.option],"tooltip.trigger")&&(a=this.query(o[V],"tooltip.showContent")||a,i=this.query(o[V],"tooltip.formatter")||i,n=this.query(o[V],"tooltip.position")||n,l+=this._style(this.query(o[V],"tooltip")),r.push(o[V]),s.push(V));if(r.length>0){for(var d,p,c,u=[],V=0,U=r.length;U>V;V++){d=r[V].data;for(var y=0,g=d.length;g>y;y++)p=d[y],this._isSelected(p.name)&&(p=null!=p?p:{name:"",value:{dataIndex:"-"}},c=this.getDataFromOption(p.value[t]),u.push({seriesIndex:s[V],seriesName:r[V].name||"",series:r[V],dataIndex:t,data:p,name:p.name,indicator:h,value:c,0:r[V].name||"",1:p.name,2:c,3:h}))}if(u.length<=0)return;if(this._lastItemTriggerId=-1,this._lastDataIndex!=t||this._lastSeriesIndex!=s[0])if(this._lastDataIndex=t,this._lastSeriesIndex=s[0],"function"==typeof i)this._curTicket="axis:"+t,this._tDom.innerHTML=i.call(this.myChart,u,this._curTicket,this._setContent);else if("string"==typeof i){i=i.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}").replace("{d}","{d0}");for(var V=0,U=u.length;U>V;V++)i=i.replace("{a"+V+"}",this._encodeHTML(u[V].seriesName)),i=i.replace("{b"+V+"}",this._encodeHTML(u[V].name)),i=i.replace("{c"+V+"}",this.numAddCommas(u[V].value)),i=i.replace("{d"+V+"}",this._encodeHTML(u[V].indicator));this._tDom.innerHTML=i}else{i=this._encodeHTML(u[0].name)+"<br/>"+this._encodeHTML(u[0].indicator)+" : "+this.numAddCommas(u[0].value);for(var V=1,U=u.length;U>V;V++)i+="<br/>"+this._encodeHTML(u[V].name)+"<br/>",i+=this._encodeHTML(u[V].indicator)+" : "+this.numAddCommas(u[V].value);this._tDom.innerHTML=i}if(a===!1||!this.option.tooltip.showContent)return;return this.hasAppend||(this._tDom.style.left=this._zrWidth/2+"px",this._tDom.style.top=this._zrHeight/2+"px",this.dom.firstChild.appendChild(this._tDom),this.hasAppend=!0),this._show(n,m.getX(this._event),m.getY(this._event),l),!0}},_showItemTrigger:function(e){if(this._curTarget){var t,i,n,a=l.get(this._curTarget,"series"),o=l.get(this._curTarget,"seriesIndex"),r=l.get(this._curTarget,"data"),h=l.get(this._curTarget,"dataIndex"),V=l.get(this._curTarget,"name"),U=l.get(this._curTarget,"value"),d=l.get(this._curTarget,"special"),p=l.get(this._curTarget,"special2"),c=[r,a,this.option],u="";if("island"!=this._curTarget._type){var y=e?"axis":"item";this.option.tooltip.trigger===y&&(t=this.option.tooltip.formatter,i=this.option.tooltip.position),this.query(a,"tooltip.trigger")===y&&(n=this.query(a,"tooltip.showContent")||n,t=this.query(a,"tooltip.formatter")||t,i=this.query(a,"tooltip.position")||i,u+=this._style(this.query(a,"tooltip"))),n=this.query(r,"tooltip.showContent")||n,t=this.query(r,"tooltip.formatter")||t,i=this.query(r,"tooltip.position")||i,u+=this._style(this.query(r,"tooltip"))}else this._lastItemTriggerId=0/0,n=this.deepQuery(c,"tooltip.showContent"),t=this.deepQuery(c,"tooltip.islandFormatter"),i=this.deepQuery(c,"tooltip.islandPosition");this._lastDataIndex=-1,this._lastSeriesIndex=-1,this._lastItemTriggerId!==this._curTarget.id&&(this._lastItemTriggerId=this._curTarget.id,"function"==typeof t?(this._curTicket=(a.name||"")+":"+h,this._tDom.innerHTML=t.call(this.myChart,{seriesIndex:o,seriesName:a.name||"",series:a,dataIndex:h,data:r,name:V,value:U,percent:d,indicator:d,value2:p,indicator2:p,0:a.name||"",1:V,2:U,3:d,4:p,5:r,6:o,7:h},this._curTicket,this._setContent)):"string"==typeof t?(this._curTicket=0/0,t=t.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}"),t=t.replace("{a0}",this._encodeHTML(a.name||"")).replace("{b0}",this._encodeHTML(V)).replace("{c0}",U instanceof Array?U:this.numAddCommas(U)),t=t.replace("{d}","{d0}").replace("{d0}",d||""),t=t.replace("{e}","{e0}").replace("{e0}",l.get(this._curTarget,"special2")||""),this._tDom.innerHTML=t):(this._curTicket=0/0,this._tDom.innerHTML=a.type===s.CHART_TYPE_RADAR&&d?this._itemFormatter.radar.call(this,a,V,U,d):a.type===s.CHART_TYPE_EVENTRIVER?this._itemFormatter.eventRiver.call(this,a,V,U,r):""+(null!=a.name?this._encodeHTML(a.name)+"<br/>":"")+(""===V?"":this._encodeHTML(V)+" : ")+(U instanceof Array?U:this.numAddCommas(U))));var g=m.getX(this._event),b=m.getY(this._event);this.deepQuery(c,"tooltip.axisPointer.show")&&this.component.grid?this._styleAxisPointer([a],this.component.grid.getX(),b,this.component.grid.getXend(),b,0,g,b):this._hide(),n!==!1&&this.option.tooltip.showContent&&(this.hasAppend||(this._tDom.style.left=this._zrWidth/2+"px",this._tDom.style.top=this._zrHeight/2+"px",this.dom.firstChild.appendChild(this._tDom),this.hasAppend=!0),this._show(i,g+20,b-20,u))}},_itemFormatter:{radar:function(e,t,i,n){var a="";a+=this._encodeHTML(""===t?e.name||"":t),a+=""===a?"":"<br />";for(var o=0;o<n.length;o++)a+=this._encodeHTML(n[o].text)+" : "+this.numAddCommas(i[o])+"<br />";return a},chord:function(e,t,i,n,a){if(null==a)return this._encodeHTML(t)+" ("+this.numAddCommas(i)+")";var o=this._encodeHTML(t),r=this._encodeHTML(n);return""+(null!=e.name?this._encodeHTML(e.name)+"<br/>":"")+o+" -> "+r+" ("+this.numAddCommas(i)+")<br />"+r+" -> "+o+" ("+this.numAddCommas(a)+")"},eventRiver:function(e,t,i,n){var a="";a+=this._encodeHTML(""===e.name?"":e.name+" : "),a+=this._encodeHTML(t),a+=""===a?"":"<br />",n=n.evolution;for(var o=0,r=n.length;r>o;o++)a+='<div style="padding-top:5px;">',n[o].detail&&(n[o].detail.img&&(a+='<img src="'+n[o].detail.img+'" style="float:left;width:40px;height:40px;">'),a+='<div style="margin-left:45px;">'+n[o].time+"<br/>",a+='<a href="'+n[o].detail.link+'" target="_blank">',a+=n[o].detail.text+"</a></div>",a+="</div>");return a}},_styleAxisPointer:function(e,t,i,n,a,o,r,s){if(e.length>0){var l,h,m=this.option.tooltip.axisPointer,V=m.type,U={line:{},cross:{},shadow:{}};for(var d in U)U[d].color=m[d+"Style"].color,U[d].width=m[d+"Style"].width,U[d].type=m[d+"Style"].type;for(var p=0,c=e.length;c>p;p++)l=e[p],h=this.query(l,"tooltip.axisPointer.type"),V=h||V,h&&(U[h].color=this.query(l,"tooltip.axisPointer."+h+"Style.color")||U[h].color,U[h].width=this.query(l,"tooltip.axisPointer."+h+"Style.width")||U[h].width,U[h].type=this.query(l,"tooltip.axisPointer."+h+"Style.type")||U[h].type);if("line"===V){var u=U.line.width,y=t==n;this._axisLineShape.style={xStart:y?this.subPixelOptimize(t,u):t,yStart:y?i:this.subPixelOptimize(i,u),xEnd:y?this.subPixelOptimize(n,u):n,yEnd:y?a:this.subPixelOptimize(a,u),strokeColor:U.line.color,lineWidth:u,lineType:U.line.type},this._axisLineShape.invisible=!1,this.zr.modShape(this._axisLineShape.id)}else if("cross"===V){var g=U.cross.width;this._axisCrossShape.style={brushType:"stroke",rect:this.component.grid.getArea(),x:this.subPixelOptimize(r,g),y:this.subPixelOptimize(s,g),text:("( "+this.component.xAxis.getAxis(0).getValueFromCoord(r)+" , "+this.component.yAxis.getAxis(0).getValueFromCoord(s)+" )").replace(" , "," ").replace(" , "," "),textPosition:"specific",strokeColor:U.cross.color,lineWidth:g,lineType:U.cross.type},this.component.grid.getXend()-r>100?(this._axisCrossShape.style.textAlign="left",this._axisCrossShape.style.textX=r+10):(this._axisCrossShape.style.textAlign="right",this._axisCrossShape.style.textX=r-10),s-this.component.grid.getY()>50?(this._axisCrossShape.style.textBaseline="bottom",this._axisCrossShape.style.textY=s-10):(this._axisCrossShape.style.textBaseline="top",this._axisCrossShape.style.textY=s+10),this._axisCrossShape.invisible=!1,this.zr.modShape(this._axisCrossShape.id)}else"shadow"===V&&((null==U.shadow.width||"auto"===U.shadow.width||isNaN(U.shadow.width))&&(U.shadow.width=o),t===n?Math.abs(this.component.grid.getX()-t)<2?(U.shadow.width/=2,t=n+=U.shadow.width/2):Math.abs(this.component.grid.getXend()-t)<2&&(U.shadow.width/=2,t=n-=U.shadow.width/2):i===a&&(Math.abs(this.component.grid.getY()-i)<2?(U.shadow.width/=2,i=a+=U.shadow.width/2):Math.abs(this.component.grid.getYend()-i)<2&&(U.shadow.width/=2,i=a-=U.shadow.width/2)),this._axisShadowShape.style={xStart:t,yStart:i,xEnd:n,yEnd:a,strokeColor:U.shadow.color,lineWidth:U.shadow.width},this._axisShadowShape.invisible=!1,this.zr.modShape(this._axisShadowShape.id));this.zr.refreshNextFrame()}},__onmousemove:function(e){if(clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),!this._mousein||!this._enterable){var t=e.target,i=m.getX(e.event),n=m.getY(e.event);if(t){this._curTarget=t,this._event=e.event,this._event.zrenderX=i,this._event.zrenderY=n;var a;if(this._needAxisTrigger&&this.component.polar&&-1!=(a=this.component.polar.isInside([i,n])))for(var o=this.option.series,l=0,h=o.length;h>l;l++)if(o[l].polarIndex===a&&"axis"===this.deepQuery([o[l],this.option],"tooltip.trigger")){this._curTarget=null;break}this._showingTicket=setTimeout(this._tryShow,this._showDelay)}else this._curTarget=!1,this._event=e.event,this._event.zrenderX=i,this._event.zrenderY=n,this._needAxisTrigger&&this.component.grid&&V.isInside(r,this.component.grid.getArea(),i,n)?this._showingTicket=setTimeout(this._tryShow,this._showDelay):this._needAxisTrigger&&this.component.polar&&-1!=this.component.polar.isInside([i,n])?this._showingTicket=setTimeout(this._tryShow,this._showDelay):(!this._event.connectTrigger&&this.messageCenter.dispatch(s.EVENT.TOOLTIP_OUT_GRID,this._event,null,this.myChart),this._hidingTicket=setTimeout(this._hide,this._hideDelay))}},__onglobalout:function(){clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),this._hidingTicket=setTimeout(this._hide,this._hideDelay)},__setContent:function(e,t){this._tDom&&(e===this._curTicket&&(this._tDom.innerHTML=t),setTimeout(this._refixed,20))},ontooltipHover:function(e,t){if(!this._lastTipShape||this._lastTipShape&&this._lastTipShape.dataIndex!=e.dataIndex){this._lastTipShape&&this._lastTipShape.tipShape.length>0&&(this.zr.delShape(this._lastTipShape.tipShape),this.shapeList.length=2);for(var i=0,n=t.length;n>i;i++)t[i].zlevel=this.getZlevelBase(),t[i].z=this.getZBase(),t[i].style=p.prototype.getHighlightStyle(t[i].style,t[i].highlightStyle),t[i].draggable=!1,t[i].hoverable=!1,t[i].clickable=!1,t[i].ondragend=null,t[i].ondragover=null,t[i].ondrop=null,this.shapeList.push(t[i]),this.zr.addShape(t[i]);this._lastTipShape={dataIndex:e.dataIndex,tipShape:t}}},ondragend:function(){this._hide()},onlegendSelected:function(e){this._selectedMap=e.selected},_setSelectedMap:function(){this._selectedMap=this.component.legend?d.clone(this.component.legend.getSelectedMap()):{}},_isSelected:function(e){return null!=this._selectedMap[e]?this._selectedMap[e]:!0},showTip:function(e){if(e){var t,i=this.option.series;if(null!=e.seriesIndex)t=e.seriesIndex;else for(var n=e.seriesName,a=0,o=i.length;o>a;a++)if(i[a].name===n){t=a;break}var r=i[t];if(null!=r){var m=this.myChart.chart[r.type],V="axis"===this.deepQuery([r,this.option],"tooltip.trigger");if(m)if(V){var U=e.dataIndex;switch(m.type){case s.CHART_TYPE_LINE:case s.CHART_TYPE_BAR:case s.CHART_TYPE_K:case s.CHART_TYPE_RADAR:if(null==this.component.polar||r.data[0].value.length<=U)return;var d=r.polarIndex||0,p=this.component.polar.getVector(d,U,"max");this._event={zrenderX:p[0],zrenderY:p[1]},this._showPolarTrigger(d,U)}}else{var c,u,y=m.shapeList;switch(m.type){case s.CHART_TYPE_LINE:case s.CHART_TYPE_BAR:case s.CHART_TYPE_K:case s.CHART_TYPE_TREEMAP:case s.CHART_TYPE_SCATTER:for(var U=e.dataIndex,a=0,o=y.length;o>a;a++)if(null==y[a]._mark&&l.get(y[a],"seriesIndex")==t&&l.get(y[a],"dataIndex")==U){this._curTarget=y[a],c=y[a].style.x,u=m.type!=s.CHART_TYPE_K?y[a].style.y:y[a].style.y[0];break}break;case s.CHART_TYPE_RADAR:for(var U=e.dataIndex,a=0,o=y.length;o>a;a++)if("polygon"===y[a].type&&l.get(y[a],"seriesIndex")==t&&l.get(y[a],"dataIndex")==U){this._curTarget=y[a];var p=this.component.polar.getCenter(r.polarIndex||0);c=p[0],u=p[1];break}break;case s.CHART_TYPE_PIE:for(var g=e.name,a=0,o=y.length;o>a;a++)if("sector"===y[a].type&&l.get(y[a],"seriesIndex")==t&&l.get(y[a],"name")==g){this._curTarget=y[a];var b=this._curTarget.style,f=(b.startAngle+b.endAngle)/2*Math.PI/180;c=this._curTarget.style.x+Math.cos(f)*b.r/1.5,u=this._curTarget.style.y-Math.sin(f)*b.r/1.5;break}break;case s.CHART_TYPE_MAP:for(var g=e.name,k=r.mapType,a=0,o=y.length;o>a;a++)if("text"===y[a].type&&y[a]._mapType===k&&y[a].style._name===g){this._curTarget=y[a],c=this._curTarget.style.x+this._curTarget.position[0],u=this._curTarget.style.y+this._curTarget.position[1];break}break;case s.CHART_TYPE_CHORD:for(var g=e.name,a=0,o=y.length;o>a;a++)if("sector"===y[a].type&&l.get(y[a],"name")==g){this._curTarget=y[a];var b=this._curTarget.style,f=(b.startAngle+b.endAngle)/2*Math.PI/180;return c=this._curTarget.style.x+Math.cos(f)*(b.r-2),u=this._curTarget.style.y-Math.sin(f)*(b.r-2),void this.zr.trigger(h.EVENT.MOUSEMOVE,{zrenderX:c,zrenderY:u})}break;case s.CHART_TYPE_FORCE:for(var g=e.name,a=0,o=y.length;o>a;a++)if("circle"===y[a].type&&l.get(y[a],"name")==g){this._curTarget=y[a],c=this._curTarget.position[0],u=this._curTarget.position[1];break}}null!=c&&null!=u&&(this._event={zrenderX:c,zrenderY:u},this.zr.addHoverShape(this._curTarget),this.zr.refreshHover(),this._showItemTrigger())}}}},hideTip:function(){this._hide()},refresh:function(e){if(this._zrHeight=this.zr.getHeight(),this._zrWidth=this.zr.getWidth(),this._lastTipShape&&this._lastTipShape.tipShape.length>0&&this.zr.delShape(this._lastTipShape.tipShape),this._lastTipShape=!1,this.shapeList.length=2,this._lastDataIndex=-1,this._lastSeriesIndex=-1,this._lastItemTriggerId=-1,e){this.option=e,this.option.tooltip=this.reformOption(this.option.tooltip),this.option.tooltip.textStyle=d.merge(this.option.tooltip.textStyle,this.ecTheme.textStyle),this._needAxisTrigger=!1,"axis"===this.option.tooltip.trigger&&(this._needAxisTrigger=!0);for(var t=this.option.series,i=0,n=t.length;n>i;i++)if("axis"===this.query(t[i],"tooltip.trigger")){this._needAxisTrigger=!0;break}this._showDelay=this.option.tooltip.showDelay,this._hideDelay=this.option.tooltip.hideDelay,this._defaultCssText=this._style(this.option.tooltip),this._setSelectedMap(),this._axisLineWidth=this.option.tooltip.axisPointer.lineStyle.width,this._enterable=this.option.tooltip.enterable,!this._enterable&&this._tDom.className.indexOf(h.elementClassName)<0&&(this._tDom.className+=" "+h.elementClassName)}if(this.showing){var a=this;setTimeout(function(){a.zr.trigger(h.EVENT.MOUSEMOVE,a.zr.handler._event)},50)}},onbeforDispose:function(){this._lastTipShape&&this._lastTipShape.tipShape.length>0&&this.zr.delShape(this._lastTipShape.tipShape),clearTimeout(this._hidingTicket),clearTimeout(this._showingTicket),this.zr.un(h.EVENT.MOUSEMOVE,this._onmousemove),this.zr.un(h.EVENT.GLOBALOUT,this._onglobalout),this.hasAppend&&this.dom.firstChild&&this.dom.firstChild.removeChild(this._tDom),this._tDom=null},_encodeHTML:function(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}},d.inherits(t,i),e("../component").define("tooltip",t),t}),i("echarts/component/legend",["require","./base","zrender/shape/Text","zrender/shape/Rectangle","zrender/shape/Sector","../util/shape/Icon","../util/shape/Candle","../config","zrender/tool/util","zrender/tool/area","../component"],function(e){function t(e,t,n,a,o){if(!this.query(a,"legend.data"))return void console.error("option.legend.data has not been defined.");i.call(this,e,t,n,a,o);var r=this;r._legendSelected=function(e){r.__legendSelected(e)},r._dispatchHoverLink=function(e){return r.__dispatchHoverLink(e)},this._colorIndex=0,this._colorMap={},this._selectedMap={},this._hasDataMap={},this.refresh(a)}var i=e("./base"),n=e("zrender/shape/Text"),a=e("zrender/shape/Rectangle"),o=e("zrender/shape/Sector"),r=e("../util/shape/Icon"),s=e("../util/shape/Candle"),l=e("../config");l.legend={zlevel:0,z:4,show:!0,orient:"horizontal",x:"center",y:"top",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,itemWidth:20,itemHeight:14,textStyle:{color:"#333"},selectedMode:!0};var h=e("zrender/tool/util"),m=e("zrender/tool/area");t.prototype={type:l.COMPONENT_TYPE_LEGEND,_buildShape:function(){if(this.legendOption.show){this._itemGroupLocation=this._getItemGroupLocation(),this._buildBackground(),this._buildItem();for(var e=0,t=this.shapeList.length;t>e;e++)this.zr.addShape(this.shapeList[e])}},_buildItem:function(){var e,t,i,a,o,s,l,V,U=this.legendOption.data,d=U.length,p=this.legendOption.textStyle,c=this.zr.getWidth(),u=this.zr.getHeight(),y=this._itemGroupLocation.x,g=this._itemGroupLocation.y,b=this.legendOption.itemWidth,f=this.legendOption.itemHeight,k=this.legendOption.itemGap;"vertical"===this.legendOption.orient&&"right"===this.legendOption.x&&(y=this._itemGroupLocation.x+this._itemGroupLocation.width-b);for(var x=0;d>x;x++)o=h.merge(U[x].textStyle||{},p),s=this.getFont(o),e=this._getName(U[x]),l=this._getFormatterName(e),""!==e?(t=U[x].icon||this._getSomethingByName(e).type,V=this.getColor(e),"horizontal"===this.legendOption.orient?200>c-y&&b+5+m.getTextWidth(l,s)+(x===d-1||""===U[x+1]?0:k)>=c-y&&(y=this._itemGroupLocation.x,g+=f+k):200>u-g&&f+(x===d-1||""===U[x+1]?0:k)>=u-g&&("right"===this.legendOption.x?y-=this._itemGroupLocation.maxWidth+k:y+=this._itemGroupLocation.maxWidth+k,g=this._itemGroupLocation.y),i=this._getItemShapeByType(y,g,b,f,this._selectedMap[e]&&this._hasDataMap[e]?V:"#ccc",t,V),i._name=e,i=new r(i),a={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:y+b+5,y:g+f/2,color:this._selectedMap[e]?"auto"===o.color?V:o.color:"#ccc",text:l,textFont:s,textBaseline:"middle"},highlightStyle:{color:V,brushType:"fill"},hoverable:!!this.legendOption.selectedMode,clickable:!!this.legendOption.selectedMode},"vertical"===this.legendOption.orient&&"right"===this.legendOption.x&&(a.style.x-=b+10,a.style.textAlign="right"),a._name=e,a=new n(a),this.legendOption.selectedMode&&(i.onclick=a.onclick=this._legendSelected,i.onmouseover=a.onmouseover=this._dispatchHoverLink,i.hoverConnect=a.id,a.hoverConnect=i.id),this.shapeList.push(i),this.shapeList.push(a),"horizontal"===this.legendOption.orient?y+=b+5+m.getTextWidth(l,s)+k:g+=f+k):"horizontal"===this.legendOption.orient?(y=this._itemGroupLocation.x,g+=f+k):("right"===this.legendOption.x?y-=this._itemGroupLocation.maxWidth+k:y+=this._itemGroupLocation.maxWidth+k,g=this._itemGroupLocation.y);"horizontal"===this.legendOption.orient&&"center"===this.legendOption.x&&g!=this._itemGroupLocation.y&&this._mLineOptimize()},_getName:function(e){return"undefined"!=typeof e.name?e.name:e},_getFormatterName:function(e){var t,i=this.legendOption.formatter;return t="function"==typeof i?i.call(this.myChart,e):"string"==typeof i?i.replace("{name}",e):e},_getFormatterNameFromData:function(e){var t=this._getName(e);return this._getFormatterName(t)},_mLineOptimize:function(){for(var e=[],t=this._itemGroupLocation.x,i=2,n=this.shapeList.length;n>i;i++)this.shapeList[i].style.x===t?e.push((this._itemGroupLocation.width-(this.shapeList[i-1].style.x+m.getTextWidth(this.shapeList[i-1].style.text,this.shapeList[i-1].style.textFont)-t))/2):i===n-1&&e.push((this._itemGroupLocation.width-(this.shapeList[i].style.x+m.getTextWidth(this.shapeList[i].style.text,this.shapeList[i].style.textFont)-t))/2);for(var a=-1,i=1,n=this.shapeList.length;n>i;i++)this.shapeList[i].style.x===t&&a++,0!==e[a]&&(this.shapeList[i].style.x+=e[a])},_buildBackground:function(){var e=this.reformCssArray(this.legendOption.padding);this.shapeList.push(new a({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._itemGroupLocation.x-e[3],y:this._itemGroupLocation.y-e[0],width:this._itemGroupLocation.width+e[3]+e[1],height:this._itemGroupLocation.height+e[0]+e[2],brushType:0===this.legendOption.borderWidth?"fill":"both",color:this.legendOption.backgroundColor,strokeColor:this.legendOption.borderColor,lineWidth:this.legendOption.borderWidth}}))},_getItemGroupLocation:function(){var e=this.legendOption.data,t=e.length,i=this.legendOption.itemGap,n=this.legendOption.itemWidth+5,a=this.legendOption.itemHeight,o=this.legendOption.textStyle,r=this.getFont(o),s=0,l=0,V=this.reformCssArray(this.legendOption.padding),U=this.zr.getWidth()-V[1]-V[3],d=this.zr.getHeight()-V[0]-V[2],p=0,c=0;if("horizontal"===this.legendOption.orient){l=a;for(var u=0;t>u;u++)if(""!==this._getName(e[u])){var y=m.getTextWidth(this._getFormatterNameFromData(e[u]),e[u].textStyle?this.getFont(h.merge(e[u].textStyle||{},o)):r);p+n+y+i>U?(p-=i,s=Math.max(s,p),l+=a+i,p=0):(p+=n+y+i,s=Math.max(s,p-i))}else p-=i,s=Math.max(s,p),l+=a+i,p=0}else{for(var u=0;t>u;u++)c=Math.max(c,m.getTextWidth(this._getFormatterNameFromData(e[u]),e[u].textStyle?this.getFont(h.merge(e[u].textStyle||{},o)):r));c+=n,s=c;for(var u=0;t>u;u++)""!==this._getName(e[u])?p+a+i>d?(s+=c+i,p-=i,l=Math.max(l,p),p=0):(p+=a+i,l=Math.max(l,p-i)):(s+=c+i,p-=i,l=Math.max(l,p),p=0)}U=this.zr.getWidth(),d=this.zr.getHeight();var g;switch(this.legendOption.x){case"center":g=Math.floor((U-s)/2);break;case"left":g=V[3]+this.legendOption.borderWidth;break;case"right":g=U-s-V[1]-V[3]-2*this.legendOption.borderWidth;break;default:g=this.parsePercent(this.legendOption.x,U)}var b;switch(this.legendOption.y){case"top":b=V[0]+this.legendOption.borderWidth;break;case"bottom":b=d-l-V[0]-V[2]-2*this.legendOption.borderWidth;break;case"center":b=Math.floor((d-l)/2);break;default:b=this.parsePercent(this.legendOption.y,d)}return{x:g,y:b,width:s,height:l,maxWidth:c}},_getSomethingByName:function(e){for(var t,i=this.option.series,n=0,a=i.length;a>n;n++){if(i[n].name===e)return{type:i[n].type,series:i[n],seriesIndex:n,data:null,dataIndex:-1};if(i[n].type===l.CHART_TYPE_PIE||i[n].type===l.CHART_TYPE_RADAR||i[n].type===l.CHART_TYPE_CHORD||i[n].type===l.CHART_TYPE_FORCE||i[n].type===l.CHART_TYPE_FUNNEL||i[n].type===l.CHART_TYPE_TREEMAP){t=i[n].categories||i[n].data||i[n].nodes;for(var o=0,r=t.length;r>o;o++)if(t[o].name===e)return{type:i[n].type,series:i[n],seriesIndex:n,data:t[o],dataIndex:o}}}return{type:"bar",series:null,seriesIndex:-1,data:null,dataIndex:-1}},_getItemShapeByType:function(e,t,i,n,a,o,r){var s,h="#ccc"===a?r:a,m={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{iconType:"legendicon"+o,x:e,y:t,width:i,height:n,color:a,strokeColor:a,lineWidth:2},highlightStyle:{color:h,strokeColor:h,lineWidth:1},hoverable:this.legendOption.selectedMode,clickable:this.legendOption.selectedMode};if(o.match("image")){var s=o.replace(new RegExp("^image:\\/\\/"),"");o="image"}switch(o){case"line":m.style.brushType="stroke",m.highlightStyle.lineWidth=3;break;case"radar":case"venn":case"tree":case"treemap":case"scatter":m.highlightStyle.lineWidth=3;break;case"k":m.style.brushType="both",m.highlightStyle.lineWidth=3,m.highlightStyle.color=m.style.color=this.deepQuery([this.ecTheme,l],"k.itemStyle.normal.color")||"#fff",m.style.strokeColor="#ccc"!=a?this.deepQuery([this.ecTheme,l],"k.itemStyle.normal.lineStyle.color")||"#ff3200":a;break;case"image":m.style.iconType="image",m.style.image=s,"#ccc"===a&&(m.style.opacity=.5)}return m},__legendSelected:function(e){var t=e.target._name;if("single"===this.legendOption.selectedMode)for(var i in this._selectedMap)this._selectedMap[i]=!1;this._selectedMap[t]=!this._selectedMap[t],this.messageCenter.dispatch(l.EVENT.LEGEND_SELECTED,e.event,{selected:this._selectedMap,target:t},this.myChart)},__dispatchHoverLink:function(e){this.messageCenter.dispatch(l.EVENT.LEGEND_HOVERLINK,e.event,{target:e.target._name},this.myChart)},refresh:function(e){if(e){this.option=e||this.option,this.option.legend=this.reformOption(this.option.legend),this.legendOption=this.option.legend;var t,i,n,a,o=this.legendOption.data||[];if(this.legendOption.selected)for(var r in this.legendOption.selected)this._selectedMap[r]="undefined"!=typeof this._selectedMap[r]?this._selectedMap[r]:this.legendOption.selected[r];for(var s=0,h=o.length;h>s;s++)t=this._getName(o[s]),""!==t&&(i=this._getSomethingByName(t),i.series?(this._hasDataMap[t]=!0,a=!i.data||i.type!==l.CHART_TYPE_PIE&&i.type!==l.CHART_TYPE_FORCE&&i.type!==l.CHART_TYPE_FUNNEL?[i.series]:[i.data,i.series],n=this.getItemStyleColor(this.deepQuery(a,"itemStyle.normal.color"),i.seriesIndex,i.dataIndex,i.data),n&&i.type!=l.CHART_TYPE_K&&this.setColor(t,n),this._selectedMap[t]=null!=this._selectedMap[t]?this._selectedMap[t]:!0):this._hasDataMap[t]=!1)}this.clear(),this._buildShape()},getRelatedAmount:function(e){for(var t,i=0,n=this.option.series,a=0,o=n.length;o>a;a++)if(n[a].name===e&&i++,n[a].type===l.CHART_TYPE_PIE||n[a].type===l.CHART_TYPE_RADAR||n[a].type===l.CHART_TYPE_CHORD||n[a].type===l.CHART_TYPE_FORCE||n[a].type===l.CHART_TYPE_FUNNEL){t=n[a].type!=l.CHART_TYPE_FORCE?n[a].data:n[a].categories;for(var r=0,s=t.length;s>r;r++)t[r].name===e&&"-"!=t[r].value&&i++}return i},setColor:function(e,t){this._colorMap[e]=t},getColor:function(e){return this._colorMap[e]||(this._colorMap[e]=this.zr.getColor(this._colorIndex++)),this._colorMap[e]},hasColor:function(e){return this._colorMap[e]?this._colorMap[e]:!1},add:function(e,t){
+for(var i=this.legendOption.data,n=0,a=i.length;a>n;n++)if(this._getName(i[n])===e)return;this.legendOption.data.push(e),this.setColor(e,t),this._selectedMap[e]=!0,this._hasDataMap[e]=!0},del:function(e){for(var t=this.legendOption.data,i=0,n=t.length;n>i;i++)if(this._getName(t[i])===e)return this.legendOption.data.splice(i,1)},getItemShape:function(e){if(null!=e)for(var t,i=0,n=this.shapeList.length;n>i;i++)if(t=this.shapeList[i],t._name===e&&"text"!=t.type)return t},setItemShape:function(e,t){for(var i,n=0,a=this.shapeList.length;a>n;n++)i=this.shapeList[n],i._name===e&&"text"!=i.type&&(this._selectedMap[e]||(t.style.color="#ccc",t.style.strokeColor="#ccc"),this.zr.modShape(i.id,t))},isSelected:function(e){return"undefined"!=typeof this._selectedMap[e]?this._selectedMap[e]:!0},getSelectedMap:function(){return this._selectedMap},setSelected:function(e,t){if("single"===this.legendOption.selectedMode)for(var i in this._selectedMap)this._selectedMap[i]=!1;this._selectedMap[e]=t,this.messageCenter.dispatch(l.EVENT.LEGEND_SELECTED,null,{selected:this._selectedMap,target:e},this.myChart)},onlegendSelected:function(e,t){var i=e.selected;for(var n in i)this._selectedMap[n]!=i[n]&&(t.needRefresh=!0),this._selectedMap[n]=i[n]}};var V={line:function(e,t){var i=t.height/2;e.moveTo(t.x,t.y+i),e.lineTo(t.x+t.width,t.y+i)},pie:function(e,t){var i=t.x,n=t.y,a=t.width,r=t.height;o.prototype.buildPath(e,{x:i+a/2,y:n+r+2,r:r,r0:6,startAngle:45,endAngle:135})},eventRiver:function(e,t){var i=t.x,n=t.y,a=t.width,o=t.height;e.moveTo(i,n+o),e.bezierCurveTo(i+a,n+o,i,n+4,i+a,n+4),e.lineTo(i+a,n),e.bezierCurveTo(i,n,i+a,n+o-4,i,n+o-4),e.lineTo(i,n+o)},k:function(e,t){var i=t.x,n=t.y,a=t.width,o=t.height;s.prototype.buildPath(e,{x:i+a/2,y:[n+1,n+1,n+o-6,n+o],width:a-6})},bar:function(e,t){var i=t.x,n=t.y+1,a=t.width,o=t.height-2,r=3;e.moveTo(i+r,n),e.lineTo(i+a-r,n),e.quadraticCurveTo(i+a,n,i+a,n+r),e.lineTo(i+a,n+o-r),e.quadraticCurveTo(i+a,n+o,i+a-r,n+o),e.lineTo(i+r,n+o),e.quadraticCurveTo(i,n+o,i,n+o-r),e.lineTo(i,n+r),e.quadraticCurveTo(i,n,i+r,n)},force:function(e,t){r.prototype.iconLibrary.circle(e,t)},radar:function(e,t){var i=6,n=t.x+t.width/2,a=t.y+t.height/2,o=t.height/2,r=2*Math.PI/i,s=-Math.PI/2,l=n+o*Math.cos(s),h=a+o*Math.sin(s);e.moveTo(l,h),s+=r;for(var m=0,V=i-1;V>m;m++)e.lineTo(n+o*Math.cos(s),a+o*Math.sin(s)),s+=r;e.lineTo(l,h)}};V.chord=V.pie,V.map=V.bar;for(var U in V)r.prototype.iconLibrary["legendicon"+U]=V[U];return h.inherits(t,i),e("../component").define("legend",t),t}),i("echarts/util/ecData",[],function(){function e(e,t,i,n,a,o,r,s){var l;return"undefined"!=typeof n&&(l=null==n.value?n:n.value),e._echartsData={_series:t,_seriesIndex:i,_data:n,_dataIndex:a,_name:o,_value:l,_special:r,_special2:s},e._echartsData}function t(e,t){var i=e._echartsData;if(!t)return i;switch(t){case"series":case"seriesIndex":case"data":case"dataIndex":case"name":case"value":case"special":case"special2":return i&&i["_"+t]}return null}function i(e,t,i){switch(e._echartsData=e._echartsData||{},t){case"series":case"seriesIndex":case"data":case"dataIndex":case"name":case"value":case"special":case"special2":e._echartsData["_"+t]=i}}function n(e,t){t._echartsData={_series:e._echartsData._series,_seriesIndex:e._echartsData._seriesIndex,_data:e._echartsData._data,_dataIndex:e._echartsData._dataIndex,_name:e._echartsData._name,_value:e._echartsData._value,_special:e._echartsData._special,_special2:e._echartsData._special2}}return{pack:e,set:i,get:t,clone:n}}),i("echarts/chart",[],function(){var e={},t={};return e.define=function(i,n){return t[i]=n,e},e.get=function(e){return t[e]},e}),i("zrender/tool/color",["require","../tool/util"],function(e){function t(e){D=e}function i(){D=N}function n(e,t){return e=0|e,t=t||D,t[e%t.length]}function a(e){B=e}function o(){H=B}function r(){return B}function s(e,t,i,n,a,o,r){O||(O=P.getContext());for(var s=O.createRadialGradient(e,t,i,n,a,o),l=0,h=r.length;h>l;l++)s.addColorStop(r[l][0],r[l][1]);return s.__nonRecursion=!0,s}function l(e,t,i,n,a){O||(O=P.getContext());for(var o=O.createLinearGradient(e,t,i,n),r=0,s=a.length;s>r;r++)o.addColorStop(a[r][0],a[r][1]);return o.__nonRecursion=!0,o}function h(e,t,i){e=p(e),t=p(t),e=I(e),t=I(t);for(var n=[],a=(t[0]-e[0])/i,o=(t[1]-e[1])/i,r=(t[2]-e[2])/i,s=(t[3]-e[3])/i,l=0,h=e[0],m=e[1],U=e[2],d=e[3];i>l;l++)n[l]=V([S(Math.floor(h),[0,255]),S(Math.floor(m),[0,255]),S(Math.floor(U),[0,255]),d.toFixed(4)-0],"rgba"),h+=a,m+=o,U+=r,d+=s;return h=t[0],m=t[1],U=t[2],d=t[3],n[l]=V([h,m,U,d],"rgba"),n}function m(e,t){var i=[],n=e.length;if(void 0===t&&(t=20),1===n)i=h(e[0],e[0],t);else if(n>1)for(var a=0,o=n-1;o>a;a++){var r=h(e[a],e[a+1],t);o-1>a&&r.pop(),i=i.concat(r)}return i}function V(e,t){if(t=t||"rgb",e&&(3===e.length||4===e.length)){if(e=C(e,function(e){return e>1?Math.ceil(e):e}),t.indexOf("hex")>-1)return"#"+((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1);if(t.indexOf("hs")>-1){var i=C(e.slice(1,3),function(e){return e+"%"});e[1]=i[0],e[2]=i[1]}return t.indexOf("a")>-1?(3===e.length&&e.push(1),e[3]=S(e[3],[0,1]),t+"("+e.slice(0,4).join(",")+")"):t+"("+e.slice(0,3).join(",")+")"}}function U(e){e=L(e),e.indexOf("rgba")<0&&(e=p(e));var t=[],i=0;return e.replace(/[\d.]+/g,function(e){e=3>i?0|e:+e,t[i++]=e}),t}function d(e,t){if(!E(e))return e;var i=I(e),n=i[3];return"undefined"==typeof n&&(n=1),e.indexOf("hsb")>-1?i=F(i):e.indexOf("hsl")>-1&&(i=T(i)),t.indexOf("hsb")>-1||t.indexOf("hsv")>-1?i=A(i):t.indexOf("hsl")>-1&&(i=M(i)),i[3]=n,V(i,t)}function p(e){return d(e,"rgba")}function c(e){return d(e,"rgb")}function u(e){return d(e,"hex")}function y(e){return d(e,"hsva")}function g(e){return d(e,"hsv")}function b(e){return d(e,"hsba")}function f(e){return d(e,"hsb")}function k(e){return d(e,"hsla")}function x(e){return d(e,"hsl")}function _(e){for(var t in G)if(u(G[t])===u(e))return t;return null}function L(e){return String(e).replace(/\s+/g,"")}function W(e){if(G[e]&&(e=G[e]),e=L(e),e=e.replace(/hsv/i,"hsb"),/^#[\da-f]{3}$/i.test(e)){e=parseInt(e.slice(1),16);var t=(3840&e)<<8,i=(240&e)<<4,n=15&e;e="#"+((1<<24)+(t<<4)+t+(i<<4)+i+(n<<4)+n).toString(16).slice(1)}return e}function X(e,t){if(!E(e))return e;var i=t>0?1:-1;"undefined"==typeof t&&(t=0),t=Math.abs(t)>1?1:Math.abs(t),e=c(e);for(var n=I(e),a=0;3>a;a++)n[a]=1===i?n[a]*(1-t)|0:(255-n[a])*t+n[a]|0;return"rgb("+n.join(",")+")"}function v(e){if(!E(e))return e;var t=I(p(e));return t=C(t,function(e){return 255-e}),V(t,"rgb")}function w(e,t,i){if(!E(e)||!E(t))return e;"undefined"==typeof i&&(i=.5),i=1-S(i,[0,1]);for(var n=2*i-1,a=I(p(e)),o=I(p(t)),r=a[3]-o[3],s=((n*r===-1?n:(n+r)/(1+n*r))+1)/2,l=1-s,h=[],m=0;3>m;m++)h[m]=a[m]*s+o[m]*l;var U=a[3]*i+o[3]*(1-i);return U=Math.max(0,Math.min(1,U)),1===a[3]&&1===o[3]?V(h,"rgb"):(h[3]=U,V(h,"rgba"))}function K(){return"#"+(Math.random().toString(16)+"0000").slice(2,8)}function I(e){e=W(e);var t=e.match(R);if(null===t)throw new Error("The color format error");var i,n,a,o=[];if(t[2])i=t[2].replace("#","").split(""),a=[i[0]+i[1],i[2]+i[3],i[4]+i[5]],o=C(a,function(e){return S(parseInt(e,16),[0,255])});else if(t[4]){var r=t[4].split(",");n=r[3],a=r.slice(0,3),o=C(a,function(e){return e=Math.floor(e.indexOf("%")>0?2.55*parseInt(e,0):e),S(e,[0,255])}),"undefined"!=typeof n&&o.push(S(parseFloat(n),[0,1]))}else if(t[5]||t[6]){var s=(t[5]||t[6]).split(","),l=parseInt(s[0],0)/360,h=s[1],m=s[2];n=s[3],o=C([h,m],function(e){return S(parseFloat(e)/100,[0,1])}),o.unshift(l),"undefined"!=typeof n&&o.push(S(parseFloat(n),[0,1]))}return o}function J(e,t){if(!E(e))return e;null===t&&(t=1);var i=I(p(e));return i[3]=S(Number(t).toFixed(4),[0,1]),V(i,"rgba")}function C(e,t){if("function"!=typeof t)throw new TypeError;for(var i=e?e.length:0,n=0;i>n;n++)e[n]=t(e[n]);return e}function S(e,t){return e<=t[0]?e=t[0]:e>=t[1]&&(e=t[1]),e}function E(e){return e instanceof Array||"string"==typeof e}function F(e){var t,i,n,a=e[0],o=e[1],r=e[2];if(0===o)t=255*r,i=255*r,n=255*r;else{var s=6*a;6===s&&(s=0);var l=0|s,h=r*(1-o),m=r*(1-o*(s-l)),V=r*(1-o*(1-(s-l))),U=0,d=0,p=0;0===l?(U=r,d=V,p=h):1===l?(U=m,d=r,p=h):2===l?(U=h,d=r,p=V):3===l?(U=h,d=m,p=r):4===l?(U=V,d=h,p=r):(U=r,d=h,p=m),t=255*U,i=255*d,n=255*p}return[t,i,n]}function T(e){var t,i,n,a=e[0],o=e[1],r=e[2];if(0===o)t=255*r,i=255*r,n=255*r;else{var s;s=.5>r?r*(1+o):r+o-o*r;var l=2*r-s;t=255*z(l,s,a+1/3),i=255*z(l,s,a),n=255*z(l,s,a-1/3)}return[t,i,n]}function z(e,t,i){return 0>i&&(i+=1),i>1&&(i-=1),1>6*i?e+6*(t-e)*i:1>2*i?t:2>3*i?e+(t-e)*(2/3-i)*6:e}function A(e){var t,i,n=e[0]/255,a=e[1]/255,o=e[2]/255,r=Math.min(n,a,o),s=Math.max(n,a,o),l=s-r,h=s;if(0===l)t=0,i=0;else{i=l/s;var m=((s-n)/6+l/2)/l,V=((s-a)/6+l/2)/l,U=((s-o)/6+l/2)/l;n===s?t=U-V:a===s?t=1/3+m-U:o===s&&(t=2/3+V-m),0>t&&(t+=1),t>1&&(t-=1)}return t=360*t,i=100*i,h=100*h,[t,i,h]}function M(e){var t,i,n=e[0]/255,a=e[1]/255,o=e[2]/255,r=Math.min(n,a,o),s=Math.max(n,a,o),l=s-r,h=(s+r)/2;if(0===l)t=0,i=0;else{i=.5>h?l/(s+r):l/(2-s-r);var m=((s-n)/6+l/2)/l,V=((s-a)/6+l/2)/l,U=((s-o)/6+l/2)/l;n===s?t=U-V:a===s?t=1/3+m-U:o===s&&(t=2/3+V-m),0>t&&(t+=1),t>1&&(t-=1)}return t=360*t,i=100*i,h=100*h,[t,i,h]}var O,P=e("../tool/util"),D=["#ff9277"," #dddd00"," #ffc877"," #bbe3ff"," #d5ffbb","#bbbbff"," #ddb000"," #b0dd00"," #e2bbff"," #ffbbe3","#ff7777"," #ff9900"," #83dd00"," #77e3ff"," #778fff","#c877ff"," #ff77ab"," #ff6600"," #aa8800"," #77c7ff","#ad77ff"," #ff77ff"," #dd0083"," #777700"," #00aa00","#0088aa"," #8400dd"," #aa0088"," #dd0000"," #772e00"],N=D,B="rgba(255,255,0,0.5)",H=B,R=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,G={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#0ff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000",blanchedalmond:"#ffebcd",blue:"#00f",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#f0f",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#789",lightslategrey:"#789",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#0f0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#f0f",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#f00",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#fff",whitesmoke:"#f5f5f5",yellow:"#ff0",yellowgreen:"#9acd32"};return{customPalette:t,resetPalette:i,getColor:n,getHighlightColor:r,customHighlight:a,resetHighlight:o,getRadialGradient:s,getLinearGradient:l,getGradientColors:m,getStepColors:h,reverse:v,mix:w,lift:X,trim:L,random:K,toRGB:c,toRGBA:p,toHex:u,toHSL:x,toHSLA:k,toHSB:f,toHSBA:b,toHSV:g,toHSVA:y,toName:_,toColor:V,toArray:U,alpha:J,getData:I}}),i("echarts/component/timeline",["require","./base","zrender/shape/Rectangle","../util/shape/Icon","../util/shape/Chain","../config","zrender/tool/util","zrender/tool/area","zrender/tool/event","../component"],function(e){function t(e,t,i,a,o){n.call(this,e,t,i,a,o);var r=this;if(r._onclick=function(e){return r.__onclick(e)},r._ondrift=function(e,t){return r.__ondrift(this,e,t)},r._ondragend=function(){return r.__ondragend()},r._setCurrentOption=function(){var e=r.timelineOption;r.currentIndex%=e.data.length;var t=r.options[r.currentIndex]||{};r.myChart._setOption(t,e.notMerge,!0),r.messageCenter.dispatch(s.EVENT.TIMELINE_CHANGED,null,{currentIndex:r.currentIndex,data:null!=e.data[r.currentIndex].name?e.data[r.currentIndex].name:e.data[r.currentIndex]},r.myChart)},r._onFrame=function(){r._setCurrentOption(),r._syncHandleShape(),r.timelineOption.autoPlay&&(r.playTicket=setTimeout(function(){return r.currentIndex+=1,!r.timelineOption.loop&&r.currentIndex>=r.timelineOption.data.length?(r.currentIndex=r.timelineOption.data.length-1,void r.stop()):void r._onFrame()},r.timelineOption.playInterval))},this.setTheme(!1),this.options=this.option.options,this.currentIndex=this.timelineOption.currentIndex%this.timelineOption.data.length,this.timelineOption.notMerge||0===this.currentIndex||(this.options[this.currentIndex]=l.merge(this.options[this.currentIndex],this.options[0])),this.timelineOption.show&&(this._buildShape(),this._syncHandleShape()),this._setCurrentOption(),this.timelineOption.autoPlay){var r=this;this.playTicket=setTimeout(function(){r.play()},null!=this.ecTheme.animationDuration?this.ecTheme.animationDuration:s.animationDuration)}}function i(e,t){var i=2,n=t.x+i,a=t.y+i+2,r=t.width-i,s=t.height-i,l=t.symbol;if("last"===l)e.moveTo(n+r-2,a+s/3),e.lineTo(n+r-2,a),e.lineTo(n+2,a+s/2),e.lineTo(n+r-2,a+s),e.lineTo(n+r-2,a+s/3*2),e.moveTo(n,a),e.lineTo(n,a);else if("next"===l)e.moveTo(n+2,a+s/3),e.lineTo(n+2,a),e.lineTo(n+r-2,a+s/2),e.lineTo(n+2,a+s),e.lineTo(n+2,a+s/3*2),e.moveTo(n,a),e.lineTo(n,a);else if("play"===l)if("stop"===t.status)e.moveTo(n+2,a),e.lineTo(n+r-2,a+s/2),e.lineTo(n+2,a+s),e.lineTo(n+2,a);else{var h="both"===t.brushType?2:3;e.rect(n+2,a,h,s),e.rect(n+r-h-2,a,h,s)}else if(l.match("image")){var m="";m=l.replace(new RegExp("^image:\\/\\/"),""),l=o.prototype.iconLibrary.image,l(e,{x:n,y:a,width:r,height:s,image:m})}}var n=e("./base"),a=e("zrender/shape/Rectangle"),o=e("../util/shape/Icon"),r=e("../util/shape/Chain"),s=e("../config");s.timeline={zlevel:0,z:4,show:!0,type:"time",notMerge:!1,realtime:!0,x:80,x2:80,y2:0,height:50,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,controlPosition:"left",autoPlay:!1,loop:!0,playInterval:2e3,lineStyle:{width:1,color:"#666",type:"dashed"},label:{show:!0,interval:"auto",rotate:0,textStyle:{color:"#333"}},checkpointStyle:{symbol:"auto",symbolSize:"auto",color:"auto",borderColor:"auto",borderWidth:"auto",label:{show:!1,textStyle:{color:"auto"}}},controlStyle:{itemSize:15,itemGap:5,normal:{color:"#333"},emphasis:{color:"#1e90ff"}},symbol:"emptyDiamond",symbolSize:4,currentIndex:0};var l=e("zrender/tool/util"),h=e("zrender/tool/area"),m=e("zrender/tool/event");return t.prototype={type:s.COMPONENT_TYPE_TIMELINE,_buildShape:function(){if(this._location=this._getLocation(),this._buildBackground(),this._buildControl(),this._chainPoint=this._getChainPoint(),this.timelineOption.label.show)for(var e=this._getInterval(),t=0,i=this._chainPoint.length;i>t;t+=e)this._chainPoint[t].showLabel=!0;this._buildChain(),this._buildHandle();for(var t=0,n=this.shapeList.length;n>t;t++)this.zr.addShape(this.shapeList[t])},_getLocation:function(){var e,t=this.timelineOption,i=this.reformCssArray(this.timelineOption.padding),n=this.zr.getWidth(),a=this.parsePercent(t.x,n),o=this.parsePercent(t.x2,n);null==t.width?(e=n-a-o,o=n-o):(e=this.parsePercent(t.width,n),o=a+e);var r,s,l=this.zr.getHeight(),h=this.parsePercent(t.height,l);return null!=t.y?(r=this.parsePercent(t.y,l),s=r+h):(s=l-this.parsePercent(t.y2,l),r=s-h),{x:a+i[3],y:r+i[0],x2:o-i[1],y2:s-i[2],width:e-i[1]-i[3],height:h-i[0]-i[2]}},_getReformedLabel:function(e){var t=this.timelineOption,i=null!=t.data[e].name?t.data[e].name:t.data[e],n=t.data[e].formatter||t.label.formatter;return n&&("function"==typeof n?i=n.call(this.myChart,i):"string"==typeof n&&(i=n.replace("{value}",i))),i},_getInterval:function(){var e=this._chainPoint,t=this.timelineOption,i=t.label.interval;if("auto"===i){var n=t.label.textStyle.fontSize,a=t.data,o=t.data.length;if(o>3){var r,s,l=!1;for(i=0;!l&&o>i;){i++,l=!0;for(var m=i;o>m;m+=i){if(r=e[m].x-e[m-i].x,0!==t.label.rotate)s=n;else if(a[m].textStyle)s=h.getTextWidth(e[m].name,e[m].textFont);else{var V=e[m].name+"",U=(V.match(/\w/g)||"").length,d=V.length-U;s=U*n*2/3+d*n}if(s>r){l=!1;break}}}}else i=1}else i=i-0+1;return i},_getChainPoint:function(){function e(e){return null!=h[e].name?h[e].name:h[e]+""}var t,i=this.timelineOption,n=i.symbol.toLowerCase(),a=i.symbolSize,o=i.label.rotate,r=i.label.textStyle,s=this.getFont(r),h=i.data,m=this._location.x,V=this._location.y+this._location.height/4*3,U=this._location.x2-this._location.x,d=h.length,p=[];if(d>1){var c=U/d;if(c=c>50?50:20>c?5:c,U-=2*c,"number"===i.type)for(var u=0;d>u;u++)p.push(m+c+U/(d-1)*u);else{p[0]=new Date(e(0).replace(/-/g,"/")),p[d-1]=new Date(e(d-1).replace(/-/g,"/"))-p[0];for(var u=1;d>u;u++)p[u]=m+c+U*(new Date(e(u).replace(/-/g,"/"))-p[0])/p[d-1];p[0]=m+c}}else p.push(m+U/2);for(var y,g,b,f,k,x=[],u=0;d>u;u++)m=p[u],y=h[u].symbol&&h[u].symbol.toLowerCase()||n,y.match("empty")?(y=y.replace("empty",""),b=!0):b=!1,y.match("star")&&(g=y.replace("star","")-0||5,y="star"),t=h[u].textStyle?l.merge(h[u].textStyle||{},r):r,f=t.align||"center",o?(f=o>0?"right":"left",k=[o*Math.PI/180,m,V-5]):k=!1,x.push({x:m,n:g,isEmpty:b,symbol:y,symbolSize:h[u].symbolSize||a,color:h[u].color,borderColor:h[u].borderColor,borderWidth:h[u].borderWidth,name:this._getReformedLabel(u),textColor:t.color,textAlign:f,textBaseline:t.baseline||"middle",textX:m,textY:V-(o?5:0),textFont:h[u].textStyle?this.getFont(t):s,rotation:k,showLabel:!1});return x},_buildBackground:function(){var e=this.timelineOption,t=this.reformCssArray(this.timelineOption.padding),i=this._location.width,n=this._location.height;(0!==e.borderWidth||"rgba(0,0,0,0)"!=e.backgroundColor.replace(/\s/g,""))&&this.shapeList.push(new a({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._location.x-t[3],y:this._location.y-t[0],width:i+t[1]+t[3],height:n+t[0]+t[2],brushType:0===e.borderWidth?"fill":"both",color:e.backgroundColor,strokeColor:e.borderColor,lineWidth:e.borderWidth}}))},_buildControl:function(){var e=this,t=this.timelineOption,i=t.lineStyle,n=t.controlStyle;if("none"!==t.controlPosition){var a,r=n.itemSize,s=n.itemGap;"left"===t.controlPosition?(a=this._location.x,this._location.x+=3*(r+s)):(a=this._location.x2-(3*(r+s)-s),this._location.x2-=3*(r+s));var h=this._location.y,m={zlevel:this.getZlevelBase(),z:this.getZBase()+1,style:{iconType:"timelineControl",symbol:"last",x:a,y:h,width:r,height:r,brushType:"stroke",color:n.normal.color,strokeColor:n.normal.color,lineWidth:i.width},highlightStyle:{color:n.emphasis.color,strokeColor:n.emphasis.color,lineWidth:i.width+1},clickable:!0};this._ctrLastShape=new o(m),this._ctrLastShape.onclick=function(){e.last()},this.shapeList.push(this._ctrLastShape),a+=r+s,this._ctrPlayShape=new o(l.clone(m)),this._ctrPlayShape.style.brushType="fill",this._ctrPlayShape.style.symbol="play",this._ctrPlayShape.style.status=this.timelineOption.autoPlay?"playing":"stop",this._ctrPlayShape.style.x=a,this._ctrPlayShape.onclick=function(){"stop"===e._ctrPlayShape.style.status?e.play():e.stop()},this.shapeList.push(this._ctrPlayShape),a+=r+s,this._ctrNextShape=new o(l.clone(m)),this._ctrNextShape.style.symbol="next",this._ctrNextShape.style.x=a,this._ctrNextShape.onclick=function(){e.next()},this.shapeList.push(this._ctrNextShape)}},_buildChain:function(){var e=this.timelineOption,t=e.lineStyle;this._timelineShae={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:this._location.x,y:this.subPixelOptimize(this._location.y,t.width),width:this._location.x2-this._location.x,height:this._location.height,chainPoint:this._chainPoint,brushType:"both",strokeColor:t.color,lineWidth:t.width,lineType:t.type},hoverable:!1,clickable:!0,onclick:this._onclick},this._timelineShae=new r(this._timelineShae),this.shapeList.push(this._timelineShae)},_buildHandle:function(){var e=this._chainPoint[this.currentIndex],t=e.symbolSize+1;t=5>t?5:t,this._handleShape={zlevel:this.getZlevelBase(),z:this.getZBase()+1,hoverable:!1,draggable:!0,style:{iconType:"diamond",n:e.n,x:e.x-t,y:this._location.y+this._location.height/4-t,width:2*t,height:2*t,brushType:"both",textPosition:"specific",textX:e.x,textY:this._location.y-this._location.height/4,textAlign:"center",textBaseline:"middle"},highlightStyle:{},ondrift:this._ondrift,ondragend:this._ondragend},this._handleShape=new o(this._handleShape),this.shapeList.push(this._handleShape)},_syncHandleShape:function(){if(this.timelineOption.show){var e=this.timelineOption,t=e.checkpointStyle,i=this._chainPoint[this.currentIndex];this._handleShape.style.text=t.label.show?i.name:"",this._handleShape.style.textFont=i.textFont,this._handleShape.style.n=i.n,"auto"===t.symbol?this._handleShape.style.iconType="none"!=i.symbol?i.symbol:"diamond":(this._handleShape.style.iconType=t.symbol,t.symbol.match("star")&&(this._handleShape.style.n=t.symbol.replace("star","")-0||5,this._handleShape.style.iconType="star"));var n;"auto"===t.symbolSize?(n=i.symbolSize+2,n=5>n?5:n):n=t.symbolSize-0,this._handleShape.style.color="auto"===t.color?i.color?i.color:e.controlStyle.emphasis.color:t.color,this._handleShape.style.textColor="auto"===t.label.textStyle.color?this._handleShape.style.color:t.label.textStyle.color,this._handleShape.highlightStyle.strokeColor=this._handleShape.style.strokeColor="auto"===t.borderColor?i.borderColor?i.borderColor:"#fff":t.borderColor,this._handleShape.style.lineWidth="auto"===t.borderWidth?i.borderWidth?i.borderWidth:0:t.borderWidth-0,this._handleShape.highlightStyle.lineWidth=this._handleShape.style.lineWidth+1,this.zr.animate(this._handleShape.id,"style").when(500,{x:i.x-n,textX:i.x,y:this._location.y+this._location.height/4-n,width:2*n,height:2*n}).start("ExponentialOut")}},_findChainIndex:function(e){var t=this._chainPoint,i=t.length;if(e<=t[0].x)return 0;if(e>=t[i-1].x)return i-1;for(var n=0;i-1>n;n++)if(e>=t[n].x&&e<=t[n+1].x)return Math.abs(e-t[n].x)<Math.abs(e-t[n+1].x)?n:n+1},__onclick:function(e){var t=m.getX(e.event),i=this._findChainIndex(t);return i===this.currentIndex?!0:(this.currentIndex=i,this.timelineOption.autoPlay&&this.stop(),clearTimeout(this.playTicket),void this._onFrame())},__ondrift:function(e,t){this.timelineOption.autoPlay&&this.stop();var i,n=this._chainPoint,a=n.length;e.style.x+t<=n[0].x-n[0].symbolSize?(e.style.x=n[0].x-n[0].symbolSize,i=0):e.style.x+t>=n[a-1].x-n[a-1].symbolSize?(e.style.x=n[a-1].x-n[a-1].symbolSize,i=a-1):(e.style.x+=t,i=this._findChainIndex(e.style.x));var o=n[i],r=o.symbolSize+2;if(e.style.iconType=o.symbol,e.style.n=o.n,e.style.textX=e.style.x+r/2,e.style.y=this._location.y+this._location.height/4-r,e.style.width=2*r,e.style.height=2*r,e.style.text=o.name,i===this.currentIndex)return!0;if(this.currentIndex=i,this.timelineOption.realtime){clearTimeout(this.playTicket);var s=this;this.playTicket=setTimeout(function(){s._setCurrentOption()},200)}return!0},__ondragend:function(){this.isDragend=!0},ondragend:function(e,t){this.isDragend&&e.target&&(!this.timelineOption.realtime&&this._setCurrentOption(),t.dragOut=!0,t.dragIn=!0,t.needRefresh=!1,this.isDragend=!1,this._syncHandleShape())},last:function(){return this.timelineOption.autoPlay&&this.stop(),this.currentIndex-=1,this.currentIndex<0&&(this.currentIndex=this.timelineOption.data.length-1),this._onFrame(),this.currentIndex},next:function(){return this.timelineOption.autoPlay&&this.stop(),this.currentIndex+=1,this.currentIndex>=this.timelineOption.data.length&&(this.currentIndex=0),this._onFrame(),this.currentIndex},play:function(e,t){return this._ctrPlayShape&&"playing"!=this._ctrPlayShape.style.status&&(this._ctrPlayShape.style.status="playing",this.zr.modShape(this._ctrPlayShape.id),this.zr.refreshNextFrame()),this.timelineOption.autoPlay=null!=t?t:!0,this.timelineOption.autoPlay||clearTimeout(this.playTicket),this.currentIndex=null!=e?e:this.currentIndex+1,this.currentIndex>=this.timelineOption.data.length&&(this.currentIndex=0),this._onFrame(),this.currentIndex},stop:function(){return this._ctrPlayShape&&"stop"!=this._ctrPlayShape.style.status&&(this._ctrPlayShape.style.status="stop",this.zr.modShape(this._ctrPlayShape.id),this.zr.refreshNextFrame()),this.timelineOption.autoPlay=!1,clearTimeout(this.playTicket),this.currentIndex},resize:function(){this.timelineOption.show&&(this.clear(),this._buildShape(),this._syncHandleShape())},setTheme:function(e){this.timelineOption=this.reformOption(l.clone(this.option.timeline)),this.timelineOption.label.textStyle=this.getTextStyle(this.timelineOption.label.textStyle),this.timelineOption.checkpointStyle.label.textStyle=this.getTextStyle(this.timelineOption.checkpointStyle.label.textStyle),this.myChart.canvasSupported||(this.timelineOption.realtime=!1),this.timelineOption.show&&e&&(this.clear(),this._buildShape(),this._syncHandleShape())},onbeforDispose:function(){clearTimeout(this.playTicket)}},o.prototype.iconLibrary.timelineControl=i,l.inherits(t,n),e("../component").define("timeline",t),t}),i("zrender/shape/Image",["require","./Base","../tool/util"],function(e){var t=e("./Base"),i=function(e){t.call(this,e)};return i.prototype={type:"image",brush:function(e,t,i){var n=this.style||{};t&&(n=this.getHighlightStyle(n,this.highlightStyle||{}));var a=n.image,o=this;if(this._imageCache||(this._imageCache={}),"string"==typeof a){var r=a;this._imageCache[r]?a=this._imageCache[r]:(a=new Image,a.onload=function(){a.onload=null,o.modSelf(),i()},a.src=r,this._imageCache[r]=a)}if(a){if("IMG"==a.nodeName.toUpperCase())if(window.ActiveXObject){if("complete"!=a.readyState)return}else if(!a.complete)return;var s=n.width||a.width,l=n.height||a.height,h=n.x,m=n.y;if(!a.width||!a.height)return;if(e.save(),this.doClip(e),this.setContext(e,n),this.setTransform(e),n.sWidth&&n.sHeight){var V=n.sx||0,U=n.sy||0;e.drawImage(a,V,U,n.sWidth,n.sHeight,h,m,s,l)}else if(n.sx&&n.sy){var V=n.sx,U=n.sy,d=s-V,p=l-U;e.drawImage(a,V,U,d,p,h,m,s,l)}else e.drawImage(a,h,m,s,l);n.width||(n.width=s),n.height||(n.height=l),this.style.width||(this.style.width=s),this.style.height||(this.style.height=l),this.drawText(e,n,this.style),e.restore()}},getRect:function(e){return{x:e.x,y:e.y,width:e.width,height:e.height}},clearCache:function(){this._imageCache={}}},e("../tool/util").inherits(i,t),i}),i("zrender/loadingEffect/Bar",["require","./Base","../tool/util","../tool/color","../shape/Rectangle"],function(e){function t(e){i.call(this,e)}var i=e("./Base"),n=e("../tool/util"),a=e("../tool/color"),o=e("../shape/Rectangle");return n.inherits(t,i),t.prototype._start=function(e,t){var i=n.merge(this.options,{textStyle:{color:"#888"},backgroundColor:"rgba(250, 250, 250, 0.8)",effectOption:{x:0,y:this.canvasHeight/2-30,width:this.canvasWidth,height:5,brushType:"fill",timeInterval:100}}),r=this.createTextShape(i.textStyle),s=this.createBackgroundShape(i.backgroundColor),l=i.effectOption,h=new o({highlightStyle:n.clone(l)});return h.highlightStyle.color=l.color||a.getLinearGradient(l.x,l.y,l.x+l.width,l.y+l.height,[[0,"#ff6400"],[.5,"#ffe100"],[1,"#b1ff00"]]),null!=i.progress?(e(s),h.highlightStyle.width=this.adjust(i.progress,[0,1])*i.effectOption.width,e(h),e(r),void t()):(h.highlightStyle.width=0,setInterval(function(){e(s),h.highlightStyle.width<l.width?h.highlightStyle.width+=8:h.highlightStyle.width=0,e(h),e(r),t()},l.timeInterval))},t}),i("zrender/loadingEffect/Bubble",["require","./Base","../tool/util","../tool/color","../shape/Circle"],function(e){function t(e){i.call(this,e)}var i=e("./Base"),n=e("../tool/util"),a=e("../tool/color"),o=e("../shape/Circle");return n.inherits(t,i),t.prototype._start=function(e,t){for(var i=n.merge(this.options,{textStyle:{color:"#888"},backgroundColor:"rgba(250, 250, 250, 0.8)",effect:{n:50,lineWidth:2,brushType:"stroke",color:"random",timeInterval:100}}),r=this.createTextShape(i.textStyle),s=this.createBackgroundShape(i.backgroundColor),l=i.effect,h=l.n,m=l.brushType,V=l.lineWidth,U=[],d=this.canvasWidth,p=this.canvasHeight,c=0;h>c;c++){var u="random"==l.color?a.alpha(a.random(),.3):l.color;U[c]=new o({highlightStyle:{x:Math.ceil(Math.random()*d),y:Math.ceil(Math.random()*p),r:Math.ceil(40*Math.random()),brushType:m,color:u,strokeColor:u,lineWidth:V},animationY:Math.ceil(20*Math.random())})}return setInterval(function(){e(s);for(var i=0;h>i;i++){var n=U[i].highlightStyle;n.y-U[i].animationY+n.r<=0&&(U[i].highlightStyle.y=p+n.r,U[i].highlightStyle.x=Math.ceil(Math.random()*d)),U[i].highlightStyle.y-=U[i].animationY,e(U[i])}e(r),t()},l.timeInterval)},t}),i("zrender/loadingEffect/DynamicLine",["require","./Base","../tool/util","../tool/color","../shape/Line"],function(e){function t(e){i.call(this,e)}var i=e("./Base"),n=e("../tool/util"),a=e("../tool/color"),o=e("../shape/Line");return n.inherits(t,i),t.prototype._start=function(e,t){for(var i=n.merge(this.options,{textStyle:{color:"#fff"},backgroundColor:"rgba(0, 0, 0, 0.8)",effectOption:{n:30,lineWidth:1,color:"random",timeInterval:100}}),r=this.createTextShape(i.textStyle),s=this.createBackgroundShape(i.backgroundColor),l=i.effectOption,h=l.n,m=l.lineWidth,V=[],U=this.canvasWidth,d=this.canvasHeight,p=0;h>p;p++){var c=-Math.ceil(1e3*Math.random()),u=Math.ceil(400*Math.random()),y=Math.ceil(Math.random()*d),g="random"==l.color?a.random():l.color;V[p]=new o({highlightStyle:{xStart:c,yStart:y,xEnd:c+u,yEnd:y,strokeColor:g,lineWidth:m},animationX:Math.ceil(100*Math.random()),len:u})}return setInterval(function(){e(s);for(var i=0;h>i;i++){var n=V[i].highlightStyle;n.xStart>=U&&(V[i].len=Math.ceil(400*Math.random()),n.xStart=-400,n.xEnd=-400+V[i].len,n.yStart=Math.ceil(Math.random()*d),n.yEnd=n.yStart),n.xStart+=V[i].animationX,n.xEnd+=V[i].animationX,e(V[i])}e(r),t()},l.timeInterval)},t}),i("zrender/loadingEffect/Ring",["require","./Base","../tool/util","../tool/color","../shape/Ring","../shape/Sector"],function(e){function t(e){i.call(this,e)}var i=e("./Base"),n=e("../tool/util"),a=e("../tool/color"),o=e("../shape/Ring"),r=e("../shape/Sector");return n.inherits(t,i),t.prototype._start=function(e,t){var i=n.merge(this.options,{textStyle:{color:"#07a"},backgroundColor:"rgba(250, 250, 250, 0.8)",effect:{x:this.canvasWidth/2,y:this.canvasHeight/2,r0:60,r:100,color:"#bbdcff",brushType:"fill",textPosition:"inside",textFont:"normal 30px verdana",textColor:"rgba(30, 144, 255, 0.6)",timeInterval:100}}),s=i.effect,l=i.textStyle;
+
+null==l.x&&(l.x=s.x),null==l.y&&(l.y=s.y+(s.r0+s.r)/2-5);for(var h=this.createTextShape(i.textStyle),m=this.createBackgroundShape(i.backgroundColor),V=s.x,U=s.y,d=s.r0+6,p=s.r-6,c=s.color,u=a.lift(c,.1),y=new o({highlightStyle:n.clone(s)}),g=[],b=a.getGradientColors(["#ff6400","#ffe100","#97ff00"],25),f=15,k=240,x=0;16>x;x++)g.push(new r({highlightStyle:{x:V,y:U,r0:d,r:p,startAngle:k-f,endAngle:k,brushType:"fill",color:u},_color:a.getLinearGradient(V+d*Math.cos(k,!0),U-d*Math.sin(k,!0),V+d*Math.cos(k-f,!0),U-d*Math.sin(k-f,!0),[[0,b[2*x]],[1,b[2*x+1]]])})),k-=f;k=360;for(var x=0;4>x;x++)g.push(new r({highlightStyle:{x:V,y:U,r0:d,r:p,startAngle:k-f,endAngle:k,brushType:"fill",color:u},_color:a.getLinearGradient(V+d*Math.cos(k,!0),U-d*Math.sin(k,!0),V+d*Math.cos(k-f,!0),U-d*Math.sin(k-f,!0),[[0,b[2*x+32]],[1,b[2*x+33]]])})),k-=f;var _=0;if(null!=i.progress){e(m),_=100*this.adjust(i.progress,[0,1]).toFixed(2)/5,y.highlightStyle.text=5*_+"%",e(y);for(var x=0;20>x;x++)g[x].highlightStyle.color=_>x?g[x]._color:u,e(g[x]);return e(h),void t()}return setInterval(function(){e(m),_+=_>=20?-20:1,e(y);for(var i=0;20>i;i++)g[i].highlightStyle.color=_>i?g[i]._color:u,e(g[i]);e(h),t()},s.timeInterval)},t}),i("zrender/loadingEffect/Spin",["require","./Base","../tool/util","../tool/color","../tool/area","../shape/Sector"],function(e){function t(e){i.call(this,e)}var i=e("./Base"),n=e("../tool/util"),a=e("../tool/color"),o=e("../tool/area"),r=e("../shape/Sector");return n.inherits(t,i),t.prototype._start=function(e,t){var i=n.merge(this.options,{textStyle:{color:"#fff",textAlign:"start"},backgroundColor:"rgba(0, 0, 0, 0.8)"}),s=this.createTextShape(i.textStyle),l=10,h=o.getTextWidth(s.highlightStyle.text,s.highlightStyle.textFont),m=o.getTextHeight(s.highlightStyle.text,s.highlightStyle.textFont),V=n.merge(this.options.effect||{},{r0:9,r:15,n:18,color:"#fff",timeInterval:100}),U=this.getLocation(this.options.textStyle,h+l+2*V.r,Math.max(2*V.r,m));V.x=U.x+V.r,V.y=s.highlightStyle.y=U.y+U.height/2,s.highlightStyle.x=V.x+V.r+l;for(var d=this.createBackgroundShape(i.backgroundColor),p=V.n,c=V.x,u=V.y,y=V.r0,g=V.r,b=V.color,f=[],k=Math.round(180/p),x=0;p>x;x++)f[x]=new r({highlightStyle:{x:c,y:u,r0:y,r:g,startAngle:k*x*2,endAngle:k*x*2+k,color:a.alpha(b,(x+1)/p),brushType:"fill"}});var _=[0,c,u];return setInterval(function(){e(d),_[0]-=.3;for(var i=0;p>i;i++)f[i].rotation=_,e(f[i]);e(s),t()},V.timeInterval)},t}),i("zrender/loadingEffect/Whirling",["require","./Base","../tool/util","../tool/area","../shape/Ring","../shape/Droplet","../shape/Circle"],function(e){function t(e){i.call(this,e)}var i=e("./Base"),n=e("../tool/util"),a=e("../tool/area"),o=e("../shape/Ring"),r=e("../shape/Droplet"),s=e("../shape/Circle");return n.inherits(t,i),t.prototype._start=function(e,t){var i=n.merge(this.options,{textStyle:{color:"#888",textAlign:"start"},backgroundColor:"rgba(250, 250, 250, 0.8)"}),l=this.createTextShape(i.textStyle),h=10,m=a.getTextWidth(l.highlightStyle.text,l.highlightStyle.textFont),V=a.getTextHeight(l.highlightStyle.text,l.highlightStyle.textFont),U=n.merge(this.options.effect||{},{r:18,colorIn:"#fff",colorOut:"#555",colorWhirl:"#6cf",timeInterval:50}),d=this.getLocation(this.options.textStyle,m+h+2*U.r,Math.max(2*U.r,V));U.x=d.x+U.r,U.y=l.highlightStyle.y=d.y+d.height/2,l.highlightStyle.x=U.x+U.r+h;var p=this.createBackgroundShape(i.backgroundColor),c=new r({highlightStyle:{a:Math.round(U.r/2),b:Math.round(U.r-U.r/6),brushType:"fill",color:U.colorWhirl}}),u=new s({highlightStyle:{r:Math.round(U.r/6),brushType:"fill",color:U.colorIn}}),y=new o({highlightStyle:{r0:Math.round(U.r-U.r/3),r:U.r,brushType:"fill",color:U.colorOut}}),g=[0,U.x,U.y];return c.highlightStyle.x=u.highlightStyle.x=y.highlightStyle.x=g[1],c.highlightStyle.y=u.highlightStyle.y=y.highlightStyle.y=g[2],setInterval(function(){e(p),e(y),g[0]-=.3,c.rotation=g,e(c),e(u),e(l),t()},U.timeInterval)},t}),i("echarts/theme/macarons",[],function(){var e={color:["#2ec7c9","#b6a2de","#5ab1ef","#ffb980","#d87a80","#8d98b3","#e5cf0d","#97b552","#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"],title:{textStyle:{fontWeight:"normal",color:"#008acd"}},dataRange:{itemWidth:15,color:["#5ab1ef","#e0ffff"]},toolbox:{color:["#1e90ff","#1e90ff","#1e90ff","#1e90ff"],effectiveColor:"#ff4500"},tooltip:{backgroundColor:"rgba(50,50,50,0.5)",axisPointer:{type:"line",lineStyle:{color:"#008acd"},crossStyle:{color:"#008acd"},shadowStyle:{color:"rgba(200,200,200,0.2)"}}},dataZoom:{dataBackgroundColor:"#efefff",fillerColor:"rgba(182,162,222,0.2)",handleColor:"#008acd"},grid:{borderColor:"#eee"},categoryAxis:{axisLine:{lineStyle:{color:"#008acd"}},splitLine:{lineStyle:{color:["#eee"]}}},valueAxis:{axisLine:{lineStyle:{color:"#008acd"}},splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.1)","rgba(200,200,200,0.1)"]}},splitLine:{lineStyle:{color:["#eee"]}}},polar:{axisLine:{lineStyle:{color:"#ddd"}},splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(200,200,200,0.2)"]}},splitLine:{lineStyle:{color:"#ddd"}}},timeline:{lineStyle:{color:"#008acd"},controlStyle:{normal:{color:"#008acd"},emphasis:{color:"#008acd"}},symbol:"emptyCircle",symbolSize:3},bar:{itemStyle:{normal:{barBorderRadius:5},emphasis:{barBorderRadius:5}}},line:{smooth:!0,symbol:"emptyCircle",symbolSize:3},k:{itemStyle:{normal:{color:"#d87a80",color0:"#2ec7c9",lineStyle:{color:"#d87a80",color0:"#2ec7c9"}}}},scatter:{symbol:"circle",symbolSize:4},radar:{symbol:"emptyCircle",symbolSize:3},map:{itemStyle:{normal:{areaStyle:{color:"#ddd"},label:{textStyle:{color:"#d87a80"}}},emphasis:{areaStyle:{color:"#fe994e"}}}},force:{itemStyle:{normal:{linkStyle:{color:"#1e90ff"}}}},chord:{itemStyle:{normal:{borderWidth:1,borderColor:"rgba(128, 128, 128, 0.5)",chordStyle:{lineStyle:{color:"rgba(128, 128, 128, 0.5)"}}},emphasis:{borderWidth:1,borderColor:"rgba(128, 128, 128, 0.5)",chordStyle:{lineStyle:{color:"rgba(128, 128, 128, 0.5)"}}}}},gauge:{axisLine:{lineStyle:{color:[[.2,"#2ec7c9"],[.8,"#5ab1ef"],[1,"#d87a80"]],width:10}},axisTick:{splitNumber:10,length:15,lineStyle:{color:"auto"}},splitLine:{length:22,lineStyle:{color:"auto"}},pointer:{width:5}},textStyle:{fontFamily:"微软雅黑, Arial, Verdana, sans-serif"}};return e}),i("echarts/theme/infographic",[],function(){var e={color:["#C1232B","#B5C334","#FCCE10","#E87C25","#27727B","#FE8463","#9BCA63","#FAD860","#F3A43B","#60C0DD","#D7504B","#C6E579","#F4E001","#F0805A","#26C0C0"],title:{textStyle:{fontWeight:"normal",color:"#27727B"}},dataRange:{x:"right",y:"center",itemWidth:5,itemHeight:25,color:["#C1232B","#FCCE10"]},toolbox:{color:["#C1232B","#B5C334","#FCCE10","#E87C25","#27727B","#FE8463","#9BCA63","#FAD860","#F3A43B","#60C0DD"],effectiveColor:"#ff4500"},tooltip:{backgroundColor:"rgba(50,50,50,0.5)",axisPointer:{type:"line",lineStyle:{color:"#27727B",type:"dashed"},crossStyle:{color:"#27727B"},shadowStyle:{color:"rgba(200,200,200,0.3)"}}},dataZoom:{dataBackgroundColor:"rgba(181,195,52,0.3)",fillerColor:"rgba(181,195,52,0.2)",handleColor:"#27727B"},grid:{borderWidth:0},categoryAxis:{axisLine:{lineStyle:{color:"#27727B"}},splitLine:{show:!1}},valueAxis:{axisLine:{show:!1},splitArea:{show:!1},splitLine:{lineStyle:{color:["#ccc"],type:"dashed"}}},polar:{axisLine:{lineStyle:{color:"#ddd"}},splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(200,200,200,0.2)"]}},splitLine:{lineStyle:{color:"#ddd"}}},timeline:{lineStyle:{color:"#27727B"},controlStyle:{normal:{color:"#27727B"},emphasis:{color:"#27727B"}},symbol:"emptyCircle",symbolSize:3},line:{itemStyle:{normal:{borderWidth:2,borderColor:"#fff",lineStyle:{width:3}},emphasis:{borderWidth:0}},symbol:"circle",symbolSize:3.5},k:{itemStyle:{normal:{color:"#C1232B",color0:"#B5C334",lineStyle:{width:1,color:"#C1232B",color0:"#B5C334"}}}},scatter:{itemStyle:{normal:{borderWidth:1,borderColor:"rgba(200,200,200,0.5)"},emphasis:{borderWidth:0}},symbol:"star4",symbolSize:4},radar:{symbol:"emptyCircle",symbolSize:3},map:{itemStyle:{normal:{areaStyle:{color:"#ddd"},label:{textStyle:{color:"#C1232B"}}},emphasis:{areaStyle:{color:"#fe994e"},label:{textStyle:{color:"rgb(100,0,0)"}}}}},force:{itemStyle:{normal:{linkStyle:{color:"#27727B"}}}},chord:{itemStyle:{normal:{borderWidth:1,borderColor:"rgba(128, 128, 128, 0.5)",chordStyle:{lineStyle:{color:"rgba(128, 128, 128, 0.5)"}}},emphasis:{borderWidth:1,borderColor:"rgba(128, 128, 128, 0.5)",chordStyle:{lineStyle:{color:"rgba(128, 128, 128, 0.5)"}}}}},gauge:{center:["50%","80%"],radius:"100%",startAngle:180,endAngle:0,axisLine:{show:!0,lineStyle:{color:[[.2,"#B5C334"],[.8,"#27727B"],[1,"#C1232B"]],width:"40%"}},axisTick:{splitNumber:2,length:5,lineStyle:{color:"#fff"}},axisLabel:{textStyle:{color:"#fff",fontWeight:"bolder"}},splitLine:{length:"5%",lineStyle:{color:"#fff"}},pointer:{width:"40%",length:"80%",color:"#fff"},title:{offsetCenter:[0,-20],textStyle:{color:"auto",fontSize:20}},detail:{offsetCenter:[0,0],textStyle:{color:"auto",fontSize:40}}},textStyle:{fontFamily:"微软雅黑, Arial, Verdana, sans-serif"}};return e}),i("zrender/dep/excanvas",["require"],function(){return document.createElement("canvas").getContext?G_vmlCanvasManager=!1:!function(){function e(){return this.context_||(this.context_=new f(this))}function t(e,t){var i=O.call(arguments,2);return function(){return e.apply(t,i.concat(O.call(arguments)))}}function i(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}function n(e,t,i){e.namespaces[t]||e.namespaces.add(t,i,"#default#VML")}function a(e){if(n(e,"g_vml_","urn:schemas-microsoft-com:vml"),n(e,"g_o_","urn:schemas-microsoft-com:office:office"),!e.styleSheets.ex_canvas_){var t=e.createStyleSheet();t.owningElement.id="ex_canvas_",t.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}}function o(e){var t=e.srcElement;switch(e.propertyName){case"width":t.getContext().clearRect(),t.style.width=t.attributes.width.nodeValue+"px",t.firstChild.style.width=t.clientWidth+"px";break;case"height":t.getContext().clearRect(),t.style.height=t.attributes.height.nodeValue+"px",t.firstChild.style.height=t.clientHeight+"px"}}function r(e){var t=e.srcElement;t.firstChild&&(t.firstChild.style.width=t.clientWidth+"px",t.firstChild.style.height=t.clientHeight+"px")}function s(){return[[1,0,0],[0,1,0],[0,0,1]]}function l(e,t){for(var i=s(),n=0;3>n;n++)for(var a=0;3>a;a++){for(var o=0,r=0;3>r;r++)o+=e[n][r]*t[r][a];i[n][a]=o}return i}function h(e,t){t.fillStyle=e.fillStyle,t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.lineWidth=e.lineWidth,t.miterLimit=e.miterLimit,t.shadowBlur=e.shadowBlur,t.shadowColor=e.shadowColor,t.shadowOffsetX=e.shadowOffsetX,t.shadowOffsetY=e.shadowOffsetY,t.strokeStyle=e.strokeStyle,t.globalAlpha=e.globalAlpha,t.font=e.font,t.textAlign=e.textAlign,t.textBaseline=e.textBaseline,t.scaleX_=e.scaleX_,t.scaleY_=e.scaleY_,t.lineScale_=e.lineScale_}function m(e){var t=e.indexOf("(",3),i=e.indexOf(")",t+1),n=e.substring(t+1,i).split(",");return(4!=n.length||"a"!=e.charAt(3))&&(n[3]=1),n}function V(e){return parseFloat(e)/100}function U(e,t,i){return Math.min(i,Math.max(t,e))}function d(e){var t,i,n,a,o,r;if(a=parseFloat(e[0])/360%360,0>a&&a++,o=U(V(e[1]),0,1),r=U(V(e[2]),0,1),0==o)t=i=n=r;else{var s=.5>r?r*(1+o):r+o-r*o,l=2*r-s;t=p(l,s,a+1/3),i=p(l,s,a),n=p(l,s,a-1/3)}return"#"+D[Math.floor(255*t)]+D[Math.floor(255*i)]+D[Math.floor(255*n)]}function p(e,t,i){return 0>i&&i++,i>1&&i--,1>6*i?e+6*(t-e)*i:1>2*i?t:2>3*i?e+(t-e)*(2/3-i)*6:e}function c(e){if(e in R)return R[e];var t,i=1;if(e=String(e),"#"==e.charAt(0))t=e;else if(/^rgb/.test(e)){for(var n,a=m(e),t="#",o=0;3>o;o++)n=-1!=a[o].indexOf("%")?Math.floor(255*V(a[o])):+a[o],t+=D[U(n,0,255)];i=+a[3]}else if(/^hsl/.test(e)){var a=m(e);t=d(a),i=a[3]}else t=H[e]||e;return R[e]={color:t,alpha:i}}function u(e){if(Y[e])return Y[e];var t,i=document.createElement("div"),n=i.style;try{n.font=e,t=n.fontFamily.split(",")[0]}catch(a){}return Y[e]={style:n.fontStyle||G.style,variant:n.fontVariant||G.variant,weight:n.fontWeight||G.weight,size:n.fontSize||G.size,family:t||G.family}}function y(e,t){var i={};for(var n in e)i[n]=e[n];var a=parseFloat(t.currentStyle.fontSize),o=parseFloat(e.size);return i.size="number"==typeof e.size?e.size:-1!=e.size.indexOf("px")?o:-1!=e.size.indexOf("em")?a*o:-1!=e.size.indexOf("%")?a/100*o:-1!=e.size.indexOf("pt")?o/.75:a,i}function g(e){return e.style+" "+e.variant+" "+e.weight+" "+e.size+"px '"+e.family+"'"}function b(e){return Q[e]||"square"}function f(e){this.m_=s(),this.mStack_=[],this.aStack_=[],this.currentPath_=[],this.strokeStyle="#000",this.fillStyle="#000",this.lineWidth=1,this.lineJoin="miter",this.lineCap="butt",this.miterLimit=1*A,this.globalAlpha=1,this.font="12px 微软雅黑",this.textAlign="left",this.textBaseline="alphabetic",this.canvas=e;var t="width:"+e.clientWidth+"px;height:"+e.clientHeight+"px;overflow:hidden;position:absolute",i=e.ownerDocument.createElement("div");i.style.cssText=t,e.appendChild(i);var n=i.cloneNode(!1);n.style.backgroundColor="#fff",n.style.filter="alpha(opacity=0)",e.appendChild(n),this.element_=i,this.scaleX_=1,this.scaleY_=1,this.lineScale_=1}function k(e,t,i,n){e.currentPath_.push({type:"bezierCurveTo",cp1x:t.x,cp1y:t.y,cp2x:i.x,cp2y:i.y,x:n.x,y:n.y}),e.currentX_=n.x,e.currentY_=n.y}function x(e,t){var i=c(e.strokeStyle),n=i.color,a=i.alpha*e.globalAlpha,o=e.lineScale_*e.lineWidth;1>o&&(a*=o),t.push("<g_vml_:stroke",' opacity="',a,'"',' joinstyle="',e.lineJoin,'"',' miterlimit="',e.miterLimit,'"',' endcap="',b(e.lineCap),'"',' weight="',o,'px"',' color="',n,'" />')}function _(e,t,i,n){var a=e.fillStyle,o=e.scaleX_,r=e.scaleY_,s=n.x-i.x,l=n.y-i.y;if(a instanceof v){var h=0,m={x:0,y:0},V=0,U=1;if("gradient"==a.type_){var d=a.x0_/o,p=a.y0_/r,u=a.x1_/o,y=a.y1_/r,g=L(e,d,p),b=L(e,u,y),f=b.x-g.x,k=b.y-g.y;h=180*Math.atan2(f,k)/Math.PI,0>h&&(h+=360),1e-6>h&&(h=0)}else{var g=L(e,a.x0_,a.y0_);m={x:(g.x-i.x)/s,y:(g.y-i.y)/l},s/=o*A,l/=r*A;var x=C.max(s,l);V=2*a.r0_/x,U=2*a.r1_/x-V}var _=a.colors_;_.sort(function(e,t){return e.offset-t.offset});for(var W=_.length,X=_[0].color,K=_[W-1].color,I=_[0].alpha*e.globalAlpha,J=_[W-1].alpha*e.globalAlpha,S=[],E=0;W>E;E++){var F=_[E];S.push(F.offset*U+V+" "+F.color)}t.push('<g_vml_:fill type="',a.type_,'"',' method="none" focus="100%"',' color="',X,'"',' color2="',K,'"',' colors="',S.join(","),'"',' opacity="',J,'"',' g_o_:opacity2="',I,'"',' angle="',h,'"',' focusposition="',m.x,",",m.y,'" />')}else if(a instanceof w){if(s&&l){var T=-i.x,z=-i.y;t.push("<g_vml_:fill",' position="',T/s*o*o,",",z/l*r*r,'"',' type="tile"',' src="',a.src_,'" />')}}else{var M=c(e.fillStyle),O=M.color,P=M.alpha*e.globalAlpha;t.push('<g_vml_:fill color="',O,'" opacity="',P,'" />')}}function L(e,t,i){var n=e.m_;return{x:A*(t*n[0][0]+i*n[1][0]+n[2][0])-M,y:A*(t*n[0][1]+i*n[1][1]+n[2][1])-M}}function W(e){return isFinite(e[0][0])&&isFinite(e[0][1])&&isFinite(e[1][0])&&isFinite(e[1][1])&&isFinite(e[2][0])&&isFinite(e[2][1])}function X(e,t,i){if(W(t)&&(e.m_=t,e.scaleX_=Math.sqrt(t[0][0]*t[0][0]+t[0][1]*t[0][1]),e.scaleY_=Math.sqrt(t[1][0]*t[1][0]+t[1][1]*t[1][1]),i)){var n=t[0][0]*t[1][1]-t[0][1]*t[1][0];e.lineScale_=z(T(n))}}function v(e){this.type_=e,this.x0_=0,this.y0_=0,this.r0_=0,this.x1_=0,this.y1_=0,this.r1_=0,this.colors_=[]}function w(e,t){switch(I(e),t){case"repeat":case null:case"":this.repetition_="repeat";break;case"repeat-x":case"repeat-y":case"no-repeat":this.repetition_=t;break;default:K("SYNTAX_ERR")}this.src_=e.src,this.width_=e.width,this.height_=e.height}function K(e){throw new J(e)}function I(e){e&&1==e.nodeType&&"IMG"==e.tagName||K("TYPE_MISMATCH_ERR"),"complete"!=e.readyState&&K("INVALID_STATE_ERR")}function J(e){this.code=this[e],this.message=e+": DOM Exception "+this.code}var C=Math,S=C.round,E=C.sin,F=C.cos,T=C.abs,z=C.sqrt,A=10,M=A/2,O=(+navigator.userAgent.match(/MSIE ([\d.]+)?/)[1],Array.prototype.slice);a(document);var P={init:function(e){var i=e||document;i.createElement("canvas"),i.attachEvent("onreadystatechange",t(this.init_,this,i))},init_:function(e){for(var t=e.getElementsByTagName("canvas"),i=0;i<t.length;i++)this.initElement(t[i])},initElement:function(t){if(!t.getContext){t.getContext=e,a(t.ownerDocument),t.innerHTML="",t.attachEvent("onpropertychange",o),t.attachEvent("onresize",r);var i=t.attributes;i.width&&i.width.specified?t.style.width=i.width.nodeValue+"px":t.width=t.clientWidth,i.height&&i.height.specified?t.style.height=i.height.nodeValue+"px":t.height=t.clientHeight}return t}};P.init();for(var D=[],N=0;16>N;N++)for(var B=0;16>B;B++)D[16*N+B]=N.toString(16)+B.toString(16);var H={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",grey:"#808080",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",oldlace:"#FDF5E6",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",whitesmoke:"#F5F5F5",yellowgreen:"#9ACD32"},R={},G={style:"normal",variant:"normal",weight:"normal",size:12,family:"微软雅黑"},Y={},Q={butt:"flat",round:"round"},Z=f.prototype;Z.clearRect=function(){this.textMeasureEl_&&(this.textMeasureEl_.removeNode(!0),this.textMeasureEl_=null),this.element_.innerHTML=""},Z.beginPath=function(){this.currentPath_=[]},Z.moveTo=function(e,t){var i=L(this,e,t);this.currentPath_.push({type:"moveTo",x:i.x,y:i.y}),this.currentX_=i.x,this.currentY_=i.y},Z.lineTo=function(e,t){var i=L(this,e,t);this.currentPath_.push({type:"lineTo",x:i.x,y:i.y}),this.currentX_=i.x,this.currentY_=i.y},Z.bezierCurveTo=function(e,t,i,n,a,o){var r=L(this,a,o),s=L(this,e,t),l=L(this,i,n);k(this,s,l,r)},Z.quadraticCurveTo=function(e,t,i,n){var a=L(this,e,t),o=L(this,i,n),r={x:this.currentX_+2/3*(a.x-this.currentX_),y:this.currentY_+2/3*(a.y-this.currentY_)},s={x:r.x+(o.x-this.currentX_)/3,y:r.y+(o.y-this.currentY_)/3};k(this,r,s,o)},Z.arc=function(e,t,i,n,a,o){i*=A;var r=o?"at":"wa",s=e+F(n)*i-M,l=t+E(n)*i-M,h=e+F(a)*i-M,m=t+E(a)*i-M;s!=h||o||(s+=.125);var V=L(this,e,t),U=L(this,s,l),d=L(this,h,m);this.currentPath_.push({type:r,x:V.x,y:V.y,radius:i,xStart:U.x,yStart:U.y,xEnd:d.x,yEnd:d.y})},Z.rect=function(e,t,i,n){this.moveTo(e,t),this.lineTo(e+i,t),this.lineTo(e+i,t+n),this.lineTo(e,t+n),this.closePath()},Z.strokeRect=function(e,t,i,n){var a=this.currentPath_;this.beginPath(),this.moveTo(e,t),this.lineTo(e+i,t),this.lineTo(e+i,t+n),this.lineTo(e,t+n),this.closePath(),this.stroke(),this.currentPath_=a},Z.fillRect=function(e,t,i,n){var a=this.currentPath_;this.beginPath(),this.moveTo(e,t),this.lineTo(e+i,t),this.lineTo(e+i,t+n),this.lineTo(e,t+n),this.closePath(),this.fill(),this.currentPath_=a},Z.createLinearGradient=function(e,t,i,n){var a=new v("gradient");return a.x0_=e,a.y0_=t,a.x1_=i,a.y1_=n,a},Z.createRadialGradient=function(e,t,i,n,a,o){var r=new v("gradientradial");return r.x0_=e,r.y0_=t,r.r0_=i,r.x1_=n,r.y1_=a,r.r1_=o,r},Z.drawImage=function(e){var t,i,n,a,o,r,s,l,h=e.runtimeStyle.width,m=e.runtimeStyle.height;e.runtimeStyle.width="auto",e.runtimeStyle.height="auto";var V=e.width,U=e.height;if(e.runtimeStyle.width=h,e.runtimeStyle.height=m,3==arguments.length)t=arguments[1],i=arguments[2],o=r=0,s=n=V,l=a=U;else if(5==arguments.length)t=arguments[1],i=arguments[2],n=arguments[3],a=arguments[4],o=r=0,s=V,l=U;else{if(9!=arguments.length)throw Error("Invalid number of arguments");o=arguments[1],r=arguments[2],s=arguments[3],l=arguments[4],t=arguments[5],i=arguments[6],n=arguments[7],a=arguments[8]}var d=L(this,t,i),p=[],c=10,u=10,y=b=1;if(p.push(" <g_vml_:group",' coordsize="',A*c,",",A*u,'"',' coordorigin="0,0"',' style="width:',c,"px;height:",u,"px;position:absolute;"),1!=this.m_[0][0]||this.m_[0][1]||1!=this.m_[1][1]||this.m_[1][0]){var g=[],y=this.scaleX_,b=this.scaleY_;g.push("M11=",this.m_[0][0]/y,",","M12=",this.m_[1][0]/b,",","M21=",this.m_[0][1]/y,",","M22=",this.m_[1][1]/b,",","Dx=",S(d.x/A),",","Dy=",S(d.y/A),"");var f=d,k=L(this,t+n,i),x=L(this,t,i+a),_=L(this,t+n,i+a);f.x=C.max(f.x,k.x,x.x,_.x),f.y=C.max(f.y,k.y,x.y,_.y),p.push("padding:0 ",S(f.x/A),"px ",S(f.y/A),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",g.join(""),", SizingMethod='clip');")}else p.push("top:",S(d.y/A),"px;left:",S(d.x/A),"px;");p.push(' ">'),(o||r)&&p.push('<div style="overflow: hidden; width:',Math.ceil((n+o*n/s)*y),"px;"," height:",Math.ceil((a+r*a/l)*b),"px;"," filter:progid:DxImageTransform.Microsoft.Matrix(Dx=",-o*n/s*y,",Dy=",-r*a/l*b,');">'),p.push('<div style="width:',Math.round(y*V*n/s),"px;"," height:",Math.round(b*U*a/l),"px;"," filter:"),this.globalAlpha<1&&p.push(" progid:DXImageTransform.Microsoft.Alpha(opacity="+100*this.globalAlpha+")"),p.push(" progid:DXImageTransform.Microsoft.AlphaImageLoader(src=",e.src,',sizingMethod=scale)">'),(o||r)&&p.push("</div>"),p.push("</div></div>"),this.element_.insertAdjacentHTML("BeforeEnd",p.join(""))},Z.stroke=function(e){var t=[],i=10,n=10;t.push("<g_vml_:shape",' filled="',!!e,'"',' style="position:absolute;width:',i,"px;height:",n,'px;"',' coordorigin="0,0"',' coordsize="',A*i,",",A*n,'"',' stroked="',!e,'"',' path="');for(var a={x:null,y:null},o={x:null,y:null},r=0;r<this.currentPath_.length;r++){var s,l=this.currentPath_[r];switch(l.type){case"moveTo":s=l,t.push(" m ",S(l.x),",",S(l.y));break;case"lineTo":t.push(" l ",S(l.x),",",S(l.y));break;case"close":t.push(" x "),l=null;break;case"bezierCurveTo":t.push(" c ",S(l.cp1x),",",S(l.cp1y),",",S(l.cp2x),",",S(l.cp2y),",",S(l.x),",",S(l.y));break;case"at":case"wa":t.push(" ",l.type," ",S(l.x-this.scaleX_*l.radius),",",S(l.y-this.scaleY_*l.radius)," ",S(l.x+this.scaleX_*l.radius),",",S(l.y+this.scaleY_*l.radius)," ",S(l.xStart),",",S(l.yStart)," ",S(l.xEnd),",",S(l.yEnd))}l&&((null==a.x||l.x<a.x)&&(a.x=l.x),(null==o.x||l.x>o.x)&&(o.x=l.x),(null==a.y||l.y<a.y)&&(a.y=l.y),(null==o.y||l.y>o.y)&&(o.y=l.y))}t.push(' ">'),e?_(this,t,a,o):x(this,t),t.push("</g_vml_:shape>"),this.element_.insertAdjacentHTML("beforeEnd",t.join(""))},Z.fill=function(){this.stroke(!0)},Z.closePath=function(){this.currentPath_.push({type:"close"})},Z.save=function(){var e={};h(this,e),this.aStack_.push(e),this.mStack_.push(this.m_),this.m_=l(s(),this.m_)},Z.restore=function(){this.aStack_.length&&(h(this.aStack_.pop(),this),this.m_=this.mStack_.pop())},Z.translate=function(e,t){var i=[[1,0,0],[0,1,0],[e,t,1]];X(this,l(i,this.m_),!1)},Z.rotate=function(e){var t=F(e),i=E(e),n=[[t,i,0],[-i,t,0],[0,0,1]];X(this,l(n,this.m_),!1)},Z.scale=function(e,t){var i=[[e,0,0],[0,t,0],[0,0,1]];X(this,l(i,this.m_),!0)},Z.transform=function(e,t,i,n,a,o){var r=[[e,t,0],[i,n,0],[a,o,1]];X(this,l(r,this.m_),!0)},Z.setTransform=function(e,t,i,n,a,o){var r=[[e,t,0],[i,n,0],[a,o,1]];X(this,r,!0)},Z.drawText_=function(e,t,n,a,o){var r=this.m_,s=1e3,l=0,h=s,m={x:0,y:0},V=[],U=y(u(this.font),this.element_),d=g(U),p=this.element_.currentStyle,c=this.textAlign.toLowerCase();switch(c){case"left":case"center":case"right":break;case"end":c="ltr"==p.direction?"right":"left";break;case"start":c="rtl"==p.direction?"right":"left";break;default:c="left"}switch(this.textBaseline){case"hanging":case"top":m.y=U.size/1.75;break;case"middle":break;default:case null:case"alphabetic":case"ideographic":case"bottom":m.y=-U.size/2.25}switch(c){case"right":l=s,h=.05;break;case"center":l=h=s/2}var b=L(this,t+m.x,n+m.y);V.push('<g_vml_:line from="',-l,' 0" to="',h,' 0.05" ',' coordsize="100 100" coordorigin="0 0"',' filled="',!o,'" stroked="',!!o,'" style="position:absolute;width:1px;height:1px;">'),o?x(this,V):_(this,V,{x:-l,y:0},{x:h,y:U.size});var f=r[0][0].toFixed(3)+","+r[1][0].toFixed(3)+","+r[0][1].toFixed(3)+","+r[1][1].toFixed(3)+",0,0",k=S(b.x/A)+","+S(b.y/A);V.push('<g_vml_:skew on="t" matrix="',f,'" ',' offset="',k,'" origin="',l,' 0" />','<g_vml_:path textpathok="true" />','<g_vml_:textpath on="true" string="',i(e),'" style="v-text-align:',c,";font:",i(d),'" /></g_vml_:line>'),this.element_.insertAdjacentHTML("beforeEnd",V.join(""))},Z.fillText=function(e,t,i,n){this.drawText_(e,t,i,n,!1)},Z.strokeText=function(e,t,i,n){this.drawText_(e,t,i,n,!0)},Z.measureText=function(e){if(!this.textMeasureEl_){var t='<span style="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;"></span>';this.element_.insertAdjacentHTML("beforeEnd",t),this.textMeasureEl_=this.element_.lastChild}var i=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";try{this.textMeasureEl_.style.font=this.font}catch(n){}return this.textMeasureEl_.appendChild(i.createTextNode(e)),{width:this.textMeasureEl_.offsetWidth}},Z.clip=function(){},Z.arcTo=function(){},Z.createPattern=function(e,t){return new w(e,t)},v.prototype.addColorStop=function(e,t){t=c(t),this.colors_.push({offset:e,color:t.color,alpha:t.alpha})};var q=J.prototype=new Error;q.INDEX_SIZE_ERR=1,q.DOMSTRING_SIZE_ERR=2,q.HIERARCHY_REQUEST_ERR=3,q.WRONG_DOCUMENT_ERR=4,q.INVALID_CHARACTER_ERR=5,q.NO_DATA_ALLOWED_ERR=6,q.NO_MODIFICATION_ALLOWED_ERR=7,q.NOT_FOUND_ERR=8,q.NOT_SUPPORTED_ERR=9,q.INUSE_ATTRIBUTE_ERR=10,q.INVALID_STATE_ERR=11,q.SYNTAX_ERR=12,q.INVALID_MODIFICATION_ERR=13,q.NAMESPACE_ERR=14,q.INVALID_ACCESS_ERR=15,q.VALIDATION_ERR=16,q.TYPE_MISMATCH_ERR=17,G_vmlCanvasManager=P,CanvasRenderingContext2D=f,CanvasGradient=v,CanvasPattern=w,DOMException=J}(),G_vmlCanvasManager}),i("zrender/mixin/Eventful",["require"],function(){var e=function(){this._handlers={}};return e.prototype.one=function(e,t,i){var n=this._handlers;return t&&e?(n[e]||(n[e]=[]),n[e].push({h:t,one:!0,ctx:i||this}),this):this},e.prototype.bind=function(e,t,i){var n=this._handlers;return t&&e?(n[e]||(n[e]=[]),n[e].push({h:t,one:!1,ctx:i||this}),this):this},e.prototype.unbind=function(e,t){var i=this._handlers;if(!e)return this._handlers={},this;if(t){if(i[e]){for(var n=[],a=0,o=i[e].length;o>a;a++)i[e][a].h!=t&&n.push(i[e][a]);i[e]=n}i[e]&&0===i[e].length&&delete i[e]}else delete i[e];return this},e.prototype.dispatch=function(e){if(this._handlers[e]){var t=arguments,i=t.length;i>3&&(t=Array.prototype.slice.call(t,1));for(var n=this._handlers[e],a=n.length,o=0;a>o;){switch(i){case 1:n[o].h.call(n[o].ctx);break;case 2:n[o].h.call(n[o].ctx,t[1]);break;case 3:n[o].h.call(n[o].ctx,t[1],t[2]);break;default:n[o].h.apply(n[o].ctx,t)}n[o].one?(n.splice(o,1),a--):o++}}return this},e.prototype.dispatchWithContext=function(e){if(this._handlers[e]){var t=arguments,i=t.length;i>4&&(t=Array.prototype.slice.call(t,1,t.length-1));for(var n=t[t.length-1],a=this._handlers[e],o=a.length,r=0;o>r;){switch(i){case 1:a[r].h.call(n);break;case 2:a[r].h.call(n,t[1]);break;case 3:a[r].h.call(n,t[1],t[2]);break;default:a[r].h.apply(n,t)}a[r].one?(a.splice(r,1),o--):r++}}return this},e}),i("zrender/tool/log",["require","../config"],function(e){var t=e("../config");return function(){if(0!==t.debugMode)if(1==t.debugMode)for(var e in arguments)throw new Error(arguments[e]);else if(t.debugMode>1)for(var e in arguments)console.log(arguments[e])}}),i("zrender/tool/guid",[],function(){var e=2311;return function(){return"zrender__"+e++}}),i("zrender/Handler",["require","./config","./tool/env","./tool/event","./tool/util","./tool/vector","./tool/matrix","./mixin/Eventful"],function(e){"use strict";function t(e,t){return function(i,n){return e.call(t,i,n)}}function i(e,t){return function(i,n,a){return e.call(t,i,n,a)}}function n(e){for(var i=d.length;i--;){var n=d[i];e["_"+n+"Handler"]=t(c[n],e)}}function a(e,t,i){if(this._draggingTarget&&this._draggingTarget.id==e.id||e.isSilent())return!1;var n=this._event;if(e.isCover(t,i)){e.hoverable&&this.storage.addHover(e);for(var a=e.parent;a;){if(a.clipShape&&!a.clipShape.isCover(this._mouseX,this._mouseY))return!1;a=a.parent}return this._lastHover!=e&&(this._processOutShape(n),this._processDragLeave(n),this._lastHover=e,this._processDragEnter(n)),this._processOverShape(n),this._processDragOver(n),this._hasfound=1,!0}return!1}var o=e("./config"),r=e("./tool/env"),s=e("./tool/event"),l=e("./tool/util"),h=e("./tool/vector"),m=e("./tool/matrix"),V=o.EVENT,U=e("./mixin/Eventful"),d=["resize","click","dblclick","mousewheel","mousemove","mouseout","mouseup","mousedown","touchstart","touchend","touchmove"],p=function(e){if(window.G_vmlCanvasManager)return!0;e=e||window.event;var t=e.toElement||e.relatedTarget||e.srcElement||e.target;return t&&t.className.match(o.elementClassName)},c={resize:function(e){e=e||window.event,this._lastHover=null,this._isMouseDown=0,this.dispatch(V.RESIZE,e)},click:function(e,t){if(p(e)||t){e=this._zrenderEventFixed(e);var i=this._lastHover;(i&&i.clickable||!i)&&this._clickThreshold<5&&this._dispatchAgency(i,V.CLICK,e),this._mousemoveHandler(e)}},dblclick:function(e,t){if(p(e)||t){e=e||window.event,e=this._zrenderEventFixed(e);var i=this._lastHover;(i&&i.clickable||!i)&&this._clickThreshold<5&&this._dispatchAgency(i,V.DBLCLICK,e),this._mousemoveHandler(e)}},mousewheel:function(e,t){if(p(e)||t){e=this._zrenderEventFixed(e);var i=e.wheelDelta||-e.detail,n=i>0?1.1:1/1.1,a=!1,o=this._mouseX,r=this._mouseY;this.painter.eachBuildinLayer(function(t){var i=t.position;if(t.zoomable){t.__zoom=t.__zoom||1;var l=t.__zoom;l*=n,l=Math.max(Math.min(t.maxZoom,l),t.minZoom),n=l/t.__zoom,t.__zoom=l,i[0]-=(o-i[0])*(n-1),i[1]-=(r-i[1])*(n-1),t.scale[0]*=n,t.scale[1]*=n,t.dirty=!0,a=!0,s.stop(e)}}),a&&this.painter.refresh(),this._dispatchAgency(this._lastHover,V.MOUSEWHEEL,e),this._mousemoveHandler(e)}},mousemove:function(e,t){if((p(e)||t)&&!this.painter.isLoading()){e=this._zrenderEventFixed(e),this._lastX=this._mouseX,this._lastY=this._mouseY,this._mouseX=s.getX(e),this._mouseY=s.getY(e);var i=this._mouseX-this._lastX,n=this._mouseY-this._lastY;this._processDragStart(e),this._hasfound=0,this._event=e,this._iterateAndFindHover(),this._hasfound||((!this._draggingTarget||this._lastHover&&this._lastHover!=this._draggingTarget)&&(this._processOutShape(e),
+this._processDragLeave(e)),this._lastHover=null,this.storage.delHover(),this.painter.clearHover());var a="default";if(this._draggingTarget)this.storage.drift(this._draggingTarget.id,i,n),this._draggingTarget.modSelf(),this.storage.addHover(this._draggingTarget),this._clickThreshold++;else if(this._isMouseDown){var o=!1;this.painter.eachBuildinLayer(function(e){e.panable&&(a="move",e.position[0]+=i,e.position[1]+=n,o=!0,e.dirty=!0)}),o&&this.painter.refresh()}this._draggingTarget||this._hasfound&&this._lastHover.draggable?a="move":this._hasfound&&this._lastHover.clickable&&(a="pointer"),this.root.style.cursor=a,this._dispatchAgency(this._lastHover,V.MOUSEMOVE,e),(this._draggingTarget||this._hasfound||this.storage.hasHoverShape())&&this.painter.refreshHover()}},mouseout:function(e,t){if(p(e)||t){e=this._zrenderEventFixed(e);var i=e.toElement||e.relatedTarget;if(i!=this.root)for(;i&&9!=i.nodeType;){if(i==this.root)return void this._mousemoveHandler(e);i=i.parentNode}e.zrenderX=this._lastX,e.zrenderY=this._lastY,this.root.style.cursor="default",this._isMouseDown=0,this._processOutShape(e),this._processDrop(e),this._processDragEnd(e),this.painter.isLoading()||this.painter.refreshHover(),this.dispatch(V.GLOBALOUT,e)}},mousedown:function(e,t){if(p(e)||t){if(this._clickThreshold=0,2==this._lastDownButton)return this._lastDownButton=e.button,void(this._mouseDownTarget=null);this._lastMouseDownMoment=new Date,e=this._zrenderEventFixed(e),this._isMouseDown=1,this._mouseDownTarget=this._lastHover,this._dispatchAgency(this._lastHover,V.MOUSEDOWN,e),this._lastDownButton=e.button}},mouseup:function(e,t){(p(e)||t)&&(e=this._zrenderEventFixed(e),this.root.style.cursor="default",this._isMouseDown=0,this._mouseDownTarget=null,this._dispatchAgency(this._lastHover,V.MOUSEUP,e),this._processDrop(e),this._processDragEnd(e))},touchstart:function(e,t){(p(e)||t)&&(e=this._zrenderEventFixed(e,!0),this._lastTouchMoment=new Date,this._mobileFindFixed(e),this._mousedownHandler(e))},touchmove:function(e,t){(p(e)||t)&&(e=this._zrenderEventFixed(e,!0),this._mousemoveHandler(e),this._isDragging&&s.stop(e))},touchend:function(e,t){if(p(e)||t){e=this._zrenderEventFixed(e,!0),this._mouseupHandler(e);var i=new Date;i-this._lastTouchMoment<V.touchClickDelay&&(this._mobileFindFixed(e),this._clickHandler(e),i-this._lastClickMoment<V.touchClickDelay/2&&(this._dblclickHandler(e),this._lastHover&&this._lastHover.clickable&&s.stop(e)),this._lastClickMoment=i),this.painter.clearHover()}}},u=function(e,t,o){U.call(this),this.root=e,this.storage=t,this.painter=o,this._lastX=this._lastY=this._mouseX=this._mouseY=0,this._findHover=i(a,this),this._domHover=o.getDomHover(),n(this),window.addEventListener?(window.addEventListener("resize",this._resizeHandler),r.os.tablet||r.os.phone?(e.addEventListener("touchstart",this._touchstartHandler),e.addEventListener("touchmove",this._touchmoveHandler),e.addEventListener("touchend",this._touchendHandler)):(e.addEventListener("click",this._clickHandler),e.addEventListener("dblclick",this._dblclickHandler),e.addEventListener("mousewheel",this._mousewheelHandler),e.addEventListener("mousemove",this._mousemoveHandler),e.addEventListener("mousedown",this._mousedownHandler),e.addEventListener("mouseup",this._mouseupHandler)),e.addEventListener("DOMMouseScroll",this._mousewheelHandler),e.addEventListener("mouseout",this._mouseoutHandler)):(window.attachEvent("onresize",this._resizeHandler),e.attachEvent("onclick",this._clickHandler),e.ondblclick=this._dblclickHandler,e.attachEvent("onmousewheel",this._mousewheelHandler),e.attachEvent("onmousemove",this._mousemoveHandler),e.attachEvent("onmouseout",this._mouseoutHandler),e.attachEvent("onmousedown",this._mousedownHandler),e.attachEvent("onmouseup",this._mouseupHandler))};u.prototype.on=function(e,t,i){return this.bind(e,t,i),this},u.prototype.un=function(e,t){return this.unbind(e,t),this},u.prototype.trigger=function(e,t){switch(e){case V.RESIZE:case V.CLICK:case V.DBLCLICK:case V.MOUSEWHEEL:case V.MOUSEMOVE:case V.MOUSEDOWN:case V.MOUSEUP:case V.MOUSEOUT:this["_"+e+"Handler"](t,!0)}},u.prototype.dispose=function(){var e=this.root;window.removeEventListener?(window.removeEventListener("resize",this._resizeHandler),r.os.tablet||r.os.phone?(e.removeEventListener("touchstart",this._touchstartHandler),e.removeEventListener("touchmove",this._touchmoveHandler),e.removeEventListener("touchend",this._touchendHandler)):(e.removeEventListener("click",this._clickHandler),e.removeEventListener("dblclick",this._dblclickHandler),e.removeEventListener("mousewheel",this._mousewheelHandler),e.removeEventListener("mousemove",this._mousemoveHandler),e.removeEventListener("mousedown",this._mousedownHandler),e.removeEventListener("mouseup",this._mouseupHandler)),e.removeEventListener("DOMMouseScroll",this._mousewheelHandler),e.removeEventListener("mouseout",this._mouseoutHandler)):(window.detachEvent("onresize",this._resizeHandler),e.detachEvent("onclick",this._clickHandler),e.detachEvent("dblclick",this._dblclickHandler),e.detachEvent("onmousewheel",this._mousewheelHandler),e.detachEvent("onmousemove",this._mousemoveHandler),e.detachEvent("onmouseout",this._mouseoutHandler),e.detachEvent("onmousedown",this._mousedownHandler),e.detachEvent("onmouseup",this._mouseupHandler)),this.root=this._domHover=this.storage=this.painter=null,this.un()},u.prototype._processDragStart=function(e){var t=this._lastHover;if(this._isMouseDown&&t&&t.draggable&&!this._draggingTarget&&this._mouseDownTarget==t){if(t.dragEnableTime&&new Date-this._lastMouseDownMoment<t.dragEnableTime)return;var i=t;this._draggingTarget=i,this._isDragging=1,i.invisible=!0,this.storage.mod(i.id),this._dispatchAgency(i,V.DRAGSTART,e),this.painter.refresh()}},u.prototype._processDragEnter=function(e){this._draggingTarget&&this._dispatchAgency(this._lastHover,V.DRAGENTER,e,this._draggingTarget)},u.prototype._processDragOver=function(e){this._draggingTarget&&this._dispatchAgency(this._lastHover,V.DRAGOVER,e,this._draggingTarget)},u.prototype._processDragLeave=function(e){this._draggingTarget&&this._dispatchAgency(this._lastHover,V.DRAGLEAVE,e,this._draggingTarget)},u.prototype._processDrop=function(e){this._draggingTarget&&(this._draggingTarget.invisible=!1,this.storage.mod(this._draggingTarget.id),this.painter.refresh(),this._dispatchAgency(this._lastHover,V.DROP,e,this._draggingTarget))},u.prototype._processDragEnd=function(e){this._draggingTarget&&(this._dispatchAgency(this._draggingTarget,V.DRAGEND,e),this._lastHover=null),this._isDragging=0,this._draggingTarget=null},u.prototype._processOverShape=function(e){this._dispatchAgency(this._lastHover,V.MOUSEOVER,e)},u.prototype._processOutShape=function(e){this._dispatchAgency(this._lastHover,V.MOUSEOUT,e)},u.prototype._dispatchAgency=function(e,t,i,n){var a="on"+t,o={type:t,event:i,target:e,cancelBubble:!1},r=e;for(n&&(o.dragged=n);r&&(r[a]&&(o.cancelBubble=r[a](o)),r.dispatch(t,o),r=r.parent,!o.cancelBubble););if(e)o.cancelBubble||this.dispatch(t,o);else if(!n){var s={type:t,event:i};this.dispatch(t,s),this.painter.eachOtherLayer(function(e){"function"==typeof e[a]&&e[a](s),e.dispatch&&e.dispatch(t,s)})}},u.prototype._iterateAndFindHover=function(){var e=m.create();return function(){for(var t,i,n=this.storage.getShapeList(),a=[0,0],o=n.length-1;o>=0;o--){var r=n[o];if(t!==r.zlevel&&(i=this.painter.getLayer(r.zlevel,i),a[0]=this._mouseX,a[1]=this._mouseY,i.needTransform&&(m.invert(e,i.transform),h.applyTransform(a,a,e))),this._findHover(r,a[0],a[1]))break}}}();var y=[{x:10},{x:-20},{x:10,y:10},{y:-20}];return u.prototype._mobileFindFixed=function(e){this._lastHover=null,this._mouseX=e.zrenderX,this._mouseY=e.zrenderY,this._event=e,this._iterateAndFindHover();for(var t=0;!this._lastHover&&t<y.length;t++){var i=y[t];i.x&&(this._mouseX+=i.x),i.y&&(this._mouseY+=i.y),this._iterateAndFindHover()}this._lastHover&&(e.zrenderX=this._mouseX,e.zrenderY=this._mouseY)},u.prototype._zrenderEventFixed=function(e,t){if(e.zrenderFixed)return e;if(t){var i="touchend"!=e.type?e.targetTouches[0]:e.changedTouches[0];if(i){var n=this.painter._domRoot.getBoundingClientRect();e.zrenderX=i.clientX-n.left,e.zrenderY=i.clientY-n.top}}else{e=e||window.event;var a=e.toElement||e.relatedTarget||e.srcElement||e.target;a&&a!=this._domHover&&(e.zrenderX=("undefined"!=typeof e.offsetX?e.offsetX:e.layerX)+a.offsetLeft,e.zrenderY=("undefined"!=typeof e.offsetY?e.offsetY:e.layerY)+a.offsetTop)}return e.zrenderFixed=1,e},l.merge(u.prototype,U.prototype,!0),u}),i("zrender/Painter",["require","./config","./tool/util","./tool/log","./loadingEffect/Base","./Layer","./shape/Image"],function(e){"use strict";function t(){return!1}function i(){}function n(e){return e?e.isBuildin?!0:"function"!=typeof e.resize||"function"!=typeof e.refresh?!1:!0:!1}var a=e("./config"),o=e("./tool/util"),r=e("./tool/log"),s=e("./loadingEffect/Base"),l=e("./Layer"),h=function(e,i){this.root=e,e.style["-webkit-tap-highlight-color"]="transparent",e.style["-webkit-user-select"]="none",e.style["user-select"]="none",e.style["-webkit-touch-callout"]="none",this.storage=i,e.innerHTML="",this._width=this._getWidth(),this._height=this._getHeight();var n=document.createElement("div");this._domRoot=n,n.style.position="relative",n.style.overflow="hidden",n.style.width=this._width+"px",n.style.height=this._height+"px",e.appendChild(n),this._layers={},this._zlevelList=[],this._layerConfig={},this._loadingEffect=new s({}),this.shapeToImage=this._createShapeToImageProcessor(),this._bgDom=document.createElement("div"),this._bgDom.style.cssText=["position:absolute;left:0px;top:0px;width:",this._width,"px;height:",this._height+"px;","-webkit-user-select:none;user-select;none;","-webkit-touch-callout:none;"].join(""),this._bgDom.setAttribute("data-zr-dom-id","bg"),this._bgDom.className=a.elementClassName,n.appendChild(this._bgDom),this._bgDom.onselectstart=t;var o=new l("_zrender_hover_",this);this._layers.hover=o,n.appendChild(o.dom),o.initContext(),o.dom.onselectstart=t,o.dom.style["-webkit-user-select"]="none",o.dom.style["user-select"]="none",o.dom.style["-webkit-touch-callout"]="none",this.refreshNextFrame=null};return h.prototype.render=function(e){return this.isLoading()&&this.hideLoading(),this.refresh(e,!0),this},h.prototype.refresh=function(e,t){var i=this.storage.getShapeList(!0);this._paintList(i,t);for(var n=0;n<this._zlevelList.length;n++){var a=this._zlevelList[n],o=this._layers[a];!o.isBuildin&&o.refresh&&o.refresh()}return"function"==typeof e&&e(),this},h.prototype._preProcessLayer=function(e){e.unusedCount++,e.updateTransform()},h.prototype._postProcessLayer=function(e){e.dirty=!1,1==e.unusedCount&&e.clear()},h.prototype._paintList=function(e,t){"undefined"==typeof t&&(t=!1),this._updateLayerStatus(e);var i,n,o;this.eachBuildinLayer(this._preProcessLayer);for(var s=0,l=e.length;l>s;s++){var h=e[s];if(n!==h.zlevel&&(i&&(i.needTransform&&o.restore(),o.flush&&o.flush()),n=h.zlevel,i=this.getLayer(n),i.isBuildin||r("ZLevel "+n+" has been used by unkown layer "+i.id),o=i.ctx,i.unusedCount=0,(i.dirty||t)&&i.clear(),i.needTransform&&(o.save(),i.setTransform(o))),(i.dirty||t)&&!h.invisible&&(!h.onbrush||h.onbrush&&!h.onbrush(o,!1)))if(a.catchBrushException)try{h.brush(o,!1,this.refreshNextFrame)}catch(m){r(m,"brush error of "+h.type,h)}else h.brush(o,!1,this.refreshNextFrame);h.__dirty=!1}i&&(i.needTransform&&o.restore(),o.flush&&o.flush()),this.eachBuildinLayer(this._postProcessLayer)},h.prototype.getLayer=function(e){var t=this._layers[e];return t||(t=new l(e,this),t.isBuildin=!0,this._layerConfig[e]&&o.merge(t,this._layerConfig[e],!0),t.updateTransform(),this.insertLayer(e,t),t.initContext()),t},h.prototype.insertLayer=function(e,t){if(this._layers[e])return void r("ZLevel "+e+" has been used already");if(!n(t))return void r("Layer of zlevel "+e+" is not valid");var i=this._zlevelList.length,a=null,o=-1;if(i>0&&e>this._zlevelList[0]){for(o=0;i-1>o&&!(this._zlevelList[o]<e&&this._zlevelList[o+1]>e);o++);a=this._layers[this._zlevelList[o]]}this._zlevelList.splice(o+1,0,e);var s=a?a.dom:this._bgDom;s.nextSibling?s.parentNode.insertBefore(t.dom,s.nextSibling):s.parentNode.appendChild(t.dom),this._layers[e]=t},h.prototype.eachLayer=function(e,t){for(var i=0;i<this._zlevelList.length;i++){var n=this._zlevelList[i];e.call(t,this._layers[n],n)}},h.prototype.eachBuildinLayer=function(e,t){for(var i=0;i<this._zlevelList.length;i++){var n=this._zlevelList[i],a=this._layers[n];a.isBuildin&&e.call(t,a,n)}},h.prototype.eachOtherLayer=function(e,t){for(var i=0;i<this._zlevelList.length;i++){var n=this._zlevelList[i],a=this._layers[n];a.isBuildin||e.call(t,a,n)}},h.prototype.getLayers=function(){return this._layers},h.prototype._updateLayerStatus=function(e){var t=this._layers,i={};this.eachBuildinLayer(function(e,t){i[t]=e.elCount,e.elCount=0});for(var n=0,a=e.length;a>n;n++){var o=e[n],r=o.zlevel,s=t[r];if(s){if(s.elCount++,s.dirty)continue;s.dirty=o.__dirty}}this.eachBuildinLayer(function(e,t){i[t]!==e.elCount&&(e.dirty=!0)})},h.prototype.refreshShapes=function(e,t){for(var i=0,n=e.length;n>i;i++){var a=e[i];a.modSelf()}return this.refresh(t),this},h.prototype.setLoadingEffect=function(e){return this._loadingEffect=e,this},h.prototype.clear=function(){return this.eachBuildinLayer(this._clearLayer),this},h.prototype._clearLayer=function(e){e.clear()},h.prototype.modLayer=function(e,t){if(t){this._layerConfig[e]?o.merge(this._layerConfig[e],t,!0):this._layerConfig[e]=t;var i=this._layers[e];i&&o.merge(i,this._layerConfig[e],!0)}},h.prototype.delLayer=function(e){var t=this._layers[e];t&&(this.modLayer(e,{position:t.position,rotation:t.rotation,scale:t.scale}),t.dom.parentNode.removeChild(t.dom),delete this._layers[e],this._zlevelList.splice(o.indexOf(this._zlevelList,e),1))},h.prototype.refreshHover=function(){this.clearHover();for(var e=this.storage.getHoverShapes(!0),t=0,i=e.length;i>t;t++)this._brushHover(e[t]);var n=this._layers.hover.ctx;return n.flush&&n.flush(),this.storage.delHover(),this},h.prototype.clearHover=function(){var e=this._layers.hover;return e&&e.clear(),this},h.prototype.showLoading=function(e){return this._loadingEffect&&this._loadingEffect.stop(),e&&this.setLoadingEffect(e),this._loadingEffect.start(this),this.loading=!0,this},h.prototype.hideLoading=function(){return this._loadingEffect.stop(),this.clearHover(),this.loading=!1,this},h.prototype.isLoading=function(){return this.loading},h.prototype.resize=function(){var e=this._domRoot;e.style.display="none";var t=this._getWidth(),i=this._getHeight();if(e.style.display="",this._width!=t||i!=this._height){this._width=t,this._height=i,e.style.width=t+"px",e.style.height=i+"px";for(var n in this._layers)this._layers[n].resize(t,i);this.refresh(null,!0)}return this},h.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},h.prototype.dispose=function(){this.isLoading()&&this.hideLoading(),this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},h.prototype.getDomHover=function(){return this._layers.hover.dom},h.prototype.toDataURL=function(e,t,i){if(window.G_vmlCanvasManager)return null;var n=new l("image",this);this._bgDom.appendChild(n.dom),n.initContext();var o=n.ctx;n.clearColor=t||"#fff",n.clear();var s=this;this.storage.iterShape(function(e){if(!e.invisible&&(!e.onbrush||e.onbrush&&!e.onbrush(o,!1)))if(a.catchBrushException)try{e.brush(o,!1,s.refreshNextFrame)}catch(t){r(t,"brush error of "+e.type,e)}else e.brush(o,!1,s.refreshNextFrame)},{normal:"up",update:!0});var h=n.dom.toDataURL(e,i);return o=null,this._bgDom.removeChild(n.dom),h},h.prototype.getWidth=function(){return this._width},h.prototype.getHeight=function(){return this._height},h.prototype._getWidth=function(){var e=this.root,t=e.currentStyle||document.defaultView.getComputedStyle(e);return((e.clientWidth||parseInt(t.width,10))-parseInt(t.paddingLeft,10)-parseInt(t.paddingRight,10)).toFixed(0)-0},h.prototype._getHeight=function(){var e=this.root,t=e.currentStyle||document.defaultView.getComputedStyle(e);return((e.clientHeight||parseInt(t.height,10))-parseInt(t.paddingTop,10)-parseInt(t.paddingBottom,10)).toFixed(0)-0},h.prototype._brushHover=function(e){var t=this._layers.hover.ctx;if(!e.onbrush||e.onbrush&&!e.onbrush(t,!0)){var i=this.getLayer(e.zlevel);if(i.needTransform&&(t.save(),i.setTransform(t)),a.catchBrushException)try{e.brush(t,!0,this.refreshNextFrame)}catch(n){r(n,"hoverBrush error of "+e.type,e)}else e.brush(t,!0,this.refreshNextFrame);i.needTransform&&t.restore()}},h.prototype._shapeToImage=function(t,i,n,a,o){var r=document.createElement("canvas"),s=r.getContext("2d");r.style.width=n+"px",r.style.height=a+"px",r.setAttribute("width",n*o),r.setAttribute("height",a*o),s.clearRect(0,0,n*o,a*o);var l={position:i.position,rotation:i.rotation,scale:i.scale};i.position=[0,0,0],i.rotation=0,i.scale=[1,1],i&&i.brush(s,!1);var h=e("./shape/Image"),m=new h({id:t,style:{x:0,y:0,image:r}});return null!=l.position&&(m.position=i.position=l.position),null!=l.rotation&&(m.rotation=i.rotation=l.rotation),null!=l.scale&&(m.scale=i.scale=l.scale),m},h.prototype._createShapeToImageProcessor=function(){if(window.G_vmlCanvasManager)return i;var e=this;return function(t,i,n,o){return e._shapeToImage(t,i,n,o,a.devicePixelRatio)}},h}),i("zrender/Storage",["require","./tool/util","./Group"],function(e){"use strict";function t(e,t){return e.zlevel==t.zlevel?e.z==t.z?e.__renderidx-t.__renderidx:e.z-t.z:e.zlevel-t.zlevel}var i=e("./tool/util"),n=e("./Group"),a={hover:!1,normal:"down",update:!1},o=function(){this._elements={},this._hoverElements=[],this._roots=[],this._shapeList=[],this._shapeListOffset=0};return o.prototype.iterShape=function(e,t){if(t||(t=a),t.hover)for(var i=0,n=this._hoverElements.length;n>i;i++){var o=this._hoverElements[i];if(o.updateTransform(),e(o))return this}switch(t.update&&this.updateShapeList(),t.normal){case"down":for(var n=this._shapeList.length;n--;)if(e(this._shapeList[n]))return this;break;default:for(var i=0,n=this._shapeList.length;n>i;i++)if(e(this._shapeList[i]))return this}return this},o.prototype.getHoverShapes=function(e){for(var i=[],n=0,a=this._hoverElements.length;a>n;n++){i.push(this._hoverElements[n]);var o=this._hoverElements[n].hoverConnect;if(o){var r;o=o instanceof Array?o:[o];for(var s=0,l=o.length;l>s;s++)r=o[s].id?o[s]:this.get(o[s]),r&&i.push(r)}}if(i.sort(t),e)for(var n=0,a=i.length;a>n;n++)i[n].updateTransform();return i},o.prototype.getShapeList=function(e){return e&&this.updateShapeList(),this._shapeList},o.prototype.updateShapeList=function(){this._shapeListOffset=0;for(var e=0,i=this._roots.length;i>e;e++){var n=this._roots[e];this._updateAndAddShape(n)}this._shapeList.length=this._shapeListOffset;for(var e=0,i=this._shapeList.length;i>e;e++)this._shapeList[e].__renderidx=e;this._shapeList.sort(t)},o.prototype._updateAndAddShape=function(e,t){if(!e.ignore)if(e.updateTransform(),e.clipShape&&(e.clipShape.parent=e,e.clipShape.updateTransform(),t?(t=t.slice(),t.push(e.clipShape)):t=[e.clipShape]),"group"==e.type){for(var i=0;i<e._children.length;i++){var n=e._children[i];n.__dirty=e.__dirty||n.__dirty,this._updateAndAddShape(n,t)}e.__dirty=!1}else e.__clipShapes=t,this._shapeList[this._shapeListOffset++]=e},o.prototype.mod=function(e,t){if("string"==typeof e&&(e=this._elements[e]),e&&(e.modSelf(),t))if(t.parent||t._storage||t.__clipShapes){var n={};for(var a in t)"parent"!==a&&"_storage"!==a&&"__clipShapes"!==a&&t.hasOwnProperty(a)&&(n[a]=t[a]);i.merge(e,n,!0)}else i.merge(e,t,!0);return this},o.prototype.drift=function(e,t,i){var n=this._elements[e];return n&&(n.needTransform=!0,"horizontal"===n.draggable?i=0:"vertical"===n.draggable&&(t=0),(!n.ondrift||n.ondrift&&!n.ondrift(t,i))&&n.drift(t,i)),this},o.prototype.addHover=function(e){return e.updateNeedTransform(),this._hoverElements.push(e),this},o.prototype.delHover=function(){return this._hoverElements=[],this},o.prototype.hasHoverShape=function(){return this._hoverElements.length>0},o.prototype.addRoot=function(e){this._elements[e.id]||(e instanceof n&&e.addChildrenToStorage(this),this.addToMap(e),this._roots.push(e))},o.prototype.delRoot=function(e){if("undefined"==typeof e){for(var t=0;t<this._roots.length;t++){var a=this._roots[t];a instanceof n&&a.delChildrenFromStorage(this)}return this._elements={},this._hoverElements=[],this._roots=[],this._shapeList=[],void(this._shapeListOffset=0)}if(e instanceof Array)for(var t=0,o=e.length;o>t;t++)this.delRoot(e[t]);else{var r;r="string"==typeof e?this._elements[e]:e;var s=i.indexOf(this._roots,r);s>=0&&(this.delFromMap(r.id),this._roots.splice(s,1),r instanceof n&&r.delChildrenFromStorage(this))}},o.prototype.addToMap=function(e){return e instanceof n&&(e._storage=this),e.modSelf(),this._elements[e.id]=e,this},o.prototype.get=function(e){return this._elements[e]},o.prototype.delFromMap=function(e){var t=this._elements[e];return t&&(delete this._elements[e],t instanceof n&&(t._storage=null)),this},o.prototype.dispose=function(){this._elements=this._renderList=this._roots=this._hoverElements=null},o}),i("zrender/animation/Animation",["require","./Clip","../tool/color","../tool/util","../tool/event"],function(e){"use strict";function t(e,t){return e[t]}function i(e,t,i){e[t]=i}function n(e,t,i){return(t-e)*i+e}function a(e,t,i,a,o){var r=e.length;if(1==o)for(var s=0;r>s;s++)a[s]=n(e[s],t[s],i);else for(var l=e[0].length,s=0;r>s;s++)for(var h=0;l>h;h++)a[s][h]=n(e[s][h],t[s][h],i)}function o(e){switch(typeof e){case"undefined":case"string":return!1}return"undefined"!=typeof e.length}function r(e,t,i,n,a,o,r,l,h){var m=e.length;if(1==h)for(var V=0;m>V;V++)l[V]=s(e[V],t[V],i[V],n[V],a,o,r);else for(var U=e[0].length,V=0;m>V;V++)for(var d=0;U>d;d++)l[V][d]=s(e[V][d],t[V][d],i[V][d],n[V][d],a,o,r)}function s(e,t,i,n,a,o,r){var s=.5*(i-e),l=.5*(n-t);return(2*(t-i)+s+l)*r+(-3*(t-i)-2*s-l)*o+s*a+t}function l(e){if(o(e)){var t=e.length;if(o(e[0])){for(var i=[],n=0;t>n;n++)i.push(c.call(e[n]));return i}return c.call(e)}return e}function h(e){return e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.floor(e[2]),"rgba("+e.join(",")+")"}var m=e("./Clip"),V=e("../tool/color"),U=e("../tool/util"),d=e("../tool/event").Dispatcher,p=window.requestAnimationFrame||window.msRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){setTimeout(e,16)},c=Array.prototype.slice,u=function(e){e=e||{},this.stage=e.stage||{},this.onframe=e.onframe||function(){},this._clips=[],this._running=!1,this._time=0,d.call(this)};u.prototype={add:function(e){this._clips.push(e)},remove:function(e){if(e.__inStep)e.__needsRemove=!0;else{var t=U.indexOf(this._clips,e);t>=0&&this._clips.splice(t,1)}},_update:function(){for(var e=(new Date).getTime(),t=e-this._time,i=this._clips,n=i.length,a=[],o=[],r=0;n>r;r++){var s=i[r];s.__inStep=!0;var l=s.step(e);s.__inStep=!1,l&&(a.push(l),o.push(s))}for(var r=0;n>r;)i[r].__needsRemove?(i[r]=i[n-1],i.pop(),n--):r++;n=a.length;for(var r=0;n>r;r++)o[r].fire(a[r]);this._time=e,this.onframe(t),this.dispatch("frame",t),this.stage.update&&this.stage.update()},start:function(){function e(){t._running&&(p(e),t._update())}var t=this;this._running=!0,this._time=(new Date).getTime(),p(e)},stop:function(){this._running=!1},clear:function(){this._clips=[]},animate:function(e,t){t=t||{};var i=new y(e,t.loop,t.getter,t.setter);return i.animation=this,i},constructor:u},U.merge(u.prototype,d.prototype,!0);var y=function(e,n,a,o){this._tracks={},this._target=e,this._loop=n||!1,this._getter=a||t,this._setter=o||i,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};return y.prototype={when:function(e,t){for(var i in t)this._tracks[i]||(this._tracks[i]=[],0!==e&&this._tracks[i].push({time:0,value:l(this._getter(this._target,i))})),this._tracks[i].push({time:parseInt(e,10),value:t[i]});return this},during:function(e){return this._onframeList.push(e),this},start:function(e){var t=this,i=this._setter,l=this._getter,U="spline"===e,d=function(){if(t._clipCount--,0===t._clipCount){t._tracks={};for(var e=t._doneList.length,i=0;e>i;i++)t._doneList[i].call(t)}},p=function(p,c){var u=p.length;if(u){var y=p[0].value,g=o(y),b=!1,f=g&&o(y[0])?2:1;p.sort(function(e,t){return e.time-t.time});var k;if(u){k=p[u-1].time;for(var x=[],_=[],L=0;u>L;L++){x.push(p[L].time/k);var W=p[L].value;"string"==typeof W&&(W=V.toArray(W),0===W.length&&(W[0]=W[1]=W[2]=0,W[3]=1),b=!0),_.push(W)}var X,L,v,w,K,I,J,C=0,S=0;if(b)var E=[0,0,0,0];var F=function(e,o){if(S>o){for(X=Math.min(C+1,u-1),L=X;L>=0&&!(x[L]<=o);L--);L=Math.min(L,u-2)}else{for(L=C;u>L&&!(x[L]>o);L++);L=Math.min(L-1,u-2)}C=L,S=o;var m=x[L+1]-x[L];if(0!==m){if(v=(o-x[L])/m,U)if(K=_[L],w=_[0===L?L:L-1],I=_[L>u-2?u-1:L+1],J=_[L>u-3?u-1:L+2],g)r(w,K,I,J,v,v*v,v*v*v,l(e,c),f);else{var V;b?(V=r(w,K,I,J,v,v*v,v*v*v,E,1),V=h(E)):V=s(w,K,I,J,v,v*v,v*v*v),i(e,c,V)}else if(g)a(_[L],_[L+1],v,l(e,c),f);else{var V;b?(a(_[L],_[L+1],v,E,1),V=h(E)):V=n(_[L],_[L+1],v),i(e,c,V)}for(L=0;L<t._onframeList.length;L++)t._onframeList[L](e,o)}},T=new m({target:t._target,life:k,loop:t._loop,delay:t._delay,onframe:F,ondestroy:d});e&&"spline"!==e&&(T.easing=e),t._clipList.push(T),t._clipCount++,t.animation.add(T)}}};for(var c in this._tracks)p(this._tracks[c],c);return this},stop:function(){for(var e=0;e<this._clipList.length;e++){var t=this._clipList[e];this.animation.remove(t)}this._clipList=[]},delay:function(e){return this._delay=e,this},done:function(e){return e&&this._doneList.push(e),this}},u}),i("zrender/tool/vector",[],function(){var e="undefined"==typeof Float32Array?Array:Float32Array,t={create:function(t,i){var n=new e(2);return n[0]=t||0,n[1]=i||0,n},copy:function(e,t){return e[0]=t[0],e[1]=t[1],e},clone:function(t){var i=new e(2);return i[0]=t[0],i[1]=t[1],i},set:function(e,t,i){return e[0]=t,e[1]=i,e},add:function(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e},scaleAndAdd:function(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e},sub:function(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e},len:function(e){return Math.sqrt(this.lenSquare(e))},lenSquare:function(e){return e[0]*e[0]+e[1]*e[1]},mul:function(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e},div:function(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e},dot:function(e,t){return e[0]*t[0]+e[1]*t[1]},scale:function(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e},normalize:function(e,i){var n=t.len(i);return 0===n?(e[0]=0,e[1]=0):(e[0]=i[0]/n,e[1]=i[1]/n),e},distance:function(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))},distanceSquare:function(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])},negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e},lerp:function(e,t,i,n){return e[0]=t[0]+n*(i[0]-t[0]),e[1]=t[1]+n*(i[1]-t[1]),e},applyTransform:function(e,t,i){var n=t[0],a=t[1];return e[0]=i[0]*n+i[2]*a+i[4],e[1]=i[1]*n+i[3]*a+i[5],e},min:function(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e},max:function(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e}};return t.length=t.len,t.lengthSquare=t.lenSquare,t.dist=t.distance,t.distSquare=t.distanceSquare,t}),i("zrender/tool/matrix",[],function(){var e="undefined"==typeof Float32Array?Array:Float32Array,t={create:function(){var i=new e(6);return t.identity(i),i},identity:function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e},copy:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e},mul:function(e,t,i){return e[0]=t[0]*i[0]+t[2]*i[1],e[1]=t[1]*i[0]+t[3]*i[1],e[2]=t[0]*i[2]+t[2]*i[3],e[3]=t[1]*i[2]+t[3]*i[3],e[4]=t[0]*i[4]+t[2]*i[5]+t[4],e[5]=t[1]*i[4]+t[3]*i[5]+t[5],e},translate:function(e,t,i){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+i[0],e[5]=t[5]+i[1],e},rotate:function(e,t,i){var n=t[0],a=t[2],o=t[4],r=t[1],s=t[3],l=t[5],h=Math.sin(i),m=Math.cos(i);return e[0]=n*m+r*h,e[1]=-n*h+r*m,e[2]=a*m+s*h,e[3]=-a*h+m*s,e[4]=m*o+h*l,e[5]=m*l-h*o,e},scale:function(e,t,i){var n=i[0],a=i[1];return e[0]=t[0]*n,e[1]=t[1]*a,e[2]=t[2]*n,e[3]=t[3]*a,e[4]=t[4]*n,e[5]=t[5]*a,e},invert:function(e,t){var i=t[0],n=t[2],a=t[4],o=t[1],r=t[3],s=t[5],l=i*r-o*n;return l?(l=1/l,e[0]=r*l,e[1]=-o*l,e[2]=-n*l,e[3]=i*l,e[4]=(n*s-r*a)*l,e[5]=(o*a-i*s)*l,e):null}};return t}),i("zrender/loadingEffect/Base",["require","../tool/util","../shape/Text","../shape/Rectangle"],function(e){function t(e){this.setOptions(e)}var i=e("../tool/util"),n=e("../shape/Text"),a=e("../shape/Rectangle"),o="Loading...",r="normal 16px Arial";return t.prototype.createTextShape=function(e){return new n({highlightStyle:i.merge({x:this.canvasWidth/2,y:this.canvasHeight/2,text:o,textAlign:"center",textBaseline:"middle",textFont:r,color:"#333",brushType:"fill"},e,!0)})},t.prototype.createBackgroundShape=function(e){return new a({highlightStyle:{x:0,y:0,width:this.canvasWidth,height:this.canvasHeight,brushType:"fill",color:e}})},t.prototype.start=function(e){function t(t){e.storage.addHover(t)}function i(){e.refreshHover()}this.canvasWidth=e._width,this.canvasHeight=e._height,this.loadingTimer=this._start(t,i)},t.prototype._start=function(){return setInterval(function(){},1e4)},t.prototype.stop=function(){clearInterval(this.loadingTimer)},t.prototype.setOptions=function(e){this.options=e||{}},t.prototype.adjust=function(e,t){return e<=t[0]?e=t[0]:e>=t[1]&&(e=t[1]),e},t.prototype.getLocation=function(e,t,i){var n=null!=e.x?e.x:"center";switch(n){case"center":n=Math.floor((this.canvasWidth-t)/2);break;case"left":n=0;break;case"right":n=this.canvasWidth-t}var a=null!=e.y?e.y:"center";switch(a){case"center":a=Math.floor((this.canvasHeight-i)/2);break;case"top":a=0;break;case"bottom":a=this.canvasHeight-i}return{x:n,y:a,width:t,height:i}},t}),i("zrender/Layer",["require","./mixin/Transformable","./tool/util","./config"],function(e){function t(){return!1}function i(e,t,i){var n=document.createElement(t),a=i.getWidth(),o=i.getHeight();return n.style.position="absolute",n.style.left=0,n.style.top=0,n.style.width=a+"px",n.style.height=o+"px",n.width=a*r.devicePixelRatio,n.height=o*r.devicePixelRatio,n.setAttribute("data-zr-dom-id",e),n}var n=e("./mixin/Transformable"),a=e("./tool/util"),o=window.G_vmlCanvasManager,r=e("./config"),s=function(e,a){this.id=e,this.dom=i(e,"canvas",a),this.dom.onselectstart=t,this.dom.style["-webkit-user-select"]="none",this.dom.style["user-select"]="none",this.dom.style["-webkit-touch-callout"]="none",this.dom.style["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",this.dom.className=r.elementClassName,o&&o.initElement(this.dom),this.domBack=null,this.ctxBack=null,this.painter=a,this.unusedCount=0,this.config=null,this.dirty=!0,this.elCount=0,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.zoomable=!1,this.panable=!1,this.maxZoom=1/0,this.minZoom=0,n.call(this)};return s.prototype.initContext=function(){this.ctx=this.dom.getContext("2d");var e=r.devicePixelRatio;1!=e&&this.ctx.scale(e,e)},s.prototype.createBackBuffer=function(){if(!o){this.domBack=i("back-"+this.id,"canvas",this.painter),this.ctxBack=this.domBack.getContext("2d");var e=r.devicePixelRatio;1!=e&&this.ctxBack.scale(e,e)}},s.prototype.resize=function(e,t){var i=r.devicePixelRatio;this.dom.style.width=e+"px",this.dom.style.height=t+"px",this.dom.setAttribute("width",e*i),this.dom.setAttribute("height",t*i),1!=i&&this.ctx.scale(i,i),this.domBack&&(this.domBack.setAttribute("width",e*i),this.domBack.setAttribute("height",t*i),1!=i&&this.ctxBack.scale(i,i))},s.prototype.clear=function(){var e=this.dom,t=this.ctx,i=e.width,n=e.height,a=this.clearColor&&!o,s=this.motionBlur&&!o,l=this.lastFrameAlpha,h=r.devicePixelRatio;if(s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(e,0,0,i/h,n/h)),t.clearRect(0,0,i/h,n/h),a&&(t.save(),t.fillStyle=this.clearColor,t.fillRect(0,0,i/h,n/h),t.restore()),s){var m=this.domBack;t.save(),t.globalAlpha=l,t.drawImage(m,0,0,i/h,n/h),t.restore()}},a.merge(s.prototype,n.prototype),s}),i("zrender/shape/Text",["require","../tool/area","./Base","../tool/util"],function(e){
+var t=e("../tool/area"),i=e("./Base"),n=function(e){i.call(this,e)};return n.prototype={type:"text",brush:function(e,i){var n=this.style;if(i&&(n=this.getHighlightStyle(n,this.highlightStyle||{})),"undefined"!=typeof n.text&&n.text!==!1){e.save(),this.doClip(e),this.setContext(e,n),this.setTransform(e),n.textFont&&(e.font=n.textFont),e.textAlign=n.textAlign||"start",e.textBaseline=n.textBaseline||"middle";var a,o=(n.text+"").split("\n"),r=t.getTextHeight("国",n.textFont),s=this.getRect(n),l=n.x;a="top"==n.textBaseline?s.y:"bottom"==n.textBaseline?s.y+r:s.y+r/2;for(var h=0,m=o.length;m>h;h++){if(n.maxWidth)switch(n.brushType){case"fill":e.fillText(o[h],l,a,n.maxWidth);break;case"stroke":e.strokeText(o[h],l,a,n.maxWidth);break;case"both":e.fillText(o[h],l,a,n.maxWidth),e.strokeText(o[h],l,a,n.maxWidth);break;default:e.fillText(o[h],l,a,n.maxWidth)}else switch(n.brushType){case"fill":e.fillText(o[h],l,a);break;case"stroke":e.strokeText(o[h],l,a);break;case"both":e.fillText(o[h],l,a),e.strokeText(o[h],l,a);break;default:e.fillText(o[h],l,a)}a+=r}e.restore()}},getRect:function(e){if(e.__rect)return e.__rect;var i=t.getTextWidth(e.text,e.textFont),n=t.getTextHeight(e.text,e.textFont),a=e.x;"end"==e.textAlign||"right"==e.textAlign?a-=i:"center"==e.textAlign&&(a-=i/2);var o;return o="top"==e.textBaseline?e.y:"bottom"==e.textBaseline?e.y-n:e.y-n/2,e.__rect={x:a,y:o,width:i,height:n},e.__rect}},e("../tool/util").inherits(n,i),n}),i("zrender/shape/Rectangle",["require","./Base","../tool/util"],function(e){var t=e("./Base"),i=function(e){t.call(this,e)};return i.prototype={type:"rectangle",_buildRadiusPath:function(e,t){var i,n,a,o,r=t.x,s=t.y,l=t.width,h=t.height,m=t.radius;"number"==typeof m?i=n=a=o=m:m instanceof Array?1===m.length?i=n=a=o=m[0]:2===m.length?(i=a=m[0],n=o=m[1]):3===m.length?(i=m[0],n=o=m[1],a=m[2]):(i=m[0],n=m[1],a=m[2],o=m[3]):i=n=a=o=0;var V;i+n>l&&(V=i+n,i*=l/V,n*=l/V),a+o>l&&(V=a+o,a*=l/V,o*=l/V),n+a>h&&(V=n+a,n*=h/V,a*=h/V),i+o>h&&(V=i+o,i*=h/V,o*=h/V),e.moveTo(r+i,s),e.lineTo(r+l-n,s),0!==n&&e.quadraticCurveTo(r+l,s,r+l,s+n),e.lineTo(r+l,s+h-a),0!==a&&e.quadraticCurveTo(r+l,s+h,r+l-a,s+h),e.lineTo(r+o,s+h),0!==o&&e.quadraticCurveTo(r,s+h,r,s+h-o),e.lineTo(r,s+i),0!==i&&e.quadraticCurveTo(r,s,r+i,s)},buildPath:function(e,t){t.radius?this._buildRadiusPath(e,t):(e.moveTo(t.x,t.y),e.lineTo(t.x+t.width,t.y),e.lineTo(t.x+t.width,t.y+t.height),e.lineTo(t.x,t.y+t.height),e.lineTo(t.x,t.y)),e.closePath()},getRect:function(e){if(e.__rect)return e.__rect;var t;return t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(e.x-t/2),y:Math.round(e.y-t/2),width:e.width+t,height:e.height+t},e.__rect}},e("../tool/util").inherits(i,t),i}),i("zrender/tool/area",["require","./util","./curve"],function(e){"use strict";function t(e){return e%=C,0>e&&(e+=C),e}function i(e,t,i,o){if(!t||!e)return!1;var r=e.type;L=L||W.getContext();var s=n(e,t,i,o);if("undefined"!=typeof s)return s;if(e.buildPath&&L.isPointInPath)return a(e,L,t,i,o);switch(r){case"ellipse":return!0;case"trochoid":var l="out"==t.location?t.r1+t.r2+t.d:t.r1-t.r2+t.d;return d(t,i,o,l);case"rose":return d(t,i,o,t.maxr);default:return!1}}function n(e,t,i,n){var a=e.type;switch(a){case"bezier-curve":return"undefined"==typeof t.cpX2?l(t.xStart,t.yStart,t.cpX1,t.cpY1,t.xEnd,t.yEnd,t.lineWidth,i,n):s(t.xStart,t.yStart,t.cpX1,t.cpY1,t.cpX2,t.cpY2,t.xEnd,t.yEnd,t.lineWidth,i,n);case"line":return r(t.xStart,t.yStart,t.xEnd,t.yEnd,t.lineWidth,i,n);case"polyline":return m(t.pointList,t.lineWidth,i,n);case"ring":return V(t.x,t.y,t.r0,t.r,i,n);case"circle":return d(t.x,t.y,t.r,i,n);case"sector":var o=t.startAngle*Math.PI/180,h=t.endAngle*Math.PI/180;return t.clockWise||(o=-o,h=-h),p(t.x,t.y,t.r0,t.r,o,h,!t.clockWise,i,n);case"path":return t.pathArray&&k(t.pathArray,Math.max(t.lineWidth,5),t.brushType,i,n);case"polygon":case"star":case"isogon":return c(t.pointList,i,n);case"text":var u=t.__rect||e.getRect(t);return U(u.x,u.y,u.width,u.height,i,n);case"rectangle":case"image":return U(t.x,t.y,t.width,t.height,i,n)}}function a(e,t,i,n,a){return t.beginPath(),e.buildPath(t,i),t.closePath(),t.isPointInPath(n,a)}function o(e,t,n,a){return!i(e,t,n,a)}function r(e,t,i,n,a,o,r){if(0===a)return!1;var s=Math.max(a,5),l=0,h=e;if(r>t+s&&r>n+s||t-s>r&&n-s>r||o>e+s&&o>i+s||e-s>o&&i-s>o)return!1;if(e===i)return Math.abs(o-e)<=s/2;l=(t-n)/(e-i),h=(e*n-i*t)/(e-i);var m=l*o-r+h,V=m*m/(l*l+1);return s/2*s/2>=V}function s(e,t,i,n,a,o,r,s,l,h,m){if(0===l)return!1;var V=Math.max(l,5);if(m>t+V&&m>n+V&&m>o+V&&m>s+V||t-V>m&&n-V>m&&o-V>m&&s-V>m||h>e+V&&h>i+V&&h>a+V&&h>r+V||e-V>h&&i-V>h&&a-V>h&&r-V>h)return!1;var U=X.cubicProjectPoint(e,t,i,n,a,o,r,s,h,m,null);return V/2>=U}function l(e,t,i,n,a,o,r,s,l){if(0===r)return!1;var h=Math.max(r,5);if(l>t+h&&l>n+h&&l>o+h||t-h>l&&n-h>l&&o-h>l||s>e+h&&s>i+h&&s>a+h||e-h>s&&i-h>s&&a-h>s)return!1;var m=X.quadraticProjectPoint(e,t,i,n,a,o,s,l,null);return h/2>=m}function h(e,i,n,a,o,r,s,l,h){if(0===s)return!1;var m=Math.max(s,5);l-=e,h-=i;var V=Math.sqrt(l*l+h*h);if(V-m>n||n>V+m)return!1;if(Math.abs(a-o)>=C)return!0;if(r){var U=a;a=t(o),o=t(U)}else a=t(a),o=t(o);a>o&&(o+=C);var d=Math.atan2(h,l);return 0>d&&(d+=C),d>=a&&o>=d||d+C>=a&&o>=d+C}function m(e,t,i,n){for(var t=Math.max(t,10),a=0,o=e.length-1;o>a;a++){var s=e[a][0],l=e[a][1],h=e[a+1][0],m=e[a+1][1];if(r(s,l,h,m,t,i,n))return!0}return!1}function V(e,t,i,n,a,o){var r=(a-e)*(a-e)+(o-t)*(o-t);return n*n>r&&r>i*i}function U(e,t,i,n,a,o){return a>=e&&e+i>=a&&o>=t&&t+n>=o}function d(e,t,i,n,a){return i*i>(n-e)*(n-e)+(a-t)*(a-t)}function p(e,t,i,n,a,o,r,s,l){return h(e,t,(i+n)/2,a,o,r,n-i,s,l)}function c(e,t,i){for(var n=e.length,a=0,o=0,r=n-1;n>o;o++){var s=e[r][0],l=e[r][1],h=e[o][0],m=e[o][1];a+=u(s,l,h,m,t,i),r=o}return 0!==a}function u(e,t,i,n,a,o){if(o>t&&o>n||t>o&&n>o)return 0;if(n==t)return 0;var r=t>n?1:-1,s=(o-t)/(n-t),l=s*(i-e)+e;return l>a?r:0}function y(){var e=E[0];E[0]=E[1],E[1]=e}function g(e,t,i,n,a,o,r,s,l,h){if(h>t&&h>n&&h>o&&h>s||t>h&&n>h&&o>h&&s>h)return 0;var m=X.cubicRootAt(t,n,o,s,h,S);if(0===m)return 0;for(var V,U,d=0,p=-1,c=0;m>c;c++){var u=S[c],g=X.cubicAt(e,i,a,r,u);l>g||(0>p&&(p=X.cubicExtrema(t,n,o,s,E),E[1]<E[0]&&p>1&&y(),V=X.cubicAt(t,n,o,s,E[0]),p>1&&(U=X.cubicAt(t,n,o,s,E[1]))),d+=2==p?u<E[0]?t>V?1:-1:u<E[1]?V>U?1:-1:U>s?1:-1:u<E[0]?t>V?1:-1:V>s?1:-1)}return d}function b(e,t,i,n,a,o,r,s){if(s>t&&s>n&&s>o||t>s&&n>s&&o>s)return 0;var l=X.quadraticRootAt(t,n,o,s,S);if(0===l)return 0;var h=X.quadraticExtremum(t,n,o);if(h>=0&&1>=h){for(var m=0,V=X.quadraticAt(t,n,o,h),U=0;l>U;U++){var d=X.quadraticAt(e,i,a,S[U]);r>d||(m+=S[U]<h?t>V?1:-1:V>o?1:-1)}return m}var d=X.quadraticAt(e,i,a,S[0]);return r>d?0:t>o?1:-1}function f(e,i,n,a,o,r,s,l){if(l-=i,l>n||-n>l)return 0;var h=Math.sqrt(n*n-l*l);if(S[0]=-h,S[1]=h,Math.abs(a-o)>=C){a=0,o=C;var m=r?1:-1;return s>=S[0]+e&&s<=S[1]+e?m:0}if(r){var h=a;a=t(o),o=t(h)}else a=t(a),o=t(o);a>o&&(o+=C);for(var V=0,U=0;2>U;U++){var d=S[U];if(d+e>s){var p=Math.atan2(l,d),m=r?1:-1;0>p&&(p=C+p),(p>=a&&o>=p||p+C>=a&&o>=p+C)&&(p>Math.PI/2&&p<1.5*Math.PI&&(m=-m),V+=m)}}return V}function k(e,t,i,n,a){var o=0,m=0,V=0,U=0,d=0,p=!0,c=!0;i=i||"fill";for(var y="stroke"===i||"both"===i,k="fill"===i||"both"===i,x=0;x<e.length;x++){var _=e[x],L=_.points;if(p||"M"===_.command){if(x>0&&(k&&(o+=u(m,V,U,d,n,a)),0!==o))return!0;U=L[L.length-2],d=L[L.length-1],p=!1,c&&"A"!==_.command&&(c=!1,m=U,V=d)}switch(_.command){case"M":m=L[0],V=L[1];break;case"L":if(y&&r(m,V,L[0],L[1],t,n,a))return!0;k&&(o+=u(m,V,L[0],L[1],n,a)),m=L[0],V=L[1];break;case"C":if(y&&s(m,V,L[0],L[1],L[2],L[3],L[4],L[5],t,n,a))return!0;k&&(o+=g(m,V,L[0],L[1],L[2],L[3],L[4],L[5],n,a)),m=L[4],V=L[5];break;case"Q":if(y&&l(m,V,L[0],L[1],L[2],L[3],t,n,a))return!0;k&&(o+=b(m,V,L[0],L[1],L[2],L[3],n,a)),m=L[2],V=L[3];break;case"A":var W=L[0],X=L[1],v=L[2],w=L[3],K=L[4],I=L[5],J=Math.cos(K)*v+W,C=Math.sin(K)*w+X;c?(c=!1,U=J,d=C):o+=u(m,V,J,C);var S=(n-W)*w/v+W;if(y&&h(W,X,w,K,K+I,1-L[7],t,S,a))return!0;k&&(o+=f(W,X,w,K,K+I,1-L[7],S,a)),m=Math.cos(K+I)*v+W,V=Math.sin(K+I)*w+X;break;case"z":if(y&&r(m,V,U,d,t,n,a))return!0;p=!0}}return k&&(o+=u(m,V,U,d,n,a)),0!==o}function x(e,t){var i=e+":"+t;if(v[i])return v[i];L=L||W.getContext(),L.save(),t&&(L.font=t),e=(e+"").split("\n");for(var n=0,a=0,o=e.length;o>a;a++)n=Math.max(L.measureText(e[a]).width,n);return L.restore(),v[i]=n,++K>J&&(K=0,v={}),n}function _(e,t){var i=e+":"+t;if(w[i])return w[i];L=L||W.getContext(),L.save(),t&&(L.font=t),e=(e+"").split("\n");var n=(L.measureText("国").width+2)*e.length;return L.restore(),w[i]=n,++I>J&&(I=0,w={}),n}var L,W=e("./util"),X=e("./curve"),v={},w={},K=0,I=0,J=5e3,C=2*Math.PI,S=[-1,-1,-1],E=[-1,-1];return{isInside:i,isOutside:o,getTextWidth:x,getTextHeight:_,isInsidePath:k,isInsidePolygon:c,isInsideSector:p,isInsideCircle:d,isInsideLine:r,isInsideRect:U,isInsidePolyline:m,isInsideCubicStroke:s,isInsideQuadraticStroke:l}}),i("zrender/shape/Base",["require","../tool/matrix","../tool/guid","../tool/util","../tool/log","../mixin/Transformable","../mixin/Eventful","../tool/area","../tool/color"],function(e){function t(t,n,a,o,r,s,l){r&&(t.font=r),t.textAlign=s,t.textBaseline=l;var h=i(n,a,o,r,s,l);n=(n+"").split("\n");var m=e("../tool/area").getTextHeight("国",r);switch(l){case"top":o=h.y;break;case"bottom":o=h.y+m;break;default:o=h.y+m/2}for(var V=0,U=n.length;U>V;V++)t.fillText(n[V],a,o),o+=m}function i(t,i,n,a,o,r){var s=e("../tool/area"),l=s.getTextWidth(t,a),h=s.getTextHeight("国",a);switch(t=(t+"").split("\n"),o){case"end":case"right":i-=l;break;case"center":i-=l/2}switch(r){case"top":break;case"bottom":n-=h*t.length;break;default:n-=h*t.length/2}return{x:i,y:n,width:l,height:h*t.length}}var n=window.G_vmlCanvasManager,a=e("../tool/matrix"),o=e("../tool/guid"),r=e("../tool/util"),s=e("../tool/log"),l=e("../mixin/Transformable"),h=e("../mixin/Eventful"),m=function(e){e=e||{},this.id=e.id||o();for(var t in e)this[t]=e[t];this.style=this.style||{},this.highlightStyle=this.highlightStyle||null,this.parent=null,this.__dirty=!0,this.__clipShapes=[],l.call(this),h.call(this)};m.prototype.invisible=!1,m.prototype.ignore=!1,m.prototype.zlevel=0,m.prototype.draggable=!1,m.prototype.clickable=!1,m.prototype.hoverable=!0,m.prototype.z=0,m.prototype.brush=function(e,t){var i=this.beforeBrush(e,t);switch(e.beginPath(),this.buildPath(e,i),i.brushType){case"both":e.fill();case"stroke":i.lineWidth>0&&e.stroke();break;default:e.fill()}this.drawText(e,i,this.style),this.afterBrush(e)},m.prototype.beforeBrush=function(e,t){var i=this.style;return this.brushTypeOnly&&(i.brushType=this.brushTypeOnly),t&&(i=this.getHighlightStyle(i,this.highlightStyle||{},this.brushTypeOnly)),"stroke"==this.brushTypeOnly&&(i.strokeColor=i.strokeColor||i.color),e.save(),this.doClip(e),this.setContext(e,i),this.setTransform(e),i},m.prototype.afterBrush=function(e){e.restore()};var V=[["color","fillStyle"],["strokeColor","strokeStyle"],["opacity","globalAlpha"],["lineCap","lineCap"],["lineJoin","lineJoin"],["miterLimit","miterLimit"],["lineWidth","lineWidth"],["shadowBlur","shadowBlur"],["shadowColor","shadowColor"],["shadowOffsetX","shadowOffsetX"],["shadowOffsetY","shadowOffsetY"]];m.prototype.setContext=function(e,t){for(var i=0,n=V.length;n>i;i++){var a=V[i][0],o=t[a],r=V[i][1];"undefined"!=typeof o&&(e[r]=o)}};var U=a.create();return m.prototype.doClip=function(e){if(this.__clipShapes&&!n)for(var t=0;t<this.__clipShapes.length;t++){var i=this.__clipShapes[t];if(i.needTransform){var o=i.transform;a.invert(U,o),e.transform(o[0],o[1],o[2],o[3],o[4],o[5])}if(e.beginPath(),i.buildPath(e,i.style),e.clip(),i.needTransform){var o=U;e.transform(o[0],o[1],o[2],o[3],o[4],o[5])}}},m.prototype.getHighlightStyle=function(t,i,n){var a={};for(var o in t)a[o]=t[o];var r=e("../tool/color"),s=r.getHighlightColor();"stroke"!=t.brushType?(a.strokeColor=s,a.lineWidth=(t.lineWidth||1)+this.getHighlightZoom(),a.brushType="both"):"stroke"!=n?(a.strokeColor=s,a.lineWidth=(t.lineWidth||1)+this.getHighlightZoom()):a.strokeColor=i.strokeColor||r.mix(t.strokeColor,r.toRGB(s));for(var o in i)"undefined"!=typeof i[o]&&(a[o]=i[o]);return a},m.prototype.getHighlightZoom=function(){return"text"!=this.type?6:2},m.prototype.drift=function(e,t){this.position[0]+=e,this.position[1]+=t},m.prototype.buildPath=function(){s("buildPath not implemented in "+this.type)},m.prototype.getRect=function(){s("getRect not implemented in "+this.type)},m.prototype.isCover=function(t,i){var n=this.transformCoordToLocal(t,i);return t=n[0],i=n[1],this.isCoverRect(t,i)?e("../tool/area").isInside(this,this.style,t,i):!1},m.prototype.isCoverRect=function(e,t){var i=this.style.__rect;return i||(i=this.style.__rect=this.getRect(this.style)),e>=i.x&&e<=i.x+i.width&&t>=i.y&&t<=i.y+i.height},m.prototype.drawText=function(e,i,n){if("undefined"!=typeof i.text&&i.text!==!1){var a=i.textColor||i.color||i.strokeColor;e.fillStyle=a;var o,r,s,l,h=10,m=i.textPosition||this.textPosition||"top";switch(m){case"inside":case"top":case"bottom":case"left":case"right":if(this.getRect){var V=(n||i).__rect||this.getRect(n||i);switch(m){case"inside":s=V.x+V.width/2,l=V.y+V.height/2,o="center",r="middle","stroke"!=i.brushType&&a==i.color&&(e.fillStyle="#fff");break;case"left":s=V.x-h,l=V.y+V.height/2,o="end",r="middle";break;case"right":s=V.x+V.width+h,l=V.y+V.height/2,o="start",r="middle";break;case"top":s=V.x+V.width/2,l=V.y-h,o="center",r="bottom";break;case"bottom":s=V.x+V.width/2,l=V.y+V.height+h,o="center",r="top"}}break;case"start":case"end":var U=i.pointList||[[i.xStart||0,i.yStart||0],[i.xEnd||0,i.yEnd||0]],d=U.length;if(2>d)return;var p,c,u,y;switch(m){case"start":p=U[1][0],c=U[0][0],u=U[1][1],y=U[0][1];break;case"end":p=U[d-2][0],c=U[d-1][0],u=U[d-2][1],y=U[d-1][1]}s=c,l=y;var g=Math.atan((u-y)/(c-p))/Math.PI*180;0>c-p?g+=180:0>u-y&&(g+=360),h=5,g>=30&&150>=g?(o="center",r="bottom",l-=h):g>150&&210>g?(o="right",r="middle",s-=h):g>=210&&330>=g?(o="center",r="top",l+=h):(o="left",r="middle",s+=h);break;case"specific":s=i.textX||0,l=i.textY||0,o="start",r="middle"}null!=s&&null!=l&&t(e,i.text,s,l,i.textFont,i.textAlign||o,i.textBaseline||r)}},m.prototype.modSelf=function(){this.__dirty=!0,this.style&&(this.style.__rect=null),this.highlightStyle&&(this.highlightStyle.__rect=null)},m.prototype.isSilent=function(){return!(this.hoverable||this.draggable||this.clickable||this.onmousemove||this.onmouseover||this.onmouseout||this.onmousedown||this.onmouseup||this.onclick||this.ondragenter||this.ondragover||this.ondragleave||this.ondrop)},r.merge(m.prototype,l.prototype,!0),r.merge(m.prototype,h.prototype,!0),m}),i("zrender/tool/curve",["require","./vector"],function(e){function t(e){return e>-u&&u>e}function i(e){return e>u||-u>e}function n(e,t,i,n,a){var o=1-a;return o*o*(o*e+3*a*t)+a*a*(a*n+3*o*i)}function a(e,t,i,n,a){var o=1-a;return 3*(((t-e)*o+2*(i-t)*a)*o+(n-i)*a*a)}function o(e,i,n,a,o,r){var s=a+3*(i-n)-e,l=3*(n-2*i+e),h=3*(i-e),m=e-o,V=l*l-3*s*h,U=l*h-9*s*m,d=h*h-3*l*m,p=0;if(t(V)&&t(U))if(t(l))r[0]=0;else{var c=-h/l;c>=0&&1>=c&&(r[p++]=c)}else{var u=U*U-4*V*d;if(t(u)){var b=U/V,c=-l/s+b,f=-b/2;c>=0&&1>=c&&(r[p++]=c),f>=0&&1>=f&&(r[p++]=f)}else if(u>0){var k=Math.sqrt(u),x=V*l+1.5*s*(-U+k),_=V*l+1.5*s*(-U-k);x=0>x?-Math.pow(-x,g):Math.pow(x,g),_=0>_?-Math.pow(-_,g):Math.pow(_,g);var c=(-l-(x+_))/(3*s);c>=0&&1>=c&&(r[p++]=c)}else{var L=(2*V*l-3*s*U)/(2*Math.sqrt(V*V*V)),W=Math.acos(L)/3,X=Math.sqrt(V),v=Math.cos(W),c=(-l-2*X*v)/(3*s),f=(-l+X*(v+y*Math.sin(W)))/(3*s),w=(-l+X*(v-y*Math.sin(W)))/(3*s);c>=0&&1>=c&&(r[p++]=c),f>=0&&1>=f&&(r[p++]=f),w>=0&&1>=w&&(r[p++]=w)}}return p}function r(e,n,a,o,r){var s=6*a-12*n+6*e,l=9*n+3*o-3*e-9*a,h=3*n-3*e,m=0;if(t(l)){if(i(s)){var V=-h/s;V>=0&&1>=V&&(r[m++]=V)}}else{var U=s*s-4*l*h;if(t(U))r[0]=-s/(2*l);else if(U>0){var d=Math.sqrt(U),V=(-s+d)/(2*l),p=(-s-d)/(2*l);V>=0&&1>=V&&(r[m++]=V),p>=0&&1>=p&&(r[m++]=p)}}return m}function s(e,t,i,n,a,o){var r=(t-e)*a+e,s=(i-t)*a+t,l=(n-i)*a+i,h=(s-r)*a+r,m=(l-s)*a+s,V=(m-h)*a+h;o[0]=e,o[1]=r,o[2]=h,o[3]=V,o[4]=V,o[5]=m,o[6]=l,o[7]=n}function l(e,t,i,a,o,r,s,l,h,m,V){var U,d=.005,p=1/0;b[0]=h,b[1]=m;for(var y=0;1>y;y+=.05){f[0]=n(e,i,o,s,y),f[1]=n(t,a,r,l,y);var g=c.distSquare(b,f);p>g&&(U=y,p=g)}p=1/0;for(var x=0;32>x&&!(u>d);x++){var _=U-d,L=U+d;f[0]=n(e,i,o,s,_),f[1]=n(t,a,r,l,_);var g=c.distSquare(f,b);if(_>=0&&p>g)U=_,p=g;else{k[0]=n(e,i,o,s,L),k[1]=n(t,a,r,l,L);var W=c.distSquare(k,b);1>=L&&p>W?(U=L,p=W):d*=.5}}return V&&(V[0]=n(e,i,o,s,U),V[1]=n(t,a,r,l,U)),Math.sqrt(p)}function h(e,t,i,n){var a=1-n;return a*(a*e+2*n*t)+n*n*i}function m(e,t,i,n){return 2*((1-n)*(t-e)+n*(i-t))}function V(e,n,a,o,r){var s=e-2*n+a,l=2*(n-e),h=e-o,m=0;if(t(s)){if(i(l)){var V=-h/l;V>=0&&1>=V&&(r[m++]=V)}}else{var U=l*l-4*s*h;if(t(U)){var V=-l/(2*s);V>=0&&1>=V&&(r[m++]=V)}else if(U>0){var d=Math.sqrt(U),V=(-l+d)/(2*s),p=(-l-d)/(2*s);V>=0&&1>=V&&(r[m++]=V),p>=0&&1>=p&&(r[m++]=p)}}return m}function U(e,t,i){var n=e+i-2*t;return 0===n?.5:(e-t)/n}function d(e,t,i,n,a){var o=(t-e)*n+e,r=(i-t)*n+t,s=(r-o)*n+o;a[0]=e,a[1]=o,a[2]=s,a[3]=s,a[4]=r,a[5]=i}function p(e,t,i,n,a,o,r,s,l){var m,V=.005,U=1/0;b[0]=r,b[1]=s;for(var d=0;1>d;d+=.05){f[0]=h(e,i,a,d),f[1]=h(t,n,o,d);var p=c.distSquare(b,f);U>p&&(m=d,U=p)}U=1/0;for(var y=0;32>y&&!(u>V);y++){var g=m-V,x=m+V;f[0]=h(e,i,a,g),f[1]=h(t,n,o,g);var p=c.distSquare(f,b);if(g>=0&&U>p)m=g,U=p;else{k[0]=h(e,i,a,x),k[1]=h(t,n,o,x);var _=c.distSquare(k,b);1>=x&&U>_?(m=x,U=_):V*=.5}}return l&&(l[0]=h(e,i,a,m),l[1]=h(t,n,o,m)),Math.sqrt(U)}var c=e("./vector"),u=1e-4,y=Math.sqrt(3),g=1/3,b=c.create(),f=c.create(),k=c.create();return{cubicAt:n,cubicDerivativeAt:a,cubicRootAt:o,cubicExtrema:r,cubicSubdivide:s,cubicProjectPoint:l,quadraticAt:h,quadraticDerivativeAt:m,quadraticRootAt:V,quadraticExtremum:U,quadraticSubdivide:d,quadraticProjectPoint:p}}),i("zrender/mixin/Transformable",["require","../tool/matrix","../tool/vector"],function(e){"use strict";function t(e){return e>-s&&s>e}function i(e){return e>s||-s>e}var n=e("../tool/matrix"),a=e("../tool/vector"),o=[0,0],r=n.translate,s=5e-5,l=function(){this.position||(this.position=[0,0]),"undefined"==typeof this.rotation&&(this.rotation=[0,0,0]),this.scale||(this.scale=[1,1,0,0]),this.needLocalTransform=!1,this.needTransform=!1};return l.prototype={constructor:l,updateNeedTransform:function(){this.needLocalTransform=i(this.rotation[0])||i(this.position[0])||i(this.position[1])||i(this.scale[0]-1)||i(this.scale[1]-1)},updateTransform:function(){this.updateNeedTransform();var e=this.parent&&this.parent.needTransform;if(this.needTransform=this.needLocalTransform||e,this.needTransform){var t=this.transform||n.create();if(n.identity(t),this.needLocalTransform){var a=this.scale;if(i(a[0])||i(a[1])){o[0]=-a[2]||0,o[1]=-a[3]||0;var s=i(o[0])||i(o[1]);s&&r(t,t,o),n.scale(t,t,a),s&&(o[0]=-o[0],o[1]=-o[1],r(t,t,o))}if(this.rotation instanceof Array){if(0!==this.rotation[0]){o[0]=-this.rotation[1]||0,o[1]=-this.rotation[2]||0;var s=i(o[0])||i(o[1]);s&&r(t,t,o),n.rotate(t,t,this.rotation[0]),s&&(o[0]=-o[0],o[1]=-o[1],r(t,t,o))}}else 0!==this.rotation&&n.rotate(t,t,this.rotation);(i(this.position[0])||i(this.position[1]))&&r(t,t,this.position)}e&&(this.needLocalTransform?n.mul(t,this.parent.transform,t):n.copy(t,this.parent.transform)),this.transform=t,this.invTransform=this.invTransform||n.create(),n.invert(this.invTransform,t)}},setTransform:function(e){if(this.needTransform){var t=this.transform;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}},lookAt:function(){var e=a.create();return function(i){this.transform||(this.transform=n.create());var o=this.transform;if(a.sub(e,i,this.position),!t(e[0])||!t(e[1])){a.normalize(e,e);var r=this.scale;o[2]=e[0]*r[1],o[3]=e[1]*r[1],o[0]=e[1]*r[0],o[1]=-e[0]*r[0],o[4]=this.position[0],o[5]=this.position[1],this.decomposeTransform()}}}(),decomposeTransform:function(){if(this.transform){var e=this.transform,t=e[0]*e[0]+e[1]*e[1],n=this.position,a=this.scale,o=this.rotation;i(t-1)&&(t=Math.sqrt(t));var r=e[2]*e[2]+e[3]*e[3];i(r-1)&&(r=Math.sqrt(r)),n[0]=e[4],n[1]=e[5],a[0]=t,a[1]=r,a[2]=a[3]=0,o[0]=Math.atan2(-e[1]/r,e[0]/t),o[1]=o[2]=0}},transformCoordToLocal:function(e,t){var i=[e,t];return this.needTransform&&this.invTransform&&a.applyTransform(i,i,this.invTransform),i}},l}),i("zrender/Group",["require","./tool/guid","./tool/util","./mixin/Transformable","./mixin/Eventful"],function(e){var t=e("./tool/guid"),i=e("./tool/util"),n=e("./mixin/Transformable"),a=e("./mixin/Eventful"),o=function(e){e=e||{},this.id=e.id||t();for(var i in e)this[i]=e[i];this.type="group",this.clipShape=null,this._children=[],this._storage=null,this.__dirty=!0,n.call(this),a.call(this)};return o.prototype.ignore=!1,o.prototype.children=function(){return this._children.slice()},o.prototype.childAt=function(e){return this._children[e]},o.prototype.addChild=function(e){e!=this&&e.parent!=this&&(e.parent&&e.parent.removeChild(e),this._children.push(e),e.parent=this,this._storage&&this._storage!==e._storage&&(this._storage.addToMap(e),e instanceof o&&e.addChildrenToStorage(this._storage)))},o.prototype.removeChild=function(e){var t=i.indexOf(this._children,e);t>=0&&this._children.splice(t,1),e.parent=null,this._storage&&(this._storage.delFromMap(e.id),e instanceof o&&e.delChildrenFromStorage(this._storage))},o.prototype.clearChildren=function(){for(var e=0;e<this._children.length;e++){var t=this._children[e];this._storage&&(this._storage.delFromMap(t.id),t instanceof o&&t.delChildrenFromStorage(this._storage))}this._children.length=0},o.prototype.eachChild=function(e,t){for(var i=!!t,n=0;n<this._children.length;n++){var a=this._children[n];i?e.call(t,a):e(a)}},o.prototype.traverse=function(e,t){for(var i=!!t,n=0;n<this._children.length;n++){var a=this._children[n];i?e.call(t,a):e(a),"group"===a.type&&a.traverse(e,t)}},o.prototype.addChildrenToStorage=function(e){for(var t=0;t<this._children.length;t++){var i=this._children[t];e.addToMap(i),i instanceof o&&i.addChildrenToStorage(e)}},o.prototype.delChildrenFromStorage=function(e){for(var t=0;t<this._children.length;t++){var i=this._children[t];e.delFromMap(i.id),i instanceof o&&i.delChildrenFromStorage(e)}},o.prototype.modSelf=function(){this.__dirty=!0},i.merge(o.prototype,n.prototype,!0),i.merge(o.prototype,a.prototype,!0),o}),i("zrender/animation/Clip",["require","./easing"],function(e){function t(e){this._targetPool=e.target||{},this._targetPool instanceof Array||(this._targetPool=[this._targetPool]),this._life=e.life||1e3,this._delay=e.delay||0,this._startTime=(new Date).getTime()+this._delay,this._endTime=this._startTime+1e3*this._life,this.loop="undefined"==typeof e.loop?!1:e.loop,this.gap=e.gap||0,this.easing=e.easing||"Linear",this.onframe=e.onframe,this.ondestroy=e.ondestroy,this.onrestart=e.onrestart}var i=e("./easing");return t.prototype={step:function(e){var t=(e-this._startTime)/this._life;if(!(0>t)){t=Math.min(t,1);var n="string"==typeof this.easing?i[this.easing]:this.easing,a="function"==typeof n?n(t):t;return this.fire("frame",a),1==t?this.loop?(this.restart(),"restart"):(this.__needsRemove=!0,"destroy"):null}},restart:function(){var e=(new Date).getTime(),t=(e-this._startTime)%this._life;this._startTime=(new Date).getTime()-t+this.gap,this.__needsRemove=!1},fire:function(e,t){for(var i=0,n=this._targetPool.length;n>i;i++)this["on"+e]&&this["on"+e](this._targetPool[i],t)},constructor:t},t}),i("zrender/animation/easing",[],function(){var e={Linear:function(e){return e},QuadraticIn:function(e){return e*e},QuadraticOut:function(e){return e*(2-e)},QuadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},CubicIn:function(e){return e*e*e},CubicOut:function(e){return--e*e*e+1},CubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},QuarticIn:function(e){return e*e*e*e},QuarticOut:function(e){return 1- --e*e*e*e},QuarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},QuinticIn:function(e){return e*e*e*e*e},QuinticOut:function(e){return--e*e*e*e*e+1},QuinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},SinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},SinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},SinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},ExponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},ExponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},ExponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},CircularIn:function(e){return 1-Math.sqrt(1-e*e)},CircularOut:function(e){return Math.sqrt(1- --e*e)},CircularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},ElasticIn:function(e){var t,i=.1,n=.4;return 0===e?0:1===e?1:(!i||1>i?(i=1,t=n/4):t=n*Math.asin(1/i)/(2*Math.PI),-(i*Math.pow(2,10*(e-=1))*Math.sin(2*(e-t)*Math.PI/n)))},ElasticOut:function(e){var t,i=.1,n=.4;return 0===e?0:1===e?1:(!i||1>i?(i=1,t=n/4):t=n*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*e)*Math.sin(2*(e-t)*Math.PI/n)+1)},ElasticInOut:function(e){var t,i=.1,n=.4;return 0===e?0:1===e?1:(!i||1>i?(i=1,t=n/4):t=n*Math.asin(1/i)/(2*Math.PI),(e*=2)<1?-.5*i*Math.pow(2,10*(e-=1))*Math.sin(2*(e-t)*Math.PI/n):i*Math.pow(2,-10*(e-=1))*Math.sin(2*(e-t)*Math.PI/n)*.5+1)},BackIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},BackOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},BackInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*e*e*((t+1)*e-t):.5*((e-=2)*e*((t+1)*e+t)+2)},BounceIn:function(t){return 1-e.BounceOut(1-t)},BounceOut:function(e){return 1/2.75>e?7.5625*e*e:2/2.75>e?7.5625*(e-=1.5/2.75)*e+.75:2.5/2.75>e?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},BounceInOut:function(t){return.5>t?.5*e.BounceIn(2*t):.5*e.BounceOut(2*t-1)+.5}};return e}),i("echarts/chart/base",["require","zrender/shape/Image","../util/shape/Icon","../util/shape/MarkLine","../util/shape/Symbol","zrender/shape/Polyline","zrender/shape/ShapeBundle","../config","../util/ecData","../util/ecAnimation","../util/ecEffect","../util/accMath","../component/base","../layout/EdgeBundling","zrender/tool/util","zrender/tool/area"],function(e){function t(e){return null!=e.x&&null!=e.y}function i(e,t,i,n,a){p.call(this,e,t,i,n,a);var o=this;this.selectedMap={},this.lastShapeList=[],this.shapeHandler={onclick:function(){o.isClick=!0},ondragover:function(e){var t=e.target;t.highlightStyle=t.highlightStyle||{};var i=t.highlightStyle,n=i.brushTyep,a=i.strokeColor,r=i.lineWidth;i.brushType="stroke",i.strokeColor=o.ecTheme.calculableColor||h.calculableColor,i.lineWidth="icon"===t.type?30:10,o.zr.addHoverShape(t),setTimeout(function(){i&&(i.brushType=n,i.strokeColor=a,i.lineWidth=r)},20)},ondrop:function(e){null!=m.get(e.dragged,"data")&&(o.isDrop=!0)},ondragend:function(){o.isDragend=!0}}}var n=e("zrender/shape/Image"),a=e("../util/shape/Icon"),o=e("../util/shape/MarkLine"),r=e("../util/shape/Symbol"),s=e("zrender/shape/Polyline"),l=e("zrender/shape/ShapeBundle"),h=e("../config"),m=e("../util/ecData"),V=e("../util/ecAnimation"),U=e("../util/ecEffect"),d=e("../util/accMath"),p=e("../component/base"),c=e("../layout/EdgeBundling"),u=e("zrender/tool/util"),y=e("zrender/tool/area");return i.prototype={setCalculable:function(e){return e.dragEnableTime=this.ecTheme.DRAG_ENABLE_TIME||h.DRAG_ENABLE_TIME,e.ondragover=this.shapeHandler.ondragover,e.ondragend=this.shapeHandler.ondragend,e.ondrop=this.shapeHandler.ondrop,e},ondrop:function(e,t){if(this.isDrop&&e.target&&!t.dragIn){var i,n=e.target,a=e.dragged,o=m.get(n,"seriesIndex"),r=m.get(n,"dataIndex"),s=this.series,l=this.component.legend;if(-1===r){if(m.get(a,"seriesIndex")==o)return t.dragOut=t.dragIn=t.needRefresh=!0,void(this.isDrop=!1);i={value:m.get(a,"value"),name:m.get(a,"name")},this.type===h.CHART_TYPE_PIE&&i.value<0&&(i.value=0);for(var V=!1,U=s[o].data,p=0,c=U.length;c>p;p++)U[p].name===i.name&&"-"===U[p].value&&(s[o].data[p].value=i.value,V=!0);!V&&s[o].data.push(i),l&&l.add(i.name,a.style.color||a.style.strokeColor)}else i=s[o].data[r]||"-",null!=i.value?(s[o].data[r].value="-"!=i.value?d.accAdd(s[o].data[r].value,m.get(a,"value")):m.get(a,"value"),(this.type===h.CHART_TYPE_FUNNEL||this.type===h.CHART_TYPE_PIE)&&(l&&1===l.getRelatedAmount(i.name)&&this.component.legend.del(i.name),i.name+=this.option.nameConnector+m.get(a,"name"),l&&l.add(i.name,a.style.color||a.style.strokeColor))):s[o].data[r]="-"!=i?d.accAdd(s[o].data[r],m.get(a,"value")):m.get(a,"value");t.dragIn=t.dragIn||!0,this.isDrop=!1;var u=this;setTimeout(function(){u.zr.trigger("mousemove",e.event)},300)}},ondragend:function(e,t){if(this.isDragend&&e.target&&!t.dragOut){var i=e.target,n=m.get(i,"seriesIndex"),a=m.get(i,"dataIndex"),o=this.series;if(null!=o[n].data[a].value){o[n].data[a].value="-";var r=o[n].data[a].name,s=this.component.legend;s&&0===s.getRelatedAmount(r)&&s.del(r)}else o[n].data[a]="-";t.dragOut=!0,t.needRefresh=!0,this.isDragend=!1}},onlegendSelected:function(e,t){var i=e.selected;for(var n in this.selectedMap)this.selectedMap[n]!=i[n]&&(t.needRefresh=!0),this.selectedMap[n]=i[n]},_buildPosition:function(){this._symbol=this.option.symbolList,this._sIndex2ShapeMap={},this._sIndex2ColorMap={},this.selectedMap={},this.xMarkMap={};for(var e,t,i,n,a=this.series,o={top:[],bottom:[],left:[],right:[],other:[]},r=0,s=a.length;s>r;r++)a[r].type===this.type&&(a[r]=this.reformOption(a[r]),this.legendHoverLink=a[r].legendHoverLink||this.legendHoverLink,e=a[r].xAxisIndex,t=a[r].yAxisIndex,i=this.component.xAxis.getAxis(e),n=this.component.yAxis.getAxis(t),i.type===h.COMPONENT_TYPE_AXIS_CATEGORY?o[i.getPosition()].push(r):n.type===h.COMPONENT_TYPE_AXIS_CATEGORY?o[n.getPosition()].push(r):o.other.push(r));for(var l in o)o[l].length>0&&this._buildSinglePosition(l,o[l]);this.addShapeList()},_buildSinglePosition:function(e,t){var i=this._mapData(t),n=i.locationMap,a=i.maxDataLength;if(0!==a&&0!==n.length){switch(e){case"bottom":case"top":this._buildHorizontal(t,a,n,this.xMarkMap);break;case"left":case"right":this._buildVertical(t,a,n,this.xMarkMap);break;case"other":this._buildOther(t,a,n,this.xMarkMap)}for(var o=0,r=t.length;r>o;o++)this.buildMark(t[o])}},_mapData:function(e){for(var t,i,n,a,o=this.series,r=0,s={},l="__kener__stack__",m=this.component.legend,V=[],U=0,d=0,p=e.length;p>d;d++){if(t=o[e[d]],n=t.name,this._sIndex2ShapeMap[e[d]]=this._sIndex2ShapeMap[e[d]]||this.query(t,"symbol")||this._symbol[d%this._symbol.length],m){if(this.selectedMap[n]=m.isSelected(n),this._sIndex2ColorMap[e[d]]=m.getColor(n),a=m.getItemShape(n)){var c=a.style;if(this.type==h.CHART_TYPE_LINE)c.iconType="legendLineIcon",c.symbol=this._sIndex2ShapeMap[e[d]];else if(t.itemStyle.normal.barBorderWidth>0){var u=a.highlightStyle;c.brushType="both",c.x+=1,c.y+=1,c.width-=2,c.height-=2,c.strokeColor=u.strokeColor=t.itemStyle.normal.barBorderColor,u.lineWidth=3}m.setItemShape(n,a)}}else this.selectedMap[n]=!0,this._sIndex2ColorMap[e[d]]=this.zr.getColor(e[d]);this.selectedMap[n]&&(i=t.stack||l+e[d],null==s[i]?(s[i]=r,V[r]=[e[d]],r++):V[s[i]].push(e[d])),U=Math.max(U,t.data.length)}return{locationMap:V,maxDataLength:U}},_calculMarkMapXY:function(e,t,i){for(var n=this.series,a=0,o=t.length;o>a;a++)for(var r=0,s=t[a].length;s>r;r++){var l=t[a][r],h="xy"==i?0:"",m=this.component.grid,V=e[l];if("-1"!=i.indexOf("x")){V["counter"+h]>0&&(V["average"+h]=V["sum"+h]/V["counter"+h]);var U=this.component.xAxis.getAxis(n[l].xAxisIndex||0).getCoord(V["average"+h]);V["averageLine"+h]=[[U,m.getYend()],[U,m.getY()]],V["minLine"+h]=[[V["minX"+h],m.getYend()],[V["minX"+h],m.getY()]],V["maxLine"+h]=[[V["maxX"+h],m.getYend()],[V["maxX"+h],m.getY()]],V.isHorizontal=!1}if(h="xy"==i?1:"","-1"!=i.indexOf("y")){V["counter"+h]>0&&(V["average"+h]=V["sum"+h]/V["counter"+h]);var d=this.component.yAxis.getAxis(n[l].yAxisIndex||0).getCoord(V["average"+h]);V["averageLine"+h]=[[m.getX(),d],[m.getXend(),d]],V["minLine"+h]=[[m.getX(),V["minY"+h]],[m.getXend(),V["minY"+h]]],V["maxLine"+h]=[[m.getX(),V["maxY"+h]],[m.getXend(),V["maxY"+h]]],V.isHorizontal=!0}}},addLabel:function(e,t,i,n,a){var o=[i,t],r=this.deepMerge(o,"itemStyle.normal.label"),s=this.deepMerge(o,"itemStyle.emphasis.label"),l=r.textStyle||{},h=s.textStyle||{};
+
+if(r.show){var m=e.style;m.text=this._getLabelText(t,i,n,"normal"),m.textPosition=null==r.position?"horizontal"===a?"right":"top":r.position,m.textColor=l.color,m.textFont=this.getFont(l),m.textAlign=l.align,m.textBaseline=l.baseline}if(s.show){var V=e.highlightStyle;V.text=this._getLabelText(t,i,n,"emphasis"),V.textPosition=r.show?e.style.textPosition:null==s.position?"horizontal"===a?"right":"top":s.position,V.textColor=h.color,V.textFont=this.getFont(h),V.textAlign=h.align,V.textBaseline=h.baseline}return e},_getLabelText:function(e,t,i,n){var a=this.deepQuery([t,e],"itemStyle."+n+".label.formatter");a||"emphasis"!==n||(a=this.deepQuery([t,e],"itemStyle.normal.label.formatter"));var o=this.getDataFromOption(t,"-");return a?"function"==typeof a?a.call(this.myChart,{seriesName:e.name,series:e,name:i,value:o,data:t,status:n}):"string"==typeof a?a=a.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}").replace("{a0}",e.name).replace("{b0}",i).replace("{c0}",this.numAddCommas(o)):void 0:o instanceof Array?null!=o[2]?this.numAddCommas(o[2]):o[0]+" , "+o[1]:this.numAddCommas(o)},buildMark:function(e){var t=this.series[e];this.selectedMap[t.name]&&(t.markLine&&this._buildMarkLine(e),t.markPoint&&this._buildMarkPoint(e))},_buildMarkPoint:function(e){for(var t,i,n=(this.markAttachStyle||{})[e],a=this.series[e],o=u.clone(a.markPoint),r=0,s=o.data.length;s>r;r++)t=o.data[r],i=this.getMarkCoord(e,t),t.x=null!=t.x?t.x:i[0],t.y=null!=t.y?t.y:i[1],!t.type||"max"!==t.type&&"min"!==t.type||(t.value=i[3],t.name=t.name||t.type,t.symbolSize=t.symbolSize||y.getTextWidth(i[3],this.getFont())/2+5);for(var l=this._markPoint(e,o),r=0,s=l.length;s>r;r++){var m=l[r];m.zlevel=a.zlevel,m.z=a.z+1;for(var V in n)m[V]=u.clone(n[V]);this.shapeList.push(m)}if(this.type===h.CHART_TYPE_FORCE||this.type===h.CHART_TYPE_CHORD)for(var r=0,s=l.length;s>r;r++)this.zr.addShape(l[r])},_buildMarkLine:function(e){for(var t,i=(this.markAttachStyle||{})[e],n=this.series[e],a=u.clone(n.markLine),o=0,r=a.data.length;r>o;o++){var s=a.data[o];!s.type||"max"!==s.type&&"min"!==s.type&&"average"!==s.type?t=[this.getMarkCoord(e,s[0]),this.getMarkCoord(e,s[1])]:(t=this.getMarkCoord(e,s),a.data[o]=[u.clone(s),{}],a.data[o][0].name=s.name||s.type,a.data[o][0].value="average"!==s.type?t[3]:+t[3].toFixed(null!=a.precision?a.precision:this.deepQuery([this.ecTheme,h],"markLine.precision")),t=t[2],s=[{},{}]),null!=t&&null!=t[0]&&null!=t[1]&&(a.data[o][0].x=null!=s[0].x?s[0].x:t[0][0],a.data[o][0].y=null!=s[0].y?s[0].y:t[0][1],a.data[o][1].x=null!=s[1].x?s[1].x:t[1][0],a.data[o][1].y=null!=s[1].y?s[1].y:t[1][1])}var m=this._markLine(e,a),V=a.large;if(V){var U=new l({style:{shapeList:m}}),d=m[0];if(d){u.merge(U.style,d.style),u.merge(U.highlightStyle={},d.highlightStyle),U.style.brushType="stroke",U.zlevel=n.zlevel,U.z=n.z+1,U.hoverable=!1;for(var p in i)U[p]=u.clone(i[p])}this.shapeList.push(U),this.zr.addShape(U),U._mark="largeLine";var c=a.effect;c.show&&(U.effect=c)}else{for(var o=0,r=m.length;r>o;o++){var y=m[o];y.zlevel=n.zlevel,y.z=n.z+1;for(var p in i)y[p]=u.clone(i[p]);this.shapeList.push(y)}if(this.type===h.CHART_TYPE_FORCE||this.type===h.CHART_TYPE_CHORD)for(var o=0,r=m.length;r>o;o++)this.zr.addShape(m[o])}},_markPoint:function(e,t){var i=this.series[e],n=this.component;u.merge(u.merge(t,u.clone(this.ecTheme.markPoint||{})),u.clone(h.markPoint)),t.name=i.name;var a,o,r,s,l,V,U,d=[],p=t.data,c=n.dataRange,y=n.legend,g=this.zr.getWidth(),b=this.zr.getHeight();if(t.large)a=this.getLargeMarkPointShape(e,t),a._mark="largePoint",a&&d.push(a);else for(var f=0,k=p.length;k>f;f++)null!=p[f].x&&null!=p[f].y&&(r=null!=p[f].value?p[f].value:"",y&&(o=y.getColor(i.name)),c&&(o=isNaN(r)?o:c.getColor(r),s=[p[f],t],l=this.deepQuery(s,"itemStyle.normal.color")||o,V=this.deepQuery(s,"itemStyle.emphasis.color")||l,null==l&&null==V)||(o=null==o?this.zr.getColor(e):o,p[f].tooltip=p[f].tooltip||t.tooltip||{trigger:"item"},p[f].name=null!=p[f].name?p[f].name:"",p[f].value=r,a=this.getSymbolShape(t,e,p[f],f,p[f].name,this.parsePercent(p[f].x,g),this.parsePercent(p[f].y,b),"pin",o,"rgba(0,0,0,0)","horizontal"),a._mark="point",U=this.deepMerge([p[f],t],"effect"),U.show&&(a.effect=U),i.type===h.CHART_TYPE_MAP&&(a._geo=this.getMarkGeo(p[f])),m.pack(a,i,e,p[f],f,p[f].name,r),d.push(a)));return d},_markLine:function(){function e(e,t){e[t]=e[t]instanceof Array?e[t].length>1?e[t]:[e[t][0],e[t][0]]:[e[t],e[t]]}return function(i,n){var a=this.series[i],o=this.component,r=o.dataRange,s=o.legend;u.merge(u.merge(n,u.clone(this.ecTheme.markLine||{})),u.clone(h.markLine));var l=s?s.getColor(a.name):this.zr.getColor(i);e(n,"symbol"),e(n,"symbolSize"),e(n,"symbolRotate");for(var V=n.data,U=[],d=this.zr.getWidth(),p=this.zr.getHeight(),y=0;y<V.length;y++){var g=V[y];if(t(g[0])&&t(g[1])){var b=this.deepMerge(g),f=[b,n],k=l,x=null!=b.value?b.value:"";if(r){k=isNaN(x)?k:r.getColor(x);var _=this.deepQuery(f,"itemStyle.normal.color")||k,L=this.deepQuery(f,"itemStyle.emphasis.color")||_;if(null==_&&null==L)continue}g[0].tooltip=b.tooltip||n.tooltip||{trigger:"item"},g[0].name=g[0].name||"",g[1].name=g[1].name||"",g[0].value=x,U.push({points:[[this.parsePercent(g[0].x,d),this.parsePercent(g[0].y,p)],[this.parsePercent(g[1].x,d),this.parsePercent(g[1].y,p)]],rawData:g,color:k})}}var W=this.query(n,"bundling.enable");if(W){var X=new c;X.maxTurningAngle=this.query(n,"bundling.maxTurningAngle")/180*Math.PI,U=X.run(U)}n.name=a.name;for(var v=[],y=0,w=U.length;w>y;y++){var K=U[y],I=K.rawEdge||K,g=I.rawData,x=null!=g.value?g.value:"",J=this.getMarkLineShape(n,i,g,y,K.points,W,I.color);J._mark="line";var C=this.deepMerge([g[0],g[1],n],"effect");C.show&&(J.effect=C,J.effect.large=n.large),a.type===h.CHART_TYPE_MAP&&(J._geo=[this.getMarkGeo(g[0]),this.getMarkGeo(g[1])]),m.pack(J,a,i,g[0],y,g[0].name+(""!==g[1].name?" > "+g[1].name:""),x),v.push(J)}return v}}(),getMarkCoord:function(){return[0,0]},getSymbolShape:function(e,t,i,o,r,s,l,h,V,U,d){var p=[i,e],c=this.getDataFromOption(i,"-");h=this.deepQuery(p,"symbol")||h;var u=this.deepQuery(p,"symbolSize");u="function"==typeof u?u(c):u,"number"==typeof u&&(u=[u,u]);var y=this.deepQuery(p,"symbolRotate"),g=this.deepMerge(p,"itemStyle.normal"),b=this.deepMerge(p,"itemStyle.emphasis"),f=null!=g.borderWidth?g.borderWidth:g.lineStyle&&g.lineStyle.width;null==f&&(f=h.match("empty")?2:0);var k=null!=b.borderWidth?b.borderWidth:b.lineStyle&&b.lineStyle.width;null==k&&(k=f+2);var x=this.getItemStyleColor(g.color,t,o,i),_=this.getItemStyleColor(b.color,t,o,i),L=u[0],W=u[1],X=new a({style:{iconType:h.replace("empty","").toLowerCase(),x:s-L,y:l-W,width:2*L,height:2*W,brushType:"both",color:h.match("empty")?U:x||V,strokeColor:g.borderColor||x||V,lineWidth:f},highlightStyle:{color:h.match("empty")?U:_||x||V,strokeColor:b.borderColor||g.borderColor||_||x||V,lineWidth:k},clickable:this.deepQuery(p,"clickable")});return h.match("image")&&(X.style.image=h.replace(new RegExp("^image:\\/\\/"),""),X=new n({style:X.style,highlightStyle:X.highlightStyle,clickable:this.deepQuery(p,"clickable")})),null!=y&&(X.rotation=[y*Math.PI/180,s,l]),h.match("star")&&(X.style.iconType="star",X.style.n=h.replace("empty","").replace("star","")-0||5),"none"===h&&(X.invisible=!0,X.hoverable=!1),X=this.addLabel(X,e,i,r,d),h.match("empty")&&(null==X.style.textColor&&(X.style.textColor=X.style.strokeColor),null==X.highlightStyle.textColor&&(X.highlightStyle.textColor=X.highlightStyle.strokeColor)),m.pack(X,e,t,i,o,r),X._x=s,X._y=l,X._dataIndex=o,X._seriesIndex=t,X},getMarkLineShape:function(e,t,i,n,a,r,l){var h=null!=i[0].value?i[0].value:"-",m=null!=i[1].value?i[1].value:"-",V=[i[0].symbol||e.symbol[0],i[1].symbol||e.symbol[1]],U=[i[0].symbolSize||e.symbolSize[0],i[1].symbolSize||e.symbolSize[1]];U[0]="function"==typeof U[0]?U[0](h):U[0],U[1]="function"==typeof U[1]?U[1](m):U[1];var d=[this.query(i[0],"symbolRotate")||e.symbolRotate[0],this.query(i[1],"symbolRotate")||e.symbolRotate[1]],p=[i[0],i[1],e],c=this.deepMerge(p,"itemStyle.normal");c.color=this.getItemStyleColor(c.color,t,n,i);var u=this.deepMerge(p,"itemStyle.emphasis");u.color=this.getItemStyleColor(u.color,t,n,i);var y=c.lineStyle,g=u.lineStyle,b=y.width;null==b&&(b=c.borderWidth);var f=g.width;null==f&&(f=null!=u.borderWidth?u.borderWidth:b+2);var k=this.deepQuery(p,"smoothness");this.deepQuery(p,"smooth")||(k=0);var x=r?s:o,_=new x({style:{symbol:V,symbolSize:U,symbolRotate:d,brushType:"both",lineType:y.type,shadowColor:y.shadowColor||y.color||c.borderColor||c.color||l,shadowBlur:y.shadowBlur,shadowOffsetX:y.shadowOffsetX,shadowOffsetY:y.shadowOffsetY,color:c.color||l,strokeColor:y.color||c.borderColor||c.color||l,lineWidth:b,symbolBorderColor:c.borderColor||c.color||l,symbolBorder:c.borderWidth},highlightStyle:{shadowColor:g.shadowColor,shadowBlur:g.shadowBlur,shadowOffsetX:g.shadowOffsetX,shadowOffsetY:g.shadowOffsetY,color:u.color||c.color||l,strokeColor:g.color||y.color||u.borderColor||c.borderColor||u.color||c.color||l,lineWidth:f,symbolBorderColor:u.borderColor||c.borderColor||u.color||c.color||l,symbolBorder:null==u.borderWidth?c.borderWidth+2:u.borderWidth},clickable:this.deepQuery(p,"clickable")}),L=_.style;return r?(L.pointList=a,L.smooth=k):(L.xStart=a[0][0],L.yStart=a[0][1],L.xEnd=a[1][0],L.yEnd=a[1][1],L.curveness=k,_.updatePoints(_.style)),_=this.addLabel(_,e,i[0],i[0].name+" : "+i[1].name)},getLargeMarkPointShape:function(e,t){var i,n,a,o,s,l,h=this.series[e],m=this.component,V=t.data,U=m.dataRange,d=m.legend,p=[V[0],t];if(d&&(n=d.getColor(h.name)),!U||(a=null!=V[0].value?V[0].value:"",n=isNaN(a)?n:U.getColor(a),o=this.deepQuery(p,"itemStyle.normal.color")||n,s=this.deepQuery(p,"itemStyle.emphasis.color")||o,null!=o||null!=s)){n=this.deepMerge(p,"itemStyle.normal").color||n;var c=this.deepQuery(p,"symbol")||"circle";c=c.replace("empty","").replace(/\d/g,""),l=this.deepMerge([V[0],t],"effect");var u=window.devicePixelRatio||1;return i=new r({style:{pointList:V,color:n,strokeColor:n,shadowColor:l.shadowColor||n,shadowBlur:(null!=l.shadowBlur?l.shadowBlur:8)*u,size:this.deepQuery(p,"symbolSize"),iconType:c,brushType:"fill",lineWidth:1},draggable:!1,hoverable:!1}),l.show&&(i.effect=l),i}},backupShapeList:function(){this.shapeList&&this.shapeList.length>0?(this.lastShapeList=this.shapeList,this.shapeList=[]):this.lastShapeList=[]},addShapeList:function(){var e,t,i=this.option.animationThreshold/(this.canvasSupported?2:4),n=this.lastShapeList,a=this.shapeList,o=n.length>0,r=o?this.query(this.option,"animationDurationUpdate"):this.query(this.option,"animationDuration"),s=this.query(this.option,"animationEasing"),l={},m={};if(this.option.animation&&!this.option.renderAsImage&&a.length<i&&!this.motionlessOnce){for(var V=0,U=n.length;U>V;V++)t=this._getAnimationKey(n[V]),t.match("undefined")?this.zr.delShape(n[V].id):(t+=n[V].type,l[t]?this.zr.delShape(n[V].id):l[t]=n[V]);for(var V=0,U=a.length;U>V;V++)t=this._getAnimationKey(a[V]),t.match("undefined")?this.zr.addShape(a[V]):(t+=a[V].type,m[t]=a[V]);for(t in l)m[t]||this.zr.delShape(l[t].id);for(t in m)l[t]?(this.zr.delShape(l[t].id),this._animateMod(l[t],m[t],r,s,0,o)):(e=this.type!=h.CHART_TYPE_LINE&&this.type!=h.CHART_TYPE_RADAR||0===t.indexOf("icon")?0:r/2,this._animateMod(!1,m[t],r,s,e,o));this.zr.refresh(),this.animationEffect()}else{this.motionlessOnce=!1,this.zr.delShape(n);for(var V=0,U=a.length;U>V;V++)this.zr.addShape(a[V])}},_getAnimationKey:function(e){return this.type!=h.CHART_TYPE_MAP&&this.type!=h.CHART_TYPE_TREEMAP&&this.type!=h.CHART_TYPE_VENN&&this.type!=h.CHART_TYPE_TREE?m.get(e,"seriesIndex")+"_"+m.get(e,"dataIndex")+(e._mark?e._mark:"")+(this.type===h.CHART_TYPE_RADAR?m.get(e,"special"):""):m.get(e,"seriesIndex")+"_"+m.get(e,"dataIndex")+(e._mark?e._mark:"undefined")},_animateMod:function(e,t,i,n,a,o){switch(t.type){case"polyline":case"half-smooth-polygon":V.pointList(this.zr,e,t,i,n);break;case"rectangle":V.rectangle(this.zr,e,t,i,n);break;case"image":case"icon":V.icon(this.zr,e,t,i,n,a);break;case"candle":o?this.zr.addShape(t):V.candle(this.zr,e,t,i,n);break;case"ring":case"sector":case"circle":o?"sector"===t.type?V.sector(this.zr,e,t,i,n):this.zr.addShape(t):V.ring(this.zr,e,t,i+(m.get(t,"dataIndex")||0)%20*100,n);break;case"text":V.text(this.zr,e,t,i,n);break;case"polygon":o?V.pointList(this.zr,e,t,i,n):V.polygon(this.zr,e,t,i,n);break;case"ribbon":V.ribbon(this.zr,e,t,i,n);break;case"gauge-pointer":V.gaugePointer(this.zr,e,t,i,n);break;case"mark-line":V.markline(this.zr,e,t,i,n);break;case"bezier-curve":case"line":V.line(this.zr,e,t,i,n);break;default:this.zr.addShape(t)}},animationMark:function(e,t,i){for(var i=i||this.shapeList,n=0,a=i.length;a>n;n++)i[n]._mark&&this._animateMod(!1,i[n],e,t,0,!0);this.animationEffect(i)},animationEffect:function(e){if(!e&&this.clearEffectShape(),e=e||this.shapeList,null!=e){var t=h.EFFECT_ZLEVEL;this.canvasSupported&&this.zr.modLayer(t,{motionBlur:!0,lastFrameAlpha:this.option.effectBlendAlpha||h.effectBlendAlpha});for(var i,n=0,a=e.length;a>n;n++)i=e[n],i._mark&&i.effect&&i.effect.show&&U[i._mark]&&(U[i._mark](this.zr,this.effectList,i,t),this.effectList[this.effectList.length-1]._mark=i._mark)}},clearEffectShape:function(e){var t=this.effectList;if(this.zr&&t&&t.length>0){e&&this.zr.modLayer(h.EFFECT_ZLEVEL,{motionBlur:!1}),this.zr.delShape(t);for(var i=0;i<t.length;i++)t[i].effectAnimator&&t[i].effectAnimator.stop()}this.effectList=[]},addMark:function(e,t,i){var n=this.series[e];if(this.selectedMap[n.name]){var a=this.query(this.option,"animationDurationUpdate"),o=this.query(this.option,"animationEasing"),r=n[i].data,s=this.shapeList.length;if(n[i].data=t.data,this["_build"+i.replace("m","M")](e),this.option.animation&&!this.option.renderAsImage)this.animationMark(a,o,this.shapeList.slice(s));else{for(var l=s,h=this.shapeList.length;h>l;l++)this.zr.addShape(this.shapeList[l]);this.zr.refreshNextFrame()}n[i].data=r}},delMark:function(e,t,i){i=i.replace("mark","").replace("large","").toLowerCase();var n=this.series[e];if(this.selectedMap[n.name]){for(var a=!1,o=[this.shapeList,this.effectList],r=2;r--;)for(var s=0,l=o[r].length;l>s;s++)if(o[r][s]._mark==i&&m.get(o[r][s],"seriesIndex")==e&&m.get(o[r][s],"name")==t){this.zr.delShape(o[r][s].id),o[r].splice(s,1),a=!0;break}a&&this.zr.refreshNextFrame()}}},u.inherits(i,p),i}),i("zrender/shape/Circle",["require","./Base","../tool/util"],function(e){"use strict";var t=e("./Base"),i=function(e){t.call(this,e)};return i.prototype={type:"circle",buildPath:function(e,t){e.moveTo(t.x+t.r,t.y),e.arc(t.x,t.y,t.r,0,2*Math.PI,!0)},getRect:function(e){if(e.__rect)return e.__rect;var t;return t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(e.x-e.r-t/2),y:Math.round(e.y-e.r-t/2),width:2*e.r+t,height:2*e.r+t},e.__rect}},e("../tool/util").inherits(i,t),i}),i("echarts/util/accMath",[],function(){function e(e,t){var i=e.toString(),n=t.toString(),a=0;try{a=n.split(".")[1].length}catch(o){}try{a-=i.split(".")[1].length}catch(o){}return(i.replace(".","")-0)/(n.replace(".","")-0)*Math.pow(10,a)}function t(e,t){var i=e.toString(),n=t.toString(),a=0;try{a+=i.split(".")[1].length}catch(o){}try{a+=n.split(".")[1].length}catch(o){}return(i.replace(".","")-0)*(n.replace(".","")-0)/Math.pow(10,a)}function i(e,t){var i=0,n=0;try{i=e.toString().split(".")[1].length}catch(a){}try{n=t.toString().split(".")[1].length}catch(a){}var o=Math.pow(10,Math.max(i,n));return(Math.round(e*o)+Math.round(t*o))/o}function n(e,t){return i(e,-t)}return{accDiv:e,accMul:t,accAdd:i,accSub:n}}),i("echarts/util/shape/Icon",["require","zrender/tool/util","zrender/shape/Star","zrender/shape/Heart","zrender/shape/Droplet","zrender/shape/Image","zrender/shape/Base"],function(e){function t(e,t){var i=t.x,n=t.y,a=t.width/16,o=t.height/16;e.moveTo(i,n+t.height),e.lineTo(i+5*a,n+14*o),e.lineTo(i+t.width,n+3*o),e.lineTo(i+13*a,n),e.lineTo(i+2*a,n+11*o),e.lineTo(i,n+t.height),e.moveTo(i+6*a,n+10*o),e.lineTo(i+14*a,n+2*o),e.moveTo(i+10*a,n+13*o),e.lineTo(i+t.width,n+13*o),e.moveTo(i+13*a,n+10*o),e.lineTo(i+13*a,n+t.height)}function i(e,t){var i=t.x,n=t.y,a=t.width/16,o=t.height/16;e.moveTo(i,n+t.height),e.lineTo(i+5*a,n+14*o),e.lineTo(i+t.width,n+3*o),e.lineTo(i+13*a,n),e.lineTo(i+2*a,n+11*o),e.lineTo(i,n+t.height),e.moveTo(i+6*a,n+10*o),e.lineTo(i+14*a,n+2*o),e.moveTo(i+10*a,n+13*o),e.lineTo(i+t.width,n+13*o)}function n(e,t){var i=t.x,n=t.y,a=t.width/16,o=t.height/16;e.moveTo(i+4*a,n+15*o),e.lineTo(i+9*a,n+13*o),e.lineTo(i+14*a,n+8*o),e.lineTo(i+11*a,n+5*o),e.lineTo(i+6*a,n+10*o),e.lineTo(i+4*a,n+15*o),e.moveTo(i+5*a,n),e.lineTo(i+11*a,n),e.moveTo(i+5*a,n+o),e.lineTo(i+11*a,n+o),e.moveTo(i,n+2*o),e.lineTo(i+t.width,n+2*o),e.moveTo(i,n+5*o),e.lineTo(i+3*a,n+t.height),e.lineTo(i+13*a,n+t.height),e.lineTo(i+t.width,n+5*o)}function a(e,t){var i=t.x,n=t.y,a=t.width/16,o=t.height/16;e.moveTo(i,n+3*o),e.lineTo(i+6*a,n+3*o),e.moveTo(i+3*a,n),e.lineTo(i+3*a,n+6*o),e.moveTo(i+3*a,n+8*o),e.lineTo(i+3*a,n+t.height),e.lineTo(i+t.width,n+t.height),e.lineTo(i+t.width,n+3*o),e.lineTo(i+8*a,n+3*o)}function o(e,t){var i=t.x,n=t.y,a=t.width/16,o=t.height/16;e.moveTo(i+6*a,n),e.lineTo(i+2*a,n+3*o),e.lineTo(i+6*a,n+6*o),e.moveTo(i+2*a,n+3*o),e.lineTo(i+14*a,n+3*o),e.lineTo(i+14*a,n+11*o),e.moveTo(i+2*a,n+5*o),e.lineTo(i+2*a,n+13*o),e.lineTo(i+14*a,n+13*o),e.moveTo(i+10*a,n+10*o),e.lineTo(i+14*a,n+13*o),e.lineTo(i+10*a,n+t.height)}function r(e,t){var i=t.x,n=t.y,a=t.width/16,o=t.height/16,r=t.width/2;e.lineWidth=1.5,e.arc(i+r,n+r,r-a,0,2*Math.PI/3),e.moveTo(i+3*a,n+t.height),e.lineTo(i+0*a,n+12*o),e.lineTo(i+5*a,n+11*o),e.moveTo(i,n+8*o),e.arc(i+r,n+r,r-a,Math.PI,5*Math.PI/3),e.moveTo(i+13*a,n),e.lineTo(i+t.width,n+4*o),e.lineTo(i+11*a,n+5*o)}function s(e,t){var i=t.x,n=t.y,a=t.width/16,o=t.height/16;e.moveTo(i,n),e.lineTo(i,n+t.height),e.lineTo(i+t.width,n+t.height),e.moveTo(i+2*a,n+14*o),e.lineTo(i+7*a,n+6*o),e.lineTo(i+11*a,n+11*o),e.lineTo(i+15*a,n+2*o)}function l(e,t){var i=t.x,n=t.y,a=t.width/16,o=t.height/16;e.moveTo(i,n),e.lineTo(i,n+t.height),e.lineTo(i+t.width,n+t.height),e.moveTo(i+3*a,n+14*o),e.lineTo(i+3*a,n+6*o),e.lineTo(i+4*a,n+6*o),e.lineTo(i+4*a,n+14*o),e.moveTo(i+7*a,n+14*o),e.lineTo(i+7*a,n+2*o),e.lineTo(i+8*a,n+2*o),e.lineTo(i+8*a,n+14*o),e.moveTo(i+11*a,n+14*o),e.lineTo(i+11*a,n+9*o),e.lineTo(i+12*a,n+9*o),e.lineTo(i+12*a,n+14*o)}function h(e,t){var i=t.x,n=t.y,a=t.width-2,o=t.height-2,r=Math.min(a,o)/2;n+=2,e.moveTo(i+r+3,n+r-3),e.arc(i+r+3,n+r-3,r-1,0,-Math.PI/2,!0),e.lineTo(i+r+3,n+r-3),e.moveTo(i+r,n),e.lineTo(i+r,n+r),e.arc(i+r,n+r,r,-Math.PI/2,2*Math.PI,!0),e.lineTo(i+r,n+r),e.lineWidth=1.5}function m(e,t){var i=t.x,n=t.y,a=t.width/16,o=t.height/16;n-=o,e.moveTo(i+1*a,n+2*o),e.lineTo(i+15*a,n+2*o),e.lineTo(i+14*a,n+3*o),e.lineTo(i+2*a,n+3*o),e.moveTo(i+3*a,n+6*o),e.lineTo(i+13*a,n+6*o),e.lineTo(i+12*a,n+7*o),e.lineTo(i+4*a,n+7*o),e.moveTo(i+5*a,n+10*o),e.lineTo(i+11*a,n+10*o),e.lineTo(i+10*a,n+11*o),e.lineTo(i+6*a,n+11*o),e.moveTo(i+7*a,n+14*o),e.lineTo(i+9*a,n+14*o),e.lineTo(i+8*a,n+15*o),e.lineTo(i+7*a,n+15*o)}function V(e,t){var i=t.x,n=t.y,a=t.width,o=t.height,r=a/16,s=o/16,l=2*Math.min(r,s);e.moveTo(i+r+l,n+s+l),e.arc(i+r,n+s,l,Math.PI/4,3*Math.PI),e.lineTo(i+7*r-l,n+6*s-l),e.arc(i+7*r,n+6*s,l,Math.PI/4*5,4*Math.PI),e.arc(i+7*r,n+6*s,l/2,Math.PI/4*5,4*Math.PI),e.moveTo(i+7*r-l/2,n+6*s+l),e.lineTo(i+r+l,n+14*s-l),e.arc(i+r,n+14*s,l,-Math.PI/4,2*Math.PI),e.moveTo(i+7*r+l/2,n+6*s),e.lineTo(i+14*r-l,n+10*s-l/2),e.moveTo(i+16*r,n+10*s),e.arc(i+14*r,n+10*s,l,0,3*Math.PI),e.lineWidth=1.5}function U(e,t){var i=t.x,n=t.y,a=t.width,o=t.height,r=Math.min(a,o)/2;e.moveTo(i+a,n+o/2),e.arc(i+r,n+r,r,0,2*Math.PI),e.arc(i+r,n,r,Math.PI/4,Math.PI/5*4),e.arc(i,n+r,r,-Math.PI/3,Math.PI/3),e.arc(i+a,n+o,r,Math.PI,Math.PI/2*3),e.lineWidth=1.5}function d(e,t){for(var i=t.x,n=t.y,a=t.width,o=t.height,r=Math.round(o/3),s=Math.round((r-2)/2),l=3;l--;)e.rect(i,n+r*l+s,a,2)}function p(e,t){for(var i=t.x,n=t.y,a=t.width,o=t.height,r=Math.round(a/3),s=Math.round((r-2)/2),l=3;l--;)e.rect(i+r*l+s,n,2,o)}function c(e,t){var i=t.x,n=t.y,a=t.width/16;e.moveTo(i+a,n),e.lineTo(i+a,n+t.height),e.lineTo(i+15*a,n+t.height),e.lineTo(i+15*a,n),e.lineTo(i+a,n),e.moveTo(i+3*a,n+3*a),e.lineTo(i+13*a,n+3*a),e.moveTo(i+3*a,n+6*a),e.lineTo(i+13*a,n+6*a),e.moveTo(i+3*a,n+9*a),e.lineTo(i+13*a,n+9*a),e.moveTo(i+3*a,n+12*a),e.lineTo(i+9*a,n+12*a)}function u(e,t){var i=t.x,n=t.y,a=t.width/16,o=t.height/16;e.moveTo(i,n),e.lineTo(i,n+t.height),e.lineTo(i+t.width,n+t.height),e.lineTo(i+t.width,n),e.lineTo(i,n),e.moveTo(i+4*a,n),e.lineTo(i+4*a,n+8*o),e.lineTo(i+12*a,n+8*o),e.lineTo(i+12*a,n),e.moveTo(i+6*a,n+11*o),e.lineTo(i+6*a,n+13*o),e.lineTo(i+10*a,n+13*o),e.lineTo(i+10*a,n+11*o),e.lineTo(i+6*a,n+11*o)}function y(e,t){var i=t.x,n=t.y,a=t.width,o=t.height;e.moveTo(i,n+o/2),e.lineTo(i+a,n+o/2),e.moveTo(i+a/2,n),e.lineTo(i+a/2,n+o)}function g(e,t){var i=t.width/2,n=t.height/2,a=Math.min(i,n);e.moveTo(t.x+i+a,t.y+n),e.arc(t.x+i,t.y+n,a,0,2*Math.PI),e.closePath()}function b(e,t){e.rect(t.x,t.y,t.width,t.height),e.closePath()}function f(e,t){var i=t.width/2,n=t.height/2,a=t.x+i,o=t.y+n,r=Math.min(i,n);e.moveTo(a,o-r),e.lineTo(a+r,o+r),e.lineTo(a-r,o+r),e.lineTo(a,o-r),e.closePath()}function k(e,t){var i=t.width/2,n=t.height/2,a=t.x+i,o=t.y+n,r=Math.min(i,n);e.moveTo(a,o-r),e.lineTo(a+r,o),e.lineTo(a,o+r),e.lineTo(a-r,o),e.lineTo(a,o-r),e.closePath()}function x(e,t){var i=t.x,n=t.y,a=t.width/16;e.moveTo(i+8*a,n),e.lineTo(i+a,n+t.height),e.lineTo(i+8*a,n+t.height/4*3),e.lineTo(i+15*a,n+t.height),e.lineTo(i+8*a,n),e.closePath()}function _(t,i){var n=e("zrender/shape/Star"),a=i.width/2,o=i.height/2;n.prototype.buildPath(t,{x:i.x+a,y:i.y+o,r:Math.min(a,o),n:i.n||5})}function L(t,i){var n=e("zrender/shape/Heart");n.prototype.buildPath(t,{x:i.x+i.width/2,y:i.y+.2*i.height,a:i.width/2,b:.8*i.height})}function W(t,i){var n=e("zrender/shape/Droplet");n.prototype.buildPath(t,{x:i.x+.5*i.width,y:i.y+.5*i.height,a:.5*i.width,b:.8*i.height})}function X(e,t){var i=t.x,n=t.y-t.height/2*1.5,a=t.width/2,o=t.height/2,r=Math.min(a,o);e.arc(i+a,n+o,r,Math.PI/5*4,Math.PI/5),e.lineTo(i+a,n+o+1.5*r),e.closePath()}function v(t,i,n){var a=e("zrender/shape/Image");this._imageShape=this._imageShape||new a({style:{}});for(var o in i)this._imageShape.style[o]=i[o];this._imageShape.brush(t,!1,n)}function w(e){I.call(this,e)}var K=e("zrender/tool/util"),I=e("zrender/shape/Base");return w.prototype={type:"icon",iconLibrary:{mark:t,markUndo:i,markClear:n,dataZoom:a,dataZoomReset:o,restore:r,lineChart:s,barChart:l,pieChart:h,funnelChart:m,forceChart:V,chordChart:U,stackChart:d,tiledChart:p,dataView:c,saveAsImage:u,cross:y,circle:g,rectangle:b,triangle:f,diamond:k,arrow:x,star:_,heart:L,droplet:W,pin:X,image:v},brush:function(t,i,n){var a=i?this.highlightStyle:this.style;a=a||{};var o=a.iconType||this.style.iconType;if("image"===o){var r=e("zrender/shape/Image");r.prototype.brush.call(this,t,i,n)}else{var a=this.beforeBrush(t,i);switch(t.beginPath(),this.buildPath(t,a,n),a.brushType){case"both":t.fill();case"stroke":a.lineWidth>0&&t.stroke();break;default:t.fill()}this.drawText(t,a,this.style),this.afterBrush(t)}},buildPath:function(e,t,i){this.iconLibrary[t.iconType]?this.iconLibrary[t.iconType].call(this,e,t,i):(e.moveTo(t.x,t.y),e.lineTo(t.x+t.width,t.y),e.lineTo(t.x+t.width,t.y+t.height),e.lineTo(t.x,t.y+t.height),e.lineTo(t.x,t.y),e.closePath())},getRect:function(e){return e.__rect?e.__rect:(e.__rect={x:Math.round(e.x),y:Math.round(e.y-("pin"==e.iconType?e.height/2*1.5:0)),width:e.width,height:e.height*("pin"===e.iconType?1.25:1)},e.__rect)},isCover:function(e,t){var i=this.transformCoordToLocal(e,t);e=i[0],t=i[1];var n=this.style.__rect;n||(n=this.style.__rect=this.getRect(this.style));var a=n.height<8||n.width<8?4:0;return e>=n.x-a&&e<=n.x+n.width+a&&t>=n.y-a&&t<=n.y+n.height+a}},K.inherits(w,I),w}),i("echarts/util/shape/MarkLine",["require","zrender/shape/Base","./Icon","zrender/shape/Line","zrender/shape/BezierCurve","zrender/tool/area","zrender/shape/util/dashedLineTo","zrender/tool/util","zrender/tool/curve"],function(e){function t(e){i.call(this,e),this.style.curveness>0&&this.updatePoints(this.style),this.highlightStyle.curveness>0&&this.updatePoints(this.highlightStyle)}var i=e("zrender/shape/Base"),n=e("./Icon"),a=e("zrender/shape/Line"),o=new a({}),r=e("zrender/shape/BezierCurve"),s=new r({}),l=e("zrender/tool/area"),h=e("zrender/shape/util/dashedLineTo"),m=e("zrender/tool/util"),V=e("zrender/tool/curve");return t.prototype={type:"mark-line",brush:function(e,t){var i=this.style;t&&(i=this.getHighlightStyle(i,this.highlightStyle||{})),e.save(),this.setContext(e,i),this.setTransform(e),e.save(),e.beginPath(),this.buildPath(e,i),e.stroke(),e.restore(),this.brushSymbol(e,i,0),this.brushSymbol(e,i,1),this.drawText(e,i,this.style),e.restore()},buildPath:function(e,t){var i=t.lineType||"solid";if(e.moveTo(t.xStart,t.yStart),t.curveness>0){var n=null;switch(i){case"dashed":n=[5,5];break;case"dotted":n=[1,1]}n&&e.setLineDash&&e.setLineDash(n),e.quadraticCurveTo(t.cpX1,t.cpY1,t.xEnd,t.yEnd)}else if("solid"==i)e.lineTo(t.xEnd,t.yEnd);else{var a=(t.lineWidth||1)*("dashed"==t.lineType?5:1);h(e,t.xStart,t.yStart,t.xEnd,t.yEnd,a)}},updatePoints:function(e){var t=e.curveness||0,i=1,n=e.xStart,a=e.yStart,o=e.xEnd,r=e.yEnd,s=(n+o)/2-i*(a-r)*t,l=(a+r)/2-i*(o-n)*t;e.cpX1=s,e.cpY1=l},brushSymbol:function(e,t,i){if("none"!=t.symbol[i]){e.save(),e.beginPath(),e.lineWidth=t.symbolBorder,e.strokeStyle=t.symbolBorderColor;var a=t.symbol[i].replace("empty","").toLowerCase();t.symbol[i].match("empty")&&(e.fillStyle="#fff");var o=t.xStart,r=t.yStart,s=t.xEnd,l=t.yEnd,h=0===i?o:s,m=0===i?r:l,U=t.curveness||0,d=null!=t.symbolRotate[i]?t.symbolRotate[i]-0:0;if(d=d/180*Math.PI,"arrow"==a&&0===d)if(0===U){var p=0===i?-1:1;d=Math.PI/2+Math.atan2(p*(l-r),p*(s-o))}else{var c=t.cpX1,u=t.cpY1,y=V.quadraticDerivativeAt,g=y(o,c,s,i),b=y(r,u,l,i);d=Math.PI/2+Math.atan2(b,g)}e.translate(h,m),0!==d&&e.rotate(d);var f=t.symbolSize[i];n.prototype.buildPath(e,{x:-f,y:-f,width:2*f,height:2*f,iconType:a}),e.closePath(),e.fill(),e.stroke(),e.restore()}},getRect:function(e){return e.curveness>0?s.getRect(e):o.getRect(e),e.__rect},isCover:function(e,t){var i=this.transformCoordToLocal(e,t);return e=i[0],t=i[1],this.isCoverRect(e,t)?this.style.curveness>0?l.isInside(s,this.style,e,t):l.isInside(o,this.style,e,t):!1}},m.inherits(t,i),t}),i("echarts/util/shape/Symbol",["require","zrender/shape/Base","zrender/shape/Polygon","zrender/tool/util","./normalIsCover"],function(e){function t(e){i.call(this,e)}var i=e("zrender/shape/Base"),n=e("zrender/shape/Polygon"),a=new n({}),o=e("zrender/tool/util");return t.prototype={type:"symbol",buildPath:function(e,t){var i=t.pointList,n=i.length;if(0!==n)for(var a,o,r,s,l,h=1e4,m=Math.ceil(n/h),V=i[0]instanceof Array,U=t.size?t.size:2,d=U,p=U/2,c=2*Math.PI,u=0;m>u;u++){e.beginPath(),a=u*h,o=a+h,o=o>n?n:o;for(var y=a;o>y;y++)if(t.random&&(r=t["randomMap"+y%20]/100,d=U*r*r,p=d/2),V?(s=i[y][0],l=i[y][1]):(s=i[y].x,l=i[y].y),3>d)e.rect(s-p,l-p,d,d);else switch(t.iconType){case"circle":e.moveTo(s,l),e.arc(s,l,p,0,c,!0);break;case"diamond":e.moveTo(s,l-p),e.lineTo(s+p/3,l-p/3),e.lineTo(s+p,l),e.lineTo(s+p/3,l+p/3),e.lineTo(s,l+p),e.lineTo(s-p/3,l+p/3),e.lineTo(s-p,l),e.lineTo(s-p/3,l-p/3),e.lineTo(s,l-p);break;default:e.rect(s-p,l-p,d,d)}if(e.closePath(),m-1>u)switch(t.brushType){case"both":e.fill(),t.lineWidth>0&&e.stroke();break;case"stroke":t.lineWidth>0&&e.stroke();break;default:e.fill()}}},getRect:function(e){return e.__rect||a.getRect(e)},isCover:e("./normalIsCover")},o.inherits(t,i),t}),i("zrender/shape/Polyline",["require","./Base","./util/smoothSpline","./util/smoothBezier","./util/dashedLineTo","./Polygon","../tool/util"],function(e){var t=e("./Base"),i=e("./util/smoothSpline"),n=e("./util/smoothBezier"),a=e("./util/dashedLineTo"),o=function(e){this.brushTypeOnly="stroke",this.textPosition="end",t.call(this,e)};return o.prototype={type:"polyline",buildPath:function(e,t){var n=t.pointList;if(!(n.length<2)){var o=Math.min(t.pointList.length,Math.round(t.pointListLength||t.pointList.length));if(t.smooth&&"spline"!==t.smooth){t.controlPointList||this.updateControlPoints(t);var r=t.controlPointList;e.moveTo(n[0][0],n[0][1]);for(var s,l,h,m=0;o-1>m;m++)s=r[2*m],l=r[2*m+1],h=n[m+1],e.bezierCurveTo(s[0],s[1],l[0],l[1],h[0],h[1])}else if("spline"===t.smooth&&(n=i(n),o=n.length),t.lineType&&"solid"!=t.lineType){if("dashed"==t.lineType||"dotted"==t.lineType){var V=(t.lineWidth||1)*("dashed"==t.lineType?5:1);e.moveTo(n[0][0],n[0][1]);for(var m=1;o>m;m++)a(e,n[m-1][0],n[m-1][1],n[m][0],n[m][1],V)}}else{e.moveTo(n[0][0],n[0][1]);for(var m=1;o>m;m++)e.lineTo(n[m][0],n[m][1])}}},updateControlPoints:function(e){e.controlPointList=n(e.pointList,e.smooth,!1,e.smoothConstraint)},getRect:function(t){return e("./Polygon").prototype.getRect(t)}},e("../tool/util").inherits(o,t),o}),i("zrender/shape/ShapeBundle",["require","./Base","../tool/util"],function(e){var t=e("./Base"),i=function(e){t.call(this,e)};return i.prototype={constructor:i,type:"shape-bundle",brush:function(e,t){var i=this.beforeBrush(e,t);e.beginPath();for(var n=0;n<i.shapeList.length;n++){var a=i.shapeList[n],o=a.style;t&&(o=a.getHighlightStyle(o,a.highlightStyle||{},a.brushTypeOnly)),a.buildPath(e,o)}switch(i.brushType){case"both":e.fill();case"stroke":i.lineWidth>0&&e.stroke();break;default:e.fill()}this.drawText(e,i,this.style),this.afterBrush(e)},getRect:function(e){if(e.__rect)return e.__rect;for(var t=1/0,i=-(1/0),n=1/0,a=-(1/0),o=0;o<e.shapeList.length;o++)var r=e.shapeList[o],s=r.getRect(r.style),t=Math.min(s.x,t),n=Math.min(s.y,n),i=Math.max(s.x+s.width,i),a=Math.max(s.y+s.height,a);return e.__rect={x:t,y:n,width:i-t,height:a-n},e.__rect},isCover:function(e,t){var i=this.transformCoordToLocal(e,t);if(e=i[0],t=i[1],this.isCoverRect(e,t))for(var n=0;n<this.style.shapeList.length;n++){var a=this.style.shapeList[n];if(a.isCover(e,t))return!0}return!1}},e("../tool/util").inherits(i,t),i}),i("echarts/util/ecAnimation",["require","zrender/tool/util","zrender/tool/curve","zrender/shape/Polygon"],function(e){function t(e,t,i,n,a){var o,r=i.style.pointList,s=r.length;if(!t){if(o=[],"vertical"!=i._orient)for(var l=r[0][1],h=0;s>h;h++)o[h]=[r[h][0],l];else for(var m=r[0][0],h=0;s>h;h++)o[h]=[m,r[h][1]];"half-smooth-polygon"==i.type&&(o[s-1]=p.clone(r[s-1]),o[s-2]=p.clone(r[s-2])),t={style:{pointList:o}}}o=t.style.pointList;var V=o.length;i.style.pointList=V==s?o:s>V?o.concat(r.slice(V)):o.slice(0,s),e.addShape(i),i.__animating=!0,e.animate(i.id,"style").when(n,{pointList:r}).during(function(){i.updateControlPoints&&i.updateControlPoints(i.style)}).done(function(){i.__animating=!1}).start(a)}function i(e,t){for(var i=arguments.length,n=2;i>n;n++){var a=arguments[n];e.style[a]=t.style[a]}}function n(e,t,n,a,o){var r=n.style;t||(t={position:n.position,style:{x:r.x,y:"vertical"==n._orient?r.y+r.height:r.y,width:"vertical"==n._orient?r.width:0,height:"vertical"!=n._orient?r.height:0}});var s=r.x,l=r.y,h=r.width,m=r.height,V=[n.position[0],n.position[1]];i(n,t,"x","y","width","height"),n.position=t.position,e.addShape(n),(V[0]!=t.position[0]||V[1]!=t.position[1])&&e.animate(n.id,"").when(a,{position:V}).start(o),n.__animating=!0,e.animate(n.id,"style").when(a,{x:s,y:l,width:h,height:m}).done(function(){n.__animating=!1}).start(o)}function a(e,t,i,n,a){if(!t){var o=i.style.y;t={style:{y:[o[0],o[0],o[0],o[0]]}}}var r=i.style.y;i.style.y=t.style.y,e.addShape(i),i.__animating=!0,e.animate(i.id,"style").when(n,{y:r}).done(function(){i.__animating=!1}).start(a)}function o(e,t,i,n,a){var o=i.style.x,r=i.style.y,s=i.style.r0,l=i.style.r;i.__animating=!0,"r"!=i._animationAdd?(i.style.r0=0,i.style.r=0,i.rotation=[2*Math.PI,o,r],e.addShape(i),e.animate(i.id,"style").when(n,{r0:s,r:l}).done(function(){i.__animating=!1}).start(a),e.animate(i.id,"").when(n,{rotation:[0,o,r]}).start(a)):(i.style.r0=i.style.r,e.addShape(i),e.animate(i.id,"style").when(n,{r0:s}).done(function(){i.__animating=!1}).start(a))}function r(e,t,n,a,o){t||(t="r"!=n._animationAdd?{
+style:{startAngle:n.style.startAngle,endAngle:n.style.startAngle}}:{style:{r0:n.style.r}});var r=n.style.startAngle,s=n.style.endAngle;i(n,t,"startAngle","endAngle"),e.addShape(n),n.__animating=!0,e.animate(n.id,"style").when(a,{startAngle:r,endAngle:s}).done(function(){n.__animating=!1}).start(o)}function s(e,t,n,a,o){t||(t={style:{x:"left"==n.style.textAlign?n.style.x+100:n.style.x-100,y:n.style.y}});var r=n.style.x,s=n.style.y;i(n,t,"x","y"),e.addShape(n),n.__animating=!0,e.animate(n.id,"style").when(a,{x:r,y:s}).done(function(){n.__animating=!1}).start(o)}function l(t,i,n,a,o){var r=e("zrender/shape/Polygon").prototype.getRect(n.style),s=r.x+r.width/2,l=r.y+r.height/2;n.scale=[.1,.1,s,l],t.addShape(n),n.__animating=!0,t.animate(n.id,"").when(a,{scale:[1,1,s,l]}).done(function(){n.__animating=!1}).start(o)}function h(e,t,n,a,o){t||(t={style:{source0:0,source1:n.style.source1>0?360:-360,target0:0,target1:n.style.target1>0?360:-360}});var r=n.style.source0,s=n.style.source1,l=n.style.target0,h=n.style.target1;t.style&&i(n,t,"source0","source1","target0","target1"),e.addShape(n),n.__animating=!0,e.animate(n.id,"style").when(a,{source0:r,source1:s,target0:l,target1:h}).done(function(){n.__animating=!1}).start(o)}function m(e,t,i,n,a){t||(t={style:{angle:i.style.startAngle}});var o=i.style.angle;i.style.angle=t.style.angle,e.addShape(i),i.__animating=!0,e.animate(i.id,"style").when(n,{angle:o}).done(function(){i.__animating=!1}).start(a)}function V(e,t,i,a,o,r){if(i.style._x=i.style.x,i.style._y=i.style.y,i.style._width=i.style.width,i.style._height=i.style.height,t)n(e,t,i,a,o);else{var s=i._x||0,l=i._y||0;i.scale=[.01,.01,s,l],e.addShape(i),i.__animating=!0,e.animate(i.id,"").delay(r).when(a,{scale:[1,1,s,l]}).done(function(){i.__animating=!1}).start(o||"QuinticOut")}}function U(e,t,n,a,o){t||(t={style:{xStart:n.style.xStart,yStart:n.style.yStart,xEnd:n.style.xStart,yEnd:n.style.yStart}});var r=n.style.xStart,s=n.style.xEnd,l=n.style.yStart,h=n.style.yEnd;i(n,t,"xStart","xEnd","yStart","yEnd"),e.addShape(n),n.__animating=!0,e.animate(n.id,"style").when(a,{xStart:r,xEnd:s,yStart:l,yEnd:h}).done(function(){n.__animating=!1}).start(o)}function d(e,t,i,n,a){a=a||"QuinticOut",i.__animating=!0,e.addShape(i);var o=i.style,r=function(){i.__animating=!1},s=o.xStart,l=o.yStart,h=o.xEnd,m=o.yEnd;if(o.curveness>0){i.updatePoints(o);var V={p:0},U=o.cpX1,d=o.cpY1,p=[],u=[],y=c.quadraticSubdivide;e.animation.animate(V).when(n,{p:1}).during(function(){y(s,U,h,V.p,p),y(l,d,m,V.p,u),o.cpX1=p[1],o.cpY1=u[1],o.xEnd=p[2],o.yEnd=u[2],e.modShape(i)}).done(r).start(a)}else e.animate(i.id,"style").when(0,{xEnd:s,yEnd:l}).when(n,{xEnd:h,yEnd:m}).done(r).start(a)}var p=e("zrender/tool/util"),c=e("zrender/tool/curve");return{pointList:t,rectangle:n,candle:a,ring:o,sector:r,text:s,polygon:l,ribbon:h,gaugePointer:m,icon:V,line:U,markline:d}}),i("echarts/util/ecEffect",["require","../util/ecData","zrender/shape/Circle","zrender/shape/Image","zrender/tool/curve","../util/shape/Icon","../util/shape/Symbol","zrender/shape/ShapeBundle","zrender/shape/Polyline","zrender/tool/vector","zrender/tool/env"],function(e){function t(e,t,i,n){var a,r=i.effect,l=r.color||i.style.strokeColor||i.style.color,m=r.shadowColor||l,V=r.scaleSize,U=r.bounceDistance,d="undefined"!=typeof r.shadowBlur?r.shadowBlur:V;"image"!==i.type?(a=new h({zlevel:n,style:{brushType:"stroke",iconType:"droplet"!=i.style.iconType?i.style.iconType:"circle",x:d+1,y:d+1,n:i.style.n,width:i.style._width*V,height:i.style._height*V,lineWidth:1,strokeColor:l,shadowColor:m,shadowBlur:d},draggable:!1,hoverable:!1}),"pin"==i.style.iconType&&(a.style.y+=a.style.height/2*1.5),p&&(a.style.image=e.shapeToImage(a,a.style.width+2*d+2,a.style.height+2*d+2).style.image,a=new s({zlevel:a.zlevel,style:a.style,draggable:!1,hoverable:!1}))):a=new s({zlevel:n,style:i.style,draggable:!1,hoverable:!1}),o.clone(i,a),a.position=i.position,t.push(a),e.addShape(a);var c="image"!==i.type?window.devicePixelRatio||1:1,u=(a.style.width/c-i.style._width)/2;a.style.x=i.style._x-u,a.style.y=i.style._y-u,"pin"==i.style.iconType&&(a.style.y-=i.style.height/2*1.5);var y=100*(r.period+10*Math.random());e.modShape(i.id,{invisible:!0});var g=a.style.x+a.style.width/2/c,b=a.style.y+a.style.height/2/c;"scale"===r.type?(e.modShape(a.id,{scale:[.1,.1,g,b]}),e.animate(a.id,"",r.loop).when(y,{scale:[1,1,g,b]}).done(function(){i.effect.show=!1,e.delShape(a.id)}).start()):e.animate(a.id,"style",r.loop).when(y,{y:a.style.y-U}).when(2*y,{y:a.style.y}).done(function(){i.effect.show=!1,e.delShape(a.id)}).start()}function i(e,t,i,n){var a=i.effect,o=a.color||i.style.strokeColor||i.style.color,r=a.scaleSize,s=a.shadowColor||o,l="undefined"!=typeof a.shadowBlur?a.shadowBlur:2*r,h=window.devicePixelRatio||1,V=new m({zlevel:n,position:i.position,scale:i.scale,style:{pointList:i.style.pointList,iconType:i.style.iconType,color:o,strokeColor:o,shadowColor:s,shadowBlur:l*h,random:!0,brushType:"fill",lineWidth:1,size:i.style.size},draggable:!1,hoverable:!1});t.push(V),e.addShape(V),e.modShape(i.id,{invisible:!0});for(var U=Math.round(100*a.period),d={},p={},c=0;20>c;c++)V.style["randomMap"+c]=0,d={},d["randomMap"+c]=100,p={},p["randomMap"+c]=0,V.style["randomMap"+c]=100*Math.random(),e.animate(V.id,"style",!0).when(U,d).when(2*U,p).when(3*U,d).when(4*U,d).delay(Math.random()*U*c).start()}function n(e,t,i,n,a){var s=i.effect,h=i.style,m=s.color||h.strokeColor||h.color,V=s.shadowColor||h.strokeColor||m,c=h.lineWidth*s.scaleSize,u="undefined"!=typeof s.shadowBlur?s.shadowBlur:c,y=new r({zlevel:n,style:{x:u,y:u,r:c,color:m,shadowColor:V,shadowBlur:u},hoverable:!1}),g=0;if(p&&!a){var n=y.zlevel;y=e.shapeToImage(y,2*(c+u),2*(c+u)),y.zlevel=n,y.hoverable=!1,g=u}a||(o.clone(i,y),y.position=i.position,t.push(y),e.addShape(y));var b=function(){a||(i.effect.show=!1,e.delShape(y.id)),y.effectAnimator=null};if(i instanceof U){for(var f=[0],k=0,x=h.pointList,_=h.controlPointList,L=1;L<x.length;L++){if(_){var W=_[2*(L-1)],X=_[2*(L-1)+1];k+=d.dist(x[L-1],W)+d.dist(W,X)+d.dist(X,x[L])}else k+=d.dist(x[L-1],x[L]);f.push(k)}for(var v={p:0},w=e.animation.animate(v,{loop:s.loop}),L=0;L<f.length;L++)w.when(f[L]*s.period,{p:L});w.during(function(){var t,i,n=Math.floor(v.p);if(n==x.length-1)t=x[n][0],i=x[n][1];else{var o=v.p-n,r=x[n],s=x[n+1];if(_){var h=_[2*n],m=_[2*n+1];t=l.cubicAt(r[0],h[0],m[0],s[0],o),i=l.cubicAt(r[1],h[1],m[1],s[1],o)}else t=(s[0]-r[0])*o+r[0],i=(s[1]-r[1])*o+r[1]}y.style.x=t,y.style.y=i,a||e.modShape(y)}).done(b).start(),w.duration=k*s.period,y.effectAnimator=w}else{var K=h.xStart-g,I=h.yStart-g,J=h.xEnd-g,C=h.yEnd-g;y.style.x=K,y.style.y=I;var S=(J-K)*(J-K)+(C-I)*(C-I),E=Math.round(Math.sqrt(Math.round(S*s.period*s.period)));if(i.style.curveness>0){var F=h.cpX1-g,T=h.cpY1-g;y.effectAnimator=e.animation.animate(y,{loop:s.loop}).when(E,{p:1}).during(function(t,i){y.style.x=l.quadraticAt(K,F,J,i),y.style.y=l.quadraticAt(I,T,C,i),a||e.modShape(y)}).done(b).start()}else y.effectAnimator=e.animation.animate(y.style,{loop:s.loop}).when(E,{x:J,y:C}).during(function(){a||e.modShape(y)}).done(b).start();y.effectAnimator.duration=E}return y}function a(e,t,i,a){var o=new V({style:{shapeList:[]},zlevel:a,hoverable:!1}),r=i.style.shapeList,s=i.effect;o.position=i.position;for(var l=0,h=[],m=0;m<r.length;m++){r[m].effect=s;var U=n(e,null,r[m],a,!0),d=U.effectAnimator;o.style.shapeList.push(U),d.duration>l&&(l=d.duration),0===m&&(o.style.color=U.style.color,o.style.shadowBlur=U.style.shadowBlur,o.style.shadowColor=U.style.shadowColor),h.push(d)}t.push(o),e.addShape(o);var p=function(){for(var e=0;e<h.length;e++)h[e].stop()};if(l){o.__dummy=0;var c=e.animate(o.id,"",s.loop).when(l,{__dummy:1}).during(function(){e.modShape(o)}).done(function(){i.effect.show=!1,e.delShape(o.id)}).start(),u=c.stop;c.stop=function(){p(),u.call(this)}}}var o=e("../util/ecData"),r=e("zrender/shape/Circle"),s=e("zrender/shape/Image"),l=e("zrender/tool/curve"),h=e("../util/shape/Icon"),m=e("../util/shape/Symbol"),V=e("zrender/shape/ShapeBundle"),U=e("zrender/shape/Polyline"),d=e("zrender/tool/vector"),p=e("zrender/tool/env").canvasSupported;return{point:t,largePoint:i,line:n,largeLine:a}}),i("echarts/component/base",["require","../config","../util/ecData","../util/ecQuery","../util/number","zrender/tool/util","zrender/tool/env"],function(e){function t(e,t,a,o,r){this.ecTheme=e,this.messageCenter=t,this.zr=a,this.option=o,this.series=o.series,this.myChart=r,this.component=r.component,this.shapeList=[],this.effectList=[];var s=this;s._onlegendhoverlink=function(e){if(s.legendHoverLink)for(var t,a=e.target,o=s.shapeList.length-1;o>=0;o--)t=s.type==i.CHART_TYPE_PIE||s.type==i.CHART_TYPE_FUNNEL?n.get(s.shapeList[o],"name"):(n.get(s.shapeList[o],"series")||{}).name,t!=a||s.shapeList[o].invisible||s.shapeList[o].__animating||s.zr.addHoverShape(s.shapeList[o])},t&&t.bind(i.EVENT.LEGEND_HOVERLINK,this._onlegendhoverlink)}var i=e("../config"),n=e("../util/ecData"),a=e("../util/ecQuery"),o=e("../util/number"),r=e("zrender/tool/util");return t.prototype={canvasSupported:e("zrender/tool/env").canvasSupported,_getZ:function(e){if(null!=this[e])return this[e];var t=this.ecTheme[this.type];return t&&null!=t[e]?t[e]:(t=i[this.type],t&&null!=t[e]?t[e]:0)},getZlevelBase:function(){return this._getZ("zlevel")},getZBase:function(){return this._getZ("z")},reformOption:function(e){return e=r.merge(r.merge(e||{},r.clone(this.ecTheme[this.type]||{})),r.clone(i[this.type]||{})),this.z=e.z,this.zlevel=e.zlevel,e},reformCssArray:function(e){if(!(e instanceof Array))return[e,e,e,e];switch(e.length+""){case"4":return e;case"3":return[e[0],e[1],e[2],e[1]];case"2":return[e[0],e[1],e[0],e[1]];case"1":return[e[0],e[0],e[0],e[0]];case"0":return[0,0,0,0]}},getShapeById:function(e){for(var t=0,i=this.shapeList.length;i>t;t++)if(this.shapeList[t].id===e)return this.shapeList[t];return null},getFont:function(e){var t=this.getTextStyle(r.clone(e));return t.fontStyle+" "+t.fontWeight+" "+t.fontSize+"px "+t.fontFamily},getTextStyle:function(e){return r.merge(r.merge(e||{},this.ecTheme.textStyle),i.textStyle)},getItemStyleColor:function(e,t,i,n){return"function"==typeof e?e.call(this.myChart,{seriesIndex:t,series:this.series[t],dataIndex:i,data:n}):e},getDataFromOption:function(e,t){return null!=e?null!=e.value?e.value:e:t},subPixelOptimize:function(e,t){return e=t%2===1?Math.floor(e)+.5:Math.round(e)},resize:function(){this.refresh&&this.refresh(),this.clearEffectShape&&this.clearEffectShape(!0);var e=this;setTimeout(function(){e.animationEffect&&e.animationEffect()},200)},clear:function(){this.clearEffectShape&&this.clearEffectShape(),this.zr&&this.zr.delShape(this.shapeList),this.shapeList=[]},dispose:function(){this.onbeforDispose&&this.onbeforDispose(),this.clear(),this.shapeList=null,this.effectList=null,this.messageCenter&&this.messageCenter.unbind(i.EVENT.LEGEND_HOVERLINK,this._onlegendhoverlink),this.onafterDispose&&this.onafterDispose()},query:a.query,deepQuery:a.deepQuery,deepMerge:a.deepMerge,parsePercent:o.parsePercent,parseCenter:o.parseCenter,parseRadius:o.parseRadius,numAddCommas:o.addCommas,getPrecision:o.getPrecision},t}),i("echarts/layout/EdgeBundling",["require","../data/KDTree","zrender/tool/vector"],function(e){function t(e,t){e=e.array,t=t.array;var i=t[0]-e[0],n=t[1]-e[1],a=t[2]-e[2],o=t[3]-e[3];return i*i+n*n+a*a+o*o}function i(e){this.points=[e.mp0,e.mp1],this.group=e}function n(e){var t=e.points;t[0][1]<t[1][1]||e instanceof i?(this.array=[t[0][0],t[0][1],t[1][0],t[1][1]],this._startPoint=t[0],this._endPoint=t[1]):(this.array=[t[1][0],t[1][1],t[0][0],t[0][1]],this._startPoint=t[1],this._endPoint=t[0]),this.ink=m(t[0],t[1]),this.edge=e,this.group=null}function a(){this.edgeList=[],this.mp0=l(),this.mp1=l(),this.ink=0}function o(){this.maxNearestEdge=6,this.maxTurningAngle=Math.PI/4,this.maxIteration=20}var r=e("../data/KDTree"),s=e("zrender/tool/vector"),l=s.create,h=s.distSquare,m=s.dist,V=s.copy,U=s.clone;return n.prototype.getStartPoint=function(){return this._startPoint},n.prototype.getEndPoint=function(){return this._endPoint},a.prototype.addEdge=function(e){e.group=this,this.edgeList.push(e)},a.prototype.removeEdge=function(e){e.group=null,this.edgeList.splice(this.edgeList.indexOf(e),1)},o.prototype={constructor:o,run:function(e){function t(e,t){return h(e,t)<1e-10}function n(e,i){for(var n=[],a=0,o=0;o<e.length;o++)a>0&&t(e[o],n[a-1])||(n[a++]=U(e[o]));return i[0]&&!t(n[0],i[0])&&(n=n.reverse()),n}for(var a=this._iterate(e),o=0;o++<this.maxIteration;){for(var r=[],s=0;s<a.groups.length;s++)r.push(new i(a.groups[s]));var l=this._iterate(r);if(l.savedInk<=0)break;a=l}var m=[],V=function(e,t){for(var a,o=0;o<e.length;o++){var r=e[o];if(r.edgeList[0]&&r.edgeList[0].edge instanceof i){for(var s=[],l=0;l<r.edgeList.length;l++)s.push(r.edgeList[l].edge.group);a=t?t.slice():[],a.unshift(r.mp0),a.push(r.mp1),V(s,a)}else for(var l=0;l<r.edgeList.length;l++){var h=r.edgeList[l];a=t?t.slice():[],a.unshift(r.mp0),a.push(r.mp1),a.unshift(h.getStartPoint()),a.push(h.getEndPoint()),m.push({points:n(a,h.edge.points),rawEdge:h.edge})}}};return V(a.groups),m},_iterate:function(e){for(var i=[],o=[],s=0,h=0;h<e.length;h++){var m=new n(e[h]);i.push(m)}for(var U=new r(i,4),d=[],p=l(),c=l(),u=0,y=l(),g=l(),b=0,h=0;h<i.length;h++){var m=i[h];if(!m.group){U.nearestN(m,this.maxNearestEdge,t,d);for(var f=0,k=null,x=null,_=0;_<d.length;_++){var L=d[_],W=0;L.group?L.group!==x&&(x=L.group,u=this._calculateGroupEdgeInk(L.group,m,p,c),W=L.group.ink+m.ink-u):(u=this._calculateEdgeEdgeInk(m,L,p,c),W=L.ink+m.ink-u),W>f&&(f=W,k=L,V(g,c),V(y,p),b=u)}if(k){s+=f;var X;k.group||(X=new a,o.push(X),X.addEdge(k)),X=k.group,V(X.mp0,y),V(X.mp1,g),X.ink=b,k.group.addEdge(m)}else{var X=new a;o.push(X),V(X.mp0,m.getStartPoint()),V(X.mp1,m.getEndPoint()),X.ink=m.ink,X.addEdge(m)}}}return{groups:o,edges:i,savedInk:s}},_calculateEdgeEdgeInk:function(){var e=[],t=[];return function(i,n,a,o){e[0]=i.getStartPoint(),e[1]=n.getStartPoint(),t[0]=i.getEndPoint(),t[1]=n.getEndPoint(),this._calculateMeetPoints(e,t,a,o);var r=m(e[0],a)+m(a,o)+m(o,t[0])+m(e[1],a)+m(o,t[1]);return r}}(),_calculateGroupEdgeInk:function(e,t,i,n){for(var a=[],o=[],r=0;r<e.edgeList.length;r++){var s=e.edgeList[r];a.push(s.getStartPoint()),o.push(s.getEndPoint())}a.push(t.getStartPoint()),o.push(t.getEndPoint()),this._calculateMeetPoints(a,o,i,n);for(var l=m(i,n),r=0;r<a.length;r++)l+=m(a[r],i)+m(o[r],n);return l},_calculateMeetPoints:function(){var e=l(),t=l();return function(i,n,a,o){s.set(e,0,0),s.set(t,0,0);for(var r=i.length,l=0;r>l;l++)s.add(e,e,i[l]);s.scale(e,e,1/r),r=n.length;for(var l=0;r>l;l++)s.add(t,t,n[l]);s.scale(t,t,1/r),this._limitTurningAngle(i,e,t,a),this._limitTurningAngle(n,t,e,o)}}(),_limitTurningAngle:function(){var e=l(),t=l(),i=l(),n=l();return function(a,o,r,l){var V=Math.cos(this.maxTurningAngle),U=Math.tan(this.maxTurningAngle);s.sub(e,o,r),s.normalize(e,e),s.copy(l,o);for(var d=0,p=0;p<a.length;p++){var c=a[p];s.sub(t,c,o);var u=s.len(t);s.scale(t,t,1/u);var y=s.dot(t,e);if(V>y){s.scaleAndAdd(i,o,e,u*y);var g=m(i,c),b=g/U;s.scaleAndAdd(n,i,e,-b);var f=h(n,o);f>d&&(d=f,s.copy(l,n))}}}}()},o}),i("zrender/shape/Star",["require","../tool/math","./Base","../tool/util"],function(e){var t=e("../tool/math"),i=t.sin,n=t.cos,a=Math.PI,o=e("./Base"),r=function(e){o.call(this,e)};return r.prototype={type:"star",buildPath:function(e,t){var o=t.n;if(o&&!(2>o)){var r=t.x,s=t.y,l=t.r,h=t.r0;null==h&&(h=o>4?l*n(2*a/o)/n(a/o):l/3);var m=a/o,V=-a/2,U=r+l*n(V),d=s+l*i(V);V+=m;var p=t.pointList=[];p.push([U,d]);for(var c,u=0,y=2*o-1;y>u;u++)c=u%2===0?h:l,p.push([r+c*n(V),s+c*i(V)]),V+=m;p.push([U,d]),e.moveTo(p[0][0],p[0][1]);for(var u=0;u<p.length;u++)e.lineTo(p[u][0],p[u][1]);e.closePath()}},getRect:function(e){if(e.__rect)return e.__rect;var t;return t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(e.x-e.r-t/2),y:Math.round(e.y-e.r-t/2),width:2*e.r+t,height:2*e.r+t},e.__rect}},e("../tool/util").inherits(r,o),r}),i("zrender/shape/Heart",["require","./Base","./util/PathProxy","../tool/area","../tool/util"],function(e){"use strict";var t=e("./Base"),i=e("./util/PathProxy"),n=e("../tool/area"),a=function(e){t.call(this,e),this._pathProxy=new i};return a.prototype={type:"heart",buildPath:function(e,t){var n=this._pathProxy||new i;n.begin(e),n.moveTo(t.x,t.y),n.bezierCurveTo(t.x+t.a/2,t.y-2*t.b/3,t.x+2*t.a,t.y+t.b/3,t.x,t.y+t.b),n.bezierCurveTo(t.x-2*t.a,t.y+t.b/3,t.x-t.a/2,t.y-2*t.b/3,t.x,t.y),n.closePath()},getRect:function(e){return e.__rect?e.__rect:(this._pathProxy.isEmpty()||this.buildPath(null,e),this._pathProxy.fastBoundingRect())},isCover:function(e,t){var i=this.transformCoordToLocal(e,t);return e=i[0],t=i[1],this.isCoverRect(e,t)?n.isInsidePath(this._pathProxy.pathCommands,this.style.lineWidth,this.style.brushType,e,t):void 0}},e("../tool/util").inherits(a,t),a}),i("zrender/shape/Droplet",["require","./Base","./util/PathProxy","../tool/area","../tool/util"],function(e){"use strict";var t=e("./Base"),i=e("./util/PathProxy"),n=e("../tool/area"),a=function(e){t.call(this,e),this._pathProxy=new i};return a.prototype={type:"droplet",buildPath:function(e,t){var n=this._pathProxy||new i;n.begin(e),n.moveTo(t.x,t.y+t.a),n.bezierCurveTo(t.x+t.a,t.y+t.a,t.x+3*t.a/2,t.y-t.a/3,t.x,t.y-t.b),n.bezierCurveTo(t.x-3*t.a/2,t.y-t.a/3,t.x-t.a,t.y+t.a,t.x,t.y+t.a),n.closePath()},getRect:function(e){return e.__rect?e.__rect:(this._pathProxy.isEmpty()||this.buildPath(null,e),this._pathProxy.fastBoundingRect())},isCover:function(e,t){var i=this.transformCoordToLocal(e,t);return e=i[0],t=i[1],this.isCoverRect(e,t)?n.isInsidePath(this._pathProxy.pathCommands,this.style.lineWidth,this.style.brushType,e,t):void 0}},e("../tool/util").inherits(a,t),a}),i("zrender/tool/math",[],function(){function e(e,t){return Math.sin(t?e*a:e)}function t(e,t){return Math.cos(t?e*a:e)}function i(e){return e*a}function n(e){return e/a}var a=Math.PI/180;return{sin:e,cos:t,degreeToRadian:i,radianToDegree:n}}),i("zrender/shape/util/PathProxy",["require","../../tool/vector"],function(e){var t=e("../../tool/vector"),i=function(e,t){this.command=e,this.points=t||null},n=function(){this.pathCommands=[],this._ctx=null,this._min=[],this._max=[]};return n.prototype.fastBoundingRect=function(){var e=this._min,i=this._max;e[0]=e[1]=1/0,i[0]=i[1]=-(1/0);for(var n=0;n<this.pathCommands.length;n++){var a=this.pathCommands[n],o=a.points;switch(a.command){case"M":t.min(e,e,o),t.max(i,i,o);break;case"L":t.min(e,e,o),t.max(i,i,o);break;case"C":for(var r=0;6>r;r+=2)e[0]=Math.min(e[0],e[0],o[r]),e[1]=Math.min(e[1],e[1],o[r+1]),i[0]=Math.max(i[0],i[0],o[r]),i[1]=Math.max(i[1],i[1],o[r+1]);break;case"Q":for(var r=0;4>r;r+=2)e[0]=Math.min(e[0],e[0],o[r]),e[1]=Math.min(e[1],e[1],o[r+1]),i[0]=Math.max(i[0],i[0],o[r]),i[1]=Math.max(i[1],i[1],o[r+1]);break;case"A":var s=o[0],l=o[1],h=o[2],m=o[3];e[0]=Math.min(e[0],e[0],s-h),e[1]=Math.min(e[1],e[1],l-m),i[0]=Math.max(i[0],i[0],s+h),i[1]=Math.max(i[1],i[1],l+m)}}return{x:e[0],y:e[1],width:i[0]-e[0],height:i[1]-e[1]}},n.prototype.begin=function(e){return this._ctx=e||null,this.pathCommands.length=0,this},n.prototype.moveTo=function(e,t){return this.pathCommands.push(new i("M",[e,t])),this._ctx&&this._ctx.moveTo(e,t),this},n.prototype.lineTo=function(e,t){return this.pathCommands.push(new i("L",[e,t])),this._ctx&&this._ctx.lineTo(e,t),this},n.prototype.bezierCurveTo=function(e,t,n,a,o,r){return this.pathCommands.push(new i("C",[e,t,n,a,o,r])),this._ctx&&this._ctx.bezierCurveTo(e,t,n,a,o,r),this},n.prototype.quadraticCurveTo=function(e,t,n,a){return this.pathCommands.push(new i("Q",[e,t,n,a])),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,a),this},n.prototype.arc=function(e,t,n,a,o,r){return this.pathCommands.push(new i("A",[e,t,n,n,a,o-a,0,r?0:1])),this._ctx&&this._ctx.arc(e,t,n,a,o,r),this},n.prototype.arcTo=function(e,t,i,n,a){return this._ctx&&this._ctx.arcTo(e,t,i,n,a),this},n.prototype.rect=function(e,t,i,n){return this._ctx&&this._ctx.rect(e,t,i,n),this},n.prototype.closePath=function(){return this.pathCommands.push(new i("z")),this._ctx&&this._ctx.closePath(),this},n.prototype.isEmpty=function(){return 0===this.pathCommands.length},n.PathSegment=i,n}),i("zrender/shape/Line",["require","./Base","./util/dashedLineTo","../tool/util"],function(e){var t=e("./Base"),i=e("./util/dashedLineTo"),n=function(e){this.brushTypeOnly="stroke",this.textPosition="end",t.call(this,e)};return n.prototype={type:"line",buildPath:function(e,t){if(t.lineType&&"solid"!=t.lineType){if("dashed"==t.lineType||"dotted"==t.lineType){var n=(t.lineWidth||1)*("dashed"==t.lineType?5:1);i(e,t.xStart,t.yStart,t.xEnd,t.yEnd,n)}}else e.moveTo(t.xStart,t.yStart),e.lineTo(t.xEnd,t.yEnd)},getRect:function(e){if(e.__rect)return e.__rect;var t=e.lineWidth||1;return e.__rect={x:Math.min(e.xStart,e.xEnd)-t,y:Math.min(e.yStart,e.yEnd)-t,width:Math.abs(e.xStart-e.xEnd)+t,height:Math.abs(e.yStart-e.yEnd)+t},e.__rect}},e("../tool/util").inherits(n,t),n}),i("zrender/shape/BezierCurve",["require","./Base","../tool/util"],function(e){"use strict";var t=e("./Base"),i=function(e){this.brushTypeOnly="stroke",this.textPosition="end",t.call(this,e)};return i.prototype={type:"bezier-curve",buildPath:function(e,t){e.moveTo(t.xStart,t.yStart),"undefined"!=typeof t.cpX2&&"undefined"!=typeof t.cpY2?e.bezierCurveTo(t.cpX1,t.cpY1,t.cpX2,t.cpY2,t.xEnd,t.yEnd):e.quadraticCurveTo(t.cpX1,t.cpY1,t.xEnd,t.yEnd)},getRect:function(e){if(e.__rect)return e.__rect;var t=Math.min(e.xStart,e.xEnd,e.cpX1),i=Math.min(e.yStart,e.yEnd,e.cpY1),n=Math.max(e.xStart,e.xEnd,e.cpX1),a=Math.max(e.yStart,e.yEnd,e.cpY1),o=e.cpX2,r=e.cpY2;"undefined"!=typeof o&&"undefined"!=typeof r&&(t=Math.min(t,o),i=Math.min(i,r),n=Math.max(n,o),a=Math.max(a,r));var s=e.lineWidth||1;return e.__rect={x:t-s,y:i-s,width:n-t+s,height:a-i+s},e.__rect}},e("../tool/util").inherits(i,t),i}),i("zrender/shape/util/dashedLineTo",[],function(){var e=[5,5];return function(t,i,n,a,o,r){if(t.setLineDash)return e[0]=e[1]=r,t.setLineDash(e),t.moveTo(i,n),void t.lineTo(a,o);r="number"!=typeof r?5:r;var s=a-i,l=o-n,h=Math.floor(Math.sqrt(s*s+l*l)/r);s/=h,l/=h;for(var m=!0,V=0;h>V;++V)m?t.moveTo(i,n):t.lineTo(i,n),m=!m,i+=s,n+=l;t.lineTo(a,o)}}),i("zrender/shape/Polygon",["require","./Base","./util/smoothSpline","./util/smoothBezier","./util/dashedLineTo","../tool/util"],function(e){var t=e("./Base"),i=e("./util/smoothSpline"),n=e("./util/smoothBezier"),a=e("./util/dashedLineTo"),o=function(e){t.call(this,e)};return o.prototype={type:"polygon",buildPath:function(e,t){var o=t.pointList;if(!(o.length<2)){if(t.smooth&&"spline"!==t.smooth){var r=n(o,t.smooth,!0,t.smoothConstraint);e.moveTo(o[0][0],o[0][1]);for(var s,l,h,m=o.length,V=0;m>V;V++)s=r[2*V],l=r[2*V+1],h=o[(V+1)%m],e.bezierCurveTo(s[0],s[1],l[0],l[1],h[0],h[1])}else if("spline"===t.smooth&&(o=i(o,!0)),t.lineType&&"solid"!=t.lineType){if("dashed"==t.lineType||"dotted"==t.lineType){var U=t._dashLength||(t.lineWidth||1)*("dashed"==t.lineType?5:1);t._dashLength=U,e.moveTo(o[0][0],o[0][1]);for(var V=1,d=o.length;d>V;V++)a(e,o[V-1][0],o[V-1][1],o[V][0],o[V][1],U);a(e,o[o.length-1][0],o[o.length-1][1],o[0][0],o[0][1],U)}}else{e.moveTo(o[0][0],o[0][1]);for(var V=1,d=o.length;d>V;V++)e.lineTo(o[V][0],o[V][1]);e.lineTo(o[0][0],o[0][1])}e.closePath()}},getRect:function(e){if(e.__rect)return e.__rect;for(var t=Number.MAX_VALUE,i=Number.MIN_VALUE,n=Number.MAX_VALUE,a=Number.MIN_VALUE,o=e.pointList,r=0,s=o.length;s>r;r++)o[r][0]<t&&(t=o[r][0]),o[r][0]>i&&(i=o[r][0]),o[r][1]<n&&(n=o[r][1]),o[r][1]>a&&(a=o[r][1]);var l;return l="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(t-l/2),y:Math.round(n-l/2),width:i-t+l,height:a-n+l},e.__rect}},e("../tool/util").inherits(o,t),o}),i("echarts/util/shape/normalIsCover",[],function(){return function(e,t){var i=this.transformCoordToLocal(e,t);return e=i[0],t=i[1],this.isCoverRect(e,t)}}),i("zrender/shape/util/smoothSpline",["require","../../tool/vector"],function(e){function t(e,t,i,n,a,o,r){var s=.5*(i-e),l=.5*(n-t);return(2*(t-i)+s+l)*r+(-3*(t-i)-2*s-l)*o+s*a+t}var i=e("../../tool/vector");return function(e,n){for(var a=e.length,o=[],r=0,s=1;a>s;s++)r+=i.distance(e[s-1],e[s]);var l=r/5;l=a>l?a:l;for(var s=0;l>s;s++){var h,m,V,U=s/(l-1)*(n?a:a-1),d=Math.floor(U),p=U-d,c=e[d%a];n?(h=e[(d-1+a)%a],m=e[(d+1)%a],V=e[(d+2)%a]):(h=e[0===d?d:d-1],m=e[d>a-2?a-1:d+1],V=e[d>a-3?a-1:d+2]);var u=p*p,y=p*u;o.push([t(h[0],c[0],m[0],V[0],p,u,y),t(h[1],c[1],m[1],V[1],p,u,y)])}return o}}),i("zrender/shape/util/smoothBezier",["require","../../tool/vector"],function(e){var t=e("../../tool/vector");return function(e,i,n,a){var o,r,s,l,h=[],m=[],V=[],U=[],d=!!a;if(d){s=[1/0,1/0],l=[-(1/0),-(1/0)];for(var p=0,c=e.length;c>p;p++)t.min(s,s,e[p]),t.max(l,l,e[p]);t.min(s,s,a[0]),t.max(l,l,a[1])}for(var p=0,c=e.length;c>p;p++){var o,r,u=e[p];if(n)o=e[p?p-1:c-1],r=e[(p+1)%c];else{if(0===p||p===c-1){h.push(t.clone(e[p]));continue}o=e[p-1],r=e[p+1]}t.sub(m,r,o),t.scale(m,m,i);var y=t.distance(u,o),g=t.distance(u,r),b=y+g;0!==b&&(y/=b,g/=b),t.scale(V,m,-y),t.scale(U,m,g);var f=t.add([],u,V),k=t.add([],u,U);d&&(t.max(f,f,s),t.min(f,f,l),t.max(k,k,s),t.min(k,k,l)),h.push(f),h.push(k)}return n&&h.push(t.clone(h.shift())),h}}),i("echarts/util/ecQuery",["require","zrender/tool/util"],function(e){function t(e,t){if("undefined"!=typeof e){if(!t)return e;t=t.split(".");for(var i=t.length,n=0;i>n;){if(e=e[t[n]],"undefined"==typeof e)return;n++}return e}}function i(e,i){for(var n,a=0,o=e.length;o>a;a++)if(n=t(e[a],i),"undefined"!=typeof n)return n}function n(e,i){for(var n,o=e.length;o--;){var r=t(e[o],i);"undefined"!=typeof r&&("undefined"==typeof n?n=a.clone(r):a.merge(n,r,!0))}return n}var a=e("zrender/tool/util");return{query:t,deepQuery:i,deepMerge:n}}),i("echarts/util/number",[],function(){function e(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")}function t(t,i){return"string"==typeof t?e(t).match(/%$/)?parseFloat(t)/100*i:parseFloat(t):t}function i(e,i){return[t(i[0],e.getWidth()),t(i[1],e.getHeight())]}function n(e,i){i instanceof Array||(i=[0,i]);var n=Math.min(e.getWidth(),e.getHeight())/2;return[t(i[0],n),t(i[1],n)]}function a(e){return isNaN(e)?"-":(e=(e+"").split("."),e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:""))}function o(e){for(var t=1,i=0;Math.round(e*t)/t!==e;)t*=10,i++;return i}return{parsePercent:t,parseCenter:i,parseRadius:n,addCommas:a,getPrecision:o}}),i("echarts/data/KDTree",["require","./quickSelect"],function(e){function t(e,t){this.left=null,this.right=null,this.axis=e,this.data=t}var i=e("./quickSelect"),n=function(e,t){e.length&&(t||(t=e[0].array.length),this.dimension=t,this.root=this._buildTree(e,0,e.length-1,0),this._stack=[],this._nearstNList=[])};return n.prototype._buildTree=function(e,n,a,o){if(n>a)return null;var r=Math.floor((n+a)/2);r=i(e,n,a,r,function(e,t){return e.array[o]-t.array[o]});var s=e[r],l=new t(o,s);return o=(o+1)%this.dimension,a>n&&(l.left=this._buildTree(e,n,r-1,o),l.right=this._buildTree(e,r+1,a,o)),l},n.prototype.nearest=function(e,t){var i=this.root,n=this._stack,a=0,o=1/0,r=null;for(i.data!==e&&(o=t(i.data,e),r=i),e.array[i.axis]<i.data.array[i.axis]?(i.right&&(n[a++]=i.right),i.left&&(n[a++]=i.left)):(i.left&&(n[a++]=i.left),i.right&&(n[a++]=i.right));a--;){i=n[a];var s=e.array[i.axis]-i.data.array[i.axis],l=0>s,h=!1;s*=s,o>s&&(s=t(i.data,e),o>s&&i.data!==e&&(o=s,r=i),h=!0),l?(h&&i.right&&(n[a++]=i.right),i.left&&(n[a++]=i.left)):(h&&i.left&&(n[a++]=i.left),i.right&&(n[a++]=i.right))}return r.data},n.prototype._addNearest=function(e,t,i){for(var n=this._nearstNList,a=e-1;a>0&&!(t>=n[a-1].dist);a--)n[a].dist=n[a-1].dist,n[a].node=n[a-1].node;n[a].dist=t,n[a].node=i},n.prototype.nearestN=function(e,t,i,n){if(0>=t)return n.length=0,n;for(var a=this.root,o=this._stack,r=0,s=this._nearstNList,l=0;t>l;l++)s[l]||(s[l]={}),s[l].dist=0,s[l].node=null;var h=i(a.data,e),m=0;for(a.data!==e&&(m++,this._addNearest(m,h,a)),e.array[a.axis]<a.data.array[a.axis]?(a.right&&(o[r++]=a.right),a.left&&(o[r++]=a.left)):(a.left&&(o[r++]=a.left),a.right&&(o[r++]=a.right));r--;){a=o[r];var h=e.array[a.axis]-a.data.array[a.axis],V=0>h,U=!1;h*=h,(t>m||h<s[m-1].dist)&&(h=i(a.data,e),(t>m||h<s[m-1].dist)&&a.data!==e&&(t>m&&m++,this._addNearest(m,h,a)),U=!0),V?(U&&a.right&&(o[r++]=a.right),a.left&&(o[r++]=a.left)):(U&&a.left&&(o[r++]=a.left),a.right&&(o[r++]=a.right))}for(var l=0;m>l;l++)n[l]=s[l].node.data;return n.length=m,n},n}),i("echarts/data/quickSelect",["require"],function(){function e(e,t){return e-t}function t(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function i(e,i,n,a,o){for(var r=i;n>i;){var r=Math.round((n+i)/2),s=e[r];t(e,r,n),r=i;for(var l=i;n-1>=l;l++)o(s,e[l])>=0&&(t(e,l,r),r++);if(t(e,n,r),r===a)return r;a>r?i=r+1:n=r-1}return i}function n(t,n,a,o,r){return arguments.length<=3&&(o=n,r=2==arguments.length?e:a,n=0,a=t.length-1),i(t,n,a,o,r)}return n}),i("echarts/component/dataView",["require","./base","../config","zrender/tool/util","../component"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o),this.dom=o.dom,this._tDom=document.createElement("div"),this._textArea=document.createElement("textArea"),this._buttonRefresh=document.createElement("button"),this._buttonRefresh.setAttribute("type","button"),this._buttonClose=document.createElement("button"),this._buttonClose.setAttribute("type","button"),this._hasShow=!1,this._zrHeight=n.getHeight(),this._zrWidth=n.getWidth(),this._tDom.className="echarts-dataview",this.hide(),this.dom.firstChild.appendChild(this._tDom),window.addEventListener?(this._tDom.addEventListener("click",this._stop),this._tDom.addEventListener("mousewheel",this._stop),this._tDom.addEventListener("mousemove",this._stop),this._tDom.addEventListener("mousedown",this._stop),this._tDom.addEventListener("mouseup",this._stop),this._tDom.addEventListener("touchstart",this._stop),this._tDom.addEventListener("touchmove",this._stop),this._tDom.addEventListener("touchend",this._stop)):(this._tDom.attachEvent("onclick",this._stop),this._tDom.attachEvent("onmousewheel",this._stop),this._tDom.attachEvent("onmousemove",this._stop),this._tDom.attachEvent("onmousedown",this._stop),this._tDom.attachEvent("onmouseup",this._stop))}var i=e("./base"),n=e("../config"),a=e("zrender/tool/util");return t.prototype={type:n.COMPONENT_TYPE_DATAVIEW,_lang:["Data View","close","refresh"],_gCssText:"position:absolute;display:block;overflow:hidden;transition:height 0.8s,background-color 1s;-moz-transition:height 0.8s,background-color 1s;-webkit-transition:height 0.8s,background-color 1s;-o-transition:height 0.8s,background-color 1s;z-index:1;left:0;top:0;",hide:function(){this._sizeCssText="width:"+this._zrWidth+"px;height:0px;background-color:#f0ffff;",this._tDom.style.cssText=this._gCssText+this._sizeCssText},show:function(e){this._hasShow=!0;var t=this.query(this.option,"toolbox.feature.dataView.lang")||this._lang;this.option=e,this._tDom.innerHTML='<p style="padding:8px 0;margin:0 0 10px 0;border-bottom:1px solid #eee">'+(t[0]||this._lang[0])+"</p>";var i=this.query(this.option,"toolbox.feature.dataView.optionToContent");"function"!=typeof i?this._textArea.value=this._optionToContent():(this._textArea=document.createElement("div"),this._textArea.innerHTML=i(this.option)),this._textArea.style.cssText="display:block;margin:0 0 8px 0;padding:4px 6px;overflow:auto;width:100%;height:"+(this._zrHeight-100)+"px;",this._tDom.appendChild(this._textArea),this._buttonClose.style.cssText="float:right;padding:1px 6px;",this._buttonClose.innerHTML=t[1]||this._lang[1];var n=this;this._buttonClose.onclick=function(){n.hide()},this._tDom.appendChild(this._buttonClose),this.query(this.option,"toolbox.feature.dataView.readOnly")===!1?(this._buttonRefresh.style.cssText="float:right;margin-right:10px;padding:1px 6px;",this._buttonRefresh.innerHTML=t[2]||this._lang[2],this._buttonRefresh.onclick=function(){n._save()},this._textArea.readOnly=!1,this._textArea.style.cursor="default"):(this._buttonRefresh.style.cssText="display:none",
+this._textArea.readOnly=!0,this._textArea.style.cursor="text"),this._tDom.appendChild(this._buttonRefresh),this._sizeCssText="width:"+this._zrWidth+"px;height:"+this._zrHeight+"px;background-color:#fff;",this._tDom.style.cssText=this._gCssText+this._sizeCssText},_optionToContent:function(){var e,t,i,a,o,r,s=[],l="";if(this.option.xAxis)for(s=this.option.xAxis instanceof Array?this.option.xAxis:[this.option.xAxis],e=0,a=s.length;a>e;e++)if("category"==(s[e].type||"category")){for(r=[],t=0,i=s[e].data.length;i>t;t++)r.push(this.getDataFromOption(s[e].data[t]));l+=r.join(", ")+"\n\n"}if(this.option.yAxis)for(s=this.option.yAxis instanceof Array?this.option.yAxis:[this.option.yAxis],e=0,a=s.length;a>e;e++)if("category"==s[e].type){for(r=[],t=0,i=s[e].data.length;i>t;t++)r.push(this.getDataFromOption(s[e].data[t]));l+=r.join(", ")+"\n\n"}var h,m=this.option.series;for(e=0,a=m.length;a>e;e++){for(r=[],t=0,i=m[e].data.length;i>t;t++)o=m[e].data[t],h=m[e].type==n.CHART_TYPE_PIE||m[e].type==n.CHART_TYPE_MAP?(o.name||"-")+":":"",m[e].type==n.CHART_TYPE_SCATTER&&(o=this.getDataFromOption(o).join(", ")),r.push(h+this.getDataFromOption(o));l+=(m[e].name||"-")+" : \n",l+=r.join(m[e].type==n.CHART_TYPE_SCATTER?"\n":", "),l+="\n\n"}return l},_save:function(){var e=this.query(this.option,"toolbox.feature.dataView.contentToOption");if("function"!=typeof e){for(var t=this._textArea.value.split("\n"),i=[],a=0,o=t.length;o>a;a++)t[a]=this._trim(t[a]),""!==t[a]&&i.push(t[a]);this._contentToOption(i)}else e(this._textArea,this.option);this.hide();var r=this;setTimeout(function(){r.messageCenter&&r.messageCenter.dispatch(n.EVENT.DATA_VIEW_CHANGED,null,{option:r.option},r.myChart)},r.canvasSupported?800:100)},_contentToOption:function(e){var t,i,a,o,r,s,l,h=[],m=0;if(this.option.xAxis)for(h=this.option.xAxis instanceof Array?this.option.xAxis:[this.option.xAxis],t=0,o=h.length;o>t;t++)if("category"==(h[t].type||"category")){for(s=e[m].split(","),i=0,a=h[t].data.length;a>i;i++)l=this._trim(s[i]||""),r=h[t].data[i],"undefined"!=typeof h[t].data[i].value?h[t].data[i].value=l:h[t].data[i]=l;m++}if(this.option.yAxis)for(h=this.option.yAxis instanceof Array?this.option.yAxis:[this.option.yAxis],t=0,o=h.length;o>t;t++)if("category"==h[t].type){for(s=e[m].split(","),i=0,a=h[t].data.length;a>i;i++)l=this._trim(s[i]||""),r=h[t].data[i],"undefined"!=typeof h[t].data[i].value?h[t].data[i].value=l:h[t].data[i]=l;m++}var V=this.option.series;for(t=0,o=V.length;o>t;t++)if(m++,V[t].type==n.CHART_TYPE_SCATTER)for(var i=0,a=V[t].data.length;a>i;i++)s=e[m],l=s.replace(" ","").split(","),"undefined"!=typeof V[t].data[i].value?V[t].data[i].value=l:V[t].data[i]=l,m++;else{s=e[m].split(",");for(var i=0,a=V[t].data.length;a>i;i++)l=(s[i]||"").replace(/.*:/,""),l=this._trim(l),l="-"!=l&&""!==l?l-0:"-","undefined"!=typeof V[t].data[i].value?V[t].data[i].value=l:V[t].data[i]=l;m++}},_trim:function(e){var t=new RegExp("(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+$)","g");return e.replace(t,"")},_stop:function(e){e=e||window.event,e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},resize:function(){this._zrHeight=this.zr.getHeight(),this._zrWidth=this.zr.getWidth(),this._tDom.offsetHeight>10&&(this._sizeCssText="width:"+this._zrWidth+"px;height:"+this._zrHeight+"px;background-color:#fff;",this._tDom.style.cssText=this._gCssText+this._sizeCssText,this._textArea.style.cssText="display:block;margin:0 0 8px 0;padding:4px 6px;overflow:auto;width:100%;height:"+(this._zrHeight-100)+"px;")},dispose:function(){window.removeEventListener?(this._tDom.removeEventListener("click",this._stop),this._tDom.removeEventListener("mousewheel",this._stop),this._tDom.removeEventListener("mousemove",this._stop),this._tDom.removeEventListener("mousedown",this._stop),this._tDom.removeEventListener("mouseup",this._stop),this._tDom.removeEventListener("touchstart",this._stop),this._tDom.removeEventListener("touchmove",this._stop),this._tDom.removeEventListener("touchend",this._stop)):(this._tDom.detachEvent("onclick",this._stop),this._tDom.detachEvent("onmousewheel",this._stop),this._tDom.detachEvent("onmousemove",this._stop),this._tDom.detachEvent("onmousedown",this._stop),this._tDom.detachEvent("onmouseup",this._stop)),this._buttonRefresh.onclick=null,this._buttonClose.onclick=null,this._hasShow&&(this._tDom.removeChild(this._textArea),this._tDom.removeChild(this._buttonRefresh),this._tDom.removeChild(this._buttonClose)),this._textArea=null,this._buttonRefresh=null,this._buttonClose=null,this.dom.firstChild.removeChild(this._tDom),this._tDom=null}},a.inherits(t,i),e("../component").define("dataView",t),t}),i("echarts/util/shape/Cross",["require","zrender/shape/Base","zrender/shape/Line","zrender/tool/util","./normalIsCover"],function(e){function t(e){i.call(this,e)}var i=e("zrender/shape/Base"),n=e("zrender/shape/Line"),a=e("zrender/tool/util");return t.prototype={type:"cross",buildPath:function(e,t){var i=t.rect;t.xStart=i.x,t.xEnd=i.x+i.width,t.yStart=t.yEnd=t.y,n.prototype.buildPath(e,t),t.xStart=t.xEnd=t.x,t.yStart=i.y,t.yEnd=i.y+i.height,n.prototype.buildPath(e,t)},getRect:function(e){return e.rect},isCover:e("./normalIsCover")},a.inherits(t,i),t}),i("zrender/shape/Sector",["require","../tool/math","../tool/computeBoundingBox","../tool/vector","./Base","../tool/util"],function(e){var t=e("../tool/math"),i=e("../tool/computeBoundingBox"),n=e("../tool/vector"),a=e("./Base"),o=n.create(),r=n.create(),s=n.create(),l=n.create(),h=function(e){a.call(this,e)};return h.prototype={type:"sector",buildPath:function(e,i){var n=i.x,a=i.y,o=i.r0||0,r=i.r,s=i.startAngle,l=i.endAngle,h=i.clockWise||!1;s=t.degreeToRadian(s),l=t.degreeToRadian(l),h||(s=-s,l=-l);var m=t.cos(s),V=t.sin(s);e.moveTo(m*o+n,V*o+a),e.lineTo(m*r+n,V*r+a),e.arc(n,a,r,s,l,!h),e.lineTo(t.cos(l)*o+n,t.sin(l)*o+a),0!==o&&e.arc(n,a,o,l,s,h),e.closePath()},getRect:function(e){if(e.__rect)return e.__rect;var a=e.x,h=e.y,m=e.r0||0,V=e.r,U=t.degreeToRadian(e.startAngle),d=t.degreeToRadian(e.endAngle),p=e.clockWise;return p||(U=-U,d=-d),m>1?i.arc(a,h,m,U,d,!p,o,s):(o[0]=s[0]=a,o[1]=s[1]=h),i.arc(a,h,V,U,d,!p,r,l),n.min(o,o,r),n.max(s,s,l),e.__rect={x:o[0],y:o[1],width:s[0]-o[0],height:s[1]-o[1]},e.__rect}},e("../tool/util").inherits(h,a),h}),i("echarts/util/shape/Candle",["require","zrender/shape/Base","zrender/tool/util","./normalIsCover"],function(e){function t(e){i.call(this,e)}var i=e("zrender/shape/Base"),n=e("zrender/tool/util");return t.prototype={type:"candle",_numberOrder:function(e,t){return t-e},buildPath:function(e,t){var i=n.clone(t.y).sort(this._numberOrder);e.moveTo(t.x,i[3]),e.lineTo(t.x,i[2]),e.moveTo(t.x-t.width/2,i[2]),e.rect(t.x-t.width/2,i[2],t.width,i[1]-i[2]),e.moveTo(t.x,i[1]),e.lineTo(t.x,i[0])},getRect:function(e){if(!e.__rect){var t=0;("stroke"==e.brushType||"fill"==e.brushType)&&(t=e.lineWidth||1);var i=n.clone(e.y).sort(this._numberOrder);e.__rect={x:Math.round(e.x-e.width/2-t/2),y:Math.round(i[3]-t/2),width:e.width+t,height:i[0]-i[3]+t}}return e.__rect},isCover:e("./normalIsCover")},n.inherits(t,i),t}),i("zrender/tool/computeBoundingBox",["require","./vector","./curve"],function(e){function t(e,t,i){if(0!==e.length){for(var n=e[0][0],a=e[0][0],o=e[0][1],r=e[0][1],s=1;s<e.length;s++){var l=e[s];l[0]<n&&(n=l[0]),l[0]>a&&(a=l[0]),l[1]<o&&(o=l[1]),l[1]>r&&(r=l[1])}t[0]=n,t[1]=o,i[0]=a,i[1]=r}}function i(e,t,i,n,a,r){var s=[];o.cubicExtrema(e[0],t[0],i[0],n[0],s);for(var l=0;l<s.length;l++)s[l]=o.cubicAt(e[0],t[0],i[0],n[0],s[l]);var h=[];o.cubicExtrema(e[1],t[1],i[1],n[1],h);for(var l=0;l<h.length;l++)h[l]=o.cubicAt(e[1],t[1],i[1],n[1],h[l]);s.push(e[0],n[0]),h.push(e[1],n[1]);var m=Math.min.apply(null,s),V=Math.max.apply(null,s),U=Math.min.apply(null,h),d=Math.max.apply(null,h);a[0]=m,a[1]=U,r[0]=V,r[1]=d}function n(e,t,i,n,a){var r=o.quadraticExtremum(e[0],t[0],i[0]),s=o.quadraticExtremum(e[1],t[1],i[1]);r=Math.max(Math.min(r,1),0),s=Math.max(Math.min(s,1),0);var l=1-r,h=1-s,m=l*l*e[0]+2*l*r*t[0]+r*r*i[0],V=l*l*e[1]+2*l*r*t[1]+r*r*i[1],U=h*h*e[0]+2*h*s*t[0]+s*s*i[0],d=h*h*e[1]+2*h*s*t[1]+s*s*i[1];n[0]=Math.min(e[0],i[0],m,U),n[1]=Math.min(e[1],i[1],V,d),a[0]=Math.max(e[0],i[0],m,U),a[1]=Math.max(e[1],i[1],V,d)}var a=e("./vector"),o=e("./curve"),r=a.create(),s=a.create(),l=a.create(),h=function(e,t,i,n,o,h,m,V){if(Math.abs(n-o)>=2*Math.PI)return m[0]=e-i,m[1]=t-i,V[0]=e+i,void(V[1]=t+i);if(r[0]=Math.cos(n)*i+e,r[1]=Math.sin(n)*i+t,s[0]=Math.cos(o)*i+e,s[1]=Math.sin(o)*i+t,a.min(m,r,s),a.max(V,r,s),n%=2*Math.PI,0>n&&(n+=2*Math.PI),o%=2*Math.PI,0>o&&(o+=2*Math.PI),n>o&&!h?o+=2*Math.PI:o>n&&h&&(n+=2*Math.PI),h){var U=o;o=n,n=U}for(var d=0;o>d;d+=Math.PI/2)d>n&&(l[0]=Math.cos(d)*i+e,l[1]=Math.sin(d)*i+t,a.min(m,l,m),a.max(V,l,V))};return t.cubeBezier=i,t.quadraticBezier=n,t.arc=h,t}),i("echarts/util/shape/Chain",["require","zrender/shape/Base","./Icon","zrender/shape/util/dashedLineTo","zrender/tool/util","zrender/tool/matrix"],function(e){function t(e){i.call(this,e)}var i=e("zrender/shape/Base"),n=e("./Icon"),a=e("zrender/shape/util/dashedLineTo"),o=e("zrender/tool/util"),r=e("zrender/tool/matrix");return t.prototype={type:"chain",brush:function(e,t){var i=this.style;t&&(i=this.getHighlightStyle(i,this.highlightStyle||{})),e.save(),this.setContext(e,i),this.setTransform(e),e.save(),e.beginPath(),this.buildLinePath(e,i),e.stroke(),e.restore(),this.brushSymbol(e,i),e.restore()},buildLinePath:function(e,t){var i=t.x,n=t.y+5,o=t.width,r=t.height/2-10;if(e.moveTo(i,n),e.lineTo(i,n+r),e.moveTo(i+o,n),e.lineTo(i+o,n+r),e.moveTo(i,n+r/2),t.lineType&&"solid"!=t.lineType){if("dashed"==t.lineType||"dotted"==t.lineType){var s=(t.lineWidth||1)*("dashed"==t.lineType?5:1);a(e,i,n+r/2,i+o,n+r/2,s)}}else e.lineTo(i+o,n+r/2)},brushSymbol:function(e,t){var i=t.y+t.height/4;e.save();for(var a,o=t.chainPoint,r=0,s=o.length;s>r;r++){if(a=o[r],"none"!=a.symbol){e.beginPath();var l=a.symbolSize;n.prototype.buildPath(e,{iconType:a.symbol,x:a.x-l,y:i-l,width:2*l,height:2*l,n:a.n}),e.fillStyle=a.isEmpty?"#fff":t.strokeColor,e.closePath(),e.fill(),e.stroke()}a.showLabel&&(e.font=a.textFont,e.fillStyle=a.textColor,e.textAlign=a.textAlign,e.textBaseline=a.textBaseline,a.rotation?(e.save(),this._updateTextTransform(e,a.rotation),e.fillText(a.name,a.textX,a.textY),e.restore()):e.fillText(a.name,a.textX,a.textY))}e.restore()},_updateTextTransform:function(e,t){var i=r.create();if(r.identity(i),0!==t[0]){var n=t[1]||0,a=t[2]||0;(n||a)&&r.translate(i,i,[-n,-a]),r.rotate(i,i,t[0]),(n||a)&&r.translate(i,i,[n,a])}e.transform.apply(e,i)},isCover:function(e,t){var i=this.style;return e>=i.x&&e<=i.x+i.width&&t>=i.y&&t<=i.y+i.height?!0:!1}},o.inherits(t,i),t}),i("zrender/shape/Ring",["require","./Base","../tool/util"],function(e){var t=e("./Base"),i=function(e){t.call(this,e)};return i.prototype={type:"ring",buildPath:function(e,t){e.arc(t.x,t.y,t.r,0,2*Math.PI,!1),e.moveTo(t.x+t.r0,t.y),e.arc(t.x,t.y,t.r0,0,2*Math.PI,!0)},getRect:function(e){if(e.__rect)return e.__rect;var t;return t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(e.x-e.r-t/2),y:Math.round(e.y-e.r-t/2),width:2*e.r+t,height:2*e.r+t},e.__rect}},e("../tool/util").inherits(i,t),i}),i("echarts/component/axis",["require","./base","zrender/shape/Line","../config","../util/ecData","zrender/tool/util","zrender/tool/color","./categoryAxis","./valueAxis","../component"],function(e){function t(e,t,n,a,o,r){i.call(this,e,t,n,a,o),this.axisType=r,this._axisList=[],this.refresh(a)}var i=e("./base"),n=e("zrender/shape/Line"),a=e("../config"),o=e("../util/ecData"),r=e("zrender/tool/util"),s=e("zrender/tool/color");return t.prototype={type:a.COMPONENT_TYPE_AXIS,axisBase:{_buildAxisLine:function(){var e=this.option.axisLine.lineStyle.width,t=e/2,i={_axisShape:"axisLine",zlevel:this.getZlevelBase(),z:this.getZBase()+3,hoverable:!1},a=this.grid;switch(this.option.position){case"left":i.style={xStart:a.getX()-t,yStart:a.getYend(),xEnd:a.getX()-t,yEnd:a.getY(),lineCap:"round"};break;case"right":i.style={xStart:a.getXend()+t,yStart:a.getYend(),xEnd:a.getXend()+t,yEnd:a.getY(),lineCap:"round"};break;case"bottom":i.style={xStart:a.getX(),yStart:a.getYend()+t,xEnd:a.getXend(),yEnd:a.getYend()+t,lineCap:"round"};break;case"top":i.style={xStart:a.getX(),yStart:a.getY()-t,xEnd:a.getXend(),yEnd:a.getY()-t,lineCap:"round"}}var o=i.style;""!==this.option.name&&(o.text=this.option.name,o.textPosition=this.option.nameLocation,o.textFont=this.getFont(this.option.nameTextStyle),this.option.nameTextStyle.align&&(o.textAlign=this.option.nameTextStyle.align),this.option.nameTextStyle.baseline&&(o.textBaseline=this.option.nameTextStyle.baseline),this.option.nameTextStyle.color&&(o.textColor=this.option.nameTextStyle.color)),o.strokeColor=this.option.axisLine.lineStyle.color,o.lineWidth=e,this.isHorizontal()?o.yStart=o.yEnd=this.subPixelOptimize(o.yEnd,e):o.xStart=o.xEnd=this.subPixelOptimize(o.xEnd,e),o.lineType=this.option.axisLine.lineStyle.type,i=new n(i),this.shapeList.push(i)},_axisLabelClickable:function(e,t){return e?(o.pack(t,void 0,-1,void 0,-1,t.style.text),t.hoverable=!0,t.clickable=!0,t.highlightStyle={color:s.lift(t.style.color,1),brushType:"fill"},t):t},refixAxisShape:function(e,t){if(this.option.axisLine.onZero){var i;if(this.isHorizontal()&&null!=t)for(var n=0,a=this.shapeList.length;a>n;n++)"axisLine"===this.shapeList[n]._axisShape?(this.shapeList[n].style.yStart=this.shapeList[n].style.yEnd=this.subPixelOptimize(t,this.shapeList[n].stylelineWidth),this.zr.modShape(this.shapeList[n].id)):"axisTick"===this.shapeList[n]._axisShape&&(i=this.shapeList[n].style.yEnd-this.shapeList[n].style.yStart,this.shapeList[n].style.yStart=t-i,this.shapeList[n].style.yEnd=t,this.zr.modShape(this.shapeList[n].id));if(!this.isHorizontal()&&null!=e)for(var n=0,a=this.shapeList.length;a>n;n++)"axisLine"===this.shapeList[n]._axisShape?(this.shapeList[n].style.xStart=this.shapeList[n].style.xEnd=this.subPixelOptimize(e,this.shapeList[n].stylelineWidth),this.zr.modShape(this.shapeList[n].id)):"axisTick"===this.shapeList[n]._axisShape&&(i=this.shapeList[n].style.xEnd-this.shapeList[n].style.xStart,this.shapeList[n].style.xStart=e,this.shapeList[n].style.xEnd=e+i,this.zr.modShape(this.shapeList[n].id))}},getPosition:function(){return this.option.position},isHorizontal:function(){return"bottom"===this.option.position||"top"===this.option.position}},reformOption:function(e){if(!e||e instanceof Array&&0===e.length?e=[{type:a.COMPONENT_TYPE_AXIS_VALUE}]:e instanceof Array||(e=[e]),e.length>2&&(e=[e[0],e[1]]),"xAxis"===this.axisType){(!e[0].position||"bottom"!=e[0].position&&"top"!=e[0].position)&&(e[0].position="bottom"),e.length>1&&(e[1].position="bottom"===e[0].position?"top":"bottom");for(var t=0,i=e.length;i>t;t++)e[t].type=e[t].type||"category",e[t].xAxisIndex=t,e[t].yAxisIndex=-1}else{(!e[0].position||"left"!=e[0].position&&"right"!=e[0].position)&&(e[0].position="left"),e.length>1&&(e[1].position="left"===e[0].position?"right":"left");for(var t=0,i=e.length;i>t;t++)e[t].type=e[t].type||"value",e[t].xAxisIndex=-1,e[t].yAxisIndex=t}return e},refresh:function(t){var i;t&&(this.option=t,"xAxis"===this.axisType?(this.option.xAxis=this.reformOption(t.xAxis),i=this.option.xAxis):(this.option.yAxis=this.reformOption(t.yAxis),i=this.option.yAxis),this.series=t.series);for(var n=e("./categoryAxis"),a=e("./valueAxis"),o=Math.max(i&&i.length||0,this._axisList.length),r=0;o>r;r++)!this._axisList[r]||!t||i[r]&&this._axisList[r].type==i[r].type||(this._axisList[r].dispose&&this._axisList[r].dispose(),this._axisList[r]=!1),this._axisList[r]?this._axisList[r].refresh&&this._axisList[r].refresh(i?i[r]:!1,this.series):i&&i[r]&&(this._axisList[r]="category"===i[r].type?new n(this.ecTheme,this.messageCenter,this.zr,i[r],this.myChart,this.axisBase):new a(this.ecTheme,this.messageCenter,this.zr,i[r],this.myChart,this.axisBase,this.series))},getAxis:function(e){return this._axisList[e]},getAxisCount:function(){return this._axisList.length},clear:function(){for(var e=0,t=this._axisList.length;t>e;e++)this._axisList[e].dispose&&this._axisList[e].dispose();this._axisList=[]}},r.inherits(t,i),e("../component").define("axis",t),t}),i("echarts/component/grid",["require","./base","zrender/shape/Rectangle","../config","zrender/tool/util","../component"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o),this.refresh(a)}var i=e("./base"),n=e("zrender/shape/Rectangle"),a=e("../config");a.grid={zlevel:0,z:0,x:80,y:60,x2:80,y2:60,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"};var o=e("zrender/tool/util");return t.prototype={type:a.COMPONENT_TYPE_GRID,getX:function(){return this._x},getY:function(){return this._y},getWidth:function(){return this._width},getHeight:function(){return this._height},getXend:function(){return this._x+this._width},getYend:function(){return this._y+this._height},getArea:function(){return{x:this._x,y:this._y,width:this._width,height:this._height}},getBbox:function(){return[[this._x,this._y],[this.getXend(),this.getYend()]]},refixAxisShape:function(e){for(var t,i,n,o=e.xAxis._axisList.concat(e.yAxis?e.yAxis._axisList:[]),r=o.length;r--;)n=o[r],n.type==a.COMPONENT_TYPE_AXIS_VALUE&&n._min<0&&n._max>=0&&(n.isHorizontal()?t=n.getCoord(0):i=n.getCoord(0));if("undefined"!=typeof t||"undefined"!=typeof i)for(r=o.length;r--;)o[r].refixAxisShape(t,i)},refresh:function(e){if(e||this._zrWidth!=this.zr.getWidth()||this._zrHeight!=this.zr.getHeight()){this.clear(),this.option=e||this.option,this.option.grid=this.reformOption(this.option.grid);var t=this.option.grid;this._zrWidth=this.zr.getWidth(),this._zrHeight=this.zr.getHeight(),this._x=this.parsePercent(t.x,this._zrWidth),this._y=this.parsePercent(t.y,this._zrHeight);var i=this.parsePercent(t.x2,this._zrWidth),a=this.parsePercent(t.y2,this._zrHeight);this._width="undefined"==typeof t.width?this._zrWidth-this._x-i:this.parsePercent(t.width,this._zrWidth),this._width=this._width<=0?10:this._width,this._height="undefined"==typeof t.height?this._zrHeight-this._y-a:this.parsePercent(t.height,this._zrHeight),this._height=this._height<=0?10:this._height,this._x=this.subPixelOptimize(this._x,t.borderWidth),this._y=this.subPixelOptimize(this._y,t.borderWidth),this.shapeList.push(new n({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._x,y:this._y,width:this._width,height:this._height,brushType:t.borderWidth>0?"both":"fill",color:t.backgroundColor,strokeColor:t.borderColor,lineWidth:t.borderWidth}})),this.zr.addShape(this.shapeList[0])}}},o.inherits(t,i),e("../component").define("grid",t),t}),i("echarts/component/dataZoom",["require","./base","zrender/shape/Rectangle","zrender/shape/Polygon","../util/shape/Icon","../config","../util/date","zrender/tool/util","../component"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o);var r=this;r._ondrift=function(e,t){return r.__ondrift(this,e,t)},r._ondragend=function(){return r.__ondragend()},this._fillerSize=30,this._isSilence=!1,this._zoom={},this.option.dataZoom=this.reformOption(this.option.dataZoom),this.zoomOption=this.option.dataZoom,this._handleSize=this.zoomOption.handleSize,this.myChart.canvasSupported||(this.zoomOption.realtime=!1),this._location=this._getLocation(),this._zoom=this._getZoom(),this._backupData(),this.option.dataZoom.show&&this._buildShape(),this._syncData()}var i=e("./base"),n=e("zrender/shape/Rectangle"),a=e("zrender/shape/Polygon"),o=e("../util/shape/Icon"),r=e("../config");r.dataZoom={zlevel:0,z:4,show:!1,orient:"horizontal",backgroundColor:"rgba(0,0,0,0)",dataBackgroundColor:"#eee",fillerColor:"rgba(144,197,237,0.2)",handleColor:"rgba(70,130,180,0.8)",handleSize:8,showDetail:!0,realtime:!0};var s=e("../util/date"),l=e("zrender/tool/util");return t.prototype={type:r.COMPONENT_TYPE_DATAZOOM,_buildShape:function(){this._buildBackground(),this._buildFiller(),this._buildHandle(),this._buildFrame();for(var e=0,t=this.shapeList.length;t>e;e++)this.zr.addShape(this.shapeList[e]);this._syncFrameShape()},_getLocation:function(){var e,t,i,n,a=this.component.grid;return"horizontal"==this.zoomOption.orient?(i=this.zoomOption.width||a.getWidth(),n=this.zoomOption.height||this._fillerSize,e=null!=this.zoomOption.x?this.zoomOption.x:a.getX(),t=null!=this.zoomOption.y?this.zoomOption.y:this.zr.getHeight()-n-2):(i=this.zoomOption.width||this._fillerSize,n=this.zoomOption.height||a.getHeight(),e=null!=this.zoomOption.x?this.zoomOption.x:2,t=null!=this.zoomOption.y?this.zoomOption.y:a.getY()),{x:e,y:t,width:i,height:n}},_getZoom:function(){var e=this.option.series,t=this.option.xAxis;!t||t instanceof Array||(t=[t],this.option.xAxis=t);var i=this.option.yAxis;!i||i instanceof Array||(i=[i],this.option.yAxis=i);var n,a,o=[],s=this.zoomOption.xAxisIndex;if(t&&null==s){n=[];for(var l=0,h=t.length;h>l;l++)("category"==t[l].type||null==t[l].type)&&n.push(l)}else n=s instanceof Array?s:null!=s?[s]:[];if(s=this.zoomOption.yAxisIndex,i&&null==s){a=[];for(var l=0,h=i.length;h>l;l++)"category"==i[l].type&&a.push(l)}else a=s instanceof Array?s:null!=s?[s]:[];for(var m,l=0,h=e.length;h>l;l++)if(m=e[l],m.type==r.CHART_TYPE_LINE||m.type==r.CHART_TYPE_BAR||m.type==r.CHART_TYPE_SCATTER||m.type==r.CHART_TYPE_K){for(var V=0,U=n.length;U>V;V++)if(n[V]==(m.xAxisIndex||0)){o.push(l);break}for(var V=0,U=a.length;U>V;V++)if(a[V]==(m.yAxisIndex||0)){o.push(l);break}null==this.zoomOption.xAxisIndex&&null==this.zoomOption.yAxisIndex&&m.data&&this.getDataFromOption(m.data[0])instanceof Array&&(m.type==r.CHART_TYPE_SCATTER||m.type==r.CHART_TYPE_LINE||m.type==r.CHART_TYPE_BAR)&&o.push(l)}var d=null!=this._zoom.start?this._zoom.start:null!=this.zoomOption.start?this.zoomOption.start:0,p=null!=this._zoom.end?this._zoom.end:null!=this.zoomOption.end?this.zoomOption.end:100;d>p&&(d+=p,p=d-p,d-=p);var c=Math.round((p-d)/100*("horizontal"==this.zoomOption.orient?this._location.width:this._location.height));return{start:d,end:p,start2:0,end2:100,size:c,xAxisIndex:n,yAxisIndex:a,seriesIndex:o,scatterMap:this._zoom.scatterMap||{}}},_backupData:function(){this._originalData={xAxis:{},yAxis:{},series:{}};for(var e=this.option.xAxis,t=this._zoom.xAxisIndex,i=0,n=t.length;n>i;i++)this._originalData.xAxis[t[i]]=e[t[i]].data;for(var a=this.option.yAxis,o=this._zoom.yAxisIndex,i=0,n=o.length;n>i;i++)this._originalData.yAxis[o[i]]=a[o[i]].data;for(var s,l=this.option.series,h=this._zoom.seriesIndex,i=0,n=h.length;n>i;i++)s=l[h[i]],this._originalData.series[h[i]]=s.data,s.data&&this.getDataFromOption(s.data[0])instanceof Array&&(s.type==r.CHART_TYPE_SCATTER||s.type==r.CHART_TYPE_LINE||s.type==r.CHART_TYPE_BAR)&&(this._backupScale(),this._calculScatterMap(h[i]))},_calculScatterMap:function(t){this._zoom.scatterMap=this._zoom.scatterMap||{},this._zoom.scatterMap[t]=this._zoom.scatterMap[t]||{};var i=e("../component"),n=i.get("axis"),a=l.clone(this.option.xAxis);"category"==a[0].type&&(a[0].type="value"),a[1]&&"category"==a[1].type&&(a[1].type="value");var o=new n(this.ecTheme,null,!1,{xAxis:a,series:this.option.series},this,"xAxis"),r=this.option.series[t].xAxisIndex||0;this._zoom.scatterMap[t].x=o.getAxis(r).getExtremum(),o.dispose(),a=l.clone(this.option.yAxis),"category"==a[0].type&&(a[0].type="value"),a[1]&&"category"==a[1].type&&(a[1].type="value"),o=new n(this.ecTheme,null,!1,{yAxis:a,series:this.option.series},this,"yAxis"),r=this.option.series[t].yAxisIndex||0,this._zoom.scatterMap[t].y=o.getAxis(r).getExtremum(),o.dispose()},_buildBackground:function(){var e=this._location.width,t=this._location.height;this.shapeList.push(new n({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._location.x,y:this._location.y,width:e,height:t,color:this.zoomOption.backgroundColor}}));for(var i=0,o=this._originalData.xAxis,s=this._zoom.xAxisIndex,l=0,h=s.length;h>l;l++)i=Math.max(i,o[s[l]].length);for(var m=this._originalData.yAxis,V=this._zoom.yAxisIndex,l=0,h=V.length;h>l;l++)i=Math.max(i,m[V[l]].length);for(var U,d=this._zoom.seriesIndex[0],p=this._originalData.series[d],c=Number.MIN_VALUE,u=Number.MAX_VALUE,l=0,h=p.length;h>l;l++)U=this.getDataFromOption(p[l],0),this.option.series[d].type==r.CHART_TYPE_K&&(U=U[1]),isNaN(U)&&(U=0),c=Math.max(c,U),u=Math.min(u,U);var y=c-u,g=[],b=e/(i-(i>1?1:0)),f=t/(i-(i>1?1:0)),k=1;"horizontal"==this.zoomOption.orient&&1>b?k=Math.floor(3*i/e):"vertical"==this.zoomOption.orient&&1>f&&(k=Math.floor(3*i/t));for(var l=0,h=i;h>l;l+=k)U=this.getDataFromOption(p[l],0),this.option.series[d].type==r.CHART_TYPE_K&&(U=U[1]),isNaN(U)&&(U=0),g.push("horizontal"==this.zoomOption.orient?[this._location.x+b*l,this._location.y+t-1-Math.round((U-u)/y*(t-10))]:[this._location.x+1+Math.round((U-u)/y*(e-10)),this._location.y+f*(h-l-1)]);"horizontal"==this.zoomOption.orient?(g.push([this._location.x+e,this._location.y+t]),g.push([this._location.x,this._location.y+t])):(g.push([this._location.x,this._location.y]),g.push([this._location.x,this._location.y+t])),this.shapeList.push(new a({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{pointList:g,color:this.zoomOption.dataBackgroundColor},hoverable:!1}))},_buildFiller:function(){this._fillerShae={zlevel:this.getZlevelBase(),z:this.getZBase(),draggable:!0,ondrift:this._ondrift,ondragend:this._ondragend,_type:"filler"},this._fillerShae.style="horizontal"==this.zoomOption.orient?{x:this._location.x+Math.round(this._zoom.start/100*this._location.width)+this._handleSize,y:this._location.y,width:this._zoom.size-2*this._handleSize,height:this._location.height,color:this.zoomOption.fillerColor,text:":::",textPosition:"inside"}:{x:this._location.x,y:this._location.y+Math.round(this._zoom.start/100*this._location.height)+this._handleSize,width:this._location.width,height:this._zoom.size-2*this._handleSize,color:this.zoomOption.fillerColor,text:"::",textPosition:"inside"},this._fillerShae.highlightStyle={brushType:"fill",color:"rgba(0,0,0,0)"},this._fillerShae=new n(this._fillerShae),this.shapeList.push(this._fillerShae)},_buildHandle:function(){var e=this.zoomOption.showDetail?this._getDetail():{start:"",end:""};this._startShape={zlevel:this.getZlevelBase(),z:this.getZBase(),draggable:!0,style:{iconType:"rectangle",x:this._location.x,y:this._location.y,width:this._handleSize,height:this._handleSize,color:this.zoomOption.handleColor,text:"=",textPosition:"inside"},highlightStyle:{text:e.start,brushType:"fill",textPosition:"left"},ondrift:this._ondrift,ondragend:this._ondragend},"horizontal"==this.zoomOption.orient?(this._startShape.style.height=this._location.height,this._endShape=l.clone(this._startShape),this._startShape.style.x=this._fillerShae.style.x-this._handleSize,this._endShape.style.x=this._fillerShae.style.x+this._fillerShae.style.width,this._endShape.highlightStyle.text=e.end,this._endShape.highlightStyle.textPosition="right"):(this._startShape.style.width=this._location.width,this._endShape=l.clone(this._startShape),this._startShape.style.y=this._fillerShae.style.y+this._fillerShae.style.height,this._startShape.highlightStyle.textPosition="bottom",this._endShape.style.y=this._fillerShae.style.y-this._handleSize,this._endShape.highlightStyle.text=e.end,this._endShape.highlightStyle.textPosition="top"),this._startShape=new o(this._startShape),this._endShape=new o(this._endShape),this.shapeList.push(this._startShape),this.shapeList.push(this._endShape)},_buildFrame:function(){var e=this.subPixelOptimize(this._location.x,1),t=this.subPixelOptimize(this._location.y,1);this._startFrameShape={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:e,y:t,width:this._location.width-(e>this._location.x?1:0),height:this._location.height-(t>this._location.y?1:0),lineWidth:1,brushType:"stroke",strokeColor:this.zoomOption.handleColor}},this._endFrameShape=l.clone(this._startFrameShape),this._startFrameShape=new n(this._startFrameShape),this._endFrameShape=new n(this._endFrameShape),this.shapeList.push(this._startFrameShape),this.shapeList.push(this._endFrameShape)},_syncHandleShape:function(){"horizontal"==this.zoomOption.orient?(this._startShape.style.x=this._fillerShae.style.x-this._handleSize,this._endShape.style.x=this._fillerShae.style.x+this._fillerShae.style.width,this._zoom.start=(this._startShape.style.x-this._location.x)/this._location.width*100,this._zoom.end=(this._endShape.style.x+this._handleSize-this._location.x)/this._location.width*100):(this._startShape.style.y=this._fillerShae.style.y+this._fillerShae.style.height,this._endShape.style.y=this._fillerShae.style.y-this._handleSize,this._zoom.start=(this._location.y+this._location.height-this._startShape.style.y)/this._location.height*100,this._zoom.end=(this._location.y+this._location.height-this._endShape.style.y-this._handleSize)/this._location.height*100),this.zr.modShape(this._startShape.id),this.zr.modShape(this._endShape.id),this._syncFrameShape(),this.zr.refreshNextFrame()},_syncFillerShape:function(){var e,t;"horizontal"==this.zoomOption.orient?(e=this._startShape.style.x,t=this._endShape.style.x,this._fillerShae.style.x=Math.min(e,t)+this._handleSize,this._fillerShae.style.width=Math.abs(e-t)-this._handleSize,this._zoom.start=(Math.min(e,t)-this._location.x)/this._location.width*100,this._zoom.end=(Math.max(e,t)+this._handleSize-this._location.x)/this._location.width*100):(e=this._startShape.style.y,t=this._endShape.style.y,this._fillerShae.style.y=Math.min(e,t)+this._handleSize,this._fillerShae.style.height=Math.abs(e-t)-this._handleSize,this._zoom.start=(this._location.y+this._location.height-Math.max(e,t))/this._location.height*100,this._zoom.end=(this._location.y+this._location.height-Math.min(e,t)-this._handleSize)/this._location.height*100),this.zr.modShape(this._fillerShae.id),this._syncFrameShape(),this.zr.refreshNextFrame()},_syncFrameShape:function(){"horizontal"==this.zoomOption.orient?(this._startFrameShape.style.width=this._fillerShae.style.x-this._location.x,this._endFrameShape.style.x=this._fillerShae.style.x+this._fillerShae.style.width,this._endFrameShape.style.width=this._location.x+this._location.width-this._endFrameShape.style.x):(this._startFrameShape.style.y=this._fillerShae.style.y+this._fillerShae.style.height,this._startFrameShape.style.height=this._location.y+this._location.height-this._startFrameShape.style.y,this._endFrameShape.style.height=this._fillerShae.style.y-this._location.y),this.zr.modShape(this._startFrameShape.id),this.zr.modShape(this._endFrameShape.id)},_syncShape:function(){this.zoomOption.show&&("horizontal"==this.zoomOption.orient?(this._startShape.style.x=this._location.x+this._zoom.start/100*this._location.width,this._endShape.style.x=this._location.x+this._zoom.end/100*this._location.width-this._handleSize,this._fillerShae.style.x=this._startShape.style.x+this._handleSize,this._fillerShae.style.width=this._endShape.style.x-this._startShape.style.x-this._handleSize):(this._startShape.style.y=this._location.y+this._location.height-this._zoom.start/100*this._location.height,this._endShape.style.y=this._location.y+this._location.height-this._zoom.end/100*this._location.height-this._handleSize,this._fillerShae.style.y=this._endShape.style.y+this._handleSize,this._fillerShae.style.height=this._startShape.style.y-this._endShape.style.y-this._handleSize),this.zr.modShape(this._startShape.id),this.zr.modShape(this._endShape.id),this.zr.modShape(this._fillerShae.id),this._syncFrameShape(),this.zr.refresh())},_syncData:function(e){var t,i,n,a,o;for(var s in this._originalData){t=this._originalData[s];for(var l in t)o=t[l],null!=o&&(a=o.length,i=Math.floor(this._zoom.start/100*a),n=Math.ceil(this._zoom.end/100*a),this.getDataFromOption(o[0])instanceof Array&&this.option[s][l].type!=r.CHART_TYPE_K?(this._setScale(),this.option[s][l].data=this._synScatterData(l,o)):this.option[s][l].data=o.slice(i,n))}this._isSilence||!this.zoomOption.realtime&&!e||this.messageCenter.dispatch(r.EVENT.DATA_ZOOM,null,{zoom:this._zoom},this.myChart)},_synScatterData:function(e,t){if(0===this._zoom.start&&100==this._zoom.end&&0===this._zoom.start2&&100==this._zoom.end2)return t;var i,n,a,o,r,s=[],l=this._zoom.scatterMap[e];
+
+"horizontal"==this.zoomOption.orient?(i=l.x.max-l.x.min,n=this._zoom.start/100*i+l.x.min,a=this._zoom.end/100*i+l.x.min,i=l.y.max-l.y.min,o=this._zoom.start2/100*i+l.y.min,r=this._zoom.end2/100*i+l.y.min):(i=l.x.max-l.x.min,n=this._zoom.start2/100*i+l.x.min,a=this._zoom.end2/100*i+l.x.min,i=l.y.max-l.y.min,o=this._zoom.start/100*i+l.y.min,r=this._zoom.end/100*i+l.y.min);var h;(h=l.x.dataMappingMethods)&&(n=h.coord2Value(n),a=h.coord2Value(a)),(h=l.y.dataMappingMethods)&&(o=h.coord2Value(o),r=h.coord2Value(r));for(var m,V=0,U=t.length;U>V;V++)m=t[V].value||t[V],m[0]>=n&&m[0]<=a&&m[1]>=o&&m[1]<=r&&s.push(t[V]);return s},_setScale:function(){var e=0!==this._zoom.start||100!==this._zoom.end||0!==this._zoom.start2||100!==this._zoom.end2,t={xAxis:this.option.xAxis,yAxis:this.option.yAxis};for(var i in t)for(var n=0,a=t[i].length;a>n;n++)t[i][n].scale=e||t[i][n]._scale},_backupScale:function(){var e={xAxis:this.option.xAxis,yAxis:this.option.yAxis};for(var t in e)for(var i=0,n=e[t].length;n>i;i++)e[t][i]._scale=e[t][i].scale},_getDetail:function(){for(var e=["xAxis","yAxis"],t=0,i=e.length;i>t;t++){var n=this._originalData[e[t]];for(var a in n){var o=n[a];if(null!=o){var r=o.length,l=Math.floor(this._zoom.start/100*r),h=Math.ceil(this._zoom.end/100*r);return h-=h>0?1:0,{start:this.getDataFromOption(o[l]),end:this.getDataFromOption(o[h])}}}}e="horizontal"==this.zoomOption.orient?"xAxis":"yAxis";var m=this._zoom.seriesIndex[0],V=this.option.series[m][e+"Index"]||0,U=this.option[e][V].type,d=this._zoom.scatterMap[m][e.charAt(0)].min,p=this._zoom.scatterMap[m][e.charAt(0)].max,c=p-d;if("value"==U)return{start:d+c*this._zoom.start/100,end:d+c*this._zoom.end/100};if("time"==U){p=d+c*this._zoom.end/100,d+=c*this._zoom.start/100;var u=s.getAutoFormatter(d,p).formatter;return{start:s.format(u,d),end:s.format(u,p)}}return{start:"",end:""}},__ondrift:function(e,t,i){this.zoomOption.zoomLock&&(e=this._fillerShae);var n="filler"==e._type?this._handleSize:0;if("horizontal"==this.zoomOption.orient?e.style.x+t-n<=this._location.x?e.style.x=this._location.x+n:e.style.x+t+e.style.width+n>=this._location.x+this._location.width?e.style.x=this._location.x+this._location.width-e.style.width-n:e.style.x+=t:e.style.y+i-n<=this._location.y?e.style.y=this._location.y+n:e.style.y+i+e.style.height+n>=this._location.y+this._location.height?e.style.y=this._location.y+this._location.height-e.style.height-n:e.style.y+=i,"filler"==e._type?this._syncHandleShape():this._syncFillerShape(),this.zoomOption.realtime&&this._syncData(),this.zoomOption.showDetail){var a=this._getDetail();this._startShape.style.text=this._startShape.highlightStyle.text=a.start,this._endShape.style.text=this._endShape.highlightStyle.text=a.end,this._startShape.style.textPosition=this._startShape.highlightStyle.textPosition,this._endShape.style.textPosition=this._endShape.highlightStyle.textPosition}return!0},__ondragend:function(){this.zoomOption.showDetail&&(this._startShape.style.text=this._endShape.style.text="=",this._startShape.style.textPosition=this._endShape.style.textPosition="inside",this.zr.modShape(this._startShape.id),this.zr.modShape(this._endShape.id),this.zr.refreshNextFrame()),this.isDragend=!0},ondragend:function(e,t){this.isDragend&&e.target&&(!this.zoomOption.realtime&&this._syncData(),t.dragOut=!0,t.dragIn=!0,this._isSilence||this.zoomOption.realtime||this.messageCenter.dispatch(r.EVENT.DATA_ZOOM,null,{zoom:this._zoom},this.myChart),t.needRefresh=!1,this.isDragend=!1)},ondataZoom:function(e,t){t.needRefresh=!0},absoluteZoom:function(e){this._zoom.start=e.start,this._zoom.end=e.end,this._zoom.start2=e.start2,this._zoom.end2=e.end2,this._syncShape(),this._syncData(!0)},rectZoom:function(e){if(!e)return this._zoom.start=this._zoom.start2=0,this._zoom.end=this._zoom.end2=100,this._syncShape(),this._syncData(!0),this._zoom;var t=this.component.grid.getArea(),i={x:e.x,y:e.y,width:e.width,height:e.height};if(i.width<0&&(i.x+=i.width,i.width=-i.width),i.height<0&&(i.y+=i.height,i.height=-i.height),i.x>t.x+t.width||i.y>t.y+t.height)return!1;i.x<t.x&&(i.x=t.x),i.x+i.width>t.x+t.width&&(i.width=t.x+t.width-i.x),i.y+i.height>t.y+t.height&&(i.height=t.y+t.height-i.y);var n,a=(i.x-t.x)/t.width,o=1-(i.x+i.width-t.x)/t.width,r=1-(i.y+i.height-t.y)/t.height,s=(i.y-t.y)/t.height;return"horizontal"==this.zoomOption.orient?(n=this._zoom.end-this._zoom.start,this._zoom.start+=n*a,this._zoom.end-=n*o,n=this._zoom.end2-this._zoom.start2,this._zoom.start2+=n*r,this._zoom.end2-=n*s):(n=this._zoom.end-this._zoom.start,this._zoom.start+=n*r,this._zoom.end-=n*s,n=this._zoom.end2-this._zoom.start2,this._zoom.start2+=n*a,this._zoom.end2-=n*o),this._syncShape(),this._syncData(!0),this._zoom},syncBackupData:function(e){for(var t,i,n=this._originalData.series,a=e.series,o=0,r=a.length;r>o;o++){i=a[o].data||a[o].eventList,t=n[o]?Math.floor(this._zoom.start/100*n[o].length):0;for(var s=0,l=i.length;l>s;s++)n[o]&&(n[o][s+t]=i[s])}},syncOption:function(e){this.silence(!0),this.option=e,this.option.dataZoom=this.reformOption(this.option.dataZoom),this.zoomOption=this.option.dataZoom,this.myChart.canvasSupported||(this.zoomOption.realtime=!1),this.clear(),this._location=this._getLocation(),this._zoom=this._getZoom(),this._backupData(),this.option.dataZoom&&this.option.dataZoom.show&&this._buildShape(),this._syncData(),this.silence(!1)},silence:function(e){this._isSilence=e},getRealDataIndex:function(e,t){if(!this._originalData||0===this._zoom.start&&100==this._zoom.end)return t;var i=this._originalData.series;return i[e]?Math.floor(this._zoom.start/100*i[e].length)+t:-1},resize:function(){this.clear(),this._location=this._getLocation(),this._zoom=this._getZoom(),this.option.dataZoom.show&&this._buildShape()}},l.inherits(t,i),e("../component").define("dataZoom",t),t}),i("echarts/component/categoryAxis",["require","./base","zrender/shape/Text","zrender/shape/Line","zrender/shape/Rectangle","../config","zrender/tool/util","zrender/tool/area","../component"],function(e){function t(e,t,n,a,o,r){if(a.data.length<1)return void console.error("option.data.length < 1.");i.call(this,e,t,n,a,o),this.grid=this.component.grid;for(var s in r)this[s]=r[s];this.refresh(a)}var i=e("./base"),n=e("zrender/shape/Text"),a=e("zrender/shape/Line"),o=e("zrender/shape/Rectangle"),r=e("../config");r.categoryAxis={zlevel:0,z:0,show:!0,position:"bottom",name:"",nameLocation:"end",nameTextStyle:{},boundaryGap:!0,axisLine:{show:!0,onZero:!0,lineStyle:{color:"#48b",width:2,type:"solid"}},axisTick:{show:!0,interval:"auto",inside:!1,length:5,lineStyle:{color:"#333",width:1}},axisLabel:{show:!0,interval:"auto",rotate:0,margin:8,textStyle:{color:"#333"}},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}};var s=e("zrender/tool/util"),l=e("zrender/tool/area");return t.prototype={type:r.COMPONENT_TYPE_AXIS_CATEGORY,_getReformedLabel:function(e){var t=this.getDataFromOption(this.option.data[e]),i=this.option.data[e].formatter||this.option.axisLabel.formatter;return i&&("function"==typeof i?t=i.call(this.myChart,t):"string"==typeof i&&(t=i.replace("{value}",t))),t},_getInterval:function(){var e=this.option.axisLabel.interval;if("auto"==e){var t=this.option.axisLabel.textStyle.fontSize,i=this.option.data,n=this.option.data.length;if(this.isHorizontal())if(n>3){var a,o,r=this.getGap(),h=!1,m=Math.floor(.5/r);for(m=1>m?1:m,e=Math.floor(15/r);!h&&n>e;){e+=m,h=!0,a=Math.floor(r*e);for(var V=Math.floor((n-1)/e)*e;V>=0;V-=e){if(0!==this.option.axisLabel.rotate)o=t;else if(i[V].textStyle)o=l.getTextWidth(this._getReformedLabel(V),this.getFont(s.merge(i[V].textStyle,this.option.axisLabel.textStyle)));else{var U=this._getReformedLabel(V)+"",d=(U.match(/\w/g)||"").length,p=U.length-d;o=d*t*2/3+p*t}if(o>a){h=!1;break}}}}else e=1;else if(n>3){var r=this.getGap();for(e=Math.floor(11/r);t>r*e-6&&n>e;)e++}else e=1}else e="function"==typeof e?1:e-0+1;return e},_buildShape:function(){if(this._interval=this._getInterval(),this.option.show){this.option.splitArea.show&&this._buildSplitArea(),this.option.splitLine.show&&this._buildSplitLine(),this.option.axisLine.show&&this._buildAxisLine(),this.option.axisTick.show&&this._buildAxisTick(),this.option.axisLabel.show&&this._buildAxisLabel();for(var e=0,t=this.shapeList.length;t>e;e++)this.zr.addShape(this.shapeList[e])}},_buildAxisTick:function(){var e,t=this.option.data,i=this.option.data.length,n=this.option.axisTick,o=n.length,r=n.lineStyle.color,s=n.lineStyle.width,l="function"==typeof n.interval?n.interval:"auto"==n.interval&&"function"==typeof this.option.axisLabel.interval?this.option.axisLabel.interval:!1,h=l?1:"auto"==n.interval?this._interval:n.interval-0+1,m=n.onGap,V=m?this.getGap()/2:"undefined"==typeof m&&this.option.boundaryGap?this.getGap()/2:0,U=V>0?-h:0;if(this.isHorizontal())for(var d,p="bottom"==this.option.position?n.inside?this.grid.getYend()-o-1:this.grid.getYend()+1:n.inside?this.grid.getY()+1:this.grid.getY()-o-1,c=U;i>c;c+=h)(!l||l(c,t[c]))&&(d=this.subPixelOptimize(this.getCoordByIndex(c)+(c>=0?V:0),s),e={_axisShape:"axisTick",zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:d,yStart:p,xEnd:d,yEnd:p+o,strokeColor:r,lineWidth:s}},this.shapeList.push(new a(e)));else for(var u,y="left"==this.option.position?n.inside?this.grid.getX()+1:this.grid.getX()-o-1:n.inside?this.grid.getXend()-o-1:this.grid.getXend()+1,c=U;i>c;c+=h)(!l||l(c,t[c]))&&(u=this.subPixelOptimize(this.getCoordByIndex(c)-(c>=0?V:0),s),e={_axisShape:"axisTick",zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:y,yStart:u,xEnd:y+o,yEnd:u,strokeColor:r,lineWidth:s}},this.shapeList.push(new a(e)))},_buildAxisLabel:function(){var e,t,i=this.option.data,a=this.option.data.length,o=this.option.axisLabel,r=o.rotate,l=o.margin,h=o.clickable,m=o.textStyle,V="function"==typeof o.interval?o.interval:!1;if(this.isHorizontal()){var U,d;"bottom"==this.option.position?(U=this.grid.getYend()+l,d="top"):(U=this.grid.getY()-l,d="bottom");for(var p=0;a>p;p+=this._interval)V&&!V(p,i[p])||""===this._getReformedLabel(p)||(t=s.merge(i[p].textStyle||{},m),e={zlevel:this.getZlevelBase(),z:this.getZBase()+3,hoverable:!1,style:{x:this.getCoordByIndex(p),y:U,color:t.color,text:this._getReformedLabel(p),textFont:this.getFont(t),textAlign:t.align||"center",textBaseline:t.baseline||d}},r&&(e.style.textAlign=r>0?"bottom"==this.option.position?"right":"left":"bottom"==this.option.position?"left":"right",e.rotation=[r*Math.PI/180,e.style.x,e.style.y]),this.shapeList.push(new n(this._axisLabelClickable(h,e))))}else{var c,u;"left"==this.option.position?(c=this.grid.getX()-l,u="right"):(c=this.grid.getXend()+l,u="left");for(var p=0;a>p;p+=this._interval)V&&!V(p,i[p])||""===this._getReformedLabel(p)||(t=s.merge(i[p].textStyle||{},m),e={zlevel:this.getZlevelBase(),z:this.getZBase()+3,hoverable:!1,style:{x:c,y:this.getCoordByIndex(p),color:t.color,text:this._getReformedLabel(p),textFont:this.getFont(t),textAlign:t.align||u,textBaseline:t.baseline||0===p&&""!==this.option.name?"bottom":p==a-1&&""!==this.option.name?"top":"middle"}},r&&(e.rotation=[r*Math.PI/180,e.style.x,e.style.y]),this.shapeList.push(new n(this._axisLabelClickable(h,e))))}},_buildSplitLine:function(){var e,t=this.option.data,i=this.option.data.length,n=this.option.splitLine,o=n.lineStyle.type,r=n.lineStyle.width,s=n.lineStyle.color;s=s instanceof Array?s:[s];var l=s.length,h="function"==typeof this.option.axisLabel.interval?this.option.axisLabel.interval:!1,m=n.onGap,V=m?this.getGap()/2:"undefined"==typeof m&&this.option.boundaryGap?this.getGap()/2:0;if(i-=m||"undefined"==typeof m&&this.option.boundaryGap?1:0,this.isHorizontal())for(var U,d=this.grid.getY(),p=this.grid.getYend(),c=0;i>c;c+=this._interval)(!h||h(c,t[c]))&&(U=this.subPixelOptimize(this.getCoordByIndex(c)+V,r),e={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:U,yStart:d,xEnd:U,yEnd:p,strokeColor:s[c/this._interval%l],lineType:o,lineWidth:r}},this.shapeList.push(new a(e)));else for(var u,y=this.grid.getX(),g=this.grid.getXend(),c=0;i>c;c+=this._interval)(!h||h(c,t[c]))&&(u=this.subPixelOptimize(this.getCoordByIndex(c)-V,r),e={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:y,yStart:u,xEnd:g,yEnd:u,strokeColor:s[c/this._interval%l],lineType:o,lineWidth:r}},this.shapeList.push(new a(e)))},_buildSplitArea:function(){var e,t=this.option.data,i=this.option.splitArea,n=i.areaStyle.color;if(n instanceof Array){var a=n.length,r=this.option.data.length,s="function"==typeof this.option.axisLabel.interval?this.option.axisLabel.interval:!1,l=i.onGap,h=l?this.getGap()/2:"undefined"==typeof l&&this.option.boundaryGap?this.getGap()/2:0;if(this.isHorizontal())for(var m,V=this.grid.getY(),U=this.grid.getHeight(),d=this.grid.getX(),p=0;r>=p;p+=this._interval)s&&!s(p,t[p])&&r>p||(m=r>p?this.getCoordByIndex(p)+h:this.grid.getXend(),e={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:d,y:V,width:m-d,height:U,color:n[p/this._interval%a]}},this.shapeList.push(new o(e)),d=m);else for(var c,u=this.grid.getX(),y=this.grid.getWidth(),g=this.grid.getYend(),p=0;r>=p;p+=this._interval)s&&!s(p,t[p])&&r>p||(c=r>p?this.getCoordByIndex(p)-h:this.grid.getY(),e={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:u,y:c,width:y,height:g-c,color:n[p/this._interval%a]}},this.shapeList.push(new o(e)),g=c)}else e={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this.grid.getX(),y:this.grid.getY(),width:this.grid.getWidth(),height:this.grid.getHeight(),color:n}},this.shapeList.push(new o(e))},refresh:function(e){e&&(this.option=this.reformOption(e),this.option.axisLabel.textStyle=this.getTextStyle(this.option.axisLabel.textStyle)),this.clear(),this._buildShape()},getGap:function(){var e=this.option.data.length,t=this.isHorizontal()?this.grid.getWidth():this.grid.getHeight();return this.option.boundaryGap?t/e:t/(e>1?e-1:1)},getCoord:function(e){for(var t=this.option.data,i=t.length,n=this.getGap(),a=this.option.boundaryGap?n/2:0,o=0;i>o;o++){if(this.getDataFromOption(t[o])==e)return a=this.isHorizontal()?this.grid.getX()+a:this.grid.getYend()-a;a+=n}},getCoordByIndex:function(e){if(0>e)return this.isHorizontal()?this.grid.getX():this.grid.getYend();if(e>this.option.data.length-1)return this.isHorizontal()?this.grid.getXend():this.grid.getY();var t=this.getGap(),i=this.option.boundaryGap?t/2:0;return i+=e*t,i=this.isHorizontal()?this.grid.getX()+i:this.grid.getYend()-i},getNameByIndex:function(e){return this.getDataFromOption(this.option.data[e])},getIndexByName:function(e){for(var t=this.option.data,i=t.length,n=0;i>n;n++)if(this.getDataFromOption(t[n])==e)return n;return-1},getValueFromCoord:function(){return""},isMainAxis:function(e){return e%this._interval===0}},s.inherits(t,i),e("../component").define("categoryAxis",t),t}),i("echarts/component/valueAxis",["require","./base","zrender/shape/Text","zrender/shape/Line","zrender/shape/Rectangle","../config","../util/date","zrender/tool/util","../util/smartSteps","../util/accMath","../util/smartLogSteps","../component"],function(e){function t(e,t,n,a,o,r,s){if(!s||0===s.length)return void console.err("option.series.length == 0.");i.call(this,e,t,n,a,o),this.series=s,this.grid=this.component.grid;for(var l in r)this[l]=r[l];this.refresh(a,s)}var i=e("./base"),n=e("zrender/shape/Text"),a=e("zrender/shape/Line"),o=e("zrender/shape/Rectangle"),r=e("../config");r.valueAxis={zlevel:0,z:0,show:!0,position:"left",name:"",nameLocation:"end",nameTextStyle:{},boundaryGap:[0,0],axisLine:{show:!0,onZero:!0,lineStyle:{color:"#48b",width:2,type:"solid"}},axisTick:{show:!1,inside:!1,length:5,lineStyle:{color:"#333",width:1}},axisLabel:{show:!0,rotate:0,margin:8,textStyle:{color:"#333"}},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}};var s=e("../util/date"),l=e("zrender/tool/util");return t.prototype={type:r.COMPONENT_TYPE_AXIS_VALUE,_buildShape:function(){if(this._hasData=!1,this._calculateValue(),this._hasData&&this.option.show){this.option.splitArea.show&&this._buildSplitArea(),this.option.splitLine.show&&this._buildSplitLine(),this.option.axisLine.show&&this._buildAxisLine(),this.option.axisTick.show&&this._buildAxisTick(),this.option.axisLabel.show&&this._buildAxisLabel();for(var e=0,t=this.shapeList.length;t>e;e++)this.zr.addShape(this.shapeList[e])}},_buildAxisTick:function(){var e,t=this._valueList,i=this._valueList.length,n=this.option.axisTick,o=n.length,r=n.lineStyle.color,s=n.lineStyle.width;if(this.isHorizontal())for(var l,h="bottom"===this.option.position?n.inside?this.grid.getYend()-o-1:this.grid.getYend()+1:n.inside?this.grid.getY()+1:this.grid.getY()-o-1,m=0;i>m;m++)l=this.subPixelOptimize(this.getCoord(t[m]),s),e={_axisShape:"axisTick",zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:l,yStart:h,xEnd:l,yEnd:h+o,strokeColor:r,lineWidth:s}},this.shapeList.push(new a(e));else for(var V,U="left"===this.option.position?n.inside?this.grid.getX()+1:this.grid.getX()-o-1:n.inside?this.grid.getXend()-o-1:this.grid.getXend()+1,m=0;i>m;m++)V=this.subPixelOptimize(this.getCoord(t[m]),s),e={_axisShape:"axisTick",zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:U,yStart:V,xEnd:U+o,yEnd:V,strokeColor:r,lineWidth:s}},this.shapeList.push(new a(e))},_buildAxisLabel:function(){var e,t=this._valueList,i=this._valueList.length,a=this.option.axisLabel.rotate,o=this.option.axisLabel.margin,r=this.option.axisLabel.clickable,s=this.option.axisLabel.textStyle;if(this.isHorizontal()){var l,h;"bottom"===this.option.position?(l=this.grid.getYend()+o,h="top"):(l=this.grid.getY()-o,h="bottom");for(var m=0;i>m;m++)e={zlevel:this.getZlevelBase(),z:this.getZBase()+3,hoverable:!1,style:{x:this.getCoord(t[m]),y:l,color:"function"==typeof s.color?s.color(t[m]):s.color,text:this._valueLabel[m],textFont:this.getFont(s),textAlign:s.align||"center",textBaseline:s.baseline||h}},a&&(e.style.textAlign=a>0?"bottom"===this.option.position?"right":"left":"bottom"===this.option.position?"left":"right",e.rotation=[a*Math.PI/180,e.style.x,e.style.y]),this.shapeList.push(new n(this._axisLabelClickable(r,e)))}else{var V,U;"left"===this.option.position?(V=this.grid.getX()-o,U="right"):(V=this.grid.getXend()+o,U="left");for(var m=0;i>m;m++)e={zlevel:this.getZlevelBase(),z:this.getZBase()+3,hoverable:!1,style:{x:V,y:this.getCoord(t[m]),color:"function"==typeof s.color?s.color(t[m]):s.color,text:this._valueLabel[m],textFont:this.getFont(s),textAlign:s.align||U,textBaseline:s.baseline||(0===m&&""!==this.option.name?"bottom":m===i-1&&""!==this.option.name?"top":"middle")}},a&&(e.rotation=[a*Math.PI/180,e.style.x,e.style.y]),this.shapeList.push(new n(this._axisLabelClickable(r,e)))}},_buildSplitLine:function(){var e,t=this._valueList,i=this._valueList.length,n=this.option.splitLine,o=n.lineStyle.type,r=n.lineStyle.width,s=n.lineStyle.color;s=s instanceof Array?s:[s];var l=s.length;if(this.isHorizontal())for(var h,m=this.grid.getY(),V=this.grid.getYend(),U=0;i>U;U++)h=this.subPixelOptimize(this.getCoord(t[U]),r),e={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:h,yStart:m,xEnd:h,yEnd:V,strokeColor:s[U%l],lineType:o,lineWidth:r}},this.shapeList.push(new a(e));else for(var d,p=this.grid.getX(),c=this.grid.getXend(),U=0;i>U;U++)d=this.subPixelOptimize(this.getCoord(t[U]),r),e={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:p,yStart:d,xEnd:c,yEnd:d,strokeColor:s[U%l],lineType:o,lineWidth:r}},this.shapeList.push(new a(e))},_buildSplitArea:function(){var e,t=this.option.splitArea.areaStyle.color;if(t instanceof Array){var i=t.length,n=this._valueList,a=this._valueList.length;if(this.isHorizontal())for(var r,s=this.grid.getY(),l=this.grid.getHeight(),h=this.grid.getX(),m=0;a>=m;m++)r=a>m?this.getCoord(n[m]):this.grid.getXend(),e={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:h,y:s,width:r-h,height:l,color:t[m%i]}},this.shapeList.push(new o(e)),h=r;else for(var V,U=this.grid.getX(),d=this.grid.getWidth(),p=this.grid.getYend(),m=0;a>=m;m++)V=a>m?this.getCoord(n[m]):this.grid.getY(),e={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:U,y:V,width:d,height:p-V,color:t[m%i]}},this.shapeList.push(new o(e)),p=V}else e={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this.grid.getX(),y:this.grid.getY(),width:this.grid.getWidth(),height:this.grid.getHeight(),color:t}},this.shapeList.push(new o(e))},_calculateValue:function(){if(isNaN(this.option.min-0)||isNaN(this.option.max-0)){for(var e,t,i={},n=this.component.legend,a=0,o=this.series.length;o>a;a++)!(this.series[a].type!=r.CHART_TYPE_LINE&&this.series[a].type!=r.CHART_TYPE_BAR&&this.series[a].type!=r.CHART_TYPE_SCATTER&&this.series[a].type!=r.CHART_TYPE_K&&this.series[a].type!=r.CHART_TYPE_EVENTRIVER||n&&!n.isSelected(this.series[a].name)||(e=this.series[a].xAxisIndex||0,t=this.series[a].yAxisIndex||0,this.option.xAxisIndex!=e&&this.option.yAxisIndex!=t||!this._calculSum(i,a)));var s;for(var a in i){s=i[a];for(var l=0,h=s.length;h>l;l++)if(!isNaN(s[l])){this._hasData=!0,this._min=s[l],this._max=s[l];break}if(this._hasData)break}for(var a in i){s=i[a];for(var l=0,h=s.length;h>l;l++)isNaN(s[l])||(this._min=Math.min(this._min,s[l]),this._max=Math.max(this._max,s[l]))}var m="log"!==this.option.type?this.option.boundaryGap:[0,0],V=Math.abs(this._max-this._min);this._min=isNaN(this.option.min-0)?this._min-Math.abs(V*m[0]):this.option.min-0,this._max=isNaN(this.option.max-0)?this._max+Math.abs(V*m[1]):this.option.max-0,this._min===this._max&&(0===this._max?this._max=1:this._max>0?this._min=this._max/this.option.splitNumber!=null?this.option.splitNumber:5:this._max=this._max/this.option.splitNumber!=null?this.option.splitNumber:5),"time"===this.option.type?this._reformTimeValue():"log"===this.option.type?this._reformLogValue():this._reformValue(this.option.scale)}else this._hasData=!0,this._min=this.option.min-0,this._max=this.option.max-0,"time"===this.option.type?this._reformTimeValue():"log"===this.option.type?this._reformLogValue():this._customerValue()},_calculSum:function(e,t){var i,n,a=this.series[t].name||"kener";if(this.series[t].stack){var o="__Magic_Key_Positive__"+this.series[t].stack,l="__Magic_Key_Negative__"+this.series[t].stack;e[o]=e[o]||[],e[l]=e[l]||[],e[a]=e[a]||[],n=this.series[t].data;for(var h=0,m=n.length;m>h;h++)i=this.getDataFromOption(n[h]),"-"!==i&&(i-=0,i>=0?null!=e[o][h]?e[o][h]+=i:e[o][h]=i:null!=e[l][h]?e[l][h]+=i:e[l][h]=i,this.option.scale&&e[a].push(i))}else if(e[a]=e[a]||[],this.series[t].type!=r.CHART_TYPE_EVENTRIVER){n=this.series[t].data;for(var h=0,m=n.length;m>h;h++)i=this.getDataFromOption(n[h]),this.series[t].type===r.CHART_TYPE_K?(e[a].push(i[0]),e[a].push(i[1]),e[a].push(i[2]),e[a].push(i[3])):i instanceof Array?(-1!=this.option.xAxisIndex&&e[a].push("time"!=this.option.type?i[0]:s.getNewDate(i[0])),-1!=this.option.yAxisIndex&&e[a].push("time"!=this.option.type?i[1]:s.getNewDate(i[1]))):e[a].push(i)}else{n=this.series[t].data;for(var h=0,m=n.length;m>h;h++)for(var V=n[h].evolution,U=0,d=V.length;d>U;U++)e[a].push(s.getNewDate(V[U].time))}},_reformValue:function(t){var i=e("../util/smartSteps"),n=this.option.splitNumber;!t&&this._min>=0&&this._max>=0&&(this._min=0),!t&&this._min<=0&&this._max<=0&&(this._max=0);var a=i(this._min,this._max,n);n=null!=n?n:a.secs,this._min=a.min,this._max=a.max,this._valueList=a.pnts,this._reformLabelData()},_reformTimeValue:function(){var e=null!=this.option.splitNumber?this.option.splitNumber:5,t=s.getAutoFormatter(this._min,this._max,e),i=t.formatter,n=t.gapValue;this._valueList=[s.getNewDate(this._min)];var a;switch(i){case"week":a=s.nextMonday(this._min);break;case"month":a=s.nextNthOnMonth(this._min,1);break;case"quarter":a=s.nextNthOnQuarterYear(this._min,1);break;case"half-year":a=s.nextNthOnHalfYear(this._min,1);break;case"year":a=s.nextNthOnYear(this._min,1);break;default:72e5>=n?a=(Math.floor(this._min/n)+1)*n:(a=s.getNewDate(this._min- -n),a.setHours(6*Math.round(a.getHours()/6)),a.setMinutes(0),a.setSeconds(0))}for(a-this._min<n/2&&(a-=-n),t=s.getNewDate(a),e*=1.5;e-->=0&&(("month"==i||"quarter"==i||"half-year"==i||"year"==i)&&t.setDate(1),!(this._max-t<n/2));)this._valueList.push(t),t=s.getNewDate(t- -n);this._valueList.push(s.getNewDate(this._max)),this._reformLabelData(function(e){return function(t){return s.format(e,t)}}(i))},_customerValue:function(){var t=e("../util/accMath"),i=null!=this.option.splitNumber?this.option.splitNumber:5,n=(this._max-this._min)/i;this._valueList=[];for(var a=0;i>=a;a++)this._valueList.push(t.accAdd(this._min,t.accMul(n,a)));this._reformLabelData()},_reformLogValue:function(){var t=this.option,i=e("../util/smartLogSteps")({dataMin:this._min,dataMax:this._max,logPositive:t.logPositive,logLabelBase:t.logLabelBase,splitNumber:t.splitNumber});this._min=i.dataMin,this._max=i.dataMax,this._valueList=i.tickList,this._dataMappingMethods=i.dataMappingMethods,this._reformLabelData(i.labelFormatter)},_reformLabelData:function(e){this._valueLabel=[];var t=this.option.axisLabel.formatter;if(t)for(var i=0,n=this._valueList.length;n>i;i++)"function"==typeof t?this._valueLabel.push(e?t.call(this.myChart,this._valueList[i],e):t.call(this.myChart,this._valueList[i])):"string"==typeof t&&this._valueLabel.push(e?s.format(t,this._valueList[i]):t.replace("{value}",this._valueList[i]));else for(var i=0,n=this._valueList.length;n>i;i++)this._valueLabel.push(e?e(this._valueList[i]):this.numAddCommas(this._valueList[i]))},getExtremum:function(){this._calculateValue();var e=this._dataMappingMethods;return{min:this._min,max:this._max,dataMappingMethods:e?l.merge({},e):null}},refresh:function(e,t){e&&(this.option=this.reformOption(e),this.option.axisLabel.textStyle=l.merge(this.option.axisLabel.textStyle||{},this.ecTheme.textStyle),this.series=t),this.zr&&(this.clear(),this._buildShape())},getCoord:function(e){this._dataMappingMethods&&(e=this._dataMappingMethods.value2Coord(e)),e=e<this._min?this._min:e,e=e>this._max?this._max:e;var t;return t=this.isHorizontal()?this.grid.getX()+(e-this._min)/(this._max-this._min)*this.grid.getWidth():this.grid.getYend()-(e-this._min)/(this._max-this._min)*this.grid.getHeight()},getCoordSize:function(e){return Math.abs(this.isHorizontal()?e/(this._max-this._min)*this.grid.getWidth():e/(this._max-this._min)*this.grid.getHeight())},getValueFromCoord:function(e){var t;return this.isHorizontal()?(e=e<this.grid.getX()?this.grid.getX():e,e=e>this.grid.getXend()?this.grid.getXend():e,t=this._min+(e-this.grid.getX())/this.grid.getWidth()*(this._max-this._min)):(e=e<this.grid.getY()?this.grid.getY():e,e=e>this.grid.getYend()?this.grid.getYend():e,t=this._max-(e-this.grid.getY())/this.grid.getHeight()*(this._max-this._min)),this._dataMappingMethods&&(t=this._dataMappingMethods.coord2Value(t)),t.toFixed(2)-0},isMaindAxis:function(e){for(var t=0,i=this._valueList.length;i>t;t++)if(this._valueList[t]===e)return!0;return!1}},l.inherits(t,i),e("../component").define("valueAxis",t),t}),i("echarts/util/date",[],function(){function e(e,t,i){i=i>1?i:2;for(var n,a,o,r,s=0,l=m.length;l>s;s++)if(n=m[s].value,a=Math.ceil(t/n)*n-Math.floor(e/n)*n,Math.round(a/n)<=1.2*i){o=m[s].formatter,r=m[s].value;break}return null==o&&(o="year",n=317088e5,a=Math.ceil(t/n)*n-Math.floor(e/n)*n,r=Math.round(a/(i-1)/n)*n),{formatter:o,gapValue:r}}function t(e){return 10>e?"0"+e:e}function i(e,i){("week"==e||"month"==e||"quarter"==e||"half-year"==e||"year"==e)&&(e="MM - dd\nyyyy");var n=h(i),a=n.getFullYear(),o=n.getMonth()+1,r=n.getDate(),s=n.getHours(),l=n.getMinutes(),m=n.getSeconds();return e=e.replace("MM",t(o)),e=e.toLowerCase(),e=e.replace("yyyy",a),e=e.replace("yy",a%100),e=e.replace("dd",t(r)),e=e.replace("d",r),e=e.replace("hh",t(s)),e=e.replace("h",s),e=e.replace("mm",t(l)),e=e.replace("m",l),e=e.replace("ss",t(m)),e=e.replace("s",m)}function n(e){return e=h(e),e.setDate(e.getDate()+8-e.getDay()),e}function a(e,t,i){return e=h(e),e.setMonth(Math.ceil((e.getMonth()+1)/i)*i),e.setDate(t),e}function o(e,t){return a(e,t,1)}function r(e,t){return a(e,t,3)}function s(e,t){return a(e,t,6)}function l(e,t){return a(e,t,12)}function h(e){return e instanceof Date?e:new Date("string"==typeof e?e.replace(/-/g,"/"):e)}var m=[{formatter:"hh : mm : ss",value:1e3},{formatter:"hh : mm : ss",value:5e3},{formatter:"hh : mm : ss",value:1e4},{formatter:"hh : mm : ss",value:15e3},{formatter:"hh : mm : ss",value:3e4},{formatter:"hh : mm\nMM - dd",value:6e4},{formatter:"hh : mm\nMM - dd",value:3e5},{formatter:"hh : mm\nMM - dd",value:6e5},{formatter:"hh : mm\nMM - dd",value:9e5},{formatter:"hh : mm\nMM - dd",value:18e5},{formatter:"hh : mm\nMM - dd",value:36e5},{formatter:"hh : mm\nMM - dd",value:72e5},{formatter:"hh : mm\nMM - dd",value:216e5},{formatter:"hh : mm\nMM - dd",value:432e5},{formatter:"MM - dd\nyyyy",value:864e5},{formatter:"week",value:6048e5},{formatter:"month",value:26784e5},{formatter:"quarter",value:8208e6},{formatter:"half-year",value:16416e6},{formatter:"year",value:32832e6}];return{getAutoFormatter:e,getNewDate:h,format:i,nextMonday:n,nextNthPerNmonth:a,nextNthOnMonth:o,nextNthOnQuarterYear:r,nextNthOnHalfYear:s,nextNthOnYear:l}}),i("echarts/util/smartSteps",[],function(){function e(e){return X.log(I(e))/X.LN10}function t(e){return X.pow(10,e)}function i(e){return e===w(e)}function n(e,t,n,a){b=a||{},f=b.steps||L,k=b.secs||W,n=v(+n||0)%99,e=+e||0,t=+t||0,x=_=0,"min"in b&&(e=+b.min||0,x=1),"max"in b&&(t=+b.max||0,_=1),e>t&&(t=[e,e=t][0]);var o=t-e;if(x&&_)return g(e,t,n);if((n||5)>o){if(i(e)&&i(t))return d(e,t,n);if(0===o)return p(e,t,n)}return h(e,t,n)}function a(e,i,n,a){a=a||0;var s=o((i-e)/n,-1),l=o(e,-1,1),h=o(i,-1),m=X.min(s.e,l.e,h.e);0===l.c?m=X.min(s.e,h.e):0===h.c&&(m=X.min(s.e,l.e)),r(s,{c:0,e:m}),r(l,s,1),r(h,s),a+=m,e=l.c,i=h.c;for(var V=(i-e)/n,U=t(a),d=0,p=[],c=n+1;c--;)p[c]=(e+V*c)*U;if(0>a){d=u(U),V=+(V*U).toFixed(d),e=+(e*U).toFixed(d),i=+(i*U).toFixed(d);for(var c=p.length;c--;)p[c]=p[c].toFixed(d),0===+p[c]&&(p[c]="0")}else e*=U,i*=U,V*=U;return k=0,f=0,b=0,{min:e,max:i,secs:n,step:V,fix:d,exp:a,pnts:p}}function o(n,a,o){a=v(a%10)||2,0>a&&(i(n)?a=(""+I(n)).replace(/0+$/,"").length||1:(n=n.toFixed(15).replace(/0+$/,""),a=n.replace(".","").replace(/^[-0]+/,"").length,n=+n));var r=w(e(n))-a+1,s=+(n*t(-r)).toFixed(15)||0;return s=o?w(s):K(s),!s&&(r=0),(""+I(s)).length>a&&(r+=1,s/=10),{c:s,e:r}}function r(e,i,n){var a=i.e-e.e;a&&(e.e+=a,e.c*=t(-a),e.c=n?w(e.c):K(e.c))}function s(e,t,i){e.e<t.e?r(t,e,i):r(e,t,i)}function l(e,t){t=t||L,e=o(e);for(var i=e.c,n=0;i>t[n];)n++;if(!t[n])for(i/=10,e.e+=1,n=0;i>t[n];)n++;return e.c=t[n],e}function h(e,t,n){var s,h=n||+k.slice(-1),p=l((t-e)/h,f),u=o(t-e),g=o(e,-1,1),b=o(t,-1);if(r(u,p),r(g,p,1),r(b,p),n?s=V(g,b,h):h=m(g,b),i(e)&&i(t)&&e*t>=0){if(h>t-e)return d(e,t,h);h=U(e,t,n,g,b,h)}var L=c(e,t,g.c,b.c);return g.c=L[0],b.c=L[1],(x||_)&&y(e,t,g,b),a(g.c,b.c,h,b.e)}function m(e,i){for(var n,a,o,r,s=[],h=k.length;h--;)n=k[h],a=l((i.c-e.c)/n,f),a=a.c*t(a.e),o=w(e.c/a)*a,r=K(i.c/a)*a,s[h]={min:o,max:r,step:a,span:r-o};return s.sort(function(e,t){var i=e.span-t.span;return 0===i&&(i=e.step-t.step),i}),s=s[0],n=s.span/s.step,e.c=s.min,i.c=s.max,3>n?2*n:n}function V(e,i,n){for(var a,o,r=i.c,s=(i.c-e.c)/n-1;r>e.c;)s=l(s+1,f),s=s.c*t(s.e),a=s*n,o=K(i.c/s)*s,r=o-a;var h=e.c-r,m=o-i.c,V=h-m;return V>1.1*s&&(V=v(V/s/2)*s,r+=V,o+=V),e.c=r,i.c=o,s}function U(e,n,a,o,r,s){var l=r.c-o.c,h=l/s*t(r.e);if(!i(h)&&(h=w(h),l=h*s,n-e>l&&(h+=1,l=h*s,!a&&h*(s-1)>=n-e&&(s-=1,l=h*s)),l>=n-e)){var m=l-(n-e);o.c=v(e-m/2),r.c=v(n+m/2),o.e=0,r.e=0}return s}function d(e,t,i){if(i=i||5,x)t=e+i;else if(_)e=t-i;else{var n=i-(t-e),o=v(e-n/2),r=v(t+n/2),s=c(e,t,o,r);e=s[0],t=s[1]}return a(e,t,i)}function p(e,t,i){i=i||5;var n=X.min(I(t/i),i)/2.1;return x?t=e+n:_?e=t-n:(e-=n,t+=n),h(e,t,i)}function c(e,t,i,n){
+return e>=0&&0>i?(n-=i,i=0):0>=t&&n>0&&(i-=n,n=0),[i,n]}function u(e){return e=(+e).toFixed(15).split("."),e.pop().replace(/0+$/,"").length}function y(e,t,i,n){if(x){var a=o(e,4,1);i.e-a.e>6&&(a={c:0,e:i.e}),s(i,a),s(n,a),n.c+=a.c-i.c,i.c=a.c}else if(_){var r=o(t,4);n.e-r.e>6&&(r={c:0,e:n.e}),s(i,r),s(n,r),i.c+=r.c-n.c,n.c=r.c}}function g(e,t,i){var n=i?[i]:k,s=t-e;if(0===s)return t=o(t,3),i=n[0],t.c=v(t.c+i/2),a(t.c-i,t.c,i,t.e);I(t/s)<1e-6&&(t=0),I(e/s)<1e-6&&(e=0);var l,h,m,V=[[5,10],[10,2],[50,10],[100,2]],U=[],d=[],p=o(t-e,3),c=o(e,-1,1),u=o(t,-1);r(c,p,1),r(u,p),s=u.c-c.c,p.c=s;for(var y=n.length;y--;){i=n[y],l=K(s/i),h=l*i-s,m=3*(h+3),m+=2*(i-n[0]+2),i%5===0&&(m-=10);for(var g=V.length;g--;)l%V[g][0]===0&&(m/=V[g][1]);d[y]=[i,l,h,m].join(),U[y]={secs:i,step:l,delta:h,score:m}}return U.sort(function(e,t){return e.score-t.score}),U=U[0],c.c=v(c.c-U.delta/2),u.c=v(u.c+U.delta/2),a(c.c,u.c,U.secs,p.e)}var b,f,k,x,_,L=[10,20,25,50],W=[4,5,6],X=Math,v=X.round,w=X.floor,K=X.ceil,I=X.abs;return n}),i("echarts/util/smartLogSteps",["require","./number"],function(e){function t(e){return i(),u=e||{},n(),a(),[o(),i()][0]}function i(){U=u=g=c=b=f=y=k=d=p=null}function n(){d=u.logLabelBase,null==d?(p="plain",d=10,c=I):(d=+d,1>d&&(d=10),p="exponent",c=L(d)),y=u.splitNumber,null==y&&(y=E);var e=parseFloat(u.dataMin),t=parseFloat(u.dataMax);isFinite(e)||isFinite(t)?isFinite(e)?isFinite(t)?e>t&&(t=[e,e=t][0]):t=e:e=t:e=t=1,U=u.logPositive,null==U&&(U=t>0||0===e),b=U?e:-t,f=U?t:-e,S>b&&(b=S),S>f&&(f=S)}function a(){function e(){y>m&&(y=m);var e=w(l(m/y)),t=v(l(m/e)),i=e*t,n=(i-U)/2,a=w(l(r-n));V(a-r)&&(a-=1),g=-a*c;for(var s=a;o>=s-e;s+=e)k.push(W(d,s))}function t(){for(var e=i(h,0),t=e+2;t>e&&a(e+1)+n(e+1)*C<r;)e++;for(var l=i(s,0),t=l-2;l>t&&a(l-1)+n(l-1)*C>o;)l--;g=-(a(e)*I+n(e)*J);for(var m=e;l>=m;m++){var V=a(m),U=n(m);k.push(W(10,V)*W(2,U))}}function i(e,t){return 3*e+t}function n(e){return e-3*a(e)}function a(e){return w(l(e/3))}k=[];var o=l(L(f)/c),r=l(L(b)/c),s=v(o),h=w(r),m=s-h,U=o-r;"exponent"===p?e():F>=m&&y>F?t():e()}function o(){for(var e=[],t=0,i=k.length;i>t;t++)e[t]=(U?1:-1)*k[t];!U&&e.reverse();var n=s(),a=n.value2Coord,o=a(e[0]),l=a(e[e.length-1]);return o===l&&(o-=1,l+=1),{dataMin:o,dataMax:l,tickList:e,logPositive:U,labelFormatter:r(),dataMappingMethods:n}}function r(){if("exponent"===p){var e=d,t=c;return function(i){if(!isFinite(parseFloat(i)))return"";var n="";return 0>i&&(i=-i,n="-"),n+e+m(L(i)/t)}}return function(e){return isFinite(parseFloat(e))?x.addCommas(h(e)):""}}function s(){var e=U,t=g;return{value2Coord:function(i){return null==i||isNaN(i)||!isFinite(i)?i:(i=parseFloat(i),isFinite(i)?e&&S>i?i=S:!e&&i>-S&&(i=-S):i=S,i=X(i),(e?1:-1)*(L(i)+t))},coord2Value:function(i){return null==i||isNaN(i)||!isFinite(i)?i:(i=parseFloat(i),isFinite(i)||(i=S),e?W(K,i-t):-W(K,-i+t))}}}function l(e){return+Number(+e).toFixed(14)}function h(e){return Number(e).toFixed(15).replace(/\.?0*$/,"")}function m(e){e=h(Math.round(e));for(var t=[],i=0,n=e.length;n>i;i++){var a=e.charAt(i);t.push(T[a]||"")}return t.join("")}function V(e){return e>-S&&S>e}var U,d,p,c,u,y,g,b,f,k,x=e("./number"),_=Math,L=_.log,W=_.pow,X=_.abs,v=_.ceil,w=_.floor,K=_.E,I=_.LN10,J=_.LN2,C=J/I,S=1e-9,E=5,F=2,T={0:"â°",1:"¹",2:"²",3:"³",4:"â´",5:"âµ",6:"â¶",7:"â·",8:"â¸",9:"â¹","-":"â»"};return t}),i("echarts/chart/line",["require","./base","zrender/shape/Polyline","../util/shape/Icon","../util/shape/HalfSmoothPolygon","../component/axis","../component/grid","../component/dataZoom","../config","../util/ecData","zrender/tool/util","zrender/tool/color","../chart"],function(e){function t(e,t,i,a,o){n.call(this,e,t,i,a,o),this.refresh(a)}function i(e,t,i){var n=t.x,a=t.y,r=t.width,s=t.height,l=s/2;t.symbol.match("empty")&&(e.fillStyle="#fff"),t.brushType="both";var h=t.symbol.replace("empty","").toLowerCase();h.match("star")?(l=h.replace("star","")-0||5,a-=1,h="star"):("rectangle"===h||"arrow"===h)&&(n+=(r-s)/2,r=s);var m="";if(h.match("image")&&(m=h.replace(new RegExp("^image:\\/\\/"),""),h="image",n+=Math.round((r-s)/2)-1,r=s+=2),h=o.prototype.iconLibrary[h]){var V=t.x,U=t.y;e.moveTo(V,U+l),e.lineTo(V+5,U+l),e.moveTo(V+t.width-5,U+l),e.lineTo(V+t.width,U+l);var d=this;h(e,{x:n+4,y:a+4,width:r-8,height:s-8,n:l,image:m},function(){d.modSelf(),i()})}else e.moveTo(n,a+l),e.lineTo(n+r,a+l)}var n=e("./base"),a=e("zrender/shape/Polyline"),o=e("../util/shape/Icon"),r=e("../util/shape/HalfSmoothPolygon");e("../component/axis"),e("../component/grid"),e("../component/dataZoom");var s=e("../config");s.line={zlevel:0,z:2,clickable:!0,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,dataFilter:"nearest",itemStyle:{normal:{label:{show:!1},lineStyle:{width:2,type:"solid",shadowColor:"rgba(0,0,0,0)",shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0}},emphasis:{label:{show:!1}}},symbolSize:2,showAllSymbol:!1};var l=e("../util/ecData"),h=e("zrender/tool/util"),m=e("zrender/tool/color");return t.prototype={type:s.CHART_TYPE_LINE,_buildShape:function(){this.finalPLMap={},this._buildPosition()},_buildHorizontal:function(e,t,i,n){for(var a,o,r,s,l,h,m,V,U,d=this.series,p=i[0][0],c=d[p],u=this.component.xAxis.getAxis(c.xAxisIndex||0),y={},g=0,b=t;b>g&&null!=u.getNameByIndex(g);g++){o=u.getCoordByIndex(g);for(var f=0,k=i.length;k>f;f++){a=this.component.yAxis.getAxis(d[i[f][0]].yAxisIndex||0),l=s=m=h=a.getCoord(0);for(var x=0,_=i[f].length;_>x;x++)p=i[f][x],c=d[p],V=c.data[g],U=this.getDataFromOption(V,"-"),y[p]=y[p]||[],n[p]=n[p]||{min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY,sum:0,counter:0,average:0},"-"!==U?(U>=0?(s-=x>0?a.getCoordSize(U):l-a.getCoord(U),r=s):0>U&&(h+=x>0?a.getCoordSize(U):a.getCoord(U)-m,r=h),y[p].push([o,r,g,u.getNameByIndex(g),o,l]),n[p].min>U&&(n[p].min=U,n[p].minY=r,n[p].minX=o),n[p].max<U&&(n[p].max=U,n[p].maxY=r,n[p].maxX=o),n[p].sum+=U,n[p].counter++):y[p].length>0&&(this.finalPLMap[p]=this.finalPLMap[p]||[],this.finalPLMap[p].push(y[p]),y[p]=[])}s=this.component.grid.getY();for(var L,f=0,k=i.length;k>f;f++)for(var x=0,_=i[f].length;_>x;x++)p=i[f][x],c=d[p],V=c.data[g],U=this.getDataFromOption(V,"-"),"-"==U&&this.deepQuery([V,c,this.option],"calculable")&&(L=this.deepQuery([V,c],"symbolSize"),s+=2*L+5,r=s,this.shapeList.push(this._getCalculableItem(p,g,u.getNameByIndex(g),o,r,"horizontal")))}for(var W in y)y[W].length>0&&(this.finalPLMap[W]=this.finalPLMap[W]||[],this.finalPLMap[W].push(y[W]),y[W]=[]);this._calculMarkMapXY(n,i,"y"),this._buildBorkenLine(e,this.finalPLMap,u,"horizontal")},_buildVertical:function(e,t,i,n){for(var a,o,r,s,l,h,m,V,U,d=this.series,p=i[0][0],c=d[p],u=this.component.yAxis.getAxis(c.yAxisIndex||0),y={},g=0,b=t;b>g&&null!=u.getNameByIndex(g);g++){r=u.getCoordByIndex(g);for(var f=0,k=i.length;k>f;f++){a=this.component.xAxis.getAxis(d[i[f][0]].xAxisIndex||0),l=s=m=h=a.getCoord(0);for(var x=0,_=i[f].length;_>x;x++)p=i[f][x],c=d[p],V=c.data[g],U=this.getDataFromOption(V,"-"),y[p]=y[p]||[],n[p]=n[p]||{min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY,sum:0,counter:0,average:0},"-"!==U?(U>=0?(s+=x>0?a.getCoordSize(U):a.getCoord(U)-l,o=s):0>U&&(h-=x>0?a.getCoordSize(U):m-a.getCoord(U),o=h),y[p].push([o,r,g,u.getNameByIndex(g),l,r]),n[p].min>U&&(n[p].min=U,n[p].minX=o,n[p].minY=r),n[p].max<U&&(n[p].max=U,n[p].maxX=o,n[p].maxY=r),n[p].sum+=U,n[p].counter++):y[p].length>0&&(this.finalPLMap[p]=this.finalPLMap[p]||[],this.finalPLMap[p].push(y[p]),y[p]=[])}s=this.component.grid.getXend();for(var L,f=0,k=i.length;k>f;f++)for(var x=0,_=i[f].length;_>x;x++)p=i[f][x],c=d[p],V=c.data[g],U=this.getDataFromOption(V,"-"),"-"==U&&this.deepQuery([V,c,this.option],"calculable")&&(L=this.deepQuery([V,c],"symbolSize"),s-=2*L+5,o=s,this.shapeList.push(this._getCalculableItem(p,g,u.getNameByIndex(g),o,r,"vertical")))}for(var W in y)y[W].length>0&&(this.finalPLMap[W]=this.finalPLMap[W]||[],this.finalPLMap[W].push(y[W]),y[W]=[]);this._calculMarkMapXY(n,i,"x"),this._buildBorkenLine(e,this.finalPLMap,u,"vertical")},_buildOther:function(e,t,i,n){for(var a,o=this.series,r={},s=0,l=i.length;l>s;s++)for(var h=0,m=i[s].length;m>h;h++){var V=i[s][h],U=o[V];a=this.component.xAxis.getAxis(U.xAxisIndex||0);var d=this.component.yAxis.getAxis(U.yAxisIndex||0),p=d.getCoord(0);r[V]=r[V]||[],n[V]=n[V]||{min0:Number.POSITIVE_INFINITY,min1:Number.POSITIVE_INFINITY,max0:Number.NEGATIVE_INFINITY,max1:Number.NEGATIVE_INFINITY,sum0:0,sum1:0,counter0:0,counter1:0,average0:0,average1:0};for(var c=0,u=U.data.length;u>c;c++){var y=U.data[c],g=this.getDataFromOption(y,"-");if(g instanceof Array){var b=a.getCoord(g[0]),f=d.getCoord(g[1]);r[V].push([b,f,c,g[0],b,p]),n[V].min0>g[0]&&(n[V].min0=g[0],n[V].minY0=f,n[V].minX0=b),n[V].max0<g[0]&&(n[V].max0=g[0],n[V].maxY0=f,n[V].maxX0=b),n[V].sum0+=g[0],n[V].counter0++,n[V].min1>g[1]&&(n[V].min1=g[1],n[V].minY1=f,n[V].minX1=b),n[V].max1<g[1]&&(n[V].max1=g[1],n[V].maxY1=f,n[V].maxX1=b),n[V].sum1+=g[1],n[V].counter1++}}}for(var k in r)r[k].length>0&&(this.finalPLMap[k]=this.finalPLMap[k]||[],this.finalPLMap[k].push(r[k]),r[k]=[]);this._calculMarkMapXY(n,i,"xy"),this._buildBorkenLine(e,this.finalPLMap,a,"other")},_buildBorkenLine:function(e,t,i,n){for(var o,s="other"==n?"horizontal":n,V=this.series,U=e.length-1;U>=0;U--){var d=e[U],p=V[d],c=t[d];if(p.type===this.type&&null!=c)for(var u=this._getBbox(d,s),y=this._sIndex2ColorMap[d],g=this.query(p,"itemStyle.normal.lineStyle.width"),b=this.query(p,"itemStyle.normal.lineStyle.type"),f=this.query(p,"itemStyle.normal.lineStyle.color"),k=this.getItemStyleColor(this.query(p,"itemStyle.normal.color"),d,-1),x=null!=this.query(p,"itemStyle.normal.areaStyle"),_=this.query(p,"itemStyle.normal.areaStyle.color"),L=0,W=c.length;W>L;L++){var X=c[L],v="other"!=n&&this._isLarge(s,X);if(v)X=this._getLargePointList(s,X,p.dataFilter);else for(var w=0,K=X.length;K>w;w++)o=p.data[X[w][2]],(this.deepQuery([o,p,this.option],"calculable")||this.deepQuery([o,p],"showAllSymbol")||"categoryAxis"===i.type&&i.isMainAxis(X[w][2])&&"none"!=this.deepQuery([o,p],"symbol"))&&this.shapeList.push(this._getSymbol(d,X[w][2],X[w][3],X[w][0],X[w][1],s));var I=new a({zlevel:p.zlevel,z:p.z,style:{miterLimit:g,pointList:X,strokeColor:f||k||y,lineWidth:g,lineType:b,smooth:this._getSmooth(p.smooth),smoothConstraint:u,shadowColor:this.query(p,"itemStyle.normal.lineStyle.shadowColor"),shadowBlur:this.query(p,"itemStyle.normal.lineStyle.shadowBlur"),shadowOffsetX:this.query(p,"itemStyle.normal.lineStyle.shadowOffsetX"),shadowOffsetY:this.query(p,"itemStyle.normal.lineStyle.shadowOffsetY")},hoverable:!1,_main:!0,_seriesIndex:d,_orient:s});if(l.pack(I,V[d],d,0,L,V[d].name),this.shapeList.push(I),x){var J=new r({zlevel:p.zlevel,z:p.z,style:{miterLimit:g,pointList:h.clone(X).concat([[X[X.length-1][4],X[X.length-1][5]],[X[0][4],X[0][5]]]),brushType:"fill",smooth:this._getSmooth(p.smooth),smoothConstraint:u,color:_?_:m.alpha(y,.5)},highlightStyle:{brushType:"fill"},hoverable:!1,_main:!0,_seriesIndex:d,_orient:s});l.pack(J,V[d],d,0,L,V[d].name),this.shapeList.push(J)}}}},_getBbox:function(e,t){var i=this.component.grid.getBbox(),n=this.xMarkMap[e];return null!=n.minX0?[[Math.min(n.minX0,n.maxX0,n.minX1,n.maxX1),Math.min(n.minY0,n.maxY0,n.minY1,n.maxY1)],[Math.max(n.minX0,n.maxX0,n.minX1,n.maxX1),Math.max(n.minY0,n.maxY0,n.minY1,n.maxY1)]]:("horizontal"===t?(i[0][1]=Math.min(n.minY,n.maxY),i[1][1]=Math.max(n.minY,n.maxY)):(i[0][0]=Math.min(n.minX,n.maxX),i[1][0]=Math.max(n.minX,n.maxX)),i)},_isLarge:function(e,t){return t.length<2?!1:"horizontal"===e?Math.abs(t[0][0]-t[1][0])<.5:Math.abs(t[0][1]-t[1][1])<.5},_getLargePointList:function(e,t,i){var n;n="horizontal"===e?this.component.grid.getWidth():this.component.grid.getHeight();var a=t.length,o=[];if("function"!=typeof i)switch(i){case"min":i=function(e){return Math.max.apply(null,e)};break;case"max":i=function(e){return Math.min.apply(null,e)};break;case"average":i=function(e){for(var t=0,i=0;i<e.length;i++)t+=e[i];return t/e.length};break;default:i=function(e){return e[0]}}for(var r=[],s=0;n>s;s++){var l=Math.floor(a/n*s),h=Math.min(Math.floor(a/n*(s+1)),a);if(!(l>=h)){for(var m=l;h>m;m++)r[m-l]="horizontal"===e?t[m][1]:t[m][0];r.length=h-l;for(var V=i(r),U=-1,d=1/0,m=l;h>m;m++){var p="horizontal"===e?t[m][1]:t[m][0],c=Math.abs(p-V);d>c&&(U=m,d=c)}var u=t[U].slice();"horizontal"===e?u[1]=V:u[0]=V,o.push(u)}}return o},_getSmooth:function(e){return e?.3:0},_getCalculableItem:function(e,t,i,n,a,o){var r=this.series,l=r[e].calculableHolderColor||this.ecTheme.calculableHolderColor||s.calculableHolderColor,h=this._getSymbol(e,t,i,n,a,o);return h.style.color=l,h.style.strokeColor=l,h.rotation=[0,0],h.hoverable=!1,h.draggable=!1,h.style.text=void 0,h},_getSymbol:function(e,t,i,n,a,o){var r=this.series,s=r[e],l=s.data[t],h=this.getSymbolShape(s,e,l,t,i,n,a,this._sIndex2ShapeMap[e],this._sIndex2ColorMap[e],"#fff","vertical"===o?"horizontal":"vertical");return h.zlevel=s.zlevel,h.z=s.z+1,this.deepQuery([l,s,this.option],"calculable")&&(this.setCalculable(h),h.draggable=!0),h},getMarkCoord:function(e,t){var i=this.series[e],n=this.xMarkMap[e],a=this.component.xAxis.getAxis(i.xAxisIndex),o=this.component.yAxis.getAxis(i.yAxisIndex);if(t.type&&("max"===t.type||"min"===t.type||"average"===t.type)){var r=null!=t.valueIndex?t.valueIndex:null!=n.maxX0?"1":"";return[n[t.type+"X"+r],n[t.type+"Y"+r],n[t.type+"Line"+r],n[t.type+r]]}return["string"!=typeof t.xAxis&&a.getCoordByIndex?a.getCoordByIndex(t.xAxis||0):a.getCoord(t.xAxis||0),"string"!=typeof t.yAxis&&o.getCoordByIndex?o.getCoordByIndex(t.yAxis||0):o.getCoord(t.yAxis||0)]},refresh:function(e){e&&(this.option=e,this.series=e.series),this.backupShapeList(),this._buildShape()},ontooltipHover:function(e,t){for(var i,n,a=e.seriesIndex,o=e.dataIndex,r=a.length;r--;)if(i=this.finalPLMap[a[r]])for(var s=0,l=i.length;l>s;s++){n=i[s];for(var h=0,m=n.length;m>h;h++)o===n[h][2]&&t.push(this._getSymbol(a[r],n[h][2],n[h][3],n[h][0],n[h][1],"horizontal"))}},addDataAnimation:function(e,t){function i(){c--,0===c&&t&&t()}function n(e){e.style.controlPointList=null}for(var a=this.series,o={},r=0,s=e.length;s>r;r++)o[e[r][0]]=e[r];for(var l,h,m,V,U,d,p,c=0,r=this.shapeList.length-1;r>=0;r--)if(U=this.shapeList[r]._seriesIndex,o[U]&&!o[U][3]){if(this.shapeList[r]._main&&this.shapeList[r].style.pointList.length>1){if(d=this.shapeList[r].style.pointList,h=Math.abs(d[0][0]-d[1][0]),V=Math.abs(d[0][1]-d[1][1]),p="horizontal"===this.shapeList[r]._orient,o[U][2]){if("half-smooth-polygon"===this.shapeList[r].type){var u=d.length;this.shapeList[r].style.pointList[u-3]=d[u-2],this.shapeList[r].style.pointList[u-3][p?0:1]=d[u-4][p?0:1],this.shapeList[r].style.pointList[u-2]=d[u-1]}this.shapeList[r].style.pointList.pop(),p?(l=h,m=0):(l=0,m=-V)}else{if(this.shapeList[r].style.pointList.shift(),"half-smooth-polygon"===this.shapeList[r].type){var y=this.shapeList[r].style.pointList.pop();p?y[0]=d[0][0]:y[1]=d[0][1],this.shapeList[r].style.pointList.push(y)}p?(l=-h,m=0):(l=0,m=V)}this.shapeList[r].style.controlPointList=null,this.zr.modShape(this.shapeList[r])}else{if(o[U][2]&&this.shapeList[r]._dataIndex===a[U].data.length-1){this.zr.delShape(this.shapeList[r].id);continue}if(!o[U][2]&&0===this.shapeList[r]._dataIndex){this.zr.delShape(this.shapeList[r].id);continue}}this.shapeList[r].position=[0,0],c++,this.zr.animate(this.shapeList[r].id,"").when(this.query(this.option,"animationDurationUpdate"),{position:[l,m]}).during(n).done(i).start()}c||t&&t()}},o.prototype.iconLibrary.legendLineIcon=i,h.inherits(t,n),e("../chart").define("line",t),t}),i("echarts/util/shape/HalfSmoothPolygon",["require","zrender/shape/Base","zrender/shape/util/smoothBezier","zrender/tool/util","zrender/shape/Polygon"],function(e){function t(e){i.call(this,e)}var i=e("zrender/shape/Base"),n=e("zrender/shape/util/smoothBezier"),a=e("zrender/tool/util");return t.prototype={type:"half-smooth-polygon",buildPath:function(t,i){var a=i.pointList;if(!(a.length<2))if(i.smooth){var o=n(a.slice(0,-2),i.smooth,!1,i.smoothConstraint);t.moveTo(a[0][0],a[0][1]);for(var r,s,l,h=a.length,m=0;h-3>m;m++)r=o[2*m],s=o[2*m+1],l=a[m+1],t.bezierCurveTo(r[0],r[1],s[0],s[1],l[0],l[1]);t.lineTo(a[h-2][0],a[h-2][1]),t.lineTo(a[h-1][0],a[h-1][1]),t.lineTo(a[0][0],a[0][1])}else e("zrender/shape/Polygon").prototype.buildPath(t,i)}},a.inherits(t,i),t}),i("echarts/chart/bar",["require","./base","zrender/shape/Rectangle","../component/axis","../component/grid","../component/dataZoom","../config","../util/ecData","zrender/tool/util","zrender/tool/color","../chart"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o),this.refresh(a)}var i=e("./base"),n=e("zrender/shape/Rectangle");e("../component/axis"),e("../component/grid"),e("../component/dataZoom");var a=e("../config");a.bar={zlevel:0,z:2,clickable:!0,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,barMinHeight:0,barGap:"30%",barCategoryGap:"20%",itemStyle:{normal:{barBorderColor:"#fff",barBorderRadius:0,barBorderWidth:0,label:{show:!1}},emphasis:{barBorderColor:"#fff",barBorderRadius:0,barBorderWidth:0,label:{show:!1}}}};var o=e("../util/ecData"),r=e("zrender/tool/util"),s=e("zrender/tool/color");return t.prototype={type:a.CHART_TYPE_BAR,_buildShape:function(){this._buildPosition()},_buildNormal:function(e,t,i,o,r){for(var s,l,h,m,V,U,d,p,c,u,y,g,b=this.series,f=i[0][0],k=b[f],x="horizontal"==r,_=this.component.xAxis,L=this.component.yAxis,W=x?_.getAxis(k.xAxisIndex):L.getAxis(k.yAxisIndex),X=this._mapSize(W,i),v=X.gap,w=X.barGap,K=X.barWidthMap,I=X.barMaxWidthMap,J=X.barWidth,C=X.barMinHeightMap,S=X.interval,E=this.deepQuery([this.ecTheme,a],"island.r"),F=0,T=t;T>F&&null!=W.getNameByIndex(F);F++){x?m=W.getCoordByIndex(F)-v/2:V=W.getCoordByIndex(F)+v/2;for(var z=0,A=i.length;A>z;z++){var M=b[i[z][0]].yAxisIndex||0,O=b[i[z][0]].xAxisIndex||0;s=x?L.getAxis(M):_.getAxis(O),d=U=c=p=s.getCoord(0);for(var P=0,D=i[z].length;D>P;P++)f=i[z][P],k=b[f],y=k.data[F],g=this.getDataFromOption(y,"-"),o[f]=o[f]||{min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY,sum:0,counter:0,average:0},h=Math.min(I[f]||Number.MAX_VALUE,K[f]||J),"-"!==g&&(g>0?(l=P>0?s.getCoordSize(g):x?d-s.getCoord(g):s.getCoord(g)-d,1===D&&C[f]>l&&(l=C[f]),x?(U-=l,V=U):(m=U,U+=l)):0>g?(l=P>0?s.getCoordSize(g):x?s.getCoord(g)-c:c-s.getCoord(g),1===D&&C[f]>l&&(l=C[f]),x?(V=p,p+=l):(p-=l,m=p)):(l=0,x?(U-=l,V=U):(m=U,U+=l)),o[f][F]=x?m+h/2:V-h/2,o[f].min>g&&(o[f].min=g,x?(o[f].minY=V,o[f].minX=o[f][F]):(o[f].minX=m+l,o[f].minY=o[f][F])),o[f].max<g&&(o[f].max=g,x?(o[f].maxY=V,o[f].maxX=o[f][F]):(o[f].maxX=m+l,o[f].maxY=o[f][F])),o[f].sum+=g,o[f].counter++,F%S===0&&(u=this._getBarItem(f,F,W.getNameByIndex(F),m,V-(x?0:h),x?h:l,x?l:h,x?"vertical":"horizontal"),this.shapeList.push(new n(u))));for(var P=0,D=i[z].length;D>P;P++)f=i[z][P],k=b[f],y=k.data[F],g=this.getDataFromOption(y,"-"),h=Math.min(I[f]||Number.MAX_VALUE,K[f]||J),"-"==g&&this.deepQuery([y,k,this.option],"calculable")&&(x?(U-=E,V=U):(m=U,U+=E),u=this._getBarItem(f,F,W.getNameByIndex(F),m,V-(x?0:h),x?h:E,x?E:h,x?"vertical":"horizontal"),u.hoverable=!1,u.draggable=!1,u.style.lineWidth=1,u.style.brushType="stroke",u.style.strokeColor=k.calculableHolderColor||this.ecTheme.calculableHolderColor||a.calculableHolderColor,this.shapeList.push(new n(u)));x?m+=h+w:V-=h+w}}this._calculMarkMapXY(o,i,x?"y":"x")},_buildHorizontal:function(e,t,i,n){return this._buildNormal(e,t,i,n,"horizontal")},_buildVertical:function(e,t,i,n){return this._buildNormal(e,t,i,n,"vertical")},_buildOther:function(e,t,i,a){for(var o=this.series,r=0,s=i.length;s>r;r++)for(var l=0,h=i[r].length;h>l;l++){var m=i[r][l],V=o[m],U=V.xAxisIndex||0,d=this.component.xAxis.getAxis(U),p=d.getCoord(0),c=V.yAxisIndex||0,u=this.component.yAxis.getAxis(c),y=u.getCoord(0);a[m]=a[m]||{min0:Number.POSITIVE_INFINITY,min1:Number.POSITIVE_INFINITY,max0:Number.NEGATIVE_INFINITY,max1:Number.NEGATIVE_INFINITY,sum0:0,sum1:0,counter0:0,counter1:0,average0:0,average1:0};for(var g=0,b=V.data.length;b>g;g++){var f=V.data[g],k=this.getDataFromOption(f,"-");if(k instanceof Array){var x,_,L=d.getCoord(k[0]),W=u.getCoord(k[1]),X=[f,V],v=this.deepQuery(X,"barWidth")||10,w=this.deepQuery(X,"barHeight");null!=w?(x="horizontal",k[0]>0?(v=L-p,L-=v):v=k[0]<0?p-L:0,_=this._getBarItem(m,g,k[0],L,W-w/2,v,w,x)):(x="vertical",k[1]>0?w=y-W:k[1]<0?(w=W-y,W-=w):w=0,_=this._getBarItem(m,g,k[0],L-v/2,W,v,w,x)),this.shapeList.push(new n(_)),L=d.getCoord(k[0]),W=u.getCoord(k[1]),a[m].min0>k[0]&&(a[m].min0=k[0],a[m].minY0=W,a[m].minX0=L),a[m].max0<k[0]&&(a[m].max0=k[0],a[m].maxY0=W,a[m].maxX0=L),a[m].sum0+=k[0],a[m].counter0++,a[m].min1>k[1]&&(a[m].min1=k[1],a[m].minY1=W,a[m].minX1=L),a[m].max1<k[1]&&(a[m].max1=k[1],a[m].maxY1=W,a[m].maxX1=L),a[m].sum1+=k[1],a[m].counter1++}}}this._calculMarkMapXY(a,i,"xy")},_mapSize:function(e,t,i){var n,a,o=this._findSpecialBarSzie(t,i),r=o.barWidthMap,s=o.barMaxWidthMap,l=o.barMinHeightMap,h=o.sBarWidthCounter,m=o.sBarWidthTotal,V=o.barGap,U=o.barCategoryGap,d=1;if(t.length!=h){if(i)n=e.getGap(),V=0,a=+(n/t.length).toFixed(2),0>=a&&(d=Math.floor(t.length/n),a=1);else if(n="string"==typeof U&&U.match(/%$/)?(e.getGap()*(100-parseFloat(U))/100).toFixed(2)-0:e.getGap()-U,"string"==typeof V&&V.match(/%$/)?(V=parseFloat(V)/100,a=+((n-m)/((t.length-1)*V+t.length-h)).toFixed(2),V=a*V):(V=parseFloat(V),a=+((n-m-V*(t.length-1))/(t.length-h)).toFixed(2)),0>=a)return this._mapSize(e,t,!0)}else if(n=h>1?"string"==typeof U&&U.match(/%$/)?+(e.getGap()*(100-parseFloat(U))/100).toFixed(2):e.getGap()-U:m,a=0,V=h>1?+((n-m)/(h-1)).toFixed(2):0,0>V)return this._mapSize(e,t,!0);return this._recheckBarMaxWidth(t,r,s,l,n,a,V,d)},_findSpecialBarSzie:function(e,t){for(var i,n,a,o,r=this.series,s={},l={},h={},m=0,V=0,U=0,d=e.length;d>U;U++)for(var p={barWidth:!1,barMaxWidth:!1},c=0,u=e[U].length;u>c;c++){var y=e[U][c],g=r[y];if(!t){if(p.barWidth)s[y]=i;else if(i=this.query(g,"barWidth"),null!=i){s[y]=i,V+=i,m++,p.barWidth=!0;for(var b=0,f=c;f>b;b++){var k=e[U][b];s[k]=i}}if(p.barMaxWidth)l[y]=n;else if(n=this.query(g,"barMaxWidth"),null!=n){l[y]=n,p.barMaxWidth=!0;for(var b=0,f=c;f>b;b++){var k=e[U][b];l[k]=n}}}h[y]=this.query(g,"barMinHeight"),a=null!=a?a:this.query(g,"barGap"),o=null!=o?o:this.query(g,"barCategoryGap")}return{barWidthMap:s,barMaxWidthMap:l,barMinHeightMap:h,sBarWidth:i,sBarMaxWidth:n,sBarWidthCounter:m,sBarWidthTotal:V,barGap:a,barCategoryGap:o}},_recheckBarMaxWidth:function(e,t,i,n,a,o,r,s){for(var l=0,h=e.length;h>l;l++){var m=e[l][0];i[m]&&i[m]<o&&(a-=o-i[m])}return{barWidthMap:t,barMaxWidthMap:i,barMinHeightMap:n,gap:a,barWidth:o,barGap:r,interval:s}},_getBarItem:function(e,t,i,n,a,r,l,h){var m,V=this.series,U=V[e],d=U.data[t],p=this._sIndex2ColorMap[e],c=[d,U],u=this.deepMerge(c,"itemStyle.normal"),y=this.deepMerge(c,"itemStyle.emphasis"),g=u.barBorderWidth;m={zlevel:U.zlevel,z:U.z,clickable:this.deepQuery(c,"clickable"),style:{x:n,y:a,width:r,height:l,brushType:"both",color:this.getItemStyleColor(this.deepQuery(c,"itemStyle.normal.color")||p,e,t,d),radius:u.barBorderRadius,lineWidth:g,strokeColor:u.barBorderColor},highlightStyle:{color:this.getItemStyleColor(this.deepQuery(c,"itemStyle.emphasis.color"),e,t,d),radius:y.barBorderRadius,lineWidth:y.barBorderWidth,strokeColor:y.barBorderColor},_orient:h};var b=m.style;m.highlightStyle.color=m.highlightStyle.color||("string"==typeof b.color?s.lift(b.color,-.3):b.color),b.x=Math.floor(b.x),b.y=Math.floor(b.y),b.height=Math.ceil(b.height),b.width=Math.ceil(b.width),g>0&&b.height>g&&b.width>g?(b.y+=g/2,b.height-=g,b.x+=g/2,b.width-=g):b.brushType="fill",m.highlightStyle.textColor=m.highlightStyle.color,m=this.addLabel(m,U,d,i,h);for(var f=[b,m.highlightStyle],k=0,x=f.length;x>k;k++){var _=f[k].textPosition;if("insideLeft"===_||"insideRight"===_||"insideTop"===_||"insideBottom"===_){var L=5;switch(_){case"insideLeft":f[k].textX=b.x+L,f[k].textY=b.y+b.height/2,f[k].textAlign="left",f[k].textBaseline="middle";break;case"insideRight":f[k].textX=b.x+b.width-L,f[k].textY=b.y+b.height/2,f[k].textAlign="right",f[k].textBaseline="middle";break;case"insideTop":f[k].textX=b.x+b.width/2,f[k].textY=b.y+L/2,f[k].textAlign="center",f[k].textBaseline="top";break;case"insideBottom":f[k].textX=b.x+b.width/2,f[k].textY=b.y+b.height-L/2,f[k].textAlign="center",f[k].textBaseline="bottom"}f[k].textPosition="specific",f[k].textColor=f[k].textColor||"#fff"}}return this.deepQuery([d,U,this.option],"calculable")&&(this.setCalculable(m),m.draggable=!0),o.pack(m,V[e],e,V[e].data[t],t,i),m},getMarkCoord:function(e,t){var i,n,a=this.series[e],o=this.xMarkMap[e],r=this.component.xAxis.getAxis(a.xAxisIndex),s=this.component.yAxis.getAxis(a.yAxisIndex);if(!t.type||"max"!==t.type&&"min"!==t.type&&"average"!==t.type)if(o.isHorizontal){i="string"==typeof t.xAxis&&r.getIndexByName?r.getIndexByName(t.xAxis):t.xAxis||0;var l=o[i];l=null!=l?l:"string"!=typeof t.xAxis&&r.getCoordByIndex?r.getCoordByIndex(t.xAxis||0):r.getCoord(t.xAxis||0),n=[l,s.getCoord(t.yAxis||0)]}else{i="string"==typeof t.yAxis&&s.getIndexByName?s.getIndexByName(t.yAxis):t.yAxis||0;var h=o[i];h=null!=h?h:"string"!=typeof t.yAxis&&s.getCoordByIndex?s.getCoordByIndex(t.yAxis||0):s.getCoord(t.yAxis||0),n=[r.getCoord(t.xAxis||0),h]}else{var m=null!=t.valueIndex?t.valueIndex:null!=o.maxX0?"1":"";n=[o[t.type+"X"+m],o[t.type+"Y"+m],o[t.type+"Line"+m],o[t.type+m]]}return n},refresh:function(e){e&&(this.option=e,this.series=e.series),this.backupShapeList(),this._buildShape()},addDataAnimation:function(e,t){function i(){c--,0===c&&t&&t()}for(var n=this.series,a={},r=0,s=e.length;s>r;r++)a[e[r][0]]=e[r];for(var l,h,m,V,U,d,p,c=0,r=this.shapeList.length-1;r>=0;r--)if(d=o.get(this.shapeList[r],"seriesIndex"),a[d]&&!a[d][3]&&"rectangle"===this.shapeList[r].type){if(p=o.get(this.shapeList[r],"dataIndex"),U=n[d],a[d][2]&&p===U.data.length-1){this.zr.delShape(this.shapeList[r].id);continue}if(!a[d][2]&&0===p){this.zr.delShape(this.shapeList[r].id);continue}"horizontal"===this.shapeList[r]._orient?(V=this.component.yAxis.getAxis(U.yAxisIndex||0).getGap(),m=a[d][2]?-V:V,l=0):(h=this.component.xAxis.getAxis(U.xAxisIndex||0).getGap(),l=a[d][2]?h:-h,m=0),this.shapeList[r].position=[0,0],c++,this.zr.animate(this.shapeList[r].id,"").when(this.query(this.option,"animationDurationUpdate"),{position:[l,m]}).done(i).start()}c||t&&t()}},r.inherits(t,i),e("../chart").define("bar",t),t}),i("echarts/chart/scatter",["require","./base","../util/shape/Symbol","../component/axis","../component/grid","../component/dataZoom","../component/dataRange","../config","zrender/tool/util","zrender/tool/color","../chart"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o),this.refresh(a)}var i=e("./base"),n=e("../util/shape/Symbol");e("../component/axis"),e("../component/grid"),e("../component/dataZoom"),e("../component/dataRange");var a=e("../config");a.scatter={zlevel:0,z:2,clickable:!0,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbolSize:4,large:!1,largeThreshold:2e3,itemStyle:{normal:{label:{show:!1}},emphasis:{label:{show:!1}}}};var o=e("zrender/tool/util"),r=e("zrender/tool/color");return t.prototype={type:a.CHART_TYPE_SCATTER,_buildShape:function(){var e=this.series;this._sIndex2ColorMap={},this._symbol=this.option.symbolList,this._sIndex2ShapeMap={},this.selectedMap={},this.xMarkMap={};for(var t,i,n,o,s=this.component.legend,l=[],h=0,m=e.length;m>h;h++)if(t=e[h],i=t.name,t.type===a.CHART_TYPE_SCATTER){if(e[h]=this.reformOption(e[h]),this.legendHoverLink=e[h].legendHoverLink||this.legendHoverLink,this._sIndex2ShapeMap[h]=this.query(t,"symbol")||this._symbol[h%this._symbol.length],s){if(this.selectedMap[i]=s.isSelected(i),this._sIndex2ColorMap[h]=r.alpha(s.getColor(i),.5),n=s.getItemShape(i)){var o=this._sIndex2ShapeMap[h];n.style.brushType=o.match("empty")?"stroke":"both",o=o.replace("empty","").toLowerCase(),o.match("rectangle")&&(n.style.x+=Math.round((n.style.width-n.style.height)/2),n.style.width=n.style.height),o.match("star")&&(n.style.n=o.replace("star","")-0||5,o="star"),o.match("image")&&(n.style.image=o.replace(new RegExp("^image:\\/\\/"),""),n.style.x+=Math.round((n.style.width-n.style.height)/2),n.style.width=n.style.height,o="image"),n.style.iconType=o,s.setItemShape(i,n)}}else this.selectedMap[i]=!0,this._sIndex2ColorMap[h]=r.alpha(this.zr.getColor(h),.5);this.selectedMap[i]&&l.push(h)}this._buildSeries(l),this.addShapeList()},_buildSeries:function(e){if(0!==e.length){for(var t,i,n,a,o,r,s,l,h=this.series,m={},V=0,U=e.length;U>V;V++)if(t=e[V],i=h[t],0!==i.data.length){o=this.component.xAxis.getAxis(i.xAxisIndex||0),r=this.component.yAxis.getAxis(i.yAxisIndex||0),m[t]=[];for(var d=0,p=i.data.length;p>d;d++)n=i.data[d],a=this.getDataFromOption(n,"-"),"-"===a||a.length<2||(s=o.getCoord(a[0]),l=r.getCoord(a[1]),m[t].push([s,l,d,n.name||""]));this.xMarkMap[t]=this._markMap(o,r,i.data,m[t]),this.buildMark(t)}this._buildPointList(m)}},_markMap:function(e,t,i,n){for(var a,o={min0:Number.POSITIVE_INFINITY,max0:Number.NEGATIVE_INFINITY,sum0:0,counter0:0,average0:0,min1:Number.POSITIVE_INFINITY,max1:Number.NEGATIVE_INFINITY,sum1:0,counter1:0,average1:0},r=0,s=n.length;s>r;r++)a=i[n[r][2]].value||i[n[r][2]],o.min0>a[0]&&(o.min0=a[0],o.minY0=n[r][1],o.minX0=n[r][0]),o.max0<a[0]&&(o.max0=a[0],o.maxY0=n[r][1],o.maxX0=n[r][0]),o.sum0+=a[0],o.counter0++,o.min1>a[1]&&(o.min1=a[1],o.minY1=n[r][1],o.minX1=n[r][0]),o.max1<a[1]&&(o.max1=a[1],o.maxY1=n[r][1],o.maxX1=n[r][0]),o.sum1+=a[1],o.counter1++;var l=this.component.grid.getX(),h=this.component.grid.getXend(),m=this.component.grid.getY(),V=this.component.grid.getYend();o.average0=o.sum0/o.counter0;var U=e.getCoord(o.average0);o.averageLine0=[[U,V],[U,m]],o.minLine0=[[o.minX0,V],[o.minX0,m]],o.maxLine0=[[o.maxX0,V],[o.maxX0,m]],o.average1=o.sum1/o.counter1;var d=t.getCoord(o.average1);return o.averageLine1=[[l,d],[h,d]],o.minLine1=[[l,o.minY1],[h,o.minY1]],o.maxLine1=[[l,o.maxY1],[h,o.maxY1]],o},_buildPointList:function(e){var t,i,n,a,o=this.series;for(var r in e)if(t=o[r],i=e[r],t.large&&t.data.length>t.largeThreshold)this.shapeList.push(this._getLargeSymbol(t,i,this.getItemStyleColor(this.query(t,"itemStyle.normal.color"),r,-1)||this._sIndex2ColorMap[r]));else for(var s=0,l=i.length;l>s;s++)n=i[s],a=this._getSymbol(r,n[2],n[3],n[0],n[1]),a&&this.shapeList.push(a)},_getSymbol:function(e,t,i,n,a){var o,r=this.series,s=r[e],l=s.data[t],h=this.component.dataRange;if(h){if(o=isNaN(l[2])?this._sIndex2ColorMap[e]:h.getColor(l[2]),!o)return null}else o=this._sIndex2ColorMap[e];var m=this.getSymbolShape(s,e,l,t,i,n,a,this._sIndex2ShapeMap[e],o,"rgba(0,0,0,0)","vertical");return m.zlevel=s.zlevel,m.z=s.z,m._main=!0,m},_getLargeSymbol:function(e,t,i){return new n({zlevel:e.zlevel,z:e.z,_main:!0,hoverable:!1,style:{pointList:t,color:i,strokeColor:i},highlightStyle:{pointList:[]}})},getMarkCoord:function(e,t){var i,n=this.series[e],a=this.xMarkMap[e],o=this.component.xAxis.getAxis(n.xAxisIndex),r=this.component.yAxis.getAxis(n.yAxisIndex);if(!t.type||"max"!==t.type&&"min"!==t.type&&"average"!==t.type)i=["string"!=typeof t.xAxis&&o.getCoordByIndex?o.getCoordByIndex(t.xAxis||0):o.getCoord(t.xAxis||0),"string"!=typeof t.yAxis&&r.getCoordByIndex?r.getCoordByIndex(t.yAxis||0):r.getCoord(t.yAxis||0)];else{var s=null!=t.valueIndex?t.valueIndex:1;i=[a[t.type+"X"+s],a[t.type+"Y"+s],a[t.type+"Line"+s],a[t.type+s]]}return i},refresh:function(e){e&&(this.option=e,this.series=e.series),this.backupShapeList(),this._buildShape()},ondataRange:function(e,t){this.component.dataRange&&(this.refresh(),t.needRefresh=!0)}},o.inherits(t,i),e("../chart").define("scatter",t),t}),i("echarts/component/dataRange",["require","./base","zrender/shape/Text","zrender/shape/Rectangle","../util/shape/HandlePolygon","../config","zrender/tool/util","zrender/tool/event","zrender/tool/area","zrender/tool/color","../component"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o);var s=this;s._ondrift=function(e,t){return s.__ondrift(this,e,t)},s._ondragend=function(){return s.__ondragend()},s._dataRangeSelected=function(e){return s.__dataRangeSelected(e)},s._dispatchHoverLink=function(e){return s.__dispatchHoverLink(e)},s._onhoverlink=function(e){return s.__onhoverlink(e);
+
+},this._selectedMap={},this._range={},this.refresh(a),t.bind(r.EVENT.HOVER,this._onhoverlink)}var i=e("./base"),n=e("zrender/shape/Text"),a=e("zrender/shape/Rectangle"),o=e("../util/shape/HandlePolygon"),r=e("../config");r.dataRange={zlevel:0,z:4,show:!0,orient:"vertical",x:"left",y:"bottom",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,itemWidth:20,itemHeight:14,precision:0,splitNumber:5,splitList:null,calculable:!1,selectedMode:!0,hoverLink:!0,realtime:!0,color:["#006edd","#e0ffff"],textStyle:{color:"#333"}};var s=e("zrender/tool/util"),l=e("zrender/tool/event"),h=e("zrender/tool/area"),m=e("zrender/tool/color");return t.prototype={type:r.COMPONENT_TYPE_DATARANGE,_textGap:10,_buildShape:function(){if(this._itemGroupLocation=this._getItemGroupLocation(),this._buildBackground(),this._isContinuity()?this._buildGradient():this._buildItem(),this.dataRangeOption.show)for(var e=0,t=this.shapeList.length;t>e;e++)this.zr.addShape(this.shapeList[e]);this._syncShapeFromRange()},_buildItem:function(){var e,t,i,o,r=this._valueTextList,s=r.length,l=this.getFont(this.dataRangeOption.textStyle),m=this._itemGroupLocation.x,V=this._itemGroupLocation.y,U=this.dataRangeOption.itemWidth,d=this.dataRangeOption.itemHeight,p=this.dataRangeOption.itemGap,c=h.getTextHeight("国",l);"vertical"==this.dataRangeOption.orient&&"right"==this.dataRangeOption.x&&(m=this._itemGroupLocation.x+this._itemGroupLocation.width-U);var u=!0;this.dataRangeOption.text&&(u=!1,this.dataRangeOption.text[0]&&(i=this._getTextShape(m,V,this.dataRangeOption.text[0]),"horizontal"==this.dataRangeOption.orient?m+=h.getTextWidth(this.dataRangeOption.text[0],l)+this._textGap:(V+=c+this._textGap,i.style.y+=c/2+this._textGap,i.style.textBaseline="bottom"),this.shapeList.push(new n(i))));for(var y=0;s>y;y++)e=r[y],o=this.getColorByIndex(y),t=this._getItemShape(m,V,U,d,this._selectedMap[y]?o:"#ccc"),t._idx=y,t.onmousemove=this._dispatchHoverLink,this.dataRangeOption.selectedMode&&(t.clickable=!0,t.onclick=this._dataRangeSelected),this.shapeList.push(new a(t)),u&&(i={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:m+U+5,y:V,color:this._selectedMap[y]?this.dataRangeOption.textStyle.color:"#ccc",text:r[y],textFont:l,textBaseline:"top"},highlightStyle:{brushType:"fill"}},"vertical"==this.dataRangeOption.orient&&"right"==this.dataRangeOption.x&&(i.style.x-=U+10,i.style.textAlign="right"),i._idx=y,i.onmousemove=this._dispatchHoverLink,this.dataRangeOption.selectedMode&&(i.clickable=!0,i.onclick=this._dataRangeSelected),this.shapeList.push(new n(i))),"horizontal"==this.dataRangeOption.orient?m+=U+(u?5:0)+(u?h.getTextWidth(e,l):0)+p:V+=d+p;!u&&this.dataRangeOption.text[1]&&("horizontal"==this.dataRangeOption.orient?m=m-p+this._textGap:V=V-p+this._textGap,i=this._getTextShape(m,V,this.dataRangeOption.text[1]),"horizontal"!=this.dataRangeOption.orient&&(i.style.y-=5,i.style.textBaseline="top"),this.shapeList.push(new n(i)))},_buildGradient:function(){var t,i,o=this.getFont(this.dataRangeOption.textStyle),r=this._itemGroupLocation.x,s=this._itemGroupLocation.y,l=this.dataRangeOption.itemWidth,m=this.dataRangeOption.itemHeight,V=h.getTextHeight("国",o),U=10,d=!0;this.dataRangeOption.text&&(d=!1,this.dataRangeOption.text[0]&&(i=this._getTextShape(r,s,this.dataRangeOption.text[0]),"horizontal"==this.dataRangeOption.orient?r+=h.getTextWidth(this.dataRangeOption.text[0],o)+this._textGap:(s+=V+this._textGap,i.style.y+=V/2+this._textGap,i.style.textBaseline="bottom"),this.shapeList.push(new n(i))));for(var p=e("zrender/tool/color"),c=1/(this.dataRangeOption.color.length-1),u=[],y=0,g=this.dataRangeOption.color.length;g>y;y++)u.push([y*c,this.dataRangeOption.color[y]]);"horizontal"==this.dataRangeOption.orient?(t={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:r,y:s,width:l*U,height:m,color:p.getLinearGradient(r,s,r+l*U,s,u)},hoverable:!1},r+=l*U+this._textGap):(t={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:r,y:s,width:l,height:m*U,color:p.getLinearGradient(r,s,r,s+m*U,u)},hoverable:!1},s+=m*U+this._textGap),this.shapeList.push(new a(t)),this._calculableLocation=t.style,this.dataRangeOption.calculable&&(this._buildFiller(),this._bulidMask(),this._bulidHandle()),this._buildIndicator(),!d&&this.dataRangeOption.text[1]&&(i=this._getTextShape(r,s,this.dataRangeOption.text[1]),this.shapeList.push(new n(i)))},_buildIndicator:function(){var e,t,i=this._calculableLocation.x,n=this._calculableLocation.y,a=this._calculableLocation.width,r=this._calculableLocation.height,s=5;"horizontal"==this.dataRangeOption.orient?"bottom"!=this.dataRangeOption.y?(e=[[i,n+r],[i-s,n+r+s],[i+s,n+r+s]],t="bottom"):(e=[[i,n],[i-s,n-s],[i+s,n-s]],t="top"):"right"!=this.dataRangeOption.x?(e=[[i+a,n],[i+a+s,n-s],[i+a+s,n+s]],t="right"):(e=[[i,n],[i-s,n-s],[i-s,n+s]],t="left"),this._indicatorShape={style:{pointList:e,color:"#fff",__rect:{x:Math.min(e[0][0],e[1][0]),y:Math.min(e[0][1],e[1][1]),width:s*("horizontal"==this.dataRangeOption.orient?2:1),height:s*("horizontal"==this.dataRangeOption.orient?1:2)}},highlightStyle:{brushType:"fill",textPosition:t,textColor:this.dataRangeOption.textStyle.color},hoverable:!1},this._indicatorShape=new o(this._indicatorShape)},_buildFiller:function(){this._fillerShape={zlevel:this.getZlevelBase(),z:this.getZBase()+1,style:{x:this._calculableLocation.x,y:this._calculableLocation.y,width:this._calculableLocation.width,height:this._calculableLocation.height,color:"rgba(255,255,255,0)"},highlightStyle:{strokeColor:"rgba(255,255,255,0.5)",lineWidth:1},draggable:!0,ondrift:this._ondrift,ondragend:this._ondragend,onmousemove:this._dispatchHoverLink,_type:"filler"},this._fillerShape=new a(this._fillerShape),this.shapeList.push(this._fillerShape)},_bulidHandle:function(){var e,t,i,n,a,r,s,l,m=this._calculableLocation.x,V=this._calculableLocation.y,U=this._calculableLocation.width,d=this._calculableLocation.height,p=this.getFont(this.dataRangeOption.textStyle),c=h.getTextHeight("国",p),u=Math.max(h.getTextWidth(this._textFormat(this.dataRangeOption.max),p),h.getTextWidth(this._textFormat(this.dataRangeOption.min),p))+2;"horizontal"==this.dataRangeOption.orient?"bottom"!=this.dataRangeOption.y?(e=[[m,V],[m,V+d+c],[m-c,V+d+c],[m-1,V+d],[m-1,V]],t=m-u/2-c,i=V+d+c/2+2,n={x:m-u-c,y:V+d,width:u+c,height:c},a=[[m+U,V],[m+U,V+d+c],[m+U+c,V+d+c],[m+U+1,V+d],[m+U+1,V]],r=m+U+u/2+c,s=i,l={x:m+U,y:V+d,width:u+c,height:c}):(e=[[m,V+d],[m,V-c],[m-c,V-c],[m-1,V],[m-1,V+d]],t=m-u/2-c,i=V-c/2-2,n={x:m-u-c,y:V-c,width:u+c,height:c},a=[[m+U,V+d],[m+U,V-c],[m+U+c,V-c],[m+U+1,V],[m+U+1,V+d]],r=m+U+u/2+c,s=i,l={x:m+U,y:V-c,width:u+c,height:c}):(u+=c,"right"!=this.dataRangeOption.x?(e=[[m,V],[m+U+c,V],[m+U+c,V-c],[m+U,V-1],[m,V-1]],t=m+U+u/2+c/2,i=V-c/2,n={x:m+U,y:V-c,width:u+c,height:c},a=[[m,V+d],[m+U+c,V+d],[m+U+c,V+c+d],[m+U,V+1+d],[m,V+d+1]],r=t,s=V+d+c/2,l={x:m+U,y:V+d,width:u+c,height:c}):(e=[[m+U,V],[m-c,V],[m-c,V-c],[m,V-1],[m+U,V-1]],t=m-u/2-c/2,i=V-c/2,n={x:m-u-c,y:V-c,width:u+c,height:c},a=[[m+U,V+d],[m-c,V+d],[m-c,V+c+d],[m,V+1+d],[m+U,V+d+1]],r=t,s=V+d+c/2,l={x:m-u-c,y:V+d,width:u+c,height:c})),this._startShape={style:{pointList:e,text:this._textFormat(this.dataRangeOption.max),textX:t,textY:i,textFont:p,color:this.getColor(this.dataRangeOption.max),rect:n,x:e[0][0],y:e[0][1],_x:e[0][0],_y:e[0][1]}},this._startShape.highlightStyle={strokeColor:this._startShape.style.color,lineWidth:1},this._endShape={style:{pointList:a,text:this._textFormat(this.dataRangeOption.min),textX:r,textY:s,textFont:p,color:this.getColor(this.dataRangeOption.min),rect:l,x:a[0][0],y:a[0][1],_x:a[0][0],_y:a[0][1]}},this._endShape.highlightStyle={strokeColor:this._endShape.style.color,lineWidth:1},this._startShape.zlevel=this._endShape.zlevel=this.getZlevelBase(),this._startShape.z=this._endShape.z=this.getZBase()+1,this._startShape.draggable=this._endShape.draggable=!0,this._startShape.ondrift=this._endShape.ondrift=this._ondrift,this._startShape.ondragend=this._endShape.ondragend=this._ondragend,this._startShape.style.textColor=this._endShape.style.textColor=this.dataRangeOption.textStyle.color,this._startShape.style.textAlign=this._endShape.style.textAlign="center",this._startShape.style.textPosition=this._endShape.style.textPosition="specific",this._startShape.style.textBaseline=this._endShape.style.textBaseline="middle",this._startShape.style.width=this._endShape.style.width=0,this._startShape.style.height=this._endShape.style.height=0,this._startShape.style.textPosition=this._endShape.style.textPosition="specific",this._startShape=new o(this._startShape),this._endShape=new o(this._endShape),this.shapeList.push(this._startShape),this.shapeList.push(this._endShape)},_bulidMask:function(){var e=this._calculableLocation.x,t=this._calculableLocation.y,i=this._calculableLocation.width,n=this._calculableLocation.height;this._startMask={zlevel:this.getZlevelBase(),z:this.getZBase()+1,style:{x:e,y:t,width:"horizontal"==this.dataRangeOption.orient?0:i,height:"horizontal"==this.dataRangeOption.orient?n:0,color:"#ccc"},hoverable:!1},this._endMask={zlevel:this.getZlevelBase(),z:this.getZBase()+1,style:{x:"horizontal"==this.dataRangeOption.orient?e+i:e,y:"horizontal"==this.dataRangeOption.orient?t:t+n,width:"horizontal"==this.dataRangeOption.orient?0:i,height:"horizontal"==this.dataRangeOption.orient?n:0,color:"#ccc"},hoverable:!1},this._startMask=new a(this._startMask),this._endMask=new a(this._endMask),this.shapeList.push(this._startMask),this.shapeList.push(this._endMask)},_buildBackground:function(){var e=this.reformCssArray(this.dataRangeOption.padding);this.shapeList.push(new a({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._itemGroupLocation.x-e[3],y:this._itemGroupLocation.y-e[0],width:this._itemGroupLocation.width+e[3]+e[1],height:this._itemGroupLocation.height+e[0]+e[2],brushType:0===this.dataRangeOption.borderWidth?"fill":"both",color:this.dataRangeOption.backgroundColor,strokeColor:this.dataRangeOption.borderColor,lineWidth:this.dataRangeOption.borderWidth}}))},_getItemGroupLocation:function(){var e=this._valueTextList,t=e.length,i=this.dataRangeOption.itemGap,n=this.dataRangeOption.itemWidth,a=this.dataRangeOption.itemHeight,o=0,r=0,s=this.getFont(this.dataRangeOption.textStyle),l=h.getTextHeight("国",s),m=10;if("horizontal"==this.dataRangeOption.orient){if(this.dataRangeOption.text||this._isContinuity())o=(this._isContinuity()?n*m+i:t*(n+i))+(this.dataRangeOption.text&&"undefined"!=typeof this.dataRangeOption.text[0]?h.getTextWidth(this.dataRangeOption.text[0],s)+this._textGap:0)+(this.dataRangeOption.text&&"undefined"!=typeof this.dataRangeOption.text[1]?h.getTextWidth(this.dataRangeOption.text[1],s)+this._textGap:0);else{n+=5;for(var V=0;t>V;V++)o+=n+h.getTextWidth(e[V],s)+i}o-=i,r=Math.max(l,a)}else{var U;if(this.dataRangeOption.text||this._isContinuity())r=(this._isContinuity()?a*m+i:t*(a+i))+(this.dataRangeOption.text&&"undefined"!=typeof this.dataRangeOption.text[0]?this._textGap+l:0)+(this.dataRangeOption.text&&"undefined"!=typeof this.dataRangeOption.text[1]?this._textGap+l:0),U=Math.max(h.getTextWidth(this.dataRangeOption.text&&this.dataRangeOption.text[0]||"",s),h.getTextWidth(this.dataRangeOption.text&&this.dataRangeOption.text[1]||"",s)),o=Math.max(n,U);else{r=(a+i)*t,n+=5,U=0;for(var V=0;t>V;V++)U=Math.max(U,h.getTextWidth(e[V],s));o=n+U}r-=i}var d,p=this.reformCssArray(this.dataRangeOption.padding),c=this.zr.getWidth();switch(this.dataRangeOption.x){case"center":d=Math.floor((c-o)/2);break;case"left":d=p[3]+this.dataRangeOption.borderWidth;break;case"right":d=c-o-p[1]-this.dataRangeOption.borderWidth;break;default:d=this.parsePercent(this.dataRangeOption.x,c),d=isNaN(d)?0:d}var u,y=this.zr.getHeight();switch(this.dataRangeOption.y){case"top":u=p[0]+this.dataRangeOption.borderWidth;break;case"bottom":u=y-r-p[2]-this.dataRangeOption.borderWidth;break;case"center":u=Math.floor((y-r)/2);break;default:u=this.parsePercent(this.dataRangeOption.y,y),u=isNaN(u)?0:u}if(this.dataRangeOption.calculable){var g=Math.max(h.getTextWidth(this.dataRangeOption.max,s),h.getTextWidth(this.dataRangeOption.min,s))+l;"horizontal"==this.dataRangeOption.orient?(g>d&&(d=g),d+o+g>c&&(d-=g)):(l>u&&(u=l),u+r+l>y&&(u-=l))}return{x:d,y:u,width:o,height:r}},_getTextShape:function(e,t,i){return{zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:"horizontal"==this.dataRangeOption.orient?e:this._itemGroupLocation.x+this._itemGroupLocation.width/2,y:"horizontal"==this.dataRangeOption.orient?this._itemGroupLocation.y+this._itemGroupLocation.height/2:t,color:this.dataRangeOption.textStyle.color,text:i,textFont:this.getFont(this.dataRangeOption.textStyle),textBaseline:"horizontal"==this.dataRangeOption.orient?"middle":"top",textAlign:"horizontal"==this.dataRangeOption.orient?"left":"center"},hoverable:!1}},_getItemShape:function(e,t,i,n,a){return{zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:e,y:t+1,width:i,height:n-2,color:a},highlightStyle:{strokeColor:a,lineWidth:1}}},__ondrift:function(e,t,i){var n=this._calculableLocation.x,a=this._calculableLocation.y,o=this._calculableLocation.width,r=this._calculableLocation.height;return"horizontal"==this.dataRangeOption.orient?e.style.x+t<=n?e.style.x=n:e.style.x+t+e.style.width>=n+o?e.style.x=n+o-e.style.width:e.style.x+=t:e.style.y+i<=a?e.style.y=a:e.style.y+i+e.style.height>=a+r?e.style.y=a+r-e.style.height:e.style.y+=i,"filler"==e._type?this._syncHandleShape():this._syncFillerShape(e),this.dataRangeOption.realtime&&this._dispatchDataRange(),!0},__ondragend:function(){this.isDragend=!0},ondragend:function(e,t){this.isDragend&&e.target&&(t.dragOut=!0,t.dragIn=!0,this.dataRangeOption.realtime||this._dispatchDataRange(),t.needRefresh=!1,this.isDragend=!1)},_syncShapeFromRange:function(){var e=this.dataRangeOption.range||{},t=e.start,i=e.end;if(t>i&&(t=[i,i=t][0]),this._range.end=null!=t?t:null!=this._range.end?this._range.end:0,this._range.start=null!=i?i:null!=this._range.start?this._range.start:100,100!=this._range.start||0!==this._range.end){if("horizontal"==this.dataRangeOption.orient){var n=this._fillerShape.style.width;this._fillerShape.style.x+=n*(100-this._range.start)/100,this._fillerShape.style.width=n*(this._range.start-this._range.end)/100}else{var a=this._fillerShape.style.height;this._fillerShape.style.y+=a*(100-this._range.start)/100,this._fillerShape.style.height=a*(this._range.start-this._range.end)/100}this.zr.modShape(this._fillerShape.id),this._syncHandleShape()}},_syncHandleShape:function(){var e=this._calculableLocation.x,t=this._calculableLocation.y,i=this._calculableLocation.width,n=this._calculableLocation.height;"horizontal"==this.dataRangeOption.orient?(this._startShape.style.x=this._fillerShape.style.x,this._startMask.style.width=this._startShape.style.x-e,this._endShape.style.x=this._fillerShape.style.x+this._fillerShape.style.width,this._endMask.style.x=this._endShape.style.x,this._endMask.style.width=e+i-this._endShape.style.x,this._range.start=Math.ceil(100-(this._startShape.style.x-e)/i*100),this._range.end=Math.floor(100-(this._endShape.style.x-e)/i*100)):(this._startShape.style.y=this._fillerShape.style.y,this._startMask.style.height=this._startShape.style.y-t,this._endShape.style.y=this._fillerShape.style.y+this._fillerShape.style.height,this._endMask.style.y=this._endShape.style.y,this._endMask.style.height=t+n-this._endShape.style.y,this._range.start=Math.ceil(100-(this._startShape.style.y-t)/n*100),this._range.end=Math.floor(100-(this._endShape.style.y-t)/n*100)),this._syncShape()},_syncFillerShape:function(e){var t,i,n=this._calculableLocation.x,a=this._calculableLocation.y,o=this._calculableLocation.width,r=this._calculableLocation.height;"horizontal"==this.dataRangeOption.orient?(t=this._startShape.style.x,i=this._endShape.style.x,e.id==this._startShape.id&&t>=i?(i=t,this._endShape.style.x=t):e.id==this._endShape.id&&t>=i&&(t=i,this._startShape.style.x=t),this._fillerShape.style.x=t,this._fillerShape.style.width=i-t,this._startMask.style.width=t-n,this._endMask.style.x=i,this._endMask.style.width=n+o-i,this._range.start=Math.ceil(100-(t-n)/o*100),this._range.end=Math.floor(100-(i-n)/o*100)):(t=this._startShape.style.y,i=this._endShape.style.y,e.id==this._startShape.id&&t>=i?(i=t,this._endShape.style.y=t):e.id==this._endShape.id&&t>=i&&(t=i,this._startShape.style.y=t),this._fillerShape.style.y=t,this._fillerShape.style.height=i-t,this._startMask.style.height=t-a,this._endMask.style.y=i,this._endMask.style.height=a+r-i,this._range.start=Math.ceil(100-(t-a)/r*100),this._range.end=Math.floor(100-(i-a)/r*100)),this._syncShape()},_syncShape:function(){this._startShape.position=[this._startShape.style.x-this._startShape.style._x,this._startShape.style.y-this._startShape.style._y],this._startShape.style.text=this._textFormat(this._gap*this._range.start+this.dataRangeOption.min),this._startShape.style.color=this._startShape.highlightStyle.strokeColor=this.getColor(this._gap*this._range.start+this.dataRangeOption.min),this._endShape.position=[this._endShape.style.x-this._endShape.style._x,this._endShape.style.y-this._endShape.style._y],this._endShape.style.text=this._textFormat(this._gap*this._range.end+this.dataRangeOption.min),this._endShape.style.color=this._endShape.highlightStyle.strokeColor=this.getColor(this._gap*this._range.end+this.dataRangeOption.min),this.zr.modShape(this._startShape.id),this.zr.modShape(this._endShape.id),this.zr.modShape(this._startMask.id),this.zr.modShape(this._endMask.id),this.zr.modShape(this._fillerShape.id),this.zr.refreshNextFrame()},_dispatchDataRange:function(){this.messageCenter.dispatch(r.EVENT.DATA_RANGE,null,{range:{start:this._range.end,end:this._range.start}},this.myChart)},__dataRangeSelected:function(e){if("single"===this.dataRangeOption.selectedMode)for(var t in this._selectedMap)this._selectedMap[t]=!1;var i=e.target._idx;this._selectedMap[i]=!this._selectedMap[i];var n,a;this._useCustomizedSplit()?(n=this._splitList[i].max,a=this._splitList[i].min):(n=(this._colorList.length-i)*this._gap+this.dataRangeOption.min,a=n-this._gap),this.messageCenter.dispatch(r.EVENT.DATA_RANGE_SELECTED,e.event,{selected:this._selectedMap,target:i,valueMax:n,valueMin:a},this.myChart),this.messageCenter.dispatch(r.EVENT.REFRESH,null,null,this.myChart)},__dispatchHoverLink:function(e){var t,i;if(this.dataRangeOption.calculable){var n,a=this.dataRangeOption.max-this.dataRangeOption.min;n="horizontal"==this.dataRangeOption.orient?(1-(l.getX(e.event)-this._calculableLocation.x)/this._calculableLocation.width)*a:(1-(l.getY(e.event)-this._calculableLocation.y)/this._calculableLocation.height)*a,t=n-.05*a,i=n+.05*a}else if(this._useCustomizedSplit()){var o=e.target._idx;i=this._splitList[o].max,t=this._splitList[o].min}else{var o=e.target._idx;i=(this._colorList.length-o)*this._gap+this.dataRangeOption.min,t=i-this._gap}this.messageCenter.dispatch(r.EVENT.DATA_RANGE_HOVERLINK,e.event,{valueMin:t,valueMax:i},this.myChart)},__onhoverlink:function(e){if(this.dataRangeOption.show&&this.dataRangeOption.hoverLink&&this._indicatorShape&&e&&null!=e.seriesIndex&&null!=e.dataIndex){var t=e.value;if(""===t||isNaN(t))return;t<this.dataRangeOption.min?t=this.dataRangeOption.min:t>this.dataRangeOption.max&&(t=this.dataRangeOption.max),this._indicatorShape.position="horizontal"==this.dataRangeOption.orient?[(this.dataRangeOption.max-t)/(this.dataRangeOption.max-this.dataRangeOption.min)*this._calculableLocation.width,0]:[0,(this.dataRangeOption.max-t)/(this.dataRangeOption.max-this.dataRangeOption.min)*this._calculableLocation.height],this._indicatorShape.style.text=this._textFormat(e.value),this._indicatorShape.style.color=this.getColor(t),this.zr.addHoverShape(this._indicatorShape)}},_textFormat:function(e,t){var i=this.dataRangeOption;if(e!==-Number.MAX_VALUE&&(e=(+e).toFixed(i.precision)),null!=t&&t!==Number.MAX_VALUE&&(t=(+t).toFixed(i.precision)),i.formatter){if("string"==typeof i.formatter)return i.formatter.replace("{value}",e===-Number.MAX_VALUE?"min":e).replace("{value2}",t===Number.MAX_VALUE?"max":t);if("function"==typeof i.formatter)return i.formatter.call(this.myChart,e,t)}return null==t?e:e===-Number.MAX_VALUE?"< "+t:t===Number.MAX_VALUE?"> "+e:e+" - "+t},_isContinuity:function(){var e=this.dataRangeOption;return!(e.splitList?e.splitList.length>0:e.splitNumber>0)||e.calculable},_useCustomizedSplit:function(){var e=this.dataRangeOption;return e.splitList&&e.splitList.length>0},_buildColorList:function(e){if(this._colorList=m.getGradientColors(this.dataRangeOption.color,Math.max((e-this.dataRangeOption.color.length)/(this.dataRangeOption.color.length-1),0)+1),this._colorList.length>e){for(var t=this._colorList.length,i=[this._colorList[0]],n=t/(e-1),a=1;e-1>a;a++)i.push(this._colorList[Math.floor(a*n)]);i.push(this._colorList[t-1]),this._colorList=i}if(this._useCustomizedSplit())for(var o=this._splitList,a=0,t=o.length;t>a;a++)o[a].color&&(this._colorList[a]=o[a].color)},_buildGap:function(e){if(!this._useCustomizedSplit()){var t=this.dataRangeOption.precision;for(this._gap=(this.dataRangeOption.max-this.dataRangeOption.min)/e;this._gap.toFixed(t)-0!=this._gap&&5>t;)t++;this.dataRangeOption.precision=t,this._gap=((this.dataRangeOption.max-this.dataRangeOption.min)/e).toFixed(t)-0}},_buildDataList:function(e){for(var t=this._valueTextList=[],i=this.dataRangeOption,n=this._useCustomizedSplit(),a=0;e>a;a++){this._selectedMap[a]=!0;var o="";if(n){var r=this._splitList[e-1-a];o=null!=r.label?r.label:null!=r.single?this._textFormat(r.single):this._textFormat(r.min,r.max)}else o=this._textFormat(a*this._gap+i.min,(a+1)*this._gap+i.min);t.unshift(o)}},_buildSplitList:function(){if(this._useCustomizedSplit())for(var e=this.dataRangeOption.splitList,t=this._splitList=[],i=0,n=e.length;n>i;i++){var a=e[i];if(!a||null==a.start&&null==a.end)throw new Error("Empty item exists in splitList!");var o={label:a.label,color:a.color};o.min=a.start,o.max=a.end,o.min>o.max&&(o.min=[o.max,o.max=o.min][0]),o.min===o.max&&(o.single=o.max),null==o.min&&(o.min=-Number.MAX_VALUE),null==o.max&&(o.max=Number.MAX_VALUE),t.push(o)}},refresh:function(e){if(e){this.option=e,this.option.dataRange=this.reformOption(this.option.dataRange);var t=this.dataRangeOption=this.option.dataRange;if(!this._useCustomizedSplit()&&(null==t.min||null==t.max))throw new Error("option.dataRange.min or option.dataRange.max has not been defined.");this.myChart.canvasSupported||(t.realtime=!1);var i=this._isContinuity()?100:this._useCustomizedSplit()?t.splitList.length:t.splitNumber;this._buildSplitList(),this._buildColorList(i),this._buildGap(i),this._buildDataList(i)}this.clear(),this._buildShape()},getColor:function(e){if(isNaN(e))return null;var t;if(this._useCustomizedSplit()){for(var i=this._splitList,n=0,a=i.length;a>n;n++)if(i[n].min<=e&&i[n].max>=e){t=n;break}}else{if(this.dataRangeOption.min==this.dataRangeOption.max)return this._colorList[0];if(e<this.dataRangeOption.min?e=this.dataRangeOption.min:e>this.dataRangeOption.max&&(e=this.dataRangeOption.max),this.dataRangeOption.calculable&&(e-(this._gap*this._range.start+this.dataRangeOption.min)>5e-5||e-(this._gap*this._range.end+this.dataRangeOption.min)<-5e-5))return null;t=this._colorList.length-Math.ceil((e-this.dataRangeOption.min)/(this.dataRangeOption.max-this.dataRangeOption.min)*this._colorList.length),t==this._colorList.length&&t--}return this._selectedMap[t]?this._colorList[t]:null},getColorByIndex:function(e){return e>=this._colorList.length?e=this._colorList.length-1:0>e&&(e=0),this._colorList[e]},onbeforDispose:function(){this.messageCenter.unbind(r.EVENT.HOVER,this._onhoverlink)}},s.inherits(t,i),e("../component").define("dataRange",t),t}),i("echarts/util/shape/HandlePolygon",["require","zrender/shape/Base","zrender/shape/Polygon","zrender/tool/util"],function(e){function t(e){i.call(this,e)}var i=e("zrender/shape/Base"),n=e("zrender/shape/Polygon"),a=e("zrender/tool/util");return t.prototype={type:"handle-polygon",buildPath:function(e,t){n.prototype.buildPath(e,t)},isCover:function(e,t){var i=this.transformCoordToLocal(e,t);e=i[0],t=i[1];var n=this.style.rect;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height?!0:!1}},a.inherits(t,i),t}),i("echarts/chart/k",["require","./base","../util/shape/Candle","../component/axis","../component/grid","../component/dataZoom","../config","../util/ecData","zrender/tool/util","../chart"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o),this.refresh(a)}var i=e("./base"),n=e("../util/shape/Candle");e("../component/axis"),e("../component/grid"),e("../component/dataZoom");var a=e("../config");a.k={zlevel:0,z:2,clickable:!0,hoverable:!0,legendHoverLink:!1,xAxisIndex:0,yAxisIndex:0,itemStyle:{normal:{color:"#fff",color0:"#00aa11",lineStyle:{width:1,color:"#ff3200",color0:"#00aa11"},label:{show:!1}},emphasis:{label:{show:!1}}}};var o=e("../util/ecData"),r=e("zrender/tool/util");return t.prototype={type:a.CHART_TYPE_K,_buildShape:function(){var e=this.series;this.selectedMap={};for(var t,i={top:[],bottom:[]},n=0,o=e.length;o>n;n++)e[n].type===a.CHART_TYPE_K&&(e[n]=this.reformOption(e[n]),this.legendHoverLink=e[n].legendHoverLink||this.legendHoverLink,t=this.component.xAxis.getAxis(e[n].xAxisIndex),t.type===a.COMPONENT_TYPE_AXIS_CATEGORY&&i[t.getPosition()].push(n));for(var r in i)i[r].length>0&&this._buildSinglePosition(r,i[r]);this.addShapeList()},_buildSinglePosition:function(e,t){var i=this._mapData(t),n=i.locationMap,a=i.maxDataLength;if(0!==a&&0!==n.length){this._buildHorizontal(t,a,n);for(var o=0,r=t.length;r>o;o++)this.buildMark(t[o])}},_mapData:function(e){for(var t,i,n=this.series,a=this.component.legend,o=[],r=0,s=0,l=e.length;l>s;s++)t=n[e[s]],i=t.name,this.selectedMap[i]=a?a.isSelected(i):!0,this.selectedMap[i]&&o.push(e[s]),r=Math.max(r,t.data.length);return{locationMap:o,maxDataLength:r}},_buildHorizontal:function(e,t,i){for(var n,a,o,r,s,l,h,m,V,U,d=this.series,p={},c=0,u=i.length;u>c;c++){n=i[c],a=d[n],o=a.xAxisIndex||0,r=this.component.xAxis.getAxis(o),h=a.barWidth||Math.floor(r.getGap()/2),U=a.barMaxWidth,U&&h>U&&(h=U),s=a.yAxisIndex||0,l=this.component.yAxis.getAxis(s),p[n]=[];for(var y=0,g=t;g>y&&null!=r.getNameByIndex(y);y++)m=a.data[y],V=this.getDataFromOption(m,"-"),"-"!==V&&4==V.length&&p[n].push([r.getCoordByIndex(y),h,l.getCoord(V[0]),l.getCoord(V[1]),l.getCoord(V[2]),l.getCoord(V[3]),y,r.getNameByIndex(y)])}this._buildKLine(e,p)},_buildKLine:function(e,t){for(var i,n,o,r,s,l,h,m,V,U,d,p,c,u,y,g,b,f=this.series,k=0,x=e.length;x>k;k++)if(b=e[k],d=f[b],u=t[b],this._isLarge(u)&&(u=this._getLargePointList(u)),d.type===a.CHART_TYPE_K&&null!=u){p=d,i=this.query(p,"itemStyle.normal.lineStyle.width"),n=this.query(p,"itemStyle.normal.lineStyle.color"),o=this.query(p,"itemStyle.normal.lineStyle.color0"),r=this.query(p,"itemStyle.normal.color"),s=this.query(p,"itemStyle.normal.color0"),l=this.query(p,"itemStyle.emphasis.lineStyle.width"),h=this.query(p,"itemStyle.emphasis.lineStyle.color"),m=this.query(p,"itemStyle.emphasis.lineStyle.color0"),V=this.query(p,"itemStyle.emphasis.color"),U=this.query(p,"itemStyle.emphasis.color0");for(var _=0,L=u.length;L>_;_++)y=u[_],c=d.data[y[6]],p=c,g=y[3]<y[2],this.shapeList.push(this._getCandle(b,y[6],y[7],y[0],y[1],y[2],y[3],y[4],y[5],g?this.query(p,"itemStyle.normal.color")||r:this.query(p,"itemStyle.normal.color0")||s,this.query(p,"itemStyle.normal.lineStyle.width")||i,g?this.query(p,"itemStyle.normal.lineStyle.color")||n:this.query(p,"itemStyle.normal.lineStyle.color0")||o,g?this.query(p,"itemStyle.emphasis.color")||V||r:this.query(p,"itemStyle.emphasis.color0")||U||s,this.query(p,"itemStyle.emphasis.lineStyle.width")||l||i,g?this.query(p,"itemStyle.emphasis.lineStyle.color")||h||n:this.query(p,"itemStyle.emphasis.lineStyle.color0")||m||o))}},_isLarge:function(e){return e[0][1]<.5},_getLargePointList:function(e){for(var t=this.component.grid.getWidth(),i=e.length,n=[],a=0;t>a;a++)n[a]=e[Math.floor(i/t*a)];return n},_getCandle:function(e,t,i,a,r,s,l,h,m,V,U,d,p,c,u){var y=this.series,g=y[e],b=g.data[t],f=[b,g],k={zlevel:g.zlevel,z:g.z,clickable:this.deepQuery(f,"clickable"),hoverable:this.deepQuery(f,"hoverable"),style:{x:a,y:[s,l,h,m],width:r,color:V,strokeColor:d,lineWidth:U,brushType:"both"},highlightStyle:{color:p,strokeColor:u,lineWidth:c},_seriesIndex:e};return k=this.addLabel(k,g,b,i),o.pack(k,g,e,b,t,i),k=new n(k)},getMarkCoord:function(e,t){var i=this.series[e],n=this.component.xAxis.getAxis(i.xAxisIndex),a=this.component.yAxis.getAxis(i.yAxisIndex);return["string"!=typeof t.xAxis&&n.getCoordByIndex?n.getCoordByIndex(t.xAxis||0):n.getCoord(t.xAxis||0),"string"!=typeof t.yAxis&&a.getCoordByIndex?a.getCoordByIndex(t.yAxis||0):a.getCoord(t.yAxis||0)]},refresh:function(e){e&&(this.option=e,this.series=e.series),this.backupShapeList(),this._buildShape()},addDataAnimation:function(e,t){function i(){p--,0===p&&t&&t()}for(var n=this.series,a={},r=0,s=e.length;s>r;r++)a[e[r][0]]=e[r];for(var l,h,m,V,U,d,p=0,r=0,s=this.shapeList.length;s>r;r++)if(U=this.shapeList[r]._seriesIndex,a[U]&&!a[U][3]&&"candle"===this.shapeList[r].type){if(d=o.get(this.shapeList[r],"dataIndex"),V=n[U],a[U][2]&&d===V.data.length-1){this.zr.delShape(this.shapeList[r].id);continue}if(!a[U][2]&&0===d){this.zr.delShape(this.shapeList[r].id);continue}h=this.component.xAxis.getAxis(V.xAxisIndex||0).getGap(),l=a[U][2]?h:-h,m=0,p++,this.zr.animate(this.shapeList[r].id,"").when(this.query(this.option,"animationDurationUpdate"),{position:[l,m]}).done(i).start()}p||t&&t()}},r.inherits(t,i),e("../chart").define("k",t),t}),i("echarts/chart/pie",["require","./base","zrender/shape/Text","zrender/shape/Ring","zrender/shape/Circle","zrender/shape/Sector","zrender/shape/Polyline","../config","../util/ecData","zrender/tool/util","zrender/tool/math","zrender/tool/color","../chart"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o);var r=this;r.shapeHandler.onmouseover=function(e){var t=e.target,i=h.get(t,"seriesIndex"),n=h.get(t,"dataIndex"),a=h.get(t,"special"),o=[t.style.x,t.style.y],s=t.style.startAngle,l=t.style.endAngle,m=((l+s)/2+360)%360,V=t.highlightStyle.color,U=r.getLabel(i,n,a,o,m,V,!0);U&&r.zr.addHoverShape(U);var d=r.getLabelLine(i,n,o,t.style.r0,t.style.r,m,V,!0);d&&r.zr.addHoverShape(d)},this.refresh(a)}var i=e("./base"),n=e("zrender/shape/Text"),a=e("zrender/shape/Ring"),o=e("zrender/shape/Circle"),r=e("zrender/shape/Sector"),s=e("zrender/shape/Polyline"),l=e("../config");l.pie={zlevel:0,z:2,clickable:!0,legendHoverLink:!0,center:["50%","50%"],radius:[0,"75%"],clockWise:!0,startAngle:90,minAngle:0,selectedOffset:10,itemStyle:{normal:{borderColor:"rgba(0,0,0,0)",borderWidth:1,label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}}},emphasis:{borderColor:"rgba(0,0,0,0)",borderWidth:1,label:{show:!1},labelLine:{show:!1,length:20,lineStyle:{width:1,type:"solid"}}}}};var h=e("../util/ecData"),m=e("zrender/tool/util"),V=e("zrender/tool/math"),U=e("zrender/tool/color");return t.prototype={type:l.CHART_TYPE_PIE,_buildShape:function(){var e=this.series,t=this.component.legend;this.selectedMap={},this._selected={};var i,n,r;this._selectedMode=!1;for(var s,m=0,V=e.length;V>m;m++)if(e[m].type===l.CHART_TYPE_PIE){if(e[m]=this.reformOption(e[m]),this.legendHoverLink=e[m].legendHoverLink||this.legendHoverLink,s=e[m].name||"",this.selectedMap[s]=t?t.isSelected(s):!0,!this.selectedMap[s])continue;i=this.parseCenter(this.zr,e[m].center),n=this.parseRadius(this.zr,e[m].radius),this._selectedMode=this._selectedMode||e[m].selectedMode,this._selected[m]=[],this.deepQuery([e[m],this.option],"calculable")&&(r={zlevel:e[m].zlevel,z:e[m].z,hoverable:!1,style:{x:i[0],y:i[1],r0:n[0]<=10?0:n[0]-10,r:n[1]+10,brushType:"stroke",lineWidth:1,strokeColor:e[m].calculableHolderColor||this.ecTheme.calculableHolderColor||l.calculableHolderColor}},h.pack(r,e[m],m,void 0,-1),this.setCalculable(r),r=n[0]<=10?new o(r):new a(r),this.shapeList.push(r)),this._buildSinglePie(m),this.buildMark(m)}this.addShapeList()},_buildSinglePie:function(e){for(var t,i=this.series,n=i[e],a=n.data,o=this.component.legend,r=0,s=0,l=0,h=Number.NEGATIVE_INFINITY,m=[],V=0,U=a.length;U>V;V++)t=a[V].name,
+this.selectedMap[t]=o?o.isSelected(t):!0,this.selectedMap[t]&&!isNaN(a[V].value)&&(0!==+a[V].value?r++:s++,l+=+a[V].value,h=Math.max(h,+a[V].value));if(0!==l){for(var d,p,c,u,y,g,b=100,f=n.clockWise,k=(n.startAngle.toFixed(2)-0+360)%360,x=n.minAngle||.01,_=360-x*r-.01*s,L=n.roseType,V=0,U=a.length;U>V;V++)if(t=a[V].name,this.selectedMap[t]&&!isNaN(a[V].value)){if(p=o?o.getColor(t):this.zr.getColor(V),b=a[V].value/l,d="area"!=L?f?k-b*_-(0!==b?x:.01):b*_+k+(0!==b?x:.01):f?k-360/U:360/U+k,d=d.toFixed(2)-0,b=(100*b).toFixed(2),c=this.parseCenter(this.zr,n.center),u=this.parseRadius(this.zr,n.radius),y=+u[0],g=+u[1],"radius"===L?g=a[V].value/h*(g-y)*.8+.2*(g-y)+y:"area"===L&&(g=Math.sqrt(a[V].value/h)*(g-y)+y),f){var W;W=k,k=d,d=W}this._buildItem(m,e,V,b,a[V].selected,c,y,g,k,d,p),f||(k=d)}this._autoLabelLayout(m,c,g);for(var V=0,U=m.length;U>V;V++)this.shapeList.push(m[V]);m=null}},_buildItem:function(e,t,i,n,a,o,r,s,l,m,V){var U=this.series,d=((m+l)/2+360)%360,p=this.getSector(t,i,n,a,o,r,s,l,m,V);h.pack(p,U[t],t,U[t].data[i],i,U[t].data[i].name,n),e.push(p);var c=this.getLabel(t,i,n,o,d,V,!1),u=this.getLabelLine(t,i,o,r,s,d,V,!1);u&&(h.pack(u,U[t],t,U[t].data[i],i,U[t].data[i].name,n),e.push(u)),c&&(h.pack(c,U[t],t,U[t].data[i],i,U[t].data[i].name,n),c._labelLine=u,e.push(c))},getSector:function(e,t,i,n,a,o,s,l,h,m){var d=this.series,p=d[e],c=p.data[t],u=[c,p],y=this.deepMerge(u,"itemStyle.normal")||{},g=this.deepMerge(u,"itemStyle.emphasis")||{},b=this.getItemStyleColor(y.color,e,t,c)||m,f=this.getItemStyleColor(g.color,e,t,c)||("string"==typeof b?U.lift(b,-.2):b),k={zlevel:p.zlevel,z:p.z,clickable:this.deepQuery(u,"clickable"),style:{x:a[0],y:a[1],r0:o,r:s,startAngle:l,endAngle:h,brushType:"both",color:b,lineWidth:y.borderWidth,strokeColor:y.borderColor,lineJoin:"round"},highlightStyle:{color:f,lineWidth:g.borderWidth,strokeColor:g.borderColor,lineJoin:"round"},_seriesIndex:e,_dataIndex:t};if(n){var x=((k.style.startAngle+k.style.endAngle)/2).toFixed(2)-0;k.style._hasSelected=!0,k.style._x=k.style.x,k.style._y=k.style.y;var _=this.query(p,"selectedOffset");k.style.x+=V.cos(x,!0)*_,k.style.y-=V.sin(x,!0)*_,this._selected[e][t]=!0}else this._selected[e][t]=!1;return this._selectedMode&&(k.onclick=this.shapeHandler.onclick),this.deepQuery([c,p,this.option],"calculable")&&(this.setCalculable(k),k.draggable=!0),(this._needLabel(p,c,!0)||this._needLabelLine(p,c,!0))&&(k.onmouseover=this.shapeHandler.onmouseover),k=new r(k)},getLabel:function(e,t,i,a,o,r,s){var l=this.series,h=l[e],U=h.data[t];if(this._needLabel(h,U,s)){var d,p,c,u=s?"emphasis":"normal",y=m.merge(m.clone(U.itemStyle)||{},h.itemStyle),g=y[u].label,b=g.textStyle||{},f=a[0],k=a[1],x=this.parseRadius(this.zr,h.radius),_="middle";g.position=g.position||y.normal.label.position,"center"===g.position?(d=f,p=k,c="center"):"inner"===g.position||"inside"===g.position?(x=(x[0]+x[1])*(g.distance||.5),d=Math.round(f+x*V.cos(o,!0)),p=Math.round(k-x*V.sin(o,!0)),r="#fff",c="center"):(x=x[1]- -y[u].labelLine.length,d=Math.round(f+x*V.cos(o,!0)),p=Math.round(k-x*V.sin(o,!0)),c=o>=90&&270>=o?"right":"left"),"center"!=g.position&&"inner"!=g.position&&"inside"!=g.position&&(d+="left"===c?20:-20),U.__labelX=d-("left"===c?5:-5),U.__labelY=p;var L=new n({zlevel:h.zlevel,z:h.z+1,hoverable:!1,style:{x:d,y:p,color:b.color||r,text:this.getLabelText(e,t,i,u),textAlign:b.align||c,textBaseline:b.baseline||_,textFont:this.getFont(b)},highlightStyle:{brushType:"fill"}});return L._radius=x,L._labelPosition=g.position||"outer",L._rect=L.getRect(L.style),L._seriesIndex=e,L._dataIndex=t,L}},getLabelText:function(e,t,i,n){var a=this.series,o=a[e],r=o.data[t],s=this.deepQuery([r,o],"itemStyle."+n+".label.formatter");return s?"function"==typeof s?s.call(this.myChart,{seriesIndex:e,seriesName:o.name||"",series:o,dataIndex:t,data:r,name:r.name,value:r.value,percent:i}):"string"==typeof s?(s=s.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}").replace("{d}","{d0}"),s=s.replace("{a0}",o.name).replace("{b0}",r.name).replace("{c0}",r.value).replace("{d0}",i)):void 0:r.name},getLabelLine:function(e,t,i,n,a,o,r,l){var h=this.series,U=h[e],d=U.data[t];if(this._needLabelLine(U,d,l)){var p=l?"emphasis":"normal",c=m.merge(m.clone(d.itemStyle)||{},U.itemStyle),u=c[p].labelLine,y=u.lineStyle||{},g=i[0],b=i[1],f=a,k=this.parseRadius(this.zr,U.radius)[1]- -u.length,x=V.cos(o,!0),_=V.sin(o,!0);return new s({zlevel:U.zlevel,z:U.z+1,hoverable:!1,style:{pointList:[[g+f*x,b-f*_],[g+k*x,b-k*_],[d.__labelX,d.__labelY]],strokeColor:y.color||r,lineType:y.type,lineWidth:y.width},_seriesIndex:e,_dataIndex:t})}},_needLabel:function(e,t,i){return this.deepQuery([t,e],"itemStyle."+(i?"emphasis":"normal")+".label.show")},_needLabelLine:function(e,t,i){return this.deepQuery([t,e],"itemStyle."+(i?"emphasis":"normal")+".labelLine.show")},_autoLabelLayout:function(e,t,i){for(var n=[],a=[],o=0,r=e.length;r>o;o++)("outer"===e[o]._labelPosition||"outside"===e[o]._labelPosition)&&(e[o]._rect._y=e[o]._rect.y,e[o]._rect.x<t[0]?n.push(e[o]):a.push(e[o]));this._layoutCalculate(n,t,i,-1),this._layoutCalculate(a,t,i,1)},_layoutCalculate:function(e,t,i,n){function a(t,i,n){for(var a=t;i>a;a++)if(e[a]._rect.y+=n,e[a].style.y+=n,e[a]._labelLine&&(e[a]._labelLine.style.pointList[1][1]+=n,e[a]._labelLine.style.pointList[2][1]+=n),a>t&&i>a+1&&e[a+1]._rect.y>e[a]._rect.y+e[a]._rect.height)return void o(a,n/2);o(i-1,n/2)}function o(t,i){for(var n=t;n>=0&&(e[n]._rect.y-=i,e[n].style.y-=i,e[n]._labelLine&&(e[n]._labelLine.style.pointList[1][1]-=i,e[n]._labelLine.style.pointList[2][1]-=i),!(n>0&&e[n]._rect.y>e[n-1]._rect.y+e[n-1]._rect.height));n--);}function r(e,t,i,n,a){for(var o,r,s,l=i[0],h=i[1],m=a>0?t?Number.MAX_VALUE:0:t?Number.MAX_VALUE:0,V=0,U=e.length;U>V;V++)r=Math.abs(e[V]._rect.y-h),s=e[V]._radius-n,o=n+s>r?Math.sqrt((n+s+20)*(n+s+20)-Math.pow(e[V]._rect.y-h,2)):Math.abs(e[V]._rect.x+(a>0?0:e[V]._rect.width)-l),t&&o>=m&&(o=m-10),!t&&m>=o&&(o=m+10),e[V]._rect.x=e[V].style.x=l+o*a,e[V]._labelLine&&(e[V]._labelLine.style.pointList[2][0]=l+(o-5)*a,e[V]._labelLine.style.pointList[1][0]=l+(o-20)*a),m=o}e.sort(function(e,t){return e._rect.y-t._rect.y});for(var s,l=0,h=e.length,m=[],V=[],U=0;h>U;U++)s=e[U]._rect.y-l,0>s&&a(U,h,-s,n),l=e[U]._rect.y+e[U]._rect.height;this.zr.getHeight()-l<0&&o(h-1,l-this.zr.getHeight());for(var U=0;h>U;U++)e[U]._rect.y>=t[1]?V.push(e[U]):m.push(e[U]);r(V,!0,t,i,n),r(m,!1,t,i,n)},reformOption:function(e){var t=m.merge;return e=t(t(e||{},m.clone(this.ecTheme.pie||{})),m.clone(l.pie)),e.itemStyle.normal.label.textStyle=this.getTextStyle(e.itemStyle.normal.label.textStyle),e.itemStyle.emphasis.label.textStyle=this.getTextStyle(e.itemStyle.emphasis.label.textStyle),this.z=e.z,this.zlevel=e.zlevel,e},refresh:function(e){e&&(this.option=e,this.series=e.series),this.backupShapeList(),this._buildShape()},addDataAnimation:function(e,t){function i(){s--,0===s&&t&&t()}for(var n=this.series,a={},o=0,r=e.length;r>o;o++)a[e[o][0]]=e[o];var s=0,h={},m={},V={},U=this.shapeList;this.shapeList=[];for(var d,p,c,u={},o=0,r=e.length;r>o;o++)d=e[o][0],p=e[o][2],c=e[o][3],n[d]&&n[d].type===l.CHART_TYPE_PIE&&(p?(c||(h[d+"_"+n[d].data.length]="delete"),u[d]=1):c?u[d]=0:(h[d+"_-1"]="delete",u[d]=-1),this._buildSinglePie(d));for(var y,g,o=0,r=this.shapeList.length;r>o;o++)switch(d=this.shapeList[o]._seriesIndex,y=this.shapeList[o]._dataIndex,g=d+"_"+y,this.shapeList[o].type){case"sector":h[g]=this.shapeList[o];break;case"text":m[g]=this.shapeList[o];break;case"polyline":V[g]=this.shapeList[o]}this.shapeList=[];for(var b,o=0,r=U.length;r>o;o++)if(d=U[o]._seriesIndex,a[d]){if(y=U[o]._dataIndex+u[d],g=d+"_"+y,b=h[g],!b)continue;if("sector"===U[o].type)"delete"!=b?(s++,this.zr.animate(U[o].id,"style").when(400,{startAngle:b.style.startAngle,endAngle:b.style.endAngle}).done(i).start()):(s++,this.zr.animate(U[o].id,"style").when(400,u[d]<0?{startAngle:U[o].style.startAngle}:{endAngle:U[o].style.endAngle}).done(i).start());else if("text"===U[o].type||"polyline"===U[o].type)if("delete"===b)this.zr.delShape(U[o].id);else switch(U[o].type){case"text":s++,b=m[g],this.zr.animate(U[o].id,"style").when(400,{x:b.style.x,y:b.style.y}).done(i).start();break;case"polyline":s++,b=V[g],this.zr.animate(U[o].id,"style").when(400,{pointList:b.style.pointList}).done(i).start()}}this.shapeList=U,s||t&&t()},onclick:function(e){var t=this.series;if(this.isClick&&e.target){this.isClick=!1;for(var i,n=e.target,a=n.style,o=h.get(n,"seriesIndex"),r=h.get(n,"dataIndex"),s=0,m=this.shapeList.length;m>s;s++)if(this.shapeList[s].id===n.id){if(o=h.get(n,"seriesIndex"),r=h.get(n,"dataIndex"),a._hasSelected)n.style.x=n.style._x,n.style.y=n.style._y,n.style._hasSelected=!1,this._selected[o][r]=!1;else{var U=((a.startAngle+a.endAngle)/2).toFixed(2)-0;n.style._hasSelected=!0,this._selected[o][r]=!0,n.style._x=n.style.x,n.style._y=n.style.y,i=this.query(t[o],"selectedOffset"),n.style.x+=V.cos(U,!0)*i,n.style.y-=V.sin(U,!0)*i}this.zr.modShape(n.id)}else this.shapeList[s].style._hasSelected&&"single"===this._selectedMode&&(o=h.get(this.shapeList[s],"seriesIndex"),r=h.get(this.shapeList[s],"dataIndex"),this.shapeList[s].style.x=this.shapeList[s].style._x,this.shapeList[s].style.y=this.shapeList[s].style._y,this.shapeList[s].style._hasSelected=!1,this._selected[o][r]=!1,this.zr.modShape(this.shapeList[s].id));this.messageCenter.dispatch(l.EVENT.PIE_SELECTED,e.event,{selected:this._selected,target:h.get(n,"name")},this.myChart),this.zr.refreshNextFrame()}}},m.inherits(t,i),e("../chart").define("pie",t),t}),i("echarts/chart/radar",["require","./base","zrender/shape/Polygon","../component/polar","../config","../util/ecData","zrender/tool/util","zrender/tool/color","../util/accMath","../chart"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o),this.refresh(a)}var i=e("./base"),n=e("zrender/shape/Polygon");e("../component/polar");var a=e("../config");a.radar={zlevel:0,z:2,clickable:!0,legendHoverLink:!0,polarIndex:0,itemStyle:{normal:{label:{show:!1},lineStyle:{width:2,type:"solid"}},emphasis:{label:{show:!1}}},symbolSize:2};var o=e("../util/ecData"),r=e("zrender/tool/util"),s=e("zrender/tool/color");return t.prototype={type:a.CHART_TYPE_RADAR,_buildShape:function(){this.selectedMap={},this._symbol=this.option.symbolList,this._queryTarget,this._dropBoxList=[],this._radarDataCounter=0;for(var e,t=this.series,i=this.component.legend,n=0,o=t.length;o>n;n++)t[n].type===a.CHART_TYPE_RADAR&&(this.serie=this.reformOption(t[n]),this.legendHoverLink=t[n].legendHoverLink||this.legendHoverLink,e=this.serie.name||"",this.selectedMap[e]=i?i.isSelected(e):!0,this.selectedMap[e]&&(this._queryTarget=[this.serie,this.option],this.deepQuery(this._queryTarget,"calculable")&&this._addDropBox(n),this._buildSingleRadar(n),this.buildMark(n)));this.addShapeList()},_buildSingleRadar:function(e){for(var t,i,n,a,o=this.component.legend,r=this.serie.data,s=this.deepQuery(this._queryTarget,"calculable"),l=0;l<r.length;l++)n=r[l].name||"",this.selectedMap[n]=o?o.isSelected(n):!0,this.selectedMap[n]&&(o?(i=o.getColor(n),t=o.getItemShape(n),t&&(t.style.brushType=this.deepQuery([r[l],this.serie],"itemStyle.normal.areaStyle")?"both":"stroke",o.setItemShape(n,t))):i=this.zr.getColor(l),a=this._getPointList(this.serie.polarIndex,r[l]),this._addSymbol(a,i,l,e,this.serie.polarIndex),this._addDataShape(a,i,r[l],e,l,s),this._radarDataCounter++)},_getPointList:function(e,t){for(var i,n,a=[],o=this.component.polar,r=0,s=t.value.length;s>r;r++)n=this.getDataFromOption(t.value[r]),i="-"!=n?o.getVector(e,r,n):!1,i&&a.push(i);return a},_addSymbol:function(e,t,i,n,a){for(var r,s=this.series,l=this.component.polar,h=0,m=e.length;m>h;h++)r=this.getSymbolShape(this.deepMerge([s[n].data[i],s[n]]),n,s[n].data[i].value[h],h,l.getIndicatorText(a,h),e[h][0],e[h][1],this._symbol[this._radarDataCounter%this._symbol.length],t,"#fff","vertical"),r.zlevel=this.getZlevelBase(),r.z=this.getZBase()+1,o.set(r,"data",s[n].data[i]),o.set(r,"value",s[n].data[i].value),o.set(r,"dataIndex",i),o.set(r,"special",h),this.shapeList.push(r)},_addDataShape:function(e,t,i,a,r,l){var h=this.series,m=[i,this.serie],V=this.getItemStyleColor(this.deepQuery(m,"itemStyle.normal.color"),a,r,i),U=this.deepQuery(m,"itemStyle.normal.lineStyle.width"),d=this.deepQuery(m,"itemStyle.normal.lineStyle.type"),p=this.deepQuery(m,"itemStyle.normal.areaStyle.color"),c=this.deepQuery(m,"itemStyle.normal.areaStyle"),u={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{pointList:e,brushType:c?"both":"stroke",color:p||V||("string"==typeof t?s.alpha(t,.5):t),strokeColor:V||t,lineWidth:U,lineType:d},highlightStyle:{brushType:this.deepQuery(m,"itemStyle.emphasis.areaStyle")||c?"both":"stroke",color:this.deepQuery(m,"itemStyle.emphasis.areaStyle.color")||p||V||("string"==typeof t?s.alpha(t,.5):t),strokeColor:this.getItemStyleColor(this.deepQuery(m,"itemStyle.emphasis.color"),a,r,i)||V||t,lineWidth:this.deepQuery(m,"itemStyle.emphasis.lineStyle.width")||U,lineType:this.deepQuery(m,"itemStyle.emphasis.lineStyle.type")||d}};o.pack(u,h[a],a,i,r,i.name,this.component.polar.getIndicator(h[a].polarIndex)),l&&(u.draggable=!0,this.setCalculable(u)),u=new n(u),this.shapeList.push(u)},_addDropBox:function(e){var t=this.series,i=this.deepQuery(this._queryTarget,"polarIndex");if(!this._dropBoxList[i]){var n=this.component.polar.getDropBox(i);n.zlevel=this.getZlevelBase(),n.z=this.getZBase(),this.setCalculable(n),o.pack(n,t,e,void 0,-1),this.shapeList.push(n),this._dropBoxList[i]=!0}},ondragend:function(e,t){var i=this.series;if(this.isDragend&&e.target){var n=e.target,a=o.get(n,"seriesIndex"),r=o.get(n,"dataIndex");this.component.legend&&this.component.legend.del(i[a].data[r].name),i[a].data.splice(r,1),t.dragOut=!0,t.needRefresh=!0,this.isDragend=!1}},ondrop:function(t,i){var n=this.series;if(this.isDrop&&t.target){var a,r,s=t.target,l=t.dragged,h=o.get(s,"seriesIndex"),m=o.get(s,"dataIndex"),V=this.component.legend;if(-1===m)a={value:o.get(l,"value"),name:o.get(l,"name")},n[h].data.push(a),V&&V.add(a.name,l.style.color||l.style.strokeColor);else{var U=e("../util/accMath");a=n[h].data[m],V&&V.del(a.name),a.name+=this.option.nameConnector+o.get(l,"name"),r=o.get(l,"value");for(var d=0;d<r.length;d++)a.value[d]=U.accAdd(a.value[d],r[d]);V&&V.add(a.name,l.style.color||l.style.strokeColor)}i.dragIn=i.dragIn||!0,this.isDrop=!1}},refresh:function(e){e&&(this.option=e,this.series=e.series),this.backupShapeList(),this._buildShape()}},r.inherits(t,i),e("../chart").define("radar",t),t}),i("echarts/component/polar",["require","./base","zrender/shape/Text","zrender/shape/Line","zrender/shape/Polygon","zrender/shape/Circle","zrender/shape/Ring","../config","zrender/tool/util","../util/coordinates","../util/accMath","../util/smartSteps","../component"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o),this.refresh(a)}var i=e("./base"),n=e("zrender/shape/Text"),a=e("zrender/shape/Line"),o=e("zrender/shape/Polygon"),r=e("zrender/shape/Circle"),s=e("zrender/shape/Ring"),l=e("../config");l.polar={zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,boundaryGap:[0,0],splitNumber:5,name:{show:!0,textStyle:{color:"#333"}},axisLine:{show:!0,lineStyle:{color:"#ccc",width:1,type:"solid"}},axisLabel:{show:!1,textStyle:{color:"#333"}},splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}},splitLine:{show:!0,lineStyle:{width:1,color:"#ccc"}},type:"polygon"};var h=e("zrender/tool/util"),m=e("../util/coordinates");return t.prototype={type:l.COMPONENT_TYPE_POLAR,_buildShape:function(){for(var e=0;e<this.polar.length;e++)this._index=e,this.reformOption(this.polar[e]),this._queryTarget=[this.polar[e],this.option],this._createVector(e),this._buildSpiderWeb(e),this._buildText(e),this._adjustIndicatorValue(e),this._addAxisLabel(e);for(var e=0;e<this.shapeList.length;e++)this.zr.addShape(this.shapeList[e])},_createVector:function(e){for(var t,i=this.polar[e],n=this.deepQuery(this._queryTarget,"indicator"),a=n.length,o=i.startAngle,r=2*Math.PI/a,s=this._getRadius(),l=i.__ecIndicator=[],h=0;a>h;h++)t=m.polar2cartesian(s,o*Math.PI/180+r*h),l.push({vector:[t[1],-t[0]]})},_getRadius:function(){var e=this.polar[this._index];return this.parsePercent(e.radius,Math.min(this.zr.getWidth(),this.zr.getHeight())/2)},_buildSpiderWeb:function(e){var t=this.polar[e],i=t.__ecIndicator,n=t.splitArea,a=t.splitLine,o=this.getCenter(e),r=t.splitNumber,s=a.lineStyle.color,l=a.lineStyle.width,h=a.show,m=this.deepQuery(this._queryTarget,"axisLine");this._addArea(i,r,o,n,s,l,h),m.show&&this._addLine(i,o,m)},_addAxisLabel:function(t){for(var i,a,o,r,a,s,l,m,V,U,d=e("../util/accMath"),p=this.polar[t],c=this.deepQuery(this._queryTarget,"indicator"),u=p.__ecIndicator,y=this.deepQuery(this._queryTarget,"splitNumber"),g=this.getCenter(t),b=0;b<c.length;b++)if(i=this.deepQuery([c[b],p,this.option],"axisLabel"),i.show){var f=this.deepQuery([i,p,this.option],"textStyle"),k=this.deepQuery([i,p],"formatter");if(o={},o.textFont=this.getFont(f),o.color=f.color,o=h.merge(o,i),o.lineWidth=o.width,a=u[b].vector,s=u[b].value,m=b/c.length*2*Math.PI,V=i.offset||10,U=i.interval||0,!s)return;for(var x=1;y>=x;x+=U+1)r=h.merge({},o),l=d.accAdd(s.min,d.accMul(s.step,x)),l="function"==typeof k?k(l):"string"==typeof k?k.replace("{a}","{a0}").replace("{a0}",l):this.numAddCommas(l),r.text=l,r.x=x*a[0]/y+Math.cos(m)*V+g[0],r.y=x*a[1]/y+Math.sin(m)*V+g[1],this.shapeList.push(new n({zlevel:this.getZlevelBase(),z:this.getZBase(),style:r,draggable:!1,hoverable:!1}))}},_buildText:function(e){for(var t,i,a,o,r,s,l,h=this.polar[e],m=h.__ecIndicator,V=this.deepQuery(this._queryTarget,"indicator"),U=this.getCenter(e),d=0,p=0,c=0;c<V.length;c++)o=this.deepQuery([V[c],h,this.option],"name"),o.show&&(l=this.deepQuery([o,h,this.option],"textStyle"),i={},i.textFont=this.getFont(l),i.color=l.color,i.text="function"==typeof o.formatter?o.formatter.call(this.myChart,V[c].text,c):"string"==typeof o.formatter?o.formatter.replace("{value}",V[c].text):V[c].text,m[c].text=i.text,t=m[c].vector,a=Math.round(t[0])>0?"left":Math.round(t[0])<0?"right":"center",null==o.margin?t=this._mapVector(t,U,1.1):(s=o.margin,d=t[0]>0?s:-s,p=t[1]>0?s:-s,d=0===t[0]?0:d,p=0===t[1]?0:p,t=this._mapVector(t,U,1)),i.textAlign=a,i.x=t[0]+d,i.y=t[1]+p,r=o.rotate?[o.rotate/180*Math.PI,t[0],t[1]]:[0,0,0],this.shapeList.push(new n({zlevel:this.getZlevelBase(),z:this.getZBase(),style:i,draggable:!1,hoverable:!1,rotation:r})))},getIndicatorText:function(e,t){return this.polar[e]&&this.polar[e].__ecIndicator[t]&&this.polar[e].__ecIndicator[t].text},getDropBox:function(e){var t,i,e=e||0,n=this.polar[e],a=this.getCenter(e),o=n.__ecIndicator,r=o.length,s=[],l=n.type;if("polygon"==l){for(var h=0;r>h;h++)t=o[h].vector,s.push(this._mapVector(t,a,1.2));i=this._getShape(s,"fill","rgba(0,0,0,0)","",1)}else"circle"==l&&(i=this._getCircle("",1,1.2,a,"fill","rgba(0,0,0,0)"));return i},_addArea:function(e,t,i,n,a,o,r){for(var s,l,h,m,V=this.deepQuery(this._queryTarget,"type"),U=0;t>U;U++)l=(t-U)/t,r&&("polygon"==V?(m=this._getPointList(e,l,i),s=this._getShape(m,"stroke","",a,o)):"circle"==V&&(s=this._getCircle(a,o,l,i,"stroke")),this.shapeList.push(s)),n.show&&(h=(t-U-1)/t,this._addSplitArea(e,n,l,h,i,U))},_getCircle:function(e,t,i,n,a,o){var s=this._getRadius();return new r({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:n[0],y:n[1],r:s*i,brushType:a,strokeColor:e,lineWidth:t,color:o},hoverable:!1,draggable:!1})},_getRing:function(e,t,i,n){var a=this._getRadius();return new s({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:n[0],y:n[1],r:t*a,r0:i*a,color:e,brushType:"fill"},hoverable:!1,draggable:!1})},_getPointList:function(e,t,i){for(var n,a=[],o=e.length,r=0;o>r;r++)n=e[r].vector,a.push(this._mapVector(n,i,t));return a},_getShape:function(e,t,i,n,a){return new o({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{pointList:e,brushType:t,color:i,strokeColor:n,lineWidth:a},hoverable:!1,draggable:!1})},_addSplitArea:function(e,t,i,n,a,o){var r,s,l,h,m,V=e.length,U=t.areaStyle.color,d=[],V=e.length,p=this.deepQuery(this._queryTarget,"type");if("string"==typeof U&&(U=[U]),s=U.length,r=U[o%s],"polygon"==p)for(var c=0;V>c;c++)d=[],l=e[c].vector,h=e[(c+1)%V].vector,d.push(this._mapVector(l,a,i)),d.push(this._mapVector(l,a,n)),d.push(this._mapVector(h,a,n)),d.push(this._mapVector(h,a,i)),m=this._getShape(d,"fill",r,"",1),this.shapeList.push(m);else"circle"==p&&(m=this._getRing(r,i,n,a),this.shapeList.push(m))},_mapVector:function(e,t,i){return[e[0]*i+t[0],e[1]*i+t[1]]},getCenter:function(e){var e=e||0;return this.parseCenter(this.zr,this.polar[e].center)},_addLine:function(e,t,i){for(var n,a,o=e.length,r=i.lineStyle,s=r.color,l=r.width,h=r.type,m=0;o>m;m++)a=e[m].vector,n=this._getLine(t[0],t[1],a[0]+t[0],a[1]+t[1],s,l,h),this.shapeList.push(n)},_getLine:function(e,t,i,n,o,r,s){return new a({zlevel:this.getZlevelBase(),z:this.getZBase(),style:{xStart:e,yStart:t,xEnd:i,yEnd:n,strokeColor:o,lineWidth:r,lineType:s},hoverable:!1})},_adjustIndicatorValue:function(t){for(var i,n,a,o=this.polar[t],r=this.deepQuery(this._queryTarget,"indicator"),s=r.length,l=o.__ecIndicator,h=this._getSeriesData(t),m=o.boundaryGap,V=o.splitNumber,U=o.scale,d=e("../util/smartSteps"),p=0;s>p;p++){if("number"==typeof r[p].max)i=r[p].max,n=r[p].min||0,a={max:i,min:n};else{var c=this._findValue(h,p,V,m);n=c.min,i=c.max}!U&&n>=0&&i>=0&&(n=0),!U&&0>=n&&0>=i&&(i=0);var u=d(n,i,V,a);l[p].value={min:u.min,max:u.max,step:u.step}}},_getSeriesData:function(e){for(var t,i,n,a=[],o=this.component.legend,r=0;r<this.series.length;r++)if(t=this.series[r],t.type==l.CHART_TYPE_RADAR){i=t.data||[];for(var s=0;s<i.length;s++)n=this.deepQuery([i[s],t,this.option],"polarIndex")||0,n!=e||o&&!o.isSelected(i[s].name)||a.push(i[s])}return a},_findValue:function(e,t,i,n){function a(e){(e>o||void 0===o)&&(o=e),(r>e||void 0===r)&&(r=e)}var o,r,s;if(e&&0!==e.length){if(1==e.length&&(r=0),1!=e.length)for(var l=0;l<e.length;l++)a(this.getDataFromOption(e[l].value[t]));else{s=e[0];for(var l=0;l<s.value.length;l++)a(this.getDataFromOption(s.value[l]))}var h=Math.abs(o-r);return r-=Math.abs(h*n[0]),o+=Math.abs(h*n[1]),r===o&&(0===o?o=1:o>0?r=o/i:o/=i),{max:o,min:r}}},getVector:function(e,t,i){e=e||0,t=t||0;var n=this.polar[e].__ecIndicator;if(!(t>=n.length)){var a,o=this.polar[e].__ecIndicator[t],r=this.getCenter(e),s=o.vector,l=o.value.max,h=o.value.min;if("undefined"==typeof i)return r;switch(i){case"min":i=h;break;case"max":i=l;break;case"center":i=(l+h)/2}return a=l!=h?(i-h)/(l-h):.5,this._mapVector(s,r,a)}},isInside:function(e){var t=this.getNearestIndex(e);return t?t.polarIndex:-1},getNearestIndex:function(e){for(var t,i,n,a,o,r,s,l,h,V=0;V<this.polar.length;V++){if(t=this.polar[V],i=this.getCenter(V),e[0]==i[0]&&e[1]==i[1])return{polarIndex:V,valueIndex:0};if(n=this._getRadius(),o=t.startAngle,r=t.indicator,s=r.length,l=2*Math.PI/s,a=m.cartesian2polar(e[0]-i[0],i[1]-e[1]),e[0]-i[0]<0&&(a[1]+=Math.PI),a[1]<0&&(a[1]+=2*Math.PI),h=a[1]-o/180*Math.PI+2*Math.PI,Math.abs(Math.cos(h%(l/2)))*n>a[0])return{polarIndex:V,valueIndex:Math.floor((h+l/2)/l)%s}}},getIndicator:function(e){var e=e||0;return this.polar[e].indicator},refresh:function(e){e&&(this.option=e,this.polar=this.option.polar,this.series=this.option.series),this.clear(),this._buildShape()}},h.inherits(t,i),e("../component").define("polar",t),t}),i("echarts/util/coordinates",["require","zrender/tool/math"],function(e){function t(e,t){return[e*n.sin(t),e*n.cos(t)]}function i(e,t){return[Math.sqrt(e*e+t*t),Math.atan(t/e)]}var n=e("zrender/tool/math");return{polar2cartesian:t,cartesian2polar:i}}),i("echarts/chart/chord",["require","./base","zrender/shape/Text","zrender/shape/Line","zrender/shape/Sector","../util/shape/Ribbon","../util/shape/Icon","zrender/shape/BezierCurve","../config","../util/ecData","zrender/tool/util","zrender/tool/vector","../data/Graph","../layout/Chord","../chart"],function(e){"use strict";function t(e,t,n,a,o){i.call(this,e,t,n,a,o),this.scaleLineLength=4,this.scaleUnitAngle=4,this.refresh(a)}var i=e("./base"),n=e("zrender/shape/Text"),a=e("zrender/shape/Line"),o=e("zrender/shape/Sector"),r=e("../util/shape/Ribbon"),s=e("../util/shape/Icon"),l=e("zrender/shape/BezierCurve"),h=e("../config");h.chord={zlevel:0,z:2,clickable:!0,radius:["65%","75%"],center:["50%","50%"],padding:2,sort:"none",sortSub:"none",startAngle:90,clockWise:!0,ribbonType:!0,minRadius:10,maxRadius:20,symbol:"circle",showScale:!1,showScaleText:!1,itemStyle:{normal:{borderWidth:0,borderColor:"#000",label:{show:!0,rotate:!1,distance:5},chordStyle:{width:1,color:"black",borderWidth:1,borderColor:"#999",opacity:.5}},emphasis:{borderWidth:0,borderColor:"#000",chordStyle:{width:1,color:"black",borderWidth:1,borderColor:"#999"}}}};var m=e("../util/ecData"),V=e("zrender/tool/util"),U=e("zrender/tool/vector"),d=e("../data/Graph"),p=e("../layout/Chord");return t.prototype={type:h.CHART_TYPE_CHORD,_init:function(){var e=this.series;this.selectedMap={};for(var t={},i={},n=0,a=e.length;a>n;n++)if(e[n].type===this.type){var o=this.isSelected(e[n].name);this.selectedMap[e[n].name]=o,o&&this.buildMark(n),this.reformOption(e[n]),t[e[n].name]=e[n]}for(var n=0,a=e.length;a>n;n++)if(e[n].type===this.type)if(e[n].insertToSerie){var r=t[e[n].insertToSerie];e[n]._referenceSerie=r}else i[e[n].name]=[e[n]];for(var n=0,a=e.length;a>n;n++)if(e[n].type===this.type&&e[n].insertToSerie){for(var s=e[n]._referenceSerie;s&&s._referenceSerie;)s=s._referenceSerie;i[s.name]&&this.selectedMap[e[n].name]&&i[s.name].push(e[n])}for(var l in i)this._buildChords(i[l]);this.addShapeList()},_getNodeCategory:function(e,t){return e.categories&&e.categories[t.category||0]},_getNodeQueryTarget:function(e,t){var i=this._getNodeCategory(e,t);return[t,i,e]},_getEdgeQueryTarget:function(e,t,i){return i=i||"normal",[t.itemStyle&&t.itemStyle[i],e.itemStyle[i].chordStyle]},_buildChords:function(e){for(var t=[],i=e[0],n=function(e){return e.layout.size>0},a=function(e){return function(t){return e.getEdge(t.node2,t.node1)}},o=0;o<e.length;o++){var r=e[o];if(this.selectedMap[r.name]){var s;r.matrix?s=this._getSerieGraphFromDataMatrix(r,i):r.links&&(s=this._getSerieGraphFromNodeLinks(r,i)),s.filterNode(n,this),r.ribbonType&&s.filterEdge(a(s)),t.push(s),s.__serie=r}}if(t.length){var l=t[0];if(!i.ribbonType){var h=i.minRadius,m=i.maxRadius,V=1/0,U=-(1/0);l.eachNode(function(e){U=Math.max(e.layout.size,U),V=Math.min(e.layout.size,V)});var d=(m-h)/(U-V);l.eachNode(function(e){var t=this._getNodeQueryTarget(i,e),n=this.query(t,"symbolSize");e.layout.size=U===V?n||V:n||(e.layout.size-V)*d+h},this)}var c=new p;c.clockWise=i.clockWise,c.startAngle=i.startAngle*Math.PI/180,c.clockWise||(c.startAngle=-c.startAngle),c.padding=i.padding*Math.PI/180,c.sort=i.sort,c.sortSub=i.sortSub,c.directed=i.ribbonType,c.run(t);var u=this.query(i,"itemStyle.normal.label.show");if(i.ribbonType){this._buildSectors(i,0,l,i,t),u&&this._buildLabels(i,0,l,i,t);for(var o=0,y=0;o<e.length;o++)this.selectedMap[e[o].name]&&this._buildRibbons(e,o,t[y++],i);i.showScale&&this._buildScales(i,0,l)}else{this._buildNodeIcons(i,0,l,i,t),u&&this._buildLabels(i,0,l,i,t);for(var o=0,y=0;o<e.length;o++)this.selectedMap[e[o].name]&&this._buildEdgeCurves(e,o,t[y++],i,l)}this._initHoverHandler(e,t)}},_getSerieGraphFromDataMatrix:function(e,t){for(var i=[],n=0,a=[],o=0;o<e.matrix.length;o++)a[o]=e.matrix[o].slice();for(var r=e.data||e.nodes,o=0;o<r.length;o++){var s={},l=r[o];l.rawIndex=o;for(var h in l)"name"===h?s.id=l.name:s[h]=l[h];var m=this._getNodeCategory(t,l),V=m?m.name:l.name;if(this.selectedMap[V]=this.isSelected(V),this.selectedMap[V])i.push(s),n++;else{a.splice(n,1);for(var U=0;U<a.length;U++)a[U].splice(n,1)}}var p=d.fromMatrix(i,a,!0);return p.eachNode(function(e){e.layout={size:e.data.outValue},e.rawIndex=e.data.rawIndex}),p.eachEdge(function(e){e.layout={weight:e.data.weight}}),p},_getSerieGraphFromNodeLinks:function(e,t){for(var i=new d(!0),n=e.data||e.nodes,a=0,o=n.length;o>a;a++){var r=n[a];if(r&&!r.ignore){var s=this._getNodeCategory(t,r),l=s?s.name:r.name;if(this.selectedMap[l]=this.isSelected(l),this.selectedMap[l]){var h=i.addNode(r.name,r);h.rawIndex=a}}}for(var a=0,o=e.links.length;o>a;a++){var m=e.links[a],V=m.source,U=m.target;"number"==typeof V&&(V=n[V],V&&(V=V.name)),"number"==typeof U&&(U=n[U],U&&(U=U.name));var p=i.addEdge(V,U,m);p&&(p.rawIndex=a)}return i.eachNode(function(e){var i=e.data.value;if(null==i)if(i=0,t.ribbonType)for(var n=0;n<e.outEdges.length;n++)i+=e.outEdges[n].data.weight||0;else for(var n=0;n<e.edges.length;n++)i+=e.edges[n].data.weight||0;e.layout={size:i}}),i.eachEdge(function(e){e.layout={weight:null==e.data.weight?1:e.data.weight}}),i},_initHoverHandler:function(e,t){var i=e[0],n=t[0],a=this;n.eachNode(function(e){e.shape.onmouseover=function(){n.eachNode(function(e){e.shape.style.opacity=.1,e.labelShape&&(e.labelShape.style.opacity=.1,e.labelShape.modSelf()),e.shape.modSelf()});for(var i=0;i<t.length;i++)for(var o=0;o<t[i].edges.length;o++){var r=t[i].edges[o],s=a._getEdgeQueryTarget(t[i].__serie,r.data);r.shape.style.opacity=.1*a.deepQuery(s,"opacity"),r.shape.modSelf()}e.shape.style.opacity=1,e.labelShape&&(e.labelShape.style.opacity=1);for(var i=0;i<t.length;i++){var l=t[i].getNodeById(e.id);if(l)for(var o=0;o<l.outEdges.length;o++){var r=l.outEdges[o],s=a._getEdgeQueryTarget(t[i].__serie,r.data);r.shape.style.opacity=a.deepQuery(s,"opacity");var h=t[0].getNodeById(r.node2.id);h&&(h.shape&&(h.shape.style.opacity=1),h.labelShape&&(h.labelShape.style.opacity=1))}}a.zr.refreshNextFrame()},e.shape.onmouseout=function(){n.eachNode(function(e){e.shape.style.opacity=1,e.labelShape&&(e.labelShape.style.opacity=1,e.labelShape.modSelf()),e.shape.modSelf()});for(var e=0;e<t.length;e++)for(var o=0;o<t[e].edges.length;o++){var r=t[e].edges[o],s=[r.data,i];r.shape.style.opacity=a.deepQuery(s,"itemStyle.normal.chordStyle.opacity"),r.shape.modSelf()}a.zr.refreshNextFrame()}})},_buildSectors:function(e,t,i,n){var a=this.parseCenter(this.zr,n.center),r=this.parseRadius(this.zr,n.radius),s=n.clockWise,l=s?1:-1;i.eachNode(function(i){var h=this._getNodeCategory(n,i.data),V=this.getColor(h?h.name:i.id),U=i.layout.startAngle/Math.PI*180*l,d=i.layout.endAngle/Math.PI*180*l,p=new o({zlevel:e.zlevel,z:e.z,style:{x:a[0],y:a[1],r0:r[0],r:r[1],startAngle:U,endAngle:d,brushType:"fill",opacity:1,color:V,clockWise:s},clickable:n.clickable,highlightStyle:{brushType:"fill"}});p.style.lineWidth=this.deepQuery([i.data,n],"itemStyle.normal.borderWidth"),p.highlightStyle.lineWidth=this.deepQuery([i.data,n],"itemStyle.emphasis.borderWidth"),p.style.strokeColor=this.deepQuery([i.data,n],"itemStyle.normal.borderColor"),p.highlightStyle.strokeColor=this.deepQuery([i.data,n],"itemStyle.emphasis.borderColor"),p.style.lineWidth>0&&(p.style.brushType="both"),p.highlightStyle.lineWidth>0&&(p.highlightStyle.brushType="both"),m.pack(p,e,t,i.data,i.rawIndex,i.id,i.category),this.shapeList.push(p),i.shape=p},this)},_buildNodeIcons:function(e,t,i,n){var a=this.parseCenter(this.zr,n.center),o=this.parseRadius(this.zr,n.radius),r=o[1];i.eachNode(function(i){var o=i.layout.startAngle,l=i.layout.endAngle,h=(o+l)/2,V=r*Math.cos(h),U=r*Math.sin(h),d=this._getNodeQueryTarget(n,i.data),p=this._getNodeCategory(n,i.data),c=this.deepQuery(d,"itemStyle.normal.color");c||(c=this.getColor(p?p.name:i.id));var u=new s({zlevel:e.zlevel,z:e.z+1,style:{x:-i.layout.size,y:-i.layout.size,width:2*i.layout.size,height:2*i.layout.size,iconType:this.deepQuery(d,"symbol"),color:c,brushType:"both",lineWidth:this.deepQuery(d,"itemStyle.normal.borderWidth"),strokeColor:this.deepQuery(d,"itemStyle.normal.borderColor")},highlightStyle:{color:this.deepQuery(d,"itemStyle.emphasis.color"),lineWidth:this.deepQuery(d,"itemStyle.emphasis.borderWidth"),strokeColor:this.deepQuery(d,"itemStyle.emphasis.borderColor")},clickable:n.clickable,position:[V+a[0],U+a[1]]});m.pack(u,e,t,i.data,i.rawIndex,i.id,i.category),this.shapeList.push(u),i.shape=u},this)},_buildLabels:function(e,t,i,a){var o=this.query(a,"itemStyle.normal.label.rotate"),r=this.query(a,"itemStyle.normal.label.distance"),s=this.parseCenter(this.zr,a.center),l=this.parseRadius(this.zr,a.radius),h=a.clockWise,m=h?1:-1;
+
+i.eachNode(function(t){var i=t.layout.startAngle/Math.PI*180*m,h=t.layout.endAngle/Math.PI*180*m,V=(i*-m+h*-m)/2;V%=360,0>V&&(V+=360);var d=90>=V||V>=270;V=V*Math.PI/180;var p=[Math.cos(V),-Math.sin(V)],c=0;c=a.ribbonType?a.showScaleText?35+r:r:r+t.layout.size;var u=U.scale([],p,l[1]+c);U.add(u,u,s);var y={zlevel:e.zlevel,z:e.z+1,hoverable:!1,style:{text:null==t.data.label?t.id:t.data.label,textAlign:d?"left":"right"}};o?(y.rotation=d?V:Math.PI+V,y.style.x=d?l[1]+c:-l[1]-c,y.style.y=0,y.position=s.slice()):(y.style.x=u[0],y.style.y=u[1]),y.style.color=this.deepQuery([t.data,a],"itemStyle.normal.label.textStyle.color")||"#000000",y.style.textFont=this.getFont(this.deepQuery([t.data,a],"itemStyle.normal.label.textStyle")),y=new n(y),this.shapeList.push(y),t.labelShape=y},this)},_buildRibbons:function(e,t,i,n){var a=e[t],o=this.parseCenter(this.zr,n.center),s=this.parseRadius(this.zr,n.radius);i.eachEdge(function(l,h){var V,U=i.getEdge(l.node2,l.node1);if(U&&!l.shape){if(U.shape)return void(l.shape=U.shape);var d=l.layout.startAngle/Math.PI*180,p=l.layout.endAngle/Math.PI*180,c=U.layout.startAngle/Math.PI*180,u=U.layout.endAngle/Math.PI*180;V=this.getColor(1===e.length?l.layout.weight<=U.layout.weight?l.node1.id:l.node2.id:a.name);var y,g,b=this._getEdgeQueryTarget(a,l.data),f=this._getEdgeQueryTarget(a,l.data,"emphasis"),k=new r({zlevel:a.zlevel,z:a.z,style:{x:o[0],y:o[1],r:s[0],source0:d,source1:p,target0:c,target1:u,brushType:"both",opacity:this.deepQuery(b,"opacity"),color:V,lineWidth:this.deepQuery(b,"borderWidth"),strokeColor:this.deepQuery(b,"borderColor"),clockWise:n.clockWise},clickable:n.clickable,highlightStyle:{brushType:"both",opacity:this.deepQuery(f,"opacity"),lineWidth:this.deepQuery(f,"borderWidth"),strokeColor:this.deepQuery(f,"borderColor")}});l.layout.weight<=U.layout.weight?(y=U.node1,g=U.node2):(y=l.node1,g=l.node2),m.pack(k,a,t,l.data,null==l.rawIndex?h:l.rawIndex,l.data.name||y.id+"-"+g.id,y.id,g.id),this.shapeList.push(k),l.shape=k}},this)},_buildEdgeCurves:function(e,t,i,n,a){var o=e[t],r=this.parseCenter(this.zr,n.center);i.eachEdge(function(e,i){var n=a.getNodeById(e.node1.id),s=a.getNodeById(e.node2.id),h=n.shape,V=s.shape,U=this._getEdgeQueryTarget(o,e.data),d=this._getEdgeQueryTarget(o,e.data,"emphasis"),p=new l({zlevel:o.zlevel,z:o.z,style:{xStart:h.position[0],yStart:h.position[1],xEnd:V.position[0],yEnd:V.position[1],cpX1:r[0],cpY1:r[1],lineWidth:this.deepQuery(U,"width"),strokeColor:this.deepQuery(U,"color"),opacity:this.deepQuery(U,"opacity")},highlightStyle:{lineWidth:this.deepQuery(d,"width"),strokeColor:this.deepQuery(d,"color"),opacity:this.deepQuery(d,"opacity")}});m.pack(p,o,t,e.data,null==e.rawIndex?i:e.rawIndex,e.data.name||e.node1.id+"-"+e.node2.id,e.node1.id,e.node2.id),this.shapeList.push(p),e.shape=p},this)},_buildScales:function(e,t,i){var o,r,s=e.clockWise,l=this.parseCenter(this.zr,e.center),h=this.parseRadius(this.zr,e.radius),m=s?1:-1,V=0,d=-(1/0);e.showScaleText&&(i.eachNode(function(e){var t=e.data.value;t>d&&(d=t),V+=t}),d>1e10?(o="b",r=1e-9):d>1e7?(o="m",r=1e-6):d>1e4?(o="k",r=.001):(o="",r=1));var p=V/(360-e.padding);i.eachNode(function(t){for(var i=t.layout.startAngle/Math.PI*180,V=t.layout.endAngle/Math.PI*180,d=i;;){if(s&&d>V||!s&&V>d)break;var c=d/180*Math.PI,u=[Math.cos(c),Math.sin(c)],y=U.scale([],u,h[1]+1);U.add(y,y,l);var g=U.scale([],u,h[1]+this.scaleLineLength);U.add(g,g,l);var b=new a({zlevel:e.zlevel,z:e.z-1,hoverable:!1,style:{xStart:y[0],yStart:y[1],xEnd:g[0],yEnd:g[1],lineCap:"round",brushType:"stroke",strokeColor:"#666",lineWidth:1}});this.shapeList.push(b),d+=m*this.scaleUnitAngle}if(e.showScaleText)for(var f=i,k=5*p*this.scaleUnitAngle,x=0;;){if(s&&f>V||!s&&V>f)break;var c=f;c%=360,0>c&&(c+=360);var _=90>=c||c>=270,L=new n({zlevel:e.zlevel,z:e.z-1,hoverable:!1,style:{x:_?h[1]+this.scaleLineLength+4:-h[1]-this.scaleLineLength-4,y:0,text:Math.round(10*x)/10+o,textAlign:_?"left":"right"},position:l.slice(),rotation:_?[-c/180*Math.PI,0,0]:[-(c+180)/180*Math.PI,0,0]});this.shapeList.push(L),x+=k*r,f+=m*this.scaleUnitAngle*5}},this)},refresh:function(e){if(e&&(this.option=e,this.series=e.series),this.legend=this.component.legend,this.legend)this.getColor=function(e){return this.legend.getColor(e)},this.isSelected=function(e){return this.legend.isSelected(e)};else{var t={},i=0;this.getColor=function(e){return t[e]?t[e]:(t[e]||(t[e]=this.zr.getColor(i++)),t[e])},this.isSelected=function(){return!0}}this.backupShapeList(),this._init()},reformOption:function(e){var t=V.merge;e=t(t(e||{},this.ecTheme.chord),h.chord),e.itemStyle.normal.label.textStyle=this.getTextStyle(e.itemStyle.normal.label.textStyle),this.z=e.z,this.zlevel=e.zlevel}},V.inherits(t,i),e("../chart").define("chord",t),t}),i("echarts/util/shape/Ribbon",["require","zrender/shape/Base","zrender/shape/util/PathProxy","zrender/tool/util","zrender/tool/area"],function(e){function t(e){i.call(this,e),this._pathProxy=new n}var i=e("zrender/shape/Base"),n=e("zrender/shape/util/PathProxy"),a=e("zrender/tool/util"),o=e("zrender/tool/area");return t.prototype={type:"ribbon",buildPath:function(e,t){var i=t.clockWise||!1,n=this._pathProxy;n.begin(e);var a=t.x,o=t.y,r=t.r,s=t.source0/180*Math.PI,l=t.source1/180*Math.PI,h=t.target0/180*Math.PI,m=t.target1/180*Math.PI,V=a+Math.cos(s)*r,U=o+Math.sin(s)*r,d=a+Math.cos(l)*r,p=o+Math.sin(l)*r,c=a+Math.cos(h)*r,u=o+Math.sin(h)*r,y=a+Math.cos(m)*r,g=o+Math.sin(m)*r;n.moveTo(V,U),n.arc(a,o,t.r,s,l,!i),n.bezierCurveTo(.7*(a-d)+d,.7*(o-p)+p,.7*(a-c)+c,.7*(o-u)+u,c,u),(t.source0!==t.target0||t.source1!==t.target1)&&(n.arc(a,o,t.r,h,m,!i),n.bezierCurveTo(.7*(a-y)+y,.7*(o-g)+g,.7*(a-V)+V,.7*(o-U)+U,V,U))},getRect:function(e){return e.__rect?e.__rect:(this._pathProxy.isEmpty()||this.buildPath(null,e),this._pathProxy.fastBoundingRect())},isCover:function(e,t){var i=this.getRect(this.style);return e>=i.x&&e<=i.x+i.width&&t>=i.y&&t<=i.y+i.height?o.isInsidePath(this._pathProxy.pathCommands,0,"fill",e,t):void 0}},a.inherits(t,i),t}),i("echarts/data/Graph",["require","zrender/tool/util"],function(e){var t=e("zrender/tool/util"),i=function(e){this._directed=e||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={}};i.prototype.isDirected=function(){return this._directed},i.prototype.addNode=function(e,t){if(this._nodesMap[e])return this._nodesMap[e];var n=new i.Node(e,t);return this.nodes.push(n),this._nodesMap[e]=n,n},i.prototype.getNodeById=function(e){return this._nodesMap[e]},i.prototype.addEdge=function(e,t,n){if("string"==typeof e&&(e=this._nodesMap[e]),"string"==typeof t&&(t=this._nodesMap[t]),e&&t){var a=e.id+"-"+t.id;if(this._edgesMap[a])return this._edgesMap[a];var o=new i.Edge(e,t,n);return this._directed&&(e.outEdges.push(o),t.inEdges.push(o)),e.edges.push(o),e!==t&&t.edges.push(o),this.edges.push(o),this._edgesMap[a]=o,o}},i.prototype.removeEdge=function(e){var i=e.node1,n=e.node2,a=i.id+"-"+n.id;this._directed&&(i.outEdges.splice(t.indexOf(i.outEdges,e),1),n.inEdges.splice(t.indexOf(n.inEdges,e),1)),i.edges.splice(t.indexOf(i.edges,e),1),i!==n&&n.edges.splice(t.indexOf(n.edges,e),1),delete this._edgesMap[a],this.edges.splice(t.indexOf(this.edges,e),1)},i.prototype.getEdge=function(e,t){return"string"!=typeof e&&(e=e.id),"string"!=typeof t&&(t=t.id),this._directed?this._edgesMap[e+"-"+t]:this._edgesMap[e+"-"+t]||this._edgesMap[t+"-"+e]},i.prototype.removeNode=function(e){if("string"!=typeof e||(e=this._nodesMap[e])){delete this._nodesMap[e.id],this.nodes.splice(t.indexOf(this.nodes,e),1);for(var i=0;i<this.edges.length;){var n=this.edges[i];n.node1===e||n.node2===e?this.removeEdge(n):i++}}},i.prototype.filterNode=function(e,t){for(var i=this.nodes.length,n=0;i>n;)e.call(t,this.nodes[n],n)?n++:(this.removeNode(this.nodes[n]),i--)},i.prototype.filterEdge=function(e,t){for(var i=this.edges.length,n=0;i>n;)e.call(t,this.edges[n],n)?n++:(this.removeEdge(this.edges[n]),i--)},i.prototype.eachNode=function(e,t){for(var i=this.nodes.length,n=0;i>n;n++)this.nodes[n]&&e.call(t,this.nodes[n],n)},i.prototype.eachEdge=function(e,t){for(var i=this.edges.length,n=0;i>n;n++)this.edges[n]&&e.call(t,this.edges[n],n)},i.prototype.clear=function(){this.nodes.length=0,this.edges.length=0,this._nodesMap={},this._edgesMap={}},i.prototype.breadthFirstTraverse=function(e,t,i,n){if("string"==typeof t&&(t=this._nodesMap[t]),t){var a="edges";"out"===i?a="outEdges":"in"===i&&(a="inEdges");for(var o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(n,t,null))for(var r=[t];r.length;)for(var s=r.shift(),l=s[a],o=0;o<l.length;o++){var h=l[o],m=h.node1===s?h.node2:h.node1;if(!m.__visited){if(e.call(m,m,s))return;r.push(m),m.__visited=!0}}}},i.prototype.clone=function(){for(var e=new i(this._directed),t=0;t<this.nodes.length;t++)e.addNode(this.nodes[t].id,this.nodes[t].data);for(var t=0;t<this.edges.length;t++){var n=this.edges[t];e.addEdge(n.node1.id,n.node2.id,n.data)}return e};var n=function(e,t){this.id=e,this.data=t||null,this.inEdges=[],this.outEdges=[],this.edges=[]};n.prototype.degree=function(){return this.edges.length},n.prototype.inDegree=function(){return this.inEdges.length},n.prototype.outDegree=function(){return this.outEdges.length};var a=function(e,t,i){this.node1=e,this.node2=t,this.data=i||null};return i.Node=n,i.Edge=a,i.fromMatrix=function(e,t,n){if(t&&t.length&&t[0].length===t.length&&e.length===t.length){for(var a=t.length,o=new i(n),r=0;a>r;r++){var s=o.addNode(e[r].id,e[r]);s.data.value=0,n&&(s.data.outValue=s.data.inValue=0)}for(var r=0;a>r;r++)for(var l=0;a>l;l++){var h=t[r][l];n&&(o.nodes[r].data.outValue+=h,o.nodes[l].data.inValue+=h),o.nodes[r].data.value+=h,o.nodes[l].data.value+=h}for(var r=0;a>r;r++)for(var l=r;a>l;l++){var h=t[r][l];if(0!==h){var m=o.nodes[r],V=o.nodes[l],U=o.addEdge(m,V,{});if(U.data.weight=h,r!==l&&n&&t[l][r]){var d=o.addEdge(V,m,{});d.data.weight=t[l][r]}}}return o}},i}),i("echarts/layout/Chord",["require"],function(){var e=function(e){e=e||{},this.sort=e.sort||null,this.sortSub=e.sortSub||null,this.padding=.05,this.startAngle=e.startAngle||0,this.clockWise=null==e.clockWise?!1:e.clockWise,this.center=e.center||[0,0],this.directed=!0};e.prototype.run=function(e){e instanceof Array||(e=[e]);var n=e.length;if(n){for(var a=e[0],o=a.nodes.length,r=[],s=0,l=0;o>l;l++){var h=a.nodes[l],m={size:0,subGroups:[],node:h};r.push(m);for(var V=0,U=0;U<e.length;U++){var d=e[U],p=d.getNodeById(h.id);if(p){m.size+=p.layout.size;for(var c=this.directed?p.outEdges:p.edges,u=0;u<c.length;u++){var y=c[u],g=y.layout.weight;m.subGroups.push({weight:g,edge:y,graph:d}),V+=g}}}s+=m.size;for(var b=m.size/V,u=0;u<m.subGroups.length;u++)m.subGroups[u].weight*=b;"ascending"===this.sortSub?m.subGroups.sort(t):"descending"===this.sort&&(m.subGroups.sort(t),m.subGroups.reverse())}"ascending"===this.sort?r.sort(i):"descending"===this.sort&&(r.sort(i),r.reverse());for(var b=(2*Math.PI-this.padding*o)/s,f=this.startAngle,k=this.clockWise?1:-1,l=0;o>l;l++){var m=r[l];m.node.layout.startAngle=f,m.node.layout.endAngle=f+k*m.size*b,m.node.layout.subGroups=[];for(var u=0;u<m.subGroups.length;u++){var x=m.subGroups[u];x.edge.layout.startAngle=f,f+=k*x.weight*b,x.edge.layout.endAngle=f}f=m.node.layout.endAngle+k*this.padding}}};var t=function(e,t){return e.weight-t.weight},i=function(e,t){return e.size-t.size};return e}),i("echarts/chart/force",["require","./base","../data/Graph","../layout/Force","zrender/shape/Line","zrender/shape/BezierCurve","zrender/shape/Image","../util/shape/Icon","../config","../util/ecData","zrender/tool/util","zrender/config","zrender/tool/vector","../chart"],function(e){"use strict";function t(e,t,o,h,m){var V=this;r.call(this,e,t,o,h,m),this.__nodePositionMap={},this._graph=new s(!0),this._layout=new l,this._layout.onupdate=function(){V._step()},this._steps=1,this.ondragstart=function(){i.apply(V,arguments)},this.ondragend=function(){a.apply(V,arguments)},this.ondrop=function(){},this.shapeHandler.ondragstart=function(){V.isDragstart=!0},this.onmousemove=function(){n.apply(V,arguments)},this.refresh(h)}function i(e){if(this.isDragstart&&e.target){var t=e.target;t.fixed=!0,this.isDragstart=!1,this.zr.on(u.EVENT.MOUSEMOVE,this.onmousemove)}}function n(){this._layout.temperature=.8,this._step()}function a(e,t){if(this.isDragend&&e.target){var i=e.target;i.fixed=!1,t.dragIn=!0,t.needRefresh=!1,this.isDragend=!1,this.zr.un(u.EVENT.MOUSEMOVE,this.onmousemove)}}function o(e,t,i){var n=y.create();return n[0]=(Math.random()-.5)*i+e,n[1]=(Math.random()-.5)*i+t,n}var r=e("./base"),s=e("../data/Graph"),l=e("../layout/Force"),h=e("zrender/shape/Line"),m=e("zrender/shape/BezierCurve"),V=e("zrender/shape/Image"),U=e("../util/shape/Icon"),d=e("../config");d.force={zlevel:1,z:2,center:["50%","50%"],size:"100%",preventOverlap:!1,coolDown:.99,minRadius:10,maxRadius:20,ratioScaling:!1,large:!1,useWorker:!1,steps:1,scaling:1,gravity:1,symbol:"circle",symbolSize:0,linkSymbol:null,linkSymbolSize:[10,15],draggable:!0,clickable:!0,roam:!1,itemStyle:{normal:{label:{show:!1,position:"inside"},nodeStyle:{brushType:"both",borderColor:"#5182ab",borderWidth:1},linkStyle:{color:"#5182ab",width:1,type:"line"}},emphasis:{label:{show:!1},nodeStyle:{},linkStyle:{opacity:0}}}};var p=e("../util/ecData"),c=e("zrender/tool/util"),u=e("zrender/config"),y=e("zrender/tool/vector");return t.prototype={constructor:t,type:d.CHART_TYPE_FORCE,_init:function(){this.selectedMap={};var e,t=this.component.legend,i=this.series;this.clear();for(var n=0,a=i.length;a>n;n++){var o=i[n];if(o.type===d.CHART_TYPE_FORCE){if(i[n]=this.reformOption(i[n]),e=i[n].name||"",this.selectedMap[e]=t?t.isSelected(e):!0,!this.selectedMap[e])continue;this.buildMark(n),this._initSerie(o,n);break}}this.animationEffect()},_getNodeCategory:function(e,t){return e.categories&&e.categories[t.category||0]},_getNodeQueryTarget:function(e,t,i){i=i||"normal";var n=this._getNodeCategory(e,t)||{};return[t.itemStyle&&t.itemStyle[i],n&&n.itemStyle&&n.itemStyle[i],e.itemStyle[i].nodeStyle]},_getEdgeQueryTarget:function(e,t,i){return i=i||"normal",[t.itemStyle&&t.itemStyle[i],e.itemStyle[i].linkStyle]},_initSerie:function(e,t){this._temperature=1,e.matrix?this._graph=this._getSerieGraphFromDataMatrix(e):e.links&&(this._graph=this._getSerieGraphFromNodeLinks(e)),this._buildLinkShapes(e,t),this._buildNodeShapes(e,t);var i=e.roam===!0||"move"===e.roam,n=e.roam===!0||"scale"===e.roam;this.zr.modLayer(this.getZlevelBase(),{panable:i,zoomable:n}),(this.query("markPoint.effect.show")||this.query("markLine.effect.show"))&&this.zr.modLayer(d.EFFECT_ZLEVEL,{panable:i,zoomable:n}),this._initLayout(e),this._step()},_getSerieGraphFromDataMatrix:function(e){for(var t=[],i=0,n=[],a=0;a<e.matrix.length;a++)n[a]=e.matrix[a].slice();for(var o=e.data||e.nodes,a=0;a<o.length;a++){var r={},l=o[a];for(var h in l)"name"===h?r.id=l.name:r[h]=l[h];var m=this._getNodeCategory(e,l),V=m?m.name:l.name;if(this.selectedMap[V]=this.isSelected(V),this.selectedMap[V])t.push(r),i++;else{n.splice(i,1);for(var U=0;U<n.length;U++)n[U].splice(i,1)}}var d=s.fromMatrix(t,n,!0);return d.eachNode(function(e,t){e.layout={size:e.data.value,mass:0},e.rawIndex=t}),d.eachEdge(function(e){e.layout={weight:e.data.weight}}),d},_getSerieGraphFromNodeLinks:function(e){for(var t=new s(!0),i=e.data||e.nodes,n=0,a=i.length;a>n;n++){var o=i[n];if(o&&!o.ignore){var r=this._getNodeCategory(e,o),l=r?r.name:o.name;if(this.selectedMap[l]=this.isSelected(l),this.selectedMap[l]){var h=t.addNode(o.name,o);h.rawIndex=n}}}for(var n=0,a=e.links.length;a>n;n++){var m=e.links[n],V=m.source,U=m.target;"number"==typeof V&&(V=i[V],V&&(V=V.name)),"number"==typeof U&&(U=i[U],U&&(U=U.name));var d=t.addEdge(V,U,m);d&&(d.rawIndex=n)}return t.eachNode(function(e){var t=e.data.value;if(null==t){t=0;for(var i=0;i<e.edges.length;i++)t+=e.edges[i].data.weight||0}e.layout={size:t,mass:0}}),t.eachEdge(function(e){e.layout={weight:null==e.data.weight?1:e.data.weight}}),t},_initLayout:function(e){var t=this._graph,i=t.nodes.length,n=this.query(e,"minRadius"),a=this.query(e,"maxRadius");this._steps=e.steps||1;var r=this._layout;r.center=this.parseCenter(this.zr,e.center),r.width=this.parsePercent(e.size,this.zr.getWidth()),r.height=this.parsePercent(e.size,this.zr.getHeight()),r.large=e.large,r.scaling=e.scaling,r.ratioScaling=e.ratioScaling,r.gravity=e.gravity,r.temperature=1,r.coolDown=e.coolDown,r.preventNodeEdgeOverlap=e.preventOverlap,r.preventNodeOverlap=e.preventOverlap;for(var s=1/0,l=-(1/0),h=0;i>h;h++){var m=t.nodes[h];l=Math.max(m.layout.size,l),s=Math.min(m.layout.size,s)}for(var V=l-s,h=0;i>h;h++){var m=t.nodes[h];V>0?(m.layout.size=(m.layout.size-s)*(a-n)/V+n,m.layout.mass=m.layout.size/a):(m.layout.size=(a-n)/2,m.layout.mass=.5)}for(var h=0;i>h;h++){var m=t.nodes[h];if("undefined"!=typeof this.__nodePositionMap[m.id])m.layout.position=y.create(),y.copy(m.layout.position,this.__nodePositionMap[m.id]);else if("undefined"!=typeof m.data.initial)m.layout.position=y.create(),y.copy(m.layout.position,m.data.initial);else{var U=this._layout.center,d=Math.min(this._layout.width,this._layout.height);m.layout.position=o(U[0],U[1],.8*d)}var p=m.shape.style,c=m.layout.size;p.width=p.width||2*c,p.height=p.height||2*c,p.x=-p.width/2,p.y=-p.height/2,y.copy(m.shape.position,m.layout.position)}i=t.edges.length,l=-(1/0);for(var h=0;i>h;h++){var u=t.edges[h];u.layout.weight>l&&(l=u.layout.weight)}for(var h=0;i>h;h++){var u=t.edges[h];u.layout.weight/=l}this._layout.init(t,e.useWorker)},_buildNodeShapes:function(e,t){var i=this._graph,n=this.query(e,"categories");i.eachNode(function(i){var a=this._getNodeCategory(e,i.data),o=[i.data,a,e],r=this._getNodeQueryTarget(e,i.data),s=this._getNodeQueryTarget(e,i.data,"emphasis"),l=new U({style:{x:0,y:0,color:this.deepQuery(r,"color"),brushType:"both",strokeColor:this.deepQuery(r,"strokeColor")||this.deepQuery(r,"borderColor"),lineWidth:this.deepQuery(r,"lineWidth")||this.deepQuery(r,"borderWidth")},highlightStyle:{color:this.deepQuery(s,"color"),strokeColor:this.deepQuery(s,"strokeColor")||this.deepQuery(s,"borderColor"),lineWidth:this.deepQuery(s,"lineWidth")||this.deepQuery(s,"borderWidth")},clickable:e.clickable,zlevel:this.getZlevelBase(),z:this.getZBase()});l.style.color||(l.style.color=this.getColor(a?a.name:i.id)),l.style.iconType=this.deepQuery(o,"symbol");var h=this.deepQuery(o,"symbolSize")||0;"number"==typeof h&&(h=[h,h]),l.style.width=2*h[0],l.style.height=2*h[1],l.style.iconType.match("image")&&(l.style.image=l.style.iconType.replace(new RegExp("^image:\\/\\/"),""),l=new V({style:l.style,highlightStyle:l.highlightStyle,clickable:l.clickable,zlevel:this.getZlevelBase(),z:this.getZBase()})),this.deepQuery(o,"itemStyle.normal.label.show")&&(l.style.text=null==i.data.label?i.id:i.data.label,l.style.textPosition=this.deepQuery(o,"itemStyle.normal.label.position"),l.style.textColor=this.deepQuery(o,"itemStyle.normal.label.textStyle.color"),l.style.textFont=this.getFont(this.deepQuery(o,"itemStyle.normal.label.textStyle")||{})),this.deepQuery(o,"itemStyle.emphasis.label.show")&&(l.highlightStyle.textPosition=this.deepQuery(o,"itemStyle.emphasis.label.position"),l.highlightStyle.textColor=this.deepQuery(o,"itemStyle.emphasis.label.textStyle.color"),l.highlightStyle.textFont=this.getFont(this.deepQuery(o,"itemStyle.emphasis.label.textStyle")||{})),this.deepQuery(o,"draggable")&&(this.setCalculable(l),l.dragEnableTime=0,l.draggable=!0,l.ondragstart=this.shapeHandler.ondragstart,l.ondragover=null);var m="";if("undefined"!=typeof i.category){var a=n[i.category];m=a&&a.name||""}p.pack(l,e,t,i.data,i.rawIndex,i.data.name||"",i.category),this.shapeList.push(l),this.zr.addShape(l),i.shape=l},this)},_buildLinkShapes:function(e,t){for(var i=this._graph,n=i.edges.length,a=0;n>a;a++){var o=i.edges[a],r=o.data,s=o.node1,l=o.node2,V=i.getEdge(l,s),d=this._getEdgeQueryTarget(e,r),u=this.deepQuery(d,"type");e.linkSymbol&&"none"!==e.linkSymbol&&(u="line");var y="line"===u?h:m,g=new y({style:{xStart:0,yStart:0,xEnd:0,yEnd:0},clickable:this.query(e,"clickable"),highlightStyle:{},zlevel:this.getZlevelBase(),z:this.getZBase()});if(V&&V.shape&&(g.style.offset=4,V.shape.style.offset=4),c.merge(g.style,this.query(e,"itemStyle.normal.linkStyle"),!0),c.merge(g.highlightStyle,this.query(e,"itemStyle.emphasis.linkStyle"),!0),"undefined"!=typeof r.itemStyle&&(r.itemStyle.normal&&c.merge(g.style,r.itemStyle.normal,!0),r.itemStyle.emphasis&&c.merge(g.highlightStyle,r.itemStyle.emphasis,!0)),g.style.lineWidth=g.style.lineWidth||g.style.width,g.style.strokeColor=g.style.strokeColor||g.style.color,g.highlightStyle.lineWidth=g.highlightStyle.lineWidth||g.highlightStyle.width,g.highlightStyle.strokeColor=g.highlightStyle.strokeColor||g.highlightStyle.color,p.pack(g,e,t,o.data,null==o.rawIndex?a:o.rawIndex,o.data.name||s.id+" - "+l.id,s.id,l.id),this.shapeList.push(g),this.zr.addShape(g),o.shape=g,e.linkSymbol&&"none"!==e.linkSymbol){var b=new U({style:{x:-5,y:0,width:e.linkSymbolSize[0],height:e.linkSymbolSize[1],iconType:e.linkSymbol,brushType:"fill",color:g.style.strokeColor},highlightStyle:{brushType:"fill"},position:[0,0],rotation:0,zlevel:this.getZlevelBase(),z:this.getZBase()});g._symbolShape=b,this.shapeList.push(b),this.zr.addShape(b)}}},_updateLinkShapes:function(){for(var e=y.create(),t=y.create(),i=y.create(),n=y.create(),a=this._graph.edges,o=0,r=a.length;r>o;o++){var s=a[o],l=s.node1.shape,h=s.node2.shape;y.copy(i,l.position),y.copy(n,h.position);var m=s.shape.style;if(y.sub(e,i,n),y.normalize(e,e),m.offset?(t[0]=e[1],t[1]=-e[0],y.scaleAndAdd(i,i,t,m.offset),y.scaleAndAdd(n,n,t,m.offset)):"bezier-curve"===s.shape.type&&(m.cpX1=(i[0]+n[0])/2-(n[1]-i[1])/4,m.cpY1=(i[1]+n[1])/2-(i[0]-n[0])/4),m.xStart=i[0],m.yStart=i[1],m.xEnd=n[0],m.yEnd=n[1],s.shape.modSelf(),s.shape._symbolShape){var V=s.shape._symbolShape;y.copy(V.position,n),y.scaleAndAdd(V.position,V.position,e,h.style.width/2+2);var U=Math.atan2(e[1],e[0]);V.rotation=Math.PI/2-U,V.modSelf()}}},_syncNodePositions:function(){for(var e=this._graph,t=0;t<e.nodes.length;t++){var i=e.nodes[t],n=i.layout.position,a=i.data,o=i.shape,r=o.fixed||a.fixX,s=o.fixed||a.fixY;r===!0?r=1:isNaN(r)&&(r=0),s===!0?s=1:isNaN(s)&&(s=0),o.position[0]+=(n[0]-o.position[0])*(1-r),o.position[1]+=(n[1]-o.position[1])*(1-s),y.copy(n,o.position);var l=a.name;if(l){var h=this.__nodePositionMap[l];h||(h=this.__nodePositionMap[l]=y.create()),y.copy(h,n)}o.modSelf()}},_step:function(){this._syncNodePositions(),this._updateLinkShapes(),this.zr.refreshNextFrame(),this._layout.temperature>.01?this._layout.step(this._steps):this.messageCenter.dispatch(d.EVENT.FORCE_LAYOUT_END,{},{},this.myChart)},refresh:function(e){if(e&&(this.option=e,this.series=this.option.series),this.legend=this.component.legend,this.legend)this.getColor=function(e){return this.legend.getColor(e)},this.isSelected=function(e){return this.legend.isSelected(e)};else{var t={},i=0;this.getColor=function(e){return t[e]?t[e]:(t[e]||(t[e]=this.zr.getColor(i++)),t[e])},this.isSelected=function(){return!0}}this._init()},dispose:function(){this.clear(),this.shapeList=null,this.effectList=null,this._layout.dispose(),this._layout=null,this.__nodePositionMap={}},getPosition:function(){var e=[];return this._graph.eachNode(function(t){t.layout&&e.push({name:t.data.name,position:Array.prototype.slice.call(t.layout.position)})}),e}},c.inherits(t,r),e("../chart").define("force",t),t}),i("echarts/layout/Force",["require","./forceLayoutWorker","zrender/tool/vector"],function(e){function t(){if("undefined"!=typeof Worker&&"undefined"!=typeof Blob)try{var e=new Blob([n.getWorkerCode()]);i=window.URL.createObjectURL(e)}catch(t){i=""}return i}var i,n=e("./forceLayoutWorker"),a=e("zrender/tool/vector"),o=window.requestAnimationFrame||window.msRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){setTimeout(e,16)},r="undefined"==typeof Float32Array?Array:Float32Array,s=function(e){"undefined"==typeof i&&t(),e=e||{},this.width=e.width||500,this.height=e.height||500,this.center=e.center||[this.width/2,this.height/2],this.ratioScaling=e.ratioScaling||!1,this.scaling=e.scaling||1,this.gravity="undefined"!=typeof e.gravity?e.gravity:1,this.large=e.large||!1,this.preventNodeOverlap=e.preventNodeOverlap||!1,this.preventNodeEdgeOverlap=e.preventNodeEdgeOverlap||!1,this.maxSpeedIncrease=e.maxSpeedIncrease||1,this.onupdate=e.onupdate||function(){},this.temperature=e.temperature||1,this.coolDown=e.coolDown||.99,this._layout=null,this._layoutWorker=null;var n=this,a=this._$onupdate;this._$onupdate=function(e){a.call(n,e)}};return s.prototype.updateConfig=function(){var e=this.width,t=this.height,i=Math.min(e,t),n={center:this.center,width:this.ratioScaling?e:i,height:this.ratioScaling?t:i,scaling:this.scaling||1,gravity:this.gravity||1,barnesHutOptimize:this.large,preventNodeOverlap:this.preventNodeOverlap,preventNodeEdgeOverlap:this.preventNodeEdgeOverlap,maxSpeedIncrease:this.maxSpeedIncrease};if(this._layoutWorker)this._layoutWorker.postMessage({cmd:"updateConfig",config:n});else for(var a in n)this._layout[a]=n[a]},s.prototype.init=function(e,t){if(this._layoutWorker&&(this._layoutWorker.terminate(),this._layoutWorker=null),i&&t)try{this._layoutWorker||(this._layoutWorker=new Worker(i),this._layoutWorker.onmessage=this._$onupdate),this._layout=null}catch(a){this._layoutWorker=null,this._layout||(this._layout=new n)}else this._layout||(this._layout=new n);this.temperature=1,this.graph=e;for(var o=e.nodes.length,s=new r(2*o),l=new r(o),h=new r(o),m=0;o>m;m++){var V=e.nodes[m];s[2*m]=V.layout.position[0],s[2*m+1]=V.layout.position[1],l[m]="undefined"==typeof V.layout.mass?1:V.layout.mass,h[m]="undefined"==typeof V.layout.size?1:V.layout.size,V.layout.__index=m}o=e.edges.length;for(var U=new r(2*o),d=new r(o),m=0;o>m;m++){var p=e.edges[m];U[2*m]=p.node1.layout.__index,U[2*m+1]=p.node2.layout.__index,d[m]=p.layout.weight||1}this._layoutWorker?this._layoutWorker.postMessage({cmd:"init",nodesPosition:s,nodesMass:l,nodesSize:h,edges:U,edgesWeight:d}):(this._layout.initNodes(s,l,h),this._layout.initEdges(U,d)),this.updateConfig()},s.prototype.step=function(e){var t=this.graph.nodes;if(this._layoutWorker){for(var i=new r(2*t.length),n=0;n<t.length;n++){var s=t[n];i[2*n]=s.layout.position[0],i[2*n+1]=s.layout.position[1]}this._layoutWorker.postMessage(i.buffer,[i.buffer]),this._layoutWorker.postMessage({cmd:"update",steps:e,temperature:this.temperature,coolDown:this.coolDown});for(var n=0;e>n;n++)this.temperature*=this.coolDown}else{o(this._$onupdate);for(var n=0;n<t.length;n++){var s=t[n];a.copy(this._layout.nodes[n].position,s.layout.position)}for(var n=0;e>n;n++)this._layout.temperature=this.temperature,this._layout.update(),this.temperature*=this.coolDown}},s.prototype._$onupdate=function(e){if(this._layoutWorker){for(var t=new Float32Array(e.data),i=0;i<this.graph.nodes.length;i++){var n=this.graph.nodes[i];n.layout.position[0]=t[2*i],n.layout.position[1]=t[2*i+1]}this.onupdate&&this.onupdate()}else if(this._layout){for(var i=0;i<this.graph.nodes.length;i++){var n=this.graph.nodes[i];a.copy(n.layout.position,this._layout.nodes[i].position)}this.onupdate&&this.onupdate()}},s.prototype.dispose=function(){this._layoutWorker&&this._layoutWorker.terminate(),this._layoutWorker=null,this._layout=null},s}),i("echarts/layout/forceLayoutWorker",["require","zrender/tool/vector"],function o(e){"use strict";function t(){this.subRegions=[],this.nSubRegions=0,this.node=null,this.mass=0,this.centerOfMass=null,this.bbox=new l(4),this.size=0}function i(){this.position=r.create(),this.force=r.create(),this.forcePrev=r.create(),this.speed=r.create(),this.speedPrev=r.create(),this.mass=1,this.inDegree=0,this.outDegree=0}function n(e,t){this.node1=e,this.node2=t,this.weight=1}function a(){this.barnesHutOptimize=!1,this.barnesHutTheta=1.5,this.repulsionByDegree=!1,this.preventNodeOverlap=!1,this.preventNodeEdgeOverlap=!1,this.strongGravity=!0,this.gravity=1,this.scaling=1,this.edgeWeightInfluence=1,this.center=[0,0],this.width=500,this.height=500,this.maxSpeedIncrease=1,this.nodes=[],this.edges=[],this.bbox=new l(4),this._rootRegion=new t,this._rootRegion.centerOfMass=r.create(),this._massArr=null,this._k=0}var r,s="undefined"==typeof window&&"undefined"==typeof e;r=s?{create:function(e,t){var i=new Float32Array(2);return i[0]=e||0,i[1]=t||0,i},dist:function(e,t){var i=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(i*i+n*n)},len:function(e){var t=e[0],i=e[1];return Math.sqrt(t*t+i*i)},scaleAndAdd:function(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e},scale:function(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e},add:function(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e},sub:function(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e},dot:function(e,t){return e[0]*t[0]+e[1]*t[1]},normalize:function(e,t){var i=t[0],n=t[1],a=i*i+n*n;return a>0&&(a=1/Math.sqrt(a),e[0]=t[0]*a,e[1]=t[1]*a),e},negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e},copy:function(e,t){return e[0]=t[0],e[1]=t[1],e},set:function(e,t,i){return e[0]=t,e[1]=i,e}}:e("zrender/tool/vector");var l="undefined"==typeof Float32Array?Array:Float32Array;if(t.prototype.beforeUpdate=function(){for(var e=0;e<this.nSubRegions;e++)this.subRegions[e].beforeUpdate();this.mass=0,this.centerOfMass&&(this.centerOfMass[0]=0,this.centerOfMass[1]=0),this.nSubRegions=0,this.node=null},t.prototype.afterUpdate=function(){this.subRegions.length=this.nSubRegions;for(var e=0;e<this.nSubRegions;e++)this.subRegions[e].afterUpdate()},t.prototype.addNode=function(e){if(0===this.nSubRegions){if(null==this.node)return void(this.node=e);this._addNodeToSubRegion(this.node),this.node=null}this._addNodeToSubRegion(e),this._updateCenterOfMass(e)},t.prototype.findSubRegion=function(e,t){for(var i=0;i<this.nSubRegions;i++){var n=this.subRegions[i];if(n.contain(e,t))return n}},t.prototype.contain=function(e,t){return this.bbox[0]<=e&&this.bbox[2]>=e&&this.bbox[1]<=t&&this.bbox[3]>=t},t.prototype.setBBox=function(e,t,i,n){this.bbox[0]=e,this.bbox[1]=t,this.bbox[2]=i,this.bbox[3]=n,this.size=(i-e+n-t)/2},t.prototype._newSubRegion=function(){var e=this.subRegions[this.nSubRegions];return e||(e=new t,this.subRegions[this.nSubRegions]=e),this.nSubRegions++,e},t.prototype._addNodeToSubRegion=function(e){var t=this.findSubRegion(e.position[0],e.position[1]),i=this.bbox;if(!t){var n=(i[0]+i[2])/2,a=(i[1]+i[3])/2,o=(i[2]-i[0])/2,r=(i[3]-i[1])/2,s=e.position[0]>=n?1:0,l=e.position[1]>=a?1:0,t=this._newSubRegion();t.setBBox(s*o+i[0],l*r+i[1],(s+1)*o+i[0],(l+1)*r+i[1])}t.addNode(e)},t.prototype._updateCenterOfMass=function(e){null==this.centerOfMass&&(this.centerOfMass=r.create());var t=this.centerOfMass[0]*this.mass,i=this.centerOfMass[1]*this.mass;t+=e.position[0]*e.mass,i+=e.position[1]*e.mass,this.mass+=e.mass,this.centerOfMass[0]=t/this.mass,this.centerOfMass[1]=i/this.mass},a.prototype.nodeToNodeRepulsionFactor=function(e,t,i){return i*i*e/t},a.prototype.edgeToNodeRepulsionFactor=function(e,t,i){return i*e/t},a.prototype.attractionFactor=function(e,t,i){return e*t/i},a.prototype.initNodes=function(e,t,n){this.temperature=1;var a=e.length/2;this.nodes.length=0;for(var o="undefined"!=typeof n,r=0;a>r;r++){var s=new i;s.position[0]=e[2*r],s.position[1]=e[2*r+1],s.mass=t[r],o&&(s.size=n[r]),this.nodes.push(s)}this._massArr=t,o&&(this._sizeArr=n)},a.prototype.initEdges=function(e,t){var i=e.length/2;this.edges.length=0;for(var a="undefined"!=typeof t,o=0;i>o;o++){var r=e[2*o],s=e[2*o+1],l=this.nodes[r],h=this.nodes[s];if(l&&h){l.outDegree++,h.inDegree++;var m=new n(l,h);a&&(m.weight=t[o]),this.edges.push(m)}}},a.prototype.update=function(){var e=this.nodes.length;if(this.updateBBox(),this._k=.4*this.scaling*Math.sqrt(this.width*this.height/e),this.barnesHutOptimize){this._rootRegion.setBBox(this.bbox[0],this.bbox[1],this.bbox[2],this.bbox[3]),this._rootRegion.beforeUpdate();for(var t=0;e>t;t++)this._rootRegion.addNode(this.nodes[t]);this._rootRegion.afterUpdate()}else{var i=0,n=this._rootRegion.centerOfMass;r.set(n,0,0);for(var t=0;e>t;t++){var a=this.nodes[t];i+=a.mass,r.scaleAndAdd(n,n,a.position,a.mass);
+
+}i>0&&r.scale(n,n,1/i)}this.updateForce(),this.updatePosition()},a.prototype.updateForce=function(){for(var e=this.nodes.length,t=0;e>t;t++){var i=this.nodes[t];r.copy(i.forcePrev,i.force),r.copy(i.speedPrev,i.speed),r.set(i.force,0,0)}this.updateNodeNodeForce(),this.gravity>0&&this.updateGravityForce(),this.updateEdgeForce(),this.preventNodeEdgeOverlap&&this.updateNodeEdgeForce()},a.prototype.updatePosition=function(){for(var e=this.nodes.length,t=r.create(),i=0;e>i;i++){var n=this.nodes[i],a=n.speed;r.scale(n.force,n.force,1/30);var o=r.len(n.force)+.1,s=Math.min(o,500)/o;r.scale(n.force,n.force,s),r.add(a,a,n.force),r.scale(a,a,this.temperature),r.sub(t,a,n.speedPrev);var l=r.len(t);if(l>0){r.scale(t,t,1/l);var h=r.len(n.speedPrev);h>0&&(l=Math.min(l/h,this.maxSpeedIncrease)*h,r.scaleAndAdd(a,n.speedPrev,t,l))}var m=r.len(a),s=Math.min(m,100)/(m+.1);r.scale(a,a,s),r.add(n.position,n.position,a)}},a.prototype.updateNodeNodeForce=function(){for(var e=this.nodes.length,t=0;e>t;t++){var i=this.nodes[t];if(this.barnesHutOptimize)this.applyRegionToNodeRepulsion(this._rootRegion,i);else for(var n=t+1;e>n;n++){var a=this.nodes[n];this.applyNodeToNodeRepulsion(i,a,!1)}}},a.prototype.updateGravityForce=function(){for(var e=0;e<this.nodes.length;e++)this.applyNodeGravity(this.nodes[e])},a.prototype.updateEdgeForce=function(){for(var e=0;e<this.edges.length;e++)this.applyEdgeAttraction(this.edges[e])},a.prototype.updateNodeEdgeForce=function(){for(var e=0;e<this.nodes.length;e++)for(var t=0;t<this.edges.length;t++)this.applyEdgeToNodeRepulsion(this.edges[t],this.nodes[e])},a.prototype.applyRegionToNodeRepulsion=function(){var e=r.create();return function(t,i){if(t.node)this.applyNodeToNodeRepulsion(t.node,i,!0);else{if(0===t.mass&&0===i.mass)return;r.sub(e,i.position,t.centerOfMass);var n=e[0]*e[0]+e[1]*e[1];if(n>this.barnesHutTheta*t.size*t.size){var a=this._k*this._k*(i.mass+t.mass)/(n+1);r.scaleAndAdd(i.force,i.force,e,2*a)}else for(var o=0;o<t.nSubRegions;o++)this.applyRegionToNodeRepulsion(t.subRegions[o],i)}}}(),a.prototype.applyNodeToNodeRepulsion=function(){var e=r.create();return function(t,i,n){if(t!==i&&(0!==t.mass||0!==i.mass)){r.sub(e,t.position,i.position);var a=e[0]*e[0]+e[1]*e[1];if(0!==a){var o,s=t.mass+i.mass,l=Math.sqrt(a);r.scale(e,e,1/l),this.preventNodeOverlap?(l=l-t.size-i.size,l>0?o=this.nodeToNodeRepulsionFactor(s,l,this._k):0>=l&&(o=this._k*this._k*10*s)):o=this.nodeToNodeRepulsionFactor(s,l,this._k),n||r.scaleAndAdd(t.force,t.force,e,2*o),r.scaleAndAdd(i.force,i.force,e,2*-o)}}}}(),a.prototype.applyEdgeAttraction=function(){var e=r.create();return function(t){var i=t.node1,n=t.node2;r.sub(e,i.position,n.position);var a,o=r.len(e);a=0===this.edgeWeightInfluence?1:1==this.edgeWeightInfluence?t.weight:Math.pow(t.weight,this.edgeWeightInfluence);var s;if(!(this.preventOverlap&&(o=o-i.size-n.size,0>=o))){var s=this.attractionFactor(a,o,this._k);r.scaleAndAdd(i.force,i.force,e,-s),r.scaleAndAdd(n.force,n.force,e,s)}}}(),a.prototype.applyNodeGravity=function(){var e=r.create();return function(t){r.sub(e,this.center,t.position),this.width>this.height?e[1]*=this.width/this.height:e[0]*=this.height/this.width;var i=r.len(e)/100;this.strongGravity?r.scaleAndAdd(t.force,t.force,e,i*this.gravity*t.mass):r.scaleAndAdd(t.force,t.force,e,this.gravity*t.mass/(i+1))}}(),a.prototype.applyEdgeToNodeRepulsion=function(){var e=r.create(),t=r.create(),i=r.create();return function(n,a){var o=n.node1,s=n.node2;if(o!==a&&s!==a){r.sub(e,s.position,o.position),r.sub(t,a.position,o.position);var l=r.len(e);r.scale(e,e,1/l);var h=r.dot(e,t);if(!(0>h||h>l)){r.scaleAndAdd(i,o.position,e,h);var m=r.dist(i,a.position)-a.size,V=this.edgeToNodeRepulsionFactor(a.mass,Math.max(m,.1),100);r.sub(e,a.position,i),r.normalize(e,e),r.scaleAndAdd(a.force,a.force,e,V),r.scaleAndAdd(o.force,o.force,e,-V),r.scaleAndAdd(s.force,s.force,e,-V)}}}}(),a.prototype.updateBBox=function(){for(var e=1/0,t=1/0,i=-(1/0),n=-(1/0),a=0;a<this.nodes.length;a++){var o=this.nodes[a].position;e=Math.min(e,o[0]),t=Math.min(t,o[1]),i=Math.max(i,o[0]),n=Math.max(n,o[1])}this.bbox[0]=e,this.bbox[1]=t,this.bbox[2]=i,this.bbox[3]=n},a.getWorkerCode=function(){var e=o.toString();return e.slice(e.indexOf("{")+1,e.lastIndexOf("return"))},s){var h=null;self.onmessage=function(e){if(e.data instanceof ArrayBuffer){if(!h)return;for(var t=new Float32Array(e.data),i=t.length/2,n=0;i>n;n++){var o=h.nodes[n];o.position[0]=t[2*n],o.position[1]=t[2*n+1]}}else switch(e.data.cmd){case"init":h||(h=new a),h.initNodes(e.data.nodesPosition,e.data.nodesMass,e.data.nodesSize),h.initEdges(e.data.edges,e.data.edgesWeight);break;case"updateConfig":if(h)for(var r in e.data.config)h[r]=e.data.config[r];break;case"update":var s=e.data.steps;if(h){var i=h.nodes.length,t=new Float32Array(2*i);h.temperature=e.data.temperature;for(var n=0;s>n;n++)h.update(),h.temperature*=e.data.coolDown;for(var n=0;i>n;n++){var o=h.nodes[n];t[2*n]=o.position[0],t[2*n+1]=o.position[1]}self.postMessage(t.buffer,[t.buffer])}else{var l=new Float32Array;self.postMessage(l.buffer,[l.buffer])}}}}return a}),i("echarts/chart/map",["require","./base","zrender/shape/Text","zrender/shape/Path","zrender/shape/Circle","zrender/shape/Rectangle","zrender/shape/Line","zrender/shape/Polygon","zrender/shape/Ellipse","zrender/shape/Image","../component/dataRange","../component/roamController","../layer/heatmap","../config","../util/ecData","zrender/tool/util","zrender/config","zrender/tool/event","../util/mapData/params","../util/mapData/textFixed","../util/mapData/geoCoord","../util/projection/svg","../util/projection/normal","../chart"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o);var r=this;r._onmousewheel=function(e){return r.__onmousewheel(e)},r._onmousedown=function(e){return r.__onmousedown(e)},r._onmousemove=function(e){return r.__onmousemove(e)},r._onmouseup=function(e){return r.__onmouseup(e)},r._onroamcontroller=function(e){return r.__onroamcontroller(e)},r._ondrhoverlink=function(e){return r.__ondrhoverlink(e)},this._isAlive=!0,this._selectedMode={},this._activeMapType={},this._clickable={},this._hoverable={},this._showLegendSymbol={},this._selected={},this._mapTypeMap={},this._mapDataMap={},this._nameMap={},this._specialArea={},this._refreshDelayTicket,this._mapDataRequireCounter,this._markAnimation=!1,this._hoverLinkMap={},this._roamMap={},this._scaleLimitMap={},this._mx,this._my,this._mousedown,this._justMove,this._curMapType,this.refresh(a),this.zr.on(c.EVENT.MOUSEWHEEL,this._onmousewheel),this.zr.on(c.EVENT.MOUSEDOWN,this._onmousedown),t.bind(U.EVENT.ROAMCONTROLLER,this._onroamcontroller),t.bind(U.EVENT.DATA_RANGE_HOVERLINK,this._ondrhoverlink)}var i=e("./base"),n=e("zrender/shape/Text"),a=e("zrender/shape/Path"),o=e("zrender/shape/Circle"),r=e("zrender/shape/Rectangle"),s=e("zrender/shape/Line"),l=e("zrender/shape/Polygon"),h=e("zrender/shape/Ellipse"),m=e("zrender/shape/Image");e("../component/dataRange"),e("../component/roamController");var V=e("../layer/heatmap"),U=e("../config");U.map={zlevel:0,z:2,mapType:"china",showLegendSymbol:!0,dataRangeHoverLink:!0,hoverable:!0,clickable:!0,itemStyle:{normal:{borderColor:"rgba(0,0,0,0)",borderWidth:1,areaStyle:{color:"#ccc"},label:{show:!1,textStyle:{color:"rgb(139,69,19)"}}},emphasis:{borderColor:"rgba(0,0,0,0)",borderWidth:1,areaStyle:{color:"rgba(255,215,0,0.8)"},label:{show:!1,textStyle:{color:"rgb(100,0,0)"}}}}};var d=e("../util/ecData"),p=e("zrender/tool/util"),c=e("zrender/config"),u=e("zrender/tool/event"),y=e("../util/mapData/params").params,g=e("../util/mapData/textFixed"),b=e("../util/mapData/geoCoord");return t.prototype={type:U.CHART_TYPE_MAP,_buildShape:function(){var e=this.series;this.selectedMap={},this._activeMapType={};for(var t,i,n,a,o=this.component.legend,r={},s={},l={},h={},m=0,V=e.length;V>m;m++)if(e[m].type==U.CHART_TYPE_MAP&&(e[m]=this.reformOption(e[m]),i=e[m].mapType,s[i]=s[i]||{},s[i][m]=!0,l[i]=l[i]||e[m].mapValuePrecision,this._scaleLimitMap[i]=this._scaleLimitMap[i]||{},e[m].scaleLimit&&p.merge(this._scaleLimitMap[i],e[m].scaleLimit,!0),this._roamMap[i]=e[m].roam||this._roamMap[i],(null==this._hoverLinkMap[i]||this._hoverLinkMap[i])&&(this._hoverLinkMap[i]=e[m].dataRangeHoverLink),this._nameMap[i]=this._nameMap[i]||{},e[m].nameMap&&p.merge(this._nameMap[i],e[m].nameMap,!0),this._activeMapType[i]=!0,e[m].textFixed&&p.merge(g,e[m].textFixed,!0),e[m].geoCoord&&p.merge(b,e[m].geoCoord,!0),this._selectedMode[i]=this._selectedMode[i]||e[m].selectedMode,(null==this._hoverable[i]||this._hoverable[i])&&(this._hoverable[i]=e[m].hoverable),(null==this._clickable[i]||this._clickable[i])&&(this._clickable[i]=e[m].clickable),(null==this._showLegendSymbol[i]||this._showLegendSymbol[i])&&(this._showLegendSymbol[i]=e[m].showLegendSymbol),h[i]=h[i]||e[m].mapValueCalculation,t=e[m].name,this.selectedMap[t]=o?o.isSelected(t):!0,this.selectedMap[t])){r[i]=r[i]||{},n=e[m].data;for(var d=0,c=n.length;c>d;d++){a=this._nameChange(i,n[d].name),r[i][a]=r[i][a]||{seriesIndex:[],valueMap:{},precision:0};for(var u in n[d])"value"!=u?r[i][a][u]=n[d][u]:isNaN(n[d].value)||(null==r[i][a].value&&(r[i][a].value=0),r[i][a].precision=Math.max(this.getPrecision(+n[d].value),r[i][a].precision),r[i][a].value+=+n[d].value,r[i][a].valueMap[m]=+n[d].value);r[i][a].seriesIndex.push(m)}}this._mapDataRequireCounter=0;for(var f in r)this._mapDataRequireCounter++;this._clearSelected(),0===this._mapDataRequireCounter&&(this.clear(),this.zr&&this.zr.delShape(this.lastShapeList),this.lastShapeList=[]);for(var f in r){for(var c in r[f]){"average"==h[f]&&(r[f][c].value/=r[f][c].seriesIndex.length);var k=r[f][c].value;null!=k&&(r[f][c].value=k.toFixed(null==l[f]?r[f][c].precision:l[f])-0)}this._mapDataMap[f]=this._mapDataMap[f]||{},this._mapDataMap[f].mapData?this._mapDataCallback(f,r[f],s[f])(this._mapDataMap[f].mapData):y[f.replace(/\|.*/,"")].getGeoJson&&(this._specialArea[f]=y[f.replace(/\|.*/,"")].specialArea||this._specialArea[f],y[f.replace(/\|.*/,"")].getGeoJson(this._mapDataCallback(f,r[f],s[f])))}},_mapDataCallback:function(t,i,n){var a=this;return function(o){a._isAlive&&null!=a._activeMapType[t]&&(-1!=t.indexOf("|")&&(o=a._getSubMapData(t,o)),a._mapDataMap[t].mapData=o,o.firstChild?(a._mapDataMap[t].rate=1,a._mapDataMap[t].projection=e("../util/projection/svg")):(a._mapDataMap[t].rate=.75,a._mapDataMap[t].projection=e("../util/projection/normal")),a._buildMap(t,a._getProjectionData(t,o,n),i,n),a._buildMark(t,n),--a._mapDataRequireCounter<=0&&(a.addShapeList(),a.zr.refreshNextFrame()),a._buildHeatmap(t))}},_clearSelected:function(){for(var e in this._selected)this._activeMapType[this._mapTypeMap[e]]||(delete this._selected[e],delete this._mapTypeMap[e])},_getSubMapData:function(e,t){for(var i=e.replace(/^.*\|/,""),n=t.features,a=0,o=n.length;o>a;a++)if(n[a].properties&&n[a].properties.name==i){n=n[a],"United States of America"==i&&n.geometry.coordinates.length>1&&(n={geometry:{coordinates:n.geometry.coordinates.slice(5,6),type:n.geometry.type},id:n.id,properties:n.properties,type:n.type});break}return{type:"FeatureCollection",features:[n]}},_getProjectionData:function(e,t,i){var n,a=this._mapDataMap[e].projection,o=[],r=this._mapDataMap[e].bbox||a.getBbox(t,this._specialArea[e]);n=this._mapDataMap[e].hasRoam?this._mapDataMap[e].transform:this._getTransform(r,i,this._mapDataMap[e].rate);var s,l=this._mapDataMap[e].lastTransform||{scale:{}};n.left!=l.left||n.top!=l.top||n.scale.x!=l.scale.x||n.scale.y!=l.scale.y?(s=a.geoJson2Path(t,n,this._specialArea[e]),l=p.clone(n)):(n=this._mapDataMap[e].transform,s=this._mapDataMap[e].pathArray),this._mapDataMap[e].bbox=r,this._mapDataMap[e].transform=n,this._mapDataMap[e].lastTransform=l,this._mapDataMap[e].pathArray=s;for(var h=[n.left,n.top],m=0,V=s.length;V>m;m++)o.push(this._getSingleProvince(e,s[m],h));if(this._specialArea[e])for(var U in this._specialArea[e])o.push(this._getSpecialProjectionData(e,t,U,this._specialArea[e][U],h));if("china"==e){var d=this.geo2pos(e,b["å—海诸岛"]||y["å—海诸岛"].textCoord),c=n.scale.x/10.5,u=[32*c+d[0],83*c+d[1]];g["å—海诸岛"]&&(u[0]+=g["å—海诸岛"][0],u[1]+=g["å—海诸岛"][1]),o.push({name:this._nameChange(e,"å—海诸岛"),path:y["å—海诸岛"].getPath(d,c),position:h,textX:u[0],textY:u[1]})}return o},_getSpecialProjectionData:function(t,i,n,a,o){i=this._getSubMapData("x|"+n,i);var r=e("../util/projection/normal"),s=r.getBbox(i),l=this.geo2pos(t,[a.left,a.top]),h=this.geo2pos(t,[a.left+a.width,a.top+a.height]),m=Math.abs(h[0]-l[0]),V=Math.abs(h[1]-l[1]),U=s.width,d=s.height,p=m/.75/U,c=V/d;p>c?(p=.75*c,m=U*p):(c=p,p=.75*c,V=d*c);var u={OffsetLeft:l[0],OffsetTop:l[1],scale:{x:p,y:c}},y=r.geoJson2Path(i,u);return this._getSingleProvince(t,y[0],o)},_getSingleProvince:function(e,t,i){var n,a=t.properties.name,o=g[a]||[0,0];if(b[a])n=this.geo2pos(e,b[a]);else if(t.cp)n=[t.cp[0]+o[0],t.cp[1]+o[1]];else{var r=this._mapDataMap[e].bbox;n=this.geo2pos(e,[r.left+r.width/2,r.top+r.height/2]),n[0]+=o[0],n[1]+=o[1]}return t.name=this._nameChange(e,a),t.position=i,t.textX=n[0],t.textY=n[1],t},_getTransform:function(e,t,i){var n,a,o,r,s,l,h,m=this.series,V=this.zr.getWidth(),U=this.zr.getHeight(),d=Math.round(.02*Math.min(V,U));for(var p in t)n=m[p].mapLocation||{},o=n.x||o,s=n.y||s,l=n.width||l,h=n.height||h;a=this.parsePercent(o,V),a=isNaN(a)?d:a,r=this.parsePercent(s,U),r=isNaN(r)?d:r,l=null==l?V-a-2*d:this.parsePercent(l,V),h=null==h?U-r-2*d:this.parsePercent(h,U);var c=e.width,u=e.height,y=l/i/c,g=h/u;if(y>g?(y=g*i,l=c*y):(g=y,y=g*i,h=u*g),isNaN(o))switch(o=o||"center",o+""){case"center":a=Math.floor((V-l)/2);break;case"right":a=V-l}if(isNaN(s))switch(s=s||"center",s+""){case"center":r=Math.floor((U-h)/2);break;case"bottom":r=U-h}return{left:a,top:r,width:l,height:h,baseScale:1,scale:{x:y,y:g}}},_buildMap:function(e,t,i,m){for(var V,c,u,y,g,b,f,k,x,_,L,W=this.series,X=this.component.legend,v=this.component.dataRange,w=0,K=t.length;K>w;w++){if(k=p.clone(t[w]),x={name:k.name,path:k.path,position:p.clone(k.position)},c=k.name,u=i[c]){g=[u],V="";for(var I=0,J=u.seriesIndex.length;J>I;I++){var C=W[u.seriesIndex[I]];g.push(C),V+=C.name+" ",X&&this._showLegendSymbol[e]&&X.hasColor(C.name)&&this.shapeList.push(new o({zlevel:C.zlevel,z:C.z+1,position:p.clone(k.position),_mapType:e,style:{x:k.textX+3+7*I,y:k.textY-10,r:3,color:X.getColor(C.name)},hoverable:!1}))}y=u.value}else{u={name:c,value:"-"},V="",g=[];for(var S in m)g.push(W[S]);y="-"}switch(this.ecTheme.map&&g.push(this.ecTheme.map),g.push(U.map),b=v&&!isNaN(y)?v.getColor(y):null,k.color=k.color||b||this.getItemStyleColor(this.deepQuery(g,"itemStyle.normal.color"),u.seriesIndex,-1,u)||this.deepQuery(g,"itemStyle.normal.areaStyle.color"),k.strokeColor=k.strokeColor||this.deepQuery(g,"itemStyle.normal.borderColor"),k.lineWidth=k.lineWidth||this.deepQuery(g,"itemStyle.normal.borderWidth"),x.color=this.getItemStyleColor(this.deepQuery(g,"itemStyle.emphasis.color"),u.seriesIndex,-1,u)||this.deepQuery(g,"itemStyle.emphasis.areaStyle.color")||k.color,x.strokeColor=this.deepQuery(g,"itemStyle.emphasis.borderColor")||k.strokeColor,x.lineWidth=this.deepQuery(g,"itemStyle.emphasis.borderWidth")||k.lineWidth,k.brushType=x.brushType=k.brushType||"both",k.lineJoin=x.lineJoin="round",k._name=x._name=c,f=this.deepQuery(g,"itemStyle.normal.label.textStyle"),L={zlevel:this.getZlevelBase(),z:this.getZBase()+1,position:p.clone(k.position),_mapType:e,_geo:this.pos2geo(e,[k.textX,k.textY]),style:{brushType:"fill",x:k.textX,y:k.textY,text:this.getLabelText(c,y,g,"normal"),_name:c,textAlign:"center",color:this.deepQuery(g,"itemStyle.normal.label.show")?this.deepQuery(g,"itemStyle.normal.label.textStyle.color"):"rgba(0,0,0,0)",textFont:this.getFont(f)}},L._style=p.clone(L.style),L.highlightStyle=p.clone(L.style),this.deepQuery(g,"itemStyle.emphasis.label.show")?(L.highlightStyle.text=this.getLabelText(c,y,g,"emphasis"),L.highlightStyle.color=this.deepQuery(g,"itemStyle.emphasis.label.textStyle.color")||L.style.color,f=this.deepQuery(g,"itemStyle.emphasis.label.textStyle")||f,L.highlightStyle.textFont=this.getFont(f)):L.highlightStyle.color="rgba(0,0,0,0)",_={zlevel:this.getZlevelBase(),z:this.getZBase(),position:p.clone(k.position),style:k,highlightStyle:x,_style:p.clone(k),_mapType:e},null!=k.scale&&(_.scale=p.clone(k.scale)),L=new n(L),_.style.shapeType){case"rectangle":_=new r(_);break;case"line":_=new s(_);break;case"circle":_=new o(_);break;case"polygon":_=new l(_);break;case"ellipse":_=new h(_);break;default:_=new a(_),_.buildPathArray&&(_.style.pathArray=_.buildPathArray(_.style.path))}(this._selectedMode[e]&&this._selected[c]&&u.selected!==!1||u.selected===!0)&&(L.style=L.highlightStyle,_.style=_.highlightStyle),L.clickable=_.clickable=this._clickable[e]&&(null==u.clickable||u.clickable),this._selectedMode[e]&&(this._selected[c]=null!=this._selected[c]?this._selected[c]:u.selected,this._mapTypeMap[c]=e,(null==u.selectable||u.selectable)&&(_.clickable=L.clickable=!0,_.onclick=L.onclick=this.shapeHandler.onclick)),this._hoverable[e]&&(null==u.hoverable||u.hoverable)?(L.hoverable=_.hoverable=!0,_.hoverConnect=L.id,L.hoverConnect=_.id):L.hoverable=_.hoverable=!1,d.pack(L,{name:V,tooltip:this.deepQuery(g,"tooltip")},0,u,0,c),this.shapeList.push(L),d.pack(_,{name:V,tooltip:this.deepQuery(g,"tooltip")},0,u,0,c),this.shapeList.push(_)}},_buildMark:function(e,t){this._seriesIndexToMapType=this._seriesIndexToMapType||{},this.markAttachStyle=this.markAttachStyle||{};var i=[this._mapDataMap[e].transform.left,this._mapDataMap[e].transform.top];"none"==e&&(i=[0,0]);for(var n in t)this._seriesIndexToMapType[n]=e,this.markAttachStyle[n]={position:i,_mapType:e},this.buildMark(n)},_buildHeatmap:function(e){for(var t=this.series,i=0,n=t.length;n>i;i++)if(t[i].heatmap){var a=t[i].heatmap.data;if(t[i].heatmap.needsTransform===!1){for(var o=[],r=0,s=a.length;s>r;++r)o.push([a[r][3],a[r][4],a[r][2]]);var l=[0,0]}else{var h=t[i].heatmap._geoData;if(void 0===h){t[i].heatmap._geoData=[];for(var r=0,s=a.length;s>r;++r)t[i].heatmap._geoData[r]=a[r];h=t[i].heatmap._geoData}for(var s=a.length,U=0;s>U;++U)a[U]=this.geo2pos(e,[h[U][0],h[U][1]]);var l=[this._mapDataMap[e].transform.left,this._mapDataMap[e].transform.top]}var d=new V(t[i].heatmap),p=d.getCanvas(a[0][3]?o:a,this.zr.getWidth(),this.zr.getHeight()),c=new m({zlevel:this.getZlevelBase(),z:this.getZBase()+1,position:l,scale:[1,1],hoverable:!1,style:{x:0,y:0,image:p,width:p.width,height:p.height}});c.type="heatmap",c._mapType=e,this.shapeList.push(c),this.zr.addShape(c)}},getMarkCoord:function(e,t){return t.geoCoord||b[t.name]?this.geo2pos(this._seriesIndexToMapType[e],t.geoCoord||b[t.name]):[0,0]},getMarkGeo:function(e){return e.geoCoord||b[e.name]},_nameChange:function(e,t){return this._nameMap[e][t]||t},getLabelText:function(e,t,i,n){var a=this.deepQuery(i,"itemStyle."+n+".label.formatter");return a?"function"==typeof a?a.call(this.myChart,e,t):"string"==typeof a?(a=a.replace("{a}","{a0}").replace("{b}","{b0}"),a=a.replace("{a0}",e).replace("{b0}",t)):void 0:e},_findMapTypeByPos:function(e,t){var i,n,a,o,r;for(var s in this._mapDataMap)if(i=this._mapDataMap[s].transform,i&&this._roamMap[s]&&this._activeMapType[s]&&(n=i.left,a=i.top,o=i.width,r=i.height,e>=n&&n+o>=e&&t>=a&&a+r>=t))return s},__onmousewheel:function(e){function t(e,t){for(var i=0;i<e.pointList.length;i++){var n=e.pointList[i];n[0]*=t,n[1]*=t}var a=e.controlPointList;if(a)for(var i=0;i<a.length;i++){var n=a[i];n[0]*=t,n[1]*=t}}function i(e,t){e.xStart*=t,e.yStart*=t,e.xEnd*=t,e.yEnd*=t,null!=e.cpX1&&(e.cpX1*=t,e.cpY1*=t)}if(!(this.shapeList.length<=0)){for(var n=0,a=this.shapeList.length;a>n;n++){var o=this.shapeList[n];if(o.__animating)return}var r,s,l=e.event,h=u.getX(l),m=u.getY(l),V=u.getDelta(l),d=e.mapTypeControl;d||(d={},s=this._findMapTypeByPos(h,m),s&&this._roamMap[s]&&"move"!=this._roamMap[s]&&(d[s]=!0));var p=!1;for(s in d)if(d[s]){p=!0;var c=this._mapDataMap[s].transform,y=c.left,g=c.top,b=c.width,f=c.height,k=this.pos2geo(s,[h-y,m-g]);if(V>0){if(r=1.2,null!=this._scaleLimitMap[s].max&&c.baseScale>=this._scaleLimitMap[s].max)continue}else if(r=1/1.2,null!=this._scaleLimitMap[s].min&&c.baseScale<=this._scaleLimitMap[s].min)continue;c.baseScale*=r,c.scale.x*=r,c.scale.y*=r,c.width=b*r,c.height=f*r,this._mapDataMap[s].hasRoam=!0,this._mapDataMap[s].transform=c,k=this.geo2pos(s,k),c.left-=k[0]-(h-y),c.top-=k[1]-(m-g),this._mapDataMap[s].transform=c,this.clearEffectShape(!0);for(var n=0,a=this.shapeList.length;a>n;n++){var o=this.shapeList[n];if(o._mapType==s){var x=o.type,_=o.style;switch(o.position[0]=c.left,o.position[1]=c.top,x){case"path":case"symbol":case"circle":case"rectangle":case"polygon":case"line":case"ellipse":case"heatmap":o.scale[0]*=r,o.scale[1]*=r;break;case"mark-line":i(_,r);break;case"polyline":t(_,r);break;case"shape-bundle":for(var L=0;L<_.shapeList.length;L++){var W=_.shapeList[L];"mark-line"==W.type?i(W.style,r):"polyline"==W.type&&t(W.style,r)}break;case"icon":case"image":k=this.geo2pos(s,o._geo),_.x=_._x=k[0]-_.width/2,_.y=_._y=k[1]-_.height/2;break;default:k=this.geo2pos(s,o._geo),_.x=k[0],_.y=k[1],"text"==x&&(o._style.x=o.highlightStyle.x=k[0],o._style.y=o.highlightStyle.y=k[1])}this.zr.modShape(o.id)}}}if(p){u.stop(l),this.zr.refreshNextFrame();var X=this;clearTimeout(this._refreshDelayTicket),this._refreshDelayTicket=setTimeout(function(){X&&X.shapeList&&X.animationEffect()},100),this.messageCenter.dispatch(U.EVENT.MAP_ROAM,e.event,{type:"scale"},this.myChart)}}},__onmousedown:function(e){if(!(this.shapeList.length<=0)){var t=e.target;if(!t||!t.draggable){var i=e.event,n=u.getX(i),a=u.getY(i),o=this._findMapTypeByPos(n,a);if(o&&this._roamMap[o]&&"scale"!=this._roamMap[o]){this._mousedown=!0,this._mx=n,this._my=a,this._curMapType=o,this.zr.on(c.EVENT.MOUSEUP,this._onmouseup);var r=this;setTimeout(function(){r.zr.on(c.EVENT.MOUSEMOVE,r._onmousemove)},100)}}}},__onmousemove:function(e){if(this._mousedown&&this._isAlive){var t=e.event,i=u.getX(t),n=u.getY(t),a=this._mapDataMap[this._curMapType].transform;a.hasRoam=!0,a.left-=this._mx-i,a.top-=this._my-n,this._mx=i,this._my=n,this._mapDataMap[this._curMapType].transform=a;for(var o=0,r=this.shapeList.length;r>o;o++)this.shapeList[o]._mapType==this._curMapType&&(this.shapeList[o].position[0]=a.left,this.shapeList[o].position[1]=a.top,this.zr.modShape(this.shapeList[o].id));this.messageCenter.dispatch(U.EVENT.MAP_ROAM,e.event,{type:"move"},this.myChart),this.clearEffectShape(!0),this.zr.refreshNextFrame(),this._justMove=!0,u.stop(t)}},__onmouseup:function(e){var t=e.event;this._mx=u.getX(t),this._my=u.getY(t),this._mousedown=!1;var i=this;setTimeout(function(){i._justMove&&i.animationEffect(),i._justMove=!1,i.zr.un(c.EVENT.MOUSEMOVE,i._onmousemove),i.zr.un(c.EVENT.MOUSEUP,i._onmouseup)},120)},__onroamcontroller:function(e){var t=e.event;t.zrenderX=this.zr.getWidth()/2,t.zrenderY=this.zr.getHeight()/2;var i=e.mapTypeControl,n=0,a=0,o=e.step;switch(e.roamType){case"scaleUp":return t.zrenderDelta=1,void this.__onmousewheel({event:t,mapTypeControl:i});case"scaleDown":return t.zrenderDelta=-1,void this.__onmousewheel({event:t,mapTypeControl:i});case"up":n=-o;break;case"down":n=o;break;case"left":a=-o;break;case"right":a=o}var r,s;for(s in i)this._mapDataMap[s]&&this._activeMapType[s]&&(r=this._mapDataMap[s].transform,r.hasRoam=!0,r.left-=a,r.top-=n,this._mapDataMap[s].transform=r);for(var l=0,h=this.shapeList.length;h>l;l++)s=this.shapeList[l]._mapType,i[s]&&this._activeMapType[s]&&(r=this._mapDataMap[s].transform,this.shapeList[l].position[0]=r.left,this.shapeList[l].position[1]=r.top,this.zr.modShape(this.shapeList[l].id));this.messageCenter.dispatch(U.EVENT.MAP_ROAM,e.event,{type:"move"},this.myChart),this.clearEffectShape(!0),this.zr.refreshNextFrame(),clearTimeout(this.dircetionTimer);var m=this;this.dircetionTimer=setTimeout(function(){m.animationEffect()},150)},__ondrhoverlink:function(e){for(var t,i,n=0,a=this.shapeList.length;a>n;n++)t=this.shapeList[n]._mapType,this._hoverLinkMap[t]&&this._activeMapType[t]&&(i=d.get(this.shapeList[n],"value"),null!=i&&i>=e.valueMin&&i<=e.valueMax&&this.zr.addHoverShape(this.shapeList[n]))},onclick:function(e){if(this.isClick&&e.target&&!this._justMove&&"icon"!=e.target.type){this.isClick=!1;var t=e.target,i=t.style._name,n=this.shapeList.length,a=t._mapType||"";if("single"==this._selectedMode[a])for(var o in this._selected)if(this._selected[o]&&this._mapTypeMap[o]==a){for(var r=0;n>r;r++)this.shapeList[r].style._name==o&&this.shapeList[r]._mapType==a&&(this.shapeList[r].style=this.shapeList[r]._style,this.zr.modShape(this.shapeList[r].id));o!=i&&(this._selected[o]=!1)}this._selected[i]=!this._selected[i];for(var r=0;n>r;r++)this.shapeList[r].style._name==i&&this.shapeList[r]._mapType==a&&(this.shapeList[r].style=this._selected[i]?this.shapeList[r].highlightStyle:this.shapeList[r]._style,this.zr.modShape(this.shapeList[r].id));this.messageCenter.dispatch(U.EVENT.MAP_SELECTED,e.event,{selected:this._selected,target:i},this.myChart),this.zr.refreshNextFrame();var s=this;setTimeout(function(){s.zr.trigger(c.EVENT.MOUSEMOVE,e.event)},100)}},refresh:function(e){e&&(this.option=e,this.series=e.series),this._mapDataRequireCounter>0?this.clear():this.backupShapeList(),this._buildShape(),this.zr.refreshHover()},ondataRange:function(e,t){this.component.dataRange&&(this.refresh(),t.needRefresh=!0)},pos2geo:function(e,t){return this._mapDataMap[e].transform?this._mapDataMap[e].projection.pos2geo(this._mapDataMap[e].transform,t):null},getGeoByPos:function(e,t){if(!this._mapDataMap[e].transform)return null;var i=[this._mapDataMap[e].transform.left,this._mapDataMap[e].transform.top];return t instanceof Array?(t[0]-=i[0],t[1]-=i[1]):(t.x-=i[0],t.y-=i[1]),this.pos2geo(e,t)},geo2pos:function(e,t){return this._mapDataMap[e].transform?this._mapDataMap[e].projection.geo2pos(this._mapDataMap[e].transform,t):null},getPosByGeo:function(e,t){if(!this._mapDataMap[e].transform)return null;var i=this.geo2pos(e,t);return i[0]+=this._mapDataMap[e].transform.left,i[1]+=this._mapDataMap[e].transform.top,i},getMapPosition:function(e){return this._mapDataMap[e].transform?[this._mapDataMap[e].transform.left,this._mapDataMap[e].transform.top]:null},onbeforDispose:function(){this._isAlive=!1,this.zr.un(c.EVENT.MOUSEWHEEL,this._onmousewheel),this.zr.un(c.EVENT.MOUSEDOWN,this._onmousedown),this.messageCenter.unbind(U.EVENT.ROAMCONTROLLER,this._onroamcontroller),this.messageCenter.unbind(U.EVENT.DATA_RANGE_HOVERLINK,this._ondrhoverlink)}},p.inherits(t,i),e("../chart").define("map",t),t}),i("zrender/shape/Path",["require","./Base","./util/PathProxy","../tool/util"],function(e){var t=e("./Base"),i=e("./util/PathProxy"),n=i.PathSegment,a=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},o=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(a(e)*a(t))},r=function(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(o(e,t))},s=function(e){t.call(this,e)};return s.prototype={type:"path",buildPathArray:function(e,t,i){if(!e)return[];t=t||0,i=i||0;var a=e,o=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];a=a.replace(/-/g," -"),a=a.replace(/ /g," "),a=a.replace(/ /g,","),a=a.replace(/,,/g,",");var r;for(r=0;r<o.length;r++)a=a.replace(new RegExp(o[r],"g"),"|"+o[r]);var s=a.split("|"),l=[],h=0,m=0;for(r=1;r<s.length;r++){var V=s[r],U=V.charAt(0);V=V.slice(1),V=V.replace(new RegExp("e,-","g"),"e-");var d=V.split(",");d.length>0&&""===d[0]&&d.shift();for(var p=0;p<d.length;p++)d[p]=parseFloat(d[p]);for(;d.length>0&&!isNaN(d[0]);){var c,u,y,g,b,f,k,x,_=null,L=[],W=h,X=m;switch(U){case"l":h+=d.shift(),m+=d.shift(),_="L",L.push(h,m);break;case"L":h=d.shift(),m=d.shift(),L.push(h,m);break;case"m":h+=d.shift(),m+=d.shift(),_="M",L.push(h,m),U="l";break;case"M":h=d.shift(),m=d.shift(),_="M",L.push(h,m),U="L";break;case"h":h+=d.shift(),_="L",L.push(h,m);break;case"H":h=d.shift(),_="L",L.push(h,m);break;case"v":m+=d.shift(),_="L",L.push(h,m);break;case"V":m=d.shift(),_="L",L.push(h,m);break;case"C":L.push(d.shift(),d.shift(),d.shift(),d.shift()),h=d.shift(),m=d.shift(),L.push(h,m);break;case"c":L.push(h+d.shift(),m+d.shift(),h+d.shift(),m+d.shift()),h+=d.shift(),m+=d.shift(),_="C",L.push(h,m);break;case"S":c=h,u=m,y=l[l.length-1],"C"===y.command&&(c=h+(h-y.points[2]),u=m+(m-y.points[3])),L.push(c,u,d.shift(),d.shift()),h=d.shift(),m=d.shift(),_="C",L.push(h,m);break;case"s":c=h,u=m,y=l[l.length-1],"C"===y.command&&(c=h+(h-y.points[2]),u=m+(m-y.points[3])),L.push(c,u,h+d.shift(),m+d.shift()),h+=d.shift(),m+=d.shift(),_="C",L.push(h,m);break;case"Q":L.push(d.shift(),d.shift()),h=d.shift(),m=d.shift(),L.push(h,m);break;case"q":L.push(h+d.shift(),m+d.shift()),h+=d.shift(),m+=d.shift(),_="Q",L.push(h,m);break;case"T":c=h,u=m,y=l[l.length-1],"Q"===y.command&&(c=h+(h-y.points[0]),u=m+(m-y.points[1])),h=d.shift(),m=d.shift(),_="Q",L.push(c,u,h,m);break;case"t":c=h,u=m,y=l[l.length-1],"Q"===y.command&&(c=h+(h-y.points[0]),u=m+(m-y.points[1])),h+=d.shift(),m+=d.shift(),_="Q",L.push(c,u,h,m);break;case"A":g=d.shift(),b=d.shift(),f=d.shift(),k=d.shift(),x=d.shift(),W=h,X=m,h=d.shift(),m=d.shift(),_="A",L=this._convertPoint(W,X,h,m,k,x,g,b,f);break;case"a":g=d.shift(),b=d.shift(),f=d.shift(),k=d.shift(),x=d.shift(),W=h,X=m,h+=d.shift(),m+=d.shift(),_="A",L=this._convertPoint(W,X,h,m,k,x,g,b,f)}for(var v=0,w=L.length;w>v;v+=2)L[v]+=t,L[v+1]+=i;l.push(new n(_||U,L))}("z"===U||"Z"===U)&&l.push(new n("z",[]))}return l},_convertPoint:function(e,t,i,n,a,s,l,h,m){var V=m*(Math.PI/180),U=Math.cos(V)*(e-i)/2+Math.sin(V)*(t-n)/2,d=-1*Math.sin(V)*(e-i)/2+Math.cos(V)*(t-n)/2,p=U*U/(l*l)+d*d/(h*h);p>1&&(l*=Math.sqrt(p),h*=Math.sqrt(p));var c=Math.sqrt((l*l*h*h-l*l*d*d-h*h*U*U)/(l*l*d*d+h*h*U*U));a===s&&(c*=-1),isNaN(c)&&(c=0);var u=c*l*d/h,y=c*-h*U/l,g=(e+i)/2+Math.cos(V)*u-Math.sin(V)*y,b=(t+n)/2+Math.sin(V)*u+Math.cos(V)*y,f=r([1,0],[(U-u)/l,(d-y)/h]),k=[(U-u)/l,(d-y)/h],x=[(-1*U-u)/l,(-1*d-y)/h],_=r(k,x);return o(k,x)<=-1&&(_=Math.PI),o(k,x)>=1&&(_=0),0===s&&_>0&&(_-=2*Math.PI),1===s&&0>_&&(_+=2*Math.PI),[g,b,l,h,f,_,V,s]},buildPath:function(e,t){var i=t.path,n=t.x||0,a=t.y||0;t.pathArray=t.pathArray||this.buildPathArray(i,n,a);for(var o=t.pathArray,r=t.pointList=[],s=[],l=0,h=o.length;h>l;l++){"M"==o[l].command.toUpperCase()&&(s.length>0&&r.push(s),s=[]);for(var m=o[l].points,V=0,U=m.length;U>V;V+=2)s.push([m[V],m[V+1]])}s.length>0&&r.push(s);for(var l=0,h=o.length;h>l;l++){var d=o[l].command,m=o[l].points;switch(d){case"L":e.lineTo(m[0],m[1]);break;case"M":e.moveTo(m[0],m[1]);break;case"C":e.bezierCurveTo(m[0],m[1],m[2],m[3],m[4],m[5]);break;case"Q":e.quadraticCurveTo(m[0],m[1],m[2],m[3]);break;case"A":var p=m[0],c=m[1],u=m[2],y=m[3],g=m[4],b=m[5],f=m[6],k=m[7],x=u>y?u:y,_=u>y?1:u/y,L=u>y?y/u:1;e.translate(p,c),e.rotate(f),e.scale(_,L),e.arc(0,0,x,g,g+b,1-k),e.scale(1/_,1/L),e.rotate(-f),e.translate(-p,-c);break;case"z":e.closePath()}}},getRect:function(e){if(e.__rect)return e.__rect;var t;t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0;for(var i=Number.MAX_VALUE,n=Number.MIN_VALUE,a=Number.MAX_VALUE,o=Number.MIN_VALUE,r=e.x||0,s=e.y||0,l=e.pathArray||this.buildPathArray(e.path),h=0;h<l.length;h++)for(var m=l[h].points,V=0;V<m.length;V++)V%2===0?(m[V]+r<i&&(i=m[V]),m[V]+r>n&&(n=m[V])):(m[V]+s<a&&(a=m[V]),m[V]+s>o&&(o=m[V]));var U;return U=i===Number.MAX_VALUE||n===Number.MIN_VALUE||a===Number.MAX_VALUE||o===Number.MIN_VALUE?{x:0,y:0,width:0,height:0}:{x:Math.round(i-t/2),y:Math.round(a-t/2),width:n-i+t,height:o-a+t},e.__rect=U,U}},e("../tool/util").inherits(s,t),s}),i("zrender/shape/Ellipse",["require","./Base","../tool/util"],function(e){var t=e("./Base"),i=function(e){t.call(this,e)};return i.prototype={type:"ellipse",buildPath:function(e,t){var i=.5522848,n=t.x,a=t.y,o=t.a,r=t.b,s=o*i,l=r*i;e.moveTo(n-o,a),e.bezierCurveTo(n-o,a-l,n-s,a-r,n,a-r),e.bezierCurveTo(n+s,a-r,n+o,a-l,n+o,a),e.bezierCurveTo(n+o,a+l,n+s,a+r,n,a+r),e.bezierCurveTo(n-s,a+r,n-o,a+l,n-o,a),e.closePath()},getRect:function(e){if(e.__rect)return e.__rect;var t;return t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(e.x-e.a-t/2),
+y:Math.round(e.y-e.b-t/2),width:2*e.a+t,height:2*e.b+t},e.__rect}},e("../tool/util").inherits(i,t),i}),i("echarts/component/roamController",["require","./base","zrender/shape/Rectangle","zrender/shape/Sector","zrender/shape/Circle","../config","zrender/tool/util","zrender/tool/color","zrender/tool/event","../component"],function(e){function t(e,t,n,a,o){if(this.rcOption={},a.roamController&&a.roamController.show){if(!a.roamController.mapTypeControl)return void console.error("option.roamController.mapTypeControl has not been defined.");i.call(this,e,t,n,a,o),this.rcOption=a.roamController;var r=this;this._drictionMouseDown=function(e){return r.__drictionMouseDown(e)},this._drictionMouseUp=function(e){return r.__drictionMouseUp(e)},this._drictionMouseMove=function(e){return r.__drictionMouseMove(e)},this._drictionMouseOut=function(e){return r.__drictionMouseOut(e)},this._scaleHandler=function(e){return r.__scaleHandler(e)},this.refresh(a)}}var i=e("./base"),n=e("zrender/shape/Rectangle"),a=e("zrender/shape/Sector"),o=e("zrender/shape/Circle"),r=e("../config");r.roamController={zlevel:0,z:4,show:!0,x:"left",y:"top",width:80,height:120,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,handleColor:"#6495ed",fillerColor:"#fff",step:15,mapTypeControl:null};var s=e("zrender/tool/util"),l=e("zrender/tool/color"),h=e("zrender/tool/event");return t.prototype={type:r.COMPONENT_TYPE_ROAMCONTROLLER,_buildShape:function(){if(this.rcOption.show){this._itemGroupLocation=this._getItemGroupLocation(),this._buildBackground(),this._buildItem();for(var e=0,t=this.shapeList.length;t>e;e++)this.zr.addShape(this.shapeList[e])}},_buildItem:function(){this.shapeList.push(this._getDirectionShape("up")),this.shapeList.push(this._getDirectionShape("down")),this.shapeList.push(this._getDirectionShape("left")),this.shapeList.push(this._getDirectionShape("right")),this.shapeList.push(this._getScaleShape("scaleUp")),this.shapeList.push(this._getScaleShape("scaleDown"))},_getDirectionShape:function(e){var t=this._itemGroupLocation.r,i=this._itemGroupLocation.x+t,n=this._itemGroupLocation.y+t,o={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:i,y:n,r:t,startAngle:-45,endAngle:45,color:this.rcOption.handleColor,text:">",textX:i+t/2+4,textY:n-.5,textAlign:"center",textBaseline:"middle",textPosition:"specific",textColor:this.rcOption.fillerColor,textFont:Math.floor(t/2)+"px arial"},highlightStyle:{color:l.lift(this.rcOption.handleColor,-.2),brushType:"fill"},clickable:!0};switch(e){case"up":o.rotation=[Math.PI/2,i,n];break;case"left":o.rotation=[Math.PI,i,n];break;case"down":o.rotation=[-Math.PI/2,i,n]}return o=new a(o),o._roamType=e,o.onmousedown=this._drictionMouseDown,o.onmouseup=this._drictionMouseUp,o.onmousemove=this._drictionMouseMove,o.onmouseout=this._drictionMouseOut,o},_getScaleShape:function(e){var t=this._itemGroupLocation.width,i=this._itemGroupLocation.height-t;i=0>i?20:i;var n=Math.min(t/2-5,i)/2,a=this._itemGroupLocation.x+("scaleDown"===e?t-n:n),r=this._itemGroupLocation.y+this._itemGroupLocation.height-n,s={zlevel:this.getZlevelBase(),z:this.getZBase(),style:{x:a,y:r,r:n,color:this.rcOption.handleColor,text:"scaleDown"===e?"-":"+",textX:a,textY:r-2,textAlign:"center",textBaseline:"middle",textPosition:"specific",textColor:this.rcOption.fillerColor,textFont:Math.floor(n)+"px verdana"},highlightStyle:{color:l.lift(this.rcOption.handleColor,-.2),brushType:"fill"},clickable:!0};return s=new o(s),s._roamType=e,s.onmousedown=this._scaleHandler,s},_buildBackground:function(){var e=this.reformCssArray(this.rcOption.padding);this.shapeList.push(new n({zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{x:this._itemGroupLocation.x-e[3],y:this._itemGroupLocation.y-e[0],width:this._itemGroupLocation.width+e[3]+e[1],height:this._itemGroupLocation.height+e[0]+e[2],brushType:0===this.rcOption.borderWidth?"fill":"both",color:this.rcOption.backgroundColor,strokeColor:this.rcOption.borderColor,lineWidth:this.rcOption.borderWidth}}))},_getItemGroupLocation:function(){var e,t=this.reformCssArray(this.rcOption.padding),i=this.rcOption.width,n=this.rcOption.height,a=this.zr.getWidth(),o=this.zr.getHeight();switch(this.rcOption.x){case"center":e=Math.floor((a-i)/2);break;case"left":e=t[3]+this.rcOption.borderWidth;break;case"right":e=a-i-t[1]-t[3]-2*this.rcOption.borderWidth;break;default:e=this.parsePercent(this.rcOption.x,a)}var r;switch(this.rcOption.y){case"top":r=t[0]+this.rcOption.borderWidth;break;case"bottom":r=o-n-t[0]-t[2]-2*this.rcOption.borderWidth;break;case"center":r=Math.floor((o-n)/2);break;default:r=this.parsePercent(this.rcOption.y,o)}return{x:e,y:r,r:i/2,width:i,height:n}},__drictionMouseDown:function(e){this.mousedown=!0,this._drictionHandlerOn(e)},__drictionMouseUp:function(e){this.mousedown=!1,this._drictionHandlerOff(e)},__drictionMouseMove:function(e){this.mousedown&&this._drictionHandlerOn(e)},__drictionMouseOut:function(e){this._drictionHandlerOff(e)},_drictionHandlerOn:function(e){this._dispatchEvent(e.event,e.target._roamType),clearInterval(this.dircetionTimer);var t=this;this.dircetionTimer=setInterval(function(){t._dispatchEvent(e.event,e.target._roamType)},100),h.stop(e.event)},_drictionHandlerOff:function(){clearInterval(this.dircetionTimer)},__scaleHandler:function(e){this._dispatchEvent(e.event,e.target._roamType),h.stop(e.event)},_dispatchEvent:function(e,t){this.messageCenter.dispatch(r.EVENT.ROAMCONTROLLER,e,{roamType:t,mapTypeControl:this.rcOption.mapTypeControl,step:this.rcOption.step},this.myChart)},refresh:function(e){e&&(this.option=e||this.option,this.option.roamController=this.reformOption(this.option.roamController),this.rcOption=this.option.roamController),this.clear(),this._buildShape()}},s.inherits(t,i),e("../component").define("roamController",t),t}),i("echarts/layer/heatmap",["require"],function(){function e(e){if(this.option=e,e)for(var i in t)this.option[i]=void 0!==e[i]?e[i]:t[i];else this.option=t}var t={blurSize:30,gradientColors:["blue","cyan","lime","yellow","red"],minAlpha:.05,valueScale:1,opacity:1},i=20,n=256;return e.prototype={getCanvas:function(e,t,a){var o=this._getBrush(),r=this._getGradient(),s=i+this.option.blurSize,l=document.createElement("canvas");l.width=t,l.height=a;for(var h=l.getContext("2d"),m=e.length,V=0;m>V;++V){var U=e[V],d=U[0],p=U[1],c=U[2],u=Math.min(1,Math.max(c*this.option.valueScale||this.option.minAlpha,this.option.minAlpha));h.globalAlpha=u,h.drawImage(o,d-s,p-s)}for(var y=h.getImageData(0,0,l.width,l.height),g=y.data,m=g.length/4;m--;){var b=4*m+3,u=g[b]/256,f=Math.floor(u*(n-1));g[b-3]=r[4*f],g[b-2]=r[4*f+1],g[b-1]=r[4*f+2],g[b]*=this.option.opacity}return h.putImageData(y,0,0),l},_getBrush:function(){if(!this._brushCanvas){this._brushCanvas=document.createElement("canvas");var e=i+this.option.blurSize,t=2*e;this._brushCanvas.width=t,this._brushCanvas.height=t;var n=this._brushCanvas.getContext("2d");n.shadowOffsetX=t,n.shadowBlur=this.option.blurSize,n.shadowColor="black",n.beginPath(),n.arc(-e,e,i,0,2*Math.PI,!0),n.closePath(),n.fill()}return this._brushCanvas},_getGradient:function(){if(!this._gradientPixels){var e=n,t=document.createElement("canvas");t.width=1,t.height=e;for(var i=t.getContext("2d"),a=i.createLinearGradient(0,0,0,e),o=this.option.gradientColors.length,r=0;o>r;++r)"string"==typeof this.option.gradientColors[r]?a.addColorStop((r+1)/o,this.option.gradientColors[r]):a.addColorStop(this.option.gradientColors[r].offset,this.option.gradientColors[r].color);i.fillStyle=a,i.fillRect(0,0,1,e),this._gradientPixels=i.getImageData(0,0,1,e).data}return this._gradientPixels}},e}),i("echarts/util/mapData/params",["require"],function(e){function t(e){if(!e.UTF8Encoding)return e;for(var t=e.features,n=0;n<t.length;n++)for(var a=t[n],o=a.geometry.coordinates,r=a.geometry.encodeOffsets,s=0;s<o.length;s++){var l=o[s];if("Polygon"===a.geometry.type)o[s]=i(l,r[s]);else if("MultiPolygon"===a.geometry.type)for(var h=0;h<l.length;h++){var m=l[h];l[h]=i(m,r[s][h])}}return e.UTF8Encoding=!1,e}function i(e,t){for(var i=[],n=t[0],a=t[1],o=0;o<e.length;o+=2){var r=e.charCodeAt(o)-64,s=e.charCodeAt(o+1)-64;r=r>>1^-(1&r),s=s>>1^-(1&s),r+=n,s+=a,n=r,a=s,i.push([r/1024,s/1024])}return i}var n={none:{getGeoJson:function(e){e({type:"FeatureCollection",features:[{type:"Feature",geometry:{coordinates:[],encodeOffsets:[],type:"Polygon"},properties:{}}]})}},world:{getGeoJson:function(i){e(["./geoJson/world_geo"],function(e){i(t(e))})}},china:{getGeoJson:function(i){e(["./geoJson/china_geo"],function(e){i(t(e))})}},"å—海诸岛":{textCoord:[126,25],getPath:function(e,t){for(var i=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],n="",a=e[0],o=e[1],r=0,s=i.length;s>r;r++){n+="M "+((i[r][0][0]*t+a).toFixed(2)-0)+" "+((i[r][0][1]*t+o).toFixed(2)-0)+" ";for(var l=1,h=i[r].length;h>l;l++)n+="L "+((i[r][l][0]*t+a).toFixed(2)-0)+" "+((i[r][l][1]*t+o).toFixed(2)-0)+" "}return n+" Z"}},"æ–°ç–†":{getGeoJson:function(i){e(["./geoJson/xin_jiang_geo"],function(e){i(t(e))})}},"西è—":{getGeoJson:function(i){e(["./geoJson/xi_zang_geo"],function(e){i(t(e))})}},"内蒙å¤":{getGeoJson:function(i){e(["./geoJson/nei_meng_gu_geo"],function(e){i(t(e))})}},"é’æµ·":{getGeoJson:function(i){e(["./geoJson/qing_hai_geo"],function(e){i(t(e))})}},"å››å·":{getGeoJson:function(i){e(["./geoJson/si_chuan_geo"],function(e){i(t(e))})}},"黑龙江":{getGeoJson:function(i){e(["./geoJson/hei_long_jiang_geo"],function(e){i(t(e))})}},"甘肃":{getGeoJson:function(i){e(["./geoJson/gan_su_geo"],function(e){i(t(e))})}},"云å—":{getGeoJson:function(i){e(["./geoJson/yun_nan_geo"],function(e){i(t(e))})}},"广西":{getGeoJson:function(i){e(["./geoJson/guang_xi_geo"],function(e){i(t(e))})}},"æ¹–å—":{getGeoJson:function(i){e(["./geoJson/hu_nan_geo"],function(e){i(t(e))})}},"陕西":{getGeoJson:function(i){e(["./geoJson/shan_xi_1_geo"],function(e){i(t(e))})}},"广东":{getGeoJson:function(i){e(["./geoJson/guang_dong_geo"],function(e){i(t(e))})}},"å‰æž—":{getGeoJson:function(i){e(["./geoJson/ji_lin_geo"],function(e){i(t(e))})}},"河北":{getGeoJson:function(i){e(["./geoJson/he_bei_geo"],function(e){i(t(e))})}},"湖北":{getGeoJson:function(i){e(["./geoJson/hu_bei_geo"],function(e){i(t(e))})}},"贵州":{getGeoJson:function(i){e(["./geoJson/gui_zhou_geo"],function(e){i(t(e))})}},"山东":{getGeoJson:function(i){e(["./geoJson/shan_dong_geo"],function(e){i(t(e))})}},"江西":{getGeoJson:function(i){e(["./geoJson/jiang_xi_geo"],function(e){i(t(e))})}},"æ²³å—":{getGeoJson:function(i){e(["./geoJson/he_nan_geo"],function(e){i(t(e))})}},"è¾½å®":{getGeoJson:function(i){e(["./geoJson/liao_ning_geo"],function(e){i(t(e))})}},"山西":{getGeoJson:function(i){e(["./geoJson/shan_xi_2_geo"],function(e){i(t(e))})}},"安徽":{getGeoJson:function(i){e(["./geoJson/an_hui_geo"],function(e){i(t(e))})}},"ç¦å»º":{getGeoJson:function(i){e(["./geoJson/fu_jian_geo"],function(e){i(t(e))})}},"浙江":{getGeoJson:function(i){e(["./geoJson/zhe_jiang_geo"],function(e){i(t(e))})}},"江è‹":{getGeoJson:function(i){e(["./geoJson/jiang_su_geo"],function(e){i(t(e))})}},"é‡åº†":{getGeoJson:function(i){e(["./geoJson/chong_qing_geo"],function(e){i(t(e))})}},"å®å¤":{getGeoJson:function(i){e(["./geoJson/ning_xia_geo"],function(e){i(t(e))})}},"æµ·å—":{getGeoJson:function(i){e(["./geoJson/hai_nan_geo"],function(e){i(t(e))})}},"å°æ¹¾":{getGeoJson:function(i){e(["./geoJson/tai_wan_geo"],function(e){i(t(e))})}},"北京":{getGeoJson:function(i){e(["./geoJson/bei_jing_geo"],function(e){i(t(e))})}},"天津":{getGeoJson:function(i){e(["./geoJson/tian_jin_geo"],function(e){i(t(e))})}},"上海":{getGeoJson:function(i){e(["./geoJson/shang_hai_geo"],function(e){i(t(e))})}},"香港":{getGeoJson:function(i){e(["./geoJson/xiang_gang_geo"],function(e){i(t(e))})}},"澳门":{getGeoJson:function(i){e(["./geoJson/ao_men_geo"],function(e){i(t(e))})}}};return{decode:t,params:n}}),i("echarts/util/mapData/textFixed",[],function(){return{"广东":[0,-10],"香港":[10,10],"澳门":[-10,18],"黑龙江":[0,20],"天津":[5,5],"深圳市":[-35,0],"红河哈尼æ—å½æ—自治州":[0,20],"楚雄å½æ—自治州":[-5,15],"石河å­å¸‚":[-5,5],"五家渠市":[0,-10],"昌å‰å›žæ—自治州":[10,10],"昌江黎æ—自治县":[0,20],"陵水黎æ—自治县":[0,20],"东方市":[0,20],"渭å—市":[0,20]}}),i("echarts/util/mapData/geoCoord",[],function(){return{Russia:[100,60],"United States of America":[-99,38]}}),i("echarts/util/projection/svg",["require","zrender/shape/Path"],function(e){function t(e){return parseFloat(e||0)}function i(e){for(var i=e.firstChild;"svg"!=i.nodeName.toLowerCase()||1!=i.nodeType;)i=i.nextSibling;var n=t(i.getAttribute("x")),a=t(i.getAttribute("y")),o=t(i.getAttribute("width")),r=t(i.getAttribute("height"));return{left:n,top:a,width:o,height:r}}function n(e,t){function i(e){var t=e.tagName;if(m[t]){var o=m[t](e,n);o&&(o.scale=n,o.properties={name:e.getAttribute("name")||""},o.id=e.id,s(o,e),a.push(o))}for(var r=e.childNodes,l=0,h=r.length;h>l;l++)i(r[l])}var n=[t.scale.x,t.scale.y],a=[];return i(e),a}function a(e,t){var i=t instanceof Array?[1*t[0],1*t[1]]:[1*t.x,1*t.y];return[i[0]/e.scale.x,i[1]/e.scale.y]}function o(e,t){var i=t instanceof Array?[1*t[0],1*t[1]]:[1*t.x,1*t.y];return[i[0]*e.scale.x,i[1]*e.scale.y]}function r(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function s(e,t){var i=t.getAttribute("fill"),n=t.getAttribute("stroke"),a=t.getAttribute("stroke-width"),o=t.getAttribute("opacity");i&&"none"!=i?(e.color=i,n?(e.brushType="both",e.strokeColor=n):e.brushType="fill"):n&&"none"!=n&&(e.strokeColor=n,e.brushType="stroke"),a&&"none"!=a&&(e.lineWidth=parseFloat(a)),o&&"none"!=o&&(e.opacity=parseFloat(o))}function l(e){for(var t=r(e).replace(/,/g," ").split(/\s+/),i=[],n=0;n<t.length;){var a=parseFloat(t[n++]),o=parseFloat(t[n++]);i.push([a,o])}return i}var h=e("zrender/shape/Path"),m={path:function(e,t){var i=e.getAttribute("d"),n=h.prototype.getRect({path:i});return{shapeType:"path",path:i,cp:[(n.x+n.width/2)*t[0],(n.y+n.height/2)*t[1]]}},rect:function(e,i){var n=t(e.getAttribute("x")),a=t(e.getAttribute("y")),o=t(e.getAttribute("width")),r=t(e.getAttribute("height"));return{shapeType:"rectangle",x:n,y:a,width:o,height:r,cp:[(n+o/2)*i[0],(a+r/2)*i[1]]}},line:function(e,i){var n=t(e.getAttribute("x1")),a=t(e.getAttribute("y1")),o=t(e.getAttribute("x2")),r=t(e.getAttribute("y2"));return{shapeType:"line",xStart:n,yStart:a,xEnd:o,yEnd:r,cp:[.5*(n+o)*i[0],.5*(a+r)*i[1]]}},circle:function(e,i){var n=t(e.getAttribute("cx")),a=t(e.getAttribute("cy")),o=t(e.getAttribute("r"));return{shapeType:"circle",x:n,y:a,r:o,cp:[n*i[0],a*i[1]]}},ellipse:function(e,t){var i=parseFloat(e.getAttribute("cx")||0),n=parseFloat(e.getAttribute("cy")||0),a=parseFloat(e.getAttribute("rx")||0),o=parseFloat(e.getAttribute("ry")||0);return{shapeType:"ellipse",x:i,y:n,a:a,b:o,cp:[i*t[0],n*t[1]]}},polygon:function(e,t){var i=e.getAttribute("points"),n=[1/0,1/0],a=[-(1/0),-(1/0)];if(i){i=l(i);for(var o=0;o<i.length;o++){var r=i[o];n[0]=Math.min(r[0],n[0]),n[1]=Math.min(r[1],n[1]),a[0]=Math.max(r[0],a[0]),a[1]=Math.max(r[1],a[1])}return{shapeType:"polygon",pointList:i,cp:[(n[0]+a[0])/2*t[0],(n[1]+a[1])/2*t[0]]}}},polyline:function(e,t){var i=m.polygon(e,t);return i}};return{getBbox:i,geoJson2Path:n,pos2geo:a,geo2pos:o}}),i("echarts/util/projection/normal",[],function(){function e(e,i){return i=i||{},e.srcSize||t(e,i),e.srcSize}function t(e,t){t=t||{},r.xmin=360,r.xmax=-360,r.ymin=180,r.ymax=-180;for(var i,n,a=e.features,o=0,s=a.length;s>o;o++)if(n=a[o],!n.properties.name||!t[n.properties.name])switch(n.type){case"Feature":r[n.geometry.type](n.geometry.coordinates);break;case"GeometryCollection":i=n.geometries;for(var l=0,h=i.length;h>l;l++)r[i[l].type](i[l].coordinates)}return e.srcSize={left:1*r.xmin.toFixed(4),top:1*r.ymin.toFixed(4),width:1*(r.xmax-r.xmin).toFixed(4),height:1*(r.ymax-r.ymin).toFixed(4)},e}function i(e,i,n){function a(e,t){c=e.type,u=e.coordinates,o._bbox={xmin:360,xmax:-360,ymin:180,ymax:-180},y=o[c](u),m.push({path:y,cp:o.makePoint(t.properties.cp?t.properties.cp:[(o._bbox.xmin+o._bbox.xmax)/2,(o._bbox.ymin+o._bbox.ymax)/2]),properties:t.properties,id:t.id})}n=n||{},o.scale=null,o.offset=null,e.srcSize||t(e,n),i.offset={x:e.srcSize.left,y:e.srcSize.top,left:i.OffsetLeft||0,top:i.OffsetTop||0},o.scale=i.scale,o.offset=i.offset;for(var r,s,l,h=e.features,m=[],V=0,U=h.length;U>V;V++)if(l=h[V],!l.properties.name||!n[l.properties.name])if("Feature"==l.type)a(l.geometry,l);else if("GeometryCollection"==l.type){r=l.geometries;for(var d=0,p=r.length;p>d;d++)s=r[d],a(s,s)}var c,u,y;return m}function n(e,t){var i,n;return t instanceof Array?(i=1*t[0],n=1*t[1]):(i=1*t.x,n=1*t.y),i=i/e.scale.x+e.offset.x-168.5,i=i>180?i-360:i,n=90-(n/e.scale.y+e.offset.y),[i,n]}function a(e,t){return o.offset=e.offset,o.scale=e.scale,o.makePoint(t instanceof Array?[1*t[0],1*t[1]]:[1*t.x,1*t.y])}var o={formatPoint:function(e){return[(e[0]<-168.5&&e[1]>63.8?e[0]+360:e[0])+168.5,90-e[1]]},makePoint:function(e){var t=this,i=t.formatPoint(e);t._bbox.xmin>e[0]&&(t._bbox.xmin=e[0]),t._bbox.xmax<e[0]&&(t._bbox.xmax=e[0]),t._bbox.ymin>e[1]&&(t._bbox.ymin=e[1]),t._bbox.ymax<e[1]&&(t._bbox.ymax=e[1]);var n=(i[0]-o.offset.x)*o.scale.x+o.offset.left,a=(i[1]-o.offset.y)*o.scale.y+o.offset.top;return[n,a]},Point:function(e){return e=this.makePoint(e),e.join(",")},LineString:function(e){for(var t,i="",n=0,a=e.length;a>n;n++)t=o.makePoint(e[n]),i=0===n?"M"+t.join(","):i+"L"+t.join(",");return i},Polygon:function(e){for(var t="",i=0,n=e.length;n>i;i++)t=t+o.LineString(e[i])+"z";return t},MultiPoint:function(e){for(var t=[],i=0,n=e.length;n>i;i++)t.push(o.Point(e[i]));return t},MultiLineString:function(e){for(var t="",i=0,n=e.length;n>i;i++)t+=o.LineString(e[i]);return t},MultiPolygon:function(e){for(var t="",i=0,n=e.length;n>i;i++)t+=o.Polygon(e[i]);return t}},r={formatPoint:o.formatPoint,makePoint:function(e){var t=this,i=t.formatPoint(e),n=i[0],a=i[1];t.xmin>n&&(t.xmin=n),t.xmax<n&&(t.xmax=n),t.ymin>a&&(t.ymin=a),t.ymax<a&&(t.ymax=a)},Point:function(e){this.makePoint(e)},LineString:function(e){for(var t=0,i=e.length;i>t;t++)this.makePoint(e[t])},Polygon:function(e){for(var t=0,i=e.length;i>t;t++)this.LineString(e[t])},MultiPoint:function(e){for(var t=0,i=e.length;i>t;t++)this.Point(e[t])},MultiLineString:function(e){for(var t=0,i=e.length;i>t;t++)this.LineString(e[t])},MultiPolygon:function(e){for(var t=0,i=e.length;i>t;t++)this.Polygon(e[t])}};return{getBbox:e,geoJson2Path:i,pos2geo:n,geo2pos:a}}),i("echarts/util/mapData/geoJson/an_hui_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"3415",properties:{name:"六安市",cp:[116.3123,31.8329],childNum:6},geometry:{type:"Polygon",coordinates:["@@„„nJ‚UXUVƒ°U„ÑnU@mlLVaVln@@bn@VU@xlb@lšLnKlšƒVI„JšUVxnI@lVL@b„Ž°VX@˜b„x„nVVUnVVnU‚›@kX@VwV@„alÂ¥UUnUWa@ƒ@wĸU„LUÂ¥lKUa@aUI@alLVaUƒ¯anƒWkUKm@XÂV@VaXÂlW@aU_UWVUƒI¯@ma¯W¯™™I@UU@WWU@U@@UU@VkV@@WUUm@UaU@„ÂlK@IUK„L@KWmXUWaXI@ƒ@a@a@U@U@KVÂ¥lw„k°b²JVIVKlV@UX„la„Ul`ÂœUVLVVVUšJ„U@Lnm@_VK@KUIW@™J@Xk@WW@U—ƒmÂm™XmWk@ÂkK@aUUƒVmmkÂUwUmWL™ÂÂ@WmU@™ÂUJmUULkKWakLWVkIƒlƒwULƒW@X°lÂUJ@°ULƒÂWV—wmJ@bmb¯VkÂm@@WÂkWm¯wƒL@lkXƒWmXÂym¯UImJUbkV™@Vn¯„@V@lUbƒ@mkÂ@maUxmlUbULWn@J—LmKUkWKkwUKƒbm„X„WxkVUKmLkVVÂ@JUUWL@xkJUUƒV@X@VVlUbVX@xk¤šx‚¼œxWxn„‚nn@Þ¼„JVb°aVn„@šmlnXU„JlbVlkz@‚lÂUÂŽlÂXJmxVxXnWxXÈWlUÂŽ@šUxU@VX@xUL@šUÆmLnV@lWXk@@JlbXblnlJ"],encodeOffsets:[[118710,33351]]}},{type:"Feature",id:"3408",properties:{name:"安庆市",cp:[116.7517,30.5255],childNum:9},geometry:{type:"Polygon",coordinates:["@@n°‚znW„XlW@k„K°xXn‚l@Xn@l‚°Una@anI˜xXU„ŽVK@¯VIkÂW¯X@‚„VK„x„klJXUlKXblLVKnVVIšŽV@Xn‚@šŽXKVnVxlÂŽnn„UlmV@²óUkV™lW„b„Âlƒšƒn@VVVIn@lw@WVIXblV„@Èx‚aUaVIVVnKVLšK„ƒln@b²K@»U£ƒÑķƒġÃÃ…b™K™a@Im@Û„Â@kWÓkkmKÃ…nóJƒUÅ£›W@w„ĕ@wĉţ¯¯ƒUkK±l¯UĴUÑkÂÃUķ»Ã¥¯Â™JƒIUÂŽVbUl¯ÈV¼VJU¼Vb@bkLUl@„VJ@bUXǚ@lkVmXmKkLVxš‚Ž„VƒL@VkVVÂVlÂzW˜kbmLUUUbVbUV™šlÃ’nJlUnLllUL@bU„Vx„l‚LXVƦÈVU¦WJ"],encodeOffsets:[[118834,31759]]}},{type:"Feature",id:"3411",properties:{name:"æ»å·žå¸‚",cp:[118.1909,32.536],childNum:7},geometry:{type:"Polygon",coordinates:["@@š„@`nnl@„xšK@X°KXV˜IXVlbXVWnX‚lL@šÈ»‚LVan@VJ„êVVn@‚ÂX@laÞbVaƒyn@„_‚xnWVXnWl@VnUVkI@l‚nXKVLVV@V@ÂkW@LlVô„@J@bVnnKnkVa@»lç@ƒnwšKma™UUUVњ@n™mWXalI@alVn@VwUaVU„@„nlaôJnU„VVXlJšaXXVK@UšV@VWx@nXVWšXVšUlLUbV‚ULVVnUVbUbVbš@@a„KÆnnKVK@U@UU@@a„@Vƒ°¯ÈJVIlÄ·@aÂa˜ÂUaVKU_@mkxUI@aƒUlyU@@™wkKWmUbUnUVWbkJW_ÂJ@bƒn@Vm@@KULk@V@@bVbÃ…m@LW@UVVbkK@UkKWL@VULUKWIUJUbkK@_WVXU›Jka@XƒVÂa@kšy@aVIUUW@@m„UlLÂœKWÑUKVan@UkVmmIXKƒaVaUwVU@UmykU¯@±UUL@WUIVÂUU@KkIWaƒaU@kUUaǃUÂó»mKƒk¯@Ây@kWK@bkI¯`mn™l¯XWlkVUzUJlbUbVJl@nnm„@VULV`XnWƗbmUUn™JmUknƒJ¯km@ƒyk@kU›xÂL@VUbmnn¤lX@`™z@JmaULUVl@Xn@xllkXWa—aW@UVmUÂbƒ@mVXšWxXbWbUŽƒÒnVVnVVUL"],encodeOffsets:[[120004,33520]]}},{type:"Feature",id:"3418",properties:{name:"宣城市",cp:[118.8062,30.6244],childNum:7},geometry:{type:"Polygon",coordinates:["@@Vb@„XL˜JXxlIXxlVlV@I²¤šnlUnVšU@VULWVUJ@Lnb@lV@UnV@@VVVlLnbnJ‚UVkUUVWn@@anUVnVJVIV‚Â@@nUJVbUb‚„@VUbVK@bn@VbnIlxkllXVlXKWUXUlL°¤UVVb@bš„UlkXW‚ƒxXz@‚„Ila„UlƒnUlJVInVÆJ„U„LVUnV„K°@VnlVnxV@XLlK@wVL@KnUlJXU˜bnKVLX„lÂUw@ÂVWlLXKm@@a„@VLnmlIVVnKn@škVašVlwk@@a@k@ƒVIUa™Â@ÂmaUa@wna@kmWĪUUmVUIVǗÂ@aƒKm™aĪkU™J@InÂmUUaVa„k‚lX@Vk@m@ÂVU@wnK@alKVUkUkKƒbmUkmƒ@U£WVk@@UÃbÂbƒaÇx@bÂ@WVUa¯ƒ@wVwUUV@VwnK@KWaÃ…Â@KšIUyUI@WmXó™UbWaÂKm™@km@IUyƒIUaWKƒx@zUKUL@llVUnkLVVkJWX@VUKUVƒIkVWakb@VWb@n@JkXUlmL@xkL@`VxšLUÈUJ@Vm@@bmIUlUL@VUVVbknm@mKUw™KVÈ@J@LÂV±kkJUIƒl"],encodeOffsets:[[120803,31247]]}},{type:"Feature",id:"3412",properties:{name:"阜阳市",cp:[115.7629,32.9919],childNum:6},geometry:{type:"Polygon",coordinates:["@@V™nƒš@ša„k°aš±@‚¥@UUI@aUmlwUUÂx›b@Â¥XU@mmI@a@Kn@@_W@@W„I@mšUVVXUl@XaV@‚K@I@a„LXÂ@aVI°K@KVL„UUw‚yXkšK@kšKÆbXnlK@k@a„JlU@w@U@»@aXKWƒn_‚JXkVKnƒ@°LlKXƒW@¯UƒÂ@aUK@kmJUw™VƒIUJ™„kÂŽmL™K@kka@wUVm@@am@UkUbkK@nmVƒÒ¯VU„WVÂVmIƒƒULk@ƒƒma@kkKƒƒ@nUbUamU™`UUVUkKVkkƒW@@bkmƒnƒmUXVKXVƒL@VƒbU„m‚™bVXÂJ@nmKÃ…I@KWKUXVJUL@VUKUX@KUKWL@LUJmaXXm@kVVV@L@VUL@VlK@L@V@LUK@VUb@UUU@°@nVxU`‚Lkn@`@XVJ@X™Vm„k@UKmV¯LVVÂn±WÂÂm@Ub@JlLUl„@VLk„@lmVVn@bnV@V°IV™šaVJXI°K°V@XXVlVVU„nšKVlUš„bWXnV@bV`U„„@@Âm@@‚ƒ@nxmn@bXVlL@¤nb„Ul¦šVVUnJVU„Vl@@bÞL"],encodeOffsets:[[118418,34392]]}},{type:"Feature",id:"3413",properties:{name:"宿州市",cp:[117.5208,33.6841],childNum:5},geometry:{type:"Polygon",coordinates:["@@@UWU@bkW@aWU@aUIkWV™lLXb„lVIUVV@‚mn@V_n@VaUK@I‚@UašanJVU„@lV„UVnnKVVlaUa„I@wnK‚Lnll@nVlk@wVKXkl@@b„bUJ@V‚U@U„UUyVk@aVUXwlWXX‚WU¹@aU™@WUI@mlUšn„J@Il@šaXbV@VKl@XxVL@W„IšJlb„@„al@„IUUm@@aVK@¥¯—@mUķ¯bWƒk£Vm@aÂkm@VaÃ…@UVWaƒ@UÂÂJWkƒJ—UƒbWbU@UlƒXk@ƒamV@K¯nk@ƒlU@Uxmz@bU`ÇbUbÃ…Vm£U@Ww™x@akLUK@UlakwUJWVkLmaUal@n_ƒmVUnKVUUmÃ…XWa™@kJmx@XUJ@bVLXxl@VVUVV„UbkLWbU@@lUVV„VVX„›K@XkJ@nU@@bV@VxUVlb„U@xXLWÂŽn@UxVbVĊ„V@b@XV`mnkJ@kUKmbƒaU@VbnbÆx@XU@@`k@@bl„™@@bkL@WƒakXWaU@Vmkx@XWW@Â@wUUUbƒJ™U¯V™@¯ÞU@WxXÂŽlL@bkb@ÂŽlVlnÂb™JW@kkU@mbkaWJ—IVlmz¯`UnU@mb™@@„ƒ`@bkVlÂœnV@b@šV@„aVxn@Vx‚KXnl@nbVK„bVK@a„_V@Vƒ„w@W„LlwnK@UmIU@VWš@šUÈ@lKnal„wš@@V°@šaUmlUUw@„ƒV@@UXK"],encodeOffsets:[[119836,35061]]}},{type:"Feature",id:"3410",properties:{name:"黄山市",cp:[118.0481,29.9542],childNum:5},geometry:{type:"Polygon",coordinates:["@@lXnlWX@VUJVnUJVzXJVx„kVJlI²l‚U@K@IUǚLVxnLn@lmUaVU@UVKVknJ@an@@UVIVǙKUw@_lK@wnKVklW@I@mXa@UlaXblU„JVUVL@UXWlIUUlKVmkU@kVKVL@y„wXLVb„JVz@Jlnš@nŽ‚LXbVaôšnW@Âla@UVWUa@Â@a@mk@WIk@VwUa¯¥m@UUVK@ImK@aX£ƒÂkK݁ÂV™a™™ƒ_@±ƒakXWW—LƒƒƒnU@@a@¯mK@L™JÂUWwUV™VmbXX@lWLn`mzUJUb™Lƒ„k@makVWmkX™ambkKknƒaƒ@ƒaƒb@‚U@Unm@—ƒWVƒ@ÂÂVbUbUJWIk@@lmL@°UVUVm„nš™@@kmWkb@xƒ_m@@aU@Âb@JlÂŽUz™lWxXn„@‚b²@l`„IVl„UlL@VšK„nVbUl@VlIn@@b„bVWUk‚@@bX@Valb@bnb°Vn@„xVKlbVnÂV@V‚x„L@ln@UXVV‚L˜"],encodeOffsets:[[120747,31095]]}},{type:"Feature",id:"3414",properties:{name:"巢湖市",cp:[117.7734,31.4978],childNum:5},geometry:{type:"Polygon",coordinates:["@@VV@blL@ÂŽXlWnnšnŽ˜„@VXXl@@WšIX@VJ@LšxÅŽxlnšŽ@bXJVblX@VVbUVn@VbUVlb@LnJVbVLV‚XLšÒVL„ÒšV„bVIVylUXk°Wšknm°_lJ@aXL@l‚z°@„lnLô¼V‚È„VUUaVKUÂ@WW@@UUa@knmVLlaV@„a@kšak±@UmwkKmk™lj™ÃUUkL@mlIVmnÃWkkUÃ@ÂKƑĉ™a@»ƒmmaÂ@mX™¤¯Uƒw@ƒ@ÂUU@bU±±L@akmƒ„™LUKmLUUUJVbÂbÇwƒ@kUWaUJ@Xkxm@UJUUm@™„k„ƒ‚ƒakXUšVl±ôU@kn"],encodeOffsets:[[119847,32007]]}},{type:"Feature",id:"3416",properties:{name:"亳州市",cp:[116.1914,33.4698],childNum:4},geometry:{type:"Polygon",coordinates:["@@lU@Un@@anUlw@KVmUwlaX_lKna@KU@@kWKUU@ankW™XK˜@@V²VVIÈU@al@VaÈamK@wU™@klaUƒV@XƒVUU»WUUbkmUkVÂmk@aÈw@mWU@VkIkVWKUÑķXȭºU¯lƒ@kkLWmÃ…a™L@l™LWlÂzVxƒVUK@L¯LUJ@bWƒK@b@JÂLU@Wbk@WVUU™V@nƒJ@XX@@`m@@L@bnJ@nWV@¦œa‚wVVkxVn@bVJ@V¦@Ž™²¯bƒl™b™@m„UšUŽƒŽ@¼ƒ¦Xb‚UV`@nnxUxWLkUkVWKkV@XV@@VVL@VX„@lVV@L@blL@`šL@xXKVL‚@„VnUš@lwnU@ml@XnV@@UVW°LnalƒUI@aUK@a‚a@U„kXW@I@mWL@UXK@UVW@U‚@@k„Wn‚@@V„@XblaVxšL@bVKXb„IlJ"],encodeOffsets:[[119183,34594]]}},{type:"Feature",id:"3417",properties:{name:"池州市",cp:[117.3889,30.2014],childNum:4},geometry:{type:"Polygon",coordinates:["@@„V°°ĊŤ@xƒĖ@xÂœXƤ„VôIÆmnLllXÔ@lƒÂ܎n@@JšbšLÆaĢÞĸ„°VVUUKVanK@UV@VL„VVn„ln@‚xnklxXamk@WV@Xa˜@naVk„KlÂk™@mkUWwkJWw—IWK@ƒUaUwWIUyVIUmVI@UXWmkkW‚—ÂKUUVWm@@kƒKÂw@U‚UUmkaULƒwm@¯Uma@akaUbW@@aÂ@VlUXƒa@am@kJ@UVkUaƒm™L@UkKƒVUkƒJk_±@Âaƒ@WmXwÇkkaVaUa±ƒœwV@VkƒwnyUaW@UU¯amLk@m™@kmmU™™¯K@L@lUX¯ƒWlkXƒŽVb„bƒVUL@J@LVKnÂlJXnlb@`nXlalV@bnL@Vnb˜¼@lXbWlkL™K@zUJmIUxUVUVmX","@@llUL@VlxšL@a@UƒwXa¯@"],encodeOffsets:[[119543,30781],[120061,31152]]}},{type:"Feature",id:"3401",properties:{name:"åˆè‚¥å¸‚",cp:[117.29,32.0581],childNum:4},geometry:{type:"Polygon",coordinates:["@@„L„xV‚ĊLÞkšVlVVÂXaWaXwW™nU„@‚anVVUX@˜bXblWkk@wWmk@VUVKnb@Išy@_kWm£nmVa@U‚KÂœwlVl@„zn@°l„IlmnVšIVmnV˜aXÃ…WmU_VK@Unƒmmk@UIVakaƒa™UĄUK™ÑWKUÂUKUamI@KkaVUUam@VUUa@UkWUaWI@a™ÂkmÅw™wUL@`mn@KƒV™IUVUUUK›Vk_ƒVkbWƒ@VkUULUJ±I¯aƒlkxU¦@L@V@V@b@b@„WJXbWVXn@LƒKVL@JkLƒŽV@Vbn@VV@XU@UlV@@VV@V@XXV@@VšJ°š°Xnb°@„JUVVXV`@bkXWÂŽUbU@WÂŽn@VLXlm„°bV„UbkK@bVJ@bVbkLV¦ƒKÄ·V@x@„XbmVVVk¦"],encodeOffsets:[[119678,33323]]}},{type:"Feature",id:"3403",properties:{name:"蚌埠市",cp:[117.4109,33.1073],childNum:4},geometry:{type:"Polygon",coordinates:["@@VÃ’XLlUlJ@UXV@nÇx@bnlUÂVllnVaXVV¼UVW„U@V„²wVV@Vl@„VnwlIš@XbÆWVnUVmLUV„nm`k@VbnblKXUVIlxkb@VVLlK@bšwXxV@n¤ÆUVaÈaV_@anyVwV@„kl@°m@LnU„bl@„WVkV@Xa„a˜V„IXl‚IV‚„@XbVUÆ@XKWwUkmW@_UmnIlJXkWKXmV@‚w@_XV@Kl@kU@KlX@Â@UUUUKWLÂm@klJVUUmk@mXUWmXÂwƒ`m@„zUbÃakbW@ÂÂm@UUĎUIm@UbÂKǼ@™kKWÂXmWUkaWU—JWU¯L@W™Lƒwk@mm@_™ƒÅl™UVkmWUnÂV@VWLUb™bƑĬ¯l"],encodeOffsets:[[119543,33722]]}},{type:"Feature",id:"3402",properties:{name:"芜湖市",cp:[118.3557,31.0858],childNum:4},geometry:{type:"Polygon",coordinates:["@@„bVaV@XllLXU°ŽlL@V@VUnVl¯Ikš›VUVU@@b@lUXUWmb„n@¼šbƒĊ‚LÞ@lVXlmÞUnkJ@nlKVVšÞXklWVaVI@aUKn»lL@Kn@‚XXwlm@mn°@„V@ÂWy„wXÂlWVk™ƒ@aUaVU¯£kKWVXVWLUkkWlkkwmJUam@@aULVa@UƒVaUaVI@m‚@UÂUJUIUmmV@bm@UXVVUlÂVmImakKUU@UU@VmU@@kma@KVIXUVK@U™VmUkV™m±£@JkU@nlšk‚ƒLUlmb—@WbU@@XnlWb"],encodeOffsets:[[120814,31585]]}},{type:"Feature",id:"3406",properties:{name:"淮北市",cp:[116.6968,33.6896],childNum:3},geometry:{type:"MultiPolygon",coordinates:[["@@lnnK@¦n@@V‚V„@@VV@nIV„V@VW²a@b@bVnUVVV@V™z@lš@°UšV„IVaVV@x@ÂŽXX@WlwUnV@XblW„b@XlK@aš@kƒ@al@@_V@@WÃ…wmaUaV@„bnaVL@llInmU_@W@aƒUUĉUaVwm@XÂWK@wƒVkaVUUwU@@aV@@mlI@WÂœLWƒUUUƒVU@kV@XalKVaUƒVUUUk@WwUK@aVI@WƒUk@@UUU±xkb@lVš@xnLÇbUbk@@bÇVUJ±U@U—@WLXšml@bVVXL@lV@@LmbkLW`kbVxUn@LkxmV@bm@@VkV"],["@@VVVkV@ÂÂ¥@UV@U@VUUJƒkWakKUšlXVJ@bXV@blX@aXV@V"]],encodeOffsets:[[[119183,34594]],[[119836,35061]]]}},{type:"Feature",id:"3404",properties:{name:"æ·®å—市",cp:[116.7847,32.7722],childNum:2},geometry:{type:"Polygon",coordinates:["@@°kƒīšaVaXK@U‚UVmnXUlšVÆkVKUUUmmU„ÑkU™UÃlĉKUƒwƒKƒbU@UxW@@lÂÂœmVUUVmUUƒmƒw—aW„kL¯K@ÂŽm„ULWlÂIm`X„WL@b@¼@V@xkVƒI@b@l@lk„V°Ȯ¹ĸW"],encodeOffsets:[[119543,33722]]}},{type:"Feature",id:"3405",properties:{name:"马éžå±±å¸‚",cp:[118.6304,31.5363],childNum:2},geometry:{type:"Polygon",coordinates:["@@šNJnllLnxV@laXLVKma„aXbVI„bVKVVVIVyn@n_ƒƒW@@ƒ„UnJlUVVXÂlLnaUWlÂV@VV„IXW@_W@XK@K@UVUUwVamÑXmmwƒw™KUnUK™çU@ƒJƒU¯@mÂŽ@nknWxÂWm@@LkKm¼VL@bUJUbkXWl"],encodeOffsets:[[121219,32288]]}},{type:"Feature",id:"3407",properties:{name:"铜陵市",cp:[117.9382,30.9375],childNum:3},geometry:{type:"MultiPolygon",coordinates:[["@@„ÒV¤@¼V²@aVV@ÂŽ@„„x°Vš£nW‚@nbnaVXVW@k@aV@VUÂœUl™°JUkVm@U@UkK¯ÂWVkKWkU@UbƒakwmlÂwm@ƒkUmƒUUKU@@VmLUbVLUV¯U"],["@@ÂLllUL@VlxšL@a@UƒwXamK"]],encodeOffsets:[[[120522,31529]],[[120094,31146]]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/ao_men_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"8200",properties:{name:"澳门",cp:[113.5715,22.1583],childNum:1},geometry:{type:"Polygon",coordinates:["@@HQFMDIDGBI@E@EEKEGCEIGGEKEMGSEU@CBEDAJAP@F@LBT@JCHMPOdADCFADAB@LFLDFFP@DAB@@AF@D@B@@FBD@FADHBBHAD@FAJ@JEDCJI`gFIJW"],encodeOffsets:[[116325,22699]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/bei_jing_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"110228",properties:{name:"密云县",cp:[117.0923,40.5121],childNum:1},geometry:{type:"Polygon",coordinates:["@@vIHZDZQtDLNMXIbHRCXXITbJ@H`LGPRDDJNCLHTOCWFGvGBUJMKGFO^IHWXITQCIÂ’Y^AXGfRˆDXF`DJOLB~G\\DZIHHpErUVMhHb]\\M†BVF@FTP`@zTbD\\@~M\\K`H^EVODWICAakAQXoIcCOCIgGYNWFWNGGKKGaJEGMEIKYJUT_J_Go@_SyQaSFMEGTcYOQLIIi@EKAUPCV[EEXQCW|aMUMAaYCYNIDGGACIMGGSKDQGaF_C[GaB@GOIiOKAYL“mI@CN]F[SWWAcKKI@HMUimEKbeYQYISNUOcBKPIFBNgvDPGZYFSf]CMSIWGEUFgDIQ[MeDMJS@RR@LphFPCHaBAJKF@J]IBJO@HlO@@RKAMPJHCNDJTHFP@ZGNANBRFH@J_fM^ONJNF\\VTDJHDON@XÂRND\\XRCPVETCLBVKDFJINHRGPRV@\\CLJN@VbXbLVT"],encodeOffsets:[[119561,41684]]}},{type:"Feature",id:"110116",properties:{name:"怀柔区",cp:[116.6377,40.6219],childNum:1},geometry:{type:"Polygon",coordinates:["@@JHTVHXCHPfnDJGHNDJSB[JSBGVSAOH@PMPuDEHHXZN@PHF@ZLJ@LHVYJA\\OFWP]BMtMBSRGV[JeVAPQVIFENMD¡–@^NV\\JH@NNL@NM\\kTQ\\I^FNIpBHGTBFFAZQfKDIXQTLXFXNNVMVHRGpCFLlRLEVBBH`IVO\\G`RDPAXLXBXORHZEHTDLLN@VGTMrQNFPeASKG@GMOAKBYMK@GTUHUXSHMVDNMOUEOZMJML@^KRACMZEZMRQLUHE@OFENPR@DI\\ChMHIDG\\GJMDWHCKGMDCIQCHO_K@GaIJSWWQDaGWJMNCKRsCYGYuJUSaKaW@UIMDK@[QUHOGQJMEILCAUDKFSOUQD[WMC‚Q@WPMGCCIUSE[IMPMN]`e@IEGAQBMHM@YEOSGCIDMIGNOLB@QP@GkP@AI^J@ILEBIbADGEOog@KQQWSekWQQUOFKZLF@PUNmIaHIUeBCTSHENcJa@_IWSaGu`GLSBKJQFOXGDXVQVOBIHcDSJWBEFGTMH[^mLaXcHiKElTRKtFXZ`MHMPCNRDxZˆB\\ICIHK@KÂŽHbIVFZ@BPnGTGbDXRDJaZKRiGEFSFEJhjFNZFjn"],encodeOffsets:[[119314,41552]]}},{type:"Feature",id:"110111",properties:{name:"房山区",cp:[115.8453,39.7163],childNum:1},geometry:{type:"Polygon",coordinates:["@@h@bl@HRJDZ``TA\\VVD^H`\\pF\\JÂŒ`JGv@ZO\\GPSTEjPTR`FnEbDTDHEhLFMTK@ETSPULKEI@OVISKSJACEQNQbV˜IXGDIN@dMB[IIBcN]ZHNLP@XOWCFWŠCNRHTpATD@^NVNLED@Rh@jCEF}E[OOHUEW]W@QGGDIQSH_MmFmCUT_K]i@MHÂCMW—FCF‹E{BMHMPOHKS]CFNGBELDH_@BcAKOACESAOBELaXAROB@FODMEDWJAG[aE@UM@DImEWJMC@OeCA{aE[@{L@MINUCQXKfUJORCHqJBF@TCXWNQX]M[EAJO@@KMBQJIC]EWMCCUBEBFHKDOTMBGNGF]MWDBRDdMDQVyE@LPVHDCP@JVVMTG~HNSH[CmRUvHPHBbA\\PTNRC\\YNJ€PRARPJDDR"],encodeOffsets:[[118343,40770]]}},{type:"Feature",id:"110229",properties:{name:"延庆县",cp:[116.1543,40.5286],childNum:1},geometry:{type:"Polygon",coordinates:["@@^AXOPEB[ZIGU@KKI@YGE@OYMGWFGvCNO@OPGTBHUTA\\ITACIGMIHmCOeDGGWSUIGimYEEMgiFITEFEjHLQbYCIWQaCSHmHAOY@UEaJÂG@LGLDJ[J‡AwYQCDMNONGY_EWLsSQFkMO[NWAIGaIYL@HMBOKiOQDWEUDMQSF_QIUBWdg@[NaAKQ@M]OQ@WhgLUMMFYQDIRCEUZOOCIOJ[KIUMKL@HIDKVEBM`HJAJSJUdBLGNEdMBMO[BYEWJSNKNaD]PE\\SjOT_RQVEZPpƒNQXfŠNA~lNG`@PNLp¼RFLfbdKbATUh@FSNWjGFZVLFHVA~X¨PPROfFJbNJPLFbENJPrEFNPFRHDDJdENJLVEPBJTVTHGHFRFH@PXP\\ORQHW\\BjWFDERLPPBbB\\E`B\\D\\L`@F]FCnJ^AZL"],encodeOffsets:[[119262,41751]]}},{type:"Feature",id:"110109",properties:{name:"门头沟区",cp:[115.8,39.9957],childNum:1},geometry:{type:"Polygon",coordinates:["@@V@XMnGPY²‰JQNEhH\\AZMPDVTTDZCPiJkHSHCjIdFtEHITCNITQEKUAMCEIKCECABYESKFWAKBEIIHABGDCKCAIHMHALKEI\\CFIBILIJQZS]BBEECS@E@@C]COKI@CABAAEEDMGƒCH]A[M@CJWH—JaUMRFRBDTITLUJ@PFJKLOVST@FSLENgKGFSCaCmF_ESQiOSFOT[HYPu@IH‹_[IoE_[]GUC[USB__CYQI@Gakg@qZeHQNMNV\\FVLPgJAFJPRLCH[XcPELUT[JiV_EELFTADBXRTRLJC@fHXHHbPd`fR@NfT`@TLplHMpCEJHJBVLFÂŽ@JT‚VnG^KXDXHNVGRLRXFJVdDHSNWLGfEzA"],encodeOffsets:[[118635,41113]]}},{type:"Feature",id:"110114",properties:{name:"昌平区",cp:[116.1777,40.2134],childNum:1},geometry:{type:"Polygon",coordinates:["@@VNLJI\\JPPDYPFVQDCJZRNEVNhKXgR@^P@NLRbB\\Mh@XcVARJE`RTCNFV€XRCjPPLNA@GZKbJJHXB\\MNPjLdGbWnK\\]NGHSFEXATIdCJGPARUWUHCPWRELITAHKv_E@iYCaW_BQ\\Y@QIO@QDCIGZCEMWGFMFAFgHEDOCSqKCCFGAMKEAC@ODGCGs@WH@KQA@EE@CE@GEA@EH@GGUEEJEAYD@JM@@DAA@FHD@FTJEHUC@JUBKCKG@G[CIIQReAYhO@OXGDO@@FF@IHJFCPEBACBIAAKDOABXARHPÂNEHGbQAAKQFGIAM[C@WHKaGiCEGOA‹HUKCIokSCUSOCYN[BgGMFIR±ŠOZmHWNU@ShbbXDHVXXGJ^lZ@PZ\\Nb@\\FHJAD"],
+encodeOffsets:[[118750,41232]]}},{type:"Feature",id:"110115",properties:{name:"大兴区",cp:[116.4716,39.6352],childNum:1},geometry:{type:"Polygon",coordinates:["@@F\\E~DFN@BDFEpHFCHBBEGCDCJBHUDSBB@ELCPbF@B\\J@BJVAFJ\\ADKTCBGECFMT@BMN@@FH@DaNBEnvB@FPBATK@FHEFIAKFBFL@@PKBFJHC@FXBRAFCDMPDTOL@JIVFDHH@DDH@BGRFCDLD@N^@@CNA@KNOAEBCECFEGCFGMGFIPMOEJOLBADBBHGG@GCHIECY@INC@DMGS\\AIOZAAEYA@GT@KKMBEETCGMVINFxA@MJADB@FlA@HJA@NND@DFA@DVAZBBOFKH_JA@K^GBC@EFE„G@gAENMXKJigC@IbSJMqGOP£RGSMGE@kbQFDPEFiBSGGSBK]I{CDWCIDOic[C_G@SuSO@EWKCO@MNY@\\uZOPENQD[LKESSKGBKEG@EJGAGHoHÂ¥CqhifeJkX_XFFGHFNEDFPENKHM^IFIVL^S`DVEnNnG`RTCJHH@R^XFXGVPP"],encodeOffsets:[[119042,40704]]}},{type:"Feature",id:"110113",properties:{name:"顺义区",cp:[116.7242,40.1619],childNum:1},geometry:{type:"Polygon",coordinates:["@@EhEBENXHFNYDJHCD@RJP@R[ZARX`DbjZF@bHXT`Jb@dIFMTGDSfAJVbGnJVM@OKELYPERVXRflXTT@NIfC\\NJRhCVEHFJXNT^DTeZEHYCOhuAMJELOdAVPTMOWBWNMNEJgl]@WGUFIC[T{EEDEHGCIGMI@SECUQI[D{A{GQESPUH]CsiMCmHUeoHENcAaDGCMDGMQCACCBaCGLMAHB@DIEQLOAAEEJ@CW@CDINGAAGKQOCgV@LG@BEGDKNeREFBNCFIDOPKD[@YRW@GFWDAFE@EHDDrLDTCPGF","@@KrJEH[\\B@FF@CHFBHUN‹AJKADGECBCMAG^E@EbI@BEGP"],encodeOffsets:[[119283,41084],[119377,41046]]}},{type:"Feature",id:"110117",properties:{name:"平谷区",cp:[117.1706,40.2052],childNum:1},geometry:{type:"Polygon",coordinates:["@@ZJZRafFLjn€VGNJ@LLBdXX\\T^EDMJ@”nZKLBjPPJ@HbA\\H`DbERHLCFK^BZaFWXQLAGMHa\\OLO@SBIpBdCLƒVQfElO@GSAKEDQTC@GEBKG@ORIJBDAPDFA@CaOq@GGQAAEJK@KMUGAAGEAa@MGMBGCGSIIW@WSUCMDOJeWOM@IUF{WMWaDIMgIoRoCOKeEOEAG_I[cg@wLIFENQFDVTFJ@HNDJGHCFFFS|D\\EJHV@Xk^IhMFMNAXPX"],encodeOffsets:[[119748,41190]]}},{type:"Feature",id:"110112",properties:{name:"通州区",cp:[116.7297,39.8131],childNum:1},geometry:{type:"Polygon",coordinates:["@@FDAJTGDNDCTDDEDBBE@DT@@EHCDGJ@EIZ@@FDBR@ATFBBVFFE@@HNA\\VE@CLIFNJFNJBCP]A@LJFA@HJEDD\\C@DBCHLAEPF@@DH@APHAERDF\\GIxDTM@CFLBBFJ@CNUPMHECGDBF]BMFPDLRBHHBJMDCX@@DFIBFPBRKJF@CGANBHKbDDABDRDHNNCHDbCdBFMpGHiOYMefKJMC}HWAUNW\\NNBNA„kNU|]HMTMN@MZBLFFF@RIRUT‘BMFIEGaAGGAOIIUGTSFcYKS@MSLYPKRUBU]EWDOI]CKGASgW@MTWKIMCS@uMAKKADMECGAKVUTSDy@IjWLMNBF@hƒHEF@FAD]H@LIBG`ELAPYAUB@CEB@CMC@MIB@GkB@ECAIB@NwBMEUJHNSDFFNALLS@@HZBBFYBJP[BHTCND@JMZ@FDGJHDH@GHAABCKAIPPFONEJNHEHHDEFFDADBFMP@L"],encodeOffsets:[[119329,40782]]}},{type:"Feature",id:"110105",properties:{name:"æœé˜³åŒº",cp:[116.4977,39.949],childNum:2},geometry:{type:"MultiPolygon",coordinates:[["@@bFGHBHFBFIVFHHG@@FFB@HDFF@@FRB@LXGt@DHCH@PBDLFBNF@BEXCHEX@ZQ\\@LCPOJCDEAMFEfQLMHCAFH@@KhUNE^AAEHCFDNGVODMI@AEKADEN@CSJw[HCEFQGBBOG@@CE@FOKBDGCAD@C[FCGIB@IE@K^BDOIAEMMIJEDKF@[UMB@GF@EEAUEABSQ@CA@EY@FJI@CHGD@FS@@CAFCACFSCCDCMSHBIECMB@D]@@MKCDCQEAHG@CCG@CGUEIJK@SPOCCNEDQBDNDB@DJCDLFCBBALJB@BVGPBKVO@KHCCCD@FE@BNA@FNCTDDJA@FGB@NBDW@CL@hT@@ZHHQDDDAFSAANBC@HG@EFS@@DE@@PCB@Ue@CADNJB@FCBWA@LI^ix@FIHrH"],["@@HUN‹AJKADGECBCMAG^E@EbI@BEGPKrJEH[\\B@FF@CHFB"]],encodeOffsets:[[[119169,40992]],[[119398,41063]]]}},{type:"Feature",id:"110108",properties:{name:"海淀区",cp:[116.2202,40.0239],childNum:1},geometry:{type:"Polygon",coordinates:["@@plDJVLÂŒGPBFHjDbHGL@X\\DBNHJREBLRBHaFGÂŽMGOBQAWPBLCBBAJBDFADOIEJGE@@EP@HCPWP@ZgfBRQJJ\\D@HLHLDVA@IVDFGSI@EGC@EBB@CN@@IZCAGHGaEqGJG@EjwJ]@K@GSA@e_I@NE@CA@Kg@KC@ENCFƒAKQAW@WIMK@V‹@I@@F@^EDFB@HcIaDYCBRRDCHD@EFLN@FE@CJUPEJOJMTBPEDIFCMIAKNOGMRFJNDVBFLSRMJSDGJsFcEiJGDGTIlOjYD"],encodeOffsets:[[118834,41050]]}},{type:"Feature",id:"110106",properties:{name:"丰å°åŒº",cp:[116.2683,39.8309],childNum:1},geometry:{type:"Polygon",coordinates:["@@hMN@NFTQCFRCBJFA@HJ@@HJ@HJ\\FTACDÂŒ@@UNLXJX@@MA@@IECAQlDFEHBDI~D@GXCFMVDFCH@@NF@ANJC@FnAB@AMF@@EDCDDLGP@LUOAUH@AIABKAAEDCKID@CCACMWA@EGDEILA@OK@AELEJBFEEGL@BSOA@EuAFmMACbG@@EM@ANS@ENFDAHSDCL[BEIUBAII@A[E@OaKD@FAACTGVIACDHDAFGAEDoGEFACM@i€g@@QFCMKMU@]SCoBGSMQ‰DEXXDWPO@MKYGM^AdJJA\\cNB\\G^„DNHFCBFABDBJ@PL^D@DF@T@FDAF^A"],encodeOffsets:[[118958,40846]]}},{type:"Feature",id:"110107",properties:{name:"石景山区",cp:[116.1887,39.9346],childNum:1},geometry:{type:"Polygon",coordinates:["@@NQPHLMJBDNJEFCAONSPIFIVODIF@@EKMFEC@DGQCAQZDbCdJ@GEAFC@]@EJ@DCSB[EGII@@GI@@GEBAIQDDESRMEM@gNYTIRKJAJEJ[DFJKLGBGNBJLDCDAHGBJJAFBLEXTLZFBAFDLD"],encodeOffsets:[[118940,40953]]}},{type:"Feature",id:"110102",properties:{name:"西城区",cp:[116.3631,39.9353],childNum:1},geometry:{type:"Polygon",coordinates:["@@XBDA@EIACM@IJAD]BC@SFABISAD]H@@OÂAEDQEW@BLE„MD@FLDh@@LDBF@@M`J@fTB@H"],encodeOffsets:[[119175,40932]]}},{type:"Feature",id:"110101",properties:{name:"东城区",cp:[116.418,39.9367],childNum:1},geometry:{type:"Polygon",coordinates:["@@DBf@@VDA@OF@@CT@FEH@@GADBMTBBECCRCGG@YS@@gDK@A‘C@PG@C^TBAJEB@TADC^IB@J"],encodeOffsets:[[119182,40921]]}},{type:"Feature",id:"110104",properties:{name:"宣武区",cp:[116.3603,39.8852],childNum:1},geometry:{type:"Polygon",coordinates:["@@RBX@RFFCÂŽBFU@aK@WA}CCJGAEFkCBRFD@JB@@N"],encodeOffsets:[[119118,40855]]}},{type:"Feature",id:"110103",properties:{name:"崇文区",cp:[116.4166,39.8811],childNum:1},geometry:{type:"Polygon",coordinates:["@@XBL@@bEVÂ’D@BX@AC@MHA@EIBCCDSEMmB@EIDBME@@MG@EDUCENWD@H"],encodeOffsets:[[119175,40829]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/china_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"xin_jiang",properties:{name:"æ–°ç–†",cp:[84.9023,41.748],childNum:18},geometry:{type:"Polygon",coordinates:["@@@›ÏÈôƧƦóəʵסʵóƪԫʵѵͩƧͩړ›υࡓɛʵ@ȃ@óᇑѵƨÉɚôóÐѺͩɜÌԭʵôƧɞñ@υƩ—݇ȂóƩƧ@ѵȂυœƥŌਗ—॥ɛóʵѵƧѹ˜݇Ìࢯ˜əɞυ˜ÏÍ©ÌóਙƨƧŋôÅóšÌͩóʵן›óŋړͪƧѶ@ɜԭ—ԫƦɛȄÌ›ÉȄöςƩȂÌœñȀÌœƩóóŎə˜@ÅÌŽ@ɞȀÉŎôƨóנѵȄƧ@óÅÉœóɜôŎÌͨςŎ@ƨóôƨɞ݈ʶóƨφó̎ȀƨÌԮòѸԮמ@ѺȀ@ƪá¬Ö†Ã²È‚ñÌòȂɜ˜óƨ̒Ŏ̑߼@φÏÈ€@Åà¹Ï‚̎Ƨφ@Éφڔ೦Ԯǿࢰ@ƦÅԮƨƨȄƧ۬ɜʶڔÅɚɚóÅôƨ߼˜ôƧƧóÌƥóÅѺǿƦÈφƧς˜ƨƧ̒@ɜƥƦυÌɛƪͩƩəƪʷ̑ə@ȃƨʵנŋྸÅਚԭԪ—@Éƨŋ̒օςʵôƧ"],encodeOffsets:[[98730,43786]]}},{type:"Feature",id:"xi_zang",properties:{name:"西è—",cp:[88.7695,31.6846],childNum:7},geometry:{type:"Polygon",coordinates:["@@ôŌנœôʶ̎ͪô™óŎƨŌਚƧÌôςͪφ—ɚÉࢰ—݈̎Ѻ—Ѷƨôʶ०ɜਘ˜Ʀŋφ›ѶÈÌ—ôÅɚŋ@̑ə—@ÅòÌɜ›óƥôʷƧÌφѹԪÌ×¢@Ѹʷɜ@ôñנ@ѶɛɞôÌÅѶƨѸƧƥÅƦœôÅô—@ƧôƩ̒ŋƨŌƦǿô̎ɜÈ̒—óʶѶôôО̒›ςƥɜÐφσɛÈ̎υƨఱƧÅ@ʵƥœ@ŌóóóͩƨƧóŋ̑õóɞóÉԩͪÉÏôƧÌƧѹͨڑŎ̑ÅóƧࢭͩÌѵÉóఱóóԪυô@̒ƥŌÌƧ̑Ȅ݇ŎƧ›ѵÓ@ɛõÅɛȄôӒƧŌѵǿɘƧŋԫ@ÌÊ´Æ¥@óǿ̑ȀóǿÌςóóυô@ʶɛñÏƦƩÅó̎óœѵó̑ͪࢯОóɜן˜ƧÌƥȄ߻̎ÌÌןŎÉɜöɞƩȀôöɛȀóͪÌƨƪÌ̎ȂƥԪυО@φɞ˜ôƪ"],encodeOffsets:[[80911,35146]]}},{type:"Feature",id:"nei_meng_gu",properties:{name:"内蒙å¤",cp:[117.5977,44.3408],childNum:12},geometry:{type:"Polygon",coordinates:["@@ኊÈ૊ö߼ƩɜɛנñԮɛѶóԮô@ÈѸóמ̎ගѺá¬@߼ʶԮӒ߼̎@ÅѹӒ̒Ԫƨöග̑ѶȄ̒ς।œѶɚöɞɜʴڔôôȂ̎—ѺȀς—ƨ˜ƪóԪ—ɜôɛОਕڔԭ˜ѵÌѹȂԫ›ɛƥÌȂóɜ̎ô@ʶ݊ੲࢮʵږͪנƨôȂƧ˜Ìͪ@ÅƦƨφԬѶɜôƦ@ÅƧôôƦəÅÌ›@ÅڒѶԬôÌʳԩÐÏ‚ÅôÅÉž@ƨȂѶəóƧ̒ػ̎óÌÅנóƨô̒@ƨɚɚ@עԫɛɛ@ÈυͩƥʳòևÏ—̑ࡗƧͪ༃ॣԮփ̎Ʀ@ôô@ôÅ@š@ÈѵóƨÌυȃóʵɛƨƥóυȂóəƪ›ÌÏƧͩɜԭڔȄ̎عƧÈÌÅóÌɛ›ƥƧ̑óÏÅ@Ƨ̘Éəɛ˜߻ͩÌÍ©ÉОÌƪƧóóӓƨóƧʳ݇@Éςƪœ@ʴƩ—ƧƦôƨɛȄə›Ƨŋυ›óͩѵ@ÉǿóŌןÌɛ˜óОÌœ̑ÌôÈÌÅòÈñóƦͩ@Ç¿É™@ɛƧ̑˜ÏÈυôÌօѹœóȃə™@ȂσʵѷƪòƩÌ—ôó߻ۯôʳƧ™óšõʵѵóѹɜÌȂѹôɛŌφֈƩͨÏóυӑóޟఱ̑݇ͪóƪƨŌóȄڔԬƩς×ñ̑ȃѵÅÔ­ÅƨÈɛǿÏôõɚɛóƧОə@ѹÌѵöԪͨôͪɛ̒ןÅƧƥóôƥƧɛŌôóÉó@̒݇Ӓ̒Ō@Ŏԭࢰ"],encodeOffsets:[[99540,43830]]}},{type:"Feature",id:"qing_hai",properties:{name:"é’æµ·",cp:[96.2402,35.4199],childNum:8},geometry:{type:"Polygon",coordinates:["@@ƨ@ôƪ݈Èƪ˜@φÉòóƨԮʶɛÌѹͪôОəóƧɞᇒѶ@ôږô@ǿѶ›ƪÈςœɜͩφ˜ςŋɞôѶɛƨŌɞ—@ɚςÅñԪॢͩƨȂɞóƨÅÌŽÅ×¢Ó̎óƧƦôœ̒Èɜ›ςͩ̒œɚɛƨôƨÉφɛóÈƨŋóóɚͩƨóóƩ@ƧəŋƦƩÌ@ƧƧôǿυ̑@ÈɞǿõÅÏƥסɚƧóτԫɞœôƧƦ@ñȃòñƥóυôôѹѵ—@ÅÌÈ„Éó@ȂəŌóəѹƦ@ÅÌŌυ݈ԩÅƧóôƧ̑›ôʵɞƧ̑ѵôƩɞƧ̑œóÐѵóôʵ̑˜ɛȂóÌƥȀƧŋ̑Ōóƪ@ƨó˜óÅƥ›ƦŎѷƨѵƧÌÅÉóѵɜן@óòɛ@ѷʸס@ԩ̎υѺƨ̎óʸôƦɛœñ̎@Åɚ˜@̒əŌóÅ̎˜"],encodeOffsets:[[91890,36945]]}},{type:"Feature",id:"si_chuan",properties:{name:"å››å·",cp:[102.9199,30.1904],childNum:21},geometry:{type:"Polygon",coordinates:["@@ô˜ôŋó̑Ԯ̒ɛОמͪƨÅöͫ߼ƥôȃƨóóñôƧóƧôÅÚ”ÅƨÅ@Ŏô˜òƥѺŎ@Åɜóנ˜ôǿô›ƦôԮÌɜôɚ›Ƨ—ñɛɚÈÌƧɛևυ@óóôŋÏÔ­É@ƧʸÌÅυɜƧƧóƧƨÈÏÌƨȃɚ—ôʵφóô̑ÌȂ̑ʵɜʵɞ@ƨʳסƩóŎə—óɜƧôƩƧϘóôôô@ŎƧƨƨƪѹ˜óÌÌÆ©@ÌѹÐôޟÌƩóƪυÉɛ—əƨôŎɛȀ@È‚@ñÉʶ@ÅŒÏ× Ì—õóɛͨƨȂѵОɛʵ@ÌÆ©Åó߼ƧలÌφɜȂυτɛОÏƦÉƨóƪ̒ѶÉƨóʶ̒œóƨƨôԪÅφ݇̎ŋ@ÅѺƥôɚɚŋ@ÈɞôÌȃ@ÅѶ˜óѺφóƦôñòòȄ"],encodeOffsets:[[104220,34336]]}},{type:"Feature",id:"hei_long_jiang",properties:{name:"黑龙江",cp:[128.1445,48.5156],childNum:13},geometry:{type:"Polygon",coordinates:["@@ᇔȂਚÐƨÅѶÅöƥςÅñƧƦóƨÈ@óƨ—óÈφӑóóƨ˜óǿ̎̑ôÐɞ—ó̑ɜə߼›̎ǿ̒ôڒӑφ@ƧÈÌŽÌƥƩ̎Ïశ˜ôȂςƨφ@נɞ݈˜̑ƥƧɛƨʵƧȃƥ@Ƨƥ@Å̑ԩôÉÏÏóɛƧ›ƩͩƧó߻ʸÌʷѹƥɞڕõÌöÉυ—ÌȂƧÌÌ‘ÅóƨñŋѹóóÈÌ›ÌԬõʸÌÅ@Ç¿Ì@ƧОυ@ñƨòȀƥŎ̑ÅѵóɛŌóȂԫÅƧŎѹñÌʶóОן@Ƨ̎Ѷô@È‚@™óŎó@@óÌƥԭք༄।ƨͩ̒ࡘς˜ñֈƦʴφͪ@ȂɜɜסԬə@Ƨə̑@ƧóןôÌÅÌô̑ؼôƨѵɚƧÈÉ@óÅÏŎԪОÌÊ´"],encodeOffsets:[[124380,54630]]}},{type:"Feature",id:"gan_su",properties:{name:"甘肃",cp:[95.7129,40.166],childNum:14},geometry:{type:"Polygon",coordinates:["@@ڔôԮࢯ@Å̑ŋ݈ӑ@̑ɞôóôɜŋƦƨôóƨƦנÅɜ̑óͩԩͧѶõѺÌÉš@ƨÐɜôöəςóɜȀƧȂԮÅѶÅ̒ȄמòƪÏړԫôȃƧŋôƩ݈ͩɚ@@Ç¿Éœ@φͩóÅɜӑƧÅôǿ̎›ôƥƪóõ›ö@ô—ƨ˜ôƧƦôó̒ɜ@ɞŌõʶÌÅ@ȀóôƨȂ@ʶע@@ƥ୾ӑó̑óŋôʵóɛړ@@ƩöóƩóÏ—ɛƨ̑@óʷƥƥ̎ɛƧ›ôÅƧǿôͩѵôÉȃɞÈõƧÏóó—@ÅƧÅÚ“ÅóŎôƨóƨôòƧôóȄ߻ƦõͬƧŎ×Í©ÉœÐԭ̑ô̒óŌó—ƥ@óƨÉ›σԬƨôעəςƦöÅÉÈ€@Ȃφ̒óȀƨƨ̎@ƥƪɚŌ@ƨôƪƧôəͪôôƧŌôȂυɜƧɞƧóəɜ̑›Ïͪɛœ̑Ȃó›ƨƥÌôסÓÌÅƧÅÉôƧÈॡͪòԩÏÅ@əɘƧŋѵɜÉóÏŌυ—ɛͪÏ›ƩȂѵœ@Ȁڕó@ȄɜʶφࡔڔœƨͪѶͪԬʶôƩעʶɚʶƥôóƨςȂ"],encodeOffsets:[[98730,43740]]}},{type:"Feature",id:"yun_nan",properties:{name:"云å—",cp:[101.8652,25.1807],childNum:16},geometry:{type:"Polygon",coordinates:["@@ôɞôÉ̒öôŌƧƨôͪôô@ŋƦ›@ʶƨÅô߻ƪÅ@ÌɜʶѶÐƧÈɜͧöô̘ςן@ŋɞʵ@ò@ÈɜǿóÅɚƧɜ˜φɞôƩ̎ƪóޠѺО@Ì̎ƪô̎Ѻ—ƧƩƨƧ@Åóóôóς—ƪƨƨóôɛó̑ԭ—ƥŌɛǿÉƨɛͩô›@ǿƨÈѺŌɚɛÌןѶÐɛƧôóƥÈƦͩôŎɞ—ƨ̑ɜ—òôφ@ƨʵ@ɛѹÅóȃəƨυǿóʵÏƧƧŌƩɛÌȄñƧƧȀÉÌԩʶƧ̑υ—óŌƥʳɚӑóÐƥô̑›óӒѵʵѹœƧÓןôƪφõŌƪ̒ԫŌƧؼƨƨס›ÏÈƧœƨȂóʶó@@ʴƨôôφ̎Ŏ@Ȁƨ—ƪɚƨœóƨôôôςóޤƧŌƩŋƧԪ"],encodeOffsets:[[100530,28800]]}},{type:"Feature",id:"guang_xi",properties:{name:"广西",cp:[108.2813,23.6426],childNum:14},geometry:{type:"Polygon",coordinates:["@@ƦŋѺ̎ڔʵƨÅ@ƦמȄƪôóȂɜŌɚͩɜ@öóɜôôȂƦôɜÈ@ɞφ›óȄ̎›ƨʶɞŋƨʴɚǿÌÌŽÔ¬@ôñ@Ìƨ›Ï۫ô›ɚƨƨÐƪÅ̎›ƥóƦʵƥŋ@ȃóƥƧ@@ÅÉǿôυƧÈѵɛ@əóÅÌ‘@@ə̛óƧó—@ÈƩ˜ÏóòÐƥô@Ó’Ì‘@óŎÌƥσŎυ@Ìƨ@Ō̑ôóͪƨ̒óŌړœÌÅŽ@ŌôȄѺŎ@ɜƧʶυ@ñóɛ˜Ƨ̒ɘóÅƥͪ"],encodeOffsets:[[107011,25335]]}},{type:"Feature",id:"hu_nan",properties:{name:"æ¹–å—",cp:[111.5332,27.3779],childNum:14},geometry:{type:"Polygon",coordinates:["@@@քɜОƨ@öÅמóƪôƩɚ̒Åß¼Èςͩɜòƪ—ɜȀò—ñÉò—Ѻͪ@ÅƨŋóÉôǿƨ™ɚȃóəƨȃѵͩóÌ@ȃƨóóƥƨƧ@ʵƦ›óͩɜ—ɛóñԭɛÅÏ…È‚ÌƧƦÅ@ɛƥ—ɛȀ̑œóʷóÅÌœƩÅƧОəƧóœς۬Ƨœ@Ìóòԫ@ÌÌəȀƧʳÉŌóɞƧ˜ƨɜóÅƨò@ȄƧŌÏŋóôԪОóʶ@̎óȄ"],encodeOffsets:[[111870,29161]]}},{type:"Feature",id:"shan_xi_1",properties:{name:"陕西",cp:[109.5996,35.6396],childNum:10},geometry:{type:"Polygon",coordinates:["@@ςôöƨÉȂɞȄѶóóͪƨȀóŎƨœÌɜƦƦôʸ̒@ɜƧς˜ƪôõô@ƪڔ@ôɜóʶôŌô̒୽Ӓ@Ʀ@Ѻ̎ɜѺɛѶôöʶô™ƨšóʴ߼۰óô̎˜ñƪѸƩτʶ@Èòŋəѹóǿ̑ʵ@È̒ʷυփô݉ôÐÌØ·@ÈƨóôÌƪõ@ʳÌʵ@ÉɛŋƩŌɛóןôƧŋ̒ó@ÅÌÆ¥@ÅÏ…@ƧƧôןÌ@ƥȂѹɜəœɛóԭ̎ƥóóœóȀן—ɛô@ŎѹÅñƦ"],encodeOffsets:[[108001,33705]]}},{type:"Feature",id:"guang_dong",properties:{name:"广东",cp:[113.4668,22.8076],childNum:21},geometry:{type:"Polygon",coordinates:["@@@Ȃô˜ôƨ̎œ@ɚ̒@ôÅ@ɚѶɜƨȂóφɞȀ@Åƨ@ôƦ@ȄƦŌƥʶƦôôŎôʸ̒›ɜǿƦ˜@ɜƥŎ̎ƨφÈɜŎòƥԮŎƨÅóÅɛƧÉəɞƧ߼ɜςȃñȄƦŎ̒Åôòƨəƨ˜ɚÐ@əƨÌƪʵυŌəɛóəԭÅəœóÅѹœÏʵÉƦÌ™ƥʳѶ›öÅ̑óóŋÏȀυƧƥɛѹÅƧôן—ɛÅѵ@óŋôʵÉ›ƪԩõ@ƧÅÌ@Ƨ@@ƦÉԮƪО@@","@@X¯aWĀ„@lÂ"],encodeOffsets:[[112411,21916],[116325,22697]]}},{type:"Feature",id:"ji_lin",properties:{name:"å‰æž—",cp:[126.4746,43.5938],childNum:9},geometry:{type:"Polygon",coordinates:["@@× @ôÐ̎ʵѺòƨÅԬŎôÈɜŋѶô̒ÅƦÅñǿòƧφ@ƨÐÌŽ@@È€ÌÅöʷÌԫ̎œôȂѺôòŌôƧ̒ÅƨÌÌŽÈφ˜@Å‹Æ©Í©×ȃƨ—@È̑ʶ@Ōóôɛœƥѹ̑—συ݇@ÉœÏƧȃࢯƨôœəȂɛÅÆ©É›ÌÏ…Ïóõœƪʴυφ@ʶôŌóœÏÖ„@ɜƧ@ÉǿƧͪÏȀƩóÌÅƨȂÌغړȃɛԮƨͪÌςƩœôɚφÈƦôɜƧôʶφȄ"],encodeOffsets:[[126181,47341]]}},{type:"Feature",id:"he_bei",properties:{name:"河北",cp:[115.4004,37.9688],childNum:11},geometry:{type:"MultiPolygon",coordinates:[["@@Æ©Ì’ÌŌѺ̒Ʃ˜óȄƧŌƥͪòôñȂ̎ÅóȂ̒Ì̎›ôÐɜ—נ̎ôŋɞȀѶ@ôͪφœƨŌɚœɜȃóƧƨƥƪ˜@ʳƩ›ɞÏ݈@Ï…Ðφʵɜ˜ƦÏƨƧÌÉóɛѹÌÏÅ̑ôóƨ@œƧƦôƨɛ@ƥƨ@ȂƦ@@ôəÅƧʶƨŌυœÌ̎ɛŋôÅÉ@óƧÌ›ƦʵѵʳôʵɜÅςôƪŋƨŌɚ@ôÐƥƧ@ÅѸɛÌô̎ʵѵÐÔ­@ÌÌƧò@ÈÉ@É™ÏυͩƪÌƩõƧŎƧÅóšॡȄɛʶɜȀ@ɞςѶƧœƥςɛÅ@ɚɜɜ@Ŏôôςœƪς"],["@@õə@Ƨɛ˜@ÅóƦφô"]],encodeOffsets:[[[117271,40455]],[[120061,41040]]]}},{type:"Feature",id:"hu_bei",properties:{name:"湖北",cp:[112.2363,31.1572],childNum:17},geometry:{type:"Polygon",coordinates:["@@ñȄυƦöÅƩ˜óנƨƨφ@@ÅÌƦ@Å̑ôƨŌנóɜôƪŋɜŌѶօڔə݈òɞÅɜŎôÓƦóƨô̒óôȃƨó̎ÅôƧƪ@ƨÈςƧə̑̎Ð@ÌƧÅÏôԭͩԫ—ÌʵƧšóȀôɞƧŌ@Åѹͩñ˜òɞñ˜ɛǿƩ˜ɛñÏͪ߻Ȃ̑ÅƪəƩó×ôõÅƧ@É›ÐƥȄó›̑ѺƧ›ôφóƨƨƦƪóɜÅôóòôƨóφÌƨóƦ̎"],encodeOffsets:[[112860,31905]]}},{type:"Feature",id:"gui_zhou",properties:{name:"贵州",cp:[106.6113,26.9385],childNum:9},geometry:{type:"Polygon",coordinates:["@@ɜȀƦŋԮ˜ô̒ɚ˜ôÅעƪƧʴÉ@ɛʶ̒ʶÌÈƦœóȂô@ôÅ@Åô—ƨʶѸô@ʶƨ˜ɞó@Åτöòυƨ@@əƨô@ɛ̒@Ʀɜôȃ@ÌôʵԩÐôóςŌƨŋ@ȃƧñôÅƧɛƨ—ôÉƧʵÌœôȃυœ@ÉɛȂƥóóÈɛóõôɛ@əͪɛŋôÈƩó×ȃ@ƥƧÅړʶѹÌƥŌƦȂóôɜƨѵО̎נəɜѹŋƧȂ@ȀóœɜͪɞƧ"],encodeOffsets:[[106651,27901]]}},{type:"Feature",id:"shan_dong",properties:{name:"山东",cp:[118.7402,36.4307],childNum:17},geometry:{type:"Polygon",coordinates:["@@Æ©Ìφͪɚςɞ@@Ȃƨñ̎̎Ԯ@ѶОƨƧڔ@φÐÌ‘Å‹@Æ©Ì’Ç¿ÌŽ@ƨɜԬςôʶÌʶöԫƨƧנƥɜŎôÅÌŽ@ôÅóÏƧÅԫôóƧԩó@ƥɜƧԭóƨʵɛƨ߻ӑɜÐԩ˜óô̑óƧʳə™óɛƧ@õȀƧœÌȃɛÅóÅυОÌ—óÉƩ—ԩ@ƧɚԫȄɚʶƨ˜ɞʶԪÌړɛƪ̒"],encodeOffsets:[[118261,37036]]}},{type:"Feature",id:"jiang_xi",properties:{name:"江西",cp:[116.0156,27.29],childNum:11},geometry:{type:"Polygon",coordinates:["@@ƧȄôɚəȄ̎ʶԬ˜ԮͪςóƨÅƪ›τɞƦÅƥƧ@ÅςôóÅôô̒ʷѶ—ƪƩƩǿ@Å̒ɛôυ@—ƧÈѹɛəƨѹ̑ƨÌóƥѵʷôÌÉ›ÈôÅÉǿƧԫƧ›ôʳƥÅòȃÏȄ߻ɛÉƨɞɚɜƨôÅƧŎԭÅñƦòԮɜôɛ˜ôͪƥœ@ʶƧƨôƦƧô@Ȅô̎Ѷͪ"],encodeOffsets:[[117e3,29025]]}},{type:"Feature",id:"he_nan",properties:{name:"æ²³å—",cp:[113.4668,33.8818],childNum:17},geometry:{type:"Polygon",coordinates:["@@φ˜̎ƪ̘ɞȄɚ@@Ȃעó̎ŌѺ̒ôֆॢȃô™ƨŎƨÅƪöƩ̑ڔɜԩÌÉʵƧ—əʵԬȃƨəԪ@@Ƨ̒ÅôÌÏ…ÈƧɚÌôóŋ@ÉƧŋõ̑σ—@ÅɜŋôÉ̒ƧɚôôطÏóóɛƩ@óƨÌÅƧôóȄ̑ôƧóƥôóÓÉ›ÅÉŎ݇ñړɚѵֆ@ÉžÌʶ@ʴƩöóÌ"],encodeOffsets:[[113040,35416]]}},{type:"Feature",id:"liao_ning",properties:{name:"è¾½å®",cp:[122.3438,41.0889],childNum:14},geometry:{type:"Polygon",coordinates:["@@ƨʴƧôôӔƨô̎ƩɞÐ̎ͪ߼ͪɜ—ɞɚÌ—@ƨςÅ̒ôƦƨɜœô̎ƪôςǿƨͩɞȀƨ@@ɛςփô›óŋ@ʵφυƩʳö›॥փÏѹס@əɛ@ͩࢯ@ѹʵÏ—ƩʶφȀƧ݈̒۬óʸÉŎѵ@ԭԫןɛƧƨƥςɛ—υʶφО"],encodeOffsets:[[122131,42301]]}},{type:"Feature",id:"shan_xi_2",properties:{name:"山西",cp:[112.4121,37.6611],childNum:11},geometry:{type:"Polygon",coordinates:["@@ɚѺñŌɚšôȄѺ›̎ֆφóςȂ̒—ɜƨɚ@@Ȁƨŋôȃƪ—ѹ̑Ìŋƪ̑ƩÏÏ›óó@Åɛɛ@əɜÅƦÏƨ›Ïѵ@Éɛǿɜʵóօѹ̑Ìŋסô@ÈÉ™@ÉȃÌ—ÌƩυ—Ƨô@È‚ÌظóОó݊φք̑ʸ@Ȃ̒ʶôȀ"],encodeOffsets:[[113581,39645]]}},{type:"Feature",id:"an_hui",properties:{name:"安徽",cp:[117.2461,32.0361],childNum:17},geometry:{type:"Polygon",coordinates:["@@ó̎̑Å@ƨƪ˜Ѷǿɜ̑φ—Ʀʵ̘Ƨѵôóƪôôυς—ƨȂɞÅ@Ìԫôò̑ƥ—óȃѶͩƧƥôÅѺœôÅƦ—@›ƥͩƧ—ôÈυó@̑ƧɛѵʵƩƪѵ˜̑ʸóóôÅÏó@ÅƦƨƥŎσÉÆ©Âœ@ÌŽÌОɚ̒ÏƨƧȂôɜςôóظəó̑ƨóɞɛŌ@Åτ˜ö̒ƨŌ@ɞôŌ̎óƨəφȂ"],encodeOffsets:[[119431,34741]]}},{type:"Feature",id:"fu_jian",properties:{name:"ç¦å»º",cp:[118.3008,25.9277],childNum:9},geometry:{type:"Polygon",coordinates:["@@̎›óÈƨӑ̒—̎ɚƨͩφÅƨÉ̎ŋóÅÏ—@Åƨ›òʳəóƨÅ̘õɛƧ@ƨѵƧÅÉ™ÅóŋƧô̑Éɛʳƥ@@óɛõ@Ƨ̑ƧóÈəƧ̑—ƧÌ@ɚəОƧ—Ƨɚóñ̑ŎóʴƨœƨԬɞȀóÅɜȂó̎ѶʸôƦƧÌѺ̒ɚƧѺɜƨȂ"],encodeOffsets:[[121321,28981]]}},{type:"Feature",id:"zhe_jiang",properties:{name:"浙江",cp:[120.498,29.0918],childNum:11},geometry:{type:"Polygon",coordinates:["@@Ѷʶƨɜ@̒φôóȂƨ˜Ʀͪ@œ̘ѸÌτȂ̒̑נÅמôƪƧôӑ̑›@Æ¥ÏͩƨօÌ@@Ï…Éó@Å‹É›@ôƩəóƧѵυó@ƩɜŋƧ@ÌŌƧɞυÅƧͪÌə̑˜ƧӒôȂÌÂœ@˜óφ̑ɜ@ŎƪȀ"],encodeOffsets:[[121051,30105]]}},{type:"Feature",id:"jiang_su",properties:{name:"江è‹",cp:[120.0586,32.915],childNum:13},geometry:{type:"Polygon",coordinates:["@@ôɞ̎˜φÐôÅÉœÅ̎Ȅƨ›öǿƨ@ôɜɚšƨʴ̒ôôó@Ƨ̎əԮȃԪૉöͩÌƧòʵφƧôʵ@óړɜóÅɜǿƧ›ÉÏσÈÑ·ÌŽÌ—ƥ˜óÅѹ›óÅƨƦѵͪôȄƦ˜ñ̒Ԭó@ÌŽÉÅƧÈϘóφƩóóôƨѶÌ—ƥʶυ˜ɛ̒ѵȀ"],encodeOffsets:[[119161,35460]]}},{type:"Feature",id:"chong_qing",properties:{name:"é‡åº†",cp:[107.7539,30.1904],childNum:40},geometry:{type:"Polygon",coordinates:["@@əȂòɜƨ˜ѺɛƦÈÌ@ƪ—õÅφƥòȃƥÌƧôυÌƧôñóóôɛÅƩôƧƥôƧóυƨœ̒ѹôœƦȃ@փƥɛ̑@@ɜƧó@ɚƧ@ñφσõ@ÅŽÉôƧ—@ʵѷóƧʵó˜@ŎóÅó@ôÈƥ›ó̒υôóʶə˜ƧȄς̎ƧȂôƨƨƨφɛ̎Åƨʷɞ@ςԮóŌôôφ@ɜֈ̎ƨ"],encodeOffsets:[[111150,32446]]}},{type:"Feature",id:"ning_xia",properties:{name:"å®å¤",cp:[105.9961,37.3096],childNum:5},geometry:{type:"Polygon",coordinates:["@@ల̒ôޠφӒςôƪͧυևɜŋѺó̎ÈÌÉ›@ѹס@@ʵƧÈôó@Ç¿ÌÅöʵÉÅ‹É›@ô̑ƥóóƨƧ—ó˜ôœó@ƩôóƦÌœóȀƨŎɛӒôÅυͪɛ@@Ȁə@"],encodeOffsets:[[106831,38340]]}},{type:"Feature",id:"hai_nan",properties:{name:"æµ·å—",cp:[109.9512,19.2041],childNum:18},geometry:{type:"Polygon",coordinates:["@@φɜƦʶÌôφô̎@ƨŎö@τʵƦ˜ԩ۫õÐÌóƥȃƧ@Æ©É™×ƨ̑Ʀ@Þ¤"],encodeOffsets:[[111240,19846]]}},{type:"Feature",id:"tai_wan",properties:{name:"å°æ¹¾",cp:[121.0254,23.5986],childNum:1},geometry:{type:"Polygon",coordinates:["@@ô—ƩÉöƧÉѵəޣÌÏƩԭóÅóͪÏɞƧОôԪ݈ଦѶɜ̒ɛ"],encodeOffsets:[[124831,25650]]}},{type:"Feature",id:"bei_jing",properties:{name:"北京",cp:[116.4551,40.2539],childNum:19},geometry:{type:"Polygon",coordinates:["@@óóó›υóôƥ@Åóóə@ƧŋƩŌÏóɛÅóʶѶʴƥʶ̎œôƨɞ@óŎɜŌ̎Ìφ›Ƨŋƨʵ"],encodeOffsets:[[120241,41176]]}},{type:"Feature",id:"tian_jin",properties:{name:"天津",cp:[117.4219,39.4189],childNum:18},geometry:{type:"Polygon",coordinates:["@@ôôɜ—@ƨöɚôœôôɚÅ@óƥ@@ÈƦƧɜ@óƧƨƥ@›ƧóəÐÌóѷɜ@ŎƦƨóО"],encodeOffsets:[[119610,40545]]}},{type:"Feature",id:"shang_hai",properties:{name:"上海",cp:[121.4648,31.2891],childNum:19},geometry:{type:"Polygon",coordinates:["@@ɞςƨœɛȀôÅڔɛóυôÌןÅÌ‘Ì’"],encodeOffsets:[[123840,31771]]}},{type:"Feature",id:"xiang_gang",properties:{name:"香港",cp:[114.2578,22.3242],childNum:1},geometry:{type:"Polygon",coordinates:["@@óɛƩ@Ï@óœôȀɚŎƨ@ö@@Åƨ@"],encodeOffsets:[[117361,22950]]}},{type:"Feature",id:"ao_men",properties:{name:"澳门",cp:[113.5547,22.1484],childNum:1},geometry:{type:"Polygon",coordinates:["@@X¯aWĀ„@lÂ"],encodeOffsets:[[116325,22697]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/chong_qing_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"500242",properties:{name:"酉阳土家æ—è‹—æ—自治县",cp:[108.8196,28.8666],childNum:1},geometry:{type:"Polygon",coordinates:["@@XJ°œlJX@lbl@XbV@VLnJlxnbšƒUU@IVK@lVIVwnJlU@n@J@L@Jn@l_nWVLVln@@blLšmV@@xœÔ‚`nϪxV‚ÈLlx„LVxVVšƒV_U»VWn_mÂ¥XwVmnX°ƒlmUUVwÞaVƒÂk@a@mmIUa@™mwk@™ƒm@@U¯a@UV@@K™Â@ykkmwkV@kU@ƒÑƒVkKWLÃ…amaUÂm@kyU@WkU@Ua™IUašÂVaUUmUUa@aVLXKWa¯UUbmJXnWnX`l@@xkzWÆ@V„LU¦‚x@b@JkIkJ@LmbUamJÂwm@óxƒnk@V„@x„ŽVnUVmVUÂVÂŽUbVlUbkXWÂŽ"],encodeOffsets:[[110914,29695]]}},{type:"Feature",id:"500236",properties:{name:"奉节县",cp:[109.3909,30.9265],childNum:1},geometry:{type:"Polygon",coordinates:["@@WVXb‚UnK@x@b‚²kxmKkl¯_ƒVV°™VUÂ@bnKVVV@@nkÂŽ@n›bn‚@š°@VLÄŒUš@°WV@V™nU@InKVÂl@nU„b˜KnX„WlknLlKUwnalLša„VlUXmWk@UU@UWWIUyķ¹XaWW@ÂX™ƒKUIVm„U@W@UVU@KV@n»VkUkÇmUmVIUmULUbm@ƒwUaƒKkkm¯ÑUL@bWVnx@VmxUI@„klmkkK@aƒK@IlJ@I¯ƒk@mak@mnkJVL@bV@Ub„„W`UUUV™I@VƒU@VVbUJVLUVVbUX„VVxk¦VJUnVxnVVUšJV@Ubl@@bXV@L"],encodeOffsets:[[111781,31658]]}},{type:"Feature",id:"500238",properties:{name:"巫溪县",cp:[109.3359,31.4813],childNum:1},geometry:{type:"Polygon",coordinates:["@@nLWbX‚VLVU„V@KšIVl@b„@lbšU„VnU@JÆU@V@n°KÄ¢Ul@VbÞKšVš@„_„V‚KXU‚U@KXƒ@wlkkU@mWKUU@UôJ@XV@ÂœaVmÞIVaVLƒƒ@»kmƒ@ƒUkL™U@aU@WWƒLUUU™™KkbƒwWa@KU@kaƒXmW—LƒamVk@UÂmL@JmVUšU@¯X™@Ä‹VUK¯@Ã…nWK™LkKULWK@UXK@wW@™LkV@bVLƒlXn›`¯xU„°LnÂŽlV@n°Lnl"],encodeOffsets:[[111488,32361]]}},{type:"Feature",id:"500234",properties:{name:"开县",cp:[108.4131,31.2561],childNum:1},geometry:{type:"Polygon",coordinates:["@@n@na‚I„wš@@VVK„LVbVxnVÆUnanKWÂXamKmk¯K@mkUm¯KVƒ°wÂÂ@Wm@UIUUlKUU@a¯KWanwmUXamKkÂUÂWUnU@KƒkUwWKXaWLUWkImaUUUƒƒKka±Âk@lƒ¯w™wmbUƒ™ƒkXm@UJkIW‚XXƒbƒmƒ„UJ™XUV@°šKlšlVXÂV@xmbnV@blV@VšœU`UL@V™a@bULlb°VXbܚ@V@bƒL@J„xnLVb@lVb@VÂ@@z˜bXWšX„KVLV‚š@@bUVVL@b„„lVna@ll@„zl@@J"],encodeOffsets:[[111150,32434]]}},{type:"Feature",id:"500243",properties:{name:"å½­æ°´è‹—æ—土家æ—自治县",cp:[108.2043,29.3994],childNum:1},geometry:{type:"Polygon",coordinates:["@@„Jlb@nVV@bXb@ÆlL„Ul`nÂVKU¼VxkbW„nlUxlXX‚@°°WnnJ@VUn@J„k°L@VlV@nUJ„x@bVVVz@VnLla„KnalVlIUŽ„¼@nV@@anKUwVal@UÂlJœƒlI@akU@UWÂXKVI‚¯Uak@@KmkXWÃœkXÂWykIWwXw@ÂlaXamkVUUym_XmlkkmmakwmIUKU@Wak@kaW@kI¯›WIk¦VŽƒUUƒmaUV@XkVUV±aUb¯b¯¥m@@ImJ—@mƒmL@kUKUkkJƒbV¦"],encodeOffsets:[[110408,29729]]}},{type:"Feature",id:"500235",properties:{name:"云阳县",cp:[108.8306,31.0089],childNum:1},geometry:{type:"Polygon",coordinates:["@@lb„LV„VVnblJVXXKWbXLVx„l@LmVXVVÂl‚nLWbnVmxXb°L@bVVkLVVVJn@@X‚‚œ_Wm„kUK@alUšKX@@xWL@VXLVKlLšKXLÆm@™mÂÂœa@mlÂ@mU@UUmL@aVšUU¯„U°`lknLlw±@a@wmLÂVWaXU@KWU@ak@VaU@™IUVmUUwVmUIlÂ¥UwƒUVWUaVUUKVIUa@UUUUJƒUUm™kƒ„nl@„@VWV@L¯aUb™Ulxƒ@@b@VULUx@VUxVV™U@bU@mxU„U@mUVÂŽklkkƒ@WxknlxÂK@amLƒKU„ÂK"],encodeOffsets:[[111016,31742]]}},{type:"Feature",id:"500101",properties:{name:"万州区",cp:[108.3911,30.6958],childNum:1},geometry:{type:"Polygon",coordinates:["@@ĸĊVI„ƒ„n„aWWXÂlJVIn@lWš„V„našx°xk„l@²Ž‚LVƒ„LnK@b‚LkwlmXw„@lllkUÂnVV@VƒnwV@@ašVUUVw@UVwVK@U@a„@kwšVVa°b@KXU@U@ƒmk„ƒÇÑÂaml™kUVmn@VULU˜m@kUVkUaƒwUWm@Uw¯„mKUUmVUUULUKU„W@XbWVkaWwkUU™ƒ™k@maUbmbVlk¦ƒxUVUIWVU„kJVVkL@UmJ™UUVU@lLUVU„lx„@@ÂVbƒJ™U™L¯¤@Vƒ„"],encodeOffsets:[[110464,31551]]}},{type:"Feature",id:"500229",properties:{name:"城å£åŽ¿",cp:[108.7756,31.9098],childNum:1},geometry:{type:"Polygon",coordinates:["@@VK@w¯L@m@UÃ…V@ImVƒU™Vkaƒ@@aUk™J@LƒUUVUKmLmbÃ…VmUUwUaƒKUL@U™@ƒxÂJmbm@ÂnVJ@X@VkV‚n™lƒLXx™@ƒb@bUVƒLU`UnƒbU@@ÂŽmVVX@JX@VLVVšklV—„‚`@bUL@V„LVKn@‚U@„UJkn@lmLmK@X@Jn@mb„nÞWVXnJ‚k„KČÑÆ@VK@knaÃœmXÂlUÄŒW°kôÇÆÂ@a@yÞ_VmƒUnU@K"],encodeOffsets:[[111893,32513]]}},{type:"Feature",id:"500116",properties:{name:"江津区",cp:[106.2158,28.9874],childNum:1},geometry:{type:"Polygon",coordinates:["@@„InWUUlU@LVašlX@°²lÃ’XxlK@Ul@@Un@UaVJ@I@W@UƒUUVUwVIUKUa‚UUÂVwn@Ãœx@XUlnn‚bÂœJ@Â¥VklKUUlk@ynU@kVƒUUVWnI@Â¥V£VWVIUKU@UVƒa@n@Vm@@nÂlUaVkUwƒJ@blLkLW@XWmXkmmLn™@m@U@UVm@™„UVÂUUlakUVa„ƒVkV@@wnaWUk@VwkƒlmVIkUUxmJ@U„™@KƒIkx±V@IUm@K@IUKkbWKUbn„m„@bmVnbmb@xkxUJ@ÂULW`@bX@WVXL@Vƒš¯„mk¯@UJ@VmLUaWnX@WJ@nkKkxW@UIV@@KkImmkK@UW@XaWIU@U‚ƒIkbWb„xXÂŽlLVbnV@bWlX@VxVLnl@nÆÞVÃœ"],encodeOffsets:[[108585,30032]]}},{type:"Feature",id:"500240",properties:{name:"石柱土家æ—自治县",cp:[108.2813,30.1025],childNum:1},geometry:{type:"Polygon",coordinates:["@@„š@kl@š¼UbmVXJ@bV@nxVIVJULVVk@@LWbnJVU@bVbUJ@blLXnWV—@mbnV‚@V„„bn@VJVLnaVanbl@„šVšlVXxlbXUWaX@VƒUUVwUUVm@I@WmI@a„mlLϪlK@alwnUV@kóVaƒÃÂk@UlbVK@™VU»VÂUÂUVWUƒ@U`ULkwm@@KmU@knKƒ»VÂkJkUmbƒLkbmK@UUyUU@aƒwm@@XXJ@VVLVVUbVnUJVX@K„„k`WXXJWXUbmW@bkL™Um`Xnƒb@JVL@LU@™°VVXKVnUxVLUbmJ"],encodeOffsets:[[110588,30769]]}},{type:"Feature",id:"500237",properties:{name:"巫山县",cp:[109.8853,31.1188],childNum:1},geometry:{type:"Polygon",coordinates:["@@kVƒU™bkKmbVxkLmKkllbV@@LXb„xlašLVšVV„KXXV@@bšVlK„V„@ln@¼°KXa„U@Ulw°JXalIUa„ÃWÂXW@kVU@ƒVUVWUUUamUÂw@aVamwn@VUUƒlLXWm£@wÇĉkKklmLUÒ¯ƒWn™@ğ±ÂkwmaÂWm¼U@@LUV@V@XƒVUnVJ„LWš@‚XXWbĸºVzXJVXV@@VXlWn"],encodeOffsets:[[112399,31917]]}},{type:"Feature",id:"500102",properties:{name:"涪陵区",cp:[107.3364,29.6796],childNum:1},geometry:{type:"Polygon",coordinates:["@@nèVblÄ–VVnLšŽ„@šx‚V„n@nšJ@L„UVVX@lbUJV@@nn@VVVK@z„˜V@nzVJVUlmX@@_VVVbnaVal@@knW@wnaƒÂVK@aVI„J@£kUVW@‚wXUVJ„amƒ@Ikƒƒƒƒ_X¥ƒ@WwkKkwmŽ™šƒkUxƒnÃ…mm¥™ÂÂWVÂ@Um@UlVL@JU@@Xƒ@UVkKVk™KVk™Kkb@bmJVXU„VVUbU@@`W_UV¯b"],encodeOffsets:[[109508,30207]]}},{type:"Feature",id:"500230",properties:{name:"丰都县",cp:[107.8418,29.9048],childNum:1},geometry:{type:"Polygon",coordinates:["@@Þè@XUK@LlV@blbUJ@„„V@bnV‚Â@VVVXU@ƒlbXal@VXnKV@maXUރ@amk@aVKXV‚anbš£°mnIVaUKVwUmWLUUš¯V@@KUK@I„aWmn_šVlK@anXVaXWWIXWl_ƒƒ@LUWVIUmVaUUUK@UWI@Wn@VI@mkU@U¯Kƒl@ImVÃ…LƒwU¤óbUU@wWÂXkmm@LU@@VUIWVUL@JUnƒaƒx@Jn„ƒbUIWVÂx@ÂŽUXlV@¤ƒIUJ@bUL„Žmb@xmX@lk@UbmbUaUU@`W@kn"],encodeOffsets:[[110048,30713]]}},{type:"Feature",id:"500232",properties:{name:"武隆县",cp:[107.655,29.35],childNum:1},geometry:{type:"Polygon",coordinates:["@@l„„w„bVm@IVKXUVJ@UV@@KnnWlXÂ@xVVôaV£„xÆKnUVm@UmIXm¯¯@ÂWÂkWVwmkXƒlaUwV»ULmÂk_ƒVkK@Ã…Wa@aUU@mkaƒIƒb@‚n¼ƒnm‚Â_@mmK@UƒLUVÂVmI@aUJ@XWJ@ÂU`UIkm±kk@@lULmUmKUnVšnlUVmI@VkVlx™bkIƒVmLUxkKUŽ‚Xš‚n¦Æn„mVw„lš™nÂlxlLXx„@W¦„`„„"],encodeOffsets:[[110262,30291]]}},{type:"Feature",id:"500119",properties:{name:"å—å·åŒº",cp:[107.1716,29.1302],childNum:1},geometry:{type:"Polygon",coordinates:["@@VšUbVJVUn@VLX@WVXVVI@VUVWxU@mš@ÄŠX@@¼V°aVUX`@_V@VaUUVƒUWnI@alašLUlšLUllLVU„@@WV@@IUKVkn@@VlLVwnK„UlJšakwlU@UnJVUmkU™VmXa@wVK@UUw™@VƒVI@akƒ@alInwlKXUmaUW@wWLk™™KVak_ÇaUƒƒV@šXbƒLVxUlWIk@UK@V™@ƒkU@VbUVUlVnƒLUV@lVXmxkV@L@V@Vk@WbUwmL@JUI@xVxkx"],encodeOffsets:[[109463,29830]]}},{type:"Feature",id:"500241",properties:{name:"秀山土家æ—è‹—æ—自治县",cp:[109.0173,28.5205],childNum:1},geometry:{type:"Polygon",coordinates:["@@XlV@lzn@VÂŽnbÆbXKlL„U„ÒV@@llUnxll@zšŽ@LU@@V°b@Vn@š„l@VÑUƒnK@UšU@aUaƒkVm@K¯wƒklmnn„Ul`nI@almkIUwmWVkUaƒkkJmUUa@K@aU@@_m@@wUyVUUa@Umƒ@aÂwlÂ@Wka±„UkUykIWV™b@bUVk@›aU@UXU‚UIWakUWmUxUV@nUVWbšŽ@XXVVÂŽmXXÂŽ@VƒbVLkVWx"],encodeOffsets:[[111330,29183]]}},{type:"Feature",id:"500114",properties:{name:"黔江区",cp:[108.7207,29.4708],childNum:1},geometry:{type:"Polygon",coordinates:["@@VX@V@LV@VJUL@lVnnxlb@VXV‚XV@@W„@UIVK@kUKna@£VWUaVUUalIVJVIUW„_lm@bXKV@mn@J„UUw@KnIVll@VanLVmUkVKXLVKUIVamw@ÂUaU_lw„KlwUWV_Ua@aUa@KUšwm›Â_›Ó@wU@™nkK@am@UkUKmXk`m@@I@K@I@mkVmIUxUJ@kUL@JVV™„lnklWnn`VzUVnlWbkb@ÂWxXxlJXzWŽÛlWXnl@Ll@Vb°UJWLXÂ@VlV@bkJ"],encodeOffsets:[[111106,30420]]}},{type:"Feature",id:"500117",properties:{name:"åˆå·åŒº",cp:[106.3257,30.108],childNum:1},geometry:{type:"Polygon",coordinates:["@@XKVXlK„ƒVL@UnV@aValXXK„U@WVwUaVU@IV@@aVW„L@U@anVV@@bVK@UVL@bnJWL@VnUnb˜@@JnIlVÂl‚@@bXIWbn@UKVLVKXLlaV@VVnK@bVL„m„IVƒ@KmknUUWVI@aVJ@_„WU_VmUwƒU@K™ƒVaÂk@am¯mJU_UJUkU@WÂkIV`UI@JVÂ@LmmU@@mƒbUzś™Â@„VK@nUKƒ„ƒb™akb@UWK@bkVVbV„Û@@`ƒXk@WÂŽ@n@lXL@bmb@VVJUn@JnUlnUlmX@`XLlbkJW@kzlb@`@b@b"],encodeOffsets:[[108529,31101]]}},{type:"Feature",id:"500222",properties:{name:"綦江县",cp:[106.6553,28.8171],childNum:1},geometry:{type:"Polygon",coordinates:["@@@¦‚@X„lVX@@UVKl„VUX@lanVlUVbXWVXVƒ„VVUnKVUlwUwU@UJ@nmVkUV™lwXam@VaUUUw@W@kk»mV@UmKkwVKVUU@@LUKVI@mV@XVWxnXVKUUUK@wWU@UUWnUlLXa‚mUI„amÂ@wÂI@K@amIm‚UUkI@m‚akUkKWUUanƒ@wƒamLVxk@UVmUUL@Vm@kV@I@ak@@bWVXJlLVbVL@š@bn@@`Un„@WbUKULWVXbƒ@UVmbX„WVƒb@bÂVmxUKUƒV@šUn@V@V@nmšnKlnnWWXX@lKkK@a„IVxUlVb‚k@mn@@U@m„bVUV@VLUJUXU¤"],encodeOffsets:[[109137,29779]]}},{type:"Feature",id:"500233",properties:{name:"忠县",cp:[107.8967,30.3223],childNum:1},geometry:{type:"Polygon",coordinates:["@@VLÞĊ„U@WšÂ@¼V‚„@lk@w²mlšVUœ„llšVnI@VlKUUlIVƒXUVJVU„wlÂ¥UkUKUIm@ƒaUƒÂ@mUna˜@XUWmkK@aVIUa@aUVmIXa@Kl@UUVKUIUJmwU@@aWInUVa™»k@@lƒ™¯n™¤maÂbWUUL@bnl@bÄWVnbU@mLUWk@Wbka@„WVUU@UÂÂmUmVkUULV„lVUx„l@L@VƒbÈÒlb"],encodeOffsets:[[110239,31146]]}},{type:"Feature",id:"500228",properties:{name:"æ¢å¹³åŽ¿",cp:[107.7429,30.6519],childNum:1},geometry:{type:"Polygon",coordinates:["@@XLV@VV@b°°nšƒnkb@bƒšnJWVXblIUVšxWnUJnVVLVU„JlUnLVK@UnUVJš²nKVbVKla@aXÂlJ„k„Klb„ƒ@U°£šKšV„IUa@ƒ@kwVƒVUkKV@VUkk›ƒUVk™±n@xklƒ@UÂ@»™‚@XƒVÃĉUJnxWbÂ@UX›KkVUbUKWUkVmkkLU`›b"],encodeOffsets:[[109980,31247]]}},{type:"Feature",id:"500113",properties:{name:"å·´å—区",cp:[106.7322,29.4214],childNum:1},geometry:{type:"Polygon",coordinates:["@@nxnVlJlUXLƒ¦@x@Vl@nKVVX@V_V@@KlVXU„@lKlxXIl@ÈĊ@Vl@n_VJlÂŽnÂVlnb„²VVVJVÂVmUUkÄ•UamçUÂ@»W@@ĉn™V@XwVU@UUJWUXUW@UKm@UVUIVaU™UVmLUVƒUU„UWWXUakVmUkbW@UVkƒUL@VW@kUWƒÂ@mJUXVVU„@lmV@zklVVkLUl@¦›I"],encodeOffsets:[[108990,30061]]}},{type:"Feature",id:"500223",properties:{name:"æ½¼å—县",cp:[105.7764,30.1135],childNum:1},geometry:{type:"Polygon",coordinates:["@@@a@a@_kalyX@lIkaWK@_nWVkkmmV@IVmUI@Una@aWK@k@mkbWaknmJUk@mk@@kUal@Uaš@Wa@aXLlwUKlkkƒ@KmI@VUJ@Lk@@VUUmL@amJU£kKUaWakLmU@bVVUbnbWV@xkL@bUb‚xUxVbXJVbUVWIUVU@kLWxkKWV@n¯VUbU@@VVX@VmaUL@VUK@VVbn@lVnI‚@@lnLULm@Ub@ÂŽl@na„@lK@XVVkJ@b@zl@@VnV@bVb@J@bnXV`lXXmVI@W@InbV@@aVKUblKVLUanLlmnLlK"],encodeOffsets:[[108529,31101]]}},{type:"Feature",id:"500118",properties:{name:"æ°¸å·åŒº",cp:[105.8643,29.2566],childNum:1},geometry:{type:"Polygon",coordinates:["@@@b܄nWVLX„lxV„VxXxlVn@@bVblK@a@UnLVJV@@UnLVU@VXaVKVXš@n`WÂUÿ@IUKlaUUUkWyUÛÅÃ@mmkUKUwW@Xk@amUUakKWƒwXaƒK@VVLklƒXVlkxV„UL@bm@Vxn`ƒIVxUVkLVšUšl@@lkXmmƒVUn@VV@Xb"],encodeOffsets:[[108192,30038]]}},{type:"Feature",id:"500231",properties:{name:"垫江县",cp:[107.4573,30.2454],childNum:1},geometry:{type:"Polygon",coordinates:["@@šĊ°¤nҘ¼œaV_lKnllUXVVLValUÂœLVW‚@XamwVIUKkaÇфa@U@KƒkVwkUUƒVKlVnU@aƒU@ƒVIka@akU@KVL@WÃçUV@Vmbů@L™KƒnnJW„ƒVkxlL@VX@VxmnXVWxUb@bkn"],encodeOffsets:[[109812,30961]]}},{type:"Feature",id:"500112",properties:{name:"æ¸åŒ—区",cp:[106.7212,29.8499],childNum:1},geometry:{type:"Polygon",coordinates:["@@@bVVXL‚a@lnbWn@L„@XVlK@VVLUVlbkLUKVVVL@VšnX‚VL@VV@UbVb@x@¦UxVb@bUJƒL@L„VVxlK@™nk@U@W„UVLlKXV„@VblU@UUKVU@wn@VJVanLlkX@VaVK™¯@a@U@U@ƒVaUK„kUUımaUkm@UUkbm@@Vk@@JƒwU@Ub@I@JmwUL@aƒ@@KkVÇLkƒWkƒ@kUU@@xUVmKUnllUb"],encodeOffsets:[[109013,30381]]}},{type:"Feature",id:"500115",properties:{name:"长寿区",cp:[107.1606,29.9762],childNum:1},geometry:{type:"Polygon",coordinates:["@@VVšU„bX‚lX„¥l@XnVmlxUx„@@blVnnôĀlm@aVaXwWUnmUwW@@UkKlw„UXƒmI„mšL@KÆ°na@UUImyU@ƒ—@yULUUm@@mU@VIkaW@UUƒV@K™I@mƒmÂU™wƒ@™ÂmKUnU‚UIƒlVLUb@„@V@V@bš°ULUbW@klmKUbUIm@@xUVVL"],encodeOffsets:[[109429,30747]]}},{type:"Feature",id:"500225",properties:{name:"大足县",cp:[105.7544,29.6136],childNum:1},geometry:{type:"Polygon",coordinates:["@@XUmaVaUU@anVlKXbValU@aV@@IXKš@@bV@VxVK@UXLlUšJXa@_‚@@aVK—ÅWVkwWaƒƒwUa@am@kUWLU@kWmX@ykI@W@UV@na@LlLV@UƒkwWƒUKmXX`mIVl@bXLWVkbkkƒx@`VXm@@J@U@UUKUxk@WbUIVl@VXLW„ƒJUkUlUImxXlmb@X@VUJUnVbšW@UV@@VVX@bnW@LVxUnlJUV@n„@VxVIn@l`„UVVVL"],encodeOffsets:[[108270,30578]]}},{type:"Feature",id:"500224",properties:{name:"é“œæ¢åŽ¿",cp:[106.0291,29.8059],childNum:1},geometry:{type:"Polygon",coordinates:["@@VblLV¤nI@bnKVV@Ul@@KVI@UnJ@Ll„klVLkxWK@bXb™@Vbk@Vb@ll@@nVlnIlmXblaXÂl@„W@_Ãœ@UƒUalU@aXL@Vlašb„a„ƒVL@mUL@ƒUUƒƒÇÂXUW›X_WaƒƒUƒÂ»m_™@UWULWb@UUVmK@VU@UImK@V@bkL„x‚„XblxXU˜ÆUL@bÂ@@`Wb™IkVWK@VULUwU@@a™@WL@JU@@bkVUb"],encodeOffsets:[[108316,30527]]}},{type:"Feature",id:"500226",properties:{name:"è£æ˜ŒåŽ¿",cp:[105.5127,29.4708],childNum:1},geometry:{type:"Polygon",coordinates:["@@VI@U@WnaWknwVJVkVl„IXƒWK@UUkVJXal@VwVL@V@V@In@UW@_„wlllaXUWK@aUknJW_ۃ@aWaU@@UVm„UUaUImJVnÃ…UmVÂUm`kUUVWLnVU@VVmXƒK@„nxmÂŽULkx™ImJ@nU`@X@Vkn@`@nlV@nVJVaX„VLnK@bVV@nV@lbXWš@"],encodeOffsets:[[108012,30392]]}},{type:"Feature",id:"500227",properties:{name:"璧山县",cp:[106.2048,29.5807],childNum:1},geometry:{type:"Polygon",coordinates:["@@XzVlVVkbVL@JVÄ€XŽ‚¼V„„„XbW`XÂœWVȎ„„VVšŽVkV@@UXa@alK@IƒƒU@UKWÂUyUI@wVUUWVak@VUkƒW¹@WXI@yVIUK@kWwkѯ±W@™kUb@KkVVVmXƒJ"],encodeOffsets:[[108585,30032]]}},{type:"Feature",id:"500109",properties:{name:"北碚区",cp:[106.5674,29.8883],childNum:1},geometry:{type:"Polygon",coordinates:["@@X‚VLV@„„@JkL@bWb@VU@UlƜVy„a@nV@nn@KUÂ@IVJU_lJXÂV@VlVIV`nIn°@b‚lUbš„„KVI@aUaVw@Â¥@wUaVaU@@UUKW™m@UUKUUVLlKkaVUUK@UkLWUƒ@@KXmma@kÂbWKUU@aUamLnÞ@VWLk@@Wm@ULU@@U™KUVWI"],encodeOffsets:[[108855,30449]]}},{type:"Feature",id:"500110",properties:{name:"万盛区",cp:[106.908,28.9325],childNum:1},geometry:{type:"Polygon",coordinates:["@@VIV@@wVJ@InKVxXal@@U@U@KlUnwUW@kVU„KUmVkUa@I@KW@@bk@@mƒU@m@k@a@aƒIUxmJk@ƒwULƒwkKmVVX@VXV@xVLVVULmWXwWUU@@nUJVL@KV@UVULlxnL@VnUl¼@l@XVxVVUbn@WbkxUšlVnU@m"],encodeOffsets:[[109452,29779]]}},{type:"Feature",id:"500107",properties:{name:"ä¹é¾™å¡åŒº",cp:[106.3586,29.4049],childNum:1},geometry:{type:"Polygon",coordinates:["@@XK‚L@Vš@XbV@lW@UV@@VXIV@U™VKlL@KnÂnJ@VV@VU@I„@@mVUVWUUmL@V¯LUK@UV@UU@a@U@yU@WLUK@X@KUVmL@ƒ@aXI@w@ammVk@WÛwm@UxVÂÂVVbVLUJVxVU„V@V@X@JUIVbm@@Vk@@VkL@lVLUJ@zWJ@X"],encodeOffsets:[[108799,30241]]}},{type:"Feature",id:"500106",properties:{name:"æ²™åªå区",cp:[106.3696,29.6191],childNum:1},geometry:{type:"Polygon",coordinates:["@@Xºl„UVl@UbVXUV@xVJVzXJVUšL@VV@VKn@@Xl@XK@UmÃnKVbVakkVm@k„ƒUK@UmImÂ@LkKULVšU@WJ@UU@@VkXU@Wa™@@UÂKWL"],encodeOffsets:[[108799,30241]]}},{type:"Feature",id:"500108",properties:{name:"å—岸区",cp:[106.6663,29.5367],childNum:1},geometry:{type:"Polygon",coordinates:["@@VV„JVL@bUVVnl`XIlwXJlw°nnl‚IXW@UÇĉk@WJkwkLƒ@WVkU@LU@U`W@UXUV@n"],encodeOffsets:[[109092,30241]]}},{type:"Feature",id:"500105",properties:{name:"江北区",cp:[106.8311,29.6191],childNum:1},geometry:{type:"Polygon",coordinates:["@@nLVU@wV@lV„@Xll„ÈKlU@L„@@bVKnx@I@JVaV@„x@Il@@Un@laVVn@mÂkÂUIm`k@WXÂJmk¯mkxWIkxWJk_UmVUUKƒ@UU™@ƒ„@l"],encodeOffsets:[[109013,30319]]}},{type:"Feature",id:"500104",properties:{name:"大渡å£åŒº",cp:[106.4905,29.4214],childNum:1},geometry:{type:"Polygon",coordinates:["@@k@@U@w„¥WKkVkImUmwÂa@b@xWJ@b@„nKVU@L@WVLXKV@@z@V@bVVU@@VVL°K@U"],encodeOffsets:[[109080,30190]]}},{type:"Feature",id:"500111",properties:{name:"åŒæ¡¥åŒº",cp:[105.7874,29.4928],childNum:1},geometry:{type:"Polygon",coordinates:["@@WwUwU@kK@KmbU@@V@XlJ@znWlXV@XK"],encodeOffsets:[[108372,30235]]}},{type:"Feature",id:"500103",properties:{name:"æ¸ä¸­åŒº",cp:[106.5344,29.5477],childNum:1},geometry:{type:"Polygon",coordinates:["@@VLš@VV„@VL@aUKƒIUUƒ@@JUVU@"],encodeOffsets:[[109036,30257]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/fu_jian_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"3507",properties:{name:"å—平市",cp:[118.136,27.2845],childNum:10},geometry:{type:"Polygon",coordinates:["@@@knyƒk@ƒKU¥šwV@nkƒWƒzUmk@@ÂlKUa@aVI@UƒKUamKUUVaUI‚@Xƒ@UV@K±IUVVlUbUbUL@KWUXmWk@KkXmmkŃKUĪa@amUƒbkUkKWUnwUĂwV™UUƒÃUKV£U™@ƒnKWwXLVKmÂ¥@wUXkmWk@ƒ@wX@lU„@šyVImaXwVƒƒ@kŽƒnU@mbk@mlUXƒmU@mV@n@bnW@bUIWJ—ImVUKWbUK@nkKƒaU@W_ÂVUUmWmL@UU@™bUWUL@V@bmVUz@`mUUVVbXL@V™L@lmLUxmVÂamXkW@xWbU„VbUxkU±@Ã…UmmkLUbW@@`kLknVlV@lbXxlVUXVV™ŽU„U@UbWÂŽkIWVUUUJkI@llbUxVL@V™VƒUU°ULUmWXUV@VULWbÂ@™xm@UaVLVKUa@ƒÂw@V›bkÂmVÂambUUm@@VkK@„@b„xlxX@‚„n¤@Xƒ@@lkLWV@ÂŽn„V„kb@bWJXLWx@nkxmm™bXn@VWVUn@VnJ@bVXl@„™VJXnWbX`lL„UlJVI@ÂŽÂœ@VXV@Vl@bn@@Æmn@VšxXU@mVIlxšVššnI„l@nVJ‚aXI@mlU@aXkVm°klmnVV_naš°@V@xܦXK„V‚nnUlVXbVK‚LXKV@naV@@ÂVVl@@lXblXšWnLlbVK²nš@@‚VLUnlV@lƒXÂxô°‚V@UnaUUlKXLVUVVUbVVlUnJVX„@VW@an@lb„@nÂl@VU@anƒšUVW@kƒaUm@InVVKVU@ÂkUW@Uam@km@kVa@a@™nwšU@WlI@mVI@WXaW_nƒ@™nƒlkkW@U‚¥@kV@Uw@wUƒ@@IXK‚¥VIn@nU@`@Xl@VV„LnašW‚bVaUwnU„@VIšKlV"],encodeOffsets:[[122119,28086]]}},{type:"Feature",id:"3504",properties:{name:"三明市",cp:[117.5317,26.3013],childNum:11},geometry:{type:"Polygon",coordinates:["@@lL@Un@VVna‚bnUlÂÂœa@U‚x@„VbULUKVbn@šw‚@XaVK@UVUXWVnVKV¯„VšU@UUKVwka@klJVIVVXUlJXÂVaV@VƒšÂUUVWkUWwkaU@UklmlK@_X@ValKnnÆV²@lVVwUaVƒXa@wlXnW‚bnUVwnK@kšK@UWKUaVUnV@_VynU@a@UVKVXšaV@@VnKnXVV‚UX`V@„blL@mVLXaVLnU˜JXIVJ@amX@a@mnUV@„nVWnkl@naV@„ml„@@KmÂÂKUam@UU@ƒ@UlKU™Vk™U™K@aVaUwV™UÂ¥UIkJ@wmI@‚mbkwkVW@UXƒKULU`™IVKUa@LƒkkVmUU@WlULUWÃ…U@I@ƒWW™nU@@w@a@ƒUam_XyVIVWkkƒ@mwVKXUV@nw˜VXkWƒÅ™U@ƒaƒU¯KUnƒK@ƒ¯šmUƒLXÂŽVLnWVbVbUVm@Ub¯¼W@Âamƒ`kb™amLUUUĪaUXV`@x@XmJ@n@L@xkJUU@kU@mWm@kUUwUUVWl@VUkIƒy@kkaVUUm™IWVXbWxU@k„mVkK@nWVX¦WxU@@bkx@VU@WÂŽk@™kUbmJUUmkUW@_kKWKƒ@knV¤kIUKWLUbV‚Â@Wbk@@VWL@VkI@lUXVxUVU@@mWIƒV@a¯nUaƒaUV@„ƒJ™b@bÞ°VbUš@X™aUVmL@‚VXÂblÂŽnV„°˜n@Vnx„@VUUUlK@InJVb@„Vlnn@V™L@VWJU„Âx@XlJUVVÂVl@LUUUJ@Lƒ„@lUL°¦k˜V„VnV@„xV„„l@blLnlšLVaXll@šnVUn@‚xn@nml°‚X@lb"],
+encodeOffsets:[[119858,27754]]}},{type:"Feature",id:"3508",properties:{name:"龙岩市",cp:[116.8066,25.2026],childNum:7},geometry:{type:"Polygon",coordinates:["@@ša„I@ƒVU„bVb°m@b„UXJ@nV@VUUwVW@klJ@UXK@Ul@Xa‚@UÂVaXKVLlJU£lm„@XLlL@`VXnlVVnIVašll@XÂV@@Ulw@aV@XwWÂ¥XU@mlLnUlƒV@XwWaXUšJVnUVlb@l„zlJUVk@UXVVVxlVn@nXV@@lVVlI@w@K@mnI@W@wU_VWšbV„VVnKšbla„_n‚bX@°»Van@VUUaUamXUKW„K@a@Ukƒ@wWkXƒWW@wUU™KÂw@_lyƒwUkU@@Uƒ@kamVmƒXašUVUka@ÂWk@»UUUVƒKkbWU™VUbk@mkƒxkƒƒKnIVUmW@kUKmXUmVaU@kU@ÂmÂ@KÂUWVkIWJ@ÂŽU@UI@wUUUa@KW»nU@mVkUmm@XwWU@ƒUUmLÂ@ƒw@mnƒVÂUU@aWak@@amxU@UxULWVXbVLU`mbUImVU„ƒbn‚V@@bVn@bnVWxÂLmyUbƒIUKƒ@ÂaƒVm™akbV‚UXW„UlÂKWbkV@„WLUlk@@nšbƒb@lkKmU@ƒUIWJkw¯UUVVxm@@XkbWx—›XÂKƒlUzWJkUUL@bmKkVƒ@@VUIUlWV@X„K@VkbWx°xUb@LUbk@@VWb@LXJ@VWXU@@bUVV„VVn@VVlLn„@l„@‚xk¦Vx@bVJXbƒn@JlnXxV@@„nJ@X@V@lmx„bUn@xVL@VVKlL@l„„nLVaVL@xkl@LƒxVl°š„X„WVX„Vl„œJWÂnxlJ"],encodeOffsets:[[119194,26657]]}},{type:"Feature",id:"3509",properties:{name:"å®å¾·å¸‚",cp:[119.6521,26.9824],childNum:9},geometry:{type:"Polygon",coordinates:["@@@LVKVaVaUkVU²J@LVU„@@W‚ÂVJUbVVnLVb„L@VUJ@bVbkL@ÂŽl@Vn„y„XmlU@™xV¦„L@Ž„lmz@lnL@bVVšbVb@l„nšKVk„Vl¤@zXV@šl@XJVLVKnXVK‚VnU@wUm@šKUƒ@UlVlw@U@U@ƒUaUKlU@kXKlmXIWKXaVIVUVK@KU@@k„JVUnLVJUL@V‚IVa@VnLšKUnl`Vb„V„ÂV@š‚Vbn@Vzn@lKnVlI„VVKUalkXJl@XXVWVLVUUmVU@Unm„£lK@Uk@WUXK@U@WVwVkšƒĠkĢÇ°aUÃ…UwmaţƒɱUÇa™w„±V¹XalKôx„@„UVaÜʓͿVóbÃ…LƒJm„¯Vk¦ƒŽk@mamXkKUƒUL›akbk@mV@LkJWb@Vk„mXk@UVmaUV@amLUKUamI@KUaU@WbU@UUUƒUIWJUkm@šƒw™Kk„VJm@kxÇÂVƒUKÂ@mUVUkmlkkVm@ÂamwƒLVWU@UbVLkšUbƒ@VƒmK@ÂXaVWU_VJnwV@@kUmWakxƒ@kwWakIWxnbUJ™zƒ@kVW@@x@„XllnVW@xn¦ULWKXxmL@„VšU¤VL„ÞVVUšÈxV„mxXVlLlV„anV@bšbV„„LlÆnnlW@LXlWnXV"],encodeOffsets:[[121816,27816]]}},{type:"Feature",id:"3501",properties:{name:"ç¦å·žå¸‚",cp:[119.4543,25.9222],childNum:9},geometry:{type:"Polygon",coordinates:["@@lxna@ÂnJ@xlIVJV¦UšVxUb@bšLšVUlVškL@V@„VVn@Vb‚Ln‚@LU„lJXblx„@lwXbVn@lU@mxUIV`UXWb@‚nLU„„@Val™UKVaV@UX„Knx‚bn@lUkllnUVnV‚@VLU„È‚lwn@UIlƒšL„x‚™n@VlXIVJV„VVV@XaV@Vb@LnJVbVLnK@bVUnbVUl@nWlƒ@UXalI@KnUl@laÂœbVKV„lLnWnbl@„Âl¥°Unƒ„IÆKôa΀U„a@UUwÇWÇ“IUWUÃ…Vkƨm@ƒ@£@KmLU¤ULË£J™kUƒVÇŸUUÄ·@ĉVƒKUk@Ñ°wôǚç@īšé@Åţ¥mīÛkm¼Å@ƒVÄ·Vó°Å¦U°ƒn@bVJXVVL@bUŽƒakLmx@xmxXzW`XbWnXV@bWLÛ@™aƒ@ƒaXbWVkaÃwU@mlÂÂWKkLWWkLUKULW@kVmVUUÃÂUamV—¤›n@xUVUzkJV¦lJU„"],encodeOffsets:[[121253,26511]]}},{type:"Feature",id:"3506",properties:{name:"漳州市",cp:[117.5757,24.3732],childNum:10},geometry:{type:"Polygon",coordinates:["@@@bl@Xb@bVVUÂŽm„@n„x‚@nKVV@„XVWxn@VnUl@nmVX¼@LVbVV@xVJV@@ÂXIlJXU‚V@Ln‚@ÂlVV@UbVnnWVL@lnXUVmJ„Ll„„wnll@VašUXVla„LVUVV@¼Xl@ÂlbUV™VWbn„nUlb„@@VV@„aVUšmlÂUašUny@kU@Wkk@WaUVk@@ammk@@U@UlU@aUa@wl@šmXLllnL‚U@anVnU@L@VVV@KlXnWVnVanUšw@w@wm›nÃ…@wƒaUam@Uk„mUÂl@@a„a@U@¥škôK‚wȯ°w@Å»kwÇ•aÂK›ÑÛk@Ä•Åřċ£ĵƒUKW»kÃ…Å»LU@UlÄ¡w@¤Vz™VUbkKUbmLmlULU¼UxmbXl@bWVƒb@bUnV‚UšVbULU@@VkbVL@`U@WX@ÂŽXV@b°„@b¯š@¤@Xm@@b@`U„VVUL"],encodeOffsets:[[119712,24953]]}},{type:"Feature",id:"3505",properties:{name:"泉州市",cp:[118.3228,25.1147],childNum:9},geometry:{type:"Polygon",coordinates:["@@Vl„xkz@`‚xšLVV@xXXW„Xl@xl„@V@bnV°™@„„LVm°L„V„bV@ƚX„Wl—UmxU@WVULnx„@llUXUJWzn`Vb@„@b@xV@šmXX@„@JÆVVXVKXkV@nVlU„l@KVbULšJV_VK„LVWX@lUVƒkIUÂ¥lIVyVU@wÂœm˜£nUVWUÂ@aƒm@UÂmWw@UX@@am™VUn@@aUUlUVanaWUXWmUnkšK@VšUlVVUUwš@XLWWX™ma@knm‚bVb„VXbVL‚@XJlInlšL„w˜mXóšw@çV»ÇçŋaķƧóƅóKġ°nÃ…UÄ·Æ‘UÇW@—¯xÇ°öÆlÂV„n@llšaš@„Lšbƒ`™@™„VšXVƒÂVx@V@bULVJUÂk‚Ç@ƒ¼ƒXUKk@mmULkaWbk@ƒx@UkL@a@K@U@UmKmbU@kV@UmVUbUmmXkW@LUU@U@KmVmU@bÂVmKkkWK™nk@@xVb@bkV@V@Vl@nn@bl@VUXbl@XlV@@lmz™VVbkŽ™nUVƒb"],encodeOffsets:[[120398,25797]]}},{type:"Feature",id:"3503",properties:{name:"莆田市",cp:[119.0918,25.3455],childNum:2},geometry:{type:"Polygon",coordinates:["@@VbނVVnUlUX@VKVLlKXXlKXL‚‚nkV@ÞxlbXUWa„b„@šbÃœ@XK@aWUXmWaX_Wynw@wnwlK„bVÂ@aUKWUUI@a„mV¯Ŏ¥ô¯ĸU„UÆ@n»¯aƿé@ţ¯nĉĬÃK™óó@™ÑU¼@è™xWô—nƒx™KmkkJWIÂ@UKWaƒUUaÂamn@lnbWšXXWK™@VxUVkU™V@U™LmlnVWXXVmbUbkVVV@bm@UVnš@bW@@VXx‚n@V„n@bV‚UX"],encodeOffsets:[[121388,26264]]}},{type:"Feature",id:"3502",properties:{name:"厦门市",cp:[118.1689,24.6478],childNum:1},geometry:{type:"Polygon",coordinates:["@@@VlUV@nanL@V@V@L@blK@V„wl@XalbVKnnl@VL„W„»È@lÂVÂUIVK@a@UUw„ÂWUU™šƒš@„_™aƒK™@™bkkm@UƒkÂõÅÂxóL™l@¦@Vƒb@bk@VŽƒnVln@Vb„b@xmÆnÂœ@x@x™x"],encodeOffsets:[[120747,25465]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/gan_su_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"6209",properties:{name:"酒泉市",cp:[96.2622,40.4517],childNum:8},geometry:{type:"Polygon",coordinates:["@@ÇnÃ…aĉ@ƒU¯¥›UŹ‚ƒ£™WUýUU±JkkUw‚yÞIÄŒxĊĕĊ¯š¥ÆUkţ™UÅÓ±¼™IUx¯UƒÒƑ‚ÃÂÅ°ƒKÃnğ°ÅU@Žƒ@Vn@þš¼¯šWnŎ°XLWlnVnbWnƒVXxmbƒa—bóUƒlÇ•UUa™IUmlU™ƒš¥™kƒ¥ĉwkkƒÃÉ›a@¯™™U¯°mVƒkÂVÂnKlƒÅÑÇÑU@kl™UÄ¡ÂŽkUÅ»nUW™@š¯ƒÂk»šÂmWV£UKnUƒmUw‚w@ƒUIVaX™šwm»Èmmwn¯ċ™¯LĉŽUƒJUalÂka±VÂa@U‚k@ƒÛф¯WmnÂUaɤÛÂmƒn¯m±x@wóxÛLÄ¡Ã’Ux¯VƒÈ™JUbózÃĂKĉ¯ÅlÃUÃ…ÂŽWÂÂl¯nÅ¥bÃ@¯ÂÇ©LÄ¡ÂmV@ƯĢkÆm™ĊkVÅ¥LɃmÃXó°@„ĢbVŽóVæɱ@Ƨaġ„UV„ĠÇÈV¼UVÅ£wmbÂJÇwË‹a™XmǯKkkmŽƒbXšm¼V¼ǬŚ²¤ôŰÆƴôÌŤǪnɆӨ¼ɆLÆłUĊšxŎƞȘǔˎǬǪnƨŮǬö°»šġ„„ÞÜÆĸÒĊ„ǀbƾèôÈ@¼¯þŤĸƧ°VĀ¯b@lÈĊ‚šʠńÌ„ȘKǀŽֲॗţÿǕý@ÂʊǓƨóÆÑǖŃôw@΋ʈƆÅÈVVÄŠV„óĊÅ@ÞƒĬV@Þīš@°Ž„V@ĸĢƒ°XτƜĠ@ÈaÜ¥Åƅ‚™nğóĕVÄ¡Uůƿŋ—ĕƒa±V—UťÇğÑ"],encodeOffsets:[[101892,40821]]}},{type:"Feature",id:"6207",properties:{name:"张掖市",cp:[99.7998,38.7433],childNum:9},geometry:{type:"Polygon",coordinates:["@@ÈÒŎÒk„mLUÂŽlÂŽU„¯nV°šš@°ɜb„ÞĠaÈ»ĸl‚š„LVUÈ@ÄŠÂ@ýUm„@@ÂÆVĠ¯Þm„LƯÞƒ„ѰVVwšJ²»ÆԚVlŤÅV™¦ĉ°ĉĖċwÃJÂzVxll²IVVVþšX„¤źÂÂœV°¦„VÄŠ@ÆbÈmÇ”LĸÂĠ¯Ģaô¯ĸmÆÛUƒlÇĸk°ÂXyÄŠUÇ”V„ǩnmV»ƒa@ýnK°Ân@lÂ¥@»ż„Ċ¤m皃@£ČU@mƒmVkÞUƱ²¹°‚ĠwÂÅƑŃU¯™›V¯aÈÅšƒÇ»™ġn_°xÅŽKlxÂœklx„@Þw‚„„@Æm²b‚DzLlkšWXať¯ĊaœÑšK±w@wƒUÅçV±Uk™@@„¯š¯xƒU™±±UU°ÅxVxÅÔÅ°ó¯UÂæóbÃþƒ@ĉÈóUV‚Ux„„@ÂVÂŽUVÃwÅÈǎóVkk¯JÇÂkmmL@„™KÇx@bkš™@U°ķ²ó`ƒÂš™šmn¯°ƒUwlÃ…kUƒ`™¦ɛô™Žķz@ÂŽÃ…nÇ°U¼¯KmVk²ƒJƒ¼ÆÞķôš¤ULƒ@mnÄŸ`™šÇnUxÇ@Ûÿ™U@ƒƒkŻŽ@xÂ@mÂóJkŃ¥VÂŹĉóÒĉlċ°ķ„UÂƽ܃ÂÂ@›x"],encodeOffsets:[[99720,40090]]}},{type:"Feature",id:"6230",properties:{name:"甘å—è—æ—自治州",cp:[102.9199,34.6893],childNum:9},geometry:{type:"Polygon",coordinates:["@@Þš™nKlnšwXÂ¥WÃXk˜xÞUnƒ°aÄŠVnUUKlÂÞÂĶWXnĠ¥ô»„™@ÂnmVL@¤°™Vz„JšanU@aÆwna@k›ƒU¯šyX_›aĉb™ƒ„wĎXkWwÃ…aš¯VÂ¥mƒ¯ÂUƒƒI@ƒš@„mšb°aÈçšUš¥@»‚knwɜƇ°I°ÑÈmVU™¯Xa@w‚W@wšÂV¯Č¥l¯Uwnm@k˜aUaóKkk@™Ça™b@ÂŽÂÃ’Wa¯IÇxÛam¼™VUƒxÂÃ’l‚@zÃÒ¯bÃaĉVĉwDŽÂW›zÂJ™ÂmJn²mܯUƒ¯ĉ@ġ¤Åb@²nšmlƒ@@Ž„„U„ƒLVxšV™„U¼Ålma™b@ƒ°™lÂ@WIUƒ¯@mĪ@™™ó„™„@U›zÅ£yƒXÂÇU™ÇVUUVLkbWakVWmUbkkƒKUÂÆ»nƒ°Knk@aƒUVmšnk»l¯Ģ›lw@_kKVU@ƒnaƒ@lUk@¯¥mV@kmbÂW™b¯Åõa@mkU@ÂkƒÇŽkU@›`@™óó—bl¼Uxƒn„¼šlVȄx@blVkVVnƒ`XÈġÈ@ǃK£ÃJmUUnUÄ–mlU„mKUn™VÃ…aUw›Uĉ`¯n¯wW¼nxVŽ™š@bĉnƒ‚kIċŘkXUŽ±Ò™xšÈ@ÂŽX°`l„œV˜IȯĊV„ƒšVVan@VašUVażÂVmšblkÈW„ƒWIXa„alL@wVb„„V„¦lL@lĠ™n҄U‚nk‚šL@ÆÞkšÞšK‚bñþW¦Û„ċVƒ„ULUºkÈlÅŽUxÆxÞUUxšÒ‚x„@XbšL@lÆ@„ÒlXVln@„bm¼ƒJ@„Ån„šƒx@bnšĠm„xVXmbÈè@ŽĊ£ČW˜w"],encodeOffsets:[[105210,36349]]}},{type:"Feature",id:"6206",properties:{name:"æ­¦å¨å¸‚",cp:[103.0188,38.1061],childNum:4},geometry:{type:"Polygon",coordinates:["@@±¯ÂÂ¥@klwU»ƒƒÞÃmwÂKm¯™™ç@™kVÇUL¯lVÂUKġ„ġm@a@U„@X£°l°LŎÇ@aÅVÃw™ÔƒKUŽÅš„ÂWJ¯Âlm@ÂÛVWa™@klĉUmaƒLUanaƒ™ƒk¯J„™™±KkXóÜÅxƒ²Ç‚@„„nUÃ’ÄŠb°@™ÆkL™Ž™XÇÆ@xÃn—xWxţ„¯¤ƒI@Æn„ƒVV„VlU²Æè„V@x²x™L›ÒĉbŦ°Wb™Xklބš@l¤šXÄŠ`„wl@ĢÈŎm@bšnV‚Ubƒ„@șÆÛLƒèǚUÒŦlĸ™`°ĮʟÆǓbĉôϚĊƚĢnŤé΀ÑĸĀĊ¦„@@l°lœ¦Ȯ¦ɆÞĊKŤÂ™ĵĸů„»mÅÂyġ™ķŭ@Çɱȭ¯mƧUÄŠÄ·nÅŻ»UaU™˜ƛɞÃƨů"],encodeOffsets:[[106336,38543]]}},{type:"Feature",id:"6212",properties:{name:"陇å—市",cp:[105.304,33.5632],childNum:9},geometry:{type:"Polygon",coordinates:["@@šÈÞ@l`UÂmVƒ¼œŽ‚@nnÆwVlnVVa„LVƒÈ_‚ÿރ@n„a„xÆ@„lš_š@VxnK@llLnxmÈŎJnbUxšI°Žl@n¦‚lÈIlmX¥„k°@šk‚J„k²é˜@kÂlaUaVaU@@ÃnIWÂnmnx‚k„ºÞ„„aV™°„V@nw‚KšxôbÞ£šVšU„bšþšLn»mƒVw„IšJ°Ž@„nb@°°I„ġUkÇKVƒ™™@ů»lƒ„Lnmģ@anK@ÑÜÂnÂ@»mL@£™yk„UUmbUÞÃ@kyÇbó»™XUxƒWVzÂb±mÃbXaƒwUamL¯»@wUKVwm¯ĵJ°ÅUWVk„KVk°wÈVšÂVуlUšƒ¥šÂkmVamknƒUw¯¯ƒbċ¥ÅKƒk™Kk„™VÄ‹Vk£kKVw‚Ñ„a@kóyÛ¯ÇVk™ów›š—XťǼów™Ž¯U±‚k„ƒ@Âx›IĉÒÅVmÈnšÜ@n°„bUbÃV‚ŽUnnJ¯Į@‚m¦nV܃@„„L°JXb‚Ñ@šaÈb@šllôLVb—b@lmnVxk°ċ¦U°™Ž@xÂX@xWbš°UVÇn¯Ò¯JɛƈmxÂl@¼"],encodeOffsets:[[106527,34943]]}},{type:"Feature",id:"6210",properties:{name:"庆阳市",cp:[107.5342,36.2],childNum:8},geometry:{type:"Polygon",coordinates:["@@kw‚ĉ—»VamƒƒV¯wƒIóVkl¯Â™Km™VůÃWkL@bÃKŦ@Ž™„@š™LÂx›@Âb@l™a@km@@l¯nm@UaÃ…@ƒ„óWUXm¥™nƒwÂ`@UUxķôÇ°ğ¦@„VJš_n‚‚IVÂŽnalxkX„JWn¯šnVƒLšxl¤nnVbklVX@xnxmV@bUK@nm@@xƒV—°±aÃ…nƒŽkUWnUaƒx@m™n@ƒ¯LƒššmUÄ€lU@lÂV@blLUblxklkIÇx¯°‚UXbšaVÂŽUnšV@°‚LUlnbšX@`°ÂnVmbnÆmÂV‚kLmK™¦UÂŽ@X„y@kl@U„°K@¼XbW„ƒš@b„WnLVa„VšƒVz@xlVČ¥lbUxÞÂlV„U@nÆWôn²™VJlU„Ƨ„LnmÃœLXa˜n@mÂœw@wlUlV²mšblwšVȃlLÞ„±@ÂlVnUlxnkma@mškšJ@kXV‚U@mn@š¼VXUƒVƒlLnmVbôaVÂnWV»ÈUl°È¯ÆInݮU@kk»mKkÂÆġk¯@»mƒk—¯@óÇlÇ@—Vykkl™Uml¯Þ™@w"],encodeOffsets:[[111229,36383]]}},{type:"Feature",id:"6204",properties:{name:"白银市",cp:[104.8645,36.5076],childNum:6},geometry:{type:"Polygon",coordinates:["@@VKUȚl@š谚nŽ‚LnxÃބ„V¼kx@l‚¦²°ĊóĠ„™Ċ»š@ÈxšaÄŠxlwÈVŤa@¯²aÇ£ƒJk£lƒnUÞ@°šô™@y„wl»lIX¥ǪÂnw@ÑÞWla„ÅlL@ƒUwĉakƒlÂ@ƒš¯mwna°J„ÂV¯nUVÓÞÑm£²óWaUĂ@óÃUçV»ÈkkW@¯‚xV@XÂlK@wX@Vmm_@wÈÙKU¯ÇwVwÃ…K¯VƒkƒJ™™™XkWVaƒImŽ¯Uk„ÇlVšœĀV°mxóšk„@¼ó„WxĉÜU@Ub‚zÛJÇkÂ@‚ÆnVlԙ@kŽ„x™ô@ĬWL¯ƒƒK@aÛImm™@ƒIUaƒ@™™UŽÇêU¤ÂÂVÒÇx¯ÒV„šš™lk@Wbĉ¦UbkWV_‚y¯Lƒaó„kÂŽ@b@nmbkx„°"],encodeOffsets:[[106077,37885]]}},{type:"Feature",id:"6211",properties:{name:"定西市",cp:[104.5569,35.0848],childNum:7},geometry:{type:"Polygon",coordinates:["@@„a‚V²wVJV_@„LlanÃ…llŦçÜӚ_šlnƒWaôk„xUš„bmV@ÂÈ°lèšnk°l¦„`@nnL‚@ÈlÃœIÂyVaV@ĊÛXwôƒ@»lƒô™nwU¯›ÿU™Èklƒ°Vn„JUblXšWšš„I„l°U„ƒVƒš—@aVVVmnL@„lƒ„UUw‚mkƒš£„bVÂ¥VUVwۂƒÂlaÂÇÃރmk£ƒLUy¯L@ÂWlkKW_XaWƒ—mƒ„ġU@a™k™‚ƒakXkmVwmÂŹVƒU™b™WƒónÂmwnWW£„KÈnV¥ƒ¥„ƒÆ_k™lW„bU¯„V°aôbnaVwmaÅInÇmwkK@kmLUw™@™`ƒkÃ…@ƒwƒb@mÄÂĀÇ`U„ƒKUbmUUkÃ…xmmÂ@›Â„»nUVÂk_Ã@™Ç™¦™VÇè¯b™aƒn™@@„„JV„°Žn„U¦™°ÆbXxWl„êƒxš„ĊaÂœbW`™zV°œ„@lmbÃ…x@bmV™bƒI™`™¦@Ã’UVUI@ƃL@bš¼@ššŽ@„šlmxnL„°ULƒŽƒÞğޛ°kLUŽƒL™°™xVŽ„n„KVƒl@šzX@"],encodeOffsets:[[106122,36794]]}},{type:"Feature",id:"6205",properties:{name:"天水市",cp:[105.6445,34.6289],childNum:6},geometry:{type:"Polygon",coordinates:["@@UyÈÂVƒVUnn@ƒVU„`UblzšJnk‚@Vb„KU„°l„wš„„W°„nkVŽ‚UÈlš£°V@Ân¥šV„kl™kU˜±U„ƒn™ƒÂlw¯UkwmKUÂlmkUmnkym@Ã…Â@U„mWÂÈU°l°anÂlJškUKlU„¯Èm@kmWV»kkÃLUWUx±b™@¯ma@ƒ¯Â™IƒJUxn„m¼™K™ýƒa™V™Uäóa™wÂLmxU@¯ƒUšƒbùÂlmwmnXÂŽmJ@ÞV@UbVbkblŽ—@±êƒlÂI™l¯@ƒlW¦knÇJÂkmÂ¥k@¯Â™Jmbóa¯bƒUV°ƒakXlšÅ`ƒ„„¦U¦ÇmƒLX¤mXnxm‚„ôšXša„VźUnÂŽUxlnlW„bšÂšl@bÄ¢V„ƒ˜nX„WbX`lLXk@Ž°KVz„Kl¤„nÞÂÈkb„‚ÜÂ"],encodeOffsets:[[108180,35984]]}},{type:"Feature",id:"6201",properties:{name:"兰州市",cp:[103.5901,36.3043],childNum:5},geometry:{type:"MultiPolygon",coordinates:[["@@lW²LššƒŽ°I„l„šmbVb„KnbÄŠVlkš@XbÃœU@ÂŽkn°‚XIƒÂƙV„LšÓÞxÅŽUlÂôƒ„b°KÂzU`lXVaÄŠÂ¥Xal@šk™™Uƒ°ÑÈwUтÂV£ÈéVšš„@Vb„Jš@nnÃœJ@b„L°„XK@īšóƒwlš@kÓmUÂÃ…mK@mƒ_kÂ¥l¯™mkçǯ@ÂnUƒaV™ƒwólXbm„™k™`ÛÔťèkkmÆkbƒK@ÂU`UI±xÂUƒbWlX„mbVbÅÒólkƒƒIWJkšƒ@ƒz—KŻ¼™@™xUx󎃄¯LWb@ŽÅ҄„±¦U`nbťĀUšVb„LšŽ„U"],["@@ƒ¯lwna@mÅȯK¯kW¤ƒ@@V@bÄ¢nĢƒVLU‚°k"]],encodeOffsets:[[[105188,37649]],[[106077,37885]]]}},{type:"Feature",id:"6208",properties:{name:"平凉市",cp:[107.0728,35.321],childNum:7},geometry:{type:"Polygon",coordinates:["@@ÆLUxÈxV°šLÇÞ@xn`Ãœ@XÂ@nĊŽÆwnJmwUx‚aUkšw@V@w„aVmlLXÃl@X‚VÄ¢mV°@nl@UUUWK@w„ÿVI²Òlmš@nÃĊýVV@nšJ°„„šUÅ‚m@kÂV¼nK›ĢȤôK„blÂnKllVk²aĠ¥È¯ĸóVw@V‚_„xšmn¦VWôX„ƒÆ@Vbn@°m@kn@@lšb@k‚aÂœ@‚wšK@™šƒ@ÂÂUlKVaƒWX™W²¹lӄw@_°›n@@_lKÃ…ÂÄ·W™Â@ÂŽmLUWƒn™»Û@›lÂ_Ç`ƒÂÛmm°ÅbWb@š—VWbƒUUÂÂKDŽÅaÄ¡lmkÂUÄ¡lƒ»—Lƒl™Um¦@Ž¯U™¤ÇkÂVUÂml¯ƒƒX™ƒƒx¯kVƒƒLUaÂ@ml™IkyVaƒ_UV@„mmUVU„ÇŽVzUxUVU¦ƒa™¤l„ÂnVxƒVk„@ƒmKUnUU@b™˜U„ƒ„","@@@ŽżÂ@™mlkƒġk"],encodeOffsets:[[107877,36338],[108439,36265]]}},{type:"Feature",id:"6229",properties:{name:"临å¤å›žæ—自治州",cp:[103.2715,35.5737],childNum:8},geometry:{type:"Polygon",coordinates:["@@š@ż»˜L„y„@l™XI„Jl„ôkÆÑUanaWƒXkW@™yk@U„ƒLƒmUšwš¯„KVÂlKœ¯ĠÄÄÂVKƒ¯mKnw™k@ĪÂ@™™»@a„K@Ã…VJVU@њ¥š_Uy¯š@£UKmn@‚ƒšó¼ğ¦WmĵXÃÂŽkÂŽVLmVĉU¯bm„ÃV—wWlXÞW¦™xkmmL™šÃŽœ„±U@Vގ™š@„ÅÈW°X„ܼƨyUÄ®nÂŽWÂŽnXÃxUx°lVÂXJlÂôV"],encodeOffsets:[[105548,37075]]}},{type:"Feature",id:"6203",properties:{name:"金昌市",cp:[102.074,38.5126],childNum:2},geometry:{type:"Polygon",coordinates:["@@šĢȼ™„Çł°bÂœU°šV‚ƒń‚ÆǖŰnšÆ„ÅĬǔaʠůĭš_kķÆ¥VÑș„çÜKšÅ@DŽƒVaU™m@aÅnġÇk@ƒxĉ_™Wk£™@ÃıKÂȱaÃ…nƒ@ƒÃxƒ@kw›lkwÅL¯wm`"],encodeOffsets:[[103849,38970]]}},{type:"Feature",id:"6202",properties:{name:"嘉峪关市",cp:[98.1738,39.8035],childNum:1},geometry:{type:"Polygon",coordinates:["@@llÄŠx„¦šl™¦š„kVVnšJVbÇ–V„kôV˜a„bnaWw„UXmmamUXkWKůXm°™™»ĉÂÇ@UVƒK™ķkǼğb"],encodeOffsets:[[100182,40664]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/guang_dong_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"4418",properties:{name:"清远市",cp:[112.9175,24.3292],childNum:8},geometry:{type:"Polygon",coordinates:["@@lǯÂkÿƒaV¯™ÂVaÈU„¥ÆDŽIlxšmnb‚UÂœxl™„Uôl°kš„„Wl„š@ô™VwUanUl@„xVkšaX¥‚kU»„aš¯±Â@kka@ƒUwmUkwƒJk™˜Â„±k@ƒ™™L@ÂÃWUwV×xÇU¯ŽÇX@m™Åƒ@@yĉ£VmUwȗ»ÇšUn„lUnWU¯`Ukƒ@@„™x„Ž@bÇxX¼ƒVVš¯LšĀk‚ÃLƒ„¯@VŽƒĀ¯lnÄŠW¦kVÇôkUDŽUK@ţ™U@a™™ó܃UU»ƒ@™¦k@Vx„KVb„n‚š@„Âƙ„l„@xšƒbWšnlU„lxÈlV„È°Æ„@¼™„@x„šWxœŎ‚V„šK°„š¥ššnĮkÅŽ@ÈÑm™„K@¥šk@™ô@„nôV"],encodeOffsets:[[115707,25527]]}},{type:"Feature",id:"4402",properties:{name:"韶关市",cp:[113.7964,24.7028],childNum:8},geometry:{type:"Polygon",coordinates:["@@W™Xk±Ñ@ƒUw™mUwĉwlmn@Æwn£mÂkIš¥ÇÅ@¥šaƒón£nWWwš£V`Þ@šÂnVml@xô¼„IV¥ƒkUmkamUkVWwÛ»móƒ£UVÃ…Kmn@x™@kbmm¯a™Xka›VĉaUbò—‚lš„IlxnVVx@„lb@l²Â™°ƒbV¼ÂlW¦™bUlƒwk@mVVbUxóš™@kƒƒX™ƒ¯lókƒVkš›wÂVma™nkwƒJÅȃ¦ÇVUbšŽU°„blĀ°ŽkÈ@x™¦Æܙ°@„°„¦óa™VUôlUlbXÂl@nÂÃœV„„nKlÂŽnIVÞ°Wš„°U@bnm@¥šIVƒ²Ulƒ°VnalzXyl_Vyƒ¦lƒœLlxš„@ŽÞbšKm„knVWanwĄVwČº˜@n_ÞV„aVÂŽÃœIÂœl@„˜KȚ„ÂVJ@aš£È@˜™@ÂÂkm™„aV¯W@_ƒa¯KmbkÇkLmwƒ@Ã…Â¥"],encodeOffsets:[[117147,25549]]}},{type:"Feature",id:"4408",properties:{name:"湛江市",cp:[110.3577,20.9894],childNum:6},geometry:{type:"Polygon",coordinates:["@@@ƒkXĪ@a„UUÄ‹lk„Jƒk„™@wVJXUWk°W@ÂnKnwlUlš²ƒ„blU@‚lI„l@„XbW„šxnm@ÂlW@w„wU‚JX¯VU°`ŎóˋkÃÃkÃ…@ÇmğÈřmw™aĵV›xUÛ»°™ĠǷnýmóX¥ɅĵÒÇ@°²ĊUĖ±ĮU¤Ç°™Ā¯ÉnżUĊĊĬVÂ@脎@ԃÒU¼l¤nƒĠb„êVĠ°ÂÈy„zVaV‚nUÆL„ašbVl„wÆ@"],encodeOffsets:[[113040,22416]]}},{type:"Feature",id:"4414",properties:{name:"梅州市",cp:[116.1255,24.1534],childNum:8},geometry:{type:"Polygon",coordinates:["@@„‚nԚlW¼Âx‚¦@lÂœVl™lLkè„a@zš¤ƒĖ„¼UxlnUKUbÃlU¼lb@„Vx„V„klJÈwV¯š@Ä lÛĖšnƒbkšÆźÞƒUÈôklmšL„¥‚LÂœW˜„„™nKUkVa°V„x@IVV@x°bUk„a™a@mV@„Â@y„w‚L„ÑUwVUšV„‚„U‚bÞVVann‚@XwÇÿš¯²aVamkXaÆ»@»nw@¥›UXaƒÂkbWa¯KUw@Â¥m@kwmLU»UU™J@kmU@UUWUƒ@ƒyƒanwmçÛl¯ÂƒŽ¯UƒÂmKUmƒwVÂkmÃXÂbW@XWÃbƒk¯@±‚Âw@»U@W¯Å@ƒÂÇ¥UƒU@ƒƒ™IU™ƒakJƒĀ„ꃰšþƒXkamÂŽ@Žƒ_ÂJ°Âm‚@X"],encodeOffsets:[[118125,24419]]}},{type:"Feature",id:"4416",properties:{name:"æ²³æºå¸‚",cp:[114.917,23.9722],childNum:6},geometry:{type:"Polygon",coordinates:["@@°VlmX¹laĢÒlm„@„„šVš£‚‚@¦ĢklynÂn¼lW°z„W„„°ÂVbÈV@lÆbnn‚JškX„šVÆašÅ„W@™ƒUUw@ƒkaV»ÞkVaVLkmVwƒ»„ĕ™£@yƒblçkKkš›U@kÂ¥‚wX»™kmӃÂ@Wn¯‚I„`@ÂnÂlb„W™ý„¯ƒé„ÿlI@™XUmWUwƒ@@ÂUJU„Ç„mKUV@x™„ţk¯Â¯LWƒƒnUxÂK@ű»VwÂa¯š@¤WX@ŽÛ¦@¤ÇIȼWxXŽƒ@Wx—w›ŽUnVbÅèmVÂa±²ÂUWl@ÂŽk„lȄ¤nôܼXxlUnVlbVn„lU¦ƒJó»@wnkmU™‚Ã@U_™¤XxmXm¤„ô™b@¦Èƙ¦lJnÂ"],encodeOffsets:[[117057,25167]]}},{type:"Feature",id:"4412",properties:{name:"肇庆市",cp:[112.1265,23.5822],childNum:7},geometry:{type:"Polygon",coordinates:["@@l@š¥„@V¼„Vôۚš@bšV@ŤVLȃlVÈólUXÂ¥mĉ°k„ÿU°@„ƒÞKl™ÿ°KU™„UW»Èw@aƒÂšw@ƒ„@nm@wݣkÓVUVn„Kš™k¥™£Vamƒ@nkKkbÆǫma—kmLU¥™UmƒÛwmVU™mUƒJ—ÂÇaUxÇIn`mb@Þ¯b@„nJ@nl„U‚V„lVU„ÂL›W¯—Û`Ç_¯`mš¯I™bĉWÄ‹zÂx±J™xšÂ¯ÆUƒƒ_k@™šƒJ@Umb„šXôlLš˜n¦@¼ĊxlUXŽ˜xUbÂL‚Ġ„UnVÄŠwlšUš„b@ÂlW„X„‚m²Â˜@ÞWxXš‚Unb"],encodeOffsets:[[114627,24818]]}},{type:"Feature",id:"4413",properties:{name:"惠州市",cp:[114.6204,23.1647],childNum:4},geometry:{type:"Polygon",coordinates:["@@lbšW°bnnlaš@@wnmÆLVUkÇlƒ@ÂXk‚V²±‚bnUÆçUaVmœ˜xXw„@WÂXwÇ»ÈJ@£Ü¥@ÂXW@£°™‚bUx²¼@ƂLVw„mX„°K°ÂŤlšƒ@wVUnLȃVƒVIky±wkƒKU¯ƒÂÃ…kƒÂ™XġÑۃlwUwlm@m„ÂnKWašÅÂm›¯ÂóÇmÄŸb¯alĉUwÄ·bmb@lÞÒVn—šmĀŹ@VŽƒbVÂŽUnmakLm`@xĉkklVÔVJVn—lV„UnmJmaÂLUbl‚™zmÂŽkL™a™‚Å@@zš‚V¦UÂŽV²kJ„nÃœU@˜VXUÂŽÂL@„lJƒL@bäUnVŽ—b@xVnlK²„Vx°V„xlI„lkVl²k¤@n"],encodeOffsets:[[116776,24492]]}},{type:"Feature",id:"4409",properties:{name:"茂å市",cp:[111.0059,22.0221],childNum:5},geometry:{type:"Polygon",coordinates:["@@‚LnÇlk„KnkÆL„ƒUm™ÈxlUÂœJló°n@ššanŽš„„a@ƒ˜@X_@mÃóóU@a™aU¯mL¯ƒƒÂkÂV¯™ÇVwkw@ÂV±Ŏ£@™™Â@šalw±Vk@m„Åm¯™ÿŃƧIÇ`Åô¯_UVW°ÂIV‚ƒx@xkX@ÂŽmn™wXƒWa@ƒƒkkJ@ÂkVƒa±„k™kVmxmL@‚¯XXlWVUI@xƒš„lƒIklVȃV@b„šlW@„@nUxVbÂlVxkôlx™Ân„‚y„šnIƻư„aXwlK„bVnƒŽXb‚L„¤„k‚L—èƒVV¼ƒŽ²IlÄ VX„ynz°KVx°@VlÂœLlblKœš"],encodeOffsets:[[113761,23237]]}},{type:"Feature",id:"4407",properties:{name:"江门市",cp:[112.6318,22.1484],childNum:5},geometry:{type:"Polygon",coordinates:["@@lUXx°JWnnƚXVš„W„X@„šºVLV¯nU‚Vnb™ô„x‚aXmW™XIšŽUb°xlK„Âl¯œK˜xXÞ°ŽšX鴆@„ĉÞÂU™‚çš»nóƒVma—x‚¯UÃ…U¥ï@ƒƒç@È™@çĉÅUmU籃ĉKÃxÃ_Ã…Jƒk¯»ó¯nmèkǀšŽWxœ¼mnUÜġ°@¦Â@ƒxƒLkŽÇaVnUxV„™šVlnIlbnÆÆKX¦"],encodeOffsets:[[114852,22928]]}},{type:"Feature",id:"4417",properties:{name:"阳江市",cp:[111.8298,22.0715],childNum:4},geometry:{type:"Polygon",coordinates:["@@°„nKV°šb@bôVÞô@n„VlÒôÆUnlnn@lmkmVkƒaÈkÆƄ™k¥‚ÅÞ»ÆKXkW¥ÅLmÃ…kamJUkš™UƒVwUmÈbl„K„w‚@@¥Ģ¯VÛnm›»Xw™Âlƿ™@kbW™—aʵ@óL›l¯Âƽ@™ƒƒLn°ƒÆ@nUl‚²kx™b@‚šÂ@šÅ¤U²@ÂŽlxUxšÈU°lŽ„Â"],encodeOffsets:[[114053,22782]]}},{type:"Feature",id:"4453",properties:{name:"云浮市",cp:[111.7859,22.8516],childNum:5},geometry:{type:"Polygon",coordinates:["@@@V„Iš™l@„`V„°Å™Âšw²I‚wÄŒyÄŠXša°Jn™°_È`Ãœ_°˜œX‚KVƒkUUƒVÂkƒ@mmI@ƒ°a@Ãnam_ÈJVwlĉX@„šlUšómaÂUmVU°UK™¹@ƒƒWƒXU™™WmÃ…Xm¯IWwkVWlÃ…LüÂÆl¦ƒšÅÅÇl„bUllnknm@kmVmóÅkуUW`—@@„ƒb™ƒm™b@™¯mkô›IkVÇwnš„VƒÂÃ…KmlƒLklmÈÂKƒÂšVÄŠK°²„`n˜¤n„U„bWl„xVx™LUx@°nXm`VÂklVxmnnx"],encodeOffsets:[[114053,23873]]}},{type:"Feature",id:"4401",properties:{name:"广州市",cp:[113.5107,23.2196],childNum:13},geometry:{type:"Polygon",coordinates:["@@Ș¼VxUnĊ¤@z„@šÆ@nÈW°ÂÈV˜w„ŽUÞVxÞX@ŽšK„šl@ބVaÄŠbÂœU@ml£k±lUƒkkJƒw¯UUw±ƒkLUm@w˜aUÂVmÞ£@a„KkI@ƒ‚KVÂUW@—ÛVƒmlIU±VÂU¥™Â@yÄŸzƧǃƒšƽĠřšÅnī±mÂ@ƒ²¯lƒ°@nÃÆóÂUll@XnÃVU¦mVV°—„V¼™Jƒn„b@°mbn„ƒ‚@²¯‚¯wVwƒ@@nmxX¤¯L@ÂŽVLU„m@@l"],encodeOffsets:[[115673,24019]]}},{type:"Feature",id:"4415",properties:{name:"汕尾市",cp:[115.5762,23.0438],childNum:4},geometry:{type:"Polygon",coordinates:["@@@‚„@VxnXWV@š„bVššJ„„V@ÞÅU¥Ċxš£UWU‚wÃ…UUÂ¥WVUkĊÇnkV`°LV™„wƒƒnU@™„ƒlbĊ¯„Vnalšš@@çkUÃ¥ġaó¯ÅaÃ…LŻÆUýmy¯Âó@ĉÆó„ȯw™ÆXbmLƒ‚@nknVxkx܄ĢҚW„ÂÆl„ÂV°„Ll‚²xlz"],encodeOffsets:[[118193,23806]]}},{type:"Feature",id:"4452",properties:{name:"æ­é˜³å¸‚",cp:[116.1255,23.313],childNum:5},geometry:{type:"Polygon",coordinates:["@@V„Ȧ„ÂÆ@X°V@@¼‚x²Â°@„lÞaWXX@‚aÞWlnUŽ„xVnnL„‚°V„Â@k‚mÄ¢ÂlÂ@„ak™@mlk°aXƒ±„nwm±™²¯JV²Â@ƒwW˜—_mƒa„ÂV»ƒU@m¯ĉUф™šJl™„ašbVn„lĸLlƅÛDZwÃ@ĉxóÂ@è™@k™mbƒUĉ°kaƒ„@šmV„„ƒxUš¯KU_mlĉÈVlXUV¦ÆVÂxVÂŽVX™¤ĉwV¦ÃÆ"],encodeOffsets:[[118384,24036]]}},{type:"Feature",id:"4404",properties:{name:"ç æµ·å¸‚",cp:[113.7305,22.1155],childNum:1},geometry:{type:"Polygon",coordinates:["@@„è@„Þ°V¦VÆ°˜wnb„UÆ»nçÆÂ@Ânxܤ²llU°VnÈJÞ°UôéšķUklƒô£VVËŒKÞV°£n¥ƒ£ȗ™Ãy¯¯mÃ…kw¯bÇĔğ@Ãn¯ĊƒVÄŸÂÅÅŻƒķJ@Èš","@@X¯kmèVbnJ‚™"],encodeOffsets:[[115774,22602],[116325,22697]]}},{type:"Feature",id:"4406",properties:{name:"佛山市",cp:[112.8955,23.1097],childNum:1},geometry:{type:"Polygon",coordinates:["@@Èb˜Ž„InVVšnUÃœxn„šVV¦nK˜lnbÅǬlalL@mn„Ubš¤l¦™šƒLUmUVlԜ¤@xmnVl°_XVVmƒkVmș@kn@VƒUK@°KW£nw@m„@Ux°x°Â@±„Âmƒna@¯ƒa„mšIU»˜ƒU¯nUV¥ÞUWmk@Vk¯Â™Ukn݄ÂWÃĊÛ@Ǧ™W¯ÂW×w›Lk°ƒÂkL¯wVa™ÂWJXšWnÂbƒwkVĪW@kÄŠ"],encodeOffsets:[[115088,23316]]}},{type:"Feature",id:"4451",properties:{name:"潮州市",cp:[116.7847,23.8293],childNum:3},geometry:{type:"Polygon",coordinates:["@@°ŽÜknèmx„b„z„@V‚VX@VnV@lšIVVV¼nKlxn@@¦Vx°LXbla„ŽWbÂœV°£¯™WÂ@ÂnW@™‚aUñVÂÂœwWš»@¥ŤÅUÃÇ“ÃóV@ńǎkUVmƒIUwÃ…VWÇX¹›Â—@W„¯bkl@nlšƒb@‚kÂÄ¡ÂŽÂn@l"],encodeOffsets:[[119161,24306]]}},{type:"Feature",id:"4405",properties:{name:"汕头市",cp:[117.1692,23.3405],childNum:2},geometry:{type:"Polygon",coordinates:["@@‚@U±°Iš±n²mx²ƒ˜@ÂœÂWºXÈÆUVx„JUnlVÈÂ@ŃôUǔÞVçn»VyĢÛVm@»kaÃUǼóšÛÈķKÄ‹Â¥X„¥WwÄŸk™ƒ¯@ƒwÄ·KƒkUm™aƒbkš™IƒšVÒ°Ċ@n„VU¼ƒ‚„bn˜`X—„x"],encodeOffsets:[[119251,24059]]}},{type:"Feature",id:"4403",properties:{name:"深圳市",cp:[114.5435,22.5439],childNum:1},geometry:{type:"Polygon",coordinates:["@@ÞLš„@xšbV„šVšK°™X°Kô¥Vw@anU„èƒÂš‚lkÄŠl@wn_lKnbVmU„aUÂź@nÿ˜™UmÃѯUƒbk„@ÆkxÅ»@™aÇX—wƒJƒƒ¯LÄ·ÃUĕ™ó™ĸóêWº@b²nmĬ™Æ"],encodeOffsets:[[116404,23265]]}},{type:"Feature",id:"4419",properties:{name:"东莞市",cp:[113.8953,22.901],childNum:1},geometry:{type:"Polygon",coordinates:["@@ÅŽ@šÂšblKnšykÂVa‚KnbnIVmUƒ˜kUmUIUә„ÂčmV@bUxó¦¯LW‚¯š™L™UUĪa@w™ƒÃKğŚ™ƾ„„ƨÈĠy"],encodeOffsets:[[116573,23670]]}},{type:"Feature",id:"4420",properties:{name:"中山市",cp:[113.4229,22.478],childNum:1},geometry:{type:"Polygon",coordinates:["@@‚XœÒlmšV°ÂôÂÞÅ@m„¯°k„±‚@@aX¹¯VÃÂÇIUmV¯kk‚±Û£mw@‚ÅÂmèżmô™¼ÂèVš"],encodeOffsets:[[115887,23209]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/guang_xi_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"4510",properties:{name:"百色市",cp:[106.6003,23.9227],childNum:12},geometry:{type:"Polygon",coordinates:["@@lklWXL@VšI‚l@XnJn@VUUalÂk@mK@kny@UlU@a°™„ƒUU@VmaU@Ua@UWwÂ@ƒn@KmLÂm@alkšmnI‚m@an@VIUamWÃ…ImwU@@a@K„X@JVL„UVmUaVkUa@m„@@Ulmkk°ƒUaVUlKXbVwVIkaVmUk@KVk@a„aW¯m@w„¥laÂœX@KmaškVmnUl@nxVKšInU@yVaVIV@na°KlxX@@_lmXšUV`VIV™V@„Ân@lšbn@@WUkValK@²yl@„„VUV@@K°L@KU@@UVaXIVVV@naVkVa@K@UUK@UUa™LWa—w@m@K@UVÂVƒ@mVÂUUVKnL„mVL„K‚bVK@UUIk›mI@mUIVK@IUK@VkLƒ@WU@mÂU@WmUk@ƒI@VƒJk@WwX_@amK@UUWkIƒ„ƒK@LVbÂ@mVmakL@J@bU@Ux@xƒbmI@`ƒIÂwm@UbmKUaÂUWa¯UkJWV@XƒJUU¯LUmV@ma@kkamKÂwƒLUUmWVkkm@aVUUkVKnVVUmÂXK@UW@km@Ukkm@@W@U™kUy@I@aUUmbƒ¤U@kUmL@bmJU@Ua@wkLWWkL@Uƒ@VaU@ƒLUakKWbkUWVkKkLVLUV@JVbƒz@Vƒ„Â@ƒVmUU@kVmK¯@VƒU_™VWakVmIUKUaU@@bml@XU@@V@LmKUV„mVUKƒÂƒKƒbkaUXƒKUL@x@V@l@„mxU¦„V@ÂŽlL@V@Ln@@VV@„nlKUaV@nLUbmJnL@VWLkbmV„@@L„W‚„XLlx„VVIVV@x@V²blUVm„LVUÂœK@kWWXUlV@Xl`„LX„l@@VšŽƒn@VnbVš@lVÂUVUÈVbš@@`UXU`l@@XUVm@kš@xmVknUJVXUbmKULmbÂx@VlJ@LVbkKUbVLÇUUVƒUVmU@VaUkUKƒVUwmLkUUVVlƒbka™XmwƒKUšVVU@@ÂÂV±Uk@VWUUm»XamU™bƒKk™`ƒ„™U@UnWW_kKmbUVUVmnUV@„nJVUlšUbU@UV@n@JmI@VmbnVUXlx¯ŽkKmnVV@L@V™bkV™Umm™@Ub¯LmlÂUƒL@VWLkmkLmmn£WmnKU_mW™š™bnbmxƒ@U¦UJU„@Xmlk¦@‚mnUUm@@Jn@lV„ÔVJnIVW„I@a„ƒÆK@I@aVK„IlŽÞnnl@nl`nbÆX²l@xV„@llbVn²ŽVVl@nn„V@IlW@Un@@kVa°KšnÈmVaVÂXUlaVƒÈU„VlwôUlynIVašan@lVXb‚Iš@nÂ¥la@Kš_n‚@bÆx@XnJV„nKVz@`VXVšU`@bƒ¦UV@VšIlx„UnV‚K„XÈbšVllšbVbnVn@"],encodeOffsets:[[109126,25684]]}},{type:"Feature",id:"4512",properties:{name:"河池市",cp:[107.8638,24.5819],childNum:11},geometry:{type:"Polygon",coordinates:["@@lLVl„bVV@nXVlI@JVX„mšn„W°b„IVV@‚ln„@nalVUb„nW‚@ÂkVkÃ’lbVKn²°bUÂŽlV²@˜X@`nb„aUI@ƒ°wlU@aXJVI@aVK@wUamIXm‚@XUV@@bV@Vm„ImÂnUUwVaVKXU‚nVK@akƒVwV@nL@UV`n@@X‚lnIUJl@X¦˜V@aUIVm@anƒV@UwnL@VlbVL@KVVXUWƒ„wUUVUka@UVJnUlbnalbVVn@°„„LV`Þ@šXVxV@@bVlUVVbXnWlXnmlš@XXWVXJmbUI@V„llUVkn@@VWV@Vnb„@VXUJVnn`lLVk„a„»lVšLnw@WV@lInw@WnU@U@m‚knUVó„K‚wUmUXUƒU@@wVJVIl@XKVVVbVI„J@Un@lÂŽVLnm„b@U@Ul@nUš°VUVJnnVJV@„Â@mVU@ƒ@wkUVwkKWk™yUUkU@alkÈ@lJ@x„Ilƒ@UUWVkUw@Kn@@kmaƒVUl™UUL™ÇƒUUKl@UUmL@aXU@mlUUwmKÂkUUVKVUƒaƒKUÂnK@U@Vl@XUWU„KlwX@šb@K‚@XkV@UwWJka@aUwmV@U™@@U@wUm@»kLWVkIWÂŽXnmV@VkbmKƒLUbk™Va@aƒaÂ@@aVU@aVak£@ıUkVU¯V™UUƒJVƒUIƒ@kxmUmWUbÂL›w@K@aU@@aVU@ÂÂKma@aka@_VWkk@UWVUKULWKULUš@KUnƒwVaUKƒxU@UÂmaƒL—m@kVmVa@UkƒmI@ƒ@KmIkxU@@K™U@mmakI@VƒLkmWkkJ™_U‚@V@L@n˜xXbšKVb@VVL@V@LUbUlmbU@UUWJUb@VV@@L¯K@LU@UVƒƒk@±z@‚kLUbVl@Xm@™akÂm@ƒÂU@UšUJU_™VWÂŽkn@`W@kw¯LmbU@UJUb@zmV™JULmwk@mVUn™lnb@L›Wkbƒ¦@x°nXŽƒb@bUl@LVlUnlbUJUxWakLUVVb¯„llkn@Vƒ@@nVbUlVbUnƒVUK@IƒW@L@bV@nxÆJnXVbUJm@@bÂnmJ™nkl@b‚nnK@L„m‚@Xx@VVbV@nb@UVVƒ„¯š@bkV@Vmz@lnLl@kÂŽVbUVm@mI@WÂk™J@UWKkXkl"],encodeOffsets:[[109126,25684]]}},{type:"Feature",id:"4503",properties:{name:"桂林市",cp:[110.5554,25.318],childNum:13},geometry:{type:"Polygon",coordinates:["@@nU@J‚X@`XLm¦VbÂ`lšVXXWš@VblÄŒnVšŽlanLnmVLšK@_VaĴ@kUa„@VmVb„aV@XVVzlVVK@knKVmX£VKšLlbnš@b@llL@xĊôXaV@°È@¤„bn„V@@Wl_„V„U@W„nVamw„wVbn@„K‚VšLX@VmVÂUxlV@šnVV_nK@m‚I@Wn@@IšUÄŠ@@wVWX@@I°VVm@wmU@m@IUƒV™kƒlkÂUmmkÃ…V@@aV@@Wn_UKla@kšaV„šlVanb@k„@@KlVn@@aV@nIWW™UUaVU@™kKmwU@UImKk@UU@w@W@‚™kÂ@™UkWƒ@mk_W@Ua@a™ƒƒ@—¯ƒmV£@mƒUUam@—kWakƒVama@UUm@Ânw@alaUmnUlVlIÂœV‚™šLVyk£Vm@k@UUJkƒK@kmKUw™KkÂWK@UXImyVwnI@m‚ƒkUlkUKkUVmƒw@kkJWUÈm@_k@@aƒaW@U„UJUwU@@IWKkƒmUUV@nVl@bVb@bU‚UXƒakw@ƒWUkbkKƒbm@™xUlkLm@@wmKUX@‚™ÂUaVW™XVmU@@UUUƒxkmWXkKkUWaUaUb™L@`UL@LV`UXmK@VmakLVbkL‚xUJUIVbUVVb¯KƒV@Xnl@ÂlVXbmÃ’nV@L@VWKkVUIWJkIƒŽUamUUbm@U„kU@JUbW@X„WxUam@kbVVUnUJmUUV@bƒU@UUV™@ƒVk@ƒbƒmULV¦U@V„U`VLUL@xVbn@UJ@nWJXXVÂŽVV@bkxVbUx‚Lšš@x„¦@šU‚lXUVVlULV@@šnÂŽU„ƒb@xl„nJVnlVknUlVÂUbmÂŽU@ƒbVš„x"],encodeOffsets:[[112399,26500]]}},{type:"Feature",id:"4501",properties:{name:"å—å®å¸‚",cp:[108.479,23.1152],childNum:7},geometry:{type:"Polygon",coordinates:["@@lKnbnU‚@Ua@K„L„ƒlJVX@VnL@bW`Xxl@„I@U„Jl@nV@X‚V@nXV„@lK@UVL@JULVJ@nnJlÂœVJ@VULÂaƒLUKƒnmKULVVUÂŽ@nU„š`lIXlln„K@UlJnb@nšV@LV@lwnJ@L@„nJl„@VUbUn@l˜n„KnbVÂŽV@„wVLUb„xVm@LV™VKXLVKVLXU@VllUX@`lb@bnb‚L@ÂŽUV@bV@@b@LÂœx‚KVanXVƒUUmVUUUaVUky‚UUa„ImK@mUUVUkKU_@W@UVVVIUW„UVaVU@UUKnƒ@k@al@ll@bnL@b„VUV˜X@VÂœ@@b‚Knblmn@V_@aUalL@a@akK@kVKUKlwUUnÂVÂ¥VmU_VWVIVaX@Va„alńK@LVJnalL@LnK„wlVUw‚mX@VXšƒlLUVnblaUmVUVwXU@Wm¯Va@ÂÞKnw@w™mšk„»‚UVW²a@_mW@U@I„y„LVUUKW@@™„LX@VUV@@yVU@UV@nwUUmJka@IU@ƒmƒVkaW@UwUX@`ƒ@kLWUk@mƒkUUm@k‚UUWkUƒkWxk@@VƒK@nÂV@UVaƒUUJmIkVƒ@UamLUbkVmamLka™@ƒ‚ÂkmL¯ÂWI@wÂJmwƒx@akU@aUKmbkaW_nW@_U@Wm@a@wkwUKmƒk@ƒbkb›wÂ@mKUkkU@J@bW@kVWz@bÂVUa›VUx@„ULkJWbXVVXƒ`@ÂœmJUVU@@Lk@WbU@UJlnXlm„Vx@Ln@‚b@K„LX„WJUÂUW@kƒaUVUbmV@nnV@n@lVLƒVmLX‚mXkV±@kxÃ…L›šUbÂJWIÃ…J@I‚mXalkUamKkškL±aVwÂKƒUU@mÞnbWJX„m„@lÂbmKULWUUVkaƒbnn@Vl@VVÂV@VƒbVbnLWLXJWxXLV@@VVÂ"],encodeOffsets:[[109958,23806]]}},{type:"Feature",id:"4502",properties:{name:"柳州市",cp:[109.3799,24.9774],childNum:7},geometry:{type:"Polygon",coordinates:["@@ƒwU™„aV@nÂVaUÂVklmkUUmmIkƒ@w„aVƒmÂ@™U@VKUkVUkWVÂ@™ƒ¥@w™™ÂKVwUalw@aUUUÂWWXI@mVIm@Ua@wVKUKV_UƒV@UÂ¥VK„n„al@„Uš@VU@V„V@aVUnVVIVmUUlan@VbXwWƒX@Va@IlVVƒn@VanVVb„ÂlJXIVJlUXL@U@KmUnÑWakU@ÂmkƒJUI@mk™@wUmmUVÂ@JXaWIXWmaUIƒJƒkk@W„nJ@„ƒaUak@›kkJ@kUKU_ƒ@myUÂóWUkmÂ¥kUmL@KUKm@k_UmVa@ƒk@@UmU@mm_—JWIUVUÂŽWLUlÂbVÂUJÇVUIVwƒKUVk@mU@n@lUL@Km@@l@L™VƒzÂJmUU¤m@UbV²U`U@@¼Vn@x@Vš@@VnUVx@blbXIVxU@WlÂ@@L™aW@kxƒLXVWVk@@U@VmLVŽ„L„bUVULVV‚lnLVxkV@nWV@bnKVVk@VL„VšÈVKšVVk„Unb@lm@@LVxUlVX@Vk„ƒJ@wkIÇ@kl@blVVVšzXllLUxlV@x@„UV@nƒ‚U@UImmUIUV™¯mVk@@V@VƒamnUKkÂm@@VƒIUJUaUUWLk@UJUI@xV@V„VWVnÂxƒLUômVV„@VkVVVUnV@UVkL@VVV@bVxla@bkXVJVn„`nU@bƒb@bVL@VnJ@„l@šV„aU@@_lW@UUU@Unƒlll@XLl@@UX@°bVWVanLlknVV@VVX@VVƒnUÂŽVLmbXJ@nllXX@`VXƒlmaÂXVWk@Wkƒw—J@„VL@J‚bnU@bn@@bVKUnVJVIVVVL²a@bV@@Vl@nUVakalmš„UL@VUL@V‚a@mXÂl@nK@UlK„L@Vl@@nkllb@š„Vnn@‚šnV„™V°l„šVInwlKXxlU°Žn@@ƒ‚I@UnVlakÂUJWkUK@anUWK@_ÞJ@U"],encodeOffsets:[[112399,26500]]}},{type:"Feature",id:"4514",properties:{name:"崇左市",cp:[107.3364,22.4725],childNum:7},geometry:{type:"Polygon",coordinates:["@@@JVzšl@V@Xn@ll@VlnX@@VWLnÂŽUVmUULVlUV@blnUlnXVV„K‚xnLlb@lnbU@Vn°KVV„I@WXUlI°VXb‚VVbnLVan@‚x„J@_nJ„a@wVwV@@a@IUÂ@UU@WKXwWIXKmKUa„a@U‚UUUk@@Umm„albVUXVVKnL‚a@knƒWƒXImanÃV@„V‚LUx²blKl™nLVbklWbÂn@JÆIXJ‚IVaœ™ÆKlw²@lUnWWÂnK„UUK@k@mmU@mnUVaVU„b@lVXVÂXIWƒƒK@LÂam@@KUwnƒWkkmVIV@Xal@@KV@VUnI@›„_UWWUkam@kkm@ka@mƒk@wkJWIUÂU@WXkW™XkWWLUUƒ@UakLƒW™XV±VIVWUU@anUWaUK@IU@Vak@@UUKWaƒÂ@m@ak@@wUkla@mUaUklakwVƒ¯¯@WWUkLkKmaĪkLUnV`UxWX@Jkn@bmlƒakkk@ƒb@l¯bm„ƒbÂJ›b@VXn„bVV@„ƒbƒJUkkKWVU@mœÛVUUW@UVUJWXkVkKmÂUL@WW@U„Vl@XXKW„XJ@XVlmbUxnnm@UlVnV@XVm¦VJÂb@šmLkKÇbXblVkn@l@bWnX`V@@IVV@ÂŽV„V°n@@_naÆVVbUVVbUJnzlVUl‚XkV@Vlx@X„VnxƒbƒKUK@b¯ÂVVUV™L"],encodeOffsets:[[109227,23440]]}},{type:"Feature",id:"4513",properties:{name:"æ¥å®¾å¸‚",cp:[109.7095,23.8403],childNum:6},geometry:{type:"Polygon",coordinates:["@@nVlw„@VJU„„IVVUšV°lU²V@„l¤Ub@bUV@b‚@„b@bUblšVa„KnLla@UnUWmXÂlJXUlKV@V_U±Van@V£nV‚I„yšU@K@kn@@LVK@k@mnVl@VU„LUxVJÈUVIU‚aVkXKVÂVUXJ˜In`@nnV@Vl@@„UbVnl`n@VL@LnKlVn¦VlôXV‚nz„@V`VL@llIÂœll@Vb„b@ƒmIXƒl@„l„IVJnbWXXJWb@IU‚nVVn@xlš@nVJ„I@W„U°LUaVUUaVJVIÂwlKUalKnb@UnLVWU_@KVK@_šKVa„@VKU¯VLVKn@la„aUkU@maVU„J@k™@Um@XmbkyVaUIUU@KV@laVn@KXKWUkUk@ƒaW™UUVw@aXKmƒVaUUkšmIƒlUU@wUa™xUmmU™¯™U@WƒLUÂÂmVIUym@UÂVmUa@wmw@çÂm@aWLU„™JUIUamKmL@™Âaƒx¯¥ƒkUÂ¥U@±„k„UVmKU_mJUbkKm„ƒLÅǙ_@WWUXUmaVUkK™„UWW@ÂnVxkUƒxmL@KkKmbUI@KƒLkƃbUbW@UbUJUXV`UnU¦mÂŽVVkxVLUL@llL@b@bkKVb@bU`m@knmaÂL@a›@@U—WVUƒU@amK@akkk@@b@lm„VL@VUVUbƒVVXUJUU@V@XV`lLUVVV@nnLƒJVbÂVlzUVVbVVnUVVU„"],encodeOffsets:[[111083,24599]]}},{type:"Feature",id:"4509",properties:{name:"玉林市",cp:[110.2148,22.3792],childNum:6},geometry:{type:"Polygon",coordinates:["@@VJUXVVXlWX@V™xVnX@@`ššULWÂŽUXÃ…bWK@mULUUmJ@n¯b@l@VULVx„x‚XU`VXXJVI„V@nm`@nUÂŽVXn@lWVn@b@Jn@nU@Lm`@Xn@WJƒ¦U@@VnL„lV@@Xl`nIlJnkVL„w@KVK@UšaVL@bVKX™lUUKVK@I„VšL„a@U@WšLUlVL@bU@@blb@VlbUxVbXUVJ@xVL„U„lV@VU„bVLnKl„XJ@L‚b@an@VanL@`VLšKV_UWl@U_„a@WVInlVUUUVm@I@W@wVakIWm@U@ƒXwlaVbnI@ƒm»Va@aXaVLšU„»@aVa@k™KkL@KmU@WƒzUK@wU@VWUUVUUKUa@ÂmKmbUK@_nWVaUkVaUaVUVLXKVƒVUVmVI@UkKkLm`UkW@UwÂWW_„ÂUaU@WakXmK@xUXƒJkƒUUWUk@Wl—ÂmJ@km@@aUKÂzmyVk„a@kkWVUU¯lmU@@w‚kkmV@Vk@mÃ…Iƒ‚Ukƒaƒ@UbÂ@m@UUU`mÂUbWaÂWmb™X™ÂXKWIXUWm@љ@y@UkIUJUUWLUWƒL@UkVUxW@kaWbÂKWnXxW¦n„m`XLVlUbVbUx™I@JmLUKUb@VW@@bkL@b@VlU@xkš@L@lƒxXxWXX°V@VVVbUVV@UVVbULVnVJUb²b‚aUb@VVVVInlV@VnXaVUšÂlI„VUb"],encodeOffsets:[[112478,22872]]}},{type:"Feature",id:"4504",properties:{name:"梧州市",cp:[110.9949,23.5052],childNum:6},geometry:{type:"Polygon",coordinates:["@@VbXblVlLXWln„wVV@VV@UnšWUXVbš‚@ÂVWXa@kVK„ÂUaVaVkšUlyX@Vaƒ—VmUwUaVU@UÈymI@aU°@š™nWV@VaVaÂw@IV@VmnLVK@kmmna@™„™VbVI@aV@XbW`U„„LUVVx„@VbUV@bl@VLXblJn¦lL„°°@n™@K@UlLnK„a°LWbnJ„¦UÃ’V„UllLlVnKnbWnn„V`„w‚@@ÂXa±™n™l@XKV_„WVkVa@kVyUa@wU£UW@ÂUIVW‚@@a—wWaX_WKkVmUULmak@UJUI@±m»™—k@m»VyUIm™nmmwnkUmVaVIUÂn_mW@»Vk„@VwkmmUXa@IƒaVÂm—Âmƒ@Wm_U@ÂÂmIUWóLmUk@laXmmkUK@UmKULUUmWULƒ@VakU™@Ub@bƒ¼™VUKWb@bUbn¼@„mJUakbWx@„@VXnlJUb@x@X@JUnVVUVmkUJ@XƒbV`k@VXU`™LUK@_mKUbm@@b@„U`@nlV@b„UnbVbn@@`VbUbVV¯bm@@ÂmJXb@bVnUllVXUlbUl@LU¦VVmÂŽkLVb@b™l@V@XlK@V@nUJUz„°mÂŽÂwmLmlXbWVU@UUUlƒIU@VVmVÂ@@¦‚bXbWxX„WlXVWL@LUmkbU@@LVVVJUblzna@WVnš@@lƒIUVnbV@Vlƒbkbm@ULUKV°ULƒ@"],encodeOffsets:[[112973,24863]]}},{type:"Feature",id:"4511",properties:{name:"贺州市",cp:[111.3135,24.4006],childNum:4},geometry:{type:"Polygon",coordinates:["@@nL@xn@lKVkšwn@„alLlaXV@„lx„bVWVÂ@aUa@aUk@mVUnVl„XL@JV@VxVIVƒX@„b@bl@@`ÇnXVlI@l„xUnlVVLkllV„@nmJUxnzWJ@VXLlŽšLVxnL@l„LlÂŽVI@V@lUnl¤Uz™Kš@„Vl@š„L‚l„Lnš‚b@VnVVU@k„a‚Knxn@VkVJ@ńUlakmWIUaVanm@_UK@UVWUa@klÂXam™U@VmĪVIXW„@lUVknVlKVLXÂŽVXšW@b@VlšnnVL@KXL‚Kn@lb@UnW°@Va„X„WVb°aVa@I¯aUkUaVKVwƒaXk@a„a‚™@wkm@alanUVw@alK@ÂUmkw@UƒaUmU@WXUaUK@UW@UaÂVWI@Â¥Xa@w@ÂWWšÂVƒXwƒÂU@mKUXUWVU@a¯klÂ@akU@UULmK¯VUVW@U_m`U@@xVbUz@lUbUlƒXU`WLk@mš²šWb@ÂŽÂ@ƒxU_mƒXmmamLkUkKVkUƒVу¥mIXa¯KƒbmLkK@V@Lmš¯@ƒ¯kKmÂ¥kIWaUKk@@aVUUaƒ@UwVUƒKVƒX_WaU@@bUJUaƒš@šmbnn@lULmKUnU@@J‚xUbUbU@mX™š¯@VÂŽ@bnJÇz@VUVVbVxUn„˜UbW@kz™VUlUbVbƒŽUL@lWb"],encodeOffsets:[[113220,24947]]}},{type:"Feature",id:"4507",properties:{name:"钦州市",cp:[109.0283,22.0935],childNum:3},geometry:{type:"Polygon",coordinates:["@@@IlVVlnL‚@Âœxla„al@n„VLlx@x@bXnV@@`mXX`lbnaVL@blV@b„wnx‚I@xXJ°ÂnK‚l„š@lbnKnblUVanKVb„@lUnJVI„VUb@V‚U@m„L@Ul@Xw„llVVXÂV@lVnlVn„l@XVlK„@@_VWVxX@lb„U„nV@@JlbnIlmnVV@UwVK@U@k°a@mnIVVVK@nXLÆaVWXÂVK™™@_W@Umšw@UXWWkUUVWUIVaƒUkJ™ÂUVWbUmU@mkUJUU@UVaÂb±aVaUIUmVKUaVUU@VUUaUUU@W¯XWWw„w@k@Kl™@wkV@U@alK@aX@@UmIUWUIƒ@mmkXU`U_WJUnUJmUk@@amLU@UVW@UkU@@VƒbUWVUk@@wmKkUWLUWÂX@JmIƒlUkkKWKkLWUÂ@UKWa@bU@@a@_UKWƒÂUUUmJmw@ÂnÂV_@Ä¡ÄŸKóLmbU¼VÆ@xUXƒ@Um@wklVnUn›lkaUV@„lV²WVklWXXbWlkVkIm`UUƒLƒUU@UWƒx@XU@@lWLU@kbUbV`UXllUV@bmb@LnKVbULm‚šÂnVVIV`X@"],encodeOffsets:[[110881,22742]]}},{type:"Feature",id:"4508",properties:{name:"贵港市",cp:[109.9402,23.3459],childNum:3},geometry:{type:"Polygon",coordinates:["@@n@VzUJ‚nVŽ„K@XšVš°nVVnšwVb@xVV„knJl™VVUbn„WL@bUxVVXš„bl@lVXkWƒXwWaÂa@¥‚@nUUUV@„JVkVVV@XUWanknK‚xnƒ¯VyVI@m@UkL@W@Ušk@aUalKnÂUUVÂ¥@KVkkaWVkUVkUm@aWanI@Ân@°aUUVaUa@_m@UamaƒV@akU@mV_@ƒÂa@KWIkƒmLUKƒaUVU@ƒkƒVUK@wUIWVUaVwka@Uka@aV@@aUKVk™K@X@Vƒb™KƒU@JULVLkVWšUL@aUK™b@VUL@LƒxUKmlkImJk_@WU@ƒkmK@UV@„¥XIm@@Wn_@KmVm@@I@aUmkXm@UWVÂ@mn_@mƒUUJWIUWV_ÂWƒwU@mUknVVmxU@@VUV@zU@UVW@ƒK@šX@VLUVƒKƒz@J@VnX@`±bUXÂVƒ¼™lšn@xmxÃL@‚Ubn°@XWVUxUVVnkbWVXV@Xš`ÆȄKnƒlLVanIV`nLVUlƒ²ƒV@V¦„l°¦„w‚b@šnKnLVbVJšIVƒXK@b‚n@ènx@xVbUnV‚"],encodeOffsets:[[112568,24255]]}},{type:"Feature",id:"4506",properties:{name:"防城港市",cp:[108.0505,21.9287],childNum:3},geometry:{type:"Polygon",coordinates:["@@XV@X°°U„lxkbVlVb@nkbVl@xl@@b@n„‚XbVL@Vl@UbV@@JVLXbmV@bVVUXUJU²šW„XlKVb„@VVXKlXšWlXXWV@VÂXJlI@x„l@nlbn@lln@lbXalIVK@ƒVwÂœUVb‚U@aXylUX@@aW@U_UJmU™ÂnÂVKUamL@Kna@aVUkkVWU_ValaV@XK@kV@@W„wVXV@„V„KVVn_lJlUXkWaXWlkXU‚±kU@ƒVUlbÂœkVmUmlk™¯Ã™™WÂ@mb@¦VxULm™kJUU@Âma¯wƒmkX@VóJ±bUVUXÃWk™lWXXlƒxUaƒbƒIğ™Ç@U@mVUKkkm@UJm@XnWV@x"],encodeOffsets:[[110070,22174]]}},{type:"Feature",id:"4505",properties:{name:"北海市",cp:[109.314,21.6211],childNum:2},geometry:{type:"Polygon",coordinates:["@@VaVLnK@IšJVwUaVaUkWKn_mƒXÂ¥WwXm‚LXalbU£UyV„Å@Ùwm@™°Âl›LÃ…Uƒmk™mwÛaÆ‘LÃUUm@ȣƃV_„Ó@£UƒƒUÂVƒ„™¼U°W̄™ÞVbXbôx@b@bmVÂ@ǃ™UÃ@@Ä¢U`mÂ@ÂŽnxnIVV‚VX„VL@`@bV@@aXbVL‚@XVlKXLlLVl„knJ@I‚WVXXKlVnL@xl@UVVX„a@UV@VlX@VUV@nK@bl@nVVIVmXIV`V_lWnn„@VJVXnJ"],encodeOffsets:[[112242,22444]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/gui_zhou_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"5203",properties:{name:"éµä¹‰å¸‚",cp:[106.908,28.1744],childNum:14},geometry:{type:"MultiPolygon",coordinates:[["@@@UnUlJn„w‚JU°VL@bnVšU„wlJ@XƒŽXVlU@klVUJknl„UllL@bUJ@xULUlƒ„UblVkblbnw‚UXmla@„wV@VK@L@UXaVKVLXWƒUVa@U@Im@@W@£UKUakKWIXU@al@@llUnL@W@Un@@VlUV@VIUanKl@Xb@lmxVb@b°bÂb@nlJVVnÂnJ@b@L‚V@ln„@LmV@VÂx@blnVK„nlJXIlw„J@҄b@nlK@Un@UL@VVVVUUUVK„l„@VUVL„J@UVUUw„@Wm@™„UV„ÈVlbUb@JšLlÂŽX@@x„„ƒLmÂŽk@@nlx@bUJUzVJ„@@LVxUV@bWxnLnVVK@_‚K²xVbV@nÂ¥@aVI@b„@l@Va„Knb@n‚`n„mmý„W@ƒU_šwV@VlVV@Vn@n„˜@nI@Jn@°¦VaUU@™„mVÂVWVaUńU@aVKnƒVbVÂUmmU@a@kUw™m@aUUmUUJ¯ÂlakU‚aXaWUUaVƒkk„amÂkmUnVlULƒVlJ@XU@UJWUUw„k@aU@WbkWƒL@U@WU@@XUKmV@aUÂVwUÄ•UJUamUUVUÑm™nIVJ@kl@XalJVn@KVLϴ@UWIXWmU@mVÂUKnUWLUKUaWUUKVU@U@anUny@UlUkK@w@a@aVUƒ»UkVw@Wmk—JāmUUVmwXalLXWWUnam@XkƒJ@UVU@U@W„@@U@I@Wl@Ènlw@KXLWb„lVUkalKUU„VVaV@@wnIlaUmkUƒKWU@KkUkLWaƒKUÂUWUn@VƒK@LnnWJUIƒVkUWVnV@V™@@XƒK@VUIUJ@IWJkX@VVJ™IƒVkK@I@UVaUWk@m„@wnUWKk@mxk@@„lV@b„xmb@x@VÂUmLkUƒJ@nVV@b@VkLVbU`¯I›l@™U_UW@UU@™™ƒK¯wm@™xƒL¯¥kIƒ™ƒ‚@bkbƒ@Ua@ƒm@kkW@XVbmV@ÂŽkV@bWbUbV@„¦ƒxXlmVk@ƒ¦™bkaWL@KUImK@wUK@VUI™b@bmK@LÃ…y@akXW@kbWlXblL@ÂŽULUbƒ`@U™kUymX¯@mšUJUÂUJƒL@Lm@@WÂX@lU„VlšXll„@l@Èk°V°Ž„X@VU@UVll@XUJVXUVm@@VXLWlnV@Xƒšk@mVULnxV@@bm‚kL@VWLUbU@UVm@ƒbÂ@Ä·Â¥UnmJ@UUVƒkkJUšlÔU`UIW@ƒ°kLUlUI@WVI™U@mWKkXk@ƒ‚WU@bXšW„@J@xÂX@l@LVl@xšLVxXX@x‚KnxVknb‚KVV@U„L„WlXU`@nUlšX@llVXšVU„KlkUKlI@anKVLXKVaUIVWV_VK@VnLlU„»VKVL„m"],["@@@KlKkUUVVX"]],
+encodeOffsets:[[[108799,29239]],[[110532,27822]]]}},{type:"Feature",id:"5226",properties:{name:"黔东å—è‹—æ—ä¾—æ—自治州",cp:[108.4241,26.4166],childNum:17},geometry:{type:"MultiPolygon",coordinates:[["@@VV@XkV@bUbWJU¼Vb@Vnb@bš„@J@bƒL@LV@UVƒlUI@a™KULVb@bkJmx„šlLVxknVJk„‚xnKmnnL@bn`WIXlWLU@UxVbUVmKV„XI@JVIVJ@U„L@Wš@@UmUXUlV„UVJXImm@K„L@UVmVXV‚„LXblKlV@LXV„LlVVnkbmJ@xnXl@šbXa‚@Vana„ÒšL„m‚VnIl‚Þ¦°k@b„@@lV„nJlUnš‚VX_„@lVlK„šV„UUxVLVWVIXJšUlnnWlI@KUaUUVKn@VaVXV@na@ƒmw¯@mUkJUamI@lk@@am@@I„ƒUmVImUUÂÂw˜™@anUVaUU@LU@WaÂWUXWW„wV@VwnU@L@ynbl@@X@a„J@nW@@Vn@„lVLlxnI„lš@@UWKUƒnIlJXIVllIVVš¼XK@aVI„V‚@@bn@VKXLVKVVVInw„J@UWI@mX@WKnI@KmU„UVJUL@V„KW@@k„Â@aU@@W@InJWUXwWI@Wƒ@¯wkaVaUIl@nÂŽValIXWWI@UUm@anwWkXWWIUbk@UJmIUamKVUUUÂVVama¯VkIVÂVUlKnXVwX@@WVaUUVa@IlƒÂaVmƒkna›wk™UU@ƒU@mUVƒšUVwÂœl°LVbnJVU™¯la@mX@@UWKXU@aV_V@@JlkUƒ¯@V™nK@km¯k„U@ƒWUÂW@ÂmmƒU@™kmlU@wkL@WƒUkL@VmLƒJ@b@V@bknUUVK@UVKUK@Uk@Wa@LUVVnUbmVk@@UU@@aƒV¯K@U@UU@WmUL@aU@WV—w@ƒ˜I„xXll@UX‚K@KXXVJna@wWaģnaUKV„m@UU@mUmaÂlm@@XkVm@ÂU@VƒLmWU@kkWxU@@bVV@VkXVlƒVƒ@UUk@@ƒmI@KUw„m@UmVƒUUwU@lwkV@IUa@mUaVIVKVa@w@U@™UJkb@n@bmJ@XmlÂVUxWXkJmUkUUVW™xUlU@ƒaULUšmbU@@‚WXkmƒL@xUV@nUxÇm@„XLWbnlƒnV‚nnUV˜ÂU‚nVVz„@lbUVVlULVb@V@nUJkwm@Ux@bWbUK@UULka›JÂbƒU™U@U@lUK@XUJmn™J@bU@UwWa™x@zkJWnUJUUVšVV@bXn@xVb@J™L™m@X™w@`@bkb@VmXUV¯L@mW@@n@V@‚ƒL@K—IW@@aƒaUx¯@U„m@XbW@@L„V@bnVWVkKUzlV@bÆa@lnI@VV@@LnVVKUaV_VJVbnU@bn@‚‚nX@yVIVxXKVLlUVaXU°J","@@@KlKkUUVVX"],["@@UUVUkUmV@ln@VXVK@K"]],encodeOffsets:[[[110318,27214],[110532,27822]],[[112219,27394]]]}},{type:"Feature",id:"5224",properties:{name:"毕节地区",cp:[105.1611,27.0648],childNum:8},geometry:{type:"Polygon",coordinates:["@@UkVƒ@k‚W@Xn@@K„KVIVÂVIn™°@nWVzšl@V„_VaVK@ÂkKWaXklaX@lW@bÆz@KnL@ašaVJ@UVL@xnLVJ@LXKlbša„¥l@nUWk„wĴU@VaXa@amLkUƒKmƒ¯kƒmkIUaƒKUIWƒkKmÂ@anw@mlwXIƒmƒUk¯@a@amUƒ`kÂkKWVkxmUUak_mJmw@w„mXUW¯X›_@WnI@aVwkWWýŃU@WLkU™aUbVV@lUVVnm@kUmV¯™kK™LƒwmVÂUUaWV™aÂaWw¯wƒÈ@VULUVUUƒK@nWJkI™l@Umxnbm@kbUJƒa¯bUbVxmLUV™aUÂ@VUUWxkVVV@bUV@XWbnlUbƒbUJlbUV¯b@z„`WbXnmbƒaƒwUwVWÂUƒbUxmbU@Uam™Â@ÂVƒk™VÂÂaƒwVaUƒWI@mUKóz@lUlÃ…@WIƒb@xXxml@XklULWKUÂmwUa¯KUXWJkaULmKkLWbkKUVƒImƒÂƒWa@kUaULƒW¯LƒK¯@kbƒL@b™x@J@bmnnlUšlzU`U@@Uƒb@„m‚n¦°bU„Vx@bkVm¼mxÂ@mk™mVV@bkxVn„aVV@bU@mL@b²`lIVV@lXLlš„bVxn@@bl@XllIVšnbVšn°°wlbXw@mVa°ÂlVnU@mš™VLVbn@@b„@@WVnUV@Xlxn`VznJVb@L@bV`V@šUnwšU„@WUXKV@UUlmUUlaXalLšm„bšIVbnJVIlVVaUUnWVXn‚VL‚k@ƒnWnblnlb²x„xVKVXlVXLVW„LlUVJna@wVL„¼@JVX@`@nnx@nWJU@Vx@XXKšŽUblxUš°„LVKVVlL@KnbVUnJ„IlUšƒnKl£VW„x„IlJ@nšVÞUVVnb‚VX@V_°lnK","@@@UmWUwkU@Um@@VkL@V@„„‚V„VkV@nbVa@ƒ"],encodeOffsets:[[108552,28412],[107213,27445]]}},{type:"Feature",id:"5227",properties:{name:"é»”å—布ä¾æ—è‹—æ—自治州",cp:[107.2485,25.8398],childNum:12},geometry:{type:"Polygon",coordinates:["@@‚V@IöalK@UV@@KUaVIVVÂœLlaVbVWnX@‚@LnUlxl@naVLXVVaVU„J@ÂlUUanWWI„@VlV@Xbƒb@V„n@VmVVbk@kU@V›V@X„J@zn`ULW@kK@_WVUK@LUb@Jlxn@nnWlU@@b„x@XVVU@UbVb‚@n`VI@VVLUlUIUV@KmL@VV@XIV@@lVLVmXV„@WLXLW@U`šnkb@Vl@UL@VVV„L„llX@`lIXb„J˜IXW„L‚aVL@ÂŽXXW‚ÂĢ™b@bmK@L@°@Vnxmxšn„K@xVn@VkL@V™Lƒakbl`VnnxVnUlššV@@VVXV`@šœk°JV_UalK@U@aUU@m„IlVnK‚V@U@wnaƒw@akU@ƒl@nwl@XLmV@xnƒl@VXUb@V@JlL„UšJUI@UlWUƒnLVUUaVwV@XKWkXJm_@amKnmmLÂwlƒUIlmUwkKĪnwlI@aUaVKšL@bVJ„kVUU@@K„K@a@I™ƒ@ama@UUaV»XIVa@alU@WUU¯IWVUbkVUKWLUwUJ@zmWÂÂm@@amVUaUIU`VbULmU@KU@@UmJ@kÃ…b@akUVylLXUmU@aƒU@KX@Wan@Vƒ°@Vw„b@bX@˜J@L„K@Â@U@mX@@n°KVUnW@Ula@a@_šx@WšnšK@IUa@wWm@aUUU™VVVIXmlI@yšwXbVxV@@ašInmVI@WVL@k@VšV„V‚aÂœIlbVK@VVLXa@aVwn@lxVI@m@UUaVKUkVUkaƒ@UymUV—ÂVUmmU„mmkXaWK@ƒÈnVw@mVU@w„KlnXW@ÂV@naV™VKUk@KVIUWƒ@mk@KXU@Um@@lÂVƒk@UVJna@UWaƒL@a@ƒXa@kmmVUUk@mkkƒamJ—ImJUUmIÂm±aUUkambkamVUU@VlbUbVVƒxX„WVUU@VUakU@UmUV‚U@mnUVVnUbVJ@b—UWÂ¥kLVamVÂkUaWJU_UVWKk@@nl„UVVJUXÂm@Vm@UnVlmbnÂmJUbULU@@UUKWVÂIWxnJVb@xUL@bUJWIkxƒbkb@xVJƒbmU@kÂW±LkKUkVa@a¯amÂ¥ULkalÑlKXUWƒXƒaVakImVƒ@ka@ÂUUƒJ¯aƒX™mmb—KWU@wUUƒaUa™KmU@UXlWb—¼WLUKUb°„UlVbkbVL@VƒšƒJ@nVlUbUXmJ@VX@lbUbU@@bWb@VnLVJ@bVVUz„ŽVL@lnL@b™VVVULmKUk™Jkbm@ƒxVb@V—kƒKVnnV@b@ÂŽWXU‚„nV„l‚ÂVVXVJUXlVXbWV@VU@Ubk@@KWbUUmL@JnXV°XJ@_‚`UbkXVVlÆkbƒ@VLXVV@‚V@k„KXX@`V@@n"],encodeOffsets:[[108912,26905]]}},{type:"Feature",id:"5222",properties:{name:"é“œä»åœ°åŒº",cp:[108.6218,28.0096],childNum:10},geometry:{type:"Polygon",coordinates:["@@°a@aÈbVUlU@aVKnVV„VUÂlyX¹lWVa@ÂU™VƒnUVU@m™Â@mUÂl@„mÞw„@‚xnIVbna@KVI‚J@kÂwV¥ƒUXÇVkVW@kkKWU@aXUWmnIVa°VXbmL@VVbnVVVUb™ÂVbšJVbVKXkVKVanU@aWÂnWUÂWa@U™Ânk@mVIVK@wXxlLXbVJVÂlKÂœbl@VI@mšaXalVV„VbX@@ašalnkx@b@V‚b@Vnx@bVVUXn¤WXn@Vl@Vlzn@š`@I@KUU@ƒV£namÂVkXa@aVK‚nnU@anVlKƒa@UUU@amk@»kƒU¯@aš„VWnkWmkImU@akaVm@»VUV@UKnkW¯XWlkUKnIWaš@nmlIXmWUnwUwWm@wULmaUJkIUaƒaWa—klwkwmJmU@bkJ@XUJ¯ÂW@XbWbUKUkWJUUVKnn@UmmXUWa@mU@@UÂI@WmXVykwm@kaULWwU@¯ƒlKUUVU@mU@UkmaUbmV@b—š‚xVÂnVUJVnƒ„@Jn@@bl@@knJVblInV°@nx@„mbU@UWUbm@ULVVVb@LkJmXkm™VWIUJUXUKVwƒV™UƒŽkLkUƒ@W`ÂUm™kVmIUƒ@kƒ@@a¯lÃÂ¥kÂmJÂUƒn™KĄmbUbÂ@Wb™ak@mWU@UbƒUVVkLlbUVƒkXaWK@LkxÇmk@@X@J@Vƒ@@X@VUV@V„IWln@mbXVWXkKWbnxVUnV„ƘInl@XUxVl„¼UV@b@b@xlLkV@VmzmV@b@VUVVLXVVbVLXKmVVLU‚@nnVWXXJ@V›¦UK@LUmkIWbk@@lUImJnšVÃ’VUnVVbVIVÄ–UxV‚@bnUVL@WV@@X@V„KlXXaV@@bƒlVxXVVIV@@WkI„UVKUkVmlnnŽƒbllU„VbXVWbÂblVkb°ŽVInVVV@bšnVx@l@bnVVnUÂŽUam„UL@bƒVVÆUbUXU‚ƒn@šVVUb"],encodeOffsets:[[110667,29785]]}},{type:"Feature",id:"5223",properties:{name:"黔西å—布ä¾æ—è‹—æ—自治州",cp:[105.5347,25.3949],childNum:8},geometry:{type:"Polygon",coordinates:["@@VL@Vl@@IXW@kVUVbnW@XlKVVnU„VlL@b„aVbƒb@xX‚°ÔUxV@kbm@VxkxWJœ„V¦ƒŽ@ÈnšVKšxWÂXJmV@n„Ò@xVbn@@blLk`VX@bššla²JVUlnn@U±lw@wnw@mlwVIX@@m@klKnk‚a„KnwmmXkÆÂVm„Uš¥l@nb°Ân@„aVwVmVIVÂnI@a„¯@mšU°ƒl@@VnI@JV@UV@b@IUbVJmXöºƒzllUbVa@aXUl@„U@llLnKVaUa@UmK@UšwV„bnKV@VwVK@UXƒV@Vbn@‚w@U„WnX‚@„a@m„I„™@UUKlaUaVk¯ƒVaVLXK˜»XaWk¯mƒkÄŸwmWÂ@mIƒVkwƒJUIšÇVwU™UkVKkƒm@UkmU@WÃ…wm£ÂVƒ„m¤¯IkJWa™_™lUbmJÂzÃJk„ƒUÇVU„ƒ‚@bU„Ãn™m¯LUb@`mL@VkL@VƒUmmk@UU±ÂUmka@kUƒ@ÂÄ·ymUkk@mmkÃmUaUakImV@V@VÃ…Lƒ¦ƒJUXmJXšWb@n°Æœx‚¼nV@LlbUÂŽUbmL¯@ÞbV¤nbVx@bUVlblIϪ@KVVUnVJUn@VlLUlmLUUUxmK@IÂ@@VW@@bU@UJmUkLVVUl@b@V"],encodeOffsets:[[107157,25965]]}},{type:"Feature",id:"5202",properties:{name:"六盘水市",cp:[104.7546,26.0925],childNum:5},geometry:{type:"MultiPolygon",coordinates:[["@@ôyVL@nXJV„Ub„x‚bUÂŽlšU„@ŽšÂnÂŽVbV@naVw„a‚VUXVx„x„bnaWmXaƒ_@y°aVUkaVI„aVamkXa@WVU@aUUlUXwVV@UVšbVUnKUwVa°a„bVIlan@manw@VšklJXI@m„LVVVUVK@U„ǃk@KUa@UkaVU@UVWV_XWVXVWlLXKlLXaÆKšwVL@akKm@Uwƒ@@XUVk@VÂUI@wWK@aUV™I@UkK@ƒmL™Wƒ@kImJƒUÃ…VmkXUW@UJkx@nmx@xkxV²m@kmUV±Ikb™™@aUWl_kK@am@Ua@wĄ@mnUWIX™wULm™@DŽÂU¥›ƒXIlwUwn@laU@Vw¯ÓWÂ@w„aUaƒb@akKƒUmVUUkL@WmXUaUV@lWX@Jk@@UUKULmLUJmzkKmVX°VšUnWKUL™ƒƒL@mU@UnVJ@b@„UV@Xƒ`m_@lÂ@@bmbXJmnnš@°˜wnn@ÂŽVLX@V‚@nVl@nk@@b‚l@nn°WlXzW`XXVKnUlxVbUb@‚V„Xb@Ž‚ÂVxÈbVlnbmn@ÂŽkVUL@„ƒŽmLUVVL"],["@@@ƒ@UmWUwkU@Um@@VkL@V@„„‚@„V@VkV@nbVa"]],encodeOffsets:[[[107089,27181]],[[107213,27479]]]}},{type:"Feature",id:"5204",properties:{name:"安顺市",cp:[105.9082,25.9882],childNum:6},geometry:{type:"Polygon",coordinates:["@@lL@bUK™xÃ…LWbkKWLkKUXUWWXU`UX@VUVlb@VVb@L„l°xXx‚bšbXUVb‚VnU„xšKlL°šnUlVn@UmVU@kUUVašblVXKV@ƄXþlXUxnU@mVK@_@ml@UU„@šblU@KnLVyUw„@@UmkšWVw@UVK@VXzVK@n„VVUUW@kVJnÂlaš@nKW™kaWL@U—™õb@JÂU@mU@@_WWƒL@lÂUU@WUUK„@lakÃ…UUlWVaÂ_@`WIU¯mW@InKVVXa@Ll@VaV@@UXUWakUVWUIUW‚UkÂUƒƒmVÂXW@Â@amUUm„L˜l@UUa„wn@lašIVlnLVKUUšU@amK@kUKƒÂVyUU@aUImK@UXa@aV@VakaW@@UnIVWVaUkƒbÂ@mWƒX@VÂxm@UaU@W„@VULUxU@mLƒaUŽ™x@VnL@VVbUbmLkK@kƒVk@WV@bUbVakk„yõ¹nWUIVa@J@aVUU@@ImJ@Uk@¯„™V@nƒ°@bmJUÂUJUnUxƒbm@¯Žmak@™¦ƒVUnÃ…ÂŽWlnnmxƒLÂbmlkL@l@nWVnlÆU„VnIlJ„@šXnK@„lL@VšJVU@bXL@xVJUÂl@VU@W„@Vxn@"],encodeOffsets:[[108237,26792]]}},{type:"Feature",id:"5201",properties:{name:"贵阳市",cp:[106.6992,26.7682],childNum:5},geometry:{type:"Polygon",coordinates:["@@nÂŽlLX„VJ„LVblJ„n°ln„„LlVnKlU@ÂnUUa@WlX@l„n@‚Vb„@la@a„„šlJ°¦„Kšwn@°x„LVkUmmwUmk_la„bšK@UlK@UUm@wƒL™mnwmw@U@¯@KnL@aša‚ġXÂWW@ÂUKÂbƒKWX—JƒIWakJ@_kWƒkƒKUU@UVKk@@Ula™mV_X@WKXKƒ@WUUnUK@kU@WJU@@UnK@LVUVJVkUK@UUJm_Â@UaVaV@UU@Wƒw@aV@Xkmmm@kw@IVa@KVLXU@`lLX@VKm_@yƒI@WÂœU@UlVl@UanU@Uƒm@U„aWaU@Ukƒ@XJmXVbkV@ŽƒIUVUbWUUKmbk@kwmV@K@ÂmWUXUakb›KUUUJVb@LU@@VkL˜š@VXKlbXšmL™@kbm‚UI@lVXUVƒU@mULWy@UUL@VUx™Xnl@Vƒ@VxUzmK@LkV™aƒ@VVk@@n@`UL@nmV@bmJ@XÂœ`WÂX°WVƒn@xnxnIl`VbnVlwXUlLl‚„_nV@b@bl°„V„nWJkx@nmx@b"],encodeOffsets:[[108945,27760]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/hai_nan_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"469003",properties:{name:"儋州市",cp:[109.3291,19.5653],childNum:1},geometry:{type:"Polygon",coordinates:["@@஼jpnrÂ’``ÂŽpRVHʘ̤žZt^JÖA˜[†CâlTébQhRPOhMBcRSQiROE[FYdGNOEIH]MgEAMLLIAG_WMCSL@ED]PCLYC[ZIHgjSxJTMbHNEFCMEE_HSDFHSLECRNSFDRICHNADGPI\\RZGIJTIAHLDQOHG`GTNCOIC@eIGDWHIS[kiE[FMbECÂZS@KKS[FDWsCeRuU_DUQNOE[LKGUBM¨EDQP@HWHGDImÂXƒCogÂ_~‹I_fGDG|QDUWKBC\\ore|}[KLsISBHVXHCN`lNdQLOnFJSXcUEJMCKSHOUMDIm_‹DI`kNDIGEYFM\\YPEEIPMSGLIKOVAU_EBGQ@CIk`WGGDUM_XcIOLCJphHT_NCISG_R@V]\\OjSGAQSAKF]@q^mGFKSW^cQUC[]T}SGD@^_ˆaRUTO@OHATŸ”"],encodeOffsets:[[111506,20018]]}},{type:"Feature",id:"469005",properties:{name:"文昌市",cp:[110.8905,19.7823],childNum:1},geometry:{type:"Polygon",coordinates:["@@€hIJ¤Ī¯LQDaFßL[VQìw€G‚F~Z^Ab[€¹ZYöpFº lN®D´INQQk]U‘[GSU©S_­c‹}aoSiA£cÅ¡©EiQeU­qWoESKSSOmwŸćõWkÂàmJMAAMMCWHGoM]gA[FGZLZCTURFNBncVOXCdGB@TSbk\\gDOKMNKWQHIvXDJ\\VDTXPERHJMFNj@OwX@LOTGzL^GHN^@RPHPE^KTDhhtBjZL[Pg@MNGLEdHV[HbRb@JHEV_NKLBRTPZhERHJcH^HDRlZJOPGdDJPOpXTETaV[GOZXTARQTRLBLWDa^QAF`ENUPBPÂ…\\Eji`yºEvåà"],encodeOffsets:[[113115,20665]]}},{type:"Feature",id:"469033",properties:{name:"ä¹ä¸œé»Žæ—自治县",cp:[109.0283,18.6301],childNum:1},geometry:{type:"Polygon",coordinates:["@@ªVLP`@PEdNRAHOPEAKHEVL`GZBJfvdTAXNNTZJFPrHHNpKTD\\ILHbEVd^J‚OHLh@NNBnHP`\\xH@NBRLJTlÂŽNv_^CTLd@bNDVFbxdFV€UPBTKOGEOUO@OEBXQP[H_EI\\EbeYa@UO_J‹MEJ_IEDKJUGMDcNUd_FMTEJSGoZ]EIYGO[YW‘gEQ]a@WHEDQKUSDUGAbYBUpSCYNiWqOSQEoF[UcQISWWNÂMSDe_cLQ_UBiKQOOASQAWgS­Ä]ZaÂŽSPÃZ]XMXSÂŒ[^oVËNgNKlE RôEø"],encodeOffsets:[[111263,19164]]}},{type:"Feature",id:"4602",properties:{name:"三亚市",cp:[109.3716,18.3698],childNum:1},geometry:{type:"Polygon",coordinates:["@@®ĂhTBXTRPBRPjLVAR`dKf`TC‚NXMTXRJVdE\\FpTRrPjXZMTDVoZABaVHTCLVCRGF@X^bFRÂ’hZXP\\ZHHMA[^wBWXJlW¤EJ[bCTOF‹WWMm@ILMGWQ@DQ^QNWFSHEbF`OXNbO„VNKTEPDTLTCCVTREfvfEHNbRAENH^RJXCFHNFRpVGHWISDOTMVCZeGamaLoLÛD¹¹ėgsia{OųE—Tt‰lɂwr}jŸR±E{L}j]HÄ…KÃT[P"],encodeOffsets:[[111547,18737]]}},{type:"Feature",id:"469036",properties:{name:"ç¼ä¸­é»Žæ—è‹—æ—自治县",cp:[109.8413,19.0736],childNum:1},geometry:{type:"Polygon",coordinates:["@@bRFnHNbHÂŒgN@NPEnbXP@bND`NT\\@\\QZb@`@J]V@XhžDpW„nÂCJGHGXO@CR§FANHVKLF\\MPVR`CvVfQtDPKpGHG@S`WJP~^dSTHWX\\RHTFACQTIAUPOU@MG__IaYSFQK‘NSbORHXCZeTFJg„B`YBMNMFi~IVDV[tGJWXGDQRGF]ˆJrALgESLSAYDGIaFeXQLS\\MKSLSQYJY}eKO[EHiGSaK[Yw[bmdURgEK^_kcSGEOHKIAS]aFSU@Y]IWFUTYlkP_CUOUEkmYbSQK@EMWUuAU\\M@EpK^_ZMDQ^OXwC_ZODBrERURGVVZ\\DTXcFWNIAWJWAYUUFYEWLQQaCIZeDM`cLKRGpanJZQd"],encodeOffsets:[[112153,19488]]}},{type:"Feature",id:"469007",properties:{name:"东方市",cp:[108.8498,19.0414],childNum:1},geometry:{type:"Polygon",coordinates:["@@ºŸx‹JYZQ”IŠYXLl@dR\\WZEn]bA\\S~F`KXaDeTiNO^EEKWEDQXITBXaWaDQMUJOIaTWf@NJV@dSxGZ‰Fu_Â@WMKAUˆ}AQ@MwG_[GOAmMMg@GKÂP]IUcaFKG[JSCoLGMqGEOYIMSWMSBucIeYA_HUKGFBLOFGPQBcMOF_@KO©UAtERadwZQ\\@ÊJÃ’gòUĪRlR°KÄ®VÂŽLJ"],encodeOffsets:[[111208,19833]]}},{type:"Feature",id:"4601",properties:{name:"æµ·å£å¸‚",cp:[110.3893,19.8516],childNum:1},geometry:{type:"Polygon",coordinates:["@@Å„ZÆ‚tĢ¬æßFuz¹j_Fi†[AOVOFME_RBb]XCAKQKRSBQWSPY\\HbUFSWSPoIOcCOHIPkYCQ]GdGGIFQYgSOAQLK`MFUIGa@aQ\\GGUFcHKNMh@\\OYKAigsCgLSF]GOQO]@GM]HyKSHKPW@Pxi@EMINYREXWRQ@MQcFGWIAwXGRH\\yDI`KJIdOCGRNPNtd\\UTMbQYi@]JeYOWaL[EcICMUJqWGDNZEXGJWFEXNbZRELFV]XQbAZFrYVUBCLNFCHmJaMIDDHXHEhQNXZ_TARFHVB@DTQIRR@YHAJVnAbKFUEMLd\\c^ÃÞ"],encodeOffsets:[[112711,20572]]}},{type:"Feature",id:"469006",properties:{name:"万å®å¸‚",cp:[110.3137,18.8388],childNum:1},geometry:{type:"Polygon",coordinates:["@@^J@ZTVbET^JBGLFPTHld]`FLQhcVanx\\\\ZbLHTGj\\FLP~fIZRZPVTQFSVAFJE^NDLEE[~LjsxVTG\\NZZNGlLRRGLJTV@hPZANN^@T\\NEPPbDZXO`d^HSvcJDIV\\XZAJUFCLNP@PQ¤@[ïKÂLÑIÃ]ÇE±I{uƒ­YÅ›UćFcYUmsVeBSVgB[RO@aYYPO^]@UVaNeDShMLG\\EfFVE\\F`"],encodeOffsets:[[112657,19182]]}},{type:"Feature",id:"469027",properties:{name:"澄迈县",cp:[109.9937,19.7314],childNum:1},geometry:{type:"Polygon",coordinates:["@@T\\GJCXJH@fJDDPNCNJENN^NLHBNSx@DDYbBLLDRbjZTj@`XXTlG^Xr@PJLW\\WLTlWR@HDJTD@X_PO@STMDNTMVV@NLDM`M\\XM\\JNBH[PYZ‡úYzŸ`ÄŠ\\ÃŽÃd]c[NKVFLEBaUmBIZGQ@JQSR@CUAEGBQ`SWYRMFgWGCGJCbNnIDGMEDKVAZUEqBYRa^WEUFKYQMaFWXEHIFWMYHCrXVIIiaK@aMCUYNSIISTwXALKH@XWXIEIJQCG[IEQDE_XSBaa[AIPW@]RS[FWS[CD]PEBYNGFSaSyJG]@ugEUDQlGHiBKHUIoNSKqHFaPMICK]UUHIPDJMuCA[SCPIDIOILGAEmU[POPBVSJDREBGS[QXWSGcT}]IO_X@TGHoHOLCX\\ELT@LYTD‚aFENF\\lj"],encodeOffsets:[[112385,19987]]}},{type:"Feature",id:"469030",properties:{name:"白沙黎æ—自治县",cp:[109.3703,19.211],childNum:1},geometry:{type:"Polygon",coordinates:["@@D\\RV]dTXELnHr]^@LETBBRTHPi^[@U`QTHDJ`MGSogDIPKdJ`WVNHCXHl_DJR@AH`FBVPUJLHKNTJOFFZON[ZEHFCJlMJ_ÂŒCn`CJVNGPLTNDFIdVTWEIPmRKMc_kDMWGGUTAtJLK~\\f{pqD[LAVXRCH{HC`eÂŒJ`}@W^U@I@_Ya[R[@MSC_aMO@aWFmMOM@‹haGGMEmaQ[@MESHaIQJQÂ…Â…MckBIw[AOSKKAMPSDSLOAV_@@`KJRbKRDfMdHZERgAWVsDMTUHqOUr@VQXTT@Tƒfg‚L^NH\\Â@heTCZaESNObHPƒHeZF\\X^ElM^F^"],encodeOffsets:[[111665,19890]]}},{type:"Feature",id:"469002",properties:{name:"ç¼æµ·å¸‚",cp:[110.4208,19.224],childNum:1},geometry:{type:"Polygon",coordinates:["@@TP\\pATHTGlZDJGAQjE\\Rb@jVBDCN`JZ[NCNHNXbULPrP\\KNbMTLjJJRFP`“pNLZz^FLRHjVPZ@hxVKbHBHMNNJFRlLzGPnNHhIrHHADcPWdUAmEMVQDSKYHY\\EhBN^HpXGNDBNNBnIÂߋÅ_g{³So]ã@ORO@KMEDIVYB[WJUICudGTc]P_YWaCOOMFS[]@MMYBgOU@ISHKQQkKMHYY[MSHwUit}KF\\KFMCF]EIUBETSROUKTLT[NKTWREfJbCHBZKTFTKh"],encodeOffsets:[[112763,19595]]}},{type:"Feature",id:"469031",properties:{name:"昌江黎æ—自治县",cp:[109.0407,19.2137],childNum:1},geometry:{type:"Polygon",coordinates:["@@`ZĤd–`òüˆ˜ “BSPGP@VSbQ`‡@]HC~T^SE]N]FkW]E[fY„GGOPaTMbFDYfS@g[ÂMGK]h„e@SSSRW@UVqrPVGNStCXUhBFQGYNcCeLQQaLI@_`@EUwcEaCUaMc@SK]Du`ÂMSkKI‡~BVNL@X`‚EvYŠwHcTU@MIe@SXJbIPNVCRXbWbSAWJCRXFFL]FMPSjCfWb_L}E[TaBm^YF[XcQk@WK‰Z“JYRIZwŒ¹ "],encodeOffsets:[[111208,19833]]}},{type:"Feature",id:"469028",properties:{name:"临高县",cp:[109.6957,19.8063],childNum:1},geometry:{type:"Polygon",coordinates:["@@jD`hNd\\^dZädÄ’H´Op@ˆùZY\\OAGIMN[[W_NCNMKU@NUMSNCTSP@`O@WSCCI@GXQSkXKX[IK@OWqH]SkWW@_SiiYQaKCAKZaCCw@MTGAMKM]FMMIMDSM_HGHRPKCBGSJJIYH[QOJCHMBDGQJECMTDQKFGTCEGTF`NFEDMFaGSNwIiTGhYJD\\KZODC^@FTKND`XBHKJNKFBNhG^FJMPcHEZF\\QPRjQTAdgNOPgQaRSê"],encodeOffsets:[[112122,20431]]}},{type:"Feature",id:"469034",properties:{name:"陵水黎æ—自治县",cp:[109.9924,18.5415],childNum:1},geometry:{type:"Polygon",coordinates:["@@R]NC`YL]FoN@V[vBXVFNL@TRZalnVFVP`DlOZkVSXEE_F[EUFeH[NKTgfCbMVU^@P]ZObZP@\\QhATUfAtUasñÂiÄEoI]eYǯ@aKmaeƒWuCºKÃœKpnbHbYfUDSNCPJTRAHJTDJSfDNLHXC``VBNGTYCQDIXMDSP@xLNEFRNXBIpVNLXah@RgF@`qOML@LJNSPLbaHAh@Jdj"],encodeOffsets:[[112409,19261]]}},{type:"Feature",id:"469026",properties:{name:"屯昌县",cp:[110.0377,19.362],childNum:1},geometry:{type:"Polygon",coordinates:["@@\\OnVBFKHPJCJOJTDB\\vDINOCGJVVL^JDONEbrGTLpMVJLGjAHGRkVChF@vH^zIbTETMHAZOFC^\\DXT\\EffAP\\PdAV@UIYfS|S@YPICMeM@sC[_A]VQEwyHSMuNcAUlQJMVGMS@mVBZPFO\\CSÂFQK[LqDMACiUa@[QiFBRIHYCHkGSBS[oSOqB‡IE^QHCRWHIXsHU\\UC}JEjMNAN_ZƒAIhSEYfWDQGaPMTLÂ’ERZTJb``NHV@"],encodeOffsets:[[112513,19852]]}},{type:"Feature",id:"469025",properties:{name:"定安县",cp:[110.3384,19.4698],childNum:1},geometry:{type:"Polygon",coordinates:["@@JjDNdJ\\FbKPXfZ^Ij@RZNaVSc[MsMOHQPDJcLIJ_zCG[HQxWJBHXdENRR@XQFWZQQGOFSWUCI[WCJuRGLXNMPLhCl[Ta@SqGgJMGOmyHkKEQMINMAGaGULgwY@UOGiKQ]EYyMK”oO_QEIIKiNSMa[LqOKOaVMWMGMDY\\_IKrL\\ERTÂ[DEPYOUA@nNTUHINkRBVMdNvGTxzRF^U`BD\\@tfNDNOJ@Z{TeTJZ@VU€cB[OBOeeQT@^OXBJb\\AbWTF`RCJFH\\RDJIJFXW@WLGBKxWTSJJMTVZND@bbL"],encodeOffsets:[[112903,20139]]}},{type:"Feature",id:"469035",properties:{name:"ä¿äº­é»Žæ—è‹—æ—自治县",cp:[109.6284,18.6108],childNum:1},geometry:{type:"Polygon",coordinates:["@@FJp@fxpQ\\ApN\\GNPNBM`HLMrXLXj\\PEHnI@WUCEM\\GTc\\GZYHTPBHRCPTd€H\\K\\@HXi–BJILJJAVNTOZJNtFPC`YxDPWci@IBgbGKaTOIM@KNKrP@_hE@QbgKWUMJoWAQMFEKM@wTONCJWRCZDHSAM_UD_GWMKeCITSCGIQBGXUHQoMEEGWDQIG]FMQBMaFGueFeSQDUSDSKOCSFMLƒUaPWM_PaEGFETMX]RCRR@HXKN@JNnXXEÂŒSPaDI\\£FkXWIAX]xB\\GN"],encodeOffsets:[[112031,19071]]}},{type:"Feature",id:"469001",properties:{name:"五指山市",cp:[109.5282,18.8299],childNum:1},geometry:{type:"Polygon",coordinates:["@@TCNOLBTLBPx\\AJdl†NR†RIbJTGNF\\@RcIYbmHoLQdKN_fCJYbDRRXKZFVEZVXBXIJBXMdESW[CUYHUVQFQAqsEIMPYMSBUIIJKAIj•GW[@[LGScDOGQOAGSYZ[HSd[HFNVD@XmJFG[OWiWKNqGKN_MAMO[HoM[BoRewo@Y^HpITSFENc`MVCdHNIVCLJFI`NFIÂŒP`@VZbaf[FFJG`O\\WRFA@PVPFPPH"],encodeOffsets:[[111973,19401]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/hei_long_jiang_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"2311",properties:{name:"黑河市",cp:[127.1448,49.2957],childNum:6},geometry:{type:"Polygon",coordinates:["@@VÂÈÞ@ÂŽkx˜nXŽ°VÈa°V@kôw„b‚š„JVškXlVUx„„@ÂŽlL@xkVV°ƒ„VbÂxlVUnVxk@ƒ„ƒKkÂŽVb„Il„Â@°kVl„@„™lÆnkll@@V„VXƒŽš@V„²bUlƒVlV„U„VÇn@nkJšŽlkVbÂœ@›x²V@n°VUnlKU„n`@n°bWLnVUblVUVVbknV`°kkÂŽl@@V°@nz„J@XšxlWXb°n@bƒĠlbXb™bVbƒJ@Všb„a@„„@lbUbšVmnÂœ@lšVmnIW‚œ@WbÞ@„n@x°@š„ĢaÆéϚnœ„‚lČ¯ĠŻÈwmÂ@ÂôçU™mm£Xy°UV™›@wÈ£Ǫ¯kõÃçUњ™Uķ‚ƒĢkVфÂÆšÂÞU°nŎ¥ČUÄŠx°m°¦żVÆÂÂœx°ƒÇ£@y„UônރÆ@Èĉ°Kô¦šW„kWU—bÇ»@™ÈĕWÇÈ£ŤU@›n£ÆUUKVamanwŃmÂÃJ¯k@JƒIkaVaUUÇbkaÆÑkWmÂÃUۙ™Ã@™ƒwnU±ƒ@ÂkkV¯KUkƒJƒ¼U¦ƒšÅ@ówÄ·aķůVÂ¥Uaó@Ã…wmƒƒ_kVƒwĉ‚ĉÂmmn_V»™a@U™ƒVwķóƒ‚U¦ÂLǫéóXÇmÅLǓÇķxÃkƒƒĉ™kÂmakbUĶ°@W¼„Â@bƒšÈÆ@Ė™L„l@„°J¯„mÂkl¯LÃıL—amJ@¼ƒ„™VƧUó„™UX˜ċb¯ńVbkÆÃI@llx„k°V²šV@Uxގ˜L@b„@b™`ƒšÇzkÂókä@Âğ¯ÂWĪLĉǙLmmÂnÄ‹VkbUaƒL@Ž¯„‚bU°ğLÂÃ@"],encodeOffsets:[[127744,50102]]}},{type:"Feature",id:"2327",properties:{name:"大兴安岭地区",cp:[124.1016,52.2345],childNum:3},geometry:{type:"Polygon",coordinates:["@@Âk›ƒϙmÆêġb™ƒ¯@@wƒmÃ@XV@IlÂŽl@ÂbUxl¯VlV™bV@ULVlUV™_kx™VVV™ÈÃJ@„¯šU„™lm¯x@xóÒĉ¼m„¯WƒxÅ£@Uz¯ƒWwnÂUwťƒ@knƒWƒ£óVƒUUwÄŸyó¦WI—Vmm™I@±kwÇ@@bƒ@ĉ¼ó@¯wó@¯aó¼›KŃaUwmWUwÃ…I@aƒKó@Ua™LƒaƒVÃ…wżUUÃl±I—¤VxÇx@zkJmnn‚mbnz™xlŽƒl¯ČkJl™°@„kb„Žmx@x™@kêmVnÂŽWxôXšxU°„bWLóJÂnÇWĵ„V¦™ŽƒUUb™b™ÆġK™šk¯™VU±aXmċÑUwĉKġ„k„™ŽVxk„ÇKkbƒIƒ‚ÛXWl¯bƒŽ™X¯K™bĊš„„ÞVƚnŽĸ²lxUŽ°n°òÈb‚¦—xVbƒŽƒ@¯„Vx@¯VķÞČlĊ°KĸŽȘI°¤ČIôŽò»ƨnÈ°KǬ¦ôWŎÈƨwlƒnKVXmbX`lbšwÂkVW‚XXŽ„L°a„ÂƾaĊ£nƒ°@°¥ŎzÞ¥‚»œalwôkÆ’J„a@ÂĶK„£„bU°ĊxźVÈUĠ¥ƨ™VI@ÂXU°x°Ln¥šw°UmwXmÃÂV¥ĢŽ°@nU@mÆ£š¯lKœšÜw@aÃ…U‚¥UaÃIkmV²‚nn@Ķ»@UkÂ¥VKÞ@ÞÛ@ƒkVmÄ¢a@_ƒJóÂmƒǖ¯Æw—óÇa@alƒUwšwĢřšk@wÆWXUWÂXƒWa™m@_ƒ»ÇéXaĸwVa@ÂÃKkUWkX‚kšKXxƒn@lÄŠV@¯Âm¯nřÆwš¥"],encodeOffsets:[[130084,52206]]}},{type:"Feature",id:"2301",properties:{name:"哈尔滨市",cp:[127.9688,45.368],childNum:11},geometry:{type:"Polygon",coordinates:["@@°`„_šJlUšŽ@„„@V¦°JUšŽnLôÂlnŤ@@šÈaUÃ’Vbkbl¤ƒzk°ÇVÛô°IlVUVôU„xÆU„Ž@bźĀ„º@¦šb@l²Â‚UVlÂœ@°ÒĠxšnXxÆVô¼Þ@Ãœx²KÞÂlƒVÑ°UȰôlwô@²ƒĸ°„lanV@„šVÅŽUll@bÈnÃœm„wÄ¢@la@ÃÞb°UXb˜lŎ²ƚkšV‚I@ÂŽnJnÂĠŽ°knĆbÄ¢wna@a˜kÞKƒĀ„a‚™œ‚‚IVbUÂ¥ÂwÄ wkô˜xnLƒċVçkaUıIUmÂnÄ¡W„°WôĉšalƒÞÅĵ¯@ÂW¹XÂÃaƒb¯a±X¯ºÂLƒaVƒmÂkLóƒƒbkaƒVUKVkkKV_@aÃykk±L@āU@yV_™aU¥ówÇx™@UkVƒn@lƒkÃ…lwšWVwUkĉmkklW@šašbVwnWWƒ—wWL™™@Ušƒ™UÂĂLšÇmƒ„Â@wƒJĉƒLÂÂ¥@ƒÃ_@a¯y„UWw¯ƒ¯UÄ¡x¯aÃXVmÂaU£ó±›¯nwƒa¯óÅVƒXman™„Uƒ›lUXkWa@mkI„›ÂÄŸaƒm™IklÇU™„kĊƒÂƒzkKƒš„lU„ÅĬlš™„@ÂŽnX°@llUxŹ²mKĉVWwk@UbUK@bmVmI—ƒVmwÂaWxXlWȚmºšÞÆbUxV@ĵńWÆĉLkWUbƒaWzkbĉ`U„±LklÅwUVã™UW`Uwk@mk¯VkaõVX@WbÂL™K@XƧºWzÂxƒK@lmX@bkVVÆk¼Vbk@Vn"],encodeOffsets:[[128712,46604]]}},{type:"Feature",id:"2302",properties:{name:"é½é½å“ˆå°”市",cp:[124.541,47.5818],childNum:11},geometry:{type:"Polygon",coordinates:["@@Þ@ÞÂÄ KV¯Âa°ƒ@„KVblaÄŒU‚mnnšKĊȚKX„°ŽĠÂ@ÂÞ£ôllÂÈy„™š_@a‚ƒ@a—KÃÂVwU@±™¯Uƒlkw@kÞJlÃ…Ua°ŃČaW—šVôƒƨVšU„ƒ@»nI˜b²Kބ°Klkn°ƒ¯I@ƒƒkšK@ĕÇń™@aƒÂX»¯@VĵlaÂÿVamI@aÃ…ÃउýƒĊȗJƒôÈÃ…kmƑۃ@kxÄ¡@@l™aVk¯»ƒīŹaƒkƒ¥Å¯™JUaWÂU@@w™aƒ»„KUkÆkUm„UmwÛ±±UUbUÂŽUXƒwWÂÂwÆÃk™lkUanaWwnKl™kal¯ka™Âƽa›kÃ…x™a¯@™amb¯V™lÇwÛĀ™V@x™šmêVƜVV‚aôV„wÈx@šˌx„¦VÞ¯VšlmX@‚ƒL@¯Ua¯LmV@„„°X„ċK™V™Âƒ@UƒÈ@‚¥@w—ƒġIU™km¥Źwƒ¦¯lmn@°kxVV@¦óam„n¦l@nx™lĉVóšmx™n™ÒĉĀĊ¼„þ„šǔêÞ°ˌĠÞÒ°ĀɲĀƨźˤȤƨĊ°w@£nymwnkUUV¥ôÑVmkÂÆmUUVa™mVIkmô„lxkXÞþƒbl„ƒl@ÂkV„ƆƒV„xV@š¼VÃ’@šŽUŽšnnނJ"],encodeOffsets:[[127744,50102]]}},{type:"Feature",id:"2310",properties:{name:"牡丹江市",cp:[129.7815,44.7089],childNum:7},geometry:{type:"Polygon",coordinates:["@@U`lLUlVL„Ulb„aô„lKnÂŽU„„b‚K°¹²W°b„aÞb˜knyUÂlUkamř²L@m°@lšmš²n`ôÅlK„x„ÂÃœKnxV@„Âl@œƒ›ÅXyW_k@™wm™ŹĕmƒX™»‚ƒÛ™l°ƒôšÈ„»š—ô˜ô_WW@UÂœal»šwU@@wšUVƒš@VƒXI@w‚ÂĢ͑ÞȻ›aU_@mUkly@¯óV»XmWUXUWmnÂmÂ¥nUUaWLkȮ²IÇa™wÃ…að¯nUa±a™ƒ™@¦õÆğ„@„™@Ã…b›xUÃœÂnÇłlb¯¦„ôó»mƒ—@±ƒUÂk@Wwƒa¯xU„V°ƒxXbǎÅÂUV™™ƒK@¹ƒKUaȯ@ÅÙXƒaÂl™ƒlÛkalÇUÂǫÇńÇakbÃƆ¯nlš¯Ž@¼™VUx@x¯ÂW¼™Æ¯šmĖ„Ĭ¯ČƒVk‚ķÅmxœ°ô²V¤‚bUnÞW°bÄ¢w°V°„XxƒV°z@bÞ`@„‚¦„KĊŽ„I@xƒŽn„™ÈÈK‚„šV™„@VššXK˜xX„mXUx™a™b@‚kXllÄŠnVlUx™XkxlÆk„m@U„Vlš@ÈwôxV¦šbU`@zÆV@„²KllÞz@b"],encodeOffsets:[[132672,46936]]}},{type:"Feature",id:"2312",properties:{name:"绥化市",cp:[126.7163,46.8018],childNum:10},geometry:{type:"Polygon",coordinates:["@@ऊþÆÞ@bnJUb‚ĀnblŽĊš„„ÞlĸwǔÈŎKÈnôWǬê‚KV¥„ÂĸôUxš„@VšbU¼m`nnĊŽĊ„xlUšmkaVÿšLšwš@°»UÂmbÂKmÙUšwUmVknKUUl¯ƒKU™ƒUȃ‚™nK@ÂÄ kX±lX„°„L@¯¥@wV_m›ĵ¯Ww™L¯ƒUkÅĂVÂU™l›w—V󱃯aƒVka°wVk°mÞ¯Ŧřƙl™²™Ŏk™U@ƒmUkb¯ƒķŽ±„ó@kxȯó¯VUÃ’k„ÃŽ±LÛwÃ@ó»ÅUWw™mÄŸw¯Ñ›@UkÂV±Â@k™a@¥ƒ¹Źÿ@aƒÂÃ…VƒwóVVUkU¯JÜóÈUl¯„yk£laUaVÑÇb@™ţ@kmóÂmK™ÂV¯IU¥ƒ@@ĪÂkV™Iƒ`@ô™¼„blU„lƒÂ™bÈb@xÇKkĢɳaÅɆÅ@ƒŽÂVƒK@z™@@¥ÆKnÂÃœ@@aÛÂUw›wÂnU‚ķ@ƒ_ƒV°Ž@„klVššnULVVÞbVl@°™@nx™n°LŚÆlV„ȃmU²@VmÄ Lƒx„n¯xkWƒzšJ‚wnLmbXbW°ÂšÆ‚™²™@™Žšx@ÂÂJVx„L‚Ā²Æ°I¯º‚È@Ã’nÈ"],encodeOffsets:[[128352,48421]]}},{type:"Feature",id:"2307",properties:{name:"伊春市",cp:[129.1992,47.9608],childNum:3},geometry:{type:"Polygon",coordinates:["@@ƒKƒ¯kWW²ğl@ÂŽmLšDŽ„VVš„Lk°VVmLUlVn™xšVnނLnaVŽ¯¼™@™x™KUÄ€lb™n„`n„Æxô@VbU¦ĸŰĸbôxÆ@„™V¥„»„IVl°LUÂŽll@²„mV„x@ššÞܚÞVnÂŽlXÃ…Ã’lbÈaVVUblb„J@I°lÞIn‚Æ„mxnbUbVLÃ…Vm¤@œţVǤXÈÇĖ@šÈ¼˜aXVÃœaXbWÂŽnzÅŽašř„KôbšUlw@¯naÆKnUU¯Üa@mkkVUÄŠm„™żÃ‚ÂǖŽ‚K„™°L²lÆI@ƒ¯¥ĉƛVaÞk@ÃVaÄ lnUVwƒÂϗmaƒ@™wĉ@™a™VƒxÂamX@aƒ@UaÃ…LƒaVWƒ_nWm£nWm_Ã…V¯ƒm@m„ó¤ÂšÃ¦ƒ¯ÅalmX£ƒÂ™ÂVWUŚw™mÇ@@IV™„WUw@ašI@„k@wŎ»Wƒ„ƒ™ÅVaÂœK›Ika@Â¥lUkUlwÃ…wVyÈwWU@a¯U°m—ÂÇ@UçƒaVa¯mVȁwÃUlƒUk™V@k„mUk‚ÂX£šw°@@ǃaÃIƒƒam™Ûam„¯lÄŸÂmÂmI@ÂÂJ™U™l±ÅÅŽ—kWa¯VÃa@ÞkbÄ¡@ƒxÛnÇm@akkÅVÅl±škšÅšťŚÃ°¯nUl¯xlb„U°b²„ô‚˜UÂœxšk‚VÈUŎ„Vl°„šKXxĶ°nÂœU`@x°¦@Â"],encodeOffsets:[[131637,48556]]}},{type:"Feature",id:"2308",properties:{name:"佳木斯市",cp:[133.0005,47.5763],childNum:7},geometry:{type:"Polygon",coordinates:["@@nš„b‚„ÞJ„b@ȯ@™xW¤ÂÂVlƒn@lšUVlk„ÞVÆxU¼°nUb„bVèÈ@˜ŽnIn‚@šÂÄ¢mlÂUw°™żƒ‚VUn@lnL@VôbšwĊ‚lœ„JķĸĢl„wôwƨxVÂVUƒÂŦšxšLź™Èš°`nnÄ wÅŽJÞÂĶwôJ„Â@¤Xn܄ĸlšn°¼È°lŽ„„Uš‚b„xš@„l@ÞÞÈm°„lôwšL°¼ĸ‚°Þ²nÄ @ôwÞ`ŤI„V„ÒĠU„„@„VJĸbƄ²@°ŽĊKšœ„JĶaÄ¢ÂÈ°@ô¥°nš¤‚bÄŒUš@Vx„mUw@aÃÂţƒÇ™ķƒ@Ä•Ä·Ä«U¯²Â@ÂÆmVÑô¯X¥ċç@™ĉ»UÂ¥ÃÂÅ£KWVÃ…kUVÃÅŽUmÇÂÃx¯aÄ·xÛUóL¯a±óÅb¯™ƒÑŃVÿƒ_Åķ„a@UƒK@wm@Van@UmmLVa—@VImmXUWƒÃUřƒKUwÃUUƒkVƒk@l¯X›‚Å_ƒJ¯k™Jm„ÅLƒa@Â¥U@¯Vƒz¯@ƒ`@¼šÂmxƥšÅKÛk@±laÛ@@Xm@™ƒ@xƽ@WÅŽnšˣĕÅ@@aÃ…@@nÃbǯ@ƒ_U›kUWƒkb™wÃU@ç„Wlw@anIƒ¯lyÂœX°m°VšašÛšm@„mVwÞK°ƒšXlaXmm_ƒ@UƒkwÃK@ƒVI™ƒXmV»ƒI@aƒ¯ğW™bÄ¡aU_¯JU¯ġŽƒ„ĉ„k„Å`±nÃÆk„™bóĊ¯Xƒ‚ĢX‚mVn²JV„lbUè„ČmK—wlóğx‚xV¦UaÂJ›ÂšƒbƑÿÃL—l@bmbÄ¡x"],encodeOffsets:[[132615,47740]]}},{type:"Feature",id:"2303",properties:{name:"鸡西市",cp:[132.7917,45.7361],childNum:4},geometry:{type:"Polygon",coordinates:["@@‚LšKVVnkšbVšÈb‚²U°VnklVlaÈL@anU°ÜmXV`ÂœnôLƒèšxlŽšLX„˜L²ašVVmÈX@ķ˜lnU„Èl`ȹš@ŤŽ°U@x„KnnV„mlnnUl‚lVnnaÅŽwlVÞ҄@n¦šLVŽ°lšwVk„Lšaގl„n҄š@xmLÞ¤Wnœ¼‚WÈLVVUxlÈô„„WVaU_VKšKXUÆbn™‚nôK„bÞw°bÆWXamÂVwÂœK˜™Uw¯WUk„UlJUwVÂUa™@@kmyÂzm›ĉw@kVwšÂkƒÂW¯ÅKU_Vmƒƒ™xÂU@aW@@ÂkK@w„a@Kƒ@@kVUƒaky°_Vm™kna¯K@™ƒL™wÄ¡Âk@@IÇóX™ƒwVakmV@mwXUWanƒlĉÂ@ǙUw™KƒƒóšܛNJۄm°Â@›w—Å@ıb¯Wƒ¹„WVwŹĕ¯kVmÅb¯w@aƒwmV™UUb™V™IkaVwķ™xk¼›b@VXXó`󗙘ƒ¼ÇÂ󙯄kŽÜšÂ„š¼WÂŽn„źĖnššxl@X`WzϮ"],encodeOffsets:[[133921,46716]]}},{type:"Feature",id:"2305",properties:{name:"åŒé¸­å±±å¸‚",cp:[133.5938,46.7523],childNum:5},geometry:{type:"Polygon",coordinates:["@@™UƒƒUwó™mÑÞÑUÃÃUkmmŃyV¯ī„¥ƒÂUÿĉ¯mÇkaWbÃ…X¯aÃxƒaóLÂmmšÅaWV™LULV`UbƒXóƒkÇVwUUÇKÂX›»XmãnK@wĪmÑkƒÃ™bƒKUl™x¯kU™Km¥ƒ@ÃÑkUÅxmbUmÂkVkmmnkUƒmmƒL@w¯Vţ™@Ǻk_ĂmV—k@ĸVx‚VÈ°lLkllšUbÅwƒnÂVW¼nlUx¯XmWUnÃ@™xÃUó¼¯J@LVbkJWnkb™W¯„ÃLUxƒn@‚™n™Ü™b¯U¯n›Wkz„°mJ@bkxƒX@èÞVšxlaX„lVVœ„`°@ÈÂÞa@mÆ@@bÆ@ˤĖm™XÅƾ@@wš„n@@WÃœ@kb@²ÜlÅLƦ™nw™Â@»„_°@„y°UV@@¦„bÆKnƒšI°l„IÆ`ϡW@k„llUV„ÞVVx„LƚÞVX„WVnnUJ˜@UbnKVnm@Ubn@@x„L@VƒbÆĸ„`UĀƄ„Ò°šŎa²ô°bôKÃœVĸw°bÞwȎVnÞÅVUÆlXU"],encodeOffsets:[[137577,48578]]}},{type:"Feature",id:"2306",properties:{name:"大庆市",cp:[124.7717,46.4282],childNum:5},geometry:{type:"Polygon",coordinates:["@@mÇ@ÑÂÇ°¹¯J±ÅÂÿƒKUw‚I@™wšÂš@š±Å‚™X¯WanamKÂx™I„ylX°wƒm„wÄŸKUn±@nVDŽUākƙ¯Kšmmwš@@¯UkÃaUUVK™mU™lk@ƒ¯Â„U„`ĸ@V‚mÂœxVxÃœÂ@bÛ@m‚ÅL@¦š@@y„L‚U„ÂÅŽ@ÆɅɴblġÈL@wÇaša„ƒkkVƒaš»@ó¯_ÃJ™wÇaÃ…Xny›U¯¥Å„@w™bÃa™LmmÂ@@ƒVUÂŽlbÄŸVmš™¯Xƒm_ƒ`¯_Ux™m™L™a¯b@mƒaó¦Çk™¤V„@bóJknVx™VXx±aƒLUbVxkLVlÂLWlƒ@nX@VÃ…bWlÈnƒx„bWšÅbmÂŽ@xÂœbml°b™„XbW„XVmnn`ƒLmšnbmb@šk@mwU@@š¯Jlbk°lbkšmLXxmbVbkllšÅނxX„xVWVÂVa²VܲnxƒVVnÃ…lVlƒL„¼šb@xV@XÂŽVbšIÆ°„¦„lźb„Ĭ°¼Ulšb@kÄ¢@lw„@Æ’ÃœlnȂƄóȘI„ĉ"],encodeOffsets:[[128352,48421]]}},{type:"Feature",id:"2304",properties:{name:"鹤岗市",cp:[130.4407,47.7081],childNum:3},geometry:{type:"Polygon",coordinates:["@@Þ¥‚™ô£nƒn@°„ÆUn`mXn¤mX„`UX„bÆKVb„@@bnW‚b„wšUšbÄŠ@šx„@nbšWVÂmƒÂ_mm@Âó»Um„ŘWXkĠ»²¯‚¯nķšwÅŽ@ĊšŎK°bĸUnјKȦĠÂÈbÆknJššÆUÄ¢V°IšŽšVƾƒwÂaV™ƒƒkÂǯ¯»™mÄ·kۃWm@£ƒÂóIĵxÃÂÅIÄŸxmm¯_ǙŹš™K™wťŽ„ÂUVUŽƧwóxƒxÄ¡kĸķƒIk›ĉ™xóa@UmK@kVmÂUŻ„¯šVxkÂŽÄ¡n™‚Â@mÂmJ¯n°V@bXVÇxUzÆxkxlVkV@¦lbÂœJ›LUbšÆƒ„X„ż@xƒl@™J@bVxƒXUš@JÈ@šn™xVÆUXš‚„ÂW¤knÆb„°"],encodeOffsets:[[132998,49478]]}},{type:"Feature",id:"2309",properties:{name:"七å°æ²³å¸‚",cp:[131.2756,45.9558],childNum:2},geometry:{type:"Polygon",coordinates:["@@²mÅŽ_lƒĊƒ„ƒĢÂV°°IV`Ä¢bšaÄ X„°@b„JU¼Wnš„UJ@„ÞLlxV„„@n`lIUa@K°Iô»ÞVšwÞ@VmnX°WVwmkX»‚U„mÅŽxVak™lkkKǯÂUUwÇWUn™U±b—KWĪKk™w„çóK›mU_nW¯ÛmV@bÇKkbkUml¯U±VÂÂÇaU™™amlUU™LÂK›„k@ƒÂU@mwÛLƒŽƒwkLóÆm_™±™nkŽ¯@@n±KnÅšlbkVV‚mz—lWÂXº@ÂĶ°"],encodeOffsets:[[133369,47228]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/he_bei_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"1308",properties:{name:"承德市",cp:[117.5757,41.4075],childNum:11},geometry:{type:"Polygon",coordinates:["@@lLnlmxn„„IVVlUnb@VVxXJWL@LގVnnV„J˜_@wkmšK„b‚x„wXk˜WXXšKlb²K@nVVVb„L@WlU²„lKVnUJVz@VVb@lżmVUVnbôaVX@°Ub@lWbXš@b@bVb°x„@VxÈLVlšaÆ@Þb²k°@lVUÂŽ@Xn@VW‚LXb@¤VXšKVVVLnm°_ƨ¤@aUIVa„alkX›°k„™V@„alwUÂVy„U@k󙰃na°UVUUmUÂÆw@mkLVUƒWVI„WšLnn@xlVnK„ÂmyU@ƒU°UXaV@U¥ƒU@Uƙ@aVUkWU¯ƒaU@WLUV@bkbmKULmKkUVUkmVIUwlWV²™Uml°U@W„LUwVm@UUK@_ƒKUUÃœaXw@ƒVKUU@mVIUUlmnIVVVbÈVlKnbVKš@nI˜@nVnwVLVK„K„„˜Vnb@aUIVW@In™°@lVnIš@lWÄ¢@°UVL@b„@VyUUƒa@wÂ@WUnU@Wǯ™K@ÂUkkJWaÛbmk@mVaÞU@amkÂWƒ@mXUKkÿƒ£@a„kl@Um°UXwla„al@nmlXnW°znW@aƒwV™@ƒakbĉ¥VmU@ƒIƒVƒUƒJÂkUmWU™KÂbmkUaƒKkUVU@KV@@klw—™WaU@kmƒXVènbmlUUƒKƒX¯JkbƒI@JmIUWU@ƒLml@XkJ@U™kƒK@aVKÂwWa—IWwƒmÂUƒ@mU@JÂ@UaÄ‹U™aUUƒVkI±ƒk@UUƒ@UbVVm@UVÂKƒLƒlkIWaULUWƒXUJU„ƒ@WbUb@lkXUxm@@JVn@J@b„nƒb@Vkx@bšLU‚Æn„JšaVXnKVVmzX‚°V@_lJXxWXƒK¯bÃ…amUƒ@ÂlUI›bñJ@LÇKkIÇ`kxWL@„ƒ@@bUVUb¯xWKk„Å„VlULW@ƒŽn¦Ul@I™lmUUUVm@ÂkWƒnkKma¯XUKWmnwVwÃL„mŽ™VUbUVWb@Lnxm„ÂxVÂŽmbXx›¦@„nb@`™„ƒVƒ@kbƒLU„mVUlkbVXkºmnm@@xk¦šbĢÜlš"],encodeOffsets:[[118868,42784]]}},{type:"Feature",id:"1307",properties:{name:"张家å£å¸‚",cp:[115.1477,40.8527],childNum:15},geometry:{type:"Polygon",coordinates:["@@k™ġۙalÂ¥@wn@nml¹UWlaVknUVƒ„Kla„@„Ušƒ@_ma@ƒœ¥WwnaU‚wnƒmw@KXaVUVašUnÂmWUk°™lƒnUVUXWVw™IWVóKUI@WÂXƒxUU@mma@kUKWLkw@yk@ƒaVkUUÄ‹aUU@Wk@Unm@UVmLÂm±IUƒkJ™kWƒ@a„I@m@U„ƒVƒ„Ula„@VXVƒXmVwnkWKƒKU_k@m¥ƒmX_™JmnU@km@U@KmU™VƒU@U™@Umk@@LƒmW@Û£Wƒka@wk™@aƒI@mmk@mUa@UmUƒIƒwÂW@aWUƒbU@kbÇ@kwƒ@makVUk™U@aƒm@aU@mxkUƒbƒKUXUıKXVWLUK@wkU@V™@WXUaÂ@WbUxƒJÂIƒŽ@¦VèVVX@±ê¯KUIƒ`¯UULVx@Vƒ@UKƒIƒVkLmVkKmš@nUJÃbkIUJVXšVVxVbU„VJ„Un™°bV„mlU°„XnK@Ul@lVÈVUXšx@W„@VXšV‚KÞb„n@VnbV„m`ƒUÂx™kW@UVkL™Km¼@lUnUJVnV„XV@Vm@@LV„klƒIkl@VƒÂWlÂÂŽULWKUL@ÂmJ„@blbUVUlmzUJUxm@UÂUbÄ‹Ãœk@Ub@VšLVV„¦ôbVÂŽmšUKUkU@m„„@VlVn¼WbUJ¯@@„°šnIllÈl˜@nXšWlLÂœk‚J@bkxlxkxlXUlkÂlJƒšXL@bW„n`@nƎXxlL@xl@Xb‚LÂœKlVlIXblVUbUJWÂ@lX@VL@VVŽšXšJšw„n@WnL°K„bVbl@VI@K„Â@U@ÂnmVmV@XUWI@aXm@™VUUkWmn@lmUUk@mUmK@UnwVĉ@ƒƒmU_V@XJôVVUšLVUn@šllUnJl_n@šml@XÂŽlLlw²LVJUL@VmbVbÂlVXmVnlš@Ť¦„nn@܎@bšl„@@XV`„Unb@VlLVb²J‚Xn¥ÆÑ@¥Þ@"],encodeOffsets:[[118868,42784]]}},{type:"Feature",id:"1306",properties:{name:"ä¿å®šå¸‚",cp:[115.0488,39.0948],childNum:23},geometry:{type:"Polygon",coordinates:["@@VbXWš@@UlV@xVLXKWU²LV„VW„L„alVnwV@@b„n@bšVVllUnb„@lxÈ@laV@„aXV@b‚X„x„J‚ÂnV@VVb@nnl@n„J@blšl@„ašƒU_VWUwVUškUm™Ukb±mVwÂœU@ÂVIUW@UWk„@VU@ynL„m@IV@‚bnK„LVaVmnIlaXwV@@WVL°@@xnX„@V`V@VbUVVLVKnwnL@ll@@_V@VVnaÆ@ÂœKVXÆ@nƒ@wƒKmU—™Wm@Âkm@kÃœKXU@ÑW±nIUwVƒ„Kla@I°wU±kškmm¯mƒ_ƒJÂnƒaƒwÂW@IVaUama@wƒUƒmU@mVw@aXk@mWa@£km@aƒ_kVmUnWW@¯bƒkUmk@ƒÂVÇm@@kUU™KUU™@UVUamVUaWIkb@xU@@amUkKƒVkam@@kVUkUWmÂKmUkLUb@xmJĪU@UImVÛVmnUwƒJƒU@VƒXÂ@UWm@Ub°¦UšmxklmX@`ULU@@UW@@xkn¯@makV™UmxUb™°ƒlUšƒbUbƒnUJƒUUVƒa™LkbUU›JUUÂ@mUUUƒJkaƒ@™xUIWJƒUÂnƒJ@V™zƒ@kb@`@bln@l™bƒŽ@X@š@š„@Xl‚bnbVb„@„„VJlInlšbVw@U„K„Âl@lbnan@Vb‚JôLn‚UzlV@lÈLVbVK@LVx—VWXX`WxXz‚bV`UXV¤nx@„bVlVnVlUL"],encodeOffsets:[[117304,40512]]}},{type:"Feature",id:"1302",properties:{name:"å”山市",cp:[118.4766,39.6826],childNum:11},geometry:{type:"Polygon",coordinates:["@@„@VVl@²„lJ„UVVšbÄŒVVb‚@@InV„@‚V„nXx˜JXb‚xUL@b„Lšl@VlI@Wnk„KV@VXnJ@I„Jla°I„W„LVVnkmaUç„WVkôaܯ„@nV°wnJlaV@VUnUUaW¯wXWWwna@£UaWKU¯ƒ¯@aVUkKUamUUƒn»‚an™„IVwUWlkš@„LlWVakU@K„_lƒšbÞU°@šy°n„@„KÈkWW™Âţ¥ĉŃkÄ¡WUw¯£¯ƒÇwÅ£wƒ@kK@kĴÃwÃ…bǤÛÂÅ¥V™lÂÂW°@ĸ™x@VVVULVLkl@V@Xƒ`Ub@Xm@UWÂbƒk@ÆVbnLWV@lnXUbl‚@X¯lmU™VkKWLkK@_UK@U@UmmUxmVXLWVULkU@`W@ULUK@XlJXzV@@xml@VU@UX@Kk@WbUK@Xn`ƒXmJnšmškxUÂVbUVlVVxUbV@nKlL„kVKÞbVKXI°KVšmVUIUKULVxVJVLkV@Vƒ@UbU@WUU@UbUK@b@nƒV@VkLmb@b"],encodeOffsets:[[120398,41159]]}},{type:"Feature",id:"1309",properties:{name:"沧州市",cp:[116.8286,38.2104],childNum:15},geometry:{type:"Polygon",coordinates:["@@@ln@UȄŽl@Vn„l°aX@mXnVlU„`@bln@¤Xb@nWl@bUx@nnV‚„„V@xnbVbUb@J‚X„x„b‚mXa@k„UVwlW„k„KôÂVm@w™kkK@kl»Èƒm™VKXkla°@XVV@VI@ml@@Vn@VX@V@J„@VxUzVVšš²blVk¦@šĠ@@»š@VK@VÈLlK@XnJ@alIUÂl„a„VVbš@„n@a„U@WUIV@mUn@mKXml@lL@LnWšb@XV@@a„VVb„V„@VV„IVWÈb˜IÈ»ƒǟlWšaVUÃ…Uƒƒ™ÂUm@kVU™WVkÂaUwmaóUƒJUU¯ÑUÂ¥mk™¯UaƒKÃ…nÇyóXmWÛX¯aÄ‹bÛa›J—ÂW™ÃÂU¯»ƒaóóÂUmÂ@IƒšÂVVl@bƒLUJWLX@@xšXUxl¤V@V„nVUV„XVbVš@Ž„@@VVn„°VÂŽ@ÂÅ£U¯VƒUmƒÂUWV@mUXƒaƒbUKUwUaÇKn„ƒVk¦Wb@VnLmV@bkV@n„xW`Ã…_UVƒV@bƒUklVX@VmlUƒx@VVL@x—VWVÂL@VW@UUm@"],encodeOffsets:[[118485,39280]]}},{type:"Feature",id:"1301",properties:{name:"石家庄市",cp:[114.4995,38.1006],childNum:19},geometry:{type:"Polygon",coordinates:["@@la„@šy@U„I‚m„VXIVJšw„@lb„IVVnV‚@VVÂœIVVlašK„bVU„VVI„mVa„aV™„kš¯VanwšVlUnb°@lm@wX@@VV@VK@_nWlknwV™¯¥Van@VX‚@„W@U„V„IVxnmÃœUnUVJV@„šnI@wValKnV@k‚mU£na@mVk°K„LVa@UU@UƒmknWWkXU@aWWÂ@@km@UaU@@klK@UkaWaUÂnamm@U„a¯wWÂU@UkƒL@ÂŽUn@x™V™lUXVJUb™LmU@aUWUkmKkLUUm@mW—XƒaƒmmkkWUÂm@@U¯JUUm™kU¯@mKĉxÃwÃÂ¥ÂLƒUóŽmwkUUUWVkKm™kKmLX„lxVLVxXJ@nVJnz@VWL@`nX@šƒxƒ@kVUUmJmIXx„JV„ƒnUVƒ@UVV„@LUšƒ`UXVVƒ„ƒlXL@l@b@VmX@b™xn°™UƒbkKWLXlW@@bƒK„mKULmakLUlmb@šXb@xmXU`V„b@`lLÂx@nWVXL@‚°ÂWlXnlb„KVK„XVb@˜X@l_lJ@V@XnŽ„I"],encodeOffsets:[[116562,39691]]}},{type:"Feature",id:"1305",properties:{name:"é‚¢å°å¸‚",cp:[114.8071,37.2821],childNum:18},geometry:{type:"Polygon",coordinates:["@@nKlLnšlLXUVVlVnxô„V‚KÞ¦ÞxÄŠwnL°@lVnšVV°I@Vn@V‚lXnl„n„b˜WnXn@VVlKnLVlVX@bnVšKVaUIVWškšU@wVm@¯@UÂ¥VmU_°lšK„k‚w@LX‚Va„U@wšUƒUUKlUóW@UVUÂœUlƒ°K„wlKU_na„KVnlKkkšWWa@IÂœJVa@IlJnU@„KVUUmVÂlaXUl@lm@kXWÃÑnkƒ™±™kÂ@wğ›@@UÂ@mKĉLmVÂJ@zmlnÂŽWLÂUÃJU_ƒ@@šmJkXUVlbklÃ@Ãa™b¯@¯Â±JÃ…wÄ¡aUU@ƒkU™@mVÂI±bUKƒL™WUXƒJkaƒLóKULWbUVkKmnk@@bmLUŽƒl@bÂ@mnmJkUULƒaƒbnÂŽmn@lVV@¦n@„l@b‚znx@`Vz@b„xnV@xl„lbnKVx"],encodeOffsets:[[116764,38346]]}},{type:"Feature",id:"1304",properties:{name:"邯郸市",cp:[114.4775,36.535],childNum:18},geometry:{type:"Polygon",coordinates:["@@„bVKlVnInm‚@@a„kVÂnK@al@nmlLVUXaVKôL„Klb„IVWšX„KVL²a‚JnUš@lV@„VVÄ¢bÆx²I°Ž°@šaÞbÞ@lkkaVUlWnI@™„@V`ÞI‚VXKmÂnk@y‚InUÄŠKĂkUUamUUkƒƒ@aU@U™ƒk@WUwVkVJVkkw°a@„ÂmK@UX@VV„LVW@wšwVa@¯XÂm@@lUIWaU@UWkXWmU@UwmUkKmn@lkVƒ²™VƒaULUVmJUUUwƒLma@™UmkIUm›L—mVšmx@b™LUamKÃ…L@VmbkU¯KÃamzkJUb±Vkb™L@lU@WIkJƒzkKmKƒnUaÂlWkkKW@@nkbk@WW¯XUVUJ@XlJ@Xƒ@XlWLkUƒ`VUnaWa„UV@UVIƒaUxUUmVƒK@I@WÂ@DŽU@@U@bƒ‚@nmKÂXmx™@UxkVWUX„@`VLlL@`™zX‚Ãb@b‚„@VUVkIUJVz°KVlnLlKnL„xlLVVUVlXUJ@nn‚„I@mVUlbn@@ÂŽm„@bV„nV"],encodeOffsets:[[116528,37885]]}},{type:"Feature",id:"1303",properties:{name:"秦皇岛市",cp:[119.2126,40.0232],childNum:5},geometry:{type:"Polygon",coordinates:["@@lnV@Xb˜škx@lU@@LUVlV„LVbnl‚ašLXVVn‚l„I„V„U„JV@UnĊ¦la„bš@nJ°UmƒV@„wn@VU„JVI°bnWlXnWVLVK²b‚akk„ÂlI@aUaVƒUwVUUalaVwnUVak¥šX@W‚kÂœLVÓm„mUK@_lWš@n_UK@alÃ…@ÂğÅƑŃÃÂmƒ@їţÇlƒLƒ@¯m™z¯@ÃV™ak„ƒ`@LlVUbkXƒK™@klVXUxƒJmšÂbm¼V„nVVblLUV@b„°V°XLVb@¤mbXxWX°xXÂŽVbmVUVU@kbmI¯xmUƒ@Û°óbUl"],encodeOffsets:[[121411,41254]]}},{type:"Feature",id:"1311",properties:{name:"衡水市",cp:[115.8838,37.7161],childNum:11},geometry:{type:"Polygon",coordinates:["@@„KVlV@X°xƒb@VnnmbVÂŽXblb@VkL@lV@Vbn@@l‚@XX@bWVXlmXnlV„V@@VUbƒK¯LUl@nmbV¤Ân@l‚LXnlVUV@ln@lb„UlLnV@bV@@wlaXJVbnUVbVUš@VVšLVVn@VVX@@U‚KXU˜U@wUK@U„wVÂnk@UUWlk„V@a„UVUÆ`X_ƒw@mlU@anUmK@UXal¥„UmƒÈLVbVxVL„a„bVW@nXU‚Vn„„V°UŤV@ÂUƒ¯Um@Uƒ@@ÂU™UaƒWVUmUUƒU@k£Vw™W@wW@XKƒIUa@wU@@al@UK@_mKXKƒbUU@aVKmš@Xmƒƒ±@kbÇakLÄŸÂVaUw@a@ƒmkUJƒk@ykw@£ƒÂWX@lknk@WVkbUÂŽVnUVƒL@‚mVkI@JUb›I@JXb™XllkLUmƒLmbV`kLƒx¯Lk„›VUV@VôXkVVL„V™V@xƒVUbWÂ@KÂxƒl™L¯kV`UnV¦°@"],encodeOffsets:[[118024,38549]]}},{type:"Feature",id:"1310",properties:{name:"廊åŠå¸‚",cp:[116.521,39.0509],childNum:9},geometry:{type:"MultiPolygon",coordinates:[["@@la„UšÂš@šUnL@VWbklWxnIVV„V@X„JlbUlšXVbn@@K„mV@@X°WVInJmn²@lmVbnL@amKV_kwlmX@@LVamaXaƒaVU@UnJVanLlUkaW@UaVakK@IlKUU@an@ln@alKUƒkIVa@a@klaUKUV@UkUV¯šKVƒV@kUmƒU@@a¯ImJUU@VV@UL@Uƒ@@WXUWa@Ukwm™@ƒX@@w@al@@aVIUmVUUUVWUknK@I@™lÂ¥kU±a™™UUVyUwƒ@@I@UUWm@@Uk@@nUJU@WU¯@kbWlULnšÇ„k¼@llLšl@xUnóŽƒLƒlkXUxƒV@lWb„I„`°nnn™llÂŽV²¯x@JkbƒLU„VxmJX²@Ã’WVÛL@lln@‚Xn˜šnV„L"],["@@@kX@ValaÂa@KWI@UXW@ÂWanaUIW@UaUKÄ·ÂŽk_W@UVUKUš@bƒ@UamxVXnJUbWVXLVbn@W°kb@U@Wó¼mIU¼k`V„@bVbl@„lX@lUôVlUÂœIV`lX„Vn@lUlVn@„l@UVaƒIUWl£Um™ÂVWU@@UUKlUUUnƒVL@KšUnLVWUa›@™U"]],encodeOffsets:[[[119037,40467]],[[119970,40776]]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/he_nan_geo",[],function(){
+return{type:"FeatureCollection",features:[{type:"Feature",id:"4113",properties:{name:"å—阳市",cp:[112.4011,33.0359],childNum:12},geometry:{type:"Polygon",coordinates:["@@lKl@nVV@„bn„@VVnm‚nL‚LXx@š„‚VLlKVU„IXWÃœ@șlbl@XUÄŠUlwnW„LÞw‚m@ÂÞUVmnVl@nX‚JXLm@VnnJla„I@VkxVb„@VÂŽln„J@knKVn„@°aVanal@XK°b„‚@š¯VJXIš„VK@al@nV„k‚@nK„a‚b„@XL@blVVKVLXK„@VaVI°mVaX@V_@a@yUkVw„VšIVašJ°™@anIlaV@nKnXÆm@wUUV±UUWÂUKnaWwXUWmůVƒam@kakImƒUKƒ»lan@VXXa˜W@ÂÂÂ@UlUUa@a@UlwUƒV@Xal@@anIVaUK@V™XmwVmUmV„LXl‚@nalLnal@„šnKlkV@@UnJ‚UXnl@nVl¦V@@VnJ@nUVVVVIn@Va„JƗn@@K@m„kƒa@kmWVaUI@a@™k@@aUL@mmaVIUKUVƒ@@IU@mƒUmmL@K@UÂUUU@mW@@nU@ğ»mVmbk@klW@UXnV@LƒJm„™lUnUJ™UUUWƒƒ@UnkKƒxmLÂa@ƒ@@lUU™bmUVWk@@nkUmam@UakJU_ƒVm@Ã…lÇLUVmVUwULƒKU@ƒk@UƒVUlU@@Uƒ@UaUUWaŎƒzÂJƒaWLkl™b@bmL@„kKƒaÂbWÂŽUVƒ_Â@mV@b¯JmXUbUK™¤ÇLUU@b@JkLWmkUWIkJ@VmX@JUbVXU`¯ÂVV¯blK@LXKl„UV@Um@@Uk@kxWÂŽkbƒL@KkbmL@‚UXmaU@@l@x@blX@xUJ@bULUlULÇ@@VšnU`W@@nÛ¼U@@VmKUkm@VVX@@xǚ@bUbVb@VX@@x‚LUb@lƒ¼XLlbUlVVU„Ub@n"],encodeOffsets:[[113671,34364]]}},{type:"Feature",id:"4115",properties:{name:"信阳市",cp:[114.8291,32.0197],childNum:9},geometry:{type:"Polygon",coordinates:["@@VllInJlknJVkVU@mXÂlUÞ`VnV™VU@U@y„@nXlKV„nJVkXKWaXI‚b@yVk„VUkVwn@‚K@ÂnW@k„KlUXVVUlbnUV`n@V_V@llX@@V„b@bV@@nlVUb¯‚WLnbmb@ÂŽnLnK˜b„U„bVWnLlaX@VVUX@Vln@`kL@ll@VXVJÈIVl@XÞJ°Una„LlylU@UXKlnn@lanLWWnbVI@KXKVL@LVWVL@UVKUIVWX@@XÆJ@In`@ÂlJVI@a„WšÛnK@UlK@UU@VK„nlm„nXal„UllLUbVVšknJ@nV@Vm@a„Âl@@xnV„„lJVUU@™w@aƒk„@XW@_mWnUlÅUmVKVÂ@ÂVÂXwW»XƒWaUwnkWUkÂVÂUƒU@@Â@WlaUkkaƒIWVkm¯xmIUmƒLUVƒaUIó»m@ÂmmwXk@a›mk¯¯Âl™@wƒmkLmmU@UbkUWJ@XUbƒJ@b@l@znÆmK@Xk@Ub@lm@ƒI@akmVKUUVUkU@U±JUbkƒ@IWmkxƒa@UUV™UWVkIUaW@UlÂLWn@VkJƒI@VkK@L@bmKƒÂkJmUUaUKWXk¼VxnJ@„V@@VULV¼ƒ@@UkaUlWL@U@W@IkKmL@KULUWULWKUXUJmIƒb—KƒŽƒ²UW™nWKUUkLUƒmUUam@UU™@ƒmUL@xkV@„VV@bmV@Vk@mwkUƒVUx@ÂmbX‚ÇnVb„‚UL¯šWÂŽnUVLVb@xnlWnU@UVUÂVVUbVVlVkn@llVUXUWUXVbUJ@bmLUJnb@nVK@bl@@š@bVJUbnX@l„b"],encodeOffsets:[[116551,33385]]}},{type:"Feature",id:"4103",properties:{name:"洛阳市",cp:[112.0605,34.3158],childNum:11},geometry:{type:"Polygon",coordinates:["@@VVUllLXl@LWn@J„@bƒKUVmnÂL@`VblLnbV@„b@JmL@LnV@VV@¯„VJVnXL˜@nm@aÞ@‚a„k@m„IšmVbXL‚ynLšk°@°aVJnUV@UVVXk@WJ@VXLlUnJVnnƒ°U@»°U„wl@šb„WmUXĮ@VLXU@m@U„a@I›mkb™a@ÂnaWW@_@WXUV@@U‚ƒ²@„K@I±U@Â¥kKWLóLÂlƒa@£Um@kWKXU@mlLXUVKUU±J¯_@`UL¯ÂWmk@Wa„kkƒlUnƒVUVaUÂ@KUU@mmK@_ƒa@KX@VaUIm±™k„aVKVUkw™@kaƒƒW@kbkL±UUaƒK@UUKVak£ƒ@UmmL@lƒIkmUƒ@Ualw@UƒJkbmIUmn@WKÂImWk@mUUnÃV@ÂŽÂnÃxƒKmXkxĉVWVk@kaċšÛ@WXƒJUV@zÂÂŽm„VWnbUbVbšLlUnŽ‚lUÃ’nÂWV—VWnk@@Vm@kxm@Un™l@Ll@@V@šXnƒškJV„šV@nlVXx˜U@l„n@aš@VLnWĊ¦nxš@lbVKXLl@ރVLƒ„XJl@XXl`lIXVl@Xl‚XUVšK„wV@lanx„zUbVJ@VVX@b"],encodeOffsets:[[114683,35551]]}},{type:"Feature",id:"4117",properties:{name:"驻马店市",cp:[114.1589,32.9041],childNum:10},geometry:{type:"Polygon",coordinates:["@@n@„b°UƂXnVlnLÃœ@VLÂœm@n˜@na@J„„m@k„@lVšVxXX@„V`lLV„XVV@VVÞLVV°„²@lašbnxV@@b„Lšmlm„_VWnIWUna@lšLšbnV°ƒVL@KšV„LVUVaVLXK@mÆXna@wVm„a‚@Xw@KlL@a„@Va@wUÂkaWÂnIVƒla@Kn@VÂn@VUl@nKVn„J@LnK@aVkVUUWƒ@VakUVanI‚²X‚W@UUU°KnUVLl@XaVK@ašU@KUI@W@_lm@KkLUKV_Uƒ@»@UVJ@XV@@mVL@K@U@Kk@VwUUm@kmWL@VkVkzƒKmb¯VÃI@WUkÇJUIUWk@@klK@_km@UVWUUW@kbmKUXƒaƒV—amLmK@ÂnamaXK°ÂVakU@mU@@aƒa@UW@kkU@U`m@U_mVkaUVWUkVƒL@lmX@ÂŽÂLm@UxVlƒUUl@zÂaWJXbWLUlmIUƒkLmWƒ@@z@VUVUšUmÃ_kVWÂŽ@nUVUlmIklmIkJUkƒl@n@Lm@؃IUbm@UJUUVU@mmI@UU@kÂ¥mUk@WmÂVmI@VU@klmLĪk@mbkKmbÂ@WkƒKUÂŽVnUnnxšW@UVLUbmJ@bk@WbU@V„kx@V@bVbkV@V‚Â@‚—XWbUWm@kb„¼VLn„lJlb"],encodeOffsets:[[115920,33863]]}},{type:"Feature",id:"4116",properties:{name:"周å£å¸‚",cp:[114.873,33.6951],childNum:10},geometry:{type:"Polygon",coordinates:["@@lšnb@xlJ@UnLlKXUlJl_„KnV@xVL@bkbVVUè@šWb@„Ubmš„ŽkšVšmbX„VJnUl@„a°@@b„LVbƒlXx˜InmnLVw‚anJÆw²IlmnXVl°VVbÈaVb„@lkn@VWnLlUVmÞUUklƒkƒVkUaVaVaUw™K@kkaVWmw„_„‚l@nU„VVb@b„aV@VV@zXJl@@kl@šlÂœk°WVnÆbnbUšVJ„Iš@VKVm@k™K@_kK@a@aU@@wW@@k@aUW@IUWVUnLlUlVXKVwmk@W@—VWa„¥@k@ÂlÂnƒUIÇKUaU@ƒUUVmIUV™Uk¥ƒVma@¯k@Wanwmƒ„@@Ân@@Âm@UIVƒkUVamUXWƒaV™U_™@ƒmUVUImW@aUIĉK@VmI™b@lU@@n™JƒkU™@KƒIUmmLk@UVm@UÂŽm@@LkbU„mJXÂlbV‚@xUbƒ@@bkK@LWxÂ@ƒbUn@xmbÃ…W@nWLUKUbUVƒK™U@LUK¯„mU@šVV@xULUÂŽVL@bU`WšUz¯aUamKUaƒ@@xkX@x"],encodeOffsets:[[116832,34527]]}},{type:"Feature",id:"4114",properties:{name:"商丘市",cp:[115.741,34.2828],childNum:8},geometry:{type:"Polygon",coordinates:["@@XVl@lLȃ„@VkV@V»UanƒWÂX@VaÆÇô@ÈaVX@xVJXUÞU‚aVLĸbXKl„V@šm°Vn_ny˜XX»mUkÂ¥lK@a„_@yšInaVKVa°_@WXI@ƒ@K‚VnIlbnaV@„l„@‚a@_Âw@ƒlwUKm™Xa@UV@š»Vƒšw@kUKVUUm@w±VUXUKUwmJUUƒ@Âkm@@±mXkmUI™@mm™KUwkbWakLWaUIkJmŽƒX@lÂ@@VUX@JWbX@VbULWbƒlUVULknlV@bVJk„mb¯KknWmk@@nmVkx™@ƒVmU¯KUnUL™@ƒJUIV™maÃ…aUm¯X›l™kk@@lk@WI@yUUU@ƒb@aUaƒUmVk@ƒÂƒ`nxUXlb@lšLVxUbUbVbUll„k„VlÃVUnkVmKUXm@klƒ@ƒnUx@xnxƒn@`VX@V²x@V@b@„Wl@zU`VÂUVVb„L@Vƒb™W@bkXllkLWV@V„@VVÈwlVÂœ@@X˜K²Llb„WnnÆL@VnJWn"],encodeOffsets:[[118024,35680]]}},{type:"Feature",id:"4112",properties:{name:"三门峡市",cp:[110.8301,34.3158],childNum:6},geometry:{type:"Polygon",coordinates:["@@WKUmUI°ƒU@@UmU@KnK@IƒaU@makKUa@_‚KnmVU„L@a‚ƒ@IXm@KWkkKVkUU@aUW@UUIVaƒymwkbU@ƒx™LVUÂWWkk@WUkJk_WWk@WI„ƒUKÄk@WKULka™@mwĉ¥mXUK™@@bƒm@k—VWwkU@m™UUƒlI„™Wm@™@Uk@@KškVmn@lwn@@Ul@Xm˜UXUmÂVÑÂkmÂkV™KUaVamaUXnƒ‚Â@ykLUKƒÂ@™WwÂKmKnÂUm@UmƒƒaU@mUk@kL@lƒxÄ‹xUnkVmnXxWb@`kzWJ@V—LmVUn™lmUÂL@lW@Ub@VšXUbš`VLUbUJ@nmnUlUUm@@bUJlnU„š‚U@lxkbƒ@@XƒJUnƒ@kb¯VVVmlXXlJlzn@VlkVWÂ@bkK™bmškÂŽUbVb„lƒXVxšKÈnšwÞlÄŠKlšVnKlwX@lL@xlUnVn„@šl@lmX@ƄÈb°¼ÈwVJlx„_°xšašlšUÈxlUnbVxnL@lllšbm„n@nb‚@@V„L@V„@@„VLšJnIVVlKnV„_"],encodeOffsets:[[114661,35911]]}},{type:"Feature",id:"4107",properties:{name:"新乡市",cp:[114.2029,35.3595],childNum:9},geometry:{type:"Polygon",coordinates:["@@XVlL„K°bUblbUbšl@nX@W„XVVKVkš@@ÂŽmb@„Ubn„W`kL„LƒV@VVLnKlVXIlVš@@a„@l£nWlƒkÂVa„@°bnUlLVlna‚bnUVUXKlU@ƒ@Âlk@a„I°y„@ôkUU@wšmôšnkWakml™UkVmkUlmUUm@nkUKWanamU„LXW@U‚VnUln„`l„œblL°KXV@ÂÄ J@L°„šJšUVw„anK@UUImmƒÂkK@¯±UÂm@IVmUmmÃ…nÂWaUK¯aUk„w@W±kÂVƒx™U™VƒwƒnÃ…JUIWaÃJóI—bm`ÃbÃ…ImJUI¯¥¯@mU¯UƒJmnUVóUkl±V@zXl„bWVXL@bm„mºÂ@@XmJUXU°llk„@nWJk@U„@¦U`m¯ŽWx"],encodeOffsets:[[116100,36349]]}},{type:"Feature",id:"4104",properties:{name:"平顶山市",cp:[112.9724,33.739],childNum:8},geometry:{type:"Polygon",coordinates:["@@l¤UbVL@V„LVb²VlKlaX@„„lbš@lxUVULƒbšln²VJUbW@@L„b@`nL@nVV@LVÂŽUbUVm„kVl„ƒlXbl@Xn°ŽVK@_°`²IVVV@VUVJnInaWK@Uš@„K„LÆ@nmlXXWVUUw@klKVa@knyVkVanI‚JXUl@XbVUl@@aša@mXk‚bnK@UlK@UUUVaXaWmkUmÂ¥n—WmXaWaÂœkl@VmÞb„KVL@aVI@mUwVm„Â@KÃ…ÂméUL™KVaUk@kUK@U˜WXI@VlKXU‚@VVnInVV@VLlK@UUƒkKU_@ƒWWUwU™@klƒn@ƒƒ@Imb—@@m›nUKÛ@mKUkWVXxmbVLXÂŽVVU²VV@xÃ…nmWmLU@kbmJ@b¯š™IUb™JƒUUxVl@z@bU`W@Ub¯nUJUbƒ@WLUKULkU@aWKƒ@ÂaƒbmLÂ@ƒlmUk@@bUL™ƒWJUI™°Â@ƒŽ¯aWLk@mbUb¯b"],encodeOffsets:[[114942,34527]]}},{type:"Feature",id:"4101",properties:{name:"郑州市",cp:[113.4668,34.6234],childNum:8},geometry:{type:"Polygon",coordinates:["@@@nWVUKÃ…@W„nVnI‚ŽV@ÂœkƂšwV@šnn@lxÞlnÂôJ˜zXJl@nalUÄŒVlƒl@²UlkôVVUnm„I°VnV°@°¦VJnIÆJÞan_VmUÂ@ama™@kU˜¥kaUklw@ÂUIVÂ¥kVUI@ƒmmUÃ…mUÂlƒwVU@amU—JWbUakVƒ—Vé¯Im`ƒk—@ƒwVWmLkU¯ŽƒXkWmLmxÂ@UUƒbm@@x™J@LÂbW@UUVWUkVKƒ@ka™IUamKUkkmmLƒUkJUVWXkWmnÃ…@ƒKƒL™@@VXLmbmJUIUVU@ULWVkK@nWVXL@lVn@¤„b‚kôKXKlL@¦²V@JƒL±@„@VU@WV@X@`XXmb@ŽšblaÂœn@Jƒb@V"],encodeOffsets:[[115617,35584]]}},{type:"Feature",id:"4105",properties:{name:"安阳市",cp:[114.5325,36.0022],childNum:6},geometry:{type:"Polygon",coordinates:["@@°kVaVÂ¥kÂVmUkWkÂWVkVKUwkkmKUU@a„wWWXÂWakKWkXmlašIVmX¥ƒU@a„@WÂnK@kƒƒ™V™I¯ƒ@KÄŸI@ÂWU¯LkK›akƒƒ_kmmVÂU@VWXƒKnVmbXbVLmln@VVknlVUnVlkšlnXbmlmlXblnÈlWbn@@nšK@V„L„bVV°VVzšlnš@V™xƒI™b™ŽU@WLUa¯V™UkWõ@¯kkÂmxk¼l‚„XUlVbVLnlULmU@lƒLkVUlƒX@xW@¯mUƒ@UmIUW™L@aXa˜kU™¯anƒWk°@k™kKmmUIWaÂambUkkKmV¯aƒ@UblÂŽk„mXk¤ƒ@@b™@UbULWVnb@lUVVnmšnVVU„J@bWXX@WJkL@blVU°UV@XlWnXUbW@UVkVšVWbnLUJWLUK@Lnn@blVU‚„nUblxVUVJXU„a˜@Ub„LnUVV@mVIVVn@UbV@‚ÂXbmbUV„_lVXUWanJVI@WkI@WVIVU°WXXl@la@mX@lLXl‚kVbÂœm‚X„ylIXJV@@kšKla²UVa„IVyÞb°LlVna@UÆKnLVbšK@anwU™"],encodeOffsets:[[117676,36917]]}},{type:"Feature",id:"4102",properties:{name:"å¼€å°å¸‚",cp:[114.5764,34.6124],childNum:6},geometry:{type:"Polygon",coordinates:["@@lUVbXa˜InV@bUV„x‚knVVÆnn@„VJlUU¦VJ@ÂkxVllb—¦lVš@nb@bVÂŽUn˜aôJÞIXbVJÆI„m„xšUšV„w‚U²l@XƒxVl°bVLXb‚`XklUnmVblLÂœ@lmšx°LVK@UXIVašWlL@Ukƒ°KkÂVaVUXmmI@UÃ…KmmƒXka±K—L@W›@kUÇxUUƒ@@UXUlKkklW@ašX„a@UƒKUaVUUÂV_@yXk@ƒ@a@U±w@UUW@_„mmw@wVw„mUaÇbUa¯UUkmWkn±JÃ…xmIÂbUxmKmn—JWw„kUaƒK@a¯@ƒbk@mVUIWƒ—Lmwm@UaÂ@WJUb@LUl™@UUmLUbWJ@VÂL@VmXÂWWzUJUꄘ"],encodeOffsets:[[116641,35280]]}},{type:"Feature",id:"4108",properties:{name:"焦作市",cp:[112.8406,35.1508],childNum:8},geometry:{type:"Polygon",coordinates:["@@V@VL@x@bXÂŽWV@XkššlUÂŽWX@J„@nI@KlL„KšUVaV@ÂœJlL@KUk@KÞL‚l²_‚@nWlL„UVVš@nLWVUJVn@anV@a„wÞUVLVx„b„@lW„@lbXn‚Vn@@¼šL°mšKVn@bnl@nVK@blb„L„W„U@VWLXV@nlKn@lVVbXw°ÂnÂV_@Â¥Vƒl@XI@mlƒkkV¯VWnI@W‚@n¹nƒ@aWKXUƒaWk@yk@k„ċUkVmbk@WI—yóImÂÃkkwm@™mU@™xślU@ÂÂmJƒX™ak@ƒx¯V@¼¯Vm„UmmIkVWK@UXIl@UWVUU@mVUI¯b¯@™lmKÂzWKUa™nƒJ@nƒlÂbÃ@@b"],encodeOffsets:[[114728,35888]]}},{type:"Feature",id:"4110",properties:{name:"许昌市",cp:[113.6975,34.0466],childNum:6},geometry:{type:"Polygon",coordinates:["@@lI„VnKlnVlnLVbšJlb„@ULVlUXVVX@‚a@KšI@wn@„aVV‚@nwnKlX„W°ÂlVnKUX„x˜@„ln_°JVIXy‚XnW@U‚K@UXIVanKVVš@Vk@KVaXI‚@Vbn@nx˜KnaU™l™ƒÂn™Va@ƒXa@™VçUUla@aUK@wmUƒLk`kIWVkLmK@V@XUlƒn@JXV@nm„™bU‚óIƒmUa±@@ÑóVUUk@UÂlKVU@akWVUUÂlUUaUK@UUKWbUkÃ…J@XWaƒ@XbmJ@nUJ@bUKƒLÃaUnk@›lXbWbXnm˜n¦lVXnWbUbVV@VkL@VmLÂaWl@n™b@bk@UVWak@WVÂImJUbUlmz@lUbkL@lVx"],encodeOffsets:[[115797,35089]]}},{type:"Feature",id:"4109",properties:{name:"濮阳市",cp:[115.1917,35.799],childNum:6},geometry:{type:"Polygon",coordinates:["@@lLXbW‚XXƒx@bVVnLllVxULUl‚XXlVlUnlÂŽU¦Ub¯l˜nÂœK@V‚bVb@šXbVL„KVxVVnIlašb„a„¥lU@wnalLnVVlVLXnlWVXn@@lVI@WnU@māW¥—aW_k@WwXy@kmƒ@wU„mš„š¦šlUxVLV@UwšJ°xš@VX„@Vb„@š`VX@VX@llšIVbnJlI„bšV„l„˜J@ƒmѯLóa@ƒƒKUa„k™ƒ™Xƒ@UK@wU@ƒlWUUïImW¯aƒLUKU@ƒkƒ»Âk@mƒwƒa@UnKWI@ƒUU@akVWK—k@a±ƒÂbóUWKXUmk™KUÂmLƒbUx„„@lmLXŽƒ@@b„VW¦Un™JkbWnXl"],encodeOffsets:[[117642,36501]]}},{type:"Feature",id:"4111",properties:{name:"漯河市",cp:[113.8733,33.6951],childNum:3},geometry:{type:"Polygon",coordinates:["@@@Lƒ‚UnVxnIWa„@Xb@WÆIVlXaVL@VVLVbkVVÂŽUVlX@bUVkLV‚l@VVôU@Ò²@Vb„nôJVšanƒ@mWU@I„mVk@WkI@wmak™@wlW@w„@VbnLVb°bVyX™V_@aUKVÂVK@wUU@™™a™K@kmbXVmJUXƒ`kn™nƒK@aU@mw™akb±@¯ƒUUÃKUUU@WU@VkLUKU@mUmJUUÂ@WVkL@UWJ—X@VVL@lVlUbšLVKnêƎ"],encodeOffsets:[[116348,34431]]}},{type:"Feature",id:"4106",properties:{name:"鹤å£å¸‚",cp:[114.3787,35.744],childNum:3},geometry:{type:"Polygon",coordinates:["@@ó™™n@xVVólƒ@¯zƒJ@bkl@Â@„kVWLUVmVXbVJnnlLlš¯@Xlm„°bVš—lWb@bšKVXnJ@VV„°nX@@w„WVklU„K@knVVKmkUKUaVkƒWkÂl»nwlŽ°lö@lXšV°UVbXKV@šÂša„Jšw@Um™™kUy¯UUUƒaƒK@U™L@mm@XaÇkkmWank"],encodeOffsets:[[117158,36338]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/hu_bei_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"4228",properties:{name:"æ©æ–½åœŸå®¶æ—è‹—æ—自治州",cp:[109.5007,30.2563],childNum:8},geometry:{type:"Polygon",coordinates:["@@VK‚bX@lbUVnL°„@VlVnUl@VUX@„aVƒmaXƒlašUUU@wmaVUn@Vƒnmmk@m™U@kna™aUÂ¥Vam™X_@WƒU™ÂmW@_kƒVaVKnL‚lÂœ@VÂVal@kÂ¥@kUW@kUKVUlUVÑÂW@kÇaU»VaÂÂlmkUVUVak™@aƒV¯_@W‚UkmVUlU@aœƒƒalI@akkVWUaWÂXUWwÂœWVbÆ@„„l„alIVK@U™m@ÂUU„W@al²a‚¯UağÇm@ƒbkk@wƒ@@W™aULmxƒIU‚™Âƒb¯@U`UX™JmL¯aƒKÂX›WUL@aknmK™@ÂaWUXaWm@I@UÃ…mVU@™™aUV@b™VƒI@WkU›bXkm@VakwUKULWKXÂmJ@XUK@ƒmL@KUwVaUI@KU@mmn™mXka@»V@@UUaƒw¯yVk@ƒUUVmmkÛÈU@mWUnmx„šmlUbV¦UlÂbWVUL@UUĪIUmÇKV„VbUVVxkn™LUxV`VX@š„„kJVVUXWaUVVlUnmKUbkI@WULmK@L@LVlƒLnmUIWV@aknƒ`VXUJÂIVlUVVbUX@¤mbnLm‚m@UXk@mm@UkaĴ@kV@@KkU@aUKWbkLWVkIVÂŽk@UbVlmX@bU@@mmL@bn`@Ln@llVLVk„@XVVU@`VXUš‚¼k`VÂULka@VllVIn¤VÂU@@bl܃bkx@bkL›škKƒn@bn@@b@JUnV`UnVbVKlVXUlbn@°ƒVx„@@b„nVbUllVn@V—VK@UnW@UVUšlnk‚VÈޚxVb„VVI„xVaÆ@@aka@UVaU@@a„k@Wl@nbVIƎ@Jk@„L@VlXnlla@ÂVJnw@UmwXU@aVK°ÒnÂllnLlb„xnKVaV@l¦²nVl@llL„x@XVVœ‚Ķš@našx@U@al™XUVa‚LÈþV°XxWXkK@šmLnlUb@b‚xnLVlVVkb@ÂUJ@xWXXš"],encodeOffsets:[[112816,32052]]}},{type:"Feature",id:"4203",properties:{name:"å堰市",cp:[110.5115,32.3877],childNum:9},geometry:{type:"MultiPolygon",coordinates:[["@@@a@w@kV@nbVK@ƒnUla„@la„Ål@nlVakwWX@WkLšaVmšwVÂ@anK@UlIXmWkk@@mmLkWlwk@U_mKXwWK@U¯K@UU@ƒVUa™kmƒkI™yUUVUmanU@mlwkƒ@_mWXaƒUWUÂ@ǃ@U@aUaVwUKUIƒVkK@UWIXƒmaV@k@Vm@UnwlƒUamk@V@„ULUamxUJkU@Iƒ`WkkK¯XWak@@W@IUV™LWJkXkaÇVUKƒ@kUmbmUUƒUKƒbkKWUkI@ƒkKÃ@@aƒUm»nI@mƒU@UnWV_@aUmWbkLUl¯b@a›kkÂk@WkkJm_k@UV±@ÂJ@b›nU@@WÃIUJVbXL@nlJkx@„Wn@VkJmb—LmUƒ`VbUL@xVn„@XVƒŽ@„mVVnnJVbU„ƒx@„V„nVUbVVƒx@šn„™bUK@bƒ„@bƒJ„šm²„VU‚lbXzVJV„„JVbn@@Xmb@V@bVJÈ@‚Vnkn@°aVVV@šX„KnalLVmšUnnVKVlnLWlXX„Klk°š™šXÂŽWškLUVVV@nU@ml¯nmbk@W`Ã…@mb—LWm¯UƒxnêVèk@mbƒVƒnUK™@kKmXk@@JUI›lÛLllnbVnlJ@LULnlÆaVLnÂŽV@nkVJ„@lkô@²bÆm°w„L„WV@VXšKšVXI@W°ÂÆVšK„b°U„JVIVV„¦XKVL@l‚InaVÃnUl@@bX@‚™nmVL@lVL„lVLVUnbVW@xXn˜bÂœU°¤V@š™„a@kWKUUn@VlnL@UV@Ü»@mX@V_ƒakaÞ@VK‚¯@kkW"],["@@mUkUUm@nllVKXXVK"]],encodeOffsets:[[[113918,33739]],[[113817,32811]]]}},{type:"Feature",id:"4205",properties:{name:"宜昌市",cp:[111.1707,30.7617],childNum:9},geometry:{type:"Polygon",coordinates:["@@°`„U@blšUbUVlVkn‚ŽUbV¼Èb@l‚XUÃ’kVUVVL@lVX@ll¦k@UbU‚›@ÂkmKULUbl„@`nXšŽ„V@XW`nšUbV¦šbmb@lšV@nnlmnU„m@UVnb@xVV™VkbW„nb‚VnÂVa@an@UaVU‚JXnWlXX@l„¦@ÂŽlKÆX„bX‚V@VV„@°¯°xXx‚XV@nV°UVWU_VWXkmaVÂnWVkn@lln@lb@UVLXWlnX@˜aXUmaVK@UXU„U@WVI‚W„XXV‚U@Â¥VKÂœ@‚Uގ„„‚a²LlV@kV@UanKma@UVUnK@UVLXyVL‚knJ@UV@@UXKWUXaV@Vb@mVLnKW„m@aUUm@@UkK@Ula„LXKWaXI@alKlmUk@wVKXL@m@ÂWWnÂ@UVa@K@wna@aW_XWWkXbVW@k@U¯WWwka@UUaVIVƒkU@m±@U@@wVKkaš_@VV@XUVwU¥‚šyUkm@ÂV±ÈUKkȂL„m˜mLk@ó£kmWwƒm@U„IkÂWKXwWU@ƒkLƒwkbmaƒbkK@VƒLkmWIUKkUUĂIÇ«J™XÃ…JULVŽÇLUVƒ@UK™@kI@WVI@ÂUaƒWmXVVULÂ`±kÃ…LmKkƒƒkƒÂÃ…@Ua›XXxWVXÂŽVbUXll@bkJ„b›„@bkVUVlnÂV@X"],encodeOffsets:[[112906,30961]]}},{type:"Feature",id:"4206",properties:{name:"襄樊市",cp:[111.9397,31.9263],childNum:7},geometry:{type:"Polygon",coordinates:["@@@Xl@Xb°WlLXl„_@JlVVInwVbVK@ƒ@UnlVbk„mx@VUnl@U@nbW„XJ@VlL„UVJVLUxVb@b@VȄ‚@XV„VWbnX@`l„kx@nmVnbUVVVšzlJn„šlVb„UV@@V°L@VXLWxnLV`l@kxlXnK@nl@XlWn„`Xnl@@UVa@VÈKš£VLVanW°U@UVU„@„`VIn‚mV@„nV@Xa@aVW@UšalkXKšblI„yÆÂXnlJXbl@@VV@nklU@`„nVK„LVKVb@V„U@UÈK„UVKšIlUX@V`lIVbn@nblVVmV@@XXJšUVV@knKVn@`@X‚VnK„wlLVmUUU@ƒU@aXL@WlU@UUW@UmU@KkLWaXkWmXUWm@U@ƒnk@UmK@U@UÂaUÂVUUKV_@al@namWUI@KUƒK@aVÂ@WUIƒbĴULUJkIm™ƒK@U@K™V@U@a@UkU@K@wVaUwlU@mUƒULmKUkV@@anIWmUK@I¯„mKkl@LUb±lUakLmkÂ@WwUKÃVUIm`¯n@Uk@makJU_@ƒƒJma¯ImwUVkKƒb™aUÃ…@wWaU@VU@mXIVmmUkJkwm@mIÂlUKWzUK@VmLUV@VnbmLVbU@@lkU±KÂbƒƒÃÂÂV›@UL@¦ÂVWUƒWÂXUJ@XƒVWV@VULnbWV—bW@kmWXUK@Vkam@kkm@UlmXUÂŽnbWlUXV`UX¯VmUU@Ul@Lll@nnJ@LƒnÂWmbmš@b™`ƒš","@@kUUm@nllVKXXVKmU"],encodeOffsets:[[113423,32597],[113794,32800]]}},{type:"Feature",id:"4211",properties:{name:"黄冈市",cp:[115.2686,30.6628],childNum:10},geometry:{type:"Polygon",coordinates:["@@VVUnWVXnVJ@„‚U@V@VXÂŽV@@IVJUÂnÂŽ@V@L@KlIVlVanLVbnVlI„ƒn@@a@Kl@@I„JlI@aXU@KlK„kVblJXU„VlU@V„bVkVKXn@VlxVa²I@VlVUxln@bšJXklaVWnLmÃ…@y@k@ašI@W@aXIlVVaV@nnlKnLVW@IUa@a@K„UVVlI@wXKVV@IUƒla„@lUXwWƒnƒnalLlxXLll°@XwVKVaXIl™nb˜@nln@Va@U@k°ƒUmÆUVaXI„JV¯ÇUÂmmkU@WaÂKmakÂVm@U@aVKkkmKkVmIkÇ°£@aUUVaVVnKlkX‚mkƒ@ƒlUVaX@@Um@‚™UmlUXV„UVU@w‚K²¥Ua@I@UV™l@U™V±UIUÇ°»VkUmVI@a@U™m™Âĉ™¯V±bŹĖğaÇL¯lmÂŽkX@‚óĀ@ÂŽmšÃêÂb±WkLƒn@xXx@ÂŽ@b@V@LW@UbƒlÅ£Xƒ`kxWnXô¯¦ÆV@L@JVLƒxkK@V@bkz°l‚lXz@J„UlVla@XUV„bVKXnW`XXV@laVV@V„X@V¯xƒx@xULVbUJ@n@LU@VmmakbUK@b™IWWUUVkUmkLm@VJkb@nUJƒÂ@`V@kX™aUaVmmLkUmJ@Uk@U„±lkzmJUb@b„VUxVXU¤ƒL@JƒX@VlL@JkLUVU@mnUl„¦@V"],encodeOffsets:[[117181,32063]]}},{type:"Feature",id:"4210",properties:{name:"è†å·žå¸‚",cp:[113.291,30.0092],childNum:7},geometry:{type:"Polygon",coordinates:["@@ÈJV„lVVLXJln„K@UlL„anbla„xlK@„XVWxXLlƒJ@V„nXxlnô¤l@nKn—‚ƒÈKl¼VL²Ç‚Un@Vl™zÂÂŽV¦UxWVU@@U™`lbUL@xV@²@@nlVU„UJVb@VlbXx°XVWX_VKUwVKVa@UVKUUVk@KnblaUU@wnWl@UX@lÆ@@a„IVmUk„™šxVJ„U„bܙ@Uk@WWnk@ÂVƒ„™Vm@I@m@Un@m™XUlVlUnJ@knJVU°@@aÆLX@ƒllL@¦nJV@XblLVa²U@UlWš@VX@`@LV@@bXJlIXml_lJÂœU°b„KÆLnVVl‚@ö—Vƒ‚mXaVIÄ¢llUlVnLVlX@@b‚ašnnxšV„L‚bn@°ÂÆÂXmmkĉƒ¯w±™Â™™UÄ‹@ÂKÃÅƧŃÃ癙Uw¯ƒm™¯k@W‚kV@¯UIUJW¼kb™Uƒwk@W`@¦Uônb@VƚlÈ@VU@ƒƒ£UWWnUÆUnmJkUÇ£VWUI@aUU@WkI@Uƒa@JW@k£kaWVUKmnkKƒb™kkVWb—VmUUÂmwU@kk›@UakUUa@V@nlx@lUb±lUbnnWLUyk@UamÂœUK™@mlk@Wb@VXL@x@xWI@a¯Ž¯V@bVn@LkKmL@`ÂXmKmVU@@bkL@V±bk@Uaƒa™L™KUVƒIƒ„™W™XÂamVVbUK@b@Lm@UWkxULWVUnm@UlUX"],encodeOffsets:[[113918,30764]]}},{type:"Feature",id:"4208",properties:{name:"è†é—¨å¸‚",cp:[112.6758,30.9979],childNum:4},geometry:{type:"Polygon",coordinates:["@@n@lxlInVUnWJ@nUVV@Xb@xVƚb„alLVUnx°Jnb„I@„V`lInbl@@V°mn_VJÞUVLXx‚@nllKVb²kVa@KlknL°ƒ@JVLXnmJ@bU@VlnLVKV„@nX@lUšKVaXal@VKnÂ@¥°L@Unw˜bnašV@KV@VUX@lVXI@KW@@IXWV@laVL„„KlaXUVVnkVWV@lwXblIXWVkVmšaU£VaUmVIkU@y@ÂWakKUamU@UUK@kmK@wÂ@@ÂmK@LƒV¯™U@WwkmULƒamVÂVUU@ƒƒIƒbUKUa™kmƒm@UakLmxU@UÃ’WlULţÿmwkIUm@a‚kÈblW@UÂVƒUUk@JW@XkWWUkUKUIlw@aUWknWUUmnIWĪaUwVaۚƒaƒVUI™wƒšVlUnƒJ@bÃ…@@kVWk@mX@xVVkbma@LUlVVUL@VUbULVxULW`UX@V@lUXWaXlWXX`@bmb@x@LUb@VmÂŽXX@‚@nWKUL@xVlknkL@bWJXbWLƒKkb@VlL@Vn@VV@bƒnX‚mLUK@nUaU@WbXVWL@VU@@V"],encodeOffsets:[[114548,31984]]}},{type:"Feature",id:"4212",properties:{name:"å’¸å®å¸‚",cp:[114.2578,29.6631],childNum:6},geometry:{type:"Polygon",coordinates:["@@ÞƂLÄŒ@šV‚š²š°xĊ„nlWnŎ¯Âm@ÂaƒK@„„°‚n„Jšwn™VIUaÆJšÅ@wšwV™XW@aV_l@²V°lÄŠwlaXLšwlUkalVVaX@lVXI@a˜UXJ@U°UUÂ¥VIVKVÂkÂlanLVa@VÈIVÂV@nk@aVa@mV_@a„K@klKUa@UnKWkÂ@@lU@@UW@@nUWUwmaVIXƒ„lV@mLXblJ@kV@kk@KU@WƒkUWVÃ…wkLmW@UmL@lUL™KULƒak@maUUÃwUJƒIÂb›KUUƒ@š™aWK@kUWVkUwVwÂ@™mÃ@™I@wkW@a›wÂw@LU¥™kƒJ@nVJƒIkVVnkV›UkyUIUl@xWUkaW@@°kz„ŽWxkLUWmzk@@bVVVš„b@‚@XlVÂœ@Vl@bVbUn™`Wn—@Wb„VVI@`„LVbXLV`mnU@@lƒL@LUŽƒak@ƒLk@WbUJn¦@lVb@xVb@n"],encodeOffsets:[[116303,30567]]}},{type:"Feature",id:"4213",properties:{name:"éšå·žå¸‚",cp:[113.4338,31.8768],childNum:2},geometry:{type:"Polygon",coordinates:["@@„@nš`lw„k„ƒ„UmUVWX@lk„@VanUĠ¼V@@mX@@nVV‚VXLmJVLnK@b„ÂV@@J„@VUn@VaVUUUVWVLV@@Kk_@almÂaVkUU@WVƒVUVLXmmk@wUaUKUV@°™@kmaUaÈmW„mUƒVklaX@lVnxl@@UnaUk@ƒVUVwVK„nš@VVn@VbVJUknUmmVmk_Vw„KUUm™VakÂ¥@UVKVIkW@UmIVWkIVƒkmmLkwmVUƒ@LƒUU@VVXL@JmLUbmK@UUKmÂkKUUmVUaUnÇlk¯™mJUnmLUaUJUaWL@UkJ™ÂƒUƒ@ƒaklkU@¯@KWLUmUUWVkbƒLƒŽUKkbU@WX@JX@@LWJkUW@UVU@@L™Umb—amx@V¯K@¦mÂŽULk@WbUb™LkVW@kVVxUb@x@LlV@V@b@VšU@L@V„LnšlJVIVK„¦„aVJ@XUÂŽ@b„LV‚@LVJnXmbk@@bU`VLUVV‚b@V@VnL@Vml@„@VXnWVXnWlXblK@LnV@VVX@VkV@XWK@b„VV@VV"],encodeOffsets:[[115830,33154]]}},{type:"Feature",id:"4209",properties:{name:"å­æ„Ÿå¸‚",cp:[113.9502,31.1188],childNum:7},geometry:{type:"Polygon",coordinates:["@@VnXK@L@°lVlk„b„@„VšÂlI@VXKVbVIVbnKVmnI°šlŽÈkVmVbnUVVlLnÂVL@VnLVanK@IWKUUV@„V@KV„nUlxnKlnU„lJUXnJ@VlXUJUL@Vl¦UbnšVVƒLUxl`UnnnmVVlnÂVK„bšmVX@a°Ã°LšaXJV@VUnKVXVK@LnKlLUbVVX@VwVJVn„@@UUÂ¥V@@UUK@ƒmaUÂVÂUkkJ@L@K@UmÂVÂUI@JU@WÂ@U@UÂV@ƒUIWmXUVmUUÇ@UVmIÂlmnmakK@akaW@UwVUkKVÂnUlKVwk™ƒVÂU_WKUkVW@UXaWkUa@w@ÂVU@ÂXaW±@IkbƒKƒb¯L@WƒXkWƒ@UakL@UV@UmVUmL@UXWVL@ašUƒÂVUUUVU@yUUƒIUa@wUKWVU@kƒ™™Wk¯UkwVKƒLUx™K@nVxUlUUWVÂUmw@wƒUUyÂXWlX¦WbUV@„U‚@blbUVVbXXƒl@lVL@bk@lxkVVnVx™¦ƒ`UnkL@V@L@Ž‚@@xnL@lVL@VnVVblLXb@‚@zlVUJVnUbV¤™bUnUlWXkJWakxU@UXml"],encodeOffsets:[[116033,32091]]}},{type:"Feature",id:"4201",properties:{name:"武汉市",cp:[114.3896,30.6628],childNum:1},geometry:{type:"Polygon",coordinates:["@@nbnm‚knJVUÈ@@UĴVknmV@VUlK@IkK@U„W@I„KV£UWVwƒU@aVanIly²kVƒl@@VnIlVnKUnVbšblWU@@_„‚VI@mlaUIn@lKVnUlVVXXšJ@aVLlanbUnV@@K@mVIUaVK@w„w°w@UƒW@UUUkbU@WWX_WmULƒaVU@WkbkUƒV@IWyÂk¯kly@a@UlL„wUK@I@KÃ…UW@ѱUÂm@wlÂ¥kaƒ@@_Vw@ķƒa@akw@ƒkKW£XÂVUVwVwUaU@VUU™™xWKkbĉx¯k±Uk@U`@bWXUš™x@x™ÆÅIVbUJmš™xƒIÂmƒ¯@ĪUmx™nUVVbnJV„@Lƒ@@ÂŽkV@bVnƒ@UVULlx°VXlššl„V@XUVL@xVb„JVV@zUVVVUV„™V@bUKWX@VnKUVVnU@@VlKVb„@lX„W@X°K„a„Lla@JX²Wb@ÂŽUV@Â@xVbXlWb@VUXVlXLV`Uš„lÂŽUxkLmVUÂŽlLUVVxX@lb@blL"],encodeOffsets:[[117e3,32097]]}},{type:"Feature",id:"4202",properties:{name:"黄石市",cp:[115.0159,29.9213],childNum:3},geometry:{type:"Polygon",coordinates:["@@VšUVV@VbUx„aWUÂœblUVmnKlX@bXJVIlVUxVVVIU‚Âzlx¯š@‚VbnL@x‚x@UVaXK„b˜@Xk‚WU_Vm²klW„XVK„Žl@nXV@@w„mlK²X‚aÞén™@Âôÿ@ÂlWn°kUKmmUљÂUmm@ƒwkImWU@UakL@bVLUVÄ‹@™bUK@alIXKWK@™nXnKmkUÂVwƒ@¯b@L„lUL±W™n@KULUaW@kL@lƒL@bU`@nUb@bmlU@UÂÇJ@UUbmKkblÂŽUÂULUJV¦¯V@VWI—V@bWJkUW@UbkUlbkV"],encodeOffsets:[[117282,30685]]}},{type:"Feature",id:"429021",properties:{name:"神农架林区",cp:[110.4565,31.5802],childNum:1},geometry:{type:"Polygon",coordinates:["@@n`lIXll@lÂÂœl@b°aVklKXaVn@bU`mX@V„V@nmJn¼„V@bÞ@lL@„lJXVlL„aVLV„nVnalV„@VLÈUlblWXIšKVU@J„™š_‚Â@an™na‚X„m@KmI@mkk@KVkÂWWw¯w¯°ƒ@UUU@WƒaÃ…WkL@ÂĴ@kWWXkWmÂIUVVbm@@bUbmÂÂUU„ƒbW@UVk@mVkU@U¯ƒmKVUkaW@ÂaULĮVbƒb@VÃ…@Un@VƒLWl¯Lš„"],encodeOffsets:[[112624,32266]]}},{type:"Feature",id:"429006",properties:{name:"天门市",cp:[113.0273,30.6409],childNum:1},geometry:{type:"Polygon",coordinates:["@@@K@UlKVm„_š¥UwUmlUkwl@@aUK@k„kWWUaVUka@aVÂ@ƒVUXaWÂ¥Xk@WWIklm@Ã…xmI™VÃUkxkaƒ„@bWJÂaUL@„W@™l¯UULU‚ƒbƒkV™Ua¯bm¤UnÇUkmUšUx˜b@VkXÇaÂl@bVnlJnxŤĀVKXkVÑV@nwlKVbn@n„šlVbVL„a„J@„VV‚UnU„bVKlnXxV@°š„U@KnL"],encodeOffsets:[[116056,31636]]}},{type:"Feature",id:"429004",properties:{name:"仙桃市",cp:[113.3789,30.3003],childNum:1},geometry:{type:"Polygon",coordinates:["@@VK°VškX@@ƒVK‚bXI@a„ƒlblwÞVšUnJÆwn@lkXJ@X‚WVz„V@xnx‚VXUVVVkUw@mšLVw„KVU„@Um@alU@„@@KUƒmIUaVUšmnwmw™mÂb@aW@UkmKkUkVÄ¡kUJWbÂnU„õ˜Â@UkmUÃ…KƒL¯a›VkIk`WnkJƒÂ@xVLUVVbUbk@WlXbm„VxnxUblbUV™@@VUV@nVL"],encodeOffsets:[[115662,31259]]}},{type:"Feature",id:"429005",properties:{name:"潜江市",cp:[112.7637,30.3607],childNum:1},geometry:{type:"Polygon",coordinates:["@@UbVxšbX„mJVnXVlmVX@bkxVJVLVlXXWlX@@IVl„V‚U—aVwV™lnÈVVmn£°aVbUš„l„aVÂUK@mVU@Uš@VUkaVamwUwnƒWaXkl@VaUaVUUK@w„ÂWI@aU@@K@_UW™@kX@V±VUbkKWaU@mI@Â¥kK„kW@Ã…K@b¯@UVmI@lmIkVkUWVnšm@@V@n@JUnƒšU„@ÂŽmlXXl@@V"],encodeOffsets:[[115234,31118]]}},{type:"Feature",id:"4207",properties:{name:"鄂州市",cp:[114.7302,30.4102],childNum:1},geometry:{type:"Polygon",coordinates:["@@°¥WóXmlw„_ŤW„kVaX@@K@U@a@ÂWwU@mWk@ƒÂULƒWkX±lUnV`ÂXWl—@ƒaWLUb@VÂw@wmKUa@°™kw‚yVÂUJUUVwkUUJWI@akWmLUnkV›aXVƒbUxUVWÂX¤lL@„lx@b„b@ĸUx@`„@lbk¦@x‚n²VƄX@"],encodeOffsets:[[117541,31349]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/hu_nan_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"4312",properties:{name:"怀化市",cp:[109.9512,27.4438],childNum:12},geometry:{type:"Polygon",coordinates:["@@@n„‚@b@XnJ@k°x@aVUnl‚UXnV@@VnJWÂUJV„nIVV°ŽUbVVVL@Ž²LUÂVa°V@aV@nm‚UXblLXWVXVmVLVK@an_„`@X@l°„VlXXW`nX@Jmn@b„@nV@Lm`„bUb‚n@VUVl@nIVbUlƒV@LkJUnVV@xVblVUbU@ƒzUKU@mx@xUnn@@WV@lbUb@šnVWXX‚V@VIV@VUnJ@VUz@JWbXllI@VXVVL@ÂŽVn@„„Wlb@„Žl„XVlL„aV@VJ@XX`„kVwVl@bk„‚bUÂŽlVXIlƒnLVa„mVwV@@nV@XaVJVbX@lwV@n„@nV@VWnIVVUŽÆ@Xx‚a@I„UUKmk@mVƒ„IXmWUš™VJnUVU@anaVwk™›U@UXa@W™@m_@a¯@@K@UVƒ„bnK@blIlbXa@WW_n@VƒU@¯bmyƒUkÂUJÇÅ@WÂU@kWKÃ…wƒÂnm°KVkmankVWnXVWV@UƒƒwXkV@mƒ„UlLnaƒÂVaX@VUn@VnVK@xlnXWšU@a™@@klak™Vw™mUaV@™wmIÛ`m—@mVUXmlIXƒV‚I@K@aU@UaV_UK@wkUmmUKWXÂÂŽmVkUƒL@mƒƒU_nK‚™@aVU@Ukak»@U™™@ymUƒ„¯™ƒUUƒVKkam@™nka@ƒmwkLWb¯mkaƒ_VaVKUĪIUw@ÂkKmÂU@WK@UnƒmaULkU@wUalWV¹U@@WUI@WU@‚_@W@UÂ@mƒU@WbÂbUK@Um@@UmbUwÂWWkk@WU„a@anUUwlWUwUU@wlJVUnnV@@mnI@m‚K@U@w„a@wUm@_mƒVUUaVUkƒƒÂƒ_kÄ‹Uk™VWLƒ@mlU@knÂ¥W@UwÂUWV@VÃU@lXLWVUbVLXlVIl‚knmU@VUJk@@„ƒ@™ÂkVmwmVkxU@@XmVUb@xnKVLl@VxUxkIU`@bWVXX@JWL@bkb„¤@bmUUU¯Kƒkmb@V™VU„VVn@@„Vb@`lnÂœxmb„lUn‚bk„@xU„mV@bmWÂbUÂV@VJ„Il@nVUb‚K@nn@VbnJVIlJVkXJ@X@lmx@bnnWVXJWXU@UlU@mÂk@@llb°x„IUbnJ@VWbXVmI@JVX@bk‚@bWL@JUXUK@U@Uƒ`n@@Xm@XVW@@nX@@`ƒImxU@@JUI@KƒLmK@UÃ…UUV@VW@™¯kUU@UamVUUmJ@n„xmLÂKƒkmJkwkKm_mKXU@aƒU@b@Wk@ma@zUJVUmbUlU@™xnXlWlXXblK„¤V@@nUVVLkVš„l@Xb@VVK‚nXKVx@znW@X‚@@lVK@X@JXbWbnn@JUamLVVXIVxnK@aWUX@˜x@VnI@WlI@anV„IVxk‚l@lbXXšxVVVJVInbV@@ln¦ml@XXVWbkJWb","@@XLVKVXVKUa@UUUmV@l"],encodeOffsets:[[112050,28384],[112174,27394]]}},{type:"Feature",id:"4311",properties:{name:"永州市",cp:[111.709,25.752],childNum:10},geometry:{type:"Polygon",coordinates:["@@lxUXV‚lXUVnlVĢ„JVbUXVJV@XUW¯„ÂVIUK@klW@Un@„nl@V`XUVL@l@šVx@„XXW`UnUbšxUlVnUšV„lb@VnJšUVVVInJlUšVnwVklKnw„LVJVšV@nIV@nbVa@KVVVUUa„KV_nVVJ@_VW„nV@nÂ¥lI@anƒlÂ¥X_VKlwVlULUVVVš@šU@VXL˜ƒ@IUmn@VU@wmKXUWU@m²šl@VIXWWkÂWUkWlkIVamUXamUnmWUU@@Un™lK@ÂXJl@kÂVÂUk@mWKXkl@@aVU@UVWUUVa„In`VUVLnw@U@K@Uƒƒ@w@UVmUUƒ™°K@UnV@bV@Xk@KVm@amk„aU£VWUUmUUwm`UbULka›KXU@kVmU™@aV_UWVIn@˜y„XXK@klmV„ÂV_kWVUn@WUU@UƒmaU@™wnwWanUmmXkƒam@UakLmK@b™xUUUU@KmÂ¥Vaƒ¯@ƒkÂUaVUlm„UUÂ@mUUÇmUk™ÂUyƒb™bUa™XUWWbÃ…LmL@V™aÂL@WWXUKmmkÂ@a@UUK™XWÂ¥kU@VƒUkxmVkUWbUJnÂVJ@nVJXzWxkÂŽ@lVbUX@VVL@`mbUnšŽUn™VV¼k@Ulm@mwÂLƒb@lmLUK@UÂamƒWÂkƒK@£Ua@ƒ›UkJkUmbVlkX@bWbUÂŽVÂŽnnUVl„@bšbVK@VX@lb„V@nU¤šx‚²„Knblb@x„V„ô@šlÂÂÂŽ@b@l@XWxnVl@„VV@XLVl‚LUÂŽUXV`šbXXmJU@@bm@UUkLW@UlUKWUUb™wUm™L@nklVVmVXXm@@bUKlÆn„‚XkllVUVVL@nUbV‚@V@nnV@xUn¯U@JW@UX@xĉ@™`m@@LÂV@b"],encodeOffsets:[[113671,26989]]}},{type:"Feature",id:"4305",properties:{name:"邵阳市",cp:[110.9619,26.8121],childNum:10},geometry:{type:"Polygon",coordinates:["@@XIlJšI„VVK@Ân@VVVKnLVwVmnLVK@U„@šw„J@wVIƚ°ÂX@ÜȄUÈxll@kn@VwVaXJWXn@@WVL@UUKVKV_U@@aVK„x@U„aV@lk„@XylbUaV_šVnalÂ@W„U@a„I@aV@@aVUl@Xm‚UXÂWaXml@@kk@ma@ÂV_UÂnUV™UUWJUa@kkaWLUmk@@LUVWUkJWkÂK@¼UnWJƒIkV@b@JUIm@Ul™V™Âm@Uw@a@kÂWƒXWKUknW@ƒWUU@k™mx™UkVmIUJUU™VmI@UkaUƒV™UmVk™wVaVmX_WW@ƒUw@™@kUKWVU_k@ƒmm@@VkX@lVLUJƒÂX°WVU@UIVWUaƒIUÄ¡mkVUkWUÂVWkwWXk`mI@Â¥kUVƒUƒUn±@Âm›XkWknV„UVmmU@@XƒVƒUk`@Xƒƒƒk@¥¯»mbĉó@mkU@kU™ƒƒ™KmX@˜UnmL@lULkKUƒWUU@ƒbUaUnƒ@Vb@l„¦Ub@l™@UKmnƒKUnl„UVVbUVn„@`Vn@xƒb@x@VÂL@nmJ@nU@mmUVkI@xVVVxkXVxmV@bƒbXVl@Xl‚XVxna@Vn@@VVL‚aXaV@n„‚@@V@XÂ`V@@XVJ@XV@UºkXVb@xlVVKnbm„@VXLV@n‚lL@ÂVxšJV„ULUb„`lb°nXalKnx@„lbšmn@lbULV„„V°š„ƒnV@zšš@Vl¼lb@VUV@bšmLV`„„@n„KlVnU‚ÂXWVLnnlV@xVLU`VbV@"],encodeOffsets:[[113535,28322]]}},{type:"Feature",id:"4310",properties:{name:"郴州市",cp:[113.2361,25.8673],childNum:10},geometry:{type:"Polygon",coordinates:["@@²zVaVlnVl@nšVk„Jl_XJlIVmnL@mV@VXn@lV@‚XzV@lyV¯²U@UlJ@XVKnVVIXl@UVLV`@n@J„I@mlI„KVLnUlVUVVLXašKVLl@nb@ÂŽW„XV°KUnVV„L@xVJ„L@b@LUVVVU„˜VXbmbVbn@@lUbm@Âx@XVVVÂŽ@Â@˜@bkImx@Vm@Xbƒb@l°XU¤„a‚L„mnL@bl@@™VUX@VxnV˜anLnƒWÂĴXKVwnUWÂXmVIUWÆLVx„L„w@wVmlU@Â¥XƒWUkwlÇn_Uw„WV@VU°wnÂU—ƒy@aVškVlnL@lVn„w@VlJ@b„X„x@bVKnb@U@WVUl@@Vnbl@XLlK@aVLVKnxÞn@a„LlmUaVU™ƒm@Ã…knUmaUKmVk@m™kk@UlWUkVm@w@kUU@W™ÂU¯™¥@w„Ç@aVIlUVÂ@kUWU@UUm»@kÂ@mKVkUKUwƒaUaUa›@k„kUWJkImaU@UK™@maUzk`@zƒy@XmJkL@UUJmUkV@z›@kÂŽkVmK@¦UbWL@aÂ@UbmKmwUK™Xk›VUUkmVkw@UUKmL@WUIWa—JW_k@@WmI@mk@WÂkWULUUVKUUVm@šU„bš@‚ÂnUǃ@U@w„™V@Ua@aƒL@ak„›l@k™UƒJƒwó@@L@V@„™`@œƒJ@xnn™šmV@bkJmUó@ƒn—JW„UUmƒU@UV@Lk„WlnnmVXbmxšxV@nbV„V@XVm@UVlXU`ƒÂUÂŽkn@lWLƒW—zm@UJVXU`@bVšUn@lWVÂœLlbVKVan_VxnVVVUXV¤ƒbnl@bUn@LWlU@@amU@V¯L„šVVUn@V@x„„@V@L@VmxUKUVm_ƒJUbVV"],encodeOffsets:[[114930,26747]]}},{type:"Feature",id:"4307",properties:{name:"常德市",cp:[111.4014,29.2676],childNum:8},geometry:{type:"Polygon",coordinates:["@@l™U™mkUwUyV™@VW@¯Va—ÂVmUU@KVUVUVLnaWƒnkUÓV_@mVU@Äw@ƒka@kVmƒUmK@IkaUamKkXWaUWÂ@WUk„™@@KVU@aU@™L@J@XÇVUKVak_mWkLWakVUbmLUUmlÂUVKUU@kUWW@UImJ@xkLkKm@@Xƒ@óÃ@UUk@UKƒV™ƒULƒKƒXkWWbkaƒIUƒWU@mUk@WLÂaUJġ™ƒ@@XÈÆVIl‚„Vnz°aV@U„m@X`@XWbkakJ@amLƒaU„@V@L°@@bn`š@@XWb@VÂœVlšUxmb@bUVmVUI™šXVWnƒJU„@nnlVLƒV@JÂbWzk`m@UÂVK²V‚x„k„LVl„@Vn@V„„°xVKVkÂœVVlUblx@bU„‚Æœ@@nVnUll„kx@VW@@VkLWxUL@bÃ@kKkVõV@bkXVVUVƒ@ƒVkUkV›LkV™a™@@™ƒ¯xUxmX@JVb°WXkK@Vm@k„Vb™bn¤‚xUXkJƒblxnXÆK²l‚_@Wnašn@ÂŽUL@b‚JnIlV„@lUÂœ@@¯ô@lWÈ‚IVKVm„U@aXaV@lwVXn@@K@UVKUUnU‚bn@lWšX„ƒlJnUšLšKV@„„l@²a@UlK@aV@naVX„WV_nKlL@KUm@a°U°Â@VXL@a@wWmXal@„k„@VLn›V@@bl@VnX@mwVa²aVU@mkÂ@Â"],encodeOffsets:[[114976,30201]]}},{type:"Feature",id:"4331",properties:{name:"湘西土家æ—è‹—æ—自治州",cp:[109.7864,28.6743],childNum:8},geometry:{type:"Polygon",coordinates:["@@@KšL@wnK±Ânƒnm‚—@WUk„ƒÜÈn@n»@mVamk„mšU„„l@V™nmmU@wUan¯VKšLn„VWlInyWUÂœI@WWk@KXU˜n@mnUmU@WœƒmkV@ƒkXašaVaUm‚IkƒƒÂ@ÂkaƒX@ƒUm@ÂUKWU@UkJWkXa@IVy@UmIUVU@UJU@WÂXWmU@™VakaU@@Xm@Vm@wnwV@VL„yV@VakUUa@wUUVmlI@K„UVkUamJk@VU@UÂmVaƒan_@KmUƒ@@anm@ImWX_WWUk¯ƒ@k@Wƒ_m`@bULUKUnUWWXkKWaÂVmnU@@b¯UUbVŽ±K@ÂUKUUVa¯ÂUUmJUƒVIXÂmI@UU@WmÂVmkUV@b¯w@lmI@W@aƒÂ@m¯LXbmJVLklWL@V@XXÂŽmbVVU@@VU²Ul@VlX@bš`Xx›zUmkUVÃ’lÂŽ@bXLWxXVlš@V„bkLma@nmVÂmULVbmVUb@lnzmbUÃ’Vl@°nLV„lJkn@bmJk_ƒVmmkblxÈx@LUb„xVb@V™n@JmLVÂŽUš@„nV@¦VbnJ@ÂlVVbkx™bm@UxVLV@n`UnVVV„kl°z„xVb@VU@@ÆlXnWm¦nbVK@XVVUVVl@X„KUV@nVL@WnIWÂŽXLVKVLlxUbVKXVWbn@@UnKVLVb„JšU@aVU°b"],encodeOffsets:[[112354,30325]]}},{type:"Feature",id:"4304",properties:{name:"衡阳市",cp:[112.4121,26.7902],childNum:9},geometry:{type:"Polygon",coordinates:["@@lšV@XV@„mXVlXL„W‚X@l@bVxn@šŽšUVkn@VJ@I@alU„JXIVm@»‚LXllIXVVU@Kl@VnXKlb@lVbXIVVUšmVVÂU`@Ânbl@@lXLVVVKVbnXWJ@VXbWxXb„Ul™VK„¦nLVVUVVbšb„K@U˜LnK@Un@VxlUV`UnnL@VVL@JV@VUnxnKVbV@@VšIVUnJUÂVUl@nW„XlÂlIUa„KVbÞLV¼²`V@VIUwlaVmXa@IWanK@U@m„kVƒVUVaX@lšnaVLÈ@‚¥@kkJUÂWJUaƒXkaUm‚wVÂXJ@_lWUU@Â¥n_‚KkamÂUK„™@amKƒnÂKƒbV£¯W@k„aWan@@UnwlJ@a@—@ÂUÂUU@W‚wn@Va@km@UanaWa—UVƒUUVU@K@aƒKUI@wƒKUUVm¯LWUXƒ@Âmak@UK™LWbUKVUkUmVUKƒLkJ@nƒJ@I@mU_UK@VWkUJmUUL@WkI@V±VU°kzU@Wy@ÂkUm@UWU@@nmKUnkJWIk`ƒIUlm™k@mUUkUb±yUX@VUV@bk@WlXL@nVlUÂl‚k@WI@ÂŽkLmš@VV@XVmnnVWbnVUblJXkVl‚XXlWXUJk@±™@nXVWVnL@xUVm@Vn@J—„WK@U™V™@UUVUVKUkkxULW`k¦m„@bkJm¦U@ƒmUX@`UImUU`ƒLVbUVUU@LUbmaU@mJU@U™UIƒKmxkLUl"],encodeOffsets:[[114222,27484]]}},{type:"Feature",id:"4306",properties:{name:"岳阳市",cp:[113.2361,29.1357],childNum:7},geometry:{type:"Polygon",coordinates:["@@@wUklmUÂUmU@@UVm@wUaV_mmUKmwkIkJmUUnm@™Â™@UUƒbUKUƒmÂÛamm¯xVLkbÇƃUƒVUzkVUlƒUUKWLX¦W@ƒVUUUaƒKUbmLÂKm„@akU@aƒmVaUUVIVWkk@wkƒƒ@@xmLÂlmÂÃ…wmbVlXlÃIWVkK@kkVƒL@VWKU@UblnÂaƒƒm@Âb@bšnW`@XUJk@UUWKƒk@UÂKƒnn‚@xmLUVm@kbVbV„nV@V„b‚Â@KnV„LWšXŽÆVĢ¦VblŽš„n„UJWz@ƙVóUVbkV™aÃ…x@¦lVUbVVknWKƒ„k@ƒwƒK™VU„Å„ƒl@zkb@`m_mJ@xX„mbVbÂœ@llV@n„@llbXL˜UXalUšl„alVnwnLVKlšVbX@@I„V@blJ@bVL@VVVUXȤ‚VnkVÑXmlbnš‚„VKkÑř@UmaVç@±XUlI„xlV„@VaX¯lUVVUšVJn—V@°°nŽ°„Vxĸł°¦šb²¦lJ@U@aUK@kUm@_m±VIXal@„Kl@„bVÂ@K„K@k„m@UmUUaƒK@_UJƒaXU˜@Xmš_VmUk@WUk›@kU@a@m@UƒaUÂUU@al@ny‚XXWWwkÂly@¯n@@bnV@k@mVI‚„œVlUUmlU„JUw„I‚bXƒVaUalÂ@K„b@ƒVKVkXVl@VkUU@ylUÂœVVaVL"],encodeOffsets:[[116888,29526]]}},{type:"Feature",id:"4309",properties:{name:"益阳市",cp:[111.731,28.3832],childNum:5},geometry:{type:"Polygon",coordinates:["@@„ŽÆxXL@l‚V„@ĢšVI‚bXKl@nVV@„XVŽ„JlbXalX„W„LVKš„„UVLl@VV„@ôބ@@Wn@lLlK@wnIVJX@VX@lVVUL‚VnkVVnKValUXblKnXl`UbVLÈU@W@IšKV@@bUV@Lš@lƒXV‚@VXXblWnLVblb@JnL„VUn@llb@„ƒx@ÞUV@nU`VÔmlX„mbUKUVUV@LVVUn˜ŽUb@°UXš@U‚VzVxnlVškšVnlVnaWƒ@wnIn`@_la@y„kƃVƒšU„L„xl@„ƒXLlmUUVakU@¥ÆwšblUUaôVšU@Ã…XyVImƒ™ƒkÂUaġ¥ÅUWÂX™ƒKmU@Lƒa@UmUUƒUalan@VUnK@wm„m‚L@V„lXLVVl@VI@WX_™m@a™¯mKUÂkwWÂ¥UK@_UWWLUVkUWL@WUIkVƒU@JƒwkLUUmJVI@WkXm@VmkKUIU@mmm_@VUV™@™„kJÄ‹wUU@KÂUWkkW@IWW@Âkm@klwkWVkkU™V¯m@kWLU`mIkmkXm@@`@L@xUKWkU@VL@JÂUU@mbUKVa¯ÂWVnL@`lXUVkU@xW@UbUWVU@UÂJ@„lnU@m‚nÈmVƒa@bUL™wUb™@@VkxmUUĪÂUV›K@IƒUƒmk@akm@wmIƒŽkK@b™VWXkm@wULUmm@UVW@Ub„ÂmbkKƒVn„U@Wl„xV„U@UXmWUXmlnbUl¯Lmn"],encodeOffsets:[[113378,28981]]}},{type:"Feature",id:"4301",properties:{name:"长沙市",cp:[113.0823,28.2568],childNum:5},geometry:{type:"Polygon",coordinates:["@@lVUllXkx@lln@‚XX@JlXXl‚V@LVVÄŒxlIšƒš@VU@Un`nnV@VJlLUnn@lW@XUJnIVVlK„x@I„VlUVJ@XXKlVVUXKVX@`VLX¦lxVÂŽnLš°‚an@„„‚bkmVaV@XL@U„KlU@llLXUÞJWkUknaÆxnŽ‚knK@w„@l„@xllUXUJVVUb„n@blV@bnƒ‚LnKVa„LVbVV„UX@WÂ¥XKVL„VVklUVy„U„VÈÅlaUK°wnnÃœbn‚V„VL„aVVš@šÂn@VmnVlIlJna„@Valkn@na@amwm@„UXw˜K@aUUVUUaVa—wWK@kU@UaW@kKUUƒƒ@k™W¯XWanÂ@k„™mmÃ…@@I@U@KmLkaVUƒKkLWVUƒk@UVmU@am@kkk¥ƒUƒVUK™„maUb@ÂŽUb™I@aƒKkkWmÂ@W¯K¯b@VmaULVxUXlVk@UxVJVbUb@xULƒ@ULWW—LƒĕmxÂVVL@šVb™KUwƒaŲWwX@@WƒUWLU@VbkV@aU@@VUnmJ@VUn@VƒLUK@U‚mUIk@UÇmÂU@@UW@ÂJ@LƒbUmVI@aUmW@@bkXUx@lmLUbm@UbkJ@V@XmlUbkKm@ma@kUaVU@aUKÂ@mImJUIkVƒUƒVUakbWwka@UWKkLUamKUXm`Ã…_U˜ƒÂULmaU@@lUV@X"],encodeOffsets:[[114582,28694]]}},{type:"Feature",id:"4302",properties:{name:"株洲市",cp:[113.5327,27.0319],childNum:6},geometry:{type:"Polygon",coordinates:["@@X‚‚Unw„Ė˜KXXVK„@VK@wVaUaUIVwl@kUVWUwVKnb@U°a°LXŽ‚@Xnll„L@bšJVa@ÂVanbšƒVL„U„V@al@@UV¯ÅÇ@Ummk™w@¯ƒyVwnUVVVUkÂmWV—nKVUƒa@WXkVKn@lUVU„VVVXIlV°VnI@VlKnV@ÂmwVm@LXKWkUÂ¥ÂwWwƒƒ@k@m„X@KX¯V@VUVa@VnKWkœƒV@VUkm@aWa@wkUWwkmV£VÿXUVL@mVIXaò@nW@ašUš@@am™@aUU„UmÂXmWUk@ƒƒnÂUW@_maVm™wUÂkamaUL@aƒwƒW@akI@UƒxUm@kmKUk™lUÂŽ@b„zV˜m¯xUVU@ƒXVxm`kÈlxXVW„@¦kVUn@xƒxƒKUwÃ…KVXUJWnXÂŽmVUxWL„¦XÂŽm„mK—bmUUwW@UV@šk@ƒšVLnÂŽlbÂLm`@¦VVkX@`WIUÂŽÂxVnlb„WVbXIV‚lI@l¦Ç@UKmbk™W@UbUVU„ƒl@n@VmLXb@JWbUnkbVxUJUxWXXlWL@V@V@XXJWx„zUVVVVKnXW`@bkIUl‚„nLVJUbUIWVXlWV@XklVbnn@xlš"],encodeOffsets:[[115774,28587]]}},{type:"Feature",id:"4308",properties:{name:"张家界市",cp:[110.5115,29.328],childNum:3},geometry:{type:"Polygon",coordinates:["@@@InWVw°wš„@š@šblUÂœKlUlV„U„@VUUUlW@aöUlUlLÞ@@aVKXwlK@UX@@UlwkƒVkUm@m›@ÂÃ…Vƒ@akwVaUk›UUlUL¯wƒƒ@UUmƒ@UkƒKƒlÂw±UULVÂn@l_XyWwÃ…@VÂUUmJUXU@@mmƒU@kxW@UaUIWbU@@mU@UxƒnUbmKk„WJkUVÂÂalƒ@aUkUxƒlW_@WUIU@ƒbkKWUÂJVnUb™bWb„lU@nl›„@XnVmV@n—mWV@LXl@X›JXVmzkJUXmĪKULm°Vb@xnVmnUšk@ƒƒ™VƒnnlUb@nm¼m@Ûǃ„Vl@X˜mnm„²ŽmL@x™K@LUl@nULÆx@V@VXVWbXX˜l„@nLlm@bVKÂœX‚W„L°bnUš@VaVUš@šmšÂVw„JnwVK°zn@V‚Vb„a„@Ċ¼"],encodeOffsets:[[113288,30471]]}},{type:"Feature",id:"4313",properties:{name:"娄底市",cp:[111.6431,27.7185],childNum:5},geometry:{type:"Polygon",coordinates:["@@lL„ÂnJ@xln@bnlV„‚„@JÂœLVUšŽV„nVlw@Uš@VašxVK@a„bnUmÇnÂV@km@ƒ‚I@VUVVXVaX@@wlVVUkW@_mKXU°‚UbVLnaV@‚V@IUKV@XlVL@w@K@_n@lWlnnJV_XK@l°nšU@WVU@kV@nbVK„ÂV—lƒ@ÂnLlƒ„LXU@ƒlmkw@nW@UKVa¯IVÂn@@aVUUKl@nXVKVn²a˜ŽXblKnLlmVI@KUU@akLUaVa‚UXm@aƒÂ@wVUVKnLnWlXl‚n@@U@anUVm@U‚Inm@IUK@UmKVmU_kVUwm@@VmL—K@VƒL™aUaVUUUmKĴULkšƒVWaXwWa@UXImWUaULUUWKk@WnXbWÂŽÂVWnk@UV@bU@@bƒJ@bƒV@XkÂŽmb™UU`VbkaWzƒ@klU@ƒb@VƒwUL@bV@U`ULVL@VUK@Xm@XWWIUbUxm@@lkkÇwƒVÛÇW@¯ÂřUJ@xƒI™xƒ@@VULmKUnUxmKULUUm@@‚ULƒU™JkIWJ@b@LÂJUÂW„kJWnUV@nn˜Ü_nJšxU@VbšnUxlškb@lš@"],encodeOffsets:[[113682,28699]]}},{type:"Feature",id:"4303",properties:{name:"湘潭市",cp:[112.5439,27.7075],childNum:4},geometry:{type:"Polygon",coordinates:["@@Æ`n_VWnLVblKXL@VlbXxlaVb„U„VlUVJnInJ‚@VL@bUVVb@lnbn@lLVank@W@UlIVan@VanK@kVwlW@aX@Vn@bUJVn„a@K‚IX@@VV@nÂŽVÈl@VJÂn@VVL„K@UVm@UnIVm@UV@@blUUaV@XK„V@XW@XxƱ„bVxšLUa@™UKWÂk™@wmmUalk@WXUWkXUVJVaUImKƒVklJ@aX_mWULUUVUƒyXwWI@W@U@UXKWkXWVwU@±_U»ÃKUaƒLVbkJkƒWmXk@UVVÂŽmIUV™J@UU@UamLmwUVU@mnÂJ@VUnmV@b@Vm@kÂkWmXmKULUV@x„Ž@bWnÂVUbVblK@bVV@LUJknmKkLWa—±bUmULmWk@VLUV@bm@U°JUbVLX@@mlxkn@„WVƒKk„mK@Âk„"],encodeOffsets:[[114683,28576]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/jiang_su_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"3209",properties:{name:"ç›åŸŽå¸‚",cp:[120.2234,33.5577],childNum:8},geometry:{type:"Polygon",coordinates:["@@„n@‚°ĀÞ°@¦ULWKkx@bkLWb@lUlVXXJVbƒnUKmxXV@bm@@Xš‚„LޚܦXlVnš‚mzVJ@n@‚²ÞôkƃÞaȰĉ‚wnljÜó„éVÛnÂĊīČlj‚ĉ@Å@KÞUlU@ƒkklÇÈњÑlÄ¡XÉ›@UġƒƒaU@U_ƒW@n™@kaUL@VW@kKmkUV@bkbWW@bkzmaÂ@ƒJWI@KUKULƒ@U¦™`@XUJ™U@KmXƒw¯KXkmy@aUIWJXXmV@K¯UU@@bVL@¤VLXbV@@JVXVK@„„JVn@bkKmakVVXUVVVlI@`U@nzVVƒb@¤n@@UlKXLVVšI@V@nV@V‚@ÈUx@šóVÅšƒkÃ…Wó@mU@bk@Ãwk@WbXxm@@J@zV@kVƒbV‚nLWVUX™WUXUÂŽWLUÂŽÂ@Wl°z@VkxU@UVWIÂxWJkbƒĬ„nW@@bUl"],
+encodeOffsets:[[122344,34504]]}},{type:"Feature",id:"3203",properties:{name:"å¾å·žå¸‚",cp:[117.5208,34.3268],childNum:7},geometry:{type:"Polygon",coordinates:["@@XKVX@WnIVx@K°Lnll@@I°K„nVašU°x²mlxš@VanU@aƒk@akmV@@w™@Ua@aUwVwUw@w›@UK@£kaĉlóIÇVkŽ±@@kUKmVkIkxW@Ua¯UUm@UVI@WVI„JVÂ@ƒ@Um@Uana„U@m‚I@J@XV@XaVÂlkXƒVaUUWLUyVIXmWak@ƒXkJókƒJUL@KWkk@ULU@Wa™lUIkJmI™mk„VbVš@lV°kXUKWKULU„mb@VUlVnƒb@VÂV@IVKUUmU@ak@@bmV@xklƒUƒU@UÂKmV@nƒJVbkXƒKUamLUJ¯UUVmI™bVV—Ll`@LƒLU`m@kXUVU@V„lxUK@xkIWbUKƒx@ÂV‚kVVn™b¯@@U™@ƒxk‚mbkLÇK™b™@@XnJ@LmVklƒ@@XƒlUƒVkxƒakVVb@bVnUbU@@x˜VUšVb@š„ŽnIÄŠ`šXVVôJš_„K@xlU²Klk„U„@VaVÂVÂÈm@kVUVmnamUUaVƒXIVJ„@‚ç@Â¥nkVLn›„@@XVK@VUX@JVUV@UnVJVLUJVLUVlšnI„b‚KnU@m°™VanI@anV‚KVL„an„lK„blš„KÞk@¦@¤@„VKnLVK„L„KVzlWšLX@VmV@VbnU°@Ualk™˜WXLVU„KWÂkUUWšƒ@£Wa"],encodeOffsets:[[121005,35213]]}},{type:"Feature",id:"3206",properties:{name:"å—通市",cp:[121.1023,32.1625],childNum:7},geometry:{type:"Polygon",coordinates:["@@VJ@bnzWl°L„xnW@LšVVI@Wš_V¥„@VKVL@LXJ„I‚@nbly@aXXla@aVUnllLX@@UVKlbš@@m„XV`V@„bĢ„lkČÇƃȘ¯šwnÄ•VĉVÿšUÆ’UĠƒŦğlÂXÑVǵ@±ÅLʵĖ¯lÇbÃÞ¯xk@Çkķé™n¯@ÄŸÂŽÄ¡Æ´Ç«@kVVlUbƒL@xULǂóLUÂl¤@nkVV°VLkxVb@l™aUXUKWÄ–klVX@¤UšƒUkb"],encodeOffsets:[[123087,33385]]}},{type:"Feature",id:"3208",properties:{name:"淮安市",cp:[118.927,33.4039],childNum:5},geometry:{type:"Polygon",coordinates:["@@šnźUôÒɴ胚l¦nÄ–V‚kbmš„X@xVlVL@xUb@bUJVnUx‚šœ„lKVLÈx‚m„zXV@lW@XV‚b@bȚVxnb‚ƒVIXa°L„aÆVVaXUlK@aXIƄVlXKVUlIXalK@alwXLVK@¥ï¯ÿ@ƒmVk@aX@ƒm„īlaXI‚wXJVUV@lw@U¯yÂb›UÂaƒUÄ¡UÃ…aUKVknaÄ¡m@kUm@wÆIV±nLÆw„ÇnUUkƒÂ@Æ…ÃU¯JÃI¯¦Ul@bƒ@@VVL@l@LƒLÃ…mƒL@b™@UaVaUWmLUKV¹ÂKƒLWKXÂ¥WI@mXk@UmaUVUU@VmL@W™bkIUWƒUmVóIkbmm™@UbVLUxmJkU@bkJWbnXU`Wz™KUÞÈlVb™Lmx@„kè@Æ"],encodeOffsets:[[121062,33975]]}},{type:"Feature",id:"3205",properties:{name:"è‹å·žå¸‚",cp:[120.6519,31.3989],childNum:6},geometry:{type:"Polygon",coordinates:["@@ôèĊVnX°¤²„lxƒÈÜ@²x@J@b@X‚`nIUƙUUV@bl@VVnL@L@xƒJ@X@blJXnW@@`XbW„kVƒ@UbVxƒXUxkV@LóxVbUVWš²šVJĸklUǬ@ĢƳĠ°@šmƒī°»ÈÂÇ¥ULUU±a@bU@¯ÂƒU@KnImUVWUk™mXUVU@ÂlIVaUUÂVWKUbUkWKUÂ¥n£WakJUkUL›K¯L™KkƒVIn@VaUƒVUUƒ›UkVk@ƒU@amUkJƒ@UUlwXÂ¥W@@UkVmk@JUakL›@kk¯ÃmJUn@nmVXlmbVVkn@„UJ@±WUxV¯a¯KÅbżÇxUxƒšUÂUlWL"],encodeOffsets:[[122794,31917]]}},{type:"Feature",id:"3213",properties:{name:"宿è¿å¸‚",cp:[118.5535,33.7775],childNum:4},geometry:{type:"Polygon",coordinates:["@@XbWnUJVzXKVVUbW„klUÂWbU@@W@IÂJ@nƒVmbVbn@@V@„UŽƒIUJ@XUJ@VVn°VVbX@lwlJnUVL@l²@lÂÈUôJÄŠklb@¤VLÂœ@@xVxUxVx@bVbš@@xU@ln„mnX˜mXLVmV@X@lxVnVJôL„LXa‚x@b„@@KVL@bn@@m@™@alLUUVaUÂ¥nIV±‚I@mXI@aWWXU@LlUXWW_XWmaUwǙ@aÂaWUX@@kWUƒyÂnÇwUKkL›ƒÂ™VwUmVI@aVa@wUKUk@wƒWn™laUÂmÄ•k¥„™ɳçóÑŹV™mmzkVmm@a@Ióƒk@@LWU@`—„WbXLWlkImJVn@`nXVbXÂŽmL@Vn@‚l@nUVl°Xx°U@LVÄ @z°˜@¦UV@Xn@VJmV"],encodeOffsets:[[121005,34560]]}},{type:"Feature",id:"3207",properties:{name:"连云港市",cp:[119.1248,34.552],childNum:5},geometry:{type:"Polygon",coordinates:["@@@‚lzXxmÆV„„@@¦„@l`XnlKšXXm‚KnLla„b„@„xmbm@kL@V@Vl@@VUXšJX„mbš@@„°Æ@èÈzlW°XÄ¢JlÂÈ`lInbšWV_@mš™@UUÄ·nƒôw°ÂÆmnaVƒVÛVmĸ»Ģw±Ã@Â@mUIny™ÂUmWkۥÙƒK™Â@Wn@@aWUnwVL„mUaWIUWVk@kkJUVWLUkŃWJ@bkLWVUbÃ…Uƒb¯KWbUJ„WXX`WXkV@KWVXX@bWJ@nÂJU²mJV¦UbVVkK@b@š@nm@@aUK@Lƒ@@aÂwWbƒKóKUIUmkwW@U@UnWK—nmWƒn@b„l@bmVUb™@kw±n¯w™VUb"],encodeOffsets:[[121253,35264]]}},{type:"Feature",id:"3210",properties:{name:"扬州市",cp:[119.4653,32.8162],childNum:5},geometry:{type:"Polygon",coordinates:["@@VUXblVVV„b@xV@kz„V@l‚wVLUbVV@VU@VbUbÂl‚b@nkĶ°IÞV@Ɔ„ÂVlmVƒÈÅxmKU²ÅJ@xVn@lÄ¢nmbUlVLÆbÄ¢V„V‚bÂœV‚aXk‚@VÂXKVÂVWšXVWXUmKU„aWaU@™¥@£XW‚UUÂV@@ynam_VWkUVUna@ÂÆV@mnkWmXkWU„W@k„@@akklƒlWUI@UnKl¥™I@VÂVma@a@I@U@a@anK@UmK@Ã…VUnJl™kI@aVwka@mVIUW@UWL@WÃ…bmIƒƒULka™UWƒUxkLUKWlXL@VƒImāVƒU™mĉL™Uól¯I±l@Ã’UbVbUVVXUJUnVV@lnbl@"],encodeOffsets:[[121928,33244]]}},{type:"Feature",id:"3201",properties:{name:"å—京市",cp:[118.8062,31.9208],childNum:3},geometry:{type:"Polygon",coordinates:["@@k@ma@kUUVmVIUWVUUaVa@Ѳk°Jôk@Wmk¯KmX¯aUakKƒƒWU„@XU‚LXaV@@mUaVÂUUl@VmkaUXm@ƒWUUna°IlÂÂÂmV™m™IUW‚Â@Uk@@aV@VVX@„V‚I°»nm„U@ÂVKVan@m»UaU@U_@WlIUa™aVaUala@¯n@‚ƒkaUkUUWKU@mwkUUmmL@KÂ@ƒLmUUVƒKƒVÃ…ImU—JƒÂƒVkVVLšèVLVU@W„L„V„š@nVÃœULVÂŽUL@bW@XbWbkJƒUUVUxVXmVk@WÂUUkVmIƒV@„nbnVWbƒJU„kUULƒa@Jma@XkK@VVL@L@JƒLUVU@V¼ƒnXlƒbm@kbUKmn@lVb@VXXV‚UV@b@LVbÆxXbl@@lV@U„VV@XVK²VlIš`„ÂUbVbUlVVn@WXn@@VUV@„@KmbVLXқLkKƒV@nX@VVUV@b™nVllbšmnb„IWVXU@`lLlknVnmlLlbUmVInK°nUƒU@l@VU@Vn@„ƒ@alI„`VIXaVaVa"],encodeOffsets:[[121928,33244]]}},{type:"Feature",id:"3212",properties:{name:"泰州市",cp:[120.0586,32.5525],childNum:5},geometry:{type:"Polygon",coordinates:["@@lUU@@y@In@WwXal@Þxl@@anVô@ÆX„lŎ™ôU@™Vw@ÇUÂU@@m@U™JUUWKkL@Vm@@£„aUUmyV@@_kJUUVUUWlUnblL@aUmƒI@ƒULUW@IU@WaUK@£UK@aV@°V@LnUWWXIla„VV™@£UWlkXÄ•VLVWšb@kUalwUKU¯lU@mk£VÂôKÈÂVK@w„KVaUkÄ·lUI±™ğ¥ÃUŹš™Ž¯ôm¦ƒĸ™‚@XXK@VVXUJ@nlbUx@blJkšmIUV@ÆnL@VmL@b@b@V@J@bnb‚U@UšJk¦mL@VVJkXk„ll@bƒ@@lƒXXVWlXnml@nÃ…U@ÂŽmbUVlVUXn`mb@zU@V‚ÂVWX@¤š¦V@Xb"],encodeOffsets:[[122592,34015]]}},{type:"Feature",id:"3202",properties:{name:"无锡市",cp:[120.3442,31.5527],childNum:3},geometry:{type:"Polygon",coordinates:["@@nLƒÒlxUVkL™am@™ƒkVWUULUxVVVbUV@bVLU‚nnź™ÞVĠ¦X™VUUaôw@KlUVw„WUwVa„@lUXƒWa@_X@WmkI@a@W„I@w@KmKUUk@@aVUšVVÃ…mJÂ_@W@a@I±wÛ@ƑÇkw±ƒ¯£mWĉUóçƒK¯VkUWK@XkV¯UWaÂbƒmUa™UUb™lln@b@xƒbXÂŽWÂX`@„VxUblL@bn@Vb@`m@XbWnn@l¤„n@xnVlU„™VLÆWÂœkV@VbÞJ‚_nƒl@nKVU@aU™UÂ@mVk°WVLUV¯bVÂXŽ˜bXlVn@VmL@x—V@bl„š‚@ÂœnW@X@VVJ@²VJVU"],encodeOffsets:[[123064,32513]]}},{type:"Feature",id:"3204",properties:{name:"常州市",cp:[119.4543,31.5582],childNum:3},geometry:{type:"Polygon",coordinates:["@@„L˜ŽnxUbVVƒL@xnnW‚nn@VVXn@‚yÂœImx„„°ƒšL„a‚¥n@VkšKVw„W@nX„VJ@b‚@UVn„ƒ@UnUV@L‚b@`VLklVÞn„Æ@VaXLl™ÈJšÂmmVÂUK@aVUUaUUVwVKXVlUš„n@šblKVUkw„ÑmKUVUI@±UI@U@WmX@›™Âkƒ@a˜U@wnK@UUmWk—aWÂU°aVUUK¯XUl@nVÂŽVš@bUVmLk@m„Â`ÃIUaU@›lÃ…XUKƒškVmU@wƒmk£m@XmWan@@_Uam@@akKVaUw@ƒW_XÂW„a@w@akmm@mL@UÂJmnUKƒ@@XnJWLkKUb@„Vxk„WƒL—aWVUImVULUK@L@lkLVVVllb„m@@°kbVbUbšbVbkJ@XV`V@Vbn¼"],encodeOffsets:[[122097,32389]]}},{type:"Feature",id:"3211",properties:{name:"镇江市",cp:[119.4763,31.9702],childNum:4},geometry:{type:"Polygon",coordinates:["@@šVÄŠKšn„VÆUn„„J@UWKXkVLlKVwX„šVlbVK„„nJÆašÂ„ķn¥°óÇIkšWKUbÃ…@mƒUÃlkUK@_Âa@KVUVm„@mƒVUÂ@@aUIWƒ@mƒXUx™LUlm@¦ƒb™K¯„ƒƒnw›JÂzm@UW@UmmXÂmm@w„KUUVamw—ƒKm@UbUL@ŽƒVmn¯¼ÂJƒUW@UUU@@bl@@VÂÂŽVXšJšnnU‚‚k¯JmbVV„Xn@VWlbUnk@VVUÂŽVb@nU@WbÂKWVƒ@XV„„lLVb°bnW°Lnl@X"],encodeOffsets:[[122097,32997]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/jiang_xi_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"3607",properties:{name:"赣州市",cp:[115.2795,25.8124],childNum:18},geometry:{type:"Polygon",coordinates:["@@„`l@Èbln„@„KVLl@„V@bȎlnšKXkVlVL@„lJnb„¦VKVVnX„W@w°@VU„mln„UV`šU„bVUV@„xnKVI°KXKVkVL@al@Xa„LVlULWV™VVL@b„x@VXVmb@x@V™ÂVV@nn¤„šlb°b°KXXWbX`lbXx‚z@x„`VIVUnK„L‚x„WXLVKVbVLVU@wnW°b„@nalX„‚mXVJn@U²mKkVl„U@@xlnÂœaVmlKnÂœ@JVLlÂŽnVššl@XXÆèVlUX@xVLXVšb°W@wnUWmXk@K‚LVwUmUkUKUw@wVaVK@kƒÂ@WnkUKWÂkwlmXL@KVUlLVKXmWU„L@ašL@mÂalaVk@aÂa‚ašƒnXš@VVUblb„Jn˜ƒXa„V‚wn£„K@UWmUk@ƒUaWIÂV@b™JWÂ@KÂmmU@aUUUkmKkÂVKlUU™nKVU„lVaV£Å¥WUUK@UkUUw@Âm@mIkƒƒUUWƒLƒK¯ÂUw°¯@wUKUbƒKmƒ@kkKUL@UUKVÂ¥U@manw@k@U@Wm@@ÂU@Wwkm„wWaUU@UUmV¯kwƒ@@kmƒkKkUW@UK@Ã…V@XWWkXa@Ul@Va@KVaUUU@ƒaXwla@UkVWaXk@K@ÂlmkUmV@Vmbk@ƒ»XIĴVUkƒVUVU@anKVUƒKUalU@wX@˜™@a@K—@ÃwƒL@ÂŽUnÇlUIkJmn@ŽƒbVVÂb@VmnkLƒV¯U@ıl—IWmƒ@kaUI@aÇU@K@KUIkbWbƒJUIUyƒX¯ƒUbU@méUUmUk„WK—xWIkJm@VÂ¥U_UJUwmVkšƒUU@ƒƒƒ@knƒwm@UmÂkWJkL@n@VW@@‚U@knm@kUml@xÃ…xƒ@@XUJlb„@VX„JVxn@lbV„@lULnV@VlÂnV@bWV@bXL@lVLVb„V@blLn@Vl„K@xln@bX@lašLVbnKUVVb„KlXVVkxƒV@nnVUb‚lV@@z—°WWkbƒIk‚WL@LUJ@bUI@b™`@UmI@mkK¯XW™™mUV¯@UUVUUam@@VULWUÂJƒIm`ÂIUJ›ÂÂKUkW@Uxn‚WbnnmlXbmIUVmV@Vnb@V™LUKWLnÃ’VVV@V„UL@„kJUV@bƒÈ@ŽšÂV°šŽ@XVV@l@xUz"],encodeOffsets:[[116753,26596]]}},{type:"Feature",id:"3608",properties:{name:"å‰å®‰å¸‚",cp:[114.884,26.9659],childNum:12},geometry:{type:"Polygon",coordinates:["@@lxnb@V@bV@ln@‚n„‚lInš@blVXK‚nk¼@VUKWL@b™L@`UXU`ƒ@V¦XLÄ @lJ„¦@„nV@l°nn@‚mVXnaš@nb‚K„n@l„IVƒš@VanJ@_lKVVnš„L@L‚K@Vn@VbšUVanKlLnbnJVbšnWVnVVanI@‚Vb@L„bVKVanXVbVJVU@aXLll„bôlƼXxVLVK@Xn@ƒxnVVVmb@LnVVKVXV@@mnaVXUVnV˜K@_UaUmšwnKV_‚anKVLš»„K@¯ÃU@›™UÂ@ÂkWlUn™lknK‚VnaUkma@ƒUIUwlȁw@ƒVwV@n™‚Ân@ÈXlKVmna@kVw@anm‚@n_WWk@™™mUkÂUK@Im›kLUn›bkm@wV@kƒlUnLV±m@UInWƒÂkWmbƒ@¯amX@xUVUKUaULWKƒXÂwƒKmLUVUJƒ_@wÂyWwkaW_XaWW¯L¯akaĪm£@mUUšÂ@U@wnaWU@Uƒw@aUKšUXUVKUkƒKWbk@@bUKUlWL¯LUJmLƒwU@UVƒa™VU_ƒVkmƒnUV¯@@xƒXmWUUULĴmakI@ƒUKUkWl™LkmÇÂ@aƒUk@UKƒLƒ@kmÇak@ƒ_VlkL@`lbnšlLVanLnbmVÆln@šÂkJlbknmKUbÃmmwULUK@bkLWKULUUma@Kk@UV@L@llbVzšxUxnl@bVLmŽšŽ@IVJXÂœVlƒLV`@bn²@J™@™V@Xmbñ@WbUJ@bm@@LUĬU‚„¦lV@xXb@blnUV"],encodeOffsets:[[116652,27608]]}},{type:"Feature",id:"3611",properties:{name:"上饶市",cp:[117.8613,28.7292],childNum:12},geometry:{type:"Polygon",coordinates:["@@„„@„V‚š„„I°`nÂm¤Â²@bVJUVVXUl@Vmb@xV@XbmVVÂœ@lkLmbn`VbnU‚@Va„UnbVllUXV„a@w°ÂVW@_VWšLššnVlbšLVbnl„KšnVK@IUW@_@am@™‚ÑUólK@U@WU@VwU@UI@aUU‚aXƒƒ@kwmJVÂ@yXÂ@k‚anƒƒÂ@mkwVmmI@aUU@aUUW@kÂVkV@@anKš»„XVWnIVUl`@_„W@wlUÂœV@UWKnU‚bnŽ°InJl„UV@VnI‚b„Wn@VklL@l@Vn²m@U`kI@bWJƒÂnV@°VXnJm„XVmx@VVL@bkLmWULUmU@ƒbWÂXb@llnX@‚xkxVV„nVV@¤nL‚nVxnJVXX@˜ššbn`VI„b„@„blmlLnaV@„blWXnlUnbl@„ƒšKVanUVmm_XK@kWWnašU@UnaWUXa›ƒXamUkKmXUWƒLX¯WakKm™nUWwXa@KW_„aXWW_@WnIVÂl@XU‚LnWVknK@ImyUUÆbXK„Û@W@IÆUnƒVÃlkVK@mUIVwkUVaUm@aVIVyXIƒaÈwmÂmk@UnanÂVUmÂÃ…aó»lwšW@kkUVmUK@ÂWKÂLƒUmWULkamK™Lk@Wa@wk@UU@ÂU@mbUIWVÂKUXWmkUmVÂm›U@LkakKƒw@w@U™¯ƒ‚ƒUUn¯l@bmn@xkJWxkL@VkI@mƒkmJUI@V@b@VVxnbWlkÈkVƒLƒbkKmVƒL@V@²nxW‚kLUL@xlKVx„bXÂmVnšWJ@ޙ°@n™xUKUw±ÂÂ`UImVmnU@kalm@akwƒU@UUJmxU@@Uƒ@kU@Um@@Kn™ƒVm@k™KmkU@@WUnkLWxkVUwmKmLkU™bmKUbVÂŽ@xUnkJ@n±ŽÂšUxVXUšWJ@LUb™lUnm@ƒW@nknUJUVm@kXllknVbÆK„VVbš¼V„@šUl"],encodeOffsets:[[119194,29751]]}},{type:"Feature",id:"3604",properties:{name:"ä¹æ±Ÿå¸‚",cp:[115.4224,29.3774],childNum:12},geometry:{type:"Polygon",coordinates:["@@WUkVUkmaƒVUbÂ@mVUam_nalK@kU›nUWaU@@wna@UVkUWVUUI@a‚±n£m¯_ƒJ™ƒUÂ@ƒƒƒĉ¦Ul@ÂUV™Km™mLÂlm@ğ¹m`Uk¯@@UVK¯™@UUK@amkmKkVVÂUa@UkUƒKƒŽUa™L@VVXUJ™@ƒnƒ@™š™WUbƒnVb¯V@LÃ…lÃIƒJÃ…kÙm@Ua™WUU@UmUXmmwVÂUUÂKWUX±mÂUam@kWƒzUaVmÇw@aÃ…LmKÂXƒ‚UÂWKkL@W¯IƒwVw™lkUƒJ@Um@ÛÈWÂŽÂKUxWkƒaUU@KkLVl@„UKUX±KUb@nVVUbUVmaUlUL@„ƒaUL@‚@nUlWzX`@„V@lx²„@Vlb@bšVÞ@°nl@UxVL@lUbVV@n²xVUVmnUÞb‚a„J@IšV°xnbl@nbÆ@VwnK@VnXlK°xnUlVX„V@Vl@L@lk@W_XK@KƒkWxUL@J„nVx@aX@VVUa˜IXlmL@bVVX@VbnK‚a²XVWƒk°a„@UnV¤nbmLmW@ÂXbmJUbVL„aÞK„L@K@U@aVKlbV@nXlJÂœxV@VnšŽVȚ„ÞKôbźĕČmV@ĊšŽ²xÆIšÂV@Þ¦ĸ¼ÞVlÂŽVÞnxln°JÂœk‚LXWVUVUVwnJVI@yn@lXlaXmWI@w—»ma@UmK@akKkXmW@_kaWakKWÂk@@K@IšWƒkUa„ƒ"],encodeOffsets:[[119487,30319]]}},{type:"Feature",id:"3610",properties:{name:"抚州市",cp:[116.4441,27.4933],childNum:11},geometry:{type:"Polygon",coordinates:["@@°V°UnÃœ@n@lnLlV@bšV°L„lnLllVzVVXlV„V@@L@xX@WlX„m@UVƒL@V@n„°škVmVUnKlaXxVbšnlU@lVVnaVI@aX@V„šJš@V„@b„b@šVbš‚@X@lUL@ÂŽ@VlIVm@wUÂVanLšalVnKnLVxlUXwlKVm@k@Una@mWIXKWUÛVƒk@a@UVWn@@kl@@W„XlW@_Um@UVK@a„LnalInWV@@xnI@¥‚K„—šm@ÂkKmƒnk@mlI„¤laXbVblknV@U‚KXVlUXa‚@@Unw@±mU@ak_±a@ƒUJUIƒVÂKW_Xa@aWU™šÂK@mmUVa@IXa@UWmšannlmX¯WKXwVUVwƒÂ@ÂXUlK@klJXa@kƒÂkmm@Uwƒw@¯ƒW¯Âkw@WmbULƒaUUU@mVUU™WmkUb™KmkkK@aƒkUƒ¯¥Uƒl—ƒm@akU@mšÂ@KVIVV@KUkUÂVUkaƒUWb—„mƒIkaVaUU™@mW™„Âb‚b@bUlkb‚b@n™K@bƒKXVWnULkKUV@LWKknlxXÂŽVLml@X„Ž@lULUb@xVxVLVlVnUxÂK@LWlXnmV@x¯X™aWUUK@wVWUkÅçm`Â@mn@bUx@lmbUnkLÇWm@ÂÂmšU@Ux@„Æxk¼VxVJ@„nbVlmbÂUmLklmškVlX@‚VÂœšV@°Þ"],encodeOffsets:[[118508,28396]]}},{type:"Feature",id:"3609",properties:{name:"宜春市",cp:[115.0159,28.3228],childNum:10},geometry:{type:"Polygon",coordinates:["@@@VlbnK@b@JšLlUnx±ĀXxÆW„X@lšÂ@V„@@blJ@nX@˜xUbVVUbVV@b—VmnmJœ„@bmbm@klUbƒLmbœš@lVb@xUX@bVVVbV¤@LVV„bXlVw‚LXÂÜÇn@@V„IlVškUx„x°J@XlKXLV„‚WnLÆK@bÈxUnVb„ylXn@Vbn‚W²XV‚LVVUÂŽnxWnnV@VVVšXVbn@ޚÆl„IÞJÆk@K°UUa„mVa@UUUš»@wV@VƒkkUKUVW£U@UmW@@aXkVUnVlKVV„UUkVmU™@kWaUanU„VVamIXÂ¥W@@aUaUÂVW@_mW@UnIVVn@VbVm@bVL@anKVUkƒWK„UXV‚Ikx‚@na„bVK„b@nVJ„_V›@ÂVw„‚VUVVXUlUUaV@X@VblašbnKlkVaXaƒ¯@m@U„KVUn@WƒXkW@@w@KU@UƒWkUUUykkmKƒk¯K™U@akUmK@k@mmÛ¯V¯U@‚ƒL™¼UKmLÂbU`mL™xVnVb@`—LmUVUUWmb@nU@UWULmU@KnaUUmU„wmJ¯IUJWIkVkaWVUIUlWaUIUVkKmbUIƒÒlVUnnÂŽ@VlLUJ@bUX¯@ƒaWVUKUXƒKUbm@UwÂKWa@a@VkUWn™@Uak@mbX„WJXbm@mL—aWVk@™wƒL@WmanU@knwWmkaWL—KWUXaƒU@Â¥l„UVVVbnwĴnKV™»@aUk@a@UƒJ@kƒmÂLma™@mbUWÂnm@ULǺ@LXnmxUÂŽm@UbkbW@@akLmWk@UXmJmUkV@VUXVlULmKUxkL@lmXnJ@X‚l°Vnb@bU@WbÂKUX@VmKUX"],encodeOffsets:[[116652,28666]]}},{type:"Feature",id:"3601",properties:{name:"å—昌市",cp:[116.0046,28.6633],childNum:6},geometry:{type:"Polygon",coordinates:["@@šXš™„@„mš@VIUW@UšKVb„„LlV@VVbUÂŽlUnLnl@bVL@V°šUL@V°@Vln_Ġºn@‚knKnššLVU@ÂVkÄŠÂ¥Vk@™Uƒ™»UaƒUÃ…LUalmkklWn@VUVIlm@m„Xn@VmškVa@KXIV™UWVw‚™²Â@m@U@ÂVK@k@W™ÂUa@™ƒa@aUĪ@™IUƒW@@bUJmbUU@kkV™mUaWwkbmLUVUn™lWbUbklmL™akbUaW@U@VbkVWVUUUVƒÂUx@‚Uœƒ`UI@mƒaULƒambÂ@lwÂJWUƒVXLl„UVmL@bUK@aUnUam@UUmJ@VnX@`UXVÂŽVb@bX@W¦nJUbƒUmVVbXb@lVšUnVlƒVUUkLmUUVWl@bX@VnV@X¤VUVLllU„U@@x™¼VV@V"],encodeOffsets:[[118249,29700]]}},{type:"Feature",id:"3602",properties:{name:"景德镇市",cp:[117.334,29.3225],childNum:3},geometry:{type:"Polygon",coordinates:["@@VVX@Vbmz„xUlU@mbmL@V²xVbUVVblbX@šVškVykÂValKVI@bn@n`lÂVWnX@l„L@™WKnƒVIVa@¯nK@alIXJVIVWUw‚ƒn@nU˜„nK@alI@a@anKm_™a—™W@UWmIUwÂmmK@£UUƒmUUlwÂwW@km@kWaX„aV@VnVKnXlK@aUK@UnwWUnƒmIUW@¯mU„ÂXI@alJV_n@m±@U@kkKUlm@ƒXÂamJ@UVUkƒmI¯JmÂÂamVXL@V›UkV@xƒX@`k_UVmJUXƒW™¼mL@bU@UllÂX@VV@bVV@bnJUnlx@n„Žm„Âb@lWÂŽ@zU‚nIlx„@W„ÂbVV@bVJV@UxV@@X@VkLVôÂ҂šn@@b@`VX@J"],encodeOffsets:[[119903,30409]]}},{type:"Feature",id:"3603",properties:{name:"è乡市",cp:[113.9282,27.4823],childNum:4},geometry:{type:"Polygon",coordinates:["@@VWnL@UVW‚LXaV@@ama¯UÂk@WmInW@klKVwnLVKUkVW@UlUnVnIVWl@nXlK@bX@laVan@VÂnwWm@KȹVK¯m@kmU@ƒƒ¥kIÄŸ@WKU¥„@V_VW@_šK@aXKVL@Ul»ÂmWLkU@am™kJƒÂmÂ@ÂkmU@@a@UmakwU@›„Xlƒ@VXk`UIW¼kWWX@‚œÂ@l‚xV¦XlW@Ubn„@ÂŽmUkL@UmJ¯UkUWVUaƒUÂlm@UXWl„nUJ@LmLU˜nXll@bUVUUmVUn„Ž@¦šxlÂŽnn@VÆÈU°kbV„VxllnL@VnVVUl@V„„anL"],encodeOffsets:[[116652,28666]]}},{type:"Feature",id:"3606",properties:{name:"鹰潭市",cp:[117.0813,28.2349],childNum:3},geometry:{type:"Polygon",coordinates:["@@@XV@nlšL@lUnš„mÂŽ@Ln@@VlV„@@VV@nwVI@V„Vlx@bknlbV@nmnUVJ‚_²‚VxVLšw@mš¯@ÃXIm™nUWƒaUwkL@wVKlKXÂmw@±@U„KnUlL„a„KlUlÇXkmaUw@U@a@UƒÂ™UkwUJ@zWJ™wÂ@WbkVWUÂL@VmUklUaWakbģkJ@nmln„lL@Ž™nƒ˜ÂL@¦mJ@wU@mXkJmbƒK@bUL@VVn@`kXƒW@Xk@@lm@UX@V@b„lÃœUXVWLXJ@nmb@V@l"],encodeOffsets:[[119599,29025]]}},{type:"Feature",id:"3605",properties:{name:"新余市",cp:[114.95,27.8174],childNum:2},geometry:{type:"Polygon",coordinates:["@@m@@WULUKWwÅ»ókƒakkWK@bUVUIUamWUbULƒa@KUa@ÂmJUbmUXU™mUamImakKmLUb™VUam@@UÂL@KƒKm™UUkL@`mIUb™@U„@V@bVl@bš¼UÂŽmL„¦mxUaUUƒVkÂŽ@¦„VWbXV˜LXKlbXnmx@lmVnb@X„Kšxl@XU˜bnKn@WaXIWƒnal@Vbš@XmlV@U@bXb‚LVxn@Va„LVWVLXU„b°@VW@aVIkK@UmÂVmkU„ÑVJnalLVUVJXbVkVJXUlblUXJVI°JnI"],encodeOffsets:[[118182,28542]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/ji_lin_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"2224",properties:{name:"延边æœé²œæ—自治州",cp:[129.397,43.2587],childNum:8},geometry:{type:"Polygon",coordinates:["@@Wxĵ„mš@„ó¤VÂX@@xܼƨš²xWxƒV„V@„XVƒ„„„ƒbWšXllaÞU°Ċ„@ô¼„LôÃWanÂV¥ƒÑnĉ°¥šÅX¥°¯@w°w@»°Âk£°mÈŹ‚mÈbƃŎ¦„K°z@ÂŽkxl¦UbU¤šššklV„KŤÞȰ@@bšV@nVVUlÞ¦lUllÂœVlU°ÑU¯Vƒ°w„bXxl@VŽ²„˜@n„ô¼ƒó°™kmVk²ĕ‚w@wV™ÞÂÞ@@ÂĠƒö»˜¯œ@‚„šbnb°mÞ¯°V°„ÈJmÂXÂ¥mam™UřƒUƒlaU¯™ƒ@w™Kk—l±n@@wƒkÃVUUl±¯I¯b™a™lƒ@™ÂkLmakbƒ@ġƒŹé°™Þb°ÂšékƒƒLm™„wX™‚aÃ…b@bVlƒbVb—ÒVbUb›UUanwƒakbVÂŽUV›ak„¯„UŽƒLmxV°UxnôŻX@J„Xkl‚bkbĉaƒbƒWU„ƒ@ƒk„WUU¯@@klmƒ@@™ÂÃ…@aƒwWÂXÂlKkI@ÂWbUaVIUanUƒƒ@ĕƒÂ¯K™„mUnWUwm@£ċèkUmbUmm@@nkJUalwk@@nmWUan_óaWmnw±KÂœIƒwl@UmƒI@an@@mlUÃ…mV_™KUkƒ@U`@_ƒKUÂmU™@U¯™mmb¯@kb™ImV¯ƒƒLkbƒKƒƒÛ@ÇnɱJóaÃÄ¢kb@„›x—ÒÇllÂÂœ@‚Ž²V‚„ÆUVV„UÂÇ°X„óxlV¯„lV@bƒV@n—x›@—¤@„șŎnxV¼knšJ‚nšKX°˜¦UlÂnVbUbÆVnÞWVX¦llšb@l°œVJôÒnLVbšbXÂŽ"],encodeOffsets:[[131086,44798]]}},{type:"Feature",id:"2202",properties:{name:"å‰æž—市",cp:[126.8372,43.6047],childNum:6},geometry:{type:"Polygon",coordinates:["@@ôl‚zšaÈV°„šK@„mŽ—LWl™nšVxUV‚È@ÂŽÃĬUÈn‚ôLša‚„²VmÄ€kV@„ĠĊnU@b„V@b˜@nl°UVnÞaôJ@bšÂ™V„¦mlkššbmVXx¯@Vxm„nbƒ„šbÈK‚V@bÈL„wÄ yônšmnbÃœ@nn„V˜x@n²K‚„„J@k„al@nxÞU„Lź±Vwkw¯LWWUš™kÂÅŽÄ«Vwƒw„°y„ÂVĕ°wÈVlkÛ»@wW@UÂô£@ƒn™ĶƒXwW™aUamKóÑUI¯›@k™akkWÂ¥XUmÃÃ…UVaUa‚mVk—¥W¯™LÂm™IlmU»mwÈšÅ@ƒ˜£kJUÂÇk@ÂÂam¯y¯UVwƒa@wÄ¡x¦ƒKƒƒ¯X°Ċ¯¦U°ċWULÃ…a±b¯@UkÃ…WmÂVƒ™ƒkIUlóŽċ¹™`óIƒlX„WÂŽXxmbÂUƒLÃbƧ@ƒx¯bƒÈ—l@xƒš¯zƒaä@nšm„VWb²bmn¯J¯Ò@n„š"],encodeOffsets:[[128701,44303]]}},{type:"Feature",id:"2208",properties:{name:"白城市",cp:[123.0029,45.2637],childNum:5},geometry:{type:"Polygon",coordinates:["@@ó™ǩÅ@WlwUaÆ‘wÛÅÇéĉamÂÂKƒÂÅÇ@Iƒ™ôġVƒÈÑŹçƒ™ÃUƧċĉwóóÃ@Ƒ»ğL¯ll²@ƆÅV@¦m‚Åb@nmlU²VxšlUn™@VbnW„bÇbk҃š„n@èlnlšU҄Ž°Lšx@¼ĉb@҄šUÂŽÄ‹xÃ…ÂďnLVxƒÒƒbÃ…J±a@_Ã…JÃ…nƒŽVb„Kl„nUÜĊ@„Uš™xXVÆn„mšVšÂšJÞ¯V™ĠwšƒXw°xWL„x„KV¦ôU„wVÃǬóÞޙ¼‚‚„ÞkÂŽVôȘxބU„lVn¦ÞšĊa°w„b°@šbÆw„lŤL²`„z°@V@@™nJVnl@@Â¥nUmmn„@mwnmmUnk@mlwUaƒLnƒ›wn¯°anƒWakI„ƒÇmXwÆamUXUlJXa‚UUklKUknmÞV@‚K@ÂVWÞ@VkUwVƒ"],encodeOffsets:[[127350,46553]]}},{type:"Feature",id:"2207",properties:{name:"æ¾åŽŸå¸‚",cp:[124.0906,44.7198],childNum:5},geometry:{type:"Polygon",coordinates:["@@„šźèȂÒU„óĢ„š@JŎȄ‚‚LnÂŽÄŠbÈêÜƃxVbkx@XǪłôš„kÞ`„šW„b@n°ašbšKšnVw°`š_X`W„š¦„ÂÄŠIkmVšakw‚K„x°UÞb„U@lšƒl@°¦œVW„šaÞbšxÞI@mVI@ƒVÂkŚUWK„¥nL‚a@ƒ„@È„@°ƒÆ@nU@KÞalkUwVékUWw„™kU›VkkƒJk¯@»ókƒV¯ÆÇI@bĉô¯@™ÂÄ·w¯nmmÃ…L¯wƒVƒUÞy@UówÇLkmm@@UóxkkĉÂmL¯wVwkWWX™mÂLõm@kűV_ƒƒô»ÛƒÆ¯@™Va™VšaÄ VÂÂlmÄŸwÄ·UóÃƽ£ÇJkbÇ«aƽLW@nxäkzƒy¯XÉ…m@VšôÇX¯Ė¯ºÃnUÂŽnLVlUÔmV"],encodeOffsets:[[126068,45580]]}},{type:"Feature",id:"2201",properties:{name:"长春市",cp:[125.8154,44.2584],childNum:5},geometry:{type:"Polygon",coordinates:["@@„U°xÆKnn°mĸxšÂ°@Ċó@aÈJ°Å„Uôl@¼l°„IllÂœUlVƒšXxlVUêVxkllnÈUVll@Vx²IÞ¤VUlVnIôlރlwô_„›„bVaĶLXÅÞÇ@K˜¯@wÛačn¥š¯WÂXyW¯XwƒUmmÛ@ma™nómÄŸzƒxÇK@aÂUÇL™a„ƒmanƒUw°@WwnU™al™nkƒ¥šU™Â@aóIÃbUm¯Vmk—@@aƒU@amVğĉ@ƒlUnÿ±UÂĪbóKmÂVÇÞī@ÂÂÇVUUw‚™šmXk˜KnÂ@ĪL¯ƒÇU™bÂyókÅè@b‚n@lÃX@x¯ô@ƙUÂÂV_maXm@aóƒJWxnX@ÂŽVVnÄ–VnUJ@nÅÆǼV¼kxƒLklÃw@xƒx@zV`Ã…bmxÂU±xU„nnm‚kn‚ŽğU™bUŽ‚šUb@šÅ°Ü„󼄄U`Ʋ@lön‚KšnXWlXUx°xnKÄŠÂllôw@Vn@lnÈKôx@VÃz„V"],encodeOffsets:[[128262,45940]]}},{type:"Feature",id:"2206",properties:{name:"白山市",cp:[127.2217,42.0941],childNum:5},geometry:{type:"Polygon",coordinates:["@@Ušl¦kÒÆ°„IlÃ’U¤ôz„¼lJš„U„n‚ÆXVl°@²aÆbVKÄŒXV¯°¥¯ĉ°W„„„L‚¥Ģw@x„bUx°V°zn‚‚b@ÂÈlVÂŽlIÂœ@˜w@m„U@akU°ƒkUôwWƒÈ¯VÂUƒVUā±U›@kÂÈk˜Ñœw@ƒlaÞġƒUÞ£@ƅ‚KnÑĢ¯@W‚aUaVUVkkw@a¯Â@¯™ÂÙƒVXnW@@WkXmK@xkKUb@bW@Uw¯„mmÂb@ÂWKUbmUÂbUaWbƒJĉIVW@I—l±LkšmU™bUm™@ƒnkKWa¯n™@„`Ubma™„ĉL@bƚ—@W`ƒL@n¯‚Xb‚@kb@x™Lƒ„™@V‚kL±™Â™mlUIUÂ¥mL@lÃ…x@_laƒƒ@U—aƒV@kmmƒK„£ƒƒÂLƒƒmKUnÃ…KVbmÂXVlèĉUUbml„ĢŤƒIlŽ¯bǦœl‚@ô¼Ģ„@x°„l¤„n„a„l@x™b"],encodeOffsets:[[129567,43262]]}},{type:"Feature",id:"2205",properties:{name:"通化市",cp:[125.9583,41.8579],childNum:7},geometry:{type:"Polygon",coordinates:["@@ÆlXnÄ xĢ°lÈ°š„K„°kXm‚@¦Vbk„ŤJšnäk„VÞVVkȄb°y„™@w˜k„Ç°a„wƨ@„aÞ„K‚VnaWwXÂWƒ„kôJš_ČºôÂVkƒ»óyV£kуJůlÑkÂ¥V™ša@wƒkƒbƒmk£¯ƒ@wġƒó»Â@›kÈ¥°ak„JÆ£ƒġnkVaÄŠVkçWUnÂUaÆLVmnL„„‚KU™±@—„m@a¯U„bmV¯m@_ƒK™™U™ƒaƒÅ™Wó¹ƒ@UanmWak@@wmI@y™@mk„JVa™@UaƒIkJ@n™@Um±kkxƒm™Ik„ƒbÇm@Ž°bXn„V@Ž°ÈmlÞ¼¯XVº¯Lm„kWWÂXLmVVlknƒ@@lÂnWƙ„VxÂbmšnšm„¯lÃaVÈÂè@¼V„„b™„ÆŽ°ÞUVšJ„„kx›I—xƒƒƒIV¤™ÒXxmn"],encodeOffsets:[[128273,43330]]}},{type:"Feature",id:"2203",properties:{name:"四平市",cp:[124.541,43.4894],childNum:5},geometry:{type:"Polygon",coordinates:["@@Ɇn°W„zlyÞ£mwX@ƾKǬblaÈIƾ¤ôÞĸVÄ xnÂmmVƒ²w‚VnwÆaU_@y„w@wÞxlk„KlwU»È»ŎÅ@mVIUmmÄ•UU@ÂmWXw„Iô‚@bWnnbU`‚šV@Å°ó@wÞW@kÂm@aŎ烙@m°Ñ°Inm±aXaƒU™n@mƑšU¦@šÇŽ¯aU£šaU™ġ¦ÅҙJÅUŻókUÇ@™¥¯ak¯mUVak@@aċçÅaUƒm¦Ã`XbƄ@nÂ`ƒI™xĊÞÅÞml@šUbÂ@Wl™_¯JkšÇUÃÆÅb@n™„llUb¯„±a@ƒ—ƒWÂĉJġĀ¯™Unóšm¤œxôaVnƒxôI@x„V@bmƙ„@lnLmޯޙxVb¯þ"],encodeOffsets:[[126293,45124]]}},{type:"Feature",id:"2204",properties:{name:"è¾½æºå¸‚",cp:[125.343,42.7643],childNum:3},geometry:{type:"Polygon",coordinates:["@@żôŎVšIÆÑĢ¥Vš™bV¤°bÈÂ@™V¥ƒ™Þ£lÇUUUÃlƒÞ£™mÅ£IlƒUa@Â¥nÂlWƒ¯ƒL¯™kÇġ¯ğwWmÃ…k¯UƒVU„„bWlXlmnƒbUx¯xVVknlÂŽUbV„ÇKUb@„™VnbmlnzUº±bÂÂmJUbWÈnèm҄š@ÂX`WL"],encodeOffsets:[[127879,44168]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/liao_ning_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"2102",properties:{name:"大连市",cp:[122.2229,39.4409],childNum:5},geometry:{type:"Polygon",coordinates:["@@‚IÞmVk@wXWÃœbnwlLnU„@‚ÂnLlbXW@a‚wnbl@XL‚aš@ÄŠÂ¥@LULnJ@xVnmV@VXXV@VJkn@VÃœKXXôJlb„xl@„IVbnJVLUbn‚lnVw„JVU@ƒXU‚aUUlwn@°ƒn„VKnV°_VJšwl@nwlV„IXWlIVVnK@IWmkIVaVU@WÈUlmUÂ@U„WUalkXÄ¡Å»@kIƒ»mm™akÂUm›ĉUÅV»²ġVÄ•@aUUØIɃ`ȃ@Âkƒw@ƒUƒmwĉ™@ƒWķÑÂIĉÂÇbÃLkymbÂIƒwÇmÛbmbU„¯ÜõÈkÆVbÅŽxnXVÆnšǪ¦„bš¤Uš™xÃnĉÒmÄŠVȄ¤Èš„bƼ„Ā„„ÆÆބźb„VVbX„‚°²¤"],encodeOffsets:[[124786,41102]]}},{type:"Feature",id:"2113",properties:{name:"æœé˜³å¸‚",cp:[120.0696,41.4899],childNum:6},geometry:{type:"Polygon",coordinates:["@@na@UVI@m„ÑW™kaVÂ¥UI@wl@„aÈbšm@wVašk„@@K@kĪ@a@UUmƒUUalmUÂ@KÇUű¯@±kUKVkUaƒaÂU@Â¥m@@¯k@WLUmkn@mmIkm@amU@wVmkU@Klk@U—m˜aXIWWUL™aULVbƒmk@UUmUk±™_Uym@mbkImaX¯WW™xWKÂzU@WƒkJWwkV™@UÂm@UbVVVVXb@VWX—@WÂŽ@Vkb@V™nUK±aUUlwX™ÇWKknU@mmUkƒLUVƒVUUVƒUaƒw™bkKmwnIĪkJ@nmbƒ`ÂkmVkLWwUm@UUU™K@UmaUa@UUaWKÂ@mUƒÂ¯Wkk¯VmUUŽ„xVXUVmL¯ymXkWUbmXUKƒVknWx¯JVnkLƒl@VVxnxlÄ€VL²WlX„l@bÃVUn@bnlÃœaXblIVl@šš@Ȧ@VmbXV‚@@x„VVnUn@`°@VnXU@K@„VV@VmbnVn@ln@b„xƒ°Ub@bšLV`Ã…nƒ„W@@lUšnnWVU@Vbkl@Xl`XxV„UblÂŽkX@Ž°¦V„UVVbUlkV›@UbVbkLUxmJkXšš@b‚bÂœxVKÆlXX˜bnÂŽnala@ƒUk@U„VVklKVUXKVU°KVan@VUnLšKVL„WVaU_@mmUXa@m˜wXwVkVWXk‚k@›„k@klm@wXKl@UÂ@KVUUUVaUƒV@„alL„xUx@b°°VnnVšxlIXJmx„LUVlV@bnX@Všb„aVx‚@XJ@b‚n@VÂÂŽVXȄl@llX@lU„Vô°°@ބVbn@‚V„k„@VW"],encodeOffsets:[[123919,43262]]}},{type:"Feature",id:"2106",properties:{name:"丹东市",cp:[124.541,40.4242],childNum:4},geometry:{type:"Polygon",coordinates:["@@lzXJ‚U@š²x‚@@Vš„@bUVmKUn„°n@lnVK„„nV@n@VlV„°WbXn@‚VzƒJ@¦@bkb‚bUl@bkbƒJ¯zƒWULWbklV„nb™¦VJ@„„K°U„kl@@W„bVn°@„Všm²U˜nX`„UÃœLXmVXlKVbUVVnUbn˜ƒX@VUL@lUbWxš@²kl`n@VÂlb„@nUVWVLVU@aV@²bl@ÈmšxWX„VÈU„JV„l@„„la„WnX‚KÈkÈ@Va°bÆm„@XV°IVV°UnalƒVUn@UwVU„@@VVJ„I@bl@XK@wWmXU‚UVbkJVXnJVI@mƒknwlKXL@`l@VI@UUaVKÞn„aVm@aÇ£XW„U@aÇUU@mbkKm£™@ÂWW™ƒL@Â@Kk@kl›U—bWKUkUU¯UõÂۃmUUaVU„U@WU_W@kVkJƒ_WKkV@bUL™¯¯ƒ±mk¯ġƒğÑ@UmwƒKUaÂkƒ™ƒa@a„Âm¥ÃÂIUWmk@w™Âmţ—L›KÊbÈ—KWÄ¢klVbƒX@VV‚knÇV@XUVUblJXn@J"],encodeOffsets:[[126372,40967]]}},{type:"Feature",id:"2112",properties:{name:"é“岭市",cp:[124.2773,42.7423],childNum:7},geometry:{type:"Polygon",coordinates:["@@XJm@¯šmXUlÂnVbUJƒU@bV@UJWL@VXLmJVbkXlJXxVL@b@V@n@b@`Vbk@lxknV@VV™V@bUL@bV@@bVK@VXLWLXJ@LV@nbWJ@IUV„x@LVJUXVxVx@VV@@LXJWL@VU@@L@VnL@bVVmVX@@VVInJmbnLWVnVULVVU@VVmÂX@@JVz‚l@„nVVKVXރ@mk_lm„UUWV_nJlUÞÑÞVVUVƒVL„UVJ@I„Vna‚@@KV@XwWknwnKlalU„w„aĉÚwšJl_@aUaƒKUUU@WU@WXUÆ@@UVK@Ân@UnVVšblK@bÂœllb@b„bW@Xbl@UlnLl°°bš¦nKlVnI„V@UWU@WXkƒw@am@nm@aVw@I@KUaVIm±XÑlknJVnVJšaX_VaUaVKmwnkmmn@lU@U@mnašXlKUmUIVmkÂlaUK@UlUVUÂW@U™kVm™a@UUU@JmUU@@bmb—KWV¯XUKm@ka@UVKVk@aUKmLkKUUÃUmbXbÇJ@k@WU_@m™™@klm@UXKVaUI@KWUXaƒÂÇWÂk™aWUkWUL±U@lUÂU@ƒUÂJƒI@V¯JmIm@@aU@Uwƒa™@UV@VkI›V¯aUkƒWkb@bVL„@@VVVUXW@Uaƒ@@b—‚ÃbUVÄ@ŽƒLmUkVUbVllLUV@LššXÂŽWbUXm@U`@„kxlnnJlbnIllšLX„lVlUXmVK„n‚V@L"],encodeOffsets:[[126720,43572]]}},{type:"Feature",id:"2101",properties:{name:"沈阳市",cp:[123.1238,42.1216],childNum:5},geometry:{type:"Polygon",coordinates:["@@ȚĊÜ°„b„L‚lÞxUbUn±‚@ÈnVÆL@xnLšlUVƒbƒxkImJkn@V±LUxkV@bšbšKVKnzVl@L°@Va„xÞUlbôxVVÂœ@@V±bnÂŽ@ÂllXL˜ŽöXĶŽnal@nkVJVI@aU@@aVK@ašUUUU@lmkwl@Ua@_@a@m@U@aUKWwkIlWUanIWK@UXKVIU@@a„VVIUa‚mVknW°™n@WI@KÂUƒmULWnkVkUWĪKkkmJkamIkmlw@ƒV_n@VWXaW™™@KVUkKUkValUnV„K@ÂރVUÞa˜Â@a„@VbX@VWUU@Uƒ@UK@ala@IkKmUUa@U@ƒVƒkk™WVwU_@KÃœUXbl@VÂ¥XUVmƒÂƒƒXa‚kŃlÂUUkIm`UIUJW@UIÂKmkm@ÂUUJƒImmU@ƒVUXU`mIUbUK@LƒJUU™l@Xƒ@UbƒJ™kU@ƒŽn„m@Uam@@ĪaUÂmLÂKƒwĪÂmWXUK@kUaÇa@JUIUa@aƒKVUƒUXmƒÂUy™_@lmbkLUKWLX`‚n@bVL@JXL„‚WX@Vnb@Vm@UbnVmL@V@x@LUbVV@V@LƒUVlÂ@mb¯U@xU@UVVV@X@VVblJ@bn„VKUn„x@llnÂL±¤™b@Âk`VXÆK@„kV@¼kl@bWIUl@VmLnbm@@JXXmb"],encodeOffsets:[[125359,43139]]}},{type:"Feature",id:"2104",properties:{name:"抚顺市",cp:[124.585,41.8579],childNum:4},geometry:{type:"Polygon",coordinates:["@@„XVl°bÂœUlJ@UVUš@„bVxV@@bn@nJ°I@U„J‚I„VV@VÂ@k²VVKlXXVšb‚lÈX„ŽWbXV@LVJUbWL@Vkn@lšš@nV`@X@lÈIWanaÞVVVlLnKVL@bUlUL@Vlbn@VL°WXU˜Lna@aV@nV@IVV@VšbUnšl@V‚XnKVa@U„UnyWkXaƒaVk@ašašbnm@_WKXmWanU@alaU—l@XJVLVxX@˜wnKnVlwƒƒ™@V_@a¯¥@UkKWUÂaUU‚anK@IƒaUÂ@WUaVw@klUVyUUVUUÇ@Iôbša@mnUma@kXa@UWak@Wa—l@a›Â@WÂUƒLmUÂ@U`mIUU™`mUk@@UUK±nkJƒbUam@kwm@@a@UU@Ua@Â@K@ƒVK@kmKU_UKƒUUaĉWmkkL@`™LƒnmlkLkbmK@k™@Ulmb@b™„@Ž„xUVƒIUlmVXXƒxm@™JUUk@WUk@ƒakx±@¯x¯Umb™KUUVmUU¯UmVVn™WkÂƄÂlWb„„„ŽUnWVU¦k@WaÛV@LV`UxšXllU„@„@VVbnVlL@J"],encodeOffsets:[[126754,42992]]}},{type:"Feature",id:"2114",properties:{name:"葫芦岛市",cp:[120.1575,40.578],childNum:4},geometry:{type:"Polygon",coordinates:["@@ll°X„ŽnV‚@XLVb@VVbnb@VšLVV@VVnXxlKnU‚l„_na@mlI„šmJnxlLša„xVbU„VV„UVU„KVlnnV@lmXLšÈWÂŽkxVV²bVLšm@Ula@UX˜@XW@UWaUUUUVan@V‚š@lUXxlIX„V@‚yXLšw‚ŽXXW°nblJnan@Vzš`l²nVVVl@„nUaVKšbVKnXVaUaVUšyšnXK@kVK‚@XÂ@m@m‚LXa„LWƒU¯„w@™ƒa@UVw„¥°™ó¯¯y¯ÂƒÂUǯ»›w¯Iƒm—¯Ç™UUl™¯»ţKċÑţÂÄ·m¯w@mU_ómk¼VnU`±IkbVlƒnnÂŽU¼±Lk`@X™Wl¦UbmVUxkXVlkbllU„Vb@bkVmx@XVV@JÂb±aULkKWXkWmX¯aUJmIkVm@ƒxU@n„"],encodeOffsets:[[122097,41575]]}},{type:"Feature",id:"2109",properties:{name:"阜新市",cp:[122.0032,42.2699],childNum:4},geometry:{type:"Polygon",coordinates:["@@šXnb°lš„VlnXVJ„LlVnl@zÆxnK@b„blKVLn@@V„aVLVK@L@Vl@XVVInVVKVwlUXwlKšL„ššVVb@aV@X„lUXbVW@n„lWnXKV@@V@XUVVLUVV@@bVVV@@ln@VbVUXV‚I„xVanJ@UšIVWšL@UV@@¤V@nInw˜W„k„lnIVx‚lnzUVÇJ¦VVÃœLĸUnW@aV_šWÄŠXXa‚Knkl@nm™L™a@alUVw²K@UlmnIlJ„w„aVU™kmK@wÃ…KmU@DzÂVmVaÃwÂkƒKƒaÛ¯șĉķ¥ğ¥ƒ@kUWkÆīÃ@@akU„K@KWIUm¯nƒU¯JmwUVmIkJÇLÂm@™UImJUU@aW@U@@nUb™JƒaƒbXVWnÂ@UVmX@V@b„š@l@Lƒ@™lUb@x™nÇaƒbk@@xVJU¦lbXšƒÒ@nUJ@Vmb"],encodeOffsets:[[123919,43262]]}},{type:"Feature",id:"2107",properties:{name:"锦州市",cp:[121.6626,41.4294],childNum:5},geometry:{type:"Polygon",coordinates:["@@nJ@nlmVnXKl@@°n@@¦‚V„bVbUlVL²l°@ƲÈV@LV‚knVb„VVnnWVU‚@XmWU„a„bšIVa@mV@X@@bVVnIVJ@š‚nÈKlInJVUnx°I„V°mVnXJ@LƒLlV@b„@ބÆĬXllV„@Ġ¦ĸ¦naWW@In@manK@UVkXJ@alk@»lU@āLUWl_@ša²£‚Kkm@kƒwVmULmƒ@akIUa@U@WUUVU™aÃ@ğ›wkƒƒmĉ£UWƒ@@bÇL@m—a@_mKƒlƒXUwÂKƒLţÓ@UWw@K@U„I@m™U@UV¥„@°UnJ°@@_™KUwƒW@UnaWÂUmmI@m™ķwUaÇLóVĵwÙUUW™¯šƒ¦Ux@V„b@šƒxV°X„ƒKWbÂK@n@nW‚Â@UL@lWL™m™zUVVbUbmWXXWJ—b˜n@Vkl@LlVUn@xnV@bln"],encodeOffsets:[[123694,42391]]}},{type:"Feature",id:"2103",properties:{name:"éžå±±å¸‚",cp:[123.0798,40.6055],childNum:4},geometry:{type:"Polygon",coordinates:["@@l„œxĠŽÞ@šbV@@w°Vna‚@Uk„V@K@UUUVa@K@w@UnKmUVan@@Uma@UXWƒÂWK@IUK@aÂmW_XKVLlKna@kmKVak@VU„@VmšU@anIÆan@‚a„šUVnb@blLV`ÞLlU„bna‚Kn@naVU@¥°IVK@anUUKVaƒUVak™@mJƒkXĪUVwkƒVUUa°U@WƒÂ@WlkXWlIXUlJlaÂœx‚IVVXLšll@nLV@lLXl„KÄŠzš¥maUƒlkXaVK„X°y„Ila@aVkÂala@a@¥„IUy@ÂWmXaƒ¯kU@U@mmUƒƒULkmm@ƒ¯VmnLVU@a™ƒ@UÂ@±w@™ÂVWIkymLUUkJWXƒJkUmxk@™xUI¯`mUULmƒ¯„m@kxVVÂbWV@„UVƒIUx@bkšVšVVšxUbVV@V@zšJVXU‚lnk@@lkLƒlƒLUU±Jkšm@UIUVƒLUVU@™K@UƒnnV@l@Ll„ƒaUJ@zn`@nWlƒIUVUUUV±Ln‚@nmL@VUVkLVlUxVLVlÃ…Xma™@@akLmWUX@JUnVJVkXJ@X@`WX„VUVUIlb„W@bVUVL@`Un@¦U`@bUV@z@Jm@@XV`„LUL¯J@IVKmKÃ…I@J™nWVnLnšVxV¤™z@bmV@VUV@bUL"],encodeOffsets:[[125123,42447]]}},{type:"Feature",id:"2105",properties:{name:"本溪市",cp:[124.1455,41.1987],childNum:3},geometry:{type:"Polygon",coordinates:["@@lb@Vn„lnVVUb@šVJ@nnJ@bmXUx@xVbkbkÂŽWLUxnl@Ul@„xWx@nUV@¼Ull„knkK@bmbnl‚LVJX@VIVJn_lJVVšXUmnU°VVVUnVVšLna°V°w²@lw„bl@XVl@VVšIn@„wWWnUVk„JVUƒw@šƒ@anaVkš@@lnLlalKnk„mšK@_lKnlÄŠXVb„VVLV`nL@lUL@„@L@‚VbV@@V@bn@lxn@Vb„alI²mVL@Vl@nVš_VVnJV_‚@nV„K‚V@Xœ‚@b˜kXbl@XblylUUkš™@ÂXa@UVIlK@UUWVU„Llm@UUUnKWU@K@UXm„XVa@U°KVUUWUk@ašUVKkaWkƒKUknaWa@U—Â@Âm@mÂk@ƒaUJk@@_WKkLmx„l@nUJmIUWlIUaÂVWVXn@xWLk@@aƒJUI@Uƒ@UVVxm@UVk„mb¯VUU¯JWUƒ@Ã…n¯aUbÇ@ÇlÂLmWƒXkbƒƒk@UƒƒIÇVƒUXW™wÇnk@±aU@@bUVUKUXmVƒ@kaUÂm@k_±l™@XwVa@kVK@U„Wm—VaUmVUUakLUWWnÛKƒVW_—m±V™nƒU¯@Umƒa@Xk@ƒl¯V"],encodeOffsets:[[126552,41839]]}},{type:"Feature",id:"2108",properties:{name:"è¥å£å¸‚",cp:[122.4316,40.4297],childNum:4},geometry:{type:"Polygon",coordinates:["@@ĊĖÆÂn¤„„°Ċ¯ŎWšô„@xXb‚wnKl@nX@VUVƒKmL@VU@UxÄ@Vlb„x„U@VUb@b‚kÂœ`‚IUlVUn„V@@UV@@JnXlK@bš@nbÆWUkUKVwUklKVU@UnK@mm²KVUVVVU„JXk@mm_@yVI„bkƒ@K@kmU„m@VšLV@VU„KVUVJn@l™²IVV„K„klK@kl@kmVÂUW™I@y@UUUVa™wUUU™l™@akmmÂVaUKmIUaƒJk@ƒwkaóIWWÛL@UlmUIU@WW@UnUUm@wmIVK@Kĉ¦™@ÂbWKk@maÂx@bWXkamKƒ@mVkKmxÛaWX@xUlÃnÂJ"],encodeOffsets:[[124786,41102]]}},{type:"Feature",id:"2110",properties:{name:"辽阳市",cp:[123.4094,41.1383],childNum:5},geometry:{type:"Polygon",coordinates:["@@š`Vz„‚Wn„VUV„L@bVbVJ@IÈbVb@lVLXW‚n„š„x‚LnKVŽšb@„n@Vbn@mƒ„ÂV@šl„IVa„@@WškVV„I@KVLVanJV_VW„UV@nn„JVI‚Vn@na@alLlmkƒVk@»VU@mXwƒwk@@VmkVwXKlÂlaUa@wVwnW@amI@mUI@™VaUUkmmƒ@UkaƒL@ƒUIĉyƒLWkkKU@mKk@™kWKUUÂJ›wkbkIWVkJWXkl@X„‚@X¯VVbUVl„UxšVW„„lnIš@l‚Ub„VUbVLmV@bUL¯J@¦UVmbm@ÂLmbƒakVÃKU_kK@amaVUĪÂbm@Ã…bmJ@b™VUnƒ@UVl@UbnL"],encodeOffsets:[[125562,42194]]}},{type:"Feature",id:"2111",properties:{name:"盘锦市",cp:[121.9482,41.0449],childNum:3},geometry:{type:"Polygon",coordinates:["@@Vbĸx‚š@nnJVnXÂŽmb@V„XVxšL@`¯@mI¯Vƒ@U¦@VšV@nƒJ@V@LXx@VŤÔ„K‚LVx„W„knL@`˜b@nÈK@a„@VXĊ¤„nVK@aVU@UnU@ašyU£Uwm™mKXUšm@IÆJnLUL@J°IVKƒKU_@Wn@@I@yVU@aV_@Â¥Vm@_UKUV@aƒXkaVJVUƒUXW@_@WWIUlUIVm@IVW@IU@@VU@mƒUVVkÂJ›_Âl@aVa@UƒVƒwka@UރVwV@@UnK„LVU@UmWk@mLÂxWa@wóƒUVUIÇÆĉ¦¯¦¯xÊŸJ"],encodeOffsets:[[124392,41822]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/nei_meng_gu_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"1507",properties:{name:"呼伦è´å°”市",cp:[120.8057,50.2185],childNum:13},geometry:{type:"Polygon",coordinates:["@@„m@Åkƒ™Žƒklƒôƒ@£kJ°ý™ɅķÑó¤ğLĉÅlÇğÅW¯¯›™ƥóÿlwkţÈéÃƛó™°ÞÅxV¤ĉĖWƒ¯lȭţυ̃ɱÿķƅˋğɱřÃţϙÈƧĊţ@¯kWKUKm¹Å@Ä·JU@ƧÑƧ„Å¥˹Ɔ@L@„Þ‚VLnš@VÅÄŒWJX¦@JÅ»bU@ţÞmVU@ÈýóbkWWLƒƒÅ™¯UWÄ¡Âkmóƒ±UŹôV¼ƽ¼ƒł̥ĖƽǬʉxĉŽŻÂÈ—KΕ̛ʵƨʟÞ˹»ƧÂţ»ǕÅ˷Ȍ±ȚʊĠUɾɜɨmÜ֞߼˸ƅȂ¯ǖKˢğÈÒǔnƾŎÅ‚@šĊbôô̼ƒ@ĊôĊŽÞĀ™xšĖƧL±ŽœŽ‚Uš°U„°ĬƒČ°ÜƒêɴȂVł°@ƒ„nxŎèƒbȄÞȌ΀ǸlŽ²IlxÄŠl²ÒmšôĖ™Èl„ĵºm„ÈêVþ„xɛČʉÇĵVmš„ÒƒÈɆôÆŰǀĊ°ÆǬĮƾb„yÄŠ@ĠšƒXǀċm»ôw°Ûk¥Çm¯ç™kkÇǫţǕéX_ĶWÇ–Ä«ÅŽaÆĵĸÂÄŠ@ȚȘ‚™ĊLĢĉ„VÆĉʊÂÇĕóaU¥šĉ°mkÅ°ġUÂÄ Å™k°mƒÑČÿ˜ÛƒWĸ£ʠšÆxÈÞŎÂÞ»ʈ²ĊÇČalÒ°ÂŤ±ĸz„ŽĊKȲm¤ŎÂ@Ò°¼nyÈ‚UźīǖƳÈē°@šÃĶƒ@ƒÈÂkÂl¥Ççkxk™›JXÂǃUÂÃ…@˜£k»„óƿīÛ@lÂÃ…Jl¥óý@¯ƽġÆÂÃ…an™ċ™°é¯¹"],encodeOffsets:[[128194,51014]]}},{type:"Feature",id:"1529",properties:{name:"阿拉善盟",cp:[102.019,40.1001],childNum:3},geometry:{type:"Polygon",coordinates:["@@™ÆnǟƨʫšŹɆÿ°¯ÆV²Âˢ™żÿ@ÃÆÅȰ¯ȀƳĉó™™@ÄŸkyš¹@īš›ƒwl£Źƒƒ¯Ŧé@™ÇÂÇxŋĉƩUUŃÅL™Ç™ĵóÃnƒóç@™™ó@ġƒƱ„¥ƒç™WUçÆŃÂ@é—çťK™çȭVһƽ̻aW¥ȣʵNJǓƲɳޗǔlÂżÞmĠóĬȂÂɲȮ@ÈĢŮźÔnĶŻǠšŎȭœгŃċóȭţΗÆƑÞƧÅΫóȘǫɱÈÄ¡lÛkÇ°ÈÈnšõl¯ô„ÞɛÃkĢóÂWĊ„zÇɼÊ@ÇÈķlUČÅÜķnέƒǓKȮŎŎb°ĢǀŌ@ȼôĬmÄ ÄŸÅ°ÅĖƧbЇƧÅx@ķó£Ål±ĀƧīXÃġƃêĉK°Ãʇƅ@ΌʉżÅÒϱʈ@Â˺ƾ֛।࡬ţશóЈèʞUš¤Ò_޸Ƒʠɽ̦ÃÉœL׈ɛϜóȂJϚÈ@ǟͪaÞ»Ȯź"],encodeOffsets:[[107764,42750]]}},{type:"Feature",id:"1525",properties:{name:"锡林郭勒盟",cp:[115.6421,44.176],childNum:12},geometry:{type:"Polygon",coordinates:["@@ʶĬĊIȘƨƨŽ@ĬÛĢșŤĉĬƒĀóšU‚ÈŚÜènŦÆȤȄłϰUƨťƾÑ܆ğɲƜǔÂÈèʈƲĊƞƒšɆ¯̼V˺Ò˺ȂŤVĢêU܃x„Āˌ˘ƨ„Æ°ѢmÞżU¼ÆlÅŽ@ĊçŎnÈÒͪŎźƒĸU°lżwUb°°°Vš£ÞlĠĉĊLÞÂɆnźÂބn¦ĊaȂīġŃ¯Iĉůl»kƒ„™Çý„¥Ŏ¯ƒén£ġљÃÈ­xƒÇ™@Åçķ»óƱŎ¥™çWÿÂmlÂóa£Çb™yVÅČÇV»ÃÂU¯™KĉýǕċţnġ¯ÂȂÂÅUm»ğƒљwÆbċÇŎċwˋÈÛÿʉÑ°Åkw@óÇ»ĉw™¥VÑŹU™mW»ğÂğljVÿŤÅźī@ř¯ğnõÆ@ÞÅnÅVljóJƒwĊÑkÄ•Ãw¯nkÂ¥Åaó¦ĉƒV¦Å`ğуÑÃ@mwn¯m±@óƒÛKËÆǓ±UšÙa¯lƒÂÅšșk„èƒĬގÂn@ŤġŰk°ċx@œĉ`Ƨĕ°Â@ÂţÒĉwmÂĉ@ƒƒnƒƒa„™¥ķnƒÞĉVóÆókĉŽķ@ÃkƧƧÛaƒ°Ç@ÃÈU˜óbü@„ÛÒV°™@V¼ˋL™ÞɅŤŹǠVÞȗŤÇĖŚÅbÈÆœ"],encodeOffsets:[[113817,44421]]}},{type:"Feature",id:"1506",properties:{name:"鄂尔多斯市",cp:[108.9734,39.2487],childNum:8},geometry:{type:"Polygon",coordinates:["@@ĶL²ĬVÅ‚Æ‘kkl@Ȏ™ŘWńÈĬȗ¯™ºlz@ĠššĊôŦô„ÒĠ°kÞܚ™n@¤„UĸèĸbŌÈXŽĸLlÃ’Ä¢xɲÂƤÈÛƾJÈðUšÅĶ»²VW¯ĸJôšbk‚V@ôÂlbnÂÄŠyÈzVÂôašb@Âĸ‚ÞUl°yǬ²Ǭm°ššk„±lbn°@È»˜JX„VŎÑÆJ@k„LšƒÆl²™Ġ²ʊůĊġ‚řóƛÞÅ@m„ƒmLUÿóĉƧ@™»ÂL@„›`ČĸmšȗÑţů±ĉğl¯Ā™wǎƒçƧŤÛI@±ÜĉǓçÅ°Uwô™ǫůķƳř±bÅ£™ÓÇwnÑó@Èƽ@™ƒÇƧĢón»ÅĕóĊ¯b„Å™™VȯÅImƒÅKU„™LǓ±Ãxċ—ŋ˜V±Āȗ°™„Źl±šÛ@WÃ’ÈŚŹÂÐŚÅèŌô„¼°ȰɞȂVÄŠ"],encodeOffsets:[[109542,39983]]}},{type:"Feature",id:"1504",properties:{name:"赤峰市",cp:[118.6743,43.2642],childNum:10},geometry:{type:"Polygon",coordinates:["@@ɲÅĢljĊwƾÅÞĭ°_ŎŃźȹƒUČÿl»¯ÂôķVÿǬƽ™ÂɅġÅÑǫ»ÌÂÊŸÈ£U™¯wVWÃÂÈġW»Þ¹mÃɛŎÿŎÅͩůV¹Â›Å™éċ™óŹÅVVĢǩʈ@Ä–Ä‹@ķšÛšV°¯xÇÅţ¥™»°Ûô™ĉʟ„¥WýČ¥™w‚ç»±mnÅķ¥ˋVƒbUÒġ»ÅxÄŸLƧ™ƒbWÄ–Ã…xš¦U°ÃVóŰlô²@š¥ÜÞÛô„V@²±`š¦™„™¯Ã@„ŽÅ„VÒżôš™¤V²ŹĬÇĊƑƒţxƒç¯Lk»ʟlƽýmÅ‚ÃÆÆ@mö°Ġ@ŚŹĬţÆUĀĠNJĠŽX¼šnźVUҚ¦Ċxȼ@ôlx¯łʊÒÜĀˌÇČxÆÂČÈÆašx„ÒĠŽn¼ŎVÈ‚¼Ģ°ŤmǖČĊþšLV°ÞŽU¼ċÈUƚzÈa‚¤ôbkŽ‚nXĀšè"],encodeOffsets:[[122232,46328]]}},{type:"Feature",id:"1508",properties:{name:"巴彦淖尔市",cp:[107.5562,41.3196],childNum:7},geometry:{type:"Polygon",coordinates:["@@²@Ζǀݴʶհĸ„˜ƒ¦Ķ™̒Uˌ¼ӾÇƾ¼̨UÞĉ˜Ƨ—éûƒĕĉ—ÆÈÂœÅǪakó‚ó¯a@™ôţ™aV¯Þ¯°@²él¥ĵğťwÅxó¯k±š—Vó@™aóbUÂÇyĉzmÂŽkaóŽU@l™aó‚ķIX°±Uĵ¼™Æ¯VÇÞƽIÇÜÅ£ɱŽġwkÑķKWÂŋÇķaķçƒV@£šmۙlÃğ¯ƒÑťóǿƴȯ°Åł@ÞŻĀˡš±ŽÅU¯°ɅĀ™źƧʬmǠšÆ"],encodeOffsets:[[107764,42750]]}},{type:"Feature",id:"1505",properties:{name:"通辽市",cp:[121.4758,43.9673],childNum:8},geometry:{type:"Polygon",coordinates:["@@ôƲĸ¼Æèš@„ÈȮwƾ»ʠÂĢ¥VÂÆ@²¥@»Ŏњ¯ĊJŤ£k»ÆÇX¯̼Åšī°aX£ôƒƾÈź¥„ƒ™aôÂŤ™ĢL°ƒĸ@Ȯ¼ÈÒʈŚôVXůÆaĠƛÈKƒķšĉôÿ@ğÈĉ™»ÇVn™ĉV›wXÂĠðšČÿĸwVƒ™¯¯ǵ±™ĉ‚ǫ™ÅÅm»²ÂŻ±ƽIm¥ţÈķ@¯šƧJV»ÞUÃç¯UġºU£ţŽóaÃ…Ã…lƒƒ™Ƨī¯K¯ÞÃğLÌ‘Èƽ@ÅÅŽÅĀƑɜnÞúX¼ÇĢގUX°xVšʠȤÌÂǬ¼ÆÒɆĢšŽǫƾUĀóĸ°‚k¼ċĀƑVŹȺÅń¯`ÃĮƽŎĉxġNJɱłÅ¦"],encodeOffsets:[[122097,46379]]}},{type:"Feature",id:"1509",properties:{name:"乌兰察布市",cp:[112.5769,41.77],childNum:11},geometry:{type:"Polygon",coordinates:["@@ʠǠÞĸɲȺƒÒȂƛŎaƙÈĕȘţUÃźǟɆţšÃËŒKU»š@U¯ÜÑ@ƒÞ»ôaV—ÞÇÈ@„¯ÜbƨƨÞlĸ@ÄŠÂôlôÅĊU„Ãĸmš¦ƒŽ„bm„„„Ċ@n‚ĊxŤÑ@¯‚ƨĖĊ_@›Čwl¯™ƒȭL›Ã„»ƽ¯ķů„Ǔ@ÇǓbċ™ÅÅÆwÂÿĠÇU£óaƒ¥¯aŎğĠţkw°»¯ůlÃĵkǻðɱƧǫaóôɱ»Çk¯ŃóƒʇÅŻ›ĉNJŻĢ„Ž¯ÒÈUl°ƒx°n„Ò™Ĭón™Ċğ°ÇŚĉ¦ʵVƒ°°ĬÛżÇJÈńʇʹó˂ƽŎ›Æţ¦"],encodeOffsets:[[112984,43763]]}},{type:"Feature",id:"1522",properties:{name:"兴安盟",cp:[121.3879,46.1426],childNum:6},geometry:{type:"Polygon",coordinates:["@@ÆXnlŎ°@LVLĠþœxÄŠUȮĊnU„ÂÄ ÂV@żaW¯XIŎġƒ¥ÃÂ@K@w@K@I˺ŻŎ¦ƨƒƨÒŎIÆ@X@VºnX°lÅŽ@ƾĉˤƒȘǷȘÑÃÚÂÞbVţĸÿŤxÈĖÆÂŽÂêÇKnÂĸ¥ô@›ķÞUnÃ’l@UŚaƒīˋƒ¯ÑƧx@±kXÅ™ÆÆÛéV™ˋ»lůĉ„ÅÇÓǫޗĖġV@Âğ»›°ĵ„ÇÞǓ¼¯m˜ÛÅŃĉÂĠÇƾb²çƒ™šéż¯VƒƒğÞml»ÅÑV痻V¯™¯šĕÆU¯y°k¯¯V»ôDŽѰa@Źk™ġKţšóŽšbƒ„Ź¦ƽȂó„W¤¯b™Ĭ̻ŎW°ÅÈl¼ţ¤ĉI™°ÅÃ’@¼±¦Å@UŽġ¦ʟŽƽ¼šÞĢÒm¤„êÅ°ƒ¦Èþƒšl„k¼ĊŰ°JĢńÈĬ„°ƒżn‚ÇbV„ü@¼óĸţ¤@°Ånšl"],encodeOffsets:[[122412,48482]]}},{type:"Feature",id:"1502",properties:{name:"包头市",cp:[110.3467,41.4899],childNum:5},geometry:{type:"Polygon",coordinates:["@@źxżĀǔÆǬVȘĀŤ¥œÅƾÅôËʈͳȂŃÈIÜŻ¯ī„¯Åm™¯ɱĖ¯ƒķÒÃIÃȁV™ƒlÅôфġ™ğVmÞnnƒWçkWÃœÂXÆÆwU»Șĕš£ĉÑ𱱚Åk™„ƒK@lÃ…IÅ҃UW‚—IǼ¯@m‚kaƒ²™l¯™ǫnǫ±¯zkÂŽÃVÄ·ÂUô™˜l²ô°ŎwŦxĶĠk¦±ê¯@ðU°šbóŤ@š°bÂôlôǩb›ŎÆȎĊ˜„ĖÞ¼˜ê—ƨÃÄŠ"],encodeOffsets:[[112017,43465]]}},{type:"Feature",id:"1501",
+properties:{name:"呼和浩特市",cp:[111.4124,40.4901],childNum:6},geometry:{type:"Polygon",coordinates:["@@ʶUĊ¥ÈřĠ¯šĉômšīƒÑ¯m„wk¯ÇV°ÑƒÂżġĊljǓɱţǓ›ÆóX¯ƒɛÒóa@nÃÆôƜÂŚĉĢʉŰĊҙ¤ȗĖV¼ÅxWƞۂlXXèm„ÃmUnšĠƒĢóÒkƚ„ÆUÞ¼ÞJĸÑ°„ɲĕš°Ŏn"],encodeOffsets:[[114098,42312]]}},{type:"Feature",id:"1503",properties:{name:"乌海市",cp:[106.886,39.4739],childNum:1},geometry:{type:"Polygon",coordinates:["@@Ș°ÇīXњŗ@ÈlkÆ’lUűīĵKżVŽÇôXĸ¯Ž@šťê„°ź„k¤„x™œ@Ĭ"],encodeOffsets:[[109317,40799]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/ning_xia_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"6403",properties:{name:"å´å¿ å¸‚",cp:[106.853,37.3755],childNum:4},geometry:{type:"Polygon",coordinates:["@@nLV‚@šVLšaÞbn@@l˜š@bUÂVlUV„zVx™¤kÞVèšXnš‚@nm°a@UƒÑ„@VÂŽXnV@Va„UšŽVKUUU@@U‚@@KVa@U²@‚wXkWÂnk„±lLnU@UmmVKnIVWnI@ÂUK›@UK@Â@UVKXkmWÂLWUXmlkVwUyVa@w„w@aVI„K@aVÂÈw„KlLVV@LnV„VVnU‚ܲ°WÈIUÆ@nÞ¼‚‚@¦™@UÞUVW@UxUxVn„b„K‚b¯ÞU`VbǬ™V@XXÆVVl°InmnUôƒ°¯‚anam£œWVX‚KXmškôaVU@ƒVak@@wmaƒn@K@UÛUWKXUƒÇƒ@UI™b@alW@akLUKV@@Ukw±Iš›nL@kmwkWmk@JUIƒůVmnÂnU@m@UƒK„ÂVKlkUwkƒƒnVÂUKmbkI±š—KƒkmVkKƒb@U@aƒVkUmn™`kIlaUK@UUKmbUIÚUa@mUa@aƒ„m@UUULUK@bmKkbWI@WXwlkXƒWa@k@ÂkKƒLVkkK@L@JUVmzUKlwUUnW˜£XVlKUwVU@aXI@aWaUw@W@_nam@¯‚UkWVkUWaU@nwmJkUVÂkWVUmUkJ@ImbUaƒ@@WÃ…_mJknmak@@mƒXƒaUV@„ƒxUšƒ„@‚ƒ„@VUnkVƒ@Vn@`ULUbWLXVW@kbUJ@XW`Â@ƒnÃ…Ä–WJƒ@—Âm°@xƒxšbnÂUa‚w²lƒÞ°xŤIVVULۂWbšbkVVXÆ`UbVL„@kx°LlV@Vœ„WbƒJÂn@bl¤ULV„°@lmL@ƒƒ£U@@aUwmKULVxUVVx@„™@kU™@mK¯LÇa¯@"],encodeOffsets:[[108124,38605]]}},{type:"Feature",id:"6405",properties:{name:"中å«å¸‚",cp:[105.4028,36.9525],childNum:3},geometry:{type:"Polygon",coordinates:["@@°@Èb°KnLš@lVš@@ƒUwVUUwVKnLVx@bV@„¤@„nK@k‚¯UƒVKk£@a‚m„IXa›ƒ@UkU¯Klwƒ@UKVaÃ…_UWlU™aXaÃœÂVKUUÅ£J¯w„ñkÂxVbmŽ™a„w@wn¯˜Â„@XIÆĕ„m‚@X_@WVIlaX@WUXKVaVK@_Um„@lUVm@U„ƒ@„ƒV™„w@ƒVUÛwm@@W@ImKUkU@Ua‚aXƒ@wWaUKkw@UVaUamLU™nk@»±`¯@k—W@Ua™ykbƒI„„@VWJkLWUkJƒwU@ƒn¤mL¯wm@Umƒ²XVWbnV@bmxƒVkxUblLUV@ÂkVWKU¼ƒŽkUƒ@mn@JnV@bUnmJUn@„k‚@XlxšLVVnKlLVV@š@LkKULVbk`WL@lkXW@kVƒ@UÞUlÇX™lkaUbmV¯@@L@šƒV@bkb@xƒlW„—bƒbW@—±@UJ@IU@mVk„VxV@@l„IllÂœn@Vm@ƒVUbl„@JÂLmKÛXmVkU›KULU`@LĉwƒKUX„lVUl@Vb„JX¦̼bÞxÅŽxɜĖĠ„Ŏaô@"],encodeOffsets:[[108124,38605]]}},{type:"Feature",id:"6404",properties:{name:"固原市",cp:[106.1389,35.9363],childNum:6},geometry:{type:"MultiPolygon",coordinates:[["@@Vnn@°xnK‚£„mV@„xlIXVlKXI@Uƒƒ„JlašzVbX@l˜°@²_@¼mlVšnKVbUb@VlxVLXb@xW„ÂbVbV@VlnL@J@Xn@Ãœx„b„W@nl@nblmnIÆ`@X„@Vbna@aVUUWVkƒ@kbWakbU@VwšW@_l@nmn@@alVlk@UkmVak@@a‚UXaƒL@¯@KVa@aÂxWI@KnkVaVJn_lJ@„X@‚m@nVanUVb@mXLlJ„ÂVWnLla„VVaVX@KXVVkVKlknKVa@aVU@KXb@klJUknUmƒ@K@_UW@alIUamaU¯kJma@IUK@U„@@UW@@aXLVƒVJVaXIƒKlaUkUV@ambUÂUJkIWJ@wUI™V@JU@UwV@@Um@™nU`@UkUmVUxWUUV@aÃ…b@aWXkKUUƒUUaWK@wnm@IVU@aXwm@UmVaUalk@anKUwlƒUwlÂkK@wmaƒUkmmIk@VmkUUbW@UVUnW@kV@xkVmbVnU‚™@UbUV@a›k@kkW@„kLW¤@„nV@VU@W_UV™UU`VLUV@IUVõVULU@UUUJ@wmkUJ@šWI@l@bkKkbVVƒbVbUL@UUJ@Vm@@L@xÂbVVVLVlVwX@Vb@bmUkbk@@JWIUVÃ…w@Km@UkWKXxWLÃ…@UVUnWK@xkVW„@KULÂwWVXVWzXVVKVXkV›V@VUbV@U„VV@š@LXxVL@V„b‚Ž„LnKVLVxXVmb@l"],["@@@J@aƒU@LWK¯UUxVVn@Ġ„„LUÂW@UbUUUa@KUX"]],encodeOffsets:[[[108023,37052]],[[108541,36299]]]}},{type:"Feature",id:"6401",properties:{name:"银å·å¸‚",cp:[106.3586,38.1775],childNum:4},geometry:{type:"Polygon",coordinates:["@@šUšwVK@UVWÞUšbšw„V@knV˜@@KU_VK@K„ƒn@W_XWlL@Vn@ÄŠw@UlaÂœ@WanamÄ«@aƒ»ŋó@aÆÅɲÿUaV_°ÃÂaƒLƒaUmVwVwX@VUVÚ@@Â¥ÂÂû@mVÅÇJ¯XÛ±VÂUmƒUmU@KUUkKƒLÇxUÂŽ@bƒLUJ@bƒx@xUbVzUxklWnXV‚KnXWlUL@V@ÂŽVLÂœ@VL@ÂŽmJUXmJULnn@VmVkKƒ²mlXÂWlÂx±@@VUb@LÂ@@VV@VVUL™ÂƒVUbU@WmUƒ@„Ò@V¯bmnÂ@VŽƒ„@lVnUšnVWÂŽXÂVl@¦VVUn@x‚š@‚XL@¦‚lXxš„Vb"],encodeOffsets:[[108563,39803]]}},{type:"Feature",id:"6402",properties:{name:"石嘴山市",cp:[106.4795,39.0015],childNum:2},geometry:{type:"Polygon",coordinates:["@@U¯ķó±ÇÛ¯™ķmbXb›@kb@Vĉxm@@UkKWXX`m@ƒ„@LULV`@L—@mU@lƒU™x™aÃVUX@VUL™x™VkLWVšš@J„nVLXVlÂŽUV@zl‚VL@V@b„„n@lU²WVLlLVbUÂŽVxUx@xÇ€L˜xôҜk‚K²ŽVa‚U@wXa@ÂW™ÈĉUa@‚bÈk„m@¯"],encodeOffsets:[[109542,39938]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/qing_hai_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"6328",properties:{name:"海西蒙å¤æ—è—æ—自治州",cp:[94.9768,37.1118],childNum:7},geometry:{type:"MultiPolygon",coordinates:[["@@„ÂV£°Âš@laÂœXô±źwš™ô@„UlƒżaÃœÂn™Kƒw@U„aƒ™ša²L‚mÈLƚÈxlaUa„wÞmÃœbÞUšÂnJ°a„kôƒ‚ÑkwÃVÄŸwÇ@ÃkkV¯¥@Âò„»„nŤ¥XImw@mVwša@ÂÃ…w™ÂmLkaW—wĴl»kçƒó„»@ƒWÑĉŽğÂ@ĉ„™‚Ń„ÂUwóřVómÂĵ»™™Ã@VǕ¯kšÃÄŠÃ…k™°ÓUklkU±šI„ÇÞkı@šÂƽJƒÂ™@UÂÄ¡Ik@W¦™VÂÑșÓÅnÅ¥KULnŽ¯X›ƒ@¯mUÛ@WřmóKknÅbƒxÃ@ƒŽU@kw@ÿÇLţšÃUkšmwƒŽÂk™lÄ‹VŚU¦™ŽƒLkUWlÅÑ@aƒ@ÅѱUóġŹ¼ƒÈĉmÅ»@@wkw™Kl¯U™ġ@—„lÇU™ӯ_ƒ‚Waĉ²Åló¼VbknƒKǎÅ@ƧĢÅ°Ã@ğ„W™ÅxUUm@™‚ÃXۂW„ULUè¯@mbUaƒLƒbUWÄ¡xÂIUJWz™a¯b™y™@ÅÈóLU`ÇXUl™UĉV¯n›mÛbÇ•LklƒUĉVƒšóaġ„ÆbÄ¡KÅ£nkbÃmmnÃWȭȃŽÃXÅ£WóÂkUÇl¯U¯‚ġUÉ…Ä€@°¯„„š¯„VÆnÂmJ@ÄŠÄ·nóJUbÃXUlVškL@lVxnnmb@¤Vzš`ÞÞŤ@„VnÂÆJV„°b„UôJkzlÂŽkl@²óš@ÆÇ°kĖƒšÇbÛU@lmb™XV˜kzƒV™ŽɅĀXË¢lń„ĬŹ@›éÅ@ĉńÆ°ğbUšlÂŽÉœ_°‚@xŦ˜škbVbÆ’KĢ„ŤVŎŽ°@żÈźlĊ„ôKôb@nôxŦ„Æ@ôŽŎL@þÆb@šnnšWËŒbÈx‚InaÅŽxlU@Ѳ±ƒğVUĢƒƨbɲ@Þ¥ôUUÂÄ·WVÂô¯ĊWʶnôaŤË@£nmnIôŽǪK°xUXô@Ŧa°m‚kXÂÆÂÞVÅŽkĊ°ÞLȄôyVašIlwX°UVwĢÑÜKôw@nV@Âœm°nmÂŽn„Ü‚ɞ£VbmÂŽXnƒ°ÜÒ@xÂx@V‚b²UlbkxVnšJUnVVĊ°KȚm°nxÇnn¤±¦@ÂŽUXVV@„ÂlV„„bmVVÈÂÂŽVxšÒ™°šIšbźaȃšbVwš@šƒVL„™ƾÑ@ƒŦÂô¯ĊkôÑ"],["@@„@šƒ„@n„òVÂœa‚w²bVxšxÃœaÄŒVô_ÄŠJšIVmšL„a°@ÅŽÂ¥XÂlK@ƒšk„l„KVbUb˜@nUÄ¢n‚aÈ@lmǬ»Ġ¯œn‚mnƒƨÂVy™Ñǖ™Ġ»ɲInŽ‚@@ÅĢƳ@¯°™ôV„KÈbVIÇ¥¯@Ãó„™@ÑnÄ«WKšƒk™‚k@¥š™¯™Åa™XıVÂÃ…w@±Ġ¯@»™Âš™n™WmÂw@ĪÂ@¯ƒVƒUUWçƒKĉ„Âa±VkkƒV¯w™x@šUJ‚x@bknÇb™mÃ…@Uw±U¯¦UŽ™Kmš¯I¯Žť¼ğĊ™@ǃŹÈ¯@ÃȂnË¡JƒbÛèÇnƒ„ÅK¯„ġĠŹÂW¼Ålm„@¤n²ƒŽÃb@b„š¯lƒÂ¯@ƒšÅ¤W„™¼nV@x„„°@Vx„@lbUblbX¼W‚œšÇ²lšUÂŽ@¼ÂÂŽV¦@bÇlVxUbVxÞbVšœbm¦ƒVV„"]],encodeOffsets:[[[100452,39719]],[[91980,35742]]]}},{type:"Feature",id:"6327",properties:{name:"玉树è—æ—自治州",cp:[93.5925,33.9368],childNum:6},geometry:{type:"Polygon",coordinates:["@@ɆÿĢV°Â°VÈklVôÂŤXÞW„ÂȮÇÞXnmÞnlaŤmÄ¢LÆaĢƒôb„™ĊU„VlkÇ–KÃœaÂœn°mÄŠUšVVkÈWV_ôKŎǚ@šz°ašbXyVI‚JÄ¢wVX„a„KVbna°@VçVKXĆÂÞWšÂn@VVÆwXšĠƒÞ@Ŏ¯ƨġÆ@È„LlmUaô»ÆkĊ±Xb„°`šÔV‚kȘƒĢ@Všk°šLlx@xż@ÄŠn„Çź»ôĢ²VÆ҄@@bÆÒXklV„KšÂV¥Æ™ČUšk‚l„Ânxl™Â烥ċç@±ÂÂm¥ƒwÃ…JƒÂ@™™™Vƒ„mÈIléÈa°ÂU¥™™@kÞV‚K²ÑWƒ°w²Ñ‚K²ñšyÆ„ÚVmw„»kkWĉ—JWUƒVÃ…wƒL™mÃ…@@ƒmw„knÂ¥Vу»°™°@@»„¯„Lla„JôÂnV‚UůƒU@W¯Umѯ¯k@WykU@¯„wV¥ƒkVwţƒk»šwWǜĉĶçšK„ƒÞ™ÇaĉbƒI™lUƒ@kwƒWƒXUƒ°w™±@UšKn£Wĉ—KWxƒkÂÄ•VƒšamwXw™@™„Wmnk@aƒVkĪbĉLƒl™Imm„wUÂǂÂÂWx™nÃJnÂ@¥Æ™kwƒaXƒÜĉ™¯ÅV¯¤mkƒx¯kķܙ²ÂVWôŹVUƒƒ@V£™¥@ƒ°wnÂ@™mÂ@¯@UbUôķŽmn@ÆÛ@ÇýVaUÂÇĊÂVƒ@Çlğ—¯xÃŤ™lVÈÈVƒx„ƒ¤Vx™„kK@™@ƒx@„kVƒĖġ¥kIWbXÂŽÅŽx@nƒxÃ…UW`ƒ_—@±ŽUa™LUxƒK¯„WbkVlb—bmŽƒLÛÆWIUwƒWkwÃV@ÂkI›ŽÂéUb›UUk™V¯Km¯k@Umïm¯Â›m—L›Þĉ‚ÛUm™ġ£UxkKm°™LÂw›šk@kšƒVm„ƒKÂVUk›@¯a¯Ģ™móKUU™x™ImlÃ…n™™ÇbXèVVU„°„@ŽšŽ@„‚xXnmš™ššŽ@¼ğ°@²ÆxU‚„²šWÆb°š™š@¦Âllš™„XLmĬ@҃šÞô°@ȦUJÇaƒLóU¯š@°ġƴ@ÆÂ@mÂɱJğ¼ǕššÒUzƧ‚m„Ân›mğ°ǫ¼knÇ@ÂbÄ¡mmV—@VaUaƒLƒk™l@„kLW‚Ŧ¯@ƒb™KUn™JĉIó`Ä‹UÛb™wUw±aÂx›bñUmƒƒ@™„ƒ@—bƒaƒbÇÂÃ…Xm˜„ƒÃ„ÅôVbގ™bl„UšÞVޚ„U‚°„VUxƒ@U„V„@l`™¼nL@Ċ„LW„„¤kXÄ·WÄ¡XUVVVķ„UbVb@°kVVxÈa‚@ȦĊbšaźJ„U@Ț„„˜Vœƒlš@XkôaWƒĢ™Þ@laĸUÆb²mÞLĠ™ÞÑôbšÒĊa„JVbm¦"],encodeOffsets:[[93285,37030]]}},{type:"Feature",id:"6326",properties:{name:"果洛è—æ—自治州",cp:[99.3823,34.0466],childNum:6},geometry:{type:"Polygon",coordinates:["@@ÞVŤ™ÈK@Ä€lxV@„ÂÞ@„wÅŽalmôLšnXÆÜ@nV‚°@Âœ„°WmÂVKŦLÆmȚԂҚUXÂ¥l@Ä¢JVš@„ŽƾI@w™W°™™Ån¥›kÃ…ÃVwôƒÈç„@lÑĊĕša„JnaÆLVw°kny°UnkÆVÄŒÂÄŠll¦„Vƾ@@™nUźƒÈǂIn°X„wÞKô¦VWV£„Â@£°ókċ±I™™am¯Va™»ČĉV¥°™@m„k„¥l@„ÂÄŠm@ašÂU™mwXƒ@wÆxšmÄ¢_„`VnÆbšKVw„@@ƒnUVÄŸVmVVöIlÂŽl@@çÛmģUDŽw°@VÂUƒ¯»m¯ƒJÅÄ–Ã…Lƒa@»ĉĢ±`U_k`ÇçšóƒkX™lK@ƒakÃރš£WÄ‹kÂÙkxƒJïÅw™xÄ·xmIÃ…x„Â@k±J@ýŋš›¤UÂœkÂŽmV™°ÅÂÃxkwmġƒnÃVU„š¦ƒŤÂlmšóXk¤™ÂUKƒç™@mVkK@klÂÂīƒ£mš¯VUbƒW¯¼ċb¯Âĵam¼mVX„m@k¤ÇX‚ÇbƒUƒ„¯J¯„¯È@˜™bVXVҙ¤V¼kxÚV„@l‚V—„WxÛ¦Wš¯šmKÂnlÂŽkŽ‚šU‚@nÆ‘Uĉ„Ã@ǺۄċUĉ¥™UƒÞÅ™z±òÂL±Ò¯xX„±ÒÂLÃU@lššV¦¯‚ÇbkêÇJƒnU„šš@š„‚ÆI„xn¦‚‚@²Č脦‚è"],encodeOffsets:[[99709,36130]]}},{type:"Feature",id:"6325",properties:{name:"æµ·å—è—æ—自治州",cp:[100.3711,35.9418],childNum:5},geometry:{type:"Polygon",coordinates:["@@VxƒŽÂńƒš@ÄŠÄ ÂŽÄŠÂXÒ°UƾĕÞm°£nb@‚@LUUW„Ûº@nlÆǬšĠ£ÞV°UXb‚VȂǵ„éƒ@ÂkWanm°@™x„z„K°¯ĠVšƒVƒkw™Lnm°kÞxÆa„¥@‚wnĉÆÂ@™œ_l›š_VwšmĸèŤÅČU@™˜WnÂ@ÑmKU™nğƒK@ƒ°¯UÿV£nmšLl™„UƒUÛé±óókkmƒnƒakV@Ç°óÃXƒWəÞťIÅ£xmm™VÛUVÂȂÓnÂWyÈĉkƒVš°WnkÄŠa„¥‚_ÂœK°ÿWÂna@ƒmU¯wƒlÃIU¤UXó¥ÃLƒx¯WmÂÂJÇÈŹ„mV@šƽ@ƒUk¥ĉkÄ‹ÂŽÃ…Uml¯Vmz¯lUxÃ…KmbƒI™bĉĖk҃@Çèó„UxÆޜlm¦šÆ¯ššX@x™Ž@Ž„²ÃlƒÈ™JV²klVl¯ÔlšĉƙްlUǖÞ@ššĶ¼nÂŽUôôŚ"],encodeOffsets:[[101712,37632]]}},{type:"Feature",id:"6322",properties:{name:"海北è—æ—自治州",cp:[100.3711,37.9138],childNum:4},geometry:{type:"Polygon",coordinates:["@@ÅmÄ¡xƽÂUm±Lǿþġԙ@kxmWƒb¯I¯‚mIUx@bƒbŹVǎƒkĵbƒlĉI¯¥ƒUšm@ƒÆ¯È@šašóšUlƒČ»@w›Âœ»›wXaƒƒó°ţçÄkUƒaV¥ÅbÃw¯lmnšKlxU„™„ğU¯°ƒLƒyšw¯@mnXb‚l„@ĐÈǶÂUWa¯VÃUğ¤ǫ™kÃ…@mܹXƒVV@K@Âma¯¤ÃnƽĖ¯V@„ƒ¼„ôlèk¼„¦˜xXÂŽlbnKšÂÆx@Ž™bUx@nnxWJţ¦ƒmƒ¼ñÂ@Ž°¦lUÞlÈ@Ä xÞUlxÂÒó„ƒl¯bmI™ŽÃVÛaÃnƒxVbkbÇwřÇKÂn±K™b„šƒb@V„xšLmŽÛŽŻbk„ƒVó@™šŹxó²›Wkb™@¯ÂU¤ƒÂźĊ@lUX„°lÆôU„ƒlLX‚aÂœV°wšxUb°xÜôÈKVkÈmlwškÈKšwšK™™VUŤĉŎ»„»„IlÂ¥na°LV»²¯Üy@wĢƒ°ÂĸwlwÄ¢w°±„_lVkš@°ƒbƒÆ¯zƒ‚„š„@l_„@Ģ±lŚVlÂUaރ„LVƒnKlnÈ°IllÄŒa˜wÞÑ°x„UU™@wƒÂVÂkmÄ Lô»„KÞýôaÞ¥ôĀÞmÆ„™‚mUƒŎÂV¥Èl°²°a²¥V„@@w„amm@Ñn@Æ£żƒVƒĠ£@W„¯ÞƒšÂl@š»@Uk@"],encodeOffsets:[[105087,37992]]}},{type:"Feature",id:"6323",properties:{name:"黄å—è—æ—自治州",cp:[101.5686,35.1178],childNum:4},geometry:{type:"Polygon",coordinates:["@@ôl²ôÜê„VƒVkš™KmnU¤VĀ¯°@„„LmÄ VšnLÈL@alb@al@n°Vš_XmWUÈamaVIn@n‚aV£œóVWĪU£°ašxÈ¥@™‚aÄŠwȹ@óša™ƒğbmÂ@k„w@mƒaÆw@ƒ„In¯mmƒ@UkkWƒÑÅ@@kÄ‹ÂÅçVkÃJÃ…kVykŹlÂ¥@¯š™ĢU܃X¥òý—mmX™ÃÃ…lmU@£™WlÂÂy™XWȁbƒl@aÂI›»k@klm@UxUUƒVƒ¼¯Xƒl™aUnķ‚ƒI@x™@¯„ƒK™„ĉUU`óšlČ¯ô@¤ƒÂÞJ„k°xVŽ„n@ÂŽmbXŽ¯Ā›LÂ`ƒ¦ĉbml¯X™ŽUÂŽl„ȂĊXzm‚ÈÔU‚ÜVšUnnŤwŦJɚÄXÞW¯ô@ÈlU„b„mln"],encodeOffsets:[[103984,36344]]}},{type:"Feature",id:"6321",properties:{name:"海东地区",cp:[102.3706,36.2988],childNum:6},geometry:{type:"Polygon",coordinates:["@@@҄bš¤ÆI°ôU¼š°UÂŽnnWx™š@b¯L@lUUWbXxWl„ƨnxVÂUllš„XVÂŽUÂŽnL@lȀý²KVnƾ‚ĢwV»ƒÂ@mÞ£nÂƃÞÑmL™ÂƒKUaVÂżĕƒWVk²ÂƒƒÆÃ@ƒXw°@„Âô™@a°wóUUÂmIk™™aVmÞwmknyƒ¹VÿƧnÃ…Âm£X»˜™naV±„ÂÃw@ašb@aƒm¯„ĉVó¦kÃWKUÂU@WanU™b@ôǺĉxÂb@šÇ¦™w¯bV¤„šUX›ôU¤ÂbmÂm@UJnbÇbXVWn™`¯UmÂk@@bka@bÇK"],encodeOffsets:[[104108,37030]]}},{type:"Feature",id:"6301",properties:{name:"西å®å¸‚",cp:[101.4038,36.8207],childNum:4},geometry:{type:"Polygon",coordinates:["@@@kmKVÂUƒWk™VkUÂmwƒƧXkWwXaVV@k°K@aš™XwmmV™¯V»¯óÅJ™£ƒamŽ—X@šċVţÆķç™nUx™`kœ›`@šÅÂmÄŠÂx@Žƒ¦U¦„blVރŤèô¯„„WbÂœx›¼œŽ@xċ¼k„™V™ô™bÇ@Å°@„™n„V°¦ĊJ„kĶa„lÈÂźU„a@aVwnJ°Â°J„anXlwš@ĢÓ"],encodeOffsets:[[104356,38042]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/shang_hai_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"310230",properties:{name:"崇明县",cp:[121.5637,31.5383],childNum:1},geometry:{type:"Polygon",coordinates:["@@uÅu»GPIV±ÃɃŜ{\\qJmC[W\\t„¾ÕjÕp‡nαÂÂ|ěÔe`²„ †nZzZ~V|B^IpUbU†{bs\\a\\OvQÂ’Kªs†Mň£RAhQĤ‹lA`GÄ‚A@Ä¥WÄO“"],encodeOffsets:[[124908,32105]]}},{type:"Feature",id:"310119",properties:{name:"å—汇区",cp:[121.8755,30.954],childNum:1},geometry:{type:"Polygon",coordinates:["@@`y”ĉNÇ•DwÇ»ƒÖLxCdJ`HB@LBTD@CPFXANC@@PGBKNECCBB@EBFHEDDDSNKAUNBDMNqf[HcDCCcFÂ…@EFGLEBa@ACoCCDDD@LGHD@DJFBBJED@BGAEGGFKIGDBDLBAD@FHBEF@RFDMLE@SGANFFJBANPH@@E@FJjRIACDMDOEKLFD@DbDAJI@AP@BGHFBCBGDCC@DCA@CECGH@FKCEHFJGBFDIHACEDNJDCVFBDCRKRLDLITB@CjNJI^DBCfNVDHDFKHAFGDIICDWBIF@@CFAjFJNJBBHD@CJ@AEFJ@@DH@BFBCPDBMFEQGDIFCNDHIP@HDABFACBJFHEBSZC@DP@@JDBƤ~"],encodeOffsets:[[124854,31907]]}},{type:"Feature",id:"310120",properties:{name:"奉贤区",cp:[121.5747,30.8475],childNum:1},geometry:{type:"Polygon",coordinates:["@@~T~JjZdDbLXDLCB_J@@FHFZJJIAGH@HGR@BENBLID@@LFCDF\\FpDBDb@FAHKFE†@dEDDdC\\GreNMACVMLBTMCCFCEGFAA@DAFDLMHA@OD@BMEWDOC@AS@KGAI_DcKw„ÕísÆ‘åĆctKbMBQ@EGEBEJ@@MBKL@BJB@FIBGKE@ABG@@FMFCPL@AjCD@ZOFCJIDICIlKJHNGJALH@@FPDCTJDGDBNCn"],encodeOffsets:[[124274,31722]]}},{type:"Feature",id:"310115",properties:{name:"浦东新区",cp:[121.6928,31.2561],childNum:1},geometry:{type:"Polygon",coordinates:["@@EN@JJLNHjLJNR^GRYVBNZJRBV@PDvbLNDN@LGNER@nCNQNuT_TIVFV\\Z\\XnDrI|[Ʉś²ÃJUHOÆ£}CA@IO@@CYDATGFIEDAEBBAGCO@GJMCEDCJRHEFANOCADAEG@@CI@FE@BDIC@AGIAIMiEEB@DE@AJCXJDCJEHGBELGCUCeMAD]CIJiM@DSAKJKCLQDQACUECDMIFCBDJGECHAEIWCK@GLMCCGEACNKCEJG@MMBMC@@CIJUINT@JAJSTEPZZCP"],encodeOffsets:[[124383,31915]]}},{type:"Feature",id:"310116",properties:{name:"金山区",cp:[121.2657,30.8112],childNum:1},geometry:{type:"Polygon",coordinates:["@@L@BIHFN@@EE@@EFBDGDAADVDD@@EF@CA@IIsRE@GDAF@BF@CV@|FBCHBLCNHAFCADBMDCFZXHILBVEEQA@MWFARJJ@DCX@@TEFBLHAAERE@AJABRPBNK\\BrJ\\VHGND@CNADKDADQjGAGNC@GJ@FCFFHC@JF@@dLBDSFADHVG\\DTEPDDHJALIJkJDJCDIPE@YDCBiK@DONE@EH@BAF@HLJA@EIA@ALKNA@@FIFAFHR@NALadsæąyQY@ƒA±DʼnXUVI^BF@FFF@HBJEDFFGFEBSRkVEXGHFBMFIVW@GAEEFOIAIPKABGWEKFSCQLQBSEIBC\\FdBLRR@JGACFDDEF@AWB@LJJYNABBA@CUEGPaO_AIE@MYMFIGAEFECHSAAKAO\\[JEDB@E@MMA@@AGBKMGDFFCDDFEDFJF@NPBAFLHFH@EDDHBADDC@DDCDHHCDDFDABDAD@FEFOBCJ[D@HEDDNJBDDHABJIBBvGLBJAH"],encodeOffsets:[[123901,31695]]}},{type:"Feature",id:"310118",properties:{name:"é’浦区",cp:[121.1751,31.1909],childNum:1},geometry:{type:"Polygon",coordinates:["@@RUNKdOFDJCbRFMLAHPLDN@JGL@@APBWYCKN@TU@SHGCEJIDIJKVIZVNM`iNY@CIE@CA@KBOEGEUFCCSADEIEFCDDDIDDHC@CKIeDCG@IG@DHWFEEGCH@@GO@@O]CNpeEQDBFME[JC]DGF@CKOA@QSB@GB@@GW@@ED@AQIJIAAFE@@DO@CFI@KNG@CDACAFEGKGBEGBDCCAIFCCLIECFI@MBCLDHGNAHSF@DMB@EEKBA@@C]DEICFG@ADBHGFKCDAKKHKD@@FHGAANGEEFCHKCECBCKG@ADKCNE\\[A[I@@mGBDQQEO@BCE@AI[AML@JGACLOAFKEMM@EQKC@CUCBCCBCHEA@FF@@FM@GEAJK@GNF@EXPH@FD@M^@HIADJCFDBER@DK@@DE@CAKFOCCBDHIBCNSB@GFC@GQEEOWFICGDUAEJIDBTAHJHEB@DIF@NE@H|HBDBEH@DKBAHEF@HEEUB@FGFGCCCE@AHOB@NH@PRLVNNFBX@RC€PbAvMtBfH@DJF@ELBFA@EH@HNED@FFB@HLC@CJ@@DJ@PIRf@HE@CFF@GPHD@DKE@FFBEFFD@DEFCA@DD@IjCRFBAHFDKD@HF@@PM@H@BlbDJDBFEF@DLXB@HCD@@IFCBIFEJD@FDC@FBALLF@PAACJERACAJCBD@EL@JD"],encodeOffsets:[[124061,32028]]}},{type:"Feature",id:"310117",properties:{name:"æ¾æ±ŸåŒº",cp:[121.1984,31.0268],childNum:1},geometry:{type:"Polygon",coordinates:["@@@DLDFRN@FNELPBDKHB@INK\\BBJF@ADP@RFCRHA@nJ@B\\[\\MFLDBCH@DLDADFGLEDFFMHBBGH@EC@GLLLCBLDHEAGBCH@DEFJ^C@DB@LAFFA@CNE@GTMBGHKCAD@NEJFDKJDDJEDBCDHAAFLHFHBEBDDCH@LMJ@DEP@@CF@BEJBJIBRC@@FX@@HA@@HTA@RPBDLE@CHD^\\INFAERCfFMo^D@PP@@HG@HDFFXECGH@@JDHfCLJ@DGDCCCJCCEDJFCFTBDDVEHFPFLAB@NBFCFKFC@CHIACNOHWHCAAFIDD@CDAGEI@ACFMF@R@R_@GQED@EGFEQEDE_IAHKAEÂXCQUOQCUDEN@ZI\\DDmAMHCICDSOC@EG@BKHIGMIBCGOCSF[CUHCGEBCTKA@cE@@IGDEEEDI@@HMDBHiHCRCBCLMB@DMCGH[UqI[AMLOAAQIB@BQFBFGBAKFE@SW@CDI@QIEBNXB@FRUFKAGJYWDENCCADBBEMGKDGAAD{EU@@DAEE@CB@HQFJt@JDBE@@FC@"],encodeOffsets:[[123933,31687]]}},{type:"Feature",id:"310114",properties:{name:"嘉定区",cp:[121.2437,31.3625],childNum:1},geometry:{type:"Polygon",coordinates:["@@F@LI@IDKJADKIEJICADGACFECCJ@HKCAFOHAJI@aCBEE@ICAEB[GFGCKL@FGEIFADMLCAEJM@ELQECEIG@BE^QKKLQCA@EHBIGQ[GEHOMGGDHKH@JOECFCjCBEFDNCACMBCILGTABDLEEOEIG@GFIMM@CGKFBFCDE@@GEAGEEACIcGaHMFITIHDN[AKF@FS@OA@BK@IHM@KCGOKBENaQIDECcPMLQVFHFB@BFBKLGD@FAJOVGIACQ@A`LPCB@JEF@RU@ANS@@RCL\\HIFpRBFRBBDKLLDADJDGBFDABHBEDNF@DGBBBADKDAHC@\\JJFBDEH[DEFDH\\LX@XLBLbT@DNJLDCEL@VJABJNDHB@HBHYFBAA@GNFB@@AFB@AFABFLFBHFCL@HJBAFBLC@DN@HN"],encodeOffsets:[[124213,32254]]}},{type:"Feature",id:"310113",properties:{name:"å®å±±åŒº",cp:[121.4346,31.4051],childNum:1},geometry:{type:"Polygon",coordinates:["@@ˆmÖoÖiƒ½[s[YEUJU`SCIEBCCWJY_LIICDWU@@FaBCJIB[ICH[@@CDKEE@MK@@IMCAEBCH@AMFI@SMGEFGB@FK@BHCAIFJNQD@FEBDFMBKGACG@ECWH@@CDDTOEEBGEK@GC@EE@GPHFR\\JHGA@FDBKRLL]RAFH@FJFDKR@FINBFKDCNEBFJEHK@DLEH\\HFADB@JFFDA@bIJGBEPDBGLI@DDEFBDCHDBIJJFCLIBCL@JKJE@ADHDBHJ@HIBBDFHBBAEIJ@BJFAVL¢ˆ"],encodeOffsets:[[124300,32302]]}},{type:"Feature",id:"310112",properties:{name:"闵行区",cp:[121.4992,31.0838],childNum:1},geometry:{type:"Polygon",coordinates:["@@T@@ELE\\BCMJGJSNEbGdHDJFBJAFIEIFCEWG@@gMENSFCVJFAxR~B@IH@AIiI@GE@FGEAFQPDRiV[\\DFSGMHAXHDOMCJCDETBBNVJJI@DD@ANNNH@FILDDMFBDHNDHKL@XDFGLD@EHGFD@DDB@CDDHCDAEAHG@ABOJ@BIaC@CECLKPFNCDCJBiQEIF@@@OGBMIAEEBMTHF@NKEC@QFEGA@EBCKAACHCLJHEFHHB@AFCAIEACIC@HG@KCCDC[ECEED@KC@KJMAAFQ@GHG@BHIJYIGE@EI@A`KDWCaKcCiY}I}S[CYJM@CFDVPRRVWDFžLBBG`JCFRFEFFHC@RF@HQ`Q@E@ENBDJ@HFCB@DCCEJBBGDGXMPBDGJ@DEDELEDMA@DJF@DMZ_jMNYUUJILCJIJDFGH@TSVM@DLXZ"],encodeOffsets:[[124165,32010]]}},{type:"Feature",id:"310110",properties:{name:"æ¨æµ¦åŒº",cp:[121.528,31.2966],childNum:1},geometry:{type:"Polygon",coordinates:["@@V@CXJDKJZ`XIDDFADJvSRMDM@mFQHM@KCMKMuaOCU@BDAJSX@HKJGD@PNJCJWAGT@R"],encodeOffsets:[[124402,32064]]}},{type:"Feature",id:"310107",properties:{name:"普陀区",cp:[121.3879,31.2602],childNum:1},geometry:{type:"Polygon",coordinates:["@@F@@FHDL@HFFAPFCSDC@@XGFDH@BDLHNACEFA@ERCIMJEDBAGL@@EHAFENHHJ\\ONQBQCIBC[MKACKI@GGGH@I_G@CW@[DMHCDIBMTDHN@JNHEH@FJFPKFACSBKHDJNABDMDECAFiDEDFDIPG@GLHCNH"],encodeOffsets:[[124248,32045]]}},{type:"Feature",id:"310104",properties:{name:"å¾æ±‡åŒº",cp:[121.4333,31.1607],childNum:1},geometry:{type:"Polygon",coordinates:["@@RADL\\NCPHFfLJaJ@FWLGMGIK@IFMDOYYFOTSBI@IMSAMSACFIDNDCPWGGBHNET[CU\\QjOCERFBEHF@@HjJBJG@@J"],encodeOffsets:[[124327,31941]]}},{type:"Feature",id:"310105",properties:{name:"é•¿å®åŒº",cp:[121.3852,31.2115],childNum:1},geometry:{type:"Polygon",coordinates:["@@HFFB@HF@DCAELENSJADCNG\\CX@@D`H@JHGHHJ@BINBFUGEDO[MCKQB}AwQEBUIEDMTNF@hH@FXEDFJEJIB"],encodeOffsets:[[124250,31987]]}},{type:"Feature",id:"310108",properties:{name:"闸北区",cp:[121.4511,31.2794],childNum:1},geometry:{type:"Polygon",coordinates:["@@CSG@BQGODUPWTOBQAAFMECKBGEMFKEOHADDJARMR[PGI@TEJBNG@ADBFND@JL@@NFFCL@D\\@DG\\JJADI"],encodeOffsets:[[124385,32068]]}},{type:"Feature",id:"310109",properties:{name:"虹å£åŒº",cp:[121.4882,31.2788],childNum:1},geometry:{type:"Polygon",coordinates:["@@bA@E@QHSXBDIMI@OHCLI@GTWBIACQAYIOFGCENBBARSPOXCVHPARH@DT"],encodeOffsets:[[124385,32068]]}},{type:"Feature",id:"310101",properties:{name:"黄浦区",cp:[121.4868,31.219],childNum:1},geometry:{type:"Polygon",coordinates:["@@NEHFLAFDHDPEAMZUHQQ]IMKJG@EPERABHBGRUCCNGV"],encodeOffsets:[[124379,31992]]}},{type:"Feature",id:"310103",properties:{name:"å¢æ¹¾åŒº",cp:[121.4758,31.2074],childNum:1},geometry:{type:"Polygon",coordinates:["@@VDHQGABAFQFOH@LIiKKHEXI@IbAFZB"],encodeOffsets:[[124385,31974]]}},{type:"Feature",id:"310106",properties:{name:"é™å®‰åŒº",cp:[121.4484,31.2286],childNum:1},geometry:{type:"Polygon",coordinates:["@@DLLB\\NPGLFHUDMYABEeKEVMAAJ"],encodeOffsets:[[124343,31979]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/shan_dong_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"3706",properties:{name:"烟å°å¸‚",cp:[120.7397,37.5128],childNum:9},geometry:{type:"Polygon",coordinates:["@@ŤLšLllVń²è°xżĢĠÆl҄šŤbœ„V¤ĊXnÂŽlÄ¢VĊ„Òš„È°ĊŰÞè˜L„±@ÑŸn»VUźċ²»ÆkôVɆkĊŃ²kŤVVwUUVmUaƒÂ@KkU@ƒmUmmk@UwUkmW@UVIXa@ƒmw@a™KULƒaƒx@Uk@UbWU@yULmK¯@kXƒVUwm@@JUUknWKUVƒLUbU@™wWykIƒa@w@mUI@ašUVynIWa„k„@@W„bl@@knmƒK@wnIl™°Kna@ÂV¥ğ@Ä¡Uķ»™¥@UÅJƒX¯¤k@™wmI¯‚k@mwƒak@@šlX@bUJ@VƒbknWxkLkxlŽšLVlkLmŽšb@bU@ƒbU@VbU`Vb@n„L@ÂŽmb—U@˜VnUVmnU@mm™@kIUWVIUK›VkkUJUnmL@VmLUaÂVWaXamU@™™U@KUUmVƒU—JƒU™VÇwÄŸn™mƒ@mXĉV@l¯xnô"],encodeOffsets:[[122446,38042]]}},{type:"Feature",id:"3713",properties:{name:"临沂市",cp:[118.3118,35.2936],childNum:10},geometry:{type:"Polygon",coordinates:["@@˜bXlƒl@zlV@lXXmÂŽkbVVlš„U@Vn@@Vmb@XšKšVX„WJ@XXl@„‚ŽÈbVLšUl`„@XXV@VVUxVbUxVbš¦„@‚WnXVJ@bnVUzl@„°Æx„U„KlU@mUUnUlUVWVUnVV@XX°V@Všll@Vk„aXVl@Ux@bmbXLlKlb@b@bUJn@@„„b@n°x°K@an@@UlLVKVbXb@bVVnK°LVa@UVa@™Xw‚KVxnLšU°@naV@UWUkWƒULmV—wÃKUUla@aó_@mƒK@aUU@ƒWUÂkwVm@aVI°W„@@IUw@a±¯@Â¥kUVUÂm@a‚wkw™@ƒK@kVKk@maXalI@alL„WXblaVLVU„V@LnKš@„l@w˜aXašLlnUl„LšmV@n°J@_VmnIVym£UKmI@WnIVm@anUVmÇ_kÂÄ¡IÃ…WUXÇm@U@ïÅ@Ī@naWĪIVW@IkK@klKn@naWIƒmk@ƒaƒbkKkLWn™WkLWmk_ƒ@UaVƒUKmLUw@mn£WwUmU™ƒaóV@UkUm@UKULUwmJUX@WW@XҙzVblJXÂŽWXk@UVWK—X‚¤UL@xU@ƒ@ƒVUaU@@XmVkLmWkXUyÃLmKXnVÂŽ@n@l™x@bWLnVVn™`knULmxUl„„WLXÂŽVb@VƒK@z¯x¯¼Wx™KUn@bk@ƒlƒVVVÂz"],encodeOffsets:[[120241,36119]]}},{type:"Feature",id:"3707",properties:{name:"æ½åŠå¸‚",cp:[119.0918,36.524],childNum:9},geometry:{type:"Polygon",coordinates:["@@l@@UšK@ÂŽ@L@bX@@VlL@JƒLUVnX@`ÃœXn`V²mJ@bU@@n„b@l°xnnĸVƚ°@„ƒĊ£Þ@lWnÑnkʶJmó°w@kk»VÂ@»ƒ¥k@V@kw@wVm„a˜Å„mšaô£ŎƒXI@mln„Kla@mV_UKƒ@kUkw@alW™IU»™mƒ—@WUIl±UUÃ…U›bkJƒÂ@a@wUKUaVIÆmXIWaka@m@Ul£XKVw@ƒUIƒJUkmJ™ƒVÂkU@a„ƒWK—ImVƒ@UxmL@bX`WXU@U`ÇkUak@@°UblXk‚mLUKmL@VULóƒƒVk@@Vlbn@Ub@ÂÄ‹aUJUbƒIUlVLUVVbVKX„VlVXU@mb¯@™VmKUwÂLWx@šUb@VUb¯KmLUU@aWaUaULkK@Vm@@b¯L¯w@mƒa@ƒm@UUU@U¦lJUXƒVƒmkb@nm„XVWÂŽkb™IVxUV@VUbWLXVƒLW`Ux@nk@Vn@x@VkJ@ÂœV`mXkÂŽ@V„xVÂ@lVššI@VULš˜VU„IV`°bVXXx„V@VWVnL@xV„Ub"],encodeOffsets:[[121332,37840]]}},{type:"Feature",id:"3702",properties:{name:"é’岛市",cp:[120.4651,36.3373],childNum:6},geometry:{type:"Polygon",coordinates:["@@„@nU˜JXLƒ„@blVU‚š„nIVl„IVJ@„UxWLk¤@V@nlbXbWJÃ…nUJVbVL@x@b„ŽlIÂœaÆVVVk²VJ@X„˜šnV¼šJkX@blxlV„@VLU`@nkbƒLkm@nWJÅ„ó¤™bƒn—ƃbUn@xlxU@l@„¦@¼UÂŽl¼ĊUnW„@šnÄ mÈxšU„V˜I„VnUVV@LšV@šnVWbXb‚UVbnK@UnKVmVIllÂœUVLUJVXlJš@nnV@nmVUUm@—˜Vna@ƒK@mUaV_UaV@„aV@@a™anÂlKUk™KkÂlwlKXwlm„a@UVI@akW@™l@„bnxl@°ÂnJšxl@°£„WÅŽIUÑn»lašmô¹Ŏ¥VaUUkƒmkÄ¡WɱIUUŹ`›@kk@ĉƨřVÂ¥Â_Ç@™Ĭƒ¤ÃL¯m¯£ƽóķwUW±ī¯kÅaĉĕ™kÄŸmó°ƒbW@UKkLUaƒVmz@V@ÂŽUxVn"],encodeOffsets:[[122389,36580]]}},{type:"Feature",id:"3717",properties:{name:"è泽市",cp:[115.6201,35.2057],childNum:9},geometry:{type:"Polygon",coordinates:["@@@¥šIVUÈmÞ»@UlU@Un@VW@UVmkk@aVUUKVÃ@UVknK@UV@VVnIVƒ@wnƒmwmKXaWaXI@UV@Vy²blkVKkam™U@kb@Um@VmUkmƒÂKmkXKWwkU@Ulƒ@UnK@UVUUm‚KXwšUVL„w‚K„U„@@Wl@@wUkV¥—@@I@W@_V@VWUw@UUa@aƒaWa—@@_mKUw™l¯amzmV—@WK™nU@kƒWLÄ·aUKÂbÃVmV@ÂUWÇbÛ@ƒX™°UbW@XÂŽm„Vlk²UJUbmLÇxÃ…WUzl‚¯Ll„@VkK™XUbWJ@bU@¯@™ƒkbƒLmKka™„@l™_WšXºVbUz@J‚n²V@¤lX„Ž„nV°šLn`WbXLôVlKVUšxXn˜lXLlU@bVV@„XJWLUVnVV@„„@n‚l„°nn‚V„KÈbVXÆJU°VnXV„kV@@xVL„@šWlb"],encodeOffsets:[[118654,36726]]}},{type:"Feature",id:"3708",properties:{name:"济å®å¸‚",cp:[116.8286,35.3375],childNum:11},geometry:{type:"Polygon",coordinates:["@@nam_nKlÂVLXa„Il`š_@KVVXI@m@w‚ƒ„@@k@Kšnô@n`VbV@@L„L@KVVn@VX@‚VL„Jl„š@VUUƒU@Uam@Uk„wšKWaXamÂkJmIUÂVUÈblašUnV@kVKl@@lXL°kVJ@VÈnVJUX@V‚LXl@xVLnU‚@VK„V@a„IUaV@„bÄŠU„x„K‚kVJXUlV„ƒ„UVašI@WUI@KlUnw„mWk@WXIWĪU™L@Wna@Um@@UƒVk™UUlanÂWW@kkU@y„kWk—aWVUlÃbUU@kƒJUIU@@ĪJmaókƒLÂKǃUUkKWLk@WbkUUaƒbmKn¯°¥V@XwV@VanaVaU_@Wlk@WÈ@VUÈVVۂm„akÂlKȯlLVUX@lK@aX@@kV@VmV@VwnJV_UWUwƒX™am@kW@wVUkKVIUUVmU@UV@IVK@aUL@aƒV@Lm„UKmx@ÂŽÂômLkUWJ@šnXmlUxUL@Vkn›VUšU„@V™L™`Ub±LkV@kUKÇbÛ@ƒU™Wó_mJƒÂ@Wk@@Xƒ@ƒVÂLƒxUK™VWxÂLVnUV@VmL@Vk„@VlVXxWLnl‚Ln„VlUnn@@VlaV@nšlbULkl±aUzU@@VWJXbWbnLnxm„@xU„mJUUU@@VmLUl@VUÞVLUV@bllUn@VUXm@@VkV@VüÇnUV™J@¦nnƒlnVlL@„Þb°KVV"],encodeOffsets:[[118834,36844]]}},{type:"Feature",id:"3714",properties:{name:"德州市",cp:[116.6858,37.2107],childNum:11},geometry:{type:"Polygon",coordinates:["@@„¤@VmbVXnVVbVJššXÂ@ÂŽll@z„lVInl@„@bVxUbĠ‚l@Èbla„IšxXVWb@L™@n‚ULWVXXšWWLnL@`@LUVVL@lVn„JšU@UUk‚a„™nš‚Vôô„b°¼V‚ÞÂXš˜‚œIÃœbÄŒa˜bôW„XÞWÈzÆmnLVJ°ÈnlV²lbnW@™@UƒUV™šmnwmkkKWƒÂkla@mVIUKUa™aUwmn™JU@@amIk@@bVlkX@mmUkÂlUUƒƒa@_UaUUƒV@wƒw™WkXmW@I@WUaÃU@UXaWUU@UUVW@UUUWUnÂ¥nUVa@m@k@alU@wk™LWaÂ@UUm@@wnÂmU™wla@anKn_@alK@Ù_ƒ@@WUUUmlÂkaƒIƒyU@UwU_Wa¯yU_mWUwkImm@InWWUk@@UVWV—kW¯U@VƒL@b¯b@l±¦@šVV@lUbV„@škxVnUšl¼XV@b@lV@nIWxnbƒ‚™@UU™LƒxÃ…xm¯ƒaUĪwU@mUÃ…VÃKULm@ÂbmKUXó@"],encodeOffsets:[[118542,37801]]}},{type:"Feature",id:"3716",properties:{name:"滨州市",cp:[117.8174,37.4963],childNum:7},geometry:{type:"Polygon",coordinates:["@@Vb@`„bV„kVlÂnV@nlWUk@al@nJ@bV@šInmVxšbVbVLUJ@nkb‚lX„lLnlmx™nUš„V@V@šmXn˜lbĸ@nnVx‚b@lnXV@UJ@nVxšxnxVbÆVn¯ƒĕ‚@@wÈçUÇlÄ·VIÂœb‚@„Çmk@Â¥k@UkUK@aWakUóJW_UW@wkkWK@U@Kš@XUƒƒUkmUUalKXala@U@kkWlkÈl@kšV„mVIVmU_‚a„ƒƒwnwVW@wƒwUƒ@wU£ƒwkJWIÂyUI±bk‚VÂUJ@nmV™Ukl„Xmx@lnbW„kVƒUkLWŽƒxkKUUmUkb™J±Â—LÇxUKmkUmkkW™™a„mUaVkšJÆ_²KÄ @U„W@w„U‚¥nUWwÂK@aÃUkÃ…VaVK@akLWƒƒƒ¯I@bnbVx¯JW„ñšWbUL@šƒŽnV@VmbkUUV@IÇak@@bWak@WJUÂœÂJWL@bXV@„‚@„V„Jlb@zUlUÂŽUImšnbV‚mz@°UV@V™bV@@V@L@xÂLmKUnmJVX„J@VkLW@UVUL@b"],encodeOffsets:[[120083,38442]]}},{type:"Feature",id:"3715",properties:{name:"èŠåŸŽå¸‚",cp:[115.9167,36.4032],childNum:8},geometry:{type:"Polygon",coordinates:["@@ô@VWnL‚an@VKÞLÆUnVV@šxV„„bn°Æw„wšKVVš@„ÂmaXwmJU@@k@aWUk»V™Umlw@™UƒVa@kUU@™²¥@k°a@a„K@U›ƒUÂÂ@mmm@ów—ѱ¥¯@@w™Kmw—IݴkU¯UmakJmIUaƒVkKUkm@VUUa™Uƒ@UaƒKUK¯@™w™UVÂŽUIUKVw™k™¥™wƒbVÂŽ@xn„@lWnXxlL@`„XlJX¦l°XxW¦@¦Ul™n@Ž™@@Um@@VXVmx@¯bllUnUJ@VULVn@b„xV‚VL@b„„VlnVVblV„ÈnVlIVJÂœLô„lJ@xl²„"],encodeOffsets:[[118542,37801]]}},{type:"Feature",id:"3705",properties:{name:"东è¥å¸‚",cp:[118.7073,37.5513],childNum:5},geometry:{type:"Polygon",coordinates:["@@ͬUǪlô@°UÂœw°ÅĠ¯š»Ģ炻XÇ@w™wÆ‘a™ÂǃkwVƑ¯@řķUmm¯w@kƒa@mV@@anIU±m_ÛW@_mWVU„K@IkK@UW@@a@K@™L@Vk@±UÂ@UV@lm@mUU@kLm„„xV¤@xV„„x@xUXmx„xƒ„ÂbV`UnUJƒn™U@lÇkkllX@l@VkbWbkLVbnVVl„„WV™@@L@VXLll@xVXX`ôIlVXb@bVLVll@@¦nlƒÈÂ@›aUJkĸVÈÇè@x"],encodeOffsets:[[121005,39066]]}},{type:"Feature",id:"3701",properties:{name:"济å—市",cp:[117.1582,36.8701],childNum:5},geometry:{type:"Polygon",coordinates:["@@²¦˜Òôxn@nn‚@V‚œ„°VlXU˜UX@Vl@XVmX@JnnlJVxnXV`°zXbV`VxV@„z„JlbkÂŽVnVV@X„@š`@ÞkL@bm`mL@bkbšxnVmÂ@xn@VV‚@XbšKlÂ@xkV@b@l@nUbmVm¦XVVV@VUXVVV@XVWb@VÞVVb@X@JnXlWšX„x@x„UVV@aVKVUX@lK@UƒIUWnIVmnL‚K@w@K@UU@ša@UVU@¯nyUÂman™VJVÂVk@ykaƒIƒUÂ@@ƒWU@aXK‚IV›XIl@Xb@al@Èb@JVUlVna@UmU„Â@™VKXaò™Xƒ°IUwma@aU@UU@wVW@фw@a™I±`kbƒUkw™UmJ@UkmÇUUkmKknUVƒ@mJUkÂaWkƒa@KÂÂmKkUƒLmyXa¯_@WmImmÂbƒLmUkVUbUVƒJ™bƒUkkWJkUƒl™IUm™k™Lƒ›„ÂlK@knaVmkI@mWaƒLUK™UU@@VmLUVÂLWK@UUUƒWUkkVmx@„Vl™¦"],encodeOffsets:[[119014,37041]]}},{type:"Feature",id:"3709",properties:{name:"泰安市",cp:[117.0264,36.0516],childNum:5},geometry:{type:"Polygon",coordinates:["@@n¼šŽW„nxšL@x°@š¥Uk@ƒnwlUVl„XVV@VXL‚KVUnK@UV@šVVL„KXb@nlJUnmb@lkLƒ‚„œšKšlVnšJ„klVXIll„Vša„IVUValUnV„K‚annnJ@X°`Wbnz„KlVnL‚Ž@L„bXl‚bVlnI„@VUU@UmVƒ@U@Uš¥@ÂVmV@@_Ua@m°@@ƒ„kmUUm@UVmn@nX‚@@a„anJVUVL„mlIVJn@nkVLVa@KVmVLXVVLš@@U°bn@VaV@@K@aVkÂœbWaXUVymU@aUImWÂXƒ@™¥UaVwUaVwUUU@WWƒ@k_™VUKÇaÂÂ@ƒƒnmxkV@LVJ@X™JUbƒVƒ„kUWVUIÂlƒLƒwĉVƒaU@VbƒJ@bƒUULÂ@mVUK@wWkÂK@UVWUIÇm@UUI¯lWK@kk@UL@lmU™VkbÇaUVVÂnJlIn‚WbXb™LƒxVln@VbV@V„UV™@kƒƒIUK@ÂUWm@UU@LƒK@KU@Uam_ó@™m@L@lƒ@„@x@nWJUU@L™`k_ƒJWbUKkÂmLn`mb"],encodeOffsets:[[118834,36844]]}},{type:"Feature",id:"3710",properties:{name:"å¨æµ·å¸‚",cp:[121.9482,37.1393],childNum:4},geometry:{type:"Polygon",coordinates:["@@VbUnVVUxĊ¼š¼ô@Þф¯‚WǬLÅŽUÆW„¹UǃůуÃkţ™™ţóġ™óL™ł̥U™wmÂ¥kÃmkkKóbÃ@U¦@‚mb¯LkšmJ@x„Lmn@lk@ƒa@Xƒ@ƒlXbmJUz™V@bVJ@n@x„blJXzšxV@Va„KVUXLlmVV@In@Vx„UlW°@nLVK@zXVVal@@V„w„bVKšL@bnx@„WbUJ@VnXVlVxl@nnnV@„lV@L„‚"],encodeOffsets:[[124842,38312]]}},{type:"Feature",id:"3711",properties:{name:"日照市",cp:[119.2786,35.5023],childNum:3},geometry:{type:"Polygon",coordinates:["@@UaVUUKVk„JVaVIÄŒb@ÂVam@ka@Ul@„Uô„VK@UnKVLnKlÂkWVa@¯l@VbÈlV_V@XWW_@anKVwUmVw@Â@Uny„UVblKVLX@„aô¯ó¥mÛĊÿÈ¥š™Þ¹lÂUīƒÂ¯Kĉ¼ʟbÇV™U™ŽUŽ™XmakJUnmV@bUnmJ@XnJVLn¤UzmJUn@`¯ImÂŽU@™nƒKVkkm™KWb—b@xƒk™@mL@KƒUUVUKkbWaƒXkK@bkJWbnbl@UL@l„Lš@lxÂx@b‚nUVlV@¦²°@bVx@Jƒ@¯XUJ@bUnlxVŽ„X@‚VV@b„L@nô`@bkbVVÞL˜xnU"],encodeOffsets:[[121883,36895]]}},{type:"Feature",id:"3703",properties:{name:"æ·„åšå¸‚",cp:[118.0371,36.6064],childNum:4},geometry:{type:"Polygon",coordinates:["@@nƒlKV@nVn@@kVU‚@²VVaUƒ@wmKXU@UƒUWwUW¯aU_ƒJUV™—VK@U™JU™@kUƒw@UlÂnWU_@›lI@U@wUml@@mVwX_„KWUXKVa@UVUUwšJlaXÂWUnƒ@mla„n„UVWkIVÂ¥V@VVVI@a@akakLWKna@aVwk@WUƒbUlk@™k@U¯UWWU@mUUVUXkVmVVV@nkVƒLƒVÃ…wƒ¯k@WVXb›aUl@bV@@b@xkVVXVxkJ@nk@@ÂŽVLUlVb‚VXUVVUzV‚™LVbUbV„ÂVWVkLmškJ@n±@UxU„VVkV@bƒx@Ã’UX@xVVV@°J„„X„lK@bULUblÆÞV@b‚LXxmV¦ƒV@xƒXVÂŽÄŸ@±LÃ…`™IUlVbƒnšbXšllVnnlVLÈw˜K²ŽšIlanVVVlL„wXÂlK„VlUXƒma@knwƒWlkšVnU@mVIUÂl²aVJ‚zXJlI"],encodeOffsets:[[121129,37891]]}},{type:"Feature",id:"3704",properties:{name:"枣庄市",cp:[117.323,34.8926],childNum:2},geometry:{type:"Polygon",coordinates:["@@‚yUU„U„kl@@aVmšLXw°»°w@y„L@UUaWÂXKƒƒVknwVKlmš_UmmUXK@ašw@k@mUÂWmUL@ƒ@™@£@KƒbÃV@akw™aULmƒƒbUK™LUU@lm@—°mL@nUJVxVXU`mIUxU@UnU@@lW@@bkLW@UVkKÇ°kLlŽƒbÂnUÜÇUUVÇ@@Xkl@XV`UbmbUbU@WxU@¯¦m°nL„aVblVXal@XKlLVVȄ‚L„KôlnbšI@„V@VJ„I@lVVÞaVkXU"],encodeOffsets:[[120241,36119]]}},{type:"Feature",id:"3712",properties:{name:"莱芜市",cp:[117.6526,36.2714],childNum:1},geometry:{type:"Polygon",coordinates:["@@lmnLVlÈVln@VnIšVlx„Vla²_šJlUUUVƒVw²@@mlIn™lKXU‚UUƒVaUašKUÂVyUUWVÂUUaVkUK@Âl@@mlIUwUWlU@w@aU@@LU@Ubm@¯a@V™@UKWUUKUn@LUbUKmlm@UIkJƒnUKUVmIƒb@bÂ@mWm@Un@VVnnVƒl@„¯@@nVb@`U@Un@Ž™¦@V@VU„VnV@"],encodeOffsets:[[120173,37334]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/shan_xi_1_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"6108",properties:{name:"榆林市",cp:[109.8743,38.205],childNum:12},geometry:{type:"Polygon",coordinates:["@@™ýVƒnIW»ƒW@»kUÇL—ÃU¯¥ÇIUWWїUWwX¯mƒ@»nÂ@ÂÃœÂÈķô™@a±kȱƒw„ÑmwÂçċmUȮkkÂVyÂIm™ĉÿ@ƒÃ¹ƒWnwÇVš™Åaƒzmmĉ¦ó™kVmx™xU¼VškVm_UlVlk„°IV‚kÂmJÂa›¦k™™LmmÂV@XmKnšlUÂô›VXbƒbƒ@UaÇLğܙ™ÅwģmKnmÄ‹wÃ…@UkƒbmaÂVƒƒƒn@m¯aU™Jm_k˜@kWÂXyl@@kÃ…amw™LU™Þ™ƒ™mWÃ…zUKƒš™Uk±@™b@nnK‚bX¤mzVšÂÂŽVxÇn„‚¯„@Ã’knWƒƒVUbkÂÄ·ÂÈÑWkk@Va™Â™U@„mUkbƒÃÃ…@Ã¥ÇbkĬ™XV`kLÇÂVmÂalUUa™nV±nwmkƒJ@Inƒ°KVw¯UnÃ…@¥™ƒ™U±bÂUU˜±œÂmWbÛKWnÂUm`UÆ’VK@bmnÂœm‚Èż@V„L@xƒxmš„Ť°ÂnÂŽ@VmK™Â²VlšlKk„ô@㐆V@VXLlmš¦UššV°ÂȘ¯²ÿ@¥š@ÆÂĊ˜²IšmĶnnb°b„KVƒĸLl„Þ@UȮšÂ™Ü°IVƒÞÃÞÂlÂŽÂœx@ÂŽÄ·Ä€WŽ„ÂUx㏮Â@š°ŽXnšlĊĖ°m„nƒšV„²V°ÒƦ„aބ„˜@zll@bÞĀšlš¼nKĊ¼óȂb²±šIǪÒ¯ĖÂV@„lxnVlk„JlaXwŌĉ„„@VnŽšÂšlÆĕ„UÆLœèŌŤôxȚlUÂœ@šxlaUÂÄ‹Ä•Xm„IWmnkšVVƒ„VW_@aÈWUUmk@ƒ¯çVm»™Â±W¯ÂnÂ¥V™mkXw±ÇVwƒ"],encodeOffsets:[[113592,39645]]}},{type:"Feature",id:"6106",properties:{name:"延安市",cp:[109.1052,36.4252],childNum:13},geometry:{type:"Polygon",coordinates:["@@@kkÇmIšmUwVkUƒƒU²WmšVkm@Âm`mIĢĕUƒVa@™mÂXƒƒÿVÂVÂkyUýšĕ@Âl_UmnƒW„KVkţ™™¥™aƒwÄŸ@™Â@a􃄃Wa„kUmƒa¯¯™a±£kx™mmxUwÃ@ÂxmU™b¯K™wó„Ã@kmm¹Ub@lklVbmnnVUV@x›UknƧJUX@ŽƒLÇWkw™LķƧÅwWJk„ƒLkþĉxWz™JUnǚkš@Æk¼ÜÔÈKšè@°lșÆk¦l„n@l¼@l¯L™°UU™VÇ°ƒ¹—`m¼mXk‚™bUaƒV@U¯x@¦™Ç™„UUmlmUÂVm„nnmlkw™@@šƒ¦Å‚ÇLmx¯Iklš„@¦mÆ°VUx¯Lm„@J„InlmxU²šmVbkV‚bUnȎlKU_šWlīÈaÞ¦Æ@„ÞlanV@ƒšVšÂUbl@XlÇÒĸÂlÂŽVa„UX„lm@Ñ°ƒƒÂÈmUw‚ÂU™nyW£ÂamL@mša²@lšV„™VLÆynX„šÃšVššKnxÆb@lk@WzXÂŽ@ll—n`šIV‚°b@n„m„„‚Unb„aVlÆ@ÄŒxmnnL„¤ÆxššĠÛÈKVb„@„aWaÂœU‚ókVm™nL@W‚UnnšKlšœ¥‚bnIlÂU¯JlƒUkVkn`lUU™V»šwnwlUôšĊ¥nn„yÆb"],encodeOffsets:[[113074,37862]]}},{type:"Feature",id:"6107",properties:{name:"汉中市",cp:[106.886,33.0139],childNum:11},geometry:{type:"Polygon",coordinates:["@@lKnb@n„lWb°bkxĸwVb@ł„nlŽ„ƒĊ¥šL@ÂXÂŽl™ÈƒVblÂÈK‚b„akÂVwôml²`‚nÂœ@‚nVKÂœl˜k²xŎƒ°¦VU„JÄŠw@çnÂWçރVkUÂóÛ@Â¥kwš™šUmƒX¯WšÑkƒ@ÂUymIUwlUn¥‚mUk²a°¯V»@™ÃVș„ÃÄ‹Ã…Ã…Vl»Â@lÂ@a°±@_kammÃ…b™a@ƒƒm@ż™KknõĠ—@mšƒ„¯LÃ…w›‚—LVxmb@¼kV™@mw¯wVakKW»ÂX±¼¯Vkxƒb„¼WÂŽ@nÂx@x±bóakbƒ@ÃmU™@ķÓÛL™kƒVUm™k¯¤ÃLUlÃ@Ãz™š„x@x™°™™™bƒmƒX¯aUJW¯—k@bÇWƒwÛwWxƒ@XÂWlÂb@Žƒ„VŽÈUlwšLnl°VlUô¦œU°¤VšUxVXUxlbkVVlƒI„°„ÅVlU°m@k„ÇU¯xUlƒLUlVL@b™°ĠInĠ°ÈnK‚„@xÞa²n‚aUyšXUKVkšWô¼Èa‚z°JXUVÇV_„JVƒšz@ÂŽnb"],encodeOffsets:[[109137,34392]]}},{type:"Feature",id:"6109",properties:{name:"安康市",cp:[109.1162,32.7722],childNum:10},geometry:{type:"Polygon",coordinates:["@@„bÄŠaƨèšwôÂô„¼šb°ašXVƒÞVUÂÞ@‚aXƒmÂ¥kImx¯¯ƒV@anU@UÇéğL@ƒ¯¥V£mƒ@ÃÈb„K‚™„X°wČÿ˜ƒ„b@xÈblxȯĊ„„mÆUVƒ„nÈ@ƨÂÃœLĢ¥ƒŹnƒ°Vnn˜K„aô_ȃšwU‚aXÂmÂnW‚¯Âkl›LXƒÇ™Å¦ÃaÃ…VmbÄŸUn¥±wÅéVƒan¥ƒÂ„U„»°am¥„£ƒÃ@ƒ„wVw™¥nU„уUmmVwÂmÄ·IÃ…aóVWxkblb@ból@œğÒĉ¤ċXƒ˜¯X™xk„Ç@óÆÅx@š™xÄ·_kmÃŽÇ£kblb@`¯²@bk‚‚@k¼ÆUČƃÞǚÞU@šU¼¯°±bVlÂnm¦kVVxnJVz@‚l„™ÒXÂW°n„™V™šlx@¦ôÜVÂUlÄXèmÂ@è"],encodeOffsets:[[110644,34521]]}},{type:"Feature",id:"6110",properties:{name:"商洛市",cp:[109.8083,33.761],childNum:7},geometry:{type:"Polygon",coordinates:["@@²nl‚ôbš„°aVwnKÞIš`°wšXôw°VĊ°@ŽÅš„ÞÆV„zÞK@xšŽ@a‚LŚ@b@ÂŽnLlƒ@šln„mnLVw„a„bVƒ‚VnbU¼„Vƒ°„bl„šbÈ@ĶÂŦb˜@nÇ@amIÂyUI@ÂÄ ÂVmôƒU™ƒVwkwlanJ„¯lwó¥@an°Jš_„‚@š™nóƒó@£lÂ¥UwmašÑ@ƒÂUm±V_ƒJ—£›J—UW¥¯@ƒ_k¯¼mUƒVUè¯b@wmL™»ğVmaÄŸI¯¤ċIUW™XƒKĵ¦ķaƒJUb™IƒlUÂóVmk@WÅÅÇ@ƒmU„ÅVƒnĉƒÇ°kwÇa@wƒa—„ċĀ¯xƒWšƒLÇa@Þn„U¤°¦@„ĠKÈê@VmV@b„U°°nwlJn¦W„ÂbÃ@VÂŽ"],encodeOffsets:[[111454,34628]]}},{type:"Feature",id:"6103",properties:{name:"å®é¸¡å¸‚",cp:[107.1826,34.3433],childNum:10},geometry:{type:"Polygon",coordinates:["@@@ƒ„£@›°Išb@¯°ynŹƒaUƒlƒU£„Umšĵĉ@@ylUÞ@@£kWU¯WaU£¯ÇV¥ƒ@kb¯wƒn™¥ÇkUÇnUƒÂ@¯±›kULÂm›@Âm±_kŽónUxlŽƒbÂaÇLkÂŽUaDŽkšWÂ@™Kĉ¦ƒ„kƒm@ÅUaÄ·xlw¯aXaƒk@mmakL@šmšÛŽ@¼m„@l„XV`ƒn™KUš°°@²š¤UÂÈ@VxmôƒxÂKl„VV²aVw„Xla„Vlx@ÂUVnŽÇnk°ƒVVL™lkI™šƒJÇk¯V@šknƘn@lznmlVkzVŽ„VVxš@Ux„z@x±¼VxÂxU„l‚kb˜@„¼Čk˜VXlÄ kôV²w‚LUKlwÂœJ@a‚IV¥Þƒn¯Ün„‚„@nk˜l²kÆ@š°„aVbnI@™š‚Ťn"],encodeOffsets:[[110408,35815]]}},{type:"Feature",id:"6105",properties:{name:"渭å—市",cp:[109.7864,35.0299],childNum:11},geometry:{type:"Polygon",coordinates:["@@@ÈôL„xUŽ°„Þ@mŽÈnl¤nUôL‚wX`@ÞÃL™ŽUšmLô„„ŽôbVbnºlnÞ@ôƒšx°LšanV‚wÞ@Vxnwšnlw²¤šb°°„bVnƒlXbƒ„ó„@bš‚Ġ@„xšbš¦ŤšV™Xġ„£W¥ƽɽƒó@ýóÆû„£X™mƅšÂÄŠkUƒ„@™™šó„kÅ¥aĵŽÇ@™akƒƒa„¯ƒUV»maÂUU„ƒaƒbUxmKƒnkm@™k„mK@ƒxó@¯n¯KǦ@ôÅèlxkx°nƒƾ¯KU¯WÄ·L@VÃIUb™yWbX¼Ç°"],encodeOffsets:[[111589,35657]]}},{type:"Feature",id:"6104",properties:{name:"咸阳市",cp:[108.4131,34.8706],childNum:14},geometry:{type:"Polygon",coordinates:["@@šIXyÄŠwlý„KlƒXIVaķƒ™»Âa›£„¯aVU@a™‚wÈÅ‚ašL²»‚VÂœUln°WȯW»XašzVaÞJ@Uƒ»@¯ÃbÄŸwly@£kÑţ±Wу@ka™IUƒƒnƒ@¯ƒómÅ£U™b™U¯lÇIÃb@¤Ã@kV@zÄŠ@™ĶnƒVV¤k„V„„bmź¯z@°™a¯J@œƒ¤@„„bUx™bƒ„@`™xUﱼVXÂœW‚„UnUJ‚LĢ¯ÈKlblmÈXŎ°šU„°LšŽlkÞKš@Èxl_°ĶUÃ’kblš"],encodeOffsets:[[111229,36394]]}},{type:"Feature",id:"6101",properties:{name:"西安市",cp:[109.1162,34.2004],childNum:5},geometry:{type:"Polygon",coordinates:["@@°²@‚„ÂmVVÈÈlš¦„m°xla„@U¦°ÈV¤XbV°lXÞaÈJ°kšVšaŤVôn°„„@„mV„šJlb„@XÒŤ²lÃ’@¤kzÄ xÞa@°„¼ĸK°XV‚°L„ƽ¯mlwkwÆç@óÈ¥°L°mô@„w@aƙÂK@b™Â@wÃLƒyÃ…UƒÃƙ@Âĉ¯¯Uóx™W¯x™_ÃJmLUx¯b™ƒóak±mÃUU„™W¯b™aƒ»óÂó™xƧçĉbƒaĉxƒIUV¯¥Å„±w—l"],encodeOffsets:[[110206,34532]]}},{type:"Feature",id:"6102",properties:{name:"é“œå·å¸‚",cp:[109.0393,35.1947],childNum:2},geometry:{type:"Polygon",coordinates:["@@ÆxĸƨšKlxÈX„K@ÂVWƨIlmÂœV@wVUmUnmUalk@kVaUaóaƒÂóƒnKV™šÂÞK@ÃW_ÂxóKmVk£ÇmnÂÃ@¯ƒVƒwóK@ǯXkm›VÂU±¼™KÂbÇŎÂx‚š@bUV°bƒÂœ¤‚bš¼ĸ„Ub"],encodeOffsets:[[111477,36192]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/shan_xi_2_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"1409",properties:{name:"忻州市",cp:[112.4561,38.8971],childNum:14},geometry:{type:"Polygon",coordinates:["@@Vx@lnbn¦WlnnUšmš°š²VšÂV‚VVVnUn„ºlz@l„„@Jƒ@kXWVXl@Lƒa@„ƒKUL„ŽlbnKlLnK‚LnKÆXn°šbVV@bUVl°Un@LnaVJUbW@UX²l‚@ÄŒwlVVIšWnkÆa°„„anV‚Kn°™UW¯@™aVUVk@Un@„aV@ValwUanmWU„k@WVUUanaVwnLVl°@nk@mVU@UVK@w„LVKVU@ƒ„K@UUKVUV@@bnL„a‚V„aôšlIXmlKX_°KVV@bVV„@šzV`kblI„V„Ul‚šL@bnV@V„ÂÄŠll„„VlIXW@k„a‚U²blKšVnIlJ„albXXlWVn°JnšnL@l@XlJlaX@„X˜W²@l_VmnKšU„blU@mnkVK„¯@U@ƒma@kXÂ¥VƒmakkƒLƒÂÂa@aƒ@WIUUVÂXÂWWnk@a°a@kkm@kUUmJmÂ@WUUUIk`m@V—kaWWkX™KmƒXk¯ƒ@ÂWKƒLkak@±bƒwÂ@ƒaƒa@akaƒ@ma¯@ƒL—KÇÅkKWbkmġ™±ÅUƒLUK™VVkƒm¯LUVVbƒ„UwUW¯bm„ƒUÂLƒxWJ—@ƒklmkUm@@KnwVkVK@akwƒ@@a¯bƒKkn›VUI™b¯mmbk@UbmKUL@xUUƒ@klmLUÂŽlVXI‚VVVUVUÂœU`mLXVWbXnW`Ų°xmÂŽÂxU@mÂĉƒƒwU@mbU@UƒmbkVW¦kJ™@ƒX@`¯Im@UlUVVnÂb@bWJXnmbƒJUU™UUaƒ@UamIkaƒxƒ@@x@b"],
+encodeOffsets:[[113614,39657]]}},{type:"Feature",id:"1411",properties:{name:"å•æ¢å¸‚",cp:[111.3574,37.7325],childNum:13},geometry:{type:"Polygon",coordinates:["@@@a@w„@„wlbnJVb„@VbšVVV„InaWmXI@a‚aUmVUVkn@°J@_„Wš@lIXÂ¥lUnaV„V@naV@„xĊ„n‚V@‚wn¯wƱX_WmXaWUnKV_V›VUUUÂUWJkUVÂnKlk¯Â™@@kmKUaűKkU@WmI@WUIlUUmVwXƒ‚w@ƒÂUlUVwÂœV‚@„Lnb‚W@anU@UšaVkô@l»n@na˜JnUÈLVaƃUUVm„ÂVKVƒ²L@mU_lK@UVWkU‚a@a@U¯aUaƒÑóÑUb™„ƒKk@@aƒk¯mVaUwVÂĄkWUÂmK@UUKmXUWÃwUa™LUU@aWJUUU@UaÄU@WL@VÂKVaVI@WnU@alIVKƒƒ@kIƒÂmIkJ@™m@ĪÂ@@_™K@xƒ@kaW@U„@Vmn@ÂŽUKÂ@mIƒJUXV¤XXWlkKƒkkK@XmJVakImJU@ó™¯LWKUV@nUVƒLkxmKkLma@kXKmmƒLƒaÂb™LmK@VÂ@mXVÆUxƒX@`nL„aV@@VmLUVnLlLš˜„b@„šŽ°²nx@b‚VUxlb@V¯bUV@zV‚XVÄŠXVx@lVn@VnnmÂŽUš@LlJXVƒz¯VWVXbšV@bmn™VUVk„Çþń@XVxmbUlV„Uln„W„@„Xl‚@VLXÃ’@bÞJ°¦„L˜ò„@nU‚b@°„X@ÂŽXbmVU„V„nb@x‚x"],encodeOffsets:[[113614,39657]]}},{type:"Feature",id:"1410",properties:{name:"临汾市",cp:[111.4783,36.1615],childNum:17},geometry:{type:"Polygon",coordinates:["@@nW‚@@UnLšK‚a„b„KnnWL@lnblKnLlw„KVU@mVUXL°KôšV@nIlJUbnI@WlL„llLXkWWU£VW„InJ‚@VL@Ânm@UVƒX@lb„@@wšL@`‚@„šn@V@lw„@n„VmVX„WmwnUlƒœa@_lK„wVlUn°xVKVXXWlUšVVI@K@K„n°KÂœwlVlU@kna@ÂV_„Wn‚m„UVm@kXml_@m„LlKXw°m@_ôJVUV@X™l@UaV@Va°I„lk»VwUkVÂmwÂUmmVÂn@V¯@KƒU—wmK@U¯wUVÃ@mJƒU—nWK™@@UnKVa„_lykUmKÛnm@™x@ƒUUlwVk™ƒXW@ƒa@Uƒ@@K@ƒkIV™nammVakUlƒ@wX@@kƒ™¯@ƒVVbml@„„°UbULmlVbnbÃ…K±ÂÂVƒKVXUJWaÂ@ULWaUÂU@@U@aWK@UkxUKƒLUUUJ±UkL@V±kk@kam@UV@l@LWl@Ân@VVUx„LlUUx@VUV™U@aƒIUl™L@°mLU‚ƒbkUUaWUUaUU@aWK—LWJ@bUL@VUVVbU@mÂ@a@ÂÂkmKmnĉlUK™XƒWUblb—xmIkƒƒU@xWb@lkšVx™LXÂŽmzVV@bklVVUzm˜@bk„@ÂVx@xlÂŽU„@lUbVÂnl@„Wxnl@n@ÂŽUbV„mL‚mƒb@`X@lUX@@xlnkLWaUJnnWV™Vn@l„@bULVV@l™V@XnJVX"],encodeOffsets:[[113063,37784]]}},{type:"Feature",id:"1407",properties:{name:"晋中市",cp:[112.7747,37.37],childNum:11},geometry:{type:"Polygon",coordinates:["@@@šlInJ„ÂlJ„@‚„ULkJ@bmV@XUJUb‚L@UXKV@ރVbV@VVXI@bVVšKVbÞxVXnWVL@VnLV‚lX„ÒUÂŽVxUb°n„l@bl@„LšƒVaô҄ÒVb°b@VnLnnV@lmn@lb„U„V@„‚JÂœUVV‚Xkl@lUzmJ@xšXkl‚bUn„JVšUb„nU‚lb„V@nlLX@lakšV`Ub°š@XVJnU‚L²KlxnI@KV@lbUbVV„KnVl@„zlm@Uš@nŽšI@WUaVÂl@@mVU„@XkWÂ@ƒnkVKVƒ„_Vw„y@knwVa‚@XalU„@šVnml@„X@V„L‚KVaÞbnnlJšI„mVKn„VVVInVlU„@„m@™mÂXK@UmyUI@mWUUakamw@wUwmLkakwVƒmK™w@wUam£Ây@am_ƒW@™UU@knmm„amU@WUa@knw@ƒUUUUV@nƒJmÂ@mVUkKVUUUkKmwƒKULƒKUImV@lUn™nÂÂŽm@mbUK@°™bUnmbUmkkƒWUb@am@UXkK@a±@™V™@ĉř„V‚UXVxUVkLWl¯@@bULUlm@@nm`—XƒlWakIkm›VUbUL@Vm@kIƒ@@Kšm@—VaX‚I@W@aU@kUƒVU_™KƒbƒJkkǎ™b@nkKmL™wÃ…W@kVUUƒVU@WUIƒJmIXmma@_kyVaUUlkUm@ƒkU›x¯Lƒm@L@LUJ™UkVWXUWUL¯wVmUkƒxkL@`›bk„mVnxƒXUWUnmƒƒ@kxU@"],encodeOffsets:[[114087,37682]]}},{type:"Feature",id:"1408",properties:{name:"è¿åŸŽå¸‚",cp:[111.1487,35.2002],childNum:13},geometry:{type:"Polygon",coordinates:["@@„Vl„nJ˜wkaVa„XšWVLÄŠknmnL‚l@Â@bn‚V@UaVU@UVK@aXI˜KXL@bVVVbXVVblV„aVÂnK@¯šKVk„J@bšVVU@UVwkVƒKVwUUm@@ÂXk@K@kVUn@lbl@²l@UlK²VVIVV„KVLlw@VXL@b@VV@VÂŽXbVK‚@XbVIUW„L‚U²ÂÆLmaUankVKVaƒ¯@ƒnkUa„U°@„š‚Ân@@kWa„UVaXUWÂ@IXKVw@U™ƒ„™WU@W@Â@UUƒU@mnÂ@ƒ`m@UUULkUmJ™IUƒ@@UƒK@UÂ@›anĪak_@wmKUwmakV™kmK™V™k¯b™wƒ`kwUIÇx¯»ÇaŃmnÂ@@™mƒmUkV@wkKW@kxmL™UkÂĉLÃk™xÃw¯lóVU„mV@Ä€VVX¦W¤kz@`Vx°„²ĸ‚š@„Ul@x„êĸNJ°¤V„VlXLWnXxmV@nUl@„"],encodeOffsets:[[113232,36597]]}},{type:"Feature",id:"1402",properties:{name:"大åŒå¸‚",cp:[113.7854,39.8035],childNum:8},geometry:{type:"Polygon",coordinates:["@@²£šyl@ȘĖ@bĸŽĢbĸ„˜ÂX„a‚KŤnn@ŎôllÈx„nVnÞDŽV@b‚nXllL°KšbVb@J@b—„‚„@ÂŽU„„xlKXLlKlÂXk„Â@Ulk„JlkUƒVKXUĂVIVm@_nǚLšašl‚w„VnU@UUwma@aƒaÃaÂLmUk@@Wƒ@U@@X™wVWÃUUUk@@VmLƒKV»nwUw™aUL@`mzƒJUIVƒUaUw™KUaVIlJôanÑlLVUn@ša„@VV„@@UUwVK°Vn_lJÆLώW@UUUÃ…@»lm@aÞIVwXW˜UUkkm@U@aƒU@ÂmwU£VWU_kWmƒXwW_°yUkkK@UÇK@kkUVymÂóK—U@KWIƒbUak@mJ@bkbmLkŽ™UmƒkVU„W¦@lnb@„@Vƒ°ULml@nkVƒa™VmLUnk`±@—XƒWW@kbǦXŽ¯„WxÂI@xmbmxXlWV„„@bÃ…ÂŽUz@J‚b@bÞb™ŽU@Wbk@ƒxk@WX¯VۙƒWÃbÃUkVUU@alI@a@akLWa™m@U¯UUmÇL@K@aU@¯VUkƒKmX@`@ÂœkJ@nV‚Ub@ÂlbVÆXVW„ULU`VbkLUV@XWl@bXJ˜@ÂÂVbV@Vl"],encodeOffsets:[[115335,41209]]}},{type:"Feature",id:"1404",properties:{name:"长治市",cp:[112.8625,36.4746],childNum:12},geometry:{type:"Polygon",coordinates:["@@Uk™Lky@I‚JVaÂÂ@mÞaWšy@_ÂW@_WƒXVlUVwš@nw°K@m„ÂUƒVaƒmVÂkU@mmmnLVUmKXa™U@IlKVUnK@UmWkX@WV_Vƒ@akU@a„KWIXyƒIUVmUn™Ua@ÂWaXUVKVmkUWVkUƒLU@@VƒbƒKÂbƒIUmƒ@mbVL—x›WUUkn±V¯wƒbÃ…JUbmLkbmKÃ…KƒbVnUbƒV™KUb™KUbmLÂKmƒb™aƒKkUm@UÂŽnn‚VnxUÂVlUxl¼ƒk¯JUbU@Vbk@WšU@UVóI@`¯nWxkLƒK@nk`Wn@lUnƒVÂnm‚ƒXU`@Âmb@lkV@„VnklVVUblz@`nbWnnJ„IVJ@XUVV„UV@lÆXšxnKlL@mšaÈÂll„I„ašLV`„UlVV@@b@XÂJWÂUb@˜™n@L„@lJn@@UVKVaÂœUlnlJXb„k˜Wn_@mn@VkVK@a°@XklKVUUwVWUšƒĊƚ@šU²@@blLVWn@@bVa„XllVnnaVmša@¯VLnan@‚šmVm@knUVJ"],encodeOffsets:[[116269,37637]]}},{type:"Feature",id:"1406",properties:{name:"朔州市",cp:[113.0713,39.6991],childNum:5},geometry:{type:"Polygon",coordinates:["@@XXWVXVWnnlnn@èƼ@„„xlš„ŽV„nblšššVŽÈÂUVl‚š@„blnÂœL܃ĊmUkU@Ua‚—@WI@aXk@WVUlKUaV_VKXƒWUUÃ…ka@ÂVaUÂ@mlI@›@_nW„LVl°UV@@b@LÈKVn°V@VšnXblK@b@bkJ@bVVlUÞVÞa„Xܚ°UXWl@„wl@XaV@šÂÃa@aÂa@IVyÆÂ@aƒƒXUWknwna@w‚JXw°ƒWÂÈ¥kI@W@kmKm™¯IUmkXWWkaƒbkImJ™UkL±aÂVƒb@lWXkJƒUkƒĉkƒÂ@UmU@a™KkƒVƒUkJlaU_™yƒ@UU@aUU¯LW`kLWnkJó™ƒbÂUƒbmK@aU@UVVL@VƒL@„UVULƒK@xUL@VUV@nml¯@UkmKUxmbVbUV@XƒlXVmnVbkxUbU@ƒbm@@VUlUVšb°@VX¯šm‚"],encodeOffsets:[[114615,40562]]}},{type:"Feature",id:"1405",properties:{name:"晋城市",cp:[112.7856,35.6342],childNum:6},geometry:{type:"Polygon",coordinates:["@@lV„Lšb„an‚LnKVašLVašL„UVaUm„aÆLnLlanKVaÆI„a°x²UlmVVÂœX˜wUKna„@Vn„J‚a„L„a@UV@@alUkKVKnkmmVwUk„w@Ī@kxWUXƒW@@mƒk@aUa@a¯aƒLkKmwkUm@kL@K@aWIXmƒVƒXƒWkUVakL@UVKƒw@aUK@UUKmLU@¯n™KUwVƒUIWJÂUWmka™@UXƒJƒk@UkmW@kLWKÂVƒx@bmI@VUaVU@a¯@UUmVÂKmXÂ@±`ÂkÃKVxUL±akL@V™bƒLkKmVƒ@XÂWVUbƒVXb@lm@ÂÂ@lW@@xk„lVUbnnmbUšlJ@„@L„@@V„b@‚WXš„UlkxVV@„šwn@ÃœmnLlVkzƒ`UbmL@Vš@XL˜m„VnIÞ@VU°x@VnL˜x„V@LU°"],encodeOffsets:[[115223,36895]]}},{type:"Feature",id:"1401",properties:{name:"太原市",cp:[112.3352,37.9413],childNum:5},geometry:{type:"Polygon",coordinates:["@@„@VV@wVKnLVal@na°nšaVJÂœUlm„L°a@b„@lx@bULUlmx@Ln@lVkn„l˜@XI„w‚K„Vnƒ°aVXVx„ƒUaVU°K„nUlšUVL„KÆVš²Ģ‚lnXalLÈƘL„KUaVkUanmWU™aÂ@WwkUWU¯y¯Ñ@anIl@@aVU„m„I„ymUƒLUUVakaU@@LmJkw±LÂKmVUI@W¯™VaU_l™kbW@kK@mƒUkaVƒmVaU™ƒIVmÂalk™W@wnIVy@klkÂWUU›VÂI@ƒƒUƒVkam@knU@mmmK@bÂblVUX@VkLV`@n±KU„ULƒ‚UnVVńUbÇKmV—Imbm@k¼ó@Ul™b@VmV@bÂXmaƒKÂ@›UUxkV‚V@„ÂxW„UxVnkVVJ@XnJ@XlV²LƂVbnL@lš@°Â"],encodeOffsets:[[114503,39134]]}},{type:"Feature",id:"1403",properties:{name:"阳泉市",cp:[113.4778,38.0951],childNum:3},geometry:{type:"Polygon",coordinates:["@@°@nb„@lb@b„b„b‚@„x²al@lb„KXU@m‚kUWkkmUUƒVwV@XUWÂ@™naVklKXblKnL‚ƒnLVanImaXKlL„ašV@U@KUKW„alƒXK@£WKXUV@VU„ƒUUVW„_V™@W@Â@K„@šƒUƒƒIWmXUmƒULƒn™JkImmÃaUbÂLƒK@UƒWk@mn™Uƒ@kVWbÂ@Ubmx@lƒzUxƒ`U„ULml@„XÂWlƒ@UV@nk@U‚Vb@X™Jm™@@Vknƒyk@ƒzƒJƒnUV@bk@mJ@b°Ò°zXVlVXx‚@šbXVmnVbUlVb"],encodeOffsets:[[115864,39336]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/si_chuan_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"5133",properties:{name:"甘孜è—æ—自治州",cp:[99.9207,31.0803],childNum:18},geometry:{type:"Polygon",coordinates:["@@ƒaXamƒ¯wmÂ@±°wUwV@UaVw²Kš™„U@UƒU„¥‚a„ƒ@£Þ™ôx‚Knkm™X¥™IUƒÃÂUwlk°V„Â@ƒÈ™‚KUwlkUyV¹„mšx²Xll„ÑW»šÂ„l„w°UŎ„nƒ„„˜Jœƒl¯°V@wôIVÇn™nUllšLšÂVǚLô¼XÂW£@±„Â@Â¥k_ÇJƒkUéƒkšƒƒwXa@ƒšLlw²™Vx„b‚mš¼ÈxlLȃ„VWÞn¯mǙÑUÃlÛkwlÂÂĉmƒULmwUJ™ç@wkm@ÑlUX™ƒÑôġƒÂVa™ƒUф¯@wķÓkbV„mnU@@y¯IÄ·KƒV@¹šaĎ@k„mÞU°¥@a¯Â@anKlblU„¥@óğç@ÂÇw@wkÂla„çñk¯±@ÄŸÃUÛmïwƒ@kb±Â¯akXWÃœkXUÆÇUš¤X_Æw„V@¤ƒXU‚ƒbÂUƒŽƒIUlÇUkÂŽÄ¡@™aXÄŒmlUÂlèUV@„mVk¦Vxš@¦±š¯ƒƒ¯¯anlWš¯nƒƒÅw@w°KVak£m@klƒKknÇU™»óKšīlaUaV£Â@™™¯@ƙU™VƒÛÃÇXÂĂl—ÓlŹ„»WUÄŸJ¯£mx™Lĵô›ºX„VlUll²bl„„lŽƒxónn°ÃšU¼mJUš¯nƒƒƒV@êĉ°Uĸ™w™@mƒ@¯kmÂXamѯaUwÃKU¥„ÂmÃ…nÂ¥Wmn™ƒ¹n±ƑƆÇôXê±NJnšƒ‚UôlÄ–kÈ‚VÒ¯¼VnƒȮ¯ĀnƆ˜Ģ@ÂŽk°V°¯ĢVlkšVxm¼X²™Ŏ@ÂŽVxknWÜ°ÂU‚¯n™ÆÃÂœ@`„ôòÂ҃‚Çzn‚mX@x„è°K°Å„UČĬóĖă˜ó¼ÅêƒÒƒbmšk@V„ÂŽ˜„@Ã’Âl@nĉܛê—x@Ä–mlśJ¯¦óxȭ°ÃÂmŽ¯Lĵè›Ā@Æ„l°żÂƒ‚šX@xmÂŽkV@z@‚„°blÂŽnÞ°J@bn@ƼUVƒUóŽóLƒ°X°ÃLƒxUn„°ƒĬƒn@lnL@ŽÆ@šn„KÆxnUnV˜InĬmÆnxŎ¼ĊIĢóÞ@ĊƒƨbUƒ‚mVÂÂÂ¥lÂkƒ‚wnL„mšÅÆ¥Xƒ˜wÂU@w‚wUÂޙ@alUUŚÂU™Vkkm°aU—°Ó°w°U„ƒ„b°ašÂ²K˜¯œĕ˜@ÈbÞÂÄŠaš»„XVm°In„‚Ĭk¼Vb„ašJšôš£VÂÄŠan™‚k„ů™™nĆU@anKnĮ‚bÈmƎš»nI‚霣Ġ™"],encodeOffsets:[[103073,33295]]}},{type:"Feature",id:"5132",properties:{name:"阿åè—æ—羌æ—自治州",cp:[102.4805,32.4536],childNum:13},geometry:{type:"Polygon",coordinates:["@@l@@þ²I@lƒ„VL°wnJ°Uĸ™Ŏè„Ilw„V°¤nĮ™¤Ã„lè„L@„ƒ„@x„l™è²ôĊ_ÄŠÄ¡VÈôJżīlbXšÆÈVÂŽkxÇVƒ„n°„¦Üb@è@nn@@°šUÈ¥WDŽ_Uala¯¯UǙkƒ»„mVwk»˜k²°VxlL@¤œ_@x‚`È‚Ėöb˜š@l²alX„a@bnK°¦VK@nnWmx@nUnl@@lƒlĉÂk°l°UXkmW@Unš`k„ÇL„ŽW„ÛÈVxšVVlVk@l„IXb@ylXÈW˜Į„WŤzÂœy@šmIƒŽ²ÂšJ‚š@nŽ°@V„„J°a„Å@ƒŎkVǚk™aUw„KVw™™Vƒ„@nkm™@±ôkô™ĊJš¼šInÑm±nIššÞ‚XȃĊxÄŠUÈbÃœyÈ£VÂkw@kVUV™„m@ša„»ÜbÈmƒUXwÃxƒUnÂ¥@°ġ™Å‚aÂœJVk™aW¯Û@W¥—UÅĶ™@¯ÂkUƒŃ@ašI@mmanwÞ‚W@ÂϪmw°»UÅ™k¹±W„xVx¯¦U°ƒzÅ£W™w@°ÇVÑk¯@„y°aš£š@šmšnl¼„ašÃÃakwUıaĉImlĵn@ƒm@kkVƒ¯Ñm™ĸ™°x„Âl™œ@˜ƒXVÞmlÛÙĉUÃ…Â¥mwÃ…Â¥VaUw›™XÂÄ¡ÂÂÂÄ‹aVůÛŹlwU¯ÂU™ó±™xÛV±¯¯n¯mċƒÂLmÂnÄŠm‚™@™_kJWaÂXmwUƒĉK™»™@mwXÃUDŽkKÇw™»ÂnƒaUw±škx™K@„Wb„x™„„lVê„lÈIl`@¦ƒŽ@²X¤WÂó»™KUșŽ™KkkmVmšUÈóJ@x¯Uk°›„—Iƒƒm„Ń¯Vƒxƒk™ŽX¼ƒÒkk±W™wƒnUºVzklVxÂLǚ@„ƒŽ¯UklVxÞÂV„šJW¦nšmlÂLówÚ@¤ƒ„Âbƒ¦„V@VƒV™š±LUxVbU@Vx¯x@²n‚°xn„Wb„b"],encodeOffsets:[[103073,33295]]}},{type:"Feature",id:"5134",properties:{name:"凉山å½æ—自治州",cp:[101.9641,27.6746],childNum:17},geometry:{type:"Polygon",coordinates:["@@ĶóšKnw°¤ĠIXVƒ¼kź˜Ôk‚„ÈWŽÞȄÜUÂVšÅš°@šš‚@U¤Vbkb™ĬôLš¼ÈVlm„Llkn@l¤Ub¯L@xÆx„„°mX™mk°b„°°„²™@¥‚™UwlÂ¥nU@ƒVUkçVÂnkWċšbÄ¢@lÂÈVVk„J„‚V„aV„W@£ƒUÆxW`™£ÈVVÃ…lWXÛlW°b²Âla„@°xnÞVÜĠÞ²@l°Þ²ƒèkblÂŽ@xÈx@ÂĠènal£nU‚Dz@‚ÂÞK„nn¤@¼˜°U¼„nV‚šXU‚šbn™ĠUVbUlVš°LX„@lV㏆UnK@_ƒyÂXVyUwmIU»Vƒ„kÇ¥šÿkkV¯m±nÂ@ƒn¯ÜanVVƄz@Ž‚bÂœwÃœb„m@wša@kƒmk»@™a@ÂVUUó„w˜@nb°mš„XÂŽmnVbގVÂôanwšJ‚ak£lw„˜šLšÅnÃ@wlÂ¥ÂIÇӃ@U™™Lƒ¼kVǃÅó¯kVmmw@ƒn_‚Vn»°LÅ»@éÇçŹīVÇÃ@ÃÄŸU™ƒaÂVÙ™š¯ķlÅ­ÂÄ¡lƒ@óÞۂċ@¯nkUӄ—m±™IVÄ¡UwóKUn±¯—K›w»ƒKÃÂV„nl@„óxUwţ›£ĉƒUmŗÇÃK™„ÃUÂlmKģÂUVÂŽ@ÞȎW¦„Ò@Ĭšnny‚@nÃ’mÂœVŽ—¼@°Vbl@VlnUUwl™°a@„œ„@llnk°lbnKWÄ€nÂŽU„VxUŽ‚²Å‚m¦Û›njƒaU„Vbš@¦m`móX™Umm™xÃ…@±Þn虲™U¯»m™ƒV—m@wƒU@wÚÃmÂLƒa@„™VÇUk„l°¯„VlkVƒ¦UšmxƒaULUèVx@„kIUxmWV¼¯VmȯšU„nl›È—@m»Å™ƒVWxÃ…bÃ…ÄŸW@kƒm@kVV¦mlnn@‚Å„l¦ÅƙxkÂœ"],encodeOffsets:[[102466,28756]]}},{type:"Feature",id:"5107",properties:{name:"绵阳市",cp:[104.7327,31.8713],childNum:8},geometry:{type:"Polygon",coordinates:["@@„ńlV°Âš@Åĵ˜VXȮUĊќJ‚w„@È»m»š£°Kšk@ÇnÑÆš@„w°JUwnw@wšbVbš@VlźLUw„aƒ»„aUklyUUVakwWÂXwWƒUxkLƒmnÂ¥mšwk™˜UX™lJ„w@aƒIk°X„¥Wƒ²Âl¥šaU™„IlmkklƒÈL@m°nlWU™ÂaW—š@Vƒ„@UaVÂ¥@ašk@Çk¹ƒK@a™K@kƒKkšÇX@VU@kx±V™èkIWwUVUkkKÇ@ƒa@wkml¯@kUWn£Wa„aVwnaVÃw¯@UaWx—n›JńUxUšma@L@„mbUÂŽÂU±VVnkxUƙ„VÂŽm@kÂkKW°„X@¤ÇUkÆÇnU¦¯ŽkƒmLVwÃ…K@UóbÇÆÂVƒ¦™L@ⱐX¦mVޚkÃœÃnWU—„›@kšƒŽ¯wķšnš°ÒU„lln@@„ĶmnkÄŠJ²bV„lxÞb™Þƒbk»™m™n™@™¤¯bƒz@ÂŽl°UÒ¯È@ŽšxŤX„yV¯°¥Uwƒw²XlºVŚ¯¼nx›š@ÂŽÂXÃÂmxnb@n™J@b"],encodeOffsets:[[106448,33694]]}},{type:"Feature",id:"5117",properties:{name:"达州市",cp:[107.6111,31.333],childNum:7},geometry:{type:"Polygon",coordinates:["@@Uxn°‚bnÂŽlUnÒƃnn@n‚¤„LnxlU„ššV@„Æl„x°XXxl`XœƒVW‚œL˜è—„±nÈbƒŽ°b@š²x°Kܼ°ĉ„V¦lJnU@¦šÞ‚JÞğ„mšLÞ»šxU„lb„VÆann„alŽ„VÆÂX@lnÅŽV„mU™maÃ…Xƒa@aWmÂœ@‚£@wĉJVƒkk‚kkmƒnk@ƒmna@šal„Kš™‚J@ÂÞwÂm‚ÅŃ@ambkUƒƒ@™™KUÂÄ¡KÂU@m‚ak¯±ƒ„a@aĉÑÅaVwšXlwƒ±—ÂVÂ¥l@@a™kƒ›Â@@£šmƒÂĉÃónWV@ÂŽÂnÃÇÇx—UmbƒaVkkÂk@m„Â@m°ƒÃýXm›akÂÅīƒ@@ƒmbÂ@@xmšnbƒ@mxšŽkÂWL@ƒ¯b@WUXmWÂœÂWKkbm@kx™Xmm@LUl„xlêóK™nUš„all™LƒlÂLó°m¯JVšU„K„„@x˜K²Āô¦l°"],encodeOffsets:[[109519,31917]]}},{type:"Feature",id:"5108",properties:{name:"广元市",cp:[105.6885,32.2284],childNum:5},geometry:{type:"Polygon",coordinates:["@@ÆL„ÂÄŠx°»Ŧ¦˜W„™šLȄ@xÞKÜ°ÞnVxÃ…Ä€lÃ’nJ°a@w„ÂV¯l@XÂWknKnw˜VȚ°XXa˜lX°VI°b„W„nšaššš¥@ƒw°™n@šyÆ@nkÞ@°¯lJn„°IÈl‚UšlXÃ…@Ä·lUVÂ¥VUUÃޙUUƒ@UwƒJUkĉm@ýƒƒlk™WUwVwÂÂWJk@VÂUK™ÂlUkaVƒUƒmLk„m@ƒƒÂ@Uƒ›Ik`@„™UmlUkV¯ÇXKÃ_mm¯@Uƒ`kwmƒl¼±KV¯—¯Vk±Vk±kzma™KUnDZ™bk¦±ŽX„ƒ¦¯Wl„J@bƒxkIWš—Vlš™xnÂŽm¦„nlKVwX„WxXÂŽlxUbVVkzVlƒb„¼ƒbVxŹKUk™@Ua™a@xmxVx¯Iƒx™@Ã…ÂŽmÃ’@șl¯L™¤n¼"],encodeOffsets:[[107146,33452]]}},{type:"Feature",id:"5118",properties:{name:"雅安市",cp:[102.6672,29.8938],childNum:8},geometry:{type:"Polygon",coordinates:["@@ln@xšèVInxVKn„‚ĊkÂlxkÃœVޚÒnÈm°nxš@š¼ĊLV„nx‚WXblIš`š@nÂmĉn‚KȄôÅlÂUÑmU„K²¹@ÂÇÅVÓůVýÞW„‚UVmX„ÆbnwšKUÿ‚™@UmmIUb¯¥Uwƒ™¯™Çmš™„çmanUm»UUƒl—kƒ¤ƒa¯bV™U_WÄ•ÂmÇŚ±ĢUlƒUÂl™ÛVčkUƒ@WŽ¯KU™VkUaÄŸVmš™aV™WUƒmV»—¯@»m£ƒmÃLÂŽ±@ÂÈmVk¤mb@ôƒ¦kVkamL@b°‚@b¯¦ÃVƒn@l„ê™b@º„UĸL°J@zV@nmUƒlaĸÔ@xƒ°VҚ„Ub„‚óĢ„ÒWškV@Ã’"],encodeOffsets:[[104727,30797]]}},{type:"Feature",id:"5115",properties:{name:"宜宾市",cp:[104.6558,28.548],childNum:10},geometry:{type:"Polygon",coordinates:["@@VlÈnl‚XnWLX`m„²nV‚@b°xĢçlnšVm‚nn„@@„°‚UzšlV°nޘÒkxl„w„`UnVb„mšL@albÞKÈۚmܼ°@XǚÂ@wmW@ńKÄŠL„lV„šLVÂŎçÞL²±‚ğkw@ÂUƒy@¹lKX™lKVa@w™™Č@‚w@ÂÂa˜ÇU¯n™@Â@wÄ¡ak—™aÅ‚ƒÂƒK@ÂÅ»VakUWmÄ·wkbÄŸÂ¥mL™akš™@ġރ°¯xVVÞ@VšxVš—VWx„XlxU‚™@k²WVŃULmèULVÄŠklĠ„VÂÂœJVx±nŃ¯¦mwÄŸ@mƒƒlÄŸkkl±@kšUk@¯±Ç™Kƒ—kxl¤Âb™Imx"],encodeOffsets:[[106099,29279]]}},{type:"Feature",id:"5111",properties:{name:"ä¹å±±å¸‚",cp:[103.5791,29.1742],childNum:9},geometry:{type:"Polygon",coordinates:["@@kšVÂŽk„ššÆkšV²UlºÈIlxƒLXèÜlU„„XU‚mkƒbVè„x°@„Â@¼°Knnn@m˜ÆIUbnJ@bVI°b°±@ÂnK@mVakkƒKl¯nbšmĸ„èl@VnÈl‚UUw„wmwnm°¥„L„™lLnÂU@Va™ImbkƒmK„ƒƒnk@mƒb™ƒƒLV„JVUUƒ„VnkVÂmb@a¯JUaÆkk¥„IW¥„Klw—ÑmÃU¯™kVy¯Â@ƒƒ@mmn™Ukmġè¯w@aU±mnƒW_XKWmkÂÇmUkóbUÂÃÂUanmW™ƒ¯nma—@ƒxVôUV@šb@‚l¼„n@l™b@xƒnÛa›xÂa@ƒyUÃ…mUÛbm°@„m‚n²U°ll™ĀȦƒlU„V¼nJVxUz‚W„z@`mL"],encodeOffsets:[[105480,29993]]}},{type:"Feature",id:"5113",properties:{name:"å—充市",cp:[106.2048,31.1517],childNum:7},geometry:{type:"Polygon",coordinates:["@@ȲVmšLnblyl²²UUl˜°U°²L‚»„knÂlx„_VŽ°@nnÞ`WL°ÈUÂŽVlnkšV@ƒl_ÂœJV„‚@„„n@lƒnKV£™Çšƒ„UV¯šm„@laX˜U„‚UbVx„@VkôJU°Jn™@™‚wUk°wnÂUƒV_nJmknmm¯Vwk¯ó¥±ÿ—L@wƒƒƒLVÂU™kU›bX¯mykI@a±Kk¦ULmaXƒƒVm¯ƒK—z±ƒklUIVbÇJšƒkL¯™l™ƒU™ÿ™UƒlUÂkJƒUmÂŽUUkVVklKk@@a™U@„™J„²ƒxƒ¦kĬ@¼±ºXnWb—xƒU@xƒx@lšL@b„Llº@șl@bU¦Vbƒ@U„™@X˜‚bVškX¯m@nÇKk„llknƒJVš"],encodeOffsets:[[107989,32282]]}},{type:"Feature",id:"5119",properties:{name:"巴中市",cp:[107.0618,31.9977],childNum:4},geometry:{type:"Polygon",coordinates:["@@V„U„lbkVšŽVLUÂŽl@XI‚ŽUxVxšXkl„„@þĊnVl„IVx„@VVÚVÞUVU¦kV@ĸWÆô²š@VÂÞnš@Vaôb²W@‚K@ÂXUmÑUW°¯°Ina@y„_lWn¼lLUbô¼„Kla@™nkUyô—Æx°@šÂn£™Ã@Â¥mVkIU¥Ċƒ‚¯Û»¯L±w@™¯a„ÂÇa²m˜ƒ—ç›KX„UW›k_Ww¯WƒwÃ…k@ĪUĪkVmwƒK£@mmmńmÑkVmÂÂamnnlmIU`V„m¯xVlÂx@šmš¯IV‚óIUlƒ@UwVaƒÂ—VW‚kbƒ@™nU°ƒV™„šÈU¤"],encodeOffsets:[[108957,32569]]}},{type:"Feature",id:"5105",properties:{name:"泸州市",cp:[105.4578,28.493],childNum:5},geometry:{type:"Polygon",coordinates:["@@VVXwVKn„˜wnVƒn„l@b¯xmKUbVn°°X°@blLšènV„@Vn‚l@U„LnmmUna„VV_ĶV@wnJ„„l@@kkKVólaUwnJm„wUÂlm@ašÂUaôKVÂnJWbޚ@VšwVLXÂ¥VVš_Þ`šw„ÂWƒÞŹmmnInÂ¥Wƒ@k„WV¯@ƒ°kI™ŽƒLk¼Ç@k¤±Xk˜™nmïUlÅÛKWV¯kƒlUwkLƒÓ™@U—@ƒ‚w@Ä¡XV„˜WX„š@UbVbšÂV›š_kÇV™lU°lnwŎ¦ÞaƯnmm¯šU„™mÂ¥nkVmkƒl_ó¥¯UÇl¯@™ƒ™L™kƒ`¯ÂÄ·LUy¯@mw—¼ķ°ġ_řU°mlšnÇVUޚ„@‚ƒšÂ_ƒJUnV‚UXšbl˜Ģb@x@ÂmšV°—È‚b@‚ÂxÄ‹@šš@xUbkLWškL@º„zV‚@ÂlxÂĠ±²"],encodeOffsets:[[107674,29639]]}},{type:"Feature",id:"5101",properties:{name:"æˆéƒ½å¸‚",cp:[103.9526,30.7617],childNum:11},geometry:{type:"Polygon",coordinates:["@@°n°m²°ÜUšw²ŽôÂVš°ŽVÂkxÜźUÅ°ÄŒb‚ŽĢÂlaÈL„»ƒÂ@k„wVǂ@„ƒnÛƻșUðKl_„V°Uš`Vbn@VbÈLšaVU@Âƨ»V™nIl™šUUa„±lIk±š@VÂnKmÂÃ…@WaƒK¦™lVÂÅškK™ÂÃ@maXÇmw¯IU‚@kƒVƒwUmVIƒƒƒç—ÿƒU±ŽÅ@¯È@xƒK@wƒLUbÇKÃ…Â@mã@yóUóóUxkI@WlIUaƒbƒaÂÂŽVĀ™LmxÃ…aWƒUnÂVƒÂÃXUþÆ°UÔÈÆ@±ºƒLnVVÃ’kÂóÆ"],encodeOffsets:[[105492,31534]]}},{type:"Feature",id:"5120",properties:{name:"资阳市",cp:[104.9744,30.1575],childNum:4},geometry:{type:"Polygon",coordinates:["@@„è„„UJVn„x„U@lV°JnxWÈnbÞ@šŽlLŎ™Ušk‚¥„LXbÆ@nÂŽmLU‚@zlbXmlnVynL„çšJVb‚UnómUnamU„anÂ¥lKV_²aValWô„n@nƒ‚bVÂÂœK°¯VblW@kkƒlUnlV£°W@w„UXk°KVwƒmVÂkwVyVI@wkmƒVÃ…_Umm@Uÿmbk£™xUaVw±V¼V¤kLWxU@Uk™bƒyƒXšómƒ°V@@zÃÃ’kKƒn™±U@@_VVkĂaVwnLWaÂlm@@kkVVl™¦kIV`±n@w„Kƒƒk²™aƒVUUV¤™nkxmUkVWVnLUbVbƒ`kUU„mLU‚mX@`Ã…bǚXbWLXŽ›n"],encodeOffsets:[[106695,31062]]}},{type:"Feature",id:"5104",properties:{name:"攀æžèŠ±å¸‚",cp:[101.6895,26.7133],childNum:3},geometry:{type:"Polygon",coordinates:["@@„b‚KÞnޙ@x„V@x˜n„Unš°¼šVš±mç²ÃÆ@šwnnšVWÂŽnôn_@¥‚™UaVƒ„bƙœÈ܎n¥Æ±VÂUwVƒmÂXÿmLkal¯km@k›ƒ@ƒ¯bkšVxmVUkk@Ua@¯˜»UÂn›mÑÂ@mz™m@īƒÑX¥ÇÂ@ÙxU¦ƒšÅŽÇUkx@šlb„UWVX„mV@xĵĖ±@@Ž¯xUšÆLnÆm„šx@nXL±lUUVwÂKWak@WxkbšÞƒŽĉbUn@‚ƒ@@xó¦„Ŏ"],encodeOffsets:[[103602,27816]]}},{type:"Feature",id:"5114",properties:{name:"眉山市",cp:[103.8098,30.0146],childNum:6},geometry:{type:"Polygon",coordinates:["@@„šVx°¦VanJVnš@„b„aVbkJ@XlJVwôôôV@zÞ¤@nƎÈLVa„K@x„L@w°ÇÆ@²Â„V˜ĀœmWÂXKWașÆa@_nWVÂnKVƒlV„_UaVamKXUWwnmmwτm£@ynUƒkWƒĉUkWVkkV±çkJmÂkKƒšƒK¯¦mnnxƒxVxÂVÇkUmk@ƒçķ™nmak°„LllUb@nmL@‚¯²¯aUJ@amIVaÃ…Jn—m@mm¯L@»ƒŽ¯@ƒwUç„anlVƒWVƒÛkWç„KkwÇJk¹±V™UÃ…l™™ġV™²ÈƂnXÄ–V`Uš°a„b„£˜l„kVVn¼mVnbƒè™šÈn°š"],encodeOffsets:[[105683,30685]]}},{type:"Feature",id:"5116",properties:{name:"广安市",cp:[106.6333,30.4376],childNum:5},geometry:{type:"Polygon",coordinates:["@@„VlIV‚„kšVšĀ„Vkš°šlK™„ÈIUaVJlk²„˜y„Ln°„UW„nbVKl¥²L@blJnzW°œalV°InÂô¯‚K„kšKkkƒbV™šmôLkéƒwVk@KnnšWlwn@laXL›ŽnXVW@X°a@„XKl™Ânw„@man™@w‚@na@„„@ƒw™ĕġġ™wUÂkUWb@mk@™¦ƒ¥mUÛb±yÃ…n@bml@ÂkV@„ƒlknVbmVnlmš—bÇk¯bWyk@V_UamJ@I—@WaƒVXamIVWkUkbVaƒUUxƒ@VnkVU¼›bkKUxmK™„Â@WšƒxnV@n"],encodeOffsets:[[108518,31208]]}},{type:"Feature",id:"5106",properties:{name:"德阳市",cp:[104.48,31.1133],childNum:6},geometry:{type:"Polygon",coordinates:["@@nUW¥²é@šK„¥‚UÈÅôa@VÆLUxnKl„°ÂV¥ÈmlÅÈV@£ƒWX¯lLlÂn@UšƒVÃ…lwUm²U‚VVÂna@ƒ@KnbV™VwƃœI˜mXwWƒkIVwÃÄ•ÂVUa™IďmKUzkmWnka@y™@l²kJƒ²Vb™VkšmJUšƧ¼@ÂUV™bÇKUam@Ua™_¯VƒUk`¯LVÞǚżm܃„Â@Uȃx@l„ƒ¼ÇKkbWŽœšVxUbƦnxƦĊV"],encodeOffsets:[[106594,32457]]}},{type:"Feature",id:"5110",properties:{name:"内江市",cp:[104.8535,29.6136],childNum:4},geometry:{type:"Polygon",coordinates:["@@²èlUUllXÄŠVX„„lmV@zn¤›ÒnxmnXxlUnVlwšmU£VV„Ušbl±„„ƒL@x²mU_lJš¥UklU@ln@‚kXbmKUxÈbl„UU@`V@š²„mlLÞÑ@yU@„¯ôn‚™„W„zšaVlV@XwlKU£‚»—aVaUwm@mwUVUwkƒlÂVDzLlƒ„KV™m_@yÂkUmƒ@mU™çkKmxkIU‚Ä@LUJ@n±„kº‚LXb™¼@mmIXa™@mamnkW™ÂƒKUƒƒxƒ_U`UklwUw™mUbƒV™²ƒakbƒmkn@`„UmҙšVxUb™I™`UƒaÃÈ"],encodeOffsets:[[106774,30342]]}},{type:"Feature",id:"5109",properties:{name:"é‚å®å¸‚",cp:[105.5347,30.6683],childNum:4},geometry:{type:"Polygon",coordinates:["@@ÞĖUxlJX„Vb°@„xUÞmbUxƒbXbm¤VX@lk°ln@x„bÈ@lLVlVUXxlJšç²UlwV@@UÈWl™„L„w@w„V˜wXaWm²¹@»lī„¥„wƒ±šI@ƒšV@bl@kLUllUVVnÂ@mmU„wX™ċbVbÂ@VUkbmamšÂW@kƒa@™™k@ƒlaUa™@¯b@šmmwó@@lkXUa¯°›LU‚Âam„m@óƒkXUb±bU`kLm¦ƒbnVmbnVmô"],encodeOffsets:[[107595,31270]]}},{type:"Feature",id:"5103",properties:{name:"自贡市",cp:[104.6667,29.2786],childNum:3},geometry:{type:"Polygon",coordinates:["@@lIÞDŽbVŽš_šJVaUwš™nуV@_lm„nla„bš±„UVašnVxkxVlV_„`„wV„„LšÂlXnmnbš@WbnJ@nš»WaÂKl¹²ƒ@mVI@KރVÂlJnw@aW¯¯¯UmVanL°w@aƒk„mmU—xmƒULWxUUÃKÅèU™KUƒƒkĉKƒL@ÆnX@x™‚Wȯ@Û»™nÇÜÃLka@b™KƒnUaVmƒ_ƒxkƒLX¦ƒJl¦ÅlVb°I@bnaUÂŽmlƒUV„UVƒIUŽ„Kš„„a@nml„„ƒŽnLl„našJUbV@"],encodeOffsets:[[106752,30347]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/tai_wan_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"7100",properties:{name:"å°æ¹¾",cp:[121.0295,23.6082],childNum:1},geometry:{type:"Polygon",coordinates:["@@\\sÂŽ@pSÂ}ÂaekgKSu™ÂSsMß`¡CqZ·be@Q^o@‹gieMp‹‰]}•}Ľc_KkÂ…{™ù“ÂA¡r‰[uom@ÑÂÄ¥Jiq©mʼnq¯Bq]ÙYgSÃ¥k_gwU­isTÂE…“‘ĕiqiUEkuÂe_‰OSsZ‹aWKo¡Â­q“ycÂY£w}‹ĩ™ĕS§Z©S™NÂ¥SyLÑ¡±Ks^IY‰PdƒY[Uo†Fp}´\\¬\\j]ˆeÃœÂò‹¤¡–Ä a\\bn™U㺹Ìs¼j®[cíȈEÂŽÄĆ`ļf¶Š®K|VØDÂdKGpVnU‚FjpH—F`†BÂ’[pMºxÖjbpÃŽxp€¬‚|ΟÜÒCŠ²®‚ÜAp„ZG~€Šd˜ÞàV¨|¸€`|Œ²tx~\\~|dFf^zG€ĄŚhÂœdL\\hĸž¼†ŠOªP®lV`p\\]Xpll˜æ¤œCpQ|oF}fMRi†NSon_²qämÂœM„NM‹\\•"],encodeOffsets:[[124853,25650]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/tian_jin_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"120225",properties:{name:"蓟县",cp:[117.4672,40.004],childNum:1},geometry:{type:"Polygon",coordinates:["@@EUDAEI@WNMNCBFAHFFNACDJDPBD@@GD@DIFFHEFGDBDEQOFG@EI_KG@OcJQM]RMEKBGPG@[LaCIICBWKÂCEEG@WBQHCDFD@HSLEJI@IHWECFGAAEKCGDBFCBSBIDCKKHEADMJMFABKOKEQAA@IEEG@GIQAEK@OZEESMOL“lu@SLUTYFQCMG@@SQUAYKAACA@IB@BDB@B@DC@@BGAEFAA@BEGKJCC@AGAIHA@@JC@QEIP@@A@EGIDC@O@C@@@@CJCWKABFLBBEBSQGBAAMIEM@AKBcJEN@BEBCFMAEFEF@J@BG@BFABECKFG@AFQ@@F@BEB@@A@@AAAKAE@GFGDECEFEECBKIKDELDFEDYH@EIACDCHKBEB@BAAC@ADBHABKJIAIJICEDGDCD@@A@A@DHCHJHDFEFGBKRKBGIK@GIMHSBCH_BOJECCJCFKKMD@DNJEDEGC@OJCJHRUL@HRJ@H[DCNKDZHCTFDHCFFKR`TANVDFZRDLFARB@HPAPG`ILAR@TERNDFNHDLCLDDCXDYbHF@FEB@LDDVE@JPNfXPINCVDJJD@NJPAJHLXHDNANHhB@DPNLRMTBFRBHHr@`NBFEBOCCBIAQJDHCHLHFA@HSDCRLFTB@HEFLNF@PELBDJALFLTC@EPFLLP@tUHQJDfIHGTB^JTCPDLKAIBATFPADIEGECEMJ@JIAIHGECFEAGDI\\SPOXAFCL@BQTQBBTMZECYGAHA@GJAE@HCAEME@IECFKJADDBABLTHHG@ILEAMNDJCDHEBF@@JNFJELDFKTOT@JETBFFHBHEHKI@@IJEJ@XKEOUMS@AF@CEB"],encodeOffsets:[[120575,41009]]}},{type:"Feature",id:"120114",properties:{name:"武清区",cp:[117.0621,39.4121],childNum:1},geometry:{type:"Polygon",coordinates:["@@FWôµ@IFCLIB@EHNBp]AGEAKAEDMGZKFGBGME@ILGP@HEFB@BXMEAHUGC@IHCLOD@X[NWHWPKAEF[@EKIOL@EKGBNMJ@EIEHKBIC@BAKMIACCFQZCF]DB@ERAKADIHGEIBCGIIECFaGLZO@EFCNGAGDGAKL@BMG@IE@ADSDEH[JGC@CGA@BMDeK@EIACFE@@GG@FIAMM@CCGC@EM@ADE@CFMAAGHBDKIEAJG@DOGCDEKAGIS@KFCHKAEHIE]BeKNO[IFIOELC@A]GMBKVYCDDgGAICARc@MW@AQE@DGI@@AQ@@BKBAIQQYEFW@CEADIGGBCEIiMEMF_LGEKMBBDWEBGRC@E_CHYGCH_IAED@FFBQh@FGJaJ}AHRAREF@bE\\C@CT`FHC@\\BBF@BID@HGDDJ@@FAHKBARECKDAZBJIVNHCTA@EREAMLHDAFFBVFFC@RNRETHD@FOJMACH@CAB@P@DF@@FGDWE@FFSIEMKQDYCCHKb^JADOCIDGNDBdBCFJB@EC\\A@BJEA@JAAAD@HHD@LFBCFF@BERDHNhZQHMBGHOACCEBWEGD@PSJKCGEUD@CINLFGHE@AJK@HDABBHTB@F`DBFLBBHEDARCFG@ABJBAPVFE^FBGLGCFG_BMLEXGAAFE@@JNRVJHFALFBEHQJCTbNDHCF@PlFLJSXCHFHfVBTNJ\\BPJXC^FAVNFCHFB@FFH@JF@\\ABCFD\\BDMCAAJKQBGAILOEGHILECQLWFENJHADC@QxNHFJNLDFA@CBA@D˜UÂmR@FBL@BD"],encodeOffsets:[[119959,40574]]}},{type:"Feature",id:"120115",properties:{name:"å®å»åŒº",cp:[117.4274,39.5913],childNum:1},geometry:{type:"Polygon",coordinates:["@@TZbB@JHD@DODCLM@AP@LL@BNH@ETFN@`E@DNG@CHLBCJA@AICFKDDBKA@\\N@AFNAGRBFjFFFL@DHLBLFQPcXAZMJ]GAVHAIZJFNE@JpDRRDCLFDGXA@EFF@CFFPDfEBDB@DCHCFCJDJIJBLI@I@CB@@ADBB@FALADGDC@@H@BB@FZGFCCE@@FMLALJDAFFFEFDFCB@@AHCF@L@@BBB@BB@FC@E@@R@BEL@HEFD@G@AH@AIB@@@FEFEBALDDEFAFO^IF@JCBBFPNJJ@D@PRDCEKBAXL@BIFD@T@JE@BHHJORFDI@@B@JGH@@B@BDDLIFFHCD@D@DEE@BAAAB@DAF@B@H@NGLJLMRDNMfGIEPMI@GDAKK@KIDIJ@GE@CFDN@FE@GFEPGV@TCDFKHBBF@RW@DD@@ID@TJFKIKLI@EP@IGBCLAEKLEN@KSHIGYACSD@SEAMBBMGEBMQBCMIGKFB[D@HDLPHDBC@IFITDLG@IIIFGVBNJDLN@VIRI@YIAIHIC@CLKZCBEE@JECEIHEAKGDGECBGEEM@@DA@CCCBBEGA[GEDBBoNAAH]MKiIAWKQoIIPMFQAEEDMH@FMSUYIeF@EK@BIOEKJEBICFKaKPÂFAFSE@LWCCFMHDDEKESBOGBKIEIODLG@CCDEQCEDWEMDIEIB@EHGEEDAEAa@@HqDEJGF[AECCFa@WCEIKAAEQB@FCAE^YDERDDJBLNABD@AJGLJF@FNIAMLH@FPKLJ@FE\\BFOLGXMXW\\C@KPGD@JHDGVFBWN@AEAGFO@KH@JNFAHEHYLNHFCLBFBBHo^MAFGA@KJED@Jó¶EX"],encodeOffsets:[[119959,40574]]}},{type:"Feature",id:"120223",properties:{name:"é™æµ·åŽ¿",cp:[116.9824,38.8312],childNum:1},geometry:{type:"Polygon",coordinates:["@@NGFMDATCNDR@CCbINEHNJA@C\\EEGVE@IhE–[˜w”epc¢·²›^QEKIEKIgiQDkehY£uSDBMkUDOJDHC@GF@CAFBFEN@C‹Q@BeP@@G@HD@@MHQKi@[IGCOCESE@GMA_OcCGDu`aˆ@VZzKDkJBLNXGDqKEWE@cFEFA@ƒISIi@@KMABJGBcMuFEzGVH\\ATSEUBeAÂLCEMG@CEBUHUCGXaBPtUBBFIBFTDFF@DDKBFNGBJPHXDDMDCLJ^mBIHIL@LR\\@LCR[@@z@NFD@LLBNb@RHDBNTPT\\F@BJF@BXCFBHHBDLFB@HODADE@@JHVXCPDHCFTLBBFNCDCCCU@@GAABEHHZHBCAEdEjFDD@GfD@DXFCHF@ERFDLBH@"],encodeOffsets:[[119688,40010]]}},{type:"Feature",id:"120221",properties:{name:"å®æ²³åŽ¿",cp:[117.6801,39.3853],childNum:1},geometry:{type:"Polygon",coordinates:["@@BFLBFJXDb@DEFD\\BHEFIrC@Gb@FBCBFFGH@FJAJFNCXFFCRDCFDDH@CKJPJFALPHTALFCFGCENDDKXF@ETEBO‚bLELJDFALIPFAJL@@FfEZJTVENG@CNFFRBNEJOpJLRBXjJNLG^BBpMAAFC\\HHBAFDADDB@@CN@FFAHFDCHLHFBJGFCFUNKJJTD\\XUXF\\^F@DDDQXXBRLRCBDFEVCDLVDpUl@LEDJHAPRFGL@CETGPBTCDDVI@CFF@GFDCCVGLKEK[Y@MECISG@BKNSCGCKWEAaEBEKNGFSECO@GGM@GYI@DÃ…CMLHPTF@DJHAVVNKEGDETJ^[TJNNd@NOAMFYJ@@GFANDPEJB^aOadSTQSI@MHBDIEOKCG@EEFCKCqXO@@DMFENCDDHCCGJ]AKFoDaGGHYFDHKJiCMFGC@EQ@AEHGAC@IEAATKOHGIC@IXIFEoƒGE[JCFCDHNmRADFZMF[EEBMO{GU@AOW@@]ZeHBDEHBKEfQkuIWBs‡@EC@d[@[^EDMTKCEEcI@cDAB@FCBCACmOCG{PYHeBgPwPFDDALFFFCHQGSD@BHFAR[TaFYXMASUiGFL@DQNCJI@@D@PLDN`ETEFIGMCGBCE‘~CAIFDPEHGEQPHJADFJGHCJLB"],encodeOffsets:[[120145,40295]]}},{type:"Feature",id:"120109",properties:{name:"大港区",cp:[117.3875,38.757],childNum:1},geometry:{type:"Polygon",coordinates:["@@JFFL°_`ONJKDDFIFZN xlb~yFVNRÂŒrdJGzDPVFBCTNND\\UR@E`F@@Ip@IWGUoawOEE@ÃDgK{Ä°EEMFëC—b…™@—KwOCDHHKBDJCDEEEAGHOABFABMCgDLSQ@CFEB‰MgYIDQINE@AUSwSAdYEHQMEyK[KI@GRMLE@@OqOoBOnpJ@BmEAFHL^FDB[C@BBDVFAHFJENB@sNEjQAMYsUgCSBGDJH@\\LjGR@NC@@G@HO@AfR@DÂŒM@EFEADBE@@HGDICCPlVANTC¤vgZlfRChjLJ"],encodeOffsets:[[120065,39771]]}},{type:"Feature",id:"120107",properties:{name:"塘沽区",cp:[117.6801,38.9987],childNum:1},geometry:{type:"Polygon",coordinates:["@@|ODHnPBDADEDA@CB@ddJFFLDNSFC\\]\\@@cFDˆ@nACOMW@M@ITURBRZNHNWRQšoO•j½f‡cqŸAqeiDÿÃyÓįFL|Ch@ÃFFxPpbHVJXo@@JCTR^BPABQA]^MB@bE@@FQBFVJRH@FXtPNZSBAja@@NƒDTÂŽLJrQTHFXZFB`"],encodeOffsets:[[120391,40118]]}},{type:"Feature",id:"120111",properties:{name:"西é’区",cp:[117.1829,39.0022],childNum:1},geometry:{type:"Polygon",coordinates:["@@@LHAHRHATh`LHNHDG`HDGZ`D@FQDAHXFACNAFLVRTBFOfHDCVBFQH@HSXHEPFB@LDBF[bDbLFKJBFLADBDjLvCPEI]FGEIGCBEUSjcFiBIVWfaHCjN^HtwBBFGPBJGjFBEGECGDONMFAP]TDHQOWCMGAMHKIJEIGQ]aDlUG]VGEGDC„{PEbBZmE@@GH@BCA@FMQCFMYMJECELCMI_P¯`]R±œ¡¸od“f—x•\\gF@JUFFH[F@DIBGMMFaJDDQ@MCSDCBENMH"],encodeOffsets:[[119688,40010]]}},{type:"Feature",id:"120113",properties:{name:"北辰区",cp:[117.1761,39.2548],childNum:1},geometry:{type:"Polygon",coordinates:["@@ROHFFGCOJEDBÂ’}DFHANDJHFEFSM_KC@O@CJ@DIRM@CEKKAÂ…LÂ…FKACHoLSJSIBETDJaEIIE]E]K[MYUYQILC@GF[MGNKEK@A@BCWECAIFEFYAGFOMI[OFuDiKACBCEKIAELaKaCE\\CA@KEAFOWGGTG@ERUACDeGEPSAUQKHE`FNjNFJADHHCJFB@DEXZFRRBJLA@AR@@BJ@CHF@BRX@@NQdDBBJhHCCZDLUNA^H@BKDPFEJ\\JMPfL^AJFFGLBDGLET@HJLBCFHDCPH@BIJFCLGABHNBDEF@BCN@@FHDDDN@BNEJH@@HF@DEJB@FfLNC@AHB@DHD\\IFGTCBCF@@JNH@ALKHBHCHBDMFEP@KYbHDEJF"],encodeOffsets:[[120139,40273]]}},{type:"Feature",id:"120110",properties:{name:"东丽区",cp:[117.4013,39.1223],childNum:1},geometry:{type:"Polygon",coordinates:["@@ZV\\N^L^FJFFJIbSCAFTJTIpKDGLB†E†KLBjHTVNBZWbE\\SBQGE@ATCRHDGEEKECBECxOhOfAZGA_YEEWSGqRKIS„C@Mb@BiTAMYsOEWG@IQEURA@EF@@acUOXQRYCUDCHDTEF[SUEgAYDcVGJM`iAWDWLQRMHUHgDsDBLHJFCFDFGHBFFVEAGHCJN@RJF‡PIhBD\\FENCPWA@LFBAFHBEJUEARCDIAEDQBRNa^"],encodeOffsets:[[120048,40134]]}},{type:"Feature",id:"120108",properties:{name:"汉沽区",cp:[117.8888,39.2191],childNum:1},geometry:{type:"Polygon",coordinates:["@@LMEI\\MTABKN@FCDMH@COAcH[AoÄ“A™M¡Wa[Meq™pQRMXMGQYQASV@J@NNXDPmBAtJXlveRLFGACFGAYf@^X@BPV@|HNPFA\\FNEEYBCnQGMDCDE\\IHFp„EFWJ@JJDGHLPBSFB@JBDGHBFR@@FHDNEjDLICGZEHGbHpCLE^BHIDDCGDCFMNE@CP@rWLDEDFFH@"],encodeOffsets:[[120859,40235]]}},{type:"Feature",id:"120112",properties:{name:"æ´¥å—区",cp:[117.3958,38.9603],childNum:1},geometry:{type:"Polygon",coordinates:["@@TLv@CNHFFBHGZFETNPhCVGNGRQXKXCjBN_HIdUZChBVF\\TFECSDGVCZDRQPWdVNA^]RBBAAOQ]DSE@F_Q@[VMCSMADUECOHycI‹qMQEU}zkaŸwENRDENB@ADG@@HF@YnaAOFƒ|CDFHUHH^kVbCR^JHIFLJNGHBDNPXGRSCO^EBMNCPDHHFAFiEIHOAEH"],encodeOffsets:[[120045,39982]]}},{type:"Feature",id:"120103",properties:{name:"河西区",cp:[117.2365,39.0804],childNum:1},geometry:{type:"Polygon",coordinates:["@@d@hZNFdcLYXKRCtCMOFSYEGHEAGEDMu@SKAAsx]GMTGt"],encodeOffsets:[[119992,40041]]}},{type:"Feature",id:"120102",properties:{name:"河东区",cp:[117.2571,39.1209],childNum:1},geometry:{type:"Polygon",coordinates:["@@ZBVFFIGABEEA@KXBDOFM[EACJgˆOIE@QIMGDBHUFEEGAEHECEDGIAKQDWLKZcdQPEP@FOFBJTJ@HNORJf@DBCN"],encodeOffsets:[[120063,40098]]}},{type:"Feature",id:"120104",properties:{name:"å—开区",cp:[117.1527,39.1065],childNum:1},geometry:{type:"Polygon",coordinates:["@@NMVDCG\\E^B@HlB@YEDS@CÂ…HsNSiMGDebUXAJEjidVTAFHDFJ"],encodeOffsets:[[119940,40093]]}},{type:"Feature",id:"120105",properties:{name:"河北区",cp:[117.2145,39.1615],childNum:1},geometry:{type:"Polygon",coordinates:["@@DBXFADB@L@LFHM\\NHED@JKZRb]QMRAFCJBDCBQYADMCAe@QIMP@GSIAIPE@E[EGH@ZEF]^HJAXK@KF"],encodeOffsets:[[119980,40125]]}},{type:"Feature",id:"120106",properties:{name:"红桥区",cp:[117.1596,39.1663],childNum:1},geometry:{type:"Polygon",coordinates:["@@J\\PNHEZBFEJELEL@BWGI^]FEkA@G]A[FDHUCMNEHJ^"],encodeOffsets:[[119942,40112]]}},{type:"Feature",id:"120101",properties:{name:"和平区",cp:[117.2008,39.1189],childNum:1},geometry:{type:"Polygon",coordinates:["@@D†T@FCHG\\FFOROMEgYc@"],encodeOffsets:[[119992,40041]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/world_geo",[],function(){return{type:"FeatureCollection",offset:{x:170,y:90},features:[{type:"Feature",id:"AFG",properties:{name:"Afghanistan"},geometry:{type:"Polygon",coordinates:["@@ࡪ͇وÅǬϠÚŶӂʮǚڦ۾njƀ̚ІɣʪÒ´MوǯʲĹ،˒˰Nj˖ϪԈiżŬĘͺβ̈ҔÈÄʱʪ¡ý۷ͪ˟̊ǰώĊԼϖׂ×ࢀAƬʋӧĥÑƹ७ĭࣗǭӫλȤΣĪллΛ–͑ɳ̡ߛ€ͦ։՗ɅΥԕ²ԋ͡ɿ̳þÙŋğɻسDҵӇ‡ÜથΓבôÇÈԇņ࠿űටіހހåզÙƚßՔ˟ڢάҢιŮɲؒ΂ਸ"],encodeOffsets:[[62680,36506]]}},{type:"Feature",id:"AGO",properties:{name:"Angola"},geometry:{type:"MultiPolygon",coordinates:[["@@ȸصʌԋȘ˕Íѯ֊æˤŠҬşŲɀɂӨԶ®ƤіHñ̡৴RfՉǞ͕ūԑÖԫ˪̷­ৃȼüκsԴŴϦ¹ĘʹĩСƨϿů̿îÌყZÂᦵ֤ۋպԽ໳ÎáŽÅ ×‹Ð–₭—ŵÃԃϞկ~Ô‰ÆЙDžÿՈŜ݊̂ޒªΰ˚ݶȨΆӘռËÏĘج«ӊʣ̜ɡԚȵԎ®Ǩʶͬʭ߼ǣ֚ÑÕĄǎΌŔʒg̎ĸៜ["],["@@ɉėɣلͼδʪƘ̀˽̩ǯÆÉλ"]],encodeOffsets:[[[16719,-6018]],[[12736,-5820]]]}},{type:"Feature",id:"ALB",properties:{name:"Albania"},geometry:{type:"Polygon",coordinates:["@@Ń˷ŢέΒȳiə˗ŧ»˙ϷСƛÃgȂү˰ñÐîֶŖʼƗƂÉˌθаÂƿɨôǴɥȪÄȨ̂"],encodeOffsets:[[21085,42860]]}},{type:"Feature",id:"ARE",properties:{name:"United Arab Emirates"},geometry:{type:"Polygon",coordinates:["@@Ƭ¤ŒɱڂƂ۞uÔ–{ֺ֪ظՠՎԮdž˹ŖڑѕGçճƪÅÏÇ‘EÎ…Ê“ÎuÍ·ÇDZᡋъÍà¡šÂÈš"],encodeOffsets:[[52818,24828]]}},{type:"Feature",id:"ARG",properties:{name:"Argentina"},geometry:{type:"MultiPolygon",coordinates:[["@@ߗ§ѓ̔ԑx࣑@Aሞ͒ϵрؿનԋ୲ȿϙп"],["@@Ӵ؇͠ڰॠ“ƊǷ໶ോۊŷਆاࡾ͡Ŧχࠡ౧ࡒɭ़ŷڔƈނ٢ƎÝжLjфÓiÚ£Û»Ò©ÖŸÎॅࠃ૭ଧȽڥɣࡹT࠷ǽȇÃիËѫ੨ܙŗ׃Հν§Ч߯àªà°›Ò‰á‹Ç©à¤‰ÄŽÇ°Ô…ǣػƺщԋÌࡱř̪͕߱ɗŜ࠳֨ʧҠˆʢѧޛʻڭԹūࡋȣ҇ßEڃљʋؿؙࠞߦÇ˿ݭ঳ӃձটÞͧ΅Ͽ˔à¢Ö”ӡΟ¨ީƀ᎓ŒΑӪhؾ֓ÃĮ̀óࢺ٤φˈՒĭьѾܔ̬૘ěӲξDŽę̈́ϵǚˢΜϛ͈Èॺ͸Ǣƙ਀ȠࡲɤݢԊ̨ʭà EÞšÙŽÕ¸oÛ°Ó’à ŽDޜɓƶϭà¸Ô¬à¡ºÃ¿à €ÌœÞ„ռ߂צԺʥ͢Ǭ˔ඔࣶд̀ࢎĹɂ۬ݺશȱ"]],encodeOffsets:[[[-67072,-56524]],[[-66524,-22605]]]}},{type:"Feature",id:"ARM",properties:{name:"Armenia"},geometry:{type:"Polygon",coordinates:["@@୞ƀǨə͌ƣǛÉ҄˽ÊˋΦɫϘÆl׋̣}΃ӢHżχCÊɤǩuͧʖرȼĄФƛ̒"],encodeOffsets:[[44629,42079]]}},{type:"Feature",id:"ATF",properties:{name:"French Southern and Antarctic Lands"},geometry:{type:"Polygon",coordinates:["@@ը˃ßĿˆDžɽϣಇÃq҂ŮΎÊǢ"],encodeOffsets:[[70590,-49792]]}},{type:"Feature",id:"AUS",properties:{name:"Australia"},geometry:{type:"MultiPolygon",coordinates:[["@@ߺÌҜŘپNJԎÉÃঽ˽Ìēگ̉ɰ×בǧ®ԫ€ԭܘŗֈÓܸtϬռõ"],["@@̢ڇբ̈́˦ΡЖ͟đϋǴܛŸнɄĹɬܕąѥ˖֭࣬ѭצЋ֞λŋȯӔՃࣧ͜ͲȂ;ηȴźƢࢹ׬ԩϸ͋ڀڹʀڭtÓËԳÐ܋µݓơϵɩݡjӕǕ׻χއثЭ̫ٱ˫гÊܧ͕нɅػʼnתˇӕ̇व‰ޡ·ϫ͙ԕέ۟ψԥƪżѬÒǃÝ؉ܩɪӉƄӑÔ߿ÊիԮƻْțьЭ;߱ĸˢРȯزЧ׉ÝƷѮҬŶӞ͘ЬãجÛܑԿ˽ÍڛٽΊ~ҀԿ،ѹ̀ǂȘઃԚןz߯ЦຓÄછÌख़˫ߡÈࢻљܯȗljѱ̳Ϳ܉qՅõݑƶ׿ğֽÂÔ҃ʕœуÊЗˋؕÂÖ›Bࢽ՜ҋDŽlӖкŘƚȒ‡̠ĺ×ģӼѻࡖÆӒ˜ӎͭնsʚϋͰĽڄӓڔřΪτε˳ެиʑʞ͗aјеڎă˄țʦĠӠǢȸŘрęӮΎ؀Úٕ΢׀ۀˬЦΪٜ̰ϤàɴĻڎ̺ԚĤŶȀɞüҬoࢨʖҚώɊ҆ӲÑœͲvҘט܎ΠܩΦǚ̗Ј˂ТψǻĸٖҠаȮͨцƜ`ɼτĭdɂτŦОŔبϫҲӽՂMՖÿDZҦДڪϜɘſȾκӒԘ̒јıۺǂeі؛ˢ҂Ū֎ȻҀ·ۼɋʈÄԶʵӬʊ͂ñȠNJϬеɡ͉҇ͻ˿ƒĮͱʙп̗ЭÔÊڜҫ٨ËÑ Ì؈ӻʂBÑ°ÉŶʷߤ˵ֈ˼ÇҊǠόľҤʰڞÅОÔʔīӔŌنLjǠŽˬȮѾdžҦtʈ̸̾ʂЩÎՃȾķ˜Λ̨ёÚӇ‡̥"]],encodeOffsets:[[[148888,-41771]],[[147008,-14093]]]}},{type:"Feature",id:"AUT",properties:{name:"Austria"},geometry:{type:"Polygon",coordinates:["@@Û΃ÓCǎǻ˧էLJƗܽsщÈۛÞயÉȉ̊ࠧƣĭDžԗŢѕxÏƶźȴÂƬʪ²ьɹŤɜݎ•׸ƮЖ}ˀǣþƜšո̠ń̒ϰز˓ӀΆÌÚٶʱЂªϰÇãŃČ̅"],encodeOffsets:[[17388,49279]]}},{type:"Feature",id:"AZE",properties:{name:"Azerbaijan"},geometry:{type:"MultiPolygon",coordinates:[["@@ʞɣψDGŻ΄ӡֽŒщϰƃ͆Ǫv"],["@@ϊËƞɈԈͺѴѵђ׭ϺŸʸɧۗãƣٵƟÌÌ­ÈvзȽ¥ԻѲ̂дÊʚ̿×যإk׌ϗÆΥɬʂˌ҃˾ǜɂ͋ƤǧɚȶƎضÊÒ¹ŘIJбҔɔŚʀ…׀ԙ"]],encodeOffsets:[[[46083,40694]],[[48511,42210]]]}},{type:"Feature",id:"BDI",properties:{name:"Burundi"},geometry:{type:"Polygon",coordinates:["@@Ã০ɃϢԜßʲӎҀŸͧǸÈT˗ȹǭ͛ѫ̧̥Ο"],encodeOffsets:[[30045,-4607]]}},{type:"Feature",id:"BEL",properties:{name:"Belgium"},geometry:{type:"Polygon",coordinates:["@@؜áުǪÕοҦÈħ֧ɕÂÄһܿϦћßדІϷͶϷ`ũ̒ڪǔ"],encodeOffsets:[[3395,52579]]}},{type:"Feature",id:"BEN",properties:{name:"Benin"},geometry:{type:"Polygon",coordinates:["@@ۛįȹ׆žኞǛǦÂЮ̇̌ʱʞņѶ̀ĨǠξЪĀȀʤˮʘ̠FÙ˜Ó™Â˩ȎӽǓͷĘɧСԳʵʳÇÕ‰t՗µണ"],encodeOffsets:[[2757,6410]]}},{type:"Feature",id:"BFA",properties:{name:"Burkina Faso"},geometry:{type:"Polygon",coordinates:["@@Ö¹ÉϽ‹ÌɃϗǰƥ˦ϙǾÅӦɮΤo˴ښۢŬּɲȴОœΚǢŘɎٴϖdžˀ޼ΒҦŢɀLJՠJáСŔϣӀչ€ÐॺÈmֻǿʣЩÿǟν˿ħÝlϳâ˓ƉωÖร¡qӉŘم"],encodeOffsets:[[-2895,9874]]}},{type:"Feature",id:"BGD",properties:{name:"Bangladesh"},geometry:{type:"Polygon",coordinates:["@@i׽̉ŶÆگʉѬµєDžКΕӨޟ’ü΋˃ҳΧǠũƵʃĠ͗øŽۖ̅لƜԒԫɤȆ̪Հ̼؅Ѽ֮̔ږεВ£ô×ߞřު^Ӟƛϯ܅ϕµʷÓҢѥƎ՞ɶFѶ೯"],encodeOffsets:[[94897,22571]]}},{type:"Feature",id:"BGR",properties:{name:"Bulgaria"},geometry:{type:"Polygon",coordinates:["@@ʎΉ͚Ö٦ſ௾«иɌবȜ̩ؒӴĕѥÎ̫׹˔ÓܣŒࡥ˃Uлޅÿס̊ڧɱة|Ñ֊ÑËÆ’Å¢ÄĴƘˌ͌ˀСδ÷̬ȸÈ"],encodeOffsets:[[23201,45297]]}},{type:"Feature",id:"BHS",properties:{name:"The Bahamas"},geometry:{type:"MultiPolygon",coordinates:[["@@ȵ£ɇӜ̿ÊǾՔʨ‘ۣ̎JÓ¥"],["@@ࣷƅÃ̴Ђäֈ{~É•"],["@@ƟׯƷņ`ѮϓͪCĪÚÏ—"]],encodeOffsets:[[[-79395,24330]],[[-79687,27218]],[[-78848,27229]]]}},{type:"Feature",id:"BIH",properties:{name:"Bosnia and Herzegovina"},geometry:{type:"Polygon",coordinates:["@@̦FȿσМ͓ūЃȡ™ƽû˙țūҥݓ͈ͅΘ͋Ȅϭ̾ǻʺЩϾǬΒ̞ȕǼǨϾnܠƓ׈\\Ϟȅ"],encodeOffsets:[[19462,45937]]}},{type:"Feature",id:"BLR",properties:{name:"Belarus"},geometry:{type:"Polygon",coordinates:["@@ß¼Mࣰ̈́ȚӄÛËÿϔԜƚ͖ࣘࢮÉŢȻѲĴࠒȧĊÐǷɧՄս΂Ƴ»Ʊ֦ƩʎɡÍǿڳˆljÿȠ˧ȸÕܹʵÈÃхͭĆݷ¡əȞ̿ƥÍŨÚjफȬࡕàٱmҡɩГÂeÏʷϴԌǢLͰɷ͌™ϊ"],encodeOffsets:[[24048,55207]]}},{type:"Feature",id:"BLZ",properties:{name:"Belize"},geometry:{type:"Polygon",coordinates:["@@OŮĸžƴı̞ԔDŽZHÅ«Ç„GaɭƋεôŻĕÌÀăīщǓɟƱÇ“Ì…Ê£@àॆPÚ˜"],encodeOffsets:[[-91282,18236]]}},{type:"Feature",id:"BMU",properties:{name:"Bermuda"},geometry:{type:"Polygon",coordinates:["@@OEMA]NOGNG\\Q^McMOI_OK@CQSGa@WNLVWHFLJXVFGJ`ZRTDLeeWKIHGIK@@[MQNi`]VDTBHCJAPBJLVFjT^LV\\RJZRn^RH`TfJjZHHOTTFJP_NOX[EYQQKMEJOLANJH@HQHAARF@ZEPS[U_IcRQXE@EEKKOCGGCQCOGISKYGUC"],encodeOffsets:[[-66334,33083]]}},{type:"Feature",id:"BOL",properties:{name:"Bolivia"},geometry:{type:"Polygon",coordinates:["@@य़”͟گӳ؈વȲ۫ݹ؅ŗ͡୆ҋऺˆ߾ѳ΢Å؆ЫֲՌ࣢αۺȖ˰ƭ̶͠рh܎¤נǸ˶ܩഠزíѠnȈʪ݀;Ѷ͂સƚęؽļ͓ãࣰ֛ݫऴƑ̻ͦ֨ǕÎÊ‘ÕˆTӦʟšӟÇÊ•ZγʓaÍ’à¦à¾–“ūӟĜͧҞɽȤԹƫڋɯÏÄ„ÓÊ¿Ç¥aʶ޳јޭ^ัʓЕ݋sҋͥ৕ƉǸ"],encodeOffsets:[[-64354,-22563]]}},{type:"Feature",id:"BRA",properties:{name:"Brazil"},geometry:{type:"Polygon",coordinates:["@@૮ନॆࠄ֠΂ۼҪjڤуӞеLJǒӜŖӼBҦ̡ƴ̿Ƌ̻œį͔ýޔƿʤ֥ɪ΃ÇࢱLjÈଜÊҴˀǦăÓɰςƬڌȣԺÒɾěͨŬӠྕ”͑à¦Ê”bYδÇʖ™ӠӥʠՇSÎʒ֧ǖ̼ͥळƒ࣯ݬä֜Ļ͔ĚؾષƙѵÍܿͽȇʩџmرîӃƟϡĪÈ౨ÛÓ·ÝvÍ…Ò„Ö¶DzΰұԞΓݴɜƶA΢ԖʎċҔɊ̈Ôϼ०ֲێNJŔŴݴŸϚᘰpθſӔÏ̬LØӀƒǚē†ÍӯĔYՀ࿖k˦̂ɸˉÇӷǂļҨѻٸÆnjʲشȞΊÆĮΤ׸ʆ¯Ǯ܅ðśՊ’֞ϓɒǀþجŅڜȿÊȤ؀žल̮͎̾ÅʂѪšȜȗʼnσ̀ŵȖϷɷÌÆ…ÜɌыÔϳԬϿЮ¥Ģǒˆ˜ϠƦ˚ɢҬíȲŠҚçøǢƗǘĎÊͺõЈĒӔDZξǥʺɪȊ•ŘɿДÒ͒͊ʴؤӼޒ˺¢ȺҫҼ฽҈Ƒxׅمەʾʩ๤ÆŠࡃٔրà©ÌŸà¶ŠÔ¡Ð¨Ó±Æҫ঎ʶà¿Ñ¹à°´ÂŽà°”Û੸व٪Êܖ‘̦˅˸੭Ɣԗͯ൹ёշஅୡՙोثܯȿgɻءÒ༽ɹಓęօˇͧƫ૱࡛઱ƛà¢Ú¹Î·ÈŸÔ‹à£¯Fೕ͓סÏवʗ঩Ú܅࠯ũطƔҫƽࡓÈЧחҥट๕݉ڗ֯Ͻϥߛ։ӑɷӈψЊӟֲڇҬࡹՠ̹{ࡅٰձę"],
+encodeOffsets:[[-59008,-30941]]}},{type:"Feature",id:"BRN",properties:{name:"Brunei"},geometry:{type:"Polygon",coordinates:["@@ͬ̾܎Ң›Я·՛Б€ǭ˹ϥѦ"],encodeOffsets:[[116945,4635]]}},{type:"Feature",id:"BTN",properties:{name:"Bhutan"},geometry:{type:"Polygon",coordinates:["@@΂ËÃÔ©Û‡{ۿÈՇſޅ͊kǚ֌زҒɈ׸șѺqπɥ"],encodeOffsets:[[93898,28439]]}},{type:"Feature",id:"BWA",properties:{name:"Botswana"},geometry:{type:"Polygon",coordinates:["@@ǜƭ˄ӡॎइήÄD̑ʚՑٰŹ՚Ï஑أݭع˩֓ʧÍҙãƧГÄʽÕțۤБɾΟĸХșȵГЉʧпϑ׻đȇÌüԠӽߚɧŲAរࠤˆ|Ჾش„ಖ͎̎Î՜ͤʮDӂȎưÙ͔ڣ"],encodeOffsets:[[26265,-18980]]}},{type:"Feature",id:"CAF",properties:{name:"Central African Republic"},geometry:{type:"Polygon",coordinates:["@@ۜÚƺɎƔgȾÈà©”ÍΤ͠Ѭ̌ĉÌʂüߺ½߆ϴ؊ࣺю;ÕƜĪΫӜԿF΃ƋΓÄʻ̆ÊٖοҢͻT˗֠ѫΖεɆԋغͩƊˉˣęաpكĘ̹ïųȱ˕}ͧDzधнϥĎŗÃÊ¥Ô•Ø·ÇؙĊ՗̴ۓ˸҉˓͛Ñùדգ²֩ƘԅѻѯޱėÊ›Ϧϧ˔̳Ѡï̠ЇѮæʢċΞÞٴȬƴц࡜"],encodeOffsets:[[15647,7601]]}},{type:"Feature",id:"CAN",properties:{name:"Canada"},geometry:{type:"MultiPolygon",coordinates:[["@@ØŽÅ“ÞªxЯ΅̵Å੥Φȿˬ͆ʸ̎С"],["@@Ð¥càªË‚ޯІ̄î૆É࡮Η|Æ·"],["@@Ñ…ÅൡϢʥ̘ݩ̌Ưʈࡻư͕ҜðȚࢨǿԨŵ߄ė˺̃дЋ࠼ÎΌҩ"],["@@։ܿո˴֠ǵÌ̉ݚɱϰȴ࠼ʵʹ؛טƞņѿʼԷÎ݉Ï‹փǂǾیɻńইܯԅ†צЂ߫Ȳࣙ¹࿅~ŹʠԼÌλɬ۸Ԓࢄ೾Զӎܲ̂϶™Njɫ҅Չ"],["@@@@@@@@߰äʥ॓ܶگͯDԑϪ̵ϮчʾƻτºˎЂŋ"],["@@͡ѳχîəʢ Î͖ʦΆkɈǣ"],["@@à¦Ò§×¥nǿɪزϲ଼SiÇ"],["@@ƼυјżӨɗं˽४ʽöÐؤÞ׶˥ݙ˃ಳȬҽϚ࠭Ò஡ѣ˿Ӯଗăܴдņڌ˺ޔ؈å"],["@@ष¥ȿЪΦҼޖŜپɷXέħřձʛ"],["@@Ô·ÌଉʬۃğଫϘ݊ʼטζࢼʃԎƯʦDžԠÍ"],["@@Gà¡­à«°Ú„à§Õ¥Ê¡Ø­ß¾Ö¥à¢šØˆØ–ܨ°ईஞÃఔūૼй¼зس҃פ҇ŃУ࿩חୡŻࢃʨʣуߵ۽ʓοই֩ளÇÚΡÇձà¦Ä¿à¨‰Ú»à£­à¥Í™Ú±উంƕϜ޻ϼّ୲ǔ༞εࡀ͋׺Ѕ੆ɳࢸΟ൶µࣴąÆܫʼࡋ،ळనߗ٨˚ҔࡺѭೢףѶഎЀ॒לҮהç֭֘܌৷لলࢤνݾ˫ಾגȘ෸ɫࡸć۠ɚ޴˵ਚӣʮ͙ຄÛ}۷˪ਜ਼ގſ،ӵ௖Ұߦऔ֌ϸٺݣબੳघ৙͵Յ૤ÓÝ°Ó“à´‚ÉÕ¢Ëͬ܃ټÅͶͅÖऻØÍ×½Ì൯̗à©Û‘෇ƋᅛǮà±PࢇÃ۱׽ੳω௉૗ॵޡ܌Æഘૄᄈ۪సČݔЫß֟ˊࣟ˜هતп൸ŨࡆीÎØժ̥ਣսᇷÔ࠯ͽयØٓÖÂ܆ฤ۞à´Âƒà¤£Ä¹Õ»Ó†BନÏÊ֛ƛ˧ɚٙىʱٹ̕ϡΥŽËÂ¥Äȹ໽Aà±¥MϛƷࢵ؃ĿßËÍÞ—Bà ›GϛƅƊǑøʯeÄષлࡽſউ҅É@˷ƂĥŦnĔȂ̎ЂҦʘӺǙܴǵނ࢕ЂľƬūĺɳ@ǛƆ¥ȤÇēɥ€¾ĊȡĊćɚٵËڹ˪ࠑ͘ß̨ݧʃËSਕɔڻʼnà Êºà¡«Æ†×•Â¾Ê»ÆœÆ«Ò¤Ë³IEÍ“áƒBá®Aá­¯@ᡃ@á ¿@៙@ᢡ@à ›@á @á›·@Å‘F྽ࠜ׵δຽÎҳݖŤԨ੻ΨƧڴ৭؎iѠҲКwՌෙ՘࡭ॠÕ׾ޑϚ֣ΈѿѢࡇ˕ࠇҹݛւדπࠋɸࠟ|Jâ·ŽNᷲ༬ȭ೘Й࢘û݆ΖৰˀఢĹ఼τ൘Ⱦ־ΑظȠȊЄ׈ęෆݫ૦֬ŖّਔÆ͆ʖৰ·౼Λዸ̭ୄƛࠖÄଊÑà®Ð·àº¶Ç·á—˜Ä²Ü’ƦࣆԋࣴьࡩΦժ˼৾žڦĎڴȩࡊҗरä๢ϛಬƄ௬oĭԺݞƦದ˵Kß‘Õ–Ú Ú°uϞࡊ࣑԰কͺäघশ؎ૌƇࡘχଞॅݗЭ༠Ç"],["@@нϿሎʬୠщॊіÞ˟یࠛфΒ׭ࡰ݊Ŭ࠲Ƈश͹ՆࠉʼץථеະЉÄσൡã՚͓˱ູ̯Ƃฃɪঋ»ཅ˷ᒃű๻ÄҕІଫɮݙģਛږ֔ĚಘƜஈ›રƦྷȞᅗã஗jѷ̴ዎͲಗ[ืɚ۶ـגͮᖬԠ࡬Nj"],["@@݉ևಹך˸Ş૸’ٔÈ"],["@@öɵࢿ|ࣟjࣿőʑ¼à¤Ñ¾Â˜Ì Ð˜ÃˆáŠÄ›à¸ŠÒ£"],["@@ڎԽޤڴᒆΈ෺ࢅůջဒʒߒͮሀыୄÐŊν༚È࢘՗áŽÍ©Ü¸Í¹ß޻໯ϹጘչೲÈீޙೖÇʽכ้ঋਗά೓߲ઙĿÅӕࢪӥଜϯΌɟմࠩÌ׿੕ɪá‘ڨஎܣ࢔ԕƎ̉ᗱͲᅩӤ৳Ц̌ʂయќ௥Т`Ê‘á¡Æ…܃˾ֆؤ཈dႸņ˫̜̊оચࠊɳϊ͕˾౿Рá³ËºÕžÉ†à¢·ÔºÝ‹Â´Ú˸҇ʛ຿ŅáµÈˆá„«Êšà´¹Å´Û¥Ì࢞Ϧà®Hˉ࡚٦ݨࡺ΄ᓪɢأի"],["@@৊ǯຄńɖʑ޷Е౜αƱݳàµÍ—߳ê׉͎á¡Ù®jˎ႖Ľà¤Õ¼à¦¸Ð "],["@@࣓عय़ŒԽ݆`кѮΨ࠰ɮც‡ྈȱళݟ৉Ç"],["@@á•Ð™Ñ·Ï‚ኹѺήΤ׌ؘܰւࠑԦᭊƀ஬ǧᒰ±ࠄʑࣖÎà©Éƒáןਫי@ν"],["@@ҙ͙à¯Ã˜à§±É–҂ϚீɨܼÌ̬ˇ"],["@@ٞϵ€љϣس൱đࣗƈjÓ¬àµÃÃٮࣜౌ˺ஂµÜŎ"],["@@̙͢ݠƘࢢ™ƪЩÔЋ᭗Žᑯη౩mŅ˜პϊ④ij୯Ʈପà ßˆÉ¾á›„˳๶ӻฺÛறߨޔ̪ࢄĭ˲Ð"],["@@ढ˓ကFܨˡȑÍ८ÈՔȧଊ™௬ë೸ǼႊðീÃ࣒ͅȊÎԽɟభǷ੽ĸᜱŻႫcഫļá–˔̃ҦĹжࡇξ჋ĺঅʼ͂ΈႾÃ"],["@@ŗ٣٩̇޹£à¼Î«à´Å¹à¬—Ǽ@@ුؼႮծಆ[ସŬ"],["@@Ï£y༽Âɡɼáœ]מƻĵĩ"],["@@༩ʋà°Ë”ڼˎ௮Äஈſ˩ʥ"],["@@৽ÇඉBbŤࡴʦҌÂદÇ"],["@@కǥۃȚέ͂áΎજ‘ӪÅà§Ì‡É«Ì£"],["@@͜ΕàµÄ¤àµ©Ë˜áˆÂŒßºÊ à§«È®Ã•Í࿶ŕᗢ̫ٞÐ"],["@@০˕ଽʟ༇ك๥Óდņࣗ΄^̦ڔɢ໡Oà¤Ë¨Õ‘Ϡ׌ώ׊ʲࡴÎοȖዜ¨੶҅මǵ൞ǃڒև"],["@@ᖢßᅮŅ໤ɫ™ɡá…η᎙ǟݻȉᆬJጡԙേʃ෯ۇႿƓՙǡᡷěୈĿׇƭ۞бߙ˽ಛʃЋ͡୫ʣŞÈà·¬ÂlȳᖟԋᔧɴឿŻధĸཟªĿЖ༊Èб؆ԢÃᖤγ଩բഹLjڼ͘๰Ȩʄ̊஋͠ΥѠᘞ—ڒÄ಼̪ቃĬ᰽Ã๣˸۩ͼগʘÈ˺దLjঘ‚࿲ƌం̺ਬ©ࣤɽٔҒà«ÆˆàºšÄ¢á¢²Â–Ò€ÄášÆšá†”ÃᆒÃ"]],encodeOffsets:[[[-65192,47668]],[[-63289,50284]],[[-126474,49675]],[[-57481,51904]],[[-135895,55337]],[[-81168,63651]],[[-83863,64216]],[[-87205,67234]],[[-77686,68761]],[[-97943,70767]],[[-92720,71166]],[[-116907,74877]],[[-107008,75183]],[[-78172,74858]],[[-88639,74914]],[[-102764,75617]],[[-95433,74519]],[[-123351,73097]],[[-95859,76780]],[[-100864,78562]],[[-110808,78031]],[[-96956,78949]],[[-118987,79509]],[[-96092,79381]],[[-112831,79562]],[[-112295,80489]],[[-98130,79931]],[[-102461,80205]],[[-89108,81572]],[[-70144,85101]]]}},{type:"Feature",id:"CHE",properties:{name:"Switzerland"},geometry:{type:"Polygon",coordinates:["@@ÂƫŹȳϞƵіwá΅χƙةŀǻ͹ÐơƄһ˵Л¡αǶ˽ςБſ^Ï ØšÒ¾ÂɈϤûɲƞ܎MǦǼ࣒ʱ"],encodeOffsets:[[9825,48666]]}},{type:"Feature",id:"CHL",properties:{name:"Chile"},geometry:{type:"MultiPolygon",coordinates:[["@@Báˆà£’@Ô’w˧ͻܛʻЭ‚ӻäØʨ࢟ŨੑҸ࡫Ҏୃशۘǭ୼֗૜̟ѢϬ˘ֺޠΎװı"],["@@͢୅؆ŘĺÉË¿à¢à£µÐ³Â€à¶“ǫ˓ʦ͡ץԹջß̛ރĀ߿ԫࡹϮà¸É”ƵCÞ›Ó‘à pÛ¯ÙÕ·Fޙʮà Ô‰Ì§É£Ý¡ÈŸà¡±Æšà§¿Í·Ç¡Èžà¥¹ÏœÍ‡Ë¡Î›Ï¶Ç™ÄšÍƒÎ½ÇƒÄœÓ±Ì«à«—ѽܓĮыˇՑ٣υôࢹÌ̧֔ÄgؽΒө᎔őުſÝPЙȷݷ̣Ɖ޹Σoॅ˚१ג@@ਲ਼ӔËՒʄӰх֒Ņ෤Φ߰ࢴٰౣʔߞݒ˸ඊतÌѮგÖɠʿ਻ՉŠ˂ல˺༒ϮָÊࠎéूΠ„Ԩപ׈എΤబȗ఼ʤۚĵਞӮਆưྺ˒ნˀሤÕ൘ǩ஄ќɌɦњЬֱÅ؅ѴΡ˅߽Ҍह"]],encodeOffsets:[[[-70281,-53899]],[[-69857,-22010]]]}},{type:"Feature",id:"CHN",properties:{name:"China"},geometry:{type:"MultiPolygon",coordinates:[["@@ԑഓΫÛѷ܂ĩخӶࠜڦَϨʡƣԓ","@@ܩЗÛʺyܢаϠࣾɾӚoÈŠÍσσșӟ"],["@@ฬË঺ׯͼ߃౨Cܰͨ൸ʜѳݱ͙̭˽ः֡ࠇ৵ƪÜ̑ɜܙť঳ѕwLÑթӺͯһಙαƀѹܩŒÐ˂ֽ׭ऑҋۃա୭ʑأϽà£É­Ò‚ϴǭ͞ږ֠ѹѲܷ̓ॉ×ԫթ࠙¡ѓϻѸ֩یÆ„ϕڔʕस׶ݚÍÕ¬uƌѱஓɻϻÒࠇућיࣜҥͦà ÔžÞ“Ö®Ù¥_دՅɯȪ҃ӶʻŻۃɇڗҷ÷ؗࣧڹિޭোିޡୟۻृĩԣÏ̃˘Ӈй୭ÑࢵŹ˻ࢱҭ·ə؎Ȧ͘ૻËЇÆà¡É”Ð΀ƄӜÞƶЙܑ̀҃ࠇīڡJ҉ȳѥūŶ॥҃x÷Ȣ}ÎŽØʓεƸر͂ʔۤÕǎȧޜࢱƓĴাߔۮ”ۚ{٠νȨ˭ӶӭÙࣟŲ˴ΜϿԺ׳Î۵ȸॷ՗އسڳĿοɦѹr׷Țґɇ֋رëڌԟǭওĈोȖڿτٵǔ˯ЖҽŦࡓոکʴΑȩà­×˜à ›Õ’ɽà¤×¾Å‘‚іͭјÄۆࣙঠ൧ͼÊ٦ةϼƫʌųӎˆ͜ԛȔ˟ÄɇިʈȔśȠߤЈ׈Çࢸő͆՜ંIJͮ̚೜ҔŠÈãÓּɔݱฦဘͲјȈ؆ຒဠˡҲϞ¢ࡆۦĀٖ֔͢èɚו۸ѽப̿׆ڱ͕ঙ̢ηূÆଆÅ৪ԻԲġϤޟӲӿऒnჄȉ૤Ŝࠦůఔԛ৮Bόʽà¦ÒŒà´¬Ìˆà°¾ÂŒà¦˜Ì’׾҈ך˰ƋˤË͔ѴըӀùࡺÇ࠸Ѿ౲͚؞֊נʆ௠ÅÚĥĠ̘ݿזګË٥̳ࠣžӇŃÉΆר࠾Цو৚̓ஆՎQτݸࢾҲËWҪңȦۜмਰƲ૜vసʡ݈̱԰à¡Í€Î±ÌŠÔ©Ì¶à •"]],encodeOffsets:[[[124701,24980],[112988,19127]],[[130722,50955]]]}},{type:"Feature",id:"CIV",properties:{name:"Ivory Coast"},geometry:{type:"Polygon",coordinates:["@@Ï£Uוǒ՟Wহƥ×Ê̯ࠫNjvÞۖĄŀ}ͨΣΚˉÈʕɲǾώÄО ʔƄB¸ξÃnjĄŜ̸ĶȹڨȗΎæ˸ǘÞŊúɸųٮOƸʖƢgʎĦžΫȞłΌŰϚǽƦ˥Ϙǯ̎ɄϾŒֺÉɠ஡Ο۷ɕेθܣ›ͧ"],encodeOffsets:[[-2924,5115]]}},{type:"Feature",id:"CMR",properties:{name:"Cameroon"},geometry:{type:"Polygon",coordinates:["@@Ľ°ӻŇÔŒЋÅ൅nŬڒ͟֊ϧƚǟϖɋŦXɶɎתЎ߸ʒRԄӮ͈bҾΉ־˲ĀΔȌͺžь҆ΊǞךDzȊŢѨɜ՚۾ٲ¬˨ĠƲͫͰ‚ˌʂ¶ͮ՟ÊÖ‹ÖҜޅҷTÊÃϥČǻЅӸөμƛŠÎˆ׃ſɩх࡛ȫƳÃٳČÎåʡЈѭð̴̟џϨ˓œϥĘÊÓґڛȤڷɜ੗Â"],encodeOffsets:[[13390,2322]]}},{type:"Feature",id:"COD",properties:{name:"Democratic Republic of the Congo"},geometry:{type:"Polygon",coordinates:["@@»ঙͶŕˑ̗͓ɟÍѫǯϷ±ګțÍOÙ‡Êɹ‹ԃŗÃýҟɄϡÂ৥ưÞċѧǘӣӤҹҒ੕ͥĒ૿ƙɣĵʇՙȊχƫষĻࡇɨƫטÍɲƴìٟࣟR·Ҧ̳ΨٟŠȋѰԣ˅ڧŞ˫ϢՕüϽqµʾÌrϥºԳųιtȻû®ৄ˩̸ÕԬŬԒÇÍ–eՊ৳Qò̢ѕG­ƣԵÂÉӧűȿҫŠˣş։åÍѰȗ˖ʋԌȷض៛\\ÌÄ·Ê‘h΋œşʼɊʀμƎɎ̪ǰɚđ˼ÍÒœSÄʃ̼ƩӶՄӨШɆ˃۔θࠆϬўքМĪˌt̰Ǝ̆«ӊŀݖÇԾʦ҈¸Ԕúה͜ÑҊ˔۔˷՘ؚ̳ĉظÇʦԖŘÞϦÄनоͨDZ˖~ŴȲ̺ðلėբoˤĚԘۙϘķɤƖϲÅҶDzȦΫ݊Ö"],encodeOffsets:[[31574,3594]]}},{type:"Feature",id:"COG",properties:{name:"Republic of the Congo"},geometry:{type:"Polygon",coordinates:["@@̿˾ʩƗͻγÛࢸٖҪ̓֌˾ɂ֦ĺäό҆ЗÝ•ʴЈł֒ÄڀЉӺζ঄ȽǘسçɻѢÔξ੘ÂڸɛڜȣÔҒѰ޲ԆѼ֪Ɨդ±·ԓʥ҇ÇԽĿݕ¬ӉÆÌ…s̯ĩˋփЛϫÑηࠅ„ۓɅËӧЧӵՃ̻ƪÃʄқTË»ÍəĒ"],encodeOffsets:[[13308,-4895]]}},{type:"Feature",id:"COL",properties:{name:"Colombia"},geometry:{type:"Polygon",coordinates:["@@ΫȤЭ˨ʅƅ܉Ŝȱΰƽ_࠿Ӓŕʺ̼ڛтȢ̦иÊΞՆÍѴ̳ȦDŽӦÈÞǸɚƃ܄ͻ҄ņТ˔ÑǂʠțӶĺŬѢـהΌĚT˦ƺ܂ӖϸՊfäǪڂéڌъ͞ȊОК̖»ɚɛÇ˱գƕɇп͗ʋʓ̷Ĺ׵ɷӭѢÇņϭȄÈâ͹ij̵ˆǫȸéȨ̉ઊĄӦŃעܡͼĚ؂­ÓĪ̔ƟƱÒȇ˯ß׻ǜ֑ʆʟ†ȉÑл̨ȃɠ̋ʰ࠹ÇÄ»ÇӸɷˊ˥Ìà¿•lZÔ¿Ó°Ä“Â…ÍǙĔҿƑKØÏŽÌ«Æ€Ó“oηϙᘯп҂ʣpժࡤٟϾÔị̈ƤҧÉصŀӵࢤϳÉËІ֑ЊɡÄ"],encodeOffsets:[[-77182,-155]]}},{type:"Feature",id:"CRI",properties:{name:"Costa Rica"},geometry:{type:"Polygon",coordinates:["@@җȆǟǮĬƤ‰ȄɷȪͥǔÌņÅʖəƮÄʑǗȩȓɸˑĊŗǞLʮŎˆÊŠȖnjŴňֆÉȖŊˊéƔǥʜÇȪDzɈҙ͖ͷЂΩ͗õLͷǪűűıÂƱëǟ©Ǖ"],encodeOffsets:[[-84956,8423]]}},{type:"Feature",id:"CUB",properties:{name:"Cuba"},geometry:{type:"Polygon",coordinates:["@@ܨÑڊW߄˹̭ͮ޺Ĩ̔ȡ܈ԳԺϛˢ\\ԆǟÕÊئ“ٌ΅ıȟ֑Ń֡¥׃âளą֜ҶÎɔէÈ̃ÊÈ¥ÓŽÓƒÂ޵ɦʥǬભž̋Ç̀ɀࠗ¨׿ѧÎ[ťȳеğΫĂѺʸǼ̤ϞȈіǎَĄȰĢ"],encodeOffsets:[[-84242,23746]]}},{type:"Feature",id:"-99",properties:{name:"Northern Cyprus"},geometry:{type:"Polygon",coordinates:["@@ÃJŨȮ؄Yކʢ֧ΧÔƿęˆLJÙűjÂ¥ÂiĎѾNjVɫïƿ¬"],encodeOffsets:[[33518,35984]]}},{type:"Feature",id:"CYP",properties:{name:"Cyprus"},geometry:{type:"Polygon",coordinates:["@@€ãࡱͿЩŊȟͶЎŒǀ«ɬðnjUÒ½jĦŽŲiLjÚ̇"],encodeOffsets:[[34789,35900]]}},{type:"Feature",id:"CZE",properties:{name:"Czech Republic"},geometry:{type:"Polygon",coordinates:["@@ϯǂЩٵʲÌÙҿ΅ر˔ӃΰѕȬėΠƧʠؒǾ̸Ⱦ׾ǎɂdžɜīϒĖЊ˓ؼñ¿ɳҘǧŲɒּĥĄʿز»ϮЯʡCŽƯȕ—ÅȑLJ¡wý˹ēϋbÅ¡È"],encodeOffsets:[[17368,49764]]}},{type:"Feature",id:"DEU",properties:{name:"Germany"},geometry:{type:"Polygon",coordinates:["@@d͗ࡔțS̗ࡢǂҾɰॊͧІˋȞёɹɣ̨̙Ⱥ҅ßÌΈ՛ϑĕɛĬÉÇ…×½Ç̷ȽؑǽƨʟĘΟіȫӄί̑ϯ̟ŃŢշýƛʿǤЕ~×·Æ­Ý–ţɛыɺʩ±࣑ʲǥǻÜNń״ьֺ௅ƸЇɘ´ςǗÈĨ֨ƗࢢԎ@Ɉ͂Ⱦޔƿ˴ÇDz۰°Ƽȃ֮вȓ̀ÂÓˆÙŒÅՠŸ"],encodeOffsets:[[10161,56303]]}},{type:"Feature",id:"DJI",properties:{name:"Djibouti"},geometry:{type:"Polygon",coordinates:["@@ȤʹΑÓȩήɯ̱҇ȅƬȭÃÒ·b_ʮßɶ˴ЀÌϊήñʪȴ"],encodeOffsets:[[44116,13005]]}},{type:"Feature",id:"DNK",properties:{name:"Denmark"},geometry:{type:"MultiPolygon",coordinates:[["@@ԋڹ࢟ӄÅΒ௼˨ˎу"],["@@ȵ̓ʡĞØØɮХ՟ŷًŎͽҲ}࡬Ɣɪʌʦ݌ÀÌɴڮʂƒÑʟ˙ĶɽҘŵ"]],encodeOffsets:[[[12995,56945]],[[11175,57814]]]}},{type:"Feature",id:"DOM",properties:{name:"Dominican Republic"},geometry:{type:"Polygon",coordinates:["@@ŀƞپIÓ¾ÉÉœtÆ´Ì•Ò hÂʡωЮ̷̯ͿÐǼϫ•ˡ¢ƱƵ͑½ŷȲˣťͳֻÉƆ§ʎjɬÉʦȲƚÞ͒óҜ"],encodeOffsets:[[-73433,20188]]}},{type:"Feature",id:"DZA",properties:{name:"Algeria"},geometry:{type:"Polygon",coordinates:["@@ᮩཽá©à¿·à®‡Ï‘टćU՘ϵƌԹʊȧЀᬻᆴᬻᆴṕᎠfÇŒ@ÊQ঺ബب࠼Ÿێɦ͎тচͪ˜جӢòϞ̶સƚƸ͜ɛDz̃ࢲ¹ԞÍՠ߰ҠࣦƢՌΎ߶ʰ෎Ƭർæшůߊͨ࣌P΀Èֺ¾ǟћƄߟȡۙԭҵôمۊԃRȯԮ͹ΪàºË–Ý°ϵƧۇÔϥŃҟòՇͫΗӺؓŽέ̘ҵϼƸڒϷςՃ"],encodeOffsets:[[12288,24035]]}},{type:"Feature",id:"ECU",properties:{name:"Ecuador"},geometry:{type:"Polygon",coordinates:["@@҂غǻξÍϵԉςǞʀƙބ̎ŴƺԼ͆զÃ΄ҢǸ׀Ͱࡀӑƾ`Ȳί܊śʆƆЮ˧άȣŞٓʽճࣷ࢟য়ͧԥܵǃ֣Ӆ΋ΙъͻĞÎáw̮ʈȨıΔ"],encodeOffsets:[[-82229,-3486]]}},{type:"Feature",id:"EGY",properties:{name:"Egypt"},geometry:{type:"Polygon",coordinates:["@@ɽͷǹىɫѩÈƥ˩˔ϛϒ׵ஸđùÎࢯԪࡋٌವ̴ҙ˒ӃݮछǗƣ‚ճ঒ݭƨǣΏ@Ὁ@â©@@ᶶ@á²´Ê¥Ú²É԰Żά̤Ж૦bß²É࠲ʛϴſ٨ˊΌʊݎêװŃɮеȜ˜ڨȣټ³аɄւ෽"],encodeOffsets:[[35761,30210]]}},{type:"Feature",id:"ERI",properties:{name:"Eritrea"},geometry:{type:"Polygon",coordinates:["@@˻˖ΉӰϋ˒Éܷ̄ͶֻXȭǬӯȡԛϢʽط঑ǬęʹβఀĊ֒ˆʴؤÆьӒӦঃɴޗҢУବßÒ²ÓÒ–Óˀ˿аʧʩȳέò"],encodeOffsets:[[43368,12844]]}},{type:"Feature",id:"ESP",properties:{name:"Spain"},geometry:{type:"Polygon",coordinates:["@@¦״΃θஒ؆ਊƱ૾NࣂÆۦªമƒͰ͛໺ϡ̨ǺीÏআŊ®ӥߓ֓àªÇ¯ÃµË±Ô©Ò¯Í•Û͞ӑӟϑǹճىǗש٥੧_ߟhՃ̓ÍͅЩê̵˴ʃӚ޷žé˦̶̀Śɬ̃ʢɶրͳԌδè’ЈƎŬZپϲɪɻфөˆÆÅÓ¹CÉЬ΃ū̥ɇ"],encodeOffsets:[[-9251,42886]]}},{type:"Feature",id:"EST",properties:{name:"Estonia"},geometry:{type:"Polygon",coordinates:["@@ĮӸ̱ÅՓ̘ñӘਫ਼ɼ੔Ũ࣮Ƒࢂ|ŴƣׯÓʞ޵ΫˉۙDܡ̸ÏļÜÆ©"],encodeOffsets:[[24897,59181]]}},{type:"Feature",id:"ETH",properties:{name:"Ethiopia"},geometry:{type:"Polygon",coordinates:["@@ԜϡӰȢȮǫּWܸ͵É̃όˑΊӯ˼˕Ìω˳Ͽàɵ`Ê­Ò¸aÈ®ÃȆƫǽ̴̕ҧ̴Й̛͎ᩨঽۺNᛛᡃફ™ݟףաeɯ˅ַB͹˴ÞΙÊΓ֕àȃĬȟwˇT੟܌ב@˹ˢ@ҾѧƘӻࣴϥȚƧʹÑЦԧÒ˸ÓÒ€rŲʰ[ݲʞࢠЊɾĎ΄ήٜԔи΀ࠠƆܠ঒ǫʾظ"],encodeOffsets:[[38816,15319]]}},{type:"Feature",id:"FIN",properties:{name:"Finland"},geometry:{type:"Polygon",coordinates:["@@ūיಀ֓ޡى঎ख़֡ܛݴس΅յఘֻÍѓޭӟᅡੵໃá๑̯ൃǯӡҞ߿ˠȈࠢСݶÐӪނՆ኎࣮֖Ǭē΢ୟЈ˳͜uಒ಻ֲ૩ЪԊɞतѻલ¦ࣘȭߠϊЬ؞ಬ˶઄ͯΡכ"],encodeOffsets:[[29279,70723]]}},{type:"Feature",id:"FJI",properties:{name:"Fiji"},geometry:{type:"MultiPolygon",coordinates:[["@@Ì‚ÊƓѭԳŗҩļąτ͖̀ϤĻȼÆ"],["@@՛ǯŅ̼оǤˊ°Ӱˀ@ЧՕȷ"],["@@é­@ШǨžĽЗ"]],encodeOffsets:[[[182655,-17756]],[[183669,-17204]],[[-184235,-16897]]]}},{type:"Feature",id:"FLK",properties:{name:"Falkland Islands"},geometry:{type:"Polygon",coordinates:["@@৘Ԍ܎ȿԌʹڦϙʥ̋ଋʥϙ̌܋ϙпϚ"],encodeOffsets:[[-62668,-53094]]}},{type:"Feature",id:"FRA",properties:{name:"France"},geometry:{type:"MultiPolygon",coordinates:[["@@ˣ٭ϡǠș֢ǜ̺ը͎Ɯܛ"],["@@הЅќà݀ϥȊñʎjЈɗெƷыֹŃ׳ɱÆϣü‚ɇؙҽ]ϟВƀ˾Ï“Êʚ̿̅ʯÉٱҖŃĩηݿӅစɬ௧˗ĩԑঅʼnिϞ̧ǹ໹Ϣͯ͜ѢԎdžူà¢à¢¤Ø¥ÑŽà±¹Í’ÄؖઠǾථɡॎߌέዠپʨێܾǞŪ̑ϸ_ϸ͵"]],encodeOffsets:[[[9790,43165]],[[3675,51589]]]}},{type:"Feature",id:"GAB",properties:{name:"Gabon"},geometry:{type:"Polygon",coordinates:["@@ࡹࡔ։ۚԙࢄ‚˨ǾˎȲؔǜخ˴¶௢SOৠЌÆԞőӼňľ¯ÓνɼѡشèȾǗεঃЊӹĞٿÅ֑ʳЇÝ–҅Иãϋ֥Ĺ˽ÉÍ„Ö‹Ù•Ò©"],encodeOffsets:[[11361,-4074]]}},{type:"Feature",id:"GBR",properties:{name:"United Kingdom"},geometry:{type:"MultiPolygon",coordinates:[["@@҉ֽًǦԱ[ǦҊǥ҈۴–ࣔԳ"],["@@࣋ࣧࡦŘऄIɕۅݯݩࢄÃäĕݠ঱ֺƇԬà¥ÊˆÍ§à§°Ç…Ä·ÕѓʗͲѣݱѯ૳Rà·É±Ï»Ç’։ϿޥĪ×ÍÒǘ௼ࢨݪǺOBಽƔʃͰ࢜ʺҡÒdžռఢ÷D@ŮӤ֛Ԯ_\\৵ƨȧɬ̨ϒˡɴÒЇ·߶щє̨ࢆٶھڤá০ì"]],encodeOffsets:[[[-5797,55864]],[[-3077,60043]]]}},{type:"Feature",id:"GEO",properties:{name:"Georgia"},geometry:{type:"Polygon",coordinates:["@@Ųάȿִӟ̲ҭĬ̯ʴĺIJ܄ÆఆƋଦЕƦƻԚƂ޶ǭʴ·ՆșɓřвғŗıÒºصʎȵÆà­Å¿ß³Ð®à£…¡"],encodeOffsets:[[42552,42533]]}},{type:"Feature",id:"GHA",properties:{name:"Ghana"},geometry:{type:"Polygon",coordinates:["@@೉ӯҳ˽ݳʑݡʆœͨηܤɖैΠ۸ɟ஢ŗنrӊฤ¢ϊÕ˔ƊϴáÕʿΖџCØÄ„Úɂ̫ȅݳäйɢՓȈÌ"],encodeOffsets:[[1086,6072]]}},{type:"Feature",id:"GIN",properties:{name:"Guinea"},geometry:{type:"Polygon",coordinates:["@@ʃtÇ¡Í·ÊJÇǴÈͶΗԨɕħǵmɳ³V̮Ƈɘ‚ʔǻΜɹ̜ڥDÈ›ÇɵoÆǷīɹ҅σÏӼ͛͢ɋŊȿǖħϊūȂʓÆώЦʮeɖƘȄDƄŎï˨ĢĖd˶МU؀ȱȄlÚĤҜáŨ´¶̭ƆBɖŒƔƒɸɇάãɲǺ˖ŒȬŠǚuȈÈĴɳΆΙǣÉÂ˙ǴĊŀį«ʡʲÊÇ—Ãå˷ȘÎȺڧ̷ĵăśÞNj·νƃA"],encodeOffsets:[[-8641,7871]]}},{type:"Feature",id:"GMB",properties:{name:"Gambia"},geometry:{type:"Polygon",coordinates:["@@ņόࣶzȎȦˊ`ͨȷʼIˢƚǞÊεȋιdέǰ̷ȗƭQÈ«ÅÞ‡l"],encodeOffsets:[[-17245,13468]]}},{type:"Feature",id:"GNB",properties:{name:"Guinea Bissau"},geometry:{type:"Polygon",coordinates:["@@҅ΘÎÈȕʀLŸʯǴÃǶѼƌ˦ÂɦĨ༈•c˵ġĕð˧ƃÅȃCÉ•Æ—Ê­fÏÐ¥"],encodeOffsets:[[-15493,11306]]}},{type:"Feature",id:"GNQ",properties:{name:"Equatorial Guinea"},geometry:{type:"Polygon",coordinates:["@@ƿŴ़̀െmPয়௡T˳µ"],encodeOffsets:[[9721,1035]]}},{type:"Feature",id:"GRC",properties:{name:"Greece"},geometry:{type:"MultiPolygon",coordinates:[["@@Ҡ˱ٺ¶شÑqƣҜĶĿʛ௃íTÆ’à¨ÇŽÆºÎ¦"],["@@ʹÕȥĥԟ|ѫĀৱɓ׌ҿÑÆ‹Ò³AѻўƿÈÈŠÔ…Ñ€Ð̓ǿҴϯжʑ^ӅޥɠʜѕՓĕ͈ÝÖYÛμ̿ڦƧ֒ÍϮљÓÉʆϸТ¼˚˘Ũjɚռö͌ȀҖgƒƦdž„ت{ڨɲע̉ކĀVмЦÉ"]],encodeOffsets:[[[24269,36562]],[[27243,42560]]]}},{type:"Feature",id:"GRL",properties:{name:"Greenland"},geometry:{type:"Polygon",coordinates:["@@ᬜԆ᱒›ੴ̴ᲈĄ䀦Ŀ㉊ڗ༅͕ộ™â­Ä‡ÑˆÆ«á²Ä á¡šÌ࿈ʴۦÌइӧᒞ̺✘͚ᠼNjҾΫâƒ×±ÓƒÈ•á§‘ơወ¡ছؕگկ€ध৚շಽ“൧ˇ༂ѽȢ܋à£Ã½àªžÜ¡áˆ…ÑঈÎ˟̑இŽ୥E੆֩\\ÏပÎћɣଌȿ઼ԣ͈ڱàºÇ‰Ù«Í–ਣӘ˼֭উѵᕖ•୆¯ᖯܵᗿÚឧÌओIࢅ͓ୟࢱᅵכׅ“૧ȷ஽ÈܛԱ[כыտോڧͺٿϗÛÑ™à à®…½à°Ûˆá€¿Là Ò¢Ö•à à¸à¨²Ñոŗݮ୓ޢ̢ئ֗̒ࠪচొ̺ͨΘǬڀॡ̕қůݯţà¨ËœÃ‰Ö°Í¢Ò‚Þ¬\\႔ɟ෿Քݩ˾࠷ş۫ȼम޴Ô̺ڗ׈ৡࢼ੯͚XΚᖷӮᄻÖᖟ‘á…×ইˌวՈᕂ˄ášÂ¬â‰¹É–቉΄Ś͜ẊИᶎИ̪͘ᗗ̠ܺͰ᯲ז௢ĚΓϘጲɜᣚƂᣖRࣺʽᕺҨá˜Ì½à­ºÃ¡áƒžË™á…ÒŘή"],encodeOffsets:[[-47886,84612]]}},{type:"Feature",id:"GTM",properties:{name:"Guatemala"},geometry:{type:"Polygon",coordinates:["@@ћƦԻfÏ©Ç–ÒÎŒrʖĮȠšƾКۆ઄Ft˸Ƌ¾ġǺ̵Ț̹ˬϜDBÓ‚Þ¸BÞ¦UOڗßॅʤ@˚ƱòŰʘŃϥÍЉɻÃljâǑǧɇȟ½¬ıƿġ˽Ƀ}Å­"],encodeOffsets:[[-92257,14065]]}},{type:"Feature",id:"GUF",properties:{name:"French Guiana"},geometry:{type:"Polygon",coordinates:["@@͉͑ГÑŗʀȉ–ʹɩνǦɈΪòϤƢή͛ӸáֺѪܠ˸ğؤȥࢸۿƔ·ӻޑʳأ"],encodeOffsets:[[-53817,2565]]}},{type:"Feature",id:"GUY",properties:{name:"Guyana"},geometry:{type:"Polygon",coordinates:["@@ր̯ԴյzÑŸÍ„o҈Чͪ̇Ƈݱԛɕ°ȣƹџϊØËAŎӃԢܳȱ‰ҫî˙ɡϟƥ˅—ġǑЭ¦ԫЀÓϴɋьƆÜɸÌȕϸ˿ŶŊτțȘѩ™ْ֩ɬɲiϲԬƊȾƾ˽̸ô̬ږӲ"],encodeOffsets:[[-61192,8568]]}},{type:"Feature",id:"HND",properties:{name:"Honduras"},geometry:{type:"Polygon",coordinates:["@@ơˀʭòÃʹŗĞǣÒσij‹ŔʩƈǷǚʛìǨɈáǒÃNJЊɼϦ͎ĔÂȂƨʊ\\þ垦ϸùϲv˒ĢİĦˎ©ȪÉɘnǖòϨśƄkʲƿÊį̏Źɜɳ˽jśŕ̇ŋɃAȅŃǙœƛźĕ{ŇȩăRaǥ̉ɳƹıđĽʛǞǹɣǫPÈŸqlЭūQĿȓʽ“"],encodeOffsets:[[-89412,13297]]}},{type:"Feature",id:"HRV",properties:{name:"Croatia"},geometry:{type:"Polygon",coordinates:["@@Ȳ͗ˊʇ͓̓ÏȆׇ[ܟƔϽmǻǧÌȖǫΑЪϽǼʹϮ̽͌ȃ͆Ηݔ͇ġƛ߃̶ӣ̢ޑʠ۹ؤǞØϥΞe˲եƄʱγÊË®n̆Šbג…Ƹƚ˸ÆͤgGɼ̈ĒĈͺڞɠˊĻؼέۜlj̼Ų"],encodeOffsets:[[19282,47011]]}},{type:"Feature",id:"HTI",properties:{name:"Haiti"},geometry:{type:"Polygon",coordinates:["@@Ԣ™ܰÆôқÃ͑ȱƙɎʥiÉ«ÖƜЅÃԡÔϽƿ҉ʾö˔ޜśيã̢ȈϧθP͎ՋžȌɶ"],encodeOffsets:[[-74946,20394]]}},{type:"Feature",id:"HUN",properties:{name:"Hungary"},geometry:{type:"Polygon",coordinates:["@@˨ըÇǼӂDÜ΄ђɋ̲ğ۸ļäǚͮ~ЦžĜÃЂŀȠȢˠ¼࣒ʭǴĒҲɭÎɣԡǭЉ֫ԕ֭کÇԽš١ə̻űۛNJػήˉļÇË´Æ—V"],encodeOffsets:[[16592,47977]]}},{type:"Feature",id:"IDN",properties:{name:"Indonesia"},geometry:{type:"MultiPolygon",coordinates:[["@@Λeà«×šÞ´Ç’Ѵʭ̎ʭ»ɩ"],["@@Ü™ÈijĶø˸ΰԢࠨͬÄÇ“fʫշع"],["@@̢ɣԲèȼΥॿǛ׉őÒPÌ€ÓšÒ¤Pɤ̖"],["@@ūұ౅ʅૣľE̬ښǪՂʥ֔Üݬ̮"],["@@ྔċȂΌ༘З̪կీƵà¨Ó¿à¥ŸÍ‹à¤Í¸Ý»wà¢Ã˜Þ»Æ°à¦…ÍŽØČΓÅ໕ΌƣΰޑØּߤ৶·ڴ͡ΒÛŘ̗"],["@@ÑֱćنƬ̠Ǭ˴ȒʗCÐ"],["@@̿˥ׅƸÇΰࡘ¢Ⱦˣ"],["@@̨ÙۿΌۯìӃÅׇˆȦҦਠ”ऎʕ"],["@@ɼയ࢈ԉ۰ࢼ८ԔݜBܘ̉خ̛ࣘLJbá©‘bá©‘ÝŸÛ࡟ǜȷʇ੡}ΦۂՈɺɕࣲЕ۸࿃܆ۗêృަʛУ͑óÈÌ®GκٛЮ̢ࣞ״gëɠ௵DͩԄݥƺΡдଈȰњ˜ഘ·Ƃ̹"],["@@ڭ࠭كlj߱Çඓ¥ܽŧţÙݪݛҒϠ༪˸çϯλŪιӯ͙݉ߒ੿Ƶ˿ݲॻQտ҅ʙ͡ÌМی࠙͗ȻɶŊ͖؅ӲØࠌ֕ʭîও”றՓũίʚʌޜŽ߸ΛPʻֺΎվŤښф౎ǮΎ܎ذپʛ੖śॴ–ࠨ؎Ʀȉ"],["@@©ܽџĈŷÔΌѷɽĵ͹Ւʟ੺ǚڤ˨̨ÔÒӸóĀ΃"],["@@सާহį˫ֵšݿַ߱u࠷͕౻ŭ̚ॕϙͫԤ׳´лËৃ̟̩Оս¯ۗĬŹૺнɺЕܘÅ݀ĮުԂÖƖָ֗ӅըǠ՜ÑӪъЖôߒɽۆǶњୠ͔̈̆क़ॲ@Ü°Æ™Óݷآߓơϭ"],["@@छkۻ۰અۊέԚÙۄзؾٕ୴۪݅ʙܠ̳ڀݵՊѭܘمҺࢗऒóђզ‘ಢNjݔࠓٮ֫ҪΓߔࣙࡢ_ۺֹӠ۳٘ϥͳۉӖ̞̅sƜו̊ҵؠõФÕÉ਱‘ಟ"]],encodeOffsets:[[[123613,-10485]],[[127423,-10383]],[[120730,-8289]],[[125854,-8288]],[[111231,-6940]],[[137959,-6363]],[[130304,-3542]],[[133603,-3168]],[[137363,-1179]],[[128247,1454]],[[131777,1160]],[[120705,1872]],[[108358,-5992]]]}},{type:"Feature",id:"IND",properties:{name:"India"},geometry:{type:"Polygon",coordinates:["@@ࣚটÄۅͮїÂѕ׽Œɾà¤à œÕ‘୞חՑϟ͛޻ࠀͅߊЭરһସʼnӜёٮÄৠÈÛªbĪͪŋՖÞβԠǮìڋlǙކ͉Ոƀ܀Çۈ|ÃÔªÎˎڴŀވشॸ՘۶ȷ״ΞЀԹ˳Λ࣠űÜ͇ÌƷèԫ׷Ʋછׅ~ӓҩ۵§ХÏÛ—ÚÈ’ÂࢇÈ˹ĚΣгȥѵ೰ɵEÆÕҡѦʸӎϖ¶ϰ܆ÓƜީ]ߌó×Б¤ڕζ֭̓؆ѻԿ̻ȅ̩Ԭɣƛԑ̆كžەţֱ̫Zਛǩ´ك҃ӻ௃֡ळ঩كՋ࠷ջCϭлȹݳÌϽ«ʥٙǪધ®ۡΣߙI෗ѣ¡ϣٙʰˣދʃ˱֯͵Êߑ޸ϳ୴͑ࡒÌЈѿ߰ȻੂơՀޅ଼Α࿀ʣ੾HৰÇ޾௣ԉףĶ઱৲И̤Êͤড܊֖֔ᇜCǗܞҽюĩ٨ջϘऒࢢঊÙ࢞ࢢՄ࡞ࠄࡈ_״ܒӠڳд֪݂̇̕Ьβ౤ȱपŰߺ۸"],encodeOffsets:[[79706,36346]]}},{type:"Feature",id:"IRL",properties:{name:"Ireland"},geometry:{type:"Polygon",coordinates:["@@ƒ׷ًݣ๯ӹ஑Ŷڼ࢚ѭࡢତڄٌϼǦ҇ǥ҉Բ\\ٌǥ"],encodeOffsets:[[-6346,55161]]}},{type:"Feature",id:"IRN",properties:{name:"Iran"},geometry:{type:"Polygon",coordinates:["@@݈njװӔ֚{τƾװýघÑڤğ।ݓظ‰òۻÎ਷ɱؑκŭΫҡˠڡàՓÙƙæեݿݿжѵ͸ԓߦυx݉ДƋêϯ௉ѡ̓উà½Êªà£·È–ेŊΧà¨Ð•ÆªÙ£Æ­à¡‘Ðਇ˦ࡑ٦߳ʈ֗ߘا૪ÒƋՕ˦̻ÍÒ­Ñ´SÒ‚Ë@ÆØŒÑÙ”à¨Ò¢×‰ßœÈœÙ¾Ñ†Ì‚ÙӬտʨխ৊ҟڨÇʼʿ६ּʈƄͅъϯ־ő̤~রئ̀ØʞʙÌгԼѱȾ¦ˈإߖǩ׎у஠ƟಾɞĄȞ"],encodeOffsets:[[55216,38092]]}},{type:"Feature",id:"IRQ",properties:{name:"Iraq"},geometry:{type:"Polygon",coordinates:["@@րʧÚӫхÌțٽ׊ߛ਎ҡўٓÆØ‹ËŽ@TÒҮѳӿ¤֟êØ߭༟äá›á–ఫךৡɪ͹৾ᇶ࢔͆৬ÄؘҢȺјԾΰž঎ŇÌɉЖƚծ৉"],encodeOffsets:[[46511,36842]]}},{type:"Feature",id:"ISL",properties:{name:"Iceland"},geometry:{type:"Polygon",coordinates:["@@șիॊֵથٙá“ֹܣƵૉŮᚑˈࠠψᆧЪ๪ǎ—ʘᄋȜ֨նౠŰಸ֭౨Ҝ੒ʃൌ҄ආÑ"],encodeOffsets:[[-14856,68051]]}},{type:"Feature",id:"ISR",properties:{name:"Israel"},geometry:{type:"Polygon",coordinates:["@@ƥ˅̣Ŝǫ֓ɂĥɋř—ɛЄŖp͛нഉÖ෾ʔˢ˶ɞϼǠيŤɆzVˬCþƦɤ\\`·ŕŵhM"],encodeOffsets:[[36578,33495]]}},{type:"Feature",id:"ITA",properties:{name:"Italy"},geometry:{type:"MultiPolygon",coordinates:[["@@̟ڋŲʹǭÑÙÍ„Ñ‘Äžà­©ÑŞќজûࡪĠْò"],["@@Ԍ׭ş૕ϣÂÎ˫͇ɞ‘২ȓӒҨ¥рʼ"],["@@à®°ÉÄЯȬΧÚŪÛ̗²зĻʇˠё߀чцۛदڱچLȲȃɽǗݪ̥ؠʩܜѫĔƿƽ̛үϼܳÆÎի؈̷ıѫΗ¹҅ܛΕÃHʲǢҊǼǶÍӤʱшΑŀʛδգƴεͶثÆٿϜޑմ֯ӜʿࠪйĮÛˤϯŕÓϵΓÕĪθҕńÉٲ̆ʰʙ̀”ʂβǵМ¢Ҽ˶ƢƃЀǼͺتĿψƚâΆԘšĮdžࠨƤȊ̉"]],encodeOffsets:[[[15893,39149]],[[9432,42200]],[[12674,47890]]]}},{type:"Feature",id:"JAM",properties:{name:"Jamaica"},geometry:{type:"Polygon",coordinates:["@@֢÷ҀȫƔɯןeʭƗҹƊӑ̪ĶȔΜÎȒƒ"],encodeOffsets:[[-79431,18935]]}},{type:"Feature",id:"JOR",properties:{name:"Jordan"},geometry:{type:"Polygon",coordinates:["@@Ʀˆपͫ࿪ࣆͺ৽Džųá…у࠸࠿ˣƛƑ˭ٙřȩ̡εʵधƆƒŨоഊo͜Ůʚ@Ô¤"],encodeOffsets:[[36399,33172]]}},{type:"Feature",id:"JPN",properties:{name:"Japan"},geometry:{type:"MultiPolygon",coordinates:[["@@ņ˽ҿԕΉËљțÉӭշʈRЊҬԆӌīΊΜؠǹ"],["@@ÍڡƤÑѩף੹Ѓà¹Â½à®£à¥¡Ö¡Í”“غษȃষЃà¦e࡞أ֗෗իÎÐ͜ȶݶÕÊ’Í¿Ö¾ßʶѲՈࡌѢ؞ָာʤ࣎ǣࢠ๺֔Б௾ࡀӌ͜ՈਈƟा΢ՎࣀƸҞୗ}Ú»Þ¥à¡bà¢"],["@@נǵרΤȈहà°É¯Ý࠱೓ָқà¤à¤£]ř࠴д٨࣌²ʖà­ÊœÙ¼à¦¨à¢“٤˯"]],encodeOffsets:[[[137870,34969]],[[144360,38034]],[[147365,45235]]]}},{type:"Feature",id:"KAZ",properties:{name:"Kazakhstan"},geometry:{type:"Polygon",coordinates:["@@ӕƹà«×“ο׹̹KɱЊ੫‚ǡێХNÚࡆ৓ؘ෷ßডũߣݶۋ͆ಥ׼ƽðᓗӹÂᶽљ£יچ֧ɼॕǩχ˧±ȲȶΖDž̊অ˺ϛݮҩɆ…˜ࠊÄŽؘ܎ƎܼűƲࠎƭԲ࠿£Üȴঃσ޵ǭÑÆŒÄўՙ֘دw܉֬ӞÙʕǢڢऊࡺӣŀؘჄࣴಾtᇢ׉঺ͻࢼΠ೰j੺ѥʔʠ୼—ɂЊഷ׀߮Цƿɮ߮ɔ؅ֺϬ˼Ḯ̈ШȺᑆ̴ݰΒຢǹ˄ࢉ࢚Ȳઆ˹éÒ߮´ᑌߎ̭Ë੶٭ሠᒑ҄ѰୄӛீɎҪƯКӟטNjΨΥ઎ŒѾԣٕ֓ۥÿ¡ࡅұÏဟˢ؅ຑїȇဗͱݲลֻɓäÓԭŬу̠à°Ä–ඃx̧ġ஥ΞӉǧŽӹ൩̂փşȉÏ"],encodeOffsets:[[72666,43281]]}},{type:"Feature",id:"KEN",properties:{name:"Kenya"},geometry:{type:"Polygon",coordinates:["@@ӾۙיͱȹΕ̿Õšףˑ͹Ç֑ͷ˥஻ࡀËӤáµá‚ŒÆ™Ä¢Sࢺʊ;а֌̨ؔσ॰įтЉ׎ԬԈ֬ֆѨƗ@ҽ˺ˡג@੠܋ˈSÈ xȄī֖ßʞΔގΚͺ˳ָAܽ॑Xáµ£"],encodeOffsets:[[41977,-878]]}},{type:"Feature",id:"KGZ",properties:{name:"Kyrgyzstan"},geometry:{type:"Polygon",coordinates:["@@ȊςքŠ൪ÌžӺӊǨ஦Į̂Ģ඄wఞĕф̟ԮūşÈ೛ғ̙ͭàªÄ±Í…՛ࢷŒׇÇߣЇŜȟʇȓཟŵਡ˘࣫ÃĂӜࣴƕ̮ʸٖĉ੾؂঻ѸױȽإ͂۶ծʟĊ"],encodeOffsets:[[72666,43281]]}},{type:"Feature",id:"KHM",properties:{name:"Cambodia"},geometry:{type:"Polygon",coordinates:["@@ÎѬыࢄȣ২ՠۨઘdž߀ťۚ͡Ϟׄݖ̱Ȝ֕Ļ৕ඳ٧τԙࢥÓܫͷ۱Ū"],encodeOffsets:[[105982,10888]]}},{type:"Feature",id:"KOR",properties:{name:"South Korea"},geometry:{type:"Polygon",coordinates:["@@ܨযȺխPॷ̓ҥݽljڥÎݳïĥҚƼـχ࢔ذƚֻܘÂúϒ‡͞Ϝצ¢ΨÈŨȮ"],encodeOffsets:[[131431,39539]]}},{type:"Feature",id:"CS-KM",properties:{name:"Kosovo"},geometry:{type:"Polygon",coordinates:["@@›ǣŃPĘ́ȩÄdzɦƾȌȪÒŜ˨ư²Ţşƾ¿ŌƅƒŸǎƻŢLĥȳijij„×ȉÂӹŻ"],encodeOffsets:[[21261,43062]]}},{type:"Feature",id:"KWT",properties:{name:"Kuwait"},geometry:{type:"Polygon",coordinates:["@@Ǭχõȓ˔هשuȽÐݟĆ؞߮֠é"],encodeOffsets:[[49126,30696]]}},{type:"Feature",id:"LAO",properties:{name:"Laos"},geometry:{type:"Polygon",coordinates:["@@˚Ϝœ܆ڹܸ¿ٕࠦھÙÎǛ̉ӯyʣƨࢯԅoݬȸࢮ֧ž³ԎηʸǴ̲Üնøȡ҄wŵ०ѦŬӮÚϖޅਚO͚ܹÕɗʉ̟৔ԉۦ঳Ռ݋َ×ɄץƵ࠿ݕ̲Ï׃ۙ͢"],encodeOffsets:[[107745,14616]]}},{type:"Feature",id:"LBN",properties:{name:"Lebanon"},geometry:{type:"Polygon",coordinates:["@@É£[ýƥ˫D̘ۄмעfˆϘ§Æͣқ̓ȷҟ"],encodeOffsets:[[36681,34077]]}},{type:"Feature",id:"LBR",properties:{name:"Liberia"},geometry:{type:"Polygon",coordinates:["@@É—QࡽÐÞ…Ù–ÜҢ֣ըȪˬʔϜҘϺϺǶnɖĨΘԧÇ͵ÇdzʂIǢ͸ʄsŸʓĎÐǽÏʖɱˊÇΤΙ~ͧăĿÃÛ•"],encodeOffsets:[[-7897,4470]]}},{type:"Feature",id:"LBY",properties:{name:"Libya"},geometry:{type:"Polygon",coordinates:["@@ק̷ҿҤ೧βÏՄڑϸϻƷ̗ҶÂήӹؔͬΘñՈńҠÓϦƨۈ¯϶˕ÝШȜðΠėΒ־͔ʶËЦʌ´٦দÌΜðۮƓ૞ϓЀݛݮÇஆΙࣆйЦɔЖϮț٠˂Ф؄ЀׂŘ଒ǣ˺ϑ̺Iˌƛ࠴ıȲˣ̣ЕżΫÉԯʦڱ@á²³@ᶵ@့ॱGYΙ‧à¾â€§à¾’à¡“ÒŸ"],encodeOffsets:[[15208,23412]]}},{type:"Feature",id:"LKA",properties:{name:"Sri Lanka"},geometry:{type:"Polygon",coordinates:["@@ų࢓ΙʇܵȓÐڜƫீϠ഼׆ұϺסО࢓"],encodeOffsets:[[83751,7704]]}},{type:"Feature",id:"LSO",properties:{name:"Lesotho"},geometry:{type:"Polygon",coordinates:["@@̆ʩʳУƛ˛ҳſƹË̛ċؿ٨҄ÕҖ͢ϼǠξʵ"],encodeOffsets:[[29674,-29650]]}},{type:"Feature",id:"LTU",properties:{name:"Lithuania"},geometry:{type:"Polygon",coordinates:["@@ãɊĚɲχƄࢡƨDZ۸२ʴඬÃࠜĊŞǩ҂Ã߲СĀϓÛËșӃ࣯̓߻NȫʶљĜ"],encodeOffsets:[[23277,55632]]}},{type:"Feature",id:"LUX",properties:{name:"Luxembourg"},geometry:{type:"Polygon",coordinates:["@@ǘȳÏÊiȉòĞҼɖŽ"],encodeOffsets:[[6189,51332]]}},{type:"Feature",id:"LVA",properties:{name:"Latvia"},geometry:{type:"Polygon",coordinates:["@@†نЮՆߊ˼ڜعڪhÇŠÙ¤ÜƪςĻܢ̷ۚCКȕîС˒ӷ͕ࣗԛƙ߱ТÒÄÅǪࠛĉණÂ१ʳ"],encodeOffsets:[[21562,57376]]}},{type:"Feature",id:"MAR",properties:{name:"Morocco"},geometry:{type:"Polygon",coordinates:["@@ԒΥߜÎࢊȃκU͂՟ºÔ̄ࢱɜDZƷ͛ષƙÏ̵ӡñ—ثঙͩÍÑÛɥ࠻ŷഫاRহŷ@@@pÒ‰Ô±ÂË“È‘Ï¡@̥Ŋ۹ě˛ٻʿÕÐ੕ୟ࣡ˣୋ΅ϗĵ̡ቅãaD ϶͒ɮ˞ѪÃ˶̀פҴՖ˲ƊɞӬp҂̤Բ̪֔Ւ࡬f\\ц͔ްĢڎָтɠۮۮȿਸ਼͊ܢŔѶդ֨ࡈϦخÎ֘࢈˄ԪؤI"],encodeOffsets:[[-5318,36614]]}},{type:"Feature",id:"MDA",properties:{name:"Moldova"},geometry:{type:"Polygon",coordinates:["@@ȨŮ֒ĊؤʽΊÂϞɥÑ˵̪ÆŨΗ̊ɇÃűƾÄÉ×ӷ|ĉŜǫãÒƭɱËƥ˽ÉÄƯϦĘΪÏ‚ÓԂˉΠʹʠʯĈ"],encodeOffsets:[[27259,49379]]}},{type:"Feature",id:"MDG",properties:{name:"Madagascar"},geometry:{type:"Polygon",coordinates:["@@ɠΥȺ։Ɗà§É’ϽĉЗƩʙ˷ӰÇÊLjثõΥɵȗ¿܅ͧওб୅ԯཧ͑ୟϛইÛȣܻΡӛɊڙ̜ɳѺÇݘ̑ڠù؂Ʈ؄ϰƢD˪ДÙø՚șЈǃՌãޠ̊ҺŔՒмŒҶǤ̶Ʋτ\\ÓӎۖԮʦцŗάΦĵҪ׎fÔ˦ϔ̊ί"],encodeOffsets:[[50733,-12769]]}},{type:"Feature",id:"MEX",properties:{name:"Mexico"},geometry:{type:"Polygon",coordinates:["@@͙݅ƥØÕ૷ąЧƤқʺЧǚٳ֎سȞÓ͢бࢾÉÎΙ݄ɾٚĎؼưՊƠՖ΂ȨӬè۸Ƣʖ֬ɚࢶȚݔ‡ԚîȬDZ…ЙҋÔÈ¥ÔƸƥűγÉٽɅɎǭcǃYÌԓƳIJķÂPÅ­Þ¥VÞ·AAÓÏ›C̺˫̶șĢǹƌ½s˷ઃEЙۅŢƽĭȟqÊ•à¥à£žÑŸË˜Û‡É–ҷÓګÍчĉץɜؿDŽ޹ϬؿŠà¥Ï¸Û±Ð’Ƀɤҹº࡯ˈΓϦࣗӊÑՌȧЦ˪ĈđʈȖɔJ̄˱Ϙùͮ˭ъ݋࠴ࡋڀУԼÜ΄ƷȴŸԲѓȞӹФȽהÒæӣѸϿФ™ˀÒو̓٠^͔؇ͬ˫™ӑɴƇͿƔЕĆÙ̀΋خ׃ȡŸÓŎ˽Ƭ\\ǜթʮɇǴ̕Նё˨ޯʠÏɸϿ²ѷКƒͶϡ̨ϑqÆ­Î̱ƫJɛԞջӎ؃РїɈ„ؚŵҖÐʺֿϒÅŇɃɖԭȰӷӦÖÚΊ³̸̼ŽϜ٩׶ӱɶ̱Հ̷վϳڦͿݲॖÞ੪ĞÿǑ౔СኀףဪPÚ˜@DΌผ@̪̕јˇԀσ˨ѭȾҥѢʩۤʥՊڒۊhפͱфֹ̄ӯӸÓȂחɾЃپʹ׮ÈÍž|"],encodeOffsets:[[-99471,26491]]}},{type:"Feature",id:"MKD",properties:{name:"Macedonia"},geometry:{type:"Polygon",coordinates:["@@Å„OœǤӺżȊÂ˺¶ϴbÑ‚ËÒ։DžƒƑƥҕh͋ǿջõΑȴšήń˸"],encodeOffsets:[[21085,42860]]}},{type:"Feature",id:"MLI",properties:{name:"Mali"},geometry:{type:"Polygon",coordinates:["@@˰ƶƘӶˊpזɻӄǖ͖ÇŴȈâš^ȈךƣļЛ⋈Л⋆౾dᬼᆳᬼᆳȨϿԺʉ϶ƋV՗ठĈFካҟ֗íԭݛƃ଩ï̳̗աÂÕŸIȿLjҥš޻ΑDžʿٳϕŗÉΙǡÐŔɱȳūֻڙۡp˳ɭΣÆӥ΋ůÈÅŽάÊĥơhÆ·Ê•Ù­PɷŴʼnùʱʎ¬ʢĿİdzĉÂ˚ǤÉ΅ΚijɴȇȂǙvȫş˕őɱǹΫäɷɈƓ„ɕőƅAµ̮žʾí̽͘ʀǓӔÂÔº"],encodeOffsets:[[-12462,14968]]}},{type:"Feature",id:"MMR",properties:{name:"Myanmar"},geometry:{type:"Polygon",coordinates:["@@ӫηץ›ϥࣥΟƳО݅ՔؗΈօ̭ܵ̃ƹȪу֖ڙĪҷ_ϵ͠ދң޵Сࡷăذʴ٠˯ӼæࣸͽѤ˛৔Ʊਗ਼εۢօуॕ׳ҽöԳȠ̂ਪǫ޾څॺļ̢ӭņ׭ۆÅڰ̊ŵj׾дȦęΤÈ˺Ž࢈ڂȑÏۘ¨ЦҪ۶}Ӕજ׆׸ƱçԬ̎ƸÛ͈ӮÚˮӵξȧ|ٟ“ۙߓۭijঽࢲƔȨޛÕÇʓۣزÍζƷ؞ʔ~ÎÜյdẕӓȗ"],encodeOffsets:[[101933,20672]]}},{type:"Feature",id:"MNE",properties:{name:"Montenegro"},geometry:{type:"Polygon",coordinates:["@@ÃǀηЯÊˋǫÞɽ˞εǖĢƜŬҦ˚ȜƾüɠƟŬśˠě͌ǧçïƽȋɧó"],encodeOffsets:[[20277,43521]]}},{type:"Feature",id:"MNG",properties:{name:"Mongolia"},geometry:{type:"Polygon",coordinates:["@@ࢮƢ྄ܤ౬Єܴʳ࢚]֘Ͻ࠼‰à¯ÉࠈגͿӶࢊࢊशÎނįনÉLjؿஜΛßƺਫ਼ŌࡆÅࠖЗԚѕެT੒Ƌޜȼૈƒ௸פԌÄѰ˭ৌêХهק࠽É΅ӈńࠤŽ٦̴ڬËހוğ̗ÚĦ௟ÅןʅØ։౱͙࠷ѽࡹǞҿúѳէˎ͓ƌˣי˯׽҇গ̑ఽ‹ഫ̇à¦Ò‹Ï‹Ê¾à§­AఓԜࠥŰૣśჃȊऑmӱԀϣޠԱĢ৩ԼଅŞà§ÆžÌ¡Î¸Í–চׅڲன̀۷Ѿəז"],encodeOffsets:[[89858,50481]]}},{type:"Feature",id:"MOZ",properties:{name:"Mozambique"},geometry:{type:"Polygon",coordinates:["@@لæ৞Êɖńגt̚ʦԌaऀ͜ڞӤƊϕ“࠷ľ݅ÂಿƨЫʣ׷͙×Õ—ÔµÞ͉ृСॉ͓ࣕƵוׯ΋ȗí׳ЌÙǔӱZʣƪ¦{ࠗƋϷȤÆűΓΗ̗ۗ˳য়ҕÏ̳ðΟɊÉíѵّRïϊůϖí̠ƬपɓװГஂࢬ॔ɜ؆ŶúĨӶƉʞ˜غÇ׌E੠ѥ˒ÐÔǹȼϳǰ۫gÅ̼ÄװᢈۘӚЕɴüͨɅ¸͵ǯϷØסոԱʲ׌ζǰíઊΙ؈̣˖̅]ɽદɾٔ"],encodeOffsets:[[35390,-11796]]}},{type:"Feature",id:"MRT",properties:{name:"Mauritania"},geometry:{type:"Polygon",coordinates:["@@և־ԗؤÖɞГʚҵUЧǽйð˽ËïÒɺаŀߊģࠨĵкČмɑЎѵδǾˬᾔMǃ௎ȴќ߀øÂᒸ᪂©F౞Ṗ᎟౽cМ⋅М⋇ƤĻȇיâ™]ųȇ͕ÈӃǕוɼˉoƗӵ˯Ƶ"],encodeOffsets:[[-12462,14968]]}},{type:"Feature",id:"MWI",properties:{name:"Malawi"},geometry:{type:"Polygon",coordinates:["@@ɽٓɾથ̆^̤˕Κ؇îઉεǯʱ׋շԲ×עǰϸ·ͶͧɆɳûәЖѵɔʮޮ˄̈LJۢǚڼƞɪɉ܌ЅÏ࠘ƽǜɵ˶Ϲɾଡ"],encodeOffsets:[[35390,-11796]]}},{type:"Feature",id:"MYS",properties:{name:"Malaysia"},geometry:{type:"MultiPolygon",coordinates:[["@@àћֈĶ˞ΈȘýӸԓΜ֛¶֣ęϡĆ˿Öӻ̒ɵͤݑe˳׫Éߑخ঵ښįђӟ֚ś̡۠ҜĠؔȃΤƤƮۈÏ"],["@@أ˹ܯƚॱ@̅ॗ͓̇љୟۅǵߑɾЕóөщ՛Òէǟַӆƕ֘؜˽ٮǀǜ܆άǂ৖Ǻ׾ڔЬÕϦѥǮ˺В¸՜œа٪×шڀͼHќыžιֆɻ۬ʧÑ͡Ö¥ƮЧ"]],encodeOffsets:[[[103502,6354]],[[121466,4586]]]}},{type:"Feature",id:"NAM",properties:{name:"Namibia"},geometry:{type:"Polygon",coordinates:["@@رٌؖ͡ȃࠊȷ،˯ಒm৒ŅҞ͛Όѡۜѳ৘ǽՆۃà Â»Ù¢ÐšÇ†ÔŠÆžÕ°}Ô„ÏŶÃ₮˜׌Е᎞ş໴΂یȒհµͨÈPéÓÈÊ­C՛ͣÍΎಕÌسƒ{Ჽࠣ‡Báž™A᷋ݣѕҋÕՇDŽϗÔƗάͩɰГг"],encodeOffsets:[[16738,-29262]]}},{type:"Feature",id:"NCL",properties:{name:"New Caledonia"},geometry:{type:"Polygon",coordinates:["@@ÛԵѨϭ͉ȫҥɪ׹ϚէѼ։פś˶β[Һ˹φ˷ˎɻ"],encodeOffsets:[[169759,-21585]]}},{type:"Feature",id:"NER",properties:{name:"Niger"},geometry:{type:"Polygon",coordinates:["@@nּॹÈОҿպœϤâТբÂ̴̘ପðݜƄîԮҠ֘Eኬஈϒáªà¿¸á®ªà½¾à³¨Î±Ó€Ò£×¨Ì¸È¸à²¯Ì¾É“`ˋΔ˽ǻί͕á»Â«àª§à©³ß‹Î³à«‰Î”̵CÕ¥Õ¢mÄЃÊµÂË‹Æ»m֩ंȟ’ÚҷٱʔÒ¸ÊÅŸÓ¯~ӷΧѓq৯ѢЉȵѓb̿͆ࡅ̼ࣗıɕǻşӗʋ͹ÃݣٗӚ̟EË­Ê—"],encodeOffsets:[[2207,12227]]}},{type:"Feature",id:"NGA",properties:{name:"Nigeria"},geometry:{type:"Polygon",coordinates:["@@à¢Ì¡Í‰Â¬Í“ȉڥl҇Ղˡ؊שֆكYÝB¶തs՘ǂՊʶʴТԴėɨǔ͸ÈÓ¾Â˪ÎݤʌͺŠӘɖǼࣘIJࡆ̻̀ͅєaЊȶৰѡєrӸΨӰ}ÊŠҎ·ٲʓڂҸȠ‘֪à¤Æ¼nͬͯğƱ«˧۽ٱɛՙšѧDZȉÇי҅ΉŽыȋ͹ÿΓֽ˱ҽΊ͇aÔƒÓ­Ê‘QÐß·Éש"],encodeOffsets:[[8705,4887]]}},{type:"Feature",id:"NIC",properties:{name:"Nicaragua"},geometry:{type:"Polygon",coordinates:["@@̃ˆϽͺÈ˲Ο˄ÑϜĤžƒŵÚÒʾ”ŀȔŬRkЮȠrǬOǺɤʜÇĒľƺIJ̊ɴbǦĄQňȪĖ|ƜŹǚ›ȆńɄB̈ŌŜŖ˾iïă§ȉÄ̫ȗ˹ěͷÂυ®ÉtϙŹĉýΫÌɛǣɋ ɩźÆȩDZʛÈƓǦˉêȕʼnօɞųŇ"],encodeOffsets:[[-87769,11355]]}},{type:"Feature",id:"NLD",properties:{name:"Netherlands"},geometry:{type:"Polygon",coordinates:["@@Û¦yǀ˳ȽޓɇÍÔ@ƘࢡҥȞÕπީǩ؛âѠɲ݀ఆଲΘ"],encodeOffsets:[[6220,54795]]}},{type:"Feature",id:"NOR",properties:{name:"Norway"},geometry:{type:"MultiPolygon",coordinates:[["@@᥆ؙàªÉ£à¤„Յෛ͵ڵû΢לઃͰಫ˵ЫØߟωࣗȮ઱¥णѼԉÉԷ“ūփནƊÉҵ߭Hևױ࠿à¤à²«à®Ì¨Ë¹Ì‡Í«à ¯bձ޿¾૟՞Ñ˥ধֻۧυӛÖԪဋà¦à««ÈŸà­Ñ”̛ࣚˇ኶ޞզᕠ۶ဌࢂ໤୦áºà¾´à¶¦Ù„ᘼ੊ᇎπ൪­౮ۢ໖›ພǘ"],["@@áˆÎ…à¹Èœ×†Éԕˎეǚͮ̿ொÈ"],["@@᪖صᑟͥұأ݅ÇÐۡৣÂᅵԢނ̘ఽÊ࿕܂ٷڄᘎ̜Ң̋஦\\͊˼௾ˆ੖̋"],["@@à¿®Ìà°Òá±Ä±áŸ™Æ–ƫɴஹdà¤Ï¬á£´É¼à¯žÈ«à¡˜Ê¤á‘ºÈ½"]],encodeOffsets:[[[28842,72894]],[[25318,79723]],[[18690,81615]],[[26059,82338]]]}},{type:"Feature",id:"NPL",properties:{name:"Nepal"},geometry:{type:"Polygon",coordinates:["@@ÃαŌՕĩͩ۩aয়Ȟ٭ĂӛђଷŊયҼ߉Ю߿͆͜޼ՒϠΒȪڪʳࡔշҾť˰ЕٶǓۀσौȕঔć"],encodeOffsets:[[90236,28546]]}},{type:"Feature",id:"NZL",properties:{name:"New Zealand"},geometry:{type:"MultiPolygon",coordinates:[["@@Ȓ΋װ;ÊΡBÎ̹ϳչإїͷ̴З٭Yܗ̓ɣջӋࡗڇϓнʇÞlխˢࣱÃƗ̰Ҍذà©à ¦ÕªÇ€×¾ÍŒÜœÑ°ÔŽÑ¦ÏŽØ¸ÍˆÉ†Å°Ò¶×œÏ´È†Î§"],["@@،ࢫlָϜɯŲًڰ˛֨ãӒ͎юĭȯݗʯӫٛjɡʭþαūƻͅÒзֹ٭ͯƟɘΕŨӞ۔˟ҨࣛͲz̦؈̌ƚ٨Ÿլͻ֜vƪБΎڋݔΗת̸àҚұٺɑʂݡ"]],encodeOffsets:[[[177173,-41901]],[[178803,-37024]]]}},{type:"Feature",id:"OMN",properties:{name:"Oman"},geometry:{type:"MultiPolygon",coordinates:[["@@ֹ̻ϟªǩȧƉÑļ֗ÿĻϯFԽ̻ćХȓǯԹP͡ɃJͻПɷҩĂ֗˳ϱ³Ëטٿ൴ᠾ࠾֖á‚ϩתv͸ʔÎFΆϞǒƩŞèմіHϖֵҸ̧؞ŋӼƳϜӕɨ˧̞ŃCȉ̩ԃƅɽΟË"],["@@ʼnƳDž˺ʔ˺ľñÄÎ"]],encodeOffsets:[[[60274,21621]],[[57745,26518]]]}},{type:"Feature",id:"PAK",properties:{name:"Pakistan"},geometry:{type:"Polygon",coordinates:["@@تϻʞ٥൨ͻ߹۷ऩůౣȲЫα̖Ý̈֩ڴгܑӟ`׳ࠃࡇՃà¡à¢à¢¡à¦‰Ãšà¤‘ࢡռϗĪ٧ҾÑǘÜᇛD֓֕؛Ɇʣ؀٭٘໻Çà´¿eஃÅ̈́ঊொѢéϰГƌw݊ߥφͷԔеѶඨѕࡀŲԈŅǞȂגóદĈ܎ҶӈشCĠɼٞŌ̴ý͢ʀ±ԌΦԖ՘Ɇͥ֊ߜɴ̢•͒мΜĩмȣΤӬμࣘǮ८ĮÑƺӨĦ"],encodeOffsets:[[76962,38025]]}},{type:"Feature",id:"PAN",properties:{name:"Panama"},geometry:{type:"Polygon",coordinates:["@@˫ʎǵҒȺɢɅÎƿˤлɸοÃÇ̇ͻÉǽ‡ĉǩВҗɯŅŧŭϷ©ơԈŋƛˡ¸Ç͸·ÈɓİέCǻĩŶªǖìǠÂƲŲIJǩŲK͸͘ö̠ÌiDZͲ›ĀæɴȵЮÔΨɄԜǞ˺ʤҬ·‹ĉҶ…ώơ˜ʧ̈́ɵĹūȜӵÇʟ˓ÒŅС"],encodeOffsets:[[-79750,7398]]}},{type:"Feature",id:"PER",properties:{name:"Peru"},geometry:{type:"Polygon",coordinates:["@@ɥљћɋࡅӘñΈရࡊທࣾ٫԰ÎÛœÆʎ܅ાࠣ༄ßီ΅Ϥ˃ؤٷպױͼ˖ϒПߢʼךڢՎIJΓʇȧx̭ΎâͼÄΚщӆΌDŽ֤ԦܶৠͨࣸࢠʾմÅٔɢĂ֒ЉˎЅϴÉӶࢣضĿҨɞ̤ƣԎð٠ϽթࡣʤoÑ€Òݳ œųÛlj॥ֱÓϻɉ̇ČғԕÊBΡɛƵΔݳҲÔDZίÖµ͆҃ÝuÛӸÇ౧ϢĩӄƠܪടǷ˵£ןgÜ͟пƮ̵ȕ˯β۹Ջ࣡"],encodeOffsets:[[-71260,-18001]]}},{type:"Feature",id:"PHL",properties:{name:"Philippines"},geometry:{type:"MultiPolygon",coordinates:[["@@ÄÖºҽ˹ޑ̫ࡨϽÑˎإʉϿ঩Ӧɿ؊ʰЎՑЈËΑЃÂثҵƑʖ͢۾ՌʀҜ̈́̔ÏٔɰƎϒרv·ٰڼЋêхÃ̱"],["@@ÌŸË¡ËÕ˃Êԫ׈ǦɤɂɾĢԸҨ¸Ɖ֣جߺÄß¡"],["@@ૣߕЬט؈԰Ԏ׊Ѱ࠲Ʈۅևҧѳֿ"],["@@Ԏʹ՘BgΗϳΣՕʧ‡ϸÒєŽÐ"],["@@ʀभ٫ɞj˭ȶԯÐȋ•עʧªÆԘӶãY͈ԣٜ߮mÉ´Ì»"],["@@ɟܩέоѓ٘ܚ‰̡̈"],["@@ԮʉʶɖüɇÆΑ˼׻ɛۥӷ˥ÆڳȊÚѾġϊIJਾүăҙ˜ȫēϯٻЮ̵ѴÉ̯՗ԊރůлȆ¨ΎˀɊʣȘŇ̡бӚűμÂߨͺˡĔೄ˜ހԘA"]],encodeOffsets:[[[129410,8617]],[[126959,10526]],[[121349,9540]],[[124809,12178]],[[128515,12455]],[[124445,13384]],[[124234,18949]]]}},{type:"Feature",id:"PNG",properties:{name:"Papua New Guinea"},geometry:{type:"MultiPolygon",coordinates:[["@@ɽÄε͔ÏՔǷ٘ŜĆĜʡʬÈРՑЈ˵Åɽ"],["@@ѯçƃɽҟȱћȟѽBÛʔӑɺêʺݬũҠàŶЖŦrĆѽÓÜʂ˼Ҹ̚ġӸԌfÇœÆgү˯ԡ"],["@@ݤտղࢻӖ„‘ω٬ƛʥÇࣀÎÄ¡ÊÖ‹ÃȷɔܟĦࡕŴٷ՚ӉҦѧ݀ભπ܇ʇԡˣńإڇ˿һƖࢅ–aá©’aᩒภ׃༊ӓׄїҴхŸӵඔԱȲѽޛěȄ֕"],["@@Ê¿É¡ÇÓ¸È͘ÏËžÓΪ؇ʚɺȮҒɻ˸ÈΜȫʹΛ͊ËĶѧ"]],encodeOffsets:[[[159622,-6983]],[[155631,-5609]],[[150725,-7565]],[[156816,-4607]]]}},{type:"Feature",id:"POL",properties:{name:"Poland"},geometry:{type:"Polygon",coordinates:["@@·՜à̂ȹ̧҆̚ɺɤÈђָʘ಼ϴ੒˴࠼ƙÚȱ߸Yਚħ໶^њěȬʵšωɸ͋KͯԋǡʸϳfÏцܻěɽзįރۥɒϗǿ¶ߙ͔ØšЇĒӹǵч̖Ήŕ³¼ϭаر¼ăˀֻĦűɑҗǨÀɴػòЉ˔"],encodeOffsets:[[15378,52334]]}},{type:"Feature",id:"PRI",properties:{name:"Puerto Rico"},geometry:{type:"Polygon",coordinates:["@@јõưǕɋɃمLӫ‡·άŢŬیK"],encodeOffsets:[[-67873,18960]]}},{type:"Feature",id:"PRK",properties:{name:"North Korea"},geometry:{type:"Polygon",coordinates:["@@Şƥ͉ºη˵ʣ˷Ž׽ѣȅƫƧ̓ÊÖ“ÆηɥηįġͰƋӈσŧȭΧÇץ¡ÍϛϑˆÃùСdžĵƿʙé‡ǀɑüɥƆɰφȤİõƶɆҒÅƎөĠЇɤۄբऒҌ־׮ЎËܪ‹ſѺಚβͰҼժӹ"],encodeOffsets:[[133776,43413]]}},{type:"Feature",id:"PRT",properties:{name:"Portugal"},geometry:{type:"Polygon",coordinates:["@@̦Ɉ΄ŬɂЫӺDƞłӪ‡ɼуϱɩYÙ½Æū‘Їγçʹԋɵտ̄ʡřɫ̵̿ê˥ͷɓѷŠџġŸڂÿԬϓþȩ͈äռͰ̨ÒͼǪԎkΤǙ̠™˲"],encodeOffsets:[[-9251,42886]]}},{type:"Feature",id:"PRY",properties:{name:"Paraguay"},geometry:{type:"Polygon",coordinates:["@@ͦ৖tҌЖ݌าʔޮ]Þ´Ñ—bʵʞҳÇଛࢲLJ΄Ç֦ɩǀʣþޓİ͓̼›̀ƌ̢ƳAҥŕӻǑӛÆÝÞ١ړƇऻŸࡑɮࠢ౨ťψࡽ͢ਅبۉŸ໵ൌ"],encodeOffsets:[[-64189,-22783]]}},{type:"Feature",id:"QAT",properties:{name:"Qatar"},geometry:{type:"Polygon",coordinates:["@@ÇؔɨѲɰĜʬËdӯǽӳɵÑʫǖ"],encodeOffsets:[[52030,25349]]}},{type:"Feature",id:"ROU",properties:{name:"Romania"},geometry:{type:"Polygon",coordinates:["@@δǶԴġՠGϸȳ˺źبĄɄȠΠ@ʰćʺʟˊΟӞÔ€ÏėΩưϥϒƹЂƊϠƟpÉПǹʯĀɻ৥ӳĖ̪ؑফțзɋ௽¬٥ƀ͙ÕÊΊƵƦȚƘȷŀ˃ȋөʔßΌԟȢĥˌҕͤڪǂԖ֮Њ֬ԢǮ"],encodeOffsets:[[23256,49032]]}},{type:"Feature",id:"RUS",properties:{name:"Russia"},geometry:{type:"MultiPolygon",coordinates:[["@@ࡌ๫కˤԫà¯à Œà¡³yוÙԒսٱƻ۸Ĥࠊħ࣢Țٌš૴ӯࠜôରަϮͭϴÏŠɔ։̆ߵuà ŸÎŽà¡‘"],["@@໵]ਙĨȒτ୊˚ࢢƧψƃęɱäɉ"],["@@֦ȽțØᗸű࿨޻࠭λ൛ēsࠑͳǩ޽~ٗ̊ૣʖȉθ࡟Ǝॗʼnҗ̎Ǽ̸৓ȥϚЃӉΣ@„ášÙ›á”ºà ³Ã¯Ô·"],["@@ः©ƭˌੲΖ@Ö·"],["@@ળ»@ָň–܈E௒ʉïŗࡽȩ"],["@@ౡMႣĤƧ¬ߘͪੀþஞÍĸə"],["@@ॿͩഉø༛ͨȪ˖༨ųᑔɗ"],["@@ډرᶽzඃȣမղҎ׀૎ǂᕞ™ᴬѽ"],["@@ӹóᩣŊɟώູɦūҒ࡮Ƕ…Ҟသܒޙĺá¨Ý†É©Ï¢áˆ¤ÑºáªªÕ¢á« Ç€à·´Ì¸à¿ÅŠ×ͩ֟ʻᲗз᢭Ðᤙßà°«à à³‰ß±Ç Û¥à¾ŽÛ"],["@@ɨгÞȲឤYቈЧڬ̿ȽѧङÊá•…Ò¯ÙʟਬşఖɃݴDŽєաτɔഊƂ᧪ƑȴϽ↲ů´ٜᄼƥഄLബѷϮÕӹΙੌڋ೔Ϳ߸ࢦഖϙ෢ɦྼʵؤʀൖş؅ޮà«Î¶ä¢€Õ±Üӿᔲٛ₎DŽာƑ۪ÎĹؙਜʇ૴Ǥ๰vཚǑཪĢะݛਪˎڷ՞Ïώᧆɻფºá‚Б୲ν@â€MKઇσàªÃ–ݶÒԄەϲɧĮÎÉ‘É༧ǾášÙ…ݛĭ౽ן௛ԧ̱ϣய׊ᔗڇϣ̸ߵΫ૱Ř˓Ö৙߽Šͻड़ȋő௣ޭ‹Ϋ۱Δα฽ѕ̅ॡభȳʥ࡟ே޳ׂ̳έ௬ҵለИ୘܀ԆªϾರȊຊ੒คࡺຢڢڮஆ৷ëÔۗᒉइÛਖᓧ˷ᑃටۚԧሙɕà²Ä“Ô؊ಯŶ਩ЭᢵƠáªÊŸá¨©à¿›á»§áŒà³šÅаՃࠄȅ՞оईÃௌà¤Â†ÜÚ࠽ëà§Ï›à´‰à±à¯“˯ׇଙ঑ଇॻթӹ૩ӱՉYՇФૻؙſ˩ÅƦKÑÑ–xŦ঴ɛܚܞ̒৶Ʃ֢ࠈ˾ऄ͚̮Ѵݲ൷ʛܯͧ౧Dͻ߄হװหˎ̵ࠖ̉Ԫ̿βԯà¡Ý‡Ì²à°·Ê¢à«›uਯƱۛлҤȥXҩұˑݷࢻRσஅÕ৙̈́োéѯˮԋĞ௷ףેƑޛȻੑƌޫSԙіࠕИࡅŎà©Å‹ßƹ஛ΜLJـধɎÞİवΎࢉࢉ΀ӵࠇבà¯É‚࠻Š֗Ͼ࢙^ܳʴ౫Ѓྃܣࢭơ͡çѽԤàªÅ‘ΧΦחnjЙӠҩưிÉୃӜ҃ѯሟᒒੵٮ̮˂ᑋß߭³êҞઅ˺࢙ȱ˃ࢊມǺݯΑᑅ̳Чȹḭ̇ϫ˻؆ֹ߭ɓǀɭ߭ХസֿÉЉ୻˜ʓʟ੹Ѧ೯iࢻΟহͼᇡ׊ಽsჃࣳĿؗࡹӤڡउʖǡÓÙÜŠÖ«Ø°xÕšÖ—ÄÑÑƋϥӽ߿Ƒ࠳à¢Þ†ß•Ä‰Ö£à£¼à¦«Ô‡Í¹ÆɇωÌֿԚɿ†ՅȚʳΈ޵ǮԙÆƥƼଥЖఅƌ܃ƞĹıੱ܂य़̈́ܩӴؒƈۤ۰ҹͪఌ΄uȀݯƉ‚ώѠɼ߼ÖƄ˪ȅҪ΀ѰWʚఉ˚ӭUԯЀ١ƃ੩Ìlǒ̗θڟ¤éʼɀǞÕӈࢋąʭ¦Ƀȑ̽”ȷ՞ȟ˨NJĀڴ‡͞ȀÊɢ֥ƪ¼ƲÎƴՃվǸɨĉЂࠑȨѱijšȼࢭɂˑӸíТЙȖάˊÊ޶װӞųƤक़ҬࢡЎᅢ੶ޮӠ͂єగּΆնݳش֢ܜà¦à¥šÞ¢ÙŠà±¿Ö”ŬךڶüොͶࢀ̈൦ԕᘨȧṺो٤ЋÆ֓टѳàµÉ¡â·Ù”؟Ńൌ؛ÂϵÆ࡫ઌʯڂɓňРԑΰ՘͈᎖Թ۾Ȳ֣؜ዦࠖޢµ޸̋Ӫ׀۫ԄЪԊءԶᚠˑӔҹ੡ĻNҳڌ˽ಜǼȶ՚ჶÐᰪܞي£ࠣԙਬĕ׼˼༾xà°¢Îफ़Ôॖ֌ࢡӢѪˤ២ʫ୒ʿᴾॣ֚ѰࡡѺ{ǴৣĈˢЌ҅ټ}Ë༄ݾրކزǒᕮɛǬұߕڽԺˋ˒חÈଵऒԧέ֕࿫à®à¥¦Å­Í®Ì¢à¤ŽÉŽÉžÐ¶Ü®ÐŽÓ©ÓŒÏ¼Öˆà£¿ÃªÈ«Ò²Ú¢à¡ˆàª£Û†àº’֦șװмnѴүͧ߷à£ÆµÏ¥Ø„ඤͦლ¬༈Óݛ۪ċࣆศǞá¾Â™á†˜ÅŒÛѮংւॲx࿎иᕠÅ˪ɲᕂþیȋሴҀ໲aɶδߤΨጤΈ෸˗ଥȷበŹ"],["@@ⵙ͕ໞીےĦقÃᒈӋʟͿ"],["@@૽ÅݱÛśÆঙƑ࣫ȦÓʾáˆ~࿞ƶ౨XǢɧӘȬߊÆఞǿ͗ŷ"],["@@ᆳĿᚉʎඅ͎٣׾଩ǔᔆָᆎȎ࿌чኬ߻ȹݯ"]],encodeOffsets:[[[147096,51966]],[[23277,55632]],[[-179214,68183]],[[184320,72533]],[[-182982,72595]],[[147051,74970]],[[154350,76887]],[[148569,77377]],[[58917,72418]],[[109538,78822]],[[107598,80187]],[[52364,82481]],[[102339,80775]]]}},{type:"Feature",id:"RWA",properties:{name:"Rwanda"},geometry:{type:"Polygon",coordinates:["@@ͬӃµӵÊÅѿÆʱÓԛàþҠŘތԄʎɺȰÄԈʸ"],encodeOffsets:[[31150,-1161]]}},{type:"Feature",id:"ESH",properties:{name:"Western Sahara"},geometry:{type:"Polygon",coordinates:["@@oҊŸ@@ÉeÇ‹Eà±áªÂªÂ‚ᒷ޿÷ȳћDŽà¯á¾“Nǽ˫˜΢bCቆäĶ̢ΆϘˤୌୠ࣢Ђ੖ˀÖ˜ټۺĜ̦ʼnϢ@˔ȒԲ‚"],encodeOffsets:[[-9005,27772]]}},{type:"Feature",id:"SAU",properties:{name:"Saudi Arabia"},geometry:{type:"Polygon",coordinates:["@@ʼnΪʩʨÃͲѡ̞҃۴Êۆׇ׀ϑÆ֋ߠīזӾӕञϿ͠ґǨˡӖ°ȎɹѦʕȊÍزԟڴѓ־лIžҦœ̌ļͲनƅζʶȪ̢ٚŚƒˮˤƜ࠷ࡀá†Ñ„džŴৢɩబיᛎá•à¼ Ã£Ý Ä…ȾÐתv͠ܥаȓƠÌִΛ¼Îċ˩ł˯ʎɽÅ˟ŲȵʬǕɶÒdžÍÂŽÈ™Í࡙ᡌщǞDzϪש֕áᠽ࠽á‘͑޷ϙ׻ࢥϹƕÉˬͧ߻ĎƷČॹmɫùΉɔÉЭĒΟÏË‹"],encodeOffsets:[[43807,16741]]}},{type:"Feature",id:"SDN",properties:{name:"Sudan"},geometry:{type:"Polygon",coordinates:["@@Å›hdмĵ̀џͨĵ؄ĶبϳÌÃȇÔ©ȬʕðÔңңл؅џđ۹Ӫͅǥđʓџǃ…ǥ࠵@řǦ؃†̡ÆɳîÑӬƟɲ؃ŗɱϵÉݣ˿Çʳğå ̅ʎÃʼƌΔE΄ӛՀĩάZȰ̱ʜUӦǭ̵͖Ď̰ɒΖħÎˢʴǫȞɞ԰ϨئܦÃ¥ ZΚॲH@းâª@Ὂ@ῼ@˔ࠗÈƳŪࡻ̰à§ÍŒÈ·Ò Ì³Ñ‹Ó‘Ø£Æ˅ʳĉ֑α௿ĚͳƅܟͿࠟԓзέٛÄ΃ЉɽÊ࢟Dij"],encodeOffsets:[[34779,9692]]}},{type:"Feature",id:"SDS",properties:{name:"South Sudan"},geometry:{type:"Polygon",coordinates:["@@XٽűʯѿqË·ÓԨÑюХƨͳϦșӼࣳ֫օԫԇԫϭסFگȟՕȊ΋ɭ݉ÖȥάҵDZϱÆɣƕϗĸԗۚƉˊعͪɅԌΕζ֟ѬS˘ҡͼ֯͠ʴĠ̀ǂÉݤɲ϶؄ŘƠɱўӫɴí̢ƞ؄…Śǥ࠶@†ǦѠDŽĒʔ͆ǦۺөѠĒм؆ҤҤïԎȫʖԎªÎȈϴËĵاĶ؃ѠͧĶ˿cлŜg"],encodeOffsets:[[34779,9692]]}},{type:"Feature",id:"SEN",properties:{name:"Senegal"},geometry:{type:"Polygon",coordinates:["@@Îٺн̚φDŽРמȦќ˾ËкïШǾҶVДʙ֎ÉԘأֈֽžԹǔӓ̾ɿî͗Âʽŧ³қâÙģȃk׿ȲЛV༇–ɥħ˥‚ѻƋÆÙ¢ÞˆkȬŞƮR̸ȘήǯκcζȌÇÊˡƙʻJͧȸˉ_Èȥࣵy"],encodeOffsets:[[-17114,13922]]}},{type:"Feature",id:"SLB",properties:{name:"Solomon Islands"},geometry:{type:"MultiPolygon",coordinates:[["@@ɾ˿חN͉ԬԈȯǜ‰"],["@@ÍmԧĎǫżÀͮֈƘǭƎə"],["@@ųƹحܰǫԈ˺@̠ڥʹЗ"],["@@–ǛڅΦҟ̠̿˪ŰÄϮȫÛϭȢˉ"],["@@Ǘ³οȒ·Ί¨ƖԈΡͰ˛"]],encodeOffsets:[[[166010,-10734]],[[164713,-10109]],[[165561,-9830]],[[163713,-8537]],[[161320,-7524]]]}},{type:"Feature",id:"SLE",properties:{name:"Sierra Leone"},geometry:{type:"Polygon",coordinates:["@@ɧØØͺѩ҈Ƨ̬Ĺت҆τĬɺƞǸɶpȜǂڦCɺ̛ǼΛÂʓƈɗṶɴ´ϹϹϛҗ«ʓȩË"],encodeOffsets:[[-11713,6949]]}},{type:"Feature",id:"SLV",properties:{name:"El Salvador"},geometry:{type:"Polygon",coordinates:["@@Ä¡È¡Ó¡^Ì¡Ä„ÎǘұÀʃǶ~Ů˾ɄǀĢ«IJȠ¾ʜëǸǙʪƇŒœτĴǤÑŘÄÃͳ"],encodeOffsets:[[-89900,13706]]}},{type:"Feature",id:"-99",properties:{name:"Somaliland"},geometry:{type:"Polygon",coordinates:["@@ϛԩד۫۹MᩧাÍ̜̳К̳ҨǾ̖̲҈˚ƹǒÎϜΗкGߊɌࣴĴ݌ʼиÆ̚ƶӎˆKaE΋Aà¡‘@Ñ«"],
+encodeOffsets:[[50113,9679]]}},{type:"Feature",id:"SOM",properties:{name:"Somalia"},geometry:{type:"Polygon",coordinates:["@@ѼĎЊ˾͈FpɵýӧHѳǯ̣ÊࣥЙयԱ੷Ü௷ܓवধ଩à¡Ú¹à°·à ¯Þ³Ù•à¤à§±È—Ñ·ÈÈ£Ó½ÛšWᵤܾ॒ɰˆբfݠפબšᛜᡄה۬ϜԪ@ѬBà¡’FÎŒLbËhÏ°Å°"],encodeOffsets:[[50923,11857]]}},{type:"Feature",id:"SRB",properties:{name:"Republic of Serbia"},geometry:{type:"Polygon",coordinates:["@@Ԡȡà΋Ӫʓ˄ȌȸĿșƗƶƥȷÈø̫Тγ͋ʿƗˋĞijƑšϳa˹µƒØĴĴĦȴšKÇƼƑ ŋƆƽÀšŠƯ±ś˧ȩÑèð͋Ǩ˟ĜūŜɟƠȢšŬЄЛ͔ɀτ̥Ë͔́ˉʈȱ͘٢ɚԾ™ҖͣĦˋ"],encodeOffsets:[[21376,46507]]}},{type:"Feature",id:"SUR",properties:{name:"Suriname"},geometry:{type:"Polygon",coordinates:["@@৔ǙĞưڶÔࣚɥѩܟâֹͤӽƥίóϩɉΛӓDzЇđ͹öÄÊƘǗ÷ǡҙèԡܴÅÓ„ËBωØƺѠ¯ȤԜɖƈݲ"],encodeOffsets:[[-58518,6117]]}},{type:"Feature",id:"SVK",properties:{name:"Slovakia"},geometry:{type:"Polygon",coordinates:["@@´»ΊŖш̕ӺǶЈđ؂Ţߚ͓ɷɓÇ͹dzđ࣑ʮ˟»ȟȡÐĿěÄХŽͭ}ãǙ۷Ļ̱ĠёɌċ̆äńŢȂόa˺ĔxþLj¢ÆȒȖ˜žưʢD"],encodeOffsets:[[19306,50685]]}},{type:"Feature",id:"SVN",properties:{name:"Slovenia"},geometry:{type:"Polygon",coordinates:["@@ÛœÃÑŠÈܾtLjƘƘUǎ˳Úɟć͹̇đHɻͣh˷ƎƷƙב†ȈúȫΨĞа"],encodeOffsets:[[14138,47626]]}},{type:"Feature",id:"SWE",properties:{name:"Sweden"},geometry:{type:"Polygon",coordinates:["@@à ×•Æ€Ô¥à³¹Ú­à¾±Ü¡Ø“ஃײףߦүޗॅ࢑ÈÍතӋ޿৳ĆӅڗঃÂˉß۳॔ٓà®Ï†ÓœÛ¨Ö¼Ë¦à¦¨Õю½ૠղ߀࠰ä̧ͬ˺ಬஂࡀञֈײ߮GɞҶཔƉŬքԸ”૪Щ಼ֱv಑˴͛ฃʃ"],encodeOffsets:[[22716,67302]]}},{type:"Feature",id:"SWZ",properties:{name:"Swaziland"},geometry:{type:"Polygon",coordinates:["@@Ç¡ÏӭěԅҖS̄ɰ̀ĂʔÊÒшƵŰϕðω"],encodeOffsets:[[32842,-27375]]}},{type:"Feature",id:"SYR",properties:{name:"Syria"},geometry:{type:"Polygon",coordinates:["@@࿩ࣅऩͬgNŖŶ_ΈȸҠҜ̈́Æͤϗ¨ÿٞȶΌɤȀɤȀ°Ҹ˞Çऎɺ҂ƿۖFॴ̀Òaक़žїԽҡȹĂؗͅ৫ᇵ࢓"],encodeOffsets:[[39724,34180]]}},{type:"Feature",id:"TCD",properties:{name:"Chad"},geometry:{type:"Polygon",coordinates:["@@ĎЄաnDզΓ̶δ૊ੴߌ¬ન͖á¼Ç¼Î°Î“˾_ˌ̽ɔȷರࡔҠ…ྑ…à¾Â¦â€Ü¥ÃϧإÉԯǬÈˡʳĨÎɑΕÄ̯̎¶Ǯ͕Vӥ̲ʛYȯÕÆ›Ñͽ؉ࣹ߅ϳ߹¾ÊûĊÌѫ̋Σ͟੓ÍȽÈÆ“hƹÉۛÙƀɪ˅ׄşÎλƜӷӪǼІϦċʂÃÒ¸SқކŒÖÉÖÍ­Õ "],encodeOffsets:[[14844,13169]]}},{type:"Feature",id:"TGO",properties:{name:"Togo"},geometry:{type:"Polygon",coordinates:["@@ڱdzȇ̎ɡՔãкȆݴÉ̬ăڎD؎ΕѠÖˀ݂kŅѵʲÊ̈̋ŽЭǜǥÂáŠÈº×…"],encodeOffsets:[[1911,6290]]}},{type:"Feature",id:"THA",properties:{name:"Thailand"},geometry:{type:"Polygon",coordinates:["@@ݭϬܗeŬڈ݉Káऋґ௯˙ÝÌ؋ն΀ދưܭҶӓԚĭѤѧË·ևĵßќۇςƣƭͧ͒ÆжÒӄПЌÆӳǃҲĠԾʚ߬ТࡸҤ޶͟ތ`϶ĩҸ֕ښȩф̄ƺ̮ܶ·ֆՓؘÐ݆ΠƴϦࣦצœӬθӔȘθʷ´ÔÖ¨ÂȷࢭpݫࢰԆʤƧӰzǜَ̊ÃٖڽÀࠥںܷ›܅˙ϛ޿ŦગDž՟ۧȤ১"],encodeOffsets:[[105047,12480]]}},{type:"Feature",id:"TJK",properties:{name:"Tajikistan"},geometry:{type:"Polygon",coordinates:["@@̭ʷࣳƖÄӛ࣬Þਢ˗འŶɈާˠÄԜȓ‡͛ŴÓà¡¿B×ØԻϕÏĉ̉ǯͩˠþ۸ʩ¢ĞʲғÈα̇ė͹Żūԇj˕ϩ˯nj؋ˑʱĺӀࡘǹض؟ȨɔφۮŸЌҬˌբ૲ȜǩϵŤɹΎv"],encodeOffsets:[[72719,41211]]}},{type:"Feature",id:"TKM",properties:{name:"Turkmenistan"},geometry:{type:"Polygon",coordinates:["@@ñۼطŠॣݔڣĠगюׯþσƽ֙|ׯӓ݇NjƻרŪ࢞ٽ˶ɎֺÖ¸Ȇ۾ߊȵ݈ˎؓԎʉӔڱɋÄ؛ʿհψ˨ॖǪ֨ɻךڅњ¤ॆ\\Æцܖ̂۾ӦଆѹĜڡÍǣࣦžˮƳаࡽ०ׇոЃ࢞Щ૤Ϋwԥʩ€Ѕɤſ̙۽NjǙڥÓÊ­ÚŵǫϟهÅࡩ͈"],encodeOffsets:[[62680,36506]]}},{type:"Feature",id:"TLS",properties:{name:"East Timor"},geometry:{type:"Polygon",coordinates:["@@IJȤܢȌז†ˀŀ͆Ľ̯ɫ࢕ο۳ʋeʬÄÇ”"],encodeOffsets:[[127968,-9106]]}},{type:"Feature",id:"TTO",properties:{name:"Trinidad and Tobago"},geometry:{type:"Polygon",coordinates:["@@ӚŊǮ‡‘صۭġƯúʒɲiͪ"],encodeOffsets:[[-63160,11019]]}},{type:"Feature",id:"TUN",properties:{name:"Tunisia"},geometry:{type:"Polygon",coordinates:["@@ΩພԭͺQȰۉԄóنԮҶȢۚƃߠǠќࣶͺךĵ}ы܊̲ÒljпЫMϱ̆ȽÅܫփхDŽқѤaÉ„Ð͊ſ³٥ХʋʵËֽ͓ĘΑïΟЧț"],encodeOffsets:[[9710,31035]]}},{type:"Feature",id:"TUR",properties:{name:"Turkey"},geometry:{type:"MultiPolygon",coordinates:[["@@஺͗à¦Å¼Ü¤Ãµà¦²Ñ¬à£†Â¢ß´Ð­ÆœÌ‘ăУزȻͨʕֻʇˀ५ÇʻҠڧЕƙÌÉŠà¦ÅˆÎ¯Å½à¥—ŽÒbॳ̿ەEÒÇ€à¤É¹Ëǯҷɣǿɣǿ̱Ϡ͈͂ԟí۱ȖֿәౣĥڹҊࣟ†ȗΑׇij߻҄ࣻeӽ࠶ؗҰЦٸՓВठߨಒ’ΜྀٔÅ৞հ঒ʄർlุף"],["@@Û«Ò˃Ϻ\\ǦȦĦʺՂХɞࡦ˄ܤőĴ͓ܼ˓Ƶȵি±Ωʷ"]],encodeOffsets:[[[37800,42328]],[[27845,41668]]]}},{type:"Feature",id:"TZA",properties:{name:"United Republic of Tanzania"},geometry:{type:"Polygon",coordinates:["@@ƚġᵂႋÌӣ஼࠿ϱਙ¸Ӊՠ̩~ɓɳԓ¶ʭÇГ̌ՃÎà ¡Ì°Ç¿Úӣࣿ͛ԋb̙ʥבsɕŃà§Ê‚كåɽଢ˵ϺǛɶࠗƾӉʨՕƘͯƘΗɈґ੖ӣҺǗӤČѨƯޞΎ ̨̦͜ѬȺǮS˘ǷÈ·ͨÊł¶Ӷͫӄ̎Ķऄ[ႎà"],encodeOffsets:[[34718,-972]]}},{type:"Feature",id:"UGA",properties:{name:"Uganda"},geometry:{type:"Polygon",coordinates:["@@ः\\ÌĵԇʷȯÄPوȜ͎²ڬǰϸ͎Ѭ͔ɠ˒̘͵Ŗ¼চΌɮՖȉڰȠעEԬϮЊ×Ä°Ñτ९̧ؓЯ֋ʉͽTࢹá‚ß"],encodeOffsets:[[32631,-1052]]}},{type:"Feature",id:"UKR",properties:{name:"Ukraine"},geometry:{type:"Polygon",coordinates:["@@̾“ɄȒʮ¥ࢌĆ՞ӇȿÇêʻڠ£̘ηkǑ੪Ì٢Ƅ԰ϿӮVà°ŠË™XʙͿѯȆҩƃ˩߻ÕџɻÂÏڡã֑˕޽«ܣ̻¸ԹЪȭࡨ¼ÇÌ›à¤Æ¡à¬›ÓŸÒ±Ç È„ЂࣽʘƨLjߪ˪ʑȔಯɆË̼ީĻ̷ҧٱةϟƠÐƉϑƺɂĞƦ˾ɲˎÑƮǬäĊśӸ{ɞØƽĎÃŲ̉ɈŧΘ̩ÆÒ˶ÏɦΉŽأʾ֑ĉȧŭΟ@Ƀȟاă˹ŹϷȴ՟HԳĢγǵÃɤұɮÇͺɸɔȀµɑϘބۦиİĜɾхܼДÂҢɪٲnࡖßबȫڎi͂ŧ̀ƦɚÈݸ¢ͮąÄцʶȂܞº"],encodeOffsets:[[32549,53353]]}},{type:"Feature",id:"URY",properties:{name:"Uruguay"},geometry:{type:"Polygon",coordinates:["@@ղĚࡆٯ̺|ࡺ՟ڈҫӠֱχЉɸӇεՇॉұاǚғěޥΰ֫ÂԟҬÞլǾȈS࠸ɤࡺȾڦ"],encodeOffsets:[[-59008,-30941]]}},{type:"Feature",id:"USA",properties:{name:"United States of America"},geometry:{type:"MultiPolygon",coordinates:[["@@ũƕȽŤ|ɾƓ̨¦ĤƤƎÃǔ¸þÜeÍƙƬñƌőɊÌq¯͟ǵËÅ¿"],["@@˭ÑƟǮīèQÀĈî̘ÄɘŹëĵ"],["@@ÄÒ‰|Úĸа•"],["@@­µÓŻˆŃȒÂ’ɤŚêÃÊË¥"],["@@ıĉ˱ƴªÖŸĈȘijÈ"],["@@Ƭңʼƛז½࡬ƅࠂʹڼŊਖɓ˞Tݨʄ߂̧ࠒ͗ں˩ٶËĈəȢĉ½ĉɦǎĔ¦ȣǜƅɴ@ŬĹĽƫ࢖ÐǶÞǚܳʗӹÐÒ¥ÈÌmēĦť˸ÆÉ‚@ঊ҆ࡾƀસмfÄ÷ʰƉǒϜƆࠜHÞ˜Aˎ͞ŀàࢶ؄ϜƸ౦N໾BĎȺË¦Φž̖Ϣʲٺٚي˨ə֜ƜώÊAଧռӅƢË࣋Пࡷ̃ࢱÊѻӿƛȋSѽˤѽΒsė̬ʦȇãʇ֥ƋЗhةƥλ¥ӥ¥۫Êఀǂʠǃ୳ʥ՗C|ĺʭɷʚÂǹ׽ؑ٧×ɎȪ˟ɀǪÒȼƭ^Í…Ë͛ҿڡûÂʺֲѕ͎įۦljεǴՑևƀׂ˓˜ߛʊÃĖ̃Šà¡Õ•Ø¯à¢‡ÊÖӱнÃṈ̃ţ˭इձÓÐЅӽŻׯƪ×ˬܗώשLεЊঅÂ֥—͛ȿԡʣŃЯĺÆς͋ȖѻܢϹٞű͢ǤÖɽҦٻ۲͟źࡑϡƭ¦СϼՃȺोÅݗĤٙÃÎſƲɟaͽǴǓLJÅ̵ŮÍǃØ€طѺܻĿØÈšÔ¹ÃÛ»Èއح࠳γÒБȕϗUׅ¨ЕDŽ˹Í{׭ȂٽʺɽЄÈטӷÓ̃ӰуֺףͲۉgՉڑۣʦѡʪȽҦ˧Ѯӿτїˈ̩̖ป@C΋ڗ@ဩOቿפ౓ТĀǒ੩ÄॕÃƙіխӚϻĴğʌһ¦ÌɪޭĊɉƌĹҢà à¡ŠÛ©à­ ÂˆÈšÏ‡Ë¤Ù¯Û´Å™Û†ÒƒÒžÈ€Û¢Â…ÜœË٢͠ߊĸނĺނƱૼˇܘʓ϶ĸÇ௒˷҂ߋȺɜƇÛ˷ێᛸ@á ‚@à œ@ᢢ@៚@á¡€@á¡„@á­°@ᮞBáƒAF͔˴J"],["@@࠽͋ѕÉŽЀބ̘҆ŸÖÉΤʻܫÐ"],["@@ԧŽսƾԛɮࠦƞښùĂ͑"],["@@԰DžԾĒڸɛ࠲őéÄÙDZٕǾ͋Ʋݵȧôº̈́"],["@@؊ϛώnjහ»¹ȕ౾ƛࡨČᄚ˅ྤÄ٨ʼn૦ƎౢʧࣲÅ@@Má·±Iâ·à  {ࠌɵהÏÝœÖࠈҺࡈ˖Ҁѡ֤·ޒϙՂ׽࡮य़ේ՗xՋұЙҥ͂ÝˌʃܺàªÚºÒߎ߯Ä೷rটʌ჉ࢎߩDŽ฽̜୑í࿻ϬৃΨटǯǦ×Ò«Ãà¦Ç«Ý‰Ë±à¤Ç³Å¥Ó¶Ïšà šà£€Ê¶É±É‚ੱҵֵ֑௅ױؚСß׿ࣗΗà¡Ê±È»Ï‰à²½Ñ¡Ë…ϿছΫֽÞ޷ɻà¡Ë¹Û§Ë«à·¹Ê‰Å¿Æ˜à¤€Ï¾à ”ʸࣆҠਬĨвΈ୘ԊȈǚب̒ƢْђӸॹʫ˓Ơҕ̧շюɧÌ̽м࠿ͳԩBïԄƲ̮ե̚થLJÜЀַȬIӈ٩Ϊ͘ӘۆҸ̚њںÖ־ƇڴМ؎ï٘ʼƻϨҹưج͖ԩWࢻǽʯȃÚÈ„à®Ä¥à¯·È¬Î›Í¸à©ŸÓ¦à­¾Î˜áˆ˜Ð¨Û”@ŕнᄢŽڽԶਕ͌ױр߫ΨଽˈҺѲ๰‚ਗ਼ϦȨФ࡬ЎࠊĪཪώޜÉà²Ò„ౚǭ"]],encodeOffsets:[[[-159275,19542]],[[-159825,21140]],[[-160520,21686]],[[-161436,21834]],[[-163169,22510]],[[-97093,50575]],[[-156678,58487]],[[-169553,61348]],[[-175853,65314]],[[-158789,72856]]]}},{type:"Feature",id:"UZB",properties:{name:"Uzbekistan"},geometry:{type:"Polygon",coordinates:["@@xԦૣάà¢ÐªÕ·Ð„॥׈Яࡾ˭ƴࣥÂÍǤěڢଅѺ۽ӥܕÌÆхॅ[ÂᶾᓘӺƾïದ׻یͅߤݵঢŪ෸à৔ؗÙࡅЦMÇ¢Û੬ÂɲЉ̺Lπ׺૎הӖƺʠĉ۵խئÍײȾ়ѷ੽ØÙ•ÄŠÎuţɺǪ϶૱țˋաЋҫۭ ɓυؠȧǺصҿࡗهǰҳN"],encodeOffsets:[[68116,38260]]}},{type:"Feature",id:"VEN",properties:{name:"Venezuela"},geometry:{type:"Polygon",coordinates:["@@yȣӱĭ˜ϡYѭυӥ͆ڙδÆȌ؈ʻ̒§َਸ਼΀řІ̎ˆ̞ןל_Õ´ÒµÂ˧ݮQ࣌ĔӖϕٞĻҼʾXɄਨ¼৖\\܉ʛ˼Їڦ×ÙЯƆڧѬn͢ȣڕӱó̫˾̷ȽƽԫƉjϱɫɱّ֪ÅÊÌ­Íऱ̽׿ŽÊȣڛɀثņƿýϔɑ‘ÖŜՉ܆ï°ǭ׷ʅĭΣΉÆسÈNjʱٷÅҧѼʯ࠺ɟ̧̌Ȅюм…ȊʅʠǛ֒à׼Ȉ˰ƲҎ̓ƠÓÄ©Ø®ͻęסܢӥńઉăȧ̊ȷê‡ǬĴ̶áͺȃȂŅϮѡÈɸӮĺ׶ʔ̸͘ʌɈрդƖ"],encodeOffsets:[[-73043,12059]]}},{type:"Feature",id:"VNM",properties:{name:"Vietnam"},geometry:{type:"Polygon",coordinates:["@@à«­Ü—Û«ßÈ×٠ࢭ޺ળނԱԞګϪà¼Å•à¹“۫փ१եۇ۫਷ޱ̧ՠʀ֬دӌܬ͸ࢦÔσԚප٨ļ৖ț֖ƶࡀɃצÙ×Ջ݌ۥ঴৓Ԋʊ̠՞ɘ͙ܺਙPÏ•Þ†Ó­ÚÒŠÈ´Ú¢IࠈĬܒ҄К̿ÞƵƃӛÐÍ¿à¡ŽÉ“"],encodeOffsets:[[110644,22070]]}},{type:"Feature",id:"VUT",properties:{name:"Vanuatu"},geometry:{type:"MultiPolygon",coordinates:[["@@Ë£Å˭ςŒɤՆӗ"],["@@ƌڱɥŀǩ­ťɴi٢Дʵ"]],encodeOffsets:[[[171874,-16861]],[[171119,-15292]]]}},{type:"Feature",id:"PSE",properties:{name:"West Bank"},geometry:{type:"Polygon",coordinates:["@@@ԣŭʙЃŕ˜ɜɌŚÉĦǬ̤֔ś"],encodeOffsets:[[36399,33172]]}},{type:"Feature",id:"YEM",properties:{name:"Yemen"},geometry:{type:"Polygon",coordinates:["@@؉ɥNjÏo˹࠷Οഇϻݩףυ±ʥºӭΑ՗lj۷©ɃµǿɛəÕŻɇеlËœ׉¨ɓӬzÒ ÆʜǑتʋΊǚ¤đϨĸNJ™ξςˌđΠɞЮΊɓɬúॺnƸċ߼Äͨɂ˫ϺƖ׼ࢦ޸Ϛá’͒ڀ൳˞ח"],encodeOffsets:[[54384,17051]]}},{type:"Feature",id:"ZAF",properties:{name:"South Africa"},geometry:{type:"Polygon",coordinates:["@@ÇŧΣÑɻћӇ׻ोà¢×£Ô‹Ù‹Ï£à¢›Í™Ñ“«ŇɷԛŰеDž࣫NJԙĹάࡿͩܓƃԱͅϡoΣ̚˳fαϒŸśÅɦLӰ˙֞˔ƴs٤ս޼х܈AF׽તДдͪɯƘΫϘÓՈǃҌÖݤіB᷌ɨűӾߙûԟȈÌ׼ĒрϒЊʨȶДЦȚΠķВɽۂ£՞ȜÄʾƨДҚäʨ͂˪֔ݮغஒؤ΂UОƛ˲Ķ҂ċДà®É”ׯƫऩî̟чƶÊÑÄʓɯ̿T̃ԆҕӮĜǢώْQȿؑıۥɑϛֵщ","@@νʶϻǟҕ҃͡Õـ٧̜ČƺˎҴƀƜ˜ʴФ̅ʪ"],encodeOffsets:[[32278,-29959],[29674,-29650]]}},{type:"Feature",id:"ZMB",properties:{name:"Zambia"},geometry:{type:"Polygon",coordinates:["@@ІÏÉŠÜ‹ÆɩǙڻLjۡ˃̇ʭޭѶɓᢇۗĂׯÙÅ™ÓͯĹ̛̅ßܵۓҭխ˳o˗ĬऱĠƯÚOêͧȎկ¶ۋȑչԾ֣یžᦶშYí̂Ű̀ƧЀĪТėʺ̂q¶ʽϾrՖûˬϡڨÅԤˆȌѯ٠ş̴ΧΈҥ٠Që࣠ɱƳח͞ɧƬļࡈƬসȉψʈ՚ɤĶ଀ƚͦđΘɇͰƗՖƗӊʧ"],encodeOffsets:[[33546,-9452]]}},{type:"Feature",id:"ZWE",properties:{name:"Zimbabwe"},geometry:{type:"Polygon",coordinates:["@@ÒČ˱ĵÐÆœÎVՙϞٯźʙՒC̒έĞà¥à¤ˆËƒÓ¢Ç›Æ®Í“ڤलğ˘ī˴pҮծܶ۔̜àĺ̆ӎͰَŚÆ̻۬hϴǯǺȻÐÓѦˑFà©ŸÇ׋—عƊÊħӵŵùɛ؅ࢫ॓"],encodeOffsets:[[31941,-22785]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/xiang_gang_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"8100",properties:{name:"香港",cp:[114.2784,22.3057],childNum:1},geometry:{type:"Polygon",coordinates:["@@™@}ScTÊŸ@cWuJÖ]„l¦RLj¼BĄà˜ ŽH@TOHCTDDDHDNAT@PEHDDNJLX@BABALHFF@DKHADBBLDHHFBLEJB@GDBBFBADDB@@KFAFBBJJA@BB@@FFDDADFF@FADDDBJC@AFBD@@DDD@DAA@D@DB@DHHBFJBBFEHDFAN@DGDC@DLCBDDCFDlAFBFCBEF@BC@GDAB@FD@DZJ‚X´HÄMja@Ã`Âp_PCZ@lLnRGSDMFK|a\\ÂYÂ}­ƒ§™ÂÂMën"],encodeOffsets:[[117078,22678]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/xin_jiang_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"6528",properties:{name:"巴音郭楞蒙å¤è‡ªæ²»å·ž",cp:[88.1653,39.6002],childNum:9},geometry:{type:"Polygon",coordinates:["@@˜@ÈÒĊanwÅŽV„™Ȯ¦ͪŃĢ„ÜÅȂçČéÆÂżLɆóĊ‚Ċaʊű¯²Um»ˌmÈ»V™ʠţWÑůǓ郙ôƑƒğÆīŎī@Ƿ™wô™˺LÞ¯ƨVǪуšĢ™ȘV°wĢŽôk°¯ƒ»΀@Ȃ»ĸŽǔ@΀ƒ͔ôôLɆóÌÃÉœLɲÅͪƒƨóŤK@Ä«@IUÂ܃ÛmȻţǩÃ˹ÛljťǓǫÅ@Ʋ¯VçÅKÍ¿ÅΗÇţ»ƽ™ɅÂÆ‘LÂÓÅÂÅÅɱV@ÃÄŠU¯ÑĊĭÞLšÞŎJ±̃XȣˌÅlƒUÂȯŎKÆƅ°™XÑܱnÅ—Ä¡V¯™óaUƒƧUÅÅ„Ñ™±„çɲ¥lĉkğ°ƒk¥˜ƒnÄŸÅ£L¯ÃÃUƽĬÎlķ°@„Å„XÿïV»ŹLʉÞɱŤĉÂó°ÃJ™¦ÃKãţܙÈĉ@ƒxÇ©UÄ‹ÂÆ‘@ky͓¹™`U²ĉVġ»ğa¯¥ť@ĉ™‚ó@ŻÛÛJƒw¯nó¯ġWƽʩķÃÉ›wĉĕüȭÞķÂÅ@ó£Å΀ƑŽ¯ôȯÞ¯Ȱ™ÆÅèĉXǼó@Únºƒĸ„ÞVƜĸȚUʶõˀĵĖɱŎÃÄ–VࢰӒѢ°˘nÏšVˌ™ÈmɼĵŦW¤öʊõʔ@°ÈXVŽ™ènÅŽÈb¯ÂÇ«Âĉ„±Èğ`Ä¡wÅÔğ»mVVŽ„åó@™ĸķô@ššbX„ĶmV²²`Þ_˜˜ɴbͪÈ°„ÞWĸÈŌmބškɲŽÈUÆ»n¼ǬVķĸźô¯°n¦ɄǜÈ"],encodeOffsets:[[86986,44534]]}},{type:"Feature",id:"6532",properties:{name:"和田地区",cp:[81.167,36.9855],childNum:8},geometry:{type:"Polygon",coordinates:["@@ƨ¥šèź٨ΘƑᩄbUࢯÞĕɲÅĶĕöʿVʵķșUƛƒÃ„ķm¹Þ™ô@È»ĊWŎçšÅ°ȯȰðóƒÂÆͿĉ»̽çnƒmÂɱĵƧºóU™™ƽ@±wóL¯°̻L±Æ¯VÂÆ´Ä·b¯VÇ¥ğ²Ǖbk¥ÇKlÂÂÅɱġ@у™óK@™ÇaÃXÄŸÂÅ£xĉČǫÂķê¯K@уaŹ„ƑKƒ¼¯VóaónÄ¡w™óÞéU™ġbóĉğÇl¹™aUóğKW„ÂVůÂn›ÇŋƑ›ķnʇ»óxĉw™çÇ°Åw™°ċ„XŽ™„ób±ƒkÈÇJ—ƒm²ţx@Ã’ÃŽšŦǺn„ó¼n°ÇbUÒ±¼XĸĠłƽXmwĉºƒzÈÜmÂnxmx²ĖmҚbnŽƧêUºĊêÆVóĖóUĉ¼ÅĬƑ°ɆƆŻŚlłÞLš¼nĠƒ¼@ޙšÞź@ŎÞ°VšɄɴжϼÙ͈Ŏ„"],encodeOffsets:[[81293,39764]]}},{type:"Feature",id:"6522",properties:{name:"哈密地区",cp:[93.7793,42.9236],childNum:3},geometry:{type:"Polygon",coordinates:["@@WnÅÆĶLĢ¦ţºź„lxÅĸƽŚ‚Ʉ—Į˜è@ô²ÞUÄ”ÆÅ„V°¯ĸX¦ÆmÌbƒ»Ɇa΀šĢ™ÆLˤ™ȘÑnƒІljĸÿn¯ĶaŎ¯ĢĕȘ¯°Â΂œla¯¥™ǕǔwˤӱlťО̻nÅ»mÂɃĕċţUw°WUóƨÅţķ°ýV±óÅǓéʉ¯ƽÅĎÅÇ–ÈÃÆůǕw˹ǫȗǓƧǕVý™é@ĬţLƧôͩ„ɱŎɛKÌÞɅôóK@²@°Åؚ¼lŦ¯ŰóƜÛlV¼ķ¼ƒ°kȰ™Ű„ĠƒǬ™ŚÃÅŽmÄ–Â`@ÂÇÜn„"],encodeOffsets:[[93387,44539]]}},{type:"Feature",id:"6529",properties:{name:"阿克è‹åœ°åŒº",cp:[82.9797,41.0229],childNum:10},geometry:{type:"Polygon",coordinates:["@@VƚxˌŎÞŎƒ°n„ȂÒ°²VĊ¯VğƾËǬƨÞÞKÈÞĊVźôɆÞĢèŌÂôWČ²ŤVÞĸʶbl‚¯ôn_VÆĸlmÞnVź_ĸ¼Ȯmǖ„šéĸÂW°°„ĸJ„kʠ¼Æw°¤ÈƒlxɆzČºĶI²ÆǔUš°ô@Þ¦‚ƒUÂnUĠ¼ŎÓĢxÄ _²ÇĊƒǬ°ŽȂamÅšçUÂÇW@¯öʓõʉX£ĶťnɻšÇUË‹mϙ¯˗ӑѡᩃaΗƒœɜ°xWÆ´UxɃÒˣ¤Ʌwğ„ʉÅóÃŹÂ±°ȗ@¯„ƃ²¼","@@Å™гwÈ¥Ƨ°ŹÑķV™¼ÞêĊ»‚lĵšm¦ÅW@ĀôÈźaÉœxÈbÞÆĶIОŘnIÇŃÛÃĊÑĠÆ"],encodeOffsets:[[80022,41294],[83914,41474]]}},{type:"Feature",id:"6543",properties:{name:"阿勒泰地区",cp:[88.2971,47.0929],childNum:7},geometry:{type:"Polygon",coordinates:["@@ɲˣĊIÈ¥‚ÅU±ĊýkÅ°ƒĉƽó»ĶƽXóʵʵ™ȯƑÅÈɅ¯ĉ@ÇሗKÖ›@@ˤV֜ʵрƒǬVĸƑŎ@ƆϯÑóŽķ@ʇ»ķ¦έmlÈĸĊX¼WźÛÞÃѸ‚ĢČþ„ĀĊôάVö¼ĊUƨ°°èŎČUÜÆÂóôVôôŽ²êȘlˌç°`n²ǬŽĊaš™ƒÛ°±kÂÄŸmm»š@°ÃɆÛÅÇVaÃÂVm͔ğôÃÈb‚„@„ÂĪn¯š™ÜUĢÑĊ@źīżWŤÈǖWôÅÆI²ÓƨL@ÂŽÄŠX„mmÑÆ»ȰÑkƒĶÅ@ý°m—¯"],encodeOffsets:[[92656,48460]]}},{type:"Feature",id:"6531",properties:{name:"喀什地区",cp:[77.168,37.8534],childNum:13},geometry:{type:"Polygon",coordinates:["@@ÄŒ@°ƒĠ„ôÓô@Ŏĉ@Ƴĸ@Ť£ĢlVÂôWVÂóřXĉŤêÞ@ÆÒĢÑlèÈV@šĠIk°ÆŘ@ÈÈĀ@ǶťÒğ@š„@ÒĉlÅ»_@šƧĖÅĬÅÆ@bźÞnƒƒlVÂœÃĬšWƼʇ„ƒÃÃ…@ÇÅÈwWóĉ±ğz‚ĬČƨƂÃIĉïbÇÑĉƒ¯ʈV°xUŰĊ¤ƪ_ôÓɚI@lÈšXȮ™ŎlɴȘ՘š„¦ɲÆʈ_ɴŽźŽôÞʊŎĠƒɆxˤ£ɄÑVwXƳ¯w›ɛŹ٧™çƧ¦ÅƒÙ͇еϻɃɳU™Ã¯@ÅÃŹš™@Ä»mğ™»ÃKkÅżřɅƅƒ¯ÆīĊ»ôVôĕÅUĉéV¹ƨém™anѱĕnwmwnÂÇۄyĉ¹ŹlÅkĵèķmÅÞġKñÔċKÅèĉzƒŽ„ômxȗÿƿI@þÅČÃKð@¼ÈÂVºš@ÅĢšÆUÂÄ‹Å‚n„ÃÆǕČĵJm£ÃJ¦@ĊƒxV°ÆLċ¼ǩ™@™m@ÅĢómÇÆğ¹Çš™ÆšĖÞKšx„wô¦ÆÑÆL²ÆƾŽU„Ž±ŚÅÂŻĖ@ĬŤÈñ„@ǔÇx„Èǃ","@@VÂǙţ°ğUĠ¯mk¯ó¥ķIġÿÆbƒ„ĉa±ÒĸĀlKU„_m»nwšŽ„m@ÈŤ¦ĉbÞ°±Þżł̦°ĢÅVé"],encodeOffsets:[[76624,39196],[81507,40877]]}},{type:"Feature",id:"6542",properties:{name:"塔城地区",cp:[86.6272,45.8514],childNum:7},geometry:{type:"Polygon",coordinates:["@@ήnĸ¥ʈ¼ĸ@ôÂÏ°Ã’@Æ…Æ’ÅUķƑǫʶпU֛܃LÚ«K@΋ĸ@Æ£ÞġÂÅĠċšLVÄ»™@Å»Ãnm¯š»nŻĊ@nÂķŃ@¯ómóÛÃǟ¯aÃóȭ¥ƒšÅUmxĉbÇї@›bUº¯X¯ÆƧbVÒĉnÇ•w¯°ƑŽV„—ŽÇ@kx±Uƒšɱn™ŽÅKƒ„¯ƒĠǠU°ɜL@°ƒxnĬ‚ĀŋŎÇLƒŽğšϱÞέƜkôÅĀǕłƒĸĊŤUŰĢ°„¦ȂϰÜɨ°x@°żǠÆƈČVĠ»ČL°ÇšbĊÑÌóÞlĶwބɆVÞwǬxǪţȼÜLÅĶˢ@","@@óKĵĀV͈ĉłƾNJÆŤƒzXl°ƒÆL²¼źŽôÈĢǔ™¦l„ô°ɜÞʊÂĠğŃm»ʵƳƑÊÈ—Ä«V¥¯ĉ°Ñ@ŃÅI™»ĉÂmÄŸn™ƒašÂƒċƨbš™Vğ—w›ġ¯@UÂÅa™ĉÃJğÑÆŎkŎÞĀlźƒ¦"],encodeOffsets:[[87593,48184],[86884,45760]]}},{type:"Feature",id:"6523",properties:{name:"昌å‰å›žæ—自治州",cp:[89.6814,44.4507],childNum:7},geometry:{type:"MultiPolygon",coordinates:[["@@መL@È°ĊȂɆƒÆĊ£„ťôÂWÓɆbĢÅŎƒÆ¦ČÑW¥°ķU¯ÆŃVē±Ã@ó—ç˜ĭÂɃƾřÆķkwŹƒŤ¹ġ¥ĵKÅÃ…XmËÂщwǓ¤ƑÂ@wóÂÅVķ£ɱšġôÛa±ÒÈ„óèţIVŽƽ¼k¤ó¹ġJmx—»ÃUƒ²™@ÅƃĸǫŎ„ĊmŎǬ՘"],["@@Þô°bÞǠôÜôn@°ĸń˜Ƕkłƒ¼UޙKğȂÆÃĢŤķ@@ΌڬLÜ„K@ˣȂ˭lĉńW¥ĵVÆý@ŃÞēUŃȗƅ@ŹƩǕĉ»k»Ç™VğóřX™ÂÅ»KÆŽċêÈèÛŎġƒͩń"]],encodeOffsets:[[[90113,46080]],[[87638,44579]]]}},{type:"Feature",id:"6530",properties:{name:"克孜勒è‹æŸ¯å°”克孜自治州",cp:[74.6301,39.5233],childNum:4},geometry:{type:"Polygon",coordinates:["@@ˎǫĠƽ°UUĉ¯±ÈÑmƒ„¯ÃÅË‹Å™wUű»ÅƑ°ƒȘ@²¯ɳÂʇ`ɱŃ¥՗™ɳȗÅkȭšșW@kÉ™JóÔƩ`ĉ£Vů¯wU°ʇĊ„ÈÒ°aĊÞÞJÃ…ÂċƧÂÄ«Ä yĊ²XôÇxÈÆÆ@„ÞʈƒÅ»™XÞīU›Ƒkm„ŹÃ@aŎÅÆīƨĕ@™ż`ÄŠk@љƒĠ@ŦÑ@ǵÇÿ@ÇÅŗl¯ğJ@™ÇUkçġÒÆÑÃ@ţéWĊôŚUŽóXUÂÄ¡kţ¤ķ@@Æ´ÅĊó@óÔğƒ¯„ċ@@Қ¤kôˣŰ͓„k»ƒKX¯ċwƧôğÉšÒôIVƙš¯UķǬķšnŽ™¼ôb°ÒȰVVÈÞ°ƒĸó¤V¼°„V°²êƒlĢ҂Uƨ¦ôÂÈ°Æ´ÄŠVV¼ǖIċĊ„ÞɜéšnÄŒW˸Ǹša„řÈw±īšçĸ¤ĊšôšwšŽĸUĢ¦˜éǖĬ„Āô¼lÞkÒ°x°ƆÞx„šÆV²Âǔ»„b°wގȘ¥°n„šŎV@°„„ʠè‚ŰȂb"],encodeOffsets:[[80269,42396]]}},{type:"Feature",id:"6521",properties:{name:"åé²ç•ªåœ°åŒº",cp:[89.6375,42.4127],childNum:3},geometry:{type:"Polygon",coordinates:["@@ôK„ĉǪa²¼lÜô@ʠê°Ĭ™ôȂƒ²ÑÜbĢóɲ™ĸ¤ŎUôÂ@xƒŽǔ£ъxËŽÂmƒÈÛ@‚_nĕÞÅšř„ǫƒğšůlȯ„¯ĸ»UȆkôƛ°ůkť™»Ŏŗ@¯@±͓óͿ„Ǔ@Ä·ÂȼͿ@Ƒ¼¯°ólġ¯xÈ—UġšƑ™ǩÒƧUð˹Kóššx@ǸÅĬÅĬƑĠ󃄚ǔêÆ°XÒʟŤUšÇ¼ˋnn¼±V²°ȂUÅŒÃÂœbʟǔɅô@żǬaҎÈ"],encodeOffsets:[[90248,44371]]}},{type:"Feature",id:"6540",properties:{name:"伊çŠå“ˆè¨å…‹è‡ªæ²»å·ž",cp:[82.5513,43.5498],childNum:10},geometry:{type:"MultiPolygon",coordinates:[["@@ĉ„ÆŘÈÌmÞ¯ĀX°±¼@ƾ¯ƴ°ŎÃþŋ¦WÜÞbȂĉźUςmwVUȂóô@È°Ã΀ÂnÂÆJn™ƾ™ʠ™ŌLČóǪ¯œ¥ǔaǖšŌaôÃÄ¢Lšx„ƒÆLšÂɲm„™²VlwÈ@˜ÂUƒƒÂ°¯ǖxÄŠmUÑƨa°Å°WV¹œa›ÇɃÈm¥°¯ŹóĸķǫUm»Å¼ÇVɱ™lÃŋnķÇÃX¯ƒͩÇɳa——Ã`±_U±ĵnWĪa@™ĸóšķ™¯ǓV±ÅĵJċ¹ɅykwDŽ¯£Åxʟ»ƒlÄ·I¯ƒX¯ķ‚™êǕƒȭnķ»Ź`±„kÞ@Žš„Ãô@Þ°xšŤŎIƨÆUxÅš¯²ǔĬǬlUÅš"],["@@ÞĀlźƒ¦¯ĸŤKޙšÂƒċƨbš™Vğ—w›ġ¯@Å£ÂƽJ"]],encodeOffsets:[[[82722,44337]],[[86817,45456]]]}},{type:"Feature",id:"6527",properties:{name:"åšå°”塔拉蒙å¤è‡ªæ²»å·ž",cp:[81.8481,44.6979],childNum:3},geometry:{type:"Polygon",coordinates:["@@ήƛϲÃĠ™„ÂÈKÅŒÅÂÿmī„w@¯ɛKV¯ğǟ°Ƒ™wÄ¡KóÞŋbǕ™Ǔb›¦ǩ°ċôŋKʟšƽšmšÅImŽͿŽȯÞó@ÈôUVnx›ÈŹVÈÄŠÃaÂbŻ£¯°l„óxȂŤĸkĊšÞyĊêĊmÄ¢xV„ƨÂȎĠX„ŽΘÆĠÔź‚Ɇţ°LXÂƾÂŤÂŤb"],encodeOffsets:[[84555,46311]]}},{type:"Feature",id:"6501",properties:{name:"乌é²æœ¨é½å¸‚",cp:[87.9236,43.5883],childNum:4},geometry:{type:"Polygon",coordinates:["@@šŽWŽôŚUĠȚl¼Ċ¼ƪǖ@źȘƆ@ýlܚXVŘޙš¦V¼kĖó҃èkÄŠÈˮ֜@Ç«Õ—nŃĉǬÅ„ķÆŚ@„±ÞV˜¼nwÄ¢Iôºl£ƾ»UÂŤJôçšó¯īʟéó@kÛ±»ǩbƒĊóLÒÇǫb@ŻɆóʠǓ›aŋÞÈVʉłĉbĉÂɅô"],encodeOffsets:[[88887,44146]]}},{type:"Feature",id:"6502",properties:{name:"克拉玛ä¾å¸‚",cp:[85.2869,45.5054],childNum:2},geometry:{type:"MultiPolygon",coordinates:[["@@ɜÞʊÂĊýVaŃm»ʵƳƑÊÈ—Ä«V¥¯ĉ°Ñ@ŃÅI™»ĉÂmÄŸn™ƒaÚţL°ķóKĵĀV͈ĉłƾNJÆŤƒzXl°ƒÆL²¼źŽôÈĢǔ™¦l„ô°"],["@@ƾIŤÂ@UUwÅa™ĉÃJğÑÆŎkÅŽ"]],encodeOffsets:[[[87424,47245]],[[86817,45456]]]}},{type:"Feature",id:"659002",properties:{name:"阿拉尔市",cp:[81.2769,40.6549],childNum:1},geometry:{type:"Polygon",coordinates:["@@nIÇŃÛÃĊÑĠÆÅ™гwÈ¥Ƨ°ŹÑķV™¼ÞêĊ»‚lĵšm¦ÅW@ĀôÈźaÉœxÈbÞÆĶIОŘ"],encodeOffsets:[[83824,41929]]}},{type:"Feature",id:"659003",properties:{name:"图木舒克市",cp:[79.1345,39.8749],childNum:1},geometry:{type:"Polygon",coordinates:["@@VéVÂǙţ°ğUĠ¯mk¯ó¥ķIġÿÆbƒ„ĉa±ÒĸĀlKU„_m»nwšŽ„m@ÈŤ¦ĉbÞ°±Þżł̦°ĢÅ"],encodeOffsets:[[81496,40962]]}},{type:"Feature",id:"659004",properties:{name:"五家渠市",cp:[87.5391,44.3024],childNum:1},geometry:{type:"Polygon",coordinates:["@@„çôÑlÄ•U»™¥ÃšUŗ™WkÛ@þVÅ„ÃÄ”@ńÅþĶUX¦Æƒ"],encodeOffsets:[[89674,45636]]}},{type:"Feature",id:"659001",properties:{name:"石河å­å¸‚",cp:[86.0229,44.2914],childNum:1},geometry:{type:"Polygon",coordinates:["@@lÅ—ǵm‚ĉ@mż™¼n°ÞmƼš@"],encodeOffsets:[[88178,45529]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/xi_zang_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"5424",properties:{name:"那曲地区",cp:[88.1982,33.3215],childNum:10},geometry:{type:"Polygon",coordinates:["@@ƨʔĸbܺÞwnxźbÞ°ô@„ÂĶŽĸIȼĊJŎÈôUšÃƒ¤ǔLÞÂÅŽ@ĢŽȘblƒôL„ÇźçȤôLš¥ÞIÞ¯Ķxʊťƨ™ƿÑĉXVķŦ¯ȂKÇǕšÑ¯IUš£¯Óƿ£VÄ•Ã…ÂÞÿÆwƒƑ„£ǖxÞĕ±ÇÃaUÑȃU¯‚ÂUÅÈÃwWÅĵ™±Ã„óĢÿ°IÞ±mÅĢ¯mÿ„¥°UnÑŤÂĢĕĶwǬŻͪwŎ¼źÇĢ„ĠĕˎÅ°óƨ¼Èa‚mÂÂ@¥°wǔ„ǖ°ŽƨÇŤœšġƨ„ŎŃôbÈÛŎĊ°@Ä w²ÑÞJƃÆb²ƒ°êĊUނlȲƒV„ÈKĊÒĸĉ›»ÅÂôťUÅǃk¯@ǂÑkÂlÇÂÃ…l™Ģ™VÑóƒ@°@„ÛĸƒV¯ƒÇĊ™n¯UĕšÂƽ¯m›¯b™È@Ò°Ĭƒbĵ›¼„‚kxķýÇJk£ÃaUÑÅóĶǟkÓʉnĉƒÃ¼Ƒ„ó»Þmn£m™Č¯@ƒȮÿV¯ĸƒ™k@Ãówƒ»ğ„ġ±ǓLÅ„ƒšV¼Æèķĉ™è±b@Òţ„UÑóakƒl£™Ó@¯L@™ÇlUóÈš¯aġÈÅĕÃLķ¯Ė¯@WĬ—x‚ÒÈnW°ţôU²ǓÓġ²V°¯ôƒǔÃL—Âċšk™š»Ã»Ãš¯ÞƒVƒwۄÃÇÅͩÈĉċ»ĉm¯£W¥ţKkóġÆÂW@¯±kÅÂŽÂțb@җšÇaƒÆ¯a™„ƒkóŽÛƒÇ¦Ãa¯šÃ™ĉ@ǻۄmƒǓxķƛ¯lVĀÅÞġb™™ÇJUÂÃ…V™ĖƑW™zŻŚƒW™n@è¯ÞóVkwÆ©nkźÇބҙޯƒƒýğÇUxÆÈnè±bĉÂûÈуwšwÞ@m»ÈV@ýÇ°ķ™Âxƒa„ïXċ¥ƒÈóW@ôkxlnÂxVÈóĊkŤġ¼@°¯ŰƑL̻۱ŎÃV—Þ›VƒÇÞŎÇakƞ‚š@èğŎĸżšƾ°ÒšLÞôĠKȰĖźVÈÒĠ„¤™ÂVôšŽU„ÈþťL@ôǬÞlÜÈnÇÒUŚ™@šĊƨW°™°Xƒ‚@ČÇþ„ƴĉÒķ¦@ŽĢôWĀôłUÞĢǬ™ź°¼š@ƒôV°„bUÆnzm¤ƽĸƒÈ"],encodeOffsets:[[88133,36721]]}},{type:"Feature",id:"5425",properties:{name:"阿里地区",cp:[82.3645,32.7667],childNum:7},geometry:{type:"Polygon",coordinates:["@@„Çƾķn£myVŃaU¯„ó™@¯»šŹġǫVÃóÅXÿġó@Âĸ¥ĊуƳÈý@ċ„ÂWš¯X¯ĉƧ‚™š@VřÈÑÇmkÛǫÃ@óŦKÇýVĪÂUóšÂƒ£ğÂÇÑŹUȯĕğLÃó™K¯Ñ™ƽķŻĠÅ@ç™lÆÈbÆÂÈ„œU˜ÃÞU²Å̼ůƒK°ů@¯UK±Â—ĊƧbÅÇmçÈġƒóšÅób™™źóš¥kīƯól™ç™KôĵUƒÅ„VŃķ¥nÃ…Åm¯¹Å‚™»@ÑÇÂóxÃkʇȤU¤ķb@ƒ¯ĊÇx¯ĸĉKm°šĀk¦l„„KnĬȀƾÛ¦WÆÅÂmNJĉ°ÅUţ¤UšŎ°šŎKÞłÆ„Ǔ¦ƒÞ™‚™Â„ř¯bmÂUÂÃl¯Um™ğl¯£șwÃ…ÂŽÇ«aÃnĉĶƒk@¯™K™šÅ»ĉn™aÞ»ťnkml™ĸ¥UŚŻkÑťƒÂĉV™ôó°LôīĠU„ÿĉǕÅz±Kƒ¤„²Å¤¯Ė¯UÃÂ¥Vĵ™óÈťÃwķșÑk¤ó„™ƒWýĵĕ™„VĠƒVóƒŽǓ„ķ°k±VU±ţ¦UÇŸÃřJVљ¥XUÄ‹UÃ…ÂŽlÂÛƆǕÆȗƆ¯wÅÞÅ@™šĉlÃÂóŽƒÒ™nUôńlxólÃôێ±™™LÛôÃL@‚ġ¯X¯ÇUżóa󤛼XÒġŎóLk¦‚ôżĸĠ™¼™KġƆô¦„ÆƑÔĉĶ¯ImÒ°¦n°¯Þl˜ÃÄŒn„ƒÒšKĠޚĕkƒlýƾťœšôI‚ĖŤÒnÆœm¼¯lnżóÞ@Ůó¦™ôƽĖċŚn°Ã°ôÈUƜƒblÞóŽ@Žǖô°UÈƆ°X„þôŽô‚lѢšŽ²Ėm¦°š@¤™ÂXÂŽÄŠblܚzkºƒĖmX„šŎWVšóÞn°lÂÄ xÈša°»żLźƒ„b@Æ°XÄ ÃÈšxĊĕŤaȚ‚°È@„„@èŤ¦Ü¼œW˜ÞkŽÈ@V°lŤkŎ±²¦ÆUšlj°aÈÑŎbĢƒŎbÆ¥ÞIȘlššôVÈU‚™šb„kɲĶn„mnXb̼òƾĖŎ@Ä¢ÂȂÑôÓĠĖʊšĊÔ"],encodeOffsets:[[88133,36721]]}},{type:"Feature",id:"5423",properties:{name:"日喀则地区",cp:[86.2427,29.5093],childNum:18},geometry:{type:"Polygon",coordinates:["@@ĶĖXþš„ôƒl£šÒĸÇÞxÇŦšôUĶÞ¦°V°ĕŎ£ƒ±„£²LÆyĊǖƒĀğVóĬ¯KóôUš‚ĊŦ„lҙżVÆķ¦kšlnŦmüšbÄŠmŎ¼š™šL@°„lĊĵÞmǬbÆÂÈšx°¤Ġknš°VÞkVÂn°aƒŚš‚šÂ„Ãǔ¥ÅƒÃÅÅL¯™ÅÂV™Ť£ŎVĊ¯nljÆÂXÅÜ¥ǿƽmīƒLkƒl¥™ÿn¯ĊL°ķÈw°ĉ@ƑĸaV£ʈȣÞlôwȎ@Қ¼Æ°ºÅnmÆĸ¦UńƃV„óĶšLšèôkÅ°lĬ™¦Źôššôa™Æ„ôÇĢnèŎÈƨa˜ĉ²‚VLĢ»lţôĉUǂwkmlw@óôX„ÇȦ°WƒÞ„b‚wĸšÈ¯@þÇUn¼Ã@™x„xÇńÞ¼ĊŽ²amçÅÇVwĠȄþ°„šÃƒÑÈÃlŹƪmlxôU°Ã@çšm„XŎ™Ŏ¼šyÆ’XšĕÆUVÂÈIššĢaÆÃUÿ°kĸƜǔwn„܃ȼĊ@ޚ°™Þbȥ܄ô„lšƒ°b„ÅÈb˜™@ќa‚ǯUU¯Vġš»ƒ™¯aV¯ǰřmnÑŤçǬVǬ™±ĉ¯¥Vĕ¯Ãk£˜Å—w@±ġÛ°ÇVїƒ@ۘa@ÂÄŒL™Ƴ™„ƒÂÇa¯¤ÃIĵ¼U¥ƿÂÅķÅţŻókÃóĕ‚¥¯™U»Æ£X¯ġŃÛkðV°ó¼¯èWôÞĖ„ȎƒŽkĀƧĀówm¥¯JŹÃJÙÅVVÃ…ÂaÃÂÆ‘@ƒ˜ğŭǂ¯_ƒ˜ĵ—›VnxŃón›ƒĵxÇĖĉVÃÈğV™Òóƒ¯Â±Żĉ£ķÆÅL™Ljĉý˜ţۃ¯VƒnV¤ÃÈ@°ÅÞä™ŰğÅm¦ÃxóKƒ¥ɱÈUĠôêVôÛ¼ÇWÃçĵaŦóĖƧlÇĢƑŽnŎDŽV¼Â¼‚ºÛ@m¦ƽ„ĉmm¯ÃKÛç¯bÅÅ‚ÂĬ™bƒ¼ÅLmŽ„xť°ÅU™šÃXkÂŽÃmĉ¦W„¯K„ÒknÃaV„Ãè¯KÉ…Å„ÃKnÞ¯¼"],encodeOffsets:[[84117,30927]]}},{type:"Feature",id:"5426",properties:{name:"æž—èŠåœ°åŒº",cp:[95.4602,29.1138],childNum:7},geometry:{type:"Polygon",coordinates:["@@‚VÈłVôÈk@š°K@ŽšÔk¤l„ôbVÒŤƒ@ѲašçĸĊÆçU»„™ŎƒǔKĢ²Ġƒ„¼ôx@ޚlƨĬ„Ul¯ÈLV‚šÂÞJ„°Ünʊ„wÃœbXê‚VÞ¯°ššanaU°wƼɴÑWÑ°mÈýÈam¥Þ£Ť@„¥ôblÞĢ„ź¥ôxÈÅmÚ™ƒĕŃV»ĉÅŤÅnóƒ»ÈīķIUƒĠÑ°ġĸLÞ¯VÒƂ@Ä€Âbš¼WôÈ@V¼ôóŤKÈÑU»šwVǫżnWÒÈx™¼‚lŦ£ĊÅŤx²¯@ƒÆƒU¯šçÆ@„¤°£„é°k°lšůÈó@¯ŤÇÈĉƒkkÿó¥ÃXķљÜ@ÒóŚÃ¯°ĉówÂDZ¦ÅJUÒĉĀķw¯°mĖ¯„±akxÃÃ…nƒ™»lуK@¯lU™¯UVѯóĊ¯mÅÄŸVǓƅƒÞƒWÃÈÛ@ƿô¯ÜġzÅþ¯ÂólmôʇÂÄ¡ÄŠÃ…UÍ¿Å™ÅÈË‹ÅóÇˡÅƧƒÇb™w°Ķôk¦šÒƒnUþġҙÔkǔķèó@ƒ²@ŘÅńĵyƒzÄ¡aäÅIƒ¤ɃÂť¦ğѯ¤ķbóš¯ó±ŽU²°¤ČÂÃœVnÈƂ„ŚŎ°ôĢ„þÆzÂèVĀǎÂĀǘƒXŹÑ¯¤ówÄ‹Ä·k¦šłUÃ’Ä¡zÇ@ƒ™ÆÃx@²Þ@Ƥ„Uô¦Uš°x„U"],encodeOffsets:[[94737,30809]]}},{type:"Feature",id:"5421",properties:{name:"昌都地区",cp:[97.0203,30.7068],childNum:11},geometry:{type:"Polygon",coordinates:["@@™ŽVÄ–m°ĉš„ÈU°ķ„ƒÜ¯@@Âô„UÒġškš‚ÆkÈlÂŽÂÃ’@Èl°È„VÆóŦƂœ¼‚a„ÅĢ™ɄwnÂÅw@¥Ŏ¦°ŹÞmVš°wnÿƒw„wÃw@¯šmÞŗ°wĠ˜ĸkÞğlĔ²¦°@„ĕĸwVóšal@nĢÇĊn°@¦šŽźUXçǔůĸVš™ÆK„ÈÃĠš²ÅĔô@lšŽÈ_m˜„zÇ–Âl„šaU¼ôwV°¯¦‚ĬÈa„l@Čǎ„¼™„nŽ˜I„xô»ɜ@ƨ¥ɆÅ„ŃǪÈkƛƨÈʊȡóĭ›@—ÈÇVƒůރĸƅmēƨť™ÅÈʉVǵ°ġVŭÅɧ°ÿnɛš£mƒķ²ŃóÑUĉ°mÇ»¯@mxUĀ¯èţ°ÈÃç„ġU¯ÆÇţÈ@°Çô™Ű¯k¯lƒê¯¤ƒ£Å@™èV°Å„@„±°ţwĉŎť¤Âkš»ÇwXÑŻmUǬ™xV¼ÇÒţLóôUȂ@X󙻂a@ÿÅÂUÑðķK¯ĢğÒV„ĸJÇĬ„¼môţŎĊŎU¼Æ„„Ė™šnÞÇÆówŹ¦ġƒkÃóaƒ¦ţ@än¦ÇbÇþ¯nXÒɳÒÅ»¯xVÂmb™b¯™Ã°ÂUWéÛaƒxʉÂÛmƒ¯ÃI™‚UÂÇKk°ƒVƧīķ„U°ȭĀ@„ċ°nšm¤Ãnô¼ƒƒÞ»Ċ„ʊmlÔĵǠÆôVÒÞbl¤ÈIĸþlwƒÂœ»ĶŽ„a¯ī@њǰanœƾ°"],encodeOffsets:[[97302,31917]]}},{type:"Feature",id:"5422",properties:{name:"å±±å—地区",cp:[92.2083,28.3392],childNum:12},geometry:{type:"Polygon",coordinates:["@@°ÞUĖ°¦²ĊôÇÜLǖĀɜŽȘŰÞLĸÂźêÞ@UÂÃœUŤ°ɞ¯Ü„°WŦĀmŎ„¦ĢyVљÅl¥Čĸôx°£źÒ„Wȗ‚ÿÈÂUÿ‚çÅyƒýóġůƒřÅÂmÇÛUċŽ¯£V±²Â°ôô™ĸa°£ĠÒŦ¥ɄŽ„£ÆJÞ£Ģb„yĶzŎŃ@ŗ„±ô@ĸçlǓšÓĢÑVý„m™Ñl¥ĵó‚¯̻̥™ƛǫÃһÇƧÂĉyţ¼ÒÄ“VĶĉŎ°ĸmšÞVÃĸ™ÒÛaċ„ó™ŹĖƒèÈÈl¼k¤ÃX@`ÞÂżÂÆżÇçĉKUÃãğ¤@¦ġl¯ÒġÂĉ¯óš™móxÃÞğVšƴċK@—b@ܘ„UÒ¯ÈĢÜ@²˜x—Ŏl¤"],encodeOffsets:[[92363,29672]]}},{type:"Feature",id:"5401",properties:{name:"拉è¨å¸‚",cp:[91.1865,30.1465],childNum:8},geometry:{type:"Polygon",coordinates:["@@Ŏ²l@°‚XÄ¢ÆlôŤLX¦°¤ĊnČ¼ÇĊŎͪÞÈ܃„x„U°Ãޙ޼™¼lšČ™˜ŽÞK„Ǔ°óU¯Ģ±ǔÔV±ŤóX¯ÇmÂјwXī°@°ĕĸÂÞKÆĖĢÇ°bȂ™ÇÅÂUƒV¯wV™ó¥ƒVÅ£Ã@@±ÞwšÅ‚„È@ĴnÅťÿ¯XۃÉ°ţ¯ÛVVÂÃ@ŹéķÂÃKȗůɛÂǕÿÛKóÈǫšǫUţèmҚn¯Æ°ÈU‚°b„š™¼UÄ¢V°°V"],encodeOffsets:[[92059,30696]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/yun_nan_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"5308",properties:{name:"普洱市",cp:[100.7446,23.4229],childNum:10},geometry:{type:"Polygon",coordinates:["@@U‚ô²‚a@Ž²²Ķ¥œV°šĶ²bl¤kÂVxl‚@Âœ°‚Ś²@˜„„y„@ô¦¯„@xƒxVxU„VššbVšÂÃœm¼Ŏ„„ĢmºXXWÆ@ĀœšmÂŽmXU°ÅÒm¼Þx°w„@°‚XêĠ°»nV°U„l@k„@V±ôī@£‚ƒČŃÆ£„KÞý@¥‚k@y„a@—nWV„UVƒšwƒmģÂJƒknm@wmkn‚X„˜šX„¥mUUÂlUnbš¯°ŽnkƒÂVInÂlIUw°Ân™mÂk@@mlanXlanmšk@wVWUw™_@éĠašÂnmUaÜ£ƒmXƒ¥¯@@„óUmï¯ÞÃlKnxô£š»„»Ġ„J°aV„UÃÿV¥ÛbƒI@wmŽón¯yÛL@ƒWkÃ…ÂŽmș`ÂIWa¯K@¯mUnÂmaXm™bmak„¯ŽƒĢ™ÒÃm¯ÂmV¯KÇb¯KۜWW™X@a™V™ÂknÄ‹LUWV™kXóW@k™a@ƒób¯UƒwmbÂÂ¥UUlaUÂ¥U£maķšƒKXkƒmÃ@kwmѯÂk±ċbUUVakaġ¦ƒƒkL@`ƒœ™a¯xƒm™ÂљLUWƒ@Ä‹nÃ…ÂŽUV°LkL@b°°@¤š²ƒ‚šnôôk„l°kè›ÒÈzV¤È„WôôƒnV@„ƒ¦@¼Ux"],encodeOffsets:[[101903,23637]]}},{type:"Feature",id:"5325",properties:{name:"红河哈尼æ—å½æ—自治州",cp:[103.0408,23.6041],childNum:13},geometry:{type:"Polygon",coordinates:["@@°°nÞôV@ƒ°@„¦WŽ„nÛ¤Vbmn™ÂÄŸb@êš`VxUX@xš„ÆÂÞUnn˜WÞĸĢƒšÈ@ŽÇè@zÛÜWšÅêlš²„˜KnV¯ĖĊx@bk@@„°JÆ£Èbl„nnm°nlÂUkVUUwVm„Kn„‚nVŽÞxVLXÂ¥laX@@xl@VzȎVmšk@b°šÈĸmÂŽV¦Â`W„XšƒbUb‚bX¼°x@ašVVkn@lþnXUlVxŤÅ„y‚IUƒka‚IÅŽÄŠ@lXx@b„z@‚ô„ƒ¥„_V@l‚n@„Âôy@al_l`nÂmƒÈ»@kƒmXwWK™U¯»™a™Å@wƒmUÂÃKUa™UUĪwWƒ@w²»@kƃV£—mm£VKkÑV@@»nwƒ¥™ƒ@kƙnllIVlnLVakalknJšÂWmnaUaVÑVVÞÂnÂ¥mÂ@ƒ„¯Uÿl™@™™™VçƒaXaV¯UyVLVkš@nJlšXLlÂŽkxlbla²Òl@nÂVJVkšx„KlkUaÂVÄ·ÂÃÑUÂ@Ã…m¯@±™Uó°ğńķĠmU™Ñ@ǯ¯Å¼@nml@°¯Â¯`@w™£@¯Çƒk@ƒ»nmċ¯U»™I™Ž¯LÇĶÛn@bó°™U›šÂwmŽ¯„™Umǯa„™ƒ™ƒI@ykIƒVUŽ¯bƒIğŽƒ¼™¼ó¤mwkLÃÞ"],encodeOffsets:[[104243,23429]]}},{type:"Feature",id:"5326",properties:{name:"文山壮æ—è‹—æ—自治州",cp:[104.8865,23.5712],childNum:8},geometry:{type:"Polygon",coordinates:["@@šwô„š@²¯maUmôUÆxš@Xš˜bÞInlVUVw„JVaU„K°¥„xmÞXnlKlnna°@ÄŠÂȄÆwUmnkl@°ƒƒ£nyn@VÂV@Vak™ƒ@@kÞÄbmx°Vnw°klÂÞInĖÞVlKl™@ÂXa°„„KlV„U@šJnx‚U@ÈĢbUKlm@ak_‚wšanWUk°ƒl»„k@Wk@lwU_ƒ@UalóU¥ƒÇnÂĪkJWƒ@ÂÂmVXx±bƒK@nÂV±a@™Åa™£ÃK²ƒWknamKknÇÂk¯ƒaV™™V¯ĀƒU™„™ÒÂ¥ƒI@mm¯¯xÃ…ÂW@@`k@ó»ƒUU¯lm£ÅWlĵ„w@mmwÃ…mWÂÂU@y±U—xmwU„¯UĴÃ¥¯£m@kŽÇVUÂV°VbklƒL™wUlUIm‚k@±ÑkbkalwkÂWKk™mI™@UlUKVzU°Wb„bU蚚@škšVĀƒ°@„n‚m¦ÃÂŽUUUÃ’VbmbXn™‚mIkllbUbmKUkkJmkŚ@lš„„¦mx@¼U@lÃ’ULn¤˜nU¤Å„@l±¼@xX„šxV„šVVbÞLVŽ„n@xšÆšb°¼šV"],encodeOffsets:[[106504,25037]]}},{type:"Feature",id:"5303",properties:{name:"曲é–市",cp:[103.9417,25.7025],childNum:9},geometry:{type:"Polygon",coordinates:["@@ȦlKÞĕUÂV¯Um¯„ÇVUnVVUƒĉn™ĊÇƾLn°°È„JÆw„@lbÞa„¦V„XJ°¯W¯„aÞJVkUša„ƒ@ÂlKnÃ…mWUk¯a¯»@Âm±@уkkbWWX_WÓU»Â_l™kÑm@U»m@Âl@IWÄ‹n¯l@VanV„UV™UÂVwVx„KȄVmUē‚@„ƒn@VÃÆL„w„VVwnVlmkUVÑÇ°ka@k™ÿÃaÞUl£™›Â—ċĕX±±ĉƒa@UnVnalónk@wl™UVmkÃJ—aW™™@Ã…wóVVnnb±°™@óƒ™xXLWx„n@lǼn„m‚k_k`@bózƒ‚m@kÂU@ƒ`„¦óƒ@nWš@ÜÅXWwÂ@ƒyƒb¦@Ã’lnUb@x™lÃœÂk‚@²Ç@Uƒ¯bmy@ÂkV@bƒb„¦U`lLVx@b—Ll¼Þ¤@„°VVބU@WÞÂUb›J@nnš@lnnm„šxUŽƒUUbƒK@šÇwklkUƒVWakn@ÂŽlbU@@„ULVxkKUn‚°¯Ò@¼™„kmƒ¦m@kl™Ȱ@lU„l¦„@Vl°wšnnþĊUÆbUx™b„ŽV„šĖU°„a‚nnašV„al@@b"],encodeOffsets:[[106099,27653]]}},{type:"Feature",id:"5323",properties:{name:"楚雄å½æ—自治州",cp:[101.6016,25.3619],childNum:10},geometry:{type:"Polygon",coordinates:["@@mÃ’ÂXU`Wnšš™@Xl±¦š„Uxnbl°knmKUx„„ƒxVôUx°¼ôÒȄ°JlnÞKÄ ÂÂœW°¦ƒ„Vx²JVwš_°¥@UV@@wnymknK¯I@‚™²b°ƒš£V¥šwU‚V„¤nLškÆJÈwôô°„l»Č¯ƒġVƒUU@Â@ƒ°ƒƒÃXÂl@U»°Å„@U„¯@w±¯VmÂUUlm@m™„ÑnIVyUwmak£Vwm±—@Çw@nƒ@UxkwlÇnL‚mkř@±Žk™ka@kóJV¯Ç»U£lw¯™Xalbl¥¯UXƒ@a˜™UaÈL@ÇVIVƒkaU¯mm™akLWkUJ¯Umxnšƒ@ƒkUx¯xƒ„mWÃ…Ä«ÃkkbƒŤƒbkxWmXwWk¯wƒKkƒƒLŤċń„@¤óĬU²ƒ@@lƒk¯VmU¯¼@xV@k°l°kbUš°nm‚VnUš@°„š„UVèރÆbUÒÞnU¦›V—¼lô„@Vl"],encodeOffsets:[[103433,26196]]}},{type:"Feature",id:"5329",properties:{name:"大ç†ç™½æ—自治州",cp:[99.9536,25.6805],childNum:12},geometry:{type:"Polygon",coordinates:["@@lbÂœKVIUa˜@²m@b™xôÒÜxXLmbnšl@š„„K°šš¼k„Uô‚xôlV¦nJ„Uš™Ænšm„@šx„ÂÆwšbXšÆÂôô„LUÂVwôK@wlmšaVwÂœ@WknmƒIUmlÂnJla@_™@kÃmKUašÑm¯Xw°aUaVÂl»²JV„bÆJkôĶĀ²VVk„mšbVwUó„wƒƒVwnLlmk¯maVw™ƒ²¥Wkš@™™XmV_‚WnÑUkƒ@k󘻜UVÂ¥ÃmVÑÅaÄUçƒVĪ@¯V™Umn¯mV™lak¯l¯U@@wÄŸÂŽWé¯Âƒ@¯xÃw¯š¯JÄ‹a¯ÂUÂ¥mLU¤„bÞȤƒbÇLÂWUwmIUVW¼kbš`U„Vb¯L±ĊÛkƒÿÃKkwƒKţê™UĉþƒÈƒV¯ÞVbUŽ°KVšk²Ã‚mI—ƒmV@kƒm™UkšVxm„¯KXÈķJU¦V°ULWxšL@môƒšb@bkx±LnVUÂŽVLnkÃœWnwlLÃ…Æ’mW@kkJU_ƒV„šWĊ„Þ"],encodeOffsets:[[101408,26770]]}},{type:"Feature",id:"5309",properties:{name:"临沧市",cp:[99.613,24.0546],childNum:8},geometry:{type:"Polygon",coordinates:["@@‚xĢ„l`²X°ŽV„šx@x°Þ°KXašğUњW‚bnIl`X²°b„xl°„„šV@xVxk¦mb„l@xšXV‚ÆzX¤™ÂƘk°„kx@lźêlaX»VUnJVx‚XÈK„aÃȣƒaV£nKV¦°‚Čb°I°™n»ÆÑV¯nWn›™@ÿXÃ…WWn¹ƒġŃn»‚ÛU™™aU™VƒUw„w@w°ƒó¥ƒ@ƒz—ƒ±@Âř›¯@ÂkÂUwlÂk£±aĵŽ¯™›Uĵ¦±±@ÂÂbó±VÂÃ@ó¤ƒw¯I@mńóm±ÂXŽ¯IólƒK@š°Ullb™zkKlln@@ԙºƒUmVk²ôҙx™ŎUVóLƒb„ŽmÈnÂŽmbnl‚a„x@z„@Ǝ„¦kš"],encodeOffsets:[[101251,24734]]}},{type:"Feature",id:"5334",properties:{name:"迪庆è—æ—自治州",cp:[99.4592,27.9327],childNum:3},geometry:{type:"Polygon",coordinates:["@@W™XwĪ@akk@y›—k°īX¥›Uóķ¯w@Ân»UaVaUۃ¯ƒmÂV¼k‚™Þċô@n¯xÛÒm„V‚¯Ô@xƒ‚@šk™wm™Åa@ƒUa‚ïVŃyV„a@ÿšÂn»ÃVmank™mmÞÅôƒ@n£±›ğzÇmU¦™Vm„nÃœmbnÂ@°nV@xmzÃ…@mºV¦k°ln¤š¼õô„n@xkƃIUxUš@Ťƒ¦VšmVkmkXW¤XzVx@ƚx™¼ƒÞ¯b@lVš™ĸގV„m¼XÂŽm¦V„ÂŽÞ@Ǝš¹Vón¥ÆKn„‚KX¯x@èĊȱłXšaÆxnlV@UÛlÈ»kÄŸV¥„Âm²ljmÅÞĕƒƛm°„ÆmÂX¤mznƃŽV¦ÞVVb°bnÞWbnŽ°l@ÂV„È@„‚VĵĊ±@ó„InxÆw„¥@£Þ›W¯ĸ£UƒUK‚ƒk±akkkbmWmÂÈķ„aÆÇU—ȃÆW@wmknmU¯"],encodeOffsets:[[102702,28401]]}},{type:"Feature",id:"5306",properties:{name:"昭通市",cp:[104.0955,27.6031],childNum:11},geometry:{type:"Polygon",coordinates:["@@mƒnK@wmƒUř¥mšóXÇ“ÅmX@Ž—VƒÂmL@xţ™nk@mlUšŻÒğŋ@ƒL@mmLkm™š@b™XÃ…ÂŽW¼ka¯lÇŹ¯aÇ»™ÃÃ_@m„@@a™@UklwUm@ak@ƒb™UmbÂmƒbV¯™ĕUƒƒÂšaVwÃ…aĉVmý™m¯xUkƒ@kÂ¥VƒUXƒ¤VÈm`@„—ńÇÜ@Ä€kn‚ĔkƞÆĠ„™Þš‚U„VôƆÞI@ÂŽUxƦn„l@ÄŠÄŠnxUÒ°¦Vb¯WUnWÂŽÂIml@xn„Ubô¤‚¼ÈxlI„»šKVš„@ÈԂJkšUĖ±ÆVb@nœ„VÃœVUVƒšL„wÄ l„kn„Ġ@nx°¥Æ„²mUwƒ@m™mÃ…Ul¯UњÑUm„Lll„Il±š@VÂkwƒW@w°@U»™kUÂóI°ƒ„»ĢтL„™š`nUĠ²lm„bôV@n„JUxƦX¦l@š‚ŎÂUƒV„@lV„KVřÂV£UaÞU™ƒnW@¯VU@ó™Â"],encodeOffsets:[[107787,28244]]}},{type:"Feature",id:"5301",properties:{name:"昆明市",cp:[102.9199,25.4663],childNum:11},geometry:{type:"Polygon",coordinates:["@@n@Vk‚VUn²°@xƒ°Vƒ@¯ÆV¼k@WŽ„Þ¯„@„@‚VVU„„Ģċ°k¼V„Ċxœ¤ŌÂÂœx°mVkƒÑÈšL‚°„x°XϡVmÄŠLVxUĖ°bX¦VW@kšȯlkn@„¥lnšƒ@»°Ñ¯VmlLUwVK@ƒV@ka@ÂlmXb„UlVlkÈx@™„LVa„VV™wnƒmm@km™@mÂœIVaÃÂ@XƒVUïU@ƒÃ£k»˜K@aUwkKV_ƒ¥„a@alU@Ânz°aV„È@@±lÂÛšk@wVakm@т¥„a„z‚@XxÆW@ÛX™@m@ƒy@aWw@kÅĉÂJlbV„ÂJƒzţÆUwVkmWkým@Ul™U@b¯wVºƒU™VUêšĠƒXUaUbVÄŠUÂŽWXUmkK™™WnUUU™V™ÂƒƒVV™Ã@kk±‚™¯ƒƒLÂkƒš±WkXlVklƒ@ƒwXbmLƒ›VUIVmk@Ubma@kkaVKUĪkmlXLWn™J¯ÒĊ°@zkºlLUŤn@@n›ôÂ@lÆÂnmKkÈlxVw„@@mÈx˜@n²Uxl¤nbVxUzmJƒÒnš"],encodeOffsets:[[104828,25999]]}},{type:"Feature",id:"5307",properties:{name:"丽江市",cp:[100.448,26.955],childNum:5},geometry:{type:"Polygon",coordinates:["@@lÂ@™„Â@w°ÓUÂnƒÜÑ°w@mČóšÃlÂU»n°„„ÂVÃœUbVbm¼@Ž°xôĸœVW¦¯ĬlÂœ˜@zll@b„šWxXš‚a„ÂX@ÆĠÆaXwl@XaƦn¼˜JnÂ@mnKW¯È»V¯°ak™VanXVwl@VyUÄ•VU„bÈīlaUk°ƒk¯lƒ²V˜UkƛôÂ@ƒ„I@mVwÄŠa„™ƒÂVaka㪮bUÂŽVLšaXIWKUw™ƒ„aWÑÅKUaVk°ƒ@ÂUw„ƒ¯¥›XÄŸÂÃLkm¯Iǃóѯ»™aƒnUl±UĵÿlóÅIƒaU‚±Ik¼UÂŽVb¯bWxn°™ÒVbnLlޚ@@`kbmIkÂŽVn„JmnXl›@Ux™bkn@xóLUxVŽƒKóóÅÂW™™aÃ…xƒŽ™wƒ@™nÃ…m™šƒV™„ƒôX„ƒLlVU¤ƒb¦m¼™Ž@ĀƒbU‚„zUƂ°ÂÞVb@„Æbnššx"],encodeOffsets:[[101937,28227]]}},{type:"Feature",id:"5328",properties:{name:"西åŒç‰ˆçº³å‚£æ—自治州",cp:[100.8984,21.8628],childNum:3},geometry:{type:"Polygon",coordinates:["@@l²°ŽnÃ’lxÞ@„nWl„Lĸ™nbV¤V¦kbVV‚¦na„x°Vôa@„šb@lôXlWUšVXÄŒKlmšÂšU@bšWXXܛ°LÈa°LnU°‚ÞnšÑ„ġ°Âlƒnbšaƒ¯¯KWƒœó@kmK@UšĉV@k°„VV¹„a@y‚_ÂÄ‹l_nÓlL@anI@ƒóWl£VU—ƒl™kÄ•l™šKVw„U@™kVƒam¯ÅL@bƒ‚Ãk@Vn„UbÇbÃwÃ…@ċ¥¯lk‚¼ÅŽ™Ò°b@¦nlUn@ŽÇV„ÂmÆÂbWôU@ÃÃ…Åm™¯ƒaU™™mk™WWw—@±ƒ™n¯U™è™a™LƒÂ¯mƒL™škwƒl@°mnÈÒ¯šów@V™xƒĀU¤°Įƒ°Xl"],encodeOffsets:[[102376,22579]]}},{type:"Feature",id:"5305",properties:{name:"ä¿å±±å¸‚",cp:[99.0637,24.9884],childNum:5},geometry:{type:"Polygon",coordinates:["@@X°„Il‚@¦ƒŽÈ¼m¼ÞaÞÅl„ÈxV¼šlVôÈÆlLޣȺlkUƒ‚ƒUw„¯UÄ•VwÄŠ@n¦mlnVĸIWÇ°LnƒUwl™šV„n@lnU˜„nJÞÂl±U™¯LVÂUa°Ã„U„ÇĊýšVŤé„LlxÞL„ĀÜl²ĉ°KUaVĪ_Źé@klw¯ƒlÂŗšÂW£ÅyU™W@wƒknalÂ¥Uw@w™Uƒƒk¯ƒw¯aW±k_mJÂa™XVҙĠWb¯L¯Ã@w™wUƒ¯Â±Wk_ġƒÂwƒwÅKmb@¤„bk°lĖƒô„ÂUJƒšVnÃ…lÅ¥ÂUš¯°VbnbWxX„m„ÞššWUĀ™L™yWzÛKmbUxVKknÃkÂŽVšĀċ¤Ux„Â@Ž¯Žm@ƒ¦"],encodeOffsets:[[100440,25943]]}},{type:"Feature",id:"5304",properties:{name:"玉溪市",cp:[101.9312,23.8898],childNum:9},geometry:{type:"Polygon",coordinates:["@@l„„L°xXlWxXnlw„a„ţlaÞlÆĬnX„ƒ°wVw„l„@m™nw°VVIXllKšbnnV°lbU„UJ@ÈÇKVb—š@bW„°Vk¦kaWb°škxV¤È¼U°ôI@llblš²Âš@‚@ϗ@mm@VÅ£kKl¹@yĉ¯°ÑšIXmWKnkšlV„ULlb@lnbVal@UnVJÂœU‚„nKWa„x„@lkkUlW²X„™‚l„K°„šl²@lšÞUŽ„U‚„UšVšVVXmššlLVnXWVÂUĉVaVb„W™ğVéšU„VU¹W»ÂaVa„aW™Xƒ‚_UÂ¥nÂÇķ¯™@a™lUnÇÂUyk@@wW@kbW¦UKÃwUÂÂmmƒƒLUnVxUVVlk¯mmnƒmkÂÇaŤ¯I@ƒl@@aĉw°ĕmU—L±ƒk™ÆéX™ÜÛ@yÈç@™Çġ„Ãķ—XmmÃVřƒ™lmnkbmWkb@nl@nÂŽmš¯ÂVxkJmÂUJ„Âml¯Â™°makVVÂnVƒ¦™Wƒ—ÂWmÂnl@xmn„l‚I„¤„n™xU„ƒVUÂŽmX@˜ƒb@zÂl@¦Ãþ"],encodeOffsets:[[103703,24874]]}},{type:"Feature",id:"5333",properties:{name:"怒江傈僳æ—自治州",cp:[99.1516,26.5594],childNum:4},geometry:{type:"Polygon",coordinates:["@@WyX£lWlnnUU™„¥@Å£V™Vw„JlÃ…@wƒmö󙻂£kml¯UÂ¥n¹Æ@ny@wmU@¯mÂnamÛnƒšUV¥ÈnÄ y²œm¤„@ÆónÚnmlnbÞU‚¥„aV£kU„KWƒ„óšƒmIU¥ókÂwVólƒ™»¯™ƒL™ƒk@m™naWKÛwóњw@a±n—@VbUJ›LkaƒÃXĉƒ™„UV`lI@lnXÆƑkKmxÛXmlUKVÂmU²Klw@a™aó„@n™KXwVKU¯VÂ¥mUnkm¥ĉ@UxVĖƒ°Vx„V„klmޙÂkKWÄ€kVWšnl°Lnm@°ŽUxlV@nk¦™JVÈ°ŽVÃ’@nX°@ÆlÂUômlnôƒ²nxmÅ‚nVV„¯x@Èm°XblVUšl°@xkXU¤WXX‚W„Xƃ„mkÃ…JmÞÂw±bƒxUÄ«kKmÂÃ…VUÄ–ÃèV„kx@š›lX„lnk¤ƒLkŽ‚Ėk¦‚xUššL°‚¯Ė@LnK@b°xVI„¥Ua°Ñ@»nm@¹‚KŎÞÈWln²n"],encodeOffsets:[[101071,28891]]}},{type:"Feature",id:"5331",properties:{name:"å¾·å®å‚£æ—景颇æ—自治州",cp:[98.1299,24.5874],childNum:5},geometry:{type:"Polygon",coordinates:["@@„¥n@°Â@ƒÂVwČ£™ÿUÂlÂބlmULVwnaÃœLXyšzšKVÿ™XÙnƒWƒXwmaUa°¯V™ŦŽÆkUm„™VIƒÂ„ókÄ•l¯ƒa@£nama™@¯m¯œó@óyÅ£bÄ¡kÃ…m±ÂÛammVkƒLÂwU`Wk@VƒkUmŃlUUKmbkkUVUwƒ¦óŽ°¼šbn°ô¦lºƒz@xšŽ¯„™@UŽ°nƒšU¤ţU„°VƆ@ÈmlnzÞl°¦Æa„xUxƒLkxWÆ’n@‚š²ŰšW„™‚@°ÈXl°Llx"],encodeOffsets:[[100440,25943]]}}],UTF8Encoding:!0}}),i("echarts/util/mapData/geoJson/zhe_jiang_geo",[],function(){return{type:"FeatureCollection",features:[{type:"Feature",id:"3311",properties:{name:"丽水市",cp:[119.5642,28.1854],childNum:9},geometry:{type:"Polygon",coordinates:["@@@V‚bVl@Xn‚UXƒKVÂŽ@¦nxlUXV‚n„KVmnL‚ÂUV@bn¤lLXK˜²„`nnlJXIVJ‚I„Vnn°KnnVll@VLXWV@UkVaVK„zV@„ƒšVVaUK@ÂU»VUl@@WnUUƒ@wVLn@Vwl@XW°LVbn@VU‚@X„l`@XnKVbkl@XVJlUnlV„„xlL@lnXl„@VšUnV°Â°„@a„UVLXblWVXn@VVUV@Lš¤VLV„U‚VbnalLUUVÂX_laVa„WVzXKV@@a@KUÂmImmXama@kÂU@yVIUK‚aVa@kXK@aWU@VÂIUmW@kkVm„Uš@VwUa@K@k@Uƒ`@kUKVk@UV@VaUm²ÂVy@klUUWUkVmUa@_ƒKVaXa›ÂXmƒU@mUÂlWkaUXƒ@mmkL@w™JƒnVVÃ…bWKXa™@@I@aƒJUUÇ@V„UL™W@akLmb@K@a™XXw@mƒVmUVkUy@£@aU@@VkUWm@kUKƒXUWU_mW@wkkmJUUkLWWUXƒW@IkJ@k@mW_kӃ_Ul™Lƒm@I@aUa¯m@kƒa¯LUJƒ@mVVxUb™a@LUKkXƒbm@Uak@@a@Um`ƒIUbUJ@nUVW@@LnVV@lšUbVlUX@`š@blXklW„Ušm„Xlm¦U@@V¯bml@š@nUb@llnn@VbX@lV@ÂŽUVULmU@JVn„bVbkb™VWxU@@nUVk@"],encodeOffsets:[[121546,28992]]}},{type:"Feature",id:"3301",properties:{name:"æ­å·žå¸‚",cp:[119.5313,29.8773],childNum:6},geometry:{type:"Polygon",coordinates:["@@X@l„°KXXlW„b@²„`šššb‚I„šX`l@„Â@bWl@n@VnLUV@V„@°¦@šl@XVlU@š@xVbUb@Vkb@‚@XVJVz™J@Lޚ@VmLUxUJ@LU„Vx‚b„xXUl@VaÈw„b‚aÞa@Vl@XUVx@V@V„LlbnV„al@lb„Vnn‚LnKnL@VlbVJXalIšb@KUU@mVInJ˜„U„Vl@xUšVLnUš@UÂÞaV@lkV@UanK„L@UlKVUnbÆmn@@nUlVnVJl@@UXU„L@WVIVJVxVLXV@IÃœKnbn@VÂ¥V@@I@ƒƒÂ„y°b@UUwnk°ÆƨVlUšçXmݣÂaƒÇ™IkVƒ@WVÂ@@aWIUWUIkb@WW@UnƒK@UU@kaWVkƒVIVVnU@ÂUWVUV@VmVÂkKkÂWIkVWaULU`UImJUImm—U@ƒƒwmwUV™IUWVkUamaU@mV—kƒb@KVU@aVU@anKULVJ‚U@kÛU™JUV›kkƒVakU@ƒaVwkW@UWkXmWaULUaUK@XƒJUUmƒVU@UÂVƒUkJ@ImwmKU@k„@lU„W@@akKm„kamIkWl_UwVm@UkaVUUaƒ@UamakbWlkL@aUalU@mkL@U@U™lmK@XkKm@Ãakb@xƒnXbƒ`ƒnUUU@›™U@™wU@@ƒmKkkƒV¯U@lULUbVbUb@V‚a@L™ºÃb@bÂLmK™x@VUL@bk@mxULWl"],encodeOffsets:[[121185,30184]]}},{type:"Feature",id:"3303",properties:{name:"温州市",cp:[120.498,27.8119],childNum:9},geometry:{type:"Polygon",coordinates:["@@ll@xnXV`VX„WVL@lXnlV@UV@@b@¤VzUlnV„U@nWxšW@b@LnalK@bšXVKUƒÈ@VV„I@b@Jš@WbXLÆaUU„mšI@xlKnn„@VWlbkXV‚@n„VWnœ‚WbUb„L@`VbUnVlVXkV@lUz±‚VnUbU@@VUlVL@l„_@V@l@LVbV@XLV`VÈlxn@lU@aÂœaVV‚k„@XJ@nl@@LU`°LVb„L°a@a„UVy@anI@a„a‚nV@²wÃœJX@VšVV°k„Âna@WVk„aWwÂU@m@™ƒkƒaUĕ™ÃšÃŤnÈa„aóI›»@±X™WkUÄ·@kV±kw™ƒUkWw„™UƒÃ»ÛkɳlÂImaUaWóXÿǬk‚UnWVÂmmÂk™KÅ£nÅÞğl™„UlUx@XWb„V@JkXƒ°mb@VULVxUVk@@LWWk@WIkšƒUkJmUkVmI@yƒ@Ua™ÂkLm‚U@mUUUkaVk™@mK@UÂlUU@UmKmbUUUJ@n@KVLUL@VkJWXX`mnULWlkL@JVLVb@°kxkU@LVŽ™V@„VLV`UL@VUX"],encodeOffsets:[[122502,28334]]}},{type:"Feature",id:"3302",properties:{name:"å®æ³¢å¸‚",cp:[121.5967,29.6466],childNum:6},geometry:{type:"Polygon",coordinates:["@@Ċ¦ĸĀ°‚nXÞVšKškƨƑźÿ°»n„Â@wô¥ÜbÂœU°ÂÆXÞWóçĉñIUƒÈ¥@U°wÆ»²mm_@aXƒVKÞVlk@akk›̅@£X»VwÆÂXÂWa¯aÈ—b™KƽۃĊ™xƒLóŽk@ƒƒƒ@¯nƒKUL@xkL݄kWULUUmJUXVÂŽU@mÂŽUX¯@V`mbXbV@@nn¤WXšx@škJ@nVVUVl²UbÃVUVk@Wx@V@„ƒVXzmlÂaƒL@VlLU`„XUVVVUnl@VbnJlnUVVnƒlUKkbmnn„VxlJnxmbU@UL@KUV™X@xmb@lk@mnVVUš™è"],encodeOffsets:[[123784,30977]]}},{type:"Feature",id:"3309",properties:{name:"舟山市",cp:[122.2559,30.2234],childNum:3},geometry:{type:"Polygon",coordinates:["@@l΢ƒÂʠþÆVÄ¢LĊƒǬXĊ܄XôV„ÑÆw„ƒlšÆÈóVÄ­VÇ“@ƒĉwÉ›kmK@ĉXÄ«WaĉUĵÃmƒ¯ĉƒwĉ±±nż¯x@VǦV„²JĊÞôèÃXÃ…W¯Â›VÛaó¦@xƒŽmŽ¯¼ŹĀ"],
+encodeOffsets:[[124437,30983]]}},{type:"Feature",id:"3310",properties:{name:"å°å·žå¸‚",cp:[121.1353,28.6688],childNum:7},geometry:{type:"Polygon",coordinates:["@@lV„IVWVz@bXJl@Xal@°„nLll@nVxnV„K@ÂUJVbƒ¦°„k`UIWJXnƚ@bUJ„Xl@lb„Wn@UzVV@bVVšmVnnJVXna‚bšKUKnUVVUnVLlKVLXa„Jm£@mU@WanaU_°@VWnÂV@UÂVWnIVVVKlXœÒlK@wVK„L°m„@„„l@ô„Kšw„ĉƾůUƒl£@»UƒÂVk„m@Æ…UƒƒaÛIÅmUk@m„w@a™£ƒWk@ţšƒIm±@ankôUlaU™Uw¯ƒÅaƒbÇbÅ£m™ÞšÞVĖ„b„l@š@n‚VXxƒbUl@XmbƒŽ¯lUUU™W@ÛI±xU@Âmƒb@bmJ@bUzƒV@b¯bƒKUa¯KV_@Kk@@mWIƒ@ÂlUU›b@bkVm@kwUÇU_WKU@Ux™@ƒVUnllX@Vn‚J@UXV@bWL@lUbÂbVLUJ@z‚V@lnbWbnnnJVÂŽ@L"],encodeOffsets:[[123312,29526]]}},{type:"Feature",id:"3307",properties:{name:"金åŽå¸‚",cp:[120.0037,29.1028],childNum:8},geometry:{type:"Polygon",coordinates:["@@nbVb„@VbUVlb@VUnVxk`lXnJlbnƒlL@bX@Vƒ@klƒV@nLnx@JlI„V‚U@VUVn„VV„I@WVLVbVKXbWnXl@VlXUx„b@ÂŽlVUbl„œlVUšIÃœVnalKX@@bV@@aUUlUƒwUw„@naWW„UVaUUšaVb„LlxXJVk°ƒUƒlkUÂ¥@k„a@LVlXLVlšVWznVn@lxšJl_@WX_@mVa„a@alU@kVVna„KVLlK„b@UUaVašbnUWmXU@k@yVI@ařWmXIVJl_¯ƒ„¥UaVI@ƒLmUUw@mkkmK¯ƒk@Wbk@WI@aUyUXƒJkU@bU@WLUyƒXUbkbW`UÂVVkKmbUaVÂUƒUK™£@KVUUUm@UWkXWaUKƒV@b¯ƒ¯ÂmU™V@UkƒmW@kkKƒwUƒmkkVUI@WlkUamL@Wk_WƒÂ@UVm@Ua¯KWXk@Uxm@UK@xV„mV@Xk@UVV¼@‚VLUb™Uƒ„U@ƒyULUbVlU@@XlVUVVbƒU@lXXVW@XUVl@@VUVƒÈn@VVU„@lVa@„U„mL@`ÂX@`WL@VUX@lUL@xlx"],encodeOffsets:[[122119,29948]]}},{type:"Feature",id:"3308",properties:{name:"衢州市",cp:[118.6853,28.8666],childNum:5},geometry:{type:"Polygon",coordinates:["@@XkVKnwl@@aVK@UšwnL‚K@aÞaš¹@KÂb@UVaUaVaVK@k°V„UllnL@„V@šxV@œšV@VV„m„_Wa„m@wlaÞbn@lL@WnLšk@V@VlK@nkVVb@blKXklakw@wVK@kVW@UXK@_‚W@_nKVƒ@ƒUb@kVƒUUm@„ÇVU@Uk@VU@WUXWW@k„VUaVUkU@WWXUKk@Ukmm¯LmmƒUÂJUIWJkImmƒ_—±WLkKm£@aVUÂÂmKUnƒLÂmWUkVmw@Â¥U„LVWmÂ@WUkÂa@UmÂmLÂmm@@bUX™@@WUIm@UVUK@UVUUU™VVJmb@b„Xn‚mVƒ¼nnn¦mJUVƒL„V@VW@UzUlVnUbl`UnVl@XU@kl@bmÈUx™Vk@@J@„ƒ¼W@Ã…aVVnzmVƒ„Â@WJk@kÂWJ@ƒlXbWbXxmVnšlLXb@°lKVXnWšbWV„„X„mbV@Xl‚bšI@Kn@@x@šVLlm"],encodeOffsets:[[121185,30184]]}},{type:"Feature",id:"3306",properties:{name:"ç»å…´å¸‚",cp:[120.564,29.7565],childNum:6},geometry:{type:"Polygon",coordinates:["@@„x@„˜VnnVJnIVJV_VKXblUXJlÂŽlLUÂŽUnU@UVVX@ÂŽmVUUUJl„XUlbV@@V„LVmX@@XlaVJVXXJ@b‚@XU„@lUšJ„È‚bœ¤Ō„JšçV™UUnml@@kna@wšWVU@LVKV@namwkIUwmƒnmlaVL„kUmVUkmmIUak@VmUUVUƒWV_kK@U„K‚bnkWy„U@ƒ@UXwl@VUÞUVak±VUUU@mlI@™™wXWƒIWbUKkLUKVmUUmVVL™LÂambUWmIUm™nUU@aUUVym@ƒXkak@ƒW@z@lWVXnmV™aUbVb@VƒakLUKƒLmbUU@lkV@bƒbUb@nW`@Xk`™Ikwm@mUXy™UUkWKUk@Kƒb@lV¦klV„¯„UlWIkwƒKUa™bVVUbƒVXXmbƒ@Vx„xkVVV@bU@@aW@kLmb@lÂVUIVKmL@bUV@bUV@L„a˜lnUV@nbVbUlVXšJVUnx"],encodeOffsets:[[122997,30561]]}},{type:"Feature",id:"3304",properties:{name:"嘉兴市",cp:[120.9155,30.6354],childNum:6},geometry:{type:"Polygon",coordinates:["@@@blIX@@VÃœVUnn@l‚k„lKnI°Þl`²LVKVbnbVaVLUVn@W¦@VkVVb„@VI„`@blLnL‚aX@„VVb@U‚@XlVa„@@kVaUKV»U_lWXUƒƒ@alb„k@VllnLVKn@@UVIUw@y°IVVXU@VV@lw„m@wVkƾaÂœJ‚LkΡƧƒ™l™LÃUmW¯Âķÿĉ¥ƒIÅ‹ÂŽWn™èkVƧU¯ÅmlVx@V¯aƒz„Ž@„@JU@U¦m@@šnVmn@V„LV‚"],encodeOffsets:[[123233,31382]]}},{type:"Feature",id:"3305",properties:{name:"湖州市",cp:[119.8608,30.7782],childNum:4},geometry:{type:"Polygon",coordinates:["@@kLlƒkÂm@VmÛU@UW@kJ@aUƒK@UnmmU@™maÛL@JWUUKUwUIUJ@XƒKWV@Vk@UIUmVk@mm@Ã…nmaUVkL@VƒKmLVbU@klU@ÃbV™@mVUKV™@wUkVƒ—ƒmIUJ@nVV@L™akJWbUIka@UmKmLÂKmmƒUUVk@@nmLX`WXUV@ÂŽ@nUl™kmlU@Ub„„ƒxVVšIlV„Žšnn„@@n˜„UҚ@„°n@@xmb@„VbnV@šš„@b@`@L@L@x@blVklVbnnV@‚aXb°VlU@W„b°U„LXWVUV™„™VwÈwÜ»ĸaÄ nUÂVw²X@V@lVU@wlaUUVm@knUV›"],encodeOffsets:[[123379,31500]]}}],UTF8Encoding:!0}}),i("echarts/chart/gauge",["require","./base","../util/shape/GaugePointer","zrender/shape/Text","zrender/shape/Line","zrender/shape/Rectangle","zrender/shape/Circle","zrender/shape/Sector","../config","../util/ecData","../util/accMath","zrender/tool/util","../chart"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o),this.refresh(a)}var i=e("./base"),n=e("../util/shape/GaugePointer"),a=e("zrender/shape/Text"),o=e("zrender/shape/Line"),r=e("zrender/shape/Rectangle"),s=e("zrender/shape/Circle"),l=e("zrender/shape/Sector"),h=e("../config");h.gauge={zlevel:0,z:2,center:["50%","50%"],clickable:!0,legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#228b22"],[.8,"#48b"],[1,"#ff4500"]],width:30}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,textStyle:{color:"auto"}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},pointer:{show:!0,length:"80%",width:8,color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],textStyle:{color:"#333",fontSize:15}},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:40,offsetCenter:[0,"40%"],textStyle:{color:"auto",fontSize:30}}};var m=e("../util/ecData"),V=e("../util/accMath"),U=e("zrender/tool/util");return t.prototype={type:h.CHART_TYPE_GAUGE,_buildShape:function(){var e=this.series;this._paramsMap={},this.selectedMap={};for(var t=0,i=e.length;i>t;t++)e[t].type===h.CHART_TYPE_GAUGE&&(this.selectedMap[e[t].name]=!0,e[t]=this.reformOption(e[t]),this.legendHoverLink=e[t].legendHoverLink||this.legendHoverLink,this._buildSingleGauge(t),this.buildMark(t));this.addShapeList()},_buildSingleGauge:function(e){var t=this.series[e];this._paramsMap[e]={center:this.parseCenter(this.zr,t.center),radius:this.parseRadius(this.zr,t.radius),startAngle:t.startAngle.toFixed(2)-0,endAngle:t.endAngle.toFixed(2)-0},this._paramsMap[e].totalAngle=this._paramsMap[e].startAngle-this._paramsMap[e].endAngle,this._colorMap(e),this._buildAxisLine(e),this._buildSplitLine(e),this._buildAxisTick(e),this._buildAxisLabel(e),this._buildPointer(e),this._buildTitle(e),this._buildDetail(e)},_buildAxisLine:function(e){var t=this.series[e];if(t.axisLine.show)for(var i,n,a=t.min,o=t.max-a,r=this._paramsMap[e],s=r.center,l=r.startAngle,h=r.totalAngle,V=r.colorArray,U=t.axisLine.lineStyle,d=this.parsePercent(U.width,r.radius[1]),p=r.radius[1],c=p-d,u=l,y=0,g=V.length;g>y;y++)n=l-h*(V[y][0]-a)/o,i=this._getSector(s,c,p,n,u,V[y][1],U,t.zlevel,t.z),u=n,i._animationAdd="r",m.set(i,"seriesIndex",e),m.set(i,"dataIndex",y),this.shapeList.push(i)},_buildSplitLine:function(e){var t=this.series[e];if(t.splitLine.show)for(var i,n,a,r=this._paramsMap[e],s=t.splitNumber,l=t.min,h=t.max-l,m=t.splitLine,V=this.parsePercent(m.length,r.radius[1]),U=m.lineStyle,d=U.color,p=r.center,c=r.startAngle*Math.PI/180,u=r.totalAngle*Math.PI/180,y=r.radius[1],g=y-V,b=0;s>=b;b++)i=c-u/s*b,n=Math.sin(i),a=Math.cos(i),this.shapeList.push(new o({zlevel:t.zlevel,z:t.z+1,hoverable:!1,style:{xStart:p[0]+a*y,yStart:p[1]-n*y,xEnd:p[0]+a*g,yEnd:p[1]-n*g,strokeColor:"auto"===d?this._getColor(e,l+h/s*b):d,lineType:U.type,lineWidth:U.width,shadowColor:U.shadowColor,shadowBlur:U.shadowBlur,shadowOffsetX:U.shadowOffsetX,shadowOffsetY:U.shadowOffsetY}}))},_buildAxisTick:function(e){var t=this.series[e];if(t.axisTick.show)for(var i,n,a,r=this._paramsMap[e],s=t.splitNumber,l=t.min,h=t.max-l,m=t.axisTick,V=m.splitNumber,U=this.parsePercent(m.length,r.radius[1]),d=m.lineStyle,p=d.color,c=r.center,u=r.startAngle*Math.PI/180,y=r.totalAngle*Math.PI/180,g=r.radius[1],b=g-U,f=0,k=s*V;k>=f;f++)f%V!==0&&(i=u-y/k*f,n=Math.sin(i),a=Math.cos(i),this.shapeList.push(new o({zlevel:t.zlevel,z:t.z+1,hoverable:!1,style:{xStart:c[0]+a*g,yStart:c[1]-n*g,xEnd:c[0]+a*b,yEnd:c[1]-n*b,strokeColor:"auto"===p?this._getColor(e,l+h/k*f):p,lineType:d.type,lineWidth:d.width,shadowColor:d.shadowColor,shadowBlur:d.shadowBlur,shadowOffsetX:d.shadowOffsetX,shadowOffsetY:d.shadowOffsetY}})))},_buildAxisLabel:function(e){var t=this.series[e];if(t.axisLabel.show)for(var i,n,o,r,s=t.splitNumber,l=t.min,h=t.max-l,m=t.axisLabel.textStyle,U=this.getFont(m),d=m.color,p=this._paramsMap[e],c=p.center,u=p.startAngle,y=p.totalAngle,g=p.radius[1]-this.parsePercent(t.splitLine.length,p.radius[1])-5,b=0;s>=b;b++)r=V.accAdd(l,V.accMul(V.accDiv(h,s),b)),i=u-y/s*b,n=Math.sin(i*Math.PI/180),o=Math.cos(i*Math.PI/180),i=(i+360)%360,this.shapeList.push(new a({zlevel:t.zlevel,z:t.z+1,hoverable:!1,style:{x:c[0]+o*g,y:c[1]-n*g,color:"auto"===d?this._getColor(e,r):d,text:this._getLabelText(t.axisLabel.formatter,r),textAlign:i>=110&&250>=i?"left":70>=i||i>=290?"right":"center",textBaseline:i>=10&&170>=i?"top":i>=190&&350>=i?"bottom":"middle",textFont:U,shadowColor:m.shadowColor,shadowBlur:m.shadowBlur,shadowOffsetX:m.shadowOffsetX,shadowOffsetY:m.shadowOffsetY}}))},_buildPointer:function(e){var t=this.series[e];if(t.pointer.show){var i=t.max-t.min,a=t.pointer,o=this._paramsMap[e],r=this.parsePercent(a.length,o.radius[1]),l=this.parsePercent(a.width,o.radius[1]),h=o.center,V=this._getValue(e);V=V<t.max?V:t.max;var U=(o.startAngle-o.totalAngle/i*(V-t.min))*Math.PI/180,d="auto"===a.color?this._getColor(e,V):a.color,p=new n({zlevel:t.zlevel,z:t.z+1,clickable:this.query(t,"clickable"),style:{x:h[0],y:h[1],r:r,startAngle:o.startAngle*Math.PI/180,angle:U,color:d,width:l,shadowColor:a.shadowColor,shadowBlur:a.shadowBlur,shadowOffsetX:a.shadowOffsetX,shadowOffsetY:a.shadowOffsetY},highlightStyle:{brushType:"fill",width:l>2?2:l/2,color:"#fff"}});m.pack(p,this.series[e],e,this.series[e].data[0],0,this.series[e].data[0].name,V),this.shapeList.push(p),this.shapeList.push(new s({zlevel:t.zlevel,z:t.z+2,hoverable:!1,style:{x:h[0],y:h[1],r:a.width/2.5,color:"#fff"}}))}},_buildTitle:function(e){var t=this.series[e];if(t.title.show){var i=t.data[0],n=null!=i.name?i.name:"";if(""!==n){var o=t.title,r=o.offsetCenter,s=o.textStyle,l=s.color,h=this._paramsMap[e],m=h.center[0]+this.parsePercent(r[0],h.radius[1]),V=h.center[1]+this.parsePercent(r[1],h.radius[1]);this.shapeList.push(new a({zlevel:t.zlevel,z:t.z+(Math.abs(m-h.center[0])+Math.abs(V-h.center[1])<2*s.fontSize?2:1),hoverable:!1,style:{x:m,y:V,color:"auto"===l?this._getColor(e):l,text:n,textAlign:"center",textFont:this.getFont(s),shadowColor:s.shadowColor,shadowBlur:s.shadowBlur,shadowOffsetX:s.shadowOffsetX,shadowOffsetY:s.shadowOffsetY}}))}}},_buildDetail:function(e){var t=this.series[e];if(t.detail.show){var i=t.detail,n=i.offsetCenter,a=i.backgroundColor,o=i.textStyle,s=o.color,l=this._paramsMap[e],h=this._getValue(e),m=l.center[0]-i.width/2+this.parsePercent(n[0],l.radius[1]),V=l.center[1]+this.parsePercent(n[1],l.radius[1]);this.shapeList.push(new r({zlevel:t.zlevel,z:t.z+(Math.abs(m+i.width/2-l.center[0])+Math.abs(V+i.height/2-l.center[1])<o.fontSize?2:1),hoverable:!1,style:{x:m,y:V,width:i.width,height:i.height,brushType:"both",color:"auto"===a?this._getColor(e,h):a,lineWidth:i.borderWidth,strokeColor:i.borderColor,shadowColor:i.shadowColor,shadowBlur:i.shadowBlur,shadowOffsetX:i.shadowOffsetX,shadowOffsetY:i.shadowOffsetY,text:this._getLabelText(i.formatter,h),textFont:this.getFont(o),textPosition:"inside",textColor:"auto"===s?this._getColor(e,h):s}}))}},_getValue:function(e){return this.getDataFromOption(this.series[e].data[0])},_colorMap:function(e){var t=this.series[e],i=t.min,n=t.max-i,a=t.axisLine.lineStyle.color;a instanceof Array||(a=[[1,a]]);for(var o=[],r=0,s=a.length;s>r;r++)o.push([a[r][0]*n+i,a[r][1]]);this._paramsMap[e].colorArray=o},_getColor:function(e,t){null==t&&(t=this._getValue(e));for(var i=this._paramsMap[e].colorArray,n=0,a=i.length;a>n;n++)if(i[n][0]>=t)return i[n][1];return i[i.length-1][1]},_getSector:function(e,t,i,n,a,o,r,s,h){return new l({zlevel:s,z:h,hoverable:!1,style:{x:e[0],y:e[1],r0:t,r:i,startAngle:n,endAngle:a,brushType:"fill",color:o,shadowColor:r.shadowColor,shadowBlur:r.shadowBlur,shadowOffsetX:r.shadowOffsetX,shadowOffsetY:r.shadowOffsetY}})},_getLabelText:function(e,t){if(e){if("function"==typeof e)return e.call(this.myChart,t);if("string"==typeof e)return e.replace("{value}",t)}return t},refresh:function(e){e&&(this.option=e,this.series=e.series),this.backupShapeList(),this._buildShape()}},U.inherits(t,i),e("../chart").define("gauge",t),t}),i("echarts/util/shape/GaugePointer",["require","zrender/shape/Base","zrender/tool/util","./normalIsCover"],function(e){function t(e){i.call(this,e)}var i=e("zrender/shape/Base"),n=e("zrender/tool/util");return t.prototype={type:"gauge-pointer",buildPath:function(e,t){var i=t.r,n=t.width,a=t.angle,o=t.x-Math.cos(a)*n*(n>=i/3?1:2),r=t.y+Math.sin(a)*n*(n>=i/3?1:2);a=t.angle-Math.PI/2,e.moveTo(o,r),e.lineTo(t.x+Math.cos(a)*n,t.y-Math.sin(a)*n),e.lineTo(t.x+Math.cos(t.angle)*i,t.y-Math.sin(t.angle)*i),e.lineTo(t.x-Math.cos(a)*n,t.y+Math.sin(a)*n),e.lineTo(o,r)},getRect:function(e){if(e.__rect)return e.__rect;var t=2*e.width,i=e.x,n=e.y,a=i+Math.cos(e.angle)*e.r,o=n-Math.sin(e.angle)*e.r;return e.__rect={x:Math.min(i,a)-t,y:Math.min(n,o)-t,width:Math.abs(i-a)+t,height:Math.abs(n-o)+t},e.__rect},isCover:e("./normalIsCover")},n.inherits(t,i),t}),i("echarts/chart/funnel",["require","./base","zrender/shape/Text","zrender/shape/Line","zrender/shape/Polygon","../config","../util/ecData","../util/number","zrender/tool/util","zrender/tool/color","zrender/tool/area","../chart"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o),this.refresh(a)}var i=e("./base"),n=e("zrender/shape/Text"),a=e("zrender/shape/Line"),o=e("zrender/shape/Polygon"),r=e("../config");r.funnel={zlevel:0,z:2,clickable:!0,legendHoverLink:!0,x:80,y:60,x2:80,y2:60,min:0,max:100,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",itemStyle:{normal:{borderColor:"#fff",borderWidth:1,label:{show:!0,position:"outer"},labelLine:{show:!0,length:10,lineStyle:{width:1,type:"solid"}}},emphasis:{borderColor:"rgba(0,0,0,0)",borderWidth:1,label:{show:!0},labelLine:{show:!0}}}};var s=e("../util/ecData"),l=e("../util/number"),h=e("zrender/tool/util"),m=e("zrender/tool/color"),V=e("zrender/tool/area");return t.prototype={type:r.CHART_TYPE_FUNNEL,_buildShape:function(){var e=this.series,t=this.component.legend;this._paramsMap={},this._selected={},this.selectedMap={};for(var i,n=0,a=e.length;a>n;n++)if(e[n].type===r.CHART_TYPE_FUNNEL){if(e[n]=this.reformOption(e[n]),this.legendHoverLink=e[n].legendHoverLink||this.legendHoverLink,i=e[n].name||"",this.selectedMap[i]=t?t.isSelected(i):!0,!this.selectedMap[i])continue;this._buildSingleFunnel(n),this.buildMark(n)}this.addShapeList()},_buildSingleFunnel:function(e){var t=this.component.legend,i=this.series[e],n=this._mapData(e),a=this._getLocation(e);this._paramsMap[e]={location:a,data:n};for(var o,r=0,s=[],h=0,m=n.length;m>h;h++)o=n[h].name,this.selectedMap[o]=t?t.isSelected(o):!0,this.selectedMap[o]&&!isNaN(n[h].value)&&(s.push(n[h]),r++);if(0!==r){for(var V,U,d,p,c=this._buildFunnelCase(e),u=i.funnelAlign,y=i.gap,g=r>1?(a.height-(r-1)*y)/r:a.height,b=a.y,f="descending"===i.sort?this._getItemWidth(e,s[0].value):l.parsePercent(i.minSize,a.width),k="descending"===i.sort?1:0,x=a.centerX,_=[],h=0,m=s.length;m>h;h++)if(o=s[h].name,this.selectedMap[o]&&!isNaN(s[h].value)){switch(V=m-2>=h?this._getItemWidth(e,s[h+k].value):"descending"===i.sort?l.parsePercent(i.minSize,a.width):l.parsePercent(i.maxSize,a.width),u){case"left":U=a.x;break;case"right":U=a.x+a.width-f;break;default:U=x-f/2}d=this._buildItem(e,s[h]._index,t?t.getColor(o):this.zr.getColor(s[h]._index),U,b,f,V,g,u),b+=g+y,p=d.style.pointList,_.unshift([p[0][0]-10,p[0][1]]),_.push([p[1][0]+10,p[1][1]]),0===h&&(0===f?(p=_.pop(),"center"==u&&(_[0][0]+=10),"right"==u&&(_[0][0]=p[0]),_[0][1]-="center"==u?10:15,1==m&&(p=d.style.pointList)):(_[_.length-1][1]-=5,_[0][1]-=5)),f=V}c&&(_.unshift([p[3][0]-10,p[3][1]]),_.push([p[2][0]+10,p[2][1]]),0===f?(p=_.pop(),"center"==u&&(_[0][0]+=10),"right"==u&&(_[0][0]=p[0]),_[0][1]+="center"==u?10:15):(_[_.length-1][1]+=5,_[0][1]+=5),c.style.pointList=_)}},_buildFunnelCase:function(e){var t=this.series[e];if(this.deepQuery([t,this.option],"calculable")){var i=this._paramsMap[e].location,n=10,a={hoverable:!1,style:{pointListd:[[i.x-n,i.y-n],[i.x+i.width+n,i.y-n],[i.x+i.width+n,i.y+i.height+n],[i.x-n,i.y+i.height+n]],brushType:"stroke",lineWidth:1,strokeColor:t.calculableHolderColor||this.ecTheme.calculableHolderColor||r.calculableHolderColor}};return s.pack(a,t,e,void 0,-1),this.setCalculable(a),a=new o(a),this.shapeList.push(a),a}},_getLocation:function(e){var t=this.series[e],i=this.zr.getWidth(),n=this.zr.getHeight(),a=this.parsePercent(t.x,i),o=this.parsePercent(t.y,n),r=null==t.width?i-a-this.parsePercent(t.x2,i):this.parsePercent(t.width,i);return{x:a,y:o,width:r,height:null==t.height?n-o-this.parsePercent(t.y2,n):this.parsePercent(t.height,n),centerX:a+r/2}},_mapData:function(e){function t(e,t){return"-"===e.value?1:"-"===t.value?-1:t.value-e.value}function i(e,i){return-t(e,i)}for(var n=this.series[e],a=h.clone(n.data),o=0,r=a.length;r>o;o++)a[o]._index=o;return"none"!=n.sort&&a.sort("descending"===n.sort?t:i),a},_buildItem:function(e,t,i,n,a,o,r,l,h){var m=this.series,V=m[e],U=V.data[t],d=this.getPolygon(e,t,i,n,a,o,r,l,h);s.pack(d,m[e],e,m[e].data[t],t,m[e].data[t].name),this.shapeList.push(d);var p=this.getLabel(e,t,i,n,a,o,r,l,h);s.pack(p,m[e],e,m[e].data[t],t,m[e].data[t].name),this.shapeList.push(p),this._needLabel(V,U,!1)||(p.invisible=!0);var c=this.getLabelLine(e,t,i,n,a,o,r,l,h);this.shapeList.push(c),this._needLabelLine(V,U,!1)||(c.invisible=!0);var u=[],y=[];return this._needLabelLine(V,U,!0)&&(u.push(c.id),y.push(c.id)),this._needLabel(V,U,!0)&&(u.push(p.id),y.push(d.id)),d.hoverConnect=u,p.hoverConnect=y,d},_getItemWidth:function(e,t){var i=this.series[e],n=this._paramsMap[e].location,a=i.min,o=i.max,r=l.parsePercent(i.minSize,n.width),s=l.parsePercent(i.maxSize,n.width);return(t-a)*(s-r)/(o-a)+r},getPolygon:function(e,t,i,n,a,r,s,l,h){var V,U=this.series[e],d=U.data[t],p=[d,U],c=this.deepMerge(p,"itemStyle.normal")||{},u=this.deepMerge(p,"itemStyle.emphasis")||{},y=this.getItemStyleColor(c.color,e,t,d)||i,g=this.getItemStyleColor(u.color,e,t,d)||("string"==typeof y?m.lift(y,-.2):y);switch(h){case"left":V=n;break;case"right":V=n+(r-s);break;default:V=n+(r-s)/2}var b={zlevel:U.zlevel,z:U.z,clickable:this.deepQuery(p,"clickable"),style:{pointList:[[n,a],[n+r,a],[V+s,a+l],[V,a+l]],brushType:"both",color:y,lineWidth:c.borderWidth,strokeColor:c.borderColor},highlightStyle:{color:g,lineWidth:u.borderWidth,strokeColor:u.borderColor}};return this.deepQuery([d,U,this.option],"calculable")&&(this.setCalculable(b),b.draggable=!0),new o(b)},getLabel:function(e,t,i,a,o,r,s,l,U){var d,p=this.series[e],c=p.data[t],u=this._paramsMap[e].location,y=h.merge(h.clone(c.itemStyle)||{},p.itemStyle),g="normal",b=y[g].label,f=b.textStyle||{},k=y[g].labelLine.length,x=this.getLabelText(e,t,g),_=this.getFont(f),L=i;b.position=b.position||y.normal.label.position,"inner"===b.position||"inside"===b.position||"center"===b.position?(d=U,L=Math.max(r,s)/2>V.getTextWidth(x,_)?"#fff":m.reverse(i)):d="left"===b.position?"right":"left";var W={zlevel:p.zlevel,z:p.z+1,style:{x:this._getLabelPoint(b.position,a,u,r,s,k,U),y:o+l/2,color:f.color||L,text:x,textAlign:f.align||d,textBaseline:f.baseline||"middle",textFont:_}};return g="emphasis",b=y[g].label||b,f=b.textStyle||f,k=y[g].labelLine.length||k,b.position=b.position||y.normal.label.position,x=this.getLabelText(e,t,g),_=this.getFont(f),L=i,"inner"===b.position||"inside"===b.position||"center"===b.position?(d=U,L=Math.max(r,s)/2>V.getTextWidth(x,_)?"#fff":m.reverse(i)):d="left"===b.position?"right":"left",W.highlightStyle={x:this._getLabelPoint(b.position,a,u,r,s,k,U),color:f.color||L,text:x,textAlign:f.align||d,textFont:_,brushType:"fill"},new n(W)},getLabelText:function(e,t,i){var n=this.series,a=n[e],o=a.data[t],r=this.deepQuery([o,a],"itemStyle."+i+".label.formatter");return r?"function"==typeof r?r.call(this.myChart,{seriesIndex:e,seriesName:a.name||"",series:a,dataIndex:t,data:o,name:o.name,value:o.value}):"string"==typeof r?r=r.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}").replace("{a0}",a.name).replace("{b0}",o.name).replace("{c0}",o.value):void 0:o.name},getLabelLine:function(e,t,i,n,o,r,s,l,m){var V=this.series[e],U=V.data[t],d=this._paramsMap[e].location,p=h.merge(h.clone(U.itemStyle)||{},V.itemStyle),c="normal",u=p[c].labelLine,y=p[c].labelLine.length,g=u.lineStyle||{},b=p[c].label;b.position=b.position||p.normal.label.position;var f={zlevel:V.zlevel,z:V.z+1,hoverable:!1,style:{xStart:this._getLabelLineStartPoint(n,d,r,s,m),yStart:o+l/2,xEnd:this._getLabelPoint(b.position,n,d,r,s,y,m),yEnd:o+l/2,strokeColor:g.color||i,lineType:g.type,lineWidth:g.width}};return c="emphasis",u=p[c].labelLine||u,y=p[c].labelLine.length||y,g=u.lineStyle||g,b=p[c].label||b,b.position=b.position,f.highlightStyle={xEnd:this._getLabelPoint(b.position,n,d,r,s,y,m),strokeColor:g.color||i,lineType:g.type,lineWidth:g.width},new a(f)},_getLabelPoint:function(e,t,i,n,a,o,r){switch(e="inner"===e||"inside"===e?"center":e){case"center":return"center"==r?t+n/2:"left"==r?t+10:t+n-10;case"left":return"auto"===o?i.x-10:"center"==r?i.centerX-Math.max(n,a)/2-o:"right"==r?t-(a>n?a-n:0)-o:i.x-o;default:return"auto"===o?i.x+i.width+10:"center"==r?i.centerX+Math.max(n,a)/2+o:"right"==r?i.x+i.width+o:t+Math.max(n,a)+o}},_getLabelLineStartPoint:function(e,t,i,n,a){return"center"==a?t.centerX:n>i?e+Math.min(i,n)/2:e+Math.max(i,n)/2},_needLabel:function(e,t,i){return this.deepQuery([t,e],"itemStyle."+(i?"emphasis":"normal")+".label.show")},_needLabelLine:function(e,t,i){return this.deepQuery([t,e],"itemStyle."+(i?"emphasis":"normal")+".labelLine.show")},refresh:function(e){e&&(this.option=e,this.series=e.series),this.backupShapeList(),this._buildShape()}},h.inherits(t,i),e("../chart").define("funnel",t),t}),i("echarts/chart/eventRiver",["require","./base","../layout/eventRiver","zrender/shape/Polygon","../component/axis","../component/grid","../component/dataZoom","../config","../util/ecData","../util/date","zrender/tool/util","zrender/tool/color","../chart"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o);var r=this;r._ondragend=function(){r.isDragend=!0},this.refresh(a)}var i=e("./base"),n=e("../layout/eventRiver"),a=e("zrender/shape/Polygon");e("../component/axis"),e("../component/grid"),e("../component/dataZoom");var o=e("../config");o.eventRiver={zlevel:0,z:2,clickable:!0,legendHoverLink:!0,itemStyle:{normal:{borderColor:"rgba(0,0,0,0)",borderWidth:1,label:{show:!0,position:"inside",formatter:"{b}"}},emphasis:{borderColor:"rgba(0,0,0,0)",borderWidth:1,label:{show:!0}}}};var r=e("../util/ecData"),s=e("../util/date"),l=e("zrender/tool/util"),h=e("zrender/tool/color");return t.prototype={type:o.CHART_TYPE_EVENTRIVER,_buildShape:function(){var e=this.series;this.selectedMap={},this._dataPreprocessing();for(var t=this.component.legend,i=[],a=0;a<e.length;a++)if(e[a].type===this.type){e[a]=this.reformOption(e[a]),this.legendHoverLink=e[a].legendHoverLink||this.legendHoverLink;var o=e[a].name||"";if(this.selectedMap[o]=t?t.isSelected(o):!0,!this.selectedMap[o])continue;this.buildMark(a),i.push(this.series[a])}n(i,this._intervalX,this.component.grid.getArea()),this._drawEventRiver(),this.addShapeList()},_dataPreprocessing:function(){for(var e,t,i=this.series,n=0,a=i.length;a>n;n++)if(i[n].type===this.type){e=this.component.xAxis.getAxis(i[n].xAxisIndex||0);for(var o=0,r=i[n].data.length;r>o;o++){t=i[n].data[o].evolution;for(var l=0,h=t.length;h>l;l++)t[l].timeScale=e.getCoord(s.getNewDate(t[l].time)-0),t[l].valueScale=Math.pow(t[l].value,.8)}}this._intervalX=Math.round(this.component.grid.getWidth()/40)},_drawEventRiver:function(){for(var e=this.series,t=0;t<e.length;t++){var i=e[t].name||"";if(e[t].type===this.type&&this.selectedMap[i])for(var n=0;n<e[t].data.length;n++)this._drawEventBubble(e[t].data[n],t,n)}},_drawEventBubble:function(e,t,i){var n=this.series,o=n[t],s=o.name||"",l=o.data[i],m=[l,o],V=this.component.legend,U=V?V.getColor(s):this.zr.getColor(t),d=this.deepMerge(m,"itemStyle.normal")||{},p=this.deepMerge(m,"itemStyle.emphasis")||{},c=this.getItemStyleColor(d.color,t,i,l)||U,u=this.getItemStyleColor(p.color,t,i,l)||("string"==typeof c?h.lift(c,-.2):c),y=this._calculateControlPoints(e),g={zlevel:o.zlevel,z:o.z,clickable:this.deepQuery(m,"clickable"),style:{pointList:y,smooth:"spline",brushType:"both",lineJoin:"round",color:c,lineWidth:d.borderWidth,strokeColor:d.borderColor},highlightStyle:{color:u,lineWidth:p.borderWidth,strokeColor:p.borderColor},draggable:"vertical",ondragend:this._ondragend};g=new a(g),this.addLabel(g,o,l,e.name),r.pack(g,n[t],t,n[t].data[i],i,n[t].data[i].name),this.shapeList.push(g)},_calculateControlPoints:function(e){var t=this._intervalX,i=e.y,n=e.evolution,a=n.length;if(!(1>a)){for(var o=[],r=[],s=0;a>s;s++)o.push(n[s].timeScale),r.push(n[s].valueScale);var l=[];l.push([o[0],i]);var s=0;for(s=0;a-1>s;s++)l.push([(o[s]+o[s+1])/2,r[s]/-2+i]);for(l.push([(o[s]+(o[s]+t))/2,r[s]/-2+i]),l.push([o[s]+t,i]),l.push([(o[s]+(o[s]+t))/2,r[s]/2+i]),s=a-1;s>0;s--)l.push([(o[s]+o[s-1])/2,r[s-1]/2+i]);return l}},ondragend:function(e,t){this.isDragend&&e.target&&(t.dragOut=!0,t.dragIn=!0,t.needRefresh=!1,this.isDragend=!1)},refresh:function(e){e&&(this.option=e,this.series=e.series),this.backupShapeList(),this._buildShape()}},l.inherits(t,i),e("../chart").define("eventRiver",t),t}),i("echarts/layout/eventRiver",["require"],function(){function e(e,i,o){function r(e,t){var i=e.importance,n=t.importance;return i>n?-1:n>i?1:0}for(var s=4,l=0;l<e.length;l++){for(var h=0;h<e[l].data.length;h++){null==e[l].data[h].weight&&(e[l].data[h].weight=1);for(var m=0,V=0;V<e[l].data[h].evolution.length;V++)m+=e[l].data[h].evolution[V].valueScale;e[l].data[h].importance=m*e[l].data[h].weight}e[l].data.sort(r)}for(var l=0;l<e.length;l++){null==e[l].weight&&(e[l].weight=1);for(var m=0,h=0;h<e[l].data.length;h++)m+=e[l].data[h].weight;e[l].importance=m*e[l].weight}e.sort(r);for(var U=Number.MAX_VALUE,d=0,l=0;l<e.length;l++)for(var h=0;h<e[l].data.length;h++)for(var V=0;V<e[l].data[h].evolution.length;V++){var p=e[l].data[h].evolution[V].timeScale;U=Math.min(U,p),d=Math.max(d,p)}U=~~U,d=~~d;for(var c=function(){var e=d-U+1+~~i;if(0>=e)return[0];for(var t=[];e--;)t.push(0);return t}(),u=c.slice(0),y=[],g=0,b=0,l=0;l<e.length;l++)for(var h=0;h<e[l].data.length;h++){var f=e[l].data[h];f.time=[],f.value=[];for(var k,x=0,V=0;V<e[l].data[h].evolution.length;V++)k=e[l].data[h].evolution[V],f.time.push(k.timeScale),f.value.push(k.valueScale),x=Math.max(x,k.valueScale);n(f,i,U),f.y=a(u,f,function(e,t){return e.ypx[t]}),f._offset=a(c,f,function(){return s}),g=Math.max(g,f.y+x),b=Math.max(b,f._offset),y.push(f)}t(y,o,g,b)}function t(e,t,i,n){for(var a=t.height,o=n/a>.5?.5:1,r=t.y,s=(t.height-n)/i,l=0,h=e.length;h>l;l++){var m=e[l];m.y=r+s*m.y+m._offset*o,delete m.time,delete m.value,delete m.xpx,delete m.ypx,delete m._offset;for(var V=m.evolution,U=0,d=V.length;d>U;U++)V[U].valueScale*=s}}function i(e,t,i,n){if(e===i)throw new Error("x0 is equal with x1!!!");if(t===n)return function(){return t};var a=(t-n)/(e-i),o=(n*e-t*i)/(e-i);return function(e){return a*e+o}}function n(e,t,n){var a=~~t,o=e.time.length;e.xpx=[],e.ypx=[];for(var r,s=0,l=0,h=0,m=0,V=0;o>s;s++){l=~~e.time[s],m=e.value[s]/2,s===o-1?(h=l+a,V=0):(h=~~e.time[s+1],V=e.value[s+1]/2),r=i(l,m,h,V);for(var U=l;h>U;U++)e.xpx.push(U-n),e.ypx.push(r(U))}e.xpx.push(h-n),e.ypx.push(V)}function a(e,t,i){for(var n,a=0,o=t.xpx.length,r=0;o>r;r++)n=i(t,r),a=Math.max(a,n+e[t.xpx[r]]);for(r=0;o>r;r++)n=i(t,r),e[t.xpx[r]]=a+n;return a}return e}),i("echarts/chart/venn",["require","./base","zrender/shape/Text","zrender/shape/Circle","zrender/shape/Path","../config","../util/ecData","zrender/tool/util","../chart"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o),this.refresh(a)}var i=e("./base"),n=e("zrender/shape/Text"),a=e("zrender/shape/Circle"),o=e("zrender/shape/Path"),r=e("../config");r.venn={zlevel:0,z:1,calculable:!1};var s=e("../util/ecData"),l=e("zrender/tool/util");return t.prototype={type:r.CHART_TYPE_VENN,_buildShape:function(){this.selectedMap={},this._symbol=this.option.symbolList,this._queryTarget,this._dropBoxList=[],this._vennDataCounter=0;for(var e=this.series,t=this.component.legend,i=0;i<e.length;i++)if(e[i].type===r.CHART_TYPE_VENN){e[i]=this.reformOption(e[i]);var n=e[i].name||"";if(this.selectedMap[n]=t?t.isSelected(n):!0,!this.selectedMap[n])continue;this._buildVenn(i)}this.addShapeList()},_buildVenn:function(e){var t,i,n=this.series[e],a=n.data;a[0].value>a[1].value?(t=this.zr.getHeight()/3,i=t*Math.sqrt(a[1].value)/Math.sqrt(a[0].value)):(i=this.zr.getHeight()/3,t=i*Math.sqrt(a[0].value)/Math.sqrt(a[1].value));var o=this.zr.getWidth()/2-t,r=(t+i)/2*Math.sqrt(a[2].value)/Math.sqrt((a[0].value+a[1].value)/2),s=t+i;0!==a[2].value&&(s=this._getCoincideLength(a[0].value,a[1].value,a[2].value,t,i,r,Math.abs(t-i),t+i));var l=o+s,h=this.zr.getHeight()/2;if(this._buildItem(e,0,a[0],o,h,t),this._buildItem(e,1,a[1],l,h,i),0!==a[2].value&&a[2].value!==a[0].value&&a[2].value!==a[1].value){var m=(t*t-i*i)/(2*s)+s/2,V=s/2-(t*t-i*i)/(2*s),U=Math.sqrt(t*t-m*m),d=0,p=0;a[0].value>a[1].value&&o+m>l&&(p=1),a[0].value<a[1].value&&o+V>l&&(d=1),this._buildCoincideItem(e,2,a[2],o+m,h-U,h+U,t,i,d,p)}},_getCoincideLength:function(e,t,i,n,a,o,r,s){var l=(n*n-a*a)/(2*o)+o/2,h=o/2-(n*n-a*a)/(2*o),m=Math.acos(l/n),V=Math.acos(h/a),U=n*n*Math.PI,d=m*n*n-l*n*Math.sin(m)+V*a*a-h*a*Math.sin(V),p=d/U,c=i/e,u=Math.abs(p/c);return u>.999&&1.001>u?o:.999>=u?(s=o,o=(o+r)/2,this._getCoincideLength(e,t,i,n,a,o,r,s)):(r=o,o=(o+s)/2,this._getCoincideLength(e,t,i,n,a,o,r,s))},_buildItem:function(e,t,i,n,a,o){var r=this.series,l=r[e],h=this.getCircle(e,t,i,n,a,o);if(s.pack(h,l,e,i,t,i.name),this.shapeList.push(h),l.itemStyle.normal.label.show){var m=this.getLabel(e,t,i,n,a,o);s.pack(m,l,e,l.data[t],t,l.data[t].name),this.shapeList.push(m)}},_buildCoincideItem:function(e,t,i,n,a,r,l,h,m,V){var U=this.series,d=U[e],p=[i,d],c=this.deepMerge(p,"itemStyle.normal")||{},u=this.deepMerge(p,"itemStyle.emphasis")||{},y=c.color||this.zr.getColor(t),g=u.color||this.zr.getColor(t),b="M"+n+","+a+"A"+l+","+l+",0,"+m+",1,"+n+","+r+"A"+h+","+h+",0,"+V+",1,"+n+","+a,f={color:y,path:b},k={zlevel:d.zlevel,z:d.z,style:f,highlightStyle:{color:g,lineWidth:u.borderWidth,strokeColor:u.borderColor}};k=new o(k),k.buildPathArray&&(k.style.pathArray=k.buildPathArray(f.path)),s.pack(k,U[e],0,i,t,i.name),this.shapeList.push(k)},getCircle:function(e,t,i,n,o,r){var s=this.series[e],l=[i,s],h=this.deepMerge(l,"itemStyle.normal")||{},m=this.deepMerge(l,"itemStyle.emphasis")||{},V=h.color||this.zr.getColor(t),U=m.color||this.zr.getColor(t),d={zlevel:s.zlevel,z:s.z,clickable:!0,style:{x:n,y:o,r:r,brushType:"fill",opacity:1,color:V},highlightStyle:{color:U,lineWidth:m.borderWidth,strokeColor:m.borderColor}};return this.deepQuery([i,s,this.option],"calculable")&&(this.setCalculable(d),d.draggable=!0),new a(d)},getLabel:function(e,t,i,a,o,r){var s=this.series[e],l=s.itemStyle,h=[i,s],m=this.deepMerge(h,"itemStyle.normal")||{},V="normal",U=l[V].label,d=U.textStyle||{},p=this.getLabelText(t,i,V),c=this.getFont(d),u=m.color||this.zr.getColor(t),y=d.fontSize||12,g={zlevel:s.zlevel,z:s.z,style:{x:a,y:o-r-y,color:d.color||u,text:p,textFont:c,textAlign:"center"}};return new n(g)},getLabelText:function(e,t,i){var n=this.series,a=n[0],o=this.deepQuery([t,a],"itemStyle."+i+".label.formatter");return o?"function"==typeof o?o(a.name,t.name,t.value):"string"==typeof o?(o=o.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}"),o=o.replace("{a0}",a.name).replace("{b0}",t.name).replace("{c0}",t.value)):void 0:t.name},refresh:function(e){e&&(this.option=e,this.series=e.series),this._buildShape()}},l.inherits(t,i),e("../chart").define("venn",t),t}),i("echarts/chart/treemap",["require","./base","zrender/tool/area","zrender/shape/Rectangle","zrender/shape/Text","zrender/shape/Line","../layout/TreeMap","../data/Tree","../config","../util/ecData","zrender/config","zrender/tool/event","zrender/tool/util","zrender/tool/color","../chart"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o),this.refresh(a);var r=this;r._onclick=function(e){return r.__onclick(e)},r.zr.on(V.EVENT.CLICK,r._onclick)}var i=e("./base"),n=e("zrender/tool/area"),a=e("zrender/shape/Rectangle"),o=e("zrender/shape/Text"),r=e("zrender/shape/Line"),s=e("../layout/TreeMap"),l=e("../data/Tree"),h=e("../config");h.treemap={zlevel:0,z:1,calculable:!1,clickable:!0,center:["50%","50%"],size:["80%","80%"],root:"",itemStyle:{normal:{label:{
+show:!0,x:5,y:12,textStyle:{align:"left",color:"#000",fontFamily:"Arial",fontSize:13,fontStyle:"normal",fontWeight:"normal"}},breadcrumb:{show:!0,textStyle:{}},borderWidth:1,borderColor:"#ccc",childBorderWidth:1,childBorderColor:"#ccc"},emphasis:{}}};var m=e("../util/ecData"),V=e("zrender/config"),U=(e("zrender/tool/event"),e("zrender/tool/util")),d=e("zrender/tool/color");return t.prototype={type:h.CHART_TYPE_TREEMAP,refresh:function(e){this.clear(),e&&(this.option=e,this.series=this.option.series),this._treesMap={};for(var t=this.series,i=this.component.legend,n=0;n<t.length;n++)if(t[n].type===h.CHART_TYPE_TREEMAP){t[n]=this.reformOption(t[n]);var a=t[n].name||"";if(this.selectedMap[a]=i?i.isSelected(a):!0,!this.selectedMap[a])continue;this._buildSeries(t[n],n)}},_buildSeries:function(e,t){var i=l.fromOptionData(e.name,e.data);this._treesMap[t]=i;var n=e.root&&i.getNodeById(e.root)||i.root;this._buildTreemap(n,t)},_buildTreemap:function(e,t){for(var i=this.shapeList,n=0;n<i.length;){var a=i[n];m.get(a,"seriesIndex")===t?(this.zr.delShape(i[n]),i.splice(n,1)):n++}for(var o=i.length,r=this.series[t],l=r.itemStyle,h=this.parsePercent(r.size[0],this.zr.getWidth())||400,V=this.parsePercent(r.size[1],this.zr.getHeight())||500,U=this.parseCenter(this.zr,r.center),d=U[0]-.5*h,p=U[1]-.5*V,c=h*V,u=0,y=[],g=e.children,n=0;n<g.length;n++)u+=g[n].data.value;for(var b=0;b<g.length;b++)y.push(g[b].data.value*c/u);for(var f=new s({x:d,y:p,width:h,height:V}),k=f.run(y),x=0;x<k.length;x++){var _=g[x].data,L=k[x],W=[_.itemStyle,l],X=this.deepMerge(W);X.normal.color||(X.normal.color=this.zr.getColor(x)),X.emphasis.color||(X.emphasis.color=X.normal.color),this._buildItem(_,X,L,t,x),_.children&&this._buildChildrenTreemap(_.children,X,L,t)}this.query(r,"itemStyle.normal.breadcrumb.show")&&this._buildBreadcrumb(e,t,d,p+V);for(var n=o;n<i.length;n++)this.zr.addShape(i[n])},_buildItem:function(e,t,i,n,a){var o=this.series,r=this.getRectangle(e,t,i);m.pack(r,o[n],n,e,a,e.name),this.shapeList.push(r)},getRectangle:function(e,t,i){var n=t.emphasis,o=t.normal,r=this.getLabel(t,i,e.name,e.value),s=this.option.hoverable,l={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:s,clickable:!0,style:U.merge({x:i.x,y:i.y,width:i.width,height:i.height,brushType:"both",color:o.color,lineWidth:o.borderWidth,strokeColor:o.borderColor},r.style,!0),highlightStyle:U.merge({color:n.color,lineWidth:n.borderWidth,strokeColor:n.borderColor},r.highlightStyle,!0)};return new a(l)},getLabel:function(e,t,i,a){var o=e.normal.label.textStyle,r=[e.emphasis.label.textStyle,o],s=this.deepMerge(r),l=e.normal.label.formatter,h=this.getLabelText(i,a,l),m=this.getFont(o),V=n.getTextWidth(h,m),U=n.getTextHeight(h,m),d=this.deepQuery([e.emphasis,e.normal],"label.formatter"),p=this.getLabelText(i,a,d),c=this.getFont(s),u=n.getTextWidth(h,c),y=n.getTextHeight(h,c);e.normal.label.show?(e.normal.label.x+V>t.width||e.normal.label.y+U>t.height)&&(h=""):h="",e.emphasis.label.show?(s.x+u>t.width||s.y+y>t.height)&&(p=""):p="";var g={style:{textX:t.x+e.normal.label.x,textY:t.y+e.normal.label.y,text:h,textPosition:"specific",textColor:o.color,textFont:m},highlightStyle:{textX:t.x+e.emphasis.label.x,textY:t.y+e.emphasis.label.y,text:p,textColor:s.color,textPosition:"specific"}};return g},getLabelText:function(e,t,i){return i?"function"==typeof i?i.call(this.myChart,e,t):"string"==typeof i?(i=i.replace("{b}","{b0}").replace("{c}","{c0}"),i=i.replace("{b0}",e).replace("{c0}",t)):void 0:e},_buildChildrenTreemap:function(e,t,i,n){for(var a=i.width*i.height,o=0,r=[],l=0;l<e.length;l++)o+=e[l].value;for(var h=0;h<e.length;h++)r.push(e[h].value*a/o);for(var V=new s({x:i.x,y:i.y,width:i.width,height:i.height}),U=V.run(r),d=t.normal.childBorderWidth,p=t.normal.childBorderColor,c=0;c<U.length;c++){var u=U[c],y=[];i.y.toFixed(2)!==u.y.toFixed(2)&&y.push(this._getLine(u.x,u.y,u.x+u.width,u.y,d,p)),i.x.toFixed(2)!==u.x.toFixed(2)&&y.push(this._getLine(u.x,u.y,u.x,u.y+u.height,d,p)),(i.y+i.height).toFixed(2)!==(u.y+u.height).toFixed(2)&&y.push(this._getLine(u.x,u.y+u.height,u.x+u.width,u.y+u.height,d,p)),(i.x+i.width).toFixed(2)!==(u.x+u.width).toFixed(2)&&y.push(this._getLine(u.x+u.width,u.y,u.x+u.width,u.y+u.height,d,p));for(var g=0;g<y.length;g++)m.set(y[g],"seriesIndex",n),this.shapeList.push(y[g])}},_getLine:function(e,t,i,n,a,o){var s={zlevel:this.getZlevelBase(),z:this.getZBase(),hoverable:!1,style:{xStart:e,yStart:t,xEnd:i,yEnd:n,lineWidth:a,strokeColor:o}};return new r(s)},_buildBreadcrumb:function(e,t,i,n){for(var a=[],r=e;r;)a.unshift(r.data.name),r=r.parent;for(var s=this.series[t],l=this.query(s,"itemStyle.normal.breadcrumb.textStyle")||{},h=this.query(s,"itemStyle.emphasis.breadcrumb.textStyle")||{},V={y:n+10,textBaseline:"top",textAlign:"left",color:l.color,textFont:this.getFont(l)},p={brushType:"fill",color:h.color||d.lift(l.color,-.3),textFont:this.getFont(h)},c=0;c<a.length;c++){var u=new o({zlevel:this.getZlevelBase(),z:this.getZBase(),style:U.merge({x:i,text:a[c]+(a.length-1-c?" > ":"")},V),clickable:!0,highlightStyle:p});m.set(u,"seriesIndex",t),m.set(u,"name",a[c]),i+=u.getRect(u.style).width,this.shapeList.push(u)}},__onclick:function(e){var t=e.target;if(t){var i=m.get(t,"seriesIndex"),n=m.get(t,"name"),a=this._treesMap[i],o=a.getNodeById(n);o&&o.children.length&&this._buildTreemap(o,i)}}},U.inherits(t,i),e("../chart").define("treemap",t),t}),i("echarts/layout/TreeMap",["require"],function(){function e(e){({x:e.x,y:e.y,width:e.width,height:e.height});this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height}return e.prototype.run=function(e){var t=[];return this._squarify(e,{x:this.x,y:this.y,width:this.width,height:this.height},t),t},e.prototype._squarify=function(e,t,i){var n="VERTICAL",a=t.width,o=t.height;t.width<t.height&&(n="HORIZONTAL",a=t.height,o=t.width);for(var r=this._getShapeListInAbstractRow(e,a,o),s=0;s<r.length;s++){r[s].x=0,r[s].y=0;for(var l=0;s>l;l++)r[s].y+=r[l].height}var h={};if("VERTICAL"==n){for(var m=0;m<r.length;m++)i.push({x:r[m].x+t.x,y:r[m].y+t.y,width:r[m].width,height:r[m].height});h={x:r[0].width+t.x,y:t.y,width:t.width-r[0].width,height:t.height}}else{for(var V=0;V<r.length;V++)i.push({x:r[V].y+t.x,y:r[V].x+t.y,width:r[V].height,height:r[V].width});h={x:t.x,y:t.y+r[0].width,width:t.width,height:t.height-r[0].width}}var U=e.slice(r.length);0!==U.length&&this._squarify(U,h,i)},e.prototype._getShapeListInAbstractRow=function(e,t,i){if(1===e.length)return[{width:t,height:i}];for(var n=1;n<e.length;n++){var a=this._placeFixedNumberRectangles(e.slice(0,n),t,i),o=this._placeFixedNumberRectangles(e.slice(0,n+1),t,i);if(this._isFirstBetter(a,o))return a}},e.prototype._placeFixedNumberRectangles=function(e,t,i){for(var n=e.length,a=[],o=0,r=0;r<e.length;r++)o+=e[r];for(var s=o/i,l=0;n>l;l++){var h=i*e[l]/o;a.push({width:s,height:h})}return a},e.prototype._isFirstBetter=function(e,t){var i=e[0].height/e[0].width;i=i>1?1/i:i;var n=t[0].height/t[0].width;return n=n>1?1/n:n,Math.abs(i-1)<=Math.abs(n-1)?!0:!1},e}),i("echarts/data/Tree",["require","zrender/tool/util"],function(e){function t(e,t){this.id=e,this.depth=0,this.height=0,this.children=[],this.parent=null,this.data=t||null}function i(e){this.root=new t(e)}var n=e("zrender/tool/util");return t.prototype.add=function(e){var t=this.children;e.parent!==this&&(t.push(e),e.parent=this)},t.prototype.remove=function(e){var t=this.children,i=n.indexOf(t,e);i>=0&&(t.splice(i,1),e.parent=null)},t.prototype.traverse=function(e,t){e.call(t,this);for(var i=0;i<this.children.length;i++)this.children[i].traverse(e,t)},t.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var i=0;i<this.children.length;i++){var n=this.children[i];n.updateDepthAndHeight(e+1),n.height>t&&(t=n.height)}this.height=t+1},t.prototype.getNodeById=function(e){if(this.id===e)return this;for(var t=0;t<this.children.length;t++){var i=this.children[t].getNodeById(e);if(i)return i}},i.prototype.traverse=function(e,t){this.root.traverse(e,t)},i.prototype.getSubTree=function(e){var t=this.getNodeById(e);if(t){var n=new i(t.id);return n.root=t,n}},i.prototype.getNodeById=function(e){return this.root.getNodeById(e)},i.fromOptionData=function(e,n){function a(e,i){var n=new t(e.name,e);i.add(n);var o=e.children;if(o)for(var r=0;r<o.length;r++)a(o[r],n)}var o=new i(e),r=o.root;r.data={name:e,children:n};for(var s=0;s<n.length;s++)a(n[s],r);return o.root.updateDepthAndHeight(0),o},i.fromGraph=function(e){function n(t){for(var i=e.getNodeById(t.id),a=0;a<i.outEdges.length;a++){var r=i.outEdges[a],s=o[r.node2.id];t.children.push(s),n(s)}}for(var a={},o={},r=0;r<e.nodes.length;r++){var s,l=e.nodes[r];0===l.inDegree()?(a[l.id]=new i(l.id),s=a[l.id].root):s=new t(l.id),s.data=l.data,o[l.id]=s}var h=[];for(var m in a)n(a[m].root),a[m].root.updateDepthAndHeight(0),h.push(a[m]);return h},i}),i("echarts/chart/tree",["require","./base","../util/shape/Icon","zrender/shape/Image","zrender/shape/Line","zrender/shape/BezierCurve","../layout/Tree","../data/Tree","../config","../util/ecData","zrender/config","zrender/tool/event","zrender/tool/util","../chart"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o),this.refresh(a)}var i=e("./base"),n=.618,a=e("../util/shape/Icon"),o=e("zrender/shape/Image"),r=e("zrender/shape/Line"),s=e("zrender/shape/BezierCurve"),l=e("../layout/Tree"),h=e("../data/Tree"),m=e("../config");m.tree={zlevel:1,z:2,calculable:!1,clickable:!0,rootLocation:{},orient:"vertical",symbol:"circle",symbolSize:20,nodePadding:30,layerPadding:100,itemStyle:{normal:{label:{show:!0},lineStyle:{width:1,color:"#777",type:"curve"}},emphasis:{}}};var V=e("../util/ecData"),U=(e("zrender/config"),e("zrender/tool/event"),e("zrender/tool/util"));return t.prototype={type:m.CHART_TYPE_TREE,_buildShape:function(e,t){var i=e.data[0];this.tree=h.fromOptionData(i.name,i.children),this.tree.root.data=i,this._setTreeShape(e),this.tree.traverse(function(i){this._buildItem(i,e,t),i.children.length>0&&this._buildLink(i,e)},this);var n=e.roam===!0||"move"===e.roam,a=e.roam===!0||"scale"===e.roam;this.zr.modLayer(this.getZlevelBase(),{panable:n,zoomable:a}),(this.query("markPoint.effect.show")||this.query("markLine.effect.show"))&&this.zr.modLayer(m.EFFECT_ZLEVEL,{panable:n,zoomable:a}),this.addShapeList()},_buildItem:function(e,t,i){var n=[e.data,t],r=this.deepQuery(n,"symbol"),s=this.deepMerge(n,"itemStyle.normal")||{},l=this.deepMerge(n,"itemStyle.emphasis")||{},h=s.color||this.zr.getColor(),m=l.color||this.zr.getColor(),U=-e.layout.angle||0;e.id===this.tree.root.id&&(U=0);var d="right";Math.abs(U)>=Math.PI/2&&Math.abs(U)<3*Math.PI/2&&(U+=Math.PI,d="left");var p=[U,e.layout.position[0],e.layout.position[1]],c=new a({zlevel:this.getZlevelBase(),z:this.getZBase()+1,rotation:p,clickable:this.deepQuery(n,"clickable"),style:{x:e.layout.position[0]-.5*e.layout.width,y:e.layout.position[1]-.5*e.layout.height,width:e.layout.width,height:e.layout.height,iconType:r,color:h,brushType:"both",lineWidth:s.borderWidth,strokeColor:s.borderColor},highlightStyle:{color:m,lineWidth:l.borderWidth,strokeColor:l.borderColor}});c.style.iconType.match("image")&&(c.style.image=c.style.iconType.replace(new RegExp("^image:\\/\\/"),""),c=new o({rotation:p,style:c.style,highlightStyle:c.highlightStyle,clickable:c.clickable,zlevel:this.getZlevelBase(),z:this.getZBase()})),this.deepQuery(n,"itemStyle.normal.label.show")&&(c.style.text=null==e.data.label?e.id:e.data.label,c.style.textPosition=this.deepQuery(n,"itemStyle.normal.label.position"),"radial"===t.orient&&"inside"!==c.style.textPosition&&(c.style.textPosition=d),c.style.textColor=this.deepQuery(n,"itemStyle.normal.label.textStyle.color"),c.style.textFont=this.getFont(this.deepQuery(n,"itemStyle.normal.label.textStyle")||{})),this.deepQuery(n,"itemStyle.emphasis.label.show")&&(c.highlightStyle.textPosition=this.deepQuery(n,"itemStyle.emphasis.label.position"),c.highlightStyle.textColor=this.deepQuery(n,"itemStyle.emphasis.label.textStyle.color"),c.highlightStyle.textFont=this.getFont(this.deepQuery(n,"itemStyle.emphasis.label.textStyle")||{})),V.pack(c,t,i,e.data,0,e.id),this.shapeList.push(c)},_buildLink:function(e,t){var i=t.itemStyle.normal.lineStyle;if("broken"===i.type)return void this._buildBrokenLine(e,i,t);for(var n=0;n<e.children.length;n++){var a=e.layout.position[0],o=e.layout.position[1],r=e.children[n].layout.position[0],s=e.children[n].layout.position[1];switch(i.type){case"curve":this._buildBezierCurve(e,e.children[n],i,t);break;case"broken":break;default:var l=this._getLine(a,o,r,s,i);this.shapeList.push(l)}}},_buildBrokenLine:function(e,t,i){var a=U.clone(t);a.type="solid";var o=[],r=e.layout.position[0],s=e.layout.position[1],l=i.orient,h=e.children[0].layout.position[1],m=r,V=s+(h-s)*(1-n),d=e.children[0].layout.position[0],p=V,c=e.children[e.children.length-1].layout.position[0],u=V;if("horizontal"===l){var y=e.children[0].layout.position[0];m=r+(y-r)*(1-n),V=s,d=m,p=e.children[0].layout.position[1],c=m,u=e.children[e.children.length-1].layout.position[1]}o.push(this._getLine(r,s,m,V,a)),o.push(this._getLine(d,p,c,u,a));for(var g=0;g<e.children.length;g++)y=e.children[g].layout.position[0],h=e.children[g].layout.position[1],"horizontal"===l?p=h:d=y,o.push(this._getLine(d,p,y,h,a));this.shapeList=this.shapeList.concat(o)},_getLine:function(e,t,i,n,a){return e===i&&(e=i=this.subPixelOptimize(e,a.width)),t===n&&(t=n=this.subPixelOptimize(t,a.width)),new r({zlevel:this.getZlevelBase(),hoverable:!1,style:U.merge({xStart:e,yStart:t,xEnd:i,yEnd:n,lineType:a.type,strokeColor:a.color,lineWidth:a.width},a,!0)})},_buildBezierCurve:function(e,t,i,a){var o=n,r=a.orient,l=e.layout.position[0],h=e.layout.position[1],m=t.layout.position[0],V=t.layout.position[1],d=l,p=(V-h)*o+h,c=m,u=(V-h)*(1-o)+h;if("horizontal"===r)d=(m-l)*o+l,p=h,c=(m-l)*(1-o)+l,u=V;else if("radial"===r)if(e.id===this.tree.root.id)d=(m-l)*o+l,p=(V-h)*o+h,c=(m-l)*(1-o)+l,u=(V-h)*(1-o)+h;else{var y=e.layout.originPosition[0],g=e.layout.originPosition[1],b=t.layout.originPosition[0],f=t.layout.originPosition[1],k=this.tree.root.layout.position[0],x=this.tree.root.layout.position[1];d=y,p=(f-g)*o+g,c=b,u=(f-g)*(1-o)+g;var _=(d-this.minX)/this.width*Math.PI*2;d=p*Math.cos(_)+k,p=p*Math.sin(_)+x,_=(c-this.minX)/this.width*Math.PI*2,c=u*Math.cos(_)+k,u=u*Math.sin(_)+x}var L=new s({zlevel:this.getZlevelBase(),hoverable:!1,style:U.merge({xStart:l,yStart:h,cpX1:d,cpY1:p,cpX2:c,cpY2:u,xEnd:m,yEnd:V,strokeColor:i.color,lineWidth:i.width},i,!0)});this.shapeList.push(L)},_setTreeShape:function(e){var t=new l({nodePadding:e.nodePadding,layerPadding:e.layerPadding});this.tree.traverse(function(t){var i=[t.data,e],n=this.deepQuery(i,"symbolSize");"number"==typeof n&&(n=[n,n]),t.layout={width:n[0],height:n[1]}},this),t.run(this.tree);var i=e.orient,n=e.rootLocation.x,a=e.rootLocation.y,o=this.zr.getWidth(),r=this.zr.getHeight();n="center"===n?.5*o:this.parsePercent(n,o),a="center"===a?.5*r:this.parsePercent(a,r),a=this.parsePercent(a,r),"horizontal"===i&&(n=isNaN(n)?10:n,a=isNaN(a)?.5*r:a),"radial"===i?(n=isNaN(n)?.5*o:n,a=isNaN(a)?.5*r:a):(n=isNaN(n)?.5*o:n,a=isNaN(a)?10:a);var s=this.tree.root.layout.position[0];if("radial"===i){var h=1/0,m=0,V=0;this.tree.traverse(function(e){m=Math.max(m,e.layout.position[0]),h=Math.min(h,e.layout.position[0]),V=Math.max(V,e.layout.width)}),this.width=m-h+2*V,this.minX=h}this.tree.traverse(function(t){var o,r;if("vertical"===i&&"inverse"===e.direction)o=t.layout.position[0]-s+n,r=a-t.layout.position[1];else if("vertical"===i)o=t.layout.position[0]-s+n,r=t.layout.position[1]+a;else if("horizontal"===i&&"inverse"===e.direction)r=t.layout.position[0]-s+a,o=n-t.layout.position[1];else if("horizontal"===i)r=t.layout.position[0]-s+a,o=t.layout.position[1]+n;else{o=t.layout.position[0],r=t.layout.position[1],t.layout.originPosition=[o,r];var l=r,m=(o-h)/this.width*Math.PI*2;o=l*Math.cos(m)+n,r=l*Math.sin(m)+a,t.layout.angle=m}t.layout.position[0]=o,t.layout.position[1]=r},this)},refresh:function(e){this.clear(),e&&(this.option=e,this.series=this.option.series);for(var t=this.series,i=this.component.legend,n=0;n<t.length;n++)if(t[n].type===m.CHART_TYPE_TREE){t[n]=this.reformOption(t[n]);var a=t[n].name||"";if(this.selectedMap[a]=i?i.isSelected(a):!0,!this.selectedMap[a])continue;this._buildSeries(t[n],n)}},_buildSeries:function(e,t){this._buildShape(e,t)}},U.inherits(t,i),e("../chart").define("tree",t),t}),i("echarts/layout/Tree",["require","zrender/tool/vector"],function(e){function t(e){e=e||{},this.nodePadding=e.nodePadding||30,this.layerPadding=e.layerPadding||100,this._layerOffsets=[],this._layers=[]}var i=e("zrender/tool/vector");return t.prototype.run=function(e){this._layerOffsets.length=0;for(var t=0;t<e.root.height+1;t++)this._layerOffsets[t]=0,this._layers[t]=[];this._updateNodeXPosition(e.root);var i=e.root;this._updateNodeYPosition(i,0,i.layout.height)},t.prototype._updateNodeXPosition=function(e){var t=1/0,n=-(1/0);e.layout.position=e.layout.position||i.create();for(var a=0;a<e.children.length;a++){var o=e.children[a];this._updateNodeXPosition(o);var r=o.layout.position[0];t>r&&(t=r),r>n&&(n=r)}e.layout.position[0]=e.children.length>0?(t+n)/2:0;var s=this._layerOffsets[e.depth]||0;if(s>e.layout.position[0]){var l=s-e.layout.position[0];this._shiftSubtree(e,l);for(var a=e.depth+1;a<e.height+e.depth;a++)this._layerOffsets[a]+=l}this._layerOffsets[e.depth]=e.layout.position[0]+e.layout.width+this.nodePadding,this._layers[e.depth].push(e)},t.prototype._shiftSubtree=function(e,t){e.layout.position[0]+=t;for(var i=0;i<e.children.length;i++)this._shiftSubtree(e.children[i],t)},t.prototype._updateNodeYPosition=function(e,t,i){e.layout.position[1]=t;for(var n=0,a=0;a<e.children.length;a++)n=Math.max(e.children[a].layout.height,n);var o=this.layerPadding;"function"==typeof o&&(o=o(e.depth));for(var a=0;a<e.children.length;a++)this._updateNodeYPosition(e.children[a],t+o+i,n)},t}),i("echarts/chart/wordCloud",["require","./base","zrender/shape/Text","../layout/WordCloud","../component/grid","../component/dataRange","../config","../util/ecData","zrender/tool/util","zrender/tool/color","../chart"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o),this.refresh(a)}var i=e("./base"),n=e("zrender/shape/Text"),a=e("../layout/WordCloud");e("../component/grid"),e("../component/dataRange");var o=e("../config"),r=e("../util/ecData"),s=e("zrender/tool/util"),l=e("zrender/tool/color");return o.wordCloud={zlevel:0,z:2,clickable:!0,center:["50%","50%"],size:["40%","40%"],textRotation:[0,90],textPadding:0,autoSize:{enable:!0,minSize:12},itemStyle:{normal:{textStyle:{fontSize:function(e){return e.value}}}}},t.prototype={type:o.CHART_TYPE_WORDCLOUD,refresh:function(e){e&&(this.option=e,this.series=e.series),this._init()},_init:function(){var e=this.series;this.backupShapeList();for(var t=this.component.legend,i=0;i<e.length;i++)if(e[i].type===o.CHART_TYPE_WORDCLOUD){e[i]=this.reformOption(e[i]);var n=e[i].name||"";if(this.selectedMap[n]=t?t.isSelected(n):!0,!this.selectedMap[n])continue;this.buildMark(i),this._initSerie(e[i])}},_initSerie:function(e){var t=e.itemStyle.normal.textStyle,i=[this.parsePercent(e.size[0],this.zr.getWidth())||200,this.parsePercent(e.size[1],this.zr.getHeight())||200],n=this.parseCenter(this.zr,e.center),o={size:i,wordletype:{autoSizeCal:e.autoSize},center:n,rotate:e.textRotation,padding:e.textPadding,font:t.fontFamily,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,text:function(e){return e.name},data:e.data},r=new a(o),s=this;r.end(function(e){s._buildShapes(e)}),r.start()},_buildShapes:function(e){for(var t=e.length,i=0;t>i;i++)this._buildTextShape(e[i],0,i);this.addShapeList()},_buildTextShape:function(e,t,i){var a=this.series,o=a[t],s=o.name||"",h=o.data[i],m=[h,o],V=this.component.legend,U=V?V.getColor(s):this.zr.getColor(t),d=this.deepMerge(m,"itemStyle.normal")||{},p=this.deepMerge(m,"itemStyle.emphasis")||{},c=this.getItemStyleColor(d.color,t,i,h)||U,u=this.getItemStyleColor(p.color,t,i,h)||("string"==typeof c?l.lift(c,-.2):c),y=new n({zlevel:o.zlevel,z:o.z,hoverable:!0,clickable:this.deepQuery(m,"clickable"),style:{x:0,y:0,text:e.text,color:c,textFont:[e.style,e.weight,e.size+"px",e.font].join(" "),textBaseline:"alphabetic",textAlign:"center"},highlightStyle:{brushType:p.borderWidth?"both":"fill",color:u,lineWidth:p.borderWidth||0,strokeColor:p.borderColor},position:[e.x,e.y],rotation:[-e.rotate/180*Math.PI,0,0]});r.pack(y,o,t,h,i,h.name),this.shapeList.push(y)}},s.inherits(t,i),e("../chart").define("wordCloud",t),t}),i("echarts/layout/WordCloud",["require","../layout/WordCloudRectZero","zrender/tool/util"],function(e){function t(e){this._init(e)}var i=e("../layout/WordCloudRectZero"),n=e("zrender/tool/util");return t.prototype={start:function(){function e(){p.totalArea=r,U.autoSizeCal.enable&&p._autoCalTextSize(m,r,a,o,U.autoSizeCal.minSize),V.timer&&clearInterval(V.timer),V.timer=setInterval(t,0),t()}function t(){for(var e,t=+new Date,i=m.length;+new Date-t<V.timeInterval&&++s<i&&V.timer;)e=m[s],e.x=d[0]>>1,e.y=d[1]>>1,p._cloudSprite(e,m,s),e.hasText&&p._place(n,e,h)&&(l.push(e),e.x-=d[0]>>1,e.y-=d[1]>>1);s>=i&&(p.stop(),p._fixTagPosition(l),V.endcallback(l))}var n=null,a=0,o=0,r=0,s=-1,l=[],h=null,m=this.wordsdata,V=this.defaultOption,U=V.wordletype,d=V.size,p=this,c=new i({type:U.type,width:d[0],height:d[1]});return c.calculate(function(t){n=t.initarr,a=t.maxWit,o=t.maxHit,r=t.area,h=t.imgboard,e()},this),this},_fixTagPosition:function(e){for(var t=this.defaultOption.center,i=0,n=e.length;n>i;i++)e[i].x+=t[0],e[i].y+=t[1]},stop:function(){return this.defaultOption.timer&&(clearInterval(this.defaultOption.timer),this.defaultOption.timer=null),this},end:function(e){return e&&(this.defaultOption.endcallback=e),this},_init:function(e){this.defaultOption={},this._initProperty(e),this._initMethod(e),this._initCanvas(),this._initData(e.data)},_initData:function(e){var t=this,i=t.defaultOption;this.wordsdata=e.map(function(e,n){return e.text=i.text.call(t,e,n),e.font=i.font.call(t,e,n),e.style=i.fontStyle.call(t,e,n),e.weight=i.fontWeight.call(t,e,n),e.rotate=i.rotate.call(t,e,n),e.size=~~i.fontSize.call(t,e,n),e.padding=i.padding.call(t,e,n),e}).sort(function(e,t){return t.value-e.value})},_initMethod:function(e){function t(e){return e.name}function i(){return"sans-serif"}function n(){return"normal"}function a(e){return e.value}function o(){return 0}function r(e){return function(){return e[Math.round(Math.random()*(e.length-1))]}}function s(){return 0}function l(e){var t=e[0]/e[1];return function(e){return[t*(e*=.1)*Math.cos(e),e*Math.sin(e)]}}function h(e){var t=4,i=t*e[0]/e[1],n=0,a=0;return function(e){var o=0>e?-1:1;switch(Math.sqrt(1+4*o*e)-o&3){case 0:n+=i;break;case 1:a+=t;break;case 2:n-=i;break;default:a-=t}return[n,a]}}function m(e){return"function"==typeof e?e:function(){return e}}var V=this.defaultOption;V.text=e.text?m(e.text):t,V.font=e.font?m(e.font):i,V.fontSize=e.fontSize?m(e.fontSize):a,V.fontStyle=e.fontStyle?m(e.fontStyle):n,V.fontWeight=e.fontWeight?m(e.fontWeight):n,V.rotate=e.rotate?r(e.rotate):o,V.padding=e.padding?m(e.padding):s,V.center=e.center,V.spiral=l,V.endcallback=function(){},V.rectangularSpiral=h,V.archimedeanSpiral=l},_initProperty:function(e){var t=this.defaultOption;t.size=e.size||[256,256],t.wordletype=e.wordletype,t.words=e.words||[],t.timeInterval=1/0,t.timer=null,t.spirals={archimedean:t.archimedeanSpiral,rectangular:t.rectangularSpiral},n.merge(t,{size:[256,256],wordletype:{type:"RECT",areaPresent:.058,autoSizeCal:{enable:!0,minSize:12}}})},_initCanvas:function(){var e,t=Math.PI/180,i=64,n=2048,a=1;"undefined"!=typeof document?(e=document.createElement("canvas"),e.width=1,e.height=1,a=Math.sqrt(e.getContext("2d").getImageData(0,0,1,1).data.length>>2),e.width=(i<<5)/a,e.height=n/a):e=new Canvas(i<<5,n);var o=e.getContext("2d");o.fillStyle=o.strokeStyle="red",o.textAlign="center",this.defaultOption.c=o,this.defaultOption.cw=i,this.defaultOption.ch=n,this.defaultOption.ratio=a,this.defaultOption.cloudRadians=t},_cloudSprite:function(e,t,i){if(!e.sprite){var n=this.defaultOption.cw,a=this.defaultOption.ch,o=this.defaultOption.c,r=this.defaultOption.ratio,s=this.defaultOption.cloudRadians;o.clearRect(0,0,(n<<5)/r,a/r);var l=0,h=0,m=0,V=t.length;for(--i;++i<V;){e=t[i],o.save(),o.font=e.style+" "+e.weight+" "+~~((e.size+1)/r)+"px "+e.font;var U=o.measureText(e.text+"m").width*r,d=e.size<<1;if(e.rotate){var p=Math.sin(e.rotate*s),c=Math.cos(e.rotate*s),u=U*c,y=U*p,g=d*c,b=d*p;U=Math.max(Math.abs(u+b),Math.abs(u-b))+31>>5<<5,d=~~Math.max(Math.abs(y+g),Math.abs(y-g))}else U=U+31>>5<<5;if(d>m&&(m=d),l+U>=n<<5&&(l=0,h+=m,m=0),h+d>=a)break;o.translate((l+(U>>1))/r,(h+(d>>1))/r),e.rotate&&o.rotate(e.rotate*s),o.fillText(e.text,0,0),e.padding&&(o.lineWidth=2*e.padding,o.strokeText(e.text,0,0)),o.restore(),e.width=U,e.height=d,e.xoff=l,e.yoff=h,e.x1=U>>1,e.y1=d>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,l+=U}for(var f=o.getImageData(0,0,(n<<5)/r,a/r).data,k=[];--i>=0;)if(e=t[i],e.hasText){for(var U=e.width,x=U>>5,d=e.y1-e.y0,_=0;d*x>_;_++)k[_]=0;if(l=e.xoff,null==l)return;h=e.yoff;for(var L=0,W=-1,X=0;d>X;X++){for(var _=0;U>_;_++){var v=x*X+(_>>5),w=f[(h+X)*(n<<5)+(l+_)<<2]?1<<31-_%32:0;k[v]|=w,L|=w}L?W=X:(e.y0++,d--,X--,h++)}e.y1=e.y0+W,e.sprite=k.slice(0,(e.y1-e.y0)*x)}}},_place:function(e,t,i){function n(e,t,i){i>>=5;for(var n,a=e.sprite,o=e.width>>5,r=e.x-(o<<4),s=127&r,l=32-s,h=e.y1-e.y0,m=(e.y+e.y0)*i+(r>>5),V=0;h>V;V++){n=0;for(var U=0;o>=U;U++)if((n<<l|(o>U?(n=a[V*o+U])>>>s:0))&t[m+U])return!0;m+=i}return!1}function a(e,t){return t.row[e.y]&&t.cloumn[e.x]&&e.x>=t.row[e.y].start&&e.x<=t.row[e.y].end&&e.y>=t.cloumn[e.x].start&&e.y<=t.cloumn[e.x].end}for(var o,r,s,l=this.defaultOption.size,h=([{x:0,y:0},{x:l[0],y:l[1]}],t.x),m=t.y,V=Math.sqrt(l[0]*l[0]+l[1]*l[1]),U=this.defaultOption.spiral(l),d=Math.random()<.5?1:-1,p=-d;(o=U(p+=d))&&(r=~~o[0],s=~~o[1],!(Math.min(r,s)>V));)if(t.x=h+r,t.y=m+s,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>l[0]||t.y+t.y1>l[1])&&!n(t,e,l[0])&&a(t,i)){for(var c,u=t.sprite,y=t.width>>5,g=l[0]>>5,b=t.x-(y<<4),f=127&b,k=32-f,x=t.y1-t.y0,_=(t.y+t.y0)*g+(b>>5),L=0;x>L;L++){c=0;for(var W=0;y>=W;W++)e[_+W]|=c<<k|(y>W?(c=u[L*y+W])>>>f:0);_+=g}return delete t.sprite,!0}return!1},_autoCalTextSize:function(e,t,i,n,a){function o(e){c.clearRect(0,0,(d<<5)/u,p/u),c.save(),c.font=e.style+" "+e.weight+" "+~~((e.size+1)/u)+"px "+e.font;var t=c.measureText(e.text+"m").width*u,r=e.size<<1;t=t+31>>5<<5,c.restore(),e.aw=t,e.ah=r;var s,l,h;if(e.rotate){var m=Math.sin(e.rotate*y),V=Math.cos(e.rotate*y),g=t*V,b=t*m,f=r*V,k=r*m;l=Math.max(Math.abs(g+k),Math.abs(g-k))+31>>5<<5,h=~~Math.max(Math.abs(b+f),Math.abs(b-f))}return e.size<=U||e.rotate&&t*r<=e.area&&i>=l&&n>=h||t*r<=e.area&&i>=t&&n>=r?void(e.area=t*r):(s=e.rotate&&l>i&&h>n?Math.min(i/l,n/h):t>i||r>n?Math.min(i/t,n/r):Math.sqrt(e.area/(e.aw*e.ah)),e.size=~~(s*e.size),e.size<a?void(e.size=a):o(e))}function r(e,t){for(var i=e.length,n=0;i--;)n+=t(e[i]);return n}for(var s,l,h=r(e,function(e){return e.size}),m=e.length,V=.25,U=a,d=this.defaultOption.cw,p=this.defaultOption.ch,c=this.defaultOption.c,u=this.defaultOption.ratio,y=this.defaultOption.cloudRadians;m--;)s=e[m],l=s.size/h,s.areapre=V?V>l?l:V:l,s.area=t*s.areapre,s.totalarea=t,o(s)}},t}),i("echarts/layout/WordCloudRectZero",["require"],function(){function e(e){this.defaultOption={type:"RECT"},this._init(e)}return e.prototype={RECT:"_calculateRect",_init:function(e){this._initOption(e),this._initCanvas()},_initOption:function(e){for(k in e)this.defaultOption[k]=e[k]},_initCanvas:function(){var e=document.createElement("canvas");e.width=1,e.height=1;var t=Math.sqrt(e.getContext("2d").getImageData(0,0,1,1).data.length>>2);if(e.width=this.defaultOption.width,e.height=this.defaultOption.height,e.getContext)var i=e.getContext("2d");this.canvas=e,this.ctx=i,this.ratio=t},calculate:function(e,t){var i=this.defaultOption.type,n=this[i];this[n].call(this,e,t)},_calculateReturn:function(e,t,i){t.call(i,e)},_calculateRect:function(e,t){var i={},n=this.defaultOption.width>>5<<5,a=this.defaultOption.height;i.initarr=this._rectZeroArray(n*a),i.area=n*a,i.maxHit=a,i.maxWit=n,i.imgboard=this._rectBoard(n,a),this._calculateReturn(i,e,t)},_rectBoard:function(e,t){for(var i=[],n=0;t>n;n++)i.push({y:n,start:0,end:e});for(var a=[],n=0;e>n;n++)a.push({x:n,start:0,end:t});return{row:i,cloumn:a}},_rectZeroArray:function(e){for(var t=[],i=e,n=-1;++n<i;)t[n]=0;return t}},e}),i("echarts/chart/heatmap",["require","./base","../layer/heatmap","../config","../util/ecData","zrender/tool/util","zrender/tool/color","zrender/shape/Image","../chart"],function(e){function t(e,t,n,a,o){i.call(this,e,t,n,a,o),this.refresh(a)}var i=e("./base"),n=e("../layer/heatmap"),a=e("../config"),o=(e("../util/ecData"),e("zrender/tool/util")),r=(e("zrender/tool/color"),e("zrender/shape/Image"));return a.heatmap={zlevel:0,z:2,clickable:!0},t.prototype={type:a.CHART_TYPE_HEATMAP,refresh:function(e){this.clear(),e&&(this.option=e,this.series=e.series),this._init()},_init:function(){var e=this.series;this.backupShapeList();for(var t=e.length,i=0;t>i;++i)if(e[i].type===a.CHART_TYPE_HEATMAP){e[i]=this.reformOption(e[i]);var o=new n(e[i]),s=o.getCanvas(e[i].data,this.zr.getWidth(),this.zr.getHeight()),l=new r({position:[0,0],scale:[1,1],hoverable:this.option.hoverable,style:{x:0,y:0,image:s,width:s.width,height:s.height}});this.shapeList.push(l)}this.addShapeList()}},o.inherits(t,i),e("../chart").define("heatmap",t),t});var n=t("zrender");n.tool={color:t("zrender/tool/color"),math:t("zrender/tool/math"),util:t("zrender/tool/util"),vector:t("zrender/tool/vector"),area:t("zrender/tool/area"),event:t("zrender/tool/event")},n.animation={Animation:t("zrender/animation/Animation"),Cip:t("zrender/animation/Clip"),easing:t("zrender/animation/easing")};var a=t("echarts");a.config=t("echarts/config"),a.util={mapData:{params:t("echarts/util/mapData/params")}},t("echarts/chart/line"),t("echarts/chart/bar"),t("echarts/chart/scatter"),t("echarts/chart/k"),t("echarts/chart/pie"),t("echarts/chart/radar"),t("echarts/chart/chord"),t("echarts/chart/force"),t("echarts/chart/map"),t("echarts/chart/gauge"),t("echarts/chart/funnel"),t("echarts/chart/eventRiver"),t("echarts/chart/venn"),t("echarts/chart/treemap"),t("echarts/chart/tree"),t("echarts/chart/wordCloud"),t("echarts/chart/heatmap"),e.echarts=a,e.zrender=n}(window); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/echarts/echarts.js b/common/src/main/webapp/thirdparty/echarts/echarts.js
new file mode 100644
index 0000000..f058414
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/echarts/echarts.js
@@ -0,0 +1,54502 @@
+(function webpackUniversalModuleDefinition(root, factory) {
+ if(typeof exports === 'object' && typeof module === 'object')
+ module.exports = factory();
+ else if(typeof define === 'function' && define.amd)
+ define([], factory);
+ else if(typeof exports === 'object')
+ exports["echarts"] = factory();
+ else
+ root["echarts"] = factory();
+})(this, function() {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId])
+/******/ return installedModules[moduleId].exports;
+
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ exports: {},
+/******/ id: moduleId,
+/******/ loaded: false
+/******/ };
+
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+
+
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Export echarts as CommonJS module
+ */
+ module.exports = __webpack_require__(1);
+
+ // Import all charts and components
+ __webpack_require__(91);
+ __webpack_require__(127);
+ __webpack_require__(132);
+ __webpack_require__(141);
+ __webpack_require__(145);
+
+ __webpack_require__(155);
+ __webpack_require__(177);
+ __webpack_require__(189);
+ __webpack_require__(207);
+ __webpack_require__(211);
+ __webpack_require__(215);
+ __webpack_require__(230);
+ __webpack_require__(236);
+ __webpack_require__(243);
+ __webpack_require__(249);
+ __webpack_require__(253);
+ __webpack_require__(258);
+
+ __webpack_require__(106);
+ __webpack_require__(262);
+ __webpack_require__(268);
+ __webpack_require__(272);
+ __webpack_require__(283);
+ __webpack_require__(216);
+
+ __webpack_require__(285);
+
+ __webpack_require__(286);
+ __webpack_require__(300);
+
+ __webpack_require__(315);
+ __webpack_require__(319);
+
+ __webpack_require__(322);
+ __webpack_require__(331);
+
+ __webpack_require__(345);
+
+
+/***/ },
+/* 1 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /*!
+ * ECharts, a javascript interactive chart library.
+ *
+ * Copyright (c) 2015, Baidu Inc.
+ * All rights reserved.
+ *
+ * LICENSE
+ * https://github.com/ecomfe/echarts/blob/master/LICENSE.txt
+ */
+
+ /**
+ * @module echarts
+ */
+
+
+ var GlobalModel = __webpack_require__(2);
+ var ExtensionAPI = __webpack_require__(24);
+ var CoordinateSystemManager = __webpack_require__(25);
+ var OptionManager = __webpack_require__(26);
+
+ var ComponentModel = __webpack_require__(19);
+ var SeriesModel = __webpack_require__(27);
+
+ var ComponentView = __webpack_require__(28);
+ var ChartView = __webpack_require__(41);
+ var graphic = __webpack_require__(42);
+
+ var zrender = __webpack_require__(77);
+ var zrUtil = __webpack_require__(3);
+ var colorTool = __webpack_require__(38);
+ var env = __webpack_require__(78);
+ var Eventful = __webpack_require__(32);
+
+ var each = zrUtil.each;
+
+ var VISUAL_CODING_STAGES = ['echarts', 'chart', 'component'];
+
+ // TODO Transform first or filter first
+ var PROCESSOR_STAGES = ['transform', 'filter', 'statistic'];
+
+ function createRegisterEventWithLowercaseName(method) {
+ return function (eventName, handler, context) {
+ // Event name is all lowercase
+ eventName = eventName && eventName.toLowerCase();
+ Eventful.prototype[method].call(this, eventName, handler, context);
+ };
+ }
+ /**
+ * @module echarts~MessageCenter
+ */
+ function MessageCenter() {
+ Eventful.call(this);
+ }
+ MessageCenter.prototype.on = createRegisterEventWithLowercaseName('on');
+ MessageCenter.prototype.off = createRegisterEventWithLowercaseName('off');
+ MessageCenter.prototype.one = createRegisterEventWithLowercaseName('one');
+ zrUtil.mixin(MessageCenter, Eventful);
+ /**
+ * @module echarts~ECharts
+ */
+ function ECharts (dom, theme, opts) {
+ opts = opts || {};
+
+ // Get theme by name
+ if (typeof theme === 'string') {
+ theme = themeStorage[theme];
+ }
+
+ if (theme) {
+ each(optionPreprocessorFuncs, function (preProcess) {
+ preProcess(theme);
+ });
+ }
+ /**
+ * @type {string}
+ */
+ this.id;
+ /**
+ * Group id
+ * @type {string}
+ */
+ this.group;
+ /**
+ * @type {HTMLDomElement}
+ * @private
+ */
+ this._dom = dom;
+ /**
+ * @type {module:zrender/ZRender}
+ * @private
+ */
+ this._zr = zrender.init(dom, {
+ renderer: opts.renderer || 'canvas',
+ devicePixelRatio: opts.devicePixelRatio
+ });
+
+ /**
+ * @type {Object}
+ * @private
+ */
+ this._theme = zrUtil.clone(theme);
+
+ /**
+ * @type {Array.<module:echarts/view/Chart>}
+ * @private
+ */
+ this._chartsViews = [];
+
+ /**
+ * @type {Object.<string, module:echarts/view/Chart>}
+ * @private
+ */
+ this._chartsMap = {};
+
+ /**
+ * @type {Array.<module:echarts/view/Component>}
+ * @private
+ */
+ this._componentsViews = [];
+
+ /**
+ * @type {Object.<string, module:echarts/view/Component>}
+ * @private
+ */
+ this._componentsMap = {};
+
+ /**
+ * @type {module:echarts/ExtensionAPI}
+ * @private
+ */
+ this._api = new ExtensionAPI(this);
+
+ /**
+ * @type {module:echarts/CoordinateSystem}
+ * @private
+ */
+ this._coordSysMgr = new CoordinateSystemManager();
+
+ Eventful.call(this);
+
+ /**
+ * @type {module:echarts~MessageCenter}
+ * @private
+ */
+ this._messageCenter = new MessageCenter();
+
+ // Init mouse events
+ this._initEvents();
+
+ // In case some people write `window.onresize = chart.resize`
+ this.resize = zrUtil.bind(this.resize, this);
+ }
+
+ var echartsProto = ECharts.prototype;
+
+ /**
+ * @return {HTMLDomElement}
+ */
+ echartsProto.getDom = function () {
+ return this._dom;
+ };
+
+ /**
+ * @return {module:zrender~ZRender}
+ */
+ echartsProto.getZr = function () {
+ return this._zr;
+ };
+
+ /**
+ * @param {Object} option
+ * @param {boolean} notMerge
+ * @param {boolean} [notRefreshImmediately=false] Useful when setOption frequently.
+ */
+ echartsProto.setOption = function (option, notMerge, notRefreshImmediately) {
+ if (!this._model || notMerge) {
+ this._model = new GlobalModel(
+ null, null, this._theme, new OptionManager(this._api)
+ );
+ }
+
+ this._model.setOption(option, optionPreprocessorFuncs);
+
+ updateMethods.prepareAndUpdate.call(this);
+
+ !notRefreshImmediately && this._zr.refreshImmediately();
+ };
+
+ /**
+ * @DEPRECATED
+ */
+ echartsProto.setTheme = function () {
+ console.log('ECharts#setTheme() is DEPRECATED in ECharts 3.0');
+ };
+
+ /**
+ * @return {module:echarts/model/Global}
+ */
+ echartsProto.getModel = function () {
+ return this._model;
+ };
+
+ /**
+ * @return {Object}
+ */
+ echartsProto.getOption = function () {
+ return this._model.getOption();
+ };
+
+ /**
+ * @return {number}
+ */
+ echartsProto.getWidth = function () {
+ return this._zr.getWidth();
+ };
+
+ /**
+ * @return {number}
+ */
+ echartsProto.getHeight = function () {
+ return this._zr.getHeight();
+ };
+
+ /**
+ * Get canvas which has all thing rendered
+ * @param {Object} opts
+ * @param {string} [opts.backgroundColor]
+ */
+ echartsProto.getRenderedCanvas = function (opts) {
+ if (!env.canvasSupported) {
+ return;
+ }
+ opts = opts || {};
+ opts.pixelRatio = opts.pixelRatio || 1;
+ opts.backgroundColor = opts.backgroundColor
+ || this._model.get('backgroundColor');
+ var zr = this._zr;
+ var list = zr.storage.getDisplayList();
+ // Stop animations
+ zrUtil.each(list, function (el) {
+ el.stopAnimation(true);
+ });
+ return zr.painter.getRenderedCanvas(opts);
+ };
+ /**
+ * @return {string}
+ * @param {Object} opts
+ * @param {string} [opts.type='png']
+ * @param {string} [opts.pixelRatio=1]
+ * @param {string} [opts.backgroundColor]
+ */
+ echartsProto.getDataURL = function (opts) {
+ opts = opts || {};
+ var excludeComponents = opts.excludeComponents;
+ var ecModel = this._model;
+ var excludesComponentViews = [];
+ var self = this;
+
+ each(excludeComponents, function (componentType) {
+ ecModel.eachComponent({
+ mainType: componentType
+ }, function (component) {
+ var view = self._componentsMap[component.__viewId];
+ if (!view.group.ignore) {
+ excludesComponentViews.push(view);
+ view.group.ignore = true;
+ }
+ });
+ });
+
+ var url = this.getRenderedCanvas(opts).toDataURL(
+ 'image/' + (opts && opts.type || 'png')
+ );
+
+ each(excludesComponentViews, function (view) {
+ view.group.ignore = false;
+ });
+ return url;
+ };
+
+
+ /**
+ * @return {string}
+ * @param {Object} opts
+ * @param {string} [opts.type='png']
+ * @param {string} [opts.pixelRatio=1]
+ * @param {string} [opts.backgroundColor]
+ */
+ echartsProto.getConnectedDataURL = function (opts) {
+ if (!env.canvasSupported) {
+ return;
+ }
+ var groupId = this.group;
+ var mathMin = Math.min;
+ var mathMax = Math.max;
+ var MAX_NUMBER = Infinity;
+ if (connectedGroups[groupId]) {
+ var left = MAX_NUMBER;
+ var top = MAX_NUMBER;
+ var right = -MAX_NUMBER;
+ var bottom = -MAX_NUMBER;
+ var canvasList = [];
+ var dpr = (opts && opts.pixelRatio) || 1;
+ for (var id in instances) {
+ var chart = instances[id];
+ if (chart.group === groupId) {
+ var canvas = chart.getRenderedCanvas(
+ zrUtil.clone(opts)
+ );
+ var boundingRect = chart.getDom().getBoundingClientRect();
+ left = mathMin(boundingRect.left, left);
+ top = mathMin(boundingRect.top, top);
+ right = mathMax(boundingRect.right, right);
+ bottom = mathMax(boundingRect.bottom, bottom);
+ canvasList.push({
+ dom: canvas,
+ left: boundingRect.left,
+ top: boundingRect.top
+ });
+ }
+ }
+
+ left *= dpr;
+ top *= dpr;
+ right *= dpr;
+ bottom *= dpr;
+ var width = right - left;
+ var height = bottom - top;
+ var targetCanvas = zrUtil.createCanvas();
+ targetCanvas.width = width;
+ targetCanvas.height = height;
+ var zr = zrender.init(targetCanvas);
+
+ each(canvasList, function (item) {
+ var img = new graphic.Image({
+ style: {
+ x: item.left * dpr - left,
+ y: item.top * dpr - top,
+ image: item.dom
+ }
+ });
+ zr.add(img);
+ });
+ zr.refreshImmediately();
+
+ return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png'));
+ }
+ else {
+ return this.getDataURL(opts);
+ }
+ };
+
+ var updateMethods = {
+
+ /**
+ * @param {Object} payload
+ * @private
+ */
+ update: function (payload) {
+ // console.time && console.time('update');
+
+ var ecModel = this._model;
+ var api = this._api;
+ var coordSysMgr = this._coordSysMgr;
+ // update before setOption
+ if (!ecModel) {
+ return;
+ }
+
+ ecModel.restoreData();
+
+ // TODO
+ // Save total ecModel here for undo/redo (after restoring data and before processing data).
+ // Undo (restoration of total ecModel) can be carried out in 'action' or outside API call.
+
+ // Create new coordinate system each update
+ // In LineView may save the old coordinate system and use it to get the orignal point
+ coordSysMgr.create(this._model, this._api);
+
+ processData.call(this, ecModel, api);
+
+ stackSeriesData.call(this, ecModel);
+
+ coordSysMgr.update(ecModel, api);
+
+ doLayout.call(this, ecModel, payload);
+
+ doVisualCoding.call(this, ecModel, payload);
+
+ doRender.call(this, ecModel, payload);
+
+ // Set background
+ var backgroundColor = ecModel.get('backgroundColor') || 'transparent';
+
+ var painter = this._zr.painter;
+ // TODO all use clearColor ?
+ if (painter.isSingleCanvas && painter.isSingleCanvas()) {
+ this._zr.configLayer(0, {
+ clearColor: backgroundColor
+ });
+ }
+ else {
+ // In IE8
+ if (!env.canvasSupported) {
+ var colorArr = colorTool.parse(backgroundColor);
+ backgroundColor = colorTool.stringify(colorArr, 'rgb');
+ if (colorArr[3] === 0) {
+ backgroundColor = 'transparent';
+ }
+ }
+ backgroundColor = backgroundColor;
+ this._dom.style.backgroundColor = backgroundColor;
+ }
+
+ // console.time && console.timeEnd('update');
+ },
+
+ // PENDING
+ /**
+ * @param {Object} payload
+ * @private
+ */
+ updateView: function (payload) {
+ var ecModel = this._model;
+
+ // update before setOption
+ if (!ecModel) {
+ return;
+ }
+
+ doLayout.call(this, ecModel, payload);
+
+ doVisualCoding.call(this, ecModel, payload);
+
+ invokeUpdateMethod.call(this, 'updateView', ecModel, payload);
+ },
+
+ /**
+ * @param {Object} payload
+ * @private
+ */
+ updateVisual: function (payload) {
+ var ecModel = this._model;
+
+ // update before setOption
+ if (!ecModel) {
+ return;
+ }
+
+ doVisualCoding.call(this, ecModel, payload);
+
+ invokeUpdateMethod.call(this, 'updateVisual', ecModel, payload);
+ },
+
+ /**
+ * @param {Object} payload
+ * @private
+ */
+ updateLayout: function (payload) {
+ var ecModel = this._model;
+
+ // update before setOption
+ if (!ecModel) {
+ return;
+ }
+
+ doLayout.call(this, ecModel, payload);
+
+ invokeUpdateMethod.call(this, 'updateLayout', ecModel, payload);
+ },
+
+ /**
+ * @param {Object} payload
+ * @private
+ */
+ highlight: function (payload) {
+ toggleHighlight.call(this, 'highlight', payload);
+ },
+
+ /**
+ * @param {Object} payload
+ * @private
+ */
+ downplay: function (payload) {
+ toggleHighlight.call(this, 'downplay', payload);
+ },
+
+ /**
+ * @param {Object} payload
+ * @private
+ */
+ prepareAndUpdate: function (payload) {
+ var ecModel = this._model;
+
+ prepareView.call(this, 'component', ecModel);
+
+ prepareView.call(this, 'chart', ecModel);
+
+ updateMethods.update.call(this, payload);
+ }
+ };
+
+ /**
+ * @param {Object} payload
+ * @private
+ */
+ function toggleHighlight(method, payload) {
+ var ecModel = this._model;
+
+ // dispatchAction before setOption
+ if (!ecModel) {
+ return;
+ }
+
+ ecModel.eachComponent(
+ {mainType: 'series', query: payload},
+ function (seriesModel, index) {
+ var chartView = this._chartsMap[seriesModel.__viewId];
+ if (chartView && chartView.__alive) {
+ chartView[method](
+ seriesModel, ecModel, this._api, payload
+ );
+ }
+ },
+ this
+ );
+ }
+
+ /**
+ * Resize the chart
+ */
+ echartsProto.resize = function () {
+ this._zr.resize();
+
+ var optionChanged = this._model && this._model.resetOption('media');
+ updateMethods[optionChanged ? 'prepareAndUpdate' : 'update'].call(this);
+
+ // Resize loading effect
+ this._loadingFX && this._loadingFX.resize();
+ };
+
+ var defaultLoadingEffect = __webpack_require__(87);
+ /**
+ * Show loading effect
+ * @param {string} [name='default']
+ * @param {Object} [cfg]
+ */
+ echartsProto.showLoading = function (name, cfg) {
+ if (zrUtil.isObject(name)) {
+ cfg = name;
+ name = 'default';
+ }
+ this.hideLoading();
+ var el = defaultLoadingEffect(this._api, cfg);
+ var zr = this._zr;
+ this._loadingFX = el;
+
+ zr.add(el);
+ };
+
+ /**
+ * Hide loading effect
+ */
+ echartsProto.hideLoading = function () {
+ this._loadingFX && this._zr.remove(this._loadingFX);
+ this._loadingFX = null;
+ };
+
+ /**
+ * @param {Object} eventObj
+ * @return {Object}
+ */
+ echartsProto.makeActionFromEvent = function (eventObj) {
+ var payload = zrUtil.extend({}, eventObj);
+ payload.type = eventActionMap[eventObj.type];
+ return payload;
+ };
+
+ /**
+ * @pubilc
+ * @param {Object} payload
+ * @param {string} [payload.type] Action type
+ * @param {boolean} [silent=false] Whether trigger event.
+ */
+ echartsProto.dispatchAction = function (payload, silent) {
+ var actionWrap = actions[payload.type];
+ if (actionWrap) {
+ var actionInfo = actionWrap.actionInfo;
+ var updateMethod = actionInfo.update || 'update';
+
+ var payloads = [payload];
+ var batched = false;
+ // Batch action
+ if (payload.batch) {
+ batched = true;
+ payloads = zrUtil.map(payload.batch, function (item) {
+ item = zrUtil.defaults(zrUtil.extend({}, item), payload);
+ item.batch = null;
+ return item;
+ });
+ }
+
+ var eventObjBatch = [];
+ var eventObj;
+ var isHighlightOrDownplay = payload.type === 'highlight' || payload.type === 'downplay';
+ for (var i = 0; i < payloads.length; i++) {
+ var batchItem = payloads[i];
+ // Action can specify the event by return it.
+ eventObj = actionWrap.action(batchItem, this._model);
+ // Emit event outside
+ eventObj = eventObj || zrUtil.extend({}, batchItem);
+ // Convert type to eventType
+ eventObj.type = actionInfo.event || eventObj.type;
+ eventObjBatch.push(eventObj);
+
+ // Highlight and downplay are special.
+ isHighlightOrDownplay && updateMethods[updateMethod].call(this, batchItem);
+ }
+
+ (updateMethod !== 'none' && !isHighlightOrDownplay)
+ && updateMethods[updateMethod].call(this, payload);
+
+ if (!silent) {
+ // Follow the rule of action batch
+ if (batched) {
+ eventObj = {
+ type: actionInfo.event || payload.type,
+ batch: eventObjBatch
+ };
+ }
+ else {
+ eventObj = eventObjBatch[0];
+ }
+ this._messageCenter.trigger(eventObj.type, eventObj);
+ }
+ }
+ };
+
+ /**
+ * Register event
+ * @method
+ */
+ echartsProto.on = createRegisterEventWithLowercaseName('on');
+ echartsProto.off = createRegisterEventWithLowercaseName('off');
+ echartsProto.one = createRegisterEventWithLowercaseName('one');
+
+ /**
+ * @param {string} methodName
+ * @private
+ */
+ function invokeUpdateMethod(methodName, ecModel, payload) {
+ var api = this._api;
+
+ // Update all components
+ each(this._componentsViews, function (component) {
+ var componentModel = component.__model;
+ component[methodName](componentModel, ecModel, api, payload);
+
+ updateZ(componentModel, component);
+ }, this);
+
+ // Upate all charts
+ ecModel.eachSeries(function (seriesModel, idx) {
+ var chart = this._chartsMap[seriesModel.__viewId];
+ chart[methodName](seriesModel, ecModel, api, payload);
+
+ updateZ(seriesModel, chart);
+ }, this);
+
+ }
+
+ /**
+ * Prepare view instances of charts and components
+ * @param {module:echarts/model/Global} ecModel
+ * @private
+ */
+ function prepareView(type, ecModel) {
+ var isComponent = type === 'component';
+ var viewList = isComponent ? this._componentsViews : this._chartsViews;
+ var viewMap = isComponent ? this._componentsMap : this._chartsMap;
+ var zr = this._zr;
+
+ for (var i = 0; i < viewList.length; i++) {
+ viewList[i].__alive = false;
+ }
+
+ ecModel[isComponent ? 'eachComponent' : 'eachSeries'](function (componentType, model) {
+ if (isComponent) {
+ if (componentType === 'series') {
+ return;
+ }
+ }
+ else {
+ model = componentType;
+ }
+
+ // Consider: id same and type changed.
+ var viewId = model.id + '_' + model.type;
+ var view = viewMap[viewId];
+ if (!view) {
+ var classType = ComponentModel.parseClassType(model.type);
+ var Clazz = isComponent
+ ? ComponentView.getClass(classType.main, classType.sub)
+ : ChartView.getClass(classType.sub);
+ if (Clazz) {
+ view = new Clazz();
+ view.init(ecModel, this._api);
+ viewMap[viewId] = view;
+ viewList.push(view);
+ zr.add(view.group);
+ }
+ else {
+ // Error
+ return;
+ }
+ }
+
+ model.__viewId = viewId;
+ view.__alive = true;
+ view.__id = viewId;
+ view.__model = model;
+ }, this);
+
+ for (var i = 0; i < viewList.length;) {
+ var view = viewList[i];
+ if (!view.__alive) {
+ zr.remove(view.group);
+ view.dispose(ecModel, this._api);
+ viewList.splice(i, 1);
+ delete viewMap[view.__id];
+ }
+ else {
+ i++;
+ }
+ }
+ }
+
+ /**
+ * Processor data in each series
+ *
+ * @param {module:echarts/model/Global} ecModel
+ * @private
+ */
+ function processData(ecModel, api) {
+ each(PROCESSOR_STAGES, function (stage) {
+ each(dataProcessorFuncs[stage] || [], function (process) {
+ process(ecModel, api);
+ });
+ });
+ }
+
+ /**
+ * @private
+ */
+ function stackSeriesData(ecModel) {
+ var stackedDataMap = {};
+ ecModel.eachSeries(function (series) {
+ var stack = series.get('stack');
+ var data = series.getData();
+ if (stack && data.type === 'list') {
+ var previousStack = stackedDataMap[stack];
+ if (previousStack) {
+ data.stackedOn = previousStack;
+ }
+ stackedDataMap[stack] = data;
+ }
+ });
+ }
+
+ /**
+ * Layout before each chart render there series, after visual coding and data processing
+ *
+ * @param {module:echarts/model/Global} ecModel
+ * @private
+ */
+ function doLayout(ecModel, payload) {
+ var api = this._api;
+ each(layoutFuncs, function (layout) {
+ layout(ecModel, api, payload);
+ });
+ }
+
+ /**
+ * Code visual infomation from data after data processing
+ *
+ * @param {module:echarts/model/Global} ecModel
+ * @private
+ */
+ function doVisualCoding(ecModel, payload) {
+ each(VISUAL_CODING_STAGES, function (stage) {
+ each(visualCodingFuncs[stage] || [], function (visualCoding) {
+ visualCoding(ecModel, payload);
+ });
+ });
+ }
+
+ /**
+ * Render each chart and component
+ * @private
+ */
+ function doRender(ecModel, payload) {
+ var api = this._api;
+ // Render all components
+ each(this._componentsViews, function (componentView) {
+ var componentModel = componentView.__model;
+ componentView.render(componentModel, ecModel, api, payload);
+
+ updateZ(componentModel, componentView);
+ }, this);
+
+ each(this._chartsViews, function (chart) {
+ chart.__alive = false;
+ }, this);
+
+ // Render all charts
+ ecModel.eachSeries(function (seriesModel, idx) {
+ var chartView = this._chartsMap[seriesModel.__viewId];
+ chartView.__alive = true;
+ chartView.render(seriesModel, ecModel, api, payload);
+
+ updateZ(seriesModel, chartView);
+ }, this);
+
+ // Remove groups of unrendered charts
+ each(this._chartsViews, function (chart) {
+ if (!chart.__alive) {
+ chart.remove(ecModel, api);
+ }
+ }, this);
+ }
+
+ var MOUSE_EVENT_NAMES = [
+ 'click', 'dblclick', 'mouseover', 'mouseout', 'mousedown', 'mouseup', 'globalout'
+ ];
+ /**
+ * @private
+ */
+ echartsProto._initEvents = function () {
+ var zr = this._zr;
+ each(MOUSE_EVENT_NAMES, function (eveName) {
+ zr.on(eveName, function (e) {
+ var ecModel = this.getModel();
+ var el = e.target;
+ if (el && el.dataIndex != null) {
+ var dataModel = el.dataModel || ecModel.getSeriesByIndex(el.seriesIndex);
+ var params = dataModel && dataModel.getDataParams(el.dataIndex) || {};
+ params.event = e;
+ params.type = eveName;
+ this.trigger(eveName, params);
+ }
+ }, this);
+ }, this);
+
+ each(eventActionMap, function (actionType, eventType) {
+ this._messageCenter.on(eventType, function (event) {
+ this.trigger(eventType, event);
+ }, this);
+ }, this);
+ };
+
+ /**
+ * @return {boolean}
+ */
+ echartsProto.isDisposed = function () {
+ return this._disposed;
+ };
+
+ /**
+ * Clear
+ */
+ echartsProto.clear = function () {
+ this.setOption({}, true);
+ };
+ /**
+ * Dispose instance
+ */
+ echartsProto.dispose = function () {
+ this._disposed = true;
+ var api = this._api;
+ var ecModel = this._model;
+
+ each(this._componentsViews, function (component) {
+ component.dispose(ecModel, api);
+ });
+ each(this._chartsViews, function (chart) {
+ chart.dispose(ecModel, api);
+ });
+
+ this._zr.dispose();
+
+ delete instances[this.id];
+ };
+
+ zrUtil.mixin(ECharts, Eventful);
+
+ /**
+ * @param {module:echarts/model/Series|module:echarts/model/Component} model
+ * @param {module:echarts/view/Component|module:echarts/view/Chart} view
+ * @return {string}
+ */
+ function updateZ(model, view) {
+ var z = model.get('z');
+ var zlevel = model.get('zlevel');
+ // Set z and zlevel
+ view.group.traverse(function (el) {
+ z != null && (el.z = z);
+ zlevel != null && (el.zlevel = zlevel);
+ });
+ }
+ /**
+ * @type {Array.<Function>}
+ * @inner
+ */
+ var actions = [];
+
+ /**
+ * Map eventType to actionType
+ * @type {Object}
+ */
+ var eventActionMap = {};
+
+ /**
+ * @type {Array.<Function>}
+ * @inner
+ */
+ var layoutFuncs = [];
+
+ /**
+ * Data processor functions of each stage
+ * @type {Array.<Object.<string, Function>>}
+ * @inner
+ */
+ var dataProcessorFuncs = {};
+
+ /**
+ * @type {Array.<Function>}
+ * @inner
+ */
+ var optionPreprocessorFuncs = [];
+
+ /**
+ * Visual coding functions of each stage
+ * @type {Array.<Object.<string, Function>>}
+ * @inner
+ */
+ var visualCodingFuncs = {};
+ /**
+ * Theme storage
+ * @type {Object.<key, Object>}
+ */
+ var themeStorage = {};
+
+
+ var instances = {};
+ var connectedGroups = {};
+
+ var idBase = new Date() - 0;
+ var groupIdBase = new Date() - 0;
+ var DOM_ATTRIBUTE_KEY = '_echarts_instance_';
+ /**
+ * @alias module:echarts
+ */
+ var echarts = {
+ /**
+ * @type {number}
+ */
+ version: '3.1.5',
+ dependencies: {
+ zrender: '3.0.6'
+ }
+ };
+
+ function enableConnect(chart) {
+
+ var STATUS_PENDING = 0;
+ var STATUS_UPDATING = 1;
+ var STATUS_UPDATED = 2;
+ var STATUS_KEY = '__connectUpdateStatus';
+ function updateConnectedChartsStatus(charts, status) {
+ for (var i = 0; i < charts.length; i++) {
+ var otherChart = charts[i];
+ otherChart[STATUS_KEY] = status;
+ }
+ }
+ zrUtil.each(eventActionMap, function (actionType, eventType) {
+ chart._messageCenter.on(eventType, function (event) {
+ if (connectedGroups[chart.group] && chart[STATUS_KEY] !== STATUS_PENDING) {
+ var action = chart.makeActionFromEvent(event);
+ var otherCharts = [];
+ for (var id in instances) {
+ var otherChart = instances[id];
+ if (otherChart !== chart && otherChart.group === chart.group) {
+ otherCharts.push(otherChart);
+ }
+ }
+ updateConnectedChartsStatus(otherCharts, STATUS_PENDING);
+ each(otherCharts, function (otherChart) {
+ if (otherChart[STATUS_KEY] !== STATUS_UPDATING) {
+ otherChart.dispatchAction(action);
+ }
+ });
+ updateConnectedChartsStatus(otherCharts, STATUS_UPDATED);
+ }
+ });
+ });
+
+ }
+ /**
+ * @param {HTMLDomElement} dom
+ * @param {Object} [theme]
+ * @param {Object} opts
+ */
+ echarts.init = function (dom, theme, opts) {
+ // Check version
+ if ((zrender.version.replace('.', '') - 0) < (echarts.dependencies.zrender.replace('.', '') - 0)) {
+ throw new Error(
+ 'ZRender ' + zrender.version
+ + ' is too old for ECharts ' + echarts.version
+ + '. Current version need ZRender '
+ + echarts.dependencies.zrender + '+'
+ );
+ }
+ if (!dom) {
+ throw new Error('Initialize failed: invalid dom.');
+ }
+
+ var chart = new ECharts(dom, theme, opts);
+ chart.id = 'ec_' + idBase++;
+ instances[chart.id] = chart;
+
+ dom.setAttribute &&
+ dom.setAttribute(DOM_ATTRIBUTE_KEY, chart.id);
+
+ enableConnect(chart);
+
+ return chart;
+ };
+
+ /**
+ * @return {string|Array.<module:echarts~ECharts>} groupId
+ */
+ echarts.connect = function (groupId) {
+ // Is array of charts
+ if (zrUtil.isArray(groupId)) {
+ var charts = groupId;
+ groupId = null;
+ // If any chart has group
+ zrUtil.each(charts, function (chart) {
+ if (chart.group != null) {
+ groupId = chart.group;
+ }
+ });
+ groupId = groupId || ('g_' + groupIdBase++);
+ zrUtil.each(charts, function (chart) {
+ chart.group = groupId;
+ });
+ }
+ connectedGroups[groupId] = true;
+ return groupId;
+ };
+
+ /**
+ * @return {string} groupId
+ */
+ echarts.disConnect = function (groupId) {
+ connectedGroups[groupId] = false;
+ };
+
+ /**
+ * Dispose a chart instance
+ * @param {module:echarts~ECharts|HTMLDomElement|string} chart
+ */
+ echarts.dispose = function (chart) {
+ if (zrUtil.isDom(chart)) {
+ chart = echarts.getInstanceByDom(chart);
+ }
+ else if (typeof chart === 'string') {
+ chart = instances[chart];
+ }
+ if ((chart instanceof ECharts) && !chart.isDisposed()) {
+ chart.dispose();
+ }
+ };
+
+ /**
+ * @param {HTMLDomElement} dom
+ * @return {echarts~ECharts}
+ */
+ echarts.getInstanceByDom = function (dom) {
+ var key = dom.getAttribute(DOM_ATTRIBUTE_KEY);
+ return instances[key];
+ };
+ /**
+ * @param {string} key
+ * @return {echarts~ECharts}
+ */
+ echarts.getInstanceById = function (key) {
+ return instances[key];
+ };
+
+ /**
+ * Register theme
+ */
+ echarts.registerTheme = function (name, theme) {
+ themeStorage[name] = theme;
+ };
+
+ /**
+ * Register option preprocessor
+ * @param {Function} preprocessorFunc
+ */
+ echarts.registerPreprocessor = function (preprocessorFunc) {
+ optionPreprocessorFuncs.push(preprocessorFunc);
+ };
+
+ /**
+ * @param {string} stage
+ * @param {Function} processorFunc
+ */
+ echarts.registerProcessor = function (stage, processorFunc) {
+ if (zrUtil.indexOf(PROCESSOR_STAGES, stage) < 0) {
+ throw new Error('stage should be one of ' + PROCESSOR_STAGES);
+ }
+ var funcs = dataProcessorFuncs[stage] || (dataProcessorFuncs[stage] = []);
+ funcs.push(processorFunc);
+ };
+
+ /**
+ * Usage:
+ * registerAction('someAction', 'someEvent', function () { ... });
+ * registerAction('someAction', function () { ... });
+ * registerAction(
+ * {type: 'someAction', event: 'someEvent', update: 'updateView'},
+ * function () { ... }
+ * );
+ *
+ * @param {(string|Object)} actionInfo
+ * @param {string} actionInfo.type
+ * @param {string} [actionInfo.event]
+ * @param {string} [actionInfo.update]
+ * @param {string} [eventName]
+ * @param {Function} action
+ */
+ echarts.registerAction = function (actionInfo, eventName, action) {
+ if (typeof eventName === 'function') {
+ action = eventName;
+ eventName = '';
+ }
+ var actionType = zrUtil.isObject(actionInfo)
+ ? actionInfo.type
+ : ([actionInfo, actionInfo = {
+ event: eventName
+ }][0]);
+
+ // Event name is all lowercase
+ actionInfo.event = (actionInfo.event || actionType).toLowerCase();
+ eventName = actionInfo.event;
+
+ if (!actions[actionType]) {
+ actions[actionType] = {action: action, actionInfo: actionInfo};
+ }
+ eventActionMap[eventName] = actionType;
+ };
+
+ /**
+ * @param {string} type
+ * @param {*} CoordinateSystem
+ */
+ echarts.registerCoordinateSystem = function (type, CoordinateSystem) {
+ CoordinateSystemManager.register(type, CoordinateSystem);
+ };
+
+ /**
+ * @param {*} layout
+ */
+ echarts.registerLayout = function (layout) {
+ // PENDING All functions ?
+ if (zrUtil.indexOf(layoutFuncs, layout) < 0) {
+ layoutFuncs.push(layout);
+ }
+ };
+
+ /**
+ * @param {string} stage
+ * @param {Function} visualCodingFunc
+ */
+ echarts.registerVisualCoding = function (stage, visualCodingFunc) {
+ if (zrUtil.indexOf(VISUAL_CODING_STAGES, stage) < 0) {
+ throw new Error('stage should be one of ' + VISUAL_CODING_STAGES);
+ }
+ var funcs = visualCodingFuncs[stage] || (visualCodingFuncs[stage] = []);
+ funcs.push(visualCodingFunc);
+ };
+
+ /**
+ * @param {Object} opts
+ */
+ echarts.extendChartView = function (opts) {
+ return ChartView.extend(opts);
+ };
+
+ /**
+ * @param {Object} opts
+ */
+ echarts.extendComponentModel = function (opts) {
+ return ComponentModel.extend(opts);
+ };
+
+ /**
+ * @param {Object} opts
+ */
+ echarts.extendSeriesModel = function (opts) {
+ return SeriesModel.extend(opts);
+ };
+
+ /**
+ * @param {Object} opts
+ */
+ echarts.extendComponentView = function (opts) {
+ return ComponentView.extend(opts);
+ };
+
+ /**
+ * ZRender need a canvas context to do measureText.
+ * But in node environment canvas may be created by node-canvas.
+ * So we need to specify how to create a canvas instead of using document.createElement('canvas')
+ *
+ * Be careful of using it in the browser.
+ *
+ * @param {Function} creator
+ * @example
+ * var Canvas = require('canvas');
+ * var echarts = require('echarts');
+ * echarts.setCanvasCreator(function () {
+ * // Small size is enough.
+ * return new Canvas(32, 32);
+ * });
+ */
+ echarts.setCanvasCreator = function (creator) {
+ zrUtil.createCanvas = creator;
+ };
+
+ echarts.registerVisualCoding('echarts', zrUtil.curry(
+ __webpack_require__(88), '', 'itemStyle'
+ ));
+ echarts.registerPreprocessor(__webpack_require__(89));
+
+ // Default action
+ echarts.registerAction({
+ type: 'highlight',
+ event: 'highlight',
+ update: 'highlight'
+ }, zrUtil.noop);
+ echarts.registerAction({
+ type: 'downplay',
+ event: 'downplay',
+ update: 'downplay'
+ }, zrUtil.noop);
+
+
+ // --------
+ // Exports
+ // --------
+
+ echarts.graphic = __webpack_require__(42);
+ echarts.number = __webpack_require__(7);
+ echarts.format = __webpack_require__(6);
+ echarts.matrix = __webpack_require__(17);
+ echarts.vector = __webpack_require__(16);
+
+ echarts.util = {};
+ each([
+ 'map', 'each', 'filter', 'indexOf', 'inherits',
+ 'reduce', 'filter', 'bind', 'curry', 'isArray',
+ 'isString', 'isObject', 'isFunction', 'extend'
+ ],
+ function (name) {
+ echarts.util[name] = zrUtil[name];
+ }
+ );
+
+ module.exports = echarts;
+
+
+/***/ },
+/* 2 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * ECharts global model
+ *
+ * @module {echarts/model/Global}
+ *
+ */
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var modelUtil = __webpack_require__(5);
+ var Model = __webpack_require__(8);
+ var each = zrUtil.each;
+ var filter = zrUtil.filter;
+ var map = zrUtil.map;
+ var isArray = zrUtil.isArray;
+ var indexOf = zrUtil.indexOf;
+ var isObject = zrUtil.isObject;
+
+ var ComponentModel = __webpack_require__(19);
+
+ var globalDefault = __webpack_require__(23);
+
+ var OPTION_INNER_KEY = '\0_ec_inner';
+
+ /**
+ * @alias module:echarts/model/Global
+ *
+ * @param {Object} option
+ * @param {module:echarts/model/Model} parentModel
+ * @param {Object} theme
+ */
+ var GlobalModel = Model.extend({
+
+ constructor: GlobalModel,
+
+ init: function (option, parentModel, theme, optionManager) {
+ theme = theme || {};
+
+ this.option = null; // Mark as not initialized.
+
+ /**
+ * @type {module:echarts/model/Model}
+ * @private
+ */
+ this._theme = new Model(theme);
+
+ /**
+ * @type {module:echarts/model/OptionManager}
+ */
+ this._optionManager = optionManager;
+ },
+
+ setOption: function (option, optionPreprocessorFuncs) {
+ zrUtil.assert(
+ !(OPTION_INNER_KEY in option),
+ 'please use chart.getOption()'
+ );
+
+ this._optionManager.setOption(option, optionPreprocessorFuncs);
+
+ this.resetOption();
+ },
+
+ /**
+ * @param {string} type null/undefined: reset all.
+ * 'recreate': force recreate all.
+ * 'timeline': only reset timeline option
+ * 'media': only reset media query option
+ * @return {boolean} Whether option changed.
+ */
+ resetOption: function (type) {
+ var optionChanged = false;
+ var optionManager = this._optionManager;
+
+ if (!type || type === 'recreate') {
+ var baseOption = optionManager.mountOption(type === 'recreate');
+
+ if (!this.option || type === 'recreate') {
+ initBase.call(this, baseOption);
+ }
+ else {
+ this.restoreData();
+ this.mergeOption(baseOption);
+ }
+ optionChanged = true;
+ }
+
+ if (type === 'timeline' || type === 'media') {
+ this.restoreData();
+ }
+
+ if (!type || type === 'recreate' || type === 'timeline') {
+ var timelineOption = optionManager.getTimelineOption(this);
+ timelineOption && (this.mergeOption(timelineOption), optionChanged = true);
+ }
+
+ if (!type || type === 'recreate' || type === 'media') {
+ var mediaOptions = optionManager.getMediaOption(this, this._api);
+ if (mediaOptions.length) {
+ each(mediaOptions, function (mediaOption) {
+ this.mergeOption(mediaOption, optionChanged = true);
+ }, this);
+ }
+ }
+
+ return optionChanged;
+ },
+
+ /**
+ * @protected
+ */
+ mergeOption: function (newOption) {
+ var option = this.option;
+ var componentsMap = this._componentsMap;
+ var newCptTypes = [];
+
+ // 如果ä¸å­˜åœ¨å¯¹åº”çš„ component model 则直接 merge
+ each(newOption, function (componentOption, mainType) {
+ if (componentOption == null) {
+ return;
+ }
+
+ if (!ComponentModel.hasClass(mainType)) {
+ option[mainType] = option[mainType] == null
+ ? zrUtil.clone(componentOption)
+ : zrUtil.merge(option[mainType], componentOption, true);
+ }
+ else {
+ newCptTypes.push(mainType);
+ }
+ });
+
+ // FIXME OPTION åŒæ­¥æ˜¯å¦è¦æ”¹å›žåŽŸæ¥çš„
+ ComponentModel.topologicalTravel(
+ newCptTypes, ComponentModel.getAllClassMainTypes(), visitComponent, this
+ );
+
+ function visitComponent(mainType, dependencies) {
+ var newCptOptionList = modelUtil.normalizeToArray(newOption[mainType]);
+
+ var mapResult = modelUtil.mappingToExists(
+ componentsMap[mainType], newCptOptionList
+ );
+
+ makeKeyInfo(mainType, mapResult);
+
+ var dependentModels = getComponentsByTypes(
+ componentsMap, dependencies
+ );
+
+ option[mainType] = [];
+ componentsMap[mainType] = [];
+
+ each(mapResult, function (resultItem, index) {
+ var componentModel = resultItem.exist;
+ var newCptOption = resultItem.option;
+
+ zrUtil.assert(
+ isObject(newCptOption) || componentModel,
+ 'Empty component definition'
+ );
+
+ // Consider where is no new option and should be merged using {},
+ // see removeEdgeAndAdd in topologicalTravel and
+ // ComponentModel.getAllClassMainTypes.
+ if (!newCptOption) {
+ componentModel.mergeOption({}, this);
+ componentModel.optionUpdated(this);
+ }
+ else {
+ var ComponentModelClass = ComponentModel.getClass(
+ mainType, resultItem.keyInfo.subType, true
+ );
+
+ if (componentModel && componentModel instanceof ComponentModelClass) {
+ componentModel.mergeOption(newCptOption, this);
+ componentModel.optionUpdated(this);
+ }
+ else {
+ // PENDING Global as parent ?
+ componentModel = new ComponentModelClass(
+ newCptOption, this, this,
+ zrUtil.extend(
+ {
+ dependentModels: dependentModels,
+ componentIndex: index
+ },
+ resultItem.keyInfo
+ )
+ );
+ // Call optionUpdated after init
+ componentModel.optionUpdated(this);
+ }
+ }
+
+ componentsMap[mainType][index] = componentModel;
+ option[mainType][index] = componentModel.option;
+ }, this);
+
+ // Backup series for filtering.
+ if (mainType === 'series') {
+ this._seriesIndices = createSeriesIndices(componentsMap.series);
+ }
+ }
+ },
+
+ /**
+ * Get option for output (cloned option and inner info removed)
+ * @public
+ * @return {Object}
+ */
+ getOption: function () {
+ var option = zrUtil.clone(this.option);
+
+ each(option, function (opts, mainType) {
+ if (ComponentModel.hasClass(mainType)) {
+ var opts = modelUtil.normalizeToArray(opts);
+ for (var i = opts.length - 1; i >= 0; i--) {
+ // Remove options with inner id.
+ if (modelUtil.isIdInner(opts[i])) {
+ opts.splice(i, 1);
+ }
+ }
+ option[mainType] = opts;
+ }
+ });
+
+ delete option[OPTION_INNER_KEY];
+
+ return option;
+ },
+
+ /**
+ * @return {module:echarts/model/Model}
+ */
+ getTheme: function () {
+ return this._theme;
+ },
+
+ /**
+ * @param {string} mainType
+ * @param {number} [idx=0]
+ * @return {module:echarts/model/Component}
+ */
+ getComponent: function (mainType, idx) {
+ var list = this._componentsMap[mainType];
+ if (list) {
+ return list[idx || 0];
+ }
+ },
+
+ /**
+ * @param {Object} condition
+ * @param {string} condition.mainType
+ * @param {string} [condition.subType] If ignore, only query by mainType
+ * @param {number} [condition.index] Either input index or id or name.
+ * @param {string} [condition.id] Either input index or id or name.
+ * @param {string} [condition.name] Either input index or id or name.
+ * @return {Array.<module:echarts/model/Component>}
+ */
+ queryComponents: function (condition) {
+ var mainType = condition.mainType;
+ if (!mainType) {
+ return [];
+ }
+
+ var index = condition.index;
+ var id = condition.id;
+ var name = condition.name;
+
+ var cpts = this._componentsMap[mainType];
+
+ if (!cpts || !cpts.length) {
+ return [];
+ }
+
+ var result;
+
+ if (index != null) {
+ if (!isArray(index)) {
+ index = [index];
+ }
+ result = filter(map(index, function (idx) {
+ return cpts[idx];
+ }), function (val) {
+ return !!val;
+ });
+ }
+ else if (id != null) {
+ var isIdArray = isArray(id);
+ result = filter(cpts, function (cpt) {
+ return (isIdArray && indexOf(id, cpt.id) >= 0)
+ || (!isIdArray && cpt.id === id);
+ });
+ }
+ else if (name != null) {
+ var isNameArray = isArray(name);
+ result = filter(cpts, function (cpt) {
+ return (isNameArray && indexOf(name, cpt.name) >= 0)
+ || (!isNameArray && cpt.name === name);
+ });
+ }
+
+ return filterBySubType(result, condition);
+ },
+
+ /**
+ * The interface is different from queryComponents,
+ * which is convenient for inner usage.
+ *
+ * @usage
+ * findComponents(
+ * {mainType: 'dataZoom', query: {dataZoomId: 'abc'}},
+ * function (model, index) {...}
+ * );
+ *
+ * findComponents(
+ * {mainType: 'series', subType: 'pie', query: {seriesName: 'uio'}},
+ * function (model, index) {...}
+ * );
+ *
+ * var result = findComponents(
+ * {mainType: 'series'},
+ * function (model, index) {...}
+ * );
+ * // result like [component0, componnet1, ...]
+ *
+ * @param {Object} condition
+ * @param {string} condition.mainType Mandatory.
+ * @param {string} [condition.subType] Optional.
+ * @param {Object} [condition.query] like {xxxIndex, xxxId, xxxName},
+ * where xxx is mainType.
+ * If query attribute is null/undefined or has no index/id/name,
+ * do not filtering by query conditions, which is convenient for
+ * no-payload situations or when target of action is global.
+ * @param {Function} [condition.filter] parameter: component, return boolean.
+ * @return {Array.<module:echarts/model/Component>}
+ */
+ findComponents: function (condition) {
+ var query = condition.query;
+ var mainType = condition.mainType;
+
+ var queryCond = getQueryCond(query);
+ var result = queryCond
+ ? this.queryComponents(queryCond)
+ : this._componentsMap[mainType];
+
+ return doFilter(filterBySubType(result, condition));
+
+ function getQueryCond(q) {
+ var indexAttr = mainType + 'Index';
+ var idAttr = mainType + 'Id';
+ var nameAttr = mainType + 'Name';
+ return q && (
+ q.hasOwnProperty(indexAttr)
+ || q.hasOwnProperty(idAttr)
+ || q.hasOwnProperty(nameAttr)
+ )
+ ? {
+ mainType: mainType,
+ // subType will be filtered finally.
+ index: q[indexAttr],
+ id: q[idAttr],
+ name: q[nameAttr]
+ }
+ : null;
+ }
+
+ function doFilter(res) {
+ return condition.filter
+ ? filter(res, condition.filter)
+ : res;
+ }
+ },
+
+ /**
+ * @usage
+ * eachComponent('legend', function (legendModel, index) {
+ * ...
+ * });
+ * eachComponent(function (componentType, model, index) {
+ * // componentType does not include subType
+ * // (componentType is 'xxx' but not 'xxx.aa')
+ * });
+ * eachComponent(
+ * {mainType: 'dataZoom', query: {dataZoomId: 'abc'}},
+ * function (model, index) {...}
+ * );
+ * eachComponent(
+ * {mainType: 'series', subType: 'pie', query: {seriesName: 'uio'}},
+ * function (model, index) {...}
+ * );
+ *
+ * @param {string|Object=} mainType When mainType is object, the definition
+ * is the same as the method 'findComponents'.
+ * @param {Function} cb
+ * @param {*} context
+ */
+ eachComponent: function (mainType, cb, context) {
+ var componentsMap = this._componentsMap;
+
+ if (typeof mainType === 'function') {
+ context = cb;
+ cb = mainType;
+ each(componentsMap, function (components, componentType) {
+ each(components, function (component, index) {
+ cb.call(context, componentType, component, index);
+ });
+ });
+ }
+ else if (zrUtil.isString(mainType)) {
+ each(componentsMap[mainType], cb, context);
+ }
+ else if (isObject(mainType)) {
+ var queryResult = this.findComponents(mainType);
+ each(queryResult, cb, context);
+ }
+ },
+
+ /**
+ * @param {string} name
+ * @return {Array.<module:echarts/model/Series>}
+ */
+ getSeriesByName: function (name) {
+ var series = this._componentsMap.series;
+ return filter(series, function (oneSeries) {
+ return oneSeries.name === name;
+ });
+ },
+
+ /**
+ * @param {number} seriesIndex
+ * @return {module:echarts/model/Series}
+ */
+ getSeriesByIndex: function (seriesIndex) {
+ return this._componentsMap.series[seriesIndex];
+ },
+
+ /**
+ * @param {string} subType
+ * @return {Array.<module:echarts/model/Series>}
+ */
+ getSeriesByType: function (subType) {
+ var series = this._componentsMap.series;
+ return filter(series, function (oneSeries) {
+ return oneSeries.subType === subType;
+ });
+ },
+
+ /**
+ * @return {Array.<module:echarts/model/Series>}
+ */
+ getSeries: function () {
+ return this._componentsMap.series.slice();
+ },
+
+ /**
+ * After filtering, series may be different
+ * frome raw series.
+ *
+ * @param {Function} cb
+ * @param {*} context
+ */
+ eachSeries: function (cb, context) {
+ assertSeriesInitialized(this);
+ each(this._seriesIndices, function (rawSeriesIndex) {
+ var series = this._componentsMap.series[rawSeriesIndex];
+ cb.call(context, series, rawSeriesIndex);
+ }, this);
+ },
+
+ /**
+ * Iterate raw series before filtered.
+ *
+ * @param {Function} cb
+ * @param {*} context
+ */
+ eachRawSeries: function (cb, context) {
+ each(this._componentsMap.series, cb, context);
+ },
+
+ /**
+ * After filtering, series may be different.
+ * frome raw series.
+ *
+ * @parma {string} subType
+ * @param {Function} cb
+ * @param {*} context
+ */
+ eachSeriesByType: function (subType, cb, context) {
+ assertSeriesInitialized(this);
+ each(this._seriesIndices, function (rawSeriesIndex) {
+ var series = this._componentsMap.series[rawSeriesIndex];
+ if (series.subType === subType) {
+ cb.call(context, series, rawSeriesIndex);
+ }
+ }, this);
+ },
+
+ /**
+ * Iterate raw series before filtered of given type.
+ *
+ * @parma {string} subType
+ * @param {Function} cb
+ * @param {*} context
+ */
+ eachRawSeriesByType: function (subType, cb, context) {
+ return each(this.getSeriesByType(subType), cb, context);
+ },
+
+ /**
+ * @param {module:echarts/model/Series} seriesModel
+ */
+ isSeriesFiltered: function (seriesModel) {
+ assertSeriesInitialized(this);
+ return zrUtil.indexOf(this._seriesIndices, seriesModel.componentIndex) < 0;
+ },
+
+ /**
+ * @param {Function} cb
+ * @param {*} context
+ */
+ filterSeries: function (cb, context) {
+ assertSeriesInitialized(this);
+ var filteredSeries = filter(
+ this._componentsMap.series, cb, context
+ );
+ this._seriesIndices = createSeriesIndices(filteredSeries);
+ },
+
+ restoreData: function () {
+ var componentsMap = this._componentsMap;
+
+ this._seriesIndices = createSeriesIndices(componentsMap.series);
+
+ var componentTypes = [];
+ each(componentsMap, function (components, componentType) {
+ componentTypes.push(componentType);
+ });
+
+ ComponentModel.topologicalTravel(
+ componentTypes,
+ ComponentModel.getAllClassMainTypes(),
+ function (componentType, dependencies) {
+ each(componentsMap[componentType], function (component) {
+ component.restoreData();
+ });
+ }
+ );
+ }
+
+ });
+
+ /**
+ * @inner
+ */
+ function mergeTheme(option, theme) {
+ for (var name in theme) {
+ // 如果有 component model 则把具体的 merge 逻辑交给该 model 处ç†
+ if (!ComponentModel.hasClass(name)) {
+ if (typeof theme[name] === 'object') {
+ option[name] = !option[name]
+ ? zrUtil.clone(theme[name])
+ : zrUtil.merge(option[name], theme[name], false);
+ }
+ else {
+ if (option[name] == null) {
+ option[name] = theme[name];
+ }
+ }
+ }
+ }
+ }
+
+ function initBase(baseOption) {
+ baseOption = baseOption;
+
+ // Using OPTION_INNER_KEY to mark that this option can not be used outside,
+ // i.e. `chart.setOption(chart.getModel().option);` is forbiden.
+ this.option = {};
+ this.option[OPTION_INNER_KEY] = 1;
+
+ /**
+ * @type {Object.<string, Array.<module:echarts/model/Model>>}
+ * @private
+ */
+ this._componentsMap = {};
+
+ /**
+ * Mapping between filtered series list and raw series list.
+ * key: filtered series indices, value: raw series indices.
+ * @type {Array.<nubmer>}
+ * @private
+ */
+ this._seriesIndices = null;
+
+ mergeTheme(baseOption, this._theme.option);
+
+ // TODO Needs clone when merging to the unexisted property
+ zrUtil.merge(baseOption, globalDefault, false);
+
+ this.mergeOption(baseOption);
+ }
+
+ /**
+ * @inner
+ * @param {Array.<string>|string} types model types
+ * @return {Object} key: {string} type, value: {Array.<Object>} models
+ */
+ function getComponentsByTypes(componentsMap, types) {
+ if (!zrUtil.isArray(types)) {
+ types = types ? [types] : [];
+ }
+
+ var ret = {};
+ each(types, function (type) {
+ ret[type] = (componentsMap[type] || []).slice();
+ });
+
+ return ret;
+ }
+
+ /**
+ * @inner
+ */
+ function makeKeyInfo(mainType, mapResult) {
+ // We use this id to hash component models and view instances
+ // in echarts. id can be specified by user, or auto generated.
+
+ // The id generation rule ensures new view instance are able
+ // to mapped to old instance when setOption are called in
+ // no-merge mode. So we generate model id by name and plus
+ // type in view id.
+
+ // name can be duplicated among components, which is convenient
+ // to specify multi components (like series) by one name.
+
+ // Ensure that each id is distinct.
+ var idMap = {};
+
+ each(mapResult, function (item, index) {
+ var existCpt = item.exist;
+ existCpt && (idMap[existCpt.id] = item);
+ });
+
+ each(mapResult, function (item, index) {
+ var opt = item.option;
+
+ zrUtil.assert(
+ !opt || opt.id == null || !idMap[opt.id] || idMap[opt.id] === item,
+ 'id duplicates: ' + (opt && opt.id)
+ );
+
+ opt && opt.id != null && (idMap[opt.id] = item);
+
+ // Complete subType
+ if (isObject(opt)) {
+ var subType = determineSubType(mainType, opt, item.exist);
+ item.keyInfo = {mainType: mainType, subType: subType};
+ }
+ });
+
+ // Make name and id.
+ each(mapResult, function (item, index) {
+ var existCpt = item.exist;
+ var opt = item.option;
+ var keyInfo = item.keyInfo;
+
+ if (!isObject(opt)) {
+ return;
+ }
+
+ // name can be overwitten. Consider case: axis.name = '20km'.
+ // But id generated by name will not be changed, which affect
+ // only in that case: setOption with 'not merge mode' and view
+ // instance will be recreated, which can be accepted.
+ keyInfo.name = opt.name != null
+ ? opt.name + ''
+ : existCpt
+ ? existCpt.name
+ : '\0-';
+
+ if (existCpt) {
+ keyInfo.id = existCpt.id;
+ }
+ else if (opt.id != null) {
+ keyInfo.id = opt.id + '';
+ }
+ else {
+ // Consider this situatoin:
+ // optionA: [{name: 'a'}, {name: 'a'}, {..}]
+ // optionB [{..}, {name: 'a'}, {name: 'a'}]
+ // Series with the same name between optionA and optionB
+ // should be mapped.
+ var idNum = 0;
+ do {
+ keyInfo.id = '\0' + keyInfo.name + '\0' + idNum++;
+ }
+ while (idMap[keyInfo.id]);
+ }
+
+ idMap[keyInfo.id] = item;
+ });
+ }
+
+ /**
+ * @inner
+ */
+ function determineSubType(mainType, newCptOption, existComponent) {
+ var subType = newCptOption.type
+ ? newCptOption.type
+ : existComponent
+ ? existComponent.subType
+ // Use determineSubType only when there is no existComponent.
+ : ComponentModel.determineSubType(mainType, newCptOption);
+
+ // tooltip, markline, markpoint may always has no subType
+ return subType;
+ }
+
+ /**
+ * @inner
+ */
+ function createSeriesIndices(seriesModels) {
+ return map(seriesModels, function (series) {
+ return series.componentIndex;
+ }) || [];
+ }
+
+ /**
+ * @inner
+ */
+ function filterBySubType(components, condition) {
+ // Using hasOwnProperty for restrict. Consider
+ // subType is undefined in user payload.
+ return condition.hasOwnProperty('subType')
+ ? filter(components, function (cpt) {
+ return cpt.subType === condition.subType;
+ })
+ : components;
+ }
+
+ /**
+ * @inner
+ */
+ function assertSeriesInitialized(ecModel) {
+ // Components that use _seriesIndices should depends on series component,
+ // which make sure that their initialization is after series.
+ if (!ecModel._seriesIndices) {
+ throw new Error('Series has not been initialized yet.');
+ }
+ }
+
+ module.exports = GlobalModel;
+
+
+/***/ },
+/* 3 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ */
+
+ var Gradient = __webpack_require__(4);
+ // 用于处ç†merge时无法é历Date等对象的问题
+ var BUILTIN_OBJECT = {
+ '[object Function]': 1,
+ '[object RegExp]': 1,
+ '[object Date]': 1,
+ '[object Error]': 1,
+ '[object CanvasGradient]': 1
+ };
+
+ var objToString = Object.prototype.toString;
+
+ var arrayProto = Array.prototype;
+ var nativeForEach = arrayProto.forEach;
+ var nativeFilter = arrayProto.filter;
+ var nativeSlice = arrayProto.slice;
+ var nativeMap = arrayProto.map;
+ var nativeReduce = arrayProto.reduce;
+
+ /**
+ * @param {*} source
+ * @return {*} æ‹·è´åŽçš„新对象
+ */
+ function clone(source) {
+ if (typeof source == 'object' && source !== null) {
+ var result = source;
+ if (source instanceof Array) {
+ result = [];
+ for (var i = 0, len = source.length; i < len; i++) {
+ result[i] = clone(source[i]);
+ }
+ }
+ else if (
+ !isBuildInObject(source)
+ // 是å¦ä¸º dom 对象
+ && !isDom(source)
+ ) {
+ result = {};
+ for (var key in source) {
+ if (source.hasOwnProperty(key)) {
+ result[key] = clone(source[key]);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ return source;
+ }
+
+ /**
+ * @param {*} target
+ * @param {*} source
+ * @param {boolean} [overwrite=false]
+ */
+ function merge(target, source, overwrite) {
+ // We should escapse that source is string
+ // and enter for ... in ...
+ if (!isObject(source) || !isObject(target)) {
+ return overwrite ? clone(source) : target;
+ }
+
+ for (var key in source) {
+ if (source.hasOwnProperty(key)) {
+ var targetProp = target[key];
+ var sourceProp = source[key];
+
+ if (isObject(sourceProp)
+ && isObject(targetProp)
+ && !isArray(sourceProp)
+ && !isArray(targetProp)
+ && !isDom(sourceProp)
+ && !isDom(targetProp)
+ && !isBuildInObject(sourceProp)
+ && !isBuildInObject(targetProp)
+ ) {
+ // 如果需è¦é€’归覆盖,就递归调用merge
+ merge(targetProp, sourceProp, overwrite);
+ }
+ else if (overwrite || !(key in target)) {
+ // å¦åˆ™åªå¤„ç†overwrite为true,或者在目标对象中没有此属性的情况
+ // NOTE,在 target[key] ä¸å­˜åœ¨çš„时候也是直接覆盖
+ target[key] = clone(source[key], true);
+ }
+ }
+ }
+
+ return target;
+ }
+
+ /**
+ * @param {Array} targetAndSources The first item is target, and the rests are source.
+ * @param {boolean} [overwrite=false]
+ * @return {*} target
+ */
+ function mergeAll(targetAndSources, overwrite) {
+ var result = targetAndSources[0];
+ for (var i = 1, len = targetAndSources.length; i < len; i++) {
+ result = merge(result, targetAndSources[i], overwrite);
+ }
+ return result;
+ }
+
+ /**
+ * @param {*} target
+ * @param {*} source
+ */
+ function extend(target, source) {
+ for (var key in source) {
+ if (source.hasOwnProperty(key)) {
+ target[key] = source[key];
+ }
+ }
+ return target;
+ }
+
+ /**
+ * @param {*} target
+ * @param {*} source
+ * @param {boolen} [overlay=false]
+ */
+ function defaults(target, source, overlay) {
+ for (var key in source) {
+ if (source.hasOwnProperty(key)
+ && (overlay ? source[key] != null : target[key] == null)
+ ) {
+ target[key] = source[key];
+ }
+ }
+ return target;
+ }
+
+ function createCanvas() {
+ return document.createElement('canvas');
+ }
+ // FIXME
+ var _ctx;
+ function getContext() {
+ if (!_ctx) {
+ // Use util.createCanvas instead of createCanvas
+ // because createCanvas may be overwritten in different environment
+ _ctx = util.createCanvas().getContext('2d');
+ }
+ return _ctx;
+ }
+
+ /**
+ * 查询数组中元素的index
+ */
+ function indexOf(array, value) {
+ if (array) {
+ if (array.indexOf) {
+ return array.indexOf(value);
+ }
+ for (var i = 0, len = array.length; i < len; i++) {
+ if (array[i] === value) {
+ return i;
+ }
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * 构造类继承关系
+ *
+ * @param {Function} clazz æºç±»
+ * @param {Function} baseClazz 基类
+ */
+ function inherits(clazz, baseClazz) {
+ var clazzPrototype = clazz.prototype;
+ function F() {}
+ F.prototype = baseClazz.prototype;
+ clazz.prototype = new F();
+
+ for (var prop in clazzPrototype) {
+ clazz.prototype[prop] = clazzPrototype[prop];
+ }
+ clazz.prototype.constructor = clazz;
+ clazz.superClass = baseClazz;
+ }
+
+ /**
+ * @param {Object|Function} target
+ * @param {Object|Function} sorce
+ * @param {boolean} overlay
+ */
+ function mixin(target, source, overlay) {
+ target = 'prototype' in target ? target.prototype : target;
+ source = 'prototype' in source ? source.prototype : source;
+
+ defaults(target, source, overlay);
+ }
+
+ /**
+ * @param {Array|TypedArray} data
+ */
+ function isArrayLike(data) {
+ if (! data) {
+ return;
+ }
+ if (typeof data == 'string') {
+ return false;
+ }
+ return typeof data.length == 'number';
+ }
+
+ /**
+ * 数组或对象é历
+ * @memberOf module:zrender/tool/util
+ * @param {Object|Array} obj
+ * @param {Function} cb
+ * @param {*} [context]
+ */
+ function each(obj, cb, context) {
+ if (!(obj && cb)) {
+ return;
+ }
+ if (obj.forEach && obj.forEach === nativeForEach) {
+ obj.forEach(cb, context);
+ }
+ else if (obj.length === +obj.length) {
+ for (var i = 0, len = obj.length; i < len; i++) {
+ cb.call(context, obj[i], i, obj);
+ }
+ }
+ else {
+ for (var key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ cb.call(context, obj[key], key, obj);
+ }
+ }
+ }
+ }
+
+ /**
+ * 数组映射
+ * @memberOf module:zrender/tool/util
+ * @param {Array} obj
+ * @param {Function} cb
+ * @param {*} [context]
+ * @return {Array}
+ */
+ function map(obj, cb, context) {
+ if (!(obj && cb)) {
+ return;
+ }
+ if (obj.map && obj.map === nativeMap) {
+ return obj.map(cb, context);
+ }
+ else {
+ var result = [];
+ for (var i = 0, len = obj.length; i < len; i++) {
+ result.push(cb.call(context, obj[i], i, obj));
+ }
+ return result;
+ }
+ }
+
+ /**
+ * @memberOf module:zrender/tool/util
+ * @param {Array} obj
+ * @param {Function} cb
+ * @param {Object} [memo]
+ * @param {*} [context]
+ * @return {Array}
+ */
+ function reduce(obj, cb, memo, context) {
+ if (!(obj && cb)) {
+ return;
+ }
+ if (obj.reduce && obj.reduce === nativeReduce) {
+ return obj.reduce(cb, memo, context);
+ }
+ else {
+ for (var i = 0, len = obj.length; i < len; i++) {
+ memo = cb.call(context, memo, obj[i], i, obj);
+ }
+ return memo;
+ }
+ }
+
+ /**
+ * 数组过滤
+ * @memberOf module:zrender/tool/util
+ * @param {Array} obj
+ * @param {Function} cb
+ * @param {*} [context]
+ * @return {Array}
+ */
+ function filter(obj, cb, context) {
+ if (!(obj && cb)) {
+ return;
+ }
+ if (obj.filter && obj.filter === nativeFilter) {
+ return obj.filter(cb, context);
+ }
+ else {
+ var result = [];
+ for (var i = 0, len = obj.length; i < len; i++) {
+ if (cb.call(context, obj[i], i, obj)) {
+ result.push(obj[i]);
+ }
+ }
+ return result;
+ }
+ }
+
+ /**
+ * 数组项查找
+ * @memberOf module:zrender/tool/util
+ * @param {Array} obj
+ * @param {Function} cb
+ * @param {*} [context]
+ * @return {Array}
+ */
+ function find(obj, cb, context) {
+ if (!(obj && cb)) {
+ return;
+ }
+ for (var i = 0, len = obj.length; i < len; i++) {
+ if (cb.call(context, obj[i], i, obj)) {
+ return obj[i];
+ }
+ }
+ }
+
+ /**
+ * @memberOf module:zrender/tool/util
+ * @param {Function} func
+ * @param {*} context
+ * @return {Function}
+ */
+ function bind(func, context) {
+ var args = nativeSlice.call(arguments, 2);
+ return function () {
+ return func.apply(context, args.concat(nativeSlice.call(arguments)));
+ };
+ }
+
+ /**
+ * @memberOf module:zrender/tool/util
+ * @param {Function} func
+ * @param {...}
+ * @return {Function}
+ */
+ function curry(func) {
+ var args = nativeSlice.call(arguments, 1);
+ return function () {
+ return func.apply(this, args.concat(nativeSlice.call(arguments)));
+ };
+ }
+
+ /**
+ * @memberOf module:zrender/tool/util
+ * @param {*} value
+ * @return {boolean}
+ */
+ function isArray(value) {
+ return objToString.call(value) === '[object Array]';
+ }
+
+ /**
+ * @memberOf module:zrender/tool/util
+ * @param {*} value
+ * @return {boolean}
+ */
+ function isFunction(value) {
+ return typeof value === 'function';
+ }
+
+ /**
+ * @memberOf module:zrender/tool/util
+ * @param {*} value
+ * @return {boolean}
+ */
+ function isString(value) {
+ return objToString.call(value) === '[object String]';
+ }
+
+ /**
+ * @memberOf module:zrender/tool/util
+ * @param {*} value
+ * @return {boolean}
+ */
+ function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return type === 'function' || (!!value && type == 'object');
+ }
+
+ /**
+ * @memberOf module:zrender/tool/util
+ * @param {*} value
+ * @return {boolean}
+ */
+ function isBuildInObject(value) {
+ return !!BUILTIN_OBJECT[objToString.call(value)]
+ || (value instanceof Gradient);
+ }
+
+ /**
+ * @memberOf module:zrender/tool/util
+ * @param {*} value
+ * @return {boolean}
+ */
+ function isDom(value) {
+ return value && value.nodeType === 1
+ && typeof(value.nodeName) == 'string';
+ }
+
+ /**
+ * If value1 is not null, then return value1, otherwise judget rest of values.
+ * @param {*...} values
+ * @return {*} Final value
+ */
+ function retrieve(values) {
+ for (var i = 0, len = arguments.length; i < len; i++) {
+ if (arguments[i] != null) {
+ return arguments[i];
+ }
+ }
+ }
+
+ /**
+ * @memberOf module:zrender/tool/util
+ * @param {Array} arr
+ * @param {number} startIndex
+ * @param {number} endIndex
+ * @return {Array}
+ */
+ function slice() {
+ return Function.call.apply(nativeSlice, arguments);
+ }
+
+ /**
+ * @param {boolean} condition
+ * @param {string} message
+ */
+ function assert(condition, message) {
+ if (!condition) {
+ throw new Error(message);
+ }
+ }
+
+ var util = {
+ inherits: inherits,
+ mixin: mixin,
+ clone: clone,
+ merge: merge,
+ mergeAll: mergeAll,
+ extend: extend,
+ defaults: defaults,
+ getContext: getContext,
+ createCanvas: createCanvas,
+ indexOf: indexOf,
+ slice: slice,
+ find: find,
+ isArrayLike: isArrayLike,
+ each: each,
+ map: map,
+ reduce: reduce,
+ filter: filter,
+ bind: bind,
+ curry: curry,
+ isArray: isArray,
+ isString: isString,
+ isObject: isObject,
+ isFunction: isFunction,
+ isBuildInObject: isBuildInObject,
+ isDom: isDom,
+ retrieve: retrieve,
+ assert: assert,
+ noop: function () {}
+ };
+ module.exports = util;
+
+
+
+/***/ },
+/* 4 */
+/***/ function(module, exports) {
+
+
+
+ /**
+ * @param {Array.<Object>} colorStops
+ */
+ var Gradient = function (colorStops) {
+
+ this.colorStops = colorStops || [];
+ };
+
+ Gradient.prototype = {
+
+ constructor: Gradient,
+
+ addColorStop: function (offset, color) {
+ this.colorStops.push({
+
+ offset: offset,
+
+ color: color
+ });
+ }
+ };
+
+ module.exports = Gradient;
+
+
+/***/ },
+/* 5 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var formatUtil = __webpack_require__(6);
+ var nubmerUtil = __webpack_require__(7);
+ var zrUtil = __webpack_require__(3);
+
+ var Model = __webpack_require__(8);
+
+ var AXIS_DIMS = ['x', 'y', 'z', 'radius', 'angle'];
+
+ var modelUtil = {};
+
+ /**
+ * Create "each" method to iterate names.
+ *
+ * @pubilc
+ * @param {Array.<string>} names
+ * @param {Array.<string>=} attrs
+ * @return {Function}
+ */
+ modelUtil.createNameEach = function (names, attrs) {
+ names = names.slice();
+ var capitalNames = zrUtil.map(names, modelUtil.capitalFirst);
+ attrs = (attrs || []).slice();
+ var capitalAttrs = zrUtil.map(attrs, modelUtil.capitalFirst);
+
+ return function (callback, context) {
+ zrUtil.each(names, function (name, index) {
+ var nameObj = {name: name, capital: capitalNames[index]};
+
+ for (var j = 0; j < attrs.length; j++) {
+ nameObj[attrs[j]] = name + capitalAttrs[j];
+ }
+
+ callback.call(context, nameObj);
+ });
+ };
+ };
+
+ /**
+ * @public
+ */
+ modelUtil.capitalFirst = function (str) {
+ return str ? str.charAt(0).toUpperCase() + str.substr(1) : str;
+ };
+
+ /**
+ * Iterate each dimension name.
+ *
+ * @public
+ * @param {Function} callback The parameter is like:
+ * {
+ * name: 'angle',
+ * capital: 'Angle',
+ * axis: 'angleAxis',
+ * axisIndex: 'angleAixs',
+ * index: 'angleIndex'
+ * }
+ * @param {Object} context
+ */
+ modelUtil.eachAxisDim = modelUtil.createNameEach(AXIS_DIMS, ['axisIndex', 'axis', 'index']);
+
+ /**
+ * If value is not array, then translate it to array.
+ * @param {*} value
+ * @return {Array} [value] or value
+ */
+ modelUtil.normalizeToArray = function (value) {
+ return zrUtil.isArray(value)
+ ? value
+ : value == null
+ ? []
+ : [value];
+ };
+
+ /**
+ * If tow dataZoomModels has the same axis controlled, we say that they are 'linked'.
+ * dataZoomModels and 'links' make up one or more graphics.
+ * This function finds the graphic where the source dataZoomModel is in.
+ *
+ * @public
+ * @param {Function} forEachNode Node iterator.
+ * @param {Function} forEachEdgeType edgeType iterator
+ * @param {Function} edgeIdGetter Giving node and edgeType, return an array of edge id.
+ * @return {Function} Input: sourceNode, Output: Like {nodes: [], dims: {}}
+ */
+ modelUtil.createLinkedNodesFinder = function (forEachNode, forEachEdgeType, edgeIdGetter) {
+
+ return function (sourceNode) {
+ var result = {
+ nodes: [],
+ records: {} // key: edgeType.name, value: Object (key: edge id, value: boolean).
+ };
+
+ forEachEdgeType(function (edgeType) {
+ result.records[edgeType.name] = {};
+ });
+
+ if (!sourceNode) {
+ return result;
+ }
+
+ absorb(sourceNode, result);
+
+ var existsLink;
+ do {
+ existsLink = false;
+ forEachNode(processSingleNode);
+ }
+ while (existsLink);
+
+ function processSingleNode(node) {
+ if (!isNodeAbsorded(node, result) && isLinked(node, result)) {
+ absorb(node, result);
+ existsLink = true;
+ }
+ }
+
+ return result;
+ };
+
+ function isNodeAbsorded(node, result) {
+ return zrUtil.indexOf(result.nodes, node) >= 0;
+ }
+
+ function isLinked(node, result) {
+ var hasLink = false;
+ forEachEdgeType(function (edgeType) {
+ zrUtil.each(edgeIdGetter(node, edgeType) || [], function (edgeId) {
+ result.records[edgeType.name][edgeId] && (hasLink = true);
+ });
+ });
+ return hasLink;
+ }
+
+ function absorb(node, result) {
+ result.nodes.push(node);
+ forEachEdgeType(function (edgeType) {
+ zrUtil.each(edgeIdGetter(node, edgeType) || [], function (edgeId) {
+ result.records[edgeType.name][edgeId] = true;
+ });
+ });
+ }
+ };
+
+ /**
+ * Sync default option between normal and emphasis like `position` and `show`
+ * In case some one will write code like
+ * label: {
+ * normal: {
+ * show: false,
+ * position: 'outside',
+ * textStyle: {
+ * fontSize: 18
+ * }
+ * },
+ * emphasis: {
+ * show: true
+ * }
+ * }
+ * @param {Object} opt
+ * @param {Array.<string>} subOpts
+ */
+ modelUtil.defaultEmphasis = function (opt, subOpts) {
+ if (opt) {
+ var emphasisOpt = opt.emphasis = opt.emphasis || {};
+ var normalOpt = opt.normal = opt.normal || {};
+
+ // Default emphasis option from normal
+ zrUtil.each(subOpts, function (subOptName) {
+ var val = zrUtil.retrieve(emphasisOpt[subOptName], normalOpt[subOptName]);
+ if (val != null) {
+ emphasisOpt[subOptName] = val;
+ }
+ });
+ }
+ };
+
+ /**
+ * Create a model proxy to be used in tooltip for edge data, markLine data, markPoint data.
+ * @param {Object} opt
+ * @param {string} [opt.seriesIndex]
+ * @param {Object} [opt.name]
+ * @param {module:echarts/data/List} data
+ * @param {Array.<Object>} rawData
+ */
+ modelUtil.createDataFormatModel = function (opt, data, rawData) {
+ var model = new Model();
+ zrUtil.mixin(model, modelUtil.dataFormatMixin);
+ model.seriesIndex = opt.seriesIndex;
+ model.name = opt.name || '';
+
+ model.getData = function () {
+ return data;
+ };
+ model.getRawDataArray = function () {
+ return rawData;
+ };
+ return model;
+ };
+
+ /**
+ * data could be [12, 2323, {value: 223}, [1221, 23], {value: [2, 23]}]
+ * This helper method retieves value from data.
+ * @param {string|number|Date|Array|Object} dataItem
+ * @return {number|string|Date|Array.<number|string|Date>}
+ */
+ modelUtil.getDataItemValue = function (dataItem) {
+ // Performance sensitive.
+ return dataItem && (dataItem.value == null ? dataItem : dataItem.value);
+ };
+
+ /**
+ * This helper method convert value in data.
+ * @param {string|number|Date} value
+ * @param {Object|string} [dimInfo] If string (like 'x'), dimType defaults 'number'.
+ */
+ modelUtil.converDataValue = function (value, dimInfo) {
+ // Performance sensitive.
+ var dimType = dimInfo && dimInfo.type;
+ if (dimType === 'ordinal') {
+ return value;
+ }
+
+ if (dimType === 'time' && !isFinite(value) && value != null && value !== '-') {
+ value = +nubmerUtil.parseDate(value);
+ }
+
+ // dimType defaults 'number'.
+ // If dimType is not ordinal and value is null or undefined or NaN or '-',
+ // parse to NaN.
+ return (value == null || value === '')
+ ? NaN : +value; // If string (like '-'), using '+' parse to NaN
+ };
+
+ modelUtil.dataFormatMixin = {
+ /**
+ * Get params for formatter
+ * @param {number} dataIndex
+ * @return {Object}
+ */
+ getDataParams: function (dataIndex) {
+ var data = this.getData();
+
+ var seriesIndex = this.seriesIndex;
+ var seriesName = this.name;
+
+ var rawValue = this.getRawValue(dataIndex);
+ var rawDataIndex = data.getRawIndex(dataIndex);
+ var name = data.getName(dataIndex, true);
+
+ // Data may not exists in the option given by user
+ var rawDataArray = this.getRawDataArray();
+ var itemOpt = rawDataArray && rawDataArray[rawDataIndex];
+
+ return {
+ seriesIndex: seriesIndex,
+ seriesName: seriesName,
+ name: name,
+ dataIndex: rawDataIndex,
+ data: itemOpt,
+ value: rawValue,
+ color: data.getItemVisual(dataIndex, 'color'),
+
+ // Param name list for mapping `a`, `b`, `c`, `d`, `e`
+ $vars: ['seriesName', 'name', 'value']
+ };
+ },
+
+ /**
+ * Format label
+ * @param {number} dataIndex
+ * @param {string} [status='normal'] 'normal' or 'emphasis'
+ * @param {Function|string} [formatter] Default use the `itemStyle[status].label.formatter`
+ * @return {string}
+ */
+ getFormattedLabel: function (dataIndex, status, formatter) {
+ status = status || 'normal';
+ var data = this.getData();
+ var itemModel = data.getItemModel(dataIndex);
+
+ var params = this.getDataParams(dataIndex);
+ if (formatter == null) {
+ formatter = itemModel.get(['label', status, 'formatter']);
+ }
+
+ if (typeof formatter === 'function') {
+ params.status = status;
+ return formatter(params);
+ }
+ else if (typeof formatter === 'string') {
+ return formatUtil.formatTpl(formatter, params);
+ }
+ },
+
+ /**
+ * Get raw value in option
+ * @param {number} idx
+ * @return {Object}
+ */
+ getRawValue: function (idx) {
+ var itemModel = this.getData().getItemModel(idx);
+ if (itemModel && itemModel.option != null) {
+ var dataItem = itemModel.option;
+ return (zrUtil.isObject(dataItem) && !zrUtil.isArray(dataItem))
+ ? dataItem.value : dataItem;
+ }
+ }
+ };
+
+ /**
+ * Mapping to exists for merge.
+ *
+ * @public
+ * @param {Array.<Object>|Array.<module:echarts/model/Component>} exists
+ * @param {Object|Array.<Object>} newCptOptions
+ * @return {Array.<Object>} Result, like [{exist: ..., option: ...}, {}],
+ * which order is the same as exists.
+ */
+ modelUtil.mappingToExists = function (exists, newCptOptions) {
+ // Mapping by the order by original option (but not order of
+ // new option) in merge mode. Because we should ensure
+ // some specified index (like xAxisIndex) is consistent with
+ // original option, which is easy to understand, espatially in
+ // media query. And in most case, merge option is used to
+ // update partial option but not be expected to change order.
+ newCptOptions = (newCptOptions || []).slice();
+
+ var result = zrUtil.map(exists || [], function (obj, index) {
+ return {exist: obj};
+ });
+
+ // Mapping by id or name if specified.
+ zrUtil.each(newCptOptions, function (cptOption, index) {
+ if (!zrUtil.isObject(cptOption)) {
+ return;
+ }
+
+ for (var i = 0; i < result.length; i++) {
+ var exist = result[i].exist;
+ if (!result[i].option // Consider name: two map to one.
+ && (
+ // id has highest priority.
+ (cptOption.id != null && exist.id === cptOption.id + '')
+ || (cptOption.name != null
+ && !modelUtil.isIdInner(cptOption)
+ && !modelUtil.isIdInner(exist)
+ && exist.name === cptOption.name + ''
+ )
+ )
+ ) {
+ result[i].option = cptOption;
+ newCptOptions[index] = null;
+ break;
+ }
+ }
+ });
+
+ // Otherwise mapping by index.
+ zrUtil.each(newCptOptions, function (cptOption, index) {
+ if (!zrUtil.isObject(cptOption)) {
+ return;
+ }
+
+ var i = 0;
+ for (; i < result.length; i++) {
+ var exist = result[i].exist;
+ if (!result[i].option
+ && !modelUtil.isIdInner(exist)
+ // Caution:
+ // Do not overwrite id. But name can be overwritten,
+ // because axis use name as 'show label text'.
+ // 'exist' always has id and name and we dont
+ // need to check it.
+ && cptOption.id == null
+ ) {
+ result[i].option = cptOption;
+ break;
+ }
+ }
+
+ if (i >= result.length) {
+ result.push({option: cptOption});
+ }
+ });
+
+ return result;
+ };
+
+ /**
+ * @public
+ * @param {Object} cptOption
+ * @return {boolean}
+ */
+ modelUtil.isIdInner = function (cptOption) {
+ return zrUtil.isObject(cptOption)
+ && cptOption.id
+ && (cptOption.id + '').indexOf('\0_ec_\0') === 0;
+ };
+
+ module.exports = modelUtil;
+
+
+/***/ },
+/* 6 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var numberUtil = __webpack_require__(7);
+
+ /**
+ * æ¯ä¸‰ä½é»˜è®¤åŠ ,æ ¼å¼åŒ–
+ * @type {string|number} x
+ */
+ function addCommas(x) {
+ if (isNaN(x)) {
+ return '-';
+ }
+ x = (x + '').split('.');
+ return x[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,'$1,')
+ + (x.length > 1 ? ('.' + x[1]) : '');
+ }
+
+ /**
+ * @param {string} str
+ * @return {string} str
+ */
+ function toCamelCase(str) {
+ return str.toLowerCase().replace(/-(.)/g, function(match, group1) {
+ return group1.toUpperCase();
+ });
+ }
+
+ /**
+ * Normalize css liked array configuration
+ * e.g.
+ * 3 => [3, 3, 3, 3]
+ * [4, 2] => [4, 2, 4, 2]
+ * [4, 3, 2] => [4, 3, 2, 3]
+ * @param {number|Array.<number>} val
+ */
+ function normalizeCssArray(val) {
+ var len = val.length;
+ if (typeof (val) === 'number') {
+ return [val, val, val, val];
+ }
+ else if (len === 2) {
+ // vertical | horizontal
+ return [val[0], val[1], val[0], val[1]];
+ }
+ else if (len === 3) {
+ // top | horizontal | bottom
+ return [val[0], val[1], val[2], val[1]];
+ }
+ return val;
+ }
+
+ function encodeHTML(source) {
+ return String(source)
+ .replace(/&/g, '&amp;')
+ .replace(/</g, '&lt;')
+ .replace(/>/g, '&gt;')
+ .replace(/"/g, '&quot;')
+ .replace(/'/g, '&#39;');
+ }
+
+ var TPL_VAR_ALIAS = ['a', 'b', 'c', 'd', 'e', 'f', 'g'];
+
+ function wrapVar(varName, seriesIdx) {
+ return '{' + varName + (seriesIdx == null ? '' : seriesIdx) + '}';
+ }
+ /**
+ * Template formatter
+ * @param {string} tpl
+ * @param {Array.<Object>|Object} paramsList
+ * @return {string}
+ */
+ function formatTpl(tpl, paramsList) {
+ if (!zrUtil.isArray(paramsList)) {
+ paramsList = [paramsList];
+ }
+ var seriesLen = paramsList.length;
+ if (!seriesLen) {
+ return '';
+ }
+
+ var $vars = paramsList[0].$vars;
+ for (var i = 0; i < $vars.length; i++) {
+ var alias = TPL_VAR_ALIAS[i];
+ tpl = tpl.replace(wrapVar(alias), wrapVar(alias, 0));
+ }
+ for (var seriesIdx = 0; seriesIdx < seriesLen; seriesIdx++) {
+ for (var k = 0; k < $vars.length; k++) {
+ tpl = tpl.replace(
+ wrapVar(TPL_VAR_ALIAS[k], seriesIdx),
+ paramsList[seriesIdx][$vars[k]]
+ );
+ }
+ }
+
+ return tpl;
+ }
+
+ /**
+ * ISO Date format
+ * @param {string} tpl
+ * @param {number} value
+ * @inner
+ */
+ function formatTime(tpl, value) {
+ if (tpl === 'week'
+ || tpl === 'month'
+ || tpl === 'quarter'
+ || tpl === 'half-year'
+ || tpl === 'year'
+ ) {
+ tpl = 'MM-dd\nyyyy';
+ }
+
+ var date = numberUtil.parseDate(value);
+ var y = date.getFullYear();
+ var M = date.getMonth() + 1;
+ var d = date.getDate();
+ var h = date.getHours();
+ var m = date.getMinutes();
+ var s = date.getSeconds();
+
+ tpl = tpl.replace('MM', s2d(M))
+ .toLowerCase()
+ .replace('yyyy', y)
+ .replace('yy', y % 100)
+ .replace('dd', s2d(d))
+ .replace('d', d)
+ .replace('hh', s2d(h))
+ .replace('h', h)
+ .replace('mm', s2d(m))
+ .replace('m', m)
+ .replace('ss', s2d(s))
+ .replace('s', s);
+
+ return tpl;
+ }
+
+ /**
+ * @param {string} str
+ * @return {string}
+ * @inner
+ */
+ function s2d(str) {
+ return str < 10 ? ('0' + str) : str;
+ }
+
+ module.exports = {
+
+ normalizeCssArray: normalizeCssArray,
+
+ addCommas: addCommas,
+
+ toCamelCase: toCamelCase,
+
+ encodeHTML: encodeHTML,
+
+ formatTpl: formatTpl,
+
+ formatTime: formatTime
+ };
+
+
+/***/ },
+/* 7 */
+/***/ function(module, exports) {
+
+ /**
+ * 数值处ç†æ¨¡å—
+ * @module echarts/util/number
+ */
+
+
+
+ var number = {};
+
+ var RADIAN_EPSILON = 1e-4;
+
+ function _trim(str) {
+ return str.replace(/^\s+/, '').replace(/\s+$/, '');
+ }
+
+ /**
+ * Linear mapping a value from domain to range
+ * @memberOf module:echarts/util/number
+ * @param {(number|Array.<number>)} val
+ * @param {Array.<number>} domain Domain extent domain[0] can be bigger than domain[1]
+ * @param {Array.<number>} range Range extent range[0] can be bigger than range[1]
+ * @param {boolean} clamp
+ * @return {(number|Array.<number>}
+ */
+ number.linearMap = function (val, domain, range, clamp) {
+
+ var sub = domain[1] - domain[0];
+
+ if (sub === 0) {
+ return (range[0] + range[1]) / 2;
+ }
+ var t = (val - domain[0]) / sub;
+
+ if (clamp) {
+ t = Math.min(Math.max(t, 0), 1);
+ }
+
+ return t * (range[1] - range[0]) + range[0];
+ };
+
+ /**
+ * Convert a percent string to absolute number.
+ * Returns NaN if percent is not a valid string or number
+ * @memberOf module:echarts/util/number
+ * @param {string|number} percent
+ * @param {number} all
+ * @return {number}
+ */
+ number.parsePercent = function(percent, all) {
+ switch (percent) {
+ case 'center':
+ case 'middle':
+ percent = '50%';
+ break;
+ case 'left':
+ case 'top':
+ percent = '0%';
+ break;
+ case 'right':
+ case 'bottom':
+ percent = '100%';
+ break;
+ }
+ if (typeof percent === 'string') {
+ if (_trim(percent).match(/%$/)) {
+ return parseFloat(percent) / 100 * all;
+ }
+
+ return parseFloat(percent);
+ }
+
+ return percent == null ? NaN : +percent;
+ };
+
+ /**
+ * Fix rounding error of float numbers
+ * @param {number} x
+ * @return {number}
+ */
+ number.round = function (x) {
+ // PENDING
+ return +(+x).toFixed(12);
+ };
+
+ number.asc = function (arr) {
+ arr.sort(function (a, b) {
+ return a - b;
+ });
+ return arr;
+ };
+
+ /**
+ * Get precision
+ * @param {number} val
+ */
+ number.getPrecision = function (val) {
+ if (isNaN(val)) {
+ return 0;
+ }
+ // It is much faster than methods converting number to string as follows
+ // var tmp = val.toString();
+ // return tmp.length - 1 - tmp.indexOf('.');
+ // especially when precision is low
+ var e = 1;
+ var count = 0;
+ while (Math.round(val * e) / e !== val) {
+ e *= 10;
+ count++;
+ }
+ return count;
+ };
+
+ /**
+ * @param {Array.<number>} dataExtent
+ * @param {Array.<number>} pixelExtent
+ * @return {number} precision
+ */
+ number.getPixelPrecision = function (dataExtent, pixelExtent) {
+ var log = Math.log;
+ var LN10 = Math.LN10;
+ var dataQuantity = Math.floor(log(dataExtent[1] - dataExtent[0]) / LN10);
+ var sizeQuantity = Math.round(log(Math.abs(pixelExtent[1] - pixelExtent[0])) / LN10);
+ return Math.max(
+ -dataQuantity + sizeQuantity,
+ 0
+ );
+ };
+
+ // Number.MAX_SAFE_INTEGER, ie do not support.
+ number.MAX_SAFE_INTEGER = 9007199254740991;
+
+ /**
+ * To 0 - 2 * PI, considering negative radian.
+ * @param {number} radian
+ * @return {number}
+ */
+ number.remRadian = function (radian) {
+ var pi2 = Math.PI * 2;
+ return (radian % pi2 + pi2) % pi2;
+ };
+
+ /**
+ * @param {type} radian
+ * @return {boolean}
+ */
+ number.isRadianAroundZero = function (val) {
+ return val > -RADIAN_EPSILON && val < RADIAN_EPSILON;
+ };
+
+ /**
+ * @param {string|Date|number} value
+ * @return {number} timestamp
+ */
+ number.parseDate = function (value) {
+ return value instanceof Date
+ ? value
+ : new Date(
+ typeof value === 'string'
+ ? value.replace(/-/g, '/')
+ : Math.round(value)
+ );
+ };
+
+ // "Nice Numbers for Graph Labels" of Graphic Gems
+ /**
+ * find a “nice†number approximately equal to x. Round the number if round = true, take ceiling if round = false
+ * The primary observation is that the “nicest†numbers in decimal are 1, 2, and 5, and all power-of-ten multiples of these numbers.
+ * @param {number} val
+ * @param {boolean} round
+ * @return {number}
+ */
+ number.nice = function (val, round) {
+ var exp = Math.floor(Math.log(val) / Math.LN10);
+ var exp10 = Math.pow(10, exp);
+ var f = val / exp10; // between 1 and 10
+ var nf;
+ if (round) {
+ if (f < 1.5) { nf = 1; }
+ else if (f < 2.5) { nf = 2; }
+ else if (f < 4) { nf = 3; }
+ else if (f < 7) { nf = 5; }
+ else { nf = 10; }
+ }
+ else {
+ if (f < 1) { nf = 1; }
+ else if (f < 2) { nf = 2; }
+ else if (f < 3) { nf = 3; }
+ else if (f < 5) { nf = 5; }
+ else { nf = 10; }
+ }
+ return nf * exp10;
+ };
+
+ module.exports = number;
+
+
+/***/ },
+/* 8 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @module echarts/model/Model
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+ var clazzUtil = __webpack_require__(9);
+
+ /**
+ * @alias module:echarts/model/Model
+ * @constructor
+ * @param {Object} option
+ * @param {module:echarts/model/Model} parentModel
+ * @param {module:echarts/model/Global} ecModel
+ * @param {Object} extraOpt
+ */
+ function Model(option, parentModel, ecModel, extraOpt) {
+ /**
+ * @type {module:echarts/model/Model}
+ * @readOnly
+ */
+ this.parentModel = parentModel;
+
+ /**
+ * @type {module:echarts/model/Global}
+ * @readOnly
+ */
+ this.ecModel = ecModel;
+
+ /**
+ * @type {Object}
+ * @protected
+ */
+ this.option = option;
+
+ // Simple optimization
+ if (this.init) {
+ if (arguments.length <= 4) {
+ this.init(option, parentModel, ecModel, extraOpt);
+ }
+ else {
+ this.init.apply(this, arguments);
+ }
+ }
+ }
+
+ Model.prototype = {
+
+ constructor: Model,
+
+ /**
+ * Model çš„åˆå§‹åŒ–函数
+ * @param {Object} option
+ */
+ init: null,
+
+ /**
+ * 从新的 Option merge
+ */
+ mergeOption: function (option) {
+ zrUtil.merge(this.option, option, true);
+ },
+
+ /**
+ * @param {string} path
+ * @param {boolean} [ignoreParent=false]
+ * @return {*}
+ */
+ get: function (path, ignoreParent) {
+ if (!path) {
+ return this.option;
+ }
+
+ if (typeof path === 'string') {
+ path = path.split('.');
+ }
+
+ var obj = this.option;
+ var parentModel = this.parentModel;
+ for (var i = 0; i < path.length; i++) {
+ // obj could be number/string/... (like 0)
+ obj = (obj && typeof obj === 'object') ? obj[path[i]] : null;
+ if (obj == null) {
+ break;
+ }
+ }
+ if (obj == null && parentModel && !ignoreParent) {
+ obj = parentModel.get(path);
+ }
+ return obj;
+ },
+
+ /**
+ * @param {string} key
+ * @param {boolean} [ignoreParent=false]
+ * @return {*}
+ */
+ getShallow: function (key, ignoreParent) {
+ var option = this.option;
+ var val = option && option[key];
+ var parentModel = this.parentModel;
+ if (val == null && parentModel && !ignoreParent) {
+ val = parentModel.getShallow(key);
+ }
+ return val;
+ },
+
+ /**
+ * @param {string} path
+ * @param {module:echarts/model/Model} [parentModel]
+ * @return {module:echarts/model/Model}
+ */
+ getModel: function (path, parentModel) {
+ var obj = this.get(path, true);
+ var thisParentModel = this.parentModel;
+ var model = new Model(
+ obj, parentModel || (thisParentModel && thisParentModel.getModel(path)),
+ this.ecModel
+ );
+ return model;
+ },
+
+ /**
+ * If model has option
+ */
+ isEmpty: function () {
+ return this.option == null;
+ },
+
+ restoreData: function () {},
+
+ // Pending
+ clone: function () {
+ var Ctor = this.constructor;
+ return new Ctor(zrUtil.clone(this.option));
+ },
+
+ setReadOnly: function (properties) {
+ clazzUtil.setReadOnly(this, properties);
+ }
+ };
+
+ // Enable Model.extend.
+ clazzUtil.enableClassExtend(Model);
+
+ var mixin = zrUtil.mixin;
+ mixin(Model, __webpack_require__(10));
+ mixin(Model, __webpack_require__(12));
+ mixin(Model, __webpack_require__(13));
+ mixin(Model, __webpack_require__(18));
+
+ module.exports = Model;
+
+
+/***/ },
+/* 9 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+
+ var clazz = {};
+
+ var TYPE_DELIMITER = '.';
+ var IS_CONTAINER = '___EC__COMPONENT__CONTAINER___';
+ /**
+ * @public
+ */
+ var parseClassType = clazz.parseClassType = function (componentType) {
+ var ret = {main: '', sub: ''};
+ if (componentType) {
+ componentType = componentType.split(TYPE_DELIMITER);
+ ret.main = componentType[0] || '';
+ ret.sub = componentType[1] || '';
+ }
+ return ret;
+ };
+ /**
+ * @public
+ */
+ clazz.enableClassExtend = function (RootClass, preConstruct) {
+ RootClass.extend = function (proto) {
+ var ExtendedClass = function () {
+ preConstruct && preConstruct.apply(this, arguments);
+ RootClass.apply(this, arguments);
+ };
+
+ zrUtil.extend(ExtendedClass.prototype, proto);
+
+ ExtendedClass.extend = this.extend;
+ ExtendedClass.superCall = superCall;
+ ExtendedClass.superApply = superApply;
+ zrUtil.inherits(ExtendedClass, this);
+ ExtendedClass.superClass = this;
+
+ return ExtendedClass;
+ };
+ };
+
+ // superCall should have class info, which can not be fetch from 'this'.
+ // Consider this case:
+ // class A has method f,
+ // class B inherits class A, overrides method f, f call superApply('f'),
+ // class C inherits class B, do not overrides method f,
+ // then when method of class C is called, dead loop occured.
+ function superCall(context, methodName) {
+ var args = zrUtil.slice(arguments, 2);
+ return this.superClass.prototype[methodName].apply(context, args);
+ }
+
+ function superApply(context, methodName, args) {
+ return this.superClass.prototype[methodName].apply(context, args);
+ }
+
+ /**
+ * @param {Object} entity
+ * @param {Object} options
+ * @param {boolean} [options.registerWhenExtend]
+ * @public
+ */
+ clazz.enableClassManagement = function (entity, options) {
+ options = options || {};
+
+ /**
+ * Component model classes
+ * key: componentType,
+ * value:
+ * componentClass, when componentType is 'xxx'
+ * or Object.<subKey, componentClass>, when componentType is 'xxx.yy'
+ * @type {Object}
+ */
+ var storage = {};
+
+ entity.registerClass = function (Clazz, componentType) {
+ if (componentType) {
+ componentType = parseClassType(componentType);
+
+ if (!componentType.sub) {
+ if (storage[componentType.main]) {
+ throw new Error(componentType.main + 'exists.');
+ }
+ storage[componentType.main] = Clazz;
+ }
+ else if (componentType.sub !== IS_CONTAINER) {
+ var container = makeContainer(componentType);
+ container[componentType.sub] = Clazz;
+ }
+ }
+ return Clazz;
+ };
+
+ entity.getClass = function (componentTypeMain, subType, throwWhenNotFound) {
+ var Clazz = storage[componentTypeMain];
+
+ if (Clazz && Clazz[IS_CONTAINER]) {
+ Clazz = subType ? Clazz[subType] : null;
+ }
+
+ if (throwWhenNotFound && !Clazz) {
+ throw new Error(
+ 'Component ' + componentTypeMain + '.' + (subType || '') + ' not exists. Load it first.'
+ );
+ }
+
+ return Clazz;
+ };
+
+ entity.getClassesByMainType = function (componentType) {
+ componentType = parseClassType(componentType);
+
+ var result = [];
+ var obj = storage[componentType.main];
+
+ if (obj && obj[IS_CONTAINER]) {
+ zrUtil.each(obj, function (o, type) {
+ type !== IS_CONTAINER && result.push(o);
+ });
+ }
+ else {
+ result.push(obj);
+ }
+
+ return result;
+ };
+
+ entity.hasClass = function (componentType) {
+ // Just consider componentType.main.
+ componentType = parseClassType(componentType);
+ return !!storage[componentType.main];
+ };
+
+ /**
+ * @return {Array.<string>} Like ['aa', 'bb'], but can not be ['aa.xx']
+ */
+ entity.getAllClassMainTypes = function () {
+ var types = [];
+ zrUtil.each(storage, function (obj, type) {
+ types.push(type);
+ });
+ return types;
+ };
+
+ /**
+ * If a main type is container and has sub types
+ * @param {string} mainType
+ * @return {boolean}
+ */
+ entity.hasSubTypes = function (componentType) {
+ componentType = parseClassType(componentType);
+ var obj = storage[componentType.main];
+ return obj && obj[IS_CONTAINER];
+ };
+
+ entity.parseClassType = parseClassType;
+
+ function makeContainer(componentType) {
+ var container = storage[componentType.main];
+ if (!container || !container[IS_CONTAINER]) {
+ container = storage[componentType.main] = {};
+ container[IS_CONTAINER] = true;
+ }
+ return container;
+ }
+
+ if (options.registerWhenExtend) {
+ var originalExtend = entity.extend;
+ if (originalExtend) {
+ entity.extend = function (proto) {
+ var ExtendedClass = originalExtend.call(this, proto);
+ return entity.registerClass(ExtendedClass, proto.type);
+ };
+ }
+ }
+
+ return entity;
+ };
+
+ /**
+ * @param {string|Array.<string>} properties
+ */
+ clazz.setReadOnly = function (obj, properties) {
+ // FIXME It seems broken in IE8 simulation of IE11
+ // if (!zrUtil.isArray(properties)) {
+ // properties = properties != null ? [properties] : [];
+ // }
+ // zrUtil.each(properties, function (prop) {
+ // var value = obj[prop];
+
+ // Object.defineProperty
+ // && Object.defineProperty(obj, prop, {
+ // value: value, writable: false
+ // });
+ // zrUtil.isArray(obj[prop])
+ // && Object.freeze
+ // && Object.freeze(obj[prop]);
+ // });
+ };
+
+ module.exports = clazz;
+
+
+/***/ },
+/* 10 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+ var getLineStyle = __webpack_require__(11)(
+ [
+ ['lineWidth', 'width'],
+ ['stroke', 'color'],
+ ['opacity'],
+ ['shadowBlur'],
+ ['shadowOffsetX'],
+ ['shadowOffsetY'],
+ ['shadowColor']
+ ]
+ );
+ module.exports = {
+ getLineStyle: function (excludes) {
+ var style = getLineStyle.call(this, excludes);
+ var lineDash = this.getLineDash();
+ lineDash && (style.lineDash = lineDash);
+ return style;
+ },
+
+ getLineDash: function () {
+ var lineType = this.get('type');
+ return (lineType === 'solid' || lineType == null) ? null
+ : (lineType === 'dashed' ? [5, 5] : [1, 1]);
+ }
+ };
+
+
+/***/ },
+/* 11 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // TODO Parse shadow style
+ // TODO Only shallow path support
+
+ var zrUtil = __webpack_require__(3);
+
+ module.exports = function (properties) {
+ // Normalize
+ for (var i = 0; i < properties.length; i++) {
+ if (!properties[i][1]) {
+ properties[i][1] = properties[i][0];
+ }
+ }
+ return function (excludes) {
+ var style = {};
+ for (var i = 0; i < properties.length; i++) {
+ var propName = properties[i][1];
+ if (excludes && zrUtil.indexOf(excludes, propName) >= 0) {
+ continue;
+ }
+ var val = this.getShallow(propName);
+ if (val != null) {
+ style[properties[i][0]] = val;
+ }
+ }
+ return style;
+ };
+ };
+
+
+/***/ },
+/* 12 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+ module.exports = {
+ getAreaStyle: __webpack_require__(11)(
+ [
+ ['fill', 'color'],
+ ['shadowBlur'],
+ ['shadowOffsetX'],
+ ['shadowOffsetY'],
+ ['opacity'],
+ ['shadowColor']
+ ]
+ )
+ };
+
+
+/***/ },
+/* 13 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var textContain = __webpack_require__(14);
+
+ function getShallow(model, path) {
+ return model && model.getShallow(path);
+ }
+
+ module.exports = {
+ /**
+ * Get color property or get color from option.textStyle.color
+ * @return {string}
+ */
+ getTextColor: function () {
+ var ecModel = this.ecModel;
+ return this.getShallow('color')
+ || (ecModel && ecModel.get('textStyle.color'));
+ },
+
+ /**
+ * Create font string from fontStyle, fontWeight, fontSize, fontFamily
+ * @return {string}
+ */
+ getFont: function () {
+ var ecModel = this.ecModel;
+ var gTextStyleModel = ecModel && ecModel.getModel('textStyle');
+ return [
+ // FIXME in node-canvas fontWeight is before fontStyle
+ this.getShallow('fontStyle') || getShallow(gTextStyleModel, 'fontStyle'),
+ this.getShallow('fontWeight') || getShallow(gTextStyleModel, 'fontWeight'),
+ (this.getShallow('fontSize') || getShallow(gTextStyleModel, 'fontSize') || 12) + 'px',
+ this.getShallow('fontFamily') || getShallow(gTextStyleModel, 'fontFamily') || 'sans-serif'
+ ].join(' ');
+ },
+
+ getTextRect: function (text) {
+ var textStyle = this.get('textStyle') || {};
+ return textContain.getBoundingRect(
+ text,
+ this.getFont(),
+ textStyle.align,
+ textStyle.baseline
+ );
+ },
+
+ ellipsis: function (text, containerWidth, options) {
+ return textContain.ellipsis(
+ text, this.getFont(), containerWidth, options
+ );
+ }
+ };
+
+
+/***/ },
+/* 14 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var textWidthCache = {};
+ var textWidthCacheCounter = 0;
+ var TEXT_CACHE_MAX = 5000;
+
+ var util = __webpack_require__(3);
+ var BoundingRect = __webpack_require__(15);
+
+ function getTextWidth(text, textFont) {
+ var key = text + ':' + textFont;
+ if (textWidthCache[key]) {
+ return textWidthCache[key];
+ }
+
+ var textLines = (text + '').split('\n');
+ var width = 0;
+
+ for (var i = 0, l = textLines.length; i < l; i++) {
+ // measureText å¯ä»¥è¢«è¦†ç›–以兼容ä¸æ”¯æŒ Canvas 的环境
+ width = Math.max(textContain.measureText(textLines[i], textFont).width, width);
+ }
+
+ if (textWidthCacheCounter > TEXT_CACHE_MAX) {
+ textWidthCacheCounter = 0;
+ textWidthCache = {};
+ }
+ textWidthCacheCounter++;
+ textWidthCache[key] = width;
+
+ return width;
+ }
+
+ function getTextRect(text, textFont, textAlign, textBaseline) {
+ var textLineLen = ((text || '') + '').split('\n').length;
+
+ var width = getTextWidth(text, textFont);
+ // FIXME 高度计算比较粗暴
+ var lineHeight = getTextWidth('国', textFont);
+ var height = textLineLen * lineHeight;
+
+ var rect = new BoundingRect(0, 0, width, height);
+ // Text has a special line height property
+ rect.lineHeight = lineHeight;
+
+ switch (textBaseline) {
+ case 'bottom':
+ case 'alphabetic':
+ rect.y -= lineHeight;
+ break;
+ case 'middle':
+ rect.y -= lineHeight / 2;
+ break;
+ // case 'hanging':
+ // case 'top':
+ }
+
+ // FIXME Right to left language
+ switch (textAlign) {
+ case 'end':
+ case 'right':
+ rect.x -= rect.width;
+ break;
+ case 'center':
+ rect.x -= rect.width / 2;
+ break;
+ // case 'start':
+ // case 'left':
+ }
+
+ return rect;
+ }
+
+ function adjustTextPositionOnRect(textPosition, rect, textRect, distance) {
+
+ var x = rect.x;
+ var y = rect.y;
+
+ var height = rect.height;
+ var width = rect.width;
+
+ var textHeight = textRect.height;
+
+ var halfHeight = height / 2 - textHeight / 2;
+
+ var textAlign = 'left';
+
+ switch (textPosition) {
+ case 'left':
+ x -= distance;
+ y += halfHeight;
+ textAlign = 'right';
+ break;
+ case 'right':
+ x += distance + width;
+ y += halfHeight;
+ textAlign = 'left';
+ break;
+ case 'top':
+ x += width / 2;
+ y -= distance + textHeight;
+ textAlign = 'center';
+ break;
+ case 'bottom':
+ x += width / 2;
+ y += height + distance;
+ textAlign = 'center';
+ break;
+ case 'inside':
+ x += width / 2;
+ y += halfHeight;
+ textAlign = 'center';
+ break;
+ case 'insideLeft':
+ x += distance;
+ y += halfHeight;
+ textAlign = 'left';
+ break;
+ case 'insideRight':
+ x += width - distance;
+ y += halfHeight;
+ textAlign = 'right';
+ break;
+ case 'insideTop':
+ x += width / 2;
+ y += distance;
+ textAlign = 'center';
+ break;
+ case 'insideBottom':
+ x += width / 2;
+ y += height - textHeight - distance;
+ textAlign = 'center';
+ break;
+ case 'insideTopLeft':
+ x += distance;
+ y += distance;
+ textAlign = 'left';
+ break;
+ case 'insideTopRight':
+ x += width - distance;
+ y += distance;
+ textAlign = 'right';
+ break;
+ case 'insideBottomLeft':
+ x += distance;
+ y += height - textHeight - distance;
+ break;
+ case 'insideBottomRight':
+ x += width - distance;
+ y += height - textHeight - distance;
+ textAlign = 'right';
+ break;
+ }
+
+ return {
+ x: x,
+ y: y,
+ textAlign: textAlign,
+ textBaseline: 'top'
+ };
+ }
+
+ /**
+ * Show ellipsis if overflow.
+ *
+ * @param {string} text
+ * @param {string} textFont
+ * @param {string} containerWidth
+ * @param {Object} [options]
+ * @param {number} [options.ellipsis='...']
+ * @param {number} [options.maxIterations=3]
+ * @param {number} [options.minCharacters=3]
+ * @return {string}
+ */
+ function textEllipsis(text, textFont, containerWidth, options) {
+ if (!containerWidth) {
+ return '';
+ }
+
+ options = util.defaults({
+ ellipsis: '...',
+ minCharacters: 3,
+ maxIterations: 3,
+ cnCharWidth: getTextWidth('国', textFont),
+ // FIXME
+ // 未考虑éžç­‰å®½å­—体
+ ascCharWidth: getTextWidth('a', textFont)
+ }, options, true);
+
+ containerWidth -= getTextWidth(options.ellipsis);
+
+ var textLines = (text + '').split('\n');
+
+ for (var i = 0, len = textLines.length; i < len; i++) {
+ textLines[i] = textLineTruncate(
+ textLines[i], textFont, containerWidth, options
+ );
+ }
+
+ return textLines.join('\n');
+ }
+
+ function textLineTruncate(text, textFont, containerWidth, options) {
+ // FIXME
+ // 粗糙得写的,尚未考虑性能和å„ç§è¯­è¨€ã€å­—体的效果。
+ for (var i = 0;; i++) {
+ var lineWidth = getTextWidth(text, textFont);
+
+ if (lineWidth < containerWidth || i >= options.maxIterations) {
+ text += options.ellipsis;
+ break;
+ }
+
+ var subLength = i === 0
+ ? estimateLength(text, containerWidth, options)
+ : Math.floor(text.length * containerWidth / lineWidth);
+
+ if (subLength < options.minCharacters) {
+ text = '';
+ break;
+ }
+
+ text = text.substr(0, subLength);
+ }
+
+ return text;
+ }
+
+ function estimateLength(text, containerWidth, options) {
+ var width = 0;
+ var i = 0;
+ for (var len = text.length; i < len && width < containerWidth; i++) {
+ var charCode = text.charCodeAt(i);
+ width += (0 <= charCode && charCode <= 127)
+ ? options.ascCharWidth : options.cnCharWidth;
+ }
+ return i;
+ }
+
+ var textContain = {
+
+ getWidth: getTextWidth,
+
+ getBoundingRect: getTextRect,
+
+ adjustTextPositionOnRect: adjustTextPositionOnRect,
+
+ ellipsis: textEllipsis,
+
+ measureText: function (text, textFont) {
+ var ctx = util.getContext();
+ ctx.font = textFont;
+ return ctx.measureText(text);
+ }
+ };
+
+ module.exports = textContain;
+
+
+/***/ },
+/* 15 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ /**
+ * @module echarts/core/BoundingRect
+ */
+
+
+ var vec2 = __webpack_require__(16);
+ var matrix = __webpack_require__(17);
+
+ var v2ApplyTransform = vec2.applyTransform;
+ var mathMin = Math.min;
+ var mathAbs = Math.abs;
+ var mathMax = Math.max;
+ /**
+ * @alias module:echarts/core/BoundingRect
+ */
+ function BoundingRect(x, y, width, height) {
+ /**
+ * @type {number}
+ */
+ this.x = x;
+ /**
+ * @type {number}
+ */
+ this.y = y;
+ /**
+ * @type {number}
+ */
+ this.width = width;
+ /**
+ * @type {number}
+ */
+ this.height = height;
+ }
+
+ BoundingRect.prototype = {
+
+ constructor: BoundingRect,
+
+ /**
+ * @param {module:echarts/core/BoundingRect} other
+ */
+ union: function (other) {
+ var x = mathMin(other.x, this.x);
+ var y = mathMin(other.y, this.y);
+
+ this.width = mathMax(
+ other.x + other.width,
+ this.x + this.width
+ ) - x;
+ this.height = mathMax(
+ other.y + other.height,
+ this.y + this.height
+ ) - y;
+ this.x = x;
+ this.y = y;
+ },
+
+ /**
+ * @param {Array.<number>} m
+ * @methods
+ */
+ applyTransform: (function () {
+ var min = [];
+ var max = [];
+ return function (m) {
+ // In case usage like this
+ // el.getBoundingRect().applyTransform(el.transform)
+ // And element has no transform
+ if (!m) {
+ return;
+ }
+ min[0] = this.x;
+ min[1] = this.y;
+ max[0] = this.x + this.width;
+ max[1] = this.y + this.height;
+
+ v2ApplyTransform(min, min, m);
+ v2ApplyTransform(max, max, m);
+
+ this.x = mathMin(min[0], max[0]);
+ this.y = mathMin(min[1], max[1]);
+ this.width = mathAbs(max[0] - min[0]);
+ this.height = mathAbs(max[1] - min[1]);
+ };
+ })(),
+
+ /**
+ * Calculate matrix of transforming from self to target rect
+ * @param {module:zrender/core/BoundingRect} b
+ * @return {Array.<number>}
+ */
+ calculateTransform: function (b) {
+ var a = this;
+ var sx = b.width / a.width;
+ var sy = b.height / a.height;
+
+ var m = matrix.create();
+
+ // 矩阵å³ä¹˜
+ matrix.translate(m, m, [-a.x, -a.y]);
+ matrix.scale(m, m, [sx, sy]);
+ matrix.translate(m, m, [b.x, b.y]);
+
+ return m;
+ },
+
+ /**
+ * @param {(module:echarts/core/BoundingRect|Object)} b
+ * @return {boolean}
+ */
+ intersect: function (b) {
+ var a = this;
+ var ax0 = a.x;
+ var ax1 = a.x + a.width;
+ var ay0 = a.y;
+ var ay1 = a.y + a.height;
+
+ var bx0 = b.x;
+ var bx1 = b.x + b.width;
+ var by0 = b.y;
+ var by1 = b.y + b.height;
+
+ return ! (ax1 < bx0 || bx1 < ax0 || ay1 < by0 || by1 < ay0);
+ },
+
+ contain: function (x, y) {
+ var rect = this;
+ return x >= rect.x
+ && x <= (rect.x + rect.width)
+ && y >= rect.y
+ && y <= (rect.y + rect.height);
+ },
+
+ /**
+ * @return {module:echarts/core/BoundingRect}
+ */
+ clone: function () {
+ return new BoundingRect(this.x, this.y, this.width, this.height);
+ },
+
+ /**
+ * Copy from another rect
+ */
+ copy: function (other) {
+ this.x = other.x;
+ this.y = other.y;
+ this.width = other.width;
+ this.height = other.height;
+ }
+ };
+
+ module.exports = BoundingRect;
+
+
+/***/ },
+/* 16 */
+/***/ function(module, exports) {
+
+
+ var ArrayCtor = typeof Float32Array === 'undefined'
+ ? Array
+ : Float32Array;
+
+ /**
+ * @typedef {Float32Array|Array.<number>} Vector2
+ */
+ /**
+ * 二维å‘é‡ç±»
+ * @exports zrender/tool/vector
+ */
+ var vector = {
+ /**
+ * 创建一个å‘é‡
+ * @param {number} [x=0]
+ * @param {number} [y=0]
+ * @return {Vector2}
+ */
+ create: function (x, y) {
+ var out = new ArrayCtor(2);
+ out[0] = x || 0;
+ out[1] = y || 0;
+ return out;
+ },
+
+ /**
+ * å¤åˆ¶å‘é‡æ•°æ®
+ * @param {Vector2} out
+ * @param {Vector2} v
+ * @return {Vector2}
+ */
+ copy: function (out, v) {
+ out[0] = v[0];
+ out[1] = v[1];
+ return out;
+ },
+
+ /**
+ * 克隆一个å‘é‡
+ * @param {Vector2} v
+ * @return {Vector2}
+ */
+ clone: function (v) {
+ var out = new ArrayCtor(2);
+ out[0] = v[0];
+ out[1] = v[1];
+ return out;
+ },
+
+ /**
+ * 设置å‘é‡çš„两个项
+ * @param {Vector2} out
+ * @param {number} a
+ * @param {number} b
+ * @return {Vector2} 结果
+ */
+ set: function (out, a, b) {
+ out[0] = a;
+ out[1] = b;
+ return out;
+ },
+
+ /**
+ * å‘é‡ç›¸åŠ 
+ * @param {Vector2} out
+ * @param {Vector2} v1
+ * @param {Vector2} v2
+ */
+ add: function (out, v1, v2) {
+ out[0] = v1[0] + v2[0];
+ out[1] = v1[1] + v2[1];
+ return out;
+ },
+
+ /**
+ * å‘é‡ç¼©æ”¾åŽç›¸åŠ 
+ * @param {Vector2} out
+ * @param {Vector2} v1
+ * @param {Vector2} v2
+ * @param {number} a
+ */
+ scaleAndAdd: function (out, v1, v2, a) {
+ out[0] = v1[0] + v2[0] * a;
+ out[1] = v1[1] + v2[1] * a;
+ return out;
+ },
+
+ /**
+ * å‘é‡ç›¸å‡
+ * @param {Vector2} out
+ * @param {Vector2} v1
+ * @param {Vector2} v2
+ */
+ sub: function (out, v1, v2) {
+ out[0] = v1[0] - v2[0];
+ out[1] = v1[1] - v2[1];
+ return out;
+ },
+
+ /**
+ * å‘é‡é•¿åº¦
+ * @param {Vector2} v
+ * @return {number}
+ */
+ len: function (v) {
+ return Math.sqrt(this.lenSquare(v));
+ },
+
+ /**
+ * å‘é‡é•¿åº¦å¹³æ–¹
+ * @param {Vector2} v
+ * @return {number}
+ */
+ lenSquare: function (v) {
+ return v[0] * v[0] + v[1] * v[1];
+ },
+
+ /**
+ * å‘é‡ä¹˜æ³•
+ * @param {Vector2} out
+ * @param {Vector2} v1
+ * @param {Vector2} v2
+ */
+ mul: function (out, v1, v2) {
+ out[0] = v1[0] * v2[0];
+ out[1] = v1[1] * v2[1];
+ return out;
+ },
+
+ /**
+ * å‘é‡é™¤æ³•
+ * @param {Vector2} out
+ * @param {Vector2} v1
+ * @param {Vector2} v2
+ */
+ div: function (out, v1, v2) {
+ out[0] = v1[0] / v2[0];
+ out[1] = v1[1] / v2[1];
+ return out;
+ },
+
+ /**
+ * å‘é‡ç‚¹ä¹˜
+ * @param {Vector2} v1
+ * @param {Vector2} v2
+ * @return {number}
+ */
+ dot: function (v1, v2) {
+ return v1[0] * v2[0] + v1[1] * v2[1];
+ },
+
+ /**
+ * å‘é‡ç¼©æ”¾
+ * @param {Vector2} out
+ * @param {Vector2} v
+ * @param {number} s
+ */
+ scale: function (out, v, s) {
+ out[0] = v[0] * s;
+ out[1] = v[1] * s;
+ return out;
+ },
+
+ /**
+ * å‘é‡å½’一化
+ * @param {Vector2} out
+ * @param {Vector2} v
+ */
+ normalize: function (out, v) {
+ var d = vector.len(v);
+ if (d === 0) {
+ out[0] = 0;
+ out[1] = 0;
+ }
+ else {
+ out[0] = v[0] / d;
+ out[1] = v[1] / d;
+ }
+ return out;
+ },
+
+ /**
+ * 计算å‘é‡é—´è·ç¦»
+ * @param {Vector2} v1
+ * @param {Vector2} v2
+ * @return {number}
+ */
+ distance: function (v1, v2) {
+ return Math.sqrt(
+ (v1[0] - v2[0]) * (v1[0] - v2[0])
+ + (v1[1] - v2[1]) * (v1[1] - v2[1])
+ );
+ },
+
+ /**
+ * å‘é‡è·ç¦»å¹³æ–¹
+ * @param {Vector2} v1
+ * @param {Vector2} v2
+ * @return {number}
+ */
+ distanceSquare: function (v1, v2) {
+ return (v1[0] - v2[0]) * (v1[0] - v2[0])
+ + (v1[1] - v2[1]) * (v1[1] - v2[1]);
+ },
+
+ /**
+ * 求负å‘é‡
+ * @param {Vector2} out
+ * @param {Vector2} v
+ */
+ negate: function (out, v) {
+ out[0] = -v[0];
+ out[1] = -v[1];
+ return out;
+ },
+
+ /**
+ * æ’值两个点
+ * @param {Vector2} out
+ * @param {Vector2} v1
+ * @param {Vector2} v2
+ * @param {number} t
+ */
+ lerp: function (out, v1, v2, t) {
+ out[0] = v1[0] + t * (v2[0] - v1[0]);
+ out[1] = v1[1] + t * (v2[1] - v1[1]);
+ return out;
+ },
+
+ /**
+ * 矩阵左乘å‘é‡
+ * @param {Vector2} out
+ * @param {Vector2} v
+ * @param {Vector2} m
+ */
+ applyTransform: function (out, v, m) {
+ var x = v[0];
+ var y = v[1];
+ out[0] = m[0] * x + m[2] * y + m[4];
+ out[1] = m[1] * x + m[3] * y + m[5];
+ return out;
+ },
+ /**
+ * 求两个å‘é‡æœ€å°å€¼
+ * @param {Vector2} out
+ * @param {Vector2} v1
+ * @param {Vector2} v2
+ */
+ min: function (out, v1, v2) {
+ out[0] = Math.min(v1[0], v2[0]);
+ out[1] = Math.min(v1[1], v2[1]);
+ return out;
+ },
+ /**
+ * 求两个å‘é‡æœ€å¤§å€¼
+ * @param {Vector2} out
+ * @param {Vector2} v1
+ * @param {Vector2} v2
+ */
+ max: function (out, v1, v2) {
+ out[0] = Math.max(v1[0], v2[0]);
+ out[1] = Math.max(v1[1], v2[1]);
+ return out;
+ }
+ };
+
+ vector.length = vector.len;
+ vector.lengthSquare = vector.lenSquare;
+ vector.dist = vector.distance;
+ vector.distSquare = vector.distanceSquare;
+
+ module.exports = vector;
+
+
+
+/***/ },
+/* 17 */
+/***/ function(module, exports) {
+
+
+ var ArrayCtor = typeof Float32Array === 'undefined'
+ ? Array
+ : Float32Array;
+ /**
+ * 3x2矩阵æ“作类
+ * @exports zrender/tool/matrix
+ */
+ var matrix = {
+ /**
+ * 创建一个å•ä½çŸ©é˜µ
+ * @return {Float32Array|Array.<number>}
+ */
+ create : function() {
+ var out = new ArrayCtor(6);
+ matrix.identity(out);
+
+ return out;
+ },
+ /**
+ * 设置矩阵为å•ä½çŸ©é˜µ
+ * @param {Float32Array|Array.<number>} out
+ */
+ identity : function(out) {
+ out[0] = 1;
+ out[1] = 0;
+ out[2] = 0;
+ out[3] = 1;
+ out[4] = 0;
+ out[5] = 0;
+ return out;
+ },
+ /**
+ * å¤åˆ¶çŸ©é˜µ
+ * @param {Float32Array|Array.<number>} out
+ * @param {Float32Array|Array.<number>} m
+ */
+ copy: function(out, m) {
+ out[0] = m[0];
+ out[1] = m[1];
+ out[2] = m[2];
+ out[3] = m[3];
+ out[4] = m[4];
+ out[5] = m[5];
+ return out;
+ },
+ /**
+ * 矩阵相乘
+ * @param {Float32Array|Array.<number>} out
+ * @param {Float32Array|Array.<number>} m1
+ * @param {Float32Array|Array.<number>} m2
+ */
+ mul : function (out, m1, m2) {
+ // Consider matrix.mul(m, m2, m);
+ // where out is the same as m2.
+ // So use temp variable to escape error.
+ var out0 = m1[0] * m2[0] + m1[2] * m2[1];
+ var out1 = m1[1] * m2[0] + m1[3] * m2[1];
+ var out2 = m1[0] * m2[2] + m1[2] * m2[3];
+ var out3 = m1[1] * m2[2] + m1[3] * m2[3];
+ var out4 = m1[0] * m2[4] + m1[2] * m2[5] + m1[4];
+ var out5 = m1[1] * m2[4] + m1[3] * m2[5] + m1[5];
+ out[0] = out0;
+ out[1] = out1;
+ out[2] = out2;
+ out[3] = out3;
+ out[4] = out4;
+ out[5] = out5;
+ return out;
+ },
+ /**
+ * 平移å˜æ¢
+ * @param {Float32Array|Array.<number>} out
+ * @param {Float32Array|Array.<number>} a
+ * @param {Float32Array|Array.<number>} v
+ */
+ translate : function(out, a, v) {
+ out[0] = a[0];
+ out[1] = a[1];
+ out[2] = a[2];
+ out[3] = a[3];
+ out[4] = a[4] + v[0];
+ out[5] = a[5] + v[1];
+ return out;
+ },
+ /**
+ * 旋转å˜æ¢
+ * @param {Float32Array|Array.<number>} out
+ * @param {Float32Array|Array.<number>} a
+ * @param {number} rad
+ */
+ rotate : function(out, a, rad) {
+ var aa = a[0];
+ var ac = a[2];
+ var atx = a[4];
+ var ab = a[1];
+ var ad = a[3];
+ var aty = a[5];
+ var st = Math.sin(rad);
+ var ct = Math.cos(rad);
+
+ out[0] = aa * ct + ab * st;
+ out[1] = -aa * st + ab * ct;
+ out[2] = ac * ct + ad * st;
+ out[3] = -ac * st + ct * ad;
+ out[4] = ct * atx + st * aty;
+ out[5] = ct * aty - st * atx;
+ return out;
+ },
+ /**
+ * 缩放å˜æ¢
+ * @param {Float32Array|Array.<number>} out
+ * @param {Float32Array|Array.<number>} a
+ * @param {Float32Array|Array.<number>} v
+ */
+ scale : function(out, a, v) {
+ var vx = v[0];
+ var vy = v[1];
+ out[0] = a[0] * vx;
+ out[1] = a[1] * vy;
+ out[2] = a[2] * vx;
+ out[3] = a[3] * vy;
+ out[4] = a[4] * vx;
+ out[5] = a[5] * vy;
+ return out;
+ },
+ /**
+ * 求逆矩阵
+ * @param {Float32Array|Array.<number>} out
+ * @param {Float32Array|Array.<number>} a
+ */
+ invert : function(out, a) {
+
+ var aa = a[0];
+ var ac = a[2];
+ var atx = a[4];
+ var ab = a[1];
+ var ad = a[3];
+ var aty = a[5];
+
+ var det = aa * ad - ab * ac;
+ if (!det) {
+ return null;
+ }
+ det = 1.0 / det;
+
+ out[0] = ad * det;
+ out[1] = -ab * det;
+ out[2] = -ac * det;
+ out[3] = aa * det;
+ out[4] = (ac * aty - ad * atx) * det;
+ out[5] = (ab * atx - aa * aty) * det;
+ return out;
+ }
+ };
+
+ module.exports = matrix;
+
+
+
+/***/ },
+/* 18 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+ module.exports = {
+ getItemStyle: __webpack_require__(11)(
+ [
+ ['fill', 'color'],
+ ['stroke', 'borderColor'],
+ ['lineWidth', 'borderWidth'],
+ ['opacity'],
+ ['shadowBlur'],
+ ['shadowOffsetX'],
+ ['shadowOffsetY'],
+ ['shadowColor']
+ ]
+ )
+ };
+
+
+/***/ },
+/* 19 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Component model
+ *
+ * @module echarts/model/Component
+ */
+
+
+ var Model = __webpack_require__(8);
+ var zrUtil = __webpack_require__(3);
+ var arrayPush = Array.prototype.push;
+ var componentUtil = __webpack_require__(20);
+ var clazzUtil = __webpack_require__(9);
+ var layout = __webpack_require__(21);
+
+ /**
+ * @alias module:echarts/model/Component
+ * @constructor
+ * @param {Object} option
+ * @param {module:echarts/model/Model} parentModel
+ * @param {module:echarts/model/Model} ecModel
+ */
+ var ComponentModel = Model.extend({
+
+ type: 'component',
+
+ /**
+ * @readOnly
+ * @type {string}
+ */
+ id: '',
+
+ /**
+ * @readOnly
+ */
+ name: '',
+
+ /**
+ * @readOnly
+ * @type {string}
+ */
+ mainType: '',
+
+ /**
+ * @readOnly
+ * @type {string}
+ */
+ subType: '',
+
+ /**
+ * @readOnly
+ * @type {number}
+ */
+ componentIndex: 0,
+
+ /**
+ * @type {Object}
+ * @protected
+ */
+ defaultOption: null,
+
+ /**
+ * @type {module:echarts/model/Global}
+ * @readOnly
+ */
+ ecModel: null,
+
+ /**
+ * key: componentType
+ * value: Component model list, can not be null.
+ * @type {Object.<string, Array.<module:echarts/model/Model>>}
+ * @readOnly
+ */
+ dependentModels: [],
+
+ /**
+ * @type {string}
+ * @readOnly
+ */
+ uid: null,
+
+ /**
+ * Support merge layout params.
+ * Only support 'box' now (left/right/top/bottom/width/height).
+ * @type {string|Object} Object can be {ignoreSize: true}
+ * @readOnly
+ */
+ layoutMode: null,
+
+
+ init: function (option, parentModel, ecModel, extraOpt) {
+ this.mergeDefaultAndTheme(this.option, this.ecModel);
+ },
+
+ mergeDefaultAndTheme: function (option, ecModel) {
+ var layoutMode = this.layoutMode;
+ var inputPositionParams = layoutMode
+ ? layout.getLayoutParams(option) : {};
+
+ var themeModel = ecModel.getTheme();
+ zrUtil.merge(option, themeModel.get(this.mainType));
+ zrUtil.merge(option, this.getDefaultOption());
+
+ if (layoutMode) {
+ layout.mergeLayoutParam(option, inputPositionParams, layoutMode);
+ }
+ },
+
+ mergeOption: function (option) {
+ zrUtil.merge(this.option, option, true);
+
+ var layoutMode = this.layoutMode;
+ if (layoutMode) {
+ layout.mergeLayoutParam(this.option, option, layoutMode);
+ }
+ },
+
+ // Hooker after init or mergeOption
+ optionUpdated: function (ecModel) {},
+
+ getDefaultOption: function () {
+ if (!this.hasOwnProperty('__defaultOption')) {
+ var optList = [];
+ var Class = this.constructor;
+ while (Class) {
+ var opt = Class.prototype.defaultOption;
+ opt && optList.push(opt);
+ Class = Class.superClass;
+ }
+
+ var defaultOption = {};
+ for (var i = optList.length - 1; i >= 0; i--) {
+ defaultOption = zrUtil.merge(defaultOption, optList[i], true);
+ }
+ this.__defaultOption = defaultOption;
+ }
+ return this.__defaultOption;
+ }
+
+ });
+
+ // Reset ComponentModel.extend, add preConstruct.
+ clazzUtil.enableClassExtend(
+ ComponentModel,
+ function (option, parentModel, ecModel, extraOpt) {
+ // Set dependentModels, componentIndex, name, id, mainType, subType.
+ zrUtil.extend(this, extraOpt);
+
+ this.uid = componentUtil.getUID('componentModel');
+
+ // this.setReadOnly([
+ // 'type', 'id', 'uid', 'name', 'mainType', 'subType',
+ // 'dependentModels', 'componentIndex'
+ // ]);
+ }
+ );
+
+ // Add capability of registerClass, getClass, hasClass, registerSubTypeDefaulter and so on.
+ clazzUtil.enableClassManagement(
+ ComponentModel, {registerWhenExtend: true}
+ );
+ componentUtil.enableSubTypeDefaulter(ComponentModel);
+
+ // Add capability of ComponentModel.topologicalTravel.
+ componentUtil.enableTopologicalTravel(ComponentModel, getDependencies);
+
+ function getDependencies(componentType) {
+ var deps = [];
+ zrUtil.each(ComponentModel.getClassesByMainType(componentType), function (Clazz) {
+ arrayPush.apply(deps, Clazz.prototype.dependencies || []);
+ });
+ // Ensure main type
+ return zrUtil.map(deps, function (type) {
+ return clazzUtil.parseClassType(type).main;
+ });
+ }
+
+ zrUtil.mixin(ComponentModel, __webpack_require__(22));
+
+ module.exports = ComponentModel;
+
+
+/***/ },
+/* 20 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var clazz = __webpack_require__(9);
+
+ var parseClassType = clazz.parseClassType;
+
+ var base = 0;
+
+ var componentUtil = {};
+
+ var DELIMITER = '_';
+
+ /**
+ * @public
+ * @param {string} type
+ * @return {string}
+ */
+ componentUtil.getUID = function (type) {
+ // Considering the case of crossing js context,
+ // use Math.random to make id as unique as possible.
+ return [(type || ''), base++, Math.random()].join(DELIMITER);
+ };
+
+ /**
+ * @inner
+ */
+ componentUtil.enableSubTypeDefaulter = function (entity) {
+
+ var subTypeDefaulters = {};
+
+ entity.registerSubTypeDefaulter = function (componentType, defaulter) {
+ componentType = parseClassType(componentType);
+ subTypeDefaulters[componentType.main] = defaulter;
+ };
+
+ entity.determineSubType = function (componentType, option) {
+ var type = option.type;
+ if (!type) {
+ var componentTypeMain = parseClassType(componentType).main;
+ if (entity.hasSubTypes(componentType) && subTypeDefaulters[componentTypeMain]) {
+ type = subTypeDefaulters[componentTypeMain](option);
+ }
+ }
+ return type;
+ };
+
+ return entity;
+ };
+
+ /**
+ * Topological travel on Activity Network (Activity On Vertices).
+ * Dependencies is defined in Model.prototype.dependencies, like ['xAxis', 'yAxis'].
+ *
+ * If 'xAxis' or 'yAxis' is absent in componentTypeList, just ignore it in topology.
+ *
+ * If there is circle dependencey, Error will be thrown.
+ *
+ */
+ componentUtil.enableTopologicalTravel = function (entity, dependencyGetter) {
+
+ /**
+ * @public
+ * @param {Array.<string>} targetNameList Target Component type list.
+ * Can be ['aa', 'bb', 'aa.xx']
+ * @param {Array.<string>} fullNameList By which we can build dependency graph.
+ * @param {Function} callback Params: componentType, dependencies.
+ * @param {Object} context Scope of callback.
+ */
+ entity.topologicalTravel = function (targetNameList, fullNameList, callback, context) {
+ if (!targetNameList.length) {
+ return;
+ }
+
+ var result = makeDepndencyGraph(fullNameList);
+ var graph = result.graph;
+ var stack = result.noEntryList;
+
+ var targetNameSet = {};
+ zrUtil.each(targetNameList, function (name) {
+ targetNameSet[name] = true;
+ });
+
+ while (stack.length) {
+ var currComponentType = stack.pop();
+ var currVertex = graph[currComponentType];
+ var isInTargetNameSet = !!targetNameSet[currComponentType];
+ if (isInTargetNameSet) {
+ callback.call(context, currComponentType, currVertex.originalDeps.slice());
+ delete targetNameSet[currComponentType];
+ }
+ zrUtil.each(
+ currVertex.successor,
+ isInTargetNameSet ? removeEdgeAndAdd : removeEdge
+ );
+ }
+
+ zrUtil.each(targetNameSet, function () {
+ throw new Error('Circle dependency may exists');
+ });
+
+ function removeEdge(succComponentType) {
+ graph[succComponentType].entryCount--;
+ if (graph[succComponentType].entryCount === 0) {
+ stack.push(succComponentType);
+ }
+ }
+
+ // Consider this case: legend depends on series, and we call
+ // chart.setOption({series: [...]}), where only series is in option.
+ // If we do not have 'removeEdgeAndAdd', legendModel.mergeOption will
+ // not be called, but only sereis.mergeOption is called. Thus legend
+ // have no chance to update its local record about series (like which
+ // name of series is available in legend).
+ function removeEdgeAndAdd(succComponentType) {
+ targetNameSet[succComponentType] = true;
+ removeEdge(succComponentType);
+ }
+ };
+
+ /**
+ * DepndencyGraph: {Object}
+ * key: conponentType,
+ * value: {
+ * successor: [conponentTypes...],
+ * originalDeps: [conponentTypes...],
+ * entryCount: {number}
+ * }
+ */
+ function makeDepndencyGraph(fullNameList) {
+ var graph = {};
+ var noEntryList = [];
+
+ zrUtil.each(fullNameList, function (name) {
+
+ var thisItem = createDependencyGraphItem(graph, name);
+ var originalDeps = thisItem.originalDeps = dependencyGetter(name);
+
+ var availableDeps = getAvailableDependencies(originalDeps, fullNameList);
+ thisItem.entryCount = availableDeps.length;
+ if (thisItem.entryCount === 0) {
+ noEntryList.push(name);
+ }
+
+ zrUtil.each(availableDeps, function (dependentName) {
+ if (zrUtil.indexOf(thisItem.predecessor, dependentName) < 0) {
+ thisItem.predecessor.push(dependentName);
+ }
+ var thatItem = createDependencyGraphItem(graph, dependentName);
+ if (zrUtil.indexOf(thatItem.successor, dependentName) < 0) {
+ thatItem.successor.push(name);
+ }
+ });
+ });
+
+ return {graph: graph, noEntryList: noEntryList};
+ }
+
+ function createDependencyGraphItem(graph, name) {
+ if (!graph[name]) {
+ graph[name] = {predecessor: [], successor: []};
+ }
+ return graph[name];
+ }
+
+ function getAvailableDependencies(originalDeps, fullNameList) {
+ var availableDeps = [];
+ zrUtil.each(originalDeps, function (dep) {
+ zrUtil.indexOf(fullNameList, dep) >= 0 && availableDeps.push(dep);
+ });
+ return availableDeps;
+ }
+ };
+
+ module.exports = componentUtil;
+
+
+/***/ },
+/* 21 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // Layout helpers for each component positioning
+
+
+ var zrUtil = __webpack_require__(3);
+ var BoundingRect = __webpack_require__(15);
+ var numberUtil = __webpack_require__(7);
+ var formatUtil = __webpack_require__(6);
+ var parsePercent = numberUtil.parsePercent;
+ var each = zrUtil.each;
+
+ var layout = {};
+
+ var LOCATION_PARAMS = ['left', 'right', 'top', 'bottom', 'width', 'height'];
+
+ function boxLayout(orient, group, gap, maxWidth, maxHeight) {
+ var x = 0;
+ var y = 0;
+ if (maxWidth == null) {
+ maxWidth = Infinity;
+ }
+ if (maxHeight == null) {
+ maxHeight = Infinity;
+ }
+ var currentLineMaxSize = 0;
+ group.eachChild(function (child, idx) {
+ var position = child.position;
+ var rect = child.getBoundingRect();
+ var nextChild = group.childAt(idx + 1);
+ var nextChildRect = nextChild && nextChild.getBoundingRect();
+ var nextX;
+ var nextY;
+ if (orient === 'horizontal') {
+ var moveX = rect.width + (nextChildRect ? (-nextChildRect.x + rect.x) : 0);
+ nextX = x + moveX;
+ // Wrap when width exceeds maxWidth or meet a `newline` group
+ if (nextX > maxWidth || child.newline) {
+ x = 0;
+ nextX = moveX;
+ y += currentLineMaxSize + gap;
+ currentLineMaxSize = rect.height;
+ }
+ else {
+ currentLineMaxSize = Math.max(currentLineMaxSize, rect.height);
+ }
+ }
+ else {
+ var moveY = rect.height + (nextChildRect ? (-nextChildRect.y + rect.y) : 0);
+ nextY = y + moveY;
+ // Wrap when width exceeds maxHeight or meet a `newline` group
+ if (nextY > maxHeight || child.newline) {
+ x += currentLineMaxSize + gap;
+ y = 0;
+ nextY = moveY;
+ currentLineMaxSize = rect.width;
+ }
+ else {
+ currentLineMaxSize = Math.max(currentLineMaxSize, rect.width);
+ }
+ }
+
+ if (child.newline) {
+ return;
+ }
+
+ position[0] = x;
+ position[1] = y;
+
+ orient === 'horizontal'
+ ? (x = nextX + gap)
+ : (y = nextY + gap);
+ });
+ }
+
+ /**
+ * VBox or HBox layouting
+ * @param {string} orient
+ * @param {module:zrender/container/Group} group
+ * @param {number} gap
+ * @param {number} [width=Infinity]
+ * @param {number} [height=Infinity]
+ */
+ layout.box = boxLayout;
+
+ /**
+ * VBox layouting
+ * @param {module:zrender/container/Group} group
+ * @param {number} gap
+ * @param {number} [width=Infinity]
+ * @param {number} [height=Infinity]
+ */
+ layout.vbox = zrUtil.curry(boxLayout, 'vertical');
+
+ /**
+ * HBox layouting
+ * @param {module:zrender/container/Group} group
+ * @param {number} gap
+ * @param {number} [width=Infinity]
+ * @param {number} [height=Infinity]
+ */
+ layout.hbox = zrUtil.curry(boxLayout, 'horizontal');
+
+ /**
+ * If x or x2 is not specified or 'center' 'left' 'right',
+ * the width would be as long as possible.
+ * If y or y2 is not specified or 'middle' 'top' 'bottom',
+ * the height would be as long as possible.
+ *
+ * @param {Object} positionInfo
+ * @param {number|string} [positionInfo.x]
+ * @param {number|string} [positionInfo.y]
+ * @param {number|string} [positionInfo.x2]
+ * @param {number|string} [positionInfo.y2]
+ * @param {Object} containerRect
+ * @param {string|number} margin
+ * @return {Object} {width, height}
+ */
+ layout.getAvailableSize = function (positionInfo, containerRect, margin) {
+ var containerWidth = containerRect.width;
+ var containerHeight = containerRect.height;
+
+ var x = parsePercent(positionInfo.x, containerWidth);
+ var y = parsePercent(positionInfo.y, containerHeight);
+ var x2 = parsePercent(positionInfo.x2, containerWidth);
+ var y2 = parsePercent(positionInfo.y2, containerHeight);
+
+ (isNaN(x) || isNaN(parseFloat(positionInfo.x))) && (x = 0);
+ (isNaN(x2) || isNaN(parseFloat(positionInfo.x2))) && (x2 = containerWidth);
+ (isNaN(y) || isNaN(parseFloat(positionInfo.y))) && (y = 0);
+ (isNaN(y2) || isNaN(parseFloat(positionInfo.y2))) && (y2 = containerHeight);
+
+ margin = formatUtil.normalizeCssArray(margin || 0);
+
+ return {
+ width: Math.max(x2 - x - margin[1] - margin[3], 0),
+ height: Math.max(y2 - y - margin[0] - margin[2], 0)
+ };
+ };
+
+ /**
+ * Parse position info.
+ *
+ * @param {Object} positionInfo
+ * @param {number|string} [positionInfo.left]
+ * @param {number|string} [positionInfo.top]
+ * @param {number|string} [positionInfo.right]
+ * @param {number|string} [positionInfo.bottom]
+ * @param {number|string} [positionInfo.width]
+ * @param {number|string} [positionInfo.height]
+ * @param {number|string} [positionInfo.aspect] Aspect is width / height
+ * @param {Object} containerRect
+ * @param {string|number} [margin]
+ *
+ * @return {module:zrender/core/BoundingRect}
+ */
+ layout.getLayoutRect = function (
+ positionInfo, containerRect, margin
+ ) {
+ margin = formatUtil.normalizeCssArray(margin || 0);
+
+ var containerWidth = containerRect.width;
+ var containerHeight = containerRect.height;
+
+ var left = parsePercent(positionInfo.left, containerWidth);
+ var top = parsePercent(positionInfo.top, containerHeight);
+ var right = parsePercent(positionInfo.right, containerWidth);
+ var bottom = parsePercent(positionInfo.bottom, containerHeight);
+ var width = parsePercent(positionInfo.width, containerWidth);
+ var height = parsePercent(positionInfo.height, containerHeight);
+
+ var verticalMargin = margin[2] + margin[0];
+ var horizontalMargin = margin[1] + margin[3];
+ var aspect = positionInfo.aspect;
+
+ // If width is not specified, calculate width from left and right
+ if (isNaN(width)) {
+ width = containerWidth - right - horizontalMargin - left;
+ }
+ if (isNaN(height)) {
+ height = containerHeight - bottom - verticalMargin - top;
+ }
+
+ // If width and height are not given
+ // 1. Graph should not exceeds the container
+ // 2. Aspect must be keeped
+ // 3. Graph should take the space as more as possible
+ if (isNaN(width) && isNaN(height)) {
+ if (aspect > containerWidth / containerHeight) {
+ width = containerWidth * 0.8;
+ }
+ else {
+ height = containerHeight * 0.8;
+ }
+ }
+
+ if (aspect != null) {
+ // Calculate width or height with given aspect
+ if (isNaN(width)) {
+ width = aspect * height;
+ }
+ if (isNaN(height)) {
+ height = width / aspect;
+ }
+ }
+
+ // If left is not specified, calculate left from right and width
+ if (isNaN(left)) {
+ left = containerWidth - right - width - horizontalMargin;
+ }
+ if (isNaN(top)) {
+ top = containerHeight - bottom - height - verticalMargin;
+ }
+
+ // Align left and top
+ switch (positionInfo.left || positionInfo.right) {
+ case 'center':
+ left = containerWidth / 2 - width / 2 - margin[3];
+ break;
+ case 'right':
+ left = containerWidth - width - horizontalMargin;
+ break;
+ }
+ switch (positionInfo.top || positionInfo.bottom) {
+ case 'middle':
+ case 'center':
+ top = containerHeight / 2 - height / 2 - margin[0];
+ break;
+ case 'bottom':
+ top = containerHeight - height - verticalMargin;
+ break;
+ }
+ // If something is wrong and left, top, width, height are calculated as NaN
+ left = left || 0;
+ top = top || 0;
+ if (isNaN(width)) {
+ // Width may be NaN if only one value is given except width
+ width = containerWidth - left - (right || 0);
+ }
+ if (isNaN(height)) {
+ // Height may be NaN if only one value is given except height
+ height = containerHeight - top - (bottom || 0);
+ }
+
+ var rect = new BoundingRect(left + margin[3], top + margin[0], width, height);
+ rect.margin = margin;
+ return rect;
+ };
+
+ /**
+ * Position group of component in viewport
+ * Group position is specified by either
+ * {left, top}, {right, bottom}
+ * If all properties exists, right and bottom will be igonred.
+ *
+ * @param {module:zrender/container/Group} group
+ * @param {Object} positionInfo
+ * @param {number|string} [positionInfo.left]
+ * @param {number|string} [positionInfo.top]
+ * @param {number|string} [positionInfo.right]
+ * @param {number|string} [positionInfo.bottom]
+ * @param {Object} containerRect
+ * @param {string|number} margin
+ */
+ layout.positionGroup = function (
+ group, positionInfo, containerRect, margin
+ ) {
+ var groupRect = group.getBoundingRect();
+
+ positionInfo = zrUtil.extend(zrUtil.clone(positionInfo), {
+ width: groupRect.width,
+ height: groupRect.height
+ });
+
+ positionInfo = layout.getLayoutRect(
+ positionInfo, containerRect, margin
+ );
+
+ group.position = [
+ positionInfo.x - groupRect.x,
+ positionInfo.y - groupRect.y
+ ];
+ };
+
+ /**
+ * Consider Case:
+ * When defulat option has {left: 0, width: 100}, and we set {right: 0}
+ * through setOption or media query, using normal zrUtil.merge will cause
+ * {right: 0} does not take effect.
+ *
+ * @example
+ * ComponentModel.extend({
+ * init: function () {
+ * ...
+ * var inputPositionParams = layout.getLayoutParams(option);
+ * this.mergeOption(inputPositionParams);
+ * },
+ * mergeOption: function (newOption) {
+ * newOption && zrUtil.merge(thisOption, newOption, true);
+ * layout.mergeLayoutParam(thisOption, newOption);
+ * }
+ * });
+ *
+ * @param {Object} targetOption
+ * @param {Object} newOption
+ * @param {Object|string} [opt]
+ * @param {boolean} [opt.ignoreSize=false] Some component must has width and height.
+ */
+ layout.mergeLayoutParam = function (targetOption, newOption, opt) {
+ !zrUtil.isObject(opt) && (opt = {});
+ var hNames = ['width', 'left', 'right']; // Order by priority.
+ var vNames = ['height', 'top', 'bottom']; // Order by priority.
+ var hResult = merge(hNames);
+ var vResult = merge(vNames);
+
+ copy(hNames, targetOption, hResult);
+ copy(vNames, targetOption, vResult);
+
+ function merge(names) {
+ var newParams = {};
+ var newValueCount = 0;
+ var merged = {};
+ var mergedValueCount = 0;
+ var enoughParamNumber = opt.ignoreSize ? 1 : 2;
+
+ each(names, function (name) {
+ merged[name] = targetOption[name];
+ });
+ each(names, function (name) {
+ // Consider case: newOption.width is null, which is
+ // set by user for removing width setting.
+ hasProp(newOption, name) && (newParams[name] = merged[name] = newOption[name]);
+ hasValue(newParams, name) && newValueCount++;
+ hasValue(merged, name) && mergedValueCount++;
+ });
+
+ // Case: newOption: {width: ..., right: ...},
+ // or targetOption: {right: ...} and newOption: {width: ...},
+ // There is no conflict when merged only has params count
+ // little than enoughParamNumber.
+ if (mergedValueCount === enoughParamNumber || !newValueCount) {
+ return merged;
+ }
+ // Case: newOption: {width: ..., right: ...},
+ // Than we can make sure user only want those two, and ignore
+ // all origin params in targetOption.
+ else if (newValueCount >= enoughParamNumber) {
+ return newParams;
+ }
+ else {
+ // Chose another param from targetOption by priority.
+ // When 'ignoreSize', enoughParamNumber is 1 and those will not happen.
+ for (var i = 0; i < names.length; i++) {
+ var name = names[i];
+ if (!hasProp(newParams, name) && hasProp(targetOption, name)) {
+ newParams[name] = targetOption[name];
+ break;
+ }
+ }
+ return newParams;
+ }
+ }
+
+ function hasProp(obj, name) {
+ return obj.hasOwnProperty(name);
+ }
+
+ function hasValue(obj, name) {
+ return obj[name] != null && obj[name] !== 'auto';
+ }
+
+ function copy(names, target, source) {
+ each(names, function (name) {
+ target[name] = source[name];
+ });
+ }
+ };
+
+ /**
+ * Retrieve 'left', 'right', 'top', 'bottom', 'width', 'height' from object.
+ * @param {Object} source
+ * @return {Object} Result contains those props.
+ */
+ layout.getLayoutParams = function (source) {
+ return layout.copyLayoutParams({}, source);
+ };
+
+ /**
+ * Retrieve 'left', 'right', 'top', 'bottom', 'width', 'height' from object.
+ * @param {Object} source
+ * @return {Object} Result contains those props.
+ */
+ layout.copyLayoutParams = function (target, source) {
+ source && target && each(LOCATION_PARAMS, function (name) {
+ source.hasOwnProperty(name) && (target[name] = source[name]);
+ });
+ return target;
+ };
+
+ module.exports = layout;
+
+
+/***/ },
+/* 22 */
+/***/ function(module, exports) {
+
+
+
+ module.exports = {
+ getBoxLayoutParams: function () {
+ return {
+ left: this.get('left'),
+ top: this.get('top'),
+ right: this.get('right'),
+ bottom: this.get('bottom'),
+ width: this.get('width'),
+ height: this.get('height')
+ };
+ }
+ };
+
+
+/***/ },
+/* 23 */
+/***/ function(module, exports) {
+
+
+ var platform = '';
+ // Navigator not exists in node
+ if (typeof navigator !== 'undefined') {
+ platform = navigator.platform || '';
+ }
+ module.exports = {
+ // 全图默认背景
+ // backgroundColor: 'rgba(0,0,0,0)',
+
+ // https://dribbble.com/shots/1065960-Infographic-Pie-chart-visualization
+ // color: ['#5793f3', '#d14a61', '#fd9c35', '#675bba', '#fec42c', '#dd4444', '#d4df5a', '#cd4870'],
+ // 浅色
+ // color: ['#bcd3bb', '#e88f70', '#edc1a5', '#9dc5c8', '#e1e8c8', '#7b7c68', '#e5b5b5', '#f0b489', '#928ea8', '#bda29a'],
+ // color: ['#cc5664', '#9bd6ec', '#ea946e', '#8acaaa', '#f1ec64', '#ee8686', '#a48dc1', '#5da6bc', '#b9dcae'],
+ // 深色
+ color: ['#c23531','#2f4554', '#61a0a8', '#d48265', '#91c7ae','#749f83', '#ca8622', '#bda29a','#6e7074', '#546570', '#c4ccd3'],
+
+ // é»˜è®¤éœ€è¦ Grid é…置项
+ grid: {},
+ // 主题,主题
+ textStyle: {
+ // color: '#000',
+ // decoration: 'none',
+ // PENDING
+ fontFamily: platform.match(/^Win/) ? 'Microsoft YaHei' : 'sans-serif',
+ // fontFamily: 'Arial, Verdana, sans-serif',
+ fontSize: 12,
+ fontStyle: 'normal',
+ fontWeight: 'normal'
+ },
+ // 主题,默认标志图形类型列表
+ // symbolList: [
+ // 'circle', 'rectangle', 'triangle', 'diamond',
+ // 'emptyCircle', 'emptyRectangle', 'emptyTriangle', 'emptyDiamond'
+ // ],
+ animation: true, // 过渡动画是å¦å¼€å¯
+ animationThreshold: 2000, // 动画元素阀值,产生的图形原素超过2000ä¸å‡ºåŠ¨ç”»
+ animationDuration: 1000, // 过渡动画å‚数:进入
+ animationDurationUpdate: 300, // 过渡动画å‚数:更新
+ animationEasing: 'exponentialOut', //BounceOut
+ animationEasingUpdate: 'cubicOut'
+ };
+
+
+/***/ },
+/* 24 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var zrUtil = __webpack_require__(3);
+
+ var echartsAPIList = [
+ 'getDom', 'getZr', 'getWidth', 'getHeight', 'dispatchAction',
+ 'on', 'off', 'getDataURL', 'getConnectedDataURL', 'getModel', 'getOption'
+ ];
+
+ function ExtensionAPI(chartInstance) {
+ zrUtil.each(echartsAPIList, function (name) {
+ this[name] = zrUtil.bind(chartInstance[name], chartInstance);
+ }, this);
+ }
+
+ module.exports = ExtensionAPI;
+
+
+/***/ },
+/* 25 */
+/***/ function(module, exports) {
+
+ 'use strict';
+
+
+ // var zrUtil = require('zrender/lib/core/util');
+ var coordinateSystemCreators = {};
+
+ function CoordinateSystemManager() {
+
+ this._coordinateSystems = [];
+ }
+
+ CoordinateSystemManager.prototype = {
+
+ constructor: CoordinateSystemManager,
+
+ create: function (ecModel, api) {
+ var coordinateSystems = [];
+ for (var type in coordinateSystemCreators) {
+ var list = coordinateSystemCreators[type].create(ecModel, api);
+ list && (coordinateSystems = coordinateSystems.concat(list));
+ }
+
+ this._coordinateSystems = coordinateSystems;
+ },
+
+ update: function (ecModel, api) {
+ var coordinateSystems = this._coordinateSystems;
+ for (var i = 0; i < coordinateSystems.length; i++) {
+ // FIXME MUST have
+ coordinateSystems[i].update && coordinateSystems[i].update(ecModel, api);
+ }
+ }
+ };
+
+ CoordinateSystemManager.register = function (type, coordinateSystemCreator) {
+ coordinateSystemCreators[type] = coordinateSystemCreator;
+ };
+
+ CoordinateSystemManager.get = function (type) {
+ return coordinateSystemCreators[type];
+ };
+
+ module.exports = CoordinateSystemManager;
+
+
+/***/ },
+/* 26 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * ECharts option manager
+ *
+ * @module {echarts/model/OptionManager}
+ */
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var modelUtil = __webpack_require__(5);
+ var ComponentModel = __webpack_require__(19);
+ var each = zrUtil.each;
+ var clone = zrUtil.clone;
+ var map = zrUtil.map;
+ var merge = zrUtil.merge;
+
+ var QUERY_REG = /^(min|max)?(.+)$/;
+
+ /**
+ * TERM EXPLANATIONS:
+ *
+ * [option]:
+ *
+ * An object that contains definitions of components. For example:
+ * var option = {
+ * title: {...},
+ * legend: {...},
+ * visualMap: {...},
+ * series: [
+ * {data: [...]},
+ * {data: [...]},
+ * ...
+ * ]
+ * };
+ *
+ * [rawOption]:
+ *
+ * An object input to echarts.setOption. 'rawOption' may be an
+ * 'option', or may be an object contains multi-options. For example:
+ * var option = {
+ * baseOption: {
+ * title: {...},
+ * legend: {...},
+ * series: [
+ * {data: [...]},
+ * {data: [...]},
+ * ...
+ * ]
+ * },
+ * timeline: {...},
+ * options: [
+ * {title: {...}, series: {data: [...]}},
+ * {title: {...}, series: {data: [...]}},
+ * ...
+ * ],
+ * media: [
+ * {
+ * query: {maxWidth: 320},
+ * option: {series: {x: 20}, visualMap: {show: false}}
+ * },
+ * {
+ * query: {minWidth: 320, maxWidth: 720},
+ * option: {series: {x: 500}, visualMap: {show: true}}
+ * },
+ * {
+ * option: {series: {x: 1200}, visualMap: {show: true}}
+ * }
+ * ]
+ * };
+ *
+ * @alias module:echarts/model/OptionManager
+ * @param {module:echarts/ExtensionAPI} api
+ */
+ function OptionManager(api) {
+
+ /**
+ * @private
+ * @type {module:echarts/ExtensionAPI}
+ */
+ this._api = api;
+
+ /**
+ * @private
+ * @type {Array.<number>}
+ */
+ this._timelineOptions = [];
+
+ /**
+ * @private
+ * @type {Array.<Object>}
+ */
+ this._mediaList = [];
+
+ /**
+ * @private
+ * @type {Object}
+ */
+ this._mediaDefault;
+
+ /**
+ * -1, means default.
+ * empty means no media.
+ * @private
+ * @type {Array.<number>}
+ */
+ this._currentMediaIndices = [];
+
+ /**
+ * @private
+ * @type {Object}
+ */
+ this._optionBackup;
+
+ /**
+ * @private
+ * @type {Object}
+ */
+ this._newOptionBackup;
+ }
+
+ // timeline.notMerge is not supported in ec3. Firstly there is rearly
+ // case that notMerge is needed. Secondly supporting 'notMerge' requires
+ // rawOption cloned and backuped when timeline changed, which does no
+ // good to performance. What's more, that both timeline and setOption
+ // method supply 'notMerge' brings complex and some problems.
+ // Consider this case:
+ // (step1) chart.setOption({timeline: {notMerge: false}, ...}, false);
+ // (step2) chart.setOption({timeline: {notMerge: true}, ...}, false);
+
+ OptionManager.prototype = {
+
+ constructor: OptionManager,
+
+ /**
+ * @public
+ * @param {Object} rawOption Raw option.
+ * @param {module:echarts/model/Global} ecModel
+ * @param {Array.<Function>} optionPreprocessorFuncs
+ * @return {Object} Init option
+ */
+ setOption: function (rawOption, optionPreprocessorFuncs) {
+ rawOption = clone(rawOption, true);
+
+ // FIXME
+ // 如果 timeline options 或者 media 中设置了æŸä¸ªå±žæ€§ï¼Œè€ŒbaseOption中没有设置,则进行警告。
+
+ var oldOptionBackup = this._optionBackup;
+ var newOptionBackup = this._newOptionBackup = parseRawOption.call(
+ this, rawOption, optionPreprocessorFuncs
+ );
+
+ // For setOption at second time (using merge mode);
+ if (oldOptionBackup) {
+ // Only baseOption can be merged.
+ mergeOption(oldOptionBackup.baseOption, newOptionBackup.baseOption);
+
+ if (newOptionBackup.timelineOptions.length) {
+ oldOptionBackup.timelineOptions = newOptionBackup.timelineOptions;
+ }
+ if (newOptionBackup.mediaList.length) {
+ oldOptionBackup.mediaList = newOptionBackup.mediaList;
+ }
+ if (newOptionBackup.mediaDefault) {
+ oldOptionBackup.mediaDefault = newOptionBackup.mediaDefault;
+ }
+ }
+ else {
+ this._optionBackup = newOptionBackup;
+ }
+ },
+
+ /**
+ * @param {boolean} isRecreate
+ * @return {Object}
+ */
+ mountOption: function (isRecreate) {
+ var optionBackup = isRecreate
+ // this._optionBackup can be only used when recreate.
+ // In other cases we use model.mergeOption to handle merge.
+ ? this._optionBackup : this._newOptionBackup;
+
+ // FIXME
+ // 如果没有reset功能则ä¸clone。
+
+ this._timelineOptions = map(optionBackup.timelineOptions, clone);
+ this._mediaList = map(optionBackup.mediaList, clone);
+ this._mediaDefault = clone(optionBackup.mediaDefault);
+ this._currentMediaIndices = [];
+
+ return clone(optionBackup.baseOption);
+ },
+
+ /**
+ * @param {module:echarts/model/Global} ecModel
+ * @return {Object}
+ */
+ getTimelineOption: function (ecModel) {
+ var option;
+ var timelineOptions = this._timelineOptions;
+
+ if (timelineOptions.length) {
+ // getTimelineOption can only be called after ecModel inited,
+ // so we can get currentIndex from timelineModel.
+ var timelineModel = ecModel.getComponent('timeline');
+ if (timelineModel) {
+ option = clone(
+ timelineOptions[timelineModel.getCurrentIndex()],
+ true
+ );
+ }
+ }
+
+ return option;
+ },
+
+ /**
+ * @param {module:echarts/model/Global} ecModel
+ * @return {Array.<Object>}
+ */
+ getMediaOption: function (ecModel) {
+ var ecWidth = this._api.getWidth();
+ var ecHeight = this._api.getHeight();
+ var mediaList = this._mediaList;
+ var mediaDefault = this._mediaDefault;
+ var indices = [];
+ var result = [];
+
+ // No media defined.
+ if (!mediaList.length && !mediaDefault) {
+ return result;
+ }
+
+ // Multi media may be applied, the latter defined media has higher priority.
+ for (var i = 0, len = mediaList.length; i < len; i++) {
+ if (applyMediaQuery(mediaList[i].query, ecWidth, ecHeight)) {
+ indices.push(i);
+ }
+ }
+
+ // FIXME
+ // 是å¦mediaDefault应该强制用户设置,å¦åˆ™å¯èƒ½ä¿®æ”¹ä¸èƒ½å›žå½’。
+ if (!indices.length && mediaDefault) {
+ indices = [-1];
+ }
+
+ if (indices.length && !indicesEquals(indices, this._currentMediaIndices)) {
+ result = map(indices, function (index) {
+ return clone(
+ index === -1 ? mediaDefault.option : mediaList[index].option
+ );
+ });
+ }
+ // Otherwise return nothing.
+
+ this._currentMediaIndices = indices;
+
+ return result;
+ }
+ };
+
+ function parseRawOption(rawOption, optionPreprocessorFuncs) {
+ var timelineOptions = [];
+ var mediaList = [];
+ var mediaDefault;
+ var baseOption;
+
+ // Compatible with ec2.
+ var timelineOpt = rawOption.timeline;
+
+ if (rawOption.baseOption) {
+ baseOption = rawOption.baseOption;
+ }
+
+ // For timeline
+ if (timelineOpt || rawOption.options) {
+ baseOption = baseOption || {};
+ timelineOptions = (rawOption.options || []).slice();
+ }
+ // For media query
+ if (rawOption.media) {
+ baseOption = baseOption || {};
+ var media = rawOption.media;
+ each(media, function (singleMedia) {
+ if (singleMedia && singleMedia.option) {
+ if (singleMedia.query) {
+ mediaList.push(singleMedia);
+ }
+ else if (!mediaDefault) {
+ // Use the first media default.
+ mediaDefault = singleMedia;
+ }
+ }
+ });
+ }
+
+ // For normal option
+ if (!baseOption) {
+ baseOption = rawOption;
+ }
+
+ // Set timelineOpt to baseOption in ec3,
+ // which is convenient for merge option.
+ if (!baseOption.timeline) {
+ baseOption.timeline = timelineOpt;
+ }
+
+ // Preprocess.
+ each([baseOption].concat(timelineOptions)
+ .concat(zrUtil.map(mediaList, function (media) {
+ return media.option;
+ })),
+ function (option) {
+ each(optionPreprocessorFuncs, function (preProcess) {
+ preProcess(option);
+ });
+ }
+ );
+
+ return {
+ baseOption: baseOption,
+ timelineOptions: timelineOptions,
+ mediaDefault: mediaDefault,
+ mediaList: mediaList
+ };
+ }
+
+ /**
+ * @see <http://www.w3.org/TR/css3-mediaqueries/#media1>
+ * Support: width, height, aspectRatio
+ * Can use max or min as prefix.
+ */
+ function applyMediaQuery(query, ecWidth, ecHeight) {
+ var realMap = {
+ width: ecWidth,
+ height: ecHeight,
+ aspectratio: ecWidth / ecHeight // lowser case for convenientce.
+ };
+
+ var applicatable = true;
+
+ zrUtil.each(query, function (value, attr) {
+ var matched = attr.match(QUERY_REG);
+
+ if (!matched || !matched[1] || !matched[2]) {
+ return;
+ }
+
+ var operator = matched[1];
+ var realAttr = matched[2].toLowerCase();
+
+ if (!compare(realMap[realAttr], value, operator)) {
+ applicatable = false;
+ }
+ });
+
+ return applicatable;
+ }
+
+ function compare(real, expect, operator) {
+ if (operator === 'min') {
+ return real >= expect;
+ }
+ else if (operator === 'max') {
+ return real <= expect;
+ }
+ else { // Equals
+ return real === expect;
+ }
+ }
+
+ function indicesEquals(indices1, indices2) {
+ // indices is always order by asc and has only finite number.
+ return indices1.join(',') === indices2.join(',');
+ }
+
+ /**
+ * Consider case:
+ * `chart.setOption(opt1);`
+ * Then user do some interaction like dataZoom, dataView changing.
+ * `chart.setOption(opt2);`
+ * Then user press 'reset button' in toolbox.
+ *
+ * After doing that all of the interaction effects should be reset, the
+ * chart should be the same as the result of invoke
+ * `chart.setOption(opt1); chart.setOption(opt2);`.
+ *
+ * Although it is not able ensure that
+ * `chart.setOption(opt1); chart.setOption(opt2);` is equivalents to
+ * `chart.setOption(merge(opt1, opt2));` exactly,
+ * this might be the only simple way to implement that feature.
+ *
+ * MEMO: We've considered some other approaches:
+ * 1. Each model handle its self restoration but not uniform treatment.
+ * (Too complex in logic and error-prone)
+ * 2. Use a shadow ecModel. (Performace expensive)
+ */
+ function mergeOption(oldOption, newOption) {
+ newOption = newOption || {};
+
+ each(newOption, function (newCptOpt, mainType) {
+ if (newCptOpt == null) {
+ return;
+ }
+
+ var oldCptOpt = oldOption[mainType];
+
+ if (!ComponentModel.hasClass(mainType)) {
+ oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);
+ }
+ else {
+ newCptOpt = modelUtil.normalizeToArray(newCptOpt);
+ oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);
+
+ var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);
+
+ oldOption[mainType] = map(mapResult, function (item) {
+ return (item.option && item.exist)
+ ? merge(item.exist, item.option, true)
+ : (item.exist || item.option);
+ });
+ }
+ });
+ }
+
+ module.exports = OptionManager;
+
+
+/***/ },
+/* 27 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var zrUtil = __webpack_require__(3);
+ var formatUtil = __webpack_require__(6);
+ var modelUtil = __webpack_require__(5);
+ var ComponentModel = __webpack_require__(19);
+
+ var encodeHTML = formatUtil.encodeHTML;
+ var addCommas = formatUtil.addCommas;
+
+ var SeriesModel = ComponentModel.extend({
+
+ type: 'series.__base__',
+
+ /**
+ * @readOnly
+ */
+ seriesIndex: 0,
+
+ // coodinateSystem will be injected in the echarts/CoordinateSystem
+ coordinateSystem: null,
+
+ /**
+ * @type {Object}
+ * @protected
+ */
+ defaultOption: null,
+
+ /**
+ * Data provided for legend
+ * @type {Function}
+ */
+ // PENDING
+ legendDataProvider: null,
+
+ init: function (option, parentModel, ecModel, extraOpt) {
+
+ /**
+ * @type {number}
+ * @readOnly
+ */
+ this.seriesIndex = this.componentIndex;
+
+ this.mergeDefaultAndTheme(option, ecModel);
+
+ /**
+ * @type {module:echarts/data/List|module:echarts/data/Tree|module:echarts/data/Graph}
+ * @private
+ */
+ this._dataBeforeProcessed = this.getInitialData(option, ecModel);
+
+ // When using module:echarts/data/Tree or module:echarts/data/Graph,
+ // cloneShallow will cause this._data.graph.data pointing to new data list.
+ // Wo we make this._dataBeforeProcessed first, and then make this._data.
+ this._data = this._dataBeforeProcessed.cloneShallow();
+ },
+
+ /**
+ * Util for merge default and theme to option
+ * @param {Object} option
+ * @param {module:echarts/model/Global} ecModel
+ */
+ mergeDefaultAndTheme: function (option, ecModel) {
+ zrUtil.merge(
+ option,
+ ecModel.getTheme().get(this.subType)
+ );
+ zrUtil.merge(option, this.getDefaultOption());
+
+ // Default label emphasis `position` and `show`
+ modelUtil.defaultEmphasis(
+ option.label, ['position', 'show', 'textStyle', 'distance', 'formatter']
+ );
+
+ // Default data label emphasis `position` and `show`
+ // FIXME Tree structure data ?
+ var data = option.data || [];
+ for (var i = 0; i < data.length; i++) {
+ if (data[i] && data[i].label) {
+ modelUtil.defaultEmphasis(
+ data[i].label, ['position', 'show', 'textStyle', 'distance', 'formatter']
+ );
+ }
+ }
+ },
+
+ mergeOption: function (newSeriesOption, ecModel) {
+ newSeriesOption = zrUtil.merge(this.option, newSeriesOption, true);
+
+ var data = this.getInitialData(newSeriesOption, ecModel);
+ // TODO Merge data?
+ if (data) {
+ this._data = data;
+ this._dataBeforeProcessed = data.cloneShallow();
+ }
+ },
+
+ /**
+ * Init a data structure from data related option in series
+ * Must be overwritten
+ */
+ getInitialData: function () {},
+
+ /**
+ * @return {module:echarts/data/List}
+ */
+ getData: function () {
+ return this._data;
+ },
+
+ /**
+ * @param {module:echarts/data/List} data
+ */
+ setData: function (data) {
+ this._data = data;
+ },
+
+ /**
+ * Get data before processed
+ * @return {module:echarts/data/List}
+ */
+ getRawData: function () {
+ return this._dataBeforeProcessed;
+ },
+
+ /**
+ * Get raw data array given by user
+ * @return {Array.<Object>}
+ */
+ getRawDataArray: function () {
+ return this.option.data;
+ },
+
+ /**
+ * Coord dimension to data dimension.
+ *
+ * By default the result is the same as dimensions of series data.
+ * But some series dimensions are different from coord dimensions (i.e.
+ * candlestick and boxplot). Override this method to handle those cases.
+ *
+ * Coord dimension to data dimension can be one-to-many
+ *
+ * @param {string} coordDim
+ * @return {Array.<string>} dimensions on the axis.
+ */
+ coordDimToDataDim: function (coordDim) {
+ return [coordDim];
+ },
+
+ /**
+ * Convert data dimension to coord dimension.
+ *
+ * @param {string|number} dataDim
+ * @return {string}
+ */
+ dataDimToCoordDim: function (dataDim) {
+ return dataDim;
+ },
+
+ /**
+ * Get base axis if has coordinate system and has axis.
+ * By default use coordSys.getBaseAxis();
+ * Can be overrided for some chart.
+ * @return {type} description
+ */
+ getBaseAxis: function () {
+ var coordSys = this.coordinateSystem;
+ return coordSys && coordSys.getBaseAxis && coordSys.getBaseAxis();
+ },
+
+ // FIXME
+ /**
+ * Default tooltip formatter
+ *
+ * @param {number} dataIndex
+ * @param {boolean} [multipleSeries=false]
+ */
+ formatTooltip: function (dataIndex, multipleSeries) {
+ var data = this._data;
+ var value = this.getRawValue(dataIndex);
+ var formattedValue = zrUtil.isArray(value)
+ ? zrUtil.map(value, addCommas).join(', ') : addCommas(value);
+ var name = data.getName(dataIndex);
+ var color = data.getItemVisual(dataIndex, 'color');
+ var colorEl = '<span style="display:inline-block;margin-right:5px;'
+ + 'border-radius:10px;width:9px;height:9px;background-color:' + color + '"></span>';
+
+ return !multipleSeries
+ ? (encodeHTML(this.name) + '<br />' + colorEl
+ + (name
+ ? encodeHTML(name) + ' : ' + formattedValue
+ : formattedValue)
+ )
+ : (colorEl + encodeHTML(this.name) + ' : ' + formattedValue);
+ },
+
+ restoreData: function () {
+ this._data = this._dataBeforeProcessed.cloneShallow();
+ }
+ });
+
+ zrUtil.mixin(SeriesModel, modelUtil.dataFormatMixin);
+
+ module.exports = SeriesModel;
+
+
+/***/ },
+/* 28 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var Group = __webpack_require__(29);
+ var componentUtil = __webpack_require__(20);
+ var clazzUtil = __webpack_require__(9);
+
+ var Component = function () {
+ /**
+ * @type {module:zrender/container/Group}
+ * @readOnly
+ */
+ this.group = new Group();
+
+ /**
+ * @type {string}
+ * @readOnly
+ */
+ this.uid = componentUtil.getUID('viewComponent');
+ };
+
+ Component.prototype = {
+
+ constructor: Component,
+
+ init: function (ecModel, api) {},
+
+ render: function (componentModel, ecModel, api, payload) {},
+
+ dispose: function () {}
+ };
+
+ var componentProto = Component.prototype;
+ componentProto.updateView
+ = componentProto.updateLayout
+ = componentProto.updateVisual
+ = function (seriesModel, ecModel, api, payload) {
+ // Do nothing;
+ };
+ // Enable Component.extend.
+ clazzUtil.enableClassExtend(Component);
+
+ // Enable capability of registerClass, getClass, hasClass, registerSubTypeDefaulter and so on.
+ clazzUtil.enableClassManagement(Component, {registerWhenExtend: true});
+
+ module.exports = Component;
+
+
+/***/ },
+/* 29 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Group是一个容器,å¯ä»¥æ’å…¥å­èŠ‚点,Groupçš„å˜æ¢ä¹Ÿä¼šè¢«åº”用到å­èŠ‚点上
+ * @module zrender/graphic/Group
+ * @example
+ * var Group = require('zrender/lib/container/Group');
+ * var Circle = require('zrender/lib/graphic/shape/Circle');
+ * var g = new Group();
+ * g.position[0] = 100;
+ * g.position[1] = 100;
+ * g.add(new Circle({
+ * style: {
+ * x: 100,
+ * y: 100,
+ * r: 20,
+ * }
+ * }));
+ * zr.add(g);
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+ var Element = __webpack_require__(30);
+ var BoundingRect = __webpack_require__(15);
+
+ /**
+ * @alias module:zrender/graphic/Group
+ * @constructor
+ * @extends module:zrender/mixin/Transformable
+ * @extends module:zrender/mixin/Eventful
+ */
+ var Group = function (opts) {
+
+ opts = opts || {};
+
+ Element.call(this, opts);
+
+ for (var key in opts) {
+ this[key] = opts[key];
+ }
+
+ this._children = [];
+
+ this.__storage = null;
+
+ this.__dirty = true;
+ };
+
+ Group.prototype = {
+
+ constructor: Group,
+
+ /**
+ * @type {string}
+ */
+ type: 'group',
+
+ /**
+ * @return {Array.<module:zrender/Element>}
+ */
+ children: function () {
+ return this._children.slice();
+ },
+
+ /**
+ * 获å–指定 index çš„å„¿å­èŠ‚点
+ * @param {number} idx
+ * @return {module:zrender/Element}
+ */
+ childAt: function (idx) {
+ return this._children[idx];
+ },
+
+ /**
+ * 获å–指定åå­—çš„å„¿å­èŠ‚点
+ * @param {string} name
+ * @return {module:zrender/Element}
+ */
+ childOfName: function (name) {
+ var children = this._children;
+ for (var i = 0; i < children.length; i++) {
+ if (children[i].name === name) {
+ return children[i];
+ }
+ }
+ },
+
+ /**
+ * @return {number}
+ */
+ childCount: function () {
+ return this._children.length;
+ },
+
+ /**
+ * 添加å­èŠ‚点到最åŽ
+ * @param {module:zrender/Element} child
+ */
+ add: function (child) {
+ if (child && child !== this && child.parent !== this) {
+
+ this._children.push(child);
+
+ this._doAdd(child);
+ }
+
+ return this;
+ },
+
+ /**
+ * 添加å­èŠ‚点在 nextSibling 之å‰
+ * @param {module:zrender/Element} child
+ * @param {module:zrender/Element} nextSibling
+ */
+ addBefore: function (child, nextSibling) {
+ if (child && child !== this && child.parent !== this
+ && nextSibling && nextSibling.parent === this) {
+
+ var children = this._children;
+ var idx = children.indexOf(nextSibling);
+
+ if (idx >= 0) {
+ children.splice(idx, 0, child);
+ this._doAdd(child);
+ }
+ }
+
+ return this;
+ },
+
+ _doAdd: function (child) {
+ if (child.parent) {
+ child.parent.remove(child);
+ }
+
+ child.parent = this;
+
+ var storage = this.__storage;
+ var zr = this.__zr;
+ if (storage && storage !== child.__storage) {
+
+ storage.addToMap(child);
+
+ if (child instanceof Group) {
+ child.addChildrenToStorage(storage);
+ }
+ }
+
+ zr && zr.refresh();
+ },
+
+ /**
+ * 移除å­èŠ‚点
+ * @param {module:zrender/Element} child
+ */
+ remove: function (child) {
+ var zr = this.__zr;
+ var storage = this.__storage;
+ var children = this._children;
+
+ var idx = zrUtil.indexOf(children, child);
+ if (idx < 0) {
+ return this;
+ }
+ children.splice(idx, 1);
+
+ child.parent = null;
+
+ if (storage) {
+
+ storage.delFromMap(child.id);
+
+ if (child instanceof Group) {
+ child.delChildrenFromStorage(storage);
+ }
+ }
+
+ zr && zr.refresh();
+
+ return this;
+ },
+
+ /**
+ * 移除所有å­èŠ‚点
+ */
+ removeAll: function () {
+ var children = this._children;
+ var storage = this.__storage;
+ var child;
+ var i;
+ for (i = 0; i < children.length; i++) {
+ child = children[i];
+ if (storage) {
+ storage.delFromMap(child.id);
+ if (child instanceof Group) {
+ child.delChildrenFromStorage(storage);
+ }
+ }
+ child.parent = null;
+ }
+ children.length = 0;
+
+ return this;
+ },
+
+ /**
+ * é历所有å­èŠ‚点
+ * @param {Function} cb
+ * @param {} context
+ */
+ eachChild: function (cb, context) {
+ var children = this._children;
+ for (var i = 0; i < children.length; i++) {
+ var child = children[i];
+ cb.call(context, child, i);
+ }
+ return this;
+ },
+
+ /**
+ * 深度优先é历所有å­å­™èŠ‚点
+ * @param {Function} cb
+ * @param {} context
+ */
+ traverse: function (cb, context) {
+ for (var i = 0; i < this._children.length; i++) {
+ var child = this._children[i];
+ cb.call(context, child);
+
+ if (child.type === 'group') {
+ child.traverse(cb, context);
+ }
+ }
+ return this;
+ },
+
+ addChildrenToStorage: function (storage) {
+ for (var i = 0; i < this._children.length; i++) {
+ var child = this._children[i];
+ storage.addToMap(child);
+ if (child instanceof Group) {
+ child.addChildrenToStorage(storage);
+ }
+ }
+ },
+
+ delChildrenFromStorage: function (storage) {
+ for (var i = 0; i < this._children.length; i++) {
+ var child = this._children[i];
+ storage.delFromMap(child.id);
+ if (child instanceof Group) {
+ child.delChildrenFromStorage(storage);
+ }
+ }
+ },
+
+ dirty: function () {
+ this.__dirty = true;
+ this.__zr && this.__zr.refresh();
+ return this;
+ },
+
+ /**
+ * @return {module:zrender/core/BoundingRect}
+ */
+ getBoundingRect: function (includeChildren) {
+ // TODO Caching
+ // TODO Transform
+ var rect = null;
+ var tmpRect = new BoundingRect(0, 0, 0, 0);
+ var children = includeChildren || this._children;
+ var tmpMat = [];
+
+ for (var i = 0; i < children.length; i++) {
+ var child = children[i];
+ if (child.ignore || child.invisible) {
+ continue;
+ }
+
+ var childRect = child.getBoundingRect();
+ var transform = child.getLocalTransform(tmpMat);
+ if (transform) {
+ tmpRect.copy(childRect);
+ tmpRect.applyTransform(transform);
+ rect = rect || tmpRect.clone();
+ rect.union(tmpRect);
+ }
+ else {
+ rect = rect || childRect.clone();
+ rect.union(childRect);
+ }
+ }
+ return rect || tmpRect;
+ }
+ };
+
+ zrUtil.inherits(Group, Element);
+
+ module.exports = Group;
+
+
+/***/ },
+/* 30 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ /**
+ * @module zrender/Element
+ */
+
+
+ var guid = __webpack_require__(31);
+ var Eventful = __webpack_require__(32);
+ var Transformable = __webpack_require__(33);
+ var Animatable = __webpack_require__(34);
+ var zrUtil = __webpack_require__(3);
+
+ /**
+ * @alias module:zrender/Element
+ * @constructor
+ * @extends {module:zrender/mixin/Animatable}
+ * @extends {module:zrender/mixin/Transformable}
+ * @extends {module:zrender/mixin/Eventful}
+ */
+ var Element = function (opts) {
+
+ Transformable.call(this, opts);
+ Eventful.call(this, opts);
+ Animatable.call(this, opts);
+
+ /**
+ * 画布元素ID
+ * @type {string}
+ */
+ this.id = opts.id || guid();
+ };
+
+ Element.prototype = {
+
+ /**
+ * 元素类型
+ * Element type
+ * @type {string}
+ */
+ type: 'element',
+
+ /**
+ * 元素åå­—
+ * Element name
+ * @type {string}
+ */
+ name: '',
+
+ /**
+ * ZRender 实例对象,会在 element 添加到 zrender 实例中åŽè‡ªåŠ¨èµ‹å€¼
+ * ZRender instance will be assigned when element is associated with zrender
+ * @name module:/zrender/Element#__zr
+ * @type {module:zrender/ZRender}
+ */
+ __zr: null,
+
+ /**
+ * 图形是å¦å¿½ç•¥ï¼Œä¸ºtrue时忽略图形的绘制以åŠäº‹ä»¶è§¦å‘
+ * If ignore drawing and events of the element object
+ * @name module:/zrender/Element#ignore
+ * @type {boolean}
+ * @default false
+ */
+ ignore: false,
+
+ /**
+ * 用于è£å‰ªçš„路径(shape),所有 Group 内的路径在绘制时都会被这个路径è£å‰ª
+ * 该路径会继承被è£å‡å¯¹è±¡çš„å˜æ¢
+ * @type {module:zrender/graphic/Path}
+ * @see http://www.w3.org/TR/2dcontext/#clipping-region
+ * @readOnly
+ */
+ clipPath: null,
+
+ /**
+ * Drift element
+ * @param {number} dx dx on the global space
+ * @param {number} dy dy on the global space
+ */
+ drift: function (dx, dy) {
+ switch (this.draggable) {
+ case 'horizontal':
+ dy = 0;
+ break;
+ case 'vertical':
+ dx = 0;
+ break;
+ }
+
+ var m = this.transform;
+ if (!m) {
+ m = this.transform = [1, 0, 0, 1, 0, 0];
+ }
+ m[4] += dx;
+ m[5] += dy;
+
+ this.decomposeTransform();
+ this.dirty();
+ },
+
+ /**
+ * Hook before update
+ */
+ beforeUpdate: function () {},
+ /**
+ * Hook after update
+ */
+ afterUpdate: function () {},
+ /**
+ * Update each frame
+ */
+ update: function () {
+ this.updateTransform();
+ },
+
+ /**
+ * @param {Function} cb
+ * @param {} context
+ */
+ traverse: function (cb, context) {},
+
+ /**
+ * @protected
+ */
+ attrKV: function (key, value) {
+ if (key === 'position' || key === 'scale' || key === 'origin') {
+ // Copy the array
+ if (value) {
+ var target = this[key];
+ if (!target) {
+ target = this[key] = [];
+ }
+ target[0] = value[0];
+ target[1] = value[1];
+ }
+ }
+ else {
+ this[key] = value;
+ }
+ },
+
+ /**
+ * Hide the element
+ */
+ hide: function () {
+ this.ignore = true;
+ this.__zr && this.__zr.refresh();
+ },
+
+ /**
+ * Show the element
+ */
+ show: function () {
+ this.ignore = false;
+ this.__zr && this.__zr.refresh();
+ },
+
+ /**
+ * @param {string|Object} key
+ * @param {*} value
+ */
+ attr: function (key, value) {
+ if (typeof key === 'string') {
+ this.attrKV(key, value);
+ }
+ else if (zrUtil.isObject(key)) {
+ for (var name in key) {
+ if (key.hasOwnProperty(name)) {
+ this.attrKV(name, key[name]);
+ }
+ }
+ }
+ this.dirty();
+
+ return this;
+ },
+
+ /**
+ * @param {module:zrender/graphic/Path} clipPath
+ */
+ setClipPath: function (clipPath) {
+ var zr = this.__zr;
+ if (zr) {
+ clipPath.addSelfToZr(zr);
+ }
+
+ // Remove previous clip path
+ if (this.clipPath && this.clipPath !== clipPath) {
+ this.removeClipPath();
+ }
+
+ this.clipPath = clipPath;
+ clipPath.__zr = zr;
+ clipPath.__clipTarget = this;
+
+ this.dirty();
+ },
+
+ /**
+ */
+ removeClipPath: function () {
+ var clipPath = this.clipPath;
+ if (clipPath) {
+ if (clipPath.__zr) {
+ clipPath.removeSelfFromZr(clipPath.__zr);
+ }
+
+ clipPath.__zr = null;
+ clipPath.__clipTarget = null;
+ this.clipPath = null;
+
+ this.dirty();
+ }
+ },
+
+ /**
+ * Add self from zrender instance.
+ * Not recursively because it will be invoked when element added to storage.
+ * @param {module:zrender/ZRender} zr
+ */
+ addSelfToZr: function (zr) {
+ this.__zr = zr;
+ // 添加动画
+ var animators = this.animators;
+ if (animators) {
+ for (var i = 0; i < animators.length; i++) {
+ zr.animation.addAnimator(animators[i]);
+ }
+ }
+
+ if (this.clipPath) {
+ this.clipPath.addSelfToZr(zr);
+ }
+ },
+
+ /**
+ * Remove self from zrender instance.
+ * Not recursively because it will be invoked when element added to storage.
+ * @param {module:zrender/ZRender} zr
+ */
+ removeSelfFromZr: function (zr) {
+ this.__zr = null;
+ // 移除动画
+ var animators = this.animators;
+ if (animators) {
+ for (var i = 0; i < animators.length; i++) {
+ zr.animation.removeAnimator(animators[i]);
+ }
+ }
+
+ if (this.clipPath) {
+ this.clipPath.removeSelfFromZr(zr);
+ }
+ }
+ };
+
+ zrUtil.mixin(Element, Animatable);
+ zrUtil.mixin(Element, Transformable);
+ zrUtil.mixin(Element, Eventful);
+
+ module.exports = Element;
+
+
+/***/ },
+/* 31 */
+/***/ function(module, exports) {
+
+ /**
+ * zrender: 生æˆå”¯ä¸€id
+ *
+ * @author errorrik (errorrik@gmail.com)
+ */
+
+
+ var idStart = 0x0907;
+
+ module.exports = function () {
+ return 'zr_' + (idStart++);
+ };
+
+
+
+/***/ },
+/* 32 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * 事件扩展
+ * @module zrender/mixin/Eventful
+ * @author Kener (@Kener-æž—å³°, kener.linfeng@gmail.com)
+ * pissang (https://www.github.com/pissang)
+ */
+
+
+ var arrySlice = Array.prototype.slice;
+ var zrUtil = __webpack_require__(3);
+ var indexOf = zrUtil.indexOf;
+
+ /**
+ * 事件分å‘器
+ * @alias module:zrender/mixin/Eventful
+ * @constructor
+ */
+ var Eventful = function () {
+ this._$handlers = {};
+ };
+
+ Eventful.prototype = {
+
+ constructor: Eventful,
+
+ /**
+ * å•æ¬¡è§¦å‘绑定,triggeråŽé”€æ¯
+ *
+ * @param {string} event 事件å
+ * @param {Function} handler å“应函数
+ * @param {Object} context
+ */
+ one: function (event, handler, context) {
+ var _h = this._$handlers;
+
+ if (!handler || !event) {
+ return this;
+ }
+
+ if (!_h[event]) {
+ _h[event] = [];
+ }
+
+ if (indexOf(_h[event], event) >= 0) {
+ return this;
+ }
+
+ _h[event].push({
+ h: handler,
+ one: true,
+ ctx: context || this
+ });
+
+ return this;
+ },
+
+ /**
+ * 绑定事件
+ * @param {string} event 事件å
+ * @param {Function} handler 事件处ç†å‡½æ•°
+ * @param {Object} [context]
+ */
+ on: function (event, handler, context) {
+ var _h = this._$handlers;
+
+ if (!handler || !event) {
+ return this;
+ }
+
+ if (!_h[event]) {
+ _h[event] = [];
+ }
+
+ _h[event].push({
+ h: handler,
+ one: false,
+ ctx: context || this
+ });
+
+ return this;
+ },
+
+ /**
+ * 是å¦ç»‘定了事件
+ * @param {string} event
+ * @return {boolean}
+ */
+ isSilent: function (event) {
+ var _h = this._$handlers;
+ return _h[event] && _h[event].length;
+ },
+
+ /**
+ * 解绑事件
+ * @param {string} event 事件å
+ * @param {Function} [handler] 事件处ç†å‡½æ•°
+ */
+ off: function (event, handler) {
+ var _h = this._$handlers;
+
+ if (!event) {
+ this._$handlers = {};
+ return this;
+ }
+
+ if (handler) {
+ if (_h[event]) {
+ var newList = [];
+ for (var i = 0, l = _h[event].length; i < l; i++) {
+ if (_h[event][i]['h'] != handler) {
+ newList.push(_h[event][i]);
+ }
+ }
+ _h[event] = newList;
+ }
+
+ if (_h[event] && _h[event].length === 0) {
+ delete _h[event];
+ }
+ }
+ else {
+ delete _h[event];
+ }
+
+ return this;
+ },
+
+ /**
+ * 事件分å‘
+ *
+ * @param {string} type 事件类型
+ */
+ trigger: function (type) {
+ if (this._$handlers[type]) {
+ var args = arguments;
+ var argLen = args.length;
+
+ if (argLen > 3) {
+ args = arrySlice.call(args, 1);
+ }
+
+ var _h = this._$handlers[type];
+ var len = _h.length;
+ for (var i = 0; i < len;) {
+ // Optimize advise from backbone
+ switch (argLen) {
+ case 1:
+ _h[i]['h'].call(_h[i]['ctx']);
+ break;
+ case 2:
+ _h[i]['h'].call(_h[i]['ctx'], args[1]);
+ break;
+ case 3:
+ _h[i]['h'].call(_h[i]['ctx'], args[1], args[2]);
+ break;
+ default:
+ // have more than 2 given arguments
+ _h[i]['h'].apply(_h[i]['ctx'], args);
+ break;
+ }
+
+ if (_h[i]['one']) {
+ _h.splice(i, 1);
+ len--;
+ }
+ else {
+ i++;
+ }
+ }
+ }
+
+ return this;
+ },
+
+ /**
+ * 带有context的事件分å‘, 最åŽä¸€ä¸ªå‚数是事件回调的context
+ * @param {string} type 事件类型
+ */
+ triggerWithContext: function (type) {
+ if (this._$handlers[type]) {
+ var args = arguments;
+ var argLen = args.length;
+
+ if (argLen > 4) {
+ args = arrySlice.call(args, 1, args.length - 1);
+ }
+ var ctx = args[args.length - 1];
+
+ var _h = this._$handlers[type];
+ var len = _h.length;
+ for (var i = 0; i < len;) {
+ // Optimize advise from backbone
+ switch (argLen) {
+ case 1:
+ _h[i]['h'].call(ctx);
+ break;
+ case 2:
+ _h[i]['h'].call(ctx, args[1]);
+ break;
+ case 3:
+ _h[i]['h'].call(ctx, args[1], args[2]);
+ break;
+ default:
+ // have more than 2 given arguments
+ _h[i]['h'].apply(ctx, args);
+ break;
+ }
+
+ if (_h[i]['one']) {
+ _h.splice(i, 1);
+ len--;
+ }
+ else {
+ i++;
+ }
+ }
+ }
+
+ return this;
+ }
+ };
+
+ // 对象å¯ä»¥é€šè¿‡ onxxxx 绑定事件
+ /**
+ * @event module:zrender/mixin/Eventful#onclick
+ * @type {Function}
+ * @default null
+ */
+ /**
+ * @event module:zrender/mixin/Eventful#onmouseover
+ * @type {Function}
+ * @default null
+ */
+ /**
+ * @event module:zrender/mixin/Eventful#onmouseout
+ * @type {Function}
+ * @default null
+ */
+ /**
+ * @event module:zrender/mixin/Eventful#onmousemove
+ * @type {Function}
+ * @default null
+ */
+ /**
+ * @event module:zrender/mixin/Eventful#onmousewheel
+ * @type {Function}
+ * @default null
+ */
+ /**
+ * @event module:zrender/mixin/Eventful#onmousedown
+ * @type {Function}
+ * @default null
+ */
+ /**
+ * @event module:zrender/mixin/Eventful#onmouseup
+ * @type {Function}
+ * @default null
+ */
+ /**
+ * @event module:zrender/mixin/Eventful#ondragstart
+ * @type {Function}
+ * @default null
+ */
+ /**
+ * @event module:zrender/mixin/Eventful#ondragend
+ * @type {Function}
+ * @default null
+ */
+ /**
+ * @event module:zrender/mixin/Eventful#ondragenter
+ * @type {Function}
+ * @default null
+ */
+ /**
+ * @event module:zrender/mixin/Eventful#ondragleave
+ * @type {Function}
+ * @default null
+ */
+ /**
+ * @event module:zrender/mixin/Eventful#ondragover
+ * @type {Function}
+ * @default null
+ */
+ /**
+ * @event module:zrender/mixin/Eventful#ondrop
+ * @type {Function}
+ * @default null
+ */
+
+ module.exports = Eventful;
+
+
+
+/***/ },
+/* 33 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ /**
+ * æä¾›å˜æ¢æ‰©å±•
+ * @module zrender/mixin/Transformable
+ * @author pissang (https://www.github.com/pissang)
+ */
+
+
+ var matrix = __webpack_require__(17);
+ var vector = __webpack_require__(16);
+ var mIdentity = matrix.identity;
+
+ var EPSILON = 5e-5;
+
+ function isNotAroundZero(val) {
+ return val > EPSILON || val < -EPSILON;
+ }
+
+ /**
+ * @alias module:zrender/mixin/Transformable
+ * @constructor
+ */
+ var Transformable = function (opts) {
+ opts = opts || {};
+ // If there are no given position, rotation, scale
+ if (!opts.position) {
+ /**
+ * 平移
+ * @type {Array.<number>}
+ * @default [0, 0]
+ */
+ this.position = [0, 0];
+ }
+ if (opts.rotation == null) {
+ /**
+ * 旋转
+ * @type {Array.<number>}
+ * @default 0
+ */
+ this.rotation = 0;
+ }
+ if (!opts.scale) {
+ /**
+ * 缩放
+ * @type {Array.<number>}
+ * @default [1, 1]
+ */
+ this.scale = [1, 1];
+ }
+ /**
+ * 旋转和缩放的原点
+ * @type {Array.<number>}
+ * @default null
+ */
+ this.origin = this.origin || null;
+ };
+
+ var transformableProto = Transformable.prototype;
+ transformableProto.transform = null;
+
+ /**
+ * 判断是å¦éœ€è¦æœ‰åæ ‡å˜æ¢
+ * 如果有åæ ‡å˜æ¢, 则从position, rotation, scale以åŠçˆ¶èŠ‚点的transform计算出自身的transform矩阵
+ */
+ transformableProto.needLocalTransform = function () {
+ return isNotAroundZero(this.rotation)
+ || isNotAroundZero(this.position[0])
+ || isNotAroundZero(this.position[1])
+ || isNotAroundZero(this.scale[0] - 1)
+ || isNotAroundZero(this.scale[1] - 1);
+ };
+
+ transformableProto.updateTransform = function () {
+ var parent = this.parent;
+ var parentHasTransform = parent && parent.transform;
+ var needLocalTransform = this.needLocalTransform();
+
+ var m = this.transform;
+ if (!(needLocalTransform || parentHasTransform)) {
+ m && mIdentity(m);
+ return;
+ }
+
+ m = m || matrix.create();
+
+ if (needLocalTransform) {
+ this.getLocalTransform(m);
+ }
+ else {
+ mIdentity(m);
+ }
+
+ // 应用父节点å˜æ¢
+ if (parentHasTransform) {
+ if (needLocalTransform) {
+ matrix.mul(m, parent.transform, m);
+ }
+ else {
+ matrix.copy(m, parent.transform);
+ }
+ }
+ // ä¿å­˜è¿™ä¸ªå˜æ¢çŸ©é˜µ
+ this.transform = m;
+
+ this.invTransform = this.invTransform || matrix.create();
+ matrix.invert(this.invTransform, m);
+ };
+
+ transformableProto.getLocalTransform = function (m) {
+ m = m || [];
+ mIdentity(m);
+
+ var origin = this.origin;
+
+ var scale = this.scale;
+ var rotation = this.rotation;
+ var position = this.position;
+ if (origin) {
+ // Translate to origin
+ m[4] -= origin[0];
+ m[5] -= origin[1];
+ }
+ matrix.scale(m, m, scale);
+ if (rotation) {
+ matrix.rotate(m, m, rotation);
+ }
+ if (origin) {
+ // Translate back from origin
+ m[4] += origin[0];
+ m[5] += origin[1];
+ }
+
+ m[4] += position[0];
+ m[5] += position[1];
+
+ return m;
+ };
+ /**
+ * 将自己的transform应用到context上
+ * @param {Context2D} ctx
+ */
+ transformableProto.setTransform = function (ctx) {
+ var m = this.transform;
+ if (m) {
+ ctx.transform(m[0], m[1], m[2], m[3], m[4], m[5]);
+ }
+ };
+
+ var tmpTransform = [];
+
+ /**
+ * 分解`transform`矩阵到`position`, `rotation`, `scale`
+ */
+ transformableProto.decomposeTransform = function () {
+ if (!this.transform) {
+ return;
+ }
+ var parent = this.parent;
+ var m = this.transform;
+ if (parent && parent.transform) {
+ // Get local transform and decompose them to position, scale, rotation
+ matrix.mul(tmpTransform, parent.invTransform, m);
+ m = tmpTransform;
+ }
+ var sx = m[0] * m[0] + m[1] * m[1];
+ var sy = m[2] * m[2] + m[3] * m[3];
+ var position = this.position;
+ var scale = this.scale;
+ if (isNotAroundZero(sx - 1)) {
+ sx = Math.sqrt(sx);
+ }
+ if (isNotAroundZero(sy - 1)) {
+ sy = Math.sqrt(sy);
+ }
+ if (m[0] < 0) {
+ sx = -sx;
+ }
+ if (m[3] < 0) {
+ sy = -sy;
+ }
+ position[0] = m[4];
+ position[1] = m[5];
+ scale[0] = sx;
+ scale[1] = sy;
+ this.rotation = Math.atan2(-m[1] / sy, m[0] / sx);
+ };
+
+ /**
+ * å˜æ¢åæ ‡ä½ç½®åˆ° shape 的局部å标空间
+ * @method
+ * @param {number} x
+ * @param {number} y
+ * @return {Array.<number>}
+ */
+ transformableProto.transformCoordToLocal = function (x, y) {
+ var v2 = [x, y];
+ var invTransform = this.invTransform;
+ if (invTransform) {
+ vector.applyTransform(v2, v2, invTransform);
+ }
+ return v2;
+ };
+
+ /**
+ * å˜æ¢å±€éƒ¨åæ ‡ä½ç½®åˆ°å…¨å±€å标空间
+ * @method
+ * @param {number} x
+ * @param {number} y
+ * @return {Array.<number>}
+ */
+ transformableProto.transformCoordToGlobal = function (x, y) {
+ var v2 = [x, y];
+ var transform = this.transform;
+ if (transform) {
+ vector.applyTransform(v2, v2, transform);
+ }
+ return v2;
+ };
+
+ module.exports = Transformable;
+
+
+
+/***/ },
+/* 34 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ /**
+ * @module zrender/mixin/Animatable
+ */
+
+
+ var Animator = __webpack_require__(35);
+ var util = __webpack_require__(3);
+ var isString = util.isString;
+ var isFunction = util.isFunction;
+ var isObject = util.isObject;
+ var log = __webpack_require__(39);
+
+ /**
+ * @alias modue:zrender/mixin/Animatable
+ * @constructor
+ */
+ var Animatable = function () {
+
+ /**
+ * @type {Array.<module:zrender/animation/Animator>}
+ * @readOnly
+ */
+ this.animators = [];
+ };
+
+ Animatable.prototype = {
+
+ constructor: Animatable,
+
+ /**
+ * 动画
+ *
+ * @param {string} path 需è¦æ·»åŠ åŠ¨ç”»çš„属性获å–路径,å¯ä»¥é€šè¿‡a.b.cæ¥èŽ·å–深层的属性
+ * @param {boolean} [loop] 动画是å¦å¾ªçŽ¯
+ * @return {module:zrender/animation/Animator}
+ * @example:
+ * el.animate('style', false)
+ * .when(1000, {x: 10} )
+ * .done(function(){ // Animation done })
+ * .start()
+ */
+ animate: function (path, loop) {
+ var target;
+ var animatingShape = false;
+ var el = this;
+ var zr = this.__zr;
+ if (path) {
+ var pathSplitted = path.split('.');
+ var prop = el;
+ // If animating shape
+ animatingShape = pathSplitted[0] === 'shape';
+ for (var i = 0, l = pathSplitted.length; i < l; i++) {
+ if (!prop) {
+ continue;
+ }
+ prop = prop[pathSplitted[i]];
+ }
+ if (prop) {
+ target = prop;
+ }
+ }
+ else {
+ target = el;
+ }
+
+ if (!target) {
+ log(
+ 'Property "'
+ + path
+ + '" is not existed in element '
+ + el.id
+ );
+ return;
+ }
+
+ var animators = el.animators;
+
+ var animator = new Animator(target, loop);
+
+ animator.during(function (target) {
+ el.dirty(animatingShape);
+ })
+ .done(function () {
+ // FIXME Animator will not be removed if use `Animator#stop` to stop animation
+ animators.splice(util.indexOf(animators, animator), 1);
+ });
+
+ animators.push(animator);
+
+ // If animate after added to the zrender
+ if (zr) {
+ zr.animation.addAnimator(animator);
+ }
+
+ return animator;
+ },
+
+ /**
+ * åœæ­¢åŠ¨ç”»
+ * @param {boolean} forwardToLast If move to last frame before stop
+ */
+ stopAnimation: function (forwardToLast) {
+ var animators = this.animators;
+ var len = animators.length;
+ for (var i = 0; i < len; i++) {
+ animators[i].stop(forwardToLast);
+ }
+ animators.length = 0;
+
+ return this;
+ },
+
+ /**
+ * @param {Object} target
+ * @param {number} [time=500] Time in ms
+ * @param {string} [easing='linear']
+ * @param {number} [delay=0]
+ * @param {Function} [callback]
+ *
+ * @example
+ * // Animate position
+ * el.animateTo({
+ * position: [10, 10]
+ * }, function () { // done })
+ *
+ * // Animate shape, style and position in 100ms, delayed 100ms, with cubicOut easing
+ * el.animateTo({
+ * shape: {
+ * width: 500
+ * },
+ * style: {
+ * fill: 'red'
+ * }
+ * position: [10, 10]
+ * }, 100, 100, 'cubicOut', function () { // done })
+ */
+ // TODO Return animation key
+ animateTo: function (target, time, delay, easing, callback) {
+ // animateTo(target, time, easing, callback);
+ if (isString(delay)) {
+ callback = easing;
+ easing = delay;
+ delay = 0;
+ }
+ // animateTo(target, time, delay, callback);
+ else if (isFunction(easing)) {
+ callback = easing;
+ easing = 'linear';
+ delay = 0;
+ }
+ // animateTo(target, time, callback);
+ else if (isFunction(delay)) {
+ callback = delay;
+ delay = 0;
+ }
+ // animateTo(target, callback)
+ else if (isFunction(time)) {
+ callback = time;
+ time = 500;
+ }
+ // animateTo(target)
+ else if (!time) {
+ time = 500;
+ }
+ // Stop all previous animations
+ this.stopAnimation();
+ this._animateToShallow('', this, target, time, delay, easing, callback);
+
+ // Animators may be removed immediately after start
+ // if there is nothing to animate
+ var animators = this.animators.slice();
+ var count = animators.length;
+ function done() {
+ count--;
+ if (!count) {
+ callback && callback();
+ }
+ }
+
+ // No animators. This should be checked before animators[i].start(),
+ // because 'done' may be executed immediately if no need to animate.
+ if (!count) {
+ callback && callback();
+ }
+ // Start after all animators created
+ // Incase any animator is done immediately when all animation properties are not changed
+ for (var i = 0; i < animators.length; i++) {
+ animators[i]
+ .done(done)
+ .start(easing);
+ }
+ },
+
+ /**
+ * @private
+ * @param {string} path=''
+ * @param {Object} source=this
+ * @param {Object} target
+ * @param {number} [time=500]
+ * @param {number} [delay=0]
+ *
+ * @example
+ * // Animate position
+ * el._animateToShallow({
+ * position: [10, 10]
+ * })
+ *
+ * // Animate shape, style and position in 100ms, delayed 100ms
+ * el._animateToShallow({
+ * shape: {
+ * width: 500
+ * },
+ * style: {
+ * fill: 'red'
+ * }
+ * position: [10, 10]
+ * }, 100, 100)
+ */
+ _animateToShallow: function (path, source, target, time, delay) {
+ var objShallow = {};
+ var propertyCount = 0;
+ for (var name in target) {
+ if (source[name] != null) {
+ if (isObject(target[name]) && !util.isArrayLike(target[name])) {
+ this._animateToShallow(
+ path ? path + '.' + name : name,
+ source[name],
+ target[name],
+ time,
+ delay
+ );
+ }
+ else {
+ objShallow[name] = target[name];
+ propertyCount++;
+ }
+ }
+ else if (target[name] != null) {
+ // Attr directly if not has property
+ // FIXME, if some property not needed for element ?
+ if (!path) {
+ this.attr(name, target[name]);
+ }
+ else { // Shape or style
+ var props = {};
+ props[path] = {};
+ props[path][name] = target[name];
+ this.attr(props);
+ }
+ }
+ }
+
+ if (propertyCount > 0) {
+ this.animate(path, false)
+ .when(time == null ? 500 : time, objShallow)
+ .delay(delay || 0);
+ }
+
+ return this;
+ }
+ };
+
+ module.exports = Animatable;
+
+
+/***/ },
+/* 35 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @module echarts/animation/Animator
+ */
+
+
+ var Clip = __webpack_require__(36);
+ var color = __webpack_require__(38);
+ var util = __webpack_require__(3);
+ var isArrayLike = util.isArrayLike;
+
+ var arraySlice = Array.prototype.slice;
+
+ function defaultGetter(target, key) {
+ return target[key];
+ }
+
+ function defaultSetter(target, key, value) {
+ target[key] = value;
+ }
+
+ /**
+ * @param {number} p0
+ * @param {number} p1
+ * @param {number} percent
+ * @return {number}
+ */
+ function interpolateNumber(p0, p1, percent) {
+ return (p1 - p0) * percent + p0;
+ }
+
+ /**
+ * @param {string} p0
+ * @param {string} p1
+ * @param {number} percent
+ * @return {string}
+ */
+ function interpolateString(p0, p1, percent) {
+ return percent > 0.5 ? p1 : p0;
+ }
+
+ /**
+ * @param {Array} p0
+ * @param {Array} p1
+ * @param {number} percent
+ * @param {Array} out
+ * @param {number} arrDim
+ */
+ function interpolateArray(p0, p1, percent, out, arrDim) {
+ var len = p0.length;
+ if (arrDim == 1) {
+ for (var i = 0; i < len; i++) {
+ out[i] = interpolateNumber(p0[i], p1[i], percent);
+ }
+ }
+ else {
+ var len2 = p0[0].length;
+ for (var i = 0; i < len; i++) {
+ for (var j = 0; j < len2; j++) {
+ out[i][j] = interpolateNumber(
+ p0[i][j], p1[i][j], percent
+ );
+ }
+ }
+ }
+ }
+
+ function fillArr(arr0, arr1, arrDim) {
+ var arr0Len = arr0.length;
+ var arr1Len = arr1.length;
+ if (arr0Len === arr1Len) {
+ return;
+ }
+ // FIXME Not work for TypedArray
+ var isPreviousLarger = arr0Len > arr1Len;
+ if (isPreviousLarger) {
+ // Cut the previous
+ arr0.length = arr1Len;
+ }
+ else {
+ // Fill the previous
+ for (var i = arr0Len; i < arr1Len; i++) {
+ arr0.push(
+ arrDim === 1 ? arr1[i] : arraySlice.call(arr1[i])
+ );
+ }
+ }
+ }
+
+ /**
+ * @param {Array} arr0
+ * @param {Array} arr1
+ * @param {number} arrDim
+ * @return {boolean}
+ */
+ function isArraySame(arr0, arr1, arrDim) {
+ if (arr0 === arr1) {
+ return true;
+ }
+ var len = arr0.length;
+ if (len !== arr1.length) {
+ return false;
+ }
+ if (arrDim === 1) {
+ for (var i = 0; i < len; i++) {
+ if (arr0[i] !== arr1[i]) {
+ return false;
+ }
+ }
+ }
+ else {
+ var len2 = arr0[0].length;
+ for (var i = 0; i < len; i++) {
+ for (var j = 0; j < len2; j++) {
+ if (arr0[i][j] !== arr1[i][j]) {
+ return false;
+ }
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Catmull Rom interpolate array
+ * @param {Array} p0
+ * @param {Array} p1
+ * @param {Array} p2
+ * @param {Array} p3
+ * @param {number} t
+ * @param {number} t2
+ * @param {number} t3
+ * @param {Array} out
+ * @param {number} arrDim
+ */
+ function catmullRomInterpolateArray(
+ p0, p1, p2, p3, t, t2, t3, out, arrDim
+ ) {
+ var len = p0.length;
+ if (arrDim == 1) {
+ for (var i = 0; i < len; i++) {
+ out[i] = catmullRomInterpolate(
+ p0[i], p1[i], p2[i], p3[i], t, t2, t3
+ );
+ }
+ }
+ else {
+ var len2 = p0[0].length;
+ for (var i = 0; i < len; i++) {
+ for (var j = 0; j < len2; j++) {
+ out[i][j] = catmullRomInterpolate(
+ p0[i][j], p1[i][j], p2[i][j], p3[i][j],
+ t, t2, t3
+ );
+ }
+ }
+ }
+ }
+
+ /**
+ * Catmull Rom interpolate number
+ * @param {number} p0
+ * @param {number} p1
+ * @param {number} p2
+ * @param {number} p3
+ * @param {number} t
+ * @param {number} t2
+ * @param {number} t3
+ * @return {number}
+ */
+ function catmullRomInterpolate(p0, p1, p2, p3, t, t2, t3) {
+ var v0 = (p2 - p0) * 0.5;
+ var v1 = (p3 - p1) * 0.5;
+ return (2 * (p1 - p2) + v0 + v1) * t3
+ + (-3 * (p1 - p2) - 2 * v0 - v1) * t2
+ + v0 * t + p1;
+ }
+
+ function cloneValue(value) {
+ if (isArrayLike(value)) {
+ var len = value.length;
+ if (isArrayLike(value[0])) {
+ var ret = [];
+ for (var i = 0; i < len; i++) {
+ ret.push(arraySlice.call(value[i]));
+ }
+ return ret;
+ }
+
+ return arraySlice.call(value);
+ }
+
+ return value;
+ }
+
+ function rgba2String(rgba) {
+ rgba[0] = Math.floor(rgba[0]);
+ rgba[1] = Math.floor(rgba[1]);
+ rgba[2] = Math.floor(rgba[2]);
+
+ return 'rgba(' + rgba.join(',') + ')';
+ }
+
+ function createTrackClip (animator, easing, oneTrackDone, keyframes, propName) {
+ var getter = animator._getter;
+ var setter = animator._setter;
+ var useSpline = easing === 'spline';
+
+ var trackLen = keyframes.length;
+ if (!trackLen) {
+ return;
+ }
+ // Guess data type
+ var firstVal = keyframes[0].value;
+ var isValueArray = isArrayLike(firstVal);
+ var isValueColor = false;
+ var isValueString = false;
+
+ // For vertices morphing
+ var arrDim = (
+ isValueArray
+ && isArrayLike(firstVal[0])
+ )
+ ? 2 : 1;
+ var trackMaxTime;
+ // Sort keyframe as ascending
+ keyframes.sort(function(a, b) {
+ return a.time - b.time;
+ });
+
+ trackMaxTime = keyframes[trackLen - 1].time;
+ // Percents of each keyframe
+ var kfPercents = [];
+ // Value of each keyframe
+ var kfValues = [];
+ var prevValue = keyframes[0].value;
+ var isAllValueEqual = true;
+ for (var i = 0; i < trackLen; i++) {
+ kfPercents.push(keyframes[i].time / trackMaxTime);
+ // Assume value is a color when it is a string
+ var value = keyframes[i].value;
+
+ // Check if value is equal, deep check if value is array
+ if (!((isValueArray && isArraySame(value, prevValue, arrDim))
+ || (!isValueArray && value === prevValue))) {
+ isAllValueEqual = false;
+ }
+ prevValue = value;
+
+ // Try converting a string to a color array
+ if (typeof value == 'string') {
+ var colorArray = color.parse(value);
+ if (colorArray) {
+ value = colorArray;
+ isValueColor = true;
+ }
+ else {
+ isValueString = true;
+ }
+ }
+ kfValues.push(value);
+ }
+ if (isAllValueEqual) {
+ return;
+ }
+
+ if (isValueArray) {
+ var lastValue = kfValues[trackLen - 1];
+ // Polyfill array
+ for (var i = 0; i < trackLen - 1; i++) {
+ fillArr(kfValues[i], lastValue, arrDim);
+ }
+ fillArr(getter(animator._target, propName), lastValue, arrDim);
+ }
+
+ // Cache the key of last frame to speed up when
+ // animation playback is sequency
+ var lastFrame = 0;
+ var lastFramePercent = 0;
+ var start;
+ var w;
+ var p0;
+ var p1;
+ var p2;
+ var p3;
+
+ if (isValueColor) {
+ var rgba = [0, 0, 0, 0];
+ }
+
+ var onframe = function (target, percent) {
+ // Find the range keyframes
+ // kf1-----kf2---------current--------kf3
+ // find kf2 and kf3 and do interpolation
+ var frame;
+ if (percent < lastFramePercent) {
+ // Start from next key
+ start = Math.min(lastFrame + 1, trackLen - 1);
+ for (frame = start; frame >= 0; frame--) {
+ if (kfPercents[frame] <= percent) {
+ break;
+ }
+ }
+ frame = Math.min(frame, trackLen - 2);
+ }
+ else {
+ for (frame = lastFrame; frame < trackLen; frame++) {
+ if (kfPercents[frame] > percent) {
+ break;
+ }
+ }
+ frame = Math.min(frame - 1, trackLen - 2);
+ }
+ lastFrame = frame;
+ lastFramePercent = percent;
+
+ var range = (kfPercents[frame + 1] - kfPercents[frame]);
+ if (range === 0) {
+ return;
+ }
+ else {
+ w = (percent - kfPercents[frame]) / range;
+ }
+ if (useSpline) {
+ p1 = kfValues[frame];
+ p0 = kfValues[frame === 0 ? frame : frame - 1];
+ p2 = kfValues[frame > trackLen - 2 ? trackLen - 1 : frame + 1];
+ p3 = kfValues[frame > trackLen - 3 ? trackLen - 1 : frame + 2];
+ if (isValueArray) {
+ catmullRomInterpolateArray(
+ p0, p1, p2, p3, w, w * w, w * w * w,
+ getter(target, propName),
+ arrDim
+ );
+ }
+ else {
+ var value;
+ if (isValueColor) {
+ value = catmullRomInterpolateArray(
+ p0, p1, p2, p3, w, w * w, w * w * w,
+ rgba, 1
+ );
+ value = rgba2String(rgba);
+ }
+ else if (isValueString) {
+ // String is step(0.5)
+ return interpolateString(p1, p2, w);
+ }
+ else {
+ value = catmullRomInterpolate(
+ p0, p1, p2, p3, w, w * w, w * w * w
+ );
+ }
+ setter(
+ target,
+ propName,
+ value
+ );
+ }
+ }
+ else {
+ if (isValueArray) {
+ interpolateArray(
+ kfValues[frame], kfValues[frame + 1], w,
+ getter(target, propName),
+ arrDim
+ );
+ }
+ else {
+ var value;
+ if (isValueColor) {
+ interpolateArray(
+ kfValues[frame], kfValues[frame + 1], w,
+ rgba, 1
+ );
+ value = rgba2String(rgba);
+ }
+ else if (isValueString) {
+ // String is step(0.5)
+ return interpolateString(kfValues[frame], kfValues[frame + 1], w);
+ }
+ else {
+ value = interpolateNumber(kfValues[frame], kfValues[frame + 1], w);
+ }
+ setter(
+ target,
+ propName,
+ value
+ );
+ }
+ }
+ };
+
+ var clip = new Clip({
+ target: animator._target,
+ life: trackMaxTime,
+ loop: animator._loop,
+ delay: animator._delay,
+ onframe: onframe,
+ ondestroy: oneTrackDone
+ });
+
+ if (easing && easing !== 'spline') {
+ clip.easing = easing;
+ }
+
+ return clip;
+ }
+
+ /**
+ * @alias module:zrender/animation/Animator
+ * @constructor
+ * @param {Object} target
+ * @param {boolean} loop
+ * @param {Function} getter
+ * @param {Function} setter
+ */
+ var Animator = function(target, loop, getter, setter) {
+ this._tracks = {};
+ this._target = target;
+
+ this._loop = loop || false;
+
+ this._getter = getter || defaultGetter;
+ this._setter = setter || defaultSetter;
+
+ this._clipCount = 0;
+
+ this._delay = 0;
+
+ this._doneList = [];
+
+ this._onframeList = [];
+
+ this._clipList = [];
+ };
+
+ Animator.prototype = {
+ /**
+ * 设置动画关键帧
+ * @param {number} time 关键帧时间,å•ä½æ˜¯ms
+ * @param {Object} props 关键帧的属性值,key-value表示
+ * @return {module:zrender/animation/Animator}
+ */
+ when: function(time /* ms */, props) {
+ var tracks = this._tracks;
+ for (var propName in props) {
+ if (!tracks[propName]) {
+ tracks[propName] = [];
+ // Invalid value
+ var value = this._getter(this._target, propName);
+ if (value == null) {
+ // zrLog('Invalid property ' + propName);
+ continue;
+ }
+ // If time is 0
+ // Then props is given initialize value
+ // Else
+ // Initialize value from current prop value
+ if (time !== 0) {
+ tracks[propName].push({
+ time: 0,
+ value: cloneValue(value)
+ });
+ }
+ }
+ tracks[propName].push({
+ time: time,
+ value: props[propName]
+ });
+ }
+ return this;
+ },
+ /**
+ * 添加动画æ¯ä¸€å¸§çš„回调函数
+ * @param {Function} callback
+ * @return {module:zrender/animation/Animator}
+ */
+ during: function (callback) {
+ this._onframeList.push(callback);
+ return this;
+ },
+
+ _doneCallback: function () {
+ // Clear all tracks
+ this._tracks = {};
+ // Clear all clips
+ this._clipList.length = 0;
+
+ var doneList = this._doneList;
+ var len = doneList.length;
+ for (var i = 0; i < len; i++) {
+ doneList[i].call(this);
+ }
+ },
+ /**
+ * 开始执行动画
+ * @param {string|Function} easing
+ * 动画缓动函数,详è§{@link module:zrender/animation/easing}
+ * @return {module:zrender/animation/Animator}
+ */
+ start: function (easing) {
+
+ var self = this;
+ var clipCount = 0;
+
+ var oneTrackDone = function() {
+ clipCount--;
+ if (!clipCount) {
+ self._doneCallback();
+ }
+ };
+
+ var lastClip;
+ for (var propName in this._tracks) {
+ var clip = createTrackClip(
+ this, easing, oneTrackDone,
+ this._tracks[propName], propName
+ );
+ if (clip) {
+ this._clipList.push(clip);
+ clipCount++;
+
+ // If start after added to animation
+ if (this.animation) {
+ this.animation.addClip(clip);
+ }
+
+ lastClip = clip;
+ }
+ }
+
+ // Add during callback on the last clip
+ if (lastClip) {
+ var oldOnFrame = lastClip.onframe;
+ lastClip.onframe = function (target, percent) {
+ oldOnFrame(target, percent);
+
+ for (var i = 0; i < self._onframeList.length; i++) {
+ self._onframeList[i](target, percent);
+ }
+ };
+ }
+
+ if (!clipCount) {
+ this._doneCallback();
+ }
+ return this;
+ },
+ /**
+ * åœæ­¢åŠ¨ç”»
+ * @param {boolean} forwardToLast If move to last frame before stop
+ */
+ stop: function (forwardToLast) {
+ var clipList = this._clipList;
+ var animation = this.animation;
+ for (var i = 0; i < clipList.length; i++) {
+ var clip = clipList[i];
+ if (forwardToLast) {
+ // Move to last frame before stop
+ clip.onframe(this._target, 1);
+ }
+ animation && animation.removeClip(clip);
+ }
+ clipList.length = 0;
+ },
+ /**
+ * 设置动画延迟开始的时间
+ * @param {number} time å•ä½ms
+ * @return {module:zrender/animation/Animator}
+ */
+ delay: function (time) {
+ this._delay = time;
+ return this;
+ },
+ /**
+ * 添加动画结æŸçš„回调
+ * @param {Function} cb
+ * @return {module:zrender/animation/Animator}
+ */
+ done: function(cb) {
+ if (cb) {
+ this._doneList.push(cb);
+ }
+ return this;
+ },
+
+ /**
+ * @return {Array.<module:zrender/animation/Clip>}
+ */
+ getClips: function () {
+ return this._clipList;
+ }
+ };
+
+ module.exports = Animator;
+
+
+/***/ },
+/* 36 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * 动画主控制器
+ * @config target 动画对象,å¯ä»¥æ˜¯æ•°ç»„,如果是数组的è¯ä¼šæ‰¹é‡åˆ†å‘onframe等事件
+ * @config life(1000) 动画时长
+ * @config delay(0) 动画延迟时间
+ * @config loop(true)
+ * @config gap(0) 循环的间隔时间
+ * @config onframe
+ * @config easing(optional)
+ * @config ondestroy(optional)
+ * @config onrestart(optional)
+ *
+ * TODO pause
+ */
+
+
+ var easingFuncs = __webpack_require__(37);
+
+ function Clip(options) {
+
+ this._target = options.target;
+
+ // 生命周期
+ this._life = options.life || 1000;
+ // 延时
+ this._delay = options.delay || 0;
+ // 开始时间
+ // this._startTime = new Date().getTime() + this._delay;// å•ä½æ¯«ç§’
+ this._initialized = false;
+
+ // 是å¦å¾ªçŽ¯
+ this.loop = options.loop == null ? false : options.loop;
+
+ this.gap = options.gap || 0;
+
+ this.easing = options.easing || 'Linear';
+
+ this.onframe = options.onframe;
+ this.ondestroy = options.ondestroy;
+ this.onrestart = options.onrestart;
+ }
+
+ Clip.prototype = {
+
+ constructor: Clip,
+
+ step: function (time) {
+ // Set startTime on first step, or _startTime may has milleseconds different between clips
+ // PENDING
+ if (!this._initialized) {
+ this._startTime = new Date().getTime() + this._delay;
+ this._initialized = true;
+ }
+
+ var percent = (time - this._startTime) / this._life;
+
+ // 还没开始
+ if (percent < 0) {
+ return;
+ }
+
+ percent = Math.min(percent, 1);
+
+ var easing = this.easing;
+ var easingFunc = typeof easing == 'string' ? easingFuncs[easing] : easing;
+ var schedule = typeof easingFunc === 'function'
+ ? easingFunc(percent)
+ : percent;
+
+ this.fire('frame', schedule);
+
+ // 结æŸ
+ if (percent == 1) {
+ if (this.loop) {
+ this.restart();
+ // é‡æ–°å¼€å§‹å‘¨æœŸ
+ // 抛出而ä¸æ˜¯ç›´æŽ¥è°ƒç”¨äº‹ä»¶ç›´åˆ° stage.update åŽå†ç»Ÿä¸€è°ƒç”¨è¿™äº›äº‹ä»¶
+ return 'restart';
+ }
+
+ // 动画完æˆå°†è¿™ä¸ªæŽ§åˆ¶å™¨æ ‡è¯†ä¸ºå¾…删除
+ // 在Animation.update中进行批é‡åˆ é™¤
+ this._needsRemove = true;
+ return 'destroy';
+ }
+
+ return null;
+ },
+
+ restart: function() {
+ var time = new Date().getTime();
+ var remainder = (time - this._startTime) % this._life;
+ this._startTime = new Date().getTime() - remainder + this.gap;
+
+ this._needsRemove = false;
+ },
+
+ fire: function(eventType, arg) {
+ eventType = 'on' + eventType;
+ if (this[eventType]) {
+ this[eventType](this._target, arg);
+ }
+ }
+ };
+
+ module.exports = Clip;
+
+
+
+/***/ },
+/* 37 */
+/***/ function(module, exports) {
+
+ /**
+ * 缓动代ç æ¥è‡ª https://github.com/sole/tween.js/blob/master/src/Tween.js
+ * @see http://sole.github.io/tween.js/examples/03_graphs.html
+ * @exports zrender/animation/easing
+ */
+
+ var easing = {
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ linear: function (k) {
+ return k;
+ },
+
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ quadraticIn: function (k) {
+ return k * k;
+ },
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ quadraticOut: function (k) {
+ return k * (2 - k);
+ },
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ quadraticInOut: function (k) {
+ if ((k *= 2) < 1) {
+ return 0.5 * k * k;
+ }
+ return -0.5 * (--k * (k - 2) - 1);
+ },
+
+ // 三次方的缓动(t^3)
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ cubicIn: function (k) {
+ return k * k * k;
+ },
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ cubicOut: function (k) {
+ return --k * k * k + 1;
+ },
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ cubicInOut: function (k) {
+ if ((k *= 2) < 1) {
+ return 0.5 * k * k * k;
+ }
+ return 0.5 * ((k -= 2) * k * k + 2);
+ },
+
+ // 四次方的缓动(t^4)
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ quarticIn: function (k) {
+ return k * k * k * k;
+ },
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ quarticOut: function (k) {
+ return 1 - (--k * k * k * k);
+ },
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ quarticInOut: function (k) {
+ if ((k *= 2) < 1) {
+ return 0.5 * k * k * k * k;
+ }
+ return -0.5 * ((k -= 2) * k * k * k - 2);
+ },
+
+ // 五次方的缓动(t^5)
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ quinticIn: function (k) {
+ return k * k * k * k * k;
+ },
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ quinticOut: function (k) {
+ return --k * k * k * k * k + 1;
+ },
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ quinticInOut: function (k) {
+ if ((k *= 2) < 1) {
+ return 0.5 * k * k * k * k * k;
+ }
+ return 0.5 * ((k -= 2) * k * k * k * k + 2);
+ },
+
+ // 正弦曲线的缓动(sin(t))
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ sinusoidalIn: function (k) {
+ return 1 - Math.cos(k * Math.PI / 2);
+ },
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ sinusoidalOut: function (k) {
+ return Math.sin(k * Math.PI / 2);
+ },
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ sinusoidalInOut: function (k) {
+ return 0.5 * (1 - Math.cos(Math.PI * k));
+ },
+
+ // 指数曲线的缓动(2^t)
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ exponentialIn: function (k) {
+ return k === 0 ? 0 : Math.pow(1024, k - 1);
+ },
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ exponentialOut: function (k) {
+ return k === 1 ? 1 : 1 - Math.pow(2, -10 * k);
+ },
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ exponentialInOut: function (k) {
+ if (k === 0) {
+ return 0;
+ }
+ if (k === 1) {
+ return 1;
+ }
+ if ((k *= 2) < 1) {
+ return 0.5 * Math.pow(1024, k - 1);
+ }
+ return 0.5 * (-Math.pow(2, -10 * (k - 1)) + 2);
+ },
+
+ // 圆形曲线的缓动(sqrt(1-t^2))
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ circularIn: function (k) {
+ return 1 - Math.sqrt(1 - k * k);
+ },
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ circularOut: function (k) {
+ return Math.sqrt(1 - (--k * k));
+ },
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ circularInOut: function (k) {
+ if ((k *= 2) < 1) {
+ return -0.5 * (Math.sqrt(1 - k * k) - 1);
+ }
+ return 0.5 * (Math.sqrt(1 - (k -= 2) * k) + 1);
+ },
+
+ // 创建类似于弹簧在åœæ­¢å‰æ¥å›žæŒ¯è¡çš„动画
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ elasticIn: function (k) {
+ var s;
+ var a = 0.1;
+ var p = 0.4;
+ if (k === 0) {
+ return 0;
+ }
+ if (k === 1) {
+ return 1;
+ }
+ if (!a || a < 1) {
+ a = 1; s = p / 4;
+ }
+ else {
+ s = p * Math.asin(1 / a) / (2 * Math.PI);
+ }
+ return -(a * Math.pow(2, 10 * (k -= 1)) *
+ Math.sin((k - s) * (2 * Math.PI) / p));
+ },
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ elasticOut: function (k) {
+ var s;
+ var a = 0.1;
+ var p = 0.4;
+ if (k === 0) {
+ return 0;
+ }
+ if (k === 1) {
+ return 1;
+ }
+ if (!a || a < 1) {
+ a = 1; s = p / 4;
+ }
+ else {
+ s = p * Math.asin(1 / a) / (2 * Math.PI);
+ }
+ return (a * Math.pow(2, -10 * k) *
+ Math.sin((k - s) * (2 * Math.PI) / p) + 1);
+ },
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ elasticInOut: function (k) {
+ var s;
+ var a = 0.1;
+ var p = 0.4;
+ if (k === 0) {
+ return 0;
+ }
+ if (k === 1) {
+ return 1;
+ }
+ if (!a || a < 1) {
+ a = 1; s = p / 4;
+ }
+ else {
+ s = p * Math.asin(1 / a) / (2 * Math.PI);
+ }
+ if ((k *= 2) < 1) {
+ return -0.5 * (a * Math.pow(2, 10 * (k -= 1))
+ * Math.sin((k - s) * (2 * Math.PI) / p));
+ }
+ return a * Math.pow(2, -10 * (k -= 1))
+ * Math.sin((k - s) * (2 * Math.PI) / p) * 0.5 + 1;
+
+ },
+
+ // 在æŸä¸€åŠ¨ç”»å¼€å§‹æ²¿æŒ‡ç¤ºçš„路径进行动画处ç†å‰ç¨ç¨æ”¶å›žè¯¥åŠ¨ç”»çš„移动
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ backIn: function (k) {
+ var s = 1.70158;
+ return k * k * ((s + 1) * k - s);
+ },
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ backOut: function (k) {
+ var s = 1.70158;
+ return --k * k * ((s + 1) * k + s) + 1;
+ },
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ backInOut: function (k) {
+ var s = 1.70158 * 1.525;
+ if ((k *= 2) < 1) {
+ return 0.5 * (k * k * ((s + 1) * k - s));
+ }
+ return 0.5 * ((k -= 2) * k * ((s + 1) * k + s) + 2);
+ },
+
+ // 创建弹跳效果
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ bounceIn: function (k) {
+ return 1 - easing.bounceOut(1 - k);
+ },
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ bounceOut: function (k) {
+ if (k < (1 / 2.75)) {
+ return 7.5625 * k * k;
+ }
+ else if (k < (2 / 2.75)) {
+ return 7.5625 * (k -= (1.5 / 2.75)) * k + 0.75;
+ }
+ else if (k < (2.5 / 2.75)) {
+ return 7.5625 * (k -= (2.25 / 2.75)) * k + 0.9375;
+ }
+ else {
+ return 7.5625 * (k -= (2.625 / 2.75)) * k + 0.984375;
+ }
+ },
+ /**
+ * @param {number} k
+ * @return {number}
+ */
+ bounceInOut: function (k) {
+ if (k < 0.5) {
+ return easing.bounceIn(k * 2) * 0.5;
+ }
+ return easing.bounceOut(k * 2 - 1) * 0.5 + 0.5;
+ }
+ };
+
+ module.exports = easing;
+
+
+
+
+/***/ },
+/* 38 */
+/***/ function(module, exports) {
+
+ /**
+ * @module zrender/tool/color
+ */
+
+
+ var kCSSColorTable = {
+ 'transparent': [0,0,0,0], 'aliceblue': [240,248,255,1],
+ 'antiquewhite': [250,235,215,1], 'aqua': [0,255,255,1],
+ 'aquamarine': [127,255,212,1], 'azure': [240,255,255,1],
+ 'beige': [245,245,220,1], 'bisque': [255,228,196,1],
+ 'black': [0,0,0,1], 'blanchedalmond': [255,235,205,1],
+ 'blue': [0,0,255,1], 'blueviolet': [138,43,226,1],
+ 'brown': [165,42,42,1], 'burlywood': [222,184,135,1],
+ 'cadetblue': [95,158,160,1], 'chartreuse': [127,255,0,1],
+ 'chocolate': [210,105,30,1], 'coral': [255,127,80,1],
+ 'cornflowerblue': [100,149,237,1], 'cornsilk': [255,248,220,1],
+ 'crimson': [220,20,60,1], 'cyan': [0,255,255,1],
+ 'darkblue': [0,0,139,1], 'darkcyan': [0,139,139,1],
+ 'darkgoldenrod': [184,134,11,1], 'darkgray': [169,169,169,1],
+ 'darkgreen': [0,100,0,1], 'darkgrey': [169,169,169,1],
+ 'darkkhaki': [189,183,107,1], 'darkmagenta': [139,0,139,1],
+ 'darkolivegreen': [85,107,47,1], 'darkorange': [255,140,0,1],
+ 'darkorchid': [153,50,204,1], 'darkred': [139,0,0,1],
+ 'darksalmon': [233,150,122,1], 'darkseagreen': [143,188,143,1],
+ 'darkslateblue': [72,61,139,1], 'darkslategray': [47,79,79,1],
+ 'darkslategrey': [47,79,79,1], 'darkturquoise': [0,206,209,1],
+ 'darkviolet': [148,0,211,1], 'deeppink': [255,20,147,1],
+ 'deepskyblue': [0,191,255,1], 'dimgray': [105,105,105,1],
+ 'dimgrey': [105,105,105,1], 'dodgerblue': [30,144,255,1],
+ 'firebrick': [178,34,34,1], 'floralwhite': [255,250,240,1],
+ 'forestgreen': [34,139,34,1], 'fuchsia': [255,0,255,1],
+ 'gainsboro': [220,220,220,1], 'ghostwhite': [248,248,255,1],
+ 'gold': [255,215,0,1], 'goldenrod': [218,165,32,1],
+ 'gray': [128,128,128,1], 'green': [0,128,0,1],
+ 'greenyellow': [173,255,47,1], 'grey': [128,128,128,1],
+ 'honeydew': [240,255,240,1], 'hotpink': [255,105,180,1],
+ 'indianred': [205,92,92,1], 'indigo': [75,0,130,1],
+ 'ivory': [255,255,240,1], 'khaki': [240,230,140,1],
+ 'lavender': [230,230,250,1], 'lavenderblush': [255,240,245,1],
+ 'lawngreen': [124,252,0,1], 'lemonchiffon': [255,250,205,1],
+ 'lightblue': [173,216,230,1], 'lightcoral': [240,128,128,1],
+ 'lightcyan': [224,255,255,1], 'lightgoldenrodyellow': [250,250,210,1],
+ 'lightgray': [211,211,211,1], 'lightgreen': [144,238,144,1],
+ 'lightgrey': [211,211,211,1], 'lightpink': [255,182,193,1],
+ 'lightsalmon': [255,160,122,1], 'lightseagreen': [32,178,170,1],
+ 'lightskyblue': [135,206,250,1], 'lightslategray': [119,136,153,1],
+ 'lightslategrey': [119,136,153,1], 'lightsteelblue': [176,196,222,1],
+ 'lightyellow': [255,255,224,1], 'lime': [0,255,0,1],
+ 'limegreen': [50,205,50,1], 'linen': [250,240,230,1],
+ 'magenta': [255,0,255,1], 'maroon': [128,0,0,1],
+ 'mediumaquamarine': [102,205,170,1], 'mediumblue': [0,0,205,1],
+ 'mediumorchid': [186,85,211,1], 'mediumpurple': [147,112,219,1],
+ 'mediumseagreen': [60,179,113,1], 'mediumslateblue': [123,104,238,1],
+ 'mediumspringgreen': [0,250,154,1], 'mediumturquoise': [72,209,204,1],
+ 'mediumvioletred': [199,21,133,1], 'midnightblue': [25,25,112,1],
+ 'mintcream': [245,255,250,1], 'mistyrose': [255,228,225,1],
+ 'moccasin': [255,228,181,1], 'navajowhite': [255,222,173,1],
+ 'navy': [0,0,128,1], 'oldlace': [253,245,230,1],
+ 'olive': [128,128,0,1], 'olivedrab': [107,142,35,1],
+ 'orange': [255,165,0,1], 'orangered': [255,69,0,1],
+ 'orchid': [218,112,214,1], 'palegoldenrod': [238,232,170,1],
+ 'palegreen': [152,251,152,1], 'paleturquoise': [175,238,238,1],
+ 'palevioletred': [219,112,147,1], 'papayawhip': [255,239,213,1],
+ 'peachpuff': [255,218,185,1], 'peru': [205,133,63,1],
+ 'pink': [255,192,203,1], 'plum': [221,160,221,1],
+ 'powderblue': [176,224,230,1], 'purple': [128,0,128,1],
+ 'red': [255,0,0,1], 'rosybrown': [188,143,143,1],
+ 'royalblue': [65,105,225,1], 'saddlebrown': [139,69,19,1],
+ 'salmon': [250,128,114,1], 'sandybrown': [244,164,96,1],
+ 'seagreen': [46,139,87,1], 'seashell': [255,245,238,1],
+ 'sienna': [160,82,45,1], 'silver': [192,192,192,1],
+ 'skyblue': [135,206,235,1], 'slateblue': [106,90,205,1],
+ 'slategray': [112,128,144,1], 'slategrey': [112,128,144,1],
+ 'snow': [255,250,250,1], 'springgreen': [0,255,127,1],
+ 'steelblue': [70,130,180,1], 'tan': [210,180,140,1],
+ 'teal': [0,128,128,1], 'thistle': [216,191,216,1],
+ 'tomato': [255,99,71,1], 'turquoise': [64,224,208,1],
+ 'violet': [238,130,238,1], 'wheat': [245,222,179,1],
+ 'white': [255,255,255,1], 'whitesmoke': [245,245,245,1],
+ 'yellow': [255,255,0,1], 'yellowgreen': [154,205,50,1]
+ };
+
+ function clampCssByte(i) { // Clamp to integer 0 .. 255.
+ i = Math.round(i); // Seems to be what Chrome does (vs truncation).
+ return i < 0 ? 0 : i > 255 ? 255 : i;
+ }
+
+ function clampCssAngle(i) { // Clamp to integer 0 .. 360.
+ i = Math.round(i); // Seems to be what Chrome does (vs truncation).
+ return i < 0 ? 0 : i > 360 ? 360 : i;
+ }
+
+ function clampCssFloat(f) { // Clamp to float 0.0 .. 1.0.
+ return f < 0 ? 0 : f > 1 ? 1 : f;
+ }
+
+ function parseCssInt(str) { // int or percentage.
+ if (str.length && str.charAt(str.length - 1) === '%') {
+ return clampCssByte(parseFloat(str) / 100 * 255);
+ }
+ return clampCssByte(parseInt(str, 10));
+ }
+
+ function parseCssFloat(str) { // float or percentage.
+ if (str.length && str.charAt(str.length - 1) === '%') {
+ return clampCssFloat(parseFloat(str) / 100);
+ }
+ return clampCssFloat(parseFloat(str));
+ }
+
+ function cssHueToRgb(m1, m2, h) {
+ if (h < 0) {
+ h += 1;
+ }
+ else if (h > 1) {
+ h -= 1;
+ }
+
+ if (h * 6 < 1) {
+ return m1 + (m2 - m1) * h * 6;
+ }
+ if (h * 2 < 1) {
+ return m2;
+ }
+ if (h * 3 < 2) {
+ return m1 + (m2 - m1) * (2/3 - h) * 6;
+ }
+ return m1;
+ }
+
+ function lerp(a, b, p) {
+ return a + (b - a) * p;
+ }
+
+ /**
+ * @param {string} colorStr
+ * @return {Array.<number>}
+ * @memberOf module:zrender/util/color
+ */
+ function parse(colorStr) {
+ if (!colorStr) {
+ return;
+ }
+ // colorStr may be not string
+ colorStr = colorStr + '';
+ // Remove all whitespace, not compliant, but should just be more accepting.
+ var str = colorStr.replace(/ /g, '').toLowerCase();
+
+ // Color keywords (and transparent) lookup.
+ if (str in kCSSColorTable) {
+ return kCSSColorTable[str].slice(); // dup.
+ }
+
+ // #abc and #abc123 syntax.
+ if (str.charAt(0) === '#') {
+ if (str.length === 4) {
+ var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.
+ if (!(iv >= 0 && iv <= 0xfff)) {
+ return; // Covers NaN.
+ }
+ return [
+ ((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8),
+ (iv & 0xf0) | ((iv & 0xf0) >> 4),
+ (iv & 0xf) | ((iv & 0xf) << 4),
+ 1
+ ];
+ }
+ else if (str.length === 7) {
+ var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.
+ if (!(iv >= 0 && iv <= 0xffffff)) {
+ return; // Covers NaN.
+ }
+ return [
+ (iv & 0xff0000) >> 16,
+ (iv & 0xff00) >> 8,
+ iv & 0xff,
+ 1
+ ];
+ }
+
+ return;
+ }
+ var op = str.indexOf('('), ep = str.indexOf(')');
+ if (op !== -1 && ep + 1 === str.length) {
+ var fname = str.substr(0, op);
+ var params = str.substr(op + 1, ep - (op + 1)).split(',');
+ var alpha = 1; // To allow case fallthrough.
+ switch (fname) {
+ case 'rgba':
+ if (params.length !== 4) {
+ return;
+ }
+ alpha = parseCssFloat(params.pop()); // jshint ignore:line
+ // Fall through.
+ case 'rgb':
+ if (params.length !== 3) {
+ return;
+ }
+ return [
+ parseCssInt(params[0]),
+ parseCssInt(params[1]),
+ parseCssInt(params[2]),
+ alpha
+ ];
+ case 'hsla':
+ if (params.length !== 4) {
+ return;
+ }
+ params[3] = parseCssFloat(params[3]);
+ return hsla2rgba(params);
+ case 'hsl':
+ if (params.length !== 3) {
+ return;
+ }
+ return hsla2rgba(params);
+ default:
+ return;
+ }
+ }
+
+ return;
+ }
+
+ /**
+ * @param {Array.<number>} hsla
+ * @return {Array.<number>} rgba
+ */
+ function hsla2rgba(hsla) {
+ var h = (((parseFloat(hsla[0]) % 360) + 360) % 360) / 360; // 0 .. 1
+ // NOTE(deanm): According to the CSS spec s/l should only be
+ // percentages, but we don't bother and let float or percentage.
+ var s = parseCssFloat(hsla[1]);
+ var l = parseCssFloat(hsla[2]);
+ var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;
+ var m1 = l * 2 - m2;
+
+ var rgba = [
+ clampCssByte(cssHueToRgb(m1, m2, h + 1 / 3) * 255),
+ clampCssByte(cssHueToRgb(m1, m2, h) * 255),
+ clampCssByte(cssHueToRgb(m1, m2, h - 1 / 3) * 255)
+ ];
+
+ if (hsla.length === 4) {
+ rgba[3] = hsla[3];
+ }
+
+ return rgba;
+ }
+
+ /**
+ * @param {Array.<number>} rgba
+ * @return {Array.<number>} hsla
+ */
+ function rgba2hsla(rgba) {
+ if (!rgba) {
+ return;
+ }
+
+ // RGB from 0 to 255
+ var R = rgba[0] / 255;
+ var G = rgba[1] / 255;
+ var B = rgba[2] / 255;
+
+ var vMin = Math.min(R, G, B); // Min. value of RGB
+ var vMax = Math.max(R, G, B); // Max. value of RGB
+ var delta = vMax - vMin; // Delta RGB value
+
+ var L = (vMax + vMin) / 2;
+ var H;
+ var S;
+ // HSL results from 0 to 1
+ if (delta === 0) {
+ H = 0;
+ S = 0;
+ }
+ else {
+ if (L < 0.5) {
+ S = delta / (vMax + vMin);
+ }
+ else {
+ S = delta / (2 - vMax - vMin);
+ }
+
+ var deltaR = (((vMax - R) / 6) + (delta / 2)) / delta;
+ var deltaG = (((vMax - G) / 6) + (delta / 2)) / delta;
+ var deltaB = (((vMax - B) / 6) + (delta / 2)) / delta;
+
+ if (R === vMax) {
+ H = deltaB - deltaG;
+ }
+ else if (G === vMax) {
+ H = (1 / 3) + deltaR - deltaB;
+ }
+ else if (B === vMax) {
+ H = (2 / 3) + deltaG - deltaR;
+ }
+
+ if (H < 0) {
+ H += 1;
+ }
+
+ if (H > 1) {
+ H -= 1;
+ }
+ }
+
+ var hsla = [H * 360, S, L];
+
+ if (rgba[3] != null) {
+ hsla.push(rgba[3]);
+ }
+
+ return hsla;
+ }
+
+ /**
+ * @param {string} color
+ * @param {number} level
+ * @return {string}
+ * @memberOf module:zrender/util/color
+ */
+ function lift(color, level) {
+ var colorArr = parse(color);
+ if (colorArr) {
+ for (var i = 0; i < 3; i++) {
+ if (level < 0) {
+ colorArr[i] = colorArr[i] * (1 - level) | 0;
+ }
+ else {
+ colorArr[i] = ((255 - colorArr[i]) * level + colorArr[i]) | 0;
+ }
+ }
+ return stringify(colorArr, colorArr.length === 4 ? 'rgba' : 'rgb');
+ }
+ }
+
+ /**
+ * @param {string} color
+ * @return {string}
+ * @memberOf module:zrender/util/color
+ */
+ function toHex(color, level) {
+ var colorArr = parse(color);
+ if (colorArr) {
+ return ((1 << 24) + (colorArr[0] << 16) + (colorArr[1] << 8) + (+colorArr[2])).toString(16).slice(1);
+ }
+ }
+
+ /**
+ * Map value to color. Faster than mapToColor methods because color is represented by rgba array
+ * @param {number} normalizedValue A float between 0 and 1.
+ * @param {Array.<Array.<number>>} colors List of rgba color array
+ * @param {Array.<number>} [out] Mapped gba color array
+ * @return {Array.<number>}
+ */
+ function fastMapToColor(normalizedValue, colors, out) {
+ if (!(colors && colors.length)
+ || !(normalizedValue >= 0 && normalizedValue <= 1)
+ ) {
+ return;
+ }
+ out = out || [0, 0, 0, 0];
+ var value = normalizedValue * (colors.length - 1);
+ var leftIndex = Math.floor(value);
+ var rightIndex = Math.ceil(value);
+ var leftColor = colors[leftIndex];
+ var rightColor = colors[rightIndex];
+ var dv = value - leftIndex;
+ out[0] = clampCssByte(lerp(leftColor[0], rightColor[0], dv));
+ out[1] = clampCssByte(lerp(leftColor[1], rightColor[1], dv));
+ out[2] = clampCssByte(lerp(leftColor[2], rightColor[2], dv));
+ out[3] = clampCssByte(lerp(leftColor[3], rightColor[3], dv));
+ return out;
+ }
+ /**
+ * @param {number} normalizedValue A float between 0 and 1.
+ * @param {Array.<string>} colors Color list.
+ * @param {boolean=} fullOutput Default false.
+ * @return {(string|Object)} Result color. If fullOutput,
+ * return {color: ..., leftIndex: ..., rightIndex: ..., value: ...},
+ * @memberOf module:zrender/util/color
+ */
+ function mapToColor(normalizedValue, colors, fullOutput) {
+ if (!(colors && colors.length)
+ || !(normalizedValue >= 0 && normalizedValue <= 1)
+ ) {
+ return;
+ }
+
+ var value = normalizedValue * (colors.length - 1);
+ var leftIndex = Math.floor(value);
+ var rightIndex = Math.ceil(value);
+ var leftColor = parse(colors[leftIndex]);
+ var rightColor = parse(colors[rightIndex]);
+ var dv = value - leftIndex;
+
+ var color = stringify(
+ [
+ clampCssByte(lerp(leftColor[0], rightColor[0], dv)),
+ clampCssByte(lerp(leftColor[1], rightColor[1], dv)),
+ clampCssByte(lerp(leftColor[2], rightColor[2], dv)),
+ clampCssFloat(lerp(leftColor[3], rightColor[3], dv))
+ ],
+ 'rgba'
+ );
+
+ return fullOutput
+ ? {
+ color: color,
+ leftIndex: leftIndex,
+ rightIndex: rightIndex,
+ value: value
+ }
+ : color;
+ }
+
+ /**
+ * @param {Array<number>} interval Array length === 2,
+ * each item is normalized value ([0, 1]).
+ * @param {Array.<string>} colors Color list.
+ * @return {Array.<Object>} colors corresponding to the interval,
+ * each item is {color: 'xxx', offset: ...}
+ * where offset is between 0 and 1.
+ * @memberOf module:zrender/util/color
+ */
+ function mapIntervalToColor(interval, colors) {
+ if (interval.length !== 2 || interval[1] < interval[0]) {
+ return;
+ }
+
+ var info0 = mapToColor(interval[0], colors, true);
+ var info1 = mapToColor(interval[1], colors, true);
+
+ var result = [{color: info0.color, offset: 0}];
+
+ var during = info1.value - info0.value;
+ var start = Math.max(info0.value, info0.rightIndex);
+ var end = Math.min(info1.value, info1.leftIndex);
+
+ for (var i = start; during > 0 && i <= end; i++) {
+ result.push({
+ color: colors[i],
+ offset: (i - info0.value) / during
+ });
+ }
+ result.push({color: info1.color, offset: 1});
+
+ return result;
+ }
+
+ /**
+ * @param {string} color
+ * @param {number=} h 0 ~ 360, ignore when null.
+ * @param {number=} s 0 ~ 1, ignore when null.
+ * @param {number=} l 0 ~ 1, ignore when null.
+ * @return {string} Color string in rgba format.
+ * @memberOf module:zrender/util/color
+ */
+ function modifyHSL(color, h, s, l) {
+ color = parse(color);
+
+ if (color) {
+ color = rgba2hsla(color);
+ h != null && (color[0] = clampCssAngle(h));
+ s != null && (color[1] = parseCssFloat(s));
+ l != null && (color[2] = parseCssFloat(l));
+
+ return stringify(hsla2rgba(color), 'rgba');
+ }
+ }
+
+ /**
+ * @param {string} color
+ * @param {number=} alpha 0 ~ 1
+ * @return {string} Color string in rgba format.
+ * @memberOf module:zrender/util/color
+ */
+ function modifyAlpha(color, alpha) {
+ color = parse(color);
+
+ if (color && alpha != null) {
+ color[3] = clampCssFloat(alpha);
+ return stringify(color, 'rgba');
+ }
+ }
+
+ /**
+ * @param {Array.<string>} colors Color list.
+ * @param {string} type 'rgba', 'hsva', ...
+ * @return {string} Result color.
+ */
+ function stringify(arrColor, type) {
+ if (type === 'rgb' || type === 'hsv' || type === 'hsl') {
+ arrColor = arrColor.slice(0, 3);
+ }
+ return type + '(' + arrColor.join(',') + ')';
+ }
+
+ module.exports = {
+ parse: parse,
+ lift: lift,
+ toHex: toHex,
+ fastMapToColor: fastMapToColor,
+ mapToColor: mapToColor,
+ mapIntervalToColor: mapIntervalToColor,
+ modifyHSL: modifyHSL,
+ modifyAlpha: modifyAlpha,
+ stringify: stringify
+ };
+
+
+
+
+/***/ },
+/* 39 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+ var config = __webpack_require__(40);
+
+ /**
+ * @exports zrender/tool/log
+ * @author Kener (@Kener-æž—å³°, kener.linfeng@gmail.com)
+ */
+ module.exports = function() {
+ if (config.debugMode === 0) {
+ return;
+ }
+ else if (config.debugMode == 1) {
+ for (var k in arguments) {
+ throw new Error(arguments[k]);
+ }
+ }
+ else if (config.debugMode > 1) {
+ for (var k in arguments) {
+ console.log(arguments[k]);
+ }
+ }
+ };
+
+ /* for debug
+ return function(mes) {
+ document.getElementById('wrong-message').innerHTML =
+ mes + ' ' + (new Date() - 0)
+ + '<br/>'
+ + document.getElementById('wrong-message').innerHTML;
+ };
+ */
+
+
+
+/***/ },
+/* 40 */
+/***/ function(module, exports) {
+
+
+ var dpr = 1;
+ // If in browser environment
+ if (typeof window !== 'undefined') {
+ dpr = Math.max(window.devicePixelRatio || 1, 1);
+ }
+ /**
+ * config默认é…置项
+ * @exports zrender/config
+ * @author Kener (@Kener-æž—å³°, kener.linfeng@gmail.com)
+ */
+ var config = {
+ /**
+ * debug日志选项:catchBrushException为true下有效
+ * 0 : ä¸ç”Ÿæˆdebugæ•°æ®ï¼Œå‘布用
+ * 1 : 异常抛出,调试用
+ * 2 : 控制å°è¾“出,调试用
+ */
+ debugMode: 0,
+
+ // retina å±å¹•ä¼˜åŒ–
+ devicePixelRatio: dpr
+ };
+ module.exports = config;
+
+
+
+
+/***/ },
+/* 41 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var Group = __webpack_require__(29);
+ var componentUtil = __webpack_require__(20);
+ var clazzUtil = __webpack_require__(9);
+
+ function Chart() {
+
+ /**
+ * @type {module:zrender/container/Group}
+ * @readOnly
+ */
+ this.group = new Group();
+
+ /**
+ * @type {string}
+ * @readOnly
+ */
+ this.uid = componentUtil.getUID('viewChart');
+ }
+
+ Chart.prototype = {
+
+ type: 'chart',
+
+ /**
+ * Init the chart
+ * @param {module:echarts/model/Global} ecModel
+ * @param {module:echarts/ExtensionAPI} api
+ */
+ init: function (ecModel, api) {},
+
+ /**
+ * Render the chart
+ * @param {module:echarts/model/Series} seriesModel
+ * @param {module:echarts/model/Global} ecModel
+ * @param {module:echarts/ExtensionAPI} api
+ * @param {Object} payload
+ */
+ render: function (seriesModel, ecModel, api, payload) {},
+
+ /**
+ * Highlight series or specified data item
+ * @param {module:echarts/model/Series} seriesModel
+ * @param {module:echarts/model/Global} ecModel
+ * @param {module:echarts/ExtensionAPI} api
+ * @param {Object} payload
+ */
+ highlight: function (seriesModel, ecModel, api, payload) {
+ toggleHighlight(seriesModel.getData(), payload, 'emphasis');
+ },
+
+ /**
+ * Downplay series or specified data item
+ * @param {module:echarts/model/Series} seriesModel
+ * @param {module:echarts/model/Global} ecModel
+ * @param {module:echarts/ExtensionAPI} api
+ * @param {Object} payload
+ */
+ downplay: function (seriesModel, ecModel, api, payload) {
+ toggleHighlight(seriesModel.getData(), payload, 'normal');
+ },
+
+ /**
+ * Remove self
+ * @param {module:echarts/model/Global} ecModel
+ * @param {module:echarts/ExtensionAPI} api
+ */
+ remove: function (ecModel, api) {
+ this.group.removeAll();
+ },
+
+ /**
+ * Dispose self
+ * @param {module:echarts/model/Global} ecModel
+ * @param {module:echarts/ExtensionAPI} api
+ */
+ dispose: function () {}
+ };
+
+ var chartProto = Chart.prototype;
+ chartProto.updateView
+ = chartProto.updateLayout
+ = chartProto.updateVisual
+ = function (seriesModel, ecModel, api, payload) {
+ this.render(seriesModel, ecModel, api, payload);
+ };
+
+ /**
+ * Set state of single element
+ * @param {module:zrender/Element} el
+ * @param {string} state
+ */
+ function elSetState(el, state) {
+ if (el) {
+ el.trigger(state);
+ if (el.type === 'group') {
+ for (var i = 0; i < el.childCount(); i++) {
+ elSetState(el.childAt(i), state);
+ }
+ }
+ }
+ }
+ /**
+ * @param {module:echarts/data/List} data
+ * @param {Object} payload
+ * @param {string} state 'normal'|'emphasis'
+ * @inner
+ */
+ function toggleHighlight(data, payload, state) {
+ if (payload.dataIndex != null) {
+ var el = data.getItemGraphicEl(payload.dataIndex);
+ elSetState(el, state);
+ }
+ else if (payload.name) {
+ var dataIndex = data.indexOfName(payload.name);
+ var el = data.getItemGraphicEl(dataIndex);
+ elSetState(el, state);
+ }
+ else {
+ data.eachItemGraphicEl(function (el) {
+ elSetState(el, state);
+ });
+ }
+ }
+
+ // Enable Chart.extend.
+ clazzUtil.enableClassExtend(Chart);
+
+ // Add capability of registerClass, getClass, hasClass, registerSubTypeDefaulter and so on.
+ clazzUtil.enableClassManagement(Chart, {registerWhenExtend: true});
+
+ module.exports = Chart;
+
+
+/***/ },
+/* 42 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var zrUtil = __webpack_require__(3);
+
+ var pathTool = __webpack_require__(43);
+ var round = Math.round;
+ var Path = __webpack_require__(44);
+ var colorTool = __webpack_require__(38);
+ var matrix = __webpack_require__(17);
+ var vector = __webpack_require__(16);
+ var Gradient = __webpack_require__(4);
+
+ var graphic = {};
+
+ graphic.Group = __webpack_require__(29);
+
+ graphic.Image = __webpack_require__(59);
+
+ graphic.Text = __webpack_require__(62);
+
+ graphic.Circle = __webpack_require__(63);
+
+ graphic.Sector = __webpack_require__(64);
+
+ graphic.Ring = __webpack_require__(65);
+
+ graphic.Polygon = __webpack_require__(66);
+
+ graphic.Polyline = __webpack_require__(70);
+
+ graphic.Rect = __webpack_require__(71);
+
+ graphic.Line = __webpack_require__(72);
+
+ graphic.BezierCurve = __webpack_require__(73);
+
+ graphic.Arc = __webpack_require__(74);
+
+ graphic.LinearGradient = __webpack_require__(75);
+
+ graphic.RadialGradient = __webpack_require__(76);
+
+ graphic.BoundingRect = __webpack_require__(15);
+
+ /**
+ * Extend shape with parameters
+ */
+ graphic.extendShape = function (opts) {
+ return Path.extend(opts);
+ };
+
+ /**
+ * Extend path
+ */
+ graphic.extendPath = function (pathData, opts) {
+ return pathTool.extendFromString(pathData, opts);
+ };
+
+ /**
+ * Create a path element from path data string
+ * @param {string} pathData
+ * @param {Object} opts
+ * @param {module:zrender/core/BoundingRect} rect
+ * @param {string} [layout=cover] 'center' or 'cover'
+ */
+ graphic.makePath = function (pathData, opts, rect, layout) {
+ var path = pathTool.createFromString(pathData, opts);
+ var boundingRect = path.getBoundingRect();
+ if (rect) {
+ var aspect = boundingRect.width / boundingRect.height;
+
+ if (layout === 'center') {
+ // Set rect to center, keep width / height ratio.
+ var width = rect.height * aspect;
+ var height;
+ if (width <= rect.width) {
+ height = rect.height;
+ }
+ else {
+ width = rect.width;
+ height = width / aspect;
+ }
+ var cx = rect.x + rect.width / 2;
+ var cy = rect.y + rect.height / 2;
+
+ rect.x = cx - width / 2;
+ rect.y = cy - height / 2;
+ rect.width = width;
+ rect.height = height;
+ }
+
+ this.resizePath(path, rect);
+ }
+ return path;
+ };
+
+ graphic.mergePath = pathTool.mergePath,
+
+ /**
+ * Resize a path to fit the rect
+ * @param {module:zrender/graphic/Path} path
+ * @param {Object} rect
+ */
+ graphic.resizePath = function (path, rect) {
+ if (!path.applyTransform) {
+ return;
+ }
+
+ var pathRect = path.getBoundingRect();
+
+ var m = pathRect.calculateTransform(rect);
+
+ path.applyTransform(m);
+ };
+
+ /**
+ * Sub pixel optimize line for canvas
+ *
+ * @param {Object} param
+ * @param {Object} [param.shape]
+ * @param {number} [param.shape.x1]
+ * @param {number} [param.shape.y1]
+ * @param {number} [param.shape.x2]
+ * @param {number} [param.shape.y2]
+ * @param {Object} [param.style]
+ * @param {number} [param.style.lineWidth]
+ * @return {Object} Modified param
+ */
+ graphic.subPixelOptimizeLine = function (param) {
+ var subPixelOptimize = graphic.subPixelOptimize;
+ var shape = param.shape;
+ var lineWidth = param.style.lineWidth;
+
+ if (round(shape.x1 * 2) === round(shape.x2 * 2)) {
+ shape.x1 = shape.x2 = subPixelOptimize(shape.x1, lineWidth, true);
+ }
+ if (round(shape.y1 * 2) === round(shape.y2 * 2)) {
+ shape.y1 = shape.y2 = subPixelOptimize(shape.y1, lineWidth, true);
+ }
+ return param;
+ };
+
+ /**
+ * Sub pixel optimize rect for canvas
+ *
+ * @param {Object} param
+ * @param {Object} [param.shape]
+ * @param {number} [param.shape.x]
+ * @param {number} [param.shape.y]
+ * @param {number} [param.shape.width]
+ * @param {number} [param.shape.height]
+ * @param {Object} [param.style]
+ * @param {number} [param.style.lineWidth]
+ * @return {Object} Modified param
+ */
+ graphic.subPixelOptimizeRect = function (param) {
+ var subPixelOptimize = graphic.subPixelOptimize;
+ var shape = param.shape;
+ var lineWidth = param.style.lineWidth;
+ var originX = shape.x;
+ var originY = shape.y;
+ var originWidth = shape.width;
+ var originHeight = shape.height;
+ shape.x = subPixelOptimize(shape.x, lineWidth, true);
+ shape.y = subPixelOptimize(shape.y, lineWidth, true);
+ shape.width = Math.max(
+ subPixelOptimize(originX + originWidth, lineWidth, false) - shape.x,
+ originWidth === 0 ? 0 : 1
+ );
+ shape.height = Math.max(
+ subPixelOptimize(originY + originHeight, lineWidth, false) - shape.y,
+ originHeight === 0 ? 0 : 1
+ );
+ return param;
+ };
+
+ /**
+ * Sub pixel optimize for canvas
+ *
+ * @param {number} position Coordinate, such as x, y
+ * @param {number} lineWidth Should be nonnegative integer.
+ * @param {boolean=} positiveOrNegative Default false (negative).
+ * @return {number} Optimized position.
+ */
+ graphic.subPixelOptimize = function (position, lineWidth, positiveOrNegative) {
+ // Assure that (position + lineWidth / 2) is near integer edge,
+ // otherwise line will be fuzzy in canvas.
+ var doubledPosition = round(position * 2);
+ return (doubledPosition + round(lineWidth)) % 2 === 0
+ ? doubledPosition / 2
+ : (doubledPosition + (positiveOrNegative ? 1 : -1)) / 2;
+ };
+
+ /**
+ * @private
+ */
+ function doSingleEnterHover(el) {
+ if (el.__isHover) {
+ return;
+ }
+ if (el.__hoverStlDirty) {
+ var stroke = el.style.stroke;
+ var fill = el.style.fill;
+
+ // Create hoverStyle on mouseover
+ var hoverStyle = el.__hoverStl;
+ var lift = colorTool.lift;
+ hoverStyle.fill = hoverStyle.fill
+ || (fill && (fill instanceof Gradient ? fill : lift(fill, -0.1)));
+ hoverStyle.stroke = hoverStyle.stroke
+ || (stroke && (stroke instanceof Gradient ? stroke : lift(stroke, -0.1)));
+
+ var normalStyle = {};
+ for (var name in hoverStyle) {
+ if (hoverStyle.hasOwnProperty(name)) {
+ normalStyle[name] = el.style[name];
+ }
+ }
+
+ el.__normalStl = normalStyle;
+
+ el.__hoverStlDirty = false;
+ }
+ el.setStyle(el.__hoverStl);
+ el.z2 += 1;
+
+ el.__isHover = true;
+ }
+
+ /**
+ * @inner
+ */
+ function doSingleLeaveHover(el) {
+ if (!el.__isHover) {
+ return;
+ }
+
+ var normalStl = el.__normalStl;
+ normalStl && el.setStyle(normalStl);
+ el.z2 -= 1;
+
+ el.__isHover = false;
+ }
+
+ /**
+ * @inner
+ */
+ function doEnterHover(el) {
+ el.type === 'group'
+ ? el.traverse(function (child) {
+ if (child.type !== 'group') {
+ doSingleEnterHover(child);
+ }
+ })
+ : doSingleEnterHover(el);
+ }
+
+ function doLeaveHover(el) {
+ el.type === 'group'
+ ? el.traverse(function (child) {
+ if (child.type !== 'group') {
+ doSingleLeaveHover(child);
+ }
+ })
+ : doSingleLeaveHover(el);
+ }
+
+ /**
+ * @inner
+ */
+ function setElementHoverStl(el, hoverStl) {
+ // If element has sepcified hoverStyle, then use it instead of given hoverStyle
+ // Often used when item group has a label element and it's hoverStyle is different
+ el.__hoverStl = el.hoverStyle || hoverStl || {};
+ el.__hoverStlDirty = true;
+ }
+
+ /**
+ * @inner
+ */
+ function onElementMouseOver() {
+ // Only if element is not in emphasis status
+ !this.__isEmphasis && doEnterHover(this);
+ }
+
+ /**
+ * @inner
+ */
+ function onElementMouseOut() {
+ // Only if element is not in emphasis status
+ !this.__isEmphasis && doLeaveHover(this);
+ }
+
+ /**
+ * @inner
+ */
+ function enterEmphasis() {
+ this.__isEmphasis = true;
+ doEnterHover(this);
+ }
+
+ /**
+ * @inner
+ */
+ function leaveEmphasis() {
+ this.__isEmphasis = false;
+ doLeaveHover(this);
+ }
+
+ /**
+ * Set hover style of element
+ * @param {module:zrender/Element} el
+ * @param {Object} [hoverStyle]
+ */
+ graphic.setHoverStyle = function (el, hoverStyle) {
+ el.type === 'group'
+ ? el.traverse(function (child) {
+ if (child.type !== 'group') {
+ setElementHoverStl(child, hoverStyle);
+ }
+ })
+ : setElementHoverStl(el, hoverStyle);
+ // Remove previous bound handlers
+ el.on('mouseover', onElementMouseOver)
+ .on('mouseout', onElementMouseOut);
+
+ // Emphasis, normal can be triggered manually
+ el.on('emphasis', enterEmphasis)
+ .on('normal', leaveEmphasis);
+ };
+
+ /**
+ * Set text option in the style
+ * @param {Object} textStyle
+ * @param {module:echarts/model/Model} labelModel
+ * @param {string} color
+ */
+ graphic.setText = function (textStyle, labelModel, color) {
+ var labelPosition = labelModel.getShallow('position') || 'inside';
+ var labelColor = labelPosition.indexOf('inside') >= 0 ? 'white' : color;
+ var textStyleModel = labelModel.getModel('textStyle');
+ zrUtil.extend(textStyle, {
+ textDistance: labelModel.getShallow('distance') || 5,
+ textFont: textStyleModel.getFont(),
+ textPosition: labelPosition,
+ textFill: textStyleModel.getTextColor() || labelColor
+ });
+ };
+
+ function animateOrSetProps(isUpdate, el, props, animatableModel, cb) {
+ var postfix = isUpdate ? 'Update' : '';
+ var duration = animatableModel
+ && animatableModel.getShallow('animationDuration' + postfix);
+ var animationEasing = animatableModel
+ && animatableModel.getShallow('animationEasing' + postfix);
+
+ animatableModel && animatableModel.getShallow('animation')
+ ? el.animateTo(props, duration, animationEasing, cb)
+ : (el.attr(props), cb && cb());
+ }
+ /**
+ * Update graphic element properties with or without animation according to the configuration in series
+ * @param {module:zrender/Element} el
+ * @param {Object} props
+ * @param {module:echarts/model/Model} [animatableModel]
+ * @param {Function} cb
+ */
+ graphic.updateProps = zrUtil.curry(animateOrSetProps, true);
+
+ /**
+ * Init graphic element properties with or without animation according to the configuration in series
+ * @param {module:zrender/Element} el
+ * @param {Object} props
+ * @param {module:echarts/model/Model} [animatableModel]
+ * @param {Function} cb
+ */
+ graphic.initProps = zrUtil.curry(animateOrSetProps, false);
+
+ /**
+ * Get transform matrix of target (param target),
+ * in coordinate of its ancestor (param ancestor)
+ *
+ * @param {module:zrender/mixin/Transformable} target
+ * @param {module:zrender/mixin/Transformable} ancestor
+ */
+ graphic.getTransform = function (target, ancestor) {
+ var mat = matrix.identity([]);
+
+ while (target && target !== ancestor) {
+ matrix.mul(mat, target.getLocalTransform(), mat);
+ target = target.parent;
+ }
+
+ return mat;
+ };
+
+ /**
+ * Apply transform to an vertex.
+ * @param {Array.<number>} vertex [x, y]
+ * @param {Array.<number>} transform Transform matrix: like [1, 0, 0, 1, 0, 0]
+ * @param {boolean=} invert Whether use invert matrix.
+ * @return {Array.<number>} [x, y]
+ */
+ graphic.applyTransform = function (vertex, transform, invert) {
+ if (invert) {
+ transform = matrix.invert([], transform);
+ }
+ return vector.applyTransform([], vertex, transform);
+ };
+
+ /**
+ * @param {string} direction 'left' 'right' 'top' 'bottom'
+ * @param {Array.<number>} transform Transform matrix: like [1, 0, 0, 1, 0, 0]
+ * @param {boolean=} invert Whether use invert matrix.
+ * @return {string} Transformed direction. 'left' 'right' 'top' 'bottom'
+ */
+ graphic.transformDirection = function (direction, transform, invert) {
+
+ // Pick a base, ensure that transform result will not be (0, 0).
+ var hBase = (transform[4] === 0 || transform[5] === 0 || transform[0] === 0)
+ ? 1 : Math.abs(2 * transform[4] / transform[0]);
+ var vBase = (transform[4] === 0 || transform[5] === 0 || transform[2] === 0)
+ ? 1 : Math.abs(2 * transform[4] / transform[2]);
+
+ var vertex = [
+ direction === 'left' ? -hBase : direction === 'right' ? hBase : 0,
+ direction === 'top' ? -vBase : direction === 'bottom' ? vBase : 0
+ ];
+
+ vertex = graphic.applyTransform(vertex, transform, invert);
+
+ return Math.abs(vertex[0]) > Math.abs(vertex[1])
+ ? (vertex[0] > 0 ? 'right' : 'left')
+ : (vertex[1] > 0 ? 'bottom' : 'top');
+ };
+
+ module.exports = graphic;
+
+
+/***/ },
+/* 43 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var Path = __webpack_require__(44);
+ var PathProxy = __webpack_require__(48);
+ var transformPath = __webpack_require__(58);
+ var matrix = __webpack_require__(17);
+
+ // command chars
+ var cc = [
+ 'm', 'M', 'l', 'L', 'v', 'V', 'h', 'H', 'z', 'Z',
+ 'c', 'C', 'q', 'Q', 't', 'T', 's', 'S', 'a', 'A'
+ ];
+
+ var mathSqrt = Math.sqrt;
+ var mathSin = Math.sin;
+ var mathCos = Math.cos;
+ var PI = Math.PI;
+
+ var vMag = function(v) {
+ return Math.sqrt(v[0] * v[0] + v[1] * v[1]);
+ };
+ var vRatio = function(u, v) {
+ return (u[0] * v[0] + u[1] * v[1]) / (vMag(u) * vMag(v));
+ };
+ var vAngle = function(u, v) {
+ return (u[0] * v[1] < u[1] * v[0] ? -1 : 1)
+ * Math.acos(vRatio(u, v));
+ };
+
+ function processArc(x1, y1, x2, y2, fa, fs, rx, ry, psiDeg, cmd, path) {
+ var psi = psiDeg * (PI / 180.0);
+ var xp = mathCos(psi) * (x1 - x2) / 2.0
+ + mathSin(psi) * (y1 - y2) / 2.0;
+ var yp = -1 * mathSin(psi) * (x1 - x2) / 2.0
+ + mathCos(psi) * (y1 - y2) / 2.0;
+
+ var lambda = (xp * xp) / (rx * rx) + (yp * yp) / (ry * ry);
+
+ if (lambda > 1) {
+ rx *= mathSqrt(lambda);
+ ry *= mathSqrt(lambda);
+ }
+
+ var f = (fa === fs ? -1 : 1)
+ * mathSqrt((((rx * rx) * (ry * ry))
+ - ((rx * rx) * (yp * yp))
+ - ((ry * ry) * (xp * xp))) / ((rx * rx) * (yp * yp)
+ + (ry * ry) * (xp * xp))
+ ) || 0;
+
+ var cxp = f * rx * yp / ry;
+ var cyp = f * -ry * xp / rx;
+
+ var cx = (x1 + x2) / 2.0
+ + mathCos(psi) * cxp
+ - mathSin(psi) * cyp;
+ var cy = (y1 + y2) / 2.0
+ + mathSin(psi) * cxp
+ + mathCos(psi) * cyp;
+
+ var theta = vAngle([ 1, 0 ], [ (xp - cxp) / rx, (yp - cyp) / ry ]);
+ var u = [ (xp - cxp) / rx, (yp - cyp) / ry ];
+ var v = [ (-1 * xp - cxp) / rx, (-1 * yp - cyp) / ry ];
+ var dTheta = vAngle(u, v);
+
+ if (vRatio(u, v) <= -1) {
+ dTheta = PI;
+ }
+ if (vRatio(u, v) >= 1) {
+ dTheta = 0;
+ }
+ if (fs === 0 && dTheta > 0) {
+ dTheta = dTheta - 2 * PI;
+ }
+ if (fs === 1 && dTheta < 0) {
+ dTheta = dTheta + 2 * PI;
+ }
+
+ path.addData(cmd, cx, cy, rx, ry, theta, dTheta, psi, fs);
+ }
+
+ function createPathProxyFromString(data) {
+ if (!data) {
+ return [];
+ }
+
+ // command string
+ var cs = data.replace(/-/g, ' -')
+ .replace(/ /g, ' ')
+ .replace(/ /g, ',')
+ .replace(/,,/g, ',');
+
+ var n;
+ // create pipes so that we can split the data
+ for (n = 0; n < cc.length; n++) {
+ cs = cs.replace(new RegExp(cc[n], 'g'), '|' + cc[n]);
+ }
+
+ // create array
+ var arr = cs.split('|');
+ // init context point
+ var cpx = 0;
+ var cpy = 0;
+
+ var path = new PathProxy();
+ var CMD = PathProxy.CMD;
+
+ var prevCmd;
+ for (n = 1; n < arr.length; n++) {
+ var str = arr[n];
+ var c = str.charAt(0);
+ var off = 0;
+ var p = str.slice(1).replace(/e,-/g, 'e-').split(',');
+ var cmd;
+
+ if (p.length > 0 && p[0] === '') {
+ p.shift();
+ }
+
+ for (var i = 0; i < p.length; i++) {
+ p[i] = parseFloat(p[i]);
+ }
+ while (off < p.length && !isNaN(p[off])) {
+ if (isNaN(p[0])) {
+ break;
+ }
+ var ctlPtx;
+ var ctlPty;
+
+ var rx;
+ var ry;
+ var psi;
+ var fa;
+ var fs;
+
+ var x1 = cpx;
+ var y1 = cpy;
+
+ // convert l, H, h, V, and v to L
+ switch (c) {
+ case 'l':
+ cpx += p[off++];
+ cpy += p[off++];
+ cmd = CMD.L;
+ path.addData(cmd, cpx, cpy);
+ break;
+ case 'L':
+ cpx = p[off++];
+ cpy = p[off++];
+ cmd = CMD.L;
+ path.addData(cmd, cpx, cpy);
+ break;
+ case 'm':
+ cpx += p[off++];
+ cpy += p[off++];
+ cmd = CMD.M;
+ path.addData(cmd, cpx, cpy);
+ c = 'l';
+ break;
+ case 'M':
+ cpx = p[off++];
+ cpy = p[off++];
+ cmd = CMD.M;
+ path.addData(cmd, cpx, cpy);
+ c = 'L';
+ break;
+ case 'h':
+ cpx += p[off++];
+ cmd = CMD.L;
+ path.addData(cmd, cpx, cpy);
+ break;
+ case 'H':
+ cpx = p[off++];
+ cmd = CMD.L;
+ path.addData(cmd, cpx, cpy);
+ break;
+ case 'v':
+ cpy += p[off++];
+ cmd = CMD.L;
+ path.addData(cmd, cpx, cpy);
+ break;
+ case 'V':
+ cpy = p[off++];
+ cmd = CMD.L;
+ path.addData(cmd, cpx, cpy);
+ break;
+ case 'C':
+ cmd = CMD.C;
+ path.addData(
+ cmd, p[off++], p[off++], p[off++], p[off++], p[off++], p[off++]
+ );
+ cpx = p[off - 2];
+ cpy = p[off - 1];
+ break;
+ case 'c':
+ cmd = CMD.C;
+ path.addData(
+ cmd,
+ p[off++] + cpx, p[off++] + cpy,
+ p[off++] + cpx, p[off++] + cpy,
+ p[off++] + cpx, p[off++] + cpy
+ );
+ cpx += p[off - 2];
+ cpy += p[off - 1];
+ break;
+ case 'S':
+ ctlPtx = cpx;
+ ctlPty = cpy;
+ var len = path.len();
+ var pathData = path.data;
+ if (prevCmd === CMD.C) {
+ ctlPtx += cpx - pathData[len - 4];
+ ctlPty += cpy - pathData[len - 3];
+ }
+ cmd = CMD.C;
+ x1 = p[off++];
+ y1 = p[off++];
+ cpx = p[off++];
+ cpy = p[off++];
+ path.addData(cmd, ctlPtx, ctlPty, x1, y1, cpx, cpy);
+ break;
+ case 's':
+ ctlPtx = cpx;
+ ctlPty = cpy;
+ var len = path.len();
+ var pathData = path.data;
+ if (prevCmd === CMD.C) {
+ ctlPtx += cpx - pathData[len - 4];
+ ctlPty += cpy - pathData[len - 3];
+ }
+ cmd = CMD.C;
+ x1 = cpx + p[off++];
+ y1 = cpy + p[off++];
+ cpx += p[off++];
+ cpy += p[off++];
+ path.addData(cmd, ctlPtx, ctlPty, x1, y1, cpx, cpy);
+ break;
+ case 'Q':
+ x1 = p[off++];
+ y1 = p[off++];
+ cpx = p[off++];
+ cpy = p[off++];
+ cmd = CMD.Q;
+ path.addData(cmd, x1, y1, cpx, cpy);
+ break;
+ case 'q':
+ x1 = p[off++] + cpx;
+ y1 = p[off++] + cpy;
+ cpx += p[off++];
+ cpy += p[off++];
+ cmd = CMD.Q;
+ path.addData(cmd, x1, y1, cpx, cpy);
+ break;
+ case 'T':
+ ctlPtx = cpx;
+ ctlPty = cpy;
+ var len = path.len();
+ var pathData = path.data;
+ if (prevCmd === CMD.Q) {
+ ctlPtx += cpx - pathData[len - 4];
+ ctlPty += cpy - pathData[len - 3];
+ }
+ cpx = p[off++];
+ cpy = p[off++];
+ cmd = CMD.Q;
+ path.addData(cmd, ctlPtx, ctlPty, cpx, cpy);
+ break;
+ case 't':
+ ctlPtx = cpx;
+ ctlPty = cpy;
+ var len = path.len();
+ var pathData = path.data;
+ if (prevCmd === CMD.Q) {
+ ctlPtx += cpx - pathData[len - 4];
+ ctlPty += cpy - pathData[len - 3];
+ }
+ cpx += p[off++];
+ cpy += p[off++];
+ cmd = CMD.Q;
+ path.addData(cmd, ctlPtx, ctlPty, cpx, cpy);
+ break;
+ case 'A':
+ rx = p[off++];
+ ry = p[off++];
+ psi = p[off++];
+ fa = p[off++];
+ fs = p[off++];
+
+ x1 = cpx, y1 = cpy;
+ cpx = p[off++];
+ cpy = p[off++];
+ cmd = CMD.A;
+ processArc(
+ x1, y1, cpx, cpy, fa, fs, rx, ry, psi, cmd, path
+ );
+ break;
+ case 'a':
+ rx = p[off++];
+ ry = p[off++];
+ psi = p[off++];
+ fa = p[off++];
+ fs = p[off++];
+
+ x1 = cpx, y1 = cpy;
+ cpx += p[off++];
+ cpy += p[off++];
+ cmd = CMD.A;
+ processArc(
+ x1, y1, cpx, cpy, fa, fs, rx, ry, psi, cmd, path
+ );
+ break;
+ }
+ }
+
+ if (c === 'z' || c === 'Z') {
+ cmd = CMD.Z;
+ path.addData(cmd);
+ }
+
+ prevCmd = cmd;
+ }
+
+ path.toStatic();
+
+ return path;
+ }
+
+ // TODO Optimize double memory cost problem
+ function createPathOptions(str, opts) {
+ var pathProxy = createPathProxyFromString(str);
+ var transform;
+ opts = opts || {};
+ opts.buildPath = function (path) {
+ path.setData(pathProxy.data);
+ transform && transformPath(path, transform);
+ // Svg and vml renderer don't have context
+ var ctx = path.getContext();
+ if (ctx) {
+ path.rebuildPath(ctx);
+ }
+ };
+
+ opts.applyTransform = function (m) {
+ if (!transform) {
+ transform = matrix.create();
+ }
+ matrix.mul(transform, m, transform);
+ };
+
+ return opts;
+ }
+
+ module.exports = {
+ /**
+ * Create a Path object from path string data
+ * http://www.w3.org/TR/SVG/paths.html#PathData
+ * @param {Object} opts Other options
+ */
+ createFromString: function (str, opts) {
+ return new Path(createPathOptions(str, opts));
+ },
+
+ /**
+ * Create a Path class from path string data
+ * @param {string} str
+ * @param {Object} opts Other options
+ */
+ extendFromString: function (str, opts) {
+ return Path.extend(createPathOptions(str, opts));
+ },
+
+ /**
+ * Merge multiple paths
+ */
+ // TODO Apply transform
+ // TODO stroke dash
+ // TODO Optimize double memory cost problem
+ mergePath: function (pathEls, opts) {
+ var pathList = [];
+ var len = pathEls.length;
+ var pathEl;
+ var i;
+ for (i = 0; i < len; i++) {
+ pathEl = pathEls[i];
+ if (pathEl.__dirty) {
+ pathEl.buildPath(pathEl.path, pathEl.shape);
+ }
+ pathList.push(pathEl.path);
+ }
+
+ var pathBundle = new Path(opts);
+ pathBundle.buildPath = function (path) {
+ path.appendPath(pathList);
+ // Svg and vml renderer don't have context
+ var ctx = path.getContext();
+ if (ctx) {
+ path.rebuildPath(ctx);
+ }
+ };
+
+ return pathBundle;
+ }
+ };
+
+
+/***/ },
+/* 44 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Path element
+ * @module zrender/graphic/Path
+ */
+
+
+
+ var Displayable = __webpack_require__(45);
+ var zrUtil = __webpack_require__(3);
+ var PathProxy = __webpack_require__(48);
+ var pathContain = __webpack_require__(51);
+
+ var Gradient = __webpack_require__(4);
+
+ function pathHasFill(style) {
+ var fill = style.fill;
+ return fill != null && fill !== 'none';
+ }
+
+ function pathHasStroke(style) {
+ var stroke = style.stroke;
+ return stroke != null && stroke !== 'none' && style.lineWidth > 0;
+ }
+
+ var abs = Math.abs;
+
+ /**
+ * @alias module:zrender/graphic/Path
+ * @extends module:zrender/graphic/Displayable
+ * @constructor
+ * @param {Object} opts
+ */
+ function Path(opts) {
+ Displayable.call(this, opts);
+
+ /**
+ * @type {module:zrender/core/PathProxy}
+ * @readOnly
+ */
+ this.path = new PathProxy();
+ }
+
+ Path.prototype = {
+
+ constructor: Path,
+
+ type: 'path',
+
+ __dirtyPath: true,
+
+ strokeContainThreshold: 5,
+
+ brush: function (ctx) {
+ ctx.save();
+
+ var style = this.style;
+ var path = this.path;
+ var hasStroke = pathHasStroke(style);
+ var hasFill = pathHasFill(style);
+
+ if (this.__dirtyPath) {
+ // Update gradient because bounding rect may changed
+ if (hasFill && (style.fill instanceof Gradient)) {
+ style.fill.updateCanvasGradient(this, ctx);
+ }
+ if (hasStroke && (style.stroke instanceof Gradient)) {
+ style.stroke.updateCanvasGradient(this, ctx);
+ }
+ }
+
+ style.bind(ctx, this);
+ this.setTransform(ctx);
+
+ var lineDash = style.lineDash;
+ var lineDashOffset = style.lineDashOffset;
+
+ var ctxLineDash = !!ctx.setLineDash;
+
+ // Proxy context
+ // Rebuild path in following 2 cases
+ // 1. Path is dirty
+ // 2. Path needs javascript implemented lineDash stroking.
+ // In this case, lineDash information will not be saved in PathProxy
+ if (this.__dirtyPath || (
+ lineDash && !ctxLineDash && hasStroke
+ )) {
+ path = this.path.beginPath(ctx);
+
+ // Setting line dash before build path
+ if (lineDash && !ctxLineDash) {
+ path.setLineDash(lineDash);
+ path.setLineDashOffset(lineDashOffset);
+ }
+
+ this.buildPath(path, this.shape);
+
+ // Clear path dirty flag
+ this.__dirtyPath = false;
+ }
+ else {
+ // Replay path building
+ ctx.beginPath();
+ this.path.rebuildPath(ctx);
+ }
+
+ hasFill && path.fill(ctx);
+
+ if (lineDash && ctxLineDash) {
+ ctx.setLineDash(lineDash);
+ ctx.lineDashOffset = lineDashOffset;
+ }
+
+ hasStroke && path.stroke(ctx);
+
+ // Draw rect text
+ if (style.text != null) {
+ // var rect = this.getBoundingRect();
+ this.drawRectText(ctx, this.getBoundingRect());
+ }
+
+ ctx.restore();
+ },
+
+ buildPath: function (ctx, shapeCfg) {},
+
+ getBoundingRect: function () {
+ var rect = this._rect;
+ var style = this.style;
+ var needsUpdateRect = !rect;
+ if (needsUpdateRect) {
+ var path = this.path;
+ if (this.__dirtyPath) {
+ path.beginPath();
+ this.buildPath(path, this.shape);
+ }
+ rect = path.getBoundingRect();
+ }
+ this._rect = rect;
+
+ if (pathHasStroke(style)) {
+ // Needs update rect with stroke lineWidth when
+ // 1. Element changes scale or lineWidth
+ // 2. Shape is changed
+ var rectWithStroke = this._rectWithStroke;
+ if (this.__dirty || needsUpdateRect) {
+ var rectWithStroke = this._rectWithStroke
+ || (this._rectWithStroke = rect.clone());
+ rectWithStroke.copy(rect);
+ // FIXME Must after updateTransform
+ var w = style.lineWidth;
+ // PENDING, Min line width is needed when line is horizontal or vertical
+ var lineScale = style.strokeNoScale ? this.getLineScale() : 1;
+
+ // Only add extra hover lineWidth when there are no fill
+ if (!pathHasFill(style)) {
+ w = Math.max(w, this.strokeContainThreshold);
+ }
+ // Consider line width
+ // Line scale can't be 0;
+ if (lineScale > 1e-10) {
+ rectWithStroke.width += w / lineScale;
+ rectWithStroke.height += w / lineScale;
+ rectWithStroke.x -= w / lineScale / 2;
+ rectWithStroke.y -= w / lineScale / 2;
+ }
+ }
+
+ // Return rect with stroke
+ return rectWithStroke;
+ }
+
+ return rect;
+ },
+
+ contain: function (x, y) {
+ var localPos = this.transformCoordToLocal(x, y);
+ var rect = this.getBoundingRect();
+ var style = this.style;
+ x = localPos[0];
+ y = localPos[1];
+
+ if (rect.contain(x, y)) {
+ var pathData = this.path.data;
+ if (pathHasStroke(style)) {
+ var lineWidth = style.lineWidth;
+ var lineScale = style.strokeNoScale ? this.getLineScale() : 1;
+ // Line scale can't be 0;
+ if (lineScale > 1e-10) {
+ // Only add extra hover lineWidth when there are no fill
+ if (!pathHasFill(style)) {
+ lineWidth = Math.max(lineWidth, this.strokeContainThreshold);
+ }
+ if (pathContain.containStroke(
+ pathData, lineWidth / lineScale, x, y
+ )) {
+ return true;
+ }
+ }
+ }
+ if (pathHasFill(style)) {
+ return pathContain.contain(pathData, x, y);
+ }
+ }
+ return false;
+ },
+
+ /**
+ * @param {boolean} dirtyPath
+ */
+ dirty: function (dirtyPath) {
+ if (arguments.length ===0) {
+ dirtyPath = true;
+ }
+ // Only mark dirty, not mark clean
+ if (dirtyPath) {
+ this.__dirtyPath = dirtyPath;
+ this._rect = null;
+ }
+
+ this.__dirty = true;
+
+ this.__zr && this.__zr.refresh();
+
+ // Used as a clipping path
+ if (this.__clipTarget) {
+ this.__clipTarget.dirty();
+ }
+ },
+
+ /**
+ * Alias for animate('shape')
+ * @param {boolean} loop
+ */
+ animateShape: function (loop) {
+ return this.animate('shape', loop);
+ },
+
+ // Overwrite attrKV
+ attrKV: function (key, value) {
+ // FIXME
+ if (key === 'shape') {
+ this.setShape(value);
+ }
+ else {
+ Displayable.prototype.attrKV.call(this, key, value);
+ }
+ },
+
+ /**
+ * @param {Object|string} key
+ * @param {*} value
+ */
+ setShape: function (key, value) {
+ var shape = this.shape;
+ // Path from string may not have shape
+ if (shape) {
+ if (zrUtil.isObject(key)) {
+ for (var name in key) {
+ shape[name] = key[name];
+ }
+ }
+ else {
+ shape[key] = value;
+ }
+ this.dirty(true);
+ }
+ return this;
+ },
+
+ getLineScale: function () {
+ var m = this.transform;
+ // Get the line scale.
+ // Determinant of `m` means how much the area is enlarged by the
+ // transformation. So its square root can be used as a scale factor
+ // for width.
+ return m && abs(m[0] - 1) > 1e-10 && abs(m[3] - 1) > 1e-10
+ ? Math.sqrt(abs(m[0] * m[3] - m[2] * m[1]))
+ : 1;
+ }
+ };
+
+ /**
+ * 扩展一个 Path element, 比如星形,圆等。
+ * Extend a path element
+ * @param {Object} props
+ * @param {string} props.type Path type
+ * @param {Function} props.init Initialize
+ * @param {Function} props.buildPath Overwrite buildPath method
+ * @param {Object} [props.style] Extended default style config
+ * @param {Object} [props.shape] Extended default shape config
+ */
+ Path.extend = function (defaults) {
+ var Sub = function (opts) {
+ Path.call(this, opts);
+
+ if (defaults.style) {
+ // Extend default style
+ this.style.extendFrom(defaults.style, false);
+ }
+
+ // Extend default shape
+ var defaultShape = defaults.shape;
+ if (defaultShape) {
+ this.shape = this.shape || {};
+ var thisShape = this.shape;
+ for (var name in defaultShape) {
+ if (
+ ! thisShape.hasOwnProperty(name)
+ && defaultShape.hasOwnProperty(name)
+ ) {
+ thisShape[name] = defaultShape[name];
+ }
+ }
+ }
+
+ defaults.init && defaults.init.call(this, opts);
+ };
+
+ zrUtil.inherits(Sub, Path);
+
+ // FIXME ä¸èƒ½ extend position, rotation 等引用对象
+ for (var name in defaults) {
+ // Extending prototype values and methods
+ if (name !== 'style' && name !== 'shape') {
+ Sub.prototype[name] = defaults[name];
+ }
+ }
+
+ return Sub;
+ };
+
+ zrUtil.inherits(Path, Displayable);
+
+ module.exports = Path;
+
+
+/***/ },
+/* 45 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * å¯ç»˜åˆ¶çš„图形基类
+ * Base class of all displayable graphic objects
+ * @module zrender/graphic/Displayable
+ */
+
+
+
+ var zrUtil = __webpack_require__(3);
+
+ var Style = __webpack_require__(46);
+
+ var Element = __webpack_require__(30);
+ var RectText = __webpack_require__(47);
+ // var Stateful = require('./mixin/Stateful');
+
+ /**
+ * @alias module:zrender/graphic/Displayable
+ * @extends module:zrender/Element
+ * @extends module:zrender/graphic/mixin/RectText
+ */
+ function Displayable(opts) {
+
+ opts = opts || {};
+
+ Element.call(this, opts);
+
+ // Extend properties
+ for (var name in opts) {
+ if (
+ opts.hasOwnProperty(name) &&
+ name !== 'style'
+ ) {
+ this[name] = opts[name];
+ }
+ }
+
+ /**
+ * @type {module:zrender/graphic/Style}
+ */
+ this.style = new Style(opts.style);
+
+ this._rect = null;
+ // Shapes for cascade clipping.
+ this.__clipPaths = [];
+
+ // FIXME Stateful must be mixined after style is setted
+ // Stateful.call(this, opts);
+ }
+
+ Displayable.prototype = {
+
+ constructor: Displayable,
+
+ type: 'displayable',
+
+ /**
+ * Displayable 是å¦ä¸ºè„,Painter 中会根æ®è¯¥æ ‡è®°åˆ¤æ–­æ˜¯å¦éœ€è¦æ˜¯å¦éœ€è¦é‡æ–°ç»˜åˆ¶
+ * Dirty flag. From which painter will determine if this displayable object needs brush
+ * @name module:zrender/graphic/Displayable#__dirty
+ * @type {boolean}
+ */
+ __dirty: true,
+
+ /**
+ * 图形是å¦å¯è§ï¼Œä¸ºtrueæ—¶ä¸ç»˜åˆ¶å›¾å½¢ï¼Œä½†æ˜¯ä»èƒ½è§¦å‘鼠标事件
+ * If ignore drawing of the displayable object. Mouse event will still be triggered
+ * @name module:/zrender/graphic/Displayable#invisible
+ * @type {boolean}
+ * @default false
+ */
+ invisible: false,
+
+ /**
+ * @name module:/zrender/graphic/Displayable#z
+ * @type {number}
+ * @default 0
+ */
+ z: 0,
+
+ /**
+ * @name module:/zrender/graphic/Displayable#z
+ * @type {number}
+ * @default 0
+ */
+ z2: 0,
+
+ /**
+ * z层level,决定绘画在哪层canvas中
+ * @name module:/zrender/graphic/Displayable#zlevel
+ * @type {number}
+ * @default 0
+ */
+ zlevel: 0,
+
+ /**
+ * 是å¦å¯æ‹–拽
+ * @name module:/zrender/graphic/Displayable#draggable
+ * @type {boolean}
+ * @default false
+ */
+ draggable: false,
+
+ /**
+ * 是å¦æ­£åœ¨æ‹–拽
+ * @name module:/zrender/graphic/Displayable#draggable
+ * @type {boolean}
+ * @default false
+ */
+ dragging: false,
+
+ /**
+ * 是å¦ç›¸åº”鼠标事件
+ * @name module:/zrender/graphic/Displayable#silent
+ * @type {boolean}
+ * @default false
+ */
+ silent: false,
+
+ /**
+ * If enable culling
+ * @type {boolean}
+ * @default false
+ */
+ culling: false,
+
+ /**
+ * Mouse cursor when hovered
+ * @name module:/zrender/graphic/Displayable#cursor
+ * @type {string}
+ */
+ cursor: 'pointer',
+
+ /**
+ * If hover area is bounding rect
+ * @name module:/zrender/graphic/Displayable#rectHover
+ * @type {string}
+ */
+ rectHover: false,
+
+ beforeBrush: function (ctx) {},
+
+ afterBrush: function (ctx) {},
+
+ /**
+ * 图形绘制方法
+ * @param {Canvas2DRenderingContext} ctx
+ */
+ // Interface
+ brush: function (ctx) {},
+
+ /**
+ * 获å–最å°åŒ…å›´ç›’
+ * @return {module:zrender/core/BoundingRect}
+ */
+ // Interface
+ getBoundingRect: function () {},
+
+ /**
+ * 判断åæ ‡ x, y 是å¦åœ¨å›¾å½¢ä¸Š
+ * If displayable element contain coord x, y
+ * @param {number} x
+ * @param {number} y
+ * @return {boolean}
+ */
+ contain: function (x, y) {
+ return this.rectContain(x, y);
+ },
+
+ /**
+ * @param {Function} cb
+ * @param {} context
+ */
+ traverse: function (cb, context) {
+ cb.call(context, this);
+ },
+
+ /**
+ * 判断åæ ‡ x, y 是å¦åœ¨å›¾å½¢çš„包围盒上
+ * If bounding rect of element contain coord x, y
+ * @param {number} x
+ * @param {number} y
+ * @return {boolean}
+ */
+ rectContain: function (x, y) {
+ var coord = this.transformCoordToLocal(x, y);
+ var rect = this.getBoundingRect();
+ return rect.contain(coord[0], coord[1]);
+ },
+
+ /**
+ * 标记图形元素为è„,并且在下一帧é‡ç»˜
+ * Mark displayable element dirty and refresh next frame
+ */
+ dirty: function () {
+ this.__dirty = true;
+
+ this._rect = null;
+
+ this.__zr && this.__zr.refresh();
+ },
+
+ /**
+ * 图形是å¦ä¼šè§¦å‘事件
+ * If displayable object binded any event
+ * @return {boolean}
+ */
+ // TODO, 通过 bind 绑定的事件
+ // isSilent: function () {
+ // return !(
+ // this.hoverable || this.draggable
+ // || this.onmousemove || this.onmouseover || this.onmouseout
+ // || this.onmousedown || this.onmouseup || this.onclick
+ // || this.ondragenter || this.ondragover || this.ondragleave
+ // || this.ondrop
+ // );
+ // },
+ /**
+ * Alias for animate('style')
+ * @param {boolean} loop
+ */
+ animateStyle: function (loop) {
+ return this.animate('style', loop);
+ },
+
+ attrKV: function (key, value) {
+ if (key !== 'style') {
+ Element.prototype.attrKV.call(this, key, value);
+ }
+ else {
+ this.style.set(value);
+ }
+ },
+
+ /**
+ * @param {Object|string} key
+ * @param {*} value
+ */
+ setStyle: function (key, value) {
+ this.style.set(key, value);
+ this.dirty(false);
+ return this;
+ }
+ };
+
+ zrUtil.inherits(Displayable, Element);
+
+ zrUtil.mixin(Displayable, RectText);
+ // zrUtil.mixin(Displayable, Stateful);
+
+ module.exports = Displayable;
+
+
+/***/ },
+/* 46 */
+/***/ function(module, exports) {
+
+ /**
+ * @module zrender/graphic/Style
+ */
+
+
+
+ var STYLE_LIST_COMMON = [
+ 'lineCap', 'lineJoin', 'miterLimit',
+ 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY', 'shadowColor'
+ ];
+
+ var Style = function (opts) {
+ this.extendFrom(opts);
+ };
+
+ Style.prototype = {
+
+ constructor: Style,
+
+ /**
+ * @type {string}
+ */
+ fill: '#000000',
+
+ /**
+ * @type {string}
+ */
+ stroke: null,
+
+ /**
+ * @type {number}
+ */
+ opacity: 1,
+
+ /**
+ * @type {Array.<number>}
+ */
+ lineDash: null,
+
+ /**
+ * @type {number}
+ */
+ lineDashOffset: 0,
+
+ /**
+ * @type {number}
+ */
+ shadowBlur: 0,
+
+ /**
+ * @type {number}
+ */
+ shadowOffsetX: 0,
+
+ /**
+ * @type {number}
+ */
+ shadowOffsetY: 0,
+
+ /**
+ * @type {number}
+ */
+ lineWidth: 1,
+
+ /**
+ * If stroke ignore scale
+ * @type {Boolean}
+ */
+ strokeNoScale: false,
+
+ // Bounding rect text configuration
+ // Not affected by element transform
+ /**
+ * @type {string}
+ */
+ text: null,
+
+ /**
+ * @type {string}
+ */
+ textFill: '#000',
+
+ /**
+ * @type {string}
+ */
+ textStroke: null,
+
+ /**
+ * 'inside', 'left', 'right', 'top', 'bottom'
+ * [x, y]
+ * @type {string|Array.<number>}
+ * @default 'inside'
+ */
+ textPosition: 'inside',
+
+ /**
+ * @type {string}
+ */
+ textBaseline: null,
+
+ /**
+ * @type {string}
+ */
+ textAlign: null,
+
+ /**
+ * @type {string}
+ */
+ textVerticalAlign: null,
+
+ /**
+ * @type {number}
+ */
+ textDistance: 5,
+
+ /**
+ * @type {number}
+ */
+ textShadowBlur: 0,
+
+ /**
+ * @type {number}
+ */
+ textShadowOffsetX: 0,
+
+ /**
+ * @type {number}
+ */
+ textShadowOffsetY: 0,
+
+ /**
+ * @param {CanvasRenderingContext2D} ctx
+ */
+ bind: function (ctx, el) {
+ var fill = this.fill;
+ var stroke = this.stroke;
+ for (var i = 0; i < STYLE_LIST_COMMON.length; i++) {
+ var styleName = STYLE_LIST_COMMON[i];
+
+ if (this[styleName] != null) {
+ ctx[styleName] = this[styleName];
+ }
+ }
+ if (stroke != null) {
+ var lineWidth = this.lineWidth;
+ ctx.lineWidth = lineWidth / (
+ (this.strokeNoScale && el && el.getLineScale) ? el.getLineScale() : 1
+ );
+ }
+ if (fill != null) {
+ // Use canvas gradient if has
+ ctx.fillStyle = fill.canvasGradient ? fill.canvasGradient : fill;
+ }
+ if (stroke != null) {
+ // Use canvas gradient if has
+ ctx.strokeStyle = stroke.canvasGradient ? stroke.canvasGradient : stroke;
+ }
+ this.opacity != null && (ctx.globalAlpha = this.opacity);
+ },
+
+ /**
+ * Extend from other style
+ * @param {zrender/graphic/Style} otherStyle
+ * @param {boolean} overwrite
+ */
+ extendFrom: function (otherStyle, overwrite) {
+ if (otherStyle) {
+ var target = this;
+ for (var name in otherStyle) {
+ if (otherStyle.hasOwnProperty(name)
+ && (overwrite || ! target.hasOwnProperty(name))
+ ) {
+ target[name] = otherStyle[name];
+ }
+ }
+ }
+ },
+
+ /**
+ * Batch setting style with a given object
+ * @param {Object|string} obj
+ * @param {*} [obj]
+ */
+ set: function (obj, value) {
+ if (typeof obj === 'string') {
+ this[obj] = value;
+ }
+ else {
+ this.extendFrom(obj, true);
+ }
+ },
+
+ /**
+ * Clone
+ * @return {zrender/graphic/Style} [description]
+ */
+ clone: function () {
+ var newStyle = new this.constructor();
+ newStyle.extendFrom(this, true);
+ return newStyle;
+ }
+ };
+
+ var styleProto = Style.prototype;
+ var name;
+ var i;
+ for (i = 0; i < STYLE_LIST_COMMON.length; i++) {
+ name = STYLE_LIST_COMMON[i];
+ if (!(name in styleProto)) {
+ styleProto[name] = null;
+ }
+ }
+
+ module.exports = Style;
+
+
+/***/ },
+/* 47 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Mixin for drawing text in a element bounding rect
+ * @module zrender/mixin/RectText
+ */
+
+
+
+ var textContain = __webpack_require__(14);
+ var BoundingRect = __webpack_require__(15);
+
+ var tmpRect = new BoundingRect();
+
+ var RectText = function () {};
+
+ function parsePercent(value, maxValue) {
+ if (typeof value === 'string') {
+ if (value.lastIndexOf('%') >= 0) {
+ return parseFloat(value) / 100 * maxValue;
+ }
+ return parseFloat(value);
+ }
+ return value;
+ }
+
+ function setTransform(ctx, m) {
+ ctx.transform(m[0], m[1], m[2], m[3], m[4], m[5]);
+ }
+
+ RectText.prototype = {
+
+ constructor: RectText,
+
+ /**
+ * Draw text in a rect with specified position.
+ * @param {CanvasRenderingContext} ctx
+ * @param {Object} rect Displayable rect
+ * @return {Object} textRect Alternative precalculated text bounding rect
+ */
+ drawRectText: function (ctx, rect, textRect) {
+ var style = this.style;
+ var text = style.text;
+ // Convert to string
+ text != null && (text += '');
+ if (!text) {
+ return;
+ }
+ var x;
+ var y;
+ var textPosition = style.textPosition;
+ var distance = style.textDistance;
+ var align = style.textAlign;
+ var font = style.textFont || style.font;
+ var baseline = style.textBaseline;
+ var verticalAlign = style.textVerticalAlign;
+
+ textRect = textRect || textContain.getBoundingRect(text, font, align, baseline);
+
+ // Transform rect to view space
+ var transform = this.transform;
+ var invTransform = this.invTransform;
+ if (transform) {
+ tmpRect.copy(rect);
+ tmpRect.applyTransform(transform);
+ rect = tmpRect;
+ // Transform back
+ setTransform(ctx, invTransform);
+ }
+
+ // Text position represented by coord
+ if (textPosition instanceof Array) {
+ // Percent
+ x = rect.x + parsePercent(textPosition[0], rect.width);
+ y = rect.y + parsePercent(textPosition[1], rect.height);
+ align = align || 'left';
+ baseline = baseline || 'top';
+ }
+ else {
+ var res = textContain.adjustTextPositionOnRect(
+ textPosition, rect, textRect, distance
+ );
+ x = res.x;
+ y = res.y;
+ // Default align and baseline when has textPosition
+ align = align || res.textAlign;
+ baseline = baseline || res.textBaseline;
+ }
+
+ ctx.textAlign = align;
+ if (verticalAlign) {
+ switch (verticalAlign) {
+ case 'middle':
+ y -= textRect.height / 2;
+ break;
+ case 'bottom':
+ y -= textRect.height;
+ break;
+ // 'top'
+ }
+ // Ignore baseline
+ ctx.textBaseline = 'top';
+ }
+ else {
+ ctx.textBaseline = baseline;
+ }
+
+ var textFill = style.textFill;
+ var textStroke = style.textStroke;
+ textFill && (ctx.fillStyle = textFill);
+ textStroke && (ctx.strokeStyle = textStroke);
+ ctx.font = font;
+
+ // Text shadow
+ ctx.shadowColor = style.textShadowColor;
+ ctx.shadowBlur = style.textShadowBlur;
+ ctx.shadowOffsetX = style.textShadowOffsetX;
+ ctx.shadowOffsetY = style.textShadowOffsetY;
+
+ var textLines = text.split('\n');
+ for (var i = 0; i < textLines.length; i++) {
+ textFill && ctx.fillText(textLines[i], x, y);
+ textStroke && ctx.strokeText(textLines[i], x, y);
+ y += textRect.lineHeight;
+ }
+
+ // Transform again
+ transform && setTransform(ctx, transform);
+ }
+ };
+
+ module.exports = RectText;
+
+
+/***/ },
+/* 48 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ /**
+ * Path 代ç†ï¼Œå¯ä»¥åœ¨`buildPath`中用于替代`ctx`, 会ä¿å­˜æ¯ä¸ªpathæ“作的命令到pathCommands属性中
+ * å¯ä»¥ç”¨äºŽ isInsidePath 判断以åŠèŽ·å–boundingRect
+ *
+ * @module zrender/core/PathProxy
+ * @author Yi Shen (http://www.github.com/pissang)
+ */
+
+ // TODO getTotalLength, getPointAtLength
+
+
+ var curve = __webpack_require__(49);
+ var vec2 = __webpack_require__(16);
+ var bbox = __webpack_require__(50);
+ var BoundingRect = __webpack_require__(15);
+
+ var CMD = {
+ M: 1,
+ L: 2,
+ C: 3,
+ Q: 4,
+ A: 5,
+ Z: 6,
+ // Rect
+ R: 7
+ };
+
+ var min = [];
+ var max = [];
+ var min2 = [];
+ var max2 = [];
+ var mathMin = Math.min;
+ var mathMax = Math.max;
+ var mathCos = Math.cos;
+ var mathSin = Math.sin;
+ var mathSqrt = Math.sqrt;
+
+ var hasTypedArray = typeof Float32Array != 'undefined';
+
+ /**
+ * @alias module:zrender/core/PathProxy
+ * @constructor
+ */
+ var PathProxy = function () {
+
+ /**
+ * Path data. Stored as flat array
+ * @type {Array.<Object>}
+ */
+ this.data = [];
+
+ this._len = 0;
+
+ this._ctx = null;
+
+ this._xi = 0;
+ this._yi = 0;
+
+ this._x0 = 0;
+ this._y0 = 0;
+ };
+
+ /**
+ * 快速计算Path包围盒(并ä¸æ˜¯æœ€å°åŒ…围盒)
+ * @return {Object}
+ */
+ PathProxy.prototype = {
+
+ constructor: PathProxy,
+
+ _lineDash: null,
+
+ _dashOffset: 0,
+
+ _dashIdx: 0,
+
+ _dashSum: 0,
+
+ getContext: function () {
+ return this._ctx;
+ },
+
+ /**
+ * @param {CanvasRenderingContext2D} ctx
+ * @return {module:zrender/core/PathProxy}
+ */
+ beginPath: function (ctx) {
+ this._ctx = ctx;
+
+ ctx && ctx.beginPath();
+
+ // Reset
+ this._len = 0;
+
+ if (this._lineDash) {
+ this._lineDash = null;
+
+ this._dashOffset = 0;
+ }
+
+ return this;
+ },
+
+ /**
+ * @param {number} x
+ * @param {number} y
+ * @return {module:zrender/core/PathProxy}
+ */
+ moveTo: function (x, y) {
+ this.addData(CMD.M, x, y);
+ this._ctx && this._ctx.moveTo(x, y);
+
+ // x0, y0, xi, yi 是记录在 _dashedXXXXTo 方法中使用
+ // xi, yi 记录当å‰ç‚¹, x0, y0 在 closePath 的时候回到起始点。
+ // 有å¯èƒ½åœ¨ beginPath 之åŽç›´æŽ¥è°ƒç”¨ lineTo,这时候 x0, y0 需è¦
+ // 在 lineTo 方法中记录,这里先ä¸è€ƒè™‘è¿™ç§æƒ…况,dashed line 也åªåœ¨ IE10- 中ä¸æ”¯æŒ
+ this._x0 = x;
+ this._y0 = y;
+
+ this._xi = x;
+ this._yi = y;
+
+ return this;
+ },
+
+ /**
+ * @param {number} x
+ * @param {number} y
+ * @return {module:zrender/core/PathProxy}
+ */
+ lineTo: function (x, y) {
+ this.addData(CMD.L, x, y);
+ if (this._ctx) {
+ this._needsDash() ? this._dashedLineTo(x, y)
+ : this._ctx.lineTo(x, y);
+ }
+ this._xi = x;
+ this._yi = y;
+ return this;
+ },
+
+ /**
+ * @param {number} x1
+ * @param {number} y1
+ * @param {number} x2
+ * @param {number} y2
+ * @param {number} x3
+ * @param {number} y3
+ * @return {module:zrender/core/PathProxy}
+ */
+ bezierCurveTo: function (x1, y1, x2, y2, x3, y3) {
+ this.addData(CMD.C, x1, y1, x2, y2, x3, y3);
+ if (this._ctx) {
+ this._needsDash() ? this._dashedBezierTo(x1, y1, x2, y2, x3, y3)
+ : this._ctx.bezierCurveTo(x1, y1, x2, y2, x3, y3);
+ }
+ this._xi = x3;
+ this._yi = y3;
+ return this;
+ },
+
+ /**
+ * @param {number} x1
+ * @param {number} y1
+ * @param {number} x2
+ * @param {number} y2
+ * @return {module:zrender/core/PathProxy}
+ */
+ quadraticCurveTo: function (x1, y1, x2, y2) {
+ this.addData(CMD.Q, x1, y1, x2, y2);
+ if (this._ctx) {
+ this._needsDash() ? this._dashedQuadraticTo(x1, y1, x2, y2)
+ : this._ctx.quadraticCurveTo(x1, y1, x2, y2);
+ }
+ this._xi = x2;
+ this._yi = y2;
+ return this;
+ },
+
+ /**
+ * @param {number} cx
+ * @param {number} cy
+ * @param {number} r
+ * @param {number} startAngle
+ * @param {number} endAngle
+ * @param {boolean} anticlockwise
+ * @return {module:zrender/core/PathProxy}
+ */
+ arc: function (cx, cy, r, startAngle, endAngle, anticlockwise) {
+ this.addData(
+ CMD.A, cx, cy, r, r, startAngle, endAngle - startAngle, 0, anticlockwise ? 0 : 1
+ );
+ this._ctx && this._ctx.arc(cx, cy, r, startAngle, endAngle, anticlockwise);
+
+ this._xi = mathCos(endAngle) * r + cx;
+ this._xi = mathSin(endAngle) * r + cx;
+ return this;
+ },
+
+ // TODO
+ arcTo: function (x1, y1, x2, y2, radius) {
+ if (this._ctx) {
+ this._ctx.arcTo(x1, y1, x2, y2, radius);
+ }
+ return this;
+ },
+
+ // TODO
+ rect: function (x, y, w, h) {
+ this._ctx && this._ctx.rect(x, y, w, h);
+ this.addData(CMD.R, x, y, w, h);
+ return this;
+ },
+
+ /**
+ * @return {module:zrender/core/PathProxy}
+ */
+ closePath: function () {
+ this.addData(CMD.Z);
+
+ var ctx = this._ctx;
+ var x0 = this._x0;
+ var y0 = this._y0;
+ if (ctx) {
+ this._needsDash() && this._dashedLineTo(x0, y0);
+ ctx.closePath();
+ }
+
+ this._xi = x0;
+ this._yi = y0;
+ return this;
+ },
+
+ /**
+ * Context 从外部传入,因为有å¯èƒ½æ˜¯ rebuildPath 完之åŽå† fill。
+ * stroke åŒæ ·
+ * @param {CanvasRenderingContext2D} ctx
+ * @return {module:zrender/core/PathProxy}
+ */
+ fill: function (ctx) {
+ ctx && ctx.fill();
+ this.toStatic();
+ },
+
+ /**
+ * @param {CanvasRenderingContext2D} ctx
+ * @return {module:zrender/core/PathProxy}
+ */
+ stroke: function (ctx) {
+ ctx && ctx.stroke();
+ this.toStatic();
+ },
+
+ /**
+ * 必须在其它绘制命令å‰è°ƒç”¨
+ * Must be invoked before all other path drawing methods
+ * @return {module:zrender/core/PathProxy}
+ */
+ setLineDash: function (lineDash) {
+ if (lineDash instanceof Array) {
+ this._lineDash = lineDash;
+
+ this._dashIdx = 0;
+
+ var lineDashSum = 0;
+ for (var i = 0; i < lineDash.length; i++) {
+ lineDashSum += lineDash[i];
+ }
+ this._dashSum = lineDashSum;
+ }
+ return this;
+ },
+
+ /**
+ * 必须在其它绘制命令å‰è°ƒç”¨
+ * Must be invoked before all other path drawing methods
+ * @return {module:zrender/core/PathProxy}
+ */
+ setLineDashOffset: function (offset) {
+ this._dashOffset = offset;
+ return this;
+ },
+
+ /**
+ *
+ * @return {boolean}
+ */
+ len: function () {
+ return this._len;
+ },
+
+ /**
+ * 直接设置 Path æ•°æ®
+ */
+ setData: function (data) {
+
+ var len = data.length;
+
+ if (! (this.data && this.data.length == len) && hasTypedArray) {
+ this.data = new Float32Array(len);
+ }
+
+ for (var i = 0; i < len; i++) {
+ this.data[i] = data[i];
+ }
+
+ this._len = len;
+ },
+
+ /**
+ * 添加å­è·¯å¾„
+ * @param {module:zrender/core/PathProxy|Array.<module:zrender/core/PathProxy>} path
+ */
+ appendPath: function (path) {
+ if (!(path instanceof Array)) {
+ path = [path];
+ }
+ var len = path.length;
+ var appendSize = 0;
+ var offset = this._len;
+ for (var i = 0; i < len; i++) {
+ appendSize += path[i].len();
+ }
+ if (hasTypedArray && (this.data instanceof Float32Array)) {
+ this.data = new Float32Array(offset + appendSize);
+ }
+ for (var i = 0; i < len; i++) {
+ var appendPathData = path[i].data;
+ for (var k = 0; k < appendPathData.length; k++) {
+ this.data[offset++] = appendPathData[k];
+ }
+ }
+ this._len = offset;
+ },
+
+ /**
+ * å¡«å…… Path æ•°æ®ã€‚
+ * å°½é‡å¤ç”¨è€Œä¸ç”³æ˜Žæ–°çš„数组。大部分图形é‡ç»˜çš„指令数æ®é•¿åº¦éƒ½æ˜¯ä¸å˜çš„。
+ */
+ addData: function (cmd) {
+ var data = this.data;
+ if (this._len + arguments.length > data.length) {
+ // 因为之å‰çš„数组已ç»è½¬æ¢æˆé™æ€çš„ Float32Array
+ // 所以ä¸å¤Ÿç”¨æ—¶éœ€è¦æ‰©å±•ä¸€ä¸ªæ–°çš„动æ€æ•°ç»„
+ this._expandData();
+ data = this.data;
+ }
+ for (var i = 0; i < arguments.length; i++) {
+ data[this._len++] = arguments[i];
+ }
+
+ this._prevCmd = cmd;
+ },
+
+ _expandData: function () {
+ // Only if data is Float32Array
+ if (!(this.data instanceof Array)) {
+ var newData = [];
+ for (var i = 0; i < this._len; i++) {
+ newData[i] = this.data[i];
+ }
+ this.data = newData;
+ }
+ },
+
+ /**
+ * If needs js implemented dashed line
+ * @return {boolean}
+ * @private
+ */
+ _needsDash: function () {
+ return this._lineDash;
+ },
+
+ _dashedLineTo: function (x1, y1) {
+ var dashSum = this._dashSum;
+ var offset = this._dashOffset;
+ var lineDash = this._lineDash;
+ var ctx = this._ctx;
+
+ var x0 = this._xi;
+ var y0 = this._yi;
+ var dx = x1 - x0;
+ var dy = y1 - y0;
+ var dist = mathSqrt(dx * dx + dy * dy);
+ var x = x0;
+ var y = y0;
+ var dash;
+ var nDash = lineDash.length;
+ var idx;
+ dx /= dist;
+ dy /= dist;
+
+ if (offset < 0) {
+ // Convert to positive offset
+ offset = dashSum + offset;
+ }
+ offset %= dashSum;
+ x -= offset * dx;
+ y -= offset * dy;
+
+ while ((dx >= 0 && x <= x1) || (dx < 0 && x > x1)) {
+ idx = this._dashIdx;
+ dash = lineDash[idx];
+ x += dx * dash;
+ y += dy * dash;
+ this._dashIdx = (idx + 1) % nDash;
+ // Skip positive offset
+ if ((dx > 0 && x < x0) || (dx < 0 && x > x0)) {
+ continue;
+ }
+ ctx[idx % 2 ? 'moveTo' : 'lineTo'](
+ dx >= 0 ? mathMin(x, x1) : mathMax(x, x1),
+ dy >= 0 ? mathMin(y, y1) : mathMax(y, y1)
+ );
+ }
+ // Offset for next lineTo
+ dx = x - x1;
+ dy = y - y1;
+ this._dashOffset = -mathSqrt(dx * dx + dy * dy);
+ },
+
+ // Not accurate dashed line to
+ _dashedBezierTo: function (x1, y1, x2, y2, x3, y3) {
+ var dashSum = this._dashSum;
+ var offset = this._dashOffset;
+ var lineDash = this._lineDash;
+ var ctx = this._ctx;
+
+ var x0 = this._xi;
+ var y0 = this._yi;
+ var t;
+ var dx;
+ var dy;
+ var cubicAt = curve.cubicAt;
+ var bezierLen = 0;
+ var idx = this._dashIdx;
+ var nDash = lineDash.length;
+
+ var x;
+ var y;
+
+ var tmpLen = 0;
+
+ if (offset < 0) {
+ // Convert to positive offset
+ offset = dashSum + offset;
+ }
+ offset %= dashSum;
+ // Bezier approx length
+ for (t = 0; t < 1; t += 0.1) {
+ dx = cubicAt(x0, x1, x2, x3, t + 0.1)
+ - cubicAt(x0, x1, x2, x3, t);
+ dy = cubicAt(y0, y1, y2, y3, t + 0.1)
+ - cubicAt(y0, y1, y2, y3, t);
+ bezierLen += mathSqrt(dx * dx + dy * dy);
+ }
+
+ // Find idx after add offset
+ for (; idx < nDash; idx++) {
+ tmpLen += lineDash[idx];
+ if (tmpLen > offset) {
+ break;
+ }
+ }
+ t = (tmpLen - offset) / bezierLen;
+
+ while (t <= 1) {
+
+ x = cubicAt(x0, x1, x2, x3, t);
+ y = cubicAt(y0, y1, y2, y3, t);
+
+ // Use line to approximate dashed bezier
+ // Bad result if dash is long
+ idx % 2 ? ctx.moveTo(x, y)
+ : ctx.lineTo(x, y);
+
+ t += lineDash[idx] / bezierLen;
+
+ idx = (idx + 1) % nDash;
+ }
+
+ // Finish the last segment and calculate the new offset
+ (idx % 2 !== 0) && ctx.lineTo(x3, y3);
+ dx = x3 - x;
+ dy = y3 - y;
+ this._dashOffset = -mathSqrt(dx * dx + dy * dy);
+ },
+
+ _dashedQuadraticTo: function (x1, y1, x2, y2) {
+ // Convert quadratic to cubic using degree elevation
+ var x3 = x2;
+ var y3 = y2;
+ x2 = (x2 + 2 * x1) / 3;
+ y2 = (y2 + 2 * y1) / 3;
+ x1 = (this._xi + 2 * x1) / 3;
+ y1 = (this._yi + 2 * y1) / 3;
+
+ this._dashedBezierTo(x1, y1, x2, y2, x3, y3);
+ },
+
+ /**
+ * 转æˆé™æ€çš„ Float32Array å‡å°‘堆内存å ç”¨
+ * Convert dynamic array to static Float32Array
+ */
+ toStatic: function () {
+ var data = this.data;
+ if (data instanceof Array) {
+ data.length = this._len;
+ if (hasTypedArray) {
+ this.data = new Float32Array(data);
+ }
+ }
+ },
+
+ /**
+ * @return {module:zrender/core/BoundingRect}
+ */
+ getBoundingRect: function () {
+ min[0] = min[1] = min2[0] = min2[1] = Number.MAX_VALUE;
+ max[0] = max[1] = max2[0] = max2[1] = -Number.MAX_VALUE;
+
+ var data = this.data;
+ var xi = 0;
+ var yi = 0;
+ var x0 = 0;
+ var y0 = 0;
+
+ for (var i = 0; i < data.length;) {
+ var cmd = data[i++];
+
+ if (i == 1) {
+ // 如果第一个命令是 L, C, Q
+ // 则 previous point åŒç»˜åˆ¶å‘½ä»¤çš„第一个 point
+ //
+ // 第一个命令为 Arc 的情况下会在åŽé¢ç‰¹æ®Šå¤„ç†
+ xi = data[i];
+ yi = data[i + 1];
+
+ x0 = xi;
+ y0 = yi;
+ }
+
+ switch (cmd) {
+ case CMD.M:
+ // moveTo 命令é‡æ–°åˆ›å»ºä¸€ä¸ªæ–°çš„ subpath, 并且更新新的起点
+ // 在 closePath 的时候使用
+ x0 = data[i++];
+ y0 = data[i++];
+ xi = x0;
+ yi = y0;
+ min2[0] = x0;
+ min2[1] = y0;
+ max2[0] = x0;
+ max2[1] = y0;
+ break;
+ case CMD.L:
+ bbox.fromLine(xi, yi, data[i], data[i + 1], min2, max2);
+ xi = data[i++];
+ yi = data[i++];
+ break;
+ case CMD.C:
+ bbox.fromCubic(
+ xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1],
+ min2, max2
+ );
+ xi = data[i++];
+ yi = data[i++];
+ break;
+ case CMD.Q:
+ bbox.fromQuadratic(
+ xi, yi, data[i++], data[i++], data[i], data[i + 1],
+ min2, max2
+ );
+ xi = data[i++];
+ yi = data[i++];
+ break;
+ case CMD.A:
+ // TODO Arc 判断的开销比较大
+ var cx = data[i++];
+ var cy = data[i++];
+ var rx = data[i++];
+ var ry = data[i++];
+ var startAngle = data[i++];
+ var endAngle = data[i++] + startAngle;
+ // TODO Arc 旋转
+ var psi = data[i++];
+ var anticlockwise = 1 - data[i++];
+
+ if (i == 1) {
+ // 直接使用 arc 命令
+ // 第一个命令起点还未定义
+ x0 = mathCos(startAngle) * rx + cx;
+ y0 = mathSin(startAngle) * ry + cy;
+ }
+
+ bbox.fromArc(
+ cx, cy, rx, ry, startAngle, endAngle,
+ anticlockwise, min2, max2
+ );
+
+ xi = mathCos(endAngle) * rx + cx;
+ yi = mathSin(endAngle) * ry + cy;
+ break;
+ case CMD.R:
+ x0 = xi = data[i++];
+ y0 = yi = data[i++];
+ var width = data[i++];
+ var height = data[i++];
+ // Use fromLine
+ bbox.fromLine(x0, y0, x0 + width, y0 + height, min2, max2);
+ break;
+ case CMD.Z:
+ xi = x0;
+ yi = y0;
+ break;
+ }
+
+ // Union
+ vec2.min(min, min, min2);
+ vec2.max(max, max, max2);
+ }
+
+ // No data
+ if (i === 0) {
+ min[0] = min[1] = max[0] = max[1] = 0;
+ }
+
+ return new BoundingRect(
+ min[0], min[1], max[0] - min[0], max[1] - min[1]
+ );
+ },
+
+ /**
+ * Rebuild path from current data
+ * Rebuild path will not consider javascript implemented line dash.
+ * @param {CanvasRenderingContext} ctx
+ */
+ rebuildPath: function (ctx) {
+ var d = this.data;
+ for (var i = 0; i < this._len;) {
+ var cmd = d[i++];
+ switch (cmd) {
+ case CMD.M:
+ ctx.moveTo(d[i++], d[i++]);
+ break;
+ case CMD.L:
+ ctx.lineTo(d[i++], d[i++]);
+ break;
+ case CMD.C:
+ ctx.bezierCurveTo(
+ d[i++], d[i++], d[i++], d[i++], d[i++], d[i++]
+ );
+ break;
+ case CMD.Q:
+ ctx.quadraticCurveTo(d[i++], d[i++], d[i++], d[i++]);
+ break;
+ case CMD.A:
+ var cx = d[i++];
+ var cy = d[i++];
+ var rx = d[i++];
+ var ry = d[i++];
+ var theta = d[i++];
+ var dTheta = d[i++];
+ var psi = d[i++];
+ var fs = d[i++];
+ var r = (rx > ry) ? rx : ry;
+ var scaleX = (rx > ry) ? 1 : rx / ry;
+ var scaleY = (rx > ry) ? ry / rx : 1;
+ var isEllipse = Math.abs(rx - ry) > 1e-3;
+ if (isEllipse) {
+ ctx.translate(cx, cy);
+ ctx.rotate(psi);
+ ctx.scale(scaleX, scaleY);
+ ctx.arc(0, 0, r, theta, theta + dTheta, 1 - fs);
+ ctx.scale(1 / scaleX, 1 / scaleY);
+ ctx.rotate(-psi);
+ ctx.translate(-cx, -cy);
+ }
+ else {
+ ctx.arc(cx, cy, r, theta, theta + dTheta, 1 - fs);
+ }
+ break;
+ case CMD.R:
+ ctx.rect(d[i++], d[i++], d[i++], d[i++]);
+ break;
+ case CMD.Z:
+ ctx.closePath();
+ }
+ }
+ }
+ };
+
+ PathProxy.CMD = CMD;
+
+ module.exports = PathProxy;
+
+
+/***/ },
+/* 49 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ /**
+ * 曲线辅助模å—
+ * @module zrender/core/curve
+ * @author pissang(https://www.github.com/pissang)
+ */
+
+
+ var vec2 = __webpack_require__(16);
+ var v2Create = vec2.create;
+ var v2DistSquare = vec2.distSquare;
+ var mathPow = Math.pow;
+ var mathSqrt = Math.sqrt;
+
+ var EPSILON = 1e-8;
+ var EPSILON_NUMERIC = 1e-4;
+
+ var THREE_SQRT = mathSqrt(3);
+ var ONE_THIRD = 1 / 3;
+
+ // 临时å˜é‡
+ var _v0 = v2Create();
+ var _v1 = v2Create();
+ var _v2 = v2Create();
+ // var _v3 = vec2.create();
+
+ function isAroundZero(val) {
+ return val > -EPSILON && val < EPSILON;
+ }
+ function isNotAroundZero(val) {
+ return val > EPSILON || val < -EPSILON;
+ }
+ /**
+ * 计算三次è´å¡žå°”值
+ * @memberOf module:zrender/core/curve
+ * @param {number} p0
+ * @param {number} p1
+ * @param {number} p2
+ * @param {number} p3
+ * @param {number} t
+ * @return {number}
+ */
+ function cubicAt(p0, p1, p2, p3, t) {
+ var onet = 1 - t;
+ return onet * onet * (onet * p0 + 3 * t * p1)
+ + t * t * (t * p3 + 3 * onet * p2);
+ }
+
+ /**
+ * 计算三次è´å¡žå°”导数值
+ * @memberOf module:zrender/core/curve
+ * @param {number} p0
+ * @param {number} p1
+ * @param {number} p2
+ * @param {number} p3
+ * @param {number} t
+ * @return {number}
+ */
+ function cubicDerivativeAt(p0, p1, p2, p3, t) {
+ var onet = 1 - t;
+ return 3 * (
+ ((p1 - p0) * onet + 2 * (p2 - p1) * t) * onet
+ + (p3 - p2) * t * t
+ );
+ }
+
+ /**
+ * 计算三次è´å¡žå°”方程根,使用盛金公å¼
+ * @memberOf module:zrender/core/curve
+ * @param {number} p0
+ * @param {number} p1
+ * @param {number} p2
+ * @param {number} p3
+ * @param {number} val
+ * @param {Array.<number>} roots
+ * @return {number} 有效根数目
+ */
+ function cubicRootAt(p0, p1, p2, p3, val, roots) {
+ // Evaluate roots of cubic functions
+ var a = p3 + 3 * (p1 - p2) - p0;
+ var b = 3 * (p2 - p1 * 2 + p0);
+ var c = 3 * (p1 - p0);
+ var d = p0 - val;
+
+ var A = b * b - 3 * a * c;
+ var B = b * c - 9 * a * d;
+ var C = c * c - 3 * b * d;
+
+ var n = 0;
+
+ if (isAroundZero(A) && isAroundZero(B)) {
+ if (isAroundZero(b)) {
+ roots[0] = 0;
+ }
+ else {
+ var t1 = -c / b; //t1, t2, t3, b is not zero
+ if (t1 >= 0 && t1 <= 1) {
+ roots[n++] = t1;
+ }
+ }
+ }
+ else {
+ var disc = B * B - 4 * A * C;
+
+ if (isAroundZero(disc)) {
+ var K = B / A;
+ var t1 = -b / a + K; // t1, a is not zero
+ var t2 = -K / 2; // t2, t3
+ if (t1 >= 0 && t1 <= 1) {
+ roots[n++] = t1;
+ }
+ if (t2 >= 0 && t2 <= 1) {
+ roots[n++] = t2;
+ }
+ }
+ else if (disc > 0) {
+ var discSqrt = mathSqrt(disc);
+ var Y1 = A * b + 1.5 * a * (-B + discSqrt);
+ var Y2 = A * b + 1.5 * a * (-B - discSqrt);
+ if (Y1 < 0) {
+ Y1 = -mathPow(-Y1, ONE_THIRD);
+ }
+ else {
+ Y1 = mathPow(Y1, ONE_THIRD);
+ }
+ if (Y2 < 0) {
+ Y2 = -mathPow(-Y2, ONE_THIRD);
+ }
+ else {
+ Y2 = mathPow(Y2, ONE_THIRD);
+ }
+ var t1 = (-b - (Y1 + Y2)) / (3 * a);
+ if (t1 >= 0 && t1 <= 1) {
+ roots[n++] = t1;
+ }
+ }
+ else {
+ var T = (2 * A * b - 3 * a * B) / (2 * mathSqrt(A * A * A));
+ var theta = Math.acos(T) / 3;
+ var ASqrt = mathSqrt(A);
+ var tmp = Math.cos(theta);
+
+ var t1 = (-b - 2 * ASqrt * tmp) / (3 * a);
+ var t2 = (-b + ASqrt * (tmp + THREE_SQRT * Math.sin(theta))) / (3 * a);
+ var t3 = (-b + ASqrt * (tmp - THREE_SQRT * Math.sin(theta))) / (3 * a);
+ if (t1 >= 0 && t1 <= 1) {
+ roots[n++] = t1;
+ }
+ if (t2 >= 0 && t2 <= 1) {
+ roots[n++] = t2;
+ }
+ if (t3 >= 0 && t3 <= 1) {
+ roots[n++] = t3;
+ }
+ }
+ }
+ return n;
+ }
+
+ /**
+ * 计算三次è´å¡žå°”方程æžé™å€¼çš„ä½ç½®
+ * @memberOf module:zrender/core/curve
+ * @param {number} p0
+ * @param {number} p1
+ * @param {number} p2
+ * @param {number} p3
+ * @param {Array.<number>} extrema
+ * @return {number} 有效数目
+ */
+ function cubicExtrema(p0, p1, p2, p3, extrema) {
+ var b = 6 * p2 - 12 * p1 + 6 * p0;
+ var a = 9 * p1 + 3 * p3 - 3 * p0 - 9 * p2;
+ var c = 3 * p1 - 3 * p0;
+
+ var n = 0;
+ if (isAroundZero(a)) {
+ if (isNotAroundZero(b)) {
+ var t1 = -c / b;
+ if (t1 >= 0 && t1 <=1) {
+ extrema[n++] = t1;
+ }
+ }
+ }
+ else {
+ var disc = b * b - 4 * a * c;
+ if (isAroundZero(disc)) {
+ extrema[0] = -b / (2 * a);
+ }
+ else if (disc > 0) {
+ var discSqrt = mathSqrt(disc);
+ var t1 = (-b + discSqrt) / (2 * a);
+ var t2 = (-b - discSqrt) / (2 * a);
+ if (t1 >= 0 && t1 <= 1) {
+ extrema[n++] = t1;
+ }
+ if (t2 >= 0 && t2 <= 1) {
+ extrema[n++] = t2;
+ }
+ }
+ }
+ return n;
+ }
+
+ /**
+ * 细分三次è´å¡žå°”曲线
+ * @memberOf module:zrender/core/curve
+ * @param {number} p0
+ * @param {number} p1
+ * @param {number} p2
+ * @param {number} p3
+ * @param {number} t
+ * @param {Array.<number>} out
+ */
+ function cubicSubdivide(p0, p1, p2, p3, t, out) {
+ var p01 = (p1 - p0) * t + p0;
+ var p12 = (p2 - p1) * t + p1;
+ var p23 = (p3 - p2) * t + p2;
+
+ var p012 = (p12 - p01) * t + p01;
+ var p123 = (p23 - p12) * t + p12;
+
+ var p0123 = (p123 - p012) * t + p012;
+ // Seg0
+ out[0] = p0;
+ out[1] = p01;
+ out[2] = p012;
+ out[3] = p0123;
+ // Seg1
+ out[4] = p0123;
+ out[5] = p123;
+ out[6] = p23;
+ out[7] = p3;
+ }
+
+ /**
+ * 投射点到三次è´å¡žå°”曲线上,返回投射è·ç¦»ã€‚
+ * 投射点有å¯èƒ½ä¼šæœ‰ä¸€ä¸ªæˆ–者多个,这里åªè¿”回其中è·ç¦»æœ€çŸ­çš„一个。
+ * @param {number} x0
+ * @param {number} y0
+ * @param {number} x1
+ * @param {number} y1
+ * @param {number} x2
+ * @param {number} y2
+ * @param {number} x3
+ * @param {number} y3
+ * @param {number} x
+ * @param {number} y
+ * @param {Array.<number>} [out] 投射点
+ * @return {number}
+ */
+ function cubicProjectPoint(
+ x0, y0, x1, y1, x2, y2, x3, y3,
+ x, y, out
+ ) {
+ // http://pomax.github.io/bezierinfo/#projections
+ var t;
+ var interval = 0.005;
+ var d = Infinity;
+ var prev;
+ var next;
+ var d1;
+ var d2;
+
+ _v0[0] = x;
+ _v0[1] = y;
+
+ // 先粗略估计一下å¯èƒ½çš„最å°è·ç¦»çš„ t 值
+ // PENDING
+ for (var _t = 0; _t < 1; _t += 0.05) {
+ _v1[0] = cubicAt(x0, x1, x2, x3, _t);
+ _v1[1] = cubicAt(y0, y1, y2, y3, _t);
+ d1 = v2DistSquare(_v0, _v1);
+ if (d1 < d) {
+ t = _t;
+ d = d1;
+ }
+ }
+ d = Infinity;
+
+ // At most 32 iteration
+ for (var i = 0; i < 32; i++) {
+ if (interval < EPSILON_NUMERIC) {
+ break;
+ }
+ prev = t - interval;
+ next = t + interval;
+ // t - interval
+ _v1[0] = cubicAt(x0, x1, x2, x3, prev);
+ _v1[1] = cubicAt(y0, y1, y2, y3, prev);
+
+ d1 = v2DistSquare(_v1, _v0);
+
+ if (prev >= 0 && d1 < d) {
+ t = prev;
+ d = d1;
+ }
+ else {
+ // t + interval
+ _v2[0] = cubicAt(x0, x1, x2, x3, next);
+ _v2[1] = cubicAt(y0, y1, y2, y3, next);
+ d2 = v2DistSquare(_v2, _v0);
+
+ if (next <= 1 && d2 < d) {
+ t = next;
+ d = d2;
+ }
+ else {
+ interval *= 0.5;
+ }
+ }
+ }
+ // t
+ if (out) {
+ out[0] = cubicAt(x0, x1, x2, x3, t);
+ out[1] = cubicAt(y0, y1, y2, y3, t);
+ }
+ // console.log(interval, i);
+ return mathSqrt(d);
+ }
+
+ /**
+ * 计算二次方è´å¡žå°”值
+ * @param {number} p0
+ * @param {number} p1
+ * @param {number} p2
+ * @param {number} t
+ * @return {number}
+ */
+ function quadraticAt(p0, p1, p2, t) {
+ var onet = 1 - t;
+ return onet * (onet * p0 + 2 * t * p1) + t * t * p2;
+ }
+
+ /**
+ * 计算二次方è´å¡žå°”导数值
+ * @param {number} p0
+ * @param {number} p1
+ * @param {number} p2
+ * @param {number} t
+ * @return {number}
+ */
+ function quadraticDerivativeAt(p0, p1, p2, t) {
+ return 2 * ((1 - t) * (p1 - p0) + t * (p2 - p1));
+ }
+
+ /**
+ * 计算二次方è´å¡žå°”方程根
+ * @param {number} p0
+ * @param {number} p1
+ * @param {number} p2
+ * @param {number} t
+ * @param {Array.<number>} roots
+ * @return {number} 有效根数目
+ */
+ function quadraticRootAt(p0, p1, p2, val, roots) {
+ var a = p0 - 2 * p1 + p2;
+ var b = 2 * (p1 - p0);
+ var c = p0 - val;
+
+ var n = 0;
+ if (isAroundZero(a)) {
+ if (isNotAroundZero(b)) {
+ var t1 = -c / b;
+ if (t1 >= 0 && t1 <= 1) {
+ roots[n++] = t1;
+ }
+ }
+ }
+ else {
+ var disc = b * b - 4 * a * c;
+ if (isAroundZero(disc)) {
+ var t1 = -b / (2 * a);
+ if (t1 >= 0 && t1 <= 1) {
+ roots[n++] = t1;
+ }
+ }
+ else if (disc > 0) {
+ var discSqrt = mathSqrt(disc);
+ var t1 = (-b + discSqrt) / (2 * a);
+ var t2 = (-b - discSqrt) / (2 * a);
+ if (t1 >= 0 && t1 <= 1) {
+ roots[n++] = t1;
+ }
+ if (t2 >= 0 && t2 <= 1) {
+ roots[n++] = t2;
+ }
+ }
+ }
+ return n;
+ }
+
+ /**
+ * 计算二次è´å¡žå°”方程æžé™å€¼
+ * @memberOf module:zrender/core/curve
+ * @param {number} p0
+ * @param {number} p1
+ * @param {number} p2
+ * @return {number}
+ */
+ function quadraticExtremum(p0, p1, p2) {
+ var divider = p0 + p2 - 2 * p1;
+ if (divider === 0) {
+ // p1 is center of p0 and p2
+ return 0.5;
+ }
+ else {
+ return (p0 - p1) / divider;
+ }
+ }
+
+ /**
+ * 细分二次è´å¡žå°”曲线
+ * @memberOf module:zrender/core/curve
+ * @param {number} p0
+ * @param {number} p1
+ * @param {number} p2
+ * @param {number} t
+ * @param {Array.<number>} out
+ */
+ function quadraticSubdivide(p0, p1, p2, t, out) {
+ var p01 = (p1 - p0) * t + p0;
+ var p12 = (p2 - p1) * t + p1;
+ var p012 = (p12 - p01) * t + p01;
+
+ // Seg0
+ out[0] = p0;
+ out[1] = p01;
+ out[2] = p012;
+
+ // Seg1
+ out[3] = p012;
+ out[4] = p12;
+ out[5] = p2;
+ }
+
+ /**
+ * 投射点到二次è´å¡žå°”曲线上,返回投射è·ç¦»ã€‚
+ * 投射点有å¯èƒ½ä¼šæœ‰ä¸€ä¸ªæˆ–者多个,这里åªè¿”回其中è·ç¦»æœ€çŸ­çš„一个。
+ * @param {number} x0
+ * @param {number} y0
+ * @param {number} x1
+ * @param {number} y1
+ * @param {number} x2
+ * @param {number} y2
+ * @param {number} x
+ * @param {number} y
+ * @param {Array.<number>} out 投射点
+ * @return {number}
+ */
+ function quadraticProjectPoint(
+ x0, y0, x1, y1, x2, y2,
+ x, y, out
+ ) {
+ // http://pomax.github.io/bezierinfo/#projections
+ var t;
+ var interval = 0.005;
+ var d = Infinity;
+
+ _v0[0] = x;
+ _v0[1] = y;
+
+ // 先粗略估计一下å¯èƒ½çš„最å°è·ç¦»çš„ t 值
+ // PENDING
+ for (var _t = 0; _t < 1; _t += 0.05) {
+ _v1[0] = quadraticAt(x0, x1, x2, _t);
+ _v1[1] = quadraticAt(y0, y1, y2, _t);
+ var d1 = v2DistSquare(_v0, _v1);
+ if (d1 < d) {
+ t = _t;
+ d = d1;
+ }
+ }
+ d = Infinity;
+
+ // At most 32 iteration
+ for (var i = 0; i < 32; i++) {
+ if (interval < EPSILON_NUMERIC) {
+ break;
+ }
+ var prev = t - interval;
+ var next = t + interval;
+ // t - interval
+ _v1[0] = quadraticAt(x0, x1, x2, prev);
+ _v1[1] = quadraticAt(y0, y1, y2, prev);
+
+ var d1 = v2DistSquare(_v1, _v0);
+
+ if (prev >= 0 && d1 < d) {
+ t = prev;
+ d = d1;
+ }
+ else {
+ // t + interval
+ _v2[0] = quadraticAt(x0, x1, x2, next);
+ _v2[1] = quadraticAt(y0, y1, y2, next);
+ var d2 = v2DistSquare(_v2, _v0);
+ if (next <= 1 && d2 < d) {
+ t = next;
+ d = d2;
+ }
+ else {
+ interval *= 0.5;
+ }
+ }
+ }
+ // t
+ if (out) {
+ out[0] = quadraticAt(x0, x1, x2, t);
+ out[1] = quadraticAt(y0, y1, y2, t);
+ }
+ // console.log(interval, i);
+ return mathSqrt(d);
+ }
+
+ module.exports = {
+
+ cubicAt: cubicAt,
+
+ cubicDerivativeAt: cubicDerivativeAt,
+
+ cubicRootAt: cubicRootAt,
+
+ cubicExtrema: cubicExtrema,
+
+ cubicSubdivide: cubicSubdivide,
+
+ cubicProjectPoint: cubicProjectPoint,
+
+ quadraticAt: quadraticAt,
+
+ quadraticDerivativeAt: quadraticDerivativeAt,
+
+ quadraticRootAt: quadraticRootAt,
+
+ quadraticExtremum: quadraticExtremum,
+
+ quadraticSubdivide: quadraticSubdivide,
+
+ quadraticProjectPoint: quadraticProjectPoint
+ };
+
+
+/***/ },
+/* 50 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @author Yi Shen(https://github.com/pissang)
+ */
+
+
+ var vec2 = __webpack_require__(16);
+ var curve = __webpack_require__(49);
+
+ var bbox = {};
+ var mathMin = Math.min;
+ var mathMax = Math.max;
+ var mathSin = Math.sin;
+ var mathCos = Math.cos;
+
+ var start = vec2.create();
+ var end = vec2.create();
+ var extremity = vec2.create();
+
+ var PI2 = Math.PI * 2;
+ /**
+ * 从顶点数组中计算出最å°åŒ…围盒,写入`min`å’Œ`max`中
+ * @module zrender/core/bbox
+ * @param {Array<Object>} points 顶点数组
+ * @param {number} min
+ * @param {number} max
+ */
+ bbox.fromPoints = function(points, min, max) {
+ if (points.length === 0) {
+ return;
+ }
+ var p = points[0];
+ var left = p[0];
+ var right = p[0];
+ var top = p[1];
+ var bottom = p[1];
+ var i;
+
+ for (i = 1; i < points.length; i++) {
+ p = points[i];
+ left = mathMin(left, p[0]);
+ right = mathMax(right, p[0]);
+ top = mathMin(top, p[1]);
+ bottom = mathMax(bottom, p[1]);
+ }
+
+ min[0] = left;
+ min[1] = top;
+ max[0] = right;
+ max[1] = bottom;
+ };
+
+ /**
+ * @memberOf module:zrender/core/bbox
+ * @param {number} x0
+ * @param {number} y0
+ * @param {number} x1
+ * @param {number} y1
+ * @param {Array.<number>} min
+ * @param {Array.<number>} max
+ */
+ bbox.fromLine = function (x0, y0, x1, y1, min, max) {
+ min[0] = mathMin(x0, x1);
+ min[1] = mathMin(y0, y1);
+ max[0] = mathMax(x0, x1);
+ max[1] = mathMax(y0, y1);
+ };
+
+ var xDim = [];
+ var yDim = [];
+ /**
+ * 从三阶è´å¡žå°”曲线(p0, p1, p2, p3)中计算出最å°åŒ…围盒,写入`min`å’Œ`max`中
+ * @memberOf module:zrender/core/bbox
+ * @param {number} x0
+ * @param {number} y0
+ * @param {number} x1
+ * @param {number} y1
+ * @param {number} x2
+ * @param {number} y2
+ * @param {number} x3
+ * @param {number} y3
+ * @param {Array.<number>} min
+ * @param {Array.<number>} max
+ */
+ bbox.fromCubic = function(
+ x0, y0, x1, y1, x2, y2, x3, y3, min, max
+ ) {
+ var cubicExtrema = curve.cubicExtrema;
+ var cubicAt = curve.cubicAt;
+ var i;
+ var n = cubicExtrema(x0, x1, x2, x3, xDim);
+ min[0] = Infinity;
+ min[1] = Infinity;
+ max[0] = -Infinity;
+ max[1] = -Infinity;
+
+ for (i = 0; i < n; i++) {
+ var x = cubicAt(x0, x1, x2, x3, xDim[i]);
+ min[0] = mathMin(x, min[0]);
+ max[0] = mathMax(x, max[0]);
+ }
+ n = cubicExtrema(y0, y1, y2, y3, yDim);
+ for (i = 0; i < n; i++) {
+ var y = cubicAt(y0, y1, y2, y3, yDim[i]);
+ min[1] = mathMin(y, min[1]);
+ max[1] = mathMax(y, max[1]);
+ }
+
+ min[0] = mathMin(x0, min[0]);
+ max[0] = mathMax(x0, max[0]);
+ min[0] = mathMin(x3, min[0]);
+ max[0] = mathMax(x3, max[0]);
+
+ min[1] = mathMin(y0, min[1]);
+ max[1] = mathMax(y0, max[1]);
+ min[1] = mathMin(y3, min[1]);
+ max[1] = mathMax(y3, max[1]);
+ };
+
+ /**
+ * 从二阶è´å¡žå°”曲线(p0, p1, p2)中计算出最å°åŒ…围盒,写入`min`å’Œ`max`中
+ * @memberOf module:zrender/core/bbox
+ * @param {number} x0
+ * @param {number} y0
+ * @param {number} x1
+ * @param {number} y1
+ * @param {number} x2
+ * @param {number} y2
+ * @param {Array.<number>} min
+ * @param {Array.<number>} max
+ */
+ bbox.fromQuadratic = function(x0, y0, x1, y1, x2, y2, min, max) {
+ var quadraticExtremum = curve.quadraticExtremum;
+ var quadraticAt = curve.quadraticAt;
+ // Find extremities, where derivative in x dim or y dim is zero
+ var tx =
+ mathMax(
+ mathMin(quadraticExtremum(x0, x1, x2), 1), 0
+ );
+ var ty =
+ mathMax(
+ mathMin(quadraticExtremum(y0, y1, y2), 1), 0
+ );
+
+ var x = quadraticAt(x0, x1, x2, tx);
+ var y = quadraticAt(y0, y1, y2, ty);
+
+ min[0] = mathMin(x0, x2, x);
+ min[1] = mathMin(y0, y2, y);
+ max[0] = mathMax(x0, x2, x);
+ max[1] = mathMax(y0, y2, y);
+ };
+
+ /**
+ * 从圆弧中计算出最å°åŒ…围盒,写入`min`å’Œ`max`中
+ * @method
+ * @memberOf module:zrender/core/bbox
+ * @param {number} x
+ * @param {number} y
+ * @param {number} rx
+ * @param {number} ry
+ * @param {number} startAngle
+ * @param {number} endAngle
+ * @param {number} anticlockwise
+ * @param {Array.<number>} min
+ * @param {Array.<number>} max
+ */
+ bbox.fromArc = function (
+ x, y, rx, ry, startAngle, endAngle, anticlockwise, min, max
+ ) {
+ var vec2Min = vec2.min;
+ var vec2Max = vec2.max;
+
+ var diff = Math.abs(startAngle - endAngle);
+
+
+ if (diff % PI2 < 1e-4 && diff > 1e-4) {
+ // Is a circle
+ min[0] = x - rx;
+ min[1] = y - ry;
+ max[0] = x + rx;
+ max[1] = y + ry;
+ return;
+ }
+
+ start[0] = mathCos(startAngle) * rx + x;
+ start[1] = mathSin(startAngle) * ry + y;
+
+ end[0] = mathCos(endAngle) * rx + x;
+ end[1] = mathSin(endAngle) * ry + y;
+
+ vec2Min(min, start, end);
+ vec2Max(max, start, end);
+
+ // Thresh to [0, Math.PI * 2]
+ startAngle = startAngle % (PI2);
+ if (startAngle < 0) {
+ startAngle = startAngle + PI2;
+ }
+ endAngle = endAngle % (PI2);
+ if (endAngle < 0) {
+ endAngle = endAngle + PI2;
+ }
+
+ if (startAngle > endAngle && !anticlockwise) {
+ endAngle += PI2;
+ }
+ else if (startAngle < endAngle && anticlockwise) {
+ startAngle += PI2;
+ }
+ if (anticlockwise) {
+ var tmp = endAngle;
+ endAngle = startAngle;
+ startAngle = tmp;
+ }
+
+ // var number = 0;
+ // var step = (anticlockwise ? -Math.PI : Math.PI) / 2;
+ for (var angle = 0; angle < endAngle; angle += Math.PI / 2) {
+ if (angle > startAngle) {
+ extremity[0] = mathCos(angle) * rx + x;
+ extremity[1] = mathSin(angle) * ry + y;
+
+ vec2Min(min, extremity, min);
+ vec2Max(max, extremity, max);
+ }
+ }
+ };
+
+ module.exports = bbox;
+
+
+
+/***/ },
+/* 51 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var CMD = __webpack_require__(48).CMD;
+ var line = __webpack_require__(52);
+ var cubic = __webpack_require__(53);
+ var quadratic = __webpack_require__(54);
+ var arc = __webpack_require__(55);
+ var normalizeRadian = __webpack_require__(56).normalizeRadian;
+ var curve = __webpack_require__(49);
+
+ var windingLine = __webpack_require__(57);
+
+ var containStroke = line.containStroke;
+
+ var PI2 = Math.PI * 2;
+
+ var EPSILON = 1e-4;
+
+ function isAroundEqual(a, b) {
+ return Math.abs(a - b) < EPSILON;
+ }
+
+ // 临时数组
+ var roots = [-1, -1, -1];
+ var extrema = [-1, -1];
+
+ function swapExtrema() {
+ var tmp = extrema[0];
+ extrema[0] = extrema[1];
+ extrema[1] = tmp;
+ }
+
+ function windingCubic(x0, y0, x1, y1, x2, y2, x3, y3, x, y) {
+ // Quick reject
+ if (
+ (y > y0 && y > y1 && y > y2 && y > y3)
+ || (y < y0 && y < y1 && y < y2 && y < y3)
+ ) {
+ return 0;
+ }
+ var nRoots = curve.cubicRootAt(y0, y1, y2, y3, y, roots);
+ if (nRoots === 0) {
+ return 0;
+ }
+ else {
+ var w = 0;
+ var nExtrema = -1;
+ var y0_, y1_;
+ for (var i = 0; i < nRoots; i++) {
+ var t = roots[i];
+ var x_ = curve.cubicAt(x0, x1, x2, x3, t);
+ if (x_ < x) { // Quick reject
+ continue;
+ }
+ if (nExtrema < 0) {
+ nExtrema = curve.cubicExtrema(y0, y1, y2, y3, extrema);
+ if (extrema[1] < extrema[0] && nExtrema > 1) {
+ swapExtrema();
+ }
+ y0_ = curve.cubicAt(y0, y1, y2, y3, extrema[0]);
+ if (nExtrema > 1) {
+ y1_ = curve.cubicAt(y0, y1, y2, y3, extrema[1]);
+ }
+ }
+ if (nExtrema == 2) {
+ // 分æˆä¸‰æ®µå•è°ƒå‡½æ•°
+ if (t < extrema[0]) {
+ w += y0_ < y0 ? 1 : -1;
+ }
+ else if (t < extrema[1]) {
+ w += y1_ < y0_ ? 1 : -1;
+ }
+ else {
+ w += y3 < y1_ ? 1 : -1;
+ }
+ }
+ else {
+ // 分æˆä¸¤æ®µå•è°ƒå‡½æ•°
+ if (t < extrema[0]) {
+ w += y0_ < y0 ? 1 : -1;
+ }
+ else {
+ w += y3 < y0_ ? 1 : -1;
+ }
+ }
+ }
+ return w;
+ }
+ }
+
+ function windingQuadratic(x0, y0, x1, y1, x2, y2, x, y) {
+ // Quick reject
+ if (
+ (y > y0 && y > y1 && y > y2)
+ || (y < y0 && y < y1 && y < y2)
+ ) {
+ return 0;
+ }
+ var nRoots = curve.quadraticRootAt(y0, y1, y2, y, roots);
+ if (nRoots === 0) {
+ return 0;
+ }
+ else {
+ var t = curve.quadraticExtremum(y0, y1, y2);
+ if (t >= 0 && t <= 1) {
+ var w = 0;
+ var y_ = curve.quadraticAt(y0, y1, y2, t);
+ for (var i = 0; i < nRoots; i++) {
+ var x_ = curve.quadraticAt(x0, x1, x2, roots[i]);
+ if (x_ < x) { // Quick reject
+ continue;
+ }
+ if (roots[i] < t) {
+ w += y_ < y0 ? 1 : -1;
+ }
+ else {
+ w += y2 < y_ ? 1 : -1;
+ }
+ }
+ return w;
+ }
+ else {
+ var x_ = curve.quadraticAt(x0, x1, x2, roots[0]);
+ if (x_ < x) { // Quick reject
+ return 0;
+ }
+ return y2 < y0 ? 1 : -1;
+ }
+ }
+ }
+
+ // TODO
+ // Arc 旋转
+ function windingArc(
+ cx, cy, r, startAngle, endAngle, anticlockwise, x, y
+ ) {
+ y -= cy;
+ if (y > r || y < -r) {
+ return 0;
+ }
+ var tmp = Math.sqrt(r * r - y * y);
+ roots[0] = -tmp;
+ roots[1] = tmp;
+
+ var diff = Math.abs(startAngle - endAngle);
+ if (diff < 1e-4) {
+ return 0;
+ }
+ if (diff % PI2 < 1e-4) {
+ // Is a circle
+ startAngle = 0;
+ endAngle = PI2;
+ var dir = anticlockwise ? 1 : -1;
+ if (x >= roots[0] + cx && x <= roots[1] + cx) {
+ return dir;
+ } else {
+ return 0;
+ }
+ }
+
+ if (anticlockwise) {
+ var tmp = startAngle;
+ startAngle = normalizeRadian(endAngle);
+ endAngle = normalizeRadian(tmp);
+ }
+ else {
+ startAngle = normalizeRadian(startAngle);
+ endAngle = normalizeRadian(endAngle);
+ }
+ if (startAngle > endAngle) {
+ endAngle += PI2;
+ }
+
+ var w = 0;
+ for (var i = 0; i < 2; i++) {
+ var x_ = roots[i];
+ if (x_ + cx > x) {
+ var angle = Math.atan2(y, x_);
+ var dir = anticlockwise ? 1 : -1;
+ if (angle < 0) {
+ angle = PI2 + angle;
+ }
+ if (
+ (angle >= startAngle && angle <= endAngle)
+ || (angle + PI2 >= startAngle && angle + PI2 <= endAngle)
+ ) {
+ if (angle > Math.PI / 2 && angle < Math.PI * 1.5) {
+ dir = -dir;
+ }
+ w += dir;
+ }
+ }
+ }
+ return w;
+ }
+
+ function containPath(data, lineWidth, isStroke, x, y) {
+ var w = 0;
+ var xi = 0;
+ var yi = 0;
+ var x0 = 0;
+ var y0 = 0;
+
+ for (var i = 0; i < data.length;) {
+ var cmd = data[i++];
+ // Begin a new subpath
+ if (cmd === CMD.M && i > 1) {
+ // Close previous subpath
+ if (!isStroke) {
+ w += windingLine(xi, yi, x0, y0, x, y);
+ }
+ // 如果被任何一个 subpath 包å«
+ if (w !== 0) {
+ return true;
+ }
+ }
+
+ if (i == 1) {
+ // 如果第一个命令是 L, C, Q
+ // 则 previous point åŒç»˜åˆ¶å‘½ä»¤çš„第一个 point
+ //
+ // 第一个命令为 Arc 的情况下会在åŽé¢ç‰¹æ®Šå¤„ç†
+ xi = data[i];
+ yi = data[i + 1];
+
+ x0 = xi;
+ y0 = yi;
+ }
+
+ switch (cmd) {
+ case CMD.M:
+ // moveTo 命令é‡æ–°åˆ›å»ºä¸€ä¸ªæ–°çš„ subpath, 并且更新新的起点
+ // 在 closePath 的时候使用
+ x0 = data[i++];
+ y0 = data[i++];
+ xi = x0;
+ yi = y0;
+ break;
+ case CMD.L:
+ if (isStroke) {
+ if (containStroke(xi, yi, data[i], data[i + 1], lineWidth, x, y)) {
+ return true;
+ }
+ }
+ else {
+ // NOTE 在第一个命令为 L, C, Q 的时候会计算出 NaN
+ w += windingLine(xi, yi, data[i], data[i + 1], x, y) || 0;
+ }
+ xi = data[i++];
+ yi = data[i++];
+ break;
+ case CMD.C:
+ if (isStroke) {
+ if (cubic.containStroke(xi, yi,
+ data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1],
+ lineWidth, x, y
+ )) {
+ return true;
+ }
+ }
+ else {
+ w += windingCubic(
+ xi, yi,
+ data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1],
+ x, y
+ ) || 0;
+ }
+ xi = data[i++];
+ yi = data[i++];
+ break;
+ case CMD.Q:
+ if (isStroke) {
+ if (quadratic.containStroke(xi, yi,
+ data[i++], data[i++], data[i], data[i + 1],
+ lineWidth, x, y
+ )) {
+ return true;
+ }
+ }
+ else {
+ w += windingQuadratic(
+ xi, yi,
+ data[i++], data[i++], data[i], data[i + 1],
+ x, y
+ ) || 0;
+ }
+ xi = data[i++];
+ yi = data[i++];
+ break;
+ case CMD.A:
+ // TODO Arc 判断的开销比较大
+ var cx = data[i++];
+ var cy = data[i++];
+ var rx = data[i++];
+ var ry = data[i++];
+ var theta = data[i++];
+ var dTheta = data[i++];
+ // TODO Arc 旋转
+ var psi = data[i++];
+ var anticlockwise = 1 - data[i++];
+ var x1 = Math.cos(theta) * rx + cx;
+ var y1 = Math.sin(theta) * ry + cy;
+ // ä¸æ˜¯ç›´æŽ¥ä½¿ç”¨ arc 命令
+ if (i > 1) {
+ w += windingLine(xi, yi, x1, y1, x, y);
+ }
+ else {
+ // 第一个命令起点还未定义
+ x0 = x1;
+ y0 = y1;
+ }
+ // zr 使用scaleæ¥æ¨¡æ‹Ÿæ¤­åœ†, 这里也对xåšä¸€å®šçš„缩放
+ var _x = (x - cx) * ry / rx + cx;
+ if (isStroke) {
+ if (arc.containStroke(
+ cx, cy, ry, theta, theta + dTheta, anticlockwise,
+ lineWidth, _x, y
+ )) {
+ return true;
+ }
+ }
+ else {
+ w += windingArc(
+ cx, cy, ry, theta, theta + dTheta, anticlockwise,
+ _x, y
+ );
+ }
+ xi = Math.cos(theta + dTheta) * rx + cx;
+ yi = Math.sin(theta + dTheta) * ry + cy;
+ break;
+ case CMD.R:
+ x0 = xi = data[i++];
+ y0 = yi = data[i++];
+ var width = data[i++];
+ var height = data[i++];
+ var x1 = x0 + width;
+ var y1 = y0 + height;
+ if (isStroke) {
+ if (containStroke(x0, y0, x1, y0, lineWidth, x, y)
+ || containStroke(x1, y0, x1, y1, lineWidth, x, y)
+ || containStroke(x1, y1, x0, y1, lineWidth, x, y)
+ || containStroke(x0, y1, x1, y1, lineWidth, x, y)
+ ) {
+ return true;
+ }
+ }
+ else {
+ // FIXME Clockwise ?
+ w += windingLine(x1, y0, x1, y1, x, y);
+ w += windingLine(x0, y1, x0, y0, x, y);
+ }
+ break;
+ case CMD.Z:
+ if (isStroke) {
+ if (containStroke(
+ xi, yi, x0, y0, lineWidth, x, y
+ )) {
+ return true;
+ }
+ }
+ else {
+ // Close a subpath
+ w += windingLine(xi, yi, x0, y0, x, y);
+ // 如果被任何一个 subpath 包å«
+ if (w !== 0) {
+ return true;
+ }
+ }
+ xi = x0;
+ yi = y0;
+ break;
+ }
+ }
+ if (!isStroke && !isAroundEqual(yi, y0)) {
+ w += windingLine(xi, yi, x0, y0, x, y) || 0;
+ }
+ return w !== 0;
+ }
+
+ module.exports = {
+ contain: function (pathData, x, y) {
+ return containPath(pathData, 0, false, x, y);
+ },
+
+ containStroke: function (pathData, lineWidth, x, y) {
+ return containPath(pathData, lineWidth, true, x, y);
+ }
+ };
+
+
+/***/ },
+/* 52 */
+/***/ function(module, exports) {
+
+
+ module.exports = {
+ /**
+ * 线段包å«åˆ¤æ–­
+ * @param {number} x0
+ * @param {number} y0
+ * @param {number} x1
+ * @param {number} y1
+ * @param {number} lineWidth
+ * @param {number} x
+ * @param {number} y
+ * @return {boolean}
+ */
+ containStroke: function (x0, y0, x1, y1, lineWidth, x, y) {
+ if (lineWidth === 0) {
+ return false;
+ }
+ var _l = lineWidth;
+ var _a = 0;
+ var _b = x0;
+ // Quick reject
+ if (
+ (y > y0 + _l && y > y1 + _l)
+ || (y < y0 - _l && y < y1 - _l)
+ || (x > x0 + _l && x > x1 + _l)
+ || (x < x0 - _l && x < x1 - _l)
+ ) {
+ return false;
+ }
+
+ if (x0 !== x1) {
+ _a = (y0 - y1) / (x0 - x1);
+ _b = (x0 * y1 - x1 * y0) / (x0 - x1) ;
+ }
+ else {
+ return Math.abs(x - x0) <= _l / 2;
+ }
+ var tmp = _a * x - y + _b;
+ var _s = tmp * tmp / (_a * _a + 1);
+ return _s <= _l / 2 * _l / 2;
+ }
+ };
+
+
+/***/ },
+/* 53 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var curve = __webpack_require__(49);
+
+ module.exports = {
+ /**
+ * 三次è´å¡žå°”曲线æ边包å«åˆ¤æ–­
+ * @param {number} x0
+ * @param {number} y0
+ * @param {number} x1
+ * @param {number} y1
+ * @param {number} x2
+ * @param {number} y2
+ * @param {number} x3
+ * @param {number} y3
+ * @param {number} lineWidth
+ * @param {number} x
+ * @param {number} y
+ * @return {boolean}
+ */
+ containStroke: function(x0, y0, x1, y1, x2, y2, x3, y3, lineWidth, x, y) {
+ if (lineWidth === 0) {
+ return false;
+ }
+ var _l = lineWidth;
+ // Quick reject
+ if (
+ (y > y0 + _l && y > y1 + _l && y > y2 + _l && y > y3 + _l)
+ || (y < y0 - _l && y < y1 - _l && y < y2 - _l && y < y3 - _l)
+ || (x > x0 + _l && x > x1 + _l && x > x2 + _l && x > x3 + _l)
+ || (x < x0 - _l && x < x1 - _l && x < x2 - _l && x < x3 - _l)
+ ) {
+ return false;
+ }
+ var d = curve.cubicProjectPoint(
+ x0, y0, x1, y1, x2, y2, x3, y3,
+ x, y, null
+ );
+ return d <= _l / 2;
+ }
+ };
+
+
+/***/ },
+/* 54 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var curve = __webpack_require__(49);
+
+ module.exports = {
+ /**
+ * 二次è´å¡žå°”曲线æ边包å«åˆ¤æ–­
+ * @param {number} x0
+ * @param {number} y0
+ * @param {number} x1
+ * @param {number} y1
+ * @param {number} x2
+ * @param {number} y2
+ * @param {number} lineWidth
+ * @param {number} x
+ * @param {number} y
+ * @return {boolean}
+ */
+ containStroke: function (x0, y0, x1, y1, x2, y2, lineWidth, x, y) {
+ if (lineWidth === 0) {
+ return false;
+ }
+ var _l = lineWidth;
+ // Quick reject
+ if (
+ (y > y0 + _l && y > y1 + _l && y > y2 + _l)
+ || (y < y0 - _l && y < y1 - _l && y < y2 - _l)
+ || (x > x0 + _l && x > x1 + _l && x > x2 + _l)
+ || (x < x0 - _l && x < x1 - _l && x < x2 - _l)
+ ) {
+ return false;
+ }
+ var d = curve.quadraticProjectPoint(
+ x0, y0, x1, y1, x2, y2,
+ x, y, null
+ );
+ return d <= _l / 2;
+ }
+ };
+
+
+/***/ },
+/* 55 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var normalizeRadian = __webpack_require__(56).normalizeRadian;
+ var PI2 = Math.PI * 2;
+
+ module.exports = {
+ /**
+ * 圆弧æ边包å«åˆ¤æ–­
+ * @param {number} cx
+ * @param {number} cy
+ * @param {number} r
+ * @param {number} startAngle
+ * @param {number} endAngle
+ * @param {boolean} anticlockwise
+ * @param {number} lineWidth
+ * @param {number} x
+ * @param {number} y
+ * @return {Boolean}
+ */
+ containStroke: function (
+ cx, cy, r, startAngle, endAngle, anticlockwise,
+ lineWidth, x, y
+ ) {
+
+ if (lineWidth === 0) {
+ return false;
+ }
+ var _l = lineWidth;
+
+ x -= cx;
+ y -= cy;
+ var d = Math.sqrt(x * x + y * y);
+
+ if ((d - _l > r) || (d + _l < r)) {
+ return false;
+ }
+ if (Math.abs(startAngle - endAngle) % PI2 < 1e-4) {
+ // Is a circle
+ return true;
+ }
+ if (anticlockwise) {
+ var tmp = startAngle;
+ startAngle = normalizeRadian(endAngle);
+ endAngle = normalizeRadian(tmp);
+ } else {
+ startAngle = normalizeRadian(startAngle);
+ endAngle = normalizeRadian(endAngle);
+ }
+ if (startAngle > endAngle) {
+ endAngle += PI2;
+ }
+
+ var angle = Math.atan2(y, x);
+ if (angle < 0) {
+ angle += PI2;
+ }
+ return (angle >= startAngle && angle <= endAngle)
+ || (angle + PI2 >= startAngle && angle + PI2 <= endAngle);
+ }
+ };
+
+
+/***/ },
+/* 56 */
+/***/ function(module, exports) {
+
+
+
+ var PI2 = Math.PI * 2;
+ module.exports = {
+ normalizeRadian: function(angle) {
+ angle %= PI2;
+ if (angle < 0) {
+ angle += PI2;
+ }
+ return angle;
+ }
+ };
+
+
+/***/ },
+/* 57 */
+/***/ function(module, exports) {
+
+
+ module.exports = function windingLine(x0, y0, x1, y1, x, y) {
+ if ((y > y0 && y > y1) || (y < y0 && y < y1)) {
+ return 0;
+ }
+ if (y1 === y0) {
+ return 0;
+ }
+ var dir = y1 < y0 ? 1 : -1;
+ var t = (y - y0) / (y1 - y0);
+ var x_ = t * (x1 - x0) + x0;
+
+ return x_ > x ? dir : 0;
+ };
+
+
+/***/ },
+/* 58 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var CMD = __webpack_require__(48).CMD;
+ var vec2 = __webpack_require__(16);
+ var v2ApplyTransform = vec2.applyTransform;
+
+ var points = [[], [], []];
+ var mathSqrt = Math.sqrt;
+ var mathAtan2 = Math.atan2;
+ function transformPath(path, m) {
+ var data = path.data;
+ var cmd;
+ var nPoint;
+ var i;
+ var j;
+ var k;
+ var p;
+
+ var M = CMD.M;
+ var C = CMD.C;
+ var L = CMD.L;
+ var R = CMD.R;
+ var A = CMD.A;
+ var Q = CMD.Q;
+
+ for (i = 0, j = 0; i < data.length;) {
+ cmd = data[i++];
+ j = i;
+ nPoint = 0;
+
+ switch (cmd) {
+ case M:
+ nPoint = 1;
+ break;
+ case L:
+ nPoint = 1;
+ break;
+ case C:
+ nPoint = 3;
+ break;
+ case Q:
+ nPoint = 2;
+ break;
+ case A:
+ var x = m[4];
+ var y = m[5];
+ var sx = mathSqrt(m[0] * m[0] + m[1] * m[1]);
+ var sy = mathSqrt(m[2] * m[2] + m[3] * m[3]);
+ var angle = mathAtan2(-m[1] / sy, m[0] / sx);
+ // cx
+ data[i++] += x;
+ // cy
+ data[i++] += y;
+ // Scale rx and ry
+ // FIXME Assume psi is 0 here
+ data[i++] *= sx;
+ data[i++] *= sy;
+
+ // Start angle
+ data[i++] += angle;
+ // end angle
+ data[i++] += angle;
+ // FIXME psi
+ i += 2;
+ j = i;
+ break;
+ case R:
+ // x0, y0
+ p[0] = data[i++];
+ p[1] = data[i++];
+ v2ApplyTransform(p, p, m);
+ data[j++] = p[0];
+ data[j++] = p[1];
+ // x1, y1
+ p[0] += data[i++];
+ p[1] += data[i++];
+ v2ApplyTransform(p, p, m);
+ data[j++] = p[0];
+ data[j++] = p[1];
+ }
+
+ for (k = 0; k < nPoint; k++) {
+ var p = points[k];
+ p[0] = data[i++];
+ p[1] = data[i++];
+
+ v2ApplyTransform(p, p, m);
+ // Write back
+ data[j++] = p[0];
+ data[j++] = p[1];
+ }
+ }
+ }
+
+ module.exports = transformPath;
+
+
+/***/ },
+/* 59 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Image element
+ * @module zrender/graphic/Image
+ */
+
+
+
+ var Displayable = __webpack_require__(45);
+ var BoundingRect = __webpack_require__(15);
+ var zrUtil = __webpack_require__(3);
+ var roundRectHelper = __webpack_require__(60);
+
+ var LRU = __webpack_require__(61);
+ var globalImageCache = new LRU(50);
+ /**
+ * @alias zrender/graphic/Image
+ * @extends module:zrender/graphic/Displayable
+ * @constructor
+ * @param {Object} opts
+ */
+ function ZImage(opts) {
+ Displayable.call(this, opts);
+ }
+
+ ZImage.prototype = {
+
+ constructor: ZImage,
+
+ type: 'image',
+
+ brush: function (ctx) {
+ var style = this.style;
+ var src = style.image;
+ var image;
+ // style.image is a url string
+ if (typeof src === 'string') {
+ image = this._image;
+ }
+ // style.image is an HTMLImageElement or HTMLCanvasElement or Canvas
+ else {
+ image = src;
+ }
+ // FIXME Case create many images with src
+ if (!image && src) {
+ // Try get from global image cache
+ var cachedImgObj = globalImageCache.get(src);
+ if (!cachedImgObj) {
+ // Create a new image
+ image = new Image();
+ image.onload = function () {
+ image.onload = null;
+ for (var i = 0; i < cachedImgObj.pending.length; i++) {
+ cachedImgObj.pending[i].dirty();
+ }
+ };
+ cachedImgObj = {
+ image: image,
+ pending: [this]
+ };
+ image.src = src;
+ globalImageCache.put(src, cachedImgObj);
+ this._image = image;
+ return;
+ }
+ else {
+ image = cachedImgObj.image;
+ this._image = image;
+ // Image is not complete finish, add to pending list
+ if (!image.width || !image.height) {
+ cachedImgObj.pending.push(this);
+ return;
+ }
+ }
+ }
+
+ if (image) {
+ // 图片已ç»åŠ è½½å®Œæˆ
+ // if (image.nodeName.toUpperCase() == 'IMG') {
+ // if (!image.complete) {
+ // return;
+ // }
+ // }
+ // Else is canvas
+
+ var width = style.width || image.width;
+ var height = style.height || image.height;
+ var x = style.x || 0;
+ var y = style.y || 0;
+ // 图片加载失败
+ if (!image.width || !image.height) {
+ return;
+ }
+
+ ctx.save();
+
+ style.bind(ctx);
+
+ // 设置transform
+ this.setTransform(ctx);
+
+ if (style.r) {
+ // Border radius clipping
+ // FIXME
+ ctx.beginPath();
+ roundRectHelper.buildPath(ctx, style);
+ ctx.clip();
+ }
+
+ if (style.sWidth && style.sHeight) {
+ var sx = style.sx || 0;
+ var sy = style.sy || 0;
+ ctx.drawImage(
+ image,
+ sx, sy, style.sWidth, style.sHeight,
+ x, y, width, height
+ );
+ }
+ else if (style.sx && style.sy) {
+ var sx = style.sx;
+ var sy = style.sy;
+ var sWidth = width - sx;
+ var sHeight = height - sy;
+ ctx.drawImage(
+ image,
+ sx, sy, sWidth, sHeight,
+ x, y, width, height
+ );
+ }
+ else {
+ ctx.drawImage(image, x, y, width, height);
+ }
+
+ // 如果没设置宽和高的è¯è‡ªåŠ¨æ ¹æ®å›¾ç‰‡å®½é«˜è®¾ç½®
+ if (style.width == null) {
+ style.width = width;
+ }
+ if (style.height == null) {
+ style.height = height;
+ }
+
+ // Draw rect text
+ if (style.text != null) {
+ this.drawRectText(ctx, this.getBoundingRect());
+ }
+
+ ctx.restore();
+ }
+ },
+
+ getBoundingRect: function () {
+ var style = this.style;
+ if (! this._rect) {
+ this._rect = new BoundingRect(
+ style.x || 0, style.y || 0, style.width || 0, style.height || 0
+ );
+ }
+ return this._rect;
+ }
+ };
+
+ zrUtil.inherits(ZImage, Displayable);
+
+ module.exports = ZImage;
+
+
+/***/ },
+/* 60 */
+/***/ function(module, exports) {
+
+
+
+ module.exports = {
+ buildPath: function (ctx, shape) {
+ var x = shape.x;
+ var y = shape.y;
+ var width = shape.width;
+ var height = shape.height;
+ var r = shape.r;
+ var r1;
+ var r2;
+ var r3;
+ var r4;
+
+ // Convert width and height to positive for better borderRadius
+ if (width < 0) {
+ x = x + width;
+ width = -width;
+ }
+ if (height < 0) {
+ y = y + height;
+ height = -height;
+ }
+
+ if (typeof r === 'number') {
+ r1 = r2 = r3 = r4 = r;
+ }
+ else if (r instanceof Array) {
+ if (r.length === 1) {
+ r1 = r2 = r3 = r4 = r[0];
+ }
+ else if (r.length === 2) {
+ r1 = r3 = r[0];
+ r2 = r4 = r[1];
+ }
+ else if (r.length === 3) {
+ r1 = r[0];
+ r2 = r4 = r[1];
+ r3 = r[2];
+ }
+ else {
+ r1 = r[0];
+ r2 = r[1];
+ r3 = r[2];
+ r4 = r[3];
+ }
+ }
+ else {
+ r1 = r2 = r3 = r4 = 0;
+ }
+
+ var total;
+ if (r1 + r2 > width) {
+ total = r1 + r2;
+ r1 *= width / total;
+ r2 *= width / total;
+ }
+ if (r3 + r4 > width) {
+ total = r3 + r4;
+ r3 *= width / total;
+ r4 *= width / total;
+ }
+ if (r2 + r3 > height) {
+ total = r2 + r3;
+ r2 *= height / total;
+ r3 *= height / total;
+ }
+ if (r1 + r4 > height) {
+ total = r1 + r4;
+ r1 *= height / total;
+ r4 *= height / total;
+ }
+ ctx.moveTo(x + r1, y);
+ ctx.lineTo(x + width - r2, y);
+ r2 !== 0 && ctx.quadraticCurveTo(
+ x + width, y, x + width, y + r2
+ );
+ ctx.lineTo(x + width, y + height - r3);
+ r3 !== 0 && ctx.quadraticCurveTo(
+ x + width, y + height, x + width - r3, y + height
+ );
+ ctx.lineTo(x + r4, y + height);
+ r4 !== 0 && ctx.quadraticCurveTo(
+ x, y + height, x, y + height - r4
+ );
+ ctx.lineTo(x, y + r1);
+ r1 !== 0 && ctx.quadraticCurveTo(x, y, x + r1, y);
+ }
+ };
+
+
+/***/ },
+/* 61 */
+/***/ function(module, exports) {
+
+ // Simple LRU cache use doubly linked list
+ // @module zrender/core/LRU
+
+
+ /**
+ * Simple double linked list. Compared with array, it has O(1) remove operation.
+ * @constructor
+ */
+ var LinkedList = function() {
+
+ /**
+ * @type {module:zrender/core/LRU~Entry}
+ */
+ this.head = null;
+
+ /**
+ * @type {module:zrender/core/LRU~Entry}
+ */
+ this.tail = null;
+
+ this._len = 0;
+ };
+
+ var linkedListProto = LinkedList.prototype;
+ /**
+ * Insert a new value at the tail
+ * @param {} val
+ * @return {module:zrender/core/LRU~Entry}
+ */
+ linkedListProto.insert = function(val) {
+ var entry = new Entry(val);
+ this.insertEntry(entry);
+ return entry;
+ };
+
+ /**
+ * Insert an entry at the tail
+ * @param {module:zrender/core/LRU~Entry} entry
+ */
+ linkedListProto.insertEntry = function(entry) {
+ if (!this.head) {
+ this.head = this.tail = entry;
+ }
+ else {
+ this.tail.next = entry;
+ entry.prev = this.tail;
+ this.tail = entry;
+ }
+ this._len++;
+ };
+
+ /**
+ * Remove entry.
+ * @param {module:zrender/core/LRU~Entry} entry
+ */
+ linkedListProto.remove = function(entry) {
+ var prev = entry.prev;
+ var next = entry.next;
+ if (prev) {
+ prev.next = next;
+ }
+ else {
+ // Is head
+ this.head = next;
+ }
+ if (next) {
+ next.prev = prev;
+ }
+ else {
+ // Is tail
+ this.tail = prev;
+ }
+ entry.next = entry.prev = null;
+ this._len--;
+ };
+
+ /**
+ * @return {number}
+ */
+ linkedListProto.len = function() {
+ return this._len;
+ };
+
+ /**
+ * @constructor
+ * @param {} val
+ */
+ var Entry = function(val) {
+ /**
+ * @type {}
+ */
+ this.value = val;
+
+ /**
+ * @type {module:zrender/core/LRU~Entry}
+ */
+ this.next;
+
+ /**
+ * @type {module:zrender/core/LRU~Entry}
+ */
+ this.prev;
+ };
+
+ /**
+ * LRU Cache
+ * @constructor
+ * @alias module:zrender/core/LRU
+ */
+ var LRU = function(maxSize) {
+
+ this._list = new LinkedList();
+
+ this._map = {};
+
+ this._maxSize = maxSize || 10;
+ };
+
+ var LRUProto = LRU.prototype;
+
+ /**
+ * @param {string} key
+ * @param {} value
+ */
+ LRUProto.put = function(key, value) {
+ var list = this._list;
+ var map = this._map;
+ if (map[key] == null) {
+ var len = list.len();
+ if (len >= this._maxSize && len > 0) {
+ // Remove the least recently used
+ var leastUsedEntry = list.head;
+ list.remove(leastUsedEntry);
+ delete map[leastUsedEntry.key];
+ }
+
+ var entry = list.insert(value);
+ entry.key = key;
+ map[key] = entry;
+ }
+ };
+
+ /**
+ * @param {string} key
+ * @return {}
+ */
+ LRUProto.get = function(key) {
+ var entry = this._map[key];
+ var list = this._list;
+ if (entry != null) {
+ // Put the latest used entry in the tail
+ if (entry !== list.tail) {
+ list.remove(entry);
+ list.insertEntry(entry);
+ }
+
+ return entry.value;
+ }
+ };
+
+ /**
+ * Clear the cache
+ */
+ LRUProto.clear = function() {
+ this._list.clear();
+ this._map = {};
+ };
+
+ module.exports = LRU;
+
+
+/***/ },
+/* 62 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Text element
+ * @module zrender/graphic/Text
+ *
+ * TODO Wrapping
+ */
+
+
+
+ var Displayable = __webpack_require__(45);
+ var zrUtil = __webpack_require__(3);
+ var textContain = __webpack_require__(14);
+
+ /**
+ * @alias zrender/graphic/Text
+ * @extends module:zrender/graphic/Displayable
+ * @constructor
+ * @param {Object} opts
+ */
+ var Text = function (opts) {
+ Displayable.call(this, opts);
+ };
+
+ Text.prototype = {
+
+ constructor: Text,
+
+ type: 'text',
+
+ brush: function (ctx) {
+ var style = this.style;
+ var x = style.x || 0;
+ var y = style.y || 0;
+ // Convert to string
+ var text = style.text;
+ var textFill = style.fill;
+ var textStroke = style.stroke;
+
+ // Convert to string
+ text != null && (text += '');
+
+ if (text) {
+ ctx.save();
+
+ this.style.bind(ctx);
+ this.setTransform(ctx);
+
+ textFill && (ctx.fillStyle = textFill);
+ textStroke && (ctx.strokeStyle = textStroke);
+
+ ctx.font = style.textFont || style.font;
+ ctx.textAlign = style.textAlign;
+
+ if (style.textVerticalAlign) {
+ var rect = textContain.getBoundingRect(
+ text, ctx.font, style.textAlign, 'top'
+ );
+ // Ignore textBaseline
+ ctx.textBaseline = 'top';
+ switch (style.textVerticalAlign) {
+ case 'middle':
+ y -= rect.height / 2;
+ break;
+ case 'bottom':
+ y -= rect.height;
+ break;
+ // 'top'
+ }
+ }
+ else {
+ ctx.textBaseline = style.textBaseline;
+ }
+ var lineHeight = textContain.measureText('国', ctx.font).width;
+
+ var textLines = text.split('\n');
+ for (var i = 0; i < textLines.length; i++) {
+ textFill && ctx.fillText(textLines[i], x, y);
+ textStroke && ctx.strokeText(textLines[i], x, y);
+ y += lineHeight;
+ }
+
+ ctx.restore();
+ }
+ },
+
+ getBoundingRect: function () {
+ if (!this._rect) {
+ var style = this.style;
+ var textVerticalAlign = style.textVerticalAlign;
+ var rect = textContain.getBoundingRect(
+ style.text + '', style.textFont || style.font, style.textAlign,
+ textVerticalAlign ? 'top' : style.textBaseline
+ );
+ switch (textVerticalAlign) {
+ case 'middle':
+ rect.y -= rect.height / 2;
+ break;
+ case 'bottom':
+ rect.y -= rect.height;
+ break;
+ }
+ rect.x += style.x || 0;
+ rect.y += style.y || 0;
+ this._rect = rect;
+ }
+ return this._rect;
+ }
+ };
+
+ zrUtil.inherits(Text, Displayable);
+
+ module.exports = Text;
+
+
+/***/ },
+/* 63 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ /**
+ * 圆形
+ * @module zrender/shape/Circle
+ */
+
+
+
+ module.exports = __webpack_require__(44).extend({
+
+ type: 'circle',
+
+ shape: {
+ cx: 0,
+ cy: 0,
+ r: 0
+ },
+
+ buildPath : function (ctx, shape) {
+ // Better stroking in ShapeBundle
+ ctx.moveTo(shape.cx + shape.r, shape.cy);
+ ctx.arc(shape.cx, shape.cy, shape.r, 0, Math.PI * 2, true);
+ return;
+ }
+ });
+
+
+
+/***/ },
+/* 64 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * 扇形
+ * @module zrender/graphic/shape/Sector
+ */
+
+ // FIXME clockwise seems wrong
+
+
+ module.exports = __webpack_require__(44).extend({
+
+ type: 'sector',
+
+ shape: {
+
+ cx: 0,
+
+ cy: 0,
+
+ r0: 0,
+
+ r: 0,
+
+ startAngle: 0,
+
+ endAngle: Math.PI * 2,
+
+ clockwise: true
+ },
+
+ buildPath: function (ctx, shape) {
+
+ var x = shape.cx;
+ var y = shape.cy;
+ var r0 = Math.max(shape.r0 || 0, 0);
+ var r = Math.max(shape.r, 0);
+ var startAngle = shape.startAngle;
+ var endAngle = shape.endAngle;
+ var clockwise = shape.clockwise;
+
+ var unitX = Math.cos(startAngle);
+ var unitY = Math.sin(startAngle);
+
+ ctx.moveTo(unitX * r0 + x, unitY * r0 + y);
+
+ ctx.lineTo(unitX * r + x, unitY * r + y);
+
+ ctx.arc(x, y, r, startAngle, endAngle, !clockwise);
+
+ ctx.lineTo(
+ Math.cos(endAngle) * r0 + x,
+ Math.sin(endAngle) * r0 + y
+ );
+
+ if (r0 !== 0) {
+ ctx.arc(x, y, r0, endAngle, startAngle, clockwise);
+ }
+
+ ctx.closePath();
+ }
+ });
+
+
+
+/***/ },
+/* 65 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * 圆环
+ * @module zrender/graphic/shape/Ring
+ */
+
+
+ module.exports = __webpack_require__(44).extend({
+
+ type: 'ring',
+
+ shape: {
+ cx: 0,
+ cy: 0,
+ r: 0,
+ r0: 0
+ },
+
+ buildPath: function (ctx, shape) {
+ var x = shape.cx;
+ var y = shape.cy;
+ var PI2 = Math.PI * 2;
+ ctx.moveTo(x + shape.r, y);
+ ctx.arc(x, y, shape.r, 0, PI2, false);
+ ctx.moveTo(x + shape.r0, y);
+ ctx.arc(x, y, shape.r0, 0, PI2, true);
+ }
+ });
+
+
+
+/***/ },
+/* 66 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * 多边形
+ * @module zrender/shape/Polygon
+ */
+
+
+ var polyHelper = __webpack_require__(67);
+
+ module.exports = __webpack_require__(44).extend({
+
+ type: 'polygon',
+
+ shape: {
+ points: null,
+
+ smooth: false,
+
+ smoothConstraint: null
+ },
+
+ buildPath: function (ctx, shape) {
+ polyHelper.buildPath(ctx, shape, true);
+ }
+ });
+
+
+/***/ },
+/* 67 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var smoothSpline = __webpack_require__(68);
+ var smoothBezier = __webpack_require__(69);
+
+ module.exports = {
+ buildPath: function (ctx, shape, closePath) {
+ var points = shape.points;
+ var smooth = shape.smooth;
+ if (points && points.length >= 2) {
+ if (smooth && smooth !== 'spline') {
+ var controlPoints = smoothBezier(
+ points, smooth, closePath, shape.smoothConstraint
+ );
+
+ ctx.moveTo(points[0][0], points[0][1]);
+ var len = points.length;
+ for (var i = 0; i < (closePath ? len : len - 1); i++) {
+ var cp1 = controlPoints[i * 2];
+ var cp2 = controlPoints[i * 2 + 1];
+ var p = points[(i + 1) % len];
+ ctx.bezierCurveTo(
+ cp1[0], cp1[1], cp2[0], cp2[1], p[0], p[1]
+ );
+ }
+ }
+ else {
+ if (smooth === 'spline') {
+ points = smoothSpline(points, closePath);
+ }
+
+ ctx.moveTo(points[0][0], points[0][1]);
+ for (var i = 1, l = points.length; i < l; i++) {
+ ctx.lineTo(points[i][0], points[i][1]);
+ }
+ }
+
+ closePath && ctx.closePath();
+ }
+ }
+ };
+
+
+/***/ },
+/* 68 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Catmull-Rom spline æ’值折线
+ * @module zrender/shape/util/smoothSpline
+ * @author pissang (https://www.github.com/pissang)
+ * Kener (@Kener-æž—å³°, kener.linfeng@gmail.com)
+ * errorrik (errorrik@gmail.com)
+ */
+
+ var vec2 = __webpack_require__(16);
+
+ /**
+ * @inner
+ */
+ function interpolate(p0, p1, p2, p3, t, t2, t3) {
+ var v0 = (p2 - p0) * 0.5;
+ var v1 = (p3 - p1) * 0.5;
+ return (2 * (p1 - p2) + v0 + v1) * t3
+ + (-3 * (p1 - p2) - 2 * v0 - v1) * t2
+ + v0 * t + p1;
+ }
+
+ /**
+ * @alias module:zrender/shape/util/smoothSpline
+ * @param {Array} points 线段顶点数组
+ * @param {boolean} isLoop
+ * @return {Array}
+ */
+ module.exports = function (points, isLoop) {
+ var len = points.length;
+ var ret = [];
+
+ var distance = 0;
+ for (var i = 1; i < len; i++) {
+ distance += vec2.distance(points[i - 1], points[i]);
+ }
+
+ var segs = distance / 2;
+ segs = segs < len ? len : segs;
+ for (var i = 0; i < segs; i++) {
+ var pos = i / (segs - 1) * (isLoop ? len : len - 1);
+ var idx = Math.floor(pos);
+
+ var w = pos - idx;
+
+ var p0;
+ var p1 = points[idx % len];
+ var p2;
+ var p3;
+ if (!isLoop) {
+ p0 = points[idx === 0 ? idx : idx - 1];
+ p2 = points[idx > len - 2 ? len - 1 : idx + 1];
+ p3 = points[idx > len - 3 ? len - 1 : idx + 2];
+ }
+ else {
+ p0 = points[(idx - 1 + len) % len];
+ p2 = points[(idx + 1) % len];
+ p3 = points[(idx + 2) % len];
+ }
+
+ var w2 = w * w;
+ var w3 = w * w2;
+
+ ret.push([
+ interpolate(p0[0], p1[0], p2[0], p3[0], w, w2, w3),
+ interpolate(p0[1], p1[1], p2[1], p3[1], w, w2, w3)
+ ]);
+ }
+ return ret;
+ };
+
+
+
+/***/ },
+/* 69 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * è´å¡žå°”平滑曲线
+ * @module zrender/shape/util/smoothBezier
+ * @author pissang (https://www.github.com/pissang)
+ * Kener (@Kener-æž—å³°, kener.linfeng@gmail.com)
+ * errorrik (errorrik@gmail.com)
+ */
+
+
+ var vec2 = __webpack_require__(16);
+ var v2Min = vec2.min;
+ var v2Max = vec2.max;
+ var v2Scale = vec2.scale;
+ var v2Distance = vec2.distance;
+ var v2Add = vec2.add;
+
+ /**
+ * è´å¡žå°”平滑曲线
+ * @alias module:zrender/shape/util/smoothBezier
+ * @param {Array} points 线段顶点数组
+ * @param {number} smooth 平滑等级, 0-1
+ * @param {boolean} isLoop
+ * @param {Array} constraint 将计算出æ¥çš„控制点约æŸåœ¨ä¸€ä¸ªåŒ…围盒内
+ * 比如 [[0, 0], [100, 100]], 这个包围盒会与
+ * 整个折线的包围盒åšä¸€ä¸ªå¹¶é›†ç”¨æ¥çº¦æŸæŽ§åˆ¶ç‚¹ã€‚
+ * @param {Array} 计算出æ¥çš„控制点数组
+ */
+ module.exports = function (points, smooth, isLoop, constraint) {
+ var cps = [];
+
+ var v = [];
+ var v1 = [];
+ var v2 = [];
+ var prevPoint;
+ var nextPoint;
+
+ var min, max;
+ if (constraint) {
+ min = [Infinity, Infinity];
+ max = [-Infinity, -Infinity];
+ for (var i = 0, len = points.length; i < len; i++) {
+ v2Min(min, min, points[i]);
+ v2Max(max, max, points[i]);
+ }
+ // 与指定的包围盒åšå¹¶é›†
+ v2Min(min, min, constraint[0]);
+ v2Max(max, max, constraint[1]);
+ }
+
+ for (var i = 0, len = points.length; i < len; i++) {
+ var point = points[i];
+
+ if (isLoop) {
+ prevPoint = points[i ? i - 1 : len - 1];
+ nextPoint = points[(i + 1) % len];
+ }
+ else {
+ if (i === 0 || i === len - 1) {
+ cps.push(vec2.clone(points[i]));
+ continue;
+ }
+ else {
+ prevPoint = points[i - 1];
+ nextPoint = points[i + 1];
+ }
+ }
+
+ vec2.sub(v, nextPoint, prevPoint);
+
+ // use degree to scale the handle length
+ v2Scale(v, v, smooth);
+
+ var d0 = v2Distance(point, prevPoint);
+ var d1 = v2Distance(point, nextPoint);
+ var sum = d0 + d1;
+ if (sum !== 0) {
+ d0 /= sum;
+ d1 /= sum;
+ }
+
+ v2Scale(v1, v, -d0);
+ v2Scale(v2, v, d1);
+ var cp0 = v2Add([], point, v1);
+ var cp1 = v2Add([], point, v2);
+ if (constraint) {
+ v2Max(cp0, cp0, min);
+ v2Min(cp0, cp0, max);
+ v2Max(cp1, cp1, min);
+ v2Min(cp1, cp1, max);
+ }
+ cps.push(cp0);
+ cps.push(cp1);
+ }
+
+ if (isLoop) {
+ cps.push(cps.shift());
+ }
+
+ return cps;
+ };
+
+
+
+/***/ },
+/* 70 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @module zrender/graphic/shape/Polyline
+ */
+
+
+ var polyHelper = __webpack_require__(67);
+
+ module.exports = __webpack_require__(44).extend({
+
+ type: 'polyline',
+
+ shape: {
+ points: null,
+
+ smooth: false,
+
+ smoothConstraint: null
+ },
+
+ style: {
+ stroke: '#000',
+
+ fill: null
+ },
+
+ buildPath: function (ctx, shape) {
+ polyHelper.buildPath(ctx, shape, false);
+ }
+ });
+
+
+/***/ },
+/* 71 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * 矩形
+ * @module zrender/graphic/shape/Rect
+ */
+
+
+ var roundRectHelper = __webpack_require__(60);
+
+ module.exports = __webpack_require__(44).extend({
+
+ type: 'rect',
+
+ shape: {
+ // 左上ã€å³ä¸Šã€å³ä¸‹ã€å·¦ä¸‹è§’çš„åŠå¾„ä¾æ¬¡ä¸ºr1ã€r2ã€r3ã€r4
+ // r缩写为1 相当于 [1, 1, 1, 1]
+ // r缩写为[1] 相当于 [1, 1, 1, 1]
+ // r缩写为[1, 2] 相当于 [1, 2, 1, 2]
+ // r缩写为[1, 2, 3] 相当于 [1, 2, 3, 2]
+ r: 0,
+
+ x: 0,
+ y: 0,
+ width: 0,
+ height: 0
+ },
+
+ buildPath: function (ctx, shape) {
+ var x = shape.x;
+ var y = shape.y;
+ var width = shape.width;
+ var height = shape.height;
+ if (!shape.r) {
+ ctx.rect(x, y, width, height);
+ }
+ else {
+ roundRectHelper.buildPath(ctx, shape);
+ }
+ ctx.closePath();
+ return;
+ }
+ });
+
+
+
+/***/ },
+/* 72 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * 直线
+ * @module zrender/graphic/shape/Line
+ */
+
+ module.exports = __webpack_require__(44).extend({
+
+ type: 'line',
+
+ shape: {
+ // Start point
+ x1: 0,
+ y1: 0,
+ // End point
+ x2: 0,
+ y2: 0,
+
+ percent: 1
+ },
+
+ style: {
+ stroke: '#000',
+ fill: null
+ },
+
+ buildPath: function (ctx, shape) {
+ var x1 = shape.x1;
+ var y1 = shape.y1;
+ var x2 = shape.x2;
+ var y2 = shape.y2;
+ var percent = shape.percent;
+
+ if (percent === 0) {
+ return;
+ }
+
+ ctx.moveTo(x1, y1);
+
+ if (percent < 1) {
+ x2 = x1 * (1 - percent) + x2 * percent;
+ y2 = y1 * (1 - percent) + y2 * percent;
+ }
+ ctx.lineTo(x2, y2);
+ },
+
+ /**
+ * Get point at percent
+ * @param {number} percent
+ * @return {Array.<number>}
+ */
+ pointAt: function (p) {
+ var shape = this.shape;
+ return [
+ shape.x1 * (1 - p) + shape.x2 * p,
+ shape.y1 * (1 - p) + shape.y2 * p
+ ];
+ }
+ });
+
+
+
+/***/ },
+/* 73 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ /**
+ * è´å¡žå°”曲线
+ * @module zrender/shape/BezierCurve
+ */
+
+
+ var curveTool = __webpack_require__(49);
+ var quadraticSubdivide = curveTool.quadraticSubdivide;
+ var cubicSubdivide = curveTool.cubicSubdivide;
+ var quadraticAt = curveTool.quadraticAt;
+ var cubicAt = curveTool.cubicAt;
+
+ var out = [];
+ module.exports = __webpack_require__(44).extend({
+
+ type: 'bezier-curve',
+
+ shape: {
+ x1: 0,
+ y1: 0,
+ x2: 0,
+ y2: 0,
+ cpx1: 0,
+ cpy1: 0,
+ // cpx2: 0,
+ // cpy2: 0
+
+ // Curve show percent, for animating
+ percent: 1
+ },
+
+ style: {
+ stroke: '#000',
+ fill: null
+ },
+
+ buildPath: function (ctx, shape) {
+ var x1 = shape.x1;
+ var y1 = shape.y1;
+ var x2 = shape.x2;
+ var y2 = shape.y2;
+ var cpx1 = shape.cpx1;
+ var cpy1 = shape.cpy1;
+ var cpx2 = shape.cpx2;
+ var cpy2 = shape.cpy2;
+ var percent = shape.percent;
+ if (percent === 0) {
+ return;
+ }
+
+ ctx.moveTo(x1, y1);
+
+ if (cpx2 == null || cpy2 == null) {
+ if (percent < 1) {
+ quadraticSubdivide(
+ x1, cpx1, x2, percent, out
+ );
+ cpx1 = out[1];
+ x2 = out[2];
+ quadraticSubdivide(
+ y1, cpy1, y2, percent, out
+ );
+ cpy1 = out[1];
+ y2 = out[2];
+ }
+
+ ctx.quadraticCurveTo(
+ cpx1, cpy1,
+ x2, y2
+ );
+ }
+ else {
+ if (percent < 1) {
+ cubicSubdivide(
+ x1, cpx1, cpx2, x2, percent, out
+ );
+ cpx1 = out[1];
+ cpx2 = out[2];
+ x2 = out[3];
+ cubicSubdivide(
+ y1, cpy1, cpy2, y2, percent, out
+ );
+ cpy1 = out[1];
+ cpy2 = out[2];
+ y2 = out[3];
+ }
+ ctx.bezierCurveTo(
+ cpx1, cpy1,
+ cpx2, cpy2,
+ x2, y2
+ );
+ }
+ },
+
+ /**
+ * Get point at percent
+ * @param {number} percent
+ * @return {Array.<number>}
+ */
+ pointAt: function (p) {
+ var shape = this.shape;
+ var cpx2 = shape.cpx2;
+ var cpy2 = shape.cpy2;
+ if (cpx2 === null || cpy2 === null) {
+ return [
+ quadraticAt(shape.x1, shape.cpx1, shape.x2, p),
+ quadraticAt(shape.y1, shape.cpy1, shape.y2, p)
+ ];
+ }
+ else {
+ return [
+ cubicAt(shape.x1, shape.cpx1, shape.cpx1, shape.x2, p),
+ cubicAt(shape.y1, shape.cpy1, shape.cpy1, shape.y2, p)
+ ];
+ }
+ }
+ });
+
+
+
+/***/ },
+/* 74 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * 圆弧
+ * @module zrender/graphic/shape/Arc
+ */
+
+
+ module.exports = __webpack_require__(44).extend({
+
+ type: 'arc',
+
+ shape: {
+
+ cx: 0,
+
+ cy: 0,
+
+ r: 0,
+
+ startAngle: 0,
+
+ endAngle: Math.PI * 2,
+
+ clockwise: true
+ },
+
+ style: {
+
+ stroke: '#000',
+
+ fill: null
+ },
+
+ buildPath: function (ctx, shape) {
+
+ var x = shape.cx;
+ var y = shape.cy;
+ var r = Math.max(shape.r, 0);
+ var startAngle = shape.startAngle;
+ var endAngle = shape.endAngle;
+ var clockwise = shape.clockwise;
+
+ var unitX = Math.cos(startAngle);
+ var unitY = Math.sin(startAngle);
+
+ ctx.moveTo(unitX * r + x, unitY * r + y);
+ ctx.arc(x, y, r, startAngle, endAngle, !clockwise);
+ }
+ });
+
+
+/***/ },
+/* 75 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var zrUtil = __webpack_require__(3);
+
+ var Gradient = __webpack_require__(4);
+
+ /**
+ * x, y, x2, y2 are all percent from 0 to 1
+ * @param {number} [x=0]
+ * @param {number} [y=0]
+ * @param {number} [x2=1]
+ * @param {number} [y2=0]
+ * @param {Array.<Object>} colorStops
+ */
+ var LinearGradient = function (x, y, x2, y2, colorStops) {
+ this.x = x == null ? 0 : x;
+
+ this.y = y == null ? 0 : y;
+
+ this.x2 = x2 == null ? 1 : x2;
+
+ this.y2 = y2 == null ? 0 : y2;
+
+ Gradient.call(this, colorStops);
+ };
+
+ LinearGradient.prototype = {
+
+ constructor: LinearGradient,
+
+ type: 'linear',
+
+ updateCanvasGradient: function (shape, ctx) {
+ var rect = shape.getBoundingRect();
+ // var size =
+ var x = this.x * rect.width + rect.x;
+ var x2 = this.x2 * rect.width + rect.x;
+ var y = this.y * rect.height + rect.y;
+ var y2 = this.y2 * rect.height + rect.y;
+
+ var canvasGradient = ctx.createLinearGradient(x, y, x2, y2);
+
+ var colorStops = this.colorStops;
+ for (var i = 0; i < colorStops.length; i++) {
+ canvasGradient.addColorStop(
+ colorStops[i].offset, colorStops[i].color
+ );
+ }
+
+ this.canvasGradient = canvasGradient;
+ }
+
+ };
+
+ zrUtil.inherits(LinearGradient, Gradient);
+
+ module.exports = LinearGradient;
+
+
+/***/ },
+/* 76 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var zrUtil = __webpack_require__(3);
+
+ var Gradient = __webpack_require__(4);
+
+ /**
+ * x, y, r are all percent from 0 to 1
+ * @param {number} [x=0.5]
+ * @param {number} [y=0.5]
+ * @param {number} [r=0.5]
+ * @param {Array.<Object>} [colorStops]
+ */
+ var RadialGradient = function (x, y, r, colorStops) {
+ this.x = x == null ? 0.5 : x;
+
+ this.y = y == null ? 0.5 : y;
+
+ this.r = r == null ? 0.5 : r;
+
+ Gradient.call(this, colorStops);
+ };
+
+ RadialGradient.prototype = {
+
+ constructor: RadialGradient,
+
+ type: 'radial',
+
+ updateCanvasGradient: function (shape, ctx) {
+ var rect = shape.getBoundingRect();
+
+ var width = rect.width;
+ var height = rect.height;
+ var min = Math.min(width, height);
+ // var max = Math.max(width, height);
+
+ var x = this.x * width + rect.x;
+ var y = this.y * height + rect.y;
+ var r = this.r * min;
+
+ var canvasGradient = ctx.createRadialGradient(x, y, 0, x, y, r);
+
+ var colorStops = this.colorStops;
+ for (var i = 0; i < colorStops.length; i++) {
+ canvasGradient.addColorStop(
+ colorStops[i].offset, colorStops[i].color
+ );
+ }
+
+ this.canvasGradient = canvasGradient;
+ }
+ };
+
+ zrUtil.inherits(RadialGradient, Gradient);
+
+ module.exports = RadialGradient;
+
+
+/***/ },
+/* 77 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /*!
+ * ZRender, a high performance 2d drawing library.
+ *
+ * Copyright (c) 2013, Baidu Inc.
+ * All rights reserved.
+ *
+ * LICENSE
+ * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
+ */
+ // Global defines
+
+ var guid = __webpack_require__(31);
+ var env = __webpack_require__(78);
+
+ var Handler = __webpack_require__(79);
+ var Storage = __webpack_require__(83);
+ var Animation = __webpack_require__(84);
+
+ var useVML = !env.canvasSupported;
+
+ var painterCtors = {
+ canvas: __webpack_require__(85)
+ };
+
+ var instances = {}; // ZRender实例map索引
+
+ var zrender = {};
+ /**
+ * @type {string}
+ */
+ zrender.version = '3.0.6';
+
+ /**
+ * @param {HTMLElement} dom
+ * @param {Object} opts
+ * @param {string} [opts.renderer='canvas'] 'canvas' or 'svg'
+ * @param {number} [opts.devicePixelRatio]
+ * @return {module:zrender/ZRender}
+ */
+ zrender.init = function(dom, opts) {
+ var zr = new ZRender(guid(), dom, opts);
+ instances[zr.id] = zr;
+ return zr;
+ };
+
+ /**
+ * Dispose zrender instance
+ * @param {module:zrender/ZRender} zr
+ */
+ zrender.dispose = function (zr) {
+ if (zr) {
+ zr.dispose();
+ }
+ else {
+ for (var key in instances) {
+ instances[key].dispose();
+ }
+ instances = {};
+ }
+
+ return zrender;
+ };
+
+ /**
+ * 获å–zrender实例
+ * @param {string} id ZRender对象索引
+ * @return {module:zrender/ZRender}
+ */
+ zrender.getInstance = function (id) {
+ return instances[id];
+ };
+
+ zrender.registerPainter = function (name, Ctor) {
+ painterCtors[name] = Ctor;
+ };
+
+ function delInstance(id) {
+ delete instances[id];
+ }
+
+ /**
+ * @module zrender/ZRender
+ */
+ /**
+ * @constructor
+ * @alias module:zrender/ZRender
+ * @param {string} id
+ * @param {HTMLDomElement} dom
+ * @param {Object} opts
+ * @param {string} [opts.renderer='canvas'] 'canvas' or 'svg'
+ * @param {number} [opts.devicePixelRatio]
+ */
+ var ZRender = function(id, dom, opts) {
+
+ opts = opts || {};
+
+ /**
+ * @type {HTMLDomElement}
+ */
+ this.dom = dom;
+
+ /**
+ * @type {string}
+ */
+ this.id = id;
+
+ var self = this;
+ var storage = new Storage();
+
+ var rendererType = opts.renderer;
+ if (useVML) {
+ if (!painterCtors.vml) {
+ throw new Error('You need to require \'zrender/vml/vml\' to support IE8');
+ }
+ rendererType = 'vml';
+ }
+ else if (!rendererType || !painterCtors[rendererType]) {
+ rendererType = 'canvas';
+ }
+ var painter = new painterCtors[rendererType](dom, storage, opts);
+
+ this.storage = storage;
+ this.painter = painter;
+ if (!env.node) {
+ this.handler = new Handler(painter.getViewportRoot(), storage, painter);
+ }
+
+ /**
+ * @type {module:zrender/animation/Animation}
+ */
+ this.animation = new Animation({
+ stage: {
+ update: function () {
+ if (self._needsRefresh) {
+ self.refreshImmediately();
+ }
+ }
+ }
+ });
+ this.animation.start();
+
+ /**
+ * @type {boolean}
+ * @private
+ */
+ this._needsRefresh;
+
+ // 修改 storage.delFromMap, æ¯æ¬¡åˆ é™¤å…ƒç´ ä¹‹å‰åˆ é™¤åŠ¨ç”»
+ // FIXME 有点ugly
+ var oldDelFromMap = storage.delFromMap;
+ var oldAddToMap = storage.addToMap;
+
+ storage.delFromMap = function (elId) {
+ var el = storage.get(elId);
+
+ oldDelFromMap.call(storage, elId);
+
+ el && el.removeSelfFromZr(self);
+ };
+
+ storage.addToMap = function (el) {
+ oldAddToMap.call(storage, el);
+
+ el.addSelfToZr(self);
+ };
+ };
+
+ ZRender.prototype = {
+
+ constructor: ZRender,
+ /**
+ * 获å–实例唯一标识
+ * @return {string}
+ */
+ getId: function () {
+ return this.id;
+ },
+
+ /**
+ * 添加元素
+ * @param {string|module:zrender/Element} el
+ */
+ add: function (el) {
+ this.storage.addRoot(el);
+ this._needsRefresh = true;
+ },
+
+ /**
+ * 删除元素
+ * @param {string|module:zrender/Element} el
+ */
+ remove: function (el) {
+ this.storage.delRoot(el);
+ this._needsRefresh = true;
+ },
+
+ /**
+ * 修改指定zlevel的绘制é…置项
+ *
+ * @param {string} zLevel
+ * @param {Object} config é…置对象
+ * @param {string} [config.clearColor=0] æ¯æ¬¡æ¸…空画布的颜色
+ * @param {string} [config.motionBlur=false] 是å¦å¼€å¯åŠ¨æ€æ¨¡ç³Š
+ * @param {number} [config.lastFrameAlpha=0.7]
+ * 在开å¯åŠ¨æ€æ¨¡ç³Šçš„时候使用,与上一帧混åˆçš„alpha值,值越大尾迹越明显
+ */
+ configLayer: function (zLevel, config) {
+ this.painter.configLayer(zLevel, config);
+ this._needsRefresh = true;
+ },
+
+ /**
+ * 视图更新
+ */
+ refreshImmediately: function () {
+ // Clear needsRefresh ahead to avoid something wrong happens in refresh
+ // Or it will cause zrender refreshes again and again.
+ this._needsRefresh = false;
+ this.painter.refresh();
+ /**
+ * Avoid trigger zr.refresh in Element#beforeUpdate hook
+ */
+ this._needsRefresh = false;
+ },
+
+ /**
+ * 标记视图在æµè§ˆå™¨ä¸‹ä¸€å¸§éœ€è¦ç»˜åˆ¶
+ */
+ refresh: function() {
+ this._needsRefresh = true;
+ },
+
+ /**
+ * 调整视图大å°
+ */
+ resize: function() {
+ this.painter.resize();
+ this.handler && this.handler.resize();
+ },
+
+ /**
+ * åœæ­¢æ‰€æœ‰åŠ¨ç”»
+ */
+ clearAnimation: function () {
+ this.animation.clear();
+ },
+
+ /**
+ * 获å–视图宽度
+ */
+ getWidth: function() {
+ return this.painter.getWidth();
+ },
+
+ /**
+ * 获å–视图高度
+ */
+ getHeight: function() {
+ return this.painter.getHeight();
+ },
+
+ /**
+ * 图åƒå¯¼å‡º
+ * @param {string} type
+ * @param {string} [backgroundColor='#fff'] 背景色
+ * @return {string} 图片的Base64 url
+ */
+ toDataURL: function(type, backgroundColor, args) {
+ return this.painter.toDataURL(type, backgroundColor, args);
+ },
+
+ /**
+ * 将常规shape转æˆimage shape
+ * @param {module:zrender/graphic/Path} e
+ * @param {number} width
+ * @param {number} height
+ */
+ pathToImage: function(e, width, height) {
+ var id = guid();
+ return this.painter.pathToImage(id, e, width, height);
+ },
+
+ /**
+ * 设置默认的cursor style
+ * @param {string} cursorStyle 例如 crosshair
+ */
+ setDefaultCursorStyle: function (cursorStyle) {
+ this.handler.setDefaultCursorStyle(cursorStyle);
+ },
+
+ /**
+ * 事件绑定
+ *
+ * @param {string} eventName 事件å称
+ * @param {Function} eventHandler å“应函数
+ * @param {Object} [context] å“应函数
+ */
+ on: function(eventName, eventHandler, context) {
+ this.handler && this.handler.on(eventName, eventHandler, context);
+ },
+
+ /**
+ * 事件解绑定,å‚数为空则解绑所有自定义事件
+ *
+ * @param {string} eventName 事件å称
+ * @param {Function} eventHandler å“应函数
+ */
+ off: function(eventName, eventHandler) {
+ this.handler && this.handler.off(eventName, eventHandler);
+ },
+
+ /**
+ * 事件触å‘
+ *
+ * @param {string} eventName 事件å称,resize,hover,drag,etc
+ * @param {event=} event event dom事件对象
+ */
+ trigger: function (eventName, event) {
+ this.handler && this.handler.trigger(eventName, event);
+ },
+
+
+ /**
+ * 清除当å‰ZRender下所有类图的数æ®å’Œæ˜¾ç¤ºï¼ŒclearåŽMVC和已绑定事件å‡è¿˜å­˜åœ¨åœ¨ï¼ŒZRenderå¯ç”¨
+ */
+ clear: function () {
+ this.storage.delRoot();
+ this.painter.clear();
+ },
+
+ /**
+ * 释放当å‰ZR实例(删除包括dom,数æ®ã€æ˜¾ç¤ºå’Œäº‹ä»¶ç»‘定),disposeåŽZRä¸å¯ç”¨
+ */
+ dispose: function () {
+ this.animation.stop();
+
+ this.clear();
+ this.storage.dispose();
+ this.painter.dispose();
+ this.handler && this.handler.dispose();
+
+ this.animation =
+ this.storage =
+ this.painter =
+ this.handler = null;
+
+ delInstance(this.id);
+ }
+ };
+
+ module.exports = zrender;
+
+
+
+/***/ },
+/* 78 */
+/***/ function(module, exports) {
+
+ /**
+ * echarts设备环境识别
+ *
+ * @desc echarts基于Canvas,纯Javascript图表库,æ供直观,生动,å¯äº¤äº’,å¯ä¸ªæ€§åŒ–定制的数æ®ç»Ÿè®¡å›¾è¡¨ã€‚
+ * @author firede[firede@firede.us]
+ * @desc thanks zepto.
+ */
+
+ var env = {};
+ if (typeof navigator === 'undefined') {
+ // In node
+ env = {
+ browser: {},
+ os: {},
+ node: true,
+ // Assume canvas is supported
+ canvasSupported: true
+ };
+ }
+ else {
+ env = detect(navigator.userAgent);
+ }
+
+ module.exports = env;
+
+ // Zepto.js
+ // (c) 2010-2013 Thomas Fuchs
+ // Zepto.js may be freely distributed under the MIT license.
+
+ function detect(ua) {
+ var os = {};
+ var browser = {};
+ var webkit = ua.match(/Web[kK]it[\/]{0,1}([\d.]+)/);
+ var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/);
+ var ipad = ua.match(/(iPad).*OS\s([\d_]+)/);
+ var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/);
+ var iphone = !ipad && ua.match(/(iPhone\sOS)\s([\d_]+)/);
+ var webos = ua.match(/(webOS|hpwOS)[\s\/]([\d.]+)/);
+ var touchpad = webos && ua.match(/TouchPad/);
+ var kindle = ua.match(/Kindle\/([\d.]+)/);
+ var silk = ua.match(/Silk\/([\d._]+)/);
+ var blackberry = ua.match(/(BlackBerry).*Version\/([\d.]+)/);
+ var bb10 = ua.match(/(BB10).*Version\/([\d.]+)/);
+ var rimtabletos = ua.match(/(RIM\sTablet\sOS)\s([\d.]+)/);
+ var playbook = ua.match(/PlayBook/);
+ var chrome = ua.match(/Chrome\/([\d.]+)/) || ua.match(/CriOS\/([\d.]+)/);
+ var firefox = ua.match(/Firefox\/([\d.]+)/);
+ var safari = webkit && ua.match(/Mobile\//) && !chrome;
+ var webview = ua.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/) && !chrome;
+ var ie = ua.match(/MSIE\s([\d.]+)/)
+ // IE 11 Trident/7.0; rv:11.0
+ || ua.match(/Trident\/.+?rv:(([\d.]+))/);
+ var edge = ua.match(/Edge\/([\d.]+)/); // IE 12 and 12+
+
+ // Todo: clean this up with a better OS/browser seperation:
+ // - discern (more) between multiple browsers on android
+ // - decide if kindle fire in silk mode is android or not
+ // - Firefox on Android doesn't specify the Android version
+ // - possibly devide in os, device and browser hashes
+
+ if (browser.webkit = !!webkit) browser.version = webkit[1];
+
+ if (android) os.android = true, os.version = android[2];
+ if (iphone && !ipod) os.ios = os.iphone = true, os.version = iphone[2].replace(/_/g, '.');
+ if (ipad) os.ios = os.ipad = true, os.version = ipad[2].replace(/_/g, '.');
+ if (ipod) os.ios = os.ipod = true, os.version = ipod[3] ? ipod[3].replace(/_/g, '.') : null;
+ if (webos) os.webos = true, os.version = webos[2];
+ if (touchpad) os.touchpad = true;
+ if (blackberry) os.blackberry = true, os.version = blackberry[2];
+ if (bb10) os.bb10 = true, os.version = bb10[2];
+ if (rimtabletos) os.rimtabletos = true, os.version = rimtabletos[2];
+ if (playbook) browser.playbook = true;
+ if (kindle) os.kindle = true, os.version = kindle[1];
+ if (silk) browser.silk = true, browser.version = silk[1];
+ if (!silk && os.android && ua.match(/Kindle Fire/)) browser.silk = true;
+ if (chrome) browser.chrome = true, browser.version = chrome[1];
+ if (firefox) browser.firefox = true, browser.version = firefox[1];
+ if (ie) browser.ie = true, browser.version = ie[1];
+ if (safari && (ua.match(/Safari/) || !!os.ios)) browser.safari = true;
+ if (webview) browser.webview = true;
+ if (ie) browser.ie = true, browser.version = ie[1];
+ if (edge) browser.edge = true, browser.version = edge[1];
+
+ os.tablet = !!(ipad || playbook || (android && !ua.match(/Mobile/)) ||
+ (firefox && ua.match(/Tablet/)) || (ie && !ua.match(/Phone/) && ua.match(/Touch/)));
+ os.phone = !!(!os.tablet && !os.ipod && (android || iphone || webos || blackberry || bb10 ||
+ (chrome && ua.match(/Android/)) || (chrome && ua.match(/CriOS\/([\d.]+)/)) ||
+ (firefox && ua.match(/Mobile/)) || (ie && ua.match(/Touch/))));
+
+ return {
+ browser: browser,
+ os: os,
+ node: false,
+ // 原生canvas支æŒï¼Œæ”¹æžç«¯ç‚¹äº†
+ // canvasSupported : !(browser.ie && parseFloat(browser.version) < 9)
+ canvasSupported : document.createElement('canvas').getContext ? true : false,
+ // @see <http://stackoverflow.com/questions/4817029/whats-the-best-way-to-detect-a-touch-screen-device-using-javascript>
+ // works on most browsers
+ // IE10/11 does not support touch event, and MS Edge supports them but not by
+ // default, so we dont check navigator.maxTouchPoints for them here.
+ touchEventsSupported: 'ontouchstart' in window && !browser.ie && !browser.edge,
+ // <http://caniuse.com/#search=pointer%20event>.
+ pointerEventsSupported: 'onpointerdown' in window
+ // Firefox supports pointer but not by default,
+ // only MS browsers are reliable on pointer events currently.
+ && (browser.edge || (browser.ie && browser.version >= 10))
+ };
+ }
+
+
+/***/ },
+/* 79 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ /**
+ * Handler控制模å—
+ * @module zrender/Handler
+ * @author Kener (@Kener-æž—å³°, kener.linfeng@gmail.com)
+ * errorrik (errorrik@gmail.com)
+ * pissang (shenyi.914@gmail.com)
+ */
+
+
+ var env = __webpack_require__(78);
+ var eventTool = __webpack_require__(80);
+ var util = __webpack_require__(3);
+ var Draggable = __webpack_require__(81);
+ var GestureMgr = __webpack_require__(82);
+
+ var Eventful = __webpack_require__(32);
+
+ var mouseHandlerNames = [
+ 'click', 'dblclick', 'mousewheel', 'mouseout'
+ ];
+ !usePointerEvent() && mouseHandlerNames.push(
+ 'mouseup', 'mousedown', 'mousemove'
+ );
+
+ var touchHandlerNames = [
+ 'touchstart', 'touchend', 'touchmove'
+ ];
+
+ var pointerHandlerNames = [
+ 'pointerdown', 'pointerup', 'pointermove'
+ ];
+
+ var TOUCH_CLICK_DELAY = 300;
+
+ // touch指尖错觉的å°è¯•å移é‡é…ç½®
+ // var MOBILE_TOUCH_OFFSETS = [
+ // { x: 10 },
+ // { x: -20 },
+ // { x: 10, y: 10 },
+ // { y: -20 }
+ // ];
+
+ var addEventListener = eventTool.addEventListener;
+ var removeEventListener = eventTool.removeEventListener;
+ var normalizeEvent = eventTool.normalizeEvent;
+
+ function makeEventPacket(eveType, target, event) {
+ return {
+ type: eveType,
+ event: event,
+ target: target,
+ cancelBubble: false,
+ offsetX: event.zrX,
+ offsetY: event.zrY,
+ gestureEvent: event.gestureEvent,
+ pinchX: event.pinchX,
+ pinchY: event.pinchY,
+ pinchScale: event.pinchScale,
+ wheelDelta: event.zrDelta
+ };
+ }
+
+ var domHandlers = {
+ /**
+ * Mouse move handler
+ * @inner
+ * @param {Event} event
+ */
+ mousemove: function (event) {
+ event = normalizeEvent(this.root, event);
+
+ var x = event.zrX;
+ var y = event.zrY;
+
+ var hovered = this.findHover(x, y, null);
+ var lastHovered = this._hovered;
+
+ this._hovered = hovered;
+
+ this.root.style.cursor = hovered ? hovered.cursor : this._defaultCursorStyle;
+ // Mouse out on previous hovered element
+ if (lastHovered && hovered !== lastHovered && lastHovered.__zr) {
+ this._dispatchProxy(lastHovered, 'mouseout', event);
+ }
+
+ // Mouse moving on one element
+ this._dispatchProxy(hovered, 'mousemove', event);
+
+ // Mouse over on a new element
+ if (hovered && hovered !== lastHovered) {
+ this._dispatchProxy(hovered, 'mouseover', event);
+ }
+ },
+
+ /**
+ * Mouse out handler
+ * @inner
+ * @param {Event} event
+ */
+ mouseout: function (event) {
+ event = normalizeEvent(this.root, event);
+
+ var element = event.toElement || event.relatedTarget;
+ if (element != this.root) {
+ while (element && element.nodeType != 9) {
+ // 忽略包å«åœ¨root中的dom引起的mouseOut
+ if (element === this.root) {
+ return;
+ }
+
+ element = element.parentNode;
+ }
+ }
+
+ this._dispatchProxy(this._hovered, 'mouseout', event);
+
+ this.trigger('globalout', {
+ event: event
+ });
+ },
+
+ /**
+ * Touch开始å“应函数
+ * @inner
+ * @param {Event} event
+ */
+ touchstart: function (event) {
+ // FIXME
+ // 移动端å¯èƒ½éœ€è¦default行为,例如é™æ€å›¾è¡¨æ—¶ã€‚
+ // eventTool.stop(event);// 阻止æµè§ˆå™¨é»˜è®¤äº‹ä»¶ï¼Œé‡è¦
+ event = normalizeEvent(this.root, event);
+
+ this._lastTouchMoment = new Date();
+
+ processGesture(this, event, 'start');
+
+ // å¹³æ¿è¡¥å……一次findHover
+ // this._mobileFindFixed(event);
+ // Trigger mousemove and mousedown
+ domHandlers.mousemove.call(this, event);
+
+ domHandlers.mousedown.call(this, event);
+
+ setTouchTimer(this);
+ },
+
+ /**
+ * Touch移动å“应函数
+ * @inner
+ * @param {Event} event
+ */
+ touchmove: function (event) {
+ // eventTool.stop(event);// 阻止æµè§ˆå™¨é»˜è®¤äº‹ä»¶ï¼Œé‡è¦
+ event = normalizeEvent(this.root, event);
+
+ processGesture(this, event, 'change');
+
+ // Mouse move should always be triggered no matter whether
+ // there is gestrue event, because mouse move and pinch may
+ // be used at the same time.
+ domHandlers.mousemove.call(this, event);
+
+ setTouchTimer(this);
+ },
+
+ /**
+ * Touch结æŸå“应函数
+ * @inner
+ * @param {Event} event
+ */
+ touchend: function (event) {
+ // eventTool.stop(event);// 阻止æµè§ˆå™¨é»˜è®¤äº‹ä»¶ï¼Œé‡è¦
+ event = normalizeEvent(this.root, event);
+
+ processGesture(this, event, 'end');
+
+ domHandlers.mouseup.call(this, event);
+
+ // click event should always be triggered no matter whether
+ // there is gestrue event. System click can not be prevented.
+ if (+new Date() - this._lastTouchMoment < TOUCH_CLICK_DELAY) {
+ // this._mobileFindFixed(event);
+ domHandlers.click.call(this, event);
+ }
+
+ setTouchTimer(this);
+ }
+ };
+
+ // Common handlers
+ util.each(['click', 'mousedown', 'mouseup', 'mousewheel', 'dblclick'], function (name) {
+ domHandlers[name] = function (event) {
+ event = normalizeEvent(this.root, event);
+ // Find hover again to avoid click event is dispatched manually. Or click is triggered without mouseover
+ var hovered = this.findHover(event.zrX, event.zrY, null);
+ this._dispatchProxy(hovered, name, event);
+ };
+ });
+
+ // Pointer event handlers
+ // util.each(['pointerdown', 'pointermove', 'pointerup'], function (name) {
+ // domHandlers[name] = function (event) {
+ // var mouseName = name.replace('pointer', 'mouse');
+ // domHandlers[mouseName].call(this, event);
+ // };
+ // });
+
+ function processGesture(zrHandler, event, stage) {
+ var gestureMgr = zrHandler._gestureMgr;
+
+ stage === 'start' && gestureMgr.clear();
+
+ var gestureInfo = gestureMgr.recognize(
+ event,
+ zrHandler.findHover(event.zrX, event.zrY, null)
+ );
+
+ stage === 'end' && gestureMgr.clear();
+
+ if (gestureInfo) {
+ // eventTool.stop(event);
+ var type = gestureInfo.type;
+ event.gestureEvent = type;
+
+ zrHandler._dispatchProxy(gestureInfo.target, type, gestureInfo.event);
+ }
+ }
+
+ /**
+ * 为控制类实例åˆå§‹åŒ–dom 事件处ç†å‡½æ•°
+ *
+ * @inner
+ * @param {module:zrender/Handler} instance 控制类实例
+ */
+ function initDomHandler(instance) {
+ var handlerNames = touchHandlerNames.concat(pointerHandlerNames);
+ for (var i = 0; i < handlerNames.length; i++) {
+ var name = handlerNames[i];
+ instance._handlers[name] = util.bind(domHandlers[name], instance);
+ }
+
+ for (var i = 0; i < mouseHandlerNames.length; i++) {
+ var name = mouseHandlerNames[i];
+ instance._handlers[name] = makeMouseHandler(domHandlers[name], instance);
+ }
+
+ function makeMouseHandler(fn, instance) {
+ return function () {
+ if (instance._touching) {
+ return;
+ }
+ return fn.apply(instance, arguments);
+ };
+ }
+ }
+
+ /**
+ * @alias module:zrender/Handler
+ * @constructor
+ * @extends module:zrender/mixin/Eventful
+ * @param {HTMLElement} root Main HTML element for painting.
+ * @param {module:zrender/Storage} storage Storage instance.
+ * @param {module:zrender/Painter} painter Painter instance.
+ */
+ var Handler = function(root, storage, painter) {
+ Eventful.call(this);
+
+ this.root = root;
+ this.storage = storage;
+ this.painter = painter;
+
+ /**
+ * @private
+ * @type {boolean}
+ */
+ this._hovered;
+
+ /**
+ * @private
+ * @type {Date}
+ */
+ this._lastTouchMoment;
+
+ /**
+ * @private
+ * @type {number}
+ */
+ this._lastX;
+
+ /**
+ * @private
+ * @type {number}
+ */
+ this._lastY;
+
+ /**
+ * @private
+ * @type {string}
+ */
+ this._defaultCursorStyle = 'default';
+
+ /**
+ * @private
+ * @type {module:zrender/core/GestureMgr}
+ */
+ this._gestureMgr = new GestureMgr();
+
+ /**
+ * @private
+ * @type {Array.<Function>}
+ */
+ this._handlers = [];
+
+ /**
+ * @private
+ * @type {boolean}
+ */
+ this._touching = false;
+
+ /**
+ * @private
+ * @type {number}
+ */
+ this._touchTimer;
+
+ initDomHandler(this);
+
+ if (usePointerEvent()) {
+ mountHandlers(pointerHandlerNames, this);
+ }
+ else if (useTouchEvent()) {
+ mountHandlers(touchHandlerNames, this);
+
+ // Handler of 'mouseout' event is needed in touch mode, which will be mounted below.
+ // addEventListener(root, 'mouseout', this._mouseoutHandler);
+ }
+
+ // Considering some devices that both enable touch and mouse event (like MS Surface
+ // and lenovo X240, @see #2350), we make mouse event be always listened, otherwise
+ // mouse event can not be handle in those devices.
+ mountHandlers(mouseHandlerNames, this);
+
+ Draggable.call(this);
+
+ function mountHandlers(handlerNames, instance) {
+ util.each(handlerNames, function (name) {
+ addEventListener(root, eventNameFix(name), instance._handlers[name]);
+ }, instance);
+ }
+ };
+
+ Handler.prototype = {
+
+ constructor: Handler,
+
+ /**
+ * Resize
+ */
+ resize: function (event) {
+ this._hovered = null;
+ },
+
+ /**
+ * Dispatch event
+ * @param {string} eventName
+ * @param {event=} eventArgs
+ */
+ dispatch: function (eventName, eventArgs) {
+ var handler = this._handlers[eventName];
+ handler && handler.call(this, eventArgs);
+ },
+
+ /**
+ * Dispose
+ */
+ dispose: function () {
+ var root = this.root;
+
+ var handlerNames = mouseHandlerNames.concat(touchHandlerNames);
+
+ for (var i = 0; i < handlerNames.length; i++) {
+ var name = handlerNames[i];
+ removeEventListener(root, eventNameFix(name), this._handlers[name]);
+ }
+
+ this.root =
+ this.storage =
+ this.painter = null;
+ },
+
+ /**
+ * 设置默认的cursor style
+ * @param {string} cursorStyle 例如 crosshair
+ */
+ setDefaultCursorStyle: function (cursorStyle) {
+ this._defaultCursorStyle = cursorStyle;
+ },
+
+ /**
+ * 事件分å‘代ç†
+ *
+ * @private
+ * @param {Object} targetEl 目标图形元素
+ * @param {string} eventName 事件å称
+ * @param {Object} event 事件对象
+ */
+ _dispatchProxy: function (targetEl, eventName, event) {
+ var eventHandler = 'on' + eventName;
+ var eventPacket = makeEventPacket(eventName, targetEl, event);
+
+ var el = targetEl;
+
+ while (el) {
+ el[eventHandler]
+ && (eventPacket.cancelBubble = el[eventHandler].call(el, eventPacket));
+
+ el.trigger(eventName, eventPacket);
+
+ el = el.parent;
+
+ if (eventPacket.cancelBubble) {
+ break;
+ }
+ }
+
+ if (!eventPacket.cancelBubble) {
+ // 冒泡到顶级 zrender 对象
+ this.trigger(eventName, eventPacket);
+ // 分å‘事件到用户自定义层
+ // 用户有å¯èƒ½åœ¨å…¨å±€ click 事件中 dispose,所以需è¦åˆ¤æ–­ä¸‹ painter 是å¦å­˜åœ¨
+ this.painter && this.painter.eachOtherLayer(function (layer) {
+ if (typeof(layer[eventHandler]) == 'function') {
+ layer[eventHandler].call(layer, eventPacket);
+ }
+ if (layer.trigger) {
+ layer.trigger(eventName, eventPacket);
+ }
+ });
+ }
+ },
+
+ /**
+ * @private
+ * @param {number} x
+ * @param {number} y
+ * @param {module:zrender/graphic/Displayable} exclude
+ * @method
+ */
+ findHover: function(x, y, exclude) {
+ var list = this.storage.getDisplayList();
+ for (var i = list.length - 1; i >= 0 ; i--) {
+ if (!list[i].silent
+ && list[i] !== exclude
+ // getDisplayList may include ignored item in VML mode
+ && !list[i].ignore
+ && isHover(list[i], x, y)) {
+ return list[i];
+ }
+ }
+ }
+ };
+
+ function isHover(displayable, x, y) {
+ if (displayable[displayable.rectHover ? 'rectContain' : 'contain'](x, y)) {
+ var p = displayable.parent;
+ while (p) {
+ if (p.clipPath && !p.clipPath.contain(x, y)) {
+ // Clipped by parents
+ return false;
+ }
+ p = p.parent;
+ }
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Prevent mouse event from being dispatched after Touch Events action
+ * @see <https://github.com/deltakosh/handjs/blob/master/src/hand.base.js>
+ * 1. Mobile browsers dispatch mouse events 300ms after touchend.
+ * 2. Chrome for Android dispatch mousedown for long-touch about 650ms
+ * Result: Blocking Mouse Events for 700ms.
+ */
+ function setTouchTimer(instance) {
+ instance._touching = true;
+ clearTimeout(instance._touchTimer);
+ instance._touchTimer = setTimeout(function () {
+ instance._touching = false;
+ }, 700);
+ }
+
+ /**
+ * Althought MS Surface support screen touch, IE10/11 do not support
+ * touch event and MS Edge supported them but not by default (but chrome
+ * and firefox do). Thus we use Pointer event on MS browsers to handle touch.
+ */
+ function usePointerEvent() {
+ // TODO
+ // pointermove event dont trigger when using finger.
+ // We may figger it out latter.
+ return false;
+ // return env.pointerEventsSupported
+ // In no-touch device we dont use pointer evnets but just
+ // use mouse event for avoiding problems.
+ // && window.navigator.maxTouchPoints;
+ }
+
+ function useTouchEvent() {
+ return env.touchEventsSupported;
+ }
+
+ function eventNameFix(name) {
+ return (name === 'mousewheel' && env.browser.firefox) ? 'DOMMouseScroll' : name;
+ }
+
+ util.mixin(Handler, Eventful);
+ util.mixin(Handler, Draggable);
+
+ module.exports = Handler;
+
+
+/***/ },
+/* 80 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ /**
+ * 事件辅助类
+ * @module zrender/core/event
+ * @author Kener (@Kener-æž—å³°, kener.linfeng@gmail.com)
+ */
+
+
+ var Eventful = __webpack_require__(32);
+
+ var isDomLevel2 = (typeof window !== 'undefined') && !!window.addEventListener;
+
+ function getBoundingClientRect(el) {
+ // BlackBerry 5, iOS 3 (original iPhone) don't have getBoundingRect
+ return el.getBoundingClientRect ? el.getBoundingClientRect() : { left: 0, top: 0};
+ }
+ /**
+ * 如果存在第三方嵌入的一些dom触å‘的事件,或touch事件,需è¦è½¬æ¢ä¸€ä¸‹äº‹ä»¶åæ ‡
+ */
+ function normalizeEvent(el, e) {
+
+ e = e || window.event;
+
+ if (e.zrX != null) {
+ return e;
+ }
+
+ var eventType = e.type;
+ var isTouch = eventType && eventType.indexOf('touch') >= 0;
+
+ if (!isTouch) {
+ var box = getBoundingClientRect(el);
+ e.zrX = e.clientX - box.left;
+ e.zrY = e.clientY - box.top;
+ e.zrDelta = (e.wheelDelta) ? e.wheelDelta / 120 : -(e.detail || 0) / 3;
+ }
+ else {
+ var touch = eventType != 'touchend'
+ ? e.targetTouches[0]
+ : e.changedTouches[0];
+ if (touch) {
+ var rBounding = getBoundingClientRect(el);
+ // touch事件å标是全å±çš„~
+ e.zrX = touch.clientX - rBounding.left;
+ e.zrY = touch.clientY - rBounding.top;
+ }
+ }
+
+ return e;
+ }
+
+ function addEventListener(el, name, handler) {
+ if (isDomLevel2) {
+ el.addEventListener(name, handler);
+ }
+ else {
+ el.attachEvent('on' + name, handler);
+ }
+ }
+
+ function removeEventListener(el, name, handler) {
+ if (isDomLevel2) {
+ el.removeEventListener(name, handler);
+ }
+ else {
+ el.detachEvent('on' + name, handler);
+ }
+ }
+
+ /**
+ * åœæ­¢å†’泡和阻止默认行为
+ * @memberOf module:zrender/core/event
+ * @method
+ * @param {Event} e : event对象
+ */
+ var stop = isDomLevel2
+ ? function (e) {
+ e.preventDefault();
+ e.stopPropagation();
+ e.cancelBubble = true;
+ }
+ : function (e) {
+ e.returnValue = false;
+ e.cancelBubble = true;
+ };
+
+ module.exports = {
+ normalizeEvent: normalizeEvent,
+ addEventListener: addEventListener,
+ removeEventListener: removeEventListener,
+
+ stop: stop,
+ // åšå‘上兼容
+ Dispatcher: Eventful
+ };
+
+
+
+/***/ },
+/* 81 */
+/***/ function(module, exports) {
+
+ // TODO Draggable for group
+ // FIXME Draggable on element which has parent rotation or scale
+
+ function Draggable() {
+
+ this.on('mousedown', this._dragStart, this);
+ this.on('mousemove', this._drag, this);
+ this.on('mouseup', this._dragEnd, this);
+ this.on('globalout', this._dragEnd, this);
+ // this._dropTarget = null;
+ // this._draggingTarget = null;
+
+ // this._x = 0;
+ // this._y = 0;
+ }
+
+ Draggable.prototype = {
+
+ constructor: Draggable,
+
+ _dragStart: function (e) {
+ var draggingTarget = e.target;
+ if (draggingTarget && draggingTarget.draggable) {
+ this._draggingTarget = draggingTarget;
+ draggingTarget.dragging = true;
+ this._x = e.offsetX;
+ this._y = e.offsetY;
+
+ this._dispatchProxy(draggingTarget, 'dragstart', e.event);
+ }
+ },
+
+ _drag: function (e) {
+ var draggingTarget = this._draggingTarget;
+ if (draggingTarget) {
+
+ var x = e.offsetX;
+ var y = e.offsetY;
+
+ var dx = x - this._x;
+ var dy = y - this._y;
+ this._x = x;
+ this._y = y;
+
+ draggingTarget.drift(dx, dy, e);
+ this._dispatchProxy(draggingTarget, 'drag', e.event);
+
+ var dropTarget = this.findHover(x, y, draggingTarget);
+ var lastDropTarget = this._dropTarget;
+ this._dropTarget = dropTarget;
+
+ if (draggingTarget !== dropTarget) {
+ if (lastDropTarget && dropTarget !== lastDropTarget) {
+ this._dispatchProxy(lastDropTarget, 'dragleave', e.event);
+ }
+ if (dropTarget && dropTarget !== lastDropTarget) {
+ this._dispatchProxy(dropTarget, 'dragenter', e.event);
+ }
+ }
+ }
+ },
+
+ _dragEnd: function (e) {
+ var draggingTarget = this._draggingTarget;
+
+ if (draggingTarget) {
+ draggingTarget.dragging = false;
+ }
+
+ this._dispatchProxy(draggingTarget, 'dragend', e.event);
+
+ if (this._dropTarget) {
+ this._dispatchProxy(this._dropTarget, 'drop', e.event);
+ }
+
+ this._draggingTarget = null;
+ this._dropTarget = null;
+ }
+
+ };
+
+ module.exports = Draggable;
+
+
+/***/ },
+/* 82 */
+/***/ function(module, exports) {
+
+ 'use strict';
+ /**
+ * Only implements needed gestures for mobile.
+ */
+
+
+ var GestureMgr = function () {
+
+ /**
+ * @private
+ * @type {Array.<Object>}
+ */
+ this._track = [];
+ };
+
+ GestureMgr.prototype = {
+
+ constructor: GestureMgr,
+
+ recognize: function (event, target) {
+ this._doTrack(event, target);
+ return this._recognize(event);
+ },
+
+ clear: function () {
+ this._track.length = 0;
+ return this;
+ },
+
+ _doTrack: function (event, target) {
+ var touches = event.touches;
+
+ if (!touches) {
+ return;
+ }
+
+ var trackItem = {
+ points: [],
+ touches: [],
+ target: target,
+ event: event
+ };
+
+ for (var i = 0, len = touches.length; i < len; i++) {
+ var touch = touches[i];
+ trackItem.points.push([touch.clientX, touch.clientY]);
+ trackItem.touches.push(touch);
+ }
+
+ this._track.push(trackItem);
+ },
+
+ _recognize: function (event) {
+ for (var eventName in recognizers) {
+ if (recognizers.hasOwnProperty(eventName)) {
+ var gestureInfo = recognizers[eventName](this._track, event);
+ if (gestureInfo) {
+ return gestureInfo;
+ }
+ }
+ }
+ }
+ };
+
+ function dist(pointPair) {
+ var dx = pointPair[1][0] - pointPair[0][0];
+ var dy = pointPair[1][1] - pointPair[0][1];
+
+ return Math.sqrt(dx * dx + dy * dy);
+ }
+
+ function center(pointPair) {
+ return [
+ (pointPair[0][0] + pointPair[1][0]) / 2,
+ (pointPair[0][1] + pointPair[1][1]) / 2
+ ];
+ }
+
+ var recognizers = {
+
+ pinch: function (track, event) {
+ var trackLen = track.length;
+
+ if (!trackLen) {
+ return;
+ }
+
+ var pinchEnd = (track[trackLen - 1] || {}).points;
+ var pinchPre = (track[trackLen - 2] || {}).points || pinchEnd;
+
+ if (pinchPre
+ && pinchPre.length > 1
+ && pinchEnd
+ && pinchEnd.length > 1
+ ) {
+ var pinchScale = dist(pinchEnd) / dist(pinchPre);
+ !isFinite(pinchScale) && (pinchScale = 1);
+
+ event.pinchScale = pinchScale;
+
+ var pinchCenter = center(pinchEnd);
+ event.pinchX = pinchCenter[0];
+ event.pinchY = pinchCenter[1];
+
+ return {
+ type: 'pinch',
+ target: track[0].target,
+ event: event
+ };
+ }
+ }
+
+ // Only pinch currently.
+ };
+
+ module.exports = GestureMgr;
+
+
+
+/***/ },
+/* 83 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ /**
+ * Storage内容仓库模å—
+ * @module zrender/Storage
+ * @author Kener (@Kener-æž—å³°, kener.linfeng@gmail.com)
+ * @author errorrik (errorrik@gmail.com)
+ * @author pissang (https://github.com/pissang/)
+ */
+
+
+ var util = __webpack_require__(3);
+
+ var Group = __webpack_require__(29);
+
+ function shapeCompareFunc(a, b) {
+ if (a.zlevel === b.zlevel) {
+ if (a.z === b.z) {
+ if (a.z2 === b.z2) {
+ return a.__renderidx - b.__renderidx;
+ }
+ return a.z2 - b.z2;
+ }
+ return a.z - b.z;
+ }
+ return a.zlevel - b.zlevel;
+ }
+ /**
+ * 内容仓库 (M)
+ * @alias module:zrender/Storage
+ * @constructor
+ */
+ var Storage = function () {
+ // 所有常规形状,id索引的map
+ this._elements = {};
+
+ this._roots = [];
+
+ this._displayList = [];
+
+ this._displayListLen = 0;
+ };
+
+ Storage.prototype = {
+
+ constructor: Storage,
+
+ /**
+ * 返回所有图形的绘制队列
+ * @param {boolean} [update=false] 是å¦åœ¨è¿”回å‰æ›´æ–°è¯¥æ•°ç»„
+ * @param {boolean} [includeIgnore=false] 是å¦åŒ…å« ignore 的数组, 在 update 为 true 的时候有效
+ *
+ * 详è§{@link module:zrender/graphic/Displayable.prototype.updateDisplayList}
+ * @return {Array.<module:zrender/graphic/Displayable>}
+ */
+ getDisplayList: function (update, includeIgnore) {
+ includeIgnore = includeIgnore || false;
+ if (update) {
+ this.updateDisplayList(includeIgnore);
+ }
+ return this._displayList;
+ },
+
+ /**
+ * 更新图形的绘制队列。
+ * æ¯æ¬¡ç»˜åˆ¶å‰éƒ½ä¼šè°ƒç”¨ï¼Œè¯¥æ–¹æ³•ä¼šå…ˆæ·±åº¦ä¼˜å…ˆé历整个树,更新所有Groupå’ŒShapeçš„å˜æ¢å¹¶ä¸”把所有å¯è§çš„Shapeä¿å­˜åˆ°æ•°ç»„中,
+ * 最åŽæ ¹æ®ç»˜åˆ¶çš„优先级(zlevel > z > æ’入顺åºï¼‰æŽ’åºå¾—到绘制队列
+ * @param {boolean} [includeIgnore=false] 是å¦åŒ…å« ignore 的数组
+ */
+ updateDisplayList: function (includeIgnore) {
+ this._displayListLen = 0;
+ var roots = this._roots;
+ var displayList = this._displayList;
+ for (var i = 0, len = roots.length; i < len; i++) {
+ this._updateAndAddDisplayable(roots[i], null, includeIgnore);
+ }
+ displayList.length = this._displayListLen;
+
+ for (var i = 0, len = displayList.length; i < len; i++) {
+ displayList[i].__renderidx = i;
+ }
+
+ displayList.sort(shapeCompareFunc);
+ },
+
+ _updateAndAddDisplayable: function (el, clipPaths, includeIgnore) {
+
+ if (el.ignore && !includeIgnore) {
+ return;
+ }
+
+ el.beforeUpdate();
+
+ el.update();
+
+ el.afterUpdate();
+
+ var clipPath = el.clipPath;
+ if (clipPath) {
+ // clipPath çš„å˜æ¢æ˜¯åŸºäºŽ group çš„å˜æ¢
+ clipPath.parent = el;
+ clipPath.updateTransform();
+
+ // FIXME 效率影å“
+ if (clipPaths) {
+ clipPaths = clipPaths.slice();
+ clipPaths.push(clipPath);
+ }
+ else {
+ clipPaths = [clipPath];
+ }
+ }
+
+ if (el.type == 'group') {
+ var children = el._children;
+
+ for (var i = 0; i < children.length; i++) {
+ var child = children[i];
+
+ // Force to mark as dirty if group is dirty
+ // FIXME __dirtyPath ?
+ child.__dirty = el.__dirty || child.__dirty;
+
+ this._updateAndAddDisplayable(child, clipPaths, includeIgnore);
+ }
+
+ // Mark group clean here
+ el.__dirty = false;
+
+ }
+ else {
+ el.__clipPaths = clipPaths;
+
+ this._displayList[this._displayListLen++] = el;
+ }
+ },
+
+ /**
+ * 添加图形(Shape)或者组(Group)到根节点
+ * @param {module:zrender/Element} el
+ */
+ addRoot: function (el) {
+ // Element has been added
+ if (this._elements[el.id]) {
+ return;
+ }
+
+ if (el instanceof Group) {
+ el.addChildrenToStorage(this);
+ }
+
+ this.addToMap(el);
+ this._roots.push(el);
+ },
+
+ /**
+ * 删除指定的图形(Shape)或者组(Group)
+ * @param {string|Array.<string>} [elId] 如果为空清空整个Storage
+ */
+ delRoot: function (elId) {
+ if (elId == null) {
+ // ä¸æŒ‡å®šelId清空
+ for (var i = 0; i < this._roots.length; i++) {
+ var root = this._roots[i];
+ if (root instanceof Group) {
+ root.delChildrenFromStorage(this);
+ }
+ }
+
+ this._elements = {};
+ this._roots = [];
+ this._displayList = [];
+ this._displayListLen = 0;
+
+ return;
+ }
+
+ if (elId instanceof Array) {
+ for (var i = 0, l = elId.length; i < l; i++) {
+ this.delRoot(elId[i]);
+ }
+ return;
+ }
+
+ var el;
+ if (typeof(elId) == 'string') {
+ el = this._elements[elId];
+ }
+ else {
+ el = elId;
+ }
+
+ var idx = util.indexOf(this._roots, el);
+ if (idx >= 0) {
+ this.delFromMap(el.id);
+ this._roots.splice(idx, 1);
+ if (el instanceof Group) {
+ el.delChildrenFromStorage(this);
+ }
+ }
+ },
+
+ addToMap: function (el) {
+ if (el instanceof Group) {
+ el.__storage = this;
+ }
+ el.dirty();
+
+ this._elements[el.id] = el;
+
+ return this;
+ },
+
+ get: function (elId) {
+ return this._elements[elId];
+ },
+
+ delFromMap: function (elId) {
+ var elements = this._elements;
+ var el = elements[elId];
+ if (el) {
+ delete elements[elId];
+ if (el instanceof Group) {
+ el.__storage = null;
+ }
+ }
+
+ return this;
+ },
+
+ /**
+ * 清空并且释放Storage
+ */
+ dispose: function () {
+ this._elements =
+ this._renderList =
+ this._roots = null;
+ }
+ };
+
+ module.exports = Storage;
+
+
+
+/***/ },
+/* 84 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ /**
+ * 动画主类, 调度和管ç†æ‰€æœ‰åŠ¨ç”»æŽ§åˆ¶å™¨
+ *
+ * @module zrender/animation/Animation
+ * @author pissang(https://github.com/pissang)
+ */
+ // TODO Additive animation
+ // http://iosoteric.com/additive-animations-animatewithduration-in-ios-8/
+ // https://developer.apple.com/videos/wwdc2014/#236
+
+
+ var util = __webpack_require__(3);
+ var Dispatcher = __webpack_require__(80).Dispatcher;
+
+ var requestAnimationFrame = (typeof window !== 'undefined' &&
+ (window.requestAnimationFrame
+ || window.msRequestAnimationFrame
+ || window.mozRequestAnimationFrame
+ || window.webkitRequestAnimationFrame))
+ || function (func) {
+ setTimeout(func, 16);
+ };
+
+ var Animator = __webpack_require__(35);
+ /**
+ * @typedef {Object} IZRenderStage
+ * @property {Function} update
+ */
+
+ /**
+ * @alias module:zrender/animation/Animation
+ * @constructor
+ * @param {Object} [options]
+ * @param {Function} [options.onframe]
+ * @param {IZRenderStage} [options.stage]
+ * @example
+ * var animation = new Animation();
+ * var obj = {
+ * x: 100,
+ * y: 100
+ * };
+ * animation.animate(node.position)
+ * .when(1000, {
+ * x: 500,
+ * y: 500
+ * })
+ * .when(2000, {
+ * x: 100,
+ * y: 100
+ * })
+ * .start('spline');
+ */
+ var Animation = function (options) {
+
+ options = options || {};
+
+ this.stage = options.stage || {};
+
+ this.onframe = options.onframe || function() {};
+
+ // private properties
+ this._clips = [];
+
+ this._running = false;
+
+ this._time = 0;
+
+ Dispatcher.call(this);
+ };
+
+ Animation.prototype = {
+
+ constructor: Animation,
+ /**
+ * 添加 clip
+ * @param {module:zrender/animation/Clip} clip
+ */
+ addClip: function (clip) {
+ this._clips.push(clip);
+ },
+ /**
+ * 添加 animator
+ * @param {module:zrender/animation/Animator} animator
+ */
+ addAnimator: function (animator) {
+ animator.animation = this;
+ var clips = animator.getClips();
+ for (var i = 0; i < clips.length; i++) {
+ this.addClip(clips[i]);
+ }
+ },
+ /**
+ * 删除动画片段
+ * @param {module:zrender/animation/Clip} clip
+ */
+ removeClip: function(clip) {
+ var idx = util.indexOf(this._clips, clip);
+ if (idx >= 0) {
+ this._clips.splice(idx, 1);
+ }
+ },
+
+ /**
+ * 删除动画片段
+ * @param {module:zrender/animation/Animator} animator
+ */
+ removeAnimator: function (animator) {
+ var clips = animator.getClips();
+ for (var i = 0; i < clips.length; i++) {
+ this.removeClip(clips[i]);
+ }
+ animator.animation = null;
+ },
+
+ _update: function() {
+
+ var time = new Date().getTime();
+ var delta = time - this._time;
+ var clips = this._clips;
+ var len = clips.length;
+
+ var deferredEvents = [];
+ var deferredClips = [];
+ for (var i = 0; i < len; i++) {
+ var clip = clips[i];
+ var e = clip.step(time);
+ // Throw out the events need to be called after
+ // stage.update, like destroy
+ if (e) {
+ deferredEvents.push(e);
+ deferredClips.push(clip);
+ }
+ }
+
+ // Remove the finished clip
+ for (var i = 0; i < len;) {
+ if (clips[i]._needsRemove) {
+ clips[i] = clips[len - 1];
+ clips.pop();
+ len--;
+ }
+ else {
+ i++;
+ }
+ }
+
+ len = deferredEvents.length;
+ for (var i = 0; i < len; i++) {
+ deferredClips[i].fire(deferredEvents[i]);
+ }
+
+ this._time = time;
+
+ this.onframe(delta);
+
+ this.trigger('frame', delta);
+
+ if (this.stage.update) {
+ this.stage.update();
+ }
+ },
+ /**
+ * 开始è¿è¡ŒåŠ¨ç”»
+ */
+ start: function () {
+ var self = this;
+
+ this._running = true;
+
+ function step() {
+ if (self._running) {
+
+ requestAnimationFrame(step);
+
+ self._update();
+ }
+ }
+
+ this._time = new Date().getTime();
+ requestAnimationFrame(step);
+ },
+ /**
+ * åœæ­¢è¿è¡ŒåŠ¨ç”»
+ */
+ stop: function () {
+ this._running = false;
+ },
+ /**
+ * 清除所有动画片段
+ */
+ clear: function () {
+ this._clips = [];
+ },
+ /**
+ * 对一个目标创建一个animator对象,å¯ä»¥æŒ‡å®šç›®æ ‡ä¸­çš„属性使用动画
+ * @param {Object} target
+ * @param {Object} options
+ * @param {boolean} [options.loop=false] 是å¦å¾ªçŽ¯æ’­æ”¾åŠ¨ç”»
+ * @param {Function} [options.getter=null]
+ * 如果指定getter函数,会通过getter函数å–属性值
+ * @param {Function} [options.setter=null]
+ * 如果指定setter函数,会通过setter函数设置属性值
+ * @return {module:zrender/animation/Animation~Animator}
+ */
+ animate: function (target, options) {
+ options = options || {};
+ var animator = new Animator(
+ target,
+ options.loop,
+ options.getter,
+ options.setter
+ );
+
+ return animator;
+ }
+ };
+
+ util.mixin(Animation, Dispatcher);
+
+ module.exports = Animation;
+
+
+
+/***/ },
+/* 85 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ /**
+ * Default canvas painter
+ * @module zrender/Painter
+ * @author Kener (@Kener-æž—å³°, kener.linfeng@gmail.com)
+ * errorrik (errorrik@gmail.com)
+ * pissang (https://www.github.com/pissang)
+ */
+
+
+ var config = __webpack_require__(40);
+ var util = __webpack_require__(3);
+ var log = __webpack_require__(39);
+ var BoundingRect = __webpack_require__(15);
+
+ var Layer = __webpack_require__(86);
+
+ function parseInt10(val) {
+ return parseInt(val, 10);
+ }
+
+ function isLayerValid(layer) {
+ if (!layer) {
+ return false;
+ }
+
+ if (layer.isBuildin) {
+ return true;
+ }
+
+ if (typeof(layer.resize) !== 'function'
+ || typeof(layer.refresh) !== 'function'
+ ) {
+ return false;
+ }
+
+ return true;
+ }
+
+ function preProcessLayer(layer) {
+ layer.__unusedCount++;
+ }
+
+ function postProcessLayer(layer) {
+ layer.__dirty = false;
+ if (layer.__unusedCount == 1) {
+ layer.clear();
+ }
+ }
+
+ var tmpRect = new BoundingRect(0, 0, 0, 0);
+ var viewRect = new BoundingRect(0, 0, 0, 0);
+ function isDisplayableCulled(el, width, height) {
+ tmpRect.copy(el.getBoundingRect());
+ if (el.transform) {
+ tmpRect.applyTransform(el.transform);
+ }
+ viewRect.width = width;
+ viewRect.height = height;
+ return !tmpRect.intersect(viewRect);
+ }
+
+ function isClipPathChanged(clipPaths, prevClipPaths) {
+ if (!clipPaths || !prevClipPaths || (clipPaths.length !== prevClipPaths.length)) {
+ return true;
+ }
+ for (var i = 0; i < clipPaths.length; i++) {
+ if (clipPaths[i] !== prevClipPaths[i]) {
+ return true;
+ }
+ }
+ }
+
+ function doClip(clipPaths, ctx) {
+ for (var i = 0; i < clipPaths.length; i++) {
+ var clipPath = clipPaths[i];
+ var m;
+ if (clipPath.transform) {
+ m = clipPath.transform;
+ ctx.transform(
+ m[0], m[1],
+ m[2], m[3],
+ m[4], m[5]
+ );
+ }
+ var path = clipPath.path;
+ path.beginPath(ctx);
+ clipPath.buildPath(path, clipPath.shape);
+ ctx.clip();
+ // Transform back
+ if (clipPath.transform) {
+ m = clipPath.invTransform;
+ ctx.transform(
+ m[0], m[1],
+ m[2], m[3],
+ m[4], m[5]
+ );
+ }
+ }
+ }
+
+ /**
+ * @alias module:zrender/Painter
+ * @constructor
+ * @param {HTMLElement} root 绘图容器
+ * @param {module:zrender/Storage} storage
+ * @param {Ojbect} opts
+ */
+ var Painter = function (root, storage, opts) {
+ var singleCanvas = !root.nodeName // In node ?
+ || root.nodeName.toUpperCase() === 'CANVAS';
+
+ opts = opts || {};
+
+ /**
+ * @type {number}
+ */
+ this.dpr = opts.devicePixelRatio || config.devicePixelRatio;
+ /**
+ * @type {boolean}
+ * @private
+ */
+ this._singleCanvas = singleCanvas;
+ /**
+ * 绘图容器
+ * @type {HTMLElement}
+ */
+ this.root = root;
+
+ var rootStyle = root.style;
+
+ // In node environment using node-canvas
+ if (rootStyle) {
+ rootStyle['-webkit-tap-highlight-color'] = 'transparent';
+ rootStyle['-webkit-user-select'] = 'none';
+ rootStyle['user-select'] = 'none';
+ rootStyle['-webkit-touch-callout'] = 'none';
+
+ root.innerHTML = '';
+ }
+
+ /**
+ * @type {module:zrender/Storage}
+ */
+ this.storage = storage;
+
+ if (!singleCanvas) {
+ var width = this._getWidth();
+ var height = this._getHeight();
+ this._width = width;
+ this._height = height;
+
+ var domRoot = document.createElement('div');
+ this._domRoot = domRoot;
+ var domRootStyle = domRoot.style;
+
+ // domRoot.onselectstart = returnFalse; // é¿å…页é¢é€‰ä¸­çš„å°´å°¬
+ domRootStyle.position = 'relative';
+ domRootStyle.overflow = 'hidden';
+ domRootStyle.width = this._width + 'px';
+ domRootStyle.height = this._height + 'px';
+ root.appendChild(domRoot);
+
+ /**
+ * @type {Object.<key, module:zrender/Layer>}
+ * @private
+ */
+ this._layers = {};
+ /**
+ * @type {Array.<number>}
+ * @private
+ */
+ this._zlevelList = [];
+ }
+ else {
+ // Use canvas width and height directly
+ var width = root.width;
+ var height = root.height;
+ this._width = width;
+ this._height = height;
+
+ // Create layer if only one given canvas
+ // Device pixel ratio is fixed to 1 because given canvas has its specified width and height
+ var mainLayer = new Layer(root, this, 1);
+ mainLayer.initContext();
+ // FIXME Use canvas width and height
+ // mainLayer.resize(width, height);
+ this._layers = {
+ 0: mainLayer
+ };
+ this._zlevelList = [0];
+ }
+
+ this._layerConfig = {};
+
+ this.pathToImage = this._createPathToImage();
+ };
+
+ Painter.prototype = {
+
+ constructor: Painter,
+
+ /**
+ * If painter use a single canvas
+ * @return {boolean}
+ */
+ isSingleCanvas: function () {
+ return this._singleCanvas;
+ },
+ /**
+ * @return {HTMLDivElement}
+ */
+ getViewportRoot: function () {
+ return this._singleCanvas ? this._layers[0].dom : this._domRoot;
+ },
+
+ /**
+ * 刷新
+ * @param {boolean} [paintAll=false] 强制绘制所有displayable
+ */
+ refresh: function (paintAll) {
+ var list = this.storage.getDisplayList(true);
+ var zlevelList = this._zlevelList;
+
+ this._paintList(list, paintAll);
+
+ // Paint custum layers
+ for (var i = 0; i < zlevelList.length; i++) {
+ var z = zlevelList[i];
+ var layer = this._layers[z];
+ if (!layer.isBuildin && layer.refresh) {
+ layer.refresh();
+ }
+ }
+
+ return this;
+ },
+
+ _paintList: function (list, paintAll) {
+
+ if (paintAll == null) {
+ paintAll = false;
+ }
+
+ this._updateLayerStatus(list);
+
+ var currentLayer;
+ var currentZLevel;
+ var ctx;
+
+ var viewWidth = this._width;
+ var viewHeight = this._height;
+
+ this.eachBuildinLayer(preProcessLayer);
+
+ // var invTransform = [];
+ var prevElClipPaths = null;
+
+ for (var i = 0, l = list.length; i < l; i++) {
+ var el = list[i];
+ var elZLevel = this._singleCanvas ? 0 : el.zlevel;
+ // Change draw layer
+ if (currentZLevel !== elZLevel) {
+ // Only 0 zlevel if only has one canvas
+ currentZLevel = elZLevel;
+ currentLayer = this.getLayer(currentZLevel);
+
+ if (!currentLayer.isBuildin) {
+ log(
+ 'ZLevel ' + currentZLevel
+ + ' has been used by unkown layer ' + currentLayer.id
+ );
+ }
+
+ ctx = currentLayer.ctx;
+
+ // Reset the count
+ currentLayer.__unusedCount = 0;
+
+ if (currentLayer.__dirty || paintAll) {
+ currentLayer.clear();
+ }
+ }
+
+ if (
+ (currentLayer.__dirty || paintAll)
+ // Ignore invisible element
+ && !el.invisible
+ // Ignore transparent element
+ && el.style.opacity !== 0
+ // Ignore scale 0 element, in some environment like node-canvas
+ // Draw a scale 0 element can cause all following draw wrong
+ && el.scale[0] && el.scale[1]
+ // Ignore culled element
+ && !(el.culling && isDisplayableCulled(el, viewWidth, viewHeight))
+ ) {
+ var clipPaths = el.__clipPaths;
+
+ // Optimize when clipping on group with several elements
+ if (isClipPathChanged(clipPaths, prevElClipPaths)) {
+ // If has previous clipping state, restore from it
+ if (prevElClipPaths) {
+ ctx.restore();
+ }
+ // New clipping state
+ if (clipPaths) {
+ ctx.save();
+ doClip(clipPaths, ctx);
+ }
+ prevElClipPaths = clipPaths;
+ }
+ el.beforeBrush && el.beforeBrush(ctx);
+ el.brush(ctx, false);
+ el.afterBrush && el.afterBrush(ctx);
+ }
+
+ el.__dirty = false;
+ }
+
+ // If still has clipping state
+ if (prevElClipPaths) {
+ ctx.restore();
+ }
+
+ this.eachBuildinLayer(postProcessLayer);
+ },
+
+ /**
+ * èŽ·å– zlevel 所在层,如果ä¸å­˜åœ¨åˆ™ä¼šåˆ›å»ºä¸€ä¸ªæ–°çš„层
+ * @param {number} zlevel
+ * @return {module:zrender/Layer}
+ */
+ getLayer: function (zlevel) {
+ if (this._singleCanvas) {
+ return this._layers[0];
+ }
+
+ var layer = this._layers[zlevel];
+ if (!layer) {
+ // Create a new layer
+ layer = new Layer('zr_' + zlevel, this, this.dpr);
+ layer.isBuildin = true;
+
+ if (this._layerConfig[zlevel]) {
+ util.merge(layer, this._layerConfig[zlevel], true);
+ }
+
+ this.insertLayer(zlevel, layer);
+
+ // Context is created after dom inserted to document
+ // Or excanvas will get 0px clientWidth and clientHeight
+ layer.initContext();
+ }
+
+ return layer;
+ },
+
+ insertLayer: function (zlevel, layer) {
+
+ var layersMap = this._layers;
+ var zlevelList = this._zlevelList;
+ var len = zlevelList.length;
+ var prevLayer = null;
+ var i = -1;
+ var domRoot = this._domRoot;
+
+ if (layersMap[zlevel]) {
+ log('ZLevel ' + zlevel + ' has been used already');
+ return;
+ }
+ // Check if is a valid layer
+ if (!isLayerValid(layer)) {
+ log('Layer of zlevel ' + zlevel + ' is not valid');
+ return;
+ }
+
+ if (len > 0 && zlevel > zlevelList[0]) {
+ for (i = 0; i < len - 1; i++) {
+ if (
+ zlevelList[i] < zlevel
+ && zlevelList[i + 1] > zlevel
+ ) {
+ break;
+ }
+ }
+ prevLayer = layersMap[zlevelList[i]];
+ }
+ zlevelList.splice(i + 1, 0, zlevel);
+
+ if (prevLayer) {
+ var prevDom = prevLayer.dom;
+ if (prevDom.nextSibling) {
+ domRoot.insertBefore(
+ layer.dom,
+ prevDom.nextSibling
+ );
+ }
+ else {
+ domRoot.appendChild(layer.dom);
+ }
+ }
+ else {
+ if (domRoot.firstChild) {
+ domRoot.insertBefore(layer.dom, domRoot.firstChild);
+ }
+ else {
+ domRoot.appendChild(layer.dom);
+ }
+ }
+
+ layersMap[zlevel] = layer;
+ },
+
+ // Iterate each layer
+ eachLayer: function (cb, context) {
+ var zlevelList = this._zlevelList;
+ var z;
+ var i;
+ for (i = 0; i < zlevelList.length; i++) {
+ z = zlevelList[i];
+ cb.call(context, this._layers[z], z);
+ }
+ },
+
+ // Iterate each buildin layer
+ eachBuildinLayer: function (cb, context) {
+ var zlevelList = this._zlevelList;
+ var layer;
+ var z;
+ var i;
+ for (i = 0; i < zlevelList.length; i++) {
+ z = zlevelList[i];
+ layer = this._layers[z];
+ if (layer.isBuildin) {
+ cb.call(context, layer, z);
+ }
+ }
+ },
+
+ // Iterate each other layer except buildin layer
+ eachOtherLayer: function (cb, context) {
+ var zlevelList = this._zlevelList;
+ var layer;
+ var z;
+ var i;
+ for (i = 0; i < zlevelList.length; i++) {
+ z = zlevelList[i];
+ layer = this._layers[z];
+ if (! layer.isBuildin) {
+ cb.call(context, layer, z);
+ }
+ }
+ },
+
+ /**
+ * 获å–所有已创建的层
+ * @param {Array.<module:zrender/Layer>} [prevLayer]
+ */
+ getLayers: function () {
+ return this._layers;
+ },
+
+ _updateLayerStatus: function (list) {
+
+ var layers = this._layers;
+
+ var elCounts = {};
+
+ this.eachBuildinLayer(function (layer, z) {
+ elCounts[z] = layer.elCount;
+ layer.elCount = 0;
+ });
+
+ for (var i = 0, l = list.length; i < l; i++) {
+ var el = list[i];
+ var zlevel = this._singleCanvas ? 0 : el.zlevel;
+ var layer = layers[zlevel];
+ if (layer) {
+ layer.elCount++;
+ // å·²ç»è¢«æ ‡è®°ä¸ºéœ€è¦åˆ·æ–°
+ if (layer.__dirty) {
+ continue;
+ }
+ layer.__dirty = el.__dirty;
+ }
+ }
+
+ // 层中的元素数é‡æœ‰å‘生å˜åŒ–
+ this.eachBuildinLayer(function (layer, z) {
+ if (elCounts[z] !== layer.elCount) {
+ layer.__dirty = true;
+ }
+ });
+ },
+
+ /**
+ * 清除hover层外所有内容
+ */
+ clear: function () {
+ this.eachBuildinLayer(this._clearLayer);
+ return this;
+ },
+
+ _clearLayer: function (layer) {
+ layer.clear();
+ },
+
+ /**
+ * 修改指定zlevel的绘制å‚æ•°
+ *
+ * @param {string} zlevel
+ * @param {Object} config é…置对象
+ * @param {string} [config.clearColor=0] æ¯æ¬¡æ¸…空画布的颜色
+ * @param {string} [config.motionBlur=false] 是å¦å¼€å¯åŠ¨æ€æ¨¡ç³Š
+ * @param {number} [config.lastFrameAlpha=0.7]
+ * 在开å¯åŠ¨æ€æ¨¡ç³Šçš„时候使用,与上一帧混åˆçš„alpha值,值越大尾迹越明显
+ */
+ configLayer: function (zlevel, config) {
+ if (config) {
+ var layerConfig = this._layerConfig;
+ if (!layerConfig[zlevel]) {
+ layerConfig[zlevel] = config;
+ }
+ else {
+ util.merge(layerConfig[zlevel], config, true);
+ }
+
+ var layer = this._layers[zlevel];
+
+ if (layer) {
+ util.merge(layer, layerConfig[zlevel], true);
+ }
+ }
+ },
+
+ /**
+ * 删除指定层
+ * @param {number} zlevel 层所在的zlevel
+ */
+ delLayer: function (zlevel) {
+ var layers = this._layers;
+ var zlevelList = this._zlevelList;
+ var layer = layers[zlevel];
+ if (!layer) {
+ return;
+ }
+ layer.dom.parentNode.removeChild(layer.dom);
+ delete layers[zlevel];
+
+ zlevelList.splice(util.indexOf(zlevelList, zlevel), 1);
+ },
+
+ /**
+ * 区域大å°å˜åŒ–åŽé‡ç»˜
+ */
+ resize: function (width, height) {
+ var domRoot = this._domRoot;
+ // FIXME Why ?
+ domRoot.style.display = 'none';
+
+ width = width || this._getWidth();
+ height = height || this._getHeight();
+
+ domRoot.style.display = '';
+
+ // 优化没有实际改å˜çš„resize
+ if (this._width != width || height != this._height) {
+ domRoot.style.width = width + 'px';
+ domRoot.style.height = height + 'px';
+
+ for (var id in this._layers) {
+ this._layers[id].resize(width, height);
+ }
+
+ this.refresh(true);
+ }
+
+ this._width = width;
+ this._height = height;
+
+ return this;
+ },
+
+ /**
+ * 清除å•ç‹¬çš„一个层
+ * @param {number} zlevel
+ */
+ clearLayer: function (zlevel) {
+ var layer = this._layers[zlevel];
+ if (layer) {
+ layer.clear();
+ }
+ },
+
+ /**
+ * 释放
+ */
+ dispose: function () {
+ this.root.innerHTML = '';
+
+ this.root =
+ this.storage =
+
+ this._domRoot =
+ this._layers = null;
+ },
+
+ /**
+ * Get canvas which has all thing rendered
+ * @param {Object} opts
+ * @param {string} [opts.backgroundColor]
+ */
+ getRenderedCanvas: function (opts) {
+ opts = opts || {};
+ if (this._singleCanvas) {
+ return this._layers[0].dom;
+ }
+
+ var imageLayer = new Layer('image', this, opts.pixelRatio || this.dpr);
+ imageLayer.initContext();
+
+ var ctx = imageLayer.ctx;
+ imageLayer.clearColor = opts.backgroundColor;
+ imageLayer.clear();
+
+ var displayList = this.storage.getDisplayList(true);
+
+ for (var i = 0; i < displayList.length; i++) {
+ var el = displayList[i];
+ if (!el.invisible) {
+ el.beforeBrush && el.beforeBrush(ctx);
+ // TODO Check image cross origin
+ el.brush(ctx, false);
+ el.afterBrush && el.afterBrush(ctx);
+ }
+ }
+
+ return imageLayer.dom;
+ },
+ /**
+ * 获å–绘图区域宽度
+ */
+ getWidth: function () {
+ return this._width;
+ },
+
+ /**
+ * 获å–绘图区域高度
+ */
+ getHeight: function () {
+ return this._height;
+ },
+
+ _getWidth: function () {
+ var root = this.root;
+ var stl = document.defaultView.getComputedStyle(root);
+
+ // FIXME Better way to get the width and height when element has not been append to the document
+ return ((root.clientWidth || parseInt10(stl.width) || parseInt10(root.style.width))
+ - (parseInt10(stl.paddingLeft) || 0)
+ - (parseInt10(stl.paddingRight) || 0)) | 0;
+ },
+
+ _getHeight: function () {
+ var root = this.root;
+ var stl = document.defaultView.getComputedStyle(root);
+
+ return ((root.clientHeight || parseInt10(stl.height) || parseInt10(root.style.height))
+ - (parseInt10(stl.paddingTop) || 0)
+ - (parseInt10(stl.paddingBottom) || 0)) | 0;
+ },
+
+ _pathToImage: function (id, path, width, height, dpr) {
+ var canvas = document.createElement('canvas');
+ var ctx = canvas.getContext('2d');
+
+ canvas.width = width * dpr;
+ canvas.height = height * dpr;
+
+ ctx.clearRect(0, 0, width * dpr, height * dpr);
+
+ var pathTransform = {
+ position: path.position,
+ rotation: path.rotation,
+ scale: path.scale
+ };
+ path.position = [0, 0, 0];
+ path.rotation = 0;
+ path.scale = [1, 1];
+ if (path) {
+ path.brush(ctx);
+ }
+
+ var ImageShape = __webpack_require__(59);
+ var imgShape = new ImageShape({
+ id: id,
+ style: {
+ x: 0,
+ y: 0,
+ image: canvas
+ }
+ });
+
+ if (pathTransform.position != null) {
+ imgShape.position = path.position = pathTransform.position;
+ }
+
+ if (pathTransform.rotation != null) {
+ imgShape.rotation = path.rotation = pathTransform.rotation;
+ }
+
+ if (pathTransform.scale != null) {
+ imgShape.scale = path.scale = pathTransform.scale;
+ }
+
+ return imgShape;
+ },
+
+ _createPathToImage: function () {
+ var me = this;
+
+ return function (id, e, width, height) {
+ return me._pathToImage(
+ id, e, width, height, me.dpr
+ );
+ };
+ }
+ };
+
+ module.exports = Painter;
+
+
+
+/***/ },
+/* 86 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @module zrender/Layer
+ * @author pissang(https://www.github.com/pissang)
+ */
+
+
+ var util = __webpack_require__(3);
+ var config = __webpack_require__(40);
+
+ function returnFalse() {
+ return false;
+ }
+
+ /**
+ * 创建dom
+ *
+ * @inner
+ * @param {string} id dom id 待用
+ * @param {string} type dom type,such as canvas, div etc.
+ * @param {Painter} painter painter instance
+ * @param {number} number
+ */
+ function createDom(id, type, painter, dpr) {
+ var newDom = document.createElement(type);
+ var width = painter.getWidth();
+ var height = painter.getHeight();
+
+ var newDomStyle = newDom.style;
+ // 没append呢,请原谅我这样写,清晰~
+ newDomStyle.position = 'absolute';
+ newDomStyle.left = 0;
+ newDomStyle.top = 0;
+ newDomStyle.width = width + 'px';
+ newDomStyle.height = height + 'px';
+ newDom.width = width * dpr;
+ newDom.height = height * dpr;
+
+ // idä¸ä½œä¸ºç´¢å¼•ç”¨ï¼Œé¿å…å¯èƒ½é€ æˆçš„é‡å,定义为ç§æœ‰å±žæ€§
+ newDom.setAttribute('data-zr-dom-id', id);
+ return newDom;
+ }
+
+ /**
+ * @alias module:zrender/Layer
+ * @constructor
+ * @extends module:zrender/mixin/Transformable
+ * @param {string} id
+ * @param {module:zrender/Painter} painter
+ * @param {number} [dpr]
+ */
+ var Layer = function(id, painter, dpr) {
+ var dom;
+ dpr = dpr || config.devicePixelRatio;
+ if (typeof id === 'string') {
+ dom = createDom(id, 'canvas', painter, dpr);
+ }
+ // Not using isDom because in node it will return false
+ else if (util.isObject(id)) {
+ dom = id;
+ id = dom.id;
+ }
+ this.id = id;
+ this.dom = dom;
+
+ var domStyle = dom.style;
+ if (domStyle) { // Not in node
+ dom.onselectstart = returnFalse; // é¿å…页é¢é€‰ä¸­çš„å°´å°¬
+ domStyle['-webkit-user-select'] = 'none';
+ domStyle['user-select'] = 'none';
+ domStyle['-webkit-touch-callout'] = 'none';
+ domStyle['-webkit-tap-highlight-color'] = 'rgba(0,0,0,0)';
+ }
+
+ this.domBack = null;
+ this.ctxBack = null;
+
+ this.painter = painter;
+
+ this.config = null;
+
+ // Configs
+ /**
+ * æ¯æ¬¡æ¸…空画布的颜色
+ * @type {string}
+ * @default 0
+ */
+ this.clearColor = 0;
+ /**
+ * 是å¦å¼€å¯åŠ¨æ€æ¨¡ç³Š
+ * @type {boolean}
+ * @default false
+ */
+ this.motionBlur = false;
+ /**
+ * 在开å¯åŠ¨æ€æ¨¡ç³Šçš„时候使用,与上一帧混åˆçš„alpha值,值越大尾迹越明显
+ * @type {number}
+ * @default 0.7
+ */
+ this.lastFrameAlpha = 0.7;
+
+ /**
+ * Layer dpr
+ * @type {number}
+ */
+ this.dpr = dpr;
+ };
+
+ Layer.prototype = {
+
+ constructor: Layer,
+
+ elCount: 0,
+
+ __dirty: true,
+
+ initContext: function () {
+ this.ctx = this.dom.getContext('2d');
+
+ var dpr = this.dpr;
+ if (dpr != 1) {
+ this.ctx.scale(dpr, dpr);
+ }
+ },
+
+ createBackBuffer: function () {
+ var dpr = this.dpr;
+
+ this.domBack = createDom('back-' + this.id, 'canvas', this.painter, dpr);
+ this.ctxBack = this.domBack.getContext('2d');
+
+ if (dpr != 1) {
+ this.ctxBack.scale(dpr, dpr);
+ }
+ },
+
+ /**
+ * @param {number} width
+ * @param {number} height
+ */
+ resize: function (width, height) {
+ var dpr = this.dpr;
+
+ var dom = this.dom;
+ var domStyle = dom.style;
+ var domBack = this.domBack;
+
+ domStyle.width = width + 'px';
+ domStyle.height = height + 'px';
+
+ dom.width = width * dpr;
+ dom.height = height * dpr;
+
+ if (dpr != 1) {
+ this.ctx.scale(dpr, dpr);
+ }
+
+ if (domBack) {
+ domBack.width = width * dpr;
+ domBack.height = height * dpr;
+
+ if (dpr != 1) {
+ this.ctxBack.scale(dpr, dpr);
+ }
+ }
+ },
+
+ /**
+ * 清空该层画布
+ * @param {boolean} clearAll Clear all with out motion blur
+ */
+ clear: function (clearAll) {
+ var dom = this.dom;
+ var ctx = this.ctx;
+ var width = dom.width;
+ var height = dom.height;
+
+ var haveClearColor = this.clearColor;
+ var haveMotionBLur = this.motionBlur && !clearAll;
+ var lastFrameAlpha = this.lastFrameAlpha;
+
+ var dpr = this.dpr;
+
+ if (haveMotionBLur) {
+ if (!this.domBack) {
+ this.createBackBuffer();
+ }
+
+ this.ctxBack.globalCompositeOperation = 'copy';
+ this.ctxBack.drawImage(
+ dom, 0, 0,
+ width / dpr,
+ height / dpr
+ );
+ }
+
+ ctx.clearRect(0, 0, width / dpr, height / dpr);
+ if (haveClearColor) {
+ ctx.save();
+ ctx.fillStyle = this.clearColor;
+ ctx.fillRect(0, 0, width / dpr, height / dpr);
+ ctx.restore();
+ }
+
+ if (haveMotionBLur) {
+ var domBack = this.domBack;
+ ctx.save();
+ ctx.globalAlpha = lastFrameAlpha;
+ ctx.drawImage(domBack, 0, 0, width / dpr, height / dpr);
+ ctx.restore();
+ }
+ }
+ };
+
+ module.exports = Layer;
+
+
+/***/ },
+/* 87 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var graphic = __webpack_require__(42);
+ var zrUtil = __webpack_require__(3);
+ var PI = Math.PI;
+ /**
+ * @param {module:echarts/ExtensionAPI} api
+ * @param {Object} [opts]
+ * @param {string} [opts.text]
+ * @param {string} [opts.color]
+ * @param {string} [opts.textColor]
+ * @return {module:zrender/Element}
+ */
+ module.exports = function (api, opts) {
+ opts = opts || {};
+ zrUtil.defaults(opts, {
+ text: 'loading',
+ color: '#c23531',
+ textColor: '#000',
+ maskColor: 'rgba(255, 255, 255, 0.8)',
+ zlevel: 0
+ });
+ var mask = new graphic.Rect({
+ style: {
+ fill: opts.maskColor
+ },
+ zlevel: opts.zlevel,
+ z: 10000
+ });
+ var arc = new graphic.Arc({
+ shape: {
+ startAngle: -PI / 2,
+ endAngle: -PI / 2 + 0.1,
+ r: 10
+ },
+ style: {
+ stroke: opts.color,
+ lineCap: 'round',
+ lineWidth: 5
+ },
+ zlevel: opts.zlevel,
+ z: 10001
+ });
+ var labelRect = new graphic.Rect({
+ style: {
+ fill: 'none',
+ text: opts.text,
+ textPosition: 'right',
+ textDistance: 10,
+ textFill: opts.textColor
+ },
+ zlevel: opts.zlevel,
+ z: 10001
+ });
+
+ arc.animateShape(true)
+ .when(1000, {
+ endAngle: PI * 3 / 2
+ })
+ .start('circularInOut');
+ arc.animateShape(true)
+ .when(1000, {
+ startAngle: PI * 3 / 2
+ })
+ .delay(300)
+ .start('circularInOut');
+
+ var group = new graphic.Group();
+ group.add(arc);
+ group.add(labelRect);
+ group.add(mask);
+ // Inject resize
+ group.resize = function () {
+ var cx = api.getWidth() / 2;
+ var cy = api.getHeight() / 2;
+ arc.setShape({
+ cx: cx,
+ cy: cy
+ });
+ var r = arc.shape.r;
+ labelRect.setShape({
+ x: cx - r,
+ y: cy - r,
+ width: r * 2,
+ height: r * 2
+ });
+
+ mask.setShape({
+ x: 0,
+ y: 0,
+ width: api.getWidth(),
+ height: api.getHeight()
+ });
+ };
+ group.resize();
+ return group;
+ };
+
+
+/***/ },
+/* 88 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+ var Gradient = __webpack_require__(4);
+ module.exports = function (seriesType, styleType, ecModel) {
+ function encodeColor(seriesModel) {
+ var colorAccessPath = [styleType, 'normal', 'color'];
+ var colorList = ecModel.get('color');
+ var data = seriesModel.getData();
+ var color = seriesModel.get(colorAccessPath) // Set in itemStyle
+ || colorList[seriesModel.seriesIndex % colorList.length]; // Default color
+
+ // FIXME Set color function or use the platte color
+ data.setVisual('color', color);
+
+ // Only visible series has each data be visual encoded
+ if (!ecModel.isSeriesFiltered(seriesModel)) {
+ if (typeof color === 'function' && !(color instanceof Gradient)) {
+ data.each(function (idx) {
+ data.setItemVisual(
+ idx, 'color', color(seriesModel.getDataParams(idx))
+ );
+ });
+ }
+
+ data.each(function (idx) {
+ var itemModel = data.getItemModel(idx);
+ var color = itemModel.get(colorAccessPath, true);
+ if (color != null) {
+ data.setItemVisual(idx, 'color', color);
+ }
+ });
+ }
+ }
+ seriesType ? ecModel.eachSeriesByType(seriesType, encodeColor)
+ : ecModel.eachSeries(encodeColor);
+ };
+
+
+/***/ },
+/* 89 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // Compatitable with 2.0
+
+
+ var zrUtil = __webpack_require__(3);
+ var compatStyle = __webpack_require__(90);
+
+ function get(opt, path) {
+ path = path.split(',');
+ var obj = opt;
+ for (var i = 0; i < path.length; i++) {
+ obj = obj && obj[path[i]];
+ if (obj == null) {
+ break;
+ }
+ }
+ return obj;
+ }
+
+ function set(opt, path, val, overwrite) {
+ path = path.split(',');
+ var obj = opt;
+ var key;
+ for (var i = 0; i < path.length - 1; i++) {
+ key = path[i];
+ if (obj[key] == null) {
+ obj[key] = {};
+ }
+ obj = obj[key];
+ }
+ if (overwrite || obj[path[i]] == null) {
+ obj[path[i]] = val;
+ }
+ }
+
+ function compatLayoutProperties(option) {
+ each(LAYOUT_PROPERTIES, function (prop) {
+ if (prop[0] in option && !(prop[1] in option)) {
+ option[prop[1]] = option[prop[0]];
+ }
+ });
+ }
+
+ var LAYOUT_PROPERTIES = [
+ ['x', 'left'], ['y', 'top'], ['x2', 'right'], ['y2', 'bottom']
+ ];
+
+ var COMPATITABLE_COMPONENTS = [
+ 'grid', 'geo', 'parallel', 'legend', 'toolbox', 'title', 'visualMap', 'dataZoom', 'timeline'
+ ];
+
+ var COMPATITABLE_SERIES = [
+ 'bar', 'boxplot', 'candlestick', 'chord', 'effectScatter',
+ 'funnel', 'gauge', 'lines', 'graph', 'heatmap', 'line', 'map', 'parallel',
+ 'pie', 'radar', 'sankey', 'scatter', 'treemap'
+ ];
+
+ var each = zrUtil.each;
+
+ module.exports = function (option) {
+ each(option.series, function (seriesOpt) {
+ if (!zrUtil.isObject(seriesOpt)) {
+ return;
+ }
+
+ var seriesType = seriesOpt.type;
+
+ compatStyle(seriesOpt);
+
+ if (seriesType === 'pie' || seriesType === 'gauge') {
+ if (seriesOpt.clockWise != null) {
+ seriesOpt.clockwise = seriesOpt.clockWise;
+ }
+ }
+ if (seriesType === 'gauge') {
+ var pointerColor = get(seriesOpt, 'pointer.color');
+ pointerColor != null
+ && set(seriesOpt, 'itemStyle.normal.color', pointerColor);
+ }
+
+ for (var i = 0; i < COMPATITABLE_SERIES.length; i++) {
+ if (COMPATITABLE_SERIES[i] === seriesOpt.type) {
+ compatLayoutProperties(seriesOpt);
+ break;
+ }
+ }
+ });
+
+ // dataRange has changed to visualMap
+ if (option.dataRange) {
+ option.visualMap = option.dataRange;
+ }
+
+ each(COMPATITABLE_COMPONENTS, function (componentName) {
+ var options = option[componentName];
+ if (options) {
+ if (!zrUtil.isArray(options)) {
+ options = [options];
+ }
+ each(options, function (option) {
+ compatLayoutProperties(option);
+ });
+ }
+ });
+ };
+
+
+/***/ },
+/* 90 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+
+ var POSSIBLE_STYLES = [
+ 'areaStyle', 'lineStyle', 'nodeStyle', 'linkStyle',
+ 'chordStyle', 'label', 'labelLine'
+ ];
+
+ function compatItemStyle(opt) {
+ var itemStyleOpt = opt && opt.itemStyle;
+ if (itemStyleOpt) {
+ zrUtil.each(POSSIBLE_STYLES, function (styleName) {
+ var normalItemStyleOpt = itemStyleOpt.normal;
+ var emphasisItemStyleOpt = itemStyleOpt.emphasis;
+ if (normalItemStyleOpt && normalItemStyleOpt[styleName]) {
+ opt[styleName] = opt[styleName] || {};
+ if (!opt[styleName].normal) {
+ opt[styleName].normal = normalItemStyleOpt[styleName];
+ }
+ else {
+ zrUtil.merge(opt[styleName].normal, normalItemStyleOpt[styleName]);
+ }
+ normalItemStyleOpt[styleName] = null;
+ }
+ if (emphasisItemStyleOpt && emphasisItemStyleOpt[styleName]) {
+ opt[styleName] = opt[styleName] || {};
+ if (!opt[styleName].emphasis) {
+ opt[styleName].emphasis = emphasisItemStyleOpt[styleName];
+ }
+ else {
+ zrUtil.merge(opt[styleName].emphasis, emphasisItemStyleOpt[styleName]);
+ }
+ emphasisItemStyleOpt[styleName] = null;
+ }
+ });
+ }
+ }
+
+ module.exports = function (seriesOpt) {
+ if (!seriesOpt) {
+ return;
+ }
+ compatItemStyle(seriesOpt);
+ compatItemStyle(seriesOpt.markPoint);
+ compatItemStyle(seriesOpt.markLine);
+ var data = seriesOpt.data;
+ if (data) {
+ for (var i = 0; i < data.length; i++) {
+ compatItemStyle(data[i]);
+ }
+ // mark point data
+ var markPoint = seriesOpt.markPoint;
+ if (markPoint && markPoint.data) {
+ var mpData = markPoint.data;
+ for (var i = 0; i < mpData.length; i++) {
+ compatItemStyle(mpData[i]);
+ }
+ }
+ // mark line data
+ var markLine = seriesOpt.markLine;
+ if (markLine && markLine.data) {
+ var mlData = markLine.data;
+ for (var i = 0; i < mlData.length; i++) {
+ if (zrUtil.isArray(mlData[i])) {
+ compatItemStyle(mlData[i][0]);
+ compatItemStyle(mlData[i][1]);
+ }
+ else {
+ compatItemStyle(mlData[i]);
+ }
+ }
+ }
+ }
+ };
+
+
+/***/ },
+/* 91 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var echarts = __webpack_require__(1);
+
+ __webpack_require__(92);
+ __webpack_require__(97);
+
+ echarts.registerVisualCoding('chart', zrUtil.curry(
+ __webpack_require__(103), 'line', 'circle', 'line'
+ ));
+ echarts.registerLayout(zrUtil.curry(
+ __webpack_require__(104), 'line'
+ ));
+
+ // Down sample after filter
+ echarts.registerProcessor('statistic', zrUtil.curry(
+ __webpack_require__(105), 'line'
+ ));
+
+ // In case developer forget to include grid component
+ __webpack_require__(106);
+
+
+/***/ },
+/* 92 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var createListFromArray = __webpack_require__(93);
+ var SeriesModel = __webpack_require__(27);
+
+ module.exports = SeriesModel.extend({
+
+ type: 'series.line',
+
+ dependencies: ['grid', 'polar'],
+
+ getInitialData: function (option, ecModel) {
+ return createListFromArray(option.data, this, ecModel);
+ },
+
+ defaultOption: {
+ zlevel: 0, // 一级层å 
+ z: 2, // 二级层å 
+ coordinateSystem: 'cartesian2d',
+ legendHoverLink: true,
+
+ hoverAnimation: true,
+ // stack: null
+ xAxisIndex: 0,
+ yAxisIndex: 0,
+
+ polarIndex: 0,
+
+ // If clip the overflow value
+ clipOverflow: true,
+
+ label: {
+ normal: {
+ // show: false,
+ position: 'top'
+ // formatter: 标签文本格å¼å™¨ï¼ŒåŒTooltip.formatter,ä¸æ”¯æŒå¼‚步回调
+ // position: 默认自适应,水平布局为'top',垂直布局为'right',å¯é€‰ä¸º
+ // 'inside'|'left'|'right'|'top'|'bottom'
+ // textStyle: null // 默认使用全局文本样å¼ï¼Œè¯¦è§TEXTSTYLE
+ }
+ // emphasis: {
+ // show: false,
+ // position: 'top'
+ // formatter: 标签文本格å¼å™¨ï¼ŒåŒTooltip.formatter,ä¸æ”¯æŒå¼‚步回调
+ // position: 默认自适应,水平布局为'top',垂直布局为'right',å¯é€‰ä¸º
+ // 'inside'|'left'|'right'|'top'|'bottom'
+ // textStyle: null // 默认使用全局文本样å¼ï¼Œè¯¦è§TEXTSTYLE
+ // }
+ },
+ // itemStyle: {
+ // normal: {
+ // // color: å„异
+ // },
+ // emphasis: {
+ // // color: å„异,
+ // }
+ // },
+ lineStyle: {
+ normal: {
+ width: 2,
+ type: 'solid'
+ }
+ },
+ // areaStyle: {
+ // },
+ // smooth: false,
+ // smoothMonotone: null,
+ // æ‹ç‚¹å›¾å½¢ç±»åž‹
+ symbol: 'emptyCircle',
+ // æ‹ç‚¹å›¾å½¢å¤§å°
+ symbolSize: 4,
+ // æ‹ç‚¹å›¾å½¢æ—‹è½¬æŽ§åˆ¶
+ // symbolRotate: null,
+
+ // 是å¦æ˜¾ç¤º symbol, åªæœ‰åœ¨ tooltip hover 的时候显示
+ showSymbol: true,
+ // 标志图形默认åªæœ‰ä¸»è½´æ˜¾ç¤ºï¼ˆéšä¸»è½´æ ‡ç­¾é—´éš”éšè—策略)
+ // showAllSymbol: false
+ //
+ // 大数æ®è¿‡æ»¤ï¼Œ'average', 'max', 'min', 'sum'
+ // sampling: 'none'
+
+ animationEasing: 'linear'
+ }
+ });
+
+
+/***/ },
+/* 93 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var List = __webpack_require__(94);
+ var completeDimensions = __webpack_require__(96);
+ var zrUtil = __webpack_require__(3);
+ var modelUtil = __webpack_require__(5);
+ var CoordinateSystem = __webpack_require__(25);
+ var getDataItemValue = modelUtil.getDataItemValue;
+ var converDataValue = modelUtil.converDataValue;
+
+ function firstDataNotNull(data) {
+ var i = 0;
+ while (i < data.length && data[i] == null) {
+ i++;
+ }
+ return data[i];
+ }
+ function ifNeedCompleteOrdinalData(data) {
+ var sampleItem = firstDataNotNull(data);
+ return sampleItem != null
+ && !zrUtil.isArray(getDataItemValue(sampleItem));
+ }
+
+ /**
+ * Helper function to create a list from option data
+ */
+ function createListFromArray(data, seriesModel, ecModel) {
+ // If data is undefined
+ data = data || [];
+
+ var coordSysName = seriesModel.get('coordinateSystem');
+ var creator = creators[coordSysName];
+ var registeredCoordSys = CoordinateSystem.get(coordSysName);
+ // FIXME
+ var result = creator && creator(data, seriesModel, ecModel);
+ var dimensions = result && result.dimensions;
+ if (!dimensions) {
+ // Get dimensions from registered coordinate system
+ dimensions = (registeredCoordSys && registeredCoordSys.dimensions) || ['x', 'y'];
+ dimensions = completeDimensions(dimensions, data, dimensions.concat(['value']));
+ }
+ var categoryAxisModel = result && result.categoryAxisModel;
+
+ var categoryDimIndex = dimensions[0].type === 'ordinal'
+ ? 0 : (dimensions[1].type === 'ordinal' ? 1 : -1);
+
+ var list = new List(dimensions, seriesModel);
+
+ var nameList = createNameList(result, data);
+
+ var dimValueGetter = (categoryAxisModel && ifNeedCompleteOrdinalData(data))
+ ? function (itemOpt, dimName, dataIndex, dimIndex) {
+ // Use dataIndex as ordinal value in categoryAxis
+ return dimIndex === categoryDimIndex
+ ? dataIndex
+ : converDataValue(getDataItemValue(itemOpt), dimensions[dimIndex]);
+ }
+ : function (itemOpt, dimName, dataIndex, dimIndex) {
+ var val = getDataItemValue(itemOpt);
+ return converDataValue(val && val[dimIndex], dimensions[dimIndex]);
+ };
+
+ list.initData(data, nameList, dimValueGetter);
+
+ return list;
+ }
+
+ function isStackable(axisType) {
+ return axisType !== 'category' && axisType !== 'time';
+ }
+
+ function getDimTypeByAxis(axisType) {
+ return axisType === 'category'
+ ? 'ordinal'
+ : axisType === 'time'
+ ? 'time'
+ : 'float';
+ }
+
+ /**
+ * Creaters for each coord system.
+ * @return {Object} {dimensions, categoryAxisModel};
+ */
+ var creators = {
+
+ cartesian2d: function (data, seriesModel, ecModel) {
+ var xAxisModel = ecModel.getComponent('xAxis', seriesModel.get('xAxisIndex'));
+ var yAxisModel = ecModel.getComponent('yAxis', seriesModel.get('yAxisIndex'));
+ var xAxisType = xAxisModel.get('type');
+ var yAxisType = yAxisModel.get('type');
+
+ var dimensions = [
+ {
+ name: 'x',
+ type: getDimTypeByAxis(xAxisType),
+ stackable: isStackable(xAxisType)
+ },
+ {
+ name: 'y',
+ // If two category axes
+ type: getDimTypeByAxis(yAxisType),
+ stackable: isStackable(yAxisType)
+ }
+ ];
+
+ var isXAxisCateogry = xAxisType === 'category';
+
+ completeDimensions(dimensions, data, ['x', 'y', 'z']);
+
+ return {
+ dimensions: dimensions,
+ categoryIndex: isXAxisCateogry ? 0 : 1,
+ categoryAxisModel: isXAxisCateogry
+ ? xAxisModel
+ : (yAxisType === 'category' ? yAxisModel : null)
+ };
+ },
+
+ polar: function (data, seriesModel, ecModel) {
+ var polarIndex = seriesModel.get('polarIndex') || 0;
+
+ var axisFinder = function (axisModel) {
+ return axisModel.get('polarIndex') === polarIndex;
+ };
+
+ var angleAxisModel = ecModel.findComponents({
+ mainType: 'angleAxis', filter: axisFinder
+ })[0];
+ var radiusAxisModel = ecModel.findComponents({
+ mainType: 'radiusAxis', filter: axisFinder
+ })[0];
+
+ var radiusAxisType = radiusAxisModel.get('type');
+ var angleAxisType = angleAxisModel.get('type');
+
+ var dimensions = [
+ {
+ name: 'radius',
+ type: getDimTypeByAxis(radiusAxisType),
+ stackable: isStackable(radiusAxisType)
+ },
+ {
+ name: 'angle',
+ type: getDimTypeByAxis(angleAxisType),
+ stackable: isStackable(angleAxisType)
+ }
+ ];
+ var isAngleAxisCateogry = angleAxisType === 'category';
+
+ completeDimensions(dimensions, data, ['radius', 'angle', 'value']);
+
+ return {
+ dimensions: dimensions,
+ categoryIndex: isAngleAxisCateogry ? 1 : 0,
+ categoryAxisModel: isAngleAxisCateogry
+ ? angleAxisModel
+ : (radiusAxisType === 'category' ? radiusAxisModel : null)
+ };
+ },
+
+ geo: function (data, seriesModel, ecModel) {
+ // TODO Region
+ // 多个散点图系列在åŒä¸€ä¸ªåœ°åŒºçš„时候
+ return {
+ dimensions: completeDimensions([
+ {name: 'lng'},
+ {name: 'lat'}
+ ], data, ['lng', 'lat', 'value'])
+ };
+ }
+ };
+
+ function createNameList(result, data) {
+ var nameList = [];
+
+ if (result && result.categoryAxisModel) {
+ // FIXME Two category axis
+ var categories = result.categoryAxisModel.getCategories();
+ if (categories) {
+ var dataLen = data.length;
+ // Ordered data is given explicitly like
+ // [[3, 0.2], [1, 0.3], [2, 0.15]]
+ // or given scatter data,
+ // pick the category
+ if (zrUtil.isArray(data[0]) && data[0].length > 1) {
+ nameList = [];
+ for (var i = 0; i < dataLen; i++) {
+ nameList[i] = categories[data[i][result.categoryIndex || 0]];
+ }
+ }
+ else {
+ nameList = categories.slice(0);
+ }
+ }
+ }
+
+ return nameList;
+ }
+
+ module.exports = createListFromArray;
+
+
+
+/***/ },
+/* 94 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(global) {/**
+ * List for data storage
+ * @module echarts/data/List
+ */
+
+
+ var UNDEFINED = 'undefined';
+ var globalObj = typeof window === 'undefined' ? global : window;
+ var Float64Array = typeof globalObj.Float64Array === UNDEFINED
+ ? Array : globalObj.Float64Array;
+ var Int32Array = typeof globalObj.Int32Array === UNDEFINED
+ ? Array : globalObj.Int32Array;
+
+ var dataCtors = {
+ 'float': Float64Array,
+ 'int': Int32Array,
+ // Ordinal data type can be string or int
+ 'ordinal': Array,
+ 'number': Array,
+ 'time': Array
+ };
+
+ var Model = __webpack_require__(8);
+ var DataDiffer = __webpack_require__(95);
+
+ var zrUtil = __webpack_require__(3);
+ var modelUtil = __webpack_require__(5);
+ var isObject = zrUtil.isObject;
+
+ var IMMUTABLE_PROPERTIES = [
+ 'stackedOn', '_nameList', '_idList', '_rawData'
+ ];
+
+ var transferImmuProperties = function (a, b, wrappedMethod) {
+ zrUtil.each(IMMUTABLE_PROPERTIES.concat(wrappedMethod || []), function (propName) {
+ if (b.hasOwnProperty(propName)) {
+ a[propName] = b[propName];
+ }
+ });
+ };
+
+ /**
+ * @constructor
+ * @alias module:echarts/data/List
+ *
+ * @param {Array.<string>} dimensions
+ * Dimensions should be concrete names like x, y, z, lng, lat, angle, radius
+ * @param {module:echarts/model/Model} hostModel
+ */
+ var List = function (dimensions, hostModel) {
+
+ dimensions = dimensions || ['x', 'y'];
+
+ var dimensionInfos = {};
+ var dimensionNames = [];
+ for (var i = 0; i < dimensions.length; i++) {
+ var dimensionName;
+ var dimensionInfo = {};
+ if (typeof dimensions[i] === 'string') {
+ dimensionName = dimensions[i];
+ dimensionInfo = {
+ name: dimensionName,
+ stackable: false,
+ // Type can be 'float', 'int', 'number'
+ // Default is number, Precision of float may not enough
+ type: 'number'
+ };
+ }
+ else {
+ dimensionInfo = dimensions[i];
+ dimensionName = dimensionInfo.name;
+ dimensionInfo.type = dimensionInfo.type || 'number';
+ }
+ dimensionNames.push(dimensionName);
+ dimensionInfos[dimensionName] = dimensionInfo;
+ }
+ /**
+ * @readOnly
+ * @type {Array.<string>}
+ */
+ this.dimensions = dimensionNames;
+
+ /**
+ * Infomation of each data dimension, like data type.
+ * @type {Object}
+ */
+ this._dimensionInfos = dimensionInfos;
+
+ /**
+ * @type {module:echarts/model/Model}
+ */
+ this.hostModel = hostModel;
+
+ /**
+ * Indices stores the indices of data subset after filtered.
+ * This data subset will be used in chart.
+ * @type {Array.<number>}
+ * @readOnly
+ */
+ this.indices = [];
+
+ /**
+ * Data storage
+ * @type {Object.<key, TypedArray|Array>}
+ * @private
+ */
+ this._storage = {};
+
+ /**
+ * @type {Array.<string>}
+ */
+ this._nameList = [];
+ /**
+ * @type {Array.<string>}
+ */
+ this._idList = [];
+ /**
+ * Models of data option is stored sparse for optimizing memory cost
+ * @type {Array.<module:echarts/model/Model>}
+ * @private
+ */
+ this._optionModels = [];
+
+ /**
+ * @param {module:echarts/data/List}
+ */
+ this.stackedOn = null;
+
+ /**
+ * Global visual properties after visual coding
+ * @type {Object}
+ * @private
+ */
+ this._visual = {};
+
+ /**
+ * Globel layout properties.
+ * @type {Object}
+ * @private
+ */
+ this._layout = {};
+
+ /**
+ * Item visual properties after visual coding
+ * @type {Array.<Object>}
+ * @private
+ */
+ this._itemVisuals = [];
+
+ /**
+ * Item layout properties after layout
+ * @type {Array.<Object>}
+ * @private
+ */
+ this._itemLayouts = [];
+
+ /**
+ * Graphic elemnents
+ * @type {Array.<module:zrender/Element>}
+ * @private
+ */
+ this._graphicEls = [];
+
+ /**
+ * @type {Array.<Array|Object>}
+ * @private
+ */
+ this._rawData;
+
+ /**
+ * @type {Object}
+ * @private
+ */
+ this._extent;
+ };
+
+ var listProto = List.prototype;
+
+ listProto.type = 'list';
+
+ /**
+ * Get dimension name
+ * @param {string|number} dim
+ * Dimension can be concrete names like x, y, z, lng, lat, angle, radius
+ * Or a ordinal number. For example getDimensionInfo(0) will return 'x' or 'lng' or 'radius'
+ */
+ listProto.getDimension = function (dim) {
+ if (!isNaN(dim)) {
+ dim = this.dimensions[dim] || dim;
+ }
+ return dim;
+ };
+ /**
+ * Get type and stackable info of particular dimension
+ * @param {string|number} dim
+ * Dimension can be concrete names like x, y, z, lng, lat, angle, radius
+ * Or a ordinal number. For example getDimensionInfo(0) will return 'x' or 'lng' or 'radius'
+ */
+ listProto.getDimensionInfo = function (dim) {
+ return zrUtil.clone(this._dimensionInfos[this.getDimension(dim)]);
+ };
+
+ /**
+ * Initialize from data
+ * @param {Array.<Object|number|Array>} data
+ * @param {Array.<string>} [nameList]
+ * @param {Function} [dimValueGetter] (dataItem, dimName, dataIndex, dimIndex) => number
+ */
+ listProto.initData = function (data, nameList, dimValueGetter) {
+ data = data || [];
+
+ this._rawData = data;
+
+ // Clear
+ var storage = this._storage = {};
+ var indices = this.indices = [];
+
+ var dimensions = this.dimensions;
+ var size = data.length;
+ var dimensionInfoMap = this._dimensionInfos;
+
+ var idList = [];
+ var nameRepeatCount = {};
+
+ nameList = nameList || [];
+
+ // Init storage
+ for (var i = 0; i < dimensions.length; i++) {
+ var dimInfo = dimensionInfoMap[dimensions[i]];
+ var DataCtor = dataCtors[dimInfo.type];
+ storage[dimensions[i]] = new DataCtor(size);
+ }
+
+ // Default dim value getter
+ dimValueGetter = dimValueGetter || function (dataItem, dimName, dataIndex, dimIndex) {
+ var value = modelUtil.getDataItemValue(dataItem);
+ return modelUtil.converDataValue(
+ zrUtil.isArray(value)
+ ? value[dimIndex]
+ // If value is a single number or something else not array.
+ : value,
+ dimensionInfoMap[dimName]
+ );
+ };
+
+ for (var idx = 0; idx < data.length; idx++) {
+ var dataItem = data[idx];
+ // Each data item is value
+ // [1, 2]
+ // 2
+ // Bar chart, line chart which uses category axis
+ // only gives the 'y' value. 'x' value is the indices of cateogry
+ // Use a tempValue to normalize the value to be a (x, y) value
+
+ // Store the data by dimensions
+ for (var k = 0; k < dimensions.length; k++) {
+ var dim = dimensions[k];
+ var dimStorage = storage[dim];
+ // PENDING NULL is empty or zero
+ dimStorage[idx] = dimValueGetter(dataItem, dim, idx, k);
+ }
+
+ indices.push(idx);
+ }
+
+ // Use the name in option and create id
+ for (var i = 0; i < data.length; i++) {
+ var id = '';
+ if (!nameList[i]) {
+ nameList[i] = data[i].name;
+ // Try using the id in option
+ id = data[i].id;
+ }
+ var name = nameList[i] || '';
+ if (!id && name) {
+ // Use name as id and add counter to avoid same name
+ nameRepeatCount[name] = nameRepeatCount[name] || 0;
+ id = name;
+ if (nameRepeatCount[name] > 0) {
+ id += '__ec__' + nameRepeatCount[name];
+ }
+ nameRepeatCount[name]++;
+ }
+ id && (idList[i] = id);
+ }
+
+ this._nameList = nameList;
+ this._idList = idList;
+ };
+
+ /**
+ * @return {number}
+ */
+ listProto.count = function () {
+ return this.indices.length;
+ };
+
+ /**
+ * Get value. Return NaN if idx is out of range.
+ * @param {string} dim Dim must be concrete name.
+ * @param {number} idx
+ * @param {boolean} stack
+ * @return {number}
+ */
+ listProto.get = function (dim, idx, stack) {
+ var storage = this._storage;
+ var dataIndex = this.indices[idx];
+
+ // If value not exists
+ if (dataIndex == null) {
+ return NaN;
+ }
+
+ var value = storage[dim] && storage[dim][dataIndex];
+ // FIXME ordinal data type is not stackable
+ if (stack) {
+ var dimensionInfo = this._dimensionInfos[dim];
+ if (dimensionInfo && dimensionInfo.stackable) {
+ var stackedOn = this.stackedOn;
+ while (stackedOn) {
+ // Get no stacked data of stacked on
+ var stackedValue = stackedOn.get(dim, idx);
+ // Considering positive stack, negative stack and empty data
+ if ((value >= 0 && stackedValue > 0) // Positive stack
+ || (value <= 0 && stackedValue < 0) // Negative stack
+ ) {
+ value += stackedValue;
+ }
+ stackedOn = stackedOn.stackedOn;
+ }
+ }
+ }
+ return value;
+ };
+
+ /**
+ * Get value for multi dimensions.
+ * @param {Array.<string>} [dimensions] If ignored, using all dimensions.
+ * @param {number} idx
+ * @param {boolean} stack
+ * @return {number}
+ */
+ listProto.getValues = function (dimensions, idx, stack) {
+ var values = [];
+
+ if (!zrUtil.isArray(dimensions)) {
+ stack = idx;
+ idx = dimensions;
+ dimensions = this.dimensions;
+ }
+
+ for (var i = 0, len = dimensions.length; i < len; i++) {
+ values.push(this.get(dimensions[i], idx, stack));
+ }
+
+ return values;
+ };
+
+ /**
+ * If value is NaN. Inlcuding '-'
+ * @param {string} dim
+ * @param {number} idx
+ * @return {number}
+ */
+ listProto.hasValue = function (idx) {
+ var dimensions = this.dimensions;
+ var dimensionInfos = this._dimensionInfos;
+ for (var i = 0, len = dimensions.length; i < len; i++) {
+ if (
+ // Ordinal type can be string or number
+ dimensionInfos[dimensions[i]].type !== 'ordinal'
+ && isNaN(this.get(dimensions[i], idx))
+ ) {
+ return false;
+ }
+ }
+ return true;
+ };
+
+ /**
+ * Get extent of data in one dimension
+ * @param {string} dim
+ * @param {boolean} stack
+ */
+ listProto.getDataExtent = function (dim, stack) {
+ var dimData = this._storage[dim];
+ var dimInfo = this.getDimensionInfo(dim);
+ stack = (dimInfo && dimInfo.stackable) && stack;
+ var dimExtent = (this._extent || (this._extent = {}))[dim + (!!stack)];
+ var value;
+ if (dimExtent) {
+ return dimExtent;
+ }
+ // var dimInfo = this._dimensionInfos[dim];
+ if (dimData) {
+ var min = Infinity;
+ var max = -Infinity;
+ // var isOrdinal = dimInfo.type === 'ordinal';
+ for (var i = 0, len = this.count(); i < len; i++) {
+ value = this.get(dim, i, stack);
+ // FIXME
+ // if (isOrdinal && typeof value === 'string') {
+ // value = zrUtil.indexOf(dimData, value);
+ // console.log(value);
+ // }
+ value < min && (min = value);
+ value > max && (max = value);
+ }
+ return (this._extent[dim + stack] = [min, max]);
+ }
+ else {
+ return [Infinity, -Infinity];
+ }
+ };
+
+ /**
+ * Get sum of data in one dimension
+ * @param {string} dim
+ * @param {boolean} stack
+ */
+ listProto.getSum = function (dim, stack) {
+ var dimData = this._storage[dim];
+ var sum = 0;
+ if (dimData) {
+ for (var i = 0, len = this.count(); i < len; i++) {
+ var value = this.get(dim, i, stack);
+ if (!isNaN(value)) {
+ sum += value;
+ }
+ }
+ }
+ return sum;
+ };
+
+ /**
+ * Retreive the index with given value
+ * @param {number} idx
+ * @param {number} value
+ * @return {number}
+ */
+ // FIXME Precision of float value
+ listProto.indexOf = function (dim, value) {
+ var storage = this._storage;
+ var dimData = storage[dim];
+ var indices = this.indices;
+
+ if (dimData) {
+ for (var i = 0, len = indices.length; i < len; i++) {
+ var rawIndex = indices[i];
+ if (dimData[rawIndex] === value) {
+ return i;
+ }
+ }
+ }
+ return -1;
+ };
+
+ /**
+ * Retreive the index with given name
+ * @param {number} idx
+ * @param {number} name
+ * @return {number}
+ */
+ listProto.indexOfName = function (name) {
+ var indices = this.indices;
+ var nameList = this._nameList;
+
+ for (var i = 0, len = indices.length; i < len; i++) {
+ var rawIndex = indices[i];
+ if (nameList[rawIndex] === name) {
+ return i;
+ }
+ }
+
+ return -1;
+ };
+
+ /**
+ * Retreive the index of nearest value
+ * @param {string>} dim
+ * @param {number} value
+ * @param {boolean} stack If given value is after stacked
+ * @return {number}
+ */
+ listProto.indexOfNearest = function (dim, value, stack) {
+ var storage = this._storage;
+ var dimData = storage[dim];
+
+ if (dimData) {
+ var minDist = Number.MAX_VALUE;
+ var nearestIdx = -1;
+ for (var i = 0, len = this.count(); i < len; i++) {
+ var diff = value - this.get(dim, i, stack);
+ var dist = Math.abs(diff);
+ if (dist < minDist
+ // For the case of two data are same on xAxis, which has sequence data.
+ // Show the nearest index
+ // https://github.com/ecomfe/echarts/issues/2869
+ || (dist === minDist && diff > 0)
+ ) {
+ minDist = dist;
+ nearestIdx = i;
+ }
+ }
+ return nearestIdx;
+ }
+ return -1;
+ };
+
+ /**
+ * Get raw data index
+ * @param {number} idx
+ * @return {number}
+ */
+ listProto.getRawIndex = function (idx) {
+ var rawIdx = this.indices[idx];
+ return rawIdx == null ? -1 : rawIdx;
+ };
+
+ /**
+ * @param {number} idx
+ * @param {boolean} [notDefaultIdx=false]
+ * @return {string}
+ */
+ listProto.getName = function (idx) {
+ return this._nameList[this.indices[idx]] || '';
+ };
+
+ /**
+ * @param {number} idx
+ * @param {boolean} [notDefaultIdx=false]
+ * @return {string}
+ */
+ listProto.getId = function (idx) {
+ return this._idList[this.indices[idx]] || (this.getRawIndex(idx) + '');
+ };
+
+
+ function normalizeDimensions(dimensions) {
+ if (!zrUtil.isArray(dimensions)) {
+ dimensions = [dimensions];
+ }
+ return dimensions;
+ }
+
+ /**
+ * Data iteration
+ * @param {string|Array.<string>}
+ * @param {Function} cb
+ * @param {boolean} [stack=false]
+ * @param {*} [context=this]
+ *
+ * @example
+ * list.each('x', function (x, idx) {});
+ * list.each(['x', 'y'], function (x, y, idx) {});
+ * list.each(function (idx) {})
+ */
+ listProto.each = function (dimensions, cb, stack, context) {
+ if (typeof dimensions === 'function') {
+ context = stack;
+ stack = cb;
+ cb = dimensions;
+ dimensions = [];
+ }
+
+ dimensions = zrUtil.map(
+ normalizeDimensions(dimensions), this.getDimension, this
+ );
+
+ var value = [];
+ var dimSize = dimensions.length;
+ var indices = this.indices;
+
+ context = context || this;
+
+ for (var i = 0; i < indices.length; i++) {
+ if (dimSize === 0) {
+ cb.call(context, i);
+ }
+ // Simple optimization
+ else if (dimSize === 1) {
+ cb.call(context, this.get(dimensions[0], i, stack), i);
+ }
+ else {
+ for (var k = 0; k < dimSize; k++) {
+ value[k] = this.get(dimensions[k], i, stack);
+ }
+ // Index
+ value[k] = i;
+ cb.apply(context, value);
+ }
+ }
+ };
+
+ /**
+ * Data filter
+ * @param {string|Array.<string>}
+ * @param {Function} cb
+ * @param {boolean} [stack=false]
+ * @param {*} [context=this]
+ */
+ listProto.filterSelf = function (dimensions, cb, stack, context) {
+ if (typeof dimensions === 'function') {
+ context = stack;
+ stack = cb;
+ cb = dimensions;
+ dimensions = [];
+ }
+
+ dimensions = zrUtil.map(
+ normalizeDimensions(dimensions), this.getDimension, this
+ );
+
+ var newIndices = [];
+ var value = [];
+ var dimSize = dimensions.length;
+ var indices = this.indices;
+
+ context = context || this;
+
+ for (var i = 0; i < indices.length; i++) {
+ var keep;
+ // Simple optimization
+ if (dimSize === 1) {
+ keep = cb.call(
+ context, this.get(dimensions[0], i, stack), i
+ );
+ }
+ else {
+ for (var k = 0; k < dimSize; k++) {
+ value[k] = this.get(dimensions[k], i, stack);
+ }
+ value[k] = i;
+ keep = cb.apply(context, value);
+ }
+ if (keep) {
+ newIndices.push(indices[i]);
+ }
+ }
+
+ this.indices = newIndices;
+
+ // Reset data extent
+ this._extent = {};
+
+ return this;
+ };
+
+ /**
+ * Data mapping to a plain array
+ * @param {string|Array.<string>} [dimensions]
+ * @param {Function} cb
+ * @param {boolean} [stack=false]
+ * @param {*} [context=this]
+ * @return {Array}
+ */
+ listProto.mapArray = function (dimensions, cb, stack, context) {
+ if (typeof dimensions === 'function') {
+ context = stack;
+ stack = cb;
+ cb = dimensions;
+ dimensions = [];
+ }
+
+ var result = [];
+ this.each(dimensions, function () {
+ result.push(cb && cb.apply(this, arguments));
+ }, stack, context);
+ return result;
+ };
+
+ function cloneListForMapAndSample(original, excludeDimensions) {
+ var allDimensions = original.dimensions;
+ var list = new List(
+ zrUtil.map(allDimensions, original.getDimensionInfo, original),
+ original.hostModel
+ );
+ // FIXME If needs stackedOn, value may already been stacked
+ transferImmuProperties(list, original, original._wrappedMethods);
+
+ var storage = list._storage = {};
+ var originalStorage = original._storage;
+ // Init storage
+ for (var i = 0; i < allDimensions.length; i++) {
+ var dim = allDimensions[i];
+ var dimStore = originalStorage[dim];
+ if (zrUtil.indexOf(excludeDimensions, dim) >= 0) {
+ storage[dim] = new dimStore.constructor(
+ originalStorage[dim].length
+ );
+ }
+ else {
+ // Direct reference for other dimensions
+ storage[dim] = originalStorage[dim];
+ }
+ }
+ return list;
+ }
+
+ /**
+ * Data mapping to a new List with given dimensions
+ * @param {string|Array.<string>} dimensions
+ * @param {Function} cb
+ * @param {boolean} [stack=false]
+ * @param {*} [context=this]
+ * @return {Array}
+ */
+ listProto.map = function (dimensions, cb, stack, context) {
+ dimensions = zrUtil.map(
+ normalizeDimensions(dimensions), this.getDimension, this
+ );
+
+ var list = cloneListForMapAndSample(this, dimensions);
+ // Following properties are all immutable.
+ // So we can reference to the same value
+ var indices = list.indices = this.indices;
+
+ var storage = list._storage;
+
+ var tmpRetValue = [];
+ this.each(dimensions, function () {
+ var idx = arguments[arguments.length - 1];
+ var retValue = cb && cb.apply(this, arguments);
+ if (retValue != null) {
+ // a number
+ if (typeof retValue === 'number') {
+ tmpRetValue[0] = retValue;
+ retValue = tmpRetValue;
+ }
+ for (var i = 0; i < retValue.length; i++) {
+ var dim = dimensions[i];
+ var dimStore = storage[dim];
+ var rawIdx = indices[idx];
+ if (dimStore) {
+ dimStore[rawIdx] = retValue[i];
+ }
+ }
+ }
+ }, stack, context);
+
+ return list;
+ };
+
+ /**
+ * Large data down sampling on given dimension
+ * @param {string} dimension
+ * @param {number} rate
+ * @param {Function} sampleValue
+ * @param {Function} sampleIndex Sample index for name and id
+ */
+ listProto.downSample = function (dimension, rate, sampleValue, sampleIndex) {
+ var list = cloneListForMapAndSample(this, [dimension]);
+ var storage = this._storage;
+ var targetStorage = list._storage;
+
+ var originalIndices = this.indices;
+ var indices = list.indices = [];
+
+ var frameValues = [];
+ var frameIndices = [];
+ var frameSize = Math.floor(1 / rate);
+
+ var dimStore = targetStorage[dimension];
+ var len = this.count();
+ // Copy data from original data
+ for (var i = 0; i < storage[dimension].length; i++) {
+ targetStorage[dimension][i] = storage[dimension][i];
+ }
+ for (var i = 0; i < len; i += frameSize) {
+ // Last frame
+ if (frameSize > len - i) {
+ frameSize = len - i;
+ frameValues.length = frameSize;
+ }
+ for (var k = 0; k < frameSize; k++) {
+ var idx = originalIndices[i + k];
+ frameValues[k] = dimStore[idx];
+ frameIndices[k] = idx;
+ }
+ var value = sampleValue(frameValues);
+ var idx = frameIndices[sampleIndex(frameValues, value) || 0];
+ // Only write value on the filtered data
+ dimStore[idx] = value;
+ indices.push(idx);
+ }
+ return list;
+ };
+
+ /**
+ * Get model of one data item.
+ *
+ * @param {number} idx
+ */
+ // FIXME Model proxy ?
+ listProto.getItemModel = function (idx) {
+ var hostModel = this.hostModel;
+ idx = this.indices[idx];
+ return new Model(this._rawData[idx], hostModel, hostModel.ecModel);
+ };
+
+ /**
+ * Create a data differ
+ * @param {module:echarts/data/List} otherList
+ * @return {module:echarts/data/DataDiffer}
+ */
+ listProto.diff = function (otherList) {
+ var idList = this._idList;
+ var otherIdList = otherList && otherList._idList;
+ return new DataDiffer(
+ otherList ? otherList.indices : [], this.indices, function (idx) {
+ return otherIdList[idx] || (idx + '');
+ }, function (idx) {
+ return idList[idx] || (idx + '');
+ }
+ );
+ };
+ /**
+ * Get visual property.
+ * @param {string} key
+ */
+ listProto.getVisual = function (key) {
+ var visual = this._visual;
+ return visual && visual[key];
+ };
+
+ /**
+ * Set visual property
+ * @param {string|Object} key
+ * @param {*} [value]
+ *
+ * @example
+ * setVisual('color', color);
+ * setVisual({
+ * 'color': color
+ * });
+ */
+ listProto.setVisual = function (key, val) {
+ if (isObject(key)) {
+ for (var name in key) {
+ if (key.hasOwnProperty(name)) {
+ this.setVisual(name, key[name]);
+ }
+ }
+ return;
+ }
+ this._visual = this._visual || {};
+ this._visual[key] = val;
+ };
+
+ /**
+ * Set layout property.
+ * @param {string} key
+ * @param {*} [val]
+ */
+ listProto.setLayout = function (key, val) {
+ if (isObject(key)) {
+ for (var name in key) {
+ if (key.hasOwnProperty(name)) {
+ this.setLayout(name, key[name]);
+ }
+ }
+ return;
+ }
+ this._layout[key] = val;
+ };
+
+ /**
+ * Get layout property.
+ * @param {string} key.
+ * @return {*}
+ */
+ listProto.getLayout = function (key) {
+ return this._layout[key];
+ };
+
+ /**
+ * Get layout of single data item
+ * @param {number} idx
+ */
+ listProto.getItemLayout = function (idx) {
+ return this._itemLayouts[idx];
+ },
+
+ /**
+ * Set layout of single data item
+ * @param {number} idx
+ * @param {Object} layout
+ * @param {boolean=} [merge=false]
+ */
+ listProto.setItemLayout = function (idx, layout, merge) {
+ this._itemLayouts[idx] = merge
+ ? zrUtil.extend(this._itemLayouts[idx] || {}, layout)
+ : layout;
+ },
+
+ /**
+ * Get visual property of single data item
+ * @param {number} idx
+ * @param {string} key
+ * @param {boolean} ignoreParent
+ */
+ listProto.getItemVisual = function (idx, key, ignoreParent) {
+ var itemVisual = this._itemVisuals[idx];
+ var val = itemVisual && itemVisual[key];
+ if (val == null && !ignoreParent) {
+ // Use global visual property
+ return this.getVisual(key);
+ }
+ return val;
+ },
+
+ /**
+ * Set visual property of single data item
+ *
+ * @param {number} idx
+ * @param {string|Object} key
+ * @param {*} [value]
+ *
+ * @example
+ * setItemVisual(0, 'color', color);
+ * setItemVisual(0, {
+ * 'color': color
+ * });
+ */
+ listProto.setItemVisual = function (idx, key, value) {
+ var itemVisual = this._itemVisuals[idx] || {};
+ this._itemVisuals[idx] = itemVisual;
+
+ if (isObject(key)) {
+ for (var name in key) {
+ if (key.hasOwnProperty(name)) {
+ itemVisual[name] = key[name];
+ }
+ }
+ return;
+ }
+ itemVisual[key] = value;
+ };
+
+ var setItemDataAndSeriesIndex = function (child) {
+ child.seriesIndex = this.seriesIndex;
+ child.dataIndex = this.dataIndex;
+ };
+ /**
+ * Set graphic element relative to data. It can be set as null
+ * @param {number} idx
+ * @param {module:zrender/Element} [el]
+ */
+ listProto.setItemGraphicEl = function (idx, el) {
+ var hostModel = this.hostModel;
+
+ if (el) {
+ // Add data index and series index for indexing the data by element
+ // Useful in tooltip
+ el.dataIndex = idx;
+ el.seriesIndex = hostModel && hostModel.seriesIndex;
+ if (el.type === 'group') {
+ el.traverse(setItemDataAndSeriesIndex, el);
+ }
+ }
+
+ this._graphicEls[idx] = el;
+ };
+
+ /**
+ * @param {number} idx
+ * @return {module:zrender/Element}
+ */
+ listProto.getItemGraphicEl = function (idx) {
+ return this._graphicEls[idx];
+ };
+
+ /**
+ * @param {Function} cb
+ * @param {*} context
+ */
+ listProto.eachItemGraphicEl = function (cb, context) {
+ zrUtil.each(this._graphicEls, function (el, idx) {
+ if (el) {
+ cb && cb.call(context, el, idx);
+ }
+ });
+ };
+
+ /**
+ * Shallow clone a new list except visual and layout properties, and graph elements.
+ * New list only change the indices.
+ */
+ listProto.cloneShallow = function () {
+ var dimensionInfoList = zrUtil.map(this.dimensions, this.getDimensionInfo, this);
+ var list = new List(dimensionInfoList, this.hostModel);
+
+ // FIXME
+ list._storage = this._storage;
+
+ transferImmuProperties(list, this, this._wrappedMethods);
+
+ list.indices = this.indices.slice();
+
+ return list;
+ };
+
+ /**
+ * Wrap some method to add more feature
+ * @param {string} methodName
+ * @param {Function} injectFunction
+ */
+ listProto.wrapMethod = function (methodName, injectFunction) {
+ var originalMethod = this[methodName];
+ if (typeof originalMethod !== 'function') {
+ return;
+ }
+ this._wrappedMethods = this._wrappedMethods || [];
+ this._wrappedMethods.push(methodName);
+ this[methodName] = function () {
+ var res = originalMethod.apply(this, arguments);
+ return injectFunction.call(this, res);
+ };
+ };
+
+ module.exports = List;
+
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ },
+/* 95 */
+/***/ function(module, exports) {
+
+ 'use strict';
+
+
+ function defaultKeyGetter(item) {
+ return item;
+ }
+
+ function DataDiffer(oldArr, newArr, oldKeyGetter, newKeyGetter) {
+ this._old = oldArr;
+ this._new = newArr;
+
+ this._oldKeyGetter = oldKeyGetter || defaultKeyGetter;
+ this._newKeyGetter = newKeyGetter || defaultKeyGetter;
+ }
+
+ DataDiffer.prototype = {
+
+ constructor: DataDiffer,
+
+ /**
+ * Callback function when add a data
+ */
+ add: function (func) {
+ this._add = func;
+ return this;
+ },
+
+ /**
+ * Callback function when update a data
+ */
+ update: function (func) {
+ this._update = func;
+ return this;
+ },
+
+ /**
+ * Callback function when remove a data
+ */
+ remove: function (func) {
+ this._remove = func;
+ return this;
+ },
+
+ execute: function () {
+ var oldArr = this._old;
+ var newArr = this._new;
+ var oldKeyGetter = this._oldKeyGetter;
+ var newKeyGetter = this._newKeyGetter;
+
+ var oldDataIndexMap = {};
+ var newDataIndexMap = {};
+ var i;
+
+ initIndexMap(oldArr, oldDataIndexMap, oldKeyGetter);
+ initIndexMap(newArr, newDataIndexMap, newKeyGetter);
+
+ // Travel by inverted order to make sure order consistency
+ // when duplicate keys exists (consider newDataIndex.pop() below).
+ // For performance consideration, these code below do not look neat.
+ for (i = 0; i < oldArr.length; i++) {
+ var key = oldKeyGetter(oldArr[i]);
+ var idx = newDataIndexMap[key];
+
+ // idx can never be empty array here. see 'set null' logic below.
+ if (idx != null) {
+ // Consider there is duplicate key (for example, use dataItem.name as key).
+ // We should make sure every item in newArr and oldArr can be visited.
+ var len = idx.length;
+ if (len) {
+ len === 1 && (newDataIndexMap[key] = null);
+ idx = idx.unshift();
+ }
+ else {
+ newDataIndexMap[key] = null;
+ }
+ this._update && this._update(idx, i);
+ }
+ else {
+ this._remove && this._remove(i);
+ }
+ }
+
+ for (var key in newDataIndexMap) {
+ if (newDataIndexMap.hasOwnProperty(key)) {
+ var idx = newDataIndexMap[key];
+ if (idx == null) {
+ continue;
+ }
+ // idx can never be empty array here. see 'set null' logic above.
+ if (!idx.length) {
+ this._add && this._add(idx);
+ }
+ else {
+ for (var i = 0, len = idx.length; i < len; i++) {
+ this._add && this._add(idx[i]);
+ }
+ }
+ }
+ }
+ }
+ };
+
+ function initIndexMap(arr, map, keyGetter) {
+ for (var i = 0; i < arr.length; i++) {
+ var key = keyGetter(arr[i]);
+ var existence = map[key];
+ if (existence == null) {
+ map[key] = i;
+ }
+ else {
+ if (!existence.length) {
+ map[key] = existence = [existence];
+ }
+ existence.push(i);
+ }
+ }
+ }
+
+ module.exports = DataDiffer;
+
+
+/***/ },
+/* 96 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Complete dimensions by data (guess dimension).
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+
+ /**
+ * Complete the dimensions array guessed from the data structure.
+ * @param {Array.<string>} dimensions Necessary dimensions, like ['x', 'y']
+ * @param {Array} data Data list. [[1, 2, 3], [2, 3, 4]]
+ * @param {Array.<string>} defaultNames Default names to fill not necessary dimensions, like ['value']
+ * @param {string} extraPrefix Prefix of name when filling the left dimensions.
+ * @return {Array.<string>}
+ */
+ function completeDimensions(dimensions, data, defaultNames, extraPrefix) {
+ if (!data) {
+ return dimensions;
+ }
+
+ var value0 = retrieveValue(data[0]);
+ var dimSize = zrUtil.isArray(value0) && value0.length || 1;
+
+ defaultNames = defaultNames || [];
+ extraPrefix = extraPrefix || 'extra';
+ for (var i = 0; i < dimSize; i++) {
+ if (!dimensions[i]) {
+ var name = defaultNames[i] || (extraPrefix + (i - defaultNames.length));
+ dimensions[i] = guessOrdinal(data, i)
+ ? {type: 'ordinal', name: name}
+ : name;
+ }
+ }
+
+ return dimensions;
+ }
+
+ // The rule should not be complex, otherwise user might not
+ // be able to known where the data is wrong.
+ function guessOrdinal(data, dimIndex) {
+ for (var i = 0, len = data.length; i < len; i++) {
+ var value = retrieveValue(data[i]);
+
+ if (!zrUtil.isArray(value)) {
+ return false;
+ }
+
+ var value = value[dimIndex];
+ if (value != null && isFinite(value)) {
+ return false;
+ }
+ else if (zrUtil.isString(value) && value !== '-') {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ function retrieveValue(o) {
+ return zrUtil.isArray(o) ? o : zrUtil.isObject(o) ? o.value: o;
+ }
+
+ module.exports = completeDimensions;
+
+
+
+/***/ },
+/* 97 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var zrUtil = __webpack_require__(3);
+ var SymbolDraw = __webpack_require__(98);
+ var Symbol = __webpack_require__(99);
+ var lineAnimationDiff = __webpack_require__(101);
+ var graphic = __webpack_require__(42);
+
+ var polyHelper = __webpack_require__(102);
+
+ var ChartView = __webpack_require__(41);
+
+ function isPointsSame(points1, points2) {
+ if (points1.length !== points2.length) {
+ return;
+ }
+ for (var i = 0; i < points1.length; i++) {
+ var p1 = points1[i];
+ var p2 = points2[i];
+ if (p1[0] !== p2[0] || p1[1] !== p2[1]) {
+ return;
+ }
+ }
+ return true;
+ }
+
+ function getSmooth(smooth) {
+ return typeof (smooth) === 'number' ? smooth : (smooth ? 0.3 : 0);
+ }
+
+ function getAxisExtentWithGap(axis) {
+ var extent = axis.getGlobalExtent();
+ if (axis.onBand) {
+ // Remove extra 1px to avoid line miter in clipped edge
+ var halfBandWidth = axis.getBandWidth() / 2 - 1;
+ var dir = extent[1] > extent[0] ? 1 : -1;
+ extent[0] += dir * halfBandWidth;
+ extent[1] -= dir * halfBandWidth;
+ }
+ return extent;
+ }
+
+ function sign(val) {
+ return val >= 0 ? 1 : -1;
+ }
+ /**
+ * @param {module:echarts/coord/cartesian/Cartesian2D|module:echarts/coord/polar/Polar} coordSys
+ * @param {module:echarts/data/List} data
+ * @param {Array.<Array.<number>>} points
+ * @private
+ */
+ function getStackedOnPoints(coordSys, data) {
+ var baseAxis = coordSys.getBaseAxis();
+ var valueAxis = coordSys.getOtherAxis(baseAxis);
+ var valueStart = baseAxis.onZero
+ ? 0 : valueAxis.scale.getExtent()[0];
+
+ var valueDim = valueAxis.dim;
+
+ var baseDataOffset = valueDim === 'x' || valueDim === 'radius' ? 1 : 0;
+
+ return data.mapArray([valueDim], function (val, idx) {
+ var stackedOnSameSign;
+ var stackedOn = data.stackedOn;
+ // Find first stacked value with same sign
+ while (stackedOn &&
+ sign(stackedOn.get(valueDim, idx)) === sign(val)
+ ) {
+ stackedOnSameSign = stackedOn;
+ break;
+ }
+ var stackedData = [];
+ stackedData[baseDataOffset] = data.get(baseAxis.dim, idx);
+ stackedData[1 - baseDataOffset] = stackedOnSameSign
+ ? stackedOnSameSign.get(valueDim, idx, true) : valueStart;
+
+ return coordSys.dataToPoint(stackedData);
+ }, true);
+ }
+
+ function queryDataIndex(data, payload) {
+ if (payload.dataIndex != null) {
+ return payload.dataIndex;
+ }
+ else if (payload.name != null) {
+ return data.indexOfName(payload.name);
+ }
+ }
+
+ function createGridClipShape(cartesian, hasAnimation, seriesModel) {
+ var xExtent = getAxisExtentWithGap(cartesian.getAxis('x'));
+ var yExtent = getAxisExtentWithGap(cartesian.getAxis('y'));
+ var isHorizontal = cartesian.getBaseAxis().isHorizontal();
+
+ var x = xExtent[0];
+ var y = yExtent[0];
+ var width = xExtent[1] - x;
+ var height = yExtent[1] - y;
+ // Expand clip shape to avoid line value exceeds axis
+ if (!seriesModel.get('clipOverflow')) {
+ if (isHorizontal) {
+ y -= height;
+ height *= 3;
+ }
+ else {
+ x -= width;
+ width *= 3;
+ }
+ }
+ var clipPath = new graphic.Rect({
+ shape: {
+ x: x,
+ y: y,
+ width: width,
+ height: height
+ }
+ });
+
+ if (hasAnimation) {
+ clipPath.shape[isHorizontal ? 'width' : 'height'] = 0;
+ graphic.initProps(clipPath, {
+ shape: {
+ width: width,
+ height: height
+ }
+ }, seriesModel);
+ }
+
+ return clipPath;
+ }
+
+ function createPolarClipShape(polar, hasAnimation, seriesModel) {
+ var angleAxis = polar.getAngleAxis();
+ var radiusAxis = polar.getRadiusAxis();
+
+ var radiusExtent = radiusAxis.getExtent();
+ var angleExtent = angleAxis.getExtent();
+
+ var RADIAN = Math.PI / 180;
+
+ var clipPath = new graphic.Sector({
+ shape: {
+ cx: polar.cx,
+ cy: polar.cy,
+ r0: radiusExtent[0],
+ r: radiusExtent[1],
+ startAngle: -angleExtent[0] * RADIAN,
+ endAngle: -angleExtent[1] * RADIAN,
+ clockwise: angleAxis.inverse
+ }
+ });
+
+ if (hasAnimation) {
+ clipPath.shape.endAngle = -angleExtent[0] * RADIAN;
+ graphic.initProps(clipPath, {
+ shape: {
+ endAngle: -angleExtent[1] * RADIAN
+ }
+ }, seriesModel);
+ }
+
+ return clipPath;
+ }
+
+ function createClipShape(coordSys, hasAnimation, seriesModel) {
+ return coordSys.type === 'polar'
+ ? createPolarClipShape(coordSys, hasAnimation, seriesModel)
+ : createGridClipShape(coordSys, hasAnimation, seriesModel);
+ }
+
+ module.exports = ChartView.extend({
+
+ type: 'line',
+
+ init: function () {
+ var lineGroup = new graphic.Group();
+
+ var symbolDraw = new SymbolDraw();
+ this.group.add(symbolDraw.group);
+
+ this._symbolDraw = symbolDraw;
+ this._lineGroup = lineGroup;
+ },
+
+ render: function (seriesModel, ecModel, api) {
+ var coordSys = seriesModel.coordinateSystem;
+ var group = this.group;
+ var data = seriesModel.getData();
+ var lineStyleModel = seriesModel.getModel('lineStyle.normal');
+ var areaStyleModel = seriesModel.getModel('areaStyle.normal');
+
+ var points = data.mapArray(data.getItemLayout, true);
+
+ var isCoordSysPolar = coordSys.type === 'polar';
+ var prevCoordSys = this._coordSys;
+
+ var symbolDraw = this._symbolDraw;
+ var polyline = this._polyline;
+ var polygon = this._polygon;
+
+ var lineGroup = this._lineGroup;
+
+ var hasAnimation = seriesModel.get('animation');
+
+ var isAreaChart = !areaStyleModel.isEmpty();
+ var stackedOnPoints = getStackedOnPoints(coordSys, data);
+
+ var showSymbol = seriesModel.get('showSymbol');
+
+ var isSymbolIgnore = showSymbol && !isCoordSysPolar && !seriesModel.get('showAllSymbol')
+ && this._getSymbolIgnoreFunc(data, coordSys);
+
+ // Remove temporary symbols
+ var oldData = this._data;
+ oldData && oldData.eachItemGraphicEl(function (el, idx) {
+ if (el.__temp) {
+ group.remove(el);
+ oldData.setItemGraphicEl(idx, null);
+ }
+ });
+
+ // Remove previous created symbols if showSymbol changed to false
+ if (!showSymbol) {
+ symbolDraw.remove();
+ }
+
+ group.add(lineGroup);
+
+ // Initialization animation or coordinate system changed
+ if (
+ !(polyline && prevCoordSys.type === coordSys.type)
+ ) {
+ showSymbol && symbolDraw.updateData(data, isSymbolIgnore);
+
+ polyline = this._newPolyline(points, coordSys, hasAnimation);
+ if (isAreaChart) {
+ polygon = this._newPolygon(
+ points, stackedOnPoints,
+ coordSys, hasAnimation
+ );
+ }
+ lineGroup.setClipPath(createClipShape(coordSys, true, seriesModel));
+ }
+ else {
+ if (isAreaChart && !polygon) {
+ // If areaStyle is added
+ polygon = this._newPolygon(
+ points, stackedOnPoints,
+ coordSys, hasAnimation
+ );
+ }
+ else if (polygon && !isAreaChart) {
+ // If areaStyle is removed
+ lineGroup.remove(polygon);
+ polygon = this._polygon = null;
+ }
+
+ // Update clipPath
+ lineGroup.setClipPath(createClipShape(coordSys, false, seriesModel));
+
+ // Always update, or it is wrong in the case turning on legend
+ // because points are not changed
+ showSymbol && symbolDraw.updateData(data, isSymbolIgnore);
+
+ // Stop symbol animation and sync with line points
+ // FIXME performance?
+ data.eachItemGraphicEl(function (el) {
+ el.stopAnimation(true);
+ });
+
+ // In the case data zoom triggerred refreshing frequently
+ // Data may not change if line has a category axis. So it should animate nothing
+ if (!isPointsSame(this._stackedOnPoints, stackedOnPoints)
+ || !isPointsSame(this._points, points)
+ ) {
+ if (hasAnimation) {
+ this._updateAnimation(
+ data, stackedOnPoints, coordSys, api
+ );
+ }
+ else {
+ polyline.setShape({
+ points: points
+ });
+ polygon && polygon.setShape({
+ points: points,
+ stackedOnPoints: stackedOnPoints
+ });
+ }
+ }
+ }
+
+ polyline.setStyle(zrUtil.defaults(
+ // Use color in lineStyle first
+ lineStyleModel.getLineStyle(),
+ {
+ stroke: data.getVisual('color'),
+ lineJoin: 'bevel'
+ }
+ ));
+
+ var smooth = seriesModel.get('smooth');
+ smooth = getSmooth(seriesModel.get('smooth'));
+ polyline.setShape({
+ smooth: smooth,
+ smoothMonotone: seriesModel.get('smoothMonotone')
+ });
+
+ if (polygon) {
+ var stackedOn = data.stackedOn;
+ var stackedOnSmooth = 0;
+
+ polygon.style.opacity = 0.7;
+ polygon.setStyle(zrUtil.defaults(
+ areaStyleModel.getAreaStyle(),
+ {
+ fill: data.getVisual('color'),
+ lineJoin: 'bevel'
+ }
+ ));
+
+ if (stackedOn) {
+ var stackedOnSeries = stackedOn.hostModel;
+ stackedOnSmooth = getSmooth(stackedOnSeries.get('smooth'));
+ }
+
+ polygon.setShape({
+ smooth: smooth,
+ stackedOnSmooth: stackedOnSmooth,
+ smoothMonotone: seriesModel.get('smoothMonotone')
+ });
+ }
+
+ this._data = data;
+ // Save the coordinate system for transition animation when data changed
+ this._coordSys = coordSys;
+ this._stackedOnPoints = stackedOnPoints;
+ this._points = points;
+ },
+
+ highlight: function (seriesModel, ecModel, api, payload) {
+ var data = seriesModel.getData();
+ var dataIndex = queryDataIndex(data, payload);
+
+ if (dataIndex != null && dataIndex >= 0) {
+ var symbol = data.getItemGraphicEl(dataIndex);
+ if (!symbol) {
+ // Create a temporary symbol if it is not exists
+ var pt = data.getItemLayout(dataIndex);
+ symbol = new Symbol(data, dataIndex, api);
+ symbol.position = pt;
+ symbol.setZ(
+ seriesModel.get('zlevel'),
+ seriesModel.get('z')
+ );
+ symbol.ignore = isNaN(pt[0]) || isNaN(pt[1]);
+ symbol.__temp = true;
+ data.setItemGraphicEl(dataIndex, symbol);
+
+ // Stop scale animation
+ symbol.stopSymbolAnimation(true);
+
+ this.group.add(symbol);
+ }
+ symbol.highlight();
+ }
+ else {
+ // Highlight whole series
+ ChartView.prototype.highlight.call(
+ this, seriesModel, ecModel, api, payload
+ );
+ }
+ },
+
+ downplay: function (seriesModel, ecModel, api, payload) {
+ var data = seriesModel.getData();
+ var dataIndex = queryDataIndex(data, payload);
+ if (dataIndex != null && dataIndex >= 0) {
+ var symbol = data.getItemGraphicEl(dataIndex);
+ if (symbol) {
+ if (symbol.__temp) {
+ data.setItemGraphicEl(dataIndex, null);
+ this.group.remove(symbol);
+ }
+ else {
+ symbol.downplay();
+ }
+ }
+ }
+ else {
+ // Downplay whole series
+ ChartView.prototype.downplay.call(
+ this, seriesModel, ecModel, api, payload
+ );
+ }
+ },
+
+ /**
+ * @param {module:zrender/container/Group} group
+ * @param {Array.<Array.<number>>} points
+ * @private
+ */
+ _newPolyline: function (points) {
+ var polyline = this._polyline;
+ // Remove previous created polyline
+ if (polyline) {
+ this._lineGroup.remove(polyline);
+ }
+
+ polyline = new polyHelper.Polyline({
+ shape: {
+ points: points
+ },
+ silent: true,
+ z2: 10
+ });
+
+ this._lineGroup.add(polyline);
+
+ this._polyline = polyline;
+
+ return polyline;
+ },
+
+ /**
+ * @param {module:zrender/container/Group} group
+ * @param {Array.<Array.<number>>} stackedOnPoints
+ * @param {Array.<Array.<number>>} points
+ * @private
+ */
+ _newPolygon: function (points, stackedOnPoints) {
+ var polygon = this._polygon;
+ // Remove previous created polygon
+ if (polygon) {
+ this._lineGroup.remove(polygon);
+ }
+
+ polygon = new polyHelper.Polygon({
+ shape: {
+ points: points,
+ stackedOnPoints: stackedOnPoints
+ },
+ silent: true
+ });
+
+ this._lineGroup.add(polygon);
+
+ this._polygon = polygon;
+ return polygon;
+ },
+ /**
+ * @private
+ */
+ _getSymbolIgnoreFunc: function (data, coordSys) {
+ var categoryAxis = coordSys.getAxesByScale('ordinal')[0];
+ // `getLabelInterval` is provided by echarts/component/axis
+ if (categoryAxis && categoryAxis.isLabelIgnored) {
+ return zrUtil.bind(categoryAxis.isLabelIgnored, categoryAxis);
+ }
+ },
+
+ /**
+ * @private
+ */
+ // FIXME Two value axis
+ _updateAnimation: function (data, stackedOnPoints, coordSys, api) {
+ var polyline = this._polyline;
+ var polygon = this._polygon;
+ var seriesModel = data.hostModel;
+
+ var diff = lineAnimationDiff(
+ this._data, data,
+ this._stackedOnPoints, stackedOnPoints,
+ this._coordSys, coordSys
+ );
+ polyline.shape.points = diff.current;
+
+ graphic.updateProps(polyline, {
+ shape: {
+ points: diff.next
+ }
+ }, seriesModel);
+
+ if (polygon) {
+ polygon.setShape({
+ points: diff.current,
+ stackedOnPoints: diff.stackedOnCurrent
+ });
+ graphic.updateProps(polygon, {
+ shape: {
+ points: diff.next,
+ stackedOnPoints: diff.stackedOnNext
+ }
+ }, seriesModel);
+ }
+
+ var updatedDataInfo = [];
+ var diffStatus = diff.status;
+
+ for (var i = 0; i < diffStatus.length; i++) {
+ var cmd = diffStatus[i].cmd;
+ if (cmd === '=') {
+ var el = data.getItemGraphicEl(diffStatus[i].idx1);
+ if (el) {
+ updatedDataInfo.push({
+ el: el,
+ ptIdx: i // Index of points
+ });
+ }
+ }
+ }
+
+ if (polyline.animators && polyline.animators.length) {
+ polyline.animators[0].during(function () {
+ for (var i = 0; i < updatedDataInfo.length; i++) {
+ var el = updatedDataInfo[i].el;
+ el.attr('position', polyline.shape.points[updatedDataInfo[i].ptIdx]);
+ }
+ });
+ }
+ },
+
+ remove: function (ecModel) {
+ var group = this.group;
+ var oldData = this._data;
+ this._lineGroup.removeAll();
+ this._symbolDraw.remove(true);
+ // Remove temporary created elements when highlighting
+ oldData && oldData.eachItemGraphicEl(function (el, idx) {
+ if (el.__temp) {
+ group.remove(el);
+ oldData.setItemGraphicEl(idx, null);
+ }
+ });
+
+ this._polyline =
+ this._polygon =
+ this._coordSys =
+ this._points =
+ this._stackedOnPoints =
+ this._data = null;
+ }
+ });
+
+
+/***/ },
+/* 98 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @module echarts/chart/helper/SymbolDraw
+ */
+
+
+ var graphic = __webpack_require__(42);
+ var Symbol = __webpack_require__(99);
+
+ /**
+ * @constructor
+ * @alias module:echarts/chart/helper/SymbolDraw
+ * @param {module:zrender/graphic/Group} [symbolCtor]
+ */
+ function SymbolDraw(symbolCtor) {
+ this.group = new graphic.Group();
+
+ this._symbolCtor = symbolCtor || Symbol;
+ }
+
+ var symbolDrawProto = SymbolDraw.prototype;
+
+ function symbolNeedsDraw(data, idx, isIgnore) {
+ var point = data.getItemLayout(idx);
+ return point && !isNaN(point[0]) && !isNaN(point[1]) && !(isIgnore && isIgnore(idx))
+ && data.getItemVisual(idx, 'symbol') !== 'none';
+ }
+ /**
+ * Update symbols draw by new data
+ * @param {module:echarts/data/List} data
+ * @param {Array.<boolean>} [isIgnore]
+ */
+ symbolDrawProto.updateData = function (data, isIgnore) {
+ var group = this.group;
+ var seriesModel = data.hostModel;
+ var oldData = this._data;
+
+ var SymbolCtor = this._symbolCtor;
+
+ data.diff(oldData)
+ .add(function (newIdx) {
+ var point = data.getItemLayout(newIdx);
+ if (symbolNeedsDraw(data, newIdx, isIgnore)) {
+ var symbolEl = new SymbolCtor(data, newIdx);
+ symbolEl.attr('position', point);
+ data.setItemGraphicEl(newIdx, symbolEl);
+ group.add(symbolEl);
+ }
+ })
+ .update(function (newIdx, oldIdx) {
+ var symbolEl = oldData.getItemGraphicEl(oldIdx);
+ var point = data.getItemLayout(newIdx);
+ if (!symbolNeedsDraw(data, newIdx, isIgnore)) {
+ group.remove(symbolEl);
+ return;
+ }
+ if (!symbolEl) {
+ symbolEl = new SymbolCtor(data, newIdx);
+ symbolEl.attr('position', point);
+ }
+ else {
+ symbolEl.updateData(data, newIdx);
+ graphic.updateProps(symbolEl, {
+ position: point
+ }, seriesModel);
+ }
+
+ // Add back
+ group.add(symbolEl);
+
+ data.setItemGraphicEl(newIdx, symbolEl);
+ })
+ .remove(function (oldIdx) {
+ var el = oldData.getItemGraphicEl(oldIdx);
+ el && el.fadeOut(function () {
+ group.remove(el);
+ });
+ })
+ .execute();
+
+ this._data = data;
+ };
+
+ symbolDrawProto.updateLayout = function () {
+ var data = this._data;
+ if (data) {
+ // Not use animation
+ data.eachItemGraphicEl(function (el, idx) {
+ el.attr('position', data.getItemLayout(idx));
+ });
+ }
+ };
+
+ symbolDrawProto.remove = function (enableAnimation) {
+ var group = this.group;
+ var data = this._data;
+ if (data) {
+ if (enableAnimation) {
+ data.eachItemGraphicEl(function (el) {
+ el.fadeOut(function () {
+ group.remove(el);
+ });
+ });
+ }
+ else {
+ group.removeAll();
+ }
+ }
+ };
+
+ module.exports = SymbolDraw;
+
+
+/***/ },
+/* 99 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @module echarts/chart/helper/Symbol
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+ var symbolUtil = __webpack_require__(100);
+ var graphic = __webpack_require__(42);
+ var numberUtil = __webpack_require__(7);
+
+ function normalizeSymbolSize(symbolSize) {
+ if (!zrUtil.isArray(symbolSize)) {
+ symbolSize = [+symbolSize, +symbolSize];
+ }
+ return symbolSize;
+ }
+
+ /**
+ * @constructor
+ * @alias {module:echarts/chart/helper/Symbol}
+ * @param {module:echarts/data/List} data
+ * @param {number} idx
+ * @extends {module:zrender/graphic/Group}
+ */
+ function Symbol(data, idx) {
+ graphic.Group.call(this);
+
+ this.updateData(data, idx);
+ }
+
+ var symbolProto = Symbol.prototype;
+
+ function driftSymbol(dx, dy) {
+ this.parent.drift(dx, dy);
+ }
+
+ symbolProto._createSymbol = function (symbolType, data, idx) {
+ // Remove paths created before
+ this.removeAll();
+
+ var seriesModel = data.hostModel;
+ var color = data.getItemVisual(idx, 'color');
+
+ var symbolPath = symbolUtil.createSymbol(
+ symbolType, -0.5, -0.5, 1, 1, color
+ );
+
+ symbolPath.attr({
+ style: {
+ strokeNoScale: true
+ },
+ z2: 100,
+ culling: true,
+ scale: [0, 0]
+ });
+ // Rewrite drift method
+ symbolPath.drift = driftSymbol;
+
+ var size = normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize'));
+
+ graphic.initProps(symbolPath, {
+ scale: size
+ }, seriesModel);
+
+ this._symbolType = symbolType;
+
+ this.add(symbolPath);
+ };
+
+ /**
+ * Stop animation
+ * @param {boolean} toLastFrame
+ */
+ symbolProto.stopSymbolAnimation = function (toLastFrame) {
+ this.childAt(0).stopAnimation(toLastFrame);
+ };
+
+ /**
+ * Get scale(aka, current symbol size).
+ * Including the change caused by animation
+ * @param {Array.<number>} toLastFrame
+ */
+ symbolProto.getScale = function () {
+ return this.childAt(0).scale;
+ };
+
+ /**
+ * Highlight symbol
+ */
+ symbolProto.highlight = function () {
+ this.childAt(0).trigger('emphasis');
+ };
+
+ /**
+ * Downplay symbol
+ */
+ symbolProto.downplay = function () {
+ this.childAt(0).trigger('normal');
+ };
+
+ /**
+ * @param {number} zlevel
+ * @param {number} z
+ */
+ symbolProto.setZ = function (zlevel, z) {
+ var symbolPath = this.childAt(0);
+ symbolPath.zlevel = zlevel;
+ symbolPath.z = z;
+ };
+
+ symbolProto.setDraggable = function (draggable) {
+ var symbolPath = this.childAt(0);
+ symbolPath.draggable = draggable;
+ symbolPath.cursor = draggable ? 'move' : 'pointer';
+ };
+ /**
+ * Update symbol properties
+ * @param {module:echarts/data/List} data
+ * @param {number} idx
+ */
+ symbolProto.updateData = function (data, idx) {
+ var symbolType = data.getItemVisual(idx, 'symbol') || 'circle';
+ var seriesModel = data.hostModel;
+ var symbolSize = normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize'));
+ if (symbolType !== this._symbolType) {
+ this._createSymbol(symbolType, data, idx);
+ }
+ else {
+ var symbolPath = this.childAt(0);
+ graphic.updateProps(symbolPath, {
+ scale: symbolSize
+ }, seriesModel);
+ }
+ this._updateCommon(data, idx, symbolSize);
+
+ this._seriesModel = seriesModel;
+ };
+
+ // Update common properties
+ var normalStyleAccessPath = ['itemStyle', 'normal'];
+ var emphasisStyleAccessPath = ['itemStyle', 'emphasis'];
+ var normalLabelAccessPath = ['label', 'normal'];
+ var emphasisLabelAccessPath = ['label', 'emphasis'];
+
+ symbolProto._updateCommon = function (data, idx, symbolSize) {
+ var symbolPath = this.childAt(0);
+ var seriesModel = data.hostModel;
+ var itemModel = data.getItemModel(idx);
+ var normalItemStyleModel = itemModel.getModel(normalStyleAccessPath);
+ var color = data.getItemVisual(idx, 'color');
+
+ var hoverStyle = itemModel.getModel(emphasisStyleAccessPath).getItemStyle();
+
+ symbolPath.rotation = itemModel.getShallow('symbolRotate') * Math.PI / 180 || 0;
+
+ var symbolOffset = itemModel.getShallow('symbolOffset');
+ if (symbolOffset) {
+ var pos = symbolPath.position;
+ pos[0] = numberUtil.parsePercent(symbolOffset[0], symbolSize[0]);
+ pos[1] = numberUtil.parsePercent(symbolOffset[1], symbolSize[1]);
+ }
+
+ symbolPath.setColor(color);
+
+ zrUtil.extend(
+ symbolPath.style,
+ // Color must be excluded.
+ // Because symbol provide setColor individually to set fill and stroke
+ normalItemStyleModel.getItemStyle(['color'])
+ );
+
+ var labelModel = itemModel.getModel(normalLabelAccessPath);
+ var hoverLabelModel = itemModel.getModel(emphasisLabelAccessPath);
+
+ var elStyle = symbolPath.style;
+
+ // Get last value dim
+ var dimensions = data.dimensions.slice();
+ var valueDim = dimensions.pop();
+ var dataType;
+ while (
+ ((dataType = data.getDimensionInfo(valueDim).type) === 'ordinal')
+ || (dataType === 'time')
+ ) {
+ valueDim = dimensions.pop();
+ }
+
+ if (labelModel.get('show')) {
+ graphic.setText(elStyle, labelModel, color);
+ elStyle.text = zrUtil.retrieve(
+ seriesModel.getFormattedLabel(idx, 'normal'),
+ data.get(valueDim, idx)
+ );
+ }
+ else {
+ elStyle.text = '';
+ }
+
+ if (hoverLabelModel.getShallow('show')) {
+ graphic.setText(hoverStyle, hoverLabelModel, color);
+ hoverStyle.text = zrUtil.retrieve(
+ seriesModel.getFormattedLabel(idx, 'emphasis'),
+ data.get(valueDim, idx)
+ );
+ }
+ else {
+ hoverStyle.text = '';
+ }
+
+ var size = normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize'));
+
+ symbolPath.off('mouseover')
+ .off('mouseout')
+ .off('emphasis')
+ .off('normal');
+
+ graphic.setHoverStyle(symbolPath, hoverStyle);
+
+ if (itemModel.getShallow('hoverAnimation')) {
+ var onEmphasis = function() {
+ var ratio = size[1] / size[0];
+ this.animateTo({
+ scale: [
+ Math.max(size[0] * 1.1, size[0] + 3),
+ Math.max(size[1] * 1.1, size[1] + 3 * ratio)
+ ]
+ }, 400, 'elasticOut');
+ };
+ var onNormal = function() {
+ this.animateTo({
+ scale: size
+ }, 400, 'elasticOut');
+ };
+ symbolPath.on('mouseover', onEmphasis)
+ .on('mouseout', onNormal)
+ .on('emphasis', onEmphasis)
+ .on('normal', onNormal);
+ }
+ };
+
+ symbolProto.fadeOut = function (cb) {
+ var symbolPath = this.childAt(0);
+ // Not show text when animating
+ symbolPath.style.text = '';
+ graphic.updateProps(symbolPath, {
+ scale: [0, 0]
+ }, this._seriesModel, cb);
+ };
+
+ zrUtil.inherits(Symbol, graphic.Group);
+
+ module.exports = Symbol;
+
+
+/***/ },
+/* 100 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // Symbol factory
+
+
+ var graphic = __webpack_require__(42);
+ var BoundingRect = __webpack_require__(15);
+
+ /**
+ * Triangle shape
+ * @inner
+ */
+ var Triangle = graphic.extendShape({
+ type: 'triangle',
+ shape: {
+ cx: 0,
+ cy: 0,
+ width: 0,
+ height: 0
+ },
+ buildPath: function (path, shape) {
+ var cx = shape.cx;
+ var cy = shape.cy;
+ var width = shape.width / 2;
+ var height = shape.height / 2;
+ path.moveTo(cx, cy - height);
+ path.lineTo(cx + width, cy + height);
+ path.lineTo(cx - width, cy + height);
+ path.closePath();
+ }
+ });
+ /**
+ * Diamond shape
+ * @inner
+ */
+ var Diamond = graphic.extendShape({
+ type: 'diamond',
+ shape: {
+ cx: 0,
+ cy: 0,
+ width: 0,
+ height: 0
+ },
+ buildPath: function (path, shape) {
+ var cx = shape.cx;
+ var cy = shape.cy;
+ var width = shape.width / 2;
+ var height = shape.height / 2;
+ path.moveTo(cx, cy - height);
+ path.lineTo(cx + width, cy);
+ path.lineTo(cx, cy + height);
+ path.lineTo(cx - width, cy);
+ path.closePath();
+ }
+ });
+
+ /**
+ * Pin shape
+ * @inner
+ */
+ var Pin = graphic.extendShape({
+ type: 'pin',
+ shape: {
+ // x, y on the cusp
+ x: 0,
+ y: 0,
+ width: 0,
+ height: 0
+ },
+
+ buildPath: function (path, shape) {
+ var x = shape.x;
+ var y = shape.y;
+ var w = shape.width / 5 * 3;
+ // Height must be larger than width
+ var h = Math.max(w, shape.height);
+ var r = w / 2;
+
+ // Dist on y with tangent point and circle center
+ var dy = r * r / (h - r);
+ var cy = y - h + r + dy;
+ var angle = Math.asin(dy / r);
+ // Dist on x with tangent point and circle center
+ var dx = Math.cos(angle) * r;
+
+ var tanX = Math.sin(angle);
+ var tanY = Math.cos(angle);
+
+ path.arc(
+ x, cy, r,
+ Math.PI - angle,
+ Math.PI * 2 + angle
+ );
+
+ var cpLen = r * 0.6;
+ var cpLen2 = r * 0.7;
+ path.bezierCurveTo(
+ x + dx - tanX * cpLen, cy + dy + tanY * cpLen,
+ x, y - cpLen2,
+ x, y
+ );
+ path.bezierCurveTo(
+ x, y - cpLen2,
+ x - dx + tanX * cpLen, cy + dy + tanY * cpLen,
+ x - dx, cy + dy
+ );
+ path.closePath();
+ }
+ });
+
+ /**
+ * Arrow shape
+ * @inner
+ */
+ var Arrow = graphic.extendShape({
+
+ type: 'arrow',
+
+ shape: {
+ x: 0,
+ y: 0,
+ width: 0,
+ height: 0
+ },
+
+ buildPath: function (ctx, shape) {
+ var height = shape.height;
+ var width = shape.width;
+ var x = shape.x;
+ var y = shape.y;
+ var dx = width / 3 * 2;
+ ctx.moveTo(x, y);
+ ctx.lineTo(x + dx, y + height);
+ ctx.lineTo(x, y + height / 4 * 3);
+ ctx.lineTo(x - dx, y + height);
+ ctx.lineTo(x, y);
+ ctx.closePath();
+ }
+ });
+
+ /**
+ * Map of path contructors
+ * @type {Object.<string, module:zrender/graphic/Path>}
+ */
+ var symbolCtors = {
+ line: graphic.Line,
+
+ rect: graphic.Rect,
+
+ roundRect: graphic.Rect,
+
+ square: graphic.Rect,
+
+ circle: graphic.Circle,
+
+ diamond: Diamond,
+
+ pin: Pin,
+
+ arrow: Arrow,
+
+ triangle: Triangle
+ };
+
+ var symbolShapeMakers = {
+
+ line: function (x, y, w, h, shape) {
+ // FIXME
+ shape.x1 = x;
+ shape.y1 = y + h / 2;
+ shape.x2 = x + w;
+ shape.y2 = y + h / 2;
+ },
+
+ rect: function (x, y, w, h, shape) {
+ shape.x = x;
+ shape.y = y;
+ shape.width = w;
+ shape.height = h;
+ },
+
+ roundRect: function (x, y, w, h, shape) {
+ shape.x = x;
+ shape.y = y;
+ shape.width = w;
+ shape.height = h;
+ shape.r = Math.min(w, h) / 4;
+ },
+
+ square: function (x, y, w, h, shape) {
+ var size = Math.min(w, h);
+ shape.x = x;
+ shape.y = y;
+ shape.width = size;
+ shape.height = size;
+ },
+
+ circle: function (x, y, w, h, shape) {
+ // Put circle in the center of square
+ shape.cx = x + w / 2;
+ shape.cy = y + h / 2;
+ shape.r = Math.min(w, h) / 2;
+ },
+
+ diamond: function (x, y, w, h, shape) {
+ shape.cx = x + w / 2;
+ shape.cy = y + h / 2;
+ shape.width = w;
+ shape.height = h;
+ },
+
+ pin: function (x, y, w, h, shape) {
+ shape.x = x + w / 2;
+ shape.y = y + h / 2;
+ shape.width = w;
+ shape.height = h;
+ },
+
+ arrow: function (x, y, w, h, shape) {
+ shape.x = x + w / 2;
+ shape.y = y + h / 2;
+ shape.width = w;
+ shape.height = h;
+ },
+
+ triangle: function (x, y, w, h, shape) {
+ shape.cx = x + w / 2;
+ shape.cy = y + h / 2;
+ shape.width = w;
+ shape.height = h;
+ }
+ };
+
+ var symbolBuildProxies = {};
+ for (var name in symbolCtors) {
+ symbolBuildProxies[name] = new symbolCtors[name]();
+ }
+
+ var Symbol = graphic.extendShape({
+
+ type: 'symbol',
+
+ shape: {
+ symbolType: '',
+ x: 0,
+ y: 0,
+ width: 0,
+ height: 0
+ },
+
+ beforeBrush: function () {
+ var style = this.style;
+ var shape = this.shape;
+ // FIXME
+ if (shape.symbolType === 'pin' && style.textPosition === 'inside') {
+ style.textPosition = ['50%', '40%'];
+ style.textAlign = 'center';
+ style.textVerticalAlign = 'middle';
+ }
+ },
+
+ buildPath: function (ctx, shape) {
+ var symbolType = shape.symbolType;
+ var proxySymbol = symbolBuildProxies[symbolType];
+ if (shape.symbolType !== 'none') {
+ if (!proxySymbol) {
+ // Default rect
+ symbolType = 'rect';
+ proxySymbol = symbolBuildProxies[symbolType];
+ }
+ symbolShapeMakers[symbolType](
+ shape.x, shape.y, shape.width, shape.height, proxySymbol.shape
+ );
+ proxySymbol.buildPath(ctx, proxySymbol.shape);
+ }
+ }
+ });
+
+ // Provide setColor helper method to avoid determine if set the fill or stroke outside
+ var symbolPathSetColor = function (color) {
+ if (this.type !== 'image') {
+ var symbolStyle = this.style;
+ var symbolShape = this.shape;
+ if (symbolShape && symbolShape.symbolType === 'line') {
+ symbolStyle.stroke = color;
+ }
+ else if (this.__isEmptyBrush) {
+ symbolStyle.stroke = color;
+ symbolStyle.fill = '#fff';
+ }
+ else {
+ // FIXME 判断图形默认是填充还是æ边,使用 onlyStroke ?
+ symbolStyle.fill && (symbolStyle.fill = color);
+ symbolStyle.stroke && (symbolStyle.stroke = color);
+ }
+ this.dirty();
+ }
+ };
+
+ var symbolUtil = {
+ /**
+ * Create a symbol element with given symbol configuration: shape, x, y, width, height, color
+ * @param {string} symbolType
+ * @param {number} x
+ * @param {number} y
+ * @param {number} w
+ * @param {number} h
+ * @param {string} color
+ */
+ createSymbol: function (symbolType, x, y, w, h, color) {
+ var isEmpty = symbolType.indexOf('empty') === 0;
+ if (isEmpty) {
+ symbolType = symbolType.substr(5, 1).toLowerCase() + symbolType.substr(6);
+ }
+ var symbolPath;
+
+ if (symbolType.indexOf('image://') === 0) {
+ symbolPath = new graphic.Image({
+ style: {
+ image: symbolType.slice(8),
+ x: x,
+ y: y,
+ width: w,
+ height: h
+ }
+ });
+ }
+ else if (symbolType.indexOf('path://') === 0) {
+ symbolPath = graphic.makePath(symbolType.slice(7), {}, new BoundingRect(x, y, w, h));
+ }
+ else {
+ symbolPath = new Symbol({
+ shape: {
+ symbolType: symbolType,
+ x: x,
+ y: y,
+ width: w,
+ height: h
+ }
+ });
+ }
+
+ symbolPath.__isEmptyBrush = isEmpty;
+
+ symbolPath.setColor = symbolPathSetColor;
+
+ symbolPath.setColor(color);
+
+ return symbolPath;
+ }
+ };
+
+ module.exports = symbolUtil;
+
+
+/***/ },
+/* 101 */
+/***/ function(module, exports) {
+
+
+
+ // var arrayDiff = require('zrender/lib/core/arrayDiff');
+ // 'zrender/core/arrayDiff' has been used before, but it did
+ // not do well in performance when roam with fixed dataZoom window.
+
+ function sign(val) {
+ return val >= 0 ? 1 : -1;
+ }
+
+ function getStackedOnPoint(coordSys, data, idx) {
+ var baseAxis = coordSys.getBaseAxis();
+ var valueAxis = coordSys.getOtherAxis(baseAxis);
+ var valueStart = baseAxis.onZero
+ ? 0 : valueAxis.scale.getExtent()[0];
+
+ var valueDim = valueAxis.dim;
+ var baseDataOffset = valueDim === 'x' || valueDim === 'radius' ? 1 : 0;
+
+ var stackedOnSameSign;
+ var stackedOn = data.stackedOn;
+ var val = data.get(valueDim, idx);
+ // Find first stacked value with same sign
+ while (stackedOn &&
+ sign(stackedOn.get(valueDim, idx)) === sign(val)
+ ) {
+ stackedOnSameSign = stackedOn;
+ break;
+ }
+ var stackedData = [];
+ stackedData[baseDataOffset] = data.get(baseAxis.dim, idx);
+ stackedData[1 - baseDataOffset] = stackedOnSameSign
+ ? stackedOnSameSign.get(valueDim, idx, true) : valueStart;
+
+ return coordSys.dataToPoint(stackedData);
+ }
+
+ // function convertToIntId(newIdList, oldIdList) {
+ // // Generate int id instead of string id.
+ // // Compare string maybe slow in score function of arrDiff
+
+ // // Assume id in idList are all unique
+ // var idIndicesMap = {};
+ // var idx = 0;
+ // for (var i = 0; i < newIdList.length; i++) {
+ // idIndicesMap[newIdList[i]] = idx;
+ // newIdList[i] = idx++;
+ // }
+ // for (var i = 0; i < oldIdList.length; i++) {
+ // var oldId = oldIdList[i];
+ // // Same with newIdList
+ // if (idIndicesMap[oldId]) {
+ // oldIdList[i] = idIndicesMap[oldId];
+ // }
+ // else {
+ // oldIdList[i] = idx++;
+ // }
+ // }
+ // }
+
+ function diffData(oldData, newData) {
+ var diffResult = [];
+
+ newData.diff(oldData)
+ .add(function (idx) {
+ diffResult.push({cmd: '+', idx: idx});
+ })
+ .update(function (newIdx, oldIdx) {
+ diffResult.push({cmd: '=', idx: oldIdx, idx1: newIdx});
+ })
+ .remove(function (idx) {
+ diffResult.push({cmd: '-', idx: idx});
+ })
+ .execute();
+
+ return diffResult;
+ }
+
+ module.exports = function (
+ oldData, newData,
+ oldStackedOnPoints, newStackedOnPoints,
+ oldCoordSys, newCoordSys
+ ) {
+ var diff = diffData(oldData, newData);
+
+ // var newIdList = newData.mapArray(newData.getId);
+ // var oldIdList = oldData.mapArray(oldData.getId);
+
+ // convertToIntId(newIdList, oldIdList);
+
+ // // FIXME One data ?
+ // diff = arrayDiff(oldIdList, newIdList);
+
+ var currPoints = [];
+ var nextPoints = [];
+ // Points for stacking base line
+ var currStackedPoints = [];
+ var nextStackedPoints = [];
+
+ var status = [];
+ var sortedIndices = [];
+ var rawIndices = [];
+ var dims = newCoordSys.dimensions;
+ for (var i = 0; i < diff.length; i++) {
+ var diffItem = diff[i];
+ var pointAdded = true;
+
+ // FIXME, animation is not so perfect when dataZoom window moves fast
+ // Which is in case remvoing or add more than one data in the tail or head
+ switch (diffItem.cmd) {
+ case '=':
+ var currentPt = oldData.getItemLayout(diffItem.idx);
+ var nextPt = newData.getItemLayout(diffItem.idx1);
+ // If previous data is NaN, use next point directly
+ if (isNaN(currentPt[0]) || isNaN(currentPt[1])) {
+ currentPt = nextPt.slice();
+ }
+ currPoints.push(currentPt);
+ nextPoints.push(nextPt);
+
+ currStackedPoints.push(oldStackedOnPoints[diffItem.idx]);
+ nextStackedPoints.push(newStackedOnPoints[diffItem.idx1]);
+
+ rawIndices.push(newData.getRawIndex(diffItem.idx1));
+ break;
+ case '+':
+ var idx = diffItem.idx;
+ currPoints.push(
+ oldCoordSys.dataToPoint([
+ newData.get(dims[0], idx, true), newData.get(dims[1], idx, true)
+ ])
+ );
+
+ nextPoints.push(newData.getItemLayout(idx).slice());
+
+ currStackedPoints.push(
+ getStackedOnPoint(oldCoordSys, newData, idx)
+ );
+ nextStackedPoints.push(newStackedOnPoints[idx]);
+
+ rawIndices.push(newData.getRawIndex(idx));
+ break;
+ case '-':
+ var idx = diffItem.idx;
+ var rawIndex = oldData.getRawIndex(idx);
+ // Data is replaced. In the case of dynamic data queue
+ // FIXME FIXME FIXME
+ if (rawIndex !== idx) {
+ currPoints.push(oldData.getItemLayout(idx));
+ nextPoints.push(newCoordSys.dataToPoint([
+ oldData.get(dims[0], idx, true), oldData.get(dims[1], idx, true)
+ ]));
+
+ currStackedPoints.push(oldStackedOnPoints[idx]);
+ nextStackedPoints.push(
+ getStackedOnPoint(
+ newCoordSys, oldData, idx
+ )
+ );
+
+ rawIndices.push(rawIndex);
+ }
+ else {
+ pointAdded = false;
+ }
+ }
+
+ // Original indices
+ if (pointAdded) {
+ status.push(diffItem);
+ sortedIndices.push(sortedIndices.length);
+ }
+ }
+
+ // Diff result may be crossed if all items are changed
+ // Sort by data index
+ sortedIndices.sort(function (a, b) {
+ return rawIndices[a] - rawIndices[b];
+ });
+
+ var sortedCurrPoints = [];
+ var sortedNextPoints = [];
+
+ var sortedCurrStackedPoints = [];
+ var sortedNextStackedPoints = [];
+
+ var sortedStatus = [];
+ for (var i = 0; i < sortedIndices.length; i++) {
+ var idx = sortedIndices[i];
+ sortedCurrPoints[i] = currPoints[idx];
+ sortedNextPoints[i] = nextPoints[idx];
+
+ sortedCurrStackedPoints[i] = currStackedPoints[idx];
+ sortedNextStackedPoints[i] = nextStackedPoints[idx];
+
+ sortedStatus[i] = status[idx];
+ }
+
+ return {
+ current: sortedCurrPoints,
+ next: sortedNextPoints,
+
+ stackedOnCurrent: sortedCurrStackedPoints,
+ stackedOnNext: sortedNextStackedPoints,
+
+ status: sortedStatus
+ };
+ };
+
+
+/***/ },
+/* 102 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // Poly path support NaN point
+
+
+ var Path = __webpack_require__(44);
+ var vec2 = __webpack_require__(16);
+
+ var vec2Min = vec2.min;
+ var vec2Max = vec2.max;
+
+ var scaleAndAdd = vec2.scaleAndAdd;
+ var v2Copy = vec2.copy;
+
+ // Temporary variable
+ var v = [];
+ var cp0 = [];
+ var cp1 = [];
+
+ function drawSegment(
+ ctx, points, start, stop, len,
+ dir, smoothMin, smoothMax, smooth, smoothMonotone
+ ) {
+ var idx = start;
+ for (var k = 0; k < len; k++) {
+ var p = points[idx];
+ if (idx >= stop || idx < 0 || isNaN(p[0]) || isNaN(p[1])) {
+ break;
+ }
+
+ if (idx === start) {
+ ctx[dir > 0 ? 'moveTo' : 'lineTo'](p[0], p[1]);
+ v2Copy(cp0, p);
+ }
+ else {
+ if (smooth > 0) {
+ var prevIdx = idx - dir;
+ var nextIdx = idx + dir;
+
+ var ratioNextSeg = 0.5;
+ var prevP = points[prevIdx];
+ var nextP = points[nextIdx];
+ // Last point
+ if ((dir > 0 && (idx === len - 1 || isNaN(nextP[0]) || isNaN(nextP[1])))
+ || (dir <= 0 && (idx === 0 || isNaN(nextP[0]) || isNaN(nextP[1])))
+ ) {
+ v2Copy(cp1, p);
+ }
+ else {
+ // If next data is null
+ if (isNaN(nextP[0]) || isNaN(nextP[1])) {
+ nextP = p;
+ }
+
+ vec2.sub(v, nextP, prevP);
+
+ var lenPrevSeg;
+ var lenNextSeg;
+ if (smoothMonotone === 'x' || smoothMonotone === 'y') {
+ var dim = smoothMonotone === 'x' ? 0 : 1;
+ lenPrevSeg = Math.abs(p[dim] - prevP[dim]);
+ lenNextSeg = Math.abs(p[dim] - nextP[dim]);
+ }
+ else {
+ lenPrevSeg = vec2.dist(p, prevP);
+ lenNextSeg = vec2.dist(p, nextP);
+ }
+
+ // Use ratio of seg length
+ ratioNextSeg = lenNextSeg / (lenNextSeg + lenPrevSeg);
+
+ scaleAndAdd(cp1, p, v, -smooth * (1 - ratioNextSeg));
+ }
+ // Smooth constraint
+ vec2Min(cp0, cp0, smoothMax);
+ vec2Max(cp0, cp0, smoothMin);
+ vec2Min(cp1, cp1, smoothMax);
+ vec2Max(cp1, cp1, smoothMin);
+
+ ctx.bezierCurveTo(
+ cp0[0], cp0[1],
+ cp1[0], cp1[1],
+ p[0], p[1]
+ );
+ // cp0 of next segment
+ scaleAndAdd(cp0, p, v, smooth * ratioNextSeg);
+ }
+ else {
+ ctx.lineTo(p[0], p[1]);
+ }
+ }
+
+ idx += dir;
+ }
+
+ return k;
+ }
+
+ function getBoundingBox(points, smoothConstraint) {
+ var ptMin = [Infinity, Infinity];
+ var ptMax = [-Infinity, -Infinity];
+ if (smoothConstraint) {
+ for (var i = 0; i < points.length; i++) {
+ var pt = points[i];
+ if (pt[0] < ptMin[0]) { ptMin[0] = pt[0]; }
+ if (pt[1] < ptMin[1]) { ptMin[1] = pt[1]; }
+ if (pt[0] > ptMax[0]) { ptMax[0] = pt[0]; }
+ if (pt[1] > ptMax[1]) { ptMax[1] = pt[1]; }
+ }
+ }
+ return {
+ min: smoothConstraint ? ptMin : ptMax,
+ max: smoothConstraint ? ptMax : ptMin
+ };
+ }
+
+ module.exports = {
+
+ Polyline: Path.extend({
+
+ type: 'ec-polyline',
+
+ shape: {
+ points: [],
+
+ smooth: 0,
+
+ smoothConstraint: true,
+
+ smoothMonotone: null
+ },
+
+ style: {
+ fill: null,
+
+ stroke: '#000'
+ },
+
+ buildPath: function (ctx, shape) {
+ var points = shape.points;
+
+ var i = 0;
+ var len = points.length;
+
+ var result = getBoundingBox(points, shape.smoothConstraint);
+
+ while (i < len) {
+ i += drawSegment(
+ ctx, points, i, len, len,
+ 1, result.min, result.max, shape.smooth,
+ shape.smoothMonotone
+ ) + 1;
+ }
+ }
+ }),
+
+ Polygon: Path.extend({
+
+ type: 'ec-polygon',
+
+ shape: {
+ points: [],
+
+ // Offset between stacked base points and points
+ stackedOnPoints: [],
+
+ smooth: 0,
+
+ stackedOnSmooth: 0,
+
+ smoothConstraint: true,
+
+ smoothMonotone: null
+ },
+
+ buildPath: function (ctx, shape) {
+ var points = shape.points;
+ var stackedOnPoints = shape.stackedOnPoints;
+
+ var i = 0;
+ var len = points.length;
+ var smoothMonotone = shape.smoothMonotone;
+ var bbox = getBoundingBox(points, shape.smoothConstraint);
+ var stackedOnBBox = getBoundingBox(stackedOnPoints, shape.smoothConstraint);
+ while (i < len) {
+ var k = drawSegment(
+ ctx, points, i, len, len,
+ 1, bbox.min, bbox.max, shape.smooth,
+ smoothMonotone
+ );
+ drawSegment(
+ ctx, stackedOnPoints, i + k - 1, len, k,
+ -1, stackedOnBBox.min, stackedOnBBox.max, shape.stackedOnSmooth,
+ smoothMonotone
+ );
+ i += k + 1;
+
+ ctx.closePath();
+ }
+ }
+ })
+ };
+
+
+/***/ },
+/* 103 */
+/***/ function(module, exports) {
+
+
+
+ module.exports = function (seriesType, defaultSymbolType, legendSymbol, ecModel, api) {
+
+ // Encoding visual for all series include which is filtered for legend drawing
+ ecModel.eachRawSeriesByType(seriesType, function (seriesModel) {
+ var data = seriesModel.getData();
+
+ var symbolType = seriesModel.get('symbol') || defaultSymbolType;
+ var symbolSize = seriesModel.get('symbolSize');
+
+ data.setVisual({
+ legendSymbol: legendSymbol || symbolType,
+ symbol: symbolType,
+ symbolSize: symbolSize
+ });
+
+ // Only visible series has each data be visual encoded
+ if (!ecModel.isSeriesFiltered(seriesModel)) {
+ if (typeof symbolSize === 'function') {
+ data.each(function (idx) {
+ var rawValue = seriesModel.getRawValue(idx);
+ // FIXME
+ var params = seriesModel.getDataParams(idx);
+ data.setItemVisual(idx, 'symbolSize', symbolSize(rawValue, params));
+ });
+ }
+ data.each(function (idx) {
+ var itemModel = data.getItemModel(idx);
+ var itemSymbolType = itemModel.get('symbol', true);
+ var itemSymbolSize = itemModel.get('symbolSize', true);
+ // If has item symbol
+ if (itemSymbolType != null) {
+ data.setItemVisual(idx, 'symbol', itemSymbolType);
+ }
+ if (itemSymbolSize != null) {
+ // PENDING Transform symbolSize ?
+ data.setItemVisual(idx, 'symbolSize', itemSymbolSize);
+ }
+ });
+ }
+ });
+ };
+
+
+/***/ },
+/* 104 */
+/***/ function(module, exports) {
+
+
+
+ module.exports = function (seriesType, ecModel, api) {
+ ecModel.eachSeriesByType(seriesType, function (seriesModel) {
+ var data = seriesModel.getData();
+ var coordSys = seriesModel.coordinateSystem;
+
+ var dims = coordSys.dimensions;
+ data.each(dims, function (x, y, idx) {
+ var point;
+ if (!isNaN(x) && !isNaN(y)) {
+ point = coordSys.dataToPoint([x, y]);
+ }
+ else {
+ // Also {Array.<number>}, not undefined to avoid if...else... statement
+ point = [NaN, NaN];
+ }
+
+ data.setItemLayout(idx, point);
+ }, true);
+ });
+ };
+
+
+/***/ },
+/* 105 */
+/***/ function(module, exports) {
+
+
+ var samplers = {
+ average: function (frame) {
+ var sum = 0;
+ var count = 0;
+ for (var i = 0; i < frame.length; i++) {
+ if (!isNaN(frame[i])) {
+ sum += frame[i];
+ count++;
+ }
+ }
+ // Return NaN if count is 0
+ return count === 0 ? NaN : sum / count;
+ },
+ sum: function (frame) {
+ var sum = 0;
+ for (var i = 0; i < frame.length; i++) {
+ // Ignore NaN
+ sum += frame[i] || 0;
+ }
+ return sum;
+ },
+ max: function (frame) {
+ var max = -Infinity;
+ for (var i = 0; i < frame.length; i++) {
+ frame[i] > max && (max = frame[i]);
+ }
+ return max;
+ },
+ min: function (frame) {
+ var min = Infinity;
+ for (var i = 0; i < frame.length; i++) {
+ frame[i] < min && (min = frame[i]);
+ }
+ return min;
+ }
+ };
+
+ var indexSampler = function (frame, value) {
+ return Math.round(frame.length / 2);
+ };
+ module.exports = function (seriesType, ecModel, api) {
+ ecModel.eachSeriesByType(seriesType, function (seriesModel) {
+ var data = seriesModel.getData();
+ var sampling = seriesModel.get('sampling');
+ var coordSys = seriesModel.coordinateSystem;
+ // Only cartesian2d support down sampling
+ if (coordSys.type === 'cartesian2d' && sampling) {
+ var baseAxis = coordSys.getBaseAxis();
+ var valueAxis = coordSys.getOtherAxis(baseAxis);
+ var extent = baseAxis.getExtent();
+ // Coordinste system has been resized
+ var size = extent[1] - extent[0];
+ var rate = Math.round(data.count() / size);
+ if (rate > 1) {
+ var sampler;
+ if (typeof sampling === 'string') {
+ sampler = samplers[sampling];
+ }
+ else if (typeof sampling === 'function') {
+ sampler = sampling;
+ }
+ if (sampler) {
+ data = data.downSample(
+ valueAxis.dim, 1 / rate, sampler, indexSampler
+ );
+ seriesModel.setData(data);
+ }
+ }
+ }
+ }, this);
+ };
+
+
+/***/ },
+/* 106 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var graphic = __webpack_require__(42);
+ var zrUtil = __webpack_require__(3);
+
+ __webpack_require__(107);
+
+ __webpack_require__(124);
+
+ // Grid view
+ __webpack_require__(1).extendComponentView({
+
+ type: 'grid',
+
+ render: function (gridModel, ecModel) {
+ this.group.removeAll();
+ if (gridModel.get('show')) {
+ this.group.add(new graphic.Rect({
+ shape:gridModel.coordinateSystem.getRect(),
+ style: zrUtil.defaults({
+ fill: gridModel.get('backgroundColor')
+ }, gridModel.getItemStyle()),
+ silent: true
+ }));
+ }
+ }
+ });
+
+
+/***/ },
+/* 107 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Grid is a region which contains at most 4 cartesian systems
+ *
+ * TODO Default cartesian
+ */
+ var factory = exports;
+
+ var layout = __webpack_require__(21);
+ var axisHelper = __webpack_require__(108);
+
+ var zrUtil = __webpack_require__(3);
+ var Cartesian2D = __webpack_require__(114);
+ var Axis2D = __webpack_require__(116);
+
+ var each = zrUtil.each;
+
+ var ifAxisCrossZero = axisHelper.ifAxisCrossZero;
+ var niceScaleExtent = axisHelper.niceScaleExtent;
+
+ // ä¾èµ– GridModel, AxisModel åšé¢„处ç†
+ __webpack_require__(119);
+
+ /**
+ * Check if the axis is used in the specified grid
+ * @inner
+ */
+ function isAxisUsedInTheGrid(axisModel, gridModel, ecModel) {
+ return ecModel.getComponent('grid', axisModel.get('gridIndex')) === gridModel;
+ }
+
+ function getLabelUnionRect(axis) {
+ var axisModel = axis.model;
+ var labels = axisModel.getFormattedLabels();
+ var rect;
+ var step = 1;
+ var labelCount = labels.length;
+ if (labelCount > 40) {
+ // Simple optimization for large amount of labels
+ step = Math.ceil(labelCount / 40);
+ }
+ for (var i = 0; i < labelCount; i += step) {
+ if (!axis.isLabelIgnored(i)) {
+ var singleRect = axisModel.getTextRect(labels[i]);
+ // FIXME consider label rotate
+ rect ? rect.union(singleRect) : (rect = singleRect);
+ }
+ }
+ return rect;
+ }
+
+ function Grid(gridModel, ecModel, api) {
+ /**
+ * @type {Object.<string, module:echarts/coord/cartesian/Cartesian2D>}
+ * @private
+ */
+ this._coordsMap = {};
+
+ /**
+ * @type {Array.<module:echarts/coord/cartesian/Cartesian>}
+ * @private
+ */
+ this._coordsList = [];
+
+ /**
+ * @type {Object.<string, module:echarts/coord/cartesian/Axis2D>}
+ * @private
+ */
+ this._axesMap = {};
+
+ /**
+ * @type {Array.<module:echarts/coord/cartesian/Axis2D>}
+ * @private
+ */
+ this._axesList = [];
+
+ this._initCartesian(gridModel, ecModel, api);
+
+ this._model = gridModel;
+ }
+
+ var gridProto = Grid.prototype;
+
+ gridProto.type = 'grid';
+
+ gridProto.getRect = function () {
+ return this._rect;
+ };
+
+ gridProto.update = function (ecModel, api) {
+
+ var axesMap = this._axesMap;
+
+ this._updateScale(ecModel, this._model);
+
+ function ifAxisCanNotOnZero(otherAxisDim) {
+ var axes = axesMap[otherAxisDim];
+ for (var idx in axes) {
+ var axis = axes[idx];
+ if (axis && (axis.type === 'category' || !ifAxisCrossZero(axis))) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ each(axesMap.x, function (xAxis) {
+ niceScaleExtent(xAxis, xAxis.model);
+ });
+ each(axesMap.y, function (yAxis) {
+ niceScaleExtent(yAxis, yAxis.model);
+ });
+ // Fix configuration
+ each(axesMap.x, function (xAxis) {
+ // onZero can not be enabled in these two situations
+ // 1. When any other axis is a category axis
+ // 2. When any other axis not across 0 point
+ if (ifAxisCanNotOnZero('y')) {
+ xAxis.onZero = false;
+ }
+ });
+ each(axesMap.y, function (yAxis) {
+ if (ifAxisCanNotOnZero('x')) {
+ yAxis.onZero = false;
+ }
+ });
+
+ // Resize again if containLabel is enabled
+ // FIXME It may cause getting wrong grid size in data processing stage
+ this.resize(this._model, api);
+ };
+
+ /**
+ * Resize the grid
+ * @param {module:echarts/coord/cartesian/GridModel} gridModel
+ * @param {module:echarts/ExtensionAPI} api
+ */
+ gridProto.resize = function (gridModel, api) {
+
+ var gridRect = layout.getLayoutRect(
+ gridModel.getBoxLayoutParams(), {
+ width: api.getWidth(),
+ height: api.getHeight()
+ });
+
+ this._rect = gridRect;
+
+ var axesList = this._axesList;
+
+ adjustAxes();
+
+ // Minus label size
+ if (gridModel.get('containLabel')) {
+ each(axesList, function (axis) {
+ if (!axis.model.get('axisLabel.inside')) {
+ var labelUnionRect = getLabelUnionRect(axis);
+ if (labelUnionRect) {
+ var dim = axis.isHorizontal() ? 'height' : 'width';
+ var margin = axis.model.get('axisLabel.margin');
+ gridRect[dim] -= labelUnionRect[dim] + margin;
+ if (axis.position === 'top') {
+ gridRect.y += labelUnionRect.height + margin;
+ }
+ else if (axis.position === 'left') {
+ gridRect.x += labelUnionRect.width + margin;
+ }
+ }
+ }
+ });
+
+ adjustAxes();
+ }
+
+ function adjustAxes() {
+ each(axesList, function (axis) {
+ var isHorizontal = axis.isHorizontal();
+ var extent = isHorizontal ? [0, gridRect.width] : [0, gridRect.height];
+ var idx = axis.inverse ? 1 : 0;
+ axis.setExtent(extent[idx], extent[1 - idx]);
+ updateAxisTransfrom(axis, isHorizontal ? gridRect.x : gridRect.y);
+ });
+ }
+ };
+
+ /**
+ * @param {string} axisType
+ * @param {ndumber} [axisIndex]
+ */
+ gridProto.getAxis = function (axisType, axisIndex) {
+ var axesMapOnDim = this._axesMap[axisType];
+ if (axesMapOnDim != null) {
+ if (axisIndex == null) {
+ // Find first axis
+ for (var name in axesMapOnDim) {
+ return axesMapOnDim[name];
+ }
+ }
+ return axesMapOnDim[axisIndex];
+ }
+ };
+
+ gridProto.getCartesian = function (xAxisIndex, yAxisIndex) {
+ var key = 'x' + xAxisIndex + 'y' + yAxisIndex;
+ return this._coordsMap[key];
+ };
+
+ /**
+ * Initialize cartesian coordinate systems
+ * @private
+ */
+ gridProto._initCartesian = function (gridModel, ecModel, api) {
+ var axisPositionUsed = {
+ left: false,
+ right: false,
+ top: false,
+ bottom: false
+ };
+
+ var axesMap = {
+ x: {},
+ y: {}
+ };
+ var axesCount = {
+ x: 0,
+ y: 0
+ };
+
+ /// Create axis
+ ecModel.eachComponent('xAxis', createAxisCreator('x'), this);
+ ecModel.eachComponent('yAxis', createAxisCreator('y'), this);
+
+ if (!axesCount.x || !axesCount.y) {
+ // Roll back when there no either x or y axis
+ this._axesMap = {};
+ this._axesList = [];
+ return;
+ }
+
+ this._axesMap = axesMap;
+
+ /// Create cartesian2d
+ each(axesMap.x, function (xAxis, xAxisIndex) {
+ each(axesMap.y, function (yAxis, yAxisIndex) {
+ var key = 'x' + xAxisIndex + 'y' + yAxisIndex;
+ var cartesian = new Cartesian2D(key);
+
+ cartesian.grid = this;
+
+ this._coordsMap[key] = cartesian;
+ this._coordsList.push(cartesian);
+
+ cartesian.addAxis(xAxis);
+ cartesian.addAxis(yAxis);
+ }, this);
+ }, this);
+
+ function createAxisCreator(axisType) {
+ return function (axisModel, idx) {
+ if (!isAxisUsedInTheGrid(axisModel, gridModel, ecModel)) {
+ return;
+ }
+
+ var axisPosition = axisModel.get('position');
+ if (axisType === 'x') {
+ // Fix position
+ if (axisPosition !== 'top' && axisPosition !== 'bottom') {
+ // Default bottom of X
+ axisPosition = 'bottom';
+ }
+ if (axisPositionUsed[axisPosition]) {
+ axisPosition = axisPosition === 'top' ? 'bottom' : 'top';
+ }
+ }
+ else {
+ // Fix position
+ if (axisPosition !== 'left' && axisPosition !== 'right') {
+ // Default left of Y
+ axisPosition = 'left';
+ }
+ if (axisPositionUsed[axisPosition]) {
+ axisPosition = axisPosition === 'left' ? 'right' : 'left';
+ }
+ }
+ axisPositionUsed[axisPosition] = true;
+
+ var axis = new Axis2D(
+ axisType, axisHelper.createScaleByModel(axisModel),
+ [0, 0],
+ axisModel.get('type'),
+ axisPosition
+ );
+
+ var isCategory = axis.type === 'category';
+ axis.onBand = isCategory && axisModel.get('boundaryGap');
+ axis.inverse = axisModel.get('inverse');
+
+ axis.onZero = axisModel.get('axisLine.onZero');
+
+ // Inject axis into axisModel
+ axisModel.axis = axis;
+
+ // Inject axisModel into axis
+ axis.model = axisModel;
+
+ // Index of axis, can be used as key
+ axis.index = idx;
+
+ this._axesList.push(axis);
+
+ axesMap[axisType][idx] = axis;
+ axesCount[axisType]++;
+ };
+ }
+ };
+
+ /**
+ * Update cartesian properties from series
+ * @param {module:echarts/model/Option} option
+ * @private
+ */
+ gridProto._updateScale = function (ecModel, gridModel) {
+ // Reset scale
+ zrUtil.each(this._axesList, function (axis) {
+ axis.scale.setExtent(Infinity, -Infinity);
+ });
+ ecModel.eachSeries(function (seriesModel) {
+ if (seriesModel.get('coordinateSystem') === 'cartesian2d') {
+ var xAxisIndex = seriesModel.get('xAxisIndex');
+ var yAxisIndex = seriesModel.get('yAxisIndex');
+
+ var xAxisModel = ecModel.getComponent('xAxis', xAxisIndex);
+ var yAxisModel = ecModel.getComponent('yAxis', yAxisIndex);
+
+ if (!isAxisUsedInTheGrid(xAxisModel, gridModel, ecModel)
+ || !isAxisUsedInTheGrid(yAxisModel, gridModel, ecModel)
+ ) {
+ return;
+ }
+
+ var cartesian = this.getCartesian(xAxisIndex, yAxisIndex);
+ var data = seriesModel.getData();
+ var xAxis = cartesian.getAxis('x');
+ var yAxis = cartesian.getAxis('y');
+
+ if (data.type === 'list') {
+ unionExtent(data, xAxis, seriesModel);
+ unionExtent(data, yAxis, seriesModel);
+ }
+ }
+ }, this);
+
+ function unionExtent(data, axis, seriesModel) {
+ each(seriesModel.coordDimToDataDim(axis.dim), function (dim) {
+ axis.scale.unionExtent(data.getDataExtent(
+ dim, axis.scale.type !== 'ordinal'
+ ));
+ });
+ }
+ };
+
+ /**
+ * @inner
+ */
+ function updateAxisTransfrom(axis, coordBase) {
+ var axisExtent = axis.getExtent();
+ var axisExtentSum = axisExtent[0] + axisExtent[1];
+
+ // Fast transform
+ axis.toGlobalCoord = axis.dim === 'x'
+ ? function (coord) {
+ return coord + coordBase;
+ }
+ : function (coord) {
+ return axisExtentSum - coord + coordBase;
+ };
+ axis.toLocalCoord = axis.dim === 'x'
+ ? function (coord) {
+ return coord - coordBase;
+ }
+ : function (coord) {
+ return axisExtentSum - coord + coordBase;
+ };
+ }
+
+ Grid.create = function (ecModel, api) {
+ var grids = [];
+ ecModel.eachComponent('grid', function (gridModel, idx) {
+ var grid = new Grid(gridModel, ecModel, api);
+ grid.name = 'grid_' + idx;
+ grid.resize(gridModel, api);
+
+ gridModel.coordinateSystem = grid;
+
+ grids.push(grid);
+ });
+
+ // Inject the coordinateSystems into seriesModel
+ ecModel.eachSeries(function (seriesModel) {
+ if (seriesModel.get('coordinateSystem') !== 'cartesian2d') {
+ return;
+ }
+ var xAxisIndex = seriesModel.get('xAxisIndex');
+ // TODO Validate
+ var xAxisModel = ecModel.getComponent('xAxis', xAxisIndex);
+ var grid = grids[xAxisModel.get('gridIndex')];
+ seriesModel.coordinateSystem = grid.getCartesian(
+ xAxisIndex, seriesModel.get('yAxisIndex')
+ );
+ });
+
+ return grids;
+ };
+
+ // For deciding which dimensions to use when creating list data
+ Grid.dimensions = Cartesian2D.prototype.dimensions;
+
+ __webpack_require__(25).register('cartesian2d', Grid);
+
+ module.exports = Grid;
+
+
+/***/ },
+/* 108 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var OrdinalScale = __webpack_require__(109);
+ var IntervalScale = __webpack_require__(111);
+ __webpack_require__(112);
+ __webpack_require__(113);
+ var Scale = __webpack_require__(110);
+
+ var numberUtil = __webpack_require__(7);
+ var zrUtil = __webpack_require__(3);
+ var textContain = __webpack_require__(14);
+ var axisHelper = {};
+
+ /**
+ * Get axis scale extent before niced.
+ */
+ axisHelper.getScaleExtent = function (axis, model) {
+ var scale = axis.scale;
+ var originalExtent = scale.getExtent();
+ var span = originalExtent[1] - originalExtent[0];
+ if (scale.type === 'ordinal') {
+ // If series has no data, scale extent may be wrong
+ if (!isFinite(span)) {
+ return [0, 0];
+ }
+ else {
+ return originalExtent;
+ }
+ }
+ var min = model.getMin ? model.getMin() : model.get('min');
+ var max = model.getMax ? model.getMax() : model.get('max');
+ var crossZero = model.getNeedCrossZero
+ ? model.getNeedCrossZero() : !model.get('scale');
+ var boundaryGap = model.get('boundaryGap');
+ if (!zrUtil.isArray(boundaryGap)) {
+ boundaryGap = [boundaryGap || 0, boundaryGap || 0];
+ }
+ boundaryGap[0] = numberUtil.parsePercent(boundaryGap[0], 1);
+ boundaryGap[1] = numberUtil.parsePercent(boundaryGap[1], 1);
+ var fixMin = true;
+ var fixMax = true;
+ // Add boundary gap
+ if (min == null) {
+ min = originalExtent[0] - boundaryGap[0] * span;
+ fixMin = false;
+ }
+ if (max == null) {
+ max = originalExtent[1] + boundaryGap[1] * span;
+ fixMax = false;
+ }
+ // TODO Only one data
+ if (min === 'dataMin') {
+ min = originalExtent[0];
+ }
+ if (max === 'dataMax') {
+ max = originalExtent[1];
+ }
+ // Evaluate if axis needs cross zero
+ if (crossZero) {
+ // Axis is over zero and min is not set
+ if (min > 0 && max > 0 && !fixMin) {
+ min = 0;
+ }
+ // Axis is under zero and max is not set
+ if (min < 0 && max < 0 && !fixMax) {
+ max = 0;
+ }
+ }
+ return [min, max];
+ };
+
+ axisHelper.niceScaleExtent = function (axis, model) {
+ var scale = axis.scale;
+ var extent = axisHelper.getScaleExtent(axis, model);
+ var fixMin = (model.getMin ? model.getMin() : model.get('min')) != null;
+ var fixMax = (model.getMax ? model.getMax() : model.get('max')) != null;
+ scale.setExtent(extent[0], extent[1]);
+ scale.niceExtent(model.get('splitNumber'), fixMin, fixMax);
+
+ // If some one specified the min, max. And the default calculated interval
+ // is not good enough. He can specify the interval. It is often appeared
+ // in angle axis with angle 0 - 360. Interval calculated in interval scale is hard
+ // to be 60.
+ // FIXME
+ var interval = model.get('interval');
+ if (interval != null) {
+ scale.setInterval && scale.setInterval(interval);
+ }
+ };
+
+ /**
+ * @param {module:echarts/model/Model} model
+ * @param {string} [axisType] Default retrieve from model.type
+ * @return {module:echarts/scale/*}
+ */
+ axisHelper.createScaleByModel = function(model, axisType) {
+ axisType = axisType || model.get('type');
+ if (axisType) {
+ switch (axisType) {
+ // Buildin scale
+ case 'category':
+ return new OrdinalScale(
+ model.getCategories(), [Infinity, -Infinity]
+ );
+ case 'value':
+ return new IntervalScale();
+ // Extended scale, like time and log
+ default:
+ return (Scale.getClass(axisType) || IntervalScale).create(model);
+ }
+ }
+ };
+
+ /**
+ * Check if the axis corss 0
+ */
+ axisHelper.ifAxisCrossZero = function (axis) {
+ var dataExtent = axis.scale.getExtent();
+ var min = dataExtent[0];
+ var max = dataExtent[1];
+ return !((min > 0 && max > 0) || (min < 0 && max < 0));
+ };
+
+ /**
+ * @param {Array.<number>} tickCoords In axis self coordinate.
+ * @param {Array.<string>} labels
+ * @param {string} font
+ * @param {boolean} isAxisHorizontal
+ * @return {number}
+ */
+ axisHelper.getAxisLabelInterval = function (tickCoords, labels, font, isAxisHorizontal) {
+ // FIXME
+ // ä¸åŒè§’çš„axiså’Œlabel,ä¸åªæ˜¯horizontalå’Œvertical.
+
+ var textSpaceTakenRect;
+ var autoLabelInterval = 0;
+ var accumulatedLabelInterval = 0;
+
+ var step = 1;
+ if (labels.length > 40) {
+ // Simple optimization for large amount of labels
+ step = Math.round(labels.length / 40);
+ }
+ for (var i = 0; i < tickCoords.length; i += step) {
+ var tickCoord = tickCoords[i];
+ var rect = textContain.getBoundingRect(
+ labels[i], font, 'center', 'top'
+ );
+ rect[isAxisHorizontal ? 'x' : 'y'] += tickCoord;
+ rect[isAxisHorizontal ? 'width' : 'height'] *= 1.5;
+ if (!textSpaceTakenRect) {
+ textSpaceTakenRect = rect.clone();
+ }
+ // There is no space for current label;
+ else if (textSpaceTakenRect.intersect(rect)) {
+ accumulatedLabelInterval++;
+ autoLabelInterval = Math.max(autoLabelInterval, accumulatedLabelInterval);
+ }
+ else {
+ textSpaceTakenRect.union(rect);
+ // Reset
+ accumulatedLabelInterval = 0;
+ }
+ }
+ if (autoLabelInterval === 0 && step > 1) {
+ return step;
+ }
+ return autoLabelInterval * step;
+ };
+
+ /**
+ * @param {Object} axis
+ * @param {Function} labelFormatter
+ * @return {Array.<string>}
+ */
+ axisHelper.getFormattedLabels = function (axis, labelFormatter) {
+ var scale = axis.scale;
+ var labels = scale.getTicksLabels();
+ var ticks = scale.getTicks();
+ if (typeof labelFormatter === 'string') {
+ labelFormatter = (function (tpl) {
+ return function (val) {
+ return tpl.replace('{value}', val);
+ };
+ })(labelFormatter);
+ return zrUtil.map(labels, labelFormatter);
+ }
+ else if (typeof labelFormatter === 'function') {
+ return zrUtil.map(ticks, function (tick, idx) {
+ return labelFormatter(
+ axis.type === 'category' ? scale.getLabel(tick) : tick,
+ idx
+ );
+ }, this);
+ }
+ else {
+ return labels;
+ }
+ };
+
+ module.exports = axisHelper;
+
+
+/***/ },
+/* 109 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Linear continuous scale
+ * @module echarts/coord/scale/Ordinal
+ *
+ * http://en.wikipedia.org/wiki/Level_of_measurement
+ */
+
+ // FIXME only one data
+
+
+ var zrUtil = __webpack_require__(3);
+ var Scale = __webpack_require__(110);
+
+ var scaleProto = Scale.prototype;
+
+ var OrdinalScale = Scale.extend({
+
+ type: 'ordinal',
+
+ init: function (data, extent) {
+ this._data = data;
+ this._extent = extent || [0, data.length - 1];
+ },
+
+ parse: function (val) {
+ return typeof val === 'string'
+ ? zrUtil.indexOf(this._data, val)
+ // val might be float.
+ : Math.round(val);
+ },
+
+ contain: function (rank) {
+ rank = this.parse(rank);
+ return scaleProto.contain.call(this, rank)
+ && this._data[rank] != null;
+ },
+
+ /**
+ * Normalize given rank or name to linear [0, 1]
+ * @param {number|string} [val]
+ * @return {number}
+ */
+ normalize: function (val) {
+ return scaleProto.normalize.call(this, this.parse(val));
+ },
+
+ scale: function (val) {
+ return Math.round(scaleProto.scale.call(this, val));
+ },
+
+ /**
+ * @return {Array}
+ */
+ getTicks: function () {
+ var ticks = [];
+ var extent = this._extent;
+ var rank = extent[0];
+
+ while (rank <= extent[1]) {
+ ticks.push(rank);
+ rank++;
+ }
+
+ return ticks;
+ },
+
+ /**
+ * Get item on rank n
+ * @param {number} n
+ * @return {string}
+ */
+ getLabel: function (n) {
+ return this._data[n];
+ },
+
+ /**
+ * @return {number}
+ */
+ count: function () {
+ return this._extent[1] - this._extent[0] + 1;
+ },
+
+ niceTicks: zrUtil.noop,
+ niceExtent: zrUtil.noop
+ });
+
+ /**
+ * @return {module:echarts/scale/Time}
+ */
+ OrdinalScale.create = function () {
+ return new OrdinalScale();
+ };
+
+ module.exports = OrdinalScale;
+
+
+/***/ },
+/* 110 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * // Scale class management
+ * @module echarts/scale/Scale
+ */
+
+
+ var clazzUtil = __webpack_require__(9);
+
+ function Scale() {
+ /**
+ * Extent
+ * @type {Array.<number>}
+ * @protected
+ */
+ this._extent = [Infinity, -Infinity];
+
+ /**
+ * Step is calculated in adjustExtent
+ * @type {Array.<number>}
+ * @protected
+ */
+ this._interval = 0;
+
+ this.init && this.init.apply(this, arguments);
+ }
+
+ var scaleProto = Scale.prototype;
+
+ /**
+ * Parse input val to valid inner number.
+ * @param {*} val
+ * @return {number}
+ */
+ scaleProto.parse = function (val) {
+ // Notice: This would be a trap here, If the implementation
+ // of this method depends on extent, and this method is used
+ // before extent set (like in dataZoom), it would be wrong.
+ // Nevertheless, parse does not depend on extent generally.
+ return val;
+ };
+
+ scaleProto.contain = function (val) {
+ var extent = this._extent;
+ return val >= extent[0] && val <= extent[1];
+ };
+
+ /**
+ * Normalize value to linear [0, 1], return 0.5 if extent span is 0
+ * @param {number} val
+ * @return {number}
+ */
+ scaleProto.normalize = function (val) {
+ var extent = this._extent;
+ if (extent[1] === extent[0]) {
+ return 0.5;
+ }
+ return (val - extent[0]) / (extent[1] - extent[0]);
+ };
+
+ /**
+ * Scale normalized value
+ * @param {number} val
+ * @return {number}
+ */
+ scaleProto.scale = function (val) {
+ var extent = this._extent;
+ return val * (extent[1] - extent[0]) + extent[0];
+ };
+
+ /**
+ * Set extent from data
+ * @param {Array.<number>} other
+ */
+ scaleProto.unionExtent = function (other) {
+ var extent = this._extent;
+ other[0] < extent[0] && (extent[0] = other[0]);
+ other[1] > extent[1] && (extent[1] = other[1]);
+ // not setExtent because in log axis it may transformed to power
+ // this.setExtent(extent[0], extent[1]);
+ };
+
+ /**
+ * Get extent
+ * @return {Array.<number>}
+ */
+ scaleProto.getExtent = function () {
+ return this._extent.slice();
+ };
+
+ /**
+ * Set extent
+ * @param {number} start
+ * @param {number} end
+ */
+ scaleProto.setExtent = function (start, end) {
+ var thisExtent = this._extent;
+ if (!isNaN(start)) {
+ thisExtent[0] = start;
+ }
+ if (!isNaN(end)) {
+ thisExtent[1] = end;
+ }
+ };
+
+ /**
+ * @return {Array.<string>}
+ */
+ scaleProto.getTicksLabels = function () {
+ var labels = [];
+ var ticks = this.getTicks();
+ for (var i = 0; i < ticks.length; i++) {
+ labels.push(this.getLabel(ticks[i]));
+ }
+ return labels;
+ };
+
+ clazzUtil.enableClassExtend(Scale);
+ clazzUtil.enableClassManagement(Scale, {
+ registerWhenExtend: true
+ });
+
+ module.exports = Scale;
+
+
+/***/ },
+/* 111 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Interval scale
+ * @module echarts/scale/Interval
+ */
+
+
+
+ var numberUtil = __webpack_require__(7);
+ var formatUtil = __webpack_require__(6);
+ var Scale = __webpack_require__(110);
+
+ var mathFloor = Math.floor;
+ var mathCeil = Math.ceil;
+ /**
+ * @alias module:echarts/coord/scale/Interval
+ * @constructor
+ */
+ var IntervalScale = Scale.extend({
+
+ type: 'interval',
+
+ _interval: 0,
+
+ setExtent: function (start, end) {
+ var thisExtent = this._extent;
+ //start,end may be a Number like '25',so...
+ if (!isNaN(start)) {
+ thisExtent[0] = parseFloat(start);
+ }
+ if (!isNaN(end)) {
+ thisExtent[1] = parseFloat(end);
+ }
+ },
+
+ unionExtent: function (other) {
+ var extent = this._extent;
+ other[0] < extent[0] && (extent[0] = other[0]);
+ other[1] > extent[1] && (extent[1] = other[1]);
+
+ // unionExtent may called by it's sub classes
+ IntervalScale.prototype.setExtent.call(this, extent[0], extent[1]);
+ },
+ /**
+ * Get interval
+ */
+ getInterval: function () {
+ if (!this._interval) {
+ this.niceTicks();
+ }
+ return this._interval;
+ },
+
+ /**
+ * Set interval
+ */
+ setInterval: function (interval) {
+ this._interval = interval;
+ // Dropped auto calculated niceExtent and use user setted extent
+ // We assume user wan't to set both interval, min, max to get a better result
+ this._niceExtent = this._extent.slice();
+ },
+
+ /**
+ * @return {Array.<number>}
+ */
+ getTicks: function () {
+ if (!this._interval) {
+ this.niceTicks();
+ }
+ var interval = this._interval;
+ var extent = this._extent;
+ var ticks = [];
+
+ // Consider this case: using dataZoom toolbox, zoom and zoom.
+ var safeLimit = 10000;
+
+ if (interval) {
+ var niceExtent = this._niceExtent;
+ if (extent[0] < niceExtent[0]) {
+ ticks.push(extent[0]);
+ }
+ var tick = niceExtent[0];
+ while (tick <= niceExtent[1]) {
+ ticks.push(tick);
+ // Avoid rounding error
+ tick = numberUtil.round(tick + interval);
+ if (ticks.length > safeLimit) {
+ return [];
+ }
+ }
+ if (extent[1] > niceExtent[1]) {
+ ticks.push(extent[1]);
+ }
+ }
+
+ return ticks;
+ },
+
+ /**
+ * @return {Array.<string>}
+ */
+ getTicksLabels: function () {
+ var labels = [];
+ var ticks = this.getTicks();
+ for (var i = 0; i < ticks.length; i++) {
+ labels.push(this.getLabel(ticks[i]));
+ }
+ return labels;
+ },
+
+ /**
+ * @param {number} n
+ * @return {number}
+ */
+ getLabel: function (data) {
+ return formatUtil.addCommas(data);
+ },
+
+ /**
+ * Update interval and extent of intervals for nice ticks
+ *
+ * @param {number} [splitNumber = 5] Desired number of ticks
+ */
+ niceTicks: function (splitNumber) {
+ splitNumber = splitNumber || 5;
+ var extent = this._extent;
+ var span = extent[1] - extent[0];
+ if (!isFinite(span)) {
+ return;
+ }
+ // User may set axis min 0 and data are all negative
+ // FIXME If it needs to reverse ?
+ if (span < 0) {
+ span = -span;
+ extent.reverse();
+ }
+
+ // From "Nice Numbers for Graph Labels" of Graphic Gems
+ // var niceSpan = numberUtil.nice(span, false);
+ var step = numberUtil.nice(span / splitNumber, true);
+
+ // Niced extent inside original extent
+ var niceExtent = [
+ numberUtil.round(mathCeil(extent[0] / step) * step),
+ numberUtil.round(mathFloor(extent[1] / step) * step)
+ ];
+
+ this._interval = step;
+ this._niceExtent = niceExtent;
+ },
+
+ /**
+ * Nice extent.
+ * @param {number} [splitNumber = 5] Given approx tick number
+ * @param {boolean} [fixMin=false]
+ * @param {boolean} [fixMax=false]
+ */
+ niceExtent: function (splitNumber, fixMin, fixMax) {
+ var extent = this._extent;
+ // If extent start and end are same, expand them
+ if (extent[0] === extent[1]) {
+ if (extent[0] !== 0) {
+ // Expand extent
+ var expandSize = extent[0] / 2;
+ extent[0] -= expandSize;
+ extent[1] += expandSize;
+ }
+ else {
+ extent[1] = 1;
+ }
+ }
+ var span = extent[1] - extent[0];
+ // If there are no data and extent are [Infinity, -Infinity]
+ if (!isFinite(span)) {
+ extent[0] = 0;
+ extent[1] = 1;
+ }
+
+ this.niceTicks(splitNumber);
+
+ // var extent = this._extent;
+ var interval = this._interval;
+
+ if (!fixMin) {
+ extent[0] = numberUtil.round(mathFloor(extent[0] / interval) * interval);
+ }
+ if (!fixMax) {
+ extent[1] = numberUtil.round(mathCeil(extent[1] / interval) * interval);
+ }
+ }
+ });
+
+ /**
+ * @return {module:echarts/scale/Time}
+ */
+ IntervalScale.create = function () {
+ return new IntervalScale();
+ };
+
+ module.exports = IntervalScale;
+
+
+
+/***/ },
+/* 112 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Interval scale
+ * @module echarts/coord/scale/Time
+ */
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var numberUtil = __webpack_require__(7);
+ var formatUtil = __webpack_require__(6);
+
+ var IntervalScale = __webpack_require__(111);
+
+ var intervalScaleProto = IntervalScale.prototype;
+
+ var mathCeil = Math.ceil;
+ var mathFloor = Math.floor;
+ var ONE_DAY = 3600000 * 24;
+
+ // FIXME 公用?
+ var bisect = function (a, x, lo, hi) {
+ while (lo < hi) {
+ var mid = lo + hi >>> 1;
+ if (a[mid][2] < x) {
+ lo = mid + 1;
+ }
+ else {
+ hi = mid;
+ }
+ }
+ return lo;
+ };
+
+ /**
+ * @alias module:echarts/coord/scale/Time
+ * @constructor
+ */
+ var TimeScale = IntervalScale.extend({
+ type: 'time',
+
+ // Overwrite
+ getLabel: function (val) {
+ var stepLvl = this._stepLvl;
+
+ var date = new Date(val);
+
+ return formatUtil.formatTime(stepLvl[0], date);
+ },
+
+ // Overwrite
+ niceExtent: function (approxTickNum, fixMin, fixMax) {
+ var extent = this._extent;
+ // If extent start and end are same, expand them
+ if (extent[0] === extent[1]) {
+ // Expand extent
+ extent[0] -= ONE_DAY;
+ extent[1] += ONE_DAY;
+ }
+ // If there are no data and extent are [Infinity, -Infinity]
+ if (extent[1] === -Infinity && extent[0] === Infinity) {
+ var d = new Date();
+ extent[1] = new Date(d.getFullYear(), d.getMonth(), d.getDate());
+ extent[0] = extent[1] - ONE_DAY;
+ }
+
+ this.niceTicks(approxTickNum, fixMin, fixMax);
+
+ // var extent = this._extent;
+ var interval = this._interval;
+
+ if (!fixMin) {
+ extent[0] = numberUtil.round(mathFloor(extent[0] / interval) * interval);
+ }
+ if (!fixMax) {
+ extent[1] = numberUtil.round(mathCeil(extent[1] / interval) * interval);
+ }
+ },
+
+ // Overwrite
+ niceTicks: function (approxTickNum) {
+ approxTickNum = approxTickNum || 10;
+
+ var extent = this._extent;
+ var span = extent[1] - extent[0];
+ var approxInterval = span / approxTickNum;
+ var scaleLevelsLen = scaleLevels.length;
+ var idx = bisect(scaleLevels, approxInterval, 0, scaleLevelsLen);
+
+ var level = scaleLevels[Math.min(idx, scaleLevelsLen - 1)];
+ var interval = level[2];
+ // Same with interval scale if span is much larger than 1 year
+ if (level[0] === 'year') {
+ var yearSpan = span / interval;
+
+ // From "Nice Numbers for Graph Labels" of Graphic Gems
+ // var niceYearSpan = numberUtil.nice(yearSpan, false);
+ var yearStep = numberUtil.nice(yearSpan / approxTickNum, true);
+
+ interval *= yearStep;
+ }
+
+ var niceExtent = [
+ mathCeil(extent[0] / interval) * interval,
+ mathFloor(extent[1] / interval) * interval
+ ];
+
+ this._stepLvl = level;
+ // Interval will be used in getTicks
+ this._interval = interval;
+ this._niceExtent = niceExtent;
+ },
+
+ parse: function (val) {
+ // val might be float.
+ return +numberUtil.parseDate(val);
+ }
+ });
+
+ zrUtil.each(['contain', 'normalize'], function (methodName) {
+ TimeScale.prototype[methodName] = function (val) {
+ return intervalScaleProto[methodName].call(this, this.parse(val));
+ };
+ });
+
+ // Steps from d3
+ var scaleLevels = [
+ // Format step interval
+ ['hh:mm:ss', 1, 1000], // 1s
+ ['hh:mm:ss', 5, 1000 * 5], // 5s
+ ['hh:mm:ss', 10, 1000 * 10], // 10s
+ ['hh:mm:ss', 15, 1000 * 15], // 15s
+ ['hh:mm:ss', 30, 1000 * 30], // 30s
+ ['hh:mm\nMM-dd',1, 60000], // 1m
+ ['hh:mm\nMM-dd',5, 60000 * 5], // 5m
+ ['hh:mm\nMM-dd',10, 60000 * 10], // 10m
+ ['hh:mm\nMM-dd',15, 60000 * 15], // 15m
+ ['hh:mm\nMM-dd',30, 60000 * 30], // 30m
+ ['hh:mm\nMM-dd',1, 3600000], // 1h
+ ['hh:mm\nMM-dd',2, 3600000 * 2], // 2h
+ ['hh:mm\nMM-dd',6, 3600000 * 6], // 6h
+ ['hh:mm\nMM-dd',12, 3600000 * 12], // 12h
+ ['MM-dd\nyyyy', 1, ONE_DAY], // 1d
+ ['week', 7, ONE_DAY * 7], // 7d
+ ['month', 1, ONE_DAY * 31], // 1M
+ ['quarter', 3, ONE_DAY * 380 / 4], // 3M
+ ['half-year', 6, ONE_DAY * 380 / 2], // 6M
+ ['year', 1, ONE_DAY * 380] // 1Y
+ ];
+
+ /**
+ * @return {module:echarts/scale/Time}
+ */
+ TimeScale.create = function () {
+ return new TimeScale();
+ };
+
+ module.exports = TimeScale;
+
+
+/***/ },
+/* 113 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Log scale
+ * @module echarts/scale/Log
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+ var Scale = __webpack_require__(110);
+ var numberUtil = __webpack_require__(7);
+
+ // Use some method of IntervalScale
+ var IntervalScale = __webpack_require__(111);
+
+ var scaleProto = Scale.prototype;
+ var intervalScaleProto = IntervalScale.prototype;
+
+ var mathFloor = Math.floor;
+ var mathCeil = Math.ceil;
+ var mathPow = Math.pow;
+
+ var LOG_BASE = 10;
+ var mathLog = Math.log;
+
+ var LogScale = Scale.extend({
+
+ type: 'log',
+
+ /**
+ * @return {Array.<number>}
+ */
+ getTicks: function () {
+ return zrUtil.map(intervalScaleProto.getTicks.call(this), function (val) {
+ return numberUtil.round(mathPow(LOG_BASE, val));
+ });
+ },
+
+ /**
+ * @param {number} val
+ * @return {string}
+ */
+ getLabel: intervalScaleProto.getLabel,
+
+ /**
+ * @param {number} val
+ * @return {number}
+ */
+ scale: function (val) {
+ val = scaleProto.scale.call(this, val);
+ return mathPow(LOG_BASE, val);
+ },
+
+ /**
+ * @param {number} start
+ * @param {number} end
+ */
+ setExtent: function (start, end) {
+ start = mathLog(start) / mathLog(LOG_BASE);
+ end = mathLog(end) / mathLog(LOG_BASE);
+ intervalScaleProto.setExtent.call(this, start, end);
+ },
+
+ /**
+ * @return {number} end
+ */
+ getExtent: function () {
+ var extent = scaleProto.getExtent.call(this);
+ extent[0] = mathPow(LOG_BASE, extent[0]);
+ extent[1] = mathPow(LOG_BASE, extent[1]);
+ return extent;
+ },
+
+ /**
+ * @param {Array.<number>} extent
+ */
+ unionExtent: function (extent) {
+ extent[0] = mathLog(extent[0]) / mathLog(LOG_BASE);
+ extent[1] = mathLog(extent[1]) / mathLog(LOG_BASE);
+ scaleProto.unionExtent.call(this, extent);
+ },
+
+ /**
+ * Update interval and extent of intervals for nice ticks
+ * @param {number} [approxTickNum = 10] Given approx tick number
+ */
+ niceTicks: function (approxTickNum) {
+ approxTickNum = approxTickNum || 10;
+ var extent = this._extent;
+ var span = extent[1] - extent[0];
+ if (span === Infinity || span <= 0) {
+ return;
+ }
+
+ var interval = mathPow(10, mathFloor(mathLog(span / approxTickNum) / Math.LN10));
+ var err = approxTickNum / span * interval;
+
+ // Filter ticks to get closer to the desired count.
+ if (err <= 0.5) {
+ interval *= 10;
+ }
+ var niceExtent = [
+ numberUtil.round(mathCeil(extent[0] / interval) * interval),
+ numberUtil.round(mathFloor(extent[1] / interval) * interval)
+ ];
+
+ this._interval = interval;
+ this._niceExtent = niceExtent;
+ },
+
+ /**
+ * Nice extent.
+ * @param {number} [approxTickNum = 10] Given approx tick number
+ * @param {boolean} [fixMin=false]
+ * @param {boolean} [fixMax=false]
+ */
+ niceExtent: intervalScaleProto.niceExtent
+ });
+
+ zrUtil.each(['contain', 'normalize'], function (methodName) {
+ LogScale.prototype[methodName] = function (val) {
+ val = mathLog(val) / mathLog(LOG_BASE);
+ return scaleProto[methodName].call(this, val);
+ };
+ });
+
+ LogScale.create = function () {
+ return new LogScale();
+ };
+
+ module.exports = LogScale;
+
+
+/***/ },
+/* 114 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var zrUtil = __webpack_require__(3);
+ var Cartesian = __webpack_require__(115);
+
+ function Cartesian2D(name) {
+
+ Cartesian.call(this, name);
+ }
+
+ Cartesian2D.prototype = {
+
+ constructor: Cartesian2D,
+
+ type: 'cartesian2d',
+
+ /**
+ * @type {Array.<string>}
+ * @readOnly
+ */
+ dimensions: ['x', 'y'],
+
+ /**
+ * Base axis will be used on stacking.
+ *
+ * @return {module:echarts/coord/cartesian/Axis2D}
+ */
+ getBaseAxis: function () {
+ return this.getAxesByScale('ordinal')[0]
+ || this.getAxesByScale('time')[0]
+ || this.getAxis('x');
+ },
+
+ /**
+ * If contain point
+ * @param {Array.<number>} point
+ * @return {boolean}
+ */
+ containPoint: function (point) {
+ var axisX = this.getAxis('x');
+ var axisY = this.getAxis('y');
+ return axisX.contain(axisX.toLocalCoord(point[0]))
+ && axisY.contain(axisY.toLocalCoord(point[1]));
+ },
+
+ /**
+ * If contain data
+ * @param {Array.<number>} data
+ * @return {boolean}
+ */
+ containData: function (data) {
+ return this.getAxis('x').containData(data[0])
+ && this.getAxis('y').containData(data[1]);
+ },
+
+ /**
+ * Convert series data to an array of points
+ * @param {module:echarts/data/List} data
+ * @param {boolean} stack
+ * @return {Array}
+ * Return array of points. For example:
+ * `[[10, 10], [20, 20], [30, 30]]`
+ */
+ dataToPoints: function (data, stack) {
+ return data.mapArray(['x', 'y'], function (x, y) {
+ return this.dataToPoint([x, y]);
+ }, stack, this);
+ },
+
+ /**
+ * @param {Array.<number>} data
+ * @param {boolean} [clamp=false]
+ * @return {Array.<number>}
+ */
+ dataToPoint: function (data, clamp) {
+ var xAxis = this.getAxis('x');
+ var yAxis = this.getAxis('y');
+ return [
+ xAxis.toGlobalCoord(xAxis.dataToCoord(data[0], clamp)),
+ yAxis.toGlobalCoord(yAxis.dataToCoord(data[1], clamp))
+ ];
+ },
+
+ /**
+ * @param {Array.<number>} point
+ * @param {boolean} [clamp=false]
+ * @return {Array.<number>}
+ */
+ pointToData: function (point, clamp) {
+ var xAxis = this.getAxis('x');
+ var yAxis = this.getAxis('y');
+ return [
+ xAxis.coordToData(xAxis.toLocalCoord(point[0]), clamp),
+ yAxis.coordToData(yAxis.toLocalCoord(point[1]), clamp)
+ ];
+ },
+
+ /**
+ * Get other axis
+ * @param {module:echarts/coord/cartesian/Axis2D} axis
+ */
+ getOtherAxis: function (axis) {
+ return this.getAxis(axis.dim === 'x' ? 'y' : 'x');
+ }
+ };
+
+ zrUtil.inherits(Cartesian2D, Cartesian);
+
+ module.exports = Cartesian2D;
+
+
+/***/ },
+/* 115 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ /**
+ * Cartesian coordinate system
+ * @module echarts/coord/Cartesian
+ *
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+
+ function dimAxisMapper(dim) {
+ return this._axes[dim];
+ }
+
+ /**
+ * @alias module:echarts/coord/Cartesian
+ * @constructor
+ */
+ var Cartesian = function (name) {
+ this._axes = {};
+
+ this._dimList = [];
+
+ /**
+ * @type {string}
+ */
+ this.name = name || '';
+ };
+
+ Cartesian.prototype = {
+
+ constructor: Cartesian,
+
+ type: 'cartesian',
+
+ /**
+ * Get axis
+ * @param {number|string} dim
+ * @return {module:echarts/coord/Cartesian~Axis}
+ */
+ getAxis: function (dim) {
+ return this._axes[dim];
+ },
+
+ /**
+ * Get axes list
+ * @return {Array.<module:echarts/coord/Cartesian~Axis>}
+ */
+ getAxes: function () {
+ return zrUtil.map(this._dimList, dimAxisMapper, this);
+ },
+
+ /**
+ * Get axes list by given scale type
+ */
+ getAxesByScale: function (scaleType) {
+ scaleType = scaleType.toLowerCase();
+ return zrUtil.filter(
+ this.getAxes(),
+ function (axis) {
+ return axis.scale.type === scaleType;
+ }
+ );
+ },
+
+ /**
+ * Add axis
+ * @param {module:echarts/coord/Cartesian.Axis}
+ */
+ addAxis: function (axis) {
+ var dim = axis.dim;
+
+ this._axes[dim] = axis;
+
+ this._dimList.push(dim);
+ },
+
+ /**
+ * Convert data to coord in nd space
+ * @param {Array.<number>|Object.<string, number>} val
+ * @return {Array.<number>|Object.<string, number>}
+ */
+ dataToCoord: function (val) {
+ return this._dataCoordConvert(val, 'dataToCoord');
+ },
+
+ /**
+ * Convert coord in nd space to data
+ * @param {Array.<number>|Object.<string, number>} val
+ * @return {Array.<number>|Object.<string, number>}
+ */
+ coordToData: function (val) {
+ return this._dataCoordConvert(val, 'coordToData');
+ },
+
+ _dataCoordConvert: function (input, method) {
+ var dimList = this._dimList;
+
+ var output = input instanceof Array ? [] : {};
+
+ for (var i = 0; i < dimList.length; i++) {
+ var dim = dimList[i];
+ var axis = this._axes[dim];
+
+ output[dim] = axis[method](input[dim]);
+ }
+
+ return output;
+ }
+ };
+
+ module.exports = Cartesian;
+
+
+/***/ },
+/* 116 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var Axis = __webpack_require__(117);
+ var axisLabelInterval = __webpack_require__(118);
+
+ /**
+ * Extend axis 2d
+ * @constructor module:echarts/coord/cartesian/Axis2D
+ * @extends {module:echarts/coord/cartesian/Axis}
+ * @param {string} dim
+ * @param {*} scale
+ * @param {Array.<number>} coordExtent
+ * @param {string} axisType
+ * @param {string} position
+ */
+ var Axis2D = function (dim, scale, coordExtent, axisType, position) {
+ Axis.call(this, dim, scale, coordExtent);
+ /**
+ * Axis type
+ * - 'category'
+ * - 'value'
+ * - 'time'
+ * - 'log'
+ * @type {string}
+ */
+ this.type = axisType || 'value';
+
+ /**
+ * Axis position
+ * - 'top'
+ * - 'bottom'
+ * - 'left'
+ * - 'right'
+ */
+ this.position = position || 'bottom';
+ };
+
+ Axis2D.prototype = {
+
+ constructor: Axis2D,
+
+ /**
+ * Index of axis, can be used as key
+ */
+ index: 0,
+ /**
+ * If axis is on the zero position of the other axis
+ * @type {boolean}
+ */
+ onZero: false,
+
+ /**
+ * Axis model
+ * @param {module:echarts/coord/cartesian/AxisModel}
+ */
+ model: null,
+
+ isHorizontal: function () {
+ var position = this.position;
+ return position === 'top' || position === 'bottom';
+ },
+
+ getGlobalExtent: function () {
+ var ret = this.getExtent();
+ ret[0] = this.toGlobalCoord(ret[0]);
+ ret[1] = this.toGlobalCoord(ret[1]);
+ return ret;
+ },
+
+ /**
+ * @return {number}
+ */
+ getLabelInterval: function () {
+ var labelInterval = this._labelInterval;
+ if (!labelInterval) {
+ labelInterval = this._labelInterval = axisLabelInterval(this);
+ }
+ return labelInterval;
+ },
+
+ /**
+ * If label is ignored.
+ * Automatically used when axis is category and label can not be all shown
+ * @param {number} idx
+ * @return {boolean}
+ */
+ isLabelIgnored: function (idx) {
+ if (this.type === 'category') {
+ var labelInterval = this.getLabelInterval();
+ return ((typeof labelInterval === 'function')
+ && !labelInterval(idx, this.scale.getLabel(idx)))
+ || idx % (labelInterval + 1);
+ }
+ },
+
+ /**
+ * Transform global coord to local coord,
+ * i.e. var localCoord = axis.toLocalCoord(80);
+ * designate by module:echarts/coord/cartesian/Grid.
+ * @type {Function}
+ */
+ toLocalCoord: null,
+
+ /**
+ * Transform global coord to local coord,
+ * i.e. var globalCoord = axis.toLocalCoord(40);
+ * designate by module:echarts/coord/cartesian/Grid.
+ * @type {Function}
+ */
+ toGlobalCoord: null
+
+ };
+ zrUtil.inherits(Axis2D, Axis);
+
+ module.exports = Axis2D;
+
+
+/***/ },
+/* 117 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var numberUtil = __webpack_require__(7);
+ var linearMap = numberUtil.linearMap;
+ var zrUtil = __webpack_require__(3);
+
+ function fixExtentWithBands(extent, nTick) {
+ var size = extent[1] - extent[0];
+ var len = nTick;
+ var margin = size / len / 2;
+ extent[0] += margin;
+ extent[1] -= margin;
+ }
+
+ var normalizedExtent = [0, 1];
+ /**
+ * @name module:echarts/coord/CartesianAxis
+ * @constructor
+ */
+ var Axis = function (dim, scale, extent) {
+
+ /**
+ * Axis dimension. Such as 'x', 'y', 'z', 'angle', 'radius'
+ * @type {string}
+ */
+ this.dim = dim;
+
+ /**
+ * Axis scale
+ * @type {module:echarts/coord/scale/*}
+ */
+ this.scale = scale;
+
+ /**
+ * @type {Array.<number>}
+ * @private
+ */
+ this._extent = extent || [0, 0];
+
+ /**
+ * @type {boolean}
+ */
+ this.inverse = false;
+
+ /**
+ * Usually true when axis has a ordinal scale
+ * @type {boolean}
+ */
+ this.onBand = false;
+ };
+
+ Axis.prototype = {
+
+ constructor: Axis,
+
+ /**
+ * If axis extent contain given coord
+ * @param {number} coord
+ * @return {boolean}
+ */
+ contain: function (coord) {
+ var extent = this._extent;
+ var min = Math.min(extent[0], extent[1]);
+ var max = Math.max(extent[0], extent[1]);
+ return coord >= min && coord <= max;
+ },
+
+ /**
+ * If axis extent contain given data
+ * @param {number} data
+ * @return {boolean}
+ */
+ containData: function (data) {
+ return this.contain(this.dataToCoord(data));
+ },
+
+ /**
+ * Get coord extent.
+ * @return {Array.<number>}
+ */
+ getExtent: function () {
+ var ret = this._extent.slice();
+ return ret;
+ },
+
+ /**
+ * Get precision used for formatting
+ * @param {Array.<number>} [dataExtent]
+ * @return {number}
+ */
+ getPixelPrecision: function (dataExtent) {
+ return numberUtil.getPixelPrecision(
+ dataExtent || this.scale.getExtent(),
+ this._extent
+ );
+ },
+
+ /**
+ * Set coord extent
+ * @param {number} start
+ * @param {number} end
+ */
+ setExtent: function (start, end) {
+ var extent = this._extent;
+ extent[0] = start;
+ extent[1] = end;
+ },
+
+ /**
+ * Convert data to coord. Data is the rank if it has a ordinal scale
+ * @param {number} data
+ * @param {boolean} clamp
+ * @return {number}
+ */
+ dataToCoord: function (data, clamp) {
+ var extent = this._extent;
+ var scale = this.scale;
+ data = scale.normalize(data);
+
+ if (this.onBand && scale.type === 'ordinal') {
+ extent = extent.slice();
+ fixExtentWithBands(extent, scale.count());
+ }
+
+ return linearMap(data, normalizedExtent, extent, clamp);
+ },
+
+ /**
+ * Convert coord to data. Data is the rank if it has a ordinal scale
+ * @param {number} coord
+ * @param {boolean} clamp
+ * @return {number}
+ */
+ coordToData: function (coord, clamp) {
+ var extent = this._extent;
+ var scale = this.scale;
+
+ if (this.onBand && scale.type === 'ordinal') {
+ extent = extent.slice();
+ fixExtentWithBands(extent, scale.count());
+ }
+
+ var t = linearMap(coord, extent, normalizedExtent, clamp);
+
+ return this.scale.scale(t);
+ },
+ /**
+ * @return {Array.<number>}
+ */
+ getTicksCoords: function () {
+ if (this.onBand) {
+ var bands = this.getBands();
+ var coords = [];
+ for (var i = 0; i < bands.length; i++) {
+ coords.push(bands[i][0]);
+ }
+ if (bands[i - 1]) {
+ coords.push(bands[i - 1][1]);
+ }
+ return coords;
+ }
+ else {
+ return zrUtil.map(this.scale.getTicks(), this.dataToCoord, this);
+ }
+ },
+
+ /**
+ * Coords of labels are on the ticks or on the middle of bands
+ * @return {Array.<number>}
+ */
+ getLabelsCoords: function () {
+ if (this.onBand) {
+ var bands = this.getBands();
+ var coords = [];
+ var band;
+ for (var i = 0; i < bands.length; i++) {
+ band = bands[i];
+ coords.push((band[0] + band[1]) / 2);
+ }
+ return coords;
+ }
+ else {
+ return zrUtil.map(this.scale.getTicks(), this.dataToCoord, this);
+ }
+ },
+
+ /**
+ * Get bands.
+ *
+ * If axis has labels [1, 2, 3, 4]. Bands on the axis are
+ * |---1---|---2---|---3---|---4---|.
+ *
+ * @return {Array}
+ */
+ // FIXME Situation when labels is on ticks
+ getBands: function () {
+ var extent = this.getExtent();
+ var bands = [];
+ var len = this.scale.count();
+ var start = extent[0];
+ var end = extent[1];
+ var span = end - start;
+
+ for (var i = 0; i < len; i++) {
+ bands.push([
+ span * i / len + start,
+ span * (i + 1) / len + start
+ ]);
+ }
+ return bands;
+ },
+
+ /**
+ * Get width of band
+ * @return {number}
+ */
+ getBandWidth: function () {
+ var axisExtent = this._extent;
+ var dataExtent = this.scale.getExtent();
+
+ var len = dataExtent[1] - dataExtent[0] + (this.onBand ? 1 : 0);
+ // Fix #2728, avoid NaN when only one data.
+ len === 0 && (len = 1);
+
+ var size = Math.abs(axisExtent[1] - axisExtent[0]);
+
+ return Math.abs(size) / len;
+ }
+ };
+
+ module.exports = Axis;
+
+
+/***/ },
+/* 118 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ /**
+ * Helper function for axisLabelInterval calculation
+ */
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var axisHelper = __webpack_require__(108);
+
+ module.exports = function (axis) {
+ var axisModel = axis.model;
+ var labelModel = axisModel.getModel('axisLabel');
+ var labelInterval = labelModel.get('interval');
+ if (!(axis.type === 'category' && labelInterval === 'auto')) {
+ return labelInterval === 'auto' ? 0 : labelInterval;
+ }
+
+ return axisHelper.getAxisLabelInterval(
+ zrUtil.map(axis.scale.getTicks(), axis.dataToCoord, axis),
+ axisModel.getFormattedLabels(),
+ labelModel.getModel('textStyle').getFont(),
+ axis.isHorizontal()
+ );
+ };
+
+
+/***/ },
+/* 119 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // Grid 是在有直角å标系的时候必须è¦å­˜åœ¨çš„
+ // 所以这里也è¦è¢« Cartesian2D ä¾èµ–
+
+
+ __webpack_require__(120);
+ var ComponentModel = __webpack_require__(19);
+
+ module.exports = ComponentModel.extend({
+
+ type: 'grid',
+
+ dependencies: ['xAxis', 'yAxis'],
+
+ layoutMode: 'box',
+
+ /**
+ * @type {module:echarts/coord/cartesian/Grid}
+ */
+ coordinateSystem: null,
+
+ defaultOption: {
+ show: false,
+ zlevel: 0,
+ z: 0,
+ left: '10%',
+ top: 60,
+ right: '10%',
+ bottom: 60,
+ // If grid size contain label
+ containLabel: false,
+ // width: {totalWidth} - left - right,
+ // height: {totalHeight} - top - bottom,
+ backgroundColor: 'rgba(0,0,0,0)',
+ borderWidth: 1,
+ borderColor: '#ccc'
+ }
+ });
+
+
+/***/ },
+/* 120 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var ComponentModel = __webpack_require__(19);
+ var zrUtil = __webpack_require__(3);
+ var axisModelCreator = __webpack_require__(121);
+
+ var AxisModel = ComponentModel.extend({
+
+ type: 'cartesian2dAxis',
+
+ /**
+ * @type {module:echarts/coord/cartesian/Axis2D}
+ */
+ axis: null,
+
+ /**
+ * @override
+ */
+ init: function () {
+ AxisModel.superApply(this, 'init', arguments);
+ this._resetRange();
+ },
+
+ /**
+ * @override
+ */
+ mergeOption: function () {
+ AxisModel.superApply(this, 'mergeOption', arguments);
+ this._resetRange();
+ },
+
+ /**
+ * @override
+ */
+ restoreData: function () {
+ AxisModel.superApply(this, 'restoreData', arguments);
+ this._resetRange();
+ },
+
+ /**
+ * @public
+ * @param {number} rangeStart
+ * @param {number} rangeEnd
+ */
+ setRange: function (rangeStart, rangeEnd) {
+ this.option.rangeStart = rangeStart;
+ this.option.rangeEnd = rangeEnd;
+ },
+
+ /**
+ * @public
+ * @return {Array.<number|string|Date>}
+ */
+ getMin: function () {
+ var option = this.option;
+ return option.rangeStart != null ? option.rangeStart : option.min;
+ },
+
+ /**
+ * @public
+ * @return {Array.<number|string|Date>}
+ */
+ getMax: function () {
+ var option = this.option;
+ return option.rangeEnd != null ? option.rangeEnd : option.max;
+ },
+
+ /**
+ * @public
+ * @return {boolean}
+ */
+ getNeedCrossZero: function () {
+ var option = this.option;
+ return (option.rangeStart != null || option.rangeEnd != null)
+ ? false : !option.scale;
+ },
+
+ /**
+ * @private
+ */
+ _resetRange: function () {
+ // rangeStart and rangeEnd is readonly.
+ this.option.rangeStart = this.option.rangeEnd = null;
+ }
+
+ });
+
+ function getAxisType(axisDim, option) {
+ // Default axis with data is category axis
+ return option.type || (option.data ? 'category' : 'value');
+ }
+
+ zrUtil.merge(AxisModel.prototype, __webpack_require__(123));
+
+ var extraOption = {
+ gridIndex: 0
+ };
+
+ axisModelCreator('x', AxisModel, getAxisType, extraOption);
+ axisModelCreator('y', AxisModel, getAxisType, extraOption);
+
+ module.exports = AxisModel;
+
+
+/***/ },
+/* 121 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var axisDefault = __webpack_require__(122);
+ var zrUtil = __webpack_require__(3);
+ var ComponentModel = __webpack_require__(19);
+ var layout = __webpack_require__(21);
+
+ // FIXME axisType is fixed ?
+ var AXIS_TYPES = ['value', 'category', 'time', 'log'];
+
+ /**
+ * Generate sub axis model class
+ * @param {string} axisName 'x' 'y' 'radius' 'angle' 'parallel'
+ * @param {module:echarts/model/Component} BaseAxisModelClass
+ * @param {Function} axisTypeDefaulter
+ * @param {Object} [extraDefaultOption]
+ */
+ module.exports = function (axisName, BaseAxisModelClass, axisTypeDefaulter, extraDefaultOption) {
+
+ zrUtil.each(AXIS_TYPES, function (axisType) {
+
+ BaseAxisModelClass.extend({
+
+ type: axisName + 'Axis.' + axisType,
+
+ mergeDefaultAndTheme: function (option, ecModel) {
+ var layoutMode = this.layoutMode;
+ var inputPositionParams = layoutMode
+ ? layout.getLayoutParams(option) : {};
+
+ var themeModel = ecModel.getTheme();
+ zrUtil.merge(option, themeModel.get(axisType + 'Axis'));
+ zrUtil.merge(option, this.getDefaultOption());
+
+ option.type = axisTypeDefaulter(axisName, option);
+
+ if (layoutMode) {
+ layout.mergeLayoutParam(option, inputPositionParams, layoutMode);
+ }
+ },
+
+ defaultOption: zrUtil.mergeAll(
+ [
+ {},
+ axisDefault[axisType + 'Axis'],
+ extraDefaultOption
+ ],
+ true
+ )
+ });
+ });
+
+ ComponentModel.registerSubTypeDefaulter(
+ axisName + 'Axis',
+ zrUtil.curry(axisTypeDefaulter, axisName)
+ );
+ };
+
+
+/***/ },
+/* 122 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+
+ var defaultOption = {
+ show: true,
+ zlevel: 0, // 一级层å 
+ z: 0, // 二级层å 
+ // åå‘å标轴
+ inverse: false,
+ // å标轴å字,默认为空
+ name: '',
+ // å标轴åå­—ä½ç½®ï¼Œæ”¯æŒ'start' | 'middle' | 'end'
+ nameLocation: 'end',
+ // å标轴文字样å¼ï¼Œé»˜è®¤å–全局样å¼
+ nameTextStyle: {},
+ // 文字与轴线è·ç¦»
+ nameGap: 15,
+ // å标轴线
+ axisLine: {
+ // 默认显示,属性show控制显示与å¦
+ show: true,
+ onZero: true,
+ // 属性lineStyle控制线æ¡æ ·å¼
+ lineStyle: {
+ color: '#333',
+ width: 1,
+ type: 'solid'
+ }
+ },
+ // å标轴å°æ ‡è®°
+ axisTick: {
+ // 属性show控制显示与å¦ï¼Œé»˜è®¤æ˜¾ç¤º
+ show: true,
+ // 控制å°æ ‡è®°æ˜¯å¦åœ¨grid里
+ inside: false,
+ // 属性length控制线长
+ length: 5,
+ // 属性lineStyle控制线æ¡æ ·å¼
+ lineStyle: {
+ color: '#333',
+ width: 1
+ }
+ },
+ // å标轴文本标签,详è§axis.axisLabel
+ axisLabel: {
+ show: true,
+ // 控制文本标签是å¦åœ¨grid里
+ inside: false,
+ rotate: 0,
+ margin: 8,
+ // formatter: null,
+ // 其余属性默认使用全局文本样å¼ï¼Œè¯¦è§TEXTSTYLE
+ textStyle: {
+ color: '#333',
+ fontSize: 12
+ }
+ },
+ // 分隔线
+ splitLine: {
+ // 默认显示,属性show控制显示与å¦
+ show: true,
+ // 属性lineStyle(详è§lineStyle)控制线æ¡æ ·å¼
+ lineStyle: {
+ color: ['#ccc'],
+ width: 1,
+ type: 'solid'
+ }
+ },
+ // 分隔区域
+ splitArea: {
+ // 默认ä¸æ˜¾ç¤ºï¼Œå±žæ€§show控制显示与å¦
+ show: false,
+ // 属性areaStyle(详è§areaStyle)控制区域样å¼
+ areaStyle: {
+ color: ['rgba(250,250,250,0.3)','rgba(200,200,200,0.3)']
+ }
+ }
+ };
+
+ var categoryAxis = zrUtil.merge({
+ // 类目起始和结æŸä¸¤ç«¯ç©ºç™½ç­–ç•¥
+ boundaryGap: true,
+ // å标轴å°æ ‡è®°
+ axisTick: {
+ interval: 'auto'
+ },
+ // å标轴文本标签,详è§axis.axisLabel
+ axisLabel: {
+ interval: 'auto'
+ }
+ }, defaultOption);
+
+ var valueAxis = zrUtil.defaults({
+ // 数值起始和结æŸä¸¤ç«¯ç©ºç™½ç­–ç•¥
+ boundaryGap: [0, 0],
+ // 最å°å€¼, è®¾ç½®æˆ 'dataMin' 则从数æ®ä¸­è®¡ç®—最å°å€¼
+ // min: null,
+ // æœ€å¤§å€¼ï¼Œè®¾ç½®æˆ 'dataMax' 则从数æ®ä¸­è®¡ç®—最大值
+ // max: null,
+ // Readonly prop, specifies start value of the range when using data zoom.
+ // rangeStart: null
+ // Readonly prop, specifies end value of the range when using data zoom.
+ // rangeEnd: null
+ // 脱离0值比例,放大èšç„¦åˆ°æœ€ç»ˆ_min,_max区间
+ // scale: false,
+ // 分割段数,默认为5
+ splitNumber: 5
+ }, defaultOption);
+
+ // FIXME
+ var timeAxis = zrUtil.defaults({
+ scale: true,
+ min: 'dataMin',
+ max: 'dataMax'
+ }, valueAxis);
+ var logAxis = zrUtil.defaults({}, valueAxis);
+ logAxis.scale = true;
+
+ module.exports = {
+ categoryAxis: categoryAxis,
+ valueAxis: valueAxis,
+ timeAxis: timeAxis,
+ logAxis: logAxis
+ };
+
+
+/***/ },
+/* 123 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var axisHelper = __webpack_require__(108);
+
+ function getName(obj) {
+ if (zrUtil.isObject(obj) && obj.value != null) {
+ return obj.value;
+ }
+ else {
+ return obj;
+ }
+ }
+ /**
+ * Get categories
+ */
+ function getCategories() {
+ return this.get('type') === 'category'
+ && zrUtil.map(this.get('data'), getName);
+ }
+
+ /**
+ * Format labels
+ * @return {Array.<string>}
+ */
+ function getFormattedLabels() {
+ return axisHelper.getFormattedLabels(
+ this.axis,
+ this.get('axisLabel.formatter')
+ );
+ }
+
+ module.exports = {
+
+ getFormattedLabels: getFormattedLabels,
+
+ getCategories: getCategories
+ };
+
+
+/***/ },
+/* 124 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // TODO boundaryGap
+
+
+ __webpack_require__(120);
+
+ __webpack_require__(125);
+
+
+/***/ },
+/* 125 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var graphic = __webpack_require__(42);
+ var AxisBuilder = __webpack_require__(126);
+ var ifIgnoreOnTick = AxisBuilder.ifIgnoreOnTick;
+ var getInterval = AxisBuilder.getInterval;
+
+ var axisBuilderAttrs = [
+ 'axisLine', 'axisLabel', 'axisTick', 'axisName'
+ ];
+ var selfBuilderAttrs = [
+ 'splitLine', 'splitArea'
+ ];
+
+ var AxisView = __webpack_require__(1).extendComponentView({
+
+ type: 'axis',
+
+ render: function (axisModel, ecModel) {
+
+ this.group.removeAll();
+
+ if (!axisModel.get('show')) {
+ return;
+ }
+
+ var gridModel = ecModel.getComponent('grid', axisModel.get('gridIndex'));
+
+ var layout = layoutAxis(gridModel, axisModel);
+
+ var axisBuilder = new AxisBuilder(axisModel, layout);
+
+ zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);
+
+ this.group.add(axisBuilder.getGroup());
+
+ zrUtil.each(selfBuilderAttrs, function (name) {
+ if (axisModel.get(name +'.show')) {
+ this['_' + name](axisModel, gridModel, layout.labelInterval);
+ }
+ }, this);
+ },
+
+ /**
+ * @param {module:echarts/coord/cartesian/AxisModel} axisModel
+ * @param {module:echarts/coord/cartesian/GridModel} gridModel
+ * @param {number|Function} labelInterval
+ * @private
+ */
+ _splitLine: function (axisModel, gridModel, labelInterval) {
+ var axis = axisModel.axis;
+
+ var splitLineModel = axisModel.getModel('splitLine');
+ var lineStyleModel = splitLineModel.getModel('lineStyle');
+ var lineWidth = lineStyleModel.get('width');
+ var lineColors = lineStyleModel.get('color');
+
+ var lineInterval = getInterval(splitLineModel, labelInterval);
+
+ lineColors = zrUtil.isArray(lineColors) ? lineColors : [lineColors];
+
+ var gridRect = gridModel.coordinateSystem.getRect();
+ var isHorizontal = axis.isHorizontal();
+
+ var splitLines = [];
+ var lineCount = 0;
+
+ var ticksCoords = axis.getTicksCoords();
+
+ var p1 = [];
+ var p2 = [];
+ for (var i = 0; i < ticksCoords.length; i++) {
+ if (ifIgnoreOnTick(axis, i, lineInterval)) {
+ continue;
+ }
+
+ var tickCoord = axis.toGlobalCoord(ticksCoords[i]);
+
+ if (isHorizontal) {
+ p1[0] = tickCoord;
+ p1[1] = gridRect.y;
+ p2[0] = tickCoord;
+ p2[1] = gridRect.y + gridRect.height;
+ }
+ else {
+ p1[0] = gridRect.x;
+ p1[1] = tickCoord;
+ p2[0] = gridRect.x + gridRect.width;
+ p2[1] = tickCoord;
+ }
+
+ var colorIndex = (lineCount++) % lineColors.length;
+ splitLines[colorIndex] = splitLines[colorIndex] || [];
+ splitLines[colorIndex].push(new graphic.Line(graphic.subPixelOptimizeLine({
+ shape: {
+ x1: p1[0],
+ y1: p1[1],
+ x2: p2[0],
+ y2: p2[1]
+ },
+ style: {
+ lineWidth: lineWidth
+ },
+ silent: true
+ })));
+ }
+
+ // Simple optimization
+ // Batching the lines if color are the same
+ var lineStyle = lineStyleModel.getLineStyle();
+ for (var i = 0; i < splitLines.length; i++) {
+ this.group.add(graphic.mergePath(splitLines[i], {
+ style: zrUtil.defaults({
+ stroke: lineColors[i % lineColors.length]
+ }, lineStyle),
+ silent: true
+ }));
+ }
+ },
+
+ /**
+ * @param {module:echarts/coord/cartesian/AxisModel} axisModel
+ * @param {module:echarts/coord/cartesian/GridModel} gridModel
+ * @param {number|Function} labelInterval
+ * @private
+ */
+ _splitArea: function (axisModel, gridModel, labelInterval) {
+ var axis = axisModel.axis;
+
+ var splitAreaModel = axisModel.getModel('splitArea');
+ var areaStyleModel = splitAreaModel.getModel('areaStyle');
+ var areaColors = areaStyleModel.get('color');
+
+ var gridRect = gridModel.coordinateSystem.getRect();
+ var ticksCoords = axis.getTicksCoords();
+
+ var prevX = axis.toGlobalCoord(ticksCoords[0]);
+ var prevY = axis.toGlobalCoord(ticksCoords[0]);
+
+ var splitAreaRects = [];
+ var count = 0;
+
+ var areaInterval = getInterval(splitAreaModel, labelInterval);
+
+ areaColors = zrUtil.isArray(areaColors) ? areaColors : [areaColors];
+
+ for (var i = 1; i < ticksCoords.length; i++) {
+ if (ifIgnoreOnTick(axis, i, areaInterval)) {
+ continue;
+ }
+
+ var tickCoord = axis.toGlobalCoord(ticksCoords[i]);
+
+ var x;
+ var y;
+ var width;
+ var height;
+ if (axis.isHorizontal()) {
+ x = prevX;
+ y = gridRect.y;
+ width = tickCoord - x;
+ height = gridRect.height;
+ }
+ else {
+ x = gridRect.x;
+ y = prevY;
+ width = gridRect.width;
+ height = tickCoord - y;
+ }
+
+ var colorIndex = (count++) % areaColors.length;
+ splitAreaRects[colorIndex] = splitAreaRects[colorIndex] || [];
+ splitAreaRects[colorIndex].push(new graphic.Rect({
+ shape: {
+ x: x,
+ y: y,
+ width: width,
+ height: height
+ },
+ silent: true
+ }));
+
+ prevX = x + width;
+ prevY = y + height;
+ }
+
+ // Simple optimization
+ // Batching the rects if color are the same
+ var areaStyle = areaStyleModel.getAreaStyle();
+ for (var i = 0; i < splitAreaRects.length; i++) {
+ this.group.add(graphic.mergePath(splitAreaRects[i], {
+ style: zrUtil.defaults({
+ fill: areaColors[i % areaColors.length]
+ }, areaStyle),
+ silent: true
+ }));
+ }
+ }
+ });
+
+ AxisView.extend({
+ type: 'xAxis'
+ });
+ AxisView.extend({
+ type: 'yAxis'
+ });
+
+ /**
+ * @inner
+ */
+ function layoutAxis(gridModel, axisModel) {
+ var grid = gridModel.coordinateSystem;
+ var axis = axisModel.axis;
+ var layout = {};
+
+ var rawAxisPosition = axis.position;
+ var axisPosition = axis.onZero ? 'onZero' : rawAxisPosition;
+ var axisDim = axis.dim;
+
+ // [left, right, top, bottom]
+ var rect = grid.getRect();
+ var rectBound = [rect.x, rect.x + rect.width, rect.y, rect.y + rect.height];
+
+ var posMap = {
+ x: {top: rectBound[2], bottom: rectBound[3]},
+ y: {left: rectBound[0], right: rectBound[1]}
+ };
+ posMap.x.onZero = Math.max(Math.min(getZero('y'), posMap.x.bottom), posMap.x.top);
+ posMap.y.onZero = Math.max(Math.min(getZero('x'), posMap.y.right), posMap.y.left);
+
+ function getZero(dim, val) {
+ var theAxis = grid.getAxis(dim);
+ return theAxis.toGlobalCoord(theAxis.dataToCoord(0));
+ }
+
+ // Axis position
+ layout.position = [
+ axisDim === 'y' ? posMap.y[axisPosition] : rectBound[0],
+ axisDim === 'x' ? posMap.x[axisPosition] : rectBound[3]
+ ];
+
+ // Axis rotation
+ var r = {x: 0, y: 1};
+ layout.rotation = Math.PI / 2 * r[axisDim];
+
+ // Tick and label direction, x y is axisDim
+ var dirMap = {top: -1, bottom: 1, left: -1, right: 1};
+
+ layout.labelDirection = layout.tickDirection = layout.nameDirection = dirMap[rawAxisPosition];
+ if (axis.onZero) {
+ layout.labelOffset = posMap[axisDim][rawAxisPosition] - posMap[axisDim].onZero;
+ }
+
+ if (axisModel.getModel('axisTick').get('inside')) {
+ layout.tickDirection = -layout.tickDirection;
+ }
+ if (axisModel.getModel('axisLabel').get('inside')) {
+ layout.labelDirection = -layout.labelDirection;
+ }
+
+ // Special label rotation
+ var labelRotation = axisModel.getModel('axisLabel').get('rotate');
+ layout.labelRotation = axisPosition === 'top' ? -labelRotation : labelRotation;
+
+ // label interval when auto mode.
+ layout.labelInterval = axis.getLabelInterval();
+
+ // Over splitLine and splitArea
+ layout.z2 = 1;
+
+ return layout;
+ }
+
+
+/***/ },
+/* 126 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var graphic = __webpack_require__(42);
+ var Model = __webpack_require__(8);
+ var numberUtil = __webpack_require__(7);
+ var remRadian = numberUtil.remRadian;
+ var isRadianAroundZero = numberUtil.isRadianAroundZero;
+
+ var PI = Math.PI;
+
+ /**
+ * A final axis is translated and rotated from a "standard axis".
+ * So opt.position and opt.rotation is required.
+ *
+ * A standard axis is and axis from [0, 0] to [0, axisExtent[1]],
+ * for example: (0, 0) ------------> (0, 50)
+ *
+ * nameDirection or tickDirection or labelDirection is 1 means tick
+ * or label is below the standard axis, whereas is -1 means above
+ * the standard axis. labelOffset means offset between label and axis,
+ * which is useful when 'onZero', where axisLabel is in the grid and
+ * label in outside grid.
+ *
+ * Tips: like always,
+ * positive rotation represents anticlockwise, and negative rotation
+ * represents clockwise.
+ * The direction of position coordinate is the same as the direction
+ * of screen coordinate.
+ *
+ * Do not need to consider axis 'inverse', which is auto processed by
+ * axis extent.
+ *
+ * @param {module:zrender/container/Group} group
+ * @param {Object} axisModel
+ * @param {Object} opt Standard axis parameters.
+ * @param {Array.<number>} opt.position [x, y]
+ * @param {number} opt.rotation by radian
+ * @param {number} [opt.nameDirection=1] 1 or -1 Used when nameLocation is 'middle'.
+ * @param {number} [opt.tickDirection=1] 1 or -1
+ * @param {number} [opt.labelDirection=1] 1 or -1
+ * @param {number} [opt.labelOffset=0] Usefull when onZero.
+ * @param {string} [opt.axisName] default get from axisModel.
+ * @param {number} [opt.labelRotation] by degree, default get from axisModel.
+ * @param {number} [opt.labelInterval] Default label interval when label
+ * interval from model is null or 'auto'.
+ * @param {number} [opt.strokeContainThreshold] Default label interval when label
+ * @param {number} [opt.silent=true]
+ */
+ var AxisBuilder = function (axisModel, opt) {
+
+ /**
+ * @readOnly
+ */
+ this.opt = opt;
+
+ /**
+ * @readOnly
+ */
+ this.axisModel = axisModel;
+
+ // Default value
+ zrUtil.defaults(
+ opt,
+ {
+ labelOffset: 0,
+ nameDirection: 1,
+ tickDirection: 1,
+ labelDirection: 1,
+ silent: true
+ }
+ );
+
+ /**
+ * @readOnly
+ */
+ this.group = new graphic.Group({
+ position: opt.position.slice(),
+ rotation: opt.rotation
+ });
+ };
+
+ AxisBuilder.prototype = {
+
+ constructor: AxisBuilder,
+
+ hasBuilder: function (name) {
+ return !!builders[name];
+ },
+
+ add: function (name) {
+ builders[name].call(this);
+ },
+
+ getGroup: function () {
+ return this.group;
+ }
+
+ };
+
+ var builders = {
+
+ /**
+ * @private
+ */
+ axisLine: function () {
+ var opt = this.opt;
+ var axisModel = this.axisModel;
+
+ if (!axisModel.get('axisLine.show')) {
+ return;
+ }
+
+ var extent = this.axisModel.axis.getExtent();
+
+ this.group.add(new graphic.Line({
+ shape: {
+ x1: extent[0],
+ y1: 0,
+ x2: extent[1],
+ y2: 0
+ },
+ style: zrUtil.extend(
+ {lineCap: 'round'},
+ axisModel.getModel('axisLine.lineStyle').getLineStyle()
+ ),
+ strokeContainThreshold: opt.strokeContainThreshold,
+ silent: !!opt.silent,
+ z2: 1
+ }));
+ },
+
+ /**
+ * @private
+ */
+ axisTick: function () {
+ var axisModel = this.axisModel;
+
+ if (!axisModel.get('axisTick.show')) {
+ return;
+ }
+
+ var axis = axisModel.axis;
+ var tickModel = axisModel.getModel('axisTick');
+ var opt = this.opt;
+
+ var lineStyleModel = tickModel.getModel('lineStyle');
+ var tickLen = tickModel.get('length');
+ var tickInterval = getInterval(tickModel, opt.labelInterval);
+ var ticksCoords = axis.getTicksCoords();
+ var tickLines = [];
+
+ for (var i = 0; i < ticksCoords.length; i++) {
+ // Only ordinal scale support tick interval
+ if (ifIgnoreOnTick(axis, i, tickInterval)) {
+ continue;
+ }
+
+ var tickCoord = ticksCoords[i];
+
+ // Tick line
+ tickLines.push(new graphic.Line(graphic.subPixelOptimizeLine({
+ shape: {
+ x1: tickCoord,
+ y1: 0,
+ x2: tickCoord,
+ y2: opt.tickDirection * tickLen
+ },
+ style: {
+ lineWidth: lineStyleModel.get('width')
+ },
+ silent: true
+ })));
+ }
+
+ this.group.add(graphic.mergePath(tickLines, {
+ style: lineStyleModel.getLineStyle(),
+ z2: 2,
+ silent: true
+ }));
+ },
+
+ /**
+ * @param {module:echarts/coord/cartesian/AxisModel} axisModel
+ * @param {module:echarts/coord/cartesian/GridModel} gridModel
+ * @private
+ */
+ axisLabel: function () {
+ var axisModel = this.axisModel;
+
+ if (!axisModel.get('axisLabel.show')) {
+ return;
+ }
+
+ var opt = this.opt;
+ var axis = axisModel.axis;
+ var labelModel = axisModel.getModel('axisLabel');
+ var textStyleModel = labelModel.getModel('textStyle');
+ var labelMargin = labelModel.get('margin');
+ var ticks = axis.scale.getTicks();
+ var labels = axisModel.getFormattedLabels();
+
+ // Special label rotate.
+ var labelRotation = opt.labelRotation;
+ if (labelRotation == null) {
+ labelRotation = labelModel.get('rotate') || 0;
+ }
+ // To radian.
+ labelRotation = labelRotation * PI / 180;
+
+ var labelLayout = innerTextLayout(opt, labelRotation, opt.labelDirection);
+ var categoryData = axisModel.get('data');
+
+ var textEls = [];
+ for (var i = 0; i < ticks.length; i++) {
+ if (ifIgnoreOnTick(axis, i, opt.labelInterval)) {
+ continue;
+ }
+
+ var itemTextStyleModel = textStyleModel;
+ if (categoryData && categoryData[i] && categoryData[i].textStyle) {
+ itemTextStyleModel = new Model(
+ categoryData[i].textStyle, textStyleModel, axisModel.ecModel
+ );
+ }
+
+ var tickCoord = axis.dataToCoord(ticks[i]);
+ var pos = [
+ tickCoord,
+ opt.labelOffset + opt.labelDirection * labelMargin
+ ];
+
+ var textEl = new graphic.Text({
+ style: {
+ text: labels[i],
+ textAlign: itemTextStyleModel.get('align', true) || labelLayout.textAlign,
+ textVerticalAlign: itemTextStyleModel.get('baseline', true) || labelLayout.verticalAlign,
+ textFont: itemTextStyleModel.getFont(),
+ fill: itemTextStyleModel.getTextColor()
+ },
+ position: pos,
+ rotation: labelLayout.rotation,
+ silent: true,
+ z2: 10
+ });
+ textEls.push(textEl);
+ this.group.add(textEl);
+ }
+
+ function isTwoLabelOverlapped(current, next) {
+ var firstRect = current && current.getBoundingRect().clone();
+ var nextRect = next && next.getBoundingRect().clone();
+ if (firstRect && nextRect) {
+ firstRect.applyTransform(current.getLocalTransform());
+ nextRect.applyTransform(next.getLocalTransform());
+ return firstRect.intersect(nextRect);
+ }
+ }
+ if (axis.type !== 'category') {
+ // If min or max are user set, we need to check
+ // If the tick on min(max) are overlap on their neighbour tick
+ // If they are overlapped, we need to hide the min(max) tick label
+ if (axisModel.getMin ? axisModel.getMin() : axisModel.get('min')) {
+ var firstLabel = textEls[0];
+ var nextLabel = textEls[1];
+ if (isTwoLabelOverlapped(firstLabel, nextLabel)) {
+ firstLabel.ignore = true;
+ }
+ }
+ if (axisModel.getMax ? axisModel.getMax() : axisModel.get('max')) {
+ var lastLabel = textEls[textEls.length - 1];
+ var prevLabel = textEls[textEls.length - 2];
+ if (isTwoLabelOverlapped(prevLabel, lastLabel)) {
+ lastLabel.ignore = true;
+ }
+ }
+ }
+ },
+
+ /**
+ * @private
+ */
+ axisName: function () {
+ var opt = this.opt;
+ var axisModel = this.axisModel;
+
+ var name = this.opt.axisName;
+ // If name is '', do not get name from axisMode.
+ if (name == null) {
+ name = axisModel.get('name');
+ }
+
+ if (!name) {
+ return;
+ }
+
+ var nameLocation = axisModel.get('nameLocation');
+ var nameDirection = opt.nameDirection;
+ var textStyleModel = axisModel.getModel('nameTextStyle');
+ var gap = axisModel.get('nameGap') || 0;
+
+ var extent = this.axisModel.axis.getExtent();
+ var gapSignal = extent[0] > extent[1] ? -1 : 1;
+ var pos = [
+ nameLocation === 'start'
+ ? extent[0] - gapSignal * gap
+ : nameLocation === 'end'
+ ? extent[1] + gapSignal * gap
+ : (extent[0] + extent[1]) / 2, // 'middle'
+ // Reuse labelOffset.
+ nameLocation === 'middle' ? opt.labelOffset + nameDirection * gap : 0
+ ];
+
+ var labelLayout;
+
+ if (nameLocation === 'middle') {
+ labelLayout = innerTextLayout(opt, opt.rotation, nameDirection);
+ }
+ else {
+ labelLayout = endTextLayout(opt, nameLocation, extent);
+ }
+
+ this.group.add(new graphic.Text({
+ style: {
+ text: name,
+ textFont: textStyleModel.getFont(),
+ fill: textStyleModel.getTextColor()
+ || axisModel.get('axisLine.lineStyle.color'),
+ textAlign: labelLayout.textAlign,
+ textVerticalAlign: labelLayout.verticalAlign
+ },
+ position: pos,
+ rotation: labelLayout.rotation,
+ silent: true,
+ z2: 1
+ }));
+ }
+
+ };
+
+ /**
+ * @inner
+ */
+ function innerTextLayout(opt, textRotation, direction) {
+ var rotationDiff = remRadian(textRotation - opt.rotation);
+ var textAlign;
+ var verticalAlign;
+
+ if (isRadianAroundZero(rotationDiff)) { // Label is parallel with axis line.
+ verticalAlign = direction > 0 ? 'top' : 'bottom';
+ textAlign = 'center';
+ }
+ else if (isRadianAroundZero(rotationDiff - PI)) { // Label is inverse parallel with axis line.
+ verticalAlign = direction > 0 ? 'bottom' : 'top';
+ textAlign = 'center';
+ }
+ else {
+ verticalAlign = 'middle';
+
+ if (rotationDiff > 0 && rotationDiff < PI) {
+ textAlign = direction > 0 ? 'right' : 'left';
+ }
+ else {
+ textAlign = direction > 0 ? 'left' : 'right';
+ }
+ }
+
+ return {
+ rotation: rotationDiff,
+ textAlign: textAlign,
+ verticalAlign: verticalAlign
+ };
+ }
+
+ /**
+ * @inner
+ */
+ function endTextLayout(opt, textPosition, extent) {
+ var rotationDiff = remRadian(-opt.rotation);
+ var textAlign;
+ var verticalAlign;
+ var inverse = extent[0] > extent[1];
+ var onLeft = (textPosition === 'start' && !inverse)
+ || (textPosition !== 'start' && inverse);
+
+ if (isRadianAroundZero(rotationDiff - PI / 2)) {
+ verticalAlign = onLeft ? 'bottom' : 'top';
+ textAlign = 'center';
+ }
+ else if (isRadianAroundZero(rotationDiff - PI * 1.5)) {
+ verticalAlign = onLeft ? 'top' : 'bottom';
+ textAlign = 'center';
+ }
+ else {
+ verticalAlign = 'middle';
+ if (rotationDiff < PI * 1.5 && rotationDiff > PI / 2) {
+ textAlign = onLeft ? 'left' : 'right';
+ }
+ else {
+ textAlign = onLeft ? 'right' : 'left';
+ }
+ }
+
+ return {
+ rotation: rotationDiff,
+ textAlign: textAlign,
+ verticalAlign: verticalAlign
+ };
+ }
+
+ /**
+ * @static
+ */
+ var ifIgnoreOnTick = AxisBuilder.ifIgnoreOnTick = function (axis, i, interval) {
+ var rawTick;
+ var scale = axis.scale;
+ return scale.type === 'ordinal'
+ && (
+ typeof interval === 'function'
+ ? (
+ rawTick = scale.getTicks()[i],
+ !interval(rawTick, scale.getLabel(rawTick))
+ )
+ : i % (interval + 1)
+ );
+ };
+
+ /**
+ * @static
+ */
+ var getInterval = AxisBuilder.getInterval = function (model, labelInterval) {
+ var interval = model.get('interval');
+ if (interval == null || interval == 'auto') {
+ interval = labelInterval;
+ }
+ return interval;
+ };
+
+ module.exports = AxisBuilder;
+
+
+
+/***/ },
+/* 127 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+
+ __webpack_require__(107);
+
+ __webpack_require__(128);
+ __webpack_require__(129);
+
+ var barLayoutGrid = __webpack_require__(131);
+ var echarts = __webpack_require__(1);
+
+ echarts.registerLayout(zrUtil.curry(barLayoutGrid, 'bar'));
+ // Visual coding for legend
+ echarts.registerVisualCoding('chart', function (ecModel) {
+ ecModel.eachSeriesByType('bar', function (seriesModel) {
+ var data = seriesModel.getData();
+ data.setVisual('legendSymbol', 'roundRect');
+ });
+ });
+
+ // In case developer forget to include grid component
+ __webpack_require__(106);
+
+
+/***/ },
+/* 128 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var SeriesModel = __webpack_require__(27);
+ var createListFromArray = __webpack_require__(93);
+
+ module.exports = SeriesModel.extend({
+
+ type: 'series.bar',
+
+ dependencies: ['grid', 'polar'],
+
+ getInitialData: function (option, ecModel) {
+ return createListFromArray(option.data, this, ecModel);
+ },
+
+ getMarkerPosition: function (value) {
+ var coordSys = this.coordinateSystem;
+ if (coordSys) {
+ var pt = coordSys.dataToPoint(value);
+ var data = this.getData();
+ var offset = data.getLayout('offset');
+ var size = data.getLayout('size');
+ var offsetIndex = coordSys.getBaseAxis().isHorizontal() ? 0 : 1;
+ pt[offsetIndex] += offset + size / 2;
+ return pt;
+ }
+ return [NaN, NaN];
+ },
+
+ defaultOption: {
+ zlevel: 0, // 一级层å 
+ z: 2, // 二级层å 
+ coordinateSystem: 'cartesian2d',
+ legendHoverLink: true,
+ // stack: null
+
+ // Cartesian coordinate system
+ xAxisIndex: 0,
+ yAxisIndex: 0,
+
+ // 最å°é«˜åº¦æ”¹ä¸º0
+ barMinHeight: 0,
+
+ // barMaxWidth: null,
+ // 默认自适应
+ // barWidth: null,
+ // 柱间è·ç¦»ï¼Œé»˜è®¤ä¸ºæŸ±å½¢å®½åº¦çš„30%,å¯è®¾å›ºå®šå€¼
+ // barGap: '30%',
+ // 类目间柱形è·ç¦»ï¼Œé»˜è®¤ä¸ºç±»ç›®é—´è·çš„20%,å¯è®¾å›ºå®šå€¼
+ // barCategoryGap: '20%',
+ // label: {
+ // normal: {
+ // show: false
+ // formatter: 标签文本格å¼å™¨ï¼ŒåŒTooltip.formatter,ä¸æ”¯æŒå¼‚步回调
+
+ // // 默认自适应,水平布局为'top',垂直布局为'right',å¯é€‰ä¸º
+ // // 'inside' | 'insideleft' | 'insideTop' | 'insideRight' | 'insideBottom' |
+ // // 'outside' |'left' | 'right'|'top'|'bottom'
+ // position:
+
+ // textStyle: null // 默认使用全局文本样å¼ï¼Œè¯¦è§TEXTSTYLE
+ // }
+ // },
+ itemStyle: {
+ normal: {
+ // color: 'å„异',
+ // 柱æ¡è¾¹çº¿
+ barBorderColor: '#fff',
+ // 柱æ¡è¾¹çº¿çº¿å®½ï¼Œå•ä½px,默认为1
+ barBorderWidth: 0
+ },
+ emphasis: {
+ // color: 'å„异',
+ // 柱æ¡è¾¹çº¿
+ barBorderColor: '#fff',
+ // 柱æ¡è¾¹çº¿çº¿å®½ï¼Œå•ä½px,默认为1
+ barBorderWidth: 0
+ }
+ }
+ }
+ });
+
+
+/***/ },
+/* 129 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var zrUtil = __webpack_require__(3);
+ var graphic = __webpack_require__(42);
+
+ zrUtil.extend(__webpack_require__(8).prototype, __webpack_require__(130));
+
+ function fixLayoutWithLineWidth(layout, lineWidth) {
+ var signX = layout.width > 0 ? 1 : -1;
+ var signY = layout.height > 0 ? 1 : -1;
+ // In case width or height are too small.
+ lineWidth = Math.min(lineWidth, Math.abs(layout.width), Math.abs(layout.height));
+ layout.x += signX * lineWidth / 2;
+ layout.y += signY * lineWidth / 2;
+ layout.width -= signX * lineWidth;
+ layout.height -= signY * lineWidth;
+ }
+
+ module.exports = __webpack_require__(1).extendChartView({
+
+ type: 'bar',
+
+ render: function (seriesModel, ecModel, api) {
+ var coordinateSystemType = seriesModel.get('coordinateSystem');
+
+ if (coordinateSystemType === 'cartesian2d') {
+ this._renderOnCartesian(seriesModel, ecModel, api);
+ }
+
+ return this.group;
+ },
+
+ _renderOnCartesian: function (seriesModel, ecModel, api) {
+ var group = this.group;
+ var data = seriesModel.getData();
+ var oldData = this._data;
+
+ var cartesian = seriesModel.coordinateSystem;
+ var baseAxis = cartesian.getBaseAxis();
+ var isHorizontal = baseAxis.isHorizontal();
+
+ var enableAnimation = seriesModel.get('animation');
+
+ var barBorderWidthQuery = ['itemStyle', 'normal', 'barBorderWidth'];
+
+ function createRect(dataIndex, isUpdate) {
+ var layout = data.getItemLayout(dataIndex);
+ var lineWidth = data.getItemModel(dataIndex).get(barBorderWidthQuery) || 0;
+ fixLayoutWithLineWidth(layout, lineWidth);
+
+ var rect = new graphic.Rect({
+ shape: zrUtil.extend({}, layout)
+ });
+ // Animation
+ if (enableAnimation) {
+ var rectShape = rect.shape;
+ var animateProperty = isHorizontal ? 'height' : 'width';
+ var animateTarget = {};
+ rectShape[animateProperty] = 0;
+ animateTarget[animateProperty] = layout[animateProperty];
+ graphic[isUpdate? 'updateProps' : 'initProps'](rect, {
+ shape: animateTarget
+ }, seriesModel);
+ }
+ return rect;
+ }
+ data.diff(oldData)
+ .add(function (dataIndex) {
+ // 空数æ®
+ if (!data.hasValue(dataIndex)) {
+ return;
+ }
+
+ var rect = createRect(dataIndex);
+
+ data.setItemGraphicEl(dataIndex, rect);
+
+ group.add(rect);
+
+ })
+ .update(function (newIndex, oldIndex) {
+ var rect = oldData.getItemGraphicEl(oldIndex);
+ // 空数æ®
+ if (!data.hasValue(newIndex)) {
+ group.remove(rect);
+ return;
+ }
+ if (!rect) {
+ rect = createRect(newIndex, true);
+ }
+
+ var layout = data.getItemLayout(newIndex);
+ var lineWidth = data.getItemModel(newIndex).get(barBorderWidthQuery) || 0;
+ fixLayoutWithLineWidth(layout, lineWidth);
+
+ graphic.updateProps(rect, {
+ shape: layout
+ }, seriesModel);
+
+ data.setItemGraphicEl(newIndex, rect);
+
+ // Add back
+ group.add(rect);
+ })
+ .remove(function (idx) {
+ var rect = oldData.getItemGraphicEl(idx);
+ if (rect) {
+ // Not show text when animating
+ rect.style.text = '';
+ graphic.updateProps(rect, {
+ shape: {
+ width: 0
+ }
+ }, seriesModel, function () {
+ group.remove(rect);
+ });
+ }
+ })
+ .execute();
+
+ this._updateStyle(seriesModel, data, isHorizontal);
+
+ this._data = data;
+ },
+
+ _updateStyle: function (seriesModel, data, isHorizontal) {
+ function setLabel(style, model, color, labelText, labelPositionOutside) {
+ graphic.setText(style, model, color);
+ style.text = labelText;
+ if (style.textPosition === 'outside') {
+ style.textPosition = labelPositionOutside;
+ }
+ }
+
+ data.eachItemGraphicEl(function (rect, idx) {
+ var itemModel = data.getItemModel(idx);
+ var color = data.getItemVisual(idx, 'color');
+ var layout = data.getItemLayout(idx);
+ var itemStyleModel = itemModel.getModel('itemStyle.normal');
+
+ var hoverStyle = itemModel.getModel('itemStyle.emphasis').getItemStyle();
+
+ rect.setShape('r', itemStyleModel.get('barBorderRadius') || 0);
+
+ rect.setStyle(zrUtil.defaults(
+ {
+ fill: color
+ },
+ itemStyleModel.getBarItemStyle()
+ ));
+
+ var labelPositionOutside = isHorizontal
+ ? (layout.height > 0 ? 'bottom' : 'top')
+ : (layout.width > 0 ? 'left' : 'right');
+
+ var labelModel = itemModel.getModel('label.normal');
+ var hoverLabelModel = itemModel.getModel('label.emphasis');
+ var rectStyle = rect.style;
+ if (labelModel.get('show')) {
+ setLabel(
+ rectStyle, labelModel, color,
+ zrUtil.retrieve(
+ seriesModel.getFormattedLabel(idx, 'normal'),
+ seriesModel.getRawValue(idx)
+ ),
+ labelPositionOutside
+ );
+ }
+ else {
+ rectStyle.text = '';
+ }
+ if (hoverLabelModel.get('show')) {
+ setLabel(
+ hoverStyle, hoverLabelModel, color,
+ zrUtil.retrieve(
+ seriesModel.getFormattedLabel(idx, 'emphasis'),
+ seriesModel.getRawValue(idx)
+ ),
+ labelPositionOutside
+ );
+ }
+ else {
+ hoverStyle.text = '';
+ }
+ graphic.setHoverStyle(rect, hoverStyle);
+ });
+ },
+
+ remove: function (ecModel, api) {
+ var group = this.group;
+ if (ecModel.get('animation')) {
+ if (this._data) {
+ this._data.eachItemGraphicEl(function (el) {
+ // Not show text when animating
+ el.style.text = '';
+ graphic.updateProps(el, {
+ shape: {
+ width: 0
+ }
+ }, ecModel, function () {
+ group.remove(el);
+ });
+ });
+ }
+ }
+ else {
+ group.removeAll();
+ }
+ }
+ });
+
+
+/***/ },
+/* 130 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+ module.exports = {
+ getBarItemStyle: __webpack_require__(11)(
+ [
+ ['fill', 'color'],
+ ['stroke', 'barBorderColor'],
+ ['lineWidth', 'barBorderWidth'],
+ ['opacity'],
+ ['shadowBlur'],
+ ['shadowOffsetX'],
+ ['shadowOffsetY'],
+ ['shadowColor']
+ ]
+ )
+ };
+
+
+/***/ },
+/* 131 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var zrUtil = __webpack_require__(3);
+ var numberUtil = __webpack_require__(7);
+ var parsePercent = numberUtil.parsePercent;
+
+ function getSeriesStackId(seriesModel) {
+ return seriesModel.get('stack') || '__ec_stack_' + seriesModel.seriesIndex;
+ }
+
+ function calBarWidthAndOffset(barSeries, api) {
+ // Columns info on each category axis. Key is cartesian name
+ var columnsMap = {};
+
+ zrUtil.each(barSeries, function (seriesModel, idx) {
+ var cartesian = seriesModel.coordinateSystem;
+
+ var baseAxis = cartesian.getBaseAxis();
+
+ var columnsOnAxis = columnsMap[baseAxis.index] || {
+ remainedWidth: baseAxis.getBandWidth(),
+ autoWidthCount: 0,
+ categoryGap: '20%',
+ gap: '30%',
+ axis: baseAxis,
+ stacks: {}
+ };
+ var stacks = columnsOnAxis.stacks;
+ columnsMap[baseAxis.index] = columnsOnAxis;
+
+ var stackId = getSeriesStackId(seriesModel);
+
+ if (!stacks[stackId]) {
+ columnsOnAxis.autoWidthCount++;
+ }
+ stacks[stackId] = stacks[stackId] || {
+ width: 0,
+ maxWidth: 0
+ };
+
+ var barWidth = seriesModel.get('barWidth');
+ var barMaxWidth = seriesModel.get('barMaxWidth');
+ var barGap = seriesModel.get('barGap');
+ var barCategoryGap = seriesModel.get('barCategoryGap');
+ // TODO
+ if (barWidth && ! stacks[stackId].width) {
+ barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth);
+ stacks[stackId].width = barWidth;
+ columnsOnAxis.remainedWidth -= barWidth;
+ }
+
+ barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth);
+ (barGap != null) && (columnsOnAxis.gap = barGap);
+ (barCategoryGap != null) && (columnsOnAxis.categoryGap = barCategoryGap);
+ });
+
+ var result = {};
+
+ zrUtil.each(columnsMap, function (columnsOnAxis, coordSysName) {
+
+ result[coordSysName] = {};
+
+ var stacks = columnsOnAxis.stacks;
+ var baseAxis = columnsOnAxis.axis;
+ var bandWidth = baseAxis.getBandWidth();
+ var categoryGap = parsePercent(columnsOnAxis.categoryGap, bandWidth);
+ var barGapPercent = parsePercent(columnsOnAxis.gap, 1);
+
+ var remainedWidth = columnsOnAxis.remainedWidth;
+ var autoWidthCount = columnsOnAxis.autoWidthCount;
+ var autoWidth = (remainedWidth - categoryGap)
+ / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);
+ autoWidth = Math.max(autoWidth, 0);
+
+ // Find if any auto calculated bar exceeded maxBarWidth
+ zrUtil.each(stacks, function (column, stack) {
+ var maxWidth = column.maxWidth;
+ if (!column.width && maxWidth && maxWidth < autoWidth) {
+ maxWidth = Math.min(maxWidth, remainedWidth);
+ remainedWidth -= maxWidth;
+ column.width = maxWidth;
+ autoWidthCount--;
+ }
+ });
+
+ // Recalculate width again
+ autoWidth = (remainedWidth - categoryGap)
+ / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);
+ autoWidth = Math.max(autoWidth, 0);
+
+ var widthSum = 0;
+ var lastColumn;
+ zrUtil.each(stacks, function (column, idx) {
+ if (!column.width) {
+ column.width = autoWidth;
+ }
+ lastColumn = column;
+ widthSum += column.width * (1 + barGapPercent);
+ });
+ if (lastColumn) {
+ widthSum -= lastColumn.width * barGapPercent;
+ }
+
+ var offset = -widthSum / 2;
+ zrUtil.each(stacks, function (column, stackId) {
+ result[coordSysName][stackId] = result[coordSysName][stackId] || {
+ offset: offset,
+ width: column.width
+ };
+
+ offset += column.width * (1 + barGapPercent);
+ });
+ });
+
+ return result;
+ }
+
+ /**
+ * @param {string} seriesType
+ * @param {module:echarts/model/Global} ecModel
+ * @param {module:echarts/ExtensionAPI} api
+ */
+ function barLayoutGrid(seriesType, ecModel, api) {
+
+ var barWidthAndOffset = calBarWidthAndOffset(
+ zrUtil.filter(
+ ecModel.getSeriesByType(seriesType),
+ function (seriesModel) {
+ return !ecModel.isSeriesFiltered(seriesModel)
+ && seriesModel.coordinateSystem
+ && seriesModel.coordinateSystem.type === 'cartesian2d';
+ }
+ )
+ );
+
+ var lastStackCoords = {};
+
+ ecModel.eachSeriesByType(seriesType, function (seriesModel) {
+
+ var data = seriesModel.getData();
+ var cartesian = seriesModel.coordinateSystem;
+ var baseAxis = cartesian.getBaseAxis();
+
+ var stackId = getSeriesStackId(seriesModel);
+ var columnLayoutInfo = barWidthAndOffset[baseAxis.index][stackId];
+ var columnOffset = columnLayoutInfo.offset;
+ var columnWidth = columnLayoutInfo.width;
+ var valueAxis = cartesian.getOtherAxis(baseAxis);
+
+ var barMinHeight = seriesModel.get('barMinHeight') || 0;
+
+ var valueAxisStart = baseAxis.onZero
+ ? valueAxis.toGlobalCoord(valueAxis.dataToCoord(0))
+ : valueAxis.getGlobalExtent()[0];
+
+ var coords = cartesian.dataToPoints(data, true);
+ lastStackCoords[stackId] = lastStackCoords[stackId] || [];
+
+ data.setLayout({
+ offset: columnOffset,
+ size: columnWidth
+ });
+ data.each(valueAxis.dim, function (value, idx) {
+ // 空数æ®
+ if (isNaN(value)) {
+ return;
+ }
+ if (!lastStackCoords[stackId][idx]) {
+ lastStackCoords[stackId][idx] = {
+ // Positive stack
+ p: valueAxisStart,
+ // Negative stack
+ n: valueAxisStart
+ };
+ }
+ var sign = value >= 0 ? 'p' : 'n';
+ var coord = coords[idx];
+ var lastCoord = lastStackCoords[stackId][idx][sign];
+ var x, y, width, height;
+ if (valueAxis.isHorizontal()) {
+ x = lastCoord;
+ y = coord[1] + columnOffset;
+ width = coord[0] - lastCoord;
+ height = columnWidth;
+
+ if (Math.abs(width) < barMinHeight) {
+ width = (width < 0 ? -1 : 1) * barMinHeight;
+ }
+ lastStackCoords[stackId][idx][sign] += width;
+ }
+ else {
+ x = coord[0] + columnOffset;
+ y = lastCoord;
+ width = columnWidth;
+ height = coord[1] - lastCoord;
+ if (Math.abs(height) < barMinHeight) {
+ // Include zero to has a positive bar
+ height = (height <= 0 ? -1 : 1) * barMinHeight;
+ }
+ lastStackCoords[stackId][idx][sign] += height;
+ }
+
+ data.setItemLayout(idx, {
+ x: x,
+ y: y,
+ width: width,
+ height: height
+ });
+ }, true);
+
+ }, this);
+ }
+
+ module.exports = barLayoutGrid;
+
+
+/***/ },
+/* 132 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var echarts = __webpack_require__(1);
+
+ __webpack_require__(133);
+ __webpack_require__(135);
+
+ __webpack_require__(136)('pie', [{
+ type: 'pieToggleSelect',
+ event: 'pieselectchanged',
+ method: 'toggleSelected'
+ }, {
+ type: 'pieSelect',
+ event: 'pieselected',
+ method: 'select'
+ }, {
+ type: 'pieUnSelect',
+ event: 'pieunselected',
+ method: 'unSelect'
+ }]);
+
+ echarts.registerVisualCoding(
+ 'chart', zrUtil.curry(__webpack_require__(137), 'pie')
+ );
+
+ echarts.registerLayout(zrUtil.curry(
+ __webpack_require__(138), 'pie'
+ ));
+
+ echarts.registerProcessor(
+ 'filter', zrUtil.curry(__webpack_require__(140), 'pie')
+ );
+
+
+/***/ },
+/* 133 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var List = __webpack_require__(94);
+ var zrUtil = __webpack_require__(3);
+ var modelUtil = __webpack_require__(5);
+ var completeDimensions = __webpack_require__(96);
+
+ var dataSelectableMixin = __webpack_require__(134);
+
+ var PieSeries = __webpack_require__(1).extendSeriesModel({
+
+ type: 'series.pie',
+
+ // Overwrite
+ init: function (option) {
+ PieSeries.superApply(this, 'init', arguments);
+
+ // Enable legend selection for each data item
+ // Use a function instead of direct access because data reference may changed
+ this.legendDataProvider = function () {
+ return this._dataBeforeProcessed;
+ };
+
+ this.updateSelectedMap();
+
+ this._defaultLabelLine(option);
+ },
+
+ // Overwrite
+ mergeOption: function (newOption) {
+ PieSeries.superCall(this, 'mergeOption', newOption);
+ this.updateSelectedMap();
+ },
+
+ getInitialData: function (option, ecModel) {
+ var dimensions = completeDimensions(['value'], option.data);
+ var list = new List(dimensions, this);
+ list.initData(option.data);
+ return list;
+ },
+
+ // Overwrite
+ getDataParams: function (dataIndex) {
+ var data = this._data;
+ var params = PieSeries.superCall(this, 'getDataParams', dataIndex);
+ var sum = data.getSum('value');
+ // FIXME toFixed?
+ //
+ // Percent is 0 if sum is 0
+ params.percent = !sum ? 0 : +(data.get('value', dataIndex) / sum * 100).toFixed(2);
+
+ params.$vars.push('percent');
+ return params;
+ },
+
+ _defaultLabelLine: function (option) {
+ // Extend labelLine emphasis
+ modelUtil.defaultEmphasis(option.labelLine, ['show']);
+
+ var labelLineNormalOpt = option.labelLine.normal;
+ var labelLineEmphasisOpt = option.labelLine.emphasis;
+ // Not show label line if `label.normal.show = false`
+ labelLineNormalOpt.show = labelLineNormalOpt.show
+ && option.label.normal.show;
+ labelLineEmphasisOpt.show = labelLineEmphasisOpt.show
+ && option.label.emphasis.show;
+ },
+
+ defaultOption: {
+ zlevel: 0,
+ z: 2,
+ legendHoverLink: true,
+
+ hoverAnimation: true,
+ // 默认全局居中
+ center: ['50%', '50%'],
+ radius: [0, '75%'],
+ // 默认顺时针
+ clockwise: true,
+ startAngle: 90,
+ // 最å°è§’度改为0
+ minAngle: 0,
+ // 选中是扇区å移é‡
+ selectedOffset: 10,
+
+ // If use strategy to avoid label overlapping
+ avoidLabelOverlap: true,
+ // 选择模å¼ï¼Œé»˜è®¤å…³é—­ï¼Œå¯é€‰single,multiple
+ // selectedMode: false,
+ // å—ä¸æ ¼å°”玫瑰图模å¼ï¼Œ'radius'(åŠå¾„) | 'area'(é¢ç§¯ï¼‰
+ // roseType: null,
+
+ label: {
+ normal: {
+ // If rotate around circle
+ rotate: false,
+ show: true,
+ // 'outer', 'inside', 'center'
+ position: 'outer'
+ // formatter: 标签文本格å¼å™¨ï¼ŒåŒTooltip.formatter,ä¸æ”¯æŒå¼‚步回调
+ // textStyle: null // 默认使用全局文本样å¼ï¼Œè¯¦è§TEXTSTYLE
+ // distance: 当position为inner时有效,为labelä½ç½®åˆ°åœ†å¿ƒçš„è·ç¦»ä¸Žåœ†åŠå¾„(环状图为内外åŠå¾„å’Œ)的比例系数
+ },
+ emphasis: {}
+ },
+ // Enabled when label.normal.position is 'outer'
+ labelLine: {
+ normal: {
+ show: true,
+ // 引导线两段中的第一段长度
+ length: 15,
+ // 引导线两段中的第二段长度
+ length2: 15,
+ smooth: false,
+ lineStyle: {
+ // color: å„异,
+ width: 1,
+ type: 'solid'
+ }
+ }
+ },
+ itemStyle: {
+ normal: {
+ // color: å„异,
+ borderColor: 'rgba(0,0,0,0)',
+ borderWidth: 1
+ },
+ emphasis: {
+ // color: å„异,
+ borderColor: 'rgba(0,0,0,0)',
+ borderWidth: 1
+ }
+ },
+
+ animationEasing: 'cubicOut',
+
+ data: []
+ }
+ });
+
+ zrUtil.mixin(PieSeries, dataSelectableMixin);
+
+ module.exports = PieSeries;
+
+
+/***/ },
+/* 134 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Data selectable mixin for chart series.
+ * To eanble data select, option of series must have `selectedMode`.
+ * And each data item will use `selected` to toggle itself selected status
+ *
+ * @module echarts/chart/helper/DataSelectable
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+
+ module.exports = {
+
+ updateSelectedMap: function () {
+ var option = this.option;
+ this._dataOptMap = zrUtil.reduce(option.data, function (dataOptMap, dataOpt) {
+ dataOptMap[dataOpt.name] = dataOpt;
+ return dataOptMap;
+ }, {});
+ },
+ /**
+ * @param {string} name
+ */
+ // PENGING If selectedMode is null ?
+ select: function (name) {
+ var dataOptMap = this._dataOptMap;
+ var dataOpt = dataOptMap[name];
+ var selectedMode = this.get('selectedMode');
+ if (selectedMode === 'single') {
+ zrUtil.each(dataOptMap, function (dataOpt) {
+ dataOpt.selected = false;
+ });
+ }
+ dataOpt && (dataOpt.selected = true);
+ },
+
+ /**
+ * @param {string} name
+ */
+ unSelect: function (name) {
+ var dataOpt = this._dataOptMap[name];
+ // var selectedMode = this.get('selectedMode');
+ // selectedMode !== 'single' && dataOpt && (dataOpt.selected = false);
+ dataOpt && (dataOpt.selected = false);
+ },
+
+ /**
+ * @param {string} name
+ */
+ toggleSelected: function (name) {
+ var dataOpt = this._dataOptMap[name];
+ if (dataOpt != null) {
+ this[dataOpt.selected ? 'unSelect' : 'select'](name);
+ return dataOpt.selected;
+ }
+ },
+
+ /**
+ * @param {string} name
+ */
+ isSelected: function (name) {
+ var dataOpt = this._dataOptMap[name];
+ return dataOpt && dataOpt.selected;
+ }
+ };
+
+
+/***/ },
+/* 135 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var graphic = __webpack_require__(42);
+ var zrUtil = __webpack_require__(3);
+
+ /**
+ * @param {module:echarts/model/Series} seriesModel
+ * @param {boolean} hasAnimation
+ * @inner
+ */
+ function updateDataSelected(uid, seriesModel, hasAnimation, api) {
+ var data = seriesModel.getData();
+ var dataIndex = this.dataIndex;
+ var name = data.getName(dataIndex);
+ var selectedOffset = seriesModel.get('selectedOffset');
+
+ api.dispatchAction({
+ type: 'pieToggleSelect',
+ from: uid,
+ name: name,
+ seriesId: seriesModel.id
+ });
+
+ data.each(function (idx) {
+ toggleItemSelected(
+ data.getItemGraphicEl(idx),
+ data.getItemLayout(idx),
+ seriesModel.isSelected(data.getName(idx)),
+ selectedOffset,
+ hasAnimation
+ );
+ });
+ }
+
+ /**
+ * @param {module:zrender/graphic/Sector} el
+ * @param {Object} layout
+ * @param {boolean} isSelected
+ * @param {number} selectedOffset
+ * @param {boolean} hasAnimation
+ * @inner
+ */
+ function toggleItemSelected(el, layout, isSelected, selectedOffset, hasAnimation) {
+ var midAngle = (layout.startAngle + layout.endAngle) / 2;
+
+ var dx = Math.cos(midAngle);
+ var dy = Math.sin(midAngle);
+
+ var offset = isSelected ? selectedOffset : 0;
+ var position = [dx * offset, dy * offset];
+
+ hasAnimation
+ // animateTo will stop revious animation like update transition
+ ? el.animate()
+ .when(200, {
+ position: position
+ })
+ .start('bounceOut')
+ : el.attr('position', position);
+ }
+
+ /**
+ * Piece of pie including Sector, Label, LabelLine
+ * @constructor
+ * @extends {module:zrender/graphic/Group}
+ */
+ function PiePiece(data, idx) {
+
+ graphic.Group.call(this);
+
+ var sector = new graphic.Sector({
+ z2: 2
+ });
+ var polyline = new graphic.Polyline();
+ var text = new graphic.Text();
+ this.add(sector);
+ this.add(polyline);
+ this.add(text);
+
+ this.updateData(data, idx, true);
+
+ // Hover to change label and labelLine
+ function onEmphasis() {
+ polyline.ignore = polyline.hoverIgnore;
+ text.ignore = text.hoverIgnore;
+ }
+ function onNormal() {
+ polyline.ignore = polyline.normalIgnore;
+ text.ignore = text.normalIgnore;
+ }
+ this.on('emphasis', onEmphasis)
+ .on('normal', onNormal)
+ .on('mouseover', onEmphasis)
+ .on('mouseout', onNormal);
+ }
+
+ var piePieceProto = PiePiece.prototype;
+
+ function getLabelStyle(data, idx, state, labelModel, labelPosition) {
+ var textStyleModel = labelModel.getModel('textStyle');
+ var isLabelInside = labelPosition === 'inside' || labelPosition === 'inner';
+ return {
+ fill: textStyleModel.getTextColor()
+ || (isLabelInside ? '#fff' : data.getItemVisual(idx, 'color')),
+ textFont: textStyleModel.getFont(),
+ text: zrUtil.retrieve(
+ data.hostModel.getFormattedLabel(idx, state), data.getName(idx)
+ )
+ };
+ }
+
+ piePieceProto.updateData = function (data, idx, firstCreate) {
+
+ var sector = this.childAt(0);
+
+ var seriesModel = data.hostModel;
+ var itemModel = data.getItemModel(idx);
+ var layout = data.getItemLayout(idx);
+ var sectorShape = zrUtil.extend({}, layout);
+ sectorShape.label = null;
+ if (firstCreate) {
+ sector.setShape(sectorShape);
+ sector.shape.endAngle = layout.startAngle;
+ graphic.updateProps(sector, {
+ shape: {
+ endAngle: layout.endAngle
+ }
+ }, seriesModel);
+ }
+ else {
+ graphic.updateProps(sector, {
+ shape: sectorShape
+ }, seriesModel);
+ }
+
+ // Update common style
+ var itemStyleModel = itemModel.getModel('itemStyle');
+ var visualColor = data.getItemVisual(idx, 'color');
+
+ sector.setStyle(
+ zrUtil.defaults(
+ {
+ fill: visualColor
+ },
+ itemStyleModel.getModel('normal').getItemStyle()
+ )
+ );
+ sector.hoverStyle = itemStyleModel.getModel('emphasis').getItemStyle();
+
+ // Toggle selected
+ toggleItemSelected(
+ this,
+ data.getItemLayout(idx),
+ itemModel.get('selected'),
+ seriesModel.get('selectedOffset'),
+ seriesModel.get('animation')
+ );
+
+ function onEmphasis() {
+ // Sector may has animation of updating data. Force to move to the last frame
+ // Or it may stopped on the wrong shape
+ sector.stopAnimation(true);
+ sector.animateTo({
+ shape: {
+ r: layout.r + 10
+ }
+ }, 300, 'elasticOut');
+ }
+ function onNormal() {
+ sector.stopAnimation(true);
+ sector.animateTo({
+ shape: {
+ r: layout.r
+ }
+ }, 300, 'elasticOut');
+ }
+ sector.off('mouseover').off('mouseout').off('emphasis').off('normal');
+ if (itemModel.get('hoverAnimation')) {
+ sector
+ .on('mouseover', onEmphasis)
+ .on('mouseout', onNormal)
+ .on('emphasis', onEmphasis)
+ .on('normal', onNormal);
+ }
+
+ this._updateLabel(data, idx);
+
+ graphic.setHoverStyle(this);
+ };
+
+ piePieceProto._updateLabel = function (data, idx) {
+
+ var labelLine = this.childAt(1);
+ var labelText = this.childAt(2);
+
+ var seriesModel = data.hostModel;
+ var itemModel = data.getItemModel(idx);
+ var layout = data.getItemLayout(idx);
+ var labelLayout = layout.label;
+ var visualColor = data.getItemVisual(idx, 'color');
+
+ graphic.updateProps(labelLine, {
+ shape: {
+ points: labelLayout.linePoints || [
+ [labelLayout.x, labelLayout.y], [labelLayout.x, labelLayout.y], [labelLayout.x, labelLayout.y]
+ ]
+ }
+ }, seriesModel);
+
+ graphic.updateProps(labelText, {
+ style: {
+ x: labelLayout.x,
+ y: labelLayout.y
+ }
+ }, seriesModel);
+ labelText.attr({
+ style: {
+ textVerticalAlign: labelLayout.verticalAlign,
+ textAlign: labelLayout.textAlign,
+ textFont: labelLayout.font
+ },
+ rotation: labelLayout.rotation,
+ origin: [labelLayout.x, labelLayout.y],
+ z2: 10
+ });
+
+ var labelModel = itemModel.getModel('label.normal');
+ var labelHoverModel = itemModel.getModel('label.emphasis');
+ var labelLineModel = itemModel.getModel('labelLine.normal');
+ var labelLineHoverModel = itemModel.getModel('labelLine.emphasis');
+ var labelPosition = labelModel.get('position') || labelHoverModel.get('position');
+
+ labelText.setStyle(getLabelStyle(data, idx, 'normal', labelModel, labelPosition));
+
+ labelText.ignore = labelText.normalIgnore = !labelModel.get('show');
+ labelText.hoverIgnore = !labelHoverModel.get('show');
+
+ labelLine.ignore = labelLine.normalIgnore = !labelLineModel.get('show');
+ labelLine.hoverIgnore = !labelLineHoverModel.get('show');
+
+ // Default use item visual color
+ labelLine.setStyle({
+ stroke: visualColor
+ });
+ labelLine.setStyle(labelLineModel.getModel('lineStyle').getLineStyle());
+
+ labelText.hoverStyle = getLabelStyle(data, idx, 'emphasis', labelHoverModel, labelPosition);
+ labelLine.hoverStyle = labelLineHoverModel.getModel('lineStyle').getLineStyle();
+
+ var smooth = labelLineModel.get('smooth');
+ if (smooth && smooth === true) {
+ smooth = 0.4;
+ }
+ labelLine.setShape({
+ smooth: smooth
+ });
+ };
+
+ zrUtil.inherits(PiePiece, graphic.Group);
+
+
+ // Pie view
+ var Pie = __webpack_require__(41).extend({
+
+ type: 'pie',
+
+ init: function () {
+ var sectorGroup = new graphic.Group();
+ this._sectorGroup = sectorGroup;
+ },
+
+ render: function (seriesModel, ecModel, api, payload) {
+ if (payload && (payload.from === this.uid)) {
+ return;
+ }
+
+ var data = seriesModel.getData();
+ var oldData = this._data;
+ var group = this.group;
+
+ var hasAnimation = ecModel.get('animation');
+ var isFirstRender = !oldData;
+
+ var onSectorClick = zrUtil.curry(
+ updateDataSelected, this.uid, seriesModel, hasAnimation, api
+ );
+
+ var selectedMode = seriesModel.get('selectedMode');
+
+ data.diff(oldData)
+ .add(function (idx) {
+ var piePiece = new PiePiece(data, idx);
+ if (isFirstRender) {
+ piePiece.eachChild(function (child) {
+ child.stopAnimation(true);
+ });
+ }
+
+ selectedMode && piePiece.on('click', onSectorClick);
+
+ data.setItemGraphicEl(idx, piePiece);
+
+ group.add(piePiece);
+ })
+ .update(function (newIdx, oldIdx) {
+ var piePiece = oldData.getItemGraphicEl(oldIdx);
+
+ piePiece.updateData(data, newIdx);
+
+ piePiece.off('click');
+ selectedMode && piePiece.on('click', onSectorClick);
+ group.add(piePiece);
+ data.setItemGraphicEl(newIdx, piePiece);
+ })
+ .remove(function (idx) {
+ var piePiece = oldData.getItemGraphicEl(idx);
+ group.remove(piePiece);
+ })
+ .execute();
+
+ if (hasAnimation && isFirstRender && data.count() > 0) {
+ var shape = data.getItemLayout(0);
+ var r = Math.max(api.getWidth(), api.getHeight()) / 2;
+
+ var removeClipPath = zrUtil.bind(group.removeClipPath, group);
+ group.setClipPath(this._createClipPath(
+ shape.cx, shape.cy, r, shape.startAngle, shape.clockwise, removeClipPath, seriesModel
+ ));
+ }
+
+ this._data = data;
+ },
+
+ _createClipPath: function (
+ cx, cy, r, startAngle, clockwise, cb, seriesModel
+ ) {
+ var clipPath = new graphic.Sector({
+ shape: {
+ cx: cx,
+ cy: cy,
+ r0: 0,
+ r: r,
+ startAngle: startAngle,
+ endAngle: startAngle,
+ clockwise: clockwise
+ }
+ });
+
+ graphic.initProps(clipPath, {
+ shape: {
+ endAngle: startAngle + (clockwise ? 1 : -1) * Math.PI * 2
+ }
+ }, seriesModel, cb);
+
+ return clipPath;
+ }
+ });
+
+ module.exports = Pie;
+
+
+/***/ },
+/* 136 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+ var echarts = __webpack_require__(1);
+ var zrUtil = __webpack_require__(3);
+ module.exports = function (seriesType, actionInfos) {
+ zrUtil.each(actionInfos, function (actionInfo) {
+ actionInfo.update = 'updateView';
+ /**
+ * @payload
+ * @property {string} seriesName
+ * @property {string} name
+ */
+ echarts.registerAction(actionInfo, function (payload, ecModel) {
+ var selected = {};
+ ecModel.eachComponent(
+ {mainType: 'series', subType: seriesType, query: payload},
+ function (seriesModel) {
+ if (seriesModel[actionInfo.method]) {
+ seriesModel[actionInfo.method](payload.name);
+ }
+ var data = seriesModel.getData();
+ // Create selected map
+ data.each(function (idx) {
+ var name = data.getName(idx);
+ selected[name] = seriesModel.isSelected(name) || false;
+ });
+ }
+ );
+ return {
+ name: payload.name,
+ selected: selected
+ };
+ });
+ });
+ };
+
+
+/***/ },
+/* 137 */
+/***/ function(module, exports) {
+
+ // Pick color from palette for each data item
+
+
+ module.exports = function (seriesType, ecModel) {
+ var globalColorList = ecModel.get('color');
+ var offset = 0;
+ ecModel.eachRawSeriesByType(seriesType, function (seriesModel) {
+ var colorList = seriesModel.get('color', true);
+ var dataAll = seriesModel.getRawData();
+ if (!ecModel.isSeriesFiltered(seriesModel)) {
+ var data = seriesModel.getData();
+ data.each(function (idx) {
+ var itemModel = data.getItemModel(idx);
+ var rawIdx = data.getRawIndex(idx);
+ // If series.itemStyle.normal.color is a function. itemVisual may be encoded
+ var singleDataColor = data.getItemVisual(idx, 'color', true);
+ if (!singleDataColor) {
+ var paletteColor = colorList ? colorList[rawIdx % colorList.length]
+ : globalColorList[(rawIdx + offset) % globalColorList.length];
+ var color = itemModel.get('itemStyle.normal.color') || paletteColor;
+ // Legend may use the visual info in data before processed
+ dataAll.setItemVisual(rawIdx, 'color', color);
+ data.setItemVisual(idx, 'color', color);
+ }
+ else {
+ // Set data all color for legend
+ dataAll.setItemVisual(rawIdx, 'color', singleDataColor);
+ }
+ });
+ }
+ offset += dataAll.count();
+ });
+ };
+
+
+/***/ },
+/* 138 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // TODO minAngle
+
+
+
+ var numberUtil = __webpack_require__(7);
+ var parsePercent = numberUtil.parsePercent;
+ var labelLayout = __webpack_require__(139);
+ var zrUtil = __webpack_require__(3);
+
+ var PI2 = Math.PI * 2;
+ var RADIAN = Math.PI / 180;
+
+ module.exports = function (seriesType, ecModel, api) {
+ ecModel.eachSeriesByType(seriesType, function (seriesModel) {
+ var center = seriesModel.get('center');
+ var radius = seriesModel.get('radius');
+
+ if (!zrUtil.isArray(radius)) {
+ radius = [0, radius];
+ }
+ if (!zrUtil.isArray(center)) {
+ center = [center, center];
+ }
+
+ var width = api.getWidth();
+ var height = api.getHeight();
+ var size = Math.min(width, height);
+ var cx = parsePercent(center[0], width);
+ var cy = parsePercent(center[1], height);
+ var r0 = parsePercent(radius[0], size / 2);
+ var r = parsePercent(radius[1], size / 2);
+
+ var data = seriesModel.getData();
+
+ var startAngle = -seriesModel.get('startAngle') * RADIAN;
+
+ var minAngle = seriesModel.get('minAngle') * RADIAN;
+
+ var sum = data.getSum('value');
+ // Sum may be 0
+ var unitRadian = Math.PI / (sum || data.count()) * 2;
+
+ var clockwise = seriesModel.get('clockwise');
+
+ var roseType = seriesModel.get('roseType');
+
+ // [0...max]
+ var extent = data.getDataExtent('value');
+ extent[0] = 0;
+
+ // In the case some sector angle is smaller than minAngle
+ var restAngle = PI2;
+ var valueSumLargerThanMinAngle = 0;
+
+ var currentAngle = startAngle;
+
+ var dir = clockwise ? 1 : -1;
+ data.each('value', function (value, idx) {
+ var angle;
+ // FIXME 兼容 2.0 但是 roseType 是 area 的时候æ‰æ˜¯è¿™æ ·ï¼Ÿ
+ if (roseType !== 'area') {
+ angle = sum === 0 ? unitRadian : (value * unitRadian);
+ }
+ else {
+ angle = PI2 / (data.count() || 1);
+ }
+
+ if (angle < minAngle) {
+ angle = minAngle;
+ restAngle -= minAngle;
+ }
+ else {
+ valueSumLargerThanMinAngle += value;
+ }
+
+ var endAngle = currentAngle + dir * angle;
+ data.setItemLayout(idx, {
+ angle: angle,
+ startAngle: currentAngle,
+ endAngle: endAngle,
+ clockwise: clockwise,
+ cx: cx,
+ cy: cy,
+ r0: r0,
+ r: roseType
+ ? numberUtil.linearMap(value, extent, [r0, r])
+ : r
+ });
+
+ currentAngle = endAngle;
+ }, true);
+
+ // Some sector is constrained by minAngle
+ // Rest sectors needs recalculate angle
+ if (restAngle < PI2) {
+ // Average the angle if rest angle is not enough after all angles is
+ // Constrained by minAngle
+ if (restAngle <= 1e-3) {
+ var angle = PI2 / data.count();
+ data.each(function (idx) {
+ var layout = data.getItemLayout(idx);
+ layout.startAngle = startAngle + dir * idx * angle;
+ layout.endAngle = startAngle + dir * (idx + 1) * angle;
+ });
+ }
+ else {
+ unitRadian = restAngle / valueSumLargerThanMinAngle;
+ currentAngle = startAngle;
+ data.each('value', function (value, idx) {
+ var layout = data.getItemLayout(idx);
+ var angle = layout.angle === minAngle
+ ? minAngle : value * unitRadian;
+ layout.startAngle = currentAngle;
+ layout.endAngle = currentAngle + dir * angle;
+ currentAngle += angle;
+ });
+ }
+ }
+
+ labelLayout(seriesModel, r, width, height);
+ });
+ };
+
+
+/***/ },
+/* 139 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // FIXME emphasis label position is not same with normal label position
+
+
+ var textContain = __webpack_require__(14);
+
+ function adjustSingleSide(list, cx, cy, r, dir, viewWidth, viewHeight) {
+ list.sort(function (a, b) {
+ return a.y - b.y;
+ });
+
+ // 压
+ function shiftDown(start, end, delta, dir) {
+ for (var j = start; j < end; j++) {
+ list[j].y += delta;
+ if (j > start
+ && j + 1 < end
+ && list[j + 1].y > list[j].y + list[j].height
+ ) {
+ shiftUp(j, delta / 2);
+ return;
+ }
+ }
+
+ shiftUp(end - 1, delta / 2);
+ }
+
+ // å¼¹
+ function shiftUp(end, delta) {
+ for (var j = end; j >= 0; j--) {
+ list[j].y -= delta;
+ if (j > 0
+ && list[j].y > list[j - 1].y + list[j - 1].height
+ ) {
+ break;
+ }
+ }
+ }
+
+ function changeX(list, isDownList, cx, cy, r, dir) {
+ var lastDeltaX = dir > 0
+ ? isDownList // å³ä¾§
+ ? Number.MAX_VALUE // 下
+ : 0 // 上
+ : isDownList // 左侧
+ ? Number.MAX_VALUE // 下
+ : 0; // 上
+
+ for (var i = 0, l = list.length; i < l; i++) {
+ // Not change x for center label
+ if (list[i].position === 'center') {
+ continue;
+ }
+ var deltaY = Math.abs(list[i].y - cy);
+ var length = list[i].len;
+ var length2 = list[i].len2;
+ var deltaX = (deltaY < r + length)
+ ? Math.sqrt(
+ (r + length + length2) * (r + length + length2)
+ - deltaY * deltaY
+ )
+ : Math.abs(list[i].x - cx);
+ if (isDownList && deltaX >= lastDeltaX) {
+ // å³ä¸‹ï¼Œå·¦ä¸‹
+ deltaX = lastDeltaX - 10;
+ }
+ if (!isDownList && deltaX <= lastDeltaX) {
+ // å³ä¸Šï¼Œå·¦ä¸Š
+ deltaX = lastDeltaX + 10;
+ }
+
+ list[i].x = cx + deltaX * dir;
+ lastDeltaX = deltaX;
+ }
+ }
+
+ var lastY = 0;
+ var delta;
+ var len = list.length;
+ var upList = [];
+ var downList = [];
+ for (var i = 0; i < len; i++) {
+ delta = list[i].y - lastY;
+ if (delta < 0) {
+ shiftDown(i, len, -delta, dir);
+ }
+ lastY = list[i].y + list[i].height;
+ }
+ if (viewHeight - lastY < 0) {
+ shiftUp(len - 1, lastY - viewHeight);
+ }
+ for (var i = 0; i < len; i++) {
+ if (list[i].y >= cy) {
+ downList.push(list[i]);
+ }
+ else {
+ upList.push(list[i]);
+ }
+ }
+ changeX(upList, false, cx, cy, r, dir);
+ changeX(downList, true, cx, cy, r, dir);
+ }
+
+ function avoidOverlap(labelLayoutList, cx, cy, r, viewWidth, viewHeight) {
+ var leftList = [];
+ var rightList = [];
+ for (var i = 0; i < labelLayoutList.length; i++) {
+ if (labelLayoutList[i].x < cx) {
+ leftList.push(labelLayoutList[i]);
+ }
+ else {
+ rightList.push(labelLayoutList[i]);
+ }
+ }
+
+ adjustSingleSide(rightList, cx, cy, r, 1, viewWidth, viewHeight);
+ adjustSingleSide(leftList, cx, cy, r, -1, viewWidth, viewHeight);
+
+ for (var i = 0; i < labelLayoutList.length; i++) {
+ var linePoints = labelLayoutList[i].linePoints;
+ if (linePoints) {
+ var dist = linePoints[1][0] - linePoints[2][0];
+ if (labelLayoutList[i].x < cx) {
+ linePoints[2][0] = labelLayoutList[i].x + 3;
+ }
+ else {
+ linePoints[2][0] = labelLayoutList[i].x - 3;
+ }
+ linePoints[1][1] = linePoints[2][1] = labelLayoutList[i].y;
+ linePoints[1][0] = linePoints[2][0] + dist;
+ }
+ }
+ }
+
+ module.exports = function (seriesModel, r, viewWidth, viewHeight) {
+ var data = seriesModel.getData();
+ var labelLayoutList = [];
+ var cx;
+ var cy;
+ var hasLabelRotate = false;
+
+ data.each(function (idx) {
+ var layout = data.getItemLayout(idx);
+
+ var itemModel = data.getItemModel(idx);
+ var labelModel = itemModel.getModel('label.normal');
+ // Use position in normal or emphasis
+ var labelPosition = labelModel.get('position') || itemModel.get('label.emphasis.position');
+
+ var labelLineModel = itemModel.getModel('labelLine.normal');
+ var labelLineLen = labelLineModel.get('length');
+ var labelLineLen2 = labelLineModel.get('length2');
+
+ var midAngle = (layout.startAngle + layout.endAngle) / 2;
+ var dx = Math.cos(midAngle);
+ var dy = Math.sin(midAngle);
+
+ var textX;
+ var textY;
+ var linePoints;
+ var textAlign;
+
+ cx = layout.cx;
+ cy = layout.cy;
+
+ var isLabelInside = labelPosition === 'inside' || labelPosition === 'inner';
+ if (labelPosition === 'center') {
+ textX = layout.cx;
+ textY = layout.cy;
+ textAlign = 'center';
+ }
+ else {
+ var x1 = (isLabelInside ? layout.r / 2 * dx : layout.r * dx) + cx;
+ var y1 = (isLabelInside ? layout.r / 2 * dy : layout.r * dy) + cy;
+
+ textX = x1 + dx * 3;
+ textY = y1 + dy * 3;
+
+ if (!isLabelInside) {
+ // For roseType
+ var x2 = x1 + dx * (labelLineLen + r - layout.r);
+ var y2 = y1 + dy * (labelLineLen + r - layout.r);
+ var x3 = x2 + ((dx < 0 ? -1 : 1) * labelLineLen2);
+ var y3 = y2;
+
+ textX = x3 + (dx < 0 ? -5 : 5);
+ textY = y3;
+ linePoints = [[x1, y1], [x2, y2], [x3, y3]];
+ }
+
+ textAlign = isLabelInside ? 'center' : (dx > 0 ? 'left' : 'right');
+ }
+ var font = labelModel.getModel('textStyle').getFont();
+
+ var labelRotate = labelModel.get('rotate')
+ ? (dx < 0 ? -midAngle + Math.PI : -midAngle) : 0;
+ var text = seriesModel.getFormattedLabel(idx, 'normal')
+ || data.getName(idx);
+ var textRect = textContain.getBoundingRect(
+ text, font, textAlign, 'top'
+ );
+ hasLabelRotate = !!labelRotate;
+ layout.label = {
+ x: textX,
+ y: textY,
+ position: labelPosition,
+ height: textRect.height,
+ len: labelLineLen,
+ len2: labelLineLen2,
+ linePoints: linePoints,
+ textAlign: textAlign,
+ verticalAlign: 'middle',
+ font: font,
+ rotation: labelRotate
+ };
+
+ // Not layout the inside label
+ if (!isLabelInside) {
+ labelLayoutList.push(layout.label);
+ }
+ });
+ if (!hasLabelRotate && seriesModel.get('avoidLabelOverlap')) {
+ avoidOverlap(labelLayoutList, cx, cy, r, viewWidth, viewHeight);
+ }
+ };
+
+
+/***/ },
+/* 140 */
+/***/ function(module, exports) {
+
+
+ module.exports = function (seriesType, ecModel) {
+ var legendModels = ecModel.findComponents({
+ mainType: 'legend'
+ });
+ if (!legendModels || !legendModels.length) {
+ return;
+ }
+ ecModel.eachSeriesByType(seriesType, function (series) {
+ var data = series.getData();
+ data.filterSelf(function (idx) {
+ var name = data.getName(idx);
+ // If in any legend component the status is not selected.
+ for (var i = 0; i < legendModels.length; i++) {
+ if (!legendModels[i].isSelected(name)) {
+ return false;
+ }
+ }
+ return true;
+ }, this);
+ }, this);
+ };
+
+
+/***/ },
+/* 141 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var echarts = __webpack_require__(1);
+
+ __webpack_require__(142);
+ __webpack_require__(143);
+
+ echarts.registerVisualCoding('chart', zrUtil.curry(
+ __webpack_require__(103), 'scatter', 'circle', null
+ ));
+ echarts.registerLayout(zrUtil.curry(
+ __webpack_require__(104), 'scatter'
+ ));
+
+ // In case developer forget to include grid component
+ __webpack_require__(106);
+
+
+/***/ },
+/* 142 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var createListFromArray = __webpack_require__(93);
+ var SeriesModel = __webpack_require__(27);
+
+ module.exports = SeriesModel.extend({
+
+ type: 'series.scatter',
+
+ dependencies: ['grid', 'polar'],
+
+ getInitialData: function (option, ecModel) {
+ var list = createListFromArray(option.data, this, ecModel);
+ return list;
+ },
+
+ defaultOption: {
+ coordinateSystem: 'cartesian2d',
+ zlevel: 0,
+ z: 2,
+ legendHoverLink: true,
+
+ hoverAnimation: true,
+ // Cartesian coordinate system
+ xAxisIndex: 0,
+ yAxisIndex: 0,
+
+ // Polar coordinate system
+ polarIndex: 0,
+
+ // Geo coordinate system
+ geoIndex: 0,
+
+ // symbol: null, // 图形类型
+ symbolSize: 10, // 图形大å°ï¼ŒåŠå®½ï¼ˆåŠå¾„)å‚数,当图形为方å‘或è±å½¢åˆ™æ€»å®½åº¦ä¸ºsymbolSize * 2
+ // symbolRotate: null, // 图形旋转控制
+
+ large: false,
+ // Available when large is true
+ largeThreshold: 2000,
+
+ // label: {
+ // normal: {
+ // show: false
+ // distance: 5,
+ // formatter: 标签文本格å¼å™¨ï¼ŒåŒTooltip.formatter,ä¸æ”¯æŒå¼‚步回调
+ // position: 默认自适应,水平布局为'top',垂直布局为'right',å¯é€‰ä¸º
+ // 'inside'|'left'|'right'|'top'|'bottom'
+ // textStyle: null // 默认使用全局文本样å¼ï¼Œè¯¦è§TEXTSTYLE
+ // }
+ // },
+ itemStyle: {
+ normal: {
+ opacity: 0.8
+ // color: å„异
+ }
+ }
+ }
+ });
+
+
+/***/ },
+/* 143 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var SymbolDraw = __webpack_require__(98);
+ var LargeSymbolDraw = __webpack_require__(144);
+
+ __webpack_require__(1).extendChartView({
+
+ type: 'scatter',
+
+ init: function () {
+ this._normalSymbolDraw = new SymbolDraw();
+ this._largeSymbolDraw = new LargeSymbolDraw();
+ },
+
+ render: function (seriesModel, ecModel, api) {
+ var data = seriesModel.getData();
+ var largeSymbolDraw = this._largeSymbolDraw;
+ var normalSymbolDraw = this._normalSymbolDraw;
+ var group = this.group;
+
+ var symbolDraw = seriesModel.get('large') && data.count() > seriesModel.get('largeThreshold')
+ ? largeSymbolDraw : normalSymbolDraw;
+
+ this._symbolDraw = symbolDraw;
+ symbolDraw.updateData(data);
+ group.add(symbolDraw.group);
+
+ group.remove(
+ symbolDraw === largeSymbolDraw
+ ? normalSymbolDraw.group : largeSymbolDraw.group
+ );
+ },
+
+ updateLayout: function (seriesModel) {
+ this._symbolDraw.updateLayout(seriesModel);
+ },
+
+ remove: function (ecModel, api) {
+ this._symbolDraw && this._symbolDraw.remove(api, true);
+ }
+ });
+
+
+/***/ },
+/* 144 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var graphic = __webpack_require__(42);
+ var symbolUtil = __webpack_require__(100);
+ var zrUtil = __webpack_require__(3);
+
+ var LargeSymbolPath = graphic.extendShape({
+ shape: {
+ points: null,
+ sizes: null
+ },
+
+ symbolProxy: null,
+
+ buildPath: function (path, shape) {
+ var points = shape.points;
+ var sizes = shape.sizes;
+
+ var symbolProxy = this.symbolProxy;
+ var symbolProxyShape = symbolProxy.shape;
+ for (var i = 0; i < points.length; i++) {
+ var pt = points[i];
+ var size = sizes[i];
+ if (size[0] < 4) {
+ // Optimize for small symbol
+ path.rect(
+ pt[0] - size[0] / 2, pt[1] - size[1] / 2,
+ size[0], size[1]
+ );
+ }
+ else {
+ symbolProxyShape.x = pt[0] - size[0] / 2;
+ symbolProxyShape.y = pt[1] - size[1] / 2;
+ symbolProxyShape.width = size[0];
+ symbolProxyShape.height = size[1];
+
+ symbolProxy.buildPath(path, symbolProxyShape);
+ }
+ }
+ }
+ });
+
+ function LargeSymbolDraw() {
+ this.group = new graphic.Group();
+
+ this._symbolEl = new LargeSymbolPath({
+ silent: true
+ });
+ }
+
+ var largeSymbolProto = LargeSymbolDraw.prototype;
+
+ /**
+ * Update symbols draw by new data
+ * @param {module:echarts/data/List} data
+ */
+ largeSymbolProto.updateData = function (data) {
+ this.group.removeAll();
+
+ var symbolEl = this._symbolEl;
+
+ var seriesModel = data.hostModel;
+
+ symbolEl.setShape({
+ points: data.mapArray(data.getItemLayout),
+ sizes: data.mapArray(
+ function (idx) {
+ var size = data.getItemVisual(idx, 'symbolSize');
+ if (!zrUtil.isArray(size)) {
+ size = [size, size];
+ }
+ return size;
+ }
+ )
+ });
+
+ // Create symbolProxy to build path for each data
+ symbolEl.symbolProxy = symbolUtil.createSymbol(
+ data.getVisual('symbol'), 0, 0, 0, 0
+ );
+ // Use symbolProxy setColor method
+ symbolEl.setColor = symbolEl.symbolProxy.setColor;
+
+ symbolEl.setStyle(
+ seriesModel.getModel('itemStyle.normal').getItemStyle(['color'])
+ );
+
+ var visualColor = data.getVisual('color');
+ if (visualColor) {
+ symbolEl.setColor(visualColor);
+ }
+
+ // Add back
+ this.group.add(this._symbolEl);
+ };
+
+ largeSymbolProto.updateLayout = function (seriesModel) {
+ var data = seriesModel.getData();
+ this._symbolEl.setShape({
+ points: data.mapArray(data.getItemLayout)
+ });
+ };
+
+ largeSymbolProto.remove = function () {
+ this.group.removeAll();
+ };
+
+ module.exports = LargeSymbolDraw;
+
+
+/***/ },
+/* 145 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var echarts = __webpack_require__(1);
+
+ // Must use radar component
+ __webpack_require__(146);
+
+ __webpack_require__(151);
+ __webpack_require__(152);
+
+ echarts.registerVisualCoding(
+ 'chart', zrUtil.curry(__webpack_require__(137), 'radar')
+ );
+ echarts.registerVisualCoding('chart', zrUtil.curry(
+ __webpack_require__(103), 'radar', 'circle', null
+ ));
+ echarts.registerLayout(__webpack_require__(153));
+
+ echarts.registerProcessor(
+ 'filter', zrUtil.curry(__webpack_require__(140), 'radar')
+ );
+
+ echarts.registerPreprocessor(__webpack_require__(154));
+
+
+/***/ },
+/* 146 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ __webpack_require__(147);
+ __webpack_require__(149);
+
+ __webpack_require__(150);
+
+
+/***/ },
+/* 147 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // TODO clockwise
+
+
+ var zrUtil = __webpack_require__(3);
+ var IndicatorAxis = __webpack_require__(148);
+ var IntervalScale = __webpack_require__(111);
+ var numberUtil = __webpack_require__(7);
+ var axisHelper = __webpack_require__(108);
+
+ function Radar(radarModel, ecModel, api) {
+
+ this._model = radarModel;
+ /**
+ * Radar dimensions
+ * @type {Array.<string>}
+ */
+ this.dimensions = [];
+
+ this._indicatorAxes = zrUtil.map(radarModel.getIndicatorModels(), function (indicatorModel, idx) {
+ var dim = 'indicator_' + idx;
+ var indicatorAxis = new IndicatorAxis(dim, new IntervalScale());
+ indicatorAxis.name = indicatorModel.get('name');
+ // Inject model and axis
+ indicatorAxis.model = indicatorModel;
+ indicatorModel.axis = indicatorAxis;
+ this.dimensions.push(dim);
+ return indicatorAxis;
+ }, this);
+
+ this.resize(radarModel, api);
+
+ /**
+ * @type {number}
+ * @readOnly
+ */
+ this.cx;
+ /**
+ * @type {number}
+ * @readOnly
+ */
+ this.cy;
+ /**
+ * @type {number}
+ * @readOnly
+ */
+ this.r;
+ /**
+ * @type {number}
+ * @readOnly
+ */
+ this.startAngle;
+ }
+
+ Radar.prototype.getIndicatorAxes = function () {
+ return this._indicatorAxes;
+ };
+
+ Radar.prototype.dataToPoint = function (value, indicatorIndex) {
+ var indicatorAxis = this._indicatorAxes[indicatorIndex];
+
+ return this.coordToPoint(indicatorAxis.dataToCoord(value), indicatorIndex);
+ };
+
+ Radar.prototype.coordToPoint = function (coord, indicatorIndex) {
+ var indicatorAxis = this._indicatorAxes[indicatorIndex];
+ var angle = indicatorAxis.angle;
+ var x = this.cx + coord * Math.cos(angle);
+ var y = this.cy - coord * Math.sin(angle);
+ return [x, y];
+ };
+
+ Radar.prototype.pointToData = function (pt) {
+ var dx = pt[0] - this.cx;
+ var dy = pt[1] - this.cy;
+ var radius = Math.sqrt(dx * dx + dy * dy);
+ dx /= radius;
+ dy /= radius;
+
+ var radian = Math.atan2(-dy, dx);
+
+ // Find the closest angle
+ // FIXME index can calculated directly
+ var minRadianDiff = Infinity;
+ var closestAxis;
+ var closestAxisIdx = -1;
+ for (var i = 0; i < this._indicatorAxes.length; i++) {
+ var indicatorAxis = this._indicatorAxes[i];
+ var diff = Math.abs(radian - indicatorAxis.angle);
+ if (diff < minRadianDiff) {
+ closestAxis = indicatorAxis;
+ closestAxisIdx = i;
+ minRadianDiff = diff;
+ }
+ }
+
+ return [closestAxisIdx, +(closestAxis && closestAxis.coodToData(radius))];
+ };
+
+ Radar.prototype.resize = function (radarModel, api) {
+ var center = radarModel.get('center');
+ var viewWidth = api.getWidth();
+ var viewHeight = api.getHeight();
+ var viewSize = Math.min(viewWidth, viewHeight) / 2;
+ this.cx = numberUtil.parsePercent(center[0], viewWidth);
+ this.cy = numberUtil.parsePercent(center[1], viewHeight);
+
+ this.startAngle = radarModel.get('startAngle') * Math.PI / 180;
+
+ this.r = numberUtil.parsePercent(radarModel.get('radius'), viewSize);
+
+ zrUtil.each(this._indicatorAxes, function (indicatorAxis, idx) {
+ indicatorAxis.setExtent(0, this.r);
+ var angle = (this.startAngle + idx * Math.PI * 2 / this._indicatorAxes.length);
+ // Normalize to [-PI, PI]
+ angle = Math.atan2(Math.sin(angle), Math.cos(angle));
+ indicatorAxis.angle = angle;
+ }, this);
+ };
+
+ Radar.prototype.update = function (ecModel, api) {
+ var indicatorAxes = this._indicatorAxes;
+ var radarModel = this._model;
+ zrUtil.each(indicatorAxes, function (indicatorAxis) {
+ indicatorAxis.scale.setExtent(Infinity, -Infinity);
+ });
+ ecModel.eachSeriesByType('radar', function (radarSeries, idx) {
+ if (radarSeries.get('coordinateSystem') !== 'radar'
+ || ecModel.getComponent('radar', radarSeries.get('radarIndex')) !== radarModel
+ ) {
+ return;
+ }
+ var data = radarSeries.getData();
+ zrUtil.each(indicatorAxes, function (indicatorAxis) {
+ indicatorAxis.scale.unionExtent(data.getDataExtent(indicatorAxis.dim));
+ });
+ }, this);
+
+ var splitNumber = radarModel.get('splitNumber');
+
+ function increaseInterval(interval) {
+ var exp10 = Math.pow(10, Math.floor(Math.log(interval) / Math.LN10));
+ // Increase interval
+ var f = interval / exp10;
+ if (f === 2) {
+ f = 5;
+ }
+ else { // f is 2 or 5
+ f *= 2;
+ }
+ return f * exp10;
+ }
+ // Force all the axis fixing the maxSplitNumber.
+ zrUtil.each(indicatorAxes, function (indicatorAxis, idx) {
+ var rawExtent = axisHelper.getScaleExtent(indicatorAxis, indicatorAxis.model);
+ axisHelper.niceScaleExtent(indicatorAxis, indicatorAxis.model);
+
+ var axisModel = indicatorAxis.model;
+ var scale = indicatorAxis.scale;
+ var fixedMin = axisModel.get('min');
+ var fixedMax = axisModel.get('max');
+ var interval = scale.getInterval();
+
+ if (fixedMin != null && fixedMax != null) {
+ // User set min, max, divide to get new interval
+ // FIXME precision
+ scale.setInterval(
+ (fixedMax - fixedMin) / splitNumber
+ );
+ }
+ else if (fixedMin != null) {
+ var max;
+ // User set min, expand extent on the other side
+ do {
+ max = fixedMin + interval * splitNumber;
+ scale.setExtent(+fixedMin, max);
+ // Interval must been set after extent
+ // FIXME
+ scale.setInterval(interval);
+
+ interval = increaseInterval(interval);
+ } while (max < rawExtent[1] && isFinite(max) && isFinite(rawExtent[1]));
+ }
+ else if (fixedMax != null) {
+ var min;
+ // User set min, expand extent on the other side
+ do {
+ min = fixedMax - interval * splitNumber;
+ scale.setExtent(min, +fixedMax);
+ scale.setInterval(interval);
+ interval = increaseInterval(interval);
+ } while (min > rawExtent[0] && isFinite(min) && isFinite(rawExtent[0]));
+ }
+ else {
+ var nicedSplitNumber = scale.getTicks().length - 1;
+ if (nicedSplitNumber > splitNumber) {
+ interval = increaseInterval(interval);
+ }
+ // PENDING
+ var center = Math.round((rawExtent[0] + rawExtent[1]) / 2 / interval) * interval;
+ var halfSplitNumber = Math.round(splitNumber / 2);
+ scale.setExtent(
+ numberUtil.round(center - halfSplitNumber * interval),
+ numberUtil.round(center + (splitNumber - halfSplitNumber) * interval)
+ );
+ scale.setInterval(interval);
+ }
+ });
+ };
+
+ /**
+ * Radar dimensions is based on the data
+ * @type {Array}
+ */
+ Radar.dimensions = [];
+
+ Radar.create = function (ecModel, api) {
+ var radarList = [];
+ ecModel.eachComponent('radar', function (radarModel) {
+ var radar = new Radar(radarModel, ecModel, api);
+ radarList.push(radar);
+ radarModel.coordinateSystem = radar;
+ });
+ ecModel.eachSeriesByType('radar', function (radarSeries) {
+ if (radarSeries.get('coordinateSystem') === 'radar') {
+ // Inject coordinate system
+ radarSeries.coordinateSystem = radarList[radarSeries.get('radarIndex') || 0];
+ }
+ });
+ return radarList;
+ };
+
+ __webpack_require__(25).register('radar', Radar);
+ module.exports = Radar;
+
+
+/***/ },
+/* 148 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var Axis = __webpack_require__(117);
+
+ function IndicatorAxis(dim, scale, radiusExtent) {
+ Axis.call(this, dim, scale, radiusExtent);
+
+ /**
+ * Axis type
+ * - 'category'
+ * - 'value'
+ * - 'time'
+ * - 'log'
+ * @type {string}
+ */
+ this.type = 'value';
+
+ this.angle = 0;
+
+ /**
+ * Indicator name
+ * @type {string}
+ */
+ this.name = '';
+ /**
+ * @type {module:echarts/model/Model}
+ */
+ this.model;
+ }
+
+ zrUtil.inherits(IndicatorAxis, Axis);
+
+ module.exports = IndicatorAxis;
+
+
+/***/ },
+/* 149 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+
+ var axisDefault = __webpack_require__(122);
+ var valueAxisDefault = axisDefault.valueAxis;
+ var Model = __webpack_require__(8);
+ var zrUtil = __webpack_require__(3);
+
+ var axisModelCommonMixin = __webpack_require__(123);
+
+ function defaultsShow(opt, show) {
+ return zrUtil.defaults({
+ show: show
+ }, opt);
+ }
+
+ var RadarModel = __webpack_require__(1).extendComponentModel({
+
+ type: 'radar',
+
+ optionUpdated: function () {
+ var boundaryGap = this.get('boundaryGap');
+ var splitNumber = this.get('splitNumber');
+ var scale = this.get('scale');
+ var axisLine = this.get('axisLine');
+ var axisTick = this.get('axisTick');
+ var axisLabel = this.get('axisLabel');
+ var nameTextStyle = this.get('name.textStyle');
+ var showName = this.get('name.show');
+ var nameFormatter = this.get('name.formatter');
+ var nameGap = this.get('nameGap');
+ var indicatorModels = zrUtil.map(this.get('indicator') || [], function (indicatorOpt) {
+ // PENDING
+ if (indicatorOpt.max != null && indicatorOpt.max > 0) {
+ indicatorOpt.min = 0;
+ }
+ else if (indicatorOpt.min != null && indicatorOpt.min < 0) {
+ indicatorOpt.max = 0;
+ }
+ // Use same configuration
+ indicatorOpt = zrUtil.merge(zrUtil.clone(indicatorOpt), {
+ boundaryGap: boundaryGap,
+ splitNumber: splitNumber,
+ scale: scale,
+ axisLine: axisLine,
+ axisTick: axisTick,
+ axisLabel: axisLabel,
+ // Competitable with 2 and use text
+ name: indicatorOpt.text,
+ nameLocation: 'end',
+ nameGap: nameGap,
+ // min: 0,
+ nameTextStyle: nameTextStyle
+ }, false);
+ if (!showName) {
+ indicatorOpt.name = '';
+ }
+ if (typeof nameFormatter === 'string') {
+ indicatorOpt.name = nameFormatter.replace('{value}', indicatorOpt.name);
+ }
+ else if (typeof nameFormatter === 'function') {
+ indicatorOpt.name = nameFormatter(
+ indicatorOpt.name, indicatorOpt
+ );
+ }
+ return zrUtil.extend(
+ new Model(indicatorOpt, null, this.ecModel),
+ axisModelCommonMixin
+ );
+ }, this);
+ this.getIndicatorModels = function () {
+ return indicatorModels;
+ };
+ },
+
+ defaultOption: {
+
+ zlevel: 0,
+
+ z: 0,
+
+ center: ['50%', '50%'],
+
+ radius: '75%',
+
+ startAngle: 90,
+
+ name: {
+ show: true
+ // formatter: null
+ // textStyle: {}
+ },
+
+ boundaryGap: [0, 0],
+
+ splitNumber: 5,
+
+ nameGap: 15,
+
+ scale: false,
+
+ // Polygon or circle
+ shape: 'polygon',
+
+ axisLine: zrUtil.merge(
+ {
+ lineStyle: {
+ color: '#bbb'
+ }
+ },
+ valueAxisDefault.axisLine
+ ),
+ axisLabel: defaultsShow(valueAxisDefault.axisLabel, false),
+ axisTick: defaultsShow(valueAxisDefault.axisTick, false),
+ splitLine: defaultsShow(valueAxisDefault.splitLine, true),
+ splitArea: defaultsShow(valueAxisDefault.splitArea, true),
+
+ // {text, min, max}
+ indicator: []
+ }
+ });
+
+ module.exports = RadarModel;
+
+
+/***/ },
+/* 150 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var AxisBuilder = __webpack_require__(126);
+ var zrUtil = __webpack_require__(3);
+ var graphic = __webpack_require__(42);
+
+ var axisBuilderAttrs = [
+ 'axisLine', 'axisLabel', 'axisTick', 'axisName'
+ ];
+
+ module.exports = __webpack_require__(1).extendComponentView({
+
+ type: 'radar',
+
+ render: function (radarModel, ecModel, api) {
+ var group = this.group;
+ group.removeAll();
+
+ this._buildAxes(radarModel);
+ this._buildSplitLineAndArea(radarModel);
+ },
+
+ _buildAxes: function (radarModel) {
+ var radar = radarModel.coordinateSystem;
+ var indicatorAxes = radar.getIndicatorAxes();
+ var axisBuilders = zrUtil.map(indicatorAxes, function (indicatorAxis) {
+ var axisBuilder = new AxisBuilder(indicatorAxis.model, {
+ position: [radar.cx, radar.cy],
+ rotation: indicatorAxis.angle,
+ labelDirection: -1,
+ tickDirection: -1,
+ nameDirection: 1
+ });
+ return axisBuilder;
+ });
+
+ zrUtil.each(axisBuilders, function (axisBuilder) {
+ zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);
+ this.group.add(axisBuilder.getGroup());
+ }, this);
+ },
+
+ _buildSplitLineAndArea: function (radarModel) {
+ var radar = radarModel.coordinateSystem;
+ var splitNumber = radarModel.get('splitNumber');
+ var indicatorAxes = radar.getIndicatorAxes();
+ if (!indicatorAxes.length) {
+ return;
+ }
+ var shape = radarModel.get('shape');
+ var splitLineModel = radarModel.getModel('splitLine');
+ var splitAreaModel = radarModel.getModel('splitArea');
+ var lineStyleModel = splitLineModel.getModel('lineStyle');
+ var areaStyleModel = splitAreaModel.getModel('areaStyle');
+
+ var showSplitLine = splitLineModel.get('show');
+ var showSplitArea = splitAreaModel.get('show');
+ var splitLineColors = lineStyleModel.get('color');
+ var splitAreaColors = areaStyleModel.get('color');
+
+ splitLineColors = zrUtil.isArray(splitLineColors) ? splitLineColors : [splitLineColors];
+ splitAreaColors = zrUtil.isArray(splitAreaColors) ? splitAreaColors : [splitAreaColors];
+
+ var splitLines = [];
+ var splitAreas = [];
+
+ function getColorIndex(areaOrLine, areaOrLineColorList, idx) {
+ var colorIndex = idx % areaOrLineColorList.length;
+ areaOrLine[colorIndex] = areaOrLine[colorIndex] || [];
+ return colorIndex;
+ }
+
+ if (shape === 'circle') {
+ var ticksRadius = indicatorAxes[0].getTicksCoords();
+ var cx = radar.cx;
+ var cy = radar.cy;
+ for (var i = 0; i < ticksRadius.length; i++) {
+ if (showSplitLine) {
+ var colorIndex = getColorIndex(splitLines, splitLineColors, i);
+ splitLines[colorIndex].push(new graphic.Circle({
+ shape: {
+ cx: cx,
+ cy: cy,
+ r: ticksRadius[i]
+ }
+ }));
+ }
+ if (showSplitArea && i < ticksRadius.length - 1) {
+ var colorIndex = getColorIndex(splitAreas, splitAreaColors, i);
+ splitAreas[colorIndex].push(new graphic.Ring({
+ shape: {
+ cx: cx,
+ cy: cy,
+ r0: ticksRadius[i],
+ r: ticksRadius[i + 1]
+ }
+ }));
+ }
+ }
+ }
+ // Polyyon
+ else {
+ var axesTicksPoints = zrUtil.map(indicatorAxes, function (indicatorAxis, idx) {
+ var ticksCoords = indicatorAxis.getTicksCoords();
+ return zrUtil.map(ticksCoords, function (tickCoord) {
+ return radar.coordToPoint(tickCoord, idx);
+ });
+ });
+
+ var prevPoints = [];
+ for (var i = 0; i <= splitNumber; i++) {
+ var points = [];
+ for (var j = 0; j < indicatorAxes.length; j++) {
+ points.push(axesTicksPoints[j][i]);
+ }
+ // Close
+ points.push(points[0].slice());
+ if (showSplitLine) {
+ var colorIndex = getColorIndex(splitLines, splitLineColors, i);
+ splitLines[colorIndex].push(new graphic.Polyline({
+ shape: {
+ points: points
+ }
+ }));
+ }
+ if (showSplitArea && prevPoints) {
+ var colorIndex = getColorIndex(splitAreas, splitAreaColors, i - 1);
+ splitAreas[colorIndex].push(new graphic.Polygon({
+ shape: {
+ points: points.concat(prevPoints)
+ }
+ }));
+ }
+ prevPoints = points.slice().reverse();
+ }
+ }
+
+ var lineStyle = lineStyleModel.getLineStyle();
+ var areaStyle = areaStyleModel.getAreaStyle();
+ // Add splitArea before splitLine
+ zrUtil.each(splitAreas, function (splitAreas, idx) {
+ this.group.add(graphic.mergePath(
+ splitAreas, {
+ style: zrUtil.defaults({
+ stroke: 'none',
+ fill: splitAreaColors[idx % splitAreaColors.length]
+ }, areaStyle),
+ silent: true
+ }
+ ));
+ }, this);
+
+ zrUtil.each(splitLines, function (splitLines, idx) {
+ this.group.add(graphic.mergePath(
+ splitLines, {
+ style: zrUtil.defaults({
+ fill: 'none',
+ stroke: splitLineColors[idx % splitLineColors.length]
+ }, lineStyle),
+ silent: true
+ }
+ ));
+ }, this);
+
+ }
+ });
+
+
+/***/ },
+/* 151 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var SeriesModel = __webpack_require__(27);
+ var List = __webpack_require__(94);
+ var completeDimensions = __webpack_require__(96);
+ var zrUtil = __webpack_require__(3);
+ var formatUtil = __webpack_require__(6);
+
+ var RadarSeries = SeriesModel.extend({
+
+ type: 'series.radar',
+
+ dependencies: ['radar'],
+
+
+ // Overwrite
+ init: function (option) {
+ RadarSeries.superApply(this, 'init', arguments);
+
+ // Enable legend selection for each data item
+ // Use a function instead of direct access because data reference may changed
+ this.legendDataProvider = function () {
+ return this._dataBeforeProcessed;
+ };
+ },
+
+ getInitialData: function (option, ecModel) {
+ var data = option.data || [];
+ var dimensions = completeDimensions(
+ [], data, [], 'indicator_'
+ );
+ var list = new List(dimensions, this);
+ list.initData(data);
+ return list;
+ },
+
+ formatTooltip: function (dataIndex) {
+ var value = this.getRawValue(dataIndex);
+ var coordSys = this.coordinateSystem;
+ var indicatorAxes = coordSys.getIndicatorAxes();
+ return this._data.getName(dataIndex) + '<br />'
+ + zrUtil.map(indicatorAxes, function (axis, idx) {
+ return axis.name + ' : ' + value[idx];
+ }).join('<br />');
+ },
+
+ getFormattedLabel: function (dataIndex, status, formatter, indicatorIndex) {
+ status = status || 'normal';
+ var data = this.getData();
+ var itemModel = data.getItemModel(dataIndex);
+
+ var params = this.getDataParams(dataIndex);
+ if (formatter == null) {
+ formatter = itemModel.get(['label', status, 'formatter']);
+ }
+ // Get value of specified indicator
+ params.value = params.value[indicatorIndex || 0];
+ if (typeof formatter === 'function') {
+ params.status = status;
+ return formatter(params);
+ }
+ else if (typeof formatter === 'string') {
+ return formatUtil.formatTpl(formatter, params);
+ }
+ },
+
+ defaultOption: {
+ zlevel: 0,
+ z: 2,
+ coordinateSystem: 'radar',
+ legendHoverLink: true,
+ radarIndex: 0,
+ lineStyle: {
+ normal: {
+ width: 2,
+ type: 'solid'
+ }
+ },
+ label: {
+ normal: {
+ position: 'top'
+ }
+ },
+ // areaStyle: {
+ // },
+ // itemStyle: {}
+ symbol: 'emptyCircle',
+ symbolSize: 4
+ // symbolRotate: null
+ }
+ });
+
+ module.exports = RadarSeries;
+
+
+/***/ },
+/* 152 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var graphic = __webpack_require__(42);
+ var zrUtil = __webpack_require__(3);
+ var symbolUtil = __webpack_require__(100);
+
+ function normalizeSymbolSize(symbolSize) {
+ if (!zrUtil.isArray(symbolSize)) {
+ symbolSize = [+symbolSize, +symbolSize];
+ }
+ return symbolSize;
+ }
+ module.exports = __webpack_require__(1).extendChartView({
+ type: 'radar',
+
+ render: function (seriesModel, ecModel, api) {
+ var polar = seriesModel.coordinateSystem;
+ var group = this.group;
+
+ var data = seriesModel.getData();
+ var oldData = this._data;
+
+ function createSymbol(data, idx) {
+ var symbolType = data.getItemVisual(idx, 'symbol') || 'circle';
+ var color = data.getItemVisual(idx, 'color');
+ if (symbolType === 'none') {
+ return;
+ }
+ var symbolPath = symbolUtil.createSymbol(
+ symbolType, -0.5, -0.5, 1, 1, color
+ );
+ symbolPath.attr({
+ style: {
+ strokeNoScale: true
+ },
+ z2: 100,
+ scale: normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize'))
+ });
+ return symbolPath;
+ }
+
+ function updateSymbols(oldPoints, newPoints, symbolGroup, data, idx, isInit) {
+ // Simply rerender all
+ symbolGroup.removeAll();
+ for (var i = 0; i < newPoints.length - 1; i++) {
+ var symbolPath = createSymbol(data, idx);
+ if (symbolPath) {
+ symbolPath.__dimIdx = i;
+ if (oldPoints[i]) {
+ symbolPath.attr('position', oldPoints[i]);
+ graphic[isInit ? 'initProps' : 'updateProps'](
+ symbolPath, {
+ position: newPoints[i]
+ }, seriesModel
+ );
+ }
+ else {
+ symbolPath.attr('position', newPoints[i]);
+ }
+ symbolGroup.add(symbolPath);
+ }
+ }
+ }
+
+ function getInitialPoints(points) {
+ return zrUtil.map(points, function (pt) {
+ return [polar.cx, polar.cy];
+ });
+ }
+ data.diff(oldData)
+ .add(function (idx) {
+ var points = data.getItemLayout(idx);
+ if (!points) {
+ return;
+ }
+ var polygon = new graphic.Polygon();
+ var polyline = new graphic.Polyline();
+ var target = {
+ shape: {
+ points: points
+ }
+ };
+ polygon.shape.points = getInitialPoints(points);
+ polyline.shape.points = getInitialPoints(points);
+ graphic.initProps(polygon, target, seriesModel);
+ graphic.initProps(polyline, target, seriesModel);
+
+ var itemGroup = new graphic.Group();
+ var symbolGroup = new graphic.Group();
+ itemGroup.add(polyline);
+ itemGroup.add(polygon);
+ itemGroup.add(symbolGroup);
+
+ updateSymbols(
+ polyline.shape.points, points, symbolGroup, data, idx, true
+ );
+
+ data.setItemGraphicEl(idx, itemGroup);
+ })
+ .update(function (newIdx, oldIdx) {
+ var itemGroup = oldData.getItemGraphicEl(oldIdx);
+ var polyline = itemGroup.childAt(0);
+ var polygon = itemGroup.childAt(1);
+ var symbolGroup = itemGroup.childAt(2);
+ var target = {
+ shape: {
+ points: data.getItemLayout(newIdx)
+ }
+ };
+ if (!target.shape.points) {
+ return;
+ }
+ updateSymbols(
+ polyline.shape.points, target.shape.points, symbolGroup, data, newIdx, false
+ );
+
+ graphic.updateProps(polyline, target, seriesModel);
+ graphic.updateProps(polygon, target, seriesModel);
+
+ data.setItemGraphicEl(newIdx, itemGroup);
+ })
+ .remove(function (idx) {
+ group.remove(oldData.getItemGraphicEl(idx));
+ })
+ .execute();
+
+ data.eachItemGraphicEl(function (itemGroup, idx) {
+ var itemModel = data.getItemModel(idx);
+ var polyline = itemGroup.childAt(0);
+ var polygon = itemGroup.childAt(1);
+ var symbolGroup = itemGroup.childAt(2);
+ var color = data.getItemVisual(idx, 'color');
+
+ group.add(itemGroup);
+
+ polyline.setStyle(
+ zrUtil.extend(
+ itemModel.getModel('lineStyle.normal').getLineStyle(),
+ {
+ stroke: color
+ }
+ )
+ );
+ polyline.hoverStyle = itemModel.getModel('lineStyle.emphasis').getLineStyle();
+
+ var areaStyleModel = itemModel.getModel('areaStyle.normal');
+ var hoverAreaStyleModel = itemModel.getModel('areaStyle.emphasis');
+ var polygonIgnore = areaStyleModel.isEmpty() && areaStyleModel.parentModel.isEmpty();
+ var hoverPolygonIgnore = hoverAreaStyleModel.isEmpty() && hoverAreaStyleModel.parentModel.isEmpty();
+
+ hoverPolygonIgnore = hoverPolygonIgnore && polygonIgnore;
+ polygon.ignore = polygonIgnore;
+
+ polygon.setStyle(
+ zrUtil.defaults(
+ areaStyleModel.getAreaStyle(),
+ {
+ fill: color,
+ opacity: 0.7
+ }
+ )
+ );
+ polygon.hoverStyle = hoverAreaStyleModel.getAreaStyle();
+
+ var itemStyle = itemModel.getModel('itemStyle.normal').getItemStyle(['color']);
+ var itemHoverStyle = itemModel.getModel('itemStyle.emphasis').getItemStyle();
+ var labelModel = itemModel.getModel('label.normal');
+ var labelHoverModel = itemModel.getModel('label.emphasis');
+ symbolGroup.eachChild(function (symbolPath) {
+ symbolPath.setStyle(itemStyle);
+ symbolPath.hoverStyle = zrUtil.clone(itemHoverStyle);
+
+ var defaultText = data.get(data.dimensions[symbolPath.__dimIdx], idx);
+ graphic.setText(symbolPath.style, labelModel, color);
+ symbolPath.setStyle({
+ text: labelModel.get('show') ? zrUtil.retrieve(
+ seriesModel.getFormattedLabel(
+ idx, 'normal', null, symbolPath.__dimIdx
+ ),
+ defaultText
+ ) : ''
+ });
+
+ graphic.setText(symbolPath.hoverStyle, labelHoverModel, color);
+ symbolPath.hoverStyle.text = labelHoverModel.get('show') ? zrUtil.retrieve(
+ seriesModel.getFormattedLabel(
+ idx, 'emphasis', null, symbolPath.__dimIdx
+ ),
+ defaultText
+ ) : '';
+ });
+
+ function onEmphasis() {
+ polygon.attr('ignore', hoverPolygonIgnore);
+ }
+
+ function onNormal() {
+ polygon.attr('ignore', polygonIgnore);
+ }
+
+ itemGroup.off('mouseover').off('mouseout').off('normal').off('emphasis');
+ itemGroup.on('emphasis', onEmphasis)
+ .on('mouseover', onEmphasis)
+ .on('normal', onNormal)
+ .on('mouseout', onNormal);
+
+ graphic.setHoverStyle(itemGroup);
+ });
+
+ this._data = data;
+ },
+
+ remove: function () {
+ this.group.removeAll();
+ this._data = null;
+ }
+ });
+
+
+/***/ },
+/* 153 */
+/***/ function(module, exports) {
+
+
+
+ module.exports = function (ecModel, api) {
+ ecModel.eachSeriesByType('radar', function (seriesModel) {
+ var data = seriesModel.getData();
+ var points = [];
+ var coordSys = seriesModel.coordinateSystem;
+ if (!coordSys) {
+ return;
+ }
+
+ function pointsConverter(val, idx) {
+ points[idx] = points[idx] || [];
+ points[idx][i] = coordSys.dataToPoint(val, i);
+ }
+ for (var i = 0; i < coordSys.getIndicatorAxes().length; i++) {
+ var dim = data.dimensions[i];
+ data.each(dim, pointsConverter);
+ }
+
+ data.each(function (idx) {
+ // Close polygon
+ points[idx][0] && points[idx].push(points[idx][0].slice());
+ data.setItemLayout(idx, points[idx]);
+ });
+ });
+ };
+
+
+/***/ },
+/* 154 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // Backward compat for radar chart in 2
+
+
+ var zrUtil = __webpack_require__(3);
+
+ module.exports = function (option) {
+ var polarOptArr = option.polar;
+ if (polarOptArr) {
+ if (!zrUtil.isArray(polarOptArr)) {
+ polarOptArr = [polarOptArr];
+ }
+ var polarNotRadar = [];
+ zrUtil.each(polarOptArr, function (polarOpt, idx) {
+ if (polarOpt.indicator) {
+ if (polarOpt.type && !polarOpt.shape) {
+ polarOpt.shape = polarOpt.type;
+ }
+ option.radar = option.radar || [];
+ if (!zrUtil.isArray(option.radar)) {
+ option.radar = [option.radar];
+ }
+ option.radar.push(polarOpt);
+ }
+ else {
+ polarNotRadar.push(polarOpt);
+ }
+ });
+ option.polar = polarNotRadar;
+ }
+ zrUtil.each(option.series, function (seriesOpt) {
+ if (seriesOpt.type === 'radar' && seriesOpt.polarIndex) {
+ seriesOpt.radarIndex = seriesOpt.polarIndex;
+ }
+ });
+ };
+
+
+/***/ },
+/* 155 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var echarts = __webpack_require__(1);
+
+ __webpack_require__(156);
+
+ __webpack_require__(157);
+
+ __webpack_require__(161);
+
+ __webpack_require__(163);
+
+ echarts.registerLayout(__webpack_require__(173));
+
+ echarts.registerVisualCoding('chart', __webpack_require__(174));
+
+ echarts.registerProcessor('statistic', __webpack_require__(175));
+
+ echarts.registerPreprocessor(__webpack_require__(176));
+
+ __webpack_require__(136)('map', [{
+ type: 'mapToggleSelect',
+ event: 'mapselectchanged',
+ method: 'toggleSelected'
+ }, {
+ type: 'mapSelect',
+ event: 'mapselected',
+ method: 'select'
+ }, {
+ type: 'mapUnSelect',
+ event: 'mapunselected',
+ method: 'unSelect'
+ }]);
+
+
+/***/ },
+/* 156 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var List = __webpack_require__(94);
+ var echarts = __webpack_require__(1);
+ var SeriesModel = __webpack_require__(27);
+ var zrUtil = __webpack_require__(3);
+ var completeDimensions = __webpack_require__(96);
+
+ var formatUtil = __webpack_require__(6);
+ var encodeHTML = formatUtil.encodeHTML;
+ var addCommas = formatUtil.addCommas;
+
+ var dataSelectableMixin = __webpack_require__(134);
+
+ function fillData(dataOpt, geoJson) {
+ var dataNameMap = {};
+ var features = geoJson.features;
+ for (var i = 0; i < dataOpt.length; i++) {
+ dataNameMap[dataOpt[i].name] = dataOpt[i];
+ }
+
+ for (var i = 0; i < features.length; i++) {
+ var name = features[i].properties.name;
+ if (!dataNameMap[name]) {
+ dataOpt.push({
+ value: NaN,
+ name: name
+ });
+ }
+ }
+ return dataOpt;
+ }
+
+ var MapSeries = SeriesModel.extend({
+
+ type: 'series.map',
+
+ /**
+ * Only first map series of same mapType will drawMap
+ * @type {boolean}
+ */
+ needsDrawMap: false,
+
+ /**
+ * Group of all map series with same mapType
+ * @type {boolean}
+ */
+ seriesGroup: [],
+
+ init: function (option) {
+
+ option = this._fillOption(option);
+ this.option = option;
+
+ MapSeries.superApply(this, 'init', arguments);
+
+ this.updateSelectedMap();
+ },
+
+ getInitialData: function (option) {
+ var dimensions = completeDimensions(['value'], option.data || []);
+
+ var list = new List(dimensions, this);
+
+ list.initData(option.data);
+
+ return list;
+ },
+
+ mergeOption: function (newOption) {
+ newOption = this._fillOption(newOption);
+
+ MapSeries.superCall(this, 'mergeOption', newOption);
+
+ this.updateSelectedMap();
+ },
+
+ _fillOption: function (option) {
+ // Shallow clone
+ option = zrUtil.extend({}, option);
+
+ var map = echarts.getMap(option.mapType);
+ var geoJson = map && map.geoJson;
+ geoJson && option.data
+ && (option.data = fillData(option.data, geoJson));
+
+ return option;
+ },
+
+ /**
+ * @param {number} zoom
+ */
+ setRoamZoom: function (zoom) {
+ var roamDetail = this.option.roamDetail;
+ roamDetail && (roamDetail.zoom = zoom);
+ },
+
+ /**
+ * @param {number} x
+ * @param {number} y
+ */
+ setRoamPan: function (x, y) {
+ var roamDetail = this.option.roamDetail;
+ if (roamDetail) {
+ roamDetail.x = x;
+ roamDetail.y = y;
+ }
+ },
+
+ getRawValue: function (dataIndex) {
+ // Use value stored in data instead because it is calculated from multiple series
+ // FIXME Provide all value of multiple series ?
+ return this._data.get('value', dataIndex);
+ },
+
+ /**
+ * Map tooltip formatter
+ *
+ * @param {number} dataIndex
+ */
+ formatTooltip: function (dataIndex) {
+ var data = this._data;
+ var formattedValue = addCommas(this.getRawValue(dataIndex));
+ var name = data.getName(dataIndex);
+
+ var seriesGroup = this.seriesGroup;
+ var seriesNames = [];
+ for (var i = 0; i < seriesGroup.length; i++) {
+ if (!isNaN(seriesGroup[i].getRawValue(dataIndex))) {
+ seriesNames.push(
+ encodeHTML(seriesGroup[i].name)
+ );
+ }
+ }
+
+ return seriesNames.join(', ') + '<br />'
+ + name + ' : ' + formattedValue;
+ },
+
+ defaultOption: {
+ // 一级层å 
+ zlevel: 0,
+ // 二级层å 
+ z: 2,
+ coordinateSystem: 'geo',
+ // å„çœçš„ map 暂时都用中文
+ map: 'china',
+
+ // 'center' | 'left' | 'right' | 'x%' | {number}
+ left: 'center',
+ // 'center' | 'top' | 'bottom' | 'x%' | {number}
+ top: 'center',
+ // right
+ // bottom
+ // width:
+ // height // 自适应
+
+ // 数值åˆå¹¶æ–¹å¼ï¼Œé»˜è®¤åŠ å’Œï¼Œå¯é€‰ä¸ºï¼š
+ // 'sum' | 'average' | 'max' | 'min'
+ // mapValueCalculation: 'sum',
+ // 地图数值计算结果å°æ•°ç²¾åº¦
+ // mapValuePrecision: 0,
+ // 显示图例颜色标识(系列标识的å°åœ†ç‚¹ï¼‰ï¼Œå›¾ä¾‹å¼€å¯æ—¶æœ‰æ•ˆ
+ showLegendSymbol: true,
+ // 选择模å¼ï¼Œé»˜è®¤å…³é—­ï¼Œå¯é€‰single,multiple
+ // selectedMode: false,
+ dataRangeHoverLink: true,
+ // 是å¦å¼€å¯ç¼©æ”¾åŠæ¼«æ¸¸æ¨¡å¼
+ // roam: false,
+
+ // 在 roam å¼€å¯çš„时候使用
+ roamDetail: {
+ x: 0,
+ y: 0,
+ zoom: 1
+ },
+
+ scaleLimit: null,
+
+ label: {
+ normal: {
+ show: false,
+ textStyle: {
+ color: '#000'
+ }
+ },
+ emphasis: {
+ show: false,
+ textStyle: {
+ color: '#000'
+ }
+ }
+ },
+ // scaleLimit: null,
+ itemStyle: {
+ normal: {
+ // color: å„异,
+ borderWidth: 0.5,
+ borderColor: '#444',
+ areaColor: '#eee'
+ },
+ // 也是选中样å¼
+ emphasis: {
+ areaColor: 'rgba(255,215, 0, 0.8)'
+ }
+ }
+ }
+ });
+
+ zrUtil.mixin(MapSeries, dataSelectableMixin);
+
+ module.exports = MapSeries;
+
+
+/***/ },
+/* 157 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ // var zrUtil = require('zrender/lib/core/util');
+ var graphic = __webpack_require__(42);
+
+ var MapDraw = __webpack_require__(158);
+
+ __webpack_require__(1).extendChartView({
+
+ type: 'map',
+
+ render: function (mapModel, ecModel, api, payload) {
+ // Not render if it is an toggleSelect action from self
+ if (payload && payload.type === 'mapToggleSelect'
+ && payload.from === this.uid
+ ) {
+ return;
+ }
+
+ var group = this.group;
+ group.removeAll();
+ // Not update map if it is an roam action from self
+ if (!(payload && payload.type === 'geoRoam'
+ && payload.component === 'series'
+ && payload.name === mapModel.name)) {
+
+ if (mapModel.needsDrawMap) {
+ var mapDraw = this._mapDraw || new MapDraw(api, true);
+ group.add(mapDraw.group);
+
+ mapDraw.draw(mapModel, ecModel, api, this);
+
+ this._mapDraw = mapDraw;
+ }
+ else {
+ // Remove drawed map
+ this._mapDraw && this._mapDraw.remove();
+ this._mapDraw = null;
+ }
+ }
+ else {
+ var mapDraw = this._mapDraw;
+ mapDraw && group.add(mapDraw.group);
+ }
+
+ mapModel.get('showLegendSymbol') && ecModel.getComponent('legend')
+ && this._renderSymbols(mapModel, ecModel, api);
+ },
+
+ remove: function () {
+ this._mapDraw && this._mapDraw.remove();
+ this._mapDraw = null;
+ this.group.removeAll();
+ },
+
+ _renderSymbols: function (mapModel, ecModel, api) {
+ var data = mapModel.getData();
+ var group = this.group;
+
+ data.each('value', function (value, idx) {
+ if (isNaN(value)) {
+ return;
+ }
+
+ var layout = data.getItemLayout(idx);
+
+ if (!layout || !layout.point) {
+ // Not exists in map
+ return;
+ }
+
+ var point = layout.point;
+ var offset = layout.offset;
+
+ var circle = new graphic.Circle({
+ style: {
+ fill: data.getVisual('color')
+ },
+ shape: {
+ cx: point[0] + offset * 9,
+ cy: point[1],
+ r: 3
+ },
+ silent: true,
+ z2: 10
+ });
+
+ // First data on the same region
+ if (!offset) {
+ var labelText = data.getName(idx);
+
+ var itemModel = data.getItemModel(idx);
+ var labelModel = itemModel.getModel('label.normal');
+ var hoverLabelModel = itemModel.getModel('label.emphasis');
+
+ var textStyleModel = labelModel.getModel('textStyle');
+ var hoverTextStyleModel = hoverLabelModel.getModel('textStyle');
+
+ var polygonGroups = data.getItemGraphicEl(idx);
+ circle.setStyle({
+ textPosition: 'bottom'
+ });
+
+ var onEmphasis = function () {
+ circle.setStyle({
+ text: hoverLabelModel.get('show') ? labelText : '',
+ textFill: hoverTextStyleModel.getTextColor(),
+ textFont: hoverTextStyleModel.getFont()
+ });
+ };
+
+ var onNormal = function () {
+ circle.setStyle({
+ text: labelModel.get('show') ? labelText : '',
+ textFill: textStyleModel.getTextColor(),
+ textFont: textStyleModel.getFont()
+ });
+ };
+
+ polygonGroups.on('mouseover', onEmphasis)
+ .on('mouseout', onNormal)
+ .on('emphasis', onEmphasis)
+ .on('normal', onNormal);
+
+ onNormal();
+ }
+
+ group.add(circle);
+ });
+ }
+ });
+
+
+/***/ },
+/* 158 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @module echarts/component/helper/MapDraw
+ */
+
+
+ var RoamController = __webpack_require__(159);
+ var graphic = __webpack_require__(42);
+ var zrUtil = __webpack_require__(3);
+
+ function getFixedItemStyle(model, scale) {
+ var itemStyle = model.getItemStyle();
+ var areaColor = model.get('areaColor');
+ if (areaColor) {
+ itemStyle.fill = areaColor;
+ }
+
+ return itemStyle;
+ }
+
+ function updateMapSelectHandler(mapOrGeoModel, data, group, api, fromView) {
+ group.off('click');
+ mapOrGeoModel.get('selectedMode')
+ && group.on('click', function (e) {
+ var dataIndex = e.target.dataIndex;
+ if (dataIndex != null) {
+ var name = data.getName(dataIndex);
+
+ api.dispatchAction({
+ type: 'mapToggleSelect',
+ seriesIndex: mapOrGeoModel.seriesIndex,
+ name: name,
+ from: fromView.uid
+ });
+
+ updateMapSelected(mapOrGeoModel, data, api);
+ }
+ });
+ }
+
+ function updateMapSelected(mapOrGeoModel, data) {
+ data.eachItemGraphicEl(function (el, idx) {
+ var name = data.getName(idx);
+ el.trigger(mapOrGeoModel.isSelected(name) ? 'emphasis' : 'normal');
+ });
+ }
+
+ /**
+ * @alias module:echarts/component/helper/MapDraw
+ * @param {module:echarts/ExtensionAPI} api
+ * @param {boolean} updateGroup
+ */
+ function MapDraw(api, updateGroup) {
+
+ var group = new graphic.Group();
+
+ /**
+ * @type {module:echarts/component/helper/RoamController}
+ * @private
+ */
+ this._controller = new RoamController(
+ api.getZr(), updateGroup ? group : null, null
+ );
+
+ /**
+ * @type {module:zrender/container/Group}
+ * @readOnly
+ */
+ this.group = group;
+
+ /**
+ * @type {boolean}
+ * @private
+ */
+ this._updateGroup = updateGroup;
+ }
+
+ MapDraw.prototype = {
+
+ constructor: MapDraw,
+
+ draw: function (mapOrGeoModel, ecModel, api, fromView) {
+
+ // geoModel has no data
+ var data = mapOrGeoModel.getData && mapOrGeoModel.getData();
+
+ var geo = mapOrGeoModel.coordinateSystem;
+
+ var group = this.group;
+ group.removeAll();
+
+ var scale = geo.scale;
+ group.position = geo.position.slice();
+ group.scale = scale.slice();
+
+ var itemStyleModel;
+ var hoverItemStyleModel;
+ var itemStyle;
+ var hoverItemStyle;
+
+ var labelModel;
+ var hoverLabelModel;
+
+ var itemStyleAccessPath = ['itemStyle', 'normal'];
+ var hoverItemStyleAccessPath = ['itemStyle', 'emphasis'];
+ var labelAccessPath = ['label', 'normal'];
+ var hoverLabelAccessPath = ['label', 'emphasis'];
+ if (!data) {
+ itemStyleModel = mapOrGeoModel.getModel(itemStyleAccessPath);
+ hoverItemStyleModel = mapOrGeoModel.getModel(hoverItemStyleAccessPath);
+
+ itemStyle = getFixedItemStyle(itemStyleModel, scale);
+ hoverItemStyle = getFixedItemStyle(hoverItemStyleModel, scale);
+
+ labelModel = mapOrGeoModel.getModel(labelAccessPath);
+ hoverLabelModel = mapOrGeoModel.getModel(hoverLabelAccessPath);
+ }
+
+ zrUtil.each(geo.regions, function (region) {
+
+ var regionGroup = new graphic.Group();
+ var dataIdx;
+ // Use the itemStyle in data if has data
+ if (data) {
+ // FIXME If dataIdx < 0
+ dataIdx = data.indexOfName(region.name);
+ var itemModel = data.getItemModel(dataIdx);
+
+ // Only visual color of each item will be used. It can be encoded by dataRange
+ // But visual color of series is used in symbol drawing
+ //
+ // Visual color for each series is for the symbol draw
+ var visualColor = data.getItemVisual(dataIdx, 'color', true);
+
+ itemStyleModel = itemModel.getModel(itemStyleAccessPath);
+ hoverItemStyleModel = itemModel.getModel(hoverItemStyleAccessPath);
+
+ itemStyle = getFixedItemStyle(itemStyleModel, scale);
+ hoverItemStyle = getFixedItemStyle(hoverItemStyleModel, scale);
+
+ labelModel = itemModel.getModel(labelAccessPath);
+ hoverLabelModel = itemModel.getModel(hoverLabelAccessPath);
+
+ if (visualColor) {
+ itemStyle.fill = visualColor;
+ }
+ }
+ var textStyleModel = labelModel.getModel('textStyle');
+ var hoverTextStyleModel = hoverLabelModel.getModel('textStyle');
+
+ zrUtil.each(region.contours, function (contour) {
+
+ var polygon = new graphic.Polygon({
+ shape: {
+ points: contour
+ },
+ style: {
+ strokeNoScale: true
+ },
+ culling: true
+ });
+
+ polygon.setStyle(itemStyle);
+
+ regionGroup.add(polygon);
+ });
+
+ // Label
+ var showLabel = labelModel.get('show');
+ var hoverShowLabel = hoverLabelModel.get('show');
+
+ var isDataNaN = data && isNaN(data.get('value', dataIdx));
+ var itemLayout = data && data.getItemLayout(dataIdx);
+ // In the following cases label will be drawn
+ // 1. In map series and data value is NaN
+ // 2. In geo component
+ // 4. Region has no series legendSymbol, which will be add a showLabel flag in mapSymbolLayout
+ if (
+ (!data || isDataNaN && (showLabel || hoverShowLabel))
+ || (itemLayout && itemLayout.showLabel)
+ ) {
+ var query = data ? dataIdx : region.name;
+ var formattedStr = mapOrGeoModel.getFormattedLabel(query, 'normal');
+ var hoverFormattedStr = mapOrGeoModel.getFormattedLabel(query, 'emphasis');
+ var text = new graphic.Text({
+ style: {
+ text: showLabel ? (formattedStr || region.name) : '',
+ fill: textStyleModel.getTextColor(),
+ textFont: textStyleModel.getFont(),
+ textAlign: 'center',
+ textVerticalAlign: 'middle'
+ },
+ hoverStyle: {
+ text: hoverShowLabel ? (hoverFormattedStr || region.name) : '',
+ fill: hoverTextStyleModel.getTextColor(),
+ textFont: hoverTextStyleModel.getFont()
+ },
+ position: region.center.slice(),
+ scale: [1 / scale[0], 1 / scale[1]],
+ z2: 10,
+ silent: true
+ });
+
+ regionGroup.add(text);
+ }
+
+ // setItemGraphicEl, setHoverStyle after all polygons and labels
+ // are added to the rigionGroup
+ data && data.setItemGraphicEl(dataIdx, regionGroup);
+
+ graphic.setHoverStyle(regionGroup, hoverItemStyle);
+
+ group.add(regionGroup);
+ });
+
+ this._updateController(mapOrGeoModel, ecModel, api);
+
+ data && updateMapSelectHandler(mapOrGeoModel, data, group, api, fromView);
+
+ data && updateMapSelected(mapOrGeoModel, data);
+ },
+
+ remove: function () {
+ this.group.removeAll();
+ this._controller.dispose();
+ },
+
+ _updateController: function (mapOrGeoModel, ecModel, api) {
+ var geo = mapOrGeoModel.coordinateSystem;
+ var controller = this._controller;
+ controller.zoomLimit = mapOrGeoModel.get('scaleLimit');
+ // Update zoom from model
+ controller.zoom = mapOrGeoModel.get('roamDetail.zoom');
+ // roamType is will be set default true if it is null
+ controller.enable(mapOrGeoModel.get('roam') || false);
+ // FIXME mainType, subType 作为 component 的属性?
+ var mainType = mapOrGeoModel.type.split('.')[0];
+ controller.off('pan')
+ .on('pan', function (dx, dy) {
+ api.dispatchAction({
+ type: 'geoRoam',
+ component: mainType,
+ name: mapOrGeoModel.name,
+ dx: dx,
+ dy: dy
+ });
+ });
+ controller.off('zoom')
+ .on('zoom', function (zoom, mouseX, mouseY) {
+ api.dispatchAction({
+ type: 'geoRoam',
+ component: mainType,
+ name: mapOrGeoModel.name,
+ zoom: zoom,
+ originX: mouseX,
+ originY: mouseY
+ });
+
+ if (this._updateGroup) {
+ var group = this.group;
+ var scale = group.scale;
+ group.traverse(function (el) {
+ if (el.type === 'text') {
+ el.attr('scale', [1 / scale[0], 1 / scale[1]]);
+ }
+ });
+ }
+ }, this);
+
+ controller.rect = geo.getViewRect();
+ }
+ };
+
+ module.exports = MapDraw;
+
+
+/***/ },
+/* 159 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @module echarts/component/helper/RoamController
+ */
+
+
+
+ var Eventful = __webpack_require__(32);
+ var zrUtil = __webpack_require__(3);
+ var eventTool = __webpack_require__(80);
+ var interactionMutex = __webpack_require__(160);
+
+ function mousedown(e) {
+ if (e.target && e.target.draggable) {
+ return;
+ }
+
+ var x = e.offsetX;
+ var y = e.offsetY;
+ var rect = this.rect;
+ if (rect && rect.contain(x, y)) {
+ this._x = x;
+ this._y = y;
+ this._dragging = true;
+ }
+ }
+
+ function mousemove(e) {
+ if (!this._dragging) {
+ return;
+ }
+
+ eventTool.stop(e.event);
+
+ if (e.gestureEvent !== 'pinch') {
+
+ if (interactionMutex.isTaken('globalPan', this._zr)) {
+ return;
+ }
+
+ var x = e.offsetX;
+ var y = e.offsetY;
+
+ var dx = x - this._x;
+ var dy = y - this._y;
+
+ this._x = x;
+ this._y = y;
+
+ var target = this.target;
+
+ if (target) {
+ var pos = target.position;
+ pos[0] += dx;
+ pos[1] += dy;
+ target.dirty();
+ }
+
+ eventTool.stop(e.event);
+ this.trigger('pan', dx, dy);
+ }
+ }
+
+ function mouseup(e) {
+ this._dragging = false;
+ }
+
+ function mousewheel(e) {
+ eventTool.stop(e.event);
+ // Convenience:
+ // Mac and VM Windows on Mac: scroll up: zoom out.
+ // Windows: scroll up: zoom in.
+ var zoomDelta = e.wheelDelta > 0 ? 1.1 : 1 / 1.1;
+ zoom.call(this, e, zoomDelta, e.offsetX, e.offsetY);
+ }
+
+ function pinch(e) {
+ if (interactionMutex.isTaken('globalPan', this._zr)) {
+ return;
+ }
+
+ eventTool.stop(e.event);
+ var zoomDelta = e.pinchScale > 1 ? 1.1 : 1 / 1.1;
+ zoom.call(this, e, zoomDelta, e.pinchX, e.pinchY);
+ }
+
+ function zoom(e, zoomDelta, zoomX, zoomY) {
+ var rect = this.rect;
+
+ if (rect && rect.contain(zoomX, zoomY)) {
+
+ var target = this.target;
+ var zoomLimit = this.zoomLimit;
+
+ if (target) {
+ var pos = target.position;
+ var scale = target.scale;
+
+ var newZoom = this.zoom = this.zoom || 1;
+ newZoom *= zoomDelta;
+ if (zoomLimit) {
+ newZoom = Math.max(
+ Math.min(zoomLimit.max, newZoom),
+ zoomLimit.min
+ );
+ }
+ var zoomScale = newZoom / this.zoom;
+ this.zoom = newZoom;
+ // Keep the mouse center when scaling
+ pos[0] -= (zoomX - pos[0]) * (zoomScale - 1);
+ pos[1] -= (zoomY - pos[1]) * (zoomScale - 1);
+ scale[0] *= zoomScale;
+ scale[1] *= zoomScale;
+
+ target.dirty();
+ }
+
+ this.trigger('zoom', zoomDelta, zoomX, zoomY);
+ }
+ }
+
+ /**
+ * @alias module:echarts/component/helper/RoamController
+ * @constructor
+ * @mixin {module:zrender/mixin/Eventful}
+ *
+ * @param {module:zrender/zrender~ZRender} zr
+ * @param {module:zrender/Element} target
+ * @param {module:zrender/core/BoundingRect} rect
+ */
+ function RoamController(zr, target, rect) {
+
+ /**
+ * @type {module:zrender/Element}
+ */
+ this.target = target;
+
+ /**
+ * @type {module:zrender/core/BoundingRect}
+ */
+ this.rect = rect;
+
+ /**
+ * { min: 1, max: 2 }
+ * @type {Object}
+ */
+ this.zoomLimit;
+
+ /**
+ * @type {number}
+ */
+ this.zoom;
+ /**
+ * @type {module:zrender}
+ */
+ this._zr = zr;
+
+ // Avoid two roamController bind the same handler
+ var bind = zrUtil.bind;
+ var mousedownHandler = bind(mousedown, this);
+ var mousemoveHandler = bind(mousemove, this);
+ var mouseupHandler = bind(mouseup, this);
+ var mousewheelHandler = bind(mousewheel, this);
+ var pinchHandler = bind(pinch, this);
+
+ Eventful.call(this);
+
+ /**
+ * Notice: only enable needed types. For example, if 'zoom'
+ * is not needed, 'zoom' should not be enabled, otherwise
+ * default mousewheel behaviour (scroll page) will be disabled.
+ *
+ * @param {boolean|string} [controlType=true] Specify the control type,
+ * which can be null/undefined or true/false
+ * or 'pan/move' or 'zoom'/'scale'
+ */
+ this.enable = function (controlType) {
+ // Disable previous first
+ this.disable();
+
+ if (controlType == null) {
+ controlType = true;
+ }
+
+ if (controlType === true || (controlType === 'move' || controlType === 'pan')) {
+ zr.on('mousedown', mousedownHandler);
+ zr.on('mousemove', mousemoveHandler);
+ zr.on('mouseup', mouseupHandler);
+ }
+ if (controlType === true || (controlType === 'scale' || controlType === 'zoom')) {
+ zr.on('mousewheel', mousewheelHandler);
+ zr.on('pinch', pinchHandler);
+ }
+ };
+
+ this.disable = function () {
+ zr.off('mousedown', mousedownHandler);
+ zr.off('mousemove', mousemoveHandler);
+ zr.off('mouseup', mouseupHandler);
+ zr.off('mousewheel', mousewheelHandler);
+ zr.off('pinch', pinchHandler);
+ };
+
+ this.dispose = this.disable;
+
+ this.isDragging = function () {
+ return this._dragging;
+ };
+
+ this.isPinching = function () {
+ return this._pinching;
+ };
+ }
+
+ zrUtil.mixin(RoamController, Eventful);
+
+ module.exports = RoamController;
+
+
+/***/ },
+/* 160 */
+/***/ function(module, exports) {
+
+
+
+ var ATTR = '\0_ec_interaction_mutex';
+
+ var interactionMutex = {
+
+ take: function (key, zr) {
+ getStore(zr)[key] = true;
+ },
+
+ release: function (key, zr) {
+ getStore(zr)[key] = false;
+ },
+
+ isTaken: function (key, zr) {
+ return !!getStore(zr)[key];
+ }
+ };
+
+ function getStore(zr) {
+ return zr[ATTR] || (zr[ATTR] = {});
+ }
+
+ module.exports = interactionMutex;
+
+
+/***/ },
+/* 161 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var roamHelper = __webpack_require__(162);
+
+ var echarts = __webpack_require__(1);
+ var actionInfo = {
+ type: 'geoRoam',
+ event: 'geoRoam',
+ update: 'updateLayout'
+ };
+
+ /**
+ * @payload
+ * @property {string} [component=series]
+ * @property {string} name Component name
+ * @property {number} [dx]
+ * @property {number} [dy]
+ * @property {number} [zoom]
+ * @property {number} [originX]
+ * @property {number} [originY]
+ */
+ echarts.registerAction(actionInfo, function (payload, ecModel) {
+ var componentType = payload.component || 'series';
+
+ ecModel.eachComponent(componentType, function (componentModel) {
+ if (componentModel.name === payload.name) {
+ var geo = componentModel.coordinateSystem;
+ if (geo.type !== 'geo') {
+ return;
+ }
+
+ var roamDetailModel = componentModel.getModel('roamDetail');
+ var res = roamHelper.calcPanAndZoom(
+ roamDetailModel, payload, componentModel.get('scaleLimit')
+ );
+
+ componentModel.setRoamPan
+ && componentModel.setRoamPan(res.x, res.y);
+
+ componentModel.setRoamZoom
+ && componentModel.setRoamZoom(res.zoom);
+
+ geo && geo.setPan(res.x, res.y);
+ geo && geo.setZoom(res.zoom);
+
+ // All map series with same `map` use the same geo coordinate system
+ // So the roamDetail must be in sync. Include the series not selected by legend
+ if (componentType === 'series') {
+ zrUtil.each(componentModel.seriesGroup, function (seriesModel) {
+ seriesModel.setRoamPan(res.x, res.y);
+ seriesModel.setRoamZoom(res.zoom);
+ });
+ }
+ }
+ });
+ });
+
+
+/***/ },
+/* 162 */
+/***/ function(module, exports) {
+
+
+
+ var roamHelper = {};
+
+ /**
+ * Calculate pan and zoom which from roamDetail model
+ * @param {module:echarts/model/Model} roamDetailModel
+ * @param {Object} payload
+ * @param {Object} [zoomLimit]
+ */
+ roamHelper.calcPanAndZoom = function (
+ roamDetailModel, payload, zoomLimit
+ ) {
+ var dx = payload.dx;
+ var dy = payload.dy;
+ var zoom = payload.zoom;
+
+ var panX = roamDetailModel.get('x') || 0;
+ var panY = roamDetailModel.get('y') || 0;
+
+ var previousZoom = roamDetailModel.get('zoom') || 1;
+
+ if (dx != null && dy != null) {
+ panX += dx;
+ panY += dy;
+ }
+ if (zoom != null) {
+ if (zoomLimit) {
+ zoom = Math.max(
+ Math.min(previousZoom * zoom, zoomLimit.max),
+ zoomLimit.min
+ ) / previousZoom;
+ }
+ var fixX = (payload.originX - panX) * (zoom - 1);
+ var fixY = (payload.originY - panY) * (zoom - 1);
+
+ panX -= fixX;
+ panY -= fixY;
+ }
+
+ return {
+ x: panX,
+ y: panY,
+ zoom: (zoom || 1) * previousZoom
+ };
+ };
+
+ module.exports = roamHelper;
+
+
+/***/ },
+/* 163 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ __webpack_require__(164);
+
+ var Geo = __webpack_require__(165);
+
+ var layout = __webpack_require__(21);
+ var zrUtil = __webpack_require__(3);
+
+ var mapDataStores = {};
+
+ /**
+ * Resize method bound to the geo
+ * @param {module:echarts/coord/geo/GeoModel|module:echarts/chart/map/MapModel} geoModel
+ * @param {module:echarts/ExtensionAPI} api
+ */
+ function resizeGeo (geoModel, api) {
+ var rect = this.getBoundingRect();
+
+ var boxLayoutOption = geoModel.getBoxLayoutParams();
+ // 0.75 rate
+ boxLayoutOption.aspect = rect.width / rect.height * 0.75;
+
+ var viewRect = layout.getLayoutRect(boxLayoutOption, {
+ width: api.getWidth(),
+ height: api.getHeight()
+ });
+
+ this.setViewRect(viewRect.x, viewRect.y, viewRect.width, viewRect.height);
+
+ var roamDetailModel = geoModel.getModel('roamDetail');
+
+ var panX = roamDetailModel.get('x') || 0;
+ var panY = roamDetailModel.get('y') || 0;
+ var zoom = roamDetailModel.get('zoom') || 1;
+
+ this.setPan(panX, panY);
+ this.setZoom(zoom);
+ }
+
+ /**
+ * @param {module:echarts/coord/Geo} geo
+ * @param {module:echarts/model/Model} model
+ * @inner
+ */
+ function setGeoCoords(geo, model) {
+ zrUtil.each(model.get('geoCoord'), function (geoCoord, name) {
+ geo.addGeoCoord(name, geoCoord);
+ });
+ }
+
+ function mapNotExistsError(name) {
+ console.error('Map ' + name + ' not exists');
+ }
+
+ var geoCreator = {
+
+ // For deciding which dimensions to use when creating list data
+ dimensions: Geo.prototype.dimensions,
+
+ create: function (ecModel, api) {
+ var geoList = [];
+
+ // FIXME Create each time may be slow
+ ecModel.eachComponent('geo', function (geoModel, idx) {
+ var name = geoModel.get('map');
+ var mapData = mapDataStores[name];
+ if (!mapData) {
+ mapNotExistsError(name);
+ }
+ var geo = new Geo(
+ name + idx, name,
+ mapData && mapData.geoJson, mapData && mapData.specialAreas,
+ geoModel.get('nameMap')
+ );
+ geo.zoomLimit = geoModel.get('scaleLimit');
+ geoList.push(geo);
+
+ setGeoCoords(geo, geoModel);
+
+ geoModel.coordinateSystem = geo;
+ geo.model = geoModel;
+
+ // Inject resize method
+ geo.resize = resizeGeo;
+
+ geo.resize(geoModel, api);
+ });
+
+ ecModel.eachSeries(function (seriesModel) {
+ var coordSys = seriesModel.get('coordinateSystem');
+ if (coordSys === 'geo') {
+ var geoIndex = seriesModel.get('geoIndex') || 0;
+ seriesModel.coordinateSystem = geoList[geoIndex];
+ }
+ });
+
+ // If has map series
+ var mapModelGroupBySeries = {};
+
+ ecModel.eachSeriesByType('map', function (seriesModel) {
+ var mapType = seriesModel.get('map');
+
+ mapModelGroupBySeries[mapType] = mapModelGroupBySeries[mapType] || [];
+
+ mapModelGroupBySeries[mapType].push(seriesModel);
+ });
+
+ zrUtil.each(mapModelGroupBySeries, function (mapSeries, mapType) {
+ var mapData = mapDataStores[mapType];
+ if (!mapData) {
+ mapNotExistsError(name);
+ }
+
+ var nameMapList = zrUtil.map(mapSeries, function (singleMapSeries) {
+ return singleMapSeries.get('nameMap');
+ });
+ var geo = new Geo(
+ mapType, mapType,
+ mapData && mapData.geoJson, mapData && mapData.specialAreas,
+ zrUtil.mergeAll(nameMapList)
+ );
+ geo.zoomLimit = zrUtil.retrieve.apply(null, zrUtil.map(mapSeries, function (singleMapSeries) {
+ return singleMapSeries.get('scaleLimit');
+ }));
+ geoList.push(geo);
+
+ // Inject resize method
+ geo.resize = resizeGeo;
+
+ geo.resize(mapSeries[0], api);
+
+ zrUtil.each(mapSeries, function (singleMapSeries) {
+ singleMapSeries.coordinateSystem = geo;
+
+ setGeoCoords(geo, singleMapSeries);
+ });
+ });
+
+ return geoList;
+ },
+
+ /**
+ * @param {string} mapName
+ * @param {Object|string} geoJson
+ * @param {Object} [specialAreas]
+ *
+ * @example
+ * $.get('USA.json', function (geoJson) {
+ * echarts.registerMap('USA', geoJson);
+ * // Or
+ * echarts.registerMap('USA', {
+ * geoJson: geoJson,
+ * specialAreas: {}
+ * })
+ * });
+ */
+ registerMap: function (mapName, geoJson, specialAreas) {
+ if (geoJson.geoJson && !geoJson.features) {
+ specialAreas = geoJson.specialAreas;
+ geoJson = geoJson.geoJson;
+ }
+ if (typeof geoJson === 'string') {
+ geoJson = (typeof JSON !== 'undefined' && JSON.parse)
+ ? JSON.parse(geoJson) : (new Function('return (' + geoJson + ');'))();
+ }
+ mapDataStores[mapName] = {
+ geoJson: geoJson,
+ specialAreas: specialAreas
+ };
+ },
+
+ /**
+ * @param {string} mapName
+ * @return {Object}
+ */
+ getMap: function (mapName) {
+ return mapDataStores[mapName];
+ }
+ };
+
+ // Inject methods into echarts
+ var echarts = __webpack_require__(1);
+
+ echarts.registerMap = geoCreator.registerMap;
+
+ echarts.getMap = geoCreator.getMap;
+
+ // TODO
+ echarts.loadMap = function () {};
+
+ echarts.registerCoordinateSystem('geo', geoCreator);
+
+
+/***/ },
+/* 164 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var modelUtil = __webpack_require__(5);
+ var ComponentModel = __webpack_require__(19);
+
+ ComponentModel.extend({
+
+ type: 'geo',
+
+ /**
+ * @type {module:echarts/coord/geo/Geo}
+ */
+ coordinateSystem: null,
+
+ init: function (option) {
+ ComponentModel.prototype.init.apply(this, arguments);
+
+ // Default label emphasis `position` and `show`
+ modelUtil.defaultEmphasis(
+ option.label, ['position', 'show', 'textStyle', 'distance', 'formatter']
+ );
+ },
+
+ defaultOption: {
+
+ zlevel: 0,
+
+ z: 0,
+
+ show: true,
+
+ left: 'center',
+
+ top: 'center',
+
+ // 自适应
+ // width:,
+ // height:,
+ // right
+ // bottom
+
+ // Map type
+ map: '',
+
+ // 在 roam å¼€å¯çš„时候使用
+ roamDetail: {
+ x: 0,
+ y: 0,
+ zoom: 1
+ },
+
+ scaleLimit: null,
+
+ label: {
+ normal: {
+ show: false,
+ textStyle: {
+ color: '#000'
+ }
+ },
+ emphasis: {
+ show: true,
+ textStyle: {
+ color: 'rgb(100,0,0)'
+ }
+ }
+ },
+
+ itemStyle: {
+ normal: {
+ // color: å„异,
+ borderWidth: 0.5,
+ borderColor: '#444',
+ color: '#eee'
+ },
+ emphasis: { // 也是选中样å¼
+ color: 'rgba(255,215,0,0.8)'
+ }
+ }
+ },
+
+ /**
+ * Format label
+ * @param {string} name Region name
+ * @param {string} [status='normal'] 'normal' or 'emphasis'
+ * @return {string}
+ */
+ getFormattedLabel: function (name, status) {
+ var formatter = this.get('label.' + status + '.formatter');
+ var params = {
+ name: name
+ };
+ if (typeof formatter === 'function') {
+ params.status = status;
+ return formatter(params);
+ }
+ else if (typeof formatter === 'string') {
+ return formatter.replace('{a}', params.seriesName);
+ }
+ },
+
+ setRoamZoom: function (zoom) {
+ var roamDetail = this.option.roamDetail;
+ roamDetail && (roamDetail.zoom = zoom);
+ },
+
+ setRoamPan: function (x, y) {
+ var roamDetail = this.option.roamDetail;
+ if (roamDetail) {
+ roamDetail.x = x;
+ roamDetail.y = y;
+ }
+ }
+ });
+
+
+/***/ },
+/* 165 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var parseGeoJson = __webpack_require__(166);
+
+ var zrUtil = __webpack_require__(3);
+
+ var BoundingRect = __webpack_require__(15);
+
+ var View = __webpack_require__(169);
+
+
+ // Geo fix functions
+ var geoFixFuncs = [
+ __webpack_require__(170),
+ __webpack_require__(171),
+ __webpack_require__(172)
+ ];
+
+ /**
+ * [Geo description]
+ * @param {string} name Geo name
+ * @param {string} map Map type
+ * @param {Object} geoJson
+ * @param {Object} [specialAreas]
+ * Specify the positioned areas by left, top, width, height
+ * @param {Object.<string, string>} [nameMap]
+ * Specify name alias
+ */
+ function Geo(name, map, geoJson, specialAreas, nameMap) {
+
+ View.call(this, name);
+
+ /**
+ * Map type
+ * @type {string}
+ */
+ this.map = map;
+
+ this._nameCoordMap = {};
+
+ this.loadGeoJson(geoJson, specialAreas, nameMap);
+ }
+
+ Geo.prototype = {
+
+ constructor: Geo,
+
+ type: 'geo',
+
+ /**
+ * @param {Array.<string>}
+ * @readOnly
+ */
+ dimensions: ['lng', 'lat'],
+
+ /**
+ * @param {Object} geoJson
+ * @param {Object} [specialAreas]
+ * Specify the positioned areas by left, top, width, height
+ * @param {Object.<string, string>} [nameMap]
+ * Specify name alias
+ */
+ loadGeoJson: function (geoJson, specialAreas, nameMap) {
+ // https://jsperf.com/try-catch-performance-overhead
+ try {
+ this.regions = geoJson ? parseGeoJson(geoJson) : [];
+ }
+ catch (e) {
+ throw 'Invalid geoJson format\n' + e;
+ }
+ specialAreas = specialAreas || {};
+ nameMap = nameMap || {};
+ var regions = this.regions;
+ var regionsMap = {};
+ for (var i = 0; i < regions.length; i++) {
+ var regionName = regions[i].name;
+ // Try use the alias in nameMap
+ regionName = nameMap[regionName] || regionName;
+ regions[i].name = regionName;
+
+ regionsMap[regionName] = regions[i];
+ // Add geoJson
+ this.addGeoCoord(regionName, regions[i].center);
+
+ // Some area like Alaska in USA map needs to be tansformed
+ // to look better
+ var specialArea = specialAreas[regionName];
+ if (specialArea) {
+ regions[i].transformTo(
+ specialArea.left, specialArea.top, specialArea.width, specialArea.height
+ );
+ }
+ }
+
+ this._regionsMap = regionsMap;
+
+ this._rect = null;
+
+ zrUtil.each(geoFixFuncs, function (fixFunc) {
+ fixFunc(this);
+ }, this);
+ },
+
+ // Overwrite
+ transformTo: function (x, y, width, height) {
+ var rect = this.getBoundingRect();
+
+ rect = rect.clone();
+ // Longitute is inverted
+ rect.y = -rect.y - rect.height;
+
+ var viewTransform = this._viewTransform;
+
+ viewTransform.transform = rect.calculateTransform(
+ new BoundingRect(x, y, width, height)
+ );
+
+ viewTransform.decomposeTransform();
+
+ var scale = viewTransform.scale;
+ scale[1] = -scale[1];
+
+ viewTransform.updateTransform();
+
+ this._updateTransform();
+ },
+
+ /**
+ * @param {string} name
+ * @return {module:echarts/coord/geo/Region}
+ */
+ getRegion: function (name) {
+ return this._regionsMap[name];
+ },
+
+ /**
+ * Add geoCoord for indexing by name
+ * @param {string} name
+ * @param {Array.<number>} geoCoord
+ */
+ addGeoCoord: function (name, geoCoord) {
+ this._nameCoordMap[name] = geoCoord;
+ },
+
+ /**
+ * Get geoCoord by name
+ * @param {string} name
+ * @return {Array.<number>}
+ */
+ getGeoCoord: function (name) {
+ return this._nameCoordMap[name];
+ },
+
+ // Overwrite
+ getBoundingRect: function () {
+ if (this._rect) {
+ return this._rect;
+ }
+ var rect;
+
+ var regions = this.regions;
+ for (var i = 0; i < regions.length; i++) {
+ var regionRect = regions[i].getBoundingRect();
+ rect = rect || regionRect.clone();
+ rect.union(regionRect);
+ }
+ // FIXME Always return new ?
+ return (this._rect = rect || new BoundingRect(0, 0, 0, 0));
+ },
+
+ /**
+ * Convert series data to a list of points
+ * @param {module:echarts/data/List} data
+ * @param {boolean} stack
+ * @return {Array}
+ * Return list of points. For example:
+ * `[[10, 10], [20, 20], [30, 30]]`
+ */
+ dataToPoints: function (data) {
+ var item = [];
+ return data.mapArray(['lng', 'lat'], function (lon, lat) {
+ item[0] = lon;
+ item[1] = lat;
+ return this.dataToPoint(item);
+ }, this);
+ },
+
+ // Overwrite
+ /**
+ * @param {string|Array.<number>} data
+ * @return {Array.<number>}
+ */
+ dataToPoint: function (data) {
+ if (typeof data === 'string') {
+ // Map area name to geoCoord
+ data = this.getGeoCoord(data);
+ }
+ if (data) {
+ return View.prototype.dataToPoint.call(this, data);
+ }
+ }
+ };
+
+ zrUtil.mixin(Geo, View);
+
+ module.exports = Geo;
+
+
+/***/ },
+/* 166 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Parse and decode geo json
+ * @module echarts/coord/geo/parseGeoJson
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+
+ var Region = __webpack_require__(167);
+
+ function decode(json) {
+ if (!json.UTF8Encoding) {
+ return json;
+ }
+ var features = json.features;
+
+ for (var f = 0; f < features.length; f++) {
+ var feature = features[f];
+ var geometry = feature.geometry;
+ var coordinates = geometry.coordinates;
+ var encodeOffsets = geometry.encodeOffsets;
+
+ for (var c = 0; c < coordinates.length; c++) {
+ var coordinate = coordinates[c];
+
+ if (geometry.type === 'Polygon') {
+ coordinates[c] = decodePolygon(
+ coordinate,
+ encodeOffsets[c]
+ );
+ }
+ else if (geometry.type === 'MultiPolygon') {
+ for (var c2 = 0; c2 < coordinate.length; c2++) {
+ var polygon = coordinate[c2];
+ coordinate[c2] = decodePolygon(
+ polygon,
+ encodeOffsets[c][c2]
+ );
+ }
+ }
+ }
+ }
+ // Has been decoded
+ json.UTF8Encoding = false;
+ return json;
+ }
+
+ function decodePolygon(coordinate, encodeOffsets) {
+ var result = [];
+ var prevX = encodeOffsets[0];
+ var prevY = encodeOffsets[1];
+
+ for (var i = 0; i < coordinate.length; i += 2) {
+ var x = coordinate.charCodeAt(i) - 64;
+ var y = coordinate.charCodeAt(i + 1) - 64;
+ // ZigZag decoding
+ x = (x >> 1) ^ (-(x & 1));
+ y = (y >> 1) ^ (-(y & 1));
+ // Delta deocding
+ x += prevX;
+ y += prevY;
+
+ prevX = x;
+ prevY = y;
+ // Dequantize
+ result.push([x / 1024, y / 1024]);
+ }
+
+ return result;
+ }
+
+ /**
+ * @inner
+ */
+ function flattern2D(array) {
+ var ret = [];
+ for (var i = 0; i < array.length; i++) {
+ for (var k = 0; k < array[i].length; k++) {
+ ret.push(array[i][k]);
+ }
+ }
+ return ret;
+ }
+
+ /**
+ * @alias module:echarts/coord/geo/parseGeoJson
+ * @param {Object} geoJson
+ * @return {module:zrender/container/Group}
+ */
+ module.exports = function (geoJson) {
+
+ decode(geoJson);
+
+ return zrUtil.map(zrUtil.filter(geoJson.features, function (featureObj) {
+ // Output of mapshaper may have geometry null
+ return featureObj.geometry && featureObj.properties;
+ }), function (featureObj) {
+ var properties = featureObj.properties;
+ var geometry = featureObj.geometry;
+
+ var coordinates = geometry.coordinates;
+
+ if (geometry.type === 'MultiPolygon') {
+ coordinates = flattern2D(coordinates);
+ }
+
+ return new Region(
+ properties.name,
+ coordinates,
+ properties.cp
+ );
+ });
+ };
+
+
+/***/ },
+/* 167 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @module echarts/coord/geo/Region
+ */
+
+
+ var polygonContain = __webpack_require__(168);
+
+ var BoundingRect = __webpack_require__(15);
+
+ var bbox = __webpack_require__(50);
+ var vec2 = __webpack_require__(16);
+
+ /**
+ * @param {string} name
+ * @param {Array} contours
+ * @param {Array.<number>} cp
+ */
+ function Region(name, contours, cp) {
+
+ /**
+ * @type {string}
+ * @readOnly
+ */
+ this.name = name;
+
+ /**
+ * @type {Array.<Array>}
+ * @readOnly
+ */
+ this.contours = contours;
+
+ if (!cp) {
+ var rect = this.getBoundingRect();
+ cp = [
+ rect.x + rect.width / 2,
+ rect.y + rect.height / 2
+ ];
+ }
+ else {
+ cp = [cp[0], cp[1]];
+ }
+ /**
+ * @type {Array.<number>}
+ */
+ this.center = cp;
+ }
+
+ Region.prototype = {
+
+ constructor: Region,
+
+ /**
+ * @return {module:zrender/core/BoundingRect}
+ */
+ getBoundingRect: function () {
+ var rect = this._rect;
+ if (rect) {
+ return rect;
+ }
+
+ var MAX_NUMBER = Number.MAX_VALUE;
+ var min = [MAX_NUMBER, MAX_NUMBER];
+ var max = [-MAX_NUMBER, -MAX_NUMBER];
+ var min2 = [];
+ var max2 = [];
+ var contours = this.contours;
+ for (var i = 0; i < contours.length; i++) {
+ bbox.fromPoints(contours[i], min2, max2);
+ vec2.min(min, min, min2);
+ vec2.max(max, max, max2);
+ }
+ // No data
+ if (i === 0) {
+ min[0] = min[1] = max[0] = max[1] = 0;
+ }
+
+ return (this._rect = new BoundingRect(
+ min[0], min[1], max[0] - min[0], max[1] - min[1]
+ ));
+ },
+
+ /**
+ * @param {<Array.<number>} coord
+ * @return {boolean}
+ */
+ contain: function (coord) {
+ var rect = this.getBoundingRect();
+ var contours = this.contours;
+ if (rect.contain(coord[0], coord[1])) {
+ for (var i = 0, len = contours.length; i < len; i++) {
+ if (polygonContain.contain(contours[i], coord[0], coord[1])) {
+ return true;
+ }
+ }
+ }
+ return false;
+ },
+
+ transformTo: function (x, y, width, height) {
+ var rect = this.getBoundingRect();
+ var aspect = rect.width / rect.height;
+ if (!width) {
+ width = aspect * height;
+ }
+ else if (!height) {
+ height = width / aspect ;
+ }
+ var target = new BoundingRect(x, y, width, height);
+ var transform = rect.calculateTransform(target);
+ var contours = this.contours;
+ for (var i = 0; i < contours.length; i++) {
+ for (var p = 0; p < contours[i].length; p++) {
+ vec2.applyTransform(contours[i][p], contours[i][p], transform);
+ }
+ }
+ rect = this._rect;
+ rect.copy(target);
+ // Update center
+ this.center = [
+ rect.x + rect.width / 2,
+ rect.y + rect.height / 2
+ ];
+ }
+ };
+
+ module.exports = Region;
+
+
+/***/ },
+/* 168 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var windingLine = __webpack_require__(57);
+
+ var EPSILON = 1e-8;
+
+ function isAroundEqual(a, b) {
+ return Math.abs(a - b) < EPSILON;
+ }
+
+ function contain(points, x, y) {
+ var w = 0;
+ var p = points[0];
+
+ if (!p) {
+ return false;
+ }
+
+ for (var i = 1; i < points.length; i++) {
+ var p2 = points[i];
+ w += windingLine(p[0], p[1], p2[0], p2[1], x, y);
+ p = p2;
+ }
+
+ // Close polygon
+ var p0 = points[0];
+ if (!isAroundEqual(p[0], p0[0]) || !isAroundEqual(p[1], p0[1])) {
+ w += windingLine(p[0], p[1], p0[0], p0[1], x, y);
+ }
+
+ return w !== 0;
+ }
+
+
+ module.exports = {
+ contain: contain
+ };
+
+
+/***/ },
+/* 169 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Simple view coordinate system
+ * Mapping given x, y to transformd view x, y
+ */
+
+
+ var vector = __webpack_require__(16);
+ var matrix = __webpack_require__(17);
+
+ var Transformable = __webpack_require__(33);
+ var zrUtil = __webpack_require__(3);
+
+ var BoundingRect = __webpack_require__(15);
+
+ var v2ApplyTransform = vector.applyTransform;
+
+ // Dummy transform node
+ function TransformDummy() {
+ Transformable.call(this);
+ }
+ zrUtil.mixin(TransformDummy, Transformable);
+
+ function View(name) {
+ /**
+ * @type {string}
+ */
+ this.name = name;
+
+ /**
+ * @type {Array.<number>}
+ */
+ this.zoomLimit;
+
+ Transformable.call(this);
+
+ this._roamTransform = new TransformDummy();
+
+ this._viewTransform = new TransformDummy();
+ }
+
+ View.prototype = {
+
+ constructor: View,
+
+ type: 'view',
+
+ /**
+ * @param {Array.<string>}
+ * @readOnly
+ */
+ dimensions: ['x', 'y'],
+
+ /**
+ * Set bounding rect
+ * @param {number} x
+ * @param {number} y
+ * @param {number} width
+ * @param {number} height
+ */
+
+ // PENDING to getRect
+ setBoundingRect: function (x, y, width, height) {
+ this._rect = new BoundingRect(x, y, width, height);
+ return this._rect;
+ },
+
+ /**
+ * @return {module:zrender/core/BoundingRect}
+ */
+ // PENDING to getRect
+ getBoundingRect: function () {
+ return this._rect;
+ },
+
+ /**
+ * @param {number} x
+ * @param {number} y
+ * @param {number} width
+ * @param {number} height
+ */
+ setViewRect: function (x, y, width, height) {
+ this.transformTo(x, y, width, height);
+ this._viewRect = new BoundingRect(x, y, width, height);
+ },
+
+ /**
+ * Transformed to particular position and size
+ * @param {number} x
+ * @param {number} y
+ * @param {number} width
+ * @param {number} height
+ */
+ transformTo: function (x, y, width, height) {
+ var rect = this.getBoundingRect();
+ var viewTransform = this._viewTransform;
+
+ viewTransform.transform = rect.calculateTransform(
+ new BoundingRect(x, y, width, height)
+ );
+
+ viewTransform.decomposeTransform();
+
+ this._updateTransform();
+ },
+
+ /**
+ * @param {number} x
+ * @param {number} y
+ */
+ setPan: function (x, y) {
+
+ this._roamTransform.position = [x, y];
+
+ this._updateTransform();
+ },
+
+ /**
+ * @param {number} zoom
+ */
+ setZoom: function (zoom) {
+ var zoomLimit = this.zoomLimit;
+ if (zoomLimit) {
+ zoom = Math.max(
+ Math.min(zoom, zoomLimit.max), zoomLimit.min
+ );
+ }
+
+ this._roamTransform.scale = [zoom, zoom];
+
+ this._updateTransform();
+ },
+
+ /**
+ * @return {Array.<number}
+ */
+ getRoamTransform: function () {
+ return this._roamTransform.transform;
+ },
+
+ /**
+ * Update transform from roam and mapLocation
+ * @private
+ */
+ _updateTransform: function () {
+ var roamTransform = this._roamTransform;
+ var viewTransform = this._viewTransform;
+ // var scale = this.scale;
+
+ viewTransform.parent = roamTransform;
+ roamTransform.updateTransform();
+ viewTransform.updateTransform();
+
+ viewTransform.transform
+ && matrix.copy(this.transform || (this.transform = []), viewTransform.transform);
+
+ this.decomposeTransform();
+ },
+
+ /**
+ * @return {module:zrender/core/BoundingRect}
+ */
+ getViewRect: function () {
+ return this._viewRect;
+ },
+
+ /**
+ * Convert a single (lon, lat) data item to (x, y) point.
+ * @param {Array.<number>} data
+ * @return {Array.<number>}
+ */
+ dataToPoint: function (data) {
+ var transform = this.transform;
+ return transform
+ ? v2ApplyTransform([], data, transform)
+ : [data[0], data[1]];
+ },
+
+ /**
+ * Convert a (x, y) point to (lon, lat) data
+ * @param {Array.<number>} point
+ * @return {Array.<number>}
+ */
+ pointToData: function (point) {
+ var invTransform = this.invTransform;
+ return invTransform
+ ? v2ApplyTransform([], point, invTransform)
+ : [point[0], point[1]];
+ }
+
+ /**
+ * @return {number}
+ */
+ // getScalarScale: function () {
+ // // Use determinant square root of transform to mutiply scalar
+ // var m = this.transform;
+ // var det = Math.sqrt(Math.abs(m[0] * m[3] - m[2] * m[1]));
+ // return det;
+ // }
+ };
+
+ zrUtil.mixin(View, Transformable);
+
+ module.exports = View;
+
+
+/***/ },
+/* 170 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // Fix for å—海诸岛
+
+
+ var Region = __webpack_require__(167);
+
+ var geoCoord = [126, 25];
+
+ var points = [
+ [[0,3.5],[7,11.2],[15,11.9],[30,7],[42,0.7],[52,0.7],
+ [56,7.7],[59,0.7],[64,0.7],[64,0],[5,0],[0,3.5]],
+ [[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],
+ [[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],
+ [[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],
+ [[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],
+ [[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],
+ [[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],
+ [[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],
+ [[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],
+ [[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],
+ [[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],
+ [[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],
+ [1,92.4],[1,3.5],[0,3.5]]
+ ];
+ for (var i = 0; i < points.length; i++) {
+ for (var k = 0; k < points[i].length; k++) {
+ points[i][k][0] /= 10.5;
+ points[i][k][1] /= -10.5 / 0.75;
+
+ points[i][k][0] += geoCoord[0];
+ points[i][k][1] += geoCoord[1];
+ }
+ }
+ module.exports = function (geo) {
+ if (geo.map === 'china') {
+ geo.regions.push(new Region(
+ 'å—海诸岛', points, geoCoord
+ ));
+ }
+ };
+
+
+/***/ },
+/* 171 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+
+ var coordsOffsetMap = {
+ 'å—海诸岛' : [32, 80],
+ // 全国
+ '广东': [0, -10],
+ '香港': [10, 5],
+ '澳门': [-10, 10],
+ //'北京': [-10, 0],
+ '天津': [5, 5]
+ };
+
+ module.exports = function (geo) {
+ zrUtil.each(geo.regions, function (region) {
+ var coordFix = coordsOffsetMap[region.name];
+ if (coordFix) {
+ var cp = region.center;
+ cp[0] += coordFix[0] / 10.5;
+ cp[1] += -coordFix[1] / (10.5 / 0.75);
+ }
+ });
+ };
+
+
+/***/ },
+/* 172 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+
+ var geoCoordMap = {
+ 'Russia': [100, 60],
+ 'United States of America': [-99, 38]
+ };
+
+ module.exports = function (geo) {
+ zrUtil.each(geo.regions, function (region) {
+ var geoCoord = geoCoordMap[region.name];
+ if (geoCoord) {
+ var cp = region.center;
+ cp[0] = geoCoord[0];
+ cp[1] = geoCoord[1];
+ }
+ });
+ };
+
+
+/***/ },
+/* 173 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+
+ module.exports = function (ecModel) {
+
+ var processedMapType = {};
+
+ ecModel.eachSeriesByType('map', function (mapSeries) {
+ var mapType = mapSeries.get('mapType');
+ if (processedMapType[mapType]) {
+ return;
+ }
+
+ var mapSymbolOffsets = {};
+
+ zrUtil.each(mapSeries.seriesGroup, function (subMapSeries) {
+ var geo = subMapSeries.coordinateSystem;
+ var data = subMapSeries.getData();
+ if (subMapSeries.get('showLegendSymbol') && ecModel.getComponent('legend')) {
+ data.each('value', function (value, idx) {
+ var name = data.getName(idx);
+ var region = geo.getRegion(name);
+
+ // No region or no value
+ // In MapSeries data regions will be filled with NaN
+ // If they are not in the series.data array.
+ // So here must validate if value is NaN
+ if (!region || isNaN(value)) {
+ return;
+ }
+
+ var offset = mapSymbolOffsets[name] || 0;
+
+ var point = geo.dataToPoint(region.center);
+
+ mapSymbolOffsets[name] = offset + 1;
+
+ data.setItemLayout(idx, {
+ point: point,
+ offset: offset
+ });
+ });
+ }
+ });
+
+ // Show label of those region not has legendSymbol(which is offset 0)
+ var data = mapSeries.getData();
+ data.each(function (idx) {
+ var name = data.getName(idx);
+ var layout = data.getItemLayout(idx) || {};
+ layout.showLabel = !mapSymbolOffsets[name];
+ data.setItemLayout(idx, layout);
+ });
+
+ processedMapType[mapType] = true;
+ });
+ };
+
+
+/***/ },
+/* 174 */
+/***/ function(module, exports) {
+
+
+ module.exports = function (ecModel) {
+ ecModel.eachSeriesByType('map', function (seriesModel) {
+ var colorList = seriesModel.get('color');
+ var itemStyleModel = seriesModel.getModel('itemStyle.normal');
+
+ var areaColor = itemStyleModel.get('areaColor');
+ var color = itemStyleModel.get('color')
+ || colorList[seriesModel.seriesIndex % colorList.length];
+
+ seriesModel.getData().setVisual({
+ 'areaColor': areaColor,
+ 'color': color
+ });
+ });
+ };
+
+
+/***/ },
+/* 175 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+
+ // FIXME 公用?
+ /**
+ * @param {Array.<module:echarts/data/List>} datas
+ * @param {string} statisticsType 'average' 'sum'
+ * @inner
+ */
+ function dataStatistics(datas, statisticsType) {
+ var dataNameMap = {};
+ var dims = ['value'];
+
+ for (var i = 0; i < datas.length; i++) {
+ datas[i].each(dims, function (value, idx) {
+ var name = datas[i].getName(idx);
+ dataNameMap[name] = dataNameMap[name] || [];
+ if (!isNaN(value)) {
+ dataNameMap[name].push(value);
+ }
+ });
+ }
+
+ return datas[0].map(dims, function (value, idx) {
+ var name = datas[0].getName(idx);
+ var sum = 0;
+ var min = Infinity;
+ var max = -Infinity;
+ var len = dataNameMap[name].length;
+ for (var i = 0; i < len; i++) {
+ min = Math.min(min, dataNameMap[name][i]);
+ max = Math.max(max, dataNameMap[name][i]);
+ sum += dataNameMap[name][i];
+ }
+ var result;
+ if (statisticsType === 'min') {
+ result = min;
+ }
+ else if (statisticsType === 'max') {
+ result = max;
+ }
+ else if (statisticsType === 'average') {
+ result = sum / len;
+ }
+ else {
+ result = sum;
+ }
+ return len === 0 ? NaN : result;
+ });
+ }
+
+ module.exports = function (ecModel) {
+ var seriesGroupByMapType = {};
+ ecModel.eachSeriesByType('map', function (seriesModel) {
+ var mapType = seriesModel.get('map');
+ seriesGroupByMapType[mapType] = seriesGroupByMapType[mapType] || [];
+ seriesGroupByMapType[mapType].push(seriesModel);
+ });
+
+ zrUtil.each(seriesGroupByMapType, function (seriesList, mapType) {
+ var data = dataStatistics(
+ zrUtil.map(seriesList, function (seriesModel) {
+ return seriesModel.getData();
+ }),
+ seriesList[0].get('mapValueCalculation')
+ );
+
+ seriesList[0].seriesGroup = [];
+
+ seriesList[0].setData(data);
+
+ // FIXME Put where?
+ for (var i = 0; i < seriesList.length; i++) {
+ seriesList[i].seriesGroup = seriesList;
+ seriesList[i].needsDrawMap = i === 0;
+ }
+ });
+ };
+
+
+/***/ },
+/* 176 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var geoProps = [
+ 'x', 'y', 'x2', 'y2', 'width', 'height', 'map', 'roam', 'roamDetail', 'label', 'itemStyle'
+ ];
+
+ var geoCoordsMap = {};
+
+ function createGeoFromMap(mapSeriesOpt) {
+ var geoOpt = {};
+ zrUtil.each(geoProps, function (propName) {
+ if (mapSeriesOpt[propName] != null) {
+ geoOpt[propName] = mapSeriesOpt[propName];
+ }
+ });
+ return geoOpt;
+ }
+ module.exports = function (option) {
+ // Save geoCoord
+ var mapSeries = [];
+ zrUtil.each(option.series, function (seriesOpt) {
+ if (seriesOpt.type === 'map') {
+ mapSeries.push(seriesOpt);
+ }
+ zrUtil.extend(geoCoordsMap, seriesOpt.geoCoord);
+ });
+
+ var newCreatedGeoOptMap = {};
+ zrUtil.each(mapSeries, function (seriesOpt) {
+ seriesOpt.map = seriesOpt.map || seriesOpt.mapType;
+ // Put x, y, width, height, x2, y2 in the top level
+ zrUtil.defaults(seriesOpt, seriesOpt.mapLocation);
+ if (seriesOpt.markPoint) {
+ var markPoint = seriesOpt.markPoint;
+ // Convert name or geoCoord in markPoint to lng and lat
+ // For example
+ // { name: 'xxx', value: 10} Or
+ // { geoCoord: [lng, lat], value: 10} to
+ // { name: 'xxx', value: [lng, lat, 10]}
+ markPoint.data = zrUtil.map(markPoint.data, function (dataOpt) {
+ if (!zrUtil.isArray(dataOpt.value)) {
+ var geoCoord;
+ if (dataOpt.geoCoord) {
+ geoCoord = dataOpt.geoCoord;
+ }
+ else if (dataOpt.name) {
+ geoCoord = geoCoordsMap[dataOpt.name];
+ }
+ var newValue = geoCoord ? [geoCoord[0], geoCoord[1]] : [NaN, NaN];
+ if (dataOpt.value != null) {
+ newValue.push(dataOpt.value);
+ }
+ dataOpt.value = newValue;
+ }
+ return dataOpt;
+ });
+ // Convert map series which only has markPoint without data to scatter series
+ // FIXME
+ if (!(seriesOpt.data && seriesOpt.data.length)) {
+ if (!option.geo) {
+ option.geo = [];
+ }
+
+ // Use same geo if multiple map series has same map type
+ var geoOpt = newCreatedGeoOptMap[seriesOpt.map];
+ if (!geoOpt) {
+ geoOpt = newCreatedGeoOptMap[seriesOpt.map] = createGeoFromMap(seriesOpt);
+ option.geo.push(geoOpt);
+ }
+
+ var scatterSeries = seriesOpt.markPoint;
+ scatterSeries.type = option.effect && option.effect.show ? 'effectScatter' : 'scatter';
+ scatterSeries.coordinateSystem = 'geo';
+ scatterSeries.geoIndex = zrUtil.indexOf(option.geo, geoOpt);
+ scatterSeries.name = seriesOpt.name;
+
+ option.series.splice(zrUtil.indexOf(option.series, seriesOpt), 1, scatterSeries);
+ }
+ }
+ });
+ };
+
+
+/***/ },
+/* 177 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var echarts = __webpack_require__(1);
+
+ __webpack_require__(178);
+ __webpack_require__(182);
+ __webpack_require__(185);
+
+ echarts.registerVisualCoding('chart', __webpack_require__(186));
+
+ echarts.registerLayout(__webpack_require__(188));
+
+
+/***/ },
+/* 178 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var SeriesModel = __webpack_require__(27);
+ var Tree = __webpack_require__(179);
+ var zrUtil = __webpack_require__(3);
+ var Model = __webpack_require__(8);
+ var formatUtil = __webpack_require__(6);
+ var helper = __webpack_require__(181);
+ var encodeHTML = formatUtil.encodeHTML;
+ var addCommas = formatUtil.addCommas;
+
+
+ module.exports = SeriesModel.extend({
+
+ type: 'series.treemap',
+
+ dependencies: ['grid', 'polar'],
+
+ /**
+ * @type {module:echarts/data/Tree~Node}
+ */
+ _viewRoot: null,
+
+ defaultOption: {
+ // center: ['50%', '50%'], // not supported in ec3.
+ // size: ['80%', '80%'], // deprecated, compatible with ec2.
+ left: 'center',
+ top: 'middle',
+ right: null,
+ bottom: null,
+ width: '80%',
+ height: '80%',
+ sort: true, // Can be null or false or true
+ // (order by desc default, asc not supported yet (strange effect))
+ clipWindow: 'origin', // Size of clipped window when zooming. 'origin' or 'fullscreen'
+ squareRatio: 0.5 * (1 + Math.sqrt(5)), // golden ratio
+ leafDepth: null, // Nodes on depth from root are regarded as leaves.
+ // Count from zero (zero represents only view root).
+ visualDimension: 0, // Can be 0, 1, 2, 3.
+ zoomToNodeRatio: 0.32 * 0.32, // Be effective when using zoomToNode. Specify the proportion of the
+ // target node area in the view area.
+ roam: true, // true, false, 'scale' or 'zoom', 'move'.
+ nodeClick: 'zoomToNode', // Leaf node click behaviour: 'zoomToNode', 'link', false.
+ // If leafDepth is set and clicking a node which has children but
+ // be on left depth, the behaviour would be changing root. Otherwise
+ // use behavious defined above.
+ animation: true,
+ animationDurationUpdate: 900,
+ animationEasing: 'quinticInOut',
+ breadcrumb: {
+ show: true,
+ height: 22,
+ left: 'center',
+ top: 'bottom',
+ // right
+ // bottom
+ emptyItemWidth: 25, // Width of empty node.
+ itemStyle: {
+ normal: {
+ color: 'rgba(0,0,0,0.7)', //'#5793f3',
+ borderColor: 'rgba(255,255,255,0.7)',
+ borderWidth: 1,
+ shadowColor: 'rgba(150,150,150,1)',
+ shadowBlur: 3,
+ shadowOffsetX: 0,
+ shadowOffsetY: 0,
+ textStyle: {
+ color: '#fff'
+ }
+ },
+ emphasis: {
+ textStyle: {}
+ }
+ }
+ },
+ label: {
+ normal: {
+ show: true,
+ position: ['50%', '50%'], // Can be 5, '5%' or position stirng like 'insideTopLeft', ...
+ textStyle: {
+ align: 'center',
+ baseline: 'middle',
+ color: '#fff',
+ ellipsis: true
+ }
+ }
+ },
+ itemStyle: {
+ normal: {
+ color: null, // Can be 'none' if not necessary.
+ colorAlpha: null, // Can be 'none' if not necessary.
+ colorSaturation: null, // Can be 'none' if not necessary.
+ borderWidth: 0,
+ gapWidth: 0,
+ borderColor: '#fff',
+ borderColorSaturation: null // If specified, borderColor will be ineffective, and the
+ // border color is evaluated by color of current node and
+ // borderColorSaturation.
+ },
+ emphasis: {
+
+ }
+ },
+ color: 'none', // Array. Specify color list of each level.
+ // level[0].color would be global color list.
+ colorAlpha: null, // Array. Specify color alpha range of each level, like [0.2, 0.8]
+ colorSaturation: null, // Array. Specify color saturation of each level, like [0.2, 0.5]
+ colorMappingBy: 'index', // 'value' or 'index' or 'id'.
+ visibleMin: 10, // If area less than this threshold (unit: pixel^2), node will not
+ // be rendered. Only works when sort is 'asc' or 'desc'.
+ childrenVisibleMin: null, // If area of a node less than this threshold (unit: pixel^2),
+ // grandchildren will not show.
+ // Why grandchildren? If not grandchildren but children,
+ // some siblings show children and some not,
+ // the appearance may be mess and not consistent,
+ levels: [] // Each item: {
+ // visibleMin, itemStyle, visualDimension, label
+ // }
+ // data: {
+ // value: [],
+ // children: [],
+ // link: 'http://xxx.xxx.xxx',
+ // target: 'blank' or 'self'
+ // }
+ },
+
+ /**
+ * @override
+ */
+ getInitialData: function (option, ecModel) {
+ var data = option.data || [];
+ var rootName = option.name;
+ rootName == null && (rootName = option.name);
+
+ // Create a virtual root.
+ var root = {name: rootName, children: option.data};
+ var value0 = (data[0] || {}).value;
+
+ completeTreeValue(root, zrUtil.isArray(value0) ? value0.length : -1);
+
+ // FIXME
+ // sereis.mergeOption çš„ getInitData是å¦æ”¾åœ¨mergeåŽï¼Œä»Žè€Œèƒ½ç›´æŽ¥èŽ·å–meregeåŽçš„结果而éžæ‰‹åŠ¨åˆ¤æ–­ã€‚
+ var levels = option.levels || [];
+
+ levels = option.levels = setDefault(levels, ecModel);
+
+ // Make sure always a new tree is created when setOption,
+ // in TreemapView, we check whether oldTree === newTree
+ // to choose mappings approach among old shapes and new shapes.
+ return Tree.createTree(root, this, levels).data;
+ },
+
+ optionUpdated: function () {
+ this.resetViewRoot();
+ },
+
+ /**
+ * @override
+ * @param {number} dataIndex
+ * @param {boolean} [mutipleSeries=false]
+ */
+ formatTooltip: function (dataIndex) {
+ var data = this.getData();
+ var value = this.getRawValue(dataIndex);
+ var formattedValue = zrUtil.isArray(value)
+ ? addCommas(value[0]) : addCommas(value);
+ var name = data.getName(dataIndex);
+
+ return encodeHTML(name) + ': ' + formattedValue;
+ },
+
+ /**
+ * Add tree path to tooltip param
+ *
+ * @override
+ * @param {number} dataIndex
+ * @return {Object}
+ */
+ getDataParams: function (dataIndex) {
+ var params = SeriesModel.prototype.getDataParams.apply(this, arguments);
+
+ var data = this.getData();
+ var node = data.tree.getNodeByDataIndex(dataIndex);
+ var treePathInfo = params.treePathInfo = [];
+
+ while (node) {
+ var nodeDataIndex = node.dataIndex;
+ treePathInfo.push({
+ name: node.name,
+ dataIndex: nodeDataIndex,
+ value: this.getRawValue(nodeDataIndex)
+ });
+ node = node.parentNode;
+ }
+
+ treePathInfo.reverse();
+
+ return params;
+ },
+
+ /**
+ * @public
+ * @param {Object} layoutInfo {
+ * x: containerGroup x
+ * y: containerGroup y
+ * width: containerGroup width
+ * height: containerGroup height
+ * }
+ */
+ setLayoutInfo: function (layoutInfo) {
+ /**
+ * @readOnly
+ * @type {Object}
+ */
+ this.layoutInfo = this.layoutInfo || {};
+ zrUtil.extend(this.layoutInfo, layoutInfo);
+ },
+
+ /**
+ * @param {string} id
+ * @return {number} index
+ */
+ mapIdToIndex: function (id) {
+ // A feature is implemented:
+ // index is monotone increasing with the sequence of
+ // input id at the first time.
+ // This feature can make sure that each data item and its
+ // mapped color have the same index between data list and
+ // color list at the beginning, which is useful for user
+ // to adjust data-color mapping.
+
+ /**
+ * @private
+ * @type {Object}
+ */
+ var idIndexMap = this._idIndexMap;
+
+ if (!idIndexMap) {
+ idIndexMap = this._idIndexMap = {};
+ /**
+ * @private
+ * @type {number}
+ */
+ this._idIndexMapCount = 0;
+ }
+
+ var index = idIndexMap[id];
+ if (index == null) {
+ idIndexMap[id] = index = this._idIndexMapCount++;
+ }
+
+ return index;
+ },
+
+ getViewRoot: function () {
+ return this._viewRoot;
+ },
+
+ /**
+ * @param {module:echarts/data/Tree~Node} [viewRoot]
+ * @return {string} direction 'drilldown' or 'rollup'
+ */
+ resetViewRoot: function (viewRoot) {
+ viewRoot
+ ? (this._viewRoot = viewRoot)
+ : (viewRoot = this._viewRoot);
+
+ var root = this.getData().tree.root;
+
+ if (!viewRoot
+ || (viewRoot !== root && !root.contains(viewRoot))
+ ) {
+ this._viewRoot = root;
+ }
+ }
+ });
+
+ /**
+ * @param {Object} dataNode
+ */
+ function completeTreeValue(dataNode, arrValueLength) {
+ // Postorder travel tree.
+ // If value of none-leaf node is not set,
+ // calculate it by suming up the value of all children.
+ var sum = 0;
+
+ zrUtil.each(dataNode.children, function (child) {
+
+ completeTreeValue(child, arrValueLength);
+
+ var childValue = child.value;
+ zrUtil.isArray(childValue) && (childValue = childValue[0]);
+
+ sum += childValue;
+ });
+
+ var thisValue = dataNode.value;
+
+ if (arrValueLength >= 0) {
+ if (!zrUtil.isArray(thisValue)) {
+ dataNode.value = new Array(arrValueLength);
+ }
+ else {
+ thisValue = thisValue[0];
+ }
+ }
+
+ if (thisValue == null || isNaN(thisValue)) {
+ thisValue = sum;
+ }
+ // Value should not less than 0.
+ if (thisValue < 0) {
+ thisValue = 0;
+ }
+
+ arrValueLength >= 0
+ ? (dataNode.value[0] = thisValue)
+ : (dataNode.value = thisValue);
+ }
+
+ /**
+ * set default to level configuration
+ */
+ function setDefault(levels, ecModel) {
+ var globalColorList = ecModel.get('color');
+
+ if (!globalColorList) {
+ return;
+ }
+
+ levels = levels || [];
+ var hasColorDefine;
+ zrUtil.each(levels, function (levelDefine) {
+ var model = new Model(levelDefine);
+ var modelColor = model.get('color');
+ if (model.get('itemStyle.normal.color')
+ || (modelColor && modelColor !== 'none')
+ ) {
+ hasColorDefine = true;
+ }
+ });
+
+ if (!hasColorDefine) {
+ var level0 = levels[0] || (levels[0] = {});
+ level0.color = globalColorList.slice();
+ }
+
+ return levels;
+ }
+
+
+
+/***/ },
+/* 179 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Tree data structure
+ *
+ * @module echarts/data/Tree
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+ var Model = __webpack_require__(8);
+ var List = __webpack_require__(94);
+ var linkListHelper = __webpack_require__(180);
+ var completeDimensions = __webpack_require__(96);
+
+ /**
+ * @constructor module:echarts/data/Tree~TreeNode
+ * @param {string} name
+ * @param {number} [dataIndex=-1]
+ * @param {module:echarts/data/Tree} hostTree
+ */
+ var TreeNode = function (name, dataIndex, hostTree) {
+ /**
+ * @type {string}
+ */
+ this.name = name || '';
+
+ /**
+ * Depth of node
+ *
+ * @type {number}
+ * @readOnly
+ */
+ this.depth = 0;
+
+ /**
+ * Height of the subtree rooted at this node.
+ * @type {number}
+ * @readOnly
+ */
+ this.height = 0;
+
+ /**
+ * @type {module:echarts/data/Tree~TreeNode}
+ * @readOnly
+ */
+ this.parentNode = null;
+
+ /**
+ * Reference to list item.
+ * Do not persistent dataIndex outside,
+ * besause it may be changed by list.
+ * If dataIndex -1,
+ * this node is logical deleted (filtered) in list.
+ *
+ * @type {Object}
+ * @readOnly
+ */
+ this.dataIndex = dataIndex == null ? -1 : dataIndex;
+
+ /**
+ * @type {Array.<module:echarts/data/Tree~TreeNode>}
+ * @readOnly
+ */
+ this.children = [];
+
+ /**
+ * @type {Array.<module:echarts/data/Tree~TreeNode>}
+ * @pubilc
+ */
+ this.viewChildren = [];
+
+ /**
+ * @type {moduel:echarts/data/Tree}
+ * @readOnly
+ */
+ this.hostTree = hostTree;
+ };
+
+ TreeNode.prototype = {
+
+ constructor: TreeNode,
+
+ /**
+ * The node is removed.
+ * @return {boolean} is removed.
+ */
+ isRemoved: function () {
+ return this.dataIndex < 0;
+ },
+
+ /**
+ * Travel this subtree (include this node).
+ * Usage:
+ * node.eachNode(function () { ... }); // preorder
+ * node.eachNode('preorder', function () { ... }); // preorder
+ * node.eachNode('postorder', function () { ... }); // postorder
+ * node.eachNode(
+ * {order: 'postorder', attr: 'viewChildren'},
+ * function () { ... }
+ * ); // postorder
+ *
+ * @param {(Object|string)} options If string, means order.
+ * @param {string=} options.order 'preorder' or 'postorder'
+ * @param {string=} options.attr 'children' or 'viewChildren'
+ * @param {Function} cb If in preorder and return false,
+ * its subtree will not be visited.
+ * @param {Object} [context]
+ */
+ eachNode: function (options, cb, context) {
+ if (typeof options === 'function') {
+ context = cb;
+ cb = options;
+ options = null;
+ }
+
+ options = options || {};
+ if (zrUtil.isString(options)) {
+ options = {order: options};
+ }
+
+ var order = options.order || 'preorder';
+ var children = this[options.attr || 'children'];
+
+ var suppressVisitSub;
+ order === 'preorder' && (suppressVisitSub = cb.call(context, this));
+
+ for (var i = 0; !suppressVisitSub && i < children.length; i++) {
+ children[i].eachNode(options, cb, context);
+ }
+
+ order === 'postorder' && cb.call(context, this);
+ },
+
+ /**
+ * Update depth and height of this subtree.
+ *
+ * @param {number} depth
+ */
+ updateDepthAndHeight: function (depth) {
+ var height = 0;
+ this.depth = depth;
+ for (var i = 0; i < this.children.length; i++) {
+ var child = this.children[i];
+ child.updateDepthAndHeight(depth + 1);
+ if (child.height > height) {
+ height = child.height;
+ }
+ }
+ this.height = height + 1;
+ },
+
+ /**
+ * @param {string} id
+ * @return {module:echarts/data/Tree~TreeNode}
+ */
+ getNodeById: function (id) {
+ if (this.getId() === id) {
+ return this;
+ }
+ for (var i = 0, children = this.children, len = children.length; i < len; i++) {
+ var res = children[i].getNodeById(id);
+ if (res) {
+ return res;
+ }
+ }
+ },
+
+ /**
+ * @param {module:echarts/data/Tree~TreeNode} node
+ * @return {boolean}
+ */
+ contains: function (node) {
+ if (node === this) {
+ return true;
+ }
+ for (var i = 0, children = this.children, len = children.length; i < len; i++) {
+ var res = children[i].contains(node);
+ if (res) {
+ return res;
+ }
+ }
+ },
+
+ /**
+ * @param {boolean} includeSelf Default false.
+ * @return {Array.<module:echarts/data/Tree~TreeNode>} order: [root, child, grandchild, ...]
+ */
+ getAncestors: function (includeSelf) {
+ var ancestors = [];
+ var node = includeSelf ? this : this.parentNode;
+ while (node) {
+ ancestors.push(node);
+ node = node.parentNode;
+ }
+ ancestors.reverse();
+ return ancestors;
+ },
+
+ /**
+ * @param {string|Array=} [dimension='value'] Default 'value'. can be 0, 1, 2, 3
+ * @return {number} Value.
+ */
+ getValue: function (dimension) {
+ var data = this.hostTree.data;
+ return data.get(data.getDimension(dimension || 'value'), this.dataIndex);
+ },
+
+ /**
+ * @param {Object} layout
+ * @param {boolean=} [merge=false]
+ */
+ setLayout: function (layout, merge) {
+ this.dataIndex >= 0
+ && this.hostTree.data.setItemLayout(this.dataIndex, layout, merge);
+ },
+
+ /**
+ * @return {Object} layout
+ */
+ getLayout: function () {
+ return this.hostTree.data.getItemLayout(this.dataIndex);
+ },
+
+ /**
+ * @param {string} path
+ * @return {module:echarts/model/Model}
+ */
+ getModel: function (path) {
+ if (this.dataIndex < 0) {
+ return;
+ }
+ var hostTree = this.hostTree;
+ var itemModel = hostTree.data.getItemModel(this.dataIndex);
+ var levelModel = this.getLevelModel();
+
+ return itemModel.getModel(path, (levelModel || hostTree.hostModel).getModel(path));
+ },
+
+ /**
+ * @return {module:echarts/model/Model}
+ */
+ getLevelModel: function () {
+ return (this.hostTree.levelModels || [])[this.depth];
+ },
+
+ /**
+ * @example
+ * setItemVisual('color', color);
+ * setItemVisual({
+ * 'color': color
+ * });
+ */
+ setVisual: function (key, value) {
+ this.dataIndex >= 0
+ && this.hostTree.data.setItemVisual(this.dataIndex, key, value);
+ },
+
+ /**
+ * @public
+ */
+ getVisual: function (key, ignoreParent) {
+ return this.hostTree.data.getItemVisual(this.dataIndex, key, ignoreParent);
+ },
+
+ /**
+ * @public
+ * @return {number}
+ */
+ getRawIndex: function () {
+ return this.hostTree.data.getRawIndex(this.dataIndex);
+ },
+
+ /**
+ * @public
+ * @return {string}
+ */
+ getId: function () {
+ return this.hostTree.data.getId(this.dataIndex);
+ }
+ };
+
+ /**
+ * @constructor
+ * @alias module:echarts/data/Tree
+ * @param {module:echarts/model/Model} hostModel
+ * @param {Array.<Object>} levelOptions
+ */
+ function Tree(hostModel, levelOptions) {
+ /**
+ * @type {module:echarts/data/Tree~TreeNode}
+ * @readOnly
+ */
+ this.root;
+
+ /**
+ * @type {module:echarts/data/List}
+ * @readOnly
+ */
+ this.data;
+
+ /**
+ * Index of each item is the same as the raw index of coresponding list item.
+ * @private
+ * @type {Array.<module:echarts/data/Tree~TreeNode}
+ */
+ this._nodes = [];
+
+ /**
+ * @private
+ * @readOnly
+ * @type {module:echarts/model/Model}
+ */
+ this.hostModel = hostModel;
+
+ /**
+ * @private
+ * @readOnly
+ * @type {Array.<module:echarts/model/Model}
+ */
+ this.levelModels = zrUtil.map(levelOptions || [], function (levelDefine) {
+ return new Model(levelDefine, hostModel, hostModel.ecModel);
+ });
+ }
+
+ Tree.prototype = {
+
+ constructor: Tree,
+
+ type: 'tree',
+
+ /**
+ * Travel this subtree (include this node).
+ * Usage:
+ * node.eachNode(function () { ... }); // preorder
+ * node.eachNode('preorder', function () { ... }); // preorder
+ * node.eachNode('postorder', function () { ... }); // postorder
+ * node.eachNode(
+ * {order: 'postorder', attr: 'viewChildren'},
+ * function () { ... }
+ * ); // postorder
+ *
+ * @param {(Object|string)} options If string, means order.
+ * @param {string=} options.order 'preorder' or 'postorder'
+ * @param {string=} options.attr 'children' or 'viewChildren'
+ * @param {Function} cb
+ * @param {Object} [context]
+ */
+ eachNode: function(options, cb, context) {
+ this.root.eachNode(options, cb, context);
+ },
+
+ /**
+ * @param {number} dataIndex
+ * @return {module:echarts/data/Tree~TreeNode}
+ */
+ getNodeByDataIndex: function (dataIndex) {
+ var rawIndex = this.data.getRawIndex(dataIndex);
+ return this._nodes[rawIndex];
+ },
+
+ /**
+ * @param {string} name
+ * @return {module:echarts/data/Tree~TreeNode}
+ */
+ getNodeByName: function (name) {
+ return this.root.getNodeByName(name);
+ },
+
+ /**
+ * Update item available by list,
+ * when list has been performed options like 'filterSelf' or 'map'.
+ */
+ update: function () {
+ var data = this.data;
+ var nodes = this._nodes;
+
+ for (var i = 0, len = nodes.length; i < len; i++) {
+ nodes[i].dataIndex = -1;
+ }
+
+ for (var i = 0, len = data.count(); i < len; i++) {
+ nodes[data.getRawIndex(i)].dataIndex = i;
+ }
+ }
+ };
+
+ /**
+ * data node format:
+ * {
+ * name: ...
+ * value: ...
+ * children: [
+ * {
+ * name: ...
+ * value: ...
+ * children: ...
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * @static
+ * @param {Objec} dataRoot Root node.
+ * @param {module:echarts/model/Model} hostModel
+ * @param {Array.<Object>} levelOptions
+ * @return module:echarts/data/Tree
+ */
+ Tree.createTree = function (dataRoot, hostModel, levelOptions) {
+
+ var tree = new Tree(hostModel, levelOptions);
+ var listData = [];
+
+ buildHierarchy(dataRoot);
+
+ function buildHierarchy(dataNode, parentNode) {
+ listData.push(dataNode);
+
+ var node = new TreeNode(dataNode.name, listData.length - 1, tree);
+ parentNode
+ ? addChild(node, parentNode)
+ : (tree.root = node);
+
+ var children = dataNode.children;
+ if (children) {
+ for (var i = 0; i < children.length; i++) {
+ buildHierarchy(children[i], node);
+ }
+ }
+ }
+
+ tree.root.updateDepthAndHeight(0);
+
+ var dimensions = completeDimensions([{name: 'value'}], listData);
+ var list = new List(dimensions, hostModel);
+ list.initData(listData);
+
+ linkListHelper.linkToTree(list, tree);
+
+ return tree;
+ };
+
+ /**
+ * It is needed to consider the mess of 'list', 'hostModel' when creating a TreeNote,
+ * so this function is not ready and not necessary to be public.
+ *
+ * @param {(module:echarts/data/Tree~TreeNode|Object)} child
+ */
+ function addChild(child, node) {
+ var children = node.children;
+ if (child.parentNode === node) {
+ return;
+ }
+
+ children.push(child);
+ child.parentNode = node;
+
+ node.hostTree._nodes.push(child);
+ }
+
+ module.exports = Tree;
+
+
+/***/ },
+/* 180 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Link list to graph or tree
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+ var arraySlice = Array.prototype.slice;
+
+ // Caution:
+ // In most case, only one of the list and its shallow clones (see list.cloneShallow)
+ // can be active in echarts process. Considering heap memory consumption,
+ // we do not clone tree or graph, but share them among list and its shallow clones.
+ // But in some rare case, we have to keep old list (like do animation in chart). So
+ // please take care that both the old list and the new list share the same tree/graph.
+
+ function linkList(list, target, targetType) {
+ zrUtil.each(listProxyMethods, function (method, methodName) {
+ var originMethod = list[methodName];
+ list[methodName] = zrUtil.curry(method, originMethod, target, targetType);
+ });
+
+ list[targetType] = target;
+ target.data = list;
+
+ return list;
+ }
+
+ var listProxyMethods = {
+ cloneShallow: function (originMethod, target, targetType) {
+ var newList = originMethod.apply(this, arraySlice.call(arguments, 3));
+ return linkList(newList, target, targetType);
+ },
+ map: function (originMethod, target, targetType) {
+ var newList = originMethod.apply(this, arraySlice.call(arguments, 3));
+ return linkList(newList, target, targetType);
+ },
+ filterSelf: function (originMethod, target, targetType) {
+ var result = originMethod.apply(this, arraySlice.call(arguments, 3));
+ target.update();
+ return result;
+ }
+ };
+
+ module.exports = {
+ linkToGraph: function (list, graph) {
+ linkList(list, graph, 'graph');
+ },
+
+ linkToTree: function (list, tree) {
+ linkList(list, tree, 'tree');
+ }
+ };
+
+
+/***/ },
+/* 181 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+
+ var helper = {
+
+ retrieveTargetInfo: function (payload, seriesModel) {
+ if (payload
+ && (
+ payload.type === 'treemapZoomToNode'
+ || payload.type === 'treemapRootToNode'
+ )
+ ) {
+ var root = seriesModel.getData().tree.root;
+ var targetNode = payload.targetNode;
+ if (targetNode && root.contains(targetNode)) {
+ return {node: targetNode};
+ }
+
+ var targetNodeId = payload.targetNodeId;
+ if (targetNodeId != null && (targetNode = root.getNodeById(targetNodeId))) {
+ return {node: targetNode};
+ }
+ }
+ },
+
+ getPathToRoot: function (node) {
+ var path = [];
+ while (node) {
+ path.push(node);
+ node = node.parentNode;
+ }
+ return path.reverse();
+ },
+
+ aboveViewRoot: function (viewRoot, node) {
+ var viewPath = helper.getPathToRoot(viewRoot);
+ return helper.aboveViewRootByViewPath(viewPath, node);
+ },
+
+ // viewPath should obtained from getPathToRoot(viewRoot)
+ aboveViewRootByViewPath: function (viewPath, node) {
+ var index = zrUtil.indexOf(viewPath, node);
+ // The last one is viewRoot
+ return index >= 0 && index !== viewPath.length - 1;
+ }
+
+ };
+
+ module.exports = helper;
+
+
+/***/ },
+/* 182 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var graphic = __webpack_require__(42);
+ var DataDiffer = __webpack_require__(95);
+ var helper = __webpack_require__(181);
+ var Breadcrumb = __webpack_require__(183);
+ var RoamController = __webpack_require__(159);
+ var BoundingRect = __webpack_require__(15);
+ var matrix = __webpack_require__(17);
+ var animationUtil = __webpack_require__(184);
+ var bind = zrUtil.bind;
+ var Group = graphic.Group;
+ var Rect = graphic.Rect;
+ var each = zrUtil.each;
+
+ var DRAG_THRESHOLD = 3;
+
+ module.exports = __webpack_require__(1).extendChartView({
+
+ type: 'treemap',
+
+ /**
+ * @override
+ */
+ init: function (o, api) {
+
+ /**
+ * @private
+ * @type {module:zrender/container/Group}
+ */
+ this._containerGroup;
+
+ /**
+ * @private
+ * @type {Object.<string, Array.<module:zrender/container/Group>>}
+ */
+ this._storage = createStorage();
+
+ /**
+ * @private
+ * @type {module:echarts/data/Tree}
+ */
+ this._oldTree;
+
+ /**
+ * @private
+ * @type {module:echarts/chart/treemap/Breadcrumb}
+ */
+ this._breadcrumb;
+
+ /**
+ * @private
+ * @type {module:echarts/component/helper/RoamController}
+ */
+ this._controller;
+
+ /**
+ * 'ready', 'animating'
+ * @private
+ */
+ this._state = 'ready';
+
+ /**
+ * @private
+ * @type {boolean}
+ */
+ this._mayClick;
+ },
+
+ /**
+ * @override
+ */
+ render: function (seriesModel, ecModel, api, payload) {
+
+ var models = ecModel.findComponents({
+ mainType: 'series', subType: 'treemap', query: payload
+ });
+ if (zrUtil.indexOf(models, seriesModel) < 0) {
+ return;
+ }
+
+ this.seriesModel = seriesModel;
+ this.api = api;
+ this.ecModel = ecModel;
+
+ var targetInfo = helper.retrieveTargetInfo(payload, seriesModel);
+ var payloadType = payload && payload.type;
+ var layoutInfo = seriesModel.layoutInfo;
+ var isInit = !this._oldTree;
+ var thisStorage = this._storage;
+
+ // Mark new root when action is treemapRootToNode.
+ var reRoot = (payloadType === 'treemapRootToNode' && targetInfo && thisStorage)
+ ? {
+ rootNodeGroup: thisStorage.nodeGroup[targetInfo.node.getRawIndex()],
+ direction: payload.direction
+ }
+ : null;
+
+ var containerGroup = this._giveContainerGroup(layoutInfo);
+
+ var renderResult = this._doRender(containerGroup, seriesModel, reRoot);
+
+ (
+ !isInit && (
+ !payloadType
+ || payloadType === 'treemapZoomToNode'
+ || payloadType === 'treemapRootToNode'
+ )
+ )
+ ? this._doAnimation(containerGroup, renderResult, seriesModel, reRoot)
+ : renderResult.renderFinally();
+
+ this._resetController(api);
+
+ this._renderBreadcrumb(seriesModel, api, targetInfo);
+ },
+
+ /**
+ * @private
+ */
+ _giveContainerGroup: function (layoutInfo) {
+ var containerGroup = this._containerGroup;
+ if (!containerGroup) {
+ // FIXME
+ // 加一层containerGroup是为了clip,但是现在clip功能并没有实现。
+ containerGroup = this._containerGroup = new Group();
+ this._initEvents(containerGroup);
+ this.group.add(containerGroup);
+ }
+ containerGroup.position = [layoutInfo.x, layoutInfo.y];
+
+ return containerGroup;
+ },
+
+ /**
+ * @private
+ */
+ _doRender: function (containerGroup, seriesModel, reRoot) {
+ var thisTree = seriesModel.getData().tree;
+ var oldTree = this._oldTree;
+
+ // Clear last shape records.
+ var lastsForAnimation = createStorage();
+ var thisStorage = createStorage();
+ var oldStorage = this._storage;
+ var willInvisibleEls = [];
+ var willVisibleEls = [];
+ var willDeleteEls = [];
+ var renderNode = bind(
+ this._renderNode, this,
+ thisStorage, oldStorage, reRoot,
+ lastsForAnimation, willInvisibleEls, willVisibleEls
+ );
+ var viewRoot = seriesModel.getViewRoot();
+ var viewPath = helper.getPathToRoot(viewRoot);
+
+ // Notice: when thisTree and oldTree are the same tree (see list.cloneShadow),
+ // the oldTree is actually losted, so we can not find all of the old graphic
+ // elements from tree. So we use this stragegy: make element storage, move
+ // from old storage to new storage, clear old storage.
+
+ dualTravel(
+ thisTree.root ? [thisTree.root] : [],
+ (oldTree && oldTree.root) ? [oldTree.root] : [],
+ containerGroup,
+ thisTree === oldTree || !oldTree,
+ 0
+ );
+
+ // Process all removing.
+ var willDeleteEls = clearStorage(oldStorage);
+
+ this._oldTree = thisTree;
+ this._storage = thisStorage;
+
+ return {
+ lastsForAnimation: lastsForAnimation,
+ willDeleteEls: willDeleteEls,
+ renderFinally: renderFinally
+ };
+
+ function dualTravel(thisViewChildren, oldViewChildren, parentGroup, sameTree, viewPathIndex) {
+ // When 'render' is triggered by action,
+ // 'this' and 'old' may be the same tree,
+ // we use rawIndex in that case.
+ if (sameTree) {
+ oldViewChildren = thisViewChildren;
+ each(thisViewChildren, function (child, index) {
+ !child.isRemoved() && processNode(index, index);
+ });
+ }
+ // Diff hierarchically (diff only in each subtree, but not whole).
+ // because, consistency of view is important.
+ else {
+ (new DataDiffer(oldViewChildren, thisViewChildren, getKey, getKey))
+ .add(processNode)
+ .update(processNode)
+ .remove(zrUtil.curry(processNode, null))
+ .execute();
+ }
+
+ function getKey(node) {
+ // Identify by name or raw index.
+ return node.getId();
+ }
+
+ function processNode(newIndex, oldIndex) {
+ var thisNode = newIndex != null ? thisViewChildren[newIndex] : null;
+ var oldNode = oldIndex != null ? oldViewChildren[oldIndex] : null;
+
+ // Whether under viewRoot.
+ if (!thisNode
+ || isNaN(viewPathIndex)
+ || (viewPathIndex < viewPath.length && viewPath[viewPathIndex] !== thisNode)
+ ) {
+ // Deleting nodes will be performed finally. This method just find
+ // element from old storage, or create new element, set them to new
+ // storage, and set styles.
+ return;
+ }
+
+ var group = renderNode(thisNode, oldNode, parentGroup);
+
+ group && dualTravel(
+ thisNode && thisNode.viewChildren || [],
+ oldNode && oldNode.viewChildren || [],
+ group,
+ sameTree,
+ viewPathIndex + 1
+ );
+ }
+ }
+
+ function clearStorage(storage) {
+ var willDeleteEls = createStorage();
+ storage && each(storage, function (store, storageName) {
+ var delEls = willDeleteEls[storageName];
+ each(store, function (el) {
+ el && (delEls.push(el), el.__tmWillDelete = storageName);
+ });
+ });
+ return willDeleteEls;
+ }
+
+ function renderFinally() {
+ each(willDeleteEls, function (els) {
+ each(els, function (el) {
+ el.parent && el.parent.remove(el);
+ });
+ });
+ // Theoritically there is no intersection between willInvisibleEls
+ // and willVisibleEls have, but we set visible after for robustness.
+ each(willInvisibleEls, function (el) {
+ el.invisible = true;
+ // Setting invisible is for optimizing, so no need to set dirty,
+ // just mark as invisible.
+ el.dirty();
+ });
+ each(willVisibleEls, function (el) {
+ el.invisible = false;
+ el.__tmWillVisible = false;
+ el.dirty();
+ });
+ }
+ },
+
+ /**
+ * @private
+ */
+ _renderNode: function (
+ thisStorage, oldStorage, reRoot,
+ lastsForAnimation, willInvisibleEls, willVisibleEls,
+ thisNode, oldNode, parentGroup
+ ) {
+ var thisRawIndex = thisNode && thisNode.getRawIndex();
+ var oldRawIndex = oldNode && oldNode.getRawIndex();
+
+ var layout = thisNode.getLayout();
+ var thisWidth = layout.width;
+ var thisHeight = layout.height;
+ var invisible = layout.invisible;
+
+ // Node group
+ var group = giveGraphic('nodeGroup', Group);
+ if (!group) {
+ return;
+ }
+ parentGroup.add(group);
+ group.position = [layout.x, layout.y];
+ group.__tmNodeWidth = thisWidth;
+ group.__tmNodeHeight = thisHeight;
+
+ // Background
+ var bg = giveGraphic('background', Rect, 0);
+ if (bg) {
+ bg.setShape({x: 0, y: 0, width: thisWidth, height: thisHeight});
+ updateStyle(bg, {fill: thisNode.getVisual('borderColor', true)});
+ group.add(bg);
+ }
+
+ var thisViewChildren = thisNode.viewChildren;
+
+ // No children, render content.
+ if (!thisViewChildren || !thisViewChildren.length) {
+ var borderWidth = layout.borderWidth;
+ var content = giveGraphic('content', Rect, 3);
+ if (content) {
+ var contentWidth = Math.max(thisWidth - 2 * borderWidth, 0);
+ var contentHeight = Math.max(thisHeight - 2 * borderWidth, 0);
+ var labelModel = thisNode.getModel('label.normal');
+ var textStyleModel = thisNode.getModel('label.normal.textStyle');
+ var hoverStyle = thisNode.getModel('itemStyle.emphasis').getItemStyle();
+ var text = thisNode.getModel().get('name');
+ var textRect = textStyleModel.getTextRect(text);
+ var showLabel = labelModel.get('show');
+
+ if (!showLabel || textRect.height > contentHeight) {
+ text = '';
+ }
+ else if (textRect.width > contentWidth) {
+ text = textStyleModel.get('ellipsis')
+ ? textStyleModel.ellipsis(text, contentWidth) : '';
+ }
+
+ graphic.setHoverStyle(content, hoverStyle);
+
+ // For tooltip.
+ content.dataIndex = thisNode.dataIndex;
+ content.seriesIndex = this.seriesModel.seriesIndex;
+
+ content.culling = true;
+ content.setShape({
+ x: borderWidth,
+ y: borderWidth,
+ width: contentWidth,
+ height: contentHeight
+ });
+
+ updateStyle(content, {
+ fill: thisNode.getVisual('color', true),
+ text: text,
+ textPosition: labelModel.get('position'),
+ textFill: textStyleModel.getTextColor(),
+ textAlign: textStyleModel.get('align'),
+ textVerticalAlign: textStyleModel.get('baseline'),
+ textFont: textStyleModel.getFont()
+ });
+ group.add(content);
+ }
+ }
+
+ return group;
+
+ function giveGraphic(storageName, Ctor, z) {
+ var element = oldRawIndex != null && oldStorage[storageName][oldRawIndex];
+ var lasts = lastsForAnimation[storageName];
+
+ if (element) {
+ // Remove from oldStorage
+ oldStorage[storageName][oldRawIndex] = null;
+ prepareAnimationWhenHasOld(lasts, element, storageName);
+ }
+ // If invisible and no old element, do not create new element (for optimizing).
+ else if (!invisible) {
+ element = new Ctor({z: z});
+ prepareAnimationWhenNoOld(lasts, element, storageName);
+ }
+
+ // Set to thisStorage
+ return (thisStorage[storageName][thisRawIndex] = element);
+ }
+
+ function prepareAnimationWhenHasOld(lasts, element, storageName) {
+ var lastCfg = lasts[thisRawIndex] = {};
+ lastCfg.old = storageName === 'nodeGroup'
+ ? element.position.slice()
+ : zrUtil.extend({}, element.shape);
+ }
+
+ // If a element is new, we need to find the animation start point carefully,
+ // otherwise it will looks strange when 'zoomToNode'.
+ function prepareAnimationWhenNoOld(lasts, element, storageName) {
+ // New background do not animate but delay show.
+ if (storageName === 'background') {
+ element.invisible = true;
+ element.__tmWillVisible = true;
+ willVisibleEls.push(element);
+ }
+ else {
+ var lastCfg = lasts[thisRawIndex] = {};
+ var parentNode = thisNode.parentNode;
+
+ if (parentNode && (!reRoot || reRoot.direction === 'drilldown')) {
+ var parentOldX = 0;
+ var parentOldY = 0;
+ // For convenience, get old bounding rect from background.
+ var parentOldBg = lastsForAnimation.background[parentNode.getRawIndex()];
+
+ if (parentOldBg && parentOldBg.old) {
+ parentOldX = parentOldBg.old.width / 2; // Devided by 2 for reRoot effect.
+ parentOldY = parentOldBg.old.height / 2;
+ }
+ // When no parent old shape found, its parent is new too,
+ // so we can just use {x:0, y:0}.
+ lastCfg.old = storageName === 'nodeGroup'
+ ? [parentOldX, parentOldY]
+ : {x: parentOldX, y: parentOldY, width: 0, height: 0};
+ }
+
+ // Fade in, user can be aware that these nodes are new.
+ lastCfg.fadein = storageName !== 'nodeGroup';
+ }
+ }
+
+ function updateStyle(element, style) {
+ if (!invisible) {
+ // If invisible, do not set visual, otherwise the element will
+ // change immediately before animation. We think it is OK to
+ // remain its origin color when moving out of the view window.
+ element.setStyle(style);
+ if (!element.__tmWillVisible) {
+ element.invisible = false;
+ }
+ }
+ else {
+ // Delay invisible setting utill animation finished,
+ // avoid element vanish suddenly before animation.
+ !element.invisible && willInvisibleEls.push(element);
+ }
+ }
+ },
+
+ /**
+ * @private
+ */
+ _doAnimation: function (containerGroup, renderResult, seriesModel, reRoot) {
+ if (!seriesModel.get('animation')) {
+ return;
+ }
+
+ var duration = seriesModel.get('animationDurationUpdate');
+ var easing = seriesModel.get('animationEasing');
+ var animationWrap = animationUtil.createWrap();
+
+ // Make delete animations.
+ each(renderResult.willDeleteEls, function (store, storageName) {
+ each(store, function (el, rawIndex) {
+ var storageName;
+
+ if (el.invisible || !(storageName = el.__tmWillDelete)) {
+ return;
+ }
+
+ var parent = el.parent; // Always has parent, and parent is nodeGroup.
+ var target;
+
+ if (reRoot && reRoot.direction === 'drilldown') {
+ if (parent === reRoot.rootNodeGroup) {
+ // Only 'content' will enter this branch, but not nodeGroup.
+ target = {
+ shape: {
+ x: 0, y: 0,
+ width: parent.__tmNodeWidth, height: parent.__tmNodeHeight
+ }
+ };
+ el.z = 2;
+ }
+ else {
+ target = {style: {opacity: 0}};
+ el.z = 1;
+ }
+ }
+ else {
+ var targetX = 0;
+ var targetY = 0;
+
+ if (!parent.__tmWillDelete) {
+ // Let node animate to right-bottom corner, cooperating with fadeout,
+ // which is appropriate for user understanding.
+ // Divided by 2 for reRoot rollup effect.
+ targetX = parent.__tmNodeWidth / 2;
+ targetY = parent.__tmNodeHeight / 2;
+ }
+ target = storageName === 'nodeGroup'
+ ? {position: [targetX, targetY], style: {opacity: 0}}
+ : {
+ shape: {x: targetX, y: targetY, width: 0, height: 0},
+ style: {opacity: 0}
+ };
+ }
+
+ target && animationWrap.add(el, target, duration, easing);
+ });
+ });
+
+ // Make other animations
+ each(this._storage, function (store, storageName) {
+ each(store, function (el, rawIndex) {
+ var last = renderResult.lastsForAnimation[storageName][rawIndex];
+ var target = {};
+
+ if (!last) {
+ return;
+ }
+
+ if (storageName === 'nodeGroup') {
+ if (last.old) {
+ target.position = el.position.slice();
+ el.position = last.old;
+ }
+ }
+ else {
+ if (last.old) {
+ target.shape = zrUtil.extend({}, el.shape);
+ el.setShape(last.old);
+ }
+
+ if (last.fadein) {
+ el.setStyle('opacity', 0);
+ target.style = {opacity: 1};
+ }
+ // When animation is stopped for succedent animation starting,
+ // el.style.opacity might not be 1
+ else if (el.style.opacity !== 1) {
+ target.style = {opacity: 1};
+ }
+ }
+ animationWrap.add(el, target, duration, easing);
+ });
+ }, this);
+
+ this._state = 'animating';
+
+ animationWrap
+ .done(bind(function () {
+ this._state = 'ready';
+ renderResult.renderFinally();
+ }, this))
+ .start();
+ },
+
+ /**
+ * @private
+ */
+ _resetController: function (api) {
+ var controller = this._controller;
+
+ // Init controller.
+ if (!controller) {
+ controller = this._controller = new RoamController(api.getZr());
+ controller.enable(this.seriesModel.get('roam'));
+ controller.on('pan', bind(this._onPan, this));
+ controller.on('zoom', bind(this._onZoom, this));
+ }
+
+ controller.rect = new BoundingRect(0, 0, api.getWidth(), api.getHeight());
+ },
+
+ /**
+ * @private
+ */
+ _clearController: function () {
+ var controller = this._controller;
+ if (controller) {
+ controller.off('pan').off('zoom');
+ controller = null;
+ }
+ },
+
+ /**
+ * @private
+ */
+ _onPan: function (dx, dy) {
+ this._mayClick = false;
+
+ if (this._state !== 'animating'
+ && (Math.abs(dx) > DRAG_THRESHOLD || Math.abs(dy) > DRAG_THRESHOLD)
+ ) {
+ // These param must not be cached.
+ var viewRoot = this.seriesModel.getViewRoot();
+
+ if (!viewRoot) {
+ return;
+ }
+
+ var rootLayout = viewRoot.getLayout();
+
+ if (!rootLayout) {
+ return;
+ }
+
+ this.api.dispatchAction({
+ type: 'treemapMove',
+ from: this.uid,
+ seriesId: this.seriesModel.id,
+ rootRect: {
+ x: rootLayout.x + dx, y: rootLayout.y + dy,
+ width: rootLayout.width, height: rootLayout.height
+ }
+ });
+ }
+ },
+
+ /**
+ * @private
+ */
+ _onZoom: function (scale, mouseX, mouseY) {
+ this._mayClick = false;
+
+ if (this._state !== 'animating') {
+ // These param must not be cached.
+ var viewRoot = this.seriesModel.getViewRoot();
+
+ if (!viewRoot) {
+ return;
+ }
+
+ var rootLayout = viewRoot.getLayout();
+
+ if (!rootLayout) {
+ return;
+ }
+
+ var rect = new BoundingRect(
+ rootLayout.x, rootLayout.y, rootLayout.width, rootLayout.height
+ );
+ var layoutInfo = this.seriesModel.layoutInfo;
+
+ // Transform mouse coord from global to containerGroup.
+ mouseX -= layoutInfo.x;
+ mouseY -= layoutInfo.y;
+
+ // Scale root bounding rect.
+ var m = matrix.create();
+ matrix.translate(m, m, [-mouseX, -mouseY]);
+ matrix.scale(m, m, [scale, scale]);
+ matrix.translate(m, m, [mouseX, mouseY]);
+
+ rect.applyTransform(m);
+
+ this.api.dispatchAction({
+ type: 'treemapRender',
+ from: this.uid,
+ seriesId: this.seriesModel.id,
+ rootRect: {
+ x: rect.x, y: rect.y,
+ width: rect.width, height: rect.height
+ }
+ });
+ }
+ },
+
+ /**
+ * @private
+ */
+ _initEvents: function (containerGroup) {
+ // FIXME
+ // ä¸ç”¨click以åŠsilent的原因是,animate时视图设置silent trueæ¥é¿å…click生效,
+ // 但是animate中,按下鼠标,animate结æŸåŽï¼ˆsilent设回为false)æ¾å¼€é¼ æ ‡ï¼Œ
+ // 还是会触å‘click,期望是ä¸è§¦å‘。
+
+ // Mousedown occurs when drag start, and mouseup occurs when drag end,
+ // click event should not be triggered in that case.
+
+ containerGroup.on('mousedown', function (e) {
+ this._state === 'ready' && (this._mayClick = true);
+ }, this);
+ containerGroup.on('mouseup', function (e) {
+ if (this._mayClick) {
+ this._mayClick = false;
+ this._state === 'ready' && onClick.call(this, e);
+ }
+ }, this);
+
+ function onClick(e) {
+ var nodeClick = this.seriesModel.get('nodeClick', true);
+
+ if (!nodeClick) {
+ return;
+ }
+
+ var targetInfo = this.findTarget(e.offsetX, e.offsetY);
+
+ if (!targetInfo) {
+ return;
+ }
+
+ var node = targetInfo.node;
+ if (node.getLayout().isLeafRoot) {
+ this._rootToNode(targetInfo);
+ }
+ else {
+ if (nodeClick === 'zoomToNode') {
+ this._zoomToNode(targetInfo);
+ }
+ else if (nodeClick === 'link') {
+ var itemModel = node.hostTree.data.getItemModel(node.dataIndex);
+ var link = itemModel.get('link', true);
+ var linkTarget = itemModel.get('target', true) || 'blank';
+ link && window.open(link, linkTarget);
+ }
+ }
+ }
+ },
+
+ /**
+ * @private
+ */
+ _renderBreadcrumb: function (seriesModel, api, targetInfo) {
+ if (!targetInfo) {
+ // Find breadcrumb tail on center of containerGroup.
+ targetInfo = this.findTarget(api.getWidth() / 2, api.getHeight() / 2);
+
+ if (!targetInfo) {
+ targetInfo = {node: seriesModel.getData().tree.root};
+ }
+ }
+
+ (this._breadcrumb || (this._breadcrumb = new Breadcrumb(this.group, bind(onSelect, this))))
+ .render(seriesModel, api, targetInfo.node);
+
+ function onSelect(node) {
+ if (this._state !== 'animating') {
+ helper.aboveViewRoot(seriesModel.getViewRoot(), node)
+ ? this._rootToNode({node: node})
+ : this._zoomToNode({node: node});
+ }
+ }
+ },
+
+ /**
+ * @override
+ */
+ remove: function () {
+ this._clearController();
+ this._containerGroup && this._containerGroup.removeAll();
+ this._storage = createStorage();
+ this._state = 'ready';
+ this._breadcrumb && this._breadcrumb.remove();
+ },
+
+ dispose: function () {
+ this._clearController();
+ },
+
+ /**
+ * @private
+ */
+ _zoomToNode: function (targetInfo) {
+ this.api.dispatchAction({
+ type: 'treemapZoomToNode',
+ from: this.uid,
+ seriesId: this.seriesModel.id,
+ targetNode: targetInfo.node
+ });
+ },
+
+ /**
+ * @private
+ */
+ _rootToNode: function (targetInfo) {
+ this.api.dispatchAction({
+ type: 'treemapRootToNode',
+ from: this.uid,
+ seriesId: this.seriesModel.id,
+ targetNode: targetInfo.node
+ });
+ },
+
+ /**
+ * @public
+ * @param {number} x Global coord x.
+ * @param {number} y Global coord y.
+ * @return {Object} info If not found, return undefined;
+ * @return {number} info.node Target node.
+ * @return {number} info.offsetX x refer to target node.
+ * @return {number} info.offsetY y refer to target node.
+ */
+ findTarget: function (x, y) {
+ var targetInfo;
+ var viewRoot = this.seriesModel.getViewRoot();
+
+ viewRoot.eachNode({attr: 'viewChildren', order: 'preorder'}, function (node) {
+ var bgEl = this._storage.background[node.getRawIndex()];
+ // If invisible, there might be no element.
+ if (bgEl) {
+ var point = bgEl.transformCoordToLocal(x, y);
+ var shape = bgEl.shape;
+
+ // For performance consideration, dont use 'getBoundingRect'.
+ if (shape.x <= point[0]
+ && point[0] <= shape.x + shape.width
+ && shape.y <= point[1]
+ && point[1] <= shape.y + shape.height
+ ) {
+ targetInfo = {node: node, offsetX: point[0], offsetY: point[1]};
+ }
+ else {
+ return false; // Suppress visit subtree.
+ }
+ }
+ }, this);
+
+ return targetInfo;
+ }
+
+ });
+
+ function createStorage() {
+ return {nodeGroup: [], background: [], content: []};
+ }
+
+
+
+/***/ },
+/* 183 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var graphic = __webpack_require__(42);
+ var layout = __webpack_require__(21);
+ var zrUtil = __webpack_require__(3);
+
+ var TEXT_PADDING = 8;
+ var ITEM_GAP = 8;
+ var ARRAY_LENGTH = 5;
+
+ function Breadcrumb(containerGroup, onSelect) {
+ /**
+ * @private
+ * @type {module:zrender/container/Group}
+ */
+ this.group = new graphic.Group();
+
+ containerGroup.add(this.group);
+
+ /**
+ * @private
+ * @type {Function}
+ */
+ this._onSelect = onSelect || zrUtil.noop;
+ }
+
+ Breadcrumb.prototype = {
+
+ constructor: Breadcrumb,
+
+ render: function (seriesModel, api, targetNode) {
+ var model = seriesModel.getModel('breadcrumb');
+ var thisGroup = this.group;
+
+ thisGroup.removeAll();
+
+ if (!model.get('show') || !targetNode) {
+ return;
+ }
+
+ var normalStyleModel = model.getModel('itemStyle.normal');
+ // var emphasisStyleModel = model.getModel('itemStyle.emphasis');
+ var textStyleModel = normalStyleModel.getModel('textStyle');
+
+ var layoutParam = {
+ pos: {
+ left: model.get('left'),
+ right: model.get('right'),
+ top: model.get('top'),
+ bottom: model.get('bottom')
+ },
+ box: {
+ width: api.getWidth(),
+ height: api.getHeight()
+ },
+ emptyItemWidth: model.get('emptyItemWidth'),
+ totalWidth: 0,
+ renderList: []
+ };
+
+ this._prepare(
+ model, targetNode, layoutParam, textStyleModel
+ );
+ this._renderContent(
+ model, targetNode, layoutParam, normalStyleModel, textStyleModel
+ );
+
+ layout.positionGroup(thisGroup, layoutParam.pos, layoutParam.box);
+ },
+
+ /**
+ * Prepare render list and total width
+ * @private
+ */
+ _prepare: function (model, targetNode, layoutParam, textStyleModel) {
+ for (var node = targetNode; node; node = node.parentNode) {
+ var text = node.getModel().get('name');
+ var textRect = textStyleModel.getTextRect(text);
+ var itemWidth = Math.max(
+ textRect.width + TEXT_PADDING * 2,
+ layoutParam.emptyItemWidth
+ );
+ layoutParam.totalWidth += itemWidth + ITEM_GAP;
+ layoutParam.renderList.push({node: node, text: text, width: itemWidth});
+ }
+ },
+
+ /**
+ * @private
+ */
+ _renderContent: function (
+ model, targetNode, layoutParam, normalStyleModel, textStyleModel
+ ) {
+ // Start rendering.
+ var lastX = 0;
+ var emptyItemWidth = layoutParam.emptyItemWidth;
+ var height = model.get('height');
+ var availableSize = layout.getAvailableSize(layoutParam.pos, layoutParam.box);
+ var totalWidth = layoutParam.totalWidth;
+ var renderList = layoutParam.renderList;
+
+ for (var i = renderList.length - 1; i >= 0; i--) {
+ var item = renderList[i];
+ var itemWidth = item.width;
+ var text = item.text;
+
+ // Hdie text and shorten width if necessary.
+ if (totalWidth > availableSize.width) {
+ totalWidth -= itemWidth - emptyItemWidth;
+ itemWidth = emptyItemWidth;
+ text = '';
+ }
+
+ this.group.add(new graphic.Polygon({
+ shape: {
+ points: makeItemPoints(
+ lastX, 0, itemWidth, height,
+ i === renderList.length - 1, i === 0
+ )
+ },
+ style: zrUtil.defaults(
+ normalStyleModel.getItemStyle(),
+ {
+ lineJoin: 'bevel',
+ text: text,
+ textFill: textStyleModel.getTextColor(),
+ textFont: textStyleModel.getFont()
+ }
+ ),
+ z: 10,
+ onclick: zrUtil.bind(this._onSelect, this, item.node)
+ }));
+
+ lastX += itemWidth + ITEM_GAP;
+ }
+ },
+
+ /**
+ * @override
+ */
+ remove: function () {
+ this.group.removeAll();
+ }
+ };
+
+ function makeItemPoints(x, y, itemWidth, itemHeight, head, tail) {
+ var points = [
+ [head ? x : x - ARRAY_LENGTH, y],
+ [x + itemWidth, y],
+ [x + itemWidth, y + itemHeight],
+ [head ? x : x - ARRAY_LENGTH, y + itemHeight]
+ ];
+ !tail && points.splice(2, 0, [x + itemWidth + ARRAY_LENGTH, y + itemHeight / 2]);
+ !head && points.push([x, y + itemHeight / 2]);
+ return points;
+ }
+
+ module.exports = Breadcrumb;
+
+
+/***/ },
+/* 184 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+
+ /**
+ * @param {number} [time=500] Time in ms
+ * @param {string} [easing='linear']
+ * @param {number} [delay=0]
+ * @param {Function} [callback]
+ *
+ * @example
+ * // Animate position
+ * animation
+ * .createWrap()
+ * .add(el1, {position: [10, 10]})
+ * .add(el2, {shape: {width: 500}, style: {fill: 'red'}}, 400)
+ * .done(function () { // done })
+ * .start('cubicOut');
+ */
+ function createWrap() {
+
+ var storage = [];
+ var elExistsMap = {};
+ var doneCallback;
+
+ return {
+
+ /**
+ * Caution: a el can only be added once, otherwise 'done'
+ * might not be called. This method checks this (by el.id),
+ * suppresses adding and returns false when existing el found.
+ *
+ * @param {modele:zrender/Element} el
+ * @param {Object} target
+ * @param {number} [time=500]
+ * @param {number} [delay=0]
+ * @param {string} [easing='linear']
+ * @return {boolean} Whether adding succeeded.
+ *
+ * @example
+ * add(el, target, time, delay, easing);
+ * add(el, target, time, easing);
+ * add(el, target, time);
+ * add(el, target);
+ */
+ add: function (el, target, time, delay, easing) {
+ if (zrUtil.isString(delay)) {
+ easing = delay;
+ delay = 0;
+ }
+
+ if (elExistsMap[el.id]) {
+ return false;
+ }
+ elExistsMap[el.id] = 1;
+
+ storage.push(
+ {el: el, target: target, time: time, delay: delay, easing: easing}
+ );
+
+ return true;
+ },
+
+ /**
+ * Only execute when animation finished. Will not execute when any
+ * of 'stop' or 'stopAnimation' called.
+ *
+ * @param {Function} callback
+ */
+ done: function (callback) {
+ doneCallback = callback;
+ return this;
+ },
+
+ /**
+ * Will stop exist animation firstly.
+ */
+ start: function () {
+ var count = storage.length;
+
+ for (var i = 0, len = storage.length; i < len; i++) {
+ var item = storage[i];
+ item.el.animateTo(item.target, item.time, item.delay, item.easing, done);
+ }
+
+ return this;
+
+ function done() {
+ count--;
+ if (!count) {
+ storage.length = 0;
+ elExistsMap = {};
+ doneCallback && doneCallback();
+ }
+ }
+ }
+ };
+ }
+
+ module.exports = {createWrap: createWrap};
+
+
+/***/ },
+/* 185 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file Treemap action
+ */
+
+
+ var echarts = __webpack_require__(1);
+ var helper = __webpack_require__(181);
+
+ var noop = function () {};
+
+ var actionTypes = [
+ 'treemapZoomToNode',
+ 'treemapRender',
+ 'treemapMove'
+ ];
+
+ for (var i = 0; i < actionTypes.length; i++) {
+ echarts.registerAction({type: actionTypes[i], update: 'updateView'}, noop);
+ }
+
+ echarts.registerAction(
+ {type: 'treemapRootToNode', update: 'updateView'},
+ function (payload, ecModel) {
+ ecModel.eachComponent(
+ {mainType: 'series', subType: 'treemap', query: payload},
+ function (model, index) {
+ var targetInfo = helper.retrieveTargetInfo(payload, model);
+
+ if (targetInfo) {
+ var originViewRoot = model.getViewRoot();
+ if (originViewRoot) {
+ payload.direction = helper.aboveViewRoot(originViewRoot, targetInfo.node)
+ ? 'rollup' : 'drilldown';
+ }
+ model.resetViewRoot(targetInfo.node);
+ }
+ }
+ );
+ }
+ );
+
+
+
+/***/ },
+/* 186 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var VisualMapping = __webpack_require__(187);
+ var zrColor = __webpack_require__(38);
+ var zrUtil = __webpack_require__(3);
+ var isArray = zrUtil.isArray;
+
+ var ITEM_STYLE_NORMAL = 'itemStyle.normal';
+
+ module.exports = function (ecModel, payload) {
+
+ var condition = {mainType: 'series', subType: 'treemap', query: payload};
+ ecModel.eachComponent(condition, function (seriesModel) {
+
+ var tree = seriesModel.getData().tree;
+ var root = tree.root;
+ var seriesItemStyleModel = seriesModel.getModel(ITEM_STYLE_NORMAL);
+
+ if (root.isRemoved()) {
+ return;
+ }
+
+ var levelItemStyles = zrUtil.map(tree.levelModels, function (levelModel) {
+ return levelModel ? levelModel.get(ITEM_STYLE_NORMAL) : null;
+ });
+
+ travelTree(
+ root,
+ {},
+ levelItemStyles,
+ seriesItemStyleModel,
+ seriesModel.getViewRoot().getAncestors(),
+ seriesModel
+ );
+ });
+ };
+
+ function travelTree(
+ node, designatedVisual, levelItemStyles, seriesItemStyleModel,
+ viewRootAncestors, seriesModel
+ ) {
+ var nodeModel = node.getModel();
+ var nodeLayout = node.getLayout();
+
+ // Optimize
+ if (nodeLayout.invisible) {
+ return;
+ }
+
+ var nodeItemStyleModel = node.getModel(ITEM_STYLE_NORMAL);
+ var levelItemStyle = levelItemStyles[node.depth];
+ var visuals = buildVisuals(
+ nodeItemStyleModel, designatedVisual, levelItemStyle, seriesItemStyleModel
+ );
+
+ // calculate border color
+ var borderColor = nodeItemStyleModel.get('borderColor');
+ var borderColorSaturation = nodeItemStyleModel.get('borderColorSaturation');
+ var thisNodeColor;
+ if (borderColorSaturation != null) {
+ // For performance, do not always execute 'calculateColor'.
+ thisNodeColor = calculateColor(visuals, node);
+ borderColor = calculateBorderColor(borderColorSaturation, thisNodeColor);
+ }
+ node.setVisual('borderColor', borderColor);
+
+ var viewChildren = node.viewChildren;
+ if (!viewChildren || !viewChildren.length) {
+ thisNodeColor = calculateColor(visuals, node);
+ // Apply visual to this node.
+ node.setVisual('color', thisNodeColor);
+ }
+ else {
+ var mapping = buildVisualMapping(
+ node, nodeModel, nodeLayout, nodeItemStyleModel, visuals, viewChildren
+ );
+ // Designate visual to children.
+ zrUtil.each(viewChildren, function (child, index) {
+ // If higher than viewRoot, only ancestors of viewRoot is needed to visit.
+ if (child.depth >= viewRootAncestors.length
+ || child === viewRootAncestors[child.depth]
+ ) {
+ var childVisual = mapVisual(
+ nodeModel, visuals, child, index, mapping, seriesModel
+ );
+ travelTree(
+ child, childVisual, levelItemStyles, seriesItemStyleModel,
+ viewRootAncestors, seriesModel
+ );
+ }
+ });
+ }
+ }
+
+ function buildVisuals(
+ nodeItemStyleModel, designatedVisual, levelItemStyle, seriesItemStyleModel
+ ) {
+ var visuals = zrUtil.extend({}, designatedVisual);
+
+ zrUtil.each(['color', 'colorAlpha', 'colorSaturation'], function (visualName) {
+ // Priority: thisNode > thisLevel > parentNodeDesignated > seriesModel
+ var val = nodeItemStyleModel.get(visualName, true); // Ignore parent
+ val == null && levelItemStyle && (val = levelItemStyle[visualName]);
+ val == null && (val = designatedVisual[visualName]);
+ val == null && (val = seriesItemStyleModel.get(visualName));
+
+ val != null && (visuals[visualName] = val);
+ });
+
+ return visuals;
+ }
+
+ function calculateColor(visuals) {
+ var color = getValueVisualDefine(visuals, 'color');
+
+ if (color) {
+ var colorAlpha = getValueVisualDefine(visuals, 'colorAlpha');
+ var colorSaturation = getValueVisualDefine(visuals, 'colorSaturation');
+ if (colorSaturation) {
+ color = zrColor.modifyHSL(color, null, null, colorSaturation);
+ }
+ if (colorAlpha) {
+ color = zrColor.modifyAlpha(color, colorAlpha);
+ }
+
+ return color;
+ }
+ }
+
+ function calculateBorderColor(borderColorSaturation, thisNodeColor) {
+ return thisNodeColor != null
+ ? zrColor.modifyHSL(thisNodeColor, null, null, borderColorSaturation)
+ : null;
+ }
+
+ function getValueVisualDefine(visuals, name) {
+ var value = visuals[name];
+ if (value != null && value !== 'none') {
+ return value;
+ }
+ }
+
+ function buildVisualMapping(
+ node, nodeModel, nodeLayout, nodeItemStyleModel, visuals, viewChildren
+ ) {
+ if (!viewChildren || !viewChildren.length) {
+ return;
+ }
+
+ var rangeVisual = getRangeVisual(nodeModel, 'color')
+ || (
+ visuals.color != null
+ && visuals.color !== 'none'
+ && (
+ getRangeVisual(nodeModel, 'colorAlpha')
+ || getRangeVisual(nodeModel, 'colorSaturation')
+ )
+ );
+
+ if (!rangeVisual) {
+ return;
+ }
+
+ var colorMappingBy = nodeModel.get('colorMappingBy');
+ var opt = {
+ type: rangeVisual.name,
+ dataExtent: nodeLayout.dataExtent,
+ visual: rangeVisual.range
+ };
+ if (opt.type === 'color'
+ && (colorMappingBy === 'index' || colorMappingBy === 'id')
+ ) {
+ opt.mappingMethod = 'category';
+ opt.loop = true;
+ // categories is ordinal, so do not set opt.categories.
+ }
+ else {
+ opt.mappingMethod = 'linear';
+ }
+
+ var mapping = new VisualMapping(opt);
+ mapping.__drColorMappingBy = colorMappingBy;
+
+ return mapping;
+ }
+
+ // Notice: If we dont have the attribute 'colorRange', but only use
+ // attribute 'color' to represent both concepts of 'colorRange' and 'color',
+ // (It means 'colorRange' when 'color' is Array, means 'color' when not array),
+ // this problem will be encountered:
+ // If a level-1 node dont have children, and its siblings has children,
+ // and colorRange is set on level-1, then the node can not be colored.
+ // So we separate 'colorRange' and 'color' to different attributes.
+ function getRangeVisual(nodeModel, name) {
+ // 'colorRange', 'colorARange', 'colorSRange'.
+ // If not exsits on this node, fetch from levels and series.
+ var range = nodeModel.get(name);
+ return (isArray(range) && range.length) ? {name: name, range: range} : null;
+ }
+
+ function mapVisual(nodeModel, visuals, child, index, mapping, seriesModel) {
+ var childVisuals = zrUtil.extend({}, visuals);
+
+ if (mapping) {
+ var mappingType = mapping.type;
+ var colorMappingBy = mappingType === 'color' && mapping.__drColorMappingBy;
+ var value =
+ colorMappingBy === 'index'
+ ? index
+ : colorMappingBy === 'id'
+ ? seriesModel.mapIdToIndex(child.getId())
+ : child.getValue(nodeModel.get('visualDimension'));
+
+ childVisuals[mappingType] = mapping.mapValueToVisual(value);
+ }
+
+ return childVisuals;
+ }
+
+
+
+/***/ },
+/* 187 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file Visual mapping.
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+ var zrColor = __webpack_require__(38);
+ var linearMap = __webpack_require__(7).linearMap;
+ var each = zrUtil.each;
+ var isObject = zrUtil.isObject;
+
+ var CATEGORY_DEFAULT_VISUAL_INDEX = -1;
+
+ function linearMapArray(val, domain, range, clamp) {
+ if (zrUtil.isArray(val)) {
+ return zrUtil.map(val, function (v) {
+ return linearMap(v, domain, range, clamp);
+ });
+ }
+ return linearMap(val, domain, range, clamp);
+ }
+ /**
+ * @param {Object} option
+ * @param {string} [option.type] See visualHandlers.
+ * @param {string} [option.mappingMethod] 'linear' or 'piecewise' or 'category'
+ * @param {Array.<number>=} [option.dataExtent] [minExtent, maxExtent],
+ * required when mappingMethod is 'linear'
+ * @param {Array.<Object>=} [option.pieceList] [
+ * {value: someValue},
+ * {interval: [min1, max1], visual: {...}},
+ * {interval: [min2, max2]}
+ * ],
+ * required when mappingMethod is 'piecewise'.
+ * Visual for only each piece can be specified.
+ * @param {Array.<string|Object>=} [option.categories] ['cate1', 'cate2']
+ * required when mappingMethod is 'category'.
+ * If no option.categories, it represents
+ * categories is [0, 1, 2, ...].
+ * @param {boolean} [option.loop=false] Whether loop mapping when mappingMethod is 'category'.
+ * @param {(Array|Object|*)} [option.visual] Visual data.
+ * when mappingMethod is 'category',
+ * visual data can be array or object
+ * (like: {cate1: '#222', none: '#fff'})
+ * or primary types (which represents
+ * defualt category visual), otherwise visual
+ * can only be array.
+ *
+ */
+ var VisualMapping = function (option) {
+ var mappingMethod = option.mappingMethod;
+ var visualType = option.type;
+
+ /**
+ * @readOnly
+ * @type {string}
+ */
+ this.type = visualType;
+
+ /**
+ * @readOnly
+ * @type {string}
+ */
+ this.mappingMethod = mappingMethod;
+
+ /**
+ * @readOnly
+ * @type {Object}
+ */
+ var thisOption = this.option = zrUtil.clone(option);
+
+ /**
+ * @private
+ * @type {Function}
+ */
+ this._normalizeData = normalizers[mappingMethod];
+
+ /**
+ * @private
+ * @type {Function}
+ */
+ this._getSpecifiedVisual = zrUtil.bind(
+ specifiedVisualGetters[mappingMethod], this, visualType
+ );
+
+ zrUtil.extend(this, visualHandlers[visualType]);
+
+ if (mappingMethod === 'piecewise') {
+ preprocessForPiecewise(thisOption);
+ }
+ if (mappingMethod === 'category') {
+ preprocessForCategory(thisOption);
+ }
+ };
+
+ VisualMapping.prototype = {
+
+ constructor: VisualMapping,
+
+ applyVisual: null,
+
+ isValueActive: null,
+
+ mapValueToVisual: null,
+
+ getNormalizer: function () {
+ return zrUtil.bind(this._normalizeData, this);
+ }
+ };
+
+ var visualHandlers = VisualMapping.visualHandlers = {
+
+ color: {
+
+ applyVisual: defaultApplyColor,
+
+ /**
+ * Create a mapper function
+ * @return {Function}
+ */
+ getColorMapper: function () {
+ var visual = isCategory(this)
+ ? this.option.visual
+ : zrUtil.map(this.option.visual, zrColor.parse);
+ return zrUtil.bind(
+ isCategory(this)
+ ? function (value, isNormalized) {
+ !isNormalized && (value = this._normalizeData(value));
+ return getVisualForCategory(this, visual, value);
+ }
+ : function (value, isNormalized, out) {
+ // If output rgb array
+ // which will be much faster and useful in pixel manipulation
+ var returnRGBArray = !!out;
+ !isNormalized && (value = this._normalizeData(value));
+ out = zrColor.fastMapToColor(value, visual, out);
+ return returnRGBArray ? out : zrUtil.stringify(out, 'rgba');
+ }, this);
+ },
+
+ // value:
+ // (1) {number}
+ // (2) {Array.<number>} Represents a interval, for colorStops.
+ // Return type:
+ // (1) {string} color value like '#444'
+ // (2) {Array.<Object>} colorStops,
+ // like [{color: '#fff', offset: 0}, {color: '#444', offset: 1}]
+ // where offset is between 0 and 1.
+ mapValueToVisual: function (value) {
+ var visual = this.option.visual;
+
+ if (zrUtil.isArray(value)) {
+ value = [
+ this._normalizeData(value[0]),
+ this._normalizeData(value[1])
+ ];
+
+ // For creating gradient color list.
+ return zrColor.mapIntervalToColor(value, visual);
+ }
+ else {
+ var normalized = this._normalizeData(value);
+ var result = this._getSpecifiedVisual(value);
+
+ if (result == null) {
+ result = isCategory(this)
+ ? getVisualForCategory(this, visual, normalized)
+ : zrColor.mapToColor(normalized, visual);
+ }
+
+ return result;
+ }
+ }
+ },
+
+ colorHue: makePartialColorVisualHandler(function (color, value) {
+ return zrColor.modifyHSL(color, value);
+ }),
+
+ colorSaturation: makePartialColorVisualHandler(function (color, value) {
+ return zrColor.modifyHSL(color, null, value);
+ }),
+
+ colorLightness: makePartialColorVisualHandler(function (color, value) {
+ return zrColor.modifyHSL(color, null, null, value);
+ }),
+
+ colorAlpha: makePartialColorVisualHandler(function (color, value) {
+ return zrColor.modifyAlpha(color, value);
+ }),
+
+ symbol: {
+ applyVisual: function (value, getter, setter) {
+ var symbolCfg = this.mapValueToVisual(value);
+ if (zrUtil.isString(symbolCfg)) {
+ setter('symbol', symbolCfg);
+ }
+ else if (isObject(symbolCfg)) {
+ for (var name in symbolCfg) {
+ if (symbolCfg.hasOwnProperty(name)) {
+ setter(name, symbolCfg[name]);
+ }
+ }
+ }
+ },
+
+ mapValueToVisual: function (value) {
+ var normalized = this._normalizeData(value);
+ var result = this._getSpecifiedVisual(value);
+ var visual = this.option.visual;
+
+ if (result == null) {
+ result = isCategory(this)
+ ? getVisualForCategory(this, visual, normalized)
+ : (arrayGetByNormalizedValue(visual, normalized) || {});
+ }
+
+ return result;
+ }
+ },
+
+ symbolSize: {
+ applyVisual: function (value, getter, setter) {
+ setter('symbolSize', this.mapValueToVisual(value));
+ },
+
+ mapValueToVisual: function (value) {
+ var normalized = this._normalizeData(value);
+ var result = this._getSpecifiedVisual(value);
+ var visual = this.option.visual;
+
+ if (result == null) {
+ result = isCategory(this)
+ ? getVisualForCategory(this, visual, normalized)
+ : linearMapArray(normalized, [0, 1], visual, true);
+ }
+ return result;
+ }
+ }
+ };
+
+ function preprocessForPiecewise(thisOption) {
+ var pieceList = thisOption.pieceList;
+ thisOption.hasSpecialVisual = false;
+
+ zrUtil.each(pieceList, function (piece, index) {
+ piece.originIndex = index;
+ if (piece.visual) {
+ thisOption.hasSpecialVisual = true;
+ }
+ });
+ }
+
+ function preprocessForCategory(thisOption) {
+ // Hash categories.
+ var categories = thisOption.categories;
+ var visual = thisOption.visual;
+ var isVisualArray = zrUtil.isArray(visual);
+
+ if (!categories) {
+ if (!isVisualArray) {
+ // visual should be array when no categories.
+ throw new Error();
+ }
+ else {
+ return;
+ }
+ }
+
+ var categoryMap = thisOption.categoryMap = {};
+ each(categories, function (cate, index) {
+ categoryMap[cate] = index;
+ });
+
+ // Process visual map input.
+ if (!isVisualArray) {
+ var visualArr = [];
+
+ if (zrUtil.isObject(visual)) {
+ each(visual, function (v, cate) {
+ var index = categoryMap[cate];
+ visualArr[index != null ? index : CATEGORY_DEFAULT_VISUAL_INDEX] = v;
+ });
+ }
+ else { // Is primary type, represents default visual.
+ visualArr[CATEGORY_DEFAULT_VISUAL_INDEX] = visual;
+ }
+
+ visual = thisOption.visual = visualArr;
+ }
+
+ // Remove categories that has no visual,
+ // then we can mapping them to CATEGORY_DEFAULT_VISUAL_INDEX.
+ for (var i = categories.length - 1; i >= 0; i--) {
+ if (visual[i] == null) {
+ delete categoryMap[categories[i]];
+ categories.pop();
+ }
+ }
+ }
+
+ function makePartialColorVisualHandler(applyValue) {
+ return {
+
+ applyVisual: function (value, getter, setter) {
+ // color can be {string} or {Array.<Object>} (for gradient color stops)
+ var color = getter('color');
+ var isArrayValue = zrUtil.isArray(value);
+ value = isArrayValue
+ ? [this.mapValueToVisual(value[0]), this.mapValueToVisual(value[1])]
+ : this.mapValueToVisual(value);
+
+ if (zrUtil.isArray(color)) {
+ for (var i = 0, len = color.length; i < len; i++) {
+ color[i].color = applyValue(
+ color[i].color, isArrayValue ? value[i] : value
+ );
+ }
+ }
+ else {
+ // Must not be array value
+ setter('color', applyValue(color, value));
+ }
+ },
+
+ mapValueToVisual: function (value) {
+ var normalized = this._normalizeData(value);
+ var result = this._getSpecifiedVisual(value);
+ var visual = this.option.visual;
+
+ if (result == null) {
+ result = isCategory(this)
+ ? getVisualForCategory(this, visual, normalized)
+ : linearMapArray(normalized, [0, 1], visual, true);
+ }
+ return result;
+ }
+ };
+ }
+
+ function arrayGetByNormalizedValue(arr, normalized) {
+ return arr[
+ Math.round(linearMapArray(normalized, [0, 1], [0, arr.length - 1], true))
+ ];
+ }
+
+ function defaultApplyColor(value, getter, setter) {
+ setter('color', this.mapValueToVisual(value));
+ }
+
+ function getVisualForCategory(me, visual, normalized) {
+ return visual[
+ (me.option.loop && normalized !== CATEGORY_DEFAULT_VISUAL_INDEX)
+ ? normalized % visual.length
+ : normalized
+ ];
+ }
+
+ function isCategory(me) {
+ return me.option.mappingMethod === 'category';
+ }
+
+
+ var normalizers = {
+
+ linear: function (value) {
+ return linearMapArray(value, this.option.dataExtent, [0, 1], true);
+ },
+
+ piecewise: function (value) {
+ var pieceList = this.option.pieceList;
+ var pieceIndex = VisualMapping.findPieceIndex(value, pieceList);
+ if (pieceIndex != null) {
+ return linearMapArray(pieceIndex, [0, pieceList.length - 1], [0, 1], true);
+ }
+ },
+
+ category: function (value) {
+ var index = this.option.categories
+ ? this.option.categoryMap[value]
+ : value; // ordinal
+ return index == null ? CATEGORY_DEFAULT_VISUAL_INDEX : index;
+ }
+ };
+
+
+ // FIXME
+ // refactor
+ var specifiedVisualGetters = {
+
+ // Linear do not support this feature.
+ linear: zrUtil.noop,
+
+ piecewise: function (visualType, value) {
+ var thisOption = this.option;
+ var pieceList = thisOption.pieceList;
+ if (thisOption.hasSpecialVisual) {
+ var pieceIndex = VisualMapping.findPieceIndex(value, pieceList);
+ var piece = pieceList[pieceIndex];
+ if (piece && piece.visual) {
+ return piece.visual[visualType];
+ }
+ }
+ },
+
+ // Category do not need to support this feature.
+ // Visual can be set in visualMap.inRange or
+ // visualMap.outOfRange directly.
+ category: zrUtil.noop
+ };
+
+ /**
+ * @public
+ */
+ VisualMapping.addVisualHandler = function (name, handler) {
+ visualHandlers[name] = handler;
+ };
+
+ /**
+ * @public
+ */
+ VisualMapping.isValidType = function (visualType) {
+ return visualHandlers.hasOwnProperty(visualType);
+ };
+
+ /**
+ * Convinent method.
+ * Visual can be Object or Array or primary type.
+ *
+ * @public
+ */
+ VisualMapping.eachVisual = function (visual, callback, context) {
+ if (zrUtil.isObject(visual)) {
+ zrUtil.each(visual, callback, context);
+ }
+ else {
+ callback.call(context, visual);
+ }
+ };
+
+ VisualMapping.mapVisual = function (visual, callback, context) {
+ var isPrimary;
+ var newVisual = zrUtil.isArray(visual)
+ ? []
+ : zrUtil.isObject(visual)
+ ? {}
+ : (isPrimary = true, null);
+
+ VisualMapping.eachVisual(visual, function (v, key) {
+ var newVal = callback.call(context, v, key);
+ isPrimary ? (newVisual = newVal) : (newVisual[key] = newVal);
+ });
+ return newVisual;
+ };
+
+ /**
+ * 'color', 'colorSaturation', 'colorAlpha', ... are in the same visualCluster named 'color'.
+ * Other visuals are in the cluster named as the same as theirselves.
+ *
+ * @public
+ * @param {string} visualType
+ * @param {string} visualCluster
+ * @return {boolean}
+ */
+ VisualMapping.isInVisualCluster = function (visualType, visualCluster) {
+ return visualCluster === 'color'
+ ? !!(visualType && visualType.indexOf(visualCluster) === 0)
+ : visualType === visualCluster;
+ };
+
+ /**
+ * @public
+ * @param {Object} obj
+ * @return {Oject} new object containers visual values.
+ * If no visuals, return null.
+ */
+ VisualMapping.retrieveVisuals = function (obj) {
+ var ret = {};
+ var hasVisual;
+
+ obj && each(visualHandlers, function (h, visualType) {
+ if (obj.hasOwnProperty(visualType)) {
+ ret[visualType] = obj[visualType];
+ hasVisual = true;
+ }
+ });
+
+ return hasVisual ? ret : null;
+ };
+
+ /**
+ * Give order to visual types, considering colorSaturation, colorAlpha depends on color.
+ *
+ * @public
+ * @param {(Object|Array)} visualTypes If Object, like: {color: ..., colorSaturation: ...}
+ * IF Array, like: ['color', 'symbol', 'colorSaturation']
+ * @return {Array.<string>} Sorted visual types.
+ */
+ VisualMapping.prepareVisualTypes = function (visualTypes) {
+ if (isObject(visualTypes)) {
+ var types = [];
+ each(visualTypes, function (item, type) {
+ types.push(type);
+ });
+ visualTypes = types;
+ }
+ else if (zrUtil.isArray(visualTypes)) {
+ visualTypes = visualTypes.slice();
+ }
+ else {
+ return [];
+ }
+
+ visualTypes.sort(function (type1, type2) {
+ // color should be front of colorSaturation, colorAlpha, ...
+ // symbol and symbolSize do not matter.
+ return (type2 === 'color' && type1 !== 'color' && type1.indexOf('color') === 0)
+ ? 1 : -1;
+ });
+
+ return visualTypes;
+ };
+
+ /**
+ * @public {Array.<Object>} [{value: ..., interval: [min, max]}, ...]
+ * @return {number} index
+ */
+ VisualMapping.findPieceIndex = function (value, pieceList) {
+ // value has high priority.
+ for (var i = 0, len = pieceList.length; i < len; i++) {
+ var piece = pieceList[i];
+ if (piece.value != null && piece.value === value) {
+ return i;
+ }
+ }
+
+ for (var i = 0, len = pieceList.length; i < len; i++) {
+ var piece = pieceList[i];
+ var interval = piece.interval;
+ if (interval) {
+ if (interval[0] === -Infinity) {
+ if (value < interval[1]) {
+ return i;
+ }
+ }
+ else if (interval[1] === Infinity) {
+ if (interval[0] < value) {
+ return i;
+ }
+ }
+ else if (
+ piece.interval[0] <= value
+ && value <= piece.interval[1]
+ ) {
+ return i;
+ }
+ }
+ }
+ };
+
+ module.exports = VisualMapping;
+
+
+
+
+/***/ },
+/* 188 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var mathMax = Math.max;
+ var mathMin = Math.min;
+ var zrUtil = __webpack_require__(3);
+ var numberUtil = __webpack_require__(7);
+ var layout = __webpack_require__(21);
+ var helper = __webpack_require__(181);
+ var parsePercent = numberUtil.parsePercent;
+ var retrieveValue = zrUtil.retrieve;
+ var BoundingRect = __webpack_require__(15);
+ var helper = __webpack_require__(181);
+
+ /**
+ * @public
+ */
+ function update(ecModel, api, payload) {
+ // Layout result in each node:
+ // {x, y, width, height, area, borderWidth}
+ var condition = {mainType: 'series', subType: 'treemap', query: payload};
+ ecModel.eachComponent(condition, function (seriesModel) {
+
+ var ecWidth = api.getWidth();
+ var ecHeight = api.getHeight();
+ var seriesOption = seriesModel.option;
+
+ var size = seriesOption.size || []; // Compatible with ec2.
+ var containerWidth = parsePercent(
+ retrieveValue(seriesOption.width, size[0]),
+ ecWidth
+ );
+ var containerHeight = parsePercent(
+ retrieveValue(seriesOption.height, size[1]),
+ ecHeight
+ );
+
+ var layoutInfo = layout.getLayoutRect(
+ seriesModel.getBoxLayoutParams(),
+ {
+ width: api.getWidth(),
+ height: api.getHeight()
+ }
+ );
+
+ // Fetch payload info.
+ var payloadType = payload && payload.type;
+ var targetInfo = helper.retrieveTargetInfo(payload, seriesModel);
+ var rootRect = (payloadType === 'treemapRender' || payloadType === 'treemapMove')
+ ? payload.rootRect : null;
+ var viewRoot = seriesModel.getViewRoot();
+
+ if (payloadType !== 'treemapMove') {
+ var rootSize = payloadType === 'treemapZoomToNode'
+ ? estimateRootSize(
+ seriesModel, targetInfo, viewRoot, containerWidth, containerHeight
+ )
+ : rootRect
+ ? [rootRect.width, rootRect.height]
+ : [containerWidth, containerHeight];
+
+ var sort = seriesOption.sort;
+ if (sort && sort !== 'asc' && sort !== 'desc') {
+ sort = 'desc';
+ }
+ var options = {
+ squareRatio: seriesOption.squareRatio,
+ sort: sort,
+ leafDepth: seriesOption.leafDepth
+ };
+
+ viewRoot.setLayout({
+ x: 0, y: 0,
+ width: rootSize[0], height: rootSize[1],
+ area: rootSize[0] * rootSize[1]
+ });
+
+ squarify(viewRoot, options, false, 0);
+ }
+
+ // Set root position
+ viewRoot.setLayout(
+ calculateRootPosition(layoutInfo, rootRect, targetInfo),
+ true
+ );
+
+ seriesModel.setLayoutInfo(layoutInfo);
+
+ // Optimize
+ // FIXME
+ // 现在没有clip功能,暂时å–ec高宽。
+ prunning(
+ seriesModel.getData().tree.root,
+ // Transform to base element coordinate system.
+ new BoundingRect(-layoutInfo.x, -layoutInfo.y, ecWidth, ecHeight),
+ helper.getPathToRoot(viewRoot)
+ );
+
+ });
+ }
+
+ /**
+ * Layout treemap with squarify algorithm.
+ * @see https://graphics.ethz.ch/teaching/scivis_common/Literature/squarifiedTreeMaps.pdf
+ * @see https://github.com/mbostock/d3/blob/master/src/layout/treemap.js
+ *
+ * @protected
+ * @param {module:echarts/data/Tree~TreeNode} node
+ * @param {Object} options
+ * @param {string} options.sort 'asc' or 'desc'
+ * @param {number} options.squareRatio
+ * @param {boolean} hideChildren
+ * @param {number} depth
+ */
+ function squarify(node, options, hideChildren, depth) {
+ var width;
+ var height;
+
+ if (node.isRemoved()) {
+ return;
+ }
+
+ var thisLayout = node.getLayout();
+ width = thisLayout.width;
+ height = thisLayout.height;
+
+ // Considering border and gap
+ var itemStyleModel = node.getModel('itemStyle.normal');
+ var borderWidth = itemStyleModel.get('borderWidth');
+ var halfGapWidth = itemStyleModel.get('gapWidth') / 2;
+ var layoutOffset = borderWidth - halfGapWidth;
+ var nodeModel = node.getModel();
+
+ node.setLayout({borderWidth: borderWidth}, true);
+
+ width = mathMax(width - 2 * layoutOffset, 0);
+ height = mathMax(height - 2 * layoutOffset, 0);
+
+ var totalArea = width * height;
+ var viewChildren = initChildren(
+ node, nodeModel, totalArea, options, hideChildren, depth
+ );
+
+ if (!viewChildren.length) {
+ return;
+ }
+
+ var rect = {x: layoutOffset, y: layoutOffset, width: width, height: height};
+ var rowFixedLength = mathMin(width, height);
+ var best = Infinity; // the best row score so far
+ var row = [];
+ row.area = 0;
+
+ for (var i = 0, len = viewChildren.length; i < len;) {
+ var child = viewChildren[i];
+
+ row.push(child);
+ row.area += child.getLayout().area;
+ var score = worst(row, rowFixedLength, options.squareRatio);
+
+ // continue with this orientation
+ if (score <= best) {
+ i++;
+ best = score;
+ }
+ // abort, and try a different orientation
+ else {
+ row.area -= row.pop().getLayout().area;
+ position(row, rowFixedLength, rect, halfGapWidth, false);
+ rowFixedLength = mathMin(rect.width, rect.height);
+ row.length = row.area = 0;
+ best = Infinity;
+ }
+ }
+
+ if (row.length) {
+ position(row, rowFixedLength, rect, halfGapWidth, true);
+ }
+
+ if (!hideChildren) {
+ var childrenVisibleMin = nodeModel.get('childrenVisibleMin');
+ if (childrenVisibleMin != null && totalArea < childrenVisibleMin) {
+ hideChildren = true;
+ }
+ }
+
+ for (var i = 0, len = viewChildren.length; i < len; i++) {
+ squarify(viewChildren[i], options, hideChildren, depth + 1);
+ }
+ }
+
+ /**
+ * Set area to each child, and calculate data extent for visual coding.
+ */
+ function initChildren(node, nodeModel, totalArea, options, hideChildren, depth) {
+ var viewChildren = node.children || [];
+ var orderBy = options.sort;
+ orderBy !== 'asc' && orderBy !== 'desc' && (orderBy = null);
+
+ var overLeafDepth = options.leafDepth != null && options.leafDepth <= depth;
+
+ // leafDepth has higher priority.
+ if (hideChildren && !overLeafDepth) {
+ return (node.viewChildren = []);
+ }
+
+ // Sort children, order by desc.
+ viewChildren = zrUtil.filter(viewChildren, function (child) {
+ return !child.isRemoved();
+ });
+
+ sort(viewChildren, orderBy);
+
+ var info = statistic(nodeModel, viewChildren, orderBy);
+
+ if (info.sum === 0) {
+ return (node.viewChildren = []);
+ }
+
+ info.sum = filterByThreshold(nodeModel, totalArea, info.sum, orderBy, viewChildren);
+
+ if (info.sum === 0) {
+ return (node.viewChildren = []);
+ }
+
+ // Set area to each child.
+ for (var i = 0, len = viewChildren.length; i < len; i++) {
+ var area = viewChildren[i].getValue() / info.sum * totalArea;
+ // Do not use setLayout({...}, true), because it is needed to clear last layout.
+ viewChildren[i].setLayout({area: area});
+ }
+
+ if (overLeafDepth) {
+ viewChildren.length && node.setLayout({isLeafRoot: true}, true);
+ viewChildren.length = 0;
+ }
+
+ node.viewChildren = viewChildren;
+ node.setLayout({dataExtent: info.dataExtent}, true);
+
+ return viewChildren;
+ }
+
+ /**
+ * Consider 'visibleMin'. Modify viewChildren and get new sum.
+ */
+ function filterByThreshold(nodeModel, totalArea, sum, orderBy, orderedChildren) {
+
+ // visibleMin is not supported yet when no option.sort.
+ if (!orderBy) {
+ return sum;
+ }
+
+ var visibleMin = nodeModel.get('visibleMin');
+ var len = orderedChildren.length;
+ var deletePoint = len;
+
+ // Always travel from little value to big value.
+ for (var i = len - 1; i >= 0; i--) {
+ var value = orderedChildren[
+ orderBy === 'asc' ? len - i - 1 : i
+ ].getValue();
+
+ if (value / sum * totalArea < visibleMin) {
+ deletePoint = i;
+ sum -= value;
+ }
+ }
+
+ orderBy === 'asc'
+ ? orderedChildren.splice(0, len - deletePoint)
+ : orderedChildren.splice(deletePoint, len - deletePoint);
+
+ return sum;
+ }
+
+ /**
+ * Sort
+ */
+ function sort(viewChildren, orderBy) {
+ if (orderBy) {
+ viewChildren.sort(function (a, b) {
+ return orderBy === 'asc'
+ ? a.getValue() - b.getValue() : b.getValue() - a.getValue();
+ });
+ }
+ return viewChildren;
+ }
+
+ /**
+ * Statistic
+ */
+ function statistic(nodeModel, children, orderBy) {
+ // Calculate sum.
+ var sum = 0;
+ for (var i = 0, len = children.length; i < len; i++) {
+ sum += children[i].getValue();
+ }
+
+ // Statistic data extent for latter visual coding.
+ // Notice: data extent should be calculate based on raw children
+ // but not filtered view children, otherwise visual mapping will not
+ // be stable when zoom (where children is filtered by visibleMin).
+
+ var dimension = nodeModel.get('visualDimension');
+ var dataExtent;
+
+ // The same as area dimension.
+ if (!children || !children.length) {
+ dataExtent = [NaN, NaN];
+ }
+ else if (dimension === 'value' && orderBy) {
+ dataExtent = [
+ children[children.length - 1].getValue(),
+ children[0].getValue()
+ ];
+ orderBy === 'asc' && dataExtent.reverse();
+ }
+ // Other dimension.
+ else {
+ var dataExtent = [Infinity, -Infinity];
+ zrUtil.each(children, function (child) {
+ var value = child.getValue(dimension);
+ value < dataExtent[0] && (dataExtent[0] = value);
+ value > dataExtent[1] && (dataExtent[1] = value);
+ });
+ }
+
+ return {sum: sum, dataExtent: dataExtent};
+ }
+
+ /**
+ * Computes the score for the specified row,
+ * as the worst aspect ratio.
+ */
+ function worst(row, rowFixedLength, ratio) {
+ var areaMax = 0;
+ var areaMin = Infinity;
+
+ for (var i = 0, area, len = row.length; i < len; i++) {
+ area = row[i].getLayout().area;
+ if (area) {
+ area < areaMin && (areaMin = area);
+ area > areaMax && (areaMax = area);
+ }
+ }
+
+ var squareArea = row.area * row.area;
+ var f = rowFixedLength * rowFixedLength * ratio;
+
+ return squareArea
+ ? mathMax(
+ (f * areaMax) / squareArea,
+ squareArea / (f * areaMin)
+ )
+ : Infinity;
+ }
+
+ /**
+ * Positions the specified row of nodes. Modifies `rect`.
+ */
+ function position(row, rowFixedLength, rect, halfGapWidth, flush) {
+ // When rowFixedLength === rect.width,
+ // it is horizontal subdivision,
+ // rowFixedLength is the width of the subdivision,
+ // rowOtherLength is the height of the subdivision,
+ // and nodes will be positioned from left to right.
+
+ // wh[idx0WhenH] means: when horizontal,
+ // wh[idx0WhenH] => wh[0] => 'width'.
+ // xy[idx1WhenH] => xy[1] => 'y'.
+ var idx0WhenH = rowFixedLength === rect.width ? 0 : 1;
+ var idx1WhenH = 1 - idx0WhenH;
+ var xy = ['x', 'y'];
+ var wh = ['width', 'height'];
+
+ var last = rect[xy[idx0WhenH]];
+ var rowOtherLength = rowFixedLength
+ ? row.area / rowFixedLength : 0;
+
+ if (flush || rowOtherLength > rect[wh[idx1WhenH]]) {
+ rowOtherLength = rect[wh[idx1WhenH]]; // over+underflow
+ }
+ for (var i = 0, rowLen = row.length; i < rowLen; i++) {
+ var node = row[i];
+ var nodeLayout = {};
+ var step = rowOtherLength
+ ? node.getLayout().area / rowOtherLength : 0;
+
+ var wh1 = nodeLayout[wh[idx1WhenH]] = mathMax(rowOtherLength - 2 * halfGapWidth, 0);
+
+ // We use Math.max/min to avoid negative width/height when considering gap width.
+ var remain = rect[xy[idx0WhenH]] + rect[wh[idx0WhenH]] - last;
+ var modWH = (i === rowLen - 1 || remain < step) ? remain : step;
+ var wh0 = nodeLayout[wh[idx0WhenH]] = mathMax(modWH - 2 * halfGapWidth, 0);
+
+ nodeLayout[xy[idx1WhenH]] = rect[xy[idx1WhenH]] + mathMin(halfGapWidth, wh1 / 2);
+ nodeLayout[xy[idx0WhenH]] = last + mathMin(halfGapWidth, wh0 / 2);
+
+ last += modWH;
+ node.setLayout(nodeLayout, true);
+ }
+
+ rect[xy[idx1WhenH]] += rowOtherLength;
+ rect[wh[idx1WhenH]] -= rowOtherLength;
+ }
+
+ // Return [containerWidth, containerHeight] as defualt.
+ function estimateRootSize(seriesModel, targetInfo, viewRoot, containerWidth, containerHeight) {
+ // If targetInfo.node exists, we zoom to the node,
+ // so estimate whold width and heigth by target node.
+ var currNode = (targetInfo || {}).node;
+ var defaultSize = [containerWidth, containerHeight];
+
+ if (!currNode || currNode === viewRoot) {
+ return defaultSize;
+ }
+
+ var parent;
+ var viewArea = containerWidth * containerHeight;
+ var area = viewArea * seriesModel.option.zoomToNodeRatio;
+
+ while (parent = currNode.parentNode) { // jshint ignore:line
+ var sum = 0;
+ var siblings = parent.children;
+
+ for (var i = 0, len = siblings.length; i < len; i++) {
+ sum += siblings[i].getValue();
+ }
+ var currNodeValue = currNode.getValue();
+ if (currNodeValue === 0) {
+ return defaultSize;
+ }
+ area *= sum / currNodeValue;
+
+ var borderWidth = parent.getModel('itemStyle.normal').get('borderWidth');
+
+ if (isFinite(borderWidth)) {
+ // Considering border, suppose aspect ratio is 1.
+ area += 4 * borderWidth * borderWidth + 4 * borderWidth * Math.pow(area, 0.5);
+ }
+
+ area > numberUtil.MAX_SAFE_INTEGER && (area = numberUtil.MAX_SAFE_INTEGER);
+
+ currNode = parent;
+ }
+
+ area < viewArea && (area = viewArea);
+ var scale = Math.pow(area / viewArea, 0.5);
+
+ return [containerWidth * scale, containerHeight * scale];
+ }
+
+ // Root postion base on coord of containerGroup
+ function calculateRootPosition(layoutInfo, rootRect, targetInfo) {
+ if (rootRect) {
+ return {x: rootRect.x, y: rootRect.y};
+ }
+
+ var defaultPosition = {x: 0, y: 0};
+ if (!targetInfo) {
+ return defaultPosition;
+ }
+
+ // If targetInfo is fetched by 'retrieveTargetInfo',
+ // old tree and new tree are the same tree,
+ // so the node still exists and we can visit it.
+
+ var targetNode = targetInfo.node;
+ var layout = targetNode.getLayout();
+
+ if (!layout) {
+ return defaultPosition;
+ }
+
+ // Transform coord from local to container.
+ var targetCenter = [layout.width / 2, layout.height / 2];
+ var node = targetNode;
+ while (node) {
+ var nodeLayout = node.getLayout();
+ targetCenter[0] += nodeLayout.x;
+ targetCenter[1] += nodeLayout.y;
+ node = node.parentNode;
+ }
+
+ return {
+ x: layoutInfo.width / 2 - targetCenter[0],
+ y: layoutInfo.height / 2 - targetCenter[1]
+ };
+ }
+
+ // Mark invisible nodes for prunning when visual coding and rendering.
+ // Prunning depends on layout and root position, so we have to do it after them.
+ function prunning(node, clipRect, viewPath) {
+ var nodeLayout = node.getLayout();
+
+ node.setLayout({
+ invisible: nodeLayout
+ ? !clipRect.intersect(nodeLayout)
+ : !helper.aboveViewRootByViewPath(viewPath, node)
+ }, true);
+
+ var viewChildren = node.viewChildren || [];
+ for (var i = 0, len = viewChildren.length; i < len; i++) {
+ // Transform to child coordinate.
+ var childClipRect = new BoundingRect(
+ clipRect.x - nodeLayout.x,
+ clipRect.y - nodeLayout.y,
+ clipRect.width,
+ clipRect.height
+ );
+ prunning(viewChildren[i], childClipRect, viewPath);
+ }
+ }
+
+ module.exports = update;
+
+
+/***/ },
+/* 189 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var echarts = __webpack_require__(1);
+ var zrUtil = __webpack_require__(3);
+
+ __webpack_require__(190);
+ __webpack_require__(193);
+
+ __webpack_require__(197);
+
+ echarts.registerProcessor('filter', __webpack_require__(198));
+
+ echarts.registerVisualCoding('chart', zrUtil.curry(
+ __webpack_require__(103), 'graph', 'circle', null
+ ));
+ echarts.registerVisualCoding('chart', __webpack_require__(199));
+
+ echarts.registerLayout(__webpack_require__(200));
+ echarts.registerLayout(__webpack_require__(202));
+ echarts.registerLayout(__webpack_require__(204));
+
+ // Graph view coordinate system
+ echarts.registerCoordinateSystem('graphView', {
+ create: __webpack_require__(206)
+ });
+
+
+/***/ },
+/* 190 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var List = __webpack_require__(94);
+ var zrUtil = __webpack_require__(3);
+
+ var createGraphFromNodeEdge = __webpack_require__(191);
+
+ var GraphSeries = __webpack_require__(1).extendSeriesModel({
+
+ type: 'series.graph',
+
+ init: function (option) {
+ GraphSeries.superApply(this, 'init', arguments);
+
+ // Provide data for legend select
+ this.legendDataProvider = function () {
+ return this._categoriesData;
+ };
+
+ this._updateCategoriesData();
+ },
+
+ mergeOption: function (option) {
+ GraphSeries.superApply(this, 'mergeOption', arguments);
+
+ this._updateCategoriesData();
+ },
+
+ getInitialData: function (option, ecModel) {
+ var edges = option.edges || option.links;
+ var nodes = option.data || option.nodes;
+ if (nodes && edges) {
+ var graph = createGraphFromNodeEdge(nodes, edges, this, true);
+ var list = graph.data;
+ var self = this;
+ // Overwrite list.getItemModel to
+ list.wrapMethod('getItemModel', function (model) {
+ var categoriesModels = self._categoriesModels;
+ var categoryIdx = model.getShallow('category');
+ var categoryModel = categoriesModels[categoryIdx];
+ if (categoryModel) {
+ categoryModel.parentModel = model.parentModel;
+ model.parentModel = categoryModel;
+ }
+ return model;
+ });
+ return list;
+ }
+ },
+
+ restoreData: function () {
+ GraphSeries.superApply(this, 'restoreData', arguments);
+ this.getGraph().restoreData();
+ },
+
+ /**
+ * @return {module:echarts/data/Graph}
+ */
+ getGraph: function () {
+ return this.getData().graph;
+ },
+
+ /**
+ * @return {module:echarts/data/List}
+ */
+ getEdgeData: function () {
+ return this.getGraph().edgeData;
+ },
+
+ /**
+ * @return {module:echarts/data/List}
+ */
+ getCategoriesData: function () {
+ return this._categoriesData;
+ },
+
+ _updateCategoriesData: function () {
+ var categories = zrUtil.map(this.option.categories || [], function (category) {
+ // Data must has value
+ return category.value != null ? category : zrUtil.extend({
+ value: 0
+ }, category);
+ });
+ var categoriesData = new List(['value'], this);
+ categoriesData.initData(categories);
+
+ this._categoriesData = categoriesData;
+
+ this._categoriesModels = categoriesData.mapArray(function (idx) {
+ return categoriesData.getItemModel(idx, true);
+ });
+ },
+
+ /**
+ * @param {number} zoom
+ */
+ setRoamZoom: function (zoom) {
+ var roamDetail = this.option.roamDetail;
+ roamDetail && (roamDetail.zoom = zoom);
+ },
+
+ /**
+ * @param {number} x
+ * @param {number} y
+ */
+ setRoamPan: function (x, y) {
+ var roamDetail = this.option.roamDetail;
+ if (roamDetail) {
+ roamDetail.x = x;
+ roamDetail.y = y;
+ }
+ },
+
+ defaultOption: {
+ zlevel: 0,
+ z: 2,
+
+ color: ['#61a0a8', '#d14a61', '#fd9c35', '#675bba', '#fec42c',
+ '#dd4444', '#fd9c35', '#cd4870'],
+
+ coordinateSystem: 'view',
+
+ legendHoverLink: true,
+
+ hoverAnimation: true,
+
+ layout: null,
+
+ // Configuration of force
+ force: {
+ initLayout: null,
+ repulsion: 50,
+ gravity: 0.1,
+ edgeLength: 30,
+
+ layoutAnimation: true
+ },
+
+ left: 'center',
+ top: 'center',
+ // right: null,
+ // bottom: null,
+ // width: '80%',
+ // height: '80%',
+
+ symbol: 'circle',
+ symbolSize: 10,
+
+ draggable: false,
+
+ roam: false,
+ roamDetail: {
+ x: 0,
+ y: 0,
+ zoom: 1
+ },
+
+ // Symbol size scale ratio in roam
+ nodeScaleRatio: 0.6,
+
+ // Line width scale ratio in roam
+ // edgeScaleRatio: 0.1,
+
+ // categories: [],
+
+ // data: []
+ // Or
+ // nodes: []
+ //
+ // links: []
+ // Or
+ // edges: []
+
+ label: {
+ normal: {
+ show: false
+ },
+ emphasis: {
+ show: true
+ }
+ },
+
+ itemStyle: {
+ normal: {},
+ emphasis: {}
+ },
+
+ lineStyle: {
+ normal: {
+ color: '#aaa',
+ width: 1,
+ curveness: 0,
+ opacity: 0.5
+ },
+ emphasis: {}
+ }
+ }
+ });
+
+ module.exports = GraphSeries;
+
+
+/***/ },
+/* 191 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var List = __webpack_require__(94);
+ var Graph = __webpack_require__(192);
+ var linkList = __webpack_require__(180);
+ var completeDimensions = __webpack_require__(96);
+ var zrUtil = __webpack_require__(3);
+
+ module.exports = function (nodes, edges, hostModel, directed) {
+ var graph = new Graph(directed);
+ for (var i = 0; i < nodes.length; i++) {
+ graph.addNode(zrUtil.retrieve(
+ // Id, name, dataIndex
+ nodes[i].id, nodes[i].name, i
+ ), i);
+ }
+
+ var linkNameList = [];
+ var validEdges = [];
+ for (var i = 0; i < edges.length; i++) {
+ var link = edges[i];
+ // addEdge may fail when source or target not exists
+ if (graph.addEdge(link.source, link.target, i)) {
+ validEdges.push(link);
+ linkNameList.push(zrUtil.retrieve(link.id, link.source + ' - ' + link.target));
+ }
+ }
+
+ // FIXME
+ var dimensionNames = completeDimensions(['value'], nodes);
+
+ var nodeData = new List(dimensionNames, hostModel);
+ var edgeData = new List(['value'], hostModel);
+
+ nodeData.initData(nodes);
+ edgeData.initData(validEdges, linkNameList);
+
+ graph.setEdgeData(edgeData);
+
+ linkList.linkToGraph(nodeData, graph);
+ // Update dataIndex of nodes and edges because invalid edge may be removed
+ graph.update();
+
+ return graph;
+ };
+
+
+/***/ },
+/* 192 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ /**
+ * Graph data structure
+ *
+ * @module echarts/data/Graph
+ * @author Yi Shen(https://www.github.com/pissang)
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+
+ /**
+ * @alias module:echarts/data/Graph
+ * @constructor
+ * @param {boolean} directed
+ */
+ var Graph = function(directed) {
+ /**
+ * 是å¦æ˜¯æœ‰å‘图
+ * @type {boolean}
+ * @private
+ */
+ this._directed = directed || false;
+
+ /**
+ * @type {Array.<module:echarts/data/Graph.Node>}
+ * @readOnly
+ */
+ this.nodes = [];
+
+ /**
+ * @type {Array.<module:echarts/data/Graph.Edge>}
+ * @readOnly
+ */
+ this.edges = [];
+
+ /**
+ * @type {Object.<string, module:echarts/data/Graph.Node>}
+ * @private
+ */
+ this._nodesMap = {};
+ /**
+ * @type {Object.<string, module:echarts/data/Graph.Edge>}
+ * @private
+ */
+ this._edgesMap = {};
+
+ /**
+ * @type {module:echarts/data/List}
+ * @readOnly
+ */
+ this.data;
+
+ /**
+ * @type {module:echarts/data/List}
+ * @readOnly
+ */
+ this.edgeData;
+ };
+
+ var graphProto = Graph.prototype;
+ /**
+ * @type {string}
+ */
+ graphProto.type = 'graph';
+
+ /**
+ * If is directed graph
+ * @return {boolean}
+ */
+ graphProto.isDirected = function () {
+ return this._directed;
+ };
+
+ /**
+ * Add a new node
+ * @param {string} id
+ * @param {number} [dataIndex]
+ */
+ graphProto.addNode = function (id, dataIndex) {
+ var nodesMap = this._nodesMap;
+
+ if (nodesMap[id]) {
+ return;
+ }
+
+ var node = new Node(id, dataIndex);
+ node.hostGraph = this;
+
+ this.nodes.push(node);
+
+ nodesMap[id] = node;
+ return node;
+ };
+
+ /**
+ * Get node by data index
+ * @param {number} dataIndex
+ * @return {module:echarts/data/Graph~Node}
+ */
+ graphProto.getNodeByIndex = function (dataIndex) {
+ var rawIdx = this.data.getRawIndex(dataIndex);
+ return this.nodes[rawIdx];
+ };
+ /**
+ * Get node by id
+ * @param {string} id
+ * @return {module:echarts/data/Graph.Node}
+ */
+ graphProto.getNodeById = function (id) {
+ return this._nodesMap[id];
+ };
+
+ /**
+ * Add a new edge
+ * @param {string|module:echarts/data/Graph.Node} n1
+ * @param {string|module:echarts/data/Graph.Node} n2
+ * @param {number} [dataIndex=-1]
+ * @return {module:echarts/data/Graph.Edge}
+ */
+ graphProto.addEdge = function (n1, n2, dataIndex) {
+ var nodesMap = this._nodesMap;
+ var edgesMap = this._edgesMap;
+
+ if (!(n1 instanceof Node)) {
+ n1 = nodesMap[n1];
+ }
+ if (!(n2 instanceof Node)) {
+ n2 = nodesMap[n2];
+ }
+ if (!n1 || !n2) {
+ return;
+ }
+
+ var key = n1.id + '-' + n2.id;
+ // PENDING
+ if (edgesMap[key]) {
+ return;
+ }
+
+ var edge = new Edge(n1, n2, dataIndex);
+ edge.hostGraph = this;
+
+ if (this._directed) {
+ n1.outEdges.push(edge);
+ n2.inEdges.push(edge);
+ }
+ n1.edges.push(edge);
+ if (n1 !== n2) {
+ n2.edges.push(edge);
+ }
+
+ this.edges.push(edge);
+ edgesMap[key] = edge;
+
+ return edge;
+ };
+
+ /**
+ * Get edge by data index
+ * @param {number} dataIndex
+ * @return {module:echarts/data/Graph~Node}
+ */
+ graphProto.getEdgeByIndex = function (dataIndex) {
+ var rawIdx = this.edgeData.getRawIndex(dataIndex);
+ return this.edges[rawIdx];
+ };
+ /**
+ * Get edge by two linked nodes
+ * @param {module:echarts/data/Graph.Node|string} n1
+ * @param {module:echarts/data/Graph.Node|string} n2
+ * @return {module:echarts/data/Graph.Edge}
+ */
+ graphProto.getEdge = function (n1, n2) {
+ if (n1 instanceof Node) {
+ n1 = n1.id;
+ }
+ if (n2 instanceof Node) {
+ n2 = n2.id;
+ }
+
+ var edgesMap = this._edgesMap;
+
+ if (this._directed) {
+ return edgesMap[n1 + '-' + n2];
+ } else {
+ return edgesMap[n1 + '-' + n2]
+ || edgesMap[n2 + '-' + n1];
+ }
+ };
+
+ /**
+ * Iterate all nodes
+ * @param {Function} cb
+ * @param {*} [context]
+ */
+ graphProto.eachNode = function (cb, context) {
+ var nodes = this.nodes;
+ var len = nodes.length;
+ for (var i = 0; i < len; i++) {
+ if (nodes[i].dataIndex >= 0) {
+ cb.call(context, nodes[i], i);
+ }
+ }
+ };
+
+ /**
+ * Iterate all edges
+ * @param {Function} cb
+ * @param {*} [context]
+ */
+ graphProto.eachEdge = function (cb, context) {
+ var edges = this.edges;
+ var len = edges.length;
+ for (var i = 0; i < len; i++) {
+ if (edges[i].dataIndex >= 0
+ && edges[i].node1.dataIndex >= 0
+ && edges[i].node2.dataIndex >= 0
+ ) {
+ cb.call(context, edges[i], i);
+ }
+ }
+ };
+
+ /**
+ * Breadth first traverse
+ * @param {Function} cb
+ * @param {module:echarts/data/Graph.Node} startNode
+ * @param {string} [direction='none'] 'none'|'in'|'out'
+ * @param {*} [context]
+ */
+ graphProto.breadthFirstTraverse = function (
+ cb, startNode, direction, context
+ ) {
+ if (!(startNode instanceof Node)) {
+ startNode = this._nodesMap[startNode];
+ }
+ if (!startNode) {
+ return;
+ }
+
+ var edgeType = direction === 'out'
+ ? 'outEdges' : (direction === 'in' ? 'inEdges' : 'edges');
+
+ for (var i = 0; i < this.nodes.length; i++) {
+ this.nodes[i].__visited = false;
+ }
+
+ if (cb.call(context, startNode, null)) {
+ return;
+ }
+
+ var queue = [startNode];
+ while (queue.length) {
+ var currentNode = queue.shift();
+ var edges = currentNode[edgeType];
+
+ for (var i = 0; i < edges.length; i++) {
+ var e = edges[i];
+ var otherNode = e.node1 === currentNode
+ ? e.node2 : e.node1;
+ if (!otherNode.__visited) {
+ if (cb.call(otherNode, otherNode, currentNode)) {
+ // Stop traversing
+ return;
+ }
+ queue.push(otherNode);
+ otherNode.__visited = true;
+ }
+ }
+ }
+ };
+
+ // TODO
+ // graphProto.depthFirstTraverse = function (
+ // cb, startNode, direction, context
+ // ) {
+
+ // };
+
+ // Filter update
+ graphProto.update = function () {
+ var data = this.data;
+ var edgeData = this.edgeData;
+ var nodes = this.nodes;
+ var edges = this.edges;
+
+ for (var i = 0, len = nodes.length; i < len; i++) {
+ nodes[i].dataIndex = -1;
+ }
+ for (var i = 0, len = data.count(); i < len; i++) {
+ nodes[data.getRawIndex(i)].dataIndex = i;
+ }
+
+ edgeData.filterSelf(function (idx) {
+ var edge = edges[edgeData.getRawIndex(idx)];
+ return edge.node1.dataIndex >= 0 && edge.node2.dataIndex >= 0;
+ });
+
+ // Update edge
+ for (var i = 0, len = edges.length; i < len; i++) {
+ edges[i].dataIndex = -1;
+ }
+ for (var i = 0, len = edgeData.count(); i < len; i++) {
+ edges[edgeData.getRawIndex(i)].dataIndex = i;
+ }
+ };
+
+ /**
+ * Set edge data
+ * @param {module:echarts/data/List} edgeData
+ */
+ graphProto.setEdgeData = function (edgeData) {
+ this.edgeData = edgeData;
+ this._edgeDataSaved = edgeData.cloneShallow();
+ };
+
+ graphProto.restoreData = function () {
+ this.edgeData = this._edgeDataSaved.cloneShallow();
+ };
+
+ /**
+ * @return {module:echarts/data/Graph}
+ */
+ graphProto.clone = function () {
+ var graph = new Graph(this._directed);
+ var nodes = this.nodes;
+ var edges = this.edges;
+ for (var i = 0; i < nodes.length; i++) {
+ graph.addNode(nodes[i].id, nodes[i].dataIndex);
+ }
+ for (var i = 0; i < edges.length; i++) {
+ var e = edges[i];
+ graph.addEdge(e.node1.id, e.node2.id, e.dataIndex);
+ }
+ return graph;
+ };
+
+
+ /**
+ * @alias module:echarts/data/Graph.Node
+ */
+ function Node(id, dataIndex) {
+ /**
+ * @type {string}
+ */
+ this.id = id == null ? '' : id;
+
+ /**
+ * @type {Array.<module:echarts/data/Graph.Edge>}
+ */
+ this.inEdges = [];
+ /**
+ * @type {Array.<module:echarts/data/Graph.Edge>}
+ */
+ this.outEdges = [];
+ /**
+ * @type {Array.<module:echarts/data/Graph.Edge>}
+ */
+ this.edges = [];
+ /**
+ * @type {module:echarts/data/Graph}
+ */
+ this.hostGraph;
+
+ /**
+ * @type {number}
+ */
+ this.dataIndex = dataIndex == null ? -1 : dataIndex;
+ }
+
+ Node.prototype = {
+
+ constructor: Node,
+
+ /**
+ * @return {number}
+ */
+ degree: function () {
+ return this.edges.length;
+ },
+
+ /**
+ * @return {number}
+ */
+ inDegree: function () {
+ return this.inEdges.length;
+ },
+
+ /**
+ * @return {number}
+ */
+ outDegree: function () {
+ return this.outEdges.length;
+ },
+
+ /**
+ * @param {string} [path]
+ * @return {module:echarts/model/Model}
+ */
+ getModel: function (path) {
+ if (this.dataIndex < 0) {
+ return;
+ }
+ var graph = this.hostGraph;
+ var itemModel = graph.data.getItemModel(this.dataIndex);
+
+ return itemModel.getModel(path);
+ }
+ };
+
+ /**
+ * 图边
+ * @alias module:echarts/data/Graph.Edge
+ * @param {module:echarts/data/Graph.Node} n1
+ * @param {module:echarts/data/Graph.Node} n2
+ * @param {number} [dataIndex=-1]
+ */
+ function Edge(n1, n2, dataIndex) {
+
+ /**
+ * 节点1,如果是有å‘图则为æºèŠ‚点
+ * @type {module:echarts/data/Graph.Node}
+ */
+ this.node1 = n1;
+
+ /**
+ * 节点2,如果是有å‘图则为目标节点
+ * @type {module:echarts/data/Graph.Node}
+ */
+ this.node2 = n2;
+
+ this.dataIndex = dataIndex == null ? -1 : dataIndex;
+ }
+
+ /**
+ * @param {string} [path]
+ * @return {module:echarts/model/Model}
+ */
+ Edge.prototype.getModel = function (path) {
+ if (this.dataIndex < 0) {
+ return;
+ }
+ var graph = this.hostGraph;
+ var itemModel = graph.edgeData.getItemModel(this.dataIndex);
+
+ return itemModel.getModel(path);
+ };
+
+ var createGraphDataProxyMixin = function (hostName, dataName) {
+ return {
+ /**
+ * @param {string=} [dimension='value'] Default 'value'. can be 'a', 'b', 'c', 'd', 'e'.
+ * @return {number}
+ */
+ getValue: function (dimension) {
+ var data = this[hostName][dataName];
+ return data.get(data.getDimension(dimension || 'value'), this.dataIndex);
+ },
+
+ /**
+ * @param {Object|string} key
+ * @param {*} [value]
+ */
+ setVisual: function (key, value) {
+ this.dataIndex >= 0
+ && this[hostName][dataName].setItemVisual(this.dataIndex, key, value);
+ },
+
+ /**
+ * @param {string} key
+ * @return {boolean}
+ */
+ getVisual: function (key, ignoreParent) {
+ return this[hostName][dataName].getItemVisual(this.dataIndex, key, ignoreParent);
+ },
+
+ /**
+ * @param {Object} layout
+ * @return {boolean} [merge=false]
+ */
+ setLayout: function (layout, merge) {
+ this.dataIndex >= 0
+ && this[hostName][dataName].setItemLayout(this.dataIndex, layout, merge);
+ },
+
+ /**
+ * @return {Object}
+ */
+ getLayout: function () {
+ return this[hostName][dataName].getItemLayout(this.dataIndex);
+ },
+
+ /**
+ * @return {module:zrender/Element}
+ */
+ getGraphicEl: function () {
+ return this[hostName][dataName].getItemGraphicEl(this.dataIndex);
+ },
+
+ /**
+ * @return {number}
+ */
+ getRawIndex: function () {
+ return this[hostName][dataName].getRawIndex(this.dataIndex);
+ }
+ };
+ };
+
+ zrUtil.mixin(Node, createGraphDataProxyMixin('hostGraph', 'data'));
+ zrUtil.mixin(Edge, createGraphDataProxyMixin('hostGraph', 'edgeData'));
+
+ Graph.Node = Node;
+ Graph.Edge = Edge;
+
+ module.exports = Graph;
+
+
+/***/ },
+/* 193 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+
+ var SymbolDraw = __webpack_require__(98);
+ var LineDraw = __webpack_require__(194);
+ var RoamController = __webpack_require__(159);
+
+ var modelUtil = __webpack_require__(5);
+ var graphic = __webpack_require__(42);
+
+ __webpack_require__(1).extendChartView({
+
+ type: 'graph',
+
+ init: function (ecModel, api) {
+ var symbolDraw = new SymbolDraw();
+ var lineDraw = new LineDraw();
+ var group = this.group;
+
+ var controller = new RoamController(api.getZr(), group);
+
+ group.add(symbolDraw.group);
+ group.add(lineDraw.group);
+
+ this._symbolDraw = symbolDraw;
+ this._lineDraw = lineDraw;
+ this._controller = controller;
+
+ this._firstRender = true;
+ },
+
+ render: function (seriesModel, ecModel, api) {
+ var coordSys = seriesModel.coordinateSystem;
+ // Only support view and geo coordinate system
+ if (coordSys.type !== 'geo' && coordSys.type !== 'view') {
+ return;
+ }
+
+ var data = seriesModel.getData();
+ this._model = seriesModel;
+
+ var symbolDraw = this._symbolDraw;
+ var lineDraw = this._lineDraw;
+
+ symbolDraw.updateData(data);
+
+ var edgeData = data.graph.edgeData;
+ var rawOption = seriesModel.option;
+ var formatModel = modelUtil.createDataFormatModel(
+ seriesModel, edgeData, rawOption.edges || rawOption.links
+ );
+ formatModel.formatTooltip = function (dataIndex) {
+ var params = this.getDataParams(dataIndex);
+ var edge = data.graph.getEdgeByIndex(dataIndex);
+ var sourceName = data.getName(edge.node1.dataIndex);
+ var targetName = data.getName(edge.node2.dataIndex);
+ var html = sourceName + ' > ' + targetName;
+ if (params.value) {
+ html += ' : ' + params.value;
+ }
+ return html;
+ };
+
+ lineDraw.updateData(edgeData, null, null);
+ edgeData.eachItemGraphicEl(function (el) {
+ el.traverse(function (child) {
+ child.dataModel = formatModel;
+ });
+ });
+
+ // Save the original lineWidth
+ // data.graph.eachEdge(function (edge) {
+ // edge.__lineWidth = edge.getModel('lineStyle.normal').get('width');
+ // });
+
+ var group = this.group;
+ var groupNewProp = {
+ position: coordSys.position,
+ scale: coordSys.scale
+ };
+ if (this._firstRender) {
+ group.attr(groupNewProp);
+ }
+ else {
+ graphic.updateProps(group, groupNewProp, seriesModel);
+ }
+
+ this._nodeScaleRatio = seriesModel.get('nodeScaleRatio');
+ // this._edgeScaleRatio = seriesModel.get('edgeScaleRatio');
+
+ this._updateNodeAndLinkScale();
+
+ this._updateController(seriesModel, coordSys, api);
+
+ clearTimeout(this._layoutTimeout);
+ var forceLayout = seriesModel.forceLayout;
+ var layoutAnimation = seriesModel.get('force.layoutAnimation');
+ if (forceLayout) {
+ this._startForceLayoutIteration(forceLayout, layoutAnimation);
+ }
+ // Update draggable
+ data.eachItemGraphicEl(function (el, idx) {
+ var draggable = data.getItemModel(idx).get('draggable');
+ if (draggable && forceLayout) {
+ el.on('drag', function () {
+ forceLayout.warmUp();
+ !this._layouting
+ && this._startForceLayoutIteration(forceLayout, layoutAnimation);
+ forceLayout.setFixed(idx);
+ // Write position back to layout
+ data.setItemLayout(idx, el.position);
+ }, this).on('dragend', function () {
+ forceLayout.setUnfixed(idx);
+ }, this);
+ }
+ else {
+ el.off('drag');
+ }
+ el.setDraggable(draggable);
+ }, this);
+
+ this._firstRender = false;
+ },
+
+ _startForceLayoutIteration: function (forceLayout, layoutAnimation) {
+ var self = this;
+ (function step() {
+ forceLayout.step(function (stopped) {
+ self.updateLayout();
+ (self._layouting = !stopped) && (
+ layoutAnimation
+ ? (self._layoutTimeout = setTimeout(step, 16))
+ : step()
+ );
+ });
+ })();
+ },
+
+ _updateController: function (seriesModel, coordSys, api) {
+ var controller = this._controller;
+ controller.rect = coordSys.getViewRect();
+
+ controller.enable(seriesModel.get('roam'));
+
+ controller
+ .off('pan')
+ .off('zoom')
+ .on('pan', function (dx, dy) {
+ api.dispatchAction({
+ seriesId: seriesModel.id,
+ type: 'graphRoam',
+ dx: dx,
+ dy: dy
+ });
+ })
+ .on('zoom', function (zoom, mouseX, mouseY) {
+ api.dispatchAction({
+ seriesId: seriesModel.id,
+ type: 'graphRoam',
+ zoom: zoom,
+ originX: mouseX,
+ originY: mouseY
+ });
+ })
+ .on('zoom', this._updateNodeAndLinkScale, this);
+ },
+
+ _updateNodeAndLinkScale: function () {
+ var seriesModel = this._model;
+ var data = seriesModel.getData();
+
+ var group = this.group;
+ var nodeScaleRatio = this._nodeScaleRatio;
+ // var edgeScaleRatio = this._edgeScaleRatio;
+
+ // Assume scale aspect is 1
+ var groupScale = group.scale[0];
+
+ var nodeScale = (groupScale - 1) * nodeScaleRatio + 1;
+ // var edgeScale = (groupScale - 1) * edgeScaleRatio + 1;
+ var invScale = [
+ nodeScale / groupScale,
+ nodeScale / groupScale
+ ];
+
+ data.eachItemGraphicEl(function (el, idx) {
+ el.attr('scale', invScale);
+ });
+ // data.graph.eachEdge(function (edge) {
+ // var lineGroup = edge.getGraphicEl();
+ // // FIXME
+ // lineGroup.childOfName('line').setStyle(
+ // 'lineWidth',
+ // edge.__lineWidth * edgeScale / groupScale
+ // );
+ // });
+ },
+
+ updateLayout: function (seriesModel, ecModel) {
+ this._symbolDraw.updateLayout();
+ this._lineDraw.updateLayout();
+ },
+
+ remove: function (ecModel, api) {
+ this._symbolDraw && this._symbolDraw.remove();
+ this._lineDraw && this._lineDraw.remove();
+ }
+ });
+
+
+/***/ },
+/* 194 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @module echarts/chart/helper/LineDraw
+ */
+
+
+ var graphic = __webpack_require__(42);
+ var LineGroup = __webpack_require__(195);
+
+ /**
+ * @alias module:echarts/component/marker/LineDraw
+ * @constructor
+ */
+ function LineDraw(ctor) {
+ this._ctor = ctor || LineGroup;
+ this.group = new graphic.Group();
+ }
+
+ var lineDrawProto = LineDraw.prototype;
+
+ /**
+ * @param {module:echarts/data/List} lineData
+ * @param {module:echarts/data/List} [fromData]
+ * @param {module:echarts/data/List} [toData]
+ */
+ lineDrawProto.updateData = function (lineData, fromData, toData) {
+
+ var oldLineData = this._lineData;
+ var group = this.group;
+ var LineCtor = this._ctor;
+
+ lineData.diff(oldLineData)
+ .add(function (idx) {
+ var lineGroup = new LineCtor(lineData, fromData, toData, idx);
+
+ lineData.setItemGraphicEl(idx, lineGroup);
+
+ group.add(lineGroup);
+ })
+ .update(function (newIdx, oldIdx) {
+ var lineGroup = oldLineData.getItemGraphicEl(oldIdx);
+ lineGroup.updateData(lineData, fromData, toData, newIdx);
+
+ lineData.setItemGraphicEl(newIdx, lineGroup);
+
+ group.add(lineGroup);
+ })
+ .remove(function (idx) {
+ group.remove(oldLineData.getItemGraphicEl(idx));
+ })
+ .execute();
+
+ this._lineData = lineData;
+ this._fromData = fromData;
+ this._toData = toData;
+ };
+
+ lineDrawProto.updateLayout = function () {
+ var lineData = this._lineData;
+ lineData.eachItemGraphicEl(function (el, idx) {
+ el.updateLayout(lineData, this._fromData, this._toData, idx);
+ }, this);
+ };
+
+ lineDrawProto.remove = function () {
+ this.group.removeAll();
+ };
+
+ module.exports = LineDraw;
+
+
+/***/ },
+/* 195 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @module echarts/chart/helper/Line
+ */
+
+
+ var symbolUtil = __webpack_require__(100);
+ var vector = __webpack_require__(16);
+ var LinePath = __webpack_require__(196);
+ var graphic = __webpack_require__(42);
+ var zrUtil = __webpack_require__(3);
+ var numberUtil = __webpack_require__(7);
+
+ /**
+ * @inner
+ */
+ function createSymbol(name, data, idx) {
+ var color = data.getItemVisual(idx, 'color');
+ var symbolType = data.getItemVisual(idx, 'symbol');
+ var symbolSize = data.getItemVisual(idx, 'symbolSize');
+
+ if (symbolType === 'none') {
+ return;
+ }
+
+ if (!zrUtil.isArray(symbolSize)) {
+ symbolSize = [symbolSize, symbolSize];
+ }
+ var symbolPath = symbolUtil.createSymbol(
+ symbolType, -symbolSize[0] / 2, -symbolSize[1] / 2,
+ symbolSize[0], symbolSize[1], color
+ );
+ symbolPath.name = name;
+
+ return symbolPath;
+ }
+
+ function createLine(points) {
+ var line = new LinePath({
+ name: 'line',
+ style: {
+ strokeNoScale: true
+ }
+ });
+ setLinePoints(line.shape, points);
+ return line;
+ }
+
+ function setLinePoints(targetShape, points) {
+ var p1 = points[0];
+ var p2 = points[1];
+ var cp1 = points[2];
+ targetShape.x1 = p1[0];
+ targetShape.y1 = p1[1];
+ targetShape.x2 = p2[0];
+ targetShape.y2 = p2[1];
+ targetShape.percent = 1;
+
+ if (cp1) {
+ targetShape.cpx1 = cp1[0];
+ targetShape.cpy1 = cp1[1];
+ }
+ }
+
+ function isSymbolArrow(symbol) {
+ return symbol.type === 'symbol' && symbol.shape.symbolType === 'arrow';
+ }
+
+ function updateSymbolBeforeLineUpdate () {
+ var lineGroup = this;
+ var line = lineGroup.childOfName('line');
+ // If line not changed
+ if (!this.__dirty && !line.__dirty) {
+ return;
+ }
+ var symbolFrom = lineGroup.childOfName('fromSymbol');
+ var symbolTo = lineGroup.childOfName('toSymbol');
+ var label = lineGroup.childOfName('label');
+ var fromPos = line.pointAt(0);
+ var toPos = line.pointAt(line.shape.percent);
+
+ var d = vector.sub([], toPos, fromPos);
+ vector.normalize(d, d);
+
+ if (symbolFrom) {
+ symbolFrom.attr('position', fromPos);
+ // Rotate the arrow
+ // FIXME Hard coded ?
+ if (isSymbolArrow(symbolFrom)) {
+ symbolFrom.attr('rotation', tangentRotation(toPos, fromPos));
+ }
+ }
+ if (symbolTo) {
+ symbolTo.attr('position', toPos);
+ if (isSymbolArrow(symbolTo)) {
+ symbolTo.attr('rotation', tangentRotation(fromPos, toPos));
+ }
+ }
+
+ label.attr('position', toPos);
+
+ var textPosition;
+ var textAlign;
+ var textVerticalAlign;
+ // End
+ if (label.__position === 'end') {
+ textPosition = [d[0] * 5 + toPos[0], d[1] * 5 + toPos[1]];
+ textAlign = d[0] > 0.8 ? 'left' : (d[0] < -0.8 ? 'right' : 'center');
+ textVerticalAlign = d[1] > 0.8 ? 'top' : (d[1] < -0.8 ? 'bottom' : 'middle');
+ }
+ // Start
+ else {
+ textPosition = [-d[0] * 5 + fromPos[0], -d[1] * 5 + fromPos[1]];
+ textAlign = d[0] > 0.8 ? 'right' : (d[0] < -0.8 ? 'left' : 'center');
+ textVerticalAlign = d[1] > 0.8 ? 'bottom' : (d[1] < -0.8 ? 'top' : 'middle');
+ }
+ label.attr({
+ style: {
+ // Use the user specified text align and baseline first
+ textVerticalAlign: label.__verticalAlign || textVerticalAlign,
+ textAlign: label.__textAlign || textAlign
+ },
+ position: textPosition
+ });
+ }
+
+ function tangentRotation(p1, p2) {
+ return -Math.PI / 2 - Math.atan2(
+ p2[1] - p1[1], p2[0] - p1[0]
+ );
+ }
+
+ /**
+ * @constructor
+ * @extends {module:zrender/graphic/Group}
+ * @alias {module:echarts/chart/helper/Line}
+ */
+ function Line(lineData, fromData, toData, idx) {
+ graphic.Group.call(this);
+
+ this._createLine(lineData, fromData, toData, idx);
+ }
+
+ var lineProto = Line.prototype;
+
+ // Update symbol position and rotation
+ lineProto.beforeUpdate = updateSymbolBeforeLineUpdate;
+
+ lineProto._createLine = function (lineData, fromData, toData, idx) {
+ var seriesModel = lineData.hostModel;
+ var linePoints = lineData.getItemLayout(idx);
+
+ var line = createLine(linePoints);
+ line.shape.percent = 0;
+ graphic.initProps(line, {
+ shape: {
+ percent: 1
+ }
+ }, seriesModel);
+
+ this.add(line);
+
+ var label = new graphic.Text({
+ name: 'label'
+ });
+ this.add(label);
+
+ if (fromData) {
+ var symbolFrom = createSymbol('fromSymbol', fromData, idx);
+ // symbols must added after line to make sure
+ // it will be updated after line#update.
+ // Or symbol position and rotation update in line#beforeUpdate will be one frame slow
+ this.add(symbolFrom);
+
+ this._fromSymbolType = fromData.getItemVisual(idx, 'symbol');
+ }
+ if (toData) {
+ var symbolTo = createSymbol('toSymbol', toData, idx);
+ this.add(symbolTo);
+
+ this._toSymbolType = toData.getItemVisual(idx, 'symbol');
+ }
+
+ this._updateCommonStl(lineData, fromData, toData, idx);
+ };
+
+ lineProto.updateData = function (lineData, fromData, toData, idx) {
+ var seriesModel = lineData.hostModel;
+
+ var line = this.childOfName('line');
+ var linePoints = lineData.getItemLayout(idx);
+ var target = {
+ shape: {}
+ };
+ setLinePoints(target.shape, linePoints);
+ graphic.updateProps(line, target, seriesModel);
+
+ // Symbol changed
+ if (fromData) {
+ var fromSymbolType = fromData.getItemVisual(idx, 'symbol');
+ if (this._fromSymbolType !== fromSymbolType) {
+ var symbolFrom = createSymbol('fromSymbol', fromData, idx);
+ this.remove(this.childOfName('fromSymbol'));
+ this.add(symbolFrom);
+ }
+ this._fromSymbolType = fromSymbolType;
+ }
+ if (toData) {
+ var toSymbolType = toData.getItemVisual(idx, 'symbol');
+ // Symbol changed
+ if (toSymbolType !== this._toSymbolType) {
+ var symbolTo = createSymbol('toSymbol', toData, idx);
+ this.remove(this.childOfName('toSymbol'));
+ this.add(symbolTo);
+ }
+ this._toSymbolType = toSymbolType;
+ }
+
+ this._updateCommonStl(lineData, fromData, toData, idx);
+ };
+
+ lineProto._updateCommonStl = function (lineData, fromData, toData, idx) {
+ var seriesModel = lineData.hostModel;
+
+ var line = this.childOfName('line');
+ var itemModel = lineData.getItemModel(idx);
+
+ var labelModel = itemModel.getModel('label.normal');
+ var textStyleModel = labelModel.getModel('textStyle');
+ var labelHoverModel = itemModel.getModel('label.emphasis');
+ var textStyleHoverModel = labelHoverModel.getModel('textStyle');
+
+ var defaultText = numberUtil.round(seriesModel.getRawValue(idx));
+ if (isNaN(defaultText)) {
+ // Use name
+ defaultText = lineData.getName(idx);
+ }
+ line.setStyle(zrUtil.extend(
+ {
+ stroke: lineData.getItemVisual(idx, 'color')
+ },
+ itemModel.getModel('lineStyle.normal').getLineStyle()
+ ));
+
+ var label = this.childOfName('label');
+ label.setStyle({
+ text: labelModel.get('show')
+ ? zrUtil.retrieve(
+ seriesModel.getFormattedLabel(idx, 'normal'),
+ defaultText
+ )
+ : '',
+ textFont: textStyleModel.getFont(),
+ fill: textStyleModel.getTextColor() || lineData.getItemVisual(idx, 'color')
+ });
+ label.hoverStyle = {
+ text: labelHoverModel.get('show')
+ ? zrUtil.retrieve(
+ seriesModel.getFormattedLabel(idx, 'emphasis'),
+ defaultText
+ )
+ : '',
+ textFont: textStyleHoverModel.getFont(),
+ fill: textStyleHoverModel.getTextColor()
+ };
+ label.__textAlign = textStyleModel.get('align');
+ label.__verticalAlign = textStyleModel.get('baseline');
+ label.__position = labelModel.get('position');
+
+ graphic.setHoverStyle(
+ this, itemModel.getModel('lineStyle.emphasis').getLineStyle()
+ );
+ };
+
+ lineProto.updateLayout = function (lineData, fromData, toData, idx) {
+ var points = lineData.getItemLayout(idx);
+ var linePath = this.childOfName('line');
+ setLinePoints(linePath.shape, points);
+ linePath.dirty(true);
+ // var fromEl = fromData && fromData.getItemGraphicEl(idx);
+ // var toEl = toData && toData.getItemGraphicEl(idx);
+ // fromEl && fromEl.attr('position', points[0]);
+ // toEl && toEl.attr('position', points[1]);
+ };
+
+ zrUtil.inherits(Line, graphic.Group);
+
+ module.exports = Line;
+
+
+/***/ },
+/* 196 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Line path for bezier and straight line draw
+ */
+
+ var graphic = __webpack_require__(42);
+
+ var straightLineProto = graphic.Line.prototype;
+ var bezierCurveProto = graphic.BezierCurve.prototype;
+
+ module.exports = graphic.extendShape({
+
+ type: 'ec-line',
+
+ style: {
+ stroke: '#000',
+ fill: null
+ },
+
+ shape: {
+ x1: 0,
+ y1: 0,
+ x2: 0,
+ y2: 0,
+ percent: 1,
+ cpx1: null,
+ cpy1: null
+ },
+
+ buildPath: function (ctx, shape) {
+ (shape.cpx1 == null || shape.cpy1 == null
+ ? straightLineProto : bezierCurveProto).buildPath(ctx, shape);
+ },
+
+ pointAt: function (t) {
+ var shape = this.shape;
+ return shape.cpx1 == null || shape.cpy1 == null
+ ? straightLineProto.pointAt.call(this, t)
+ : bezierCurveProto.pointAt.call(this, t);
+ }
+ });
+
+
+/***/ },
+/* 197 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var echarts = __webpack_require__(1);
+ var roamHelper = __webpack_require__(162);
+
+ var actionInfo = {
+ type: 'graphRoam',
+ event: 'graphRoam',
+ update: 'none'
+ };
+
+ /**
+ * @payload
+ * @property {string} name Series name
+ * @property {number} [dx]
+ * @property {number} [dy]
+ * @property {number} [zoom]
+ * @property {number} [originX]
+ * @property {number} [originY]
+ */
+
+ echarts.registerAction(actionInfo, function (payload, ecModel) {
+ ecModel.eachComponent({mainType: 'series', query: payload}, function (seriesModel) {
+ var coordSys = seriesModel.coordinateSystem;
+
+ var roamDetailModel = seriesModel.getModel('roamDetail');
+ var res = roamHelper.calcPanAndZoom(roamDetailModel, payload);
+
+ seriesModel.setRoamPan
+ && seriesModel.setRoamPan(res.x, res.y);
+
+ seriesModel.setRoamZoom
+ && seriesModel.setRoamZoom(res.zoom);
+
+ coordSys && coordSys.setPan(res.x, res.y);
+ coordSys && coordSys.setZoom(res.zoom);
+ });
+ });
+
+
+/***/ },
+/* 198 */
+/***/ function(module, exports) {
+
+
+
+ module.exports = function (ecModel) {
+ var legendModels = ecModel.findComponents({
+ mainType: 'legend'
+ });
+ if (!legendModels || !legendModels.length) {
+ return;
+ }
+ ecModel.eachSeriesByType('graph', function (graphSeries) {
+ var categoriesData = graphSeries.getCategoriesData();
+ var graph = graphSeries.getGraph();
+ var data = graph.data;
+
+ var categoryNames = categoriesData.mapArray(categoriesData.getName);
+
+ data.filterSelf(function (idx) {
+ var model = data.getItemModel(idx);
+ var category = model.getShallow('category');
+ if (category != null) {
+ if (typeof category === 'number') {
+ category = categoryNames[category];
+ }
+ // If in any legend component the status is not selected.
+ for (var i = 0; i < legendModels.length; i++) {
+ if (!legendModels[i].isSelected(category)) {
+ return false;
+ }
+ }
+ }
+ return true;
+ });
+ }, this);
+ };
+
+
+/***/ },
+/* 199 */
+/***/ function(module, exports) {
+
+
+
+ module.exports = function (ecModel) {
+ ecModel.eachSeriesByType('graph', function (seriesModel) {
+ var colorList = seriesModel.get('color');
+ var categoriesData = seriesModel.getCategoriesData();
+ var data = seriesModel.getData();
+
+ var categoryNameIdxMap = {};
+
+ categoriesData.each(function (idx) {
+ categoryNameIdxMap[categoriesData.getName(idx)] = idx;
+
+ var itemModel = categoriesData.getItemModel(idx);
+ var rawIdx = categoriesData.getRawIndex(idx);
+ var color = itemModel.get('itemStyle.normal.color')
+ || colorList[rawIdx % colorList.length];
+ categoriesData.setItemVisual(idx, 'color', color);
+ });
+
+ // Assign category color to visual
+ if (categoriesData.count()) {
+ data.each(function (idx) {
+ var model = data.getItemModel(idx);
+ var category = model.getShallow('category');
+ if (category != null) {
+ if (typeof category === 'string') {
+ category = categoryNameIdxMap[category];
+ }
+ data.setItemVisual(
+ idx, 'color',
+ categoriesData.getItemVisual(category, 'color')
+ );
+ }
+ });
+ }
+ });
+ };
+
+
+/***/ },
+/* 200 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var simpleLayoutHelper = __webpack_require__(201);
+ module.exports = function (ecModel, api) {
+ ecModel.eachSeriesByType('graph', function (seriesModel) {
+ var layout = seriesModel.get('layout');
+ if (!layout || layout === 'none') {
+ simpleLayoutHelper(seriesModel);
+ }
+ });
+ };
+
+
+/***/ },
+/* 201 */
+/***/ function(module, exports) {
+
+
+ module.exports = function (seriesModel) {
+ var coordSys = seriesModel.coordinateSystem;
+ if (coordSys && coordSys.type !== 'view') {
+ return;
+ }
+ var graph = seriesModel.getGraph();
+
+ graph.eachNode(function (node) {
+ var model = node.getModel();
+ node.setLayout([+model.get('x'), +model.get('y')]);
+ });
+
+ graph.eachEdge(function (edge) {
+ var curveness = edge.getModel().get('lineStyle.normal.curveness') || 0;
+ var p1 = edge.node1.getLayout();
+ var p2 = edge.node2.getLayout();
+ var cp1;
+ if (curveness > 0) {
+ cp1 = [
+ (p1[0] + p2[0]) / 2 - (p1[1] - p2[1]) * curveness,
+ (p1[1] + p2[1]) / 2 - (p2[0] - p1[0]) * curveness
+ ];
+ }
+ edge.setLayout([p1, p2, cp1]);
+ });
+ };
+
+
+/***/ },
+/* 202 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+ var circularLayoutHelper = __webpack_require__(203);
+ module.exports = function (ecModel, api) {
+ ecModel.eachSeriesByType('graph', function (seriesModel) {
+ if (seriesModel.get('layout') === 'circular') {
+ circularLayoutHelper(seriesModel);
+ }
+ });
+ };
+
+
+/***/ },
+/* 203 */
+/***/ function(module, exports) {
+
+
+ module.exports = function (seriesModel) {
+ var coordSys = seriesModel.coordinateSystem;
+ if (coordSys && coordSys.type !== 'view') {
+ return;
+ }
+
+ var rect = coordSys.getBoundingRect();
+
+ var nodeData = seriesModel.getData();
+ var graph = nodeData.graph;
+
+ var angle = 0;
+ var sum = nodeData.getSum('value');
+ var unitAngle = Math.PI * 2 / (sum || nodeData.count());
+
+ var cx = rect.width / 2 + rect.x;
+ var cy = rect.height / 2 + rect.y;
+
+ var r = Math.min(rect.width, rect.height) / 2;
+
+ graph.eachNode(function (node) {
+ var value = node.getValue('value');
+
+ angle += unitAngle * (sum ? value : 2) / 2;
+
+ node.setLayout([
+ r * Math.cos(angle) + cx,
+ r * Math.sin(angle) + cy
+ ]);
+
+ angle += unitAngle * (sum ? value : 2) / 2;
+ });
+
+ graph.eachEdge(function (edge) {
+ var curveness = edge.getModel().get('lineStyle.normal.curveness') || 0;
+ var p1 = edge.node1.getLayout();
+ var p2 = edge.node2.getLayout();
+ var cp1;
+ if (curveness > 0) {
+ cp1 = [cx, cy];
+ }
+ edge.setLayout([p1, p2, cp1]);
+ });
+ };
+
+
+/***/ },
+/* 204 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var forceHelper = __webpack_require__(205);
+ var numberUtil = __webpack_require__(7);
+ var simpleLayoutHelper = __webpack_require__(201);
+ var circularLayoutHelper = __webpack_require__(203);
+ var vec2 = __webpack_require__(16);
+
+ module.exports = function (ecModel, api) {
+ ecModel.eachSeriesByType('graph', function (graphSeries) {
+ if (graphSeries.get('layout') === 'force') {
+ var preservedPoints = graphSeries.preservedPoints || {};
+ var graph = graphSeries.getGraph();
+ var nodeData = graph.data;
+ var edgeData = graph.edgeData;
+ var forceModel = graphSeries.getModel('force');
+ var initLayout = forceModel.get('initLayout');
+ if (graphSeries.preservedPoints) {
+ nodeData.each(function (idx) {
+ var id = nodeData.getId(idx);
+ nodeData.setItemLayout(idx, preservedPoints[id] || [NaN, NaN]);
+ });
+ }
+ else if (!initLayout || initLayout === 'none') {
+ simpleLayoutHelper(graphSeries);
+ }
+ else if (initLayout === 'circular') {
+ circularLayoutHelper(graphSeries);
+ }
+
+ var nodeDataExtent = nodeData.getDataExtent('value');
+ // var edgeDataExtent = edgeData.getDataExtent('value');
+ var repulsion = forceModel.get('repulsion');
+ var edgeLength = forceModel.get('edgeLength');
+ var nodes = nodeData.mapArray('value', function (value, idx) {
+ var point = nodeData.getItemLayout(idx);
+ // var w = numberUtil.linearMap(value, nodeDataExtent, [0, 50]);
+ var rep = numberUtil.linearMap(value, nodeDataExtent, [0, repulsion]) || (repulsion / 2);
+ return {
+ w: rep,
+ rep: rep,
+ p: (!point || isNaN(point[0]) || isNaN(point[1])) ? null : point
+ };
+ });
+ var edges = edgeData.mapArray('value', function (value, idx) {
+ var edge = graph.getEdgeByIndex(idx);
+ // var w = numberUtil.linearMap(value, edgeDataExtent, [0, 100]);
+ return {
+ n1: nodes[edge.node1.dataIndex],
+ n2: nodes[edge.node2.dataIndex],
+ d: edgeLength,
+ curveness: edge.getModel().get('lineStyle.normal.curveness') || 0
+ };
+ });
+
+ var coordSys = graphSeries.coordinateSystem;
+ var rect = coordSys.getBoundingRect();
+ var forceInstance = forceHelper(nodes, edges, {
+ rect: rect,
+ gravity: forceModel.get('gravity')
+ });
+ var oldStep = forceInstance.step;
+ forceInstance.step = function (cb) {
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ if (nodes[i].fixed) {
+ // Write back to layout instance
+ vec2.copy(nodes[i].p, graph.getNodeByIndex(i).getLayout());
+ }
+ }
+ oldStep(function (nodes, edges, stopped) {
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ if (!nodes[i].fixed) {
+ graph.getNodeByIndex(i).setLayout(nodes[i].p);
+ }
+ preservedPoints[nodeData.getId(i)] = nodes[i].p;
+ }
+ for (var i = 0, l = edges.length; i < l; i++) {
+ var e = edges[i];
+ var p1 = e.n1.p;
+ var p2 = e.n2.p;
+ var points = [p1, p2];
+ if (e.curveness > 0) {
+ points.push([
+ (p1[0] + p2[0]) / 2 - (p1[1] - p2[1]) * e.curveness,
+ (p1[1] + p2[1]) / 2 - (p2[0] - p1[0]) * e.curveness
+ ]);
+ }
+ graph.getEdgeByIndex(i).setLayout(points);
+ }
+ // Update layout
+
+ cb && cb(stopped);
+ });
+ };
+ graphSeries.forceLayout = forceInstance;
+ graphSeries.preservedPoints = preservedPoints;
+
+ // Step to get the layout
+ forceInstance.step();
+ }
+ else {
+ // Remove prev injected forceLayout instance
+ graphSeries.forceLayout = null;
+ }
+ });
+ };
+
+
+/***/ },
+/* 205 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var vec2 = __webpack_require__(16);
+ var scaleAndAdd = vec2.scaleAndAdd;
+
+ // function adjacentNode(n, e) {
+ // return e.n1 === n ? e.n2 : e.n1;
+ // }
+
+ module.exports = function (nodes, edges, opts) {
+ var rect = opts.rect;
+ var width = rect.width;
+ var height = rect.height;
+ var center = [rect.x + width / 2, rect.y + height / 2];
+ // var scale = opts.scale || 1;
+ var gravity = opts.gravity == null ? 0.1 : opts.gravity;
+
+ // for (var i = 0; i < edges.length; i++) {
+ // var e = edges[i];
+ // var n1 = e.n1;
+ // var n2 = e.n2;
+ // n1.edges = n1.edges || [];
+ // n2.edges = n2.edges || [];
+ // n1.edges.push(e);
+ // n2.edges.push(e);
+ // }
+ // Init position
+ for (var i = 0; i < nodes.length; i++) {
+ var n = nodes[i];
+ if (!n.p) {
+ // Use the position from first adjecent node with defined position
+ // Or use a random position
+ // From d3
+ // if (n.edges) {
+ // var j = -1;
+ // while (++j < n.edges.length) {
+ // var e = n.edges[j];
+ // var other = adjacentNode(n, e);
+ // if (other.p) {
+ // n.p = vec2.clone(other.p);
+ // break;
+ // }
+ // }
+ // }
+ // if (!n.p) {
+ n.p = vec2.create(
+ width * (Math.random() - 0.5) + center[0],
+ height * (Math.random() - 0.5) + center[1]
+ );
+ // }
+ }
+ n.pp = vec2.clone(n.p);
+ n.edges = null;
+ }
+
+ // Formula in 'Graph Drawing by Force-directed Placement'
+ // var k = scale * Math.sqrt(width * height / nodes.length);
+ // var k2 = k * k;
+
+ var friction = 0.6;
+
+ return {
+ warmUp: function () {
+ friction = 0.5;
+ },
+
+ setFixed: function (idx) {
+ nodes[idx].fixed = true;
+ },
+
+ setUnfixed: function (idx) {
+ nodes[idx].fixed = false;
+ },
+
+ step: function (cb) {
+ var v12 = [];
+ var nLen = nodes.length;
+ for (var i = 0; i < edges.length; i++) {
+ var e = edges[i];
+ var n1 = e.n1;
+ var n2 = e.n2;
+
+ vec2.sub(v12, n2.p, n1.p);
+ var d = vec2.len(v12) - e.d;
+ var w = n2.w / (n1.w + n2.w);
+ vec2.normalize(v12, v12);
+
+ !n1.fixed && scaleAndAdd(n1.p, n1.p, v12, w * d * friction);
+ !n2.fixed && scaleAndAdd(n2.p, n2.p, v12, -(1 - w) * d * friction);
+ }
+ // Gravity
+ for (var i = 0; i < nLen; i++) {
+ var n = nodes[i];
+ if (!n.fixed) {
+ vec2.sub(v12, center, n.p);
+ // var d = vec2.len(v12);
+ // vec2.scale(v12, v12, 1 / d);
+ // var gravityFactor = gravity;
+ vec2.scaleAndAdd(n.p, n.p, v12, gravity * friction);
+ }
+ }
+
+ // Repulsive
+ // PENDING
+ for (var i = 0; i < nLen; i++) {
+ var n1 = nodes[i];
+ for (var j = i + 1; j < nLen; j++) {
+ var n2 = nodes[j];
+ vec2.sub(v12, n2.p, n1.p);
+ var d = vec2.len(v12);
+ if (d === 0) {
+ // Random repulse
+ vec2.set(v12, Math.random() - 0.5, Math.random() - 0.5);
+ d = 1;
+ }
+ var repFact = (n1.rep + n2.rep) / d / d;
+ !n1.fixed && scaleAndAdd(n1.pp, n1.pp, v12, repFact);
+ !n2.fixed && scaleAndAdd(n2.pp, n2.pp, v12, -repFact);
+ }
+ }
+ var v = [];
+ for (var i = 0; i < nLen; i++) {
+ var n = nodes[i];
+ if (!n.fixed) {
+ vec2.sub(v, n.p, n.pp);
+ vec2.scaleAndAdd(n.p, n.p, v, friction);
+ vec2.copy(n.pp, n.p);
+ }
+ }
+
+ friction = friction * 0.992;
+
+ cb && cb(nodes, edges, friction < 0.01);
+ }
+ };
+ };
+
+
+/***/ },
+/* 206 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+ // FIXME Where to create the simple view coordinate system
+ var View = __webpack_require__(169);
+ var layout = __webpack_require__(21);
+ var bbox = __webpack_require__(50);
+
+ function getViewRect(seriesModel, api, aspect) {
+ var option = seriesModel.getBoxLayoutParams();
+ option.aspect = aspect;
+ return layout.getLayoutRect(option, {
+ width: api.getWidth(),
+ height: api.getHeight()
+ });
+ }
+
+ module.exports = function (ecModel, api) {
+ var viewList = [];
+ ecModel.eachSeriesByType('graph', function (seriesModel) {
+ var coordSysType = seriesModel.get('coordinateSystem');
+ if (!coordSysType || coordSysType === 'view') {
+ var viewCoordSys = new View();
+ viewList.push(viewCoordSys);
+
+ var data = seriesModel.getData();
+ var positions = data.mapArray(function (idx) {
+ var itemModel = data.getItemModel(idx);
+ return [+itemModel.get('x'), +itemModel.get('y')];
+ });
+
+ var min = [];
+ var max = [];
+
+ bbox.fromPoints(positions, min, max);
+
+ // FIXME If get view rect after data processed?
+ var viewRect = getViewRect(
+ seriesModel, api, (max[0] - min[0]) / (max[1] - min[1]) || 1
+ );
+ // Position may be NaN, use view rect instead
+ if (isNaN(min[0]) || isNaN(min[1])) {
+ min = [viewRect.x, viewRect.y];
+ max = [viewRect.x + viewRect.width, viewRect.y + viewRect.height];
+ }
+
+ var bbWidth = max[0] - min[0];
+ var bbHeight = max[1] - min[1];
+
+ var viewWidth = viewRect.width;
+ var viewHeight = viewRect.height;
+
+ viewCoordSys = seriesModel.coordinateSystem = new View();
+
+ viewCoordSys.setBoundingRect(
+ min[0], min[1], bbWidth, bbHeight
+ );
+ viewCoordSys.setViewRect(
+ viewRect.x, viewRect.y, viewWidth, viewHeight
+ );
+
+ // Update roam info
+ var roamDetailModel = seriesModel.getModel('roamDetail');
+ viewCoordSys.setPan(roamDetailModel.get('x') || 0, roamDetailModel.get('y') || 0);
+ viewCoordSys.setZoom(roamDetailModel.get('zoom') || 1);
+ }
+ });
+ return viewList;
+ };
+
+
+/***/ },
+/* 207 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+ __webpack_require__(208);
+ __webpack_require__(209);
+
+
+/***/ },
+/* 208 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var List = __webpack_require__(94);
+ var SeriesModel = __webpack_require__(27);
+ var zrUtil = __webpack_require__(3);
+
+ var GaugeSeries = SeriesModel.extend({
+
+ type: 'series.gauge',
+
+ getInitialData: function (option, ecModel) {
+ var list = new List(['value'], this);
+ var dataOpt = option.data || [];
+ if (!zrUtil.isArray(dataOpt)) {
+ dataOpt = [dataOpt];
+ }
+ // Only use the first data item
+ list.initData(dataOpt);
+ return list;
+ },
+
+ defaultOption: {
+ zlevel: 0,
+ z: 2,
+ // 默认全局居中
+ center: ['50%', '50%'],
+ legendHoverLink: true,
+ radius: '75%',
+ startAngle: 225,
+ endAngle: -45,
+ clockwise: true,
+ // 最å°å€¼
+ min: 0,
+ // 最大值
+ max: 100,
+ // 分割段数,默认为10
+ splitNumber: 10,
+ // å标轴线
+ axisLine: {
+ // 默认显示,属性show控制显示与å¦
+ show: true,
+ lineStyle: { // 属性lineStyle控制线æ¡æ ·å¼
+ color: [[0.2, '#91c7ae'], [0.8, '#63869e'], [1, '#c23531']],
+ width: 30
+ }
+ },
+ // 分隔线
+ splitLine: {
+ // 默认显示,属性show控制显示与å¦
+ show: true,
+ // 属性length控制线长
+ length: 30,
+ // 属性lineStyle(详è§lineStyle)控制线æ¡æ ·å¼
+ lineStyle: {
+ color: '#eee',
+ width: 2,
+ type: 'solid'
+ }
+ },
+ // å标轴å°æ ‡è®°
+ axisTick: {
+ // 属性show控制显示与å¦ï¼Œé»˜è®¤ä¸æ˜¾ç¤º
+ show: true,
+ // æ¯ä»½split细分多少段
+ splitNumber: 5,
+ // 属性length控制线长
+ length: 8,
+ // 属性lineStyle控制线æ¡æ ·å¼
+ lineStyle: {
+ color: '#eee',
+ width: 1,
+ type: 'solid'
+ }
+ },
+ axisLabel: {
+ show: true,
+ // formatter: null,
+ textStyle: { // 其余属性默认使用全局文本样å¼ï¼Œè¯¦è§TEXTSTYLE
+ color: 'auto'
+ }
+ },
+ pointer: {
+ show: true,
+ length: '80%',
+ width: 8
+ },
+ itemStyle: {
+ normal: {
+ color: 'auto'
+ }
+ },
+ title: {
+ show: true,
+ // x, y,å•ä½px
+ offsetCenter: [0, '-40%'],
+ // 其余属性默认使用全局文本样å¼ï¼Œè¯¦è§TEXTSTYLE
+ textStyle: {
+ color: '#333',
+ fontSize: 15
+ }
+ },
+ detail: {
+ show: true,
+ backgroundColor: 'rgba(0,0,0,0)',
+ borderWidth: 0,
+ borderColor: '#ccc',
+ width: 100,
+ height: 40,
+ // x, y,å•ä½px
+ offsetCenter: [0, '40%'],
+ // formatter: null,
+ // 其余属性默认使用全局文本样å¼ï¼Œè¯¦è§TEXTSTYLE
+ textStyle: {
+ color: 'auto',
+ fontSize: 30
+ }
+ }
+ }
+ });
+
+ module.exports = GaugeSeries;
+
+
+/***/ },
+/* 209 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var PointerPath = __webpack_require__(210);
+
+ var graphic = __webpack_require__(42);
+ var numberUtil = __webpack_require__(7);
+ var parsePercent = numberUtil.parsePercent;
+
+ function parsePosition(seriesModel, api) {
+ var center = seriesModel.get('center');
+ var width = api.getWidth();
+ var height = api.getHeight();
+ var size = Math.min(width, height);
+ var cx = parsePercent(center[0], api.getWidth());
+ var cy = parsePercent(center[1], api.getHeight());
+ var r = parsePercent(seriesModel.get('radius'), size / 2);
+
+ return {
+ cx: cx,
+ cy: cy,
+ r: r
+ };
+ }
+
+ function formatLabel(label, labelFormatter) {
+ if (labelFormatter) {
+ if (typeof labelFormatter === 'string') {
+ label = labelFormatter.replace('{value}', label);
+ }
+ else if (typeof labelFormatter === 'function') {
+ label = labelFormatter(label);
+ }
+ }
+
+ return label;
+ }
+
+ var PI2 = Math.PI * 2;
+
+ var GaugeView = __webpack_require__(41).extend({
+
+ type: 'gauge',
+
+ render: function (seriesModel, ecModel, api) {
+
+ this.group.removeAll();
+
+ var colorList = seriesModel.get('axisLine.lineStyle.color');
+ var posInfo = parsePosition(seriesModel, api);
+
+ this._renderMain(
+ seriesModel, ecModel, api, colorList, posInfo
+ );
+ },
+
+ _renderMain: function (seriesModel, ecModel, api, colorList, posInfo) {
+ var group = this.group;
+
+ var axisLineModel = seriesModel.getModel('axisLine');
+ var lineStyleModel = axisLineModel.getModel('lineStyle');
+
+ var clockwise = seriesModel.get('clockwise');
+ var startAngle = -seriesModel.get('startAngle') / 180 * Math.PI;
+ var endAngle = -seriesModel.get('endAngle') / 180 * Math.PI;
+
+ var angleRangeSpan = (endAngle - startAngle) % PI2;
+
+ var prevEndAngle = startAngle;
+ var axisLineWidth = lineStyleModel.get('width');
+
+ for (var i = 0; i < colorList.length; i++) {
+ var endAngle = startAngle + angleRangeSpan * colorList[i][0];
+ var sector = new graphic.Sector({
+ shape: {
+ startAngle: prevEndAngle,
+ endAngle: endAngle,
+ cx: posInfo.cx,
+ cy: posInfo.cy,
+ clockwise: clockwise,
+ r0: posInfo.r - axisLineWidth,
+ r: posInfo.r
+ },
+ silent: true
+ });
+
+ sector.setStyle({
+ fill: colorList[i][1]
+ });
+
+ sector.setStyle(lineStyleModel.getLineStyle(
+ // Because we use sector to simulate arc
+ // so the properties for stroking are useless
+ ['color', 'borderWidth', 'borderColor']
+ ));
+
+ group.add(sector);
+
+ prevEndAngle = endAngle;
+ }
+
+ var getColor = function (percent) {
+ // Less than 0
+ if (percent <= 0) {
+ return colorList[0][1];
+ }
+ for (var i = 0; i < colorList.length; i++) {
+ if (colorList[i][0] >= percent
+ && (i === 0 ? 0 : colorList[i - 1][0]) < percent
+ ) {
+ return colorList[i][1];
+ }
+ }
+ // More than 1
+ return colorList[i - 1][1];
+ };
+
+ if (!clockwise) {
+ var tmp = startAngle;
+ startAngle = endAngle;
+ endAngle = tmp;
+ }
+
+ this._renderTicks(
+ seriesModel, ecModel, api, getColor, posInfo,
+ startAngle, endAngle, clockwise
+ );
+
+ this._renderPointer(
+ seriesModel, ecModel, api, getColor, posInfo,
+ startAngle, endAngle, clockwise
+ );
+
+ this._renderTitle(
+ seriesModel, ecModel, api, getColor, posInfo
+ );
+ this._renderDetail(
+ seriesModel, ecModel, api, getColor, posInfo
+ );
+ },
+
+ _renderTicks: function (
+ seriesModel, ecModel, api, getColor, posInfo,
+ startAngle, endAngle, clockwise
+ ) {
+ var group = this.group;
+ var cx = posInfo.cx;
+ var cy = posInfo.cy;
+ var r = posInfo.r;
+
+ var minVal = seriesModel.get('min');
+ var maxVal = seriesModel.get('max');
+
+ var splitLineModel = seriesModel.getModel('splitLine');
+ var tickModel = seriesModel.getModel('axisTick');
+ var labelModel = seriesModel.getModel('axisLabel');
+
+ var splitNumber = seriesModel.get('splitNumber');
+ var subSplitNumber = tickModel.get('splitNumber');
+
+ var splitLineLen = parsePercent(
+ splitLineModel.get('length'), r
+ );
+ var tickLen = parsePercent(
+ tickModel.get('length'), r
+ );
+
+ var angle = startAngle;
+ var step = (endAngle - startAngle) / splitNumber;
+ var subStep = step / subSplitNumber;
+
+ var splitLineStyle = splitLineModel.getModel('lineStyle').getLineStyle();
+ var tickLineStyle = tickModel.getModel('lineStyle').getLineStyle();
+ var textStyleModel = labelModel.getModel('textStyle');
+
+ for (var i = 0; i <= splitNumber; i++) {
+ var unitX = Math.cos(angle);
+ var unitY = Math.sin(angle);
+ // Split line
+ if (splitLineModel.get('show')) {
+ var splitLine = new graphic.Line({
+ shape: {
+ x1: unitX * r + cx,
+ y1: unitY * r + cy,
+ x2: unitX * (r - splitLineLen) + cx,
+ y2: unitY * (r - splitLineLen) + cy
+ },
+ style: splitLineStyle,
+ silent: true
+ });
+ if (splitLineStyle.stroke === 'auto') {
+ splitLine.setStyle({
+ stroke: getColor(i / splitNumber)
+ });
+ }
+
+ group.add(splitLine);
+ }
+
+ // Label
+ if (labelModel.get('show')) {
+ var label = formatLabel(
+ numberUtil.round(i / splitNumber * (maxVal - minVal) + minVal),
+ labelModel.get('formatter')
+ );
+
+ var text = new graphic.Text({
+ style: {
+ text: label,
+ x: unitX * (r - splitLineLen - 5) + cx,
+ y: unitY * (r - splitLineLen - 5) + cy,
+ fill: textStyleModel.getTextColor(),
+ textFont: textStyleModel.getFont(),
+ textVerticalAlign: unitY < -0.4 ? 'top' : (unitY > 0.4 ? 'bottom' : 'middle'),
+ textAlign: unitX < -0.4 ? 'left' : (unitX > 0.4 ? 'right' : 'center')
+ },
+ silent: true
+ });
+ if (text.style.fill === 'auto') {
+ text.setStyle({
+ fill: getColor(i / splitNumber)
+ });
+ }
+
+ group.add(text);
+ }
+
+ // Axis tick
+ if (tickModel.get('show') && i !== splitNumber) {
+ for (var j = 0; j <= subSplitNumber; j++) {
+ var unitX = Math.cos(angle);
+ var unitY = Math.sin(angle);
+ var tickLine = new graphic.Line({
+ shape: {
+ x1: unitX * r + cx,
+ y1: unitY * r + cy,
+ x2: unitX * (r - tickLen) + cx,
+ y2: unitY * (r - tickLen) + cy
+ },
+ silent: true,
+ style: tickLineStyle
+ });
+
+ if (tickLineStyle.stroke === 'auto') {
+ tickLine.setStyle({
+ stroke: getColor((i + j / subSplitNumber) / splitNumber)
+ });
+ }
+
+ group.add(tickLine);
+ angle += subStep;
+ }
+ angle -= subStep;
+ }
+ else {
+ angle += step;
+ }
+ }
+ },
+
+ _renderPointer: function (
+ seriesModel, ecModel, api, getColor, posInfo,
+ startAngle, endAngle, clockwise
+ ) {
+ var linearMap = numberUtil.linearMap;
+ var valueExtent = [+seriesModel.get('min'), +seriesModel.get('max')];
+ var angleExtent = [startAngle, endAngle];
+
+ if (!clockwise) {
+ angleExtent = angleExtent.reverse();
+ }
+
+ var data = seriesModel.getData();
+ var oldData = this._data;
+
+ var group = this.group;
+
+ data.diff(oldData)
+ .add(function (idx) {
+ var pointer = new PointerPath({
+ shape: {
+ angle: startAngle
+ }
+ });
+
+ graphic.updateProps(pointer, {
+ shape: {
+ angle: linearMap(data.get('value', idx), valueExtent, angleExtent)
+ }
+ }, seriesModel);
+
+ group.add(pointer);
+ data.setItemGraphicEl(idx, pointer);
+ })
+ .update(function (newIdx, oldIdx) {
+ var pointer = oldData.getItemGraphicEl(oldIdx);
+
+ graphic.updateProps(pointer, {
+ shape: {
+ angle: linearMap(data.get('value', newIdx), valueExtent, angleExtent)
+ }
+ }, seriesModel);
+
+ group.add(pointer);
+ data.setItemGraphicEl(newIdx, pointer);
+ })
+ .remove(function (idx) {
+ var pointer = oldData.getItemGraphicEl(idx);
+ group.remove(pointer);
+ })
+ .execute();
+
+ data.eachItemGraphicEl(function (pointer, idx) {
+ var itemModel = data.getItemModel(idx);
+ var pointerModel = itemModel.getModel('pointer');
+
+ pointer.attr({
+ shape: {
+ x: posInfo.cx,
+ y: posInfo.cy,
+ width: parsePercent(
+ pointerModel.get('width'), posInfo.r
+ ),
+ r: parsePercent(pointerModel.get('length'), posInfo.r)
+ },
+ style: itemModel.getModel('itemStyle.normal').getItemStyle()
+ });
+
+ if (pointer.style.fill === 'auto') {
+ pointer.setStyle('fill', getColor(
+ (data.get('value', idx) - valueExtent[0]) / (valueExtent[1] - valueExtent[0])
+ ));
+ }
+
+ graphic.setHoverStyle(
+ pointer, itemModel.getModel('itemStyle.emphasis').getItemStyle()
+ );
+ });
+
+ this._data = data;
+ },
+
+ _renderTitle: function (
+ seriesModel, ecModel, api, getColor, posInfo
+ ) {
+ var titleModel = seriesModel.getModel('title');
+ if (titleModel.get('show')) {
+ var textStyleModel = titleModel.getModel('textStyle');
+ var offsetCenter = titleModel.get('offsetCenter');
+ var x = posInfo.cx + parsePercent(offsetCenter[0], posInfo.r);
+ var y = posInfo.cy + parsePercent(offsetCenter[1], posInfo.r);
+ var text = new graphic.Text({
+ style: {
+ x: x,
+ y: y,
+ // FIXME First data name ?
+ text: seriesModel.getData().getName(0),
+ fill: textStyleModel.getTextColor(),
+ textFont: textStyleModel.getFont(),
+ textAlign: 'center',
+ textVerticalAlign: 'middle'
+ }
+ });
+ this.group.add(text);
+ }
+ },
+
+ _renderDetail: function (
+ seriesModel, ecModel, api, getColor, posInfo
+ ) {
+ var detailModel = seriesModel.getModel('detail');
+ var minVal = seriesModel.get('min');
+ var maxVal = seriesModel.get('max');
+ if (detailModel.get('show')) {
+ var textStyleModel = detailModel.getModel('textStyle');
+ var offsetCenter = detailModel.get('offsetCenter');
+ var x = posInfo.cx + parsePercent(offsetCenter[0], posInfo.r);
+ var y = posInfo.cy + parsePercent(offsetCenter[1], posInfo.r);
+ var width = parsePercent(detailModel.get('width'), posInfo.r);
+ var height = parsePercent(detailModel.get('height'), posInfo.r);
+ var value = seriesModel.getData().get('value', 0);
+ var rect = new graphic.Rect({
+ shape: {
+ x: x - width / 2,
+ y: y - height / 2,
+ width: width,
+ height: height
+ },
+ style: {
+ text: formatLabel(
+ // FIXME First data name ?
+ value, detailModel.get('formatter')
+ ),
+ fill: detailModel.get('backgroundColor'),
+ textFill: textStyleModel.getTextColor(),
+ textFont: textStyleModel.getFont()
+ }
+ });
+ if (rect.style.textFill === 'auto') {
+ rect.setStyle('textFill', getColor((value - minVal) / (maxVal - minVal)));
+ }
+ rect.setStyle(detailModel.getItemStyle(['color']));
+ this.group.add(rect);
+ }
+ }
+ });
+
+ module.exports = GaugeView;
+
+
+/***/ },
+/* 210 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ module.exports = __webpack_require__(44).extend({
+
+ type: 'echartsGaugePointer',
+
+ shape: {
+ angle: 0,
+
+ width: 10,
+
+ r: 10,
+
+ x: 0,
+
+ y: 0
+ },
+
+ buildPath: function (ctx, shape) {
+ var mathCos = Math.cos;
+ var mathSin = Math.sin;
+
+ var r = shape.r;
+ var width = shape.width;
+ var angle = shape.angle;
+ var x = shape.x - mathCos(angle) * width * (width >= r / 3 ? 1 : 2);
+ var y = shape.y - mathSin(angle) * width * (width >= r / 3 ? 1 : 2);
+
+ angle = shape.angle - Math.PI / 2;
+ ctx.moveTo(x, y);
+ ctx.lineTo(
+ shape.x + mathCos(angle) * width,
+ shape.y + mathSin(angle) * width
+ );
+ ctx.lineTo(
+ shape.x + mathCos(shape.angle) * r,
+ shape.y + mathSin(shape.angle) * r
+ );
+ ctx.lineTo(
+ shape.x - mathCos(angle) * width,
+ shape.y - mathSin(angle) * width
+ );
+ ctx.lineTo(x, y);
+ return;
+ }
+ });
+
+
+/***/ },
+/* 211 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var echarts = __webpack_require__(1);
+
+ __webpack_require__(212);
+ __webpack_require__(213);
+
+ echarts.registerVisualCoding(
+ 'chart', zrUtil.curry(__webpack_require__(137), 'funnel')
+ );
+ echarts.registerLayout(__webpack_require__(214));
+
+ echarts.registerProcessor(
+ 'filter', zrUtil.curry(__webpack_require__(140), 'funnel')
+ );
+
+
+/***/ },
+/* 212 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var List = __webpack_require__(94);
+ var modelUtil = __webpack_require__(5);
+ var completeDimensions = __webpack_require__(96);
+
+ var FunnelSeries = __webpack_require__(1).extendSeriesModel({
+
+ type: 'series.funnel',
+
+ init: function (option) {
+ FunnelSeries.superApply(this, 'init', arguments);
+
+ // Enable legend selection for each data item
+ // Use a function instead of direct access because data reference may changed
+ this.legendDataProvider = function () {
+ return this._dataBeforeProcessed;
+ };
+ // Extend labelLine emphasis
+ this._defaultLabelLine(option);
+ },
+
+ getInitialData: function (option, ecModel) {
+ var dimensions = completeDimensions(['value'], option.data);
+ var list = new List(dimensions, this);
+ list.initData(option.data);
+ return list;
+ },
+
+ _defaultLabelLine: function (option) {
+ // Extend labelLine emphasis
+ modelUtil.defaultEmphasis(option.labelLine, ['show']);
+
+ var labelLineNormalOpt = option.labelLine.normal;
+ var labelLineEmphasisOpt = option.labelLine.emphasis;
+ // Not show label line if `label.normal.show = false`
+ labelLineNormalOpt.show = labelLineNormalOpt.show
+ && option.label.normal.show;
+ labelLineEmphasisOpt.show = labelLineEmphasisOpt.show
+ && option.label.emphasis.show;
+ },
+
+ defaultOption: {
+ zlevel: 0, // 一级层å 
+ z: 2, // 二级层å 
+ legendHoverLink: true,
+ left: 80,
+ top: 60,
+ right: 80,
+ bottom: 60,
+ // width: {totalWidth} - left - right,
+ // height: {totalHeight} - top - bottom,
+
+ // 默认å–æ•°æ®æœ€å°æœ€å¤§å€¼
+ // min: 0,
+ // max: 100,
+ minSize: '0%',
+ maxSize: '100%',
+ sort: 'descending', // 'ascending', 'descending'
+ gap: 0,
+ funnelAlign: 'center',
+ label: {
+ normal: {
+ show: true,
+ position: 'outer'
+ // formatter: 标签文本格å¼å™¨ï¼ŒåŒTooltip.formatter,ä¸æ”¯æŒå¼‚步回调
+ // textStyle: null // 默认使用全局文本样å¼ï¼Œè¯¦è§TEXTSTYLE
+ },
+ emphasis: {
+ show: true
+ }
+ },
+ labelLine: {
+ normal: {
+ show: true,
+ length: 20,
+ lineStyle: {
+ // color: å„异,
+ width: 1,
+ type: 'solid'
+ }
+ },
+ emphasis: {}
+ },
+ itemStyle: {
+ normal: {
+ // color: å„异,
+ borderColor: '#fff',
+ borderWidth: 1
+ },
+ emphasis: {
+ // color: å„异,
+ }
+ }
+ }
+ });
+
+ module.exports = FunnelSeries;
+
+
+/***/ },
+/* 213 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var graphic = __webpack_require__(42);
+ var zrUtil = __webpack_require__(3);
+
+ /**
+ * Piece of pie including Sector, Label, LabelLine
+ * @constructor
+ * @extends {module:zrender/graphic/Group}
+ */
+ function FunnelPiece(data, idx) {
+
+ graphic.Group.call(this);
+
+ var polygon = new graphic.Polygon();
+ var labelLine = new graphic.Polyline();
+ var text = new graphic.Text();
+ this.add(polygon);
+ this.add(labelLine);
+ this.add(text);
+
+ this.updateData(data, idx, true);
+
+ // Hover to change label and labelLine
+ function onEmphasis() {
+ labelLine.ignore = labelLine.hoverIgnore;
+ text.ignore = text.hoverIgnore;
+ }
+ function onNormal() {
+ labelLine.ignore = labelLine.normalIgnore;
+ text.ignore = text.normalIgnore;
+ }
+ this.on('emphasis', onEmphasis)
+ .on('normal', onNormal)
+ .on('mouseover', onEmphasis)
+ .on('mouseout', onNormal);
+ }
+
+ var funnelPieceProto = FunnelPiece.prototype;
+
+ function getLabelStyle(data, idx, state, labelModel) {
+ var textStyleModel = labelModel.getModel('textStyle');
+ var position = labelModel.get('position');
+ var isLabelInside = position === 'inside' || position === 'inner' || position === 'center';
+ return {
+ fill: textStyleModel.getTextColor()
+ || (isLabelInside ? '#fff' : data.getItemVisual(idx, 'color')),
+ textFont: textStyleModel.getFont(),
+ text: zrUtil.retrieve(
+ data.hostModel.getFormattedLabel(idx, state),
+ data.getName(idx)
+ )
+ };
+ }
+
+ var opacityAccessPath = ['itemStyle', 'normal', 'opacity'];
+ funnelPieceProto.updateData = function (data, idx, firstCreate) {
+
+ var polygon = this.childAt(0);
+
+ var seriesModel = data.hostModel;
+ var itemModel = data.getItemModel(idx);
+ var layout = data.getItemLayout(idx);
+ var opacity = data.getItemModel(idx).get(opacityAccessPath);
+ opacity = opacity == null ? 1 : opacity;
+ if (firstCreate) {
+ polygon.setShape({
+ points: layout.points
+ });
+ polygon.setStyle({ opacity : 0 });
+ graphic.updateProps(polygon, {
+ style: {
+ opacity: opacity
+ }
+ }, seriesModel);
+ }
+ else {
+ graphic.initProps(polygon, {
+ shape: {
+ points: layout.points
+ }
+ }, seriesModel);
+ }
+
+ // Update common style
+ var itemStyleModel = itemModel.getModel('itemStyle');
+ var visualColor = data.getItemVisual(idx, 'color');
+
+ polygon.setStyle(
+ zrUtil.defaults(
+ {
+ fill: visualColor
+ },
+ itemStyleModel.getModel('normal').getItemStyle()
+ )
+ );
+ polygon.hoverStyle = itemStyleModel.getModel('emphasis').getItemStyle();
+
+ this._updateLabel(data, idx);
+
+ graphic.setHoverStyle(this);
+ };
+
+ funnelPieceProto._updateLabel = function (data, idx) {
+
+ var labelLine = this.childAt(1);
+ var labelText = this.childAt(2);
+
+ var seriesModel = data.hostModel;
+ var itemModel = data.getItemModel(idx);
+ var layout = data.getItemLayout(idx);
+ var labelLayout = layout.label;
+ var visualColor = data.getItemVisual(idx, 'color');
+
+ graphic.updateProps(labelLine, {
+ shape: {
+ points: labelLayout.linePoints || labelLayout.linePoints
+ }
+ }, seriesModel);
+
+ graphic.updateProps(labelText, {
+ style: {
+ x: labelLayout.x,
+ y: labelLayout.y
+ }
+ }, seriesModel);
+ labelText.attr({
+ style: {
+ textAlign: labelLayout.textAlign,
+ textVerticalAlign: labelLayout.verticalAlign,
+ textFont: labelLayout.font
+ },
+ rotation: labelLayout.rotation,
+ origin: [labelLayout.x, labelLayout.y],
+ z2: 10
+ });
+
+ var labelModel = itemModel.getModel('label.normal');
+ var labelHoverModel = itemModel.getModel('label.emphasis');
+ var labelLineModel = itemModel.getModel('labelLine.normal');
+ var labelLineHoverModel = itemModel.getModel('labelLine.emphasis');
+
+ labelText.setStyle(getLabelStyle(data, idx, 'normal', labelModel));
+
+ labelText.ignore = labelText.normalIgnore = !labelModel.get('show');
+ labelText.hoverIgnore = !labelHoverModel.get('show');
+
+ labelLine.ignore = labelLine.normalIgnore = !labelLineModel.get('show');
+ labelLine.hoverIgnore = !labelLineHoverModel.get('show');
+
+ // Default use item visual color
+ labelLine.setStyle({
+ stroke: visualColor
+ });
+ labelLine.setStyle(labelLineModel.getModel('lineStyle').getLineStyle());
+
+ labelText.hoverStyle = getLabelStyle(data, idx, 'emphasis', labelHoverModel);
+ labelLine.hoverStyle = labelLineHoverModel.getModel('lineStyle').getLineStyle();
+ };
+
+ zrUtil.inherits(FunnelPiece, graphic.Group);
+
+
+ var Funnel = __webpack_require__(41).extend({
+
+ type: 'funnel',
+
+ render: function (seriesModel, ecModel, api) {
+ var data = seriesModel.getData();
+ var oldData = this._data;
+
+ var group = this.group;
+
+ data.diff(oldData)
+ .add(function (idx) {
+ var funnelPiece = new FunnelPiece(data, idx);
+
+ data.setItemGraphicEl(idx, funnelPiece);
+
+ group.add(funnelPiece);
+ })
+ .update(function (newIdx, oldIdx) {
+ var piePiece = oldData.getItemGraphicEl(oldIdx);
+
+ piePiece.updateData(data, newIdx);
+
+ group.add(piePiece);
+ data.setItemGraphicEl(newIdx, piePiece);
+ })
+ .remove(function (idx) {
+ var piePiece = oldData.getItemGraphicEl(idx);
+ group.remove(piePiece);
+ })
+ .execute();
+
+ this._data = data;
+ },
+
+ remove: function () {
+ this.group.removeAll();
+ this._data = null;
+ }
+ });
+
+ module.exports = Funnel;
+
+
+/***/ },
+/* 214 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var layout = __webpack_require__(21);
+ var number = __webpack_require__(7);
+
+ var parsePercent = number.parsePercent;
+
+ function getViewRect(seriesModel, api) {
+ return layout.getLayoutRect(
+ seriesModel.getBoxLayoutParams(), {
+ width: api.getWidth(),
+ height: api.getHeight()
+ }
+ );
+ }
+
+ function getSortedIndices(data, sort) {
+ var valueArr = data.mapArray('value', function (val) {
+ return val;
+ });
+ var indices = [];
+ var isAscending = sort === 'ascending';
+ for (var i = 0, len = data.count(); i < len; i++) {
+ indices[i] = i;
+ }
+ indices.sort(function (a, b) {
+ return isAscending ? valueArr[a] - valueArr[b] : valueArr[b] - valueArr[a];
+ });
+ return indices;
+ }
+
+ function labelLayout (data) {
+ data.each(function (idx) {
+ var itemModel = data.getItemModel(idx);
+ var labelModel = itemModel.getModel('label.normal');
+ var labelPosition = labelModel.get('position');
+
+ var labelLineModel = itemModel.getModel('labelLine.normal');
+
+ var layout = data.getItemLayout(idx);
+ var points = layout.points;
+
+ var isLabelInside = labelPosition === 'inner'
+ || labelPosition === 'inside' || labelPosition === 'center';
+
+ var textAlign;
+ var textX;
+ var textY;
+ var linePoints;
+
+ if (isLabelInside) {
+ textX = (points[0][0] + points[1][0] + points[2][0] + points[3][0]) / 4;
+ textY = (points[0][1] + points[1][1] + points[2][1] + points[3][1]) / 4;
+ textAlign = 'center';
+ linePoints = [
+ [textX, textY], [textX, textY]
+ ];
+ }
+ else {
+ var x1;
+ var y1;
+ var x2;
+ var labelLineLen = labelLineModel.get('length');
+ if (labelPosition === 'left') {
+ // Left side
+ x1 = (points[3][0] + points[0][0]) / 2;
+ y1 = (points[3][1] + points[0][1]) / 2;
+ x2 = x1 - labelLineLen;
+ textX = x2 - 5;
+ textAlign = 'right';
+ }
+ else {
+ // Right side
+ x1 = (points[1][0] + points[2][0]) / 2;
+ y1 = (points[1][1] + points[2][1]) / 2;
+ x2 = x1 + labelLineLen;
+ textX = x2 + 5;
+ textAlign = 'left';
+ }
+ var y2 = y1;
+
+ linePoints = [[x1, y1], [x2, y2]];
+ textY = y2;
+ }
+
+ layout.label = {
+ linePoints: linePoints,
+ x: textX,
+ y: textY,
+ verticalAlign: 'middle',
+ textAlign: textAlign,
+ inside: isLabelInside
+ };
+ });
+ }
+
+ module.exports = function (ecModel, api) {
+ ecModel.eachSeriesByType('funnel', function (seriesModel) {
+ var data = seriesModel.getData();
+ var sort = seriesModel.get('sort');
+ var viewRect = getViewRect(seriesModel, api);
+ var indices = getSortedIndices(data, sort);
+
+ var sizeExtent = [
+ parsePercent(seriesModel.get('minSize'), viewRect.width),
+ parsePercent(seriesModel.get('maxSize'), viewRect.width)
+ ];
+ var dataExtent = data.getDataExtent('value');
+ var min = seriesModel.get('min');
+ var max = seriesModel.get('max');
+ if (min == null) {
+ min = Math.min(dataExtent[0], 0);
+ }
+ if (max == null) {
+ max = dataExtent[1];
+ }
+
+ var funnelAlign = seriesModel.get('funnelAlign');
+ var gap = seriesModel.get('gap');
+ var itemHeight = (viewRect.height - gap * (data.count() - 1)) / data.count();
+
+ var y = viewRect.y;
+
+ var getLinePoints = function (idx, offY) {
+ // End point index is data.count() and we assign it 0
+ var val = data.get('value', idx) || 0;
+ var itemWidth = number.linearMap(val, [min, max], sizeExtent, true);
+ var x0;
+ switch (funnelAlign) {
+ case 'left':
+ x0 = viewRect.x;
+ break;
+ case 'center':
+ x0 = viewRect.x + (viewRect.width - itemWidth) / 2;
+ break;
+ case 'right':
+ x0 = viewRect.x + viewRect.width - itemWidth;
+ break;
+ }
+ return [
+ [x0, offY],
+ [x0 + itemWidth, offY]
+ ];
+ };
+
+ if (sort === 'ascending') {
+ // From bottom to top
+ itemHeight = -itemHeight;
+ gap = -gap;
+ y += viewRect.height;
+ indices = indices.reverse();
+ }
+
+ for (var i = 0; i < indices.length; i++) {
+ var idx = indices[i];
+ var nextIdx = indices[i + 1];
+ var start = getLinePoints(idx, y);
+ var end = getLinePoints(nextIdx, y + itemHeight);
+
+ y += itemHeight + gap;
+
+ data.setItemLayout(idx, {
+ points: start.concat(end.slice().reverse())
+ });
+ }
+
+ labelLayout(data);
+ });
+ };
+
+
+/***/ },
+/* 215 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var echarts = __webpack_require__(1);
+
+ __webpack_require__(216);
+
+ __webpack_require__(227);
+ __webpack_require__(228);
+
+ echarts.registerVisualCoding('chart', __webpack_require__(229));
+
+
+
+/***/ },
+/* 216 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ __webpack_require__(217);
+ __webpack_require__(220);
+ __webpack_require__(222);
+
+ var echarts = __webpack_require__(1);
+
+ // Parallel view
+ echarts.extendComponentView({
+ type: 'parallel'
+ });
+
+ echarts.registerPreprocessor(
+ __webpack_require__(226)
+ );
+
+
+
+/***/ },
+/* 217 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Parallel coordinate system creater.
+ */
+
+
+ var Parallel = __webpack_require__(218);
+
+ function create(ecModel, api) {
+ var coordSysList = [];
+
+ ecModel.eachComponent('parallel', function (parallelModel, idx) {
+ var coordSys = new Parallel(parallelModel, ecModel, api);
+
+ coordSys.name = 'parallel_' + idx;
+ coordSys.resize(parallelModel, api);
+
+ parallelModel.coordinateSystem = coordSys;
+ coordSys.model = parallelModel;
+
+ coordSysList.push(coordSys);
+ });
+
+ // Inject the coordinateSystems into seriesModel
+ ecModel.eachSeries(function (seriesModel) {
+ if (seriesModel.get('coordinateSystem') === 'parallel') {
+ var parallelIndex = seriesModel.get('parallelIndex');
+ seriesModel.coordinateSystem = coordSysList[parallelIndex];
+ }
+ });
+
+ return coordSysList;
+ }
+
+ __webpack_require__(25).register('parallel', {create: create});
+
+
+
+/***/ },
+/* 218 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Parallel Coordinates
+ * <https://en.wikipedia.org/wiki/Parallel_coordinates>
+ */
+
+
+ var layout = __webpack_require__(21);
+ var axisHelper = __webpack_require__(108);
+ var zrUtil = __webpack_require__(3);
+ var ParallelAxis = __webpack_require__(219);
+ var matrix = __webpack_require__(17);
+ var vector = __webpack_require__(16);
+
+ var each = zrUtil.each;
+
+ var PI = Math.PI;
+
+ function Parallel(parallelModel, ecModel, api) {
+
+ /**
+ * key: dimension
+ * @type {Object.<string, module:echarts/coord/parallel/Axis>}
+ * @private
+ */
+ this._axesMap = {};
+
+ /**
+ * key: dimension
+ * value: {position: [], rotation, }
+ * @type {Object.<string, Object>}
+ * @private
+ */
+ this._axesLayout = {};
+
+ /**
+ * Always follow axis order.
+ * @type {Array.<string>}
+ * @readOnly
+ */
+ this.dimensions = parallelModel.dimensions;
+
+ /**
+ * @type {module:zrender/core/BoundingRect}
+ */
+ this._rect;
+
+ /**
+ * @type {module:echarts/coord/parallel/ParallelModel}
+ */
+ this._model = parallelModel;
+
+ this._init(parallelModel, ecModel, api);
+ }
+
+ Parallel.prototype = {
+
+ type: 'parallel',
+
+ constructor: Parallel,
+
+ /**
+ * Initialize cartesian coordinate systems
+ * @private
+ */
+ _init: function (parallelModel, ecModel, api) {
+
+ var dimensions = parallelModel.dimensions;
+ var parallelAxisIndex = parallelModel.parallelAxisIndex;
+
+ each(dimensions, function (dim, idx) {
+
+ var axisIndex = parallelAxisIndex[idx];
+ var axisModel = ecModel.getComponent('parallelAxis', axisIndex);
+
+ var axis = this._axesMap[dim] = new ParallelAxis(
+ dim,
+ axisHelper.createScaleByModel(axisModel),
+ [0, 0],
+ axisModel.get('type'),
+ axisIndex
+ );
+
+ var isCategory = axis.type === 'category';
+ axis.onBand = isCategory && axisModel.get('boundaryGap');
+ axis.inverse = axisModel.get('inverse');
+
+ // Inject axis into axisModel
+ axisModel.axis = axis;
+
+ // Inject axisModel into axis
+ axis.model = axisModel;
+ }, this);
+ },
+
+ /**
+ * Update axis scale after data processed
+ * @param {module:echarts/model/Global} ecModel
+ * @param {module:echarts/ExtensionAPI} api
+ */
+ update: function (ecModel, api) {
+ this._updateAxesFromSeries(this._model, ecModel);
+ },
+
+ /**
+ * Update properties from series
+ * @private
+ */
+ _updateAxesFromSeries: function (parallelModel, ecModel) {
+ ecModel.eachSeries(function (seriesModel) {
+
+ if (!parallelModel.contains(seriesModel, ecModel)) {
+ return;
+ }
+
+ var data = seriesModel.getData();
+
+ each(this.dimensions, function (dim) {
+ var axis = this._axesMap[dim];
+ axis.scale.unionExtent(data.getDataExtent(dim));
+ axisHelper.niceScaleExtent(axis, axis.model);
+ }, this);
+ }, this);
+ },
+
+ /**
+ * Resize the parallel coordinate system.
+ * @param {module:echarts/coord/parallel/ParallelModel} parallelModel
+ * @param {module:echarts/ExtensionAPI} api
+ */
+ resize: function (parallelModel, api) {
+ this._rect = layout.getLayoutRect(
+ parallelModel.getBoxLayoutParams(),
+ {
+ width: api.getWidth(),
+ height: api.getHeight()
+ }
+ );
+
+ this._layoutAxes(parallelModel);
+ },
+
+ /**
+ * @return {module:zrender/core/BoundingRect}
+ */
+ getRect: function () {
+ return this._rect;
+ },
+
+ /**
+ * @private
+ */
+ _layoutAxes: function (parallelModel) {
+ var rect = this._rect;
+ var layout = parallelModel.get('layout');
+ var axes = this._axesMap;
+ var dimensions = this.dimensions;
+
+ var size = [rect.width, rect.height];
+ var sizeIdx = layout === 'horizontal' ? 0 : 1;
+ var layoutLength = size[sizeIdx];
+ var axisLength = size[1 - sizeIdx];
+ var axisExtent = [0, axisLength];
+
+ each(axes, function (axis) {
+ var idx = axis.inverse ? 1 : 0;
+ axis.setExtent(axisExtent[idx], axisExtent[1 - idx]);
+ });
+
+ each(dimensions, function (dim, idx) {
+ var pos = layoutLength * idx / (dimensions.length - 1);
+
+ var positionTable = {
+ horizontal: {
+ x: pos,
+ y: axisLength
+ },
+ vertical: {
+ x: 0,
+ y: pos
+ }
+ };
+ var rotationTable = {
+ horizontal: PI / 2,
+ vertical: 0
+ };
+
+ var position = [
+ positionTable[layout].x + rect.x,
+ positionTable[layout].y + rect.y
+ ];
+
+ var rotation = rotationTable[layout];
+ var transform = matrix.create();
+ matrix.rotate(transform, transform, rotation);
+ matrix.translate(transform, transform, position);
+
+ // TODO
+ // tick等排布信æ¯ã€‚
+
+ // TODO
+ // æ ¹æ®axis order æ›´æ–° dimensions顺åºã€‚
+
+ this._axesLayout[dim] = {
+ position: position,
+ rotation: rotation,
+ transform: transform,
+ tickDirection: 1,
+ labelDirection: 1
+ };
+ }, this);
+ },
+
+ /**
+ * Get axis by dim.
+ * @param {string} dim
+ * @return {module:echarts/coord/parallel/ParallelAxis} [description]
+ */
+ getAxis: function (dim) {
+ return this._axesMap[dim];
+ },
+
+ /**
+ * Convert a dim value of a single item of series data to Point.
+ * @param {*} value
+ * @param {string} dim
+ * @return {Array}
+ */
+ dataToPoint: function (value, dim) {
+ return this.axisCoordToPoint(
+ this._axesMap[dim].dataToCoord(value),
+ dim
+ );
+ },
+
+ /**
+ * @param {module:echarts/data/List} data
+ * @param {Functio} cb param: {string} activeState 'active' or 'inactive' or 'normal'
+ * {number} dataIndex
+ * @param {Object} context
+ */
+ eachActiveState: function (data, callback, context) {
+ var dimensions = this.dimensions;
+ var axesMap = this._axesMap;
+ var hasActiveSet = false;
+
+ for (var j = 0, lenj = dimensions.length; j < lenj; j++) {
+ if (axesMap[dimensions[j]].model.getActiveState() !== 'normal') {
+ hasActiveSet = true;
+ }
+ }
+
+ for (var i = 0, len = data.count(); i < len; i++) {
+ var values = data.getValues(dimensions, i);
+ var activeState;
+
+ if (!hasActiveSet) {
+ activeState = 'normal';
+ }
+ else {
+ activeState = 'active';
+ for (var j = 0, lenj = dimensions.length; j < lenj; j++) {
+ var dimName = dimensions[j];
+ var state = axesMap[dimName].model.getActiveState(values[j], j);
+
+ if (state === 'inactive') {
+ activeState = 'inactive';
+ break;
+ }
+ }
+ }
+
+ callback.call(context, activeState, i);
+ }
+ },
+
+ /**
+ * Convert coords of each axis to Point.
+ * Return point. For example: [10, 20]
+ * @param {Array.<number>} coords
+ * @param {string} dim
+ * @return {Array.<number>}
+ */
+ axisCoordToPoint: function (coord, dim) {
+ var axisLayout = this._axesLayout[dim];
+ var point = [coord, 0];
+ vector.applyTransform(point, point, axisLayout.transform);
+ return point;
+ },
+
+ /**
+ * Get axis layout.
+ */
+ getAxisLayout: function (dim) {
+ return zrUtil.clone(this._axesLayout[dim]);
+ }
+
+ };
+
+ module.exports = Parallel;
+
+
+/***/ },
+/* 219 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var Axis = __webpack_require__(117);
+
+ /**
+ * @constructor module:echarts/coord/parallel/ParallelAxis
+ * @extends {module:echarts/coord/Axis}
+ * @param {string} dim
+ * @param {*} scale
+ * @param {Array.<number>} coordExtent
+ * @param {string} axisType
+ */
+ var ParallelAxis = function (dim, scale, coordExtent, axisType, axisIndex) {
+
+ Axis.call(this, dim, scale, coordExtent);
+
+ /**
+ * Axis type
+ * - 'category'
+ * - 'value'
+ * - 'time'
+ * - 'log'
+ * @type {string}
+ */
+ this.type = axisType || 'value';
+
+ /**
+ * @type {number}
+ * @readOnly
+ */
+ this.axisIndex = axisIndex;
+ };
+
+ ParallelAxis.prototype = {
+
+ constructor: ParallelAxis,
+
+ /**
+ * Axis model
+ * @param {module:echarts/coord/parallel/AxisModel}
+ */
+ model: null
+
+ };
+
+ zrUtil.inherits(ParallelAxis, Axis);
+
+ module.exports = ParallelAxis;
+
+
+/***/ },
+/* 220 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var Component = __webpack_require__(19);
+
+ __webpack_require__(221);
+
+ Component.extend({
+
+ type: 'parallel',
+
+ dependencies: ['parallelAxis'],
+
+ /**
+ * @type {module:echarts/coord/parallel/Parallel}
+ */
+ coordinateSystem: null,
+
+ /**
+ * Each item like: 'dim0', 'dim1', 'dim2', ...
+ * @type {Array.<string>}
+ * @readOnly
+ */
+ dimensions: null,
+
+ /**
+ * Coresponding to dimensions.
+ * @type {Array.<number>}
+ * @readOnly
+ */
+ parallelAxisIndex: null,
+
+ defaultOption: {
+ zlevel: 0, // 一级层å 
+ z: 0, // 二级层å 
+ left: 80,
+ top: 60,
+ right: 80,
+ bottom: 60,
+ // width: {totalWidth} - left - right,
+ // height: {totalHeight} - top - bottom,
+
+ layout: 'horizontal', // 'horizontal' or 'vertical'
+
+ parallelAxisDefault: null
+ },
+
+ /**
+ * @override
+ */
+ init: function () {
+ Component.prototype.init.apply(this, arguments);
+
+ this.mergeOption({});
+ },
+
+ /**
+ * @override
+ */
+ mergeOption: function (newOption) {
+ var thisOption = this.option;
+
+ newOption && zrUtil.merge(thisOption, newOption, true);
+
+ this._initDimensions();
+ },
+
+ /**
+ * Whether series or axis is in this coordinate system.
+ * @param {module:echarts/model/Series|module:echarts/coord/parallel/AxisModel} model
+ * @param {module:echarts/model/Global} ecModel
+ */
+ contains: function (model, ecModel) {
+ var parallelIndex = model.get('parallelIndex');
+ return parallelIndex != null
+ && ecModel.getComponent('parallel', parallelIndex) === this;
+ },
+
+ /**
+ * @private
+ */
+ _initDimensions: function () {
+ var dimensions = this.dimensions = [];
+ var parallelAxisIndex = this.parallelAxisIndex = [];
+
+ var axisModels = zrUtil.filter(this.dependentModels.parallelAxis, function (axisModel) {
+ // Can not use this.contains here, because
+ // initialization has not been completed yet.
+ return axisModel.get('parallelIndex') === this.componentIndex;
+ });
+
+ zrUtil.each(axisModels, function (axisModel) {
+ dimensions.push('dim' + axisModel.get('dim'));
+ parallelAxisIndex.push(axisModel.componentIndex);
+ });
+ }
+
+ });
+
+
+
+/***/ },
+/* 221 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var ComponentModel = __webpack_require__(19);
+ var zrUtil = __webpack_require__(3);
+ var makeStyleMapper = __webpack_require__(11);
+ var axisModelCreator = __webpack_require__(121);
+ var numberUtil = __webpack_require__(7);
+
+ var AxisModel = ComponentModel.extend({
+
+ type: 'baseParallelAxis',
+
+ /**
+ * @type {module:echarts/coord/parallel/Axis}
+ */
+ axis: null,
+
+ /**
+ * @type {Array.<Array.<number>}
+ * @readOnly
+ */
+ activeIntervals: [],
+
+ /**
+ * @return {Object}
+ */
+ getAreaSelectStyle: function () {
+ return makeStyleMapper(
+ [
+ ['fill', 'color'],
+ ['lineWidth', 'borderWidth'],
+ ['stroke', 'borderColor'],
+ ['width', 'width'],
+ ['opacity', 'opacity']
+ ]
+ ).call(this.getModel('areaSelectStyle'));
+ },
+
+ /**
+ * The code of this feature is put on AxisModel but not ParallelAxis,
+ * because axisModel can be alive after echarts updating but instance of
+ * ParallelAxis having been disposed. this._activeInterval should be kept
+ * when action dispatched (i.e. legend click).
+ *
+ * @param {Array.<Array<number>>} intervals interval.length === 0
+ * means set all active.
+ * @public
+ */
+ setActiveIntervals: function (intervals) {
+ var activeIntervals = this.activeIntervals = zrUtil.clone(intervals);
+
+ // Normalize
+ if (activeIntervals) {
+ for (var i = activeIntervals.length - 1; i >= 0; i--) {
+ numberUtil.asc(activeIntervals[i]);
+ }
+ }
+ },
+
+ /**
+ * @param {number|string} [value] When attempting to detect 'no activeIntervals set',
+ * value can not be input.
+ * @return {string} 'normal': no activeIntervals set,
+ * 'active',
+ * 'inactive'.
+ * @public
+ */
+ getActiveState: function (value) {
+ var activeIntervals = this.activeIntervals;
+
+ if (!activeIntervals.length) {
+ return 'normal';
+ }
+
+ if (value == null) {
+ return 'inactive';
+ }
+
+ for (var i = 0, len = activeIntervals.length; i < len; i++) {
+ if (activeIntervals[i][0] <= value && value <= activeIntervals[i][1]) {
+ return 'active';
+ }
+ }
+ return 'inactive';
+ }
+
+ });
+
+ var defaultOption = {
+
+ type: 'value',
+
+ /**
+ * @type {Array.<number>}
+ */
+ dim: null, // 0, 1, 2, ...
+
+ parallelIndex: null,
+
+ areaSelectStyle: {
+ width: 20,
+ borderWidth: 1,
+ borderColor: 'rgba(160,197,232)',
+ color: 'rgba(160,197,232)',
+ opacity: 0.3
+ },
+
+ z: 10
+ };
+
+ zrUtil.merge(AxisModel.prototype, __webpack_require__(123));
+
+ function getAxisType(axisName, option) {
+ return option.type || (option.data ? 'category' : 'value');
+ }
+
+ axisModelCreator('parallel', AxisModel, getAxisType, defaultOption);
+
+ module.exports = AxisModel;
+
+
+/***/ },
+/* 222 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ __webpack_require__(217);
+ __webpack_require__(223);
+ __webpack_require__(224);
+
+
+
+/***/ },
+/* 223 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var echarts = __webpack_require__(1);
+
+ var actionInfo = {
+ type: 'axisAreaSelect',
+ event: 'axisAreaSelected',
+ update: 'updateVisual'
+ };
+
+ /**
+ * @payload
+ * @property {string} parallelAxisId
+ * @property {Array.<Array.<number>>} intervals
+ */
+ echarts.registerAction(actionInfo, function (payload, ecModel) {
+ ecModel.eachComponent(
+ {mainType: 'parallelAxis', query: payload},
+ function (parallelAxisModel) {
+ parallelAxisModel.axis.model.setActiveIntervals(payload.intervals);
+ }
+ );
+
+ });
+
+
+/***/ },
+/* 224 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var AxisBuilder = __webpack_require__(126);
+ var SelectController = __webpack_require__(225);
+
+ var elementList = ['axisLine', 'axisLabel', 'axisTick', 'axisName'];
+
+ var AxisView = __webpack_require__(1).extendComponentView({
+
+ type: 'parallelAxis',
+
+ /**
+ * @type {module:echarts/component/helper/SelectController}
+ */
+ _selectController: null,
+
+ /**
+ * @override
+ */
+ render: function (axisModel, ecModel, api, payload) {
+ if (fromAxisAreaSelect(axisModel, ecModel, payload)) {
+ return;
+ }
+
+ this.axisModel = axisModel;
+ this.api = api;
+
+ this.group.removeAll();
+
+ if (!axisModel.get('show')) {
+ return;
+ }
+
+ var coordSys = ecModel.getComponent(
+ 'parallel', axisModel.get('parallelIndex')
+ ).coordinateSystem;
+
+ var areaSelectStyle = axisModel.getAreaSelectStyle();
+ var areaWidth = areaSelectStyle.width;
+
+ var axisLayout = coordSys.getAxisLayout(axisModel.axis.dim);
+ var builderOpt = zrUtil.extend(
+ {
+ strokeContainThreshold: areaWidth,
+ // lineWidth === 0 or no value.
+ silent: !(areaWidth > 0) // jshint ignore:line
+ },
+ axisLayout
+ );
+
+ var axisBuilder = new AxisBuilder(axisModel, builderOpt);
+
+ zrUtil.each(elementList, axisBuilder.add, axisBuilder);
+
+ var axisGroup = axisBuilder.getGroup();
+
+ this.group.add(axisGroup);
+
+ this._buildSelectController(
+ axisGroup, areaSelectStyle, axisModel, api
+ );
+ },
+
+ _buildSelectController: function (axisGroup, areaSelectStyle, axisModel, api) {
+
+ var axis = axisModel.axis;
+ var selectController = this._selectController;
+
+ if (!selectController) {
+ selectController = this._selectController = new SelectController(
+ 'line',
+ api.getZr(),
+ areaSelectStyle
+ );
+
+ selectController.on('selected', zrUtil.bind(this._onSelected, this));
+ }
+
+ selectController.enable(axisGroup);
+
+ // After filtering, axis may change, select area needs to be update.
+ var ranges = zrUtil.map(axisModel.activeIntervals, function (interval) {
+ return [
+ axis.dataToCoord(interval[0], true),
+ axis.dataToCoord(interval[1], true)
+ ];
+ });
+ selectController.update(ranges);
+ },
+
+ _onSelected: function (ranges) {
+ // Do not cache these object, because the mey be changed.
+ var axisModel = this.axisModel;
+ var axis = axisModel.axis;
+
+ var intervals = zrUtil.map(ranges, function (range) {
+ return [
+ axis.coordToData(range[0], true),
+ axis.coordToData(range[1], true)
+ ];
+ });
+ this.api.dispatchAction({
+ type: 'axisAreaSelect',
+ parallelAxisId: axisModel.id,
+ intervals: intervals
+ });
+ },
+
+ /**
+ * @override
+ */
+ remove: function () {
+ this._selectController && this._selectController.disable();
+ },
+
+ /**
+ * @override
+ */
+ dispose: function () {
+ if (this._selectController) {
+ this._selectController.dispose();
+ this._selectController = null;
+ }
+ }
+ });
+
+ function fromAxisAreaSelect(axisModel, ecModel, payload) {
+ return payload
+ && payload.type === 'axisAreaSelect'
+ && ecModel.findComponents(
+ {mainType: 'parallelAxis', query: payload}
+ )[0] === axisModel;
+ }
+
+ module.exports = AxisView;
+
+
+/***/ },
+/* 225 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Box selection tool.
+ *
+ * @module echarts/component/helper/SelectController
+ */
+
+
+
+ var Eventful = __webpack_require__(32);
+ var zrUtil = __webpack_require__(3);
+ var graphic = __webpack_require__(42);
+ var bind = zrUtil.bind;
+ var each = zrUtil.each;
+ var mathMin = Math.min;
+ var mathMax = Math.max;
+ var mathPow = Math.pow;
+
+ var COVER_Z = 10000;
+ var UNSELECT_THRESHOLD = 2;
+ var EVENTS = ['mousedown', 'mousemove', 'mouseup'];
+
+ /**
+ * @alias module:echarts/component/helper/SelectController
+ * @constructor
+ * @mixin {module:zrender/mixin/Eventful}
+ *
+ * @param {string} type 'line', 'rect'
+ * @param {module:zrender/zrender~ZRender} zr
+ * @param {Object} [opt]
+ * @param {number} [opt.width]
+ * @param {number} [opt.lineWidth]
+ * @param {string} [opt.stroke]
+ * @param {string} [opt.fill]
+ */
+ function SelectController(type, zr, opt) {
+
+ Eventful.call(this);
+
+ /**
+ * @type {string}
+ * @readOnly
+ */
+ this.type = type;
+
+ /**
+ * @type {module:zrender/zrender~ZRender}
+ */
+ this.zr = zr;
+
+ /**
+ * @type {Object}
+ * @readOnly
+ */
+ this.opt = zrUtil.clone(opt);
+
+ /**
+ * @type {module:zrender/container/Group}
+ * @readOnly
+ */
+ this.group = new graphic.Group();
+
+ /**
+ * @type {module:zrender/core/BoundingRect}
+ */
+ this._containerRect = null;
+
+ /**
+ * @type {Array.<nubmer>}
+ * @private
+ */
+ this._track = [];
+
+ /**
+ * @type {boolean}
+ */
+ this._dragging;
+
+ /**
+ * @type {module:zrender/Element}
+ * @private
+ */
+ this._cover;
+
+ /**
+ * @type {boolean}
+ * @private
+ */
+ this._disabled = true;
+
+ /**
+ * @type {Object}
+ * @private
+ */
+ this._handlers = {
+ mousedown: bind(mousedown, this),
+ mousemove: bind(mousemove, this),
+ mouseup: bind(mouseup, this)
+ };
+
+ each(EVENTS, function (eventName) {
+ this.zr.on(eventName, this._handlers[eventName]);
+ }, this);
+ }
+
+ SelectController.prototype = {
+
+ constructor: SelectController,
+
+ /**
+ * @param {module:zrender/mixin/Transformable} container
+ * @param {module:zrender/core/BoundingRect|boolean} [rect] If not specified,
+ * use container.getBoundingRect().
+ * If false, do not use containerRect.
+ */
+ enable: function (container, rect) {
+
+ this._disabled = false;
+
+ // Remove from old container.
+ removeGroup.call(this);
+
+ // boundingRect will change when dragging, so we have
+ // to keep initial boundingRect.
+ this._containerRect = rect !== false
+ ? (rect || container.getBoundingRect()) : null;
+
+ // Add to new container.
+ container.add(this.group);
+ },
+
+ /**
+ * Update cover location.
+ * @param {Array.<number>|Object} ranges If null/undefined, remove cover.
+ */
+ update: function (ranges) {
+ // TODO
+ // Only support one interval yet.
+ renderCover.call(this, ranges && zrUtil.clone(ranges));
+ },
+
+ disable: function () {
+ this._disabled = true;
+
+ removeGroup.call(this);
+ },
+
+ dispose: function () {
+ this.disable();
+
+ each(EVENTS, function (eventName) {
+ this.zr.off(eventName, this._handlers[eventName]);
+ }, this);
+ }
+ };
+
+
+ zrUtil.mixin(SelectController, Eventful);
+
+ function updateZ(group) {
+ group.traverse(function (el) {
+ el.z = COVER_Z;
+ });
+ }
+
+ function isInContainer(x, y) {
+ var localPos = this.group.transformCoordToLocal(x, y);
+ return !this._containerRect
+ || this._containerRect.contain(localPos[0], localPos[1]);
+ }
+
+ function preventDefault(e) {
+ var rawE = e.event;
+ rawE.preventDefault && rawE.preventDefault();
+ }
+
+ function mousedown(e) {
+ if (this._disabled || (e.target && e.target.draggable)) {
+ return;
+ }
+
+ preventDefault(e);
+
+ var x = e.offsetX;
+ var y = e.offsetY;
+
+ if (isInContainer.call(this, x, y)) {
+ this._dragging = true;
+ this._track = [[x, y]];
+ }
+ }
+
+ function mousemove(e) {
+ if (!this._dragging || this._disabled) {
+ return;
+ }
+
+ preventDefault(e);
+
+ updateViewByCursor.call(this, e);
+ }
+
+ function mouseup(e) {
+ if (!this._dragging || this._disabled) {
+ return;
+ }
+
+ preventDefault(e);
+
+ updateViewByCursor.call(this, e, true);
+
+ this._dragging = false;
+ this._track = [];
+ }
+
+ function updateViewByCursor(e, isEnd) {
+ var x = e.offsetX;
+ var y = e.offsetY;
+
+ if (isInContainer.call(this, x, y)) {
+ this._track.push([x, y]);
+
+ // Create or update cover.
+ var ranges = shouldShowCover.call(this)
+ ? coverRenderers[this.type].getRanges.call(this)
+ // Remove cover.
+ : [];
+
+ renderCover.call(this, ranges);
+
+ this.trigger('selected', zrUtil.clone(ranges));
+
+ if (isEnd) {
+ this.trigger('selectEnd', zrUtil.clone(ranges));
+ }
+ }
+ }
+
+ function shouldShowCover() {
+ var track = this._track;
+
+ if (!track.length) {
+ return false;
+ }
+
+ var p2 = track[track.length - 1];
+ var p1 = track[0];
+ var dx = p2[0] - p1[0];
+ var dy = p2[1] - p1[1];
+ var dist = mathPow(dx * dx + dy * dy, 0.5);
+
+ return dist > UNSELECT_THRESHOLD;
+ }
+
+ function renderCover(ranges) {
+ var coverRenderer = coverRenderers[this.type];
+
+ if (ranges && ranges.length) {
+ if (!this._cover) {
+ this._cover = coverRenderer.create.call(this);
+ this.group.add(this._cover);
+ }
+ coverRenderer.update.call(this, ranges);
+ }
+ else {
+ this.group.remove(this._cover);
+ this._cover = null;
+ }
+
+ updateZ(this.group);
+ }
+
+ function removeGroup() {
+ // container may 'removeAll' outside.
+ var group = this.group;
+ var container = group.parent;
+ if (container) {
+ container.remove(group);
+ }
+ }
+
+ function createRectCover() {
+ var opt = this.opt;
+ return new graphic.Rect({
+ // FIXME
+ // customize style.
+ style: {
+ stroke: opt.stroke,
+ fill: opt.fill,
+ lineWidth: opt.lineWidth,
+ opacity: opt.opacity
+ }
+ });
+ }
+
+ function getLocalTrack() {
+ return zrUtil.map(this._track, function (point) {
+ return this.group.transformCoordToLocal(point[0], point[1]);
+ }, this);
+ }
+
+ function getLocalTrackEnds() {
+ var localTrack = getLocalTrack.call(this);
+ var tail = localTrack.length - 1;
+ tail < 0 && (tail = 0);
+ return [localTrack[0], localTrack[tail]];
+ }
+
+ /**
+ * key: this.type
+ * @type {Object}
+ */
+ var coverRenderers = {
+
+ line: {
+
+ create: createRectCover,
+
+ getRanges: function () {
+ var ends = getLocalTrackEnds.call(this);
+ var min = mathMin(ends[0][0], ends[1][0]);
+ var max = mathMax(ends[0][0], ends[1][0]);
+
+ return [[min, max]];
+ },
+
+ update: function (ranges) {
+ var range = ranges[0];
+ var width = this.opt.width;
+ this._cover.setShape({
+ x: range[0],
+ y: -width / 2,
+ width: range[1] - range[0],
+ height: width
+ });
+ }
+ },
+
+ rect: {
+
+ create: createRectCover,
+
+ getRanges: function () {
+ var ends = getLocalTrackEnds.call(this);
+
+ var min = [
+ mathMin(ends[1][0], ends[0][0]),
+ mathMin(ends[1][1], ends[0][1])
+ ];
+ var max = [
+ mathMax(ends[1][0], ends[0][0]),
+ mathMax(ends[1][1], ends[0][1])
+ ];
+
+ return [[
+ [min[0], max[0]], // x range
+ [min[1], max[1]] // y range
+ ]];
+ },
+
+ update: function (ranges) {
+ var range = ranges[0];
+ this._cover.setShape({
+ x: range[0][0],
+ y: range[1][0],
+ width: range[0][1] - range[0][0],
+ height: range[1][1] - range[1][0]
+ });
+ }
+ }
+ };
+
+ module.exports = SelectController;
+
+
+/***/ },
+/* 226 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var modelUtil = __webpack_require__(5);
+
+ module.exports = function (option) {
+ createParallelIfNeeded(option);
+ mergeAxisOptionFromParallel(option);
+ };
+
+ /**
+ * Create a parallel coordinate if not exists.
+ * @inner
+ */
+ function createParallelIfNeeded(option) {
+ if (option.parallel) {
+ return;
+ }
+
+ var hasParallelSeries = false;
+
+ zrUtil.each(option.series, function (seriesOpt) {
+ if (seriesOpt && seriesOpt.type === 'parallel') {
+ hasParallelSeries = true;
+ }
+ });
+
+ if (hasParallelSeries) {
+ option.parallel = [{}];
+ }
+ }
+
+ /**
+ * Merge aixs definition from parallel option (if exists) to axis option.
+ * @inner
+ */
+ function mergeAxisOptionFromParallel(option) {
+ var axes = modelUtil.normalizeToArray(option.parallelAxis);
+
+ zrUtil.each(axes, function (axisOption) {
+ if (!zrUtil.isObject(axisOption)) {
+ return;
+ }
+
+ var parallelIndex = axisOption.parallelIndex || 0;
+ var parallelOption = modelUtil.normalizeToArray(option.parallel)[parallelIndex];
+
+ if (parallelOption && parallelOption.parallelAxisDefault) {
+ zrUtil.merge(axisOption, parallelOption.parallelAxisDefault, false);
+ }
+ });
+ }
+
+
+
+/***/ },
+/* 227 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var List = __webpack_require__(94);
+ var zrUtil = __webpack_require__(3);
+ var SeriesModel = __webpack_require__(27);
+
+ module.exports = SeriesModel.extend({
+
+ type: 'series.parallel',
+
+ dependencies: ['parallel'],
+
+ getInitialData: function (option, ecModel) {
+ var parallelModel = ecModel.getComponent(
+ 'parallel', this.get('parallelIndex')
+ );
+ var dimensions = parallelModel.dimensions;
+ var parallelAxisIndices = parallelModel.parallelAxisIndex;
+
+ var rawData = option.data;
+
+ var dimensionsInfo = zrUtil.map(dimensions, function (dim, index) {
+ var axisModel = ecModel.getComponent(
+ 'parallelAxis', parallelAxisIndices[index]
+ );
+ if (axisModel.get('type') === 'category') {
+ translateCategoryValue(axisModel, dim, rawData);
+ return {name: dim, type: 'ordinal'};
+ }
+ else {
+ return dim;
+ }
+ });
+
+ var list = new List(dimensionsInfo, this);
+ list.initData(rawData);
+
+ return list;
+ },
+
+ defaultOption: {
+ zlevel: 0, // 一级层å 
+ z: 2, // 二级层å 
+
+ coordinateSystem: 'parallel',
+ parallelIndex: 0,
+
+ // FIXME 尚无用
+ label: {
+ normal: {
+ show: false
+ // formatter: 标签文本格å¼å™¨ï¼ŒåŒTooltip.formatter,ä¸æ”¯æŒå¼‚步回调
+ // position: 默认自适应,水平布局为'top',垂直布局为'right',å¯é€‰ä¸º
+ // 'inside'|'left'|'right'|'top'|'bottom'
+ // textStyle: null // 默认使用全局文本样å¼ï¼Œè¯¦è§TEXTSTYLE
+ },
+ emphasis: {
+ show: false
+ // formatter: 标签文本格å¼å™¨ï¼ŒåŒTooltip.formatter,ä¸æ”¯æŒå¼‚步回调
+ // position: 默认自适应,水平布局为'top',垂直布局为'right',å¯é€‰ä¸º
+ // 'inside'|'left'|'right'|'top'|'bottom'
+ // textStyle: null // 默认使用全局文本样å¼ï¼Œè¯¦è§TEXTSTYLE
+ }
+ },
+
+ inactiveOpacity: 0.05,
+ activeOpacity: 1,
+
+ lineStyle: {
+ normal: {
+ width: 2,
+ opacity: 0.45,
+ type: 'solid'
+ }
+ },
+ // smooth: false
+
+ animationEasing: 'linear'
+ }
+ });
+
+ function translateCategoryValue(axisModel, dim, rawData) {
+ var axisData = axisModel.get('data');
+ var numberDim = +dim.replace('dim', '');
+
+ if (axisData && axisData.length) {
+ zrUtil.each(rawData, function (dataItem) {
+ if (!dataItem) {
+ return;
+ }
+ var index = zrUtil.indexOf(axisData, dataItem[numberDim]);
+ dataItem[numberDim] = index >= 0 ? index : NaN;
+ });
+ }
+ // FIXME
+ // 如果没有设置axis data, 应自动算出,或者æ示。
+ }
+
+
+/***/ },
+/* 228 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var graphic = __webpack_require__(42);
+ var zrUtil = __webpack_require__(3);
+
+ var ParallelView = __webpack_require__(41).extend({
+
+ type: 'parallel',
+
+ init: function () {
+
+ /**
+ * @type {module:zrender/container/Group}
+ * @private
+ */
+ this._dataGroup = new graphic.Group();
+
+ this.group.add(this._dataGroup);
+ /**
+ * @type {module:echarts/data/List}
+ */
+ this._data;
+ },
+
+ /**
+ * @override
+ */
+ render: function (seriesModel, ecModel, api, payload) {
+
+ var dataGroup = this._dataGroup;
+ var data = seriesModel.getData();
+ var oldData = this._data;
+ var coordSys = seriesModel.coordinateSystem;
+ var dimensions = coordSys.dimensions;
+
+ data.diff(oldData)
+ .add(add)
+ .update(update)
+ .remove(remove)
+ .execute();
+
+ // Update style
+ data.eachItemGraphicEl(function (elGroup, idx) {
+ var itemModel = data.getItemModel(idx);
+ var lineStyleModel = itemModel.getModel('lineStyle.normal');
+ elGroup.eachChild(function (child) {
+ child.setStyle(zrUtil.extend(
+ lineStyleModel.getLineStyle(),
+ {
+ stroke: data.getItemVisual(idx, 'color'),
+ opacity: data.getItemVisual(idx, 'opacity')
+ }
+ ));
+ });
+ });
+
+ // First create
+ if (!this._data) {
+ dataGroup.setClipPath(createGridClipShape(
+ coordSys, seriesModel, function () {
+ dataGroup.removeClipPath();
+ }
+ ));
+ }
+
+ this._data = data;
+
+ function add(newDataIndex) {
+ var values = data.getValues(dimensions, newDataIndex);
+ var elGroup = new graphic.Group();
+ dataGroup.add(elGroup);
+
+ eachAxisPair(
+ values, dimensions, coordSys,
+ function (pointPair, pairIndex) {
+ // FIXME
+ // init animation
+ if (pointPair) {
+ elGroup.add(createEl(pointPair));
+ }
+ }
+ );
+
+ data.setItemGraphicEl(newDataIndex, elGroup);
+ }
+
+ function update(newDataIndex, oldDataIndex) {
+ var values = data.getValues(dimensions, newDataIndex);
+ var elGroup = oldData.getItemGraphicEl(oldDataIndex);
+ var newEls = [];
+ var elGroupIndex = 0;
+
+ eachAxisPair(
+ values, dimensions, coordSys,
+ function (pointPair, pairIndex) {
+ var el = elGroup.childAt(elGroupIndex++);
+
+ if (pointPair && !el) {
+ newEls.push(createEl(pointPair));
+ }
+ else if (pointPair) {
+ graphic.updateProps(el, {
+ shape: {
+ points: pointPair
+ }
+ }, seriesModel);
+ }
+ }
+ );
+
+ // Remove redundent els
+ for (var i = elGroup.childCount() - 1; i >= elGroupIndex; i--) {
+ elGroup.remove(elGroup.childAt(i));
+ }
+
+ // Add new els
+ for (var i = 0, len = newEls.length; i < len; i++) {
+ elGroup.add(newEls[i]);
+ }
+
+ data.setItemGraphicEl(newDataIndex, elGroup);
+ }
+
+ function remove(oldDataIndex) {
+ var elGroup = oldData.getItemGraphicEl(oldDataIndex);
+ dataGroup.remove(elGroup);
+ }
+ },
+
+ /**
+ * @override
+ */
+ remove: function () {
+ this._dataGroup && this._dataGroup.removeAll();
+ this._data = null;
+ }
+ });
+
+ function createGridClipShape(coordSys, seriesModel, cb) {
+ var parallelModel = coordSys.model;
+ var rect = coordSys.getRect();
+ var rectEl = new graphic.Rect({
+ shape: {
+ x: rect.x,
+ y: rect.y,
+ width: rect.width,
+ height: rect.height
+ }
+ });
+ var dim = parallelModel.get('layout') === 'horizontal' ? 'width' : 'height';
+ rectEl.setShape(dim, 0);
+ graphic.initProps(rectEl, {
+ shape: {
+ width: rect.width,
+ height: rect.height
+ }
+ }, seriesModel, cb);
+ return rectEl;
+ }
+
+ function eachAxisPair(values, dimensions, coordSys, cb) {
+ for (var i = 0, len = dimensions.length - 1; i < len; i++) {
+ var dimA = dimensions[i];
+ var dimB = dimensions[i + 1];
+ var valueA = values[i];
+ var valueB = values[i + 1];
+
+ cb(
+ (isEmptyValue(valueA, coordSys.getAxis(dimA).type)
+ || isEmptyValue(valueB, coordSys.getAxis(dimB).type)
+ )
+ ? null
+ : [
+ coordSys.dataToPoint(valueA, dimA),
+ coordSys.dataToPoint(valueB, dimB)
+ ],
+ i
+ );
+ }
+ }
+
+ function createEl(pointPair) {
+ return new graphic.Polyline({
+ shape: {points: pointPair},
+ silent: true
+ });
+ }
+
+
+ // FIXME
+ // 公用方法?
+ function isEmptyValue(val, axisType) {
+ return axisType === 'category'
+ ? val == null
+ : (val == null || isNaN(val)); // axisType === 'value'
+ }
+
+ module.exports = ParallelView;
+
+
+/***/ },
+/* 229 */
+/***/ function(module, exports) {
+
+
+
+ /**
+ * @payload
+ * @property {string} parallelAxisId
+ * @property {Array.<number>} extent
+ */
+ module.exports = function (ecModel, payload) {
+
+ ecModel.eachSeriesByType('parallel', function (seriesModel) {
+
+ var itemStyleModel = seriesModel.getModel('itemStyle.normal');
+ var globalColors = ecModel.get('color');
+
+ var color = itemStyleModel.get('color')
+ || globalColors[seriesModel.seriesIndex % globalColors.length];
+ var inactiveOpacity = seriesModel.get('inactiveOpacity');
+ var activeOpacity = seriesModel.get('activeOpacity');
+ var lineStyle = seriesModel.getModel('lineStyle.normal').getLineStyle();
+
+ var coordSys = seriesModel.coordinateSystem;
+ var data = seriesModel.getData();
+
+ var opacityMap = {
+ normal: lineStyle.opacity,
+ active: activeOpacity,
+ inactive: inactiveOpacity
+ };
+
+ coordSys.eachActiveState(data, function (activeState, dataIndex) {
+ data.setItemVisual(dataIndex, 'opacity', opacityMap[activeState]);
+ });
+
+ data.setVisual('color', color);
+ });
+ };
+
+
+/***/ },
+/* 230 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var echarts = __webpack_require__(1);
+
+ __webpack_require__(231);
+ __webpack_require__(232);
+ echarts.registerLayout(__webpack_require__(233));
+ echarts.registerVisualCoding('chart', __webpack_require__(235));
+
+
+/***/ },
+/* 231 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var SeriesModel = __webpack_require__(27);
+ var createGraphFromNodeEdge = __webpack_require__(191);
+
+ module.exports = SeriesModel.extend({
+
+ type: 'series.sankey',
+
+ layoutInfo: null,
+
+ getInitialData: function (option, ecModel) {
+ var links = option.edges || option.links;
+ var nodes = option.data || option.nodes;
+ if (nodes && links) {
+ var graph = createGraphFromNodeEdge(nodes, links, this, true);
+ return graph.data;
+ }
+ },
+
+ /**
+ * @return {module:echarts/data/Graph}
+ */
+ getGraph: function () {
+ return this.getData().graph;
+ },
+
+ /**
+ * return {module:echarts/data/List}
+ */
+ getEdgeData: function() {
+ return this.getGraph().edgeData;
+ },
+
+ defaultOption: {
+ zlevel: 0,
+ z: 2,
+
+ coordinateSystem: 'view',
+
+ layout : null,
+
+ // the position of the whole view
+ left: '5%',
+ top: '5%',
+ right: '20%',
+ bottom: '5%',
+
+ // the dx of the node
+ nodeWidth: 20,
+
+ // the distance between two nodes
+ nodeGap: 8,
+
+ // the number of iterations to change the position of the node
+ layoutIterations: 32,
+
+ label: {
+ normal: {
+ show: true,
+ position: 'right',
+ textStyle: {
+ color: '#000',
+ fontSize: 12
+ }
+ },
+ emphasis: {
+ show: true
+ }
+ },
+
+ itemStyle: {
+ normal: {
+ borderWidth: 1,
+ borderColor: '#aaa'
+ }
+ },
+
+ lineStyle: {
+ normal: {
+ color: '#314656',
+ opacity: 0.2,
+ curveness: 0.5
+ },
+ emphasis: {
+ opacity: 0.6
+ }
+ },
+
+
+ // colorEncoded node
+
+ color: ['#9e0142', '#d53e4f', '#f46d43', '#fdae61', '#fee08b','#ffffbf',
+ '#e6f598', '#abdda4', '#66c2a5', '#3288bd', '#5e4fa2'],
+
+ animationEasing: 'linear',
+
+ animationDuration: 1000
+ }
+
+ });
+
+
+
+/***/ },
+/* 232 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var graphic = __webpack_require__(42);
+ var modelUtil = __webpack_require__(5);
+ var zrUtil = __webpack_require__(3);
+
+ var SankeyShape = graphic.extendShape({
+ shape: {
+ x1: 0, y1: 0,
+ x2: 0, y2: 0,
+ cpx1: 0, cpy1: 0,
+ cpx2: 0, cpy2: 0,
+
+ extent: 0
+ },
+
+ buildPath: function (ctx, shape) {
+ var halfExtent = shape.extent / 2;
+ ctx.moveTo(shape.x1, shape.y1 - halfExtent);
+ ctx.bezierCurveTo(
+ shape.cpx1, shape.cpy1 - halfExtent,
+ shape.cpx2, shape.cpy2 - halfExtent,
+ shape.x2, shape.y2 - halfExtent
+ );
+ ctx.lineTo(shape.x2, shape.y2 + halfExtent);
+ ctx.bezierCurveTo(
+ shape.cpx2, shape.cpy2 + halfExtent,
+ shape.cpx1, shape.cpy1 + halfExtent,
+ shape.x1, shape.y1 + halfExtent
+ );
+ ctx.closePath();
+ }
+ });
+
+ module.exports = __webpack_require__(1).extendChartView({
+
+ type: 'sankey',
+
+ /**
+ * @private
+ * @type {module:echarts/chart/sankey/SankeySeries}
+ */
+ _model: null,
+
+ render: function(seriesModel, ecModel, api) {
+ var graph = seriesModel.getGraph();
+ var group = this.group;
+ var layoutInfo = seriesModel.layoutInfo;
+
+ this._model = seriesModel;
+
+ group.removeAll();
+
+ group.position = [layoutInfo.x, layoutInfo.y];
+
+ var edgeData = graph.edgeData;
+ var rawOption = seriesModel.option;
+ var formatModel = modelUtil.createDataFormatModel(
+ seriesModel, edgeData, rawOption.edges || rawOption.links
+ );
+
+ formatModel.formatTooltip = function (dataIndex) {
+ var params = this.getDataParams(dataIndex);
+ var rawDataOpt = params.data;
+ var html = rawDataOpt.source + ' -- ' + rawDataOpt.target;
+ if (params.value) {
+ html += ':' + params.value;
+ }
+ return html;
+ };
+
+ // generate a rect for each node
+ graph.eachNode(function (node) {
+ var layout = node.getLayout();
+ var itemModel = node.getModel();
+ var labelModel = itemModel.getModel('label.normal');
+ var textStyleModel = labelModel.getModel('textStyle');
+ var labelHoverModel = itemModel.getModel('label.emphasis');
+ var textStyleHoverModel = labelHoverModel.getModel('textStyle');
+
+ var rect = new graphic.Rect({
+ shape: {
+ x: layout.x,
+ y: layout.y,
+ width: node.getLayout().dx,
+ height: node.getLayout().dy
+ },
+ style: {
+ // Get formatted label in label.normal option. Use node id if it is not specified
+ text: labelModel.get('show')
+ ? seriesModel.getFormattedLabel(node.dataIndex, 'normal') || node.id
+ // Use empty string to hide the label
+ : '',
+ textFont: textStyleModel.getFont(),
+ textFill: textStyleModel.getTextColor(),
+ textPosition: labelModel.get('position')
+ }
+ });
+
+ rect.setStyle(zrUtil.defaults(
+ {
+ fill: node.getVisual('color')
+ },
+ itemModel.getModel('itemStyle.normal').getItemStyle()
+ ));
+
+ graphic.setHoverStyle(rect, zrUtil.extend(
+ node.getModel('itemStyle.emphasis'),
+ {
+ text: labelHoverModel.get('show')
+ ? seriesModel.getFormattedLabel(node.dataIndex, 'emphasis') || node.id
+ : '',
+ textFont: textStyleHoverModel.getFont(),
+ textFill: textStyleHoverModel.getTextColor(),
+ textPosition: labelHoverModel.get('position')
+ }
+ ));
+
+ group.add(rect);
+ });
+
+ // generate a bezire Curve for each edge
+ graph.eachEdge(function (edge) {
+ var curve = new SankeyShape();
+
+ curve.dataIndex = edge.dataIndex;
+ curve.dataModel = formatModel;
+
+ var lineStyleModel = edge.getModel('lineStyle.normal');
+ var curvature = lineStyleModel.get('curveness');
+ var n1Layout = edge.node1.getLayout();
+ var n2Layout = edge.node2.getLayout();
+ var edgeLayout = edge.getLayout();
+
+ curve.shape.extent = Math.max(1, edgeLayout.dy);
+
+ var x1 = n1Layout.x + n1Layout.dx;
+ var y1 = n1Layout.y + edgeLayout.sy + edgeLayout.dy / 2;
+ var x2 = n2Layout.x;
+ var y2 = n2Layout.y + edgeLayout.ty + edgeLayout.dy /2;
+ var cpx1 = x1 * (1 - curvature) + x2 * curvature;
+ var cpy1 = y1;
+ var cpx2 = x1 * curvature + x2 * (1 - curvature);
+ var cpy2 = y2;
+
+ curve.setShape({
+ x1: x1,
+ y1: y1,
+ x2: x2,
+ y2: y2,
+ cpx1: cpx1,
+ cpy1: cpy1,
+ cpx2: cpx2,
+ cpy2: cpy2
+ });
+
+ curve.setStyle(lineStyleModel.getItemStyle());
+ graphic.setHoverStyle(curve, edge.getModel('lineStyle.emphasis').getItemStyle());
+
+ group.add(curve);
+
+ });
+ if (!this._data) {
+ group.setClipPath(createGridClipShape(group.getBoundingRect(), seriesModel, function () {
+ group.removeClipPath();
+ }));
+ }
+ this._data = seriesModel.getData();
+ }
+ });
+
+ //add animation to the view
+ function createGridClipShape(rect, seriesModel, cb) {
+ var rectEl = new graphic.Rect({
+ shape: {
+ x: rect.x - 10,
+ y: rect.y - 10,
+ width: 0,
+ height: rect.height + 20
+ }
+ });
+ graphic.initProps(rectEl, {
+ shape: {
+ width: rect.width + 20,
+ height: rect.height + 20
+ }
+ }, seriesModel, cb);
+
+ return rectEl;
+ }
+
+
+/***/ },
+/* 233 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var layout = __webpack_require__(21);
+ var nest = __webpack_require__(234);
+ var zrUtil = __webpack_require__(3);
+
+ module.exports = function (ecModel, api) {
+
+ ecModel.eachSeriesByType('sankey', function (seriesModel) {
+
+ var nodeWidth = seriesModel.get('nodeWidth');
+ var nodeGap = seriesModel.get('nodeGap');
+
+ var layoutInfo = getViewRect(seriesModel, api);
+
+ seriesModel.layoutInfo = layoutInfo;
+
+ var width = layoutInfo.width;
+ var height = layoutInfo.height;
+
+ var graph = seriesModel.getGraph();
+
+ var nodes = graph.nodes;
+ var edges = graph.edges;
+
+ computeNodeValues(nodes);
+
+ var filteredNodes = nodes.filter(function (node) {
+ return node.getLayout().value === 0;
+ });
+
+ var iterations = filteredNodes.length !== 0
+ ? 0 : seriesModel.get('layoutIterations');
+
+ layoutSankey(nodes, edges, nodeWidth, nodeGap, width, height, iterations);
+ });
+ };
+
+ /**
+ * get the layout position of the whole view.
+ */
+ function getViewRect(seriesModel, api) {
+ return layout.getLayoutRect(
+ seriesModel.getBoxLayoutParams(), {
+ width: api.getWidth(),
+ height: api.getHeight()
+ }
+ );
+ }
+
+ function layoutSankey(nodes, edges, nodeWidth, nodeGap, width, height, iterations) {
+ computeNodeBreadths(nodes, nodeWidth, width);
+ computeNodeDepths(nodes, edges, height, nodeGap, iterations);
+ computeEdgeDepths(nodes);
+ }
+
+ /**
+ * compute the value of each node by summing the associated edge's value.
+ * @param {module:echarts/data/Graph~Node} nodes
+ */
+ function computeNodeValues(nodes) {
+ zrUtil.each(nodes, function (node) {
+ var value1 = sum(node.outEdges, getEdgeValue);
+ var value2 = sum(node.inEdges, getEdgeValue);
+ var value = Math.max(value1, value2);
+ node.setLayout({value: value}, true);
+ });
+ }
+
+ /**
+ * compute the x-position for each node.
+ * @param {module:echarts/data/Graph~Node} nodes
+ * @param {number} nodeWidth
+ * @param {number} width
+ */
+ function computeNodeBreadths(nodes, nodeWidth, width) {
+ var remainNodes = nodes;
+ var nextNode = null;
+ var x = 0;
+ var kx = 0;
+
+ while (remainNodes.length) {
+ nextNode = [];
+
+ for (var i = 0, len = remainNodes.length; i < len; i++) {
+ var node = remainNodes[i];
+ node.setLayout({x: x}, true);
+ node.setLayout({dx: nodeWidth}, true);
+
+ for (var j = 0, lenj = node.outEdges.length; j < lenj; j++) {
+ nextNode.push(node.outEdges[j].node2);
+ }
+ }
+ remainNodes = nextNode;
+ ++x;
+ }
+
+ moveSinksRight(nodes, x);
+ kx = (width - nodeWidth) / (x - 1);
+
+ scaleNodeBreadths(nodes, kx);
+ }
+
+ /**
+ * all the node without outEgdes are assigned maximum breadth and
+ * be aligned in the last column.
+ * @param {module:echarts/data/Graph~Node} nodes
+ * @param {number} x
+ */
+ function moveSinksRight(nodes, x) {
+ zrUtil.each(nodes, function (node) {
+ if(!node.outEdges.length) {
+ node.setLayout({x: x-1}, true);
+ }
+ });
+ }
+
+ /**
+ * scale node x-position to the width.
+ * @param {module:echarts/data/Graph~Node} nodes
+ * @param {number} kx
+ */
+ function scaleNodeBreadths(nodes, kx) {
+ zrUtil.each(nodes, function(node) {
+ var nodeX = node.getLayout().x * kx;
+ node.setLayout({x: nodeX}, true);
+ });
+ }
+
+ /**
+ * using Gauss-Seidel iterations method to compute the node depth(y-position).
+ * @param {module:echarts/data/Graph~Node} nodes
+ * @param {module:echarts/data/Graph~Edge} edges
+ * @param {number} height
+ * @param {numbber} nodeGap
+ * @param {number} iterations
+ */
+ function computeNodeDepths(nodes, edges, height, nodeGap, iterations) {
+ var nodesByBreadth = nest()
+ .key(function (d) {
+ return d.getLayout().x;
+ })
+ .sortKeys(ascending)
+ .entries(nodes)
+ .map(function (d) {
+ return d.values;
+ });
+
+ initializeNodeDepth(nodes, nodesByBreadth, edges, height, nodeGap);
+ resolveCollisions(nodesByBreadth, nodeGap, height);
+
+ for (var alpha = 1; iterations > 0; iterations--) {
+ alpha *= 0.99;
+ relaxRightToLeft(nodesByBreadth, alpha);
+ resolveCollisions(nodesByBreadth, nodeGap, height);
+ relaxLeftToRight(nodesByBreadth, alpha);
+ resolveCollisions(nodesByBreadth, nodeGap, height);
+ }
+ }
+
+ /**
+ * compute the original y-position for each node.
+ * @param {module:echarts/data/Graph~Node} nodes
+ * @param {Array.<Array.<module:echarts/data/Graph~Node>>} nodesByBreadth
+ * @param {module:echarts/data/Graph~Edge} edges
+ * @param {number} height
+ * @param {number} nodeGap
+ */
+ function initializeNodeDepth(nodes, nodesByBreadth, edges, height, nodeGap) {
+ var kyArray = [];
+ zrUtil.each(nodesByBreadth, function (nodes) {
+ var n = nodes.length;
+ var sum = 0;
+ zrUtil.each(nodes, function (node) {
+ sum += node.getLayout().value;
+ });
+ var ky = (height - (n-1) * nodeGap) / sum;
+ kyArray.push(ky);
+ });
+ kyArray.sort(function (a, b) {
+ return a - b;
+ });
+ var ky0 = kyArray[0];
+
+ zrUtil.each(nodesByBreadth, function (nodes) {
+ zrUtil.each(nodes, function (node, i) {
+ node.setLayout({y: i}, true);
+ var nodeDy = node.getLayout().value * ky0;
+ node.setLayout({dy: nodeDy}, true);
+ });
+ });
+
+ zrUtil.each(edges, function (edge) {
+ var edgeDy = +edge.getValue() * ky0;
+ edge.setLayout({dy: edgeDy}, true);
+ });
+ }
+
+ /**
+ * resolve the collision of initialized depth.
+ * @param {Array.<Array.<module:echarts/data/Graph~Node>>} nodesByBreadth
+ * @param {number} nodeGap
+ * @param {number} height
+ */
+ function resolveCollisions(nodesByBreadth, nodeGap, height) {
+ zrUtil.each(nodesByBreadth, function (nodes) {
+ var node;
+ var dy;
+ var y0 = 0;
+ var n = nodes.length;
+ var i;
+
+ nodes.sort(ascendingDepth);
+
+ for (i = 0; i < n; i++) {
+ node = nodes[i];
+ dy = y0 - node.getLayout().y;
+ if(dy > 0) {
+ var nodeY = node.getLayout().y + dy;
+ node.setLayout({y: nodeY}, true);
+ }
+ y0 = node.getLayout().y + node.getLayout().dy + nodeGap;
+ }
+
+ // if the bottommost node goes outside the biunds, push it back up
+ dy = y0 - nodeGap - height;
+ if (dy > 0) {
+ var nodeY = node.getLayout().y -dy;
+ node.setLayout({y: nodeY}, true);
+ y0 = node.getLayout().y;
+ for (i = n - 2; i >= 0; --i) {
+ node = nodes[i];
+ dy = node.getLayout().y + node.getLayout().dy + nodeGap - y0;
+ if (dy > 0) {
+ nodeY = node.getLayout().y - dy;
+ node.setLayout({y: nodeY}, true);
+ }
+ y0 = node.getLayout().y;
+ }
+ }
+ });
+ }
+
+ /**
+ * change the y-position of the nodes, except most the right side nodes.
+ * @param {Array.<Array.<module:echarts/data/Graph~Node>>} nodesByBreadth
+ * @param {number} alpha
+ */
+ function relaxRightToLeft(nodesByBreadth, alpha) {
+ zrUtil.each(nodesByBreadth.slice().reverse(), function (nodes) {
+ zrUtil.each(nodes, function (node) {
+ if (node.outEdges.length) {
+ var y = sum(node.outEdges, weightedTarget) / sum(node.outEdges, getEdgeValue);
+ var nodeY = node.getLayout().y + (y - center(node)) * alpha;
+ node.setLayout({y: nodeY}, true);
+ }
+ });
+ });
+ }
+
+ function weightedTarget(edge) {
+ return center(edge.node2) * edge.getValue();
+ }
+
+ /**
+ * change the y-position of the nodes, except most the left side nodes.
+ * @param {Array.<Array.<module:echarts/data/Graph~Node>>} nodesByBreadth
+ * @param {number} alpha
+ */
+ function relaxLeftToRight(nodesByBreadth, alpha) {
+ zrUtil.each(nodesByBreadth, function (nodes) {
+ zrUtil.each(nodes, function (node) {
+ if (node.inEdges.length) {
+ var y = sum(node.inEdges, weightedSource) / sum(node.inEdges, getEdgeValue);
+ var nodeY = node.getLayout().y + (y - center(node)) * alpha;
+ node.setLayout({y: nodeY}, true);
+ }
+ });
+ });
+ }
+
+ function weightedSource(edge) {
+ return center(edge.node1) * edge.getValue();
+ }
+
+ /**
+ * compute the depth(y-position) of each edge.
+ * @param {module:echarts/data/Graph~Node} nodes
+ */
+ function computeEdgeDepths(nodes) {
+ zrUtil.each(nodes, function (node) {
+ node.outEdges.sort(ascendingTargetDepth);
+ node.inEdges.sort(ascendingSourceDepth);
+ });
+ zrUtil.each(nodes, function (node) {
+ var sy = 0;
+ var ty = 0;
+ zrUtil.each(node.outEdges, function (edge) {
+ edge.setLayout({sy: sy}, true);
+ sy += edge.getLayout().dy;
+ });
+ zrUtil.each(node.inEdges, function (edge) {
+ edge.setLayout({ty: ty}, true);
+ ty += edge.getLayout().dy;
+ });
+ });
+ }
+
+ function ascendingTargetDepth(a, b) {
+ return a.node2.getLayout().y - b.node2.getLayout().y;
+ }
+
+ function ascendingSourceDepth(a, b) {
+ return a.node1.getLayout().y - b.node1.getLayout().y;
+ }
+
+ function sum(array, f) {
+ var s = 0;
+ var n = array.length;
+ var a;
+ var i = -1;
+ if (arguments.length === 1) {
+ while (++i < n) {
+ a = +array[i];
+ if (!isNaN(a)) {
+ s += a;
+ }
+ }
+ }
+ else {
+ while (++i < n) {
+ a = +f.call(array, array[i], i);
+ if(!isNaN(a)) {
+ s += a;
+ }
+ }
+ }
+ return s;
+ }
+
+ function center(node) {
+ return node.getLayout().y + node.getLayout().dy / 2;
+ }
+
+ function ascendingDepth(a, b) {
+ return a.getLayout().y - b.getLayout().y;
+ }
+
+ function ascending(a, b) {
+ return a < b ? -1 : a > b ? 1 : a == b ? 0 : NaN;
+ }
+
+ function getEdgeValue(edge) {
+ return edge.getValue();
+ }
+
+
+
+/***/ },
+/* 234 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+
+ /**
+ * nest helper used to group by the array.
+ * can specified the keys and sort the keys.
+ */
+ function nest() {
+
+ var keysFunction = [];
+ var sortKeysFunction = [];
+
+ /**
+ * map an Array into the mapObject.
+ * @param {Array} array
+ * @param {number} depth
+ */
+ function map(array, depth) {
+ if (depth >= keysFunction.length) {
+ return array;
+ }
+ var i = -1;
+ var n = array.length;
+ var keyFunction = keysFunction[depth++];
+ var mapObject = {};
+ var valuesByKey = {};
+
+ while (++i < n) {
+ var keyValue = keyFunction(array[i]);
+ var values = valuesByKey[keyValue];
+
+ if (values) {
+ values.push(array[i]);
+ }
+ else {
+ valuesByKey[keyValue] = [array[i]];
+ }
+ }
+
+ zrUtil.each(valuesByKey, function (value, key) {
+ mapObject[key] = map(value, depth);
+ });
+
+ return mapObject;
+ }
+
+ /**
+ * transform the Map Object to multidimensional Array
+ * @param {Object} map
+ * @param {number} depth
+ */
+ function entriesMap(mapObject, depth) {
+ if (depth >= keysFunction.length) {
+ return mapObject;
+ }
+ var array = [];
+ var sortKeyFunction = sortKeysFunction[depth++];
+
+ zrUtil.each(mapObject, function (value, key) {
+ array.push({
+ key: key, values: entriesMap(value, depth)
+ });
+ });
+
+ if (sortKeyFunction) {
+ return array.sort(function (a, b) {
+ return sortKeyFunction(a.key, b.key);
+ });
+ }
+ else {
+ return array;
+ }
+ }
+
+ return {
+ /**
+ * specified the key to groupby the arrays.
+ * users can specified one more keys.
+ * @param {Function} d
+ */
+ key: function (d) {
+ keysFunction.push(d);
+ return this;
+ },
+
+ /**
+ * specified the comparator to sort the keys
+ * @param {Function} order
+ */
+ sortKeys: function (order) {
+ sortKeysFunction[keysFunction.length - 1] = order;
+ return this;
+ },
+
+ /**
+ * the array to be grouped by.
+ * @param {Array} array
+ */
+ entries: function (array) {
+ return entriesMap(map(array, 0), 0);
+ }
+ };
+ }
+ module.exports = nest;
+
+
+/***/ },
+/* 235 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var VisualMapping = __webpack_require__(187);
+
+ module.exports = function (ecModel, payload) {
+ ecModel.eachSeriesByType('sankey', function (seriesModel) {
+ var graph = seriesModel.getGraph();
+ var nodes = graph.nodes;
+
+ nodes.sort(function (a, b) {
+ return a.getLayout().value - b.getLayout().value;
+ });
+
+ var minValue = nodes[0].getLayout().value;
+ var maxValue = nodes[nodes.length - 1].getLayout().value;
+
+ nodes.forEach(function (node) {
+ var mapping = new VisualMapping({
+ type: 'color',
+ mappingMethod: 'linear',
+ dataExtent: [minValue, maxValue],
+ visual: seriesModel.get('color')
+ });
+
+ var mapValueToColor = mapping.mapValueToVisual(node.getLayout().value);
+ node.setVisual('color', mapValueToColor);
+ });
+
+ }) ;
+ };
+
+
+/***/ },
+/* 236 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var echarts = __webpack_require__(1);
+
+ __webpack_require__(237);
+ __webpack_require__(240);
+
+ echarts.registerVisualCoding('chart', __webpack_require__(241));
+ echarts.registerLayout(__webpack_require__(242));
+
+
+
+/***/ },
+/* 237 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var zrUtil = __webpack_require__(3);
+ var SeriesModel = __webpack_require__(27);
+ var whiskerBoxCommon = __webpack_require__(238);
+
+ var BoxplotSeries = SeriesModel.extend({
+
+ type: 'series.boxplot',
+
+ dependencies: ['xAxis', 'yAxis', 'grid'],
+
+ // TODO
+ // box width represents group size, so dimension should have 'size'.
+
+ /**
+ * @see <https://en.wikipedia.org/wiki/Box_plot>
+ * The meanings of 'min' and 'max' depend on user,
+ * and echarts do not need to know it.
+ * @readOnly
+ */
+ valueDimensions: ['min', 'Q1', 'median', 'Q3', 'max'],
+
+ /**
+ * @type {Array.<string>}
+ * @readOnly
+ */
+ dimensions: null,
+
+ /**
+ * @override
+ */
+ defaultOption: {
+ zlevel: 0, // 一级层å 
+ z: 2, // 二级层å 
+ coordinateSystem: 'cartesian2d',
+ legendHoverLink: true,
+
+ hoverAnimation: true,
+
+ xAxisIndex: 0,
+ yAxisIndex: 0,
+
+ layout: null, // 'horizontal' or 'vertical'
+ boxWidth: [7, 50], // [min, max] can be percent of band width.
+
+ itemStyle: {
+ normal: {
+ color: '#fff',
+ borderWidth: 1
+ },
+ emphasis: {
+ borderWidth: 2,
+ shadowBlur: 5,
+ shadowOffsetX: 2,
+ shadowOffsetY: 2,
+ shadowColor: 'rgba(0,0,0,0.4)'
+ }
+ },
+
+ animationEasing: 'elasticOut',
+ animationDuration: 800
+ }
+ });
+
+ zrUtil.mixin(BoxplotSeries, whiskerBoxCommon.seriesModelMixin, true);
+
+ module.exports = BoxplotSeries;
+
+
+
+/***/ },
+/* 238 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var List = __webpack_require__(94);
+ var completeDimensions = __webpack_require__(96);
+ var WhiskerBoxDraw = __webpack_require__(239);
+ var zrUtil = __webpack_require__(3);
+
+ function getItemValue(item) {
+ return item.value == null ? item : item.value;
+ }
+
+ var seriesModelMixin = {
+
+ /**
+ * @private
+ * @type {string}
+ */
+ _baseAxisDim: null,
+
+ /**
+ * @override
+ */
+ getInitialData: function (option, ecModel) {
+ // When both types of xAxis and yAxis are 'value', layout is
+ // needed to be specified by user. Otherwise, layout can be
+ // judged by which axis is category.
+
+ var categories;
+
+ var xAxisModel = ecModel.getComponent('xAxis', this.get('xAxisIndex'));
+ var yAxisModel = ecModel.getComponent('yAxis', this.get('yAxisIndex'));
+ var xAxisType = xAxisModel.get('type');
+ var yAxisType = yAxisModel.get('type');
+ var addOrdinal;
+
+ // FIXME
+ // 考虑时间轴
+
+ if (xAxisType === 'category') {
+ option.layout = 'horizontal';
+ categories = xAxisModel.getCategories();
+ addOrdinal = true;
+ }
+ else if (yAxisType === 'category') {
+ option.layout = 'vertical';
+ categories = yAxisModel.getCategories();
+ addOrdinal = true;
+ }
+ else {
+ option.layout = option.layout || 'horizontal';
+ }
+
+ this._baseAxisDim = option.layout === 'horizontal' ? 'x' : 'y';
+
+ var data = option.data;
+ var dimensions = this.dimensions = ['base'].concat(this.valueDimensions);
+ completeDimensions(dimensions, data);
+
+ var list = new List(dimensions, this);
+ list.initData(data, categories ? categories.slice() : null, function (dataItem, dimName, idx, dimIdx) {
+ var value = getItemValue(dataItem);
+ return addOrdinal ? (dimName === 'base' ? idx : value[dimIdx - 1]) : value[dimIdx];
+ });
+
+ return list;
+ },
+
+ /**
+ * Used by Gird.
+ * @param {string} axisDim 'x' or 'y'
+ * @return {Array.<string>} dimensions on the axis.
+ */
+ coordDimToDataDim: function (axisDim) {
+ var dims = this.valueDimensions.slice();
+ var baseDim = ['base'];
+ var map = {
+ horizontal: {x: baseDim, y: dims},
+ vertical: {x: dims, y: baseDim}
+ };
+ return map[this.get('layout')][axisDim];
+ },
+
+ /**
+ * @override
+ * @param {string|number} dataDim
+ * @return {string} coord dimension
+ */
+ dataDimToCoordDim: function (dataDim) {
+ var dim;
+
+ zrUtil.each(['x', 'y'], function (coordDim, index) {
+ var dataDims = this.coordDimToDataDim(coordDim);
+ if (zrUtil.indexOf(dataDims, dataDim) >= 0) {
+ dim = coordDim;
+ }
+ }, this);
+
+ return dim;
+ },
+
+ /**
+ * If horizontal, base axis is x, otherwise y.
+ * @override
+ */
+ getBaseAxis: function () {
+ var dim = this._baseAxisDim;
+ return this.ecModel.getComponent(dim + 'Axis', this.get(dim + 'AxisIndex')).axis;
+ }
+ };
+
+ var viewMixin = {
+
+ init: function () {
+ /**
+ * Old data.
+ * @private
+ * @type {module:echarts/chart/helper/WhiskerBoxDraw}
+ */
+ var whiskerBoxDraw = this._whiskerBoxDraw = new WhiskerBoxDraw(
+ this.getStyleUpdater()
+ );
+ this.group.add(whiskerBoxDraw.group);
+ },
+
+ render: function (seriesModel, ecModel, api) {
+ this._whiskerBoxDraw.updateData(seriesModel.getData());
+ },
+
+ remove: function (ecModel) {
+ this._whiskerBoxDraw.remove();
+ }
+ };
+
+ module.exports = {
+ seriesModelMixin: seriesModelMixin,
+ viewMixin: viewMixin
+ };
+
+
+/***/ },
+/* 239 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @module echarts/chart/helper/Symbol
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+ var graphic = __webpack_require__(42);
+ var Path = __webpack_require__(44);
+
+ var WhiskerPath = Path.extend({
+
+ type: 'whiskerInBox',
+
+ shape: {},
+
+ buildPath: function (ctx, shape) {
+ for (var i in shape) {
+ if (i.indexOf('ends') === 0) {
+ var pts = shape[i];
+ ctx.moveTo(pts[0][0], pts[0][1]);
+ ctx.lineTo(pts[1][0], pts[1][1]);
+ }
+ }
+ }
+ });
+
+ /**
+ * @constructor
+ * @alias {module:echarts/chart/helper/WhiskerBox}
+ * @param {module:echarts/data/List} data
+ * @param {number} idx
+ * @param {Function} styleUpdater
+ * @param {boolean} isInit
+ * @extends {module:zrender/graphic/Group}
+ */
+ function WhiskerBox(data, idx, styleUpdater, isInit) {
+ graphic.Group.call(this);
+
+ /**
+ * @type {number}
+ * @readOnly
+ */
+ this.bodyIndex;
+
+ /**
+ * @type {number}
+ * @readOnly
+ */
+ this.whiskerIndex;
+
+ /**
+ * @type {Function}
+ */
+ this.styleUpdater = styleUpdater;
+
+ this._createContent(data, idx, isInit);
+
+ this.updateData(data, idx, isInit);
+
+ /**
+ * Last series model.
+ * @type {module:echarts/model/Series}
+ */
+ this._seriesModel;
+ }
+
+ var whiskerBoxProto = WhiskerBox.prototype;
+
+ whiskerBoxProto._createContent = function (data, idx, isInit) {
+ var itemLayout = data.getItemLayout(idx);
+ var constDim = itemLayout.chartLayout === 'horizontal' ? 1 : 0;
+ var count = 0;
+
+ // Whisker element.
+ this.add(new graphic.Polygon({
+ shape: {
+ points: isInit
+ ? transInit(itemLayout.bodyEnds, constDim, itemLayout)
+ : itemLayout.bodyEnds
+ },
+ style: {strokeNoScale: true},
+ z2: 100
+ }));
+ this.bodyIndex = count++;
+
+ // Box element.
+ var whiskerEnds = zrUtil.map(itemLayout.whiskerEnds, function (ends) {
+ return isInit ? transInit(ends, constDim, itemLayout) : ends;
+ });
+ this.add(new WhiskerPath({
+ shape: makeWhiskerEndsShape(whiskerEnds),
+ style: {strokeNoScale: true},
+ z2: 100
+ }));
+ this.whiskerIndex = count++;
+ };
+
+ function transInit(points, dim, itemLayout) {
+ return zrUtil.map(points, function (point) {
+ point = point.slice();
+ point[dim] = itemLayout.initBaseline;
+ return point;
+ });
+ }
+
+ function makeWhiskerEndsShape(whiskerEnds) {
+ // zr animation only support 2-dim array.
+ var shape = {};
+ zrUtil.each(whiskerEnds, function (ends, i) {
+ shape['ends' + i] = ends;
+ });
+ return shape;
+ }
+
+ /**
+ * Update symbol properties
+ * @param {module:echarts/data/List} data
+ * @param {number} idx
+ */
+ whiskerBoxProto.updateData = function (data, idx, isInit) {
+ var seriesModel = this._seriesModel = data.hostModel;
+ var itemLayout = data.getItemLayout(idx);
+ var updateMethod = graphic[isInit ? 'initProps' : 'updateProps'];
+ // this.childAt(this.bodyIndex).stopAnimation(true);
+ // this.childAt(this.whiskerIndex).stopAnimation(true);
+ updateMethod(
+ this.childAt(this.bodyIndex),
+ {shape: {points: itemLayout.bodyEnds}},
+ seriesModel
+ );
+ updateMethod(
+ this.childAt(this.whiskerIndex),
+ {shape: makeWhiskerEndsShape(itemLayout.whiskerEnds)},
+ seriesModel
+ );
+
+ this.styleUpdater.call(null, this, data, idx);
+ };
+
+ zrUtil.inherits(WhiskerBox, graphic.Group);
+
+
+ /**
+ * @constructor
+ * @alias module:echarts/chart/helper/WhiskerBoxDraw
+ */
+ function WhiskerBoxDraw(styleUpdater) {
+ this.group = new graphic.Group();
+ this.styleUpdater = styleUpdater;
+ }
+
+ var whiskerBoxDrawProto = WhiskerBoxDraw.prototype;
+
+ /**
+ * Update symbols draw by new data
+ * @param {module:echarts/data/List} data
+ */
+ whiskerBoxDrawProto.updateData = function (data) {
+ var group = this.group;
+ var oldData = this._data;
+ var styleUpdater = this.styleUpdater;
+
+ data.diff(oldData)
+ .add(function (newIdx) {
+ if (data.hasValue(newIdx)) {
+ var symbolEl = new WhiskerBox(data, newIdx, styleUpdater, true);
+ data.setItemGraphicEl(newIdx, symbolEl);
+ group.add(symbolEl);
+ }
+ })
+ .update(function (newIdx, oldIdx) {
+ var symbolEl = oldData.getItemGraphicEl(oldIdx);
+
+ // Empty data
+ if (!data.hasValue(newIdx)) {
+ group.remove(symbolEl);
+ return;
+ }
+
+ if (!symbolEl) {
+ symbolEl = new WhiskerBox(data, newIdx, styleUpdater);
+ }
+ else {
+ symbolEl.updateData(data, newIdx);
+ }
+
+ // Add back
+ group.add(symbolEl);
+
+ data.setItemGraphicEl(newIdx, symbolEl);
+ })
+ .remove(function (oldIdx) {
+ var el = oldData.getItemGraphicEl(oldIdx);
+ el && group.remove(el);
+ })
+ .execute();
+
+ this._data = data;
+ };
+
+ /**
+ * Remove symbols.
+ * @param {module:echarts/data/List} data
+ */
+ whiskerBoxDrawProto.remove = function () {
+ var group = this.group;
+ var data = this._data;
+ this._data = null;
+ data && data.eachItemGraphicEl(function (el) {
+ el && group.remove(el);
+ });
+ };
+
+ module.exports = WhiskerBoxDraw;
+
+
+/***/ },
+/* 240 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var zrUtil = __webpack_require__(3);
+ var ChartView = __webpack_require__(41);
+ var graphic = __webpack_require__(42);
+ var whiskerBoxCommon = __webpack_require__(238);
+
+ var BoxplotView = ChartView.extend({
+
+ type: 'boxplot',
+
+ getStyleUpdater: function () {
+ return updateStyle;
+ }
+ });
+
+ zrUtil.mixin(BoxplotView, whiskerBoxCommon.viewMixin, true);
+
+ // Update common properties
+ var normalStyleAccessPath = ['itemStyle', 'normal'];
+ var emphasisStyleAccessPath = ['itemStyle', 'emphasis'];
+
+ function updateStyle(itemGroup, data, idx) {
+ var itemModel = data.getItemModel(idx);
+ var normalItemStyleModel = itemModel.getModel(normalStyleAccessPath);
+ var borderColor = data.getItemVisual(idx, 'color');
+
+ // Exclude borderColor.
+ var itemStyle = normalItemStyleModel.getItemStyle(['borderColor']);
+
+ var whiskerEl = itemGroup.childAt(itemGroup.whiskerIndex);
+ whiskerEl.style.set(itemStyle);
+ whiskerEl.style.stroke = borderColor;
+ whiskerEl.dirty();
+
+ var bodyEl = itemGroup.childAt(itemGroup.bodyIndex);
+ bodyEl.style.set(itemStyle);
+ bodyEl.style.stroke = borderColor;
+ bodyEl.dirty();
+
+ var hoverStyle = itemModel.getModel(emphasisStyleAccessPath).getItemStyle();
+ graphic.setHoverStyle(itemGroup, hoverStyle);
+ }
+
+ module.exports = BoxplotView;
+
+
+
+/***/ },
+/* 241 */
+/***/ function(module, exports) {
+
+
+
+ var borderColorQuery = ['itemStyle', 'normal', 'borderColor'];
+
+ module.exports = function (ecModel, api) {
+
+ var globalColors = ecModel.get('color');
+
+ ecModel.eachRawSeriesByType('boxplot', function (seriesModel) {
+
+ var defaulColor = globalColors[seriesModel.seriesIndex % globalColors.length];
+ var data = seriesModel.getData();
+
+ data.setVisual({
+ legendSymbol: 'roundRect',
+ // Use name 'color' but not 'borderColor' for legend usage and
+ // visual coding from other component like dataRange.
+ color: seriesModel.get(borderColorQuery) || defaulColor
+ });
+
+ // Only visible series has each data be visual encoded
+ if (!ecModel.isSeriesFiltered(seriesModel)) {
+ data.each(function (idx) {
+ var itemModel = data.getItemModel(idx);
+ data.setItemVisual(
+ idx,
+ {color: itemModel.get(borderColorQuery, true)}
+ );
+ });
+ }
+ });
+
+ };
+
+
+/***/ },
+/* 242 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var numberUtil = __webpack_require__(7);
+ var parsePercent = numberUtil.parsePercent;
+ var each = zrUtil.each;
+
+ module.exports = function (ecModel, api) {
+
+ var groupResult = groupSeriesByAxis(ecModel);
+
+ each(groupResult, function (groupItem) {
+ var seriesModels = groupItem.seriesModels;
+
+ if (!seriesModels.length) {
+ return;
+ }
+
+ calculateBase(groupItem);
+
+ each(seriesModels, function (seriesModel, idx) {
+ layoutSingleSeries(
+ seriesModel,
+ groupItem.boxOffsetList[idx],
+ groupItem.boxWidthList[idx]
+ );
+ });
+ });
+ };
+
+ /**
+ * Group series by axis.
+ */
+ function groupSeriesByAxis(ecModel) {
+ var result = [];
+ var axisList = [];
+
+ ecModel.eachSeriesByType('boxplot', function (seriesModel) {
+ var baseAxis = seriesModel.getBaseAxis();
+ var idx = zrUtil.indexOf(axisList, baseAxis);
+
+ if (idx < 0) {
+ idx = axisList.length;
+ axisList[idx] = baseAxis;
+ result[idx] = {axis: baseAxis, seriesModels: []};
+ }
+
+ result[idx].seriesModels.push(seriesModel);
+ });
+
+ return result;
+ }
+
+ /**
+ * Calculate offset and box width for each series.
+ */
+ function calculateBase(groupItem) {
+ var extent;
+ var baseAxis = groupItem.axis;
+ var seriesModels = groupItem.seriesModels;
+ var seriesCount = seriesModels.length;
+
+ var boxWidthList = groupItem.boxWidthList = [];
+ var boxOffsetList = groupItem.boxOffsetList = [];
+ var boundList = [];
+
+ var bandWidth;
+ if (baseAxis.type === 'category') {
+ bandWidth = baseAxis.getBandWidth();
+ }
+ else {
+ var maxDataCount = 0;
+ each(seriesModels, function (seriesModel) {
+ maxDataCount = Math.max(maxDataCount, seriesModel.getData().count());
+ });
+ extent = baseAxis.getExtent(),
+ Math.abs(extent[1] - extent[0]) / maxDataCount;
+ }
+
+ each(seriesModels, function (seriesModel) {
+ var boxWidthBound = seriesModel.get('boxWidth');
+ if (!zrUtil.isArray(boxWidthBound)) {
+ boxWidthBound = [boxWidthBound, boxWidthBound];
+ }
+ boundList.push([
+ parsePercent(boxWidthBound[0], bandWidth) || 0,
+ parsePercent(boxWidthBound[1], bandWidth) || 0
+ ]);
+ });
+
+ var availableWidth = bandWidth * 0.8 - 2;
+ var boxGap = availableWidth / seriesCount * 0.3;
+ var boxWidth = (availableWidth - boxGap * (seriesCount - 1)) / seriesCount;
+ var base = boxWidth / 2 - availableWidth / 2;
+
+ each(seriesModels, function (seriesModel, idx) {
+ boxOffsetList.push(base);
+ base += boxGap + boxWidth;
+
+ boxWidthList.push(
+ Math.min(Math.max(boxWidth, boundList[idx][0]), boundList[idx][1])
+ );
+ });
+ }
+
+ /**
+ * Calculate points location for each series.
+ */
+ function layoutSingleSeries(seriesModel, offset, boxWidth) {
+ var coordSys = seriesModel.coordinateSystem;
+ var data = seriesModel.getData();
+ var dimensions = seriesModel.dimensions;
+ var chartLayout = seriesModel.get('layout');
+ var halfWidth = boxWidth / 2;
+
+ data.each(dimensions, function () {
+ var args = arguments;
+ var dimLen = dimensions.length;
+ var axisDimVal = args[0];
+ var idx = args[dimLen];
+ var variableDim = chartLayout === 'horizontal' ? 0 : 1;
+ var constDim = 1 - variableDim;
+
+ var median = getPoint(args[3]);
+ var end1 = getPoint(args[1]);
+ var end5 = getPoint(args[5]);
+ var whiskerEnds = [
+ [end1, getPoint(args[2])],
+ [end5, getPoint(args[4])]
+ ];
+ layEndLine(end1);
+ layEndLine(end5);
+ layEndLine(median);
+
+ var bodyEnds = [];
+ addBodyEnd(whiskerEnds[0][1], 0);
+ addBodyEnd(whiskerEnds[1][1], 1);
+
+ data.setItemLayout(idx, {
+ chartLayout: chartLayout,
+ initBaseline: median[constDim],
+ median: median,
+ bodyEnds: bodyEnds,
+ whiskerEnds: whiskerEnds
+ });
+
+ function getPoint(val) {
+ var p = [];
+ p[variableDim] = axisDimVal;
+ p[constDim] = val;
+ var point;
+ if (isNaN(axisDimVal) || isNaN(val)) {
+ point = [NaN, NaN];
+ }
+ else {
+ point = coordSys.dataToPoint(p);
+ point[variableDim] += offset;
+ }
+ return point;
+ }
+
+ function addBodyEnd(point, start) {
+ var point1 = point.slice();
+ var point2 = point.slice();
+ point1[variableDim] += halfWidth;
+ point2[variableDim] -= halfWidth;
+ start
+ ? bodyEnds.push(point1, point2)
+ : bodyEnds.push(point2, point1);
+ }
+
+ function layEndLine(endCenter) {
+ var line = [endCenter.slice(), endCenter.slice()];
+ line[0][variableDim] -= halfWidth;
+ line[1][variableDim] += halfWidth;
+ whiskerEnds.push(line);
+ }
+ });
+ }
+
+
+
+/***/ },
+/* 243 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var echarts = __webpack_require__(1);
+
+ __webpack_require__(244);
+ __webpack_require__(245);
+
+ echarts.registerPreprocessor(
+ __webpack_require__(246)
+ );
+
+ echarts.registerVisualCoding('chart', __webpack_require__(247));
+ echarts.registerLayout(__webpack_require__(248));
+
+
+
+/***/ },
+/* 244 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var zrUtil = __webpack_require__(3);
+ var SeriesModel = __webpack_require__(27);
+ var whiskerBoxCommon = __webpack_require__(238);
+ var formatUtil = __webpack_require__(6);
+ var encodeHTML = formatUtil.encodeHTML;
+ var addCommas = formatUtil.addCommas;
+
+ var CandlestickSeries = SeriesModel.extend({
+
+ type: 'series.candlestick',
+
+ dependencies: ['xAxis', 'yAxis', 'grid'],
+
+ /**
+ * @readOnly
+ */
+ valueDimensions: ['open', 'close', 'lowest', 'highest'],
+
+ /**
+ * @type {Array.<string>}
+ * @readOnly
+ */
+ dimensions: null,
+
+ /**
+ * @override
+ */
+ defaultOption: {
+ zlevel: 0, // 一级层å 
+ z: 2, // 二级层å 
+ coordinateSystem: 'cartesian2d',
+ legendHoverLink: true,
+
+ hoverAnimation: true,
+
+ xAxisIndex: 0,
+ yAxisIndex: 0,
+
+ layout: null, // 'horizontal' or 'vertical'
+
+ itemStyle: {
+ normal: {
+ color: '#c23531', // 阳线 positive
+ color0: '#314656', // 阴线 negative '#c23531', '#314656'
+ borderWidth: 1,
+ // FIXME
+ // ec2中使用的是lineStyle.color 和 lineStyle.color0
+ borderColor: '#c23531',
+ borderColor0: '#314656'
+ },
+ emphasis: {
+ borderWidth: 2
+ }
+ },
+
+ animationUpdate: false,
+ animationEasing: 'linear',
+ animationDuration: 300
+ },
+
+ /**
+ * Get dimension for shadow in dataZoom
+ * @return {string} dimension name
+ */
+ getShadowDim: function () {
+ return 'open';
+ },
+
+ /**
+ * @override
+ */
+ formatTooltip: function (dataIndex, mutipleSeries) {
+ // It rearly use mutiple candlestick series in one cartesian,
+ // so only consider one series in this default tooltip.
+ var valueHTMLArr = zrUtil.map(this.valueDimensions, function (dim) {
+ return dim + ': ' + addCommas(this._data.get(dim, dataIndex));
+ }, this);
+
+ return encodeHTML(this.name) + '<br />' + valueHTMLArr.join('<br />');
+ }
+
+ });
+
+ zrUtil.mixin(CandlestickSeries, whiskerBoxCommon.seriesModelMixin, true);
+
+ module.exports = CandlestickSeries;
+
+
+
+/***/ },
+/* 245 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var zrUtil = __webpack_require__(3);
+ var ChartView = __webpack_require__(41);
+ var graphic = __webpack_require__(42);
+ var whiskerBoxCommon = __webpack_require__(238);
+
+ var CandlestickView = ChartView.extend({
+
+ type: 'candlestick',
+
+ getStyleUpdater: function () {
+ return updateStyle;
+ }
+
+ });
+
+ zrUtil.mixin(CandlestickView, whiskerBoxCommon.viewMixin, true);
+
+ // Update common properties
+ var normalStyleAccessPath = ['itemStyle', 'normal'];
+ var emphasisStyleAccessPath = ['itemStyle', 'emphasis'];
+
+ function updateStyle(itemGroup, data, idx) {
+ var itemModel = data.getItemModel(idx);
+ var normalItemStyleModel = itemModel.getModel(normalStyleAccessPath);
+ var color = data.getItemVisual(idx, 'color');
+ var borderColor = data.getItemVisual(idx, 'borderColor');
+
+ // Color must be excluded.
+ // Because symbol provide setColor individually to set fill and stroke
+ var itemStyle = normalItemStyleModel.getItemStyle(
+ ['color', 'color0', 'borderColor', 'borderColor0']
+ );
+
+ var whiskerEl = itemGroup.childAt(itemGroup.whiskerIndex);
+ whiskerEl.style.set(itemStyle);
+ whiskerEl.style.stroke = borderColor;
+ whiskerEl.dirty();
+
+ var bodyEl = itemGroup.childAt(itemGroup.bodyIndex);
+ bodyEl.style.set(itemStyle);
+ bodyEl.style.fill = color;
+ bodyEl.style.stroke = borderColor;
+ bodyEl.dirty();
+
+ var hoverStyle = itemModel.getModel(emphasisStyleAccessPath).getItemStyle();
+ graphic.setHoverStyle(itemGroup, hoverStyle);
+ }
+
+
+ module.exports = CandlestickView;
+
+
+
+/***/ },
+/* 246 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+
+ module.exports = function (option) {
+ if (!option || !zrUtil.isArray(option.series)) {
+ return;
+ }
+
+ // Translate 'k' to 'candlestick'.
+ zrUtil.each(option.series, function (seriesItem) {
+ if (zrUtil.isObject(seriesItem) && seriesItem.type === 'k') {
+ seriesItem.type = 'candlestick';
+ }
+ });
+ };
+
+
+
+/***/ },
+/* 247 */
+/***/ function(module, exports) {
+
+
+
+ var positiveBorderColorQuery = ['itemStyle', 'normal', 'borderColor'];
+ var negativeBorderColorQuery = ['itemStyle', 'normal', 'borderColor0'];
+ var positiveColorQuery = ['itemStyle', 'normal', 'color'];
+ var negativeColorQuery = ['itemStyle', 'normal', 'color0'];
+
+ module.exports = function (ecModel, api) {
+
+ ecModel.eachRawSeriesByType('candlestick', function (seriesModel) {
+
+ var data = seriesModel.getData();
+
+ data.setVisual({
+ legendSymbol: 'roundRect'
+ });
+
+ // Only visible series has each data be visual encoded
+ if (!ecModel.isSeriesFiltered(seriesModel)) {
+ data.each(function (idx) {
+ var itemModel = data.getItemModel(idx);
+ var sign = data.getItemLayout(idx).sign;
+
+ data.setItemVisual(
+ idx,
+ {
+ color: itemModel.get(
+ sign > 0 ? positiveColorQuery : negativeColorQuery
+ ),
+ borderColor: itemModel.get(
+ sign > 0 ? positiveBorderColorQuery : negativeBorderColorQuery
+ )
+ }
+ );
+ });
+ }
+ });
+
+ };
+
+
+/***/ },
+/* 248 */
+/***/ function(module, exports) {
+
+
+
+ var CANDLE_MIN_WIDTH = 2;
+ var CANDLE_MIN_NICE_WIDTH = 5;
+ var GPA_MIN = 4;
+
+ module.exports = function (ecModel, api) {
+
+ ecModel.eachSeriesByType('candlestick', function (seriesModel) {
+
+ var coordSys = seriesModel.coordinateSystem;
+ var data = seriesModel.getData();
+ var dimensions = seriesModel.dimensions;
+ var chartLayout = seriesModel.get('layout');
+
+ var candleWidth = calculateCandleWidth(seriesModel, data);
+
+ data.each(dimensions, function () {
+ var args = arguments;
+ var dimLen = dimensions.length;
+ var axisDimVal = args[0];
+ var idx = args[dimLen];
+ var variableDim = chartLayout === 'horizontal' ? 0 : 1;
+ var constDim = 1 - variableDim;
+
+ var openVal = args[1];
+ var closeVal = args[2];
+ var lowestVal = args[3];
+ var highestVal = args[4];
+
+ var ocLow = Math.min(openVal, closeVal);
+ var ocHigh = Math.max(openVal, closeVal);
+
+ var ocLowPoint = getPoint(ocLow);
+ var ocHighPoint = getPoint(ocHigh);
+ var lowestPoint = getPoint(lowestVal);
+ var highestPoint = getPoint(highestVal);
+
+ var whiskerEnds = [
+ [highestPoint, ocHighPoint],
+ [lowestPoint, ocLowPoint]
+ ];
+
+ var bodyEnds = [];
+ addBodyEnd(ocHighPoint, 0);
+ addBodyEnd(ocLowPoint, 1);
+
+ data.setItemLayout(idx, {
+ chartLayout: chartLayout,
+ sign: openVal > closeVal ? -1 : openVal < closeVal ? 1 : 0,
+ initBaseline: openVal > closeVal
+ ? ocHighPoint[constDim] : ocLowPoint[constDim], // open point.
+ bodyEnds: bodyEnds,
+ whiskerEnds: whiskerEnds
+ });
+
+ function getPoint(val) {
+ var p = [];
+ p[variableDim] = axisDimVal;
+ p[constDim] = val;
+ return (isNaN(axisDimVal) || isNaN(val))
+ ? [NaN, NaN]
+ : coordSys.dataToPoint(p);
+ }
+
+ function addBodyEnd(point, start) {
+ var point1 = point.slice();
+ var point2 = point.slice();
+ point1[variableDim] += candleWidth / 2;
+ point2[variableDim] -= candleWidth / 2;
+ start
+ ? bodyEnds.push(point1, point2)
+ : bodyEnds.push(point2, point1);
+ }
+
+ }, true);
+ });
+ };
+
+ function calculateCandleWidth(seriesModel, data) {
+ var baseAxis = seriesModel.getBaseAxis();
+ var extent;
+
+ var bandWidth = baseAxis.type === 'category'
+ ? baseAxis.getBandWidth()
+ : (
+ extent = baseAxis.getExtent(),
+ Math.abs(extent[1] - extent[0]) / data.count()
+ );
+
+ // Half band width is perfect when space is enouph, otherwise
+ // try not to be smaller than CANDLE_MIN_NICE_WIDTH (and only
+ // gap is compressed), otherwise ensure not to be smaller than
+ // CANDLE_MIN_WIDTH in spite of overlap.
+
+ return bandWidth / 2 - 2 > CANDLE_MIN_NICE_WIDTH // "- 2" is minus border width
+ ? bandWidth / 2 - 2
+ : bandWidth - CANDLE_MIN_NICE_WIDTH > GPA_MIN
+ ? CANDLE_MIN_NICE_WIDTH
+ : Math.max(bandWidth - GPA_MIN, CANDLE_MIN_WIDTH);
+ }
+
+
+
+/***/ },
+/* 249 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var echarts = __webpack_require__(1);
+
+ __webpack_require__(250);
+ __webpack_require__(251);
+
+ echarts.registerVisualCoding('chart', zrUtil.curry(
+ __webpack_require__(103), 'effectScatter', 'circle', null
+ ));
+ echarts.registerLayout(zrUtil.curry(
+ __webpack_require__(104), 'effectScatter'
+ ));
+
+
+/***/ },
+/* 250 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var createListFromArray = __webpack_require__(93);
+ var SeriesModel = __webpack_require__(27);
+
+ module.exports = SeriesModel.extend({
+
+ type: 'series.effectScatter',
+
+ dependencies: ['grid', 'polar'],
+
+ getInitialData: function (option, ecModel) {
+ var list = createListFromArray(option.data, this, ecModel);
+ return list;
+ },
+
+ defaultOption: {
+ coordinateSystem: 'cartesian2d',
+ zlevel: 0,
+ z: 2,
+ legendHoverLink: true,
+
+ effectType: 'ripple',
+
+ // When to show the effect, option: 'render'|'emphasis'
+ showEffectOn: 'render',
+
+ // Ripple effect config
+ rippleEffect: {
+ period: 4,
+ // Scale of ripple
+ scale: 2.5,
+ // Brush type can be fill or stroke
+ brushType: 'fill'
+ },
+
+ // Cartesian coordinate system
+ xAxisIndex: 0,
+ yAxisIndex: 0,
+
+ // Polar coordinate system
+ polarIndex: 0,
+
+ // Geo coordinate system
+ geoIndex: 0,
+
+ // symbol: null, // 图形类型
+ symbolSize: 10 // 图形大å°ï¼ŒåŠå®½ï¼ˆåŠå¾„)å‚数,当图形为方å‘或è±å½¢åˆ™æ€»å®½åº¦ä¸ºsymbolSize * 2
+ // symbolRotate: null, // 图形旋转控制
+
+ // large: false,
+ // Available when large is true
+ // largeThreshold: 2000,
+
+ // itemStyle: {
+ // normal: {
+ // opacity: 1
+ // }
+ // }
+ }
+ });
+
+
+/***/ },
+/* 251 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var SymbolDraw = __webpack_require__(98);
+ var EffectSymbol = __webpack_require__(252);
+
+ __webpack_require__(1).extendChartView({
+
+ type: 'effectScatter',
+
+ init: function () {
+ this._symbolDraw = new SymbolDraw(EffectSymbol);
+ },
+
+ render: function (seriesModel, ecModel, api) {
+ var data = seriesModel.getData();
+ var effectSymbolDraw = this._symbolDraw;
+ effectSymbolDraw.updateData(data);
+ this.group.add(effectSymbolDraw.group);
+ },
+
+ updateLayout: function () {
+ this._symbolDraw.updateLayout();
+ },
+
+ remove: function (ecModel, api) {
+ this._symbolDraw && this._symbolDraw.remove(api);
+ }
+ });
+
+
+/***/ },
+/* 252 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Symbol with ripple effect
+ * @module echarts/chart/helper/EffectSymbol
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+ var symbolUtil = __webpack_require__(100);
+ var graphic = __webpack_require__(42);
+ var numberUtil = __webpack_require__(7);
+ var Symbol = __webpack_require__(99);
+ var Group = graphic.Group;
+
+ var EFFECT_RIPPLE_NUMBER = 3;
+
+ function normalizeSymbolSize(symbolSize) {
+ if (!zrUtil.isArray(symbolSize)) {
+ symbolSize = [+symbolSize, +symbolSize];
+ }
+ return symbolSize;
+ }
+ /**
+ * @constructor
+ * @param {module:echarts/data/List} data
+ * @param {number} idx
+ * @extends {module:zrender/graphic/Group}
+ */
+ function EffectSymbol(data, idx) {
+ Group.call(this);
+
+ var symbol = new Symbol(data, idx);
+ var rippleGroup = new Group();
+ this.add(symbol);
+ this.add(rippleGroup);
+
+ rippleGroup.beforeUpdate = function () {
+ this.attr(symbol.getScale());
+ };
+ this.updateData(data, idx);
+ }
+
+ var effectSymbolProto = EffectSymbol.prototype;
+
+ effectSymbolProto.stopEffectAnimation = function () {
+ this.childAt(1).removeAll();
+ };
+
+ effectSymbolProto.startEffectAnimation = function (
+ period, brushType, rippleScale, effectOffset, z, zlevel
+ ) {
+ var symbolType = this._symbolType;
+ var color = this._color;
+
+ var rippleGroup = this.childAt(1);
+
+ for (var i = 0; i < EFFECT_RIPPLE_NUMBER; i++) {
+ var ripplePath = symbolUtil.createSymbol(
+ symbolType, -0.5, -0.5, 1, 1, color
+ );
+ ripplePath.attr({
+ style: {
+ stroke: brushType === 'stroke' ? color : null,
+ fill: brushType === 'fill' ? color : null,
+ strokeNoScale: true
+ },
+ z2: 99,
+ silent: true,
+ scale: [1, 1],
+ z: z,
+ zlevel: zlevel
+ });
+
+ var delay = -i / EFFECT_RIPPLE_NUMBER * period + effectOffset;
+ // TODO Configurable period
+ ripplePath.animate('', true)
+ .when(period, {
+ scale: [rippleScale, rippleScale]
+ })
+ .delay(delay)
+ .start();
+ ripplePath.animateStyle(true)
+ .when(period, {
+ opacity: 0
+ })
+ .delay(delay)
+ .start();
+
+ rippleGroup.add(ripplePath);
+ }
+ };
+
+ /**
+ * Highlight symbol
+ */
+ effectSymbolProto.highlight = function () {
+ this.trigger('emphasis');
+ };
+
+ /**
+ * Downplay symbol
+ */
+ effectSymbolProto.downplay = function () {
+ this.trigger('normal');
+ };
+
+ /**
+ * Update symbol properties
+ * @param {module:echarts/data/List} data
+ * @param {number} idx
+ */
+ effectSymbolProto.updateData = function (data, idx) {
+ var seriesModel = data.hostModel;
+
+ this.childAt(0).updateData(data, idx);
+
+ var rippleGroup = this.childAt(1);
+ var itemModel = data.getItemModel(idx);
+ var symbolType = data.getItemVisual(idx, 'symbol');
+ var symbolSize = normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize'));
+ var color = data.getItemVisual(idx, 'color');
+
+ rippleGroup.attr('scale', symbolSize);
+
+ rippleGroup.traverse(function (ripplePath) {
+ ripplePath.attr({
+ fill: color
+ });
+ });
+
+ var symbolOffset = itemModel.getShallow('symbolOffset');
+ if (symbolOffset) {
+ var pos = rippleGroup.position;
+ pos[0] = numberUtil.parsePercent(symbolOffset[0], symbolSize[0]);
+ pos[1] = numberUtil.parsePercent(symbolOffset[1], symbolSize[1]);
+ }
+
+ this._symbolType = symbolType;
+ this._color = color;
+
+ var showEffectOn = seriesModel.get('showEffectOn');
+ var rippleScale = itemModel.get('rippleEffect.scale');
+ var brushType = itemModel.get('rippleEffect.brushType');
+ var effectPeriod = itemModel.get('rippleEffect.period') * 1000;
+ var effectOffset = idx / data.count();
+ var z = itemModel.getShallow('z') || 0;
+ var zlevel = itemModel.getShallow('zlevel') || 0;
+
+ this.stopEffectAnimation();
+ if (showEffectOn === 'render') {
+ this.startEffectAnimation(
+ effectPeriod, brushType, rippleScale, effectOffset, z, zlevel
+ );
+ }
+ var symbol = this.childAt(0);
+ function onEmphasis() {
+ symbol.trigger('emphasis');
+ if (showEffectOn !== 'render') {
+ this.startEffectAnimation(
+ effectPeriod, brushType, rippleScale, effectOffset, z, zlevel
+ );
+ }
+ }
+ function onNormal() {
+ symbol.trigger('normal');
+ if (showEffectOn !== 'render') {
+ this.stopEffectAnimation();
+ }
+ }
+ this.on('mouseover', onEmphasis, this)
+ .on('mouseout', onNormal, this)
+ .on('emphasis', onEmphasis, this)
+ .on('normal', onNormal, this);
+ };
+
+ effectSymbolProto.fadeOut = function (cb) {
+ cb && cb();
+ };
+
+ zrUtil.inherits(EffectSymbol, Group);
+
+ module.exports = EffectSymbol;
+
+
+/***/ },
+/* 253 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ __webpack_require__(254);
+ __webpack_require__(255);
+
+ var zrUtil = __webpack_require__(3);
+ var echarts = __webpack_require__(1);
+ echarts.registerLayout(
+ __webpack_require__(257)
+ );
+
+ echarts.registerVisualCoding(
+ 'chart', zrUtil.curry(__webpack_require__(88), 'lines', 'lineStyle')
+ );
+
+
+/***/ },
+/* 254 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var SeriesModel = __webpack_require__(27);
+ var List = __webpack_require__(94);
+ var zrUtil = __webpack_require__(3);
+ var CoordinateSystem = __webpack_require__(25);
+
+ module.exports = SeriesModel.extend({
+
+ type: 'series.lines',
+
+ dependencies: ['grid', 'polar'],
+
+ getInitialData: function (option, ecModel) {
+ var fromDataArr = [];
+ var toDataArr = [];
+ var lineDataArr = [];
+ zrUtil.each(option.data, function (opt) {
+ fromDataArr.push(opt[0]);
+ toDataArr.push(opt[1]);
+ lineDataArr.push(zrUtil.extend(
+ zrUtil.extend({}, zrUtil.isArray(opt[0]) ? null : opt[0]),
+ zrUtil.isArray(opt[1]) ? null : opt[1]
+ ));
+ });
+
+ // var coordSys = option.coordinateSystem;
+ // if (coordSys !== 'cartesian2d' && coordSys !== 'geo') {
+ // throw new Error('Coordinate system can only be cartesian2d or geo in lines');
+ // }
+
+ // var dimensions = coordSys === 'geo' ? ['lng', 'lat'] : ['x', 'y'];
+ var coordSys = CoordinateSystem.get(option.coordinateSystem);
+ if (!coordSys) {
+ throw new Error('Invalid coordinate system');
+ }
+ var dimensions = coordSys.dimensions;
+
+ var fromData = new List(dimensions, this);
+ var toData = new List(dimensions, this);
+ var lineData = new List(['value'], this);
+
+ function geoCoordGetter(item, dim, dataIndex, dimIndex) {
+ return item.coord && item.coord[dimIndex];
+ }
+
+ fromData.initData(fromDataArr, null, geoCoordGetter);
+ toData.initData(toDataArr, null, geoCoordGetter);
+ lineData.initData(lineDataArr);
+
+ this.fromData = fromData;
+ this.toData = toData;
+
+ return lineData;
+ },
+
+ formatTooltip: function (dataIndex) {
+ var fromName = this.fromData.getName(dataIndex);
+ var toName = this.toData.getName(dataIndex);
+ return fromName + ' > ' + toName;
+ },
+
+ defaultOption: {
+ coordinateSystem: 'geo',
+ zlevel: 0,
+ z: 2,
+ legendHoverLink: true,
+
+ hoverAnimation: true,
+ // Cartesian coordinate system
+ xAxisIndex: 0,
+ yAxisIndex: 0,
+
+ // Geo coordinate system
+ geoIndex: 0,
+
+ // symbol: null,
+ // symbolSize: 10,
+ // symbolRotate: null,
+
+ effect: {
+ show: false,
+ period: 4,
+ symbol: 'circle',
+ symbolSize: 3,
+ // Length of trail, 0 - 1
+ trailLength: 0.2
+ // Same with lineStyle.normal.color
+ // color
+ },
+
+ large: false,
+ // Available when large is true
+ largeThreshold: 2000,
+
+ label: {
+ normal: {
+ show: false,
+ position: 'end'
+ // distance: 5,
+ // formatter: 标签文本格å¼å™¨ï¼ŒåŒTooltip.formatter,ä¸æ”¯æŒå¼‚步回调
+ }
+ },
+ // itemStyle: {
+ // normal: {
+ // }
+ // },
+ lineStyle: {
+ normal: {
+ opacity: 0.5
+ }
+ }
+ }
+ });
+
+
+/***/ },
+/* 255 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var LineDraw = __webpack_require__(194);
+ var EffectLine = __webpack_require__(256);
+ var Line = __webpack_require__(195);
+
+ __webpack_require__(1).extendChartView({
+
+ type: 'lines',
+
+ init: function () {},
+
+ render: function (seriesModel, ecModel, api) {
+ var data = seriesModel.getData();
+ var lineDraw = this._lineDraw;
+
+ var hasEffect = seriesModel.get('effect.show');
+ if (hasEffect !== this._hasEffet) {
+ if (lineDraw) {
+ lineDraw.remove();
+ }
+ lineDraw = this._lineDraw = new LineDraw(
+ hasEffect ? EffectLine : Line
+ );
+ this._hasEffet = hasEffect;
+ }
+
+ var zlevel = seriesModel.get('zlevel');
+ var trailLength = seriesModel.get('effect.trailLength');
+
+ var zr = api.getZr();
+ // Avoid the drag cause ghost shadow
+ // FIXME Better way ?
+ zr.painter.getLayer(zlevel).clear(true);
+ // Config layer with motion blur
+ if (this._lastZlevel != null) {
+ zr.configLayer(this._lastZlevel, {
+ motionBlur: false
+ });
+ }
+ if (hasEffect && trailLength) {
+ zr.configLayer(zlevel, {
+ motionBlur: true,
+ lastFrameAlpha: Math.max(Math.min(trailLength / 10 + 0.9, 1), 0)
+ });
+ }
+
+ this.group.add(lineDraw.group);
+
+ lineDraw.updateData(data);
+
+ this._lastZlevel = zlevel;
+ },
+
+ updateLayout: function (seriesModel, ecModel, api) {
+ this._lineDraw.updateLayout();
+ // Not use motion when dragging or zooming
+ var zr = api.getZr();
+ zr.painter.getLayer(this._lastZlevel).clear(true);
+ },
+
+ remove: function (ecModel, api) {
+ this._lineDraw && this._lineDraw.remove(api, true);
+ }
+ });
+
+
+/***/ },
+/* 256 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @module echarts/chart/helper/EffectLine
+ */
+
+
+ var graphic = __webpack_require__(42);
+ var Line = __webpack_require__(195);
+ var zrUtil = __webpack_require__(3);
+ var symbolUtil = __webpack_require__(100);
+
+ var curveUtil = __webpack_require__(49);
+
+ /**
+ * @constructor
+ * @extends {module:zrender/graphic/Group}
+ * @alias {module:echarts/chart/helper/Line}
+ */
+ function EffectLine(lineData, fromData, toData, idx) {
+ graphic.Group.call(this);
+
+ var line = new Line(lineData, fromData, toData, idx);
+ this.add(line);
+
+ this._updateEffectSymbol(lineData, idx);
+ }
+
+ var effectLineProto = EffectLine.prototype;
+
+ function setAnimationPoints(symbol, points) {
+ symbol.__p1 = points[0];
+ symbol.__p2 = points[1];
+ symbol.__cp1 = points[2] || [
+ (points[0][0] + points[1][0]) / 2,
+ (points[0][1] + points[1][1]) / 2
+ ];
+ }
+
+ function updateSymbolPosition() {
+ var p1 = this.__p1;
+ var p2 = this.__p2;
+ var cp1 = this.__cp1;
+ var t = this.__t;
+ var pos = this.position;
+ var quadraticAt = curveUtil.quadraticAt;
+ var quadraticDerivativeAt = curveUtil.quadraticDerivativeAt;
+ pos[0] = quadraticAt(p1[0], cp1[0], p2[0], t);
+ pos[1] = quadraticAt(p1[1], cp1[1], p2[1], t);
+
+ // Tangent
+ var tx = quadraticDerivativeAt(p1[0], cp1[0], p2[0], t);
+ var ty = quadraticDerivativeAt(p1[1], cp1[1], p2[1], t);
+
+ this.rotation = -Math.atan2(ty, tx) - Math.PI / 2;
+
+ this.ignore = false;
+ }
+
+ effectLineProto._updateEffectSymbol = function (lineData, idx) {
+ var itemModel = lineData.getItemModel(idx);
+ var effectModel = itemModel.getModel('effect');
+ var size = effectModel.get('symbolSize');
+ var symbolType = effectModel.get('symbol');
+ if (!zrUtil.isArray(size)) {
+ size = [size, size];
+ }
+ var color = effectModel.get('color') || lineData.getItemVisual(idx, 'color');
+ var symbol = this.childAt(1);
+ var period = effectModel.get('period') * 1000;
+ if (this._symbolType !== symbolType || period !== this._period) {
+ symbol = symbolUtil.createSymbol(
+ symbolType, -0.5, -0.5, 1, 1, color
+ );
+ symbol.ignore = true;
+ symbol.z2 = 100;
+ this._symbolType = symbolType;
+ this._period = period;
+
+ this.add(symbol);
+
+ symbol.__t = 0;
+ symbol.animate('', true)
+ .when(period, {
+ __t: 1
+ })
+ .delay(idx / lineData.count() * period / 2)
+ .during(zrUtil.bind(updateSymbolPosition, symbol))
+ .start();
+ }
+ // Shadow color is same with color in default
+ symbol.setStyle('shadowColor', color);
+ symbol.setStyle(effectModel.getItemStyle(['color']));
+
+ symbol.attr('scale', size);
+ var points = lineData.getItemLayout(idx);
+ setAnimationPoints(symbol, points);
+
+ symbol.setColor(color);
+ symbol.attr('scale', size);
+ };
+
+ effectLineProto.updateData = function (lineData, fromData, toData, idx) {
+ this.childAt(0).updateData(lineData, fromData, toData, idx);
+ this._updateEffectSymbol(lineData, idx);
+ };
+
+ effectLineProto.updateLayout = function (lineData, fromData, toData, idx) {
+ this.childAt(0).updateLayout(lineData, fromData, toData, idx);
+ var symbol = this.childAt(1);
+ var points = lineData.getItemLayout(idx);
+ setAnimationPoints(symbol, points);
+ };
+
+ zrUtil.inherits(EffectLine, graphic.Group);
+
+ module.exports = EffectLine;
+
+
+/***/ },
+/* 257 */
+/***/ function(module, exports) {
+
+
+
+ module.exports = function (ecModel) {
+ ecModel.eachSeriesByType('lines', function (seriesModel) {
+ var coordSys = seriesModel.coordinateSystem;
+ var fromData = seriesModel.fromData;
+ var toData = seriesModel.toData;
+ var lineData = seriesModel.getData();
+
+ var dims = coordSys.dimensions;
+ fromData.each(dims, function (x, y, idx) {
+ fromData.setItemLayout(idx, coordSys.dataToPoint([x, y]));
+ });
+ toData.each(dims, function (x, y, idx) {
+ toData.setItemLayout(idx, coordSys.dataToPoint([x, y]));
+ });
+ lineData.each(function (idx) {
+ var p1 = fromData.getItemLayout(idx);
+ var p2 = toData.getItemLayout(idx);
+ var curveness = lineData.getItemModel(idx).get('lineStyle.normal.curveness');
+ var cp1;
+ if (curveness > 0) {
+ cp1 = [
+ (p1[0] + p2[0]) / 2 - (p1[1] - p2[1]) * curveness,
+ (p1[1] + p2[1]) / 2 - (p2[0] - p1[0]) * curveness
+ ];
+ }
+ lineData.setItemLayout(idx, [p1, p2, cp1]);
+ });
+ });
+ };
+
+
+/***/ },
+/* 258 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ __webpack_require__(259);
+ __webpack_require__(260);
+
+
+/***/ },
+/* 259 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var SeriesModel = __webpack_require__(27);
+ var createListFromArray = __webpack_require__(93);
+
+ module.exports = SeriesModel.extend({
+ type: 'series.heatmap',
+
+ getInitialData: function (option, ecModel) {
+ return createListFromArray(option.data, this, ecModel);
+ },
+
+ defaultOption: {
+
+ // Cartesian2D or geo
+ coordinateSystem: 'cartesian2d',
+
+ zlevel: 0,
+
+ z: 2,
+
+ // Cartesian coordinate system
+ xAxisIndex: 0,
+ yAxisIndex: 0,
+
+ // Geo coordinate system
+ geoIndex: 0,
+
+ blurSize: 30,
+
+ pointSize: 20,
+
+ maxOpacity: 1,
+
+ minOpacity: 0
+ }
+ });
+
+
+/***/ },
+/* 260 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var graphic = __webpack_require__(42);
+ var HeatmapLayer = __webpack_require__(261);
+ var zrUtil = __webpack_require__(3);
+
+ function getIsInPiecewiseRange(dataExtent, pieceList, selected) {
+ var dataSpan = dataExtent[1] - dataExtent[0];
+ pieceList = zrUtil.map(pieceList, function (piece) {
+ return {
+ interval: [
+ (piece.interval[0] - dataExtent[0]) / dataSpan,
+ (piece.interval[1] - dataExtent[0]) / dataSpan
+ ]
+ };
+ });
+ var len = pieceList.length;
+ var lastIndex = 0;
+ return function (val) {
+ // Try to find in the location of the last found
+ for (var i = lastIndex; i < len; i++) {
+ var interval = pieceList[i].interval;
+ if (interval[0] <= val && val <= interval[1]) {
+ lastIndex = i;
+ break;
+ }
+ }
+ if (i === len) { // Not found, back interation
+ for (var i = lastIndex - 1; i >= 0; i--) {
+ var interval = pieceList[i].interval;
+ if (interval[0] <= val && val <= interval[1]) {
+ lastIndex = i;
+ break;
+ }
+ }
+ }
+ return i >= 0 && i < len && selected[i];
+ };
+ }
+
+ function getIsInContinuousRange(dataExtent, range) {
+ var dataSpan = dataExtent[1] - dataExtent[0];
+ range = [
+ (range[0] - dataExtent[0]) / dataSpan,
+ (range[1] - dataExtent[0]) / dataSpan
+ ];
+ return function (val) {
+ return val >= range[0] && val <= range[1];
+ };
+ }
+
+ function isGeoCoordSys(coordSys) {
+ var dimensions = coordSys.dimensions;
+ // Not use coorSys.type === 'geo' because coordSys maybe extended
+ return dimensions[0] === 'lng' && dimensions[1] === 'lat';
+ }
+
+ module.exports = __webpack_require__(1).extendChartView({
+
+ type: 'heatmap',
+
+ render: function (seriesModel, ecModel, api) {
+ var visualMapOfThisSeries;
+ ecModel.eachComponent('visualMap', function (visualMap) {
+ visualMap.eachTargetSeries(function (targetSeries) {
+ if (targetSeries === seriesModel) {
+ visualMapOfThisSeries = visualMap;
+ }
+ });
+ });
+
+ if (!visualMapOfThisSeries) {
+ throw new Error('Heatmap must use with visualMap');
+ }
+
+ this.group.removeAll();
+ var coordSys = seriesModel.coordinateSystem;
+ if (coordSys.type === 'cartesian2d') {
+ this._renderOnCartesian(coordSys, seriesModel, api);
+ }
+ else if (isGeoCoordSys(coordSys)) {
+ this._renderOnGeo(
+ coordSys, seriesModel, visualMapOfThisSeries, api
+ );
+ }
+ },
+
+ _renderOnCartesian: function (cartesian, seriesModel, api) {
+ var xAxis = cartesian.getAxis('x');
+ var yAxis = cartesian.getAxis('y');
+ var group = this.group;
+
+ if (!(xAxis.type === 'category' && yAxis.type === 'category')) {
+ throw new Error('Heatmap on cartesian must have two category axes');
+ }
+ if (!(xAxis.onBand && yAxis.onBand)) {
+ throw new Error('Heatmap on cartesian must have two axes with boundaryGap true');
+ }
+ var width = xAxis.getBandWidth();
+ var height = yAxis.getBandWidth();
+
+ var data = seriesModel.getData();
+ data.each(['x', 'y', 'z'], function (x, y, z, idx) {
+ var itemModel = data.getItemModel(idx);
+ var point = cartesian.dataToPoint([x, y]);
+ // Ignore empty data
+ if (isNaN(z)) {
+ return;
+ }
+ var rect = new graphic.Rect({
+ shape: {
+ x: point[0] - width / 2,
+ y: point[1] - height / 2,
+ width: width,
+ height: height
+ },
+ style: {
+ fill: data.getItemVisual(idx, 'color')
+ }
+ });
+ var style = itemModel.getModel('itemStyle.normal').getItemStyle(['color']);
+ var hoverStl = itemModel.getModel('itemStyle.emphasis').getItemStyle();
+ var labelModel = itemModel.getModel('label.normal');
+ var hoverLabelModel = itemModel.getModel('label.emphasis');
+
+ var rawValue = seriesModel.getRawValue(idx);
+ var defaultText = '-';
+ if (rawValue && rawValue[2] != null) {
+ defaultText = rawValue[2];
+ }
+ if (labelModel.get('show')) {
+ graphic.setText(style, labelModel);
+ style.text = seriesModel.getFormattedLabel(idx, 'normal') || defaultText;
+ }
+ if (hoverLabelModel.get('show')) {
+ graphic.setText(hoverStl, hoverLabelModel);
+ hoverStl.text = seriesModel.getFormattedLabel(idx, 'emphasis') || defaultText;
+ }
+
+ rect.setStyle(style);
+
+ graphic.setHoverStyle(rect, hoverStl);
+
+ group.add(rect);
+ data.setItemGraphicEl(idx, rect);
+ });
+ },
+
+ _renderOnGeo: function (geo, seriesModel, visualMapModel, api) {
+ var inRangeVisuals = visualMapModel.targetVisuals.inRange;
+ var outOfRangeVisuals = visualMapModel.targetVisuals.outOfRange;
+ // if (!visualMapping) {
+ // throw new Error('Data range must have color visuals');
+ // }
+
+ var data = seriesModel.getData();
+ var hmLayer = this._hmLayer || (this._hmLayer || new HeatmapLayer());
+ hmLayer.blurSize = seriesModel.get('blurSize');
+ hmLayer.pointSize = seriesModel.get('pointSize');
+ hmLayer.minOpacity = seriesModel.get('minOpacity');
+ hmLayer.maxOpacity = seriesModel.get('maxOpacity');
+
+ var rect = geo.getViewRect().clone();
+ var roamTransform = geo.getRoamTransform();
+ rect.applyTransform(roamTransform);
+
+ // Clamp on viewport
+ var x = Math.max(rect.x, 0);
+ var y = Math.max(rect.y, 0);
+ var x2 = Math.min(rect.width + rect.x, api.getWidth());
+ var y2 = Math.min(rect.height + rect.y, api.getHeight());
+ var width = x2 - x;
+ var height = y2 - y;
+
+ var points = data.mapArray(['lng', 'lat', 'value'], function (lng, lat, value) {
+ var pt = geo.dataToPoint([lng, lat]);
+ pt[0] -= x;
+ pt[1] -= y;
+ pt.push(value);
+ return pt;
+ });
+
+ var dataExtent = visualMapModel.getExtent();
+ var isInRange = visualMapModel.type === 'visualMap.continuous'
+ ? getIsInContinuousRange(dataExtent, visualMapModel.option.range)
+ : getIsInPiecewiseRange(
+ dataExtent, visualMapModel.getPieceList(), visualMapModel.option.selected
+ );
+
+ hmLayer.update(
+ points, width, height,
+ inRangeVisuals.color.getNormalizer(),
+ {
+ inRange: inRangeVisuals.color.getColorMapper(),
+ outOfRange: outOfRangeVisuals.color.getColorMapper()
+ },
+ isInRange
+ );
+ var img = new graphic.Image({
+ style: {
+ width: width,
+ height: height,
+ x: x,
+ y: y,
+ image: hmLayer.canvas
+ },
+ silent: true
+ });
+ this.group.add(img);
+ }
+ });
+
+
+/***/ },
+/* 261 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file defines echarts Heatmap Chart
+ * @author Ovilia (me@zhangwenli.com)
+ * Inspired by https://github.com/mourner/simpleheat
+ *
+ * @module
+ */
+
+
+ var GRADIENT_LEVELS = 256;
+ var zrUtil = __webpack_require__(3);
+
+ /**
+ * Heatmap Chart
+ *
+ * @class
+ */
+ function Heatmap() {
+ var canvas = zrUtil.createCanvas();
+ this.canvas = canvas;
+
+ this.blurSize = 30;
+ this.pointSize = 20;
+
+ this.maxOpacity = 1;
+ this.minOpacity = 0;
+
+ this._gradientPixels = {};
+ }
+
+ Heatmap.prototype = {
+ /**
+ * Renders Heatmap and returns the rendered canvas
+ * @param {Array} data array of data, each has x, y, value
+ * @param {number} width canvas width
+ * @param {number} height canvas height
+ */
+ update: function(data, width, height, normalize, colorFunc, isInRange) {
+ var brush = this._getBrush();
+ var gradientInRange = this._getGradient(data, colorFunc, 'inRange');
+ var gradientOutOfRange = this._getGradient(data, colorFunc, 'outOfRange');
+ var r = this.pointSize + this.blurSize;
+
+ var canvas = this.canvas;
+ var ctx = canvas.getContext('2d');
+ var len = data.length;
+ canvas.width = width;
+ canvas.height = height;
+ for (var i = 0; i < len; ++i) {
+ var p = data[i];
+ var x = p[0];
+ var y = p[1];
+ var value = p[2];
+
+ // calculate alpha using value
+ var alpha = normalize(value);
+
+ // draw with the circle brush with alpha
+ ctx.globalAlpha = alpha;
+ ctx.drawImage(brush, x - r, y - r);
+ }
+
+ // colorize the canvas using alpha value and set with gradient
+ var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
+ var pixels = imageData.data;
+ var offset = 0;
+ var pixelLen = pixels.length;
+ var minOpacity = this.minOpacity;
+ var maxOpacity = this.maxOpacity;
+ var diffOpacity = maxOpacity - minOpacity;
+
+ while(offset < pixelLen) {
+ var alpha = pixels[offset + 3] / 256;
+ var gradientOffset = Math.floor(alpha * (GRADIENT_LEVELS - 1)) * 4;
+ // Simple optimize to ignore the empty data
+ if (alpha > 0) {
+ var gradient = isInRange(alpha) ? gradientInRange : gradientOutOfRange;
+ // Any alpha > 0 will be mapped to [minOpacity, maxOpacity]
+ alpha > 0 && (alpha = alpha * diffOpacity + minOpacity);
+ pixels[offset++] = gradient[gradientOffset];
+ pixels[offset++] = gradient[gradientOffset + 1];
+ pixels[offset++] = gradient[gradientOffset + 2];
+ pixels[offset++] = gradient[gradientOffset + 3] * alpha * 256;
+ }
+ else {
+ offset += 4;
+ }
+ }
+ ctx.putImageData(imageData, 0, 0);
+
+ return canvas;
+ },
+
+ /**
+ * get canvas of a black circle brush used for canvas to draw later
+ * @private
+ * @returns {Object} circle brush canvas
+ */
+ _getBrush: function() {
+ var brushCanvas = this._brushCanvas || (this._brushCanvas = zrUtil.createCanvas());
+ // set brush size
+ var r = this.pointSize + this.blurSize;
+ var d = r * 2;
+ brushCanvas.width = d;
+ brushCanvas.height = d;
+
+ var ctx = brushCanvas.getContext('2d');
+ ctx.clearRect(0, 0, d, d);
+
+ // in order to render shadow without the distinct circle,
+ // draw the distinct circle in an invisible place,
+ // and use shadowOffset to draw shadow in the center of the canvas
+ ctx.shadowOffsetX = d;
+ ctx.shadowBlur = this.blurSize;
+ // draw the shadow in black, and use alpha and shadow blur to generate
+ // color in color map
+ ctx.shadowColor = '#000';
+
+ // draw circle in the left to the canvas
+ ctx.beginPath();
+ ctx.arc(-r, r, this.pointSize, 0, Math.PI * 2, true);
+ ctx.closePath();
+ ctx.fill();
+ return brushCanvas;
+ },
+
+ /**
+ * get gradient color map
+ * @private
+ */
+ _getGradient: function (data, colorFunc, state) {
+ var gradientPixels = this._gradientPixels;
+ var pixelsSingleState = gradientPixels[state] || (gradientPixels[state] = new Uint8ClampedArray(256 * 4));
+ var color = [];
+ var off = 0;
+ for (var i = 0; i < 256; i++) {
+ colorFunc[state](i / 255, true, color);
+ pixelsSingleState[off++] = color[0];
+ pixelsSingleState[off++] = color[1];
+ pixelsSingleState[off++] = color[2];
+ pixelsSingleState[off++] = color[3];
+ }
+ return pixelsSingleState;
+ }
+ };
+
+ module.exports = Heatmap;
+
+
+
+/***/ },
+/* 262 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * Legend component entry file8
+ */
+
+
+ __webpack_require__(263);
+ __webpack_require__(264);
+ __webpack_require__(265);
+
+ var echarts = __webpack_require__(1);
+ // Series Filter
+ echarts.registerProcessor('filter', __webpack_require__(267));
+
+
+/***/ },
+/* 263 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var zrUtil = __webpack_require__(3);
+ var Model = __webpack_require__(8);
+
+ var LegendModel = __webpack_require__(1).extendComponentModel({
+
+ type: 'legend',
+
+ dependencies: ['series'],
+
+ layoutMode: {
+ type: 'box',
+ ignoreSize: true
+ },
+
+ init: function (option, parentModel, ecModel) {
+ this.mergeDefaultAndTheme(option, ecModel);
+
+ option.selected = option.selected || {};
+
+ this._updateData(ecModel);
+
+ var legendData = this._data;
+ // If has any selected in option.selected
+ var selectedMap = this.option.selected;
+ // If selectedMode is single, try to select one
+ if (legendData[0] && this.get('selectedMode') === 'single') {
+ var hasSelected = false;
+ for (var name in selectedMap) {
+ if (selectedMap[name]) {
+ this.select(name);
+ hasSelected = true;
+ }
+ }
+ // Try select the first if selectedMode is single
+ !hasSelected && this.select(legendData[0].get('name'));
+ }
+ },
+
+ mergeOption: function (option) {
+ LegendModel.superCall(this, 'mergeOption', option);
+
+ this._updateData(this.ecModel);
+ },
+
+ _updateData: function (ecModel) {
+ var legendData = zrUtil.map(this.get('data') || [], function (dataItem) {
+ if (typeof dataItem === 'string') {
+ dataItem = {
+ name: dataItem
+ };
+ }
+ return new Model(dataItem, this, this.ecModel);
+ }, this);
+ this._data = legendData;
+
+ var availableNames = zrUtil.map(ecModel.getSeries(), function (series) {
+ return series.name;
+ });
+ ecModel.eachSeries(function (seriesModel) {
+ if (seriesModel.legendDataProvider) {
+ var data = seriesModel.legendDataProvider();
+ availableNames = availableNames.concat(data.mapArray(data.getName));
+ }
+ });
+ /**
+ * @type {Array.<string>}
+ * @private
+ */
+ this._availableNames = availableNames;
+ },
+
+ /**
+ * @return {Array.<module:echarts/model/Model>}
+ */
+ getData: function () {
+ return this._data;
+ },
+
+ /**
+ * @param {string} name
+ */
+ select: function (name) {
+ var selected = this.option.selected;
+ var selectedMode = this.get('selectedMode');
+ if (selectedMode === 'single') {
+ var data = this._data;
+ zrUtil.each(data, function (dataItem) {
+ selected[dataItem.get('name')] = false;
+ });
+ }
+ selected[name] = true;
+ },
+
+ /**
+ * @param {string} name
+ */
+ unSelect: function (name) {
+ if (this.get('selectedMode') !== 'single') {
+ this.option.selected[name] = false;
+ }
+ },
+
+ /**
+ * @param {string} name
+ */
+ toggleSelected: function (name) {
+ var selected = this.option.selected;
+ // Default is true
+ if (!(name in selected)) {
+ selected[name] = true;
+ }
+ this[selected[name] ? 'unSelect' : 'select'](name);
+ },
+
+ /**
+ * @param {string} name
+ */
+ isSelected: function (name) {
+ var selected = this.option.selected;
+ return !((name in selected) && !selected[name])
+ && zrUtil.indexOf(this._availableNames, name) >= 0;
+ },
+
+ defaultOption: {
+ // 一级层å 
+ zlevel: 0,
+ // 二级层å 
+ z: 4,
+ show: true,
+
+ // 布局方å¼ï¼Œé»˜è®¤ä¸ºæ°´å¹³å¸ƒå±€ï¼Œå¯é€‰ä¸ºï¼š
+ // 'horizontal' | 'vertical'
+ orient: 'horizontal',
+
+ left: 'center',
+ // right: 'center',
+
+ top: 'top',
+ // bottom: 'top',
+
+ // 水平对é½
+ // 'auto' | 'left' | 'right'
+ // 默认为 'auto', æ ¹æ® x çš„ä½ç½®åˆ¤æ–­æ˜¯å·¦å¯¹é½è¿˜æ˜¯å³å¯¹é½
+ align: 'auto',
+
+ backgroundColor: 'rgba(0,0,0,0)',
+ // 图例边框颜色
+ borderColor: '#ccc',
+ // 图例边框线宽,å•ä½px,默认为0(无边框)
+ borderWidth: 0,
+ // 图例内边è·ï¼Œå•ä½px,默认å„æ–¹å‘内边è·ä¸º5,
+ // 接å—数组分别设定上å³ä¸‹å·¦è¾¹è·ï¼ŒåŒcss
+ padding: 5,
+ // å„个item之间的间隔,å•ä½px,默认为10,
+ // 横å‘布局时为水平间隔,纵å‘布局时为纵å‘é—´éš”
+ itemGap: 10,
+ // 图例图形宽度
+ itemWidth: 25,
+ // 图例图形高度
+ itemHeight: 14,
+ textStyle: {
+ // 图例文字颜色
+ color: '#333'
+ },
+ // formatter: '',
+ // 选择模å¼ï¼Œé»˜è®¤å¼€å¯å›¾ä¾‹å¼€å…³
+ selectedMode: true
+ // é…置默认选中状æ€ï¼Œå¯é…åˆLEGEND.SELECTED事件åšåŠ¨æ€æ•°æ®è½½å…¥
+ // selected: null,
+ // 图例内容(详è§legend.data,数组中æ¯ä¸€é¡¹ä»£è¡¨ä¸€ä¸ªitem
+ // data: [],
+ }
+ });
+
+ module.exports = LegendModel;
+
+
+/***/ },
+/* 264 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file Legend action
+ */
+
+
+ var echarts = __webpack_require__(1);
+ var zrUtil = __webpack_require__(3);
+
+ function legendSelectActionHandler(methodName, payload, ecModel) {
+ var selectedMap = {};
+ var isToggleSelect = methodName === 'toggleSelected';
+ var isSelected;
+ // Update all legend components
+ ecModel.eachComponent('legend', function (legendModel) {
+ if (isToggleSelect && isSelected != null) {
+ // Force other legend has same selected status
+ // Or the first is toggled to true and other are toggled to false
+ // In the case one legend has some item unSelected in option. And if other legend
+ // doesn't has the item, they will assume it is selected.
+ legendModel[isSelected ? 'select' : 'unSelect'](payload.name);
+ }
+ else {
+ legendModel[methodName](payload.name);
+ isSelected = legendModel.isSelected(payload.name);
+ }
+ var legendData = legendModel.getData();
+ zrUtil.each(legendData, function (model) {
+ var name = model.get('name');
+ // Wrap element
+ if (name === '\n' || name === '') {
+ return;
+ }
+ var isItemSelected = legendModel.isSelected(name);
+ if (name in selectedMap) {
+ // Unselected if any legend is unselected
+ selectedMap[name] = selectedMap[name] && isItemSelected;
+ }
+ else {
+ selectedMap[name] = isItemSelected;
+ }
+ });
+ });
+ // Return the event explicitly
+ return {
+ name: payload.name,
+ selected: selectedMap
+ };
+ }
+ /**
+ * @event legendToggleSelect
+ * @type {Object}
+ * @property {string} type 'legendToggleSelect'
+ * @property {string} [from]
+ * @property {string} name Series name or data item name
+ */
+ echarts.registerAction(
+ 'legendToggleSelect', 'legendselectchanged',
+ zrUtil.curry(legendSelectActionHandler, 'toggleSelected')
+ );
+
+ /**
+ * @event legendSelect
+ * @type {Object}
+ * @property {string} type 'legendSelect'
+ * @property {string} name Series name or data item name
+ */
+ echarts.registerAction(
+ 'legendSelect', 'legendselected',
+ zrUtil.curry(legendSelectActionHandler, 'select')
+ );
+
+ /**
+ * @event legendUnSelect
+ * @type {Object}
+ * @property {string} type 'legendUnSelect'
+ * @property {string} name Series name or data item name
+ */
+ echarts.registerAction(
+ 'legendUnSelect', 'legendunselected',
+ zrUtil.curry(legendSelectActionHandler, 'unSelect')
+ );
+
+
+/***/ },
+/* 265 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var symbolCreator = __webpack_require__(100);
+ var graphic = __webpack_require__(42);
+ var listComponentHelper = __webpack_require__(266);
+
+ var curry = zrUtil.curry;
+
+ var LEGEND_DISABLE_COLOR = '#ccc';
+
+ function dispatchSelectAction(name, api) {
+ api.dispatchAction({
+ type: 'legendToggleSelect',
+ name: name
+ });
+ }
+
+ function dispatchHighlightAction(seriesModel, dataName, api) {
+ seriesModel.get('legendHoverLink') && api.dispatchAction({
+ type: 'highlight',
+ seriesName: seriesModel.name,
+ name: dataName
+ });
+ }
+
+ function dispatchDownplayAction(seriesModel, dataName, api) {
+ seriesModel.get('legendHoverLink') && api.dispatchAction({
+ type: 'downplay',
+ seriesName: seriesModel.name,
+ name: dataName
+ });
+ }
+
+ module.exports = __webpack_require__(1).extendComponentView({
+
+ type: 'legend',
+
+ init: function () {
+ this._symbolTypeStore = {};
+ },
+
+ render: function (legendModel, ecModel, api) {
+ var group = this.group;
+ group.removeAll();
+
+ if (!legendModel.get('show')) {
+ return;
+ }
+
+ var selectMode = legendModel.get('selectedMode');
+ var itemAlign = legendModel.get('align');
+
+ if (itemAlign === 'auto') {
+ itemAlign = (legendModel.get('left') === 'right'
+ && legendModel.get('orient') === 'vertical')
+ ? 'right' : 'left';
+ }
+
+ var legendItemMap = {};
+ var legendDrawedMap = {};
+ zrUtil.each(legendModel.getData(), function (itemModel) {
+ var seriesName = itemModel.get('name');
+ // Use empty string or \n as a newline string
+ if (seriesName === '' || seriesName === '\n') {
+ group.add(new graphic.Group({
+ newline: true
+ }));
+ }
+
+ var seriesModel = ecModel.getSeriesByName(seriesName)[0];
+
+ legendItemMap[seriesName] = itemModel;
+
+ if (!seriesModel || legendDrawedMap[seriesName]) {
+ // Series not exists
+ return;
+ }
+
+ var data = seriesModel.getData();
+ var color = data.getVisual('color');
+
+ // If color is a callback function
+ if (typeof color === 'function') {
+ // Use the first data
+ color = color(seriesModel.getDataParams(0));
+ }
+
+ // Using rect symbol defaultly
+ var legendSymbolType = data.getVisual('legendSymbol') || 'roundRect';
+ var symbolType = data.getVisual('symbol');
+
+ var itemGroup = this._createItem(
+ seriesName, itemModel, legendModel,
+ legendSymbolType, symbolType,
+ itemAlign, color,
+ selectMode
+ );
+
+ itemGroup.on('click', curry(dispatchSelectAction, seriesName, api))
+ .on('mouseover', curry(dispatchHighlightAction, seriesModel, '', api))
+ .on('mouseout', curry(dispatchDownplayAction, seriesModel, '', api));
+
+ legendDrawedMap[seriesName] = true;
+ }, this);
+
+ ecModel.eachRawSeries(function (seriesModel) {
+ if (seriesModel.legendDataProvider) {
+ var data = seriesModel.legendDataProvider();
+ data.each(function (idx) {
+ var name = data.getName(idx);
+
+ // Avoid mutiple series use the same data name
+ if (!legendItemMap[name] || legendDrawedMap[name]) {
+ return;
+ }
+
+ var color = data.getItemVisual(idx, 'color');
+
+ var legendSymbolType = 'roundRect';
+
+ var itemGroup = this._createItem(
+ name, legendItemMap[name], legendModel,
+ legendSymbolType, null,
+ itemAlign, color,
+ selectMode
+ );
+
+ itemGroup.on('click', curry(dispatchSelectAction, name, api))
+ // FIXME Should not specify the series name
+ .on('mouseover', curry(dispatchHighlightAction, seriesModel, name, api))
+ .on('mouseout', curry(dispatchDownplayAction, seriesModel, name, api));
+
+ legendDrawedMap[name] = true;
+ }, false, this);
+ }
+ }, this);
+
+ listComponentHelper.layout(group, legendModel, api);
+ // Render background after group is layout
+ // FIXME
+ listComponentHelper.addBackground(group, legendModel);
+ },
+
+ _createItem: function (
+ name, itemModel, legendModel,
+ legendSymbolType, symbolType,
+ itemAlign, color, selectMode
+ ) {
+ var itemWidth = legendModel.get('itemWidth');
+ var itemHeight = legendModel.get('itemHeight');
+
+ var isSelected = legendModel.isSelected(name);
+ var itemGroup = new graphic.Group();
+
+ var textStyleModel = itemModel.getModel('textStyle');
+
+ var itemIcon = itemModel.get('icon');
+
+ // Use user given icon first
+ legendSymbolType = itemIcon || legendSymbolType;
+ itemGroup.add(symbolCreator.createSymbol(
+ legendSymbolType, 0, 0, itemWidth, itemHeight, isSelected ? color : LEGEND_DISABLE_COLOR
+ ));
+
+ // Compose symbols
+ // PENDING
+ if (!itemIcon && symbolType
+ // At least show one symbol, can't be all none
+ && ((symbolType !== legendSymbolType) || symbolType == 'none')
+ ) {
+ var size = itemHeight * 0.8;
+ if (symbolType === 'none') {
+ symbolType = 'circle';
+ }
+ // Put symbol in the center
+ itemGroup.add(symbolCreator.createSymbol(
+ symbolType, (itemWidth - size) / 2, (itemHeight - size) / 2, size, size,
+ isSelected ? color : LEGEND_DISABLE_COLOR
+ ));
+ }
+
+ // Text
+ var textX = itemAlign === 'left' ? itemWidth + 5 : -5;
+ var textAlign = itemAlign;
+
+ var formatter = legendModel.get('formatter');
+ if (typeof formatter === 'string' && formatter) {
+ name = formatter.replace('{name}', name);
+ }
+ else if (typeof formatter === 'function') {
+ name = formatter(name);
+ }
+
+ var text = new graphic.Text({
+ style: {
+ text: name,
+ x: textX,
+ y: itemHeight / 2,
+ fill: isSelected ? textStyleModel.getTextColor() : LEGEND_DISABLE_COLOR,
+ textFont: textStyleModel.getFont(),
+ textAlign: textAlign,
+ textVerticalAlign: 'middle'
+ }
+ });
+ itemGroup.add(text);
+
+ // Add a invisible rect to increase the area of mouse hover
+ itemGroup.add(new graphic.Rect({
+ shape: itemGroup.getBoundingRect(),
+ invisible: true
+ }));
+
+ itemGroup.eachChild(function (child) {
+ child.silent = !selectMode;
+ });
+
+ this.group.add(itemGroup);
+
+ graphic.setHoverStyle(itemGroup);
+
+ return itemGroup;
+ }
+ });
+
+
+/***/ },
+/* 266 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+ // List layout
+ var layout = __webpack_require__(21);
+ var formatUtil = __webpack_require__(6);
+ var graphic = __webpack_require__(42);
+
+ function positionGroup(group, model, api) {
+ layout.positionGroup(
+ group, model.getBoxLayoutParams(),
+ {
+ width: api.getWidth(),
+ height: api.getHeight()
+ },
+ model.get('padding')
+ );
+ }
+
+ module.exports = {
+ /**
+ * Layout list like component.
+ * It will box layout each items in group of component and then position the whole group in the viewport
+ * @param {module:zrender/group/Group} group
+ * @param {module:echarts/model/Component} componentModel
+ * @param {module:echarts/ExtensionAPI}
+ */
+ layout: function (group, componentModel, api) {
+ var rect = layout.getLayoutRect(componentModel.getBoxLayoutParams(), {
+ width: api.getWidth(),
+ height: api.getHeight()
+ }, componentModel.get('padding'));
+ layout.box(
+ componentModel.get('orient'),
+ group,
+ componentModel.get('itemGap'),
+ rect.width,
+ rect.height
+ );
+
+ positionGroup(group, componentModel, api);
+ },
+
+ addBackground: function (group, componentModel) {
+ var padding = formatUtil.normalizeCssArray(
+ componentModel.get('padding')
+ );
+ var boundingRect = group.getBoundingRect();
+ var style = componentModel.getItemStyle(['color', 'opacity']);
+ style.fill = componentModel.get('backgroundColor');
+ var rect = new graphic.Rect({
+ shape: {
+ x: boundingRect.x - padding[3],
+ y: boundingRect.y - padding[0],
+ width: boundingRect.width + padding[1] + padding[3],
+ height: boundingRect.height + padding[0] + padding[2]
+ },
+ style: style,
+ silent: true,
+ z2: -1
+ });
+ graphic.subPixelOptimizeRect(rect);
+
+ group.add(rect);
+ }
+ };
+
+
+/***/ },
+/* 267 */
+/***/ function(module, exports) {
+
+
+ module.exports = function (ecModel) {
+ var legendModels = ecModel.findComponents({
+ mainType: 'legend'
+ });
+ if (legendModels && legendModels.length) {
+ ecModel.filterSeries(function (series) {
+ // If in any legend component the status is not selected.
+ // Because in legend series is assumed selected when it is not in the legend data.
+ for (var i = 0; i < legendModels.length; i++) {
+ if (!legendModels[i].isSelected(series.name)) {
+ return false;
+ }
+ }
+ return true;
+ });
+ }
+ };
+
+
+/***/ },
+/* 268 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // FIXME Better way to pack data in graphic element
+
+
+ __webpack_require__(269);
+
+ __webpack_require__(270);
+
+ // Show tip action
+ /**
+ * @action
+ * @property {string} type
+ * @property {number} seriesIndex
+ * @property {number} dataIndex
+ * @property {number} [x]
+ * @property {number} [y]
+ */
+ __webpack_require__(1).registerAction(
+ {
+ type: 'showTip',
+ event: 'showTip',
+ update: 'none'
+ },
+ // noop
+ function () {}
+ );
+ // Hide tip action
+ __webpack_require__(1).registerAction(
+ {
+ type: 'hideTip',
+ event: 'hideTip',
+ update: 'none'
+ },
+ // noop
+ function () {}
+ );
+
+
+/***/ },
+/* 269 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ __webpack_require__(1).extendComponentModel({
+
+ type: 'tooltip',
+
+ defaultOption: {
+ zlevel: 0,
+
+ z: 8,
+
+ show: true,
+
+ // tooltip主体内容
+ showContent: true,
+
+ // 触å‘类型,默认数æ®è§¦å‘,è§ä¸‹å›¾ï¼Œå¯é€‰ä¸ºï¼š'item' ¦ 'axis'
+ trigger: 'item',
+
+ // 触å‘æ¡ä»¶ï¼Œæ”¯æŒ 'click' | 'mousemove'
+ triggerOn: 'mousemove',
+
+ // 是å¦æ°¸è¿œæ˜¾ç¤º content
+ alwaysShowContent: false,
+
+ // ä½ç½® {Array} | {Function}
+ // position: null
+
+ // 内容格å¼å™¨ï¼š{string}(Template) ¦ {Function}
+ // formatter: null
+
+ // éšè—延迟,å•ä½ms
+ hideDelay: 100,
+
+ // 动画å˜æ¢æ—¶é—´ï¼Œå•ä½s
+ transitionDuration: 0.4,
+
+ enterable: false,
+
+ // æ示背景颜色,默认为é€æ˜Žåº¦ä¸º0.7的黑色
+ backgroundColor: 'rgba(50,50,50,0.7)',
+
+ // æ示边框颜色
+ borderColor: '#333',
+
+ // æ示边框圆角,å•ä½px,默认为4
+ borderRadius: 4,
+
+ // æ示边框线宽,å•ä½px,默认为0(无边框)
+ borderWidth: 0,
+
+ // æ示内边è·ï¼Œå•ä½px,默认å„æ–¹å‘内边è·ä¸º5,
+ // 接å—数组分别设定上å³ä¸‹å·¦è¾¹è·ï¼ŒåŒcss
+ padding: 5,
+
+ // Extra css text
+ extraCssText: '',
+
+ // å标轴指示器,å标轴触å‘有效
+ axisPointer: {
+ // 默认为直线
+ // å¯é€‰ä¸ºï¼š'line' | 'shadow' | 'cross'
+ type: 'line',
+
+ // type 为 line 的时候有效,指定 tooltip line 所在的轴,å¯é€‰
+ // å¯é€‰ 'x' | 'y' | 'angle' | 'radius' | 'auto'
+ // 默认 'auto',会选择类型为 cateogry 的轴,对于åŒæ•°å€¼è½´ï¼Œç¬›å¡å°”å标系会默认选择 x è½´
+ // æžå标系会默认选择 angle è½´
+ axis: 'auto',
+
+ animation: true,
+ animationDurationUpdate: 200,
+ animationEasingUpdate: 'exponentialOut',
+
+ // 直线指示器样å¼è®¾ç½®
+ lineStyle: {
+ color: '#555',
+ width: 1,
+ type: 'solid'
+ },
+
+ crossStyle: {
+ color: '#555',
+ width: 1,
+ type: 'dashed',
+
+ // TODO formatter
+ textStyle: {}
+ },
+
+ // 阴影指示器样å¼è®¾ç½®
+ shadowStyle: {
+ color: 'rgba(150,150,150,0.3)'
+ }
+ },
+ textStyle: {
+ color: '#fff',
+ fontSize: 14
+ }
+ }
+ });
+
+
+/***/ },
+/* 270 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var TooltipContent = __webpack_require__(271);
+ var graphic = __webpack_require__(42);
+ var zrUtil = __webpack_require__(3);
+ var formatUtil = __webpack_require__(6);
+ var numberUtil = __webpack_require__(7);
+ var parsePercent = numberUtil.parsePercent;
+ var env = __webpack_require__(78);
+
+ function dataEqual(a, b) {
+ if (!a || !b) {
+ return false;
+ }
+ var round = numberUtil.round;
+ return round(a[0]) === round(b[0])
+ && round(a[1]) === round(b[1]);
+ }
+ /**
+ * @inner
+ */
+ function makeLineShape(x1, y1, x2, y2) {
+ return {
+ x1: x1,
+ y1: y1,
+ x2: x2,
+ y2: y2
+ };
+ }
+
+ /**
+ * @inner
+ */
+ function makeRectShape(x, y, width, height) {
+ return {
+ x: x,
+ y: y,
+ width: width,
+ height: height
+ };
+ }
+
+ /**
+ * @inner
+ */
+ function makeSectorShape(cx, cy, r0, r, startAngle, endAngle) {
+ return {
+ cx: cx,
+ cy: cy,
+ r0: r0,
+ r: r,
+ startAngle: startAngle,
+ endAngle: endAngle,
+ clockwise: true
+ };
+ }
+
+ function refixTooltipPosition(x, y, el, viewWidth, viewHeight) {
+ var width = el.clientWidth;
+ var height = el.clientHeight;
+ var gap = 20;
+
+ if (x + width + gap > viewWidth) {
+ x -= width + gap;
+ }
+ else {
+ x += gap;
+ }
+ if (y + height + gap > viewHeight) {
+ y -= height + gap;
+ }
+ else {
+ y += gap;
+ }
+ return [x, y];
+ }
+
+ function calcTooltipPosition(position, rect, dom) {
+ var domWidth = dom.clientWidth;
+ var domHeight = dom.clientHeight;
+ var gap = 5;
+ var x = 0;
+ var y = 0;
+ var rectWidth = rect.width;
+ var rectHeight = rect.height;
+ switch (position) {
+ case 'inside':
+ x = rect.x + rectWidth / 2 - domWidth / 2;
+ y = rect.y + rectHeight / 2 - domHeight / 2;
+ break;
+ case 'top':
+ x = rect.x + rectWidth / 2 - domWidth / 2;
+ y = rect.y - domHeight - gap;
+ break;
+ case 'bottom':
+ x = rect.x + rectWidth / 2 - domWidth / 2;
+ y = rect.y + rectHeight + gap;
+ break;
+ case 'left':
+ x = rect.x - domWidth - gap;
+ y = rect.y + rectHeight / 2 - domHeight / 2;
+ break;
+ case 'right':
+ x = rect.x + rectWidth + gap;
+ y = rect.y + rectHeight / 2 - domHeight / 2;
+ }
+ return [x, y];
+ }
+
+ /**
+ * @param {string|Function|Array.<number>} positionExpr
+ * @param {number} x Mouse x
+ * @param {number} y Mouse y
+ * @param {module:echarts/component/tooltip/TooltipContent} content
+ * @param {Object|<Array.<Object>} params
+ * @param {module:zrender/Element} el target element
+ * @param {module:echarts/ExtensionAPI} api
+ * @return {Array.<number>}
+ */
+ function updatePosition(positionExpr, x, y, content, params, el, api) {
+ var viewWidth = api.getWidth();
+ var viewHeight = api.getHeight();
+
+ var rect = el && el.getBoundingRect().clone();
+ el && rect.applyTransform(el.transform);
+ if (typeof positionExpr === 'function') {
+ // Callback of position can be an array or a string specify the positiont
+ positionExpr = positionExpr([x, y], params, rect);
+ }
+
+ if (zrUtil.isArray(positionExpr)) {
+ x = parsePercent(positionExpr[0], viewWidth);
+ y = parsePercent(positionExpr[1], viewHeight);
+ }
+ // Specify tooltip position by string 'top' 'bottom' 'left' 'right' around graphic element
+ else if (typeof positionExpr === 'string' && el) {
+ var pos = calcTooltipPosition(
+ positionExpr, rect, content.el
+ );
+ x = pos[0];
+ y = pos[1];
+ }
+ else {
+ var pos = refixTooltipPosition(
+ x, y, content.el, viewWidth, viewHeight
+ );
+ x = pos[0];
+ y = pos[1];
+ }
+
+ content.moveTo(x, y);
+ }
+
+ function ifSeriesSupportAxisTrigger(seriesModel) {
+ var coordSys = seriesModel.coordinateSystem;
+ var trigger = seriesModel.get('tooltip.trigger', true);
+ // Ignore series use item tooltip trigger and series coordinate system is not cartesian or
+ return !(!coordSys
+ || (coordSys.type !== 'cartesian2d' && coordSys.type !== 'polar' && coordSys.type !== 'single')
+ || trigger === 'item');
+ }
+
+ __webpack_require__(1).extendComponentView({
+
+ type: 'tooltip',
+
+ _axisPointers: {},
+
+ init: function (ecModel, api) {
+ if (env.node) {
+ return;
+ }
+ var tooltipContent = new TooltipContent(api.getDom(), api);
+ this._tooltipContent = tooltipContent;
+
+ api.on('showTip', this._manuallyShowTip, this);
+ api.on('hideTip', this._manuallyHideTip, this);
+ },
+
+ render: function (tooltipModel, ecModel, api) {
+ if (env.node) {
+ return;
+ }
+
+ // Reset
+ this.group.removeAll();
+
+ /**
+ * @type {Object}
+ * @private
+ */
+ this._axisPointers = {};
+
+ /**
+ * @private
+ * @type {module:echarts/component/tooltip/TooltipModel}
+ */
+ this._tooltipModel = tooltipModel;
+
+ /**
+ * @private
+ * @type {module:echarts/model/Global}
+ */
+ this._ecModel = ecModel;
+
+ /**
+ * @private
+ * @type {module:echarts/ExtensionAPI}
+ */
+ this._api = api;
+
+ /**
+ * @type {Object}
+ * @private
+ */
+ this._lastHover = {
+ // data
+ // payloadBatch
+ };
+
+ var tooltipContent = this._tooltipContent;
+ tooltipContent.update();
+ tooltipContent.enterable = tooltipModel.get('enterable');
+ this._alwaysShowContent = tooltipModel.get('alwaysShowContent');
+
+ /**
+ * @type {Object.<string, Array>}
+ */
+ this._seriesGroupByAxis = this._prepareAxisTriggerData(
+ tooltipModel, ecModel
+ );
+
+ var crossText = this._crossText;
+ if (crossText) {
+ this.group.add(crossText);
+ }
+
+ // Try to keep the tooltip show when refreshing
+ if (this._lastX != null && this._lastY != null) {
+ var self = this;
+ clearTimeout(this._refreshUpdateTimeout);
+ this._refreshUpdateTimeout = setTimeout(function () {
+ // Show tip next tick after other charts are rendered
+ // In case highlight action has wrong result
+ // FIXME
+ self._manuallyShowTip({
+ x: self._lastX,
+ y: self._lastY
+ });
+ });
+ }
+
+ var zr = this._api.getZr();
+ var tryShow = this._tryShow;
+ zr.off('click', tryShow);
+ zr.off('mousemove', tryShow);
+ zr.off('mouseout', this._hide);
+ if (tooltipModel.get('triggerOn') === 'click') {
+ zr.on('click', tryShow, this);
+ }
+ else {
+ zr.on('mousemove', tryShow, this);
+ zr.on('mouseout', this._hide, this);
+ }
+
+ },
+
+ /**
+ * Show tip manually by
+ * dispatchAction({
+ * type: 'showTip',
+ * x: 10,
+ * y: 10
+ * });
+ * Or
+ * dispatchAction({
+ * type: 'showTip',
+ * seriesIndex: 0,
+ * dataIndex: 1
+ * });
+ *
+ * TODO Batch
+ */
+ _manuallyShowTip: function (event) {
+ // From self
+ if (event.from === this.uid) {
+ return;
+ }
+
+ var ecModel = this._ecModel;
+ var seriesIndex = event.seriesIndex;
+ var dataIndex = event.dataIndex;
+ var seriesModel = ecModel.getSeriesByIndex(seriesIndex);
+ var api = this._api;
+
+ if (event.x == null || event.y == null) {
+ if (!seriesModel) {
+ // Find the first series can use axis trigger
+ ecModel.eachSeries(function (_series) {
+ if (ifSeriesSupportAxisTrigger(_series) && !seriesModel) {
+ seriesModel = _series;
+ }
+ });
+ }
+ if (seriesModel) {
+ var data = seriesModel.getData();
+ if (dataIndex == null) {
+ dataIndex = data.indexOfName(event.name);
+ }
+ var el = data.getItemGraphicEl(dataIndex);
+ var cx, cy;
+ // Try to get the point in coordinate system
+ var coordSys = seriesModel.coordinateSystem;
+ if (coordSys && coordSys.dataToPoint) {
+ var point = coordSys.dataToPoint(
+ data.getValues(coordSys.dimensions, dataIndex, true)
+ );
+ cx = point && point[0];
+ cy = point && point[1];
+ }
+ else if (el) {
+ // Use graphic bounding rect
+ var rect = el.getBoundingRect().clone();
+ rect.applyTransform(el.transform);
+ cx = rect.x + rect.width / 2;
+ cy = rect.y + rect.height / 2;
+ }
+ if (cx != null && cy != null) {
+ this._tryShow({
+ offsetX: cx,
+ offsetY: cy,
+ target: el,
+ event: {}
+ });
+ }
+ }
+ }
+ else {
+ var el = api.getZr().handler.findHover(event.x, event.y);
+ this._tryShow({
+ offsetX: event.x,
+ offsetY: event.y,
+ target: el,
+ event: {}
+ });
+ }
+ },
+
+ _manuallyHideTip: function (e) {
+ if (e.from === this.uid) {
+ return;
+ }
+
+ this._hide();
+ },
+
+ _prepareAxisTriggerData: function (tooltipModel, ecModel) {
+ // Prepare data for axis trigger
+ var seriesGroupByAxis = {};
+ ecModel.eachSeries(function (seriesModel) {
+ if (ifSeriesSupportAxisTrigger(seriesModel)) {
+ var coordSys = seriesModel.coordinateSystem;
+ var baseAxis;
+ var key;
+
+ // Only cartesian2d, polar and single support axis trigger
+ if (coordSys.type === 'cartesian2d') {
+ // FIXME `axisPointer.axis` is not baseAxis
+ baseAxis = coordSys.getBaseAxis();
+ key = baseAxis.dim + baseAxis.index;
+ }
+ else if (coordSys.type === 'single') {
+ baseAxis = coordSys.getAxis();
+ key = baseAxis.dim + baseAxis.type;
+ }
+ else {
+ baseAxis = coordSys.getBaseAxis();
+ key = baseAxis.dim + coordSys.name;
+ }
+
+ seriesGroupByAxis[key] = seriesGroupByAxis[key] || {
+ coordSys: [],
+ series: []
+ };
+ seriesGroupByAxis[key].coordSys.push(coordSys);
+ seriesGroupByAxis[key].series.push(seriesModel);
+ }
+ }, this);
+
+ return seriesGroupByAxis;
+ },
+
+ /**
+ * mousemove handler
+ * @param {Object} e
+ * @private
+ */
+ _tryShow: function (e) {
+ var el = e.target;
+ var tooltipModel = this._tooltipModel;
+ var globalTrigger = tooltipModel.get('trigger');
+ var ecModel = this._ecModel;
+ var api = this._api;
+
+ if (!tooltipModel) {
+ return;
+ }
+
+ // Save mouse x, mouse y. So we can try to keep showing the tip if chart is refreshed
+ this._lastX = e.offsetX;
+ this._lastY = e.offsetY;
+
+ // Always show item tooltip if mouse is on the element with dataIndex
+ if (el && el.dataIndex != null) {
+ // Use dataModel in element if possible
+ // Used when mouseover on a element like markPoint or edge
+ // In which case, the data is not main data in series.
+ var dataModel = el.dataModel || ecModel.getSeriesByIndex(el.seriesIndex);
+ var dataIndex = el.dataIndex;
+ var itemModel = dataModel.getData().getItemModel(dataIndex);
+ // Series or single data may use item trigger when global is axis trigger
+ if ((itemModel.get('tooltip.trigger') || globalTrigger) === 'axis') {
+ this._showAxisTooltip(tooltipModel, ecModel, e);
+ }
+ else {
+ // Reset ticket
+ this._ticket = '';
+ // If either single data or series use item trigger
+ this._hideAxisPointer();
+ // Reset last hover and dispatch downplay action
+ this._resetLastHover();
+
+ this._showItemTooltipContent(dataModel, dataIndex, e);
+ }
+
+ api.dispatchAction({
+ type: 'showTip',
+ from: this.uid,
+ dataIndex: el.dataIndex,
+ seriesIndex: el.seriesIndex
+ });
+ }
+ else {
+ if (globalTrigger === 'item') {
+ this._hide();
+ }
+ else {
+ // Try show axis tooltip
+ this._showAxisTooltip(tooltipModel, ecModel, e);
+ }
+
+ // Action of cross pointer
+ // other pointer types will trigger action in _dispatchAndShowSeriesTooltipContent method
+ if (tooltipModel.get('axisPointer.type') === 'cross') {
+ api.dispatchAction({
+ type: 'showTip',
+ from: this.uid,
+ x: e.offsetX,
+ y: e.offsetY
+ });
+ }
+ }
+ },
+
+ /**
+ * Show tooltip on axis
+ * @param {module:echarts/component/tooltip/TooltipModel} tooltipModel
+ * @param {module:echarts/model/Global} ecModel
+ * @param {Object} e
+ * @private
+ */
+ _showAxisTooltip: function (tooltipModel, ecModel, e) {
+ var axisPointerModel = tooltipModel.getModel('axisPointer');
+ var axisPointerType = axisPointerModel.get('type');
+
+ if (axisPointerType === 'cross') {
+ var el = e.target;
+ if (el && el.dataIndex != null) {
+ var seriesModel = ecModel.getSeriesByIndex(el.seriesIndex);
+ var dataIndex = el.dataIndex;
+ this._showItemTooltipContent(seriesModel, dataIndex, e);
+ }
+ }
+
+ this._showAxisPointer();
+ var allNotShow = true;
+ zrUtil.each(this._seriesGroupByAxis, function (seriesCoordSysSameAxis) {
+ // Try show the axis pointer
+ var allCoordSys = seriesCoordSysSameAxis.coordSys;
+ var coordSys = allCoordSys[0];
+
+ // If mouse position is not in the grid or polar
+ var point = [e.offsetX, e.offsetY];
+
+ if (!coordSys.containPoint(point)) {
+ // Hide axis pointer
+ this._hideAxisPointer(coordSys.name);
+ return;
+ }
+
+ allNotShow = false;
+ // Make sure point is discrete on cateogry axis
+ var dimensions = coordSys.dimensions;
+ var value = coordSys.pointToData(point, true);
+ point = coordSys.dataToPoint(value);
+ var baseAxis = coordSys.getBaseAxis();
+ var axisType = axisPointerModel.get('axis');
+ if (axisType === 'auto') {
+ axisType = baseAxis.dim;
+ }
+
+ var contentNotChange = false;
+ var lastHover = this._lastHover;
+ if (axisPointerType === 'cross') {
+ // If hover data not changed
+ // Possible when two axes are all category
+ if (dataEqual(lastHover.data, value)) {
+ contentNotChange = true;
+ }
+ lastHover.data = value;
+ }
+ else {
+ var valIndex = zrUtil.indexOf(dimensions, axisType);
+
+ // If hover data not changed on the axis dimension
+ if (lastHover.data === value[valIndex]) {
+ contentNotChange = true;
+ }
+ lastHover.data = value[valIndex];
+ }
+
+ if (coordSys.type === 'cartesian2d' && !contentNotChange) {
+ this._showCartesianPointer(
+ axisPointerModel, coordSys, axisType, point
+ );
+ }
+ else if (coordSys.type === 'polar' && !contentNotChange) {
+ this._showPolarPointer(
+ axisPointerModel, coordSys, axisType, point
+ );
+ }
+ else if (coordSys.type === 'single' && !contentNotChange) {
+ this._showSinglePointer(
+ axisPointerModel, coordSys, axisType, point
+ );
+ }
+
+ if (axisPointerType !== 'cross') {
+ this._dispatchAndShowSeriesTooltipContent(
+ coordSys, seriesCoordSysSameAxis.series, point, value, contentNotChange
+ );
+ }
+ }, this);
+
+ if (allNotShow) {
+ this._hide();
+ }
+ },
+
+ /**
+ * Show tooltip on axis of cartesian coordinate
+ * @param {module:echarts/model/Model} axisPointerModel
+ * @param {module:echarts/coord/cartesian/Cartesian2D} cartesians
+ * @param {string} axisType
+ * @param {Array.<number>} point
+ * @private
+ */
+ _showCartesianPointer: function (axisPointerModel, cartesian, axisType, point) {
+ var self = this;
+
+ var axisPointerType = axisPointerModel.get('type');
+ var moveAnimation = axisPointerType !== 'cross';
+
+ if (axisPointerType === 'cross') {
+ moveGridLine('x', point, cartesian.getAxis('y').getGlobalExtent());
+ moveGridLine('y', point, cartesian.getAxis('x').getGlobalExtent());
+
+ this._updateCrossText(cartesian, point, axisPointerModel);
+ }
+ else {
+ var otherAxis = cartesian.getAxis(axisType === 'x' ? 'y' : 'x');
+ var otherExtent = otherAxis.getGlobalExtent();
+
+ if (cartesian.type === 'cartesian2d') {
+ (axisPointerType === 'line' ? moveGridLine : moveGridShadow)(
+ axisType, point, otherExtent
+ );
+ }
+ }
+
+ /**
+ * @inner
+ */
+ function moveGridLine(axisType, point, otherExtent) {
+ var targetShape = axisType === 'x'
+ ? makeLineShape(point[0], otherExtent[0], point[0], otherExtent[1])
+ : makeLineShape(otherExtent[0], point[1], otherExtent[1], point[1]);
+
+ var pointerEl = self._getPointerElement(
+ cartesian, axisPointerModel, axisType, targetShape
+ );
+ moveAnimation
+ ? graphic.updateProps(pointerEl, {
+ shape: targetShape
+ }, axisPointerModel)
+ : pointerEl.attr({
+ shape: targetShape
+ });
+ }
+
+ /**
+ * @inner
+ */
+ function moveGridShadow(axisType, point, otherExtent) {
+ var axis = cartesian.getAxis(axisType);
+ var bandWidth = axis.getBandWidth();
+ var span = otherExtent[1] - otherExtent[0];
+ var targetShape = axisType === 'x'
+ ? makeRectShape(point[0] - bandWidth / 2, otherExtent[0], bandWidth, span)
+ : makeRectShape(otherExtent[0], point[1] - bandWidth / 2, span, bandWidth);
+
+ var pointerEl = self._getPointerElement(
+ cartesian, axisPointerModel, axisType, targetShape
+ );
+ moveAnimation
+ ? graphic.updateProps(pointerEl, {
+ shape: targetShape
+ }, axisPointerModel)
+ : pointerEl.attr({
+ shape: targetShape
+ });
+ }
+ },
+
+ _showSinglePointer: function (axisPointerModel, single, axisType, point) {
+ var self = this;
+ var axisPointerType = axisPointerModel.get('type');
+ var moveAnimation = axisPointerType !== 'cross';
+ var rect = single.getRect();
+ var otherExtent = [rect.y, rect.y + rect.height];
+
+ moveSingleLine(axisType, point, otherExtent);
+
+ /**
+ * @inner
+ */
+ function moveSingleLine(axisType, point, otherExtent) {
+ var axis = single.getAxis();
+ var orient = axis.orient;
+
+ var targetShape = orient === 'horizontal'
+ ? makeLineShape(point[0], otherExtent[0], point[0], otherExtent[1])
+ : makeLineShape(otherExtent[0], point[1], otherExtent[1], point[1]);
+
+ var pointerEl = self._getPointerElement(
+ single, axisPointerModel, axisType, targetShape
+ );
+ moveAnimation
+ ? graphic.updateProps(pointerEl, {
+ shape: targetShape
+ }, axisPointerModel)
+ : pointerEl.attr({
+ shape: targetShape
+ });
+ }
+
+ },
+
+ /**
+ * Show tooltip on axis of polar coordinate
+ * @param {module:echarts/model/Model} axisPointerModel
+ * @param {Array.<module:echarts/coord/polar/Polar>} polar
+ * @param {string} axisType
+ * @param {Array.<number>} point
+ */
+ _showPolarPointer: function (axisPointerModel, polar, axisType, point) {
+ var self = this;
+
+ var axisPointerType = axisPointerModel.get('type');
+
+ var angleAxis = polar.getAngleAxis();
+ var radiusAxis = polar.getRadiusAxis();
+
+ var moveAnimation = axisPointerType !== 'cross';
+
+ if (axisPointerType === 'cross') {
+ movePolarLine('angle', point, radiusAxis.getExtent());
+ movePolarLine('radius', point, angleAxis.getExtent());
+
+ this._updateCrossText(polar, point, axisPointerModel);
+ }
+ else {
+ var otherAxis = polar.getAxis(axisType === 'radius' ? 'angle' : 'radius');
+ var otherExtent = otherAxis.getExtent();
+
+ (axisPointerType === 'line' ? movePolarLine : movePolarShadow)(
+ axisType, point, otherExtent
+ );
+ }
+ /**
+ * @inner
+ */
+ function movePolarLine(axisType, point, otherExtent) {
+ var mouseCoord = polar.pointToCoord(point);
+
+ var targetShape;
+
+ if (axisType === 'angle') {
+ var p1 = polar.coordToPoint([otherExtent[0], mouseCoord[1]]);
+ var p2 = polar.coordToPoint([otherExtent[1], mouseCoord[1]]);
+ targetShape = makeLineShape(p1[0], p1[1], p2[0], p2[1]);
+ }
+ else {
+ targetShape = {
+ cx: polar.cx,
+ cy: polar.cy,
+ r: mouseCoord[0]
+ };
+ }
+
+ var pointerEl = self._getPointerElement(
+ polar, axisPointerModel, axisType, targetShape
+ );
+
+ moveAnimation
+ ? graphic.updateProps(pointerEl, {
+ shape: targetShape
+ }, axisPointerModel)
+ : pointerEl.attr({
+ shape: targetShape
+ });
+ }
+
+ /**
+ * @inner
+ */
+ function movePolarShadow(axisType, point, otherExtent) {
+ var axis = polar.getAxis(axisType);
+ var bandWidth = axis.getBandWidth();
+
+ var mouseCoord = polar.pointToCoord(point);
+
+ var targetShape;
+
+ var radian = Math.PI / 180;
+
+ if (axisType === 'angle') {
+ targetShape = makeSectorShape(
+ polar.cx, polar.cy,
+ otherExtent[0], otherExtent[1],
+ // In ECharts y is negative if angle is positive
+ (-mouseCoord[1] - bandWidth / 2) * radian,
+ (-mouseCoord[1] + bandWidth / 2) * radian
+ );
+ }
+ else {
+ targetShape = makeSectorShape(
+ polar.cx, polar.cy,
+ mouseCoord[0] - bandWidth / 2,
+ mouseCoord[0] + bandWidth / 2,
+ 0, Math.PI * 2
+ );
+ }
+
+ var pointerEl = self._getPointerElement(
+ polar, axisPointerModel, axisType, targetShape
+ );
+ moveAnimation
+ ? graphic.updateProps(pointerEl, {
+ shape: targetShape
+ }, axisPointerModel)
+ : pointerEl.attr({
+ shape: targetShape
+ });
+ }
+ },
+
+ _updateCrossText: function (coordSys, point, axisPointerModel) {
+ var crossStyleModel = axisPointerModel.getModel('crossStyle');
+ var textStyleModel = crossStyleModel.getModel('textStyle');
+
+ var tooltipModel = this._tooltipModel;
+
+ var text = this._crossText;
+ if (!text) {
+ text = this._crossText = new graphic.Text({
+ style: {
+ textAlign: 'left',
+ textVerticalAlign: 'bottom'
+ }
+ });
+ this.group.add(text);
+ }
+
+ var value = coordSys.pointToData(point);
+
+ var dims = coordSys.dimensions;
+ value = zrUtil.map(value, function (val, idx) {
+ var axis = coordSys.getAxis(dims[idx]);
+ if (axis.type === 'category' || axis.type === 'time') {
+ val = axis.scale.getLabel(val);
+ }
+ else {
+ val = formatUtil.addCommas(
+ val.toFixed(axis.getPixelPrecision())
+ );
+ }
+ return val;
+ });
+
+ text.setStyle({
+ fill: textStyleModel.getTextColor() || crossStyleModel.get('color'),
+ textFont: textStyleModel.getFont(),
+ text: value.join(', '),
+ x: point[0] + 5,
+ y: point[1] - 5
+ });
+ text.z = tooltipModel.get('z');
+ text.zlevel = tooltipModel.get('zlevel');
+ },
+
+ _getPointerElement: function (coordSys, pointerModel, axisType, initShape) {
+ var tooltipModel = this._tooltipModel;
+ var z = tooltipModel.get('z');
+ var zlevel = tooltipModel.get('zlevel');
+ var axisPointers = this._axisPointers;
+ var coordSysName = coordSys.name;
+ axisPointers[coordSysName] = axisPointers[coordSysName] || {};
+ if (axisPointers[coordSysName][axisType]) {
+ return axisPointers[coordSysName][axisType];
+ }
+
+ // Create if not exists
+ var pointerType = pointerModel.get('type');
+ var styleModel = pointerModel.getModel(pointerType + 'Style');
+ var isShadow = pointerType === 'shadow';
+ var style = styleModel[isShadow ? 'getAreaStyle' : 'getLineStyle']();
+
+ var elementType = coordSys.type === 'polar'
+ ? (isShadow ? 'Sector' : (axisType === 'radius' ? 'Circle' : 'Line'))
+ : (isShadow ? 'Rect' : 'Line');
+
+ isShadow ? (style.stroke = null) : (style.fill = null);
+
+ var el = axisPointers[coordSysName][axisType] = new graphic[elementType]({
+ style: style,
+ z: z,
+ zlevel: zlevel,
+ silent: true,
+ shape: initShape
+ });
+
+ this.group.add(el);
+ return el;
+ },
+
+ /**
+ * Dispatch actions and show tooltip on series
+ * @param {Array.<module:echarts/model/Series>} seriesList
+ * @param {Array.<number>} point
+ * @param {Array.<number>} value
+ * @param {boolean} contentNotChange
+ * @param {Object} e
+ */
+ _dispatchAndShowSeriesTooltipContent: function (
+ coordSys, seriesList, point, value, contentNotChange
+ ) {
+
+ var rootTooltipModel = this._tooltipModel;
+ var tooltipContent = this._tooltipContent;
+
+ var baseAxis = coordSys.getBaseAxis();
+
+ var payloadBatch = zrUtil.map(seriesList, function (series) {
+ return {
+ seriesIndex: series.seriesIndex,
+ dataIndex: series.getAxisTooltipDataIndex
+ ? series.getAxisTooltipDataIndex(series.coordDimToDataDim(baseAxis.dim), value, baseAxis)
+ : series.getData().indexOfNearest(
+ series.coordDimToDataDim(baseAxis.dim)[0],
+ value[baseAxis.dim === 'x' || baseAxis.dim === 'radius' ? 0 : 1]
+ )
+ };
+ });
+
+ var lastHover = this._lastHover;
+ var api = this._api;
+ // Dispatch downplay action
+ if (lastHover.payloadBatch && !contentNotChange) {
+ api.dispatchAction({
+ type: 'downplay',
+ batch: lastHover.payloadBatch
+ });
+ }
+ // Dispatch highlight action
+ if (!contentNotChange) {
+ api.dispatchAction({
+ type: 'highlight',
+ batch: payloadBatch
+ });
+ lastHover.payloadBatch = payloadBatch;
+ }
+ // Dispatch showTip action
+ api.dispatchAction({
+ type: 'showTip',
+ dataIndex: payloadBatch[0].dataIndex,
+ seriesIndex: payloadBatch[0].seriesIndex,
+ from: this.uid
+ });
+
+ if (baseAxis && rootTooltipModel.get('showContent')) {
+
+ var formatter = rootTooltipModel.get('formatter');
+ var positionExpr = rootTooltipModel.get('position');
+ var html;
+
+ var paramsList = zrUtil.map(seriesList, function (series, index) {
+ return series.getDataParams(payloadBatch[index].dataIndex);
+ });
+ // If only one series
+ // FIXME
+ // if (paramsList.length === 1) {
+ // paramsList = paramsList[0];
+ // }
+
+ tooltipContent.show(rootTooltipModel);
+
+ // Update html content
+ var firstDataIndex = payloadBatch[0].dataIndex;
+ if (!contentNotChange) {
+ // Reset ticket
+ this._ticket = '';
+ if (!formatter) {
+ // Default tooltip content
+ // FIXME
+ // (1) shold be the first data which has name?
+ // (2) themeRiver, firstDataIndex is array, and first line is unnecessary.
+ var firstLine = seriesList[0].getData().getName(firstDataIndex);
+ html = (firstLine ? firstLine + '<br />' : '')
+ + zrUtil.map(seriesList, function (series, index) {
+ return series.formatTooltip(payloadBatch[index].dataIndex, true);
+ }).join('<br />');
+ }
+ else {
+ if (typeof formatter === 'string') {
+ html = formatUtil.formatTpl(formatter, paramsList);
+ }
+ else if (typeof formatter === 'function') {
+ var self = this;
+ var ticket = 'axis_' + coordSys.name + '_' + firstDataIndex;
+ var callback = function (cbTicket, html) {
+ if (cbTicket === self._ticket) {
+ tooltipContent.setContent(html);
+
+ updatePosition(
+ positionExpr, point[0], point[1],
+ tooltipContent, paramsList, null, api
+ );
+ }
+ };
+ self._ticket = ticket;
+ html = formatter(paramsList, ticket, callback);
+ }
+ }
+
+ tooltipContent.setContent(html);
+ }
+
+ updatePosition(
+ positionExpr, point[0], point[1],
+ tooltipContent, paramsList, null, api
+ );
+ }
+ },
+
+ /**
+ * Show tooltip on item
+ * @param {module:echarts/model/Series} seriesModel
+ * @param {number} dataIndex
+ * @param {Object} e
+ */
+ _showItemTooltipContent: function (seriesModel, dataIndex, e) {
+ // FIXME Graph data
+ var api = this._api;
+ var data = seriesModel.getData();
+ var itemModel = data.getItemModel(dataIndex);
+
+ var rootTooltipModel = this._tooltipModel;
+
+ var tooltipContent = this._tooltipContent;
+
+ var tooltipModel = itemModel.getModel('tooltip');
+
+ // If series model
+ if (tooltipModel.parentModel) {
+ tooltipModel.parentModel.parentModel = rootTooltipModel;
+ }
+ else {
+ tooltipModel.parentModel = this._tooltipModel;
+ }
+
+ if (tooltipModel.get('showContent')) {
+ var formatter = tooltipModel.get('formatter');
+ var positionExpr = tooltipModel.get('position');
+ var params = seriesModel.getDataParams(dataIndex);
+ var html;
+ if (!formatter) {
+ html = seriesModel.formatTooltip(dataIndex);
+ }
+ else {
+ if (typeof formatter === 'string') {
+ html = formatUtil.formatTpl(formatter, params);
+ }
+ else if (typeof formatter === 'function') {
+ var self = this;
+ var ticket = 'item_' + seriesModel.name + '_' + dataIndex;
+ var callback = function (cbTicket, html) {
+ if (cbTicket === self._ticket) {
+ tooltipContent.setContent(html);
+
+ updatePosition(
+ positionExpr, e.offsetX, e.offsetY,
+ tooltipContent, params, e.target, api
+ );
+ }
+ };
+ self._ticket = ticket;
+ html = formatter(params, ticket, callback);
+ }
+ }
+
+ tooltipContent.show(tooltipModel);
+ tooltipContent.setContent(html);
+
+ updatePosition(
+ positionExpr, e.offsetX, e.offsetY,
+ tooltipContent, params, e.target, api
+ );
+ }
+ },
+
+ /**
+ * Show axis pointer
+ * @param {string} [coordSysName]
+ */
+ _showAxisPointer: function (coordSysName) {
+ if (coordSysName) {
+ var axisPointers = this._axisPointers[coordSysName];
+ axisPointers && zrUtil.each(axisPointers, function (el) {
+ el.show();
+ });
+ }
+ else {
+ this.group.eachChild(function (child) {
+ child.show();
+ });
+ this.group.show();
+ }
+ },
+
+ _resetLastHover: function () {
+ var lastHover = this._lastHover;
+ if (lastHover.payloadBatch) {
+ this._api.dispatchAction({
+ type: 'downplay',
+ batch: lastHover.payloadBatch
+ });
+ }
+ // Reset lastHover
+ this._lastHover = {};
+ },
+ /**
+ * Hide axis pointer
+ * @param {string} [coordSysName]
+ */
+ _hideAxisPointer: function (coordSysName) {
+ if (coordSysName) {
+ var axisPointers = this._axisPointers[coordSysName];
+ axisPointers && zrUtil.each(axisPointers, function (el) {
+ el.hide();
+ });
+ }
+ else {
+ this.group.hide();
+ }
+ },
+
+ _hide: function () {
+ this._hideAxisPointer();
+ this._resetLastHover();
+ if (!this._alwaysShowContent) {
+ this._tooltipContent.hideLater(this._tooltipModel.get('hideDelay'));
+ }
+
+ this._api.dispatchAction({
+ type: 'hideTip',
+ from: this.uid
+ });
+ },
+
+ dispose: function (ecModel, api) {
+ if (env.node) {
+ return;
+ }
+ var zr = api.getZr();
+ this._tooltipContent.hide();
+
+ zr.off('click', this._tryShow);
+ zr.off('mousemove', this._tryShow);
+ zr.off('mouseout', this._hide);
+
+ api.off('showTip', this._manuallyShowTip);
+ api.off('hideTip', this._manuallyHideTip);
+ }
+ });
+
+
+/***/ },
+/* 271 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @module echarts/component/tooltip/TooltipContent
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+ var zrColor = __webpack_require__(38);
+ var eventUtil = __webpack_require__(80);
+ var formatUtil = __webpack_require__(6);
+ var each = zrUtil.each;
+ var toCamelCase = formatUtil.toCamelCase;
+
+ var vendors = ['', '-webkit-', '-moz-', '-o-'];
+
+ var gCssText = 'position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;';
+
+ /**
+ * @param {number} duration
+ * @return {string}
+ * @inner
+ */
+ function assembleTransition(duration) {
+ var transitionCurve = 'cubic-bezier(0.23, 1, 0.32, 1)';
+ var transitionText = 'left ' + duration + 's ' + transitionCurve + ','
+ + 'top ' + duration + 's ' + transitionCurve;
+ return zrUtil.map(vendors, function (vendorPrefix) {
+ return vendorPrefix + 'transition:' + transitionText;
+ }).join(';');
+ }
+
+ /**
+ * @param {Object} textStyle
+ * @return {string}
+ * @inner
+ */
+ function assembleFont(textStyleModel) {
+ var cssText = [];
+
+ var fontSize = textStyleModel.get('fontSize');
+ var color = textStyleModel.getTextColor();
+
+ color && cssText.push('color:' + color);
+
+ cssText.push('font:' + textStyleModel.getFont());
+
+ fontSize &&
+ cssText.push('line-height:' + Math.round(fontSize * 3 / 2) + 'px');
+
+ each(['decoration', 'align'], function (name) {
+ var val = textStyleModel.get(name);
+ val && cssText.push('text-' + name + ':' + val);
+ });
+
+ return cssText.join(';');
+ }
+
+ /**
+ * @param {Object} tooltipModel
+ * @return {string}
+ * @inner
+ */
+ function assembleCssText(tooltipModel) {
+
+ tooltipModel = tooltipModel;
+
+ var cssText = [];
+
+ var transitionDuration = tooltipModel.get('transitionDuration');
+ var backgroundColor = tooltipModel.get('backgroundColor');
+ var textStyleModel = tooltipModel.getModel('textStyle');
+ var padding = tooltipModel.get('padding');
+
+ // Animation transition
+ transitionDuration &&
+ cssText.push(assembleTransition(transitionDuration));
+
+ if (backgroundColor) {
+ // for ie
+ cssText.push(
+ 'background-Color:' + zrColor.toHex(backgroundColor)
+ );
+ cssText.push('filter:alpha(opacity=70)');
+ cssText.push('background-Color:' + backgroundColor);
+ }
+
+ // Border style
+ each(['width', 'color', 'radius'], function (name) {
+ var borderName = 'border-' + name;
+ var camelCase = toCamelCase(borderName);
+ var val = tooltipModel.get(camelCase);
+ val != null &&
+ cssText.push(borderName + ':' + val + (name === 'color' ? '' : 'px'));
+ });
+
+ // Text style
+ cssText.push(assembleFont(textStyleModel));
+
+ // Padding
+ if (padding != null) {
+ cssText.push('padding:' + formatUtil.normalizeCssArray(padding).join('px ') + 'px');
+ }
+
+ return cssText.join(';') + ';';
+ }
+
+ /**
+ * @alias module:echarts/component/tooltip/TooltipContent
+ * @constructor
+ */
+ function TooltipContent(container, api) {
+ var el = document.createElement('div');
+ var zr = api.getZr();
+
+ this.el = el;
+
+ this._x = api.getWidth() / 2;
+ this._y = api.getHeight() / 2;
+
+ container.appendChild(el);
+
+ this._container = container;
+
+ this._show = false;
+
+ /**
+ * @private
+ */
+ this._hideTimeout;
+
+ var self = this;
+ el.onmouseenter = function () {
+ // clear the timeout in hideLater and keep showing tooltip
+ if (self.enterable) {
+ clearTimeout(self._hideTimeout);
+ self._show = true;
+ }
+ self._inContent = true;
+ };
+ el.onmousemove = function (e) {
+ if (!self.enterable) {
+ // Try trigger zrender event to avoid mouse
+ // in and out shape too frequently
+ var handler = zr.handler;
+ eventUtil.normalizeEvent(container, e);
+ handler.dispatch('mousemove', e);
+ }
+ };
+ el.onmouseleave = function () {
+ if (self.enterable) {
+ if (self._show) {
+ self.hideLater(self._hideDelay);
+ }
+ }
+ self._inContent = false;
+ };
+
+ compromiseMobile(el, container);
+ }
+
+ function compromiseMobile(tooltipContentEl, container) {
+ // Prevent default behavior on mobile. For example,
+ // defuault pinch gesture will cause browser zoom.
+ // We do not preventing event on tooltip contnet el,
+ // because user may need customization in tooltip el.
+ eventUtil.addEventListener(container, 'touchstart', preventDefault);
+ eventUtil.addEventListener(container, 'touchmove', preventDefault);
+ eventUtil.addEventListener(container, 'touchend', preventDefault);
+
+ function preventDefault(e) {
+ if (contains(e.target)) {
+ e.preventDefault();
+ }
+ }
+
+ function contains(targetEl) {
+ while (targetEl && targetEl !== container) {
+ if (targetEl === tooltipContentEl) {
+ return true;
+ }
+ targetEl = targetEl.parentNode;
+ }
+ }
+ }
+
+ TooltipContent.prototype = {
+
+ constructor: TooltipContent,
+
+ enterable: true,
+
+ /**
+ * Update when tooltip is rendered
+ */
+ update: function () {
+ var container = this._container;
+ var stl = container.currentStyle
+ || document.defaultView.getComputedStyle(container);
+ var domStyle = container.style;
+ if (domStyle.position !== 'absolute' && stl.position !== 'absolute') {
+ domStyle.position = 'relative';
+ }
+ // Hide the tooltip
+ // PENDING
+ // this.hide();
+ },
+
+ show: function (tooltipModel) {
+ clearTimeout(this._hideTimeout);
+
+ this.el.style.cssText = gCssText + assembleCssText(tooltipModel)
+ // http://stackoverflow.com/questions/21125587/css3-transition-not-working-in-chrome-anymore
+ + ';left:' + this._x + 'px;top:' + this._y + 'px;'
+ + (tooltipModel.get('extraCssText') || '');
+
+ this._show = true;
+ },
+
+ setContent: function (content) {
+ var el = this.el;
+ el.innerHTML = content;
+ el.style.display = content ? 'block' : 'none';
+ },
+
+ moveTo: function (x, y) {
+ var style = this.el.style;
+ style.left = x + 'px';
+ style.top = y + 'px';
+
+ this._x = x;
+ this._y = y;
+ },
+
+ hide: function () {
+ this.el.style.display = 'none';
+ this._show = false;
+ },
+
+ // showLater: function ()
+
+ hideLater: function (time) {
+ if (this._show && !(this._inContent && this.enterable)) {
+ if (time) {
+ this._hideDelay = time;
+ // Set show false to avoid invoke hideLater mutiple times
+ this._show = false;
+ this._hideTimeout = setTimeout(zrUtil.bind(this.hide, this), time);
+ }
+ else {
+ this.hide();
+ }
+ }
+ },
+
+ isShow: function () {
+ return this._show;
+ }
+ };
+
+ module.exports = TooltipContent;
+
+
+/***/ },
+/* 272 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ __webpack_require__(273);
+ __webpack_require__(279);
+ __webpack_require__(281);
+
+ // Polar view
+ __webpack_require__(1).extendComponentView({
+ type: 'polar'
+ });
+
+
+/***/ },
+/* 273 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // TODO Axis scale
+
+
+ var Polar = __webpack_require__(274);
+ var numberUtil = __webpack_require__(7);
+
+ var axisHelper = __webpack_require__(108);
+ var niceScaleExtent = axisHelper.niceScaleExtent;
+
+ // ä¾èµ– PolarModel åšé¢„处ç†
+ __webpack_require__(277);
+
+ /**
+ * Resize method bound to the polar
+ * @param {module:echarts/coord/polar/PolarModel} polarModel
+ * @param {module:echarts/ExtensionAPI} api
+ */
+ function resizePolar(polarModel, api) {
+ var center = polarModel.get('center');
+ var radius = polarModel.get('radius');
+ var width = api.getWidth();
+ var height = api.getHeight();
+ var parsePercent = numberUtil.parsePercent;
+
+ this.cx = parsePercent(center[0], width);
+ this.cy = parsePercent(center[1], height);
+
+ var radiusAxis = this.getRadiusAxis();
+ var size = Math.min(width, height) / 2;
+ // var idx = radiusAxis.inverse ? 1 : 0;
+ radiusAxis.setExtent(0, parsePercent(radius, size));
+ }
+
+ /**
+ * Update polar
+ */
+ function updatePolarScale(ecModel, api) {
+ var polar = this;
+ var angleAxis = polar.getAngleAxis();
+ var radiusAxis = polar.getRadiusAxis();
+ // Reset scale
+ angleAxis.scale.setExtent(Infinity, -Infinity);
+ radiusAxis.scale.setExtent(Infinity, -Infinity);
+
+ ecModel.eachSeries(function (seriesModel) {
+ if (seriesModel.coordinateSystem === polar) {
+ var data = seriesModel.getData();
+ radiusAxis.scale.unionExtent(
+ data.getDataExtent('radius', radiusAxis.type !== 'category')
+ );
+ angleAxis.scale.unionExtent(
+ data.getDataExtent('angle', angleAxis.type !== 'category')
+ );
+ }
+ });
+
+ niceScaleExtent(angleAxis, angleAxis.model);
+ niceScaleExtent(radiusAxis, radiusAxis.model);
+
+ // Fix extent of category angle axis
+ if (angleAxis.type === 'category' && !angleAxis.onBand) {
+ var extent = angleAxis.getExtent();
+ var diff = 360 / angleAxis.scale.count();
+ angleAxis.inverse ? (extent[1] += diff) : (extent[1] -= diff);
+ angleAxis.setExtent(extent[0], extent[1]);
+ }
+ }
+
+ /**
+ * Set common axis properties
+ * @param {module:echarts/coord/polar/AngleAxis|module:echarts/coord/polar/RadiusAxis}
+ * @param {module:echarts/coord/polar/AxisModel}
+ * @inner
+ */
+ function setAxis(axis, axisModel) {
+ axis.type = axisModel.get('type');
+ axis.scale = axisHelper.createScaleByModel(axisModel);
+ axis.onBand = axisModel.get('boundaryGap') && axis.type === 'category';
+
+ // FIXME Radius axis not support inverse axis
+ if (axisModel.mainType === 'angleAxis') {
+ var startAngle = axisModel.get('startAngle');
+ axis.inverse = axisModel.get('inverse') ^ axisModel.get('clockwise');
+ axis.setExtent(startAngle, startAngle + (axis.inverse ? -360 : 360));
+ }
+
+ // Inject axis instance
+ axisModel.axis = axis;
+ axis.model = axisModel;
+ }
+
+
+ var polarCreator = {
+
+ dimensions: Polar.prototype.dimensions,
+
+ create: function (ecModel, api) {
+ var polarList = [];
+ ecModel.eachComponent('polar', function (polarModel, idx) {
+ var polar = new Polar(idx);
+ // Inject resize and update method
+ polar.resize = resizePolar;
+ polar.update = updatePolarScale;
+
+ var radiusAxis = polar.getRadiusAxis();
+ var angleAxis = polar.getAngleAxis();
+
+ var radiusAxisModel = polarModel.findAxisModel('radiusAxis');
+ var angleAxisModel = polarModel.findAxisModel('angleAxis');
+
+ setAxis(radiusAxis, radiusAxisModel);
+ setAxis(angleAxis, angleAxisModel);
+
+ polar.resize(polarModel, api);
+ polarList.push(polar);
+
+ polarModel.coordinateSystem = polar;
+ });
+ // Inject coordinateSystem to series
+ ecModel.eachSeries(function (seriesModel) {
+ if (seriesModel.get('coordinateSystem') === 'polar') {
+ seriesModel.coordinateSystem = polarList[seriesModel.get('polarIndex')];
+ }
+ });
+
+ return polarList;
+ }
+ };
+
+ __webpack_require__(25).register('polar', polarCreator);
+
+
+/***/ },
+/* 274 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ /**
+ * @module echarts/coord/polar/Polar
+ */
+
+
+ var RadiusAxis = __webpack_require__(275);
+ var AngleAxis = __webpack_require__(276);
+
+ /**
+ * @alias {module:echarts/coord/polar/Polar}
+ * @constructor
+ * @param {string} name
+ */
+ var Polar = function (name) {
+
+ /**
+ * @type {string}
+ */
+ this.name = name || '';
+
+ /**
+ * x of polar center
+ * @type {number}
+ */
+ this.cx = 0;
+
+ /**
+ * y of polar center
+ * @type {number}
+ */
+ this.cy = 0;
+
+ /**
+ * @type {module:echarts/coord/polar/RadiusAxis}
+ * @private
+ */
+ this._radiusAxis = new RadiusAxis();
+
+ /**
+ * @type {module:echarts/coord/polar/AngleAxis}
+ * @private
+ */
+ this._angleAxis = new AngleAxis();
+ };
+
+ Polar.prototype = {
+
+ constructor: Polar,
+
+ type: 'polar',
+
+ /**
+ * @param {Array.<string>}
+ * @readOnly
+ */
+ dimensions: ['radius', 'angle'],
+
+ /**
+ * If contain coord
+ * @param {Array.<number>} point
+ * @return {boolean}
+ */
+ containPoint: function (point) {
+ var coord = this.pointToCoord(point);
+ return this._radiusAxis.contain(coord[0])
+ && this._angleAxis.contain(coord[1]);
+ },
+
+ /**
+ * If contain data
+ * @param {Array.<number>} data
+ * @return {boolean}
+ */
+ containData: function (data) {
+ return this._radiusAxis.containData(data[0])
+ && this._angleAxis.containData(data[1]);
+ },
+
+ /**
+ * @param {string} axisType
+ * @return {module:echarts/coord/polar/AngleAxis|module:echarts/coord/polar/RadiusAxis}
+ */
+ getAxis: function (axisType) {
+ return this['_' + axisType + 'Axis'];
+ },
+
+ /**
+ * Get axes by type of scale
+ * @param {string} scaleType
+ * @return {module:echarts/coord/polar/AngleAxis|module:echarts/coord/polar/RadiusAxis}
+ */
+ getAxesByScale: function (scaleType) {
+ var axes = [];
+ var angleAxis = this._angleAxis;
+ var radiusAxis = this._radiusAxis;
+ angleAxis.scale.type === scaleType && axes.push(angleAxis);
+ radiusAxis.scale.type === scaleType && axes.push(radiusAxis);
+
+ return axes;
+ },
+
+ /**
+ * @return {module:echarts/coord/polar/AngleAxis}
+ */
+ getAngleAxis: function () {
+ return this._angleAxis;
+ },
+
+ /**
+ * @return {module:echarts/coord/polar/RadiusAxis}
+ */
+ getRadiusAxis: function () {
+ return this._radiusAxis;
+ },
+
+ /**
+ * @param {module:echarts/coord/polar/Axis}
+ * @return {module:echarts/coord/polar/Axis}
+ */
+ getOtherAxis: function (axis) {
+ var angleAxis = this._angleAxis;
+ return axis === angleAxis ? this._radiusAxis : angleAxis;
+ },
+
+ /**
+ * Base axis will be used on stacking.
+ *
+ * @return {module:echarts/coord/polar/Axis}
+ */
+ getBaseAxis: function () {
+ return this.getAxesByScale('ordinal')[0]
+ || this.getAxesByScale('time')[0]
+ || this.getAngleAxis();
+ },
+
+ /**
+ * Convert series data to a list of (x, y) points
+ * @param {module:echarts/data/List} data
+ * @return {Array}
+ * Return list of coordinates. For example:
+ * `[[10, 10], [20, 20], [30, 30]]`
+ */
+ dataToPoints: function (data) {
+ return data.mapArray(this.dimensions, function (radius, angle) {
+ return this.dataToPoint([radius, angle]);
+ }, this);
+ },
+
+ /**
+ * Convert a single data item to (x, y) point.
+ * Parameter data is an array which the first element is radius and the second is angle
+ * @param {Array.<number>} data
+ * @param {boolean} [clamp=false]
+ * @return {Array.<number>}
+ */
+ dataToPoint: function (data, clamp) {
+ return this.coordToPoint([
+ this._radiusAxis.dataToRadius(data[0], clamp),
+ this._angleAxis.dataToAngle(data[1], clamp)
+ ]);
+ },
+
+ /**
+ * Convert a (x, y) point to data
+ * @param {Array.<number>} point
+ * @param {boolean} [clamp=false]
+ * @return {Array.<number>}
+ */
+ pointToData: function (point, clamp) {
+ var coord = this.pointToCoord(point);
+ return [
+ this._radiusAxis.radiusToData(coord[0], clamp),
+ this._angleAxis.angleToData(coord[1], clamp)
+ ];
+ },
+
+ /**
+ * Convert a (x, y) point to (radius, angle) coord
+ * @param {Array.<number>} point
+ * @return {Array.<number>}
+ */
+ pointToCoord: function (point) {
+ var dx = point[0] - this.cx;
+ var dy = point[1] - this.cy;
+ var angleAxis = this.getAngleAxis();
+ var extent = angleAxis.getExtent();
+ var minAngle = Math.min(extent[0], extent[1]);
+ var maxAngle = Math.max(extent[0], extent[1]);
+ // Fix fixed extent in polarCreator
+ // FIXME
+ angleAxis.inverse
+ ? (minAngle = maxAngle - 360)
+ : (maxAngle = minAngle + 360);
+
+ var radius = Math.sqrt(dx * dx + dy * dy);
+ dx /= radius;
+ dy /= radius;
+
+ var radian = Math.atan2(-dy, dx) / Math.PI * 180;
+
+ // move to angleExtent
+ var dir = radian < minAngle ? 1 : -1;
+ while (radian < minAngle || radian > maxAngle) {
+ radian += dir * 360;
+ }
+
+ return [radius, radian];
+ },
+
+ /**
+ * Convert a (radius, angle) coord to (x, y) point
+ * @param {Array.<number>} coord
+ * @return {Array.<number>}
+ */
+ coordToPoint: function (coord) {
+ var radius = coord[0];
+ var radian = coord[1] / 180 * Math.PI;
+ var x = Math.cos(radian) * radius + this.cx;
+ // Inverse the y
+ var y = -Math.sin(radian) * radius + this.cy;
+
+ return [x, y];
+ }
+ };
+
+ module.exports = Polar;
+
+
+/***/ },
+/* 275 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var zrUtil = __webpack_require__(3);
+ var Axis = __webpack_require__(117);
+
+ function RadiusAxis(scale, radiusExtent) {
+
+ Axis.call(this, 'radius', scale, radiusExtent);
+
+ /**
+ * Axis type
+ * - 'category'
+ * - 'value'
+ * - 'time'
+ * - 'log'
+ * @type {string}
+ */
+ this.type = 'category';
+ }
+
+ RadiusAxis.prototype = {
+
+ constructor: RadiusAxis,
+
+ dataToRadius: Axis.prototype.dataToCoord,
+
+ radiusToData: Axis.prototype.coordToData
+ };
+
+ zrUtil.inherits(RadiusAxis, Axis);
+
+ module.exports = RadiusAxis;
+
+
+/***/ },
+/* 276 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var zrUtil = __webpack_require__(3);
+ var Axis = __webpack_require__(117);
+
+ function AngleAxis(scale, angleExtent) {
+
+ angleExtent = angleExtent || [0, 360];
+
+ Axis.call(this, 'angle', scale, angleExtent);
+
+ /**
+ * Axis type
+ * - 'category'
+ * - 'value'
+ * - 'time'
+ * - 'log'
+ * @type {string}
+ */
+ this.type = 'category';
+ }
+
+ AngleAxis.prototype = {
+
+ constructor: AngleAxis,
+
+ dataToAngle: Axis.prototype.dataToCoord,
+
+ angleToData: Axis.prototype.coordToData
+ };
+
+ zrUtil.inherits(AngleAxis, Axis);
+
+ module.exports = AngleAxis;
+
+
+/***/ },
+/* 277 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ __webpack_require__(278);
+
+ __webpack_require__(1).extendComponentModel({
+
+ type: 'polar',
+
+ dependencies: ['polarAxis', 'angleAxis'],
+
+ /**
+ * @type {module:echarts/coord/polar/Polar}
+ */
+ coordinateSystem: null,
+
+ /**
+ * @param {string} axisType
+ * @return {module:echarts/coord/polar/AxisModel}
+ */
+ findAxisModel: function (axisType) {
+ var angleAxisModel;
+ var ecModel = this.ecModel;
+ ecModel.eachComponent(axisType, function (axisModel) {
+ if (ecModel.getComponent(
+ 'polar', axisModel.getShallow('polarIndex')
+ ) === this) {
+ angleAxisModel = axisModel;
+ }
+ }, this);
+ return angleAxisModel;
+ },
+
+ defaultOption: {
+
+ zlevel: 0,
+
+ z: 0,
+
+ center: ['50%', '50%'],
+
+ radius: '80%'
+ }
+ });
+
+
+/***/ },
+/* 278 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var zrUtil = __webpack_require__(3);
+ var ComponentModel = __webpack_require__(19);
+ var axisModelCreator = __webpack_require__(121);
+
+ var PolarAxisModel = ComponentModel.extend({
+ type: 'polarAxis',
+ /**
+ * @type {module:echarts/coord/polar/AngleAxis|module:echarts/coord/polar/RadiusAxis}
+ */
+ axis: null
+ });
+
+ zrUtil.merge(PolarAxisModel.prototype, __webpack_require__(123));
+
+ var polarAxisDefaultExtendedOption = {
+ angle: {
+ polarIndex: 0,
+
+ startAngle: 90,
+
+ clockwise: true,
+
+ splitNumber: 12,
+
+ axisLabel: {
+ rotate: false
+ }
+ },
+ radius: {
+ polarIndex: 0,
+
+ splitNumber: 5
+ }
+ };
+
+ function getAxisType(axisDim, option) {
+ // Default axis with data is category axis
+ return option.type || (option.data ? 'category' : 'value');
+ }
+
+ axisModelCreator('angle', PolarAxisModel, getAxisType, polarAxisDefaultExtendedOption.angle);
+ axisModelCreator('radius', PolarAxisModel, getAxisType, polarAxisDefaultExtendedOption.radius);
+
+
+
+/***/ },
+/* 279 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ __webpack_require__(273);
+
+ __webpack_require__(280);
+
+
+/***/ },
+/* 280 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var zrUtil = __webpack_require__(3);
+ var graphic = __webpack_require__(42);
+ var Model = __webpack_require__(8);
+
+ var elementList = ['axisLine', 'axisLabel', 'axisTick', 'splitLine', 'splitArea'];
+
+ function getAxisLineShape(polar, r0, r, angle) {
+ var start = polar.coordToPoint([r0, angle]);
+ var end = polar.coordToPoint([r, angle]);
+
+ return {
+ x1: start[0],
+ y1: start[1],
+ x2: end[0],
+ y2: end[1]
+ };
+ }
+ __webpack_require__(1).extendComponentView({
+
+ type: 'angleAxis',
+
+ render: function (angleAxisModel, ecModel) {
+ this.group.removeAll();
+ if (!angleAxisModel.get('show')) {
+ return;
+ }
+
+ var polarModel = ecModel.getComponent('polar', angleAxisModel.get('polarIndex'));
+ var angleAxis = angleAxisModel.axis;
+ var polar = polarModel.coordinateSystem;
+ var radiusExtent = polar.getRadiusAxis().getExtent();
+ var ticksAngles = angleAxis.getTicksCoords();
+
+ if (angleAxis.type !== 'category') {
+ // Remove the last tick which will overlap the first tick
+ ticksAngles.pop();
+ }
+
+ zrUtil.each(elementList, function (name) {
+ if (angleAxisModel.get(name +'.show')) {
+ this['_' + name](angleAxisModel, polar, ticksAngles, radiusExtent);
+ }
+ }, this);
+ },
+
+ /**
+ * @private
+ */
+ _axisLine: function (angleAxisModel, polar, ticksAngles, radiusExtent) {
+ var lineStyleModel = angleAxisModel.getModel('axisLine.lineStyle');
+
+ var circle = new graphic.Circle({
+ shape: {
+ cx: polar.cx,
+ cy: polar.cy,
+ r: radiusExtent[1]
+ },
+ style: lineStyleModel.getLineStyle(),
+ z2: 1,
+ silent: true
+ });
+ circle.style.fill = null;
+
+ this.group.add(circle);
+ },
+
+ /**
+ * @private
+ */
+ _axisTick: function (angleAxisModel, polar, ticksAngles, radiusExtent) {
+ var tickModel = angleAxisModel.getModel('axisTick');
+
+ var tickLen = (tickModel.get('inside') ? -1 : 1) * tickModel.get('length');
+
+ var lines = zrUtil.map(ticksAngles, function (tickAngle) {
+ return new graphic.Line({
+ shape: getAxisLineShape(polar, radiusExtent[1], radiusExtent[1] + tickLen, tickAngle)
+ });
+ });
+ this.group.add(graphic.mergePath(
+ lines, {
+ style: tickModel.getModel('lineStyle').getLineStyle()
+ }
+ ));
+ },
+
+ /**
+ * @private
+ */
+ _axisLabel: function (angleAxisModel, polar, ticksAngles, radiusExtent) {
+ var axis = angleAxisModel.axis;
+
+ var categoryData = angleAxisModel.get('data');
+
+ var labelModel = angleAxisModel.getModel('axisLabel');
+ var axisTextStyleModel = labelModel.getModel('textStyle');
+
+ var labels = angleAxisModel.getFormattedLabels();
+
+ var labelMargin = labelModel.get('margin');
+ var labelsAngles = axis.getLabelsCoords();
+
+ // Use length of ticksAngles because it may remove the last tick to avoid overlapping
+ for (var i = 0; i < ticksAngles.length; i++) {
+ var r = radiusExtent[1];
+ var p = polar.coordToPoint([r + labelMargin, labelsAngles[i]]);
+ var cx = polar.cx;
+ var cy = polar.cy;
+
+ var labelTextAlign = Math.abs(p[0] - cx) / r < 0.3
+ ? 'center' : (p[0] > cx ? 'left' : 'right');
+ var labelTextBaseline = Math.abs(p[1] - cy) / r < 0.3
+ ? 'middle' : (p[1] > cy ? 'top' : 'bottom');
+
+ var textStyleModel = axisTextStyleModel;
+ if (categoryData && categoryData[i] && categoryData[i].textStyle) {
+ textStyleModel = new Model(
+ categoryData[i].textStyle, axisTextStyleModel
+ );
+ }
+ this.group.add(new graphic.Text({
+ style: {
+ x: p[0],
+ y: p[1],
+ fill: textStyleModel.getTextColor(),
+ text: labels[i],
+ textAlign: labelTextAlign,
+ textVerticalAlign: labelTextBaseline,
+ textFont: textStyleModel.getFont()
+ },
+ silent: true
+ }));
+ }
+ },
+
+ /**
+ * @private
+ */
+ _splitLine: function (angleAxisModel, polar, ticksAngles, radiusExtent) {
+ var splitLineModel = angleAxisModel.getModel('splitLine');
+ var lineStyleModel = splitLineModel.getModel('lineStyle');
+ var lineColors = lineStyleModel.get('color');
+ var lineCount = 0;
+
+ lineColors = lineColors instanceof Array ? lineColors : [lineColors];
+
+ var splitLines = [];
+
+ for (var i = 0; i < ticksAngles.length; i++) {
+ var colorIndex = (lineCount++) % lineColors.length;
+ splitLines[colorIndex] = splitLines[colorIndex] || [];
+ splitLines[colorIndex].push(new graphic.Line({
+ shape: getAxisLineShape(polar, radiusExtent[0], radiusExtent[1], ticksAngles[i])
+ }));
+ }
+
+ // Simple optimization
+ // Batching the lines if color are the same
+ for (var i = 0; i < splitLines.length; i++) {
+ this.group.add(graphic.mergePath(splitLines[i], {
+ style: zrUtil.defaults({
+ stroke: lineColors[i % lineColors.length]
+ }, lineStyleModel.getLineStyle()),
+ silent: true,
+ z: angleAxisModel.get('z')
+ }));
+ }
+ },
+
+ /**
+ * @private
+ */
+ _splitArea: function (angleAxisModel, polar, ticksAngles, radiusExtent) {
+
+ var splitAreaModel = angleAxisModel.getModel('splitArea');
+ var areaStyleModel = splitAreaModel.getModel('areaStyle');
+ var areaColors = areaStyleModel.get('color');
+ var lineCount = 0;
+
+ areaColors = areaColors instanceof Array ? areaColors : [areaColors];
+
+ var splitAreas = [];
+
+ var RADIAN = Math.PI / 180;
+ var prevAngle = -ticksAngles[0] * RADIAN;
+ var r0 = Math.min(radiusExtent[0], radiusExtent[1]);
+ var r1 = Math.max(radiusExtent[0], radiusExtent[1]);
+
+ var clockwise = angleAxisModel.get('clockwise');
+
+ for (var i = 1; i < ticksAngles.length; i++) {
+ var colorIndex = (lineCount++) % areaColors.length;
+ splitAreas[colorIndex] = splitAreas[colorIndex] || [];
+ splitAreas[colorIndex].push(new graphic.Sector({
+ shape: {
+ cx: polar.cx,
+ cy: polar.cy,
+ r0: r0,
+ r: r1,
+ startAngle: prevAngle,
+ endAngle: -ticksAngles[i] * RADIAN,
+ clockwise: clockwise
+ },
+ silent: true
+ }));
+ prevAngle = -ticksAngles[i] * RADIAN;
+ }
+
+ // Simple optimization
+ // Batching the lines if color are the same
+ for (var i = 0; i < splitAreas.length; i++) {
+ this.group.add(graphic.mergePath(splitAreas[i], {
+ style: zrUtil.defaults({
+ fill: areaColors[i % areaColors.length]
+ }, areaStyleModel.getAreaStyle()),
+ silent: true
+ }));
+ }
+ }
+ });
+
+
+/***/ },
+/* 281 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ __webpack_require__(273);
+
+ __webpack_require__(282);
+
+
+/***/ },
+/* 282 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var zrUtil = __webpack_require__(3);
+ var graphic = __webpack_require__(42);
+ var AxisBuilder = __webpack_require__(126);
+
+ var axisBuilderAttrs = [
+ 'axisLine', 'axisLabel', 'axisTick', 'axisName'
+ ];
+ var selfBuilderAttrs = [
+ 'splitLine', 'splitArea'
+ ];
+
+ __webpack_require__(1).extendComponentView({
+
+ type: 'radiusAxis',
+
+ render: function (radiusAxisModel, ecModel) {
+ this.group.removeAll();
+ if (!radiusAxisModel.get('show')) {
+ return;
+ }
+ var polarModel = ecModel.getComponent('polar', radiusAxisModel.get('polarIndex'));
+ var angleAxis = polarModel.coordinateSystem.getAngleAxis();
+ var radiusAxis = radiusAxisModel.axis;
+ var polar = polarModel.coordinateSystem;
+ var ticksCoords = radiusAxis.getTicksCoords();
+ var axisAngle = angleAxis.getExtent()[0];
+ var radiusExtent = radiusAxis.getExtent();
+
+ var layout = layoutAxis(polar, radiusAxisModel, axisAngle);
+ var axisBuilder = new AxisBuilder(radiusAxisModel, layout);
+ zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);
+ this.group.add(axisBuilder.getGroup());
+
+ zrUtil.each(selfBuilderAttrs, function (name) {
+ if (radiusAxisModel.get(name +'.show')) {
+ this['_' + name](radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords);
+ }
+ }, this);
+ },
+
+ /**
+ * @private
+ */
+ _splitLine: function (radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords) {
+ var splitLineModel = radiusAxisModel.getModel('splitLine');
+ var lineStyleModel = splitLineModel.getModel('lineStyle');
+ var lineColors = lineStyleModel.get('color');
+ var lineCount = 0;
+
+ lineColors = lineColors instanceof Array ? lineColors : [lineColors];
+
+ var splitLines = [];
+
+ for (var i = 0; i < ticksCoords.length; i++) {
+ var colorIndex = (lineCount++) % lineColors.length;
+ splitLines[colorIndex] = splitLines[colorIndex] || [];
+ splitLines[colorIndex].push(new graphic.Circle({
+ shape: {
+ cx: polar.cx,
+ cy: polar.cy,
+ r: ticksCoords[i]
+ },
+ silent: true
+ }));
+ }
+
+ // Simple optimization
+ // Batching the lines if color are the same
+ for (var i = 0; i < splitLines.length; i++) {
+ this.group.add(graphic.mergePath(splitLines[i], {
+ style: zrUtil.defaults({
+ stroke: lineColors[i % lineColors.length],
+ fill: null
+ }, lineStyleModel.getLineStyle()),
+ silent: true
+ }));
+ }
+ },
+
+ /**
+ * @private
+ */
+ _splitArea: function (radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords) {
+
+ var splitAreaModel = radiusAxisModel.getModel('splitArea');
+ var areaStyleModel = splitAreaModel.getModel('areaStyle');
+ var areaColors = areaStyleModel.get('color');
+ var lineCount = 0;
+
+ areaColors = areaColors instanceof Array ? areaColors : [areaColors];
+
+ var splitAreas = [];
+
+ var prevRadius = ticksCoords[0];
+ for (var i = 1; i < ticksCoords.length; i++) {
+ var colorIndex = (lineCount++) % areaColors.length;
+ splitAreas[colorIndex] = splitAreas[colorIndex] || [];
+ splitAreas[colorIndex].push(new graphic.Sector({
+ shape: {
+ cx: polar.cx,
+ cy: polar.cy,
+ r0: prevRadius,
+ r: ticksCoords[i],
+ startAngle: 0,
+ endAngle: Math.PI * 2
+ },
+ silent: true
+ }));
+ prevRadius = ticksCoords[i];
+ }
+
+ // Simple optimization
+ // Batching the lines if color are the same
+ for (var i = 0; i < splitAreas.length; i++) {
+ this.group.add(graphic.mergePath(splitAreas[i], {
+ style: zrUtil.defaults({
+ fill: areaColors[i % areaColors.length]
+ }, areaStyleModel.getAreaStyle()),
+ silent: true
+ }));
+ }
+ }
+ });
+
+ /**
+ * @inner
+ */
+ function layoutAxis(polar, radiusAxisModel, axisAngle) {
+ return {
+ position: [polar.cx, polar.cy],
+ rotation: axisAngle / 180 * Math.PI,
+ labelDirection: -1,
+ tickDirection: -1,
+ nameDirection: 1,
+ labelRotation: radiusAxisModel.getModel('axisLabel').get('rotate'),
+ // Over splitLine and splitArea
+ z2: 1
+ };
+ }
+
+
+/***/ },
+/* 283 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ __webpack_require__(163);
+
+ __webpack_require__(284);
+
+ __webpack_require__(161);
+
+
+/***/ },
+/* 284 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var MapDraw = __webpack_require__(158);
+
+ module.exports = __webpack_require__(1).extendComponentView({
+
+ type: 'geo',
+
+ init: function (ecModel, api) {
+ var mapDraw = new MapDraw(api, true);
+ this._mapDraw = mapDraw;
+
+ this.group.add(mapDraw.group);
+ },
+
+ render: function (geoModel, ecModel, api) {
+ geoModel.get('show') &&
+ this._mapDraw.draw(geoModel, ecModel, api);
+ }
+ });
+
+
+/***/ },
+/* 285 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var echarts = __webpack_require__(1);
+ var graphic = __webpack_require__(42);
+ var layout = __webpack_require__(21);
+
+ // Model
+ echarts.extendComponentModel({
+
+ type: 'title',
+
+ layoutMode: {type: 'box', ignoreSize: true},
+
+ defaultOption: {
+ // 一级层å 
+ zlevel: 0,
+ // 二级层å 
+ z: 6,
+ show: true,
+
+ text: '',
+ // 超链接跳转
+ // link: null,
+ // 仅支æŒself | blank
+ target: 'blank',
+ subtext: '',
+
+ // 超链接跳转
+ // sublink: null,
+ // 仅支æŒself | blank
+ subtarget: 'blank',
+
+ // 'center' ¦ 'left' ¦ 'right'
+ // ¦ {number}(xå标,å•ä½px)
+ left: 0,
+ // 'top' ¦ 'bottom' ¦ 'center'
+ // ¦ {number}(yå标,å•ä½px)
+ top: 0,
+
+ // 水平对é½
+ // 'auto' | 'left' | 'right'
+ // é»˜è®¤æ ¹æ® x çš„ä½ç½®åˆ¤æ–­æ˜¯å·¦å¯¹é½è¿˜æ˜¯å³å¯¹é½
+ //textAlign: null
+
+ backgroundColor: 'rgba(0,0,0,0)',
+
+ // 标题边框颜色
+ borderColor: '#ccc',
+
+ // 标题边框线宽,å•ä½px,默认为0(无边框)
+ borderWidth: 0,
+
+ // 标题内边è·ï¼Œå•ä½px,默认å„æ–¹å‘内边è·ä¸º5,
+ // 接å—数组分别设定上å³ä¸‹å·¦è¾¹è·ï¼ŒåŒcss
+ padding: 5,
+
+ // 主副标题纵å‘间隔,å•ä½px,默认为10,
+ itemGap: 10,
+ textStyle: {
+ fontSize: 18,
+ fontWeight: 'bolder',
+ // 主标题文字颜色
+ color: '#333'
+ },
+ subtextStyle: {
+ // 副标题文字颜色
+ color: '#aaa'
+ }
+ }
+ });
+
+ // View
+ echarts.extendComponentView({
+
+ type: 'title',
+
+ render: function (titleModel, ecModel, api) {
+ this.group.removeAll();
+
+ if (!titleModel.get('show')) {
+ return;
+ }
+
+ var group = this.group;
+
+ var textStyleModel = titleModel.getModel('textStyle');
+ var subtextStyleModel = titleModel.getModel('subtextStyle');
+
+ var textAlign = titleModel.get('textAlign');
+
+ var textEl = new graphic.Text({
+ style: {
+ text: titleModel.get('text'),
+ textFont: textStyleModel.getFont(),
+ fill: textStyleModel.getTextColor(),
+ textBaseline: 'top'
+ },
+ z2: 10
+ });
+
+ var textRect = textEl.getBoundingRect();
+
+ var subText = titleModel.get('subtext');
+ var subTextEl = new graphic.Text({
+ style: {
+ text: subText,
+ textFont: subtextStyleModel.getFont(),
+ fill: subtextStyleModel.getTextColor(),
+ y: textRect.height + titleModel.get('itemGap'),
+ textBaseline: 'top'
+ },
+ z2: 10
+ });
+
+ var link = titleModel.get('link');
+ var sublink = titleModel.get('sublink');
+
+ textEl.silent = !link;
+ subTextEl.silent = !sublink;
+
+ if (link) {
+ textEl.on('click', function () {
+ window.open(link, titleModel.get('target'));
+ });
+ }
+ if (sublink) {
+ subTextEl.on('click', function () {
+ window.open(sublink, titleModel.get('subtarget'));
+ });
+ }
+
+ group.add(textEl);
+ subText && group.add(subTextEl);
+ // If no subText, but add subTextEl, there will be an empty line.
+
+ var groupRect = group.getBoundingRect();
+ var layoutOption = titleModel.getBoxLayoutParams();
+ layoutOption.width = groupRect.width;
+ layoutOption.height = groupRect.height;
+ var layoutRect = layout.getLayoutRect(
+ layoutOption, {
+ width: api.getWidth(),
+ height: api.getHeight()
+ }, titleModel.get('padding')
+ );
+ // Adjust text align based on position
+ if (!textAlign) {
+ // Align left if title is on the left. center and right is same
+ textAlign = titleModel.get('left') || titleModel.get('right');
+ if (textAlign === 'middle') {
+ textAlign = 'center';
+ }
+ // Adjust layout by text align
+ if (textAlign === 'right') {
+ layoutRect.x += layoutRect.width;
+ }
+ else if (textAlign === 'center') {
+ layoutRect.x += layoutRect.width / 2;
+ }
+ }
+ group.position = [layoutRect.x, layoutRect.y];
+ textEl.setStyle('textAlign', textAlign);
+ subTextEl.setStyle('textAlign', textAlign);
+
+ // Render background
+ // Get groupRect again because textAlign has been changed
+ groupRect = group.getBoundingRect();
+ var padding = layoutRect.margin;
+ var style = titleModel.getItemStyle(['color', 'opacity']);
+ style.fill = titleModel.get('backgroundColor');
+ var rect = new graphic.Rect({
+ shape: {
+ x: groupRect.x - padding[3],
+ y: groupRect.y - padding[0],
+ width: groupRect.width + padding[1] + padding[3],
+ height: groupRect.height + padding[0] + padding[2]
+ },
+ style: style,
+ silent: true
+ });
+ graphic.subPixelOptimizeRect(rect);
+
+ group.add(rect);
+ }
+ });
+
+
+/***/ },
+/* 286 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * DataZoom component entry
+ */
+
+
+ __webpack_require__(287);
+
+ __webpack_require__(288);
+ __webpack_require__(290);
+
+ __webpack_require__(291);
+ __webpack_require__(292);
+
+ __webpack_require__(295);
+ __webpack_require__(296);
+
+ __webpack_require__(298);
+ __webpack_require__(299);
+
+
+
+/***/ },
+/* 287 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ __webpack_require__(19).registerSubTypeDefaulter('dataZoom', function (option) {
+ // Default 'slider' when no type specified.
+ return 'slider';
+ });
+
+
+
+/***/ },
+/* 288 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file Data zoom model
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+ var env = __webpack_require__(78);
+ var echarts = __webpack_require__(1);
+ var modelUtil = __webpack_require__(5);
+ var AxisProxy = __webpack_require__(289);
+ var each = zrUtil.each;
+ var eachAxisDim = modelUtil.eachAxisDim;
+
+ var DataZoomModel = echarts.extendComponentModel({
+
+ type: 'dataZoom',
+
+ dependencies: [
+ 'xAxis', 'yAxis', 'zAxis', 'radiusAxis', 'angleAxis', 'series'
+ ],
+
+ /**
+ * @protected
+ */
+ defaultOption: {
+ zlevel: 0,
+ z: 4, // Higher than normal component (z: 2).
+ orient: null, // Default auto by axisIndex. Possible value: 'horizontal', 'vertical'.
+ xAxisIndex: null, // Default all horizontal category axis.
+ yAxisIndex: null, // Default all vertical category axis.
+ angleAxisIndex: null,
+ radiusAxisIndex: null,
+ filterMode: 'filter', // Possible values: 'filter' or 'empty'.
+ // 'filter': data items which are out of window will be removed.
+ // This option is applicable when filtering outliers.
+ // 'empty': data items which are out of window will be set to empty.
+ // This option is applicable when user should not neglect
+ // that there are some data items out of window.
+ // Taking line chart as an example, line will be broken in
+ // the filtered points when filterModel is set to 'empty', but
+ // be connected when set to 'filter'.
+
+ throttle: 100, // Dispatch action by the fixed rate, avoid frequency.
+ // default 100. Do not throttle when use null/undefined.
+ start: 0, // Start percent. 0 ~ 100
+ end: 100, // End percent. 0 ~ 100
+ startValue: null, // Start value. If startValue specified, start is ignored.
+ endValue: null // End value. If endValue specified, end is ignored.
+ },
+
+ /**
+ * @override
+ */
+ init: function (option, parentModel, ecModel) {
+
+ /**
+ * key like x_0, y_1
+ * @private
+ * @type {Object}
+ */
+ this._dataIntervalByAxis = {};
+
+ /**
+ * @private
+ */
+ this._dataInfo = {};
+
+ /**
+ * key like x_0, y_1
+ * @private
+ */
+ this._axisProxies = {};
+
+ /**
+ * @readOnly
+ */
+ this.textStyleModel;
+
+ var rawOption = retrieveRaw(option);
+
+ this.mergeDefaultAndTheme(option, ecModel);
+
+ this.doInit(rawOption);
+ },
+
+ /**
+ * @override
+ */
+ mergeOption: function (newOption) {
+ var rawOption = retrieveRaw(newOption);
+
+ //FIX #2591
+ zrUtil.merge(this.option, newOption, true);
+
+ this.doInit(rawOption);
+ },
+
+ /**
+ * @protected
+ */
+ doInit: function (rawOption) {
+ var thisOption = this.option;
+
+ // Disable realtime view update if canvas is not supported.
+ if (!env.canvasSupported) {
+ thisOption.realtime = false;
+ }
+
+ processRangeProp('start', 'startValue', rawOption, thisOption);
+ processRangeProp('end', 'endValue', rawOption, thisOption);
+
+ this.textStyleModel = this.getModel('textStyle');
+
+ this._resetTarget();
+
+ this._giveAxisProxies();
+ },
+
+ /**
+ * @private
+ */
+ _giveAxisProxies: function () {
+ var axisProxies = this._axisProxies;
+
+ this.eachTargetAxis(function (dimNames, axisIndex, dataZoomModel, ecModel) {
+ var axisModel = this.dependentModels[dimNames.axis][axisIndex];
+
+ // If exists, share axisProxy with other dataZoomModels.
+ var axisProxy = axisModel.__dzAxisProxy || (
+ // Use the first dataZoomModel as the main model of axisProxy.
+ axisModel.__dzAxisProxy = new AxisProxy(
+ dimNames.name, axisIndex, this, ecModel
+ )
+ );
+ // FIXME
+ // dispose __dzAxisProxy
+
+ axisProxies[dimNames.name + '_' + axisIndex] = axisProxy;
+ }, this);
+ },
+
+ /**
+ * @private
+ */
+ _resetTarget: function () {
+ var thisOption = this.option;
+
+ var autoMode = this._judgeAutoMode();
+
+ eachAxisDim(function (dimNames) {
+ var axisIndexName = dimNames.axisIndex;
+ thisOption[axisIndexName] = modelUtil.normalizeToArray(
+ thisOption[axisIndexName]
+ );
+ }, this);
+
+ if (autoMode === 'axisIndex') {
+ this._autoSetAxisIndex();
+ }
+ else if (autoMode === 'orient') {
+ this._autoSetOrient();
+ }
+ },
+
+ /**
+ * @private
+ */
+ _judgeAutoMode: function () {
+ // Auto set only works for setOption at the first time.
+ // The following is user's reponsibility. So using merged
+ // option is OK.
+ var thisOption = this.option;
+
+ var hasIndexSpecified = false;
+ eachAxisDim(function (dimNames) {
+ // When user set axisIndex as a empty array, we think that user specify axisIndex
+ // but do not want use auto mode. Because empty array may be encountered when
+ // some error occured.
+ if (thisOption[dimNames.axisIndex] != null) {
+ hasIndexSpecified = true;
+ }
+ }, this);
+
+ var orient = thisOption.orient;
+
+ if (orient == null && hasIndexSpecified) {
+ return 'orient';
+ }
+ else if (!hasIndexSpecified) {
+ if (orient == null) {
+ thisOption.orient = 'horizontal';
+ }
+ return 'axisIndex';
+ }
+ },
+
+ /**
+ * @private
+ */
+ _autoSetAxisIndex: function () {
+ var autoAxisIndex = true;
+ var orient = this.get('orient', true);
+ var thisOption = this.option;
+
+ if (autoAxisIndex) {
+ // Find axis that parallel to dataZoom as default.
+ var dimNames = orient === 'vertical'
+ ? {dim: 'y', axisIndex: 'yAxisIndex', axis: 'yAxis'}
+ : {dim: 'x', axisIndex: 'xAxisIndex', axis: 'xAxis'};
+
+ if (this.dependentModels[dimNames.axis].length) {
+ thisOption[dimNames.axisIndex] = [0];
+ autoAxisIndex = false;
+ }
+ }
+
+ if (autoAxisIndex) {
+ // Find the first category axis as default. (consider polar)
+ eachAxisDim(function (dimNames) {
+ if (!autoAxisIndex) {
+ return;
+ }
+ var axisIndices = [];
+ var axisModels = this.dependentModels[dimNames.axis];
+ if (axisModels.length && !axisIndices.length) {
+ for (var i = 0, len = axisModels.length; i < len; i++) {
+ if (axisModels[i].get('type') === 'category') {
+ axisIndices.push(i);
+ }
+ }
+ }
+ thisOption[dimNames.axisIndex] = axisIndices;
+ if (axisIndices.length) {
+ autoAxisIndex = false;
+ }
+ }, this);
+ }
+
+ if (autoAxisIndex) {
+ // FIXME
+ // 这里是兼容ec2的写法(没指定xAxisIndexå’ŒyAxisIndex时把scatterå’ŒåŒæ•°å€¼è½´æŠ˜æŸ±çº³å…¥dataZoom控制),
+ // 但是实际是å¦éœ€è¦Grid.js#getScaleByOptionæ¥åˆ¤æ–­ï¼ˆè€ƒè™‘time,logç­‰axis type)?
+
+ // If both dataZoom.xAxisIndex and dataZoom.yAxisIndex is not specified,
+ // dataZoom component auto adopts series that reference to
+ // both xAxis and yAxis which type is 'value'.
+ this.ecModel.eachSeries(function (seriesModel) {
+ if (this._isSeriesHasAllAxesTypeOf(seriesModel, 'value')) {
+ eachAxisDim(function (dimNames) {
+ var axisIndices = thisOption[dimNames.axisIndex];
+ var axisIndex = seriesModel.get(dimNames.axisIndex);
+ if (zrUtil.indexOf(axisIndices, axisIndex) < 0) {
+ axisIndices.push(axisIndex);
+ }
+ });
+ }
+ }, this);
+ }
+ },
+
+ /**
+ * @private
+ */
+ _autoSetOrient: function () {
+ var dim;
+
+ // Find the first axis
+ this.eachTargetAxis(function (dimNames) {
+ !dim && (dim = dimNames.name);
+ }, this);
+
+ this.option.orient = dim === 'y' ? 'vertical' : 'horizontal';
+ },
+
+ /**
+ * @private
+ */
+ _isSeriesHasAllAxesTypeOf: function (seriesModel, axisType) {
+ // FIXME
+ // 需è¦seriesçš„xAxisIndexå’ŒyAxisIndex都首先自动设置上。
+ // 例如series.type === scatter时。
+
+ var is = true;
+ eachAxisDim(function (dimNames) {
+ var seriesAxisIndex = seriesModel.get(dimNames.axisIndex);
+ var axisModel = this.dependentModels[dimNames.axis][seriesAxisIndex];
+
+ if (!axisModel || axisModel.get('type') !== axisType) {
+ is = false;
+ }
+ }, this);
+ return is;
+ },
+
+ /**
+ * @public
+ */
+ getFirstTargetAxisModel: function () {
+ var firstAxisModel;
+ eachAxisDim(function (dimNames) {
+ if (firstAxisModel == null) {
+ var indices = this.get(dimNames.axisIndex);
+ if (indices.length) {
+ firstAxisModel = this.dependentModels[dimNames.axis][indices[0]];
+ }
+ }
+ }, this);
+
+ return firstAxisModel;
+ },
+
+ /**
+ * @public
+ * @param {Function} callback param: axisModel, dimNames, axisIndex, dataZoomModel, ecModel
+ */
+ eachTargetAxis: function (callback, context) {
+ var ecModel = this.ecModel;
+ eachAxisDim(function (dimNames) {
+ each(
+ this.get(dimNames.axisIndex),
+ function (axisIndex) {
+ callback.call(context, dimNames, axisIndex, this, ecModel);
+ },
+ this
+ );
+ }, this);
+ },
+
+ getAxisProxy: function (dimName, axisIndex) {
+ return this._axisProxies[dimName + '_' + axisIndex];
+ },
+
+ /**
+ * If not specified, set to undefined.
+ *
+ * @public
+ * @param {Object} opt
+ * @param {number} [opt.start]
+ * @param {number} [opt.end]
+ * @param {number} [opt.startValue]
+ * @param {number} [opt.endValue]
+ */
+ setRawRange: function (opt) {
+ each(['start', 'end', 'startValue', 'endValue'], function (name) {
+ // If any of those prop is null/undefined, we should alos set
+ // them, because only one pair between start/end and
+ // startValue/endValue can work.
+ this.option[name] = opt[name];
+ }, this);
+ },
+
+ /**
+ * @public
+ * @return {Array.<number>} [startPercent, endPercent]
+ */
+ getPercentRange: function () {
+ var axisProxy = this.findRepresentativeAxisProxy();
+ if (axisProxy) {
+ return axisProxy.getDataPercentWindow();
+ }
+ },
+
+ /**
+ * @public
+ * For example, chart.getModel().getComponent('dataZoom').getValueRange('y', 0);
+ *
+ * @param {string} [axisDimName]
+ * @param {number} [axisIndex]
+ * @return {Array.<number>} [startValue, endValue]
+ */
+ getValueRange: function (axisDimName, axisIndex) {
+ if (axisDimName == null && axisIndex == null) {
+ var axisProxy = this.findRepresentativeAxisProxy();
+ if (axisProxy) {
+ return axisProxy.getDataValueWindow();
+ }
+ }
+ else {
+ return this.getAxisProxy(axisDimName, axisIndex).getDataValueWindow();
+ }
+ },
+
+ /**
+ * @public
+ * @return {module:echarts/component/dataZoom/AxisProxy}
+ */
+ findRepresentativeAxisProxy: function () {
+ // Find the first hosted axisProxy
+ var axisProxies = this._axisProxies;
+ for (var key in axisProxies) {
+ if (axisProxies.hasOwnProperty(key) && axisProxies[key].hostedBy(this)) {
+ return axisProxies[key];
+ }
+ }
+
+ // If no hosted axis find not hosted axisProxy.
+ // Consider this case: dataZoomModel1 and dataZoomModel2 control the same axis,
+ // and the option.start or option.end settings are different. The percentRange
+ // should follow axisProxy.
+ // (We encounter this problem in toolbox data zoom.)
+ for (var key in axisProxies) {
+ if (axisProxies.hasOwnProperty(key) && !axisProxies[key].hostedBy(this)) {
+ return axisProxies[key];
+ }
+ }
+ }
+
+ });
+
+ function retrieveRaw(option) {
+ var ret = {};
+ each(
+ ['start', 'end', 'startValue', 'endValue'],
+ function (name) {
+ ret[name] = option[name];
+ }
+ );
+ return ret;
+ }
+
+ function processRangeProp(percentProp, valueProp, rawOption, thisOption) {
+ // start/end has higher priority over startValue/endValue,
+ // but we should make chart.setOption({endValue: 1000}) effective,
+ // rather than chart.setOption({endValue: 1000, end: null}).
+ if (rawOption[valueProp] != null && rawOption[percentProp] == null) {
+ thisOption[percentProp] = null;
+ }
+ // Otherwise do nothing and use the merge result.
+ }
+
+ module.exports = DataZoomModel;
+
+
+
+/***/ },
+/* 289 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file Axis operator
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+ var numberUtil = __webpack_require__(7);
+ var each = zrUtil.each;
+ var asc = numberUtil.asc;
+
+ /**
+ * Operate single axis.
+ * One axis can only operated by one axis operator.
+ * Different dataZoomModels may be defined to operate the same axis.
+ * (i.e. 'inside' data zoom and 'slider' data zoom components)
+ * So dataZoomModels share one axisProxy in that case.
+ *
+ * @class
+ */
+ var AxisProxy = function (dimName, axisIndex, dataZoomModel, ecModel) {
+
+ /**
+ * @private
+ * @type {string}
+ */
+ this._dimName = dimName;
+
+ /**
+ * @private
+ */
+ this._axisIndex = axisIndex;
+
+ /**
+ * @private
+ * @type {Array.<number>}
+ */
+ this._valueWindow;
+
+ /**
+ * @private
+ * @type {Array.<number>}
+ */
+ this._percentWindow;
+
+ /**
+ * @private
+ * @type {Array.<number>}
+ */
+ this._dataExtent;
+
+ /**
+ * @readOnly
+ * @type {module: echarts/model/Global}
+ */
+ this.ecModel = ecModel;
+
+ /**
+ * @private
+ * @type {module: echarts/component/dataZoom/DataZoomModel}
+ */
+ this._dataZoomModel = dataZoomModel;
+ };
+
+ AxisProxy.prototype = {
+
+ constructor: AxisProxy,
+
+ /**
+ * Whether the axisProxy is hosted by dataZoomModel.
+ *
+ * @public
+ * @param {module: echarts/component/dataZoom/DataZoomModel} dataZoomModel
+ * @return {boolean}
+ */
+ hostedBy: function (dataZoomModel) {
+ return this._dataZoomModel === dataZoomModel;
+ },
+
+ /**
+ * @return {Array.<number>}
+ */
+ getDataExtent: function () {
+ return this._dataExtent.slice();
+ },
+
+ /**
+ * @return {Array.<number>}
+ */
+ getDataValueWindow: function () {
+ return this._valueWindow.slice();
+ },
+
+ /**
+ * @return {Array.<number>}
+ */
+ getDataPercentWindow: function () {
+ return this._percentWindow.slice();
+ },
+
+ /**
+ * @public
+ * @param {number} axisIndex
+ * @return {Array} seriesModels
+ */
+ getTargetSeriesModels: function () {
+ var seriesModels = [];
+
+ this.ecModel.eachSeries(function (seriesModel) {
+ if (this._axisIndex === seriesModel.get(this._dimName + 'AxisIndex')) {
+ seriesModels.push(seriesModel);
+ }
+ }, this);
+
+ return seriesModels;
+ },
+
+ getAxisModel: function () {
+ return this.ecModel.getComponent(this._dimName + 'Axis', this._axisIndex);
+ },
+
+ getOtherAxisModel: function () {
+ var axisDim = this._dimName;
+ var ecModel = this.ecModel;
+ var axisModel = this.getAxisModel();
+ var isCartesian = axisDim === 'x' || axisDim === 'y';
+ var otherAxisDim;
+ var coordSysIndexName;
+ if (isCartesian) {
+ coordSysIndexName = 'gridIndex';
+ otherAxisDim = axisDim === 'x' ? 'y' : 'x';
+ }
+ else {
+ coordSysIndexName = 'polarIndex';
+ otherAxisDim = axisDim === 'angle' ? 'radius' : 'angle';
+ }
+ var foundOtherAxisModel;
+ ecModel.eachComponent(otherAxisDim + 'Axis', function (otherAxisModel) {
+ if ((otherAxisModel.get(coordSysIndexName) || 0)
+ === (axisModel.get(coordSysIndexName) || 0)) {
+ foundOtherAxisModel = otherAxisModel;
+ }
+ });
+ return foundOtherAxisModel;
+ },
+
+ /**
+ * Notice: reset should not be called before series.restoreData() called,
+ * so it is recommanded to be called in "process stage" but not "model init
+ * stage".
+ *
+ * @param {module: echarts/component/dataZoom/DataZoomModel} dataZoomModel
+ */
+ reset: function (dataZoomModel) {
+ if (dataZoomModel !== this._dataZoomModel) {
+ return;
+ }
+
+ // Culculate data window and data extent, and record them.
+ var dataExtent = this._dataExtent = calculateDataExtent(
+ this._dimName, this.getTargetSeriesModels()
+ );
+ var dataWindow = calculateDataWindow(
+ dataZoomModel.option, dataExtent, this
+ );
+ this._valueWindow = dataWindow.valueWindow;
+ this._percentWindow = dataWindow.percentWindow;
+
+ // Update axis setting then.
+ setAxisModel(this);
+ },
+
+ /**
+ * @param {module: echarts/component/dataZoom/DataZoomModel} dataZoomModel
+ */
+ restore: function (dataZoomModel) {
+ if (dataZoomModel !== this._dataZoomModel) {
+ return;
+ }
+
+ this._valueWindow = this._percentWindow = null;
+ setAxisModel(this, true);
+ },
+
+ /**
+ * @param {module: echarts/component/dataZoom/DataZoomModel} dataZoomModel
+ */
+ filterData: function (dataZoomModel) {
+ if (dataZoomModel !== this._dataZoomModel) {
+ return;
+ }
+
+ var axisDim = this._dimName;
+ var seriesModels = this.getTargetSeriesModels();
+ var filterMode = dataZoomModel.get('filterMode');
+ var valueWindow = this._valueWindow;
+
+ // FIXME
+ // Toolbox may has dataZoom injected. And if there are stacked bar chart
+ // with NaN data. NaN will be filtered and stack will be wrong.
+ // So we need to force the mode to be set empty
+ var otherAxisModel = this.getOtherAxisModel();
+ if (dataZoomModel.get('$fromToolbox')
+ && otherAxisModel && otherAxisModel.get('type') === 'category') {
+ filterMode = 'empty';
+ }
+ // Process series data
+ each(seriesModels, function (seriesModel) {
+ var seriesData = seriesModel.getData();
+ if (!seriesData) {
+ return;
+ }
+
+ each(seriesModel.coordDimToDataDim(axisDim), function (dim) {
+ if (filterMode === 'empty') {
+ seriesModel.setData(
+ seriesData.map(dim, function (value) {
+ return !isInWindow(value) ? NaN : value;
+ })
+ );
+ }
+ else {
+ seriesData.filterSelf(dim, isInWindow);
+ }
+ });
+ });
+
+ function isInWindow(value) {
+ return value >= valueWindow[0] && value <= valueWindow[1];
+ }
+ }
+ };
+
+ function calculateDataExtent(axisDim, seriesModels) {
+ var dataExtent = [Infinity, -Infinity];
+
+ each(seriesModels, function (seriesModel) {
+ var seriesData = seriesModel.getData();
+ if (seriesData) {
+ each(seriesModel.coordDimToDataDim(axisDim), function (dim) {
+ var seriesExtent = seriesData.getDataExtent(dim);
+ seriesExtent[0] < dataExtent[0] && (dataExtent[0] = seriesExtent[0]);
+ seriesExtent[1] > dataExtent[1] && (dataExtent[1] = seriesExtent[1]);
+ });
+ }
+ }, this);
+
+ return dataExtent;
+ }
+
+ function calculateDataWindow(opt, dataExtent, axisProxy) {
+ var axisModel = axisProxy.getAxisModel();
+ var scale = axisModel.axis.scale;
+ var percentExtent = [0, 100];
+ var percentWindow = [
+ opt.start,
+ opt.end
+ ];
+ var valueWindow = [];
+
+ // In percent range is used and axis min/max/scale is set,
+ // window should be based on min/max/0, but should not be
+ // based on the extent of filtered data.
+ dataExtent = dataExtent.slice();
+ fixExtendByAxis(dataExtent, axisModel, scale);
+
+ each(['startValue', 'endValue'], function (prop) {
+ valueWindow.push(
+ opt[prop] != null
+ ? scale.parse(opt[prop])
+ : null
+ );
+ });
+
+ // Normalize bound.
+ each([0, 1], function (idx) {
+ var boundValue = valueWindow[idx];
+ var boundPercent = percentWindow[idx];
+
+ // start/end has higher priority over startValue/endValue,
+ // because start/end can be consistent among different type
+ // of axis but startValue/endValue not.
+
+ if (boundPercent != null || boundValue == null) {
+ if (boundPercent == null) {
+ boundPercent = percentExtent[idx];
+ }
+ // Use scale.parse to math round for category or time axis.
+ boundValue = scale.parse(numberUtil.linearMap(
+ boundPercent, percentExtent, dataExtent, true
+ ));
+ }
+ else { // boundPercent == null && boundValue != null
+ boundPercent = numberUtil.linearMap(
+ boundValue, dataExtent, percentExtent, true
+ );
+ }
+ // Avoid rounding error
+ valueWindow[idx] = numberUtil.round(boundValue);
+ percentWindow[idx] = numberUtil.round(boundPercent);
+ });
+
+ return {
+ valueWindow: asc(valueWindow),
+ percentWindow: asc(percentWindow)
+ };
+ }
+
+ function fixExtendByAxis(dataExtent, axisModel, scale) {
+ each(['min', 'max'], function (minMax, index) {
+ var axisMax = axisModel.get(minMax, true);
+ // Consider 'dataMin', 'dataMax'
+ if (axisMax != null && (axisMax + '').toLowerCase() !== 'data' + minMax) {
+ dataExtent[index] = scale.parse(axisMax);
+ }
+ });
+
+ if (!axisModel.get('scale', true)) {
+ dataExtent[0] > 0 && (dataExtent[0] = 0);
+ dataExtent[1] < 0 && (dataExtent[1] = 0);
+ }
+
+ return dataExtent;
+ }
+
+ function setAxisModel(axisProxy, isRestore) {
+ var axisModel = axisProxy.getAxisModel();
+
+ var percentWindow = axisProxy._percentWindow;
+ var valueWindow = axisProxy._valueWindow;
+
+ if (!percentWindow) {
+ return;
+ }
+
+ var isFull = isRestore || (percentWindow[0] === 0 && percentWindow[1] === 100);
+ // [0, 500]: arbitrary value, guess axis extent.
+ var precision = !isRestore && numberUtil.getPixelPrecision(valueWindow, [0, 500]);
+ // toFixed() digits argument must be between 0 and 20
+ var invalidPrecision = !isRestore && !(precision < 20 && precision >= 0);
+
+ var useOrigin = isRestore || isFull || invalidPrecision;
+
+ axisModel.setRange && axisModel.setRange(
+ useOrigin ? null : +valueWindow[0].toFixed(precision),
+ useOrigin ? null : +valueWindow[1].toFixed(precision)
+ );
+ }
+
+ module.exports = AxisProxy;
+
+
+
+/***/ },
+/* 290 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var ComponentView = __webpack_require__(28);
+
+ module.exports = ComponentView.extend({
+
+ type: 'dataZoom',
+
+ render: function (dataZoomModel, ecModel, api, payload) {
+ this.dataZoomModel = dataZoomModel;
+ this.ecModel = ecModel;
+ this.api = api;
+ },
+
+ /**
+ * Find the first target coordinate system.
+ *
+ * @protected
+ * @return {Object} {
+ * cartesians: [
+ * {model: coord0, axisModels: [axis1, axis3], coordIndex: 1},
+ * {model: coord1, axisModels: [axis0, axis2], coordIndex: 0},
+ * ...
+ * ], // cartesians must not be null/undefined.
+ * polars: [
+ * {model: coord0, axisModels: [axis4], coordIndex: 0},
+ * ...
+ * ], // polars must not be null/undefined.
+ * axisModels: [axis0, axis1, axis2, axis3, axis4]
+ * // axisModels must not be null/undefined.
+ * }
+ */
+ getTargetInfo: function () {
+ var dataZoomModel = this.dataZoomModel;
+ var ecModel = this.ecModel;
+ var cartesians = [];
+ var polars = [];
+ var axisModels = [];
+
+ dataZoomModel.eachTargetAxis(function (dimNames, axisIndex) {
+ var axisModel = ecModel.getComponent(dimNames.axis, axisIndex);
+ if (axisModel) {
+ axisModels.push(axisModel);
+
+ var gridIndex = axisModel.get('gridIndex');
+ var polarIndex = axisModel.get('polarIndex');
+
+ if (gridIndex != null) {
+ var coordModel = ecModel.getComponent('grid', gridIndex);
+ save(coordModel, axisModel, cartesians, gridIndex);
+ }
+ else if (polarIndex != null) {
+ var coordModel = ecModel.getComponent('polar', polarIndex);
+ save(coordModel, axisModel, polars, polarIndex);
+ }
+ }
+ }, this);
+
+ function save(coordModel, axisModel, store, coordIndex) {
+ var item;
+ for (var i = 0; i < store.length; i++) {
+ if (store[i].model === coordModel) {
+ item = store[i];
+ break;
+ }
+ }
+ if (!item) {
+ store.push(item = {
+ model: coordModel, axisModels: [], coordIndex: coordIndex
+ });
+ }
+ item.axisModels.push(axisModel);
+ }
+
+ return {
+ cartesians: cartesians,
+ polars: polars,
+ axisModels: axisModels
+ };
+ }
+
+ });
+
+
+
+/***/ },
+/* 291 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file Data zoom model
+ */
+
+
+ var DataZoomModel = __webpack_require__(288);
+ var layout = __webpack_require__(21);
+ var zrUtil = __webpack_require__(3);
+
+ var SliderZoomModel = DataZoomModel.extend({
+
+ type: 'dataZoom.slider',
+
+ layoutMode: 'box',
+
+ /**
+ * @protected
+ */
+ defaultOption: {
+ show: true,
+
+ // ph => placeholder. Using placehoder here because
+ // deault value can only be drived in view stage.
+ right: 'ph', // Default align to grid rect.
+ top: 'ph', // Default align to grid rect.
+ width: 'ph', // Default align to grid rect.
+ height: 'ph', // Default align to grid rect.
+ left: null, // Default align to grid rect.
+ bottom: null, // Default align to grid rect.
+
+ backgroundColor: 'rgba(47,69,84,0)', // Background of slider zoom component.
+ dataBackgroundColor: '#ddd', // Background of data shadow.
+ fillerColor: 'rgba(47,69,84,0.15)', // Color of selected area.
+ handleColor: 'rgba(148,164,165,0.95)', // Color of handle.
+ handleSize: 10,
+
+ labelPrecision: null,
+ labelFormatter: null,
+ showDetail: true,
+ showDataShadow: 'auto', // Default auto decision.
+ realtime: true,
+ zoomLock: false, // Whether disable zoom.
+ textStyle: {
+ color: '#333'
+ }
+ },
+
+ /**
+ * @override
+ */
+ mergeOption: function (option) {
+ SliderZoomModel.superApply(this, 'mergeOption', arguments);
+ }
+
+ });
+
+ module.exports = SliderZoomModel;
+
+
+
+/***/ },
+/* 292 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var graphic = __webpack_require__(42);
+ var throttle = __webpack_require__(293);
+ var DataZoomView = __webpack_require__(290);
+ var Rect = graphic.Rect;
+ var numberUtil = __webpack_require__(7);
+ var linearMap = numberUtil.linearMap;
+ var layout = __webpack_require__(21);
+ var sliderMove = __webpack_require__(294);
+ var asc = numberUtil.asc;
+ var bind = zrUtil.bind;
+ var mathRound = Math.round;
+ var mathMax = Math.max;
+ var each = zrUtil.each;
+
+ // Constants
+ var DEFAULT_LOCATION_EDGE_GAP = 7;
+ var DEFAULT_FRAME_BORDER_WIDTH = 1;
+ var DEFAULT_FILLER_SIZE = 30;
+ var HORIZONTAL = 'horizontal';
+ var VERTICAL = 'vertical';
+ var LABEL_GAP = 5;
+ var SHOW_DATA_SHADOW_SERIES_TYPE = ['line', 'bar', 'candlestick', 'scatter'];
+
+ var SliderZoomView = DataZoomView.extend({
+
+ type: 'dataZoom.slider',
+
+ init: function (ecModel, api) {
+
+ /**
+ * @private
+ * @type {Object}
+ */
+ this._displayables = {};
+
+ /**
+ * @private
+ * @type {string}
+ */
+ this._orient;
+
+ /**
+ * [0, 100]
+ * @private
+ */
+ this._range;
+
+ /**
+ * [coord of the first handle, coord of the second handle]
+ * @private
+ */
+ this._handleEnds;
+
+ /**
+ * [length, thick]
+ * @private
+ * @type {Array.<number>}
+ */
+ this._size;
+
+ /**
+ * @private
+ * @type {number}
+ */
+ this._halfHandleSize;
+
+ /**
+ * @private
+ */
+ this._location;
+
+ /**
+ * @private
+ */
+ this._dragging;
+
+ /**
+ * @private
+ */
+ this._dataShadowInfo;
+
+ this.api = api;
+ },
+
+ /**
+ * @override
+ */
+ render: function (dataZoomModel, ecModel, api, payload) {
+ SliderZoomView.superApply(this, 'render', arguments);
+
+ throttle.createOrUpdate(
+ this,
+ '_dispatchZoomAction',
+ this.dataZoomModel.get('throttle'),
+ 'fixRate'
+ );
+
+ this._orient = dataZoomModel.get('orient');
+ this._halfHandleSize = mathRound(dataZoomModel.get('handleSize') / 2);
+
+ if (this.dataZoomModel.get('show') === false) {
+ this.group.removeAll();
+ return;
+ }
+
+ // Notice: this._resetInterval() should not be executed when payload.type
+ // is 'dataZoom', origin this._range should be maintained, otherwise 'pan'
+ // or 'zoom' info will be missed because of 'throttle' of this.dispatchAction,
+ if (!payload || payload.type !== 'dataZoom' || payload.from !== this.uid) {
+ this._buildView();
+ }
+
+ this._updateView();
+ },
+
+ /**
+ * @override
+ */
+ remove: function () {
+ SliderZoomView.superApply(this, 'remove', arguments);
+ throttle.clear(this, '_dispatchZoomAction');
+ },
+
+ /**
+ * @override
+ */
+ dispose: function () {
+ SliderZoomView.superApply(this, 'dispose', arguments);
+ throttle.clear(this, '_dispatchZoomAction');
+ },
+
+ _buildView: function () {
+ var thisGroup = this.group;
+
+ thisGroup.removeAll();
+
+ this._resetLocation();
+ this._resetInterval();
+
+ var barGroup = this._displayables.barGroup = new graphic.Group();
+
+ this._renderBackground();
+ this._renderDataShadow();
+ this._renderHandle();
+
+ thisGroup.add(barGroup);
+
+ this._positionGroup();
+ },
+
+ /**
+ * @private
+ */
+ _resetLocation: function () {
+ var dataZoomModel = this.dataZoomModel;
+ var api = this.api;
+
+ // If some of x/y/width/height are not specified,
+ // auto-adapt according to target grid.
+ var coordRect = this._findCoordRect();
+ var ecSize = {width: api.getWidth(), height: api.getHeight()};
+ // Default align by coordinate system rect.
+ var positionInfo = this._orient === HORIZONTAL
+ ? {
+ // Why using 'right', because right should be used in vertical,
+ // and it is better to be consistent for dealing with position param merge.
+ right: ecSize.width - coordRect.x - coordRect.width,
+ top: (ecSize.height - DEFAULT_FILLER_SIZE - DEFAULT_LOCATION_EDGE_GAP),
+ width: coordRect.width,
+ height: DEFAULT_FILLER_SIZE
+ }
+ : { // vertical
+ right: DEFAULT_LOCATION_EDGE_GAP,
+ top: coordRect.y,
+ width: DEFAULT_FILLER_SIZE,
+ height: coordRect.height
+ };
+
+ // Do not write back to option and replace value 'ph', because
+ // the 'ph' value should be recalculated when resize.
+ var layoutParams = layout.getLayoutParams(dataZoomModel.option);
+
+ // Replace the placeholder value.
+ zrUtil.each(['right', 'top', 'width', 'height'], function (name) {
+ if (layoutParams[name] === 'ph') {
+ layoutParams[name] = positionInfo[name];
+ }
+ });
+
+ var layoutRect = layout.getLayoutRect(
+ layoutParams,
+ ecSize,
+ dataZoomModel.padding
+ );
+
+ this._location = {x: layoutRect.x, y: layoutRect.y};
+ this._size = [layoutRect.width, layoutRect.height];
+ this._orient === VERTICAL && this._size.reverse();
+ },
+
+ /**
+ * @private
+ */
+ _positionGroup: function () {
+ var thisGroup = this.group;
+ var location = this._location;
+ var orient = this._orient;
+
+ // Just use the first axis to determine mapping.
+ var targetAxisModel = this.dataZoomModel.getFirstTargetAxisModel();
+ var inverse = targetAxisModel && targetAxisModel.get('inverse');
+
+ var barGroup = this._displayables.barGroup;
+ var otherAxisInverse = (this._dataShadowInfo || {}).otherAxisInverse;
+
+ // Transform barGroup.
+ barGroup.attr(
+ (orient === HORIZONTAL && !inverse)
+ ? {scale: otherAxisInverse ? [1, 1] : [1, -1]}
+ : (orient === HORIZONTAL && inverse)
+ ? {scale: otherAxisInverse ? [-1, 1] : [-1, -1]}
+ : (orient === VERTICAL && !inverse)
+ ? {scale: otherAxisInverse ? [1, -1] : [1, 1], rotation: Math.PI / 2}
+ // Dont use Math.PI, considering shadow direction.
+ : {scale: otherAxisInverse ? [-1, -1] : [-1, 1], rotation: Math.PI / 2}
+ );
+
+ // Position barGroup
+ var rect = thisGroup.getBoundingRect([barGroup]);
+ thisGroup.position[0] = location.x - rect.x;
+ thisGroup.position[1] = location.y - rect.y;
+ },
+
+ /**
+ * @private
+ */
+ _getViewExtent: function () {
+ // View total length.
+ var halfHandleSize = this._halfHandleSize;
+ var totalLength = mathMax(this._size[0], halfHandleSize * 4);
+ var extent = [halfHandleSize, totalLength - halfHandleSize];
+
+ return extent;
+ },
+
+ _renderBackground : function () {
+ var dataZoomModel = this.dataZoomModel;
+ var size = this._size;
+
+ this._displayables.barGroup.add(new Rect({
+ silent: true,
+ shape: {
+ x: 0, y: 0, width: size[0], height: size[1]
+ },
+ style: {
+ fill: dataZoomModel.get('backgroundColor')
+ }
+ }));
+ },
+
+ _renderDataShadow: function () {
+ var info = this._dataShadowInfo = this._prepareDataShadowInfo();
+
+ if (!info) {
+ return;
+ }
+
+ var size = this._size;
+ var seriesModel = info.series;
+ var data = seriesModel.getRawData();
+ var otherDim = seriesModel.getShadowDim
+ ? seriesModel.getShadowDim() // @see candlestick
+ : info.otherDim;
+
+ var otherDataExtent = data.getDataExtent(otherDim);
+ // Nice extent.
+ var otherOffset = (otherDataExtent[1] - otherDataExtent[0]) * 0.3;
+ otherDataExtent = [
+ otherDataExtent[0] - otherOffset,
+ otherDataExtent[1] + otherOffset
+ ];
+ var otherShadowExtent = [0, size[1]];
+
+ var thisShadowExtent = [0, size[0]];
+
+ var points = [[size[0], 0], [0, 0]];
+ var step = thisShadowExtent[1] / (data.count() - 1);
+ var thisCoord = 0;
+
+ // Optimize for large data shadow
+ var stride = Math.round(data.count() / size[0]);
+ data.each([otherDim], function (value, index) {
+ if (stride > 0 && (index % stride)) {
+ thisCoord += step;
+ return;
+ }
+ // FIXME
+ // 应该使用统计的空判断?还是在list里进行空判断?
+ var otherCoord = (value == null || isNaN(value) || value === '')
+ ? null
+ : linearMap(value, otherDataExtent, otherShadowExtent, true);
+ otherCoord != null && points.push([thisCoord, otherCoord]);
+
+ thisCoord += step;
+ });
+
+ this._displayables.barGroup.add(new graphic.Polyline({
+ shape: {points: points},
+ style: {fill: this.dataZoomModel.get('dataBackgroundColor'), lineWidth: 0},
+ silent: true,
+ z2: -20
+ }));
+ },
+
+ _prepareDataShadowInfo: function () {
+ var dataZoomModel = this.dataZoomModel;
+ var showDataShadow = dataZoomModel.get('showDataShadow');
+
+ if (showDataShadow === false) {
+ return;
+ }
+
+ // Find a representative series.
+ var result;
+ var ecModel = this.ecModel;
+
+ dataZoomModel.eachTargetAxis(function (dimNames, axisIndex) {
+ var seriesModels = dataZoomModel
+ .getAxisProxy(dimNames.name, axisIndex)
+ .getTargetSeriesModels();
+
+ zrUtil.each(seriesModels, function (seriesModel) {
+ if (result) {
+ return;
+ }
+
+ if (showDataShadow !== true && zrUtil.indexOf(
+ SHOW_DATA_SHADOW_SERIES_TYPE, seriesModel.get('type')
+ ) < 0
+ ) {
+ return;
+ }
+
+ var otherDim = getOtherDim(dimNames.name);
+
+ var thisAxis = ecModel.getComponent(dimNames.axis, axisIndex).axis;
+
+ result = {
+ thisAxis: thisAxis,
+ series: seriesModel,
+ thisDim: dimNames.name,
+ otherDim: otherDim,
+ otherAxisInverse: seriesModel
+ .coordinateSystem.getOtherAxis(thisAxis).inverse
+ };
+
+ }, this);
+
+ }, this);
+
+ return result;
+ },
+
+ _renderHandle: function () {
+ var displaybles = this._displayables;
+ var handles = displaybles.handles = [];
+ var handleLabels = displaybles.handleLabels = [];
+ var barGroup = this._displayables.barGroup;
+ var size = this._size;
+
+ barGroup.add(displaybles.filler = new Rect({
+ draggable: true,
+ cursor: 'move',
+ drift: bind(this._onDragMove, this, 'all'),
+ ondragend: bind(this._onDragEnd, this),
+ onmouseover: bind(this._showDataInfo, this, true),
+ onmouseout: bind(this._showDataInfo, this, false),
+ style: {
+ fill: this.dataZoomModel.get('fillerColor'),
+ // text: ':::',
+ textPosition : 'inside'
+ }
+ }));
+
+ // Frame border.
+ barGroup.add(new Rect(graphic.subPixelOptimizeRect({
+ silent: true,
+ shape: {
+ x: 0,
+ y: 0,
+ width: size[0],
+ height: size[1]
+ },
+ style: {
+ stroke: this.dataZoomModel.get('dataBackgroundColor'),
+ lineWidth: DEFAULT_FRAME_BORDER_WIDTH,
+ fill: 'rgba(0,0,0,0)'
+ }
+ })));
+
+ each([0, 1], function (handleIndex) {
+
+ barGroup.add(handles[handleIndex] = new Rect({
+ style: {
+ fill: this.dataZoomModel.get('handleColor')
+ },
+ cursor: 'move',
+ draggable: true,
+ drift: bind(this._onDragMove, this, handleIndex),
+ ondragend: bind(this._onDragEnd, this),
+ onmouseover: bind(this._showDataInfo, this, true),
+ onmouseout: bind(this._showDataInfo, this, false)
+ }));
+
+ var textStyleModel = this.dataZoomModel.textStyleModel;
+
+ this.group.add(
+ handleLabels[handleIndex] = new graphic.Text({
+ silent: true,
+ invisible: true,
+ style: {
+ x: 0, y: 0, text: '',
+ textVerticalAlign: 'middle',
+ textAlign: 'center',
+ fill: textStyleModel.getTextColor(),
+ textFont: textStyleModel.getFont()
+ }
+ }));
+
+ }, this);
+ },
+
+ /**
+ * @private
+ */
+ _resetInterval: function () {
+ var range = this._range = this.dataZoomModel.getPercentRange();
+ var viewExtent = this._getViewExtent();
+
+ this._handleEnds = [
+ linearMap(range[0], [0, 100], viewExtent, true),
+ linearMap(range[1], [0, 100], viewExtent, true)
+ ];
+ },
+
+ /**
+ * @private
+ * @param {(number|string)} handleIndex 0 or 1 or 'all'
+ * @param {number} dx
+ * @param {number} dy
+ */
+ _updateInterval: function (handleIndex, delta) {
+ var handleEnds = this._handleEnds;
+ var viewExtend = this._getViewExtent();
+
+ sliderMove(
+ delta,
+ handleEnds,
+ viewExtend,
+ (handleIndex === 'all' || this.dataZoomModel.get('zoomLock'))
+ ? 'rigid' : 'cross',
+ handleIndex
+ );
+
+ this._range = asc([
+ linearMap(handleEnds[0], viewExtend, [0, 100], true),
+ linearMap(handleEnds[1], viewExtend, [0, 100], true)
+ ]);
+ },
+
+ /**
+ * @private
+ */
+ _updateView: function () {
+ var displaybles = this._displayables;
+ var handleEnds = this._handleEnds;
+ var handleInterval = asc(handleEnds.slice());
+ var size = this._size;
+ var halfHandleSize = this._halfHandleSize;
+
+ each([0, 1], function (handleIndex) {
+
+ // Handles
+ var handle = displaybles.handles[handleIndex];
+ handle.setShape({
+ x: handleEnds[handleIndex] - halfHandleSize,
+ y: -1,
+ width: halfHandleSize * 2,
+ height: size[1] + 2,
+ r: 1
+ });
+
+ }, this);
+
+ // Filler
+ displaybles.filler.setShape({
+ x: handleInterval[0],
+ y: 0,
+ width: handleInterval[1] - handleInterval[0],
+ height: this._size[1]
+ });
+
+ this._updateDataInfo();
+ },
+
+ /**
+ * @private
+ */
+ _updateDataInfo: function () {
+ var dataZoomModel = this.dataZoomModel;
+ var displaybles = this._displayables;
+ var handleLabels = displaybles.handleLabels;
+ var orient = this._orient;
+ var labelTexts = ['', ''];
+
+ // FIXME
+ // date型,支æŒformatter,autoformatter(ec2 date.getAutoFormatter)
+ if (dataZoomModel.get('showDetail')) {
+ var dataInterval;
+ var axis;
+ dataZoomModel.eachTargetAxis(function (dimNames, axisIndex) {
+ // Using dataInterval of the first axis.
+ if (!dataInterval) {
+ dataInterval = dataZoomModel
+ .getAxisProxy(dimNames.name, axisIndex)
+ .getDataValueWindow();
+ axis = this.ecModel.getComponent(dimNames.axis, axisIndex).axis;
+ }
+ }, this);
+
+ if (dataInterval) {
+ labelTexts = [
+ this._formatLabel(dataInterval[0], axis),
+ this._formatLabel(dataInterval[1], axis)
+ ];
+ }
+ }
+
+ var orderedHandleEnds = asc(this._handleEnds.slice());
+
+ setLabel.call(this, 0);
+ setLabel.call(this, 1);
+
+ function setLabel(handleIndex) {
+ // Label
+ // Text should not transform by barGroup.
+ var barTransform = graphic.getTransform(
+ displaybles.handles[handleIndex], this.group
+ );
+ var direction = graphic.transformDirection(
+ handleIndex === 0 ? 'right' : 'left', barTransform
+ );
+ var offset = this._halfHandleSize + LABEL_GAP;
+ var textPoint = graphic.applyTransform(
+ [
+ orderedHandleEnds[handleIndex] + (handleIndex === 0 ? -offset : offset),
+ this._size[1] / 2
+ ],
+ barTransform
+ );
+ handleLabels[handleIndex].setStyle({
+ x: textPoint[0],
+ y: textPoint[1],
+ textVerticalAlign: orient === HORIZONTAL ? 'middle' : direction,
+ textAlign: orient === HORIZONTAL ? direction : 'center',
+ text: labelTexts[handleIndex]
+ });
+ }
+ },
+
+ /**
+ * @private
+ */
+ _formatLabel: function (value, axis) {
+ var dataZoomModel = this.dataZoomModel;
+ var labelFormatter = dataZoomModel.get('labelFormatter');
+ if (zrUtil.isFunction(labelFormatter)) {
+ return labelFormatter(value);
+ }
+
+ var labelPrecision = dataZoomModel.get('labelPrecision');
+ if (labelPrecision == null || labelPrecision === 'auto') {
+ labelPrecision = axis.getPixelPrecision();
+ }
+
+ value = (value == null && isNaN(value))
+ ? ''
+ // FIXME Glue code
+ : (axis.type === 'category' || axis.type === 'time')
+ ? axis.scale.getLabel(Math.round(value))
+ // param of toFixed should less then 20.
+ : value.toFixed(Math.min(labelPrecision, 20));
+
+ if (zrUtil.isString(labelFormatter)) {
+ value = labelFormatter.replace('{value}', value);
+ }
+
+ return value;
+ },
+
+ /**
+ * @private
+ * @param {boolean} showOrHide true: show, false: hide
+ */
+ _showDataInfo: function (showOrHide) {
+ // Always show when drgging.
+ showOrHide = this._dragging || showOrHide;
+
+ var handleLabels = this._displayables.handleLabels;
+ handleLabels[0].attr('invisible', !showOrHide);
+ handleLabels[1].attr('invisible', !showOrHide);
+ },
+
+ _onDragMove: function (handleIndex, dx, dy) {
+ this._dragging = true;
+
+ // Transform dx, dy to bar coordination.
+ var vertex = this._applyBarTransform([dx, dy], true);
+
+ this._updateInterval(handleIndex, vertex[0]);
+ this._updateView();
+
+ if (this.dataZoomModel.get('realtime')) {
+ this._dispatchZoomAction();
+ }
+ },
+
+ _onDragEnd: function () {
+ this._dragging = false;
+ this._showDataInfo(false);
+ this._dispatchZoomAction();
+ },
+
+ /**
+ * This action will be throttled.
+ * @private
+ */
+ _dispatchZoomAction: function () {
+ var range = this._range;
+
+ this.api.dispatchAction({
+ type: 'dataZoom',
+ from: this.uid,
+ dataZoomId: this.dataZoomModel.id,
+ start: range[0],
+ end: range[1]
+ });
+ },
+
+ /**
+ * @private
+ */
+ _applyBarTransform: function (vertex, inverse) {
+ var barTransform = this._displayables.barGroup.getLocalTransform();
+ return graphic.applyTransform(vertex, barTransform, inverse);
+ },
+
+ /**
+ * @private
+ */
+ _findCoordRect: function () {
+ // Find the grid coresponding to the first axis referred by dataZoom.
+ var targetInfo = this.getTargetInfo();
+
+ // FIXME
+ // 判断是catesian还是polar
+ var rect;
+ if (targetInfo.cartesians.length) {
+ rect = targetInfo.cartesians[0].model.coordinateSystem.getRect();
+ }
+ else { // Polar
+ // FIXME
+ // æš‚æ—¶éšä¾¿å†™çš„
+ var width = this.api.getWidth();
+ var height = this.api.getHeight();
+ rect = {
+ x: width * 0.2,
+ y: height * 0.2,
+ width: width * 0.6,
+ height: height * 0.6
+ };
+ }
+
+ return rect;
+ }
+
+ });
+
+ function getOtherDim(thisDim) {
+ // FIXME
+ // 这个逻辑和getOtherAxis里一致,但是写在这里是å¦ä¸å¥½
+ return thisDim === 'x' ? 'y' : 'x';
+ }
+
+ module.exports = SliderZoomView;
+
+
+
+/***/ },
+/* 293 */
+/***/ function(module, exports) {
+
+
+
+ var lib = {};
+
+ var ORIGIN_METHOD = '\0__throttleOriginMethod';
+ var RATE = '\0__throttleRate';
+
+ /**
+ * 频率控制 返回函数连续调用时,fn 执行频率é™å®šä¸ºæ¯å¤šå°‘时间执行一次
+ * 例如常è§æ•ˆæžœï¼š
+ * notifyWhenChangesStop
+ * 频ç¹è°ƒç”¨æ—¶ï¼Œåªä¿è¯æœ€åŽä¸€æ¬¡æ‰§è¡Œ
+ * é…æˆï¼štrailing:trueï¼›debounce:true å³å¯
+ * notifyAtFixRate
+ * 频ç¹è°ƒç”¨æ—¶ï¼ŒæŒ‰è§„律心跳执行
+ * é…æˆï¼štrailing:trueï¼›debounce:false å³å¯
+ * 注æ„:
+ * æ ¹æ®modelæ›´æ–°view的时候,å¯ä»¥ä½¿ç”¨throttle,
+ * 但是根æ®viewæ›´æ–°model的时候,é¿å…使用这ç§å»¶è¿Ÿæ›´æ–°çš„æ–¹å¼ã€‚
+ * 因为这å¯èƒ½å¯¼è‡´modelå’ŒserveråŒæ­¥å‡ºçŽ°é—®é¢˜ã€‚
+ *
+ * @public
+ * @param {(Function|Array.<Function>)} fn 需è¦è°ƒç”¨çš„函数
+ * 如果fn为array,则表示å¯ä»¥å¯¹å¤šä¸ªå‡½æ•°è¿›è¡Œthrottle。
+ * 他们共享åŒä¸€ä¸ªtimer。
+ * @param {number} delay 延迟时间,å•ä½æ¯«ç§’
+ * @param {bool} trailing 是å¦ä¿è¯æœ€åŽä¸€æ¬¡è§¦å‘的执行
+ * true:表示ä¿è¯æœ€åŽä¸€æ¬¡è°ƒç”¨ä¼šè§¦å‘执行。
+ * 但任何调用åŽä¸å¯èƒ½ç«‹å³æ‰§è¡Œï¼Œæ€»ä¼šdelay。
+ * false:表示ä¸ä¿è¯æœ€åŽä¸€æ¬¡è°ƒç”¨ä¼šè§¦å‘执行。
+ * 但åªè¦é—´éš”大于delay,调用就会立å³æ‰§è¡Œã€‚
+ * @param {bool} debounce 节æµ
+ * true:表示:频ç¹è°ƒç”¨ï¼ˆé—´éš”å°äºŽdelay)时,根本ä¸æ‰§è¡Œ
+ * false:表示:频ç¹è°ƒç”¨ï¼ˆé—´éš”å°äºŽdelay)时,按规律心跳执行
+ * @return {(Function|Array.<Function>)} 实际调用函数。
+ * 当输入的fn为array时,返回值也为array。
+ * æ¯é¡¹æ˜¯Function。
+ */
+ lib.throttle = function (fn, delay, trailing, debounce) {
+
+ var currCall = (new Date()).getTime();
+ var lastCall = 0;
+ var lastExec = 0;
+ var timer = null;
+ var diff;
+ var scope;
+ var args;
+ var isSingle = typeof fn === 'function';
+ delay = delay || 0;
+
+ if (isSingle) {
+ return createCallback();
+ }
+ else {
+ var ret = [];
+ for (var i = 0; i < fn.length; i++) {
+ ret[i] = createCallback(i);
+ }
+ return ret;
+ }
+
+ function createCallback(index) {
+
+ function exec() {
+ lastExec = (new Date()).getTime();
+ timer = null;
+ (isSingle ? fn : fn[index]).apply(scope, args || []);
+ }
+
+ var cb = function () {
+ currCall = (new Date()).getTime();
+ scope = this;
+ args = arguments;
+ diff = currCall - (debounce ? lastCall : lastExec) - delay;
+
+ clearTimeout(timer);
+
+ if (debounce) {
+ if (trailing) {
+ timer = setTimeout(exec, delay);
+ }
+ else if (diff >= 0) {
+ exec();
+ }
+ }
+ else {
+ if (diff >= 0) {
+ exec();
+ }
+ else if (trailing) {
+ timer = setTimeout(exec, -diff);
+ }
+ }
+
+ lastCall = currCall;
+ };
+
+ /**
+ * Clear throttle.
+ * @public
+ */
+ cb.clear = function () {
+ if (timer) {
+ clearTimeout(timer);
+ timer = null;
+ }
+ };
+
+ return cb;
+ }
+ };
+
+ /**
+ * 按一定频率执行,最åŽä¸€æ¬¡è°ƒç”¨æ€»å½’会执行
+ *
+ * @public
+ */
+ lib.fixRate = function (fn, delay) {
+ return delay != null
+ ? lib.throttle(fn, delay, true, false)
+ : fn;
+ };
+
+ /**
+ * 直到ä¸é¢‘ç¹è°ƒç”¨äº†æ‰ä¼šæ‰§è¡Œï¼Œæœ€åŽä¸€æ¬¡è°ƒç”¨æ€»å½’会执行
+ *
+ * @public
+ */
+ lib.debounce = function (fn, delay) {
+ return delay != null
+ ? lib.throttle(fn, delay, true, true)
+ : fn;
+ };
+
+
+ /**
+ * Create throttle method or update throttle rate.
+ *
+ * @example
+ * ComponentView.prototype.render = function () {
+ * ...
+ * throttle.createOrUpdate(
+ * this,
+ * '_dispatchAction',
+ * this.model.get('throttle'),
+ * 'fixRate'
+ * );
+ * };
+ * ComponentView.prototype.remove = function () {
+ * throttle.clear(this, '_dispatchAction');
+ * };
+ * ComponentView.prototype.dispose = function () {
+ * throttle.clear(this, '_dispatchAction');
+ * };
+ *
+ * @public
+ * @param {Object} obj
+ * @param {string} fnAttr
+ * @param {number} rate
+ * @param {string} throttleType 'fixRate' or 'debounce'
+ */
+ lib.createOrUpdate = function (obj, fnAttr, rate, throttleType) {
+ var fn = obj[fnAttr];
+
+ if (!fn || rate == null || !throttleType) {
+ return;
+ }
+
+ var originFn = fn[ORIGIN_METHOD] || fn;
+ var lastRate = fn[RATE];
+
+ if (lastRate !== rate) {
+ fn = obj[fnAttr] = lib[throttleType](originFn, rate);
+ fn[ORIGIN_METHOD] = originFn;
+ fn[RATE] = rate;
+ }
+ };
+
+ /**
+ * Clear throttle. Example see throttle.createOrUpdate.
+ *
+ * @public
+ * @param {Object} obj
+ * @param {string} fnAttr
+ */
+ lib.clear = function (obj, fnAttr) {
+ var fn = obj[fnAttr];
+ if (fn && fn[ORIGIN_METHOD]) {
+ obj[fnAttr] = fn[ORIGIN_METHOD];
+ }
+ };
+
+ module.exports = lib;
+
+
+
+/***/ },
+/* 294 */
+/***/ function(module, exports) {
+
+
+
+ /**
+ * Calculate slider move result.
+ *
+ * @param {number} delta Move length.
+ * @param {Array.<number>} handleEnds handleEnds[0] and be bigger then handleEnds[1].
+ * handleEnds will be modified in this method.
+ * @param {Array.<number>} extent handleEnds is restricted by extent.
+ * extent[0] should less or equals than extent[1].
+ * @param {string} mode 'rigid': Math.abs(handleEnds[0] - handleEnds[1]) remain unchanged,
+ * 'cross' handleEnds[0] can be bigger then handleEnds[1],
+ * 'push' handleEnds[0] can not be bigger then handleEnds[1],
+ * when they touch, one push other.
+ * @param {number} handleIndex If mode is 'rigid', handleIndex is not required.
+ * @param {Array.<number>} The input handleEnds.
+ */
+ module.exports = function (delta, handleEnds, extent, mode, handleIndex) {
+ if (!delta) {
+ return handleEnds;
+ }
+
+ if (mode === 'rigid') {
+ delta = getRealDelta(delta, handleEnds, extent);
+ handleEnds[0] += delta;
+ handleEnds[1] += delta;
+ }
+ else {
+ delta = getRealDelta(delta, handleEnds[handleIndex], extent);
+ handleEnds[handleIndex] += delta;
+
+ if (mode === 'push' && handleEnds[0] > handleEnds[1]) {
+ handleEnds[1 - handleIndex] = handleEnds[handleIndex];
+ }
+ }
+
+ return handleEnds;
+
+ function getRealDelta(delta, handleEnds, extent) {
+ var handleMinMax = !handleEnds.length
+ ? [handleEnds, handleEnds]
+ : handleEnds.slice();
+ handleEnds[0] > handleEnds[1] && handleMinMax.reverse();
+
+ if (delta < 0 && handleMinMax[0] + delta < extent[0]) {
+ delta = extent[0] - handleMinMax[0];
+ }
+ if (delta > 0 && handleMinMax[1] + delta > extent[1]) {
+ delta = extent[1] - handleMinMax[1];
+ }
+ return delta;
+ }
+ };
+
+
+/***/ },
+/* 295 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file Data zoom model
+ */
+
+
+ module.exports = __webpack_require__(288).extend({
+
+ type: 'dataZoom.inside',
+
+ /**
+ * @protected
+ */
+ defaultOption: {
+ zoomLock: false // Whether disable zoom but only pan.
+ }
+ });
+
+
+/***/ },
+/* 296 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var DataZoomView = __webpack_require__(290);
+ var zrUtil = __webpack_require__(3);
+ var sliderMove = __webpack_require__(294);
+ var roams = __webpack_require__(297);
+ var bind = zrUtil.bind;
+
+ var InsideZoomView = DataZoomView.extend({
+
+ type: 'dataZoom.inside',
+
+ /**
+ * @override
+ */
+ init: function (ecModel, api) {
+ /**
+ * 'throttle' is used in this.dispatchAction, so we save range
+ * to avoid missing some 'pan' info.
+ * @private
+ * @type {Array.<number>}
+ */
+ this._range;
+ },
+
+ /**
+ * @override
+ */
+ render: function (dataZoomModel, ecModel, api, payload) {
+ InsideZoomView.superApply(this, 'render', arguments);
+
+ // Notice: origin this._range should be maintained, and should not be re-fetched
+ // from dataZoomModel when payload.type is 'dataZoom', otherwise 'pan' or 'zoom'
+ // info will be missed because of 'throttle' of this.dispatchAction.
+ if (roams.shouldRecordRange(payload, dataZoomModel.id)) {
+ this._range = dataZoomModel.getPercentRange();
+ }
+
+ // Reset controllers.
+ var coordInfoList = this.getTargetInfo().cartesians;
+ var allCoordIds = zrUtil.map(coordInfoList, function (coordInfo) {
+ return roams.generateCoordId(coordInfo.model);
+ });
+ zrUtil.each(coordInfoList, function (coordInfo) {
+ var coordModel = coordInfo.model;
+ roams.register(
+ api,
+ {
+ coordId: roams.generateCoordId(coordModel),
+ allCoordIds: allCoordIds,
+ coordinateSystem: coordModel.coordinateSystem,
+ dataZoomId: dataZoomModel.id,
+ throttleRage: dataZoomModel.get('throttle', true),
+ panGetRange: bind(this._onPan, this, coordInfo),
+ zoomGetRange: bind(this._onZoom, this, coordInfo)
+ }
+ );
+ }, this);
+
+ // TODO
+ // polar支æŒ
+ },
+
+ /**
+ * @override
+ */
+ remove: function () {
+ roams.unregister(this.api, this.dataZoomModel.id);
+ InsideZoomView.superApply(this, 'remove', arguments);
+ this._range = null;
+ },
+
+ /**
+ * @override
+ */
+ dispose: function () {
+ roams.unregister(this.api, this.dataZoomModel.id);
+ InsideZoomView.superApply(this, 'dispose', arguments);
+ this._range = null;
+ },
+
+ /**
+ * @private
+ */
+ _onPan: function (coordInfo, controller, dx, dy) {
+ return (
+ this._range = panCartesian(
+ [dx, dy], this._range, controller, coordInfo
+ )
+ );
+ },
+
+ /**
+ * @private
+ */
+ _onZoom: function (coordInfo, controller, scale, mouseX, mouseY) {
+ var dataZoomModel = this.dataZoomModel;
+
+ if (dataZoomModel.option.zoomLock) {
+ return this._range;
+ }
+
+ return (
+ this._range = scaleCartesian(
+ 1 / scale, [mouseX, mouseY], this._range,
+ controller, coordInfo, dataZoomModel
+ )
+ );
+ }
+
+ });
+
+ function panCartesian(pixelDeltas, range, controller, coordInfo) {
+ range = range.slice();
+
+ // Calculate transform by the first axis.
+ var axisModel = coordInfo.axisModels[0];
+ if (!axisModel) {
+ return;
+ }
+
+ var directionInfo = getDirectionInfo(pixelDeltas, axisModel, controller);
+
+ var percentDelta = directionInfo.signal
+ * (range[1] - range[0])
+ * directionInfo.pixel / directionInfo.pixelLength;
+
+ sliderMove(
+ percentDelta,
+ range,
+ [0, 100],
+ 'rigid'
+ );
+
+ return range;
+ }
+
+ function scaleCartesian(scale, mousePoint, range, controller, coordInfo, dataZoomModel) {
+ range = range.slice();
+
+ // Calculate transform by the first axis.
+ var axisModel = coordInfo.axisModels[0];
+ if (!axisModel) {
+ return;
+ }
+
+ var directionInfo = getDirectionInfo(mousePoint, axisModel, controller);
+
+ var mouse = directionInfo.pixel - directionInfo.pixelStart;
+ var percentPoint = mouse / directionInfo.pixelLength * (range[1] - range[0]) + range[0];
+
+ scale = Math.max(scale, 0);
+ range[0] = (range[0] - percentPoint) * scale + percentPoint;
+ range[1] = (range[1] - percentPoint) * scale + percentPoint;
+
+ return fixRange(range);
+ }
+
+ function getDirectionInfo(xy, axisModel, controller) {
+ var axis = axisModel.axis;
+ var rect = controller.rect;
+ var ret = {};
+
+ if (axis.dim === 'x') {
+ ret.pixel = xy[0];
+ ret.pixelLength = rect.width;
+ ret.pixelStart = rect.x;
+ ret.signal = axis.inverse ? 1 : -1;
+ }
+ else { // axis.dim === 'y'
+ ret.pixel = xy[1];
+ ret.pixelLength = rect.height;
+ ret.pixelStart = rect.y;
+ ret.signal = axis.inverse ? -1 : 1;
+ }
+
+ return ret;
+ }
+
+ function fixRange(range) {
+ // Clamp, using !(<= or >=) to handle NaN.
+ // jshint ignore:start
+ var bound = [0, 100];
+ !(range[0] <= bound[1]) && (range[0] = bound[1]);
+ !(range[1] <= bound[1]) && (range[1] = bound[1]);
+ !(range[0] >= bound[0]) && (range[0] = bound[0]);
+ !(range[1] >= bound[0]) && (range[1] = bound[0]);
+ // jshint ignore:end
+
+ return range;
+ }
+
+ module.exports = InsideZoomView;
+
+
+/***/ },
+/* 297 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file Roam controller manager.
+ */
+
+
+ // Only create one roam controller for each coordinate system.
+ // one roam controller might be refered by two inside data zoom
+ // components (for example, one for x and one for y). When user
+ // pan or zoom, only dispatch one action for those data zoom
+ // components.
+
+ var zrUtil = __webpack_require__(3);
+ var RoamController = __webpack_require__(159);
+ var throttle = __webpack_require__(293);
+ var curry = zrUtil.curry;
+
+ var ATTR = '\0_ec_dataZoom_roams';
+
+ var roams = {
+
+ /**
+ * @public
+ * @param {module:echarts/ExtensionAPI} api
+ * @param {Object} dataZoomInfo
+ * @param {string} dataZoomInfo.coordId
+ * @param {Object} dataZoomInfo.coordinateSystem
+ * @param {Array.<string>} dataZoomInfo.allCoordIds
+ * @param {string} dataZoomInfo.dataZoomId
+ * @param {number} dataZoomInfo.throttleRate
+ * @param {Function} dataZoomInfo.panGetRange
+ * @param {Function} dataZoomInfo.zoomGetRange
+ */
+ register: function (api, dataZoomInfo) {
+ var store = giveStore(api);
+ var theDataZoomId = dataZoomInfo.dataZoomId;
+ var theCoordId = dataZoomInfo.coordId;
+
+ // Do clean when a dataZoom changes its target coordnate system.
+ zrUtil.each(store, function (record, coordId) {
+ var dataZoomInfos = record.dataZoomInfos;
+ if (dataZoomInfos[theDataZoomId]
+ && zrUtil.indexOf(dataZoomInfo.allCoordIds, theCoordId) < 0
+ ) {
+ delete dataZoomInfos[theDataZoomId];
+ record.count--;
+ }
+ });
+
+ cleanStore(store);
+
+ var record = store[theCoordId];
+
+ // Create if needed.
+ if (!record) {
+ record = store[theCoordId] = {
+ coordId: theCoordId,
+ dataZoomInfos: {},
+ count: 0
+ };
+ record.controller = createController(api, dataZoomInfo, record);
+ record.dispatchAction = zrUtil.curry(dispatchAction, api);
+ }
+
+ // Consider resize, area should be always updated.
+ record.controller.rect = dataZoomInfo.coordinateSystem.getRect().clone();
+
+ // Update throttle.
+ throttle.createOrUpdate(
+ record,
+ 'dispatchAction',
+ dataZoomInfo.throttleRate,
+ 'fixRate'
+ );
+
+ // Update reference of dataZoom.
+ !(record.dataZoomInfos[theDataZoomId]) && record.count++;
+ record.dataZoomInfos[theDataZoomId] = dataZoomInfo;
+ },
+
+ /**
+ * @public
+ * @param {module:echarts/ExtensionAPI} api
+ * @param {string} dataZoomId
+ */
+ unregister: function (api, dataZoomId) {
+ var store = giveStore(api);
+
+ zrUtil.each(store, function (record) {
+ var dataZoomInfos = record.dataZoomInfos;
+ if (dataZoomInfos[dataZoomId]) {
+ delete dataZoomInfos[dataZoomId];
+ record.count--;
+ }
+ });
+
+ cleanStore(store);
+ },
+
+ /**
+ * @public
+ */
+ shouldRecordRange: function (payload, dataZoomId) {
+ if (payload && payload.type === 'dataZoom' && payload.batch) {
+ for (var i = 0, len = payload.batch.length; i < len; i++) {
+ if (payload.batch[i].dataZoomId === dataZoomId) {
+ return false;
+ }
+ }
+ }
+ return true;
+ },
+
+ /**
+ * @public
+ */
+ generateCoordId: function (coordModel) {
+ return coordModel.type + '\0_' + coordModel.id;
+ }
+ };
+
+ /**
+ * Key: coordId, value: {dataZoomInfos: [], count, controller}
+ * @type {Array.<Object>}
+ */
+ function giveStore(api) {
+ // Mount store on zrender instance, so that we do not
+ // need to worry about dispose.
+ var zr = api.getZr();
+ return zr[ATTR] || (zr[ATTR] = {});
+ }
+
+ function createController(api, dataZoomInfo, newRecord) {
+ var controller = new RoamController(api.getZr());
+ controller.enable();
+ controller.on('pan', curry(onPan, newRecord));
+ controller.on('zoom', curry(onZoom, newRecord));
+
+ return controller;
+ }
+
+ function cleanStore(store) {
+ zrUtil.each(store, function (record, coordId) {
+ if (!record.count) {
+ record.controller.off('pan').off('zoom');
+ delete store[coordId];
+ }
+ });
+ }
+
+ function onPan(record, dx, dy) {
+ wrapAndDispatch(record, function (info) {
+ return info.panGetRange(record.controller, dx, dy);
+ });
+ }
+
+ function onZoom(record, scale, mouseX, mouseY) {
+ wrapAndDispatch(record, function (info) {
+ return info.zoomGetRange(record.controller, scale, mouseX, mouseY);
+ });
+ }
+
+ function wrapAndDispatch(record, getRange) {
+ var batch = [];
+
+ zrUtil.each(record.dataZoomInfos, function (info) {
+ var range = getRange(info);
+ range && batch.push({
+ dataZoomId: info.dataZoomId,
+ start: range[0],
+ end: range[1]
+ });
+ });
+
+ record.dispatchAction(batch);
+ }
+
+ /**
+ * This action will be throttled.
+ */
+ function dispatchAction(api, batch) {
+ api.dispatchAction({
+ type: 'dataZoom',
+ batch: batch
+ });
+ }
+
+ module.exports = roams;
+
+
+
+/***/ },
+/* 298 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file Data zoom processor
+ */
+
+
+ var echarts = __webpack_require__(1);
+
+ echarts.registerProcessor('filter', function (ecModel, api) {
+
+ ecModel.eachComponent('dataZoom', function (dataZoomModel) {
+ // We calculate window and reset axis here but not in model
+ // init stage and not after action dispatch handler, because
+ // reset should be called after seriesData.restoreData.
+ dataZoomModel.eachTargetAxis(resetSingleAxis);
+
+ // Caution: data zoom filtering is order sensitive when using
+ // percent range and no min/max/scale set on axis.
+ // For example, we have dataZoom definition:
+ // [
+ // {xAxisIndex: 0, start: 30, end: 70},
+ // {yAxisIndex: 0, start: 20, end: 80}
+ // ]
+ // In this case, [20, 80] of y-dataZoom should be based on data
+ // that have filtered by x-dataZoom using range of [30, 70],
+ // but should not be based on full raw data. Thus sliding
+ // x-dataZoom will change both ranges of xAxis and yAxis,
+ // while sliding y-dataZoom will only change the range of yAxis.
+ // So we should filter x-axis after reset x-axis immediately,
+ // and then reset y-axis and filter y-axis.
+ dataZoomModel.eachTargetAxis(filterSingleAxis);
+ });
+
+ ecModel.eachComponent('dataZoom', function (dataZoomModel) {
+ // Fullfill all of the range props so that user
+ // is able to get them from chart.getOption().
+ var axisProxy = dataZoomModel.findRepresentativeAxisProxy();
+ var percentRange = axisProxy.getDataPercentWindow();
+ var valueRange = axisProxy.getDataValueWindow();
+ dataZoomModel.setRawRange({
+ start: percentRange[0],
+ end: percentRange[1],
+ startValue: valueRange[0],
+ endValue: valueRange[1]
+ });
+ });
+ });
+
+ function resetSingleAxis(dimNames, axisIndex, dataZoomModel) {
+ dataZoomModel.getAxisProxy(dimNames.name, axisIndex).reset(dataZoomModel);
+ }
+
+ function filterSingleAxis(dimNames, axisIndex, dataZoomModel) {
+ dataZoomModel.getAxisProxy(dimNames.name, axisIndex).filterData(dataZoomModel);
+ }
+
+
+
+
+/***/ },
+/* 299 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file Data zoom action
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+ var modelUtil = __webpack_require__(5);
+ var echarts = __webpack_require__(1);
+
+
+ echarts.registerAction('dataZoom', function (payload, ecModel) {
+
+ var linkedNodesFinder = modelUtil.createLinkedNodesFinder(
+ zrUtil.bind(ecModel.eachComponent, ecModel, 'dataZoom'),
+ modelUtil.eachAxisDim,
+ function (model, dimNames) {
+ return model.get(dimNames.axisIndex);
+ }
+ );
+
+ var effectedModels = [];
+
+ ecModel.eachComponent(
+ {mainType: 'dataZoom', query: payload},
+ function (model, index) {
+ effectedModels.push.apply(
+ effectedModels, linkedNodesFinder(model).nodes
+ );
+ }
+ );
+
+ zrUtil.each(effectedModels, function (dataZoomModel, index) {
+ dataZoomModel.setRawRange({
+ start: payload.start,
+ end: payload.end,
+ startValue: payload.startValue,
+ endValue: payload.endValue
+ });
+ });
+
+ });
+
+
+
+/***/ },
+/* 300 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * visualMap component entry
+ */
+
+
+ __webpack_require__(301);
+ __webpack_require__(312);
+
+
+
+/***/ },
+/* 301 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * DataZoom component entry
+ */
+
+
+ __webpack_require__(1).registerPreprocessor(
+ __webpack_require__(302)
+ );
+
+ __webpack_require__(303);
+ __webpack_require__(304);
+ __webpack_require__(305);
+ __webpack_require__(308);
+ __webpack_require__(311);
+
+
+
+/***/ },
+/* 302 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file VisualMap preprocessor
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+ var each = zrUtil.each;
+
+ module.exports = function (option) {
+ var visualMap = option && option.visualMap;
+
+ if (!zrUtil.isArray(visualMap)) {
+ visualMap = visualMap ? [visualMap] : [];
+ }
+
+ each(visualMap, function (opt) {
+ if (!opt) {
+ return;
+ }
+
+ // rename splitList to pieces
+ if (has(opt, 'splitList') && !has(opt, 'pieces')) {
+ opt.pieces = opt.splitList;
+ delete opt.splitList;
+ }
+
+ var pieces = opt.pieces;
+ if (pieces && zrUtil.isArray(pieces)) {
+ each(pieces, function (piece) {
+ if (zrUtil.isObject(piece)) {
+ if (has(piece, 'start') && !has(piece, 'min')) {
+ piece.min = piece.start;
+ }
+ if (has(piece, 'end') && !has(piece, 'max')) {
+ piece.max = piece.end;
+ }
+ }
+ });
+ }
+ });
+ };
+
+ function has(obj, name) {
+ return obj && obj.hasOwnProperty && obj.hasOwnProperty(name);
+ }
+
+
+
+/***/ },
+/* 303 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ __webpack_require__(19).registerSubTypeDefaulter('visualMap', function (option) {
+ // Compatible with ec2, when splitNumber === 0, continuous visualMap will be used.
+ return (
+ !option.categories
+ && (
+ !(
+ option.pieces
+ ? option.pieces.length > 0
+ : option.splitNumber > 0
+ )
+ || option.calculable
+ )
+ )
+ ? 'continuous' : 'piecewise';
+ });
+
+
+
+/***/ },
+/* 304 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file Data range visual coding.
+ */
+
+
+ var echarts = __webpack_require__(1);
+ var VisualMapping = __webpack_require__(187);
+ var zrUtil = __webpack_require__(3);
+
+ echarts.registerVisualCoding('component', function (ecModel) {
+ ecModel.eachComponent('visualMap', function (visualMapModel) {
+ processSingleVisualMap(visualMapModel, ecModel);
+ });
+ });
+
+ function processSingleVisualMap(visualMapModel, ecModel) {
+ var visualMappings = visualMapModel.targetVisuals;
+ var visualTypesMap = {};
+ zrUtil.each(['inRange', 'outOfRange'], function (state) {
+ var visualTypes = VisualMapping.prepareVisualTypes(visualMappings[state]);
+ visualTypesMap[state] = visualTypes;
+ });
+
+ visualMapModel.eachTargetSeries(function (seriesModel) {
+ var data = seriesModel.getData();
+ var dimension = visualMapModel.getDataDimension(data);
+ var dataIndex;
+
+ function getVisual(key) {
+ return data.getItemVisual(dataIndex, key);
+ }
+
+ function setVisual(key, value) {
+ data.setItemVisual(dataIndex, key, value);
+ }
+
+ data.each([dimension], function (value, index) {
+ // For performance consideration, do not use curry.
+ dataIndex = index;
+ var valueState = visualMapModel.getValueState(value);
+ var mappings = visualMappings[valueState];
+ var visualTypes = visualTypesMap[valueState];
+ for (var i = 0, len = visualTypes.length; i < len; i++) {
+ var type = visualTypes[i];
+ mappings[type] && mappings[type].applyVisual(value, getVisual, setVisual);
+ }
+ });
+ });
+ }
+
+
+
+
+/***/ },
+/* 305 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+ /**
+ * @file Data zoom model
+ */
+
+
+ var VisualMapModel = __webpack_require__(306);
+ var zrUtil = __webpack_require__(3);
+ var numberUtil = __webpack_require__(7);
+
+ // Constant
+ var DEFAULT_BAR_BOUND = [20, 140];
+
+ var ContinuousModel = VisualMapModel.extend({
+
+ type: 'visualMap.continuous',
+
+ /**
+ * @protected
+ */
+ defaultOption: {
+ handlePosition: 'auto', // 'auto', 'left', 'right', 'top', 'bottom'
+ calculable: false, // 是å¦å€¼åŸŸæ¼«æ¸¸ï¼Œå¯ç”¨åŽæ— è§†splitNumberå’Œpieces,线性æ¸å˜
+ range: [-Infinity, Infinity], // 当å‰é€‰ä¸­èŒƒå›´
+ hoverLink: true,
+ realtime: true,
+ itemWidth: null, // 值域图形宽度
+ itemHeight: null // 值域图形高度
+ },
+
+ /**
+ * @override
+ */
+ doMergeOption: function (newOption, isInit) {
+ ContinuousModel.superApply(this, 'doMergeOption', arguments);
+
+ this.resetTargetSeries(newOption, isInit);
+ this.resetExtent();
+
+ this.resetVisual(function (mappingOption) {
+ mappingOption.mappingMethod = 'linear';
+ });
+
+ this._resetRange();
+ },
+
+ /**
+ * @protected
+ * @override
+ */
+ resetItemSize: function () {
+ VisualMapModel.prototype.resetItemSize.apply(this, arguments);
+
+ var itemSize = this.itemSize;
+
+ this._orient === 'horizontal' && itemSize.reverse();
+
+ (itemSize[0] == null || isNaN(itemSize[0])) && (itemSize[0] = DEFAULT_BAR_BOUND[0]);
+ (itemSize[1] == null || isNaN(itemSize[1])) && (itemSize[1] = DEFAULT_BAR_BOUND[1]);
+ },
+
+ /**
+ * @private
+ */
+ _resetRange: function () {
+ var dataExtent = this.getExtent();
+ var range = this.option.range;
+ if (range[0] > range[1]) {
+ range.reverse();
+ }
+ range[0] = Math.max(range[0], dataExtent[0]);
+ range[1] = Math.min(range[1], dataExtent[1]);
+ },
+
+ /**
+ * @protected
+ * @override
+ */
+ completeVisualOption: function () {
+ VisualMapModel.prototype.completeVisualOption.apply(this, arguments);
+
+ zrUtil.each(this.stateList, function (state) {
+ var symbolSize = this.option.controller[state].symbolSize;
+ if (symbolSize && symbolSize[0] !== symbolSize[1]) {
+ symbolSize[0] = 0; // For good looking.
+ }
+ }, this);
+ },
+
+ /**
+ * @public
+ * @override
+ */
+ setSelected: function (selected) {
+ this.option.range = selected.slice();
+ this._resetRange();
+ },
+
+ /**
+ * @public
+ */
+ getSelected: function () {
+ var dataExtent = this.getExtent();
+
+ var dataInterval = numberUtil.asc(
+ (this.get('range') || []).slice()
+ );
+
+ // Clamp
+ dataInterval[0] > dataExtent[1] && (dataInterval[0] = dataExtent[1]);
+ dataInterval[1] > dataExtent[1] && (dataInterval[1] = dataExtent[1]);
+ dataInterval[0] < dataExtent[0] && (dataInterval[0] = dataExtent[0]);
+ dataInterval[1] < dataExtent[0] && (dataInterval[1] = dataExtent[0]);
+
+ return dataInterval;
+ },
+
+ /**
+ * @public
+ * @override
+ */
+ getValueState: function (value) {
+ var range = this.option.range;
+ var dataExtent = this.getExtent();
+
+ // When range[0] === dataExtent[0], any value larger than dataExtent[0] maps to 'inRange'.
+ // range[1] is processed likewise.
+ return (
+ (range[0] <= dataExtent[0] || range[0] <= value)
+ && (range[1] >= dataExtent[1] || value <= range[1])
+ ) ? 'inRange' : 'outOfRange';
+ }
+
+ });
+
+ module.exports = ContinuousModel;
+
+
+
+/***/ },
+/* 306 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file Data zoom model
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+ var env = __webpack_require__(78);
+ var echarts = __webpack_require__(1);
+ var modelUtil = __webpack_require__(5);
+ var visualDefault = __webpack_require__(307);
+ var VisualMapping = __webpack_require__(187);
+ var mapVisual = VisualMapping.mapVisual;
+ var eachVisual = VisualMapping.eachVisual;
+ var numberUtil = __webpack_require__(7);
+ var isArray = zrUtil.isArray;
+ var each = zrUtil.each;
+ var asc = numberUtil.asc;
+ var linearMap = numberUtil.linearMap;
+
+ var VisualMapModel = echarts.extendComponentModel({
+
+ type: 'visualMap',
+
+ dependencies: ['series'],
+
+ /**
+ * [lowerBound, upperBound]
+ *
+ * @readOnly
+ * @type {Array.<number>}
+ */
+ dataBound: [-Infinity, Infinity],
+
+ /**
+ * @readOnly
+ * @type {Array.<string>}
+ */
+ stateList: ['inRange', 'outOfRange'],
+
+ /**
+ * @readOnly
+ * @type {string|Object}
+ */
+ layoutMode: {type: 'box', ignoreSize: true},
+
+ /**
+ * @protected
+ */
+ defaultOption: {
+ show: true,
+
+ zlevel: 0,
+ z: 4,
+
+ // set min: 0, max: 200, only for campatible with ec2.
+ // In fact min max should not have default value.
+ min: 0, // min value, must specified if pieces is not specified.
+ max: 200, // max value, must specified if pieces is not specified.
+
+ dimension: null,
+ inRange: null, // 'color', 'colorHue', 'colorSaturation', 'colorLightness', 'colorAlpha',
+ // 'symbol', 'symbolSize'
+ outOfRange: null, // 'color', 'colorHue', 'colorSaturation',
+ // 'colorLightness', 'colorAlpha',
+ // 'symbol', 'symbolSize'
+
+ left: 0, // 'center' ¦ 'left' ¦ 'right' ¦ {number} (px)
+ right: null, // The same as left.
+ top: null, // 'top' ¦ 'bottom' ¦ 'center' ¦ {number} (px)
+ bottom: 0, // The same as top.
+
+ itemWidth: null,
+ itemHeight: null,
+ inverse: false,
+ orient: 'vertical', // 'horizontal' ¦ 'vertical'
+
+ seriesIndex: null, // 所控制的series indices,默认所有有value的series.
+ backgroundColor: 'rgba(0,0,0,0)',
+ borderColor: '#ccc', // 值域边框颜色
+ contentColor: '#5793f3',
+ inactiveColor: '#aaa',
+ borderWidth: 0, // 值域边框线宽,å•ä½px,默认为0(无边框)
+ padding: 5, // 值域内边è·ï¼Œå•ä½px,默认å„æ–¹å‘内边è·ä¸º5,
+ // 接å—数组分别设定上å³ä¸‹å·¦è¾¹è·ï¼ŒåŒcss
+ textGap: 10, //
+ precision: 0, // å°æ•°ç²¾åº¦ï¼Œé»˜è®¤ä¸º0,无å°æ•°ç‚¹
+ color: ['#bf444c', '#d88273', '#f6efa6'], //颜色(deprecated,兼容ec2,顺åºåŒpieces,ä¸åŒäºŽinRange/outOfRange)
+
+ formatter: null,
+ text: null, // 文本,如['高', '低'],兼容ec2,text[0]对应高值,text[1]对应低值
+ textStyle: {
+ color: '#333' // 值域文字颜色
+ }
+ },
+
+ /**
+ * @protected
+ */
+ init: function (option, parentModel, ecModel) {
+ /**
+ * @private
+ * @type {boolean}
+ */
+ this._autoSeriesIndex = false;
+
+ /**
+ * @private
+ * @type {Array.<number>}
+ */
+ this._dataExtent;
+
+ /**
+ * @readOnly
+ */
+ this.controllerVisuals = {};
+
+ /**
+ * @readOnly
+ */
+ this.targetVisuals = {};
+
+ /**
+ * @readOnly
+ */
+ this.textStyleModel;
+
+ /**
+ * [width, height]
+ * @readOnly
+ * @type {Array.<number>}
+ */
+ this.itemSize;
+
+ this.mergeDefaultAndTheme(option, ecModel);
+
+ this.doMergeOption({}, true);
+ },
+
+ /**
+ * @public
+ */
+ mergeOption: function (option) {
+ VisualMapModel.superApply(this, 'mergeOption', arguments);
+ this.doMergeOption(option, false);
+ },
+
+ /**
+ * @protected
+ */
+ doMergeOption: function (newOption, isInit) {
+ var thisOption = this.option;
+
+ // Visual attributes merge is not supported, otherwise it
+ // brings overcomplicated merge logic. See #2853.
+ !isInit && replaceVisualOption(thisOption, newOption);
+
+ // FIXME
+ // necessary?
+ // Disable realtime view update if canvas is not supported.
+ if (!env.canvasSupported) {
+ thisOption.realtime = false;
+ }
+
+ this.textStyleModel = this.getModel('textStyle');
+
+ this.resetItemSize();
+
+ this.completeVisualOption();
+ },
+
+ /**
+ * @example
+ * this.formatValueText(someVal); // format single numeric value to text.
+ * this.formatValueText(someVal, true); // format single category value to text.
+ * this.formatValueText([min, max]); // format numeric min-max to text.
+ * this.formatValueText([this.dataBound[0], max]); // using data lower bound.
+ * this.formatValueText([min, this.dataBound[1]]); // using data upper bound.
+ *
+ * @param {number|Array.<number>} value Real value, or this.dataBound[0 or 1].
+ * @param {boolean} [isCategory=false] Only available when value is number.
+ * @return {string}
+ * @protected
+ */
+ formatValueText: function(value, isCategory) {
+ var option = this.option;
+ var precision = option.precision;
+ var dataBound = this.dataBound;
+ var formatter = option.formatter;
+ var isMinMax;
+ var textValue;
+
+ if (zrUtil.isArray(value)) {
+ value = value.slice();
+ isMinMax = true;
+ }
+
+ textValue = isCategory
+ ? value
+ : (isMinMax
+ ? [toFixed(value[0]), toFixed(value[1])]
+ : toFixed(value)
+ );
+
+ if (zrUtil.isString(formatter)) {
+ return formatter
+ .replace('{value}', isMinMax ? textValue[0] : textValue)
+ .replace('{value2}', isMinMax ? textValue[1] : textValue);
+ }
+ else if (zrUtil.isFunction(formatter)) {
+ return isMinMax
+ ? formatter(value[0], value[1])
+ : formatter(value);
+ }
+
+ if (isMinMax) {
+ if (value[0] === dataBound[0]) {
+ return '< ' + textValue[1];
+ }
+ else if (value[1] === dataBound[1]) {
+ return '> ' + textValue[0];
+ }
+ else {
+ return textValue[0] + ' - ' + textValue[1];
+ }
+ }
+ else { // Format single value (includes category case).
+ return textValue;
+ }
+
+ function toFixed(val) {
+ return val === dataBound[0]
+ ? 'min'
+ : val === dataBound[1]
+ ? 'max'
+ : (+val).toFixed(precision);
+ }
+ },
+
+ /**
+ * @protected
+ */
+ resetTargetSeries: function (newOption, isInit) {
+ var thisOption = this.option;
+ var autoSeriesIndex = this._autoSeriesIndex =
+ (isInit ? thisOption : newOption).seriesIndex == null;
+ thisOption.seriesIndex = autoSeriesIndex
+ ? [] : modelUtil.normalizeToArray(thisOption.seriesIndex);
+
+ autoSeriesIndex && this.ecModel.eachSeries(function (seriesModel, index) {
+ var data = seriesModel.getData();
+ // FIXME
+ // åªè€ƒè™‘了list,还没有考虑map等。
+
+ // FIXME
+ // 这里å¯èƒ½åº”该这么判断:data.dimensions中有超出其所属coordSystemçš„é‡ã€‚
+ if (data.type === 'list') {
+ thisOption.seriesIndex.push(index);
+ }
+ });
+ },
+
+ /**
+ * @protected
+ */
+ resetExtent: function () {
+ var thisOption = this.option;
+
+ // Can not calculate data extent by data here.
+ // Because series and data may be modified in processing stage.
+ // So we do not support the feature "auto min/max".
+
+ var extent = asc([thisOption.min, thisOption.max]);
+
+ this._dataExtent = extent;
+ },
+
+ /**
+ * @protected
+ */
+ getDataDimension: function (list) {
+ var optDim = this.option.dimension;
+ return optDim != null
+ ? optDim : list.dimensions.length - 1;
+ },
+
+ /**
+ * @public
+ * @override
+ */
+ getExtent: function () {
+ return this._dataExtent.slice();
+ },
+
+ /**
+ * @protected
+ */
+ resetVisual: function (fillVisualOption) {
+ var dataExtent = this.getExtent();
+
+ doReset.call(this, 'controller', this.controllerVisuals);
+ doReset.call(this, 'target', this.targetVisuals);
+
+ function doReset(baseAttr, visualMappings) {
+ each(this.stateList, function (state) {
+ var mappings = visualMappings[state] || (visualMappings[state] = {});
+ var visaulOption = this.option[baseAttr][state] || {};
+ each(visaulOption, function (visualData, visualType) {
+ if (!VisualMapping.isValidType(visualType)) {
+ return;
+ }
+ var mappingOption = {
+ type: visualType,
+ dataExtent: dataExtent,
+ visual: visualData
+ };
+ fillVisualOption && fillVisualOption.call(this, mappingOption, state);
+ mappings[visualType] = new VisualMapping(mappingOption);
+ }, this);
+ }, this);
+ }
+ },
+
+ /**
+ * @protected
+ */
+ completeVisualOption: function () {
+ var thisOption = this.option;
+ var base = {inRange: thisOption.inRange, outOfRange: thisOption.outOfRange};
+
+ var target = thisOption.target || (thisOption.target = {});
+ var controller = thisOption.controller || (thisOption.controller = {});
+
+ zrUtil.merge(target, base); // Do not override
+ zrUtil.merge(controller, base); // Do not override
+
+ var isCategory = this.isCategory();
+
+ completeSingle.call(this, target);
+ completeSingle.call(this, controller);
+ completeInactive.call(this, target, 'inRange', 'outOfRange');
+ completeInactive.call(this, target, 'outOfRange', 'inRange');
+ completeController.call(this, controller);
+
+ function completeSingle(base) {
+ // Compatible with ec2 dataRange.color.
+ // The mapping order of dataRange.color is: [high value, ..., low value]
+ // whereas inRange.color and outOfRange.color is [low value, ..., high value]
+ // Notice: ec2 has no inverse.
+ if (isArray(thisOption.color)
+ // If there has been inRange: {symbol: ...}, adding color is a mistake.
+ // So adding color only when no inRange defined.
+ && !base.inRange
+ ) {
+ base.inRange = {color: thisOption.color.slice().reverse()};
+ }
+
+ // If using shortcut like: {inRange: 'symbol'}, complete default value.
+ each(this.stateList, function (state) {
+ var visualType = base[state];
+
+ if (zrUtil.isString(visualType)) {
+ var defa = visualDefault.get(visualType, 'active', isCategory);
+ if (defa) {
+ base[state] = {};
+ base[state][visualType] = defa;
+ }
+ else {
+ // Mark as not specified.
+ delete base[state];
+ }
+ }
+ }, this);
+ }
+
+ function completeInactive(base, stateExist, stateAbsent) {
+ var optExist = base[stateExist];
+ var optAbsent = base[stateAbsent];
+
+ if (optExist && !optAbsent) {
+ optAbsent = base[stateAbsent] = {};
+ each(optExist, function (visualData, visualType) {
+ var defa = visualDefault.get(visualType, 'inactive', isCategory);
+ if (VisualMapping.isValidType(visualType) && defa) {
+ optAbsent[visualType] = defa;
+ }
+ });
+ }
+ }
+
+ function completeController(controller) {
+ var symbolExists = (controller.inRange || {}).symbol
+ || (controller.outOfRange || {}).symbol;
+ var symbolSizeExists = (controller.inRange || {}).symbolSize
+ || (controller.outOfRange || {}).symbolSize;
+ var inactiveColor = this.get('inactiveColor');
+
+ each(this.stateList, function (state) {
+
+ var itemSize = this.itemSize;
+ var visuals = controller[state];
+
+ // Set inactive color for controller if no other color attr (like colorAlpha) specified.
+ if (!visuals) {
+ visuals = controller[state] = {
+ color: isCategory ? inactiveColor : [inactiveColor]
+ };
+ }
+
+ // Consistent symbol and symbolSize if not specified.
+ if (!visuals.symbol) {
+ visuals.symbol = symbolExists
+ && zrUtil.clone(symbolExists)
+ || (isCategory ? 'roundRect' : ['roundRect']);
+ }
+ if (!visuals.symbolSize) {
+ visuals.symbolSize = symbolSizeExists
+ && zrUtil.clone(symbolSizeExists)
+ || (isCategory ? itemSize[0] : [itemSize[0], itemSize[0]]);
+ }
+
+ // Filter square and none.
+ visuals.symbol = mapVisual(visuals.symbol, function (symbol) {
+ return (symbol === 'none' || symbol === 'square') ? 'roundRect' : symbol;
+ });
+
+ // Normalize symbolSize
+ var symbolSize = visuals.symbolSize;
+
+ if (symbolSize) {
+ var max = -Infinity;
+ // symbolSize can be object when categories defined.
+ eachVisual(symbolSize, function (value) {
+ value > max && (max = value);
+ });
+ visuals.symbolSize = mapVisual(symbolSize, function (value) {
+ return linearMap(value, [0, max], [0, itemSize[0]], true);
+ });
+ }
+
+ }, this);
+ }
+ },
+
+ /**
+ * @public
+ */
+ eachTargetSeries: function (callback, context) {
+ zrUtil.each(this.option.seriesIndex, function (seriesIndex) {
+ callback.call(context, this.ecModel.getSeriesByIndex(seriesIndex));
+ }, this);
+ },
+
+ /**
+ * @public
+ */
+ isCategory: function () {
+ return !!this.option.categories;
+ },
+
+ /**
+ * @protected
+ */
+ resetItemSize: function () {
+ this.itemSize = [
+ parseFloat(this.get('itemWidth')),
+ parseFloat(this.get('itemHeight'))
+ ];
+ },
+
+ /**
+ * @public
+ * @abstract
+ */
+ setSelected: zrUtil.noop,
+
+ /**
+ * @public
+ * @abstract
+ */
+ getValueState: zrUtil.noop
+
+ });
+
+ function replaceVisualOption(targetOption, sourceOption) {
+ zrUtil.each(
+ ['inRange', 'outOfRange', 'target', 'controller', 'color'],
+ function (key) {
+ if (sourceOption.hasOwnProperty(key)) {
+ targetOption[key] = zrUtil.clone(sourceOption[key]);
+ }
+ else {
+ delete targetOption[key];
+ }
+ }
+ );
+ }
+
+ module.exports = VisualMapModel;
+
+
+
+/***/ },
+/* 307 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file Visual mapping.
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+
+ var visualDefault = {
+
+ /**
+ * @public
+ */
+ get: function (visualType, key, isCategory) {
+ var value = zrUtil.clone(
+ (defaultOption[visualType] || {})[key]
+ );
+
+ return isCategory
+ ? (zrUtil.isArray(value) ? value[value.length - 1] : value)
+ : value;
+ }
+
+ };
+
+ var defaultOption = {
+
+ color: {
+ active: ['#006edd', '#e0ffff'],
+ inactive: ['rgba(0,0,0,0)']
+ },
+
+ colorHue: {
+ active: [0, 360],
+ inactive: [0, 0]
+ },
+
+ colorSaturation: {
+ active: [0.3, 1],
+ inactive: [0, 0]
+ },
+
+ colorLightness: {
+ active: [0.9, 0.5],
+ inactive: [0, 0]
+ },
+
+ colorAlpha: {
+ active: [0.3, 1],
+ inactive: [0, 0]
+ },
+
+ symbol: {
+ active: ['circle', 'roundRect', 'diamond'],
+ inactive: ['none']
+ },
+
+ symbolSize: {
+ active: [10, 50],
+ inactive: [0, 0]
+ }
+ };
+
+ module.exports = visualDefault;
+
+
+
+
+/***/ },
+/* 308 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var VisualMapView = __webpack_require__(309);
+ var graphic = __webpack_require__(42);
+ var zrUtil = __webpack_require__(3);
+ var numberUtil = __webpack_require__(7);
+ var sliderMove = __webpack_require__(294);
+ var linearMap = numberUtil.linearMap;
+ var LinearGradient = __webpack_require__(75);
+ var helper = __webpack_require__(310);
+ var each = zrUtil.each;
+
+ // Notice:
+ // Any "interval" should be by the order of [low, high].
+ // "handle0" (handleIndex === 0) maps to
+ // low data value: this._dataInterval[0] and has low coord.
+ // "handle1" (handleIndex === 1) maps to
+ // high data value: this._dataInterval[1] and has high coord.
+ // The logic of transform is implemented in this._createBarGroup.
+
+ var ContinuousVisualMapView = VisualMapView.extend({
+
+ type: 'visualMap.continuous',
+
+ /**
+ * @override
+ */
+ init: function () {
+
+ VisualMapView.prototype.init.apply(this, arguments);
+
+ /**
+ * @private
+ */
+ this._shapes = {};
+
+ /**
+ * @private
+ */
+ this._dataInterval = [];
+
+ /**
+ * @private
+ */
+ this._handleEnds = [];
+
+ /**
+ * @private
+ */
+ this._orient;
+
+ /**
+ * @private
+ */
+ this._useHandle;
+ },
+
+ /**
+ * @protected
+ * @override
+ */
+ doRender: function (visualMapModel, ecModel, api, payload) {
+ if (!payload || payload.type !== 'selectDataRange' || payload.from !== this.uid) {
+ this._buildView();
+ }
+ else {
+ this._updateView();
+ }
+ },
+
+ /**
+ * @private
+ */
+ _buildView: function () {
+ this.group.removeAll();
+
+ var visualMapModel = this.visualMapModel;
+ var thisGroup = this.group;
+
+ this._orient = visualMapModel.get('orient');
+ this._useHandle = visualMapModel.get('calculable');
+
+ this._resetInterval();
+
+ this._renderBar(thisGroup);
+
+ var dataRangeText = visualMapModel.get('text');
+ this._renderEndsText(thisGroup, dataRangeText, 0);
+ this._renderEndsText(thisGroup, dataRangeText, 1);
+
+ // Do this for background size calculation.
+ this._updateView(true);
+
+ // After updating view, inner shapes is built completely,
+ // and then background can be rendered.
+ this.renderBackground(thisGroup);
+
+ // Real update view
+ this._updateView();
+
+ this.positionGroup(thisGroup);
+ },
+
+ /**
+ * @private
+ */
+ _renderEndsText: function (group, dataRangeText, endsIndex) {
+ if (!dataRangeText) {
+ return;
+ }
+
+ // Compatible with ec2, text[0] map to high value, text[1] map low value.
+ var text = dataRangeText[1 - endsIndex];
+ text = text != null ? text + '' : '';
+
+ var visualMapModel = this.visualMapModel;
+ var textGap = visualMapModel.get('textGap');
+ var itemSize = visualMapModel.itemSize;
+
+ var barGroup = this._shapes.barGroup;
+ var position = this._applyTransform(
+ [
+ itemSize[0] / 2,
+ endsIndex === 0 ? -textGap : itemSize[1] + textGap
+ ],
+ barGroup
+ );
+ var align = this._applyTransform(
+ endsIndex === 0 ? 'bottom' : 'top',
+ barGroup
+ );
+ var orient = this._orient;
+ var textStyleModel = this.visualMapModel.textStyleModel;
+
+ this.group.add(new graphic.Text({
+ style: {
+ x: position[0],
+ y: position[1],
+ textVerticalAlign: orient === 'horizontal' ? 'middle' : align,
+ textAlign: orient === 'horizontal' ? align : 'center',
+ text: text,
+ textFont: textStyleModel.getFont(),
+ fill: textStyleModel.getTextColor()
+ }
+ }));
+ },
+
+ /**
+ * @private
+ */
+ _renderBar: function (targetGroup) {
+ var visualMapModel = this.visualMapModel;
+ var shapes = this._shapes;
+ var itemSize = visualMapModel.itemSize;
+ var orient = this._orient;
+ var useHandle = this._useHandle;
+ var itemAlign = helper.getItemAlign(visualMapModel, this.api, itemSize);
+ var barGroup = shapes.barGroup = this._createBarGroup(itemAlign);
+
+ // Bar
+ barGroup.add(shapes.outOfRange = createPolygon());
+ barGroup.add(shapes.inRange = createPolygon(
+ null,
+ zrUtil.bind(this._modifyHandle, this, 'all'),
+ useHandle ? 'move' : null
+ ));
+
+ var textRect = visualMapModel.textStyleModel.getTextRect('国');
+ var textSize = Math.max(textRect.width, textRect.height);
+
+ // Handle
+ if (useHandle) {
+ shapes.handleGroups = [];
+ shapes.handleThumbs = [];
+ shapes.handleLabels = [];
+ shapes.handleLabelPoints = [];
+
+ this._createHandle(barGroup, 0, itemSize, textSize, orient, itemAlign);
+ this._createHandle(barGroup, 1, itemSize, textSize, orient, itemAlign);
+ }
+
+ // Indicator
+ // FIXME
+
+ targetGroup.add(barGroup);
+ },
+
+ /**
+ * @private
+ */
+ _createHandle: function (barGroup, handleIndex, itemSize, textSize, orient) {
+ var handleGroup = new graphic.Group({position: [itemSize[0], 0]});
+ var handleThumb = createPolygon(
+ createHandlePoints(handleIndex, textSize),
+ zrUtil.bind(this._modifyHandle, this, handleIndex),
+ 'move'
+ );
+ handleGroup.add(handleThumb);
+
+ // For text locating. Text is always horizontal layout
+ // but should not be effected by transform.
+ var handleLabelPoint = {
+ x: orient === 'horizontal'
+ ? textSize / 2
+ : textSize * 1.5,
+ y: orient === 'horizontal'
+ ? (handleIndex === 0 ? -(textSize * 1.5) : (textSize * 1.5))
+ : (handleIndex === 0 ? -textSize / 2 : textSize / 2)
+ };
+
+ var textStyleModel = this.visualMapModel.textStyleModel;
+ var handleLabel = new graphic.Text({
+ silent: true,
+ style: {
+ x: 0, y: 0, text: '',
+ textVerticalAlign: 'middle',
+ textFont: textStyleModel.getFont(),
+ fill: textStyleModel.getTextColor()
+ }
+ });
+
+ this.group.add(handleLabel); // Text do not transform
+
+ var shapes = this._shapes;
+ shapes.handleThumbs[handleIndex] = handleThumb;
+ shapes.handleGroups[handleIndex] = handleGroup;
+ shapes.handleLabelPoints[handleIndex] = handleLabelPoint;
+ shapes.handleLabels[handleIndex] = handleLabel;
+
+ barGroup.add(handleGroup);
+ },
+
+ /**
+ * @private
+ */
+ _modifyHandle: function (handleIndex, dx, dy) {
+ if (!this._useHandle) {
+ return;
+ }
+
+ // Transform dx, dy to bar coordination.
+ var vertex = this._applyTransform([dx, dy], this._shapes.barGroup, true);
+ this._updateInterval(handleIndex, vertex[1]);
+
+ this.api.dispatchAction({
+ type: 'selectDataRange',
+ from: this.uid,
+ visualMapId: this.visualMapModel.id,
+ selected: this._dataInterval.slice()
+ });
+ },
+
+ /**
+ * @private
+ */
+ _resetInterval: function () {
+ var visualMapModel = this.visualMapModel;
+
+ var dataInterval = this._dataInterval = visualMapModel.getSelected();
+ var dataExtent = visualMapModel.getExtent();
+ var sizeExtent = [0, visualMapModel.itemSize[1]];
+
+ this._handleEnds = [
+ linearMap(dataInterval[0], dataExtent, sizeExtent,true),
+ linearMap(dataInterval[1], dataExtent, sizeExtent,true)
+ ];
+ },
+
+ /**
+ * @private
+ * @param {(number|string)} handleIndex 0 or 1 or 'all'
+ * @param {number} dx
+ * @param {number} dy
+ */
+ _updateInterval: function (handleIndex, delta) {
+ delta = delta || 0;
+ var visualMapModel = this.visualMapModel;
+ var handleEnds = this._handleEnds;
+
+ sliderMove(
+ delta,
+ handleEnds,
+ [0, visualMapModel.itemSize[1]],
+ handleIndex === 'all' ? 'rigid' : 'push',
+ handleIndex
+ );
+ var dataExtent = visualMapModel.getExtent();
+ var sizeExtent = [0, visualMapModel.itemSize[1]];
+ // Update data interval.
+ this._dataInterval = [
+ linearMap(handleEnds[0], sizeExtent, dataExtent, true),
+ linearMap(handleEnds[1], sizeExtent, dataExtent, true)
+ ];
+ },
+
+ /**
+ * @private
+ */
+ _updateView: function (forSketch) {
+ var visualMapModel = this.visualMapModel;
+ var dataExtent = visualMapModel.getExtent();
+ var shapes = this._shapes;
+ var dataInterval = this._dataInterval;
+
+ var outOfRangeHandleEnds = [0, visualMapModel.itemSize[1]];
+ var inRangeHandleEnds = forSketch ? outOfRangeHandleEnds : this._handleEnds;
+
+ var visualInRange = this._createBarVisual(
+ dataInterval, dataExtent, inRangeHandleEnds, 'inRange'
+ );
+ var visualOutOfRange = this._createBarVisual(
+ dataExtent, dataExtent, outOfRangeHandleEnds, 'outOfRange'
+ );
+
+ shapes.inRange
+ .setStyle('fill', visualInRange.barColor)
+ .setShape('points', visualInRange.barPoints);
+ shapes.outOfRange
+ .setStyle('fill', visualOutOfRange.barColor)
+ .setShape('points', visualOutOfRange.barPoints);
+
+ this._useHandle && each([0, 1], function (handleIndex) {
+
+ shapes.handleThumbs[handleIndex].setStyle(
+ 'fill', visualInRange.handlesColor[handleIndex]
+ );
+
+ shapes.handleLabels[handleIndex].setStyle({
+ text: visualMapModel.formatValueText(dataInterval[handleIndex]),
+ textAlign: this._applyTransform(
+ this._orient === 'horizontal'
+ ? (handleIndex === 0 ? 'bottom' : 'top')
+ : 'left',
+ shapes.barGroup
+ )
+ });
+
+ }, this);
+
+ this._updateHandlePosition(inRangeHandleEnds);
+ },
+
+ /**
+ * @private
+ */
+ _createBarVisual: function (dataInterval, dataExtent, handleEnds, forceState) {
+ var colorStops = this.getControllerVisual(dataInterval, forceState, 'color').color;
+
+ var symbolSizes = [
+ this.getControllerVisual(dataInterval[0], forceState, 'symbolSize').symbolSize,
+ this.getControllerVisual(dataInterval[1], forceState, 'symbolSize').symbolSize
+ ];
+ var barPoints = this._createBarPoints(handleEnds, symbolSizes);
+
+ return {
+ barColor: new LinearGradient(0, 0, 1, 1, colorStops),
+ barPoints: barPoints,
+ handlesColor: [
+ colorStops[0].color,
+ colorStops[colorStops.length - 1].color
+ ]
+ };
+ },
+
+ /**
+ * @private
+ */
+ _createBarPoints: function (handleEnds, symbolSizes) {
+ var itemSize = this.visualMapModel.itemSize;
+
+ return [
+ [itemSize[0] - symbolSizes[0], handleEnds[0]],
+ [itemSize[0], handleEnds[0]],
+ [itemSize[0], handleEnds[1]],
+ [itemSize[0] - symbolSizes[1], handleEnds[1]]
+ ];
+ },
+
+ /**
+ * @private
+ */
+ _createBarGroup: function (itemAlign) {
+ var orient = this._orient;
+ var inverse = this.visualMapModel.get('inverse');
+
+ return new graphic.Group(
+ (orient === 'horizontal' && !inverse)
+ ? {scale: itemAlign === 'bottom' ? [1, 1] : [-1, 1], rotation: Math.PI / 2}
+ : (orient === 'horizontal' && inverse)
+ ? {scale: itemAlign === 'bottom' ? [-1, 1] : [1, 1], rotation: -Math.PI / 2}
+ : (orient === 'vertical' && !inverse)
+ ? {scale: itemAlign === 'left' ? [1, -1] : [-1, -1]}
+ : {scale: itemAlign === 'left' ? [1, 1] : [-1, 1]}
+ );
+ },
+
+ /**
+ * @private
+ */
+ _updateHandlePosition: function (handleEnds) {
+ if (!this._useHandle) {
+ return;
+ }
+
+ var shapes = this._shapes;
+
+ each([0, 1], function (handleIndex) {
+ var handleGroup = shapes.handleGroups[handleIndex];
+ handleGroup.position[1] = handleEnds[handleIndex];
+
+ // Update handle label position.
+ var labelPoint = shapes.handleLabelPoints[handleIndex];
+ var textPoint = graphic.applyTransform(
+ [labelPoint.x, labelPoint.y],
+ graphic.getTransform(handleGroup, this.group)
+ );
+
+ shapes.handleLabels[handleIndex].setStyle({
+ x: textPoint[0], y: textPoint[1]
+ });
+ }, this);
+ },
+
+ /**
+ * @private
+ */
+ _applyTransform: function (vertex, element, inverse) {
+ var transform = graphic.getTransform(element, this.group);
+
+ return graphic[
+ zrUtil.isArray(vertex)
+ ? 'applyTransform' : 'transformDirection'
+ ](vertex, transform, inverse);
+ }
+
+ });
+
+ function createPolygon(points, onDrift, cursor) {
+ return new graphic.Polygon({
+ shape: {points: points},
+ draggable: !!onDrift,
+ cursor: cursor,
+ drift: onDrift
+ });
+ }
+
+ function createHandlePoints(handleIndex, textSize) {
+ return handleIndex === 0
+ ? [[0, 0], [textSize, 0], [textSize, -textSize]]
+ : [[0, 0], [textSize, 0], [textSize, textSize]];
+ }
+
+ module.exports = ContinuousVisualMapView;
+
+
+
+/***/ },
+/* 309 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var echarts = __webpack_require__(1);
+ var zrUtil = __webpack_require__(3);
+ var graphic = __webpack_require__(42);
+ var formatUtil = __webpack_require__(6);
+ var layout = __webpack_require__(21);
+ var VisualMapping = __webpack_require__(187);
+
+ module.exports = echarts.extendComponentView({
+
+ type: 'visualMap',
+
+ /**
+ * @readOnly
+ * @type {Object}
+ */
+ autoPositionValues: {left: 1, right: 1, top: 1, bottom: 1},
+
+ init: function (ecModel, api) {
+ /**
+ * @readOnly
+ * @type {module:echarts/model/Global}
+ */
+ this.ecModel = ecModel;
+
+ /**
+ * @readOnly
+ * @type {module:echarts/ExtensionAPI}
+ */
+ this.api = api;
+
+ /**
+ * @readOnly
+ * @type {module:echarts/component/visualMap/visualMapModel}
+ */
+ this.visualMapModel;
+
+ /**
+ * @private
+ * @type {Object}
+ */
+ this._updatableShapes = {};
+ },
+
+ /**
+ * @protected
+ */
+ render: function (visualMapModel, ecModel, api, payload) {
+ this.visualMapModel = visualMapModel;
+
+ if (visualMapModel.get('show') === false) {
+ this.group.removeAll();
+ return;
+ }
+
+ this.doRender.apply(this, arguments);
+ },
+
+ /**
+ * @protected
+ */
+ renderBackground: function (group) {
+ var visualMapModel = this.visualMapModel;
+ var padding = formatUtil.normalizeCssArray(visualMapModel.get('padding') || 0);
+ var rect = group.getBoundingRect();
+
+ group.add(new graphic.Rect({
+ z2: -1, // Lay background rect on the lowest layer.
+ silent: true,
+ shape: {
+ x: rect.x - padding[3],
+ y: rect.y - padding[0],
+ width: rect.width + padding[3] + padding[1],
+ height: rect.height + padding[0] + padding[2]
+ },
+ style: {
+ fill: visualMapModel.get('backgroundColor'),
+ stroke: visualMapModel.get('borderColor'),
+ lineWidth: visualMapModel.get('borderWidth')
+ }
+ }));
+ },
+
+ /**
+ * @protected
+ * @param {(number|Array)} targetValue
+ * @param {string=} forceState Specify state, instead of using getValueState method.
+ * @param {string=} visualCluster Specify visual type, defualt all available visualClusters.
+ */
+ getControllerVisual: function (targetValue, forceState, visualCluster) {
+ var visualMapModel = this.visualMapModel;
+ var targetIsArray = zrUtil.isArray(targetValue);
+
+ // targetValue is array when caculate gradient color,
+ // where forceState is required.
+ if (targetIsArray && (!forceState || visualCluster !== 'color')) {
+ throw new Error(targetValue);
+ }
+
+ var mappings = visualMapModel.controllerVisuals[
+ forceState || visualMapModel.getValueState(targetValue)
+ ];
+ var defaultColor = visualMapModel.get('contentColor');
+ var visualObj = {
+ symbol: visualMapModel.get('itemSymbol'),
+ color: targetIsArray
+ ? [{color: defaultColor, offset: 0}, {color: defaultColor, offset: 1}]
+ : defaultColor
+ };
+
+ function getter(key) {
+ return visualObj[key];
+ }
+
+ function setter(key, value) {
+ visualObj[key] = value;
+ }
+
+ var visualTypes = VisualMapping.prepareVisualTypes(mappings);
+
+ zrUtil.each(visualTypes, function (type) {
+ var visualMapping = mappings[type];
+ if (!visualCluster || VisualMapping.isInVisualCluster(type, visualCluster)) {
+ visualMapping && visualMapping.applyVisual(targetValue, getter, setter);
+ }
+ });
+
+ return visualObj;
+ },
+
+ /**
+ * @protected
+ */
+ positionGroup: function (group) {
+ var model = this.visualMapModel;
+ var api = this.api;
+
+ layout.positionGroup(
+ group,
+ model.getBoxLayoutParams(),
+ {width: api.getWidth(), height: api.getHeight()}
+ );
+ },
+
+ /**
+ * @protected
+ * @abstract
+ */
+ doRender: zrUtil.noop
+
+ });
+
+
+/***/ },
+/* 310 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var layout = __webpack_require__(21);
+
+ var helper = {
+
+ /**
+ * @param {module:echarts/component/visualMap/VisualMapModel} visualMapModel\
+ * @param {module:echarts/ExtensionAPI} api
+ * @param {Array.<number>} itemSize always [short, long]
+ * @return {string} 'left' or 'right' or 'top' or 'bottom'
+ */
+ getItemAlign: function (visualMapModel, api, itemSize) {
+ var modelOption = visualMapModel.option;
+ var itemAlign = modelOption.align;
+
+ if (itemAlign != null && itemAlign !== 'auto') {
+ return itemAlign;
+ }
+
+ // Auto decision align.
+ var ecSize = {width: api.getWidth(), height: api.getHeight()};
+ var realIndex = modelOption.orient === 'horizontal' ? 1 : 0;
+
+ var paramsSet = [
+ ['left', 'right', 'width'],
+ ['top', 'bottom', 'height']
+ ];
+ var reals = paramsSet[realIndex];
+ var fakeValue = [0, null, 10];
+
+ var layoutInput = {};
+ for (var i = 0; i < 3; i++) {
+ layoutInput[paramsSet[1 - realIndex][i]] = fakeValue[i];
+ layoutInput[reals[i]] = i === 2 ? itemSize[0] : modelOption[reals[i]];
+ }
+
+ var rParam = [['x', 'width', 3], ['y', 'height', 0]][realIndex];
+ var rect = layout.getLayoutRect(layoutInput, ecSize, modelOption.padding);
+
+ return reals[
+ (rect.margin[rParam[2]] || 0) + rect[rParam[0]] + rect[rParam[1]] * 0.5
+ < ecSize[rParam[1]] * 0.5 ? 0 : 1
+ ];
+ }
+ };
+
+ module.exports = helper;
+
+
+
+/***/ },
+/* 311 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file Data range action
+ */
+
+
+ var echarts = __webpack_require__(1);
+
+ var actionInfo = {
+ type: 'selectDataRange',
+ event: 'dataRangeSelected',
+ // FIXME use updateView appears wrong
+ update: 'update'
+ };
+
+ echarts.registerAction(actionInfo, function (payload, ecModel) {
+
+ ecModel.eachComponent({mainType: 'visualMap', query: payload}, function (model) {
+ model.setSelected(payload.selected);
+ });
+
+ });
+
+
+
+/***/ },
+/* 312 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * DataZoom component entry
+ */
+
+
+ __webpack_require__(1).registerPreprocessor(
+ __webpack_require__(302)
+ );
+
+ __webpack_require__(303);
+ __webpack_require__(304);
+ __webpack_require__(313);
+ __webpack_require__(314);
+ __webpack_require__(311);
+
+
+
+/***/ },
+/* 313 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var VisualMapModel = __webpack_require__(306);
+ var zrUtil = __webpack_require__(3);
+ var VisualMapping = __webpack_require__(187);
+
+ var PiecewiseModel = VisualMapModel.extend({
+
+ type: 'visualMap.piecewise',
+
+ /**
+ * Order Rule:
+ *
+ * option.categories / option.pieces / option.text / option.selected:
+ * If !option.inverse,
+ * Order when vertical: ['top', ..., 'bottom'].
+ * Order when horizontal: ['left', ..., 'right'].
+ * If option.inverse, the meaning of
+ * the order should be reversed.
+ *
+ * this._pieceList:
+ * The order is always [low, ..., high].
+ *
+ * Mapping from location to low-high:
+ * If !option.inverse
+ * When vertical, top is high.
+ * When horizontal, right is high.
+ * If option.inverse, reverse.
+ */
+
+ /**
+ * @protected
+ */
+ defaultOption: {
+ selected: null, // Object. If not specified, means selected.
+ // When pieces and splitNumber: {'0': true, '5': true}
+ // When categories: {'cate1': false, 'cate3': true}
+ // When selected === false, means all unselected.
+ align: 'auto', // 'auto', 'left', 'right'
+ itemWidth: 20, // 值域图形宽度
+ itemHeight: 14, // 值域图形高度
+ itemSymbol: 'roundRect',
+ pieceList: null, // 值顺åºï¼šç”±é«˜åˆ°ä½Ž, item can be:
+ // {min, max, value, color, colorSaturation, colorAlpha, symbol, symbolSize}
+ categories: null, // æè¿° category æ•°æ®ã€‚如:['some1', 'some2', 'some3'],设置åŽï¼Œmin max失效。
+ splitNumber: 5, // 分割段数,默认为5,为0时为线性æ¸å˜ (continous)
+ selectedMode: 'multiple',
+ itemGap: 10 // å„个item之间的间隔,å•ä½px,默认为10,
+ // 横å‘布局时为水平间隔,纵å‘布局时为纵å‘é—´éš”
+ },
+
+ /**
+ * @override
+ */
+ doMergeOption: function (newOption, isInit) {
+ PiecewiseModel.superApply(this, 'doMergeOption', arguments);
+
+ /**
+ * The order is always [low, ..., high].
+ * [{text: string, interval: Array.<number>}, ...]
+ * @private
+ * @type {Array.<Object>}
+ */
+ this._pieceList = [];
+
+ this.resetTargetSeries(newOption, isInit);
+ this.resetExtent();
+
+ /**
+ * 'pieces', 'categories', 'splitNumber'
+ * @type {string}
+ */
+ var mode = this._mode = this._decideMode();
+
+ resetMethods[this._mode].call(this);
+
+ this._resetSelected(newOption, isInit);
+
+ var categories = this.option.categories;
+ this.resetVisual(function (mappingOption, state) {
+ if (mode === 'categories') {
+ mappingOption.mappingMethod = 'category';
+ mappingOption.categories = zrUtil.clone(categories);
+ }
+ else {
+ mappingOption.mappingMethod = 'piecewise';
+ mappingOption.pieceList = zrUtil.map(this._pieceList, function (piece) {
+ var piece = zrUtil.clone(piece);
+ if (state !== 'inRange') {
+ piece.visual = null;
+ }
+ return piece;
+ });
+ }
+ });
+ },
+
+ _resetSelected: function (newOption, isInit) {
+ var thisOption = this.option;
+ var pieceList = this._pieceList;
+
+ // Selected do not merge but all override.
+ var selected = (isInit ? thisOption : newOption).selected || {};
+ thisOption.selected = selected;
+
+ // Consider 'not specified' means true.
+ zrUtil.each(pieceList, function (piece, index) {
+ var key = this.getSelectedMapKey(piece);
+ if (!(key in selected)) {
+ selected[key] = true;
+ }
+ }, this);
+
+ if (thisOption.selectedMode === 'single') {
+ // Ensure there is only one selected.
+ var hasSel = false;
+
+ zrUtil.each(pieceList, function (piece, index) {
+ var key = this.getSelectedMapKey(piece);
+ if (selected[key]) {
+ hasSel
+ ? (selected[key] = false)
+ : (hasSel = true);
+ }
+ }, this);
+ }
+ // thisOption.selectedMode === 'multiple', default: all selected.
+ },
+
+ /**
+ * @public
+ */
+ getSelectedMapKey: function (piece) {
+ return this._mode === 'categories'
+ ? piece.value + '' : piece.index + '';
+ },
+
+ /**
+ * @public
+ */
+ getPieceList: function () {
+ return this._pieceList;
+ },
+
+ /**
+ * @private
+ * @return {string}
+ */
+ _decideMode: function () {
+ var option = this.option;
+
+ return option.pieces && option.pieces.length > 0
+ ? 'pieces'
+ : this.option.categories
+ ? 'categories'
+ : 'splitNumber';
+ },
+
+ /**
+ * @public
+ * @override
+ */
+ setSelected: function (selected) {
+ this.option.selected = zrUtil.clone(selected);
+ },
+
+ /**
+ * @public
+ * @override
+ */
+ getValueState: function (value) {
+ var pieceList = this._pieceList;
+ var index = VisualMapping.findPieceIndex(value, pieceList);
+
+ return index != null
+ ? (this.option.selected[this.getSelectedMapKey(pieceList[index])]
+ ? 'inRange' : 'outOfRange'
+ )
+ : 'outOfRange';
+ }
+
+ });
+
+ /**
+ * Key is this._mode
+ * @type {Object}
+ * @this {module:echarts/component/viusalMap/PiecewiseMode}
+ */
+ var resetMethods = {
+
+ splitNumber: function () {
+ var thisOption = this.option;
+ var precision = thisOption.precision;
+ var dataExtent = this.getExtent();
+ var splitNumber = thisOption.splitNumber;
+ splitNumber = Math.max(parseInt(splitNumber, 10), 1);
+ thisOption.splitNumber = splitNumber;
+
+ var splitStep = (dataExtent[1] - dataExtent[0]) / splitNumber;
+ // Precision auto-adaption
+ while (+splitStep.toFixed(precision) !== splitStep && precision < 5) {
+ precision++;
+ }
+ thisOption.precision = precision;
+ splitStep = +splitStep.toFixed(precision);
+
+ for (var i = 0, curr = dataExtent[0]; i < splitNumber; i++, curr += splitStep) {
+ var max = i === splitNumber - 1 ? dataExtent[1] : (curr + splitStep);
+
+ this._pieceList.push({
+ text: this.formatValueText([curr, max]),
+ index: i,
+ interval: [curr, max]
+ });
+ }
+ },
+
+ categories: function () {
+ var thisOption = this.option;
+ zrUtil.each(thisOption.categories, function (cate) {
+ // FIXME category模å¼ä¹Ÿä½¿ç”¨pieceList,但在visualMapping中ä¸æ˜¯ä½¿ç”¨pieceList。
+ // 是å¦æ”¹ä¸€è‡´ã€‚
+ this._pieceList.push({
+ text: this.formatValueText(cate, true),
+ value: cate
+ });
+ }, this);
+
+ // See "Order Rule".
+ normalizeReverse(thisOption, this._pieceList);
+ },
+
+ pieces: function () {
+ var thisOption = this.option;
+ zrUtil.each(thisOption.pieces, function (pieceListItem, index) {
+
+ if (!zrUtil.isObject(pieceListItem)) {
+ pieceListItem = {value: pieceListItem};
+ }
+
+ var item = {text: '', index: index};
+ var hasLabel;
+
+ if (pieceListItem.label != null) {
+ item.text = pieceListItem.label;
+ hasLabel = true;
+ }
+
+ if (pieceListItem.hasOwnProperty('value')) {
+ item.value = pieceListItem.value;
+
+ if (!hasLabel) {
+ item.text = this.formatValueText(item.value);
+ }
+ }
+ else {
+ var min = pieceListItem.min;
+ var max = pieceListItem.max;
+ min == null && (min = -Infinity);
+ max == null && (max = Infinity);
+ if (min === max) {
+ // Consider: [{min: 5, max: 5, visual: {...}}, {min: 0, max: 5}],
+ // we use value to lift the priority when min === max
+ item.value = min;
+ }
+ item.interval = [min, max];
+
+ if (!hasLabel) {
+ item.text = this.formatValueText([min, max]);
+ }
+ }
+
+ item.visual = VisualMapping.retrieveVisuals(pieceListItem);
+
+ this._pieceList.push(item);
+
+ }, this);
+
+ // See "Order Rule".
+ normalizeReverse(thisOption, this._pieceList);
+ }
+ };
+
+ function normalizeReverse(thisOption, arr) {
+ var inverse = thisOption.inverse;
+ if (thisOption.orient === 'vertical' ? !inverse : inverse) {
+ arr.reverse();
+ }
+ }
+
+ module.exports = PiecewiseModel;
+
+
+
+/***/ },
+/* 314 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var VisualMapView = __webpack_require__(309);
+ var zrUtil = __webpack_require__(3);
+ var graphic = __webpack_require__(42);
+ var symbolCreators = __webpack_require__(100);
+ var layout = __webpack_require__(21);
+ var helper = __webpack_require__(310);
+
+ var PiecewiseVisualMapView = VisualMapView.extend({
+
+ type: 'visualMap.piecewise',
+
+ /**
+ * @protected
+ * @override
+ */
+ doRender: function () {
+ var thisGroup = this.group;
+
+ thisGroup.removeAll();
+
+ var visualMapModel = this.visualMapModel;
+ var textGap = visualMapModel.get('textGap');
+ var textStyleModel = visualMapModel.textStyleModel;
+ var textFont = textStyleModel.getFont();
+ var textFill = textStyleModel.getTextColor();
+ var itemAlign = this._getItemAlign();
+ var itemSize = visualMapModel.itemSize;
+
+ var viewData = this._getViewData();
+ var showLabel = !viewData.endsText;
+ var showEndsText = !showLabel;
+
+ showEndsText && this._renderEndsText(thisGroup, viewData.endsText[0], itemSize);
+
+ zrUtil.each(viewData.pieceList, renderItem, this);
+
+ showEndsText && this._renderEndsText(thisGroup, viewData.endsText[1], itemSize);
+
+ layout.box(
+ visualMapModel.get('orient'), thisGroup, visualMapModel.get('itemGap')
+ );
+
+ this.renderBackground(thisGroup);
+
+ this.positionGroup(thisGroup);
+
+ function renderItem(item) {
+ var itemGroup = new graphic.Group();
+ itemGroup.onclick = zrUtil.bind(this._onItemClick, this, item.piece);
+
+ this._createItemSymbol(itemGroup, item.piece, [0, 0, itemSize[0], itemSize[1]]);
+
+ if (showLabel) {
+ itemGroup.add(new graphic.Text({
+ style: {
+ x: itemAlign === 'right' ? -textGap : itemSize[0] + textGap,
+ y: itemSize[1] / 2,
+ text: item.piece.text,
+ textVerticalAlign: 'middle',
+ textAlign: itemAlign,
+ textFont: textFont,
+ fill: textFill
+ }
+ }));
+ }
+
+ thisGroup.add(itemGroup);
+ }
+ },
+
+ /**
+ * @private
+ */
+ _getItemAlign: function () {
+ var visualMapModel = this.visualMapModel;
+ var modelOption = visualMapModel.option;
+ if (modelOption.orient === 'vertical') {
+ return helper.getItemAlign(
+ visualMapModel, this.api, visualMapModel.itemSize
+ );
+ }
+ else { // horizontal, most case left unless specifying right.
+ var align = modelOption.align;
+ if (!align || align === 'auto') {
+ align = 'left';
+ }
+ return align;
+ }
+ },
+
+ /**
+ * @private
+ */
+ _renderEndsText: function (group, text, itemSize) {
+ if (!text) {
+ return;
+ }
+ var itemGroup = new graphic.Group();
+ var textStyleModel = this.visualMapModel.textStyleModel;
+ itemGroup.add(new graphic.Text({
+ style: {
+ x: itemSize[0] / 2,
+ y: itemSize[1] / 2,
+ textVerticalAlign: 'middle',
+ textAlign: 'center',
+ text: text,
+ textFont: textStyleModel.getFont(),
+ fill: textStyleModel.getTextColor()
+ }
+ }));
+
+ group.add(itemGroup);
+ },
+
+ /**
+ * @private
+ * @return {Object} {peiceList, endsText} The order is the same as screen pixel order.
+ */
+ _getViewData: function () {
+ var visualMapModel = this.visualMapModel;
+
+ var pieceList = zrUtil.map(visualMapModel.getPieceList(), function (piece, index) {
+ return {piece: piece, index: index};
+ });
+ var endsText = visualMapModel.get('text');
+
+ // Consider orient and inverse.
+ var orient = visualMapModel.get('orient');
+ var inverse = visualMapModel.get('inverse');
+
+ // Order of pieceList is always [low, ..., high]
+ if (orient === 'horizontal' ? inverse : !inverse) {
+ pieceList.reverse();
+ }
+ // Origin order of endsText is [high, low]
+ else if (endsText) {
+ endsText = endsText.slice().reverse();
+ }
+
+ return {pieceList: pieceList, endsText: endsText};
+ },
+
+ /**
+ * @private
+ */
+ _createItemSymbol: function (group, piece, shapeParam) {
+ var representValue;
+ if (this.visualMapModel.isCategory()) {
+ representValue = piece.value;
+ }
+ else {
+ if (piece.value != null) {
+ representValue = piece.value;
+ }
+ else {
+ var pieceInterval = piece.interval || [];
+ representValue = (pieceInterval[0] + pieceInterval[1]) / 2;
+ }
+ }
+
+ var visualObj = this.getControllerVisual(representValue);
+
+ group.add(symbolCreators.createSymbol(
+ visualObj.symbol,
+ shapeParam[0], shapeParam[1], shapeParam[2], shapeParam[3],
+ visualObj.color
+ ));
+ },
+
+ /**
+ * @private
+ */
+ _onItemClick: function (piece) {
+ var visualMapModel = this.visualMapModel;
+ var option = visualMapModel.option;
+ var selected = zrUtil.clone(option.selected);
+ var newKey = visualMapModel.getSelectedMapKey(piece);
+
+ if (option.selectedMode === 'single') {
+ selected[newKey] = true;
+ zrUtil.each(selected, function (o, key) {
+ selected[key] = key === newKey;
+ });
+ }
+ else {
+ selected[newKey] = !selected[newKey];
+ }
+
+ this.api.dispatchAction({
+ type: 'selectDataRange',
+ from: this.uid,
+ visualMapId: this.visualMapModel.id,
+ selected: selected
+ });
+ }
+ });
+
+ module.exports = PiecewiseVisualMapView;
+
+
+
+/***/ },
+/* 315 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // HINT Markpoint can't be used too much
+
+
+ __webpack_require__(316);
+ __webpack_require__(317);
+
+ __webpack_require__(1).registerPreprocessor(function (opt) {
+ // Make sure markPoint component is enabled
+ opt.markPoint = opt.markPoint || {};
+ });
+
+
+/***/ },
+/* 316 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+ // Default enable markPoint
+ // var globalDefault = require('../../model/globalDefault');
+ var modelUtil = __webpack_require__(5);
+ // // Force to load markPoint component
+ // globalDefault.markPoint = {};
+
+ var MarkPointModel = __webpack_require__(1).extendComponentModel({
+
+ type: 'markPoint',
+
+ dependencies: ['series', 'grid', 'polar'],
+ /**
+ * @overrite
+ */
+ init: function (option, parentModel, ecModel, extraOpt) {
+ this.mergeDefaultAndTheme(option, ecModel);
+ this.mergeOption(option, ecModel, extraOpt.createdBySelf, true);
+ },
+
+ mergeOption: function (newOpt, ecModel, createdBySelf, isInit) {
+ if (!createdBySelf) {
+ ecModel.eachSeries(function (seriesModel) {
+ var markPointOpt = seriesModel.get('markPoint');
+ var mpModel = seriesModel.markPointModel;
+ if (!markPointOpt || !markPointOpt.data) {
+ seriesModel.markPointModel = null;
+ return;
+ }
+ if (!mpModel) {
+ if (isInit) {
+ // Default label emphasis `position` and `show`
+ modelUtil.defaultEmphasis(
+ markPointOpt.label,
+ ['position', 'show', 'textStyle', 'distance', 'formatter']
+ );
+ }
+ var opt = {
+ // Use the same series index and name
+ seriesIndex: seriesModel.seriesIndex,
+ name: seriesModel.name,
+ createdBySelf: true
+ };
+ mpModel = new MarkPointModel(
+ markPointOpt, this, ecModel, opt
+ );
+ }
+ else {
+ mpModel.mergeOption(markPointOpt, ecModel, true);
+ }
+ seriesModel.markPointModel = mpModel;
+ }, this);
+ }
+ },
+
+ defaultOption: {
+ zlevel: 0,
+ z: 5,
+ symbol: 'pin', // 标注类型
+ symbolSize: 50, // 标注大å°
+ // symbolRotate: null, // 标注旋转控制
+ tooltip: {
+ trigger: 'item'
+ },
+ label: {
+ normal: {
+ show: true,
+ // 标签文本格å¼å™¨ï¼ŒåŒTooltip.formatter,ä¸æ”¯æŒå›žè°ƒ
+ // formatter: null,
+ // å¯é€‰ä¸º'left'|'right'|'top'|'bottom'
+ position: 'inside'
+ // 默认使用全局文本样å¼ï¼Œè¯¦è§TEXTSTYLE
+ // textStyle: null
+ },
+ emphasis: {
+ show: true
+ // 标签文本格å¼å™¨ï¼ŒåŒTooltip.formatter,ä¸æ”¯æŒå›žè°ƒ
+ // formatter: null,
+ // position: 'inside' // 'left'|'right'|'top'|'bottom'
+ // textStyle: null // 默认使用全局文本样å¼ï¼Œè¯¦è§TEXTSTYLE
+ }
+ },
+ itemStyle: {
+ normal: {
+ // color: å„异,
+ // 标注边线颜色,优先于color
+ // borderColor: å„异,
+ // 标注边线线宽,å•ä½px,默认为1
+ borderWidth: 2
+ },
+ emphasis: {
+ // color: å„异
+ }
+ }
+ }
+ });
+
+ module.exports = MarkPointModel;
+
+
+/***/ },
+/* 317 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var SymbolDraw = __webpack_require__(98);
+ var zrUtil = __webpack_require__(3);
+ var formatUtil = __webpack_require__(6);
+ var modelUtil = __webpack_require__(5);
+ var numberUtil = __webpack_require__(7);
+
+ var addCommas = formatUtil.addCommas;
+ var encodeHTML = formatUtil.encodeHTML;
+
+ var List = __webpack_require__(94);
+
+ var markerHelper = __webpack_require__(318);
+
+ function updateMarkerLayout(mpData, seriesModel, api) {
+ var coordSys = seriesModel.coordinateSystem;
+ mpData.each(function (idx) {
+ var itemModel = mpData.getItemModel(idx);
+ var point;
+ var xPx = itemModel.getShallow('x');
+ var yPx = itemModel.getShallow('y');
+ if (xPx != null && yPx != null) {
+ point = [
+ numberUtil.parsePercent(xPx, api.getWidth()),
+ numberUtil.parsePercent(yPx, api.getHeight())
+ ];
+ }
+ // Chart like bar may have there own marker positioning logic
+ else if (seriesModel.getMarkerPosition) {
+ // Use the getMarkerPoisition
+ point = seriesModel.getMarkerPosition(
+ mpData.getValues(mpData.dimensions, idx)
+ );
+ }
+ else if (coordSys) {
+ var x = mpData.get(coordSys.dimensions[0], idx);
+ var y = mpData.get(coordSys.dimensions[1], idx);
+ point = coordSys.dataToPoint([x, y]);
+ }
+
+ mpData.setItemLayout(idx, point);
+ });
+ }
+
+ // FIXME
+ var markPointFormatMixin = {
+ getRawDataArray: function () {
+ return this.option.data;
+ },
+
+ formatTooltip: function (dataIndex) {
+ var data = this.getData();
+ var value = this.getRawValue(dataIndex);
+ var formattedValue = zrUtil.isArray(value)
+ ? zrUtil.map(value, addCommas).join(', ') : addCommas(value);
+ var name = data.getName(dataIndex);
+ return this.name + '<br />'
+ + ((name ? encodeHTML(name) + ' : ' : '') + formattedValue);
+ },
+
+ getData: function () {
+ return this._data;
+ },
+
+ setData: function (data) {
+ this._data = data;
+ }
+ };
+
+ zrUtil.defaults(markPointFormatMixin, modelUtil.dataFormatMixin);
+
+ __webpack_require__(1).extendComponentView({
+
+ type: 'markPoint',
+
+ init: function () {
+ this._symbolDrawMap = {};
+ },
+
+ render: function (markPointModel, ecModel, api) {
+ var symbolDrawMap = this._symbolDrawMap;
+ for (var name in symbolDrawMap) {
+ symbolDrawMap[name].__keep = false;
+ }
+
+ ecModel.eachSeries(function (seriesModel) {
+ var mpModel = seriesModel.markPointModel;
+ mpModel && this._renderSeriesMP(seriesModel, mpModel, api);
+ }, this);
+
+ for (var name in symbolDrawMap) {
+ if (!symbolDrawMap[name].__keep) {
+ symbolDrawMap[name].remove();
+ this.group.remove(symbolDrawMap[name].group);
+ }
+ }
+ },
+
+ updateLayout: function (markPointModel, ecModel, api) {
+ ecModel.eachSeries(function (seriesModel) {
+ var mpModel = seriesModel.markPointModel;
+ if (mpModel) {
+ updateMarkerLayout(mpModel.getData(), seriesModel, api);
+ this._symbolDrawMap[seriesModel.name].updateLayout(mpModel);
+ }
+ }, this);
+ },
+
+ _renderSeriesMP: function (seriesModel, mpModel, api) {
+ var coordSys = seriesModel.coordinateSystem;
+ var seriesName = seriesModel.name;
+ var seriesData = seriesModel.getData();
+
+ var symbolDrawMap = this._symbolDrawMap;
+ var symbolDraw = symbolDrawMap[seriesName];
+ if (!symbolDraw) {
+ symbolDraw = symbolDrawMap[seriesName] = new SymbolDraw();
+ }
+
+ var mpData = createList(coordSys, seriesModel, mpModel);
+
+ // FIXME
+ zrUtil.mixin(mpModel, markPointFormatMixin);
+ mpModel.setData(mpData);
+
+ updateMarkerLayout(mpModel.getData(), seriesModel, api);
+
+ mpData.each(function (idx) {
+ var itemModel = mpData.getItemModel(idx);
+ var symbolSize = itemModel.getShallow('symbolSize');
+ if (typeof symbolSize === 'function') {
+ // FIXME 这里ä¸å…¼å®¹ ECharts 2.x,2.x 貌似å‚数是整个数æ®ï¼Ÿ
+ symbolSize = symbolSize(
+ mpModel.getRawValue(idx), mpModel.getDataParams(idx)
+ );
+ }
+ mpData.setItemVisual(idx, {
+ symbolSize: symbolSize,
+ color: itemModel.get('itemStyle.normal.color')
+ || seriesData.getVisual('color'),
+ symbol: itemModel.getShallow('symbol')
+ });
+ });
+
+ // TODO Text are wrong
+ symbolDraw.updateData(mpData);
+ this.group.add(symbolDraw.group);
+
+ // Set host model for tooltip
+ // FIXME
+ mpData.eachItemGraphicEl(function (el) {
+ el.traverse(function (child) {
+ child.dataModel = mpModel;
+ });
+ });
+
+ symbolDraw.__keep = true;
+ }
+ });
+
+ /**
+ * @inner
+ * @param {module:echarts/coord/*} [coordSys]
+ * @param {module:echarts/model/Series} seriesModel
+ * @param {module:echarts/model/Model} mpModel
+ */
+ function createList(coordSys, seriesModel, mpModel) {
+ var coordDimsInfos;
+ if (coordSys) {
+ coordDimsInfos = zrUtil.map(coordSys && coordSys.dimensions, function (coordDim) {
+ var info = seriesModel.getData().getDimensionInfo(
+ seriesModel.coordDimToDataDim(coordDim)[0]
+ ) || {}; // In map series data don't have lng and lat dimension. Fallback to same with coordSys
+ info.name = coordDim;
+ return info;
+ });
+ }
+ else {
+ coordDimsInfos =[{
+ name: 'value',
+ type: 'float'
+ }];
+ }
+
+ var mpData = new List(coordDimsInfos, mpModel);
+ var dataOpt = zrUtil.map(mpModel.get('data'), zrUtil.curry(
+ markerHelper.dataTransform, seriesModel
+ ));
+ if (coordSys) {
+ dataOpt = zrUtil.filter(
+ dataOpt, zrUtil.curry(markerHelper.dataFilter, coordSys)
+ );
+ }
+
+ mpData.initData(dataOpt, null,
+ coordSys ? markerHelper.dimValueGetter : function (item) {
+ return item.value;
+ }
+ );
+ return mpData;
+ }
+
+
+
+/***/ },
+/* 318 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var numberUtil = __webpack_require__(7);
+ var indexOf = zrUtil.indexOf;
+
+ function getPrecision(data, valueAxisDim, dataIndex) {
+ var precision = -1;
+ do {
+ precision = Math.max(
+ numberUtil.getPrecision(data.get(
+ valueAxisDim, dataIndex
+ )),
+ precision
+ );
+ data = data.stackedOn;
+ } while (data);
+
+ return precision;
+ }
+
+ function markerTypeCalculatorWithExtent(
+ mlType, data, baseDataDim, valueDataDim, baseCoordIndex, valueCoordIndex
+ ) {
+ var coordArr = [];
+ var value = numCalculate(data, valueDataDim, mlType);
+
+ var dataIndex = data.indexOfNearest(valueDataDim, value, true);
+ coordArr[baseCoordIndex] = data.get(baseDataDim, dataIndex, true);
+ coordArr[valueCoordIndex] = data.get(valueDataDim, dataIndex, true);
+
+ var precision = getPrecision(data, valueDataDim, dataIndex);
+ if (precision >= 0) {
+ coordArr[valueCoordIndex] = +coordArr[valueCoordIndex].toFixed(precision);
+ }
+
+ return coordArr;
+ }
+
+ var curry = zrUtil.curry;
+ // TODO Specified percent
+ var markerTypeCalculator = {
+ /**
+ * @method
+ * @param {module:echarts/data/List} data
+ * @param {string} baseAxisDim
+ * @param {string} valueAxisDim
+ */
+ min: curry(markerTypeCalculatorWithExtent, 'min'),
+ /**
+ * @method
+ * @param {module:echarts/data/List} data
+ * @param {string} baseAxisDim
+ * @param {string} valueAxisDim
+ */
+ max: curry(markerTypeCalculatorWithExtent, 'max'),
+ /**
+ * @method
+ * @param {module:echarts/data/List} data
+ * @param {string} baseAxisDim
+ * @param {string} valueAxisDim
+ */
+ average: curry(markerTypeCalculatorWithExtent, 'average')
+ };
+
+ /**
+ * Transform markPoint data item to format used in List by do the following
+ * 1. Calculate statistic like `max`, `min`, `average`
+ * 2. Convert `item.xAxis`, `item.yAxis` to `item.coord` array
+ * @param {module:echarts/model/Series} seriesModel
+ * @param {module:echarts/coord/*} [coordSys]
+ * @param {Object} item
+ * @return {Object}
+ */
+ var dataTransform = function (seriesModel, item) {
+ var data = seriesModel.getData();
+ var coordSys = seriesModel.coordinateSystem;
+
+ // 1. If not specify the position with pixel directly
+ // 2. If `coord` is not a data array. Which uses `xAxis`,
+ // `yAxis` to specify the coord on each dimension
+ if ((isNaN(item.x) || isNaN(item.y))
+ && !zrUtil.isArray(item.coord)
+ && coordSys
+ ) {
+ var axisInfo = getAxisInfo(item, data, coordSys, seriesModel);
+
+ // Clone the option
+ // Transform the properties xAxis, yAxis, radiusAxis, angleAxis, geoCoord to value
+ item = zrUtil.clone(item);
+
+ if (item.type
+ && markerTypeCalculator[item.type]
+ && axisInfo.baseAxis && axisInfo.valueAxis
+ ) {
+ var dims = coordSys.dimensions;
+ var baseCoordIndex = indexOf(dims, axisInfo.baseAxis.dim);
+ var valueCoordIndex = indexOf(dims, axisInfo.valueAxis.dim);
+
+ item.coord = markerTypeCalculator[item.type](
+ data, axisInfo.baseDataDim, axisInfo.valueDataDim,
+ baseCoordIndex, valueCoordIndex
+ );
+ // Force to use the value of calculated value.
+ item.value = item.coord[valueCoordIndex];
+ }
+ else {
+ // FIXME Only has one of xAxis and yAxis.
+ item.coord = [
+ item.xAxis != null ? item.xAxis : item.radiusAxis,
+ item.yAxis != null ? item.yAxis : item.angleAxis
+ ];
+ }
+ }
+ return item;
+ };
+
+ var getAxisInfo = function (item, data, coordSys, seriesModel) {
+ var ret = {};
+
+ if (item.valueIndex != null || item.valueDim != null) {
+ ret.valueDataDim = item.valueIndex != null
+ ? data.getDimension(item.valueIndex) : item.valueDim;
+ ret.valueAxis = coordSys.getAxis(seriesModel.dataDimToCoordDim(ret.valueDataDim));
+ ret.baseAxis = coordSys.getOtherAxis(ret.valueAxis);
+ ret.baseDataDim = seriesModel.coordDimToDataDim(ret.baseAxis.dim)[0];
+ }
+ else {
+ ret.baseAxis = seriesModel.getBaseAxis();
+ ret.valueAxis = coordSys.getOtherAxis(ret.baseAxis);
+ ret.baseDataDim = seriesModel.coordDimToDataDim(ret.baseAxis.dim)[0];
+ ret.valueDataDim = seriesModel.coordDimToDataDim(ret.valueAxis.dim)[0];
+ }
+
+ return ret;
+ };
+
+ /**
+ * Filter data which is out of coordinateSystem range
+ * [dataFilter description]
+ * @param {module:echarts/coord/*} [coordSys]
+ * @param {Object} item
+ * @return {boolean}
+ */
+ var dataFilter = function (coordSys, item) {
+ // Alwalys return true if there is no coordSys
+ return (coordSys && coordSys.containData && item.coord && (item.x == null || item.y == null))
+ ? coordSys.containData(item.coord) : true;
+ };
+
+ var dimValueGetter = function (item, dimName, dataIndex, dimIndex) {
+ // x, y, radius, angle
+ if (dimIndex < 2) {
+ return item.coord && item.coord[dimIndex];
+ }
+ else {
+ return item.value;
+ }
+ };
+
+ var numCalculate = function (data, valueDataDim, mlType) {
+ return mlType === 'average'
+ ? data.getSum(valueDataDim, true) / data.count()
+ : data.getDataExtent(valueDataDim, true)[mlType === 'max' ? 1 : 0];
+ };
+
+ module.exports = {
+ dataTransform: dataTransform,
+ dataFilter: dataFilter,
+ dimValueGetter: dimValueGetter,
+ getAxisInfo: getAxisInfo,
+ numCalculate: numCalculate
+ };
+
+
+/***/ },
+/* 319 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ __webpack_require__(320);
+ __webpack_require__(321);
+
+ __webpack_require__(1).registerPreprocessor(function (opt) {
+ // Make sure markLine component is enabled
+ opt.markLine = opt.markLine || {};
+ });
+
+
+/***/ },
+/* 320 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ // Default enable markLine
+ // var globalDefault = require('../../model/globalDefault');
+ var modelUtil = __webpack_require__(5);
+
+ // // Force to load markLine component
+ // globalDefault.markLine = {};
+
+ var MarkLineModel = __webpack_require__(1).extendComponentModel({
+
+ type: 'markLine',
+
+ dependencies: ['series', 'grid', 'polar'],
+ /**
+ * @overrite
+ */
+ init: function (option, parentModel, ecModel, extraOpt) {
+ this.mergeDefaultAndTheme(option, ecModel);
+ this.mergeOption(option, ecModel, extraOpt.createdBySelf, true);
+ },
+
+ mergeOption: function (newOpt, ecModel, createdBySelf, isInit) {
+ if (!createdBySelf) {
+ ecModel.eachSeries(function (seriesModel) {
+ var markLineOpt = seriesModel.get('markLine');
+ var mlModel = seriesModel.markLineModel;
+ if (!markLineOpt || !markLineOpt.data) {
+ seriesModel.markLineModel = null;
+ return;
+ }
+ if (!mlModel) {
+ if (isInit) {
+ // Default label emphasis `position` and `show`
+ modelUtil.defaultEmphasis(
+ markLineOpt.label,
+ ['position', 'show', 'textStyle', 'distance', 'formatter']
+ );
+ }
+ var opt = {
+ // Use the same series index and name
+ seriesIndex: seriesModel.seriesIndex,
+ name: seriesModel.name,
+ createdBySelf: true
+ };
+ mlModel = new MarkLineModel(
+ markLineOpt, this, ecModel, opt
+ );
+ }
+ else {
+ mlModel.mergeOption(markLineOpt, ecModel, true);
+ }
+ seriesModel.markLineModel = mlModel;
+ }, this);
+ }
+ },
+
+ defaultOption: {
+ zlevel: 0,
+ z: 5,
+ // 标线起始和结æŸçš„symbol介ç»ç±»åž‹ï¼Œå¦‚果都一样,å¯ä»¥ç›´æŽ¥ä¼ string
+ symbol: ['circle', 'arrow'],
+ // 标线起始和结æŸçš„symbol大å°ï¼ŒåŠå®½ï¼ˆåŠå¾„)å‚数,当图形为方å‘或è±å½¢åˆ™æ€»å®½åº¦ä¸ºsymbolSize * 2
+ symbolSize: [8, 16],
+ // 标线起始和结æŸçš„symbol旋转控制
+ //symbolRotate: null,
+ //smooth: false,
+ precision: 2,
+ tooltip: {
+ trigger: 'item'
+ },
+ label: {
+ normal: {
+ show: true,
+ // 标签文本格å¼å™¨ï¼ŒåŒTooltip.formatter,ä¸æ”¯æŒå›žè°ƒ
+ // formatter: null,
+ // å¯é€‰ä¸º 'start'|'end'|'left'|'right'|'top'|'bottom'
+ position: 'end'
+ // 默认使用全局文本样å¼ï¼Œè¯¦è§TEXTSTYLE
+ // textStyle: null
+ },
+ emphasis: {
+ show: true
+ }
+ },
+ lineStyle: {
+ normal: {
+ // color
+ // width
+ type: 'dashed'
+ // shadowColor: 'rgba(0,0,0,0)',
+ // shadowBlur: 0,
+ // shadowOffsetX: 0,
+ // shadowOffsetY: 0
+ },
+ emphasis: {
+ width: 3
+ }
+ },
+ animationEasing: 'linear'
+ }
+ });
+
+ module.exports = MarkLineModel;
+
+
+/***/ },
+/* 321 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var List = __webpack_require__(94);
+ var formatUtil = __webpack_require__(6);
+ var modelUtil = __webpack_require__(5);
+ var numberUtil = __webpack_require__(7);
+
+ var addCommas = formatUtil.addCommas;
+ var encodeHTML = formatUtil.encodeHTML;
+
+ var markerHelper = __webpack_require__(318);
+
+ var LineDraw = __webpack_require__(194);
+
+ var markLineTransform = function (seriesModel, coordSys, mlModel, item) {
+ var data = seriesModel.getData();
+ // Special type markLine like 'min', 'max', 'average'
+ var mlType = item.type;
+
+ if (!zrUtil.isArray(item)
+ && (mlType === 'min' || mlType === 'max' || mlType === 'average')
+ ) {
+ var axisInfo = markerHelper.getAxisInfo(item, data, coordSys, seriesModel);
+
+ var baseAxisKey = axisInfo.baseAxis.dim + 'Axis';
+ var valueAxisKey = axisInfo.valueAxis.dim + 'Axis';
+ var baseScaleExtent = axisInfo.baseAxis.scale.getExtent();
+
+ var mlFrom = zrUtil.clone(item);
+ var mlTo = {};
+
+ mlFrom.type = null;
+
+ // FIXME Polar should use circle
+ mlFrom[baseAxisKey] = baseScaleExtent[0];
+ mlTo[baseAxisKey] = baseScaleExtent[1];
+
+ var value = markerHelper.numCalculate(data, axisInfo.valueDataDim, mlType);
+
+ // Round if axis is cateogry
+ value = axisInfo.valueAxis.coordToData(axisInfo.valueAxis.dataToCoord(value));
+
+ var precision = mlModel.get('precision');
+ if (precision >= 0) {
+ value = +value.toFixed(precision);
+ }
+
+ mlFrom[valueAxisKey] = mlTo[valueAxisKey] = value;
+
+ item = [mlFrom, mlTo, { // Extra option for tooltip and label
+ type: mlType,
+ valueIndex: item.valueIndex,
+ // Force to use the value of calculated value.
+ value: value
+ }];
+ }
+
+ item = [
+ markerHelper.dataTransform(seriesModel, item[0]),
+ markerHelper.dataTransform(seriesModel, item[1]),
+ zrUtil.extend({}, item[2])
+ ];
+
+ // Avoid line data type is extended by from(to) data type
+ item[2].type = item[2].type || '';
+
+ // Merge from option and to option into line option
+ zrUtil.merge(item[2], item[0]);
+ zrUtil.merge(item[2], item[1]);
+
+ return item;
+ };
+
+ function markLineFilter(coordSys, item) {
+ return markerHelper.dataFilter(coordSys, item[0])
+ && markerHelper.dataFilter(coordSys, item[1]);
+ }
+
+ function updateSingleMarkerEndLayout(
+ data, idx, isFrom, mlType, valueIndex, seriesModel, api
+ ) {
+ var coordSys = seriesModel.coordinateSystem;
+ var itemModel = data.getItemModel(idx);
+
+ var point;
+ var xPx = itemModel.get('x');
+ var yPx = itemModel.get('y');
+ if (xPx != null && yPx != null) {
+ point = [
+ numberUtil.parsePercent(xPx, api.getWidth()),
+ numberUtil.parsePercent(yPx, api.getHeight())
+ ];
+ }
+ else {
+ // Chart like bar may have there own marker positioning logic
+ if (seriesModel.getMarkerPosition) {
+ // Use the getMarkerPoisition
+ point = seriesModel.getMarkerPosition(
+ data.getValues(data.dimensions, idx)
+ );
+ }
+ else {
+ var dims = coordSys.dimensions;
+ var x = data.get(dims[0], idx);
+ var y = data.get(dims[1], idx);
+ point = coordSys.dataToPoint([x, y]);
+ }
+ // Expand min, max, average line to the edge of grid
+ // FIXME Glue code
+ if (mlType && coordSys.type === 'cartesian2d') {
+ var mlOnAxis = valueIndex != null
+ ? coordSys.getAxis(valueIndex === 1 ? 'x' : 'y')
+ : coordSys.getAxesByScale('ordinal')[0];
+ if (mlOnAxis && mlOnAxis.onBand) {
+ point[mlOnAxis.dim === 'x' ? 0 : 1] =
+ mlOnAxis.toGlobalCoord(mlOnAxis.getExtent()[isFrom ? 0 : 1]);
+ }
+ }
+ }
+
+ data.setItemLayout(idx, point);
+ }
+
+ var markLineFormatMixin = {
+ formatTooltip: function (dataIndex) {
+ var data = this._data;
+ var value = this.getRawValue(dataIndex);
+ var formattedValue = zrUtil.isArray(value)
+ ? zrUtil.map(value, addCommas).join(', ') : addCommas(value);
+ var name = data.getName(dataIndex);
+ return this.name + '<br />'
+ + ((name ? encodeHTML(name) + ' : ' : '') + formattedValue);
+ },
+
+ getRawDataArray: function () {
+ return this.option.data;
+ },
+
+ getData: function () {
+ return this._data;
+ },
+
+ setData: function (data) {
+ this._data = data;
+ }
+ };
+
+ zrUtil.defaults(markLineFormatMixin, modelUtil.dataFormatMixin);
+
+ __webpack_require__(1).extendComponentView({
+
+ type: 'markLine',
+
+ init: function () {
+ /**
+ * Markline grouped by series
+ * @private
+ * @type {Object}
+ */
+ this._markLineMap = {};
+ },
+
+ render: function (markLineModel, ecModel, api) {
+ var lineDrawMap = this._markLineMap;
+ for (var name in lineDrawMap) {
+ lineDrawMap[name].__keep = false;
+ }
+
+ ecModel.eachSeries(function (seriesModel) {
+ var mlModel = seriesModel.markLineModel;
+ mlModel && this._renderSeriesML(seriesModel, mlModel, ecModel, api);
+ }, this);
+
+ for (var name in lineDrawMap) {
+ if (!lineDrawMap[name].__keep) {
+ this.group.remove(lineDrawMap[name].group);
+ }
+ }
+ },
+
+ updateLayout: function (markLineModel, ecModel, api) {
+ ecModel.eachSeries(function (seriesModel) {
+ var mlModel = seriesModel.markLineModel;
+ if (mlModel) {
+ var mlData = mlModel.getData();
+ var fromData = mlModel.__from;
+ var toData = mlModel.__to;
+ // Update visual and layout of from symbol and to symbol
+ fromData.each(function (idx) {
+ var lineModel = mlData.getItemModel(idx);
+ var mlType = lineModel.get('type');
+ var valueIndex = lineModel.get('valueIndex');
+ updateSingleMarkerEndLayout(fromData, idx, true, mlType, valueIndex, seriesModel, api);
+ updateSingleMarkerEndLayout(toData, idx, false, mlType, valueIndex, seriesModel, api);
+ });
+ // Update layout of line
+ mlData.each(function (idx) {
+ mlData.setItemLayout(idx, [
+ fromData.getItemLayout(idx),
+ toData.getItemLayout(idx)
+ ]);
+ });
+
+ this._markLineMap[seriesModel.name].updateLayout();
+ }
+ }, this);
+ },
+
+ _renderSeriesML: function (seriesModel, mlModel, ecModel, api) {
+ var coordSys = seriesModel.coordinateSystem;
+ var seriesName = seriesModel.name;
+ var seriesData = seriesModel.getData();
+
+ var lineDrawMap = this._markLineMap;
+ var lineDraw = lineDrawMap[seriesName];
+ if (!lineDraw) {
+ lineDraw = lineDrawMap[seriesName] = new LineDraw();
+ }
+ this.group.add(lineDraw.group);
+
+ var mlData = createList(coordSys, seriesModel, mlModel);
+
+ var fromData = mlData.from;
+ var toData = mlData.to;
+ var lineData = mlData.line;
+
+ mlModel.__from = fromData;
+ mlModel.__to = toData;
+ // Line data for tooltip and formatter
+ zrUtil.extend(mlModel, markLineFormatMixin);
+ mlModel.setData(lineData);
+
+ var symbolType = mlModel.get('symbol');
+ var symbolSize = mlModel.get('symbolSize');
+ if (!zrUtil.isArray(symbolType)) {
+ symbolType = [symbolType, symbolType];
+ }
+ if (typeof symbolSize === 'number') {
+ symbolSize = [symbolSize, symbolSize];
+ }
+
+ // Update visual and layout of from symbol and to symbol
+ mlData.from.each(function (idx) {
+ var lineModel = lineData.getItemModel(idx);
+ var mlType = lineModel.get('type');
+ var valueIndex = lineModel.get('valueIndex');
+ updateDataVisualAndLayout(fromData, idx, true, mlType, valueIndex);
+ updateDataVisualAndLayout(toData, idx, false, mlType, valueIndex);
+ });
+
+ // Update visual and layout of line
+ lineData.each(function (idx) {
+ var lineColor = lineData.getItemModel(idx).get('lineStyle.normal.color');
+ lineData.setItemVisual(idx, {
+ color: lineColor || fromData.getItemVisual(idx, 'color')
+ });
+ lineData.setItemLayout(idx, [
+ fromData.getItemLayout(idx),
+ toData.getItemLayout(idx)
+ ]);
+ });
+
+ lineDraw.updateData(lineData, fromData, toData);
+
+ // Set host model for tooltip
+ // FIXME
+ mlData.line.eachItemGraphicEl(function (el, idx) {
+ el.traverse(function (child) {
+ child.dataModel = mlModel;
+ });
+ });
+
+ function updateDataVisualAndLayout(data, idx, isFrom, mlType, valueIndex) {
+ var itemModel = data.getItemModel(idx);
+
+ updateSingleMarkerEndLayout(
+ data, idx, isFrom, mlType, valueIndex, seriesModel, api
+ );
+
+ data.setItemVisual(idx, {
+ symbolSize: itemModel.get('symbolSize')
+ || symbolSize[isFrom ? 0 : 1],
+ symbol: itemModel.get('symbol', true)
+ || symbolType[isFrom ? 0 : 1],
+ color: itemModel.get('itemStyle.normal.color')
+ || seriesData.getVisual('color')
+ });
+ }
+
+ lineDraw.__keep = true;
+ }
+ });
+
+ /**
+ * @inner
+ * @param {module:echarts/coord/*} coordSys
+ * @param {module:echarts/model/Series} seriesModel
+ * @param {module:echarts/model/Model} mpModel
+ */
+ function createList(coordSys, seriesModel, mlModel) {
+
+ var coordDimsInfos;
+ if (coordSys) {
+ coordDimsInfos = zrUtil.map(coordSys && coordSys.dimensions, function (coordDim) {
+ var info = seriesModel.getData().getDimensionInfo(
+ seriesModel.coordDimToDataDim(coordDim)[0]
+ ) || {}; // In map series data don't have lng and lat dimension. Fallback to same with coordSys
+ info.name = coordDim;
+ return info;
+ });
+ }
+ else {
+ coordDimsInfos =[{
+ name: 'value',
+ type: 'float'
+ }];
+ }
+
+ var fromData = new List(coordDimsInfos, mlModel);
+ var toData = new List(coordDimsInfos, mlModel);
+ // No dimensions
+ var lineData = new List([], mlModel);
+
+ var optData = zrUtil.map(mlModel.get('data'), zrUtil.curry(
+ markLineTransform, seriesModel, coordSys, mlModel
+ ));
+ if (coordSys) {
+ optData = zrUtil.filter(
+ optData, zrUtil.curry(markLineFilter, coordSys)
+ );
+ }
+ var dimValueGetter = coordSys ? markerHelper.dimValueGetter : function (item) {
+ return item.value;
+ };
+ fromData.initData(
+ zrUtil.map(optData, function (item) { return item[0]; }),
+ null, dimValueGetter
+ );
+ toData.initData(
+ zrUtil.map(optData, function (item) { return item[1]; }),
+ null, dimValueGetter
+ );
+ lineData.initData(
+ zrUtil.map(optData, function (item) { return item[2]; })
+ );
+ return {
+ from: fromData,
+ to: toData,
+ line: lineData
+ };
+ }
+
+
+/***/ },
+/* 322 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * DataZoom component entry
+ */
+
+
+ var echarts = __webpack_require__(1);
+
+ echarts.registerPreprocessor(__webpack_require__(323));
+
+ __webpack_require__(324);
+ __webpack_require__(325);
+ __webpack_require__(326);
+ __webpack_require__(328);
+
+
+
+/***/ },
+/* 323 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file Timeline preprocessor
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+
+ module.exports = function (option) {
+ var timelineOpt = option && option.timeline;
+
+ if (!zrUtil.isArray(timelineOpt)) {
+ timelineOpt = timelineOpt ? [timelineOpt] : [];
+ }
+
+ zrUtil.each(timelineOpt, function (opt) {
+ if (!opt) {
+ return;
+ }
+
+ compatibleEC2(opt);
+ });
+ };
+
+ function compatibleEC2(opt) {
+ var type = opt.type;
+
+ var ec2Types = {'number': 'value', 'time': 'time'};
+
+ // Compatible with ec2
+ if (ec2Types[type]) {
+ opt.axisType = ec2Types[type];
+ delete opt.type;
+ }
+
+ transferItem(opt);
+
+ if (has(opt, 'controlPosition')) {
+ var controlStyle = opt.controlStyle || (opt.controlStyle = {});
+ if (!has(controlStyle, 'position')) {
+ controlStyle.position = opt.controlPosition;
+ }
+ if (controlStyle.position === 'none' && !has(controlStyle, 'show')) {
+ controlStyle.show = false;
+ delete controlStyle.position;
+ }
+ delete opt.controlPosition;
+ }
+
+ zrUtil.each(opt.data || [], function (dataItem) {
+ if (zrUtil.isObject(dataItem) && !zrUtil.isArray(dataItem)) {
+ if (!has(dataItem, 'value') && has(dataItem, 'name')) {
+ // In ec2, using name as value.
+ dataItem.value = dataItem.name;
+ }
+ transferItem(dataItem);
+ }
+ });
+ }
+
+ function transferItem(opt) {
+ var itemStyle = opt.itemStyle || (opt.itemStyle = {});
+
+ var itemStyleEmphasis = itemStyle.emphasis || (itemStyle.emphasis = {});
+
+ // Transfer label out
+ var label = opt.label || (opt.label || {});
+ var labelNormal = label.normal || (label.normal = {});
+ var excludeLabelAttr = {normal: 1, emphasis: 1};
+
+ zrUtil.each(label, function (value, name) {
+ if (!excludeLabelAttr[name] && !has(labelNormal, name)) {
+ labelNormal[name] = value;
+ }
+ });
+
+ if (itemStyleEmphasis.label && !has(label, 'emphasis')) {
+ label.emphasis = itemStyleEmphasis.label;
+ delete itemStyleEmphasis.label;
+ }
+ }
+
+ function has(obj, attr) {
+ return obj.hasOwnProperty(attr);
+ }
+
+
+
+/***/ },
+/* 324 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ __webpack_require__(19).registerSubTypeDefaulter('timeline', function () {
+ // Only slider now.
+ return 'slider';
+ });
+
+
+
+/***/ },
+/* 325 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file Timeilne action
+ */
+
+
+ var echarts = __webpack_require__(1);
+
+ echarts.registerAction(
+
+ {type: 'timelineChange', event: 'timelineChanged', update: 'prepareAndUpdate'},
+
+ function (payload, ecModel) {
+
+ var timelineModel = ecModel.getComponent('timeline');
+ if (timelineModel && payload.currentIndex != null) {
+ timelineModel.setCurrentIndex(payload.currentIndex);
+
+ if (!timelineModel.get('loop', true) && timelineModel.isIndexMax()) {
+ timelineModel.setPlayState(false);
+ }
+ }
+
+ ecModel.resetOption('timeline');
+ }
+ );
+
+ echarts.registerAction(
+
+ {type: 'timelinePlayChange', event: 'timelinePlayChanged', update: 'update'},
+
+ function (payload, ecModel) {
+ var timelineModel = ecModel.getComponent('timeline');
+ if (timelineModel && payload.playState != null) {
+ timelineModel.setPlayState(payload.playState);
+ }
+ }
+ );
+
+
+
+/***/ },
+/* 326 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file Silder timeline model
+ */
+
+
+ var TimelineModel = __webpack_require__(327);
+
+ module.exports = TimelineModel.extend({
+
+ type: 'timeline.slider',
+
+ /**
+ * @protected
+ */
+ defaultOption: {
+
+ backgroundColor: 'rgba(0,0,0,0)', // 时间轴背景颜色
+ borderColor: '#ccc', // 时间轴边框颜色
+ borderWidth: 0, // 时间轴边框线宽,å•ä½px,默认为0(无边框)
+
+ orient: 'horizontal', // 'vertical'
+ inverse: false,
+
+ tooltip: { // boolean or Object
+ trigger: 'item' // data item may also have tootip attr.
+ },
+
+ symbol: 'emptyCircle',
+ symbolSize: 10,
+
+ lineStyle: {
+ show: true,
+ width: 2,
+ color: '#304654'
+ },
+ label: { // 文本标签
+ position: 'auto', // auto left right top bottom
+ // When using number, label position is not
+ // restricted by viewRect.
+ // positive: right/bottom, negative: left/top
+ normal: {
+ show: true,
+ interval: 'auto',
+ rotate: 0,
+ // formatter: null,
+ textStyle: { // 其余属性默认使用全局文本样å¼ï¼Œè¯¦è§TEXTSTYLE
+ color: '#304654'
+ }
+ },
+ emphasis: {
+ show: true,
+ textStyle: { // 其余属性默认使用全局文本样å¼ï¼Œè¯¦è§TEXTSTYLE
+ color: '#c23531'
+ }
+ }
+ },
+ itemStyle: {
+ normal: {
+ color: '#304654',
+ borderWidth: 1
+ },
+ emphasis: {
+ color: '#c23531'
+ }
+ },
+
+ checkpointStyle: {
+ symbol: 'circle',
+ symbolSize: 13,
+ color: '#c23531',
+ borderWidth: 5,
+ borderColor: 'rgba(194,53,49, 0.5)',
+ animation: true,
+ animationDuration: 300,
+ animationEasing: 'quinticInOut'
+ },
+
+ controlStyle: {
+ show: true,
+ showPlayBtn: true,
+ showPrevBtn: true,
+ showNextBtn: true,
+ itemSize: 22,
+ itemGap: 12,
+ position: 'left', // 'left' 'right' 'top' 'bottom'
+ playIcon: 'path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z', // jshint ignore:line
+ stopIcon: 'path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z', // jshint ignore:line
+ nextIcon: 'path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z', // jshint ignore:line
+ prevIcon: 'path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z', // jshint ignore:line
+ normal: {
+ color: '#304654',
+ borderColor: '#304654',
+ borderWidth: 1
+ },
+ emphasis: {
+ color: '#c23531',
+ borderColor: '#c23531',
+ borderWidth: 2
+ }
+ },
+ data: []
+ }
+
+ });
+
+
+
+/***/ },
+/* 327 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file Timeline model
+ */
+
+
+ var ComponentModel = __webpack_require__(19);
+ var List = __webpack_require__(94);
+ var zrUtil = __webpack_require__(3);
+ var modelUtil = __webpack_require__(5);
+
+ var TimelineModel = ComponentModel.extend({
+
+ type: 'timeline',
+
+ layoutMode: 'box',
+
+ /**
+ * @protected
+ */
+ defaultOption: {
+
+ zlevel: 0, // 一级层å 
+ z: 4, // 二级层å 
+ show: true,
+
+ axisType: 'time', // 模å¼æ˜¯æ—¶é—´ç±»åž‹ï¼Œæ”¯æŒ value, category
+
+ realtime: true,
+
+ left: '20%',
+ top: null,
+ right: '20%',
+ bottom: 0,
+ width: null,
+ height: 40,
+ padding: 5,
+
+ controlPosition: 'left', // 'left' 'right' 'top' 'bottom' 'none'
+ autoPlay: false,
+ rewind: false, // åå‘播放
+ loop: true,
+ playInterval: 2000, // 播放时间间隔,å•ä½ms
+
+ currentIndex: 0,
+
+ itemStyle: {
+ normal: {},
+ emphasis: {}
+ },
+ label: {
+ normal: {
+ textStyle: {
+ color: '#000'
+ }
+ },
+ emphasis: {}
+ },
+
+ data: []
+ },
+
+ /**
+ * @override
+ */
+ init: function (option, parentModel, ecModel) {
+
+ /**
+ * @private
+ * @type {module:echarts/data/List}
+ */
+ this._data;
+
+ /**
+ * @private
+ * @type {Array.<string>}
+ */
+ this._names;
+
+ this.mergeDefaultAndTheme(option, ecModel);
+ this._initData();
+ },
+
+ /**
+ * @override
+ */
+ mergeOption: function (option) {
+ TimelineModel.superApply(this, 'mergeOption', arguments);
+ this._initData();
+ },
+
+ /**
+ * @param {number} [currentIndex]
+ */
+ setCurrentIndex: function (currentIndex) {
+ if (currentIndex == null) {
+ currentIndex = this.option.currentIndex;
+ }
+ var count = this._data.count();
+
+ if (this.option.loop) {
+ currentIndex = (currentIndex % count + count) % count;
+ }
+ else {
+ currentIndex >= count && (currentIndex = count - 1);
+ currentIndex < 0 && (currentIndex = 0);
+ }
+
+ this.option.currentIndex = currentIndex;
+ },
+
+ /**
+ * @return {number} currentIndex
+ */
+ getCurrentIndex: function () {
+ return this.option.currentIndex;
+ },
+
+ /**
+ * @return {boolean}
+ */
+ isIndexMax: function () {
+ return this.getCurrentIndex() >= this._data.count() - 1;
+ },
+
+ /**
+ * @param {boolean} state true: play, false: stop
+ */
+ setPlayState: function (state) {
+ this.option.autoPlay = !!state;
+ },
+
+ /**
+ * @return {boolean} true: play, false: stop
+ */
+ getPlayState: function () {
+ return !!this.option.autoPlay;
+ },
+
+ /**
+ * @private
+ */
+ _initData: function () {
+ var thisOption = this.option;
+ var dataArr = thisOption.data || [];
+ var axisType = thisOption.axisType;
+ var names = this._names = [];
+
+ if (axisType === 'category') {
+ var idxArr = [];
+ zrUtil.each(dataArr, function (item, index) {
+ var value = modelUtil.getDataItemValue(item);
+ var newItem;
+
+ if (zrUtil.isObject(item)) {
+ newItem = zrUtil.clone(item);
+ newItem.value = index;
+ }
+ else {
+ newItem = index;
+ }
+
+ idxArr.push(newItem);
+
+ if (!zrUtil.isString(value) && (value == null || isNaN(value))) {
+ value = '';
+ }
+
+ names.push(value + '');
+ });
+ dataArr = idxArr;
+ }
+
+ var dimType = ({category: 'ordinal', time: 'time'})[axisType] || 'number';
+
+ var data = this._data = new List([{name: 'value', type: dimType}], this);
+
+ data.initData(dataArr, names);
+ },
+
+ getData: function () {
+ return this._data;
+ },
+
+ /**
+ * @public
+ * @return {Array.<string>} categoreis
+ */
+ getCategories: function () {
+ if (this.get('axisType') === 'category') {
+ return this._names.slice();
+ }
+ }
+
+ });
+
+ module.exports = TimelineModel;
+
+
+/***/ },
+/* 328 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file Silder timeline view
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+ var graphic = __webpack_require__(42);
+ var layout = __webpack_require__(21);
+ var TimelineView = __webpack_require__(329);
+ var TimelineAxis = __webpack_require__(330);
+ var symbolUtil = __webpack_require__(100);
+ var axisHelper = __webpack_require__(108);
+ var BoundingRect = __webpack_require__(15);
+ var matrix = __webpack_require__(17);
+ var numberUtil = __webpack_require__(7);
+ var modelUtil = __webpack_require__(5);
+ var formatUtil = __webpack_require__(6);
+ var encodeHTML = formatUtil.encodeHTML;
+
+ var bind = zrUtil.bind;
+ var each = zrUtil.each;
+
+ var PI = Math.PI;
+
+ module.exports = TimelineView.extend({
+
+ type: 'timeline.slider',
+
+ init: function (ecModel, api) {
+
+ this.api = api;
+
+ /**
+ * @private
+ * @type {module:echarts/component/timeline/TimelineAxis}
+ */
+ this._axis;
+
+ /**
+ * @private
+ * @type {module:zrender/core/BoundingRect}
+ */
+ this._viewRect;
+
+ /**
+ * @type {number}
+ */
+ this._timer;
+
+ /**
+ * @type {module:zrende/Element}
+ */
+ this._currentPointer;
+
+ /**
+ * @type {module:zrender/container/Group}
+ */
+ this._mainGroup;
+
+ /**
+ * @type {module:zrender/container/Group}
+ */
+ this._labelGroup;
+ },
+
+ /**
+ * @override
+ */
+ render: function (timelineModel, ecModel, api, payload) {
+ this.model = timelineModel;
+ this.api = api;
+ this.ecModel = ecModel;
+
+ this.group.removeAll();
+
+ if (timelineModel.get('show', true)) {
+
+ var layoutInfo = this._layout(timelineModel, api);
+ var mainGroup = this._createGroup('mainGroup');
+ var labelGroup = this._createGroup('labelGroup');
+
+ /**
+ * @private
+ * @type {module:echarts/component/timeline/TimelineAxis}
+ */
+ var axis = this._axis = this._createAxis(layoutInfo, timelineModel);
+
+ each(
+ ['AxisLine', 'AxisTick', 'Control', 'CurrentPointer'],
+ function (name) {
+ this['_render' + name](layoutInfo, mainGroup, axis, timelineModel);
+ },
+ this
+ );
+
+ this._renderAxisLabel(layoutInfo, labelGroup, axis, timelineModel);
+
+ this._position(layoutInfo, timelineModel);
+ }
+
+ this._doPlayStop();
+ },
+
+ /**
+ * @override
+ */
+ remove: function () {
+ this._clearTimer();
+ this.group.removeAll();
+ },
+
+ /**
+ * @override
+ */
+ dispose: function () {
+ this._clearTimer();
+ },
+
+ _layout: function (timelineModel, api) {
+ var labelPosOpt = timelineModel.get('label.normal.position');
+ var orient = timelineModel.get('orient');
+ var viewRect = getViewRect(timelineModel, api);
+ // Auto label offset.
+ if (labelPosOpt == null || labelPosOpt === 'auto') {
+ labelPosOpt = orient === 'horizontal'
+ ? ((viewRect.y + viewRect.height / 2) < api.getHeight() / 2 ? '-' : '+')
+ : ((viewRect.x + viewRect.width / 2) < api.getWidth() / 2 ? '+' : '-');
+ }
+ else if (isNaN(labelPosOpt)) {
+ labelPosOpt = ({
+ horizontal: {top: '-', bottom: '+'},
+ vertical: {left: '-', right: '+'}
+ })[orient][labelPosOpt];
+ }
+
+ // FIXME
+ // 暂没有实现用户传入
+ // var labelAlign = timelineModel.get('label.normal.textStyle.align');
+ // var labelBaseline = timelineModel.get('label.normal.textStyle.baseline');
+ var labelAlignMap = {
+ horizontal: 'center',
+ vertical: (labelPosOpt >= 0 || labelPosOpt === '+') ? 'left' : 'right'
+ };
+
+ var labelBaselineMap = {
+ horizontal: (labelPosOpt >= 0 || labelPosOpt === '+') ? 'top' : 'bottom',
+ vertical: 'middle'
+ };
+ var rotationMap = {
+ horizontal: 0,
+ vertical: PI / 2
+ };
+
+ // Position
+ var mainLength = orient === 'vertical' ? viewRect.height : viewRect.width;
+
+ var controlModel = timelineModel.getModel('controlStyle');
+ var showControl = controlModel.get('show');
+ var controlSize = showControl ? controlModel.get('itemSize') : 0;
+ var controlGap = showControl ? controlModel.get('itemGap') : 0;
+ var sizePlusGap = controlSize + controlGap;
+
+ // Special label rotate.
+ var labelRotation = timelineModel.get('label.normal.rotate') || 0;
+ labelRotation = labelRotation * PI / 180; // To radian.
+
+ var playPosition;
+ var prevBtnPosition;
+ var nextBtnPosition;
+ var axisExtent;
+ var controlPosition = controlModel.get('position', true);
+ var showControl = controlModel.get('show', true);
+ var showPlayBtn = showControl && controlModel.get('showPlayBtn', true);
+ var showPrevBtn = showControl && controlModel.get('showPrevBtn', true);
+ var showNextBtn = showControl && controlModel.get('showNextBtn', true);
+ var xLeft = 0;
+ var xRight = mainLength;
+
+ // position[0] means left, position[1] means middle.
+ if (controlPosition === 'left' || controlPosition === 'bottom') {
+ showPlayBtn && (playPosition = [0, 0], xLeft += sizePlusGap);
+ showPrevBtn && (prevBtnPosition = [xLeft, 0], xLeft += sizePlusGap);
+ showNextBtn && (nextBtnPosition = [xRight - controlSize, 0], xRight -= sizePlusGap);
+ }
+ else { // 'top' 'right'
+ showPlayBtn && (playPosition = [xRight - controlSize, 0], xRight -= sizePlusGap);
+ showPrevBtn && (prevBtnPosition = [0, 0], xLeft += sizePlusGap);
+ showNextBtn && (nextBtnPosition = [xRight - controlSize, 0], xRight -= sizePlusGap);
+ }
+ axisExtent = [xLeft, xRight];
+
+ if (timelineModel.get('inverse')) {
+ axisExtent.reverse();
+ }
+
+ return {
+ viewRect: viewRect,
+ mainLength: mainLength,
+ orient: orient,
+
+ rotation: rotationMap[orient],
+ labelRotation: labelRotation,
+ labelPosOpt: labelPosOpt,
+ labelAlign: labelAlignMap[orient],
+ labelBaseline: labelBaselineMap[orient],
+
+ // Based on mainGroup.
+ playPosition: playPosition,
+ prevBtnPosition: prevBtnPosition,
+ nextBtnPosition: nextBtnPosition,
+ axisExtent: axisExtent,
+
+ controlSize: controlSize,
+ controlGap: controlGap
+ };
+ },
+
+ _position: function (layoutInfo, timelineModel) {
+ // Position is be called finally, because bounding rect is needed for
+ // adapt content to fill viewRect (auto adapt offset).
+
+ // Timeline may be not all in the viewRect when 'offset' is specified
+ // as a number, because it is more appropriate that label aligns at
+ // 'offset' but not the other edge defined by viewRect.
+
+ var mainGroup = this._mainGroup;
+ var labelGroup = this._labelGroup;
+
+ var viewRect = layoutInfo.viewRect;
+ if (layoutInfo.orient === 'vertical') {
+ // transfrom to horizontal, inverse rotate by left-top point.
+ var m = matrix.create();
+ var rotateOriginX = viewRect.x;
+ var rotateOriginY = viewRect.y + viewRect.height;
+ matrix.translate(m, m, [-rotateOriginX, -rotateOriginY]);
+ matrix.rotate(m, m, -PI / 2);
+ matrix.translate(m, m, [rotateOriginX, rotateOriginY]);
+ viewRect = viewRect.clone();
+ viewRect.applyTransform(m);
+ }
+
+ var viewBound = getBound(viewRect);
+ var mainBound = getBound(mainGroup.getBoundingRect());
+ var labelBound = getBound(labelGroup.getBoundingRect());
+
+ var mainPosition = mainGroup.position;
+ var labelsPosition = labelGroup.position;
+
+ labelsPosition[0] = mainPosition[0] = viewBound[0][0];
+
+ var labelPosOpt = layoutInfo.labelPosOpt;
+
+ if (isNaN(labelPosOpt)) { // '+' or '-'
+ var mainBoundIdx = labelPosOpt === '+' ? 0 : 1;
+ toBound(mainPosition, mainBound, viewBound, 1, mainBoundIdx);
+ toBound(labelsPosition, labelBound, viewBound, 1, 1 - mainBoundIdx);
+ }
+ else {
+ var mainBoundIdx = labelPosOpt >= 0 ? 0 : 1;
+ toBound(mainPosition, mainBound, viewBound, 1, mainBoundIdx);
+ labelsPosition[1] = mainPosition[1] + labelPosOpt;
+ }
+
+ mainGroup.position = mainPosition;
+ labelGroup.position = labelsPosition;
+ mainGroup.rotation = labelGroup.rotation = layoutInfo.rotation;
+
+ setOrigin(mainGroup);
+ setOrigin(labelGroup);
+
+ function setOrigin(targetGroup) {
+ var pos = targetGroup.position;
+ targetGroup.origin = [
+ viewBound[0][0] - pos[0],
+ viewBound[1][0] - pos[1]
+ ];
+ }
+
+ function getBound(rect) {
+ // [[xmin, xmax], [ymin, ymax]]
+ return [
+ [rect.x, rect.x + rect.width],
+ [rect.y, rect.y + rect.height]
+ ];
+ }
+
+ function toBound(fromPos, from, to, dimIdx, boundIdx) {
+ fromPos[dimIdx] += to[dimIdx][boundIdx] - from[dimIdx][boundIdx];
+ }
+ },
+
+ _createAxis: function (layoutInfo, timelineModel) {
+ var data = timelineModel.getData();
+ var axisType = timelineModel.get('axisType');
+
+ var scale = axisHelper.createScaleByModel(timelineModel, axisType);
+ var dataExtent = data.getDataExtent('value');
+ scale.setExtent(dataExtent[0], dataExtent[1]);
+ this._customizeScale(scale, data);
+ scale.niceTicks();
+
+ var axis = new TimelineAxis('value', scale, layoutInfo.axisExtent, axisType);
+ axis.model = timelineModel;
+
+ return axis;
+ },
+
+ _customizeScale: function (scale, data) {
+
+ scale.getTicks = function () {
+ return data.mapArray(['value'], function (value) {
+ return value;
+ });
+ };
+
+ scale.getTicksLabels = function () {
+ return zrUtil.map(this.getTicks(), scale.getLabel, scale);
+ };
+ },
+
+ _createGroup: function (name) {
+ var newGroup = this['_' + name] = new graphic.Group();
+ this.group.add(newGroup);
+ return newGroup;
+ },
+
+ _renderAxisLine: function (layoutInfo, group, axis, timelineModel) {
+ var axisExtent = axis.getExtent();
+
+ if (!timelineModel.get('lineStyle.show')) {
+ return;
+ }
+
+ group.add(new graphic.Line({
+ shape: {
+ x1: axisExtent[0], y1: 0,
+ x2: axisExtent[1], y2: 0
+ },
+ style: zrUtil.extend(
+ {lineCap: 'round'},
+ timelineModel.getModel('lineStyle').getLineStyle()
+ ),
+ silent: true,
+ z2: 1
+ }));
+ },
+
+ /**
+ * @private
+ */
+ _renderAxisTick: function (layoutInfo, group, axis, timelineModel) {
+ var data = timelineModel.getData();
+ var ticks = axis.scale.getTicks();
+ var tooltipHostModel = this._prepareTooltipHostModel(data, timelineModel);
+
+ each(ticks, function (value, dataIndex) {
+
+ var tickCoord = axis.dataToCoord(value);
+ var itemModel = data.getItemModel(dataIndex);
+ var itemStyleModel = itemModel.getModel('itemStyle.normal');
+ var hoverStyleModel = itemModel.getModel('itemStyle.emphasis');
+ var symbolOpt = {
+ position: [tickCoord, 0],
+ onclick: bind(this._changeTimeline, this, dataIndex)
+ };
+ var el = giveSymbol(itemModel, itemStyleModel, group, symbolOpt);
+ graphic.setHoverStyle(el, hoverStyleModel.getItemStyle());
+
+ if (itemModel.get('tooltip')) {
+ el.dataIndex = dataIndex;
+ el.dataModel = tooltipHostModel;
+ }
+ else {
+ el.dataIndex = el.dataModel = null;
+ }
+
+ }, this);
+ },
+
+ /**
+ * @private
+ */
+ _prepareTooltipHostModel: function (data, timelineModel) {
+ var tooltipHostModel = modelUtil.createDataFormatModel(
+ {}, data, timelineModel.get('data')
+ );
+ var me = this;
+
+ tooltipHostModel.formatTooltip = function (dataIndex) {
+ return encodeHTML(me._axis.scale.getLabel(dataIndex));
+ };
+
+ return tooltipHostModel;
+ },
+
+ /**
+ * @private
+ */
+ _renderAxisLabel: function (layoutInfo, group, axis, timelineModel) {
+ var labelModel = timelineModel.getModel('label.normal');
+
+ if (!labelModel.get('show')) {
+ return;
+ }
+
+ var data = timelineModel.getData();
+ var ticks = axis.scale.getTicks();
+ var labels = axisHelper.getFormattedLabels(
+ axis, labelModel.get('formatter')
+ );
+ var labelInterval = axis.getLabelInterval();
+
+ each(ticks, function (tick, dataIndex) {
+ if (axis.isLabelIgnored(dataIndex, labelInterval)) {
+ return;
+ }
+
+ var itemModel = data.getItemModel(dataIndex);
+ var itemTextStyleModel = itemModel.getModel('label.normal.textStyle');
+ var hoverTextStyleModel = itemModel.getModel('label.emphasis.textStyle');
+ var tickCoord = axis.dataToCoord(tick);
+ var textEl = new graphic.Text({
+ style: {
+ text: labels[dataIndex],
+ textAlign: layoutInfo.labelAlign,
+ textVerticalAlign: layoutInfo.labelBaseline,
+ textFont: itemTextStyleModel.getFont(),
+ fill: itemTextStyleModel.getTextColor()
+ },
+ position: [tickCoord, 0],
+ rotation: layoutInfo.labelRotation - layoutInfo.rotation,
+ onclick: bind(this._changeTimeline, this, dataIndex),
+ silent: false
+ });
+
+ group.add(textEl);
+ graphic.setHoverStyle(textEl, hoverTextStyleModel.getItemStyle());
+
+ }, this);
+ },
+
+ /**
+ * @private
+ */
+ _renderControl: function (layoutInfo, group, axis, timelineModel) {
+ var controlSize = layoutInfo.controlSize;
+ var rotation = layoutInfo.rotation;
+
+ var itemStyle = timelineModel.getModel('controlStyle.normal').getItemStyle();
+ var hoverStyle = timelineModel.getModel('controlStyle.emphasis').getItemStyle();
+ var rect = [0, -controlSize / 2, controlSize, controlSize];
+ var playState = timelineModel.getPlayState();
+ var inverse = timelineModel.get('inverse', true);
+
+ makeBtn(
+ layoutInfo.nextBtnPosition,
+ 'controlStyle.nextIcon',
+ bind(this._changeTimeline, this, inverse ? '-' : '+')
+ );
+ makeBtn(
+ layoutInfo.prevBtnPosition,
+ 'controlStyle.prevIcon',
+ bind(this._changeTimeline, this, inverse ? '+' : '-')
+ );
+ makeBtn(
+ layoutInfo.playPosition,
+ 'controlStyle.' + (playState ? 'stopIcon' : 'playIcon'),
+ bind(this._handlePlayClick, this, !playState),
+ true
+ );
+
+ function makeBtn(position, iconPath, onclick, willRotate) {
+ if (!position) {
+ return;
+ }
+ var opt = {
+ position: position,
+ origin: [controlSize / 2, 0],
+ rotation: willRotate ? -rotation : 0,
+ rectHover: true,
+ style: itemStyle,
+ onclick: onclick
+ };
+ var btn = makeIcon(timelineModel, iconPath, rect, opt);
+ group.add(btn);
+ graphic.setHoverStyle(btn, hoverStyle);
+ }
+ },
+
+ _renderCurrentPointer: function (layoutInfo, group, axis, timelineModel) {
+ var data = timelineModel.getData();
+ var currentIndex = timelineModel.getCurrentIndex();
+ var pointerModel = data.getItemModel(currentIndex).getModel('checkpointStyle');
+ var me = this;
+
+ var callback = {
+ onCreate: function (pointer) {
+ pointer.draggable = true;
+ pointer.drift = bind(me._handlePointerDrag, me);
+ pointer.ondragend = bind(me._handlePointerDragend, me);
+ pointerMoveTo(pointer, currentIndex, axis, timelineModel, true);
+ },
+ onUpdate: function (pointer) {
+ pointerMoveTo(pointer, currentIndex, axis, timelineModel);
+ }
+ };
+
+ // Reuse when exists, for animation and drag.
+ this._currentPointer = giveSymbol(
+ pointerModel, pointerModel, this._mainGroup, {}, this._currentPointer, callback
+ );
+ },
+
+ _handlePlayClick: function (nextState) {
+ this._clearTimer();
+ this.api.dispatchAction({
+ type: 'timelinePlayChange',
+ playState: nextState,
+ from: this.uid
+ });
+ },
+
+ _handlePointerDrag: function (dx, dy, e) {
+ this._clearTimer();
+ this._pointerChangeTimeline([e.offsetX, e.offsetY]);
+ },
+
+ _handlePointerDragend: function (e) {
+ this._pointerChangeTimeline([e.offsetX, e.offsetY], true);
+ },
+
+ _pointerChangeTimeline: function (mousePos, trigger) {
+ var toCoord = this._toAxisCoord(mousePos)[0];
+
+ var axis = this._axis;
+ var axisExtent = numberUtil.asc(axis.getExtent().slice());
+
+ toCoord > axisExtent[1] && (toCoord = axisExtent[1]);
+ toCoord < axisExtent[0] && (toCoord = axisExtent[0]);
+
+ this._currentPointer.position[0] = toCoord;
+ this._currentPointer.dirty();
+
+ var targetDataIndex = this._findNearestTick(toCoord);
+ var timelineModel = this.model;
+
+ if (trigger || (
+ targetDataIndex !== timelineModel.getCurrentIndex()
+ && timelineModel.get('realtime')
+ )) {
+ this._changeTimeline(targetDataIndex);
+ }
+ },
+
+ _doPlayStop: function () {
+ this._clearTimer();
+
+ if (this.model.getPlayState()) {
+ this._timer = setTimeout(
+ bind(handleFrame, this),
+ this.model.get('playInterval')
+ );
+ }
+
+ function handleFrame() {
+ // Do not cache
+ var timelineModel = this.model;
+ this._changeTimeline(
+ timelineModel.getCurrentIndex()
+ + (timelineModel.get('rewind', true) ? -1 : 1)
+ );
+ }
+ },
+
+ _toAxisCoord: function (vertex) {
+ var trans = this._mainGroup.getLocalTransform();
+ return graphic.applyTransform(vertex, trans, true);
+ },
+
+ _findNearestTick: function (axisCoord) {
+ var data = this.model.getData();
+ var dist = Infinity;
+ var targetDataIndex;
+ var axis = this._axis;
+
+ data.each(['value'], function (value, dataIndex) {
+ var coord = axis.dataToCoord(value);
+ var d = Math.abs(coord - axisCoord);
+ if (d < dist) {
+ dist = d;
+ targetDataIndex = dataIndex;
+ }
+ });
+
+ return targetDataIndex;
+ },
+
+ _clearTimer: function () {
+ if (this._timer) {
+ clearTimeout(this._timer);
+ this._timer = null;
+ }
+ },
+
+ _changeTimeline: function (nextIndex) {
+ var currentIndex = this.model.getCurrentIndex();
+
+ if (nextIndex === '+') {
+ nextIndex = currentIndex + 1;
+ }
+ else if (nextIndex === '-') {
+ nextIndex = currentIndex - 1;
+ }
+
+ this.api.dispatchAction({
+ type: 'timelineChange',
+ currentIndex: nextIndex,
+ from: this.uid
+ });
+ }
+
+ });
+
+ function getViewRect(model, api) {
+ return layout.getLayoutRect(
+ model.getBoxLayoutParams(),
+ {
+ width: api.getWidth(),
+ height: api.getHeight()
+ },
+ model.get('padding')
+ );
+ }
+
+ function makeIcon(timelineModel, objPath, rect, opts) {
+ var icon = graphic.makePath(
+ timelineModel.get(objPath).replace(/^path:\/\//, ''),
+ zrUtil.clone(opts || {}),
+ new BoundingRect(rect[0], rect[1], rect[2], rect[3]),
+ 'center'
+ );
+
+ return icon;
+ }
+
+ /**
+ * Create symbol or update symbol
+ */
+ function giveSymbol(hostModel, itemStyleModel, group, opt, symbol, callback) {
+ var symbolType = hostModel.get('symbol');
+ var color = itemStyleModel.get('color');
+ var symbolSize = hostModel.get('symbolSize');
+ var halfSymbolSize = symbolSize / 2;
+ var itemStyle = itemStyleModel.getItemStyle(['color', 'symbol', 'symbolSize']);
+
+ if (!symbol) {
+ symbol = symbolUtil.createSymbol(
+ symbolType, -halfSymbolSize, -halfSymbolSize, symbolSize, symbolSize, color
+ );
+ group.add(symbol);
+ callback && callback.onCreate(symbol);
+ }
+ else {
+ symbol.setStyle(itemStyle);
+ symbol.setColor(color);
+ group.add(symbol); // Group may be new, also need to add.
+ callback && callback.onUpdate(symbol);
+ }
+
+ opt = zrUtil.merge({
+ rectHover: true,
+ style: itemStyle,
+ z2: 100
+ }, opt, true);
+
+ symbol.attr(opt);
+
+ return symbol;
+ }
+
+ function pointerMoveTo(pointer, dataIndex, axis, timelineModel, noAnimation) {
+ if (pointer.dragging) {
+ return;
+ }
+
+ var pointerModel = timelineModel.getModel('checkpointStyle');
+ var toCoord = axis.dataToCoord(timelineModel.getData().get(['value'], dataIndex));
+
+ if (noAnimation || !pointerModel.get('animation', true)) {
+ pointer.attr({position: [toCoord, 0]});
+ }
+ else {
+ pointer.stopAnimation(true);
+ pointer.animateTo(
+ {position: [toCoord, 0]},
+ pointerModel.get('animationDuration', true),
+ pointerModel.get('animationEasing', true)
+ );
+ }
+ }
+
+
+
+/***/ },
+/* 329 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file Timeline view
+ */
+
+
+ // var zrUtil = require('zrender/lib/core/util');
+ // var graphic = require('../../util/graphic');
+ var ComponentView = __webpack_require__(28);
+
+ module.exports = ComponentView.extend({
+
+ type: 'timeline'
+ });
+
+
+
+/***/ },
+/* 330 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var Axis = __webpack_require__(117);
+ var axisHelper = __webpack_require__(108);
+
+ /**
+ * Extend axis 2d
+ * @constructor module:echarts/coord/cartesian/Axis2D
+ * @extends {module:echarts/coord/cartesian/Axis}
+ * @param {string} dim
+ * @param {*} scale
+ * @param {Array.<number>} coordExtent
+ * @param {string} axisType
+ * @param {string} position
+ */
+ var TimelineAxis = function (dim, scale, coordExtent, axisType) {
+
+ Axis.call(this, dim, scale, coordExtent);
+
+ /**
+ * Axis type
+ * - 'category'
+ * - 'value'
+ * - 'time'
+ * - 'log'
+ * @type {string}
+ */
+ this.type = axisType || 'value';
+
+ /**
+ * @private
+ * @type {number}
+ */
+ this._autoLabelInterval;
+
+ /**
+ * Axis model
+ * @param {module:echarts/component/TimelineModel}
+ */
+ this.model = null;
+ };
+
+ TimelineAxis.prototype = {
+
+ constructor: TimelineAxis,
+
+ /**
+ * @public
+ * @return {number}
+ */
+ getLabelInterval: function () {
+ var timelineModel = this.model;
+ var labelModel = timelineModel.getModel('label.normal');
+ var labelInterval = labelModel.get('interval');
+
+ if (labelInterval != null && labelInterval != 'auto') {
+ return labelInterval;
+ }
+
+ var labelInterval = this._autoLabelInterval;
+
+ if (!labelInterval) {
+ labelInterval = this._autoLabelInterval = axisHelper.getAxisLabelInterval(
+ zrUtil.map(this.scale.getTicks(), this.dataToCoord, this),
+ axisHelper.getFormattedLabels(this, labelModel.get('formatter')),
+ labelModel.getModel('textStyle').getFont(),
+ timelineModel.get('orient') === 'horizontal'
+ );
+ }
+
+ return labelInterval;
+ },
+
+ /**
+ * If label is ignored.
+ * Automatically used when axis is category and label can not be all shown
+ * @public
+ * @param {number} idx
+ * @return {boolean}
+ */
+ isLabelIgnored: function (idx) {
+ if (this.type === 'category') {
+ var labelInterval = this.getLabelInterval();
+ return ((typeof labelInterval === 'function')
+ && !labelInterval(idx, this.scale.getLabel(idx)))
+ || idx % (labelInterval + 1);
+ }
+ }
+
+ };
+
+ zrUtil.inherits(TimelineAxis, Axis);
+
+ module.exports = TimelineAxis;
+
+
+/***/ },
+/* 331 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ __webpack_require__(332);
+ __webpack_require__(334);
+
+ __webpack_require__(336);
+ __webpack_require__(337);
+ __webpack_require__(338);
+ __webpack_require__(339);
+ __webpack_require__(344);
+
+
+/***/ },
+/* 332 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var featureManager = __webpack_require__(333);
+ var zrUtil = __webpack_require__(3);
+
+ var ToolboxModel = __webpack_require__(1).extendComponentModel({
+
+ type: 'toolbox',
+
+ layoutMode: {
+ type: 'box',
+ ignoreSize: true
+ },
+
+ mergeDefaultAndTheme: function (option) {
+ ToolboxModel.superApply(this, 'mergeDefaultAndTheme', arguments);
+
+ zrUtil.each(this.option.feature, function (featureOpt, featureName) {
+ var Feature = featureManager.get(featureName);
+ Feature && zrUtil.merge(featureOpt, Feature.defaultOption);
+ });
+ },
+
+ defaultOption: {
+
+ show: true,
+
+ z: 6,
+
+ zlevel: 0,
+
+ orient: 'horizontal',
+
+ left: 'right',
+
+ top: 'top',
+
+ // right
+ // bottom
+
+ backgroundColor: 'transparent',
+
+ borderColor: '#ccc',
+
+ borderWidth: 0,
+
+ padding: 5,
+
+ itemSize: 15,
+
+ itemGap: 8,
+
+ showTitle: true,
+
+ iconStyle: {
+ normal: {
+ borderColor: '#666',
+ color: 'none'
+ },
+ emphasis: {
+ borderColor: '#3E98C5'
+ }
+ }
+ // textStyle: {},
+
+ // feature
+ }
+ });
+
+ module.exports = ToolboxModel;
+
+
+/***/ },
+/* 333 */
+/***/ function(module, exports) {
+
+ 'use strict';
+
+
+ var features = {};
+
+ module.exports = {
+ register: function (name, ctor) {
+ features[name] = ctor;
+ },
+
+ get: function (name) {
+ return features[name];
+ }
+ };
+
+
+/***/ },
+/* 334 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(process) {
+
+ var featureManager = __webpack_require__(333);
+ var zrUtil = __webpack_require__(3);
+ var graphic = __webpack_require__(42);
+ var Model = __webpack_require__(8);
+ var DataDiffer = __webpack_require__(95);
+ var listComponentHelper = __webpack_require__(266);
+ var textContain = __webpack_require__(14);
+
+ module.exports = __webpack_require__(1).extendComponentView({
+
+ type: 'toolbox',
+
+ render: function (toolboxModel, ecModel, api) {
+ var group = this.group;
+ group.removeAll();
+
+ if (!toolboxModel.get('show')) {
+ return;
+ }
+
+ var itemSize = +toolboxModel.get('itemSize');
+ var featureOpts = toolboxModel.get('feature') || {};
+ var features = this._features || (this._features = {});
+
+ var featureNames = [];
+ zrUtil.each(featureOpts, function (opt, name) {
+ featureNames.push(name);
+ });
+
+ (new DataDiffer(this._featureNames || [], featureNames))
+ .add(process)
+ .update(process)
+ .remove(zrUtil.curry(process, null))
+ .execute();
+
+ // Keep for diff.
+ this._featureNames = featureNames;
+
+ function process(newIndex, oldIndex) {
+ var featureName = featureNames[newIndex];
+ var oldName = featureNames[oldIndex];
+ var featureOpt = featureOpts[featureName];
+ var featureModel = new Model(featureOpt, toolboxModel, toolboxModel.ecModel);
+ var feature;
+
+ if (featureName && !oldName) { // Create
+ if (isUserFeatureName(featureName)) {
+ feature = {
+ model: featureModel,
+ onclick: featureModel.option.onclick,
+ featureName: featureName
+ };
+ }
+ else {
+ var Feature = featureManager.get(featureName);
+ if (!Feature) {
+ return;
+ }
+ feature = new Feature(featureModel);
+ }
+ features[featureName] = feature;
+ }
+ else {
+ feature = features[oldName];
+ // If feature does not exsit.
+ if (!feature) {
+ return;
+ }
+ feature.model = featureModel;
+ }
+
+ if (!featureName && oldName) {
+ feature.dispose && feature.dispose(ecModel, api);
+ return;
+ }
+
+ if (!featureModel.get('show') || feature.unusable) {
+ feature.remove && feature.remove(ecModel, api);
+ return;
+ }
+
+ createIconPaths(featureModel, feature, featureName);
+
+ featureModel.setIconStatus = function (iconName, status) {
+ var option = this.option;
+ var iconPaths = this.iconPaths;
+ option.iconStatus = option.iconStatus || {};
+ option.iconStatus[iconName] = status;
+ // FIXME
+ iconPaths[iconName] && iconPaths[iconName].trigger(status);
+ };
+
+ if (feature.render) {
+ feature.render(featureModel, ecModel, api);
+ }
+ }
+
+ function createIconPaths(featureModel, feature, featureName) {
+ var iconStyleModel = featureModel.getModel('iconStyle');
+
+ // If one feature has mutiple icon. they are orginaized as
+ // {
+ // icon: {
+ // foo: '',
+ // bar: ''
+ // },
+ // title: {
+ // foo: '',
+ // bar: ''
+ // }
+ // }
+ var icons = feature.getIcons ? feature.getIcons() : featureModel.get('icon');
+ var titles = featureModel.get('title') || {};
+ if (typeof icons === 'string') {
+ var icon = icons;
+ var title = titles;
+ icons = {};
+ titles = {};
+ icons[featureName] = icon;
+ titles[featureName] = title;
+ }
+ var iconPaths = featureModel.iconPaths = {};
+ zrUtil.each(icons, function (icon, iconName) {
+ var normalStyle = iconStyleModel.getModel('normal').getItemStyle();
+ var hoverStyle = iconStyleModel.getModel('emphasis').getItemStyle();
+
+ var style = {
+ x: -itemSize / 2,
+ y: -itemSize / 2,
+ width: itemSize,
+ height: itemSize
+ };
+ var path = icon.indexOf('image://') === 0
+ ? (
+ style.image = icon.slice(8),
+ new graphic.Image({style: style})
+ )
+ : graphic.makePath(
+ icon.replace('path://', ''),
+ {
+ style: normalStyle,
+ hoverStyle: hoverStyle,
+ rectHover: true
+ },
+ style,
+ 'center'
+ );
+
+ graphic.setHoverStyle(path);
+
+ if (toolboxModel.get('showTitle')) {
+ path.__title = titles[iconName];
+ path.on('mouseover', function () {
+ path.setStyle({
+ text: titles[iconName],
+ textPosition: hoverStyle.textPosition || 'bottom',
+ textFill: hoverStyle.fill || hoverStyle.stroke || '#000',
+ textAlign: hoverStyle.textAlign || 'center'
+ });
+ })
+ .on('mouseout', function () {
+ path.setStyle({
+ textFill: null
+ });
+ });
+ }
+ path.trigger(featureModel.get('iconStatus.' + iconName) || 'normal');
+
+ group.add(path);
+ path.on('click', zrUtil.bind(
+ feature.onclick, feature, ecModel, api, iconName
+ ));
+
+ iconPaths[iconName] = path;
+ });
+ }
+
+ listComponentHelper.layout(group, toolboxModel, api);
+ // Render background after group is layout
+ // FIXME
+ listComponentHelper.addBackground(group, toolboxModel);
+
+ // Adjust icon title positions to avoid them out of screen
+ group.eachChild(function (icon) {
+ var titleText = icon.__title;
+ var hoverStyle = icon.hoverStyle;
+ // May be background element
+ if (hoverStyle && titleText) {
+ var rect = textContain.getBoundingRect(
+ titleText, hoverStyle.font
+ );
+ var offsetX = icon.position[0] + group.position[0];
+ var offsetY = icon.position[1] + group.position[1] + itemSize;
+
+ var needPutOnTop = false;
+ if (offsetY + rect.height > api.getHeight()) {
+ hoverStyle.textPosition = 'top';
+ needPutOnTop = true;
+ }
+ var topOffset = needPutOnTop ? (-5 - rect.height) : (itemSize + 8);
+ if (offsetX + rect.width / 2 > api.getWidth()) {
+ hoverStyle.textPosition = ['100%', topOffset];
+ hoverStyle.textAlign = 'right';
+ }
+ else if (offsetX - rect.width / 2 < 0) {
+ hoverStyle.textPosition = [0, topOffset];
+ hoverStyle.textAlign = 'left';
+ }
+ }
+ });
+ },
+
+ remove: function (ecModel, api) {
+ zrUtil.each(this._features, function (feature) {
+ feature.remove && feature.remove(ecModel, api);
+ });
+ this.group.removeAll();
+ },
+
+ dispose: function (ecModel, api) {
+ zrUtil.each(this._features, function (feature) {
+ feature.dispose && feature.dispose(ecModel, api);
+ });
+ }
+ });
+
+ function isUserFeatureName(featureName) {
+ return featureName.indexOf('my') === 0;
+ }
+
+
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(335)))
+
+/***/ },
+/* 335 */
+/***/ function(module, exports) {
+
+ // shim for using process in browser
+
+ var process = module.exports = {};
+ var queue = [];
+ var draining = false;
+ var currentQueue;
+ var queueIndex = -1;
+
+ function cleanUpNextTick() {
+ draining = false;
+ if (currentQueue.length) {
+ queue = currentQueue.concat(queue);
+ } else {
+ queueIndex = -1;
+ }
+ if (queue.length) {
+ drainQueue();
+ }
+ }
+
+ function drainQueue() {
+ if (draining) {
+ return;
+ }
+ var timeout = setTimeout(cleanUpNextTick);
+ draining = true;
+
+ var len = queue.length;
+ while(len) {
+ currentQueue = queue;
+ queue = [];
+ while (++queueIndex < len) {
+ if (currentQueue) {
+ currentQueue[queueIndex].run();
+ }
+ }
+ queueIndex = -1;
+ len = queue.length;
+ }
+ currentQueue = null;
+ draining = false;
+ clearTimeout(timeout);
+ }
+
+ process.nextTick = function (fun) {
+ var args = new Array(arguments.length - 1);
+ if (arguments.length > 1) {
+ for (var i = 1; i < arguments.length; i++) {
+ args[i - 1] = arguments[i];
+ }
+ }
+ queue.push(new Item(fun, args));
+ if (queue.length === 1 && !draining) {
+ setTimeout(drainQueue, 0);
+ }
+ };
+
+ // v8 likes predictible objects
+ function Item(fun, array) {
+ this.fun = fun;
+ this.array = array;
+ }
+ Item.prototype.run = function () {
+ this.fun.apply(null, this.array);
+ };
+ process.title = 'browser';
+ process.browser = true;
+ process.env = {};
+ process.argv = [];
+ process.version = ''; // empty string to avoid regexp issues
+ process.versions = {};
+
+ function noop() {}
+
+ process.on = noop;
+ process.addListener = noop;
+ process.once = noop;
+ process.off = noop;
+ process.removeListener = noop;
+ process.removeAllListeners = noop;
+ process.emit = noop;
+
+ process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+ };
+
+ process.cwd = function () { return '/' };
+ process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
+ };
+ process.umask = function() { return 0; };
+
+
+/***/ },
+/* 336 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ var env = __webpack_require__(78);
+
+ function SaveAsImage (model) {
+ this.model = model;
+ }
+
+ SaveAsImage.defaultOption = {
+ show: true,
+ icon: 'M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0',
+ title: 'ä¿å­˜ä¸ºå›¾ç‰‡',
+ type: 'png',
+ // Default use option.backgroundColor
+ // backgroundColor: '#fff',
+ name: '',
+ excludeComponents: ['toolbox'],
+ pixelRatio: 1,
+ lang: ['å³é”®å¦å­˜ä¸ºå›¾ç‰‡']
+ };
+
+ SaveAsImage.prototype.unusable = !env.canvasSupported;
+
+ var proto = SaveAsImage.prototype;
+
+ proto.onclick = function (ecModel, api) {
+ var model = this.model;
+ var title = model.get('name') || ecModel.get('title.0.text') || 'echarts';
+ var $a = document.createElement('a');
+ var type = model.get('type', true) || 'png';
+ $a.download = title + '.' + type;
+ $a.target = '_blank';
+ var url = api.getConnectedDataURL({
+ type: type,
+ backgroundColor: model.get('backgroundColor', true)
+ || ecModel.get('backgroundColor') || '#fff',
+ excludeComponents: model.get('excludeComponents'),
+ pixelRatio: model.get('pixelRatio')
+ });
+ $a.href = url;
+ // Chrome and Firefox
+ if (typeof MouseEvent === 'function') {
+ var evt = new MouseEvent('click', {
+ view: window,
+ bubbles: true,
+ cancelable: false
+ });
+ $a.dispatchEvent(evt);
+ }
+ // IE
+ else {
+ var lang = model.get('lang');
+ var html = ''
+ + '<body style="margin:0;">'
+ + '<img src="' + url + '" style="max-width:100%;" title="' + ((lang && lang[0]) || '') + '" />'
+ + '</body>';
+ var tab = window.open();
+ tab.document.write(html);
+ }
+ };
+
+ __webpack_require__(333).register(
+ 'saveAsImage', SaveAsImage
+ );
+
+ module.exports = SaveAsImage;
+
+
+/***/ },
+/* 337 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var zrUtil = __webpack_require__(3);
+
+ function MagicType(model) {
+ this.model = model;
+ }
+
+ MagicType.defaultOption = {
+ show: true,
+ type: [],
+ // Icon group
+ icon: {
+ line: 'M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4',
+ bar: 'M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7',
+ stack: 'M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z', // jshint ignore:line
+ tiled: 'M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z'
+ },
+ title: {
+ line: '切æ¢ä¸ºæŠ˜çº¿å›¾',
+ bar: '切æ¢ä¸ºæŸ±çŠ¶å›¾',
+ stack: '切æ¢ä¸ºå †å ',
+ tiled: '切æ¢ä¸ºå¹³é“º'
+ },
+ option: {},
+ seriesIndex: {}
+ };
+
+ var proto = MagicType.prototype;
+
+ proto.getIcons = function () {
+ var model = this.model;
+ var availableIcons = model.get('icon');
+ var icons = {};
+ zrUtil.each(model.get('type'), function (type) {
+ if (availableIcons[type]) {
+ icons[type] = availableIcons[type];
+ }
+ });
+ return icons;
+ };
+
+ var seriesOptGenreator = {
+ 'line': function (seriesType, seriesId, seriesModel, model) {
+ if (seriesType === 'bar') {
+ return zrUtil.merge({
+ id: seriesId,
+ type: 'line',
+ // Preserve data related option
+ data: seriesModel.get('data'),
+ stack: seriesModel.get('stack'),
+ markPoint: seriesModel.get('markPoint'),
+ markLine: seriesModel.get('markLine')
+ }, model.get('option.line') || {}, true);
+ }
+ },
+ 'bar': function (seriesType, seriesId, seriesModel, model) {
+ if (seriesType === 'line') {
+ return zrUtil.merge({
+ id: seriesId,
+ type: 'bar',
+ // Preserve data related option
+ data: seriesModel.get('data'),
+ stack: seriesModel.get('stack'),
+ markPoint: seriesModel.get('markPoint'),
+ markLine: seriesModel.get('markLine')
+ }, model.get('option.bar') || {}, true);
+ }
+ },
+ 'stack': function (seriesType, seriesId, seriesModel, model) {
+ if (seriesType === 'line' || seriesType === 'bar') {
+ return zrUtil.merge({
+ id: seriesId,
+ stack: '__ec_magicType_stack__'
+ }, model.get('option.stack') || {}, true);
+ }
+ },
+ 'tiled': function (seriesType, seriesId, seriesModel, model) {
+ if (seriesType === 'line' || seriesType === 'bar') {
+ return zrUtil.merge({
+ id: seriesId,
+ stack: ''
+ }, model.get('option.tiled') || {}, true);
+ }
+ }
+ };
+
+ var radioTypes = [
+ ['line', 'bar'],
+ ['stack', 'tiled']
+ ];
+
+ proto.onclick = function (ecModel, api, type) {
+ var model = this.model;
+ var seriesIndex = model.get('seriesIndex.' + type);
+ // Not supported magicType
+ if (!seriesOptGenreator[type]) {
+ return;
+ }
+ var newOption = {
+ series: []
+ };
+ var generateNewSeriesTypes = function (seriesModel) {
+ var seriesType = seriesModel.subType;
+ var seriesId = seriesModel.id;
+ var newSeriesOpt = seriesOptGenreator[type](
+ seriesType, seriesId, seriesModel, model
+ );
+ if (newSeriesOpt) {
+ // PENDING If merge original option?
+ zrUtil.defaults(newSeriesOpt, seriesModel.option);
+ newOption.series.push(newSeriesOpt);
+ }
+ // Modify boundaryGap
+ var coordSys = seriesModel.coordinateSystem;
+ if (coordSys.type === 'cartesian2d') {
+ var categoryAxis = coordSys.getAxesByScale('ordinal')[0];
+ if (categoryAxis) {
+ var axisDim = categoryAxis.dim;
+ var axisIndex = seriesModel.get(axisDim + 'AxisIndex');
+ var axisKey = axisDim + 'Axis';
+ newOption[axisKey] = newOption[axisKey] || [];
+ for (var i = 0; i <= axisIndex; i++) {
+ newOption[axisKey][axisIndex] = newOption[axisKey][axisIndex] || {};
+ }
+ newOption[axisKey][axisIndex].boundaryGap = type === 'bar' ? true : false;
+ }
+ }
+ };
+
+ zrUtil.each(radioTypes, function (radio) {
+ if (zrUtil.indexOf(radio, type) >= 0) {
+ zrUtil.each(radio, function (item) {
+ model.setIconStatus(item, 'normal');
+ });
+ }
+ });
+
+ model.setIconStatus(type, 'emphasis');
+
+ ecModel.eachComponent(
+ {
+ mainType: 'series',
+ query: seriesIndex == null ? null : {
+ seriesIndex: seriesIndex
+ }
+ }, generateNewSeriesTypes
+ );
+ api.dispatchAction({
+ type: 'changeMagicType',
+ currentType: type,
+ newOption: newOption
+ });
+ };
+
+ var echarts = __webpack_require__(1);
+ echarts.registerAction({
+ type: 'changeMagicType',
+ event: 'magicTypeChanged',
+ update: 'prepareAndUpdate'
+ }, function (payload, ecModel) {
+ ecModel.mergeOption(payload.newOption);
+ });
+
+ __webpack_require__(333).register('magicType', MagicType);
+
+ module.exports = MagicType;
+
+
+/***/ },
+/* 338 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @module echarts/component/toolbox/feature/DataView
+ */
+
+
+
+ var zrUtil = __webpack_require__(3);
+ var eventTool = __webpack_require__(80);
+
+
+ var BLOCK_SPLITER = new Array(60).join('-');
+ var ITEM_SPLITER = '\t';
+ /**
+ * Group series into two types
+ * 1. on category axis, like line, bar
+ * 2. others, like scatter, pie
+ * @param {module:echarts/model/Global} ecModel
+ * @return {Object}
+ * @inner
+ */
+ function groupSeries(ecModel) {
+ var seriesGroupByCategoryAxis = {};
+ var otherSeries = [];
+ var meta = [];
+ ecModel.eachRawSeries(function (seriesModel) {
+ var coordSys = seriesModel.coordinateSystem;
+
+ if (coordSys && (coordSys.type === 'cartesian2d' || coordSys.type === 'polar')) {
+ var baseAxis = coordSys.getBaseAxis();
+ if (baseAxis.type === 'category') {
+ var key = baseAxis.dim + '_' + baseAxis.index;
+ if (!seriesGroupByCategoryAxis[key]) {
+ seriesGroupByCategoryAxis[key] = {
+ categoryAxis: baseAxis,
+ valueAxis: coordSys.getOtherAxis(baseAxis),
+ series: []
+ };
+ meta.push({
+ axisDim: baseAxis.dim,
+ axisIndex: baseAxis.index
+ });
+ }
+ seriesGroupByCategoryAxis[key].series.push(seriesModel);
+ }
+ else {
+ otherSeries.push(seriesModel);
+ }
+ }
+ else {
+ otherSeries.push(seriesModel);
+ }
+ });
+
+ return {
+ seriesGroupByCategoryAxis: seriesGroupByCategoryAxis,
+ other: otherSeries,
+ meta: meta
+ };
+ }
+
+ /**
+ * Assemble content of series on cateogory axis
+ * @param {Array.<module:echarts/model/Series>} series
+ * @return {string}
+ * @inner
+ */
+ function assembleSeriesWithCategoryAxis(series) {
+ var tables = [];
+ zrUtil.each(series, function (group, key) {
+ var categoryAxis = group.categoryAxis;
+ var valueAxis = group.valueAxis;
+ var valueAxisDim = valueAxis.dim;
+
+ var headers = [' '].concat(zrUtil.map(group.series, function (series) {
+ return series.name;
+ }));
+ var columns = [categoryAxis.model.getCategories()];
+ zrUtil.each(group.series, function (series) {
+ columns.push(series.getRawData().mapArray(valueAxisDim, function (val) {
+ return val;
+ }));
+ });
+ // Assemble table content
+ var lines = [headers.join(ITEM_SPLITER)];
+ for (var i = 0; i < columns[0].length; i++) {
+ var items = [];
+ for (var j = 0; j < columns.length; j++) {
+ items.push(columns[j][i]);
+ }
+ lines.push(items.join(ITEM_SPLITER));
+ }
+ tables.push(lines.join('\n'));
+ });
+ return tables.join('\n\n' + BLOCK_SPLITER + '\n\n');
+ }
+
+ /**
+ * Assemble content of other series
+ * @param {Array.<module:echarts/model/Series>} series
+ * @return {string}
+ * @inner
+ */
+ function assembleOtherSeries(series) {
+ return zrUtil.map(series, function (series) {
+ var data = series.getRawData();
+ var lines = [series.name];
+ var vals = [];
+ data.each(data.dimensions, function () {
+ var argLen = arguments.length;
+ var dataIndex = arguments[argLen - 1];
+ var name = data.getName(dataIndex);
+ for (var i = 0; i < argLen - 1; i++) {
+ vals[i] = arguments[i];
+ }
+ lines.push((name ? (name + ITEM_SPLITER) : '') + vals.join(ITEM_SPLITER));
+ });
+ return lines.join('\n');
+ }).join('\n\n' + BLOCK_SPLITER + '\n\n');
+ }
+
+ /**
+ * @param {module:echarts/model/Global}
+ * @return {string}
+ * @inner
+ */
+ function getContentFromModel(ecModel) {
+
+ var result = groupSeries(ecModel);
+
+ return {
+ value: zrUtil.filter([
+ assembleSeriesWithCategoryAxis(result.seriesGroupByCategoryAxis),
+ assembleOtherSeries(result.other)
+ ], function (str) {
+ return str.replace(/[\n\t\s]/g, '');
+ }).join('\n\n' + BLOCK_SPLITER + '\n\n'),
+
+ meta: result.meta
+ };
+ }
+
+
+ function trim(str) {
+ return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
+ }
+ /**
+ * If a block is tsv format
+ */
+ function isTSVFormat(block) {
+ // Simple method to find out if a block is tsv format
+ var firstLine = block.slice(0, block.indexOf('\n'));
+ if (firstLine.indexOf(ITEM_SPLITER) >= 0) {
+ return true;
+ }
+ }
+
+ var itemSplitRegex = new RegExp('[' + ITEM_SPLITER + ']+', 'g');
+ /**
+ * @param {string} tsv
+ * @return {Array.<Object>}
+ */
+ function parseTSVContents(tsv) {
+ var tsvLines = tsv.split(/\n+/g);
+ var headers = trim(tsvLines.shift()).split(itemSplitRegex);
+
+ var categories = [];
+ var series = zrUtil.map(headers, function (header) {
+ return {
+ name: header,
+ data: []
+ };
+ });
+ for (var i = 0; i < tsvLines.length; i++) {
+ var items = trim(tsvLines[i]).split(itemSplitRegex);
+ categories.push(items.shift());
+ for (var j = 0; j < items.length; j++) {
+ series[j] && (series[j].data[i] = items[j]);
+ }
+ }
+ return {
+ series: series,
+ categories: categories
+ };
+ }
+
+ /**
+ * @param {string} str
+ * @return {Array.<Object>}
+ * @inner
+ */
+ function parseListContents(str) {
+ var lines = str.split(/\n+/g);
+ var seriesName = trim(lines.shift());
+
+ var data = [];
+ for (var i = 0; i < lines.length; i++) {
+ var items = trim(lines[i]).split(itemSplitRegex);
+ var name = '';
+ var value;
+ var hasName = false;
+ if (isNaN(items[0])) { // First item is name
+ hasName = true;
+ name = items[0];
+ items = items.slice(1);
+ data[i] = {
+ name: name,
+ value: []
+ };
+ value = data[i].value;
+ }
+ else {
+ value = data[i] = [];
+ }
+ for (var j = 0; j < items.length; j++) {
+ value.push(+items[j]);
+ }
+ if (value.length === 1) {
+ hasName ? (data[i].value = value[0]) : (data[i] = value[0]);
+ }
+ }
+
+ return {
+ name: seriesName,
+ data: data
+ };
+ }
+
+ /**
+ * @param {string} str
+ * @param {Array.<Object>} blockMetaList
+ * @return {Object}
+ * @inner
+ */
+ function parseContents(str, blockMetaList) {
+ var blocks = str.split(new RegExp('\n*' + BLOCK_SPLITER + '\n*', 'g'));
+ var newOption = {
+ series: []
+ };
+ zrUtil.each(blocks, function (block, idx) {
+ if (isTSVFormat(block)) {
+ var result = parseTSVContents(block);
+ var blockMeta = blockMetaList[idx];
+ var axisKey = blockMeta.axisDim + 'Axis';
+
+ if (blockMeta) {
+ newOption[axisKey] = newOption[axisKey] || [];
+ newOption[axisKey][blockMeta.axisIndex] = {
+ data: result.categories
+ };
+ newOption.series = newOption.series.concat(result.series);
+ }
+ }
+ else {
+ var result = parseListContents(block);
+ newOption.series.push(result);
+ }
+ });
+ return newOption;
+ }
+
+ /**
+ * @alias {module:echarts/component/toolbox/feature/DataView}
+ * @constructor
+ * @param {module:echarts/model/Model} model
+ */
+ function DataView(model) {
+
+ this._dom = null;
+
+ this.model = model;
+ }
+
+ DataView.defaultOption = {
+ show: true,
+ readOnly: false,
+ optionToContent: null,
+ contentToOption: null,
+
+ icon: 'M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28',
+ title: 'æ•°æ®è§†å›¾',
+ lang: ['æ•°æ®è§†å›¾', '关闭', '刷新'],
+ backgroundColor: '#fff',
+ textColor: '#000',
+ textareaColor: '#fff',
+ textareaBorderColor: '#333',
+ buttonColor: '#c23531',
+ buttonTextColor: '#fff'
+ };
+
+ DataView.prototype.onclick = function (ecModel, api) {
+ var container = api.getDom();
+ var model = this.model;
+ if (this._dom) {
+ container.removeChild(this._dom);
+ }
+ var root = document.createElement('div');
+ root.style.cssText = 'position:absolute;left:5px;top:5px;bottom:5px;right:5px;';
+ root.style.backgroundColor = model.get('backgroundColor') || '#fff';
+
+ // Create elements
+ var header = document.createElement('h4');
+ var lang = model.get('lang') || [];
+ header.innerHTML = lang[0] || model.get('title');
+ header.style.cssText = 'margin: 10px 20px;';
+ header.style.color = model.get('textColor');
+
+ var viewMain = document.createElement('div');
+ var textarea = document.createElement('textarea');
+ viewMain.style.cssText = 'display:block;width:100%;overflow:hidden;';
+
+ var optionToContent = model.get('optionToContent');
+ var contentToOption = model.get('contentToOption');
+ var result = getContentFromModel(ecModel);
+ if (typeof optionToContent === 'function') {
+ var htmlOrDom = optionToContent(api.getOption());
+ if (typeof htmlOrDom === 'string') {
+ viewMain.innerHTML = htmlOrDom;
+ }
+ else if (zrUtil.isDom(htmlOrDom)) {
+ viewMain.appendChild(htmlOrDom);
+ }
+ }
+ else {
+ // Use default textarea
+ viewMain.appendChild(textarea);
+ textarea.readOnly = model.get('readOnly');
+ textarea.style.cssText = 'width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;';
+ textarea.style.color = model.get('textColor');
+ textarea.style.borderColor = model.get('textareaBorderColor');
+ textarea.style.backgroundColor = model.get('textareaColor');
+ textarea.value = result.value;
+ }
+
+ var blockMetaList = result.meta;
+
+ var buttonContainer = document.createElement('div');
+ buttonContainer.style.cssText = 'position:absolute;bottom:0;left:0;right:0;';
+
+ var buttonStyle = 'float:right;margin-right:20px;border:none;'
+ + 'cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px';
+ var closeButton = document.createElement('div');
+ var refreshButton = document.createElement('div');
+
+ buttonStyle += ';background-color:' + model.get('buttonColor');
+ buttonStyle += ';color:' + model.get('buttonTextColor');
+
+ var self = this;
+
+ function close() {
+ container.removeChild(root);
+ self._dom = null;
+ }
+ eventTool.addEventListener(closeButton, 'click', close);
+
+ eventTool.addEventListener(refreshButton, 'click', function () {
+ var newOption;
+ try {
+ if (typeof contentToOption === 'function') {
+ newOption = contentToOption(viewMain, api.getOption());
+ }
+ else {
+ newOption = parseContents(textarea.value, blockMetaList);
+ }
+ }
+ catch (e) {
+ close();
+ throw new Error('Data view format error ' + e);
+ }
+ if (newOption) {
+ api.dispatchAction({
+ type: 'changeDataView',
+ newOption: newOption
+ });
+ }
+
+ close();
+ });
+
+ closeButton.innerHTML = lang[1];
+ refreshButton.innerHTML = lang[2];
+ refreshButton.style.cssText = buttonStyle;
+ closeButton.style.cssText = buttonStyle;
+
+ !model.get('readOnly') && buttonContainer.appendChild(refreshButton);
+ buttonContainer.appendChild(closeButton);
+
+ // http://stackoverflow.com/questions/6637341/use-tab-to-indent-in-textarea
+ eventTool.addEventListener(textarea, 'keydown', function (e) {
+ if ((e.keyCode || e.which) === 9) {
+ // get caret position/selection
+ var val = this.value;
+ var start = this.selectionStart;
+ var end = this.selectionEnd;
+
+ // set textarea value to: text before caret + tab + text after caret
+ this.value = val.substring(0, start) + ITEM_SPLITER + val.substring(end);
+
+ // put caret at right position again
+ this.selectionStart = this.selectionEnd = start + 1;
+
+ // prevent the focus lose
+ eventTool.stop(e);
+ }
+ });
+
+ root.appendChild(header);
+ root.appendChild(viewMain);
+ root.appendChild(buttonContainer);
+
+ viewMain.style.height = (container.clientHeight - 80) + 'px';
+
+ container.appendChild(root);
+ this._dom = root;
+ };
+
+ DataView.prototype.remove = function (ecModel, api) {
+ this._dom && api.getDom().removeChild(this._dom);
+ };
+
+ DataView.prototype.dispose = function (ecModel, api) {
+ this.remove(ecModel, api);
+ };
+
+ /**
+ * @inner
+ */
+ function tryMergeDataOption(newData, originalData) {
+ return zrUtil.map(newData, function (newVal, idx) {
+ var original = originalData && originalData[idx];
+ if (zrUtil.isObject(original) && !zrUtil.isArray(original)) {
+ if (zrUtil.isObject(newVal) && !zrUtil.isArray(newVal)) {
+ newVal = newVal.value;
+ }
+ // Original data has option
+ return zrUtil.defaults({
+ value: newVal
+ }, original);
+ }
+ else {
+ return newVal;
+ }
+ });
+ }
+
+ __webpack_require__(333).register('dataView', DataView);
+
+ __webpack_require__(1).registerAction({
+ type: 'changeDataView',
+ event: 'dataViewChanged',
+ update: 'prepareAndUpdate'
+ }, function (payload, ecModel) {
+ var newSeriesOptList = [];
+ zrUtil.each(payload.newOption.series, function (seriesOpt) {
+ var seriesModel = ecModel.getSeriesByName(seriesOpt.name)[0];
+ if (!seriesModel) {
+ // New created series
+ // Geuss the series type
+ newSeriesOptList.push(zrUtil.extend({
+ // Default is scatter
+ type: 'scatter'
+ }, seriesOpt));
+ }
+ else {
+ var originalData = seriesModel.get('data');
+ newSeriesOptList.push({
+ name: seriesOpt.name,
+ data: tryMergeDataOption(seriesOpt.data, originalData)
+ });
+ }
+ });
+
+ ecModel.mergeOption(zrUtil.defaults({
+ series: newSeriesOptList
+ }, payload.newOption));
+ });
+
+ module.exports = DataView;
+
+
+/***/ },
+/* 339 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var zrUtil = __webpack_require__(3);
+ var numberUtil = __webpack_require__(7);
+ var SelectController = __webpack_require__(225);
+ var BoundingRect = __webpack_require__(15);
+ var Group = __webpack_require__(29);
+ var history = __webpack_require__(340);
+ var interactionMutex = __webpack_require__(160);
+
+ var each = zrUtil.each;
+ var asc = numberUtil.asc;
+
+ // Use dataZoomSelect
+ __webpack_require__(341);
+
+ // Spectial component id start with \0ec\0, see echarts/model/Global.js~hasInnerId
+ var DATA_ZOOM_ID_BASE = '\0_ec_\0toolbox-dataZoom_';
+
+ function DataZoom(model) {
+ this.model = model;
+
+ /**
+ * @private
+ * @type {module:zrender/container/Group}
+ */
+ this._controllerGroup;
+
+ /**
+ * @private
+ * @type {module:echarts/component/helper/SelectController}
+ */
+ this._controller;
+
+ /**
+ * Is zoom active.
+ * @private
+ * @type {Object}
+ */
+ this._isZoomActive;
+ }
+
+ DataZoom.defaultOption = {
+ show: true,
+ // Icon group
+ icon: {
+ zoom: 'M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1',
+ back: 'M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26'
+ },
+ title: {
+ zoom: '区域缩放',
+ back: '区域缩放还原'
+ }
+ };
+
+ var proto = DataZoom.prototype;
+
+ proto.render = function (featureModel, ecModel, api) {
+ updateBackBtnStatus(featureModel, ecModel);
+ };
+
+ proto.onclick = function (ecModel, api, type) {
+ var controllerGroup = this._controllerGroup;
+ if (!this._controllerGroup) {
+ controllerGroup = this._controllerGroup = new Group();
+ api.getZr().add(controllerGroup);
+ }
+
+ handlers[type].call(this, controllerGroup, this.model, ecModel, api);
+ };
+
+ proto.remove = function (ecModel, api) {
+ this._disposeController();
+ interactionMutex.release('globalPan', api.getZr());
+ };
+
+ proto.dispose = function (ecModel, api) {
+ var zr = api.getZr();
+ interactionMutex.release('globalPan', zr);
+ this._disposeController();
+ this._controllerGroup && zr.remove(this._controllerGroup);
+ };
+
+ /**
+ * @private
+ */
+ var handlers = {
+
+ zoom: function (controllerGroup, featureModel, ecModel, api) {
+ var isZoomActive = this._isZoomActive = !this._isZoomActive;
+ var zr = api.getZr();
+
+ interactionMutex[isZoomActive ? 'take' : 'release']('globalPan', zr);
+
+ featureModel.setIconStatus('zoom', isZoomActive ? 'emphasis' : 'normal');
+
+ if (isZoomActive) {
+ zr.setDefaultCursorStyle('crosshair');
+
+ this._createController(
+ controllerGroup, featureModel, ecModel, api
+ );
+ }
+ else {
+ zr.setDefaultCursorStyle('default');
+ this._disposeController();
+ }
+ },
+
+ back: function (controllerGroup, featureModel, ecModel, api) {
+ this._dispatchAction(history.pop(ecModel), api);
+ }
+ };
+
+ /**
+ * @private
+ */
+ proto._createController = function (
+ controllerGroup, featureModel, ecModel, api
+ ) {
+ var controller = this._controller = new SelectController(
+ 'rect',
+ api.getZr(),
+ {
+ // FIXME
+ lineWidth: 3,
+ stroke: '#333',
+ fill: 'rgba(0,0,0,0.2)'
+ }
+ );
+ controller.on(
+ 'selectEnd',
+ zrUtil.bind(
+ this._onSelected, this, controller,
+ featureModel, ecModel, api
+ )
+ );
+ controller.enable(controllerGroup, false);
+ };
+
+ proto._disposeController = function () {
+ var controller = this._controller;
+ if (controller) {
+ controller.off('selected');
+ controller.dispose();
+ }
+ };
+
+ function prepareCoordInfo(grid, ecModel) {
+ // Default use the first axis.
+ // FIXME
+ var coordInfo = [
+ {axisModel: grid.getAxis('x').model, axisIndex: 0}, // x
+ {axisModel: grid.getAxis('y').model, axisIndex: 0} // y
+ ];
+ coordInfo.grid = grid;
+
+ ecModel.eachComponent(
+ {mainType: 'dataZoom', subType: 'select'},
+ function (dzModel, dataZoomIndex) {
+ if (isTheAxis('xAxis', coordInfo[0].axisModel, dzModel, ecModel)) {
+ coordInfo[0].dataZoomModel = dzModel;
+ }
+ if (isTheAxis('yAxis', coordInfo[1].axisModel, dzModel, ecModel)) {
+ coordInfo[1].dataZoomModel = dzModel;
+ }
+ }
+ );
+
+ return coordInfo;
+ }
+
+ function isTheAxis(axisName, axisModel, dataZoomModel, ecModel) {
+ var axisIndex = dataZoomModel.get(axisName + 'Index');
+ return axisIndex != null
+ && ecModel.getComponent(axisName, axisIndex) === axisModel;
+ }
+
+ /**
+ * @private
+ */
+ proto._onSelected = function (controller, featureModel, ecModel, api, selRanges) {
+ if (!selRanges.length) {
+ return;
+ }
+ var selRange = selRanges[0];
+
+ controller.update(); // remove cover
+
+ var snapshot = {};
+
+ // FIXME
+ // polar
+
+ ecModel.eachComponent('grid', function (gridModel, gridIndex) {
+ var grid = gridModel.coordinateSystem;
+ var coordInfo = prepareCoordInfo(grid, ecModel);
+ var selDataRange = pointToDataInCartesian(selRange, coordInfo);
+
+ if (selDataRange) {
+ var xBatchItem = scaleCartesianAxis(selDataRange, coordInfo, 0, 'x');
+ var yBatchItem = scaleCartesianAxis(selDataRange, coordInfo, 1, 'y');
+
+ xBatchItem && (snapshot[xBatchItem.dataZoomId] = xBatchItem);
+ yBatchItem && (snapshot[yBatchItem.dataZoomId] = yBatchItem);
+ }
+ }, this);
+
+ history.push(ecModel, snapshot);
+
+ this._dispatchAction(snapshot, api);
+ };
+
+ function pointToDataInCartesian(selRange, coordInfo) {
+ var grid = coordInfo.grid;
+
+ var selRect = new BoundingRect(
+ selRange[0][0],
+ selRange[1][0],
+ selRange[0][1] - selRange[0][0],
+ selRange[1][1] - selRange[1][0]
+ );
+ if (!selRect.intersect(grid.getRect())) {
+ return;
+ }
+ var cartesian = grid.getCartesian(coordInfo[0].axisIndex, coordInfo[1].axisIndex);
+ var dataLeftTop = cartesian.pointToData([selRange[0][0], selRange[1][0]], true);
+ var dataRightBottom = cartesian.pointToData([selRange[0][1], selRange[1][1]], true);
+
+ return [
+ asc([dataLeftTop[0], dataRightBottom[0]]), // x, using asc to handle inverse
+ asc([dataLeftTop[1], dataRightBottom[1]]) // y, using asc to handle inverse
+ ];
+ }
+
+ function scaleCartesianAxis(selDataRange, coordInfo, dimIdx, dimName) {
+ var dimCoordInfo = coordInfo[dimIdx];
+ var dataZoomModel = dimCoordInfo.dataZoomModel;
+
+ if (dataZoomModel) {
+ return {
+ dataZoomId: dataZoomModel.id,
+ startValue: selDataRange[dimIdx][0],
+ endValue: selDataRange[dimIdx][1]
+ };
+ }
+ }
+
+ /**
+ * @private
+ */
+ proto._dispatchAction = function (snapshot, api) {
+ var batch = [];
+
+ each(snapshot, function (batchItem) {
+ batch.push(batchItem);
+ });
+
+ batch.length && api.dispatchAction({
+ type: 'dataZoom',
+ from: this.uid,
+ batch: zrUtil.clone(batch, true)
+ });
+ };
+
+ function updateBackBtnStatus(featureModel, ecModel) {
+ featureModel.setIconStatus(
+ 'back',
+ history.count(ecModel) > 1 ? 'emphasis' : 'normal'
+ );
+ }
+
+
+ __webpack_require__(333).register('dataZoom', DataZoom);
+
+
+ // Create special dataZoom option for select
+ __webpack_require__(1).registerPreprocessor(function (option) {
+ if (!option) {
+ return;
+ }
+
+ var dataZoomOpts = option.dataZoom || (option.dataZoom = []);
+ if (!zrUtil.isArray(dataZoomOpts)) {
+ dataZoomOpts = [dataZoomOpts];
+ }
+
+ var toolboxOpt = option.toolbox;
+ if (toolboxOpt) {
+ // Assume there is only one toolbox
+ if (zrUtil.isArray(toolboxOpt)) {
+ toolboxOpt = toolboxOpt[0];
+ }
+
+ if (toolboxOpt && toolboxOpt.feature) {
+ var dataZoomOpt = toolboxOpt.feature.dataZoom;
+ addForAxis('xAxis', dataZoomOpt);
+ addForAxis('yAxis', dataZoomOpt);
+ }
+ }
+
+ function addForAxis(axisName, dataZoomOpt) {
+ if (!dataZoomOpt) {
+ return;
+ }
+
+ var axisIndicesName = axisName + 'Index';
+ var givenAxisIndices = dataZoomOpt[axisIndicesName];
+ if (givenAxisIndices != null && !zrUtil.isArray(givenAxisIndices)) {
+ givenAxisIndices = givenAxisIndices === false ? [] : [givenAxisIndices];
+ }
+
+ forEachComponent(axisName, function (axisOpt, axisIndex) {
+ if (givenAxisIndices != null
+ && zrUtil.indexOf(givenAxisIndices, axisIndex) === -1
+ ) {
+ return;
+ }
+ var newOpt = {
+ type: 'select',
+ $fromToolbox: true,
+ // Id for merge mapping.
+ id: DATA_ZOOM_ID_BASE + axisName + axisIndex
+ };
+ // FIXME
+ // Only support one axis now.
+ newOpt[axisIndicesName] = axisIndex;
+ dataZoomOpts.push(newOpt);
+ });
+ }
+
+ function forEachComponent(mainType, cb) {
+ var opts = option[mainType];
+ if (!zrUtil.isArray(opts)) {
+ opts = opts ? [opts] : [];
+ }
+ each(opts, cb);
+ }
+ });
+
+ module.exports = DataZoom;
+
+
+/***/ },
+/* 340 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file History manager.
+ */
+
+
+ var zrUtil = __webpack_require__(3);
+ var each = zrUtil.each;
+
+ var ATTR = '\0_ec_hist_store';
+
+ var history = {
+
+ /**
+ * @public
+ * @param {module:echarts/model/Global} ecModel
+ * @param {Object} newSnapshot {dataZoomId, batch: [payloadInfo, ...]}
+ */
+ push: function (ecModel, newSnapshot) {
+ var store = giveStore(ecModel);
+
+ // If previous dataZoom can not be found,
+ // complete an range with current range.
+ each(newSnapshot, function (batchItem, dataZoomId) {
+ var i = store.length - 1;
+ for (; i >= 0; i--) {
+ var snapshot = store[i];
+ if (snapshot[dataZoomId]) {
+ break;
+ }
+ }
+ if (i < 0) {
+ // No origin range set, create one by current range.
+ var dataZoomModel = ecModel.queryComponents(
+ {mainType: 'dataZoom', subType: 'select', id: dataZoomId}
+ )[0];
+ if (dataZoomModel) {
+ var percentRange = dataZoomModel.getPercentRange();
+ store[0][dataZoomId] = {
+ dataZoomId: dataZoomId,
+ start: percentRange[0],
+ end: percentRange[1]
+ };
+ }
+ }
+ });
+
+ store.push(newSnapshot);
+ },
+
+ /**
+ * @public
+ * @param {module:echarts/model/Global} ecModel
+ * @return {Object} snapshot
+ */
+ pop: function (ecModel) {
+ var store = giveStore(ecModel);
+ var head = store[store.length - 1];
+ store.length > 1 && store.pop();
+
+ // Find top for all dataZoom.
+ var snapshot = {};
+ each(head, function (batchItem, dataZoomId) {
+ for (var i = store.length - 1; i >= 0; i--) {
+ var batchItem = store[i][dataZoomId];
+ if (batchItem) {
+ snapshot[dataZoomId] = batchItem;
+ break;
+ }
+ }
+ });
+
+ return snapshot;
+ },
+
+ /**
+ * @public
+ */
+ clear: function (ecModel) {
+ ecModel[ATTR] = null;
+ },
+
+ /**
+ * @public
+ * @param {module:echarts/model/Global} ecModel
+ * @return {number} records. always >= 1.
+ */
+ count: function (ecModel) {
+ return giveStore(ecModel).length;
+ }
+
+ };
+
+ /**
+ * [{key: dataZoomId, value: {dataZoomId, range}}, ...]
+ * History length of each dataZoom may be different.
+ * this._history[0] is used to store origin range.
+ * @type {Array.<Object>}
+ */
+ function giveStore(ecModel) {
+ var store = ecModel[ATTR];
+ if (!store) {
+ store = ecModel[ATTR] = [{}];
+ }
+ return store;
+ }
+
+ module.exports = history;
+
+
+
+/***/ },
+/* 341 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * DataZoom component entry
+ */
+
+
+ __webpack_require__(287);
+
+ __webpack_require__(288);
+ __webpack_require__(290);
+
+ __webpack_require__(342);
+ __webpack_require__(343);
+
+ __webpack_require__(298);
+ __webpack_require__(299);
+
+
+
+/***/ },
+/* 342 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * @file Data zoom model
+ */
+
+
+ var DataZoomModel = __webpack_require__(288);
+
+ module.exports = DataZoomModel.extend({
+
+ type: 'dataZoom.select'
+
+ });
+
+
+
+/***/ },
+/* 343 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ module.exports = __webpack_require__(290).extend({
+
+ type: 'dataZoom.select'
+
+ });
+
+
+
+/***/ },
+/* 344 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+
+ var history = __webpack_require__(340);
+
+ function Restore(model) {
+ this.model = model;
+ }
+
+ Restore.defaultOption = {
+ show: true,
+ icon: 'M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5',
+ title: '还原'
+ };
+
+ var proto = Restore.prototype;
+
+ proto.onclick = function (ecModel, api, type) {
+ history.clear(ecModel);
+
+ api.dispatchAction({
+ type: 'restore',
+ from: this.uid
+ });
+ };
+
+
+ __webpack_require__(333).register('restore', Restore);
+
+
+ __webpack_require__(1).registerAction(
+ {type: 'restore', event: 'restore', update: 'prepareAndUpdate'},
+ function (payload, ecModel) {
+ ecModel.resetOption('recreate');
+ }
+ );
+
+ module.exports = Restore;
+
+
+/***/ },
+/* 345 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+ __webpack_require__(346);
+ __webpack_require__(77).registerPainter('vml', __webpack_require__(348));
+
+
+/***/ },
+/* 346 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // http://www.w3.org/TR/NOTE-VML
+ // TODO Use proxy like svg instead of overwrite brush methods
+
+
+ if (!__webpack_require__(78).canvasSupported) {
+ var vec2 = __webpack_require__(16);
+ var BoundingRect = __webpack_require__(15);
+ var CMD = __webpack_require__(48).CMD;
+ var colorTool = __webpack_require__(38);
+ var textContain = __webpack_require__(14);
+ var RectText = __webpack_require__(47);
+ var Displayable = __webpack_require__(45);
+ var ZImage = __webpack_require__(59);
+ var Text = __webpack_require__(62);
+ var Path = __webpack_require__(44);
+
+ var Gradient = __webpack_require__(4);
+
+ var vmlCore = __webpack_require__(347);
+
+ var round = Math.round;
+ var sqrt = Math.sqrt;
+ var abs = Math.abs;
+ var cos = Math.cos;
+ var sin = Math.sin;
+ var mathMax = Math.max;
+
+ var applyTransform = vec2.applyTransform;
+
+ var comma = ',';
+ var imageTransformPrefix = 'progid:DXImageTransform.Microsoft';
+
+ var Z = 21600;
+ var Z2 = Z / 2;
+
+ var ZLEVEL_BASE = 100000;
+ var Z_BASE = 1000;
+
+ var initRootElStyle = function (el) {
+ el.style.cssText = 'position:absolute;left:0;top:0;width:1px;height:1px;';
+ el.coordsize = Z + ',' + Z;
+ el.coordorigin = '0,0';
+ };
+
+ var encodeHtmlAttribute = function (s) {
+ return String(s).replace(/&/g, '&amp;').replace(/"/g, '&quot;');
+ };
+
+ var rgb2Str = function (r, g, b) {
+ return 'rgb(' + [r, g, b].join(',') + ')';
+ };
+
+ var append = function (parent, child) {
+ if (child && parent && child.parentNode !== parent) {
+ parent.appendChild(child);
+ }
+ };
+
+ var remove = function (parent, child) {
+ if (child && parent && child.parentNode === parent) {
+ parent.removeChild(child);
+ }
+ };
+
+ var getZIndex = function (zlevel, z, z2) {
+ // z çš„å–值范围为 [0, 1000]
+ return (parseFloat(zlevel) || 0) * ZLEVEL_BASE + (parseFloat(z) || 0) * Z_BASE + z2;
+ };
+
+ var parsePercent = function (value, maxValue) {
+ if (typeof value === 'string') {
+ if (value.lastIndexOf('%') >= 0) {
+ return parseFloat(value) / 100 * maxValue;
+ }
+ return parseFloat(value);
+ }
+ return value;
+ };
+
+ /***************************************************
+ * PATH
+ **************************************************/
+
+ var setColorAndOpacity = function (el, color, opacity) {
+ var colorArr = colorTool.parse(color);
+ opacity = +opacity;
+ if (isNaN(opacity)) {
+ opacity = 1;
+ }
+ if (colorArr) {
+ el.color = rgb2Str(colorArr[0], colorArr[1], colorArr[2]);
+ el.opacity = opacity * colorArr[3];
+ }
+ };
+
+ var getColorAndAlpha = function (color) {
+ var colorArr = colorTool.parse(color);
+ return [
+ rgb2Str(colorArr[0], colorArr[1], colorArr[2]),
+ colorArr[3]
+ ];
+ };
+
+ var updateFillNode = function (el, style, zrEl) {
+ // TODO pattern
+ var fill = style.fill;
+ if (fill != null) {
+ // Modified from excanvas
+ if (fill instanceof Gradient) {
+ var gradientType;
+ var angle = 0;
+ var focus = [0, 0];
+ // additional offset
+ var shift = 0;
+ // scale factor for offset
+ var expansion = 1;
+ var rect = zrEl.getBoundingRect();
+ var rectWidth = rect.width;
+ var rectHeight = rect.height;
+ if (fill.type === 'linear') {
+ gradientType = 'gradient';
+ var transform = zrEl.transform;
+ var p0 = [fill.x * rectWidth, fill.y * rectHeight];
+ var p1 = [fill.x2 * rectWidth, fill.y2 * rectHeight];
+ if (transform) {
+ applyTransform(p0, p0, transform);
+ applyTransform(p1, p1, transform);
+ }
+ var dx = p1[0] - p0[0];
+ var dy = p1[1] - p0[1];
+ angle = Math.atan2(dx, dy) * 180 / Math.PI;
+ // The angle should be a non-negative number.
+ if (angle < 0) {
+ angle += 360;
+ }
+
+ // Very small angles produce an unexpected result because they are
+ // converted to a scientific notation string.
+ if (angle < 1e-6) {
+ angle = 0;
+ }
+ }
+ else {
+ gradientType = 'gradientradial';
+ var p0 = [fill.x * rectWidth, fill.y * rectHeight];
+ var transform = zrEl.transform;
+ var scale = zrEl.scale;
+ var width = rectWidth;
+ var height = rectHeight;
+ focus = [
+ // Percent in bounding rect
+ (p0[0] - rect.x) / width,
+ (p0[1] - rect.y) / height
+ ];
+ if (transform) {
+ applyTransform(p0, p0, transform);
+ }
+
+ width /= scale[0] * Z;
+ height /= scale[1] * Z;
+ var dimension = mathMax(width, height);
+ shift = 2 * 0 / dimension;
+ expansion = 2 * fill.r / dimension - shift;
+ }
+
+ // We need to sort the color stops in ascending order by offset,
+ // otherwise IE won't interpret it correctly.
+ var stops = fill.colorStops.slice();
+ stops.sort(function(cs1, cs2) {
+ return cs1.offset - cs2.offset;
+ });
+
+ var length = stops.length;
+ // Color and alpha list of first and last stop
+ var colorAndAlphaList = [];
+ var colors = [];
+ for (var i = 0; i < length; i++) {
+ var stop = stops[i];
+ var colorAndAlpha = getColorAndAlpha(stop.color);
+ colors.push(stop.offset * expansion + shift + ' ' + colorAndAlpha[0]);
+ if (i === 0 || i === length - 1) {
+ colorAndAlphaList.push(colorAndAlpha);
+ }
+ }
+
+ if (length >= 2) {
+ var color1 = colorAndAlphaList[0][0];
+ var color2 = colorAndAlphaList[1][0];
+ var opacity1 = colorAndAlphaList[0][1] * style.opacity;
+ var opacity2 = colorAndAlphaList[1][1] * style.opacity;
+
+ el.type = gradientType;
+ el.method = 'none';
+ el.focus = '100%';
+ el.angle = angle;
+ el.color = color1;
+ el.color2 = color2;
+ el.colors = colors.join(',');
+ // When colors attribute is used, the meanings of opacity and o:opacity2
+ // are reversed.
+ el.opacity = opacity2;
+ // FIXME g_o_:opacity ?
+ el.opacity2 = opacity1;
+ }
+ if (gradientType === 'radial') {
+ el.focusposition = focus.join(',');
+ }
+ }
+ else {
+ // FIXME Change from Gradient fill to color fill
+ setColorAndOpacity(el, fill, style.opacity);
+ }
+ }
+ };
+
+ var updateStrokeNode = function (el, style) {
+ if (style.lineJoin != null) {
+ el.joinstyle = style.lineJoin;
+ }
+ if (style.miterLimit != null) {
+ el.miterlimit = style.miterLimit * Z;
+ }
+ if (style.lineCap != null) {
+ el.endcap = style.lineCap;
+ }
+ if (style.lineDash != null) {
+ el.dashstyle = style.lineDash.join(' ');
+ }
+ if (style.stroke != null && !(style.stroke instanceof Gradient)) {
+ setColorAndOpacity(el, style.stroke, style.opacity);
+ }
+ };
+
+ var updateFillAndStroke = function (vmlEl, type, style, zrEl) {
+ var isFill = type == 'fill';
+ var el = vmlEl.getElementsByTagName(type)[0];
+ // Stroke must have lineWidth
+ if (style[type] != null && style[type] !== 'none' && (isFill || (!isFill && style.lineWidth))) {
+ vmlEl[isFill ? 'filled' : 'stroked'] = 'true';
+ // FIXME Remove before updating, or set `colors` will throw error
+ if (style[type] instanceof Gradient) {
+ remove(vmlEl, el);
+ }
+ if (!el) {
+ el = vmlCore.createNode(type);
+ }
+
+ isFill ? updateFillNode(el, style, zrEl) : updateStrokeNode(el, style);
+ append(vmlEl, el);
+ }
+ else {
+ vmlEl[isFill ? 'filled' : 'stroked'] = 'false';
+ remove(vmlEl, el);
+ }
+ };
+
+ var points = [[], [], []];
+ var pathDataToString = function (data, m) {
+ var M = CMD.M;
+ var C = CMD.C;
+ var L = CMD.L;
+ var A = CMD.A;
+ var Q = CMD.Q;
+
+ var str = [];
+ var nPoint;
+ var cmdStr;
+ var cmd;
+ var i;
+ var xi;
+ var yi;
+ for (i = 0; i < data.length;) {
+ cmd = data[i++];
+ cmdStr = '';
+ nPoint = 0;
+ switch (cmd) {
+ case M:
+ cmdStr = ' m ';
+ nPoint = 1;
+ xi = data[i++];
+ yi = data[i++];
+ points[0][0] = xi;
+ points[0][1] = yi;
+ break;
+ case L:
+ cmdStr = ' l ';
+ nPoint = 1;
+ xi = data[i++];
+ yi = data[i++];
+ points[0][0] = xi;
+ points[0][1] = yi;
+ break;
+ case Q:
+ case C:
+ cmdStr = ' c ';
+ nPoint = 3;
+ var x1 = data[i++];
+ var y1 = data[i++];
+ var x2 = data[i++];
+ var y2 = data[i++];
+ var x3;
+ var y3;
+ if (cmd === Q) {
+ // Convert quadratic to cubic using degree elevation
+ x3 = x2;
+ y3 = y2;
+ x2 = (x2 + 2 * x1) / 3;
+ y2 = (y2 + 2 * y1) / 3;
+ x1 = (xi + 2 * x1) / 3;
+ y1 = (yi + 2 * y1) / 3;
+ }
+ else {
+ x3 = data[i++];
+ y3 = data[i++];
+ }
+ points[0][0] = x1;
+ points[0][1] = y1;
+ points[1][0] = x2;
+ points[1][1] = y2;
+ points[2][0] = x3;
+ points[2][1] = y3;
+
+ xi = x3;
+ yi = y3;
+ break;
+ case A:
+ var x = 0;
+ var y = 0;
+ var sx = 1;
+ var sy = 1;
+ var angle = 0;
+ if (m) {
+ // Extract SRT from matrix
+ x = m[4];
+ y = m[5];
+ sx = sqrt(m[0] * m[0] + m[1] * m[1]);
+ sy = sqrt(m[2] * m[2] + m[3] * m[3]);
+ angle = Math.atan2(-m[1] / sy, m[0] / sx);
+ }
+
+ var cx = data[i++];
+ var cy = data[i++];
+ var rx = data[i++];
+ var ry = data[i++];
+ var startAngle = data[i++] + angle;
+ var endAngle = data[i++] + startAngle + angle;
+ // FIXME
+ // var psi = data[i++];
+ i++;
+ var clockwise = data[i++];
+
+ var x0 = cx + cos(startAngle) * rx;
+ var y0 = cy + sin(startAngle) * ry;
+
+ var x1 = cx + cos(endAngle) * rx;
+ var y1 = cy + sin(endAngle) * ry;
+
+ var type = clockwise ? ' wa ' : ' at ';
+
+ str.push(
+ type,
+ round(((cx - rx) * sx + x) * Z - Z2), comma,
+ round(((cy - ry) * sy + y) * Z - Z2), comma,
+ round(((cx + rx) * sx + x) * Z - Z2), comma,
+ round(((cy + ry) * sy + y) * Z - Z2), comma,
+ round((x0 * sx + x) * Z - Z2), comma,
+ round((y0 * sy + y) * Z - Z2), comma,
+ round((x1 * sx + x) * Z - Z2), comma,
+ round((y1 * sy + y) * Z - Z2)
+ );
+
+ xi = x1;
+ yi = y1;
+ break;
+ case CMD.R:
+ var p0 = points[0];
+ var p1 = points[1];
+ // x0, y0
+ p0[0] = data[i++];
+ p0[1] = data[i++];
+ // x1, y1
+ p1[0] = p0[0] + data[i++];
+ p1[1] = p0[1] + data[i++];
+
+ if (m) {
+ applyTransform(p0, p0, m);
+ applyTransform(p1, p1, m);
+ }
+
+ p0[0] = round(p0[0] * Z - Z2);
+ p1[0] = round(p1[0] * Z - Z2);
+ p0[1] = round(p0[1] * Z - Z2);
+ p1[1] = round(p1[1] * Z - Z2);
+ str.push(
+ // x0, y0
+ ' m ', p0[0], comma, p0[1],
+ // x1, y0
+ ' l ', p1[0], comma, p0[1],
+ // x1, y1
+ ' l ', p1[0], comma, p1[1],
+ // x0, y1
+ ' l ', p0[0], comma, p1[1]
+ );
+ break;
+ case CMD.Z:
+ // FIXME Update xi, yi
+ str.push(' x ');
+ }
+
+ if (nPoint > 0) {
+ str.push(cmdStr);
+ for (var k = 0; k < nPoint; k++) {
+ var p = points[k];
+
+ m && applyTransform(p, p, m);
+ // ä¸ round 会éžå¸¸æ…¢
+ str.push(
+ round(p[0] * Z - Z2), comma, round(p[1] * Z - Z2),
+ k < nPoint - 1 ? comma : ''
+ );
+ }
+ }
+ }
+ return str.join('');
+ };
+
+ // Rewrite the original path method
+ Path.prototype.brushVML = function (vmlRoot) {
+ var style = this.style;
+
+ var vmlEl = this._vmlEl;
+ if (!vmlEl) {
+ vmlEl = vmlCore.createNode('shape');
+ initRootElStyle(vmlEl);
+
+ this._vmlEl = vmlEl;
+ }
+
+ updateFillAndStroke(vmlEl, 'fill', style, this);
+ updateFillAndStroke(vmlEl, 'stroke', style, this);
+
+ var m = this.transform;
+ var needTransform = m != null;
+ var strokeEl = vmlEl.getElementsByTagName('stroke')[0];
+ if (strokeEl) {
+ var lineWidth = style.lineWidth;
+ // Get the line scale.
+ // Determinant of this.m_ means how much the area is enlarged by the
+ // transformation. So its square root can be used as a scale factor
+ // for width.
+ if (needTransform && !style.strokeNoScale) {
+ var det = m[0] * m[3] - m[1] * m[2];
+ lineWidth *= sqrt(abs(det));
+ }
+ strokeEl.weight = lineWidth + 'px';
+ }
+
+ var path = this.path;
+ if (this.__dirtyPath) {
+ path.beginPath();
+ this.buildPath(path, this.shape);
+ this.__dirtyPath = false;
+ }
+
+ vmlEl.path = pathDataToString(path.data, this.transform);
+
+ vmlEl.style.zIndex = getZIndex(this.zlevel, this.z, this.z2);
+
+ // Append to root
+ append(vmlRoot, vmlEl);
+
+ // Text
+ if (style.text) {
+ this.drawRectText(vmlRoot, this.getBoundingRect());
+ }
+ };
+
+ Path.prototype.onRemove = function (vmlRoot) {
+ remove(vmlRoot, this._vmlEl);
+ this.removeRectText(vmlRoot);
+ };
+
+ Path.prototype.onAdd = function (vmlRoot) {
+ append(vmlRoot, this._vmlEl);
+ this.appendRectText(vmlRoot);
+ };
+
+ /***************************************************
+ * IMAGE
+ **************************************************/
+ var isImage = function (img) {
+ // FIXME img instanceof Image 如果 img 是一个字符串的时候,IE8 下会报错
+ return (typeof img === 'object') && img.tagName && img.tagName.toUpperCase() === 'IMG';
+ // return img instanceof Image;
+ };
+
+ // Rewrite the original path method
+ ZImage.prototype.brushVML = function (vmlRoot) {
+ var style = this.style;
+ var image = style.image;
+
+ // Image original width, height
+ var ow;
+ var oh;
+
+ if (isImage(image)) {
+ var src = image.src;
+ if (src === this._imageSrc) {
+ ow = this._imageWidth;
+ oh = this._imageHeight;
+ }
+ else {
+ var imageRuntimeStyle = image.runtimeStyle;
+ var oldRuntimeWidth = imageRuntimeStyle.width;
+ var oldRuntimeHeight = imageRuntimeStyle.height;
+ imageRuntimeStyle.width = 'auto';
+ imageRuntimeStyle.height = 'auto';
+
+ // get the original size
+ ow = image.width;
+ oh = image.height;
+
+ // and remove overides
+ imageRuntimeStyle.width = oldRuntimeWidth;
+ imageRuntimeStyle.height = oldRuntimeHeight;
+
+ // Caching image original width, height and src
+ this._imageSrc = src;
+ this._imageWidth = ow;
+ this._imageHeight = oh;
+ }
+ image = src;
+ }
+ else {
+ if (image === this._imageSrc) {
+ ow = this._imageWidth;
+ oh = this._imageHeight;
+ }
+ }
+ if (!image) {
+ return;
+ }
+
+ var x = style.x || 0;
+ var y = style.y || 0;
+
+ var dw = style.width;
+ var dh = style.height;
+
+ var sw = style.sWidth;
+ var sh = style.sHeight;
+ var sx = style.sx || 0;
+ var sy = style.sy || 0;
+
+ var hasCrop = sw && sh;
+
+ var vmlEl = this._vmlEl;
+ if (!vmlEl) {
+ // FIXME 使用 group 在 left, top 都ä¸æ˜¯ 0 的时候就无法显示了。
+ // vmlEl = vmlCore.createNode('group');
+ vmlEl = vmlCore.doc.createElement('div');
+ initRootElStyle(vmlEl);
+
+ this._vmlEl = vmlEl;
+ }
+
+ var vmlElStyle = vmlEl.style;
+ var hasRotation = false;
+ var m;
+ var scaleX = 1;
+ var scaleY = 1;
+ if (this.transform) {
+ m = this.transform;
+ scaleX = sqrt(m[0] * m[0] + m[1] * m[1]);
+ scaleY = sqrt(m[2] * m[2] + m[3] * m[3]);
+
+ hasRotation = m[1] || m[2];
+ }
+ if (hasRotation) {
+ // If filters are necessary (rotation exists), create them
+ // filters are bog-slow, so only create them if abbsolutely necessary
+ // The following check doesn't account for skews (which don't exist
+ // in the canvas spec (yet) anyway.
+ // From excanvas
+ var p0 = [x, y];
+ var p1 = [x + dw, y];
+ var p2 = [x, y + dh];
+ var p3 = [x + dw, y + dh];
+ applyTransform(p0, p0, m);
+ applyTransform(p1, p1, m);
+ applyTransform(p2, p2, m);
+ applyTransform(p3, p3, m);
+
+ var maxX = mathMax(p0[0], p1[0], p2[0], p3[0]);
+ var maxY = mathMax(p0[1], p1[1], p2[1], p3[1]);
+
+ var transformFilter = [];
+ transformFilter.push('M11=', m[0] / scaleX, comma,
+ 'M12=', m[2] / scaleY, comma,
+ 'M21=', m[1] / scaleX, comma,
+ 'M22=', m[3] / scaleY, comma,
+ 'Dx=', round(x * scaleX + m[4]), comma,
+ 'Dy=', round(y * scaleY + m[5]));
+
+ vmlElStyle.padding = '0 ' + round(maxX) + 'px ' + round(maxY) + 'px 0';
+ // FIXME DXImageTransform 在 IE11 的兼容模å¼ä¸‹ä¸èµ·ä½œç”¨
+ vmlElStyle.filter = imageTransformPrefix + '.Matrix('
+ + transformFilter.join('') + ', SizingMethod=clip)';
+
+ }
+ else {
+ if (m) {
+ x = x * scaleX + m[4];
+ y = y * scaleY + m[5];
+ }
+ vmlElStyle.filter = '';
+ vmlElStyle.left = round(x) + 'px';
+ vmlElStyle.top = round(y) + 'px';
+ }
+
+ var imageEl = this._imageEl;
+ var cropEl = this._cropEl;
+
+ if (! imageEl) {
+ imageEl = vmlCore.doc.createElement('div');
+ this._imageEl = imageEl;
+ }
+ var imageELStyle = imageEl.style;
+ if (hasCrop) {
+ // Needs know image original width and height
+ if (! (ow && oh)) {
+ var tmpImage = new Image();
+ var self = this;
+ tmpImage.onload = function () {
+ tmpImage.onload = null;
+ ow = tmpImage.width;
+ oh = tmpImage.height;
+ // Adjust image width and height to fit the ratio destinationSize / sourceSize
+ imageELStyle.width = round(scaleX * ow * dw / sw) + 'px';
+ imageELStyle.height = round(scaleY * oh * dh / sh) + 'px';
+
+ // Caching image original width, height and src
+ self._imageWidth = ow;
+ self._imageHeight = oh;
+ self._imageSrc = image;
+ };
+ tmpImage.src = image;
+ }
+ else {
+ imageELStyle.width = round(scaleX * ow * dw / sw) + 'px';
+ imageELStyle.height = round(scaleY * oh * dh / sh) + 'px';
+ }
+
+ if (! cropEl) {
+ cropEl = vmlCore.doc.createElement('div');
+ cropEl.style.overflow = 'hidden';
+ this._cropEl = cropEl;
+ }
+ var cropElStyle = cropEl.style;
+ cropElStyle.width = round((dw + sx * dw / sw) * scaleX);
+ cropElStyle.height = round((dh + sy * dh / sh) * scaleY);
+ cropElStyle.filter = imageTransformPrefix + '.Matrix(Dx='
+ + (-sx * dw / sw * scaleX) + ',Dy=' + (-sy * dh / sh * scaleY) + ')';
+
+ if (! cropEl.parentNode) {
+ vmlEl.appendChild(cropEl);
+ }
+ if (imageEl.parentNode != cropEl) {
+ cropEl.appendChild(imageEl);
+ }
+ }
+ else {
+ imageELStyle.width = round(scaleX * dw) + 'px';
+ imageELStyle.height = round(scaleY * dh) + 'px';
+
+ vmlEl.appendChild(imageEl);
+
+ if (cropEl && cropEl.parentNode) {
+ vmlEl.removeChild(cropEl);
+ this._cropEl = null;
+ }
+ }
+
+ var filterStr = '';
+ var alpha = style.opacity;
+ if (alpha < 1) {
+ filterStr += '.Alpha(opacity=' + round(alpha * 100) + ') ';
+ }
+ filterStr += imageTransformPrefix + '.AlphaImageLoader(src=' + image + ', SizingMethod=scale)';
+
+ imageELStyle.filter = filterStr;
+
+ vmlEl.style.zIndex = getZIndex(this.zlevel, this.z, this.z2);
+
+ // Append to root
+ append(vmlRoot, vmlEl);
+
+ // Text
+ if (style.text) {
+ this.drawRectText(vmlRoot, this.getBoundingRect());
+ }
+ };
+
+ ZImage.prototype.onRemove = function (vmlRoot) {
+ remove(vmlRoot, this._vmlEl);
+
+ this._vmlEl = null;
+ this._cropEl = null;
+ this._imageEl = null;
+
+ this.removeRectText(vmlRoot);
+ };
+
+ ZImage.prototype.onAdd = function (vmlRoot) {
+ append(vmlRoot, this._vmlEl);
+ this.appendRectText(vmlRoot);
+ };
+
+
+ /***************************************************
+ * TEXT
+ **************************************************/
+
+ var DEFAULT_STYLE_NORMAL = 'normal';
+
+ var fontStyleCache = {};
+ var fontStyleCacheCount = 0;
+ var MAX_FONT_CACHE_SIZE = 100;
+ var fontEl = document.createElement('div');
+
+ var getFontStyle = function (fontString) {
+ var fontStyle = fontStyleCache[fontString];
+ if (!fontStyle) {
+ // Clear cache
+ if (fontStyleCacheCount > MAX_FONT_CACHE_SIZE) {
+ fontStyleCacheCount = 0;
+ fontStyleCache = {};
+ }
+
+ var style = fontEl.style;
+ var fontFamily;
+ try {
+ style.font = fontString;
+ fontFamily = style.fontFamily.split(',')[0];
+ }
+ catch (e) {
+ }
+
+ fontStyle = {
+ style: style.fontStyle || DEFAULT_STYLE_NORMAL,
+ variant: style.fontVariant || DEFAULT_STYLE_NORMAL,
+ weight: style.fontWeight || DEFAULT_STYLE_NORMAL,
+ size: parseFloat(style.fontSize || 12) | 0,
+ family: fontFamily || 'Microsoft YaHei'
+ };
+
+ fontStyleCache[fontString] = fontStyle;
+ fontStyleCacheCount++;
+ }
+ return fontStyle;
+ };
+
+ var textMeasureEl;
+ // Overwrite measure text method
+ textContain.measureText = function (text, textFont) {
+ var doc = vmlCore.doc;
+ if (!textMeasureEl) {
+ textMeasureEl = doc.createElement('div');
+ textMeasureEl.style.cssText = 'position:absolute;top:-20000px;left:0;'
+ + 'padding:0;margin:0;border:none;white-space:pre;';
+ vmlCore.doc.body.appendChild(textMeasureEl);
+ }
+
+ try {
+ textMeasureEl.style.font = textFont;
+ } catch (ex) {
+ // Ignore failures to set to invalid font.
+ }
+ textMeasureEl.innerHTML = '';
+ // Don't use innerHTML or innerText because they allow markup/whitespace.
+ textMeasureEl.appendChild(doc.createTextNode(text));
+ return {
+ width: textMeasureEl.offsetWidth
+ };
+ };
+
+ var tmpRect = new BoundingRect();
+
+ var drawRectText = function (vmlRoot, rect, textRect, fromTextEl) {
+
+ var style = this.style;
+ var text = style.text;
+ if (!text) {
+ return;
+ }
+
+ var x;
+ var y;
+ var align = style.textAlign;
+ var fontStyle = getFontStyle(style.textFont);
+ // FIXME encodeHtmlAttribute ?
+ var font = fontStyle.style + ' ' + fontStyle.variant + ' ' + fontStyle.weight + ' '
+ + fontStyle.size + 'px "' + fontStyle.family + '"';
+ var baseline = style.textBaseline;
+ var verticalAlign = style.textVerticalAlign;
+
+ textRect = textRect || textContain.getBoundingRect(text, font, align, baseline);
+
+ // Transform rect to view space
+ var m = this.transform;
+ // Ignore transform for text in other element
+ if (m && !fromTextEl) {
+ tmpRect.copy(rect);
+ tmpRect.applyTransform(m);
+ rect = tmpRect;
+ }
+
+ if (!fromTextEl) {
+ var textPosition = style.textPosition;
+ var distance = style.textDistance;
+ // Text position represented by coord
+ if (textPosition instanceof Array) {
+ x = rect.x + parsePercent(textPosition[0], rect.width);
+ y = rect.y + parsePercent(textPosition[1], rect.height);
+
+ align = align || 'left';
+ baseline = baseline || 'top';
+ }
+ else {
+ var res = textContain.adjustTextPositionOnRect(
+ textPosition, rect, textRect, distance
+ );
+ x = res.x;
+ y = res.y;
+
+ // Default align and baseline when has textPosition
+ align = align || res.textAlign;
+ baseline = baseline || res.textBaseline;
+ }
+ }
+ else {
+ x = rect.x;
+ y = rect.y;
+ }
+ if (verticalAlign) {
+ switch (verticalAlign) {
+ case 'middle':
+ y -= textRect.height / 2;
+ break;
+ case 'bottom':
+ y -= textRect.height;
+ break;
+ // 'top'
+ }
+ // Ignore baseline
+ baseline = 'top';
+ }
+
+ var fontSize = fontStyle.size;
+ // 1.75 is an arbitrary number, as there is no info about the text baseline
+ switch (baseline) {
+ case 'hanging':
+ case 'top':
+ y += fontSize / 1.75;
+ break;
+ case 'middle':
+ break;
+ default:
+ // case null:
+ // case 'alphabetic':
+ // case 'ideographic':
+ // case 'bottom':
+ y -= fontSize / 2.25;
+ break;
+ }
+ switch (align) {
+ case 'left':
+ break;
+ case 'center':
+ x -= textRect.width / 2;
+ break;
+ case 'right':
+ x -= textRect.width;
+ break;
+ // case 'end':
+ // align = elementStyle.direction == 'ltr' ? 'right' : 'left';
+ // break;
+ // case 'start':
+ // align = elementStyle.direction == 'rtl' ? 'right' : 'left';
+ // break;
+ // default:
+ // align = 'left';
+ }
+
+ var createNode = vmlCore.createNode;
+
+ var textVmlEl = this._textVmlEl;
+ var pathEl;
+ var textPathEl;
+ var skewEl;
+ if (!textVmlEl) {
+ textVmlEl = createNode('line');
+ pathEl = createNode('path');
+ textPathEl = createNode('textpath');
+ skewEl = createNode('skew');
+
+ // FIXME Why here is not cammel case
+ // Align 'center' seems wrong
+ textPathEl.style['v-text-align'] = 'left';
+
+ initRootElStyle(textVmlEl);
+
+ pathEl.textpathok = true;
+ textPathEl.on = true;
+
+ textVmlEl.from = '0 0';
+ textVmlEl.to = '1000 0.05';
+
+ append(textVmlEl, skewEl);
+ append(textVmlEl, pathEl);
+ append(textVmlEl, textPathEl);
+
+ this._textVmlEl = textVmlEl;
+ }
+ else {
+ // 这里是在å‰é¢ appendChild ä¿è¯é¡ºåºçš„å‰æ下
+ skewEl = textVmlEl.firstChild;
+ pathEl = skewEl.nextSibling;
+ textPathEl = pathEl.nextSibling;
+ }
+
+ var coords = [x, y];
+ var textVmlElStyle = textVmlEl.style;
+ // Ignore transform for text in other element
+ if (m && fromTextEl) {
+ applyTransform(coords, coords, m);
+
+ skewEl.on = true;
+
+ skewEl.matrix = m[0].toFixed(3) + comma + m[2].toFixed(3) + comma +
+ m[1].toFixed(3) + comma + m[3].toFixed(3) + ',0,0';
+
+ // Text position
+ skewEl.offset = (round(coords[0]) || 0) + ',' + (round(coords[1]) || 0);
+ // Left top point as origin
+ skewEl.origin = '0 0';
+
+ textVmlElStyle.left = '0px';
+ textVmlElStyle.top = '0px';
+ }
+ else {
+ skewEl.on = false;
+ textVmlElStyle.left = round(x) + 'px';
+ textVmlElStyle.top = round(y) + 'px';
+ }
+
+ textPathEl.string = encodeHtmlAttribute(text);
+ // TODO
+ try {
+ textPathEl.style.font = font;
+ }
+ // Error font format
+ catch (e) {}
+
+ updateFillAndStroke(textVmlEl, 'fill', {
+ fill: fromTextEl ? style.fill : style.textFill,
+ opacity: style.opacity
+ }, this);
+ updateFillAndStroke(textVmlEl, 'stroke', {
+ stroke: fromTextEl ? style.stroke : style.textStroke,
+ opacity: style.opacity,
+ lineDash: style.lineDash
+ }, this);
+
+ textVmlEl.style.zIndex = getZIndex(this.zlevel, this.z, this.z2);
+
+ // Attached to root
+ append(vmlRoot, textVmlEl);
+ };
+
+ var removeRectText = function (vmlRoot) {
+ remove(vmlRoot, this._textVmlEl);
+ this._textVmlEl = null;
+ };
+
+ var appendRectText = function (vmlRoot) {
+ append(vmlRoot, this._textVmlEl);
+ };
+
+ var list = [RectText, Displayable, ZImage, Path, Text];
+
+ // In case Displayable has been mixed in RectText
+ for (var i = 0; i < list.length; i++) {
+ var proto = list[i].prototype;
+ proto.drawRectText = drawRectText;
+ proto.removeRectText = removeRectText;
+ proto.appendRectText = appendRectText;
+ }
+
+ Text.prototype.brushVML = function (root) {
+ var style = this.style;
+ if (style.text) {
+ this.drawRectText(root, {
+ x: style.x || 0, y: style.y || 0,
+ width: 0, height: 0
+ }, this.getBoundingRect(), true);
+ }
+ };
+
+ Text.prototype.onRemove = function (vmlRoot) {
+ this.removeRectText(vmlRoot);
+ };
+
+ Text.prototype.onAdd = function (vmlRoot) {
+ this.appendRectText(vmlRoot);
+ };
+ }
+
+
+/***/ },
+/* 347 */
+/***/ function(module, exports, __webpack_require__) {
+
+
+
+ if (!__webpack_require__(78).canvasSupported) {
+ var urn = 'urn:schemas-microsoft-com:vml';
+
+ var createNode;
+ var win = window;
+ var doc = win.document;
+
+ var vmlInited = false;
+
+ try {
+ !doc.namespaces.zrvml && doc.namespaces.add('zrvml', urn);
+ createNode = function (tagName) {
+ return doc.createElement('<zrvml:' + tagName + ' class="zrvml">');
+ };
+ }
+ catch (e) {
+ createNode = function (tagName) {
+ return doc.createElement('<' + tagName + ' xmlns="' + urn + '" class="zrvml">');
+ };
+ }
+
+ // From raphael
+ var initVML = function () {
+ if (vmlInited) {
+ return;
+ }
+ vmlInited = true;
+
+ var styleSheets = doc.styleSheets;
+ if (styleSheets.length < 31) {
+ doc.createStyleSheet().addRule('.zrvml', 'behavior:url(#default#VML)');
+ }
+ else {
+ // http://msdn.microsoft.com/en-us/library/ms531194%28VS.85%29.aspx
+ styleSheets[0].addRule('.zrvml', 'behavior:url(#default#VML)');
+ }
+ };
+
+ // Not useing return to avoid error when converting to CommonJS module
+ module.exports = {
+ doc: doc,
+ initVML: initVML,
+ createNode: createNode
+ };
+ }
+
+
+/***/ },
+/* 348 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /**
+ * VML Painter.
+ *
+ * @module zrender/vml/Painter
+ */
+
+
+
+ var zrLog = __webpack_require__(39);
+ var vmlCore = __webpack_require__(347);
+
+ function parseInt10(val) {
+ return parseInt(val, 10);
+ }
+
+ /**
+ * @alias module:zrender/vml/Painter
+ */
+ function VMLPainter(root, storage) {
+
+ vmlCore.initVML();
+
+ this.root = root;
+
+ this.storage = storage;
+
+ var vmlViewport = document.createElement('div');
+
+ var vmlRoot = document.createElement('div');
+
+ vmlViewport.style.cssText = 'display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;';
+
+ vmlRoot.style.cssText = 'position:absolute;left:0;top:0;';
+
+ root.appendChild(vmlViewport);
+
+ this._vmlRoot = vmlRoot;
+ this._vmlViewport = vmlViewport;
+
+ this.resize();
+
+ // Modify storage
+ var oldDelFromMap = storage.delFromMap;
+ var oldAddToMap = storage.addToMap;
+ storage.delFromMap = function (elId) {
+ var el = storage.get(elId);
+
+ oldDelFromMap.call(storage, elId);
+
+ if (el) {
+ el.onRemove && el.onRemove(vmlRoot);
+ }
+ };
+
+ storage.addToMap = function (el) {
+ // Displayable already has a vml node
+ el.onAdd && el.onAdd(vmlRoot);
+
+ oldAddToMap.call(storage, el);
+ };
+
+ this._firstPaint = true;
+ }
+
+ VMLPainter.prototype = {
+
+ constructor: VMLPainter,
+
+ /**
+ * @return {HTMLDivElement}
+ */
+ getViewportRoot: function () {
+ return this._vmlViewport;
+ },
+
+ /**
+ * 刷新
+ */
+ refresh: function () {
+
+ var list = this.storage.getDisplayList(true, true);
+
+ this._paintList(list);
+ },
+
+ _paintList: function (list) {
+ var vmlRoot = this._vmlRoot;
+ for (var i = 0; i < list.length; i++) {
+ var el = list[i];
+ if (el.invisible || el.ignore) {
+ if (!el.__alreadyNotVisible) {
+ el.onRemove(vmlRoot);
+ }
+ // Set as already invisible
+ el.__alreadyNotVisible = true;
+ }
+ else {
+ if (el.__alreadyNotVisible) {
+ el.onAdd(vmlRoot);
+ }
+ el.__alreadyNotVisible = false;
+ if (el.__dirty) {
+ el.beforeBrush && el.beforeBrush();
+ (el.brushVML || el.brush).call(el, vmlRoot);
+ el.afterBrush && el.afterBrush();
+ }
+ }
+ el.__dirty = false;
+ }
+
+ if (this._firstPaint) {
+ // Detached from document at first time
+ // to avoid page refreshing too many times
+
+ // FIXME 如果æ¯æ¬¡éƒ½å…ˆ removeChild å¯èƒ½ä¼šå¯¼è‡´ä¸€äº›å¡«å……å’Œæ边的效果改å˜
+ this._vmlViewport.appendChild(vmlRoot);
+ this._firstPaint = false;
+ }
+ },
+
+ resize: function () {
+ var width = this._getWidth();
+ var height = this._getHeight();
+
+ if (this._width != width && this._height != height) {
+ this._width = width;
+ this._height = height;
+
+ var vmlViewportStyle = this._vmlViewport.style;
+ vmlViewportStyle.width = width + 'px';
+ vmlViewportStyle.height = height + 'px';
+ }
+ },
+
+ dispose: function () {
+ this.root.innerHTML = '';
+
+ this._vmlRoot =
+ this._vmlViewport =
+ this.storage = null;
+ },
+
+ getWidth: function () {
+ return this._width;
+ },
+
+ getHeight: function () {
+ return this._height;
+ },
+
+ _getWidth: function () {
+ var root = this.root;
+ var stl = root.currentStyle;
+
+ return ((root.clientWidth || parseInt10(stl.width))
+ - parseInt10(stl.paddingLeft)
+ - parseInt10(stl.paddingRight)) | 0;
+ },
+
+ _getHeight: function () {
+ var root = this.root;
+ var stl = root.currentStyle;
+
+ return ((root.clientHeight || parseInt10(stl.height))
+ - parseInt10(stl.paddingTop)
+ - parseInt10(stl.paddingBottom)) | 0;
+ }
+ };
+
+ // Not supported methods
+ function createMethodNotSupport(method) {
+ return function () {
+ zrLog('In IE8.0 VML mode painter not support method "' + method + '"');
+ };
+ }
+
+ var notSupportedMethods = [
+ 'getLayer', 'insertLayer', 'eachLayer', 'eachBuildinLayer', 'eachOtherLayer', 'getLayers',
+ 'modLayer', 'delLayer', 'clearLayer', 'toDataURL', 'pathToImage'
+ ];
+
+ for (var i = 0; i < notSupportedMethods.length; i++) {
+ var name = notSupportedMethods[i];
+ VMLPainter.prototype[name] = createMethodNotSupport(name);
+ }
+
+ module.exports = VMLPainter;
+
+
+/***/ }
+/******/ ])
+});
+; \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/font-awesome/css/font-awesome.css b/common/src/main/webapp/thirdparty/font-awesome/css/font-awesome.css
new file mode 100644
index 0000000..4040b3c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/css/font-awesome.css
@@ -0,0 +1,1672 @@
+/*!
+ * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome
+ * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
+ */
+/* FONT PATH
+ * -------------------------- */
+@font-face {
+ font-family: 'FontAwesome';
+ src: url('../fonts/fontawesome-webfont.eot?v=4.2.0');
+ src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');
+ font-weight: normal;
+ font-style: normal;
+}
+.fa {
+ display: inline-block;
+ font: normal normal normal 14px/1 FontAwesome;
+ font-size: inherit;
+ text-rendering: auto;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+/* makes the font 33% larger relative to the icon container */
+.fa-lg {
+ font-size: 1.33333333em;
+ line-height: 0.75em;
+ vertical-align: -15%;
+}
+.fa-2x {
+ font-size: 2em;
+}
+.fa-3x {
+ font-size: 3em;
+}
+.fa-4x {
+ font-size: 4em;
+}
+.fa-5x {
+ font-size: 5em;
+}
+.fa-fw {
+ width: 1.28571429em;
+ text-align: center;
+}
+.fa-ul {
+ padding-left: 0;
+ margin-left: 2.14285714em;
+ list-style-type: none;
+}
+.fa-ul > li {
+ position: relative;
+}
+.fa-li {
+ position: absolute;
+ left: -2.14285714em;
+ width: 2.14285714em;
+ top: 0.14285714em;
+ text-align: center;
+}
+.fa-li.fa-lg {
+ left: -1.85714286em;
+}
+.fa-border {
+ padding: .2em .25em .15em;
+ border: solid 0.08em #eeeeee;
+ border-radius: .1em;
+}
+.pull-right {
+ float: right;
+}
+.pull-left {
+ float: left;
+}
+.fa.pull-left {
+ margin-right: .3em;
+}
+.fa.pull-right {
+ margin-left: .3em;
+}
+.fa-spin {
+ -webkit-animation: fa-spin 2s infinite linear;
+ animation: fa-spin 2s infinite linear;
+}
+@-webkit-keyframes fa-spin {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(359deg);
+ transform: rotate(359deg);
+ }
+}
+@keyframes fa-spin {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(359deg);
+ transform: rotate(359deg);
+ }
+}
+.fa-rotate-90 {
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
+ -webkit-transform: rotate(90deg);
+ -ms-transform: rotate(90deg);
+ transform: rotate(90deg);
+}
+.fa-rotate-180 {
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
+ -webkit-transform: rotate(180deg);
+ -ms-transform: rotate(180deg);
+ transform: rotate(180deg);
+}
+.fa-rotate-270 {
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
+ -webkit-transform: rotate(270deg);
+ -ms-transform: rotate(270deg);
+ transform: rotate(270deg);
+}
+.fa-flip-horizontal {
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);
+ -webkit-transform: scale(-1, 1);
+ -ms-transform: scale(-1, 1);
+ transform: scale(-1, 1);
+}
+.fa-flip-vertical {
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);
+ -webkit-transform: scale(1, -1);
+ -ms-transform: scale(1, -1);
+ transform: scale(1, -1);
+}
+:root .fa-rotate-90,
+:root .fa-rotate-180,
+:root .fa-rotate-270,
+:root .fa-flip-horizontal,
+:root .fa-flip-vertical {
+ filter: none;
+}
+.fa-stack {
+ position: relative;
+ display: inline-block;
+ width: 2em;
+ height: 2em;
+ line-height: 2em;
+ vertical-align: middle;
+}
+.fa-stack-1x,
+.fa-stack-2x {
+ position: absolute;
+ left: 0;
+ width: 100%;
+ text-align: center;
+}
+.fa-stack-1x {
+ line-height: inherit;
+}
+.fa-stack-2x {
+ font-size: 2em;
+}
+.fa-inverse {
+ color: #ffffff;
+}
+/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
+ readers do not read off random characters that represent icons */
+.fa-glass:before {
+ content: "\f000";
+}
+.fa-music:before {
+ content: "\f001";
+}
+.fa-search:before {
+ content: "\f002";
+}
+.fa-envelope-o:before {
+ content: "\f003";
+}
+.fa-heart:before {
+ content: "\f004";
+}
+.fa-star:before {
+ content: "\f005";
+}
+.fa-star-o:before {
+ content: "\f006";
+}
+.fa-user:before {
+ content: "\f007";
+}
+.fa-film:before {
+ content: "\f008";
+}
+.fa-th-large:before {
+ content: "\f009";
+}
+.fa-th:before {
+ content: "\f00a";
+}
+.fa-th-list:before {
+ content: "\f00b";
+}
+.fa-check:before {
+ content: "\f00c";
+}
+.fa-remove:before,
+.fa-close:before,
+.fa-times:before {
+ content: "\f00d";
+}
+.fa-search-plus:before {
+ content: "\f00e";
+}
+.fa-search-minus:before {
+ content: "\f010";
+}
+.fa-power-off:before {
+ content: "\f011";
+}
+.fa-signal:before {
+ content: "\f012";
+}
+.fa-gear:before,
+.fa-cog:before {
+ content: "\f013";
+}
+.fa-trash-o:before {
+ content: "\f014";
+}
+.fa-home:before {
+ content: "\f015";
+}
+.fa-file-o:before {
+ content: "\f016";
+}
+.fa-clock-o:before {
+ content: "\f017";
+}
+.fa-road:before {
+ content: "\f018";
+}
+.fa-download:before {
+ content: "\f019";
+}
+.fa-arrow-circle-o-down:before {
+ content: "\f01a";
+}
+.fa-arrow-circle-o-up:before {
+ content: "\f01b";
+}
+.fa-inbox:before {
+ content: "\f01c";
+}
+.fa-play-circle-o:before {
+ content: "\f01d";
+}
+.fa-rotate-right:before,
+.fa-repeat:before {
+ content: "\f01e";
+}
+.fa-refresh:before {
+ content: "\f021";
+}
+.fa-list-alt:before {
+ content: "\f022";
+}
+.fa-lock:before {
+ content: "\f023";
+}
+.fa-flag:before {
+ content: "\f024";
+}
+.fa-headphones:before {
+ content: "\f025";
+}
+.fa-volume-off:before {
+ content: "\f026";
+}
+.fa-volume-down:before {
+ content: "\f027";
+}
+.fa-volume-up:before {
+ content: "\f028";
+}
+.fa-qrcode:before {
+ content: "\f029";
+}
+.fa-barcode:before {
+ content: "\f02a";
+}
+.fa-tag:before {
+ content: "\f02b";
+}
+.fa-tags:before {
+ content: "\f02c";
+}
+.fa-book:before {
+ content: "\f02d";
+}
+.fa-bookmark:before {
+ content: "\f02e";
+}
+.fa-print:before {
+ content: "\f02f";
+}
+.fa-camera:before {
+ content: "\f030";
+}
+.fa-font:before {
+ content: "\f031";
+}
+.fa-bold:before {
+ content: "\f032";
+}
+.fa-italic:before {
+ content: "\f033";
+}
+.fa-text-height:before {
+ content: "\f034";
+}
+.fa-text-width:before {
+ content: "\f035";
+}
+.fa-align-left:before {
+ content: "\f036";
+}
+.fa-align-center:before {
+ content: "\f037";
+}
+.fa-align-right:before {
+ content: "\f038";
+}
+.fa-align-justify:before {
+ content: "\f039";
+}
+.fa-list:before {
+ content: "\f03a";
+}
+.fa-dedent:before,
+.fa-outdent:before {
+ content: "\f03b";
+}
+.fa-indent:before {
+ content: "\f03c";
+}
+.fa-video-camera:before {
+ content: "\f03d";
+}
+.fa-photo:before,
+.fa-image:before,
+.fa-picture-o:before {
+ content: "\f03e";
+}
+.fa-pencil:before {
+ content: "\f040";
+}
+.fa-map-marker:before {
+ content: "\f041";
+}
+.fa-adjust:before {
+ content: "\f042";
+}
+.fa-tint:before {
+ content: "\f043";
+}
+.fa-edit:before,
+.fa-pencil-square-o:before {
+ content: "\f044";
+}
+.fa-share-square-o:before {
+ content: "\f045";
+}
+.fa-check-square-o:before {
+ content: "\f046";
+}
+.fa-arrows:before {
+ content: "\f047";
+}
+.fa-step-backward:before {
+ content: "\f048";
+}
+.fa-fast-backward:before {
+ content: "\f049";
+}
+.fa-backward:before {
+ content: "\f04a";
+}
+.fa-play:before {
+ content: "\f04b";
+}
+.fa-pause:before {
+ content: "\f04c";
+}
+.fa-stop:before {
+ content: "\f04d";
+}
+.fa-forward:before {
+ content: "\f04e";
+}
+.fa-fast-forward:before {
+ content: "\f050";
+}
+.fa-step-forward:before {
+ content: "\f051";
+}
+.fa-eject:before {
+ content: "\f052";
+}
+.fa-chevron-left:before {
+ content: "\f053";
+}
+.fa-chevron-right:before {
+ content: "\f054";
+}
+.fa-plus-circle:before {
+ content: "\f055";
+}
+.fa-minus-circle:before {
+ content: "\f056";
+}
+.fa-times-circle:before {
+ content: "\f057";
+}
+.fa-check-circle:before {
+ content: "\f058";
+}
+.fa-question-circle:before {
+ content: "\f059";
+}
+.fa-info-circle:before {
+ content: "\f05a";
+}
+.fa-crosshairs:before {
+ content: "\f05b";
+}
+.fa-times-circle-o:before {
+ content: "\f05c";
+}
+.fa-check-circle-o:before {
+ content: "\f05d";
+}
+.fa-ban:before {
+ content: "\f05e";
+}
+.fa-arrow-left:before {
+ content: "\f060";
+}
+.fa-arrow-right:before {
+ content: "\f061";
+}
+.fa-arrow-up:before {
+ content: "\f062";
+}
+.fa-arrow-down:before {
+ content: "\f063";
+}
+.fa-mail-forward:before,
+.fa-share:before {
+ content: "\f064";
+}
+.fa-expand:before {
+ content: "\f065";
+}
+.fa-compress:before {
+ content: "\f066";
+}
+.fa-plus:before {
+ content: "\f067";
+}
+.fa-minus:before {
+ content: "\f068";
+}
+.fa-asterisk:before {
+ content: "\f069";
+}
+.fa-exclamation-circle:before {
+ content: "\f06a";
+}
+.fa-gift:before {
+ content: "\f06b";
+}
+.fa-leaf:before {
+ content: "\f06c";
+}
+.fa-fire:before {
+ content: "\f06d";
+}
+.fa-eye:before {
+ content: "\f06e";
+}
+.fa-eye-slash:before {
+ content: "\f070";
+}
+.fa-warning:before,
+.fa-exclamation-triangle:before {
+ content: "\f071";
+}
+.fa-plane:before {
+ content: "\f072";
+}
+.fa-calendar:before {
+ content: "\f073";
+}
+.fa-random:before {
+ content: "\f074";
+}
+.fa-comment:before {
+ content: "\f075";
+}
+.fa-magnet:before {
+ content: "\f076";
+}
+.fa-chevron-up:before {
+ content: "\f077";
+}
+.fa-chevron-down:before {
+ content: "\f078";
+}
+.fa-retweet:before {
+ content: "\f079";
+}
+.fa-shopping-cart:before {
+ content: "\f07a";
+}
+.fa-folder:before {
+ content: "\f07b";
+}
+.fa-folder-open:before {
+ content: "\f07c";
+}
+.fa-arrows-v:before {
+ content: "\f07d";
+}
+.fa-arrows-h:before {
+ content: "\f07e";
+}
+.fa-bar-chart-o:before,
+.fa-bar-chart:before {
+ content: "\f080";
+}
+.fa-twitter-square:before {
+ content: "\f081";
+}
+.fa-facebook-square:before {
+ content: "\f082";
+}
+.fa-camera-retro:before {
+ content: "\f083";
+}
+.fa-key:before {
+ content: "\f084";
+}
+.fa-gears:before,
+.fa-cogs:before {
+ content: "\f085";
+}
+.fa-comments:before {
+ content: "\f086";
+}
+.fa-thumbs-o-up:before {
+ content: "\f087";
+}
+.fa-thumbs-o-down:before {
+ content: "\f088";
+}
+.fa-star-half:before {
+ content: "\f089";
+}
+.fa-heart-o:before {
+ content: "\f08a";
+}
+.fa-sign-out:before {
+ content: "\f08b";
+}
+.fa-linkedin-square:before {
+ content: "\f08c";
+}
+.fa-thumb-tack:before {
+ content: "\f08d";
+}
+.fa-external-link:before {
+ content: "\f08e";
+}
+.fa-sign-in:before {
+ content: "\f090";
+}
+.fa-trophy:before {
+ content: "\f091";
+}
+.fa-github-square:before {
+ content: "\f092";
+}
+.fa-upload:before {
+ content: "\f093";
+}
+.fa-lemon-o:before {
+ content: "\f094";
+}
+.fa-phone:before {
+ content: "\f095";
+}
+.fa-square-o:before {
+ content: "\f096";
+}
+.fa-bookmark-o:before {
+ content: "\f097";
+}
+.fa-phone-square:before {
+ content: "\f098";
+}
+.fa-twitter:before {
+ content: "\f099";
+}
+.fa-facebook:before {
+ content: "\f09a";
+}
+.fa-github:before {
+ content: "\f09b";
+}
+.fa-unlock:before {
+ content: "\f09c";
+}
+.fa-credit-card:before {
+ content: "\f09d";
+}
+.fa-rss:before {
+ content: "\f09e";
+}
+.fa-hdd-o:before {
+ content: "\f0a0";
+}
+.fa-bullhorn:before {
+ content: "\f0a1";
+}
+.fa-bell:before {
+ content: "\f0f3";
+}
+.fa-certificate:before {
+ content: "\f0a3";
+}
+.fa-hand-o-right:before {
+ content: "\f0a4";
+}
+.fa-hand-o-left:before {
+ content: "\f0a5";
+}
+.fa-hand-o-up:before {
+ content: "\f0a6";
+}
+.fa-hand-o-down:before {
+ content: "\f0a7";
+}
+.fa-arrow-circle-left:before {
+ content: "\f0a8";
+}
+.fa-arrow-circle-right:before {
+ content: "\f0a9";
+}
+.fa-arrow-circle-up:before {
+ content: "\f0aa";
+}
+.fa-arrow-circle-down:before {
+ content: "\f0ab";
+}
+.fa-globe:before {
+ content: "\f0ac";
+}
+.fa-wrench:before {
+ content: "\f0ad";
+}
+.fa-tasks:before {
+ content: "\f0ae";
+}
+.fa-filter:before {
+ content: "\f0b0";
+}
+.fa-briefcase:before {
+ content: "\f0b1";
+}
+.fa-arrows-alt:before {
+ content: "\f0b2";
+}
+.fa-group:before,
+.fa-users:before {
+ content: "\f0c0";
+}
+.fa-chain:before,
+.fa-link:before {
+ content: "\f0c1";
+}
+.fa-cloud:before {
+ content: "\f0c2";
+}
+.fa-flask:before {
+ content: "\f0c3";
+}
+.fa-cut:before,
+.fa-scissors:before {
+ content: "\f0c4";
+}
+.fa-copy:before,
+.fa-files-o:before {
+ content: "\f0c5";
+}
+.fa-paperclip:before {
+ content: "\f0c6";
+}
+.fa-save:before,
+.fa-floppy-o:before {
+ content: "\f0c7";
+}
+.fa-square:before {
+ content: "\f0c8";
+}
+.fa-navicon:before,
+.fa-reorder:before,
+.fa-bars:before {
+ content: "\f0c9";
+}
+.fa-list-ul:before {
+ content: "\f0ca";
+}
+.fa-list-ol:before {
+ content: "\f0cb";
+}
+.fa-strikethrough:before {
+ content: "\f0cc";
+}
+.fa-underline:before {
+ content: "\f0cd";
+}
+.fa-table:before {
+ content: "\f0ce";
+}
+.fa-magic:before {
+ content: "\f0d0";
+}
+.fa-truck:before {
+ content: "\f0d1";
+}
+.fa-pinterest:before {
+ content: "\f0d2";
+}
+.fa-pinterest-square:before {
+ content: "\f0d3";
+}
+.fa-google-plus-square:before {
+ content: "\f0d4";
+}
+.fa-google-plus:before {
+ content: "\f0d5";
+}
+.fa-money:before {
+ content: "\f0d6";
+}
+.fa-caret-down:before {
+ content: "\f0d7";
+}
+.fa-caret-up:before {
+ content: "\f0d8";
+}
+.fa-caret-left:before {
+ content: "\f0d9";
+}
+.fa-caret-right:before {
+ content: "\f0da";
+}
+.fa-columns:before {
+ content: "\f0db";
+}
+.fa-unsorted:before,
+.fa-sort:before {
+ content: "\f0dc";
+}
+.fa-sort-down:before,
+.fa-sort-desc:before {
+ content: "\f0dd";
+}
+.fa-sort-up:before,
+.fa-sort-asc:before {
+ content: "\f0de";
+}
+.fa-envelope:before {
+ content: "\f0e0";
+}
+.fa-linkedin:before {
+ content: "\f0e1";
+}
+.fa-rotate-left:before,
+.fa-undo:before {
+ content: "\f0e2";
+}
+.fa-legal:before,
+.fa-gavel:before {
+ content: "\f0e3";
+}
+.fa-dashboard:before,
+.fa-tachometer:before {
+ content: "\f0e4";
+}
+.fa-comment-o:before {
+ content: "\f0e5";
+}
+.fa-comments-o:before {
+ content: "\f0e6";
+}
+.fa-flash:before,
+.fa-bolt:before {
+ content: "\f0e7";
+}
+.fa-sitemap:before {
+ content: "\f0e8";
+}
+.fa-umbrella:before {
+ content: "\f0e9";
+}
+.fa-paste:before,
+.fa-clipboard:before {
+ content: "\f0ea";
+}
+.fa-lightbulb-o:before {
+ content: "\f0eb";
+}
+.fa-exchange:before {
+ content: "\f0ec";
+}
+.fa-cloud-download:before {
+ content: "\f0ed";
+}
+.fa-cloud-upload:before {
+ content: "\f0ee";
+}
+.fa-user-md:before {
+ content: "\f0f0";
+}
+.fa-stethoscope:before {
+ content: "\f0f1";
+}
+.fa-suitcase:before {
+ content: "\f0f2";
+}
+.fa-bell-o:before {
+ content: "\f0a2";
+}
+.fa-coffee:before {
+ content: "\f0f4";
+}
+.fa-cutlery:before {
+ content: "\f0f5";
+}
+.fa-file-text-o:before {
+ content: "\f0f6";
+}
+.fa-building-o:before {
+ content: "\f0f7";
+}
+.fa-hospital-o:before {
+ content: "\f0f8";
+}
+.fa-ambulance:before {
+ content: "\f0f9";
+}
+.fa-medkit:before {
+ content: "\f0fa";
+}
+.fa-fighter-jet:before {
+ content: "\f0fb";
+}
+.fa-beer:before {
+ content: "\f0fc";
+}
+.fa-h-square:before {
+ content: "\f0fd";
+}
+.fa-plus-square:before {
+ content: "\f0fe";
+}
+.fa-angle-double-left:before {
+ content: "\f100";
+}
+.fa-angle-double-right:before {
+ content: "\f101";
+}
+.fa-angle-double-up:before {
+ content: "\f102";
+}
+.fa-angle-double-down:before {
+ content: "\f103";
+}
+.fa-angle-left:before {
+ content: "\f104";
+}
+.fa-angle-right:before {
+ content: "\f105";
+}
+.fa-angle-up:before {
+ content: "\f106";
+}
+.fa-angle-down:before {
+ content: "\f107";
+}
+.fa-desktop:before {
+ content: "\f108";
+}
+.fa-laptop:before {
+ content: "\f109";
+}
+.fa-tablet:before {
+ content: "\f10a";
+}
+.fa-mobile-phone:before,
+.fa-mobile:before {
+ content: "\f10b";
+}
+.fa-circle-o:before {
+ content: "\f10c";
+}
+.fa-quote-left:before {
+ content: "\f10d";
+}
+.fa-quote-right:before {
+ content: "\f10e";
+}
+.fa-spinner:before {
+ content: "\f110";
+}
+.fa-circle:before {
+ content: "\f111";
+}
+.fa-mail-reply:before,
+.fa-reply:before {
+ content: "\f112";
+}
+.fa-github-alt:before {
+ content: "\f113";
+}
+.fa-folder-o:before {
+ content: "\f114";
+}
+.fa-folder-open-o:before {
+ content: "\f115";
+}
+.fa-smile-o:before {
+ content: "\f118";
+}
+.fa-frown-o:before {
+ content: "\f119";
+}
+.fa-meh-o:before {
+ content: "\f11a";
+}
+.fa-gamepad:before {
+ content: "\f11b";
+}
+.fa-keyboard-o:before {
+ content: "\f11c";
+}
+.fa-flag-o:before {
+ content: "\f11d";
+}
+.fa-flag-checkered:before {
+ content: "\f11e";
+}
+.fa-terminal:before {
+ content: "\f120";
+}
+.fa-code:before {
+ content: "\f121";
+}
+.fa-mail-reply-all:before,
+.fa-reply-all:before {
+ content: "\f122";
+}
+.fa-star-half-empty:before,
+.fa-star-half-full:before,
+.fa-star-half-o:before {
+ content: "\f123";
+}
+.fa-location-arrow:before {
+ content: "\f124";
+}
+.fa-crop:before {
+ content: "\f125";
+}
+.fa-code-fork:before {
+ content: "\f126";
+}
+.fa-unlink:before,
+.fa-chain-broken:before {
+ content: "\f127";
+}
+.fa-question:before {
+ content: "\f128";
+}
+.fa-info:before {
+ content: "\f129";
+}
+.fa-exclamation:before {
+ content: "\f12a";
+}
+.fa-superscript:before {
+ content: "\f12b";
+}
+.fa-subscript:before {
+ content: "\f12c";
+}
+.fa-eraser:before {
+ content: "\f12d";
+}
+.fa-puzzle-piece:before {
+ content: "\f12e";
+}
+.fa-microphone:before {
+ content: "\f130";
+}
+.fa-microphone-slash:before {
+ content: "\f131";
+}
+.fa-shield:before {
+ content: "\f132";
+}
+.fa-calendar-o:before {
+ content: "\f133";
+}
+.fa-fire-extinguisher:before {
+ content: "\f134";
+}
+.fa-rocket:before {
+ content: "\f135";
+}
+.fa-maxcdn:before {
+ content: "\f136";
+}
+.fa-chevron-circle-left:before {
+ content: "\f137";
+}
+.fa-chevron-circle-right:before {
+ content: "\f138";
+}
+.fa-chevron-circle-up:before {
+ content: "\f139";
+}
+.fa-chevron-circle-down:before {
+ content: "\f13a";
+}
+.fa-html5:before {
+ content: "\f13b";
+}
+.fa-css3:before {
+ content: "\f13c";
+}
+.fa-anchor:before {
+ content: "\f13d";
+}
+.fa-unlock-alt:before {
+ content: "\f13e";
+}
+.fa-bullseye:before {
+ content: "\f140";
+}
+.fa-ellipsis-h:before {
+ content: "\f141";
+}
+.fa-ellipsis-v:before {
+ content: "\f142";
+}
+.fa-rss-square:before {
+ content: "\f143";
+}
+.fa-play-circle:before {
+ content: "\f144";
+}
+.fa-ticket:before {
+ content: "\f145";
+}
+.fa-minus-square:before {
+ content: "\f146";
+}
+.fa-minus-square-o:before {
+ content: "\f147";
+}
+.fa-level-up:before {
+ content: "\f148";
+}
+.fa-level-down:before {
+ content: "\f149";
+}
+.fa-check-square:before {
+ content: "\f14a";
+}
+.fa-pencil-square:before {
+ content: "\f14b";
+}
+.fa-external-link-square:before {
+ content: "\f14c";
+}
+.fa-share-square:before {
+ content: "\f14d";
+}
+.fa-compass:before {
+ content: "\f14e";
+}
+.fa-toggle-down:before,
+.fa-caret-square-o-down:before {
+ content: "\f150";
+}
+.fa-toggle-up:before,
+.fa-caret-square-o-up:before {
+ content: "\f151";
+}
+.fa-toggle-right:before,
+.fa-caret-square-o-right:before {
+ content: "\f152";
+}
+.fa-euro:before,
+.fa-eur:before {
+ content: "\f153";
+}
+.fa-gbp:before {
+ content: "\f154";
+}
+.fa-dollar:before,
+.fa-usd:before {
+ content: "\f155";
+}
+.fa-rupee:before,
+.fa-inr:before {
+ content: "\f156";
+}
+.fa-cny:before,
+.fa-rmb:before,
+.fa-yen:before,
+.fa-jpy:before {
+ content: "\f157";
+}
+.fa-ruble:before,
+.fa-rouble:before,
+.fa-rub:before {
+ content: "\f158";
+}
+.fa-won:before,
+.fa-krw:before {
+ content: "\f159";
+}
+.fa-bitcoin:before,
+.fa-btc:before {
+ content: "\f15a";
+}
+.fa-file:before {
+ content: "\f15b";
+}
+.fa-file-text:before {
+ content: "\f15c";
+}
+.fa-sort-alpha-asc:before {
+ content: "\f15d";
+}
+.fa-sort-alpha-desc:before {
+ content: "\f15e";
+}
+.fa-sort-amount-asc:before {
+ content: "\f160";
+}
+.fa-sort-amount-desc:before {
+ content: "\f161";
+}
+.fa-sort-numeric-asc:before {
+ content: "\f162";
+}
+.fa-sort-numeric-desc:before {
+ content: "\f163";
+}
+.fa-thumbs-up:before {
+ content: "\f164";
+}
+.fa-thumbs-down:before {
+ content: "\f165";
+}
+.fa-youtube-square:before {
+ content: "\f166";
+}
+.fa-youtube:before {
+ content: "\f167";
+}
+.fa-xing:before {
+ content: "\f168";
+}
+.fa-xing-square:before {
+ content: "\f169";
+}
+.fa-youtube-play:before {
+ content: "\f16a";
+}
+.fa-dropbox:before {
+ content: "\f16b";
+}
+.fa-stack-overflow:before {
+ content: "\f16c";
+}
+.fa-instagram:before {
+ content: "\f16d";
+}
+.fa-flickr:before {
+ content: "\f16e";
+}
+.fa-adn:before {
+ content: "\f170";
+}
+.fa-bitbucket:before {
+ content: "\f171";
+}
+.fa-bitbucket-square:before {
+ content: "\f172";
+}
+.fa-tumblr:before {
+ content: "\f173";
+}
+.fa-tumblr-square:before {
+ content: "\f174";
+}
+.fa-long-arrow-down:before {
+ content: "\f175";
+}
+.fa-long-arrow-up:before {
+ content: "\f176";
+}
+.fa-long-arrow-left:before {
+ content: "\f177";
+}
+.fa-long-arrow-right:before {
+ content: "\f178";
+}
+.fa-apple:before {
+ content: "\f179";
+}
+.fa-windows:before {
+ content: "\f17a";
+}
+.fa-android:before {
+ content: "\f17b";
+}
+.fa-linux:before {
+ content: "\f17c";
+}
+.fa-dribbble:before {
+ content: "\f17d";
+}
+.fa-skype:before {
+ content: "\f17e";
+}
+.fa-foursquare:before {
+ content: "\f180";
+}
+.fa-trello:before {
+ content: "\f181";
+}
+.fa-female:before {
+ content: "\f182";
+}
+.fa-male:before {
+ content: "\f183";
+}
+.fa-gittip:before {
+ content: "\f184";
+}
+.fa-sun-o:before {
+ content: "\f185";
+}
+.fa-moon-o:before {
+ content: "\f186";
+}
+.fa-archive:before {
+ content: "\f187";
+}
+.fa-bug:before {
+ content: "\f188";
+}
+.fa-vk:before {
+ content: "\f189";
+}
+.fa-weibo:before {
+ content: "\f18a";
+}
+.fa-renren:before {
+ content: "\f18b";
+}
+.fa-pagelines:before {
+ content: "\f18c";
+}
+.fa-stack-exchange:before {
+ content: "\f18d";
+}
+.fa-arrow-circle-o-right:before {
+ content: "\f18e";
+}
+.fa-arrow-circle-o-left:before {
+ content: "\f190";
+}
+.fa-toggle-left:before,
+.fa-caret-square-o-left:before {
+ content: "\f191";
+}
+.fa-dot-circle-o:before {
+ content: "\f192";
+}
+.fa-wheelchair:before {
+ content: "\f193";
+}
+.fa-vimeo-square:before {
+ content: "\f194";
+}
+.fa-turkish-lira:before,
+.fa-try:before {
+ content: "\f195";
+}
+.fa-plus-square-o:before {
+ content: "\f196";
+}
+.fa-space-shuttle:before {
+ content: "\f197";
+}
+.fa-slack:before {
+ content: "\f198";
+}
+.fa-envelope-square:before {
+ content: "\f199";
+}
+.fa-wordpress:before {
+ content: "\f19a";
+}
+.fa-openid:before {
+ content: "\f19b";
+}
+.fa-institution:before,
+.fa-bank:before,
+.fa-university:before {
+ content: "\f19c";
+}
+.fa-mortar-board:before,
+.fa-graduation-cap:before {
+ content: "\f19d";
+}
+.fa-yahoo:before {
+ content: "\f19e";
+}
+.fa-google:before {
+ content: "\f1a0";
+}
+.fa-reddit:before {
+ content: "\f1a1";
+}
+.fa-reddit-square:before {
+ content: "\f1a2";
+}
+.fa-stumbleupon-circle:before {
+ content: "\f1a3";
+}
+.fa-stumbleupon:before {
+ content: "\f1a4";
+}
+.fa-delicious:before {
+ content: "\f1a5";
+}
+.fa-digg:before {
+ content: "\f1a6";
+}
+.fa-pied-piper:before {
+ content: "\f1a7";
+}
+.fa-pied-piper-alt:before {
+ content: "\f1a8";
+}
+.fa-drupal:before {
+ content: "\f1a9";
+}
+.fa-joomla:before {
+ content: "\f1aa";
+}
+.fa-language:before {
+ content: "\f1ab";
+}
+.fa-fax:before {
+ content: "\f1ac";
+}
+.fa-building:before {
+ content: "\f1ad";
+}
+.fa-child:before {
+ content: "\f1ae";
+}
+.fa-paw:before {
+ content: "\f1b0";
+}
+.fa-spoon:before {
+ content: "\f1b1";
+}
+.fa-cube:before {
+ content: "\f1b2";
+}
+.fa-cubes:before {
+ content: "\f1b3";
+}
+.fa-behance:before {
+ content: "\f1b4";
+}
+.fa-behance-square:before {
+ content: "\f1b5";
+}
+.fa-steam:before {
+ content: "\f1b6";
+}
+.fa-steam-square:before {
+ content: "\f1b7";
+}
+.fa-recycle:before {
+ content: "\f1b8";
+}
+.fa-automobile:before,
+.fa-car:before {
+ content: "\f1b9";
+}
+.fa-cab:before,
+.fa-taxi:before {
+ content: "\f1ba";
+}
+.fa-tree:before {
+ content: "\f1bb";
+}
+.fa-spotify:before {
+ content: "\f1bc";
+}
+.fa-deviantart:before {
+ content: "\f1bd";
+}
+.fa-soundcloud:before {
+ content: "\f1be";
+}
+.fa-database:before {
+ content: "\f1c0";
+}
+.fa-file-pdf-o:before {
+ content: "\f1c1";
+}
+.fa-file-word-o:before {
+ content: "\f1c2";
+}
+.fa-file-excel-o:before {
+ content: "\f1c3";
+}
+.fa-file-powerpoint-o:before {
+ content: "\f1c4";
+}
+.fa-file-photo-o:before,
+.fa-file-picture-o:before,
+.fa-file-image-o:before {
+ content: "\f1c5";
+}
+.fa-file-zip-o:before,
+.fa-file-archive-o:before {
+ content: "\f1c6";
+}
+.fa-file-sound-o:before,
+.fa-file-audio-o:before {
+ content: "\f1c7";
+}
+.fa-file-movie-o:before,
+.fa-file-video-o:before {
+ content: "\f1c8";
+}
+.fa-file-code-o:before {
+ content: "\f1c9";
+}
+.fa-vine:before {
+ content: "\f1ca";
+}
+.fa-codepen:before {
+ content: "\f1cb";
+}
+.fa-jsfiddle:before {
+ content: "\f1cc";
+}
+.fa-life-bouy:before,
+.fa-life-buoy:before,
+.fa-life-saver:before,
+.fa-support:before,
+.fa-life-ring:before {
+ content: "\f1cd";
+}
+.fa-circle-o-notch:before {
+ content: "\f1ce";
+}
+.fa-ra:before,
+.fa-rebel:before {
+ content: "\f1d0";
+}
+.fa-ge:before,
+.fa-empire:before {
+ content: "\f1d1";
+}
+.fa-git-square:before {
+ content: "\f1d2";
+}
+.fa-git:before {
+ content: "\f1d3";
+}
+.fa-hacker-news:before {
+ content: "\f1d4";
+}
+.fa-tencent-weibo:before {
+ content: "\f1d5";
+}
+.fa-qq:before {
+ content: "\f1d6";
+}
+.fa-wechat:before,
+.fa-weixin:before {
+ content: "\f1d7";
+}
+.fa-send:before,
+.fa-paper-plane:before {
+ content: "\f1d8";
+}
+.fa-send-o:before,
+.fa-paper-plane-o:before {
+ content: "\f1d9";
+}
+.fa-history:before {
+ content: "\f1da";
+}
+.fa-circle-thin:before {
+ content: "\f1db";
+}
+.fa-header:before {
+ content: "\f1dc";
+}
+.fa-paragraph:before {
+ content: "\f1dd";
+}
+.fa-sliders:before {
+ content: "\f1de";
+}
+.fa-share-alt:before {
+ content: "\f1e0";
+}
+.fa-share-alt-square:before {
+ content: "\f1e1";
+}
+.fa-bomb:before {
+ content: "\f1e2";
+}
+.fa-soccer-ball-o:before,
+.fa-futbol-o:before {
+ content: "\f1e3";
+}
+.fa-tty:before {
+ content: "\f1e4";
+}
+.fa-binoculars:before {
+ content: "\f1e5";
+}
+.fa-plug:before {
+ content: "\f1e6";
+}
+.fa-slideshare:before {
+ content: "\f1e7";
+}
+.fa-twitch:before {
+ content: "\f1e8";
+}
+.fa-yelp:before {
+ content: "\f1e9";
+}
+.fa-newspaper-o:before {
+ content: "\f1ea";
+}
+.fa-wifi:before {
+ content: "\f1eb";
+}
+.fa-calculator:before {
+ content: "\f1ec";
+}
+.fa-paypal:before {
+ content: "\f1ed";
+}
+.fa-google-wallet:before {
+ content: "\f1ee";
+}
+.fa-cc-visa:before {
+ content: "\f1f0";
+}
+.fa-cc-mastercard:before {
+ content: "\f1f1";
+}
+.fa-cc-discover:before {
+ content: "\f1f2";
+}
+.fa-cc-amex:before {
+ content: "\f1f3";
+}
+.fa-cc-paypal:before {
+ content: "\f1f4";
+}
+.fa-cc-stripe:before {
+ content: "\f1f5";
+}
+.fa-bell-slash:before {
+ content: "\f1f6";
+}
+.fa-bell-slash-o:before {
+ content: "\f1f7";
+}
+.fa-trash:before {
+ content: "\f1f8";
+}
+.fa-copyright:before {
+ content: "\f1f9";
+}
+.fa-at:before {
+ content: "\f1fa";
+}
+.fa-eyedropper:before {
+ content: "\f1fb";
+}
+.fa-paint-brush:before {
+ content: "\f1fc";
+}
+.fa-birthday-cake:before {
+ content: "\f1fd";
+}
+.fa-area-chart:before {
+ content: "\f1fe";
+}
+.fa-pie-chart:before {
+ content: "\f200";
+}
+.fa-line-chart:before {
+ content: "\f201";
+}
+.fa-lastfm:before {
+ content: "\f202";
+}
+.fa-lastfm-square:before {
+ content: "\f203";
+}
+.fa-toggle-off:before {
+ content: "\f204";
+}
+.fa-toggle-on:before {
+ content: "\f205";
+}
+.fa-bicycle:before {
+ content: "\f206";
+}
+.fa-bus:before {
+ content: "\f207";
+}
+.fa-ioxhost:before {
+ content: "\f208";
+}
+.fa-angellist:before {
+ content: "\f209";
+}
+.fa-cc:before {
+ content: "\f20a";
+}
+.fa-shekel:before,
+.fa-sheqel:before,
+.fa-ils:before {
+ content: "\f20b";
+}
+.fa-meanpath:before {
+ content: "\f20c";
+}
diff --git a/common/src/main/webapp/thirdparty/font-awesome/css/font-awesome.min.css b/common/src/main/webapp/thirdparty/font-awesome/css/font-awesome.min.css
new file mode 100644
index 0000000..ec53d4d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/css/font-awesome.min.css
@@ -0,0 +1,4 @@
+/*!
+ * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome
+ * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
+ */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.2.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/font-awesome/fonts/FontAwesome.otf b/common/src/main/webapp/thirdparty/font-awesome/fonts/FontAwesome.otf
new file mode 100644
index 0000000..81c9ad9
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/fonts/FontAwesome.otf
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/font-awesome/fonts/fontawesome-webfont.eot b/common/src/main/webapp/thirdparty/font-awesome/fonts/fontawesome-webfont.eot
new file mode 100644
index 0000000..84677bc
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/fonts/fontawesome-webfont.eot
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/font-awesome/fonts/fontawesome-webfont.svg b/common/src/main/webapp/thirdparty/font-awesome/fonts/fontawesome-webfont.svg
new file mode 100644
index 0000000..d907b25
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/fonts/fontawesome-webfont.svg
@@ -0,0 +1,520 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="fontawesomeregular" horiz-adv-x="1536" >
+<font-face units-per-em="1792" ascent="1536" descent="-256" />
+<missing-glyph horiz-adv-x="448" />
+<glyph unicode=" " horiz-adv-x="448" />
+<glyph unicode="&#x09;" horiz-adv-x="448" />
+<glyph unicode="&#xa0;" horiz-adv-x="448" />
+<glyph unicode="&#xa8;" horiz-adv-x="1792" />
+<glyph unicode="&#xa9;" horiz-adv-x="1792" />
+<glyph unicode="&#xae;" horiz-adv-x="1792" />
+<glyph unicode="&#xb4;" horiz-adv-x="1792" />
+<glyph unicode="&#xc6;" horiz-adv-x="1792" />
+<glyph unicode="&#xd8;" horiz-adv-x="1792" />
+<glyph unicode="&#x2000;" horiz-adv-x="768" />
+<glyph unicode="&#x2001;" horiz-adv-x="1537" />
+<glyph unicode="&#x2002;" horiz-adv-x="768" />
+<glyph unicode="&#x2003;" horiz-adv-x="1537" />
+<glyph unicode="&#x2004;" horiz-adv-x="512" />
+<glyph unicode="&#x2005;" horiz-adv-x="384" />
+<glyph unicode="&#x2006;" horiz-adv-x="256" />
+<glyph unicode="&#x2007;" horiz-adv-x="256" />
+<glyph unicode="&#x2008;" horiz-adv-x="192" />
+<glyph unicode="&#x2009;" horiz-adv-x="307" />
+<glyph unicode="&#x200a;" horiz-adv-x="85" />
+<glyph unicode="&#x202f;" horiz-adv-x="307" />
+<glyph unicode="&#x205f;" horiz-adv-x="384" />
+<glyph unicode="&#x2122;" horiz-adv-x="1792" />
+<glyph unicode="&#x221e;" horiz-adv-x="1792" />
+<glyph unicode="&#x2260;" horiz-adv-x="1792" />
+<glyph unicode="&#x25fc;" horiz-adv-x="500" d="M0 0z" />
+<glyph unicode="&#xf000;" horiz-adv-x="1792" d="M1699 1350q0 -35 -43 -78l-632 -632v-768h320q26 0 45 -19t19 -45t-19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45t45 19h320v768l-632 632q-43 43 -43 78q0 23 18 36.5t38 17.5t43 4h1408q23 0 43 -4t38 -17.5t18 -36.5z" />
+<glyph unicode="&#xf001;" d="M1536 1312v-1120q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v537l-768 -237v-709q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89 t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v967q0 31 19 56.5t49 35.5l832 256q12 4 28 4q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf002;" horiz-adv-x="1664" d="M1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -52 -38 -90t-90 -38q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5 t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" />
+<glyph unicode="&#xf003;" horiz-adv-x="1792" d="M1664 32v768q-32 -36 -69 -66q-268 -206 -426 -338q-51 -43 -83 -67t-86.5 -48.5t-102.5 -24.5h-1h-1q-48 0 -102.5 24.5t-86.5 48.5t-83 67q-158 132 -426 338q-37 30 -69 66v-768q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1664 1083v11v13.5t-0.5 13 t-3 12.5t-5.5 9t-9 7.5t-14 2.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5q0 -168 147 -284q193 -152 401 -317q6 -5 35 -29.5t46 -37.5t44.5 -31.5t50.5 -27.5t43 -9h1h1q20 0 43 9t50.5 27.5t44.5 31.5t46 37.5t35 29.5q208 165 401 317q54 43 100.5 115.5t46.5 131.5z M1792 1120v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf004;" horiz-adv-x="1792" d="M896 -128q-26 0 -44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5q224 0 351 -124t127 -344q0 -221 -229 -450l-623 -600 q-18 -18 -44 -18z" />
+<glyph unicode="&#xf005;" horiz-adv-x="1664" d="M1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -21 -10.5 -35.5t-30.5 -14.5q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455 l502 -73q56 -9 56 -46z" />
+<glyph unicode="&#xf006;" horiz-adv-x="1664" d="M1137 532l306 297l-422 62l-189 382l-189 -382l-422 -62l306 -297l-73 -421l378 199l377 -199zM1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -50 -41 -50q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500 l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455l502 -73q56 -9 56 -46z" />
+<glyph unicode="&#xf007;" horiz-adv-x="1408" d="M1408 131q0 -120 -73 -189.5t-194 -69.5h-874q-121 0 -194 69.5t-73 189.5q0 53 3.5 103.5t14 109t26.5 108.5t43 97.5t62 81t85.5 53.5t111.5 20q9 0 42 -21.5t74.5 -48t108 -48t133.5 -21.5t133.5 21.5t108 48t74.5 48t42 21.5q61 0 111.5 -20t85.5 -53.5t62 -81 t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5zM1088 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5z" />
+<glyph unicode="&#xf008;" horiz-adv-x="1920" d="M384 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 320v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 704v128q0 26 -19 45t-45 19h-128 q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 -64v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM384 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45 t45 -19h128q26 0 45 19t19 45zM1792 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 704v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1792 320v128 q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1792 704v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1792 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19 t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1920 1248v-1344q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1344q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf009;" horiz-adv-x="1664" d="M768 512v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM768 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 512v-384q0 -52 -38 -90t-90 -38 h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf00a;" horiz-adv-x="1792" d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 288v-192q0 -40 -28 -68t-68 -28h-320 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28 h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192 q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf00b;" horiz-adv-x="1792" d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-960 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28 h960q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf00c;" horiz-adv-x="1792" d="M1671 970q0 -40 -28 -68l-724 -724l-136 -136q-28 -28 -68 -28t-68 28l-136 136l-362 362q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -295l656 657q28 28 68 28t68 -28l136 -136q28 -28 28 -68z" />
+<glyph unicode="&#xf00d;" horiz-adv-x="1408" d="M1298 214q0 -40 -28 -68l-136 -136q-28 -28 -68 -28t-68 28l-294 294l-294 -294q-28 -28 -68 -28t-68 28l-136 136q-28 28 -28 68t28 68l294 294l-294 294q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -294l294 294q28 28 68 28t68 -28l136 -136q28 -28 28 -68 t-28 -68l-294 -294l294 -294q28 -28 28 -68z" />
+<glyph unicode="&#xf00e;" horiz-adv-x="1664" d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-224q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v224h-224q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h224v224q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5v-224h224 q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5 t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" />
+<glyph unicode="&#xf010;" horiz-adv-x="1664" d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-576q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h576q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5z M1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z " />
+<glyph unicode="&#xf011;" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61t-298 61t-245 164t-164 245t-61 298q0 182 80.5 343t226.5 270q43 32 95.5 25t83.5 -50q32 -42 24.5 -94.5t-49.5 -84.5q-98 -74 -151.5 -181t-53.5 -228q0 -104 40.5 -198.5t109.5 -163.5t163.5 -109.5 t198.5 -40.5t198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5q0 121 -53.5 228t-151.5 181q-42 32 -49.5 84.5t24.5 94.5q31 43 84 50t95 -25q146 -109 226.5 -270t80.5 -343zM896 1408v-640q0 -52 -38 -90t-90 -38t-90 38t-38 90v640q0 52 38 90t90 38t90 -38t38 -90z" />
+<glyph unicode="&#xf012;" horiz-adv-x="1792" d="M256 96v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM640 224v-320q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1024 480v-576q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23 v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1408 864v-960q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 1376v-1472q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v1472q0 14 9 23t23 9h192q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf013;" d="M1024 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1536 749v-222q0 -12 -8 -23t-20 -13l-185 -28q-19 -54 -39 -91q35 -50 107 -138q10 -12 10 -25t-9 -23q-27 -37 -99 -108t-94 -71q-12 0 -26 9l-138 108q-44 -23 -91 -38 q-16 -136 -29 -186q-7 -28 -36 -28h-222q-14 0 -24.5 8.5t-11.5 21.5l-28 184q-49 16 -90 37l-141 -107q-10 -9 -25 -9q-14 0 -25 11q-126 114 -165 168q-7 10 -7 23q0 12 8 23q15 21 51 66.5t54 70.5q-27 50 -41 99l-183 27q-13 2 -21 12.5t-8 23.5v222q0 12 8 23t19 13 l186 28q14 46 39 92q-40 57 -107 138q-10 12 -10 24q0 10 9 23q26 36 98.5 107.5t94.5 71.5q13 0 26 -10l138 -107q44 23 91 38q16 136 29 186q7 28 36 28h222q14 0 24.5 -8.5t11.5 -21.5l28 -184q49 -16 90 -37l142 107q9 9 24 9q13 0 25 -10q129 -119 165 -170q7 -8 7 -22 q0 -12 -8 -23q-15 -21 -51 -66.5t-54 -70.5q26 -50 41 -98l183 -28q13 -2 21 -12.5t8 -23.5z" />
+<glyph unicode="&#xf014;" horiz-adv-x="1408" d="M512 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM768 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1024 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576 q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1152 76v948h-896v-948q0 -22 7 -40.5t14.5 -27t10.5 -8.5h832q3 0 10.5 8.5t14.5 27t7 40.5zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM1408 1120v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832 q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h309l70 167q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf015;" horiz-adv-x="1664" d="M1408 544v-480q0 -26 -19 -45t-45 -19h-384v384h-256v-384h-384q-26 0 -45 19t-19 45v480q0 1 0.5 3t0.5 3l575 474l575 -474q1 -2 1 -6zM1631 613l-62 -74q-8 -9 -21 -11h-3q-13 0 -21 7l-692 577l-692 -577q-12 -8 -24 -7q-13 2 -21 11l-62 74q-8 10 -7 23.5t11 21.5 l719 599q32 26 76 26t76 -26l244 -204v195q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-408l219 -182q10 -8 11 -21.5t-7 -23.5z" />
+<glyph unicode="&#xf016;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z " />
+<glyph unicode="&#xf017;" d="M896 992v-448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf018;" horiz-adv-x="1920" d="M1111 540v4l-24 320q-1 13 -11 22.5t-23 9.5h-186q-13 0 -23 -9.5t-11 -22.5l-24 -320v-4q-1 -12 8 -20t21 -8h244q12 0 21 8t8 20zM1870 73q0 -73 -46 -73h-704q13 0 22 9.5t8 22.5l-20 256q-1 13 -11 22.5t-23 9.5h-272q-13 0 -23 -9.5t-11 -22.5l-20 -256 q-1 -13 8 -22.5t22 -9.5h-704q-46 0 -46 73q0 54 26 116l417 1044q8 19 26 33t38 14h339q-13 0 -23 -9.5t-11 -22.5l-15 -192q-1 -14 8 -23t22 -9h166q13 0 22 9t8 23l-15 192q-1 13 -11 22.5t-23 9.5h339q20 0 38 -14t26 -33l417 -1044q26 -62 26 -116z" />
+<glyph unicode="&#xf019;" horiz-adv-x="1664" d="M1280 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 416v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h465l135 -136 q58 -56 136 -56t136 56l136 136h464q40 0 68 -28t28 -68zM1339 985q17 -41 -14 -70l-448 -448q-18 -19 -45 -19t-45 19l-448 448q-31 29 -14 70q17 39 59 39h256v448q0 26 19 45t45 19h256q26 0 45 -19t19 -45v-448h256q42 0 59 -39z" />
+<glyph unicode="&#xf01a;" d="M1120 608q0 -12 -10 -24l-319 -319q-11 -9 -23 -9t-23 9l-320 320q-15 16 -7 35q8 20 30 20h192v352q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-352h192q14 0 23 -9t9 -23zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273 t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf01b;" d="M1118 660q-8 -20 -30 -20h-192v-352q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v352h-192q-14 0 -23 9t-9 23q0 12 10 24l319 319q11 9 23 9t23 -9l320 -320q15 -16 7 -35zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198 t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf01c;" d="M1023 576h316q-1 3 -2.5 8t-2.5 8l-212 496h-708l-212 -496q-1 -2 -2.5 -8t-2.5 -8h316l95 -192h320zM1536 546v-482q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v482q0 62 25 123l238 552q10 25 36.5 42t52.5 17h832q26 0 52.5 -17t36.5 -42l238 -552 q25 -61 25 -123z" />
+<glyph unicode="&#xf01d;" d="M1184 640q0 -37 -32 -55l-544 -320q-15 -9 -32 -9q-16 0 -32 8q-32 19 -32 56v640q0 37 32 56q33 18 64 -1l544 -320q32 -18 32 -55zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf01e;" d="M1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l138 138q-148 137 -349 137q-104 0 -198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5q119 0 225 52t179 147q7 10 23 12q14 0 25 -9 l137 -138q9 -8 9.5 -20.5t-7.5 -22.5q-109 -132 -264 -204.5t-327 -72.5q-156 0 -298 61t-245 164t-164 245t-61 298t61 298t164 245t245 164t298 61q147 0 284.5 -55.5t244.5 -156.5l130 129q29 31 70 14q39 -17 39 -59z" />
+<glyph unicode="&#xf021;" d="M1511 480q0 -5 -1 -7q-64 -268 -268 -434.5t-478 -166.5q-146 0 -282.5 55t-243.5 157l-129 -129q-19 -19 -45 -19t-45 19t-19 45v448q0 26 19 45t45 19h448q26 0 45 -19t19 -45t-19 -45l-137 -137q71 -66 161 -102t187 -36q134 0 250 65t186 179q11 17 53 117 q8 23 30 23h192q13 0 22.5 -9.5t9.5 -22.5zM1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-26 0 -45 19t-19 45t19 45l138 138q-148 137 -349 137q-134 0 -250 -65t-186 -179q-11 -17 -53 -117q-8 -23 -30 -23h-199q-13 0 -22.5 9.5t-9.5 22.5v7q65 268 270 434.5t480 166.5 q146 0 284 -55.5t245 -156.5l130 129q19 19 45 19t45 -19t19 -45z" />
+<glyph unicode="&#xf022;" horiz-adv-x="1792" d="M384 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M384 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1536 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5z M1536 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5zM1536 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5 t9.5 -22.5zM1664 160v832q0 13 -9.5 22.5t-22.5 9.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5v-832q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1792 1248v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47 t47 -113z" />
+<glyph unicode="&#xf023;" horiz-adv-x="1152" d="M320 768h512v192q0 106 -75 181t-181 75t-181 -75t-75 -181v-192zM1152 672v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h32v192q0 184 132 316t316 132t316 -132t132 -316v-192h32q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf024;" horiz-adv-x="1792" d="M320 1280q0 -72 -64 -110v-1266q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v1266q-64 38 -64 110q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -25 -12.5 -38.5t-39.5 -27.5q-215 -116 -369 -116q-61 0 -123.5 22t-108.5 48 t-115.5 48t-142.5 22q-192 0 -464 -146q-17 -9 -33 -9q-26 0 -45 19t-19 45v742q0 32 31 55q21 14 79 43q236 120 421 120q107 0 200 -29t219 -88q38 -19 88 -19q54 0 117.5 21t110 47t88 47t54.5 21q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf025;" horiz-adv-x="1664" d="M1664 650q0 -166 -60 -314l-20 -49l-185 -33q-22 -83 -90.5 -136.5t-156.5 -53.5v-32q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-32q71 0 130 -35.5t93 -95.5l68 12q29 95 29 193q0 148 -88 279t-236.5 209t-315.5 78 t-315.5 -78t-236.5 -209t-88 -279q0 -98 29 -193l68 -12q34 60 93 95.5t130 35.5v32q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v32q-88 0 -156.5 53.5t-90.5 136.5l-185 33l-20 49q-60 148 -60 314q0 151 67 291t179 242.5 t266 163.5t320 61t320 -61t266 -163.5t179 -242.5t67 -291z" />
+<glyph unicode="&#xf026;" horiz-adv-x="768" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45z" />
+<glyph unicode="&#xf027;" horiz-adv-x="1152" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 35.5 t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142z" />
+<glyph unicode="&#xf028;" horiz-adv-x="1664" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 35.5 t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142zM1408 640q0 -153 -85 -282.5t-225 -188.5q-13 -5 -25 -5q-27 0 -46 19t-19 45q0 39 39 59q56 29 76 44q74 54 115.5 135.5t41.5 173.5t-41.5 173.5 t-115.5 135.5q-20 15 -76 44q-39 20 -39 59q0 26 19 45t45 19q13 0 26 -5q140 -59 225 -188.5t85 -282.5zM1664 640q0 -230 -127 -422.5t-338 -283.5q-13 -5 -26 -5q-26 0 -45 19t-19 45q0 36 39 59q7 4 22.5 10.5t22.5 10.5q46 25 82 51q123 91 192 227t69 289t-69 289 t-192 227q-36 26 -82 51q-7 4 -22.5 10.5t-22.5 10.5q-39 23 -39 59q0 26 19 45t45 19q13 0 26 -5q211 -91 338 -283.5t127 -422.5z" />
+<glyph unicode="&#xf029;" horiz-adv-x="1408" d="M384 384v-128h-128v128h128zM384 1152v-128h-128v128h128zM1152 1152v-128h-128v128h128zM128 129h384v383h-384v-383zM128 896h384v384h-384v-384zM896 896h384v384h-384v-384zM640 640v-640h-640v640h640zM1152 128v-128h-128v128h128zM1408 128v-128h-128v128h128z M1408 640v-384h-384v128h-128v-384h-128v640h384v-128h128v128h128zM640 1408v-640h-640v640h640zM1408 1408v-640h-640v640h640z" />
+<glyph unicode="&#xf02a;" horiz-adv-x="1792" d="M63 0h-63v1408h63v-1408zM126 1h-32v1407h32v-1407zM220 1h-31v1407h31v-1407zM377 1h-31v1407h31v-1407zM534 1h-62v1407h62v-1407zM660 1h-31v1407h31v-1407zM723 1h-31v1407h31v-1407zM786 1h-31v1407h31v-1407zM943 1h-63v1407h63v-1407zM1100 1h-63v1407h63v-1407z M1226 1h-63v1407h63v-1407zM1352 1h-63v1407h63v-1407zM1446 1h-63v1407h63v-1407zM1635 1h-94v1407h94v-1407zM1698 1h-32v1407h32v-1407zM1792 0h-63v1408h63v-1408z" />
+<glyph unicode="&#xf02b;" d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5 l715 -714q37 -39 37 -91z" />
+<glyph unicode="&#xf02c;" horiz-adv-x="1920" d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5 l715 -714q37 -39 37 -91zM1899 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-36 0 -59 14t-53 45l470 470q37 37 37 90q0 52 -37 91l-715 714q-38 38 -102 64.5t-117 26.5h224q53 0 117 -26.5t102 -64.5l715 -714q37 -39 37 -91z" />
+<glyph unicode="&#xf02d;" horiz-adv-x="1664" d="M1639 1058q40 -57 18 -129l-275 -906q-19 -64 -76.5 -107.5t-122.5 -43.5h-923q-77 0 -148.5 53.5t-99.5 131.5q-24 67 -2 127q0 4 3 27t4 37q1 8 -3 21.5t-3 19.5q2 11 8 21t16.5 23.5t16.5 23.5q23 38 45 91.5t30 91.5q3 10 0.5 30t-0.5 28q3 11 17 28t17 23 q21 36 42 92t25 90q1 9 -2.5 32t0.5 28q4 13 22 30.5t22 22.5q19 26 42.5 84.5t27.5 96.5q1 8 -3 25.5t-2 26.5q2 8 9 18t18 23t17 21q8 12 16.5 30.5t15 35t16 36t19.5 32t26.5 23.5t36 11.5t47.5 -5.5l-1 -3q38 9 51 9h761q74 0 114 -56t18 -130l-274 -906 q-36 -119 -71.5 -153.5t-128.5 -34.5h-869q-27 0 -38 -15q-11 -16 -1 -43q24 -70 144 -70h923q29 0 56 15.5t35 41.5l300 987q7 22 5 57q38 -15 59 -43zM575 1056q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5 t-16.5 -22.5zM492 800q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5t-16.5 -22.5z" />
+<glyph unicode="&#xf02e;" horiz-adv-x="1280" d="M1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289q0 34 19.5 62t52.5 41q21 9 44 9h1048z" />
+<glyph unicode="&#xf02f;" horiz-adv-x="1664" d="M384 0h896v256h-896v-256zM384 640h896v384h-160q-40 0 -68 28t-28 68v160h-640v-640zM1536 576q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 576v-416q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-160q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68 v160h-224q-13 0 -22.5 9.5t-9.5 22.5v416q0 79 56.5 135.5t135.5 56.5h64v544q0 40 28 68t68 28h672q40 0 88 -20t76 -48l152 -152q28 -28 48 -76t20 -88v-256h64q79 0 135.5 -56.5t56.5 -135.5z" />
+<glyph unicode="&#xf030;" horiz-adv-x="1920" d="M960 864q119 0 203.5 -84.5t84.5 -203.5t-84.5 -203.5t-203.5 -84.5t-203.5 84.5t-84.5 203.5t84.5 203.5t203.5 84.5zM1664 1280q106 0 181 -75t75 -181v-896q0 -106 -75 -181t-181 -75h-1408q-106 0 -181 75t-75 181v896q0 106 75 181t181 75h224l51 136 q19 49 69.5 84.5t103.5 35.5h512q53 0 103.5 -35.5t69.5 -84.5l51 -136h224zM960 128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
+<glyph unicode="&#xf031;" horiz-adv-x="1664" d="M725 977l-170 -450q33 0 136.5 -2t160.5 -2q19 0 57 2q-87 253 -184 452zM0 -128l2 79q23 7 56 12.5t57 10.5t49.5 14.5t44.5 29t31 50.5l237 616l280 724h75h53q8 -14 11 -21l205 -480q33 -78 106 -257.5t114 -274.5q15 -34 58 -144.5t72 -168.5q20 -45 35 -57 q19 -15 88 -29.5t84 -20.5q6 -38 6 -57q0 -4 -0.5 -13t-0.5 -13q-63 0 -190 8t-191 8q-76 0 -215 -7t-178 -8q0 43 4 78l131 28q1 0 12.5 2.5t15.5 3.5t14.5 4.5t15 6.5t11 8t9 11t2.5 14q0 16 -31 96.5t-72 177.5t-42 100l-450 2q-26 -58 -76.5 -195.5t-50.5 -162.5 q0 -22 14 -37.5t43.5 -24.5t48.5 -13.5t57 -8.5t41 -4q1 -19 1 -58q0 -9 -2 -27q-58 0 -174.5 10t-174.5 10q-8 0 -26.5 -4t-21.5 -4q-80 -14 -188 -14z" />
+<glyph unicode="&#xf032;" horiz-adv-x="1408" d="M555 15q74 -32 140 -32q376 0 376 335q0 114 -41 180q-27 44 -61.5 74t-67.5 46.5t-80.5 25t-84 10.5t-94.5 2q-73 0 -101 -10q0 -53 -0.5 -159t-0.5 -158q0 -8 -1 -67.5t-0.5 -96.5t4.5 -83.5t12 -66.5zM541 761q42 -7 109 -7q82 0 143 13t110 44.5t74.5 89.5t25.5 142 q0 70 -29 122.5t-79 82t-108 43.5t-124 14q-50 0 -130 -13q0 -50 4 -151t4 -152q0 -27 -0.5 -80t-0.5 -79q0 -46 1 -69zM0 -128l2 94q15 4 85 16t106 27q7 12 12.5 27t8.5 33.5t5.5 32.5t3 37.5t0.5 34v35.5v30q0 982 -22 1025q-4 8 -22 14.5t-44.5 11t-49.5 7t-48.5 4.5 t-30.5 3l-4 83q98 2 340 11.5t373 9.5q23 0 68.5 -0.5t67.5 -0.5q70 0 136.5 -13t128.5 -42t108 -71t74 -104.5t28 -137.5q0 -52 -16.5 -95.5t-39 -72t-64.5 -57.5t-73 -45t-84 -40q154 -35 256.5 -134t102.5 -248q0 -100 -35 -179.5t-93.5 -130.5t-138 -85.5t-163.5 -48.5 t-176 -14q-44 0 -132 3t-132 3q-106 0 -307 -11t-231 -12z" />
+<glyph unicode="&#xf033;" horiz-adv-x="1024" d="M0 -126l17 85q6 2 81.5 21.5t111.5 37.5q28 35 41 101q1 7 62 289t114 543.5t52 296.5v25q-24 13 -54.5 18.5t-69.5 8t-58 5.5l19 103q33 -2 120 -6.5t149.5 -7t120.5 -2.5q48 0 98.5 2.5t121 7t98.5 6.5q-5 -39 -19 -89q-30 -10 -101.5 -28.5t-108.5 -33.5 q-8 -19 -14 -42.5t-9 -40t-7.5 -45.5t-6.5 -42q-27 -148 -87.5 -419.5t-77.5 -355.5q-2 -9 -13 -58t-20 -90t-16 -83.5t-6 -57.5l1 -18q17 -4 185 -31q-3 -44 -16 -99q-11 0 -32.5 -1.5t-32.5 -1.5q-29 0 -87 10t-86 10q-138 2 -206 2q-51 0 -143 -9t-121 -11z" />
+<glyph unicode="&#xf034;" horiz-adv-x="1792" d="M1744 128q33 0 42 -18.5t-11 -44.5l-126 -162q-20 -26 -49 -26t-49 26l-126 162q-20 26 -11 44.5t42 18.5h80v1024h-80q-33 0 -42 18.5t11 44.5l126 162q20 26 49 26t49 -26l126 -162q20 -26 11 -44.5t-42 -18.5h-80v-1024h80zM81 1407l54 -27q12 -5 211 -5q44 0 132 2 t132 2q36 0 107.5 -0.5t107.5 -0.5h293q6 0 21 -0.5t20.5 0t16 3t17.5 9t15 17.5l42 1q4 0 14 -0.5t14 -0.5q2 -112 2 -336q0 -80 -5 -109q-39 -14 -68 -18q-25 44 -54 128q-3 9 -11 48t-14.5 73.5t-7.5 35.5q-6 8 -12 12.5t-15.5 6t-13 2.5t-18 0.5t-16.5 -0.5 q-17 0 -66.5 0.5t-74.5 0.5t-64 -2t-71 -6q-9 -81 -8 -136q0 -94 2 -388t2 -455q0 -16 -2.5 -71.5t0 -91.5t12.5 -69q40 -21 124 -42.5t120 -37.5q5 -40 5 -50q0 -14 -3 -29l-34 -1q-76 -2 -218 8t-207 10q-50 0 -151 -9t-152 -9q-3 51 -3 52v9q17 27 61.5 43t98.5 29t78 27 q19 42 19 383q0 101 -3 303t-3 303v117q0 2 0.5 15.5t0.5 25t-1 25.5t-3 24t-5 14q-11 12 -162 12q-33 0 -93 -12t-80 -26q-19 -13 -34 -72.5t-31.5 -111t-42.5 -53.5q-42 26 -56 44v383z" />
+<glyph unicode="&#xf035;" d="M81 1407l54 -27q12 -5 211 -5q44 0 132 2t132 2q70 0 246.5 1t304.5 0.5t247 -4.5q33 -1 56 31l42 1q4 0 14 -0.5t14 -0.5q2 -112 2 -336q0 -80 -5 -109q-39 -14 -68 -18q-25 44 -54 128q-3 9 -11 47.5t-15 73.5t-7 36q-10 13 -27 19q-5 2 -66 2q-30 0 -93 1t-103 1 t-94 -2t-96 -7q-9 -81 -8 -136l1 -152v52q0 -55 1 -154t1.5 -180t0.5 -153q0 -16 -2.5 -71.5t0 -91.5t12.5 -69q40 -21 124 -42.5t120 -37.5q5 -40 5 -50q0 -14 -3 -29l-34 -1q-76 -2 -218 8t-207 10q-50 0 -151 -9t-152 -9q-3 51 -3 52v9q17 27 61.5 43t98.5 29t78 27 q7 16 11.5 74t6 145.5t1.5 155t-0.5 153.5t-0.5 89q0 7 -2.5 21.5t-2.5 22.5q0 7 0.5 44t1 73t0 76.5t-3 67.5t-6.5 32q-11 12 -162 12q-41 0 -163 -13.5t-138 -24.5q-19 -12 -34 -71.5t-31.5 -111.5t-42.5 -54q-42 26 -56 44v383zM1310 125q12 0 42 -19.5t57.5 -41.5 t59.5 -49t36 -30q26 -21 26 -49t-26 -49q-4 -3 -36 -30t-59.5 -49t-57.5 -41.5t-42 -19.5q-13 0 -20.5 10.5t-10 28.5t-2.5 33.5t1.5 33t1.5 19.5h-1024q0 -2 1.5 -19.5t1.5 -33t-2.5 -33.5t-10 -28.5t-20.5 -10.5q-12 0 -42 19.5t-57.5 41.5t-59.5 49t-36 30q-26 21 -26 49 t26 49q4 3 36 30t59.5 49t57.5 41.5t42 19.5q13 0 20.5 -10.5t10 -28.5t2.5 -33.5t-1.5 -33t-1.5 -19.5h1024q0 2 -1.5 19.5t-1.5 33t2.5 33.5t10 28.5t20.5 10.5z" />
+<glyph unicode="&#xf036;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45 t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf037;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h896q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45t-45 -19 h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h640q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf038;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45 t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf039;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45 t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf03a;" horiz-adv-x="1792" d="M256 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM256 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5 t9.5 -22.5zM256 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344 q13 0 22.5 -9.5t9.5 -22.5zM256 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5 t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192 q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf03b;" horiz-adv-x="1792" d="M384 992v-576q0 -13 -9.5 -22.5t-22.5 -9.5q-14 0 -23 9l-288 288q-9 9 -9 23t9 23l288 288q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5 t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088 q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf03c;" horiz-adv-x="1792" d="M352 704q0 -14 -9 -23l-288 -288q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v576q0 13 9.5 22.5t22.5 9.5q14 0 23 -9l288 -288q9 -9 9 -23zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5 t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088 q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf03d;" horiz-adv-x="1792" d="M1792 1184v-1088q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-403 403v-166q0 -119 -84.5 -203.5t-203.5 -84.5h-704q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h704q119 0 203.5 -84.5t84.5 -203.5v-165l403 402q18 19 45 19q12 0 25 -5 q39 -17 39 -59z" />
+<glyph unicode="&#xf03e;" horiz-adv-x="1920" d="M640 960q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1664 576v-448h-1408v192l320 320l160 -160l512 512zM1760 1280h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-1216q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5v1216 q0 13 -9.5 22.5t-22.5 9.5zM1920 1248v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf040;" d="M363 0l91 91l-235 235l-91 -91v-107h128v-128h107zM886 928q0 22 -22 22q-10 0 -17 -7l-542 -542q-7 -7 -7 -17q0 -22 22 -22q10 0 17 7l542 542q7 7 7 17zM832 1120l416 -416l-832 -832h-416v416zM1515 1024q0 -53 -37 -90l-166 -166l-416 416l166 165q36 38 90 38 q53 0 91 -38l235 -234q37 -39 37 -91z" />
+<glyph unicode="&#xf041;" horiz-adv-x="1024" d="M768 896q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1024 896q0 -109 -33 -179l-364 -774q-16 -33 -47.5 -52t-67.5 -19t-67.5 19t-46.5 52l-365 774q-33 70 -33 179q0 212 150 362t362 150t362 -150t150 -362z" />
+<glyph unicode="&#xf042;" d="M768 96v1088q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf043;" horiz-adv-x="1024" d="M512 384q0 36 -20 69q-1 1 -15.5 22.5t-25.5 38t-25 44t-21 50.5q-4 16 -21 16t-21 -16q-7 -23 -21 -50.5t-25 -44t-25.5 -38t-15.5 -22.5q-20 -33 -20 -69q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 512q0 -212 -150 -362t-362 -150t-362 150t-150 362 q0 145 81 275q6 9 62.5 90.5t101 151t99.5 178t83 201.5q9 30 34 47t51 17t51.5 -17t33.5 -47q28 -93 83 -201.5t99.5 -178t101 -151t62.5 -90.5q81 -127 81 -275z" />
+<glyph unicode="&#xf044;" horiz-adv-x="1792" d="M888 352l116 116l-152 152l-116 -116v-56h96v-96h56zM1328 1072q-16 16 -33 -1l-350 -350q-17 -17 -1 -33t33 1l350 350q17 17 1 33zM1408 478v-190q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-14 -14 -32 -8q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v126q0 13 9 22l64 64q15 15 35 7t20 -29zM1312 1216l288 -288l-672 -672h-288v288zM1756 1084l-92 -92 l-288 288l92 92q28 28 68 28t68 -28l152 -152q28 -28 28 -68t-28 -68z" />
+<glyph unicode="&#xf045;" horiz-adv-x="1664" d="M1408 547v-259q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h255v0q13 0 22.5 -9.5t9.5 -22.5q0 -27 -26 -32q-77 -26 -133 -60q-10 -4 -16 -4h-112q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832 q66 0 113 47t47 113v214q0 19 18 29q28 13 54 37q16 16 35 8q21 -9 21 -29zM1645 1043l-384 -384q-18 -19 -45 -19q-12 0 -25 5q-39 17 -39 59v192h-160q-323 0 -438 -131q-119 -137 -74 -473q3 -23 -20 -34q-8 -2 -12 -2q-16 0 -26 13q-10 14 -21 31t-39.5 68.5t-49.5 99.5 t-38.5 114t-17.5 122q0 49 3.5 91t14 90t28 88t47 81.5t68.5 74t94.5 61.5t124.5 48.5t159.5 30.5t196.5 11h160v192q0 42 39 59q13 5 25 5q26 0 45 -19l384 -384q19 -19 19 -45t-19 -45z" />
+<glyph unicode="&#xf046;" horiz-adv-x="1664" d="M1408 606v-318q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-10 -10 -23 -10q-3 0 -9 2q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832 q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v254q0 13 9 22l64 64q10 10 23 10q6 0 12 -3q20 -8 20 -29zM1639 1095l-814 -814q-24 -24 -57 -24t-57 24l-430 430q-24 24 -24 57t24 57l110 110q24 24 57 24t57 -24l263 -263l647 647q24 24 57 24t57 -24l110 -110 q24 -24 24 -57t-24 -57z" />
+<glyph unicode="&#xf047;" horiz-adv-x="1792" d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-384v-384h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v384h-384v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45 t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h384v384h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45t-19 -45t-45 -19h-128v-384h384v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" />
+<glyph unicode="&#xf048;" horiz-adv-x="1024" d="M979 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19z" />
+<glyph unicode="&#xf049;" horiz-adv-x="1792" d="M1747 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19l710 710 q19 19 32 13t13 -32v-710q4 11 13 19z" />
+<glyph unicode="&#xf04a;" horiz-adv-x="1664" d="M1619 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-8 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-19 19 -19 45t19 45l710 710q19 19 32 13t13 -32v-710q5 11 13 19z" />
+<glyph unicode="&#xf04b;" horiz-adv-x="1408" d="M1384 609l-1328 -738q-23 -13 -39.5 -3t-16.5 36v1472q0 26 16.5 36t39.5 -3l1328 -738q23 -13 23 -31t-23 -31z" />
+<glyph unicode="&#xf04c;" d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45zM640 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf04d;" d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf04e;" horiz-adv-x="1664" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q19 -19 19 -45t-19 -45l-710 -710q-19 -19 -32 -13t-13 32v710q-5 -10 -13 -19z" />
+<glyph unicode="&#xf050;" horiz-adv-x="1792" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19l-710 -710 q-19 -19 -32 -13t-13 32v710q-5 -10 -13 -19z" />
+<glyph unicode="&#xf051;" horiz-adv-x="1024" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19z" />
+<glyph unicode="&#xf052;" horiz-adv-x="1538" d="M14 557l710 710q19 19 45 19t45 -19l710 -710q19 -19 13 -32t-32 -13h-1472q-26 0 -32 13t13 32zM1473 0h-1408q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1408q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19z" />
+<glyph unicode="&#xf053;" horiz-adv-x="1280" d="M1171 1235l-531 -531l531 -531q19 -19 19 -45t-19 -45l-166 -166q-19 -19 -45 -19t-45 19l-742 742q-19 19 -19 45t19 45l742 742q19 19 45 19t45 -19l166 -166q19 -19 19 -45t-19 -45z" />
+<glyph unicode="&#xf054;" horiz-adv-x="1280" d="M1107 659l-742 -742q-19 -19 -45 -19t-45 19l-166 166q-19 19 -19 45t19 45l531 531l-531 531q-19 19 -19 45t19 45l166 166q19 19 45 19t45 -19l742 -742q19 -19 19 -45t-19 -45z" />
+<glyph unicode="&#xf055;" d="M1216 576v128q0 26 -19 45t-45 19h-256v256q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-256h-256q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h256v-256q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v256h256q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5 t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf056;" d="M1216 576v128q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5 t103 -385.5z" />
+<glyph unicode="&#xf057;" d="M1149 414q0 26 -19 45l-181 181l181 181q19 19 19 45q0 27 -19 46l-90 90q-19 19 -46 19q-26 0 -45 -19l-181 -181l-181 181q-19 19 -45 19q-27 0 -46 -19l-90 -90q-19 -19 -19 -46q0 -26 19 -45l181 -181l-181 -181q-19 -19 -19 -45q0 -27 19 -46l90 -90q19 -19 46 -19 q26 0 45 19l181 181l181 -181q19 -19 45 -19q27 0 46 19l90 90q19 19 19 46zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf058;" d="M1284 802q0 28 -18 46l-91 90q-19 19 -45 19t-45 -19l-408 -407l-226 226q-19 19 -45 19t-45 -19l-91 -90q-18 -18 -18 -46q0 -27 18 -45l362 -362q19 -19 45 -19q27 0 46 19l543 543q18 18 18 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf059;" d="M896 160v192q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h192q14 0 23 9t9 23zM1152 832q0 88 -55.5 163t-138.5 116t-170 41q-243 0 -371 -213q-15 -24 8 -42l132 -100q7 -6 19 -6q16 0 25 12q53 68 86 92q34 24 86 24q48 0 85.5 -26t37.5 -59 q0 -38 -20 -61t-68 -45q-63 -28 -115.5 -86.5t-52.5 -125.5v-36q0 -14 9 -23t23 -9h192q14 0 23 9t9 23q0 19 21.5 49.5t54.5 49.5q32 18 49 28.5t46 35t44.5 48t28 60.5t12.5 81zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf05a;" d="M1024 160v160q0 14 -9 23t-23 9h-96v512q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h96v-320h-96q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h448q14 0 23 9t9 23zM896 1056v160q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23 t23 -9h192q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf05b;" d="M1197 512h-109q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h109q-32 108 -112.5 188.5t-188.5 112.5v-109q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v109q-108 -32 -188.5 -112.5t-112.5 -188.5h109q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-109 q32 -108 112.5 -188.5t188.5 -112.5v109q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-109q108 32 188.5 112.5t112.5 188.5zM1536 704v-128q0 -26 -19 -45t-45 -19h-143q-37 -161 -154.5 -278.5t-278.5 -154.5v-143q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v143 q-161 37 -278.5 154.5t-154.5 278.5h-143q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h143q37 161 154.5 278.5t278.5 154.5v143q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-143q161 -37 278.5 -154.5t154.5 -278.5h143q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf05c;" d="M1097 457l-146 -146q-10 -10 -23 -10t-23 10l-137 137l-137 -137q-10 -10 -23 -10t-23 10l-146 146q-10 10 -10 23t10 23l137 137l-137 137q-10 10 -10 23t10 23l146 146q10 10 23 10t23 -10l137 -137l137 137q10 10 23 10t23 -10l146 -146q10 -10 10 -23t-10 -23 l-137 -137l137 -137q10 -10 10 -23t-10 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5 t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf05d;" d="M1171 723l-422 -422q-19 -19 -45 -19t-45 19l-294 294q-19 19 -19 45t19 45l102 102q19 19 45 19t45 -19l147 -147l275 275q19 19 45 19t45 -19l102 -102q19 -19 19 -45t-19 -45zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198 t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf05e;" d="M1312 643q0 161 -87 295l-754 -753q137 -89 297 -89q111 0 211.5 43.5t173.5 116.5t116 174.5t43 212.5zM313 344l755 754q-135 91 -300 91q-148 0 -273 -73t-198 -199t-73 -274q0 -162 89 -299zM1536 643q0 -157 -61 -300t-163.5 -246t-245 -164t-298.5 -61t-298.5 61 t-245 164t-163.5 246t-61 300t61 299.5t163.5 245.5t245 164t298.5 61t298.5 -61t245 -164t163.5 -245.5t61 -299.5z" />
+<glyph unicode="&#xf060;" d="M1536 640v-128q0 -53 -32.5 -90.5t-84.5 -37.5h-704l293 -294q38 -36 38 -90t-38 -90l-75 -76q-37 -37 -90 -37q-52 0 -91 37l-651 652q-37 37 -37 90q0 52 37 91l651 650q38 38 91 38q52 0 90 -38l75 -74q38 -38 38 -91t-38 -91l-293 -293h704q52 0 84.5 -37.5 t32.5 -90.5z" />
+<glyph unicode="&#xf061;" d="M1472 576q0 -54 -37 -91l-651 -651q-39 -37 -91 -37q-51 0 -90 37l-75 75q-38 38 -38 91t38 91l293 293h-704q-52 0 -84.5 37.5t-32.5 90.5v128q0 53 32.5 90.5t84.5 37.5h704l-293 294q-38 36 -38 90t38 90l75 75q38 38 90 38q53 0 91 -38l651 -651q37 -35 37 -90z" />
+<glyph unicode="&#xf062;" horiz-adv-x="1664" d="M1611 565q0 -51 -37 -90l-75 -75q-38 -38 -91 -38q-54 0 -90 38l-294 293v-704q0 -52 -37.5 -84.5t-90.5 -32.5h-128q-53 0 -90.5 32.5t-37.5 84.5v704l-294 -293q-36 -38 -90 -38t-90 38l-75 75q-38 38 -38 90q0 53 38 91l651 651q35 37 90 37q54 0 91 -37l651 -651 q37 -39 37 -91z" />
+<glyph unicode="&#xf063;" horiz-adv-x="1664" d="M1611 704q0 -53 -37 -90l-651 -652q-39 -37 -91 -37q-53 0 -90 37l-651 652q-38 36 -38 90q0 53 38 91l74 75q39 37 91 37q53 0 90 -37l294 -294v704q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-704l294 294q37 37 90 37q52 0 91 -37l75 -75q37 -39 37 -91z" />
+<glyph unicode="&#xf064;" horiz-adv-x="1792" d="M1792 896q0 -26 -19 -45l-512 -512q-19 -19 -45 -19t-45 19t-19 45v256h-224q-98 0 -175.5 -6t-154 -21.5t-133 -42.5t-105.5 -69.5t-80 -101t-48.5 -138.5t-17.5 -181q0 -55 5 -123q0 -6 2.5 -23.5t2.5 -26.5q0 -15 -8.5 -25t-23.5 -10q-16 0 -28 17q-7 9 -13 22 t-13.5 30t-10.5 24q-127 285 -127 451q0 199 53 333q162 403 875 403h224v256q0 26 19 45t45 19t45 -19l512 -512q19 -19 19 -45z" />
+<glyph unicode="&#xf065;" d="M755 480q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23zM1536 1344v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332 q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf066;" d="M768 576v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45zM1523 1248q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45 t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23z" />
+<glyph unicode="&#xf067;" horiz-adv-x="1408" d="M1408 800v-192q0 -40 -28 -68t-68 -28h-416v-416q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v416h-416q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h416v416q0 40 28 68t68 28h192q40 0 68 -28t28 -68v-416h416q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf068;" horiz-adv-x="1408" d="M1408 800v-192q0 -40 -28 -68t-68 -28h-1216q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h1216q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf069;" horiz-adv-x="1664" d="M1482 486q46 -26 59.5 -77.5t-12.5 -97.5l-64 -110q-26 -46 -77.5 -59.5t-97.5 12.5l-266 153v-307q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v307l-266 -153q-46 -26 -97.5 -12.5t-77.5 59.5l-64 110q-26 46 -12.5 97.5t59.5 77.5l266 154l-266 154 q-46 26 -59.5 77.5t12.5 97.5l64 110q26 46 77.5 59.5t97.5 -12.5l266 -153v307q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-307l266 153q46 26 97.5 12.5t77.5 -59.5l64 -110q26 -46 12.5 -97.5t-59.5 -77.5l-266 -154z" />
+<glyph unicode="&#xf06a;" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM896 161v190q0 14 -9 23.5t-22 9.5h-192q-13 0 -23 -10t-10 -23v-190q0 -13 10 -23t23 -10h192 q13 0 22 9.5t9 23.5zM894 505l18 621q0 12 -10 18q-10 8 -24 8h-220q-14 0 -24 -8q-10 -6 -10 -18l17 -621q0 -10 10 -17.5t24 -7.5h185q14 0 23.5 7.5t10.5 17.5z" />
+<glyph unicode="&#xf06b;" d="M928 180v56v468v192h-320v-192v-468v-56q0 -25 18 -38.5t46 -13.5h192q28 0 46 13.5t18 38.5zM472 1024h195l-126 161q-26 31 -69 31q-40 0 -68 -28t-28 -68t28 -68t68 -28zM1160 1120q0 40 -28 68t-68 28q-43 0 -69 -31l-125 -161h194q40 0 68 28t28 68zM1536 864v-320 q0 -14 -9 -23t-23 -9h-96v-416q0 -40 -28 -68t-68 -28h-1088q-40 0 -68 28t-28 68v416h-96q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h440q-93 0 -158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5q107 0 168 -77l128 -165l128 165q61 77 168 77q93 0 158.5 -65.5t65.5 -158.5 t-65.5 -158.5t-158.5 -65.5h440q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf06c;" horiz-adv-x="1792" d="M1280 832q0 26 -19 45t-45 19q-172 0 -318 -49.5t-259.5 -134t-235.5 -219.5q-19 -21 -19 -45q0 -26 19 -45t45 -19q24 0 45 19q27 24 74 71t67 66q137 124 268.5 176t313.5 52q26 0 45 19t19 45zM1792 1030q0 -95 -20 -193q-46 -224 -184.5 -383t-357.5 -268 q-214 -108 -438 -108q-148 0 -286 47q-15 5 -88 42t-96 37q-16 0 -39.5 -32t-45 -70t-52.5 -70t-60 -32q-30 0 -51 11t-31 24t-27 42q-2 4 -6 11t-5.5 10t-3 9.5t-1.5 13.5q0 35 31 73.5t68 65.5t68 56t31 48q0 4 -14 38t-16 44q-9 51 -9 104q0 115 43.5 220t119 184.5 t170.5 139t204 95.5q55 18 145 25.5t179.5 9t178.5 6t163.5 24t113.5 56.5l29.5 29.5t29.5 28t27 20t36.5 16t43.5 4.5q39 0 70.5 -46t47.5 -112t24 -124t8 -96z" />
+<glyph unicode="&#xf06d;" horiz-adv-x="1408" d="M1408 -160v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1152 896q0 -78 -24.5 -144t-64 -112.5t-87.5 -88t-96 -77.5t-87.5 -72t-64 -81.5t-24.5 -96.5q0 -96 67 -224l-4 1l1 -1 q-90 41 -160 83t-138.5 100t-113.5 122.5t-72.5 150.5t-27.5 184q0 78 24.5 144t64 112.5t87.5 88t96 77.5t87.5 72t64 81.5t24.5 96.5q0 94 -66 224l3 -1l-1 1q90 -41 160 -83t138.5 -100t113.5 -122.5t72.5 -150.5t27.5 -184z" />
+<glyph unicode="&#xf06e;" horiz-adv-x="1792" d="M1664 576q-152 236 -381 353q61 -104 61 -225q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 121 61 225q-229 -117 -381 -353q133 -205 333.5 -326.5t434.5 -121.5t434.5 121.5t333.5 326.5zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5 t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1792 576q0 -34 -20 -69q-140 -230 -376.5 -368.5t-499.5 -138.5t-499.5 139t-376.5 368q-20 35 -20 69t20 69q140 229 376.5 368t499.5 139t499.5 -139t376.5 -368q20 -35 20 -69z" />
+<glyph unicode="&#xf070;" horiz-adv-x="1792" d="M555 201l78 141q-87 63 -136 159t-49 203q0 121 61 225q-229 -117 -381 -353q167 -258 427 -375zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1307 1151q0 -7 -1 -9 q-105 -188 -315 -566t-316 -567l-49 -89q-10 -16 -28 -16q-12 0 -134 70q-16 10 -16 28q0 12 44 87q-143 65 -263.5 173t-208.5 245q-20 31 -20 69t20 69q153 235 380 371t496 136q89 0 180 -17l54 97q10 16 28 16q5 0 18 -6t31 -15.5t33 -18.5t31.5 -18.5t19.5 -11.5 q16 -10 16 -27zM1344 704q0 -139 -79 -253.5t-209 -164.5l280 502q8 -45 8 -84zM1792 576q0 -35 -20 -69q-39 -64 -109 -145q-150 -172 -347.5 -267t-419.5 -95l74 132q212 18 392.5 137t301.5 307q-115 179 -282 294l63 112q95 -64 182.5 -153t144.5 -184q20 -34 20 -69z " />
+<glyph unicode="&#xf071;" horiz-adv-x="1792" d="M1024 161v190q0 14 -9.5 23.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -23.5v-190q0 -14 9.5 -23.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 23.5zM1022 535l18 459q0 12 -10 19q-13 11 -24 11h-220q-11 0 -24 -11q-10 -7 -10 -21l17 -457q0 -10 10 -16.5t24 -6.5h185 q14 0 23.5 6.5t10.5 16.5zM1008 1469l768 -1408q35 -63 -2 -126q-17 -29 -46.5 -46t-63.5 -17h-1536q-34 0 -63.5 17t-46.5 46q-37 63 -2 126l768 1408q17 31 47 49t65 18t65 -18t47 -49z" />
+<glyph unicode="&#xf072;" horiz-adv-x="1408" d="M1376 1376q44 -52 12 -148t-108 -172l-161 -161l160 -696q5 -19 -12 -33l-128 -96q-7 -6 -19 -6q-4 0 -7 1q-15 3 -21 16l-279 508l-259 -259l53 -194q5 -17 -8 -31l-96 -96q-9 -9 -23 -9h-2q-15 2 -24 13l-189 252l-252 189q-11 7 -13 23q-1 13 9 25l96 97q9 9 23 9 q6 0 8 -1l194 -53l259 259l-508 279q-14 8 -17 24q-2 16 9 27l128 128q14 13 30 8l665 -159l160 160q76 76 172 108t148 -12z" />
+<glyph unicode="&#xf073;" horiz-adv-x="1664" d="M128 -128h288v288h-288v-288zM480 -128h320v288h-320v-288zM128 224h288v320h-288v-320zM480 224h320v320h-320v-320zM128 608h288v288h-288v-288zM864 -128h320v288h-320v-288zM480 608h320v288h-320v-288zM1248 -128h288v288h-288v-288zM864 224h320v320h-320v-320z M512 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1248 224h288v320h-288v-320zM864 608h320v288h-320v-288zM1248 608h288v288h-288v-288zM1280 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64 q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1664 1152v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47 h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf074;" horiz-adv-x="1792" d="M666 1055q-60 -92 -137 -273q-22 45 -37 72.5t-40.5 63.5t-51 56.5t-63 35t-81.5 14.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q250 0 410 -225zM1792 256q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192q-32 0 -85 -0.5t-81 -1t-73 1 t-71 5t-64 10.5t-63 18.5t-58 28.5t-59 40t-55 53.5t-56 69.5q59 93 136 273q22 -45 37 -72.5t40.5 -63.5t51 -56.5t63 -35t81.5 -14.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23zM1792 1152q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5 v192h-256q-48 0 -87 -15t-69 -45t-51 -61.5t-45 -77.5q-32 -62 -78 -171q-29 -66 -49.5 -111t-54 -105t-64 -100t-74 -83t-90 -68.5t-106.5 -42t-128 -16.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q48 0 87 15t69 45t51 61.5t45 77.5q32 62 78 171q29 66 49.5 111 t54 105t64 100t74 83t90 68.5t106.5 42t128 16.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z" />
+<glyph unicode="&#xf075;" horiz-adv-x="1792" d="M1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22q-17 -2 -30.5 9t-17.5 29v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281 q0 130 71 248.5t191 204.5t286 136.5t348 50.5q244 0 450 -85.5t326 -233t120 -321.5z" />
+<glyph unicode="&#xf076;" d="M1536 704v-128q0 -201 -98.5 -362t-274 -251.5t-395.5 -90.5t-395.5 90.5t-274 251.5t-98.5 362v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-128q0 -52 23.5 -90t53.5 -57t71 -30t64 -13t44 -2t44 2t64 13t71 30t53.5 57t23.5 90v128q0 26 19 45t45 19h384 q26 0 45 -19t19 -45zM512 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45zM1536 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf077;" horiz-adv-x="1792" d="M1683 205l-166 -165q-19 -19 -45 -19t-45 19l-531 531l-531 -531q-19 -19 -45 -19t-45 19l-166 165q-19 19 -19 45.5t19 45.5l742 741q19 19 45 19t45 -19l742 -741q19 -19 19 -45.5t-19 -45.5z" />
+<glyph unicode="&#xf078;" horiz-adv-x="1792" d="M1683 728l-742 -741q-19 -19 -45 -19t-45 19l-742 741q-19 19 -19 45.5t19 45.5l166 165q19 19 45 19t45 -19l531 -531l531 531q19 19 45 19t45 -19l166 -165q19 -19 19 -45.5t-19 -45.5z" />
+<glyph unicode="&#xf079;" horiz-adv-x="1920" d="M1280 32q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-8 0 -13.5 2t-9 7t-5.5 8t-3 11.5t-1 11.5v13v11v160v416h-192q-26 0 -45 19t-19 45q0 24 15 41l320 384q19 22 49 22t49 -22l320 -384q15 -17 15 -41q0 -26 -19 -45t-45 -19h-192v-384h576q16 0 25 -11l160 -192q7 -11 7 -21 zM1920 448q0 -24 -15 -41l-320 -384q-20 -23 -49 -23t-49 23l-320 384q-15 17 -15 41q0 26 19 45t45 19h192v384h-576q-16 0 -25 12l-160 192q-7 9 -7 20q0 13 9.5 22.5t22.5 9.5h960q8 0 13.5 -2t9 -7t5.5 -8t3 -11.5t1 -11.5v-13v-11v-160v-416h192q26 0 45 -19t19 -45z " />
+<glyph unicode="&#xf07a;" horiz-adv-x="1664" d="M640 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1536 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1664 1088v-512q0 -24 -16 -42.5t-41 -21.5 l-1044 -122q1 -7 4.5 -21.5t6 -26.5t2.5 -22q0 -16 -24 -64h920q26 0 45 -19t19 -45t-19 -45t-45 -19h-1024q-26 0 -45 19t-19 45q0 14 11 39.5t29.5 59.5t20.5 38l-177 823h-204q-26 0 -45 19t-19 45t19 45t45 19h256q16 0 28.5 -6.5t20 -15.5t13 -24.5t7.5 -26.5 t5.5 -29.5t4.5 -25.5h1201q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf07b;" horiz-adv-x="1664" d="M1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" />
+<glyph unicode="&#xf07c;" horiz-adv-x="1920" d="M1879 584q0 -31 -31 -66l-336 -396q-43 -51 -120.5 -86.5t-143.5 -35.5h-1088q-34 0 -60.5 13t-26.5 43q0 31 31 66l336 396q43 51 120.5 86.5t143.5 35.5h1088q34 0 60.5 -13t26.5 -43zM1536 928v-160h-832q-94 0 -197 -47.5t-164 -119.5l-337 -396l-5 -6q0 4 -0.5 12.5 t-0.5 12.5v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158z" />
+<glyph unicode="&#xf07d;" horiz-adv-x="768" d="M704 1216q0 -26 -19 -45t-45 -19h-128v-1024h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v1024h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45z" />
+<glyph unicode="&#xf07e;" horiz-adv-x="1792" d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-1024v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h1024v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" />
+<glyph unicode="&#xf080;" horiz-adv-x="2048" d="M640 640v-512h-256v512h256zM1024 1152v-1024h-256v1024h256zM2048 0v-128h-2048v1536h128v-1408h1920zM1408 896v-768h-256v768h256zM1792 1280v-1152h-256v1152h256z" />
+<glyph unicode="&#xf081;" d="M1280 926q-56 -25 -121 -34q68 40 93 117q-65 -38 -134 -51q-61 66 -153 66q-87 0 -148.5 -61.5t-61.5 -148.5q0 -29 5 -48q-129 7 -242 65t-192 155q-29 -50 -29 -106q0 -114 91 -175q-47 1 -100 26v-2q0 -75 50 -133.5t123 -72.5q-29 -8 -51 -8q-13 0 -39 4 q21 -63 74.5 -104t121.5 -42q-116 -90 -261 -90q-26 0 -50 3q148 -94 322 -94q112 0 210 35.5t168 95t120.5 137t75 162t24.5 168.5q0 18 -1 27q63 45 105 109zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5 t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf082;" d="M1536 160q0 -119 -84.5 -203.5t-203.5 -84.5h-192v608h203l30 224h-233v143q0 54 28 83t96 29l132 1v207q-96 9 -180 9q-136 0 -218 -80.5t-82 -225.5v-166h-224v-224h224v-608h-544q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960 q119 0 203.5 -84.5t84.5 -203.5v-960z" />
+<glyph unicode="&#xf083;" horiz-adv-x="1792" d="M928 704q0 14 -9 23t-23 9q-66 0 -113 -47t-47 -113q0 -14 9 -23t23 -9t23 9t9 23q0 40 28 68t68 28q14 0 23 9t9 23zM1152 574q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM128 0h1536v128h-1536v-128zM1280 574q0 159 -112.5 271.5 t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM256 1216h384v128h-384v-128zM128 1024h1536v118v138h-828l-64 -128h-644v-128zM1792 1280v-1280q0 -53 -37.5 -90.5t-90.5 -37.5h-1536q-53 0 -90.5 37.5t-37.5 90.5v1280 q0 53 37.5 90.5t90.5 37.5h1536q53 0 90.5 -37.5t37.5 -90.5z" />
+<glyph unicode="&#xf084;" horiz-adv-x="1792" d="M832 1024q0 80 -56 136t-136 56t-136 -56t-56 -136q0 -42 19 -83q-41 19 -83 19q-80 0 -136 -56t-56 -136t56 -136t136 -56t136 56t56 136q0 42 -19 83q41 -19 83 -19q80 0 136 56t56 136zM1683 320q0 -17 -49 -66t-66 -49q-9 0 -28.5 16t-36.5 33t-38.5 40t-24.5 26 l-96 -96l220 -220q28 -28 28 -68q0 -42 -39 -81t-81 -39q-40 0 -68 28l-671 671q-176 -131 -365 -131q-163 0 -265.5 102.5t-102.5 265.5q0 160 95 313t248 248t313 95q163 0 265.5 -102.5t102.5 -265.5q0 -189 -131 -365l355 -355l96 96q-3 3 -26 24.5t-40 38.5t-33 36.5 t-16 28.5q0 17 49 66t66 49q13 0 23 -10q6 -6 46 -44.5t82 -79.5t86.5 -86t73 -78t28.5 -41z" />
+<glyph unicode="&#xf085;" horiz-adv-x="1920" d="M896 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1664 128q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 1152q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5zM1280 731v-185q0 -10 -7 -19.5t-16 -10.5l-155 -24q-11 -35 -32 -76q34 -48 90 -115q7 -10 7 -20q0 -12 -7 -19q-23 -30 -82.5 -89.5t-78.5 -59.5q-11 0 -21 7l-115 90q-37 -19 -77 -31q-11 -108 -23 -155q-7 -24 -30 -24h-186q-11 0 -20 7.5t-10 17.5 l-23 153q-34 10 -75 31l-118 -89q-7 -7 -20 -7q-11 0 -21 8q-144 133 -144 160q0 9 7 19q10 14 41 53t47 61q-23 44 -35 82l-152 24q-10 1 -17 9.5t-7 19.5v185q0 10 7 19.5t16 10.5l155 24q11 35 32 76q-34 48 -90 115q-7 11 -7 20q0 12 7 20q22 30 82 89t79 59q11 0 21 -7 l115 -90q34 18 77 32q11 108 23 154q7 24 30 24h186q11 0 20 -7.5t10 -17.5l23 -153q34 -10 75 -31l118 89q8 7 20 7q11 0 21 -8q144 -133 144 -160q0 -9 -7 -19q-12 -16 -42 -54t-45 -60q23 -48 34 -82l152 -23q10 -2 17 -10.5t7 -19.5zM1920 198v-140q0 -16 -149 -31 q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20 t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31zM1920 1222v-140q0 -16 -149 -31q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68 q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70 q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31z" />
+<glyph unicode="&#xf086;" horiz-adv-x="1792" d="M1408 768q0 -139 -94 -257t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224 q0 139 94 257t256.5 186.5t353.5 68.5t353.5 -68.5t256.5 -186.5t94 -257zM1792 512q0 -120 -71 -224.5t-195 -176.5q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7 q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230z" />
+<glyph unicode="&#xf087;" d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 768q0 51 -39 89.5t-89 38.5h-352q0 58 48 159.5t48 160.5q0 98 -32 145t-128 47q-26 -26 -38 -85t-30.5 -125.5t-59.5 -109.5q-22 -23 -77 -91q-4 -5 -23 -30t-31.5 -41t-34.5 -42.5 t-40 -44t-38.5 -35.5t-40 -27t-35.5 -9h-32v-640h32q13 0 31.5 -3t33 -6.5t38 -11t35 -11.5t35.5 -12.5t29 -10.5q211 -73 342 -73h121q192 0 192 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5q32 1 53.5 47t21.5 81zM1536 769 q0 -89 -49 -163q9 -33 9 -69q0 -77 -38 -144q3 -21 3 -43q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5h-36h-93q-96 0 -189.5 22.5t-216.5 65.5q-116 40 -138 40h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h274q36 24 137 155q58 75 107 128 q24 25 35.5 85.5t30.5 126.5t62 108q39 37 90 37q84 0 151 -32.5t102 -101.5t35 -186q0 -93 -48 -192h176q104 0 180 -76t76 -179z" />
+<glyph unicode="&#xf088;" d="M256 1088q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 512q0 35 -21.5 81t-53.5 47q15 17 25 47.5t10 55.5q0 69 -53 119q18 32 18 69t-17.5 73.5t-47.5 52.5q5 30 5 56q0 85 -49 126t-136 41h-128q-131 0 -342 -73q-5 -2 -29 -10.5 t-35.5 -12.5t-35 -11.5t-38 -11t-33 -6.5t-31.5 -3h-32v-640h32q16 0 35.5 -9t40 -27t38.5 -35.5t40 -44t34.5 -42.5t31.5 -41t23 -30q55 -68 77 -91q41 -43 59.5 -109.5t30.5 -125.5t38 -85q96 0 128 47t32 145q0 59 -48 160.5t-48 159.5h352q50 0 89 38.5t39 89.5z M1536 511q0 -103 -76 -179t-180 -76h-176q48 -99 48 -192q0 -118 -35 -186q-35 -69 -102 -101.5t-151 -32.5q-51 0 -90 37q-34 33 -54 82t-25.5 90.5t-17.5 84.5t-31 64q-48 50 -107 127q-101 131 -137 155h-274q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5 h288q22 0 138 40q128 44 223 66t200 22h112q140 0 226.5 -79t85.5 -216v-5q60 -77 60 -178q0 -22 -3 -43q38 -67 38 -144q0 -36 -9 -69q49 -74 49 -163z" />
+<glyph unicode="&#xf089;" horiz-adv-x="896" d="M832 1504v-1339l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41z" />
+<glyph unicode="&#xf08a;" horiz-adv-x="1792" d="M1664 940q0 81 -21.5 143t-55 98.5t-81.5 59.5t-94 31t-98 8t-112 -25.5t-110.5 -64t-86.5 -72t-60 -61.5q-18 -22 -49 -22t-49 22q-24 28 -60 61.5t-86.5 72t-110.5 64t-112 25.5t-98 -8t-94 -31t-81.5 -59.5t-55 -98.5t-21.5 -143q0 -168 187 -355l581 -560l580 559 q188 188 188 356zM1792 940q0 -221 -229 -450l-623 -600q-18 -18 -44 -18t-44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5 q224 0 351 -124t127 -344z" />
+<glyph unicode="&#xf08b;" horiz-adv-x="1664" d="M640 96q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h320q13 0 22.5 -9.5t9.5 -22.5q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-66 0 -113 -47t-47 -113v-704 q0 -66 47 -113t113 -47h288h11h13t11.5 -1t11.5 -3t8 -5.5t7 -9t2 -13.5zM1568 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45z" />
+<glyph unicode="&#xf08c;" d="M237 122h231v694h-231v-694zM483 1030q-1 52 -36 86t-93 34t-94.5 -34t-36.5 -86q0 -51 35.5 -85.5t92.5 -34.5h1q59 0 95 34.5t36 85.5zM1068 122h231v398q0 154 -73 233t-193 79q-136 0 -209 -117h2v101h-231q3 -66 0 -694h231v388q0 38 7 56q15 35 45 59.5t74 24.5 q116 0 116 -157v-371zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf08d;" horiz-adv-x="1152" d="M480 672v448q0 14 -9 23t-23 9t-23 -9t-9 -23v-448q0 -14 9 -23t23 -9t23 9t9 23zM1152 320q0 -26 -19 -45t-45 -19h-429l-51 -483q-2 -12 -10.5 -20.5t-20.5 -8.5h-1q-27 0 -32 27l-76 485h-404q-26 0 -45 19t-19 45q0 123 78.5 221.5t177.5 98.5v512q-52 0 -90 38 t-38 90t38 90t90 38h640q52 0 90 -38t38 -90t-38 -90t-90 -38v-512q99 0 177.5 -98.5t78.5 -221.5z" />
+<glyph unicode="&#xf08e;" horiz-adv-x="1792" d="M1408 608v-320q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v320 q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1792 1472v-512q0 -26 -19 -45t-45 -19t-45 19l-176 176l-652 -652q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l652 652l-176 176q-19 19 -19 45t19 45t45 19h512q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf090;" d="M1184 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45zM1536 992v-704q0 -119 -84.5 -203.5t-203.5 -84.5h-320q-13 0 -22.5 9.5t-9.5 22.5 q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q66 0 113 47t47 113v704q0 66 -47 113t-113 47h-288h-11h-13t-11.5 1t-11.5 3t-8 5.5t-7 9t-2 13.5q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf091;" horiz-adv-x="1664" d="M458 653q-74 162 -74 371h-256v-96q0 -78 94.5 -162t235.5 -113zM1536 928v96h-256q0 -209 -74 -371q141 29 235.5 113t94.5 162zM1664 1056v-128q0 -71 -41.5 -143t-112 -130t-173 -97.5t-215.5 -44.5q-42 -54 -95 -95q-38 -34 -52.5 -72.5t-14.5 -89.5q0 -54 30.5 -91 t97.5 -37q75 0 133.5 -45.5t58.5 -114.5v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 69 58.5 114.5t133.5 45.5q67 0 97.5 37t30.5 91q0 51 -14.5 89.5t-52.5 72.5q-53 41 -95 95q-113 5 -215.5 44.5t-173 97.5t-112 130t-41.5 143v128q0 40 28 68t68 28h288v96 q0 66 47 113t113 47h576q66 0 113 -47t47 -113v-96h288q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf092;" d="M394 184q-8 -9 -20 3q-13 11 -4 19q8 9 20 -3q12 -11 4 -19zM352 245q9 -12 0 -19q-8 -6 -17 7t0 18q9 7 17 -6zM291 305q-5 -7 -13 -2q-10 5 -7 12q3 5 13 2q10 -5 7 -12zM322 271q-6 -7 -16 3q-9 11 -2 16q6 6 16 -3q9 -11 2 -16zM451 159q-4 -12 -19 -6q-17 4 -13 15 t19 7q16 -5 13 -16zM514 154q0 -11 -16 -11q-17 -2 -17 11q0 11 16 11q17 2 17 -11zM572 164q2 -10 -14 -14t-18 8t14 15q16 2 18 -9zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-224q-16 0 -24.5 1t-19.5 5t-16 14.5t-5 27.5v239q0 97 -52 142q57 6 102.5 18t94 39 t81 66.5t53 105t20.5 150.5q0 121 -79 206q37 91 -8 204q-28 9 -81 -11t-92 -44l-38 -24q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-86 13.5q-44 -113 -7 -204q-79 -85 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-40 -36 -49 -103 q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52t-49.5 24l-20 3q-21 0 -29 -4.5t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -103t0.5 -68q0 -22 -11 -33.5t-22 -13t-33 -1.5 h-224q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf093;" horiz-adv-x="1664" d="M1280 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 288v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h427q21 -56 70.5 -92 t110.5 -36h256q61 0 110.5 36t70.5 92h427q40 0 68 -28t28 -68zM1339 936q-17 -40 -59 -40h-256v-448q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v448h-256q-42 0 -59 40q-17 39 14 69l448 448q18 19 45 19t45 -19l448 -448q31 -30 14 -69z" />
+<glyph unicode="&#xf094;" d="M1407 710q0 44 -7 113.5t-18 96.5q-12 30 -17 44t-9 36.5t-4 48.5q0 23 5 68.5t5 67.5q0 37 -10 55q-4 1 -13 1q-19 0 -58 -4.5t-59 -4.5q-60 0 -176 24t-175 24q-43 0 -94.5 -11.5t-85 -23.5t-89.5 -34q-137 -54 -202 -103q-96 -73 -159.5 -189.5t-88 -236t-24.5 -248.5 q0 -40 12.5 -120t12.5 -121q0 -23 -11 -66.5t-11 -65.5t12 -36.5t34 -14.5q24 0 72.5 11t73.5 11q57 0 169.5 -15.5t169.5 -15.5q181 0 284 36q129 45 235.5 152.5t166 245.5t59.5 275zM1535 712q0 -165 -70 -327.5t-196 -288t-281 -180.5q-124 -44 -326 -44 q-57 0 -170 14.5t-169 14.5q-24 0 -72.5 -14.5t-73.5 -14.5q-73 0 -123.5 55.5t-50.5 128.5q0 24 11 68t11 67q0 40 -12.5 120.5t-12.5 121.5q0 111 18 217.5t54.5 209.5t100.5 194t150 156q78 59 232 120q194 78 316 78q60 0 175.5 -24t173.5 -24q19 0 57 5t58 5 q81 0 118 -50.5t37 -134.5q0 -23 -5 -68t-5 -68q0 -10 1 -18.5t3 -17t4 -13.5t6.5 -16t6.5 -17q16 -40 25 -118.5t9 -136.5z" />
+<glyph unicode="&#xf095;" horiz-adv-x="1408" d="M1408 296q0 -27 -10 -70.5t-21 -68.5q-21 -50 -122 -106q-94 -51 -186 -51q-27 0 -52.5 3.5t-57.5 12.5t-47.5 14.5t-55.5 20.5t-49 18q-98 35 -175 83q-128 79 -264.5 215.5t-215.5 264.5q-48 77 -83 175q-3 9 -18 49t-20.5 55.5t-14.5 47.5t-12.5 57.5t-3.5 52.5 q0 92 51 186q56 101 106 122q25 11 68.5 21t70.5 10q14 0 21 -3q18 -6 53 -76q11 -19 30 -54t35 -63.5t31 -53.5q3 -4 17.5 -25t21.5 -35.5t7 -28.5q0 -20 -28.5 -50t-62 -55t-62 -53t-28.5 -46q0 -9 5 -22.5t8.5 -20.5t14 -24t11.5 -19q76 -137 174 -235t235 -174 q2 -1 19 -11.5t24 -14t20.5 -8.5t22.5 -5q18 0 46 28.5t53 62t55 62t50 28.5q14 0 28.5 -7t35.5 -21.5t25 -17.5q25 -15 53.5 -31t63.5 -35t54 -30q70 -35 76 -53q3 -7 3 -21z" />
+<glyph unicode="&#xf096;" horiz-adv-x="1408" d="M1120 1280h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v832q0 66 -47 113t-113 47zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf097;" horiz-adv-x="1280" d="M1152 1280h-1024v-1242l423 406l89 85l89 -85l423 -406v1242zM1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289 q0 34 19.5 62t52.5 41q21 9 44 9h1048z" />
+<glyph unicode="&#xf098;" d="M1280 343q0 11 -2 16q-3 8 -38.5 29.5t-88.5 49.5l-53 29q-5 3 -19 13t-25 15t-21 5q-18 0 -47 -32.5t-57 -65.5t-44 -33q-7 0 -16.5 3.5t-15.5 6.5t-17 9.5t-14 8.5q-99 55 -170.5 126.5t-126.5 170.5q-2 3 -8.5 14t-9.5 17t-6.5 15.5t-3.5 16.5q0 13 20.5 33.5t45 38.5 t45 39.5t20.5 36.5q0 10 -5 21t-15 25t-13 19q-3 6 -15 28.5t-25 45.5t-26.5 47.5t-25 40.5t-16.5 18t-16 2q-48 0 -101 -22q-46 -21 -80 -94.5t-34 -130.5q0 -16 2.5 -34t5 -30.5t9 -33t10 -29.5t12.5 -33t11 -30q60 -164 216.5 -320.5t320.5 -216.5q6 -2 30 -11t33 -12.5 t29.5 -10t33 -9t30.5 -5t34 -2.5q57 0 130.5 34t94.5 80q22 53 22 101zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf099;" horiz-adv-x="1664" d="M1620 1128q-67 -98 -162 -167q1 -14 1 -42q0 -130 -38 -259.5t-115.5 -248.5t-184.5 -210.5t-258 -146t-323 -54.5q-271 0 -496 145q35 -4 78 -4q225 0 401 138q-105 2 -188 64.5t-114 159.5q33 -5 61 -5q43 0 85 11q-112 23 -185.5 111.5t-73.5 205.5v4q68 -38 146 -41 q-66 44 -105 115t-39 154q0 88 44 163q121 -149 294.5 -238.5t371.5 -99.5q-8 38 -8 74q0 134 94.5 228.5t228.5 94.5q140 0 236 -102q109 21 205 78q-37 -115 -142 -178q93 10 186 50z" />
+<glyph unicode="&#xf09a;" horiz-adv-x="1024" d="M959 1524v-264h-157q-86 0 -116 -36t-30 -108v-189h293l-39 -296h-254v-759h-306v759h-255v296h255v218q0 186 104 288.5t277 102.5q147 0 228 -12z" />
+<glyph unicode="&#xf09b;" d="M1536 640q0 -251 -146.5 -451.5t-378.5 -277.5q-27 -5 -39.5 7t-12.5 30v211q0 97 -52 142q57 6 102.5 18t94 39t81 66.5t53 105t20.5 150.5q0 121 -79 206q37 91 -8 204q-28 9 -81 -11t-92 -44l-38 -24q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-86 13.5 q-44 -113 -7 -204q-79 -85 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-40 -36 -49 -103q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52t-49.5 24l-20 3q-21 0 -29 -4.5t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23 q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -89t0.5 -54q0 -18 -13 -30t-40 -7q-232 77 -378.5 277.5t-146.5 451.5q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf09c;" horiz-adv-x="1664" d="M1664 960v-256q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45v256q0 106 -75 181t-181 75t-181 -75t-75 -181v-192h96q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h672v192q0 185 131.5 316.5t316.5 131.5 t316.5 -131.5t131.5 -316.5z" />
+<glyph unicode="&#xf09d;" horiz-adv-x="1920" d="M1760 1408q66 0 113 -47t47 -113v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600zM160 1280q-13 0 -22.5 -9.5t-9.5 -22.5v-224h1664v224q0 13 -9.5 22.5t-22.5 9.5h-1600zM1760 0q13 0 22.5 9.5t9.5 22.5v608h-1664v-608 q0 -13 9.5 -22.5t22.5 -9.5h1600zM256 128v128h256v-128h-256zM640 128v128h384v-128h-384z" />
+<glyph unicode="&#xf09e;" horiz-adv-x="1408" d="M384 192q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 69q2 -28 -17 -48q-18 -21 -47 -21h-135q-25 0 -43 16.5t-20 41.5q-22 229 -184.5 391.5t-391.5 184.5q-25 2 -41.5 20t-16.5 43v135q0 29 21 47q17 17 43 17h5q160 -13 306 -80.5 t259 -181.5q114 -113 181.5 -259t80.5 -306zM1408 67q2 -27 -18 -47q-18 -20 -46 -20h-143q-26 0 -44.5 17.5t-19.5 42.5q-12 215 -101 408.5t-231.5 336t-336 231.5t-408.5 102q-25 1 -42.5 19.5t-17.5 43.5v143q0 28 20 46q18 18 44 18h3q262 -13 501.5 -120t425.5 -294 q187 -186 294 -425.5t120 -501.5z" />
+<glyph unicode="&#xf0a0;" d="M1040 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1296 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1408 160v320q0 13 -9.5 22.5t-22.5 9.5 h-1216q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h1216q13 0 22.5 9.5t9.5 22.5zM178 640h1180l-157 482q-4 13 -16 21.5t-26 8.5h-782q-14 0 -26 -8.5t-16 -21.5zM1536 480v-320q0 -66 -47 -113t-113 -47h-1216q-66 0 -113 47t-47 113v320q0 25 16 75 l197 606q17 53 63 86t101 33h782q55 0 101 -33t63 -86l197 -606q16 -50 16 -75z" />
+<glyph unicode="&#xf0a1;" horiz-adv-x="1792" d="M1664 896q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5v-384q0 -52 -38 -90t-90 -38q-417 347 -812 380q-58 -19 -91 -66t-31 -100.5t40 -92.5q-20 -33 -23 -65.5t6 -58t33.5 -55t48 -50t61.5 -50.5q-29 -58 -111.5 -83t-168.5 -11.5t-132 55.5q-7 23 -29.5 87.5 t-32 94.5t-23 89t-15 101t3.5 98.5t22 110.5h-122q-66 0 -113 47t-47 113v192q0 66 47 113t113 47h480q435 0 896 384q52 0 90 -38t38 -90v-384zM1536 292v954q-394 -302 -768 -343v-270q377 -42 768 -341z" />
+<glyph unicode="&#xf0a2;" horiz-adv-x="1792" d="M912 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM246 128h1300q-266 300 -266 832q0 51 -24 105t-69 103t-121.5 80.5t-169.5 31.5t-169.5 -31.5t-121.5 -80.5t-69 -103t-24 -105q0 -532 -266 -832z M1728 128q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38t-38 90q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q190 -28 307 -158.5 t117 -282.5q0 -139 19.5 -260t50 -206t74.5 -158.5t85 -119.5t91 -88z" />
+<glyph unicode="&#xf0a3;" d="M1376 640l138 -135q30 -28 20 -70q-12 -41 -52 -51l-188 -48l53 -186q12 -41 -19 -70q-29 -31 -70 -19l-186 53l-48 -188q-10 -40 -51 -52q-12 -2 -19 -2q-31 0 -51 22l-135 138l-135 -138q-28 -30 -70 -20q-41 11 -51 52l-48 188l-186 -53q-41 -12 -70 19q-31 29 -19 70 l53 186l-188 48q-40 10 -52 51q-10 42 20 70l138 135l-138 135q-30 28 -20 70q12 41 52 51l188 48l-53 186q-12 41 19 70q29 31 70 19l186 -53l48 188q10 41 51 51q41 12 70 -19l135 -139l135 139q29 30 70 19q41 -10 51 -51l48 -188l186 53q41 12 70 -19q31 -29 19 -70 l-53 -186l188 -48q40 -10 52 -51q10 -42 -20 -70z" />
+<glyph unicode="&#xf0a4;" horiz-adv-x="1792" d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 768q0 51 -39 89.5t-89 38.5h-576q0 20 15 48.5t33 55t33 68t15 84.5q0 67 -44.5 97.5t-115.5 30.5q-24 0 -90 -139q-24 -44 -37 -65q-40 -64 -112 -145q-71 -81 -101 -106 q-69 -57 -140 -57h-32v-640h32q72 0 167 -32t193.5 -64t179.5 -32q189 0 189 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5h331q52 0 90 38t38 90zM1792 769q0 -105 -75.5 -181t-180.5 -76h-169q-4 -62 -37 -119q3 -21 3 -43 q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5q-133 0 -322 69q-164 59 -223 59h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h288q10 0 21.5 4.5t23.5 14t22.5 18t24 22.5t20.5 21.5t19 21.5t14 17q65 74 100 129q13 21 33 62t37 72t40.5 63t55 49.5 t69.5 17.5q125 0 206.5 -67t81.5 -189q0 -68 -22 -128h374q104 0 180 -76t76 -179z" />
+<glyph unicode="&#xf0a5;" horiz-adv-x="1792" d="M1376 128h32v640h-32q-35 0 -67.5 12t-62.5 37t-50 46t-49 54q-2 3 -3.5 4.5t-4 4.5t-4.5 5q-72 81 -112 145q-14 22 -38 68q-1 3 -10.5 22.5t-18.5 36t-20 35.5t-21.5 30.5t-18.5 11.5q-71 0 -115.5 -30.5t-44.5 -97.5q0 -43 15 -84.5t33 -68t33 -55t15 -48.5h-576 q-50 0 -89 -38.5t-39 -89.5q0 -52 38 -90t90 -38h331q-15 -17 -25 -47.5t-10 -55.5q0 -69 53 -119q-18 -32 -18 -69t17.5 -73.5t47.5 -52.5q-4 -24 -4 -56q0 -85 48.5 -126t135.5 -41q84 0 183 32t194 64t167 32zM1664 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45 t45 -19t45 19t19 45zM1792 768v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-288q-59 0 -223 -59q-190 -69 -317 -69q-142 0 -230 77.5t-87 217.5l1 5q-61 76 -61 178q0 22 3 43q-33 57 -37 119h-169q-105 0 -180.5 76t-75.5 181q0 103 76 179t180 76h374q-22 60 -22 128 q0 122 81.5 189t206.5 67q38 0 69.5 -17.5t55 -49.5t40.5 -63t37 -72t33 -62q35 -55 100 -129q2 -3 14 -17t19 -21.5t20.5 -21.5t24 -22.5t22.5 -18t23.5 -14t21.5 -4.5h288q53 0 90.5 -37.5t37.5 -90.5z" />
+<glyph unicode="&#xf0a6;" d="M1280 -64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 700q0 189 -167 189q-26 0 -56 -5q-16 30 -52.5 47.5t-73.5 17.5t-69 -18q-50 53 -119 53q-25 0 -55.5 -10t-47.5 -25v331q0 52 -38 90t-90 38q-51 0 -89.5 -39t-38.5 -89v-576 q-20 0 -48.5 15t-55 33t-68 33t-84.5 15q-67 0 -97.5 -44.5t-30.5 -115.5q0 -24 139 -90q44 -24 65 -37q64 -40 145 -112q81 -71 106 -101q57 -69 57 -140v-32h640v32q0 72 32 167t64 193.5t32 179.5zM1536 705q0 -133 -69 -322q-59 -164 -59 -223v-288q0 -53 -37.5 -90.5 t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5v288q0 10 -4.5 21.5t-14 23.5t-18 22.5t-22.5 24t-21.5 20.5t-21.5 19t-17 14q-74 65 -129 100q-21 13 -62 33t-72 37t-63 40.5t-49.5 55t-17.5 69.5q0 125 67 206.5t189 81.5q68 0 128 -22v374q0 104 76 180t179 76 q105 0 181 -75.5t76 -180.5v-169q62 -4 119 -37q21 3 43 3q101 0 178 -60q139 1 219.5 -85t80.5 -227z" />
+<glyph unicode="&#xf0a7;" d="M1408 576q0 84 -32 183t-64 194t-32 167v32h-640v-32q0 -35 -12 -67.5t-37 -62.5t-46 -50t-54 -49q-9 -8 -14 -12q-81 -72 -145 -112q-22 -14 -68 -38q-3 -1 -22.5 -10.5t-36 -18.5t-35.5 -20t-30.5 -21.5t-11.5 -18.5q0 -71 30.5 -115.5t97.5 -44.5q43 0 84.5 15t68 33 t55 33t48.5 15v-576q0 -50 38.5 -89t89.5 -39q52 0 90 38t38 90v331q46 -35 103 -35q69 0 119 53q32 -18 69 -18t73.5 17.5t52.5 47.5q24 -4 56 -4q85 0 126 48.5t41 135.5zM1280 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 580 q0 -142 -77.5 -230t-217.5 -87l-5 1q-76 -61 -178 -61q-22 0 -43 3q-54 -30 -119 -37v-169q0 -105 -76 -180.5t-181 -75.5q-103 0 -179 76t-76 180v374q-54 -22 -128 -22q-121 0 -188.5 81.5t-67.5 206.5q0 38 17.5 69.5t49.5 55t63 40.5t72 37t62 33q55 35 129 100 q3 2 17 14t21.5 19t21.5 20.5t22.5 24t18 22.5t14 23.5t4.5 21.5v288q0 53 37.5 90.5t90.5 37.5h640q53 0 90.5 -37.5t37.5 -90.5v-288q0 -59 59 -223q69 -190 69 -317z" />
+<glyph unicode="&#xf0a8;" d="M1280 576v128q0 26 -19 45t-45 19h-502l189 189q19 19 19 45t-19 45l-91 91q-18 18 -45 18t-45 -18l-362 -362l-91 -91q-18 -18 -18 -45t18 -45l91 -91l362 -362q18 -18 45 -18t45 18l91 91q18 18 18 45t-18 45l-189 189h502q26 0 45 19t19 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0a9;" d="M1285 640q0 27 -18 45l-91 91l-362 362q-18 18 -45 18t-45 -18l-91 -91q-18 -18 -18 -45t18 -45l189 -189h-502q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h502l-189 -189q-19 -19 -19 -45t19 -45l91 -91q18 -18 45 -18t45 18l362 362l91 91q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0aa;" d="M1284 641q0 27 -18 45l-362 362l-91 91q-18 18 -45 18t-45 -18l-91 -91l-362 -362q-18 -18 -18 -45t18 -45l91 -91q18 -18 45 -18t45 18l189 189v-502q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v502l189 -189q19 -19 45 -19t45 19l91 91q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0ab;" d="M1284 639q0 27 -18 45l-91 91q-18 18 -45 18t-45 -18l-189 -189v502q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-502l-189 189q-19 19 -45 19t-45 -19l-91 -91q-18 -18 -18 -45t18 -45l362 -362l91 -91q18 -18 45 -18t45 18l91 91l362 362q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0ac;" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1042 887q-2 -1 -9.5 -9.5t-13.5 -9.5q2 0 4.5 5t5 11t3.5 7q6 7 22 15q14 6 52 12q34 8 51 -11 q-2 2 9.5 13t14.5 12q3 2 15 4.5t15 7.5l2 22q-12 -1 -17.5 7t-6.5 21q0 -2 -6 -8q0 7 -4.5 8t-11.5 -1t-9 -1q-10 3 -15 7.5t-8 16.5t-4 15q-2 5 -9.5 10.5t-9.5 10.5q-1 2 -2.5 5.5t-3 6.5t-4 5.5t-5.5 2.5t-7 -5t-7.5 -10t-4.5 -5q-3 2 -6 1.5t-4.5 -1t-4.5 -3t-5 -3.5 q-3 -2 -8.5 -3t-8.5 -2q15 5 -1 11q-10 4 -16 3q9 4 7.5 12t-8.5 14h5q-1 4 -8.5 8.5t-17.5 8.5t-13 6q-8 5 -34 9.5t-33 0.5q-5 -6 -4.5 -10.5t4 -14t3.5 -12.5q1 -6 -5.5 -13t-6.5 -12q0 -7 14 -15.5t10 -21.5q-3 -8 -16 -16t-16 -12q-5 -8 -1.5 -18.5t10.5 -16.5 q2 -2 1.5 -4t-3.5 -4.5t-5.5 -4t-6.5 -3.5l-3 -2q-11 -5 -20.5 6t-13.5 26q-7 25 -16 30q-23 8 -29 -1q-5 13 -41 26q-25 9 -58 4q6 1 0 15q-7 15 -19 12q3 6 4 17.5t1 13.5q3 13 12 23q1 1 7 8.5t9.5 13.5t0.5 6q35 -4 50 11q5 5 11.5 17t10.5 17q9 6 14 5.5t14.5 -5.5 t14.5 -5q14 -1 15.5 11t-7.5 20q12 -1 3 17q-5 7 -8 9q-12 4 -27 -5q-8 -4 2 -8q-1 1 -9.5 -10.5t-16.5 -17.5t-16 5q-1 1 -5.5 13.5t-9.5 13.5q-8 0 -16 -15q3 8 -11 15t-24 8q19 12 -8 27q-7 4 -20.5 5t-19.5 -4q-5 -7 -5.5 -11.5t5 -8t10.5 -5.5t11.5 -4t8.5 -3 q14 -10 8 -14q-2 -1 -8.5 -3.5t-11.5 -4.5t-6 -4q-3 -4 0 -14t-2 -14q-5 5 -9 17.5t-7 16.5q7 -9 -25 -6l-10 1q-4 0 -16 -2t-20.5 -1t-13.5 8q-4 8 0 20q1 4 4 2q-4 3 -11 9.5t-10 8.5q-46 -15 -94 -41q6 -1 12 1q5 2 13 6.5t10 5.5q34 14 42 7l5 5q14 -16 20 -25 q-7 4 -30 1q-20 -6 -22 -12q7 -12 5 -18q-4 3 -11.5 10t-14.5 11t-15 5q-16 0 -22 -1q-146 -80 -235 -222q7 -7 12 -8q4 -1 5 -9t2.5 -11t11.5 3q9 -8 3 -19q1 1 44 -27q19 -17 21 -21q3 -11 -10 -18q-1 2 -9 9t-9 4q-3 -5 0.5 -18.5t10.5 -12.5q-7 0 -9.5 -16t-2.5 -35.5 t-1 -23.5l2 -1q-3 -12 5.5 -34.5t21.5 -19.5q-13 -3 20 -43q6 -8 8 -9q3 -2 12 -7.5t15 -10t10 -10.5q4 -5 10 -22.5t14 -23.5q-2 -6 9.5 -20t10.5 -23q-1 0 -2.5 -1t-2.5 -1q3 -7 15.5 -14t15.5 -13q1 -3 2 -10t3 -11t8 -2q2 20 -24 62q-15 25 -17 29q-3 5 -5.5 15.5 t-4.5 14.5q2 0 6 -1.5t8.5 -3.5t7.5 -4t2 -3q-3 -7 2 -17.5t12 -18.5t17 -19t12 -13q6 -6 14 -19.5t0 -13.5q9 0 20 -10t17 -20q5 -8 8 -26t5 -24q2 -7 8.5 -13.5t12.5 -9.5l16 -8t13 -7q5 -2 18.5 -10.5t21.5 -11.5q10 -4 16 -4t14.5 2.5t13.5 3.5q15 2 29 -15t21 -21 q36 -19 55 -11q-2 -1 0.5 -7.5t8 -15.5t9 -14.5t5.5 -8.5q5 -6 18 -15t18 -15q6 4 7 9q-3 -8 7 -20t18 -10q14 3 14 32q-31 -15 -49 18q0 1 -2.5 5.5t-4 8.5t-2.5 8.5t0 7.5t5 3q9 0 10 3.5t-2 12.5t-4 13q-1 8 -11 20t-12 15q-5 -9 -16 -8t-16 9q0 -1 -1.5 -5.5t-1.5 -6.5 q-13 0 -15 1q1 3 2.5 17.5t3.5 22.5q1 4 5.5 12t7.5 14.5t4 12.5t-4.5 9.5t-17.5 2.5q-19 -1 -26 -20q-1 -3 -3 -10.5t-5 -11.5t-9 -7q-7 -3 -24 -2t-24 5q-13 8 -22.5 29t-9.5 37q0 10 2.5 26.5t3 25t-5.5 24.5q3 2 9 9.5t10 10.5q2 1 4.5 1.5t4.5 0t4 1.5t3 6q-1 1 -4 3 q-3 3 -4 3q7 -3 28.5 1.5t27.5 -1.5q15 -11 22 2q0 1 -2.5 9.5t-0.5 13.5q5 -27 29 -9q3 -3 15.5 -5t17.5 -5q3 -2 7 -5.5t5.5 -4.5t5 0.5t8.5 6.5q10 -14 12 -24q11 -40 19 -44q7 -3 11 -2t4.5 9.5t0 14t-1.5 12.5l-1 8v18l-1 8q-15 3 -18.5 12t1.5 18.5t15 18.5q1 1 8 3.5 t15.5 6.5t12.5 8q21 19 15 35q7 0 11 9q-1 0 -5 3t-7.5 5t-4.5 2q9 5 2 16q5 3 7.5 11t7.5 10q9 -12 21 -2q7 8 1 16q5 7 20.5 10.5t18.5 9.5q7 -2 8 2t1 12t3 12q4 5 15 9t13 5l17 11q3 4 0 4q18 -2 31 11q10 11 -6 20q3 6 -3 9.5t-15 5.5q3 1 11.5 0.5t10.5 1.5 q15 10 -7 16q-17 5 -43 -12zM879 10q206 36 351 189q-3 3 -12.5 4.5t-12.5 3.5q-18 7 -24 8q1 7 -2.5 13t-8 9t-12.5 8t-11 7q-2 2 -7 6t-7 5.5t-7.5 4.5t-8.5 2t-10 -1l-3 -1q-3 -1 -5.5 -2.5t-5.5 -3t-4 -3t0 -2.5q-21 17 -36 22q-5 1 -11 5.5t-10.5 7t-10 1.5t-11.5 -7 q-5 -5 -6 -15t-2 -13q-7 5 0 17.5t2 18.5q-3 6 -10.5 4.5t-12 -4.5t-11.5 -8.5t-9 -6.5t-8.5 -5.5t-8.5 -7.5q-3 -4 -6 -12t-5 -11q-2 4 -11.5 6.5t-9.5 5.5q2 -10 4 -35t5 -38q7 -31 -12 -48q-27 -25 -29 -40q-4 -22 12 -26q0 -7 -8 -20.5t-7 -21.5q0 -6 2 -16z" />
+<glyph unicode="&#xf0ad;" horiz-adv-x="1664" d="M384 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1028 484l-682 -682q-37 -37 -90 -37q-52 0 -91 37l-106 108q-38 36 -38 90q0 53 38 91l681 681q39 -98 114.5 -173.5t173.5 -114.5zM1662 919q0 -39 -23 -106q-47 -134 -164.5 -217.5 t-258.5 -83.5q-185 0 -316.5 131.5t-131.5 316.5t131.5 316.5t316.5 131.5q58 0 121.5 -16.5t107.5 -46.5q16 -11 16 -28t-16 -28l-293 -169v-224l193 -107q5 3 79 48.5t135.5 81t70.5 35.5q15 0 23.5 -10t8.5 -25z" />
+<glyph unicode="&#xf0ae;" horiz-adv-x="1792" d="M1024 128h640v128h-640v-128zM640 640h1024v128h-1024v-128zM1280 1152h384v128h-384v-128zM1792 320v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 832v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19 t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 1344v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0b0;" horiz-adv-x="1408" d="M1403 1241q17 -41 -14 -70l-493 -493v-742q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-256 256q-19 19 -19 45v486l-493 493q-31 29 -14 70q17 39 59 39h1280q42 0 59 -39z" />
+<glyph unicode="&#xf0b1;" horiz-adv-x="1792" d="M640 1280h512v128h-512v-128zM1792 640v-480q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v480h672v-160q0 -26 19 -45t45 -19h320q26 0 45 19t19 45v160h672zM1024 640v-128h-256v128h256zM1792 1120v-384h-1792v384q0 66 47 113t113 47h352v160q0 40 28 68 t68 28h576q40 0 68 -28t28 -68v-160h352q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf0b2;" d="M1283 995l-355 -355l355 -355l144 144q29 31 70 14q39 -17 39 -59v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l144 144l-355 355l-355 -355l144 -144q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l144 -144 l355 355l-355 355l-144 -144q-19 -19 -45 -19q-12 0 -24 5q-40 17 -40 59v448q0 26 19 45t45 19h448q42 0 59 -40q17 -39 -14 -69l-144 -144l355 -355l355 355l-144 144q-31 30 -14 69q17 40 59 40h448q26 0 45 -19t19 -45v-448q0 -42 -39 -59q-13 -5 -25 -5q-26 0 -45 19z " />
+<glyph unicode="&#xf0c0;" horiz-adv-x="1920" d="M593 640q-162 -5 -265 -128h-134q-82 0 -138 40.5t-56 118.5q0 353 124 353q6 0 43.5 -21t97.5 -42.5t119 -21.5q67 0 133 23q-5 -37 -5 -66q0 -139 81 -256zM1664 3q0 -120 -73 -189.5t-194 -69.5h-874q-121 0 -194 69.5t-73 189.5q0 53 3.5 103.5t14 109t26.5 108.5 t43 97.5t62 81t85.5 53.5t111.5 20q10 0 43 -21.5t73 -48t107 -48t135 -21.5t135 21.5t107 48t73 48t43 21.5q61 0 111.5 -20t85.5 -53.5t62 -81t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5zM640 1280q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75 t75 -181zM1344 896q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5zM1920 671q0 -78 -56 -118.5t-138 -40.5h-134q-103 123 -265 128q81 117 81 256q0 29 -5 66q66 -23 133 -23q59 0 119 21.5t97.5 42.5 t43.5 21q124 0 124 -353zM1792 1280q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181z" />
+<glyph unicode="&#xf0c1;" horiz-adv-x="1664" d="M1456 320q0 40 -28 68l-208 208q-28 28 -68 28q-42 0 -72 -32q3 -3 19 -18.5t21.5 -21.5t15 -19t13 -25.5t3.5 -27.5q0 -40 -28 -68t-68 -28q-15 0 -27.5 3.5t-25.5 13t-19 15t-21.5 21.5t-18.5 19q-33 -31 -33 -73q0 -40 28 -68l206 -207q27 -27 68 -27q40 0 68 26 l147 146q28 28 28 67zM753 1025q0 40 -28 68l-206 207q-28 28 -68 28q-39 0 -68 -27l-147 -146q-28 -28 -28 -67q0 -40 28 -68l208 -208q27 -27 68 -27q42 0 72 31q-3 3 -19 18.5t-21.5 21.5t-15 19t-13 25.5t-3.5 27.5q0 40 28 68t68 28q15 0 27.5 -3.5t25.5 -13t19 -15 t21.5 -21.5t18.5 -19q33 31 33 73zM1648 320q0 -120 -85 -203l-147 -146q-83 -83 -203 -83q-121 0 -204 85l-206 207q-83 83 -83 203q0 123 88 209l-88 88q-86 -88 -208 -88q-120 0 -204 84l-208 208q-84 84 -84 204t85 203l147 146q83 83 203 83q121 0 204 -85l206 -207 q83 -83 83 -203q0 -123 -88 -209l88 -88q86 88 208 88q120 0 204 -84l208 -208q84 -84 84 -204z" />
+<glyph unicode="&#xf0c2;" horiz-adv-x="1920" d="M1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088q-185 0 -316.5 131.5t-131.5 316.5q0 132 71 241.5t187 163.5q-2 28 -2 43q0 212 150 362t362 150q158 0 286.5 -88t187.5 -230q70 62 166 62q106 0 181 -75t75 -181q0 -75 -41 -138q129 -30 213 -134.5t84 -239.5z " />
+<glyph unicode="&#xf0c3;" horiz-adv-x="1664" d="M1527 88q56 -89 21.5 -152.5t-140.5 -63.5h-1152q-106 0 -140.5 63.5t21.5 152.5l503 793v399h-64q-26 0 -45 19t-19 45t19 45t45 19h512q26 0 45 -19t19 -45t-19 -45t-45 -19h-64v-399zM748 813l-272 -429h712l-272 429l-20 31v37v399h-128v-399v-37z" />
+<glyph unicode="&#xf0c4;" horiz-adv-x="1792" d="M960 640q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1260 576l507 -398q28 -20 25 -56q-5 -35 -35 -51l-128 -64q-13 -7 -29 -7q-17 0 -31 8l-690 387l-110 -66q-8 -4 -12 -5q14 -49 10 -97q-7 -77 -56 -147.5t-132 -123.5q-132 -84 -277 -84 q-136 0 -222 78q-90 84 -79 207q7 76 56 147t131 124q132 84 278 84q83 0 151 -31q9 13 22 22l122 73l-122 73q-13 9 -22 22q-68 -31 -151 -31q-146 0 -278 84q-82 53 -131 124t-56 147q-5 59 15.5 113t63.5 93q85 79 222 79q145 0 277 -84q83 -52 132 -123t56 -148 q4 -48 -10 -97q4 -1 12 -5l110 -66l690 387q14 8 31 8q16 0 29 -7l128 -64q30 -16 35 -51q3 -36 -25 -56zM579 836q46 42 21 108t-106 117q-92 59 -192 59q-74 0 -113 -36q-46 -42 -21 -108t106 -117q92 -59 192 -59q74 0 113 36zM494 91q81 51 106 117t-21 108 q-39 36 -113 36q-100 0 -192 -59q-81 -51 -106 -117t21 -108q39 -36 113 -36q100 0 192 59zM672 704l96 -58v11q0 36 33 56l14 8l-79 47l-26 -26q-3 -3 -10 -11t-12 -12q-2 -2 -4 -3.5t-3 -2.5zM896 480l96 -32l736 576l-128 64l-768 -431v-113l-160 -96l9 -8q2 -2 7 -6 q4 -4 11 -12t11 -12l26 -26zM1600 64l128 64l-520 408l-177 -138q-2 -3 -13 -7z" />
+<glyph unicode="&#xf0c5;" horiz-adv-x="1792" d="M1696 1152q40 0 68 -28t28 -68v-1216q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v288h-544q-40 0 -68 28t-28 68v672q0 40 20 88t48 76l408 408q28 28 76 48t88 20h416q40 0 68 -28t28 -68v-328q68 40 128 40h416zM1152 939l-299 -299h299v299zM512 1323l-299 -299 h299v299zM708 676l316 316v416h-384v-416q0 -40 -28 -68t-68 -28h-416v-640h512v256q0 40 20 88t48 76zM1664 -128v1152h-384v-416q0 -40 -28 -68t-68 -28h-416v-640h896z" />
+<glyph unicode="&#xf0c6;" horiz-adv-x="1408" d="M1404 151q0 -117 -79 -196t-196 -79q-135 0 -235 100l-777 776q-113 115 -113 271q0 159 110 270t269 111q158 0 273 -113l605 -606q10 -10 10 -22q0 -16 -30.5 -46.5t-46.5 -30.5q-13 0 -23 10l-606 607q-79 77 -181 77q-106 0 -179 -75t-73 -181q0 -105 76 -181 l776 -777q63 -63 145 -63q64 0 106 42t42 106q0 82 -63 145l-581 581q-26 24 -60 24q-29 0 -48 -19t-19 -48q0 -32 25 -59l410 -410q10 -10 10 -22q0 -16 -31 -47t-47 -31q-12 0 -22 10l-410 410q-63 61 -63 149q0 82 57 139t139 57q88 0 149 -63l581 -581q100 -98 100 -235 z" />
+<glyph unicode="&#xf0c7;" d="M384 0h768v384h-768v-384zM1280 0h128v896q0 14 -10 38.5t-20 34.5l-281 281q-10 10 -34 20t-39 10v-416q0 -40 -28 -68t-68 -28h-576q-40 0 -68 28t-28 68v416h-128v-1280h128v416q0 40 28 68t68 28h832q40 0 68 -28t28 -68v-416zM896 928v320q0 13 -9.5 22.5t-22.5 9.5 h-192q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 22.5zM1536 896v-928q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h928q40 0 88 -20t76 -48l280 -280q28 -28 48 -76t20 -88z" />
+<glyph unicode="&#xf0c8;" d="M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf0c9;" d="M1536 192v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 704v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 1216v-128q0 -26 -19 -45 t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0ca;" horiz-adv-x="1792" d="M384 128q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM384 640q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5 t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5zM384 1152q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1792 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z M1792 1248v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf0cb;" horiz-adv-x="1792" d="M381 -84q0 -80 -54.5 -126t-135.5 -46q-106 0 -172 66l57 88q49 -45 106 -45q29 0 50.5 14.5t21.5 42.5q0 64 -105 56l-26 56q8 10 32.5 43.5t42.5 54t37 38.5v1q-16 0 -48.5 -1t-48.5 -1v-53h-106v152h333v-88l-95 -115q51 -12 81 -49t30 -88zM383 543v-159h-362 q-6 36 -6 54q0 51 23.5 93t56.5 68t66 47.5t56.5 43.5t23.5 45q0 25 -14.5 38.5t-39.5 13.5q-46 0 -81 -58l-85 59q24 51 71.5 79.5t105.5 28.5q73 0 123 -41.5t50 -112.5q0 -50 -34 -91.5t-75 -64.5t-75.5 -50.5t-35.5 -52.5h127v60h105zM1792 224v-192q0 -13 -9.5 -22.5 t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 14 9 23t23 9h1216q13 0 22.5 -9.5t9.5 -22.5zM384 1123v-99h-335v99h107q0 41 0.5 122t0.5 121v12h-2q-8 -17 -50 -54l-71 76l136 127h106v-404h108zM1792 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5 t-9.5 22.5v192q0 14 9 23t23 9h1216q13 0 22.5 -9.5t9.5 -22.5zM1792 1248v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf0cc;" horiz-adv-x="1792" d="M1760 640q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1728q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h1728zM483 704q-28 35 -51 80q-48 97 -48 188q0 181 134 309q133 127 393 127q50 0 167 -19q66 -12 177 -48q10 -38 21 -118q14 -123 14 -183q0 -18 -5 -45l-12 -3l-84 6 l-14 2q-50 149 -103 205q-88 91 -210 91q-114 0 -182 -59q-67 -58 -67 -146q0 -73 66 -140t279 -129q69 -20 173 -66q58 -28 95 -52h-743zM990 448h411q7 -39 7 -92q0 -111 -41 -212q-23 -55 -71 -104q-37 -35 -109 -81q-80 -48 -153 -66q-80 -21 -203 -21q-114 0 -195 23 l-140 40q-57 16 -72 28q-8 8 -8 22v13q0 108 -2 156q-1 30 0 68l2 37v44l102 2q15 -34 30 -71t22.5 -56t12.5 -27q35 -57 80 -94q43 -36 105 -57q59 -22 132 -22q64 0 139 27q77 26 122 86q47 61 47 129q0 84 -81 157q-34 29 -137 71z" />
+<glyph unicode="&#xf0cd;" d="M48 1313q-37 2 -45 4l-3 88q13 1 40 1q60 0 112 -4q132 -7 166 -7q86 0 168 3q116 4 146 5q56 0 86 2l-1 -14l2 -64v-9q-60 -9 -124 -9q-60 0 -79 -25q-13 -14 -13 -132q0 -13 0.5 -32.5t0.5 -25.5l1 -229l14 -280q6 -124 51 -202q35 -59 96 -92q88 -47 177 -47 q104 0 191 28q56 18 99 51q48 36 65 64q36 56 53 114q21 73 21 229q0 79 -3.5 128t-11 122.5t-13.5 159.5l-4 59q-5 67 -24 88q-34 35 -77 34l-100 -2l-14 3l2 86h84l205 -10q76 -3 196 10l18 -2q6 -38 6 -51q0 -7 -4 -31q-45 -12 -84 -13q-73 -11 -79 -17q-15 -15 -15 -41 q0 -7 1.5 -27t1.5 -31q8 -19 22 -396q6 -195 -15 -304q-15 -76 -41 -122q-38 -65 -112 -123q-75 -57 -182 -89q-109 -33 -255 -33q-167 0 -284 46q-119 47 -179 122q-61 76 -83 195q-16 80 -16 237v333q0 188 -17 213q-25 36 -147 39zM1536 -96v64q0 14 -9 23t-23 9h-1472 q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h1472q14 0 23 9t9 23z" />
+<glyph unicode="&#xf0ce;" horiz-adv-x="1664" d="M512 160v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM512 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 160v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23 v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM512 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 160v192 q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192 q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1664 1248v-1088q0 -66 -47 -113t-113 -47h-1344q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1344q66 0 113 -47t47 -113 z" />
+<glyph unicode="&#xf0d0;" horiz-adv-x="1664" d="M1190 955l293 293l-107 107l-293 -293zM1637 1248q0 -27 -18 -45l-1286 -1286q-18 -18 -45 -18t-45 18l-198 198q-18 18 -18 45t18 45l1286 1286q18 18 45 18t45 -18l198 -198q18 -18 18 -45zM286 1438l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98zM636 1276 l196 -60l-196 -60l-60 -196l-60 196l-196 60l196 60l60 196zM1566 798l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98zM926 1438l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98z" />
+<glyph unicode="&#xf0d1;" horiz-adv-x="1792" d="M640 128q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM256 640h384v256h-158q-13 0 -22 -9l-195 -195q-9 -9 -9 -22v-30zM1536 128q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM1792 1216v-1024q0 -15 -4 -26.5t-13.5 -18.5 t-16.5 -11.5t-23.5 -6t-22.5 -2t-25.5 0t-22.5 0.5q0 -106 -75 -181t-181 -75t-181 75t-75 181h-384q0 -106 -75 -181t-181 -75t-181 75t-75 181h-64q-3 0 -22.5 -0.5t-25.5 0t-22.5 2t-23.5 6t-16.5 11.5t-13.5 18.5t-4 26.5q0 26 19 45t45 19v320q0 8 -0.5 35t0 38 t2.5 34.5t6.5 37t14 30.5t22.5 30l198 198q19 19 50.5 32t58.5 13h160v192q0 26 19 45t45 19h1024q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0d2;" d="M1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103q-111 0 -218 32q59 93 78 164q9 34 54 211q20 -39 73 -67.5t114 -28.5q121 0 216 68.5t147 188.5t52 270q0 114 -59.5 214t-172.5 163t-255 63q-105 0 -196 -29t-154.5 -77t-109 -110.5t-67 -129.5t-21.5 -134 q0 -104 40 -183t117 -111q30 -12 38 20q2 7 8 31t8 30q6 23 -11 43q-51 61 -51 151q0 151 104.5 259.5t273.5 108.5q151 0 235.5 -82t84.5 -213q0 -170 -68.5 -289t-175.5 -119q-61 0 -98 43.5t-23 104.5q8 35 26.5 93.5t30 103t11.5 75.5q0 50 -27 83t-77 33 q-62 0 -105 -57t-43 -142q0 -73 25 -122l-99 -418q-17 -70 -13 -177q-206 91 -333 281t-127 423q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0d3;" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-725q85 122 108 210q9 34 53 209q21 -39 73.5 -67t112.5 -28q181 0 295.5 147.5t114.5 373.5q0 84 -35 162.5t-96.5 139t-152.5 97t-197 36.5q-104 0 -194.5 -28.5t-153 -76.5 t-107.5 -109.5t-66.5 -128t-21.5 -132.5q0 -102 39.5 -180t116.5 -110q13 -5 23.5 0t14.5 19q10 44 15 61q6 23 -11 42q-50 62 -50 150q0 150 103.5 256.5t270.5 106.5q149 0 232.5 -81t83.5 -210q0 -168 -67.5 -286t-173.5 -118q-60 0 -97 43.5t-23 103.5q8 34 26.5 92.5 t29.5 102t11 74.5q0 49 -26.5 81.5t-75.5 32.5q-61 0 -103.5 -56.5t-42.5 -139.5q0 -72 24 -121l-98 -414q-24 -100 -7 -254h-183q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960z" />
+<glyph unicode="&#xf0d4;" d="M829 318q0 -76 -58.5 -112.5t-139.5 -36.5q-41 0 -80.5 9.5t-75.5 28.5t-58 53t-22 78q0 46 25 80t65.5 51.5t82 25t84.5 7.5q20 0 31 -2q2 -1 23 -16.5t26 -19t23 -18t24.5 -22t19 -22.5t17 -26t9 -26.5t4.5 -31.5zM755 863q0 -60 -33 -99.5t-92 -39.5q-53 0 -93 42.5 t-57.5 96.5t-17.5 106q0 61 32 104t92 43q53 0 93.5 -45t58 -101t17.5 -107zM861 1120l88 64h-265q-85 0 -161 -32t-127.5 -98t-51.5 -153q0 -93 64.5 -154.5t158.5 -61.5q22 0 43 3q-13 -29 -13 -54q0 -44 40 -94q-175 -12 -257 -63q-47 -29 -75.5 -73t-28.5 -95 q0 -43 18.5 -77.5t48.5 -56.5t69 -37t77.5 -21t76.5 -6q60 0 120.5 15.5t113.5 46t86 82.5t33 117q0 49 -20 89.5t-49 66.5t-58 47.5t-49 44t-20 44.5t15.5 42.5t37.5 39.5t44 42t37.5 59.5t15.5 82.5q0 60 -22.5 99.5t-72.5 90.5h83zM1152 672h128v64h-128v128h-64v-128 h-128v-64h128v-160h64v160zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf0d5;" horiz-adv-x="1664" d="M735 740q0 -36 32 -70.5t77.5 -68t90.5 -73.5t77 -104t32 -142q0 -90 -48 -173q-72 -122 -211 -179.5t-298 -57.5q-132 0 -246.5 41.5t-171.5 137.5q-37 60 -37 131q0 81 44.5 150t118.5 115q131 82 404 100q-32 42 -47.5 74t-15.5 73q0 36 21 85q-46 -4 -68 -4 q-148 0 -249.5 96.5t-101.5 244.5q0 82 36 159t99 131q77 66 182.5 98t217.5 32h418l-138 -88h-131q74 -63 112 -133t38 -160q0 -72 -24.5 -129.5t-59 -93t-69.5 -65t-59.5 -61.5t-24.5 -66zM589 836q38 0 78 16.5t66 43.5q53 57 53 159q0 58 -17 125t-48.5 129.5 t-84.5 103.5t-117 41q-42 0 -82.5 -19.5t-65.5 -52.5q-47 -59 -47 -160q0 -46 10 -97.5t31.5 -103t52 -92.5t75 -67t96.5 -26zM591 -37q58 0 111.5 13t99 39t73 73t27.5 109q0 25 -7 49t-14.5 42t-27 41.5t-29.5 35t-38.5 34.5t-36.5 29t-41.5 30t-36.5 26q-16 2 -48 2 q-53 0 -105 -7t-107.5 -25t-97 -46t-68.5 -74.5t-27 -105.5q0 -70 35 -123.5t91.5 -83t119 -44t127.5 -14.5zM1401 839h213v-108h-213v-219h-105v219h-212v108h212v217h105v-217z" />
+<glyph unicode="&#xf0d6;" horiz-adv-x="1920" d="M768 384h384v96h-128v448h-114l-148 -137l77 -80q42 37 55 57h2v-288h-128v-96zM1280 640q0 -70 -21 -142t-59.5 -134t-101.5 -101t-138 -39t-138 39t-101.5 101t-59.5 134t-21 142t21 142t59.5 134t101.5 101t138 39t138 -39t101.5 -101t59.5 -134t21 -142zM1792 384 v512q-106 0 -181 75t-75 181h-1152q0 -106 -75 -181t-181 -75v-512q106 0 181 -75t75 -181h1152q0 106 75 181t181 75zM1920 1216v-1152q0 -26 -19 -45t-45 -19h-1792q-26 0 -45 19t-19 45v1152q0 26 19 45t45 19h1792q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0d7;" horiz-adv-x="1024" d="M1024 832q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0d8;" horiz-adv-x="1024" d="M1024 320q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
+<glyph unicode="&#xf0d9;" horiz-adv-x="640" d="M640 1088v-896q0 -26 -19 -45t-45 -19t-45 19l-448 448q-19 19 -19 45t19 45l448 448q19 19 45 19t45 -19t19 -45z" />
+<glyph unicode="&#xf0da;" horiz-adv-x="640" d="M576 640q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19t-19 45v896q0 26 19 45t45 19t45 -19l448 -448q19 -19 19 -45z" />
+<glyph unicode="&#xf0db;" horiz-adv-x="1664" d="M160 0h608v1152h-640v-1120q0 -13 9.5 -22.5t22.5 -9.5zM1536 32v1120h-640v-1152h608q13 0 22.5 9.5t9.5 22.5zM1664 1248v-1216q0 -66 -47 -113t-113 -47h-1344q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1344q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf0dc;" horiz-adv-x="1024" d="M1024 448q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45zM1024 832q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
+<glyph unicode="&#xf0dd;" horiz-adv-x="1024" d="M1024 448q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0de;" horiz-adv-x="1024" d="M1024 832q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
+<glyph unicode="&#xf0e0;" horiz-adv-x="1792" d="M1792 826v-794q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v794q44 -49 101 -87q362 -246 497 -345q57 -42 92.5 -65.5t94.5 -48t110 -24.5h1h1q51 0 110 24.5t94.5 48t92.5 65.5q170 123 498 345q57 39 100 87zM1792 1120q0 -79 -49 -151t-122 -123 q-376 -261 -468 -325q-10 -7 -42.5 -30.5t-54 -38t-52 -32.5t-57.5 -27t-50 -9h-1h-1q-23 0 -50 9t-57.5 27t-52 32.5t-54 38t-42.5 30.5q-91 64 -262 182.5t-205 142.5q-62 42 -117 115.5t-55 136.5q0 78 41.5 130t118.5 52h1472q65 0 112.5 -47t47.5 -113z" />
+<glyph unicode="&#xf0e1;" d="M349 911v-991h-330v991h330zM370 1217q1 -73 -50.5 -122t-135.5 -49h-2q-82 0 -132 49t-50 122q0 74 51.5 122.5t134.5 48.5t133 -48.5t51 -122.5zM1536 488v-568h-329v530q0 105 -40.5 164.5t-126.5 59.5q-63 0 -105.5 -34.5t-63.5 -85.5q-11 -30 -11 -81v-553h-329 q2 399 2 647t-1 296l-1 48h329v-144h-2q20 32 41 56t56.5 52t87 43.5t114.5 15.5q171 0 275 -113.5t104 -332.5z" />
+<glyph unicode="&#xf0e2;" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61q-172 0 -327 72.5t-264 204.5q-7 10 -6.5 22.5t8.5 20.5l137 138q10 9 25 9q16 -2 23 -12q73 -95 179 -147t225 -52q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5 t-163.5 109.5t-198.5 40.5q-98 0 -188 -35.5t-160 -101.5l137 -138q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l130 -129q107 101 244.5 156.5t284.5 55.5q156 0 298 -61t245 -164t164 -245t61 -298z" />
+<glyph unicode="&#xf0e3;" horiz-adv-x="1792" d="M1771 0q0 -53 -37 -90l-107 -108q-39 -37 -91 -37q-53 0 -90 37l-363 364q-38 36 -38 90q0 53 43 96l-256 256l-126 -126q-14 -14 -34 -14t-34 14q2 -2 12.5 -12t12.5 -13t10 -11.5t10 -13.5t6 -13.5t5.5 -16.5t1.5 -18q0 -38 -28 -68q-3 -3 -16.5 -18t-19 -20.5 t-18.5 -16.5t-22 -15.5t-22 -9t-26 -4.5q-40 0 -68 28l-408 408q-28 28 -28 68q0 13 4.5 26t9 22t15.5 22t16.5 18.5t20.5 19t18 16.5q30 28 68 28q10 0 18 -1.5t16.5 -5.5t13.5 -6t13.5 -10t11.5 -10t13 -12.5t12 -12.5q-14 14 -14 34t14 34l348 348q14 14 34 14t34 -14 q-2 2 -12.5 12t-12.5 13t-10 11.5t-10 13.5t-6 13.5t-5.5 16.5t-1.5 18q0 38 28 68q3 3 16.5 18t19 20.5t18.5 16.5t22 15.5t22 9t26 4.5q40 0 68 -28l408 -408q28 -28 28 -68q0 -13 -4.5 -26t-9 -22t-15.5 -22t-16.5 -18.5t-20.5 -19t-18 -16.5q-30 -28 -68 -28 q-10 0 -18 1.5t-16.5 5.5t-13.5 6t-13.5 10t-11.5 10t-13 12.5t-12 12.5q14 -14 14 -34t-14 -34l-126 -126l256 -256q43 43 96 43q52 0 91 -37l363 -363q37 -39 37 -91z" />
+<glyph unicode="&#xf0e4;" horiz-adv-x="1792" d="M384 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM576 832q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1004 351l101 382q6 26 -7.5 48.5t-38.5 29.5 t-48 -6.5t-30 -39.5l-101 -382q-60 -5 -107 -43.5t-63 -98.5q-20 -77 20 -146t117 -89t146 20t89 117q16 60 -6 117t-72 91zM1664 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 1024q0 53 -37.5 90.5 t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1472 832q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1792 384q0 -261 -141 -483q-19 -29 -54 -29h-1402q-35 0 -54 29 q-141 221 -141 483q0 182 71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
+<glyph unicode="&#xf0e5;" horiz-adv-x="1792" d="M896 1152q-204 0 -381.5 -69.5t-282 -187.5t-104.5 -255q0 -112 71.5 -213.5t201.5 -175.5l87 -50l-27 -96q-24 -91 -70 -172q152 63 275 171l43 38l57 -6q69 -8 130 -8q204 0 381.5 69.5t282 187.5t104.5 255t-104.5 255t-282 187.5t-381.5 69.5zM1792 640 q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22h-5q-15 0 -27 10.5t-16 27.5v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281q0 174 120 321.5 t326 233t450 85.5t450 -85.5t326 -233t120 -321.5z" />
+<glyph unicode="&#xf0e6;" horiz-adv-x="1792" d="M704 1152q-153 0 -286 -52t-211.5 -141t-78.5 -191q0 -82 53 -158t149 -132l97 -56l-35 -84q34 20 62 39l44 31l53 -10q78 -14 153 -14q153 0 286 52t211.5 141t78.5 191t-78.5 191t-211.5 141t-286 52zM704 1280q191 0 353.5 -68.5t256.5 -186.5t94 -257t-94 -257 t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224q0 139 94 257t256.5 186.5 t353.5 68.5zM1526 111q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129 q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230q0 -120 -71 -224.5t-195 -176.5z" />
+<glyph unicode="&#xf0e7;" horiz-adv-x="896" d="M885 970q18 -20 7 -44l-540 -1157q-13 -25 -42 -25q-4 0 -14 2q-17 5 -25.5 19t-4.5 30l197 808l-406 -101q-4 -1 -12 -1q-18 0 -31 11q-18 15 -13 39l201 825q4 14 16 23t28 9h328q19 0 32 -12.5t13 -29.5q0 -8 -5 -18l-171 -463l396 98q8 2 12 2q19 0 34 -15z" />
+<glyph unicode="&#xf0e8;" horiz-adv-x="1792" d="M1792 288v-320q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192h-512v-192h96q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192h-512v-192h96q40 0 68 -28t28 -68v-320 q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192q0 52 38 90t90 38h512v192h-96q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-96v-192h512q52 0 90 -38t38 -90v-192h96q40 0 68 -28t28 -68 z" />
+<glyph unicode="&#xf0e9;" horiz-adv-x="1664" d="M896 708v-580q0 -104 -76 -180t-180 -76t-180 76t-76 180q0 26 19 45t45 19t45 -19t19 -45q0 -50 39 -89t89 -39t89 39t39 89v580q33 11 64 11t64 -11zM1664 681q0 -13 -9.5 -22.5t-22.5 -9.5q-11 0 -23 10q-49 46 -93 69t-102 23q-68 0 -128 -37t-103 -97 q-7 -10 -17.5 -28t-14.5 -24q-11 -17 -28 -17q-18 0 -29 17q-4 6 -14.5 24t-17.5 28q-43 60 -102.5 97t-127.5 37t-127.5 -37t-102.5 -97q-7 -10 -17.5 -28t-14.5 -24q-11 -17 -29 -17q-17 0 -28 17q-4 6 -14.5 24t-17.5 28q-43 60 -103 97t-128 37q-58 0 -102 -23t-93 -69 q-12 -10 -23 -10q-13 0 -22.5 9.5t-9.5 22.5q0 5 1 7q45 183 172.5 319.5t298 204.5t360.5 68q140 0 274.5 -40t246.5 -113.5t194.5 -187t115.5 -251.5q1 -2 1 -7zM896 1408v-98q-42 2 -64 2t-64 -2v98q0 26 19 45t45 19t45 -19t19 -45z" />
+<glyph unicode="&#xf0ea;" horiz-adv-x="1792" d="M768 -128h896v640h-416q-40 0 -68 28t-28 68v416h-384v-1152zM1024 1312v64q0 13 -9.5 22.5t-22.5 9.5h-704q-13 0 -22.5 -9.5t-9.5 -22.5v-64q0 -13 9.5 -22.5t22.5 -9.5h704q13 0 22.5 9.5t9.5 22.5zM1280 640h299l-299 299v-299zM1792 512v-672q0 -40 -28 -68t-68 -28 h-960q-40 0 -68 28t-28 68v160h-544q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h1088q40 0 68 -28t28 -68v-328q21 -13 36 -28l408 -408q28 -28 48 -76t20 -88z" />
+<glyph unicode="&#xf0eb;" horiz-adv-x="1024" d="M736 960q0 -13 -9.5 -22.5t-22.5 -9.5t-22.5 9.5t-9.5 22.5q0 46 -54 71t-106 25q-13 0 -22.5 9.5t-9.5 22.5t9.5 22.5t22.5 9.5q50 0 99.5 -16t87 -54t37.5 -90zM896 960q0 72 -34.5 134t-90 101.5t-123 62t-136.5 22.5t-136.5 -22.5t-123 -62t-90 -101.5t-34.5 -134 q0 -101 68 -180q10 -11 30.5 -33t30.5 -33q128 -153 141 -298h228q13 145 141 298q10 11 30.5 33t30.5 33q68 79 68 180zM1024 960q0 -155 -103 -268q-45 -49 -74.5 -87t-59.5 -95.5t-34 -107.5q47 -28 47 -82q0 -37 -25 -64q25 -27 25 -64q0 -52 -45 -81q13 -23 13 -47 q0 -46 -31.5 -71t-77.5 -25q-20 -44 -60 -70t-87 -26t-87 26t-60 70q-46 0 -77.5 25t-31.5 71q0 24 13 47q-45 29 -45 81q0 37 25 64q-25 27 -25 64q0 54 47 82q-4 50 -34 107.5t-59.5 95.5t-74.5 87q-103 113 -103 268q0 99 44.5 184.5t117 142t164 89t186.5 32.5 t186.5 -32.5t164 -89t117 -142t44.5 -184.5z" />
+<glyph unicode="&#xf0ec;" horiz-adv-x="1792" d="M1792 352v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5q-12 0 -24 10l-319 320q-9 9 -9 22q0 14 9 23l320 320q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5v-192h1376q13 0 22.5 -9.5t9.5 -22.5zM1792 896q0 -14 -9 -23l-320 -320q-9 -9 -23 -9 q-13 0 -22.5 9.5t-9.5 22.5v192h-1376q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1376v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z" />
+<glyph unicode="&#xf0ed;" horiz-adv-x="1920" d="M1280 608q0 14 -9 23t-23 9h-224v352q0 13 -9.5 22.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -22.5v-352h-224q-13 0 -22.5 -9.5t-9.5 -22.5q0 -14 9 -23l352 -352q9 -9 23 -9t23 9l351 351q10 12 10 24zM1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088 q-185 0 -316.5 131.5t-131.5 316.5q0 130 70 240t188 165q-2 30 -2 43q0 212 150 362t362 150q156 0 285.5 -87t188.5 -231q71 62 166 62q106 0 181 -75t75 -181q0 -76 -41 -138q130 -31 213.5 -135.5t83.5 -238.5z" />
+<glyph unicode="&#xf0ee;" horiz-adv-x="1920" d="M1280 672q0 14 -9 23l-352 352q-9 9 -23 9t-23 -9l-351 -351q-10 -12 -10 -24q0 -14 9 -23t23 -9h224v-352q0 -13 9.5 -22.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 22.5v352h224q13 0 22.5 9.5t9.5 22.5zM1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088 q-185 0 -316.5 131.5t-131.5 316.5q0 130 70 240t188 165q-2 30 -2 43q0 212 150 362t362 150q156 0 285.5 -87t188.5 -231q71 62 166 62q106 0 181 -75t75 -181q0 -76 -41 -138q130 -31 213.5 -135.5t83.5 -238.5z" />
+<glyph unicode="&#xf0f0;" horiz-adv-x="1408" d="M384 192q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45t45 19t45 -19t19 -45zM1408 131q0 -121 -73 -190t-194 -69h-874q-121 0 -194 69t-73 190q0 68 5.5 131t24 138t47.5 132.5t81 103t120 60.5q-22 -52 -22 -120v-203q-58 -20 -93 -70t-35 -111q0 -80 56 -136t136 -56 t136 56t56 136q0 61 -35.5 111t-92.5 70v203q0 62 25 93q132 -104 295 -104t295 104q25 -31 25 -93v-64q-106 0 -181 -75t-75 -181v-89q-32 -29 -32 -71q0 -40 28 -68t68 -28t68 28t28 68q0 42 -32 71v89q0 52 38 90t90 38t90 -38t38 -90v-89q-32 -29 -32 -71q0 -40 28 -68 t68 -28t68 28t28 68q0 42 -32 71v89q0 68 -34.5 127.5t-93.5 93.5q0 10 0.5 42.5t0 48t-2.5 41.5t-7 47t-13 40q68 -15 120 -60.5t81 -103t47.5 -132.5t24 -138t5.5 -131zM1088 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5 t271.5 -112.5t112.5 -271.5z" />
+<glyph unicode="&#xf0f1;" horiz-adv-x="1408" d="M1280 832q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 832q0 -62 -35.5 -111t-92.5 -70v-395q0 -159 -131.5 -271.5t-316.5 -112.5t-316.5 112.5t-131.5 271.5v132q-164 20 -274 128t-110 252v512q0 26 19 45t45 19q6 0 16 -2q17 30 47 48 t65 18q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5q-33 0 -64 18v-402q0 -106 94 -181t226 -75t226 75t94 181v402q-31 -18 -64 -18q-53 0 -90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5q35 0 65 -18t47 -48q10 2 16 2q26 0 45 -19t19 -45v-512q0 -144 -110 -252 t-274 -128v-132q0 -106 94 -181t226 -75t226 75t94 181v395q-57 21 -92.5 70t-35.5 111q0 80 56 136t136 56t136 -56t56 -136z" />
+<glyph unicode="&#xf0f2;" horiz-adv-x="1792" d="M640 1152h512v128h-512v-128zM288 1152v-1280h-64q-92 0 -158 66t-66 158v832q0 92 66 158t158 66h64zM1408 1152v-1280h-1024v1280h128v160q0 40 28 68t68 28h576q40 0 68 -28t28 -68v-160h128zM1792 928v-832q0 -92 -66 -158t-158 -66h-64v1280h64q92 0 158 -66 t66 -158z" />
+<glyph unicode="&#xf0f3;" horiz-adv-x="1792" d="M912 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM1728 128q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38t-38 90q50 42 91 88t85 119.5t74.5 158.5 t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q190 -28 307 -158.5t117 -282.5q0 -139 19.5 -260t50 -206t74.5 -158.5t85 -119.5t91 -88z" />
+<glyph unicode="&#xf0f4;" horiz-adv-x="1920" d="M1664 896q0 80 -56 136t-136 56h-64v-384h64q80 0 136 56t56 136zM0 128h1792q0 -106 -75 -181t-181 -75h-1280q-106 0 -181 75t-75 181zM1856 896q0 -159 -112.5 -271.5t-271.5 -112.5h-64v-32q0 -92 -66 -158t-158 -66h-704q-92 0 -158 66t-66 158v736q0 26 19 45 t45 19h1152q159 0 271.5 -112.5t112.5 -271.5z" />
+<glyph unicode="&#xf0f5;" horiz-adv-x="1408" d="M640 1472v-640q0 -61 -35.5 -111t-92.5 -70v-779q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v779q-57 20 -92.5 70t-35.5 111v640q0 26 19 45t45 19t45 -19t19 -45v-416q0 -26 19 -45t45 -19t45 19t19 45v416q0 26 19 45t45 19t45 -19t19 -45v-416q0 -26 19 -45 t45 -19t45 19t19 45v416q0 26 19 45t45 19t45 -19t19 -45zM1408 1472v-1600q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v512h-224q-13 0 -22.5 9.5t-9.5 22.5v800q0 132 94 226t226 94h256q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0f6;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M384 736q0 14 9 23t23 9h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64zM1120 512q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704zM1120 256q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704 q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704z" />
+<glyph unicode="&#xf0f7;" horiz-adv-x="1408" d="M384 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 -128h384v1536h-1152v-1536h384v224q0 13 9.5 22.5t22.5 9.5h320q13 0 22.5 -9.5t9.5 -22.5v-224zM1408 1472v-1664q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h1280q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0f8;" horiz-adv-x="1408" d="M384 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 -128h384v1152h-256v-32q0 -40 -28 -68t-68 -28h-448q-40 0 -68 28t-28 68v32h-256v-1152h384v224q0 13 9.5 22.5t22.5 9.5h320q13 0 22.5 -9.5t9.5 -22.5v-224zM896 1056v320q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-96h-128v96q0 13 -9.5 22.5 t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5v96h128v-96q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1408 1088v-1280q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1280q0 26 19 45t45 19h320 v288q0 40 28 68t68 28h448q40 0 68 -28t28 -68v-288h320q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0f9;" horiz-adv-x="1920" d="M640 128q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM256 640h384v256h-158q-14 -2 -22 -9l-195 -195q-7 -12 -9 -22v-30zM1536 128q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5zM1664 800v192q0 14 -9 23t-23 9h-224v224q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-224h-224q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h224v-224q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v224h224q14 0 23 9t9 23zM1920 1344v-1152 q0 -26 -19 -45t-45 -19h-192q0 -106 -75 -181t-181 -75t-181 75t-75 181h-384q0 -106 -75 -181t-181 -75t-181 75t-75 181h-128q-26 0 -45 19t-19 45t19 45t45 19v416q0 26 13 58t32 51l198 198q19 19 51 32t58 13h160v320q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0fa;" horiz-adv-x="1792" d="M1280 416v192q0 14 -9 23t-23 9h-224v224q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-224h-224q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h224v-224q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v224h224q14 0 23 9t9 23zM640 1152h512v128h-512v-128zM256 1152v-1280h-32 q-92 0 -158 66t-66 158v832q0 92 66 158t158 66h32zM1440 1152v-1280h-1088v1280h160v160q0 40 28 68t68 28h576q40 0 68 -28t28 -68v-160h160zM1792 928v-832q0 -92 -66 -158t-158 -66h-32v1280h32q92 0 158 -66t66 -158z" />
+<glyph unicode="&#xf0fb;" horiz-adv-x="1920" d="M1920 576q-1 -32 -288 -96l-352 -32l-224 -64h-64l-293 -352h69q26 0 45 -4.5t19 -11.5t-19 -11.5t-45 -4.5h-96h-160h-64v32h64v416h-160l-192 -224h-96l-32 32v192h32v32h128v8l-192 24v128l192 24v8h-128v32h-32v192l32 32h96l192 -224h160v416h-64v32h64h160h96 q26 0 45 -4.5t19 -11.5t-19 -11.5t-45 -4.5h-69l293 -352h64l224 -64l352 -32q261 -58 287 -93z" />
+<glyph unicode="&#xf0fc;" horiz-adv-x="1664" d="M640 640v384h-256v-256q0 -53 37.5 -90.5t90.5 -37.5h128zM1664 192v-192h-1152v192l128 192h-128q-159 0 -271.5 112.5t-112.5 271.5v320l-64 64l32 128h480l32 128h960l32 -192l-64 -32v-800z" />
+<glyph unicode="&#xf0fd;" d="M1280 192v896q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-512v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-896q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h512v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf0fe;" d="M1280 576v128q0 26 -19 45t-45 19h-320v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-320q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h320v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h320q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf100;" horiz-adv-x="1024" d="M627 160q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23zM1011 160q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23 t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23z" />
+<glyph unicode="&#xf101;" horiz-adv-x="1024" d="M595 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23zM979 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23 l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
+<glyph unicode="&#xf102;" horiz-adv-x="1152" d="M1075 224q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23zM1075 608q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393 q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
+<glyph unicode="&#xf103;" horiz-adv-x="1152" d="M1075 672q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23zM1075 1056q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23 t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
+<glyph unicode="&#xf104;" horiz-adv-x="640" d="M627 992q0 -13 -10 -23l-393 -393l393 -393q10 -10 10 -23t-10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
+<glyph unicode="&#xf105;" horiz-adv-x="640" d="M595 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
+<glyph unicode="&#xf106;" horiz-adv-x="1152" d="M1075 352q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
+<glyph unicode="&#xf107;" horiz-adv-x="1152" d="M1075 800q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
+<glyph unicode="&#xf108;" horiz-adv-x="1920" d="M1792 544v832q0 13 -9.5 22.5t-22.5 9.5h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-832q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5zM1920 1376v-1088q0 -66 -47 -113t-113 -47h-544q0 -37 16 -77.5t32 -71t16 -43.5q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19 t-19 45q0 14 16 44t32 70t16 78h-544q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf109;" horiz-adv-x="1920" d="M416 256q-66 0 -113 47t-47 113v704q0 66 47 113t113 47h1088q66 0 113 -47t47 -113v-704q0 -66 -47 -113t-113 -47h-1088zM384 1120v-704q0 -13 9.5 -22.5t22.5 -9.5h1088q13 0 22.5 9.5t9.5 22.5v704q0 13 -9.5 22.5t-22.5 9.5h-1088q-13 0 -22.5 -9.5t-9.5 -22.5z M1760 192h160v-96q0 -40 -47 -68t-113 -28h-1600q-66 0 -113 28t-47 68v96h160h1600zM1040 96q16 0 16 16t-16 16h-160q-16 0 -16 -16t16 -16h160z" />
+<glyph unicode="&#xf10a;" horiz-adv-x="1152" d="M640 128q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1024 288v960q0 13 -9.5 22.5t-22.5 9.5h-832q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h832q13 0 22.5 9.5t9.5 22.5zM1152 1248v-1088q0 -66 -47 -113t-113 -47h-832 q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h832q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf10b;" horiz-adv-x="768" d="M464 128q0 33 -23.5 56.5t-56.5 23.5t-56.5 -23.5t-23.5 -56.5t23.5 -56.5t56.5 -23.5t56.5 23.5t23.5 56.5zM672 288v704q0 13 -9.5 22.5t-22.5 9.5h-512q-13 0 -22.5 -9.5t-9.5 -22.5v-704q0 -13 9.5 -22.5t22.5 -9.5h512q13 0 22.5 9.5t9.5 22.5zM480 1136 q0 16 -16 16h-160q-16 0 -16 -16t16 -16h160q16 0 16 16zM768 1152v-1024q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v1024q0 52 38 90t90 38h512q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf10c;" d="M768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103 t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf10d;" horiz-adv-x="1664" d="M768 576v-384q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v704q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5h64q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-64q-106 0 -181 -75t-75 -181v-32q0 -40 28 -68t68 -28h224q80 0 136 -56t56 -136z M1664 576v-384q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v704q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5h64q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-64q-106 0 -181 -75t-75 -181v-32q0 -40 28 -68t68 -28h224q80 0 136 -56t56 -136z" />
+<glyph unicode="&#xf10e;" horiz-adv-x="1664" d="M768 1216v-704q0 -104 -40.5 -198.5t-109.5 -163.5t-163.5 -109.5t-198.5 -40.5h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64q106 0 181 75t75 181v32q0 40 -28 68t-68 28h-224q-80 0 -136 56t-56 136v384q0 80 56 136t136 56h384q80 0 136 -56t56 -136zM1664 1216 v-704q0 -104 -40.5 -198.5t-109.5 -163.5t-163.5 -109.5t-198.5 -40.5h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64q106 0 181 75t75 181v32q0 40 -28 68t-68 28h-224q-80 0 -136 56t-56 136v384q0 80 56 136t136 56h384q80 0 136 -56t56 -136z" />
+<glyph unicode="&#xf110;" horiz-adv-x="1568" d="M496 192q0 -60 -42.5 -102t-101.5 -42q-60 0 -102 42t-42 102t42 102t102 42q59 0 101.5 -42t42.5 -102zM928 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM320 640q0 -66 -47 -113t-113 -47t-113 47t-47 113 t47 113t113 47t113 -47t47 -113zM1360 192q0 -46 -33 -79t-79 -33t-79 33t-33 79t33 79t79 33t79 -33t33 -79zM528 1088q0 -73 -51.5 -124.5t-124.5 -51.5t-124.5 51.5t-51.5 124.5t51.5 124.5t124.5 51.5t124.5 -51.5t51.5 -124.5zM992 1280q0 -80 -56 -136t-136 -56 t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1536 640q0 -40 -28 -68t-68 -28t-68 28t-28 68t28 68t68 28t68 -28t28 -68zM1328 1088q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5z" />
+<glyph unicode="&#xf111;" d="M1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf112;" horiz-adv-x="1792" d="M1792 416q0 -166 -127 -451q-3 -7 -10.5 -24t-13.5 -30t-13 -22q-12 -17 -28 -17q-15 0 -23.5 10t-8.5 25q0 9 2.5 26.5t2.5 23.5q5 68 5 123q0 101 -17.5 181t-48.5 138.5t-80 101t-105.5 69.5t-133 42.5t-154 21.5t-175.5 6h-224v-256q0 -26 -19 -45t-45 -19t-45 19 l-512 512q-19 19 -19 45t19 45l512 512q19 19 45 19t45 -19t19 -45v-256h224q713 0 875 -403q53 -134 53 -333z" />
+<glyph unicode="&#xf113;" horiz-adv-x="1664" d="M640 320q0 -40 -12.5 -82t-43 -76t-72.5 -34t-72.5 34t-43 76t-12.5 82t12.5 82t43 76t72.5 34t72.5 -34t43 -76t12.5 -82zM1280 320q0 -40 -12.5 -82t-43 -76t-72.5 -34t-72.5 34t-43 76t-12.5 82t12.5 82t43 76t72.5 34t72.5 -34t43 -76t12.5 -82zM1440 320 q0 120 -69 204t-187 84q-41 0 -195 -21q-71 -11 -157 -11t-157 11q-152 21 -195 21q-118 0 -187 -84t-69 -204q0 -88 32 -153.5t81 -103t122 -60t140 -29.5t149 -7h168q82 0 149 7t140 29.5t122 60t81 103t32 153.5zM1664 496q0 -207 -61 -331q-38 -77 -105.5 -133t-141 -86 t-170 -47.5t-171.5 -22t-167 -4.5q-78 0 -142 3t-147.5 12.5t-152.5 30t-137 51.5t-121 81t-86 115q-62 123 -62 331q0 237 136 396q-27 82 -27 170q0 116 51 218q108 0 190 -39.5t189 -123.5q147 35 309 35q148 0 280 -32q105 82 187 121t189 39q51 -102 51 -218 q0 -87 -27 -168q136 -160 136 -398z" />
+<glyph unicode="&#xf114;" horiz-adv-x="1664" d="M1536 224v704q0 40 -28 68t-68 28h-704q-40 0 -68 28t-28 68v64q0 40 -28 68t-68 28h-320q-40 0 -68 -28t-28 -68v-960q0 -40 28 -68t68 -28h1216q40 0 68 28t28 68zM1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320 q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" />
+<glyph unicode="&#xf115;" horiz-adv-x="1920" d="M1781 605q0 35 -53 35h-1088q-40 0 -85.5 -21.5t-71.5 -52.5l-294 -363q-18 -24 -18 -40q0 -35 53 -35h1088q40 0 86 22t71 53l294 363q18 22 18 39zM640 768h768v160q0 40 -28 68t-68 28h-576q-40 0 -68 28t-28 68v64q0 40 -28 68t-68 28h-320q-40 0 -68 -28t-28 -68 v-853l256 315q44 53 116 87.5t140 34.5zM1909 605q0 -62 -46 -120l-295 -363q-43 -53 -116 -87.5t-140 -34.5h-1088q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158v-160h192q54 0 99 -24.5t67 -70.5q15 -32 15 -68z " />
+<glyph unicode="&#xf116;" horiz-adv-x="1792" />
+<glyph unicode="&#xf117;" horiz-adv-x="1792" />
+<glyph unicode="&#xf118;" d="M1134 461q-37 -121 -138 -195t-228 -74t-228 74t-138 195q-8 25 4 48.5t38 31.5q25 8 48.5 -4t31.5 -38q25 -80 92.5 -129.5t151.5 -49.5t151.5 49.5t92.5 129.5q8 26 32 38t49 4t37 -31.5t4 -48.5zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5 t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5 t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf119;" d="M1134 307q8 -25 -4 -48.5t-37 -31.5t-49 4t-32 38q-25 80 -92.5 129.5t-151.5 49.5t-151.5 -49.5t-92.5 -129.5q-8 -26 -31.5 -38t-48.5 -4q-26 8 -38 31.5t-4 48.5q37 121 138 195t228 74t228 -74t138 -195zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204 t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf11a;" d="M1152 448q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h640q26 0 45 -19t19 -45zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf11b;" horiz-adv-x="1920" d="M832 448v128q0 14 -9 23t-23 9h-192v192q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-192h-192q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h192v-192q0 -14 9 -23t23 -9h128q14 0 23 9t9 23v192h192q14 0 23 9t9 23zM1408 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5 t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 640q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1920 512q0 -212 -150 -362t-362 -150q-192 0 -338 128h-220q-146 -128 -338 -128q-212 0 -362 150 t-150 362t150 362t362 150h896q212 0 362 -150t150 -362z" />
+<glyph unicode="&#xf11c;" horiz-adv-x="1920" d="M384 368v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM512 624v-96q0 -16 -16 -16h-224q-16 0 -16 16v96q0 16 16 16h224q16 0 16 -16zM384 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1408 368v-96q0 -16 -16 -16 h-864q-16 0 -16 16v96q0 16 16 16h864q16 0 16 -16zM768 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM640 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1024 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16 h96q16 0 16 -16zM896 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1280 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1664 368v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1152 880v-96 q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1408 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1664 880v-352q0 -16 -16 -16h-224q-16 0 -16 16v96q0 16 16 16h112v240q0 16 16 16h96q16 0 16 -16zM1792 128v896h-1664v-896 h1664zM1920 1024v-896q0 -53 -37.5 -90.5t-90.5 -37.5h-1664q-53 0 -90.5 37.5t-37.5 90.5v896q0 53 37.5 90.5t90.5 37.5h1664q53 0 90.5 -37.5t37.5 -90.5z" />
+<glyph unicode="&#xf11d;" horiz-adv-x="1792" d="M1664 491v616q-169 -91 -306 -91q-82 0 -145 32q-100 49 -184 76.5t-178 27.5q-173 0 -403 -127v-599q245 113 433 113q55 0 103.5 -7.5t98 -26t77 -31t82.5 -39.5l28 -14q44 -22 101 -22q120 0 293 92zM320 1280q0 -35 -17.5 -64t-46.5 -46v-1266q0 -14 -9 -23t-23 -9 h-64q-14 0 -23 9t-9 23v1266q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -39 -35 -57q-10 -5 -17 -9q-218 -116 -369 -116q-88 0 -158 35l-28 14q-64 33 -99 48t-91 29t-114 14q-102 0 -235.5 -44t-228.5 -102 q-15 -9 -33 -9q-16 0 -32 8q-32 19 -32 56v742q0 35 31 55q35 21 78.5 42.5t114 52t152.5 49.5t155 19q112 0 209 -31t209 -86q38 -19 89 -19q122 0 310 112q22 12 31 17q31 16 62 -2q31 -20 31 -55z" />
+<glyph unicode="&#xf11e;" horiz-adv-x="1792" d="M832 536v192q-181 -16 -384 -117v-185q205 96 384 110zM832 954v197q-172 -8 -384 -126v-189q215 111 384 118zM1664 491v184q-235 -116 -384 -71v224q-20 6 -39 15q-5 3 -33 17t-34.5 17t-31.5 15t-34.5 15.5t-32.5 13t-36 12.5t-35 8.5t-39.5 7.5t-39.5 4t-44 2 q-23 0 -49 -3v-222h19q102 0 192.5 -29t197.5 -82q19 -9 39 -15v-188q42 -17 91 -17q120 0 293 92zM1664 918v189q-169 -91 -306 -91q-45 0 -78 8v-196q148 -42 384 90zM320 1280q0 -35 -17.5 -64t-46.5 -46v-1266q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v1266 q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -39 -35 -57q-10 -5 -17 -9q-218 -116 -369 -116q-88 0 -158 35l-28 14q-64 33 -99 48t-91 29t-114 14q-102 0 -235.5 -44t-228.5 -102q-15 -9 -33 -9q-16 0 -32 8 q-32 19 -32 56v742q0 35 31 55q35 21 78.5 42.5t114 52t152.5 49.5t155 19q112 0 209 -31t209 -86q38 -19 89 -19q122 0 310 112q22 12 31 17q31 16 62 -2q31 -20 31 -55z" />
+<glyph unicode="&#xf120;" horiz-adv-x="1664" d="M585 553l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23t-10 -23zM1664 96v-64q0 -14 -9 -23t-23 -9h-960q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h960q14 0 23 -9 t9 -23z" />
+<glyph unicode="&#xf121;" horiz-adv-x="1920" d="M617 137l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23t-10 -23zM1208 1204l-373 -1291q-4 -13 -15.5 -19.5t-23.5 -2.5l-62 17q-13 4 -19.5 15.5t-2.5 24.5 l373 1291q4 13 15.5 19.5t23.5 2.5l62 -17q13 -4 19.5 -15.5t2.5 -24.5zM1865 553l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23t-10 -23z" />
+<glyph unicode="&#xf122;" horiz-adv-x="1792" d="M640 454v-70q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-512 512q-19 19 -19 45t19 45l512 512q29 31 70 14q39 -17 39 -59v-69l-397 -398q-19 -19 -19 -45t19 -45zM1792 416q0 -58 -17 -133.5t-38.5 -138t-48 -125t-40.5 -90.5l-20 -40q-8 -17 -28 -17q-6 0 -9 1 q-25 8 -23 34q43 400 -106 565q-64 71 -170.5 110.5t-267.5 52.5v-251q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-512 512q-19 19 -19 45t19 45l512 512q29 31 70 14q39 -17 39 -59v-262q411 -28 599 -221q169 -173 169 -509z" />
+<glyph unicode="&#xf123;" horiz-adv-x="1664" d="M1186 579l257 250l-356 52l-66 10l-30 60l-159 322v-963l59 -31l318 -168l-60 355l-12 66zM1638 841l-363 -354l86 -500q5 -33 -6 -51.5t-34 -18.5q-17 0 -40 12l-449 236l-449 -236q-23 -12 -40 -12q-23 0 -34 18.5t-6 51.5l86 500l-364 354q-32 32 -23 59.5t54 34.5 l502 73l225 455q20 41 49 41q28 0 49 -41l225 -455l502 -73q45 -7 54 -34.5t-24 -59.5z" />
+<glyph unicode="&#xf124;" horiz-adv-x="1408" d="M1401 1187l-640 -1280q-17 -35 -57 -35q-5 0 -15 2q-22 5 -35.5 22.5t-13.5 39.5v576h-576q-22 0 -39.5 13.5t-22.5 35.5t4 42t29 30l1280 640q13 7 29 7q27 0 45 -19q15 -14 18.5 -34.5t-6.5 -39.5z" />
+<glyph unicode="&#xf125;" horiz-adv-x="1664" d="M557 256h595v595zM512 301l595 595h-595v-595zM1664 224v-192q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v224h-864q-14 0 -23 9t-9 23v864h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224v224q0 14 9 23t23 9h192q14 0 23 -9t9 -23 v-224h851l246 247q10 9 23 9t23 -9q9 -10 9 -23t-9 -23l-247 -246v-851h224q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf126;" horiz-adv-x="1024" d="M288 64q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM288 1216q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM928 1088q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1024 1088q0 -52 -26 -96.5t-70 -69.5 q-2 -287 -226 -414q-68 -38 -203 -81q-128 -40 -169.5 -71t-41.5 -100v-26q44 -25 70 -69.5t26 -96.5q0 -80 -56 -136t-136 -56t-136 56t-56 136q0 52 26 96.5t70 69.5v820q-44 25 -70 69.5t-26 96.5q0 80 56 136t136 56t136 -56t56 -136q0 -52 -26 -96.5t-70 -69.5v-497 q54 26 154 57q55 17 87.5 29.5t70.5 31t59 39.5t40.5 51t28 69.5t8.5 91.5q-44 25 -70 69.5t-26 96.5q0 80 56 136t136 56t136 -56t56 -136z" />
+<glyph unicode="&#xf127;" horiz-adv-x="1664" d="M439 265l-256 -256q-10 -9 -23 -9q-12 0 -23 9q-9 10 -9 23t9 23l256 256q10 9 23 9t23 -9q9 -10 9 -23t-9 -23zM608 224v-320q0 -14 -9 -23t-23 -9t-23 9t-9 23v320q0 14 9 23t23 9t23 -9t9 -23zM384 448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23t9 23t23 9h320 q14 0 23 -9t9 -23zM1648 320q0 -120 -85 -203l-147 -146q-83 -83 -203 -83q-121 0 -204 85l-334 335q-21 21 -42 56l239 18l273 -274q27 -27 68 -27.5t68 26.5l147 146q28 28 28 67q0 40 -28 68l-274 275l18 239q35 -21 56 -42l336 -336q84 -86 84 -204zM1031 1044l-239 -18 l-273 274q-28 28 -68 28q-39 0 -68 -27l-147 -146q-28 -28 -28 -67q0 -40 28 -68l274 -274l-18 -240q-35 21 -56 42l-336 336q-84 86 -84 204q0 120 85 203l147 146q83 83 203 83q121 0 204 -85l334 -335q21 -21 42 -56zM1664 960q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9 t-9 23t9 23t23 9h320q14 0 23 -9t9 -23zM1120 1504v-320q0 -14 -9 -23t-23 -9t-23 9t-9 23v320q0 14 9 23t23 9t23 -9t9 -23zM1527 1353l-256 -256q-11 -9 -23 -9t-23 9q-9 10 -9 23t9 23l256 256q10 9 23 9t23 -9q9 -10 9 -23t-9 -23z" />
+<glyph unicode="&#xf128;" horiz-adv-x="1024" d="M704 280v-240q0 -16 -12 -28t-28 -12h-240q-16 0 -28 12t-12 28v240q0 16 12 28t28 12h240q16 0 28 -12t12 -28zM1020 880q0 -54 -15.5 -101t-35 -76.5t-55 -59.5t-57.5 -43.5t-61 -35.5q-41 -23 -68.5 -65t-27.5 -67q0 -17 -12 -32.5t-28 -15.5h-240q-15 0 -25.5 18.5 t-10.5 37.5v45q0 83 65 156.5t143 108.5q59 27 84 56t25 76q0 42 -46.5 74t-107.5 32q-65 0 -108 -29q-35 -25 -107 -115q-13 -16 -31 -16q-12 0 -25 8l-164 125q-13 10 -15.5 25t5.5 28q160 266 464 266q80 0 161 -31t146 -83t106 -127.5t41 -158.5z" />
+<glyph unicode="&#xf129;" horiz-adv-x="640" d="M640 192v-128q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64v384h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-576h64q26 0 45 -19t19 -45zM512 1344v-192q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v192 q0 26 19 45t45 19h256q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf12a;" horiz-adv-x="640" d="M512 288v-224q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v224q0 26 19 45t45 19h256q26 0 45 -19t19 -45zM542 1344l-28 -768q-1 -26 -20.5 -45t-45.5 -19h-256q-26 0 -45.5 19t-20.5 45l-28 768q-1 26 17.5 45t44.5 19h320q26 0 44.5 -19t17.5 -45z" />
+<glyph unicode="&#xf12b;" d="M897 167v-167h-248l-159 252l-24 42q-8 9 -11 21h-3l-9 -21q-10 -20 -25 -44l-155 -250h-258v167h128l197 291l-185 272h-137v168h276l139 -228q2 -4 23 -42q8 -9 11 -21h3q3 9 11 21l25 42l140 228h257v-168h-125l-184 -267l204 -296h109zM1534 846v-206h-514l-3 27 q-4 28 -4 46q0 64 26 117t65 86.5t84 65t84 54.5t65 54t26 64q0 38 -29.5 62.5t-70.5 24.5q-51 0 -97 -39q-14 -11 -36 -38l-105 92q26 37 63 66q83 65 188 65q110 0 178 -59.5t68 -158.5q0 -56 -24.5 -103t-62 -76.5t-81.5 -58.5t-82 -50.5t-65.5 -51.5t-30.5 -63h232v80 h126z" />
+<glyph unicode="&#xf12c;" d="M897 167v-167h-248l-159 252l-24 42q-8 9 -11 21h-3l-9 -21q-10 -20 -25 -44l-155 -250h-258v167h128l197 291l-185 272h-137v168h276l139 -228q2 -4 23 -42q8 -9 11 -21h3q3 9 11 21l25 42l140 228h257v-168h-125l-184 -267l204 -296h109zM1536 -50v-206h-514l-4 27 q-3 45 -3 46q0 64 26 117t65 86.5t84 65t84 54.5t65 54t26 64q0 38 -29.5 62.5t-70.5 24.5q-51 0 -97 -39q-14 -11 -36 -38l-105 92q26 37 63 66q80 65 188 65q110 0 178 -59.5t68 -158.5q0 -66 -34.5 -118.5t-84 -86t-99.5 -62.5t-87 -63t-41 -73h232v80h126z" />
+<glyph unicode="&#xf12d;" horiz-adv-x="1920" d="M896 128l336 384h-768l-336 -384h768zM1909 1205q15 -34 9.5 -71.5t-30.5 -65.5l-896 -1024q-38 -44 -96 -44h-768q-38 0 -69.5 20.5t-47.5 54.5q-15 34 -9.5 71.5t30.5 65.5l896 1024q38 44 96 44h768q38 0 69.5 -20.5t47.5 -54.5z" />
+<glyph unicode="&#xf12e;" horiz-adv-x="1664" d="M1664 438q0 -81 -44.5 -135t-123.5 -54q-41 0 -77.5 17.5t-59 38t-56.5 38t-71 17.5q-110 0 -110 -124q0 -39 16 -115t15 -115v-5q-22 0 -33 -1q-34 -3 -97.5 -11.5t-115.5 -13.5t-98 -5q-61 0 -103 26.5t-42 83.5q0 37 17.5 71t38 56.5t38 59t17.5 77.5q0 79 -54 123.5 t-135 44.5q-84 0 -143 -45.5t-59 -127.5q0 -43 15 -83t33.5 -64.5t33.5 -53t15 -50.5q0 -45 -46 -89q-37 -35 -117 -35q-95 0 -245 24q-9 2 -27.5 4t-27.5 4l-13 2q-1 0 -3 1q-2 0 -2 1v1024q2 -1 17.5 -3.5t34 -5t21.5 -3.5q150 -24 245 -24q80 0 117 35q46 44 46 89 q0 22 -15 50.5t-33.5 53t-33.5 64.5t-15 83q0 82 59 127.5t144 45.5q80 0 134 -44.5t54 -123.5q0 -41 -17.5 -77.5t-38 -59t-38 -56.5t-17.5 -71q0 -57 42 -83.5t103 -26.5q64 0 180 15t163 17v-2q-1 -2 -3.5 -17.5t-5 -34t-3.5 -21.5q-24 -150 -24 -245q0 -80 35 -117 q44 -46 89 -46q22 0 50.5 15t53 33.5t64.5 33.5t83 15q82 0 127.5 -59t45.5 -143z" />
+<glyph unicode="&#xf130;" horiz-adv-x="1152" d="M1152 832v-128q0 -221 -147.5 -384.5t-364.5 -187.5v-132h256q26 0 45 -19t19 -45t-19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h256v132q-217 24 -364.5 187.5t-147.5 384.5v128q0 26 19 45t45 19t45 -19t19 -45v-128q0 -185 131.5 -316.5t316.5 -131.5 t316.5 131.5t131.5 316.5v128q0 26 19 45t45 19t45 -19t19 -45zM896 1216v-512q0 -132 -94 -226t-226 -94t-226 94t-94 226v512q0 132 94 226t226 94t226 -94t94 -226z" />
+<glyph unicode="&#xf131;" horiz-adv-x="1408" d="M271 591l-101 -101q-42 103 -42 214v128q0 26 19 45t45 19t45 -19t19 -45v-128q0 -53 15 -113zM1385 1193l-361 -361v-128q0 -132 -94 -226t-226 -94q-55 0 -109 19l-96 -96q97 -51 205 -51q185 0 316.5 131.5t131.5 316.5v128q0 26 19 45t45 19t45 -19t19 -45v-128 q0 -221 -147.5 -384.5t-364.5 -187.5v-132h256q26 0 45 -19t19 -45t-19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h256v132q-125 13 -235 81l-254 -254q-10 -10 -23 -10t-23 10l-82 82q-10 10 -10 23t10 23l1234 1234q10 10 23 10t23 -10l82 -82q10 -10 10 -23 t-10 -23zM1005 1325l-621 -621v512q0 132 94 226t226 94q102 0 184.5 -59t116.5 -152z" />
+<glyph unicode="&#xf132;" horiz-adv-x="1280" d="M1088 576v640h-448v-1137q119 63 213 137q235 184 235 360zM1280 1344v-768q0 -86 -33.5 -170.5t-83 -150t-118 -127.5t-126.5 -103t-121 -77.5t-89.5 -49.5t-42.5 -20q-12 -6 -26 -6t-26 6q-16 7 -42.5 20t-89.5 49.5t-121 77.5t-126.5 103t-118 127.5t-83 150 t-33.5 170.5v768q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf133;" horiz-adv-x="1664" d="M128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280 q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf134;" horiz-adv-x="1408" d="M512 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 1376v-320q0 -16 -12 -25q-8 -7 -20 -7q-4 0 -7 1l-448 96q-11 2 -18 11t-7 20h-256v-102q111 -23 183.5 -111t72.5 -203v-800q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v800 q0 106 62.5 190.5t161.5 114.5v111h-32q-59 0 -115 -23.5t-91.5 -53t-66 -66.5t-40.5 -53.5t-14 -24.5q-17 -35 -57 -35q-16 0 -29 7q-23 12 -31.5 37t3.5 49q5 10 14.5 26t37.5 53.5t60.5 70t85 67t108.5 52.5q-25 42 -25 86q0 66 47 113t113 47t113 -47t47 -113 q0 -33 -14 -64h302q0 11 7 20t18 11l448 96q3 1 7 1q12 0 20 -7q12 -9 12 -25z" />
+<glyph unicode="&#xf135;" horiz-adv-x="1664" d="M1440 1088q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1664 1376q0 -249 -75.5 -430.5t-253.5 -360.5q-81 -80 -195 -176l-20 -379q-2 -16 -16 -26l-384 -224q-7 -4 -16 -4q-12 0 -23 9l-64 64q-13 14 -8 32l85 276l-281 281l-276 -85q-3 -1 -9 -1 q-14 0 -23 9l-64 64q-17 19 -5 39l224 384q10 14 26 16l379 20q96 114 176 195q188 187 358 258t431 71q14 0 24 -9.5t10 -22.5z" />
+<glyph unicode="&#xf136;" horiz-adv-x="1792" d="M1745 763l-164 -763h-334l178 832q13 56 -15 88q-27 33 -83 33h-169l-204 -953h-334l204 953h-286l-204 -953h-334l204 953l-153 327h1276q101 0 189.5 -40.5t147.5 -113.5q60 -73 81 -168.5t0 -194.5z" />
+<glyph unicode="&#xf137;" d="M909 141l102 102q19 19 19 45t-19 45l-307 307l307 307q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l454 -454q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf138;" d="M717 141l454 454q19 19 19 45t-19 45l-454 454q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l307 -307l-307 -307q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf139;" d="M1165 397l102 102q19 19 19 45t-19 45l-454 454q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19l307 307l307 -307q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf13a;" d="M813 237l454 454q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-307 -307l-307 307q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l454 -454q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf13b;" horiz-adv-x="1408" d="M1130 939l16 175h-884l47 -534h612l-22 -228l-197 -53l-196 53l-13 140h-175l22 -278l362 -100h4v1l359 99l50 544h-644l-15 181h674zM0 1408h1408l-128 -1438l-578 -162l-574 162z" />
+<glyph unicode="&#xf13c;" horiz-adv-x="1792" d="M275 1408h1505l-266 -1333l-804 -267l-698 267l71 356h297l-29 -147l422 -161l486 161l68 339h-1208l58 297h1209l38 191h-1208z" />
+<glyph unicode="&#xf13d;" horiz-adv-x="1792" d="M960 1280q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1792 352v-352q0 -22 -20 -30q-8 -2 -12 -2q-13 0 -23 9l-93 93q-119 -143 -318.5 -226.5t-429.5 -83.5t-429.5 83.5t-318.5 226.5l-93 -93q-9 -9 -23 -9q-4 0 -12 2q-20 8 -20 30v352 q0 14 9 23t23 9h352q22 0 30 -20q8 -19 -7 -35l-100 -100q67 -91 189.5 -153.5t271.5 -82.5v647h-192q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h192v163q-58 34 -93 92.5t-35 128.5q0 106 75 181t181 75t181 -75t75 -181q0 -70 -35 -128.5t-93 -92.5v-163h192q26 0 45 -19 t19 -45v-128q0 -26 -19 -45t-45 -19h-192v-647q149 20 271.5 82.5t189.5 153.5l-100 100q-15 16 -7 35q8 20 30 20h352q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf13e;" horiz-adv-x="1152" d="M1056 768q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h32v320q0 185 131.5 316.5t316.5 131.5t316.5 -131.5t131.5 -316.5q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45q0 106 -75 181t-181 75t-181 -75t-75 -181 v-320h736z" />
+<glyph unicode="&#xf140;" d="M1024 640q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM1152 640q0 159 -112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM1280 640q0 -212 -150 -362t-362 -150t-362 150 t-150 362t150 362t362 150t362 -150t150 -362zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf141;" horiz-adv-x="1408" d="M384 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM896 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM1408 800v-192q0 -40 -28 -68t-68 -28h-192 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf142;" horiz-adv-x="384" d="M384 288v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM384 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM384 1312v-192q0 -40 -28 -68t-68 -28h-192 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf143;" d="M512 256q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM863 162q-13 232 -177 396t-396 177q-14 1 -24 -9t-10 -23v-128q0 -13 8.5 -22t21.5 -10q154 -11 264 -121t121 -264q1 -13 10 -21.5t22 -8.5h128q13 0 23 10 t9 24zM1247 161q-5 154 -56 297.5t-139.5 260t-205 205t-260 139.5t-297.5 56q-14 1 -23 -9q-10 -10 -10 -23v-128q0 -13 9 -22t22 -10q204 -7 378 -111.5t278.5 -278.5t111.5 -378q1 -13 10 -22t22 -9h128q13 0 23 10q11 9 9 23zM1536 1120v-960q0 -119 -84.5 -203.5 t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf144;" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1152 585q32 18 32 55t-32 55l-544 320q-31 19 -64 1q-32 -19 -32 -56v-640q0 -37 32 -56 q16 -8 32 -8q17 0 32 9z" />
+<glyph unicode="&#xf145;" horiz-adv-x="1792" d="M1024 1084l316 -316l-572 -572l-316 316zM813 105l618 618q19 19 19 45t-19 45l-362 362q-18 18 -45 18t-45 -18l-618 -618q-19 -19 -19 -45t19 -45l362 -362q18 -18 45 -18t45 18zM1702 742l-907 -908q-37 -37 -90.5 -37t-90.5 37l-126 126q56 56 56 136t-56 136 t-136 56t-136 -56l-125 126q-37 37 -37 90.5t37 90.5l907 906q37 37 90.5 37t90.5 -37l125 -125q-56 -56 -56 -136t56 -136t136 -56t136 56l126 -125q37 -37 37 -90.5t-37 -90.5z" />
+<glyph unicode="&#xf146;" d="M1280 576v128q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h896q26 0 45 19t19 45zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z" />
+<glyph unicode="&#xf147;" horiz-adv-x="1408" d="M1152 736v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h832q14 0 23 -9t9 -23zM1280 288v832q0 66 -47 113t-113 47h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113zM1408 1120v-832q0 -119 -84.5 -203.5 t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf148;" horiz-adv-x="1024" d="M1018 933q-18 -37 -58 -37h-192v-864q0 -14 -9 -23t-23 -9h-704q-21 0 -29 18q-8 20 4 35l160 192q9 11 25 11h320v640h-192q-40 0 -58 37q-17 37 9 68l320 384q18 22 49 22t49 -22l320 -384q27 -32 9 -68z" />
+<glyph unicode="&#xf149;" horiz-adv-x="1024" d="M32 1280h704q13 0 22.5 -9.5t9.5 -23.5v-863h192q40 0 58 -37t-9 -69l-320 -384q-18 -22 -49 -22t-49 22l-320 384q-26 31 -9 69q18 37 58 37h192v640h-320q-14 0 -25 11l-160 192q-13 14 -4 34q9 19 29 19z" />
+<glyph unicode="&#xf14a;" d="M685 237l614 614q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-467 -467l-211 211q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l358 -358q19 -19 45 -19t45 19zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5 t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf14b;" d="M404 428l152 -152l-52 -52h-56v96h-96v56zM818 818q14 -13 -3 -30l-291 -291q-17 -17 -30 -3q-14 13 3 30l291 291q17 17 30 3zM544 128l544 544l-288 288l-544 -544v-288h288zM1152 736l92 92q28 28 28 68t-28 68l-152 152q-28 28 -68 28t-68 -28l-92 -92zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf14c;" d="M1280 608v480q0 26 -19 45t-45 19h-480q-42 0 -59 -39q-17 -41 14 -70l144 -144l-534 -534q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19l534 534l144 -144q18 -19 45 -19q12 0 25 5q39 17 39 59zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960 q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf14d;" d="M1005 435l352 352q19 19 19 45t-19 45l-352 352q-30 31 -69 14q-40 -17 -40 -59v-160q-119 0 -216 -19.5t-162.5 -51t-114 -79t-76.5 -95.5t-44.5 -109t-21.5 -111.5t-5 -110.5q0 -181 167 -404q10 -12 25 -12q7 0 13 3q22 9 19 33q-44 354 62 473q46 52 130 75.5 t224 23.5v-160q0 -42 40 -59q12 -5 24 -5q26 0 45 19zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf14e;" d="M640 448l256 128l-256 128v-256zM1024 1039v-542l-512 -256v542zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf150;" d="M1145 861q18 -35 -5 -66l-320 -448q-19 -27 -52 -27t-52 27l-320 448q-23 31 -5 66q17 35 57 35h640q40 0 57 -35zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf151;" d="M1145 419q-17 -35 -57 -35h-640q-40 0 -57 35q-18 35 5 66l320 448q19 27 52 27t52 -27l320 -448q23 -31 5 -66zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf152;" d="M1088 640q0 -33 -27 -52l-448 -320q-31 -23 -66 -5q-35 17 -35 57v640q0 40 35 57q35 18 66 -5l448 -320q27 -19 27 -52zM1280 160v960q0 14 -9 23t-23 9h-960q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h960q14 0 23 9t9 23zM1536 1120v-960q0 -119 -84.5 -203.5 t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf153;" horiz-adv-x="1024" d="M976 229l35 -159q3 -12 -3 -22.5t-17 -14.5l-5 -1q-4 -2 -10.5 -3.5t-16 -4.5t-21.5 -5.5t-25.5 -5t-30 -5t-33.5 -4.5t-36.5 -3t-38.5 -1q-234 0 -409 130.5t-238 351.5h-95q-13 0 -22.5 9.5t-9.5 22.5v113q0 13 9.5 22.5t22.5 9.5h66q-2 57 1 105h-67q-14 0 -23 9 t-9 23v114q0 14 9 23t23 9h98q67 210 243.5 338t400.5 128q102 0 194 -23q11 -3 20 -15q6 -11 3 -24l-43 -159q-3 -13 -14 -19.5t-24 -2.5l-4 1q-4 1 -11.5 2.5l-17.5 3.5t-22.5 3.5t-26 3t-29 2.5t-29.5 1q-126 0 -226 -64t-150 -176h468q16 0 25 -12q10 -12 7 -26 l-24 -114q-5 -26 -32 -26h-488q-3 -37 0 -105h459q15 0 25 -12q9 -12 6 -27l-24 -112q-2 -11 -11 -18.5t-20 -7.5h-387q48 -117 149.5 -185.5t228.5 -68.5q18 0 36 1.5t33.5 3.5t29.5 4.5t24.5 5t18.5 4.5l12 3l5 2q13 5 26 -2q12 -7 15 -21z" />
+<glyph unicode="&#xf154;" horiz-adv-x="1024" d="M1020 399v-367q0 -14 -9 -23t-23 -9h-956q-14 0 -23 9t-9 23v150q0 13 9.5 22.5t22.5 9.5h97v383h-95q-14 0 -23 9.5t-9 22.5v131q0 14 9 23t23 9h95v223q0 171 123.5 282t314.5 111q185 0 335 -125q9 -8 10 -20.5t-7 -22.5l-103 -127q-9 -11 -22 -12q-13 -2 -23 7 q-5 5 -26 19t-69 32t-93 18q-85 0 -137 -47t-52 -123v-215h305q13 0 22.5 -9t9.5 -23v-131q0 -13 -9.5 -22.5t-22.5 -9.5h-305v-379h414v181q0 13 9 22.5t23 9.5h162q14 0 23 -9.5t9 -22.5z" />
+<glyph unicode="&#xf155;" horiz-adv-x="1024" d="M978 351q0 -153 -99.5 -263.5t-258.5 -136.5v-175q0 -14 -9 -23t-23 -9h-135q-13 0 -22.5 9.5t-9.5 22.5v175q-66 9 -127.5 31t-101.5 44.5t-74 48t-46.5 37.5t-17.5 18q-17 21 -2 41l103 135q7 10 23 12q15 2 24 -9l2 -2q113 -99 243 -125q37 -8 74 -8q81 0 142.5 43 t61.5 122q0 28 -15 53t-33.5 42t-58.5 37.5t-66 32t-80 32.5q-39 16 -61.5 25t-61.5 26.5t-62.5 31t-56.5 35.5t-53.5 42.5t-43.5 49t-35.5 58t-21 66.5t-8.5 78q0 138 98 242t255 134v180q0 13 9.5 22.5t22.5 9.5h135q14 0 23 -9t9 -23v-176q57 -6 110.5 -23t87 -33.5 t63.5 -37.5t39 -29t15 -14q17 -18 5 -38l-81 -146q-8 -15 -23 -16q-14 -3 -27 7q-3 3 -14.5 12t-39 26.5t-58.5 32t-74.5 26t-85.5 11.5q-95 0 -155 -43t-60 -111q0 -26 8.5 -48t29.5 -41.5t39.5 -33t56 -31t60.5 -27t70 -27.5q53 -20 81 -31.5t76 -35t75.5 -42.5t62 -50 t53 -63.5t31.5 -76.5t13 -94z" />
+<glyph unicode="&#xf156;" horiz-adv-x="898" d="M898 1066v-102q0 -14 -9 -23t-23 -9h-168q-23 -144 -129 -234t-276 -110q167 -178 459 -536q14 -16 4 -34q-8 -18 -29 -18h-195q-16 0 -25 12q-306 367 -498 571q-9 9 -9 22v127q0 13 9.5 22.5t22.5 9.5h112q132 0 212.5 43t102.5 125h-427q-14 0 -23 9t-9 23v102 q0 14 9 23t23 9h413q-57 113 -268 113h-145q-13 0 -22.5 9.5t-9.5 22.5v133q0 14 9 23t23 9h832q14 0 23 -9t9 -23v-102q0 -14 -9 -23t-23 -9h-233q47 -61 64 -144h171q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf157;" horiz-adv-x="1027" d="M603 0h-172q-13 0 -22.5 9t-9.5 23v330h-288q-13 0 -22.5 9t-9.5 23v103q0 13 9.5 22.5t22.5 9.5h288v85h-288q-13 0 -22.5 9t-9.5 23v104q0 13 9.5 22.5t22.5 9.5h214l-321 578q-8 16 0 32q10 16 28 16h194q19 0 29 -18l215 -425q19 -38 56 -125q10 24 30.5 68t27.5 61 l191 420q8 19 29 19h191q17 0 27 -16q9 -14 1 -31l-313 -579h215q13 0 22.5 -9.5t9.5 -22.5v-104q0 -14 -9.5 -23t-22.5 -9h-290v-85h290q13 0 22.5 -9.5t9.5 -22.5v-103q0 -14 -9.5 -23t-22.5 -9h-290v-330q0 -13 -9.5 -22.5t-22.5 -9.5z" />
+<glyph unicode="&#xf158;" horiz-adv-x="1280" d="M1043 971q0 100 -65 162t-171 62h-320v-448h320q106 0 171 62t65 162zM1280 971q0 -193 -126.5 -315t-326.5 -122h-340v-118h505q14 0 23 -9t9 -23v-128q0 -14 -9 -23t-23 -9h-505v-192q0 -14 -9.5 -23t-22.5 -9h-167q-14 0 -23 9t-9 23v192h-224q-14 0 -23 9t-9 23v128 q0 14 9 23t23 9h224v118h-224q-14 0 -23 9t-9 23v149q0 13 9 22.5t23 9.5h224v629q0 14 9 23t23 9h539q200 0 326.5 -122t126.5 -315z" />
+<glyph unicode="&#xf159;" horiz-adv-x="1792" d="M514 341l81 299h-159l75 -300q1 -1 1 -3t1 -3q0 1 0.5 3.5t0.5 3.5zM630 768l35 128h-292l32 -128h225zM822 768h139l-35 128h-70zM1271 340l78 300h-162l81 -299q0 -1 0.5 -3.5t1.5 -3.5q0 1 0.5 3t0.5 3zM1382 768l33 128h-297l34 -128h230zM1792 736v-64q0 -14 -9 -23 t-23 -9h-213l-164 -616q-7 -24 -31 -24h-159q-24 0 -31 24l-166 616h-209l-167 -616q-7 -24 -31 -24h-159q-11 0 -19.5 7t-10.5 17l-160 616h-208q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h175l-33 128h-142q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h109l-89 344q-5 15 5 28 q10 12 26 12h137q26 0 31 -24l90 -360h359l97 360q7 24 31 24h126q24 0 31 -24l98 -360h365l93 360q5 24 31 24h137q16 0 26 -12q10 -13 5 -28l-91 -344h111q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-145l-34 -128h179q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf15a;" horiz-adv-x="1280" d="M1167 896q18 -182 -131 -258q117 -28 175 -103t45 -214q-7 -71 -32.5 -125t-64.5 -89t-97 -58.5t-121.5 -34.5t-145.5 -15v-255h-154v251q-80 0 -122 1v-252h-154v255q-18 0 -54 0.5t-55 0.5h-200l31 183h111q50 0 58 51v402h16q-6 1 -16 1v287q-13 68 -89 68h-111v164 l212 -1q64 0 97 1v252h154v-247q82 2 122 2v245h154v-252q79 -7 140 -22.5t113 -45t82.5 -78t36.5 -114.5zM952 351q0 36 -15 64t-37 46t-57.5 30.5t-65.5 18.5t-74 9t-69 3t-64.5 -1t-47.5 -1v-338q8 0 37 -0.5t48 -0.5t53 1.5t58.5 4t57 8.5t55.5 14t47.5 21t39.5 30 t24.5 40t9.5 51zM881 827q0 33 -12.5 58.5t-30.5 42t-48 28t-55 16.5t-61.5 8t-58 2.5t-54 -1t-39.5 -0.5v-307q5 0 34.5 -0.5t46.5 0t50 2t55 5.5t51.5 11t48.5 18.5t37 27t27 38.5t9 51z" />
+<glyph unicode="&#xf15b;" d="M1024 1024v472q22 -14 36 -28l408 -408q14 -14 28 -36h-472zM896 992q0 -40 28 -68t68 -28h544v-1056q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h800v-544z" />
+<glyph unicode="&#xf15c;" d="M1468 1060q14 -14 28 -36h-472v472q22 -14 36 -28zM992 896h544v-1056q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h800v-544q0 -40 28 -68t68 -28zM1152 160v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704 q14 0 23 9t9 23zM1152 416v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23zM1152 672v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23z" />
+<glyph unicode="&#xf15d;" horiz-adv-x="1664" d="M1191 1128h177l-72 218l-12 47q-2 16 -2 20h-4l-3 -20q0 -1 -3.5 -18t-7.5 -29zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1572 -23 v-233h-584v90l369 529q12 18 21 27l11 9v3q-2 0 -6.5 -0.5t-7.5 -0.5q-12 -3 -30 -3h-232v-115h-120v229h567v-89l-369 -530q-6 -8 -21 -26l-11 -11v-2l14 2q9 2 30 2h248v119h121zM1661 874v-106h-288v106h75l-47 144h-243l-47 -144h75v-106h-287v106h70l230 662h162 l230 -662h70z" />
+<glyph unicode="&#xf15e;" horiz-adv-x="1664" d="M1191 104h177l-72 218l-12 47q-2 16 -2 20h-4l-3 -20q0 -1 -3.5 -18t-7.5 -29zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1661 -150 v-106h-288v106h75l-47 144h-243l-47 -144h75v-106h-287v106h70l230 662h162l230 -662h70zM1572 1001v-233h-584v90l369 529q12 18 21 27l11 9v3q-2 0 -6.5 -0.5t-7.5 -0.5q-12 -3 -30 -3h-232v-115h-120v229h567v-89l-369 -530q-6 -8 -21 -26l-11 -10v-3l14 3q9 1 30 1h248 v119h121z" />
+<glyph unicode="&#xf160;" horiz-adv-x="1792" d="M736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1792 -32v-192q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h832 q14 0 23 -9t9 -23zM1600 480v-192q0 -14 -9 -23t-23 -9h-640q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h640q14 0 23 -9t9 -23zM1408 992v-192q0 -14 -9 -23t-23 -9h-448q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h448q14 0 23 -9t9 -23zM1216 1504v-192q0 -14 -9 -23t-23 -9h-256 q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h256q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf161;" horiz-adv-x="1792" d="M1216 -32v-192q0 -14 -9 -23t-23 -9h-256q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h256q14 0 23 -9t9 -23zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192 q14 0 23 -9t9 -23zM1408 480v-192q0 -14 -9 -23t-23 -9h-448q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h448q14 0 23 -9t9 -23zM1600 992v-192q0 -14 -9 -23t-23 -9h-640q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h640q14 0 23 -9t9 -23zM1792 1504v-192q0 -14 -9 -23t-23 -9h-832 q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h832q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf162;" d="M1346 223q0 63 -44 116t-103 53q-52 0 -83 -37t-31 -94t36.5 -95t104.5 -38q50 0 85 27t35 68zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23 zM1486 165q0 -62 -13 -121.5t-41 -114t-68 -95.5t-98.5 -65.5t-127.5 -24.5q-62 0 -108 16q-24 8 -42 15l39 113q15 -7 31 -11q37 -13 75 -13q84 0 134.5 58.5t66.5 145.5h-2q-21 -23 -61.5 -37t-84.5 -14q-106 0 -173 71.5t-67 172.5q0 105 72 178t181 73q123 0 205 -94.5 t82 -252.5zM1456 882v-114h-469v114h167v432q0 7 0.5 19t0.5 17v16h-2l-7 -12q-8 -13 -26 -31l-62 -58l-82 86l192 185h123v-654h165z" />
+<glyph unicode="&#xf163;" d="M1346 1247q0 63 -44 116t-103 53q-52 0 -83 -37t-31 -94t36.5 -95t104.5 -38q50 0 85 27t35 68zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9 t9 -23zM1456 -142v-114h-469v114h167v432q0 7 0.5 19t0.5 17v16h-2l-7 -12q-8 -13 -26 -31l-62 -58l-82 86l192 185h123v-654h165zM1486 1189q0 -62 -13 -121.5t-41 -114t-68 -95.5t-98.5 -65.5t-127.5 -24.5q-62 0 -108 16q-24 8 -42 15l39 113q15 -7 31 -11q37 -13 75 -13 q84 0 134.5 58.5t66.5 145.5h-2q-21 -23 -61.5 -37t-84.5 -14q-106 0 -173 71.5t-67 172.5q0 105 72 178t181 73q123 0 205 -94.5t82 -252.5z" />
+<glyph unicode="&#xf164;" horiz-adv-x="1664" d="M256 192q0 26 -19 45t-45 19q-27 0 -45.5 -19t-18.5 -45q0 -27 18.5 -45.5t45.5 -18.5q26 0 45 18.5t19 45.5zM416 704v-640q0 -26 -19 -45t-45 -19h-288q-26 0 -45 19t-19 45v640q0 26 19 45t45 19h288q26 0 45 -19t19 -45zM1600 704q0 -86 -55 -149q15 -44 15 -76 q3 -76 -43 -137q17 -56 0 -117q-15 -57 -54 -94q9 -112 -49 -181q-64 -76 -197 -78h-36h-76h-17q-66 0 -144 15.5t-121.5 29t-120.5 39.5q-123 43 -158 44q-26 1 -45 19.5t-19 44.5v641q0 25 18 43.5t43 20.5q24 2 76 59t101 121q68 87 101 120q18 18 31 48t17.5 48.5 t13.5 60.5q7 39 12.5 61t19.5 52t34 50q19 19 45 19q46 0 82.5 -10.5t60 -26t40 -40.5t24 -45t12 -50t5 -45t0.5 -39q0 -38 -9.5 -76t-19 -60t-27.5 -56q-3 -6 -10 -18t-11 -22t-8 -24h277q78 0 135 -57t57 -135z" />
+<glyph unicode="&#xf165;" horiz-adv-x="1664" d="M256 960q0 -26 -19 -45t-45 -19q-27 0 -45.5 19t-18.5 45q0 27 18.5 45.5t45.5 18.5q26 0 45 -18.5t19 -45.5zM416 448v640q0 26 -19 45t-45 19h-288q-26 0 -45 -19t-19 -45v-640q0 -26 19 -45t45 -19h288q26 0 45 19t19 45zM1545 597q55 -61 55 -149q-1 -78 -57.5 -135 t-134.5 -57h-277q4 -14 8 -24t11 -22t10 -18q18 -37 27 -57t19 -58.5t10 -76.5q0 -24 -0.5 -39t-5 -45t-12 -50t-24 -45t-40 -40.5t-60 -26t-82.5 -10.5q-26 0 -45 19q-20 20 -34 50t-19.5 52t-12.5 61q-9 42 -13.5 60.5t-17.5 48.5t-31 48q-33 33 -101 120q-49 64 -101 121 t-76 59q-25 2 -43 20.5t-18 43.5v641q0 26 19 44.5t45 19.5q35 1 158 44q77 26 120.5 39.5t121.5 29t144 15.5h17h76h36q133 -2 197 -78q58 -69 49 -181q39 -37 54 -94q17 -61 0 -117q46 -61 43 -137q0 -32 -15 -76z" />
+<glyph unicode="&#xf166;" d="M919 233v157q0 50 -29 50q-17 0 -33 -16v-224q16 -16 33 -16q29 0 29 49zM1103 355h66v34q0 51 -33 51t-33 -51v-34zM532 621v-70h-80v-423h-74v423h-78v70h232zM733 495v-367h-67v40q-39 -45 -76 -45q-33 0 -42 28q-6 16 -6 54v290h66v-270q0 -24 1 -26q1 -15 15 -15 q20 0 42 31v280h67zM985 384v-146q0 -52 -7 -73q-12 -42 -53 -42q-35 0 -68 41v-36h-67v493h67v-161q32 40 68 40q41 0 53 -42q7 -21 7 -74zM1236 255v-9q0 -29 -2 -43q-3 -22 -15 -40q-27 -40 -80 -40q-52 0 -81 38q-21 27 -21 86v129q0 59 20 86q29 38 80 38t78 -38 q21 -28 21 -86v-76h-133v-65q0 -51 34 -51q24 0 30 26q0 1 0.5 7t0.5 16.5v21.5h68zM785 1079v-156q0 -51 -32 -51t-32 51v156q0 52 32 52t32 -52zM1318 366q0 177 -19 260q-10 44 -43 73.5t-76 34.5q-136 15 -412 15q-275 0 -411 -15q-44 -5 -76.5 -34.5t-42.5 -73.5 q-20 -87 -20 -260q0 -176 20 -260q10 -43 42.5 -73t75.5 -35q137 -15 412 -15t412 15q43 5 75.5 35t42.5 73q20 84 20 260zM563 1017l90 296h-75l-51 -195l-53 195h-78l24 -69t23 -69q35 -103 46 -158v-201h74v201zM852 936v130q0 58 -21 87q-29 38 -78 38q-51 0 -78 -38 q-21 -29 -21 -87v-130q0 -58 21 -87q27 -38 78 -38q49 0 78 38q21 27 21 87zM1033 816h67v370h-67v-283q-22 -31 -42 -31q-15 0 -16 16q-1 2 -1 26v272h-67v-293q0 -37 6 -55q11 -27 43 -27q36 0 77 45v-40zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960 q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf167;" d="M971 292v-211q0 -67 -39 -67q-23 0 -45 22v301q22 22 45 22q39 0 39 -67zM1309 291v-46h-90v46q0 68 45 68t45 -68zM343 509h107v94h-312v-94h105v-569h100v569zM631 -60h89v494h-89v-378q-30 -42 -57 -42q-18 0 -21 21q-1 3 -1 35v364h-89v-391q0 -49 8 -73 q12 -37 58 -37q48 0 102 61v-54zM1060 88v197q0 73 -9 99q-17 56 -71 56q-50 0 -93 -54v217h-89v-663h89v48q45 -55 93 -55q54 0 71 55q9 27 9 100zM1398 98v13h-91q0 -51 -2 -61q-7 -36 -40 -36q-46 0 -46 69v87h179v103q0 79 -27 116q-39 51 -106 51q-68 0 -107 -51 q-28 -37 -28 -116v-173q0 -79 29 -116q39 -51 108 -51q72 0 108 53q18 27 21 54q2 9 2 58zM790 1011v210q0 69 -43 69t-43 -69v-210q0 -70 43 -70t43 70zM1509 260q0 -234 -26 -350q-14 -59 -58 -99t-102 -46q-184 -21 -555 -21t-555 21q-58 6 -102.5 46t-57.5 99 q-26 112 -26 350q0 234 26 350q14 59 58 99t103 47q183 20 554 20t555 -20q58 -7 102.5 -47t57.5 -99q26 -112 26 -350zM511 1536h102l-121 -399v-271h-100v271q-14 74 -61 212q-37 103 -65 187h106l71 -263zM881 1203v-175q0 -81 -28 -118q-37 -51 -106 -51q-67 0 -105 51 q-28 38 -28 118v175q0 80 28 117q38 51 105 51q69 0 106 -51q28 -37 28 -117zM1216 1365v-499h-91v55q-53 -62 -103 -62q-46 0 -59 37q-8 24 -8 75v394h91v-367q0 -33 1 -35q3 -22 21 -22q27 0 57 43v381h91z" />
+<glyph unicode="&#xf168;" horiz-adv-x="1408" d="M597 869q-10 -18 -257 -456q-27 -46 -65 -46h-239q-21 0 -31 17t0 36l253 448q1 0 0 1l-161 279q-12 22 -1 37q9 15 32 15h239q40 0 66 -45zM1403 1511q11 -16 0 -37l-528 -934v-1l336 -615q11 -20 1 -37q-10 -15 -32 -15h-239q-42 0 -66 45l-339 622q18 32 531 942 q25 45 64 45h241q22 0 31 -15z" />
+<glyph unicode="&#xf169;" d="M685 771q0 1 -126 222q-21 34 -52 34h-184q-18 0 -26 -11q-7 -12 1 -29l125 -216v-1l-196 -346q-9 -14 0 -28q8 -13 24 -13h185q31 0 50 36zM1309 1268q-7 12 -24 12h-187q-30 0 -49 -35l-411 -729q1 -2 262 -481q20 -35 52 -35h184q18 0 25 12q8 13 -1 28l-260 476v1 l409 723q8 16 0 28zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf16a;" horiz-adv-x="1792" d="M1280 640q0 37 -30 54l-512 320q-31 20 -65 2q-33 -18 -33 -56v-640q0 -38 33 -56q16 -8 31 -8q20 0 34 10l512 320q30 17 30 54zM1792 640q0 -96 -1 -150t-8.5 -136.5t-22.5 -147.5q-16 -73 -69 -123t-124 -58q-222 -25 -671 -25t-671 25q-71 8 -124.5 58t-69.5 123 q-14 65 -21.5 147.5t-8.5 136.5t-1 150t1 150t8.5 136.5t22.5 147.5q16 73 69 123t124 58q222 25 671 25t671 -25q71 -8 124.5 -58t69.5 -123q14 -65 21.5 -147.5t8.5 -136.5t1 -150z" />
+<glyph unicode="&#xf16b;" horiz-adv-x="1792" d="M402 829l494 -305l-342 -285l-490 319zM1388 274v-108l-490 -293v-1l-1 1l-1 -1v1l-489 293v108l147 -96l342 284v2l1 -1l1 1v-2l343 -284zM554 1418l342 -285l-494 -304l-338 270zM1390 829l338 -271l-489 -319l-343 285zM1239 1418l489 -319l-338 -270l-494 304z" />
+<glyph unicode="&#xf16c;" horiz-adv-x="1408" d="M928 135v-151l-707 -1v151zM1169 481v-701l-1 -35v-1h-1132l-35 1h-1v736h121v-618h928v618h120zM241 393l704 -65l-13 -150l-705 65zM309 709l683 -183l-39 -146l-683 183zM472 1058l609 -360l-77 -130l-609 360zM832 1389l398 -585l-124 -85l-399 584zM1285 1536 l121 -697l-149 -26l-121 697z" />
+<glyph unicode="&#xf16d;" d="M1362 110v648h-135q20 -63 20 -131q0 -126 -64 -232.5t-174 -168.5t-240 -62q-197 0 -337 135.5t-140 327.5q0 68 20 131h-141v-648q0 -26 17.5 -43.5t43.5 -17.5h1069q25 0 43 17.5t18 43.5zM1078 643q0 124 -90.5 211.5t-218.5 87.5q-127 0 -217.5 -87.5t-90.5 -211.5 t90.5 -211.5t217.5 -87.5q128 0 218.5 87.5t90.5 211.5zM1362 1003v165q0 28 -20 48.5t-49 20.5h-174q-29 0 -49 -20.5t-20 -48.5v-165q0 -29 20 -49t49 -20h174q29 0 49 20t20 49zM1536 1211v-1142q0 -81 -58 -139t-139 -58h-1142q-81 0 -139 58t-58 139v1142q0 81 58 139 t139 58h1142q81 0 139 -58t58 -139z" />
+<glyph unicode="&#xf16e;" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM698 640q0 88 -62 150t-150 62t-150 -62t-62 -150t62 -150t150 -62t150 62t62 150zM1262 640q0 88 -62 150 t-150 62t-150 -62t-62 -150t62 -150t150 -62t150 62t62 150z" />
+<glyph unicode="&#xf170;" d="M768 914l201 -306h-402zM1133 384h94l-459 691l-459 -691h94l104 160h522zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf171;" horiz-adv-x="1408" d="M815 677q8 -63 -50.5 -101t-111.5 -6q-39 17 -53.5 58t-0.5 82t52 58q36 18 72.5 12t64 -35.5t27.5 -67.5zM926 698q-14 107 -113 164t-197 13q-63 -28 -100.5 -88.5t-34.5 -129.5q4 -91 77.5 -155t165.5 -56q91 8 152 84t50 168zM1165 1240q-20 27 -56 44.5t-58 22 t-71 12.5q-291 47 -566 -2q-43 -7 -66 -12t-55 -22t-50 -43q30 -28 76 -45.5t73.5 -22t87.5 -11.5q228 -29 448 -1q63 8 89.5 12t72.5 21.5t75 46.5zM1222 205q-8 -26 -15.5 -76.5t-14 -84t-28.5 -70t-58 -56.5q-86 -48 -189.5 -71.5t-202 -22t-201.5 18.5q-46 8 -81.5 18 t-76.5 27t-73 43.5t-52 61.5q-25 96 -57 292l6 16l18 9q223 -148 506.5 -148t507.5 148q21 -6 24 -23t-5 -45t-8 -37zM1403 1166q-26 -167 -111 -655q-5 -30 -27 -56t-43.5 -40t-54.5 -31q-252 -126 -610 -88q-248 27 -394 139q-15 12 -25.5 26.5t-17 35t-9 34t-6 39.5 t-5.5 35q-9 50 -26.5 150t-28 161.5t-23.5 147.5t-22 158q3 26 17.5 48.5t31.5 37.5t45 30t46 22.5t48 18.5q125 46 313 64q379 37 676 -50q155 -46 215 -122q16 -20 16.5 -51t-5.5 -54z" />
+<glyph unicode="&#xf172;" d="M848 666q0 43 -41 66t-77 1q-43 -20 -42.5 -72.5t43.5 -70.5q39 -23 81 4t36 72zM928 682q8 -66 -36 -121t-110 -61t-119 40t-56 113q-2 49 25.5 93t72.5 64q70 31 141.5 -10t81.5 -118zM1100 1073q-20 -21 -53.5 -34t-53 -16t-63.5 -8q-155 -20 -324 0q-44 6 -63 9.5 t-52.5 16t-54.5 32.5q13 19 36 31t40 15.5t47 8.5q198 35 408 1q33 -5 51 -8.5t43 -16t39 -31.5zM1142 327q0 7 5.5 26.5t3 32t-17.5 16.5q-161 -106 -365 -106t-366 106l-12 -6l-5 -12q26 -154 41 -210q47 -81 204 -108q249 -46 428 53q34 19 49 51.5t22.5 85.5t12.5 71z M1272 1020q9 53 -8 75q-43 55 -155 88q-216 63 -487 36q-132 -12 -226 -46q-38 -15 -59.5 -25t-47 -34t-29.5 -54q8 -68 19 -138t29 -171t24 -137q1 -5 5 -31t7 -36t12 -27t22 -28q105 -80 284 -100q259 -28 440 63q24 13 39.5 23t31 29t19.5 40q48 267 80 473zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf173;" horiz-adv-x="1024" d="M944 207l80 -237q-23 -35 -111 -66t-177 -32q-104 -2 -190.5 26t-142.5 74t-95 106t-55.5 120t-16.5 118v544h-168v215q72 26 129 69.5t91 90t58 102t34 99t15 88.5q1 5 4.5 8.5t7.5 3.5h244v-424h333v-252h-334v-518q0 -30 6.5 -56t22.5 -52.5t49.5 -41.5t81.5 -14 q78 2 134 29z" />
+<glyph unicode="&#xf174;" d="M1136 75l-62 183q-44 -22 -103 -22q-36 -1 -62 10.5t-38.5 31.5t-17.5 40.5t-5 43.5v398h257v194h-256v326h-188q-8 0 -9 -10q-5 -44 -17.5 -87t-39 -95t-77 -95t-118.5 -68v-165h130v-418q0 -57 21.5 -115t65 -111t121 -85.5t176.5 -30.5q69 1 136.5 25t85.5 50z M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf175;" horiz-adv-x="768" d="M765 237q8 -19 -5 -35l-350 -384q-10 -10 -23 -10q-14 0 -24 10l-355 384q-13 16 -5 35q9 19 29 19h224v1248q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1248h224q21 0 29 -19z" />
+<glyph unicode="&#xf176;" horiz-adv-x="768" d="M765 1043q-9 -19 -29 -19h-224v-1248q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v1248h-224q-21 0 -29 19t5 35l350 384q10 10 23 10q14 0 24 -10l355 -384q13 -16 5 -35z" />
+<glyph unicode="&#xf177;" horiz-adv-x="1792" d="M1792 736v-192q0 -14 -9 -23t-23 -9h-1248v-224q0 -21 -19 -29t-35 5l-384 350q-10 10 -10 23q0 14 10 24l384 354q16 14 35 6q19 -9 19 -29v-224h1248q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf178;" horiz-adv-x="1792" d="M1728 643q0 -14 -10 -24l-384 -354q-16 -14 -35 -6q-19 9 -19 29v224h-1248q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h1248v224q0 21 19 29t35 -5l384 -350q10 -10 10 -23z" />
+<glyph unicode="&#xf179;" horiz-adv-x="1408" d="M1393 321q-39 -125 -123 -250q-129 -196 -257 -196q-49 0 -140 32q-86 32 -151 32q-61 0 -142 -33q-81 -34 -132 -34q-152 0 -301 259q-147 261 -147 503q0 228 113 374q112 144 284 144q72 0 177 -30q104 -30 138 -30q45 0 143 34q102 34 173 34q119 0 213 -65 q52 -36 104 -100q-79 -67 -114 -118q-65 -94 -65 -207q0 -124 69 -223t158 -126zM1017 1494q0 -61 -29 -136q-30 -75 -93 -138q-54 -54 -108 -72q-37 -11 -104 -17q3 149 78 257q74 107 250 148q1 -3 2.5 -11t2.5 -11q0 -4 0.5 -10t0.5 -10z" />
+<glyph unicode="&#xf17a;" horiz-adv-x="1664" d="M682 530v-651l-682 94v557h682zM682 1273v-659h-682v565zM1664 530v-786l-907 125v661h907zM1664 1408v-794h-907v669z" />
+<glyph unicode="&#xf17b;" horiz-adv-x="1408" d="M493 1053q16 0 27.5 11.5t11.5 27.5t-11.5 27.5t-27.5 11.5t-27 -11.5t-11 -27.5t11 -27.5t27 -11.5zM915 1053q16 0 27 11.5t11 27.5t-11 27.5t-27 11.5t-27.5 -11.5t-11.5 -27.5t11.5 -27.5t27.5 -11.5zM103 869q42 0 72 -30t30 -72v-430q0 -43 -29.5 -73t-72.5 -30 t-73 30t-30 73v430q0 42 30 72t73 30zM1163 850v-666q0 -46 -32 -78t-77 -32h-75v-227q0 -43 -30 -73t-73 -30t-73 30t-30 73v227h-138v-227q0 -43 -30 -73t-73 -30q-42 0 -72 30t-30 73l-1 227h-74q-46 0 -78 32t-32 78v666h918zM931 1255q107 -55 171 -153.5t64 -215.5 h-925q0 117 64 215.5t172 153.5l-71 131q-7 13 5 20q13 6 20 -6l72 -132q95 42 201 42t201 -42l72 132q7 12 20 6q12 -7 5 -20zM1408 767v-430q0 -43 -30 -73t-73 -30q-42 0 -72 30t-30 73v430q0 43 30 72.5t72 29.5q43 0 73 -29.5t30 -72.5z" />
+<glyph unicode="&#xf17c;" d="M663 1125q-11 -1 -15.5 -10.5t-8.5 -9.5q-5 -1 -5 5q0 12 19 15h10zM750 1111q-4 -1 -11.5 6.5t-17.5 4.5q24 11 32 -2q3 -6 -3 -9zM399 684q-4 1 -6 -3t-4.5 -12.5t-5.5 -13.5t-10 -13q-7 -10 -1 -12q4 -1 12.5 7t12.5 18q1 3 2 7t2 6t1.5 4.5t0.5 4v3t-1 2.5t-3 2z M1254 325q0 18 -55 42q4 15 7.5 27.5t5 26t3 21.5t0.5 22.5t-1 19.5t-3.5 22t-4 20.5t-5 25t-5.5 26.5q-10 48 -47 103t-72 75q24 -20 57 -83q87 -162 54 -278q-11 -40 -50 -42q-31 -4 -38.5 18.5t-8 83.5t-11.5 107q-9 39 -19.5 69t-19.5 45.5t-15.5 24.5t-13 15t-7.5 7 q-14 62 -31 103t-29.5 56t-23.5 33t-15 40q-4 21 6 53.5t4.5 49.5t-44.5 25q-15 3 -44.5 18t-35.5 16q-8 1 -11 26t8 51t36 27q37 3 51 -30t4 -58q-11 -19 -2 -26.5t30 -0.5q13 4 13 36v37q-5 30 -13.5 50t-21 30.5t-23.5 15t-27 7.5q-107 -8 -89 -134q0 -15 -1 -15 q-9 9 -29.5 10.5t-33 -0.5t-15.5 5q1 57 -16 90t-45 34q-27 1 -41.5 -27.5t-16.5 -59.5q-1 -15 3.5 -37t13 -37.5t15.5 -13.5q10 3 16 14q4 9 -7 8q-7 0 -15.5 14.5t-9.5 33.5q-1 22 9 37t34 14q17 0 27 -21t9.5 -39t-1.5 -22q-22 -15 -31 -29q-8 -12 -27.5 -23.5 t-20.5 -12.5q-13 -14 -15.5 -27t7.5 -18q14 -8 25 -19.5t16 -19t18.5 -13t35.5 -6.5q47 -2 102 15q2 1 23 7t34.5 10.5t29.5 13t21 17.5q9 14 20 8q5 -3 6.5 -8.5t-3 -12t-16.5 -9.5q-20 -6 -56.5 -21.5t-45.5 -19.5q-44 -19 -70 -23q-25 -5 -79 2q-10 2 -9 -2t17 -19 q25 -23 67 -22q17 1 36 7t36 14t33.5 17.5t30 17t24.5 12t17.5 2.5t8.5 -11q0 -2 -1 -4.5t-4 -5t-6 -4.5t-8.5 -5t-9 -4.5t-10 -5t-9.5 -4.5q-28 -14 -67.5 -44t-66.5 -43t-49 -1q-21 11 -63 73q-22 31 -25 22q-1 -3 -1 -10q0 -25 -15 -56.5t-29.5 -55.5t-21 -58t11.5 -63 q-23 -6 -62.5 -90t-47.5 -141q-2 -18 -1.5 -69t-5.5 -59q-8 -24 -29 -3q-32 31 -36 94q-2 28 4 56q4 19 -1 18l-4 -5q-36 -65 10 -166q5 -12 25 -28t24 -20q20 -23 104 -90.5t93 -76.5q16 -15 17.5 -38t-14 -43t-45.5 -23q8 -15 29 -44.5t28 -54t7 -70.5q46 24 7 92 q-4 8 -10.5 16t-9.5 12t-2 6q3 5 13 9.5t20 -2.5q46 -52 166 -36q133 15 177 87q23 38 34 30q12 -6 10 -52q-1 -25 -23 -92q-9 -23 -6 -37.5t24 -15.5q3 19 14.5 77t13.5 90q2 21 -6.5 73.5t-7.5 97t23 70.5q15 18 51 18q1 37 34.5 53t72.5 10.5t60 -22.5zM626 1152 q3 17 -2.5 30t-11.5 15q-9 2 -9 -7q2 -5 5 -6q10 0 7 -15q-3 -20 8 -20q3 0 3 3zM1045 955q-2 8 -6.5 11.5t-13 5t-14.5 5.5q-5 3 -9.5 8t-7 8t-5.5 6.5t-4 4t-4 -1.5q-14 -16 7 -43.5t39 -31.5q9 -1 14.5 8t3.5 20zM867 1168q0 11 -5 19.5t-11 12.5t-9 3q-14 -1 -7 -7l4 -2 q14 -4 18 -31q0 -3 8 2zM921 1401q0 2 -2.5 5t-9 7t-9.5 6q-15 15 -24 15q-9 -1 -11.5 -7.5t-1 -13t-0.5 -12.5q-1 -4 -6 -10.5t-6 -9t3 -8.5q4 -3 8 0t11 9t15 9q1 1 9 1t15 2t9 7zM1486 60q20 -12 31 -24.5t12 -24t-2.5 -22.5t-15.5 -22t-23.5 -19.5t-30 -18.5 t-31.5 -16.5t-32 -15.5t-27 -13q-38 -19 -85.5 -56t-75.5 -64q-17 -16 -68 -19.5t-89 14.5q-18 9 -29.5 23.5t-16.5 25.5t-22 19.5t-47 9.5q-44 1 -130 1q-19 0 -57 -1.5t-58 -2.5q-44 -1 -79.5 -15t-53.5 -30t-43.5 -28.5t-53.5 -11.5q-29 1 -111 31t-146 43q-19 4 -51 9.5 t-50 9t-39.5 9.5t-33.5 14.5t-17 19.5q-10 23 7 66.5t18 54.5q1 16 -4 40t-10 42.5t-4.5 36.5t10.5 27q14 12 57 14t60 12q30 18 42 35t12 51q21 -73 -32 -106q-32 -20 -83 -15q-34 3 -43 -10q-13 -15 5 -57q2 -6 8 -18t8.5 -18t4.5 -17t1 -22q0 -15 -17 -49t-14 -48 q3 -17 37 -26q20 -6 84.5 -18.5t99.5 -20.5q24 -6 74 -22t82.5 -23t55.5 -4q43 6 64.5 28t23 48t-7.5 58.5t-19 52t-20 36.5q-121 190 -169 242q-68 74 -113 40q-11 -9 -15 15q-3 16 -2 38q1 29 10 52t24 47t22 42q8 21 26.5 72t29.5 78t30 61t39 54q110 143 124 195 q-12 112 -16 310q-2 90 24 151.5t106 104.5q39 21 104 21q53 1 106 -13.5t89 -41.5q57 -42 91.5 -121.5t29.5 -147.5q-5 -95 30 -214q34 -113 133 -218q55 -59 99.5 -163t59.5 -191q8 -49 5 -84.5t-12 -55.5t-20 -22q-10 -2 -23.5 -19t-27 -35.5t-40.5 -33.5t-61 -14 q-18 1 -31.5 5t-22.5 13.5t-13.5 15.5t-11.5 20.5t-9 19.5q-22 37 -41 30t-28 -49t7 -97q20 -70 1 -195q-10 -65 18 -100.5t73 -33t85 35.5q59 49 89.5 66.5t103.5 42.5q53 18 77 36.5t18.5 34.5t-25 28.5t-51.5 23.5q-33 11 -49.5 48t-15 72.5t15.5 47.5q1 -31 8 -56.5 t14.5 -40.5t20.5 -28.5t21 -19t21.5 -13t16.5 -9.5z" />
+<glyph unicode="&#xf17d;" d="M1024 36q-42 241 -140 498h-2l-2 -1q-16 -6 -43 -16.5t-101 -49t-137 -82t-131 -114.5t-103 -148l-15 11q184 -150 418 -150q132 0 256 52zM839 643q-21 49 -53 111q-311 -93 -673 -93q-1 -7 -1 -21q0 -124 44 -236.5t124 -201.5q50 89 123.5 166.5t142.5 124.5t130.5 81 t99.5 48l37 13q4 1 13 3.5t13 4.5zM732 855q-120 213 -244 378q-138 -65 -234 -186t-128 -272q302 0 606 80zM1416 536q-210 60 -409 29q87 -239 128 -469q111 75 185 189.5t96 250.5zM611 1277q-1 0 -2 -1q1 1 2 1zM1201 1132q-185 164 -433 164q-76 0 -155 -19 q131 -170 246 -382q69 26 130 60.5t96.5 61.5t65.5 57t37.5 40.5zM1424 647q-3 232 -149 410l-1 -1q-9 -12 -19 -24.5t-43.5 -44.5t-71 -60.5t-100 -65t-131.5 -64.5q25 -53 44 -95q2 -6 6.5 -17.5t7.5 -16.5q36 5 74.5 7t73.5 2t69 -1.5t64 -4t56.5 -5.5t48 -6.5t36.5 -6 t25 -4.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf17e;" d="M1173 473q0 50 -19.5 91.5t-48.5 68.5t-73 49t-82.5 34t-87.5 23l-104 24q-30 7 -44 10.5t-35 11.5t-30 16t-16.5 21t-7.5 30q0 77 144 77q43 0 77 -12t54 -28.5t38 -33.5t40 -29t48 -12q47 0 75.5 32t28.5 77q0 55 -56 99.5t-142 67.5t-182 23q-68 0 -132 -15.5 t-119.5 -47t-89 -87t-33.5 -128.5q0 -61 19 -106.5t56 -75.5t80 -48.5t103 -32.5l146 -36q90 -22 112 -36q32 -20 32 -60q0 -39 -40 -64.5t-105 -25.5q-51 0 -91.5 16t-65 38.5t-45.5 45t-46 38.5t-54 16q-50 0 -75.5 -30t-25.5 -75q0 -92 122 -157.5t291 -65.5 q73 0 140 18.5t122.5 53.5t88.5 93.5t33 131.5zM1536 256q0 -159 -112.5 -271.5t-271.5 -112.5q-130 0 -234 80q-77 -16 -150 -16q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5q0 73 16 150q-80 104 -80 234q0 159 112.5 271.5t271.5 112.5q130 0 234 -80 q77 16 150 16q143 0 273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -73 -16 -150q80 -104 80 -234z" />
+<glyph unicode="&#xf180;" horiz-adv-x="1280" d="M1000 1102l37 194q5 23 -9 40t-35 17h-712q-23 0 -38.5 -17t-15.5 -37v-1101q0 -7 6 -1l291 352q23 26 38 33.5t48 7.5h239q22 0 37 14.5t18 29.5q24 130 37 191q4 21 -11.5 40t-36.5 19h-294q-29 0 -48 19t-19 48v42q0 29 19 47.5t48 18.5h346q18 0 35 13.5t20 29.5z M1227 1324q-15 -73 -53.5 -266.5t-69.5 -350t-35 -173.5q-6 -22 -9 -32.5t-14 -32.5t-24.5 -33t-38.5 -21t-58 -10h-271q-13 0 -22 -10q-8 -9 -426 -494q-22 -25 -58.5 -28.5t-48.5 5.5q-55 22 -55 98v1410q0 55 38 102.5t120 47.5h888q95 0 127 -53t10 -159zM1227 1324 l-158 -790q4 17 35 173.5t69.5 350t53.5 266.5z" />
+<glyph unicode="&#xf181;" d="M704 192v1024q0 14 -9 23t-23 9h-480q-14 0 -23 -9t-9 -23v-1024q0 -14 9 -23t23 -9h480q14 0 23 9t9 23zM1376 576v640q0 14 -9 23t-23 9h-480q-14 0 -23 -9t-9 -23v-640q0 -14 9 -23t23 -9h480q14 0 23 9t9 23zM1536 1344v-1408q0 -26 -19 -45t-45 -19h-1408 q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf182;" horiz-adv-x="1280" d="M1280 480q0 -40 -28 -68t-68 -28q-51 0 -80 43l-227 341h-45v-132l247 -411q9 -15 9 -33q0 -26 -19 -45t-45 -19h-192v-272q0 -46 -33 -79t-79 -33h-160q-46 0 -79 33t-33 79v272h-192q-26 0 -45 19t-19 45q0 18 9 33l247 411v132h-45l-227 -341q-29 -43 -80 -43 q-40 0 -68 28t-28 68q0 29 16 53l256 384q73 107 176 107h384q103 0 176 -107l256 -384q16 -24 16 -53zM864 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" />
+<glyph unicode="&#xf183;" horiz-adv-x="1024" d="M1024 832v-416q0 -40 -28 -68t-68 -28t-68 28t-28 68v352h-64v-912q0 -46 -33 -79t-79 -33t-79 33t-33 79v464h-64v-464q0 -46 -33 -79t-79 -33t-79 33t-33 79v912h-64v-352q0 -40 -28 -68t-68 -28t-68 28t-28 68v416q0 80 56 136t136 56h640q80 0 136 -56t56 -136z M736 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" />
+<glyph unicode="&#xf184;" d="M773 234l350 473q16 22 24.5 59t-6 85t-61.5 79q-40 26 -83 25.5t-73.5 -17.5t-54.5 -45q-36 -40 -96 -40q-59 0 -95 40q-24 28 -54.5 45t-73.5 17.5t-84 -25.5q-46 -31 -60.5 -79t-6 -85t24.5 -59zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf185;" horiz-adv-x="1792" d="M1472 640q0 117 -45.5 223.5t-123 184t-184 123t-223.5 45.5t-223.5 -45.5t-184 -123t-123 -184t-45.5 -223.5t45.5 -223.5t123 -184t184 -123t223.5 -45.5t223.5 45.5t184 123t123 184t45.5 223.5zM1748 363q-4 -15 -20 -20l-292 -96v-306q0 -16 -13 -26q-15 -10 -29 -4 l-292 94l-180 -248q-10 -13 -26 -13t-26 13l-180 248l-292 -94q-14 -6 -29 4q-13 10 -13 26v306l-292 96q-16 5 -20 20q-5 17 4 29l180 248l-180 248q-9 13 -4 29q4 15 20 20l292 96v306q0 16 13 26q15 10 29 4l292 -94l180 248q9 12 26 12t26 -12l180 -248l292 94 q14 6 29 -4q13 -10 13 -26v-306l292 -96q16 -5 20 -20q5 -16 -4 -29l-180 -248l180 -248q9 -12 4 -29z" />
+<glyph unicode="&#xf186;" d="M1262 233q-54 -9 -110 -9q-182 0 -337 90t-245 245t-90 337q0 192 104 357q-201 -60 -328.5 -229t-127.5 -384q0 -130 51 -248.5t136.5 -204t204 -136.5t248.5 -51q144 0 273.5 61.5t220.5 171.5zM1465 318q-94 -203 -283.5 -324.5t-413.5 -121.5q-156 0 -298 61 t-245 164t-164 245t-61 298q0 153 57.5 292.5t156 241.5t235.5 164.5t290 68.5q44 2 61 -39q18 -41 -15 -72q-86 -78 -131.5 -181.5t-45.5 -218.5q0 -148 73 -273t198 -198t273 -73q118 0 228 51q41 18 72 -13q14 -14 17.5 -34t-4.5 -38z" />
+<glyph unicode="&#xf187;" horiz-adv-x="1792" d="M1088 704q0 26 -19 45t-45 19h-256q-26 0 -45 -19t-19 -45t19 -45t45 -19h256q26 0 45 19t19 45zM1664 896v-960q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v960q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1728 1344v-256q0 -26 -19 -45t-45 -19h-1536 q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1536q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf188;" horiz-adv-x="1664" d="M1632 576q0 -26 -19 -45t-45 -19h-224q0 -171 -67 -290l208 -209q19 -19 19 -45t-19 -45q-18 -19 -45 -19t-45 19l-198 197q-5 -5 -15 -13t-42 -28.5t-65 -36.5t-82 -29t-97 -13v896h-128v-896q-51 0 -101.5 13.5t-87 33t-66 39t-43.5 32.5l-15 14l-183 -207 q-20 -21 -48 -21q-24 0 -43 16q-19 18 -20.5 44.5t15.5 46.5l202 227q-58 114 -58 274h-224q-26 0 -45 19t-19 45t19 45t45 19h224v294l-173 173q-19 19 -19 45t19 45t45 19t45 -19l173 -173h844l173 173q19 19 45 19t45 -19t19 -45t-19 -45l-173 -173v-294h224q26 0 45 -19 t19 -45zM1152 1152h-640q0 133 93.5 226.5t226.5 93.5t226.5 -93.5t93.5 -226.5z" />
+<glyph unicode="&#xf189;" horiz-adv-x="1920" d="M1917 1016q23 -64 -150 -294q-24 -32 -65 -85q-78 -100 -90 -131q-17 -41 14 -81q17 -21 81 -82h1l1 -1l1 -1l2 -2q141 -131 191 -221q3 -5 6.5 -12.5t7 -26.5t-0.5 -34t-25 -27.5t-59 -12.5l-256 -4q-24 -5 -56 5t-52 22l-20 12q-30 21 -70 64t-68.5 77.5t-61 58 t-56.5 15.5q-3 -1 -8 -3.5t-17 -14.5t-21.5 -29.5t-17 -52t-6.5 -77.5q0 -15 -3.5 -27.5t-7.5 -18.5l-4 -5q-18 -19 -53 -22h-115q-71 -4 -146 16.5t-131.5 53t-103 66t-70.5 57.5l-25 24q-10 10 -27.5 30t-71.5 91t-106 151t-122.5 211t-130.5 272q-6 16 -6 27t3 16l4 6 q15 19 57 19l274 2q12 -2 23 -6.5t16 -8.5l5 -3q16 -11 24 -32q20 -50 46 -103.5t41 -81.5l16 -29q29 -60 56 -104t48.5 -68.5t41.5 -38.5t34 -14t27 5q2 1 5 5t12 22t13.5 47t9.5 81t0 125q-2 40 -9 73t-14 46l-6 12q-25 34 -85 43q-13 2 5 24q17 19 38 30q53 26 239 24 q82 -1 135 -13q20 -5 33.5 -13.5t20.5 -24t10.5 -32t3.5 -45.5t-1 -55t-2.5 -70.5t-1.5 -82.5q0 -11 -1 -42t-0.5 -48t3.5 -40.5t11.5 -39t22.5 -24.5q8 -2 17 -4t26 11t38 34.5t52 67t68 107.5q60 104 107 225q4 10 10 17.5t11 10.5l4 3l5 2.5t13 3t20 0.5l288 2 q39 5 64 -2.5t31 -16.5z" />
+<glyph unicode="&#xf18a;" horiz-adv-x="1792" d="M675 252q21 34 11 69t-45 50q-34 14 -73 1t-60 -46q-22 -34 -13 -68.5t43 -50.5t74.5 -2.5t62.5 47.5zM769 373q8 13 3.5 26.5t-17.5 18.5q-14 5 -28.5 -0.5t-21.5 -18.5q-17 -31 13 -45q14 -5 29 0.5t22 18.5zM943 266q-45 -102 -158 -150t-224 -12 q-107 34 -147.5 126.5t6.5 187.5q47 93 151.5 139t210.5 19q111 -29 158.5 -119.5t2.5 -190.5zM1255 426q-9 96 -89 170t-208.5 109t-274.5 21q-223 -23 -369.5 -141.5t-132.5 -264.5q9 -96 89 -170t208.5 -109t274.5 -21q223 23 369.5 141.5t132.5 264.5zM1563 422 q0 -68 -37 -139.5t-109 -137t-168.5 -117.5t-226 -83t-270.5 -31t-275 33.5t-240.5 93t-171.5 151t-65 199.5q0 115 69.5 245t197.5 258q169 169 341.5 236t246.5 -7q65 -64 20 -209q-4 -14 -1 -20t10 -7t14.5 0.5t13.5 3.5l6 2q139 59 246 59t153 -61q45 -63 0 -178 q-2 -13 -4.5 -20t4.5 -12.5t12 -7.5t17 -6q57 -18 103 -47t80 -81.5t34 -116.5zM1489 1046q42 -47 54.5 -108.5t-6.5 -117.5q-8 -23 -29.5 -34t-44.5 -4q-23 8 -34 29.5t-4 44.5q20 63 -24 111t-107 35q-24 -5 -45 8t-25 37q-5 24 8 44.5t37 25.5q60 13 119 -5.5t101 -65.5z M1670 1209q87 -96 112.5 -222.5t-13.5 -241.5q-9 -27 -34 -40t-52 -4t-40 34t-5 52q28 82 10 172t-80 158q-62 69 -148 95.5t-173 8.5q-28 -6 -52 9.5t-30 43.5t9.5 51.5t43.5 29.5q123 26 244 -11.5t208 -134.5z" />
+<glyph unicode="&#xf18b;" d="M1133 -34q-171 -94 -368 -94q-196 0 -367 94q138 87 235.5 211t131.5 268q35 -144 132.5 -268t235.5 -211zM638 1394v-485q0 -252 -126.5 -459.5t-330.5 -306.5q-181 215 -181 495q0 187 83.5 349.5t229.5 269.5t325 137zM1536 638q0 -280 -181 -495 q-204 99 -330.5 306.5t-126.5 459.5v485q179 -30 325 -137t229.5 -269.5t83.5 -349.5z" />
+<glyph unicode="&#xf18c;" horiz-adv-x="1408" d="M1402 433q-32 -80 -76 -138t-91 -88.5t-99 -46.5t-101.5 -14.5t-96.5 8.5t-86.5 22t-69.5 27.5t-46 22.5l-17 10q-113 -228 -289.5 -359.5t-384.5 -132.5q-19 0 -32 13t-13 32t13 31.5t32 12.5q173 1 322.5 107.5t251.5 294.5q-36 -14 -72 -23t-83 -13t-91 2.5t-93 28.5 t-92 59t-84.5 100t-74.5 146q114 47 214 57t167.5 -7.5t124.5 -56.5t88.5 -77t56.5 -82q53 131 79 291q-7 -1 -18 -2.5t-46.5 -2.5t-69.5 0.5t-81.5 10t-88.5 23t-84 42.5t-75 65t-54.5 94.5t-28.5 127.5q70 28 133.5 36.5t112.5 -1t92 -30t73.5 -50t56 -61t42 -63t27.5 -56 t16 -39.5l4 -16q12 122 12 195q-8 6 -21.5 16t-49 44.5t-63.5 71.5t-54 93t-33 112.5t12 127t70 138.5q73 -25 127.5 -61.5t84.5 -76.5t48 -85t20.5 -89t-0.5 -85.5t-13 -76.5t-19 -62t-17 -42l-7 -15q1 -5 1 -50.5t-1 -71.5q3 7 10 18.5t30.5 43t50.5 58t71 55.5t91.5 44.5 t112 14.5t132.5 -24q-2 -78 -21.5 -141.5t-50 -104.5t-69.5 -71.5t-81.5 -45.5t-84.5 -24t-80 -9.5t-67.5 1t-46.5 4.5l-17 3q-23 -147 -73 -283q6 7 18 18.5t49.5 41t77.5 52.5t99.5 42t117.5 20t129 -23.5t137 -77.5z" />
+<glyph unicode="&#xf18d;" horiz-adv-x="1280" d="M1259 283v-66q0 -85 -57.5 -144.5t-138.5 -59.5h-57l-260 -269v269h-529q-81 0 -138.5 59.5t-57.5 144.5v66h1238zM1259 609v-255h-1238v255h1238zM1259 937v-255h-1238v255h1238zM1259 1077v-67h-1238v67q0 84 57.5 143.5t138.5 59.5h846q81 0 138.5 -59.5t57.5 -143.5z " />
+<glyph unicode="&#xf18e;" d="M1152 640q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192h-352q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h352v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198 t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf190;" d="M1152 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-352v-192q0 -14 -9 -23t-23 -9q-12 0 -24 10l-319 319q-9 9 -9 23t9 23l320 320q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5v-192h352q13 0 22.5 -9.5t9.5 -22.5zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198 t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf191;" d="M1024 960v-640q0 -26 -19 -45t-45 -19q-20 0 -37 12l-448 320q-27 19 -27 52t27 52l448 320q17 12 37 12q26 0 45 -19t19 -45zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5z M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf192;" d="M1024 640q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5 t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf193;" horiz-adv-x="1664" d="M1023 349l102 -204q-58 -179 -210 -290t-339 -111q-156 0 -288.5 77.5t-210 210t-77.5 288.5q0 181 104.5 330t274.5 211l17 -131q-122 -54 -195 -165.5t-73 -244.5q0 -185 131.5 -316.5t316.5 -131.5q126 0 232.5 65t165 175.5t49.5 236.5zM1571 249l58 -114l-256 -128 q-13 -7 -29 -7q-40 0 -57 35l-239 477h-472q-24 0 -42.5 16.5t-21.5 40.5l-96 779q-2 16 6 42q14 51 57 82.5t97 31.5q66 0 113 -47t47 -113q0 -69 -52 -117.5t-120 -41.5l37 -289h423v-128h-407l16 -128h455q40 0 57 -35l228 -455z" />
+<glyph unicode="&#xf194;" d="M1254 899q16 85 -21 132q-52 65 -187 45q-17 -3 -41 -12.5t-57.5 -30.5t-64.5 -48.5t-59.5 -70t-44.5 -91.5q80 7 113.5 -16t26.5 -99q-5 -52 -52 -143q-43 -78 -71 -99q-44 -32 -87 14q-23 24 -37.5 64.5t-19 73t-10 84t-8.5 71.5q-23 129 -34 164q-12 37 -35.5 69 t-50.5 40q-57 16 -127 -25q-54 -32 -136.5 -106t-122.5 -102v-7q16 -8 25.5 -26t21.5 -20q21 -3 54.5 8.5t58 10.5t41.5 -30q11 -18 18.5 -38.5t15 -48t12.5 -40.5q17 -46 53 -187q36 -146 57 -197q42 -99 103 -125q43 -12 85 -1.5t76 31.5q131 77 250 237 q104 139 172.5 292.5t82.5 226.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf195;" horiz-adv-x="1152" d="M1152 704q0 -191 -94.5 -353t-256.5 -256.5t-353 -94.5h-160q-14 0 -23 9t-9 23v611l-215 -66q-3 -1 -9 -1q-10 0 -19 6q-13 10 -13 26v128q0 23 23 31l233 71v93l-215 -66q-3 -1 -9 -1q-10 0 -19 6q-13 10 -13 26v128q0 23 23 31l233 71v250q0 14 9 23t23 9h160 q14 0 23 -9t9 -23v-181l375 116q15 5 28 -5t13 -26v-128q0 -23 -23 -31l-393 -121v-93l375 116q15 5 28 -5t13 -26v-128q0 -23 -23 -31l-393 -121v-487q188 13 318 151t130 328q0 14 9 23t23 9h160q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf196;" horiz-adv-x="1408" d="M1152 736v-64q0 -14 -9 -23t-23 -9h-352v-352q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v352h-352q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h352v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-352h352q14 0 23 -9t9 -23zM1280 288v832q0 66 -47 113t-113 47h-832 q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf197;" horiz-adv-x="2176" d="M620 416q-110 -64 -268 -64h-128v64h-64q-13 0 -22.5 23.5t-9.5 56.5q0 24 7 49q-58 2 -96.5 10.5t-38.5 20.5t38.5 20.5t96.5 10.5q-7 25 -7 49q0 33 9.5 56.5t22.5 23.5h64v64h128q158 0 268 -64h1113q42 -7 106.5 -18t80.5 -14q89 -15 150 -40.5t83.5 -47.5t22.5 -40 t-22.5 -40t-83.5 -47.5t-150 -40.5q-16 -3 -80.5 -14t-106.5 -18h-1113zM1739 668q53 -36 53 -92t-53 -92l81 -30q68 48 68 122t-68 122zM625 400h1015q-217 -38 -456 -80q-57 0 -113 -24t-83 -48l-28 -24l-288 -288q-26 -26 -70.5 -45t-89.5 -19h-96l-93 464h29 q157 0 273 64zM352 816h-29l93 464h96q46 0 90 -19t70 -45l288 -288q4 -4 11 -10.5t30.5 -23t48.5 -29t61.5 -23t72.5 -10.5l456 -80h-1015q-116 64 -273 64z" />
+<glyph unicode="&#xf198;" horiz-adv-x="1664" d="M1519 760q62 0 103.5 -40.5t41.5 -101.5q0 -97 -93 -130l-172 -59l56 -167q7 -21 7 -47q0 -59 -42 -102t-101 -43q-47 0 -85.5 27t-53.5 72l-55 165l-310 -106l55 -164q8 -24 8 -47q0 -59 -42 -102t-102 -43q-47 0 -85 27t-53 72l-55 163l-153 -53q-29 -9 -50 -9 q-61 0 -101.5 40t-40.5 101q0 47 27.5 85t71.5 53l156 53l-105 313l-156 -54q-26 -8 -48 -8q-60 0 -101 40.5t-41 100.5q0 47 27.5 85t71.5 53l157 53l-53 159q-8 24 -8 47q0 60 42 102.5t102 42.5q47 0 85 -27t53 -72l54 -160l310 105l-54 160q-8 24 -8 47q0 59 42.5 102 t101.5 43q47 0 85.5 -27.5t53.5 -71.5l53 -161l162 55q21 6 43 6q60 0 102.5 -39.5t42.5 -98.5q0 -45 -30 -81.5t-74 -51.5l-157 -54l105 -316l164 56q24 8 46 8zM725 498l310 105l-105 315l-310 -107z" />
+<glyph unicode="&#xf199;" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM1280 352v436q-31 -35 -64 -55q-34 -22 -132.5 -85t-151.5 -99q-98 -69 -164 -69v0v0q-66 0 -164 69 q-46 32 -141.5 92.5t-142.5 92.5q-12 8 -33 27t-31 27v-436q0 -40 28 -68t68 -28h832q40 0 68 28t28 68zM1280 925q0 41 -27.5 70t-68.5 29h-832q-40 0 -68 -28t-28 -68q0 -37 30.5 -76.5t67.5 -64.5q47 -32 137.5 -89t129.5 -83q3 -2 17 -11.5t21 -14t21 -13t23.5 -13 t21.5 -9.5t22.5 -7.5t20.5 -2.5t20.5 2.5t22.5 7.5t21.5 9.5t23.5 13t21 13t21 14t17 11.5l267 174q35 23 66.5 62.5t31.5 73.5z" />
+<glyph unicode="&#xf19a;" horiz-adv-x="1792" d="M127 640q0 163 67 313l367 -1005q-196 95 -315 281t-119 411zM1415 679q0 -19 -2.5 -38.5t-10 -49.5t-11.5 -44t-17.5 -59t-17.5 -58l-76 -256l-278 826q46 3 88 8q19 2 26 18.5t-2.5 31t-28.5 13.5l-205 -10q-75 1 -202 10q-12 1 -20.5 -5t-11.5 -15t-1.5 -18.5t9 -16.5 t19.5 -8l80 -8l120 -328l-168 -504l-280 832q46 3 88 8q19 2 26 18.5t-2.5 31t-28.5 13.5l-205 -10q-7 0 -23 0.5t-26 0.5q105 160 274.5 253.5t367.5 93.5q147 0 280.5 -53t238.5 -149h-10q-55 0 -92 -40.5t-37 -95.5q0 -12 2 -24t4 -21.5t8 -23t9 -21t12 -22.5t12.5 -21 t14.5 -24t14 -23q63 -107 63 -212zM909 573l237 -647q1 -6 5 -11q-126 -44 -255 -44q-112 0 -217 32zM1570 1009q95 -174 95 -369q0 -209 -104 -385.5t-279 -278.5l235 678q59 169 59 276q0 42 -6 79zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286 t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM896 -215q173 0 331.5 68t273 182.5t182.5 273t68 331.5t-68 331.5t-182.5 273t-273 182.5t-331.5 68t-331.5 -68t-273 -182.5t-182.5 -273t-68 -331.5t68 -331.5t182.5 -273 t273 -182.5t331.5 -68z" />
+<glyph unicode="&#xf19b;" horiz-adv-x="1792" d="M1086 1536v-1536l-272 -128q-228 20 -414 102t-293 208.5t-107 272.5q0 140 100.5 263.5t275 205.5t391.5 108v-172q-217 -38 -356.5 -150t-139.5 -255q0 -152 154.5 -267t388.5 -145v1360zM1755 954l37 -390l-525 114l147 83q-119 70 -280 99v172q277 -33 481 -157z" />
+<glyph unicode="&#xf19c;" horiz-adv-x="2048" d="M960 1536l960 -384v-128h-128q0 -26 -20.5 -45t-48.5 -19h-1526q-28 0 -48.5 19t-20.5 45h-128v128zM256 896h256v-768h128v768h256v-768h128v768h256v-768h128v768h256v-768h59q28 0 48.5 -19t20.5 -45v-64h-1664v64q0 26 20.5 45t48.5 19h59v768zM1851 -64 q28 0 48.5 -19t20.5 -45v-128h-1920v128q0 26 20.5 45t48.5 19h1782z" />
+<glyph unicode="&#xf19d;" horiz-adv-x="2304" d="M1774 700l18 -316q4 -69 -82 -128t-235 -93.5t-323 -34.5t-323 34.5t-235 93.5t-82 128l18 316l574 -181q22 -7 48 -7t48 7zM2304 1024q0 -23 -22 -31l-1120 -352q-4 -1 -10 -1t-10 1l-652 206q-43 -34 -71 -111.5t-34 -178.5q63 -36 63 -109q0 -69 -58 -107l58 -433 q2 -14 -8 -25q-9 -11 -24 -11h-192q-15 0 -24 11q-10 11 -8 25l58 433q-58 38 -58 107q0 73 65 111q11 207 98 330l-333 104q-22 8 -22 31t22 31l1120 352q4 1 10 1t10 -1l1120 -352q22 -8 22 -31z" />
+<glyph unicode="&#xf19e;" d="M859 579l13 -707q-62 11 -105 11q-41 0 -105 -11l13 707q-40 69 -168.5 295.5t-216.5 374.5t-181 287q58 -15 108 -15q43 0 111 15q63 -111 133.5 -229.5t167 -276.5t138.5 -227q37 61 109.5 177.5t117.5 190t105 176t107 189.5q54 -14 107 -14q56 0 114 14v0 q-28 -39 -60 -88.5t-49.5 -78.5t-56.5 -96t-49 -84q-146 -248 -353 -610z" />
+<glyph unicode="&#xf1a0;" horiz-adv-x="1280" d="M981 197q0 25 -7 49t-14.5 42t-27 41.5t-29.5 35t-38.5 34.5t-36.5 29t-41.5 30t-36.5 26q-16 2 -49 2q-53 0 -104.5 -7t-107 -25t-97 -46t-68.5 -74.5t-27 -105.5q0 -56 23.5 -102t61 -75.5t87 -50t100 -29t101.5 -8.5q58 0 111.5 13t99 39t73 73t27.5 109zM864 1055 q0 59 -17 125.5t-48 129t-84 103.5t-117 41q-42 0 -82.5 -19.5t-66.5 -52.5q-46 -59 -46 -160q0 -46 10 -97.5t31.5 -103t52 -92.5t75 -67t96.5 -26q37 0 77.5 16.5t65.5 43.5q53 56 53 159zM752 1536h417l-137 -88h-132q75 -63 113 -133t38 -160q0 -72 -24.5 -129.5 t-59.5 -93t-69.5 -65t-59 -61.5t-24.5 -66q0 -36 32 -70.5t77 -68t90.5 -73.5t77.5 -104t32 -142q0 -91 -49 -173q-71 -122 -209.5 -179.5t-298.5 -57.5q-132 0 -246.5 41.5t-172.5 137.5q-36 59 -36 131q0 81 44.5 150t118.5 115q131 82 404 100q-32 41 -47.5 73.5 t-15.5 73.5q0 40 21 85q-46 -4 -68 -4q-148 0 -249.5 96.5t-101.5 244.5q0 82 36 159t99 131q76 66 182 98t218 32z" />
+<glyph unicode="&#xf1a1;" horiz-adv-x="1984" d="M831 572q0 -56 -40.5 -96t-96.5 -40q-57 0 -98 40t-41 96q0 57 41.5 98t97.5 41t96.5 -41t40.5 -98zM1292 711q56 0 96.5 -41t40.5 -98q0 -56 -40.5 -96t-96.5 -40q-57 0 -98 40t-41 96q0 57 41.5 98t97.5 41zM1984 722q0 -62 -31 -114t-83 -82q5 -33 5 -61 q0 -121 -68.5 -230.5t-197.5 -193.5q-125 -82 -285.5 -125.5t-335.5 -43.5q-176 0 -336.5 43.5t-284.5 125.5q-129 84 -197.5 193t-68.5 231q0 29 5 66q-48 31 -77 81.5t-29 109.5q0 94 66 160t160 66q83 0 148 -55q248 158 592 164l134 423q4 14 17.5 21.5t28.5 4.5 l347 -82q22 50 68.5 81t102.5 31q77 0 131.5 -54.5t54.5 -131.5t-54.5 -132t-131.5 -55q-76 0 -130.5 54t-55.5 131l-315 74l-116 -366q327 -14 560 -166q64 58 151 58q94 0 160 -66t66 -160zM1664 1459q-45 0 -77 -32t-32 -77t32 -77t77 -32t77 32t32 77t-32 77t-77 32z M77 722q0 -67 51 -111q49 131 180 235q-36 25 -82 25q-62 0 -105.5 -43.5t-43.5 -105.5zM1567 105q112 73 171.5 166t59.5 194t-59.5 193.5t-171.5 165.5q-116 75 -265.5 115.5t-313.5 40.5t-313.5 -40.5t-265.5 -115.5q-112 -73 -171.5 -165.5t-59.5 -193.5t59.5 -194 t171.5 -166q116 -75 265.5 -115.5t313.5 -40.5t313.5 40.5t265.5 115.5zM1850 605q57 46 57 117q0 62 -43.5 105.5t-105.5 43.5q-49 0 -86 -28q131 -105 178 -238zM1258 237q11 11 27 11t27 -11t11 -27.5t-11 -27.5q-99 -99 -319 -99h-2q-220 0 -319 99q-11 11 -11 27.5 t11 27.5t27 11t27 -11q77 -77 265 -77h2q188 0 265 77z" />
+<glyph unicode="&#xf1a2;" d="M950 393q7 7 17.5 7t17.5 -7t7 -18t-7 -18q-65 -64 -208 -64h-1h-1q-143 0 -207 64q-8 7 -8 18t8 18q7 7 17.5 7t17.5 -7q49 -51 172 -51h1h1q122 0 173 51zM671 613q0 -37 -26 -64t-63 -27t-63 27t-26 64t26 63t63 26t63 -26t26 -63zM1214 1049q-29 0 -50 21t-21 50 q0 30 21 51t50 21q30 0 51 -21t21 -51q0 -29 -21 -50t-51 -21zM1216 1408q132 0 226 -94t94 -227v-894q0 -133 -94 -227t-226 -94h-896q-132 0 -226 94t-94 227v894q0 133 94 227t226 94h896zM1321 596q35 14 57 45.5t22 70.5q0 51 -36 87.5t-87 36.5q-60 0 -98 -48 q-151 107 -375 115l83 265l206 -49q1 -50 36.5 -85t84.5 -35q50 0 86 35.5t36 85.5t-36 86t-86 36q-36 0 -66 -20.5t-45 -53.5l-227 54q-9 2 -17.5 -2.5t-11.5 -14.5l-95 -302q-224 -4 -381 -113q-36 43 -93 43q-51 0 -87 -36.5t-36 -87.5q0 -37 19.5 -67.5t52.5 -45.5 q-7 -25 -7 -54q0 -98 74 -181.5t201.5 -132t278.5 -48.5q150 0 277.5 48.5t201.5 132t74 181.5q0 27 -6 54zM971 702q37 0 63 -26t26 -63t-26 -64t-63 -27t-63 27t-26 64t26 63t63 26z" />
+<glyph unicode="&#xf1a3;" d="M866 697l90 27v62q0 79 -58 135t-138 56t-138 -55.5t-58 -134.5v-283q0 -20 -14 -33.5t-33 -13.5t-32.5 13.5t-13.5 33.5v120h-151v-122q0 -82 57.5 -139t139.5 -57q81 0 138.5 56.5t57.5 136.5v280q0 19 13.5 33t33.5 14q19 0 32.5 -14t13.5 -33v-54zM1199 502v122h-150 v-126q0 -20 -13.5 -33.5t-33.5 -13.5q-19 0 -32.5 14t-13.5 33v123l-90 -26l-60 28v-123q0 -80 58 -137t139 -57t138.5 57t57.5 139zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103 t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf1a4;" horiz-adv-x="1920" d="M1062 824v118q0 42 -30 72t-72 30t-72 -30t-30 -72v-612q0 -175 -126 -299t-303 -124q-178 0 -303.5 125.5t-125.5 303.5v266h328v-262q0 -43 30 -72.5t72 -29.5t72 29.5t30 72.5v620q0 171 126.5 292t301.5 121q176 0 302 -122t126 -294v-136l-195 -58zM1592 602h328 v-266q0 -178 -125.5 -303.5t-303.5 -125.5q-177 0 -303 124.5t-126 300.5v268l131 -61l195 58v-270q0 -42 30 -71.5t72 -29.5t72 29.5t30 71.5v275z" />
+<glyph unicode="&#xf1a5;" d="M1472 160v480h-704v704h-480q-93 0 -158.5 -65.5t-65.5 -158.5v-480h704v-704h480q93 0 158.5 65.5t65.5 158.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z" />
+<glyph unicode="&#xf1a6;" horiz-adv-x="2048" d="M328 1254h204v-983h-532v697h328v286zM328 435v369h-123v-369h123zM614 968v-697h205v697h-205zM614 1254v-204h205v204h-205zM901 968h533v-942h-533v163h328v82h-328v697zM1229 435v369h-123v-369h123zM1516 968h532v-942h-532v163h327v82h-327v697zM1843 435v369h-123 v-369h123z" />
+<glyph unicode="&#xf1a7;" d="M1046 516q0 -64 -38 -109t-91 -45q-43 0 -70 15v277q28 17 70 17q53 0 91 -45.5t38 -109.5zM703 944q0 -64 -38 -109.5t-91 -45.5q-43 0 -70 15v277q28 17 70 17q53 0 91 -45t38 -109zM1265 513q0 134 -88 229t-213 95q-20 0 -39 -3q-23 -78 -78 -136q-87 -95 -211 -101 v-636l211 41v206q51 -19 117 -19q125 0 213 95t88 229zM922 940q0 134 -88.5 229t-213.5 95q-74 0 -141 -36h-186v-840l211 41v206q55 -19 116 -19q125 0 213.5 95t88.5 229zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960 q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf1a8;" horiz-adv-x="2038" d="M1222 607q75 3 143.5 -20.5t118 -58.5t101 -94.5t84 -108t75.5 -120.5q33 -56 78.5 -109t75.5 -80.5t99 -88.5q-48 -30 -108.5 -57.5t-138.5 -59t-114 -47.5q-44 37 -74 115t-43.5 164.5t-33 180.5t-42.5 168.5t-72.5 123t-122.5 48.5l-10 -2l-6 -4q4 -5 13 -14 q6 -5 28 -23.5t25.5 -22t19 -18t18 -20.5t11.5 -21t10.5 -27.5t4.5 -31t4 -40.5l1 -33q1 -26 -2.5 -57.5t-7.5 -52t-12.5 -58.5t-11.5 -53q-35 1 -101 -9.5t-98 -10.5q-39 0 -72 10q-2 16 -2 47q0 74 3 96q2 13 31.5 41.5t57 59t26.5 51.5q-24 2 -43 -24 q-36 -53 -111.5 -99.5t-136.5 -46.5q-25 0 -75.5 63t-106.5 139.5t-84 96.5q-6 4 -27 30q-482 -112 -513 -112q-16 0 -28 11t-12 27q0 15 8.5 26.5t22.5 14.5l486 106q-8 14 -8 25t5.5 17.5t16 11.5t20 7t23 4.5t18.5 4.5q4 1 15.5 7.5t17.5 6.5q15 0 28 -16t20 -33 q163 37 172 37q17 0 29.5 -11t12.5 -28q0 -15 -8.5 -26t-23.5 -14l-182 -40l-1 -16q-1 -26 81.5 -117.5t104.5 -91.5q47 0 119 80t72 129q0 36 -23.5 53t-51 18.5t-51 11.5t-23.5 34q0 16 10 34l-68 19q43 44 43 117q0 26 -5 58q82 16 144 16q44 0 71.5 -1.5t48.5 -8.5 t31 -13.5t20.5 -24.5t15.5 -33.5t17 -47.5t24 -60l50 25q-3 -40 -23 -60t-42.5 -21t-40 -6.5t-16.5 -20.5zM1282 842q-5 5 -13.5 15.5t-12 14.5t-10.5 11.5t-10 10.5l-8 8t-8.5 7.5t-8 5t-8.5 4.5q-7 3 -14.5 5t-20.5 2.5t-22 0.5h-32.5h-37.5q-126 0 -217 -43 q16 30 36 46.5t54 29.5t65.5 36t46 36.5t50 55t43.5 50.5q12 -9 28 -31.5t32 -36.5t38 -13l12 1v-76l22 -1q247 95 371 190q28 21 50 39t42.5 37.5t33 31t29.5 34t24 31t24.5 37t23 38t27 47.5t29.5 53l7 9q-2 -53 -43 -139q-79 -165 -205 -264t-306 -142q-14 -3 -42 -7.5 t-50 -9.5t-39 -14q3 -19 24.5 -46t21.5 -34q0 -11 -26 -30zM1061 -79q39 26 131.5 47.5t146.5 21.5q9 0 22.5 -15.5t28 -42.5t26 -50t24 -51t14.5 -33q-121 -45 -244 -45q-61 0 -125 11zM822 568l48 12l109 -177l-73 -48zM1323 51q3 -15 3 -16q0 -7 -17.5 -14.5t-46 -13 t-54 -9.5t-53.5 -7.5t-32 -4.5l-7 43q21 2 60.5 8.5t72 10t60.5 3.5h14zM866 679l-96 -20l-6 17q10 1 32.5 7t34.5 6q19 0 35 -10zM1061 45h31l10 -83l-41 -12v95zM1950 1535v1v-1zM1950 1535l-1 -5l-2 -2l1 3zM1950 1535l1 1z" />
+<glyph unicode="&#xf1a9;" d="M1167 -50q-5 19 -24 5q-30 -22 -87 -39t-131 -17q-129 0 -193 49q-5 4 -13 4q-11 0 -26 -12q-7 -6 -7.5 -16t7.5 -20q34 -32 87.5 -46t102.5 -12.5t99 4.5q41 4 84.5 20.5t65 30t28.5 20.5q12 12 7 29zM1128 65q-19 47 -39 61q-23 15 -76 15q-47 0 -71 -10 q-29 -12 -78 -56q-26 -24 -12 -44q9 -8 17.5 -4.5t31.5 23.5q3 2 10.5 8.5t10.5 8.5t10 7t11.5 7t12.5 5t15 4.5t16.5 2.5t20.5 1q27 0 44.5 -7.5t23 -14.5t13.5 -22q10 -17 12.5 -20t12.5 1q23 12 14 34zM1483 346q0 22 -5 44.5t-16.5 45t-34 36.5t-52.5 14 q-33 0 -97 -41.5t-129 -83.5t-101 -42q-27 -1 -63.5 19t-76 49t-83.5 58t-100 49t-111 19q-115 -1 -197 -78.5t-84 -178.5q-2 -112 74 -164q29 -20 62.5 -28.5t103.5 -8.5q57 0 132 32.5t134 71t120 70.5t93 31q26 -1 65 -31.5t71.5 -67t68 -67.5t55.5 -32q35 -3 58.5 14 t55.5 63q28 41 42.5 101t14.5 106zM1536 506q0 -164 -62 -304.5t-166 -236t-242.5 -149.5t-290.5 -54t-293 57.5t-247.5 157t-170.5 241.5t-64 302q0 89 19.5 172.5t49 145.5t70.5 118.5t78.5 94t78.5 69.5t64.5 46.5t42.5 24.5q14 8 51 26.5t54.5 28.5t48 30t60.5 44 q36 28 58 72.5t30 125.5q129 -155 186 -193q44 -29 130 -68t129 -66q21 -13 39 -25t60.5 -46.5t76 -70.5t75 -95t69 -122t47 -148.5t19.5 -177.5z" />
+<glyph unicode="&#xf1aa;" d="M1070 463l-160 -160l-151 -152l-30 -30q-65 -64 -151.5 -87t-171.5 -2q-16 -70 -72 -115t-129 -45q-85 0 -145 60.5t-60 145.5q0 72 44.5 128t113.5 72q-22 86 1 173t88 152l12 12l151 -152l-11 -11q-37 -37 -37 -89t37 -90q37 -37 89 -37t89 37l30 30l151 152l161 160z M729 1145l12 -12l-152 -152l-12 12q-37 37 -89 37t-89 -37t-37 -89.5t37 -89.5l29 -29l152 -152l160 -160l-151 -152l-161 160l-151 152l-30 30q-68 67 -90 159.5t5 179.5q-70 15 -115 71t-45 129q0 85 60 145.5t145 60.5q76 0 133.5 -49t69.5 -123q84 20 169.5 -3.5 t149.5 -87.5zM1536 78q0 -85 -60 -145.5t-145 -60.5q-74 0 -131 47t-71 118q-86 -28 -179.5 -6t-161.5 90l-11 12l151 152l12 -12q37 -37 89 -37t89 37t37 89t-37 89l-30 30l-152 152l-160 160l152 152l160 -160l152 -152l29 -30q64 -64 87.5 -150.5t2.5 -171.5 q76 -11 126.5 -68.5t50.5 -134.5zM1534 1202q0 -77 -51 -135t-127 -69q26 -85 3 -176.5t-90 -158.5l-12 -12l-151 152l12 12q37 37 37 89t-37 89t-89 37t-89 -37l-30 -30l-152 -152l-160 -160l-152 152l161 160l152 152l29 30q67 67 159 89.5t178 -3.5q11 75 68.5 126 t135.5 51q85 0 145 -60.5t60 -145.5z" />
+<glyph unicode="&#xf1ab;" d="M654 458q-1 -3 -12.5 0.5t-31.5 11.5l-20 9q-44 20 -87 49q-7 5 -41 31.5t-38 28.5q-67 -103 -134 -181q-81 -95 -105 -110q-4 -2 -19.5 -4t-18.5 0q6 4 82 92q21 24 85.5 115t78.5 118q17 30 51 98.5t36 77.5q-8 1 -110 -33q-8 -2 -27.5 -7.5t-34.5 -9.5t-17 -5 q-2 -2 -2 -10.5t-1 -9.5q-5 -10 -31 -15q-23 -7 -47 0q-18 4 -28 21q-4 6 -5 23q6 2 24.5 5t29.5 6q58 16 105 32q100 35 102 35q10 2 43 19.5t44 21.5q9 3 21.5 8t14.5 5.5t6 -0.5q2 -12 -1 -33q0 -2 -12.5 -27t-26.5 -53.5t-17 -33.5q-25 -50 -77 -131l64 -28 q12 -6 74.5 -32t67.5 -28q4 -1 10.5 -25.5t4.5 -30.5zM449 944q3 -15 -4 -28q-12 -23 -50 -38q-30 -12 -60 -12q-26 3 -49 26q-14 15 -18 41l1 3q3 -3 19.5 -5t26.5 0t58 16q36 12 55 14q17 0 21 -17zM1147 815l63 -227l-139 42zM39 15l694 232v1032l-694 -233v-1031z M1280 332l102 -31l-181 657l-100 31l-216 -536l102 -31l45 110l211 -65zM777 1294l573 -184v380zM1088 -29l158 -13l-54 -160l-40 66q-130 -83 -276 -108q-58 -12 -91 -12h-84q-79 0 -199.5 39t-183.5 85q-8 7 -8 16q0 8 5 13.5t13 5.5q4 0 18 -7.5t30.5 -16.5t20.5 -11 q73 -37 159.5 -61.5t157.5 -24.5q95 0 167 14.5t157 50.5q15 7 30.5 15.5t34 19t28.5 16.5zM1536 1050v-1079l-774 246q-14 -6 -375 -127.5t-368 -121.5q-13 0 -18 13q0 1 -1 3v1078q3 9 4 10q5 6 20 11q106 35 149 50v384l558 -198q2 0 160.5 55t316 108.5t161.5 53.5 q20 0 20 -21v-418z" />
+<glyph unicode="&#xf1ac;" horiz-adv-x="1792" d="M288 1152q66 0 113 -47t47 -113v-1088q0 -66 -47 -113t-113 -47h-128q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h128zM1664 989q58 -34 93 -93t35 -128v-768q0 -106 -75 -181t-181 -75h-864q-66 0 -113 47t-47 113v1536q0 40 28 68t68 28h672q40 0 88 -20t76 -48 l152 -152q28 -28 48 -76t20 -88v-163zM928 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM928 256v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM928 512v128q0 14 -9 23 t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1184 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1184 256v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128 q14 0 23 9t9 23zM1184 512v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 256v128q0 14 -9 23t-23 9h-128 q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 512v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1536 896v256h-160q-40 0 -68 28t-28 68v160h-640v-512h896z" />
+<glyph unicode="&#xf1ad;" d="M1344 1536q26 0 45 -19t19 -45v-1664q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h1280zM512 1248v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 992v-64q0 -14 9 -23t23 -9h64q14 0 23 9 t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 736v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 480v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM384 160v64 q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64 q14 0 23 9t9 23zM384 928v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 -96v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9 t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM896 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 928v64 q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 160v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64 q14 0 23 9t9 23zM1152 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 928v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9 t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23z" />
+<glyph unicode="&#xf1ae;" horiz-adv-x="1280" d="M1188 988l-292 -292v-824q0 -46 -33 -79t-79 -33t-79 33t-33 79v384h-64v-384q0 -46 -33 -79t-79 -33t-79 33t-33 79v824l-292 292q-28 28 -28 68t28 68t68 28t68 -28l228 -228h368l228 228q28 28 68 28t68 -28t28 -68t-28 -68zM864 1152q0 -93 -65.5 -158.5 t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" />
+<glyph unicode="&#xf1b0;" horiz-adv-x="1664" d="M780 1064q0 -60 -19 -113.5t-63 -92.5t-105 -39q-76 0 -138 57.5t-92 135.5t-30 151q0 60 19 113.5t63 92.5t105 39q77 0 138.5 -57.5t91.5 -135t30 -151.5zM438 581q0 -80 -42 -139t-119 -59q-76 0 -141.5 55.5t-100.5 133.5t-35 152q0 80 42 139.5t119 59.5 q76 0 141.5 -55.5t100.5 -134t35 -152.5zM832 608q118 0 255 -97.5t229 -237t92 -254.5q0 -46 -17 -76.5t-48.5 -45t-64.5 -20t-76 -5.5q-68 0 -187.5 45t-182.5 45q-66 0 -192.5 -44.5t-200.5 -44.5q-183 0 -183 146q0 86 56 191.5t139.5 192.5t187.5 146t193 59zM1071 819 q-61 0 -105 39t-63 92.5t-19 113.5q0 74 30 151.5t91.5 135t138.5 57.5q61 0 105 -39t63 -92.5t19 -113.5q0 -73 -30 -151t-92 -135.5t-138 -57.5zM1503 923q77 0 119 -59.5t42 -139.5q0 -74 -35 -152t-100.5 -133.5t-141.5 -55.5q-77 0 -119 59t-42 139q0 74 35 152.5 t100.5 134t141.5 55.5z" />
+<glyph unicode="&#xf1b1;" horiz-adv-x="768" d="M704 1008q0 -145 -57 -243.5t-152 -135.5l45 -821q2 -26 -16 -45t-44 -19h-192q-26 0 -44 19t-16 45l45 821q-95 37 -152 135.5t-57 243.5q0 128 42.5 249.5t117.5 200t160 78.5t160 -78.5t117.5 -200t42.5 -249.5z" />
+<glyph unicode="&#xf1b2;" horiz-adv-x="1792" d="M896 -93l640 349v636l-640 -233v-752zM832 772l698 254l-698 254l-698 -254zM1664 1024v-768q0 -35 -18 -65t-49 -47l-704 -384q-28 -16 -61 -16t-61 16l-704 384q-31 17 -49 47t-18 65v768q0 40 23 73t61 47l704 256q22 8 44 8t44 -8l704 -256q38 -14 61 -47t23 -73z " />
+<glyph unicode="&#xf1b3;" horiz-adv-x="2304" d="M640 -96l384 192v314l-384 -164v-342zM576 358l404 173l-404 173l-404 -173zM1664 -96l384 192v314l-384 -164v-342zM1600 358l404 173l-404 173l-404 -173zM1152 651l384 165v266l-384 -164v-267zM1088 1030l441 189l-441 189l-441 -189zM2176 512v-416q0 -36 -19 -67 t-52 -47l-448 -224q-25 -14 -57 -14t-57 14l-448 224q-5 2 -7 4q-2 -2 -7 -4l-448 -224q-25 -14 -57 -14t-57 14l-448 224q-33 16 -52 47t-19 67v416q0 38 21.5 70t56.5 48l434 186v400q0 38 21.5 70t56.5 48l448 192q23 10 50 10t50 -10l448 -192q35 -16 56.5 -48t21.5 -70 v-400l434 -186q36 -16 57 -48t21 -70z" />
+<glyph unicode="&#xf1b4;" horiz-adv-x="2048" d="M1848 1197h-511v-124h511v124zM1596 771q-90 0 -146 -52.5t-62 -142.5h408q-18 195 -200 195zM1612 186q63 0 122 32t76 87h221q-100 -307 -427 -307q-214 0 -340.5 132t-126.5 347q0 208 130.5 345.5t336.5 137.5q138 0 240.5 -68t153 -179t50.5 -248q0 -17 -2 -47h-658 q0 -111 57.5 -171.5t166.5 -60.5zM277 236h296q205 0 205 167q0 180 -199 180h-302v-347zM277 773h281q78 0 123.5 36.5t45.5 113.5q0 144 -190 144h-260v-294zM0 1282h594q87 0 155 -14t126.5 -47.5t90 -96.5t31.5 -154q0 -181 -172 -263q114 -32 172 -115t58 -204 q0 -75 -24.5 -136.5t-66 -103.5t-98.5 -71t-121 -42t-134 -13h-611v1260z" />
+<glyph unicode="&#xf1b5;" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM499 1041h-371v-787h382q117 0 197 57.5t80 170.5q0 158 -143 200q107 52 107 164q0 57 -19.5 96.5 t-56.5 60.5t-79 29.5t-97 8.5zM477 723h-176v184h163q119 0 119 -90q0 -94 -106 -94zM486 388h-185v217h189q124 0 124 -113q0 -104 -128 -104zM1136 356q-68 0 -104 38t-36 107h411q1 10 1 30q0 132 -74.5 220.5t-203.5 88.5q-128 0 -210 -86t-82 -216q0 -135 79 -217 t213 -82q205 0 267 191h-138q-11 -34 -47.5 -54t-75.5 -20zM1126 722q113 0 124 -122h-254q4 56 39 89t91 33zM964 988h319v-77h-319v77z" />
+<glyph unicode="&#xf1b6;" horiz-adv-x="1792" d="M1582 954q0 -101 -71.5 -172.5t-172.5 -71.5t-172.5 71.5t-71.5 172.5t71.5 172.5t172.5 71.5t172.5 -71.5t71.5 -172.5zM812 212q0 104 -73 177t-177 73q-27 0 -54 -6l104 -42q77 -31 109.5 -106.5t1.5 -151.5q-31 -77 -107 -109t-152 -1q-21 8 -62 24.5t-61 24.5 q32 -60 91 -96.5t130 -36.5q104 0 177 73t73 177zM1642 953q0 126 -89.5 215.5t-215.5 89.5q-127 0 -216.5 -89.5t-89.5 -215.5q0 -127 89.5 -216t216.5 -89q126 0 215.5 89t89.5 216zM1792 953q0 -189 -133.5 -322t-321.5 -133l-437 -319q-12 -129 -109 -218t-229 -89 q-121 0 -214 76t-118 192l-230 92v429l389 -157q79 48 173 48q13 0 35 -2l284 407q2 187 135.5 319t320.5 132q188 0 321.5 -133.5t133.5 -321.5z" />
+<glyph unicode="&#xf1b7;" d="M1242 889q0 80 -57 136.5t-137 56.5t-136.5 -57t-56.5 -136q0 -80 56.5 -136.5t136.5 -56.5t137 56.5t57 136.5zM632 301q0 -83 -58 -140.5t-140 -57.5q-56 0 -103 29t-72 77q52 -20 98 -40q60 -24 120 1.5t85 86.5q24 60 -1.5 120t-86.5 84l-82 33q22 5 42 5 q82 0 140 -57.5t58 -140.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v153l172 -69q20 -92 93.5 -152t168.5 -60q104 0 181 70t87 173l345 252q150 0 255.5 105.5t105.5 254.5q0 150 -105.5 255.5t-255.5 105.5 q-148 0 -253 -104.5t-107 -252.5l-225 -322q-9 1 -28 1q-75 0 -137 -37l-297 119v468q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5zM1289 887q0 -100 -71 -170.5t-171 -70.5t-170.5 70.5t-70.5 170.5t70.5 171t170.5 71q101 0 171.5 -70.5t70.5 -171.5z " />
+<glyph unicode="&#xf1b8;" horiz-adv-x="1792" d="M836 367l-15 -368l-2 -22l-420 29q-36 3 -67 31.5t-47 65.5q-11 27 -14.5 55t4 65t12 55t21.5 64t19 53q78 -12 509 -28zM449 953l180 -379l-147 92q-63 -72 -111.5 -144.5t-72.5 -125t-39.5 -94.5t-18.5 -63l-4 -21l-190 357q-17 26 -18 56t6 47l8 18q35 63 114 188 l-140 86zM1680 436l-188 -359q-12 -29 -36.5 -46.5t-43.5 -20.5l-18 -4q-71 -7 -219 -12l8 -164l-230 367l211 362l7 -173q170 -16 283 -5t170 33zM895 1360q-47 -63 -265 -435l-317 187l-19 12l225 356q20 31 60 45t80 10q24 -2 48.5 -12t42 -21t41.5 -33t36 -34.5 t36 -39.5t32 -35zM1550 1053l212 -363q18 -37 12.5 -76t-27.5 -74q-13 -20 -33 -37t-38 -28t-48.5 -22t-47 -16t-51.5 -14t-46 -12q-34 72 -265 436l313 195zM1407 1279l142 83l-220 -373l-419 20l151 86q-34 89 -75 166t-75.5 123.5t-64.5 80t-47 46.5l-17 13l405 -1 q31 3 58 -10.5t39 -28.5l11 -15q39 -61 112 -190z" />
+<glyph unicode="&#xf1b9;" horiz-adv-x="2048" d="M480 448q0 66 -47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47t113 47t47 113zM516 768h1016l-89 357q-2 8 -14 17.5t-21 9.5h-768q-9 0 -21 -9.5t-14 -17.5zM1888 448q0 66 -47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47t113 47t47 113zM2048 544v-384 q0 -14 -9 -23t-23 -9h-96v-128q0 -80 -56 -136t-136 -56t-136 56t-56 136v128h-1024v-128q0 -80 -56 -136t-136 -56t-136 56t-56 136v128h-96q-14 0 -23 9t-9 23v384q0 93 65.5 158.5t158.5 65.5h28l105 419q23 94 104 157.5t179 63.5h768q98 0 179 -63.5t104 -157.5 l105 -419h28q93 0 158.5 -65.5t65.5 -158.5z" />
+<glyph unicode="&#xf1ba;" horiz-adv-x="2048" d="M1824 640q93 0 158.5 -65.5t65.5 -158.5v-384q0 -14 -9 -23t-23 -9h-96v-64q0 -80 -56 -136t-136 -56t-136 56t-56 136v64h-1024v-64q0 -80 -56 -136t-136 -56t-136 56t-56 136v64h-96q-14 0 -23 9t-9 23v384q0 93 65.5 158.5t158.5 65.5h28l105 419q23 94 104 157.5 t179 63.5h128v224q0 14 9 23t23 9h448q14 0 23 -9t9 -23v-224h128q98 0 179 -63.5t104 -157.5l105 -419h28zM320 160q66 0 113 47t47 113t-47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47zM516 640h1016l-89 357q-2 8 -14 17.5t-21 9.5h-768q-9 0 -21 -9.5t-14 -17.5z M1728 160q66 0 113 47t47 113t-47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47z" />
+<glyph unicode="&#xf1bb;" d="M1504 64q0 -26 -19 -45t-45 -19h-462q1 -17 6 -87.5t5 -108.5q0 -25 -18 -42.5t-43 -17.5h-320q-25 0 -43 17.5t-18 42.5q0 38 5 108.5t6 87.5h-462q-26 0 -45 19t-19 45t19 45l402 403h-229q-26 0 -45 19t-19 45t19 45l402 403h-197q-26 0 -45 19t-19 45t19 45l384 384 q19 19 45 19t45 -19l384 -384q19 -19 19 -45t-19 -45t-45 -19h-197l402 -403q19 -19 19 -45t-19 -45t-45 -19h-229l402 -403q19 -19 19 -45z" />
+<glyph unicode="&#xf1bc;" d="M1127 326q0 32 -30 51q-193 115 -447 115q-133 0 -287 -34q-42 -9 -42 -52q0 -20 13.5 -34.5t35.5 -14.5q5 0 37 8q132 27 243 27q226 0 397 -103q19 -11 33 -11q19 0 33 13.5t14 34.5zM1223 541q0 40 -35 61q-237 141 -548 141q-153 0 -303 -42q-48 -13 -48 -64 q0 -25 17.5 -42.5t42.5 -17.5q7 0 37 8q122 33 251 33q279 0 488 -124q24 -13 38 -13q25 0 42.5 17.5t17.5 42.5zM1331 789q0 47 -40 70q-126 73 -293 110.5t-343 37.5q-204 0 -364 -47q-23 -7 -38.5 -25.5t-15.5 -48.5q0 -31 20.5 -52t51.5 -21q11 0 40 8q133 37 307 37 q159 0 309.5 -34t253.5 -95q21 -12 40 -12q29 0 50.5 20.5t21.5 51.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf1bd;" d="M1397 1408q58 0 98.5 -40.5t40.5 -98.5v-1258q0 -58 -40.5 -98.5t-98.5 -40.5h-1258q-58 0 -98.5 40.5t-40.5 98.5v1258q0 58 40.5 98.5t98.5 40.5h1258zM1465 11v1258q0 28 -20 48t-48 20h-1258q-28 0 -48 -20t-20 -48v-1258q0 -28 20 -48t48 -20h1258q28 0 48 20t20 48 zM694 749l188 -387l533 145v-496q0 -7 -5.5 -12.5t-12.5 -5.5h-1258q-7 0 -12.5 5.5t-5.5 12.5v141l711 195l-212 439q4 1 12 2.5t12 1.5q170 32 303.5 21.5t221 -46t143.5 -94.5q27 -28 -25 -42q-64 -16 -256 -62l-97 198q-111 7 -240 -16zM1397 1287q7 0 12.5 -5.5 t5.5 -12.5v-428q-85 30 -188 52q-294 64 -645 12l-18 -3l-65 134h-233l85 -190q-132 -51 -230 -137v560q0 7 5.5 12.5t12.5 5.5h1258zM286 387q-14 -3 -26 4.5t-14 21.5q-24 203 166 305l129 -270z" />
+<glyph unicode="&#xf1be;" horiz-adv-x="2304" d="M784 164l16 241l-16 523q-1 10 -7.5 17t-16.5 7q-9 0 -16 -7t-7 -17l-14 -523l14 -241q1 -10 7.5 -16.5t15.5 -6.5q22 0 24 23zM1080 193l11 211l-12 586q0 16 -13 24q-8 5 -16 5t-16 -5q-13 -8 -13 -24l-1 -6l-10 -579q0 -1 11 -236v-1q0 -10 6 -17q9 -11 23 -11 q11 0 20 9q9 7 9 20zM35 533l20 -128l-20 -126q-2 -9 -9 -9t-9 9l-17 126l17 128q2 9 9 9t9 -9zM121 612l26 -207l-26 -203q-2 -9 -10 -9q-9 0 -9 10l-23 202l23 207q0 9 9 9q8 0 10 -9zM401 159zM213 650l25 -245l-25 -237q0 -11 -11 -11q-10 0 -12 11l-21 237l21 245 q2 12 12 12q11 0 11 -12zM307 657l23 -252l-23 -244q-2 -13 -14 -13q-13 0 -13 13l-21 244l21 252q0 13 13 13q12 0 14 -13zM401 639l21 -234l-21 -246q-2 -16 -16 -16q-6 0 -10.5 4.5t-4.5 11.5l-20 246l20 234q0 6 4.5 10.5t10.5 4.5q14 0 16 -15zM784 164zM495 785 l21 -380l-21 -246q0 -7 -5 -12.5t-12 -5.5q-16 0 -18 18l-18 246l18 380q2 18 18 18q7 0 12 -5.5t5 -12.5zM589 871l19 -468l-19 -244q0 -8 -5.5 -13.5t-13.5 -5.5q-18 0 -20 19l-16 244l16 468q2 19 20 19q8 0 13.5 -5.5t5.5 -13.5zM687 911l18 -506l-18 -242 q-2 -21 -22 -21q-19 0 -21 21l-16 242l16 506q0 9 6.5 15.5t14.5 6.5q9 0 15 -6.5t7 -15.5zM1079 169v0v0zM881 915l15 -510l-15 -239q0 -10 -7.5 -17.5t-17.5 -7.5t-17 7t-8 18l-14 239l14 510q0 11 7.5 18t17.5 7t17.5 -7t7.5 -18zM980 896l14 -492l-14 -236q0 -11 -8 -19 t-19 -8t-19 8t-9 19l-12 236l12 492q1 12 9 20t19 8t18.5 -8t8.5 -20zM1192 404l-14 -231v0q0 -13 -9 -22t-22 -9t-22 9t-10 22l-6 114l-6 117l12 636v3q2 15 12 24q9 7 20 7q8 0 15 -5q14 -8 16 -26zM2304 423q0 -117 -83 -199.5t-200 -82.5h-786q-13 2 -22 11t-9 22v899 q0 23 28 33q85 34 181 34q195 0 338 -131.5t160 -323.5q53 22 110 22q117 0 200 -83t83 -201z" />
+<glyph unicode="&#xf1c0;" d="M768 768q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127t443 -43zM768 0q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127 t443 -43zM768 384q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127t443 -43zM768 1536q208 0 385 -34.5t280 -93.5t103 -128v-128q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5 t-103 128v128q0 69 103 128t280 93.5t385 34.5z" />
+<glyph unicode="&#xf1c1;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M894 465q33 -26 84 -56q59 7 117 7q147 0 177 -49q16 -22 2 -52q0 -1 -1 -2l-2 -2v-1q-6 -38 -71 -38q-48 0 -115 20t-130 53q-221 -24 -392 -83q-153 -262 -242 -262q-15 0 -28 7l-24 12q-1 1 -6 5q-10 10 -6 36q9 40 56 91.5t132 96.5q14 9 23 -6q2 -2 2 -4q52 85 107 197 q68 136 104 262q-24 82 -30.5 159.5t6.5 127.5q11 40 42 40h21h1q23 0 35 -15q18 -21 9 -68q-2 -6 -4 -8q1 -3 1 -8v-30q-2 -123 -14 -192q55 -164 146 -238zM318 54q52 24 137 158q-51 -40 -87.5 -84t-49.5 -74zM716 974q-15 -42 -2 -132q1 7 7 44q0 3 7 43q1 4 4 8 q-1 1 -1 2t-0.5 1.5t-0.5 1.5q-1 22 -13 36q0 -1 -1 -2v-2zM592 313q135 54 284 81q-2 1 -13 9.5t-16 13.5q-76 67 -127 176q-27 -86 -83 -197q-30 -56 -45 -83zM1238 329q-24 24 -140 24q76 -28 124 -28q14 0 18 1q0 1 -2 3z" />
+<glyph unicode="&#xf1c2;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M233 768v-107h70l164 -661h159l128 485q7 20 10 46q2 16 2 24h4l3 -24q1 -3 3.5 -20t5.5 -26l128 -485h159l164 661h70v107h-300v-107h90l-99 -438q-5 -20 -7 -46l-2 -21h-4l-3 21q-1 5 -4 21t-5 25l-144 545h-114l-144 -545q-2 -9 -4.5 -24.5t-3.5 -21.5l-4 -21h-4l-2 21 q-2 26 -7 46l-99 438h90v107h-300z" />
+<glyph unicode="&#xf1c3;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M429 106v-106h281v106h-75l103 161q5 7 10 16.5t7.5 13.5t3.5 4h2q1 -4 5 -10q2 -4 4.5 -7.5t6 -8t6.5 -8.5l107 -161h-76v-106h291v106h-68l-192 273l195 282h67v107h-279v-107h74l-103 -159q-4 -7 -10 -16.5t-9 -13.5l-2 -3h-2q-1 4 -5 10q-6 11 -17 23l-106 159h76v107 h-290v-107h68l189 -272l-194 -283h-68z" />
+<glyph unicode="&#xf1c4;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M416 106v-106h327v106h-93v167h137q76 0 118 15q67 23 106.5 87t39.5 146q0 81 -37 141t-100 87q-48 19 -130 19h-368v-107h92v-555h-92zM769 386h-119v268h120q52 0 83 -18q56 -33 56 -115q0 -89 -62 -120q-31 -15 -78 -15z" />
+<glyph unicode="&#xf1c5;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M1280 320v-320h-1024v192l192 192l128 -128l384 384zM448 512q-80 0 -136 56t-56 136t56 136t136 56t136 -56t56 -136t-56 -136t-136 -56z" />
+<glyph unicode="&#xf1c6;" d="M640 1152v128h-128v-128h128zM768 1024v128h-128v-128h128zM640 896v128h-128v-128h128zM768 768v128h-128v-128h128zM1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400 v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-128v-128h-128v128h-512v-1536h1280zM781 593l107 -349q8 -27 8 -52q0 -83 -72.5 -137.5t-183.5 -54.5t-183.5 54.5t-72.5 137.5q0 25 8 52q21 63 120 396v128h128v-128h79 q22 0 39 -13t23 -34zM640 128q53 0 90.5 19t37.5 45t-37.5 45t-90.5 19t-90.5 -19t-37.5 -45t37.5 -45t90.5 -19z" />
+<glyph unicode="&#xf1c7;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M620 686q20 -8 20 -30v-544q0 -22 -20 -30q-8 -2 -12 -2q-12 0 -23 9l-166 167h-131q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h131l166 167q16 15 35 7zM1037 -3q31 0 50 24q129 159 129 363t-129 363q-16 21 -43 24t-47 -14q-21 -17 -23.5 -43.5t14.5 -47.5 q100 -123 100 -282t-100 -282q-17 -21 -14.5 -47.5t23.5 -42.5q18 -15 40 -15zM826 145q27 0 47 20q87 93 87 219t-87 219q-18 19 -45 20t-46 -17t-20 -44.5t18 -46.5q52 -57 52 -131t-52 -131q-19 -20 -18 -46.5t20 -44.5q20 -17 44 -17z" />
+<glyph unicode="&#xf1c8;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M768 768q52 0 90 -38t38 -90v-384q0 -52 -38 -90t-90 -38h-384q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h384zM1260 766q20 -8 20 -30v-576q0 -22 -20 -30q-8 -2 -12 -2q-14 0 -23 9l-265 266v90l265 266q9 9 23 9q4 0 12 -2z" />
+<glyph unicode="&#xf1c9;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M480 768q8 11 21 12.5t24 -6.5l51 -38q11 -8 12.5 -21t-6.5 -24l-182 -243l182 -243q8 -11 6.5 -24t-12.5 -21l-51 -38q-11 -8 -24 -6.5t-21 12.5l-226 301q-14 19 0 38zM1282 467q14 -19 0 -38l-226 -301q-8 -11 -21 -12.5t-24 6.5l-51 38q-11 8 -12.5 21t6.5 24l182 243 l-182 243q-8 11 -6.5 24t12.5 21l51 38q11 8 24 6.5t21 -12.5zM662 6q-13 2 -20.5 13t-5.5 24l138 831q2 13 13 20.5t24 5.5l63 -10q13 -2 20.5 -13t5.5 -24l-138 -831q-2 -13 -13 -20.5t-24 -5.5z" />
+<glyph unicode="&#xf1ca;" d="M1497 709v-198q-101 -23 -198 -23q-65 -136 -165.5 -271t-181.5 -215.5t-128 -106.5q-80 -45 -162 3q-28 17 -60.5 43.5t-85 83.5t-102.5 128.5t-107.5 184t-105.5 244t-91.5 314.5t-70.5 390h283q26 -218 70 -398.5t104.5 -317t121.5 -235.5t140 -195q169 169 287 406 q-142 72 -223 220t-81 333q0 192 104 314.5t284 122.5q178 0 273 -105.5t95 -297.5q0 -159 -58 -286q-7 -1 -19.5 -3t-46 -2t-63 6t-62 25.5t-50.5 51.5q31 103 31 184q0 87 -29 132t-79 45q-53 0 -85 -49.5t-32 -140.5q0 -186 105 -293.5t267 -107.5q62 0 121 14z" />
+<glyph unicode="&#xf1cb;" horiz-adv-x="1792" d="M216 367l603 -402v359l-334 223zM154 511l193 129l-193 129v-258zM973 -35l603 402l-269 180l-334 -223v-359zM896 458l272 182l-272 182l-272 -182zM485 733l334 223v359l-603 -402zM1445 640l193 -129v258zM1307 733l269 180l-603 402v-359zM1792 913v-546 q0 -41 -34 -64l-819 -546q-21 -13 -43 -13t-43 13l-819 546q-34 23 -34 64v546q0 41 34 64l819 546q21 13 43 13t43 -13l819 -546q34 -23 34 -64z" />
+<glyph unicode="&#xf1cc;" horiz-adv-x="2048" d="M1800 764q111 -46 179.5 -145.5t68.5 -221.5q0 -164 -118 -280.5t-285 -116.5q-4 0 -11.5 0.5t-10.5 0.5h-1209h-1h-2h-5q-170 10 -288 125.5t-118 280.5q0 110 55 203t147 147q-12 39 -12 82q0 115 82 196t199 81q95 0 172 -58q75 154 222.5 248t326.5 94 q166 0 306 -80.5t221.5 -218.5t81.5 -301q0 -6 -0.5 -18t-0.5 -18zM468 498q0 -122 84 -193t208 -71q137 0 240 99q-16 20 -47.5 56.5t-43.5 50.5q-67 -65 -144 -65q-55 0 -93.5 33.5t-38.5 87.5q0 53 38.5 87t91.5 34q44 0 84.5 -21t73 -55t65 -75t69 -82t77 -75t97 -55 t121.5 -21q121 0 204.5 71.5t83.5 190.5q0 121 -84 192t-207 71q-143 0 -241 -97q14 -16 29.5 -34t34.5 -40t29 -34q66 64 142 64q52 0 92 -33t40 -84q0 -57 -37 -91.5t-94 -34.5q-43 0 -82.5 21t-72 55t-65.5 75t-69.5 82t-77.5 75t-96.5 55t-118.5 21q-122 0 -207 -70.5 t-85 -189.5z" />
+<glyph unicode="&#xf1cd;" horiz-adv-x="1792" d="M896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM896 1408q-190 0 -361 -90l194 -194q82 28 167 28t167 -28l194 194q-171 90 -361 90zM218 279l194 194 q-28 82 -28 167t28 167l-194 194q-90 -171 -90 -361t90 -361zM896 -128q190 0 361 90l-194 194q-82 -28 -167 -28t-167 28l-194 -194q171 -90 361 -90zM896 256q159 0 271.5 112.5t112.5 271.5t-112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5 t271.5 -112.5zM1380 473l194 -194q90 171 90 361t-90 361l-194 -194q28 -82 28 -167t-28 -167z" />
+<glyph unicode="&#xf1ce;" horiz-adv-x="1792" d="M1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348q0 222 101 414.5t276.5 317t390.5 155.5v-260q-221 -45 -366.5 -221t-145.5 -406q0 -130 51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5 q0 230 -145.5 406t-366.5 221v260q215 -31 390.5 -155.5t276.5 -317t101 -414.5z" />
+<glyph unicode="&#xf1d0;" horiz-adv-x="1792" d="M19 662q8 217 116 406t305 318h5q0 -1 -1 -3q-8 -8 -28 -33.5t-52 -76.5t-60 -110.5t-44.5 -135.5t-14 -150.5t39 -157.5t108.5 -154q50 -50 102 -69.5t90.5 -11.5t69.5 23.5t47 32.5l16 16q39 51 53 116.5t6.5 122.5t-21 107t-26.5 80l-14 29q-10 25 -30.5 49.5t-43 41 t-43.5 29.5t-35 19l-13 6l104 115q39 -17 78 -52t59 -61l19 -27q1 48 -18.5 103.5t-40.5 87.5l-20 31l161 183l160 -181q-33 -46 -52.5 -102.5t-22.5 -90.5l-4 -33q22 37 61.5 72.5t67.5 52.5l28 17l103 -115q-44 -14 -85 -50t-60 -65l-19 -29q-31 -56 -48 -133.5t-7 -170 t57 -156.5q33 -45 77.5 -60.5t85 -5.5t76 26.5t57.5 33.5l21 16q60 53 96.5 115t48.5 121.5t10 121.5t-18 118t-37 107.5t-45.5 93t-45 72t-34.5 47.5l-13 17q-14 13 -7 13l10 -3q40 -29 62.5 -46t62 -50t64 -58t58.5 -65t55.5 -77t45.5 -88t38 -103t23.5 -117t10.5 -136 q3 -259 -108 -465t-312 -321t-456 -115q-185 0 -351 74t-283.5 198t-184 293t-60.5 353z" />
+<glyph unicode="&#xf1d1;" horiz-adv-x="1792" d="M874 -102v-66q-208 6 -385 109.5t-283 275.5l58 34q29 -49 73 -99l65 57q148 -168 368 -212l-17 -86q65 -12 121 -13zM276 428l-83 -28q22 -60 49 -112l-57 -33q-98 180 -98 385t98 385l57 -33q-30 -56 -49 -112l82 -28q-35 -100 -35 -212q0 -109 36 -212zM1528 251 l58 -34q-106 -172 -283 -275.5t-385 -109.5v66q56 1 121 13l-17 86q220 44 368 212l65 -57q44 50 73 99zM1377 805l-233 -80q14 -42 14 -85t-14 -85l232 -80q-31 -92 -98 -169l-185 162q-57 -67 -147 -85l48 -241q-52 -10 -98 -10t-98 10l48 241q-90 18 -147 85l-185 -162 q-67 77 -98 169l232 80q-14 42 -14 85t14 85l-233 80q33 93 99 169l185 -162q59 68 147 86l-48 240q44 10 98 10t98 -10l-48 -240q88 -18 147 -86l185 162q66 -76 99 -169zM874 1448v-66q-65 -2 -121 -13l17 -86q-220 -42 -368 -211l-65 56q-38 -42 -73 -98l-57 33 q106 172 282 275.5t385 109.5zM1705 640q0 -205 -98 -385l-57 33q27 52 49 112l-83 28q36 103 36 212q0 112 -35 212l82 28q-19 56 -49 112l57 33q98 -180 98 -385zM1585 1063l-57 -33q-35 56 -73 98l-65 -56q-148 169 -368 211l17 86q-56 11 -121 13v66q209 -6 385 -109.5 t282 -275.5zM1748 640q0 173 -67.5 331t-181.5 272t-272 181.5t-331 67.5t-331 -67.5t-272 -181.5t-181.5 -272t-67.5 -331t67.5 -331t181.5 -272t272 -181.5t331 -67.5t331 67.5t272 181.5t181.5 272t67.5 331zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71 t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
+<glyph unicode="&#xf1d2;" d="M582 228q0 -66 -93 -66q-107 0 -107 63q0 64 98 64q102 0 102 -61zM546 694q0 -85 -74 -85q-77 0 -77 84q0 90 77 90q36 0 55 -25.5t19 -63.5zM712 769v125q-78 -29 -135 -29q-50 29 -110 29q-86 0 -145 -57t-59 -143q0 -50 29.5 -102t73.5 -67v-3q-38 -17 -38 -85 q0 -53 41 -77v-3q-113 -37 -113 -139q0 -45 20 -78.5t54 -51t72 -25.5t81 -8q224 0 224 188q0 67 -48 99t-126 46q-27 5 -51.5 20.5t-24.5 39.5q0 44 49 52q77 15 122 70t45 134q0 24 -10 52q37 9 49 13zM771 350h137q-2 27 -2 82v387q0 46 2 69h-137q3 -23 3 -71v-392 q0 -50 -3 -75zM1280 366v121q-30 -21 -68 -21q-53 0 -53 82v225h52q9 0 26.5 -1t26.5 -1v117h-105q0 82 3 102h-140q4 -24 4 -55v-47h-60v-117q36 3 37 3q3 0 11 -0.5t12 -0.5v-2h-2v-217q0 -37 2.5 -64t11.5 -56.5t24.5 -48.5t43.5 -31t66 -12q64 0 108 24zM924 1072 q0 36 -24 63.5t-60 27.5t-60.5 -27t-24.5 -64q0 -36 25 -62.5t60 -26.5t59.5 27t24.5 62zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf1d3;" horiz-adv-x="1792" d="M595 22q0 100 -165 100q-158 0 -158 -104q0 -101 172 -101q151 0 151 105zM536 777q0 61 -30 102t-89 41q-124 0 -124 -145q0 -135 124 -135q119 0 119 137zM805 1101v-202q-36 -12 -79 -22q16 -43 16 -84q0 -127 -73 -216.5t-197 -112.5q-40 -8 -59.5 -27t-19.5 -58 q0 -31 22.5 -51.5t58 -32t78.5 -22t86 -25.5t78.5 -37.5t58 -64t22.5 -98.5q0 -304 -363 -304q-69 0 -130 12.5t-116 41t-87.5 82t-32.5 127.5q0 165 182 225v4q-67 41 -67 126q0 109 63 137v4q-72 24 -119.5 108.5t-47.5 165.5q0 139 95 231.5t235 92.5q96 0 178 -47 q98 0 218 47zM1123 220h-222q4 45 4 134v609q0 94 -4 128h222q-4 -33 -4 -124v-613q0 -89 4 -134zM1724 442v-196q-71 -39 -174 -39q-62 0 -107 20t-70 50t-39.5 78t-18.5 92t-4 103v351h2v4q-7 0 -19 1t-18 1q-21 0 -59 -6v190h96v76q0 54 -6 89h227q-6 -41 -6 -165h171 v-190q-15 0 -43.5 2t-42.5 2h-85v-365q0 -131 87 -131q61 0 109 33zM1148 1389q0 -58 -39 -101.5t-96 -43.5q-58 0 -98 43.5t-40 101.5q0 59 39.5 103t98.5 44q58 0 96.5 -44.5t38.5 -102.5z" />
+<glyph unicode="&#xf1d4;" d="M825 547l343 588h-150q-21 -39 -63.5 -118.5t-68 -128.5t-59.5 -118.5t-60 -128.5h-3q-21 48 -44.5 97t-52 105.5t-46.5 92t-54 104.5t-49 95h-150l323 -589v-435h134v436zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960 q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf1d5;" horiz-adv-x="1280" d="M842 964q0 -80 -57 -136.5t-136 -56.5q-60 0 -111 35q-62 -67 -115 -146q-247 -371 -202 -859q1 -22 -12.5 -38.5t-34.5 -18.5h-5q-20 0 -35 13.5t-17 33.5q-14 126 -3.5 247.5t29.5 217t54 186t69 155.5t74 125q61 90 132 165q-16 35 -16 77q0 80 56.5 136.5t136.5 56.5 t136.5 -56.5t56.5 -136.5zM1223 953q0 -158 -78 -292t-212.5 -212t-292.5 -78q-64 0 -131 14q-21 5 -32.5 23.5t-6.5 39.5q5 20 23 31.5t39 7.5q51 -13 108 -13q97 0 186 38t153 102t102 153t38 186t-38 186t-102 153t-153 102t-186 38t-186 -38t-153 -102t-102 -153 t-38 -186q0 -114 52 -218q10 -20 3.5 -40t-25.5 -30t-39.5 -3t-30.5 26q-64 123 -64 265q0 119 46.5 227t124.5 186t186 124t226 46q158 0 292.5 -78t212.5 -212.5t78 -292.5z" />
+<glyph unicode="&#xf1d6;" horiz-adv-x="1792" d="M270 730q-8 19 -8 52q0 20 11 49t24 45q-1 22 7.5 53t22.5 43q0 139 92.5 288.5t217.5 209.5q139 66 324 66q133 0 266 -55q49 -21 90 -48t71 -56t55 -68t42 -74t32.5 -84.5t25.5 -89.5t22 -98l1 -5q55 -83 55 -150q0 -14 -9 -40t-9 -38q0 -1 1.5 -3.5t3.5 -5t2 -3.5 q77 -114 120.5 -214.5t43.5 -208.5q0 -43 -19.5 -100t-55.5 -57q-9 0 -19.5 7.5t-19 17.5t-19 26t-16 26.5t-13.5 26t-9 17.5q-1 1 -3 1l-5 -4q-59 -154 -132 -223q20 -20 61.5 -38.5t69 -41.5t35.5 -65q-2 -4 -4 -16t-7 -18q-64 -97 -302 -97q-53 0 -110.5 9t-98 20 t-104.5 30q-15 5 -23 7q-14 4 -46 4.5t-40 1.5q-41 -45 -127.5 -65t-168.5 -20q-35 0 -69 1.5t-93 9t-101 20.5t-74.5 40t-32.5 64q0 40 10 59.5t41 48.5q11 2 40.5 13t49.5 12q4 0 14 2q2 2 2 4l-2 3q-48 11 -108 105.5t-73 156.5l-5 3q-4 0 -12 -20q-18 -41 -54.5 -74.5 t-77.5 -37.5h-1q-4 0 -6 4.5t-5 5.5q-23 54 -23 100q0 275 252 466z" />
+<glyph unicode="&#xf1d7;" horiz-adv-x="2048" d="M580 1075q0 41 -25 66t-66 25q-43 0 -76 -25.5t-33 -65.5q0 -39 33 -64.5t76 -25.5q41 0 66 24.5t25 65.5zM1323 568q0 28 -25.5 50t-65.5 22q-27 0 -49.5 -22.5t-22.5 -49.5q0 -28 22.5 -50.5t49.5 -22.5q40 0 65.5 22t25.5 51zM1087 1075q0 41 -24.5 66t-65.5 25 q-43 0 -76 -25.5t-33 -65.5q0 -39 33 -64.5t76 -25.5q41 0 65.5 24.5t24.5 65.5zM1722 568q0 28 -26 50t-65 22q-27 0 -49.5 -22.5t-22.5 -49.5q0 -28 22.5 -50.5t49.5 -22.5q39 0 65 22t26 51zM1456 965q-31 4 -70 4q-169 0 -311 -77t-223.5 -208.5t-81.5 -287.5 q0 -78 23 -152q-35 -3 -68 -3q-26 0 -50 1.5t-55 6.5t-44.5 7t-54.5 10.5t-50 10.5l-253 -127l72 218q-290 203 -290 490q0 169 97.5 311t264 223.5t363.5 81.5q176 0 332.5 -66t262 -182.5t136.5 -260.5zM2048 404q0 -117 -68.5 -223.5t-185.5 -193.5l55 -181l-199 109 q-150 -37 -218 -37q-169 0 -311 70.5t-223.5 191.5t-81.5 264t81.5 264t223.5 191.5t311 70.5q161 0 303 -70.5t227.5 -192t85.5 -263.5z" />
+<glyph unicode="&#xf1d8;" horiz-adv-x="1792" d="M1764 1525q33 -24 27 -64l-256 -1536q-5 -29 -32 -45q-14 -8 -31 -8q-11 0 -24 5l-453 185l-242 -295q-18 -23 -49 -23q-13 0 -22 4q-19 7 -30.5 23.5t-11.5 36.5v349l864 1059l-1069 -925l-395 162q-37 14 -40 55q-2 40 32 59l1664 960q15 9 32 9q20 0 36 -11z" />
+<glyph unicode="&#xf1d9;" horiz-adv-x="1792" d="M1764 1525q33 -24 27 -64l-256 -1536q-5 -29 -32 -45q-14 -8 -31 -8q-11 0 -24 5l-527 215l-298 -327q-18 -21 -47 -21q-14 0 -23 4q-19 7 -30 23.5t-11 36.5v452l-472 193q-37 14 -40 55q-3 39 32 59l1664 960q35 21 68 -2zM1422 26l221 1323l-1434 -827l336 -137 l863 639l-478 -797z" />
+<glyph unicode="&#xf1da;" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61q-172 0 -327 72.5t-264 204.5q-7 10 -6.5 22.5t8.5 20.5l137 138q10 9 25 9q16 -2 23 -12q73 -95 179 -147t225 -52q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5 t-163.5 109.5t-198.5 40.5q-98 0 -188 -35.5t-160 -101.5l137 -138q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l130 -129q107 101 244.5 156.5t284.5 55.5q156 0 298 -61t245 -164t164 -245t61 -298zM896 928v-448q0 -14 -9 -23 t-23 -9h-320q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf1db;" d="M768 1280q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5t-51 248.5t-136.5 204t-204 136.5t-248.5 51zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf1dc;" horiz-adv-x="1792" d="M1682 -128q-44 0 -132.5 3.5t-133.5 3.5q-44 0 -132 -3.5t-132 -3.5q-24 0 -37 20.5t-13 45.5q0 31 17 46t39 17t51 7t45 15q33 21 33 140l-1 391q0 21 -1 31q-13 4 -50 4h-675q-38 0 -51 -4q-1 -10 -1 -31l-1 -371q0 -142 37 -164q16 -10 48 -13t57 -3.5t45 -15 t20 -45.5q0 -26 -12.5 -48t-36.5 -22q-47 0 -139.5 3.5t-138.5 3.5q-43 0 -128 -3.5t-127 -3.5q-23 0 -35.5 21t-12.5 45q0 30 15.5 45t36 17.5t47.5 7.5t42 15q33 23 33 143l-1 57v813q0 3 0.5 26t0 36.5t-1.5 38.5t-3.5 42t-6.5 36.5t-11 31.5t-16 18q-15 10 -45 12t-53 2 t-41 14t-18 45q0 26 12 48t36 22q46 0 138.5 -3.5t138.5 -3.5q42 0 126.5 3.5t126.5 3.5q25 0 37.5 -22t12.5 -48q0 -30 -17 -43.5t-38.5 -14.5t-49.5 -4t-43 -13q-35 -21 -35 -160l1 -320q0 -21 1 -32q13 -3 39 -3h699q25 0 38 3q1 11 1 32l1 320q0 139 -35 160 q-18 11 -58.5 12.5t-66 13t-25.5 49.5q0 26 12.5 48t37.5 22q44 0 132 -3.5t132 -3.5q43 0 129 3.5t129 3.5q25 0 37.5 -22t12.5 -48q0 -30 -17.5 -44t-40 -14.5t-51.5 -3t-44 -12.5q-35 -23 -35 -161l1 -943q0 -119 34 -140q16 -10 46 -13.5t53.5 -4.5t41.5 -15.5t18 -44.5 q0 -26 -12 -48t-36 -22z" />
+<glyph unicode="&#xf1dd;" horiz-adv-x="1280" d="M1278 1347v-73q0 -29 -18.5 -61t-42.5 -32q-50 0 -54 -1q-26 -6 -32 -31q-3 -11 -3 -64v-1152q0 -25 -18 -43t-43 -18h-108q-25 0 -43 18t-18 43v1218h-143v-1218q0 -25 -17.5 -43t-43.5 -18h-108q-26 0 -43.5 18t-17.5 43v496q-147 12 -245 59q-126 58 -192 179 q-64 117 -64 259q0 166 88 286q88 118 209 159q111 37 417 37h479q25 0 43 -18t18 -43z" />
+<glyph unicode="&#xf1de;" d="M352 128v-128h-352v128h352zM704 256q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM864 640v-128h-864v128h864zM224 1152v-128h-224v128h224zM1536 128v-128h-736v128h736zM576 1280q26 0 45 -19t19 -45v-256 q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM1216 768q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM1536 640v-128h-224v128h224zM1536 1152v-128h-864v128h864z" />
+<glyph unicode="&#xf1e0;" d="M1216 512q133 0 226.5 -93.5t93.5 -226.5t-93.5 -226.5t-226.5 -93.5t-226.5 93.5t-93.5 226.5q0 12 2 34l-360 180q-92 -86 -218 -86q-133 0 -226.5 93.5t-93.5 226.5t93.5 226.5t226.5 93.5q126 0 218 -86l360 180q-2 22 -2 34q0 133 93.5 226.5t226.5 93.5 t226.5 -93.5t93.5 -226.5t-93.5 -226.5t-226.5 -93.5q-126 0 -218 86l-360 -180q2 -22 2 -34t-2 -34l360 -180q92 86 218 86z" />
+<glyph unicode="&#xf1e1;" d="M1280 341q0 88 -62.5 151t-150.5 63q-84 0 -145 -58l-241 120q2 16 2 23t-2 23l241 120q61 -58 145 -58q88 0 150.5 63t62.5 151t-62.5 150.5t-150.5 62.5t-151 -62.5t-63 -150.5q0 -7 2 -23l-241 -120q-62 57 -145 57q-88 0 -150.5 -62.5t-62.5 -150.5t62.5 -150.5 t150.5 -62.5q83 0 145 57l241 -120q-2 -16 -2 -23q0 -88 63 -150.5t151 -62.5t150.5 62.5t62.5 150.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf1e2;" horiz-adv-x="1792" d="M571 947q-10 25 -34 35t-49 0q-108 -44 -191 -127t-127 -191q-10 -25 0 -49t35 -34q13 -5 24 -5q42 0 60 40q34 84 98.5 148.5t148.5 98.5q25 11 35 35t0 49zM1513 1303l46 -46l-244 -243l68 -68q19 -19 19 -45.5t-19 -45.5l-64 -64q89 -161 89 -343q0 -143 -55.5 -273.5 t-150 -225t-225 -150t-273.5 -55.5t-273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5q182 0 343 -89l64 64q19 19 45.5 19t45.5 -19l68 -68zM1521 1359q-10 -10 -22 -10q-13 0 -23 10l-91 90q-9 10 -9 23t9 23q10 9 23 9t23 -9l90 -91 q10 -9 10 -22.5t-10 -22.5zM1751 1129q-11 -9 -23 -9t-23 9l-90 91q-10 9 -10 22.5t10 22.5q9 10 22.5 10t22.5 -10l91 -90q9 -10 9 -23t-9 -23zM1792 1312q0 -14 -9 -23t-23 -9h-96q-14 0 -23 9t-9 23t9 23t23 9h96q14 0 23 -9t9 -23zM1600 1504v-96q0 -14 -9 -23t-23 -9 t-23 9t-9 23v96q0 14 9 23t23 9t23 -9t9 -23zM1751 1449l-91 -90q-10 -10 -22 -10q-13 0 -23 10q-10 9 -10 22.5t10 22.5l90 91q10 9 23 9t23 -9q9 -10 9 -23t-9 -23z" />
+<glyph unicode="&#xf1e3;" horiz-adv-x="1792" d="M609 720l287 208l287 -208l-109 -336h-355zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM1515 186q149 203 149 454v3l-102 -89l-240 224l63 323 l134 -12q-150 206 -389 282l53 -124l-287 -159l-287 159l53 124q-239 -76 -389 -282l135 12l62 -323l-240 -224l-102 89v-3q0 -251 149 -454l30 132l326 -40l139 -298l-116 -69q117 -39 240 -39t240 39l-116 69l139 298l326 40z" />
+<glyph unicode="&#xf1e4;" horiz-adv-x="1792" d="M448 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM256 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM832 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23 v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM640 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM66 768q-28 0 -47 19t-19 46v129h514v-129q0 -27 -19 -46t-46 -19h-383zM1216 224v-192q0 -14 -9 -23t-23 -9h-192 q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1024 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1600 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23 zM1408 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 1016v-13h-514v10q0 104 -382 102q-382 -1 -382 -102v-10h-514v13q0 17 8.5 43t34 64t65.5 75.5t110.5 76t160 67.5t224 47.5t293.5 18.5t293 -18.5t224 -47.5 t160.5 -67.5t110.5 -76t65.5 -75.5t34 -64t8.5 -43zM1792 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 962v-129q0 -27 -19 -46t-46 -19h-384q-27 0 -46 19t-19 46v129h514z" />
+<glyph unicode="&#xf1e5;" horiz-adv-x="1792" d="M704 1216v-768q0 -26 -19 -45t-45 -19v-576q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v512l249 873q7 23 31 23h424zM1024 1216v-704h-256v704h256zM1792 320v-512q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v576q-26 0 -45 19t-19 45v768h424q24 0 31 -23z M736 1504v-224h-352v224q0 14 9 23t23 9h288q14 0 23 -9t9 -23zM1408 1504v-224h-352v224q0 14 9 23t23 9h288q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf1e6;" horiz-adv-x="1792" d="M1755 1083q37 -37 37 -90t-37 -91l-401 -400l150 -150l-160 -160q-163 -163 -389.5 -186.5t-411.5 100.5l-362 -362h-181v181l362 362q-124 185 -100.5 411.5t186.5 389.5l160 160l150 -150l400 401q38 37 91 37t90 -37t37 -90.5t-37 -90.5l-400 -401l234 -234l401 400 q38 37 91 37t90 -37z" />
+<glyph unicode="&#xf1e7;" horiz-adv-x="1792" d="M873 796q0 -83 -63.5 -142.5t-152.5 -59.5t-152.5 59.5t-63.5 142.5q0 84 63.5 143t152.5 59t152.5 -59t63.5 -143zM1375 796q0 -83 -63 -142.5t-153 -59.5q-89 0 -152.5 59.5t-63.5 142.5q0 84 63.5 143t152.5 59q90 0 153 -59t63 -143zM1600 616v667q0 87 -32 123.5 t-111 36.5h-1112q-83 0 -112.5 -34t-29.5 -126v-673q43 -23 88.5 -40t81 -28t81 -18.5t71 -11t70 -4t58.5 -0.5t56.5 2t44.5 2q68 1 95 -27q6 -6 10 -9q26 -25 61 -51q7 91 118 87q5 0 36.5 -1.5t43 -2t45.5 -1t53 1t54.5 4.5t61 8.5t62 13.5t67 19.5t67.5 27t72 34.5z M1763 621q-121 -149 -372 -252q84 -285 -23 -465q-66 -113 -183 -148q-104 -32 -182 15q-86 51 -82 164l-1 326v1q-8 2 -24.5 6t-23.5 5l-1 -338q4 -114 -83 -164q-79 -47 -183 -15q-117 36 -182 150q-105 180 -22 463q-251 103 -372 252q-25 37 -4 63t60 -1q3 -2 11 -7 t11 -8v694q0 72 47 123t114 51h1257q67 0 114 -51t47 -123v-694l21 15q39 27 60 1t-4 -63z" />
+<glyph unicode="&#xf1e8;" horiz-adv-x="1792" d="M896 1102v-434h-145v434h145zM1294 1102v-434h-145v434h145zM1294 342l253 254v795h-1194v-1049h326v-217l217 217h398zM1692 1536v-1013l-434 -434h-326l-217 -217h-217v217h-398v1158l109 289h1483z" />
+<glyph unicode="&#xf1e9;" d="M773 217v-127q-1 -292 -6 -305q-12 -32 -51 -40q-54 -9 -181.5 38t-162.5 89q-13 15 -17 36q-1 12 4 26q4 10 34 47t181 216q1 0 60 70q15 19 39.5 24.5t49.5 -3.5q24 -10 37.5 -29t12.5 -42zM624 468q-3 -55 -52 -70l-120 -39q-275 -88 -292 -88q-35 2 -54 36 q-12 25 -17 75q-8 76 1 166.5t30 124.5t56 32q13 0 202 -77q70 -29 115 -47l84 -34q23 -9 35.5 -30.5t11.5 -48.5zM1450 171q-7 -54 -91.5 -161t-135.5 -127q-37 -14 -63 7q-14 10 -184 287l-47 77q-14 21 -11.5 46t19.5 46q35 43 83 26q1 -1 119 -40q203 -66 242 -79.5 t47 -20.5q28 -22 22 -61zM778 803q5 -102 -54 -122q-58 -17 -114 71l-378 598q-8 35 19 62q41 43 207.5 89.5t224.5 31.5q40 -10 49 -45q3 -18 22 -305.5t24 -379.5zM1440 695q3 -39 -26 -59q-15 -10 -329 -86q-67 -15 -91 -23l1 2q-23 -6 -46 4t-37 32q-30 47 0 87 q1 1 75 102q125 171 150 204t34 39q28 19 65 2q48 -23 123 -133.5t81 -167.5v-3z" />
+<glyph unicode="&#xf1ea;" horiz-adv-x="2048" d="M1024 1024h-384v-384h384v384zM1152 384v-128h-640v128h640zM1152 1152v-640h-640v640h640zM1792 384v-128h-512v128h512zM1792 640v-128h-512v128h512zM1792 896v-128h-512v128h512zM1792 1152v-128h-512v128h512zM256 192v960h-128v-960q0 -26 19 -45t45 -19t45 19 t19 45zM1920 192v1088h-1536v-1088q0 -33 -11 -64h1483q26 0 45 19t19 45zM2048 1408v-1216q0 -80 -56 -136t-136 -56h-1664q-80 0 -136 56t-56 136v1088h256v128h1792z" />
+<glyph unicode="&#xf1eb;" horiz-adv-x="2048" d="M1024 13q-20 0 -93 73.5t-73 93.5q0 32 62.5 54t103.5 22t103.5 -22t62.5 -54q0 -20 -73 -93.5t-93 -73.5zM1294 284q-2 0 -40 25t-101.5 50t-128.5 25t-128.5 -25t-101 -50t-40.5 -25q-18 0 -93.5 75t-75.5 93q0 13 10 23q78 77 196 121t233 44t233 -44t196 -121 q10 -10 10 -23q0 -18 -75.5 -93t-93.5 -75zM1567 556q-11 0 -23 8q-136 105 -252 154.5t-268 49.5q-85 0 -170.5 -22t-149 -53t-113.5 -62t-79 -53t-31 -22q-17 0 -92 75t-75 93q0 12 10 22q132 132 320 205t380 73t380 -73t320 -205q10 -10 10 -22q0 -18 -75 -93t-92 -75z M1838 827q-11 0 -22 9q-179 157 -371.5 236.5t-420.5 79.5t-420.5 -79.5t-371.5 -236.5q-11 -9 -22 -9q-17 0 -92.5 75t-75.5 93q0 13 10 23q187 186 445 288t527 102t527 -102t445 -288q10 -10 10 -23q0 -18 -75.5 -93t-92.5 -75z" />
+<glyph unicode="&#xf1ec;" horiz-adv-x="1792" d="M384 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM384 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5 t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1152 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5 t37.5 90.5zM384 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1152 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 768q0 53 -37.5 90.5t-90.5 37.5 t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1536 0v384q0 52 -38 90t-90 38t-90 -38t-38 -90v-384q0 -52 38 -90t90 -38t90 38t38 90zM1152 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5z M1536 1088v256q0 26 -19 45t-45 19h-1280q-26 0 -45 -19t-19 -45v-256q0 -26 19 -45t45 -19h1280q26 0 45 19t19 45zM1536 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 1408v-1536q0 -52 -38 -90t-90 -38 h-1408q-52 0 -90 38t-38 90v1536q0 52 38 90t90 38h1408q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf1ed;" horiz-adv-x="1792" d="M1112 1090q0 159 -237 159h-70q-32 0 -59.5 -21.5t-34.5 -52.5l-63 -276q-2 -5 -2 -16q0 -24 17 -39.5t41 -15.5h53q69 0 128.5 13t112.5 41t83.5 81.5t30.5 126.5zM1716 938q0 -265 -220 -428q-219 -161 -612 -161h-61q-32 0 -59 -21.5t-34 -52.5l-73 -316 q-8 -36 -40.5 -61.5t-69.5 -25.5h-213q-31 0 -53 20t-22 51q0 10 13 65h151q34 0 64 23.5t38 56.5l73 316q8 33 37.5 57t63.5 24h61q390 0 607 160t217 421q0 129 -51 207q183 -92 183 -335zM1533 1123q0 -264 -221 -428q-218 -161 -612 -161h-60q-32 0 -59.5 -22t-34.5 -53 l-73 -315q-8 -36 -40 -61.5t-69 -25.5h-214q-31 0 -52.5 19.5t-21.5 51.5q0 8 2 20l300 1301q8 36 40.5 61.5t69.5 25.5h444q68 0 125 -4t120.5 -15t113.5 -30t96.5 -50.5t77.5 -74t49.5 -103.5t18.5 -136z" />
+<glyph unicode="&#xf1ee;" horiz-adv-x="1792" d="M602 949q19 -61 31 -123.5t17 -141.5t-14 -159t-62 -145q-21 81 -67 157t-95.5 127t-99 90.5t-78.5 57.5t-33 19q-62 34 -81.5 100t14.5 128t101 81.5t129 -14.5q138 -83 238 -177zM927 1236q11 -25 20.5 -46t36.5 -100.5t42.5 -150.5t25.5 -179.5t0 -205.5t-47.5 -209.5 t-105.5 -208.5q-51 -72 -138 -72q-54 0 -98 31q-57 40 -69 109t28 127q60 85 81 195t13 199.5t-32 180.5t-39 128t-22 52q-31 63 -8.5 129.5t85.5 97.5q34 17 75 17q47 0 88.5 -25t63.5 -69zM1248 567q-17 -160 -72 -311q-17 131 -63 246q25 174 -5 361q-27 178 -94 342 q114 -90 212 -211q9 -37 15 -80q26 -179 7 -347zM1520 1440q9 -17 23.5 -49.5t43.5 -117.5t50.5 -178t34 -227.5t5 -269t-47 -300t-112.5 -323.5q-22 -48 -66 -75.5t-95 -27.5q-39 0 -74 16q-67 31 -92.5 100t4.5 136q58 126 90 257.5t37.5 239.5t-3.5 213.5t-26.5 180.5 t-38.5 138.5t-32.5 90t-15.5 32.5q-34 65 -11.5 135.5t87.5 104.5q37 20 81 20q49 0 91.5 -25.5t66.5 -70.5z" />
+<glyph unicode="&#xf1f0;" horiz-adv-x="2304" d="M1975 546h-138q14 37 66 179l3 9q4 10 10 26t9 26l12 -55zM531 611l-58 295q-11 54 -75 54h-268l-2 -13q311 -79 403 -336zM710 960l-162 -438l-17 89q-26 70 -85 129.5t-131 88.5l135 -510h175l261 641h-176zM849 318h166l104 642h-166zM1617 944q-69 27 -149 27 q-123 0 -201 -59t-79 -153q-1 -102 145 -174q48 -23 67 -41t19 -39q0 -30 -30 -46t-69 -16q-86 0 -156 33l-22 11l-23 -144q74 -34 185 -34q130 -1 208.5 59t80.5 160q0 106 -140 174q-49 25 -71 42t-22 38q0 22 24.5 38.5t70.5 16.5q70 1 124 -24l15 -8zM2042 960h-128 q-65 0 -87 -54l-246 -588h174l35 96h212q5 -22 20 -96h154zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf1f1;" horiz-adv-x="2304" d="M671 603h-13q-47 0 -47 -32q0 -22 20 -22q17 0 28 15t12 39zM1066 639h62v3q1 4 0.5 6.5t-1 7t-2 8t-4.5 6.5t-7.5 5t-11.5 2q-28 0 -36 -38zM1606 603h-12q-48 0 -48 -32q0 -22 20 -22q17 0 28 15t12 39zM1925 629q0 41 -30 41q-19 0 -31 -20t-12 -51q0 -42 28 -42 q20 0 32.5 20t12.5 52zM480 770h87l-44 -262h-56l32 201l-71 -201h-39l-4 200l-34 -200h-53l44 262h81l2 -163zM733 663q0 -6 -4 -42q-16 -101 -17 -113h-47l1 22q-20 -26 -58 -26q-23 0 -37.5 16t-14.5 42q0 39 26 60.5t73 21.5q14 0 23 -1q0 3 0.5 5.5t1 4.5t0.5 3 q0 20 -36 20q-29 0 -59 -10q0 4 7 48q38 11 67 11q74 0 74 -62zM889 721l-8 -49q-22 3 -41 3q-27 0 -27 -17q0 -8 4.5 -12t21.5 -11q40 -19 40 -60q0 -72 -87 -71q-34 0 -58 6q0 2 7 49q29 -8 51 -8q32 0 32 19q0 7 -4.5 11.5t-21.5 12.5q-43 20 -43 59q0 72 84 72 q30 0 50 -4zM977 721h28l-7 -52h-29q-2 -17 -6.5 -40.5t-7 -38.5t-2.5 -18q0 -16 19 -16q8 0 16 2l-8 -47q-21 -7 -40 -7q-43 0 -45 47q0 12 8 56q3 20 25 146h55zM1180 648q0 -23 -7 -52h-111q-3 -22 10 -33t38 -11q30 0 58 14l-9 -54q-30 -8 -57 -8q-95 0 -95 95 q0 55 27.5 90.5t69.5 35.5q35 0 55.5 -21t20.5 -56zM1319 722q-13 -23 -22 -62q-22 2 -31 -24t-25 -128h-56l3 14q22 130 29 199h51l-3 -33q14 21 25.5 29.5t28.5 4.5zM1506 763l-9 -57q-28 14 -50 14q-31 0 -51 -27.5t-20 -70.5q0 -30 13.5 -47t38.5 -17q21 0 48 13 l-10 -59q-28 -8 -50 -8q-45 0 -71.5 30.5t-26.5 82.5q0 70 35.5 114.5t91.5 44.5q26 0 61 -13zM1668 663q0 -18 -4 -42q-13 -79 -17 -113h-46l1 22q-20 -26 -59 -26q-23 0 -37 16t-14 42q0 39 25.5 60.5t72.5 21.5q15 0 23 -1q2 7 2 13q0 20 -36 20q-29 0 -59 -10q0 4 8 48 q38 11 67 11q73 0 73 -62zM1809 722q-14 -24 -21 -62q-23 2 -31.5 -23t-25.5 -129h-56l3 14q19 104 29 199h52q0 -11 -4 -33q15 21 26.5 29.5t27.5 4.5zM1950 770h56l-43 -262h-53l3 19q-23 -23 -52 -23q-31 0 -49.5 24t-18.5 64q0 53 27.5 92t64.5 39q31 0 53 -29z M2061 640q0 148 -72.5 273t-198 198t-273.5 73q-181 0 -328 -110q127 -116 171 -284h-50q-44 150 -158 253q-114 -103 -158 -253h-50q44 168 171 284q-147 110 -328 110q-148 0 -273.5 -73t-198 -198t-72.5 -273t72.5 -273t198 -198t273.5 -73q181 0 328 110 q-120 111 -165 264h50q46 -138 152 -233q106 95 152 233h50q-45 -153 -165 -264q147 -110 328 -110q148 0 273.5 73t198 198t72.5 273zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf1f2;" horiz-adv-x="2304" d="M313 759q0 -51 -36 -84q-29 -26 -89 -26h-17v220h17q61 0 89 -27q36 -31 36 -83zM2089 824q0 -52 -64 -52h-19v101h20q63 0 63 -49zM380 759q0 74 -50 120.5t-129 46.5h-95v-333h95q74 0 119 38q60 51 60 128zM410 593h65v333h-65v-333zM730 694q0 40 -20.5 62t-75.5 42 q-29 10 -39.5 19t-10.5 23q0 16 13.5 26.5t34.5 10.5q29 0 53 -27l34 44q-41 37 -98 37q-44 0 -74 -27.5t-30 -67.5q0 -35 18 -55.5t64 -36.5q37 -13 45 -19q19 -12 19 -34q0 -20 -14 -33.5t-36 -13.5q-48 0 -71 44l-42 -40q44 -64 115 -64q51 0 83 30.5t32 79.5zM1008 604 v77q-37 -37 -78 -37q-49 0 -80.5 32.5t-31.5 82.5q0 48 31.5 81.5t77.5 33.5q43 0 81 -38v77q-40 20 -80 20q-74 0 -125.5 -50.5t-51.5 -123.5t51 -123.5t125 -50.5q42 0 81 19zM2240 0v527q-65 -40 -144.5 -84t-237.5 -117t-329.5 -137.5t-417.5 -134.5t-504 -118h1569 q26 0 45 19t19 45zM1389 757q0 75 -53 128t-128 53t-128 -53t-53 -128t53 -128t128 -53t128 53t53 128zM1541 584l144 342h-71l-90 -224l-89 224h-71l142 -342h35zM1714 593h184v56h-119v90h115v56h-115v74h119v57h-184v-333zM2105 593h80l-105 140q76 16 76 94q0 47 -31 73 t-87 26h-97v-333h65v133h9zM2304 1274v-1268q0 -56 -38.5 -95t-93.5 -39h-2040q-55 0 -93.5 39t-38.5 95v1268q0 56 38.5 95t93.5 39h2040q55 0 93.5 -39t38.5 -95z" />
+<glyph unicode="&#xf1f3;" horiz-adv-x="2304" d="M119 854h89l-45 108zM740 328l74 79l-70 79h-163v-49h142v-55h-142v-54h159zM898 406l99 -110v217zM1186 453q0 33 -40 33h-84v-69h83q41 0 41 36zM1475 457q0 29 -42 29h-82v-61h81q43 0 43 32zM1197 923q0 29 -42 29h-82v-60h81q43 0 43 31zM1656 854h89l-44 108z M699 1009v-271h-66v212l-94 -212h-57l-94 212v-212h-132l-25 60h-135l-25 -60h-70l116 271h96l110 -257v257h106l85 -184l77 184h108zM1255 453q0 -20 -5.5 -35t-14 -25t-22.5 -16.5t-26 -10t-31.5 -4.5t-31.5 -1t-32.5 0.5t-29.5 0.5v-91h-126l-80 90l-83 -90h-256v271h260 l80 -89l82 89h207q109 0 109 -89zM964 794v-56h-217v271h217v-57h-152v-49h148v-55h-148v-54h152zM2304 235v-229q0 -55 -38.5 -94.5t-93.5 -39.5h-2040q-55 0 -93.5 39.5t-38.5 94.5v678h111l25 61h55l25 -61h218v46l19 -46h113l20 47v-47h541v99l10 1q10 0 10 -14v-86h279 v23q23 -12 55 -18t52.5 -6.5t63 0.5t51.5 1l25 61h56l25 -61h227v58l34 -58h182v378h-180v-44l-25 44h-185v-44l-23 44h-249q-69 0 -109 -22v22h-172v-22q-24 22 -73 22h-628l-43 -97l-43 97h-198v-44l-22 44h-169l-78 -179v391q0 55 38.5 94.5t93.5 39.5h2040 q55 0 93.5 -39.5t38.5 -94.5v-678h-120q-51 0 -81 -22v22h-177q-55 0 -78 -22v22h-316v-22q-31 22 -87 22h-209v-22q-23 22 -91 22h-234l-54 -58l-50 58h-349v-378h343l55 59l52 -59h211v89h21q59 0 90 13v-102h174v99h8q8 0 10 -2t2 -10v-87h529q57 0 88 24v-24h168 q60 0 95 17zM1546 469q0 -23 -12 -43t-34 -29q25 -9 34 -26t9 -46v-54h-65v45q0 33 -12 43.5t-46 10.5h-69v-99h-65v271h154q48 0 77 -15t29 -58zM1269 936q0 -24 -12.5 -44t-33.5 -29q26 -9 34.5 -25.5t8.5 -46.5v-53h-65q0 9 0.5 26.5t0 25t-3 18.5t-8.5 16t-17.5 8.5 t-29.5 3.5h-70v-98h-64v271l153 -1q49 0 78 -14.5t29 -57.5zM1798 327v-56h-216v271h216v-56h-151v-49h148v-55h-148v-54zM1372 1009v-271h-66v271h66zM2065 357q0 -86 -102 -86h-126v58h126q34 0 34 25q0 16 -17 21t-41.5 5t-49.5 3.5t-42 22.5t-17 55q0 39 26 60t66 21 h130v-57h-119q-36 0 -36 -25q0 -16 17.5 -20.5t42 -4t49 -2.5t42 -21.5t17.5 -54.5zM2304 407v-101q-24 -35 -88 -35h-125v58h125q33 0 33 25q0 13 -12.5 19t-31 5.5t-40 2t-40 8t-31 24t-12.5 48.5q0 39 26.5 60t66.5 21h129v-57h-118q-36 0 -36 -25q0 -20 29 -22t68.5 -5 t56.5 -26zM2139 1008v-270h-92l-122 203v-203h-132l-26 60h-134l-25 -60h-75q-129 0 -129 133q0 138 133 138h63v-59q-7 0 -28 1t-28.5 0.5t-23 -2t-21.5 -6.5t-14.5 -13.5t-11.5 -23t-3 -33.5q0 -38 13.5 -58t49.5 -20h29l92 213h97l109 -256v256h99l114 -188v188h66z" />
+<glyph unicode="&#xf1f4;" horiz-adv-x="2304" d="M322 689h-15q-19 0 -19 18q0 28 19 85q5 15 15 19.5t28 4.5q77 0 77 -49q0 -41 -30.5 -59.5t-74.5 -18.5zM664 528q-47 0 -47 29q0 62 123 62l3 -3q-5 -88 -79 -88zM1438 687h-15q-19 0 -19 19q0 28 19 85q5 15 14.5 19t28.5 4q77 0 77 -49q0 -41 -30.5 -59.5 t-74.5 -18.5zM1780 527q-47 0 -47 30q0 62 123 62l3 -3q-5 -89 -79 -89zM373 894h-128q-8 0 -14.5 -4t-8.5 -7.5t-7 -12.5q-3 -7 -45 -190t-42 -192q0 -7 5.5 -12.5t13.5 -5.5h62q25 0 32.5 34.5l15 69t32.5 34.5q47 0 87.5 7.5t80.5 24.5t63.5 52.5t23.5 84.5 q0 36 -14.5 61t-41 36.5t-53.5 15.5t-62 4zM719 798q-38 0 -74 -6q-2 0 -8.5 -1t-9 -1.5l-7.5 -1.5t-7.5 -2t-6.5 -3t-6.5 -4t-5 -5t-4.5 -7t-4 -9q-9 -29 -9 -39t9 -10q5 0 21.5 5t19.5 6q30 8 58 8q74 0 74 -36q0 -11 -10 -14q-8 -2 -18 -3t-21.5 -1.5t-17.5 -1.5 q-38 -4 -64.5 -10t-56.5 -19.5t-45.5 -39t-15.5 -62.5q0 -38 26 -59.5t64 -21.5q24 0 45.5 6.5t33 13t38.5 23.5q-3 -7 -3 -15t5.5 -13.5t12.5 -5.5h56q1 1 7 3.5t7.5 3.5t5 3.5t5 5.5t2.5 8l45 194q4 13 4 30q0 81 -145 81zM1247 793h-74q-22 0 -39 -23q-5 -7 -29.5 -51 t-46.5 -81.5t-26 -38.5l-5 4q0 77 -27 166q-1 5 -3.5 8.5t-6 6.5t-6.5 5t-8.5 3t-8.5 1.5t-9.5 1t-9 0.5h-10h-8.5q-38 0 -38 -21l1 -5q5 -53 25 -151t25 -143q2 -16 2 -24q0 -19 -30.5 -61.5t-30.5 -58.5q0 -13 40 -13q61 0 76 25l245 415q10 20 10 26q0 9 -8 9zM1489 892 h-129q-18 0 -29 -23q-6 -13 -46.5 -191.5t-40.5 -190.5q0 -20 43 -20h7.5h9h9t9.5 1t8.5 2t8.5 3t6.5 4.5t5.5 6t3 8.5l21 91q2 10 10.5 17t19.5 7q47 0 87.5 7t80.5 24.5t63.5 52.5t23.5 84q0 36 -14.5 61t-41 36.5t-53.5 15.5t-62 4zM1835 798q-26 0 -74 -6 q-38 -6 -48 -16q-7 -8 -11 -19q-8 -24 -8 -39q0 -10 8 -10q1 0 41 12q30 8 58 8q74 0 74 -36q0 -12 -10 -14q-4 -1 -57 -7q-38 -4 -64.5 -10t-56.5 -19.5t-45.5 -39t-15.5 -62.5t26 -58.5t64 -21.5q24 0 45 6t34 13t38 24q-3 -15 -3 -16q0 -5 2 -8.5t6.5 -5.5t8 -3.5 t10.5 -2t9.5 -0.5h9.5h8q42 0 48 25l45 194q3 15 3 31q0 81 -145 81zM2157 889h-55q-25 0 -33 -40q-10 -44 -36.5 -167t-42.5 -190v-5q0 -16 16 -18h1h57q10 0 18.5 6.5t10.5 16.5l83 374h-1l1 5q0 7 -5.5 12.5t-13.5 5.5zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048 q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf1f5;" horiz-adv-x="2304" d="M1597 633q0 -69 -21 -106q-19 -35 -52 -35q-23 0 -41 9v224q29 30 57 30q57 0 57 -122zM2035 669h-110q6 98 56 98q51 0 54 -98zM476 534q0 59 -33 91.5t-101 57.5q-36 13 -52 24t-16 25q0 26 38 26q58 0 124 -33l18 112q-67 32 -149 32q-77 0 -123 -38q-48 -39 -48 -109 q0 -58 32.5 -90.5t99.5 -56.5q39 -14 54.5 -25.5t15.5 -27.5q0 -31 -48 -31q-29 0 -70 12.5t-72 30.5l-18 -113q72 -41 168 -41q81 0 129 37q51 41 51 117zM771 749l19 111h-96v135l-129 -21l-18 -114l-46 -8l-17 -103h62v-219q0 -84 44 -120q38 -30 111 -30q32 0 79 11v118 q-32 -7 -44 -7q-42 0 -42 50v197h77zM1087 724v139q-15 3 -28 3q-32 0 -55.5 -16t-33.5 -46l-10 56h-131v-471h150v306q26 31 82 31q16 0 26 -2zM1124 389h150v471h-150v-471zM1746 638q0 122 -45 179q-40 52 -111 52q-64 0 -117 -56l-8 47h-132v-645l150 25v151 q36 -11 68 -11q83 0 134 56q61 65 61 202zM1278 986q0 33 -23 56t-56 23t-56 -23t-23 -56t23 -56.5t56 -23.5t56 23.5t23 56.5zM2176 629q0 113 -48 176q-50 64 -144 64q-96 0 -151.5 -66t-55.5 -180q0 -128 63 -188q55 -55 161 -55q101 0 160 40l-16 103q-57 -31 -128 -31 q-43 0 -63 19q-23 19 -28 66h248q2 14 2 52zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf1f6;" horiz-adv-x="2048" d="M1558 684q61 -356 298 -556q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-180.5 74.5t-75.5 180.5zM1024 -176q16 0 16 16t-16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5zM2026 1424q8 -10 7.5 -23.5t-10.5 -22.5 l-1872 -1622q-10 -8 -23.5 -7t-21.5 11l-84 96q-8 10 -7.5 23.5t10.5 21.5l186 161q-19 32 -19 66q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q124 -18 219 -82.5t148 -157.5 l418 363q10 8 23.5 7t21.5 -11z" />
+<glyph unicode="&#xf1f7;" horiz-adv-x="2048" d="M1040 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM503 315l877 760q-42 88 -132.5 146.5t-223.5 58.5q-93 0 -169.5 -31.5t-121.5 -80.5t-69 -103t-24 -105q0 -384 -137 -645zM1856 128 q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-180.5 74.5t-75.5 180.5l149 129h757q-166 187 -227 459l111 97q61 -356 298 -556zM1942 1520l84 -96q8 -10 7.5 -23.5t-10.5 -22.5l-1872 -1622q-10 -8 -23.5 -7t-21.5 11l-84 96q-8 10 -7.5 23.5t10.5 21.5l186 161 q-19 32 -19 66q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q124 -18 219 -82.5t148 -157.5l418 363q10 8 23.5 7t21.5 -11z" />
+<glyph unicode="&#xf1f8;" horiz-adv-x="1408" d="M512 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM768 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1024 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704 q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM1408 1120v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h309l70 167 q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf1f9;" d="M1150 462v-109q0 -50 -36.5 -89t-94 -60.5t-118 -32.5t-117.5 -11q-205 0 -342.5 139t-137.5 346q0 203 136 339t339 136q34 0 75.5 -4.5t93 -18t92.5 -34t69 -56.5t28 -81v-109q0 -16 -16 -16h-118q-16 0 -16 16v70q0 43 -65.5 67.5t-137.5 24.5q-140 0 -228.5 -91.5 t-88.5 -237.5q0 -151 91.5 -249.5t233.5 -98.5q68 0 138 24t70 66v70q0 7 4.5 11.5t10.5 4.5h119q6 0 11 -4.5t5 -11.5zM768 1280q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5 t-51 248.5t-136.5 204t-204 136.5t-248.5 51zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf1fa;" d="M972 761q0 108 -53.5 169t-147.5 61q-63 0 -124 -30.5t-110 -84.5t-79.5 -137t-30.5 -180q0 -112 53.5 -173t150.5 -61q96 0 176 66.5t122.5 166t42.5 203.5zM1536 640q0 -111 -37 -197t-98.5 -135t-131.5 -74.5t-145 -27.5q-6 0 -15.5 -0.5t-16.5 -0.5q-95 0 -142 53 q-28 33 -33 83q-52 -66 -131.5 -110t-173.5 -44q-161 0 -249.5 95.5t-88.5 269.5q0 157 66 290t179 210.5t246 77.5q87 0 155 -35.5t106 -99.5l2 19l11 56q1 6 5.5 12t9.5 6h118q5 0 13 -11q5 -5 3 -16l-120 -614q-5 -24 -5 -48q0 -39 12.5 -52t44.5 -13q28 1 57 5.5t73 24 t77 50t57 89.5t24 137q0 292 -174 466t-466 174q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51q228 0 405 144q11 9 24 8t21 -12l41 -49q8 -12 7 -24q-2 -13 -12 -22q-102 -83 -227.5 -128t-258.5 -45q-156 0 -298 61 t-245 164t-164 245t-61 298t61 298t164 245t245 164t298 61q344 0 556 -212t212 -556z" />
+<glyph unicode="&#xf1fb;" horiz-adv-x="1792" d="M1698 1442q94 -94 94 -226.5t-94 -225.5l-225 -223l104 -104q10 -10 10 -23t-10 -23l-210 -210q-10 -10 -23 -10t-23 10l-105 105l-603 -603q-37 -37 -90 -37h-203l-256 -128l-64 64l128 256v203q0 53 37 90l603 603l-105 105q-10 10 -10 23t10 23l210 210q10 10 23 10 t23 -10l104 -104l223 225q93 94 225.5 94t226.5 -94zM512 64l576 576l-192 192l-576 -576v-192h192z" />
+<glyph unicode="&#xf1fc;" horiz-adv-x="1792" d="M1615 1536q70 0 122.5 -46.5t52.5 -116.5q0 -63 -45 -151q-332 -629 -465 -752q-97 -91 -218 -91q-126 0 -216.5 92.5t-90.5 219.5q0 128 92 212l638 579q59 54 130 54zM706 502q39 -76 106.5 -130t150.5 -76l1 -71q4 -213 -129.5 -347t-348.5 -134q-123 0 -218 46.5 t-152.5 127.5t-86.5 183t-29 220q7 -5 41 -30t62 -44.5t59 -36.5t46 -17q41 0 55 37q25 66 57.5 112.5t69.5 76t88 47.5t103 25.5t125 10.5z" />
+<glyph unicode="&#xf1fd;" horiz-adv-x="1792" d="M1792 128v-384h-1792v384q45 0 85 14t59 27.5t47 37.5q30 27 51.5 38t56.5 11t55.5 -11t52.5 -38q29 -25 47 -38t58 -27t86 -14q45 0 85 14.5t58 27t48 37.5q21 19 32.5 27t31 15t43.5 7q35 0 56.5 -11t51.5 -38q28 -24 47 -37.5t59 -27.5t85 -14t85 14t59 27.5t47 37.5 q30 27 51.5 38t56.5 11q34 0 55.5 -11t51.5 -38q28 -24 47 -37.5t59 -27.5t85 -14zM1792 448v-192q-35 0 -55.5 11t-52.5 38q-29 25 -47 38t-58 27t-85 14q-46 0 -86 -14t-58 -27t-47 -38q-22 -19 -33 -27t-31 -15t-44 -7q-35 0 -56.5 11t-51.5 38q-29 25 -47 38t-58 27 t-86 14q-45 0 -85 -14.5t-58 -27t-48 -37.5q-21 -19 -32.5 -27t-31 -15t-43.5 -7q-35 0 -56.5 11t-51.5 38q-28 24 -47 37.5t-59 27.5t-85 14q-46 0 -86 -14t-58 -27t-47 -38q-30 -27 -51.5 -38t-56.5 -11v192q0 80 56 136t136 56h64v448h256v-448h256v448h256v-448h256v448 h256v-448h64q80 0 136 -56t56 -136zM512 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5q0 29 9.5 51t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150zM1024 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5q0 29 9.5 51 t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150zM1536 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5q0 29 9.5 51t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150z" />
+<glyph unicode="&#xf1fe;" horiz-adv-x="2048" d="M2048 0v-128h-2048v1536h128v-1408h1920zM1664 1024l256 -896h-1664v576l448 576l576 -576z" />
+<glyph unicode="&#xf200;" horiz-adv-x="1792" d="M768 646l546 -546q-106 -108 -247.5 -168t-298.5 -60q-209 0 -385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103v-762zM955 640h773q0 -157 -60 -298.5t-168 -247.5zM1664 768h-768v768q209 0 385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf201;" horiz-adv-x="2048" d="M2048 0v-128h-2048v1536h128v-1408h1920zM1920 1248v-435q0 -21 -19.5 -29.5t-35.5 7.5l-121 121l-633 -633q-10 -10 -23 -10t-23 10l-233 233l-416 -416l-192 192l585 585q10 10 23 10t23 -10l233 -233l464 464l-121 121q-16 16 -7.5 35.5t29.5 19.5h435q14 0 23 -9 t9 -23z" />
+<glyph unicode="&#xf202;" horiz-adv-x="1792" d="M1292 832q0 -6 10 -41q10 -29 25 -49.5t41 -34t44 -20t55 -16.5q325 -91 325 -332q0 -146 -105.5 -242.5t-254.5 -96.5q-59 0 -111.5 18.5t-91.5 45.5t-77 74.5t-63 87.5t-53.5 103.5t-43.5 103t-39.5 106.5t-35.5 95q-32 81 -61.5 133.5t-73.5 96.5t-104 64t-142 20 q-96 0 -183 -55.5t-138 -144.5t-51 -185q0 -160 106.5 -279.5t263.5 -119.5q177 0 258 95q56 63 83 116l84 -152q-15 -34 -44 -70l1 -1q-131 -152 -388 -152q-147 0 -269.5 79t-190.5 207.5t-68 274.5q0 105 43.5 206t116 176.5t172 121.5t204.5 46q87 0 159 -19t123.5 -50 t95 -80t72.5 -99t58.5 -117t50.5 -124.5t50 -130.5t55 -127q96 -200 233 -200q81 0 138.5 48.5t57.5 128.5q0 42 -19 72t-50.5 46t-72.5 31.5t-84.5 27t-87.5 34t-81 52t-65 82t-39 122.5q-3 16 -3 33q0 110 87.5 192t198.5 78q78 -3 120.5 -14.5t90.5 -53.5h-1 q12 -11 23 -24.5t26 -36t19 -27.5l-129 -99q-26 49 -54 70v1q-23 21 -97 21q-49 0 -84 -33t-35 -83z" />
+<glyph unicode="&#xf203;" d="M1432 484q0 173 -234 239q-35 10 -53 16.5t-38 25t-29 46.5q0 2 -2 8.5t-3 12t-1 7.5q0 36 24.5 59.5t60.5 23.5q54 0 71 -15h-1q20 -15 39 -51l93 71q-39 54 -49 64q-33 29 -67.5 39t-85.5 10q-80 0 -142 -57.5t-62 -137.5q0 -7 2 -23q16 -96 64.5 -140t148.5 -73 q29 -8 49 -15.5t45 -21.5t38.5 -34.5t13.5 -46.5v-5q1 -58 -40.5 -93t-100.5 -35q-97 0 -167 144q-23 47 -51.5 121.5t-48 125.5t-54 110.5t-74 95.5t-103.5 60.5t-147 24.5q-101 0 -192 -56t-144 -148t-50 -192v-1q4 -108 50.5 -199t133.5 -147.5t196 -56.5q186 0 279 110 q20 27 31 51l-60 109q-42 -80 -99 -116t-146 -36q-115 0 -191 87t-76 204q0 105 82 189t186 84q112 0 170 -53.5t104 -172.5q8 -21 25.5 -68.5t28.5 -76.5t31.5 -74.5t38.5 -74t45.5 -62.5t55.5 -53.5t66 -33t80 -13.5q107 0 183 69.5t76 174.5zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf204;" horiz-adv-x="2048" d="M1152 640q0 104 -40.5 198.5t-109.5 163.5t-163.5 109.5t-198.5 40.5t-198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5t198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5zM1920 640q0 104 -40.5 198.5 t-109.5 163.5t-163.5 109.5t-198.5 40.5h-386q119 -90 188.5 -224t69.5 -288t-69.5 -288t-188.5 -224h386q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5zM2048 640q0 -130 -51 -248.5t-136.5 -204t-204 -136.5t-248.5 -51h-768q-130 0 -248.5 51t-204 136.5 t-136.5 204t-51 248.5t51 248.5t136.5 204t204 136.5t248.5 51h768q130 0 248.5 -51t204 -136.5t136.5 -204t51 -248.5z" />
+<glyph unicode="&#xf205;" horiz-adv-x="2048" d="M0 640q0 130 51 248.5t136.5 204t204 136.5t248.5 51h768q130 0 248.5 -51t204 -136.5t136.5 -204t51 -248.5t-51 -248.5t-136.5 -204t-204 -136.5t-248.5 -51h-768q-130 0 -248.5 51t-204 136.5t-136.5 204t-51 248.5zM1408 128q104 0 198.5 40.5t163.5 109.5 t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5t-163.5 109.5t-198.5 40.5t-198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5z" />
+<glyph unicode="&#xf206;" horiz-adv-x="2304" d="M762 384h-314q-40 0 -57.5 35t6.5 67l188 251q-65 31 -137 31q-132 0 -226 -94t-94 -226t94 -226t226 -94q115 0 203 72.5t111 183.5zM576 512h186q-18 85 -75 148zM1056 512l288 384h-480l-99 -132q105 -103 126 -252h165zM2176 448q0 132 -94 226t-226 94 q-60 0 -121 -24l174 -260q15 -23 10 -49t-27 -40q-15 -11 -36 -11q-35 0 -53 29l-174 260q-93 -95 -93 -225q0 -132 94 -226t226 -94t226 94t94 226zM2304 448q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 97 39.5 183.5t109.5 149.5l-65 98l-353 -469 q-18 -26 -51 -26h-197q-23 -164 -149 -274t-294 -110q-185 0 -316.5 131.5t-131.5 316.5t131.5 316.5t316.5 131.5q114 0 215 -55l137 183h-224q-26 0 -45 19t-19 45t19 45t45 19h384v-128h435l-85 128h-222q-26 0 -45 19t-19 45t19 45t45 19h256q33 0 53 -28l267 -400 q91 44 192 44q185 0 316.5 -131.5t131.5 -316.5z" />
+<glyph unicode="&#xf207;" d="M384 320q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1408 320q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1362 716l-72 384q-5 23 -22.5 37.5t-40.5 14.5 h-918q-23 0 -40.5 -14.5t-22.5 -37.5l-72 -384q-5 -30 14 -53t49 -23h1062q30 0 49 23t14 53zM1136 1328q0 20 -14 34t-34 14h-640q-20 0 -34 -14t-14 -34t14 -34t34 -14h640q20 0 34 14t14 34zM1536 603v-603h-128v-128q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5v128h-768v-128q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5v128h-128v603q0 112 25 223l103 454q9 78 97.5 137t230 89t312.5 30t312.5 -30t230 -89t97.5 -137l105 -454q23 -102 23 -223z" />
+<glyph unicode="&#xf208;" horiz-adv-x="2048" d="M1463 704q0 -35 -25 -60.5t-61 -25.5h-702q-36 0 -61 25.5t-25 60.5t25 60.5t61 25.5h702q36 0 61 -25.5t25 -60.5zM1677 704q0 86 -23 170h-982q-36 0 -61 25t-25 60q0 36 25 61t61 25h908q-88 143 -235 227t-320 84q-177 0 -327.5 -87.5t-238 -237.5t-87.5 -327 q0 -86 23 -170h982q36 0 61 -25t25 -60q0 -36 -25 -61t-61 -25h-908q88 -143 235.5 -227t320.5 -84q132 0 253 51.5t208 139t139 208t52 253.5zM2048 959q0 -35 -25 -60t-61 -25h-131q17 -85 17 -170q0 -167 -65.5 -319.5t-175.5 -263t-262.5 -176t-319.5 -65.5 q-246 0 -448.5 133t-301.5 350h-189q-36 0 -61 25t-25 61q0 35 25 60t61 25h132q-17 85 -17 170q0 167 65.5 319.5t175.5 263t262.5 176t320.5 65.5q245 0 447.5 -133t301.5 -350h188q36 0 61 -25t25 -61z" />
+<glyph unicode="&#xf209;" horiz-adv-x="1280" d="M953 1158l-114 -328l117 -21q165 451 165 518q0 56 -38 56q-57 0 -130 -225zM654 471l33 -88q37 42 71 67l-33 5.5t-38.5 7t-32.5 8.5zM362 1367q0 -98 159 -521q18 10 49 10q15 0 75 -5l-121 351q-75 220 -123 220q-19 0 -29 -17.5t-10 -37.5zM283 608q0 -36 51.5 -119 t117.5 -153t100 -70q14 0 25.5 13t11.5 27q0 24 -32 102q-13 32 -32 72t-47.5 89t-61.5 81t-62 32q-20 0 -45.5 -27t-25.5 -47zM125 273q0 -41 25 -104q59 -145 183.5 -227t281.5 -82q227 0 382 170q152 169 152 427q0 43 -1 67t-11.5 62t-30.5 56q-56 49 -211.5 75.5 t-270.5 26.5q-37 0 -49 -11q-12 -5 -12 -35q0 -34 21.5 -60t55.5 -40t77.5 -23.5t87.5 -11.5t85 -4t70 0h23q24 0 40 -19q15 -19 19 -55q-28 -28 -96 -54q-61 -22 -93 -46q-64 -46 -108.5 -114t-44.5 -137q0 -31 18.5 -88.5t18.5 -87.5l-3 -12q-4 -12 -4 -14 q-137 10 -146 216q-8 -2 -41 -2q2 -7 2 -21q0 -53 -40.5 -89.5t-94.5 -36.5q-82 0 -166.5 78t-84.5 159q0 34 33 67q52 -64 60 -76q77 -104 133 -104q12 0 26.5 8.5t14.5 20.5q0 34 -87.5 145t-116.5 111q-43 0 -70 -44.5t-27 -90.5zM11 264q0 101 42.5 163t136.5 88 q-28 74 -28 104q0 62 61 123t122 61q29 0 70 -15q-163 462 -163 567q0 80 41 130.5t119 50.5q131 0 325 -581q6 -17 8 -23q6 16 29 79.5t43.5 118.5t54 127.5t64.5 123t70.5 86.5t76.5 36q71 0 112 -49t41 -122q0 -108 -159 -550q61 -15 100.5 -46t58.5 -78t26 -93.5 t7 -110.5q0 -150 -47 -280t-132 -225t-211 -150t-278 -55q-111 0 -223 42q-149 57 -258 191.5t-109 286.5z" />
+<glyph unicode="&#xf20a;" horiz-adv-x="2048" d="M785 528h207q-14 -158 -98.5 -248.5t-214.5 -90.5q-162 0 -254.5 116t-92.5 316q0 194 93 311.5t233 117.5q148 0 232 -87t97 -247h-203q-5 64 -35.5 99t-81.5 35q-57 0 -88.5 -60.5t-31.5 -177.5q0 -48 5 -84t18 -69.5t40 -51.5t66 -18q95 0 109 139zM1497 528h206 q-14 -158 -98 -248.5t-214 -90.5q-162 0 -254.5 116t-92.5 316q0 194 93 311.5t233 117.5q148 0 232 -87t97 -247h-204q-4 64 -35 99t-81 35q-57 0 -88.5 -60.5t-31.5 -177.5q0 -48 5 -84t18 -69.5t39.5 -51.5t65.5 -18q49 0 76.5 38t33.5 101zM1856 647q0 207 -15.5 307 t-60.5 161q-6 8 -13.5 14t-21.5 15t-16 11q-86 63 -697 63q-625 0 -710 -63q-5 -4 -17.5 -11.5t-21 -14t-14.5 -14.5q-45 -60 -60 -159.5t-15 -308.5q0 -208 15 -307.5t60 -160.5q6 -8 15 -15t20.5 -14t17.5 -12q44 -33 239.5 -49t470.5 -16q610 0 697 65q5 4 17 11t20.5 14 t13.5 16q46 60 61 159t15 309zM2048 1408v-1536h-2048v1536h2048z" />
+<glyph unicode="&#xf20b;" d="M992 912v-496q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v496q0 112 -80 192t-192 80h-272v-1152q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v1344q0 14 9 23t23 9h464q135 0 249 -66.5t180.5 -180.5t66.5 -249zM1376 1376v-880q0 -135 -66.5 -249t-180.5 -180.5 t-249 -66.5h-464q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h160q14 0 23 -9t9 -23v-768h272q112 0 192 80t80 192v880q0 14 9 23t23 9h160q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf20c;" d="M1311 694v-114q0 -24 -13.5 -38t-37.5 -14h-202q-24 0 -38 14t-14 38v114q0 24 14 38t38 14h202q24 0 37.5 -14t13.5 -38zM821 464v250q0 53 -32.5 85.5t-85.5 32.5h-133q-68 0 -96 -52q-28 52 -96 52h-130q-53 0 -85.5 -32.5t-32.5 -85.5v-250q0 -22 21 -22h55 q22 0 22 22v230q0 24 13.5 38t38.5 14h94q24 0 38 -14t14 -38v-230q0 -22 21 -22h54q22 0 22 22v230q0 24 14 38t38 14h97q24 0 37.5 -14t13.5 -38v-230q0 -22 22 -22h55q21 0 21 22zM1410 560v154q0 53 -33 85.5t-86 32.5h-264q-53 0 -86 -32.5t-33 -85.5v-410 q0 -21 22 -21h55q21 0 21 21v180q31 -42 94 -42h191q53 0 86 32.5t33 85.5zM1536 1176v-1072q0 -96 -68 -164t-164 -68h-1072q-96 0 -164 68t-68 164v1072q0 96 68 164t164 68h1072q96 0 164 -68t68 -164z" />
+<glyph unicode="&#xf20d;" horiz-adv-x="1792" />
+<glyph unicode="&#xf20e;" horiz-adv-x="1792" />
+<glyph unicode="&#xf500;" horiz-adv-x="1792" />
+</font>
+</defs></svg> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/font-awesome/fonts/fontawesome-webfont.ttf b/common/src/main/webapp/thirdparty/font-awesome/fonts/fontawesome-webfont.ttf
new file mode 100644
index 0000000..96a3639
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/fonts/fontawesome-webfont.ttf
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/font-awesome/fonts/fontawesome-webfont.woff b/common/src/main/webapp/thirdparty/font-awesome/fonts/fontawesome-webfont.woff
new file mode 100644
index 0000000..628b6a5
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/fonts/fontawesome-webfont.woff
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/font-awesome/less/bordered-pulled.less b/common/src/main/webapp/thirdparty/font-awesome/less/bordered-pulled.less
new file mode 100644
index 0000000..0c90eb5
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/less/bordered-pulled.less
@@ -0,0 +1,16 @@
+// Bordered & Pulled
+// -------------------------
+
+.@{fa-css-prefix}-border {
+ padding: .2em .25em .15em;
+ border: solid .08em @fa-border-color;
+ border-radius: .1em;
+}
+
+.pull-right { float: right; }
+.pull-left { float: left; }
+
+.@{fa-css-prefix} {
+ &.pull-left { margin-right: .3em; }
+ &.pull-right { margin-left: .3em; }
+}
diff --git a/common/src/main/webapp/thirdparty/font-awesome/less/core.less b/common/src/main/webapp/thirdparty/font-awesome/less/core.less
new file mode 100644
index 0000000..01d1910
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/less/core.less
@@ -0,0 +1,11 @@
+// Base Class Definition
+// -------------------------
+
+.@{fa-css-prefix} {
+ display: inline-block;
+ font: normal normal normal 14px/1 FontAwesome; // shortening font declaration
+ font-size: inherit; // can't have font-size inherit on line above, so need to override
+ text-rendering: auto; // optimizelegibility throws things off #1094
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
diff --git a/common/src/main/webapp/thirdparty/font-awesome/less/fixed-width.less b/common/src/main/webapp/thirdparty/font-awesome/less/fixed-width.less
new file mode 100644
index 0000000..110289f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/less/fixed-width.less
@@ -0,0 +1,6 @@
+// Fixed Width Icons
+// -------------------------
+.@{fa-css-prefix}-fw {
+ width: (18em / 14);
+ text-align: center;
+}
diff --git a/common/src/main/webapp/thirdparty/font-awesome/less/font-awesome.less b/common/src/main/webapp/thirdparty/font-awesome/less/font-awesome.less
new file mode 100644
index 0000000..195fd46
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/less/font-awesome.less
@@ -0,0 +1,17 @@
+/*!
+ * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome
+ * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
+ */
+
+@import "variables.less";
+@import "mixins.less";
+@import "path.less";
+@import "core.less";
+@import "larger.less";
+@import "fixed-width.less";
+@import "list.less";
+@import "bordered-pulled.less";
+@import "spinning.less";
+@import "rotated-flipped.less";
+@import "stacked.less";
+@import "icons.less";
diff --git a/common/src/main/webapp/thirdparty/font-awesome/less/icons.less b/common/src/main/webapp/thirdparty/font-awesome/less/icons.less
new file mode 100644
index 0000000..b5c26c7
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/less/icons.less
@@ -0,0 +1,552 @@
+/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
+ readers do not read off random characters that represent icons */
+
+.@{fa-css-prefix}-glass:before { content: @fa-var-glass; }
+.@{fa-css-prefix}-music:before { content: @fa-var-music; }
+.@{fa-css-prefix}-search:before { content: @fa-var-search; }
+.@{fa-css-prefix}-envelope-o:before { content: @fa-var-envelope-o; }
+.@{fa-css-prefix}-heart:before { content: @fa-var-heart; }
+.@{fa-css-prefix}-star:before { content: @fa-var-star; }
+.@{fa-css-prefix}-star-o:before { content: @fa-var-star-o; }
+.@{fa-css-prefix}-user:before { content: @fa-var-user; }
+.@{fa-css-prefix}-film:before { content: @fa-var-film; }
+.@{fa-css-prefix}-th-large:before { content: @fa-var-th-large; }
+.@{fa-css-prefix}-th:before { content: @fa-var-th; }
+.@{fa-css-prefix}-th-list:before { content: @fa-var-th-list; }
+.@{fa-css-prefix}-check:before { content: @fa-var-check; }
+.@{fa-css-prefix}-remove:before,
+.@{fa-css-prefix}-close:before,
+.@{fa-css-prefix}-times:before { content: @fa-var-times; }
+.@{fa-css-prefix}-search-plus:before { content: @fa-var-search-plus; }
+.@{fa-css-prefix}-search-minus:before { content: @fa-var-search-minus; }
+.@{fa-css-prefix}-power-off:before { content: @fa-var-power-off; }
+.@{fa-css-prefix}-signal:before { content: @fa-var-signal; }
+.@{fa-css-prefix}-gear:before,
+.@{fa-css-prefix}-cog:before { content: @fa-var-cog; }
+.@{fa-css-prefix}-trash-o:before { content: @fa-var-trash-o; }
+.@{fa-css-prefix}-home:before { content: @fa-var-home; }
+.@{fa-css-prefix}-file-o:before { content: @fa-var-file-o; }
+.@{fa-css-prefix}-clock-o:before { content: @fa-var-clock-o; }
+.@{fa-css-prefix}-road:before { content: @fa-var-road; }
+.@{fa-css-prefix}-download:before { content: @fa-var-download; }
+.@{fa-css-prefix}-arrow-circle-o-down:before { content: @fa-var-arrow-circle-o-down; }
+.@{fa-css-prefix}-arrow-circle-o-up:before { content: @fa-var-arrow-circle-o-up; }
+.@{fa-css-prefix}-inbox:before { content: @fa-var-inbox; }
+.@{fa-css-prefix}-play-circle-o:before { content: @fa-var-play-circle-o; }
+.@{fa-css-prefix}-rotate-right:before,
+.@{fa-css-prefix}-repeat:before { content: @fa-var-repeat; }
+.@{fa-css-prefix}-refresh:before { content: @fa-var-refresh; }
+.@{fa-css-prefix}-list-alt:before { content: @fa-var-list-alt; }
+.@{fa-css-prefix}-lock:before { content: @fa-var-lock; }
+.@{fa-css-prefix}-flag:before { content: @fa-var-flag; }
+.@{fa-css-prefix}-headphones:before { content: @fa-var-headphones; }
+.@{fa-css-prefix}-volume-off:before { content: @fa-var-volume-off; }
+.@{fa-css-prefix}-volume-down:before { content: @fa-var-volume-down; }
+.@{fa-css-prefix}-volume-up:before { content: @fa-var-volume-up; }
+.@{fa-css-prefix}-qrcode:before { content: @fa-var-qrcode; }
+.@{fa-css-prefix}-barcode:before { content: @fa-var-barcode; }
+.@{fa-css-prefix}-tag:before { content: @fa-var-tag; }
+.@{fa-css-prefix}-tags:before { content: @fa-var-tags; }
+.@{fa-css-prefix}-book:before { content: @fa-var-book; }
+.@{fa-css-prefix}-bookmark:before { content: @fa-var-bookmark; }
+.@{fa-css-prefix}-print:before { content: @fa-var-print; }
+.@{fa-css-prefix}-camera:before { content: @fa-var-camera; }
+.@{fa-css-prefix}-font:before { content: @fa-var-font; }
+.@{fa-css-prefix}-bold:before { content: @fa-var-bold; }
+.@{fa-css-prefix}-italic:before { content: @fa-var-italic; }
+.@{fa-css-prefix}-text-height:before { content: @fa-var-text-height; }
+.@{fa-css-prefix}-text-width:before { content: @fa-var-text-width; }
+.@{fa-css-prefix}-align-left:before { content: @fa-var-align-left; }
+.@{fa-css-prefix}-align-center:before { content: @fa-var-align-center; }
+.@{fa-css-prefix}-align-right:before { content: @fa-var-align-right; }
+.@{fa-css-prefix}-align-justify:before { content: @fa-var-align-justify; }
+.@{fa-css-prefix}-list:before { content: @fa-var-list; }
+.@{fa-css-prefix}-dedent:before,
+.@{fa-css-prefix}-outdent:before { content: @fa-var-outdent; }
+.@{fa-css-prefix}-indent:before { content: @fa-var-indent; }
+.@{fa-css-prefix}-video-camera:before { content: @fa-var-video-camera; }
+.@{fa-css-prefix}-photo:before,
+.@{fa-css-prefix}-image:before,
+.@{fa-css-prefix}-picture-o:before { content: @fa-var-picture-o; }
+.@{fa-css-prefix}-pencil:before { content: @fa-var-pencil; }
+.@{fa-css-prefix}-map-marker:before { content: @fa-var-map-marker; }
+.@{fa-css-prefix}-adjust:before { content: @fa-var-adjust; }
+.@{fa-css-prefix}-tint:before { content: @fa-var-tint; }
+.@{fa-css-prefix}-edit:before,
+.@{fa-css-prefix}-pencil-square-o:before { content: @fa-var-pencil-square-o; }
+.@{fa-css-prefix}-share-square-o:before { content: @fa-var-share-square-o; }
+.@{fa-css-prefix}-check-square-o:before { content: @fa-var-check-square-o; }
+.@{fa-css-prefix}-arrows:before { content: @fa-var-arrows; }
+.@{fa-css-prefix}-step-backward:before { content: @fa-var-step-backward; }
+.@{fa-css-prefix}-fast-backward:before { content: @fa-var-fast-backward; }
+.@{fa-css-prefix}-backward:before { content: @fa-var-backward; }
+.@{fa-css-prefix}-play:before { content: @fa-var-play; }
+.@{fa-css-prefix}-pause:before { content: @fa-var-pause; }
+.@{fa-css-prefix}-stop:before { content: @fa-var-stop; }
+.@{fa-css-prefix}-forward:before { content: @fa-var-forward; }
+.@{fa-css-prefix}-fast-forward:before { content: @fa-var-fast-forward; }
+.@{fa-css-prefix}-step-forward:before { content: @fa-var-step-forward; }
+.@{fa-css-prefix}-eject:before { content: @fa-var-eject; }
+.@{fa-css-prefix}-chevron-left:before { content: @fa-var-chevron-left; }
+.@{fa-css-prefix}-chevron-right:before { content: @fa-var-chevron-right; }
+.@{fa-css-prefix}-plus-circle:before { content: @fa-var-plus-circle; }
+.@{fa-css-prefix}-minus-circle:before { content: @fa-var-minus-circle; }
+.@{fa-css-prefix}-times-circle:before { content: @fa-var-times-circle; }
+.@{fa-css-prefix}-check-circle:before { content: @fa-var-check-circle; }
+.@{fa-css-prefix}-question-circle:before { content: @fa-var-question-circle; }
+.@{fa-css-prefix}-info-circle:before { content: @fa-var-info-circle; }
+.@{fa-css-prefix}-crosshairs:before { content: @fa-var-crosshairs; }
+.@{fa-css-prefix}-times-circle-o:before { content: @fa-var-times-circle-o; }
+.@{fa-css-prefix}-check-circle-o:before { content: @fa-var-check-circle-o; }
+.@{fa-css-prefix}-ban:before { content: @fa-var-ban; }
+.@{fa-css-prefix}-arrow-left:before { content: @fa-var-arrow-left; }
+.@{fa-css-prefix}-arrow-right:before { content: @fa-var-arrow-right; }
+.@{fa-css-prefix}-arrow-up:before { content: @fa-var-arrow-up; }
+.@{fa-css-prefix}-arrow-down:before { content: @fa-var-arrow-down; }
+.@{fa-css-prefix}-mail-forward:before,
+.@{fa-css-prefix}-share:before { content: @fa-var-share; }
+.@{fa-css-prefix}-expand:before { content: @fa-var-expand; }
+.@{fa-css-prefix}-compress:before { content: @fa-var-compress; }
+.@{fa-css-prefix}-plus:before { content: @fa-var-plus; }
+.@{fa-css-prefix}-minus:before { content: @fa-var-minus; }
+.@{fa-css-prefix}-asterisk:before { content: @fa-var-asterisk; }
+.@{fa-css-prefix}-exclamation-circle:before { content: @fa-var-exclamation-circle; }
+.@{fa-css-prefix}-gift:before { content: @fa-var-gift; }
+.@{fa-css-prefix}-leaf:before { content: @fa-var-leaf; }
+.@{fa-css-prefix}-fire:before { content: @fa-var-fire; }
+.@{fa-css-prefix}-eye:before { content: @fa-var-eye; }
+.@{fa-css-prefix}-eye-slash:before { content: @fa-var-eye-slash; }
+.@{fa-css-prefix}-warning:before,
+.@{fa-css-prefix}-exclamation-triangle:before { content: @fa-var-exclamation-triangle; }
+.@{fa-css-prefix}-plane:before { content: @fa-var-plane; }
+.@{fa-css-prefix}-calendar:before { content: @fa-var-calendar; }
+.@{fa-css-prefix}-random:before { content: @fa-var-random; }
+.@{fa-css-prefix}-comment:before { content: @fa-var-comment; }
+.@{fa-css-prefix}-magnet:before { content: @fa-var-magnet; }
+.@{fa-css-prefix}-chevron-up:before { content: @fa-var-chevron-up; }
+.@{fa-css-prefix}-chevron-down:before { content: @fa-var-chevron-down; }
+.@{fa-css-prefix}-retweet:before { content: @fa-var-retweet; }
+.@{fa-css-prefix}-shopping-cart:before { content: @fa-var-shopping-cart; }
+.@{fa-css-prefix}-folder:before { content: @fa-var-folder; }
+.@{fa-css-prefix}-folder-open:before { content: @fa-var-folder-open; }
+.@{fa-css-prefix}-arrows-v:before { content: @fa-var-arrows-v; }
+.@{fa-css-prefix}-arrows-h:before { content: @fa-var-arrows-h; }
+.@{fa-css-prefix}-bar-chart-o:before,
+.@{fa-css-prefix}-bar-chart:before { content: @fa-var-bar-chart; }
+.@{fa-css-prefix}-twitter-square:before { content: @fa-var-twitter-square; }
+.@{fa-css-prefix}-facebook-square:before { content: @fa-var-facebook-square; }
+.@{fa-css-prefix}-camera-retro:before { content: @fa-var-camera-retro; }
+.@{fa-css-prefix}-key:before { content: @fa-var-key; }
+.@{fa-css-prefix}-gears:before,
+.@{fa-css-prefix}-cogs:before { content: @fa-var-cogs; }
+.@{fa-css-prefix}-comments:before { content: @fa-var-comments; }
+.@{fa-css-prefix}-thumbs-o-up:before { content: @fa-var-thumbs-o-up; }
+.@{fa-css-prefix}-thumbs-o-down:before { content: @fa-var-thumbs-o-down; }
+.@{fa-css-prefix}-star-half:before { content: @fa-var-star-half; }
+.@{fa-css-prefix}-heart-o:before { content: @fa-var-heart-o; }
+.@{fa-css-prefix}-sign-out:before { content: @fa-var-sign-out; }
+.@{fa-css-prefix}-linkedin-square:before { content: @fa-var-linkedin-square; }
+.@{fa-css-prefix}-thumb-tack:before { content: @fa-var-thumb-tack; }
+.@{fa-css-prefix}-external-link:before { content: @fa-var-external-link; }
+.@{fa-css-prefix}-sign-in:before { content: @fa-var-sign-in; }
+.@{fa-css-prefix}-trophy:before { content: @fa-var-trophy; }
+.@{fa-css-prefix}-github-square:before { content: @fa-var-github-square; }
+.@{fa-css-prefix}-upload:before { content: @fa-var-upload; }
+.@{fa-css-prefix}-lemon-o:before { content: @fa-var-lemon-o; }
+.@{fa-css-prefix}-phone:before { content: @fa-var-phone; }
+.@{fa-css-prefix}-square-o:before { content: @fa-var-square-o; }
+.@{fa-css-prefix}-bookmark-o:before { content: @fa-var-bookmark-o; }
+.@{fa-css-prefix}-phone-square:before { content: @fa-var-phone-square; }
+.@{fa-css-prefix}-twitter:before { content: @fa-var-twitter; }
+.@{fa-css-prefix}-facebook:before { content: @fa-var-facebook; }
+.@{fa-css-prefix}-github:before { content: @fa-var-github; }
+.@{fa-css-prefix}-unlock:before { content: @fa-var-unlock; }
+.@{fa-css-prefix}-credit-card:before { content: @fa-var-credit-card; }
+.@{fa-css-prefix}-rss:before { content: @fa-var-rss; }
+.@{fa-css-prefix}-hdd-o:before { content: @fa-var-hdd-o; }
+.@{fa-css-prefix}-bullhorn:before { content: @fa-var-bullhorn; }
+.@{fa-css-prefix}-bell:before { content: @fa-var-bell; }
+.@{fa-css-prefix}-certificate:before { content: @fa-var-certificate; }
+.@{fa-css-prefix}-hand-o-right:before { content: @fa-var-hand-o-right; }
+.@{fa-css-prefix}-hand-o-left:before { content: @fa-var-hand-o-left; }
+.@{fa-css-prefix}-hand-o-up:before { content: @fa-var-hand-o-up; }
+.@{fa-css-prefix}-hand-o-down:before { content: @fa-var-hand-o-down; }
+.@{fa-css-prefix}-arrow-circle-left:before { content: @fa-var-arrow-circle-left; }
+.@{fa-css-prefix}-arrow-circle-right:before { content: @fa-var-arrow-circle-right; }
+.@{fa-css-prefix}-arrow-circle-up:before { content: @fa-var-arrow-circle-up; }
+.@{fa-css-prefix}-arrow-circle-down:before { content: @fa-var-arrow-circle-down; }
+.@{fa-css-prefix}-globe:before { content: @fa-var-globe; }
+.@{fa-css-prefix}-wrench:before { content: @fa-var-wrench; }
+.@{fa-css-prefix}-tasks:before { content: @fa-var-tasks; }
+.@{fa-css-prefix}-filter:before { content: @fa-var-filter; }
+.@{fa-css-prefix}-briefcase:before { content: @fa-var-briefcase; }
+.@{fa-css-prefix}-arrows-alt:before { content: @fa-var-arrows-alt; }
+.@{fa-css-prefix}-group:before,
+.@{fa-css-prefix}-users:before { content: @fa-var-users; }
+.@{fa-css-prefix}-chain:before,
+.@{fa-css-prefix}-link:before { content: @fa-var-link; }
+.@{fa-css-prefix}-cloud:before { content: @fa-var-cloud; }
+.@{fa-css-prefix}-flask:before { content: @fa-var-flask; }
+.@{fa-css-prefix}-cut:before,
+.@{fa-css-prefix}-scissors:before { content: @fa-var-scissors; }
+.@{fa-css-prefix}-copy:before,
+.@{fa-css-prefix}-files-o:before { content: @fa-var-files-o; }
+.@{fa-css-prefix}-paperclip:before { content: @fa-var-paperclip; }
+.@{fa-css-prefix}-save:before,
+.@{fa-css-prefix}-floppy-o:before { content: @fa-var-floppy-o; }
+.@{fa-css-prefix}-square:before { content: @fa-var-square; }
+.@{fa-css-prefix}-navicon:before,
+.@{fa-css-prefix}-reorder:before,
+.@{fa-css-prefix}-bars:before { content: @fa-var-bars; }
+.@{fa-css-prefix}-list-ul:before { content: @fa-var-list-ul; }
+.@{fa-css-prefix}-list-ol:before { content: @fa-var-list-ol; }
+.@{fa-css-prefix}-strikethrough:before { content: @fa-var-strikethrough; }
+.@{fa-css-prefix}-underline:before { content: @fa-var-underline; }
+.@{fa-css-prefix}-table:before { content: @fa-var-table; }
+.@{fa-css-prefix}-magic:before { content: @fa-var-magic; }
+.@{fa-css-prefix}-truck:before { content: @fa-var-truck; }
+.@{fa-css-prefix}-pinterest:before { content: @fa-var-pinterest; }
+.@{fa-css-prefix}-pinterest-square:before { content: @fa-var-pinterest-square; }
+.@{fa-css-prefix}-google-plus-square:before { content: @fa-var-google-plus-square; }
+.@{fa-css-prefix}-google-plus:before { content: @fa-var-google-plus; }
+.@{fa-css-prefix}-money:before { content: @fa-var-money; }
+.@{fa-css-prefix}-caret-down:before { content: @fa-var-caret-down; }
+.@{fa-css-prefix}-caret-up:before { content: @fa-var-caret-up; }
+.@{fa-css-prefix}-caret-left:before { content: @fa-var-caret-left; }
+.@{fa-css-prefix}-caret-right:before { content: @fa-var-caret-right; }
+.@{fa-css-prefix}-columns:before { content: @fa-var-columns; }
+.@{fa-css-prefix}-unsorted:before,
+.@{fa-css-prefix}-sort:before { content: @fa-var-sort; }
+.@{fa-css-prefix}-sort-down:before,
+.@{fa-css-prefix}-sort-desc:before { content: @fa-var-sort-desc; }
+.@{fa-css-prefix}-sort-up:before,
+.@{fa-css-prefix}-sort-asc:before { content: @fa-var-sort-asc; }
+.@{fa-css-prefix}-envelope:before { content: @fa-var-envelope; }
+.@{fa-css-prefix}-linkedin:before { content: @fa-var-linkedin; }
+.@{fa-css-prefix}-rotate-left:before,
+.@{fa-css-prefix}-undo:before { content: @fa-var-undo; }
+.@{fa-css-prefix}-legal:before,
+.@{fa-css-prefix}-gavel:before { content: @fa-var-gavel; }
+.@{fa-css-prefix}-dashboard:before,
+.@{fa-css-prefix}-tachometer:before { content: @fa-var-tachometer; }
+.@{fa-css-prefix}-comment-o:before { content: @fa-var-comment-o; }
+.@{fa-css-prefix}-comments-o:before { content: @fa-var-comments-o; }
+.@{fa-css-prefix}-flash:before,
+.@{fa-css-prefix}-bolt:before { content: @fa-var-bolt; }
+.@{fa-css-prefix}-sitemap:before { content: @fa-var-sitemap; }
+.@{fa-css-prefix}-umbrella:before { content: @fa-var-umbrella; }
+.@{fa-css-prefix}-paste:before,
+.@{fa-css-prefix}-clipboard:before { content: @fa-var-clipboard; }
+.@{fa-css-prefix}-lightbulb-o:before { content: @fa-var-lightbulb-o; }
+.@{fa-css-prefix}-exchange:before { content: @fa-var-exchange; }
+.@{fa-css-prefix}-cloud-download:before { content: @fa-var-cloud-download; }
+.@{fa-css-prefix}-cloud-upload:before { content: @fa-var-cloud-upload; }
+.@{fa-css-prefix}-user-md:before { content: @fa-var-user-md; }
+.@{fa-css-prefix}-stethoscope:before { content: @fa-var-stethoscope; }
+.@{fa-css-prefix}-suitcase:before { content: @fa-var-suitcase; }
+.@{fa-css-prefix}-bell-o:before { content: @fa-var-bell-o; }
+.@{fa-css-prefix}-coffee:before { content: @fa-var-coffee; }
+.@{fa-css-prefix}-cutlery:before { content: @fa-var-cutlery; }
+.@{fa-css-prefix}-file-text-o:before { content: @fa-var-file-text-o; }
+.@{fa-css-prefix}-building-o:before { content: @fa-var-building-o; }
+.@{fa-css-prefix}-hospital-o:before { content: @fa-var-hospital-o; }
+.@{fa-css-prefix}-ambulance:before { content: @fa-var-ambulance; }
+.@{fa-css-prefix}-medkit:before { content: @fa-var-medkit; }
+.@{fa-css-prefix}-fighter-jet:before { content: @fa-var-fighter-jet; }
+.@{fa-css-prefix}-beer:before { content: @fa-var-beer; }
+.@{fa-css-prefix}-h-square:before { content: @fa-var-h-square; }
+.@{fa-css-prefix}-plus-square:before { content: @fa-var-plus-square; }
+.@{fa-css-prefix}-angle-double-left:before { content: @fa-var-angle-double-left; }
+.@{fa-css-prefix}-angle-double-right:before { content: @fa-var-angle-double-right; }
+.@{fa-css-prefix}-angle-double-up:before { content: @fa-var-angle-double-up; }
+.@{fa-css-prefix}-angle-double-down:before { content: @fa-var-angle-double-down; }
+.@{fa-css-prefix}-angle-left:before { content: @fa-var-angle-left; }
+.@{fa-css-prefix}-angle-right:before { content: @fa-var-angle-right; }
+.@{fa-css-prefix}-angle-up:before { content: @fa-var-angle-up; }
+.@{fa-css-prefix}-angle-down:before { content: @fa-var-angle-down; }
+.@{fa-css-prefix}-desktop:before { content: @fa-var-desktop; }
+.@{fa-css-prefix}-laptop:before { content: @fa-var-laptop; }
+.@{fa-css-prefix}-tablet:before { content: @fa-var-tablet; }
+.@{fa-css-prefix}-mobile-phone:before,
+.@{fa-css-prefix}-mobile:before { content: @fa-var-mobile; }
+.@{fa-css-prefix}-circle-o:before { content: @fa-var-circle-o; }
+.@{fa-css-prefix}-quote-left:before { content: @fa-var-quote-left; }
+.@{fa-css-prefix}-quote-right:before { content: @fa-var-quote-right; }
+.@{fa-css-prefix}-spinner:before { content: @fa-var-spinner; }
+.@{fa-css-prefix}-circle:before { content: @fa-var-circle; }
+.@{fa-css-prefix}-mail-reply:before,
+.@{fa-css-prefix}-reply:before { content: @fa-var-reply; }
+.@{fa-css-prefix}-github-alt:before { content: @fa-var-github-alt; }
+.@{fa-css-prefix}-folder-o:before { content: @fa-var-folder-o; }
+.@{fa-css-prefix}-folder-open-o:before { content: @fa-var-folder-open-o; }
+.@{fa-css-prefix}-smile-o:before { content: @fa-var-smile-o; }
+.@{fa-css-prefix}-frown-o:before { content: @fa-var-frown-o; }
+.@{fa-css-prefix}-meh-o:before { content: @fa-var-meh-o; }
+.@{fa-css-prefix}-gamepad:before { content: @fa-var-gamepad; }
+.@{fa-css-prefix}-keyboard-o:before { content: @fa-var-keyboard-o; }
+.@{fa-css-prefix}-flag-o:before { content: @fa-var-flag-o; }
+.@{fa-css-prefix}-flag-checkered:before { content: @fa-var-flag-checkered; }
+.@{fa-css-prefix}-terminal:before { content: @fa-var-terminal; }
+.@{fa-css-prefix}-code:before { content: @fa-var-code; }
+.@{fa-css-prefix}-mail-reply-all:before,
+.@{fa-css-prefix}-reply-all:before { content: @fa-var-reply-all; }
+.@{fa-css-prefix}-star-half-empty:before,
+.@{fa-css-prefix}-star-half-full:before,
+.@{fa-css-prefix}-star-half-o:before { content: @fa-var-star-half-o; }
+.@{fa-css-prefix}-location-arrow:before { content: @fa-var-location-arrow; }
+.@{fa-css-prefix}-crop:before { content: @fa-var-crop; }
+.@{fa-css-prefix}-code-fork:before { content: @fa-var-code-fork; }
+.@{fa-css-prefix}-unlink:before,
+.@{fa-css-prefix}-chain-broken:before { content: @fa-var-chain-broken; }
+.@{fa-css-prefix}-question:before { content: @fa-var-question; }
+.@{fa-css-prefix}-info:before { content: @fa-var-info; }
+.@{fa-css-prefix}-exclamation:before { content: @fa-var-exclamation; }
+.@{fa-css-prefix}-superscript:before { content: @fa-var-superscript; }
+.@{fa-css-prefix}-subscript:before { content: @fa-var-subscript; }
+.@{fa-css-prefix}-eraser:before { content: @fa-var-eraser; }
+.@{fa-css-prefix}-puzzle-piece:before { content: @fa-var-puzzle-piece; }
+.@{fa-css-prefix}-microphone:before { content: @fa-var-microphone; }
+.@{fa-css-prefix}-microphone-slash:before { content: @fa-var-microphone-slash; }
+.@{fa-css-prefix}-shield:before { content: @fa-var-shield; }
+.@{fa-css-prefix}-calendar-o:before { content: @fa-var-calendar-o; }
+.@{fa-css-prefix}-fire-extinguisher:before { content: @fa-var-fire-extinguisher; }
+.@{fa-css-prefix}-rocket:before { content: @fa-var-rocket; }
+.@{fa-css-prefix}-maxcdn:before { content: @fa-var-maxcdn; }
+.@{fa-css-prefix}-chevron-circle-left:before { content: @fa-var-chevron-circle-left; }
+.@{fa-css-prefix}-chevron-circle-right:before { content: @fa-var-chevron-circle-right; }
+.@{fa-css-prefix}-chevron-circle-up:before { content: @fa-var-chevron-circle-up; }
+.@{fa-css-prefix}-chevron-circle-down:before { content: @fa-var-chevron-circle-down; }
+.@{fa-css-prefix}-html5:before { content: @fa-var-html5; }
+.@{fa-css-prefix}-css3:before { content: @fa-var-css3; }
+.@{fa-css-prefix}-anchor:before { content: @fa-var-anchor; }
+.@{fa-css-prefix}-unlock-alt:before { content: @fa-var-unlock-alt; }
+.@{fa-css-prefix}-bullseye:before { content: @fa-var-bullseye; }
+.@{fa-css-prefix}-ellipsis-h:before { content: @fa-var-ellipsis-h; }
+.@{fa-css-prefix}-ellipsis-v:before { content: @fa-var-ellipsis-v; }
+.@{fa-css-prefix}-rss-square:before { content: @fa-var-rss-square; }
+.@{fa-css-prefix}-play-circle:before { content: @fa-var-play-circle; }
+.@{fa-css-prefix}-ticket:before { content: @fa-var-ticket; }
+.@{fa-css-prefix}-minus-square:before { content: @fa-var-minus-square; }
+.@{fa-css-prefix}-minus-square-o:before { content: @fa-var-minus-square-o; }
+.@{fa-css-prefix}-level-up:before { content: @fa-var-level-up; }
+.@{fa-css-prefix}-level-down:before { content: @fa-var-level-down; }
+.@{fa-css-prefix}-check-square:before { content: @fa-var-check-square; }
+.@{fa-css-prefix}-pencil-square:before { content: @fa-var-pencil-square; }
+.@{fa-css-prefix}-external-link-square:before { content: @fa-var-external-link-square; }
+.@{fa-css-prefix}-share-square:before { content: @fa-var-share-square; }
+.@{fa-css-prefix}-compass:before { content: @fa-var-compass; }
+.@{fa-css-prefix}-toggle-down:before,
+.@{fa-css-prefix}-caret-square-o-down:before { content: @fa-var-caret-square-o-down; }
+.@{fa-css-prefix}-toggle-up:before,
+.@{fa-css-prefix}-caret-square-o-up:before { content: @fa-var-caret-square-o-up; }
+.@{fa-css-prefix}-toggle-right:before,
+.@{fa-css-prefix}-caret-square-o-right:before { content: @fa-var-caret-square-o-right; }
+.@{fa-css-prefix}-euro:before,
+.@{fa-css-prefix}-eur:before { content: @fa-var-eur; }
+.@{fa-css-prefix}-gbp:before { content: @fa-var-gbp; }
+.@{fa-css-prefix}-dollar:before,
+.@{fa-css-prefix}-usd:before { content: @fa-var-usd; }
+.@{fa-css-prefix}-rupee:before,
+.@{fa-css-prefix}-inr:before { content: @fa-var-inr; }
+.@{fa-css-prefix}-cny:before,
+.@{fa-css-prefix}-rmb:before,
+.@{fa-css-prefix}-yen:before,
+.@{fa-css-prefix}-jpy:before { content: @fa-var-jpy; }
+.@{fa-css-prefix}-ruble:before,
+.@{fa-css-prefix}-rouble:before,
+.@{fa-css-prefix}-rub:before { content: @fa-var-rub; }
+.@{fa-css-prefix}-won:before,
+.@{fa-css-prefix}-krw:before { content: @fa-var-krw; }
+.@{fa-css-prefix}-bitcoin:before,
+.@{fa-css-prefix}-btc:before { content: @fa-var-btc; }
+.@{fa-css-prefix}-file:before { content: @fa-var-file; }
+.@{fa-css-prefix}-file-text:before { content: @fa-var-file-text; }
+.@{fa-css-prefix}-sort-alpha-asc:before { content: @fa-var-sort-alpha-asc; }
+.@{fa-css-prefix}-sort-alpha-desc:before { content: @fa-var-sort-alpha-desc; }
+.@{fa-css-prefix}-sort-amount-asc:before { content: @fa-var-sort-amount-asc; }
+.@{fa-css-prefix}-sort-amount-desc:before { content: @fa-var-sort-amount-desc; }
+.@{fa-css-prefix}-sort-numeric-asc:before { content: @fa-var-sort-numeric-asc; }
+.@{fa-css-prefix}-sort-numeric-desc:before { content: @fa-var-sort-numeric-desc; }
+.@{fa-css-prefix}-thumbs-up:before { content: @fa-var-thumbs-up; }
+.@{fa-css-prefix}-thumbs-down:before { content: @fa-var-thumbs-down; }
+.@{fa-css-prefix}-youtube-square:before { content: @fa-var-youtube-square; }
+.@{fa-css-prefix}-youtube:before { content: @fa-var-youtube; }
+.@{fa-css-prefix}-xing:before { content: @fa-var-xing; }
+.@{fa-css-prefix}-xing-square:before { content: @fa-var-xing-square; }
+.@{fa-css-prefix}-youtube-play:before { content: @fa-var-youtube-play; }
+.@{fa-css-prefix}-dropbox:before { content: @fa-var-dropbox; }
+.@{fa-css-prefix}-stack-overflow:before { content: @fa-var-stack-overflow; }
+.@{fa-css-prefix}-instagram:before { content: @fa-var-instagram; }
+.@{fa-css-prefix}-flickr:before { content: @fa-var-flickr; }
+.@{fa-css-prefix}-adn:before { content: @fa-var-adn; }
+.@{fa-css-prefix}-bitbucket:before { content: @fa-var-bitbucket; }
+.@{fa-css-prefix}-bitbucket-square:before { content: @fa-var-bitbucket-square; }
+.@{fa-css-prefix}-tumblr:before { content: @fa-var-tumblr; }
+.@{fa-css-prefix}-tumblr-square:before { content: @fa-var-tumblr-square; }
+.@{fa-css-prefix}-long-arrow-down:before { content: @fa-var-long-arrow-down; }
+.@{fa-css-prefix}-long-arrow-up:before { content: @fa-var-long-arrow-up; }
+.@{fa-css-prefix}-long-arrow-left:before { content: @fa-var-long-arrow-left; }
+.@{fa-css-prefix}-long-arrow-right:before { content: @fa-var-long-arrow-right; }
+.@{fa-css-prefix}-apple:before { content: @fa-var-apple; }
+.@{fa-css-prefix}-windows:before { content: @fa-var-windows; }
+.@{fa-css-prefix}-android:before { content: @fa-var-android; }
+.@{fa-css-prefix}-linux:before { content: @fa-var-linux; }
+.@{fa-css-prefix}-dribbble:before { content: @fa-var-dribbble; }
+.@{fa-css-prefix}-skype:before { content: @fa-var-skype; }
+.@{fa-css-prefix}-foursquare:before { content: @fa-var-foursquare; }
+.@{fa-css-prefix}-trello:before { content: @fa-var-trello; }
+.@{fa-css-prefix}-female:before { content: @fa-var-female; }
+.@{fa-css-prefix}-male:before { content: @fa-var-male; }
+.@{fa-css-prefix}-gittip:before { content: @fa-var-gittip; }
+.@{fa-css-prefix}-sun-o:before { content: @fa-var-sun-o; }
+.@{fa-css-prefix}-moon-o:before { content: @fa-var-moon-o; }
+.@{fa-css-prefix}-archive:before { content: @fa-var-archive; }
+.@{fa-css-prefix}-bug:before { content: @fa-var-bug; }
+.@{fa-css-prefix}-vk:before { content: @fa-var-vk; }
+.@{fa-css-prefix}-weibo:before { content: @fa-var-weibo; }
+.@{fa-css-prefix}-renren:before { content: @fa-var-renren; }
+.@{fa-css-prefix}-pagelines:before { content: @fa-var-pagelines; }
+.@{fa-css-prefix}-stack-exchange:before { content: @fa-var-stack-exchange; }
+.@{fa-css-prefix}-arrow-circle-o-right:before { content: @fa-var-arrow-circle-o-right; }
+.@{fa-css-prefix}-arrow-circle-o-left:before { content: @fa-var-arrow-circle-o-left; }
+.@{fa-css-prefix}-toggle-left:before,
+.@{fa-css-prefix}-caret-square-o-left:before { content: @fa-var-caret-square-o-left; }
+.@{fa-css-prefix}-dot-circle-o:before { content: @fa-var-dot-circle-o; }
+.@{fa-css-prefix}-wheelchair:before { content: @fa-var-wheelchair; }
+.@{fa-css-prefix}-vimeo-square:before { content: @fa-var-vimeo-square; }
+.@{fa-css-prefix}-turkish-lira:before,
+.@{fa-css-prefix}-try:before { content: @fa-var-try; }
+.@{fa-css-prefix}-plus-square-o:before { content: @fa-var-plus-square-o; }
+.@{fa-css-prefix}-space-shuttle:before { content: @fa-var-space-shuttle; }
+.@{fa-css-prefix}-slack:before { content: @fa-var-slack; }
+.@{fa-css-prefix}-envelope-square:before { content: @fa-var-envelope-square; }
+.@{fa-css-prefix}-wordpress:before { content: @fa-var-wordpress; }
+.@{fa-css-prefix}-openid:before { content: @fa-var-openid; }
+.@{fa-css-prefix}-institution:before,
+.@{fa-css-prefix}-bank:before,
+.@{fa-css-prefix}-university:before { content: @fa-var-university; }
+.@{fa-css-prefix}-mortar-board:before,
+.@{fa-css-prefix}-graduation-cap:before { content: @fa-var-graduation-cap; }
+.@{fa-css-prefix}-yahoo:before { content: @fa-var-yahoo; }
+.@{fa-css-prefix}-google:before { content: @fa-var-google; }
+.@{fa-css-prefix}-reddit:before { content: @fa-var-reddit; }
+.@{fa-css-prefix}-reddit-square:before { content: @fa-var-reddit-square; }
+.@{fa-css-prefix}-stumbleupon-circle:before { content: @fa-var-stumbleupon-circle; }
+.@{fa-css-prefix}-stumbleupon:before { content: @fa-var-stumbleupon; }
+.@{fa-css-prefix}-delicious:before { content: @fa-var-delicious; }
+.@{fa-css-prefix}-digg:before { content: @fa-var-digg; }
+.@{fa-css-prefix}-pied-piper:before { content: @fa-var-pied-piper; }
+.@{fa-css-prefix}-pied-piper-alt:before { content: @fa-var-pied-piper-alt; }
+.@{fa-css-prefix}-drupal:before { content: @fa-var-drupal; }
+.@{fa-css-prefix}-joomla:before { content: @fa-var-joomla; }
+.@{fa-css-prefix}-language:before { content: @fa-var-language; }
+.@{fa-css-prefix}-fax:before { content: @fa-var-fax; }
+.@{fa-css-prefix}-building:before { content: @fa-var-building; }
+.@{fa-css-prefix}-child:before { content: @fa-var-child; }
+.@{fa-css-prefix}-paw:before { content: @fa-var-paw; }
+.@{fa-css-prefix}-spoon:before { content: @fa-var-spoon; }
+.@{fa-css-prefix}-cube:before { content: @fa-var-cube; }
+.@{fa-css-prefix}-cubes:before { content: @fa-var-cubes; }
+.@{fa-css-prefix}-behance:before { content: @fa-var-behance; }
+.@{fa-css-prefix}-behance-square:before { content: @fa-var-behance-square; }
+.@{fa-css-prefix}-steam:before { content: @fa-var-steam; }
+.@{fa-css-prefix}-steam-square:before { content: @fa-var-steam-square; }
+.@{fa-css-prefix}-recycle:before { content: @fa-var-recycle; }
+.@{fa-css-prefix}-automobile:before,
+.@{fa-css-prefix}-car:before { content: @fa-var-car; }
+.@{fa-css-prefix}-cab:before,
+.@{fa-css-prefix}-taxi:before { content: @fa-var-taxi; }
+.@{fa-css-prefix}-tree:before { content: @fa-var-tree; }
+.@{fa-css-prefix}-spotify:before { content: @fa-var-spotify; }
+.@{fa-css-prefix}-deviantart:before { content: @fa-var-deviantart; }
+.@{fa-css-prefix}-soundcloud:before { content: @fa-var-soundcloud; }
+.@{fa-css-prefix}-database:before { content: @fa-var-database; }
+.@{fa-css-prefix}-file-pdf-o:before { content: @fa-var-file-pdf-o; }
+.@{fa-css-prefix}-file-word-o:before { content: @fa-var-file-word-o; }
+.@{fa-css-prefix}-file-excel-o:before { content: @fa-var-file-excel-o; }
+.@{fa-css-prefix}-file-powerpoint-o:before { content: @fa-var-file-powerpoint-o; }
+.@{fa-css-prefix}-file-photo-o:before,
+.@{fa-css-prefix}-file-picture-o:before,
+.@{fa-css-prefix}-file-image-o:before { content: @fa-var-file-image-o; }
+.@{fa-css-prefix}-file-zip-o:before,
+.@{fa-css-prefix}-file-archive-o:before { content: @fa-var-file-archive-o; }
+.@{fa-css-prefix}-file-sound-o:before,
+.@{fa-css-prefix}-file-audio-o:before { content: @fa-var-file-audio-o; }
+.@{fa-css-prefix}-file-movie-o:before,
+.@{fa-css-prefix}-file-video-o:before { content: @fa-var-file-video-o; }
+.@{fa-css-prefix}-file-code-o:before { content: @fa-var-file-code-o; }
+.@{fa-css-prefix}-vine:before { content: @fa-var-vine; }
+.@{fa-css-prefix}-codepen:before { content: @fa-var-codepen; }
+.@{fa-css-prefix}-jsfiddle:before { content: @fa-var-jsfiddle; }
+.@{fa-css-prefix}-life-bouy:before,
+.@{fa-css-prefix}-life-buoy:before,
+.@{fa-css-prefix}-life-saver:before,
+.@{fa-css-prefix}-support:before,
+.@{fa-css-prefix}-life-ring:before { content: @fa-var-life-ring; }
+.@{fa-css-prefix}-circle-o-notch:before { content: @fa-var-circle-o-notch; }
+.@{fa-css-prefix}-ra:before,
+.@{fa-css-prefix}-rebel:before { content: @fa-var-rebel; }
+.@{fa-css-prefix}-ge:before,
+.@{fa-css-prefix}-empire:before { content: @fa-var-empire; }
+.@{fa-css-prefix}-git-square:before { content: @fa-var-git-square; }
+.@{fa-css-prefix}-git:before { content: @fa-var-git; }
+.@{fa-css-prefix}-hacker-news:before { content: @fa-var-hacker-news; }
+.@{fa-css-prefix}-tencent-weibo:before { content: @fa-var-tencent-weibo; }
+.@{fa-css-prefix}-qq:before { content: @fa-var-qq; }
+.@{fa-css-prefix}-wechat:before,
+.@{fa-css-prefix}-weixin:before { content: @fa-var-weixin; }
+.@{fa-css-prefix}-send:before,
+.@{fa-css-prefix}-paper-plane:before { content: @fa-var-paper-plane; }
+.@{fa-css-prefix}-send-o:before,
+.@{fa-css-prefix}-paper-plane-o:before { content: @fa-var-paper-plane-o; }
+.@{fa-css-prefix}-history:before { content: @fa-var-history; }
+.@{fa-css-prefix}-circle-thin:before { content: @fa-var-circle-thin; }
+.@{fa-css-prefix}-header:before { content: @fa-var-header; }
+.@{fa-css-prefix}-paragraph:before { content: @fa-var-paragraph; }
+.@{fa-css-prefix}-sliders:before { content: @fa-var-sliders; }
+.@{fa-css-prefix}-share-alt:before { content: @fa-var-share-alt; }
+.@{fa-css-prefix}-share-alt-square:before { content: @fa-var-share-alt-square; }
+.@{fa-css-prefix}-bomb:before { content: @fa-var-bomb; }
+.@{fa-css-prefix}-soccer-ball-o:before,
+.@{fa-css-prefix}-futbol-o:before { content: @fa-var-futbol-o; }
+.@{fa-css-prefix}-tty:before { content: @fa-var-tty; }
+.@{fa-css-prefix}-binoculars:before { content: @fa-var-binoculars; }
+.@{fa-css-prefix}-plug:before { content: @fa-var-plug; }
+.@{fa-css-prefix}-slideshare:before { content: @fa-var-slideshare; }
+.@{fa-css-prefix}-twitch:before { content: @fa-var-twitch; }
+.@{fa-css-prefix}-yelp:before { content: @fa-var-yelp; }
+.@{fa-css-prefix}-newspaper-o:before { content: @fa-var-newspaper-o; }
+.@{fa-css-prefix}-wifi:before { content: @fa-var-wifi; }
+.@{fa-css-prefix}-calculator:before { content: @fa-var-calculator; }
+.@{fa-css-prefix}-paypal:before { content: @fa-var-paypal; }
+.@{fa-css-prefix}-google-wallet:before { content: @fa-var-google-wallet; }
+.@{fa-css-prefix}-cc-visa:before { content: @fa-var-cc-visa; }
+.@{fa-css-prefix}-cc-mastercard:before { content: @fa-var-cc-mastercard; }
+.@{fa-css-prefix}-cc-discover:before { content: @fa-var-cc-discover; }
+.@{fa-css-prefix}-cc-amex:before { content: @fa-var-cc-amex; }
+.@{fa-css-prefix}-cc-paypal:before { content: @fa-var-cc-paypal; }
+.@{fa-css-prefix}-cc-stripe:before { content: @fa-var-cc-stripe; }
+.@{fa-css-prefix}-bell-slash:before { content: @fa-var-bell-slash; }
+.@{fa-css-prefix}-bell-slash-o:before { content: @fa-var-bell-slash-o; }
+.@{fa-css-prefix}-trash:before { content: @fa-var-trash; }
+.@{fa-css-prefix}-copyright:before { content: @fa-var-copyright; }
+.@{fa-css-prefix}-at:before { content: @fa-var-at; }
+.@{fa-css-prefix}-eyedropper:before { content: @fa-var-eyedropper; }
+.@{fa-css-prefix}-paint-brush:before { content: @fa-var-paint-brush; }
+.@{fa-css-prefix}-birthday-cake:before { content: @fa-var-birthday-cake; }
+.@{fa-css-prefix}-area-chart:before { content: @fa-var-area-chart; }
+.@{fa-css-prefix}-pie-chart:before { content: @fa-var-pie-chart; }
+.@{fa-css-prefix}-line-chart:before { content: @fa-var-line-chart; }
+.@{fa-css-prefix}-lastfm:before { content: @fa-var-lastfm; }
+.@{fa-css-prefix}-lastfm-square:before { content: @fa-var-lastfm-square; }
+.@{fa-css-prefix}-toggle-off:before { content: @fa-var-toggle-off; }
+.@{fa-css-prefix}-toggle-on:before { content: @fa-var-toggle-on; }
+.@{fa-css-prefix}-bicycle:before { content: @fa-var-bicycle; }
+.@{fa-css-prefix}-bus:before { content: @fa-var-bus; }
+.@{fa-css-prefix}-ioxhost:before { content: @fa-var-ioxhost; }
+.@{fa-css-prefix}-angellist:before { content: @fa-var-angellist; }
+.@{fa-css-prefix}-cc:before { content: @fa-var-cc; }
+.@{fa-css-prefix}-shekel:before,
+.@{fa-css-prefix}-sheqel:before,
+.@{fa-css-prefix}-ils:before { content: @fa-var-ils; }
+.@{fa-css-prefix}-meanpath:before { content: @fa-var-meanpath; }
diff --git a/common/src/main/webapp/thirdparty/font-awesome/less/larger.less b/common/src/main/webapp/thirdparty/font-awesome/less/larger.less
new file mode 100644
index 0000000..c9d6467
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/less/larger.less
@@ -0,0 +1,13 @@
+// Icon Sizes
+// -------------------------
+
+/* makes the font 33% larger relative to the icon container */
+.@{fa-css-prefix}-lg {
+ font-size: (4em / 3);
+ line-height: (3em / 4);
+ vertical-align: -15%;
+}
+.@{fa-css-prefix}-2x { font-size: 2em; }
+.@{fa-css-prefix}-3x { font-size: 3em; }
+.@{fa-css-prefix}-4x { font-size: 4em; }
+.@{fa-css-prefix}-5x { font-size: 5em; }
diff --git a/common/src/main/webapp/thirdparty/font-awesome/less/list.less b/common/src/main/webapp/thirdparty/font-awesome/less/list.less
new file mode 100644
index 0000000..0b44038
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/less/list.less
@@ -0,0 +1,19 @@
+// List Icons
+// -------------------------
+
+.@{fa-css-prefix}-ul {
+ padding-left: 0;
+ margin-left: @fa-li-width;
+ list-style-type: none;
+ > li { position: relative; }
+}
+.@{fa-css-prefix}-li {
+ position: absolute;
+ left: -@fa-li-width;
+ width: @fa-li-width;
+ top: (2em / 14);
+ text-align: center;
+ &.@{fa-css-prefix}-lg {
+ left: (-@fa-li-width + (4em / 14));
+ }
+}
diff --git a/common/src/main/webapp/thirdparty/font-awesome/less/mixins.less b/common/src/main/webapp/thirdparty/font-awesome/less/mixins.less
new file mode 100644
index 0000000..b7bfadc
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/less/mixins.less
@@ -0,0 +1,25 @@
+// Mixins
+// --------------------------
+
+.fa-icon() {
+ display: inline-block;
+ font: normal normal normal 14px/1 FontAwesome; // shortening font declaration
+ font-size: inherit; // can't have font-size inherit on line above, so need to override
+ text-rendering: auto; // optimizelegibility throws things off #1094
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+.fa-icon-rotate(@degrees, @rotation) {
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation);
+ -webkit-transform: rotate(@degrees);
+ -ms-transform: rotate(@degrees);
+ transform: rotate(@degrees);
+}
+
+.fa-icon-flip(@horiz, @vert, @rotation) {
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation, mirror=1);
+ -webkit-transform: scale(@horiz, @vert);
+ -ms-transform: scale(@horiz, @vert);
+ transform: scale(@horiz, @vert);
+}
diff --git a/common/src/main/webapp/thirdparty/font-awesome/less/path.less b/common/src/main/webapp/thirdparty/font-awesome/less/path.less
new file mode 100644
index 0000000..c5a6912
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/less/path.less
@@ -0,0 +1,14 @@
+/* FONT PATH
+ * -------------------------- */
+
+@font-face {
+ font-family: 'FontAwesome';
+ src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}');
+ src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'),
+ url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'),
+ url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'),
+ url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg');
+// src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts
+ font-weight: normal;
+ font-style: normal;
+}
diff --git a/common/src/main/webapp/thirdparty/font-awesome/less/rotated-flipped.less b/common/src/main/webapp/thirdparty/font-awesome/less/rotated-flipped.less
new file mode 100644
index 0000000..f6ba814
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/less/rotated-flipped.less
@@ -0,0 +1,20 @@
+// Rotated & Flipped Icons
+// -------------------------
+
+.@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); }
+.@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); }
+.@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); }
+
+.@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); }
+.@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); }
+
+// Hook for IE8-9
+// -------------------------
+
+:root .@{fa-css-prefix}-rotate-90,
+:root .@{fa-css-prefix}-rotate-180,
+:root .@{fa-css-prefix}-rotate-270,
+:root .@{fa-css-prefix}-flip-horizontal,
+:root .@{fa-css-prefix}-flip-vertical {
+ filter: none;
+}
diff --git a/common/src/main/webapp/thirdparty/font-awesome/less/spinning.less b/common/src/main/webapp/thirdparty/font-awesome/less/spinning.less
new file mode 100644
index 0000000..6e1564e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/less/spinning.less
@@ -0,0 +1,29 @@
+// Spinning Icons
+// --------------------------
+
+.@{fa-css-prefix}-spin {
+ -webkit-animation: fa-spin 2s infinite linear;
+ animation: fa-spin 2s infinite linear;
+}
+
+@-webkit-keyframes fa-spin {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(359deg);
+ transform: rotate(359deg);
+ }
+}
+
+@keyframes fa-spin {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(359deg);
+ transform: rotate(359deg);
+ }
+}
diff --git a/common/src/main/webapp/thirdparty/font-awesome/less/stacked.less b/common/src/main/webapp/thirdparty/font-awesome/less/stacked.less
new file mode 100644
index 0000000..fc53fb0
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/less/stacked.less
@@ -0,0 +1,20 @@
+// Stacked Icons
+// -------------------------
+
+.@{fa-css-prefix}-stack {
+ position: relative;
+ display: inline-block;
+ width: 2em;
+ height: 2em;
+ line-height: 2em;
+ vertical-align: middle;
+}
+.@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x {
+ position: absolute;
+ left: 0;
+ width: 100%;
+ text-align: center;
+}
+.@{fa-css-prefix}-stack-1x { line-height: inherit; }
+.@{fa-css-prefix}-stack-2x { font-size: 2em; }
+.@{fa-css-prefix}-inverse { color: @fa-inverse; }
diff --git a/common/src/main/webapp/thirdparty/font-awesome/less/variables.less b/common/src/main/webapp/thirdparty/font-awesome/less/variables.less
new file mode 100644
index 0000000..ccf939d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/less/variables.less
@@ -0,0 +1,561 @@
+// Variables
+// --------------------------
+
+@fa-font-path: "../fonts";
+//@fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.2.0/fonts"; // for referencing Bootstrap CDN font files directly
+@fa-css-prefix: fa;
+@fa-version: "4.2.0";
+@fa-border-color: #eee;
+@fa-inverse: #fff;
+@fa-li-width: (30em / 14);
+
+@fa-var-adjust: "\f042";
+@fa-var-adn: "\f170";
+@fa-var-align-center: "\f037";
+@fa-var-align-justify: "\f039";
+@fa-var-align-left: "\f036";
+@fa-var-align-right: "\f038";
+@fa-var-ambulance: "\f0f9";
+@fa-var-anchor: "\f13d";
+@fa-var-android: "\f17b";
+@fa-var-angellist: "\f209";
+@fa-var-angle-double-down: "\f103";
+@fa-var-angle-double-left: "\f100";
+@fa-var-angle-double-right: "\f101";
+@fa-var-angle-double-up: "\f102";
+@fa-var-angle-down: "\f107";
+@fa-var-angle-left: "\f104";
+@fa-var-angle-right: "\f105";
+@fa-var-angle-up: "\f106";
+@fa-var-apple: "\f179";
+@fa-var-archive: "\f187";
+@fa-var-area-chart: "\f1fe";
+@fa-var-arrow-circle-down: "\f0ab";
+@fa-var-arrow-circle-left: "\f0a8";
+@fa-var-arrow-circle-o-down: "\f01a";
+@fa-var-arrow-circle-o-left: "\f190";
+@fa-var-arrow-circle-o-right: "\f18e";
+@fa-var-arrow-circle-o-up: "\f01b";
+@fa-var-arrow-circle-right: "\f0a9";
+@fa-var-arrow-circle-up: "\f0aa";
+@fa-var-arrow-down: "\f063";
+@fa-var-arrow-left: "\f060";
+@fa-var-arrow-right: "\f061";
+@fa-var-arrow-up: "\f062";
+@fa-var-arrows: "\f047";
+@fa-var-arrows-alt: "\f0b2";
+@fa-var-arrows-h: "\f07e";
+@fa-var-arrows-v: "\f07d";
+@fa-var-asterisk: "\f069";
+@fa-var-at: "\f1fa";
+@fa-var-automobile: "\f1b9";
+@fa-var-backward: "\f04a";
+@fa-var-ban: "\f05e";
+@fa-var-bank: "\f19c";
+@fa-var-bar-chart: "\f080";
+@fa-var-bar-chart-o: "\f080";
+@fa-var-barcode: "\f02a";
+@fa-var-bars: "\f0c9";
+@fa-var-beer: "\f0fc";
+@fa-var-behance: "\f1b4";
+@fa-var-behance-square: "\f1b5";
+@fa-var-bell: "\f0f3";
+@fa-var-bell-o: "\f0a2";
+@fa-var-bell-slash: "\f1f6";
+@fa-var-bell-slash-o: "\f1f7";
+@fa-var-bicycle: "\f206";
+@fa-var-binoculars: "\f1e5";
+@fa-var-birthday-cake: "\f1fd";
+@fa-var-bitbucket: "\f171";
+@fa-var-bitbucket-square: "\f172";
+@fa-var-bitcoin: "\f15a";
+@fa-var-bold: "\f032";
+@fa-var-bolt: "\f0e7";
+@fa-var-bomb: "\f1e2";
+@fa-var-book: "\f02d";
+@fa-var-bookmark: "\f02e";
+@fa-var-bookmark-o: "\f097";
+@fa-var-briefcase: "\f0b1";
+@fa-var-btc: "\f15a";
+@fa-var-bug: "\f188";
+@fa-var-building: "\f1ad";
+@fa-var-building-o: "\f0f7";
+@fa-var-bullhorn: "\f0a1";
+@fa-var-bullseye: "\f140";
+@fa-var-bus: "\f207";
+@fa-var-cab: "\f1ba";
+@fa-var-calculator: "\f1ec";
+@fa-var-calendar: "\f073";
+@fa-var-calendar-o: "\f133";
+@fa-var-camera: "\f030";
+@fa-var-camera-retro: "\f083";
+@fa-var-car: "\f1b9";
+@fa-var-caret-down: "\f0d7";
+@fa-var-caret-left: "\f0d9";
+@fa-var-caret-right: "\f0da";
+@fa-var-caret-square-o-down: "\f150";
+@fa-var-caret-square-o-left: "\f191";
+@fa-var-caret-square-o-right: "\f152";
+@fa-var-caret-square-o-up: "\f151";
+@fa-var-caret-up: "\f0d8";
+@fa-var-cc: "\f20a";
+@fa-var-cc-amex: "\f1f3";
+@fa-var-cc-discover: "\f1f2";
+@fa-var-cc-mastercard: "\f1f1";
+@fa-var-cc-paypal: "\f1f4";
+@fa-var-cc-stripe: "\f1f5";
+@fa-var-cc-visa: "\f1f0";
+@fa-var-certificate: "\f0a3";
+@fa-var-chain: "\f0c1";
+@fa-var-chain-broken: "\f127";
+@fa-var-check: "\f00c";
+@fa-var-check-circle: "\f058";
+@fa-var-check-circle-o: "\f05d";
+@fa-var-check-square: "\f14a";
+@fa-var-check-square-o: "\f046";
+@fa-var-chevron-circle-down: "\f13a";
+@fa-var-chevron-circle-left: "\f137";
+@fa-var-chevron-circle-right: "\f138";
+@fa-var-chevron-circle-up: "\f139";
+@fa-var-chevron-down: "\f078";
+@fa-var-chevron-left: "\f053";
+@fa-var-chevron-right: "\f054";
+@fa-var-chevron-up: "\f077";
+@fa-var-child: "\f1ae";
+@fa-var-circle: "\f111";
+@fa-var-circle-o: "\f10c";
+@fa-var-circle-o-notch: "\f1ce";
+@fa-var-circle-thin: "\f1db";
+@fa-var-clipboard: "\f0ea";
+@fa-var-clock-o: "\f017";
+@fa-var-close: "\f00d";
+@fa-var-cloud: "\f0c2";
+@fa-var-cloud-download: "\f0ed";
+@fa-var-cloud-upload: "\f0ee";
+@fa-var-cny: "\f157";
+@fa-var-code: "\f121";
+@fa-var-code-fork: "\f126";
+@fa-var-codepen: "\f1cb";
+@fa-var-coffee: "\f0f4";
+@fa-var-cog: "\f013";
+@fa-var-cogs: "\f085";
+@fa-var-columns: "\f0db";
+@fa-var-comment: "\f075";
+@fa-var-comment-o: "\f0e5";
+@fa-var-comments: "\f086";
+@fa-var-comments-o: "\f0e6";
+@fa-var-compass: "\f14e";
+@fa-var-compress: "\f066";
+@fa-var-copy: "\f0c5";
+@fa-var-copyright: "\f1f9";
+@fa-var-credit-card: "\f09d";
+@fa-var-crop: "\f125";
+@fa-var-crosshairs: "\f05b";
+@fa-var-css3: "\f13c";
+@fa-var-cube: "\f1b2";
+@fa-var-cubes: "\f1b3";
+@fa-var-cut: "\f0c4";
+@fa-var-cutlery: "\f0f5";
+@fa-var-dashboard: "\f0e4";
+@fa-var-database: "\f1c0";
+@fa-var-dedent: "\f03b";
+@fa-var-delicious: "\f1a5";
+@fa-var-desktop: "\f108";
+@fa-var-deviantart: "\f1bd";
+@fa-var-digg: "\f1a6";
+@fa-var-dollar: "\f155";
+@fa-var-dot-circle-o: "\f192";
+@fa-var-download: "\f019";
+@fa-var-dribbble: "\f17d";
+@fa-var-dropbox: "\f16b";
+@fa-var-drupal: "\f1a9";
+@fa-var-edit: "\f044";
+@fa-var-eject: "\f052";
+@fa-var-ellipsis-h: "\f141";
+@fa-var-ellipsis-v: "\f142";
+@fa-var-empire: "\f1d1";
+@fa-var-envelope: "\f0e0";
+@fa-var-envelope-o: "\f003";
+@fa-var-envelope-square: "\f199";
+@fa-var-eraser: "\f12d";
+@fa-var-eur: "\f153";
+@fa-var-euro: "\f153";
+@fa-var-exchange: "\f0ec";
+@fa-var-exclamation: "\f12a";
+@fa-var-exclamation-circle: "\f06a";
+@fa-var-exclamation-triangle: "\f071";
+@fa-var-expand: "\f065";
+@fa-var-external-link: "\f08e";
+@fa-var-external-link-square: "\f14c";
+@fa-var-eye: "\f06e";
+@fa-var-eye-slash: "\f070";
+@fa-var-eyedropper: "\f1fb";
+@fa-var-facebook: "\f09a";
+@fa-var-facebook-square: "\f082";
+@fa-var-fast-backward: "\f049";
+@fa-var-fast-forward: "\f050";
+@fa-var-fax: "\f1ac";
+@fa-var-female: "\f182";
+@fa-var-fighter-jet: "\f0fb";
+@fa-var-file: "\f15b";
+@fa-var-file-archive-o: "\f1c6";
+@fa-var-file-audio-o: "\f1c7";
+@fa-var-file-code-o: "\f1c9";
+@fa-var-file-excel-o: "\f1c3";
+@fa-var-file-image-o: "\f1c5";
+@fa-var-file-movie-o: "\f1c8";
+@fa-var-file-o: "\f016";
+@fa-var-file-pdf-o: "\f1c1";
+@fa-var-file-photo-o: "\f1c5";
+@fa-var-file-picture-o: "\f1c5";
+@fa-var-file-powerpoint-o: "\f1c4";
+@fa-var-file-sound-o: "\f1c7";
+@fa-var-file-text: "\f15c";
+@fa-var-file-text-o: "\f0f6";
+@fa-var-file-video-o: "\f1c8";
+@fa-var-file-word-o: "\f1c2";
+@fa-var-file-zip-o: "\f1c6";
+@fa-var-files-o: "\f0c5";
+@fa-var-film: "\f008";
+@fa-var-filter: "\f0b0";
+@fa-var-fire: "\f06d";
+@fa-var-fire-extinguisher: "\f134";
+@fa-var-flag: "\f024";
+@fa-var-flag-checkered: "\f11e";
+@fa-var-flag-o: "\f11d";
+@fa-var-flash: "\f0e7";
+@fa-var-flask: "\f0c3";
+@fa-var-flickr: "\f16e";
+@fa-var-floppy-o: "\f0c7";
+@fa-var-folder: "\f07b";
+@fa-var-folder-o: "\f114";
+@fa-var-folder-open: "\f07c";
+@fa-var-folder-open-o: "\f115";
+@fa-var-font: "\f031";
+@fa-var-forward: "\f04e";
+@fa-var-foursquare: "\f180";
+@fa-var-frown-o: "\f119";
+@fa-var-futbol-o: "\f1e3";
+@fa-var-gamepad: "\f11b";
+@fa-var-gavel: "\f0e3";
+@fa-var-gbp: "\f154";
+@fa-var-ge: "\f1d1";
+@fa-var-gear: "\f013";
+@fa-var-gears: "\f085";
+@fa-var-gift: "\f06b";
+@fa-var-git: "\f1d3";
+@fa-var-git-square: "\f1d2";
+@fa-var-github: "\f09b";
+@fa-var-github-alt: "\f113";
+@fa-var-github-square: "\f092";
+@fa-var-gittip: "\f184";
+@fa-var-glass: "\f000";
+@fa-var-globe: "\f0ac";
+@fa-var-google: "\f1a0";
+@fa-var-google-plus: "\f0d5";
+@fa-var-google-plus-square: "\f0d4";
+@fa-var-google-wallet: "\f1ee";
+@fa-var-graduation-cap: "\f19d";
+@fa-var-group: "\f0c0";
+@fa-var-h-square: "\f0fd";
+@fa-var-hacker-news: "\f1d4";
+@fa-var-hand-o-down: "\f0a7";
+@fa-var-hand-o-left: "\f0a5";
+@fa-var-hand-o-right: "\f0a4";
+@fa-var-hand-o-up: "\f0a6";
+@fa-var-hdd-o: "\f0a0";
+@fa-var-header: "\f1dc";
+@fa-var-headphones: "\f025";
+@fa-var-heart: "\f004";
+@fa-var-heart-o: "\f08a";
+@fa-var-history: "\f1da";
+@fa-var-home: "\f015";
+@fa-var-hospital-o: "\f0f8";
+@fa-var-html5: "\f13b";
+@fa-var-ils: "\f20b";
+@fa-var-image: "\f03e";
+@fa-var-inbox: "\f01c";
+@fa-var-indent: "\f03c";
+@fa-var-info: "\f129";
+@fa-var-info-circle: "\f05a";
+@fa-var-inr: "\f156";
+@fa-var-instagram: "\f16d";
+@fa-var-institution: "\f19c";
+@fa-var-ioxhost: "\f208";
+@fa-var-italic: "\f033";
+@fa-var-joomla: "\f1aa";
+@fa-var-jpy: "\f157";
+@fa-var-jsfiddle: "\f1cc";
+@fa-var-key: "\f084";
+@fa-var-keyboard-o: "\f11c";
+@fa-var-krw: "\f159";
+@fa-var-language: "\f1ab";
+@fa-var-laptop: "\f109";
+@fa-var-lastfm: "\f202";
+@fa-var-lastfm-square: "\f203";
+@fa-var-leaf: "\f06c";
+@fa-var-legal: "\f0e3";
+@fa-var-lemon-o: "\f094";
+@fa-var-level-down: "\f149";
+@fa-var-level-up: "\f148";
+@fa-var-life-bouy: "\f1cd";
+@fa-var-life-buoy: "\f1cd";
+@fa-var-life-ring: "\f1cd";
+@fa-var-life-saver: "\f1cd";
+@fa-var-lightbulb-o: "\f0eb";
+@fa-var-line-chart: "\f201";
+@fa-var-link: "\f0c1";
+@fa-var-linkedin: "\f0e1";
+@fa-var-linkedin-square: "\f08c";
+@fa-var-linux: "\f17c";
+@fa-var-list: "\f03a";
+@fa-var-list-alt: "\f022";
+@fa-var-list-ol: "\f0cb";
+@fa-var-list-ul: "\f0ca";
+@fa-var-location-arrow: "\f124";
+@fa-var-lock: "\f023";
+@fa-var-long-arrow-down: "\f175";
+@fa-var-long-arrow-left: "\f177";
+@fa-var-long-arrow-right: "\f178";
+@fa-var-long-arrow-up: "\f176";
+@fa-var-magic: "\f0d0";
+@fa-var-magnet: "\f076";
+@fa-var-mail-forward: "\f064";
+@fa-var-mail-reply: "\f112";
+@fa-var-mail-reply-all: "\f122";
+@fa-var-male: "\f183";
+@fa-var-map-marker: "\f041";
+@fa-var-maxcdn: "\f136";
+@fa-var-meanpath: "\f20c";
+@fa-var-medkit: "\f0fa";
+@fa-var-meh-o: "\f11a";
+@fa-var-microphone: "\f130";
+@fa-var-microphone-slash: "\f131";
+@fa-var-minus: "\f068";
+@fa-var-minus-circle: "\f056";
+@fa-var-minus-square: "\f146";
+@fa-var-minus-square-o: "\f147";
+@fa-var-mobile: "\f10b";
+@fa-var-mobile-phone: "\f10b";
+@fa-var-money: "\f0d6";
+@fa-var-moon-o: "\f186";
+@fa-var-mortar-board: "\f19d";
+@fa-var-music: "\f001";
+@fa-var-navicon: "\f0c9";
+@fa-var-newspaper-o: "\f1ea";
+@fa-var-openid: "\f19b";
+@fa-var-outdent: "\f03b";
+@fa-var-pagelines: "\f18c";
+@fa-var-paint-brush: "\f1fc";
+@fa-var-paper-plane: "\f1d8";
+@fa-var-paper-plane-o: "\f1d9";
+@fa-var-paperclip: "\f0c6";
+@fa-var-paragraph: "\f1dd";
+@fa-var-paste: "\f0ea";
+@fa-var-pause: "\f04c";
+@fa-var-paw: "\f1b0";
+@fa-var-paypal: "\f1ed";
+@fa-var-pencil: "\f040";
+@fa-var-pencil-square: "\f14b";
+@fa-var-pencil-square-o: "\f044";
+@fa-var-phone: "\f095";
+@fa-var-phone-square: "\f098";
+@fa-var-photo: "\f03e";
+@fa-var-picture-o: "\f03e";
+@fa-var-pie-chart: "\f200";
+@fa-var-pied-piper: "\f1a7";
+@fa-var-pied-piper-alt: "\f1a8";
+@fa-var-pinterest: "\f0d2";
+@fa-var-pinterest-square: "\f0d3";
+@fa-var-plane: "\f072";
+@fa-var-play: "\f04b";
+@fa-var-play-circle: "\f144";
+@fa-var-play-circle-o: "\f01d";
+@fa-var-plug: "\f1e6";
+@fa-var-plus: "\f067";
+@fa-var-plus-circle: "\f055";
+@fa-var-plus-square: "\f0fe";
+@fa-var-plus-square-o: "\f196";
+@fa-var-power-off: "\f011";
+@fa-var-print: "\f02f";
+@fa-var-puzzle-piece: "\f12e";
+@fa-var-qq: "\f1d6";
+@fa-var-qrcode: "\f029";
+@fa-var-question: "\f128";
+@fa-var-question-circle: "\f059";
+@fa-var-quote-left: "\f10d";
+@fa-var-quote-right: "\f10e";
+@fa-var-ra: "\f1d0";
+@fa-var-random: "\f074";
+@fa-var-rebel: "\f1d0";
+@fa-var-recycle: "\f1b8";
+@fa-var-reddit: "\f1a1";
+@fa-var-reddit-square: "\f1a2";
+@fa-var-refresh: "\f021";
+@fa-var-remove: "\f00d";
+@fa-var-renren: "\f18b";
+@fa-var-reorder: "\f0c9";
+@fa-var-repeat: "\f01e";
+@fa-var-reply: "\f112";
+@fa-var-reply-all: "\f122";
+@fa-var-retweet: "\f079";
+@fa-var-rmb: "\f157";
+@fa-var-road: "\f018";
+@fa-var-rocket: "\f135";
+@fa-var-rotate-left: "\f0e2";
+@fa-var-rotate-right: "\f01e";
+@fa-var-rouble: "\f158";
+@fa-var-rss: "\f09e";
+@fa-var-rss-square: "\f143";
+@fa-var-rub: "\f158";
+@fa-var-ruble: "\f158";
+@fa-var-rupee: "\f156";
+@fa-var-save: "\f0c7";
+@fa-var-scissors: "\f0c4";
+@fa-var-search: "\f002";
+@fa-var-search-minus: "\f010";
+@fa-var-search-plus: "\f00e";
+@fa-var-send: "\f1d8";
+@fa-var-send-o: "\f1d9";
+@fa-var-share: "\f064";
+@fa-var-share-alt: "\f1e0";
+@fa-var-share-alt-square: "\f1e1";
+@fa-var-share-square: "\f14d";
+@fa-var-share-square-o: "\f045";
+@fa-var-shekel: "\f20b";
+@fa-var-sheqel: "\f20b";
+@fa-var-shield: "\f132";
+@fa-var-shopping-cart: "\f07a";
+@fa-var-sign-in: "\f090";
+@fa-var-sign-out: "\f08b";
+@fa-var-signal: "\f012";
+@fa-var-sitemap: "\f0e8";
+@fa-var-skype: "\f17e";
+@fa-var-slack: "\f198";
+@fa-var-sliders: "\f1de";
+@fa-var-slideshare: "\f1e7";
+@fa-var-smile-o: "\f118";
+@fa-var-soccer-ball-o: "\f1e3";
+@fa-var-sort: "\f0dc";
+@fa-var-sort-alpha-asc: "\f15d";
+@fa-var-sort-alpha-desc: "\f15e";
+@fa-var-sort-amount-asc: "\f160";
+@fa-var-sort-amount-desc: "\f161";
+@fa-var-sort-asc: "\f0de";
+@fa-var-sort-desc: "\f0dd";
+@fa-var-sort-down: "\f0dd";
+@fa-var-sort-numeric-asc: "\f162";
+@fa-var-sort-numeric-desc: "\f163";
+@fa-var-sort-up: "\f0de";
+@fa-var-soundcloud: "\f1be";
+@fa-var-space-shuttle: "\f197";
+@fa-var-spinner: "\f110";
+@fa-var-spoon: "\f1b1";
+@fa-var-spotify: "\f1bc";
+@fa-var-square: "\f0c8";
+@fa-var-square-o: "\f096";
+@fa-var-stack-exchange: "\f18d";
+@fa-var-stack-overflow: "\f16c";
+@fa-var-star: "\f005";
+@fa-var-star-half: "\f089";
+@fa-var-star-half-empty: "\f123";
+@fa-var-star-half-full: "\f123";
+@fa-var-star-half-o: "\f123";
+@fa-var-star-o: "\f006";
+@fa-var-steam: "\f1b6";
+@fa-var-steam-square: "\f1b7";
+@fa-var-step-backward: "\f048";
+@fa-var-step-forward: "\f051";
+@fa-var-stethoscope: "\f0f1";
+@fa-var-stop: "\f04d";
+@fa-var-strikethrough: "\f0cc";
+@fa-var-stumbleupon: "\f1a4";
+@fa-var-stumbleupon-circle: "\f1a3";
+@fa-var-subscript: "\f12c";
+@fa-var-suitcase: "\f0f2";
+@fa-var-sun-o: "\f185";
+@fa-var-superscript: "\f12b";
+@fa-var-support: "\f1cd";
+@fa-var-table: "\f0ce";
+@fa-var-tablet: "\f10a";
+@fa-var-tachometer: "\f0e4";
+@fa-var-tag: "\f02b";
+@fa-var-tags: "\f02c";
+@fa-var-tasks: "\f0ae";
+@fa-var-taxi: "\f1ba";
+@fa-var-tencent-weibo: "\f1d5";
+@fa-var-terminal: "\f120";
+@fa-var-text-height: "\f034";
+@fa-var-text-width: "\f035";
+@fa-var-th: "\f00a";
+@fa-var-th-large: "\f009";
+@fa-var-th-list: "\f00b";
+@fa-var-thumb-tack: "\f08d";
+@fa-var-thumbs-down: "\f165";
+@fa-var-thumbs-o-down: "\f088";
+@fa-var-thumbs-o-up: "\f087";
+@fa-var-thumbs-up: "\f164";
+@fa-var-ticket: "\f145";
+@fa-var-times: "\f00d";
+@fa-var-times-circle: "\f057";
+@fa-var-times-circle-o: "\f05c";
+@fa-var-tint: "\f043";
+@fa-var-toggle-down: "\f150";
+@fa-var-toggle-left: "\f191";
+@fa-var-toggle-off: "\f204";
+@fa-var-toggle-on: "\f205";
+@fa-var-toggle-right: "\f152";
+@fa-var-toggle-up: "\f151";
+@fa-var-trash: "\f1f8";
+@fa-var-trash-o: "\f014";
+@fa-var-tree: "\f1bb";
+@fa-var-trello: "\f181";
+@fa-var-trophy: "\f091";
+@fa-var-truck: "\f0d1";
+@fa-var-try: "\f195";
+@fa-var-tty: "\f1e4";
+@fa-var-tumblr: "\f173";
+@fa-var-tumblr-square: "\f174";
+@fa-var-turkish-lira: "\f195";
+@fa-var-twitch: "\f1e8";
+@fa-var-twitter: "\f099";
+@fa-var-twitter-square: "\f081";
+@fa-var-umbrella: "\f0e9";
+@fa-var-underline: "\f0cd";
+@fa-var-undo: "\f0e2";
+@fa-var-university: "\f19c";
+@fa-var-unlink: "\f127";
+@fa-var-unlock: "\f09c";
+@fa-var-unlock-alt: "\f13e";
+@fa-var-unsorted: "\f0dc";
+@fa-var-upload: "\f093";
+@fa-var-usd: "\f155";
+@fa-var-user: "\f007";
+@fa-var-user-md: "\f0f0";
+@fa-var-users: "\f0c0";
+@fa-var-video-camera: "\f03d";
+@fa-var-vimeo-square: "\f194";
+@fa-var-vine: "\f1ca";
+@fa-var-vk: "\f189";
+@fa-var-volume-down: "\f027";
+@fa-var-volume-off: "\f026";
+@fa-var-volume-up: "\f028";
+@fa-var-warning: "\f071";
+@fa-var-wechat: "\f1d7";
+@fa-var-weibo: "\f18a";
+@fa-var-weixin: "\f1d7";
+@fa-var-wheelchair: "\f193";
+@fa-var-wifi: "\f1eb";
+@fa-var-windows: "\f17a";
+@fa-var-won: "\f159";
+@fa-var-wordpress: "\f19a";
+@fa-var-wrench: "\f0ad";
+@fa-var-xing: "\f168";
+@fa-var-xing-square: "\f169";
+@fa-var-yahoo: "\f19e";
+@fa-var-yelp: "\f1e9";
+@fa-var-yen: "\f157";
+@fa-var-youtube: "\f167";
+@fa-var-youtube-play: "\f16a";
+@fa-var-youtube-square: "\f166";
+
diff --git a/common/src/main/webapp/thirdparty/font-awesome/scss/_bordered-pulled.scss b/common/src/main/webapp/thirdparty/font-awesome/scss/_bordered-pulled.scss
new file mode 100644
index 0000000..9d3fdf3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/scss/_bordered-pulled.scss
@@ -0,0 +1,16 @@
+// Bordered & Pulled
+// -------------------------
+
+.#{$fa-css-prefix}-border {
+ padding: .2em .25em .15em;
+ border: solid .08em $fa-border-color;
+ border-radius: .1em;
+}
+
+.pull-right { float: right; }
+.pull-left { float: left; }
+
+.#{$fa-css-prefix} {
+ &.pull-left { margin-right: .3em; }
+ &.pull-right { margin-left: .3em; }
+}
diff --git a/common/src/main/webapp/thirdparty/font-awesome/scss/_core.scss b/common/src/main/webapp/thirdparty/font-awesome/scss/_core.scss
new file mode 100644
index 0000000..ca46d37
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/scss/_core.scss
@@ -0,0 +1,11 @@
+// Base Class Definition
+// -------------------------
+
+.#{$fa-css-prefix} {
+ display: inline-block;
+ font: normal normal normal 14px/1 FontAwesome; // shortening font declaration
+ font-size: inherit; // can't have font-size inherit on line above, so need to override
+ text-rendering: auto; // optimizelegibility throws things off #1094
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
diff --git a/common/src/main/webapp/thirdparty/font-awesome/scss/_fixed-width.scss b/common/src/main/webapp/thirdparty/font-awesome/scss/_fixed-width.scss
new file mode 100644
index 0000000..b221c98
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/scss/_fixed-width.scss
@@ -0,0 +1,6 @@
+// Fixed Width Icons
+// -------------------------
+.#{$fa-css-prefix}-fw {
+ width: (18em / 14);
+ text-align: center;
+}
diff --git a/common/src/main/webapp/thirdparty/font-awesome/scss/_icons.scss b/common/src/main/webapp/thirdparty/font-awesome/scss/_icons.scss
new file mode 100644
index 0000000..8dc2939
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/scss/_icons.scss
@@ -0,0 +1,552 @@
+/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
+ readers do not read off random characters that represent icons */
+
+.#{$fa-css-prefix}-glass:before { content: $fa-var-glass; }
+.#{$fa-css-prefix}-music:before { content: $fa-var-music; }
+.#{$fa-css-prefix}-search:before { content: $fa-var-search; }
+.#{$fa-css-prefix}-envelope-o:before { content: $fa-var-envelope-o; }
+.#{$fa-css-prefix}-heart:before { content: $fa-var-heart; }
+.#{$fa-css-prefix}-star:before { content: $fa-var-star; }
+.#{$fa-css-prefix}-star-o:before { content: $fa-var-star-o; }
+.#{$fa-css-prefix}-user:before { content: $fa-var-user; }
+.#{$fa-css-prefix}-film:before { content: $fa-var-film; }
+.#{$fa-css-prefix}-th-large:before { content: $fa-var-th-large; }
+.#{$fa-css-prefix}-th:before { content: $fa-var-th; }
+.#{$fa-css-prefix}-th-list:before { content: $fa-var-th-list; }
+.#{$fa-css-prefix}-check:before { content: $fa-var-check; }
+.#{$fa-css-prefix}-remove:before,
+.#{$fa-css-prefix}-close:before,
+.#{$fa-css-prefix}-times:before { content: $fa-var-times; }
+.#{$fa-css-prefix}-search-plus:before { content: $fa-var-search-plus; }
+.#{$fa-css-prefix}-search-minus:before { content: $fa-var-search-minus; }
+.#{$fa-css-prefix}-power-off:before { content: $fa-var-power-off; }
+.#{$fa-css-prefix}-signal:before { content: $fa-var-signal; }
+.#{$fa-css-prefix}-gear:before,
+.#{$fa-css-prefix}-cog:before { content: $fa-var-cog; }
+.#{$fa-css-prefix}-trash-o:before { content: $fa-var-trash-o; }
+.#{$fa-css-prefix}-home:before { content: $fa-var-home; }
+.#{$fa-css-prefix}-file-o:before { content: $fa-var-file-o; }
+.#{$fa-css-prefix}-clock-o:before { content: $fa-var-clock-o; }
+.#{$fa-css-prefix}-road:before { content: $fa-var-road; }
+.#{$fa-css-prefix}-download:before { content: $fa-var-download; }
+.#{$fa-css-prefix}-arrow-circle-o-down:before { content: $fa-var-arrow-circle-o-down; }
+.#{$fa-css-prefix}-arrow-circle-o-up:before { content: $fa-var-arrow-circle-o-up; }
+.#{$fa-css-prefix}-inbox:before { content: $fa-var-inbox; }
+.#{$fa-css-prefix}-play-circle-o:before { content: $fa-var-play-circle-o; }
+.#{$fa-css-prefix}-rotate-right:before,
+.#{$fa-css-prefix}-repeat:before { content: $fa-var-repeat; }
+.#{$fa-css-prefix}-refresh:before { content: $fa-var-refresh; }
+.#{$fa-css-prefix}-list-alt:before { content: $fa-var-list-alt; }
+.#{$fa-css-prefix}-lock:before { content: $fa-var-lock; }
+.#{$fa-css-prefix}-flag:before { content: $fa-var-flag; }
+.#{$fa-css-prefix}-headphones:before { content: $fa-var-headphones; }
+.#{$fa-css-prefix}-volume-off:before { content: $fa-var-volume-off; }
+.#{$fa-css-prefix}-volume-down:before { content: $fa-var-volume-down; }
+.#{$fa-css-prefix}-volume-up:before { content: $fa-var-volume-up; }
+.#{$fa-css-prefix}-qrcode:before { content: $fa-var-qrcode; }
+.#{$fa-css-prefix}-barcode:before { content: $fa-var-barcode; }
+.#{$fa-css-prefix}-tag:before { content: $fa-var-tag; }
+.#{$fa-css-prefix}-tags:before { content: $fa-var-tags; }
+.#{$fa-css-prefix}-book:before { content: $fa-var-book; }
+.#{$fa-css-prefix}-bookmark:before { content: $fa-var-bookmark; }
+.#{$fa-css-prefix}-print:before { content: $fa-var-print; }
+.#{$fa-css-prefix}-camera:before { content: $fa-var-camera; }
+.#{$fa-css-prefix}-font:before { content: $fa-var-font; }
+.#{$fa-css-prefix}-bold:before { content: $fa-var-bold; }
+.#{$fa-css-prefix}-italic:before { content: $fa-var-italic; }
+.#{$fa-css-prefix}-text-height:before { content: $fa-var-text-height; }
+.#{$fa-css-prefix}-text-width:before { content: $fa-var-text-width; }
+.#{$fa-css-prefix}-align-left:before { content: $fa-var-align-left; }
+.#{$fa-css-prefix}-align-center:before { content: $fa-var-align-center; }
+.#{$fa-css-prefix}-align-right:before { content: $fa-var-align-right; }
+.#{$fa-css-prefix}-align-justify:before { content: $fa-var-align-justify; }
+.#{$fa-css-prefix}-list:before { content: $fa-var-list; }
+.#{$fa-css-prefix}-dedent:before,
+.#{$fa-css-prefix}-outdent:before { content: $fa-var-outdent; }
+.#{$fa-css-prefix}-indent:before { content: $fa-var-indent; }
+.#{$fa-css-prefix}-video-camera:before { content: $fa-var-video-camera; }
+.#{$fa-css-prefix}-photo:before,
+.#{$fa-css-prefix}-image:before,
+.#{$fa-css-prefix}-picture-o:before { content: $fa-var-picture-o; }
+.#{$fa-css-prefix}-pencil:before { content: $fa-var-pencil; }
+.#{$fa-css-prefix}-map-marker:before { content: $fa-var-map-marker; }
+.#{$fa-css-prefix}-adjust:before { content: $fa-var-adjust; }
+.#{$fa-css-prefix}-tint:before { content: $fa-var-tint; }
+.#{$fa-css-prefix}-edit:before,
+.#{$fa-css-prefix}-pencil-square-o:before { content: $fa-var-pencil-square-o; }
+.#{$fa-css-prefix}-share-square-o:before { content: $fa-var-share-square-o; }
+.#{$fa-css-prefix}-check-square-o:before { content: $fa-var-check-square-o; }
+.#{$fa-css-prefix}-arrows:before { content: $fa-var-arrows; }
+.#{$fa-css-prefix}-step-backward:before { content: $fa-var-step-backward; }
+.#{$fa-css-prefix}-fast-backward:before { content: $fa-var-fast-backward; }
+.#{$fa-css-prefix}-backward:before { content: $fa-var-backward; }
+.#{$fa-css-prefix}-play:before { content: $fa-var-play; }
+.#{$fa-css-prefix}-pause:before { content: $fa-var-pause; }
+.#{$fa-css-prefix}-stop:before { content: $fa-var-stop; }
+.#{$fa-css-prefix}-forward:before { content: $fa-var-forward; }
+.#{$fa-css-prefix}-fast-forward:before { content: $fa-var-fast-forward; }
+.#{$fa-css-prefix}-step-forward:before { content: $fa-var-step-forward; }
+.#{$fa-css-prefix}-eject:before { content: $fa-var-eject; }
+.#{$fa-css-prefix}-chevron-left:before { content: $fa-var-chevron-left; }
+.#{$fa-css-prefix}-chevron-right:before { content: $fa-var-chevron-right; }
+.#{$fa-css-prefix}-plus-circle:before { content: $fa-var-plus-circle; }
+.#{$fa-css-prefix}-minus-circle:before { content: $fa-var-minus-circle; }
+.#{$fa-css-prefix}-times-circle:before { content: $fa-var-times-circle; }
+.#{$fa-css-prefix}-check-circle:before { content: $fa-var-check-circle; }
+.#{$fa-css-prefix}-question-circle:before { content: $fa-var-question-circle; }
+.#{$fa-css-prefix}-info-circle:before { content: $fa-var-info-circle; }
+.#{$fa-css-prefix}-crosshairs:before { content: $fa-var-crosshairs; }
+.#{$fa-css-prefix}-times-circle-o:before { content: $fa-var-times-circle-o; }
+.#{$fa-css-prefix}-check-circle-o:before { content: $fa-var-check-circle-o; }
+.#{$fa-css-prefix}-ban:before { content: $fa-var-ban; }
+.#{$fa-css-prefix}-arrow-left:before { content: $fa-var-arrow-left; }
+.#{$fa-css-prefix}-arrow-right:before { content: $fa-var-arrow-right; }
+.#{$fa-css-prefix}-arrow-up:before { content: $fa-var-arrow-up; }
+.#{$fa-css-prefix}-arrow-down:before { content: $fa-var-arrow-down; }
+.#{$fa-css-prefix}-mail-forward:before,
+.#{$fa-css-prefix}-share:before { content: $fa-var-share; }
+.#{$fa-css-prefix}-expand:before { content: $fa-var-expand; }
+.#{$fa-css-prefix}-compress:before { content: $fa-var-compress; }
+.#{$fa-css-prefix}-plus:before { content: $fa-var-plus; }
+.#{$fa-css-prefix}-minus:before { content: $fa-var-minus; }
+.#{$fa-css-prefix}-asterisk:before { content: $fa-var-asterisk; }
+.#{$fa-css-prefix}-exclamation-circle:before { content: $fa-var-exclamation-circle; }
+.#{$fa-css-prefix}-gift:before { content: $fa-var-gift; }
+.#{$fa-css-prefix}-leaf:before { content: $fa-var-leaf; }
+.#{$fa-css-prefix}-fire:before { content: $fa-var-fire; }
+.#{$fa-css-prefix}-eye:before { content: $fa-var-eye; }
+.#{$fa-css-prefix}-eye-slash:before { content: $fa-var-eye-slash; }
+.#{$fa-css-prefix}-warning:before,
+.#{$fa-css-prefix}-exclamation-triangle:before { content: $fa-var-exclamation-triangle; }
+.#{$fa-css-prefix}-plane:before { content: $fa-var-plane; }
+.#{$fa-css-prefix}-calendar:before { content: $fa-var-calendar; }
+.#{$fa-css-prefix}-random:before { content: $fa-var-random; }
+.#{$fa-css-prefix}-comment:before { content: $fa-var-comment; }
+.#{$fa-css-prefix}-magnet:before { content: $fa-var-magnet; }
+.#{$fa-css-prefix}-chevron-up:before { content: $fa-var-chevron-up; }
+.#{$fa-css-prefix}-chevron-down:before { content: $fa-var-chevron-down; }
+.#{$fa-css-prefix}-retweet:before { content: $fa-var-retweet; }
+.#{$fa-css-prefix}-shopping-cart:before { content: $fa-var-shopping-cart; }
+.#{$fa-css-prefix}-folder:before { content: $fa-var-folder; }
+.#{$fa-css-prefix}-folder-open:before { content: $fa-var-folder-open; }
+.#{$fa-css-prefix}-arrows-v:before { content: $fa-var-arrows-v; }
+.#{$fa-css-prefix}-arrows-h:before { content: $fa-var-arrows-h; }
+.#{$fa-css-prefix}-bar-chart-o:before,
+.#{$fa-css-prefix}-bar-chart:before { content: $fa-var-bar-chart; }
+.#{$fa-css-prefix}-twitter-square:before { content: $fa-var-twitter-square; }
+.#{$fa-css-prefix}-facebook-square:before { content: $fa-var-facebook-square; }
+.#{$fa-css-prefix}-camera-retro:before { content: $fa-var-camera-retro; }
+.#{$fa-css-prefix}-key:before { content: $fa-var-key; }
+.#{$fa-css-prefix}-gears:before,
+.#{$fa-css-prefix}-cogs:before { content: $fa-var-cogs; }
+.#{$fa-css-prefix}-comments:before { content: $fa-var-comments; }
+.#{$fa-css-prefix}-thumbs-o-up:before { content: $fa-var-thumbs-o-up; }
+.#{$fa-css-prefix}-thumbs-o-down:before { content: $fa-var-thumbs-o-down; }
+.#{$fa-css-prefix}-star-half:before { content: $fa-var-star-half; }
+.#{$fa-css-prefix}-heart-o:before { content: $fa-var-heart-o; }
+.#{$fa-css-prefix}-sign-out:before { content: $fa-var-sign-out; }
+.#{$fa-css-prefix}-linkedin-square:before { content: $fa-var-linkedin-square; }
+.#{$fa-css-prefix}-thumb-tack:before { content: $fa-var-thumb-tack; }
+.#{$fa-css-prefix}-external-link:before { content: $fa-var-external-link; }
+.#{$fa-css-prefix}-sign-in:before { content: $fa-var-sign-in; }
+.#{$fa-css-prefix}-trophy:before { content: $fa-var-trophy; }
+.#{$fa-css-prefix}-github-square:before { content: $fa-var-github-square; }
+.#{$fa-css-prefix}-upload:before { content: $fa-var-upload; }
+.#{$fa-css-prefix}-lemon-o:before { content: $fa-var-lemon-o; }
+.#{$fa-css-prefix}-phone:before { content: $fa-var-phone; }
+.#{$fa-css-prefix}-square-o:before { content: $fa-var-square-o; }
+.#{$fa-css-prefix}-bookmark-o:before { content: $fa-var-bookmark-o; }
+.#{$fa-css-prefix}-phone-square:before { content: $fa-var-phone-square; }
+.#{$fa-css-prefix}-twitter:before { content: $fa-var-twitter; }
+.#{$fa-css-prefix}-facebook:before { content: $fa-var-facebook; }
+.#{$fa-css-prefix}-github:before { content: $fa-var-github; }
+.#{$fa-css-prefix}-unlock:before { content: $fa-var-unlock; }
+.#{$fa-css-prefix}-credit-card:before { content: $fa-var-credit-card; }
+.#{$fa-css-prefix}-rss:before { content: $fa-var-rss; }
+.#{$fa-css-prefix}-hdd-o:before { content: $fa-var-hdd-o; }
+.#{$fa-css-prefix}-bullhorn:before { content: $fa-var-bullhorn; }
+.#{$fa-css-prefix}-bell:before { content: $fa-var-bell; }
+.#{$fa-css-prefix}-certificate:before { content: $fa-var-certificate; }
+.#{$fa-css-prefix}-hand-o-right:before { content: $fa-var-hand-o-right; }
+.#{$fa-css-prefix}-hand-o-left:before { content: $fa-var-hand-o-left; }
+.#{$fa-css-prefix}-hand-o-up:before { content: $fa-var-hand-o-up; }
+.#{$fa-css-prefix}-hand-o-down:before { content: $fa-var-hand-o-down; }
+.#{$fa-css-prefix}-arrow-circle-left:before { content: $fa-var-arrow-circle-left; }
+.#{$fa-css-prefix}-arrow-circle-right:before { content: $fa-var-arrow-circle-right; }
+.#{$fa-css-prefix}-arrow-circle-up:before { content: $fa-var-arrow-circle-up; }
+.#{$fa-css-prefix}-arrow-circle-down:before { content: $fa-var-arrow-circle-down; }
+.#{$fa-css-prefix}-globe:before { content: $fa-var-globe; }
+.#{$fa-css-prefix}-wrench:before { content: $fa-var-wrench; }
+.#{$fa-css-prefix}-tasks:before { content: $fa-var-tasks; }
+.#{$fa-css-prefix}-filter:before { content: $fa-var-filter; }
+.#{$fa-css-prefix}-briefcase:before { content: $fa-var-briefcase; }
+.#{$fa-css-prefix}-arrows-alt:before { content: $fa-var-arrows-alt; }
+.#{$fa-css-prefix}-group:before,
+.#{$fa-css-prefix}-users:before { content: $fa-var-users; }
+.#{$fa-css-prefix}-chain:before,
+.#{$fa-css-prefix}-link:before { content: $fa-var-link; }
+.#{$fa-css-prefix}-cloud:before { content: $fa-var-cloud; }
+.#{$fa-css-prefix}-flask:before { content: $fa-var-flask; }
+.#{$fa-css-prefix}-cut:before,
+.#{$fa-css-prefix}-scissors:before { content: $fa-var-scissors; }
+.#{$fa-css-prefix}-copy:before,
+.#{$fa-css-prefix}-files-o:before { content: $fa-var-files-o; }
+.#{$fa-css-prefix}-paperclip:before { content: $fa-var-paperclip; }
+.#{$fa-css-prefix}-save:before,
+.#{$fa-css-prefix}-floppy-o:before { content: $fa-var-floppy-o; }
+.#{$fa-css-prefix}-square:before { content: $fa-var-square; }
+.#{$fa-css-prefix}-navicon:before,
+.#{$fa-css-prefix}-reorder:before,
+.#{$fa-css-prefix}-bars:before { content: $fa-var-bars; }
+.#{$fa-css-prefix}-list-ul:before { content: $fa-var-list-ul; }
+.#{$fa-css-prefix}-list-ol:before { content: $fa-var-list-ol; }
+.#{$fa-css-prefix}-strikethrough:before { content: $fa-var-strikethrough; }
+.#{$fa-css-prefix}-underline:before { content: $fa-var-underline; }
+.#{$fa-css-prefix}-table:before { content: $fa-var-table; }
+.#{$fa-css-prefix}-magic:before { content: $fa-var-magic; }
+.#{$fa-css-prefix}-truck:before { content: $fa-var-truck; }
+.#{$fa-css-prefix}-pinterest:before { content: $fa-var-pinterest; }
+.#{$fa-css-prefix}-pinterest-square:before { content: $fa-var-pinterest-square; }
+.#{$fa-css-prefix}-google-plus-square:before { content: $fa-var-google-plus-square; }
+.#{$fa-css-prefix}-google-plus:before { content: $fa-var-google-plus; }
+.#{$fa-css-prefix}-money:before { content: $fa-var-money; }
+.#{$fa-css-prefix}-caret-down:before { content: $fa-var-caret-down; }
+.#{$fa-css-prefix}-caret-up:before { content: $fa-var-caret-up; }
+.#{$fa-css-prefix}-caret-left:before { content: $fa-var-caret-left; }
+.#{$fa-css-prefix}-caret-right:before { content: $fa-var-caret-right; }
+.#{$fa-css-prefix}-columns:before { content: $fa-var-columns; }
+.#{$fa-css-prefix}-unsorted:before,
+.#{$fa-css-prefix}-sort:before { content: $fa-var-sort; }
+.#{$fa-css-prefix}-sort-down:before,
+.#{$fa-css-prefix}-sort-desc:before { content: $fa-var-sort-desc; }
+.#{$fa-css-prefix}-sort-up:before,
+.#{$fa-css-prefix}-sort-asc:before { content: $fa-var-sort-asc; }
+.#{$fa-css-prefix}-envelope:before { content: $fa-var-envelope; }
+.#{$fa-css-prefix}-linkedin:before { content: $fa-var-linkedin; }
+.#{$fa-css-prefix}-rotate-left:before,
+.#{$fa-css-prefix}-undo:before { content: $fa-var-undo; }
+.#{$fa-css-prefix}-legal:before,
+.#{$fa-css-prefix}-gavel:before { content: $fa-var-gavel; }
+.#{$fa-css-prefix}-dashboard:before,
+.#{$fa-css-prefix}-tachometer:before { content: $fa-var-tachometer; }
+.#{$fa-css-prefix}-comment-o:before { content: $fa-var-comment-o; }
+.#{$fa-css-prefix}-comments-o:before { content: $fa-var-comments-o; }
+.#{$fa-css-prefix}-flash:before,
+.#{$fa-css-prefix}-bolt:before { content: $fa-var-bolt; }
+.#{$fa-css-prefix}-sitemap:before { content: $fa-var-sitemap; }
+.#{$fa-css-prefix}-umbrella:before { content: $fa-var-umbrella; }
+.#{$fa-css-prefix}-paste:before,
+.#{$fa-css-prefix}-clipboard:before { content: $fa-var-clipboard; }
+.#{$fa-css-prefix}-lightbulb-o:before { content: $fa-var-lightbulb-o; }
+.#{$fa-css-prefix}-exchange:before { content: $fa-var-exchange; }
+.#{$fa-css-prefix}-cloud-download:before { content: $fa-var-cloud-download; }
+.#{$fa-css-prefix}-cloud-upload:before { content: $fa-var-cloud-upload; }
+.#{$fa-css-prefix}-user-md:before { content: $fa-var-user-md; }
+.#{$fa-css-prefix}-stethoscope:before { content: $fa-var-stethoscope; }
+.#{$fa-css-prefix}-suitcase:before { content: $fa-var-suitcase; }
+.#{$fa-css-prefix}-bell-o:before { content: $fa-var-bell-o; }
+.#{$fa-css-prefix}-coffee:before { content: $fa-var-coffee; }
+.#{$fa-css-prefix}-cutlery:before { content: $fa-var-cutlery; }
+.#{$fa-css-prefix}-file-text-o:before { content: $fa-var-file-text-o; }
+.#{$fa-css-prefix}-building-o:before { content: $fa-var-building-o; }
+.#{$fa-css-prefix}-hospital-o:before { content: $fa-var-hospital-o; }
+.#{$fa-css-prefix}-ambulance:before { content: $fa-var-ambulance; }
+.#{$fa-css-prefix}-medkit:before { content: $fa-var-medkit; }
+.#{$fa-css-prefix}-fighter-jet:before { content: $fa-var-fighter-jet; }
+.#{$fa-css-prefix}-beer:before { content: $fa-var-beer; }
+.#{$fa-css-prefix}-h-square:before { content: $fa-var-h-square; }
+.#{$fa-css-prefix}-plus-square:before { content: $fa-var-plus-square; }
+.#{$fa-css-prefix}-angle-double-left:before { content: $fa-var-angle-double-left; }
+.#{$fa-css-prefix}-angle-double-right:before { content: $fa-var-angle-double-right; }
+.#{$fa-css-prefix}-angle-double-up:before { content: $fa-var-angle-double-up; }
+.#{$fa-css-prefix}-angle-double-down:before { content: $fa-var-angle-double-down; }
+.#{$fa-css-prefix}-angle-left:before { content: $fa-var-angle-left; }
+.#{$fa-css-prefix}-angle-right:before { content: $fa-var-angle-right; }
+.#{$fa-css-prefix}-angle-up:before { content: $fa-var-angle-up; }
+.#{$fa-css-prefix}-angle-down:before { content: $fa-var-angle-down; }
+.#{$fa-css-prefix}-desktop:before { content: $fa-var-desktop; }
+.#{$fa-css-prefix}-laptop:before { content: $fa-var-laptop; }
+.#{$fa-css-prefix}-tablet:before { content: $fa-var-tablet; }
+.#{$fa-css-prefix}-mobile-phone:before,
+.#{$fa-css-prefix}-mobile:before { content: $fa-var-mobile; }
+.#{$fa-css-prefix}-circle-o:before { content: $fa-var-circle-o; }
+.#{$fa-css-prefix}-quote-left:before { content: $fa-var-quote-left; }
+.#{$fa-css-prefix}-quote-right:before { content: $fa-var-quote-right; }
+.#{$fa-css-prefix}-spinner:before { content: $fa-var-spinner; }
+.#{$fa-css-prefix}-circle:before { content: $fa-var-circle; }
+.#{$fa-css-prefix}-mail-reply:before,
+.#{$fa-css-prefix}-reply:before { content: $fa-var-reply; }
+.#{$fa-css-prefix}-github-alt:before { content: $fa-var-github-alt; }
+.#{$fa-css-prefix}-folder-o:before { content: $fa-var-folder-o; }
+.#{$fa-css-prefix}-folder-open-o:before { content: $fa-var-folder-open-o; }
+.#{$fa-css-prefix}-smile-o:before { content: $fa-var-smile-o; }
+.#{$fa-css-prefix}-frown-o:before { content: $fa-var-frown-o; }
+.#{$fa-css-prefix}-meh-o:before { content: $fa-var-meh-o; }
+.#{$fa-css-prefix}-gamepad:before { content: $fa-var-gamepad; }
+.#{$fa-css-prefix}-keyboard-o:before { content: $fa-var-keyboard-o; }
+.#{$fa-css-prefix}-flag-o:before { content: $fa-var-flag-o; }
+.#{$fa-css-prefix}-flag-checkered:before { content: $fa-var-flag-checkered; }
+.#{$fa-css-prefix}-terminal:before { content: $fa-var-terminal; }
+.#{$fa-css-prefix}-code:before { content: $fa-var-code; }
+.#{$fa-css-prefix}-mail-reply-all:before,
+.#{$fa-css-prefix}-reply-all:before { content: $fa-var-reply-all; }
+.#{$fa-css-prefix}-star-half-empty:before,
+.#{$fa-css-prefix}-star-half-full:before,
+.#{$fa-css-prefix}-star-half-o:before { content: $fa-var-star-half-o; }
+.#{$fa-css-prefix}-location-arrow:before { content: $fa-var-location-arrow; }
+.#{$fa-css-prefix}-crop:before { content: $fa-var-crop; }
+.#{$fa-css-prefix}-code-fork:before { content: $fa-var-code-fork; }
+.#{$fa-css-prefix}-unlink:before,
+.#{$fa-css-prefix}-chain-broken:before { content: $fa-var-chain-broken; }
+.#{$fa-css-prefix}-question:before { content: $fa-var-question; }
+.#{$fa-css-prefix}-info:before { content: $fa-var-info; }
+.#{$fa-css-prefix}-exclamation:before { content: $fa-var-exclamation; }
+.#{$fa-css-prefix}-superscript:before { content: $fa-var-superscript; }
+.#{$fa-css-prefix}-subscript:before { content: $fa-var-subscript; }
+.#{$fa-css-prefix}-eraser:before { content: $fa-var-eraser; }
+.#{$fa-css-prefix}-puzzle-piece:before { content: $fa-var-puzzle-piece; }
+.#{$fa-css-prefix}-microphone:before { content: $fa-var-microphone; }
+.#{$fa-css-prefix}-microphone-slash:before { content: $fa-var-microphone-slash; }
+.#{$fa-css-prefix}-shield:before { content: $fa-var-shield; }
+.#{$fa-css-prefix}-calendar-o:before { content: $fa-var-calendar-o; }
+.#{$fa-css-prefix}-fire-extinguisher:before { content: $fa-var-fire-extinguisher; }
+.#{$fa-css-prefix}-rocket:before { content: $fa-var-rocket; }
+.#{$fa-css-prefix}-maxcdn:before { content: $fa-var-maxcdn; }
+.#{$fa-css-prefix}-chevron-circle-left:before { content: $fa-var-chevron-circle-left; }
+.#{$fa-css-prefix}-chevron-circle-right:before { content: $fa-var-chevron-circle-right; }
+.#{$fa-css-prefix}-chevron-circle-up:before { content: $fa-var-chevron-circle-up; }
+.#{$fa-css-prefix}-chevron-circle-down:before { content: $fa-var-chevron-circle-down; }
+.#{$fa-css-prefix}-html5:before { content: $fa-var-html5; }
+.#{$fa-css-prefix}-css3:before { content: $fa-var-css3; }
+.#{$fa-css-prefix}-anchor:before { content: $fa-var-anchor; }
+.#{$fa-css-prefix}-unlock-alt:before { content: $fa-var-unlock-alt; }
+.#{$fa-css-prefix}-bullseye:before { content: $fa-var-bullseye; }
+.#{$fa-css-prefix}-ellipsis-h:before { content: $fa-var-ellipsis-h; }
+.#{$fa-css-prefix}-ellipsis-v:before { content: $fa-var-ellipsis-v; }
+.#{$fa-css-prefix}-rss-square:before { content: $fa-var-rss-square; }
+.#{$fa-css-prefix}-play-circle:before { content: $fa-var-play-circle; }
+.#{$fa-css-prefix}-ticket:before { content: $fa-var-ticket; }
+.#{$fa-css-prefix}-minus-square:before { content: $fa-var-minus-square; }
+.#{$fa-css-prefix}-minus-square-o:before { content: $fa-var-minus-square-o; }
+.#{$fa-css-prefix}-level-up:before { content: $fa-var-level-up; }
+.#{$fa-css-prefix}-level-down:before { content: $fa-var-level-down; }
+.#{$fa-css-prefix}-check-square:before { content: $fa-var-check-square; }
+.#{$fa-css-prefix}-pencil-square:before { content: $fa-var-pencil-square; }
+.#{$fa-css-prefix}-external-link-square:before { content: $fa-var-external-link-square; }
+.#{$fa-css-prefix}-share-square:before { content: $fa-var-share-square; }
+.#{$fa-css-prefix}-compass:before { content: $fa-var-compass; }
+.#{$fa-css-prefix}-toggle-down:before,
+.#{$fa-css-prefix}-caret-square-o-down:before { content: $fa-var-caret-square-o-down; }
+.#{$fa-css-prefix}-toggle-up:before,
+.#{$fa-css-prefix}-caret-square-o-up:before { content: $fa-var-caret-square-o-up; }
+.#{$fa-css-prefix}-toggle-right:before,
+.#{$fa-css-prefix}-caret-square-o-right:before { content: $fa-var-caret-square-o-right; }
+.#{$fa-css-prefix}-euro:before,
+.#{$fa-css-prefix}-eur:before { content: $fa-var-eur; }
+.#{$fa-css-prefix}-gbp:before { content: $fa-var-gbp; }
+.#{$fa-css-prefix}-dollar:before,
+.#{$fa-css-prefix}-usd:before { content: $fa-var-usd; }
+.#{$fa-css-prefix}-rupee:before,
+.#{$fa-css-prefix}-inr:before { content: $fa-var-inr; }
+.#{$fa-css-prefix}-cny:before,
+.#{$fa-css-prefix}-rmb:before,
+.#{$fa-css-prefix}-yen:before,
+.#{$fa-css-prefix}-jpy:before { content: $fa-var-jpy; }
+.#{$fa-css-prefix}-ruble:before,
+.#{$fa-css-prefix}-rouble:before,
+.#{$fa-css-prefix}-rub:before { content: $fa-var-rub; }
+.#{$fa-css-prefix}-won:before,
+.#{$fa-css-prefix}-krw:before { content: $fa-var-krw; }
+.#{$fa-css-prefix}-bitcoin:before,
+.#{$fa-css-prefix}-btc:before { content: $fa-var-btc; }
+.#{$fa-css-prefix}-file:before { content: $fa-var-file; }
+.#{$fa-css-prefix}-file-text:before { content: $fa-var-file-text; }
+.#{$fa-css-prefix}-sort-alpha-asc:before { content: $fa-var-sort-alpha-asc; }
+.#{$fa-css-prefix}-sort-alpha-desc:before { content: $fa-var-sort-alpha-desc; }
+.#{$fa-css-prefix}-sort-amount-asc:before { content: $fa-var-sort-amount-asc; }
+.#{$fa-css-prefix}-sort-amount-desc:before { content: $fa-var-sort-amount-desc; }
+.#{$fa-css-prefix}-sort-numeric-asc:before { content: $fa-var-sort-numeric-asc; }
+.#{$fa-css-prefix}-sort-numeric-desc:before { content: $fa-var-sort-numeric-desc; }
+.#{$fa-css-prefix}-thumbs-up:before { content: $fa-var-thumbs-up; }
+.#{$fa-css-prefix}-thumbs-down:before { content: $fa-var-thumbs-down; }
+.#{$fa-css-prefix}-youtube-square:before { content: $fa-var-youtube-square; }
+.#{$fa-css-prefix}-youtube:before { content: $fa-var-youtube; }
+.#{$fa-css-prefix}-xing:before { content: $fa-var-xing; }
+.#{$fa-css-prefix}-xing-square:before { content: $fa-var-xing-square; }
+.#{$fa-css-prefix}-youtube-play:before { content: $fa-var-youtube-play; }
+.#{$fa-css-prefix}-dropbox:before { content: $fa-var-dropbox; }
+.#{$fa-css-prefix}-stack-overflow:before { content: $fa-var-stack-overflow; }
+.#{$fa-css-prefix}-instagram:before { content: $fa-var-instagram; }
+.#{$fa-css-prefix}-flickr:before { content: $fa-var-flickr; }
+.#{$fa-css-prefix}-adn:before { content: $fa-var-adn; }
+.#{$fa-css-prefix}-bitbucket:before { content: $fa-var-bitbucket; }
+.#{$fa-css-prefix}-bitbucket-square:before { content: $fa-var-bitbucket-square; }
+.#{$fa-css-prefix}-tumblr:before { content: $fa-var-tumblr; }
+.#{$fa-css-prefix}-tumblr-square:before { content: $fa-var-tumblr-square; }
+.#{$fa-css-prefix}-long-arrow-down:before { content: $fa-var-long-arrow-down; }
+.#{$fa-css-prefix}-long-arrow-up:before { content: $fa-var-long-arrow-up; }
+.#{$fa-css-prefix}-long-arrow-left:before { content: $fa-var-long-arrow-left; }
+.#{$fa-css-prefix}-long-arrow-right:before { content: $fa-var-long-arrow-right; }
+.#{$fa-css-prefix}-apple:before { content: $fa-var-apple; }
+.#{$fa-css-prefix}-windows:before { content: $fa-var-windows; }
+.#{$fa-css-prefix}-android:before { content: $fa-var-android; }
+.#{$fa-css-prefix}-linux:before { content: $fa-var-linux; }
+.#{$fa-css-prefix}-dribbble:before { content: $fa-var-dribbble; }
+.#{$fa-css-prefix}-skype:before { content: $fa-var-skype; }
+.#{$fa-css-prefix}-foursquare:before { content: $fa-var-foursquare; }
+.#{$fa-css-prefix}-trello:before { content: $fa-var-trello; }
+.#{$fa-css-prefix}-female:before { content: $fa-var-female; }
+.#{$fa-css-prefix}-male:before { content: $fa-var-male; }
+.#{$fa-css-prefix}-gittip:before { content: $fa-var-gittip; }
+.#{$fa-css-prefix}-sun-o:before { content: $fa-var-sun-o; }
+.#{$fa-css-prefix}-moon-o:before { content: $fa-var-moon-o; }
+.#{$fa-css-prefix}-archive:before { content: $fa-var-archive; }
+.#{$fa-css-prefix}-bug:before { content: $fa-var-bug; }
+.#{$fa-css-prefix}-vk:before { content: $fa-var-vk; }
+.#{$fa-css-prefix}-weibo:before { content: $fa-var-weibo; }
+.#{$fa-css-prefix}-renren:before { content: $fa-var-renren; }
+.#{$fa-css-prefix}-pagelines:before { content: $fa-var-pagelines; }
+.#{$fa-css-prefix}-stack-exchange:before { content: $fa-var-stack-exchange; }
+.#{$fa-css-prefix}-arrow-circle-o-right:before { content: $fa-var-arrow-circle-o-right; }
+.#{$fa-css-prefix}-arrow-circle-o-left:before { content: $fa-var-arrow-circle-o-left; }
+.#{$fa-css-prefix}-toggle-left:before,
+.#{$fa-css-prefix}-caret-square-o-left:before { content: $fa-var-caret-square-o-left; }
+.#{$fa-css-prefix}-dot-circle-o:before { content: $fa-var-dot-circle-o; }
+.#{$fa-css-prefix}-wheelchair:before { content: $fa-var-wheelchair; }
+.#{$fa-css-prefix}-vimeo-square:before { content: $fa-var-vimeo-square; }
+.#{$fa-css-prefix}-turkish-lira:before,
+.#{$fa-css-prefix}-try:before { content: $fa-var-try; }
+.#{$fa-css-prefix}-plus-square-o:before { content: $fa-var-plus-square-o; }
+.#{$fa-css-prefix}-space-shuttle:before { content: $fa-var-space-shuttle; }
+.#{$fa-css-prefix}-slack:before { content: $fa-var-slack; }
+.#{$fa-css-prefix}-envelope-square:before { content: $fa-var-envelope-square; }
+.#{$fa-css-prefix}-wordpress:before { content: $fa-var-wordpress; }
+.#{$fa-css-prefix}-openid:before { content: $fa-var-openid; }
+.#{$fa-css-prefix}-institution:before,
+.#{$fa-css-prefix}-bank:before,
+.#{$fa-css-prefix}-university:before { content: $fa-var-university; }
+.#{$fa-css-prefix}-mortar-board:before,
+.#{$fa-css-prefix}-graduation-cap:before { content: $fa-var-graduation-cap; }
+.#{$fa-css-prefix}-yahoo:before { content: $fa-var-yahoo; }
+.#{$fa-css-prefix}-google:before { content: $fa-var-google; }
+.#{$fa-css-prefix}-reddit:before { content: $fa-var-reddit; }
+.#{$fa-css-prefix}-reddit-square:before { content: $fa-var-reddit-square; }
+.#{$fa-css-prefix}-stumbleupon-circle:before { content: $fa-var-stumbleupon-circle; }
+.#{$fa-css-prefix}-stumbleupon:before { content: $fa-var-stumbleupon; }
+.#{$fa-css-prefix}-delicious:before { content: $fa-var-delicious; }
+.#{$fa-css-prefix}-digg:before { content: $fa-var-digg; }
+.#{$fa-css-prefix}-pied-piper:before { content: $fa-var-pied-piper; }
+.#{$fa-css-prefix}-pied-piper-alt:before { content: $fa-var-pied-piper-alt; }
+.#{$fa-css-prefix}-drupal:before { content: $fa-var-drupal; }
+.#{$fa-css-prefix}-joomla:before { content: $fa-var-joomla; }
+.#{$fa-css-prefix}-language:before { content: $fa-var-language; }
+.#{$fa-css-prefix}-fax:before { content: $fa-var-fax; }
+.#{$fa-css-prefix}-building:before { content: $fa-var-building; }
+.#{$fa-css-prefix}-child:before { content: $fa-var-child; }
+.#{$fa-css-prefix}-paw:before { content: $fa-var-paw; }
+.#{$fa-css-prefix}-spoon:before { content: $fa-var-spoon; }
+.#{$fa-css-prefix}-cube:before { content: $fa-var-cube; }
+.#{$fa-css-prefix}-cubes:before { content: $fa-var-cubes; }
+.#{$fa-css-prefix}-behance:before { content: $fa-var-behance; }
+.#{$fa-css-prefix}-behance-square:before { content: $fa-var-behance-square; }
+.#{$fa-css-prefix}-steam:before { content: $fa-var-steam; }
+.#{$fa-css-prefix}-steam-square:before { content: $fa-var-steam-square; }
+.#{$fa-css-prefix}-recycle:before { content: $fa-var-recycle; }
+.#{$fa-css-prefix}-automobile:before,
+.#{$fa-css-prefix}-car:before { content: $fa-var-car; }
+.#{$fa-css-prefix}-cab:before,
+.#{$fa-css-prefix}-taxi:before { content: $fa-var-taxi; }
+.#{$fa-css-prefix}-tree:before { content: $fa-var-tree; }
+.#{$fa-css-prefix}-spotify:before { content: $fa-var-spotify; }
+.#{$fa-css-prefix}-deviantart:before { content: $fa-var-deviantart; }
+.#{$fa-css-prefix}-soundcloud:before { content: $fa-var-soundcloud; }
+.#{$fa-css-prefix}-database:before { content: $fa-var-database; }
+.#{$fa-css-prefix}-file-pdf-o:before { content: $fa-var-file-pdf-o; }
+.#{$fa-css-prefix}-file-word-o:before { content: $fa-var-file-word-o; }
+.#{$fa-css-prefix}-file-excel-o:before { content: $fa-var-file-excel-o; }
+.#{$fa-css-prefix}-file-powerpoint-o:before { content: $fa-var-file-powerpoint-o; }
+.#{$fa-css-prefix}-file-photo-o:before,
+.#{$fa-css-prefix}-file-picture-o:before,
+.#{$fa-css-prefix}-file-image-o:before { content: $fa-var-file-image-o; }
+.#{$fa-css-prefix}-file-zip-o:before,
+.#{$fa-css-prefix}-file-archive-o:before { content: $fa-var-file-archive-o; }
+.#{$fa-css-prefix}-file-sound-o:before,
+.#{$fa-css-prefix}-file-audio-o:before { content: $fa-var-file-audio-o; }
+.#{$fa-css-prefix}-file-movie-o:before,
+.#{$fa-css-prefix}-file-video-o:before { content: $fa-var-file-video-o; }
+.#{$fa-css-prefix}-file-code-o:before { content: $fa-var-file-code-o; }
+.#{$fa-css-prefix}-vine:before { content: $fa-var-vine; }
+.#{$fa-css-prefix}-codepen:before { content: $fa-var-codepen; }
+.#{$fa-css-prefix}-jsfiddle:before { content: $fa-var-jsfiddle; }
+.#{$fa-css-prefix}-life-bouy:before,
+.#{$fa-css-prefix}-life-buoy:before,
+.#{$fa-css-prefix}-life-saver:before,
+.#{$fa-css-prefix}-support:before,
+.#{$fa-css-prefix}-life-ring:before { content: $fa-var-life-ring; }
+.#{$fa-css-prefix}-circle-o-notch:before { content: $fa-var-circle-o-notch; }
+.#{$fa-css-prefix}-ra:before,
+.#{$fa-css-prefix}-rebel:before { content: $fa-var-rebel; }
+.#{$fa-css-prefix}-ge:before,
+.#{$fa-css-prefix}-empire:before { content: $fa-var-empire; }
+.#{$fa-css-prefix}-git-square:before { content: $fa-var-git-square; }
+.#{$fa-css-prefix}-git:before { content: $fa-var-git; }
+.#{$fa-css-prefix}-hacker-news:before { content: $fa-var-hacker-news; }
+.#{$fa-css-prefix}-tencent-weibo:before { content: $fa-var-tencent-weibo; }
+.#{$fa-css-prefix}-qq:before { content: $fa-var-qq; }
+.#{$fa-css-prefix}-wechat:before,
+.#{$fa-css-prefix}-weixin:before { content: $fa-var-weixin; }
+.#{$fa-css-prefix}-send:before,
+.#{$fa-css-prefix}-paper-plane:before { content: $fa-var-paper-plane; }
+.#{$fa-css-prefix}-send-o:before,
+.#{$fa-css-prefix}-paper-plane-o:before { content: $fa-var-paper-plane-o; }
+.#{$fa-css-prefix}-history:before { content: $fa-var-history; }
+.#{$fa-css-prefix}-circle-thin:before { content: $fa-var-circle-thin; }
+.#{$fa-css-prefix}-header:before { content: $fa-var-header; }
+.#{$fa-css-prefix}-paragraph:before { content: $fa-var-paragraph; }
+.#{$fa-css-prefix}-sliders:before { content: $fa-var-sliders; }
+.#{$fa-css-prefix}-share-alt:before { content: $fa-var-share-alt; }
+.#{$fa-css-prefix}-share-alt-square:before { content: $fa-var-share-alt-square; }
+.#{$fa-css-prefix}-bomb:before { content: $fa-var-bomb; }
+.#{$fa-css-prefix}-soccer-ball-o:before,
+.#{$fa-css-prefix}-futbol-o:before { content: $fa-var-futbol-o; }
+.#{$fa-css-prefix}-tty:before { content: $fa-var-tty; }
+.#{$fa-css-prefix}-binoculars:before { content: $fa-var-binoculars; }
+.#{$fa-css-prefix}-plug:before { content: $fa-var-plug; }
+.#{$fa-css-prefix}-slideshare:before { content: $fa-var-slideshare; }
+.#{$fa-css-prefix}-twitch:before { content: $fa-var-twitch; }
+.#{$fa-css-prefix}-yelp:before { content: $fa-var-yelp; }
+.#{$fa-css-prefix}-newspaper-o:before { content: $fa-var-newspaper-o; }
+.#{$fa-css-prefix}-wifi:before { content: $fa-var-wifi; }
+.#{$fa-css-prefix}-calculator:before { content: $fa-var-calculator; }
+.#{$fa-css-prefix}-paypal:before { content: $fa-var-paypal; }
+.#{$fa-css-prefix}-google-wallet:before { content: $fa-var-google-wallet; }
+.#{$fa-css-prefix}-cc-visa:before { content: $fa-var-cc-visa; }
+.#{$fa-css-prefix}-cc-mastercard:before { content: $fa-var-cc-mastercard; }
+.#{$fa-css-prefix}-cc-discover:before { content: $fa-var-cc-discover; }
+.#{$fa-css-prefix}-cc-amex:before { content: $fa-var-cc-amex; }
+.#{$fa-css-prefix}-cc-paypal:before { content: $fa-var-cc-paypal; }
+.#{$fa-css-prefix}-cc-stripe:before { content: $fa-var-cc-stripe; }
+.#{$fa-css-prefix}-bell-slash:before { content: $fa-var-bell-slash; }
+.#{$fa-css-prefix}-bell-slash-o:before { content: $fa-var-bell-slash-o; }
+.#{$fa-css-prefix}-trash:before { content: $fa-var-trash; }
+.#{$fa-css-prefix}-copyright:before { content: $fa-var-copyright; }
+.#{$fa-css-prefix}-at:before { content: $fa-var-at; }
+.#{$fa-css-prefix}-eyedropper:before { content: $fa-var-eyedropper; }
+.#{$fa-css-prefix}-paint-brush:before { content: $fa-var-paint-brush; }
+.#{$fa-css-prefix}-birthday-cake:before { content: $fa-var-birthday-cake; }
+.#{$fa-css-prefix}-area-chart:before { content: $fa-var-area-chart; }
+.#{$fa-css-prefix}-pie-chart:before { content: $fa-var-pie-chart; }
+.#{$fa-css-prefix}-line-chart:before { content: $fa-var-line-chart; }
+.#{$fa-css-prefix}-lastfm:before { content: $fa-var-lastfm; }
+.#{$fa-css-prefix}-lastfm-square:before { content: $fa-var-lastfm-square; }
+.#{$fa-css-prefix}-toggle-off:before { content: $fa-var-toggle-off; }
+.#{$fa-css-prefix}-toggle-on:before { content: $fa-var-toggle-on; }
+.#{$fa-css-prefix}-bicycle:before { content: $fa-var-bicycle; }
+.#{$fa-css-prefix}-bus:before { content: $fa-var-bus; }
+.#{$fa-css-prefix}-ioxhost:before { content: $fa-var-ioxhost; }
+.#{$fa-css-prefix}-angellist:before { content: $fa-var-angellist; }
+.#{$fa-css-prefix}-cc:before { content: $fa-var-cc; }
+.#{$fa-css-prefix}-shekel:before,
+.#{$fa-css-prefix}-sheqel:before,
+.#{$fa-css-prefix}-ils:before { content: $fa-var-ils; }
+.#{$fa-css-prefix}-meanpath:before { content: $fa-var-meanpath; }
diff --git a/common/src/main/webapp/thirdparty/font-awesome/scss/_larger.scss b/common/src/main/webapp/thirdparty/font-awesome/scss/_larger.scss
new file mode 100644
index 0000000..41e9a81
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/scss/_larger.scss
@@ -0,0 +1,13 @@
+// Icon Sizes
+// -------------------------
+
+/* makes the font 33% larger relative to the icon container */
+.#{$fa-css-prefix}-lg {
+ font-size: (4em / 3);
+ line-height: (3em / 4);
+ vertical-align: -15%;
+}
+.#{$fa-css-prefix}-2x { font-size: 2em; }
+.#{$fa-css-prefix}-3x { font-size: 3em; }
+.#{$fa-css-prefix}-4x { font-size: 4em; }
+.#{$fa-css-prefix}-5x { font-size: 5em; }
diff --git a/common/src/main/webapp/thirdparty/font-awesome/scss/_list.scss b/common/src/main/webapp/thirdparty/font-awesome/scss/_list.scss
new file mode 100644
index 0000000..7d1e4d5
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/scss/_list.scss
@@ -0,0 +1,19 @@
+// List Icons
+// -------------------------
+
+.#{$fa-css-prefix}-ul {
+ padding-left: 0;
+ margin-left: $fa-li-width;
+ list-style-type: none;
+ > li { position: relative; }
+}
+.#{$fa-css-prefix}-li {
+ position: absolute;
+ left: -$fa-li-width;
+ width: $fa-li-width;
+ top: (2em / 14);
+ text-align: center;
+ &.#{$fa-css-prefix}-lg {
+ left: -$fa-li-width + (4em / 14);
+ }
+}
diff --git a/common/src/main/webapp/thirdparty/font-awesome/scss/_mixins.scss b/common/src/main/webapp/thirdparty/font-awesome/scss/_mixins.scss
new file mode 100644
index 0000000..a139dfb
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/scss/_mixins.scss
@@ -0,0 +1,25 @@
+// Mixins
+// --------------------------
+
+@mixin fa-icon() {
+ display: inline-block;
+ font: normal normal normal 14px/1 FontAwesome; // shortening font declaration
+ font-size: inherit; // can't have font-size inherit on line above, so need to override
+ text-rendering: auto; // optimizelegibility throws things off #1094
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+@mixin fa-icon-rotate($degrees, $rotation) {
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation});
+ -webkit-transform: rotate($degrees);
+ -ms-transform: rotate($degrees);
+ transform: rotate($degrees);
+}
+
+@mixin fa-icon-flip($horiz, $vert, $rotation) {
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation});
+ -webkit-transform: scale($horiz, $vert);
+ -ms-transform: scale($horiz, $vert);
+ transform: scale($horiz, $vert);
+}
diff --git a/common/src/main/webapp/thirdparty/font-awesome/scss/_path.scss b/common/src/main/webapp/thirdparty/font-awesome/scss/_path.scss
new file mode 100644
index 0000000..fd21c35
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/scss/_path.scss
@@ -0,0 +1,14 @@
+/* FONT PATH
+ * -------------------------- */
+
+@font-face {
+ font-family: 'FontAwesome';
+ src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}');
+ src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'),
+ url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'),
+ url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'),
+ url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg');
+ //src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts
+ font-weight: normal;
+ font-style: normal;
+}
diff --git a/common/src/main/webapp/thirdparty/font-awesome/scss/_rotated-flipped.scss b/common/src/main/webapp/thirdparty/font-awesome/scss/_rotated-flipped.scss
new file mode 100644
index 0000000..a3558fd
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/scss/_rotated-flipped.scss
@@ -0,0 +1,20 @@
+// Rotated & Flipped Icons
+// -------------------------
+
+.#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); }
+.#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); }
+.#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); }
+
+.#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); }
+.#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); }
+
+// Hook for IE8-9
+// -------------------------
+
+:root .#{$fa-css-prefix}-rotate-90,
+:root .#{$fa-css-prefix}-rotate-180,
+:root .#{$fa-css-prefix}-rotate-270,
+:root .#{$fa-css-prefix}-flip-horizontal,
+:root .#{$fa-css-prefix}-flip-vertical {
+ filter: none;
+}
diff --git a/common/src/main/webapp/thirdparty/font-awesome/scss/_spinning.scss b/common/src/main/webapp/thirdparty/font-awesome/scss/_spinning.scss
new file mode 100644
index 0000000..002c5d5
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/scss/_spinning.scss
@@ -0,0 +1,29 @@
+// Spinning Icons
+// --------------------------
+
+.#{$fa-css-prefix}-spin {
+ -webkit-animation: fa-spin 2s infinite linear;
+ animation: fa-spin 2s infinite linear;
+}
+
+@-webkit-keyframes fa-spin {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(359deg);
+ transform: rotate(359deg);
+ }
+}
+
+@keyframes fa-spin {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(359deg);
+ transform: rotate(359deg);
+ }
+}
diff --git a/common/src/main/webapp/thirdparty/font-awesome/scss/_stacked.scss b/common/src/main/webapp/thirdparty/font-awesome/scss/_stacked.scss
new file mode 100644
index 0000000..aef7403
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/scss/_stacked.scss
@@ -0,0 +1,20 @@
+// Stacked Icons
+// -------------------------
+
+.#{$fa-css-prefix}-stack {
+ position: relative;
+ display: inline-block;
+ width: 2em;
+ height: 2em;
+ line-height: 2em;
+ vertical-align: middle;
+}
+.#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x {
+ position: absolute;
+ left: 0;
+ width: 100%;
+ text-align: center;
+}
+.#{$fa-css-prefix}-stack-1x { line-height: inherit; }
+.#{$fa-css-prefix}-stack-2x { font-size: 2em; }
+.#{$fa-css-prefix}-inverse { color: $fa-inverse; }
diff --git a/common/src/main/webapp/thirdparty/font-awesome/scss/_variables.scss b/common/src/main/webapp/thirdparty/font-awesome/scss/_variables.scss
new file mode 100644
index 0000000..669c307
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/scss/_variables.scss
@@ -0,0 +1,561 @@
+// Variables
+// --------------------------
+
+$fa-font-path: "../fonts" !default;
+//$fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.2.0/fonts" !default; // for referencing Bootstrap CDN font files directly
+$fa-css-prefix: fa !default;
+$fa-version: "4.2.0" !default;
+$fa-border-color: #eee !default;
+$fa-inverse: #fff !default;
+$fa-li-width: (30em / 14) !default;
+
+$fa-var-adjust: "\f042";
+$fa-var-adn: "\f170";
+$fa-var-align-center: "\f037";
+$fa-var-align-justify: "\f039";
+$fa-var-align-left: "\f036";
+$fa-var-align-right: "\f038";
+$fa-var-ambulance: "\f0f9";
+$fa-var-anchor: "\f13d";
+$fa-var-android: "\f17b";
+$fa-var-angellist: "\f209";
+$fa-var-angle-double-down: "\f103";
+$fa-var-angle-double-left: "\f100";
+$fa-var-angle-double-right: "\f101";
+$fa-var-angle-double-up: "\f102";
+$fa-var-angle-down: "\f107";
+$fa-var-angle-left: "\f104";
+$fa-var-angle-right: "\f105";
+$fa-var-angle-up: "\f106";
+$fa-var-apple: "\f179";
+$fa-var-archive: "\f187";
+$fa-var-area-chart: "\f1fe";
+$fa-var-arrow-circle-down: "\f0ab";
+$fa-var-arrow-circle-left: "\f0a8";
+$fa-var-arrow-circle-o-down: "\f01a";
+$fa-var-arrow-circle-o-left: "\f190";
+$fa-var-arrow-circle-o-right: "\f18e";
+$fa-var-arrow-circle-o-up: "\f01b";
+$fa-var-arrow-circle-right: "\f0a9";
+$fa-var-arrow-circle-up: "\f0aa";
+$fa-var-arrow-down: "\f063";
+$fa-var-arrow-left: "\f060";
+$fa-var-arrow-right: "\f061";
+$fa-var-arrow-up: "\f062";
+$fa-var-arrows: "\f047";
+$fa-var-arrows-alt: "\f0b2";
+$fa-var-arrows-h: "\f07e";
+$fa-var-arrows-v: "\f07d";
+$fa-var-asterisk: "\f069";
+$fa-var-at: "\f1fa";
+$fa-var-automobile: "\f1b9";
+$fa-var-backward: "\f04a";
+$fa-var-ban: "\f05e";
+$fa-var-bank: "\f19c";
+$fa-var-bar-chart: "\f080";
+$fa-var-bar-chart-o: "\f080";
+$fa-var-barcode: "\f02a";
+$fa-var-bars: "\f0c9";
+$fa-var-beer: "\f0fc";
+$fa-var-behance: "\f1b4";
+$fa-var-behance-square: "\f1b5";
+$fa-var-bell: "\f0f3";
+$fa-var-bell-o: "\f0a2";
+$fa-var-bell-slash: "\f1f6";
+$fa-var-bell-slash-o: "\f1f7";
+$fa-var-bicycle: "\f206";
+$fa-var-binoculars: "\f1e5";
+$fa-var-birthday-cake: "\f1fd";
+$fa-var-bitbucket: "\f171";
+$fa-var-bitbucket-square: "\f172";
+$fa-var-bitcoin: "\f15a";
+$fa-var-bold: "\f032";
+$fa-var-bolt: "\f0e7";
+$fa-var-bomb: "\f1e2";
+$fa-var-book: "\f02d";
+$fa-var-bookmark: "\f02e";
+$fa-var-bookmark-o: "\f097";
+$fa-var-briefcase: "\f0b1";
+$fa-var-btc: "\f15a";
+$fa-var-bug: "\f188";
+$fa-var-building: "\f1ad";
+$fa-var-building-o: "\f0f7";
+$fa-var-bullhorn: "\f0a1";
+$fa-var-bullseye: "\f140";
+$fa-var-bus: "\f207";
+$fa-var-cab: "\f1ba";
+$fa-var-calculator: "\f1ec";
+$fa-var-calendar: "\f073";
+$fa-var-calendar-o: "\f133";
+$fa-var-camera: "\f030";
+$fa-var-camera-retro: "\f083";
+$fa-var-car: "\f1b9";
+$fa-var-caret-down: "\f0d7";
+$fa-var-caret-left: "\f0d9";
+$fa-var-caret-right: "\f0da";
+$fa-var-caret-square-o-down: "\f150";
+$fa-var-caret-square-o-left: "\f191";
+$fa-var-caret-square-o-right: "\f152";
+$fa-var-caret-square-o-up: "\f151";
+$fa-var-caret-up: "\f0d8";
+$fa-var-cc: "\f20a";
+$fa-var-cc-amex: "\f1f3";
+$fa-var-cc-discover: "\f1f2";
+$fa-var-cc-mastercard: "\f1f1";
+$fa-var-cc-paypal: "\f1f4";
+$fa-var-cc-stripe: "\f1f5";
+$fa-var-cc-visa: "\f1f0";
+$fa-var-certificate: "\f0a3";
+$fa-var-chain: "\f0c1";
+$fa-var-chain-broken: "\f127";
+$fa-var-check: "\f00c";
+$fa-var-check-circle: "\f058";
+$fa-var-check-circle-o: "\f05d";
+$fa-var-check-square: "\f14a";
+$fa-var-check-square-o: "\f046";
+$fa-var-chevron-circle-down: "\f13a";
+$fa-var-chevron-circle-left: "\f137";
+$fa-var-chevron-circle-right: "\f138";
+$fa-var-chevron-circle-up: "\f139";
+$fa-var-chevron-down: "\f078";
+$fa-var-chevron-left: "\f053";
+$fa-var-chevron-right: "\f054";
+$fa-var-chevron-up: "\f077";
+$fa-var-child: "\f1ae";
+$fa-var-circle: "\f111";
+$fa-var-circle-o: "\f10c";
+$fa-var-circle-o-notch: "\f1ce";
+$fa-var-circle-thin: "\f1db";
+$fa-var-clipboard: "\f0ea";
+$fa-var-clock-o: "\f017";
+$fa-var-close: "\f00d";
+$fa-var-cloud: "\f0c2";
+$fa-var-cloud-download: "\f0ed";
+$fa-var-cloud-upload: "\f0ee";
+$fa-var-cny: "\f157";
+$fa-var-code: "\f121";
+$fa-var-code-fork: "\f126";
+$fa-var-codepen: "\f1cb";
+$fa-var-coffee: "\f0f4";
+$fa-var-cog: "\f013";
+$fa-var-cogs: "\f085";
+$fa-var-columns: "\f0db";
+$fa-var-comment: "\f075";
+$fa-var-comment-o: "\f0e5";
+$fa-var-comments: "\f086";
+$fa-var-comments-o: "\f0e6";
+$fa-var-compass: "\f14e";
+$fa-var-compress: "\f066";
+$fa-var-copy: "\f0c5";
+$fa-var-copyright: "\f1f9";
+$fa-var-credit-card: "\f09d";
+$fa-var-crop: "\f125";
+$fa-var-crosshairs: "\f05b";
+$fa-var-css3: "\f13c";
+$fa-var-cube: "\f1b2";
+$fa-var-cubes: "\f1b3";
+$fa-var-cut: "\f0c4";
+$fa-var-cutlery: "\f0f5";
+$fa-var-dashboard: "\f0e4";
+$fa-var-database: "\f1c0";
+$fa-var-dedent: "\f03b";
+$fa-var-delicious: "\f1a5";
+$fa-var-desktop: "\f108";
+$fa-var-deviantart: "\f1bd";
+$fa-var-digg: "\f1a6";
+$fa-var-dollar: "\f155";
+$fa-var-dot-circle-o: "\f192";
+$fa-var-download: "\f019";
+$fa-var-dribbble: "\f17d";
+$fa-var-dropbox: "\f16b";
+$fa-var-drupal: "\f1a9";
+$fa-var-edit: "\f044";
+$fa-var-eject: "\f052";
+$fa-var-ellipsis-h: "\f141";
+$fa-var-ellipsis-v: "\f142";
+$fa-var-empire: "\f1d1";
+$fa-var-envelope: "\f0e0";
+$fa-var-envelope-o: "\f003";
+$fa-var-envelope-square: "\f199";
+$fa-var-eraser: "\f12d";
+$fa-var-eur: "\f153";
+$fa-var-euro: "\f153";
+$fa-var-exchange: "\f0ec";
+$fa-var-exclamation: "\f12a";
+$fa-var-exclamation-circle: "\f06a";
+$fa-var-exclamation-triangle: "\f071";
+$fa-var-expand: "\f065";
+$fa-var-external-link: "\f08e";
+$fa-var-external-link-square: "\f14c";
+$fa-var-eye: "\f06e";
+$fa-var-eye-slash: "\f070";
+$fa-var-eyedropper: "\f1fb";
+$fa-var-facebook: "\f09a";
+$fa-var-facebook-square: "\f082";
+$fa-var-fast-backward: "\f049";
+$fa-var-fast-forward: "\f050";
+$fa-var-fax: "\f1ac";
+$fa-var-female: "\f182";
+$fa-var-fighter-jet: "\f0fb";
+$fa-var-file: "\f15b";
+$fa-var-file-archive-o: "\f1c6";
+$fa-var-file-audio-o: "\f1c7";
+$fa-var-file-code-o: "\f1c9";
+$fa-var-file-excel-o: "\f1c3";
+$fa-var-file-image-o: "\f1c5";
+$fa-var-file-movie-o: "\f1c8";
+$fa-var-file-o: "\f016";
+$fa-var-file-pdf-o: "\f1c1";
+$fa-var-file-photo-o: "\f1c5";
+$fa-var-file-picture-o: "\f1c5";
+$fa-var-file-powerpoint-o: "\f1c4";
+$fa-var-file-sound-o: "\f1c7";
+$fa-var-file-text: "\f15c";
+$fa-var-file-text-o: "\f0f6";
+$fa-var-file-video-o: "\f1c8";
+$fa-var-file-word-o: "\f1c2";
+$fa-var-file-zip-o: "\f1c6";
+$fa-var-files-o: "\f0c5";
+$fa-var-film: "\f008";
+$fa-var-filter: "\f0b0";
+$fa-var-fire: "\f06d";
+$fa-var-fire-extinguisher: "\f134";
+$fa-var-flag: "\f024";
+$fa-var-flag-checkered: "\f11e";
+$fa-var-flag-o: "\f11d";
+$fa-var-flash: "\f0e7";
+$fa-var-flask: "\f0c3";
+$fa-var-flickr: "\f16e";
+$fa-var-floppy-o: "\f0c7";
+$fa-var-folder: "\f07b";
+$fa-var-folder-o: "\f114";
+$fa-var-folder-open: "\f07c";
+$fa-var-folder-open-o: "\f115";
+$fa-var-font: "\f031";
+$fa-var-forward: "\f04e";
+$fa-var-foursquare: "\f180";
+$fa-var-frown-o: "\f119";
+$fa-var-futbol-o: "\f1e3";
+$fa-var-gamepad: "\f11b";
+$fa-var-gavel: "\f0e3";
+$fa-var-gbp: "\f154";
+$fa-var-ge: "\f1d1";
+$fa-var-gear: "\f013";
+$fa-var-gears: "\f085";
+$fa-var-gift: "\f06b";
+$fa-var-git: "\f1d3";
+$fa-var-git-square: "\f1d2";
+$fa-var-github: "\f09b";
+$fa-var-github-alt: "\f113";
+$fa-var-github-square: "\f092";
+$fa-var-gittip: "\f184";
+$fa-var-glass: "\f000";
+$fa-var-globe: "\f0ac";
+$fa-var-google: "\f1a0";
+$fa-var-google-plus: "\f0d5";
+$fa-var-google-plus-square: "\f0d4";
+$fa-var-google-wallet: "\f1ee";
+$fa-var-graduation-cap: "\f19d";
+$fa-var-group: "\f0c0";
+$fa-var-h-square: "\f0fd";
+$fa-var-hacker-news: "\f1d4";
+$fa-var-hand-o-down: "\f0a7";
+$fa-var-hand-o-left: "\f0a5";
+$fa-var-hand-o-right: "\f0a4";
+$fa-var-hand-o-up: "\f0a6";
+$fa-var-hdd-o: "\f0a0";
+$fa-var-header: "\f1dc";
+$fa-var-headphones: "\f025";
+$fa-var-heart: "\f004";
+$fa-var-heart-o: "\f08a";
+$fa-var-history: "\f1da";
+$fa-var-home: "\f015";
+$fa-var-hospital-o: "\f0f8";
+$fa-var-html5: "\f13b";
+$fa-var-ils: "\f20b";
+$fa-var-image: "\f03e";
+$fa-var-inbox: "\f01c";
+$fa-var-indent: "\f03c";
+$fa-var-info: "\f129";
+$fa-var-info-circle: "\f05a";
+$fa-var-inr: "\f156";
+$fa-var-instagram: "\f16d";
+$fa-var-institution: "\f19c";
+$fa-var-ioxhost: "\f208";
+$fa-var-italic: "\f033";
+$fa-var-joomla: "\f1aa";
+$fa-var-jpy: "\f157";
+$fa-var-jsfiddle: "\f1cc";
+$fa-var-key: "\f084";
+$fa-var-keyboard-o: "\f11c";
+$fa-var-krw: "\f159";
+$fa-var-language: "\f1ab";
+$fa-var-laptop: "\f109";
+$fa-var-lastfm: "\f202";
+$fa-var-lastfm-square: "\f203";
+$fa-var-leaf: "\f06c";
+$fa-var-legal: "\f0e3";
+$fa-var-lemon-o: "\f094";
+$fa-var-level-down: "\f149";
+$fa-var-level-up: "\f148";
+$fa-var-life-bouy: "\f1cd";
+$fa-var-life-buoy: "\f1cd";
+$fa-var-life-ring: "\f1cd";
+$fa-var-life-saver: "\f1cd";
+$fa-var-lightbulb-o: "\f0eb";
+$fa-var-line-chart: "\f201";
+$fa-var-link: "\f0c1";
+$fa-var-linkedin: "\f0e1";
+$fa-var-linkedin-square: "\f08c";
+$fa-var-linux: "\f17c";
+$fa-var-list: "\f03a";
+$fa-var-list-alt: "\f022";
+$fa-var-list-ol: "\f0cb";
+$fa-var-list-ul: "\f0ca";
+$fa-var-location-arrow: "\f124";
+$fa-var-lock: "\f023";
+$fa-var-long-arrow-down: "\f175";
+$fa-var-long-arrow-left: "\f177";
+$fa-var-long-arrow-right: "\f178";
+$fa-var-long-arrow-up: "\f176";
+$fa-var-magic: "\f0d0";
+$fa-var-magnet: "\f076";
+$fa-var-mail-forward: "\f064";
+$fa-var-mail-reply: "\f112";
+$fa-var-mail-reply-all: "\f122";
+$fa-var-male: "\f183";
+$fa-var-map-marker: "\f041";
+$fa-var-maxcdn: "\f136";
+$fa-var-meanpath: "\f20c";
+$fa-var-medkit: "\f0fa";
+$fa-var-meh-o: "\f11a";
+$fa-var-microphone: "\f130";
+$fa-var-microphone-slash: "\f131";
+$fa-var-minus: "\f068";
+$fa-var-minus-circle: "\f056";
+$fa-var-minus-square: "\f146";
+$fa-var-minus-square-o: "\f147";
+$fa-var-mobile: "\f10b";
+$fa-var-mobile-phone: "\f10b";
+$fa-var-money: "\f0d6";
+$fa-var-moon-o: "\f186";
+$fa-var-mortar-board: "\f19d";
+$fa-var-music: "\f001";
+$fa-var-navicon: "\f0c9";
+$fa-var-newspaper-o: "\f1ea";
+$fa-var-openid: "\f19b";
+$fa-var-outdent: "\f03b";
+$fa-var-pagelines: "\f18c";
+$fa-var-paint-brush: "\f1fc";
+$fa-var-paper-plane: "\f1d8";
+$fa-var-paper-plane-o: "\f1d9";
+$fa-var-paperclip: "\f0c6";
+$fa-var-paragraph: "\f1dd";
+$fa-var-paste: "\f0ea";
+$fa-var-pause: "\f04c";
+$fa-var-paw: "\f1b0";
+$fa-var-paypal: "\f1ed";
+$fa-var-pencil: "\f040";
+$fa-var-pencil-square: "\f14b";
+$fa-var-pencil-square-o: "\f044";
+$fa-var-phone: "\f095";
+$fa-var-phone-square: "\f098";
+$fa-var-photo: "\f03e";
+$fa-var-picture-o: "\f03e";
+$fa-var-pie-chart: "\f200";
+$fa-var-pied-piper: "\f1a7";
+$fa-var-pied-piper-alt: "\f1a8";
+$fa-var-pinterest: "\f0d2";
+$fa-var-pinterest-square: "\f0d3";
+$fa-var-plane: "\f072";
+$fa-var-play: "\f04b";
+$fa-var-play-circle: "\f144";
+$fa-var-play-circle-o: "\f01d";
+$fa-var-plug: "\f1e6";
+$fa-var-plus: "\f067";
+$fa-var-plus-circle: "\f055";
+$fa-var-plus-square: "\f0fe";
+$fa-var-plus-square-o: "\f196";
+$fa-var-power-off: "\f011";
+$fa-var-print: "\f02f";
+$fa-var-puzzle-piece: "\f12e";
+$fa-var-qq: "\f1d6";
+$fa-var-qrcode: "\f029";
+$fa-var-question: "\f128";
+$fa-var-question-circle: "\f059";
+$fa-var-quote-left: "\f10d";
+$fa-var-quote-right: "\f10e";
+$fa-var-ra: "\f1d0";
+$fa-var-random: "\f074";
+$fa-var-rebel: "\f1d0";
+$fa-var-recycle: "\f1b8";
+$fa-var-reddit: "\f1a1";
+$fa-var-reddit-square: "\f1a2";
+$fa-var-refresh: "\f021";
+$fa-var-remove: "\f00d";
+$fa-var-renren: "\f18b";
+$fa-var-reorder: "\f0c9";
+$fa-var-repeat: "\f01e";
+$fa-var-reply: "\f112";
+$fa-var-reply-all: "\f122";
+$fa-var-retweet: "\f079";
+$fa-var-rmb: "\f157";
+$fa-var-road: "\f018";
+$fa-var-rocket: "\f135";
+$fa-var-rotate-left: "\f0e2";
+$fa-var-rotate-right: "\f01e";
+$fa-var-rouble: "\f158";
+$fa-var-rss: "\f09e";
+$fa-var-rss-square: "\f143";
+$fa-var-rub: "\f158";
+$fa-var-ruble: "\f158";
+$fa-var-rupee: "\f156";
+$fa-var-save: "\f0c7";
+$fa-var-scissors: "\f0c4";
+$fa-var-search: "\f002";
+$fa-var-search-minus: "\f010";
+$fa-var-search-plus: "\f00e";
+$fa-var-send: "\f1d8";
+$fa-var-send-o: "\f1d9";
+$fa-var-share: "\f064";
+$fa-var-share-alt: "\f1e0";
+$fa-var-share-alt-square: "\f1e1";
+$fa-var-share-square: "\f14d";
+$fa-var-share-square-o: "\f045";
+$fa-var-shekel: "\f20b";
+$fa-var-sheqel: "\f20b";
+$fa-var-shield: "\f132";
+$fa-var-shopping-cart: "\f07a";
+$fa-var-sign-in: "\f090";
+$fa-var-sign-out: "\f08b";
+$fa-var-signal: "\f012";
+$fa-var-sitemap: "\f0e8";
+$fa-var-skype: "\f17e";
+$fa-var-slack: "\f198";
+$fa-var-sliders: "\f1de";
+$fa-var-slideshare: "\f1e7";
+$fa-var-smile-o: "\f118";
+$fa-var-soccer-ball-o: "\f1e3";
+$fa-var-sort: "\f0dc";
+$fa-var-sort-alpha-asc: "\f15d";
+$fa-var-sort-alpha-desc: "\f15e";
+$fa-var-sort-amount-asc: "\f160";
+$fa-var-sort-amount-desc: "\f161";
+$fa-var-sort-asc: "\f0de";
+$fa-var-sort-desc: "\f0dd";
+$fa-var-sort-down: "\f0dd";
+$fa-var-sort-numeric-asc: "\f162";
+$fa-var-sort-numeric-desc: "\f163";
+$fa-var-sort-up: "\f0de";
+$fa-var-soundcloud: "\f1be";
+$fa-var-space-shuttle: "\f197";
+$fa-var-spinner: "\f110";
+$fa-var-spoon: "\f1b1";
+$fa-var-spotify: "\f1bc";
+$fa-var-square: "\f0c8";
+$fa-var-square-o: "\f096";
+$fa-var-stack-exchange: "\f18d";
+$fa-var-stack-overflow: "\f16c";
+$fa-var-star: "\f005";
+$fa-var-star-half: "\f089";
+$fa-var-star-half-empty: "\f123";
+$fa-var-star-half-full: "\f123";
+$fa-var-star-half-o: "\f123";
+$fa-var-star-o: "\f006";
+$fa-var-steam: "\f1b6";
+$fa-var-steam-square: "\f1b7";
+$fa-var-step-backward: "\f048";
+$fa-var-step-forward: "\f051";
+$fa-var-stethoscope: "\f0f1";
+$fa-var-stop: "\f04d";
+$fa-var-strikethrough: "\f0cc";
+$fa-var-stumbleupon: "\f1a4";
+$fa-var-stumbleupon-circle: "\f1a3";
+$fa-var-subscript: "\f12c";
+$fa-var-suitcase: "\f0f2";
+$fa-var-sun-o: "\f185";
+$fa-var-superscript: "\f12b";
+$fa-var-support: "\f1cd";
+$fa-var-table: "\f0ce";
+$fa-var-tablet: "\f10a";
+$fa-var-tachometer: "\f0e4";
+$fa-var-tag: "\f02b";
+$fa-var-tags: "\f02c";
+$fa-var-tasks: "\f0ae";
+$fa-var-taxi: "\f1ba";
+$fa-var-tencent-weibo: "\f1d5";
+$fa-var-terminal: "\f120";
+$fa-var-text-height: "\f034";
+$fa-var-text-width: "\f035";
+$fa-var-th: "\f00a";
+$fa-var-th-large: "\f009";
+$fa-var-th-list: "\f00b";
+$fa-var-thumb-tack: "\f08d";
+$fa-var-thumbs-down: "\f165";
+$fa-var-thumbs-o-down: "\f088";
+$fa-var-thumbs-o-up: "\f087";
+$fa-var-thumbs-up: "\f164";
+$fa-var-ticket: "\f145";
+$fa-var-times: "\f00d";
+$fa-var-times-circle: "\f057";
+$fa-var-times-circle-o: "\f05c";
+$fa-var-tint: "\f043";
+$fa-var-toggle-down: "\f150";
+$fa-var-toggle-left: "\f191";
+$fa-var-toggle-off: "\f204";
+$fa-var-toggle-on: "\f205";
+$fa-var-toggle-right: "\f152";
+$fa-var-toggle-up: "\f151";
+$fa-var-trash: "\f1f8";
+$fa-var-trash-o: "\f014";
+$fa-var-tree: "\f1bb";
+$fa-var-trello: "\f181";
+$fa-var-trophy: "\f091";
+$fa-var-truck: "\f0d1";
+$fa-var-try: "\f195";
+$fa-var-tty: "\f1e4";
+$fa-var-tumblr: "\f173";
+$fa-var-tumblr-square: "\f174";
+$fa-var-turkish-lira: "\f195";
+$fa-var-twitch: "\f1e8";
+$fa-var-twitter: "\f099";
+$fa-var-twitter-square: "\f081";
+$fa-var-umbrella: "\f0e9";
+$fa-var-underline: "\f0cd";
+$fa-var-undo: "\f0e2";
+$fa-var-university: "\f19c";
+$fa-var-unlink: "\f127";
+$fa-var-unlock: "\f09c";
+$fa-var-unlock-alt: "\f13e";
+$fa-var-unsorted: "\f0dc";
+$fa-var-upload: "\f093";
+$fa-var-usd: "\f155";
+$fa-var-user: "\f007";
+$fa-var-user-md: "\f0f0";
+$fa-var-users: "\f0c0";
+$fa-var-video-camera: "\f03d";
+$fa-var-vimeo-square: "\f194";
+$fa-var-vine: "\f1ca";
+$fa-var-vk: "\f189";
+$fa-var-volume-down: "\f027";
+$fa-var-volume-off: "\f026";
+$fa-var-volume-up: "\f028";
+$fa-var-warning: "\f071";
+$fa-var-wechat: "\f1d7";
+$fa-var-weibo: "\f18a";
+$fa-var-weixin: "\f1d7";
+$fa-var-wheelchair: "\f193";
+$fa-var-wifi: "\f1eb";
+$fa-var-windows: "\f17a";
+$fa-var-won: "\f159";
+$fa-var-wordpress: "\f19a";
+$fa-var-wrench: "\f0ad";
+$fa-var-xing: "\f168";
+$fa-var-xing-square: "\f169";
+$fa-var-yahoo: "\f19e";
+$fa-var-yelp: "\f1e9";
+$fa-var-yen: "\f157";
+$fa-var-youtube: "\f167";
+$fa-var-youtube-play: "\f16a";
+$fa-var-youtube-square: "\f166";
+
diff --git a/common/src/main/webapp/thirdparty/font-awesome/scss/font-awesome.scss b/common/src/main/webapp/thirdparty/font-awesome/scss/font-awesome.scss
new file mode 100644
index 0000000..f300c09
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/font-awesome/scss/font-awesome.scss
@@ -0,0 +1,17 @@
+/*!
+ * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome
+ * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
+ */
+
+@import "variables";
+@import "mixins";
+@import "path";
+@import "core";
+@import "larger";
+@import "fixed-width";
+@import "list";
+@import "bordered-pulled";
+@import "spinning";
+@import "rotated-flipped";
+@import "stacked";
+@import "icons";
diff --git a/common/src/main/webapp/thirdparty/fonts/BebasNeue-webfont.eot b/common/src/main/webapp/thirdparty/fonts/BebasNeue-webfont.eot
new file mode 100644
index 0000000..eefc29f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/fonts/BebasNeue-webfont.eot
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/fonts/BebasNeue-webfont.svg b/common/src/main/webapp/thirdparty/fonts/BebasNeue-webfont.svg
new file mode 100644
index 0000000..c6c7d6c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/fonts/BebasNeue-webfont.svg
@@ -0,0 +1,146 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata>
+This is a custom SVG webfont generated by Font Squirrel.
+Copyright : Copyright c 2010 by Ryoichi Tsunekawa All rights reserved
+Designer : Ryoichi Tsunekawa
+Foundry : Ryoichi Tsunekawa
+</metadata>
+<defs>
+<font id="BebasNeueRegular" horiz-adv-x="811" >
+<font-face units-per-em="2048" ascent="1638" descent="-410" />
+<missing-glyph horiz-adv-x="317" />
+<glyph unicode=" " horiz-adv-x="317" />
+<glyph unicode="&#x09;" horiz-adv-x="317" />
+<glyph unicode="&#xa0;" horiz-adv-x="317" />
+<glyph unicode="!" horiz-adv-x="389" d="M82 836v598h225v-598l-28 -519h-168zM86 0v217h217v-217h-217z" />
+<glyph unicode="&#x22;" horiz-adv-x="665" d="M82 1434h217l-33 -422h-153zM367 1434h217l-33 -422h-154z" />
+<glyph unicode="#" horiz-adv-x="839" d="M31 410l16 159h100l39 375h-102l16 160h103l35 330h184l-35 -330h133l35 330h184l-34 -330h104l-16 -160h-105l-39 -375h105l-17 -159h-104l-43 -410h-184l43 410h-134l-43 -410h-184l43 410h-100zM332 569h133l39 375h-133z" />
+<glyph unicode="$" d="M70 365v98h213v-113q0 -139 116.5 -139t116.5 139q0 68 -32.5 127.5t-82 99t-105.5 89.5l-106 100q-49 49 -81.5 128t-32.5 175q0 297 237 350v107h185v-107q242 -49 241 -350v-45h-213v59q0 141 -112 141h-1q-112 0 -112 -141q0 -80 45 -146.5t110 -117.5l130 -108 q65 -56 110 -145t45 -201q0 -147 -62.5 -237.5t-180.5 -115.5v-104h-185v104q-244 49 -243 353z" />
+<glyph unicode="%" horiz-adv-x="1284" d="M70 743v471q0 111 55 170.5t161.5 59.5t162 -59.5t55.5 -170.5v-471q0 -111 -55.5 -170t-162 -59t-161.5 59t-55 170zM213 733q0 -90 73.5 -90t73.5 90v492q0 90 -73.5 90t-73.5 -90v-492zM287 0l565 1434h133l-565 -1434h-133zM780 219v471q0 111 55.5 170.5t162 59.5 t161.5 -59.5t55 -170.5v-471q0 -111 -55 -170t-161.5 -59t-162 59t-55.5 170zM924 209q0 -90 73.5 -90t73.5 90v491q0 90 -73.5 90t-73.5 -90v-491z" />
+<glyph unicode="&#x26;" horiz-adv-x="847" d="M84 311v146q0 231 156 301q-156 66 -156 295v26q0 354 336 355h258v-205h-254q-115 0 -115 -139v-89q0 -82 34 -116.5t101 -34.5h99v160h225v-160h59v-205h-59v-471q0 -117 25 -174h-230q-16 45 -20 113q-59 -129 -209 -129q-250 0 -250 327zM309 330q0 -141 117 -142 q111 0 117 125v332h-86q-78 0 -113 -42t-35 -140v-133z" />
+<glyph unicode="'" horiz-adv-x="368" d="M76 1434h217l-33 -422h-154z" />
+<glyph unicode="(" horiz-adv-x="514" d="M96 313v807q0 170 73 242t243 72h69v-185h-55q-55 0 -79.5 -27.5t-24.5 -101.5v-807q0 -74 24.5 -101.5t79.5 -27.5h55v-184h-69q-170 0 -243 71.5t-73 241.5z" />
+<glyph unicode=")" horiz-adv-x="514" d="M33 0v184h55q55 0 80 28t25 101v807q0 74 -25 101.5t-80 27.5h-55v185h69q170 0 243 -72t73 -242v-807q0 -170 -73 -241.5t-243 -71.5h-69z" />
+<glyph unicode="*" d="M4 1075l57 174l306 -153l-54 338h185l-54 -338l306 153l57 -174l-336 -57l240 -240l-148 -108l-157 303l-158 -303l-148 108l240 240z" />
+<glyph unicode="+" d="M51 637v160h275v276h159v-276h275v-160h-275v-281h-159v281h-275z" />
+<glyph unicode="," horiz-adv-x="380" d="M82 0v217h217v-194l-98 -228h-92l59 205h-86z" />
+<glyph unicode="-" horiz-adv-x="552" d="M72 614v205h409v-205h-409z" />
+<glyph unicode="." horiz-adv-x="380" d="M82 0v217h217v-217h-217z" />
+<glyph unicode="/" horiz-adv-x="780" d="M10 0l565 1434h195l-565 -1434h-195z" />
+<glyph unicode="0" d="M63 344v746q0 172 88.5 266t254 94t254 -94t88.5 -266v-746q0 -172 -88.5 -266t-254 -94t-254 94t-88.5 266zM289 330q0 -141 117 -142q116 0 116 142v774q0 141 -116.5 141t-116.5 -141v-774z" />
+<glyph unicode="1" d="M221 1094v159q82 0 134.5 28t71.5 60.5t42 92.5h152v-1434h-226v1094h-174z" />
+<glyph unicode="2" d="M82 0v176q0 117 46 214t111 170l131 144q66 70 112 166t46 211q0 92 -29.5 128t-86.5 36q-117 0 -117 -141v-154h-213v140q0 174 86 267t250 93t250 -93t86 -267q0 -131 -50.5 -247t-120 -198t-137 -153.5t-109.5 -144.5q-33 -57 -33 -111q0 -16 3 -31h426v-205h-651z " />
+<glyph unicode="3" d="M70 344v119h213v-133q0 -141 116 -142q57 0 87 36t30 126v113q0 98 -35 140t-112 42h-76v205h88q68 0 101.5 34.5t33.5 116.5v80q0 92 -29.5 128t-87.5 36q-117 0 -116 -141v-92h-213v78q0 174 86 267t249.5 93t249.5 -93t86 -267v-37q0 -229 -157 -295q158 -70 157 -301 v-113q0 -174 -86 -267t-249.5 -93t-249.5 93t-86 267z" />
+<glyph unicode="4" d="M29 260v205l409 969h246v-969h107v-205h-107v-260h-225v260h-430zM236 465h223v530z" />
+<glyph unicode="5" d="M72 344v119h213v-133q0 -139 117 -140q116 0 116 140v315q0 141 -116.5 141t-116.5 -141v-43h-213l41 832h594v-205h-392l-18 -342q63 104 197 104q250 0 249 -327v-320q0 -174 -86 -267t-249.5 -93t-249.5 93t-86 267z" />
+<glyph unicode="6" d="M68 344v733q0 373 344 373q164 0 250 -93t86 -267v-37h-213v51q0 141 -117 141q-63 0 -94 -39t-31 -137v-262q59 127 209 127q250 0 250 -328v-262q0 -172 -88.5 -266t-254 -94t-253.5 94t-88 266zM293 330q0 -139 117 -140q116 0 116 140v258q0 141 -116.5 141 t-116.5 -141v-258z" />
+<glyph unicode="7" d="M68 1229v205h675v-197l-331 -1237h-226l330 1229h-448z" />
+<glyph unicode="8" d="M53 1044v46q0 172 91.5 266t261 94t261 -94t91.5 -266v-46q0 -211 -140 -288q139 -78 140 -299v-113q0 -172 -91.5 -266t-261 -94t-261 94t-91.5 266v113q0 221 140 299q-139 76 -140 288zM279 350q0 -162 127 -162q125 0 126 162v133q0 162 -126.5 162t-126.5 -162v-133 zM279 1001q0 -152 126 -152l1 1q126 0 126 151v80q0 164 -126.5 164t-126.5 -164v-80z" />
+<glyph unicode="9" d="M59 827v263q0 172 88.5 266t254 94t253.5 -94t88 -266v-734q0 -372 -342 -372h-2q-164 0 -250 93t-86 267v37h213v-51q0 -141 117 -142q63 0 94 39t31 138v262q-59 -127 -209 -127q-250 0 -250 327zM285 846q0 -141 116.5 -141t116.5 141v258q0 139 -116.5 139 t-116.5 -139v-258z" />
+<glyph unicode=":" horiz-adv-x="380" d="M82 0v217h217v-217h-217zM82 780v217h217v-217h-217z" />
+<glyph unicode=";" horiz-adv-x="380" d="M82 0v217h217v-194l-98 -228h-92l59 205h-86zM82 780v217h217v-217h-217z" />
+<glyph unicode="&#x3c;" d="M61 637v160l668 245v-161l-459 -164l459 -164v-162z" />
+<glyph unicode="=" d="M72 471v160h667v-160h-667zM72 803v160h667v-160h-667z" />
+<glyph unicode="&#x3e;" d="M82 391v162l459 164l-459 164v161l668 -245v-160z" />
+<glyph unicode="?" horiz-adv-x="737" d="M41 948v142q0 174 84 267t248 93t248 -93t84 -267q0 -125 -42 -228.5t-91.5 -160t-91.5 -137.5t-42 -167q0 -45 8 -80h-200q-12 37 -13 89q0 104 39 191t84 141.5t84 150.5t39 215q0 141 -112.5 141t-112.5 -141v-156h-213zM236 0v217h217v-217h-217z" />
+<glyph unicode="@" horiz-adv-x="1411" d="M49 594q0 193 48 358.5t139.5 291.5t238 199t330.5 73q303 0 436 -164t133 -439q0 -178 -39 -312t-102.5 -204.5t-127.5 -103.5t-130 -33q-168 0 -180 135q-60 -123 -187 -123h-12q-188 5 -188 239q0 36 4 77l22 207q16 152 80 229q61 74 160 74h10q127 -2 168 -127 l12 119h197l-62 -592q-1 -6 -1 -11q0 -40 42 -41q80 0 122 142.5t42 320.5q0 201 -100 316.5t-307 115.5q-270 0 -412.5 -200.5t-142.5 -556.5q0 -254 119.5 -394.5t357.5 -140.5q244 0 424 139l-17 -196q-172 -115 -419 -115q-334 0 -496 191.5t-162 525.5zM610 598 q-2 -16 -2 -30q0 -101 90 -105h6q43 0 71 29q30 32 38 100l21 194q1 11 1 21q0 42 -20 65q-24 29 -70 29h-6q-45 0 -73 -29q-29 -30 -37 -100z" />
+<glyph unicode="A" horiz-adv-x="833" d="M23 0l229 1434h330l229 -1434h-227l-39 260h-277l-39 -260h-206zM297 455h217l-108 725z" />
+<glyph unicode="B" horiz-adv-x="831" d="M82 0v1434h340q174 0 254 -81t80 -249v-51q0 -221 -146 -289q168 -66 168 -307v-117q0 -166 -87 -253t-255 -87h-354zM307 205h129q59 0 88 31.5t29 109.5v125q0 98 -33.5 136t-111.5 38h-101v-440zM307 850h88q68 0 101.5 35t33.5 116v80q1 148 -114 148h-109v-379z" />
+<glyph unicode="C" horiz-adv-x="790" d="M63 344v746q0 174 86.5 267t250 93t249.5 -93t86 -267v-140h-213v154q0 141 -116.5 141t-116.5 -141v-774q1 -140 117 -140q117 0 116 140v205h213v-191q0 -174 -86 -267t-249.5 -93t-250 93t-86.5 267z" />
+<glyph unicode="D" horiz-adv-x="835" d="M82 0v1434h356q336 0 336 -355v-725q0 -354 -336 -354h-356zM307 205h127q115 0 115 139v746q0 139 -115 139h-127v-1024z" />
+<glyph unicode="E" horiz-adv-x="753" d="M82 0v1434h614v-205h-389v-400h309v-204h-309v-420h389v-205h-614z" />
+<glyph unicode="F" horiz-adv-x="704" d="M82 0v1434h596v-205h-371v-432h291v-205h-291v-592h-225z" />
+<glyph unicode="G" horiz-adv-x="798" d="M63 344v746q0 174 86.5 267t250 93t249.5 -93t86 -267v-140h-213v154q0 141 -116.5 141t-116.5 -141v-774q0 -139 117 -140q116 0 116 140v264h-102v205h315v-455q0 -174 -86 -267t-249.5 -93t-250 93t-86.5 267z" />
+<glyph unicode="H" horiz-adv-x="874" d="M82 0v1434h225v-615h256v615h230v-1434h-230v614h-256v-614h-225z" />
+<glyph unicode="I" horiz-adv-x="389" d="M82 0v1434h225v-1434h-225z" />
+<glyph unicode="J" horiz-adv-x="524" d="M20 0v205q25 -2 78 -2q129 0 129 137v1094h226v-1078q0 -360 -324 -360q-72 0 -109 4z" />
+<glyph unicode="K" horiz-adv-x="847" d="M82 0v1434h225v-625l295 625h225l-313 -639l313 -795h-231l-219 571l-70 -131v-440h-225z" />
+<glyph unicode="L" horiz-adv-x="694" d="M82 0v1434h225v-1229h371v-205h-596z" />
+<glyph unicode="M" horiz-adv-x="1107" d="M80 0v1434h313l166 -1018l154 1018h313v-1434h-213v1028l-156 -1028h-213l-168 1014v-1014h-196z" />
+<glyph unicode="N" horiz-adv-x="874" d="M80 0v1434h282l232 -859v859h201v-1434h-232l-280 1038v-1038h-203z" />
+<glyph unicode="O" d="M63 344v746q0 172 88.5 266t254 94t254 -94t88.5 -266v-746q0 -172 -88.5 -266t-254 -94t-254 94t-88.5 266zM289 330q1 -141 117 -142q117 0 116 142v774q0 141 -116.5 141t-116.5 -141v-774z" />
+<glyph unicode="P" horiz-adv-x="772" d="M82 0v1434h332q336 0 336 -355v-186q0 -354 -336 -354h-107v-539h-225zM307 743h107q55 0 82.5 31t27.5 105v215q0 74 -27.5 104.5t-82.5 30.5h-107v-486z" />
+<glyph unicode="Q" d="M63 1090q0 172 88.5 266t254 94t254 -94t88.5 -266v-746q0 -121 -43 -201q12 -30 60 -30h3h20v-201h-30q-145 0 -195 98q-71 -26 -151 -26h-6q-166 0 -254.5 94t-88.5 266v746zM289 330q0 -141 116 -142h1q116 0 116 142v774q0 141 -116.5 141t-116.5 -141v-774z" />
+<glyph unicode="R" horiz-adv-x="823" d="M82 0v1434h340q174 0 254 -81t80 -249v-113q0 -221 -148 -291q150 -63 150 -305v-221v-9q0 -110 24 -165h-229q-20 61 -21 176v225q0 98 -34.5 140.5t-112.5 42.5h-78v-584h-225zM307 788h88q68 0 101.5 35t33.5 117v141q1 148 -114 148h-109v-441z" />
+<glyph unicode="S" horiz-adv-x="765" d="M47 344v88h213v-102q0 -140 117 -140h1q116 0 116 140q0 80 -46 150t-110 128l-130 120q-66 63 -110.5 156t-44.5 206q0 174 84 267t248 93t248 -93t84 -267v-46h-213v60q0 141 -112.5 141t-112.5 -141q0 -59 24.5 -112.5t63.5 -96.5t86 -85t93 -88t85 -98.5t63.5 -124 t24.5 -155.5q0 -174 -86 -267t-250 -93t-250 93t-86 267z" />
+<glyph unicode="T" horiz-adv-x="729" d="M16 1229v205h697v-205h-236v-1229h-225v1229h-236z" />
+<glyph unicode="U" horiz-adv-x="815" d="M72 342v1092h225v-1106q1 -140 117 -140q117 0 116 140v1106h213v-1092q0 -174 -86 -267t-249.5 -93t-249.5 93t-86 267z" />
+<glyph unicode="V" horiz-adv-x="823" d="M23 1434h227l172 -1170l172 1170h207l-221 -1434h-336z" />
+<glyph unicode="W" horiz-adv-x="1153" d="M31 1434h219l121 -1131l108 1131h217l113 -1139l117 1139h196l-159 -1434h-299l-82 764l-82 -764h-310z" />
+<glyph unicode="X" horiz-adv-x="880" d="M31 0l252 737l-236 697h234l170 -529l174 529h209l-236 -697l252 -737h-238l-184 567l-186 -567h-211z" />
+<glyph unicode="Y" d="M8 1434h236l172 -654l172 654h215l-285 -959v-475h-225v475z" />
+<glyph unicode="Z" horiz-adv-x="757" d="M47 0v201l428 1028h-407v205h639v-201l-428 -1028h428v-205h-660z" />
+<glyph unicode="[" horiz-adv-x="514" d="M96 0v1434h373v-185h-147v-1065h147v-184h-373z" />
+<glyph unicode="\" horiz-adv-x="780" d="M10 1434h195l565 -1434h-195z" />
+<glyph unicode="]" horiz-adv-x="514" d="M45 0v184h148v1065h-148v185h373v-1434h-373z" />
+<glyph unicode="^" d="M41 799l285 635h159l285 -635h-180l-184 430l-185 -430h-180z" />
+<glyph unicode="_" horiz-adv-x="1024" d="M0 -20h1024v-164h-1024v164z" />
+<glyph unicode="`" horiz-adv-x="512" d="M90 1737h232l139 -228h-162z" />
+<glyph unicode="a" horiz-adv-x="833" d="M23 0l229 1434h330l229 -1434h-227l-39 260h-277l-39 -260h-206zM297 455h217l-108 725z" />
+<glyph unicode="b" horiz-adv-x="831" d="M82 0v1434h340q174 0 254 -81t80 -249v-51q0 -221 -146 -289q168 -66 168 -307v-117q0 -166 -87 -253t-255 -87h-354zM307 205h129q59 0 88 31.5t29 109.5v125q0 98 -33.5 136t-111.5 38h-101v-440zM307 850h88q68 0 101.5 35t33.5 116v80q1 148 -114 148h-109v-379z" />
+<glyph unicode="c" horiz-adv-x="790" d="M63 344v746q0 174 86.5 267t250 93t249.5 -93t86 -267v-140h-213v154q0 141 -116.5 141t-116.5 -141v-774q1 -140 117 -140q117 0 116 140v205h213v-191q0 -174 -86 -267t-249.5 -93t-250 93t-86.5 267z" />
+<glyph unicode="d" horiz-adv-x="835" d="M82 0v1434h356q336 0 336 -355v-725q0 -354 -336 -354h-356zM307 205h127q115 0 115 139v746q0 139 -115 139h-127v-1024z" />
+<glyph unicode="e" horiz-adv-x="753" d="M82 0v1434h614v-205h-389v-400h309v-204h-309v-420h389v-205h-614z" />
+<glyph unicode="f" horiz-adv-x="704" d="M82 0v1434h596v-205h-371v-432h291v-205h-291v-592h-225z" />
+<glyph unicode="g" horiz-adv-x="798" d="M63 344v746q0 174 86.5 267t250 93t249.5 -93t86 -267v-140h-213v154q0 141 -116.5 141t-116.5 -141v-774q0 -139 117 -140q116 0 116 140v264h-102v205h315v-455q0 -174 -86 -267t-249.5 -93t-250 93t-86.5 267z" />
+<glyph unicode="h" horiz-adv-x="874" d="M82 0v1434h225v-615h256v615h230v-1434h-230v614h-256v-614h-225z" />
+<glyph unicode="i" horiz-adv-x="389" d="M82 0v1434h225v-1434h-225z" />
+<glyph unicode="j" horiz-adv-x="524" d="M20 0v205q25 -2 78 -2q129 0 129 137v1094h226v-1078q0 -360 -324 -360q-72 0 -109 4z" />
+<glyph unicode="k" horiz-adv-x="847" d="M82 0v1434h225v-625l295 625h225l-313 -639l313 -795h-231l-219 571l-70 -131v-440h-225z" />
+<glyph unicode="l" horiz-adv-x="694" d="M82 0v1434h225v-1229h371v-205h-596z" />
+<glyph unicode="m" horiz-adv-x="1107" d="M80 0v1434h313l166 -1018l154 1018h313v-1434h-213v1028l-156 -1028h-213l-168 1014v-1014h-196z" />
+<glyph unicode="n" horiz-adv-x="874" d="M80 0v1434h282l232 -859v859h201v-1434h-232l-280 1038v-1038h-203z" />
+<glyph unicode="o" d="M63 344v746q0 172 88.5 266t254 94t254 -94t88.5 -266v-746q0 -172 -88.5 -266t-254 -94t-254 94t-88.5 266zM289 330q1 -141 117 -142q117 0 116 142v774q0 141 -116.5 141t-116.5 -141v-774z" />
+<glyph unicode="p" horiz-adv-x="772" d="M82 0v1434h332q336 0 336 -355v-186q0 -354 -336 -354h-107v-539h-225zM307 743h107q55 0 82.5 31t27.5 105v215q0 74 -27.5 104.5t-82.5 30.5h-107v-486z" />
+<glyph unicode="q" d="M63 1090q0 172 88.5 266t254 94t254 -94t88.5 -266v-746q0 -121 -43 -201q12 -30 60 -30h3h20v-201h-30q-145 0 -195 98q-71 -26 -151 -26h-6q-166 0 -254.5 94t-88.5 266v746zM289 330q0 -141 116 -142h1q116 0 116 142v774q0 141 -116.5 141t-116.5 -141v-774z" />
+<glyph unicode="r" horiz-adv-x="823" d="M82 0v1434h340q174 0 254 -81t80 -249v-113q0 -221 -148 -291q150 -63 150 -305v-221v-9q0 -110 24 -165h-229q-20 61 -21 176v225q0 98 -34.5 140.5t-112.5 42.5h-78v-584h-225zM307 788h88q68 0 101.5 35t33.5 117v141q1 148 -114 148h-109v-441z" />
+<glyph unicode="s" horiz-adv-x="765" d="M47 344v88h213v-102q0 -140 117 -140h1q116 0 116 140q0 80 -46 150t-110 128l-130 120q-66 63 -110.5 156t-44.5 206q0 174 84 267t248 93t248 -93t84 -267v-46h-213v60q0 141 -112.5 141t-112.5 -141q0 -59 24.5 -112.5t63.5 -96.5t86 -85t93 -88t85 -98.5t63.5 -124 t24.5 -155.5q0 -174 -86 -267t-250 -93t-250 93t-86 267z" />
+<glyph unicode="t" horiz-adv-x="729" d="M16 1229v205h697v-205h-236v-1229h-225v1229h-236z" />
+<glyph unicode="u" horiz-adv-x="815" d="M72 342v1092h225v-1106q1 -140 117 -140q117 0 116 140v1106h213v-1092q0 -174 -86 -267t-249.5 -93t-249.5 93t-86 267z" />
+<glyph unicode="v" horiz-adv-x="823" d="M23 1434h227l172 -1170l172 1170h207l-221 -1434h-336z" />
+<glyph unicode="w" horiz-adv-x="1153" d="M31 1434h219l121 -1131l108 1131h217l113 -1139l117 1139h196l-159 -1434h-299l-82 764l-82 -764h-310z" />
+<glyph unicode="x" horiz-adv-x="880" d="M31 0l252 737l-236 697h234l170 -529l174 529h209l-236 -697l252 -737h-238l-184 567l-186 -567h-211z" />
+<glyph unicode="y" d="M8 1434h236l172 -654l172 654h215l-285 -959v-475h-225v475z" />
+<glyph unicode="z" horiz-adv-x="757" d="M47 0v201l428 1028h-407v205h639v-201l-428 -1028h428v-205h-660z" />
+<glyph unicode="{" horiz-adv-x="526" d="M23 625v184q63 0 85.5 25.5t26.5 97.5l17 274q8 113 68.5 170.5t158.5 57.5h115v-185h-33q-55 0 -80 -31.5t-29 -113.5l-10 -205q-8 -149 -133 -182q125 -33 133 -182l10 -205q4 -82 29 -114t80 -32h33v-184h-115q-98 0 -158.5 57.5t-68.5 169.5l-17 275 q-4 72 -26.5 97.5t-85.5 25.5z" />
+<glyph unicode="|" horiz-adv-x="1024" d="M430 -133v1700h184v-1700h-184z" />
+<glyph unicode="}" horiz-adv-x="526" d="M33 1249v185h114q98 0 159 -57.5t69 -170.5l16 -274q4 -72 26.5 -97.5t86.5 -25.5v-184q-63 0 -86 -26t-27 -97l-16 -275q-8 -113 -68.5 -170t-159.5 -57h-114v184h33q55 0 79.5 32t28.5 114l10 205q8 149 133 182q-125 33 -133 182l-10 205q-4 82 -28.5 113.5 t-79.5 31.5h-33z" />
+<glyph unicode="~" d="M16 680q70 104 126.5 144t117.5 40q59 0 155.5 -62.5t137.5 -62.5q33 0 58.5 23.5t76.5 93.5l107 -111q-70 -102 -125.5 -139t-118.5 -37q-59 0 -155.5 62.5t-137.5 62.5q-35 0 -60.5 -23t-74.5 -93z" />
+<glyph unicode="&#xa2;" d="M74 426v582q0 297 239 350v106h185v-104q248 -49 247 -352v-99h-213v113q0 141 -116.5 141t-116.5 -141v-610q0 -139 117 -140q116 0 116 140v163h213v-149q0 -305 -247 -352v-105h-185v107q-240 49 -239 350z" />
+<glyph unicode="&#xa3;" d="M61 0v197q82 0 137.5 62.5t57.5 170.5h-166v174h137q-14 39 -56 123t-65.5 167t-23.5 196q0 174 84 267t248 93t247.5 -93t83.5 -267v-142h-213v156q0 141 -112.5 141t-112.5 -141q0 -113 24.5 -200t62.5 -167t50 -133h248v-174h-233q-14 -145 -115 -225h387v-205h-670z " />
+<glyph unicode="&#xa5;" d="M14 1434h236l166 -633l166 633h215l-262 -879h170v-113h-187v-92h187v-112h-187v-238h-225v238h-187v112h187v92h-187v113h168z" />
+<glyph unicode="&#xa9;" horiz-adv-x="1507" d="M41 716.5q0 317.5 204 525.5t509 208t508.5 -208t203.5 -525.5t-203.5 -525t-508.5 -207.5t-509 207.5t-204 525zM188 717q0 -256 161 -423t404.5 -167t404.5 167t161 423t-161 423t-404.5 167t-404.5 -167t-161 -423zM514 516v397q0 254 231.5 254t231.5 -254v-73h-148 v86q0 98 -79.5 98t-79.5 -98v-418q0 -96 79.5 -96t79.5 96v123h148v-115q0 -250 -231.5 -250t-231.5 250z" />
+<glyph unicode="&#xad;" horiz-adv-x="552" d="M72 614v205h409v-205h-409z" />
+<glyph unicode="&#xae;" horiz-adv-x="1507" d="M41 716.5q0 317.5 204 525.5t509 208t508.5 -208t203.5 -525.5t-203.5 -525t-508.5 -207.5t-509 207.5t-204 525zM188 717q0 -256 161 -423t404.5 -167t404.5 167t161 423t-161 423t-404.5 167t-404.5 -167t-161 -423zM528 279v876h238q231 0 231 -229v-19 q0 -156 -106 -202q106 -43 106 -211v-95q1 -79 19 -120h-160q-14 37 -14 122v95q0 70 -24.5 98.5t-80.5 28.5h-53v-344h-156zM684 766h64q94 0 94 104v37q0 105 -84 105h-74v-246z" />
+<glyph unicode="&#xb4;" horiz-adv-x="512" d="M55 1509l140 228h221l-209 -228h-152z" />
+<glyph unicode="&#x2000;" horiz-adv-x="868" />
+<glyph unicode="&#x2001;" horiz-adv-x="1737" />
+<glyph unicode="&#x2002;" horiz-adv-x="868" />
+<glyph unicode="&#x2003;" horiz-adv-x="1737" />
+<glyph unicode="&#x2004;" horiz-adv-x="579" />
+<glyph unicode="&#x2005;" horiz-adv-x="434" />
+<glyph unicode="&#x2006;" horiz-adv-x="289" />
+<glyph unicode="&#x2007;" horiz-adv-x="289" />
+<glyph unicode="&#x2008;" horiz-adv-x="217" />
+<glyph unicode="&#x2009;" horiz-adv-x="347" />
+<glyph unicode="&#x200a;" horiz-adv-x="96" />
+<glyph unicode="&#x2010;" horiz-adv-x="552" d="M72 614v205h409v-205h-409z" />
+<glyph unicode="&#x2011;" horiz-adv-x="552" d="M72 614v205h409v-205h-409z" />
+<glyph unicode="&#x2012;" horiz-adv-x="552" d="M72 614v205h409v-205h-409z" />
+<glyph unicode="&#x2013;" horiz-adv-x="1024" d="M0 625v184h1024v-184h-1024z" />
+<glyph unicode="&#x2014;" horiz-adv-x="2048" d="M0 625v184h2048v-184h-2048z" />
+<glyph unicode="&#x2018;" horiz-adv-x="380" d="M82 1012v194l98 228h92l-59 -205h86v-217h-217z" />
+<glyph unicode="&#x2019;" horiz-adv-x="380" d="M82 1217v217h217v-195l-98 -227h-92l59 205h-86z" />
+<glyph unicode="&#x201c;" horiz-adv-x="679" d="M82 1012v194l98 228h92l-59 -205h86v-217h-217zM381 1012v194l98 228h92l-59 -205h86v-217h-217z" />
+<glyph unicode="&#x201d;" horiz-adv-x="679" d="M82 1217v217h217v-195l-98 -227h-92l59 205h-86zM381 1217v217h217v-195l-98 -227h-92l59 205h-86z" />
+<glyph unicode="&#x2022;" d="M121 717q0 119 83 201.5t201.5 82.5t201.5 -82.5t83 -201.5t-83 -202t-201.5 -83t-201.5 83t-83 202z" />
+<glyph unicode="&#x2026;" horiz-adv-x="978" d="M82 0v217h217v-217h-217zM381 0v217h217v-217h-217zM680 0v217h217v-217h-217z" />
+<glyph unicode="&#x202f;" horiz-adv-x="347" />
+<glyph unicode="&#x205f;" horiz-adv-x="434" />
+<glyph unicode="&#x20ac;" d="M39 553v113h57v112h-57v113h57v199q0 174 83 267t247 93t247 -93t83 -267v-105h-213v119q0 141 -110.5 141t-110.5 -141v-213h315v-113h-315v-112h315v-113h-315v-223q0 -139 110 -140h1q110 0 110 140v129h213v-115q0 -174 -83 -267t-247 -93t-247 93t-83 267v209h-57z " />
+<glyph unicode="&#x2122;" horiz-adv-x="1200" d="M20 1303v131h443v-131h-150v-598h-143v598h-150zM549 705v729h199l106 -512l96 512h199v-729h-135v518l-96 -518h-136l-108 514v-514h-125z" />
+<glyph unicode="&#xe000;" horiz-adv-x="1435" d="M0 1435h1435v-1435h-1435v1435z" />
+</font>
+</defs></svg> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/fonts/BebasNeue-webfont.ttf b/common/src/main/webapp/thirdparty/fonts/BebasNeue-webfont.ttf
new file mode 100644
index 0000000..9b9eefc
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/fonts/BebasNeue-webfont.ttf
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/fonts/BebasNeue-webfont.woff b/common/src/main/webapp/thirdparty/fonts/BebasNeue-webfont.woff
new file mode 100644
index 0000000..89423e1
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/fonts/BebasNeue-webfont.woff
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/fonts/fontawesome-webfont.eot b/common/src/main/webapp/thirdparty/fonts/fontawesome-webfont.eot
new file mode 100644
index 0000000..84677bc
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/fonts/fontawesome-webfont.eot
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/fonts/fontawesome-webfont.svg b/common/src/main/webapp/thirdparty/fonts/fontawesome-webfont.svg
new file mode 100644
index 0000000..d907b25
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/fonts/fontawesome-webfont.svg
@@ -0,0 +1,520 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="fontawesomeregular" horiz-adv-x="1536" >
+<font-face units-per-em="1792" ascent="1536" descent="-256" />
+<missing-glyph horiz-adv-x="448" />
+<glyph unicode=" " horiz-adv-x="448" />
+<glyph unicode="&#x09;" horiz-adv-x="448" />
+<glyph unicode="&#xa0;" horiz-adv-x="448" />
+<glyph unicode="&#xa8;" horiz-adv-x="1792" />
+<glyph unicode="&#xa9;" horiz-adv-x="1792" />
+<glyph unicode="&#xae;" horiz-adv-x="1792" />
+<glyph unicode="&#xb4;" horiz-adv-x="1792" />
+<glyph unicode="&#xc6;" horiz-adv-x="1792" />
+<glyph unicode="&#xd8;" horiz-adv-x="1792" />
+<glyph unicode="&#x2000;" horiz-adv-x="768" />
+<glyph unicode="&#x2001;" horiz-adv-x="1537" />
+<glyph unicode="&#x2002;" horiz-adv-x="768" />
+<glyph unicode="&#x2003;" horiz-adv-x="1537" />
+<glyph unicode="&#x2004;" horiz-adv-x="512" />
+<glyph unicode="&#x2005;" horiz-adv-x="384" />
+<glyph unicode="&#x2006;" horiz-adv-x="256" />
+<glyph unicode="&#x2007;" horiz-adv-x="256" />
+<glyph unicode="&#x2008;" horiz-adv-x="192" />
+<glyph unicode="&#x2009;" horiz-adv-x="307" />
+<glyph unicode="&#x200a;" horiz-adv-x="85" />
+<glyph unicode="&#x202f;" horiz-adv-x="307" />
+<glyph unicode="&#x205f;" horiz-adv-x="384" />
+<glyph unicode="&#x2122;" horiz-adv-x="1792" />
+<glyph unicode="&#x221e;" horiz-adv-x="1792" />
+<glyph unicode="&#x2260;" horiz-adv-x="1792" />
+<glyph unicode="&#x25fc;" horiz-adv-x="500" d="M0 0z" />
+<glyph unicode="&#xf000;" horiz-adv-x="1792" d="M1699 1350q0 -35 -43 -78l-632 -632v-768h320q26 0 45 -19t19 -45t-19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45t45 19h320v768l-632 632q-43 43 -43 78q0 23 18 36.5t38 17.5t43 4h1408q23 0 43 -4t38 -17.5t18 -36.5z" />
+<glyph unicode="&#xf001;" d="M1536 1312v-1120q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v537l-768 -237v-709q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89 t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v967q0 31 19 56.5t49 35.5l832 256q12 4 28 4q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf002;" horiz-adv-x="1664" d="M1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -52 -38 -90t-90 -38q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5 t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" />
+<glyph unicode="&#xf003;" horiz-adv-x="1792" d="M1664 32v768q-32 -36 -69 -66q-268 -206 -426 -338q-51 -43 -83 -67t-86.5 -48.5t-102.5 -24.5h-1h-1q-48 0 -102.5 24.5t-86.5 48.5t-83 67q-158 132 -426 338q-37 30 -69 66v-768q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1664 1083v11v13.5t-0.5 13 t-3 12.5t-5.5 9t-9 7.5t-14 2.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5q0 -168 147 -284q193 -152 401 -317q6 -5 35 -29.5t46 -37.5t44.5 -31.5t50.5 -27.5t43 -9h1h1q20 0 43 9t50.5 27.5t44.5 31.5t46 37.5t35 29.5q208 165 401 317q54 43 100.5 115.5t46.5 131.5z M1792 1120v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf004;" horiz-adv-x="1792" d="M896 -128q-26 0 -44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5q224 0 351 -124t127 -344q0 -221 -229 -450l-623 -600 q-18 -18 -44 -18z" />
+<glyph unicode="&#xf005;" horiz-adv-x="1664" d="M1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -21 -10.5 -35.5t-30.5 -14.5q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455 l502 -73q56 -9 56 -46z" />
+<glyph unicode="&#xf006;" horiz-adv-x="1664" d="M1137 532l306 297l-422 62l-189 382l-189 -382l-422 -62l306 -297l-73 -421l378 199l377 -199zM1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -50 -41 -50q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500 l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455l502 -73q56 -9 56 -46z" />
+<glyph unicode="&#xf007;" horiz-adv-x="1408" d="M1408 131q0 -120 -73 -189.5t-194 -69.5h-874q-121 0 -194 69.5t-73 189.5q0 53 3.5 103.5t14 109t26.5 108.5t43 97.5t62 81t85.5 53.5t111.5 20q9 0 42 -21.5t74.5 -48t108 -48t133.5 -21.5t133.5 21.5t108 48t74.5 48t42 21.5q61 0 111.5 -20t85.5 -53.5t62 -81 t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5zM1088 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5z" />
+<glyph unicode="&#xf008;" horiz-adv-x="1920" d="M384 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 320v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 704v128q0 26 -19 45t-45 19h-128 q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 -64v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM384 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45 t45 -19h128q26 0 45 19t19 45zM1792 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 704v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1792 320v128 q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1792 704v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1792 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19 t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1920 1248v-1344q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1344q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf009;" horiz-adv-x="1664" d="M768 512v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM768 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 512v-384q0 -52 -38 -90t-90 -38 h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf00a;" horiz-adv-x="1792" d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 288v-192q0 -40 -28 -68t-68 -28h-320 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28 h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192 q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf00b;" horiz-adv-x="1792" d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-960 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28 h960q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf00c;" horiz-adv-x="1792" d="M1671 970q0 -40 -28 -68l-724 -724l-136 -136q-28 -28 -68 -28t-68 28l-136 136l-362 362q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -295l656 657q28 28 68 28t68 -28l136 -136q28 -28 28 -68z" />
+<glyph unicode="&#xf00d;" horiz-adv-x="1408" d="M1298 214q0 -40 -28 -68l-136 -136q-28 -28 -68 -28t-68 28l-294 294l-294 -294q-28 -28 -68 -28t-68 28l-136 136q-28 28 -28 68t28 68l294 294l-294 294q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -294l294 294q28 28 68 28t68 -28l136 -136q28 -28 28 -68 t-28 -68l-294 -294l294 -294q28 -28 28 -68z" />
+<glyph unicode="&#xf00e;" horiz-adv-x="1664" d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-224q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v224h-224q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h224v224q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5v-224h224 q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5 t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" />
+<glyph unicode="&#xf010;" horiz-adv-x="1664" d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-576q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h576q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5z M1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z " />
+<glyph unicode="&#xf011;" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61t-298 61t-245 164t-164 245t-61 298q0 182 80.5 343t226.5 270q43 32 95.5 25t83.5 -50q32 -42 24.5 -94.5t-49.5 -84.5q-98 -74 -151.5 -181t-53.5 -228q0 -104 40.5 -198.5t109.5 -163.5t163.5 -109.5 t198.5 -40.5t198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5q0 121 -53.5 228t-151.5 181q-42 32 -49.5 84.5t24.5 94.5q31 43 84 50t95 -25q146 -109 226.5 -270t80.5 -343zM896 1408v-640q0 -52 -38 -90t-90 -38t-90 38t-38 90v640q0 52 38 90t90 38t90 -38t38 -90z" />
+<glyph unicode="&#xf012;" horiz-adv-x="1792" d="M256 96v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM640 224v-320q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1024 480v-576q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23 v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1408 864v-960q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 1376v-1472q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v1472q0 14 9 23t23 9h192q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf013;" d="M1024 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1536 749v-222q0 -12 -8 -23t-20 -13l-185 -28q-19 -54 -39 -91q35 -50 107 -138q10 -12 10 -25t-9 -23q-27 -37 -99 -108t-94 -71q-12 0 -26 9l-138 108q-44 -23 -91 -38 q-16 -136 -29 -186q-7 -28 -36 -28h-222q-14 0 -24.5 8.5t-11.5 21.5l-28 184q-49 16 -90 37l-141 -107q-10 -9 -25 -9q-14 0 -25 11q-126 114 -165 168q-7 10 -7 23q0 12 8 23q15 21 51 66.5t54 70.5q-27 50 -41 99l-183 27q-13 2 -21 12.5t-8 23.5v222q0 12 8 23t19 13 l186 28q14 46 39 92q-40 57 -107 138q-10 12 -10 24q0 10 9 23q26 36 98.5 107.5t94.5 71.5q13 0 26 -10l138 -107q44 23 91 38q16 136 29 186q7 28 36 28h222q14 0 24.5 -8.5t11.5 -21.5l28 -184q49 -16 90 -37l142 107q9 9 24 9q13 0 25 -10q129 -119 165 -170q7 -8 7 -22 q0 -12 -8 -23q-15 -21 -51 -66.5t-54 -70.5q26 -50 41 -98l183 -28q13 -2 21 -12.5t8 -23.5z" />
+<glyph unicode="&#xf014;" horiz-adv-x="1408" d="M512 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM768 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1024 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576 q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1152 76v948h-896v-948q0 -22 7 -40.5t14.5 -27t10.5 -8.5h832q3 0 10.5 8.5t14.5 27t7 40.5zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM1408 1120v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832 q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h309l70 167q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf015;" horiz-adv-x="1664" d="M1408 544v-480q0 -26 -19 -45t-45 -19h-384v384h-256v-384h-384q-26 0 -45 19t-19 45v480q0 1 0.5 3t0.5 3l575 474l575 -474q1 -2 1 -6zM1631 613l-62 -74q-8 -9 -21 -11h-3q-13 0 -21 7l-692 577l-692 -577q-12 -8 -24 -7q-13 2 -21 11l-62 74q-8 10 -7 23.5t11 21.5 l719 599q32 26 76 26t76 -26l244 -204v195q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-408l219 -182q10 -8 11 -21.5t-7 -23.5z" />
+<glyph unicode="&#xf016;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z " />
+<glyph unicode="&#xf017;" d="M896 992v-448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf018;" horiz-adv-x="1920" d="M1111 540v4l-24 320q-1 13 -11 22.5t-23 9.5h-186q-13 0 -23 -9.5t-11 -22.5l-24 -320v-4q-1 -12 8 -20t21 -8h244q12 0 21 8t8 20zM1870 73q0 -73 -46 -73h-704q13 0 22 9.5t8 22.5l-20 256q-1 13 -11 22.5t-23 9.5h-272q-13 0 -23 -9.5t-11 -22.5l-20 -256 q-1 -13 8 -22.5t22 -9.5h-704q-46 0 -46 73q0 54 26 116l417 1044q8 19 26 33t38 14h339q-13 0 -23 -9.5t-11 -22.5l-15 -192q-1 -14 8 -23t22 -9h166q13 0 22 9t8 23l-15 192q-1 13 -11 22.5t-23 9.5h339q20 0 38 -14t26 -33l417 -1044q26 -62 26 -116z" />
+<glyph unicode="&#xf019;" horiz-adv-x="1664" d="M1280 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 416v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h465l135 -136 q58 -56 136 -56t136 56l136 136h464q40 0 68 -28t28 -68zM1339 985q17 -41 -14 -70l-448 -448q-18 -19 -45 -19t-45 19l-448 448q-31 29 -14 70q17 39 59 39h256v448q0 26 19 45t45 19h256q26 0 45 -19t19 -45v-448h256q42 0 59 -39z" />
+<glyph unicode="&#xf01a;" d="M1120 608q0 -12 -10 -24l-319 -319q-11 -9 -23 -9t-23 9l-320 320q-15 16 -7 35q8 20 30 20h192v352q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-352h192q14 0 23 -9t9 -23zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273 t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf01b;" d="M1118 660q-8 -20 -30 -20h-192v-352q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v352h-192q-14 0 -23 9t-9 23q0 12 10 24l319 319q11 9 23 9t23 -9l320 -320q15 -16 7 -35zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198 t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf01c;" d="M1023 576h316q-1 3 -2.5 8t-2.5 8l-212 496h-708l-212 -496q-1 -2 -2.5 -8t-2.5 -8h316l95 -192h320zM1536 546v-482q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v482q0 62 25 123l238 552q10 25 36.5 42t52.5 17h832q26 0 52.5 -17t36.5 -42l238 -552 q25 -61 25 -123z" />
+<glyph unicode="&#xf01d;" d="M1184 640q0 -37 -32 -55l-544 -320q-15 -9 -32 -9q-16 0 -32 8q-32 19 -32 56v640q0 37 32 56q33 18 64 -1l544 -320q32 -18 32 -55zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf01e;" d="M1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l138 138q-148 137 -349 137q-104 0 -198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5q119 0 225 52t179 147q7 10 23 12q14 0 25 -9 l137 -138q9 -8 9.5 -20.5t-7.5 -22.5q-109 -132 -264 -204.5t-327 -72.5q-156 0 -298 61t-245 164t-164 245t-61 298t61 298t164 245t245 164t298 61q147 0 284.5 -55.5t244.5 -156.5l130 129q29 31 70 14q39 -17 39 -59z" />
+<glyph unicode="&#xf021;" d="M1511 480q0 -5 -1 -7q-64 -268 -268 -434.5t-478 -166.5q-146 0 -282.5 55t-243.5 157l-129 -129q-19 -19 -45 -19t-45 19t-19 45v448q0 26 19 45t45 19h448q26 0 45 -19t19 -45t-19 -45l-137 -137q71 -66 161 -102t187 -36q134 0 250 65t186 179q11 17 53 117 q8 23 30 23h192q13 0 22.5 -9.5t9.5 -22.5zM1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-26 0 -45 19t-19 45t19 45l138 138q-148 137 -349 137q-134 0 -250 -65t-186 -179q-11 -17 -53 -117q-8 -23 -30 -23h-199q-13 0 -22.5 9.5t-9.5 22.5v7q65 268 270 434.5t480 166.5 q146 0 284 -55.5t245 -156.5l130 129q19 19 45 19t45 -19t19 -45z" />
+<glyph unicode="&#xf022;" horiz-adv-x="1792" d="M384 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M384 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1536 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5z M1536 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5zM1536 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5 t9.5 -22.5zM1664 160v832q0 13 -9.5 22.5t-22.5 9.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5v-832q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1792 1248v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47 t47 -113z" />
+<glyph unicode="&#xf023;" horiz-adv-x="1152" d="M320 768h512v192q0 106 -75 181t-181 75t-181 -75t-75 -181v-192zM1152 672v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h32v192q0 184 132 316t316 132t316 -132t132 -316v-192h32q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf024;" horiz-adv-x="1792" d="M320 1280q0 -72 -64 -110v-1266q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v1266q-64 38 -64 110q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -25 -12.5 -38.5t-39.5 -27.5q-215 -116 -369 -116q-61 0 -123.5 22t-108.5 48 t-115.5 48t-142.5 22q-192 0 -464 -146q-17 -9 -33 -9q-26 0 -45 19t-19 45v742q0 32 31 55q21 14 79 43q236 120 421 120q107 0 200 -29t219 -88q38 -19 88 -19q54 0 117.5 21t110 47t88 47t54.5 21q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf025;" horiz-adv-x="1664" d="M1664 650q0 -166 -60 -314l-20 -49l-185 -33q-22 -83 -90.5 -136.5t-156.5 -53.5v-32q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-32q71 0 130 -35.5t93 -95.5l68 12q29 95 29 193q0 148 -88 279t-236.5 209t-315.5 78 t-315.5 -78t-236.5 -209t-88 -279q0 -98 29 -193l68 -12q34 60 93 95.5t130 35.5v32q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v32q-88 0 -156.5 53.5t-90.5 136.5l-185 33l-20 49q-60 148 -60 314q0 151 67 291t179 242.5 t266 163.5t320 61t320 -61t266 -163.5t179 -242.5t67 -291z" />
+<glyph unicode="&#xf026;" horiz-adv-x="768" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45z" />
+<glyph unicode="&#xf027;" horiz-adv-x="1152" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 35.5 t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142z" />
+<glyph unicode="&#xf028;" horiz-adv-x="1664" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 35.5 t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142zM1408 640q0 -153 -85 -282.5t-225 -188.5q-13 -5 -25 -5q-27 0 -46 19t-19 45q0 39 39 59q56 29 76 44q74 54 115.5 135.5t41.5 173.5t-41.5 173.5 t-115.5 135.5q-20 15 -76 44q-39 20 -39 59q0 26 19 45t45 19q13 0 26 -5q140 -59 225 -188.5t85 -282.5zM1664 640q0 -230 -127 -422.5t-338 -283.5q-13 -5 -26 -5q-26 0 -45 19t-19 45q0 36 39 59q7 4 22.5 10.5t22.5 10.5q46 25 82 51q123 91 192 227t69 289t-69 289 t-192 227q-36 26 -82 51q-7 4 -22.5 10.5t-22.5 10.5q-39 23 -39 59q0 26 19 45t45 19q13 0 26 -5q211 -91 338 -283.5t127 -422.5z" />
+<glyph unicode="&#xf029;" horiz-adv-x="1408" d="M384 384v-128h-128v128h128zM384 1152v-128h-128v128h128zM1152 1152v-128h-128v128h128zM128 129h384v383h-384v-383zM128 896h384v384h-384v-384zM896 896h384v384h-384v-384zM640 640v-640h-640v640h640zM1152 128v-128h-128v128h128zM1408 128v-128h-128v128h128z M1408 640v-384h-384v128h-128v-384h-128v640h384v-128h128v128h128zM640 1408v-640h-640v640h640zM1408 1408v-640h-640v640h640z" />
+<glyph unicode="&#xf02a;" horiz-adv-x="1792" d="M63 0h-63v1408h63v-1408zM126 1h-32v1407h32v-1407zM220 1h-31v1407h31v-1407zM377 1h-31v1407h31v-1407zM534 1h-62v1407h62v-1407zM660 1h-31v1407h31v-1407zM723 1h-31v1407h31v-1407zM786 1h-31v1407h31v-1407zM943 1h-63v1407h63v-1407zM1100 1h-63v1407h63v-1407z M1226 1h-63v1407h63v-1407zM1352 1h-63v1407h63v-1407zM1446 1h-63v1407h63v-1407zM1635 1h-94v1407h94v-1407zM1698 1h-32v1407h32v-1407zM1792 0h-63v1408h63v-1408z" />
+<glyph unicode="&#xf02b;" d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5 l715 -714q37 -39 37 -91z" />
+<glyph unicode="&#xf02c;" horiz-adv-x="1920" d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5 l715 -714q37 -39 37 -91zM1899 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-36 0 -59 14t-53 45l470 470q37 37 37 90q0 52 -37 91l-715 714q-38 38 -102 64.5t-117 26.5h224q53 0 117 -26.5t102 -64.5l715 -714q37 -39 37 -91z" />
+<glyph unicode="&#xf02d;" horiz-adv-x="1664" d="M1639 1058q40 -57 18 -129l-275 -906q-19 -64 -76.5 -107.5t-122.5 -43.5h-923q-77 0 -148.5 53.5t-99.5 131.5q-24 67 -2 127q0 4 3 27t4 37q1 8 -3 21.5t-3 19.5q2 11 8 21t16.5 23.5t16.5 23.5q23 38 45 91.5t30 91.5q3 10 0.5 30t-0.5 28q3 11 17 28t17 23 q21 36 42 92t25 90q1 9 -2.5 32t0.5 28q4 13 22 30.5t22 22.5q19 26 42.5 84.5t27.5 96.5q1 8 -3 25.5t-2 26.5q2 8 9 18t18 23t17 21q8 12 16.5 30.5t15 35t16 36t19.5 32t26.5 23.5t36 11.5t47.5 -5.5l-1 -3q38 9 51 9h761q74 0 114 -56t18 -130l-274 -906 q-36 -119 -71.5 -153.5t-128.5 -34.5h-869q-27 0 -38 -15q-11 -16 -1 -43q24 -70 144 -70h923q29 0 56 15.5t35 41.5l300 987q7 22 5 57q38 -15 59 -43zM575 1056q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5 t-16.5 -22.5zM492 800q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5t-16.5 -22.5z" />
+<glyph unicode="&#xf02e;" horiz-adv-x="1280" d="M1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289q0 34 19.5 62t52.5 41q21 9 44 9h1048z" />
+<glyph unicode="&#xf02f;" horiz-adv-x="1664" d="M384 0h896v256h-896v-256zM384 640h896v384h-160q-40 0 -68 28t-28 68v160h-640v-640zM1536 576q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 576v-416q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-160q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68 v160h-224q-13 0 -22.5 9.5t-9.5 22.5v416q0 79 56.5 135.5t135.5 56.5h64v544q0 40 28 68t68 28h672q40 0 88 -20t76 -48l152 -152q28 -28 48 -76t20 -88v-256h64q79 0 135.5 -56.5t56.5 -135.5z" />
+<glyph unicode="&#xf030;" horiz-adv-x="1920" d="M960 864q119 0 203.5 -84.5t84.5 -203.5t-84.5 -203.5t-203.5 -84.5t-203.5 84.5t-84.5 203.5t84.5 203.5t203.5 84.5zM1664 1280q106 0 181 -75t75 -181v-896q0 -106 -75 -181t-181 -75h-1408q-106 0 -181 75t-75 181v896q0 106 75 181t181 75h224l51 136 q19 49 69.5 84.5t103.5 35.5h512q53 0 103.5 -35.5t69.5 -84.5l51 -136h224zM960 128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
+<glyph unicode="&#xf031;" horiz-adv-x="1664" d="M725 977l-170 -450q33 0 136.5 -2t160.5 -2q19 0 57 2q-87 253 -184 452zM0 -128l2 79q23 7 56 12.5t57 10.5t49.5 14.5t44.5 29t31 50.5l237 616l280 724h75h53q8 -14 11 -21l205 -480q33 -78 106 -257.5t114 -274.5q15 -34 58 -144.5t72 -168.5q20 -45 35 -57 q19 -15 88 -29.5t84 -20.5q6 -38 6 -57q0 -4 -0.5 -13t-0.5 -13q-63 0 -190 8t-191 8q-76 0 -215 -7t-178 -8q0 43 4 78l131 28q1 0 12.5 2.5t15.5 3.5t14.5 4.5t15 6.5t11 8t9 11t2.5 14q0 16 -31 96.5t-72 177.5t-42 100l-450 2q-26 -58 -76.5 -195.5t-50.5 -162.5 q0 -22 14 -37.5t43.5 -24.5t48.5 -13.5t57 -8.5t41 -4q1 -19 1 -58q0 -9 -2 -27q-58 0 -174.5 10t-174.5 10q-8 0 -26.5 -4t-21.5 -4q-80 -14 -188 -14z" />
+<glyph unicode="&#xf032;" horiz-adv-x="1408" d="M555 15q74 -32 140 -32q376 0 376 335q0 114 -41 180q-27 44 -61.5 74t-67.5 46.5t-80.5 25t-84 10.5t-94.5 2q-73 0 -101 -10q0 -53 -0.5 -159t-0.5 -158q0 -8 -1 -67.5t-0.5 -96.5t4.5 -83.5t12 -66.5zM541 761q42 -7 109 -7q82 0 143 13t110 44.5t74.5 89.5t25.5 142 q0 70 -29 122.5t-79 82t-108 43.5t-124 14q-50 0 -130 -13q0 -50 4 -151t4 -152q0 -27 -0.5 -80t-0.5 -79q0 -46 1 -69zM0 -128l2 94q15 4 85 16t106 27q7 12 12.5 27t8.5 33.5t5.5 32.5t3 37.5t0.5 34v35.5v30q0 982 -22 1025q-4 8 -22 14.5t-44.5 11t-49.5 7t-48.5 4.5 t-30.5 3l-4 83q98 2 340 11.5t373 9.5q23 0 68.5 -0.5t67.5 -0.5q70 0 136.5 -13t128.5 -42t108 -71t74 -104.5t28 -137.5q0 -52 -16.5 -95.5t-39 -72t-64.5 -57.5t-73 -45t-84 -40q154 -35 256.5 -134t102.5 -248q0 -100 -35 -179.5t-93.5 -130.5t-138 -85.5t-163.5 -48.5 t-176 -14q-44 0 -132 3t-132 3q-106 0 -307 -11t-231 -12z" />
+<glyph unicode="&#xf033;" horiz-adv-x="1024" d="M0 -126l17 85q6 2 81.5 21.5t111.5 37.5q28 35 41 101q1 7 62 289t114 543.5t52 296.5v25q-24 13 -54.5 18.5t-69.5 8t-58 5.5l19 103q33 -2 120 -6.5t149.5 -7t120.5 -2.5q48 0 98.5 2.5t121 7t98.5 6.5q-5 -39 -19 -89q-30 -10 -101.5 -28.5t-108.5 -33.5 q-8 -19 -14 -42.5t-9 -40t-7.5 -45.5t-6.5 -42q-27 -148 -87.5 -419.5t-77.5 -355.5q-2 -9 -13 -58t-20 -90t-16 -83.5t-6 -57.5l1 -18q17 -4 185 -31q-3 -44 -16 -99q-11 0 -32.5 -1.5t-32.5 -1.5q-29 0 -87 10t-86 10q-138 2 -206 2q-51 0 -143 -9t-121 -11z" />
+<glyph unicode="&#xf034;" horiz-adv-x="1792" d="M1744 128q33 0 42 -18.5t-11 -44.5l-126 -162q-20 -26 -49 -26t-49 26l-126 162q-20 26 -11 44.5t42 18.5h80v1024h-80q-33 0 -42 18.5t11 44.5l126 162q20 26 49 26t49 -26l126 -162q20 -26 11 -44.5t-42 -18.5h-80v-1024h80zM81 1407l54 -27q12 -5 211 -5q44 0 132 2 t132 2q36 0 107.5 -0.5t107.5 -0.5h293q6 0 21 -0.5t20.5 0t16 3t17.5 9t15 17.5l42 1q4 0 14 -0.5t14 -0.5q2 -112 2 -336q0 -80 -5 -109q-39 -14 -68 -18q-25 44 -54 128q-3 9 -11 48t-14.5 73.5t-7.5 35.5q-6 8 -12 12.5t-15.5 6t-13 2.5t-18 0.5t-16.5 -0.5 q-17 0 -66.5 0.5t-74.5 0.5t-64 -2t-71 -6q-9 -81 -8 -136q0 -94 2 -388t2 -455q0 -16 -2.5 -71.5t0 -91.5t12.5 -69q40 -21 124 -42.5t120 -37.5q5 -40 5 -50q0 -14 -3 -29l-34 -1q-76 -2 -218 8t-207 10q-50 0 -151 -9t-152 -9q-3 51 -3 52v9q17 27 61.5 43t98.5 29t78 27 q19 42 19 383q0 101 -3 303t-3 303v117q0 2 0.5 15.5t0.5 25t-1 25.5t-3 24t-5 14q-11 12 -162 12q-33 0 -93 -12t-80 -26q-19 -13 -34 -72.5t-31.5 -111t-42.5 -53.5q-42 26 -56 44v383z" />
+<glyph unicode="&#xf035;" d="M81 1407l54 -27q12 -5 211 -5q44 0 132 2t132 2q70 0 246.5 1t304.5 0.5t247 -4.5q33 -1 56 31l42 1q4 0 14 -0.5t14 -0.5q2 -112 2 -336q0 -80 -5 -109q-39 -14 -68 -18q-25 44 -54 128q-3 9 -11 47.5t-15 73.5t-7 36q-10 13 -27 19q-5 2 -66 2q-30 0 -93 1t-103 1 t-94 -2t-96 -7q-9 -81 -8 -136l1 -152v52q0 -55 1 -154t1.5 -180t0.5 -153q0 -16 -2.5 -71.5t0 -91.5t12.5 -69q40 -21 124 -42.5t120 -37.5q5 -40 5 -50q0 -14 -3 -29l-34 -1q-76 -2 -218 8t-207 10q-50 0 -151 -9t-152 -9q-3 51 -3 52v9q17 27 61.5 43t98.5 29t78 27 q7 16 11.5 74t6 145.5t1.5 155t-0.5 153.5t-0.5 89q0 7 -2.5 21.5t-2.5 22.5q0 7 0.5 44t1 73t0 76.5t-3 67.5t-6.5 32q-11 12 -162 12q-41 0 -163 -13.5t-138 -24.5q-19 -12 -34 -71.5t-31.5 -111.5t-42.5 -54q-42 26 -56 44v383zM1310 125q12 0 42 -19.5t57.5 -41.5 t59.5 -49t36 -30q26 -21 26 -49t-26 -49q-4 -3 -36 -30t-59.5 -49t-57.5 -41.5t-42 -19.5q-13 0 -20.5 10.5t-10 28.5t-2.5 33.5t1.5 33t1.5 19.5h-1024q0 -2 1.5 -19.5t1.5 -33t-2.5 -33.5t-10 -28.5t-20.5 -10.5q-12 0 -42 19.5t-57.5 41.5t-59.5 49t-36 30q-26 21 -26 49 t26 49q4 3 36 30t59.5 49t57.5 41.5t42 19.5q13 0 20.5 -10.5t10 -28.5t2.5 -33.5t-1.5 -33t-1.5 -19.5h1024q0 2 -1.5 19.5t-1.5 33t2.5 33.5t10 28.5t20.5 10.5z" />
+<glyph unicode="&#xf036;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45 t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf037;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h896q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45t-45 -19 h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h640q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf038;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45 t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf039;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45 t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf03a;" horiz-adv-x="1792" d="M256 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM256 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5 t9.5 -22.5zM256 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344 q13 0 22.5 -9.5t9.5 -22.5zM256 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5 t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192 q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf03b;" horiz-adv-x="1792" d="M384 992v-576q0 -13 -9.5 -22.5t-22.5 -9.5q-14 0 -23 9l-288 288q-9 9 -9 23t9 23l288 288q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5 t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088 q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf03c;" horiz-adv-x="1792" d="M352 704q0 -14 -9 -23l-288 -288q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v576q0 13 9.5 22.5t22.5 9.5q14 0 23 -9l288 -288q9 -9 9 -23zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5 t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088 q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf03d;" horiz-adv-x="1792" d="M1792 1184v-1088q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-403 403v-166q0 -119 -84.5 -203.5t-203.5 -84.5h-704q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h704q119 0 203.5 -84.5t84.5 -203.5v-165l403 402q18 19 45 19q12 0 25 -5 q39 -17 39 -59z" />
+<glyph unicode="&#xf03e;" horiz-adv-x="1920" d="M640 960q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1664 576v-448h-1408v192l320 320l160 -160l512 512zM1760 1280h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-1216q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5v1216 q0 13 -9.5 22.5t-22.5 9.5zM1920 1248v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf040;" d="M363 0l91 91l-235 235l-91 -91v-107h128v-128h107zM886 928q0 22 -22 22q-10 0 -17 -7l-542 -542q-7 -7 -7 -17q0 -22 22 -22q10 0 17 7l542 542q7 7 7 17zM832 1120l416 -416l-832 -832h-416v416zM1515 1024q0 -53 -37 -90l-166 -166l-416 416l166 165q36 38 90 38 q53 0 91 -38l235 -234q37 -39 37 -91z" />
+<glyph unicode="&#xf041;" horiz-adv-x="1024" d="M768 896q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1024 896q0 -109 -33 -179l-364 -774q-16 -33 -47.5 -52t-67.5 -19t-67.5 19t-46.5 52l-365 774q-33 70 -33 179q0 212 150 362t362 150t362 -150t150 -362z" />
+<glyph unicode="&#xf042;" d="M768 96v1088q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf043;" horiz-adv-x="1024" d="M512 384q0 36 -20 69q-1 1 -15.5 22.5t-25.5 38t-25 44t-21 50.5q-4 16 -21 16t-21 -16q-7 -23 -21 -50.5t-25 -44t-25.5 -38t-15.5 -22.5q-20 -33 -20 -69q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 512q0 -212 -150 -362t-362 -150t-362 150t-150 362 q0 145 81 275q6 9 62.5 90.5t101 151t99.5 178t83 201.5q9 30 34 47t51 17t51.5 -17t33.5 -47q28 -93 83 -201.5t99.5 -178t101 -151t62.5 -90.5q81 -127 81 -275z" />
+<glyph unicode="&#xf044;" horiz-adv-x="1792" d="M888 352l116 116l-152 152l-116 -116v-56h96v-96h56zM1328 1072q-16 16 -33 -1l-350 -350q-17 -17 -1 -33t33 1l350 350q17 17 1 33zM1408 478v-190q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-14 -14 -32 -8q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v126q0 13 9 22l64 64q15 15 35 7t20 -29zM1312 1216l288 -288l-672 -672h-288v288zM1756 1084l-92 -92 l-288 288l92 92q28 28 68 28t68 -28l152 -152q28 -28 28 -68t-28 -68z" />
+<glyph unicode="&#xf045;" horiz-adv-x="1664" d="M1408 547v-259q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h255v0q13 0 22.5 -9.5t9.5 -22.5q0 -27 -26 -32q-77 -26 -133 -60q-10 -4 -16 -4h-112q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832 q66 0 113 47t47 113v214q0 19 18 29q28 13 54 37q16 16 35 8q21 -9 21 -29zM1645 1043l-384 -384q-18 -19 -45 -19q-12 0 -25 5q-39 17 -39 59v192h-160q-323 0 -438 -131q-119 -137 -74 -473q3 -23 -20 -34q-8 -2 -12 -2q-16 0 -26 13q-10 14 -21 31t-39.5 68.5t-49.5 99.5 t-38.5 114t-17.5 122q0 49 3.5 91t14 90t28 88t47 81.5t68.5 74t94.5 61.5t124.5 48.5t159.5 30.5t196.5 11h160v192q0 42 39 59q13 5 25 5q26 0 45 -19l384 -384q19 -19 19 -45t-19 -45z" />
+<glyph unicode="&#xf046;" horiz-adv-x="1664" d="M1408 606v-318q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-10 -10 -23 -10q-3 0 -9 2q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832 q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v254q0 13 9 22l64 64q10 10 23 10q6 0 12 -3q20 -8 20 -29zM1639 1095l-814 -814q-24 -24 -57 -24t-57 24l-430 430q-24 24 -24 57t24 57l110 110q24 24 57 24t57 -24l263 -263l647 647q24 24 57 24t57 -24l110 -110 q24 -24 24 -57t-24 -57z" />
+<glyph unicode="&#xf047;" horiz-adv-x="1792" d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-384v-384h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v384h-384v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45 t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h384v384h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45t-19 -45t-45 -19h-128v-384h384v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" />
+<glyph unicode="&#xf048;" horiz-adv-x="1024" d="M979 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19z" />
+<glyph unicode="&#xf049;" horiz-adv-x="1792" d="M1747 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19l710 710 q19 19 32 13t13 -32v-710q4 11 13 19z" />
+<glyph unicode="&#xf04a;" horiz-adv-x="1664" d="M1619 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-8 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-19 19 -19 45t19 45l710 710q19 19 32 13t13 -32v-710q5 11 13 19z" />
+<glyph unicode="&#xf04b;" horiz-adv-x="1408" d="M1384 609l-1328 -738q-23 -13 -39.5 -3t-16.5 36v1472q0 26 16.5 36t39.5 -3l1328 -738q23 -13 23 -31t-23 -31z" />
+<glyph unicode="&#xf04c;" d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45zM640 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf04d;" d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf04e;" horiz-adv-x="1664" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q19 -19 19 -45t-19 -45l-710 -710q-19 -19 -32 -13t-13 32v710q-5 -10 -13 -19z" />
+<glyph unicode="&#xf050;" horiz-adv-x="1792" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19l-710 -710 q-19 -19 -32 -13t-13 32v710q-5 -10 -13 -19z" />
+<glyph unicode="&#xf051;" horiz-adv-x="1024" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19z" />
+<glyph unicode="&#xf052;" horiz-adv-x="1538" d="M14 557l710 710q19 19 45 19t45 -19l710 -710q19 -19 13 -32t-32 -13h-1472q-26 0 -32 13t13 32zM1473 0h-1408q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1408q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19z" />
+<glyph unicode="&#xf053;" horiz-adv-x="1280" d="M1171 1235l-531 -531l531 -531q19 -19 19 -45t-19 -45l-166 -166q-19 -19 -45 -19t-45 19l-742 742q-19 19 -19 45t19 45l742 742q19 19 45 19t45 -19l166 -166q19 -19 19 -45t-19 -45z" />
+<glyph unicode="&#xf054;" horiz-adv-x="1280" d="M1107 659l-742 -742q-19 -19 -45 -19t-45 19l-166 166q-19 19 -19 45t19 45l531 531l-531 531q-19 19 -19 45t19 45l166 166q19 19 45 19t45 -19l742 -742q19 -19 19 -45t-19 -45z" />
+<glyph unicode="&#xf055;" d="M1216 576v128q0 26 -19 45t-45 19h-256v256q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-256h-256q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h256v-256q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v256h256q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5 t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf056;" d="M1216 576v128q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5 t103 -385.5z" />
+<glyph unicode="&#xf057;" d="M1149 414q0 26 -19 45l-181 181l181 181q19 19 19 45q0 27 -19 46l-90 90q-19 19 -46 19q-26 0 -45 -19l-181 -181l-181 181q-19 19 -45 19q-27 0 -46 -19l-90 -90q-19 -19 -19 -46q0 -26 19 -45l181 -181l-181 -181q-19 -19 -19 -45q0 -27 19 -46l90 -90q19 -19 46 -19 q26 0 45 19l181 181l181 -181q19 -19 45 -19q27 0 46 19l90 90q19 19 19 46zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf058;" d="M1284 802q0 28 -18 46l-91 90q-19 19 -45 19t-45 -19l-408 -407l-226 226q-19 19 -45 19t-45 -19l-91 -90q-18 -18 -18 -46q0 -27 18 -45l362 -362q19 -19 45 -19q27 0 46 19l543 543q18 18 18 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf059;" d="M896 160v192q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h192q14 0 23 9t9 23zM1152 832q0 88 -55.5 163t-138.5 116t-170 41q-243 0 -371 -213q-15 -24 8 -42l132 -100q7 -6 19 -6q16 0 25 12q53 68 86 92q34 24 86 24q48 0 85.5 -26t37.5 -59 q0 -38 -20 -61t-68 -45q-63 -28 -115.5 -86.5t-52.5 -125.5v-36q0 -14 9 -23t23 -9h192q14 0 23 9t9 23q0 19 21.5 49.5t54.5 49.5q32 18 49 28.5t46 35t44.5 48t28 60.5t12.5 81zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf05a;" d="M1024 160v160q0 14 -9 23t-23 9h-96v512q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h96v-320h-96q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h448q14 0 23 9t9 23zM896 1056v160q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23 t23 -9h192q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf05b;" d="M1197 512h-109q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h109q-32 108 -112.5 188.5t-188.5 112.5v-109q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v109q-108 -32 -188.5 -112.5t-112.5 -188.5h109q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-109 q32 -108 112.5 -188.5t188.5 -112.5v109q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-109q108 32 188.5 112.5t112.5 188.5zM1536 704v-128q0 -26 -19 -45t-45 -19h-143q-37 -161 -154.5 -278.5t-278.5 -154.5v-143q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v143 q-161 37 -278.5 154.5t-154.5 278.5h-143q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h143q37 161 154.5 278.5t278.5 154.5v143q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-143q161 -37 278.5 -154.5t154.5 -278.5h143q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf05c;" d="M1097 457l-146 -146q-10 -10 -23 -10t-23 10l-137 137l-137 -137q-10 -10 -23 -10t-23 10l-146 146q-10 10 -10 23t10 23l137 137l-137 137q-10 10 -10 23t10 23l146 146q10 10 23 10t23 -10l137 -137l137 137q10 10 23 10t23 -10l146 -146q10 -10 10 -23t-10 -23 l-137 -137l137 -137q10 -10 10 -23t-10 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5 t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf05d;" d="M1171 723l-422 -422q-19 -19 -45 -19t-45 19l-294 294q-19 19 -19 45t19 45l102 102q19 19 45 19t45 -19l147 -147l275 275q19 19 45 19t45 -19l102 -102q19 -19 19 -45t-19 -45zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198 t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf05e;" d="M1312 643q0 161 -87 295l-754 -753q137 -89 297 -89q111 0 211.5 43.5t173.5 116.5t116 174.5t43 212.5zM313 344l755 754q-135 91 -300 91q-148 0 -273 -73t-198 -199t-73 -274q0 -162 89 -299zM1536 643q0 -157 -61 -300t-163.5 -246t-245 -164t-298.5 -61t-298.5 61 t-245 164t-163.5 246t-61 300t61 299.5t163.5 245.5t245 164t298.5 61t298.5 -61t245 -164t163.5 -245.5t61 -299.5z" />
+<glyph unicode="&#xf060;" d="M1536 640v-128q0 -53 -32.5 -90.5t-84.5 -37.5h-704l293 -294q38 -36 38 -90t-38 -90l-75 -76q-37 -37 -90 -37q-52 0 -91 37l-651 652q-37 37 -37 90q0 52 37 91l651 650q38 38 91 38q52 0 90 -38l75 -74q38 -38 38 -91t-38 -91l-293 -293h704q52 0 84.5 -37.5 t32.5 -90.5z" />
+<glyph unicode="&#xf061;" d="M1472 576q0 -54 -37 -91l-651 -651q-39 -37 -91 -37q-51 0 -90 37l-75 75q-38 38 -38 91t38 91l293 293h-704q-52 0 -84.5 37.5t-32.5 90.5v128q0 53 32.5 90.5t84.5 37.5h704l-293 294q-38 36 -38 90t38 90l75 75q38 38 90 38q53 0 91 -38l651 -651q37 -35 37 -90z" />
+<glyph unicode="&#xf062;" horiz-adv-x="1664" d="M1611 565q0 -51 -37 -90l-75 -75q-38 -38 -91 -38q-54 0 -90 38l-294 293v-704q0 -52 -37.5 -84.5t-90.5 -32.5h-128q-53 0 -90.5 32.5t-37.5 84.5v704l-294 -293q-36 -38 -90 -38t-90 38l-75 75q-38 38 -38 90q0 53 38 91l651 651q35 37 90 37q54 0 91 -37l651 -651 q37 -39 37 -91z" />
+<glyph unicode="&#xf063;" horiz-adv-x="1664" d="M1611 704q0 -53 -37 -90l-651 -652q-39 -37 -91 -37q-53 0 -90 37l-651 652q-38 36 -38 90q0 53 38 91l74 75q39 37 91 37q53 0 90 -37l294 -294v704q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-704l294 294q37 37 90 37q52 0 91 -37l75 -75q37 -39 37 -91z" />
+<glyph unicode="&#xf064;" horiz-adv-x="1792" d="M1792 896q0 -26 -19 -45l-512 -512q-19 -19 -45 -19t-45 19t-19 45v256h-224q-98 0 -175.5 -6t-154 -21.5t-133 -42.5t-105.5 -69.5t-80 -101t-48.5 -138.5t-17.5 -181q0 -55 5 -123q0 -6 2.5 -23.5t2.5 -26.5q0 -15 -8.5 -25t-23.5 -10q-16 0 -28 17q-7 9 -13 22 t-13.5 30t-10.5 24q-127 285 -127 451q0 199 53 333q162 403 875 403h224v256q0 26 19 45t45 19t45 -19l512 -512q19 -19 19 -45z" />
+<glyph unicode="&#xf065;" d="M755 480q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23zM1536 1344v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332 q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf066;" d="M768 576v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45zM1523 1248q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45 t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23z" />
+<glyph unicode="&#xf067;" horiz-adv-x="1408" d="M1408 800v-192q0 -40 -28 -68t-68 -28h-416v-416q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v416h-416q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h416v416q0 40 28 68t68 28h192q40 0 68 -28t28 -68v-416h416q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf068;" horiz-adv-x="1408" d="M1408 800v-192q0 -40 -28 -68t-68 -28h-1216q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h1216q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf069;" horiz-adv-x="1664" d="M1482 486q46 -26 59.5 -77.5t-12.5 -97.5l-64 -110q-26 -46 -77.5 -59.5t-97.5 12.5l-266 153v-307q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v307l-266 -153q-46 -26 -97.5 -12.5t-77.5 59.5l-64 110q-26 46 -12.5 97.5t59.5 77.5l266 154l-266 154 q-46 26 -59.5 77.5t12.5 97.5l64 110q26 46 77.5 59.5t97.5 -12.5l266 -153v307q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-307l266 153q46 26 97.5 12.5t77.5 -59.5l64 -110q26 -46 12.5 -97.5t-59.5 -77.5l-266 -154z" />
+<glyph unicode="&#xf06a;" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM896 161v190q0 14 -9 23.5t-22 9.5h-192q-13 0 -23 -10t-10 -23v-190q0 -13 10 -23t23 -10h192 q13 0 22 9.5t9 23.5zM894 505l18 621q0 12 -10 18q-10 8 -24 8h-220q-14 0 -24 -8q-10 -6 -10 -18l17 -621q0 -10 10 -17.5t24 -7.5h185q14 0 23.5 7.5t10.5 17.5z" />
+<glyph unicode="&#xf06b;" d="M928 180v56v468v192h-320v-192v-468v-56q0 -25 18 -38.5t46 -13.5h192q28 0 46 13.5t18 38.5zM472 1024h195l-126 161q-26 31 -69 31q-40 0 -68 -28t-28 -68t28 -68t68 -28zM1160 1120q0 40 -28 68t-68 28q-43 0 -69 -31l-125 -161h194q40 0 68 28t28 68zM1536 864v-320 q0 -14 -9 -23t-23 -9h-96v-416q0 -40 -28 -68t-68 -28h-1088q-40 0 -68 28t-28 68v416h-96q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h440q-93 0 -158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5q107 0 168 -77l128 -165l128 165q61 77 168 77q93 0 158.5 -65.5t65.5 -158.5 t-65.5 -158.5t-158.5 -65.5h440q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf06c;" horiz-adv-x="1792" d="M1280 832q0 26 -19 45t-45 19q-172 0 -318 -49.5t-259.5 -134t-235.5 -219.5q-19 -21 -19 -45q0 -26 19 -45t45 -19q24 0 45 19q27 24 74 71t67 66q137 124 268.5 176t313.5 52q26 0 45 19t19 45zM1792 1030q0 -95 -20 -193q-46 -224 -184.5 -383t-357.5 -268 q-214 -108 -438 -108q-148 0 -286 47q-15 5 -88 42t-96 37q-16 0 -39.5 -32t-45 -70t-52.5 -70t-60 -32q-30 0 -51 11t-31 24t-27 42q-2 4 -6 11t-5.5 10t-3 9.5t-1.5 13.5q0 35 31 73.5t68 65.5t68 56t31 48q0 4 -14 38t-16 44q-9 51 -9 104q0 115 43.5 220t119 184.5 t170.5 139t204 95.5q55 18 145 25.5t179.5 9t178.5 6t163.5 24t113.5 56.5l29.5 29.5t29.5 28t27 20t36.5 16t43.5 4.5q39 0 70.5 -46t47.5 -112t24 -124t8 -96z" />
+<glyph unicode="&#xf06d;" horiz-adv-x="1408" d="M1408 -160v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1152 896q0 -78 -24.5 -144t-64 -112.5t-87.5 -88t-96 -77.5t-87.5 -72t-64 -81.5t-24.5 -96.5q0 -96 67 -224l-4 1l1 -1 q-90 41 -160 83t-138.5 100t-113.5 122.5t-72.5 150.5t-27.5 184q0 78 24.5 144t64 112.5t87.5 88t96 77.5t87.5 72t64 81.5t24.5 96.5q0 94 -66 224l3 -1l-1 1q90 -41 160 -83t138.5 -100t113.5 -122.5t72.5 -150.5t27.5 -184z" />
+<glyph unicode="&#xf06e;" horiz-adv-x="1792" d="M1664 576q-152 236 -381 353q61 -104 61 -225q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 121 61 225q-229 -117 -381 -353q133 -205 333.5 -326.5t434.5 -121.5t434.5 121.5t333.5 326.5zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5 t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1792 576q0 -34 -20 -69q-140 -230 -376.5 -368.5t-499.5 -138.5t-499.5 139t-376.5 368q-20 35 -20 69t20 69q140 229 376.5 368t499.5 139t499.5 -139t376.5 -368q20 -35 20 -69z" />
+<glyph unicode="&#xf070;" horiz-adv-x="1792" d="M555 201l78 141q-87 63 -136 159t-49 203q0 121 61 225q-229 -117 -381 -353q167 -258 427 -375zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1307 1151q0 -7 -1 -9 q-105 -188 -315 -566t-316 -567l-49 -89q-10 -16 -28 -16q-12 0 -134 70q-16 10 -16 28q0 12 44 87q-143 65 -263.5 173t-208.5 245q-20 31 -20 69t20 69q153 235 380 371t496 136q89 0 180 -17l54 97q10 16 28 16q5 0 18 -6t31 -15.5t33 -18.5t31.5 -18.5t19.5 -11.5 q16 -10 16 -27zM1344 704q0 -139 -79 -253.5t-209 -164.5l280 502q8 -45 8 -84zM1792 576q0 -35 -20 -69q-39 -64 -109 -145q-150 -172 -347.5 -267t-419.5 -95l74 132q212 18 392.5 137t301.5 307q-115 179 -282 294l63 112q95 -64 182.5 -153t144.5 -184q20 -34 20 -69z " />
+<glyph unicode="&#xf071;" horiz-adv-x="1792" d="M1024 161v190q0 14 -9.5 23.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -23.5v-190q0 -14 9.5 -23.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 23.5zM1022 535l18 459q0 12 -10 19q-13 11 -24 11h-220q-11 0 -24 -11q-10 -7 -10 -21l17 -457q0 -10 10 -16.5t24 -6.5h185 q14 0 23.5 6.5t10.5 16.5zM1008 1469l768 -1408q35 -63 -2 -126q-17 -29 -46.5 -46t-63.5 -17h-1536q-34 0 -63.5 17t-46.5 46q-37 63 -2 126l768 1408q17 31 47 49t65 18t65 -18t47 -49z" />
+<glyph unicode="&#xf072;" horiz-adv-x="1408" d="M1376 1376q44 -52 12 -148t-108 -172l-161 -161l160 -696q5 -19 -12 -33l-128 -96q-7 -6 -19 -6q-4 0 -7 1q-15 3 -21 16l-279 508l-259 -259l53 -194q5 -17 -8 -31l-96 -96q-9 -9 -23 -9h-2q-15 2 -24 13l-189 252l-252 189q-11 7 -13 23q-1 13 9 25l96 97q9 9 23 9 q6 0 8 -1l194 -53l259 259l-508 279q-14 8 -17 24q-2 16 9 27l128 128q14 13 30 8l665 -159l160 160q76 76 172 108t148 -12z" />
+<glyph unicode="&#xf073;" horiz-adv-x="1664" d="M128 -128h288v288h-288v-288zM480 -128h320v288h-320v-288zM128 224h288v320h-288v-320zM480 224h320v320h-320v-320zM128 608h288v288h-288v-288zM864 -128h320v288h-320v-288zM480 608h320v288h-320v-288zM1248 -128h288v288h-288v-288zM864 224h320v320h-320v-320z M512 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1248 224h288v320h-288v-320zM864 608h320v288h-320v-288zM1248 608h288v288h-288v-288zM1280 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64 q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1664 1152v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47 h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf074;" horiz-adv-x="1792" d="M666 1055q-60 -92 -137 -273q-22 45 -37 72.5t-40.5 63.5t-51 56.5t-63 35t-81.5 14.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q250 0 410 -225zM1792 256q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192q-32 0 -85 -0.5t-81 -1t-73 1 t-71 5t-64 10.5t-63 18.5t-58 28.5t-59 40t-55 53.5t-56 69.5q59 93 136 273q22 -45 37 -72.5t40.5 -63.5t51 -56.5t63 -35t81.5 -14.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23zM1792 1152q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5 v192h-256q-48 0 -87 -15t-69 -45t-51 -61.5t-45 -77.5q-32 -62 -78 -171q-29 -66 -49.5 -111t-54 -105t-64 -100t-74 -83t-90 -68.5t-106.5 -42t-128 -16.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q48 0 87 15t69 45t51 61.5t45 77.5q32 62 78 171q29 66 49.5 111 t54 105t64 100t74 83t90 68.5t106.5 42t128 16.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z" />
+<glyph unicode="&#xf075;" horiz-adv-x="1792" d="M1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22q-17 -2 -30.5 9t-17.5 29v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281 q0 130 71 248.5t191 204.5t286 136.5t348 50.5q244 0 450 -85.5t326 -233t120 -321.5z" />
+<glyph unicode="&#xf076;" d="M1536 704v-128q0 -201 -98.5 -362t-274 -251.5t-395.5 -90.5t-395.5 90.5t-274 251.5t-98.5 362v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-128q0 -52 23.5 -90t53.5 -57t71 -30t64 -13t44 -2t44 2t64 13t71 30t53.5 57t23.5 90v128q0 26 19 45t45 19h384 q26 0 45 -19t19 -45zM512 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45zM1536 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf077;" horiz-adv-x="1792" d="M1683 205l-166 -165q-19 -19 -45 -19t-45 19l-531 531l-531 -531q-19 -19 -45 -19t-45 19l-166 165q-19 19 -19 45.5t19 45.5l742 741q19 19 45 19t45 -19l742 -741q19 -19 19 -45.5t-19 -45.5z" />
+<glyph unicode="&#xf078;" horiz-adv-x="1792" d="M1683 728l-742 -741q-19 -19 -45 -19t-45 19l-742 741q-19 19 -19 45.5t19 45.5l166 165q19 19 45 19t45 -19l531 -531l531 531q19 19 45 19t45 -19l166 -165q19 -19 19 -45.5t-19 -45.5z" />
+<glyph unicode="&#xf079;" horiz-adv-x="1920" d="M1280 32q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-8 0 -13.5 2t-9 7t-5.5 8t-3 11.5t-1 11.5v13v11v160v416h-192q-26 0 -45 19t-19 45q0 24 15 41l320 384q19 22 49 22t49 -22l320 -384q15 -17 15 -41q0 -26 -19 -45t-45 -19h-192v-384h576q16 0 25 -11l160 -192q7 -11 7 -21 zM1920 448q0 -24 -15 -41l-320 -384q-20 -23 -49 -23t-49 23l-320 384q-15 17 -15 41q0 26 19 45t45 19h192v384h-576q-16 0 -25 12l-160 192q-7 9 -7 20q0 13 9.5 22.5t22.5 9.5h960q8 0 13.5 -2t9 -7t5.5 -8t3 -11.5t1 -11.5v-13v-11v-160v-416h192q26 0 45 -19t19 -45z " />
+<glyph unicode="&#xf07a;" horiz-adv-x="1664" d="M640 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1536 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1664 1088v-512q0 -24 -16 -42.5t-41 -21.5 l-1044 -122q1 -7 4.5 -21.5t6 -26.5t2.5 -22q0 -16 -24 -64h920q26 0 45 -19t19 -45t-19 -45t-45 -19h-1024q-26 0 -45 19t-19 45q0 14 11 39.5t29.5 59.5t20.5 38l-177 823h-204q-26 0 -45 19t-19 45t19 45t45 19h256q16 0 28.5 -6.5t20 -15.5t13 -24.5t7.5 -26.5 t5.5 -29.5t4.5 -25.5h1201q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf07b;" horiz-adv-x="1664" d="M1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" />
+<glyph unicode="&#xf07c;" horiz-adv-x="1920" d="M1879 584q0 -31 -31 -66l-336 -396q-43 -51 -120.5 -86.5t-143.5 -35.5h-1088q-34 0 -60.5 13t-26.5 43q0 31 31 66l336 396q43 51 120.5 86.5t143.5 35.5h1088q34 0 60.5 -13t26.5 -43zM1536 928v-160h-832q-94 0 -197 -47.5t-164 -119.5l-337 -396l-5 -6q0 4 -0.5 12.5 t-0.5 12.5v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158z" />
+<glyph unicode="&#xf07d;" horiz-adv-x="768" d="M704 1216q0 -26 -19 -45t-45 -19h-128v-1024h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v1024h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45z" />
+<glyph unicode="&#xf07e;" horiz-adv-x="1792" d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-1024v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h1024v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" />
+<glyph unicode="&#xf080;" horiz-adv-x="2048" d="M640 640v-512h-256v512h256zM1024 1152v-1024h-256v1024h256zM2048 0v-128h-2048v1536h128v-1408h1920zM1408 896v-768h-256v768h256zM1792 1280v-1152h-256v1152h256z" />
+<glyph unicode="&#xf081;" d="M1280 926q-56 -25 -121 -34q68 40 93 117q-65 -38 -134 -51q-61 66 -153 66q-87 0 -148.5 -61.5t-61.5 -148.5q0 -29 5 -48q-129 7 -242 65t-192 155q-29 -50 -29 -106q0 -114 91 -175q-47 1 -100 26v-2q0 -75 50 -133.5t123 -72.5q-29 -8 -51 -8q-13 0 -39 4 q21 -63 74.5 -104t121.5 -42q-116 -90 -261 -90q-26 0 -50 3q148 -94 322 -94q112 0 210 35.5t168 95t120.5 137t75 162t24.5 168.5q0 18 -1 27q63 45 105 109zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5 t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf082;" d="M1536 160q0 -119 -84.5 -203.5t-203.5 -84.5h-192v608h203l30 224h-233v143q0 54 28 83t96 29l132 1v207q-96 9 -180 9q-136 0 -218 -80.5t-82 -225.5v-166h-224v-224h224v-608h-544q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960 q119 0 203.5 -84.5t84.5 -203.5v-960z" />
+<glyph unicode="&#xf083;" horiz-adv-x="1792" d="M928 704q0 14 -9 23t-23 9q-66 0 -113 -47t-47 -113q0 -14 9 -23t23 -9t23 9t9 23q0 40 28 68t68 28q14 0 23 9t9 23zM1152 574q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM128 0h1536v128h-1536v-128zM1280 574q0 159 -112.5 271.5 t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM256 1216h384v128h-384v-128zM128 1024h1536v118v138h-828l-64 -128h-644v-128zM1792 1280v-1280q0 -53 -37.5 -90.5t-90.5 -37.5h-1536q-53 0 -90.5 37.5t-37.5 90.5v1280 q0 53 37.5 90.5t90.5 37.5h1536q53 0 90.5 -37.5t37.5 -90.5z" />
+<glyph unicode="&#xf084;" horiz-adv-x="1792" d="M832 1024q0 80 -56 136t-136 56t-136 -56t-56 -136q0 -42 19 -83q-41 19 -83 19q-80 0 -136 -56t-56 -136t56 -136t136 -56t136 56t56 136q0 42 -19 83q41 -19 83 -19q80 0 136 56t56 136zM1683 320q0 -17 -49 -66t-66 -49q-9 0 -28.5 16t-36.5 33t-38.5 40t-24.5 26 l-96 -96l220 -220q28 -28 28 -68q0 -42 -39 -81t-81 -39q-40 0 -68 28l-671 671q-176 -131 -365 -131q-163 0 -265.5 102.5t-102.5 265.5q0 160 95 313t248 248t313 95q163 0 265.5 -102.5t102.5 -265.5q0 -189 -131 -365l355 -355l96 96q-3 3 -26 24.5t-40 38.5t-33 36.5 t-16 28.5q0 17 49 66t66 49q13 0 23 -10q6 -6 46 -44.5t82 -79.5t86.5 -86t73 -78t28.5 -41z" />
+<glyph unicode="&#xf085;" horiz-adv-x="1920" d="M896 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1664 128q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 1152q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5zM1280 731v-185q0 -10 -7 -19.5t-16 -10.5l-155 -24q-11 -35 -32 -76q34 -48 90 -115q7 -10 7 -20q0 -12 -7 -19q-23 -30 -82.5 -89.5t-78.5 -59.5q-11 0 -21 7l-115 90q-37 -19 -77 -31q-11 -108 -23 -155q-7 -24 -30 -24h-186q-11 0 -20 7.5t-10 17.5 l-23 153q-34 10 -75 31l-118 -89q-7 -7 -20 -7q-11 0 -21 8q-144 133 -144 160q0 9 7 19q10 14 41 53t47 61q-23 44 -35 82l-152 24q-10 1 -17 9.5t-7 19.5v185q0 10 7 19.5t16 10.5l155 24q11 35 32 76q-34 48 -90 115q-7 11 -7 20q0 12 7 20q22 30 82 89t79 59q11 0 21 -7 l115 -90q34 18 77 32q11 108 23 154q7 24 30 24h186q11 0 20 -7.5t10 -17.5l23 -153q34 -10 75 -31l118 89q8 7 20 7q11 0 21 -8q144 -133 144 -160q0 -9 -7 -19q-12 -16 -42 -54t-45 -60q23 -48 34 -82l152 -23q10 -2 17 -10.5t7 -19.5zM1920 198v-140q0 -16 -149 -31 q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20 t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31zM1920 1222v-140q0 -16 -149 -31q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68 q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70 q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31z" />
+<glyph unicode="&#xf086;" horiz-adv-x="1792" d="M1408 768q0 -139 -94 -257t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224 q0 139 94 257t256.5 186.5t353.5 68.5t353.5 -68.5t256.5 -186.5t94 -257zM1792 512q0 -120 -71 -224.5t-195 -176.5q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7 q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230z" />
+<glyph unicode="&#xf087;" d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 768q0 51 -39 89.5t-89 38.5h-352q0 58 48 159.5t48 160.5q0 98 -32 145t-128 47q-26 -26 -38 -85t-30.5 -125.5t-59.5 -109.5q-22 -23 -77 -91q-4 -5 -23 -30t-31.5 -41t-34.5 -42.5 t-40 -44t-38.5 -35.5t-40 -27t-35.5 -9h-32v-640h32q13 0 31.5 -3t33 -6.5t38 -11t35 -11.5t35.5 -12.5t29 -10.5q211 -73 342 -73h121q192 0 192 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5q32 1 53.5 47t21.5 81zM1536 769 q0 -89 -49 -163q9 -33 9 -69q0 -77 -38 -144q3 -21 3 -43q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5h-36h-93q-96 0 -189.5 22.5t-216.5 65.5q-116 40 -138 40h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h274q36 24 137 155q58 75 107 128 q24 25 35.5 85.5t30.5 126.5t62 108q39 37 90 37q84 0 151 -32.5t102 -101.5t35 -186q0 -93 -48 -192h176q104 0 180 -76t76 -179z" />
+<glyph unicode="&#xf088;" d="M256 1088q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 512q0 35 -21.5 81t-53.5 47q15 17 25 47.5t10 55.5q0 69 -53 119q18 32 18 69t-17.5 73.5t-47.5 52.5q5 30 5 56q0 85 -49 126t-136 41h-128q-131 0 -342 -73q-5 -2 -29 -10.5 t-35.5 -12.5t-35 -11.5t-38 -11t-33 -6.5t-31.5 -3h-32v-640h32q16 0 35.5 -9t40 -27t38.5 -35.5t40 -44t34.5 -42.5t31.5 -41t23 -30q55 -68 77 -91q41 -43 59.5 -109.5t30.5 -125.5t38 -85q96 0 128 47t32 145q0 59 -48 160.5t-48 159.5h352q50 0 89 38.5t39 89.5z M1536 511q0 -103 -76 -179t-180 -76h-176q48 -99 48 -192q0 -118 -35 -186q-35 -69 -102 -101.5t-151 -32.5q-51 0 -90 37q-34 33 -54 82t-25.5 90.5t-17.5 84.5t-31 64q-48 50 -107 127q-101 131 -137 155h-274q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5 h288q22 0 138 40q128 44 223 66t200 22h112q140 0 226.5 -79t85.5 -216v-5q60 -77 60 -178q0 -22 -3 -43q38 -67 38 -144q0 -36 -9 -69q49 -74 49 -163z" />
+<glyph unicode="&#xf089;" horiz-adv-x="896" d="M832 1504v-1339l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41z" />
+<glyph unicode="&#xf08a;" horiz-adv-x="1792" d="M1664 940q0 81 -21.5 143t-55 98.5t-81.5 59.5t-94 31t-98 8t-112 -25.5t-110.5 -64t-86.5 -72t-60 -61.5q-18 -22 -49 -22t-49 22q-24 28 -60 61.5t-86.5 72t-110.5 64t-112 25.5t-98 -8t-94 -31t-81.5 -59.5t-55 -98.5t-21.5 -143q0 -168 187 -355l581 -560l580 559 q188 188 188 356zM1792 940q0 -221 -229 -450l-623 -600q-18 -18 -44 -18t-44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5 q224 0 351 -124t127 -344z" />
+<glyph unicode="&#xf08b;" horiz-adv-x="1664" d="M640 96q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h320q13 0 22.5 -9.5t9.5 -22.5q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-66 0 -113 -47t-47 -113v-704 q0 -66 47 -113t113 -47h288h11h13t11.5 -1t11.5 -3t8 -5.5t7 -9t2 -13.5zM1568 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45z" />
+<glyph unicode="&#xf08c;" d="M237 122h231v694h-231v-694zM483 1030q-1 52 -36 86t-93 34t-94.5 -34t-36.5 -86q0 -51 35.5 -85.5t92.5 -34.5h1q59 0 95 34.5t36 85.5zM1068 122h231v398q0 154 -73 233t-193 79q-136 0 -209 -117h2v101h-231q3 -66 0 -694h231v388q0 38 7 56q15 35 45 59.5t74 24.5 q116 0 116 -157v-371zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf08d;" horiz-adv-x="1152" d="M480 672v448q0 14 -9 23t-23 9t-23 -9t-9 -23v-448q0 -14 9 -23t23 -9t23 9t9 23zM1152 320q0 -26 -19 -45t-45 -19h-429l-51 -483q-2 -12 -10.5 -20.5t-20.5 -8.5h-1q-27 0 -32 27l-76 485h-404q-26 0 -45 19t-19 45q0 123 78.5 221.5t177.5 98.5v512q-52 0 -90 38 t-38 90t38 90t90 38h640q52 0 90 -38t38 -90t-38 -90t-90 -38v-512q99 0 177.5 -98.5t78.5 -221.5z" />
+<glyph unicode="&#xf08e;" horiz-adv-x="1792" d="M1408 608v-320q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v320 q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1792 1472v-512q0 -26 -19 -45t-45 -19t-45 19l-176 176l-652 -652q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l652 652l-176 176q-19 19 -19 45t19 45t45 19h512q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf090;" d="M1184 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45zM1536 992v-704q0 -119 -84.5 -203.5t-203.5 -84.5h-320q-13 0 -22.5 9.5t-9.5 22.5 q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q66 0 113 47t47 113v704q0 66 -47 113t-113 47h-288h-11h-13t-11.5 1t-11.5 3t-8 5.5t-7 9t-2 13.5q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf091;" horiz-adv-x="1664" d="M458 653q-74 162 -74 371h-256v-96q0 -78 94.5 -162t235.5 -113zM1536 928v96h-256q0 -209 -74 -371q141 29 235.5 113t94.5 162zM1664 1056v-128q0 -71 -41.5 -143t-112 -130t-173 -97.5t-215.5 -44.5q-42 -54 -95 -95q-38 -34 -52.5 -72.5t-14.5 -89.5q0 -54 30.5 -91 t97.5 -37q75 0 133.5 -45.5t58.5 -114.5v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 69 58.5 114.5t133.5 45.5q67 0 97.5 37t30.5 91q0 51 -14.5 89.5t-52.5 72.5q-53 41 -95 95q-113 5 -215.5 44.5t-173 97.5t-112 130t-41.5 143v128q0 40 28 68t68 28h288v96 q0 66 47 113t113 47h576q66 0 113 -47t47 -113v-96h288q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf092;" d="M394 184q-8 -9 -20 3q-13 11 -4 19q8 9 20 -3q12 -11 4 -19zM352 245q9 -12 0 -19q-8 -6 -17 7t0 18q9 7 17 -6zM291 305q-5 -7 -13 -2q-10 5 -7 12q3 5 13 2q10 -5 7 -12zM322 271q-6 -7 -16 3q-9 11 -2 16q6 6 16 -3q9 -11 2 -16zM451 159q-4 -12 -19 -6q-17 4 -13 15 t19 7q16 -5 13 -16zM514 154q0 -11 -16 -11q-17 -2 -17 11q0 11 16 11q17 2 17 -11zM572 164q2 -10 -14 -14t-18 8t14 15q16 2 18 -9zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-224q-16 0 -24.5 1t-19.5 5t-16 14.5t-5 27.5v239q0 97 -52 142q57 6 102.5 18t94 39 t81 66.5t53 105t20.5 150.5q0 121 -79 206q37 91 -8 204q-28 9 -81 -11t-92 -44l-38 -24q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-86 13.5q-44 -113 -7 -204q-79 -85 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-40 -36 -49 -103 q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52t-49.5 24l-20 3q-21 0 -29 -4.5t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -103t0.5 -68q0 -22 -11 -33.5t-22 -13t-33 -1.5 h-224q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf093;" horiz-adv-x="1664" d="M1280 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 288v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h427q21 -56 70.5 -92 t110.5 -36h256q61 0 110.5 36t70.5 92h427q40 0 68 -28t28 -68zM1339 936q-17 -40 -59 -40h-256v-448q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v448h-256q-42 0 -59 40q-17 39 14 69l448 448q18 19 45 19t45 -19l448 -448q31 -30 14 -69z" />
+<glyph unicode="&#xf094;" d="M1407 710q0 44 -7 113.5t-18 96.5q-12 30 -17 44t-9 36.5t-4 48.5q0 23 5 68.5t5 67.5q0 37 -10 55q-4 1 -13 1q-19 0 -58 -4.5t-59 -4.5q-60 0 -176 24t-175 24q-43 0 -94.5 -11.5t-85 -23.5t-89.5 -34q-137 -54 -202 -103q-96 -73 -159.5 -189.5t-88 -236t-24.5 -248.5 q0 -40 12.5 -120t12.5 -121q0 -23 -11 -66.5t-11 -65.5t12 -36.5t34 -14.5q24 0 72.5 11t73.5 11q57 0 169.5 -15.5t169.5 -15.5q181 0 284 36q129 45 235.5 152.5t166 245.5t59.5 275zM1535 712q0 -165 -70 -327.5t-196 -288t-281 -180.5q-124 -44 -326 -44 q-57 0 -170 14.5t-169 14.5q-24 0 -72.5 -14.5t-73.5 -14.5q-73 0 -123.5 55.5t-50.5 128.5q0 24 11 68t11 67q0 40 -12.5 120.5t-12.5 121.5q0 111 18 217.5t54.5 209.5t100.5 194t150 156q78 59 232 120q194 78 316 78q60 0 175.5 -24t173.5 -24q19 0 57 5t58 5 q81 0 118 -50.5t37 -134.5q0 -23 -5 -68t-5 -68q0 -10 1 -18.5t3 -17t4 -13.5t6.5 -16t6.5 -17q16 -40 25 -118.5t9 -136.5z" />
+<glyph unicode="&#xf095;" horiz-adv-x="1408" d="M1408 296q0 -27 -10 -70.5t-21 -68.5q-21 -50 -122 -106q-94 -51 -186 -51q-27 0 -52.5 3.5t-57.5 12.5t-47.5 14.5t-55.5 20.5t-49 18q-98 35 -175 83q-128 79 -264.5 215.5t-215.5 264.5q-48 77 -83 175q-3 9 -18 49t-20.5 55.5t-14.5 47.5t-12.5 57.5t-3.5 52.5 q0 92 51 186q56 101 106 122q25 11 68.5 21t70.5 10q14 0 21 -3q18 -6 53 -76q11 -19 30 -54t35 -63.5t31 -53.5q3 -4 17.5 -25t21.5 -35.5t7 -28.5q0 -20 -28.5 -50t-62 -55t-62 -53t-28.5 -46q0 -9 5 -22.5t8.5 -20.5t14 -24t11.5 -19q76 -137 174 -235t235 -174 q2 -1 19 -11.5t24 -14t20.5 -8.5t22.5 -5q18 0 46 28.5t53 62t55 62t50 28.5q14 0 28.5 -7t35.5 -21.5t25 -17.5q25 -15 53.5 -31t63.5 -35t54 -30q70 -35 76 -53q3 -7 3 -21z" />
+<glyph unicode="&#xf096;" horiz-adv-x="1408" d="M1120 1280h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v832q0 66 -47 113t-113 47zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf097;" horiz-adv-x="1280" d="M1152 1280h-1024v-1242l423 406l89 85l89 -85l423 -406v1242zM1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289 q0 34 19.5 62t52.5 41q21 9 44 9h1048z" />
+<glyph unicode="&#xf098;" d="M1280 343q0 11 -2 16q-3 8 -38.5 29.5t-88.5 49.5l-53 29q-5 3 -19 13t-25 15t-21 5q-18 0 -47 -32.5t-57 -65.5t-44 -33q-7 0 -16.5 3.5t-15.5 6.5t-17 9.5t-14 8.5q-99 55 -170.5 126.5t-126.5 170.5q-2 3 -8.5 14t-9.5 17t-6.5 15.5t-3.5 16.5q0 13 20.5 33.5t45 38.5 t45 39.5t20.5 36.5q0 10 -5 21t-15 25t-13 19q-3 6 -15 28.5t-25 45.5t-26.5 47.5t-25 40.5t-16.5 18t-16 2q-48 0 -101 -22q-46 -21 -80 -94.5t-34 -130.5q0 -16 2.5 -34t5 -30.5t9 -33t10 -29.5t12.5 -33t11 -30q60 -164 216.5 -320.5t320.5 -216.5q6 -2 30 -11t33 -12.5 t29.5 -10t33 -9t30.5 -5t34 -2.5q57 0 130.5 34t94.5 80q22 53 22 101zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf099;" horiz-adv-x="1664" d="M1620 1128q-67 -98 -162 -167q1 -14 1 -42q0 -130 -38 -259.5t-115.5 -248.5t-184.5 -210.5t-258 -146t-323 -54.5q-271 0 -496 145q35 -4 78 -4q225 0 401 138q-105 2 -188 64.5t-114 159.5q33 -5 61 -5q43 0 85 11q-112 23 -185.5 111.5t-73.5 205.5v4q68 -38 146 -41 q-66 44 -105 115t-39 154q0 88 44 163q121 -149 294.5 -238.5t371.5 -99.5q-8 38 -8 74q0 134 94.5 228.5t228.5 94.5q140 0 236 -102q109 21 205 78q-37 -115 -142 -178q93 10 186 50z" />
+<glyph unicode="&#xf09a;" horiz-adv-x="1024" d="M959 1524v-264h-157q-86 0 -116 -36t-30 -108v-189h293l-39 -296h-254v-759h-306v759h-255v296h255v218q0 186 104 288.5t277 102.5q147 0 228 -12z" />
+<glyph unicode="&#xf09b;" d="M1536 640q0 -251 -146.5 -451.5t-378.5 -277.5q-27 -5 -39.5 7t-12.5 30v211q0 97 -52 142q57 6 102.5 18t94 39t81 66.5t53 105t20.5 150.5q0 121 -79 206q37 91 -8 204q-28 9 -81 -11t-92 -44l-38 -24q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-86 13.5 q-44 -113 -7 -204q-79 -85 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-40 -36 -49 -103q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52t-49.5 24l-20 3q-21 0 -29 -4.5t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23 q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -89t0.5 -54q0 -18 -13 -30t-40 -7q-232 77 -378.5 277.5t-146.5 451.5q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf09c;" horiz-adv-x="1664" d="M1664 960v-256q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45v256q0 106 -75 181t-181 75t-181 -75t-75 -181v-192h96q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h672v192q0 185 131.5 316.5t316.5 131.5 t316.5 -131.5t131.5 -316.5z" />
+<glyph unicode="&#xf09d;" horiz-adv-x="1920" d="M1760 1408q66 0 113 -47t47 -113v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600zM160 1280q-13 0 -22.5 -9.5t-9.5 -22.5v-224h1664v224q0 13 -9.5 22.5t-22.5 9.5h-1600zM1760 0q13 0 22.5 9.5t9.5 22.5v608h-1664v-608 q0 -13 9.5 -22.5t22.5 -9.5h1600zM256 128v128h256v-128h-256zM640 128v128h384v-128h-384z" />
+<glyph unicode="&#xf09e;" horiz-adv-x="1408" d="M384 192q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 69q2 -28 -17 -48q-18 -21 -47 -21h-135q-25 0 -43 16.5t-20 41.5q-22 229 -184.5 391.5t-391.5 184.5q-25 2 -41.5 20t-16.5 43v135q0 29 21 47q17 17 43 17h5q160 -13 306 -80.5 t259 -181.5q114 -113 181.5 -259t80.5 -306zM1408 67q2 -27 -18 -47q-18 -20 -46 -20h-143q-26 0 -44.5 17.5t-19.5 42.5q-12 215 -101 408.5t-231.5 336t-336 231.5t-408.5 102q-25 1 -42.5 19.5t-17.5 43.5v143q0 28 20 46q18 18 44 18h3q262 -13 501.5 -120t425.5 -294 q187 -186 294 -425.5t120 -501.5z" />
+<glyph unicode="&#xf0a0;" d="M1040 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1296 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1408 160v320q0 13 -9.5 22.5t-22.5 9.5 h-1216q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h1216q13 0 22.5 9.5t9.5 22.5zM178 640h1180l-157 482q-4 13 -16 21.5t-26 8.5h-782q-14 0 -26 -8.5t-16 -21.5zM1536 480v-320q0 -66 -47 -113t-113 -47h-1216q-66 0 -113 47t-47 113v320q0 25 16 75 l197 606q17 53 63 86t101 33h782q55 0 101 -33t63 -86l197 -606q16 -50 16 -75z" />
+<glyph unicode="&#xf0a1;" horiz-adv-x="1792" d="M1664 896q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5v-384q0 -52 -38 -90t-90 -38q-417 347 -812 380q-58 -19 -91 -66t-31 -100.5t40 -92.5q-20 -33 -23 -65.5t6 -58t33.5 -55t48 -50t61.5 -50.5q-29 -58 -111.5 -83t-168.5 -11.5t-132 55.5q-7 23 -29.5 87.5 t-32 94.5t-23 89t-15 101t3.5 98.5t22 110.5h-122q-66 0 -113 47t-47 113v192q0 66 47 113t113 47h480q435 0 896 384q52 0 90 -38t38 -90v-384zM1536 292v954q-394 -302 -768 -343v-270q377 -42 768 -341z" />
+<glyph unicode="&#xf0a2;" horiz-adv-x="1792" d="M912 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM246 128h1300q-266 300 -266 832q0 51 -24 105t-69 103t-121.5 80.5t-169.5 31.5t-169.5 -31.5t-121.5 -80.5t-69 -103t-24 -105q0 -532 -266 -832z M1728 128q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38t-38 90q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q190 -28 307 -158.5 t117 -282.5q0 -139 19.5 -260t50 -206t74.5 -158.5t85 -119.5t91 -88z" />
+<glyph unicode="&#xf0a3;" d="M1376 640l138 -135q30 -28 20 -70q-12 -41 -52 -51l-188 -48l53 -186q12 -41 -19 -70q-29 -31 -70 -19l-186 53l-48 -188q-10 -40 -51 -52q-12 -2 -19 -2q-31 0 -51 22l-135 138l-135 -138q-28 -30 -70 -20q-41 11 -51 52l-48 188l-186 -53q-41 -12 -70 19q-31 29 -19 70 l53 186l-188 48q-40 10 -52 51q-10 42 20 70l138 135l-138 135q-30 28 -20 70q12 41 52 51l188 48l-53 186q-12 41 19 70q29 31 70 19l186 -53l48 188q10 41 51 51q41 12 70 -19l135 -139l135 139q29 30 70 19q41 -10 51 -51l48 -188l186 53q41 12 70 -19q31 -29 19 -70 l-53 -186l188 -48q40 -10 52 -51q10 -42 -20 -70z" />
+<glyph unicode="&#xf0a4;" horiz-adv-x="1792" d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 768q0 51 -39 89.5t-89 38.5h-576q0 20 15 48.5t33 55t33 68t15 84.5q0 67 -44.5 97.5t-115.5 30.5q-24 0 -90 -139q-24 -44 -37 -65q-40 -64 -112 -145q-71 -81 -101 -106 q-69 -57 -140 -57h-32v-640h32q72 0 167 -32t193.5 -64t179.5 -32q189 0 189 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5h331q52 0 90 38t38 90zM1792 769q0 -105 -75.5 -181t-180.5 -76h-169q-4 -62 -37 -119q3 -21 3 -43 q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5q-133 0 -322 69q-164 59 -223 59h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h288q10 0 21.5 4.5t23.5 14t22.5 18t24 22.5t20.5 21.5t19 21.5t14 17q65 74 100 129q13 21 33 62t37 72t40.5 63t55 49.5 t69.5 17.5q125 0 206.5 -67t81.5 -189q0 -68 -22 -128h374q104 0 180 -76t76 -179z" />
+<glyph unicode="&#xf0a5;" horiz-adv-x="1792" d="M1376 128h32v640h-32q-35 0 -67.5 12t-62.5 37t-50 46t-49 54q-2 3 -3.5 4.5t-4 4.5t-4.5 5q-72 81 -112 145q-14 22 -38 68q-1 3 -10.5 22.5t-18.5 36t-20 35.5t-21.5 30.5t-18.5 11.5q-71 0 -115.5 -30.5t-44.5 -97.5q0 -43 15 -84.5t33 -68t33 -55t15 -48.5h-576 q-50 0 -89 -38.5t-39 -89.5q0 -52 38 -90t90 -38h331q-15 -17 -25 -47.5t-10 -55.5q0 -69 53 -119q-18 -32 -18 -69t17.5 -73.5t47.5 -52.5q-4 -24 -4 -56q0 -85 48.5 -126t135.5 -41q84 0 183 32t194 64t167 32zM1664 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45 t45 -19t45 19t19 45zM1792 768v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-288q-59 0 -223 -59q-190 -69 -317 -69q-142 0 -230 77.5t-87 217.5l1 5q-61 76 -61 178q0 22 3 43q-33 57 -37 119h-169q-105 0 -180.5 76t-75.5 181q0 103 76 179t180 76h374q-22 60 -22 128 q0 122 81.5 189t206.5 67q38 0 69.5 -17.5t55 -49.5t40.5 -63t37 -72t33 -62q35 -55 100 -129q2 -3 14 -17t19 -21.5t20.5 -21.5t24 -22.5t22.5 -18t23.5 -14t21.5 -4.5h288q53 0 90.5 -37.5t37.5 -90.5z" />
+<glyph unicode="&#xf0a6;" d="M1280 -64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 700q0 189 -167 189q-26 0 -56 -5q-16 30 -52.5 47.5t-73.5 17.5t-69 -18q-50 53 -119 53q-25 0 -55.5 -10t-47.5 -25v331q0 52 -38 90t-90 38q-51 0 -89.5 -39t-38.5 -89v-576 q-20 0 -48.5 15t-55 33t-68 33t-84.5 15q-67 0 -97.5 -44.5t-30.5 -115.5q0 -24 139 -90q44 -24 65 -37q64 -40 145 -112q81 -71 106 -101q57 -69 57 -140v-32h640v32q0 72 32 167t64 193.5t32 179.5zM1536 705q0 -133 -69 -322q-59 -164 -59 -223v-288q0 -53 -37.5 -90.5 t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5v288q0 10 -4.5 21.5t-14 23.5t-18 22.5t-22.5 24t-21.5 20.5t-21.5 19t-17 14q-74 65 -129 100q-21 13 -62 33t-72 37t-63 40.5t-49.5 55t-17.5 69.5q0 125 67 206.5t189 81.5q68 0 128 -22v374q0 104 76 180t179 76 q105 0 181 -75.5t76 -180.5v-169q62 -4 119 -37q21 3 43 3q101 0 178 -60q139 1 219.5 -85t80.5 -227z" />
+<glyph unicode="&#xf0a7;" d="M1408 576q0 84 -32 183t-64 194t-32 167v32h-640v-32q0 -35 -12 -67.5t-37 -62.5t-46 -50t-54 -49q-9 -8 -14 -12q-81 -72 -145 -112q-22 -14 -68 -38q-3 -1 -22.5 -10.5t-36 -18.5t-35.5 -20t-30.5 -21.5t-11.5 -18.5q0 -71 30.5 -115.5t97.5 -44.5q43 0 84.5 15t68 33 t55 33t48.5 15v-576q0 -50 38.5 -89t89.5 -39q52 0 90 38t38 90v331q46 -35 103 -35q69 0 119 53q32 -18 69 -18t73.5 17.5t52.5 47.5q24 -4 56 -4q85 0 126 48.5t41 135.5zM1280 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 580 q0 -142 -77.5 -230t-217.5 -87l-5 1q-76 -61 -178 -61q-22 0 -43 3q-54 -30 -119 -37v-169q0 -105 -76 -180.5t-181 -75.5q-103 0 -179 76t-76 180v374q-54 -22 -128 -22q-121 0 -188.5 81.5t-67.5 206.5q0 38 17.5 69.5t49.5 55t63 40.5t72 37t62 33q55 35 129 100 q3 2 17 14t21.5 19t21.5 20.5t22.5 24t18 22.5t14 23.5t4.5 21.5v288q0 53 37.5 90.5t90.5 37.5h640q53 0 90.5 -37.5t37.5 -90.5v-288q0 -59 59 -223q69 -190 69 -317z" />
+<glyph unicode="&#xf0a8;" d="M1280 576v128q0 26 -19 45t-45 19h-502l189 189q19 19 19 45t-19 45l-91 91q-18 18 -45 18t-45 -18l-362 -362l-91 -91q-18 -18 -18 -45t18 -45l91 -91l362 -362q18 -18 45 -18t45 18l91 91q18 18 18 45t-18 45l-189 189h502q26 0 45 19t19 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0a9;" d="M1285 640q0 27 -18 45l-91 91l-362 362q-18 18 -45 18t-45 -18l-91 -91q-18 -18 -18 -45t18 -45l189 -189h-502q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h502l-189 -189q-19 -19 -19 -45t19 -45l91 -91q18 -18 45 -18t45 18l362 362l91 91q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0aa;" d="M1284 641q0 27 -18 45l-362 362l-91 91q-18 18 -45 18t-45 -18l-91 -91l-362 -362q-18 -18 -18 -45t18 -45l91 -91q18 -18 45 -18t45 18l189 189v-502q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v502l189 -189q19 -19 45 -19t45 19l91 91q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0ab;" d="M1284 639q0 27 -18 45l-91 91q-18 18 -45 18t-45 -18l-189 -189v502q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-502l-189 189q-19 19 -45 19t-45 -19l-91 -91q-18 -18 -18 -45t18 -45l362 -362l91 -91q18 -18 45 -18t45 18l91 91l362 362q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0ac;" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1042 887q-2 -1 -9.5 -9.5t-13.5 -9.5q2 0 4.5 5t5 11t3.5 7q6 7 22 15q14 6 52 12q34 8 51 -11 q-2 2 9.5 13t14.5 12q3 2 15 4.5t15 7.5l2 22q-12 -1 -17.5 7t-6.5 21q0 -2 -6 -8q0 7 -4.5 8t-11.5 -1t-9 -1q-10 3 -15 7.5t-8 16.5t-4 15q-2 5 -9.5 10.5t-9.5 10.5q-1 2 -2.5 5.5t-3 6.5t-4 5.5t-5.5 2.5t-7 -5t-7.5 -10t-4.5 -5q-3 2 -6 1.5t-4.5 -1t-4.5 -3t-5 -3.5 q-3 -2 -8.5 -3t-8.5 -2q15 5 -1 11q-10 4 -16 3q9 4 7.5 12t-8.5 14h5q-1 4 -8.5 8.5t-17.5 8.5t-13 6q-8 5 -34 9.5t-33 0.5q-5 -6 -4.5 -10.5t4 -14t3.5 -12.5q1 -6 -5.5 -13t-6.5 -12q0 -7 14 -15.5t10 -21.5q-3 -8 -16 -16t-16 -12q-5 -8 -1.5 -18.5t10.5 -16.5 q2 -2 1.5 -4t-3.5 -4.5t-5.5 -4t-6.5 -3.5l-3 -2q-11 -5 -20.5 6t-13.5 26q-7 25 -16 30q-23 8 -29 -1q-5 13 -41 26q-25 9 -58 4q6 1 0 15q-7 15 -19 12q3 6 4 17.5t1 13.5q3 13 12 23q1 1 7 8.5t9.5 13.5t0.5 6q35 -4 50 11q5 5 11.5 17t10.5 17q9 6 14 5.5t14.5 -5.5 t14.5 -5q14 -1 15.5 11t-7.5 20q12 -1 3 17q-5 7 -8 9q-12 4 -27 -5q-8 -4 2 -8q-1 1 -9.5 -10.5t-16.5 -17.5t-16 5q-1 1 -5.5 13.5t-9.5 13.5q-8 0 -16 -15q3 8 -11 15t-24 8q19 12 -8 27q-7 4 -20.5 5t-19.5 -4q-5 -7 -5.5 -11.5t5 -8t10.5 -5.5t11.5 -4t8.5 -3 q14 -10 8 -14q-2 -1 -8.5 -3.5t-11.5 -4.5t-6 -4q-3 -4 0 -14t-2 -14q-5 5 -9 17.5t-7 16.5q7 -9 -25 -6l-10 1q-4 0 -16 -2t-20.5 -1t-13.5 8q-4 8 0 20q1 4 4 2q-4 3 -11 9.5t-10 8.5q-46 -15 -94 -41q6 -1 12 1q5 2 13 6.5t10 5.5q34 14 42 7l5 5q14 -16 20 -25 q-7 4 -30 1q-20 -6 -22 -12q7 -12 5 -18q-4 3 -11.5 10t-14.5 11t-15 5q-16 0 -22 -1q-146 -80 -235 -222q7 -7 12 -8q4 -1 5 -9t2.5 -11t11.5 3q9 -8 3 -19q1 1 44 -27q19 -17 21 -21q3 -11 -10 -18q-1 2 -9 9t-9 4q-3 -5 0.5 -18.5t10.5 -12.5q-7 0 -9.5 -16t-2.5 -35.5 t-1 -23.5l2 -1q-3 -12 5.5 -34.5t21.5 -19.5q-13 -3 20 -43q6 -8 8 -9q3 -2 12 -7.5t15 -10t10 -10.5q4 -5 10 -22.5t14 -23.5q-2 -6 9.5 -20t10.5 -23q-1 0 -2.5 -1t-2.5 -1q3 -7 15.5 -14t15.5 -13q1 -3 2 -10t3 -11t8 -2q2 20 -24 62q-15 25 -17 29q-3 5 -5.5 15.5 t-4.5 14.5q2 0 6 -1.5t8.5 -3.5t7.5 -4t2 -3q-3 -7 2 -17.5t12 -18.5t17 -19t12 -13q6 -6 14 -19.5t0 -13.5q9 0 20 -10t17 -20q5 -8 8 -26t5 -24q2 -7 8.5 -13.5t12.5 -9.5l16 -8t13 -7q5 -2 18.5 -10.5t21.5 -11.5q10 -4 16 -4t14.5 2.5t13.5 3.5q15 2 29 -15t21 -21 q36 -19 55 -11q-2 -1 0.5 -7.5t8 -15.5t9 -14.5t5.5 -8.5q5 -6 18 -15t18 -15q6 4 7 9q-3 -8 7 -20t18 -10q14 3 14 32q-31 -15 -49 18q0 1 -2.5 5.5t-4 8.5t-2.5 8.5t0 7.5t5 3q9 0 10 3.5t-2 12.5t-4 13q-1 8 -11 20t-12 15q-5 -9 -16 -8t-16 9q0 -1 -1.5 -5.5t-1.5 -6.5 q-13 0 -15 1q1 3 2.5 17.5t3.5 22.5q1 4 5.5 12t7.5 14.5t4 12.5t-4.5 9.5t-17.5 2.5q-19 -1 -26 -20q-1 -3 -3 -10.5t-5 -11.5t-9 -7q-7 -3 -24 -2t-24 5q-13 8 -22.5 29t-9.5 37q0 10 2.5 26.5t3 25t-5.5 24.5q3 2 9 9.5t10 10.5q2 1 4.5 1.5t4.5 0t4 1.5t3 6q-1 1 -4 3 q-3 3 -4 3q7 -3 28.5 1.5t27.5 -1.5q15 -11 22 2q0 1 -2.5 9.5t-0.5 13.5q5 -27 29 -9q3 -3 15.5 -5t17.5 -5q3 -2 7 -5.5t5.5 -4.5t5 0.5t8.5 6.5q10 -14 12 -24q11 -40 19 -44q7 -3 11 -2t4.5 9.5t0 14t-1.5 12.5l-1 8v18l-1 8q-15 3 -18.5 12t1.5 18.5t15 18.5q1 1 8 3.5 t15.5 6.5t12.5 8q21 19 15 35q7 0 11 9q-1 0 -5 3t-7.5 5t-4.5 2q9 5 2 16q5 3 7.5 11t7.5 10q9 -12 21 -2q7 8 1 16q5 7 20.5 10.5t18.5 9.5q7 -2 8 2t1 12t3 12q4 5 15 9t13 5l17 11q3 4 0 4q18 -2 31 11q10 11 -6 20q3 6 -3 9.5t-15 5.5q3 1 11.5 0.5t10.5 1.5 q15 10 -7 16q-17 5 -43 -12zM879 10q206 36 351 189q-3 3 -12.5 4.5t-12.5 3.5q-18 7 -24 8q1 7 -2.5 13t-8 9t-12.5 8t-11 7q-2 2 -7 6t-7 5.5t-7.5 4.5t-8.5 2t-10 -1l-3 -1q-3 -1 -5.5 -2.5t-5.5 -3t-4 -3t0 -2.5q-21 17 -36 22q-5 1 -11 5.5t-10.5 7t-10 1.5t-11.5 -7 q-5 -5 -6 -15t-2 -13q-7 5 0 17.5t2 18.5q-3 6 -10.5 4.5t-12 -4.5t-11.5 -8.5t-9 -6.5t-8.5 -5.5t-8.5 -7.5q-3 -4 -6 -12t-5 -11q-2 4 -11.5 6.5t-9.5 5.5q2 -10 4 -35t5 -38q7 -31 -12 -48q-27 -25 -29 -40q-4 -22 12 -26q0 -7 -8 -20.5t-7 -21.5q0 -6 2 -16z" />
+<glyph unicode="&#xf0ad;" horiz-adv-x="1664" d="M384 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1028 484l-682 -682q-37 -37 -90 -37q-52 0 -91 37l-106 108q-38 36 -38 90q0 53 38 91l681 681q39 -98 114.5 -173.5t173.5 -114.5zM1662 919q0 -39 -23 -106q-47 -134 -164.5 -217.5 t-258.5 -83.5q-185 0 -316.5 131.5t-131.5 316.5t131.5 316.5t316.5 131.5q58 0 121.5 -16.5t107.5 -46.5q16 -11 16 -28t-16 -28l-293 -169v-224l193 -107q5 3 79 48.5t135.5 81t70.5 35.5q15 0 23.5 -10t8.5 -25z" />
+<glyph unicode="&#xf0ae;" horiz-adv-x="1792" d="M1024 128h640v128h-640v-128zM640 640h1024v128h-1024v-128zM1280 1152h384v128h-384v-128zM1792 320v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 832v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19 t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 1344v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0b0;" horiz-adv-x="1408" d="M1403 1241q17 -41 -14 -70l-493 -493v-742q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-256 256q-19 19 -19 45v486l-493 493q-31 29 -14 70q17 39 59 39h1280q42 0 59 -39z" />
+<glyph unicode="&#xf0b1;" horiz-adv-x="1792" d="M640 1280h512v128h-512v-128zM1792 640v-480q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v480h672v-160q0 -26 19 -45t45 -19h320q26 0 45 19t19 45v160h672zM1024 640v-128h-256v128h256zM1792 1120v-384h-1792v384q0 66 47 113t113 47h352v160q0 40 28 68 t68 28h576q40 0 68 -28t28 -68v-160h352q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf0b2;" d="M1283 995l-355 -355l355 -355l144 144q29 31 70 14q39 -17 39 -59v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l144 144l-355 355l-355 -355l144 -144q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l144 -144 l355 355l-355 355l-144 -144q-19 -19 -45 -19q-12 0 -24 5q-40 17 -40 59v448q0 26 19 45t45 19h448q42 0 59 -40q17 -39 -14 -69l-144 -144l355 -355l355 355l-144 144q-31 30 -14 69q17 40 59 40h448q26 0 45 -19t19 -45v-448q0 -42 -39 -59q-13 -5 -25 -5q-26 0 -45 19z " />
+<glyph unicode="&#xf0c0;" horiz-adv-x="1920" d="M593 640q-162 -5 -265 -128h-134q-82 0 -138 40.5t-56 118.5q0 353 124 353q6 0 43.5 -21t97.5 -42.5t119 -21.5q67 0 133 23q-5 -37 -5 -66q0 -139 81 -256zM1664 3q0 -120 -73 -189.5t-194 -69.5h-874q-121 0 -194 69.5t-73 189.5q0 53 3.5 103.5t14 109t26.5 108.5 t43 97.5t62 81t85.5 53.5t111.5 20q10 0 43 -21.5t73 -48t107 -48t135 -21.5t135 21.5t107 48t73 48t43 21.5q61 0 111.5 -20t85.5 -53.5t62 -81t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5zM640 1280q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75 t75 -181zM1344 896q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5zM1920 671q0 -78 -56 -118.5t-138 -40.5h-134q-103 123 -265 128q81 117 81 256q0 29 -5 66q66 -23 133 -23q59 0 119 21.5t97.5 42.5 t43.5 21q124 0 124 -353zM1792 1280q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181z" />
+<glyph unicode="&#xf0c1;" horiz-adv-x="1664" d="M1456 320q0 40 -28 68l-208 208q-28 28 -68 28q-42 0 -72 -32q3 -3 19 -18.5t21.5 -21.5t15 -19t13 -25.5t3.5 -27.5q0 -40 -28 -68t-68 -28q-15 0 -27.5 3.5t-25.5 13t-19 15t-21.5 21.5t-18.5 19q-33 -31 -33 -73q0 -40 28 -68l206 -207q27 -27 68 -27q40 0 68 26 l147 146q28 28 28 67zM753 1025q0 40 -28 68l-206 207q-28 28 -68 28q-39 0 -68 -27l-147 -146q-28 -28 -28 -67q0 -40 28 -68l208 -208q27 -27 68 -27q42 0 72 31q-3 3 -19 18.5t-21.5 21.5t-15 19t-13 25.5t-3.5 27.5q0 40 28 68t68 28q15 0 27.5 -3.5t25.5 -13t19 -15 t21.5 -21.5t18.5 -19q33 31 33 73zM1648 320q0 -120 -85 -203l-147 -146q-83 -83 -203 -83q-121 0 -204 85l-206 207q-83 83 -83 203q0 123 88 209l-88 88q-86 -88 -208 -88q-120 0 -204 84l-208 208q-84 84 -84 204t85 203l147 146q83 83 203 83q121 0 204 -85l206 -207 q83 -83 83 -203q0 -123 -88 -209l88 -88q86 88 208 88q120 0 204 -84l208 -208q84 -84 84 -204z" />
+<glyph unicode="&#xf0c2;" horiz-adv-x="1920" d="M1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088q-185 0 -316.5 131.5t-131.5 316.5q0 132 71 241.5t187 163.5q-2 28 -2 43q0 212 150 362t362 150q158 0 286.5 -88t187.5 -230q70 62 166 62q106 0 181 -75t75 -181q0 -75 -41 -138q129 -30 213 -134.5t84 -239.5z " />
+<glyph unicode="&#xf0c3;" horiz-adv-x="1664" d="M1527 88q56 -89 21.5 -152.5t-140.5 -63.5h-1152q-106 0 -140.5 63.5t21.5 152.5l503 793v399h-64q-26 0 -45 19t-19 45t19 45t45 19h512q26 0 45 -19t19 -45t-19 -45t-45 -19h-64v-399zM748 813l-272 -429h712l-272 429l-20 31v37v399h-128v-399v-37z" />
+<glyph unicode="&#xf0c4;" horiz-adv-x="1792" d="M960 640q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1260 576l507 -398q28 -20 25 -56q-5 -35 -35 -51l-128 -64q-13 -7 -29 -7q-17 0 -31 8l-690 387l-110 -66q-8 -4 -12 -5q14 -49 10 -97q-7 -77 -56 -147.5t-132 -123.5q-132 -84 -277 -84 q-136 0 -222 78q-90 84 -79 207q7 76 56 147t131 124q132 84 278 84q83 0 151 -31q9 13 22 22l122 73l-122 73q-13 9 -22 22q-68 -31 -151 -31q-146 0 -278 84q-82 53 -131 124t-56 147q-5 59 15.5 113t63.5 93q85 79 222 79q145 0 277 -84q83 -52 132 -123t56 -148 q4 -48 -10 -97q4 -1 12 -5l110 -66l690 387q14 8 31 8q16 0 29 -7l128 -64q30 -16 35 -51q3 -36 -25 -56zM579 836q46 42 21 108t-106 117q-92 59 -192 59q-74 0 -113 -36q-46 -42 -21 -108t106 -117q92 -59 192 -59q74 0 113 36zM494 91q81 51 106 117t-21 108 q-39 36 -113 36q-100 0 -192 -59q-81 -51 -106 -117t21 -108q39 -36 113 -36q100 0 192 59zM672 704l96 -58v11q0 36 33 56l14 8l-79 47l-26 -26q-3 -3 -10 -11t-12 -12q-2 -2 -4 -3.5t-3 -2.5zM896 480l96 -32l736 576l-128 64l-768 -431v-113l-160 -96l9 -8q2 -2 7 -6 q4 -4 11 -12t11 -12l26 -26zM1600 64l128 64l-520 408l-177 -138q-2 -3 -13 -7z" />
+<glyph unicode="&#xf0c5;" horiz-adv-x="1792" d="M1696 1152q40 0 68 -28t28 -68v-1216q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v288h-544q-40 0 -68 28t-28 68v672q0 40 20 88t48 76l408 408q28 28 76 48t88 20h416q40 0 68 -28t28 -68v-328q68 40 128 40h416zM1152 939l-299 -299h299v299zM512 1323l-299 -299 h299v299zM708 676l316 316v416h-384v-416q0 -40 -28 -68t-68 -28h-416v-640h512v256q0 40 20 88t48 76zM1664 -128v1152h-384v-416q0 -40 -28 -68t-68 -28h-416v-640h896z" />
+<glyph unicode="&#xf0c6;" horiz-adv-x="1408" d="M1404 151q0 -117 -79 -196t-196 -79q-135 0 -235 100l-777 776q-113 115 -113 271q0 159 110 270t269 111q158 0 273 -113l605 -606q10 -10 10 -22q0 -16 -30.5 -46.5t-46.5 -30.5q-13 0 -23 10l-606 607q-79 77 -181 77q-106 0 -179 -75t-73 -181q0 -105 76 -181 l776 -777q63 -63 145 -63q64 0 106 42t42 106q0 82 -63 145l-581 581q-26 24 -60 24q-29 0 -48 -19t-19 -48q0 -32 25 -59l410 -410q10 -10 10 -22q0 -16 -31 -47t-47 -31q-12 0 -22 10l-410 410q-63 61 -63 149q0 82 57 139t139 57q88 0 149 -63l581 -581q100 -98 100 -235 z" />
+<glyph unicode="&#xf0c7;" d="M384 0h768v384h-768v-384zM1280 0h128v896q0 14 -10 38.5t-20 34.5l-281 281q-10 10 -34 20t-39 10v-416q0 -40 -28 -68t-68 -28h-576q-40 0 -68 28t-28 68v416h-128v-1280h128v416q0 40 28 68t68 28h832q40 0 68 -28t28 -68v-416zM896 928v320q0 13 -9.5 22.5t-22.5 9.5 h-192q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 22.5zM1536 896v-928q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h928q40 0 88 -20t76 -48l280 -280q28 -28 48 -76t20 -88z" />
+<glyph unicode="&#xf0c8;" d="M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf0c9;" d="M1536 192v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 704v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 1216v-128q0 -26 -19 -45 t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0ca;" horiz-adv-x="1792" d="M384 128q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM384 640q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5 t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5zM384 1152q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1792 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z M1792 1248v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf0cb;" horiz-adv-x="1792" d="M381 -84q0 -80 -54.5 -126t-135.5 -46q-106 0 -172 66l57 88q49 -45 106 -45q29 0 50.5 14.5t21.5 42.5q0 64 -105 56l-26 56q8 10 32.5 43.5t42.5 54t37 38.5v1q-16 0 -48.5 -1t-48.5 -1v-53h-106v152h333v-88l-95 -115q51 -12 81 -49t30 -88zM383 543v-159h-362 q-6 36 -6 54q0 51 23.5 93t56.5 68t66 47.5t56.5 43.5t23.5 45q0 25 -14.5 38.5t-39.5 13.5q-46 0 -81 -58l-85 59q24 51 71.5 79.5t105.5 28.5q73 0 123 -41.5t50 -112.5q0 -50 -34 -91.5t-75 -64.5t-75.5 -50.5t-35.5 -52.5h127v60h105zM1792 224v-192q0 -13 -9.5 -22.5 t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 14 9 23t23 9h1216q13 0 22.5 -9.5t9.5 -22.5zM384 1123v-99h-335v99h107q0 41 0.5 122t0.5 121v12h-2q-8 -17 -50 -54l-71 76l136 127h106v-404h108zM1792 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5 t-9.5 22.5v192q0 14 9 23t23 9h1216q13 0 22.5 -9.5t9.5 -22.5zM1792 1248v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf0cc;" horiz-adv-x="1792" d="M1760 640q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1728q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h1728zM483 704q-28 35 -51 80q-48 97 -48 188q0 181 134 309q133 127 393 127q50 0 167 -19q66 -12 177 -48q10 -38 21 -118q14 -123 14 -183q0 -18 -5 -45l-12 -3l-84 6 l-14 2q-50 149 -103 205q-88 91 -210 91q-114 0 -182 -59q-67 -58 -67 -146q0 -73 66 -140t279 -129q69 -20 173 -66q58 -28 95 -52h-743zM990 448h411q7 -39 7 -92q0 -111 -41 -212q-23 -55 -71 -104q-37 -35 -109 -81q-80 -48 -153 -66q-80 -21 -203 -21q-114 0 -195 23 l-140 40q-57 16 -72 28q-8 8 -8 22v13q0 108 -2 156q-1 30 0 68l2 37v44l102 2q15 -34 30 -71t22.5 -56t12.5 -27q35 -57 80 -94q43 -36 105 -57q59 -22 132 -22q64 0 139 27q77 26 122 86q47 61 47 129q0 84 -81 157q-34 29 -137 71z" />
+<glyph unicode="&#xf0cd;" d="M48 1313q-37 2 -45 4l-3 88q13 1 40 1q60 0 112 -4q132 -7 166 -7q86 0 168 3q116 4 146 5q56 0 86 2l-1 -14l2 -64v-9q-60 -9 -124 -9q-60 0 -79 -25q-13 -14 -13 -132q0 -13 0.5 -32.5t0.5 -25.5l1 -229l14 -280q6 -124 51 -202q35 -59 96 -92q88 -47 177 -47 q104 0 191 28q56 18 99 51q48 36 65 64q36 56 53 114q21 73 21 229q0 79 -3.5 128t-11 122.5t-13.5 159.5l-4 59q-5 67 -24 88q-34 35 -77 34l-100 -2l-14 3l2 86h84l205 -10q76 -3 196 10l18 -2q6 -38 6 -51q0 -7 -4 -31q-45 -12 -84 -13q-73 -11 -79 -17q-15 -15 -15 -41 q0 -7 1.5 -27t1.5 -31q8 -19 22 -396q6 -195 -15 -304q-15 -76 -41 -122q-38 -65 -112 -123q-75 -57 -182 -89q-109 -33 -255 -33q-167 0 -284 46q-119 47 -179 122q-61 76 -83 195q-16 80 -16 237v333q0 188 -17 213q-25 36 -147 39zM1536 -96v64q0 14 -9 23t-23 9h-1472 q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h1472q14 0 23 9t9 23z" />
+<glyph unicode="&#xf0ce;" horiz-adv-x="1664" d="M512 160v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM512 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 160v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23 v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM512 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 160v192 q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192 q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1664 1248v-1088q0 -66 -47 -113t-113 -47h-1344q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1344q66 0 113 -47t47 -113 z" />
+<glyph unicode="&#xf0d0;" horiz-adv-x="1664" d="M1190 955l293 293l-107 107l-293 -293zM1637 1248q0 -27 -18 -45l-1286 -1286q-18 -18 -45 -18t-45 18l-198 198q-18 18 -18 45t18 45l1286 1286q18 18 45 18t45 -18l198 -198q18 -18 18 -45zM286 1438l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98zM636 1276 l196 -60l-196 -60l-60 -196l-60 196l-196 60l196 60l60 196zM1566 798l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98zM926 1438l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98z" />
+<glyph unicode="&#xf0d1;" horiz-adv-x="1792" d="M640 128q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM256 640h384v256h-158q-13 0 -22 -9l-195 -195q-9 -9 -9 -22v-30zM1536 128q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM1792 1216v-1024q0 -15 -4 -26.5t-13.5 -18.5 t-16.5 -11.5t-23.5 -6t-22.5 -2t-25.5 0t-22.5 0.5q0 -106 -75 -181t-181 -75t-181 75t-75 181h-384q0 -106 -75 -181t-181 -75t-181 75t-75 181h-64q-3 0 -22.5 -0.5t-25.5 0t-22.5 2t-23.5 6t-16.5 11.5t-13.5 18.5t-4 26.5q0 26 19 45t45 19v320q0 8 -0.5 35t0 38 t2.5 34.5t6.5 37t14 30.5t22.5 30l198 198q19 19 50.5 32t58.5 13h160v192q0 26 19 45t45 19h1024q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0d2;" d="M1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103q-111 0 -218 32q59 93 78 164q9 34 54 211q20 -39 73 -67.5t114 -28.5q121 0 216 68.5t147 188.5t52 270q0 114 -59.5 214t-172.5 163t-255 63q-105 0 -196 -29t-154.5 -77t-109 -110.5t-67 -129.5t-21.5 -134 q0 -104 40 -183t117 -111q30 -12 38 20q2 7 8 31t8 30q6 23 -11 43q-51 61 -51 151q0 151 104.5 259.5t273.5 108.5q151 0 235.5 -82t84.5 -213q0 -170 -68.5 -289t-175.5 -119q-61 0 -98 43.5t-23 104.5q8 35 26.5 93.5t30 103t11.5 75.5q0 50 -27 83t-77 33 q-62 0 -105 -57t-43 -142q0 -73 25 -122l-99 -418q-17 -70 -13 -177q-206 91 -333 281t-127 423q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0d3;" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-725q85 122 108 210q9 34 53 209q21 -39 73.5 -67t112.5 -28q181 0 295.5 147.5t114.5 373.5q0 84 -35 162.5t-96.5 139t-152.5 97t-197 36.5q-104 0 -194.5 -28.5t-153 -76.5 t-107.5 -109.5t-66.5 -128t-21.5 -132.5q0 -102 39.5 -180t116.5 -110q13 -5 23.5 0t14.5 19q10 44 15 61q6 23 -11 42q-50 62 -50 150q0 150 103.5 256.5t270.5 106.5q149 0 232.5 -81t83.5 -210q0 -168 -67.5 -286t-173.5 -118q-60 0 -97 43.5t-23 103.5q8 34 26.5 92.5 t29.5 102t11 74.5q0 49 -26.5 81.5t-75.5 32.5q-61 0 -103.5 -56.5t-42.5 -139.5q0 -72 24 -121l-98 -414q-24 -100 -7 -254h-183q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960z" />
+<glyph unicode="&#xf0d4;" d="M829 318q0 -76 -58.5 -112.5t-139.5 -36.5q-41 0 -80.5 9.5t-75.5 28.5t-58 53t-22 78q0 46 25 80t65.5 51.5t82 25t84.5 7.5q20 0 31 -2q2 -1 23 -16.5t26 -19t23 -18t24.5 -22t19 -22.5t17 -26t9 -26.5t4.5 -31.5zM755 863q0 -60 -33 -99.5t-92 -39.5q-53 0 -93 42.5 t-57.5 96.5t-17.5 106q0 61 32 104t92 43q53 0 93.5 -45t58 -101t17.5 -107zM861 1120l88 64h-265q-85 0 -161 -32t-127.5 -98t-51.5 -153q0 -93 64.5 -154.5t158.5 -61.5q22 0 43 3q-13 -29 -13 -54q0 -44 40 -94q-175 -12 -257 -63q-47 -29 -75.5 -73t-28.5 -95 q0 -43 18.5 -77.5t48.5 -56.5t69 -37t77.5 -21t76.5 -6q60 0 120.5 15.5t113.5 46t86 82.5t33 117q0 49 -20 89.5t-49 66.5t-58 47.5t-49 44t-20 44.5t15.5 42.5t37.5 39.5t44 42t37.5 59.5t15.5 82.5q0 60 -22.5 99.5t-72.5 90.5h83zM1152 672h128v64h-128v128h-64v-128 h-128v-64h128v-160h64v160zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf0d5;" horiz-adv-x="1664" d="M735 740q0 -36 32 -70.5t77.5 -68t90.5 -73.5t77 -104t32 -142q0 -90 -48 -173q-72 -122 -211 -179.5t-298 -57.5q-132 0 -246.5 41.5t-171.5 137.5q-37 60 -37 131q0 81 44.5 150t118.5 115q131 82 404 100q-32 42 -47.5 74t-15.5 73q0 36 21 85q-46 -4 -68 -4 q-148 0 -249.5 96.5t-101.5 244.5q0 82 36 159t99 131q77 66 182.5 98t217.5 32h418l-138 -88h-131q74 -63 112 -133t38 -160q0 -72 -24.5 -129.5t-59 -93t-69.5 -65t-59.5 -61.5t-24.5 -66zM589 836q38 0 78 16.5t66 43.5q53 57 53 159q0 58 -17 125t-48.5 129.5 t-84.5 103.5t-117 41q-42 0 -82.5 -19.5t-65.5 -52.5q-47 -59 -47 -160q0 -46 10 -97.5t31.5 -103t52 -92.5t75 -67t96.5 -26zM591 -37q58 0 111.5 13t99 39t73 73t27.5 109q0 25 -7 49t-14.5 42t-27 41.5t-29.5 35t-38.5 34.5t-36.5 29t-41.5 30t-36.5 26q-16 2 -48 2 q-53 0 -105 -7t-107.5 -25t-97 -46t-68.5 -74.5t-27 -105.5q0 -70 35 -123.5t91.5 -83t119 -44t127.5 -14.5zM1401 839h213v-108h-213v-219h-105v219h-212v108h212v217h105v-217z" />
+<glyph unicode="&#xf0d6;" horiz-adv-x="1920" d="M768 384h384v96h-128v448h-114l-148 -137l77 -80q42 37 55 57h2v-288h-128v-96zM1280 640q0 -70 -21 -142t-59.5 -134t-101.5 -101t-138 -39t-138 39t-101.5 101t-59.5 134t-21 142t21 142t59.5 134t101.5 101t138 39t138 -39t101.5 -101t59.5 -134t21 -142zM1792 384 v512q-106 0 -181 75t-75 181h-1152q0 -106 -75 -181t-181 -75v-512q106 0 181 -75t75 -181h1152q0 106 75 181t181 75zM1920 1216v-1152q0 -26 -19 -45t-45 -19h-1792q-26 0 -45 19t-19 45v1152q0 26 19 45t45 19h1792q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0d7;" horiz-adv-x="1024" d="M1024 832q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0d8;" horiz-adv-x="1024" d="M1024 320q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
+<glyph unicode="&#xf0d9;" horiz-adv-x="640" d="M640 1088v-896q0 -26 -19 -45t-45 -19t-45 19l-448 448q-19 19 -19 45t19 45l448 448q19 19 45 19t45 -19t19 -45z" />
+<glyph unicode="&#xf0da;" horiz-adv-x="640" d="M576 640q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19t-19 45v896q0 26 19 45t45 19t45 -19l448 -448q19 -19 19 -45z" />
+<glyph unicode="&#xf0db;" horiz-adv-x="1664" d="M160 0h608v1152h-640v-1120q0 -13 9.5 -22.5t22.5 -9.5zM1536 32v1120h-640v-1152h608q13 0 22.5 9.5t9.5 22.5zM1664 1248v-1216q0 -66 -47 -113t-113 -47h-1344q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1344q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf0dc;" horiz-adv-x="1024" d="M1024 448q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45zM1024 832q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
+<glyph unicode="&#xf0dd;" horiz-adv-x="1024" d="M1024 448q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0de;" horiz-adv-x="1024" d="M1024 832q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
+<glyph unicode="&#xf0e0;" horiz-adv-x="1792" d="M1792 826v-794q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v794q44 -49 101 -87q362 -246 497 -345q57 -42 92.5 -65.5t94.5 -48t110 -24.5h1h1q51 0 110 24.5t94.5 48t92.5 65.5q170 123 498 345q57 39 100 87zM1792 1120q0 -79 -49 -151t-122 -123 q-376 -261 -468 -325q-10 -7 -42.5 -30.5t-54 -38t-52 -32.5t-57.5 -27t-50 -9h-1h-1q-23 0 -50 9t-57.5 27t-52 32.5t-54 38t-42.5 30.5q-91 64 -262 182.5t-205 142.5q-62 42 -117 115.5t-55 136.5q0 78 41.5 130t118.5 52h1472q65 0 112.5 -47t47.5 -113z" />
+<glyph unicode="&#xf0e1;" d="M349 911v-991h-330v991h330zM370 1217q1 -73 -50.5 -122t-135.5 -49h-2q-82 0 -132 49t-50 122q0 74 51.5 122.5t134.5 48.5t133 -48.5t51 -122.5zM1536 488v-568h-329v530q0 105 -40.5 164.5t-126.5 59.5q-63 0 -105.5 -34.5t-63.5 -85.5q-11 -30 -11 -81v-553h-329 q2 399 2 647t-1 296l-1 48h329v-144h-2q20 32 41 56t56.5 52t87 43.5t114.5 15.5q171 0 275 -113.5t104 -332.5z" />
+<glyph unicode="&#xf0e2;" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61q-172 0 -327 72.5t-264 204.5q-7 10 -6.5 22.5t8.5 20.5l137 138q10 9 25 9q16 -2 23 -12q73 -95 179 -147t225 -52q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5 t-163.5 109.5t-198.5 40.5q-98 0 -188 -35.5t-160 -101.5l137 -138q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l130 -129q107 101 244.5 156.5t284.5 55.5q156 0 298 -61t245 -164t164 -245t61 -298z" />
+<glyph unicode="&#xf0e3;" horiz-adv-x="1792" d="M1771 0q0 -53 -37 -90l-107 -108q-39 -37 -91 -37q-53 0 -90 37l-363 364q-38 36 -38 90q0 53 43 96l-256 256l-126 -126q-14 -14 -34 -14t-34 14q2 -2 12.5 -12t12.5 -13t10 -11.5t10 -13.5t6 -13.5t5.5 -16.5t1.5 -18q0 -38 -28 -68q-3 -3 -16.5 -18t-19 -20.5 t-18.5 -16.5t-22 -15.5t-22 -9t-26 -4.5q-40 0 -68 28l-408 408q-28 28 -28 68q0 13 4.5 26t9 22t15.5 22t16.5 18.5t20.5 19t18 16.5q30 28 68 28q10 0 18 -1.5t16.5 -5.5t13.5 -6t13.5 -10t11.5 -10t13 -12.5t12 -12.5q-14 14 -14 34t14 34l348 348q14 14 34 14t34 -14 q-2 2 -12.5 12t-12.5 13t-10 11.5t-10 13.5t-6 13.5t-5.5 16.5t-1.5 18q0 38 28 68q3 3 16.5 18t19 20.5t18.5 16.5t22 15.5t22 9t26 4.5q40 0 68 -28l408 -408q28 -28 28 -68q0 -13 -4.5 -26t-9 -22t-15.5 -22t-16.5 -18.5t-20.5 -19t-18 -16.5q-30 -28 -68 -28 q-10 0 -18 1.5t-16.5 5.5t-13.5 6t-13.5 10t-11.5 10t-13 12.5t-12 12.5q14 -14 14 -34t-14 -34l-126 -126l256 -256q43 43 96 43q52 0 91 -37l363 -363q37 -39 37 -91z" />
+<glyph unicode="&#xf0e4;" horiz-adv-x="1792" d="M384 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM576 832q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1004 351l101 382q6 26 -7.5 48.5t-38.5 29.5 t-48 -6.5t-30 -39.5l-101 -382q-60 -5 -107 -43.5t-63 -98.5q-20 -77 20 -146t117 -89t146 20t89 117q16 60 -6 117t-72 91zM1664 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 1024q0 53 -37.5 90.5 t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1472 832q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1792 384q0 -261 -141 -483q-19 -29 -54 -29h-1402q-35 0 -54 29 q-141 221 -141 483q0 182 71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
+<glyph unicode="&#xf0e5;" horiz-adv-x="1792" d="M896 1152q-204 0 -381.5 -69.5t-282 -187.5t-104.5 -255q0 -112 71.5 -213.5t201.5 -175.5l87 -50l-27 -96q-24 -91 -70 -172q152 63 275 171l43 38l57 -6q69 -8 130 -8q204 0 381.5 69.5t282 187.5t104.5 255t-104.5 255t-282 187.5t-381.5 69.5zM1792 640 q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22h-5q-15 0 -27 10.5t-16 27.5v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281q0 174 120 321.5 t326 233t450 85.5t450 -85.5t326 -233t120 -321.5z" />
+<glyph unicode="&#xf0e6;" horiz-adv-x="1792" d="M704 1152q-153 0 -286 -52t-211.5 -141t-78.5 -191q0 -82 53 -158t149 -132l97 -56l-35 -84q34 20 62 39l44 31l53 -10q78 -14 153 -14q153 0 286 52t211.5 141t78.5 191t-78.5 191t-211.5 141t-286 52zM704 1280q191 0 353.5 -68.5t256.5 -186.5t94 -257t-94 -257 t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224q0 139 94 257t256.5 186.5 t353.5 68.5zM1526 111q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129 q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230q0 -120 -71 -224.5t-195 -176.5z" />
+<glyph unicode="&#xf0e7;" horiz-adv-x="896" d="M885 970q18 -20 7 -44l-540 -1157q-13 -25 -42 -25q-4 0 -14 2q-17 5 -25.5 19t-4.5 30l197 808l-406 -101q-4 -1 -12 -1q-18 0 -31 11q-18 15 -13 39l201 825q4 14 16 23t28 9h328q19 0 32 -12.5t13 -29.5q0 -8 -5 -18l-171 -463l396 98q8 2 12 2q19 0 34 -15z" />
+<glyph unicode="&#xf0e8;" horiz-adv-x="1792" d="M1792 288v-320q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192h-512v-192h96q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192h-512v-192h96q40 0 68 -28t28 -68v-320 q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192q0 52 38 90t90 38h512v192h-96q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-96v-192h512q52 0 90 -38t38 -90v-192h96q40 0 68 -28t28 -68 z" />
+<glyph unicode="&#xf0e9;" horiz-adv-x="1664" d="M896 708v-580q0 -104 -76 -180t-180 -76t-180 76t-76 180q0 26 19 45t45 19t45 -19t19 -45q0 -50 39 -89t89 -39t89 39t39 89v580q33 11 64 11t64 -11zM1664 681q0 -13 -9.5 -22.5t-22.5 -9.5q-11 0 -23 10q-49 46 -93 69t-102 23q-68 0 -128 -37t-103 -97 q-7 -10 -17.5 -28t-14.5 -24q-11 -17 -28 -17q-18 0 -29 17q-4 6 -14.5 24t-17.5 28q-43 60 -102.5 97t-127.5 37t-127.5 -37t-102.5 -97q-7 -10 -17.5 -28t-14.5 -24q-11 -17 -29 -17q-17 0 -28 17q-4 6 -14.5 24t-17.5 28q-43 60 -103 97t-128 37q-58 0 -102 -23t-93 -69 q-12 -10 -23 -10q-13 0 -22.5 9.5t-9.5 22.5q0 5 1 7q45 183 172.5 319.5t298 204.5t360.5 68q140 0 274.5 -40t246.5 -113.5t194.5 -187t115.5 -251.5q1 -2 1 -7zM896 1408v-98q-42 2 -64 2t-64 -2v98q0 26 19 45t45 19t45 -19t19 -45z" />
+<glyph unicode="&#xf0ea;" horiz-adv-x="1792" d="M768 -128h896v640h-416q-40 0 -68 28t-28 68v416h-384v-1152zM1024 1312v64q0 13 -9.5 22.5t-22.5 9.5h-704q-13 0 -22.5 -9.5t-9.5 -22.5v-64q0 -13 9.5 -22.5t22.5 -9.5h704q13 0 22.5 9.5t9.5 22.5zM1280 640h299l-299 299v-299zM1792 512v-672q0 -40 -28 -68t-68 -28 h-960q-40 0 -68 28t-28 68v160h-544q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h1088q40 0 68 -28t28 -68v-328q21 -13 36 -28l408 -408q28 -28 48 -76t20 -88z" />
+<glyph unicode="&#xf0eb;" horiz-adv-x="1024" d="M736 960q0 -13 -9.5 -22.5t-22.5 -9.5t-22.5 9.5t-9.5 22.5q0 46 -54 71t-106 25q-13 0 -22.5 9.5t-9.5 22.5t9.5 22.5t22.5 9.5q50 0 99.5 -16t87 -54t37.5 -90zM896 960q0 72 -34.5 134t-90 101.5t-123 62t-136.5 22.5t-136.5 -22.5t-123 -62t-90 -101.5t-34.5 -134 q0 -101 68 -180q10 -11 30.5 -33t30.5 -33q128 -153 141 -298h228q13 145 141 298q10 11 30.5 33t30.5 33q68 79 68 180zM1024 960q0 -155 -103 -268q-45 -49 -74.5 -87t-59.5 -95.5t-34 -107.5q47 -28 47 -82q0 -37 -25 -64q25 -27 25 -64q0 -52 -45 -81q13 -23 13 -47 q0 -46 -31.5 -71t-77.5 -25q-20 -44 -60 -70t-87 -26t-87 26t-60 70q-46 0 -77.5 25t-31.5 71q0 24 13 47q-45 29 -45 81q0 37 25 64q-25 27 -25 64q0 54 47 82q-4 50 -34 107.5t-59.5 95.5t-74.5 87q-103 113 -103 268q0 99 44.5 184.5t117 142t164 89t186.5 32.5 t186.5 -32.5t164 -89t117 -142t44.5 -184.5z" />
+<glyph unicode="&#xf0ec;" horiz-adv-x="1792" d="M1792 352v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5q-12 0 -24 10l-319 320q-9 9 -9 22q0 14 9 23l320 320q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5v-192h1376q13 0 22.5 -9.5t9.5 -22.5zM1792 896q0 -14 -9 -23l-320 -320q-9 -9 -23 -9 q-13 0 -22.5 9.5t-9.5 22.5v192h-1376q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1376v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z" />
+<glyph unicode="&#xf0ed;" horiz-adv-x="1920" d="M1280 608q0 14 -9 23t-23 9h-224v352q0 13 -9.5 22.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -22.5v-352h-224q-13 0 -22.5 -9.5t-9.5 -22.5q0 -14 9 -23l352 -352q9 -9 23 -9t23 9l351 351q10 12 10 24zM1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088 q-185 0 -316.5 131.5t-131.5 316.5q0 130 70 240t188 165q-2 30 -2 43q0 212 150 362t362 150q156 0 285.5 -87t188.5 -231q71 62 166 62q106 0 181 -75t75 -181q0 -76 -41 -138q130 -31 213.5 -135.5t83.5 -238.5z" />
+<glyph unicode="&#xf0ee;" horiz-adv-x="1920" d="M1280 672q0 14 -9 23l-352 352q-9 9 -23 9t-23 -9l-351 -351q-10 -12 -10 -24q0 -14 9 -23t23 -9h224v-352q0 -13 9.5 -22.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 22.5v352h224q13 0 22.5 9.5t9.5 22.5zM1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088 q-185 0 -316.5 131.5t-131.5 316.5q0 130 70 240t188 165q-2 30 -2 43q0 212 150 362t362 150q156 0 285.5 -87t188.5 -231q71 62 166 62q106 0 181 -75t75 -181q0 -76 -41 -138q130 -31 213.5 -135.5t83.5 -238.5z" />
+<glyph unicode="&#xf0f0;" horiz-adv-x="1408" d="M384 192q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45t45 19t45 -19t19 -45zM1408 131q0 -121 -73 -190t-194 -69h-874q-121 0 -194 69t-73 190q0 68 5.5 131t24 138t47.5 132.5t81 103t120 60.5q-22 -52 -22 -120v-203q-58 -20 -93 -70t-35 -111q0 -80 56 -136t136 -56 t136 56t56 136q0 61 -35.5 111t-92.5 70v203q0 62 25 93q132 -104 295 -104t295 104q25 -31 25 -93v-64q-106 0 -181 -75t-75 -181v-89q-32 -29 -32 -71q0 -40 28 -68t68 -28t68 28t28 68q0 42 -32 71v89q0 52 38 90t90 38t90 -38t38 -90v-89q-32 -29 -32 -71q0 -40 28 -68 t68 -28t68 28t28 68q0 42 -32 71v89q0 68 -34.5 127.5t-93.5 93.5q0 10 0.5 42.5t0 48t-2.5 41.5t-7 47t-13 40q68 -15 120 -60.5t81 -103t47.5 -132.5t24 -138t5.5 -131zM1088 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5 t271.5 -112.5t112.5 -271.5z" />
+<glyph unicode="&#xf0f1;" horiz-adv-x="1408" d="M1280 832q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 832q0 -62 -35.5 -111t-92.5 -70v-395q0 -159 -131.5 -271.5t-316.5 -112.5t-316.5 112.5t-131.5 271.5v132q-164 20 -274 128t-110 252v512q0 26 19 45t45 19q6 0 16 -2q17 30 47 48 t65 18q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5q-33 0 -64 18v-402q0 -106 94 -181t226 -75t226 75t94 181v402q-31 -18 -64 -18q-53 0 -90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5q35 0 65 -18t47 -48q10 2 16 2q26 0 45 -19t19 -45v-512q0 -144 -110 -252 t-274 -128v-132q0 -106 94 -181t226 -75t226 75t94 181v395q-57 21 -92.5 70t-35.5 111q0 80 56 136t136 56t136 -56t56 -136z" />
+<glyph unicode="&#xf0f2;" horiz-adv-x="1792" d="M640 1152h512v128h-512v-128zM288 1152v-1280h-64q-92 0 -158 66t-66 158v832q0 92 66 158t158 66h64zM1408 1152v-1280h-1024v1280h128v160q0 40 28 68t68 28h576q40 0 68 -28t28 -68v-160h128zM1792 928v-832q0 -92 -66 -158t-158 -66h-64v1280h64q92 0 158 -66 t66 -158z" />
+<glyph unicode="&#xf0f3;" horiz-adv-x="1792" d="M912 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM1728 128q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38t-38 90q50 42 91 88t85 119.5t74.5 158.5 t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q190 -28 307 -158.5t117 -282.5q0 -139 19.5 -260t50 -206t74.5 -158.5t85 -119.5t91 -88z" />
+<glyph unicode="&#xf0f4;" horiz-adv-x="1920" d="M1664 896q0 80 -56 136t-136 56h-64v-384h64q80 0 136 56t56 136zM0 128h1792q0 -106 -75 -181t-181 -75h-1280q-106 0 -181 75t-75 181zM1856 896q0 -159 -112.5 -271.5t-271.5 -112.5h-64v-32q0 -92 -66 -158t-158 -66h-704q-92 0 -158 66t-66 158v736q0 26 19 45 t45 19h1152q159 0 271.5 -112.5t112.5 -271.5z" />
+<glyph unicode="&#xf0f5;" horiz-adv-x="1408" d="M640 1472v-640q0 -61 -35.5 -111t-92.5 -70v-779q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v779q-57 20 -92.5 70t-35.5 111v640q0 26 19 45t45 19t45 -19t19 -45v-416q0 -26 19 -45t45 -19t45 19t19 45v416q0 26 19 45t45 19t45 -19t19 -45v-416q0 -26 19 -45 t45 -19t45 19t19 45v416q0 26 19 45t45 19t45 -19t19 -45zM1408 1472v-1600q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v512h-224q-13 0 -22.5 9.5t-9.5 22.5v800q0 132 94 226t226 94h256q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0f6;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M384 736q0 14 9 23t23 9h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64zM1120 512q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704zM1120 256q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704 q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704z" />
+<glyph unicode="&#xf0f7;" horiz-adv-x="1408" d="M384 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 -128h384v1536h-1152v-1536h384v224q0 13 9.5 22.5t22.5 9.5h320q13 0 22.5 -9.5t9.5 -22.5v-224zM1408 1472v-1664q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h1280q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0f8;" horiz-adv-x="1408" d="M384 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 -128h384v1152h-256v-32q0 -40 -28 -68t-68 -28h-448q-40 0 -68 28t-28 68v32h-256v-1152h384v224q0 13 9.5 22.5t22.5 9.5h320q13 0 22.5 -9.5t9.5 -22.5v-224zM896 1056v320q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-96h-128v96q0 13 -9.5 22.5 t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5v96h128v-96q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1408 1088v-1280q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1280q0 26 19 45t45 19h320 v288q0 40 28 68t68 28h448q40 0 68 -28t28 -68v-288h320q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0f9;" horiz-adv-x="1920" d="M640 128q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM256 640h384v256h-158q-14 -2 -22 -9l-195 -195q-7 -12 -9 -22v-30zM1536 128q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5zM1664 800v192q0 14 -9 23t-23 9h-224v224q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-224h-224q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h224v-224q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v224h224q14 0 23 9t9 23zM1920 1344v-1152 q0 -26 -19 -45t-45 -19h-192q0 -106 -75 -181t-181 -75t-181 75t-75 181h-384q0 -106 -75 -181t-181 -75t-181 75t-75 181h-128q-26 0 -45 19t-19 45t19 45t45 19v416q0 26 13 58t32 51l198 198q19 19 51 32t58 13h160v320q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0fa;" horiz-adv-x="1792" d="M1280 416v192q0 14 -9 23t-23 9h-224v224q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-224h-224q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h224v-224q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v224h224q14 0 23 9t9 23zM640 1152h512v128h-512v-128zM256 1152v-1280h-32 q-92 0 -158 66t-66 158v832q0 92 66 158t158 66h32zM1440 1152v-1280h-1088v1280h160v160q0 40 28 68t68 28h576q40 0 68 -28t28 -68v-160h160zM1792 928v-832q0 -92 -66 -158t-158 -66h-32v1280h32q92 0 158 -66t66 -158z" />
+<glyph unicode="&#xf0fb;" horiz-adv-x="1920" d="M1920 576q-1 -32 -288 -96l-352 -32l-224 -64h-64l-293 -352h69q26 0 45 -4.5t19 -11.5t-19 -11.5t-45 -4.5h-96h-160h-64v32h64v416h-160l-192 -224h-96l-32 32v192h32v32h128v8l-192 24v128l192 24v8h-128v32h-32v192l32 32h96l192 -224h160v416h-64v32h64h160h96 q26 0 45 -4.5t19 -11.5t-19 -11.5t-45 -4.5h-69l293 -352h64l224 -64l352 -32q261 -58 287 -93z" />
+<glyph unicode="&#xf0fc;" horiz-adv-x="1664" d="M640 640v384h-256v-256q0 -53 37.5 -90.5t90.5 -37.5h128zM1664 192v-192h-1152v192l128 192h-128q-159 0 -271.5 112.5t-112.5 271.5v320l-64 64l32 128h480l32 128h960l32 -192l-64 -32v-800z" />
+<glyph unicode="&#xf0fd;" d="M1280 192v896q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-512v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-896q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h512v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf0fe;" d="M1280 576v128q0 26 -19 45t-45 19h-320v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-320q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h320v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h320q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf100;" horiz-adv-x="1024" d="M627 160q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23zM1011 160q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23 t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23z" />
+<glyph unicode="&#xf101;" horiz-adv-x="1024" d="M595 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23zM979 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23 l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
+<glyph unicode="&#xf102;" horiz-adv-x="1152" d="M1075 224q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23zM1075 608q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393 q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
+<glyph unicode="&#xf103;" horiz-adv-x="1152" d="M1075 672q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23zM1075 1056q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23 t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
+<glyph unicode="&#xf104;" horiz-adv-x="640" d="M627 992q0 -13 -10 -23l-393 -393l393 -393q10 -10 10 -23t-10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
+<glyph unicode="&#xf105;" horiz-adv-x="640" d="M595 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
+<glyph unicode="&#xf106;" horiz-adv-x="1152" d="M1075 352q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
+<glyph unicode="&#xf107;" horiz-adv-x="1152" d="M1075 800q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
+<glyph unicode="&#xf108;" horiz-adv-x="1920" d="M1792 544v832q0 13 -9.5 22.5t-22.5 9.5h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-832q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5zM1920 1376v-1088q0 -66 -47 -113t-113 -47h-544q0 -37 16 -77.5t32 -71t16 -43.5q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19 t-19 45q0 14 16 44t32 70t16 78h-544q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf109;" horiz-adv-x="1920" d="M416 256q-66 0 -113 47t-47 113v704q0 66 47 113t113 47h1088q66 0 113 -47t47 -113v-704q0 -66 -47 -113t-113 -47h-1088zM384 1120v-704q0 -13 9.5 -22.5t22.5 -9.5h1088q13 0 22.5 9.5t9.5 22.5v704q0 13 -9.5 22.5t-22.5 9.5h-1088q-13 0 -22.5 -9.5t-9.5 -22.5z M1760 192h160v-96q0 -40 -47 -68t-113 -28h-1600q-66 0 -113 28t-47 68v96h160h1600zM1040 96q16 0 16 16t-16 16h-160q-16 0 -16 -16t16 -16h160z" />
+<glyph unicode="&#xf10a;" horiz-adv-x="1152" d="M640 128q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1024 288v960q0 13 -9.5 22.5t-22.5 9.5h-832q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h832q13 0 22.5 9.5t9.5 22.5zM1152 1248v-1088q0 -66 -47 -113t-113 -47h-832 q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h832q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf10b;" horiz-adv-x="768" d="M464 128q0 33 -23.5 56.5t-56.5 23.5t-56.5 -23.5t-23.5 -56.5t23.5 -56.5t56.5 -23.5t56.5 23.5t23.5 56.5zM672 288v704q0 13 -9.5 22.5t-22.5 9.5h-512q-13 0 -22.5 -9.5t-9.5 -22.5v-704q0 -13 9.5 -22.5t22.5 -9.5h512q13 0 22.5 9.5t9.5 22.5zM480 1136 q0 16 -16 16h-160q-16 0 -16 -16t16 -16h160q16 0 16 16zM768 1152v-1024q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v1024q0 52 38 90t90 38h512q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf10c;" d="M768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103 t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf10d;" horiz-adv-x="1664" d="M768 576v-384q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v704q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5h64q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-64q-106 0 -181 -75t-75 -181v-32q0 -40 28 -68t68 -28h224q80 0 136 -56t56 -136z M1664 576v-384q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v704q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5h64q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-64q-106 0 -181 -75t-75 -181v-32q0 -40 28 -68t68 -28h224q80 0 136 -56t56 -136z" />
+<glyph unicode="&#xf10e;" horiz-adv-x="1664" d="M768 1216v-704q0 -104 -40.5 -198.5t-109.5 -163.5t-163.5 -109.5t-198.5 -40.5h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64q106 0 181 75t75 181v32q0 40 -28 68t-68 28h-224q-80 0 -136 56t-56 136v384q0 80 56 136t136 56h384q80 0 136 -56t56 -136zM1664 1216 v-704q0 -104 -40.5 -198.5t-109.5 -163.5t-163.5 -109.5t-198.5 -40.5h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64q106 0 181 75t75 181v32q0 40 -28 68t-68 28h-224q-80 0 -136 56t-56 136v384q0 80 56 136t136 56h384q80 0 136 -56t56 -136z" />
+<glyph unicode="&#xf110;" horiz-adv-x="1568" d="M496 192q0 -60 -42.5 -102t-101.5 -42q-60 0 -102 42t-42 102t42 102t102 42q59 0 101.5 -42t42.5 -102zM928 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM320 640q0 -66 -47 -113t-113 -47t-113 47t-47 113 t47 113t113 47t113 -47t47 -113zM1360 192q0 -46 -33 -79t-79 -33t-79 33t-33 79t33 79t79 33t79 -33t33 -79zM528 1088q0 -73 -51.5 -124.5t-124.5 -51.5t-124.5 51.5t-51.5 124.5t51.5 124.5t124.5 51.5t124.5 -51.5t51.5 -124.5zM992 1280q0 -80 -56 -136t-136 -56 t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1536 640q0 -40 -28 -68t-68 -28t-68 28t-28 68t28 68t68 28t68 -28t28 -68zM1328 1088q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5z" />
+<glyph unicode="&#xf111;" d="M1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf112;" horiz-adv-x="1792" d="M1792 416q0 -166 -127 -451q-3 -7 -10.5 -24t-13.5 -30t-13 -22q-12 -17 -28 -17q-15 0 -23.5 10t-8.5 25q0 9 2.5 26.5t2.5 23.5q5 68 5 123q0 101 -17.5 181t-48.5 138.5t-80 101t-105.5 69.5t-133 42.5t-154 21.5t-175.5 6h-224v-256q0 -26 -19 -45t-45 -19t-45 19 l-512 512q-19 19 -19 45t19 45l512 512q19 19 45 19t45 -19t19 -45v-256h224q713 0 875 -403q53 -134 53 -333z" />
+<glyph unicode="&#xf113;" horiz-adv-x="1664" d="M640 320q0 -40 -12.5 -82t-43 -76t-72.5 -34t-72.5 34t-43 76t-12.5 82t12.5 82t43 76t72.5 34t72.5 -34t43 -76t12.5 -82zM1280 320q0 -40 -12.5 -82t-43 -76t-72.5 -34t-72.5 34t-43 76t-12.5 82t12.5 82t43 76t72.5 34t72.5 -34t43 -76t12.5 -82zM1440 320 q0 120 -69 204t-187 84q-41 0 -195 -21q-71 -11 -157 -11t-157 11q-152 21 -195 21q-118 0 -187 -84t-69 -204q0 -88 32 -153.5t81 -103t122 -60t140 -29.5t149 -7h168q82 0 149 7t140 29.5t122 60t81 103t32 153.5zM1664 496q0 -207 -61 -331q-38 -77 -105.5 -133t-141 -86 t-170 -47.5t-171.5 -22t-167 -4.5q-78 0 -142 3t-147.5 12.5t-152.5 30t-137 51.5t-121 81t-86 115q-62 123 -62 331q0 237 136 396q-27 82 -27 170q0 116 51 218q108 0 190 -39.5t189 -123.5q147 35 309 35q148 0 280 -32q105 82 187 121t189 39q51 -102 51 -218 q0 -87 -27 -168q136 -160 136 -398z" />
+<glyph unicode="&#xf114;" horiz-adv-x="1664" d="M1536 224v704q0 40 -28 68t-68 28h-704q-40 0 -68 28t-28 68v64q0 40 -28 68t-68 28h-320q-40 0 -68 -28t-28 -68v-960q0 -40 28 -68t68 -28h1216q40 0 68 28t28 68zM1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320 q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" />
+<glyph unicode="&#xf115;" horiz-adv-x="1920" d="M1781 605q0 35 -53 35h-1088q-40 0 -85.5 -21.5t-71.5 -52.5l-294 -363q-18 -24 -18 -40q0 -35 53 -35h1088q40 0 86 22t71 53l294 363q18 22 18 39zM640 768h768v160q0 40 -28 68t-68 28h-576q-40 0 -68 28t-28 68v64q0 40 -28 68t-68 28h-320q-40 0 -68 -28t-28 -68 v-853l256 315q44 53 116 87.5t140 34.5zM1909 605q0 -62 -46 -120l-295 -363q-43 -53 -116 -87.5t-140 -34.5h-1088q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158v-160h192q54 0 99 -24.5t67 -70.5q15 -32 15 -68z " />
+<glyph unicode="&#xf116;" horiz-adv-x="1792" />
+<glyph unicode="&#xf117;" horiz-adv-x="1792" />
+<glyph unicode="&#xf118;" d="M1134 461q-37 -121 -138 -195t-228 -74t-228 74t-138 195q-8 25 4 48.5t38 31.5q25 8 48.5 -4t31.5 -38q25 -80 92.5 -129.5t151.5 -49.5t151.5 49.5t92.5 129.5q8 26 32 38t49 4t37 -31.5t4 -48.5zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5 t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5 t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf119;" d="M1134 307q8 -25 -4 -48.5t-37 -31.5t-49 4t-32 38q-25 80 -92.5 129.5t-151.5 49.5t-151.5 -49.5t-92.5 -129.5q-8 -26 -31.5 -38t-48.5 -4q-26 8 -38 31.5t-4 48.5q37 121 138 195t228 74t228 -74t138 -195zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204 t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf11a;" d="M1152 448q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h640q26 0 45 -19t19 -45zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf11b;" horiz-adv-x="1920" d="M832 448v128q0 14 -9 23t-23 9h-192v192q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-192h-192q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h192v-192q0 -14 9 -23t23 -9h128q14 0 23 9t9 23v192h192q14 0 23 9t9 23zM1408 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5 t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 640q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1920 512q0 -212 -150 -362t-362 -150q-192 0 -338 128h-220q-146 -128 -338 -128q-212 0 -362 150 t-150 362t150 362t362 150h896q212 0 362 -150t150 -362z" />
+<glyph unicode="&#xf11c;" horiz-adv-x="1920" d="M384 368v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM512 624v-96q0 -16 -16 -16h-224q-16 0 -16 16v96q0 16 16 16h224q16 0 16 -16zM384 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1408 368v-96q0 -16 -16 -16 h-864q-16 0 -16 16v96q0 16 16 16h864q16 0 16 -16zM768 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM640 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1024 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16 h96q16 0 16 -16zM896 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1280 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1664 368v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1152 880v-96 q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1408 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1664 880v-352q0 -16 -16 -16h-224q-16 0 -16 16v96q0 16 16 16h112v240q0 16 16 16h96q16 0 16 -16zM1792 128v896h-1664v-896 h1664zM1920 1024v-896q0 -53 -37.5 -90.5t-90.5 -37.5h-1664q-53 0 -90.5 37.5t-37.5 90.5v896q0 53 37.5 90.5t90.5 37.5h1664q53 0 90.5 -37.5t37.5 -90.5z" />
+<glyph unicode="&#xf11d;" horiz-adv-x="1792" d="M1664 491v616q-169 -91 -306 -91q-82 0 -145 32q-100 49 -184 76.5t-178 27.5q-173 0 -403 -127v-599q245 113 433 113q55 0 103.5 -7.5t98 -26t77 -31t82.5 -39.5l28 -14q44 -22 101 -22q120 0 293 92zM320 1280q0 -35 -17.5 -64t-46.5 -46v-1266q0 -14 -9 -23t-23 -9 h-64q-14 0 -23 9t-9 23v1266q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -39 -35 -57q-10 -5 -17 -9q-218 -116 -369 -116q-88 0 -158 35l-28 14q-64 33 -99 48t-91 29t-114 14q-102 0 -235.5 -44t-228.5 -102 q-15 -9 -33 -9q-16 0 -32 8q-32 19 -32 56v742q0 35 31 55q35 21 78.5 42.5t114 52t152.5 49.5t155 19q112 0 209 -31t209 -86q38 -19 89 -19q122 0 310 112q22 12 31 17q31 16 62 -2q31 -20 31 -55z" />
+<glyph unicode="&#xf11e;" horiz-adv-x="1792" d="M832 536v192q-181 -16 -384 -117v-185q205 96 384 110zM832 954v197q-172 -8 -384 -126v-189q215 111 384 118zM1664 491v184q-235 -116 -384 -71v224q-20 6 -39 15q-5 3 -33 17t-34.5 17t-31.5 15t-34.5 15.5t-32.5 13t-36 12.5t-35 8.5t-39.5 7.5t-39.5 4t-44 2 q-23 0 -49 -3v-222h19q102 0 192.5 -29t197.5 -82q19 -9 39 -15v-188q42 -17 91 -17q120 0 293 92zM1664 918v189q-169 -91 -306 -91q-45 0 -78 8v-196q148 -42 384 90zM320 1280q0 -35 -17.5 -64t-46.5 -46v-1266q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v1266 q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -39 -35 -57q-10 -5 -17 -9q-218 -116 -369 -116q-88 0 -158 35l-28 14q-64 33 -99 48t-91 29t-114 14q-102 0 -235.5 -44t-228.5 -102q-15 -9 -33 -9q-16 0 -32 8 q-32 19 -32 56v742q0 35 31 55q35 21 78.5 42.5t114 52t152.5 49.5t155 19q112 0 209 -31t209 -86q38 -19 89 -19q122 0 310 112q22 12 31 17q31 16 62 -2q31 -20 31 -55z" />
+<glyph unicode="&#xf120;" horiz-adv-x="1664" d="M585 553l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23t-10 -23zM1664 96v-64q0 -14 -9 -23t-23 -9h-960q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h960q14 0 23 -9 t9 -23z" />
+<glyph unicode="&#xf121;" horiz-adv-x="1920" d="M617 137l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23t-10 -23zM1208 1204l-373 -1291q-4 -13 -15.5 -19.5t-23.5 -2.5l-62 17q-13 4 -19.5 15.5t-2.5 24.5 l373 1291q4 13 15.5 19.5t23.5 2.5l62 -17q13 -4 19.5 -15.5t2.5 -24.5zM1865 553l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23t-10 -23z" />
+<glyph unicode="&#xf122;" horiz-adv-x="1792" d="M640 454v-70q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-512 512q-19 19 -19 45t19 45l512 512q29 31 70 14q39 -17 39 -59v-69l-397 -398q-19 -19 -19 -45t19 -45zM1792 416q0 -58 -17 -133.5t-38.5 -138t-48 -125t-40.5 -90.5l-20 -40q-8 -17 -28 -17q-6 0 -9 1 q-25 8 -23 34q43 400 -106 565q-64 71 -170.5 110.5t-267.5 52.5v-251q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-512 512q-19 19 -19 45t19 45l512 512q29 31 70 14q39 -17 39 -59v-262q411 -28 599 -221q169 -173 169 -509z" />
+<glyph unicode="&#xf123;" horiz-adv-x="1664" d="M1186 579l257 250l-356 52l-66 10l-30 60l-159 322v-963l59 -31l318 -168l-60 355l-12 66zM1638 841l-363 -354l86 -500q5 -33 -6 -51.5t-34 -18.5q-17 0 -40 12l-449 236l-449 -236q-23 -12 -40 -12q-23 0 -34 18.5t-6 51.5l86 500l-364 354q-32 32 -23 59.5t54 34.5 l502 73l225 455q20 41 49 41q28 0 49 -41l225 -455l502 -73q45 -7 54 -34.5t-24 -59.5z" />
+<glyph unicode="&#xf124;" horiz-adv-x="1408" d="M1401 1187l-640 -1280q-17 -35 -57 -35q-5 0 -15 2q-22 5 -35.5 22.5t-13.5 39.5v576h-576q-22 0 -39.5 13.5t-22.5 35.5t4 42t29 30l1280 640q13 7 29 7q27 0 45 -19q15 -14 18.5 -34.5t-6.5 -39.5z" />
+<glyph unicode="&#xf125;" horiz-adv-x="1664" d="M557 256h595v595zM512 301l595 595h-595v-595zM1664 224v-192q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v224h-864q-14 0 -23 9t-9 23v864h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224v224q0 14 9 23t23 9h192q14 0 23 -9t9 -23 v-224h851l246 247q10 9 23 9t23 -9q9 -10 9 -23t-9 -23l-247 -246v-851h224q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf126;" horiz-adv-x="1024" d="M288 64q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM288 1216q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM928 1088q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1024 1088q0 -52 -26 -96.5t-70 -69.5 q-2 -287 -226 -414q-68 -38 -203 -81q-128 -40 -169.5 -71t-41.5 -100v-26q44 -25 70 -69.5t26 -96.5q0 -80 -56 -136t-136 -56t-136 56t-56 136q0 52 26 96.5t70 69.5v820q-44 25 -70 69.5t-26 96.5q0 80 56 136t136 56t136 -56t56 -136q0 -52 -26 -96.5t-70 -69.5v-497 q54 26 154 57q55 17 87.5 29.5t70.5 31t59 39.5t40.5 51t28 69.5t8.5 91.5q-44 25 -70 69.5t-26 96.5q0 80 56 136t136 56t136 -56t56 -136z" />
+<glyph unicode="&#xf127;" horiz-adv-x="1664" d="M439 265l-256 -256q-10 -9 -23 -9q-12 0 -23 9q-9 10 -9 23t9 23l256 256q10 9 23 9t23 -9q9 -10 9 -23t-9 -23zM608 224v-320q0 -14 -9 -23t-23 -9t-23 9t-9 23v320q0 14 9 23t23 9t23 -9t9 -23zM384 448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23t9 23t23 9h320 q14 0 23 -9t9 -23zM1648 320q0 -120 -85 -203l-147 -146q-83 -83 -203 -83q-121 0 -204 85l-334 335q-21 21 -42 56l239 18l273 -274q27 -27 68 -27.5t68 26.5l147 146q28 28 28 67q0 40 -28 68l-274 275l18 239q35 -21 56 -42l336 -336q84 -86 84 -204zM1031 1044l-239 -18 l-273 274q-28 28 -68 28q-39 0 -68 -27l-147 -146q-28 -28 -28 -67q0 -40 28 -68l274 -274l-18 -240q-35 21 -56 42l-336 336q-84 86 -84 204q0 120 85 203l147 146q83 83 203 83q121 0 204 -85l334 -335q21 -21 42 -56zM1664 960q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9 t-9 23t9 23t23 9h320q14 0 23 -9t9 -23zM1120 1504v-320q0 -14 -9 -23t-23 -9t-23 9t-9 23v320q0 14 9 23t23 9t23 -9t9 -23zM1527 1353l-256 -256q-11 -9 -23 -9t-23 9q-9 10 -9 23t9 23l256 256q10 9 23 9t23 -9q9 -10 9 -23t-9 -23z" />
+<glyph unicode="&#xf128;" horiz-adv-x="1024" d="M704 280v-240q0 -16 -12 -28t-28 -12h-240q-16 0 -28 12t-12 28v240q0 16 12 28t28 12h240q16 0 28 -12t12 -28zM1020 880q0 -54 -15.5 -101t-35 -76.5t-55 -59.5t-57.5 -43.5t-61 -35.5q-41 -23 -68.5 -65t-27.5 -67q0 -17 -12 -32.5t-28 -15.5h-240q-15 0 -25.5 18.5 t-10.5 37.5v45q0 83 65 156.5t143 108.5q59 27 84 56t25 76q0 42 -46.5 74t-107.5 32q-65 0 -108 -29q-35 -25 -107 -115q-13 -16 -31 -16q-12 0 -25 8l-164 125q-13 10 -15.5 25t5.5 28q160 266 464 266q80 0 161 -31t146 -83t106 -127.5t41 -158.5z" />
+<glyph unicode="&#xf129;" horiz-adv-x="640" d="M640 192v-128q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64v384h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-576h64q26 0 45 -19t19 -45zM512 1344v-192q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v192 q0 26 19 45t45 19h256q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf12a;" horiz-adv-x="640" d="M512 288v-224q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v224q0 26 19 45t45 19h256q26 0 45 -19t19 -45zM542 1344l-28 -768q-1 -26 -20.5 -45t-45.5 -19h-256q-26 0 -45.5 19t-20.5 45l-28 768q-1 26 17.5 45t44.5 19h320q26 0 44.5 -19t17.5 -45z" />
+<glyph unicode="&#xf12b;" d="M897 167v-167h-248l-159 252l-24 42q-8 9 -11 21h-3l-9 -21q-10 -20 -25 -44l-155 -250h-258v167h128l197 291l-185 272h-137v168h276l139 -228q2 -4 23 -42q8 -9 11 -21h3q3 9 11 21l25 42l140 228h257v-168h-125l-184 -267l204 -296h109zM1534 846v-206h-514l-3 27 q-4 28 -4 46q0 64 26 117t65 86.5t84 65t84 54.5t65 54t26 64q0 38 -29.5 62.5t-70.5 24.5q-51 0 -97 -39q-14 -11 -36 -38l-105 92q26 37 63 66q83 65 188 65q110 0 178 -59.5t68 -158.5q0 -56 -24.5 -103t-62 -76.5t-81.5 -58.5t-82 -50.5t-65.5 -51.5t-30.5 -63h232v80 h126z" />
+<glyph unicode="&#xf12c;" d="M897 167v-167h-248l-159 252l-24 42q-8 9 -11 21h-3l-9 -21q-10 -20 -25 -44l-155 -250h-258v167h128l197 291l-185 272h-137v168h276l139 -228q2 -4 23 -42q8 -9 11 -21h3q3 9 11 21l25 42l140 228h257v-168h-125l-184 -267l204 -296h109zM1536 -50v-206h-514l-4 27 q-3 45 -3 46q0 64 26 117t65 86.5t84 65t84 54.5t65 54t26 64q0 38 -29.5 62.5t-70.5 24.5q-51 0 -97 -39q-14 -11 -36 -38l-105 92q26 37 63 66q80 65 188 65q110 0 178 -59.5t68 -158.5q0 -66 -34.5 -118.5t-84 -86t-99.5 -62.5t-87 -63t-41 -73h232v80h126z" />
+<glyph unicode="&#xf12d;" horiz-adv-x="1920" d="M896 128l336 384h-768l-336 -384h768zM1909 1205q15 -34 9.5 -71.5t-30.5 -65.5l-896 -1024q-38 -44 -96 -44h-768q-38 0 -69.5 20.5t-47.5 54.5q-15 34 -9.5 71.5t30.5 65.5l896 1024q38 44 96 44h768q38 0 69.5 -20.5t47.5 -54.5z" />
+<glyph unicode="&#xf12e;" horiz-adv-x="1664" d="M1664 438q0 -81 -44.5 -135t-123.5 -54q-41 0 -77.5 17.5t-59 38t-56.5 38t-71 17.5q-110 0 -110 -124q0 -39 16 -115t15 -115v-5q-22 0 -33 -1q-34 -3 -97.5 -11.5t-115.5 -13.5t-98 -5q-61 0 -103 26.5t-42 83.5q0 37 17.5 71t38 56.5t38 59t17.5 77.5q0 79 -54 123.5 t-135 44.5q-84 0 -143 -45.5t-59 -127.5q0 -43 15 -83t33.5 -64.5t33.5 -53t15 -50.5q0 -45 -46 -89q-37 -35 -117 -35q-95 0 -245 24q-9 2 -27.5 4t-27.5 4l-13 2q-1 0 -3 1q-2 0 -2 1v1024q2 -1 17.5 -3.5t34 -5t21.5 -3.5q150 -24 245 -24q80 0 117 35q46 44 46 89 q0 22 -15 50.5t-33.5 53t-33.5 64.5t-15 83q0 82 59 127.5t144 45.5q80 0 134 -44.5t54 -123.5q0 -41 -17.5 -77.5t-38 -59t-38 -56.5t-17.5 -71q0 -57 42 -83.5t103 -26.5q64 0 180 15t163 17v-2q-1 -2 -3.5 -17.5t-5 -34t-3.5 -21.5q-24 -150 -24 -245q0 -80 35 -117 q44 -46 89 -46q22 0 50.5 15t53 33.5t64.5 33.5t83 15q82 0 127.5 -59t45.5 -143z" />
+<glyph unicode="&#xf130;" horiz-adv-x="1152" d="M1152 832v-128q0 -221 -147.5 -384.5t-364.5 -187.5v-132h256q26 0 45 -19t19 -45t-19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h256v132q-217 24 -364.5 187.5t-147.5 384.5v128q0 26 19 45t45 19t45 -19t19 -45v-128q0 -185 131.5 -316.5t316.5 -131.5 t316.5 131.5t131.5 316.5v128q0 26 19 45t45 19t45 -19t19 -45zM896 1216v-512q0 -132 -94 -226t-226 -94t-226 94t-94 226v512q0 132 94 226t226 94t226 -94t94 -226z" />
+<glyph unicode="&#xf131;" horiz-adv-x="1408" d="M271 591l-101 -101q-42 103 -42 214v128q0 26 19 45t45 19t45 -19t19 -45v-128q0 -53 15 -113zM1385 1193l-361 -361v-128q0 -132 -94 -226t-226 -94q-55 0 -109 19l-96 -96q97 -51 205 -51q185 0 316.5 131.5t131.5 316.5v128q0 26 19 45t45 19t45 -19t19 -45v-128 q0 -221 -147.5 -384.5t-364.5 -187.5v-132h256q26 0 45 -19t19 -45t-19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h256v132q-125 13 -235 81l-254 -254q-10 -10 -23 -10t-23 10l-82 82q-10 10 -10 23t10 23l1234 1234q10 10 23 10t23 -10l82 -82q10 -10 10 -23 t-10 -23zM1005 1325l-621 -621v512q0 132 94 226t226 94q102 0 184.5 -59t116.5 -152z" />
+<glyph unicode="&#xf132;" horiz-adv-x="1280" d="M1088 576v640h-448v-1137q119 63 213 137q235 184 235 360zM1280 1344v-768q0 -86 -33.5 -170.5t-83 -150t-118 -127.5t-126.5 -103t-121 -77.5t-89.5 -49.5t-42.5 -20q-12 -6 -26 -6t-26 6q-16 7 -42.5 20t-89.5 49.5t-121 77.5t-126.5 103t-118 127.5t-83 150 t-33.5 170.5v768q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf133;" horiz-adv-x="1664" d="M128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280 q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf134;" horiz-adv-x="1408" d="M512 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 1376v-320q0 -16 -12 -25q-8 -7 -20 -7q-4 0 -7 1l-448 96q-11 2 -18 11t-7 20h-256v-102q111 -23 183.5 -111t72.5 -203v-800q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v800 q0 106 62.5 190.5t161.5 114.5v111h-32q-59 0 -115 -23.5t-91.5 -53t-66 -66.5t-40.5 -53.5t-14 -24.5q-17 -35 -57 -35q-16 0 -29 7q-23 12 -31.5 37t3.5 49q5 10 14.5 26t37.5 53.5t60.5 70t85 67t108.5 52.5q-25 42 -25 86q0 66 47 113t113 47t113 -47t47 -113 q0 -33 -14 -64h302q0 11 7 20t18 11l448 96q3 1 7 1q12 0 20 -7q12 -9 12 -25z" />
+<glyph unicode="&#xf135;" horiz-adv-x="1664" d="M1440 1088q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1664 1376q0 -249 -75.5 -430.5t-253.5 -360.5q-81 -80 -195 -176l-20 -379q-2 -16 -16 -26l-384 -224q-7 -4 -16 -4q-12 0 -23 9l-64 64q-13 14 -8 32l85 276l-281 281l-276 -85q-3 -1 -9 -1 q-14 0 -23 9l-64 64q-17 19 -5 39l224 384q10 14 26 16l379 20q96 114 176 195q188 187 358 258t431 71q14 0 24 -9.5t10 -22.5z" />
+<glyph unicode="&#xf136;" horiz-adv-x="1792" d="M1745 763l-164 -763h-334l178 832q13 56 -15 88q-27 33 -83 33h-169l-204 -953h-334l204 953h-286l-204 -953h-334l204 953l-153 327h1276q101 0 189.5 -40.5t147.5 -113.5q60 -73 81 -168.5t0 -194.5z" />
+<glyph unicode="&#xf137;" d="M909 141l102 102q19 19 19 45t-19 45l-307 307l307 307q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l454 -454q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf138;" d="M717 141l454 454q19 19 19 45t-19 45l-454 454q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l307 -307l-307 -307q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf139;" d="M1165 397l102 102q19 19 19 45t-19 45l-454 454q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19l307 307l307 -307q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf13a;" d="M813 237l454 454q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-307 -307l-307 307q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l454 -454q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf13b;" horiz-adv-x="1408" d="M1130 939l16 175h-884l47 -534h612l-22 -228l-197 -53l-196 53l-13 140h-175l22 -278l362 -100h4v1l359 99l50 544h-644l-15 181h674zM0 1408h1408l-128 -1438l-578 -162l-574 162z" />
+<glyph unicode="&#xf13c;" horiz-adv-x="1792" d="M275 1408h1505l-266 -1333l-804 -267l-698 267l71 356h297l-29 -147l422 -161l486 161l68 339h-1208l58 297h1209l38 191h-1208z" />
+<glyph unicode="&#xf13d;" horiz-adv-x="1792" d="M960 1280q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1792 352v-352q0 -22 -20 -30q-8 -2 -12 -2q-13 0 -23 9l-93 93q-119 -143 -318.5 -226.5t-429.5 -83.5t-429.5 83.5t-318.5 226.5l-93 -93q-9 -9 -23 -9q-4 0 -12 2q-20 8 -20 30v352 q0 14 9 23t23 9h352q22 0 30 -20q8 -19 -7 -35l-100 -100q67 -91 189.5 -153.5t271.5 -82.5v647h-192q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h192v163q-58 34 -93 92.5t-35 128.5q0 106 75 181t181 75t181 -75t75 -181q0 -70 -35 -128.5t-93 -92.5v-163h192q26 0 45 -19 t19 -45v-128q0 -26 -19 -45t-45 -19h-192v-647q149 20 271.5 82.5t189.5 153.5l-100 100q-15 16 -7 35q8 20 30 20h352q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf13e;" horiz-adv-x="1152" d="M1056 768q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h32v320q0 185 131.5 316.5t316.5 131.5t316.5 -131.5t131.5 -316.5q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45q0 106 -75 181t-181 75t-181 -75t-75 -181 v-320h736z" />
+<glyph unicode="&#xf140;" d="M1024 640q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM1152 640q0 159 -112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM1280 640q0 -212 -150 -362t-362 -150t-362 150 t-150 362t150 362t362 150t362 -150t150 -362zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf141;" horiz-adv-x="1408" d="M384 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM896 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM1408 800v-192q0 -40 -28 -68t-68 -28h-192 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf142;" horiz-adv-x="384" d="M384 288v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM384 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM384 1312v-192q0 -40 -28 -68t-68 -28h-192 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf143;" d="M512 256q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM863 162q-13 232 -177 396t-396 177q-14 1 -24 -9t-10 -23v-128q0 -13 8.5 -22t21.5 -10q154 -11 264 -121t121 -264q1 -13 10 -21.5t22 -8.5h128q13 0 23 10 t9 24zM1247 161q-5 154 -56 297.5t-139.5 260t-205 205t-260 139.5t-297.5 56q-14 1 -23 -9q-10 -10 -10 -23v-128q0 -13 9 -22t22 -10q204 -7 378 -111.5t278.5 -278.5t111.5 -378q1 -13 10 -22t22 -9h128q13 0 23 10q11 9 9 23zM1536 1120v-960q0 -119 -84.5 -203.5 t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf144;" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1152 585q32 18 32 55t-32 55l-544 320q-31 19 -64 1q-32 -19 -32 -56v-640q0 -37 32 -56 q16 -8 32 -8q17 0 32 9z" />
+<glyph unicode="&#xf145;" horiz-adv-x="1792" d="M1024 1084l316 -316l-572 -572l-316 316zM813 105l618 618q19 19 19 45t-19 45l-362 362q-18 18 -45 18t-45 -18l-618 -618q-19 -19 -19 -45t19 -45l362 -362q18 -18 45 -18t45 18zM1702 742l-907 -908q-37 -37 -90.5 -37t-90.5 37l-126 126q56 56 56 136t-56 136 t-136 56t-136 -56l-125 126q-37 37 -37 90.5t37 90.5l907 906q37 37 90.5 37t90.5 -37l125 -125q-56 -56 -56 -136t56 -136t136 -56t136 56l126 -125q37 -37 37 -90.5t-37 -90.5z" />
+<glyph unicode="&#xf146;" d="M1280 576v128q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h896q26 0 45 19t19 45zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z" />
+<glyph unicode="&#xf147;" horiz-adv-x="1408" d="M1152 736v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h832q14 0 23 -9t9 -23zM1280 288v832q0 66 -47 113t-113 47h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113zM1408 1120v-832q0 -119 -84.5 -203.5 t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf148;" horiz-adv-x="1024" d="M1018 933q-18 -37 -58 -37h-192v-864q0 -14 -9 -23t-23 -9h-704q-21 0 -29 18q-8 20 4 35l160 192q9 11 25 11h320v640h-192q-40 0 -58 37q-17 37 9 68l320 384q18 22 49 22t49 -22l320 -384q27 -32 9 -68z" />
+<glyph unicode="&#xf149;" horiz-adv-x="1024" d="M32 1280h704q13 0 22.5 -9.5t9.5 -23.5v-863h192q40 0 58 -37t-9 -69l-320 -384q-18 -22 -49 -22t-49 22l-320 384q-26 31 -9 69q18 37 58 37h192v640h-320q-14 0 -25 11l-160 192q-13 14 -4 34q9 19 29 19z" />
+<glyph unicode="&#xf14a;" d="M685 237l614 614q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-467 -467l-211 211q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l358 -358q19 -19 45 -19t45 19zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5 t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf14b;" d="M404 428l152 -152l-52 -52h-56v96h-96v56zM818 818q14 -13 -3 -30l-291 -291q-17 -17 -30 -3q-14 13 3 30l291 291q17 17 30 3zM544 128l544 544l-288 288l-544 -544v-288h288zM1152 736l92 92q28 28 28 68t-28 68l-152 152q-28 28 -68 28t-68 -28l-92 -92zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf14c;" d="M1280 608v480q0 26 -19 45t-45 19h-480q-42 0 -59 -39q-17 -41 14 -70l144 -144l-534 -534q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19l534 534l144 -144q18 -19 45 -19q12 0 25 5q39 17 39 59zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960 q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf14d;" d="M1005 435l352 352q19 19 19 45t-19 45l-352 352q-30 31 -69 14q-40 -17 -40 -59v-160q-119 0 -216 -19.5t-162.5 -51t-114 -79t-76.5 -95.5t-44.5 -109t-21.5 -111.5t-5 -110.5q0 -181 167 -404q10 -12 25 -12q7 0 13 3q22 9 19 33q-44 354 62 473q46 52 130 75.5 t224 23.5v-160q0 -42 40 -59q12 -5 24 -5q26 0 45 19zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf14e;" d="M640 448l256 128l-256 128v-256zM1024 1039v-542l-512 -256v542zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf150;" d="M1145 861q18 -35 -5 -66l-320 -448q-19 -27 -52 -27t-52 27l-320 448q-23 31 -5 66q17 35 57 35h640q40 0 57 -35zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf151;" d="M1145 419q-17 -35 -57 -35h-640q-40 0 -57 35q-18 35 5 66l320 448q19 27 52 27t52 -27l320 -448q23 -31 5 -66zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf152;" d="M1088 640q0 -33 -27 -52l-448 -320q-31 -23 -66 -5q-35 17 -35 57v640q0 40 35 57q35 18 66 -5l448 -320q27 -19 27 -52zM1280 160v960q0 14 -9 23t-23 9h-960q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h960q14 0 23 9t9 23zM1536 1120v-960q0 -119 -84.5 -203.5 t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf153;" horiz-adv-x="1024" d="M976 229l35 -159q3 -12 -3 -22.5t-17 -14.5l-5 -1q-4 -2 -10.5 -3.5t-16 -4.5t-21.5 -5.5t-25.5 -5t-30 -5t-33.5 -4.5t-36.5 -3t-38.5 -1q-234 0 -409 130.5t-238 351.5h-95q-13 0 -22.5 9.5t-9.5 22.5v113q0 13 9.5 22.5t22.5 9.5h66q-2 57 1 105h-67q-14 0 -23 9 t-9 23v114q0 14 9 23t23 9h98q67 210 243.5 338t400.5 128q102 0 194 -23q11 -3 20 -15q6 -11 3 -24l-43 -159q-3 -13 -14 -19.5t-24 -2.5l-4 1q-4 1 -11.5 2.5l-17.5 3.5t-22.5 3.5t-26 3t-29 2.5t-29.5 1q-126 0 -226 -64t-150 -176h468q16 0 25 -12q10 -12 7 -26 l-24 -114q-5 -26 -32 -26h-488q-3 -37 0 -105h459q15 0 25 -12q9 -12 6 -27l-24 -112q-2 -11 -11 -18.5t-20 -7.5h-387q48 -117 149.5 -185.5t228.5 -68.5q18 0 36 1.5t33.5 3.5t29.5 4.5t24.5 5t18.5 4.5l12 3l5 2q13 5 26 -2q12 -7 15 -21z" />
+<glyph unicode="&#xf154;" horiz-adv-x="1024" d="M1020 399v-367q0 -14 -9 -23t-23 -9h-956q-14 0 -23 9t-9 23v150q0 13 9.5 22.5t22.5 9.5h97v383h-95q-14 0 -23 9.5t-9 22.5v131q0 14 9 23t23 9h95v223q0 171 123.5 282t314.5 111q185 0 335 -125q9 -8 10 -20.5t-7 -22.5l-103 -127q-9 -11 -22 -12q-13 -2 -23 7 q-5 5 -26 19t-69 32t-93 18q-85 0 -137 -47t-52 -123v-215h305q13 0 22.5 -9t9.5 -23v-131q0 -13 -9.5 -22.5t-22.5 -9.5h-305v-379h414v181q0 13 9 22.5t23 9.5h162q14 0 23 -9.5t9 -22.5z" />
+<glyph unicode="&#xf155;" horiz-adv-x="1024" d="M978 351q0 -153 -99.5 -263.5t-258.5 -136.5v-175q0 -14 -9 -23t-23 -9h-135q-13 0 -22.5 9.5t-9.5 22.5v175q-66 9 -127.5 31t-101.5 44.5t-74 48t-46.5 37.5t-17.5 18q-17 21 -2 41l103 135q7 10 23 12q15 2 24 -9l2 -2q113 -99 243 -125q37 -8 74 -8q81 0 142.5 43 t61.5 122q0 28 -15 53t-33.5 42t-58.5 37.5t-66 32t-80 32.5q-39 16 -61.5 25t-61.5 26.5t-62.5 31t-56.5 35.5t-53.5 42.5t-43.5 49t-35.5 58t-21 66.5t-8.5 78q0 138 98 242t255 134v180q0 13 9.5 22.5t22.5 9.5h135q14 0 23 -9t9 -23v-176q57 -6 110.5 -23t87 -33.5 t63.5 -37.5t39 -29t15 -14q17 -18 5 -38l-81 -146q-8 -15 -23 -16q-14 -3 -27 7q-3 3 -14.5 12t-39 26.5t-58.5 32t-74.5 26t-85.5 11.5q-95 0 -155 -43t-60 -111q0 -26 8.5 -48t29.5 -41.5t39.5 -33t56 -31t60.5 -27t70 -27.5q53 -20 81 -31.5t76 -35t75.5 -42.5t62 -50 t53 -63.5t31.5 -76.5t13 -94z" />
+<glyph unicode="&#xf156;" horiz-adv-x="898" d="M898 1066v-102q0 -14 -9 -23t-23 -9h-168q-23 -144 -129 -234t-276 -110q167 -178 459 -536q14 -16 4 -34q-8 -18 -29 -18h-195q-16 0 -25 12q-306 367 -498 571q-9 9 -9 22v127q0 13 9.5 22.5t22.5 9.5h112q132 0 212.5 43t102.5 125h-427q-14 0 -23 9t-9 23v102 q0 14 9 23t23 9h413q-57 113 -268 113h-145q-13 0 -22.5 9.5t-9.5 22.5v133q0 14 9 23t23 9h832q14 0 23 -9t9 -23v-102q0 -14 -9 -23t-23 -9h-233q47 -61 64 -144h171q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf157;" horiz-adv-x="1027" d="M603 0h-172q-13 0 -22.5 9t-9.5 23v330h-288q-13 0 -22.5 9t-9.5 23v103q0 13 9.5 22.5t22.5 9.5h288v85h-288q-13 0 -22.5 9t-9.5 23v104q0 13 9.5 22.5t22.5 9.5h214l-321 578q-8 16 0 32q10 16 28 16h194q19 0 29 -18l215 -425q19 -38 56 -125q10 24 30.5 68t27.5 61 l191 420q8 19 29 19h191q17 0 27 -16q9 -14 1 -31l-313 -579h215q13 0 22.5 -9.5t9.5 -22.5v-104q0 -14 -9.5 -23t-22.5 -9h-290v-85h290q13 0 22.5 -9.5t9.5 -22.5v-103q0 -14 -9.5 -23t-22.5 -9h-290v-330q0 -13 -9.5 -22.5t-22.5 -9.5z" />
+<glyph unicode="&#xf158;" horiz-adv-x="1280" d="M1043 971q0 100 -65 162t-171 62h-320v-448h320q106 0 171 62t65 162zM1280 971q0 -193 -126.5 -315t-326.5 -122h-340v-118h505q14 0 23 -9t9 -23v-128q0 -14 -9 -23t-23 -9h-505v-192q0 -14 -9.5 -23t-22.5 -9h-167q-14 0 -23 9t-9 23v192h-224q-14 0 -23 9t-9 23v128 q0 14 9 23t23 9h224v118h-224q-14 0 -23 9t-9 23v149q0 13 9 22.5t23 9.5h224v629q0 14 9 23t23 9h539q200 0 326.5 -122t126.5 -315z" />
+<glyph unicode="&#xf159;" horiz-adv-x="1792" d="M514 341l81 299h-159l75 -300q1 -1 1 -3t1 -3q0 1 0.5 3.5t0.5 3.5zM630 768l35 128h-292l32 -128h225zM822 768h139l-35 128h-70zM1271 340l78 300h-162l81 -299q0 -1 0.5 -3.5t1.5 -3.5q0 1 0.5 3t0.5 3zM1382 768l33 128h-297l34 -128h230zM1792 736v-64q0 -14 -9 -23 t-23 -9h-213l-164 -616q-7 -24 -31 -24h-159q-24 0 -31 24l-166 616h-209l-167 -616q-7 -24 -31 -24h-159q-11 0 -19.5 7t-10.5 17l-160 616h-208q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h175l-33 128h-142q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h109l-89 344q-5 15 5 28 q10 12 26 12h137q26 0 31 -24l90 -360h359l97 360q7 24 31 24h126q24 0 31 -24l98 -360h365l93 360q5 24 31 24h137q16 0 26 -12q10 -13 5 -28l-91 -344h111q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-145l-34 -128h179q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf15a;" horiz-adv-x="1280" d="M1167 896q18 -182 -131 -258q117 -28 175 -103t45 -214q-7 -71 -32.5 -125t-64.5 -89t-97 -58.5t-121.5 -34.5t-145.5 -15v-255h-154v251q-80 0 -122 1v-252h-154v255q-18 0 -54 0.5t-55 0.5h-200l31 183h111q50 0 58 51v402h16q-6 1 -16 1v287q-13 68 -89 68h-111v164 l212 -1q64 0 97 1v252h154v-247q82 2 122 2v245h154v-252q79 -7 140 -22.5t113 -45t82.5 -78t36.5 -114.5zM952 351q0 36 -15 64t-37 46t-57.5 30.5t-65.5 18.5t-74 9t-69 3t-64.5 -1t-47.5 -1v-338q8 0 37 -0.5t48 -0.5t53 1.5t58.5 4t57 8.5t55.5 14t47.5 21t39.5 30 t24.5 40t9.5 51zM881 827q0 33 -12.5 58.5t-30.5 42t-48 28t-55 16.5t-61.5 8t-58 2.5t-54 -1t-39.5 -0.5v-307q5 0 34.5 -0.5t46.5 0t50 2t55 5.5t51.5 11t48.5 18.5t37 27t27 38.5t9 51z" />
+<glyph unicode="&#xf15b;" d="M1024 1024v472q22 -14 36 -28l408 -408q14 -14 28 -36h-472zM896 992q0 -40 28 -68t68 -28h544v-1056q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h800v-544z" />
+<glyph unicode="&#xf15c;" d="M1468 1060q14 -14 28 -36h-472v472q22 -14 36 -28zM992 896h544v-1056q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h800v-544q0 -40 28 -68t68 -28zM1152 160v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704 q14 0 23 9t9 23zM1152 416v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23zM1152 672v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23z" />
+<glyph unicode="&#xf15d;" horiz-adv-x="1664" d="M1191 1128h177l-72 218l-12 47q-2 16 -2 20h-4l-3 -20q0 -1 -3.5 -18t-7.5 -29zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1572 -23 v-233h-584v90l369 529q12 18 21 27l11 9v3q-2 0 -6.5 -0.5t-7.5 -0.5q-12 -3 -30 -3h-232v-115h-120v229h567v-89l-369 -530q-6 -8 -21 -26l-11 -11v-2l14 2q9 2 30 2h248v119h121zM1661 874v-106h-288v106h75l-47 144h-243l-47 -144h75v-106h-287v106h70l230 662h162 l230 -662h70z" />
+<glyph unicode="&#xf15e;" horiz-adv-x="1664" d="M1191 104h177l-72 218l-12 47q-2 16 -2 20h-4l-3 -20q0 -1 -3.5 -18t-7.5 -29zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1661 -150 v-106h-288v106h75l-47 144h-243l-47 -144h75v-106h-287v106h70l230 662h162l230 -662h70zM1572 1001v-233h-584v90l369 529q12 18 21 27l11 9v3q-2 0 -6.5 -0.5t-7.5 -0.5q-12 -3 -30 -3h-232v-115h-120v229h567v-89l-369 -530q-6 -8 -21 -26l-11 -10v-3l14 3q9 1 30 1h248 v119h121z" />
+<glyph unicode="&#xf160;" horiz-adv-x="1792" d="M736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1792 -32v-192q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h832 q14 0 23 -9t9 -23zM1600 480v-192q0 -14 -9 -23t-23 -9h-640q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h640q14 0 23 -9t9 -23zM1408 992v-192q0 -14 -9 -23t-23 -9h-448q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h448q14 0 23 -9t9 -23zM1216 1504v-192q0 -14 -9 -23t-23 -9h-256 q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h256q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf161;" horiz-adv-x="1792" d="M1216 -32v-192q0 -14 -9 -23t-23 -9h-256q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h256q14 0 23 -9t9 -23zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192 q14 0 23 -9t9 -23zM1408 480v-192q0 -14 -9 -23t-23 -9h-448q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h448q14 0 23 -9t9 -23zM1600 992v-192q0 -14 -9 -23t-23 -9h-640q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h640q14 0 23 -9t9 -23zM1792 1504v-192q0 -14 -9 -23t-23 -9h-832 q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h832q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf162;" d="M1346 223q0 63 -44 116t-103 53q-52 0 -83 -37t-31 -94t36.5 -95t104.5 -38q50 0 85 27t35 68zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23 zM1486 165q0 -62 -13 -121.5t-41 -114t-68 -95.5t-98.5 -65.5t-127.5 -24.5q-62 0 -108 16q-24 8 -42 15l39 113q15 -7 31 -11q37 -13 75 -13q84 0 134.5 58.5t66.5 145.5h-2q-21 -23 -61.5 -37t-84.5 -14q-106 0 -173 71.5t-67 172.5q0 105 72 178t181 73q123 0 205 -94.5 t82 -252.5zM1456 882v-114h-469v114h167v432q0 7 0.5 19t0.5 17v16h-2l-7 -12q-8 -13 -26 -31l-62 -58l-82 86l192 185h123v-654h165z" />
+<glyph unicode="&#xf163;" d="M1346 1247q0 63 -44 116t-103 53q-52 0 -83 -37t-31 -94t36.5 -95t104.5 -38q50 0 85 27t35 68zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9 t9 -23zM1456 -142v-114h-469v114h167v432q0 7 0.5 19t0.5 17v16h-2l-7 -12q-8 -13 -26 -31l-62 -58l-82 86l192 185h123v-654h165zM1486 1189q0 -62 -13 -121.5t-41 -114t-68 -95.5t-98.5 -65.5t-127.5 -24.5q-62 0 -108 16q-24 8 -42 15l39 113q15 -7 31 -11q37 -13 75 -13 q84 0 134.5 58.5t66.5 145.5h-2q-21 -23 -61.5 -37t-84.5 -14q-106 0 -173 71.5t-67 172.5q0 105 72 178t181 73q123 0 205 -94.5t82 -252.5z" />
+<glyph unicode="&#xf164;" horiz-adv-x="1664" d="M256 192q0 26 -19 45t-45 19q-27 0 -45.5 -19t-18.5 -45q0 -27 18.5 -45.5t45.5 -18.5q26 0 45 18.5t19 45.5zM416 704v-640q0 -26 -19 -45t-45 -19h-288q-26 0 -45 19t-19 45v640q0 26 19 45t45 19h288q26 0 45 -19t19 -45zM1600 704q0 -86 -55 -149q15 -44 15 -76 q3 -76 -43 -137q17 -56 0 -117q-15 -57 -54 -94q9 -112 -49 -181q-64 -76 -197 -78h-36h-76h-17q-66 0 -144 15.5t-121.5 29t-120.5 39.5q-123 43 -158 44q-26 1 -45 19.5t-19 44.5v641q0 25 18 43.5t43 20.5q24 2 76 59t101 121q68 87 101 120q18 18 31 48t17.5 48.5 t13.5 60.5q7 39 12.5 61t19.5 52t34 50q19 19 45 19q46 0 82.5 -10.5t60 -26t40 -40.5t24 -45t12 -50t5 -45t0.5 -39q0 -38 -9.5 -76t-19 -60t-27.5 -56q-3 -6 -10 -18t-11 -22t-8 -24h277q78 0 135 -57t57 -135z" />
+<glyph unicode="&#xf165;" horiz-adv-x="1664" d="M256 960q0 -26 -19 -45t-45 -19q-27 0 -45.5 19t-18.5 45q0 27 18.5 45.5t45.5 18.5q26 0 45 -18.5t19 -45.5zM416 448v640q0 26 -19 45t-45 19h-288q-26 0 -45 -19t-19 -45v-640q0 -26 19 -45t45 -19h288q26 0 45 19t19 45zM1545 597q55 -61 55 -149q-1 -78 -57.5 -135 t-134.5 -57h-277q4 -14 8 -24t11 -22t10 -18q18 -37 27 -57t19 -58.5t10 -76.5q0 -24 -0.5 -39t-5 -45t-12 -50t-24 -45t-40 -40.5t-60 -26t-82.5 -10.5q-26 0 -45 19q-20 20 -34 50t-19.5 52t-12.5 61q-9 42 -13.5 60.5t-17.5 48.5t-31 48q-33 33 -101 120q-49 64 -101 121 t-76 59q-25 2 -43 20.5t-18 43.5v641q0 26 19 44.5t45 19.5q35 1 158 44q77 26 120.5 39.5t121.5 29t144 15.5h17h76h36q133 -2 197 -78q58 -69 49 -181q39 -37 54 -94q17 -61 0 -117q46 -61 43 -137q0 -32 -15 -76z" />
+<glyph unicode="&#xf166;" d="M919 233v157q0 50 -29 50q-17 0 -33 -16v-224q16 -16 33 -16q29 0 29 49zM1103 355h66v34q0 51 -33 51t-33 -51v-34zM532 621v-70h-80v-423h-74v423h-78v70h232zM733 495v-367h-67v40q-39 -45 -76 -45q-33 0 -42 28q-6 16 -6 54v290h66v-270q0 -24 1 -26q1 -15 15 -15 q20 0 42 31v280h67zM985 384v-146q0 -52 -7 -73q-12 -42 -53 -42q-35 0 -68 41v-36h-67v493h67v-161q32 40 68 40q41 0 53 -42q7 -21 7 -74zM1236 255v-9q0 -29 -2 -43q-3 -22 -15 -40q-27 -40 -80 -40q-52 0 -81 38q-21 27 -21 86v129q0 59 20 86q29 38 80 38t78 -38 q21 -28 21 -86v-76h-133v-65q0 -51 34 -51q24 0 30 26q0 1 0.5 7t0.5 16.5v21.5h68zM785 1079v-156q0 -51 -32 -51t-32 51v156q0 52 32 52t32 -52zM1318 366q0 177 -19 260q-10 44 -43 73.5t-76 34.5q-136 15 -412 15q-275 0 -411 -15q-44 -5 -76.5 -34.5t-42.5 -73.5 q-20 -87 -20 -260q0 -176 20 -260q10 -43 42.5 -73t75.5 -35q137 -15 412 -15t412 15q43 5 75.5 35t42.5 73q20 84 20 260zM563 1017l90 296h-75l-51 -195l-53 195h-78l24 -69t23 -69q35 -103 46 -158v-201h74v201zM852 936v130q0 58 -21 87q-29 38 -78 38q-51 0 -78 -38 q-21 -29 -21 -87v-130q0 -58 21 -87q27 -38 78 -38q49 0 78 38q21 27 21 87zM1033 816h67v370h-67v-283q-22 -31 -42 -31q-15 0 -16 16q-1 2 -1 26v272h-67v-293q0 -37 6 -55q11 -27 43 -27q36 0 77 45v-40zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960 q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf167;" d="M971 292v-211q0 -67 -39 -67q-23 0 -45 22v301q22 22 45 22q39 0 39 -67zM1309 291v-46h-90v46q0 68 45 68t45 -68zM343 509h107v94h-312v-94h105v-569h100v569zM631 -60h89v494h-89v-378q-30 -42 -57 -42q-18 0 -21 21q-1 3 -1 35v364h-89v-391q0 -49 8 -73 q12 -37 58 -37q48 0 102 61v-54zM1060 88v197q0 73 -9 99q-17 56 -71 56q-50 0 -93 -54v217h-89v-663h89v48q45 -55 93 -55q54 0 71 55q9 27 9 100zM1398 98v13h-91q0 -51 -2 -61q-7 -36 -40 -36q-46 0 -46 69v87h179v103q0 79 -27 116q-39 51 -106 51q-68 0 -107 -51 q-28 -37 -28 -116v-173q0 -79 29 -116q39 -51 108 -51q72 0 108 53q18 27 21 54q2 9 2 58zM790 1011v210q0 69 -43 69t-43 -69v-210q0 -70 43 -70t43 70zM1509 260q0 -234 -26 -350q-14 -59 -58 -99t-102 -46q-184 -21 -555 -21t-555 21q-58 6 -102.5 46t-57.5 99 q-26 112 -26 350q0 234 26 350q14 59 58 99t103 47q183 20 554 20t555 -20q58 -7 102.5 -47t57.5 -99q26 -112 26 -350zM511 1536h102l-121 -399v-271h-100v271q-14 74 -61 212q-37 103 -65 187h106l71 -263zM881 1203v-175q0 -81 -28 -118q-37 -51 -106 -51q-67 0 -105 51 q-28 38 -28 118v175q0 80 28 117q38 51 105 51q69 0 106 -51q28 -37 28 -117zM1216 1365v-499h-91v55q-53 -62 -103 -62q-46 0 -59 37q-8 24 -8 75v394h91v-367q0 -33 1 -35q3 -22 21 -22q27 0 57 43v381h91z" />
+<glyph unicode="&#xf168;" horiz-adv-x="1408" d="M597 869q-10 -18 -257 -456q-27 -46 -65 -46h-239q-21 0 -31 17t0 36l253 448q1 0 0 1l-161 279q-12 22 -1 37q9 15 32 15h239q40 0 66 -45zM1403 1511q11 -16 0 -37l-528 -934v-1l336 -615q11 -20 1 -37q-10 -15 -32 -15h-239q-42 0 -66 45l-339 622q18 32 531 942 q25 45 64 45h241q22 0 31 -15z" />
+<glyph unicode="&#xf169;" d="M685 771q0 1 -126 222q-21 34 -52 34h-184q-18 0 -26 -11q-7 -12 1 -29l125 -216v-1l-196 -346q-9 -14 0 -28q8 -13 24 -13h185q31 0 50 36zM1309 1268q-7 12 -24 12h-187q-30 0 -49 -35l-411 -729q1 -2 262 -481q20 -35 52 -35h184q18 0 25 12q8 13 -1 28l-260 476v1 l409 723q8 16 0 28zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf16a;" horiz-adv-x="1792" d="M1280 640q0 37 -30 54l-512 320q-31 20 -65 2q-33 -18 -33 -56v-640q0 -38 33 -56q16 -8 31 -8q20 0 34 10l512 320q30 17 30 54zM1792 640q0 -96 -1 -150t-8.5 -136.5t-22.5 -147.5q-16 -73 -69 -123t-124 -58q-222 -25 -671 -25t-671 25q-71 8 -124.5 58t-69.5 123 q-14 65 -21.5 147.5t-8.5 136.5t-1 150t1 150t8.5 136.5t22.5 147.5q16 73 69 123t124 58q222 25 671 25t671 -25q71 -8 124.5 -58t69.5 -123q14 -65 21.5 -147.5t8.5 -136.5t1 -150z" />
+<glyph unicode="&#xf16b;" horiz-adv-x="1792" d="M402 829l494 -305l-342 -285l-490 319zM1388 274v-108l-490 -293v-1l-1 1l-1 -1v1l-489 293v108l147 -96l342 284v2l1 -1l1 1v-2l343 -284zM554 1418l342 -285l-494 -304l-338 270zM1390 829l338 -271l-489 -319l-343 285zM1239 1418l489 -319l-338 -270l-494 304z" />
+<glyph unicode="&#xf16c;" horiz-adv-x="1408" d="M928 135v-151l-707 -1v151zM1169 481v-701l-1 -35v-1h-1132l-35 1h-1v736h121v-618h928v618h120zM241 393l704 -65l-13 -150l-705 65zM309 709l683 -183l-39 -146l-683 183zM472 1058l609 -360l-77 -130l-609 360zM832 1389l398 -585l-124 -85l-399 584zM1285 1536 l121 -697l-149 -26l-121 697z" />
+<glyph unicode="&#xf16d;" d="M1362 110v648h-135q20 -63 20 -131q0 -126 -64 -232.5t-174 -168.5t-240 -62q-197 0 -337 135.5t-140 327.5q0 68 20 131h-141v-648q0 -26 17.5 -43.5t43.5 -17.5h1069q25 0 43 17.5t18 43.5zM1078 643q0 124 -90.5 211.5t-218.5 87.5q-127 0 -217.5 -87.5t-90.5 -211.5 t90.5 -211.5t217.5 -87.5q128 0 218.5 87.5t90.5 211.5zM1362 1003v165q0 28 -20 48.5t-49 20.5h-174q-29 0 -49 -20.5t-20 -48.5v-165q0 -29 20 -49t49 -20h174q29 0 49 20t20 49zM1536 1211v-1142q0 -81 -58 -139t-139 -58h-1142q-81 0 -139 58t-58 139v1142q0 81 58 139 t139 58h1142q81 0 139 -58t58 -139z" />
+<glyph unicode="&#xf16e;" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM698 640q0 88 -62 150t-150 62t-150 -62t-62 -150t62 -150t150 -62t150 62t62 150zM1262 640q0 88 -62 150 t-150 62t-150 -62t-62 -150t62 -150t150 -62t150 62t62 150z" />
+<glyph unicode="&#xf170;" d="M768 914l201 -306h-402zM1133 384h94l-459 691l-459 -691h94l104 160h522zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf171;" horiz-adv-x="1408" d="M815 677q8 -63 -50.5 -101t-111.5 -6q-39 17 -53.5 58t-0.5 82t52 58q36 18 72.5 12t64 -35.5t27.5 -67.5zM926 698q-14 107 -113 164t-197 13q-63 -28 -100.5 -88.5t-34.5 -129.5q4 -91 77.5 -155t165.5 -56q91 8 152 84t50 168zM1165 1240q-20 27 -56 44.5t-58 22 t-71 12.5q-291 47 -566 -2q-43 -7 -66 -12t-55 -22t-50 -43q30 -28 76 -45.5t73.5 -22t87.5 -11.5q228 -29 448 -1q63 8 89.5 12t72.5 21.5t75 46.5zM1222 205q-8 -26 -15.5 -76.5t-14 -84t-28.5 -70t-58 -56.5q-86 -48 -189.5 -71.5t-202 -22t-201.5 18.5q-46 8 -81.5 18 t-76.5 27t-73 43.5t-52 61.5q-25 96 -57 292l6 16l18 9q223 -148 506.5 -148t507.5 148q21 -6 24 -23t-5 -45t-8 -37zM1403 1166q-26 -167 -111 -655q-5 -30 -27 -56t-43.5 -40t-54.5 -31q-252 -126 -610 -88q-248 27 -394 139q-15 12 -25.5 26.5t-17 35t-9 34t-6 39.5 t-5.5 35q-9 50 -26.5 150t-28 161.5t-23.5 147.5t-22 158q3 26 17.5 48.5t31.5 37.5t45 30t46 22.5t48 18.5q125 46 313 64q379 37 676 -50q155 -46 215 -122q16 -20 16.5 -51t-5.5 -54z" />
+<glyph unicode="&#xf172;" d="M848 666q0 43 -41 66t-77 1q-43 -20 -42.5 -72.5t43.5 -70.5q39 -23 81 4t36 72zM928 682q8 -66 -36 -121t-110 -61t-119 40t-56 113q-2 49 25.5 93t72.5 64q70 31 141.5 -10t81.5 -118zM1100 1073q-20 -21 -53.5 -34t-53 -16t-63.5 -8q-155 -20 -324 0q-44 6 -63 9.5 t-52.5 16t-54.5 32.5q13 19 36 31t40 15.5t47 8.5q198 35 408 1q33 -5 51 -8.5t43 -16t39 -31.5zM1142 327q0 7 5.5 26.5t3 32t-17.5 16.5q-161 -106 -365 -106t-366 106l-12 -6l-5 -12q26 -154 41 -210q47 -81 204 -108q249 -46 428 53q34 19 49 51.5t22.5 85.5t12.5 71z M1272 1020q9 53 -8 75q-43 55 -155 88q-216 63 -487 36q-132 -12 -226 -46q-38 -15 -59.5 -25t-47 -34t-29.5 -54q8 -68 19 -138t29 -171t24 -137q1 -5 5 -31t7 -36t12 -27t22 -28q105 -80 284 -100q259 -28 440 63q24 13 39.5 23t31 29t19.5 40q48 267 80 473zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf173;" horiz-adv-x="1024" d="M944 207l80 -237q-23 -35 -111 -66t-177 -32q-104 -2 -190.5 26t-142.5 74t-95 106t-55.5 120t-16.5 118v544h-168v215q72 26 129 69.5t91 90t58 102t34 99t15 88.5q1 5 4.5 8.5t7.5 3.5h244v-424h333v-252h-334v-518q0 -30 6.5 -56t22.5 -52.5t49.5 -41.5t81.5 -14 q78 2 134 29z" />
+<glyph unicode="&#xf174;" d="M1136 75l-62 183q-44 -22 -103 -22q-36 -1 -62 10.5t-38.5 31.5t-17.5 40.5t-5 43.5v398h257v194h-256v326h-188q-8 0 -9 -10q-5 -44 -17.5 -87t-39 -95t-77 -95t-118.5 -68v-165h130v-418q0 -57 21.5 -115t65 -111t121 -85.5t176.5 -30.5q69 1 136.5 25t85.5 50z M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf175;" horiz-adv-x="768" d="M765 237q8 -19 -5 -35l-350 -384q-10 -10 -23 -10q-14 0 -24 10l-355 384q-13 16 -5 35q9 19 29 19h224v1248q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1248h224q21 0 29 -19z" />
+<glyph unicode="&#xf176;" horiz-adv-x="768" d="M765 1043q-9 -19 -29 -19h-224v-1248q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v1248h-224q-21 0 -29 19t5 35l350 384q10 10 23 10q14 0 24 -10l355 -384q13 -16 5 -35z" />
+<glyph unicode="&#xf177;" horiz-adv-x="1792" d="M1792 736v-192q0 -14 -9 -23t-23 -9h-1248v-224q0 -21 -19 -29t-35 5l-384 350q-10 10 -10 23q0 14 10 24l384 354q16 14 35 6q19 -9 19 -29v-224h1248q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf178;" horiz-adv-x="1792" d="M1728 643q0 -14 -10 -24l-384 -354q-16 -14 -35 -6q-19 9 -19 29v224h-1248q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h1248v224q0 21 19 29t35 -5l384 -350q10 -10 10 -23z" />
+<glyph unicode="&#xf179;" horiz-adv-x="1408" d="M1393 321q-39 -125 -123 -250q-129 -196 -257 -196q-49 0 -140 32q-86 32 -151 32q-61 0 -142 -33q-81 -34 -132 -34q-152 0 -301 259q-147 261 -147 503q0 228 113 374q112 144 284 144q72 0 177 -30q104 -30 138 -30q45 0 143 34q102 34 173 34q119 0 213 -65 q52 -36 104 -100q-79 -67 -114 -118q-65 -94 -65 -207q0 -124 69 -223t158 -126zM1017 1494q0 -61 -29 -136q-30 -75 -93 -138q-54 -54 -108 -72q-37 -11 -104 -17q3 149 78 257q74 107 250 148q1 -3 2.5 -11t2.5 -11q0 -4 0.5 -10t0.5 -10z" />
+<glyph unicode="&#xf17a;" horiz-adv-x="1664" d="M682 530v-651l-682 94v557h682zM682 1273v-659h-682v565zM1664 530v-786l-907 125v661h907zM1664 1408v-794h-907v669z" />
+<glyph unicode="&#xf17b;" horiz-adv-x="1408" d="M493 1053q16 0 27.5 11.5t11.5 27.5t-11.5 27.5t-27.5 11.5t-27 -11.5t-11 -27.5t11 -27.5t27 -11.5zM915 1053q16 0 27 11.5t11 27.5t-11 27.5t-27 11.5t-27.5 -11.5t-11.5 -27.5t11.5 -27.5t27.5 -11.5zM103 869q42 0 72 -30t30 -72v-430q0 -43 -29.5 -73t-72.5 -30 t-73 30t-30 73v430q0 42 30 72t73 30zM1163 850v-666q0 -46 -32 -78t-77 -32h-75v-227q0 -43 -30 -73t-73 -30t-73 30t-30 73v227h-138v-227q0 -43 -30 -73t-73 -30q-42 0 -72 30t-30 73l-1 227h-74q-46 0 -78 32t-32 78v666h918zM931 1255q107 -55 171 -153.5t64 -215.5 h-925q0 117 64 215.5t172 153.5l-71 131q-7 13 5 20q13 6 20 -6l72 -132q95 42 201 42t201 -42l72 132q7 12 20 6q12 -7 5 -20zM1408 767v-430q0 -43 -30 -73t-73 -30q-42 0 -72 30t-30 73v430q0 43 30 72.5t72 29.5q43 0 73 -29.5t30 -72.5z" />
+<glyph unicode="&#xf17c;" d="M663 1125q-11 -1 -15.5 -10.5t-8.5 -9.5q-5 -1 -5 5q0 12 19 15h10zM750 1111q-4 -1 -11.5 6.5t-17.5 4.5q24 11 32 -2q3 -6 -3 -9zM399 684q-4 1 -6 -3t-4.5 -12.5t-5.5 -13.5t-10 -13q-7 -10 -1 -12q4 -1 12.5 7t12.5 18q1 3 2 7t2 6t1.5 4.5t0.5 4v3t-1 2.5t-3 2z M1254 325q0 18 -55 42q4 15 7.5 27.5t5 26t3 21.5t0.5 22.5t-1 19.5t-3.5 22t-4 20.5t-5 25t-5.5 26.5q-10 48 -47 103t-72 75q24 -20 57 -83q87 -162 54 -278q-11 -40 -50 -42q-31 -4 -38.5 18.5t-8 83.5t-11.5 107q-9 39 -19.5 69t-19.5 45.5t-15.5 24.5t-13 15t-7.5 7 q-14 62 -31 103t-29.5 56t-23.5 33t-15 40q-4 21 6 53.5t4.5 49.5t-44.5 25q-15 3 -44.5 18t-35.5 16q-8 1 -11 26t8 51t36 27q37 3 51 -30t4 -58q-11 -19 -2 -26.5t30 -0.5q13 4 13 36v37q-5 30 -13.5 50t-21 30.5t-23.5 15t-27 7.5q-107 -8 -89 -134q0 -15 -1 -15 q-9 9 -29.5 10.5t-33 -0.5t-15.5 5q1 57 -16 90t-45 34q-27 1 -41.5 -27.5t-16.5 -59.5q-1 -15 3.5 -37t13 -37.5t15.5 -13.5q10 3 16 14q4 9 -7 8q-7 0 -15.5 14.5t-9.5 33.5q-1 22 9 37t34 14q17 0 27 -21t9.5 -39t-1.5 -22q-22 -15 -31 -29q-8 -12 -27.5 -23.5 t-20.5 -12.5q-13 -14 -15.5 -27t7.5 -18q14 -8 25 -19.5t16 -19t18.5 -13t35.5 -6.5q47 -2 102 15q2 1 23 7t34.5 10.5t29.5 13t21 17.5q9 14 20 8q5 -3 6.5 -8.5t-3 -12t-16.5 -9.5q-20 -6 -56.5 -21.5t-45.5 -19.5q-44 -19 -70 -23q-25 -5 -79 2q-10 2 -9 -2t17 -19 q25 -23 67 -22q17 1 36 7t36 14t33.5 17.5t30 17t24.5 12t17.5 2.5t8.5 -11q0 -2 -1 -4.5t-4 -5t-6 -4.5t-8.5 -5t-9 -4.5t-10 -5t-9.5 -4.5q-28 -14 -67.5 -44t-66.5 -43t-49 -1q-21 11 -63 73q-22 31 -25 22q-1 -3 -1 -10q0 -25 -15 -56.5t-29.5 -55.5t-21 -58t11.5 -63 q-23 -6 -62.5 -90t-47.5 -141q-2 -18 -1.5 -69t-5.5 -59q-8 -24 -29 -3q-32 31 -36 94q-2 28 4 56q4 19 -1 18l-4 -5q-36 -65 10 -166q5 -12 25 -28t24 -20q20 -23 104 -90.5t93 -76.5q16 -15 17.5 -38t-14 -43t-45.5 -23q8 -15 29 -44.5t28 -54t7 -70.5q46 24 7 92 q-4 8 -10.5 16t-9.5 12t-2 6q3 5 13 9.5t20 -2.5q46 -52 166 -36q133 15 177 87q23 38 34 30q12 -6 10 -52q-1 -25 -23 -92q-9 -23 -6 -37.5t24 -15.5q3 19 14.5 77t13.5 90q2 21 -6.5 73.5t-7.5 97t23 70.5q15 18 51 18q1 37 34.5 53t72.5 10.5t60 -22.5zM626 1152 q3 17 -2.5 30t-11.5 15q-9 2 -9 -7q2 -5 5 -6q10 0 7 -15q-3 -20 8 -20q3 0 3 3zM1045 955q-2 8 -6.5 11.5t-13 5t-14.5 5.5q-5 3 -9.5 8t-7 8t-5.5 6.5t-4 4t-4 -1.5q-14 -16 7 -43.5t39 -31.5q9 -1 14.5 8t3.5 20zM867 1168q0 11 -5 19.5t-11 12.5t-9 3q-14 -1 -7 -7l4 -2 q14 -4 18 -31q0 -3 8 2zM921 1401q0 2 -2.5 5t-9 7t-9.5 6q-15 15 -24 15q-9 -1 -11.5 -7.5t-1 -13t-0.5 -12.5q-1 -4 -6 -10.5t-6 -9t3 -8.5q4 -3 8 0t11 9t15 9q1 1 9 1t15 2t9 7zM1486 60q20 -12 31 -24.5t12 -24t-2.5 -22.5t-15.5 -22t-23.5 -19.5t-30 -18.5 t-31.5 -16.5t-32 -15.5t-27 -13q-38 -19 -85.5 -56t-75.5 -64q-17 -16 -68 -19.5t-89 14.5q-18 9 -29.5 23.5t-16.5 25.5t-22 19.5t-47 9.5q-44 1 -130 1q-19 0 -57 -1.5t-58 -2.5q-44 -1 -79.5 -15t-53.5 -30t-43.5 -28.5t-53.5 -11.5q-29 1 -111 31t-146 43q-19 4 -51 9.5 t-50 9t-39.5 9.5t-33.5 14.5t-17 19.5q-10 23 7 66.5t18 54.5q1 16 -4 40t-10 42.5t-4.5 36.5t10.5 27q14 12 57 14t60 12q30 18 42 35t12 51q21 -73 -32 -106q-32 -20 -83 -15q-34 3 -43 -10q-13 -15 5 -57q2 -6 8 -18t8.5 -18t4.5 -17t1 -22q0 -15 -17 -49t-14 -48 q3 -17 37 -26q20 -6 84.5 -18.5t99.5 -20.5q24 -6 74 -22t82.5 -23t55.5 -4q43 6 64.5 28t23 48t-7.5 58.5t-19 52t-20 36.5q-121 190 -169 242q-68 74 -113 40q-11 -9 -15 15q-3 16 -2 38q1 29 10 52t24 47t22 42q8 21 26.5 72t29.5 78t30 61t39 54q110 143 124 195 q-12 112 -16 310q-2 90 24 151.5t106 104.5q39 21 104 21q53 1 106 -13.5t89 -41.5q57 -42 91.5 -121.5t29.5 -147.5q-5 -95 30 -214q34 -113 133 -218q55 -59 99.5 -163t59.5 -191q8 -49 5 -84.5t-12 -55.5t-20 -22q-10 -2 -23.5 -19t-27 -35.5t-40.5 -33.5t-61 -14 q-18 1 -31.5 5t-22.5 13.5t-13.5 15.5t-11.5 20.5t-9 19.5q-22 37 -41 30t-28 -49t7 -97q20 -70 1 -195q-10 -65 18 -100.5t73 -33t85 35.5q59 49 89.5 66.5t103.5 42.5q53 18 77 36.5t18.5 34.5t-25 28.5t-51.5 23.5q-33 11 -49.5 48t-15 72.5t15.5 47.5q1 -31 8 -56.5 t14.5 -40.5t20.5 -28.5t21 -19t21.5 -13t16.5 -9.5z" />
+<glyph unicode="&#xf17d;" d="M1024 36q-42 241 -140 498h-2l-2 -1q-16 -6 -43 -16.5t-101 -49t-137 -82t-131 -114.5t-103 -148l-15 11q184 -150 418 -150q132 0 256 52zM839 643q-21 49 -53 111q-311 -93 -673 -93q-1 -7 -1 -21q0 -124 44 -236.5t124 -201.5q50 89 123.5 166.5t142.5 124.5t130.5 81 t99.5 48l37 13q4 1 13 3.5t13 4.5zM732 855q-120 213 -244 378q-138 -65 -234 -186t-128 -272q302 0 606 80zM1416 536q-210 60 -409 29q87 -239 128 -469q111 75 185 189.5t96 250.5zM611 1277q-1 0 -2 -1q1 1 2 1zM1201 1132q-185 164 -433 164q-76 0 -155 -19 q131 -170 246 -382q69 26 130 60.5t96.5 61.5t65.5 57t37.5 40.5zM1424 647q-3 232 -149 410l-1 -1q-9 -12 -19 -24.5t-43.5 -44.5t-71 -60.5t-100 -65t-131.5 -64.5q25 -53 44 -95q2 -6 6.5 -17.5t7.5 -16.5q36 5 74.5 7t73.5 2t69 -1.5t64 -4t56.5 -5.5t48 -6.5t36.5 -6 t25 -4.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf17e;" d="M1173 473q0 50 -19.5 91.5t-48.5 68.5t-73 49t-82.5 34t-87.5 23l-104 24q-30 7 -44 10.5t-35 11.5t-30 16t-16.5 21t-7.5 30q0 77 144 77q43 0 77 -12t54 -28.5t38 -33.5t40 -29t48 -12q47 0 75.5 32t28.5 77q0 55 -56 99.5t-142 67.5t-182 23q-68 0 -132 -15.5 t-119.5 -47t-89 -87t-33.5 -128.5q0 -61 19 -106.5t56 -75.5t80 -48.5t103 -32.5l146 -36q90 -22 112 -36q32 -20 32 -60q0 -39 -40 -64.5t-105 -25.5q-51 0 -91.5 16t-65 38.5t-45.5 45t-46 38.5t-54 16q-50 0 -75.5 -30t-25.5 -75q0 -92 122 -157.5t291 -65.5 q73 0 140 18.5t122.5 53.5t88.5 93.5t33 131.5zM1536 256q0 -159 -112.5 -271.5t-271.5 -112.5q-130 0 -234 80q-77 -16 -150 -16q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5q0 73 16 150q-80 104 -80 234q0 159 112.5 271.5t271.5 112.5q130 0 234 -80 q77 16 150 16q143 0 273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -73 -16 -150q80 -104 80 -234z" />
+<glyph unicode="&#xf180;" horiz-adv-x="1280" d="M1000 1102l37 194q5 23 -9 40t-35 17h-712q-23 0 -38.5 -17t-15.5 -37v-1101q0 -7 6 -1l291 352q23 26 38 33.5t48 7.5h239q22 0 37 14.5t18 29.5q24 130 37 191q4 21 -11.5 40t-36.5 19h-294q-29 0 -48 19t-19 48v42q0 29 19 47.5t48 18.5h346q18 0 35 13.5t20 29.5z M1227 1324q-15 -73 -53.5 -266.5t-69.5 -350t-35 -173.5q-6 -22 -9 -32.5t-14 -32.5t-24.5 -33t-38.5 -21t-58 -10h-271q-13 0 -22 -10q-8 -9 -426 -494q-22 -25 -58.5 -28.5t-48.5 5.5q-55 22 -55 98v1410q0 55 38 102.5t120 47.5h888q95 0 127 -53t10 -159zM1227 1324 l-158 -790q4 17 35 173.5t69.5 350t53.5 266.5z" />
+<glyph unicode="&#xf181;" d="M704 192v1024q0 14 -9 23t-23 9h-480q-14 0 -23 -9t-9 -23v-1024q0 -14 9 -23t23 -9h480q14 0 23 9t9 23zM1376 576v640q0 14 -9 23t-23 9h-480q-14 0 -23 -9t-9 -23v-640q0 -14 9 -23t23 -9h480q14 0 23 9t9 23zM1536 1344v-1408q0 -26 -19 -45t-45 -19h-1408 q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf182;" horiz-adv-x="1280" d="M1280 480q0 -40 -28 -68t-68 -28q-51 0 -80 43l-227 341h-45v-132l247 -411q9 -15 9 -33q0 -26 -19 -45t-45 -19h-192v-272q0 -46 -33 -79t-79 -33h-160q-46 0 -79 33t-33 79v272h-192q-26 0 -45 19t-19 45q0 18 9 33l247 411v132h-45l-227 -341q-29 -43 -80 -43 q-40 0 -68 28t-28 68q0 29 16 53l256 384q73 107 176 107h384q103 0 176 -107l256 -384q16 -24 16 -53zM864 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" />
+<glyph unicode="&#xf183;" horiz-adv-x="1024" d="M1024 832v-416q0 -40 -28 -68t-68 -28t-68 28t-28 68v352h-64v-912q0 -46 -33 -79t-79 -33t-79 33t-33 79v464h-64v-464q0 -46 -33 -79t-79 -33t-79 33t-33 79v912h-64v-352q0 -40 -28 -68t-68 -28t-68 28t-28 68v416q0 80 56 136t136 56h640q80 0 136 -56t56 -136z M736 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" />
+<glyph unicode="&#xf184;" d="M773 234l350 473q16 22 24.5 59t-6 85t-61.5 79q-40 26 -83 25.5t-73.5 -17.5t-54.5 -45q-36 -40 -96 -40q-59 0 -95 40q-24 28 -54.5 45t-73.5 17.5t-84 -25.5q-46 -31 -60.5 -79t-6 -85t24.5 -59zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf185;" horiz-adv-x="1792" d="M1472 640q0 117 -45.5 223.5t-123 184t-184 123t-223.5 45.5t-223.5 -45.5t-184 -123t-123 -184t-45.5 -223.5t45.5 -223.5t123 -184t184 -123t223.5 -45.5t223.5 45.5t184 123t123 184t45.5 223.5zM1748 363q-4 -15 -20 -20l-292 -96v-306q0 -16 -13 -26q-15 -10 -29 -4 l-292 94l-180 -248q-10 -13 -26 -13t-26 13l-180 248l-292 -94q-14 -6 -29 4q-13 10 -13 26v306l-292 96q-16 5 -20 20q-5 17 4 29l180 248l-180 248q-9 13 -4 29q4 15 20 20l292 96v306q0 16 13 26q15 10 29 4l292 -94l180 248q9 12 26 12t26 -12l180 -248l292 94 q14 6 29 -4q13 -10 13 -26v-306l292 -96q16 -5 20 -20q5 -16 -4 -29l-180 -248l180 -248q9 -12 4 -29z" />
+<glyph unicode="&#xf186;" d="M1262 233q-54 -9 -110 -9q-182 0 -337 90t-245 245t-90 337q0 192 104 357q-201 -60 -328.5 -229t-127.5 -384q0 -130 51 -248.5t136.5 -204t204 -136.5t248.5 -51q144 0 273.5 61.5t220.5 171.5zM1465 318q-94 -203 -283.5 -324.5t-413.5 -121.5q-156 0 -298 61 t-245 164t-164 245t-61 298q0 153 57.5 292.5t156 241.5t235.5 164.5t290 68.5q44 2 61 -39q18 -41 -15 -72q-86 -78 -131.5 -181.5t-45.5 -218.5q0 -148 73 -273t198 -198t273 -73q118 0 228 51q41 18 72 -13q14 -14 17.5 -34t-4.5 -38z" />
+<glyph unicode="&#xf187;" horiz-adv-x="1792" d="M1088 704q0 26 -19 45t-45 19h-256q-26 0 -45 -19t-19 -45t19 -45t45 -19h256q26 0 45 19t19 45zM1664 896v-960q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v960q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1728 1344v-256q0 -26 -19 -45t-45 -19h-1536 q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1536q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf188;" horiz-adv-x="1664" d="M1632 576q0 -26 -19 -45t-45 -19h-224q0 -171 -67 -290l208 -209q19 -19 19 -45t-19 -45q-18 -19 -45 -19t-45 19l-198 197q-5 -5 -15 -13t-42 -28.5t-65 -36.5t-82 -29t-97 -13v896h-128v-896q-51 0 -101.5 13.5t-87 33t-66 39t-43.5 32.5l-15 14l-183 -207 q-20 -21 -48 -21q-24 0 -43 16q-19 18 -20.5 44.5t15.5 46.5l202 227q-58 114 -58 274h-224q-26 0 -45 19t-19 45t19 45t45 19h224v294l-173 173q-19 19 -19 45t19 45t45 19t45 -19l173 -173h844l173 173q19 19 45 19t45 -19t19 -45t-19 -45l-173 -173v-294h224q26 0 45 -19 t19 -45zM1152 1152h-640q0 133 93.5 226.5t226.5 93.5t226.5 -93.5t93.5 -226.5z" />
+<glyph unicode="&#xf189;" horiz-adv-x="1920" d="M1917 1016q23 -64 -150 -294q-24 -32 -65 -85q-78 -100 -90 -131q-17 -41 14 -81q17 -21 81 -82h1l1 -1l1 -1l2 -2q141 -131 191 -221q3 -5 6.5 -12.5t7 -26.5t-0.5 -34t-25 -27.5t-59 -12.5l-256 -4q-24 -5 -56 5t-52 22l-20 12q-30 21 -70 64t-68.5 77.5t-61 58 t-56.5 15.5q-3 -1 -8 -3.5t-17 -14.5t-21.5 -29.5t-17 -52t-6.5 -77.5q0 -15 -3.5 -27.5t-7.5 -18.5l-4 -5q-18 -19 -53 -22h-115q-71 -4 -146 16.5t-131.5 53t-103 66t-70.5 57.5l-25 24q-10 10 -27.5 30t-71.5 91t-106 151t-122.5 211t-130.5 272q-6 16 -6 27t3 16l4 6 q15 19 57 19l274 2q12 -2 23 -6.5t16 -8.5l5 -3q16 -11 24 -32q20 -50 46 -103.5t41 -81.5l16 -29q29 -60 56 -104t48.5 -68.5t41.5 -38.5t34 -14t27 5q2 1 5 5t12 22t13.5 47t9.5 81t0 125q-2 40 -9 73t-14 46l-6 12q-25 34 -85 43q-13 2 5 24q17 19 38 30q53 26 239 24 q82 -1 135 -13q20 -5 33.5 -13.5t20.5 -24t10.5 -32t3.5 -45.5t-1 -55t-2.5 -70.5t-1.5 -82.5q0 -11 -1 -42t-0.5 -48t3.5 -40.5t11.5 -39t22.5 -24.5q8 -2 17 -4t26 11t38 34.5t52 67t68 107.5q60 104 107 225q4 10 10 17.5t11 10.5l4 3l5 2.5t13 3t20 0.5l288 2 q39 5 64 -2.5t31 -16.5z" />
+<glyph unicode="&#xf18a;" horiz-adv-x="1792" d="M675 252q21 34 11 69t-45 50q-34 14 -73 1t-60 -46q-22 -34 -13 -68.5t43 -50.5t74.5 -2.5t62.5 47.5zM769 373q8 13 3.5 26.5t-17.5 18.5q-14 5 -28.5 -0.5t-21.5 -18.5q-17 -31 13 -45q14 -5 29 0.5t22 18.5zM943 266q-45 -102 -158 -150t-224 -12 q-107 34 -147.5 126.5t6.5 187.5q47 93 151.5 139t210.5 19q111 -29 158.5 -119.5t2.5 -190.5zM1255 426q-9 96 -89 170t-208.5 109t-274.5 21q-223 -23 -369.5 -141.5t-132.5 -264.5q9 -96 89 -170t208.5 -109t274.5 -21q223 23 369.5 141.5t132.5 264.5zM1563 422 q0 -68 -37 -139.5t-109 -137t-168.5 -117.5t-226 -83t-270.5 -31t-275 33.5t-240.5 93t-171.5 151t-65 199.5q0 115 69.5 245t197.5 258q169 169 341.5 236t246.5 -7q65 -64 20 -209q-4 -14 -1 -20t10 -7t14.5 0.5t13.5 3.5l6 2q139 59 246 59t153 -61q45 -63 0 -178 q-2 -13 -4.5 -20t4.5 -12.5t12 -7.5t17 -6q57 -18 103 -47t80 -81.5t34 -116.5zM1489 1046q42 -47 54.5 -108.5t-6.5 -117.5q-8 -23 -29.5 -34t-44.5 -4q-23 8 -34 29.5t-4 44.5q20 63 -24 111t-107 35q-24 -5 -45 8t-25 37q-5 24 8 44.5t37 25.5q60 13 119 -5.5t101 -65.5z M1670 1209q87 -96 112.5 -222.5t-13.5 -241.5q-9 -27 -34 -40t-52 -4t-40 34t-5 52q28 82 10 172t-80 158q-62 69 -148 95.5t-173 8.5q-28 -6 -52 9.5t-30 43.5t9.5 51.5t43.5 29.5q123 26 244 -11.5t208 -134.5z" />
+<glyph unicode="&#xf18b;" d="M1133 -34q-171 -94 -368 -94q-196 0 -367 94q138 87 235.5 211t131.5 268q35 -144 132.5 -268t235.5 -211zM638 1394v-485q0 -252 -126.5 -459.5t-330.5 -306.5q-181 215 -181 495q0 187 83.5 349.5t229.5 269.5t325 137zM1536 638q0 -280 -181 -495 q-204 99 -330.5 306.5t-126.5 459.5v485q179 -30 325 -137t229.5 -269.5t83.5 -349.5z" />
+<glyph unicode="&#xf18c;" horiz-adv-x="1408" d="M1402 433q-32 -80 -76 -138t-91 -88.5t-99 -46.5t-101.5 -14.5t-96.5 8.5t-86.5 22t-69.5 27.5t-46 22.5l-17 10q-113 -228 -289.5 -359.5t-384.5 -132.5q-19 0 -32 13t-13 32t13 31.5t32 12.5q173 1 322.5 107.5t251.5 294.5q-36 -14 -72 -23t-83 -13t-91 2.5t-93 28.5 t-92 59t-84.5 100t-74.5 146q114 47 214 57t167.5 -7.5t124.5 -56.5t88.5 -77t56.5 -82q53 131 79 291q-7 -1 -18 -2.5t-46.5 -2.5t-69.5 0.5t-81.5 10t-88.5 23t-84 42.5t-75 65t-54.5 94.5t-28.5 127.5q70 28 133.5 36.5t112.5 -1t92 -30t73.5 -50t56 -61t42 -63t27.5 -56 t16 -39.5l4 -16q12 122 12 195q-8 6 -21.5 16t-49 44.5t-63.5 71.5t-54 93t-33 112.5t12 127t70 138.5q73 -25 127.5 -61.5t84.5 -76.5t48 -85t20.5 -89t-0.5 -85.5t-13 -76.5t-19 -62t-17 -42l-7 -15q1 -5 1 -50.5t-1 -71.5q3 7 10 18.5t30.5 43t50.5 58t71 55.5t91.5 44.5 t112 14.5t132.5 -24q-2 -78 -21.5 -141.5t-50 -104.5t-69.5 -71.5t-81.5 -45.5t-84.5 -24t-80 -9.5t-67.5 1t-46.5 4.5l-17 3q-23 -147 -73 -283q6 7 18 18.5t49.5 41t77.5 52.5t99.5 42t117.5 20t129 -23.5t137 -77.5z" />
+<glyph unicode="&#xf18d;" horiz-adv-x="1280" d="M1259 283v-66q0 -85 -57.5 -144.5t-138.5 -59.5h-57l-260 -269v269h-529q-81 0 -138.5 59.5t-57.5 144.5v66h1238zM1259 609v-255h-1238v255h1238zM1259 937v-255h-1238v255h1238zM1259 1077v-67h-1238v67q0 84 57.5 143.5t138.5 59.5h846q81 0 138.5 -59.5t57.5 -143.5z " />
+<glyph unicode="&#xf18e;" d="M1152 640q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192h-352q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h352v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198 t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf190;" d="M1152 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-352v-192q0 -14 -9 -23t-23 -9q-12 0 -24 10l-319 319q-9 9 -9 23t9 23l320 320q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5v-192h352q13 0 22.5 -9.5t9.5 -22.5zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198 t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf191;" d="M1024 960v-640q0 -26 -19 -45t-45 -19q-20 0 -37 12l-448 320q-27 19 -27 52t27 52l448 320q17 12 37 12q26 0 45 -19t19 -45zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5z M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf192;" d="M1024 640q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5 t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf193;" horiz-adv-x="1664" d="M1023 349l102 -204q-58 -179 -210 -290t-339 -111q-156 0 -288.5 77.5t-210 210t-77.5 288.5q0 181 104.5 330t274.5 211l17 -131q-122 -54 -195 -165.5t-73 -244.5q0 -185 131.5 -316.5t316.5 -131.5q126 0 232.5 65t165 175.5t49.5 236.5zM1571 249l58 -114l-256 -128 q-13 -7 -29 -7q-40 0 -57 35l-239 477h-472q-24 0 -42.5 16.5t-21.5 40.5l-96 779q-2 16 6 42q14 51 57 82.5t97 31.5q66 0 113 -47t47 -113q0 -69 -52 -117.5t-120 -41.5l37 -289h423v-128h-407l16 -128h455q40 0 57 -35l228 -455z" />
+<glyph unicode="&#xf194;" d="M1254 899q16 85 -21 132q-52 65 -187 45q-17 -3 -41 -12.5t-57.5 -30.5t-64.5 -48.5t-59.5 -70t-44.5 -91.5q80 7 113.5 -16t26.5 -99q-5 -52 -52 -143q-43 -78 -71 -99q-44 -32 -87 14q-23 24 -37.5 64.5t-19 73t-10 84t-8.5 71.5q-23 129 -34 164q-12 37 -35.5 69 t-50.5 40q-57 16 -127 -25q-54 -32 -136.5 -106t-122.5 -102v-7q16 -8 25.5 -26t21.5 -20q21 -3 54.5 8.5t58 10.5t41.5 -30q11 -18 18.5 -38.5t15 -48t12.5 -40.5q17 -46 53 -187q36 -146 57 -197q42 -99 103 -125q43 -12 85 -1.5t76 31.5q131 77 250 237 q104 139 172.5 292.5t82.5 226.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf195;" horiz-adv-x="1152" d="M1152 704q0 -191 -94.5 -353t-256.5 -256.5t-353 -94.5h-160q-14 0 -23 9t-9 23v611l-215 -66q-3 -1 -9 -1q-10 0 -19 6q-13 10 -13 26v128q0 23 23 31l233 71v93l-215 -66q-3 -1 -9 -1q-10 0 -19 6q-13 10 -13 26v128q0 23 23 31l233 71v250q0 14 9 23t23 9h160 q14 0 23 -9t9 -23v-181l375 116q15 5 28 -5t13 -26v-128q0 -23 -23 -31l-393 -121v-93l375 116q15 5 28 -5t13 -26v-128q0 -23 -23 -31l-393 -121v-487q188 13 318 151t130 328q0 14 9 23t23 9h160q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf196;" horiz-adv-x="1408" d="M1152 736v-64q0 -14 -9 -23t-23 -9h-352v-352q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v352h-352q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h352v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-352h352q14 0 23 -9t9 -23zM1280 288v832q0 66 -47 113t-113 47h-832 q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf197;" horiz-adv-x="2176" d="M620 416q-110 -64 -268 -64h-128v64h-64q-13 0 -22.5 23.5t-9.5 56.5q0 24 7 49q-58 2 -96.5 10.5t-38.5 20.5t38.5 20.5t96.5 10.5q-7 25 -7 49q0 33 9.5 56.5t22.5 23.5h64v64h128q158 0 268 -64h1113q42 -7 106.5 -18t80.5 -14q89 -15 150 -40.5t83.5 -47.5t22.5 -40 t-22.5 -40t-83.5 -47.5t-150 -40.5q-16 -3 -80.5 -14t-106.5 -18h-1113zM1739 668q53 -36 53 -92t-53 -92l81 -30q68 48 68 122t-68 122zM625 400h1015q-217 -38 -456 -80q-57 0 -113 -24t-83 -48l-28 -24l-288 -288q-26 -26 -70.5 -45t-89.5 -19h-96l-93 464h29 q157 0 273 64zM352 816h-29l93 464h96q46 0 90 -19t70 -45l288 -288q4 -4 11 -10.5t30.5 -23t48.5 -29t61.5 -23t72.5 -10.5l456 -80h-1015q-116 64 -273 64z" />
+<glyph unicode="&#xf198;" horiz-adv-x="1664" d="M1519 760q62 0 103.5 -40.5t41.5 -101.5q0 -97 -93 -130l-172 -59l56 -167q7 -21 7 -47q0 -59 -42 -102t-101 -43q-47 0 -85.5 27t-53.5 72l-55 165l-310 -106l55 -164q8 -24 8 -47q0 -59 -42 -102t-102 -43q-47 0 -85 27t-53 72l-55 163l-153 -53q-29 -9 -50 -9 q-61 0 -101.5 40t-40.5 101q0 47 27.5 85t71.5 53l156 53l-105 313l-156 -54q-26 -8 -48 -8q-60 0 -101 40.5t-41 100.5q0 47 27.5 85t71.5 53l157 53l-53 159q-8 24 -8 47q0 60 42 102.5t102 42.5q47 0 85 -27t53 -72l54 -160l310 105l-54 160q-8 24 -8 47q0 59 42.5 102 t101.5 43q47 0 85.5 -27.5t53.5 -71.5l53 -161l162 55q21 6 43 6q60 0 102.5 -39.5t42.5 -98.5q0 -45 -30 -81.5t-74 -51.5l-157 -54l105 -316l164 56q24 8 46 8zM725 498l310 105l-105 315l-310 -107z" />
+<glyph unicode="&#xf199;" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM1280 352v436q-31 -35 -64 -55q-34 -22 -132.5 -85t-151.5 -99q-98 -69 -164 -69v0v0q-66 0 -164 69 q-46 32 -141.5 92.5t-142.5 92.5q-12 8 -33 27t-31 27v-436q0 -40 28 -68t68 -28h832q40 0 68 28t28 68zM1280 925q0 41 -27.5 70t-68.5 29h-832q-40 0 -68 -28t-28 -68q0 -37 30.5 -76.5t67.5 -64.5q47 -32 137.5 -89t129.5 -83q3 -2 17 -11.5t21 -14t21 -13t23.5 -13 t21.5 -9.5t22.5 -7.5t20.5 -2.5t20.5 2.5t22.5 7.5t21.5 9.5t23.5 13t21 13t21 14t17 11.5l267 174q35 23 66.5 62.5t31.5 73.5z" />
+<glyph unicode="&#xf19a;" horiz-adv-x="1792" d="M127 640q0 163 67 313l367 -1005q-196 95 -315 281t-119 411zM1415 679q0 -19 -2.5 -38.5t-10 -49.5t-11.5 -44t-17.5 -59t-17.5 -58l-76 -256l-278 826q46 3 88 8q19 2 26 18.5t-2.5 31t-28.5 13.5l-205 -10q-75 1 -202 10q-12 1 -20.5 -5t-11.5 -15t-1.5 -18.5t9 -16.5 t19.5 -8l80 -8l120 -328l-168 -504l-280 832q46 3 88 8q19 2 26 18.5t-2.5 31t-28.5 13.5l-205 -10q-7 0 -23 0.5t-26 0.5q105 160 274.5 253.5t367.5 93.5q147 0 280.5 -53t238.5 -149h-10q-55 0 -92 -40.5t-37 -95.5q0 -12 2 -24t4 -21.5t8 -23t9 -21t12 -22.5t12.5 -21 t14.5 -24t14 -23q63 -107 63 -212zM909 573l237 -647q1 -6 5 -11q-126 -44 -255 -44q-112 0 -217 32zM1570 1009q95 -174 95 -369q0 -209 -104 -385.5t-279 -278.5l235 678q59 169 59 276q0 42 -6 79zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286 t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM896 -215q173 0 331.5 68t273 182.5t182.5 273t68 331.5t-68 331.5t-182.5 273t-273 182.5t-331.5 68t-331.5 -68t-273 -182.5t-182.5 -273t-68 -331.5t68 -331.5t182.5 -273 t273 -182.5t331.5 -68z" />
+<glyph unicode="&#xf19b;" horiz-adv-x="1792" d="M1086 1536v-1536l-272 -128q-228 20 -414 102t-293 208.5t-107 272.5q0 140 100.5 263.5t275 205.5t391.5 108v-172q-217 -38 -356.5 -150t-139.5 -255q0 -152 154.5 -267t388.5 -145v1360zM1755 954l37 -390l-525 114l147 83q-119 70 -280 99v172q277 -33 481 -157z" />
+<glyph unicode="&#xf19c;" horiz-adv-x="2048" d="M960 1536l960 -384v-128h-128q0 -26 -20.5 -45t-48.5 -19h-1526q-28 0 -48.5 19t-20.5 45h-128v128zM256 896h256v-768h128v768h256v-768h128v768h256v-768h128v768h256v-768h59q28 0 48.5 -19t20.5 -45v-64h-1664v64q0 26 20.5 45t48.5 19h59v768zM1851 -64 q28 0 48.5 -19t20.5 -45v-128h-1920v128q0 26 20.5 45t48.5 19h1782z" />
+<glyph unicode="&#xf19d;" horiz-adv-x="2304" d="M1774 700l18 -316q4 -69 -82 -128t-235 -93.5t-323 -34.5t-323 34.5t-235 93.5t-82 128l18 316l574 -181q22 -7 48 -7t48 7zM2304 1024q0 -23 -22 -31l-1120 -352q-4 -1 -10 -1t-10 1l-652 206q-43 -34 -71 -111.5t-34 -178.5q63 -36 63 -109q0 -69 -58 -107l58 -433 q2 -14 -8 -25q-9 -11 -24 -11h-192q-15 0 -24 11q-10 11 -8 25l58 433q-58 38 -58 107q0 73 65 111q11 207 98 330l-333 104q-22 8 -22 31t22 31l1120 352q4 1 10 1t10 -1l1120 -352q22 -8 22 -31z" />
+<glyph unicode="&#xf19e;" d="M859 579l13 -707q-62 11 -105 11q-41 0 -105 -11l13 707q-40 69 -168.5 295.5t-216.5 374.5t-181 287q58 -15 108 -15q43 0 111 15q63 -111 133.5 -229.5t167 -276.5t138.5 -227q37 61 109.5 177.5t117.5 190t105 176t107 189.5q54 -14 107 -14q56 0 114 14v0 q-28 -39 -60 -88.5t-49.5 -78.5t-56.5 -96t-49 -84q-146 -248 -353 -610z" />
+<glyph unicode="&#xf1a0;" horiz-adv-x="1280" d="M981 197q0 25 -7 49t-14.5 42t-27 41.5t-29.5 35t-38.5 34.5t-36.5 29t-41.5 30t-36.5 26q-16 2 -49 2q-53 0 -104.5 -7t-107 -25t-97 -46t-68.5 -74.5t-27 -105.5q0 -56 23.5 -102t61 -75.5t87 -50t100 -29t101.5 -8.5q58 0 111.5 13t99 39t73 73t27.5 109zM864 1055 q0 59 -17 125.5t-48 129t-84 103.5t-117 41q-42 0 -82.5 -19.5t-66.5 -52.5q-46 -59 -46 -160q0 -46 10 -97.5t31.5 -103t52 -92.5t75 -67t96.5 -26q37 0 77.5 16.5t65.5 43.5q53 56 53 159zM752 1536h417l-137 -88h-132q75 -63 113 -133t38 -160q0 -72 -24.5 -129.5 t-59.5 -93t-69.5 -65t-59 -61.5t-24.5 -66q0 -36 32 -70.5t77 -68t90.5 -73.5t77.5 -104t32 -142q0 -91 -49 -173q-71 -122 -209.5 -179.5t-298.5 -57.5q-132 0 -246.5 41.5t-172.5 137.5q-36 59 -36 131q0 81 44.5 150t118.5 115q131 82 404 100q-32 41 -47.5 73.5 t-15.5 73.5q0 40 21 85q-46 -4 -68 -4q-148 0 -249.5 96.5t-101.5 244.5q0 82 36 159t99 131q76 66 182 98t218 32z" />
+<glyph unicode="&#xf1a1;" horiz-adv-x="1984" d="M831 572q0 -56 -40.5 -96t-96.5 -40q-57 0 -98 40t-41 96q0 57 41.5 98t97.5 41t96.5 -41t40.5 -98zM1292 711q56 0 96.5 -41t40.5 -98q0 -56 -40.5 -96t-96.5 -40q-57 0 -98 40t-41 96q0 57 41.5 98t97.5 41zM1984 722q0 -62 -31 -114t-83 -82q5 -33 5 -61 q0 -121 -68.5 -230.5t-197.5 -193.5q-125 -82 -285.5 -125.5t-335.5 -43.5q-176 0 -336.5 43.5t-284.5 125.5q-129 84 -197.5 193t-68.5 231q0 29 5 66q-48 31 -77 81.5t-29 109.5q0 94 66 160t160 66q83 0 148 -55q248 158 592 164l134 423q4 14 17.5 21.5t28.5 4.5 l347 -82q22 50 68.5 81t102.5 31q77 0 131.5 -54.5t54.5 -131.5t-54.5 -132t-131.5 -55q-76 0 -130.5 54t-55.5 131l-315 74l-116 -366q327 -14 560 -166q64 58 151 58q94 0 160 -66t66 -160zM1664 1459q-45 0 -77 -32t-32 -77t32 -77t77 -32t77 32t32 77t-32 77t-77 32z M77 722q0 -67 51 -111q49 131 180 235q-36 25 -82 25q-62 0 -105.5 -43.5t-43.5 -105.5zM1567 105q112 73 171.5 166t59.5 194t-59.5 193.5t-171.5 165.5q-116 75 -265.5 115.5t-313.5 40.5t-313.5 -40.5t-265.5 -115.5q-112 -73 -171.5 -165.5t-59.5 -193.5t59.5 -194 t171.5 -166q116 -75 265.5 -115.5t313.5 -40.5t313.5 40.5t265.5 115.5zM1850 605q57 46 57 117q0 62 -43.5 105.5t-105.5 43.5q-49 0 -86 -28q131 -105 178 -238zM1258 237q11 11 27 11t27 -11t11 -27.5t-11 -27.5q-99 -99 -319 -99h-2q-220 0 -319 99q-11 11 -11 27.5 t11 27.5t27 11t27 -11q77 -77 265 -77h2q188 0 265 77z" />
+<glyph unicode="&#xf1a2;" d="M950 393q7 7 17.5 7t17.5 -7t7 -18t-7 -18q-65 -64 -208 -64h-1h-1q-143 0 -207 64q-8 7 -8 18t8 18q7 7 17.5 7t17.5 -7q49 -51 172 -51h1h1q122 0 173 51zM671 613q0 -37 -26 -64t-63 -27t-63 27t-26 64t26 63t63 26t63 -26t26 -63zM1214 1049q-29 0 -50 21t-21 50 q0 30 21 51t50 21q30 0 51 -21t21 -51q0 -29 -21 -50t-51 -21zM1216 1408q132 0 226 -94t94 -227v-894q0 -133 -94 -227t-226 -94h-896q-132 0 -226 94t-94 227v894q0 133 94 227t226 94h896zM1321 596q35 14 57 45.5t22 70.5q0 51 -36 87.5t-87 36.5q-60 0 -98 -48 q-151 107 -375 115l83 265l206 -49q1 -50 36.5 -85t84.5 -35q50 0 86 35.5t36 85.5t-36 86t-86 36q-36 0 -66 -20.5t-45 -53.5l-227 54q-9 2 -17.5 -2.5t-11.5 -14.5l-95 -302q-224 -4 -381 -113q-36 43 -93 43q-51 0 -87 -36.5t-36 -87.5q0 -37 19.5 -67.5t52.5 -45.5 q-7 -25 -7 -54q0 -98 74 -181.5t201.5 -132t278.5 -48.5q150 0 277.5 48.5t201.5 132t74 181.5q0 27 -6 54zM971 702q37 0 63 -26t26 -63t-26 -64t-63 -27t-63 27t-26 64t26 63t63 26z" />
+<glyph unicode="&#xf1a3;" d="M866 697l90 27v62q0 79 -58 135t-138 56t-138 -55.5t-58 -134.5v-283q0 -20 -14 -33.5t-33 -13.5t-32.5 13.5t-13.5 33.5v120h-151v-122q0 -82 57.5 -139t139.5 -57q81 0 138.5 56.5t57.5 136.5v280q0 19 13.5 33t33.5 14q19 0 32.5 -14t13.5 -33v-54zM1199 502v122h-150 v-126q0 -20 -13.5 -33.5t-33.5 -13.5q-19 0 -32.5 14t-13.5 33v123l-90 -26l-60 28v-123q0 -80 58 -137t139 -57t138.5 57t57.5 139zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103 t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf1a4;" horiz-adv-x="1920" d="M1062 824v118q0 42 -30 72t-72 30t-72 -30t-30 -72v-612q0 -175 -126 -299t-303 -124q-178 0 -303.5 125.5t-125.5 303.5v266h328v-262q0 -43 30 -72.5t72 -29.5t72 29.5t30 72.5v620q0 171 126.5 292t301.5 121q176 0 302 -122t126 -294v-136l-195 -58zM1592 602h328 v-266q0 -178 -125.5 -303.5t-303.5 -125.5q-177 0 -303 124.5t-126 300.5v268l131 -61l195 58v-270q0 -42 30 -71.5t72 -29.5t72 29.5t30 71.5v275z" />
+<glyph unicode="&#xf1a5;" d="M1472 160v480h-704v704h-480q-93 0 -158.5 -65.5t-65.5 -158.5v-480h704v-704h480q93 0 158.5 65.5t65.5 158.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z" />
+<glyph unicode="&#xf1a6;" horiz-adv-x="2048" d="M328 1254h204v-983h-532v697h328v286zM328 435v369h-123v-369h123zM614 968v-697h205v697h-205zM614 1254v-204h205v204h-205zM901 968h533v-942h-533v163h328v82h-328v697zM1229 435v369h-123v-369h123zM1516 968h532v-942h-532v163h327v82h-327v697zM1843 435v369h-123 v-369h123z" />
+<glyph unicode="&#xf1a7;" d="M1046 516q0 -64 -38 -109t-91 -45q-43 0 -70 15v277q28 17 70 17q53 0 91 -45.5t38 -109.5zM703 944q0 -64 -38 -109.5t-91 -45.5q-43 0 -70 15v277q28 17 70 17q53 0 91 -45t38 -109zM1265 513q0 134 -88 229t-213 95q-20 0 -39 -3q-23 -78 -78 -136q-87 -95 -211 -101 v-636l211 41v206q51 -19 117 -19q125 0 213 95t88 229zM922 940q0 134 -88.5 229t-213.5 95q-74 0 -141 -36h-186v-840l211 41v206q55 -19 116 -19q125 0 213.5 95t88.5 229zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960 q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf1a8;" horiz-adv-x="2038" d="M1222 607q75 3 143.5 -20.5t118 -58.5t101 -94.5t84 -108t75.5 -120.5q33 -56 78.5 -109t75.5 -80.5t99 -88.5q-48 -30 -108.5 -57.5t-138.5 -59t-114 -47.5q-44 37 -74 115t-43.5 164.5t-33 180.5t-42.5 168.5t-72.5 123t-122.5 48.5l-10 -2l-6 -4q4 -5 13 -14 q6 -5 28 -23.5t25.5 -22t19 -18t18 -20.5t11.5 -21t10.5 -27.5t4.5 -31t4 -40.5l1 -33q1 -26 -2.5 -57.5t-7.5 -52t-12.5 -58.5t-11.5 -53q-35 1 -101 -9.5t-98 -10.5q-39 0 -72 10q-2 16 -2 47q0 74 3 96q2 13 31.5 41.5t57 59t26.5 51.5q-24 2 -43 -24 q-36 -53 -111.5 -99.5t-136.5 -46.5q-25 0 -75.5 63t-106.5 139.5t-84 96.5q-6 4 -27 30q-482 -112 -513 -112q-16 0 -28 11t-12 27q0 15 8.5 26.5t22.5 14.5l486 106q-8 14 -8 25t5.5 17.5t16 11.5t20 7t23 4.5t18.5 4.5q4 1 15.5 7.5t17.5 6.5q15 0 28 -16t20 -33 q163 37 172 37q17 0 29.5 -11t12.5 -28q0 -15 -8.5 -26t-23.5 -14l-182 -40l-1 -16q-1 -26 81.5 -117.5t104.5 -91.5q47 0 119 80t72 129q0 36 -23.5 53t-51 18.5t-51 11.5t-23.5 34q0 16 10 34l-68 19q43 44 43 117q0 26 -5 58q82 16 144 16q44 0 71.5 -1.5t48.5 -8.5 t31 -13.5t20.5 -24.5t15.5 -33.5t17 -47.5t24 -60l50 25q-3 -40 -23 -60t-42.5 -21t-40 -6.5t-16.5 -20.5zM1282 842q-5 5 -13.5 15.5t-12 14.5t-10.5 11.5t-10 10.5l-8 8t-8.5 7.5t-8 5t-8.5 4.5q-7 3 -14.5 5t-20.5 2.5t-22 0.5h-32.5h-37.5q-126 0 -217 -43 q16 30 36 46.5t54 29.5t65.5 36t46 36.5t50 55t43.5 50.5q12 -9 28 -31.5t32 -36.5t38 -13l12 1v-76l22 -1q247 95 371 190q28 21 50 39t42.5 37.5t33 31t29.5 34t24 31t24.5 37t23 38t27 47.5t29.5 53l7 9q-2 -53 -43 -139q-79 -165 -205 -264t-306 -142q-14 -3 -42 -7.5 t-50 -9.5t-39 -14q3 -19 24.5 -46t21.5 -34q0 -11 -26 -30zM1061 -79q39 26 131.5 47.5t146.5 21.5q9 0 22.5 -15.5t28 -42.5t26 -50t24 -51t14.5 -33q-121 -45 -244 -45q-61 0 -125 11zM822 568l48 12l109 -177l-73 -48zM1323 51q3 -15 3 -16q0 -7 -17.5 -14.5t-46 -13 t-54 -9.5t-53.5 -7.5t-32 -4.5l-7 43q21 2 60.5 8.5t72 10t60.5 3.5h14zM866 679l-96 -20l-6 17q10 1 32.5 7t34.5 6q19 0 35 -10zM1061 45h31l10 -83l-41 -12v95zM1950 1535v1v-1zM1950 1535l-1 -5l-2 -2l1 3zM1950 1535l1 1z" />
+<glyph unicode="&#xf1a9;" d="M1167 -50q-5 19 -24 5q-30 -22 -87 -39t-131 -17q-129 0 -193 49q-5 4 -13 4q-11 0 -26 -12q-7 -6 -7.5 -16t7.5 -20q34 -32 87.5 -46t102.5 -12.5t99 4.5q41 4 84.5 20.5t65 30t28.5 20.5q12 12 7 29zM1128 65q-19 47 -39 61q-23 15 -76 15q-47 0 -71 -10 q-29 -12 -78 -56q-26 -24 -12 -44q9 -8 17.5 -4.5t31.5 23.5q3 2 10.5 8.5t10.5 8.5t10 7t11.5 7t12.5 5t15 4.5t16.5 2.5t20.5 1q27 0 44.5 -7.5t23 -14.5t13.5 -22q10 -17 12.5 -20t12.5 1q23 12 14 34zM1483 346q0 22 -5 44.5t-16.5 45t-34 36.5t-52.5 14 q-33 0 -97 -41.5t-129 -83.5t-101 -42q-27 -1 -63.5 19t-76 49t-83.5 58t-100 49t-111 19q-115 -1 -197 -78.5t-84 -178.5q-2 -112 74 -164q29 -20 62.5 -28.5t103.5 -8.5q57 0 132 32.5t134 71t120 70.5t93 31q26 -1 65 -31.5t71.5 -67t68 -67.5t55.5 -32q35 -3 58.5 14 t55.5 63q28 41 42.5 101t14.5 106zM1536 506q0 -164 -62 -304.5t-166 -236t-242.5 -149.5t-290.5 -54t-293 57.5t-247.5 157t-170.5 241.5t-64 302q0 89 19.5 172.5t49 145.5t70.5 118.5t78.5 94t78.5 69.5t64.5 46.5t42.5 24.5q14 8 51 26.5t54.5 28.5t48 30t60.5 44 q36 28 58 72.5t30 125.5q129 -155 186 -193q44 -29 130 -68t129 -66q21 -13 39 -25t60.5 -46.5t76 -70.5t75 -95t69 -122t47 -148.5t19.5 -177.5z" />
+<glyph unicode="&#xf1aa;" d="M1070 463l-160 -160l-151 -152l-30 -30q-65 -64 -151.5 -87t-171.5 -2q-16 -70 -72 -115t-129 -45q-85 0 -145 60.5t-60 145.5q0 72 44.5 128t113.5 72q-22 86 1 173t88 152l12 12l151 -152l-11 -11q-37 -37 -37 -89t37 -90q37 -37 89 -37t89 37l30 30l151 152l161 160z M729 1145l12 -12l-152 -152l-12 12q-37 37 -89 37t-89 -37t-37 -89.5t37 -89.5l29 -29l152 -152l160 -160l-151 -152l-161 160l-151 152l-30 30q-68 67 -90 159.5t5 179.5q-70 15 -115 71t-45 129q0 85 60 145.5t145 60.5q76 0 133.5 -49t69.5 -123q84 20 169.5 -3.5 t149.5 -87.5zM1536 78q0 -85 -60 -145.5t-145 -60.5q-74 0 -131 47t-71 118q-86 -28 -179.5 -6t-161.5 90l-11 12l151 152l12 -12q37 -37 89 -37t89 37t37 89t-37 89l-30 30l-152 152l-160 160l152 152l160 -160l152 -152l29 -30q64 -64 87.5 -150.5t2.5 -171.5 q76 -11 126.5 -68.5t50.5 -134.5zM1534 1202q0 -77 -51 -135t-127 -69q26 -85 3 -176.5t-90 -158.5l-12 -12l-151 152l12 12q37 37 37 89t-37 89t-89 37t-89 -37l-30 -30l-152 -152l-160 -160l-152 152l161 160l152 152l29 30q67 67 159 89.5t178 -3.5q11 75 68.5 126 t135.5 51q85 0 145 -60.5t60 -145.5z" />
+<glyph unicode="&#xf1ab;" d="M654 458q-1 -3 -12.5 0.5t-31.5 11.5l-20 9q-44 20 -87 49q-7 5 -41 31.5t-38 28.5q-67 -103 -134 -181q-81 -95 -105 -110q-4 -2 -19.5 -4t-18.5 0q6 4 82 92q21 24 85.5 115t78.5 118q17 30 51 98.5t36 77.5q-8 1 -110 -33q-8 -2 -27.5 -7.5t-34.5 -9.5t-17 -5 q-2 -2 -2 -10.5t-1 -9.5q-5 -10 -31 -15q-23 -7 -47 0q-18 4 -28 21q-4 6 -5 23q6 2 24.5 5t29.5 6q58 16 105 32q100 35 102 35q10 2 43 19.5t44 21.5q9 3 21.5 8t14.5 5.5t6 -0.5q2 -12 -1 -33q0 -2 -12.5 -27t-26.5 -53.5t-17 -33.5q-25 -50 -77 -131l64 -28 q12 -6 74.5 -32t67.5 -28q4 -1 10.5 -25.5t4.5 -30.5zM449 944q3 -15 -4 -28q-12 -23 -50 -38q-30 -12 -60 -12q-26 3 -49 26q-14 15 -18 41l1 3q3 -3 19.5 -5t26.5 0t58 16q36 12 55 14q17 0 21 -17zM1147 815l63 -227l-139 42zM39 15l694 232v1032l-694 -233v-1031z M1280 332l102 -31l-181 657l-100 31l-216 -536l102 -31l45 110l211 -65zM777 1294l573 -184v380zM1088 -29l158 -13l-54 -160l-40 66q-130 -83 -276 -108q-58 -12 -91 -12h-84q-79 0 -199.5 39t-183.5 85q-8 7 -8 16q0 8 5 13.5t13 5.5q4 0 18 -7.5t30.5 -16.5t20.5 -11 q73 -37 159.5 -61.5t157.5 -24.5q95 0 167 14.5t157 50.5q15 7 30.5 15.5t34 19t28.5 16.5zM1536 1050v-1079l-774 246q-14 -6 -375 -127.5t-368 -121.5q-13 0 -18 13q0 1 -1 3v1078q3 9 4 10q5 6 20 11q106 35 149 50v384l558 -198q2 0 160.5 55t316 108.5t161.5 53.5 q20 0 20 -21v-418z" />
+<glyph unicode="&#xf1ac;" horiz-adv-x="1792" d="M288 1152q66 0 113 -47t47 -113v-1088q0 -66 -47 -113t-113 -47h-128q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h128zM1664 989q58 -34 93 -93t35 -128v-768q0 -106 -75 -181t-181 -75h-864q-66 0 -113 47t-47 113v1536q0 40 28 68t68 28h672q40 0 88 -20t76 -48 l152 -152q28 -28 48 -76t20 -88v-163zM928 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM928 256v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM928 512v128q0 14 -9 23 t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1184 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1184 256v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128 q14 0 23 9t9 23zM1184 512v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 256v128q0 14 -9 23t-23 9h-128 q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 512v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1536 896v256h-160q-40 0 -68 28t-28 68v160h-640v-512h896z" />
+<glyph unicode="&#xf1ad;" d="M1344 1536q26 0 45 -19t19 -45v-1664q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h1280zM512 1248v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 992v-64q0 -14 9 -23t23 -9h64q14 0 23 9 t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 736v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 480v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM384 160v64 q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64 q14 0 23 9t9 23zM384 928v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 -96v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9 t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM896 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 928v64 q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 160v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64 q14 0 23 9t9 23zM1152 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 928v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9 t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23z" />
+<glyph unicode="&#xf1ae;" horiz-adv-x="1280" d="M1188 988l-292 -292v-824q0 -46 -33 -79t-79 -33t-79 33t-33 79v384h-64v-384q0 -46 -33 -79t-79 -33t-79 33t-33 79v824l-292 292q-28 28 -28 68t28 68t68 28t68 -28l228 -228h368l228 228q28 28 68 28t68 -28t28 -68t-28 -68zM864 1152q0 -93 -65.5 -158.5 t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" />
+<glyph unicode="&#xf1b0;" horiz-adv-x="1664" d="M780 1064q0 -60 -19 -113.5t-63 -92.5t-105 -39q-76 0 -138 57.5t-92 135.5t-30 151q0 60 19 113.5t63 92.5t105 39q77 0 138.5 -57.5t91.5 -135t30 -151.5zM438 581q0 -80 -42 -139t-119 -59q-76 0 -141.5 55.5t-100.5 133.5t-35 152q0 80 42 139.5t119 59.5 q76 0 141.5 -55.5t100.5 -134t35 -152.5zM832 608q118 0 255 -97.5t229 -237t92 -254.5q0 -46 -17 -76.5t-48.5 -45t-64.5 -20t-76 -5.5q-68 0 -187.5 45t-182.5 45q-66 0 -192.5 -44.5t-200.5 -44.5q-183 0 -183 146q0 86 56 191.5t139.5 192.5t187.5 146t193 59zM1071 819 q-61 0 -105 39t-63 92.5t-19 113.5q0 74 30 151.5t91.5 135t138.5 57.5q61 0 105 -39t63 -92.5t19 -113.5q0 -73 -30 -151t-92 -135.5t-138 -57.5zM1503 923q77 0 119 -59.5t42 -139.5q0 -74 -35 -152t-100.5 -133.5t-141.5 -55.5q-77 0 -119 59t-42 139q0 74 35 152.5 t100.5 134t141.5 55.5z" />
+<glyph unicode="&#xf1b1;" horiz-adv-x="768" d="M704 1008q0 -145 -57 -243.5t-152 -135.5l45 -821q2 -26 -16 -45t-44 -19h-192q-26 0 -44 19t-16 45l45 821q-95 37 -152 135.5t-57 243.5q0 128 42.5 249.5t117.5 200t160 78.5t160 -78.5t117.5 -200t42.5 -249.5z" />
+<glyph unicode="&#xf1b2;" horiz-adv-x="1792" d="M896 -93l640 349v636l-640 -233v-752zM832 772l698 254l-698 254l-698 -254zM1664 1024v-768q0 -35 -18 -65t-49 -47l-704 -384q-28 -16 -61 -16t-61 16l-704 384q-31 17 -49 47t-18 65v768q0 40 23 73t61 47l704 256q22 8 44 8t44 -8l704 -256q38 -14 61 -47t23 -73z " />
+<glyph unicode="&#xf1b3;" horiz-adv-x="2304" d="M640 -96l384 192v314l-384 -164v-342zM576 358l404 173l-404 173l-404 -173zM1664 -96l384 192v314l-384 -164v-342zM1600 358l404 173l-404 173l-404 -173zM1152 651l384 165v266l-384 -164v-267zM1088 1030l441 189l-441 189l-441 -189zM2176 512v-416q0 -36 -19 -67 t-52 -47l-448 -224q-25 -14 -57 -14t-57 14l-448 224q-5 2 -7 4q-2 -2 -7 -4l-448 -224q-25 -14 -57 -14t-57 14l-448 224q-33 16 -52 47t-19 67v416q0 38 21.5 70t56.5 48l434 186v400q0 38 21.5 70t56.5 48l448 192q23 10 50 10t50 -10l448 -192q35 -16 56.5 -48t21.5 -70 v-400l434 -186q36 -16 57 -48t21 -70z" />
+<glyph unicode="&#xf1b4;" horiz-adv-x="2048" d="M1848 1197h-511v-124h511v124zM1596 771q-90 0 -146 -52.5t-62 -142.5h408q-18 195 -200 195zM1612 186q63 0 122 32t76 87h221q-100 -307 -427 -307q-214 0 -340.5 132t-126.5 347q0 208 130.5 345.5t336.5 137.5q138 0 240.5 -68t153 -179t50.5 -248q0 -17 -2 -47h-658 q0 -111 57.5 -171.5t166.5 -60.5zM277 236h296q205 0 205 167q0 180 -199 180h-302v-347zM277 773h281q78 0 123.5 36.5t45.5 113.5q0 144 -190 144h-260v-294zM0 1282h594q87 0 155 -14t126.5 -47.5t90 -96.5t31.5 -154q0 -181 -172 -263q114 -32 172 -115t58 -204 q0 -75 -24.5 -136.5t-66 -103.5t-98.5 -71t-121 -42t-134 -13h-611v1260z" />
+<glyph unicode="&#xf1b5;" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM499 1041h-371v-787h382q117 0 197 57.5t80 170.5q0 158 -143 200q107 52 107 164q0 57 -19.5 96.5 t-56.5 60.5t-79 29.5t-97 8.5zM477 723h-176v184h163q119 0 119 -90q0 -94 -106 -94zM486 388h-185v217h189q124 0 124 -113q0 -104 -128 -104zM1136 356q-68 0 -104 38t-36 107h411q1 10 1 30q0 132 -74.5 220.5t-203.5 88.5q-128 0 -210 -86t-82 -216q0 -135 79 -217 t213 -82q205 0 267 191h-138q-11 -34 -47.5 -54t-75.5 -20zM1126 722q113 0 124 -122h-254q4 56 39 89t91 33zM964 988h319v-77h-319v77z" />
+<glyph unicode="&#xf1b6;" horiz-adv-x="1792" d="M1582 954q0 -101 -71.5 -172.5t-172.5 -71.5t-172.5 71.5t-71.5 172.5t71.5 172.5t172.5 71.5t172.5 -71.5t71.5 -172.5zM812 212q0 104 -73 177t-177 73q-27 0 -54 -6l104 -42q77 -31 109.5 -106.5t1.5 -151.5q-31 -77 -107 -109t-152 -1q-21 8 -62 24.5t-61 24.5 q32 -60 91 -96.5t130 -36.5q104 0 177 73t73 177zM1642 953q0 126 -89.5 215.5t-215.5 89.5q-127 0 -216.5 -89.5t-89.5 -215.5q0 -127 89.5 -216t216.5 -89q126 0 215.5 89t89.5 216zM1792 953q0 -189 -133.5 -322t-321.5 -133l-437 -319q-12 -129 -109 -218t-229 -89 q-121 0 -214 76t-118 192l-230 92v429l389 -157q79 48 173 48q13 0 35 -2l284 407q2 187 135.5 319t320.5 132q188 0 321.5 -133.5t133.5 -321.5z" />
+<glyph unicode="&#xf1b7;" d="M1242 889q0 80 -57 136.5t-137 56.5t-136.5 -57t-56.5 -136q0 -80 56.5 -136.5t136.5 -56.5t137 56.5t57 136.5zM632 301q0 -83 -58 -140.5t-140 -57.5q-56 0 -103 29t-72 77q52 -20 98 -40q60 -24 120 1.5t85 86.5q24 60 -1.5 120t-86.5 84l-82 33q22 5 42 5 q82 0 140 -57.5t58 -140.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v153l172 -69q20 -92 93.5 -152t168.5 -60q104 0 181 70t87 173l345 252q150 0 255.5 105.5t105.5 254.5q0 150 -105.5 255.5t-255.5 105.5 q-148 0 -253 -104.5t-107 -252.5l-225 -322q-9 1 -28 1q-75 0 -137 -37l-297 119v468q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5zM1289 887q0 -100 -71 -170.5t-171 -70.5t-170.5 70.5t-70.5 170.5t70.5 171t170.5 71q101 0 171.5 -70.5t70.5 -171.5z " />
+<glyph unicode="&#xf1b8;" horiz-adv-x="1792" d="M836 367l-15 -368l-2 -22l-420 29q-36 3 -67 31.5t-47 65.5q-11 27 -14.5 55t4 65t12 55t21.5 64t19 53q78 -12 509 -28zM449 953l180 -379l-147 92q-63 -72 -111.5 -144.5t-72.5 -125t-39.5 -94.5t-18.5 -63l-4 -21l-190 357q-17 26 -18 56t6 47l8 18q35 63 114 188 l-140 86zM1680 436l-188 -359q-12 -29 -36.5 -46.5t-43.5 -20.5l-18 -4q-71 -7 -219 -12l8 -164l-230 367l211 362l7 -173q170 -16 283 -5t170 33zM895 1360q-47 -63 -265 -435l-317 187l-19 12l225 356q20 31 60 45t80 10q24 -2 48.5 -12t42 -21t41.5 -33t36 -34.5 t36 -39.5t32 -35zM1550 1053l212 -363q18 -37 12.5 -76t-27.5 -74q-13 -20 -33 -37t-38 -28t-48.5 -22t-47 -16t-51.5 -14t-46 -12q-34 72 -265 436l313 195zM1407 1279l142 83l-220 -373l-419 20l151 86q-34 89 -75 166t-75.5 123.5t-64.5 80t-47 46.5l-17 13l405 -1 q31 3 58 -10.5t39 -28.5l11 -15q39 -61 112 -190z" />
+<glyph unicode="&#xf1b9;" horiz-adv-x="2048" d="M480 448q0 66 -47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47t113 47t47 113zM516 768h1016l-89 357q-2 8 -14 17.5t-21 9.5h-768q-9 0 -21 -9.5t-14 -17.5zM1888 448q0 66 -47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47t113 47t47 113zM2048 544v-384 q0 -14 -9 -23t-23 -9h-96v-128q0 -80 -56 -136t-136 -56t-136 56t-56 136v128h-1024v-128q0 -80 -56 -136t-136 -56t-136 56t-56 136v128h-96q-14 0 -23 9t-9 23v384q0 93 65.5 158.5t158.5 65.5h28l105 419q23 94 104 157.5t179 63.5h768q98 0 179 -63.5t104 -157.5 l105 -419h28q93 0 158.5 -65.5t65.5 -158.5z" />
+<glyph unicode="&#xf1ba;" horiz-adv-x="2048" d="M1824 640q93 0 158.5 -65.5t65.5 -158.5v-384q0 -14 -9 -23t-23 -9h-96v-64q0 -80 -56 -136t-136 -56t-136 56t-56 136v64h-1024v-64q0 -80 -56 -136t-136 -56t-136 56t-56 136v64h-96q-14 0 -23 9t-9 23v384q0 93 65.5 158.5t158.5 65.5h28l105 419q23 94 104 157.5 t179 63.5h128v224q0 14 9 23t23 9h448q14 0 23 -9t9 -23v-224h128q98 0 179 -63.5t104 -157.5l105 -419h28zM320 160q66 0 113 47t47 113t-47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47zM516 640h1016l-89 357q-2 8 -14 17.5t-21 9.5h-768q-9 0 -21 -9.5t-14 -17.5z M1728 160q66 0 113 47t47 113t-47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47z" />
+<glyph unicode="&#xf1bb;" d="M1504 64q0 -26 -19 -45t-45 -19h-462q1 -17 6 -87.5t5 -108.5q0 -25 -18 -42.5t-43 -17.5h-320q-25 0 -43 17.5t-18 42.5q0 38 5 108.5t6 87.5h-462q-26 0 -45 19t-19 45t19 45l402 403h-229q-26 0 -45 19t-19 45t19 45l402 403h-197q-26 0 -45 19t-19 45t19 45l384 384 q19 19 45 19t45 -19l384 -384q19 -19 19 -45t-19 -45t-45 -19h-197l402 -403q19 -19 19 -45t-19 -45t-45 -19h-229l402 -403q19 -19 19 -45z" />
+<glyph unicode="&#xf1bc;" d="M1127 326q0 32 -30 51q-193 115 -447 115q-133 0 -287 -34q-42 -9 -42 -52q0 -20 13.5 -34.5t35.5 -14.5q5 0 37 8q132 27 243 27q226 0 397 -103q19 -11 33 -11q19 0 33 13.5t14 34.5zM1223 541q0 40 -35 61q-237 141 -548 141q-153 0 -303 -42q-48 -13 -48 -64 q0 -25 17.5 -42.5t42.5 -17.5q7 0 37 8q122 33 251 33q279 0 488 -124q24 -13 38 -13q25 0 42.5 17.5t17.5 42.5zM1331 789q0 47 -40 70q-126 73 -293 110.5t-343 37.5q-204 0 -364 -47q-23 -7 -38.5 -25.5t-15.5 -48.5q0 -31 20.5 -52t51.5 -21q11 0 40 8q133 37 307 37 q159 0 309.5 -34t253.5 -95q21 -12 40 -12q29 0 50.5 20.5t21.5 51.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf1bd;" d="M1397 1408q58 0 98.5 -40.5t40.5 -98.5v-1258q0 -58 -40.5 -98.5t-98.5 -40.5h-1258q-58 0 -98.5 40.5t-40.5 98.5v1258q0 58 40.5 98.5t98.5 40.5h1258zM1465 11v1258q0 28 -20 48t-48 20h-1258q-28 0 -48 -20t-20 -48v-1258q0 -28 20 -48t48 -20h1258q28 0 48 20t20 48 zM694 749l188 -387l533 145v-496q0 -7 -5.5 -12.5t-12.5 -5.5h-1258q-7 0 -12.5 5.5t-5.5 12.5v141l711 195l-212 439q4 1 12 2.5t12 1.5q170 32 303.5 21.5t221 -46t143.5 -94.5q27 -28 -25 -42q-64 -16 -256 -62l-97 198q-111 7 -240 -16zM1397 1287q7 0 12.5 -5.5 t5.5 -12.5v-428q-85 30 -188 52q-294 64 -645 12l-18 -3l-65 134h-233l85 -190q-132 -51 -230 -137v560q0 7 5.5 12.5t12.5 5.5h1258zM286 387q-14 -3 -26 4.5t-14 21.5q-24 203 166 305l129 -270z" />
+<glyph unicode="&#xf1be;" horiz-adv-x="2304" d="M784 164l16 241l-16 523q-1 10 -7.5 17t-16.5 7q-9 0 -16 -7t-7 -17l-14 -523l14 -241q1 -10 7.5 -16.5t15.5 -6.5q22 0 24 23zM1080 193l11 211l-12 586q0 16 -13 24q-8 5 -16 5t-16 -5q-13 -8 -13 -24l-1 -6l-10 -579q0 -1 11 -236v-1q0 -10 6 -17q9 -11 23 -11 q11 0 20 9q9 7 9 20zM35 533l20 -128l-20 -126q-2 -9 -9 -9t-9 9l-17 126l17 128q2 9 9 9t9 -9zM121 612l26 -207l-26 -203q-2 -9 -10 -9q-9 0 -9 10l-23 202l23 207q0 9 9 9q8 0 10 -9zM401 159zM213 650l25 -245l-25 -237q0 -11 -11 -11q-10 0 -12 11l-21 237l21 245 q2 12 12 12q11 0 11 -12zM307 657l23 -252l-23 -244q-2 -13 -14 -13q-13 0 -13 13l-21 244l21 252q0 13 13 13q12 0 14 -13zM401 639l21 -234l-21 -246q-2 -16 -16 -16q-6 0 -10.5 4.5t-4.5 11.5l-20 246l20 234q0 6 4.5 10.5t10.5 4.5q14 0 16 -15zM784 164zM495 785 l21 -380l-21 -246q0 -7 -5 -12.5t-12 -5.5q-16 0 -18 18l-18 246l18 380q2 18 18 18q7 0 12 -5.5t5 -12.5zM589 871l19 -468l-19 -244q0 -8 -5.5 -13.5t-13.5 -5.5q-18 0 -20 19l-16 244l16 468q2 19 20 19q8 0 13.5 -5.5t5.5 -13.5zM687 911l18 -506l-18 -242 q-2 -21 -22 -21q-19 0 -21 21l-16 242l16 506q0 9 6.5 15.5t14.5 6.5q9 0 15 -6.5t7 -15.5zM1079 169v0v0zM881 915l15 -510l-15 -239q0 -10 -7.5 -17.5t-17.5 -7.5t-17 7t-8 18l-14 239l14 510q0 11 7.5 18t17.5 7t17.5 -7t7.5 -18zM980 896l14 -492l-14 -236q0 -11 -8 -19 t-19 -8t-19 8t-9 19l-12 236l12 492q1 12 9 20t19 8t18.5 -8t8.5 -20zM1192 404l-14 -231v0q0 -13 -9 -22t-22 -9t-22 9t-10 22l-6 114l-6 117l12 636v3q2 15 12 24q9 7 20 7q8 0 15 -5q14 -8 16 -26zM2304 423q0 -117 -83 -199.5t-200 -82.5h-786q-13 2 -22 11t-9 22v899 q0 23 28 33q85 34 181 34q195 0 338 -131.5t160 -323.5q53 22 110 22q117 0 200 -83t83 -201z" />
+<glyph unicode="&#xf1c0;" d="M768 768q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127t443 -43zM768 0q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127 t443 -43zM768 384q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127t443 -43zM768 1536q208 0 385 -34.5t280 -93.5t103 -128v-128q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5 t-103 128v128q0 69 103 128t280 93.5t385 34.5z" />
+<glyph unicode="&#xf1c1;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M894 465q33 -26 84 -56q59 7 117 7q147 0 177 -49q16 -22 2 -52q0 -1 -1 -2l-2 -2v-1q-6 -38 -71 -38q-48 0 -115 20t-130 53q-221 -24 -392 -83q-153 -262 -242 -262q-15 0 -28 7l-24 12q-1 1 -6 5q-10 10 -6 36q9 40 56 91.5t132 96.5q14 9 23 -6q2 -2 2 -4q52 85 107 197 q68 136 104 262q-24 82 -30.5 159.5t6.5 127.5q11 40 42 40h21h1q23 0 35 -15q18 -21 9 -68q-2 -6 -4 -8q1 -3 1 -8v-30q-2 -123 -14 -192q55 -164 146 -238zM318 54q52 24 137 158q-51 -40 -87.5 -84t-49.5 -74zM716 974q-15 -42 -2 -132q1 7 7 44q0 3 7 43q1 4 4 8 q-1 1 -1 2t-0.5 1.5t-0.5 1.5q-1 22 -13 36q0 -1 -1 -2v-2zM592 313q135 54 284 81q-2 1 -13 9.5t-16 13.5q-76 67 -127 176q-27 -86 -83 -197q-30 -56 -45 -83zM1238 329q-24 24 -140 24q76 -28 124 -28q14 0 18 1q0 1 -2 3z" />
+<glyph unicode="&#xf1c2;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M233 768v-107h70l164 -661h159l128 485q7 20 10 46q2 16 2 24h4l3 -24q1 -3 3.5 -20t5.5 -26l128 -485h159l164 661h70v107h-300v-107h90l-99 -438q-5 -20 -7 -46l-2 -21h-4l-3 21q-1 5 -4 21t-5 25l-144 545h-114l-144 -545q-2 -9 -4.5 -24.5t-3.5 -21.5l-4 -21h-4l-2 21 q-2 26 -7 46l-99 438h90v107h-300z" />
+<glyph unicode="&#xf1c3;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M429 106v-106h281v106h-75l103 161q5 7 10 16.5t7.5 13.5t3.5 4h2q1 -4 5 -10q2 -4 4.5 -7.5t6 -8t6.5 -8.5l107 -161h-76v-106h291v106h-68l-192 273l195 282h67v107h-279v-107h74l-103 -159q-4 -7 -10 -16.5t-9 -13.5l-2 -3h-2q-1 4 -5 10q-6 11 -17 23l-106 159h76v107 h-290v-107h68l189 -272l-194 -283h-68z" />
+<glyph unicode="&#xf1c4;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M416 106v-106h327v106h-93v167h137q76 0 118 15q67 23 106.5 87t39.5 146q0 81 -37 141t-100 87q-48 19 -130 19h-368v-107h92v-555h-92zM769 386h-119v268h120q52 0 83 -18q56 -33 56 -115q0 -89 -62 -120q-31 -15 -78 -15z" />
+<glyph unicode="&#xf1c5;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M1280 320v-320h-1024v192l192 192l128 -128l384 384zM448 512q-80 0 -136 56t-56 136t56 136t136 56t136 -56t56 -136t-56 -136t-136 -56z" />
+<glyph unicode="&#xf1c6;" d="M640 1152v128h-128v-128h128zM768 1024v128h-128v-128h128zM640 896v128h-128v-128h128zM768 768v128h-128v-128h128zM1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400 v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-128v-128h-128v128h-512v-1536h1280zM781 593l107 -349q8 -27 8 -52q0 -83 -72.5 -137.5t-183.5 -54.5t-183.5 54.5t-72.5 137.5q0 25 8 52q21 63 120 396v128h128v-128h79 q22 0 39 -13t23 -34zM640 128q53 0 90.5 19t37.5 45t-37.5 45t-90.5 19t-90.5 -19t-37.5 -45t37.5 -45t90.5 -19z" />
+<glyph unicode="&#xf1c7;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M620 686q20 -8 20 -30v-544q0 -22 -20 -30q-8 -2 -12 -2q-12 0 -23 9l-166 167h-131q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h131l166 167q16 15 35 7zM1037 -3q31 0 50 24q129 159 129 363t-129 363q-16 21 -43 24t-47 -14q-21 -17 -23.5 -43.5t14.5 -47.5 q100 -123 100 -282t-100 -282q-17 -21 -14.5 -47.5t23.5 -42.5q18 -15 40 -15zM826 145q27 0 47 20q87 93 87 219t-87 219q-18 19 -45 20t-46 -17t-20 -44.5t18 -46.5q52 -57 52 -131t-52 -131q-19 -20 -18 -46.5t20 -44.5q20 -17 44 -17z" />
+<glyph unicode="&#xf1c8;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M768 768q52 0 90 -38t38 -90v-384q0 -52 -38 -90t-90 -38h-384q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h384zM1260 766q20 -8 20 -30v-576q0 -22 -20 -30q-8 -2 -12 -2q-14 0 -23 9l-265 266v90l265 266q9 9 23 9q4 0 12 -2z" />
+<glyph unicode="&#xf1c9;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M480 768q8 11 21 12.5t24 -6.5l51 -38q11 -8 12.5 -21t-6.5 -24l-182 -243l182 -243q8 -11 6.5 -24t-12.5 -21l-51 -38q-11 -8 -24 -6.5t-21 12.5l-226 301q-14 19 0 38zM1282 467q14 -19 0 -38l-226 -301q-8 -11 -21 -12.5t-24 6.5l-51 38q-11 8 -12.5 21t6.5 24l182 243 l-182 243q-8 11 -6.5 24t12.5 21l51 38q11 8 24 6.5t21 -12.5zM662 6q-13 2 -20.5 13t-5.5 24l138 831q2 13 13 20.5t24 5.5l63 -10q13 -2 20.5 -13t5.5 -24l-138 -831q-2 -13 -13 -20.5t-24 -5.5z" />
+<glyph unicode="&#xf1ca;" d="M1497 709v-198q-101 -23 -198 -23q-65 -136 -165.5 -271t-181.5 -215.5t-128 -106.5q-80 -45 -162 3q-28 17 -60.5 43.5t-85 83.5t-102.5 128.5t-107.5 184t-105.5 244t-91.5 314.5t-70.5 390h283q26 -218 70 -398.5t104.5 -317t121.5 -235.5t140 -195q169 169 287 406 q-142 72 -223 220t-81 333q0 192 104 314.5t284 122.5q178 0 273 -105.5t95 -297.5q0 -159 -58 -286q-7 -1 -19.5 -3t-46 -2t-63 6t-62 25.5t-50.5 51.5q31 103 31 184q0 87 -29 132t-79 45q-53 0 -85 -49.5t-32 -140.5q0 -186 105 -293.5t267 -107.5q62 0 121 14z" />
+<glyph unicode="&#xf1cb;" horiz-adv-x="1792" d="M216 367l603 -402v359l-334 223zM154 511l193 129l-193 129v-258zM973 -35l603 402l-269 180l-334 -223v-359zM896 458l272 182l-272 182l-272 -182zM485 733l334 223v359l-603 -402zM1445 640l193 -129v258zM1307 733l269 180l-603 402v-359zM1792 913v-546 q0 -41 -34 -64l-819 -546q-21 -13 -43 -13t-43 13l-819 546q-34 23 -34 64v546q0 41 34 64l819 546q21 13 43 13t43 -13l819 -546q34 -23 34 -64z" />
+<glyph unicode="&#xf1cc;" horiz-adv-x="2048" d="M1800 764q111 -46 179.5 -145.5t68.5 -221.5q0 -164 -118 -280.5t-285 -116.5q-4 0 -11.5 0.5t-10.5 0.5h-1209h-1h-2h-5q-170 10 -288 125.5t-118 280.5q0 110 55 203t147 147q-12 39 -12 82q0 115 82 196t199 81q95 0 172 -58q75 154 222.5 248t326.5 94 q166 0 306 -80.5t221.5 -218.5t81.5 -301q0 -6 -0.5 -18t-0.5 -18zM468 498q0 -122 84 -193t208 -71q137 0 240 99q-16 20 -47.5 56.5t-43.5 50.5q-67 -65 -144 -65q-55 0 -93.5 33.5t-38.5 87.5q0 53 38.5 87t91.5 34q44 0 84.5 -21t73 -55t65 -75t69 -82t77 -75t97 -55 t121.5 -21q121 0 204.5 71.5t83.5 190.5q0 121 -84 192t-207 71q-143 0 -241 -97q14 -16 29.5 -34t34.5 -40t29 -34q66 64 142 64q52 0 92 -33t40 -84q0 -57 -37 -91.5t-94 -34.5q-43 0 -82.5 21t-72 55t-65.5 75t-69.5 82t-77.5 75t-96.5 55t-118.5 21q-122 0 -207 -70.5 t-85 -189.5z" />
+<glyph unicode="&#xf1cd;" horiz-adv-x="1792" d="M896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM896 1408q-190 0 -361 -90l194 -194q82 28 167 28t167 -28l194 194q-171 90 -361 90zM218 279l194 194 q-28 82 -28 167t28 167l-194 194q-90 -171 -90 -361t90 -361zM896 -128q190 0 361 90l-194 194q-82 -28 -167 -28t-167 28l-194 -194q171 -90 361 -90zM896 256q159 0 271.5 112.5t112.5 271.5t-112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5 t271.5 -112.5zM1380 473l194 -194q90 171 90 361t-90 361l-194 -194q28 -82 28 -167t-28 -167z" />
+<glyph unicode="&#xf1ce;" horiz-adv-x="1792" d="M1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348q0 222 101 414.5t276.5 317t390.5 155.5v-260q-221 -45 -366.5 -221t-145.5 -406q0 -130 51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5 q0 230 -145.5 406t-366.5 221v260q215 -31 390.5 -155.5t276.5 -317t101 -414.5z" />
+<glyph unicode="&#xf1d0;" horiz-adv-x="1792" d="M19 662q8 217 116 406t305 318h5q0 -1 -1 -3q-8 -8 -28 -33.5t-52 -76.5t-60 -110.5t-44.5 -135.5t-14 -150.5t39 -157.5t108.5 -154q50 -50 102 -69.5t90.5 -11.5t69.5 23.5t47 32.5l16 16q39 51 53 116.5t6.5 122.5t-21 107t-26.5 80l-14 29q-10 25 -30.5 49.5t-43 41 t-43.5 29.5t-35 19l-13 6l104 115q39 -17 78 -52t59 -61l19 -27q1 48 -18.5 103.5t-40.5 87.5l-20 31l161 183l160 -181q-33 -46 -52.5 -102.5t-22.5 -90.5l-4 -33q22 37 61.5 72.5t67.5 52.5l28 17l103 -115q-44 -14 -85 -50t-60 -65l-19 -29q-31 -56 -48 -133.5t-7 -170 t57 -156.5q33 -45 77.5 -60.5t85 -5.5t76 26.5t57.5 33.5l21 16q60 53 96.5 115t48.5 121.5t10 121.5t-18 118t-37 107.5t-45.5 93t-45 72t-34.5 47.5l-13 17q-14 13 -7 13l10 -3q40 -29 62.5 -46t62 -50t64 -58t58.5 -65t55.5 -77t45.5 -88t38 -103t23.5 -117t10.5 -136 q3 -259 -108 -465t-312 -321t-456 -115q-185 0 -351 74t-283.5 198t-184 293t-60.5 353z" />
+<glyph unicode="&#xf1d1;" horiz-adv-x="1792" d="M874 -102v-66q-208 6 -385 109.5t-283 275.5l58 34q29 -49 73 -99l65 57q148 -168 368 -212l-17 -86q65 -12 121 -13zM276 428l-83 -28q22 -60 49 -112l-57 -33q-98 180 -98 385t98 385l57 -33q-30 -56 -49 -112l82 -28q-35 -100 -35 -212q0 -109 36 -212zM1528 251 l58 -34q-106 -172 -283 -275.5t-385 -109.5v66q56 1 121 13l-17 86q220 44 368 212l65 -57q44 50 73 99zM1377 805l-233 -80q14 -42 14 -85t-14 -85l232 -80q-31 -92 -98 -169l-185 162q-57 -67 -147 -85l48 -241q-52 -10 -98 -10t-98 10l48 241q-90 18 -147 85l-185 -162 q-67 77 -98 169l232 80q-14 42 -14 85t14 85l-233 80q33 93 99 169l185 -162q59 68 147 86l-48 240q44 10 98 10t98 -10l-48 -240q88 -18 147 -86l185 162q66 -76 99 -169zM874 1448v-66q-65 -2 -121 -13l17 -86q-220 -42 -368 -211l-65 56q-38 -42 -73 -98l-57 33 q106 172 282 275.5t385 109.5zM1705 640q0 -205 -98 -385l-57 33q27 52 49 112l-83 28q36 103 36 212q0 112 -35 212l82 28q-19 56 -49 112l57 33q98 -180 98 -385zM1585 1063l-57 -33q-35 56 -73 98l-65 -56q-148 169 -368 211l17 86q-56 11 -121 13v66q209 -6 385 -109.5 t282 -275.5zM1748 640q0 173 -67.5 331t-181.5 272t-272 181.5t-331 67.5t-331 -67.5t-272 -181.5t-181.5 -272t-67.5 -331t67.5 -331t181.5 -272t272 -181.5t331 -67.5t331 67.5t272 181.5t181.5 272t67.5 331zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71 t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
+<glyph unicode="&#xf1d2;" d="M582 228q0 -66 -93 -66q-107 0 -107 63q0 64 98 64q102 0 102 -61zM546 694q0 -85 -74 -85q-77 0 -77 84q0 90 77 90q36 0 55 -25.5t19 -63.5zM712 769v125q-78 -29 -135 -29q-50 29 -110 29q-86 0 -145 -57t-59 -143q0 -50 29.5 -102t73.5 -67v-3q-38 -17 -38 -85 q0 -53 41 -77v-3q-113 -37 -113 -139q0 -45 20 -78.5t54 -51t72 -25.5t81 -8q224 0 224 188q0 67 -48 99t-126 46q-27 5 -51.5 20.5t-24.5 39.5q0 44 49 52q77 15 122 70t45 134q0 24 -10 52q37 9 49 13zM771 350h137q-2 27 -2 82v387q0 46 2 69h-137q3 -23 3 -71v-392 q0 -50 -3 -75zM1280 366v121q-30 -21 -68 -21q-53 0 -53 82v225h52q9 0 26.5 -1t26.5 -1v117h-105q0 82 3 102h-140q4 -24 4 -55v-47h-60v-117q36 3 37 3q3 0 11 -0.5t12 -0.5v-2h-2v-217q0 -37 2.5 -64t11.5 -56.5t24.5 -48.5t43.5 -31t66 -12q64 0 108 24zM924 1072 q0 36 -24 63.5t-60 27.5t-60.5 -27t-24.5 -64q0 -36 25 -62.5t60 -26.5t59.5 27t24.5 62zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf1d3;" horiz-adv-x="1792" d="M595 22q0 100 -165 100q-158 0 -158 -104q0 -101 172 -101q151 0 151 105zM536 777q0 61 -30 102t-89 41q-124 0 -124 -145q0 -135 124 -135q119 0 119 137zM805 1101v-202q-36 -12 -79 -22q16 -43 16 -84q0 -127 -73 -216.5t-197 -112.5q-40 -8 -59.5 -27t-19.5 -58 q0 -31 22.5 -51.5t58 -32t78.5 -22t86 -25.5t78.5 -37.5t58 -64t22.5 -98.5q0 -304 -363 -304q-69 0 -130 12.5t-116 41t-87.5 82t-32.5 127.5q0 165 182 225v4q-67 41 -67 126q0 109 63 137v4q-72 24 -119.5 108.5t-47.5 165.5q0 139 95 231.5t235 92.5q96 0 178 -47 q98 0 218 47zM1123 220h-222q4 45 4 134v609q0 94 -4 128h222q-4 -33 -4 -124v-613q0 -89 4 -134zM1724 442v-196q-71 -39 -174 -39q-62 0 -107 20t-70 50t-39.5 78t-18.5 92t-4 103v351h2v4q-7 0 -19 1t-18 1q-21 0 -59 -6v190h96v76q0 54 -6 89h227q-6 -41 -6 -165h171 v-190q-15 0 -43.5 2t-42.5 2h-85v-365q0 -131 87 -131q61 0 109 33zM1148 1389q0 -58 -39 -101.5t-96 -43.5q-58 0 -98 43.5t-40 101.5q0 59 39.5 103t98.5 44q58 0 96.5 -44.5t38.5 -102.5z" />
+<glyph unicode="&#xf1d4;" d="M825 547l343 588h-150q-21 -39 -63.5 -118.5t-68 -128.5t-59.5 -118.5t-60 -128.5h-3q-21 48 -44.5 97t-52 105.5t-46.5 92t-54 104.5t-49 95h-150l323 -589v-435h134v436zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960 q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf1d5;" horiz-adv-x="1280" d="M842 964q0 -80 -57 -136.5t-136 -56.5q-60 0 -111 35q-62 -67 -115 -146q-247 -371 -202 -859q1 -22 -12.5 -38.5t-34.5 -18.5h-5q-20 0 -35 13.5t-17 33.5q-14 126 -3.5 247.5t29.5 217t54 186t69 155.5t74 125q61 90 132 165q-16 35 -16 77q0 80 56.5 136.5t136.5 56.5 t136.5 -56.5t56.5 -136.5zM1223 953q0 -158 -78 -292t-212.5 -212t-292.5 -78q-64 0 -131 14q-21 5 -32.5 23.5t-6.5 39.5q5 20 23 31.5t39 7.5q51 -13 108 -13q97 0 186 38t153 102t102 153t38 186t-38 186t-102 153t-153 102t-186 38t-186 -38t-153 -102t-102 -153 t-38 -186q0 -114 52 -218q10 -20 3.5 -40t-25.5 -30t-39.5 -3t-30.5 26q-64 123 -64 265q0 119 46.5 227t124.5 186t186 124t226 46q158 0 292.5 -78t212.5 -212.5t78 -292.5z" />
+<glyph unicode="&#xf1d6;" horiz-adv-x="1792" d="M270 730q-8 19 -8 52q0 20 11 49t24 45q-1 22 7.5 53t22.5 43q0 139 92.5 288.5t217.5 209.5q139 66 324 66q133 0 266 -55q49 -21 90 -48t71 -56t55 -68t42 -74t32.5 -84.5t25.5 -89.5t22 -98l1 -5q55 -83 55 -150q0 -14 -9 -40t-9 -38q0 -1 1.5 -3.5t3.5 -5t2 -3.5 q77 -114 120.5 -214.5t43.5 -208.5q0 -43 -19.5 -100t-55.5 -57q-9 0 -19.5 7.5t-19 17.5t-19 26t-16 26.5t-13.5 26t-9 17.5q-1 1 -3 1l-5 -4q-59 -154 -132 -223q20 -20 61.5 -38.5t69 -41.5t35.5 -65q-2 -4 -4 -16t-7 -18q-64 -97 -302 -97q-53 0 -110.5 9t-98 20 t-104.5 30q-15 5 -23 7q-14 4 -46 4.5t-40 1.5q-41 -45 -127.5 -65t-168.5 -20q-35 0 -69 1.5t-93 9t-101 20.5t-74.5 40t-32.5 64q0 40 10 59.5t41 48.5q11 2 40.5 13t49.5 12q4 0 14 2q2 2 2 4l-2 3q-48 11 -108 105.5t-73 156.5l-5 3q-4 0 -12 -20q-18 -41 -54.5 -74.5 t-77.5 -37.5h-1q-4 0 -6 4.5t-5 5.5q-23 54 -23 100q0 275 252 466z" />
+<glyph unicode="&#xf1d7;" horiz-adv-x="2048" d="M580 1075q0 41 -25 66t-66 25q-43 0 -76 -25.5t-33 -65.5q0 -39 33 -64.5t76 -25.5q41 0 66 24.5t25 65.5zM1323 568q0 28 -25.5 50t-65.5 22q-27 0 -49.5 -22.5t-22.5 -49.5q0 -28 22.5 -50.5t49.5 -22.5q40 0 65.5 22t25.5 51zM1087 1075q0 41 -24.5 66t-65.5 25 q-43 0 -76 -25.5t-33 -65.5q0 -39 33 -64.5t76 -25.5q41 0 65.5 24.5t24.5 65.5zM1722 568q0 28 -26 50t-65 22q-27 0 -49.5 -22.5t-22.5 -49.5q0 -28 22.5 -50.5t49.5 -22.5q39 0 65 22t26 51zM1456 965q-31 4 -70 4q-169 0 -311 -77t-223.5 -208.5t-81.5 -287.5 q0 -78 23 -152q-35 -3 -68 -3q-26 0 -50 1.5t-55 6.5t-44.5 7t-54.5 10.5t-50 10.5l-253 -127l72 218q-290 203 -290 490q0 169 97.5 311t264 223.5t363.5 81.5q176 0 332.5 -66t262 -182.5t136.5 -260.5zM2048 404q0 -117 -68.5 -223.5t-185.5 -193.5l55 -181l-199 109 q-150 -37 -218 -37q-169 0 -311 70.5t-223.5 191.5t-81.5 264t81.5 264t223.5 191.5t311 70.5q161 0 303 -70.5t227.5 -192t85.5 -263.5z" />
+<glyph unicode="&#xf1d8;" horiz-adv-x="1792" d="M1764 1525q33 -24 27 -64l-256 -1536q-5 -29 -32 -45q-14 -8 -31 -8q-11 0 -24 5l-453 185l-242 -295q-18 -23 -49 -23q-13 0 -22 4q-19 7 -30.5 23.5t-11.5 36.5v349l864 1059l-1069 -925l-395 162q-37 14 -40 55q-2 40 32 59l1664 960q15 9 32 9q20 0 36 -11z" />
+<glyph unicode="&#xf1d9;" horiz-adv-x="1792" d="M1764 1525q33 -24 27 -64l-256 -1536q-5 -29 -32 -45q-14 -8 -31 -8q-11 0 -24 5l-527 215l-298 -327q-18 -21 -47 -21q-14 0 -23 4q-19 7 -30 23.5t-11 36.5v452l-472 193q-37 14 -40 55q-3 39 32 59l1664 960q35 21 68 -2zM1422 26l221 1323l-1434 -827l336 -137 l863 639l-478 -797z" />
+<glyph unicode="&#xf1da;" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61q-172 0 -327 72.5t-264 204.5q-7 10 -6.5 22.5t8.5 20.5l137 138q10 9 25 9q16 -2 23 -12q73 -95 179 -147t225 -52q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5 t-163.5 109.5t-198.5 40.5q-98 0 -188 -35.5t-160 -101.5l137 -138q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l130 -129q107 101 244.5 156.5t284.5 55.5q156 0 298 -61t245 -164t164 -245t61 -298zM896 928v-448q0 -14 -9 -23 t-23 -9h-320q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf1db;" d="M768 1280q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5t-51 248.5t-136.5 204t-204 136.5t-248.5 51zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf1dc;" horiz-adv-x="1792" d="M1682 -128q-44 0 -132.5 3.5t-133.5 3.5q-44 0 -132 -3.5t-132 -3.5q-24 0 -37 20.5t-13 45.5q0 31 17 46t39 17t51 7t45 15q33 21 33 140l-1 391q0 21 -1 31q-13 4 -50 4h-675q-38 0 -51 -4q-1 -10 -1 -31l-1 -371q0 -142 37 -164q16 -10 48 -13t57 -3.5t45 -15 t20 -45.5q0 -26 -12.5 -48t-36.5 -22q-47 0 -139.5 3.5t-138.5 3.5q-43 0 -128 -3.5t-127 -3.5q-23 0 -35.5 21t-12.5 45q0 30 15.5 45t36 17.5t47.5 7.5t42 15q33 23 33 143l-1 57v813q0 3 0.5 26t0 36.5t-1.5 38.5t-3.5 42t-6.5 36.5t-11 31.5t-16 18q-15 10 -45 12t-53 2 t-41 14t-18 45q0 26 12 48t36 22q46 0 138.5 -3.5t138.5 -3.5q42 0 126.5 3.5t126.5 3.5q25 0 37.5 -22t12.5 -48q0 -30 -17 -43.5t-38.5 -14.5t-49.5 -4t-43 -13q-35 -21 -35 -160l1 -320q0 -21 1 -32q13 -3 39 -3h699q25 0 38 3q1 11 1 32l1 320q0 139 -35 160 q-18 11 -58.5 12.5t-66 13t-25.5 49.5q0 26 12.5 48t37.5 22q44 0 132 -3.5t132 -3.5q43 0 129 3.5t129 3.5q25 0 37.5 -22t12.5 -48q0 -30 -17.5 -44t-40 -14.5t-51.5 -3t-44 -12.5q-35 -23 -35 -161l1 -943q0 -119 34 -140q16 -10 46 -13.5t53.5 -4.5t41.5 -15.5t18 -44.5 q0 -26 -12 -48t-36 -22z" />
+<glyph unicode="&#xf1dd;" horiz-adv-x="1280" d="M1278 1347v-73q0 -29 -18.5 -61t-42.5 -32q-50 0 -54 -1q-26 -6 -32 -31q-3 -11 -3 -64v-1152q0 -25 -18 -43t-43 -18h-108q-25 0 -43 18t-18 43v1218h-143v-1218q0 -25 -17.5 -43t-43.5 -18h-108q-26 0 -43.5 18t-17.5 43v496q-147 12 -245 59q-126 58 -192 179 q-64 117 -64 259q0 166 88 286q88 118 209 159q111 37 417 37h479q25 0 43 -18t18 -43z" />
+<glyph unicode="&#xf1de;" d="M352 128v-128h-352v128h352zM704 256q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM864 640v-128h-864v128h864zM224 1152v-128h-224v128h224zM1536 128v-128h-736v128h736zM576 1280q26 0 45 -19t19 -45v-256 q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM1216 768q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM1536 640v-128h-224v128h224zM1536 1152v-128h-864v128h864z" />
+<glyph unicode="&#xf1e0;" d="M1216 512q133 0 226.5 -93.5t93.5 -226.5t-93.5 -226.5t-226.5 -93.5t-226.5 93.5t-93.5 226.5q0 12 2 34l-360 180q-92 -86 -218 -86q-133 0 -226.5 93.5t-93.5 226.5t93.5 226.5t226.5 93.5q126 0 218 -86l360 180q-2 22 -2 34q0 133 93.5 226.5t226.5 93.5 t226.5 -93.5t93.5 -226.5t-93.5 -226.5t-226.5 -93.5q-126 0 -218 86l-360 -180q2 -22 2 -34t-2 -34l360 -180q92 86 218 86z" />
+<glyph unicode="&#xf1e1;" d="M1280 341q0 88 -62.5 151t-150.5 63q-84 0 -145 -58l-241 120q2 16 2 23t-2 23l241 120q61 -58 145 -58q88 0 150.5 63t62.5 151t-62.5 150.5t-150.5 62.5t-151 -62.5t-63 -150.5q0 -7 2 -23l-241 -120q-62 57 -145 57q-88 0 -150.5 -62.5t-62.5 -150.5t62.5 -150.5 t150.5 -62.5q83 0 145 57l241 -120q-2 -16 -2 -23q0 -88 63 -150.5t151 -62.5t150.5 62.5t62.5 150.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf1e2;" horiz-adv-x="1792" d="M571 947q-10 25 -34 35t-49 0q-108 -44 -191 -127t-127 -191q-10 -25 0 -49t35 -34q13 -5 24 -5q42 0 60 40q34 84 98.5 148.5t148.5 98.5q25 11 35 35t0 49zM1513 1303l46 -46l-244 -243l68 -68q19 -19 19 -45.5t-19 -45.5l-64 -64q89 -161 89 -343q0 -143 -55.5 -273.5 t-150 -225t-225 -150t-273.5 -55.5t-273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5q182 0 343 -89l64 64q19 19 45.5 19t45.5 -19l68 -68zM1521 1359q-10 -10 -22 -10q-13 0 -23 10l-91 90q-9 10 -9 23t9 23q10 9 23 9t23 -9l90 -91 q10 -9 10 -22.5t-10 -22.5zM1751 1129q-11 -9 -23 -9t-23 9l-90 91q-10 9 -10 22.5t10 22.5q9 10 22.5 10t22.5 -10l91 -90q9 -10 9 -23t-9 -23zM1792 1312q0 -14 -9 -23t-23 -9h-96q-14 0 -23 9t-9 23t9 23t23 9h96q14 0 23 -9t9 -23zM1600 1504v-96q0 -14 -9 -23t-23 -9 t-23 9t-9 23v96q0 14 9 23t23 9t23 -9t9 -23zM1751 1449l-91 -90q-10 -10 -22 -10q-13 0 -23 10q-10 9 -10 22.5t10 22.5l90 91q10 9 23 9t23 -9q9 -10 9 -23t-9 -23z" />
+<glyph unicode="&#xf1e3;" horiz-adv-x="1792" d="M609 720l287 208l287 -208l-109 -336h-355zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM1515 186q149 203 149 454v3l-102 -89l-240 224l63 323 l134 -12q-150 206 -389 282l53 -124l-287 -159l-287 159l53 124q-239 -76 -389 -282l135 12l62 -323l-240 -224l-102 89v-3q0 -251 149 -454l30 132l326 -40l139 -298l-116 -69q117 -39 240 -39t240 39l-116 69l139 298l326 40z" />
+<glyph unicode="&#xf1e4;" horiz-adv-x="1792" d="M448 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM256 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM832 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23 v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM640 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM66 768q-28 0 -47 19t-19 46v129h514v-129q0 -27 -19 -46t-46 -19h-383zM1216 224v-192q0 -14 -9 -23t-23 -9h-192 q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1024 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1600 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23 zM1408 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 1016v-13h-514v10q0 104 -382 102q-382 -1 -382 -102v-10h-514v13q0 17 8.5 43t34 64t65.5 75.5t110.5 76t160 67.5t224 47.5t293.5 18.5t293 -18.5t224 -47.5 t160.5 -67.5t110.5 -76t65.5 -75.5t34 -64t8.5 -43zM1792 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 962v-129q0 -27 -19 -46t-46 -19h-384q-27 0 -46 19t-19 46v129h514z" />
+<glyph unicode="&#xf1e5;" horiz-adv-x="1792" d="M704 1216v-768q0 -26 -19 -45t-45 -19v-576q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v512l249 873q7 23 31 23h424zM1024 1216v-704h-256v704h256zM1792 320v-512q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v576q-26 0 -45 19t-19 45v768h424q24 0 31 -23z M736 1504v-224h-352v224q0 14 9 23t23 9h288q14 0 23 -9t9 -23zM1408 1504v-224h-352v224q0 14 9 23t23 9h288q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf1e6;" horiz-adv-x="1792" d="M1755 1083q37 -37 37 -90t-37 -91l-401 -400l150 -150l-160 -160q-163 -163 -389.5 -186.5t-411.5 100.5l-362 -362h-181v181l362 362q-124 185 -100.5 411.5t186.5 389.5l160 160l150 -150l400 401q38 37 91 37t90 -37t37 -90.5t-37 -90.5l-400 -401l234 -234l401 400 q38 37 91 37t90 -37z" />
+<glyph unicode="&#xf1e7;" horiz-adv-x="1792" d="M873 796q0 -83 -63.5 -142.5t-152.5 -59.5t-152.5 59.5t-63.5 142.5q0 84 63.5 143t152.5 59t152.5 -59t63.5 -143zM1375 796q0 -83 -63 -142.5t-153 -59.5q-89 0 -152.5 59.5t-63.5 142.5q0 84 63.5 143t152.5 59q90 0 153 -59t63 -143zM1600 616v667q0 87 -32 123.5 t-111 36.5h-1112q-83 0 -112.5 -34t-29.5 -126v-673q43 -23 88.5 -40t81 -28t81 -18.5t71 -11t70 -4t58.5 -0.5t56.5 2t44.5 2q68 1 95 -27q6 -6 10 -9q26 -25 61 -51q7 91 118 87q5 0 36.5 -1.5t43 -2t45.5 -1t53 1t54.5 4.5t61 8.5t62 13.5t67 19.5t67.5 27t72 34.5z M1763 621q-121 -149 -372 -252q84 -285 -23 -465q-66 -113 -183 -148q-104 -32 -182 15q-86 51 -82 164l-1 326v1q-8 2 -24.5 6t-23.5 5l-1 -338q4 -114 -83 -164q-79 -47 -183 -15q-117 36 -182 150q-105 180 -22 463q-251 103 -372 252q-25 37 -4 63t60 -1q3 -2 11 -7 t11 -8v694q0 72 47 123t114 51h1257q67 0 114 -51t47 -123v-694l21 15q39 27 60 1t-4 -63z" />
+<glyph unicode="&#xf1e8;" horiz-adv-x="1792" d="M896 1102v-434h-145v434h145zM1294 1102v-434h-145v434h145zM1294 342l253 254v795h-1194v-1049h326v-217l217 217h398zM1692 1536v-1013l-434 -434h-326l-217 -217h-217v217h-398v1158l109 289h1483z" />
+<glyph unicode="&#xf1e9;" d="M773 217v-127q-1 -292 -6 -305q-12 -32 -51 -40q-54 -9 -181.5 38t-162.5 89q-13 15 -17 36q-1 12 4 26q4 10 34 47t181 216q1 0 60 70q15 19 39.5 24.5t49.5 -3.5q24 -10 37.5 -29t12.5 -42zM624 468q-3 -55 -52 -70l-120 -39q-275 -88 -292 -88q-35 2 -54 36 q-12 25 -17 75q-8 76 1 166.5t30 124.5t56 32q13 0 202 -77q70 -29 115 -47l84 -34q23 -9 35.5 -30.5t11.5 -48.5zM1450 171q-7 -54 -91.5 -161t-135.5 -127q-37 -14 -63 7q-14 10 -184 287l-47 77q-14 21 -11.5 46t19.5 46q35 43 83 26q1 -1 119 -40q203 -66 242 -79.5 t47 -20.5q28 -22 22 -61zM778 803q5 -102 -54 -122q-58 -17 -114 71l-378 598q-8 35 19 62q41 43 207.5 89.5t224.5 31.5q40 -10 49 -45q3 -18 22 -305.5t24 -379.5zM1440 695q3 -39 -26 -59q-15 -10 -329 -86q-67 -15 -91 -23l1 2q-23 -6 -46 4t-37 32q-30 47 0 87 q1 1 75 102q125 171 150 204t34 39q28 19 65 2q48 -23 123 -133.5t81 -167.5v-3z" />
+<glyph unicode="&#xf1ea;" horiz-adv-x="2048" d="M1024 1024h-384v-384h384v384zM1152 384v-128h-640v128h640zM1152 1152v-640h-640v640h640zM1792 384v-128h-512v128h512zM1792 640v-128h-512v128h512zM1792 896v-128h-512v128h512zM1792 1152v-128h-512v128h512zM256 192v960h-128v-960q0 -26 19 -45t45 -19t45 19 t19 45zM1920 192v1088h-1536v-1088q0 -33 -11 -64h1483q26 0 45 19t19 45zM2048 1408v-1216q0 -80 -56 -136t-136 -56h-1664q-80 0 -136 56t-56 136v1088h256v128h1792z" />
+<glyph unicode="&#xf1eb;" horiz-adv-x="2048" d="M1024 13q-20 0 -93 73.5t-73 93.5q0 32 62.5 54t103.5 22t103.5 -22t62.5 -54q0 -20 -73 -93.5t-93 -73.5zM1294 284q-2 0 -40 25t-101.5 50t-128.5 25t-128.5 -25t-101 -50t-40.5 -25q-18 0 -93.5 75t-75.5 93q0 13 10 23q78 77 196 121t233 44t233 -44t196 -121 q10 -10 10 -23q0 -18 -75.5 -93t-93.5 -75zM1567 556q-11 0 -23 8q-136 105 -252 154.5t-268 49.5q-85 0 -170.5 -22t-149 -53t-113.5 -62t-79 -53t-31 -22q-17 0 -92 75t-75 93q0 12 10 22q132 132 320 205t380 73t380 -73t320 -205q10 -10 10 -22q0 -18 -75 -93t-92 -75z M1838 827q-11 0 -22 9q-179 157 -371.5 236.5t-420.5 79.5t-420.5 -79.5t-371.5 -236.5q-11 -9 -22 -9q-17 0 -92.5 75t-75.5 93q0 13 10 23q187 186 445 288t527 102t527 -102t445 -288q10 -10 10 -23q0 -18 -75.5 -93t-92.5 -75z" />
+<glyph unicode="&#xf1ec;" horiz-adv-x="1792" d="M384 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM384 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5 t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1152 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5 t37.5 90.5zM384 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1152 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 768q0 53 -37.5 90.5t-90.5 37.5 t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1536 0v384q0 52 -38 90t-90 38t-90 -38t-38 -90v-384q0 -52 38 -90t90 -38t90 38t38 90zM1152 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5z M1536 1088v256q0 26 -19 45t-45 19h-1280q-26 0 -45 -19t-19 -45v-256q0 -26 19 -45t45 -19h1280q26 0 45 19t19 45zM1536 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 1408v-1536q0 -52 -38 -90t-90 -38 h-1408q-52 0 -90 38t-38 90v1536q0 52 38 90t90 38h1408q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf1ed;" horiz-adv-x="1792" d="M1112 1090q0 159 -237 159h-70q-32 0 -59.5 -21.5t-34.5 -52.5l-63 -276q-2 -5 -2 -16q0 -24 17 -39.5t41 -15.5h53q69 0 128.5 13t112.5 41t83.5 81.5t30.5 126.5zM1716 938q0 -265 -220 -428q-219 -161 -612 -161h-61q-32 0 -59 -21.5t-34 -52.5l-73 -316 q-8 -36 -40.5 -61.5t-69.5 -25.5h-213q-31 0 -53 20t-22 51q0 10 13 65h151q34 0 64 23.5t38 56.5l73 316q8 33 37.5 57t63.5 24h61q390 0 607 160t217 421q0 129 -51 207q183 -92 183 -335zM1533 1123q0 -264 -221 -428q-218 -161 -612 -161h-60q-32 0 -59.5 -22t-34.5 -53 l-73 -315q-8 -36 -40 -61.5t-69 -25.5h-214q-31 0 -52.5 19.5t-21.5 51.5q0 8 2 20l300 1301q8 36 40.5 61.5t69.5 25.5h444q68 0 125 -4t120.5 -15t113.5 -30t96.5 -50.5t77.5 -74t49.5 -103.5t18.5 -136z" />
+<glyph unicode="&#xf1ee;" horiz-adv-x="1792" d="M602 949q19 -61 31 -123.5t17 -141.5t-14 -159t-62 -145q-21 81 -67 157t-95.5 127t-99 90.5t-78.5 57.5t-33 19q-62 34 -81.5 100t14.5 128t101 81.5t129 -14.5q138 -83 238 -177zM927 1236q11 -25 20.5 -46t36.5 -100.5t42.5 -150.5t25.5 -179.5t0 -205.5t-47.5 -209.5 t-105.5 -208.5q-51 -72 -138 -72q-54 0 -98 31q-57 40 -69 109t28 127q60 85 81 195t13 199.5t-32 180.5t-39 128t-22 52q-31 63 -8.5 129.5t85.5 97.5q34 17 75 17q47 0 88.5 -25t63.5 -69zM1248 567q-17 -160 -72 -311q-17 131 -63 246q25 174 -5 361q-27 178 -94 342 q114 -90 212 -211q9 -37 15 -80q26 -179 7 -347zM1520 1440q9 -17 23.5 -49.5t43.5 -117.5t50.5 -178t34 -227.5t5 -269t-47 -300t-112.5 -323.5q-22 -48 -66 -75.5t-95 -27.5q-39 0 -74 16q-67 31 -92.5 100t4.5 136q58 126 90 257.5t37.5 239.5t-3.5 213.5t-26.5 180.5 t-38.5 138.5t-32.5 90t-15.5 32.5q-34 65 -11.5 135.5t87.5 104.5q37 20 81 20q49 0 91.5 -25.5t66.5 -70.5z" />
+<glyph unicode="&#xf1f0;" horiz-adv-x="2304" d="M1975 546h-138q14 37 66 179l3 9q4 10 10 26t9 26l12 -55zM531 611l-58 295q-11 54 -75 54h-268l-2 -13q311 -79 403 -336zM710 960l-162 -438l-17 89q-26 70 -85 129.5t-131 88.5l135 -510h175l261 641h-176zM849 318h166l104 642h-166zM1617 944q-69 27 -149 27 q-123 0 -201 -59t-79 -153q-1 -102 145 -174q48 -23 67 -41t19 -39q0 -30 -30 -46t-69 -16q-86 0 -156 33l-22 11l-23 -144q74 -34 185 -34q130 -1 208.5 59t80.5 160q0 106 -140 174q-49 25 -71 42t-22 38q0 22 24.5 38.5t70.5 16.5q70 1 124 -24l15 -8zM2042 960h-128 q-65 0 -87 -54l-246 -588h174l35 96h212q5 -22 20 -96h154zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf1f1;" horiz-adv-x="2304" d="M671 603h-13q-47 0 -47 -32q0 -22 20 -22q17 0 28 15t12 39zM1066 639h62v3q1 4 0.5 6.5t-1 7t-2 8t-4.5 6.5t-7.5 5t-11.5 2q-28 0 -36 -38zM1606 603h-12q-48 0 -48 -32q0 -22 20 -22q17 0 28 15t12 39zM1925 629q0 41 -30 41q-19 0 -31 -20t-12 -51q0 -42 28 -42 q20 0 32.5 20t12.5 52zM480 770h87l-44 -262h-56l32 201l-71 -201h-39l-4 200l-34 -200h-53l44 262h81l2 -163zM733 663q0 -6 -4 -42q-16 -101 -17 -113h-47l1 22q-20 -26 -58 -26q-23 0 -37.5 16t-14.5 42q0 39 26 60.5t73 21.5q14 0 23 -1q0 3 0.5 5.5t1 4.5t0.5 3 q0 20 -36 20q-29 0 -59 -10q0 4 7 48q38 11 67 11q74 0 74 -62zM889 721l-8 -49q-22 3 -41 3q-27 0 -27 -17q0 -8 4.5 -12t21.5 -11q40 -19 40 -60q0 -72 -87 -71q-34 0 -58 6q0 2 7 49q29 -8 51 -8q32 0 32 19q0 7 -4.5 11.5t-21.5 12.5q-43 20 -43 59q0 72 84 72 q30 0 50 -4zM977 721h28l-7 -52h-29q-2 -17 -6.5 -40.5t-7 -38.5t-2.5 -18q0 -16 19 -16q8 0 16 2l-8 -47q-21 -7 -40 -7q-43 0 -45 47q0 12 8 56q3 20 25 146h55zM1180 648q0 -23 -7 -52h-111q-3 -22 10 -33t38 -11q30 0 58 14l-9 -54q-30 -8 -57 -8q-95 0 -95 95 q0 55 27.5 90.5t69.5 35.5q35 0 55.5 -21t20.5 -56zM1319 722q-13 -23 -22 -62q-22 2 -31 -24t-25 -128h-56l3 14q22 130 29 199h51l-3 -33q14 21 25.5 29.5t28.5 4.5zM1506 763l-9 -57q-28 14 -50 14q-31 0 -51 -27.5t-20 -70.5q0 -30 13.5 -47t38.5 -17q21 0 48 13 l-10 -59q-28 -8 -50 -8q-45 0 -71.5 30.5t-26.5 82.5q0 70 35.5 114.5t91.5 44.5q26 0 61 -13zM1668 663q0 -18 -4 -42q-13 -79 -17 -113h-46l1 22q-20 -26 -59 -26q-23 0 -37 16t-14 42q0 39 25.5 60.5t72.5 21.5q15 0 23 -1q2 7 2 13q0 20 -36 20q-29 0 -59 -10q0 4 8 48 q38 11 67 11q73 0 73 -62zM1809 722q-14 -24 -21 -62q-23 2 -31.5 -23t-25.5 -129h-56l3 14q19 104 29 199h52q0 -11 -4 -33q15 21 26.5 29.5t27.5 4.5zM1950 770h56l-43 -262h-53l3 19q-23 -23 -52 -23q-31 0 -49.5 24t-18.5 64q0 53 27.5 92t64.5 39q31 0 53 -29z M2061 640q0 148 -72.5 273t-198 198t-273.5 73q-181 0 -328 -110q127 -116 171 -284h-50q-44 150 -158 253q-114 -103 -158 -253h-50q44 168 171 284q-147 110 -328 110q-148 0 -273.5 -73t-198 -198t-72.5 -273t72.5 -273t198 -198t273.5 -73q181 0 328 110 q-120 111 -165 264h50q46 -138 152 -233q106 95 152 233h50q-45 -153 -165 -264q147 -110 328 -110q148 0 273.5 73t198 198t72.5 273zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf1f2;" horiz-adv-x="2304" d="M313 759q0 -51 -36 -84q-29 -26 -89 -26h-17v220h17q61 0 89 -27q36 -31 36 -83zM2089 824q0 -52 -64 -52h-19v101h20q63 0 63 -49zM380 759q0 74 -50 120.5t-129 46.5h-95v-333h95q74 0 119 38q60 51 60 128zM410 593h65v333h-65v-333zM730 694q0 40 -20.5 62t-75.5 42 q-29 10 -39.5 19t-10.5 23q0 16 13.5 26.5t34.5 10.5q29 0 53 -27l34 44q-41 37 -98 37q-44 0 -74 -27.5t-30 -67.5q0 -35 18 -55.5t64 -36.5q37 -13 45 -19q19 -12 19 -34q0 -20 -14 -33.5t-36 -13.5q-48 0 -71 44l-42 -40q44 -64 115 -64q51 0 83 30.5t32 79.5zM1008 604 v77q-37 -37 -78 -37q-49 0 -80.5 32.5t-31.5 82.5q0 48 31.5 81.5t77.5 33.5q43 0 81 -38v77q-40 20 -80 20q-74 0 -125.5 -50.5t-51.5 -123.5t51 -123.5t125 -50.5q42 0 81 19zM2240 0v527q-65 -40 -144.5 -84t-237.5 -117t-329.5 -137.5t-417.5 -134.5t-504 -118h1569 q26 0 45 19t19 45zM1389 757q0 75 -53 128t-128 53t-128 -53t-53 -128t53 -128t128 -53t128 53t53 128zM1541 584l144 342h-71l-90 -224l-89 224h-71l142 -342h35zM1714 593h184v56h-119v90h115v56h-115v74h119v57h-184v-333zM2105 593h80l-105 140q76 16 76 94q0 47 -31 73 t-87 26h-97v-333h65v133h9zM2304 1274v-1268q0 -56 -38.5 -95t-93.5 -39h-2040q-55 0 -93.5 39t-38.5 95v1268q0 56 38.5 95t93.5 39h2040q55 0 93.5 -39t38.5 -95z" />
+<glyph unicode="&#xf1f3;" horiz-adv-x="2304" d="M119 854h89l-45 108zM740 328l74 79l-70 79h-163v-49h142v-55h-142v-54h159zM898 406l99 -110v217zM1186 453q0 33 -40 33h-84v-69h83q41 0 41 36zM1475 457q0 29 -42 29h-82v-61h81q43 0 43 32zM1197 923q0 29 -42 29h-82v-60h81q43 0 43 31zM1656 854h89l-44 108z M699 1009v-271h-66v212l-94 -212h-57l-94 212v-212h-132l-25 60h-135l-25 -60h-70l116 271h96l110 -257v257h106l85 -184l77 184h108zM1255 453q0 -20 -5.5 -35t-14 -25t-22.5 -16.5t-26 -10t-31.5 -4.5t-31.5 -1t-32.5 0.5t-29.5 0.5v-91h-126l-80 90l-83 -90h-256v271h260 l80 -89l82 89h207q109 0 109 -89zM964 794v-56h-217v271h217v-57h-152v-49h148v-55h-148v-54h152zM2304 235v-229q0 -55 -38.5 -94.5t-93.5 -39.5h-2040q-55 0 -93.5 39.5t-38.5 94.5v678h111l25 61h55l25 -61h218v46l19 -46h113l20 47v-47h541v99l10 1q10 0 10 -14v-86h279 v23q23 -12 55 -18t52.5 -6.5t63 0.5t51.5 1l25 61h56l25 -61h227v58l34 -58h182v378h-180v-44l-25 44h-185v-44l-23 44h-249q-69 0 -109 -22v22h-172v-22q-24 22 -73 22h-628l-43 -97l-43 97h-198v-44l-22 44h-169l-78 -179v391q0 55 38.5 94.5t93.5 39.5h2040 q55 0 93.5 -39.5t38.5 -94.5v-678h-120q-51 0 -81 -22v22h-177q-55 0 -78 -22v22h-316v-22q-31 22 -87 22h-209v-22q-23 22 -91 22h-234l-54 -58l-50 58h-349v-378h343l55 59l52 -59h211v89h21q59 0 90 13v-102h174v99h8q8 0 10 -2t2 -10v-87h529q57 0 88 24v-24h168 q60 0 95 17zM1546 469q0 -23 -12 -43t-34 -29q25 -9 34 -26t9 -46v-54h-65v45q0 33 -12 43.5t-46 10.5h-69v-99h-65v271h154q48 0 77 -15t29 -58zM1269 936q0 -24 -12.5 -44t-33.5 -29q26 -9 34.5 -25.5t8.5 -46.5v-53h-65q0 9 0.5 26.5t0 25t-3 18.5t-8.5 16t-17.5 8.5 t-29.5 3.5h-70v-98h-64v271l153 -1q49 0 78 -14.5t29 -57.5zM1798 327v-56h-216v271h216v-56h-151v-49h148v-55h-148v-54zM1372 1009v-271h-66v271h66zM2065 357q0 -86 -102 -86h-126v58h126q34 0 34 25q0 16 -17 21t-41.5 5t-49.5 3.5t-42 22.5t-17 55q0 39 26 60t66 21 h130v-57h-119q-36 0 -36 -25q0 -16 17.5 -20.5t42 -4t49 -2.5t42 -21.5t17.5 -54.5zM2304 407v-101q-24 -35 -88 -35h-125v58h125q33 0 33 25q0 13 -12.5 19t-31 5.5t-40 2t-40 8t-31 24t-12.5 48.5q0 39 26.5 60t66.5 21h129v-57h-118q-36 0 -36 -25q0 -20 29 -22t68.5 -5 t56.5 -26zM2139 1008v-270h-92l-122 203v-203h-132l-26 60h-134l-25 -60h-75q-129 0 -129 133q0 138 133 138h63v-59q-7 0 -28 1t-28.5 0.5t-23 -2t-21.5 -6.5t-14.5 -13.5t-11.5 -23t-3 -33.5q0 -38 13.5 -58t49.5 -20h29l92 213h97l109 -256v256h99l114 -188v188h66z" />
+<glyph unicode="&#xf1f4;" horiz-adv-x="2304" d="M322 689h-15q-19 0 -19 18q0 28 19 85q5 15 15 19.5t28 4.5q77 0 77 -49q0 -41 -30.5 -59.5t-74.5 -18.5zM664 528q-47 0 -47 29q0 62 123 62l3 -3q-5 -88 -79 -88zM1438 687h-15q-19 0 -19 19q0 28 19 85q5 15 14.5 19t28.5 4q77 0 77 -49q0 -41 -30.5 -59.5 t-74.5 -18.5zM1780 527q-47 0 -47 30q0 62 123 62l3 -3q-5 -89 -79 -89zM373 894h-128q-8 0 -14.5 -4t-8.5 -7.5t-7 -12.5q-3 -7 -45 -190t-42 -192q0 -7 5.5 -12.5t13.5 -5.5h62q25 0 32.5 34.5l15 69t32.5 34.5q47 0 87.5 7.5t80.5 24.5t63.5 52.5t23.5 84.5 q0 36 -14.5 61t-41 36.5t-53.5 15.5t-62 4zM719 798q-38 0 -74 -6q-2 0 -8.5 -1t-9 -1.5l-7.5 -1.5t-7.5 -2t-6.5 -3t-6.5 -4t-5 -5t-4.5 -7t-4 -9q-9 -29 -9 -39t9 -10q5 0 21.5 5t19.5 6q30 8 58 8q74 0 74 -36q0 -11 -10 -14q-8 -2 -18 -3t-21.5 -1.5t-17.5 -1.5 q-38 -4 -64.5 -10t-56.5 -19.5t-45.5 -39t-15.5 -62.5q0 -38 26 -59.5t64 -21.5q24 0 45.5 6.5t33 13t38.5 23.5q-3 -7 -3 -15t5.5 -13.5t12.5 -5.5h56q1 1 7 3.5t7.5 3.5t5 3.5t5 5.5t2.5 8l45 194q4 13 4 30q0 81 -145 81zM1247 793h-74q-22 0 -39 -23q-5 -7 -29.5 -51 t-46.5 -81.5t-26 -38.5l-5 4q0 77 -27 166q-1 5 -3.5 8.5t-6 6.5t-6.5 5t-8.5 3t-8.5 1.5t-9.5 1t-9 0.5h-10h-8.5q-38 0 -38 -21l1 -5q5 -53 25 -151t25 -143q2 -16 2 -24q0 -19 -30.5 -61.5t-30.5 -58.5q0 -13 40 -13q61 0 76 25l245 415q10 20 10 26q0 9 -8 9zM1489 892 h-129q-18 0 -29 -23q-6 -13 -46.5 -191.5t-40.5 -190.5q0 -20 43 -20h7.5h9h9t9.5 1t8.5 2t8.5 3t6.5 4.5t5.5 6t3 8.5l21 91q2 10 10.5 17t19.5 7q47 0 87.5 7t80.5 24.5t63.5 52.5t23.5 84q0 36 -14.5 61t-41 36.5t-53.5 15.5t-62 4zM1835 798q-26 0 -74 -6 q-38 -6 -48 -16q-7 -8 -11 -19q-8 -24 -8 -39q0 -10 8 -10q1 0 41 12q30 8 58 8q74 0 74 -36q0 -12 -10 -14q-4 -1 -57 -7q-38 -4 -64.5 -10t-56.5 -19.5t-45.5 -39t-15.5 -62.5t26 -58.5t64 -21.5q24 0 45 6t34 13t38 24q-3 -15 -3 -16q0 -5 2 -8.5t6.5 -5.5t8 -3.5 t10.5 -2t9.5 -0.5h9.5h8q42 0 48 25l45 194q3 15 3 31q0 81 -145 81zM2157 889h-55q-25 0 -33 -40q-10 -44 -36.5 -167t-42.5 -190v-5q0 -16 16 -18h1h57q10 0 18.5 6.5t10.5 16.5l83 374h-1l1 5q0 7 -5.5 12.5t-13.5 5.5zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048 q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf1f5;" horiz-adv-x="2304" d="M1597 633q0 -69 -21 -106q-19 -35 -52 -35q-23 0 -41 9v224q29 30 57 30q57 0 57 -122zM2035 669h-110q6 98 56 98q51 0 54 -98zM476 534q0 59 -33 91.5t-101 57.5q-36 13 -52 24t-16 25q0 26 38 26q58 0 124 -33l18 112q-67 32 -149 32q-77 0 -123 -38q-48 -39 -48 -109 q0 -58 32.5 -90.5t99.5 -56.5q39 -14 54.5 -25.5t15.5 -27.5q0 -31 -48 -31q-29 0 -70 12.5t-72 30.5l-18 -113q72 -41 168 -41q81 0 129 37q51 41 51 117zM771 749l19 111h-96v135l-129 -21l-18 -114l-46 -8l-17 -103h62v-219q0 -84 44 -120q38 -30 111 -30q32 0 79 11v118 q-32 -7 -44 -7q-42 0 -42 50v197h77zM1087 724v139q-15 3 -28 3q-32 0 -55.5 -16t-33.5 -46l-10 56h-131v-471h150v306q26 31 82 31q16 0 26 -2zM1124 389h150v471h-150v-471zM1746 638q0 122 -45 179q-40 52 -111 52q-64 0 -117 -56l-8 47h-132v-645l150 25v151 q36 -11 68 -11q83 0 134 56q61 65 61 202zM1278 986q0 33 -23 56t-56 23t-56 -23t-23 -56t23 -56.5t56 -23.5t56 23.5t23 56.5zM2176 629q0 113 -48 176q-50 64 -144 64q-96 0 -151.5 -66t-55.5 -180q0 -128 63 -188q55 -55 161 -55q101 0 160 40l-16 103q-57 -31 -128 -31 q-43 0 -63 19q-23 19 -28 66h248q2 14 2 52zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf1f6;" horiz-adv-x="2048" d="M1558 684q61 -356 298 -556q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-180.5 74.5t-75.5 180.5zM1024 -176q16 0 16 16t-16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5zM2026 1424q8 -10 7.5 -23.5t-10.5 -22.5 l-1872 -1622q-10 -8 -23.5 -7t-21.5 11l-84 96q-8 10 -7.5 23.5t10.5 21.5l186 161q-19 32 -19 66q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q124 -18 219 -82.5t148 -157.5 l418 363q10 8 23.5 7t21.5 -11z" />
+<glyph unicode="&#xf1f7;" horiz-adv-x="2048" d="M1040 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM503 315l877 760q-42 88 -132.5 146.5t-223.5 58.5q-93 0 -169.5 -31.5t-121.5 -80.5t-69 -103t-24 -105q0 -384 -137 -645zM1856 128 q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-180.5 74.5t-75.5 180.5l149 129h757q-166 187 -227 459l111 97q61 -356 298 -556zM1942 1520l84 -96q8 -10 7.5 -23.5t-10.5 -22.5l-1872 -1622q-10 -8 -23.5 -7t-21.5 11l-84 96q-8 10 -7.5 23.5t10.5 21.5l186 161 q-19 32 -19 66q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q124 -18 219 -82.5t148 -157.5l418 363q10 8 23.5 7t21.5 -11z" />
+<glyph unicode="&#xf1f8;" horiz-adv-x="1408" d="M512 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM768 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1024 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704 q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM1408 1120v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h309l70 167 q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf1f9;" d="M1150 462v-109q0 -50 -36.5 -89t-94 -60.5t-118 -32.5t-117.5 -11q-205 0 -342.5 139t-137.5 346q0 203 136 339t339 136q34 0 75.5 -4.5t93 -18t92.5 -34t69 -56.5t28 -81v-109q0 -16 -16 -16h-118q-16 0 -16 16v70q0 43 -65.5 67.5t-137.5 24.5q-140 0 -228.5 -91.5 t-88.5 -237.5q0 -151 91.5 -249.5t233.5 -98.5q68 0 138 24t70 66v70q0 7 4.5 11.5t10.5 4.5h119q6 0 11 -4.5t5 -11.5zM768 1280q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5 t-51 248.5t-136.5 204t-204 136.5t-248.5 51zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf1fa;" d="M972 761q0 108 -53.5 169t-147.5 61q-63 0 -124 -30.5t-110 -84.5t-79.5 -137t-30.5 -180q0 -112 53.5 -173t150.5 -61q96 0 176 66.5t122.5 166t42.5 203.5zM1536 640q0 -111 -37 -197t-98.5 -135t-131.5 -74.5t-145 -27.5q-6 0 -15.5 -0.5t-16.5 -0.5q-95 0 -142 53 q-28 33 -33 83q-52 -66 -131.5 -110t-173.5 -44q-161 0 -249.5 95.5t-88.5 269.5q0 157 66 290t179 210.5t246 77.5q87 0 155 -35.5t106 -99.5l2 19l11 56q1 6 5.5 12t9.5 6h118q5 0 13 -11q5 -5 3 -16l-120 -614q-5 -24 -5 -48q0 -39 12.5 -52t44.5 -13q28 1 57 5.5t73 24 t77 50t57 89.5t24 137q0 292 -174 466t-466 174q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51q228 0 405 144q11 9 24 8t21 -12l41 -49q8 -12 7 -24q-2 -13 -12 -22q-102 -83 -227.5 -128t-258.5 -45q-156 0 -298 61 t-245 164t-164 245t-61 298t61 298t164 245t245 164t298 61q344 0 556 -212t212 -556z" />
+<glyph unicode="&#xf1fb;" horiz-adv-x="1792" d="M1698 1442q94 -94 94 -226.5t-94 -225.5l-225 -223l104 -104q10 -10 10 -23t-10 -23l-210 -210q-10 -10 -23 -10t-23 10l-105 105l-603 -603q-37 -37 -90 -37h-203l-256 -128l-64 64l128 256v203q0 53 37 90l603 603l-105 105q-10 10 -10 23t10 23l210 210q10 10 23 10 t23 -10l104 -104l223 225q93 94 225.5 94t226.5 -94zM512 64l576 576l-192 192l-576 -576v-192h192z" />
+<glyph unicode="&#xf1fc;" horiz-adv-x="1792" d="M1615 1536q70 0 122.5 -46.5t52.5 -116.5q0 -63 -45 -151q-332 -629 -465 -752q-97 -91 -218 -91q-126 0 -216.5 92.5t-90.5 219.5q0 128 92 212l638 579q59 54 130 54zM706 502q39 -76 106.5 -130t150.5 -76l1 -71q4 -213 -129.5 -347t-348.5 -134q-123 0 -218 46.5 t-152.5 127.5t-86.5 183t-29 220q7 -5 41 -30t62 -44.5t59 -36.5t46 -17q41 0 55 37q25 66 57.5 112.5t69.5 76t88 47.5t103 25.5t125 10.5z" />
+<glyph unicode="&#xf1fd;" horiz-adv-x="1792" d="M1792 128v-384h-1792v384q45 0 85 14t59 27.5t47 37.5q30 27 51.5 38t56.5 11t55.5 -11t52.5 -38q29 -25 47 -38t58 -27t86 -14q45 0 85 14.5t58 27t48 37.5q21 19 32.5 27t31 15t43.5 7q35 0 56.5 -11t51.5 -38q28 -24 47 -37.5t59 -27.5t85 -14t85 14t59 27.5t47 37.5 q30 27 51.5 38t56.5 11q34 0 55.5 -11t51.5 -38q28 -24 47 -37.5t59 -27.5t85 -14zM1792 448v-192q-35 0 -55.5 11t-52.5 38q-29 25 -47 38t-58 27t-85 14q-46 0 -86 -14t-58 -27t-47 -38q-22 -19 -33 -27t-31 -15t-44 -7q-35 0 -56.5 11t-51.5 38q-29 25 -47 38t-58 27 t-86 14q-45 0 -85 -14.5t-58 -27t-48 -37.5q-21 -19 -32.5 -27t-31 -15t-43.5 -7q-35 0 -56.5 11t-51.5 38q-28 24 -47 37.5t-59 27.5t-85 14q-46 0 -86 -14t-58 -27t-47 -38q-30 -27 -51.5 -38t-56.5 -11v192q0 80 56 136t136 56h64v448h256v-448h256v448h256v-448h256v448 h256v-448h64q80 0 136 -56t56 -136zM512 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5q0 29 9.5 51t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150zM1024 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5q0 29 9.5 51 t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150zM1536 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5q0 29 9.5 51t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150z" />
+<glyph unicode="&#xf1fe;" horiz-adv-x="2048" d="M2048 0v-128h-2048v1536h128v-1408h1920zM1664 1024l256 -896h-1664v576l448 576l576 -576z" />
+<glyph unicode="&#xf200;" horiz-adv-x="1792" d="M768 646l546 -546q-106 -108 -247.5 -168t-298.5 -60q-209 0 -385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103v-762zM955 640h773q0 -157 -60 -298.5t-168 -247.5zM1664 768h-768v768q209 0 385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf201;" horiz-adv-x="2048" d="M2048 0v-128h-2048v1536h128v-1408h1920zM1920 1248v-435q0 -21 -19.5 -29.5t-35.5 7.5l-121 121l-633 -633q-10 -10 -23 -10t-23 10l-233 233l-416 -416l-192 192l585 585q10 10 23 10t23 -10l233 -233l464 464l-121 121q-16 16 -7.5 35.5t29.5 19.5h435q14 0 23 -9 t9 -23z" />
+<glyph unicode="&#xf202;" horiz-adv-x="1792" d="M1292 832q0 -6 10 -41q10 -29 25 -49.5t41 -34t44 -20t55 -16.5q325 -91 325 -332q0 -146 -105.5 -242.5t-254.5 -96.5q-59 0 -111.5 18.5t-91.5 45.5t-77 74.5t-63 87.5t-53.5 103.5t-43.5 103t-39.5 106.5t-35.5 95q-32 81 -61.5 133.5t-73.5 96.5t-104 64t-142 20 q-96 0 -183 -55.5t-138 -144.5t-51 -185q0 -160 106.5 -279.5t263.5 -119.5q177 0 258 95q56 63 83 116l84 -152q-15 -34 -44 -70l1 -1q-131 -152 -388 -152q-147 0 -269.5 79t-190.5 207.5t-68 274.5q0 105 43.5 206t116 176.5t172 121.5t204.5 46q87 0 159 -19t123.5 -50 t95 -80t72.5 -99t58.5 -117t50.5 -124.5t50 -130.5t55 -127q96 -200 233 -200q81 0 138.5 48.5t57.5 128.5q0 42 -19 72t-50.5 46t-72.5 31.5t-84.5 27t-87.5 34t-81 52t-65 82t-39 122.5q-3 16 -3 33q0 110 87.5 192t198.5 78q78 -3 120.5 -14.5t90.5 -53.5h-1 q12 -11 23 -24.5t26 -36t19 -27.5l-129 -99q-26 49 -54 70v1q-23 21 -97 21q-49 0 -84 -33t-35 -83z" />
+<glyph unicode="&#xf203;" d="M1432 484q0 173 -234 239q-35 10 -53 16.5t-38 25t-29 46.5q0 2 -2 8.5t-3 12t-1 7.5q0 36 24.5 59.5t60.5 23.5q54 0 71 -15h-1q20 -15 39 -51l93 71q-39 54 -49 64q-33 29 -67.5 39t-85.5 10q-80 0 -142 -57.5t-62 -137.5q0 -7 2 -23q16 -96 64.5 -140t148.5 -73 q29 -8 49 -15.5t45 -21.5t38.5 -34.5t13.5 -46.5v-5q1 -58 -40.5 -93t-100.5 -35q-97 0 -167 144q-23 47 -51.5 121.5t-48 125.5t-54 110.5t-74 95.5t-103.5 60.5t-147 24.5q-101 0 -192 -56t-144 -148t-50 -192v-1q4 -108 50.5 -199t133.5 -147.5t196 -56.5q186 0 279 110 q20 27 31 51l-60 109q-42 -80 -99 -116t-146 -36q-115 0 -191 87t-76 204q0 105 82 189t186 84q112 0 170 -53.5t104 -172.5q8 -21 25.5 -68.5t28.5 -76.5t31.5 -74.5t38.5 -74t45.5 -62.5t55.5 -53.5t66 -33t80 -13.5q107 0 183 69.5t76 174.5zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf204;" horiz-adv-x="2048" d="M1152 640q0 104 -40.5 198.5t-109.5 163.5t-163.5 109.5t-198.5 40.5t-198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5t198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5zM1920 640q0 104 -40.5 198.5 t-109.5 163.5t-163.5 109.5t-198.5 40.5h-386q119 -90 188.5 -224t69.5 -288t-69.5 -288t-188.5 -224h386q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5zM2048 640q0 -130 -51 -248.5t-136.5 -204t-204 -136.5t-248.5 -51h-768q-130 0 -248.5 51t-204 136.5 t-136.5 204t-51 248.5t51 248.5t136.5 204t204 136.5t248.5 51h768q130 0 248.5 -51t204 -136.5t136.5 -204t51 -248.5z" />
+<glyph unicode="&#xf205;" horiz-adv-x="2048" d="M0 640q0 130 51 248.5t136.5 204t204 136.5t248.5 51h768q130 0 248.5 -51t204 -136.5t136.5 -204t51 -248.5t-51 -248.5t-136.5 -204t-204 -136.5t-248.5 -51h-768q-130 0 -248.5 51t-204 136.5t-136.5 204t-51 248.5zM1408 128q104 0 198.5 40.5t163.5 109.5 t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5t-163.5 109.5t-198.5 40.5t-198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5z" />
+<glyph unicode="&#xf206;" horiz-adv-x="2304" d="M762 384h-314q-40 0 -57.5 35t6.5 67l188 251q-65 31 -137 31q-132 0 -226 -94t-94 -226t94 -226t226 -94q115 0 203 72.5t111 183.5zM576 512h186q-18 85 -75 148zM1056 512l288 384h-480l-99 -132q105 -103 126 -252h165zM2176 448q0 132 -94 226t-226 94 q-60 0 -121 -24l174 -260q15 -23 10 -49t-27 -40q-15 -11 -36 -11q-35 0 -53 29l-174 260q-93 -95 -93 -225q0 -132 94 -226t226 -94t226 94t94 226zM2304 448q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 97 39.5 183.5t109.5 149.5l-65 98l-353 -469 q-18 -26 -51 -26h-197q-23 -164 -149 -274t-294 -110q-185 0 -316.5 131.5t-131.5 316.5t131.5 316.5t316.5 131.5q114 0 215 -55l137 183h-224q-26 0 -45 19t-19 45t19 45t45 19h384v-128h435l-85 128h-222q-26 0 -45 19t-19 45t19 45t45 19h256q33 0 53 -28l267 -400 q91 44 192 44q185 0 316.5 -131.5t131.5 -316.5z" />
+<glyph unicode="&#xf207;" d="M384 320q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1408 320q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1362 716l-72 384q-5 23 -22.5 37.5t-40.5 14.5 h-918q-23 0 -40.5 -14.5t-22.5 -37.5l-72 -384q-5 -30 14 -53t49 -23h1062q30 0 49 23t14 53zM1136 1328q0 20 -14 34t-34 14h-640q-20 0 -34 -14t-14 -34t14 -34t34 -14h640q20 0 34 14t14 34zM1536 603v-603h-128v-128q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5v128h-768v-128q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5v128h-128v603q0 112 25 223l103 454q9 78 97.5 137t230 89t312.5 30t312.5 -30t230 -89t97.5 -137l105 -454q23 -102 23 -223z" />
+<glyph unicode="&#xf208;" horiz-adv-x="2048" d="M1463 704q0 -35 -25 -60.5t-61 -25.5h-702q-36 0 -61 25.5t-25 60.5t25 60.5t61 25.5h702q36 0 61 -25.5t25 -60.5zM1677 704q0 86 -23 170h-982q-36 0 -61 25t-25 60q0 36 25 61t61 25h908q-88 143 -235 227t-320 84q-177 0 -327.5 -87.5t-238 -237.5t-87.5 -327 q0 -86 23 -170h982q36 0 61 -25t25 -60q0 -36 -25 -61t-61 -25h-908q88 -143 235.5 -227t320.5 -84q132 0 253 51.5t208 139t139 208t52 253.5zM2048 959q0 -35 -25 -60t-61 -25h-131q17 -85 17 -170q0 -167 -65.5 -319.5t-175.5 -263t-262.5 -176t-319.5 -65.5 q-246 0 -448.5 133t-301.5 350h-189q-36 0 -61 25t-25 61q0 35 25 60t61 25h132q-17 85 -17 170q0 167 65.5 319.5t175.5 263t262.5 176t320.5 65.5q245 0 447.5 -133t301.5 -350h188q36 0 61 -25t25 -61z" />
+<glyph unicode="&#xf209;" horiz-adv-x="1280" d="M953 1158l-114 -328l117 -21q165 451 165 518q0 56 -38 56q-57 0 -130 -225zM654 471l33 -88q37 42 71 67l-33 5.5t-38.5 7t-32.5 8.5zM362 1367q0 -98 159 -521q18 10 49 10q15 0 75 -5l-121 351q-75 220 -123 220q-19 0 -29 -17.5t-10 -37.5zM283 608q0 -36 51.5 -119 t117.5 -153t100 -70q14 0 25.5 13t11.5 27q0 24 -32 102q-13 32 -32 72t-47.5 89t-61.5 81t-62 32q-20 0 -45.5 -27t-25.5 -47zM125 273q0 -41 25 -104q59 -145 183.5 -227t281.5 -82q227 0 382 170q152 169 152 427q0 43 -1 67t-11.5 62t-30.5 56q-56 49 -211.5 75.5 t-270.5 26.5q-37 0 -49 -11q-12 -5 -12 -35q0 -34 21.5 -60t55.5 -40t77.5 -23.5t87.5 -11.5t85 -4t70 0h23q24 0 40 -19q15 -19 19 -55q-28 -28 -96 -54q-61 -22 -93 -46q-64 -46 -108.5 -114t-44.5 -137q0 -31 18.5 -88.5t18.5 -87.5l-3 -12q-4 -12 -4 -14 q-137 10 -146 216q-8 -2 -41 -2q2 -7 2 -21q0 -53 -40.5 -89.5t-94.5 -36.5q-82 0 -166.5 78t-84.5 159q0 34 33 67q52 -64 60 -76q77 -104 133 -104q12 0 26.5 8.5t14.5 20.5q0 34 -87.5 145t-116.5 111q-43 0 -70 -44.5t-27 -90.5zM11 264q0 101 42.5 163t136.5 88 q-28 74 -28 104q0 62 61 123t122 61q29 0 70 -15q-163 462 -163 567q0 80 41 130.5t119 50.5q131 0 325 -581q6 -17 8 -23q6 16 29 79.5t43.5 118.5t54 127.5t64.5 123t70.5 86.5t76.5 36q71 0 112 -49t41 -122q0 -108 -159 -550q61 -15 100.5 -46t58.5 -78t26 -93.5 t7 -110.5q0 -150 -47 -280t-132 -225t-211 -150t-278 -55q-111 0 -223 42q-149 57 -258 191.5t-109 286.5z" />
+<glyph unicode="&#xf20a;" horiz-adv-x="2048" d="M785 528h207q-14 -158 -98.5 -248.5t-214.5 -90.5q-162 0 -254.5 116t-92.5 316q0 194 93 311.5t233 117.5q148 0 232 -87t97 -247h-203q-5 64 -35.5 99t-81.5 35q-57 0 -88.5 -60.5t-31.5 -177.5q0 -48 5 -84t18 -69.5t40 -51.5t66 -18q95 0 109 139zM1497 528h206 q-14 -158 -98 -248.5t-214 -90.5q-162 0 -254.5 116t-92.5 316q0 194 93 311.5t233 117.5q148 0 232 -87t97 -247h-204q-4 64 -35 99t-81 35q-57 0 -88.5 -60.5t-31.5 -177.5q0 -48 5 -84t18 -69.5t39.5 -51.5t65.5 -18q49 0 76.5 38t33.5 101zM1856 647q0 207 -15.5 307 t-60.5 161q-6 8 -13.5 14t-21.5 15t-16 11q-86 63 -697 63q-625 0 -710 -63q-5 -4 -17.5 -11.5t-21 -14t-14.5 -14.5q-45 -60 -60 -159.5t-15 -308.5q0 -208 15 -307.5t60 -160.5q6 -8 15 -15t20.5 -14t17.5 -12q44 -33 239.5 -49t470.5 -16q610 0 697 65q5 4 17 11t20.5 14 t13.5 16q46 60 61 159t15 309zM2048 1408v-1536h-2048v1536h2048z" />
+<glyph unicode="&#xf20b;" d="M992 912v-496q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v496q0 112 -80 192t-192 80h-272v-1152q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v1344q0 14 9 23t23 9h464q135 0 249 -66.5t180.5 -180.5t66.5 -249zM1376 1376v-880q0 -135 -66.5 -249t-180.5 -180.5 t-249 -66.5h-464q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h160q14 0 23 -9t9 -23v-768h272q112 0 192 80t80 192v880q0 14 9 23t23 9h160q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf20c;" d="M1311 694v-114q0 -24 -13.5 -38t-37.5 -14h-202q-24 0 -38 14t-14 38v114q0 24 14 38t38 14h202q24 0 37.5 -14t13.5 -38zM821 464v250q0 53 -32.5 85.5t-85.5 32.5h-133q-68 0 -96 -52q-28 52 -96 52h-130q-53 0 -85.5 -32.5t-32.5 -85.5v-250q0 -22 21 -22h55 q22 0 22 22v230q0 24 13.5 38t38.5 14h94q24 0 38 -14t14 -38v-230q0 -22 21 -22h54q22 0 22 22v230q0 24 14 38t38 14h97q24 0 37.5 -14t13.5 -38v-230q0 -22 22 -22h55q21 0 21 22zM1410 560v154q0 53 -33 85.5t-86 32.5h-264q-53 0 -86 -32.5t-33 -85.5v-410 q0 -21 22 -21h55q21 0 21 21v180q31 -42 94 -42h191q53 0 86 32.5t33 85.5zM1536 1176v-1072q0 -96 -68 -164t-164 -68h-1072q-96 0 -164 68t-68 164v1072q0 96 68 164t164 68h1072q96 0 164 -68t68 -164z" />
+<glyph unicode="&#xf20d;" horiz-adv-x="1792" />
+<glyph unicode="&#xf20e;" horiz-adv-x="1792" />
+<glyph unicode="&#xf500;" horiz-adv-x="1792" />
+</font>
+</defs></svg> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/fonts/fontawesome-webfont.ttf b/common/src/main/webapp/thirdparty/fonts/fontawesome-webfont.ttf
new file mode 100644
index 0000000..96a3639
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/fonts/fontawesome-webfont.ttf
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/fonts/fontawesome-webfont.woff b/common/src/main/webapp/thirdparty/fonts/fontawesome-webfont.woff
new file mode 100644
index 0000000..628b6a5
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/fonts/fontawesome-webfont.woff
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/fonts/fontomas-webfont.eot b/common/src/main/webapp/thirdparty/fonts/fontomas-webfont.eot
new file mode 100644
index 0000000..0d76574
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/fonts/fontomas-webfont.eot
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/fonts/fontomas-webfont.svg b/common/src/main/webapp/thirdparty/fonts/fontomas-webfont.svg
new file mode 100644
index 0000000..55b094d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/fonts/fontomas-webfont.svg
@@ -0,0 +1,31 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata>
+This is a custom SVG webfont generated by Font Squirrel.
+</metadata>
+<defs>
+<font id="FontomasCustomRegular" horiz-adv-x="1024" >
+<font-face units-per-em="2048" ascent="1536" descent="-512" />
+<missing-glyph horiz-adv-x="500" />
+<glyph unicode="e" d="M31 102v1004l1030 -483l1018 481v-1002h-2048zM31 1389v249h2048v-249l-1020 -484z" />
+<glyph unicode="p" d="M31 102l780 781q-12 63 -12 116q0 264 187.5 451.5t452.5 187.5t452.5 -187t187.5 -452.5t-187.5 -453t-453.5 -187.5q-51 0 -115 13l-12 -13v-256h-256v-256h-256v-256h-768v512zM1311 998.5q0 -52.5 37.5 -90.5t91 -38t90.5 38t37 90.5t-37 90t-90.5 37.5t-91 -37.5 t-37.5 -90z" />
+<glyph unicode="u" d="M207 -90q0 45 112.5 111.5t305.5 138.5q193 68 264.5 139.5t71.5 196.5q0 33 -12.5 55t-30 36.5t-37 55.5t-31.5 102q-4 20 -14.5 29.5t-22.5 15t-24.5 14.5t-21.5 37.5t-15 76.5q0 31 10 52t20 27l11 7q-20 102 -29 180q0 7 -1 13q0 28 7 61q8 42 34.5 92.5t70 90.5 t120 67.5t174.5 27.5q100 0 178 -27.5t122 -67.5t71 -90.5t35 -92.5q5 -28 5 -51q0 -12 -1 -23q-8 -78 -29 -180q37 -16 37 -86q-2 -47 -12 -76t-21.5 -38t-23.5 -14.5t-22.5 -14.5t-14.5 -30q-10 -61 -30.5 -102t-37 -55.5t-30 -37t-13.5 -54.5q0 -125 72 -197t260 -139 q195 -72 306.5 -138.5t111.5 -111.5v-217h-963h-962v217z" />
+<glyph unicode="&#x2000;" horiz-adv-x="819" />
+<glyph unicode="&#x2001;" horiz-adv-x="1638" />
+<glyph unicode="&#x2002;" horiz-adv-x="819" />
+<glyph unicode="&#x2003;" horiz-adv-x="1638" />
+<glyph unicode="&#x2004;" horiz-adv-x="544" />
+<glyph unicode="&#x2005;" horiz-adv-x="409" />
+<glyph unicode="&#x2006;" horiz-adv-x="272" />
+<glyph unicode="&#x2007;" horiz-adv-x="272" />
+<glyph unicode="&#x2008;" horiz-adv-x="204" />
+<glyph unicode="&#x2009;" horiz-adv-x="327" />
+<glyph unicode="&#x200a;" horiz-adv-x="90" />
+<glyph unicode="&#x2013;" d="M205 512v205h614v-205h-614z" />
+<glyph unicode="&#x2014;" horiz-adv-x="2048" d="M205 512v205h1638v-205h-1638z" />
+<glyph unicode="&#x202f;" horiz-adv-x="327" />
+<glyph unicode="&#x205f;" horiz-adv-x="409" />
+<glyph unicode="&#xe000;" horiz-adv-x="500" d="M0 0v0v0v0v0z" />
+</font>
+</defs></svg> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/fonts/fontomas-webfont.ttf b/common/src/main/webapp/thirdparty/fonts/fontomas-webfont.ttf
new file mode 100644
index 0000000..9023661
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/fonts/fontomas-webfont.ttf
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/fonts/fontomas-webfont.woff b/common/src/main/webapp/thirdparty/fonts/fontomas-webfont.woff
new file mode 100644
index 0000000..986efed
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/fonts/fontomas-webfont.woff
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/fonts/franchise-bold-webfont.eot b/common/src/main/webapp/thirdparty/fonts/franchise-bold-webfont.eot
new file mode 100644
index 0000000..e1d8186
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/fonts/franchise-bold-webfont.eot
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/fonts/franchise-bold-webfont.svg b/common/src/main/webapp/thirdparty/fonts/franchise-bold-webfont.svg
new file mode 100644
index 0000000..9ce06d0
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/fonts/franchise-bold-webfont.svg
@@ -0,0 +1,175 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata>
+This is a custom SVG webfont generated by Font Squirrel.
+</metadata>
+<defs>
+<font id="FranchiseRegular" horiz-adv-x="737" >
+<font-face units-per-em="2048" ascent="1536" descent="-512" />
+<missing-glyph horiz-adv-x="270" />
+<glyph unicode=" " horiz-adv-x="270" />
+<glyph unicode="&#x09;" horiz-adv-x="270" />
+<glyph unicode="&#xa0;" horiz-adv-x="270" />
+<glyph unicode="!" horiz-adv-x="425" d="M82 117q0 53 39 92t92 39t92 -39t39 -92t-39 -92t-92 -39t-92 39t-39 92zM92 836v28v541q0 29 29 29h184q29 0 29 -29v-541v-28q0 -16 -2 -29l-45 -430q-4 -29 -31 -29h-86q-27 0 -31 29l-45 430q-2 13 -2 29z" />
+<glyph unicode="&#x22;" horiz-adv-x="569" d="M41 1004v401q0 29 29 29h153q29 0 25 -29l-74 -401q-4 -29 -33 -29h-71q-29 0 -29 29zM319 1004v401q0 29 29 29h154q29 0 24 -29l-73 -401q-4 -29 -33 -29h-72q-29 0 -29 29z" />
+<glyph unicode="#" horiz-adv-x="974" d="M41 541v65q0 29 29 29h213l26 168h-239q-29 0 -29 28v66q0 29 29 29h260l43 270q4 29 33 29h63q29 0 25 -29l-43 -270h139l43 270q4 29 33 29h63q29 0 25 -29l-43 -270h194q29 0 29 -29v-66q0 -29 -29 -28h-215l-26 -168h241q29 0 29 -29v-65q0 -29 -29 -29h-262 l-43 -274q-4 -29 -33 -29h-63q-29 0 -25 29l43 274h-139l-43 -274q-4 -29 -33 -29h-63q-29 0 -25 29l43 274h-192q-29 0 -29 29zM403 635h140l26 168h-139z" />
+<glyph unicode="$" horiz-adv-x="675" d="M41 319v117q0 29 27 37l186 49q27 8 27 -20v-172q0 -20 14 -34.5t35 -14.5h16q20 0 34.5 14t14.5 35v194q-2 27 -8 47.5t-25 36.5l-264 203q-31 29 -44 57.5t-13 75.5v172q0 96 60.5 167t152.5 87v76q0 29 29 29h110q29 0 29 -29v-76q92 -16 152.5 -87t60.5 -167v-78 q0 -29 -27 -37l-186 -49q-27 -8 -27 21v133q0 20 -14 34.5t-35 14.5h-16q-20 0 -34.5 -14.5t-14.5 -34.5v-113q2 -23 8 -39t22 -32l269 -201q33 -29 42 -58.5t13 -66.5v-277q0 -96 -60.5 -166.5t-152.5 -86.5v-78q0 -29 -29 -29h-110q-29 0 -29 29v78q-92 16 -152.5 86.5 t-60.5 166.5z" />
+<glyph unicode="%" horiz-adv-x="1107" d="M72 883v401q0 68 48 116t116 48h61q68 0 116 -48t48 -116v-401q0 -68 -48 -116t-116 -48h-61q-68 0 -116 48t-48 116zM137 27l666 1380q8 27 37 27h110q12 0 18.5 -9.5t2.5 -19.5l-666 -1378q-8 -27 -37 -27h-110q-29 0 -21 27zM229 891q0 -29 29 -29h16q29 0 29 29v385 q0 29 -29 29h-16q-29 0 -29 -29v-385zM647 150v401q0 68 48 116t116 48h61q68 0 116 -48.5t48 -115.5v-401q0 -68 -48 -116t-116 -48h-61q-68 0 -116 48t-48 116zM805 158q0 -29 29 -29h16q29 0 29 29v385q0 29 -29 28h-16q-29 0 -29 -28v-385z" />
+<glyph unicode="&#x26;" horiz-adv-x="843" d="M82 244v362q0 43 10 88q6 16 13.5 29.5t19.5 24.5q27 23 59 34q-35 14 -59 41q-29 33 -39 82q-2 12 -3 25.5t-1 27.5v232q0 53 20.5 100t55.5 82t82 55.5t100 20.5h78q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-211q0 -29 -27 -21l-186 50q-27 8 -27 36v136 q0 20 -14 34.5t-35 14.5h-16q-20 0 -34.5 -14.5t-14.5 -34.5v-238q0 -33 10 -43q4 -4 13 -11t24 -7h96q10 0 17 -7.5t7 -17.5v-151q0 -10 -7 -17.5t-17 -7.5h-96q-18 0 -25.5 -6t-11.5 -10q-6 -8 -8 -24.5t-2 -33.5v-352q0 -20 14 -34.5t35 -14.5h16q20 0 34.5 14t14.5 35 v297q0 16 17 12l292 -69q16 -4 17 -21v-67q0 -16 -17 -13l-69 15v-164q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100 20.5t-82 55t-55.5 82t-20.5 100.5z" />
+<glyph unicode="'" horiz-adv-x="290" d="M41 1004v401q0 29 29 29h153q29 0 25 -29l-74 -401q-4 -29 -33 -29h-71q-29 0 -29 29z" />
+<glyph unicode="(" horiz-adv-x="481" d="M20 717q0 307 89 532q43 113 107.5 206t148.5 169q18 18 36 0l52 -51q18 -18 2 -37q-51 -66 -90 -142.5t-66 -174.5q-29 -98 -44 -221.5t-15 -280.5q0 -158 15 -281t44 -221q27 -98 65.5 -175t90.5 -142q16 -18 -2 -37l-52 -51q-18 -18 -36 0q-84 76 -148.5 168 t-107.5 206q-89 222 -89 533z" />
+<glyph unicode=")" horiz-adv-x="481" d="M27 -102q51 66 89 142.5t66 174.5q27 98 43.5 221t16.5 281t-16.5 280.5t-43.5 221.5q-29 98 -66.5 174.5t-88.5 142.5q-16 18 2 37l51 51q18 18 37 0q168 -152 256 -375q43 -115 65.5 -246t22.5 -286q0 -156 -22.5 -288t-65.5 -245q-45 -115 -108.5 -207t-147.5 -167 q-18 -18 -37 0l-51 51q-18 19 -2 37z" />
+<glyph unicode="*" horiz-adv-x="536" d="M41 1087q0 6 4 14.5t16 14.5q18 10 47 25.5t64 27.5q-35 12 -63.5 27.5t-47.5 26.5q-20 10 -20 26q0 8 4 17l29 51q4 4 12 8q14 8 35 -2q23 -12 47.5 -29.5t52.5 -40.5q-6 35 -10 68t-4 55q-2 14 4 20.5t12 10.5q8 4 17 4h57q8 0 16 -4q16 -8 17 -31q0 -23 -4 -55.5 t-11 -67.5q29 23 53.5 40.5t47.5 29.5q18 10 35 2q8 -4 12 -8l29 -51q4 -8 4 -17q0 -14 -21 -26q-18 -10 -47 -25.5t-63 -28.5q35 -12 63.5 -27.5t46.5 -25.5q20 -12 21 -29q0 -8 -4 -14l-29 -51q-4 -6 -12 -10q-14 -8 -35 4q-43 20 -101 69q6 -35 10.5 -67.5t4.5 -54.5 q0 -23 -17 -31q-8 -4 -16 -4h-57q-8 0 -17 4q-6 4 -12 10t-4 21q0 23 4 55.5t10 66.5q-59 -49 -100 -69q-23 -10 -35 -4q-8 4 -12 10l-29 51q-4 6 -4 14z" />
+<glyph unicode="+" horiz-adv-x="897" d="M61 672v155q0 29 29 29h252v252q0 29 29 29h155q29 0 29 -29v-252h252q29 0 29 -29v-155q0 -29 -29 -29h-252v-252q0 -29 -29 -29h-155q-29 0 -29 29v252h-252q-29 0 -29 29z" />
+<glyph unicode="," horiz-adv-x="362" d="M41 129q0 45 33 80q37 39 92 39q61 0 101 -41t48 -101q4 -20 5.5 -40.5t-3.5 -40.5q-8 -55 -33.5 -100.5t-72.5 -76.5q-12 -8 -25.5 -15t-27.5 -11q-2 0 -13 -2l-20 -4q-4 0 -8 2q-8 4 -8 14v31q0 2 2 6q6 6 10 6q18 0 50 17.5t42 74.5q2 8 1 19.5t-7 15.5q-4 4 -15.5 1 t-17.5 -3q-35 0 -56.5 9t-39.5 26q-37 33 -37 94z" />
+<glyph unicode="-" horiz-adv-x="610" d="M61 672v155q0 29 29 29h430q29 0 29 -29v-155q0 -29 -29 -29h-430q-29 0 -29 29z" />
+<glyph unicode="." horiz-adv-x="344" d="M41 117q0 53 39 92t92 39t92 -39t39 -92t-39 -92t-92 -39t-92 39t-39 92z" />
+<glyph unicode="/" horiz-adv-x="598" d="M2 27l426 1380q8 27 37 27h110q12 0 18.5 -9.5t2.5 -19.5l-426 -1378q-8 -27 -37 -27h-110q-29 0 -21 27z" />
+<glyph unicode="0" horiz-adv-x="757" d="M82 244v946q0 53 20.5 100t55.5 82t82 55.5t100 20.5h78q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-946q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100 20.5t-82 55t-55.5 82t-20.5 100.5zM322 254q0 -20 14 -34.5t35 -14.5h16q20 0 34.5 14 t14.5 35v926q0 20 -14 34.5t-35 14.5h-16q-20 0 -34.5 -14.5t-14.5 -34.5v-926z" />
+<glyph unicode="1" horiz-adv-x="577" d="M82 1014v153q0 10 7 18.5t17 10.5q47 18 87 51q35 27 64.5 69t37.5 101q6 16 22 17h152q27 -4 27 -29v-1376q0 -29 -29 -29h-182q-29 0 -29 29v1028q-27 -20 -66.5 -41t-74.5 -27q-14 -4 -23 4q-10 7 -10 21z" />
+<glyph unicode="2" horiz-adv-x="759" d="M82 979v211q0 53 20.5 100t55.5 82t82 55.5t100 20.5h78q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-123v-121q0 -63 -15.5 -122.5t-50.5 -112.5q-31 -49 -66.5 -100.5t-68.5 -100.5q-6 -10 -12 -19.5t-12 -19.5q-31 -49 -51.5 -92t-32.5 -76q-14 -37 -25 -72h317 q18 0 19 -18v-195q0 -18 -19 -18h-540q-14 0 -19 18q-6 39 -7 77t1 69q2 37 8 69q4 39 14.5 74t20.5 64q12 33 27 59q53 96 100 170t84 127q43 61 80 107q10 23 8 43t0 61v242q0 20 -14 34.5t-35 14.5h-16q-20 0 -34.5 -14.5t-14.5 -34.5v-136q0 -29 -27 -36l-186 -50 q-27 -8 -27 21z" />
+<glyph unicode="3" horiz-adv-x="757" d="M82 244v223q0 29 27 37l186 49q27 8 27 -21v-278q0 -20 14 -34.5t35 -14.5h16q20 0 34.5 14t14.5 35v352q0 16 -2 32.5t-8 25.5q-4 4 -11 10t-26 6h-96q-10 0 -17.5 7t-7.5 18v151q0 10 7.5 17.5t17.5 7.5h96q14 0 23.5 7t13.5 11q10 10 10 43v238q0 20 -14 34.5 t-35 14.5h-16q-20 0 -34.5 -14.5t-14.5 -34.5v-136q0 -29 -27 -36l-186 -50q-27 -8 -27 21v211q0 53 20.5 100t55.5 82t82 55.5t100 20.5h78q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-232q0 -14 -1 -27t-3 -26q-10 -49 -39 -82q-27 -27 -60 -41q33 -12 60 -34 q18 -18 33 -54q10 -45 10 -88v-362q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100 20.5t-82 55t-55.5 82t-20.5 100.5z" />
+<glyph unicode="4" horiz-adv-x="798" d="M41 315v174q0 10 2 15q0 4 2 6q80 156 132 302t83 266t44 206t18 123q0 6 4 12l9 9q5 5 15 6h246q29 0 29 -29v-893h65q6 0 19 -8q8 -8 8 -19v-170q0 -12 -8 -20q-12 -8 -19 -8h-65v-258q0 -29 -29 -29h-182q-29 0 -29 29v258h-317q-10 0 -19 8q-8 6 -8 20zM233 512h150 v471q-12 -63 -33 -139q-16 -66 -46 -150t-71 -182z" />
+<glyph unicode="5" horiz-adv-x="759" d="M82 244v84q0 29 27 37l186 49q27 8 27 -21v-139q0 -20 14 -34.5t35 -14.5h16q20 0 34.5 14t14.5 35v403q0 33 -12 45q-4 4 -13.5 10.5t-23.5 6.5h-16q-14 0 -23.5 -7t-13.5 -12q-12 -12 -12 -43v-57q0 -10 -6.5 -16t-16.5 -2l-195 51q-23 8 -22 29v743q0 29 29 29h120 h371q29 0 29 -29v-174q0 -29 -29 -29h-280v-309q61 29 133 29q41 0 77 -11q72 -20 109 -73.5t35 -126.5v-467q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100 20.5t-82 55t-55.5 82t-20.5 100.5z" />
+<glyph unicode="6" horiz-adv-x="757" d="M82 244v946q0 53 20.5 100t55.5 82t82 55.5t100 20.5h78q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-84q0 -29 -27 -37l-186 -49q-27 -8 -27 20v140q0 20 -14 34.5t-35 14.5h-16q-20 0 -34.5 -14.5t-14.5 -34.5v-301q61 29 133 28q41 0 77 -10q143 -41 144 -201v-452 q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100 20.5t-82 55t-55.5 82t-20.5 100.5zM322 254q0 -20 14 -34.5t35 -14.5h16q20 0 34.5 14t14.5 35v389q0 33 -12 45q-4 4 -13.5 10.5t-23.5 6.5h-16q-14 0 -23.5 -7.5t-13.5 -11.5q-12 -12 -12 -43v-389z" />
+<glyph unicode="7" horiz-adv-x="649" d="M41 1235v172q0 6 8 18q8 8 19 9h501q12 0 21 -9q8 -12 8 -18v-190q-43 -115 -70.5 -226.5t-45 -206t-24.5 -162t-9 -94.5q-10 -123 -13.5 -244.5t-3.5 -256.5q0 -27 -26 -27h-189q-14 0 -22 12q-4 6 -5 15q0 190 10.5 378.5t39.5 374.5q25 154 55.5 262.5t48.5 165.5 h-276q-12 0 -19 9q-8 8 -8 18z" />
+<glyph unicode="8" horiz-adv-x="757" d="M82 244v362q0 43 10 88q6 16 13.5 29.5t19.5 24.5q27 23 59 34q-35 14 -59 41q-29 33 -39 82q-2 12 -3 25.5t-1 27.5v232q0 53 20.5 100t55.5 82t82 55.5t100 20.5h78q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-232q0 -14 -1 -27t-3 -26q-10 -49 -39 -82 q-27 -27 -60 -41q33 -12 60 -34q18 -18 33 -54q10 -45 10 -88v-362q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100 20.5t-82 55t-55.5 82t-20.5 100.5zM322 254q0 -20 14 -34.5t35 -14.5h16q20 0 34.5 14t14.5 35v342q0 16 -2 32.5t-8 24.5 q-4 4 -11 10.5t-26 6.5h-20q-18 0 -25.5 -6.5t-11.5 -10.5q-6 -8 -8 -24.5t-2 -32.5v-342zM322 956q0 -33 10 -43q4 -4 13 -11t24 -7h20q14 0 23.5 7t13.5 11q10 10 10 43v224q0 20 -14 34.5t-35 14.5h-16q-20 0 -34.5 -14.5t-14.5 -34.5v-224z" />
+<glyph unicode="9" horiz-adv-x="757" d="M82 244v84q0 29 27 37l186 49q27 8 27 -21v-139q0 -20 14 -34.5t35 -14.5h16q20 0 34.5 14t14.5 35v301q-63 -29 -133 -29q-41 0 -78 11q-143 39 -143 200v453q0 53 20.5 100t55.5 82t82 55.5t100 20.5h78q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-946 q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100 20.5t-82 55t-55.5 82t-20.5 100.5zM322 791q0 -33 12 -46q4 -4 13 -10t24 -6h16q14 0 23.5 7t13.5 12q12 12 12 43v389q0 20 -14 34.5t-35 14.5h-16q-20 0 -34.5 -14.5t-14.5 -34.5v-389z" />
+<glyph unicode=":" horiz-adv-x="344" d="M41 444q0 53 39 92t92 39t92 -38.5t39 -92.5q0 -53 -39 -92t-92 -39t-92 39t-39 92zM41 905q0 53 39 92t92 39t92 -39t39 -92t-39 -92t-92 -39t-92 39t-39 92z" />
+<glyph unicode=";" horiz-adv-x="362" d="M41 461q0 45 33 80q37 39 92 39q61 0 101 -41t48 -101q4 -20 5.5 -40.5t-3.5 -41.5q-8 -55 -33.5 -100t-72.5 -76q-12 -8 -25.5 -15t-27.5 -11q-2 0 -13 -2l-20 -5q-4 0 -8 3q-8 4 -8 14v31q0 2 2 6q6 6 10 6q18 0 50 17.5t42 74.5q2 8 1 19.5t-7 15.5q-4 4 -15.5 1 t-17.5 -3q-35 0 -56.5 9t-39.5 26q-37 33 -37 94zM41 905q0 53 39 92t92 39t92 -39t39 -92t-39 -92t-92 -39t-92 39t-39 92z" />
+<glyph unicode="&#x3c;" horiz-adv-x="655" d="M41 690v53q0 10 6 15l524 440q10 8 16.5 4t6.5 -16v-201q0 -29 -23 -47l-92 -78l-166 -137q-2 -2 -2 -6t2 -6l166 -138l92 -77q23 -18 23 -47v-201q0 -12 -6 -16.5t-17 4.5l-524 440q-4 2 -5 6t-1 8z" />
+<glyph unicode="=" horiz-adv-x="720" d="M61 512v156q0 29 29 28h541q29 0 28 -28v-156q0 -29 -28 -29h-541q-29 0 -29 29zM61 819v156q0 29 29 29h541q29 0 28 -29v-156q0 -29 -28 -28h-541q-29 -1 -29 28z" />
+<glyph unicode="&#x3e;" horiz-adv-x="655" d="M61 248v201q0 29 23 47l258 215q2 2 2 6t-2 6l-258 215q-23 18 -23 47v201q0 12 6.5 16t16.5 -4l524 -440q6 -4 6 -15v-53q0 -4 -1 -8t-5 -6l-524 -440q-10 -8 -16.5 -4t-6.5 16z" />
+<glyph unicode="?" horiz-adv-x="782" d="M72 946v156q0 168 82 257t231 89q104 0 167.5 -36t99.5 -92t47.5 -125t9.5 -132q-2 -59 -6.5 -94t-18.5 -66t-45 -68.5t-86 -101.5q-37 -43 -74 -82t-55 -84q-12 -29 -18.5 -77t-10.5 -87l-2 -30q0 -10 -7 -16.5t-17 -6.5h-86q-23 0 -27 23q-4 49 -8 90q-4 35 -6 65.5 t-2 38.5q-2 47 14 88t42 81t59.5 81t64.5 88q18 29 27.5 48.5t14.5 37t5 34.5v42q0 70 -14.5 110t-67.5 40q-39 0 -56.5 -29t-17.5 -76v-108q0 -10 -6 -18.5t-16 -10.5l-195 -47q-10 -4 -16 2t-6 16zM201 117q0 53 39 92t92 39t92 -39t39 -92t-39 -92t-92 -39t-92 39t-39 92 z" />
+<glyph unicode="@" horiz-adv-x="1097" d="M41 717q0 133 40 243.5t112 194.5t167 131t205 47q63 0 118.5 -13t102.5 -36t83 -55.5t67 -71.5q59 -78 90 -170t31 -180q0 -117 -45 -219q-23 -47 -55.5 -87t-75.5 -67q-59 -35 -133 -35q-57 0 -95 23q-41 25 -59 70q-10 -10 -19.5 -20.5t-19.5 -18.5q-51 -39 -111 -39 q-63 0 -96 32.5t-49 73.5q-18 47 -20 107q0 49 9 100t31 98q45 98 125 154q55 39 119 39q53 0 90 -31l11 -10l4 10q8 20 24 21h127q10 0 21 -11q8 -10 4 -24l-99 -340q-2 -8 -7 -24.5t-6 -35t2 -33t20 -16.5q10 -2 26.5 1t44.5 26q25 14 45 51q20 35 32.5 88t12.5 119 q0 92 -26.5 162.5t-73.5 122.5q-47 51 -109.5 75.5t-140.5 28.5q-61 2 -139 -28.5t-133 -108.5q-47 -68 -78 -156t-31 -192q0 -109 24.5 -196t76.5 -148q51 -61 123.5 -95t156.5 -34q82 0 146.5 27.5t109.5 72.5q8 8 21 8q12 0 18 -8l49 -59q6 -8 4 -21.5t-10 -21.5 q-63 -63 -145 -94t-187 -35q-92 -4 -163.5 21.5t-122.5 59.5q-59 39 -105 91q-139 157 -139 436zM453 635q0 -29 8 -49q2 -12 10 -19q14 -14 43 2q10 4 23 21q25 31 38 84l41 153q0 18 -4 35q-6 10 -12 15q-2 2 -14 2q-23 0 -45 -21q-25 -23 -45 -61q-20 -39 -31.5 -83 t-11.5 -79z" />
+<glyph unicode="A" horiz-adv-x="729" d="M43 29l154 1376q4 29 32 29h271q29 0 32 -29l154 -1376q4 -29 -24 -29h-187q-27 0 -31 29l-16 221h-127l-16 -221q-4 -29 -31 -29h-186q-29 0 -25 29zM317 479h95l-39 555h-17z" />
+<glyph unicode="B" horiz-adv-x="747" d="M92 29v1376q0 29 29 29h307q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-205q0 -94 -57 -158q-31 -33 -74 -53q45 -16 74 -45t43 -68t14 -86v-303q0 -53 -20.5 -100t-55.5 -82t-82 -55.5t-100 -20.5h-307q-29 0 -29 29zM332 219h65q20 0 34.5 14.5t14.5 34.5v326 q0 20 -14 34.5t-35 14.5h-65v-424zM332 866h65q20 0 34.5 14.5t14.5 34.5v250q0 20 -14 34.5t-35 14.5h-65v-348z" />
+<glyph unicode="C" horiz-adv-x="727" d="M72 244v946q0 53 20.5 100t55 82t81.5 55.5t101 20.5h78q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-164q0 -29 -27 -37l-186 -28q-27 -8 -27 20v199q0 20 -14.5 34.5t-34.5 14.5h-17q-20 0 -34.5 -14.5t-14.5 -34.5v-926q0 -20 14.5 -34.5t34.5 -14.5h17 q20 0 34.5 14t14.5 35v287q0 29 27 20l186 -24q27 -8 27 -37v-256q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100.5 20.5t-82 55t-55 82t-20.5 100.5z" />
+<glyph unicode="D" horiz-adv-x="757" d="M92 29v1376q0 29 29 29h307q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-918q0 -53 -20.5 -100t-55.5 -82t-82 -55.5t-100 -20.5h-307q-29 0 -29 29zM332 219h65q20 0 34.5 14.5t14.5 34.5v897q0 20 -14 34.5t-35 14.5h-65v-995z" />
+<glyph unicode="E" horiz-adv-x="675" d="M92 29v1376q0 29 29 29h444q29 0 29 -29v-182q0 -29 -29 -29h-233v-295h203q29 0 28 -29v-182q0 -29 -28 -29h-203v-419h233q29 0 29 -29v-182q0 -29 -29 -29h-444q-29 0 -29 29z" />
+<glyph unicode="F" horiz-adv-x="655" d="M92 29v1376q0 29 29 29h444q29 0 29 -29v-182q0 -29 -29 -29h-233v-295h203q29 0 28 -29v-182q0 -29 -28 -29h-203v-630q0 -29 -29 -29h-182q-29 0 -29 29z" />
+<glyph unicode="G" d="M72 244v946q0 53 20.5 100t55 82t81.5 55.5t101 20.5h78q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-66q0 -29 -27 -37l-186 -67q-27 -8 -27 20v140q0 20 -14.5 34.5t-34.5 14.5h-17q-20 0 -34.5 -14.5t-14.5 -34.5v-926q0 -20 14.5 -34.5t34.5 -14.5h17q20 0 34.5 14 t14.5 35v364h-57v234h268q29 0 29 -29v-579q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100.5 20.5t-82 55t-55 82t-20.5 100.5z" />
+<glyph unicode="H" horiz-adv-x="798" d="M92 29v1376q0 29 29 29h182q29 0 29 -29v-551h135v551q0 29 29 29h182q29 0 29 -29v-1376q0 -29 -29 -29h-182q-29 0 -29 29v585h-135v-585q0 -29 -29 -29h-182q-29 0 -29 29z" />
+<glyph unicode="I" horiz-adv-x="423" d="M92 29v1376q0 29 29 29h182q29 0 29 -29v-1376q0 -29 -29 -29h-182q-29 0 -29 29z" />
+<glyph unicode="J" horiz-adv-x="727" d="M51 244v260q0 29 27 37l186 49q27 8 27 -21v-315q0 -20 14 -34.5t35 -14.5h16q20 0 35 14t15 35v1151q0 29 28 29h182q29 0 29 -29v-1161q0 -53 -20.5 -100.5t-55 -82t-82 -55t-100.5 -20.5h-78q-53 0 -100 20.5t-82 55t-55.5 82t-20.5 100.5z" />
+<glyph unicode="K" horiz-adv-x="825" d="M92 29v1376q0 29 29 29h182q29 0 29 -29v-440l188 444q10 25 39 25h205q12 0 16 -10q2 -5 2 -9.5t-2 -9.5l-274 -604l270 -772q4 -10 -2 -19.5t-18 -9.5h-203q-12 0 -22.5 7t-14.5 18l-149 462l-35 -86v-372q0 -29 -29 -29h-182q-29 0 -29 29z" />
+<glyph unicode="L" horiz-adv-x="675" d="M102 29v1376q0 29 29 29h182q29 0 29 -29v-1165h254q29 0 29 -29v-182q0 -29 -29 -29h-277h-4h-2h-182q-29 0 -29 29z" />
+<glyph unicode="M" horiz-adv-x="983" d="M92 29v1376q0 29 29 29h174q12 0 21.5 -9.5t13.5 -19.5l162 -733l161 733q4 10 13.5 19.5t21.5 9.5h174q29 0 29 -29v-1376q0 -29 -29 -29h-196q-29 0 -29 29v647l-135 -529q-4 -10 -10.5 -10t-10.5 10l-135 529v-647q0 -29 -29 -29h-196q-29 0 -29 29z" />
+<glyph unicode="N" horiz-adv-x="839" d="M92 29v1376q0 29 29 29h135q12 0 23.5 -8.5t15.5 -18.5l213 -657v655q0 29 29 29h182q29 0 29 -29v-1376q0 -29 -29 -29h-131q-12 0 -23.5 8t-15.5 19l-217 678v-676q0 -29 -29 -29h-182q-29 0 -29 29z" />
+<glyph unicode="O" d="M72 244v946q0 53 20.5 100t55 82t81.5 55.5t101 20.5h78q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-946q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100.5 20.5t-82 55t-55 82t-20.5 100.5zM311 254q0 -20 14.5 -34.5t34.5 -14.5h17q20 0 34.5 14 t14.5 35v926q0 20 -14.5 34.5t-34.5 14.5h-17q-20 0 -34.5 -14.5t-14.5 -34.5v-926z" />
+<glyph unicode="P" horiz-adv-x="727" d="M92 29v1376q0 29 29 29h307q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-334q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-96v-555q0 -29 -29 -29h-182q-29 0 -29 29zM332 803h65q20 0 34.5 14t14.5 35v313q0 20 -14 34.5t-35 14.5h-65v-411z" />
+<glyph unicode="Q" horiz-adv-x="745" d="M72 244v946q0 53 20.5 100t55 82t81.5 55.5t101 20.5h78q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-946q0 -57 -22.5 -107.5t-63.5 -85.5l88 -133q4 -7 4 -14q0 -4 -1 -7q-3 -11 -14 -16l-141 -63q-10 -4 -18 -4q-16 0 -27 16l-104 156h-37q-53 0 -100.5 20.5t-82 55 t-55 82t-20.5 100.5zM311 254q0 -20 14.5 -34.5t34.5 -14.5h17q20 0 34.5 14t14.5 35v926q0 20 -14.5 34.5t-34.5 14.5h-17q-20 0 -34.5 -14.5t-14.5 -34.5v-926z" />
+<glyph unicode="R" horiz-adv-x="770" d="M92 29v1376q0 29 29 29h307q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-334q0 -76 -39 -136.5t-102 -93.5l182 -583q1 -5 1 -10q0 -19 -21 -19h-187q-12 0 -23.5 8t-15.5 21l-149 501v-530l-2 20q-4 -20 -27 -20h-182q-29 0 -29 29zM332 803h65q20 0 34.5 14t14.5 35 v313q0 20 -14 34.5t-35 14.5h-65v-411z" />
+<glyph unicode="S" horiz-adv-x="716" d="M61 244v196q0 29 27 37l186 49q27 8 27 -20v-252q0 -20 14.5 -34.5t34.5 -14.5h17q20 0 34.5 14t14.5 35v270q-2 27 -8.5 47.5t-24.5 36.5l-264 203q-31 29 -44.5 57.5t-13.5 75.5v246q0 53 20.5 100t55.5 82t82 55.5t100 20.5h78q53 0 100.5 -20.5t82 -55.5t55 -82 t20.5 -100v-78q0 -29 -26 -37l-187 -49q-27 -8 -26 21v133q0 20 -14.5 34.5t-34.5 14.5h-17q-20 0 -34.5 -14.5t-14.5 -34.5v-187q2 -23 8 -39t23 -32l268 -201q33 -29 42 -58.5t13 -66.5v-352q0 -53 -20.5 -100.5t-55 -82t-81.5 -55t-101 -20.5h-78q-53 0 -100 20.5t-82 55 t-55.5 82t-20.5 100.5z" />
+<glyph unicode="T" horiz-adv-x="688" d="M51 1223v182q0 29 29 29h528q29 0 29 -29v-182q0 -29 -29 -29h-145v-1165q0 -29 -29 -29h-182q-10 0 -19.5 8t-9.5 21v1165h-143q-29 0 -29 29z" />
+<glyph unicode="U" d="M72 244v1161q0 29 28 29h183q29 0 28 -29v-1151q0 -20 14.5 -34.5t34.5 -14.5h17q20 0 34.5 14t14.5 35v1151q0 29 29 29h182q29 0 29 -29v-1161q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100.5 20.5t-82 55t-55 82t-20.5 100.5z" />
+<glyph unicode="V" horiz-adv-x="774" d="M23 1405q-4 29 24 29h221q27 0 31 -29l84 -868h8l84 868q4 29 31 29h221q29 0 25 -29l-242 -1376q-4 -29 -33 -29h-180q-29 0 -33 29z" />
+<glyph unicode="W" horiz-adv-x="1165" d="M23 1405q-4 29 24 29h221q27 0 31 -29l92 -836h8l70 836q4 29 31 29h166q27 0 30 -29l70 -836h8l92 836q4 29 31 29h221q29 0 25 -29l-242 -1376q-4 -29 -33 -29h-180q-29 0 -33 29l-71 510h-2l-72 -510q-4 -29 -33 -29h-180q-29 0 -33 29z" />
+<glyph unicode="X" horiz-adv-x="774" d="M63 29l168 690l-168 686q-1 4 -1 7q0 6 5 12q7 9 19 10h190q29 0 33 -29l78 -406l78 406q4 29 33 29h190q12 0 20 -10q5 -6 4 -12q0 -4 -1 -7l-168 -686l168 -690q1 -5 1 -10q0 -19 -24 -19h-190q-29 0 -33 29l-78 405l-78 -405q-4 -29 -33 -29h-190q-12 0 -19 8 q-5 5 -5 12q0 5 1 9z" />
+<glyph unicode="Y" horiz-adv-x="757" d="M23 1405q-2 4 -2 8q0 6 4 11q6 9 18 10h217q29 0 33 -29l82 -516h8l82 516q4 29 33 29h217q12 0 18 -10q4 -6 4 -11q0 -4 -2 -8l-235 -848v-528q0 -29 -29 -29h-184q-29 0 -29 29v528z" />
+<glyph unicode="Z" horiz-adv-x="722" d="M61 1233v172q0 29 29 29h539q12 0 19 -9.5t3 -19.5l-284 -1176h266q29 0 29 -28v-172q0 -29 -29 -29h-543q-12 0 -19.5 8t-2.5 21l284 1175h-262q-29 0 -29 29z" />
+<glyph unicode="[" horiz-adv-x="471" d="M20 -209v1851q0 29 29 29h373q29 0 29 -29v-139q0 -29 -29 -28h-197v-1516h197q29 0 29 -29v-139q0 -29 -29 -29h-373q-29 0 -29 29z" />
+<glyph unicode="\" horiz-adv-x="598" d="M2 1405q-4 10 2 19.5t19 9.5h110q29 0 37 -27l426 -1380q8 -27 -21 -27h-110q-29 0 -37 27z" />
+<glyph unicode="]" horiz-adv-x="471" d="M20 -70q0 29 29 29h197v1516h-197q-29 0 -29 28v139q0 29 29 29h373q29 0 29 -29v-1851q0 -29 -29 -29h-373q-29 0 -29 29v139z" />
+<glyph unicode="^" horiz-adv-x="569" d="M4 1104q-6 18 4 33l254 286q6 10 21 11h4q10 0 20 -11l254 -286q10 -14 4 -33q-4 -12 -24 -12h-129q-16 0 -23 10l-104 143l-105 -143q-10 -10 -22 -10h-129q-21 0 -25 12z" />
+<glyph unicode="_" horiz-adv-x="856" d="M41 -29q0 29 29 29h716q29 0 29 -29v-127q0 -29 -29 -28h-716q-29 0 -29 28v127z" />
+<glyph unicode="a" horiz-adv-x="729" d="M43 29l154 1171q4 29 32 29h271q29 0 32 -29l154 -1171q4 -29 -24 -29h-187q-27 0 -31 29l-16 200h-127l-16 -200q-4 -29 -31 -29h-186q-29 0 -25 29zM317 459h95l-39 452h-17z" />
+<glyph unicode="b" horiz-adv-x="747" d="M92 29v1171q0 29 29 29h307q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-135q0 -94 -57 -158q-31 -33 -74 -53q45 -16 74 -45t43 -68t14 -86v-168q0 -53 -20.5 -100t-55.5 -82t-82 -55.5t-100 -20.5h-301q-12 0 -23.5 3t-11.5 26zM332 219h65q20 0 34.5 14.5t14.5 34.5 v191q0 20 -14 34.5t-35 14.5h-65v-289zM332 731h65q20 0 34.5 14.5t14.5 34.5v181q0 20 -14 34.5t-35 14.5h-65v-279z" />
+<glyph unicode="c" horiz-adv-x="727" d="M72 244v741q0 53 20.5 100.5t55 82t81.5 55t101 20.5h78q53 0 100 -20.5t82 -55t55.5 -82t20.5 -100.5v-123q0 -29 -27 -37l-186 -28q-27 -8 -27 20v158q0 20 -14.5 34.5t-34.5 14.5h-17q-20 0 -34.5 -14.5t-14.5 -34.5v-721q0 -20 14.5 -34.5t34.5 -14.5h17 q20 0 34.5 14t14.5 35v246q0 29 27 20l186 -24q27 -8 27 -37v-215q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100.5 20.5t-82 55t-55 82t-20.5 100.5z" />
+<glyph unicode="d" horiz-adv-x="757" d="M92 29v1171q0 29 29 29h307q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-713q0 -53 -20.5 -100t-55.5 -82t-82 -55.5t-100 -20.5h-307q-29 0 -29 29zM332 219h65q20 0 34.5 14.5t14.5 34.5v693q0 20 -14 34.5t-35 14.5h-65v-791z" />
+<glyph unicode="e" horiz-adv-x="675" d="M92 29v1171q0 29 29 29h444q29 0 29 -29v-182q0 -29 -29 -29h-233v-233h203q29 0 28 -29v-182q0 -29 -28 -29h-203v-276h233q29 0 29 -29v-182q0 -29 -29 -29h-444q-29 0 -29 29z" />
+<glyph unicode="f" horiz-adv-x="655" d="M92 29v1171q0 29 29 29h444q29 0 29 -29v-182q0 -29 -29 -29h-233v-233h203q29 0 28 -29v-182q0 -29 -28 -29h-203v-487q0 -29 -29 -29h-182q-29 0 -29 29z" />
+<glyph unicode="g" d="M72 244v741q0 53 20.5 100.5t55 82t81.5 55t101 20.5h78q53 0 100 -20.5t82 -55t55.5 -82t20.5 -100.5v-45q0 -29 -27 -37l-186 -67q-27 -8 -27 20v119q0 20 -14.5 34.5t-34.5 14.5h-17q-20 0 -34.5 -14.5t-14.5 -34.5v-721q0 -20 14.5 -34.5t34.5 -14.5h17q20 0 34.5 14 t14.5 35v221h-57v234h268q29 0 29 -29v-436q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100.5 20.5t-82 55t-55 82t-20.5 100.5z" />
+<glyph unicode="h" horiz-adv-x="798" d="M92 29v1171q0 29 29 29h182q29 0 29 -29v-469h135v469q0 29 29 29h182q29 0 29 -29v-1171q0 -29 -29 -29h-182q-29 0 -29 29v463h-135v-463q0 -29 -29 -29h-182q-29 0 -29 29z" />
+<glyph unicode="i" horiz-adv-x="423" d="M92 29v1171q0 29 29 29h182q29 0 29 -29v-1171q0 -29 -29 -29h-182q-29 0 -29 29z" />
+<glyph unicode="j" horiz-adv-x="727" d="M51 244v219q0 29 27 37l186 49q27 8 27 -21v-274q0 -20 14 -34.5t35 -14.5h16q20 0 35 14t15 35v946q0 29 28 29h182q29 0 29 -29v-956q0 -53 -20.5 -100.5t-55 -82t-82 -55t-100.5 -20.5h-78q-53 0 -100 20.5t-82 55t-55.5 82t-20.5 100.5z" />
+<glyph unicode="k" horiz-adv-x="825" d="M92 29v1171q0 29 29 29h182q29 0 29 -29v-358l188 362q10 25 39 25h205q12 0 16 -9q2 -5 2 -10t-2 -10l-278 -522l274 -649q4 -10 -2 -19.5t-18 -9.5h-203q-12 0 -22.5 7t-14.5 18l-149 340l-35 -66v-270q0 -29 -29 -29h-182q-29 0 -29 29z" />
+<glyph unicode="l" horiz-adv-x="675" d="M102 29v1171q0 29 29 29h182q29 0 29 -29v-960h254q29 0 29 -29v-182q0 -29 -29 -29h-277h-4h-2h-182q-29 0 -29 29z" />
+<glyph unicode="m" horiz-adv-x="983" d="M92 29v1171q0 29 29 29h174q12 0 21.5 -9.5t13.5 -19.5l162 -631l161 631q4 10 13.5 19.5t21.5 9.5h174q29 0 29 -29v-1171q0 -29 -29 -29h-196q-29 0 -29 29v544l-135 -487q-4 -10 -10.5 -10t-10.5 10l-135 487v-544q0 -29 -29 -29h-196q-29 0 -29 29z" />
+<glyph unicode="n" horiz-adv-x="839" d="M92 29v1171q0 29 29 29h135q12 0 23.5 -8.5t15.5 -18.5l213 -596v594q0 29 29 29h182q29 0 29 -29v-1171q0 -29 -29 -29h-131q-12 0 -23.5 8t-15.5 19l-217 534v-532q0 -29 -29 -29h-182q-29 0 -29 29z" />
+<glyph unicode="o" d="M72 244v741q0 53 20.5 100.5t55 82t81.5 55t101 20.5h78q53 0 100 -20.5t82 -55t55.5 -82t20.5 -100.5v-741q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100.5 20.5t-82 55t-55 82t-20.5 100.5zM311 254q0 -20 14.5 -34.5t34.5 -14.5h17q20 0 34.5 14 t14.5 35v721q0 20 -14.5 34.5t-34.5 14.5h-17q-20 0 -34.5 -14.5t-14.5 -34.5v-721z" />
+<glyph unicode="p" horiz-adv-x="727" d="M92 29v1171q0 29 29 29h307q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-273q0 -53 -20.5 -100t-55.5 -82t-82 -55.5t-100 -20.5h-96v-411q0 -29 -29 -29h-182q-29 0 -29 29zM332 659h65q20 0 34.5 14.5t14.5 35.5v252q0 20 -14 34.5t-35 14.5h-65v-351z" />
+<glyph unicode="q" horiz-adv-x="745" d="M72 244v741q0 53 20.5 100.5t55 82t81.5 55t101 20.5h78q53 0 100 -20.5t82 -55t55.5 -82t20.5 -100.5v-741q0 -57 -22.5 -107.5t-63.5 -85.5l88 -133q4 -7 4 -14q0 -4 -1 -7q-3 -11 -14 -16l-141 -63q-10 -4 -18 -4q-16 0 -27 16l-104 156h-37q-53 0 -100.5 20.5t-82 55 t-55 82t-20.5 100.5zM311 254q0 -20 14.5 -34.5t34.5 -14.5h17q20 0 34.5 14t14.5 35v721q0 20 -14.5 34.5t-34.5 14.5h-17q-20 0 -34.5 -14.5t-14.5 -34.5v-721z" />
+<glyph unicode="r" horiz-adv-x="770" d="M92 29v1171q0 29 29 29h307q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-252q0 -76 -45 -136.5t-109 -93.5l195 -460q1 -5 1 -10q0 -19 -21 -19h-187q-12 0 -23.5 8t-15.5 21l-149 379v-379q0 -29 -31 -29h-182q-27 0 -27 29zM332 680h65q20 0 34.5 14.5t14.5 34.5v232 q0 20 -14 34.5t-35 14.5h-65v-330z" />
+<glyph unicode="s" horiz-adv-x="716" d="M61 244v114q0 29 27 37l186 49q27 8 27 -20v-170q0 -20 14.5 -34.5t34.5 -14.5h17q20 0 34.5 14t14.5 35v127q-2 27 -8.5 47.5t-24.5 36.5l-264 203q-31 29 -44.5 57.5t-13.5 75.5v184q0 53 20.5 100.5t55.5 82t82 55t100 20.5h78q53 0 100.5 -20.5t82 -55t55 -82 t20.5 -100.5v-78q0 -29 -26 -37l-187 -49q-27 -8 -26 21v133q0 20 -14.5 34.5t-34.5 14.5h-17q-20 0 -34.5 -14.5t-14.5 -34.5v-125q2 -23 8 -39t23 -33l268 -200q33 -29 42 -59t13 -66v-209q0 -53 -20.5 -100.5t-55 -82t-81.5 -55t-101 -20.5h-78q-53 0 -100 20.5t-82 55 t-55.5 82t-20.5 100.5z" />
+<glyph unicode="t" horiz-adv-x="688" d="M51 1018v182q0 29 29 29h528q29 0 29 -29v-182q0 -29 -29 -29h-145v-960q0 -29 -29 -29h-182q-10 0 -19.5 8t-9.5 21v960h-143q-29 0 -29 29z" />
+<glyph unicode="u" d="M72 244v956q0 29 28 29h183q29 0 28 -29v-946q0 -20 14.5 -34.5t34.5 -14.5h17q20 0 34.5 14t14.5 35v946q0 29 29 29h182q29 0 29 -29v-956q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100.5 20.5t-82 55t-55 82t-20.5 100.5z" />
+<glyph unicode="v" horiz-adv-x="774" d="M23 1200q-4 29 24 29h221q27 0 31 -29l84 -766h8l84 766q4 29 31 29h221q29 0 25 -29l-242 -1171q-4 -29 -33 -29h-180q-29 0 -33 29z" />
+<glyph unicode="w" horiz-adv-x="1124" d="M23 1200q-4 29 24 29h221q27 0 31 -29l72 -692h8l78 692q4 29 30 29h150q27 0 31 -29l77 -692h9l71 692q4 29 31 29h221q29 0 25 -29l-221 -1171q-4 -29 -33 -29h-180q-29 0 -33 29l-72 428h-2l-72 -428q-4 -29 -32 -29h-181q-29 0 -32 29z" />
+<glyph unicode="x" horiz-adv-x="774" d="M63 29l168 587l-168 584q-1 4 -1 7q0 6 5 13q7 9 19 9h190q29 0 33 -29l78 -303l78 303q4 29 33 29h190q12 0 20 -9q5 -6 4 -13q0 -4 -1 -7l-168 -584l168 -587q1 -5 1 -10q0 -19 -24 -19h-190q-29 0 -33 29l-78 303l-78 -303q-4 -29 -33 -29h-190q-12 0 -19 8 q-5 5 -5 12q0 5 1 9z" />
+<glyph unicode="y" horiz-adv-x="757" d="M23 1200q-2 4 -2 8q0 6 4 12q6 9 18 9h217q29 0 33 -29l82 -393h8l82 393q4 29 33 29h217q12 0 18 -9q4 -6 4 -12q0 -4 -2 -8l-235 -725v-446q0 -29 -29 -29h-184q-29 0 -29 29v446z" />
+<glyph unicode="z" horiz-adv-x="722" d="M61 1028v172q0 29 29 29h539q12 0 19 -9.5t3 -19.5l-284 -971h266q29 0 29 -28v-172q0 -29 -29 -29h-543q-12 0 -19.5 8t-2.5 21l284 970h-262q-29 0 -29 29z" />
+<glyph unicode="{" horiz-adv-x="606" d="M82 666v102q0 14 8 23q8 8 23 8h59q25 -2 45 4q16 4 31.5 18.5t19.5 42.5q2 16 -6 40t-20.5 48.5t-25.5 47t-19 36.5q-29 55 -51.5 123t-26.5 146q-4 72 21.5 123t58.5 85q37 37 86 64q27 12 61 20q29 6 67 10.5t81 -5.5q6 -2 14 -9q16 -12 16 -32v-117q0 -12 -8 -21 q-8 -8 -22 -8h-68q-31 0 -53 -10q-20 -10 -35.5 -30.5t-11.5 -61.5q2 -35 14 -74t29 -80q16 -41 34.5 -80t32.5 -75q27 -68 29 -125q2 -49 -20.5 -96.5t-94.5 -65.5q72 -20 94.5 -66.5t20.5 -95.5q-2 -57 -29 -125q-14 -39 -32.5 -77t-34.5 -79t-28.5 -79.5t-14.5 -73.5 q-4 -41 11 -61.5t36 -30.5q23 -10 53 -11h68q14 0 22 -8t8 -20v-117q0 -14 -5 -21.5t-11 -11.5q-8 -6 -14 -8q-43 -10 -81 -8t-67 10q-35 8 -61 23q-49 25 -86 63q-33 33 -58.5 85t-21.5 124q4 78 26.5 145.5t51.5 122.5q6 14 19 36t25.5 46.5t20.5 49t6 40.5 q-4 29 -19.5 43.5t-31.5 18.5q-20 6 -45 4h-59q-14 0 -23 8q-8 9 -8 23z" />
+<glyph unicode="|" horiz-adv-x="327" d="M82 -166v1765q0 29 29 29h106q29 0 29 -29v-1765q0 -29 -29 -29h-106q-29 0 -29 29z" />
+<glyph unicode="}" horiz-adv-x="606" d="M82 -10q0 12 8 20t23 8h67q31 0 53 11q20 10 35 30.5t13 61.5q-2 35 -14.5 73.5t-28.5 79.5t-35 79t-33 77q-27 68 -29 125q-2 49 20.5 95t94.5 67q-72 18 -94.5 65t-20.5 97q2 57 29 125q14 37 32.5 75.5t35.5 79.5q16 41 28.5 80t14.5 74q2 41 -12.5 61.5t-35.5 30.5 q-23 10 -53 10h-67q-14 0 -23 8q-8 8 -8 21v117q0 23 14 32q8 6 17 9q41 10 79.5 6t67.5 -11q35 -8 62 -20q49 -27 86 -64q33 -35 58.5 -86t20.5 -122q-4 -78 -26.5 -145.5t-50.5 -123.5q-6 -14 -19.5 -36.5t-26 -47t-20.5 -48t-6 -40.5q4 -29 19.5 -43t31.5 -18 q20 -6 45 -4h60q14 0 22 -8t8 -23v-102q0 -14 -8 -23q-8 -8 -22 -8h-60q-25 2 -45 -4q-16 -4 -31.5 -18.5t-19.5 -43.5q-2 -16 6 -40.5t20.5 -49t25.5 -46t20 -36.5q29 -55 51 -122.5t26 -145.5q4 -72 -21.5 -124t-57.5 -85q-37 -39 -86 -63q-27 -14 -62 -23 q-29 -8 -67.5 -10t-79.5 8q-8 2 -17 8q-14 10 -14 33v117z" />
+<glyph unicode="&#xa2;" d="M72 457v528q0 96 60.5 167t152.5 87v166q0 29 28 29h111q29 0 29 -29v-166q92 -16 152.5 -87t60.5 -167v-59q0 -29 -27 -37l-186 -29q-27 -8 -27 21v94q0 20 -14.5 34.5t-34.5 14.5h-17q-20 0 -34.5 -14.5t-14.5 -34.5v-508q0 -20 14.5 -34.5t34.5 -14.5h17q20 0 34.5 14 t14.5 35v186q0 29 27 21l186 -25q27 -8 27 -37v-155q0 -96 -60.5 -167t-152.5 -87v-174q0 -29 -29 -29h-111q-29 0 -28 29v174q-92 16 -152.5 87t-60.5 167z" />
+<glyph unicode="&#xa9;" horiz-adv-x="532" d="M41 1223q0 47 17.5 88t48 71.5t71.5 48t88 17.5t88 -17.5t72 -48t48.5 -71.5t17.5 -88t-17.5 -88t-48.5 -72t-72 -48.5t-88 -17.5t-88 17.5t-71.5 48.5t-48 72t-17.5 88zM82 1223q0 -78 53 -131.5t131 -53.5t131.5 53.5t53.5 131.5t-53.5 131t-131.5 53t-131 -53 t-53 -131zM190 1135v178q0 29 18.5 47t47.5 18h20q29 0 47.5 -18.5t18.5 -46.5v-43q0 -8 -6 -8l-49 -9q-6 -4 -6 7v51q0 12 -13 12h-4q-12 0 -12 -12v-174q0 -12 12 -13h4q12 0 13 13v57q0 6 6 6l49 -8q6 -4 6 -8v-49q0 -29 -18.5 -47.5t-47.5 -18.5h-20q-29 0 -47.5 18.5 t-18.5 47.5z" />
+<glyph unicode="&#xaa;" horiz-adv-x="729" d="M43 29l154 1171q4 29 32 29h271q29 0 32 -29l154 -1171q4 -29 -24 -29h-187q-27 0 -31 29l-16 200h-127l-16 -200q-4 -29 -31 -29h-186q-29 0 -25 29zM317 459h95l-39 452h-17z" />
+<glyph unicode="&#xad;" horiz-adv-x="610" d="M61 672v155q0 29 29 29h430q29 0 29 -29v-155q0 -29 -29 -29h-430q-29 0 -29 29z" />
+<glyph unicode="&#xae;" horiz-adv-x="532" d="M41 1223q0 47 17.5 88t48 71.5t71.5 48t88 17.5t88 -17.5t72 -48t48.5 -71.5t17.5 -88t-17.5 -88t-48.5 -72t-72 -48.5t-88 -17.5t-88 17.5t-71.5 48.5t-48 72t-17.5 88zM82 1223q0 -78 53 -131.5t131 -53.5t131.5 53.5t53.5 131.5t-53.5 131t-131.5 53t-131 -53 t-53 -131zM203 1087v275q0 8 6 8h67q27 0 43.5 -19.5t16.5 -45.5v-37q0 -18 -8.5 -33.5t-28.5 -22.5l47 -125q2 -6 -4 -6h-47q-6 0 -8 6l-33 105v-107q0 -4 -6 -4h-39q-6 0 -6 6zM254 1253h16q12 0 13 13v37q0 12 -13 12h-16v-62z" />
+<glyph unicode="&#xb0;" horiz-adv-x="344" d="M41 1331q0 53 39 92t92 39t92 -39t39 -92t-39 -92t-92 -39t-92 39t-39 92zM94 1331q0 -33 22.5 -55.5t55.5 -22.5t55.5 22.5t22.5 55.5t-22.5 55.5t-55.5 22.5t-55.5 -22.5t-22.5 -55.5z" />
+<glyph unicode="&#xb2;" horiz-adv-x="759" d="M82 979v211q0 53 20.5 100t55.5 82t82 55.5t100 20.5h78q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-123v-121q0 -63 -15.5 -122.5t-50.5 -112.5q-31 -49 -66.5 -100.5t-68.5 -100.5q-6 -10 -12 -19.5t-12 -19.5q-31 -49 -51.5 -92t-32.5 -76q-14 -37 -25 -72h317 q18 0 19 -18v-195q0 -18 -19 -18h-540q-14 0 -19 18q-6 39 -7 77t1 69q2 37 8 69q4 39 14.5 74t20.5 64q12 33 27 59q53 96 100 170t84 127q43 61 80 107q10 23 8 43t0 61v242q0 20 -14 34.5t-35 14.5h-16q-20 0 -34.5 -14.5t-14.5 -34.5v-136q0 -29 -27 -36l-186 -50 q-27 -8 -27 21z" />
+<glyph unicode="&#xb3;" horiz-adv-x="757" d="M82 244v223q0 29 27 37l186 49q27 8 27 -21v-278q0 -20 14 -34.5t35 -14.5h16q20 0 34.5 14t14.5 35v352q0 16 -2 32.5t-8 25.5q-4 4 -11 10t-26 6h-96q-10 0 -17.5 7t-7.5 18v151q0 10 7.5 17.5t17.5 7.5h96q14 0 23.5 7t13.5 11q10 10 10 43v238q0 20 -14 34.5 t-35 14.5h-16q-20 0 -34.5 -14.5t-14.5 -34.5v-136q0 -29 -27 -36l-186 -50q-27 -8 -27 21v211q0 53 20.5 100t55.5 82t82 55.5t100 20.5h78q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-232q0 -14 -1 -27t-3 -26q-10 -49 -39 -82q-27 -27 -60 -41q33 -12 60 -34 q18 -18 33 -54q10 -45 10 -88v-362q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100 20.5t-82 55t-55.5 82t-20.5 100.5z" />
+<glyph unicode="&#xb6;" horiz-adv-x="985" d="M82 842v334q0 53 20.5 100t55.5 82t82 55.5t100 20.5h534q29 0 29 -29v-1376q0 -29 -29 -29h-92q-29 0 -28 29v1185h-78v-1185q0 -29 -29 -29h-182q-29 0 -29 29v555h-96q-53 0 -100 20.5t-82 55t-55.5 82t-20.5 100.5zM322 852q0 -20 14 -34.5t35 -14.5h65v411h-65 q-20 0 -34.5 -14t-14.5 -35v-313z" />
+<glyph unicode="&#xb9;" horiz-adv-x="577" d="M82 1014v153q0 10 7 18.5t17 10.5q47 18 87 51q35 27 64.5 69t37.5 101q6 16 22 17h152q27 -4 27 -29v-1376q0 -29 -29 -29h-182q-29 0 -29 29v1028q-27 -20 -66.5 -41t-74.5 -27q-14 -4 -23 4q-10 7 -10 21z" />
+<glyph unicode="&#xba;" d="M72 244v741q0 53 20.5 100.5t55 82t81.5 55t101 20.5h78q53 0 100 -20.5t82 -55t55.5 -82t20.5 -100.5v-741q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100.5 20.5t-82 55t-55 82t-20.5 100.5zM311 254q0 -20 14.5 -34.5t34.5 -14.5h17q20 0 34.5 14 t14.5 35v721q0 20 -14.5 34.5t-34.5 14.5h-17q-20 0 -34.5 -14.5t-14.5 -34.5v-721z" />
+<glyph unicode="&#xbc;" horiz-adv-x="1974" d="M1217 315v174q0 10 2 15q0 4 2 6q80 156 132 302t83 266t44 206t18 123q0 6 4 12l9 9q5 5 15 6h246q29 0 29 -29v-893h65q6 0 19 -8q8 -8 8 -19v-170q0 -12 -8 -20q-12 -8 -19 -8h-65v-258q0 -29 -29 -29h-182q-29 0 -29 29v258h-317q-10 0 -19 8q-8 6 -8 20zM1409 512 h150v471q-12 -63 -33 -139q-16 -66 -46 -150t-71 -182zM580 27l426 1380q8 27 37 27h110q12 0 18.5 -9.5t2.5 -19.5l-426 -1378q-8 -27 -37 -27h-110q-29 0 -21 27zM82 1014v153q0 10 7 18.5t17 10.5q47 18 87 51q35 27 64.5 69t37.5 101q6 16 22 17h152q27 -4 27 -29v-1376 q0 -29 -29 -29h-182q-29 0 -29 29v1028q-27 -20 -66.5 -41t-74.5 -27q-14 -4 -23 4q-10 7 -10 21z" />
+<glyph unicode="&#xbd;" horiz-adv-x="1935" d="M1258 979v211q0 53 20.5 100t55.5 82t82 55.5t100 20.5h78q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-123v-121q0 -63 -15.5 -122.5t-50.5 -112.5q-31 -49 -66.5 -100.5t-68.5 -100.5q-6 -10 -12 -19.5t-12 -19.5q-31 -49 -51.5 -92t-32.5 -76q-14 -37 -25 -72h317 q18 0 19 -18v-195q0 -18 -19 -18h-540q-14 0 -19 18q-6 39 -7 77t1 69q2 37 8 69q4 39 14.5 74t20.5 64q12 33 27 59q53 96 100 170t84 127q43 61 80 107q10 23 8 43t0 61v242q0 20 -14 34.5t-35 14.5h-16q-20 0 -34.5 -14.5t-14.5 -34.5v-136q0 -29 -27 -36l-186 -50 q-27 -8 -27 21zM580 27l426 1380q8 27 37 27h110q12 0 18.5 -9.5t2.5 -19.5l-426 -1378q-8 -27 -37 -27h-110q-29 0 -21 27zM82 1014v153q0 10 7 18.5t17 10.5q47 18 87 51q35 27 64.5 69t37.5 101q6 16 22 17h152q27 -4 27 -29v-1376q0 -29 -29 -29h-182q-29 0 -29 29v1028 q-27 -20 -66.5 -41t-74.5 -27q-14 -4 -23 4q-10 7 -10 21z" />
+<glyph unicode="&#xbe;" horiz-adv-x="2154" d="M1397 315v174q0 10 2 15q0 4 2 6q80 156 132 302t83 266t44 206t18 123q0 6 4 12l9 9q5 5 15 6h246q29 0 29 -29v-893h65q6 0 19 -8q8 -8 8 -19v-170q0 -12 -8 -20q-12 -8 -19 -8h-65v-258q0 -29 -29 -29h-182q-29 0 -29 29v258h-317q-10 0 -19 8q-8 6 -8 20zM1589 512 h150v471q-12 -63 -33 -139q-16 -66 -46 -150t-71 -182zM760 27l426 1380q8 27 37 27h110q12 0 18.5 -9.5t2.5 -19.5l-426 -1378q-8 -27 -37 -27h-110q-29 0 -21 27zM82 244v223q0 29 27 37l186 49q27 8 27 -21v-278q0 -20 14 -34.5t35 -14.5h16q20 0 34.5 14t14.5 35v352 q0 16 -2 32.5t-8 25.5q-4 4 -11 10t-26 6h-96q-10 0 -17.5 7t-7.5 18v151q0 10 7.5 17.5t17.5 7.5h96q14 0 23.5 7t13.5 11q10 10 10 43v238q0 20 -14 34.5t-35 14.5h-16q-20 0 -34.5 -14.5t-14.5 -34.5v-136q0 -29 -27 -36l-186 -50q-27 -8 -27 21v211q0 53 20.5 100 t55.5 82t82 55.5t100 20.5h78q53 0 100 -20.5t82 -55.5t55.5 -82t20.5 -100v-232q0 -14 -1 -27t-3 -26q-10 -49 -39 -82q-27 -27 -60 -41q33 -12 60 -34q18 -18 33 -54q10 -45 10 -88v-362q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100 20.5t-82 55 t-55.5 82t-20.5 100.5z" />
+<glyph unicode="&#xbf;" horiz-adv-x="782" d="M74 371q-2 -63 9 -132t46 -125.5t99.5 -92t168.5 -35.5q150 0 232 89t82 257v155q0 23 -23 19l-194 -47q-23 -8 -23 -29v-108q0 -47 -17.5 -76t-56.5 -29q-53 0 -67.5 40t-14.5 110v42q0 17 5.5 34.5t14.5 37t27 47.5q31 47 65 88t59.5 81t42 81t14.5 88q-2 8 -3 39 t-5 66l-9 90q-4 23 -26 22h-86q-10 0 -17.5 -6t-7.5 -16l-2 -31q-4 -39 -10 -87t-19 -77q-20 -45 -56 -84t-73 -82q-55 -66 -85.5 -102.5t-46 -67t-18.5 -65.5t-5 -94zM319 1317q0 53 39 92t93 39q53 0 92 -39t39 -92t-39 -92t-92 -39t-92.5 39t-39.5 92z" />
+<glyph unicode="&#xc2;" horiz-adv-x="729" d="M84 1583q-6 18 4 33l254 286q6 10 21 11h4q10 0 20 -11l254 -286q10 -14 4 -33q-4 -12 -24 -12h-129q-16 0 -23 10l-104 143l-105 -143q-10 -10 -22 -10h-129q-21 0 -25 12zM43 29l154 1376q4 29 32 29h271q29 0 32 -29l154 -1376q4 -29 -24 -29h-187q-27 0 -31 29 l-16 221h-127l-16 -221q-4 -29 -31 -29h-186q-29 0 -25 29zM317 479h95l-39 555h-17z" />
+<glyph unicode="&#xc5;" horiz-adv-x="729" d="M234 1571q0 53 39 92t92 39t92 -39t39 -92t-39 -92t-92 -39t-92 39t-39 92zM287 1571q0 -33 22.5 -55.5t55.5 -22.5t55.5 22.5t22.5 55.5t-22.5 55.5t-55.5 22.5t-55.5 -22.5t-22.5 -55.5zM43 29l154 1376q4 29 32 29h271q29 0 32 -29l154 -1376q4 -29 -24 -29h-187 q-27 0 -31 29l-16 221h-127l-16 -221q-4 -29 -31 -29h-186q-29 0 -25 29zM317 479h95l-39 555h-17z" />
+<glyph unicode="&#xca;" horiz-adv-x="675" d="M61 1583q-6 18 4 33l254 286q6 10 21 11h4q10 0 20 -11l254 -286q10 -14 4 -33q-4 -12 -24 -12h-129q-16 0 -23 10l-104 143l-105 -143q-10 -10 -22 -10h-129q-21 0 -25 12zM92 29v1376q0 29 29 29h444q29 0 29 -29v-182q0 -29 -29 -29h-233v-295h203q29 0 28 -29v-182 q0 -29 -28 -29h-203v-419h233q29 0 29 -29v-182q0 -29 -29 -29h-444q-29 0 -29 29z" />
+<glyph unicode="&#xce;" horiz-adv-x="423" d="M-70 1583q-6 18 4 33l254 286q6 10 21 11h4q10 0 20 -11l254 -286q10 -14 4 -33q-4 -12 -24 -12h-129q-16 0 -23 10l-104 143l-105 -143q-10 -10 -22 -10h-129q-21 0 -25 12zM92 29v1376q0 29 29 29h182q29 0 29 -29v-1376q0 -29 -29 -29h-182q-29 0 -29 29z" />
+<glyph unicode="&#xd4;" d="M88 1583q-6 18 4 33l254 286q6 10 21 11h4q10 0 20 -11l254 -286q10 -14 4 -33q-4 -12 -24 -12h-129q-16 0 -23 10l-104 143l-105 -143q-10 -10 -22 -10h-129q-21 0 -25 12zM72 244v946q0 53 20.5 100t55 82t81.5 55.5t101 20.5h78q53 0 100 -20.5t82 -55.5t55.5 -82 t20.5 -100v-946q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100.5 20.5t-82 55t-55 82t-20.5 100.5zM311 254q0 -20 14.5 -34.5t34.5 -14.5h17q20 0 34.5 14t14.5 35v926q0 20 -14.5 34.5t-34.5 14.5h-17q-20 0 -34.5 -14.5t-14.5 -34.5v-926z" />
+<glyph unicode="&#xd7;" horiz-adv-x="727" d="M41 551q0 12 8 20l178 179l-178 178q-8 8 -8 20.5t8 20.5l111 110q8 8 20.5 8t20.5 -8l178 -178l178 178q8 8 20.5 8t20.5 -8l111 -110q8 -8 8 -20.5t-8 -20.5l-179 -178l179 -179q8 -8 8 -20t-8 -21l-111 -110q-8 -8 -20.5 -8t-20.5 8l-178 178l-178 -178 q-8 -8 -20.5 -8t-20.5 8l-111 110q-8 9 -8 21z" />
+<glyph unicode="&#xdb;" d="M88 1583q-6 18 4 33l254 286q6 10 21 11h4q10 0 20 -11l254 -286q10 -14 4 -33q-4 -12 -24 -12h-129q-16 0 -23 10l-104 143l-105 -143q-10 -10 -22 -10h-129q-21 0 -25 12zM72 244v1161q0 29 28 29h183q29 0 28 -29v-1151q0 -20 14.5 -34.5t34.5 -14.5h17q20 0 34.5 14 t14.5 35v1151q0 29 29 29h182q29 0 29 -29v-1161q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100.5 20.5t-82 55t-55 82t-20.5 100.5z" />
+<glyph unicode="&#xe2;" horiz-adv-x="729" d="M84 1378q-6 18 4 33l254 286q6 10 21 11h4q10 0 20 -11l254 -286q10 -14 4 -33q-4 -12 -24 -12h-129q-16 0 -23 10l-104 143l-105 -143q-10 -10 -22 -10h-129q-21 0 -25 12zM43 29l154 1171q4 29 32 29h271q29 0 32 -29l154 -1171q4 -29 -24 -29h-187q-27 0 -31 29 l-16 200h-127l-16 -200q-4 -29 -31 -29h-186q-29 0 -25 29zM317 459h95l-39 452h-17z" />
+<glyph unicode="&#xe5;" horiz-adv-x="729" d="M234 1497q0 53 39 92t92 39t92 -39t39 -92t-39 -92t-92 -39t-92 39t-39 92zM287 1497q0 -33 22.5 -55.5t55.5 -22.5t55.5 22.5t22.5 55.5t-22.5 55.5t-55.5 22.5t-55.5 -22.5t-22.5 -55.5zM43 29l154 1171q4 29 32 29h271q29 0 32 -29l154 -1171q4 -29 -24 -29h-187 q-27 0 -31 29l-16 200h-127l-16 -200q-4 -29 -31 -29h-186q-29 0 -25 29zM317 459h95l-39 452h-17z" />
+<glyph unicode="&#xea;" horiz-adv-x="675" d="M61 1378q-6 18 4 33l254 286q6 10 21 11h4q10 0 20 -11l254 -286q10 -14 4 -33q-4 -12 -24 -12h-129q-16 0 -23 10l-104 143l-105 -143q-10 -10 -22 -10h-129q-21 0 -25 12zM92 29v1171q0 29 29 29h444q29 0 29 -29v-182q0 -29 -29 -29h-233v-233h203q29 0 28 -29v-182 q0 -29 -28 -29h-203v-276h233q29 0 29 -29v-182q0 -29 -29 -29h-444q-29 0 -29 29z" />
+<glyph unicode="&#xee;" horiz-adv-x="423" d="M-70 1378q-6 18 4 33l254 286q6 10 21 11h4q10 0 20 -11l254 -286q10 -14 4 -33q-4 -12 -24 -12h-129q-16 0 -23 10l-104 143l-105 -143q-10 -10 -22 -10h-129q-21 0 -25 12zM92 29v1171q0 29 29 29h182q29 0 29 -29v-1171q0 -29 -29 -29h-182q-29 0 -29 29z" />
+<glyph unicode="&#xf4;" d="M88 1378q-6 18 4 33l254 286q6 10 21 11h4q10 0 20 -11l254 -286q10 -14 4 -33q-4 -12 -24 -12h-129q-16 0 -23 10l-104 143l-105 -143q-10 -10 -22 -10h-129q-21 0 -25 12zM72 244v741q0 53 20.5 100.5t55 82t81.5 55t101 20.5h78q53 0 100 -20.5t82 -55t55.5 -82 t20.5 -100.5v-741q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100.5 20.5t-82 55t-55 82t-20.5 100.5zM311 254q0 -20 14.5 -34.5t34.5 -14.5h17q20 0 34.5 14t14.5 35v721q0 20 -14.5 34.5t-34.5 14.5h-17q-20 0 -34.5 -14.5t-14.5 -34.5v-721z" />
+<glyph unicode="&#xf7;" horiz-adv-x="897" d="M61 672v155q0 29 29 29h717q29 0 29 -29v-155q0 -29 -29 -29h-717q-29 0 -29 29zM317 444q0 53 39 92t93 39q53 0 92 -38.5t39 -92.5q0 -53 -39 -92t-92 -39t-92.5 39t-39.5 92zM317 1055q0 53 39 92t93 39q53 0 92 -39t39 -92t-39 -92t-92 -39t-92.5 39t-39.5 92z" />
+<glyph unicode="&#xfb;" d="M88 1378q-6 18 4 33l254 286q6 10 21 11h4q10 0 20 -11l254 -286q10 -14 4 -33q-4 -12 -24 -12h-129q-16 0 -23 10l-104 143l-105 -143q-10 -10 -22 -10h-129q-21 0 -25 12zM72 244v956q0 29 28 29h183q29 0 28 -29v-946q0 -20 14.5 -34.5t34.5 -14.5h17q20 0 34.5 14 t14.5 35v946q0 29 29 29h182q29 0 29 -29v-956q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100.5 20.5t-82 55t-55 82t-20.5 100.5z" />
+<glyph unicode="&#x152;" horiz-adv-x="1413" d="M829 29v1376q0 29 29 29h444q29 0 29 -29v-182q0 -29 -29 -29h-233v-295h203q29 0 28 -29v-182q0 -29 -28 -29h-203v-419h233q29 0 29 -29v-182q0 -29 -29 -29h-444q-29 0 -29 29zM72 244v946q0 53 20.5 100t55 82t81.5 55.5t101 20.5h78q53 0 100 -20.5t82 -55.5 t55.5 -82t20.5 -100v-946q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100.5 20.5t-82 55t-55 82t-20.5 100.5zM311 254q0 -20 14.5 -34.5t34.5 -14.5h17q20 0 34.5 14t14.5 35v926q0 20 -14.5 34.5t-34.5 14.5h-17q-20 0 -34.5 -14.5t-14.5 -34.5v-926z " />
+<glyph unicode="&#x153;" horiz-adv-x="1413" d="M829 29v1171q0 29 29 29h444q29 0 29 -29v-182q0 -29 -29 -29h-233v-233h203q29 0 28 -29v-182q0 -29 -28 -29h-203v-276h233q29 0 29 -29v-182q0 -29 -29 -29h-444q-29 0 -29 29zM72 244v741q0 53 20.5 100.5t55 82t81.5 55t101 20.5h78q53 0 100 -20.5t82 -55t55.5 -82 t20.5 -100.5v-741q0 -53 -20.5 -100.5t-55.5 -82t-82 -55t-100 -20.5h-78q-53 0 -100.5 20.5t-82 55t-55 82t-20.5 100.5zM311 254q0 -20 14.5 -34.5t34.5 -14.5h17q20 0 34.5 14t14.5 35v721q0 20 -14.5 34.5t-34.5 14.5h-17q-20 0 -34.5 -14.5t-14.5 -34.5v-721z" />
+<glyph unicode="&#x2c6;" horiz-adv-x="569" d="M4 1104q-6 18 4 33l254 286q6 10 21 11h4q10 0 20 -11l254 -286q10 -14 4 -33q-4 -12 -24 -12h-129q-16 0 -23 10l-104 143l-105 -143q-10 -10 -22 -10h-129q-21 0 -25 12z" />
+<glyph unicode="&#x2000;" horiz-adv-x="956" />
+<glyph unicode="&#x2001;" horiz-adv-x="1912" />
+<glyph unicode="&#x2002;" horiz-adv-x="956" />
+<glyph unicode="&#x2003;" horiz-adv-x="1912" />
+<glyph unicode="&#x2004;" horiz-adv-x="636" />
+<glyph unicode="&#x2005;" horiz-adv-x="477" />
+<glyph unicode="&#x2006;" horiz-adv-x="317" />
+<glyph unicode="&#x2007;" horiz-adv-x="317" />
+<glyph unicode="&#x2008;" horiz-adv-x="237" />
+<glyph unicode="&#x2009;" horiz-adv-x="380" />
+<glyph unicode="&#x200a;" horiz-adv-x="104" />
+<glyph unicode="&#x2010;" horiz-adv-x="610" d="M61 672v155q0 29 29 29h430q29 0 29 -29v-155q0 -29 -29 -29h-430q-29 0 -29 29z" />
+<glyph unicode="&#x2011;" horiz-adv-x="610" d="M61 672v155q0 29 29 29h430q29 0 29 -29v-155q0 -29 -29 -29h-430q-29 0 -29 29z" />
+<glyph unicode="&#x2012;" horiz-adv-x="610" d="M61 672v155q0 29 29 29h430q29 0 29 -29v-155q0 -29 -29 -29h-430q-29 0 -29 29z" />
+<glyph unicode="&#x2013;" horiz-adv-x="720" d="M61 672v155q0 29 29 29h541q29 0 28 -29v-155q0 -29 -28 -29h-541q-29 0 -29 29z" />
+<glyph unicode="&#x2014;" horiz-adv-x="897" d="M61 672v155q0 29 29 29h717q29 0 29 -29v-155q0 -29 -29 -29h-717q-29 0 -29 29z" />
+<glyph unicode="&#x2018;" horiz-adv-x="280" d="M1 1198.5q-1 20.5 3 40.5q8 55 33.5 100t73.5 76q12 8 25.5 15.5t27.5 11.5q2 0 12 2l21 4q4 0 8 -2q8 -4 8 -14v-31q0 -4 -2 -6q-4 -6 -10 -6q-10 0 -23.5 -4.5t-28 -14.5t-25.5 -27.5t-15 -46.5q-2 -8 -1 -19t7 -15q4 -4 15 -1t17 3q33 0 55.5 -9.5t41.5 -25.5 q37 -35 37 -94q0 -45 -33 -80q-37 -39 -94 -39q-63 0 -101.5 41t-46.5 100q-4 21 -5 41.5z" />
+<glyph unicode="&#x2019;" horiz-adv-x="280" d="M0 1329q0 45 33 80q37 39 94 39q61 0 100 -41t47 -100q4 -20 5.5 -41t-3.5 -41q-8 -55 -33.5 -100.5t-72.5 -75.5q-12 -8 -25.5 -15.5t-27.5 -11.5q-2 0 -13 -2l-20 -4q-4 0 -8 2q-8 4 -8 14v31q0 2 2 6q6 6 10 6q18 0 50 17.5t42 74.5q2 8 1 19.5t-7 15.5q-4 4 -15.5 1 t-17.5 -3q-35 0 -56.5 9.5t-39.5 25.5q-37 33 -37 94z" />
+<glyph unicode="&#x201a;" horiz-adv-x="444" d="M82 129q0 45 33 80q37 39 92 39q61 0 101 -41t48 -101q4 -20 5 -40.5t-3 -40.5q-8 -55 -33.5 -100.5t-72.5 -76.5q-12 -8 -25.5 -15t-27.5 -11q-2 0 -13 -2l-20 -4q-4 0 -8 2q-8 4 -8 14v31q0 2 2 6q6 6 10 6q18 0 50 17.5t42 74.5q2 8 1 19.5t-7 15.5q-4 4 -15.5 1 t-17.5 -3q-35 0 -56.5 9t-39.5 26q-37 33 -37 94z" />
+<glyph unicode="&#x201c;" horiz-adv-x="624" d="M1 1198.5q-1 20.5 3 40.5q8 55 33.5 100t73.5 76q12 8 25.5 15.5t27.5 11.5q2 0 12 2l21 4q4 0 8 -2q8 -4 8 -14v-31q0 -4 -2 -6q-4 -6 -10 -6q-10 0 -23.5 -4.5t-28 -14.5t-25.5 -27.5t-15 -46.5q-2 -8 -1 -19t7 -15q4 -4 15 -1t17 3q33 0 55.5 -9.5t41.5 -25.5 q37 -35 37 -94q0 -45 -33 -80q-37 -39 -94 -39q-63 0 -101.5 41t-46.5 100q-4 21 -5 41.5zM345 1198.5q-1 20.5 3 40.5q8 55 34 100t73 76q12 8 25.5 15.5t27.5 11.5q2 0 12 2l21 4q4 0 8 -2q8 -4 8 -14v-31q0 -4 -2 -6q-4 -6 -10 -6q-10 0 -23.5 -4.5t-28 -14.5 t-25.5 -27.5t-15 -46.5q-2 -8 -1 -19t7 -15q4 -4 15 -1t18 3q33 0 55 -9.5t41 -25.5q37 -35 37 -94q0 -45 -33 -80q-37 -39 -94 -39q-63 0 -101.5 41t-46.5 100q-4 21 -5 41.5z" />
+<glyph unicode="&#x201d;" horiz-adv-x="624" d="M0 1329q0 45 33 80q37 39 94 39q61 0 100 -41t47 -100q4 -20 5.5 -41t-3.5 -41q-8 -55 -33.5 -100.5t-72.5 -75.5q-12 -8 -25.5 -15.5t-27.5 -11.5q-2 0 -13 -2l-20 -4q-4 0 -8 2q-8 4 -8 14v31q0 2 2 6q6 6 10 6q18 0 50 17.5t42 74.5q2 8 1 19.5t-7 15.5q-4 4 -15.5 1 t-17.5 -3q-35 0 -56.5 9.5t-39.5 25.5q-37 33 -37 94zM344 1329q0 45 33 80q37 39 94 39q61 0 100 -41t47 -100q4 -20 5.5 -41t-2.5 -41q-8 -55 -34 -100.5t-73 -75.5q-12 -8 -25.5 -15.5t-27.5 -11.5q-2 0 -12 -2l-21 -4q-4 0 -8 2q-8 4 -8 14v31q0 2 2 6q6 6 10 6 q18 0 50 17.5t42 74.5q2 8 1 19.5t-7 15.5q-4 4 -15.5 1t-17.5 -3q-35 0 -56.5 9.5t-39.5 25.5q-37 33 -37 94z" />
+<glyph unicode="&#x201e;" horiz-adv-x="706" d="M41 129q0 45 33 80q37 39 92 39q61 0 101 -41t48 -101q4 -20 5.5 -40.5t-3.5 -40.5q-8 -55 -33.5 -100.5t-72.5 -76.5q-12 -8 -25.5 -15t-27.5 -11q-2 0 -13 -2l-20 -4q-4 0 -8 2q-8 4 -8 14v31q0 2 2 6q6 6 10 6q18 0 50 17.5t42 74.5q2 8 1 19.5t-7 15.5q-4 4 -15.5 1 t-17.5 -3q-35 0 -56.5 9t-39.5 26q-37 33 -37 94zM385 129q0 45 33 80q37 39 92 39q61 0 101 -41t48 -101q4 -20 5.5 -40.5t-2.5 -40.5q-8 -55 -34 -100.5t-73 -76.5q-12 -8 -25.5 -15t-27.5 -11q-2 0 -13 -2l-20 -4q-4 0 -8 2q-8 4 -8 14v31q0 2 2 6q6 6 10 6q18 0 50 17.5 t42 74.5q2 8 1 19.5t-7 15.5q-4 4 -15.5 1t-17.5 -3q-35 0 -56.5 9t-39.5 26q-37 33 -37 94z" />
+<glyph unicode="&#x2022;" horiz-adv-x="507" d="M82 717q0 72 50 122t122 50t122 -50.5t50 -121.5q0 -72 -50 -122t-122 -50t-122 50t-50 122z" />
+<glyph unicode="&#x2026;" horiz-adv-x="1024" d="M41 117q0 53 39 92t92 39t92 -39t39 -92t-39 -92t-92 -39t-92 39t-39 92zM381 117q0 53 39 92t92 39t92 -39t39 -92t-39 -92t-92 -39t-92 39t-39 92zM721 117q0 53 39 92t92 39t92 -39t39 -92t-39 -92t-92 -39t-92 39t-39 92z" />
+<glyph unicode="&#x202f;" horiz-adv-x="380" />
+<glyph unicode="&#x2039;" horiz-adv-x="655" d="M41 690v53q0 10 6 15l524 440q10 8 16.5 4t6.5 -16v-201q0 -29 -23 -47l-92 -78l-166 -137q-2 -2 -2 -6t2 -6l166 -138l92 -77q23 -18 23 -47v-201q0 -12 -6 -16.5t-17 4.5l-524 440q-4 2 -5 6t-1 8z" />
+<glyph unicode="&#x203a;" horiz-adv-x="655" d="M61 248v201q0 29 23 47l258 215q2 2 2 6t-2 6l-258 215q-23 18 -23 47v201q0 12 6.5 16t16.5 -4l524 -440q6 -4 6 -15v-53q0 -4 -1 -8t-5 -6l-524 -440q-10 -8 -16.5 -4t-6.5 16z" />
+<glyph unicode="&#x2044;" horiz-adv-x="598" d="M2 27l426 1380q8 27 37 27h110q12 0 18.5 -9.5t2.5 -19.5l-426 -1378q-8 -27 -37 -27h-110q-29 0 -21 27z" />
+<glyph unicode="&#x205f;" horiz-adv-x="477" />
+<glyph unicode="&#x20ac;" horiz-adv-x="825" d="M82 610v99q0 16 16 16h52v66h-52q-16 0 -16 16v98q0 16 16 17h52v268q0 53 20 100t55 82t82 55.5t101 20.5h77q53 0 100.5 -20.5t82 -55.5t55 -82t20.5 -100v-82q0 -29 -26 -37l-187 -29q-27 -8 -26 21v117q0 20 -14.5 34.5t-34.5 14.5h-17q-20 0 -34.5 -14.5 t-14.5 -34.5v-258h193q16 0 16 -17v-98q0 -16 -16 -16h-193v-66h193q16 0 16 -16v-99q0 -16 -16 -16h-193v-340q0 -20 14.5 -34.5t34.5 -14.5h17q20 0 34.5 14t14.5 35v205q0 29 26 20l187 -24q27 -8 26 -37v-174q0 -53 -20.5 -100.5t-55 -82t-81.5 -55t-101 -20.5h-77 q-53 0 -100.5 20.5t-82.5 55t-55 81.5t-20 101v350h-52q-16 0 -16 16z" />
+<glyph unicode="&#x2122;" horiz-adv-x="550" d="M41 1366v59q0 8 8 9h170q8 0 8 -9v-59q0 -8 -8 -8h-47v-314q0 -8 -8 -8h-60q-8 0 -8 8v314h-47q-8 0 -8 8zM256 1044v381q0 8 8 9h58q6 0 10 -9l51 -204l51 204q0 8 10 9h58q8 0 8 -9v-381q0 -8 -10 -8h-62q-10 0 -10 8v177l-43 -168q-4 -6 -6 0l-43 168v-177q0 -8 -8 -8 h-64q-8 0 -8 8z" />
+<glyph unicode="&#xe000;" horiz-adv-x="1230" d="M0 1230h1230v-1230h-1230v1230z" />
+<glyph unicode="&#xfb01;" horiz-adv-x="1079" d="M747 29v1171q0 29 29 29h182q29 0 29 -29v-1171q0 -29 -29 -29h-182q-29 0 -29 29zM92 29v1171q0 29 29 29h444q29 0 29 -29v-182q0 -29 -29 -29h-233v-233h203q29 0 28 -29v-182q0 -29 -28 -29h-203v-487q0 -29 -29 -29h-182q-29 0 -29 29z" />
+<glyph unicode="&#xfb02;" horiz-adv-x="1331" d="M757 29v1171q0 29 29 29h182q29 0 29 -29v-960h254q29 0 29 -29v-182q0 -29 -29 -29h-277h-4h-2h-182q-29 0 -29 29zM92 29v1171q0 29 29 29h444q29 0 29 -29v-182q0 -29 -29 -29h-233v-233h203q29 0 28 -29v-182q0 -29 -28 -29h-203v-487q0 -29 -29 -29h-182 q-29 0 -29 29z" />
+<glyph unicode="&#xfb03;" horiz-adv-x="1734" d="M1403 29v1171q0 29 29 29h182q29 0 29 -29v-1171q0 -29 -29 -29h-182q-29 0 -29 29zM747 29v1171q0 29 29 29h444q29 0 29 -29v-182q0 -29 -29 -29h-233v-233h203q29 0 28 -29v-182q0 -29 -28 -29h-203v-487q0 -29 -29 -29h-182q-29 0 -29 29zM92 29v1171q0 29 29 29h444 q29 0 29 -29v-182q0 -29 -29 -29h-233v-233h203q29 0 28 -29v-182q0 -29 -28 -29h-203v-487q0 -29 -29 -29h-182q-29 0 -29 29z" />
+<glyph unicode="&#xfb04;" horiz-adv-x="1986" d="M1413 29v1171q0 29 29 29h182q29 0 29 -29v-960h254q29 0 29 -29v-182q0 -29 -29 -29h-277h-4h-2h-182q-29 0 -29 29zM747 29v1171q0 29 29 29h444q29 0 29 -29v-182q0 -29 -29 -29h-233v-233h203q29 0 28 -29v-182q0 -29 -28 -29h-203v-487q0 -29 -29 -29h-182 q-29 0 -29 29zM92 29v1171q0 29 29 29h444q29 0 29 -29v-182q0 -29 -29 -29h-233v-233h203q29 0 28 -29v-182q0 -29 -28 -29h-203v-487q0 -29 -29 -29h-182q-29 0 -29 29z" />
+</font>
+</defs></svg> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/fonts/franchise-bold-webfont.ttf b/common/src/main/webapp/thirdparty/fonts/franchise-bold-webfont.ttf
new file mode 100644
index 0000000..75a6247
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/fonts/franchise-bold-webfont.ttf
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/fonts/franchise-bold-webfont.woff b/common/src/main/webapp/thirdparty/fonts/franchise-bold-webfont.woff
new file mode 100644
index 0000000..2c20a73
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/fonts/franchise-bold-webfont.woff
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/fonts/glyphicons-halflings-regular.eot b/common/src/main/webapp/thirdparty/fonts/glyphicons-halflings-regular.eot
new file mode 100644
index 0000000..b93a495
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/fonts/glyphicons-halflings-regular.eot
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/fonts/glyphicons-halflings-regular.svg b/common/src/main/webapp/thirdparty/fonts/glyphicons-halflings-regular.svg
new file mode 100644
index 0000000..94fb549
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/fonts/glyphicons-halflings-regular.svg
@@ -0,0 +1,288 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="glyphicons_halflingsregular" horiz-adv-x="1200" >
+<font-face units-per-em="1200" ascent="960" descent="-240" />
+<missing-glyph horiz-adv-x="500" />
+<glyph horiz-adv-x="0" />
+<glyph horiz-adv-x="400" />
+<glyph unicode=" " />
+<glyph unicode="*" d="M600 1100q15 0 34 -1.5t30 -3.5l11 -1q10 -2 17.5 -10.5t7.5 -18.5v-224l158 158q7 7 18 8t19 -6l106 -106q7 -8 6 -19t-8 -18l-158 -158h224q10 0 18.5 -7.5t10.5 -17.5q6 -41 6 -75q0 -15 -1.5 -34t-3.5 -30l-1 -11q-2 -10 -10.5 -17.5t-18.5 -7.5h-224l158 -158 q7 -7 8 -18t-6 -19l-106 -106q-8 -7 -19 -6t-18 8l-158 158v-224q0 -10 -7.5 -18.5t-17.5 -10.5q-41 -6 -75 -6q-15 0 -34 1.5t-30 3.5l-11 1q-10 2 -17.5 10.5t-7.5 18.5v224l-158 -158q-7 -7 -18 -8t-19 6l-106 106q-7 8 -6 19t8 18l158 158h-224q-10 0 -18.5 7.5 t-10.5 17.5q-6 41 -6 75q0 15 1.5 34t3.5 30l1 11q2 10 10.5 17.5t18.5 7.5h224l-158 158q-7 7 -8 18t6 19l106 106q8 7 19 6t18 -8l158 -158v224q0 10 7.5 18.5t17.5 10.5q41 6 75 6z" />
+<glyph unicode="+" d="M450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-350h350q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-350v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v350h-350q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5 h350v350q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xa0;" />
+<glyph unicode="&#xa5;" d="M825 1100h250q10 0 12.5 -5t-5.5 -13l-364 -364q-6 -6 -11 -18h268q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-100h275q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-174q0 -11 -7.5 -18.5t-18.5 -7.5h-148q-11 0 -18.5 7.5t-7.5 18.5v174 h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h125v100h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h118q-5 12 -11 18l-364 364q-8 8 -5.5 13t12.5 5h250q25 0 43 -18l164 -164q8 -8 18 -8t18 8l164 164q18 18 43 18z" />
+<glyph unicode="&#x2000;" horiz-adv-x="650" />
+<glyph unicode="&#x2001;" horiz-adv-x="1300" />
+<glyph unicode="&#x2002;" horiz-adv-x="650" />
+<glyph unicode="&#x2003;" horiz-adv-x="1300" />
+<glyph unicode="&#x2004;" horiz-adv-x="433" />
+<glyph unicode="&#x2005;" horiz-adv-x="325" />
+<glyph unicode="&#x2006;" horiz-adv-x="216" />
+<glyph unicode="&#x2007;" horiz-adv-x="216" />
+<glyph unicode="&#x2008;" horiz-adv-x="162" />
+<glyph unicode="&#x2009;" horiz-adv-x="260" />
+<glyph unicode="&#x200a;" horiz-adv-x="72" />
+<glyph unicode="&#x202f;" horiz-adv-x="260" />
+<glyph unicode="&#x205f;" horiz-adv-x="325" />
+<glyph unicode="&#x20ac;" d="M744 1198q242 0 354 -189q60 -104 66 -209h-181q0 45 -17.5 82.5t-43.5 61.5t-58 40.5t-60.5 24t-51.5 7.5q-19 0 -40.5 -5.5t-49.5 -20.5t-53 -38t-49 -62.5t-39 -89.5h379l-100 -100h-300q-6 -50 -6 -100h406l-100 -100h-300q9 -74 33 -132t52.5 -91t61.5 -54.5t59 -29 t47 -7.5q22 0 50.5 7.5t60.5 24.5t58 41t43.5 61t17.5 80h174q-30 -171 -128 -278q-107 -117 -274 -117q-206 0 -324 158q-36 48 -69 133t-45 204h-217l100 100h112q1 47 6 100h-218l100 100h134q20 87 51 153.5t62 103.5q117 141 297 141z" />
+<glyph unicode="&#x20bd;" d="M428 1200h350q67 0 120 -13t86 -31t57 -49.5t35 -56.5t17 -64.5t6.5 -60.5t0.5 -57v-16.5v-16.5q0 -36 -0.5 -57t-6.5 -61t-17 -65t-35 -57t-57 -50.5t-86 -31.5t-120 -13h-178l-2 -100h288q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-138v-175q0 -11 -5.5 -18 t-15.5 -7h-149q-10 0 -17.5 7.5t-7.5 17.5v175h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v100h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v475q0 10 7.5 17.5t17.5 7.5zM600 1000v-300h203q64 0 86.5 33t22.5 119q0 84 -22.5 116t-86.5 32h-203z" />
+<glyph unicode="&#x2212;" d="M250 700h800q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#x231b;" d="M1000 1200v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-50v-100q0 -91 -49.5 -165.5t-130.5 -109.5q81 -35 130.5 -109.5t49.5 -165.5v-150h50q21 0 35.5 -14.5t14.5 -35.5v-150h-800v150q0 21 14.5 35.5t35.5 14.5h50v150q0 91 49.5 165.5t130.5 109.5q-81 35 -130.5 109.5 t-49.5 165.5v100h-50q-21 0 -35.5 14.5t-14.5 35.5v150h800zM400 1000v-100q0 -60 32.5 -109.5t87.5 -73.5q28 -12 44 -37t16 -55t-16 -55t-44 -37q-55 -24 -87.5 -73.5t-32.5 -109.5v-150h400v150q0 60 -32.5 109.5t-87.5 73.5q-28 12 -44 37t-16 55t16 55t44 37 q55 24 87.5 73.5t32.5 109.5v100h-400z" />
+<glyph unicode="&#x25fc;" horiz-adv-x="500" d="M0 0z" />
+<glyph unicode="&#x2601;" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -206.5q0 -121 -85 -207.5t-205 -86.5h-750q-79 0 -135.5 57t-56.5 137q0 69 42.5 122.5t108.5 67.5q-2 12 -2 37q0 153 108 260.5t260 107.5z" />
+<glyph unicode="&#x26fa;" d="M774 1193.5q16 -9.5 20.5 -27t-5.5 -33.5l-136 -187l467 -746h30q20 0 35 -18.5t15 -39.5v-42h-1200v42q0 21 15 39.5t35 18.5h30l468 746l-135 183q-10 16 -5.5 34t20.5 28t34 5.5t28 -20.5l111 -148l112 150q9 16 27 20.5t34 -5zM600 200h377l-182 112l-195 534v-646z " />
+<glyph unicode="&#x2709;" d="M25 1100h1150q10 0 12.5 -5t-5.5 -13l-564 -567q-8 -8 -18 -8t-18 8l-564 567q-8 8 -5.5 13t12.5 5zM18 882l264 -264q8 -8 8 -18t-8 -18l-264 -264q-8 -8 -13 -5.5t-5 12.5v550q0 10 5 12.5t13 -5.5zM918 618l264 264q8 8 13 5.5t5 -12.5v-550q0 -10 -5 -12.5t-13 5.5 l-264 264q-8 8 -8 18t8 18zM818 482l364 -364q8 -8 5.5 -13t-12.5 -5h-1150q-10 0 -12.5 5t5.5 13l364 364q8 8 18 8t18 -8l164 -164q8 -8 18 -8t18 8l164 164q8 8 18 8t18 -8z" />
+<glyph unicode="&#x270f;" d="M1011 1210q19 0 33 -13l153 -153q13 -14 13 -33t-13 -33l-99 -92l-214 214l95 96q13 14 32 14zM1013 800l-615 -614l-214 214l614 614zM317 96l-333 -112l110 335z" />
+<glyph unicode="&#xe001;" d="M700 650v-550h250q21 0 35.5 -14.5t14.5 -35.5v-50h-800v50q0 21 14.5 35.5t35.5 14.5h250v550l-500 550h1200z" />
+<glyph unicode="&#xe002;" d="M368 1017l645 163q39 15 63 0t24 -49v-831q0 -55 -41.5 -95.5t-111.5 -63.5q-79 -25 -147 -4.5t-86 75t25.5 111.5t122.5 82q72 24 138 8v521l-600 -155v-606q0 -42 -44 -90t-109 -69q-79 -26 -147 -5.5t-86 75.5t25.5 111.5t122.5 82.5q72 24 138 7v639q0 38 14.5 59 t53.5 34z" />
+<glyph unicode="&#xe003;" d="M500 1191q100 0 191 -39t156.5 -104.5t104.5 -156.5t39 -191l-1 -2l1 -5q0 -141 -78 -262l275 -274q23 -26 22.5 -44.5t-22.5 -42.5l-59 -58q-26 -20 -46.5 -20t-39.5 20l-275 274q-119 -77 -261 -77l-5 1l-2 -1q-100 0 -191 39t-156.5 104.5t-104.5 156.5t-39 191 t39 191t104.5 156.5t156.5 104.5t191 39zM500 1022q-88 0 -162 -43t-117 -117t-43 -162t43 -162t117 -117t162 -43t162 43t117 117t43 162t-43 162t-117 117t-162 43z" />
+<glyph unicode="&#xe005;" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104z" />
+<glyph unicode="&#xe006;" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429z" />
+<glyph unicode="&#xe007;" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429zM477 700h-240l197 -142l-74 -226 l193 139l195 -140l-74 229l192 140h-234l-78 211z" />
+<glyph unicode="&#xe008;" d="M600 1200q124 0 212 -88t88 -212v-250q0 -46 -31 -98t-69 -52v-75q0 -10 6 -21.5t15 -17.5l358 -230q9 -5 15 -16.5t6 -21.5v-93q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v93q0 10 6 21.5t15 16.5l358 230q9 6 15 17.5t6 21.5v75q-38 0 -69 52 t-31 98v250q0 124 88 212t212 88z" />
+<glyph unicode="&#xe009;" d="M25 1100h1150q10 0 17.5 -7.5t7.5 -17.5v-1050q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v1050q0 10 7.5 17.5t17.5 7.5zM100 1000v-100h100v100h-100zM875 1000h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5t17.5 -7.5h550 q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM1000 1000v-100h100v100h-100zM100 800v-100h100v100h-100zM1000 800v-100h100v100h-100zM100 600v-100h100v100h-100zM1000 600v-100h100v100h-100zM875 500h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5 t17.5 -7.5h550q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM100 400v-100h100v100h-100zM1000 400v-100h100v100h-100zM100 200v-100h100v100h-100zM1000 200v-100h100v100h-100z" />
+<glyph unicode="&#xe010;" d="M50 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM50 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe011;" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM850 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 700h200q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5 t35.5 14.5z" />
+<glyph unicode="&#xe012;" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h700q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe013;" d="M465 477l571 571q8 8 18 8t17 -8l177 -177q8 -7 8 -17t-8 -18l-783 -784q-7 -8 -17.5 -8t-17.5 8l-384 384q-8 8 -8 18t8 17l177 177q7 8 17 8t18 -8l171 -171q7 -7 18 -7t18 7z" />
+<glyph unicode="&#xe014;" d="M904 1083l178 -179q8 -8 8 -18.5t-8 -17.5l-267 -268l267 -268q8 -7 8 -17.5t-8 -18.5l-178 -178q-8 -8 -18.5 -8t-17.5 8l-268 267l-268 -267q-7 -8 -17.5 -8t-18.5 8l-178 178q-8 8 -8 18.5t8 17.5l267 268l-267 268q-8 7 -8 17.5t8 18.5l178 178q8 8 18.5 8t17.5 -8 l268 -267l268 268q7 7 17.5 7t18.5 -7z" />
+<glyph unicode="&#xe015;" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM425 900h150q10 0 17.5 -7.5t7.5 -17.5v-75h75q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5 t-17.5 -7.5h-75v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-75q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v75q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe016;" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM325 800h350q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-350q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe017;" d="M550 1200h100q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM800 975v166q167 -62 272 -209.5t105 -331.5q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5 t-184.5 123t-123 184.5t-45.5 224q0 184 105 331.5t272 209.5v-166q-103 -55 -165 -155t-62 -220q0 -116 57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5q0 120 -62 220t-165 155z" />
+<glyph unicode="&#xe018;" d="M1025 1200h150q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM725 800h150q10 0 17.5 -7.5t7.5 -17.5v-750q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v750 q0 10 7.5 17.5t17.5 7.5zM425 500h150q10 0 17.5 -7.5t7.5 -17.5v-450q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v450q0 10 7.5 17.5t17.5 7.5zM125 300h150q10 0 17.5 -7.5t7.5 -17.5v-250q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5 v250q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe019;" d="M600 1174q33 0 74 -5l38 -152l5 -1q49 -14 94 -39l5 -2l134 80q61 -48 104 -105l-80 -134l3 -5q25 -44 39 -93l1 -6l152 -38q5 -43 5 -73q0 -34 -5 -74l-152 -38l-1 -6q-15 -49 -39 -93l-3 -5l80 -134q-48 -61 -104 -105l-134 81l-5 -3q-44 -25 -94 -39l-5 -2l-38 -151 q-43 -5 -74 -5q-33 0 -74 5l-38 151l-5 2q-49 14 -94 39l-5 3l-134 -81q-60 48 -104 105l80 134l-3 5q-25 45 -38 93l-2 6l-151 38q-6 42 -6 74q0 33 6 73l151 38l2 6q13 48 38 93l3 5l-80 134q47 61 105 105l133 -80l5 2q45 25 94 39l5 1l38 152q43 5 74 5zM600 815 q-89 0 -152 -63t-63 -151.5t63 -151.5t152 -63t152 63t63 151.5t-63 151.5t-152 63z" />
+<glyph unicode="&#xe020;" d="M500 1300h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-75h-1100v75q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5zM500 1200v-100h300v100h-300zM1100 900v-800q0 -41 -29.5 -70.5t-70.5 -29.5h-700q-41 0 -70.5 29.5t-29.5 70.5 v800h900zM300 800v-700h100v700h-100zM500 800v-700h100v700h-100zM700 800v-700h100v700h-100zM900 800v-700h100v700h-100z" />
+<glyph unicode="&#xe021;" d="M18 618l620 608q8 7 18.5 7t17.5 -7l608 -608q8 -8 5.5 -13t-12.5 -5h-175v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v375h-300v-375q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v575h-175q-10 0 -12.5 5t5.5 13z" />
+<glyph unicode="&#xe022;" d="M600 1200v-400q0 -41 29.5 -70.5t70.5 -29.5h300v-650q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5h450zM1000 800h-250q-21 0 -35.5 14.5t-14.5 35.5v250z" />
+<glyph unicode="&#xe023;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h50q10 0 17.5 -7.5t7.5 -17.5v-275h175q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe024;" d="M1300 0h-538l-41 400h-242l-41 -400h-538l431 1200h209l-21 -300h162l-20 300h208zM515 800l-27 -300h224l-27 300h-170z" />
+<glyph unicode="&#xe025;" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-450h191q20 0 25.5 -11.5t-7.5 -27.5l-327 -400q-13 -16 -32 -16t-32 16l-327 400q-13 16 -7.5 27.5t25.5 11.5h191v450q0 21 14.5 35.5t35.5 14.5zM1125 400h50q10 0 17.5 -7.5t7.5 -17.5v-350q0 -10 -7.5 -17.5t-17.5 -7.5 h-1050q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h50q10 0 17.5 -7.5t7.5 -17.5v-175h900v175q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe026;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -275q-13 -16 -32 -16t-32 16l-223 275q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z " />
+<glyph unicode="&#xe027;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM632 914l223 -275q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5l223 275q13 16 32 16 t32 -16z" />
+<glyph unicode="&#xe028;" d="M225 1200h750q10 0 19.5 -7t12.5 -17l186 -652q7 -24 7 -49v-425q0 -12 -4 -27t-9 -17q-12 -6 -37 -6h-1100q-12 0 -27 4t-17 8q-6 13 -6 38l1 425q0 25 7 49l185 652q3 10 12.5 17t19.5 7zM878 1000h-556q-10 0 -19 -7t-11 -18l-87 -450q-2 -11 4 -18t16 -7h150 q10 0 19.5 -7t11.5 -17l38 -152q2 -10 11.5 -17t19.5 -7h250q10 0 19.5 7t11.5 17l38 152q2 10 11.5 17t19.5 7h150q10 0 16 7t4 18l-87 450q-2 11 -11 18t-19 7z" />
+<glyph unicode="&#xe029;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM540 820l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
+<glyph unicode="&#xe030;" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-362q0 -10 -7.5 -17.5t-17.5 -7.5h-362q-11 0 -13 5.5t5 12.5l133 133q-109 76 -238 76q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5h150q0 -117 -45.5 -224 t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117z" />
+<glyph unicode="&#xe031;" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-361q0 -11 -7.5 -18.5t-18.5 -7.5h-361q-11 0 -13 5.5t5 12.5l134 134q-110 75 -239 75q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5h-150q0 117 45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117zM1027 600h150 q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5q-192 0 -348 118l-134 -134q-7 -8 -12.5 -5.5t-5.5 12.5v360q0 11 7.5 18.5t18.5 7.5h360q10 0 12.5 -5.5t-5.5 -12.5l-133 -133q110 -76 240 -76q116 0 214.5 57t155.5 155.5t57 214.5z" />
+<glyph unicode="&#xe032;" d="M125 1200h1050q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-1050q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM1075 1000h-850q-10 0 -17.5 -7.5t-7.5 -17.5v-850q0 -10 7.5 -17.5t17.5 -7.5h850q10 0 17.5 7.5t7.5 17.5v850 q0 10 -7.5 17.5t-17.5 7.5zM325 900h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 900h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 700h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 700h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 500h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 500h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 300h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 300h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe033;" d="M900 800v200q0 83 -58.5 141.5t-141.5 58.5h-300q-82 0 -141 -59t-59 -141v-200h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h900q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-100zM400 800v150q0 21 15 35.5t35 14.5h200 q20 0 35 -14.5t15 -35.5v-150h-300z" />
+<glyph unicode="&#xe034;" d="M125 1100h50q10 0 17.5 -7.5t7.5 -17.5v-1075h-100v1075q0 10 7.5 17.5t17.5 7.5zM1075 1052q4 0 9 -2q16 -6 16 -23v-421q0 -6 -3 -12q-33 -59 -66.5 -99t-65.5 -58t-56.5 -24.5t-52.5 -6.5q-26 0 -57.5 6.5t-52.5 13.5t-60 21q-41 15 -63 22.5t-57.5 15t-65.5 7.5 q-85 0 -160 -57q-7 -5 -15 -5q-6 0 -11 3q-14 7 -14 22v438q22 55 82 98.5t119 46.5q23 2 43 0.5t43 -7t32.5 -8.5t38 -13t32.5 -11q41 -14 63.5 -21t57 -14t63.5 -7q103 0 183 87q7 8 18 8z" />
+<glyph unicode="&#xe035;" d="M600 1175q116 0 227 -49.5t192.5 -131t131 -192.5t49.5 -227v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v300q0 127 -70.5 231.5t-184.5 161.5t-245 57t-245 -57t-184.5 -161.5t-70.5 -231.5v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50 q-10 0 -17.5 7.5t-7.5 17.5v300q0 116 49.5 227t131 192.5t192.5 131t227 49.5zM220 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460q0 8 6 14t14 6zM820 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460 q0 8 6 14t14 6z" />
+<glyph unicode="&#xe036;" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM900 668l120 120q7 7 17 7t17 -7l34 -34q7 -7 7 -17t-7 -17l-120 -120l120 -120q7 -7 7 -17 t-7 -17l-34 -34q-7 -7 -17 -7t-17 7l-120 119l-120 -119q-7 -7 -17 -7t-17 7l-34 34q-7 7 -7 17t7 17l119 120l-119 120q-7 7 -7 17t7 17l34 34q7 8 17 8t17 -8z" />
+<glyph unicode="&#xe037;" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6 l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238q-6 8 -4.5 18t9.5 17l29 22q7 5 15 5z" />
+<glyph unicode="&#xe038;" d="M967 1004h3q11 -1 17 -10q135 -179 135 -396q0 -105 -34 -206.5t-98 -185.5q-7 -9 -17 -10h-3q-9 0 -16 6l-42 34q-8 6 -9 16t5 18q111 150 111 328q0 90 -29.5 176t-84.5 157q-6 9 -5 19t10 16l42 33q7 5 15 5zM321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5 t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238 q-6 8 -4.5 18.5t9.5 16.5l29 22q7 5 15 5z" />
+<glyph unicode="&#xe039;" d="M500 900h100v-100h-100v-100h-400v-100h-100v600h500v-300zM1200 700h-200v-100h200v-200h-300v300h-200v300h-100v200h600v-500zM100 1100v-300h300v300h-300zM800 1100v-300h300v300h-300zM300 900h-100v100h100v-100zM1000 900h-100v100h100v-100zM300 500h200v-500 h-500v500h200v100h100v-100zM800 300h200v-100h-100v-100h-200v100h-100v100h100v200h-200v100h300v-300zM100 400v-300h300v300h-300zM300 200h-100v100h100v-100zM1200 200h-100v100h100v-100zM700 0h-100v100h100v-100zM1200 0h-300v100h300v-100z" />
+<glyph unicode="&#xe040;" d="M100 200h-100v1000h100v-1000zM300 200h-100v1000h100v-1000zM700 200h-200v1000h200v-1000zM900 200h-100v1000h100v-1000zM1200 200h-200v1000h200v-1000zM400 0h-300v100h300v-100zM600 0h-100v91h100v-91zM800 0h-100v91h100v-91zM1100 0h-200v91h200v-91z" />
+<glyph unicode="&#xe041;" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
+<glyph unicode="&#xe042;" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM800 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-56 56l424 426l-700 700h150zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5 t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
+<glyph unicode="&#xe043;" d="M300 1200h825q75 0 75 -75v-900q0 -25 -18 -43l-64 -64q-8 -8 -13 -5.5t-5 12.5v950q0 10 -7.5 17.5t-17.5 7.5h-700q-25 0 -43 -18l-64 -64q-8 -8 -5.5 -13t12.5 -5h700q10 0 17.5 -7.5t7.5 -17.5v-950q0 -10 -7.5 -17.5t-17.5 -7.5h-850q-10 0 -17.5 7.5t-7.5 17.5v975 q0 25 18 43l139 139q18 18 43 18z" />
+<glyph unicode="&#xe044;" d="M250 1200h800q21 0 35.5 -14.5t14.5 -35.5v-1150l-450 444l-450 -445v1151q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe045;" d="M822 1200h-444q-11 0 -19 -7.5t-9 -17.5l-78 -301q-7 -24 7 -45l57 -108q6 -9 17.5 -15t21.5 -6h450q10 0 21.5 6t17.5 15l62 108q14 21 7 45l-83 301q-1 10 -9 17.5t-19 7.5zM1175 800h-150q-10 0 -21 -6.5t-15 -15.5l-78 -156q-4 -9 -15 -15.5t-21 -6.5h-550 q-10 0 -21 6.5t-15 15.5l-78 156q-4 9 -15 15.5t-21 6.5h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-650q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h750q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5 t7.5 17.5v650q0 10 -7.5 17.5t-17.5 7.5zM850 200h-500q-10 0 -19.5 -7t-11.5 -17l-38 -152q-2 -10 3.5 -17t15.5 -7h600q10 0 15.5 7t3.5 17l-38 152q-2 10 -11.5 17t-19.5 7z" />
+<glyph unicode="&#xe046;" d="M500 1100h200q56 0 102.5 -20.5t72.5 -50t44 -59t25 -50.5l6 -20h150q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5h150q2 8 6.5 21.5t24 48t45 61t72 48t102.5 21.5zM900 800v-100 h100v100h-100zM600 730q-95 0 -162.5 -67.5t-67.5 -162.5t67.5 -162.5t162.5 -67.5t162.5 67.5t67.5 162.5t-67.5 162.5t-162.5 67.5zM600 603q43 0 73 -30t30 -73t-30 -73t-73 -30t-73 30t-30 73t30 73t73 30z" />
+<glyph unicode="&#xe047;" d="M681 1199l385 -998q20 -50 60 -92q18 -19 36.5 -29.5t27.5 -11.5l10 -2v-66h-417v66q53 0 75 43.5t5 88.5l-82 222h-391q-58 -145 -92 -234q-11 -34 -6.5 -57t25.5 -37t46 -20t55 -6v-66h-365v66q56 24 84 52q12 12 25 30.5t20 31.5l7 13l399 1006h93zM416 521h340 l-162 457z" />
+<glyph unicode="&#xe048;" d="M753 641q5 -1 14.5 -4.5t36 -15.5t50.5 -26.5t53.5 -40t50.5 -54.5t35.5 -70t14.5 -87q0 -67 -27.5 -125.5t-71.5 -97.5t-98.5 -66.5t-108.5 -40.5t-102 -13h-500v89q41 7 70.5 32.5t29.5 65.5v827q0 24 -0.5 34t-3.5 24t-8.5 19.5t-17 13.5t-28 12.5t-42.5 11.5v71 l471 -1q57 0 115.5 -20.5t108 -57t80.5 -94t31 -124.5q0 -51 -15.5 -96.5t-38 -74.5t-45 -50.5t-38.5 -30.5zM400 700h139q78 0 130.5 48.5t52.5 122.5q0 41 -8.5 70.5t-29.5 55.5t-62.5 39.5t-103.5 13.5h-118v-350zM400 200h216q80 0 121 50.5t41 130.5q0 90 -62.5 154.5 t-156.5 64.5h-159v-400z" />
+<glyph unicode="&#xe049;" d="M877 1200l2 -57q-83 -19 -116 -45.5t-40 -66.5l-132 -839q-9 -49 13 -69t96 -26v-97h-500v97q186 16 200 98l173 832q3 17 3 30t-1.5 22.5t-9 17.5t-13.5 12.5t-21.5 10t-26 8.5t-33.5 10q-13 3 -19 5v57h425z" />
+<glyph unicode="&#xe050;" d="M1300 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM175 1000h-75v-800h75l-125 -167l-125 167h75v800h-75l125 167z" />
+<glyph unicode="&#xe051;" d="M1100 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-650q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v650h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM1167 50l-167 -125v75h-800v-75l-167 125l167 125v-75h800v75z" />
+<glyph unicode="&#xe052;" d="M50 1100h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe053;" d="M250 1100h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM250 500h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe054;" d="M500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000 q-21 0 -35.5 14.5t-14.5 35.5zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5zM0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5z" />
+<glyph unicode="&#xe055;" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe056;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 1100h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 800h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 500h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 500h800q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 200h800 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe057;" d="M400 0h-100v1100h100v-1100zM550 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM267 550l-167 -125v75h-200v100h200v75zM550 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe058;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM900 0h-100v1100h100v-1100zM50 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM1100 600h200v-100h-200v-75l-167 125l167 125v-75zM50 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe059;" d="M75 1000h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53v650q0 31 22 53t53 22zM1200 300l-300 300l300 300v-600z" />
+<glyph unicode="&#xe060;" d="M44 1100h1112q18 0 31 -13t13 -31v-1012q0 -18 -13 -31t-31 -13h-1112q-18 0 -31 13t-13 31v1012q0 18 13 31t31 13zM100 1000v-737l247 182l298 -131l-74 156l293 318l236 -288v500h-1000zM342 884q56 0 95 -39t39 -94.5t-39 -95t-95 -39.5t-95 39.5t-39 95t39 94.5 t95 39z" />
+<glyph unicode="&#xe062;" d="M648 1169q117 0 216 -60t156.5 -161t57.5 -218q0 -115 -70 -258q-69 -109 -158 -225.5t-143 -179.5l-54 -62q-9 8 -25.5 24.5t-63.5 67.5t-91 103t-98.5 128t-95.5 148q-60 132 -60 249q0 88 34 169.5t91.5 142t137 96.5t166.5 36zM652.5 974q-91.5 0 -156.5 -65 t-65 -157t65 -156.5t156.5 -64.5t156.5 64.5t65 156.5t-65 157t-156.5 65z" />
+<glyph unicode="&#xe063;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 173v854q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57z" />
+<glyph unicode="&#xe064;" d="M554 1295q21 -72 57.5 -143.5t76 -130t83 -118t82.5 -117t70 -116t49.5 -126t18.5 -136.5q0 -71 -25.5 -135t-68.5 -111t-99 -82t-118.5 -54t-125.5 -23q-84 5 -161.5 34t-139.5 78.5t-99 125t-37 164.5q0 69 18 136.5t49.5 126.5t69.5 116.5t81.5 117.5t83.5 119 t76.5 131t58.5 143zM344 710q-23 -33 -43.5 -70.5t-40.5 -102.5t-17 -123q1 -37 14.5 -69.5t30 -52t41 -37t38.5 -24.5t33 -15q21 -7 32 -1t13 22l6 34q2 10 -2.5 22t-13.5 19q-5 4 -14 12t-29.5 40.5t-32.5 73.5q-26 89 6 271q2 11 -6 11q-8 1 -15 -10z" />
+<glyph unicode="&#xe065;" d="M1000 1013l108 115q2 1 5 2t13 2t20.5 -1t25 -9.5t28.5 -21.5q22 -22 27 -43t0 -32l-6 -10l-108 -115zM350 1100h400q50 0 105 -13l-187 -187h-368q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v182l200 200v-332 q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM1009 803l-362 -362l-161 -50l55 170l355 355z" />
+<glyph unicode="&#xe066;" d="M350 1100h361q-164 -146 -216 -200h-195q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-103q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M824 1073l339 -301q8 -7 8 -17.5t-8 -17.5l-340 -306q-7 -6 -12.5 -4t-6.5 11v203q-26 1 -54.5 0t-78.5 -7.5t-92 -17.5t-86 -35t-70 -57q10 59 33 108t51.5 81.5t65 58.5t68.5 40.5t67 24.5t56 13.5t40 4.5v210q1 10 6.5 12.5t13.5 -4.5z" />
+<glyph unicode="&#xe067;" d="M350 1100h350q60 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-219q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M643 639l395 395q7 7 17.5 7t17.5 -7l101 -101q7 -7 7 -17.5t-7 -17.5l-531 -532q-7 -7 -17.5 -7t-17.5 7l-248 248q-7 7 -7 17.5t7 17.5l101 101q7 7 17.5 7t17.5 -7l111 -111q8 -7 18 -7t18 7z" />
+<glyph unicode="&#xe068;" d="M318 918l264 264q8 8 18 8t18 -8l260 -264q7 -8 4.5 -13t-12.5 -5h-170v-200h200v173q0 10 5 12t13 -5l264 -260q8 -7 8 -17.5t-8 -17.5l-264 -265q-8 -7 -13 -5t-5 12v173h-200v-200h170q10 0 12.5 -5t-4.5 -13l-260 -264q-8 -8 -18 -8t-18 8l-264 264q-8 8 -5.5 13 t12.5 5h175v200h-200v-173q0 -10 -5 -12t-13 5l-264 265q-8 7 -8 17.5t8 17.5l264 260q8 7 13 5t5 -12v-173h200v200h-175q-10 0 -12.5 5t5.5 13z" />
+<glyph unicode="&#xe069;" d="M250 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe070;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5 t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe071;" d="M1200 1050v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-492 480q-15 14 -15 35t15 35l492 480q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25z" />
+<glyph unicode="&#xe072;" d="M243 1074l814 -498q18 -11 18 -26t-18 -26l-814 -498q-18 -11 -30.5 -4t-12.5 28v1000q0 21 12.5 28t30.5 -4z" />
+<glyph unicode="&#xe073;" d="M250 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM650 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800 q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe074;" d="M1100 950v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5z" />
+<glyph unicode="&#xe075;" d="M500 612v438q0 21 10.5 25t25.5 -10l492 -480q15 -14 15 -35t-15 -35l-492 -480q-15 -14 -25.5 -10t-10.5 25v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10z" />
+<glyph unicode="&#xe076;" d="M1048 1102l100 1q20 0 35 -14.5t15 -35.5l5 -1000q0 -21 -14.5 -35.5t-35.5 -14.5l-100 -1q-21 0 -35.5 14.5t-14.5 35.5l-2 437l-463 -454q-14 -15 -24.5 -10.5t-10.5 25.5l-2 437l-462 -455q-15 -14 -25.5 -9.5t-10.5 24.5l-5 1000q0 21 10.5 25.5t25.5 -10.5l466 -450 l-2 438q0 20 10.5 24.5t25.5 -9.5l466 -451l-2 438q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe077;" d="M850 1100h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10l464 -453v438q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe078;" d="M686 1081l501 -540q15 -15 10.5 -26t-26.5 -11h-1042q-22 0 -26.5 11t10.5 26l501 540q15 15 36 15t36 -15zM150 400h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe079;" d="M885 900l-352 -353l352 -353l-197 -198l-552 552l552 550z" />
+<glyph unicode="&#xe080;" d="M1064 547l-551 -551l-198 198l353 353l-353 353l198 198z" />
+<glyph unicode="&#xe081;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM650 900h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-150 q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5h150v-150q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v150h150q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-150v150q0 21 -14.5 35.5t-35.5 14.5z" />
+<glyph unicode="&#xe082;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM850 700h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5 t35.5 -14.5h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5z" />
+<glyph unicode="&#xe083;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM741.5 913q-12.5 0 -21.5 -9l-120 -120l-120 120q-9 9 -21.5 9 t-21.5 -9l-141 -141q-9 -9 -9 -21.5t9 -21.5l120 -120l-120 -120q-9 -9 -9 -21.5t9 -21.5l141 -141q9 -9 21.5 -9t21.5 9l120 120l120 -120q9 -9 21.5 -9t21.5 9l141 141q9 9 9 21.5t-9 21.5l-120 120l120 120q9 9 9 21.5t-9 21.5l-141 141q-9 9 -21.5 9z" />
+<glyph unicode="&#xe084;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM546 623l-84 85q-7 7 -17.5 7t-18.5 -7l-139 -139q-7 -8 -7 -18t7 -18 l242 -241q7 -8 17.5 -8t17.5 8l375 375q7 7 7 17.5t-7 18.5l-139 139q-7 7 -17.5 7t-17.5 -7z" />
+<glyph unicode="&#xe085;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM588 941q-29 0 -59 -5.5t-63 -20.5t-58 -38.5t-41.5 -63t-16.5 -89.5 q0 -25 20 -25h131q30 -5 35 11q6 20 20.5 28t45.5 8q20 0 31.5 -10.5t11.5 -28.5q0 -23 -7 -34t-26 -18q-1 0 -13.5 -4t-19.5 -7.5t-20 -10.5t-22 -17t-18.5 -24t-15.5 -35t-8 -46q-1 -8 5.5 -16.5t20.5 -8.5h173q7 0 22 8t35 28t37.5 48t29.5 74t12 100q0 47 -17 83 t-42.5 57t-59.5 34.5t-64 18t-59 4.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="&#xe086;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM675 1000h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5 t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5zM675 700h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h75v-200h-75q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h350q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5 t-17.5 7.5h-75v275q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="&#xe087;" d="M525 1200h150q10 0 17.5 -7.5t7.5 -17.5v-194q103 -27 178.5 -102.5t102.5 -178.5h194q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-194q-27 -103 -102.5 -178.5t-178.5 -102.5v-194q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v194 q-103 27 -178.5 102.5t-102.5 178.5h-194q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h194q27 103 102.5 178.5t178.5 102.5v194q0 10 7.5 17.5t17.5 7.5zM700 893v-168q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v168q-68 -23 -119 -74 t-74 -119h168q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-168q23 -68 74 -119t119 -74v168q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-168q68 23 119 74t74 119h-168q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h168 q-23 68 -74 119t-119 74z" />
+<glyph unicode="&#xe088;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM759 823l64 -64q7 -7 7 -17.5t-7 -17.5l-124 -124l124 -124q7 -7 7 -17.5t-7 -17.5l-64 -64q-7 -7 -17.5 -7t-17.5 7l-124 124l-124 -124q-7 -7 -17.5 -7t-17.5 7l-64 64 q-7 7 -7 17.5t7 17.5l124 124l-124 124q-7 7 -7 17.5t7 17.5l64 64q7 7 17.5 7t17.5 -7l124 -124l124 124q7 7 17.5 7t17.5 -7z" />
+<glyph unicode="&#xe089;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM782 788l106 -106q7 -7 7 -17.5t-7 -17.5l-320 -321q-8 -7 -18 -7t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l197 197q7 7 17.5 7t17.5 -7z" />
+<glyph unicode="&#xe090;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5q0 -120 65 -225 l587 587q-105 65 -225 65zM965 819l-584 -584q104 -62 219 -62q116 0 214.5 57t155.5 155.5t57 214.5q0 115 -62 219z" />
+<glyph unicode="&#xe091;" d="M39 582l522 427q16 13 27.5 8t11.5 -26v-291h550q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-550v-291q0 -21 -11.5 -26t-27.5 8l-522 427q-16 13 -16 32t16 32z" />
+<glyph unicode="&#xe092;" d="M639 1009l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291h-550q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h550v291q0 21 11.5 26t27.5 -8z" />
+<glyph unicode="&#xe093;" d="M682 1161l427 -522q13 -16 8 -27.5t-26 -11.5h-291v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v550h-291q-21 0 -26 11.5t8 27.5l427 522q13 16 32 16t32 -16z" />
+<glyph unicode="&#xe094;" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-550h291q21 0 26 -11.5t-8 -27.5l-427 -522q-13 -16 -32 -16t-32 16l-427 522q-13 16 -8 27.5t26 11.5h291v550q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe095;" d="M639 1109l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291q-94 -2 -182 -20t-170.5 -52t-147 -92.5t-100.5 -135.5q5 105 27 193.5t67.5 167t113 135t167 91.5t225.5 42v262q0 21 11.5 26t27.5 -8z" />
+<glyph unicode="&#xe096;" d="M850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5zM350 0h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249 q8 7 18 7t18 -7l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5z" />
+<glyph unicode="&#xe097;" d="M1014 1120l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249q8 7 18 7t18 -7zM250 600h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5z" />
+<glyph unicode="&#xe101;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM704 900h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5 t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="&#xe102;" d="M260 1200q9 0 19 -2t15 -4l5 -2q22 -10 44 -23l196 -118q21 -13 36 -24q29 -21 37 -12q11 13 49 35l196 118q22 13 45 23q17 7 38 7q23 0 47 -16.5t37 -33.5l13 -16q14 -21 18 -45l25 -123l8 -44q1 -9 8.5 -14.5t17.5 -5.5h61q10 0 17.5 -7.5t7.5 -17.5v-50 q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 -7.5t-7.5 -17.5v-175h-400v300h-200v-300h-400v175q0 10 -7.5 17.5t-17.5 7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5h61q11 0 18 3t7 8q0 4 9 52l25 128q5 25 19 45q2 3 5 7t13.5 15t21.5 19.5t26.5 15.5 t29.5 7zM915 1079l-166 -162q-7 -7 -5 -12t12 -5h219q10 0 15 7t2 17l-51 149q-3 10 -11 12t-15 -6zM463 917l-177 157q-8 7 -16 5t-11 -12l-51 -143q-3 -10 2 -17t15 -7h231q11 0 12.5 5t-5.5 12zM500 0h-375q-10 0 -17.5 7.5t-7.5 17.5v375h400v-400zM1100 400v-375 q0 -10 -7.5 -17.5t-17.5 -7.5h-375v400h400z" />
+<glyph unicode="&#xe103;" d="M1165 1190q8 3 21 -6.5t13 -17.5q-2 -178 -24.5 -323.5t-55.5 -245.5t-87 -174.5t-102.5 -118.5t-118 -68.5t-118.5 -33t-120 -4.5t-105 9.5t-90 16.5q-61 12 -78 11q-4 1 -12.5 0t-34 -14.5t-52.5 -40.5l-153 -153q-26 -24 -37 -14.5t-11 43.5q0 64 42 102q8 8 50.5 45 t66.5 58q19 17 35 47t13 61q-9 55 -10 102.5t7 111t37 130t78 129.5q39 51 80 88t89.5 63.5t94.5 45t113.5 36t129 31t157.5 37t182 47.5zM1116 1098q-8 9 -22.5 -3t-45.5 -50q-38 -47 -119 -103.5t-142 -89.5l-62 -33q-56 -30 -102 -57t-104 -68t-102.5 -80.5t-85.5 -91 t-64 -104.5q-24 -56 -31 -86t2 -32t31.5 17.5t55.5 59.5q25 30 94 75.5t125.5 77.5t147.5 81q70 37 118.5 69t102 79.5t99 111t86.5 148.5q22 50 24 60t-6 19z" />
+<glyph unicode="&#xe104;" d="M653 1231q-39 -67 -54.5 -131t-10.5 -114.5t24.5 -96.5t47.5 -80t63.5 -62.5t68.5 -46.5t65 -30q-4 7 -17.5 35t-18.5 39.5t-17 39.5t-17 43t-13 42t-9.5 44.5t-2 42t4 43t13.5 39t23 38.5q96 -42 165 -107.5t105 -138t52 -156t13 -159t-19 -149.5q-13 -55 -44 -106.5 t-68 -87t-78.5 -64.5t-72.5 -45t-53 -22q-72 -22 -127 -11q-31 6 -13 19q6 3 17 7q13 5 32.5 21t41 44t38.5 63.5t21.5 81.5t-6.5 94.5t-50 107t-104 115.5q10 -104 -0.5 -189t-37 -140.5t-65 -93t-84 -52t-93.5 -11t-95 24.5q-80 36 -131.5 114t-53.5 171q-2 23 0 49.5 t4.5 52.5t13.5 56t27.5 60t46 64.5t69.5 68.5q-8 -53 -5 -102.5t17.5 -90t34 -68.5t44.5 -39t49 -2q31 13 38.5 36t-4.5 55t-29 64.5t-36 75t-26 75.5q-15 85 2 161.5t53.5 128.5t85.5 92.5t93.5 61t81.5 25.5z" />
+<glyph unicode="&#xe105;" d="M600 1094q82 0 160.5 -22.5t140 -59t116.5 -82.5t94.5 -95t68 -95t42.5 -82.5t14 -57.5t-14 -57.5t-43 -82.5t-68.5 -95t-94.5 -95t-116.5 -82.5t-140 -59t-159.5 -22.5t-159.5 22.5t-140 59t-116.5 82.5t-94.5 95t-68.5 95t-43 82.5t-14 57.5t14 57.5t42.5 82.5t68 95 t94.5 95t116.5 82.5t140 59t160.5 22.5zM888 829q-15 15 -18 12t5 -22q25 -57 25 -119q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 59 23 114q8 19 4.5 22t-17.5 -12q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q22 -36 47 -71t70 -82t92.5 -81t113 -58.5t133.5 -24.5 t133.5 24t113 58.5t92.5 81.5t70 81.5t47 70.5q11 18 9 42.5t-14 41.5q-90 117 -163 189zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l35 34q14 15 12.5 33.5t-16.5 33.5q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
+<glyph unicode="&#xe106;" d="M592 0h-148l31 120q-91 20 -175.5 68.5t-143.5 106.5t-103.5 119t-66.5 110t-22 76q0 21 14 57.5t42.5 82.5t68 95t94.5 95t116.5 82.5t140 59t160.5 22.5q61 0 126 -15l32 121h148zM944 770l47 181q108 -85 176.5 -192t68.5 -159q0 -26 -19.5 -71t-59.5 -102t-93 -112 t-129 -104.5t-158 -75.5l46 173q77 49 136 117t97 131q11 18 9 42.5t-14 41.5q-54 70 -107 130zM310 824q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q18 -30 39 -60t57 -70.5t74 -73t90 -61t105 -41.5l41 154q-107 18 -178.5 101.5t-71.5 193.5q0 59 23 114q8 19 4.5 22 t-17.5 -12zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l12 11l22 86l-3 4q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
+<glyph unicode="&#xe107;" d="M-90 100l642 1066q20 31 48 28.5t48 -35.5l642 -1056q21 -32 7.5 -67.5t-50.5 -35.5h-1294q-37 0 -50.5 34t7.5 66zM155 200h345v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h345l-445 723zM496 700h208q20 0 32 -14.5t8 -34.5l-58 -252 q-4 -20 -21.5 -34.5t-37.5 -14.5h-54q-20 0 -37.5 14.5t-21.5 34.5l-58 252q-4 20 8 34.5t32 14.5z" />
+<glyph unicode="&#xe108;" d="M650 1200q62 0 106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -93 100 -113v-64q0 -21 -13 -29t-32 1l-205 128l-205 -128q-19 -9 -32 -1t-13 29v64q0 20 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5v41 q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44z" />
+<glyph unicode="&#xe109;" d="M850 1200h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-150h-1100v150q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-50h500v50q0 21 14.5 35.5t35.5 14.5zM1100 800v-750q0 -21 -14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v750h1100zM100 600v-100h100v100h-100zM300 600v-100h100v100h-100zM500 600v-100h100v100h-100zM700 600v-100h100v100h-100zM900 600v-100h100v100h-100zM100 400v-100h100v100h-100zM300 400v-100h100v100h-100zM500 400 v-100h100v100h-100zM700 400v-100h100v100h-100zM900 400v-100h100v100h-100zM100 200v-100h100v100h-100zM300 200v-100h100v100h-100zM500 200v-100h100v100h-100zM700 200v-100h100v100h-100zM900 200v-100h100v100h-100z" />
+<glyph unicode="&#xe110;" d="M1135 1165l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-159l-600 -600h-291q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h209l600 600h241v150q0 21 10.5 25t24.5 -10zM522 819l-141 -141l-122 122h-209q-21 0 -35.5 14.5 t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h291zM1135 565l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-241l-181 181l141 141l122 -122h159v150q0 21 10.5 25t24.5 -10z" />
+<glyph unicode="&#xe111;" d="M100 1100h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5z" />
+<glyph unicode="&#xe112;" d="M150 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM850 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM1100 800v-300q0 -41 -3 -77.5t-15 -89.5t-32 -96t-58 -89t-89 -77t-129 -51t-174 -20t-174 20 t-129 51t-89 77t-58 89t-32 96t-15 89.5t-3 77.5v300h300v-250v-27v-42.5t1.5 -41t5 -38t10 -35t16.5 -30t25.5 -24.5t35 -19t46.5 -12t60 -4t60 4.5t46.5 12.5t35 19.5t25 25.5t17 30.5t10 35t5 38t2 40.5t-0.5 42v25v250h300z" />
+<glyph unicode="&#xe113;" d="M1100 411l-198 -199l-353 353l-353 -353l-197 199l551 551z" />
+<glyph unicode="&#xe114;" d="M1101 789l-550 -551l-551 551l198 199l353 -353l353 353z" />
+<glyph unicode="&#xe115;" d="M404 1000h746q21 0 35.5 -14.5t14.5 -35.5v-551h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v401h-381zM135 984l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-400h385l215 -200h-750q-21 0 -35.5 14.5 t-14.5 35.5v550h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
+<glyph unicode="&#xe116;" d="M56 1200h94q17 0 31 -11t18 -27l38 -162h896q24 0 39 -18.5t10 -42.5l-100 -475q-5 -21 -27 -42.5t-55 -21.5h-633l48 -200h535q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-50q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-300v-50 q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-31q-18 0 -32.5 10t-20.5 19l-5 10l-201 961h-54q-20 0 -35 14.5t-15 35.5t15 35.5t35 14.5z" />
+<glyph unicode="&#xe117;" d="M1200 1000v-100h-1200v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500zM0 800h1200v-800h-1200v800z" />
+<glyph unicode="&#xe118;" d="M200 800l-200 -400v600h200q0 41 29.5 70.5t70.5 29.5h300q42 0 71 -29.5t29 -70.5h500v-200h-1000zM1500 700l-300 -700h-1200l300 700h1200z" />
+<glyph unicode="&#xe119;" d="M635 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-601h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v601h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
+<glyph unicode="&#xe120;" d="M936 864l249 -229q14 -15 14 -35.5t-14 -35.5l-249 -229q-15 -15 -25.5 -10.5t-10.5 24.5v151h-600v-151q0 -20 -10.5 -24.5t-25.5 10.5l-249 229q-14 15 -14 35.5t14 35.5l249 229q15 15 25.5 10.5t10.5 -25.5v-149h600v149q0 21 10.5 25.5t25.5 -10.5z" />
+<glyph unicode="&#xe121;" d="M1169 400l-172 732q-5 23 -23 45.5t-38 22.5h-672q-20 0 -38 -20t-23 -41l-172 -739h1138zM1100 300h-1000q-41 0 -70.5 -29.5t-29.5 -70.5v-100q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v100q0 41 -29.5 70.5t-70.5 29.5zM800 100v100h100v-100h-100 zM1000 100v100h100v-100h-100z" />
+<glyph unicode="&#xe122;" d="M1150 1100q21 0 35.5 -14.5t14.5 -35.5v-850q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v850q0 21 14.5 35.5t35.5 14.5zM1000 200l-675 200h-38l47 -276q3 -16 -5.5 -20t-29.5 -4h-7h-84q-20 0 -34.5 14t-18.5 35q-55 337 -55 351v250v6q0 16 1 23.5t6.5 14 t17.5 6.5h200l675 250v-850zM0 750v-250q-4 0 -11 0.5t-24 6t-30 15t-24 30t-11 48.5v50q0 26 10.5 46t25 30t29 16t25.5 7z" />
+<glyph unicode="&#xe123;" d="M553 1200h94q20 0 29 -10.5t3 -29.5l-18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q19 0 33 -14.5t14 -35t-13 -40.5t-31 -27q-8 -4 -23 -9.5t-65 -19.5t-103 -25t-132.5 -20t-158.5 -9q-57 0 -115 5t-104 12t-88.5 15.5t-73.5 17.5t-54.5 16t-35.5 12l-11 4 q-18 8 -31 28t-13 40.5t14 35t33 14.5h17l118 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3.5 32t28.5 13zM498 110q50 -6 102 -6q53 0 102 6q-12 -49 -39.5 -79.5t-62.5 -30.5t-63 30.5t-39 79.5z" />
+<glyph unicode="&#xe124;" d="M800 946l224 78l-78 -224l234 -45l-180 -155l180 -155l-234 -45l78 -224l-224 78l-45 -234l-155 180l-155 -180l-45 234l-224 -78l78 224l-234 45l180 155l-180 155l234 45l-78 224l224 -78l45 234l155 -180l155 180z" />
+<glyph unicode="&#xe125;" d="M650 1200h50q40 0 70 -40.5t30 -84.5v-150l-28 -125h328q40 0 70 -40.5t30 -84.5v-100q0 -45 -29 -74l-238 -344q-16 -24 -38 -40.5t-45 -16.5h-250q-7 0 -42 25t-66 50l-31 25h-61q-45 0 -72.5 18t-27.5 57v400q0 36 20 63l145 196l96 198q13 28 37.5 48t51.5 20z M650 1100l-100 -212l-150 -213v-375h100l136 -100h214l250 375v125h-450l50 225v175h-50zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe126;" d="M600 1100h250q23 0 45 -16.5t38 -40.5l238 -344q29 -29 29 -74v-100q0 -44 -30 -84.5t-70 -40.5h-328q28 -118 28 -125v-150q0 -44 -30 -84.5t-70 -40.5h-50q-27 0 -51.5 20t-37.5 48l-96 198l-145 196q-20 27 -20 63v400q0 39 27.5 57t72.5 18h61q124 100 139 100z M50 1000h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM636 1000l-136 -100h-100v-375l150 -213l100 -212h50v175l-50 225h450v125l-250 375h-214z" />
+<glyph unicode="&#xe127;" d="M356 873l363 230q31 16 53 -6l110 -112q13 -13 13.5 -32t-11.5 -34l-84 -121h302q84 0 138 -38t54 -110t-55 -111t-139 -39h-106l-131 -339q-6 -21 -19.5 -41t-28.5 -20h-342q-7 0 -90 81t-83 94v525q0 17 14 35.5t28 28.5zM400 792v-503l100 -89h293l131 339 q6 21 19.5 41t28.5 20h203q21 0 30.5 25t0.5 50t-31 25h-456h-7h-6h-5.5t-6 0.5t-5 1.5t-5 2t-4 2.5t-4 4t-2.5 4.5q-12 25 5 47l146 183l-86 83zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500 q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe128;" d="M475 1103l366 -230q2 -1 6 -3.5t14 -10.5t18 -16.5t14.5 -20t6.5 -22.5v-525q0 -13 -86 -94t-93 -81h-342q-15 0 -28.5 20t-19.5 41l-131 339h-106q-85 0 -139.5 39t-54.5 111t54 110t138 38h302l-85 121q-11 15 -10.5 34t13.5 32l110 112q22 22 53 6zM370 945l146 -183 q17 -22 5 -47q-2 -2 -3.5 -4.5t-4 -4t-4 -2.5t-5 -2t-5 -1.5t-6 -0.5h-6h-6.5h-6h-475v-100h221q15 0 29 -20t20 -41l130 -339h294l106 89v503l-342 236zM1050 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5 v500q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe129;" d="M550 1294q72 0 111 -55t39 -139v-106l339 -131q21 -6 41 -19.5t20 -28.5v-342q0 -7 -81 -90t-94 -83h-525q-17 0 -35.5 14t-28.5 28l-9 14l-230 363q-16 31 6 53l112 110q13 13 32 13.5t34 -11.5l121 -84v302q0 84 38 138t110 54zM600 972v203q0 21 -25 30.5t-50 0.5 t-25 -31v-456v-7v-6v-5.5t-0.5 -6t-1.5 -5t-2 -5t-2.5 -4t-4 -4t-4.5 -2.5q-25 -12 -47 5l-183 146l-83 -86l236 -339h503l89 100v293l-339 131q-21 6 -41 19.5t-20 28.5zM450 200h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe130;" d="M350 1100h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5zM600 306v-106q0 -84 -39 -139t-111 -55t-110 54t-38 138v302l-121 -84q-15 -12 -34 -11.5t-32 13.5l-112 110 q-22 22 -6 53l230 363q1 2 3.5 6t10.5 13.5t16.5 17t20 13.5t22.5 6h525q13 0 94 -83t81 -90v-342q0 -15 -20 -28.5t-41 -19.5zM308 900l-236 -339l83 -86l183 146q22 17 47 5q2 -1 4.5 -2.5t4 -4t2.5 -4t2 -5t1.5 -5t0.5 -6v-5.5v-6v-7v-456q0 -22 25 -31t50 0.5t25 30.5 v203q0 15 20 28.5t41 19.5l339 131v293l-89 100h-503z" />
+<glyph unicode="&#xe131;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM914 632l-275 223q-16 13 -27.5 8t-11.5 -26v-137h-275 q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h275v-137q0 -21 11.5 -26t27.5 8l275 223q16 13 16 32t-16 32z" />
+<glyph unicode="&#xe132;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM561 855l-275 -223q-16 -13 -16 -32t16 -32l275 -223q16 -13 27.5 -8 t11.5 26v137h275q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5h-275v137q0 21 -11.5 26t-27.5 -8z" />
+<glyph unicode="&#xe133;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM855 639l-223 275q-13 16 -32 16t-32 -16l-223 -275q-13 -16 -8 -27.5 t26 -11.5h137v-275q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v275h137q21 0 26 11.5t-8 27.5z" />
+<glyph unicode="&#xe134;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM675 900h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-275h-137q-21 0 -26 -11.5 t8 -27.5l223 -275q13 -16 32 -16t32 16l223 275q13 16 8 27.5t-26 11.5h-137v275q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="&#xe135;" d="M600 1176q116 0 222.5 -46t184 -123.5t123.5 -184t46 -222.5t-46 -222.5t-123.5 -184t-184 -123.5t-222.5 -46t-222.5 46t-184 123.5t-123.5 184t-46 222.5t46 222.5t123.5 184t184 123.5t222.5 46zM627 1101q-15 -12 -36.5 -20.5t-35.5 -12t-43 -8t-39 -6.5 q-15 -3 -45.5 0t-45.5 -2q-20 -7 -51.5 -26.5t-34.5 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -91t-29.5 -79q-9 -34 5 -93t8 -87q0 -9 17 -44.5t16 -59.5q12 0 23 -5t23.5 -15t19.5 -14q16 -8 33 -15t40.5 -15t34.5 -12q21 -9 52.5 -32t60 -38t57.5 -11 q7 -15 -3 -34t-22.5 -40t-9.5 -38q13 -21 23 -34.5t27.5 -27.5t36.5 -18q0 -7 -3.5 -16t-3.5 -14t5 -17q104 -2 221 112q30 29 46.5 47t34.5 49t21 63q-13 8 -37 8.5t-36 7.5q-15 7 -49.5 15t-51.5 19q-18 0 -41 -0.5t-43 -1.5t-42 -6.5t-38 -16.5q-51 -35 -66 -12 q-4 1 -3.5 25.5t0.5 25.5q-6 13 -26.5 17.5t-24.5 6.5q1 15 -0.5 30.5t-7 28t-18.5 11.5t-31 -21q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q7 -12 18 -24t21.5 -20.5t20 -15t15.5 -10.5l5 -3q2 12 7.5 30.5t8 34.5t-0.5 32q-3 18 3.5 29 t18 22.5t15.5 24.5q6 14 10.5 35t8 31t15.5 22.5t34 22.5q-6 18 10 36q8 0 24 -1.5t24.5 -1.5t20 4.5t20.5 15.5q-10 23 -31 42.5t-37.5 29.5t-49 27t-43.5 23q0 1 2 8t3 11.5t1.5 10.5t-1 9.5t-4.5 4.5q31 -13 58.5 -14.5t38.5 2.5l12 5q5 28 -9.5 46t-36.5 24t-50 15 t-41 20q-18 -4 -37 0zM613 994q0 -17 8 -42t17 -45t9 -23q-8 1 -39.5 5.5t-52.5 10t-37 16.5q3 11 16 29.5t16 25.5q10 -10 19 -10t14 6t13.5 14.5t16.5 12.5z" />
+<glyph unicode="&#xe136;" d="M756 1157q164 92 306 -9l-259 -138l145 -232l251 126q6 -89 -34 -156.5t-117 -110.5q-60 -34 -127 -39.5t-126 16.5l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5t15 37.5l600 599q-34 101 5.5 201.5t135.5 154.5z" />
+<glyph unicode="&#xe137;" horiz-adv-x="1220" d="M100 1196h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 1096h-200v-100h200v100zM100 796h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 696h-500v-100h500v100zM100 396h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 296h-300v-100h300v100z " />
+<glyph unicode="&#xe138;" d="M150 1200h900q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM700 500v-300l-200 -200v500l-350 500h900z" />
+<glyph unicode="&#xe139;" d="M500 1200h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5zM500 1100v-100h200v100h-200zM1200 400v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v200h1200z" />
+<glyph unicode="&#xe140;" d="M50 1200h300q21 0 25 -10.5t-10 -24.5l-94 -94l199 -199q7 -8 7 -18t-7 -18l-106 -106q-8 -7 -18 -7t-18 7l-199 199l-94 -94q-14 -14 -24.5 -10t-10.5 25v300q0 21 14.5 35.5t35.5 14.5zM850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-199 -199q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l199 199l-94 94q-14 14 -10 24.5t25 10.5zM364 470l106 -106q7 -8 7 -18t-7 -18l-199 -199l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l199 199 q8 7 18 7t18 -7zM1071 271l94 94q14 14 24.5 10t10.5 -25v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -25 10.5t10 24.5l94 94l-199 199q-7 8 -7 18t7 18l106 106q8 7 18 7t18 -7z" />
+<glyph unicode="&#xe141;" d="M596 1192q121 0 231.5 -47.5t190 -127t127 -190t47.5 -231.5t-47.5 -231.5t-127 -190.5t-190 -127t-231.5 -47t-231.5 47t-190.5 127t-127 190.5t-47 231.5t47 231.5t127 190t190.5 127t231.5 47.5zM596 1010q-112 0 -207.5 -55.5t-151 -151t-55.5 -207.5t55.5 -207.5 t151 -151t207.5 -55.5t207.5 55.5t151 151t55.5 207.5t-55.5 207.5t-151 151t-207.5 55.5zM454.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38.5 -16.5t-38.5 16.5t-16 39t16 38.5t38.5 16zM754.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38 -16.5q-14 0 -29 10l-55 -145 q17 -23 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5q0 32 20.5 56.5t51.5 29.5l122 126l1 1q-9 14 -9 28q0 23 16 39t38.5 16zM345.5 709q22.5 0 38.5 -16t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16zM854.5 709q22.5 0 38.5 -16 t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16z" />
+<glyph unicode="&#xe142;" d="M546 173l469 470q91 91 99 192q7 98 -52 175.5t-154 94.5q-22 4 -47 4q-34 0 -66.5 -10t-56.5 -23t-55.5 -38t-48 -41.5t-48.5 -47.5q-376 -375 -391 -390q-30 -27 -45 -41.5t-37.5 -41t-32 -46.5t-16 -47.5t-1.5 -56.5q9 -62 53.5 -95t99.5 -33q74 0 125 51l548 548 q36 36 20 75q-7 16 -21.5 26t-32.5 10q-26 0 -50 -23q-13 -12 -39 -38l-341 -338q-15 -15 -35.5 -15.5t-34.5 13.5t-14 34.5t14 34.5q327 333 361 367q35 35 67.5 51.5t78.5 16.5q14 0 29 -1q44 -8 74.5 -35.5t43.5 -68.5q14 -47 2 -96.5t-47 -84.5q-12 -11 -32 -32 t-79.5 -81t-114.5 -115t-124.5 -123.5t-123 -119.5t-96.5 -89t-57 -45q-56 -27 -120 -27q-70 0 -129 32t-93 89q-48 78 -35 173t81 163l511 511q71 72 111 96q91 55 198 55q80 0 152 -33q78 -36 129.5 -103t66.5 -154q17 -93 -11 -183.5t-94 -156.5l-482 -476 q-15 -15 -36 -16t-37 14t-17.5 34t14.5 35z" />
+<glyph unicode="&#xe143;" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104zM896 972q-33 0 -64.5 -19t-56.5 -46t-47.5 -53.5t-43.5 -45.5t-37.5 -19t-36 19t-40 45.5t-43 53.5t-54 46t-65.5 19q-67 0 -122.5 -55.5t-55.5 -132.5q0 -23 13.5 -51t46 -65t57.5 -63t76 -75l22 -22q15 -14 44 -44t50.5 -51t46 -44t41 -35t23 -12 t23.5 12t42.5 36t46 44t52.5 52t44 43q4 4 12 13q43 41 63.5 62t52 55t46 55t26 46t11.5 44q0 79 -53 133.5t-120 54.5z" />
+<glyph unicode="&#xe144;" d="M776.5 1214q93.5 0 159.5 -66l141 -141q66 -66 66 -160q0 -42 -28 -95.5t-62 -87.5l-29 -29q-31 53 -77 99l-18 18l95 95l-247 248l-389 -389l212 -212l-105 -106l-19 18l-141 141q-66 66 -66 159t66 159l283 283q65 66 158.5 66zM600 706l105 105q10 -8 19 -17l141 -141 q66 -66 66 -159t-66 -159l-283 -283q-66 -66 -159 -66t-159 66l-141 141q-66 66 -66 159.5t66 159.5l55 55q29 -55 75 -102l18 -17l-95 -95l247 -248l389 389z" />
+<glyph unicode="&#xe145;" d="M603 1200q85 0 162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5v953q0 21 30 46.5t81 48t129 37.5t163 15zM300 1000v-700h600v700h-600zM600 254q-43 0 -73.5 -30.5t-30.5 -73.5t30.5 -73.5t73.5 -30.5t73.5 30.5 t30.5 73.5t-30.5 73.5t-73.5 30.5z" />
+<glyph unicode="&#xe146;" d="M902 1185l283 -282q15 -15 15 -36t-14.5 -35.5t-35.5 -14.5t-35 15l-36 35l-279 -267v-300l-212 210l-308 -307l-280 -203l203 280l307 308l-210 212h300l267 279l-35 36q-15 14 -15 35t14.5 35.5t35.5 14.5t35 -15z" />
+<glyph unicode="&#xe148;" d="M700 1248v-78q38 -5 72.5 -14.5t75.5 -31.5t71 -53.5t52 -84t24 -118.5h-159q-4 36 -10.5 59t-21 45t-40 35.5t-64.5 20.5v-307l64 -13q34 -7 64 -16.5t70 -32t67.5 -52.5t47.5 -80t20 -112q0 -139 -89 -224t-244 -97v-77h-100v79q-150 16 -237 103q-40 40 -52.5 93.5 t-15.5 139.5h139q5 -77 48.5 -126t117.5 -65v335l-27 8q-46 14 -79 26.5t-72 36t-63 52t-40 72.5t-16 98q0 70 25 126t67.5 92t94.5 57t110 27v77h100zM600 754v274q-29 -4 -50 -11t-42 -21.5t-31.5 -41.5t-10.5 -65q0 -29 7 -50.5t16.5 -34t28.5 -22.5t31.5 -14t37.5 -10 q9 -3 13 -4zM700 547v-310q22 2 42.5 6.5t45 15.5t41.5 27t29 42t12 59.5t-12.5 59.5t-38 44.5t-53 31t-66.5 24.5z" />
+<glyph unicode="&#xe149;" d="M561 1197q84 0 160.5 -40t123.5 -109.5t47 -147.5h-153q0 40 -19.5 71.5t-49.5 48.5t-59.5 26t-55.5 9q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -26 13.5 -63t26.5 -61t37 -66q6 -9 9 -14h241v-100h-197q8 -50 -2.5 -115t-31.5 -95q-45 -62 -99 -112 q34 10 83 17.5t71 7.5q32 1 102 -16t104 -17q83 0 136 30l50 -147q-31 -19 -58 -30.5t-55 -15.5t-42 -4.5t-46 -0.5q-23 0 -76 17t-111 32.5t-96 11.5q-39 -3 -82 -16t-67 -25l-23 -11l-55 145q4 3 16 11t15.5 10.5t13 9t15.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221v100h166q-23 47 -44 104q-7 20 -12 41.5t-6 55.5t6 66.5t29.5 70.5t58.5 71q97 88 263 88z" />
+<glyph unicode="&#xe150;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM935 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-900h-200v900h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
+<glyph unicode="&#xe151;" d="M1000 700h-100v100h-100v-100h-100v500h300v-500zM400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM801 1100v-200h100v200h-100zM1000 350l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150z " />
+<glyph unicode="&#xe152;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 1050l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150zM1000 0h-100v100h-100v-100h-100v500h300v-500zM801 400v-200h100v200h-100z " />
+<glyph unicode="&#xe153;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 700h-100v400h-100v100h200v-500zM1100 0h-100v100h-200v400h300v-500zM901 400v-200h100v200h-100z" />
+<glyph unicode="&#xe154;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1100 700h-100v100h-200v400h300v-500zM901 1100v-200h100v200h-100zM1000 0h-100v400h-100v100h200v-500z" />
+<glyph unicode="&#xe155;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM900 1000h-200v200h200v-200zM1000 700h-300v200h300v-200zM1100 400h-400v200h400v-200zM1200 100h-500v200h500v-200z" />
+<glyph unicode="&#xe156;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1200 1000h-500v200h500v-200zM1100 700h-400v200h400v-200zM1000 400h-300v200h300v-200zM900 100h-200v200h200v-200z" />
+<glyph unicode="&#xe157;" d="M350 1100h400q162 0 256 -93.5t94 -256.5v-400q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5z" />
+<glyph unicode="&#xe158;" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-163 0 -256.5 92.5t-93.5 257.5v400q0 163 94 256.5t256 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM440 770l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
+<glyph unicode="&#xe159;" d="M350 1100h400q163 0 256.5 -94t93.5 -256v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 163 92.5 256.5t257.5 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM350 700h400q21 0 26.5 -12t-6.5 -28l-190 -253q-12 -17 -30 -17t-30 17l-190 253q-12 16 -6.5 28t26.5 12z" />
+<glyph unicode="&#xe160;" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -163 -92.5 -256.5t-257.5 -93.5h-400q-163 0 -256.5 94t-93.5 256v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM580 693l190 -253q12 -16 6.5 -28t-26.5 -12h-400q-21 0 -26.5 12t6.5 28l190 253q12 17 30 17t30 -17z" />
+<glyph unicode="&#xe161;" d="M550 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h450q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-450q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM338 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
+<glyph unicode="&#xe162;" d="M793 1182l9 -9q8 -10 5 -27q-3 -11 -79 -225.5t-78 -221.5l300 1q24 0 32.5 -17.5t-5.5 -35.5q-1 0 -133.5 -155t-267 -312.5t-138.5 -162.5q-12 -15 -26 -15h-9l-9 8q-9 11 -4 32q2 9 42 123.5t79 224.5l39 110h-302q-23 0 -31 19q-10 21 6 41q75 86 209.5 237.5 t228 257t98.5 111.5q9 16 25 16h9z" />
+<glyph unicode="&#xe163;" d="M350 1100h400q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-450q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h450q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400 q0 165 92.5 257.5t257.5 92.5zM938 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
+<glyph unicode="&#xe164;" d="M750 1200h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -10.5 -25t-24.5 10l-109 109l-312 -312q-15 -15 -35.5 -15t-35.5 15l-141 141q-15 15 -15 35.5t15 35.5l312 312l-109 109q-14 14 -10 24.5t25 10.5zM456 900h-156q-41 0 -70.5 -29.5t-29.5 -70.5v-500 q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v148l200 200v-298q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5h300z" />
+<glyph unicode="&#xe165;" d="M600 1186q119 0 227.5 -46.5t187 -125t125 -187t46.5 -227.5t-46.5 -227.5t-125 -187t-187 -125t-227.5 -46.5t-227.5 46.5t-187 125t-125 187t-46.5 227.5t46.5 227.5t125 187t187 125t227.5 46.5zM600 1022q-115 0 -212 -56.5t-153.5 -153.5t-56.5 -212t56.5 -212 t153.5 -153.5t212 -56.5t212 56.5t153.5 153.5t56.5 212t-56.5 212t-153.5 153.5t-212 56.5zM600 794q80 0 137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137t57 137t137 57z" />
+<glyph unicode="&#xe166;" d="M450 1200h200q21 0 35.5 -14.5t14.5 -35.5v-350h245q20 0 25 -11t-9 -26l-383 -426q-14 -15 -33.5 -15t-32.5 15l-379 426q-13 15 -8.5 26t25.5 11h250v350q0 21 14.5 35.5t35.5 14.5zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
+<glyph unicode="&#xe167;" d="M583 1182l378 -435q14 -15 9 -31t-26 -16h-244v-250q0 -20 -17 -35t-39 -15h-200q-20 0 -32 14.5t-12 35.5v250h-250q-20 0 -25.5 16.5t8.5 31.5l383 431q14 16 33.5 17t33.5 -14zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
+<glyph unicode="&#xe168;" d="M396 723l369 369q7 7 17.5 7t17.5 -7l139 -139q7 -8 7 -18.5t-7 -17.5l-525 -525q-7 -8 -17.5 -8t-17.5 8l-292 291q-7 8 -7 18t7 18l139 139q8 7 18.5 7t17.5 -7zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50 h-100z" />
+<glyph unicode="&#xe169;" d="M135 1023l142 142q14 14 35 14t35 -14l77 -77l-212 -212l-77 76q-14 15 -14 36t14 35zM655 855l210 210q14 14 24.5 10t10.5 -25l-2 -599q-1 -20 -15.5 -35t-35.5 -15l-597 -1q-21 0 -25 10.5t10 24.5l208 208l-154 155l212 212zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5 v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
+<glyph unicode="&#xe170;" d="M350 1200l599 -2q20 -1 35 -15.5t15 -35.5l1 -597q0 -21 -10.5 -25t-24.5 10l-208 208l-155 -154l-212 212l155 154l-210 210q-14 14 -10 24.5t25 10.5zM524 512l-76 -77q-15 -14 -36 -14t-35 14l-142 142q-14 14 -14 35t14 35l77 77zM50 300h1000q21 0 35.5 -14.5 t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
+<glyph unicode="&#xe171;" d="M1200 103l-483 276l-314 -399v423h-399l1196 796v-1096zM483 424v-230l683 953z" />
+<glyph unicode="&#xe172;" d="M1100 1000v-850q0 -21 -14.5 -35.5t-35.5 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200z" />
+<glyph unicode="&#xe173;" d="M1100 1000l-2 -149l-299 -299l-95 95q-9 9 -21.5 9t-21.5 -9l-149 -147h-312v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1132 638l106 -106q7 -7 7 -17.5t-7 -17.5l-420 -421q-8 -7 -18 -7 t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l297 297q7 7 17.5 7t17.5 -7z" />
+<glyph unicode="&#xe174;" d="M1100 1000v-269l-103 -103l-134 134q-15 15 -33.5 16.5t-34.5 -12.5l-266 -266h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1202 572l70 -70q15 -15 15 -35.5t-15 -35.5l-131 -131 l131 -131q15 -15 15 -35.5t-15 -35.5l-70 -70q-15 -15 -35.5 -15t-35.5 15l-131 131l-131 -131q-15 -15 -35.5 -15t-35.5 15l-70 70q-15 15 -15 35.5t15 35.5l131 131l-131 131q-15 15 -15 35.5t15 35.5l70 70q15 15 35.5 15t35.5 -15l131 -131l131 131q15 15 35.5 15 t35.5 -15z" />
+<glyph unicode="&#xe175;" d="M1100 1000v-300h-350q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM850 600h100q21 0 35.5 -14.5t14.5 -35.5v-250h150q21 0 25 -10.5t-10 -24.5 l-230 -230q-14 -14 -35 -14t-35 14l-230 230q-14 14 -10 24.5t25 10.5h150v250q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe176;" d="M1100 1000v-400l-165 165q-14 15 -35 15t-35 -15l-263 -265h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM935 565l230 -229q14 -15 10 -25.5t-25 -10.5h-150v-250q0 -20 -14.5 -35 t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35v250h-150q-21 0 -25 10.5t10 25.5l230 229q14 15 35 15t35 -15z" />
+<glyph unicode="&#xe177;" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-150h-1200v150q0 21 14.5 35.5t35.5 14.5zM1200 800v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v550h1200zM100 500v-200h400v200h-400z" />
+<glyph unicode="&#xe178;" d="M935 1165l248 -230q14 -14 14 -35t-14 -35l-248 -230q-14 -14 -24.5 -10t-10.5 25v150h-400v200h400v150q0 21 10.5 25t24.5 -10zM200 800h-50q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v-200zM400 800h-100v200h100v-200zM18 435l247 230 q14 14 24.5 10t10.5 -25v-150h400v-200h-400v-150q0 -21 -10.5 -25t-24.5 10l-247 230q-15 14 -15 35t15 35zM900 300h-100v200h100v-200zM1000 500h51q20 0 34.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-34.5 -14.5h-51v200z" />
+<glyph unicode="&#xe179;" d="M862 1073l276 116q25 18 43.5 8t18.5 -41v-1106q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v397q-4 1 -11 5t-24 17.5t-30 29t-24 42t-11 56.5v359q0 31 18.5 65t43.5 52zM550 1200q22 0 34.5 -12.5t14.5 -24.5l1 -13v-450q0 -28 -10.5 -59.5 t-25 -56t-29 -45t-25.5 -31.5l-10 -11v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447q-4 4 -11 11.5t-24 30.5t-30 46t-24 55t-11 60v450q0 2 0.5 5.5t4 12t8.5 15t14.5 12t22.5 5.5q20 0 32.5 -12.5t14.5 -24.5l3 -13v-350h100v350v5.5t2.5 12 t7 15t15 12t25.5 5.5q23 0 35.5 -12.5t13.5 -24.5l1 -13v-350h100v350q0 2 0.5 5.5t3 12t7 15t15 12t24.5 5.5z" />
+<glyph unicode="&#xe180;" d="M1200 1100v-56q-4 0 -11 -0.5t-24 -3t-30 -7.5t-24 -15t-11 -24v-888q0 -22 25 -34.5t50 -13.5l25 -2v-56h-400v56q75 0 87.5 6.5t12.5 43.5v394h-500v-394q0 -37 12.5 -43.5t87.5 -6.5v-56h-400v56q4 0 11 0.5t24 3t30 7.5t24 15t11 24v888q0 22 -25 34.5t-50 13.5 l-25 2v56h400v-56q-75 0 -87.5 -6.5t-12.5 -43.5v-394h500v394q0 37 -12.5 43.5t-87.5 6.5v56h400z" />
+<glyph unicode="&#xe181;" d="M675 1000h375q21 0 35.5 -14.5t14.5 -35.5v-150h-105l-295 -98v98l-200 200h-400l100 100h375zM100 900h300q41 0 70.5 -29.5t29.5 -70.5v-500q0 -41 -29.5 -70.5t-70.5 -29.5h-300q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5zM100 800v-200h300v200 h-300zM1100 535l-400 -133v163l400 133v-163zM100 500v-200h300v200h-300zM1100 398v-248q0 -21 -14.5 -35.5t-35.5 -14.5h-375l-100 -100h-375l-100 100h400l200 200h105z" />
+<glyph unicode="&#xe182;" d="M17 1007l162 162q17 17 40 14t37 -22l139 -194q14 -20 11 -44.5t-20 -41.5l-119 -118q102 -142 228 -268t267 -227l119 118q17 17 42.5 19t44.5 -12l192 -136q19 -14 22.5 -37.5t-13.5 -40.5l-163 -162q-3 -1 -9.5 -1t-29.5 2t-47.5 6t-62.5 14.5t-77.5 26.5t-90 42.5 t-101.5 60t-111 83t-119 108.5q-74 74 -133.5 150.5t-94.5 138.5t-60 119.5t-34.5 100t-15 74.5t-4.5 48z" />
+<glyph unicode="&#xe183;" d="M600 1100q92 0 175 -10.5t141.5 -27t108.5 -36.5t81.5 -40t53.5 -37t31 -27l9 -10v-200q0 -21 -14.5 -33t-34.5 -9l-202 34q-20 3 -34.5 20t-14.5 38v146q-141 24 -300 24t-300 -24v-146q0 -21 -14.5 -38t-34.5 -20l-202 -34q-20 -3 -34.5 9t-14.5 33v200q3 4 9.5 10.5 t31 26t54 37.5t80.5 39.5t109 37.5t141 26.5t175 10.5zM600 795q56 0 97 -9.5t60 -23.5t30 -28t12 -24l1 -10v-50l365 -303q14 -15 24.5 -40t10.5 -45v-212q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v212q0 20 10.5 45t24.5 40l365 303v50 q0 4 1 10.5t12 23t30 29t60 22.5t97 10z" />
+<glyph unicode="&#xe184;" d="M1100 700l-200 -200h-600l-200 200v500h200v-200h200v200h200v-200h200v200h200v-500zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5 t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe185;" d="M700 1100h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-1000h300v1000q0 41 -29.5 70.5t-70.5 29.5zM1100 800h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-700h300v700q0 41 -29.5 70.5t-70.5 29.5zM400 0h-300v400q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-400z " />
+<glyph unicode="&#xe186;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
+<glyph unicode="&#xe187;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 300h-100v200h-100v-200h-100v500h100v-200h100v200h100v-500zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
+<glyph unicode="&#xe188;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-300h200v-100h-300v500h300v-100zM900 700h-200v-300h200v-100h-300v500h300v-100z" />
+<glyph unicode="&#xe189;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 400l-300 150l300 150v-300zM900 550l-300 -150v300z" />
+<glyph unicode="&#xe190;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM900 300h-700v500h700v-500zM800 700h-130q-38 0 -66.5 -43t-28.5 -108t27 -107t68 -42h130v300zM300 700v-300 h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130z" />
+<glyph unicode="&#xe191;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 300h-100v400h-100v100h200v-500z M700 300h-100v100h100v-100z" />
+<glyph unicode="&#xe192;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM300 700h200v-400h-300v500h100v-100zM900 300h-100v400h-100v100h200v-500zM300 600v-200h100v200h-100z M700 300h-100v100h100v-100z" />
+<glyph unicode="&#xe193;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 500l-199 -200h-100v50l199 200v150h-200v100h300v-300zM900 300h-100v400h-100v100h200v-500zM701 300h-100 v100h100v-100z" />
+<glyph unicode="&#xe194;" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700h-300v-200h300v-100h-300l-100 100v200l100 100h300v-100z" />
+<glyph unicode="&#xe195;" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700v-100l-50 -50l100 -100v-50h-100l-100 100h-150v-100h-100v400h300zM500 700v-100h200v100h-200z" />
+<glyph unicode="&#xe197;" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -207t-85 -207t-205 -86.5h-128v250q0 21 -14.5 35.5t-35.5 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-250h-222q-80 0 -136 57.5t-56 136.5q0 69 43 122.5t108 67.5q-2 19 -2 37q0 100 49 185 t134 134t185 49zM525 500h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -244q-13 -16 -32 -16t-32 16l-223 244q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe198;" d="M502 1089q110 0 201 -59.5t135 -156.5q43 15 89 15q121 0 206 -86.5t86 -206.5q0 -99 -60 -181t-150 -110l-378 360q-13 16 -31.5 16t-31.5 -16l-381 -365h-9q-79 0 -135.5 57.5t-56.5 136.5q0 69 43 122.5t108 67.5q-2 19 -2 38q0 100 49 184.5t133.5 134t184.5 49.5z M632 467l223 -228q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5q199 204 223 228q19 19 31.5 19t32.5 -19z" />
+<glyph unicode="&#xe199;" d="M700 100v100h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170l-270 -300h400v-100h-50q-21 0 -35.5 -14.5t-14.5 -35.5v-50h400v50q0 21 -14.5 35.5t-35.5 14.5h-50z" />
+<glyph unicode="&#xe200;" d="M600 1179q94 0 167.5 -56.5t99.5 -145.5q89 -6 150.5 -71.5t61.5 -155.5q0 -61 -29.5 -112.5t-79.5 -82.5q9 -29 9 -55q0 -74 -52.5 -126.5t-126.5 -52.5q-55 0 -100 30v-251q21 0 35.5 -14.5t14.5 -35.5v-50h-300v50q0 21 14.5 35.5t35.5 14.5v251q-45 -30 -100 -30 q-74 0 -126.5 52.5t-52.5 126.5q0 18 4 38q-47 21 -75.5 65t-28.5 97q0 74 52.5 126.5t126.5 52.5q5 0 23 -2q0 2 -1 10t-1 13q0 116 81.5 197.5t197.5 81.5z" />
+<glyph unicode="&#xe201;" d="M1010 1010q111 -111 150.5 -260.5t0 -299t-150.5 -260.5q-83 -83 -191.5 -126.5t-218.5 -43.5t-218.5 43.5t-191.5 126.5q-111 111 -150.5 260.5t0 299t150.5 260.5q83 83 191.5 126.5t218.5 43.5t218.5 -43.5t191.5 -126.5zM476 1065q-4 0 -8 -1q-121 -34 -209.5 -122.5 t-122.5 -209.5q-4 -12 2.5 -23t18.5 -14l36 -9q3 -1 7 -1q23 0 29 22q27 96 98 166q70 71 166 98q11 3 17.5 13.5t3.5 22.5l-9 35q-3 13 -14 19q-7 4 -15 4zM512 920q-4 0 -9 -2q-80 -24 -138.5 -82.5t-82.5 -138.5q-4 -13 2 -24t19 -14l34 -9q4 -1 8 -1q22 0 28 21 q18 58 58.5 98.5t97.5 58.5q12 3 18 13.5t3 21.5l-9 35q-3 12 -14 19q-7 4 -15 4zM719.5 719.5q-49.5 49.5 -119.5 49.5t-119.5 -49.5t-49.5 -119.5t49.5 -119.5t119.5 -49.5t119.5 49.5t49.5 119.5t-49.5 119.5zM855 551q-22 0 -28 -21q-18 -58 -58.5 -98.5t-98.5 -57.5 q-11 -4 -17 -14.5t-3 -21.5l9 -35q3 -12 14 -19q7 -4 15 -4q4 0 9 2q80 24 138.5 82.5t82.5 138.5q4 13 -2.5 24t-18.5 14l-34 9q-4 1 -8 1zM1000 515q-23 0 -29 -22q-27 -96 -98 -166q-70 -71 -166 -98q-11 -3 -17.5 -13.5t-3.5 -22.5l9 -35q3 -13 14 -19q7 -4 15 -4 q4 0 8 1q121 34 209.5 122.5t122.5 209.5q4 12 -2.5 23t-18.5 14l-36 9q-3 1 -7 1z" />
+<glyph unicode="&#xe202;" d="M700 800h300v-380h-180v200h-340v-200h-380v755q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM700 300h162l-212 -212l-212 212h162v200h100v-200zM520 0h-395q-10 0 -17.5 7.5t-7.5 17.5v395zM1000 220v-195q0 -10 -7.5 -17.5t-17.5 -7.5h-195z" />
+<glyph unicode="&#xe203;" d="M700 800h300v-520l-350 350l-550 -550v1095q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM862 200h-162v-200h-100v200h-162l212 212zM480 0h-355q-10 0 -17.5 7.5t-7.5 17.5v55h380v-80zM1000 80v-55q0 -10 -7.5 -17.5t-17.5 -7.5h-155v80h180z" />
+<glyph unicode="&#xe204;" d="M1162 800h-162v-200h100l100 -100h-300v300h-162l212 212zM200 800h200q27 0 40 -2t29.5 -10.5t23.5 -30t7 -57.5h300v-100h-600l-200 -350v450h100q0 36 7 57.5t23.5 30t29.5 10.5t40 2zM800 400h240l-240 -400h-800l300 500h500v-100z" />
+<glyph unicode="&#xe205;" d="M650 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM1000 850v150q41 0 70.5 -29.5t29.5 -70.5v-800 q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-1 0 -20 4l246 246l-326 326v324q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM412 250l-212 -212v162h-200v100h200v162z" />
+<glyph unicode="&#xe206;" d="M450 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM800 850v150q41 0 70.5 -29.5t29.5 -70.5v-500 h-200v-300h200q0 -36 -7 -57.5t-23.5 -30t-29.5 -10.5t-40 -2h-600q-41 0 -70.5 29.5t-29.5 70.5v800q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM1212 250l-212 -212v162h-200v100h200v162z" />
+<glyph unicode="&#xe209;" d="M658 1197l637 -1104q23 -38 7 -65.5t-60 -27.5h-1276q-44 0 -60 27.5t7 65.5l637 1104q22 39 54 39t54 -39zM704 800h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM500 300v-100h200 v100h-200z" />
+<glyph unicode="&#xe210;" d="M425 1100h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM825 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM25 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5zM425 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5 v150q0 10 7.5 17.5t17.5 7.5zM25 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe211;" d="M700 1200h100v-200h-100v-100h350q62 0 86.5 -39.5t-3.5 -94.5l-66 -132q-41 -83 -81 -134h-772q-40 51 -81 134l-66 132q-28 55 -3.5 94.5t86.5 39.5h350v100h-100v200h100v100h200v-100zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100 h-950l138 100h-13q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe212;" d="M600 1300q40 0 68.5 -29.5t28.5 -70.5h-194q0 41 28.5 70.5t68.5 29.5zM443 1100h314q18 -37 18 -75q0 -8 -3 -25h328q41 0 44.5 -16.5t-30.5 -38.5l-175 -145h-678l-178 145q-34 22 -29 38.5t46 16.5h328q-3 17 -3 25q0 38 18 75zM250 700h700q21 0 35.5 -14.5 t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-150v-200l275 -200h-950l275 200v200h-150q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe213;" d="M600 1181q75 0 128 -53t53 -128t-53 -128t-128 -53t-128 53t-53 128t53 128t128 53zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13 l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe214;" d="M600 1300q47 0 92.5 -53.5t71 -123t25.5 -123.5q0 -78 -55.5 -133.5t-133.5 -55.5t-133.5 55.5t-55.5 133.5q0 62 34 143l144 -143l111 111l-163 163q34 26 63 26zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45 zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe215;" d="M600 1200l300 -161v-139h-300q0 -57 18.5 -108t50 -91.5t63 -72t70 -67.5t57.5 -61h-530q-60 83 -90.5 177.5t-30.5 178.5t33 164.5t87.5 139.5t126 96.5t145.5 41.5v-98zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100 h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe216;" d="M600 1300q41 0 70.5 -29.5t29.5 -70.5v-78q46 -26 73 -72t27 -100v-50h-400v50q0 54 27 100t73 72v78q0 41 29.5 70.5t70.5 29.5zM400 800h400q54 0 100 -27t72 -73h-172v-100h200v-100h-200v-100h200v-100h-200v-100h200q0 -83 -58.5 -141.5t-141.5 -58.5h-400 q-83 0 -141.5 58.5t-58.5 141.5v400q0 83 58.5 141.5t141.5 58.5z" />
+<glyph unicode="&#xe218;" d="M150 1100h900q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM125 400h950q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-283l224 -224q13 -13 13 -31.5t-13 -32 t-31.5 -13.5t-31.5 13l-88 88h-524l-87 -88q-13 -13 -32 -13t-32 13.5t-13 32t13 31.5l224 224h-289q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM541 300l-100 -100h324l-100 100h-124z" />
+<glyph unicode="&#xe219;" d="M200 1100h800q83 0 141.5 -58.5t58.5 -141.5v-200h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100v200q0 83 58.5 141.5t141.5 58.5zM100 600h1000q41 0 70.5 -29.5 t29.5 -70.5v-300h-1200v300q0 41 29.5 70.5t70.5 29.5zM300 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200zM1100 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200z" />
+<glyph unicode="&#xe221;" d="M480 1165l682 -683q31 -31 31 -75.5t-31 -75.5l-131 -131h-481l-517 518q-32 31 -32 75.5t32 75.5l295 296q31 31 75.5 31t76.5 -31zM108 794l342 -342l303 304l-341 341zM250 100h800q21 0 35.5 -14.5t14.5 -35.5v-50h-900v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe223;" d="M1057 647l-189 506q-8 19 -27.5 33t-40.5 14h-400q-21 0 -40.5 -14t-27.5 -33l-189 -506q-8 -19 1.5 -33t30.5 -14h625v-150q0 -21 14.5 -35.5t35.5 -14.5t35.5 14.5t14.5 35.5v150h125q21 0 30.5 14t1.5 33zM897 0h-595v50q0 21 14.5 35.5t35.5 14.5h50v50 q0 21 14.5 35.5t35.5 14.5h48v300h200v-300h47q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-50z" />
+<glyph unicode="&#xe224;" d="M900 800h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-375v591l-300 300v84q0 10 7.5 17.5t17.5 7.5h375v-400zM1200 900h-200v200zM400 600h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-650q-10 0 -17.5 7.5t-7.5 17.5v950q0 10 7.5 17.5t17.5 7.5h375v-400zM700 700h-200v200z " />
+<glyph unicode="&#xe225;" d="M484 1095h195q75 0 146 -32.5t124 -86t89.5 -122.5t48.5 -142q18 -14 35 -20q31 -10 64.5 6.5t43.5 48.5q10 34 -15 71q-19 27 -9 43q5 8 12.5 11t19 -1t23.5 -16q41 -44 39 -105q-3 -63 -46 -106.5t-104 -43.5h-62q-7 -55 -35 -117t-56 -100l-39 -234q-3 -20 -20 -34.5 t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l12 70q-49 -14 -91 -14h-195q-24 0 -65 8l-11 -64q-3 -20 -20 -34.5t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l26 157q-84 74 -128 175l-159 53q-19 7 -33 26t-14 40v50q0 21 14.5 35.5t35.5 14.5h124q11 87 56 166l-111 95 q-16 14 -12.5 23.5t24.5 9.5h203q116 101 250 101zM675 1000h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h250q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="&#xe226;" d="M641 900l423 247q19 8 42 2.5t37 -21.5l32 -38q14 -15 12.5 -36t-17.5 -34l-139 -120h-390zM50 1100h106q67 0 103 -17t66 -71l102 -212h823q21 0 35.5 -14.5t14.5 -35.5v-50q0 -21 -14 -40t-33 -26l-737 -132q-23 -4 -40 6t-26 25q-42 67 -100 67h-300q-62 0 -106 44 t-44 106v200q0 62 44 106t106 44zM173 928h-80q-19 0 -28 -14t-9 -35v-56q0 -51 42 -51h134q16 0 21.5 8t5.5 24q0 11 -16 45t-27 51q-18 28 -43 28zM550 727q-32 0 -54.5 -22.5t-22.5 -54.5t22.5 -54.5t54.5 -22.5t54.5 22.5t22.5 54.5t-22.5 54.5t-54.5 22.5zM130 389 l152 130q18 19 34 24t31 -3.5t24.5 -17.5t25.5 -28q28 -35 50.5 -51t48.5 -13l63 5l48 -179q13 -61 -3.5 -97.5t-67.5 -79.5l-80 -69q-47 -40 -109 -35.5t-103 51.5l-130 151q-40 47 -35.5 109.5t51.5 102.5zM380 377l-102 -88q-31 -27 2 -65l37 -43q13 -15 27.5 -19.5 t31.5 6.5l61 53q19 16 14 49q-2 20 -12 56t-17 45q-11 12 -19 14t-23 -8z" />
+<glyph unicode="&#xe227;" d="M625 1200h150q10 0 17.5 -7.5t7.5 -17.5v-109q79 -33 131 -87.5t53 -128.5q1 -46 -15 -84.5t-39 -61t-46 -38t-39 -21.5l-17 -6q6 0 15 -1.5t35 -9t50 -17.5t53 -30t50 -45t35.5 -64t14.5 -84q0 -59 -11.5 -105.5t-28.5 -76.5t-44 -51t-49.5 -31.5t-54.5 -16t-49.5 -6.5 t-43.5 -1v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-100v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-175q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v600h-75q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5h175v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h100v75q0 10 7.5 17.5t17.5 7.5zM400 900v-200h263q28 0 48.5 10.5t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-263zM400 500v-200h363q28 0 48.5 10.5 t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-363z" />
+<glyph unicode="&#xe230;" d="M212 1198h780q86 0 147 -61t61 -147v-416q0 -51 -18 -142.5t-36 -157.5l-18 -66q-29 -87 -93.5 -146.5t-146.5 -59.5h-572q-82 0 -147 59t-93 147q-8 28 -20 73t-32 143.5t-20 149.5v416q0 86 61 147t147 61zM600 1045q-70 0 -132.5 -11.5t-105.5 -30.5t-78.5 -41.5 t-57 -45t-36 -41t-20.5 -30.5l-6 -12l156 -243h560l156 243q-2 5 -6 12.5t-20 29.5t-36.5 42t-57 44.5t-79 42t-105 29.5t-132.5 12zM762 703h-157l195 261z" />
+<glyph unicode="&#xe231;" d="M475 1300h150q103 0 189 -86t86 -189v-500q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
+<glyph unicode="&#xe232;" d="M475 1300h96q0 -150 89.5 -239.5t239.5 -89.5v-446q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
+<glyph unicode="&#xe233;" d="M1294 767l-638 -283l-378 170l-78 -60v-224l100 -150v-199l-150 148l-150 -149v200l100 150v250q0 4 -0.5 10.5t0 9.5t1 8t3 8t6.5 6l47 40l-147 65l642 283zM1000 380l-350 -166l-350 166v147l350 -165l350 165v-147z" />
+<glyph unicode="&#xe234;" d="M250 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM650 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM1050 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
+<glyph unicode="&#xe235;" d="M550 1100q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 700q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 300q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
+<glyph unicode="&#xe236;" d="M125 1100h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM125 700h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM125 300h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe237;" d="M350 1200h500q162 0 256 -93.5t94 -256.5v-500q0 -165 -93.5 -257.5t-256.5 -92.5h-500q-165 0 -257.5 92.5t-92.5 257.5v500q0 165 92.5 257.5t257.5 92.5zM900 1000h-600q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h600q41 0 70.5 29.5 t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5zM350 900h500q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-500q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 14.5 35.5t35.5 14.5zM400 800v-200h400v200h-400z" />
+<glyph unicode="&#xe238;" d="M150 1100h1000q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe239;" d="M650 1187q87 -67 118.5 -156t0 -178t-118.5 -155q-87 66 -118.5 155t0 178t118.5 156zM300 800q124 0 212 -88t88 -212q-124 0 -212 88t-88 212zM1000 800q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM300 500q124 0 212 -88t88 -212q-124 0 -212 88t-88 212z M1000 500q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM700 199v-144q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v142q40 -4 43 -4q17 0 57 6z" />
+<glyph unicode="&#xe240;" d="M745 878l69 19q25 6 45 -12l298 -295q11 -11 15 -26.5t-2 -30.5q-5 -14 -18 -23.5t-28 -9.5h-8q1 0 1 -13q0 -29 -2 -56t-8.5 -62t-20 -63t-33 -53t-51 -39t-72.5 -14h-146q-184 0 -184 288q0 24 10 47q-20 4 -62 4t-63 -4q11 -24 11 -47q0 -288 -184 -288h-142 q-48 0 -84.5 21t-56 51t-32 71.5t-16 75t-3.5 68.5q0 13 2 13h-7q-15 0 -27.5 9.5t-18.5 23.5q-6 15 -2 30.5t15 25.5l298 296q20 18 46 11l76 -19q20 -5 30.5 -22.5t5.5 -37.5t-22.5 -31t-37.5 -5l-51 12l-182 -193h891l-182 193l-44 -12q-20 -5 -37.5 6t-22.5 31t6 37.5 t31 22.5z" />
+<glyph unicode="&#xe241;" d="M1200 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM500 450h-25q0 15 -4 24.5t-9 14.5t-17 7.5t-20 3t-25 0.5h-100v-425q0 -11 12.5 -17.5t25.5 -7.5h12v-50h-200v50q50 0 50 25v425h-100q-17 0 -25 -0.5t-20 -3t-17 -7.5t-9 -14.5t-4 -24.5h-25v150h500v-150z" />
+<glyph unicode="&#xe242;" d="M1000 300v50q-25 0 -55 32q-14 14 -25 31t-16 27l-4 11l-289 747h-69l-300 -754q-18 -35 -39 -56q-9 -9 -24.5 -18.5t-26.5 -14.5l-11 -5v-50h273v50q-49 0 -78.5 21.5t-11.5 67.5l69 176h293l61 -166q13 -34 -3.5 -66.5t-55.5 -32.5v-50h312zM412 691l134 342l121 -342 h-255zM1100 150v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5z" />
+<glyph unicode="&#xe243;" d="M50 1200h1100q21 0 35.5 -14.5t14.5 -35.5v-1100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5zM611 1118h-70q-13 0 -18 -12l-299 -753q-17 -32 -35 -51q-18 -18 -56 -34q-12 -5 -12 -18v-50q0 -8 5.5 -14t14.5 -6 h273q8 0 14 6t6 14v50q0 8 -6 14t-14 6q-55 0 -71 23q-10 14 0 39l63 163h266l57 -153q11 -31 -6 -55q-12 -17 -36 -17q-8 0 -14 -6t-6 -14v-50q0 -8 6 -14t14 -6h313q8 0 14 6t6 14v50q0 7 -5.5 13t-13.5 7q-17 0 -42 25q-25 27 -40 63h-1l-288 748q-5 12 -19 12zM639 611 h-197l103 264z" />
+<glyph unicode="&#xe244;" d="M1200 1100h-1200v100h1200v-100zM50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 1000h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM700 900v-300h300v300h-300z" />
+<glyph unicode="&#xe245;" d="M50 1200h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 700h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM700 600v-300h300v300h-300zM1200 0h-1200v100h1200v-100z" />
+<glyph unicode="&#xe246;" d="M50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-350h100v150q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-150h100v-100h-100v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v150h-100v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM700 700v-300h300v300h-300z" />
+<glyph unicode="&#xe247;" d="M100 0h-100v1200h100v-1200zM250 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM300 1000v-300h300v300h-300zM250 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe248;" d="M600 1100h150q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-100h450q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h350v100h-150q-21 0 -35.5 14.5 t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h150v100h100v-100zM400 1000v-300h300v300h-300z" />
+<glyph unicode="&#xe249;" d="M1200 0h-100v1200h100v-1200zM550 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM600 1000v-300h300v300h-300zM50 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe250;" d="M865 565l-494 -494q-23 -23 -41 -23q-14 0 -22 13.5t-8 38.5v1000q0 25 8 38.5t22 13.5q18 0 41 -23l494 -494q14 -14 14 -35t-14 -35z" />
+<glyph unicode="&#xe251;" d="M335 635l494 494q29 29 50 20.5t21 -49.5v-1000q0 -41 -21 -49.5t-50 20.5l-494 494q-14 14 -14 35t14 35z" />
+<glyph unicode="&#xe252;" d="M100 900h1000q41 0 49.5 -21t-20.5 -50l-494 -494q-14 -14 -35 -14t-35 14l-494 494q-29 29 -20.5 50t49.5 21z" />
+<glyph unicode="&#xe253;" d="M635 865l494 -494q29 -29 20.5 -50t-49.5 -21h-1000q-41 0 -49.5 21t20.5 50l494 494q14 14 35 14t35 -14z" />
+<glyph unicode="&#xe254;" d="M700 741v-182l-692 -323v221l413 193l-413 193v221zM1200 0h-800v200h800v-200z" />
+<glyph unicode="&#xe255;" d="M1200 900h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300zM0 700h50q0 21 4 37t9.5 26.5t18 17.5t22 11t28.5 5.5t31 2t37 0.5h100v-550q0 -22 -25 -34.5t-50 -13.5l-25 -2v-100h400v100q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v550h100q25 0 37 -0.5t31 -2 t28.5 -5.5t22 -11t18 -17.5t9.5 -26.5t4 -37h50v300h-800v-300z" />
+<glyph unicode="&#xe256;" d="M800 700h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-100v-550q0 -22 25 -34.5t50 -14.5l25 -1v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v550h-100q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h800v-300zM1100 200h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300z" />
+<glyph unicode="&#xe257;" d="M701 1098h160q16 0 21 -11t-7 -23l-464 -464l464 -464q12 -12 7 -23t-21 -11h-160q-13 0 -23 9l-471 471q-7 8 -7 18t7 18l471 471q10 9 23 9z" />
+<glyph unicode="&#xe258;" d="M339 1098h160q13 0 23 -9l471 -471q7 -8 7 -18t-7 -18l-471 -471q-10 -9 -23 -9h-160q-16 0 -21 11t7 23l464 464l-464 464q-12 12 -7 23t21 11z" />
+<glyph unicode="&#xe259;" d="M1087 882q11 -5 11 -21v-160q0 -13 -9 -23l-471 -471q-8 -7 -18 -7t-18 7l-471 471q-9 10 -9 23v160q0 16 11 21t23 -7l464 -464l464 464q12 12 23 7z" />
+<glyph unicode="&#xe260;" d="M618 993l471 -471q9 -10 9 -23v-160q0 -16 -11 -21t-23 7l-464 464l-464 -464q-12 -12 -23 -7t-11 21v160q0 13 9 23l471 471q8 7 18 7t18 -7z" />
+<glyph unicode="&#xf8ff;" d="M1000 1200q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM450 1000h100q21 0 40 -14t26 -33l79 -194q5 1 16 3q34 6 54 9.5t60 7t65.5 1t61 -10t56.5 -23t42.5 -42t29 -64t5 -92t-19.5 -121.5q-1 -7 -3 -19.5t-11 -50t-20.5 -73t-32.5 -81.5t-46.5 -83t-64 -70 t-82.5 -50q-13 -5 -42 -5t-65.5 2.5t-47.5 2.5q-14 0 -49.5 -3.5t-63 -3.5t-43.5 7q-57 25 -104.5 78.5t-75 111.5t-46.5 112t-26 90l-7 35q-15 63 -18 115t4.5 88.5t26 64t39.5 43.5t52 25.5t58.5 13t62.5 2t59.5 -4.5t55.5 -8l-147 192q-12 18 -5.5 30t27.5 12z" />
+<glyph unicode="&#x1f511;" d="M250 1200h600q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-500l-255 -178q-19 -9 -32 -1t-13 29v650h-150q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM400 1100v-100h300v100h-300z" />
+<glyph unicode="&#x1f6aa;" d="M250 1200h750q39 0 69.5 -40.5t30.5 -84.5v-933l-700 -117v950l600 125h-700v-1000h-100v1025q0 23 15.5 49t34.5 26zM500 525v-100l100 20v100z" />
+</font>
+</defs></svg> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/fonts/glyphicons-halflings-regular.ttf b/common/src/main/webapp/thirdparty/fonts/glyphicons-halflings-regular.ttf
new file mode 100644
index 0000000..1413fc6
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/fonts/glyphicons-halflings-regular.ttf
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/fonts/glyphicons-halflings-regular.woff b/common/src/main/webapp/thirdparty/fonts/glyphicons-halflings-regular.woff
new file mode 100644
index 0000000..9e61285
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/fonts/glyphicons-halflings-regular.woff
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/fonts/glyphicons-halflings-regular.woff2 b/common/src/main/webapp/thirdparty/fonts/glyphicons-halflings-regular.woff2
new file mode 100644
index 0000000..64539b5
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/fonts/glyphicons-halflings-regular.woff2
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/bower.json b/common/src/main/webapp/thirdparty/icheck/bower.json
new file mode 100644
index 0000000..a2b8288
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/bower.json
@@ -0,0 +1,42 @@
+{
+ "name": "iCheck",
+ "version": "1.0.2",
+ "description": "Highly customizable checkboxes and radio buttons (jQuery & Zepto)",
+ "keywords": [
+ "icheck",
+ "checkbox",
+ "radio",
+ "input",
+ "field",
+ "form",
+ "custom",
+ "replacement",
+ "accessibility",
+ "skins",
+ "ui",
+ "checked",
+ "disabled",
+ "indeterminate"
+ ],
+ "main": [
+ "./icheck.min.js"
+ ],
+ "dependencies": {
+ "jquery": ">=1.7"
+ },
+ "ignore": [
+ ".gitignore",
+ "CHANGELOG.md",
+ "README.md",
+ "demo/"
+ ],
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Damir Sultanov",
+ "email": "info@fronteed.com",
+ "homepage": "http://fronteed.com/"
+ }
+ ],
+ "homepage": "http://fronteed.com/iCheck/"
+}
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/css/Thumbs.db b/common/src/main/webapp/thirdparty/icheck/demo/css/Thumbs.db
new file mode 100644
index 0000000..fd773ef
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/css/Thumbs.db
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/css/banner.jpg b/common/src/main/webapp/thirdparty/icheck/demo/css/banner.jpg
new file mode 100644
index 0000000..64b8f14
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/css/banner.jpg
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/css/custom.css b/common/src/main/webapp/thirdparty/icheck/demo/css/custom.css
new file mode 100644
index 0000000..e1ed3b1
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/css/custom.css
@@ -0,0 +1,261 @@
+@import url("normalize.css");
+@font-face{font-family:'MontserratRegular';src:url("./montserrat-regular.eot");src:url("./montserrat-regular.eot?#iefix") format('embedded-opentype'),url("./montserrat-regular.woff") format('woff'),url("./montserrat-regular.ttf") format('truetype'),url("./montserrat-regular.svg#MontserratRegular") format('svg');font-style:normal;font-weight:normal}
+@font-face{font-family:'MontserratBold';src:url("./montserrat-bold.eot");src:url("./montserrat-bold.eot?#iefix") format('embedded-opentype'),url("./montserrat-bold.woff") format('woff'),url("./montserrat-bold.ttf") format('truetype'),url("./montserrat-bold.svg#MontserratBold") format('svg');font-style:normal;font-weight:bold}
+html,body{height:100%}
+body{font:14px/20px 'MontserratRegular',Helvetica,Arial,sans-serif;color:#222;background:#ebe7df url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAFZCAIAAAA96mnzAAACKklEQVR4Xn2VUW7kMAxD+QLf/1x7gv71LNwdKTLhZFtggMCwSVEUPdb3159/v0uSrM8HtGRZuoQk1R69J12o9ixJWvSnVyfLdbNw0XAXWe1fIL8BoqmNGiV/cHc9Gq4NXxLKHhteRyLpA28cl0SLdx0BckSWL4gkPlIVTg1nN9Ys3iyWI5AGDA5xOXB5BJaWmOw6KSLeU6+0P50QshQyEL2im/YMIL60dTSZ3RXenlkiJpMj8XPMAl1FtjMRW19NxzOE5VGWPVGrc7aSJgz1Y9ku57mpYSwn1h0ivFOXxoCKMCXiahbbZNIZR+tkphllPsomipCwb4GMkXTmPfVg40Jt2y4RQM/PqX5JTM4iiTN8Zz1XvbIAEEvoEW+3nxTLL3lB7t7J3WwyI7g5OVxKIeFEH4FIGLC9I+XqvSd4AxJM5O6WTPr54RAxLG44FVrEuz+kFdXyLiuX6kLPVLZL2ISlcHNlBIKm5rR8nEi9wJeA6Y8JZlJOyDiin0K5ag+AXHtALBicXasjIUu9h0STBbCMU+89gMnu/J05MU1QWqdbPMRPIZIzDgsi8Olg5t7wHhUg/pv5RUzO+BHDmczHkAfZWxlSYgNI5Ig5XRoc66dW9L45eHDkbkqCO7RLG5cna/HD7YhZnfINkFo8iNyj5kx6pFrxNGRlfhV2e1Zt5DnGU8T7Tud1ivi8jU8/3Zy88pkn6+zdXiJ7AVSFBZA3VcwDfXtt5UUHS38B35hQVuJip4MAAAAASUVORK5CYII=") repeat-x;*background-image:url("ie/header-line.png")}
+a{color:#222;text-decoration:none;border-bottom:1px solid #bbb;}
+a:hover{color:#000}
+a,.self{-webkit-transition:color .1s;-moz-transition:color .1s;-ms-transition:color .1s;-o-transition:color .1s;transition:color .1s}
+.self{color:#333;border-bottom:1px dotted #aaa;cursor:pointer;}
+.self:hover{color:#000}
+strong{font-family:'MontserratBold',Helvetica,Arial,sans-serif;font-weight:700}
+p{margin:0 0 8px}
+label{cursor:pointer}
+h1,h2,h3,h4{margin:0;font:bold 20px/60px 'MontserratBold',Helvetica,Arial,sans-serif}
+h2{height:60px;text-align:center;text-transform:uppercase}
+h4{font-size:18px;line-height:24px}
+ul{margin:0;padding:0;list-style:none}
+table{width:100%;margin-bottom:21px}
+th,td{padding:11px 20px 12px;vertical-align:top;font-weight:normal;text-align:left;border-bottom:2px solid #e7e5e0;}
+thead th,thead td{background:#f3f2ef}
+th{white-space:nowrap}
+td{width:100%}
+.focus{outline:1px dotted rgba(0,0,0,0.5) !important}
+.clear{position:relative;*zoom:1;}
+.clear:before,.clear:after{content:'';display:table;clear:both}
+.layout{width:930px;margin:0 auto;padding:0 15px}
+.header{padding:115px 0 73px;color:#fff;text-align:center;}
+.header h1,.header strong{letter-spacing:-1px;text-transform:uppercase}
+.header h1{padding-bottom:23px;font-size:22px;line-height:28px}
+.header h3{position:relative;padding:35px 0 17px;font-size:120px;line-height:140px;letter-spacing:-5px;}
+.header h3 span{font-size:30px;line-height:40px;letter-spacing:0;margin-left:-10px;vertical-align:baseline;}
+.header h3:before{content:'';display:inline-block;width:72px;height:64px;margin-right:32px;vertical-align:middle;background:url("icheck.png")}
+.header h3:after{content:'';position:absolute;top:0;left:50%;width:100px;margin-left:-50px;border-top:3px solid #fff}
+.header strong{font:24px/30px 'MontserratRegular',Helvetica,Arial,sans-serif;}
+.header strong a{color:#fff;border-bottom-color:#fff}
+.features{position:relative;font-size:16px;color:#555;background:#fff;}
+.features .self{color:#555;border-bottom-color:#bbb;}
+.features .self:hover{color:#222}
+.features .arrows{top:0}
+.features:hover .arrows .bottom{left:0}
+.features h2{color:#fff;background:#2489c5}
+.features ul{padding:44px 60px 36px}
+.features li{padding:0 0 9px 36px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABI0lEQVR4XpXSP0vDUBjF4ZtLkIr4EYzduogdXJTWWV2FLMVNoQrdAhlUUFAEcejo1q13svgFBAUdxA/g30kcdQoIIlL9DWcKuZEeeOCl99w3gTSI49h4MoFb/KCJz6KShS/rOh/TbEZZECLBiSQIR1nQQgAnAVr/LZjEnIq76OJbutjRGR26isUB3pDhBikucWoUzVdI1cl05zBk2MI5jvCKIfL5QluzxTS20bY6WENdl0ujTl13Ni3DABtwWEFp1HG6M7Aq9NHBGRbgy7w6HfTzX6GHCyyXPV2dnu9/MIUX+PIMOkRsbq7hHkZmxciDOrZoQRUVPCGCw504RDobR7VoQQ0f2Mejls1IRb/t4R10CcLc6/2igSVcw8gqFnEMOnSVPxQqQaPw2y7fAAAAAElFTkSuQmCC") 0 1px no-repeat;*background-image:url("ie/icon-star.png");}
+.features li.offset{margin-top:20px}
+.mark{padding:0 2px;color:#777;background:#e7e5e0;}
+.skin-polaris .mark{background:#232830}
+.skin-futurico .mark{background:#25262a}
+.social{height:60px;margin-bottom:60px;padding:0 60px;font-size:16px;color:#555;background:#f5f3ef;}
+.social a{color:#777;border-bottom-color:#ccc;}
+.social a:hover{color:#444}
+.social .left{float:left;padding-top:19px;}
+.social .left li{float:left;padding-right:30px;}
+.social .left li a{position:relative}
+.social .right{float:right;padding-top:20px;}
+.social .right li{float:right;padding-left:10px}
+.social .right.local{padding-top:19px;}
+.social .right.local li{padding-left:30px;font-size:14px}
+.demo-holder{margin-bottom:97px}
+.demo-title{padding-bottom:36px;font-size:26px;letter-spacing:-1px}
+.demo{position:relative;}
+.demo:hover .arrows .top,.demo:hover .arrows .bottom{left:0}
+.demo-list{position:relative;margin-right:360px;padding:33px 57px 17px;color:#555;background:#fff;border:3px solid #ddd8ce;}
+.demo-list ul{float:right;white-space:nowrap;}
+.demo-list ul:first-child{float:left}
+.demo-list ul li{position:relative;padding:0 0 18px 42px}
+.demo-list ul input{position:absolute;top:4px;left:0}
+.demo-list ul .icheckbox_square-blue,.demo-list ul .iradio_square-blue{position:absolute;top:-1px;left:0}
+.demo-list ul span{color:#bbb}
+.demo-methods{padding:21px 360px 0 0;}
+.demo-methods .mark{background:#d3cfc6}
+.demo-methods dt{position:relative;padding:17px 150px 18px 0;font:16px/24px 'MontserratRegular',Helvetica,Arial,sans-serif;color:#444;border-bottom:3px solid #ddd8ce;}
+.demo-methods dt .self{cursor:pointer;}
+.demo-methods dt .self:hover{color:#222}
+.demo-methods dt .code{position:absolute;right:0;bottom:18px;color:#777;}
+.demo-methods dt .code .self:hover{color:#444}
+.demo-methods dd{position:relative;display:none;margin:0;background:#fff;border:3px solid #ddd8ce;border-top:none;}
+.demo-methods dd:before{content:'';position:absolute;top:-13px;left:0;width:0;height:0;border:5px solid transparent;border-bottom-color:#ddd8ce;border-left-color:#ddd8ce}
+.demo-methods dd .markup{margin:0;color:#888;background:#f5f3ef;border:none;}
+.demo-methods dd .markup .comment{color:#aaa}
+.demo-callbacks{position:absolute;top:0;right:0;bottom:0;width:300px;color:#aaa;background:#232323;border:3px solid #ddd8ce;}
+.demo-callbacks h2{color:#fff;background:#6a5a8c}
+.demo-callbacks ul{position:absolute;top:60px;width:100%;bottom:0;overflow:auto;}
+.demo-callbacks ul::-webkit-scrollbar{width:10px;background:none;}
+.demo-callbacks ul::-webkit-scrollbar-track{background:none;border:none;}
+.demo-callbacks ul::-webkit-scrollbar-track-piece:disabled{display:none !important;}
+.demo-callbacks ul::-webkit-scrollbar-thumb{background:rgba(255,255,255,.25);border:none;}
+.demo-callbacks ul::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.3);}
+.demo-callbacks ul li{margin-top:-1px;padding:13px 20px 15px;border-top:1px solid #2e2e2e;}
+.demo-callbacks ul li span{color:#888}
+.skins{position:relative;*zoom:1;}
+.skins h2{position:absolute;top:-38px;right:0;left:0;font-size:24px;text-align:center}
+.arrows{position:absolute;top:3px;left:-60px;width:60px;overflow:hidden;}
+.arrows .top,.arrows .bottom{position:relative;left:60px;width:60px;height:60px;cursor:pointer;-webkit-transition:left .3s,background-color .2s;-moz-transition:left .3s,background-color .2s;-ms-transition:left .3s,background-color .2s;-o-transition:left .3s,background-color .2s;transition:left .3s,background-color .2s}
+.arrows .top{background:#83b3be url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAALCAYAAACZIGYHAAAAdklEQVR4Xo3MuwmFQBiE0b0FmAuutnRBsAARLMTYRzvWItiEYLq/s6CYyMwGXzTDcWbG8mhEf/ZjQIV2ZCigjiASMAVJIAVKAQ4FKWBDJVoYpAB/7z8GRaAQgBNQG8dZA28f0BmHBgUCKGh9hhpNKH8BWY8GlF2OH3hCC1zmdAAAAABJRU5ErkJggg==") 50% no-repeat;*background-image:url("ie/arrow-top.png");}
+.arrows .top:hover{background-color:#6ba4b1}
+.arrows .bottom{background:#e2b78d url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAALCAYAAACZIGYHAAAAf0lEQVR4Xo3MzQmEQBCE0TGAvQuOpiQIBiCCgXj2J52NRTAJwev0Vh+WOgjlNHyHguYFM/M6tKLSd2YTmtHHR48S8jtQzAB2430d2bgJvQLsdqRCZwZUPAFLaPjrjYAUMKLgwBtUK4CIhi4BEFGQBohISANEJKQBIqqIFtSqvx/0bXhCCUrgiAAAAABJRU5ErkJggg==") 50% no-repeat;*background-image:url("ie/arrow-bottom.png");}
+.arrows .bottom:hover{background-color:#dba571}
+@media screen and (max-width:1049px){.arrows,.fork-me{display:none}
+}.skin{position:relative;margin-bottom:40px;}
+.skin:hover .arrows .top,.skin:hover .arrows .bottom{left:0}
+.skin h3{position:relative;z-index:20;float:left;height:60px;padding:0 57px;line-height:58px;background:#fff;border:3px solid #ddd8ce;border-bottom:none;}
+.skin h3:before{content:'';position:absolute;top:100%;left:0;width:100%;height:2px;margin-top:-1px;background:#fff}
+.skin.skin-polaris h3{color:#cacdd1;background:#2c323c;}
+.skin.skin-polaris h3:before{background:#2c323c}
+.skin.skin-futurico h3{color:#c3c3c3;background:#2e3035;}
+.skin.skin-futurico h3:before{background:#2e3035}
+.skin dl{z-index:10;width:100%;margin:0}
+.skin dt{position:relative;top:-53px;right:-3px;float:right;height:47px;margin-right:-3px;padding:0 57px;line-height:47px;border:3px solid #ddd8ce;cursor:pointer;}
+.skin dt:hover{background:#f0ede7;border-bottom:3px solid #ddd8ce}
+.skin dt.selected{height:50px;background:#fff;border-bottom:none;cursor:default;}
+.skin dt.selected:before{content:'';position:absolute;top:100%;left:0;width:100%;height:2px;margin-top:-1px;background:#fff}
+.skin.skin-polaris dt{color:#cacdd1;background:#647083;}
+.skin.skin-polaris dt:hover{background:#4a5361}
+.skin.skin-polaris dt.selected{background:#2c323c;}
+.skin.skin-polaris dt.selected:before{background:#2c323c}
+.skin.skin-futurico dt{color:#c3c3c3;background:#676c77;}
+.skin.skin-futurico dt:hover{background:#4b4e56}
+.skin.skin-futurico dt.selected{background:#2e3035;}
+.skin.skin-futurico dt.selected:before{background:#2e3035}
+.skin dd{position:relative;display:none;float:left;width:100%;margin:-3px -100% 0 0;overflow:hidden;color:#444;background:#fff;border:3px solid #ddd8ce;}
+.skin dd.selected{display:block}
+.skin dd a{color:#444;}
+.skin dd a:hover{color:#111}
+.skin.skin-polaris dd{color:#7a828b;background:#2c323c;}
+.skin.skin-polaris dd a{color:#7a828b;border-bottom-color:#4e596b;}
+.skin.skin-polaris dd a:hover{color:#a2a7ae}
+.skin.skin-futurico dd{color:#888;background:#2e3035;}
+.skin.skin-futurico dd a{color:#888;border-bottom-color:#545861;}
+.skin.skin-futurico dd a:hover{color:#aaa}
+.skin-section{float:left;padding:42px 0 31px 57px;line-height:18px;}
+.skin-section h4{padding-bottom:18px;}
+.skin-polaris .skin-section h4{color:#959ba2}
+.skin-futurico .skin-section h4{color:#a0a0a0}
+.skin-section .list{float:left;padding-right:60px;}
+.skin-section .list li{position:relative;padding-bottom:15px}
+.skin-minimal .skin-section .list li{padding-left:38px}
+.skin-square .skin-section .list li{padding-left:42px}
+.skin-flat .skin-section .list li,.skin-line .skin-section label{padding-left:40px}
+.skin-line .skin-section h4{padding-bottom:24px}
+.skin-line .skin-section .list{padding-right:40px;}
+.skin-line .skin-section .list li{padding-bottom:10px}
+.skin-polaris .skin-section .list li{padding-left:37px}
+.skin-futurico .skin-section .list li{padding-left:36px}
+.icheckbox_minimal,.icheckbox_minimal-red,.icheckbox_minimal-green,.icheckbox_minimal-blue,.icheckbox_minimal-aero,.icheckbox_minimal-grey,.icheckbox_minimal-orange,.icheckbox_minimal-yellow,.icheckbox_minimal-pink,.icheckbox_minimal-purple,.iradio_minimal,.iradio_minimal-red,.iradio_minimal-green,.iradio_minimal-blue,.iradio_minimal-aero,.iradio_minimal-grey,.iradio_minimal-orange,.iradio_minimal-yellow,.iradio_minimal-pink,.iradio_minimal-purple{position:absolute;top:1px;left:0}
+.skin input[type=checkbox],.skin input[type=radio]{position:absolute;top:2px;left:0}
+.icheckbox_square,.icheckbox_square-red,.icheckbox_square-green,.icheckbox_square-blue,.icheckbox_square-aero,.icheckbox_square-grey,.icheckbox_square-orange,.icheckbox_square-yellow,.icheckbox_square-pink,.icheckbox_square-purple,.iradio_square,.iradio_square-red,.iradio_square-green,.iradio_square-blue,.iradio_square-aero,.iradio_square-grey,.iradio_square-orange,.iradio_square-yellow,.iradio_square-pink,.iradio_square-purple{position:absolute;top:-1px;left:0}
+.icheckbox_flat,.icheckbox_flat-red,.icheckbox_flat-green,.icheckbox_flat-blue,.icheckbox_flat-aero,.icheckbox_flat-grey,.icheckbox_flat-orange,.icheckbox_flat-yellow,.icheckbox_flat-pink,.icheckbox_flat-purple,.iradio_flat,.iradio_flat-red,.iradio_flat-green,.iradio_flat-blue,.iradio_flat-aero,.iradio_flat-grey,.iradio_flat-orange,.iradio_flat-yellow,.iradio_flat-pink,.iradio_flat-purple{position:absolute;top:0;left:0}
+.icheckbox_polaris,.iradio_polaris{position:absolute;top:-4px;left:-6px}
+.icheckbox_futurico,.iradio_futurico{position:absolute;top:2px;left:0}
+.skin-states{float:right;padding-right:57px;padding-left:0;}
+.skin-states .state{cursor:default !important}
+.skin-states .list{padding-right:0}
+.skin-minimal .skin-states .list li{padding-left:71px}
+.skin-square .skin-states .list li{padding-left:79px}
+.skin-flat .skin-states .list li{padding-left:75px}
+.skin-line .skin-states .list{padding-right:0}
+.skin-polaris .skin-states .list li{padding-left:69px}
+.skin-futurico .skin-states .list li{padding-left:67px}
+.skin-states .iradio_minimal,.skin-states .iradio_minimal-red,.skin-states .iradio_minimal-green,.skin-states .iradio_minimal-blue,.skin-states .iradio_minimal-aero,.skin-states .iradio_minimal-grey,.skin-states .iradio_minimal-orange,.skin-states .iradio_minimal-yellow,.skin-states .iradio_minimal-pink,.skin-states .iradio_minimal-purple{left:33px}
+.skin-states .iradio_square,.skin-states .iradio_square-red,.skin-states .iradio_square-green,.skin-states .iradio_square-blue,.skin-states .iradio_square-aero,.skin-states .iradio_square-grey,.skin-states .iradio_square-orange,.skin-states .iradio_square-yellow,.skin-states .iradio_square-pink,.skin-states .iradio_square-purple{left:37px}
+.skin-states .iradio_flat,.skin-states .iradio_flat-red,.skin-states .iradio_flat-green,.skin-states .iradio_flat-blue,.skin-states .iradio_flat-aero,.skin-states .iradio_flat-grey,.skin-states .iradio_flat-orange,.skin-states .iradio_flat-yellow,.skin-states .iradio_flat-pink,.skin-states .iradio_flat-purple{left:35px}
+.skin-states .iradio_polaris{left:26px}
+.skin-states .iradio_futurico{left:31px}
+.colors{clear:both;padding:24px 0 9px;}
+.skin-line .colors{padding-top:28px}
+.colors strong{float:left;line-height:20px;margin-right:20px}
+.colors li{position:relative;float:left;width:16px;height:16px;margin:2px 1px 0 0;background:#000;cursor:pointer;filter:alpha(opacity=50);opacity:.5;-webkit-transition:opacity .2s;-moz-transition:opacity .2s;-ms-transition:opacity .2s;-o-transition:opacity .2s;transition:opacity .2s;}
+.colors li:hover{filter:alpha(opacity=100);opacity:1}
+.colors li.active{height:20px;margin-top:0;filter:alpha(opacity=75);opacity:.75}
+.colors li.red{background:#d54e21}
+.colors li.green{background:#78a300}
+.colors li.blue{background:#0e76a8}
+.colors li.aero{background:#9cc2cb}
+.colors li.grey{background:#73716e}
+.colors li.orange{background:#f70}
+.colors li.yellow{background:#fc0}
+.colors li.pink{background:#ff66b5}
+.colors li.purple{background:#6a5a8c}
+.skin-square .colors li.red{background:#e56c69}
+.skin-square .colors li.green{background:#1b7e5a}
+.skin-square .colors li.blue{background:#2489c5}
+.skin-square .colors li.aero{background:#9cc2cb}
+.skin-square .colors li.grey{background:#73716e}
+.skin-square .colors li.yellow{background:#fc3}
+.skin-square .colors li.pink{background:#a77a94}
+.skin-square .colors li.purple{background:#6a5a8c}
+.skin-square .colors li.orange{background:#f70}
+.skin-flat .colors li.red{background:#ec7063}
+.skin-flat .colors li.green{background:#1abc9c}
+.skin-flat .colors li.blue{background:#3498db}
+.skin-flat .colors li.grey{background:#95a5a6}
+.skin-flat .colors li.orange{background:#f39c12}
+.skin-flat .colors li.yellow{background:#f1c40f}
+.skin-flat .colors li.pink{background:#af7ac5}
+.skin-flat .colors li.purple{background:#8677a7}
+.skin-line .colors li.yellow{background:#ffc414}
+.skins-info{padding:13px 0 57px;font-size:16px;line-height:22px;text-align:center;}
+.skins-info p{margin-bottom:17px}
+.skins-info .skins-banner{margin:34px 0 3px;}
+.skins-info .skins-banner a{display:block;width:728px;height:90px;margin:0 auto;overflow:hidden;text-indent:100%;white-space:nowrap;background:url(banner.jpg);-webkit-transition:opacity 0.4s ease;-moz-transition:opacity 0.4s ease;-o-transition:opacity 0.4s ease;transition:opacity 0.4s ease;border:none;}
+.skins-info .skins-banner a:hover{opacity:.8;}
+.skin-pre{padding:43px 60px 0}
+.skin-usage{padding:19px 60px 8px;list-style:decimal outside;}
+.skin-usage li{margin-bottom:23px}
+.skin-usage .schemes{margin-bottom:-3px;padding:13px 0 0 20px;color:#888;}
+.skin-usage .schemes ul{float:left;padding-right:60px}
+.skin-usage .schemes li{margin:0;padding-bottom:3px}
+.usage{position:relative;margin-bottom:80px;background:#fff;}
+.usage a{border-bottom-color:#ddd}
+.usage .self{border-bottom-color:#bbb}
+.usage .arrows{top:0}
+.usage:hover .arrows .top,.usage:hover .arrows .bottom{left:0}
+.usage h2{color:#fff;background:#1f7f5c}
+.usage h4{margin:26px 0 10px;}
+.usage h4.indeterminate{margin-top:28px}
+.usage p{margin-bottom:5px;}
+.usage p.offset{margin-top:10px}
+.usage p.callbacks-info{margin-bottom:19px}
+.usage p.methods-info{margin-bottom:10px}
+.usage p.methods-callback{margin-top:10px}
+.usage p.issue-tracker{margin-top:31px}
+.usage .markup{margin:9px 0 16px}
+.usage .usage-inner{font-size:15px;line-height:23px;padding:41px 60px 39px}
+.markup{margin:10px 0 18px;padding:8px 0 9px 17px;font:14px/20px 'MontserratRegular',Helvetica,Arial,sans-serif;color:#777;background:#e7e5e0;border-left:3px solid #d7d5cb;}
+.markup .comment{color:#999;}
+.markup .comment .self{color:#555;}
+.markup .comment .self:hover{color:#333}
+.skin-polaris .markup{background:#232830;border-left-color:#1f232a}
+.skin-futurico .markup{background:#25262a;border-left-color:#202225}
+.skin-polaris .markup .comment,.skin-futurico .markup .comment{color:#555}
+.browsers{margin-bottom:74px;}
+.browsers h2{margin-bottom:29px;font-size:24px}
+.browsers-inner{padding:0 60px;font-size:15px;line-height:23px;}
+.browsers-inner p{margin-bottom:15px}
+.benefits{position:relative;margin-bottom:59px;color:#888;background:#232323;}
+.benefits .arrows{top:0}
+.benefits:hover .arrows .top,.benefits:hover .arrows .bottom{left:0}
+.benefits h2{color:#fff;background:#6a5b8c}
+.benefits a{color:#888;border-bottom-color:#444;}
+.benefits a:hover{color:#aaa}
+.benefits .mark{color:#777;background:#393939}
+.benefits-inner{padding:41px 60px 29px;font-size:15px;line-height:23px;}
+.benefits-inner p{margin-bottom:15px}
+.benefits-inner ul{margin:-10px 0 15px}
+.download{height:63px;text-align:center;}
+.download a{display:block;height:60px;font-size:18px;line-height:58px;color:#fff;border-bottom:0 solid #e24f49;background:#e76b66;-webkit-transition:border-bottom .2s;-moz-transition:border-bottom .2s;-ms-transition:border-bottom .2s;-o-transition:border-bottom .2s;transition:border-bottom .2s;}
+.download a:before{content:'';display:inline-block;width:26px;height:26px;margin-right:12px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAACYUlEQVR4Xr3VPWhTURjH4VOt0ES7ZRJbEJpsNsaimx9E0GpRCdgU/NhsRAdNBYcK0RirQcSkIIK2cRBRiragVayDhqBDLVWatFvsIKK2UMEp4KBcf8N/KNdwvcHWAw8c/rzvebk5yU2dZVnmf6wVNdb70Ca+5Rrkx0e8E/ZkyzCoAyuxBZu17/jXQV34jjwCytowjUk90Ywyo5q8errcDoriPgpoRhEj6MQrGHmpbARF1RbUG3Uz6Bae4iBacQNNSKEPRi4pa1JNq3pGcds+qNrXu4B1CKKCWtZqlPAZO/72RDGsRdKWh5ATIdOSpHpjbu6ojBfYBiPdOIQeHJMeZd0wsh1jKDsNakEc97AHo8o3IYCz2I1nGMYuZQHVGPXs1RlxtNgH+TCFtBpvIqua40ghqkGdOIp27VOqMcigX8PTKIKzWXwZDDbAQhDG5o6yx2iAkQY80T4HYxOEpbP/uCOnN+wq1Nlq6x3qrWp3NIcKJvAWV+FVzU804i6uwyNZZY34BaOeyzpjQmfOLR70DSGcwyxOIa7mAZzHQ+QxLHllCdUYnMYZzOqsjeBsPbp8QFZ7Lw7gCt4jhGu4qCEGa5SVVWPUM4Yjbn5HfrTjNYzk8AAZ5CSjbBBG3qjXr0CqX+YAviJpy6cQg9NKIoJBN6+gIGbwA16kMY5eeGDEo2xcNV71TCPo5qM7iX14hJIueB4XkICRhLJ51ZTUsx8n3AwawmGE8QUhRDR4J4yElUUQUm1YvUPOfxPO4khj66KL70W/m+Z6uF3P0YdJBRVlZqkHlbEezQo+YWHJB8mC1Lx+Ayeq7nRIoewwAAAAAElFTkSuQmCC");*background-image:url("ie/icon-options.png");vertical-align:middle}
+.download a:hover{border-bottom-width:3px}
+.license{color:#444;text-align:center;padding:30px 0 75px}
+.footer{padding-top:28px;height:60px;color:#666;background:#e2dfd8;}
+.footer ul{float:left;}
+.footer ul li{float:left;padding:2px 10px 0 0}
+.footer ul.local li{padding:0 30px 0 0}
+.footer .code{float:right}
+.footer a{color:#444;}
+.footer a:hover{color:#222}
+.footer-inner{width:930px;margin:0 auto;overflow:hidden}
+.fork-me{position:fixed;*position:absolute;top:0;right:0;width:40px;height:40px;overflow:hidden;text-indent:100%;white-space:nowrap;background:#28545b url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAnElEQVR4XqVSgQmEMAyszw/gCI7wK7iBblBHcISfxG6gG/gjuIGO0A3ygaYQCCG2HhweF+6aShsAcDcBJBpuvlwFagqGJwUf5EL6kgV2eEe2yIgc9QI73CMPs8AOywI7nHDSzCxYxcnJ6+hrFnQkJrb2nGclP3Fj+vf0IUV1AgCZHiS86lOObxD4qqSD5mtXmAq1e2fB3vqXact3f/JmXumJlVq1AAAAAElFTkSuQmCC") 50% no-repeat;*background-image:url("ie/icon-fork.png");}
+.fork-me:hover{background-color:#1f7f5c}
+.skin dt,.fork-me{-webkit-transition:background-color .2s;-moz-transition:background-color .2s;-ms-transition:background-color .2s;-o-transition:background-color .2s;transition:background-color .2s}
+
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/css/custom.styl b/common/src/main/webapp/thirdparty/icheck/demo/css/custom.styl
new file mode 100644
index 0000000..7f66121
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/css/custom.styl
@@ -0,0 +1,1191 @@
+/* Reset
+----------------------------------- */
+@import url("normalize.css")
+
+
+/* Fonts
+----------------------------------- */
+$font = 'MontserratRegular'
+$fontBold = 'MontserratBold'
+$stack = $font, Helvetica, Arial, sans-serif
+$stackBold = $fontBold, Helvetica, Arial, sans-serif
+
+@font-face
+ font-family $font
+ src url('./montserrat-regular.eot')
+ src url('./montserrat-regular.eot?#iefix') format('embedded-opentype'),
+ url('./montserrat-regular.woff') format('woff'),
+ url('./montserrat-regular.ttf') format('truetype'),
+ url('./montserrat-regular.svg#' + $font + '') format('svg')
+ font-style normal
+ font-weight normal
+
+@font-face
+ font-family $fontBold
+ src url('./montserrat-bold.eot')
+ src url('./montserrat-bold.eot?#iefix') format('embedded-opentype'),
+ url('./montserrat-bold.woff') format('woff'),
+ url('./montserrat-bold.ttf') format('truetype'),
+ url('./montserrat-bold.svg#' + $fontBold + '') format('svg')
+ font-style normal
+ font-weight bold
+
+
+/* Demo
+----------------------------------- */
+html
+body
+ height 100%
+
+body
+ font 14px/20px $stack
+ color #222
+ background #ebe7df url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAFZCAIAAAA96mnzAAACKklEQVR4Xn2VUW7kMAxD+QLf/1x7gv71LNwdKTLhZFtggMCwSVEUPdb3159/v0uSrM8HtGRZuoQk1R69J12o9ixJWvSnVyfLdbNw0XAXWe1fIL8BoqmNGiV/cHc9Gq4NXxLKHhteRyLpA28cl0SLdx0BckSWL4gkPlIVTg1nN9Ys3iyWI5AGDA5xOXB5BJaWmOw6KSLeU6+0P50QshQyEL2im/YMIL60dTSZ3RXenlkiJpMj8XPMAl1FtjMRW19NxzOE5VGWPVGrc7aSJgz1Y9ku57mpYSwn1h0ivFOXxoCKMCXiahbbZNIZR+tkphllPsomipCwb4GMkXTmPfVg40Jt2y4RQM/PqX5JTM4iiTN8Zz1XvbIAEEvoEW+3nxTLL3lB7t7J3WwyI7g5OVxKIeFEH4FIGLC9I+XqvSd4AxJM5O6WTPr54RAxLG44FVrEuz+kFdXyLiuX6kLPVLZL2ISlcHNlBIKm5rR8nEi9wJeA6Y8JZlJOyDiin0K5ag+AXHtALBicXasjIUu9h0STBbCMU+89gMnu/J05MU1QWqdbPMRPIZIzDgsi8Olg5t7wHhUg/pv5RUzO+BHDmczHkAfZWxlSYgNI5Ig5XRoc66dW9L45eHDkbkqCO7RLG5cna/HD7YhZnfINkFo8iNyj5kx6pFrxNGRlfhV2e1Zt5DnGU8T7Tud1ivi8jU8/3Zy88pkn6+zdXiJ7AVSFBZA3VcwDfXtt5UUHS38B35hQVuJip4MAAAAASUVORK5CYII=") repeat-x
+ *background-image url(ie/header-line.png)
+
+a
+ color #222
+ text-decoration none
+ border-bottom 1px solid #bbb
+
+ &:hover
+ color #000
+
+a
+.self
+ -webkit-transition color .1s
+ -moz-transition color .1s
+ -ms-transition color .1s
+ -o-transition color .1s
+ transition color .1s
+
+.self
+ color #333
+ border-bottom 1px dotted #aaa
+ cursor pointer
+
+ &:hover
+ color #000
+
+strong
+ font-family $stackBold
+ font-weight 700
+
+p
+ margin 0 0 8px
+
+label
+ cursor pointer
+
+h1
+h2
+h3
+h4
+ margin 0
+ font bold 20px/60px $stackBold
+
+h2
+ height 60px
+ text-align center
+ text-transform uppercase
+
+h4
+ font-size 18px
+ line-height 24px
+
+ul
+ margin 0
+ padding 0
+ list-style none
+
+table
+ width 100%
+ margin-bottom 21px
+
+th
+td
+ padding 11px 20px 12px
+ vertical-align top
+ font-weight normal
+ text-align left
+ border-bottom 2px solid #E7E5E0
+
+ thead &
+ background lighten(#E7E5E0, 50%)
+
+th
+ white-space nowrap
+
+td
+ width 100%
+
+.focus
+ outline 1px dotted rgba(0,0,0,.5) !important
+
+.clear
+ position relative
+ *zoom 1
+
+ &:before
+ &:after
+ content ''
+ display table
+ clear both
+
+.layout
+ width 930px
+ margin 0 auto
+ padding 0 15px
+
+.header
+ padding 115px 0 73px
+ color #fff
+ text-align center
+
+ h1
+ strong
+ letter-spacing -1px
+ text-transform uppercase
+
+ h1
+ padding-bottom 23px
+ font-size 22px
+ line-height 28px
+
+ h3
+ position relative
+ padding 35px 0 17px
+ font-size 120px
+ line-height 140px
+ letter-spacing -5px
+
+ &:before
+ content ''
+ display inline-block
+ width 72px
+ height 64px
+ margin-right 32px
+ vertical-align middle
+ background url(icheck.png)
+
+ &:after
+ content ''
+ position absolute
+ top 0
+ left 50%
+ width 100px
+ margin-left -50px
+ border-top 3px solid #fff
+
+ strong
+ font 24px/30px $stack
+
+ a
+ color #fff
+ border-bottom-color #fff
+
+.features
+ position relative
+ font-size 16px
+ color #555
+ background #fff
+
+ .self
+ color #555
+ border-bottom-color #bbb
+
+ &:hover
+ color #222
+
+ .arrows
+ top 0
+
+ &:hover .arrows .bottom
+ left 0
+
+ h2
+ color #fff
+ background #2489c5
+
+ ul
+ padding 44px 60px 36px
+
+ li
+ padding 0 0 9px 36px
+ background url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABI0lEQVR4XpXSP0vDUBjF4ZtLkIr4EYzduogdXJTWWV2FLMVNoQrdAhlUUFAEcejo1q13svgFBAUdxA/g30kcdQoIIlL9DWcKuZEeeOCl99w3gTSI49h4MoFb/KCJz6KShS/rOh/TbEZZECLBiSQIR1nQQgAnAVr/LZjEnIq76OJbutjRGR26isUB3pDhBikucWoUzVdI1cl05zBk2MI5jvCKIfL5QluzxTS20bY6WENdl0ujTl13Ni3DABtwWEFp1HG6M7Aq9NHBGRbgy7w6HfTzX6GHCyyXPV2dnu9/MIUX+PIMOkRsbq7hHkZmxciDOrZoQRUVPCGCw504RDobR7VoQQ0f2Mejls1IRb/t4R10CcLc6/2igSVcw8gqFnEMOnSVPxQqQaPw2y7fAAAAAElFTkSuQmCC") 0 1px no-repeat
+ *background-image url(ie/icon-star.png)
+
+ &.offset
+ margin-top 20px
+
+.mark
+ padding 0 2px
+ color lighten(#555, 20%)
+ background lighten(#d7d4cc, 40%)
+
+ .skin-polaris &
+ background darken(#2C323C, 20%)
+
+ .skin-futurico &
+ background darken(#2E3035, 20%)
+
+.social
+ height 60px
+ margin-bottom 60px
+ padding 0 60px
+ font-size 16px
+ color #555
+ background lighten(#EBE7DF, 50%)
+
+ a
+ color #777
+ border-bottom-color #ccc
+
+ &:hover
+ color #444
+
+ .left
+ float left
+ padding-top 19px
+
+ li
+ float left
+ padding-right 30px
+
+ a
+ position relative
+
+ .right
+ float right
+ padding-top 20px
+
+ li
+ float right
+ padding-left 10px
+
+ &.local
+ padding-top 19px
+
+ li
+ padding-left 30px
+ font-size 14px
+
+.demo-holder
+ margin-bottom 97px
+
+.demo-title
+ padding-bottom 36px
+ font-size 26px
+ letter-spacing -1px
+
+.demo
+ position relative
+
+ &:hover .arrows .top
+ &:hover .arrows .bottom
+ left 0
+
+.demo-list
+ position relative
+ margin-right 360px
+ padding 33px 57px 17px
+ color #555
+ background #fff
+ border 3px solid #ddd8ce
+
+ ul
+ float right
+ white-space nowrap
+
+ &:first-child
+ float left
+
+ li
+ position relative
+ padding 0 0 18px 42px
+
+ input
+ position absolute
+ top 4px
+ left 0
+
+ .icheckbox_square-blue
+ .iradio_square-blue
+ position absolute
+ top -1px
+ left 0
+
+ span
+ color #bbb
+
+.demo-methods
+ padding 21px 360px 0 0
+
+ .mark
+ background darken(#e7e5e0, 10%)
+
+ dt
+ position relative
+ padding 17px 150px 18px 0
+ font 16px/24px $stack
+ color #444
+ border-bottom 3px solid #ddd8ce
+
+ .self
+ cursor pointer
+
+ &:hover
+ color #222
+
+ .code
+ position absolute
+ right 0
+ bottom 18px
+ color #777
+
+ .self:hover
+ color #444
+
+ dd
+ position relative
+ display none
+ margin 0
+ background #fff
+ border 3px solid #ddd8ce
+ border-top none
+
+ &:before
+ content ''
+ position absolute
+ top -13px
+ left 0
+ width 0
+ height 0
+ border 5px solid transparent
+ border-bottom-color #ddd8ce
+ border-left-color #ddd8ce
+
+ .markup
+ margin 0
+ color #888
+ background lighten(#ebe7df, 50%)
+ border none
+
+ .comment
+ color #aaa
+
+.demo-callbacks
+ position absolute
+ top 0
+ right 0
+ bottom 0
+ width 300px
+ color #aaa
+ background #232323
+ border 3px solid #ddd8ce
+
+ h2
+ color #fff
+ background #6a5a8c
+
+ ul
+ position absolute
+ top 60px
+ width 100%
+ bottom 0
+ overflow auto
+
+ li
+ margin-top -1px
+ padding 13px 20px 15px
+ border-top 1px solid #2e2e2e
+
+ span
+ color #888
+
+.skins
+ position relative
+ *zoom 1
+
+ h2
+ position absolute
+ top -38px
+ right 0
+ left 0
+ font-size 24px
+ text-align center
+
+.arrows
+ position absolute
+ top 3px
+ left -60px
+ width 60px
+ overflow hidden
+
+ .top
+ .bottom
+ position relative
+ left 60px
+ width 60px
+ height 60px
+ cursor pointer
+ -webkit-transition left .3s, background-color .2s
+ -moz-transition left .3s, background-color .2s
+ -ms-transition left .3s, background-color .2s
+ -o-transition left .3s, background-color .2s
+ transition left .3s, background-color .2s
+
+ .top
+ background lighten(#5a9aa8, 25%) url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAALCAYAAACZIGYHAAAAdklEQVR4Xo3MuwmFQBiE0b0FmAuutnRBsAARLMTYRzvWItiEYLq/s6CYyMwGXzTDcWbG8mhEf/ZjQIV2ZCigjiASMAVJIAVKAQ4FKWBDJVoYpAB/7z8GRaAQgBNQG8dZA28f0BmHBgUCKGh9hhpNKH8BWY8GlF2OH3hCC1zmdAAAAABJRU5ErkJggg==") 50% no-repeat
+ *background-image url(ie/arrow-top.png)
+
+ &:hover
+ background-color lighten(#5a9aa8, 10%)
+
+ .bottom
+ background lighten(#dba571, 20%) url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAALCAYAAACZIGYHAAAAf0lEQVR4Xo3MzQmEQBCE0TGAvQuOpiQIBiCCgXj2J52NRTAJwev0Vh+WOgjlNHyHguYFM/M6tKLSd2YTmtHHR48S8jtQzAB2430d2bgJvQLsdqRCZwZUPAFLaPjrjYAUMKLgwBtUK4CIhi4BEFGQBohISANEJKQBIqqIFtSqvx/0bXhCCUrgiAAAAABJRU5ErkJggg==") 50% no-repeat
+ *background-image url(ie/arrow-bottom.png)
+
+ &:hover
+ background-color #dba571
+
+@media screen and (max-width:1049px)
+ .arrows
+ .fork-me
+ display none
+
+.skin
+ position relative
+ margin-bottom 40px
+
+ &:hover .arrows .top
+ &:hover .arrows .bottom
+ left 0
+
+ h3
+ position relative
+ z-index 20
+ float left
+ height 60px
+ padding 0 57px
+ line-height 58px
+ background #fff
+ border 3px solid #ddd8ce
+ border-bottom none
+
+ &:before
+ content ''
+ position absolute
+ top 100%
+ left 0
+ width 100%
+ height 2px
+ margin-top -1px
+ background #fff
+
+ &.skin-polaris h3
+ color lighten(#7a828b, 60%)
+ background #2c323c
+
+ &:before
+ background #2c323c
+
+ &.skin-futurico h3
+ color lighten(#888, 50%)
+ background #2e3035
+
+ &:before
+ background #2e3035
+
+ dl
+ z-index 10
+ width 100%
+ margin 0
+
+ dt
+ position relative
+ top -53px
+ right -3px
+ float right
+ height 47px
+ margin-right -3px
+ padding 0 57px
+ line-height 47px
+ border 3px solid #ddd8ce
+ cursor pointer
+
+ &:hover
+ background #f0ede7
+ border-bottom 3px solid #ddd8ce
+
+ &.selected
+ height 50px
+ background #fff
+ border-bottom none
+ cursor default
+
+ &:before
+ content ''
+ position absolute
+ top 100%
+ left 0
+ width 100%
+ height 2px
+ margin-top -1px
+ background #fff
+
+ &.skin-polaris dt
+ color lighten(#7a828b, 60%)
+ background lighten(#30363f, 30%)
+
+ &:hover
+ background lighten(#30363f, 15%)
+
+ &.selected
+ background #2c323c
+
+ &:before
+ background #2c323c
+
+ &.skin-futurico dt
+ color lighten(#888, 50%)
+ background lighten(#2e3035, 30%)
+
+ &:hover
+ background lighten(#2e3035, 15%)
+
+ &.selected
+ background #2e3035
+
+ &:before
+ background #2e3035
+
+ dd
+ position relative
+ display none
+ float left
+ width 100%
+ margin -3px -100% 0 0
+ overflow hidden
+ color #444
+ background #fff
+ border 3px solid #ddd8ce
+
+ &.selected
+ display block
+
+ a
+ color #444
+
+ &:hover
+ color #111
+
+ &.skin-polaris dd
+ color #7a828b
+ background #2c323c
+
+ a
+ color #7a828b
+ border-bottom-color lighten(#2c323c, 20%)
+
+ &:hover
+ color lighten(#7a828b, 30%)
+
+ &.skin-futurico dd
+ color #888
+ background #2e3035
+
+ a
+ color #888
+ border-bottom-color lighten(#2e3035, 20%)
+
+ &:hover
+ color #aaa
+
+.skin-section
+ float left
+ padding 42px 0 31px 57px
+ line-height 18px
+
+ h4
+ padding-bottom 18px
+
+ .skin-polaris &
+ color lighten(#7a828b, 20%)
+
+ .skin-futurico &
+ color lighten(#888, 20%)
+
+ .list
+ float left
+ padding-right 60px
+
+ li
+ position relative
+ padding-bottom 15px
+
+ .skin-minimal & .list li
+ padding-left 38px
+
+ .skin-square & .list li
+ padding-left 42px
+
+ .skin-flat & .list li
+ .skin-line & label
+ padding-left 40px
+
+ .skin-line & h4
+ padding-bottom 24px
+
+ .skin-line & .list
+ padding-right 40px
+
+ li
+ padding-bottom 10px
+
+ .skin-polaris & .list li
+ padding-left 37px
+
+ .skin-futurico & .list li
+ padding-left 36px
+
+.icheckbox_minimal
+.icheckbox_minimal-red
+.icheckbox_minimal-green
+.icheckbox_minimal-blue
+.icheckbox_minimal-aero
+.icheckbox_minimal-grey
+.icheckbox_minimal-orange
+.icheckbox_minimal-yellow
+.icheckbox_minimal-pink
+.icheckbox_minimal-purple
+.iradio_minimal
+.iradio_minimal-red
+.iradio_minimal-green
+.iradio_minimal-blue
+.iradio_minimal-aero
+.iradio_minimal-grey
+.iradio_minimal-orange
+.iradio_minimal-yellow
+.iradio_minimal-pink
+.iradio_minimal-purple
+ position absolute
+ top 1px
+ left 0
+
+.skin input[type=checkbox]
+.skin input[type=radio]
+ position absolute
+ top 2px
+ left 0
+
+.icheckbox_square
+.icheckbox_square-red
+.icheckbox_square-green
+.icheckbox_square-blue
+.icheckbox_square-aero
+.icheckbox_square-grey
+.icheckbox_square-orange
+.icheckbox_square-yellow
+.icheckbox_square-pink
+.icheckbox_square-purple
+.iradio_square
+.iradio_square-red
+.iradio_square-green
+.iradio_square-blue
+.iradio_square-aero
+.iradio_square-grey
+.iradio_square-orange
+.iradio_square-yellow
+.iradio_square-pink
+.iradio_square-purple
+ position absolute
+ top -1px
+ left 0
+
+.icheckbox_flat
+.icheckbox_flat-red
+.icheckbox_flat-green
+.icheckbox_flat-blue
+.icheckbox_flat-aero
+.icheckbox_flat-grey
+.icheckbox_flat-orange
+.icheckbox_flat-yellow
+.icheckbox_flat-pink
+.icheckbox_flat-purple
+.iradio_flat
+.iradio_flat-red
+.iradio_flat-green
+.iradio_flat-blue
+.iradio_flat-aero
+.iradio_flat-grey
+.iradio_flat-orange
+.iradio_flat-yellow
+.iradio_flat-pink
+.iradio_flat-purple
+ position absolute
+ top 0
+ left 0
+
+.icheckbox_polaris
+.iradio_polaris
+ position absolute
+ top -4px
+ left -6px
+
+.icheckbox_futurico
+.iradio_futurico
+ position absolute
+ top 2px
+ left 0
+
+.skin-states
+ float right
+ padding-right 57px
+ padding-left 0
+
+ .state
+ cursor default !important
+
+ .list
+ padding-right 0
+
+ .skin-minimal & .list li
+ padding-left 71px
+
+ .skin-square & .list li
+ padding-left 79px
+
+ .skin-flat & .list li
+ padding-left 75px
+
+ .skin-line & .list
+ padding-right 0
+
+ .skin-polaris & .list li
+ padding-left 69px
+
+ .skin-futurico & .list li
+ padding-left 67px
+
+ .iradio_minimal
+ .iradio_minimal-red
+ .iradio_minimal-green
+ .iradio_minimal-blue
+ .iradio_minimal-aero
+ .iradio_minimal-grey
+ .iradio_minimal-orange
+ .iradio_minimal-yellow
+ .iradio_minimal-pink
+ .iradio_minimal-purple
+ left 33px
+
+ .iradio_square
+ .iradio_square-red
+ .iradio_square-green
+ .iradio_square-blue
+ .iradio_square-aero
+ .iradio_square-grey
+ .iradio_square-orange
+ .iradio_square-yellow
+ .iradio_square-pink
+ .iradio_square-purple
+ left 37px
+
+ .iradio_flat
+ .iradio_flat-red
+ .iradio_flat-green
+ .iradio_flat-blue
+ .iradio_flat-aero
+ .iradio_flat-grey
+ .iradio_flat-orange
+ .iradio_flat-yellow
+ .iradio_flat-pink
+ .iradio_flat-purple
+ left 35px
+
+ .iradio_polaris
+ left 26px
+
+ .iradio_futurico
+ left 31px
+
+.colors
+ clear both
+ padding 24px 0 9px
+
+ .skin-line &
+ padding-top 28px
+
+ strong
+ float left
+ line-height 20px
+ margin-right 20px
+
+ li
+ position relative
+ float left
+ width 16px
+ height 16px
+ margin 2px 1px 0 0
+ background #000
+ cursor pointer
+ filter unquote('alpha(opacity=50)')
+ opacity .5
+ -webkit-transition opacity .2s
+ -moz-transition opacity .2s
+ -ms-transition opacity .2s
+ -o-transition opacity .2s
+ transition opacity .2s
+
+ &:hover
+ filter unquote('alpha(opacity=100)')
+ opacity 1
+
+ &.active
+ height 20px
+ margin-top 0
+ filter unquote('alpha(opacity=75)')
+ opacity .75
+
+ &.red
+ background #d54e21
+
+ &.green
+ background #78a300
+
+ &.blue
+ background #0e76a8
+
+ &.aero
+ background #9cc2cb
+
+ &.grey
+ background #73716e
+
+ &.orange
+ background #f70
+
+ &.yellow
+ background #fc0
+
+ &.pink
+ background #ff66b5
+
+ &.purple
+ background #6a5a8c
+
+ .skin-square &.red
+ background #e56c69
+
+ .skin-square &.green
+ background #1b7e5a
+
+ .skin-square &.blue
+ background #2489c5
+
+ .skin-square &.aero
+ background #9cc2cb
+
+ .skin-square &.grey
+ background #73716e
+
+ .skin-square &.yellow
+ background #fc3
+
+ .skin-square &.pink
+ background #a77a94
+
+ .skin-square &.purple
+ background #6a5a8c
+
+ .skin-square &.orange
+ background #f70
+
+ .skin-flat &.red
+ background #ec7063
+
+ .skin-flat &.green
+ background #1abc9c
+
+ .skin-flat &.blue
+ background #3498db
+
+ .skin-flat &.grey
+ background #95a5a6
+
+ .skin-flat &.orange
+ background #f39c12
+
+ .skin-flat &.yellow
+ background #f1c40f
+
+ .skin-flat &.pink
+ background #af7ac5
+
+ .skin-flat &.purple
+ background #8677a7
+
+ .skin-line &.yellow
+ background #FFC414
+
+.skins-info
+ padding 13px 0 57px
+ font-size 16px
+ line-height 22px
+ text-align center
+
+ p
+ margin-bottom 17px
+
+.skin-pre
+ padding 43px 60px 0
+
+.skin-usage
+ padding 19px 60px 8px
+ list-style decimal outside
+
+ li
+ margin-bottom 23px
+
+ .schemes
+ margin-bottom -3px
+ padding 13px 0 0 20px
+ color #888
+
+ ul
+ float left
+ padding-right 60px
+
+ li
+ margin 0
+ padding-bottom 3px
+
+.usage
+ position relative
+ margin-bottom 80px
+ background #fff
+
+ a
+ border-bottom-color #ddd
+
+ .self
+ border-bottom-color #bbb
+
+ .arrows
+ top 0
+
+ &:hover .arrows .top
+ &:hover .arrows .bottom
+ left 0
+
+ h2
+ color #fff
+ background #1f7f5c
+
+ h4
+ margin 26px 0 10px
+
+ &.indeterminate
+ margin-top 28px
+
+ p
+ margin-bottom 5px
+
+ &.offset
+ margin-top 10px
+
+ &.callbacks-info
+ margin-bottom 19px
+
+ &.methods-info
+ margin-bottom 10px
+
+ &.methods-callback
+ margin-top 10px
+
+ &.issue-tracker
+ margin-top 31px
+
+ .markup
+ margin 9px 0 16px
+
+ .usage-inner
+ font-size 15px
+ line-height 23px
+ padding 41px 60px 39px
+
+.markup
+ margin 10px 0 18px
+ padding 8px 0 9px 17px
+ font 14px/20px $stack
+ color lighten(#555, 20%)
+ background lighten(#d7d4cc, 40%)
+ border-left 3px solid darken(#ebeae5, 10%)
+
+ .comment
+ color lighten(#555, 40%)
+
+ .self
+ color #555
+
+ &:hover
+ color #333
+
+ .skin-polaris &
+ background darken(#2C323C, 20%)
+ border-left-color darken(#2C323C, 30%)
+
+ .skin-futurico &
+ background darken(#2E3035, 20%)
+ border-left-color darken(#2E3035, 30%)
+
+ .skin-polaris &
+ .skin-futurico &
+
+ .comment
+ color #555
+
+.browsers
+ margin-bottom 74px
+
+ h2
+ margin-bottom 29px
+ font-size 24px
+
+.browsers-inner
+ padding 0 60px
+ font-size 15px
+ line-height 23px
+
+ p
+ margin-bottom 15px
+
+.benefits
+ position relative
+ margin-bottom 59px
+ color #888
+ background #232323
+
+ .arrows
+ top 0
+
+ &:hover .arrows .top
+ &:hover .arrows .bottom
+ left 0
+
+ h2
+ color #fff
+ background #6a5b8c
+
+ a
+ color #888
+ border-bottom-color #444
+
+ &:hover
+ color #aaa
+
+ .mark
+ color #777
+ background lighten(#232323, 10%)
+
+.benefits-inner
+ padding 41px 60px 29px
+ font-size 15px
+ line-height 23px
+
+ p
+ margin-bottom 15px
+
+ ul
+ margin -10px 0 15px
+
+.download
+ height 63px
+ text-align center
+
+ a
+ display block
+ height 60px
+ font-size 18px
+ line-height 58px
+ color #fff
+ border-bottom 0 solid darken(#E76B66, 10%)
+ background #E76B66
+ -webkit-transition border-bottom .2s
+ -moz-transition border-bottom .2s
+ -ms-transition border-bottom .2s
+ -o-transition border-bottom .2s
+ transition border-bottom .2s
+
+ &:before
+ content ''
+ display inline-block
+ width 26px
+ height 26px
+ margin-right 12px
+ background url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAACYUlEQVR4Xr3VPWhTURjH4VOt0ES7ZRJbEJpsNsaimx9E0GpRCdgU/NhsRAdNBYcK0RirQcSkIIK2cRBRiragVayDhqBDLVWatFvsIKK2UMEp4KBcf8N/KNdwvcHWAw8c/rzvebk5yU2dZVnmf6wVNdb70Ca+5Rrkx0e8E/ZkyzCoAyuxBZu17/jXQV34jjwCytowjUk90Ywyo5q8errcDoriPgpoRhEj6MQrGHmpbARF1RbUG3Uz6Bae4iBacQNNSKEPRi4pa1JNq3pGcds+qNrXu4B1CKKCWtZqlPAZO/72RDGsRdKWh5ATIdOSpHpjbu6ojBfYBiPdOIQeHJMeZd0wsh1jKDsNakEc97AHo8o3IYCz2I1nGMYuZQHVGPXs1RlxtNgH+TCFtBpvIqua40ghqkGdOIp27VOqMcigX8PTKIKzWXwZDDbAQhDG5o6yx2iAkQY80T4HYxOEpbP/uCOnN+wq1Nlq6x3qrWp3NIcKJvAWV+FVzU804i6uwyNZZY34BaOeyzpjQmfOLR70DSGcwyxOIa7mAZzHQ+QxLHllCdUYnMYZzOqsjeBsPbp8QFZ7Lw7gCt4jhGu4qCEGa5SVVWPUM4Yjbn5HfrTjNYzk8AAZ5CSjbBBG3qjXr0CqX+YAviJpy6cQg9NKIoJBN6+gIGbwA16kMY5eeGDEo2xcNV71TCPo5qM7iX14hJIueB4XkICRhLJ51ZTUsx8n3AwawmGE8QUhRDR4J4yElUUQUm1YvUPOfxPO4khj66KL70W/m+Z6uF3P0YdJBRVlZqkHlbEezQo+YWHJB8mC1Lx+Ayeq7nRIoewwAAAAAElFTkSuQmCC")
+ *background-image url(ie/icon-options.png)
+ vertical-align middle
+
+ &:hover
+ border-bottom-width 3px
+
+.license
+ color #444
+ text-align center
+ padding 30px 0 75px
+
+.footer
+ padding-top 28px
+ height 60px
+ color #666
+ background #e2dfd8
+
+ ul
+ float left
+
+ li
+ float left
+ padding 2px 10px 0 0
+
+ &.local li
+ padding 0 30px 0 0
+
+ .code
+ float right
+
+ a
+ color #444
+
+ &:hover
+ color #222
+
+.footer-inner
+ width 930px
+ margin 0 auto
+ overflow hidden
+
+.fork-me
+ position fixed
+ *position absolute
+ top 0
+ right 0
+ width 40px
+ height 40px
+ overflow hidden
+ text-indent 100%
+ white-space nowrap
+ background #28545b url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAnElEQVR4XqVSgQmEMAyszw/gCI7wK7iBblBHcISfxG6gG/gjuIGO0A3ygaYQCCG2HhweF+6aShsAcDcBJBpuvlwFagqGJwUf5EL6kgV2eEe2yIgc9QI73CMPs8AOywI7nHDSzCxYxcnJ6+hrFnQkJrb2nGclP3Fj+vf0IUV1AgCZHiS86lOObxD4qqSD5mtXmAq1e2fB3vqXact3f/JmXumJlVq1AAAAAElFTkSuQmCC") 50% no-repeat
+ *background-image url(ie/icon-fork.png)
+
+ &:hover
+ background-color #1f7f5c
+
+.skin dt
+.fork-me
+ -webkit-transition background-color .2s
+ -moz-transition background-color .2s
+ -ms-transition background-color .2s
+ -o-transition background-color .2s
+ transition background-color .2s
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/css/icheck.png b/common/src/main/webapp/thirdparty/icheck/demo/css/icheck.png
new file mode 100644
index 0000000..497c5e6
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/css/icheck.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/css/ie/arrow-bottom.png b/common/src/main/webapp/thirdparty/icheck/demo/css/ie/arrow-bottom.png
new file mode 100644
index 0000000..a815b3f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/css/ie/arrow-bottom.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/css/ie/arrow-top.png b/common/src/main/webapp/thirdparty/icheck/demo/css/ie/arrow-top.png
new file mode 100644
index 0000000..0836c0e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/css/ie/arrow-top.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/css/ie/header-line.png b/common/src/main/webapp/thirdparty/icheck/demo/css/ie/header-line.png
new file mode 100644
index 0000000..f6240fe
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/css/ie/header-line.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/css/ie/icon-fork.png b/common/src/main/webapp/thirdparty/icheck/demo/css/ie/icon-fork.png
new file mode 100644
index 0000000..2c3e3b9
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/css/ie/icon-fork.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/css/ie/icon-github.png b/common/src/main/webapp/thirdparty/icheck/demo/css/ie/icon-github.png
new file mode 100644
index 0000000..ed78186
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/css/ie/icon-github.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/css/ie/icon-lab.png b/common/src/main/webapp/thirdparty/icheck/demo/css/ie/icon-lab.png
new file mode 100644
index 0000000..4d42726
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/css/ie/icon-lab.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/css/ie/icon-options.png b/common/src/main/webapp/thirdparty/icheck/demo/css/ie/icon-options.png
new file mode 100644
index 0000000..20cbb61
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/css/ie/icon-options.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/css/ie/icon-star.png b/common/src/main/webapp/thirdparty/icheck/demo/css/ie/icon-star.png
new file mode 100644
index 0000000..a1c1169
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/css/ie/icon-star.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-bold.eot b/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-bold.eot
new file mode 100644
index 0000000..69ddb38
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-bold.eot
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-bold.svg b/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-bold.svg
new file mode 100644
index 0000000..b7e99a4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-bold.svg
@@ -0,0 +1,1490 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="montserratbold" horiz-adv-x="1525" >
+<font-face units-per-em="2048" ascent="1638" descent="-410" />
+<missing-glyph horiz-adv-x="540" />
+<glyph horiz-adv-x="0" />
+<glyph horiz-adv-x="682" />
+<glyph horiz-adv-x="0" />
+<glyph horiz-adv-x="0" />
+<glyph unicode="&#xd;" horiz-adv-x="681" />
+<glyph unicode=" " horiz-adv-x="540" />
+<glyph unicode="&#x09;" horiz-adv-x="540" />
+<glyph unicode="&#xa0;" horiz-adv-x="540" />
+<glyph unicode="!" horiz-adv-x="645" d="M141 1432h363v-254l-62 -738h-241l-60 738v254zM141 164q0 76 52.5 128t128 52t128 -52t52.5 -128t-52.5 -128t-128 -52t-128 52t-52.5 128z" />
+<glyph unicode="&#x22;" horiz-adv-x="886" d="M145 883v549h244v-549h-244zM498 883v549h243v-549h-243z" />
+<glyph unicode="#" horiz-adv-x="1529" d="M1386 850h-206l-43 -256h235l-55 -283h-227l-54 -311h-307l53 311h-186l-53 -311h-310l54 311h-197l55 283h191l43 256h-219l55 283h211l55 331h310l-56 -331h185l55 331h311l-59 -331h215zM874 850h-186l-45 -256h186q27 164 45 256z" />
+<glyph unicode="$" horiz-adv-x="1300" d="M553 -141v149q-260 41 -479 236l190 231q160 -139 289 -178v305q-215 55 -315.5 148.5t-100.5 268.5t115 288.5t301 136.5v100h217v-104q205 -29 408 -170l-168 -242q-129 92 -240 123v-295q221 -57 326.5 -153.5t105.5 -272.5t-117.5 -290.5t-314.5 -137.5v-143h-217z M874 414q0 43 -22.5 71.5t-81.5 53.5v-252q104 33 104 127zM553 1159q-88 -31 -88 -112.5t88 -124.5v237z" />
+<glyph unicode="%" horiz-adv-x="1677" d="M1522 1432l-1026 -1432h-353l1028 1432h351zM1239 170q37 0 61.5 27.5t24.5 72.5t-24.5 75t-60.5 30t-60.5 -30t-24.5 -75t23.5 -72.5t60.5 -27.5zM1456 67q-86 -83 -216 -83t-216 84t-86 203.5t86 203.5t216 84t216 -84t86 -204.5t-86 -203.5zM432 1008q37 0 61.5 27.5 t24.5 72.5t-24.5 74.5t-60.5 29.5t-60.5 -29.5t-24.5 -74.5t23.5 -72.5t60.5 -27.5zM649 904q-86 -83 -216 -83t-216 84t-86 204t86 204t216 84t216 -84t86 -205t-86 -204z" />
+<glyph unicode="&#x26;" horiz-adv-x="1433" d="M1012 123q-172 -139 -398.5 -139t-372 115.5t-145.5 316.5q0 225 301 399q-68 82 -98.5 144.5t-30.5 146.5q0 174 126 266t298 92t294 -89t122 -249q0 -201 -293 -372q115 -143 172 -207q51 94 78 198l240 -172q-47 -129 -115 -239l203 -201l-203 -192zM460.5 287 q59.5 -47 154 -47t202.5 90q-150 158 -258 286q-158 -98 -158 -210q0 -72 59.5 -119zM611 1191q-36 -32 -36 -86t82 -157q154 82 154 154q0 59 -37 90t-82 31t-81 -32z" />
+<glyph unicode="'" horiz-adv-x="534" d="M145 883v549h244v-549h-244z" />
+<glyph unicode="(" horiz-adv-x="741" d="M482 1115q-85 -253 -85 -473t85 -474t208 -428h-332q-100 141 -183 398t-83 503t83 504t183 399h332q-123 -176 -208 -429z" />
+<glyph unicode=")" horiz-adv-x="741" d="M259 168q85 254 85 474t-85 473t-208 429h332q100 -141 183 -399t83 -504t-83 -503t-183 -398h-332q123 174 208 428z" />
+<glyph unicode="*" horiz-adv-x="933" d="M569 915l13 -172h-230l13 172l-146 -100l-104 186l172 86l-174 87l106 182l146 -96l-13 172h230l-13 -172l146 96l106 -182l-174 -87l172 -86l-104 -186z" />
+<glyph unicode="+" horiz-adv-x="1196" d="M457 223v369h-359v252h359v368h282v-368h359v-252h-359v-369h-282z" />
+<glyph unicode="," horiz-adv-x="608" d="M186 25q-72 51 -71.5 133t55.5 134t133 52t134.5 -51t56.5 -120t-60 -165l-123 -211h-202z" />
+<glyph unicode="-" horiz-adv-x="1003" d="M137 479v273h729v-273h-729z" />
+<glyph unicode="." horiz-adv-x="589" d="M115 164q0 76 52 128t128 52t128 -52t52 -128t-52 -128t-128 -52t-128 52t-52 128z" />
+<glyph unicode="/" horiz-adv-x="1257" d="M913 1649h291l-860 -1878h-289z" />
+<glyph unicode="0" horiz-adv-x="1413" d="M428 723q0 -215 67.5 -346t211 -131t211 131t67.5 346t-67.5 346t-211 131t-211 -131t-67.5 -346zM262.5 185.5q-147.5 201.5 -147.5 538.5t147.5 538.5t444.5 201.5t444 -201.5t147 -538.5t-147 -538.5t-444 -201.5t-444.5 201.5z" />
+<glyph unicode="1" horiz-adv-x="825" d="M63 1432h580v-1432h-307v1159h-273v273z" />
+<glyph unicode="2" horiz-adv-x="1239" d="M720 873.5q54 76.5 54 148.5t-47 120t-121 48q-135 0 -256 -193l-256 152q100 156 220 235.5t305.5 79.5t325.5 -117.5t140 -320.5q0 -111 -56 -212t-208 -259l-258 -268h565v-287h-1009v238l420 430q127 129 181 205.5z" />
+<glyph unicode="3" horiz-adv-x="1210" d="M154 1159v273h876v-222l-293 -333q172 -29 266.5 -145t94.5 -267q0 -225 -152.5 -353t-390.5 -128t-481 168l131 254q203 -143 362 -144q96 0 158.5 47t62.5 136.5t-71.5 141.5t-198.5 52q-68 0 -190 -39v236l274 323h-448z" />
+<glyph unicode="4" horiz-adv-x="1204" d="M649 618v250h307v-250h162v-276h-162v-342h-307v342h-575v244l510 846h348l-486 -814h203z" />
+<glyph unicode="5" horiz-adv-x="1220" d="M1036 1432v-277h-565v-240q63 18 145 19q207 0 356.5 -125t149.5 -337t-154.5 -350t-381.5 -138q-291 0 -486 215l168 233q18 -18 49 -45t113 -71t164 -44t145.5 49.5t63.5 145.5t-68.5 148.5t-177 52.5t-252.5 -78l-133 143v699h864z" />
+<glyph unicode="6" horiz-adv-x="1290" d="M725 1190q-133 0 -206 -89t-89 -243q133 86 283 86q201 0 335 -131t134 -349t-144.5 -349t-363.5 -131q-152 0 -263.5 58t-172.5 163q-123 203 -123 508q0 197 48 345t132 234q164 172 405 172q100 0 191.5 -29.5t140.5 -60.5t109 -78l-152 -225q-12 12 -35.5 32.5 t-93 53.5t-135.5 33zM523.5 617.5q-64.5 -56.5 -64.5 -146.5t61.5 -154.5t153.5 -64.5t153.5 57.5t61.5 148.5t-55.5 153.5t-150.5 62.5t-159.5 -56.5z" />
+<glyph unicode="7" horiz-adv-x="1185" d="M96 973v459h1034v-242l-579 -1190h-348l553 1157h-361v-184h-299z" />
+<glyph unicode="8" horiz-adv-x="1314" d="M657 1464q213 0 354.5 -112.5t141.5 -277.5t-127 -283q178 -137 178 -361q0 -188 -151.5 -317t-395 -129t-395 129t-151.5 317q0 223 178 361q-129 121 -129 284.5t142 276t355 112.5zM657 250q84 0 156 48t72 140t-70 141.5t-158 49.5t-157.5 -49.5t-69.5 -141.5 t71.5 -140t155.5 -48zM657.5 874q77.5 0 136 49.5t58.5 122t-57.5 122t-137 49.5t-137 -49.5t-57.5 -122t58.5 -122t136 -49.5z" />
+<glyph unicode="9" horiz-adv-x="1288" d="M563 258q133 0 206 89t89 243q-131 -88 -283 -88q-201 0 -335 132t-134 349t144.5 349t363.5 132q152 0 263.5 -58t175.5 -163q121 -203 121 -508q0 -197 -48.5 -345t-130.5 -234q-168 -172 -407 -172q-100 0 -192.5 29.5t-139.5 59t-109 77.5l160 225q14 -12 38 -31.5 t91.5 -52.5t126.5 -33zM765.5 829.5q63.5 55.5 63.5 145.5t-61 155.5t-153.5 65.5t-150.5 -58.5t-58 -148.5t53 -152.5t148 -62.5t158.5 55.5z" />
+<glyph unicode=":" horiz-adv-x="634" d="M137 164q0 76 52.5 128t128 52t128 -52t52.5 -128t-52.5 -128t-128 -52t-128 52t-52.5 128zM137 702.5q0 75.5 52.5 128t128 52.5t128 -52.5t52.5 -128t-52.5 -128t-128 -52.5t-128 52.5t-52.5 128z" />
+<glyph unicode=";" horiz-adv-x="645" d="M211 20q-74 53 -74 135.5t55.5 134.5t134.5 52t135 -51t56 -118t-59 -169l-127 -211h-201zM137 702.5q0 75.5 52.5 128t128 52.5t128 -52.5t52.5 -128t-52.5 -128t-128 -52.5t-128 52.5t-52.5 128z" />
+<glyph unicode="&#x3c;" horiz-adv-x="1230" d="M84 668v280l995 469v-301l-657 -303l657 -311v-303z" />
+<glyph unicode="=" horiz-adv-x="1202" d="M102 1102h998v-252h-998v252zM102 592h998v-252h-998v252z" />
+<glyph unicode="&#x3e;" horiz-adv-x="1230" d="M1147 948v-280l-995 -469v303l657 311l-657 303v301z" />
+<glyph unicode="?" horiz-adv-x="1073" d="M678 426h-311v154q0 84 21.5 126t90.5 113l139 144q31 37 31 95t-32.5 97t-86 39t-89 -46t-44.5 -122h-325q23 205 149.5 321.5t318 116.5t311.5 -104.5t120 -288.5q0 -82 -20.5 -122t-29 -57.5t-38 -52t-39.5 -44.5q-49 -49 -93 -92.5t-58.5 -71t-14.5 -82.5v-123z M346 164q0 76 52.5 128t128 52t128 -52t52.5 -128t-52.5 -128t-128 -52t-128 52t-52.5 128z" />
+<glyph unicode="@" horiz-adv-x="1824" d="M1409 250q55 0 97 88t42 221q0 289 -165.5 478.5t-444.5 189.5t-469 -199t-190 -476.5t179 -461.5t443 -184q207 0 365 151l84 -145q-82 -72 -209 -116t-240 -44q-342 0 -572.5 228.5t-230.5 571.5t243 585.5t585 242.5t571 -233.5t229 -581.5q0 -225 -93 -361t-244 -136 q-78 0 -142.5 47t-89.5 118q-113 -145 -286 -145t-301 131t-128 333t116 340t304 138q63 0 120.5 -27.5t82.5 -54.5l27 -26v84h256v-654q0 -102 61 -102zM1039.5 729.5q-54.5 67.5 -142.5 67.5t-140 -67.5t-52 -167t52 -173.5t142 -74t142.5 71t52.5 173.5t-54.5 170z" />
+<glyph unicode="A" d="M1196 0l-133 309h-600l-133 -309h-340l618 1432h310l618 -1432h-340zM764 1006l-180 -416h358z" />
+<glyph unicode="B" horiz-adv-x="1411" d="M803 0h-627v1432h557q145 0 251 -35t159 -94q96 -111 96 -250q0 -168 -109 -250q-37 -29 -51 -36t-51 -24q133 -29 212 -120t79 -226q0 -150 -102 -264q-119 -133 -414 -133zM496 852h151q133 0 197.5 28.5t64.5 124t-59 126t-201 30.5h-153v-309zM496 270h219 q137 0 205.5 34t68.5 133.5t-72.5 131t-232.5 31.5h-188v-330z" />
+<glyph unicode="C" horiz-adv-x="1499" d="M834 283q236 0 385 186l204 -211q-244 -274 -574.5 -274t-544.5 208.5t-214 527t218 531.5t534 213q352 0 590 -268l-199 -225q-152 188 -377 188q-180 0 -308 -117.5t-128 -317.5t121 -320.5t293 -120.5z" />
+<glyph unicode="D" horiz-adv-x="1574" d="M1270 1244.5q205 -187.5 205 -521.5t-200 -528.5t-609 -194.5h-490v1432h506q383 0 588 -187.5zM1035.5 393.5q117.5 110.5 117.5 321.5t-117.5 324.5t-361.5 113.5h-178v-870h202q220 0 337.5 110.5z" />
+<glyph unicode="E" horiz-adv-x="1339" d="M1208 1432v-285h-712v-295h641v-272h-641v-297h735v-283h-1055v1432h1032z" />
+<glyph unicode="F" horiz-adv-x="1253" d="M1159 1432v-281h-663v-309h630v-281h-630v-561h-320v1432h983z" />
+<glyph unicode="G" horiz-adv-x="1536" d="M1106 729h321v-508q-213 -238 -589 -237q-315 0 -529.5 208.5t-214.5 527t218 531.5t526.5 213t535.5 -202l-166 -240q-96 84 -177 115.5t-175 31.5q-182 0 -307 -123.5t-125 -326.5t120 -325t285.5 -122t276.5 64v393z" />
+<glyph unicode="H" horiz-adv-x="1560" d="M1065 1432h319v-1432h-319v563h-569v-563h-320v1432h320v-598h569v598z" />
+<glyph unicode="I" horiz-adv-x="671" d="M176 1432h320v-1432h-320v1432z" />
+<glyph unicode="J" horiz-adv-x="1138" d="M229 1157v275h746v-934q0 -256 -132 -383t-339 -127q-258 0 -451 198l166 230q129 -139 270 -140q68 0 116 52.5t48 156.5v672h-424z" />
+<glyph unicode="K" horiz-adv-x="1454" d="M176 1432h320v-588l540 588h396l-570 -633q74 -102 272.5 -382t297.5 -417h-373l-420 565l-143 -159v-406h-320v1432z" />
+<glyph unicode="L" horiz-adv-x="1163" d="M176 0v1432h320v-1147h610v-285h-930z" />
+<glyph unicode="M" horiz-adv-x="1953" d="M1458 901l-387 -782h-190l-385 782v-901h-320v1432h432l369 -787l371 787h430v-1432h-320v901z" />
+<glyph unicode="N" horiz-adv-x="1673" d="M1178 1432h319v-1432h-319l-682 897v-897h-320v1432h299l703 -922v922z" />
+<glyph unicode="O" horiz-adv-x="1691" d="M1149 1050.5q-123 135.5 -302 135.5t-302 -135.5t-123 -327t123 -325.5t302 -134t302 134t123 325.5t-123 327zM845.5 -14q-317.5 0 -534.5 212t-217 527t217 527t534.5 212t534.5 -212t217 -527t-217 -527t-534.5 -212z" />
+<glyph unicode="P" horiz-adv-x="1386" d="M1162.5 1304q150.5 -128 150.5 -393.5t-154.5 -388.5t-472.5 -123h-190v-399h-320v1432h506q330 0 480.5 -128zM927.5 740.5q57.5 64.5 57.5 188.5t-74.5 176t-232.5 52h-182v-481h215q159 0 216.5 64.5z" />
+<glyph unicode="Q" horiz-adv-x="1693" d="M1597 725q0 -223 -113.5 -401.5t-305.5 -266.5q18 -31 58 -52t83 -21t84 13t65 32q53 43 76 84l166 -199q-176 -186 -440 -186q-123 0 -242 67.5t-182 190.5q-317 0 -534.5 212t-217.5 527t217 527t534.5 212t534.5 -212t217 -527zM1149 1050.5q-123 135.5 -302 135.5 t-302 -135.5t-123 -327t123 -325.5t302 -134t302 134t123 325.5t-123 327z" />
+<glyph unicode="R" horiz-adv-x="1488" d="M1337 956q0 -344 -272 -444l362 -512h-393l-317 457h-221v-457h-320v1432h543q334 0 476 -113t142 -363zM952.5 786.5q59.5 53.5 59.5 169t-61.5 158.5t-215.5 43h-239v-424h233q164 0 223.5 53.5z" />
+<glyph unicode="S" horiz-adv-x="1306" d="M511 1146q-46 -38 -46 -100.5t56.5 -99.5t260 -87t316 -150.5t112.5 -293t-144 -312t-380 -119.5q-340 0 -612 252l190 233q231 -203 428 -203q88 0 138.5 38t50.5 102.5t-53.5 102.5t-211.5 77q-250 59 -365.5 154.5t-115.5 299t146.5 314t365.5 110.5q143 0 286.5 -49 t250.5 -139l-162 -234q-186 141 -385 142q-80 0 -126 -38z" />
+<glyph unicode="T" horiz-adv-x="1245" d="M782 1155v-1155h-319v1155h-406v277h1131v-277h-406z" />
+<glyph unicode="U" horiz-adv-x="1538" d="M770 270q135 0 214 99.5t79 271.5v791h319v-801q0 -311 -172 -478t-440 -167t-441 168t-173 477v801h319v-791q0 -172 80 -271.5t215 -99.5z" />
+<glyph unicode="V" horiz-adv-x="1409" d="M705 520l364 912h346l-575 -1432h-271l-575 1432h346z" />
+<glyph unicode="W" horiz-adv-x="2086" d="M623 608l254 824h333l252 -824l285 824h346l-500 -1432h-237l-314 995l-311 -995h-237l-500 1432h346z" />
+<glyph unicode="X" horiz-adv-x="1423" d="M981 1432h385l-446 -691l483 -741h-389l-305 471l-303 -471h-386l482 733l-449 699h383l273 -424z" />
+<glyph unicode="Y" horiz-adv-x="1265" d="M793 0h-320v565l-496 867h347l309 -533l309 533h346l-495 -867v-565z" />
+<glyph unicode="Z" horiz-adv-x="1394" d="M94 0v219l750 936h-725v277h1161v-222l-748 -931h760v-279h-1198z" />
+<glyph unicode="[" horiz-adv-x="765" d="M684 1550v-231h-264v-1362h264v-231h-526v1824h526z" />
+<glyph unicode="\" horiz-adv-x="1171" d="M57 1550h310l745 -1550h-309z" />
+<glyph unicode="]" horiz-adv-x="765" d="M82 -274v231h264v1362h-264v231h526v-1824h-526z" />
+<glyph unicode="^" horiz-adv-x="989" d="M338 1579h-293l281 363h338l280 -363h-293l-157 174z" />
+<glyph unicode="_" horiz-adv-x="1474" d="M137 -270v178h1200v-178h-1200z" />
+<glyph unicode="`" horiz-adv-x="782" d="M680 1575h-293l-285 229l316 135z" />
+<glyph unicode="a" horiz-adv-x="1216" d="M1081 0h-288v133q-119 -150 -294 -149.5t-294 101.5t-119 270t123 253t336 84h229v6q0 176 -186 176q-80 0 -169 -31.5t-151 -78.5l-137 199q217 158 496 157q201 0 327.5 -100t126.5 -318v-702zM772 420v53h-192q-184 0 -185 -115q0 -59 44 -90.5t126 -31.5t144.5 50 t62.5 134z" />
+<glyph unicode="b" horiz-adv-x="1363" d="M1130.5 963.5q149.5 -156.5 149.5 -402.5t-153.5 -411.5t-349 -165.5t-324.5 161v-145h-308v1520h308v-541q127 141 327.5 141t350 -156.5zM523.5 331q74.5 -85 181 -85t186.5 85t80 218t-78 223t-186.5 90t-183 -89t-74.5 -223t74.5 -219z" />
+<glyph unicode="c" horiz-adv-x="1191" d="M674 256q154 0 276 154l183 -205q-213 -221 -461 -221t-419 156.5t-171 409.5t173 411.5t411 158.5q119 0 240.5 -49t213.5 -145l-159 -209q-53 63 -130 98t-153 35q-121 0 -208 -79t-87 -219t87 -218t204 -78z" />
+<glyph unicode="d" horiz-adv-x="1363" d="M237.5 149.5q-153.5 165.5 -153.5 411.5t149.5 402.5t350 156.5t327.5 -141v541h308v-1520h-308v145q-129 -162 -324.5 -161.5t-349 166zM473 331q80 -85 186.5 -85t181 85t74.5 219t-74.5 223t-183 89t-186.5 -90t-78 -223t80 -218z" />
+<glyph unicode="e" horiz-adv-x="1265" d="M1100 160q-186 -176 -437 -176t-415 154.5t-164 414.5t167 413.5t394 153.5t386 -137t159 -377v-164h-803q14 -90 94 -147t181 -57q162 0 266 108zM804.5 813q-63.5 53 -154.5 53t-166.5 -55t-88.5 -149h484q-11 98 -74.5 151z" />
+<glyph unicode="f" horiz-adv-x="823" d="M512 1165v-73h266v-222h-266v-870h-309v870h-129v222h129v67q0 180 109.5 285.5t272.5 105.5t296 -123l-111 -206q-68 78 -149 77q-47 0 -78 -33.5t-31 -99.5z" />
+<glyph unicode="g" horiz-adv-x="1366" d="M844 782.5q-74 75.5 -182.5 75.5t-187.5 -75.5t-79 -207t77 -212t187.5 -80.5t184.5 79.5t74 212t-74 208zM961 186q-145 -162 -361.5 -161.5t-365 146.5t-148.5 391t152.5 401.5t349 156.5t325.5 -162v146h308v-961q0 -147 -51.5 -261.5t-137.5 -180.5 q-170 -135 -401 -135q-123 0 -251 40t-224 113l118 232q152 -115 321 -115t267.5 84t98.5 266z" />
+<glyph unicode="h" horiz-adv-x="1308" d="M453 594v-594h-308v1520h308v-541q139 141 312 141t292 -123t119 -327v-670h-308v602q0 254 -186 254q-92 0 -160.5 -66.5t-68.5 -195.5z" />
+<glyph unicode="i" horiz-adv-x="598" d="M453 0h-308v1102h308v-1102zM119 1370q0 76 52 128t128 52t128 -52t52 -128t-52 -128t-128 -52t-128 52t-52 128z" />
+<glyph unicode="j" horiz-adv-x="702" d="M250 -20v1124h307v-1149q0 -180 -109.5 -284.5t-268.5 -104.5t-302 131l141 227q61 -72 138 -71q41 0 67.5 32t26.5 95zM223 1370q0 76 52.5 128t128 52t128 -52t52.5 -128t-52.5 -128t-128 -52t-128 52t-52.5 128z" />
+<glyph unicode="k" horiz-adv-x="1218" d="M453 0h-308v1520h308v-781l342 365h387l-420 -447l436 -657h-364l-281 422l-100 -105v-317z" />
+<glyph unicode="l" horiz-adv-x="598" d="M453 0h-308v1520h308v-1520z" />
+<glyph unicode="m" horiz-adv-x="2013" d="M1157 594v-594h-309v602q0 131 -40 192.5t-129 61.5t-157.5 -66.5t-68.5 -195.5v-594h-308v1102h308v-125q127 143 290 143q104 0 189.5 -61.5t128.5 -149.5q63 100 170.5 155.5t216.5 55.5q195 0 313.5 -115.5t118.5 -334.5v-670h-309v602q0 254 -187 254 q-92 0 -159.5 -66.5t-67.5 -195.5z" />
+<glyph unicode="n" horiz-adv-x="1308" d="M453 614v-614h-308v1102h308v-123q139 141 313 141t292 -123t118 -327v-670h-308v623q0 254 -186 254q-92 0 -160.5 -67t-68.5 -196z" />
+<glyph unicode="o" horiz-adv-x="1329" d="M468 331q77 -85 196.5 -85t196.5 85t77 220t-77 221t-196.5 86t-196.5 -86t-77 -221t77 -220zM1081 147.5q-166 -163.5 -416.5 -163.5t-416.5 163.5t-166 403.5t166 404.5t416.5 164.5t416.5 -164.5t166 -404.5t-166 -403.5z" />
+<glyph unicode="p" horiz-adv-x="1363" d="M1129.5 959.5q150.5 -160.5 150.5 -404.5t-150.5 -407.5t-352.5 -163.5t-324 161v-542h-308v1499h308v-123q141 141 333.5 141t343 -160.5zM523.5 331q74.5 -85 181 -85t186.5 85t80 218t-78 223t-186.5 90t-183 -89t-74.5 -223t74.5 -219z" />
+<glyph unicode="q" horiz-adv-x="1363" d="M241.5 142.5q-157.5 158.5 -157.5 407.5t153.5 409.5t342 160.5t329.5 -141v123h310v-1499h-310v485q-131 -104 -299 -104q-211 0 -368.5 158.5zM473 331q80 -85 186.5 -85t180 85t73.5 219t-73.5 223t-182 89t-186.5 -89t-78 -223t80 -219z" />
+<glyph unicode="r" horiz-adv-x="841" d="M725 831q-137 0 -204.5 -97t-67.5 -257v-477h-308v1102h308v-146q59 68 148 115t181 49l2 -289h-59z" />
+<glyph unicode="s" horiz-adv-x="1064" d="M855 82q-120 -98 -304 -98q-123 0 -256 44t-240 130l135 192q172 -133 367 -133q59 0 94 23.5t35 62.5t-48 72t-139 61.5t-139.5 49t-109.5 59.5q-125 78 -125 230.5t123 248.5t317.5 96t388.5 -131l-114 -205q-143 98 -285.5 98.5t-142.5 -77.5q0 -43 45 -67.5 t149.5 -57.5t148.5 -50.5t105 -54.5q115 -70 115 -232.5t-120 -260.5z" />
+<glyph unicode="t" horiz-adv-x="901" d="M512 881v-494q0 -63 33 -99t78 -36q86 0 145 78l115 -215q-143 -131 -302 -131t-268.5 104.5t-109.5 284.5v508h-129v221h129v330h309v-330h266v-221h-266z" />
+<glyph unicode="u" horiz-adv-x="1310" d="M856 508v594h309v-1102h-309v145q-115 -162 -296 -161.5t-304 114t-123 336.5v668h309v-600q0 -254 187 -254q92 0 159.5 66.5t67.5 193.5z" />
+<glyph unicode="v" horiz-adv-x="1200" d="M442 0l-436 1104h320l274 -694l274 694h320l-436 -1104h-316z" />
+<glyph unicode="w" horiz-adv-x="1847" d="M719 0h-318l-374 1102h317l215 -666l215 666h297l215 -666l215 666h320l-375 -1102h-320l-202 600z" />
+<glyph unicode="x" horiz-adv-x="1198" d="M414 1102l188 -295l195 295h360l-379 -539l393 -563h-366l-215 303l-209 -303h-354l385 561l-365 541h367z" />
+<glyph unicode="y" horiz-adv-x="1208" d="M336 -434q-162 0 -305 131l139 227q78 -76 160 -76q43 0 73.5 42t30.5 89.5t-426 1122.5h328l268 -686l268 686h328l-512 -1299q-45 -113 -140 -175t-212 -62z" />
+<glyph unicode="z" horiz-adv-x="1132" d="M125 848v254h889v-240l-535 -606h565v-256h-958v254l520 594h-481z" />
+<glyph unicode="{" horiz-adv-x="737" d="M637 1300l-43 3q-90 0 -90 -80v-428q0 -109 -76 -160q76 -49 76 -158v-446q0 -68 133 -68v-250h-113q-307 0 -307 293v420q0 84 -47 84h-94v250h94q47 0 47 86v411q0 293 307 293h113v-250z" />
+<glyph unicode="|" horiz-adv-x="565" d="M156 -299v1890h254v-1890h-254z" />
+<glyph unicode="}" horiz-adv-x="737" d="M100 -37l43 -2q90 0 90 80v428q0 109 76 160q-76 49 -76 157v447q0 68 -133 67v250h113q307 0 307 -293v-419q0 -84 47 -84h95v-250h-95q-47 0 -47 -86v-412q0 -293 -307 -293h-113v250z" />
+<glyph unicode="~" horiz-adv-x="1095" d="M731 848q68 0 68 88q0 20 -6 45l245 -66q-12 -170 -90 -246.5t-194 -76.5q-70 0 -200 66.5t-169 66.5t-65.5 -39t-24.5 -111l-244 74q14 164 96 247t211 83q74 0 201 -65.5t172 -65.5z" />
+<glyph unicode="&#xa1;" horiz-adv-x="651" d="M508 0h-363v270l60 738h241l62 -738v-270zM145 1284q0 76 52.5 128t128 52t128 -52t52.5 -128t-52.5 -128t-128 -52t-128 52t-52.5 128z" />
+<glyph unicode="&#xa2;" horiz-adv-x="1224" d="M770 -240h-197v232q-203 33 -341 182.5t-138 374.5t137.5 376.5t341.5 184.5v236h197v-234q209 -31 363 -186l-160 -209q-84 96 -203 123v-572q53 16 101.5 51t70.5 62l21 29l182 -205q-170 -178 -375 -211v-234zM444.5 726q-49.5 -71 -49.5 -174t49.5 -175t128.5 -101 v551q-79 -30 -128.5 -101z" />
+<glyph unicode="&#xa3;" horiz-adv-x="1286" d="M604 1040v-223h320v-258h-320v-287h570v-272h-1047v272h156v287h-164v258h164v211q0 254 130 369.5t341 115.5q283 0 430 -258l-228 -184q-33 76 -84 119t-112.5 43t-108.5 -46.5t-47 -146.5z" />
+<glyph unicode="&#xa4;" horiz-adv-x="1558" d="M291 334q-94 137 -94 314t90 315l-172 174l192 194l182 -182q133 72 291 72t289 -74l182 184l193 -194l-172 -176q90 -139 90 -312.5t-96 -314.5l178 -180l-191 -195l-190 193q-135 -70 -287.5 -70t-279.5 70l-191 -193l-190 195zM778.5 356q114.5 0 188 83t73.5 212 t-73.5 211t-188 82t-188.5 -82t-74 -211t74 -212t188.5 -83z" />
+<glyph unicode="&#xa5;" horiz-adv-x="1517" d="M221 459h365v112h-365v197h234l-385 662h348l338 -584l350 584h346l-397 -662h225v-197h-360v-112h360v-197h-360v-262h-334v262h-365v197z" />
+<glyph unicode="&#xa6;" horiz-adv-x="602" d="M164 838v706h274v-706h-274zM164 -47v704h274v-704h-274z" />
+<glyph unicode="&#xa7;" horiz-adv-x="1273" d="M523 1233q-38 -31 -38 -83t48.5 -84t191.5 -69q246 -59 352.5 -142t106.5 -239q0 -207 -209 -292q131 -88 131 -236.5t-125 -253t-334 -104.5q-293 0 -538 223l172 207q215 -180 372.5 -180t157.5 98q0 49 -57.5 84t-240.5 88t-297 140t-114 253q0 86 50.5 163t144.5 118 q-111 78 -111 211q0 168 125 273t320 105q135 0 241.5 -37.5t223.5 -123.5l-154 -219q-172 131 -315 131q-66 0 -104 -31zM375 651q0 -78 99 -128t253 -50q78 0 131 34t53 89q0 84 -121.5 125t-220.5 41q-194 0 -194 -111z" />
+<glyph unicode="&#xa8;" horiz-adv-x="1087" d="M195 1415.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5zM590 1415.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5z" />
+<glyph unicode="&#xa9;" horiz-adv-x="1687" d="M1583 717q0 -305 -216 -523.5t-525.5 -218.5t-523.5 216.5t-214 521.5t216.5 524t523.5 219t523 -217t216 -522zM1432 716.5q0 241.5 -172.5 414t-415 172.5t-415.5 -174.5t-173 -416t170 -413.5t415.5 -172t418 174t172.5 415.5zM852 299q-172 0 -297 116.5t-125 305 t129 306.5t317.5 118t327.5 -146l-123 -153q-82 98 -207 98q-88 0 -150 -58.5t-62 -161.5t64.5 -163.5t154.5 -60.5q133 0 204 118l127 -153q-157 -166 -360 -166z" />
+<glyph unicode="&#xaa;" horiz-adv-x="733" d="M592 938h-152v63q-45 -70 -133 -69.5t-145.5 47.5t-57.5 125t60.5 118t163.5 40h104v6q0 88 -78 88q-61 0 -127 -29l-20 -10l-49 90q88 57 198 57q236 0 236 -194v-332zM430 1135v30h-90q-74 0 -74 -61q0 -29 18.5 -45.5t54.5 -16.5t63.5 25t27.5 68z" />
+<glyph unicode="&#xab;" horiz-adv-x="1236" d="M657 879l-241 -377l241 -379h-309l-250 379l250 377h309zM1118 879l-241 -377l241 -379h-309l-250 379l250 377h309z" />
+<glyph unicode="&#xac;" horiz-adv-x="1673" d="M129 911h1370v-731h-229v490h-1141v241z" />
+<glyph unicode="&#xad;" horiz-adv-x="1003" d="M137 479v273h729v-273h-729z" />
+<glyph unicode="&#xae;" horiz-adv-x="1687" d="M1583 717q0 -305 -216 -523.5t-525.5 -218.5t-523.5 216.5t-214 521.5t216.5 524t523.5 219t523 -217t216 -522zM1268 309q164 170 164 409.5t-172.5 412t-415 172.5t-415.5 -174.5t-173 -416t170 -413.5t418 -172t420 178h-238l-178 256h-90v-256h-226v832h330 q197 0 281 -68t84 -217q0 -182 -166 -254zM975 771q29 26 29 82t-30 77.5t-104 21.5h-112v-207h108q80 0 109 26z" />
+<glyph unicode="&#xaf;" horiz-adv-x="905" d="M795 1407v-238h-682v238h682z" />
+<glyph unicode="&#xb0;" horiz-adv-x="876" d="M438.5 1462q141.5 0 241.5 -98t100 -236.5t-100 -235.5t-241.5 -97t-242 97t-100.5 235.5t100.5 236.5t242 98zM334 1011q43 -48 104.5 -48t103.5 47t42 116.5t-42 116.5t-103.5 47t-104.5 -47t-43 -115.5t43 -116.5z" />
+<glyph unicode="&#xb1;" horiz-adv-x="1189" d="M453 1335h282v-295h357v-239h-357v-285h-282v285h-355v239h355v295zM98 414h994v-232h-994v232z" />
+<glyph unicode="&#xb2;" horiz-adv-x="899" d="M491.5 1111q30.5 42 30.5 79t-22.5 61.5t-57.5 24.5q-68 0 -143 -121l-178 107q66 100 140.5 151t190 51t203.5 -72.5t88 -197.5q0 -66 -34.5 -127t-126.5 -158l-127 -133h313v-196h-629v157l250 258q72 74 102.5 116z" />
+<glyph unicode="&#xb3;" horiz-adv-x="892" d="M156 1243v189h557v-150l-162 -186q96 -25 148.5 -95.5t52.5 -158.5q0 -137 -95.5 -217t-244 -80t-308.5 110l95 170q117 -88 219 -88q49 0 80.5 24.5t31.5 74t-44 75t-111.5 25.5t-118.5 -25v154l150 178h-250z" />
+<glyph unicode="&#xb4;" horiz-adv-x="782" d="M395 1579h-293l260 363l318 -134z" />
+<glyph unicode="&#xb5;" horiz-adv-x="1325" d="M162 -379v1481h309v-600q0 -254 186 -254q92 0 160 66.5t68 193.5v594h309v-1102h-309v92q-121 -109 -291 -108q-72 0 -123 14v-377h-309z" />
+<glyph unicode="&#xb6;" horiz-adv-x="1458" d="M70 1122q0 180 123.5 303t377.5 123h701v-1763h-273v1509h-200v-1509h-267v928h-40q-266 0 -369 196q-53 100 -53 213z" />
+<glyph unicode="&#xb7;" horiz-adv-x="610" d="M125 651q0 76 52 128t128 52t128 -52t52 -128t-52 -128t-128 -52t-128 52t-52 128z" />
+<glyph unicode="&#xb8;" horiz-adv-x="575" d="M500 -260q0 -88 -73 -153.5t-183.5 -65.5t-214.5 65l77 176q45 -39 80 -38.5t54.5 18.5t19.5 46t-24.5 49.5t-58.5 21.5t-73 -19l84 160h236l-57 -104q133 -45 133 -156z" />
+<glyph unicode="&#xb9;" horiz-adv-x="610" d="M82 1432h379v-867h-219v680h-160v187z" />
+<glyph unicode="&#xba;" horiz-adv-x="804" d="M326.5 1085.5q29.5 -34.5 76 -34.5t76 34.5t29.5 91t-29.5 92.5t-76 36t-76 -36t-29.5 -92.5t29.5 -91zM618.5 972q-86.5 -83 -216.5 -83t-216 84t-86 203.5t86 203.5t216 84t216.5 -84t86.5 -204.5t-86.5 -203.5z" />
+<glyph unicode="&#xbb;" horiz-adv-x="1236" d="M821 502l-241 377h309l250 -377l-250 -379h-309zM360 502l-241 377h309l250 -377l-250 -379h-309z" />
+<glyph unicode="&#xbc;" horiz-adv-x="1751" d="M1151 1544h235l-745 -1560h-235zM74 1430h377v-865h-220v678h-157v187zM1395 537h186v-172h94v-164h-94v-201h-186v201h-367v157l301 506h225l-299 -499h140v172z" />
+<glyph unicode="&#xbd;" horiz-adv-x="1798" d="M1128 1544h238l-745 -1560h-238zM74 1432h377v-867h-220v680h-157v187zM1433.5 531q30.5 42 30.5 79t-22.5 61.5t-57.5 24.5q-68 0 -143 -121l-178 107q66 100 140.5 151.5t190 51.5t204 -73t88.5 -198q0 -66 -35 -127t-127 -157l-127 -133h313v-197h-629v158l250 258 q72 73 102.5 115z" />
+<glyph unicode="&#xbe;" horiz-adv-x="1845" d="M1243 1544h236l-746 -1560h-235zM131 1243v189h557v-150l-162 -186q96 -25 148.5 -95.5t52.5 -158.5q0 -137 -95 -217t-243.5 -80t-308.5 110l94 170q117 -88 219 -88q49 0 81 24.5t32 74t-44 75t-111.5 25.5t-119.5 -25v154l150 178h-250zM1491 537h186v-172h95v-164 h-95v-201h-186v201h-367v157l301 506h226l-299 -499h139v172z" />
+<glyph unicode="&#xbf;" horiz-adv-x="1077" d="M399 1022h312v-154q0 -84 -21.5 -126t-91.5 -113l-139 -144q-31 -37 -31 -95t33 -97t86 -39t89 46t44 122h326q-23 -205 -150 -321.5t-318.5 -116.5t-311.5 104.5t-120 288.5q0 82 20.5 122t29 57t38 52t39.5 43q49 51 93.5 94t58.5 71t14 83v123zM731 1284 q0 -76 -52 -128t-128 -52t-128 52t-52 128t52 128t128 52t128 -52t52 -128z" />
+<glyph unicode="&#xc0;" d="M1196 0l-133 309h-600l-133 -309h-340l618 1432h310l618 -1432h-340zM764 1006l-180 -416h358zM918 1575h-293l-285 229l315 135z" />
+<glyph unicode="&#xc1;" d="M1196 0l-133 309h-600l-133 -309h-340l618 1432h310l618 -1432h-340zM764 1006l-180 -416h358zM899 1579h-293l260 363l318 -134z" />
+<glyph unicode="&#xc2;" d="M1196 0l-133 309h-600l-133 -309h-340l618 1432h310l618 -1432h-340zM764 1006l-180 -416h358zM580 1575h-252l231 323h383l232 -323h-252l-172 166z" />
+<glyph unicode="&#xc3;" d="M1196 0l-133 309h-600l-133 -309h-340l618 1432h310l618 -1432h-340zM764 1006l-180 -416h358zM633 1681q-63 0 -62 -106h-217q0 154 66.5 242t171.5 88q66 0 159 -56.5t113 -56.5q63 0 62 106h217q0 -154 -66.5 -241.5t-171.5 -87.5q-63 0 -159.5 56t-112.5 56z" />
+<glyph unicode="&#xc4;" d="M1196 0l-133 309h-600l-133 -309h-340l618 1432h310l618 -1432h-340zM764 1006l-180 -416h358zM420 1734.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5zM815 1734.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5 t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5z" />
+<glyph unicode="&#xc5;" d="M606 1430q-61 66 -61 154.5t64.5 153t154.5 64.5t154.5 -64.5t64.5 -154.5t-65 -156l618 -1427h-340l-133 309h-600l-133 -309h-340zM764 1006l-180 -416h358zM692 1583q0 -29 21.5 -50.5t50.5 -21.5t50.5 21.5t21.5 50.5t-21.5 50.5t-50.5 21.5t-50.5 -21.5t-21.5 -50.5 z" />
+<glyph unicode="&#xc6;" horiz-adv-x="2095" d="M1966 1432v-281h-715v-309h641v-269h-641v-292h738v-281h-1078v309h-405l-162 -309h-377l735 1432h1264zM911 598v504l-260 -504h260z" />
+<glyph unicode="&#xc7;" horiz-adv-x="1499" d="M834 283q236 0 385 186l204 -211q-207 -233 -495 -268l-54 -99q133 -45 134 -155q0 -88 -73 -153.5t-183.5 -65.5t-214.5 65l77 176q45 -39 80 -39t54.5 18.5t19.5 46.5t-24.5 49.5t-58.5 21.5t-73 -19l84 160q-266 45 -436 244.5t-170 498.5t218 512t534 213 q352 0 590 -268l-199 -225q-152 188 -377 188q-180 0 -308 -117.5t-128 -317.5t121 -320.5t293 -120.5z" />
+<glyph unicode="&#xc8;" horiz-adv-x="1339" d="M1208 1432v-285h-712v-295h641v-272h-641v-297h735v-283h-1055v1432h1032zM827 1575h-292l-285 229l315 135z" />
+<glyph unicode="&#xc9;" horiz-adv-x="1339" d="M1208 1432v-285h-712v-295h641v-272h-641v-297h735v-283h-1055v1432h1032zM809 1579h-293l260 363l318 -134z" />
+<glyph unicode="&#xca;" horiz-adv-x="1339" d="M1208 1432v-285h-712v-295h641v-272h-641v-297h735v-283h-1055v1432h1032zM489 1575h-251l231 323h383l231 -323h-252l-172 166z" />
+<glyph unicode="&#xcb;" horiz-adv-x="1339" d="M1208 1432v-285h-712v-295h641v-272h-641v-297h735v-283h-1055v1432h1032zM348 1734.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5zM743 1734.5q0 63.5 44 107.5t107.5 44t108 -44t44.5 -107.5t-44.5 -107.5t-108 -44 t-107.5 44t-44 107.5z" />
+<glyph unicode="&#xcc;" horiz-adv-x="671" d="M176 1432h320v-1432h-320v1432zM502 1575h-293l-285 229l316 135z" />
+<glyph unicode="&#xcd;" horiz-adv-x="671" d="M176 1432h320v-1432h-320v1432zM483 1579h-293l261 363l317 -134z" />
+<glyph unicode="&#xce;" horiz-adv-x="671" d="M176 1432h320v-1432h-320v1432zM166 1577h-252l231 324h383l232 -324h-252l-172 166z" />
+<glyph unicode="&#xcf;" horiz-adv-x="671" d="M176 1432h320v-1432h-320v1432zM-14 1734.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5zM381 1734.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5z" />
+<glyph unicode="&#xd0;" horiz-adv-x="1605" d="M53 573v273h152v586h506q383 0 587.5 -187.5t204.5 -521.5t-199.5 -528.5t-609.5 -194.5h-489v573h-152zM1064 393.5q118 110.5 118 321.5t-118 324.5t-362 113.5h-178v-307h480v-273h-480v-290h203q219 0 337 110.5z" />
+<glyph unicode="&#xd1;" horiz-adv-x="1673" d="M1178 1432h319v-1432h-319l-682 897v-897h-320v1432h299l703 -922v922zM717 1679q-63 0 -62 -106h-217q0 154 66.5 242t171.5 88q66 0 159 -56.5t113 -56.5q63 0 62 106h217q0 -154 -66.5 -241.5t-171.5 -87.5q-63 0 -159.5 56t-112.5 56z" />
+<glyph unicode="&#xd2;" horiz-adv-x="1691" d="M1149 1050.5q-123 135.5 -302 135.5t-302 -135.5t-123 -327t123 -325.5t302 -134t302 134t123 325.5t-123 327zM845.5 -14q-317.5 0 -534.5 212t-217 527t217 527t534.5 212t534.5 -212t217 -527t-217 -527t-534.5 -212zM1012 1575h-293l-285 229l316 135z" />
+<glyph unicode="&#xd3;" horiz-adv-x="1691" d="M1149 1050.5q-123 135.5 -302 135.5t-302 -135.5t-123 -327t123 -325.5t302 -134t302 134t123 325.5t-123 327zM845.5 -14q-317.5 0 -534.5 212t-217 527t217 527t534.5 212t534.5 -212t217 -527t-217 -527t-534.5 -212zM993 1579h-293l261 363l317 -134z" />
+<glyph unicode="&#xd4;" horiz-adv-x="1691" d="M1149 1050.5q-123 135.5 -302 135.5t-302 -135.5t-123 -327t123 -325.5t302 -134t302 134t123 325.5t-123 327zM845.5 -14q-317.5 0 -534.5 212t-217 527t217 527t534.5 212t534.5 -212t217 -527t-217 -527t-534.5 -212zM674 1575h-252l231 323h383l232 -323h-252 l-172 166z" />
+<glyph unicode="&#xd5;" horiz-adv-x="1691" d="M1149 1050.5q-123 135.5 -302 135.5t-302 -135.5t-123 -327t123 -325.5t302 -134t302 134t123 325.5t-123 327zM845.5 -14q-317.5 0 -534.5 212t-217 527t217 527t534.5 212t534.5 -212t217 -527t-217 -527t-534.5 -212zM727 1679q-63 0 -61 -106h-217q0 154 66.5 242 t170.5 88q66 0 159 -56.5t113 -56.5q63 0 62 106h217q0 -154 -66.5 -241.5t-171.5 -87.5q-63 0 -159.5 56t-112.5 56z" />
+<glyph unicode="&#xd6;" horiz-adv-x="1691" d="M1149 1050.5q-123 135.5 -302 135.5t-302 -135.5t-123 -327t123 -325.5t302 -134t302 134t123 325.5t-123 327zM845.5 -14q-317.5 0 -534.5 212t-217 527t217 527t534.5 212t534.5 -212t217 -527t-217 -527t-534.5 -212zM494 1734.5q0 63.5 44 107.5t107.5 44t107.5 -44 t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5zM889 1734.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5z" />
+<glyph unicode="&#xd7;" horiz-adv-x="1206" d="M604 924l326 333l176 -182l-322 -330l324 -333l-176 -183l-328 334l-325 -334l-181 183l328 333l-326 330l181 182z" />
+<glyph unicode="&#xd8;" horiz-adv-x="1691" d="M1597 725q0 -315 -217 -527t-534 -212q-80 0 -162 16l-106 -231h-289l149 327q-160 98 -252 263t-92 364q0 315 217 527t535 212q98 0 205 -26l96 211h291l-148 -322q143 -100 225 -258t82 -344zM846 1186q-178 0 -301 -135.5t-123 -338t143 -335.5l367 799 q-47 10 -86 10zM1149 398q123 134 123 320.5t-115 321.5l-352 -774q12 -2 41 -2q180 0 303 134z" />
+<glyph unicode="&#xd9;" horiz-adv-x="1538" d="M770 270q135 0 214 99.5t79 271.5v791h319v-801q0 -311 -172 -478t-440 -167t-441 168t-173 477v801h319v-791q0 -172 80 -271.5t215 -99.5zM932 1575h-293l-285 229l316 135z" />
+<glyph unicode="&#xda;" horiz-adv-x="1538" d="M770 270q135 0 214 99.5t79 271.5v791h319v-801q0 -311 -172 -478t-440 -167t-441 168t-173 477v801h319v-791q0 -172 80 -271.5t215 -99.5zM915 1579h-292l260 363l317 -134z" />
+<glyph unicode="&#xdb;" horiz-adv-x="1538" d="M770 270q135 0 214 99.5t79 271.5v791h319v-801q0 -311 -172 -478t-440 -167t-441 168t-173 477v801h319v-791q0 -172 80 -271.5t215 -99.5zM596 1575h-252l231 323h383l232 -323h-252l-172 166z" />
+<glyph unicode="&#xdc;" horiz-adv-x="1538" d="M770 270q135 0 214 99.5t79 271.5v791h319v-801q0 -311 -172 -478t-440 -167t-441 168t-173 477v801h319v-791q0 -172 80 -271.5t215 -99.5zM418 1734.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5zM813 1734.5 q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5z" />
+<glyph unicode="&#xdd;" horiz-adv-x="1265" d="M793 0h-320v565l-496 867h347l309 -533l309 533h346l-495 -867v-565zM739 1579h-293l261 363l317 -134z" />
+<glyph unicode="&#xde;" horiz-adv-x="1402" d="M1313 754q0 -279 -163 -403t-484 -124h-170v-227h-320v1432h320v-172h166q651 0 651 -506zM919.5 570.5q65.5 66.5 65.5 188.5t-82 173t-246 51h-161v-479h194q164 0 229.5 66.5z" />
+<glyph unicode="&#xdf;" horiz-adv-x="1325" d="M775.5 953.5q66.5 62.5 66.5 139t-39 131t-123 54.5q-119 0 -168 -84t-49 -246v-948h-320v922q0 201 41 315q16 51 55.5 114.5t92.5 102.5q123 96 325 96q117 0 208 -29.5t144.5 -73.5t88.5 -104q57 -104 57 -223q0 -190 -158 -319q121 -39 181.5 -140.5t60.5 -226.5 q0 -199 -138 -316.5t-396 -117.5h-127v258h90q252 0 252 176q0 195 -236 195q-43 0 -113 -6v247q138 21 204.5 83.5z" />
+<glyph unicode="&#xe0;" horiz-adv-x="1216" d="M1081 0h-288v133q-119 -150 -294 -149.5t-294 101.5t-119 270t123 253t336 84h229v6q0 176 -186 176q-80 0 -169 -31.5t-151 -78.5l-137 199q217 158 496 157q201 0 327.5 -100t126.5 -318v-702zM772 420v53h-192q-184 0 -185 -115q0 -59 44 -90.5t126 -31.5t144.5 50 t62.5 134zM844 1251h-293l-285 230l316 135z" />
+<glyph unicode="&#xe1;" horiz-adv-x="1216" d="M1081 0h-288v133q-119 -150 -294 -149.5t-294 101.5t-119 270t123 253t336 84h229v6q0 176 -186 176q-80 0 -169 -31.5t-151 -78.5l-137 199q217 158 496 157q201 0 327.5 -100t126.5 -318v-702zM772 420v53h-192q-184 0 -185 -115q0 -59 44 -90.5t126 -31.5t144.5 50 t62.5 134zM713 1251h-293l260 363l317 -133z" />
+<glyph unicode="&#xe2;" horiz-adv-x="1216" d="M1081 0h-288v133q-119 -150 -294 -149.5t-294 101.5t-119 270t123 253t336 84h229v6q0 176 -186 176q-80 0 -169 -31.5t-151 -78.5l-137 199q217 158 496 157q201 0 327.5 -100t126.5 -318v-702zM772 420v53h-192q-184 0 -185 -115q0 -59 44 -90.5t126 -31.5t144.5 50 t62.5 134zM444 1251h-251l231 324h383l231 -324h-252l-172 166z" />
+<glyph unicode="&#xe3;" horiz-adv-x="1216" d="M1081 0h-288v133q-119 -150 -294 -149.5t-294 101.5t-119 270t123 253t336 84h229v6q0 176 -186 176q-80 0 -169 -31.5t-151 -78.5l-137 199q217 158 496 157q201 0 327.5 -100t126.5 -318v-702zM772 420v53h-192q-184 0 -185 -115q0 -59 44 -90.5t126 -31.5t144.5 50 t62.5 134zM477 1358q-63 0 -61 -107h-217q0 154 66.5 242t170.5 88q66 0 159 -56.5t114 -56.5q63 0 61 107h217q0 -154 -66.5 -242t-170.5 -88q-63 0 -160 56.5t-113 56.5z" />
+<glyph unicode="&#xe4;" horiz-adv-x="1216" d="M1081 0h-288v133q-119 -150 -294 -149.5t-294 101.5t-119 270t123 253t336 84h229v6q0 176 -186 176q-80 0 -169 -31.5t-151 -78.5l-137 199q217 158 496 157q201 0 327.5 -100t126.5 -318v-702zM772 420v53h-192q-184 0 -185 -115q0 -59 44 -90.5t126 -31.5t144.5 50 t62.5 134zM266 1415.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5zM662 1415.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5z" />
+<glyph unicode="&#xe5;" horiz-adv-x="1216" d="M1081 0h-288v133q-119 -150 -294 -149.5t-294 101.5t-119 270t123 253t336 84h229v6q0 176 -186 176q-80 0 -169 -31.5t-151 -78.5l-137 199q217 158 496 157q201 0 327.5 -100t126.5 -318v-702zM772 420v53h-192q-184 0 -185 -115q0 -59 44 -90.5t126 -31.5t144.5 50 t62.5 134zM408 1440q0 90 64.5 154.5t154.5 64.5t154.5 -64.5t64.5 -154.5t-64.5 -154.5t-154.5 -64.5t-154.5 64.5t-64.5 154.5zM555 1439.5q0 -28.5 21.5 -50t50 -21.5t50 21.5t21.5 50t-21.5 50t-50 21.5t-50 -21.5t-21.5 -50z" />
+<glyph unicode="&#xe6;" horiz-adv-x="1916" d="M1833 449h-756v-11q16 -92 86 -146t160 -54q145 0 270 153l181 -201q-197 -207 -467 -206q-236 0 -387 155q-158 -156 -404 -155q-180 0 -307 102t-127 264q0 334 459 334h229v14q0 172 -178 172q-127 0 -307 -127l-138 199q221 178 460 178t360 -114q143 115 355 114.5 t361.5 -136.5t149.5 -378v-157zM768 420v29h-193q-90 0 -137 -16.5t-47 -75t44 -90t126 -31.5t144.5 50t62.5 134zM1450 819q-55 47 -136 47t-147.5 -49t-85.5 -133h439q-15 88 -70 135z" />
+<glyph unicode="&#xe7;" horiz-adv-x="1193" d="M676 256q154 0 276 154l183 -205q-166 -172 -365 -211l-55 -103q133 -45 133 -155q0 -88 -73 -153.5t-183.5 -65.5t-214.5 65l78 176q45 -39 79.5 -39t54 18.5t19.5 46.5t-24.5 49.5t-58 21.5t-72.5 -19l84 160q-195 41 -324 188.5t-129 364.5q0 254 173 412.5t411 158.5 q119 0 240.5 -49t213.5 -145l-159 -209q-53 63 -130 98t-153 35q-121 0 -208 -79t-87 -219t87 -218t204 -78z" />
+<glyph unicode="&#xe8;" horiz-adv-x="1265" d="M1100 160q-186 -176 -437 -176t-415 154.5t-164 414.5t167 413.5t394 153.5t386 -137t159 -377v-164h-803q14 -90 94 -147t181 -57q162 0 266 108zM804.5 813q-63.5 53 -154.5 53t-166.5 -55t-88.5 -149h484q-11 98 -74.5 151zM829 1251h-292l-285 230l315 135z" />
+<glyph unicode="&#xe9;" horiz-adv-x="1265" d="M1100 160q-186 -176 -437 -176t-415 154.5t-164 414.5t167 413.5t394 153.5t386 -137t159 -377v-164h-803q14 -90 94 -147t181 -57q162 0 266 108zM804.5 813q-63.5 53 -154.5 53t-166.5 -55t-88.5 -149h484q-11 98 -74.5 151zM739 1251h-293l261 363l317 -133z" />
+<glyph unicode="&#xea;" horiz-adv-x="1265" d="M1100 160q-186 -176 -437 -176t-415 154.5t-164 414.5t167 413.5t394 153.5t386 -137t159 -377v-164h-803q14 -90 94 -147t181 -57q162 0 266 108zM804.5 813q-63.5 53 -154.5 53t-166.5 -55t-88.5 -149h484q-11 98 -74.5 151zM461 1251h-252l231 324h383l232 -324h-252 l-172 166z" />
+<glyph unicode="&#xeb;" horiz-adv-x="1265" d="M1100 160q-186 -176 -437 -176t-415 154.5t-164 414.5t167 413.5t394 153.5t386 -137t159 -377v-164h-803q14 -90 94 -147t181 -57q162 0 266 108zM804.5 813q-63.5 53 -154.5 53t-166.5 -55t-88.5 -149h484q-11 98 -74.5 151zM297 1415.5q0 63.5 44 107.5t107.5 44 t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5zM692 1415.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5z" />
+<glyph unicode="&#xec;" horiz-adv-x="598" d="M145 1102h308v-1102h-308v1102zM457 1251h-293l-285 230l316 135z" />
+<glyph unicode="&#xed;" horiz-adv-x="598" d="M145 1102h308v-1102h-308v1102zM449 1251h-293l260 363l317 -133z" />
+<glyph unicode="&#xee;" horiz-adv-x="598" d="M297 1397l-150 -146h-231l231 324h302l231 -324h-231zM145 1102h308v-1102h-308v1102z" />
+<glyph unicode="&#xef;" horiz-adv-x="598" d="M145 1102h308v-1102h-308v1102zM-49 1415.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5zM346 1415.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5z" />
+<glyph unicode="&#xf0;" horiz-adv-x="1222" d="M1135 553q0 -256 -136.5 -412.5t-373 -156.5t-386 140t-149.5 360.5t147.5 361.5t356.5 141q53 0 94 -8q-41 51 -127 145l-176 -114l-166 159l180 117q-31 27 -67 57l-76 64l252 149q86 -70 141 -120l162 106l170 -160l-170 -112q324 -371 324 -717zM452.5 313.5 q59.5 -71.5 159 -71.5t159.5 71.5t60 172t-61 172t-159.5 71.5t-158 -71.5t-59.5 -172t59.5 -172z" />
+<glyph unicode="&#xf1;" horiz-adv-x="1308" d="M453 614v-614h-308v1102h308v-123q139 141 313 141t292 -123t118 -327v-670h-308v623q0 254 -186 254q-92 0 -160.5 -67t-68.5 -196zM549 1358q-63 0 -62 -107h-217q0 154 66.5 242t171.5 88q66 0 159 -56.5t113 -56.5q63 0 62 107h217q0 -154 -66.5 -242t-171.5 -88 q-63 0 -159.5 56.5t-112.5 56.5z" />
+<glyph unicode="&#xf2;" horiz-adv-x="1327" d="M468 331q77 -85 196.5 -85t196.5 85t77 220t-77 221t-196.5 86t-196.5 -86t-77 -221t77 -220zM1081 147.5q-166 -163.5 -416.5 -163.5t-416.5 163.5t-166 403.5t166 404.5t416.5 164.5t416.5 -164.5t166 -404.5t-166 -403.5zM829 1251h-292l-285 230l315 135z" />
+<glyph unicode="&#xf3;" horiz-adv-x="1327" d="M468 331q77 -85 196.5 -85t196.5 85t77 220t-77 221t-196.5 86t-196.5 -86t-77 -221t77 -220zM1081 147.5q-166 -163.5 -416.5 -163.5t-416.5 163.5t-166 403.5t166 404.5t416.5 164.5t416.5 -164.5t166 -404.5t-166 -403.5zM780 1251h-293l261 363l317 -133z" />
+<glyph unicode="&#xf4;" horiz-adv-x="1327" d="M468 331q77 -85 196.5 -85t196.5 85t77 220t-77 221t-196.5 86t-196.5 -86t-77 -221t77 -220zM1081 147.5q-166 -163.5 -416.5 -163.5t-416.5 163.5t-166 403.5t166 404.5t416.5 164.5t416.5 -164.5t166 -404.5t-166 -403.5zM502 1251h-252l231 324h383l232 -324h-252 l-172 166z" />
+<glyph unicode="&#xf5;" horiz-adv-x="1327" d="M468 331q77 -85 196.5 -85t196.5 85t77 220t-77 221t-196.5 86t-196.5 -86t-77 -221t77 -220zM1081 147.5q-166 -163.5 -416.5 -163.5t-416.5 163.5t-166 403.5t166 404.5t416.5 164.5t416.5 -164.5t166 -404.5t-166 -403.5zM551 1358q-63 0 -62 -107h-217q0 154 67 242 t171 88q66 0 159 -56.5t113 -56.5q63 0 62 107h217q0 -154 -66.5 -242t-171.5 -88q-63 0 -159.5 56.5t-112.5 56.5z" />
+<glyph unicode="&#xf6;" horiz-adv-x="1327" d="M468 331q77 -85 196.5 -85t196.5 85t77 220t-77 221t-196.5 86t-196.5 -86t-77 -221t77 -220zM1081 147.5q-166 -163.5 -416.5 -163.5t-416.5 163.5t-166 403.5t166 404.5t416.5 164.5t416.5 -164.5t166 -404.5t-166 -403.5zM315 1415.5q0 63.5 44 107.5t107.5 44 t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5zM711 1415.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5z" />
+<glyph unicode="&#xf7;" horiz-adv-x="1191" d="M416 327.5q0 75.5 52 128t128 52.5t128 -52.5t52 -128t-52 -128t-128 -52.5t-128 52.5t-52 128zM416 1104q0 76 52 128t128 52t128 -52t52 -128t-52 -128t-128 -52t-128 52t-52 128zM98 842h996v-252h-996v252z" />
+<glyph unicode="&#xf8;" horiz-adv-x="1327" d="M664 -16q-45 0 -93 6l-90 -197h-288l133 291q-115 78 -179.5 201t-64.5 266q0 240 166 404.5t416 164.5q72 0 131 -14l77 174h291l-129 -283q213 -170 213 -446q0 -240 -165.5 -403.5t-417.5 -163.5zM468 772q-77 -86 -77 -212t58 -206l231 504h-16q-119 0 -196 -86z M869.5 341q68.5 83 68.5 191.5t-35 178.5l-213 -463q111 10 179.5 93z" />
+<glyph unicode="&#xf9;" horiz-adv-x="1310" d="M856 508v594h309v-1102h-309v145q-115 -162 -296 -161.5t-304 114t-123 336.5v668h309v-600q0 -254 187 -254q92 0 159.5 66.5t67.5 193.5zM825 1251h-293l-284 230l315 135z" />
+<glyph unicode="&#xfa;" horiz-adv-x="1310" d="M856 508v594h309v-1102h-309v145q-115 -162 -296 -161.5t-304 114t-123 336.5v668h309v-600q0 -254 187 -254q92 0 159.5 66.5t67.5 193.5zM776 1251h-293l260 363l318 -133z" />
+<glyph unicode="&#xfb;" horiz-adv-x="1310" d="M856 508v594h309v-1102h-309v145q-115 -162 -296 -161.5t-304 114t-123 336.5v668h309v-600q0 -254 187 -254q92 0 159.5 66.5t67.5 193.5zM483 1251h-252l232 324h383l231 -324h-252l-172 166z" />
+<glyph unicode="&#xfc;" horiz-adv-x="1310" d="M856 508v594h309v-1102h-309v145q-115 -162 -296 -161.5t-304 114t-123 336.5v668h309v-600q0 -254 187 -254q92 0 159.5 66.5t67.5 193.5zM293 1415.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5zM688 1415.5 q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5z" />
+<glyph unicode="&#xfd;" horiz-adv-x="1208" d="M336 -434q-162 0 -305 131l139 227q78 -76 160 -76q43 0 73.5 42t30.5 89.5t-426 1122.5h328l268 -686l268 686h328l-512 -1299q-45 -113 -140 -175t-212 -62zM717 1251h-293l260 363l317 -133z" />
+<glyph unicode="&#xfe;" horiz-adv-x="1363" d="M1121.5 966.5q158.5 -153.5 158.5 -409.5t-158.5 -414.5t-369.5 -158.5q-164 0 -299 104v-485h-308v1917h308v-510q123 111 295 110q215 0 373.5 -153.5zM523.5 331q74.5 -85 181 -85t186.5 85t80 218t-78 223t-186.5 90t-183 -89t-74.5 -223t74.5 -219z" />
+<glyph unicode="&#xff;" horiz-adv-x="1208" d="M336 -434q-162 0 -305 131l139 227q78 -76 160 -76q43 0 73.5 42t30.5 89.5t-426 1122.5h328l268 -686l268 686h328l-512 -1299q-45 -113 -140 -175t-212 -62zM254 1415.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5z M649 1415.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5z" />
+<glyph unicode="&#x152;" horiz-adv-x="2134" d="M2003 1430v-283h-713v-295h639v-272h-639v-297h735v-283h-1200q-309 0 -519 205t-210 510t210 510t519 205h1178zM555 1031q-119 -130 -119 -315.5t119 -316.5t291 -131h123v893h-123q-172 0 -291 -130z" />
+<glyph unicode="&#x153;" horiz-adv-x="2119" d="M1954 160q-186 -176 -447.5 -176t-421.5 170q-166 -170 -418.5 -170t-418.5 163.5t-166 403.5t166 404.5t419 164.5t420 -172q162 172 400.5 172t397.5 -137t159 -377v-164h-803q14 -90 94 -147t181 -57q162 0 266 108zM938 537v14q0 135 -77 221t-196.5 86t-196.5 -86 t-77 -221t77 -220t194.5 -85t194.5 81t81 210zM1658.5 813q-63.5 53 -154.5 53t-166.5 -55t-88.5 -149h484q-11 98 -74.5 151z" />
+<glyph unicode="&#x2c6;" horiz-adv-x="989" d="M324 1579h-252l231 324h383l232 -324h-252l-172 166z" />
+<glyph unicode="&#x2dc;" horiz-adv-x="1198" d="M498 1358q-63 0 -62 -107h-217q0 154 66.5 242t171.5 88q66 0 159 -56.5t113 -56.5q63 0 62 107h217q0 -154 -67 -242t-171 -88q-63 0 -159.5 56.5t-112.5 56.5z" />
+<glyph unicode="&#x2000;" horiz-adv-x="971" />
+<glyph unicode="&#x2001;" horiz-adv-x="1942" />
+<glyph unicode="&#x2002;" horiz-adv-x="971" />
+<glyph unicode="&#x2003;" horiz-adv-x="1942" />
+<glyph unicode="&#x2004;" horiz-adv-x="647" />
+<glyph unicode="&#x2005;" horiz-adv-x="485" />
+<glyph unicode="&#x2006;" horiz-adv-x="323" />
+<glyph unicode="&#x2007;" horiz-adv-x="323" />
+<glyph unicode="&#x2008;" horiz-adv-x="242" />
+<glyph unicode="&#x2009;" horiz-adv-x="388" />
+<glyph unicode="&#x200a;" horiz-adv-x="107" />
+<glyph unicode="&#x2010;" horiz-adv-x="1003" d="M137 479v273h729v-273h-729z" />
+<glyph unicode="&#x2011;" horiz-adv-x="1003" d="M137 479v273h729v-273h-729z" />
+<glyph unicode="&#x2012;" horiz-adv-x="1003" d="M137 479v273h729v-273h-729z" />
+<glyph unicode="&#x2013;" horiz-adv-x="1112" d="M152 440v199h809v-199h-809z" />
+<glyph unicode="&#x2014;" horiz-adv-x="1427" d="M131 442v197h1165v-197h-1165z" />
+<glyph unicode="&#x2018;" horiz-adv-x="491" d="M344 1221q68 -45 68 -126t-48.5 -128t-121 -47t-120.5 45t-48 116.5t45 141.5l149 217h168z" />
+<glyph unicode="&#x2019;" horiz-adv-x="491" d="M147 1133q-68 45 -67.5 125.5t48.5 128t121 47.5t121 -45.5t48 -117t-45 -141.5l-150 -217h-168z" />
+<glyph unicode="&#x201a;" horiz-adv-x="491" d="M147 23q-68 45 -67.5 125.5t48.5 128t121 47.5t121 -45.5t48 -117t-45 -141.5l-150 -217h-168z" />
+<glyph unicode="&#x201c;" horiz-adv-x="870" d="M344 1221q68 -45 68 -126t-48.5 -128t-121 -47t-120.5 45t-48 116.5t45 141.5l149 217h168zM723 1221q68 -45 68 -126t-48.5 -128t-121 -47t-120.5 45t-48 116.5t45 141.5l149 217h168z" />
+<glyph unicode="&#x201d;" horiz-adv-x="870" d="M147 1133q-68 45 -67.5 125.5t48.5 128t121 47.5t121 -45.5t48 -117t-45 -141.5l-150 -217h-168zM526 1133q-68 45 -67.5 125.5t48.5 128t120.5 47.5t121 -45.5t48.5 -117t-45 -141.5l-150 -217h-168z" />
+<glyph unicode="&#x201e;" horiz-adv-x="870" d="M147 23q-68 45 -67.5 125.5t48.5 128t121 47.5t121 -45.5t48 -117t-45 -141.5l-150 -217h-168zM526 23q-68 45 -67.5 125.5t48.5 128t120.5 47.5t121 -45.5t48.5 -117t-45 -141.5l-150 -217h-168z" />
+<glyph unicode="&#x2022;" horiz-adv-x="897" d="M164 649q0 119 83 202t201.5 83t201.5 -83t83 -202t-83 -201.5t-201.5 -82.5t-201.5 82.5t-83 201.5z" />
+<glyph unicode="&#x2026;" horiz-adv-x="1435" d="M958 162q0 76 52.5 128t128 52t128 -52t52.5 -128t-52.5 -128t-128 -52t-128 52t-52.5 128zM537 162q0 76 52 128t128 52t128 -52t52 -128t-52 -128t-128 -52t-128 52t-52 128zM117 162q0 76 52 128t128 52t128 -52t52 -128t-52 -128t-128 -52t-128 52t-52 128z" />
+<glyph unicode="&#x202f;" horiz-adv-x="388" />
+<glyph unicode="&#x2039;" horiz-adv-x="776" d="M657 879l-241 -377l241 -379h-309l-250 379l250 377h309z" />
+<glyph unicode="&#x203a;" horiz-adv-x="776" d="M360 502l-241 377h309l250 -377l-250 -379h-309z" />
+<glyph unicode="&#x205f;" horiz-adv-x="485" />
+<glyph unicode="&#x20ac;" horiz-adv-x="1568" d="M94 778v172h199q61 233 234 373.5t421 140.5q307 0 527 -247l-183 -238q-150 182 -352 182q-229 0 -317 -211h477v-172h-514q-2 -20 -2 -61t2 -60h514v-172h-467q49 -96 134 -147t187 -51q203 0 332 162l189 -209q-111 -129 -255.5 -192.5t-287.5 -63.5 q-231 0 -403.5 136t-235.5 365h-199v172h172q-2 18 -2 59.5t2 61.5h-172z" />
+<glyph unicode="&#x2122;" horiz-adv-x="2027" d="M592 1221v-654h-225v654h-238v211h700v-211h-237zM1108 567h-225v865h286l203 -431l203 431h285v-865h-226v459l-192 -391h-142l-192 391v-459z" />
+<glyph unicode="&#xe000;" horiz-adv-x="1105" d="M0 1106h1106v-1106h-1106v1106z" />
+<glyph unicode="&#xfb01;" horiz-adv-x="1421" d="M512 1165v-73h266v-222h-266v-870h-309v870h-129v222h129v67q0 180 109.5 285.5t272.5 105.5t296 -123l-111 -206q-68 78 -149 77q-47 0 -78 -33.5t-31 -99.5zM1276 0h-307v1102h307v-1102zM942 1370q0 76 52.5 128t128 52t128 -52t52.5 -128t-52.5 -128t-128 -52 t-128 52t-52.5 128z" />
+<glyph unicode="&#xfb02;" horiz-adv-x="1421" d="M512 1165v-73h266v-222h-266v-870h-309v870h-129v222h129v67q0 180 109.5 285.5t272.5 105.5t296 -123l-111 -206q-68 78 -149 77q-47 0 -78 -33.5t-31 -99.5zM1276 0h-307v1520h307v-1520z" />
+<hkern u1="&#x26;" u2="&#x2019;" k="57" />
+<hkern u1="&#x26;" u2="&#xc6;" k="-27" />
+<hkern u1="&#x26;" u2="Y" k="47" />
+<hkern u1="&#x26;" u2="W" k="35" />
+<hkern u1="&#x26;" u2="V" k="43" />
+<hkern u1="&#x26;" u2="T" k="43" />
+<hkern u1="&#x26;" u2="A" k="-16" />
+<hkern u1="&#x26;" u2="&#x27;" k="55" />
+<hkern u1="&#x27;" u2="&#x2039;" k="35" />
+<hkern u1="&#x27;" u2="&#xf0;" k="18" />
+<hkern u1="&#x27;" u2="&#xc6;" k="96" />
+<hkern u1="&#x27;" u2="d" k="23" />
+<hkern u1="&#x27;" u2="J" k="33" />
+<hkern u1="&#x27;" u2="A" k="84" />
+<hkern u1="&#x27;" u2="&#x34;" k="35" />
+<hkern u1="&#x27;" u2="&#x2f;" k="137" />
+<hkern u1="&#x27;" u2="&#x2e;" k="236" />
+<hkern u1="&#x27;" u2="&#x26;" k="33" />
+<hkern u1="&#x28;" u2="&#xf0;" k="37" />
+<hkern u1="&#x28;" u2="&#xef;" k="-27" />
+<hkern u1="&#x28;" u2="&#xec;" k="-90" />
+<hkern u1="&#x28;" u2="&#x7b;" k="20" />
+<hkern u1="&#x28;" u2="w" k="27" />
+<hkern u1="&#x28;" u2="v" k="23" />
+<hkern u1="&#x28;" u2="u" k="41" />
+<hkern u1="&#x28;" u2="t" k="25" />
+<hkern u1="&#x28;" u2="s" k="35" />
+<hkern u1="&#x28;" u2="q" k="53" />
+<hkern u1="&#x28;" u2="o" k="55" />
+<hkern u1="&#x28;" u2="n" k="29" />
+<hkern u1="&#x28;" u2="j" k="-207" />
+<hkern u1="&#x28;" u2="f" k="25" />
+<hkern u1="&#x28;" u2="d" k="53" />
+<hkern u1="&#x28;" u2="a" k="41" />
+<hkern u1="&#x28;" u2="S" k="25" />
+<hkern u1="&#x28;" u2="O" k="45" />
+<hkern u1="&#x28;" u2="&#x39;" k="20" />
+<hkern u1="&#x28;" u2="&#x38;" k="31" />
+<hkern u1="&#x28;" u2="&#x36;" k="39" />
+<hkern u1="&#x28;" u2="&#x34;" k="45" />
+<hkern u1="&#x28;" u2="&#x30;" k="39" />
+<hkern u1="&#x28;" u2="&#x28;" k="20" />
+<hkern u1="&#x29;" u2="&#x29;" k="20" />
+<hkern u1="&#x2a;" u2="&#x2019;" k="-12" />
+<hkern u1="&#x2a;" u2="&#xf0;" k="23" />
+<hkern u1="&#x2a;" u2="&#xef;" k="-18" />
+<hkern u1="&#x2a;" u2="&#xee;" k="-59" />
+<hkern u1="&#x2a;" u2="&#xc6;" k="92" />
+<hkern u1="&#x2a;" u2="y" k="-27" />
+<hkern u1="&#x2a;" u2="o" k="16" />
+<hkern u1="&#x2a;" u2="d" k="23" />
+<hkern u1="&#x2a;" u2="J" k="37" />
+<hkern u1="&#x2a;" u2="A" k="82" />
+<hkern u1="&#x2d;" u2="&#xc6;" k="18" />
+<hkern u1="&#x2d;" u2="z" k="18" />
+<hkern u1="&#x2d;" u2="x" k="43" />
+<hkern u1="&#x2d;" u2="Z" k="31" />
+<hkern u1="&#x2d;" u2="Y" k="78" />
+<hkern u1="&#x2d;" u2="X" k="55" />
+<hkern u1="&#x2d;" u2="W" k="37" />
+<hkern u1="&#x2d;" u2="V" k="49" />
+<hkern u1="&#x2d;" u2="T" k="109" />
+<hkern u1="&#x2d;" u2="J" k="49" />
+<hkern u1="&#x2d;" u2="A" k="25" />
+<hkern u1="&#x2d;" u2="&#x37;" k="27" />
+<hkern u1="&#x2d;" u2="&#x33;" k="33" />
+<hkern u1="&#x2d;" u2="&#x32;" k="31" />
+<hkern u1="&#x2d;" u2="&#x31;" k="47" />
+<hkern u1="&#x2e;" u2="&#x2019;" k="264" />
+<hkern u1="&#x2e;" u2="&#x2018;" k="264" />
+<hkern u1="&#x2e;" u2="y" k="70" />
+<hkern u1="&#x2e;" u2="w" k="53" />
+<hkern u1="&#x2e;" u2="v" k="68" />
+<hkern u1="&#x2e;" u2="t" k="29" />
+<hkern u1="&#x2e;" u2="f" k="16" />
+<hkern u1="&#x2e;" u2="Y" k="111" />
+<hkern u1="&#x2e;" u2="W" k="90" />
+<hkern u1="&#x2e;" u2="V" k="113" />
+<hkern u1="&#x2e;" u2="U" k="27" />
+<hkern u1="&#x2e;" u2="T" k="111" />
+<hkern u1="&#x2e;" u2="O" k="31" />
+<hkern u1="&#x2e;" u2="&#x37;" k="29" />
+<hkern u1="&#x2e;" u2="&#x31;" k="57" />
+<hkern u1="&#x2e;" u2="&#x27;" k="236" />
+<hkern u1="&#x2f;" u2="&#xf0;" k="43" />
+<hkern u1="&#x2f;" u2="&#xec;" k="-55" />
+<hkern u1="&#x2f;" u2="&#xce;" k="-78" />
+<hkern u1="&#x2f;" u2="&#xc6;" k="129" />
+<hkern u1="&#x2f;" u2="z" k="49" />
+<hkern u1="&#x2f;" u2="x" k="27" />
+<hkern u1="&#x2f;" u2="u" k="49" />
+<hkern u1="&#x2f;" u2="s" k="84" />
+<hkern u1="&#x2f;" u2="q" k="88" />
+<hkern u1="&#x2f;" u2="o" k="88" />
+<hkern u1="&#x2f;" u2="n" k="51" />
+<hkern u1="&#x2f;" u2="f" k="27" />
+<hkern u1="&#x2f;" u2="d" k="86" />
+<hkern u1="&#x2f;" u2="a" k="74" />
+<hkern u1="&#x2f;" u2="S" k="35" />
+<hkern u1="&#x2f;" u2="O" k="49" />
+<hkern u1="&#x2f;" u2="J" k="27" />
+<hkern u1="&#x2f;" u2="A" k="121" />
+<hkern u1="&#x2f;" u2="&#x39;" k="23" />
+<hkern u1="&#x2f;" u2="&#x38;" k="37" />
+<hkern u1="&#x2f;" u2="&#x36;" k="43" />
+<hkern u1="&#x2f;" u2="&#x34;" k="82" />
+<hkern u1="&#x2f;" u2="&#x30;" k="41" />
+<hkern u1="&#x2f;" u2="&#x2f;" k="580" />
+<hkern u1="&#x3a;" u2="&#x2019;" k="20" />
+<hkern u1="&#x3a;" u2="y" k="16" />
+<hkern u1="&#x3a;" u2="Y" k="70" />
+<hkern u1="&#x3a;" u2="W" k="37" />
+<hkern u1="&#x3a;" u2="V" k="49" />
+<hkern u1="&#x3a;" u2="T" k="102" />
+<hkern u1="&#x40;" u2="Y" k="45" />
+<hkern u1="&#x40;" u2="W" k="20" />
+<hkern u1="&#x40;" u2="V" k="31" />
+<hkern u1="&#x40;" u2="T" k="41" />
+<hkern u1="A" u2="&#x2122;" k="86" />
+<hkern u1="A" u2="&#x2019;" k="96" />
+<hkern u1="A" u2="&#x2018;" k="96" />
+<hkern u1="A" u2="&#xf0;" k="23" />
+<hkern u1="A" u2="&#xae;" k="23" />
+<hkern u1="A" u2="y" k="63" />
+<hkern u1="A" u2="w" k="57" />
+<hkern u1="A" u2="v" k="63" />
+<hkern u1="A" u2="u" k="20" />
+<hkern u1="A" u2="t" k="57" />
+<hkern u1="A" u2="q" k="25" />
+<hkern u1="A" u2="o" k="27" />
+<hkern u1="A" u2="f" k="23" />
+<hkern u1="A" u2="d" k="27" />
+<hkern u1="A" u2="a" k="10" />
+<hkern u1="A" u2="\" k="111" />
+<hkern u1="A" u2="Y" k="100" />
+<hkern u1="A" u2="W" k="76" />
+<hkern u1="A" u2="V" k="88" />
+<hkern u1="A" u2="U" k="39" />
+<hkern u1="A" u2="T" k="104" />
+<hkern u1="A" u2="S" k="10" />
+<hkern u1="A" u2="O" k="43" />
+<hkern u1="A" u2="&#x3f;" k="39" />
+<hkern u1="A" u2="&#x31;" k="39" />
+<hkern u1="A" u2="&#x2d;" k="25" />
+<hkern u1="A" u2="&#x2a;" k="82" />
+<hkern u1="A" u2="&#x27;" k="84" />
+<hkern u1="B" u2="&#xf0;" k="10" />
+<hkern u1="B" u2="z" k="12" />
+<hkern u1="B" u2="y" k="20" />
+<hkern u1="B" u2="x" k="31" />
+<hkern u1="B" u2="w" k="18" />
+<hkern u1="B" u2="v" k="18" />
+<hkern u1="B" u2="u" k="10" />
+<hkern u1="B" u2="t" k="23" />
+<hkern u1="B" u2="s" k="18" />
+<hkern u1="B" u2="o" k="10" />
+<hkern u1="B" u2="f" k="20" />
+<hkern u1="B" u2="d" k="10" />
+<hkern u1="B" u2="]" k="33" />
+<hkern u1="B" u2="\" k="29" />
+<hkern u1="B" u2="Z" k="12" />
+<hkern u1="B" u2="Y" k="41" />
+<hkern u1="B" u2="X" k="25" />
+<hkern u1="B" u2="W" k="20" />
+<hkern u1="B" u2="V" k="31" />
+<hkern u1="B" u2="T" k="37" />
+<hkern u1="B" u2="J" k="18" />
+<hkern u1="B" u2="A" k="16" />
+<hkern u1="B" u2="&#x2f;" k="25" />
+<hkern u1="B" u2="&#x29;" k="33" />
+<hkern u1="C" u2="&#x2122;" k="-45" />
+<hkern u1="C" u2="&#xf0;" k="33" />
+<hkern u1="C" u2="&#xef;" k="-14" />
+<hkern u1="C" u2="&#xee;" k="-27" />
+<hkern u1="C" u2="u" k="16" />
+<hkern u1="C" u2="t" k="10" />
+<hkern u1="C" u2="s" k="23" />
+<hkern u1="C" u2="q" k="41" />
+<hkern u1="C" u2="o" k="43" />
+<hkern u1="C" u2="n" k="14" />
+<hkern u1="C" u2="f" k="10" />
+<hkern u1="C" u2="d" k="43" />
+<hkern u1="C" u2="a" k="12" />
+<hkern u1="C" u2="O" k="31" />
+<hkern u1="C" u2="A" k="10" />
+<hkern u1="C" u2="&#x2d;" k="16" />
+<hkern u1="C" u2="&#x2a;" k="-29" />
+<hkern u1="D" u2="&#xf0;" k="12" />
+<hkern u1="D" u2="&#xc6;" k="41" />
+<hkern u1="D" u2="z" k="16" />
+<hkern u1="D" u2="x" k="31" />
+<hkern u1="D" u2="u" k="10" />
+<hkern u1="D" u2="t" k="10" />
+<hkern u1="D" u2="s" k="18" />
+<hkern u1="D" u2="n" k="12" />
+<hkern u1="D" u2="l" k="12" />
+<hkern u1="D" u2="i" k="12" />
+<hkern u1="D" u2="h" k="12" />
+<hkern u1="D" u2="f" k="10" />
+<hkern u1="D" u2="a" k="14" />
+<hkern u1="D" u2="]" k="43" />
+<hkern u1="D" u2="\" k="37" />
+<hkern u1="D" u2="Z" k="27" />
+<hkern u1="D" u2="Y" k="49" />
+<hkern u1="D" u2="X" k="53" />
+<hkern u1="D" u2="W" k="23" />
+<hkern u1="D" u2="V" k="33" />
+<hkern u1="D" u2="T" k="37" />
+<hkern u1="D" u2="S" k="10" />
+<hkern u1="D" u2="J" k="41" />
+<hkern u1="D" u2="A" k="41" />
+<hkern u1="D" u2="&#x2f;" k="53" />
+<hkern u1="D" u2="&#x2e;" k="23" />
+<hkern u1="D" u2="&#x29;" k="45" />
+<hkern u1="E" u2="&#xf0;" k="25" />
+<hkern u1="E" u2="&#xee;" k="-14" />
+<hkern u1="E" u2="u" k="14" />
+<hkern u1="E" u2="t" k="16" />
+<hkern u1="E" u2="s" k="10" />
+<hkern u1="E" u2="q" k="25" />
+<hkern u1="E" u2="o" k="25" />
+<hkern u1="E" u2="n" k="10" />
+<hkern u1="E" u2="f" k="12" />
+<hkern u1="E" u2="d" k="25" />
+<hkern u1="E" u2="a" k="14" />
+<hkern u1="E" u2="O" k="23" />
+<hkern u1="F" u2="&#xf0;" k="29" />
+<hkern u1="F" u2="&#xef;" k="-18" />
+<hkern u1="F" u2="&#xee;" k="-51" />
+<hkern u1="F" u2="&#xec;" k="-18" />
+<hkern u1="F" u2="&#xc6;" k="94" />
+<hkern u1="F" u2="z" k="25" />
+<hkern u1="F" u2="x" k="14" />
+<hkern u1="F" u2="u" k="16" />
+<hkern u1="F" u2="t" k="10" />
+<hkern u1="F" u2="s" k="35" />
+<hkern u1="F" u2="q" k="23" />
+<hkern u1="F" u2="o" k="23" />
+<hkern u1="F" u2="n" k="20" />
+<hkern u1="F" u2="f" k="10" />
+<hkern u1="F" u2="d" k="23" />
+<hkern u1="F" u2="a" k="31" />
+<hkern u1="F" u2="S" k="10" />
+<hkern u1="F" u2="J" k="39" />
+<hkern u1="F" u2="A" k="78" />
+<hkern u1="F" u2="&#x2f;" k="80" />
+<hkern u1="F" u2="&#x2e;" k="82" />
+<hkern u1="G" u2="z" k="10" />
+<hkern u1="G" u2="y" k="18" />
+<hkern u1="G" u2="x" k="18" />
+<hkern u1="G" u2="w" k="18" />
+<hkern u1="G" u2="v" k="16" />
+<hkern u1="G" u2="t" k="18" />
+<hkern u1="G" u2="s" k="10" />
+<hkern u1="G" u2="f" k="16" />
+<hkern u1="G" u2="Y" k="25" />
+<hkern u1="G" u2="X" k="12" />
+<hkern u1="G" u2="W" k="12" />
+<hkern u1="G" u2="V" k="20" />
+<hkern u1="G" u2="T" k="23" />
+<hkern u1="G" u2="A" k="12" />
+<hkern u1="G" u2="&#x29;" k="23" />
+<hkern u1="I" u2="&#xf0;" k="25" />
+<hkern u1="I" u2="z" k="12" />
+<hkern u1="I" u2="u" k="10" />
+<hkern u1="I" u2="t" k="18" />
+<hkern u1="I" u2="s" k="14" />
+<hkern u1="I" u2="q" k="20" />
+<hkern u1="I" u2="o" k="20" />
+<hkern u1="I" u2="n" k="10" />
+<hkern u1="I" u2="l" k="10" />
+<hkern u1="I" u2="i" k="10" />
+<hkern u1="I" u2="h" k="10" />
+<hkern u1="I" u2="f" k="16" />
+<hkern u1="I" u2="d" k="20" />
+<hkern u1="I" u2="a" k="14" />
+<hkern u1="J" u2="&#xf0;" k="25" />
+<hkern u1="J" u2="&#xc6;" k="23" />
+<hkern u1="J" u2="z" k="18" />
+<hkern u1="J" u2="x" k="12" />
+<hkern u1="J" u2="u" k="16" />
+<hkern u1="J" u2="t" k="14" />
+<hkern u1="J" u2="s" k="23" />
+<hkern u1="J" u2="q" k="18" />
+<hkern u1="J" u2="o" k="18" />
+<hkern u1="J" u2="n" k="10" />
+<hkern u1="J" u2="l" k="12" />
+<hkern u1="J" u2="i" k="12" />
+<hkern u1="J" u2="h" k="12" />
+<hkern u1="J" u2="f" k="14" />
+<hkern u1="J" u2="d" k="18" />
+<hkern u1="J" u2="a" k="18" />
+<hkern u1="J" u2="J" k="16" />
+<hkern u1="J" u2="A" k="20" />
+<hkern u1="J" u2="&#x2f;" k="41" />
+<hkern u1="K" u2="&#x2039;" k="29" />
+<hkern u1="K" u2="&#xf0;" k="82" />
+<hkern u1="K" u2="&#xef;" k="-84" />
+<hkern u1="K" u2="&#xee;" k="-31" />
+<hkern u1="K" u2="&#xec;" k="-88" />
+<hkern u1="K" u2="&#xae;" k="20" />
+<hkern u1="K" u2="y" k="53" />
+<hkern u1="K" u2="w" k="59" />
+<hkern u1="K" u2="v" k="53" />
+<hkern u1="K" u2="u" k="49" />
+<hkern u1="K" u2="t" k="31" />
+<hkern u1="K" u2="s" k="14" />
+<hkern u1="K" u2="q" k="90" />
+<hkern u1="K" u2="o" k="96" />
+<hkern u1="K" u2="n" k="14" />
+<hkern u1="K" u2="f" k="23" />
+<hkern u1="K" u2="d" k="94" />
+<hkern u1="K" u2="a" k="33" />
+<hkern u1="K" u2="S" k="39" />
+<hkern u1="K" u2="O" k="74" />
+<hkern u1="K" u2="&#x2d;" k="55" />
+<hkern u1="L" u2="&#x2122;" k="162" />
+<hkern u1="L" u2="&#x2019;" k="168" />
+<hkern u1="L" u2="&#x2018;" k="168" />
+<hkern u1="L" u2="&#xb7;" k="123" />
+<hkern u1="L" u2="y" k="98" />
+<hkern u1="L" u2="w" k="82" />
+<hkern u1="L" u2="v" k="100" />
+<hkern u1="L" u2="u" k="14" />
+<hkern u1="L" u2="t" k="55" />
+<hkern u1="L" u2="q" k="14" />
+<hkern u1="L" u2="o" k="14" />
+<hkern u1="L" u2="f" k="31" />
+<hkern u1="L" u2="d" k="14" />
+<hkern u1="L" u2="\" k="131" />
+<hkern u1="L" u2="Y" k="125" />
+<hkern u1="L" u2="W" k="102" />
+<hkern u1="L" u2="V" k="121" />
+<hkern u1="L" u2="U" k="31" />
+<hkern u1="L" u2="T" k="127" />
+<hkern u1="L" u2="O" k="39" />
+<hkern u1="L" u2="&#x3f;" k="45" />
+<hkern u1="L" u2="&#x31;" k="41" />
+<hkern u1="L" u2="&#x2d;" k="100" />
+<hkern u1="L" u2="&#x2a;" k="170" />
+<hkern u1="L" u2="&#x27;" k="166" />
+<hkern u1="O" u2="&#xf0;" k="14" />
+<hkern u1="O" u2="&#xc6;" k="47" />
+<hkern u1="O" u2="z" k="18" />
+<hkern u1="O" u2="x" k="33" />
+<hkern u1="O" u2="t" k="12" />
+<hkern u1="O" u2="s" k="16" />
+<hkern u1="O" u2="n" k="12" />
+<hkern u1="O" u2="l" k="12" />
+<hkern u1="O" u2="i" k="12" />
+<hkern u1="O" u2="h" k="12" />
+<hkern u1="O" u2="f" k="10" />
+<hkern u1="O" u2="a" k="14" />
+<hkern u1="O" u2="]" k="43" />
+<hkern u1="O" u2="\" k="37" />
+<hkern u1="O" u2="Z" k="29" />
+<hkern u1="O" u2="Y" k="51" />
+<hkern u1="O" u2="X" k="55" />
+<hkern u1="O" u2="W" k="23" />
+<hkern u1="O" u2="V" k="33" />
+<hkern u1="O" u2="T" k="39" />
+<hkern u1="O" u2="S" k="12" />
+<hkern u1="O" u2="J" k="45" />
+<hkern u1="O" u2="A" k="43" />
+<hkern u1="O" u2="&#x2f;" k="55" />
+<hkern u1="O" u2="&#x2e;" k="31" />
+<hkern u1="O" u2="&#x29;" k="45" />
+<hkern u1="P" u2="&#xf0;" k="25" />
+<hkern u1="P" u2="&#xc6;" k="104" />
+<hkern u1="P" u2="z" k="10" />
+<hkern u1="P" u2="s" k="16" />
+<hkern u1="P" u2="q" k="12" />
+<hkern u1="P" u2="o" k="14" />
+<hkern u1="P" u2="d" k="12" />
+<hkern u1="P" u2="a" k="18" />
+<hkern u1="P" u2="]" k="25" />
+<hkern u1="P" u2="Z" k="16" />
+<hkern u1="P" u2="Y" k="10" />
+<hkern u1="P" u2="X" k="43" />
+<hkern u1="P" u2="J" k="59" />
+<hkern u1="P" u2="A" k="84" />
+<hkern u1="P" u2="&#x2f;" k="90" />
+<hkern u1="P" u2="&#x2e;" k="106" />
+<hkern u1="P" u2="&#x29;" k="37" />
+<hkern u1="Q" u2="&#x201e;" k="6" />
+<hkern u1="Q" u2="&#x201a;" k="6" />
+<hkern u1="Q" u2="&#xc6;" k="29" />
+<hkern u1="Q" u2="j" k="-172" />
+<hkern u1="Q" u2="]" k="-6" />
+<hkern u1="Q" u2="&#x2f;" k="31" />
+<hkern u1="R" u2="&#x2039;" k="29" />
+<hkern u1="R" u2="&#xf0;" k="45" />
+<hkern u1="R" u2="y" k="14" />
+<hkern u1="R" u2="w" k="12" />
+<hkern u1="R" u2="v" k="12" />
+<hkern u1="R" u2="u" k="23" />
+<hkern u1="R" u2="t" k="20" />
+<hkern u1="R" u2="q" k="37" />
+<hkern u1="R" u2="o" k="41" />
+<hkern u1="R" u2="n" k="10" />
+<hkern u1="R" u2="l" k="10" />
+<hkern u1="R" u2="i" k="10" />
+<hkern u1="R" u2="h" k="10" />
+<hkern u1="R" u2="f" k="14" />
+<hkern u1="R" u2="d" k="37" />
+<hkern u1="R" u2="a" k="27" />
+<hkern u1="R" u2="\" k="33" />
+<hkern u1="R" u2="Y" k="37" />
+<hkern u1="R" u2="W" k="18" />
+<hkern u1="R" u2="V" k="27" />
+<hkern u1="R" u2="T" k="29" />
+<hkern u1="R" u2="O" k="14" />
+<hkern u1="R" u2="J" k="16" />
+<hkern u1="S" u2="&#xf0;" k="10" />
+<hkern u1="S" u2="&#xee;" k="-31" />
+<hkern u1="S" u2="z" k="18" />
+<hkern u1="S" u2="y" k="25" />
+<hkern u1="S" u2="x" k="23" />
+<hkern u1="S" u2="w" k="25" />
+<hkern u1="S" u2="v" k="20" />
+<hkern u1="S" u2="u" k="14" />
+<hkern u1="S" u2="t" k="29" />
+<hkern u1="S" u2="s" k="20" />
+<hkern u1="S" u2="q" k="10" />
+<hkern u1="S" u2="o" k="10" />
+<hkern u1="S" u2="n" k="16" />
+<hkern u1="S" u2="f" k="29" />
+<hkern u1="S" u2="d" k="10" />
+<hkern u1="S" u2="Y" k="10" />
+<hkern u1="S" u2="X" k="10" />
+<hkern u1="S" u2="V" k="10" />
+<hkern u1="S" u2="T" k="12" />
+<hkern u1="S" u2="A" k="16" />
+<hkern u1="S" u2="&#x2f;" k="25" />
+<hkern u1="T" u2="&#x203a;" k="98" />
+<hkern u1="T" u2="&#x2039;" k="115" />
+<hkern u1="T" u2="&#xf1;" k="78" />
+<hkern u1="T" u2="&#xf0;" k="82" />
+<hkern u1="T" u2="&#xef;" k="-53" />
+<hkern u1="T" u2="&#xee;" k="-88" />
+<hkern u1="T" u2="&#xed;" k="27" />
+<hkern u1="T" u2="&#xec;" k="-57" />
+<hkern u1="T" u2="&#xdf;" k="27" />
+<hkern u1="T" u2="&#xc6;" k="113" />
+<hkern u1="T" u2="z" k="137" />
+<hkern u1="T" u2="y" k="135" />
+<hkern u1="T" u2="x" k="131" />
+<hkern u1="T" u2="w" k="125" />
+<hkern u1="T" u2="v" k="133" />
+<hkern u1="T" u2="u" k="100" />
+<hkern u1="T" u2="s" k="131" />
+<hkern u1="T" u2="q" k="119" />
+<hkern u1="T" u2="o" k="123" />
+<hkern u1="T" u2="n" k="43" />
+<hkern u1="T" u2="l" k="10" />
+<hkern u1="T" u2="i" k="10" />
+<hkern u1="T" u2="h" k="10" />
+<hkern u1="T" u2="f" k="14" />
+<hkern u1="T" u2="d" k="119" />
+<hkern u1="T" u2="a" k="131" />
+<hkern u1="T" u2="S" k="12" />
+<hkern u1="T" u2="O" k="39" />
+<hkern u1="T" u2="J" k="31" />
+<hkern u1="T" u2="A" k="104" />
+<hkern u1="T" u2="&#x40;" k="45" />
+<hkern u1="T" u2="&#x3a;" k="102" />
+<hkern u1="T" u2="&#x34;" k="57" />
+<hkern u1="T" u2="&#x2f;" k="102" />
+<hkern u1="T" u2="&#x2e;" k="111" />
+<hkern u1="T" u2="&#x2d;" k="109" />
+<hkern u1="T" u2="&#x26;" k="25" />
+<hkern u1="U" u2="&#xf0;" k="27" />
+<hkern u1="U" u2="&#xc6;" k="43" />
+<hkern u1="U" u2="z" k="23" />
+<hkern u1="U" u2="x" k="14" />
+<hkern u1="U" u2="u" k="16" />
+<hkern u1="U" u2="t" k="14" />
+<hkern u1="U" u2="s" k="29" />
+<hkern u1="U" u2="q" k="20" />
+<hkern u1="U" u2="o" k="20" />
+<hkern u1="U" u2="n" k="16" />
+<hkern u1="U" u2="l" k="12" />
+<hkern u1="U" u2="i" k="12" />
+<hkern u1="U" u2="h" k="12" />
+<hkern u1="U" u2="f" k="14" />
+<hkern u1="U" u2="d" k="20" />
+<hkern u1="U" u2="a" k="23" />
+<hkern u1="U" u2="J" k="27" />
+<hkern u1="U" u2="A" k="37" />
+<hkern u1="U" u2="&#x2f;" k="51" />
+<hkern u1="U" u2="&#x2e;" k="27" />
+<hkern u1="V" u2="&#x2122;" k="-29" />
+<hkern u1="V" u2="&#x203a;" k="31" />
+<hkern u1="V" u2="&#x2039;" k="70" />
+<hkern u1="V" u2="&#xf0;" k="61" />
+<hkern u1="V" u2="&#xef;" k="-115" />
+<hkern u1="V" u2="&#xee;" k="-86" />
+<hkern u1="V" u2="&#xed;" k="23" />
+<hkern u1="V" u2="&#xec;" k="-117" />
+<hkern u1="V" u2="&#xdf;" k="27" />
+<hkern u1="V" u2="&#xc6;" k="96" />
+<hkern u1="V" u2="z" k="49" />
+<hkern u1="V" u2="x" k="16" />
+<hkern u1="V" u2="u" k="49" />
+<hkern u1="V" u2="t" k="12" />
+<hkern u1="V" u2="s" k="98" />
+<hkern u1="V" u2="q" k="94" />
+<hkern u1="V" u2="o" k="94" />
+<hkern u1="V" u2="n" k="57" />
+<hkern u1="V" u2="f" k="16" />
+<hkern u1="V" u2="d" k="94" />
+<hkern u1="V" u2="a" k="84" />
+<hkern u1="V" u2="S" k="18" />
+<hkern u1="V" u2="O" k="33" />
+<hkern u1="V" u2="J" k="31" />
+<hkern u1="V" u2="A" k="88" />
+<hkern u1="V" u2="&#x40;" k="31" />
+<hkern u1="V" u2="&#x3a;" k="49" />
+<hkern u1="V" u2="&#x34;" k="39" />
+<hkern u1="V" u2="&#x31;" k="-16" />
+<hkern u1="V" u2="&#x2f;" k="111" />
+<hkern u1="V" u2="&#x2e;" k="113" />
+<hkern u1="V" u2="&#x2d;" k="49" />
+<hkern u1="V" u2="&#x26;" k="27" />
+<hkern u1="W" u2="&#x2122;" k="-12" />
+<hkern u1="W" u2="&#x2039;" k="55" />
+<hkern u1="W" u2="&#xf0;" k="57" />
+<hkern u1="W" u2="&#xef;" k="-98" />
+<hkern u1="W" u2="&#xee;" k="-74" />
+<hkern u1="W" u2="&#xed;" k="18" />
+<hkern u1="W" u2="&#xec;" k="-100" />
+<hkern u1="W" u2="&#xdf;" k="25" />
+<hkern u1="W" u2="&#xc6;" k="86" />
+<hkern u1="W" u2="z" k="41" />
+<hkern u1="W" u2="x" k="12" />
+<hkern u1="W" u2="u" k="41" />
+<hkern u1="W" u2="s" k="88" />
+<hkern u1="W" u2="q" k="82" />
+<hkern u1="W" u2="o" k="86" />
+<hkern u1="W" u2="n" k="47" />
+<hkern u1="W" u2="f" k="12" />
+<hkern u1="W" u2="d" k="80" />
+<hkern u1="W" u2="a" k="70" />
+<hkern u1="W" u2="S" k="10" />
+<hkern u1="W" u2="O" k="23" />
+<hkern u1="W" u2="J" k="27" />
+<hkern u1="W" u2="A" k="76" />
+<hkern u1="W" u2="&#x40;" k="20" />
+<hkern u1="W" u2="&#x3a;" k="37" />
+<hkern u1="W" u2="&#x34;" k="25" />
+<hkern u1="W" u2="&#x2f;" k="94" />
+<hkern u1="W" u2="&#x2e;" k="90" />
+<hkern u1="W" u2="&#x2d;" k="37" />
+<hkern u1="X" u2="&#x2039;" k="35" />
+<hkern u1="X" u2="&#xf0;" k="66" />
+<hkern u1="X" u2="&#xef;" k="-49" />
+<hkern u1="X" u2="&#xec;" k="-53" />
+<hkern u1="X" u2="&#xae;" k="23" />
+<hkern u1="X" u2="y" k="53" />
+<hkern u1="X" u2="w" k="59" />
+<hkern u1="X" u2="v" k="53" />
+<hkern u1="X" u2="u" k="49" />
+<hkern u1="X" u2="t" k="41" />
+<hkern u1="X" u2="q" k="74" />
+<hkern u1="X" u2="o" k="74" />
+<hkern u1="X" u2="n" k="16" />
+<hkern u1="X" u2="f" k="31" />
+<hkern u1="X" u2="d" k="74" />
+<hkern u1="X" u2="a" k="25" />
+<hkern u1="X" u2="S" k="12" />
+<hkern u1="X" u2="O" k="59" />
+<hkern u1="X" u2="&#x2d;" k="55" />
+<hkern u1="Y" u2="&#x2122;" k="-43" />
+<hkern u1="Y" u2="&#x203a;" k="51" />
+<hkern u1="Y" u2="&#x2039;" k="94" />
+<hkern u1="Y" u2="&#xf0;" k="68" />
+<hkern u1="Y" u2="&#xef;" k="-129" />
+<hkern u1="Y" u2="&#xee;" k="-80" />
+<hkern u1="Y" u2="&#xed;" k="25" />
+<hkern u1="Y" u2="&#xec;" k="-131" />
+<hkern u1="Y" u2="&#xdf;" k="31" />
+<hkern u1="Y" u2="&#xc6;" k="109" />
+<hkern u1="Y" u2="&#xae;" k="25" />
+<hkern u1="Y" u2="z" k="76" />
+<hkern u1="Y" u2="y" k="12" />
+<hkern u1="Y" u2="x" k="31" />
+<hkern u1="Y" u2="w" k="20" />
+<hkern u1="Y" u2="v" k="12" />
+<hkern u1="Y" u2="u" k="82" />
+<hkern u1="Y" u2="t" k="14" />
+<hkern u1="Y" u2="s" k="98" />
+<hkern u1="Y" u2="q" k="106" />
+<hkern u1="Y" u2="o" k="109" />
+<hkern u1="Y" u2="n" k="84" />
+<hkern u1="Y" u2="f" k="27" />
+<hkern u1="Y" u2="d" k="104" />
+<hkern u1="Y" u2="a" k="92" />
+<hkern u1="Y" u2="]" k="-12" />
+<hkern u1="Y" u2="S" k="23" />
+<hkern u1="Y" u2="O" k="51" />
+<hkern u1="Y" u2="J" k="20" />
+<hkern u1="Y" u2="A" k="100" />
+<hkern u1="Y" u2="&#x40;" k="49" />
+<hkern u1="Y" u2="&#x3a;" k="70" />
+<hkern u1="Y" u2="&#x34;" k="57" />
+<hkern u1="Y" u2="&#x31;" k="-33" />
+<hkern u1="Y" u2="&#x2f;" k="102" />
+<hkern u1="Y" u2="&#x2e;" k="111" />
+<hkern u1="Y" u2="&#x2d;" k="78" />
+<hkern u1="Y" u2="&#x26;" k="31" />
+<hkern u1="Z" u2="&#xf0;" k="27" />
+<hkern u1="Z" u2="&#xee;" k="-29" />
+<hkern u1="Z" u2="y" k="16" />
+<hkern u1="Z" u2="w" k="18" />
+<hkern u1="Z" u2="v" k="14" />
+<hkern u1="Z" u2="u" k="23" />
+<hkern u1="Z" u2="t" k="23" />
+<hkern u1="Z" u2="q" k="29" />
+<hkern u1="Z" u2="o" k="31" />
+<hkern u1="Z" u2="n" k="16" />
+<hkern u1="Z" u2="f" k="23" />
+<hkern u1="Z" u2="d" k="31" />
+<hkern u1="Z" u2="a" k="12" />
+<hkern u1="Z" u2="O" k="29" />
+<hkern u1="Z" u2="&#x2d;" k="25" />
+<hkern u1="[" u2="&#xf0;" k="31" />
+<hkern u1="[" u2="&#xef;" k="-35" />
+<hkern u1="[" u2="&#xee;" k="-35" />
+<hkern u1="[" u2="&#xec;" k="-102" />
+<hkern u1="[" u2="u" k="33" />
+<hkern u1="[" u2="s" k="27" />
+<hkern u1="[" u2="q" k="51" />
+<hkern u1="[" u2="o" k="51" />
+<hkern u1="[" u2="j" k="-193" />
+<hkern u1="[" u2="d" k="51" />
+<hkern u1="[" u2="a" k="35" />
+<hkern u1="[" u2="Y" k="-12" />
+<hkern u1="[" u2="S" k="20" />
+<hkern u1="[" u2="O" k="43" />
+<hkern u1="[" u2="&#x38;" k="20" />
+<hkern u1="[" u2="&#x36;" k="33" />
+<hkern u1="[" u2="&#x34;" k="49" />
+<hkern u1="[" u2="&#x30;" k="33" />
+<hkern u1="\" u2="&#x2019;" k="117" />
+<hkern u1="\" u2="&#xc6;" k="-49" />
+<hkern u1="\" u2="y" k="47" />
+<hkern u1="\" u2="w" k="39" />
+<hkern u1="\" u2="v" k="47" />
+<hkern u1="\" u2="t" k="23" />
+<hkern u1="\" u2="Y" k="78" />
+<hkern u1="\" u2="W" k="63" />
+<hkern u1="\" u2="V" k="80" />
+<hkern u1="\" u2="U" k="25" />
+<hkern u1="\" u2="T" k="78" />
+<hkern u1="\" u2="O" k="23" />
+<hkern u1="\" u2="A" k="-27" />
+<hkern u1="\" u2="&#x31;" k="39" />
+<hkern u1="\" u2="&#x27;" k="100" />
+<hkern u1="a" u2="&#x2122;" k="41" />
+<hkern u1="a" u2="&#x2019;" k="16" />
+<hkern u1="a" u2="&#x2018;" k="16" />
+<hkern u1="a" u2="y" k="14" />
+<hkern u1="a" u2="w" k="16" />
+<hkern u1="a" u2="v" k="14" />
+<hkern u1="a" u2="t" k="12" />
+<hkern u1="a" u2="f" k="8" />
+<hkern u1="a" u2="\" k="68" />
+<hkern u1="a" u2="Z" k="23" />
+<hkern u1="a" u2="Y" k="84" />
+<hkern u1="a" u2="X" k="14" />
+<hkern u1="a" u2="W" k="59" />
+<hkern u1="a" u2="V" k="76" />
+<hkern u1="a" u2="U" k="23" />
+<hkern u1="a" u2="T" k="100" />
+<hkern u1="a" u2="S" k="12" />
+<hkern u1="a" u2="O" k="14" />
+<hkern u1="a" u2="J" k="16" />
+<hkern u1="a" u2="I" k="10" />
+<hkern u1="a" u2="&#x29;" k="31" />
+<hkern u1="b" u2="&#x2122;" k="47" />
+<hkern u1="b" u2="&#x2019;" k="43" />
+<hkern u1="b" u2="&#x2018;" k="43" />
+<hkern u1="b" u2="&#xc6;" k="25" />
+<hkern u1="b" u2="&#x7d;" k="29" />
+<hkern u1="b" u2="z" k="14" />
+<hkern u1="b" u2="y" k="23" />
+<hkern u1="b" u2="x" k="45" />
+<hkern u1="b" u2="w" k="18" />
+<hkern u1="b" u2="v" k="23" />
+<hkern u1="b" u2="t" k="18" />
+<hkern u1="b" u2="s" k="10" />
+<hkern u1="b" u2="f" k="16" />
+<hkern u1="b" u2="]" k="51" />
+<hkern u1="b" u2="\" k="74" />
+<hkern u1="b" u2="Z" k="47" />
+<hkern u1="b" u2="Y" k="104" />
+<hkern u1="b" u2="X" k="72" />
+<hkern u1="b" u2="W" k="80" />
+<hkern u1="b" u2="V" k="94" />
+<hkern u1="b" u2="U" k="20" />
+<hkern u1="b" u2="T" k="119" />
+<hkern u1="b" u2="S" k="23" />
+<hkern u1="b" u2="J" k="35" />
+<hkern u1="b" u2="I" k="20" />
+<hkern u1="b" u2="A" k="27" />
+<hkern u1="b" u2="&#x2f;" k="41" />
+<hkern u1="b" u2="&#x2a;" k="23" />
+<hkern u1="b" u2="&#x29;" k="53" />
+<hkern u1="b" u2="&#x27;" k="23" />
+<hkern u1="c" u2="&#x2122;" k="25" />
+<hkern u1="c" u2="&#x2039;" k="20" />
+<hkern u1="c" u2="&#xf0;" k="23" />
+<hkern u1="c" u2="q" k="16" />
+<hkern u1="c" u2="o" k="18" />
+<hkern u1="c" u2="d" k="16" />
+<hkern u1="c" u2="]" k="20" />
+<hkern u1="c" u2="\" k="45" />
+<hkern u1="c" u2="Y" k="86" />
+<hkern u1="c" u2="X" k="10" />
+<hkern u1="c" u2="W" k="43" />
+<hkern u1="c" u2="V" k="55" />
+<hkern u1="c" u2="U" k="16" />
+<hkern u1="c" u2="T" k="106" />
+<hkern u1="c" u2="S" k="12" />
+<hkern u1="c" u2="O" k="20" />
+<hkern u1="c" u2="&#x2d;" k="20" />
+<hkern u1="c" u2="&#x29;" k="29" />
+<hkern u1="d" u2="&#xec;" k="-31" />
+<hkern u1="d" u2="Z" k="12" />
+<hkern u1="d" u2="U" k="14" />
+<hkern u1="d" u2="T" k="10" />
+<hkern u1="d" u2="O" k="12" />
+<hkern u1="d" u2="J" k="18" />
+<hkern u1="d" u2="I" k="10" />
+<hkern u1="e" u2="&#x2122;" k="35" />
+<hkern u1="e" u2="&#x2019;" k="20" />
+<hkern u1="e" u2="&#x2018;" k="20" />
+<hkern u1="e" u2="&#xc6;" k="14" />
+<hkern u1="e" u2="&#x7d;" k="20" />
+<hkern u1="e" u2="z" k="10" />
+<hkern u1="e" u2="y" k="16" />
+<hkern u1="e" u2="x" k="31" />
+<hkern u1="e" u2="w" k="10" />
+<hkern u1="e" u2="v" k="16" />
+<hkern u1="e" u2="t" k="12" />
+<hkern u1="e" u2="f" k="10" />
+<hkern u1="e" u2="]" k="43" />
+<hkern u1="e" u2="\" k="66" />
+<hkern u1="e" u2="Z" k="33" />
+<hkern u1="e" u2="Y" k="100" />
+<hkern u1="e" u2="X" k="47" />
+<hkern u1="e" u2="W" k="78" />
+<hkern u1="e" u2="V" k="96" />
+<hkern u1="e" u2="U" k="14" />
+<hkern u1="e" u2="T" k="141" />
+<hkern u1="e" u2="S" k="16" />
+<hkern u1="e" u2="J" k="27" />
+<hkern u1="e" u2="I" k="14" />
+<hkern u1="e" u2="A" k="18" />
+<hkern u1="e" u2="&#x2f;" k="35" />
+<hkern u1="e" u2="&#x29;" k="47" />
+<hkern u1="f" u2="&#x2122;" k="-63" />
+<hkern u1="f" u2="&#x2039;" k="43" />
+<hkern u1="f" u2="&#xf0;" k="51" />
+<hkern u1="f" u2="&#xef;" k="-164" />
+<hkern u1="f" u2="&#xee;" k="-106" />
+<hkern u1="f" u2="&#xec;" k="-172" />
+<hkern u1="f" u2="&#xc6;" k="88" />
+<hkern u1="f" u2="&#x7d;" k="-20" />
+<hkern u1="f" u2="s" k="12" />
+<hkern u1="f" u2="q" k="25" />
+<hkern u1="f" u2="o" k="27" />
+<hkern u1="f" u2="d" k="23" />
+<hkern u1="f" u2="a" k="12" />
+<hkern u1="f" u2="]" k="-39" />
+<hkern u1="f" u2="\" k="-27" />
+<hkern u1="f" u2="Y" k="-135" />
+<hkern u1="f" u2="X" k="-61" />
+<hkern u1="f" u2="W" k="-104" />
+<hkern u1="f" u2="V" k="-123" />
+<hkern u1="f" u2="T" k="-59" />
+<hkern u1="f" u2="J" k="14" />
+<hkern u1="f" u2="A" k="82" />
+<hkern u1="f" u2="&#x2f;" k="55" />
+<hkern u1="f" u2="&#x2e;" k="57" />
+<hkern u1="f" u2="&#x2d;" k="29" />
+<hkern u1="f" u2="&#x2a;" k="-12" />
+<hkern u1="f" u2="&#x29;" k="-25" />
+<hkern u1="g" u2="j" k="-14" />
+<hkern u1="i" u2="&#xec;" k="-35" />
+<hkern u1="i" u2="Z" k="14" />
+<hkern u1="i" u2="U" k="12" />
+<hkern u1="i" u2="T" k="10" />
+<hkern u1="i" u2="O" k="12" />
+<hkern u1="i" u2="J" k="18" />
+<hkern u1="i" u2="I" k="10" />
+<hkern u1="j" u2="j" k="-61" />
+<hkern u1="k" u2="&#x2039;" k="41" />
+<hkern u1="k" u2="&#xf0;" k="63" />
+<hkern u1="k" u2="s" k="23" />
+<hkern u1="k" u2="q" k="55" />
+<hkern u1="k" u2="o" k="57" />
+<hkern u1="k" u2="d" k="53" />
+<hkern u1="k" u2="a" k="29" />
+<hkern u1="k" u2="Y" k="23" />
+<hkern u1="k" u2="V" k="10" />
+<hkern u1="k" u2="T" k="135" />
+<hkern u1="k" u2="S" k="12" />
+<hkern u1="k" u2="O" k="45" />
+<hkern u1="k" u2="&#x2d;" k="51" />
+<hkern u1="k" u2="&#x2a;" k="-27" />
+<hkern u1="l" u2="&#xec;" k="-31" />
+<hkern u1="l" u2="&#xb7;" k="152" />
+<hkern u1="l" u2="Z" k="12" />
+<hkern u1="l" u2="U" k="14" />
+<hkern u1="l" u2="T" k="10" />
+<hkern u1="l" u2="O" k="12" />
+<hkern u1="l" u2="J" k="18" />
+<hkern u1="l" u2="I" k="10" />
+<hkern u1="n" u2="&#x2122;" k="43" />
+<hkern u1="n" u2="&#x2019;" k="20" />
+<hkern u1="n" u2="&#x2018;" k="20" />
+<hkern u1="n" u2="y" k="18" />
+<hkern u1="n" u2="w" k="18" />
+<hkern u1="n" u2="v" k="18" />
+<hkern u1="n" u2="t" k="16" />
+<hkern u1="n" u2="f" k="10" />
+<hkern u1="n" u2="\" k="72" />
+<hkern u1="n" u2="Z" k="25" />
+<hkern u1="n" u2="Y" k="84" />
+<hkern u1="n" u2="X" k="14" />
+<hkern u1="n" u2="W" k="59" />
+<hkern u1="n" u2="V" k="76" />
+<hkern u1="n" u2="U" k="23" />
+<hkern u1="n" u2="T" k="102" />
+<hkern u1="n" u2="S" k="12" />
+<hkern u1="n" u2="O" k="14" />
+<hkern u1="n" u2="J" k="16" />
+<hkern u1="n" u2="I" k="10" />
+<hkern u1="n" u2="&#x29;" k="31" />
+<hkern u1="o" u2="&#x2122;" k="43" />
+<hkern u1="o" u2="&#x2019;" k="35" />
+<hkern u1="o" u2="&#x2018;" k="35" />
+<hkern u1="o" u2="&#xc6;" k="25" />
+<hkern u1="o" u2="&#x7d;" k="29" />
+<hkern u1="o" u2="z" k="14" />
+<hkern u1="o" u2="y" k="27" />
+<hkern u1="o" u2="x" k="45" />
+<hkern u1="o" u2="w" k="20" />
+<hkern u1="o" u2="v" k="25" />
+<hkern u1="o" u2="t" k="20" />
+<hkern u1="o" u2="s" k="10" />
+<hkern u1="o" u2="f" k="18" />
+<hkern u1="o" u2="]" k="51" />
+<hkern u1="o" u2="\" k="74" />
+<hkern u1="o" u2="Z" k="47" />
+<hkern u1="o" u2="Y" k="109" />
+<hkern u1="o" u2="X" k="74" />
+<hkern u1="o" u2="W" k="84" />
+<hkern u1="o" u2="V" k="94" />
+<hkern u1="o" u2="U" k="20" />
+<hkern u1="o" u2="T" k="123" />
+<hkern u1="o" u2="S" k="25" />
+<hkern u1="o" u2="J" k="35" />
+<hkern u1="o" u2="I" k="20" />
+<hkern u1="o" u2="A" k="27" />
+<hkern u1="o" u2="&#x2f;" k="41" />
+<hkern u1="o" u2="&#x2a;" k="16" />
+<hkern u1="o" u2="&#x29;" k="53" />
+<hkern u1="p" u2="&#x2122;" k="43" />
+<hkern u1="p" u2="&#x2019;" k="31" />
+<hkern u1="p" u2="&#x2018;" k="31" />
+<hkern u1="p" u2="&#xc6;" k="23" />
+<hkern u1="p" u2="&#x7d;" k="31" />
+<hkern u1="p" u2="z" k="14" />
+<hkern u1="p" u2="y" k="23" />
+<hkern u1="p" u2="x" k="43" />
+<hkern u1="p" u2="w" k="18" />
+<hkern u1="p" u2="v" k="23" />
+<hkern u1="p" u2="t" k="18" />
+<hkern u1="p" u2="s" k="10" />
+<hkern u1="p" u2="f" k="16" />
+<hkern u1="p" u2="]" k="51" />
+<hkern u1="p" u2="\" k="74" />
+<hkern u1="p" u2="Z" k="47" />
+<hkern u1="p" u2="Y" k="104" />
+<hkern u1="p" u2="X" k="68" />
+<hkern u1="p" u2="W" k="80" />
+<hkern u1="p" u2="V" k="94" />
+<hkern u1="p" u2="U" k="20" />
+<hkern u1="p" u2="T" k="119" />
+<hkern u1="p" u2="S" k="23" />
+<hkern u1="p" u2="J" k="33" />
+<hkern u1="p" u2="I" k="18" />
+<hkern u1="p" u2="A" k="25" />
+<hkern u1="p" u2="&#x2f;" k="41" />
+<hkern u1="p" u2="&#x29;" k="53" />
+<hkern u1="q" u2="j" k="-141" />
+<hkern u1="r" u2="&#x2039;" k="41" />
+<hkern u1="r" u2="&#xf0;" k="39" />
+<hkern u1="r" u2="&#xc6;" k="92" />
+<hkern u1="r" u2="s" k="8" />
+<hkern u1="r" u2="q" k="14" />
+<hkern u1="r" u2="o" k="16" />
+<hkern u1="r" u2="d" k="14" />
+<hkern u1="r" u2="a" k="10" />
+<hkern u1="r" u2="]" k="27" />
+<hkern u1="r" u2="Z" k="25" />
+<hkern u1="r" u2="Y" k="12" />
+<hkern u1="r" u2="X" k="63" />
+<hkern u1="r" u2="T" k="129" />
+<hkern u1="r" u2="J" k="74" />
+<hkern u1="r" u2="I" k="10" />
+<hkern u1="r" u2="A" k="94" />
+<hkern u1="r" u2="&#x2f;" k="80" />
+<hkern u1="r" u2="&#x2e;" k="84" />
+<hkern u1="r" u2="&#x29;" k="35" />
+<hkern u1="r" u2="&#x26;" k="20" />
+<hkern u1="s" u2="&#x2122;" k="31" />
+<hkern u1="s" u2="y" k="10" />
+<hkern u1="s" u2="x" k="14" />
+<hkern u1="s" u2="v" k="8" />
+<hkern u1="s" u2="t" k="8" />
+<hkern u1="s" u2="]" k="35" />
+<hkern u1="s" u2="\" k="55" />
+<hkern u1="s" u2="Z" k="12" />
+<hkern u1="s" u2="Y" k="96" />
+<hkern u1="s" u2="X" k="25" />
+<hkern u1="s" u2="W" k="55" />
+<hkern u1="s" u2="V" k="68" />
+<hkern u1="s" u2="U" k="20" />
+<hkern u1="s" u2="T" k="111" />
+<hkern u1="s" u2="O" k="14" />
+<hkern u1="s" u2="J" k="10" />
+<hkern u1="s" u2="I" k="14" />
+<hkern u1="s" u2="A" k="12" />
+<hkern u1="s" u2="&#x2f;" k="23" />
+<hkern u1="s" u2="&#x29;" k="41" />
+<hkern u1="t" u2="&#x2122;" k="20" />
+<hkern u1="t" u2="&#xf0;" k="8" />
+<hkern u1="t" u2="q" k="10" />
+<hkern u1="t" u2="o" k="12" />
+<hkern u1="t" u2="d" k="10" />
+<hkern u1="t" u2="\" k="37" />
+<hkern u1="t" u2="Y" k="70" />
+<hkern u1="t" u2="W" k="37" />
+<hkern u1="t" u2="V" k="45" />
+<hkern u1="t" u2="U" k="18" />
+<hkern u1="t" u2="T" k="47" />
+<hkern u1="t" u2="O" k="16" />
+<hkern u1="u" u2="&#x2122;" k="16" />
+<hkern u1="u" u2="\" k="39" />
+<hkern u1="u" u2="Z" k="16" />
+<hkern u1="u" u2="Y" k="84" />
+<hkern u1="u" u2="X" k="16" />
+<hkern u1="u" u2="W" k="47" />
+<hkern u1="u" u2="V" k="57" />
+<hkern u1="u" u2="U" k="16" />
+<hkern u1="u" u2="T" k="43" />
+<hkern u1="u" u2="S" k="10" />
+<hkern u1="u" u2="O" k="12" />
+<hkern u1="u" u2="J" k="18" />
+<hkern u1="u" u2="I" k="10" />
+<hkern u1="u" u2="&#x29;" k="29" />
+<hkern u1="v" u2="&#x2039;" k="35" />
+<hkern u1="v" u2="&#xf0;" k="39" />
+<hkern u1="v" u2="&#xc6;" k="72" />
+<hkern u1="v" u2="s" k="18" />
+<hkern u1="v" u2="q" k="23" />
+<hkern u1="v" u2="o" k="25" />
+<hkern u1="v" u2="d" k="23" />
+<hkern u1="v" u2="a" k="14" />
+<hkern u1="v" u2="Y" k="12" />
+<hkern u1="v" u2="X" k="51" />
+<hkern u1="v" u2="T" k="133" />
+<hkern u1="v" u2="J" k="43" />
+<hkern u1="v" u2="A" k="63" />
+<hkern u1="v" u2="&#x2f;" k="78" />
+<hkern u1="v" u2="&#x2e;" k="68" />
+<hkern u1="v" u2="&#x29;" k="23" />
+<hkern u1="w" u2="&#x2039;" k="27" />
+<hkern u1="w" u2="&#xf0;" k="35" />
+<hkern u1="w" u2="&#xc6;" k="66" />
+<hkern u1="w" u2="s" k="16" />
+<hkern u1="w" u2="q" k="18" />
+<hkern u1="w" u2="o" k="20" />
+<hkern u1="w" u2="d" k="18" />
+<hkern u1="w" u2="a" k="12" />
+<hkern u1="w" u2="Z" k="12" />
+<hkern u1="w" u2="Y" k="20" />
+<hkern u1="w" u2="X" k="57" />
+<hkern u1="w" u2="T" k="125" />
+<hkern u1="w" u2="J" k="51" />
+<hkern u1="w" u2="A" k="57" />
+<hkern u1="w" u2="&#x2f;" k="70" />
+<hkern u1="w" u2="&#x2e;" k="53" />
+<hkern u1="w" u2="&#x29;" k="29" />
+<hkern u1="x" u2="&#x2039;" k="43" />
+<hkern u1="x" u2="&#xf0;" k="53" />
+<hkern u1="x" u2="s" k="12" />
+<hkern u1="x" u2="q" k="49" />
+<hkern u1="x" u2="o" k="51" />
+<hkern u1="x" u2="d" k="47" />
+<hkern u1="x" u2="a" k="20" />
+<hkern u1="x" u2="Y" k="29" />
+<hkern u1="x" u2="V" k="14" />
+<hkern u1="x" u2="U" k="12" />
+<hkern u1="x" u2="T" k="131" />
+<hkern u1="x" u2="O" k="35" />
+<hkern u1="x" u2="&#x2d;" k="45" />
+<hkern u1="y" u2="&#x2039;" k="35" />
+<hkern u1="y" u2="&#xf0;" k="39" />
+<hkern u1="y" u2="&#xc6;" k="72" />
+<hkern u1="y" u2="s" k="20" />
+<hkern u1="y" u2="q" k="25" />
+<hkern u1="y" u2="o" k="27" />
+<hkern u1="y" u2="d" k="23" />
+<hkern u1="y" u2="a" k="16" />
+<hkern u1="y" u2="Y" k="12" />
+<hkern u1="y" u2="X" k="51" />
+<hkern u1="y" u2="T" k="135" />
+<hkern u1="y" u2="J" k="47" />
+<hkern u1="y" u2="A" k="63" />
+<hkern u1="y" u2="&#x2f;" k="72" />
+<hkern u1="y" u2="&#x2e;" k="70" />
+<hkern u1="y" u2="&#x2a;" k="-33" />
+<hkern u1="y" u2="&#x29;" k="23" />
+<hkern u1="z" u2="&#x2122;" k="16" />
+<hkern u1="z" u2="&#x2039;" k="23" />
+<hkern u1="z" u2="&#xf0;" k="16" />
+<hkern u1="z" u2="q" k="14" />
+<hkern u1="z" u2="o" k="14" />
+<hkern u1="z" u2="d" k="14" />
+<hkern u1="z" u2="\" k="37" />
+<hkern u1="z" u2="Y" k="72" />
+<hkern u1="z" u2="W" k="37" />
+<hkern u1="z" u2="V" k="45" />
+<hkern u1="z" u2="U" k="20" />
+<hkern u1="z" u2="T" k="143" />
+<hkern u1="z" u2="O" k="14" />
+<hkern u1="z" u2="I" k="12" />
+<hkern u1="z" u2="&#x2d;" k="20" />
+<hkern u1="&#x7b;" u2="&#xef;" k="-14" />
+<hkern u1="&#x7b;" u2="&#xee;" k="-31" />
+<hkern u1="&#x7b;" u2="&#xec;" k="-82" />
+<hkern u1="&#x7b;" u2="q" k="31" />
+<hkern u1="&#x7b;" u2="o" k="29" />
+<hkern u1="&#x7b;" u2="j" k="-182" />
+<hkern u1="&#x7b;" u2="d" k="29" />
+<hkern u1="&#x7b;" u2="O" k="20" />
+<hkern u1="&#x7c;" u2="&#xec;" k="-27" />
+<hkern u1="&#x7c;" u2="j" k="-133" />
+<hkern u1="&#x7d;" u2="&#x29;" k="20" />
+<hkern u1="&#xae;" u2="&#xc6;" k="23" />
+<hkern u1="&#xae;" u2="Y" k="25" />
+<hkern u1="&#xae;" u2="X" k="25" />
+<hkern u1="&#xae;" u2="A" k="23" />
+<hkern u1="&#xb0;" u2="&#x34;" k="43" />
+<hkern u1="&#xb7;" u2="l" k="152" />
+<hkern u1="&#xb7;" u2="&#x37;" k="31" />
+<hkern u1="&#xb7;" u2="&#x33;" k="45" />
+<hkern u1="&#xb7;" u2="&#x32;" k="43" />
+<hkern u1="&#xb7;" u2="&#x31;" k="49" />
+<hkern u1="&#xbf;" u2="Y" k="35" />
+<hkern u1="&#xbf;" u2="W" k="25" />
+<hkern u1="&#xbf;" u2="V" k="33" />
+<hkern u1="&#xbf;" u2="T" k="39" />
+<hkern u1="&#xde;" u2="&#x2122;" k="18" />
+<hkern u1="&#xde;" u2="&#xf0;" k="14" />
+<hkern u1="&#xde;" u2="&#xc6;" k="51" />
+<hkern u1="&#xde;" u2="z" k="16" />
+<hkern u1="&#xde;" u2="x" k="25" />
+<hkern u1="&#xde;" u2="s" k="14" />
+<hkern u1="&#xde;" u2="n" k="12" />
+<hkern u1="&#xde;" u2="l" k="12" />
+<hkern u1="&#xde;" u2="i" k="12" />
+<hkern u1="&#xde;" u2="h" k="12" />
+<hkern u1="&#xde;" u2="a" k="14" />
+<hkern u1="&#xde;" u2="]" k="47" />
+<hkern u1="&#xde;" u2="\" k="39" />
+<hkern u1="&#xde;" u2="Z" k="33" />
+<hkern u1="&#xde;" u2="Y" k="57" />
+<hkern u1="&#xde;" u2="X" k="72" />
+<hkern u1="&#xde;" u2="W" k="25" />
+<hkern u1="&#xde;" u2="V" k="35" />
+<hkern u1="&#xde;" u2="T" k="37" />
+<hkern u1="&#xde;" u2="S" k="10" />
+<hkern u1="&#xde;" u2="J" k="53" />
+<hkern u1="&#xde;" u2="A" k="49" />
+<hkern u1="&#xde;" u2="&#x2f;" k="59" />
+<hkern u1="&#xde;" u2="&#x2e;" k="53" />
+<hkern u1="&#xde;" u2="&#x29;" k="49" />
+<hkern u1="&#xdf;" u2="&#xc6;" k="12" />
+<hkern u1="&#xdf;" u2="z" k="8" />
+<hkern u1="&#xdf;" u2="y" k="18" />
+<hkern u1="&#xdf;" u2="x" k="25" />
+<hkern u1="&#xdf;" u2="w" k="14" />
+<hkern u1="&#xdf;" u2="v" k="16" />
+<hkern u1="&#xdf;" u2="t" k="16" />
+<hkern u1="&#xdf;" u2="s" k="10" />
+<hkern u1="&#xdf;" u2="f" k="16" />
+<hkern u1="&#xdf;" u2="\" k="20" />
+<hkern u1="&#xdf;" u2="Z" k="18" />
+<hkern u1="&#xdf;" u2="Y" k="37" />
+<hkern u1="&#xdf;" u2="X" k="37" />
+<hkern u1="&#xdf;" u2="W" k="31" />
+<hkern u1="&#xdf;" u2="V" k="35" />
+<hkern u1="&#xdf;" u2="U" k="20" />
+<hkern u1="&#xdf;" u2="T" k="33" />
+<hkern u1="&#xdf;" u2="S" k="14" />
+<hkern u1="&#xdf;" u2="O" k="12" />
+<hkern u1="&#xdf;" u2="J" k="16" />
+<hkern u1="&#xdf;" u2="I" k="18" />
+<hkern u1="&#xdf;" u2="A" k="16" />
+<hkern u1="&#xdf;" u2="&#x2f;" k="29" />
+<hkern u1="&#xdf;" u2="&#x29;" k="31" />
+<hkern u1="&#xed;" u2="&#x2122;" k="-74" />
+<hkern u1="&#xed;" u2="&#x7d;" k="-96" />
+<hkern u1="&#xed;" u2="&#x7c;" k="-41" />
+<hkern u1="&#xed;" u2="l" k="-45" />
+<hkern u1="&#xed;" u2="i" k="-43" />
+<hkern u1="&#xed;" u2="h" k="-45" />
+<hkern u1="&#xed;" u2="]" k="-117" />
+<hkern u1="&#xed;" u2="\" k="-111" />
+<hkern u1="&#xed;" u2="&#x2a;" k="-14" />
+<hkern u1="&#xed;" u2="&#x29;" k="-106" />
+<hkern u1="&#xee;" u2="&#x2122;" k="-88" />
+<hkern u1="&#xee;" u2="&#x7d;" k="-29" />
+<hkern u1="&#xee;" u2="]" k="-33" />
+<hkern u1="&#xee;" u2="&#x2a;" k="-57" />
+<hkern u1="&#xef;" u2="&#x2122;" k="-59" />
+<hkern u1="&#xef;" u2="&#x7d;" k="-16" />
+<hkern u1="&#xef;" u2="]" k="-37" />
+<hkern u1="&#xef;" u2="\" k="-16" />
+<hkern u1="&#xef;" u2="&#x2a;" k="-23" />
+<hkern u1="&#xef;" u2="&#x29;" k="-25" />
+<hkern u1="&#xf0;" u2="&#x2122;" k="20" />
+<hkern u1="&#xf0;" u2="&#x2019;" k="23" />
+<hkern u1="&#xf0;" u2="&#x2018;" k="23" />
+<hkern u1="&#xf0;" u2="&#xc6;" k="20" />
+<hkern u1="&#xf0;" u2="z" k="10" />
+<hkern u1="&#xf0;" u2="y" k="18" />
+<hkern u1="&#xf0;" u2="x" k="35" />
+<hkern u1="&#xf0;" u2="w" k="14" />
+<hkern u1="&#xf0;" u2="v" k="16" />
+<hkern u1="&#xf0;" u2="t" k="14" />
+<hkern u1="&#xf0;" u2="s" k="8" />
+<hkern u1="&#xf0;" u2="f" k="14" />
+<hkern u1="&#xf0;" u2="]" k="33" />
+<hkern u1="&#xf0;" u2="\" k="29" />
+<hkern u1="&#xf0;" u2="Z" k="57" />
+<hkern u1="&#xf0;" u2="Y" k="68" />
+<hkern u1="&#xf0;" u2="X" k="66" />
+<hkern u1="&#xf0;" u2="W" k="53" />
+<hkern u1="&#xf0;" u2="V" k="59" />
+<hkern u1="&#xf0;" u2="U" k="20" />
+<hkern u1="&#xf0;" u2="T" k="90" />
+<hkern u1="&#xf0;" u2="S" k="18" />
+<hkern u1="&#xf0;" u2="J" k="31" />
+<hkern u1="&#xf0;" u2="I" k="16" />
+<hkern u1="&#xf0;" u2="A" k="23" />
+<hkern u1="&#xf0;" u2="&#x2f;" k="37" />
+<hkern u1="&#xf0;" u2="&#x29;" k="37" />
+<hkern u1="&#x2018;" u2="&#xf0;" k="27" />
+<hkern u1="&#x2018;" u2="&#xef;" k="-27" />
+<hkern u1="&#x2018;" u2="&#xec;" k="-29" />
+<hkern u1="&#x2018;" u2="&#xc6;" k="125" />
+<hkern u1="&#x2018;" u2="s" k="43" />
+<hkern u1="&#x2018;" u2="q" k="55" />
+<hkern u1="&#x2018;" u2="o" k="59" />
+<hkern u1="&#x2018;" u2="d" k="68" />
+<hkern u1="&#x2018;" u2="a" k="27" />
+<hkern u1="&#x2018;" u2="O" k="18" />
+<hkern u1="&#x2018;" u2="J" k="27" />
+<hkern u1="&#x2018;" u2="A" k="115" />
+<hkern u1="&#x2018;" u2="&#x2e;" k="287" />
+<hkern u1="&#x2019;" u2="&#x2039;" k="45" />
+<hkern u1="&#x2019;" u2="&#xf0;" k="27" />
+<hkern u1="&#x2019;" u2="&#xef;" k="-27" />
+<hkern u1="&#x2019;" u2="&#xec;" k="-29" />
+<hkern u1="&#x2019;" u2="&#xc6;" k="125" />
+<hkern u1="&#x2019;" u2="s" k="43" />
+<hkern u1="&#x2019;" u2="q" k="55" />
+<hkern u1="&#x2019;" u2="o" k="59" />
+<hkern u1="&#x2019;" u2="d" k="68" />
+<hkern u1="&#x2019;" u2="a" k="27" />
+<hkern u1="&#x2019;" u2="O" k="18" />
+<hkern u1="&#x2019;" u2="J" k="27" />
+<hkern u1="&#x2019;" u2="A" k="115" />
+<hkern u1="&#x2019;" u2="&#x40;" k="49" />
+<hkern u1="&#x2019;" u2="&#x3a;" k="47" />
+<hkern u1="&#x2019;" u2="&#x2f;" k="164" />
+<hkern u1="&#x2019;" u2="&#x2e;" k="287" />
+<hkern u1="&#x2019;" u2="&#x26;" k="41" />
+<hkern u1="&#x2039;" u2="Y" k="51" />
+<hkern u1="&#x2039;" u2="V" k="31" />
+<hkern u1="&#x2039;" u2="T" k="98" />
+<hkern u1="&#x203a;" u2="z" k="20" />
+<hkern u1="&#x203a;" u2="y" k="35" />
+<hkern u1="&#x203a;" u2="x" k="43" />
+<hkern u1="&#x203a;" u2="w" k="27" />
+<hkern u1="&#x203a;" u2="v" k="35" />
+<hkern u1="&#x203a;" u2="t" k="23" />
+<hkern u1="&#x203a;" u2="f" k="20" />
+<hkern u1="&#x203a;" u2="Z" k="20" />
+<hkern u1="&#x203a;" u2="Y" k="94" />
+<hkern u1="&#x203a;" u2="X" k="35" />
+<hkern u1="&#x203a;" u2="W" k="55" />
+<hkern u1="&#x203a;" u2="V" k="70" />
+<hkern u1="&#x203a;" u2="T" k="115" />
+<hkern u1="&#x203a;" u2="J" k="23" />
+<hkern u1="&#x203a;" u2="&#x27;" k="35" />
+<hkern u1="&#x2122;" u2="&#xef;" k="-18" />
+<hkern u1="&#x2122;" u2="&#xee;" k="-51" />
+<hkern u1="&#x2122;" u2="&#xec;" k="-20" />
+<hkern u1="&#x2122;" u2="&#xc6;" k="55" />
+<hkern u1="&#x2122;" u2="J" k="29" />
+<hkern u1="&#x2122;" u2="A" k="49" />
+</font>
+</defs></svg> -162 -186q96 -25 148.5 -95.5t52.5 -158.5q0 -137 -95 -217t-243.5 -80t-308.5 110l94 170q117 -88 219 -88q49 0 81 24.5t32 74t-44 75t-111.5 25.5t-119.5 -25v154l150 178h-250zM1491 537h186v-172h95v-164 h-95v-201h-186v201h-367v157l301 506h226l-299 -499h139v172z" />
+<glyph unicode="&#xbf;" horiz-adv-x="1077" d="M399 1022h312v-154q0 -84 -21.5 -126t-91.5 -113l-139 -144q-31 -37 -31 -95t33 -97t86 -39t89 46t44 122h326q-23 -205 -150 -321.5t-318.5 -116.5t-311.5 104.5t-120 288.5q0 82 20.5 122t29 57t38 52t39.5 43q49 51 93.5 94t58.5 71t14 83v123zM731 1284 q0 -76 -52 -128t-128 -52t-128 52t-52 128t52 128t128 52t128 -52t52 -128z" />
+<glyph unicode="&#xc0;" d="M1196 0l-133 309h-600l-133 -309h-340l618 1432h310l618 -1432h-340zM764 1006l-180 -416h358zM918 1575h-293l-285 229l315 135z" />
+<glyph unicode="&#xc1;" d="M1196 0l-133 309h-600l-133 -309h-340l618 1432h310l618 -1432h-340zM764 1006l-180 -416h358zM899 1579h-293l260 363l318 -134z" />
+<glyph unicode="&#xc2;" d="M1196 0l-133 309h-600l-133 -309h-340l618 1432h310l618 -1432h-340zM764 1006l-180 -416h358zM580 1575h-252l231 323h383l232 -323h-252l-172 166z" />
+<glyph unicode="&#xc3;" d="M1196 0l-133 309h-600l-133 -309h-340l618 1432h310l618 -1432h-340zM764 1006l-180 -416h358zM633 1681q-63 0 -62 -106h-217q0 154 66.5 242t171.5 88q66 0 159 -56.5t113 -56.5q63 0 62 106h217q0 -154 -66.5 -241.5t-171.5 -87.5q-63 0 -159.5 56t-112.5 56z" />
+<glyph unicode="&#xc4;" d="M1196 0l-133 309h-600l-133 -309h-340l618 1432h310l618 -1432h-340zM764 1006l-180 -416h358zM420 1734.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5zM815 1734.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5 t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5z" />
+<glyph unicode="&#xc5;" d="M606 1430q-61 66 -61 154.5t64.5 153t154.5 64.5t154.5 -64.5t64.5 -154.5t-65 -156l618 -1427h-340l-133 309h-600l-133 -309h-340zM764 1006l-180 -416h358zM692 1583q0 -29 21.5 -50.5t50.5 -21.5t50.5 21.5t21.5 50.5t-21.5 50.5t-50.5 21.5t-50.5 -21.5t-21.5 -50.5 z" />
+<glyph unicode="&#xc6;" horiz-adv-x="2095" d="M1966 1432v-281h-715v-309h641v-269h-641v-292h738v-281h-1078v309h-405l-162 -309h-377l735 1432h1264zM911 598v504l-260 -504h260z" />
+<glyph unicode="&#xc7;" horiz-adv-x="1499" d="M834 283q236 0 385 186l204 -211q-207 -233 -495 -268l-54 -99q133 -45 134 -155q0 -88 -73 -153.5t-183.5 -65.5t-214.5 65l77 176q45 -39 80 -39t54.5 18.5t19.5 46.5t-24.5 49.5t-58.5 21.5t-73 -19l84 160q-266 45 -436 244.5t-170 498.5t218 512t534 213 q352 0 590 -268l-199 -225q-152 188 -377 188q-180 0 -308 -117.5t-128 -317.5t121 -320.5t293 -120.5z" />
+<glyph unicode="&#xc8;" horiz-adv-x="1339" d="M1208 1432v-285h-712v-295h641v-272h-641v-297h735v-283h-1055v1432h1032zM827 1575h-292l-285 229l315 135z" />
+<glyph unicode="&#xc9;" horiz-adv-x="1339" d="M1208 1432v-285h-712v-295h641v-272h-641v-297h735v-283h-1055v1432h1032zM809 1579h-293l260 363l318 -134z" />
+<glyph unicode="&#xca;" horiz-adv-x="1339" d="M1208 1432v-285h-712v-295h641v-272h-641v-297h735v-283h-1055v1432h1032zM489 1575h-251l231 323h383l231 -323h-252l-172 166z" />
+<glyph unicode="&#xcb;" horiz-adv-x="1339" d="M1208 1432v-285h-712v-295h641v-272h-641v-297h735v-283h-1055v1432h1032zM348 1734.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5zM743 1734.5q0 63.5 44 107.5t107.5 44t108 -44t44.5 -107.5t-44.5 -107.5t-108 -44 t-107.5 44t-44 107.5z" />
+<glyph unicode="&#xcc;" horiz-adv-x="671" d="M176 1432h320v-1432h-320v1432zM502 1575h-293l-285 229l316 135z" />
+<glyph unicode="&#xcd;" horiz-adv-x="671" d="M176 1432h320v-1432h-320v1432zM483 1579h-293l261 363l317 -134z" />
+<glyph unicode="&#xce;" horiz-adv-x="671" d="M176 1432h320v-1432h-320v1432zM166 1577h-252l231 324h383l232 -324h-252l-172 166z" />
+<glyph unicode="&#xcf;" horiz-adv-x="671" d="M176 1432h320v-1432h-320v1432zM-14 1734.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5zM381 1734.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5z" />
+<glyph unicode="&#xd0;" horiz-adv-x="1605" d="M53 573v273h152v586h506q383 0 587.5 -187.5t204.5 -521.5t-199.5 -528.5t-609.5 -194.5h-489v573h-152zM1064 393.5q118 110.5 118 321.5t-118 324.5t-362 113.5h-178v-307h480v-273h-480v-290h203q219 0 337 110.5z" />
+<glyph unicode="&#xd1;" horiz-adv-x="1673" d="M1178 1432h319v-1432h-319l-682 897v-897h-320v1432h299l703 -922v922zM717 1679q-63 0 -62 -106h-217q0 154 66.5 242t171.5 88q66 0 159 -56.5t113 -56.5q63 0 62 106h217q0 -154 -66.5 -241.5t-171.5 -87.5q-63 0 -159.5 56t-112.5 56z" />
+<glyph unicode="&#xd2;" horiz-adv-x="1691" d="M1149 1050.5q-123 135.5 -302 135.5t-302 -135.5t-123 -327t123 -325.5t302 -134t302 134t123 325.5t-123 327zM845.5 -14q-317.5 0 -534.5 212t-217 527t217 527t534.5 212t534.5 -212t217 -527t-217 -527t-534.5 -212zM1012 1575h-293l-285 229l316 135z" />
+<glyph unicode="&#xd3;" horiz-adv-x="1691" d="M1149 1050.5q-123 135.5 -302 135.5t-302 -135.5t-123 -327t123 -325.5t302 -134t302 134t123 325.5t-123 327zM845.5 -14q-317.5 0 -534.5 212t-217 527t217 527t534.5 212t534.5 -212t217 -527t-217 -527t-534.5 -212zM993 1579h-293l261 363l317 -134z" />
+<glyph unicode="&#xd4;" horiz-adv-x="1691" d="M1149 1050.5q-123 135.5 -302 135.5t-302 -135.5t-123 -327t123 -325.5t302 -134t302 134t123 325.5t-123 327zM845.5 -14q-317.5 0 -534.5 212t-217 527t217 527t534.5 212t534.5 -212t217 -527t-217 -527t-534.5 -212zM674 1575h-252l231 323h383l232 -323h-252 l-172 166z" />
+<glyph unicode="&#xd5;" horiz-adv-x="1691" d="M1149 1050.5q-123 135.5 -302 135.5t-302 -135.5t-123 -327t123 -325.5t302 -134t302 134t123 325.5t-123 327zM845.5 -14q-317.5 0 -534.5 212t-217 527t217 527t534.5 212t534.5 -212t217 -527t-217 -527t-534.5 -212zM727 1679q-63 0 -61 -106h-217q0 154 66.5 242 t170.5 88q66 0 159 -56.5t113 -56.5q63 0 62 106h217q0 -154 -66.5 -241.5t-171.5 -87.5q-63 0 -159.5 56t-112.5 56z" />
+<glyph unicode="&#xd6;" horiz-adv-x="1691" d="M1149 1050.5q-123 135.5 -302 135.5t-302 -135.5t-123 -327t123 -325.5t302 -134t302 134t123 325.5t-123 327zM845.5 -14q-317.5 0 -534.5 212t-217 527t217 527t534.5 212t534.5 -212t217 -527t-217 -527t-534.5 -212zM494 1734.5q0 63.5 44 107.5t107.5 44t107.5 -44 t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5zM889 1734.5q0 63.5 44 107.5t107.5 44t107.5 -44t44 -107.5t-44 -107.5t-107.5 -44t-107.5 44t-44 107.5z" />
+<glyph unicode="&#xd7;" horiz-adv-x="1206" d="M604 924l326 333l176 -182l-322 -330l324 -333l-176 -183l-328 334l-325 -334l-181 183l328 333l-326 330l181 182z" />
+<glyph unicode="&#xd8;" horiz-adv-x="1691" d="M1597 725q0 -315 -217 -527t-534 -212q-80 0 -162 16l-106 -231h-289l149 327q-160 98 -252 263t-92 364q0 315 217 527t535 212q98 0 205 -26l96 211h291l-148 -322q143 -100 225 -258t82 -344zM846 1186q-178 0 -301 -135.5t-123 -338t143 -335.5l367 799 q-47 10 -86 10zM1149 398q123 134 123 320.5t-115 321.5l-352 -774q12 -2 41 -2q180 0 303 134z" />
+<glyph unicode="&#xd9;" horiz-adv-x="1538" d="M770 270q135 0 214 99.5t79 271.5v791h319v-801q0 -311 -172 -478t-440 -167t-441 168t-173 477v801h319v-791q0 -172 80 -271.5t215 -99.5zM932 1575h-293l-285 229l316 135z" />
+<glyph unicode="&#xda;" horiz-adv-x="1538" d="M770 270q135 0 214 99.5t79 271.5v791h319v-801q0 -311 -172 -478t-440 -167t-441 168t-173 477v801h319v-791q0 -172 80 -271.5t215 -99.5zM915 1579h-292l260 363l317 -134 \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-bold.ttf b/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-bold.ttf
new file mode 100644
index 0000000..a1df9e5
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-bold.ttf
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-bold.woff b/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-bold.woff
new file mode 100644
index 0000000..381aedc
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-bold.woff
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-regular.eot b/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-regular.eot
new file mode 100644
index 0000000..baf7032
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-regular.eot
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-regular.svg b/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-regular.svg
new file mode 100644
index 0000000..6bc82bd
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-regular.svg
@@ -0,0 +1,1365 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="montserratregular" horiz-adv-x="561" >
+<font-face units-per-em="2048" ascent="1638" descent="-410" />
+<missing-glyph horiz-adv-x="500" />
+<glyph horiz-adv-x="0" />
+<glyph horiz-adv-x="682" />
+<glyph horiz-adv-x="0" />
+<glyph horiz-adv-x="0" />
+<glyph unicode="&#xd;" horiz-adv-x="681" />
+<glyph unicode=" " />
+<glyph unicode="!" horiz-adv-x="604" d="M160 1466h286v-264l-61 -739h-164l-61 739v264zM197 29q-45 45 -45 107.5t45 107.5t107.5 45t107.5 -45t45 -107.5t-45 -107.5t-107.5 -45t-107.5 45z" />
+<glyph unicode="&#x22;" horiz-adv-x="765" d="M158 928v504h159v-504h-159zM449 928v504h159v-504h-159z" />
+<glyph unicode="#" horiz-adv-x="1505" d="M1374 893h-221l-59 -340h252l-46 -225h-243l-58 -328h-227l57 328h-301l-57 -328h-229l57 328h-211l45 225h205l59 340h-233l45 225h227l60 348h227l-59 -348h301l59 348h229l-63 -348h229zM928 893h-301l-62 -340h301z" />
+<glyph unicode="$" horiz-adv-x="1267" d="M580 -147v149q-281 29 -504 223l149 178q172 -150 355 -178v398q-231 55 -339 145t-108 267t124 290t323 123v102h131v-104q225 -16 426 -154l-133 -188q-135 96 -293 119v-385h6q236 -55 346.5 -149.5t110.5 -273.5t-127 -292t-336 -123v-147h-131zM866.5 276.5 q57.5 47.5 57.5 119t-45 113.5t-168 79v-369q98 10 155.5 57.5zM435 1174.5q-52 -46.5 -52 -115t41 -108.5t156 -77v355q-93 -8 -145 -54.5z" />
+<glyph unicode="%" horiz-adv-x="1609" d="M709 1141q0 -135 -89.5 -231.5t-221.5 -96.5t-220 95.5t-88 230.5t89 231t221 96t220.5 -95t88.5 -230zM1454 1432l-1048 -1432h-265l1049 1432h264zM516 1136.5q0 61.5 -35 103.5t-85 42t-82.5 -42t-32.5 -103.5t34.5 -103.5t85 -42t83 42t32.5 103.5zM1522 311 q0 -135 -89.5 -231t-221.5 -96t-220 95t-88 230t89 231.5t221.5 96.5t220.5 -95.5t88 -230.5zM1333 303.5q0 61.5 -34.5 103.5t-85 42t-83 -42t-32.5 -103.5t34.5 -103.5t85 -42t83 42t32.5 103.5z" />
+<glyph unicode="&#x26;" horiz-adv-x="1421" d="M584 -16q-201 0 -342.5 111.5t-141.5 305.5q0 231 336 412q-84 96 -117.5 157.5t-33.5 155.5q0 164 120.5 252t284.5 88t278.5 -84t114.5 -235q0 -203 -327 -383q164 -201 266 -307q63 94 98 219l168 -119q-53 -141 -121 -248q82 -84 209 -203l-153 -143l-189 187 q-180 -166 -450 -166zM405.5 240.5q77.5 -58.5 206.5 -58.5t275 119q-207 217 -328 365q-231 -125 -231 -275q0 -92 77.5 -150.5zM566.5 1241q-54.5 -43 -54.5 -100.5t27.5 -103.5t95.5 -128q231 115 231 213q0 82 -54 122t-122.5 40t-123 -43z" />
+<glyph unicode="'" horiz-adv-x="475" d="M158 928v504h159v-504h-159z" />
+<glyph unicode="(" horiz-adv-x="679" d="M330 638.5q0 -235.5 82 -490t200 -420.5h-243q-100 139 -183.5 397t-83.5 514t83 514t184 397h243q-119 -166 -200.5 -421t-81.5 -490.5z" />
+<glyph unicode=")" horiz-adv-x="679" d="M350 638.5q0 235.5 -82 490.5t-200 421h243q100 -139 183.5 -397t83.5 -514t-83 -514t-184 -397h-243q119 166 200.5 420.5t81.5 490z" />
+<glyph unicode="*" horiz-adv-x="884" d="M690 881l-194 131l16 -234h-139l16 236l-194 -131l-70 118l209 105l-209 102l70 121l192 -129l-14 232h139l-14 -232l192 127l70 -119l-211 -102l211 -105z" />
+<glyph unicode="+" horiz-adv-x="1163" d="M489 307v389h-391v193h391v385h185v-385h391v-193h-391v-389h-185z" />
+<glyph unicode="," horiz-adv-x="575" d="M135 133q0 66 45 110t106.5 44t107.5 -44t46 -105.5t-55 -149.5l-123 -203h-119l76 213q-84 39 -84 135z" />
+<glyph unicode="-" horiz-adv-x="974" d="M147 504v215h680v-215h-680z" />
+<glyph unicode="." horiz-adv-x="573" d="M135 137.5q0 63.5 44 107.5t107.5 44t108.5 -44t45 -107.5t-45 -108.5t-108.5 -45t-107.5 45t-44 108.5z" />
+<glyph unicode="/" horiz-adv-x="1202" d="M944 1661h205l-887 -1901h-205z" />
+<glyph unicode="0" horiz-adv-x="1409" d="M354 725q0 -240 85 -387.5t265.5 -147.5t263.5 146.5t83 388.5t-83 388.5t-263.5 146.5t-265.5 -147.5t-85 -387.5zM121 725q0 338 145.5 539.5t438 201.5t438 -201.5t145.5 -539.5t-145.5 -539.5t-438 -201.5t-438 201.5t-145.5 539.5z" />
+<glyph unicode="1" horiz-adv-x="780" d="M59 1432h521v-1432h-230v1217h-291v215z" />
+<glyph unicode="2" horiz-adv-x="1206" d="M759.5 872q61.5 84 61.5 170t-65.5 146.5t-165.5 60.5q-176 0 -293 -180l-195 113q94 141 208 212.5t293 71.5t314.5 -113.5t135.5 -310.5q0 -111 -57.5 -211t-211.5 -258l-335 -342h649v-231h-979v205l434 436q145 147 206.5 231z" />
+<glyph unicode="3" horiz-adv-x="1183" d="M158 1217v215h837v-189l-346 -387q197 -6 307.5 -124t110.5 -281q0 -219 -148.5 -344t-382 -125t-456.5 149l102 195q176 -123 369 -123q125 0 206 58t81 168t-90.5 175.5t-249.5 65.5q-80 0 -154 -23v184l332 386h-518z" />
+<glyph unicode="4" horiz-adv-x="1171" d="M690 580v262h230v-262h172v-220h-172v-360h-230v360h-614v213l526 859h264l-518 -852h342z" />
+<glyph unicode="5" horiz-adv-x="1185" d="M995 1434v-220h-604v-352q90 49 205 49q201 0 346 -120.5t145 -327.5t-151.5 -343t-372.5 -136q-289 0 -461 192l129 176q16 -16 44 -38.5t114 -60.5t188.5 -38t186.5 61.5t84 179t-89 182t-225.5 64.5t-259.5 -67l-102 110v689h823z" />
+<glyph unicode="6" horiz-adv-x="1269" d="M725 1241q-190 0 -280.5 -129t-92.5 -348q51 57 147.5 107.5t213.5 50.5q193 0 322.5 -128t129.5 -340t-140 -341t-353 -129q-344 0 -475 307q-74 176 -74 397t47 368.5t129 233.5q160 168 392.5 168t420.5 -145l-121 -178q-47 41 -126 73.5t-140 32.5zM474 640 q-83 -69 -83 -178.5t80 -188t201 -78.5t200.5 70.5t79.5 180t-73.5 186.5t-197.5 77t-207 -69z" />
+<glyph unicode="7" horiz-adv-x="1159" d="M94 1020v412h1008v-215l-606 -1217h-267l592 1212h-508v-192h-219z" />
+<glyph unicode="8" horiz-adv-x="1302" d="M651 1460q207 0 344.5 -108.5t137.5 -273.5t-154 -292q207 -131 207 -368q0 -184 -147.5 -309t-387 -125t-387 124.5t-147.5 309.5q0 238 207 368q-154 127 -154 292t137 273.5t344 108.5zM651.5 193q106.5 0 200.5 60t94 173t-90 174.5t-204.5 61.5t-205 -61.5 t-90.5 -174.5t94.5 -173t201 -60zM651.5 842q104.5 0 181 62.5t76.5 153.5t-76.5 152.5t-181 61.5t-181.5 -61.5t-77 -152.5t77 -153.5t181.5 -62.5z" />
+<glyph unicode="9" horiz-adv-x="1267" d="M545 201q190 0 280 129t93 348q-51 -57 -147.5 -107.5t-213.5 -50.5q-193 0 -323 128t-130 340t140.5 341t353.5 129q344 0 475 -307q74 -176 74 -397.5t-47 -368.5t-129 -233q-160 -168 -392.5 -168t-420.5 145l121 178q47 -41 126 -73.5t140 -32.5zM796 801.5 q83 68.5 83 178.5t-80 188.5t-200 78.5t-197.5 -70.5t-77.5 -181t70.5 -186.5t194.5 -76t207 68.5z" />
+<glyph unicode=":" horiz-adv-x="600" d="M147 137.5q0 63.5 44.5 107.5t107.5 44t108.5 -44t45.5 -107.5t-45.5 -108.5t-108.5 -45t-107.5 45t-44.5 108.5zM147 638.5q0 63.5 44.5 108t107.5 44.5t108.5 -44.5t45.5 -108t-45.5 -108.5t-108.5 -45t-107.5 45t-44.5 108.5z" />
+<glyph unicode=";" horiz-adv-x="606" d="M150 135q0 66 45 110t107.5 44t108.5 -44t46 -103.5t-56 -153.5l-125 -203h-118l75 213q-83 43 -83 137zM150 638.5q0 63.5 44 108t107.5 44.5t108.5 -44.5t45 -108t-45 -108.5t-108.5 -45t-107.5 45t-44 108.5z" />
+<glyph unicode="&#x3c;" horiz-adv-x="1212" d="M92 684v258l965 447v-234l-721 -326v-22l721 -334v-233z" />
+<glyph unicode="=" horiz-adv-x="1277" d="M123 1081h1032v-192h-1032v192zM123 696h1032v-192h-1032v192z" />
+<glyph unicode="&#x3e;" horiz-adv-x="1212" d="M1120 942v-258l-964 -444v233l721 334v22l-721 326v234z" />
+<glyph unicode="?" horiz-adv-x="1040" d="M618 444h-231v125q0 82 19.5 122t85.5 106l149 149q47 51 47 127t-49 126t-127 50t-130 -48t-60 -128h-248q20 182 142 285.5t304 103.5t297 -99t115 -278q0 -123 -68 -204q-39 -49 -59.5 -69.5t-54 -52.5t-57 -55.5t-38.5 -39.5q-37 -45 -37 -127v-93zM395 34 q-47 44 -47 106.5t46 107.5t110.5 45t112 -44t47.5 -106.5t-46.5 -107.5t-111 -45t-111.5 44z" />
+<glyph unicode="@" horiz-adv-x="1851" d="M913 -258q-344 0 -576.5 229.5t-232.5 573.5t244 588.5t589 244.5t581.5 -244.5t236.5 -596.5q0 -221 -84 -357.5t-223 -136.5q-100 0 -159.5 68.5t-63.5 195.5q-115 -264 -367 -264q-176 0 -310 141.5t-134 358.5t127 364.5t336 147.5q94 0 178 -49.5t121 -116.5v137 h196v-715q0 -143 113 -143q63 0 115.5 93t52.5 245q0 328 -198 555t-510 227t-531 -219t-219 -524t206.5 -509t511.5 -204q246 0 377 123l45 -76q-72 -61 -190.5 -99t-231.5 -38zM1100 770q-78 86 -203 86t-200.5 -88t-75.5 -216t74.5 -223.5t203.5 -95.5t204 93.5t75 225.5 t-78 218z" />
+<glyph unicode="A" horiz-adv-x="1519" d="M401 326l-143 -326h-258l631 1432h258l631 -1432h-258l-144 326h-717zM1020 549l-260 590l-260 -590h520z" />
+<glyph unicode="B" horiz-adv-x="1445" d="M825 0h-626v1432h557q145 0 250.5 -35t156.5 -94q98 -111 99 -250q0 -168 -107 -250q-39 -29 -53.5 -36t-50.5 -24q133 -29 211.5 -120t78.5 -226q0 -150 -102 -264q-121 -133 -414 -133zM440 838h308q262 0 262 178q0 102 -63.5 147t-196.5 45h-310v-370zM440 223h379 q133 0 204 42t71 159q0 190 -306 190h-348v-391z" />
+<glyph unicode="C" horiz-adv-x="1507" d="M852 219q125 0 215 42t188 134l156 -159q-227 -252 -551.5 -252t-539 208.5t-214.5 528t218.5 532.5t551 213t556.5 -245l-154 -168q-102 98 -193.5 137t-214.5 39q-217 0 -364.5 -140.5t-147.5 -358.5t146.5 -364.5t347.5 -146.5z" />
+<glyph unicode="D" horiz-adv-x="1601" d="M1282 1244.5q207 -187.5 207 -521.5t-201 -528.5t-614 -194.5h-475v1432h491q385 0 592 -187.5zM1245 717q0 492 -563 491h-242v-981h269q260 0 398 124t138 366z" />
+<glyph unicode="E" horiz-adv-x="1339" d="M1204 1432v-228h-764v-379h686v-215h-686v-383h789v-227h-1030v1432h1005z" />
+<glyph unicode="F" horiz-adv-x="1236" d="M440 1206v-393h635v-223h-635v-590h-241v1432h954l-2 -226h-711z" />
+<glyph unicode="G" horiz-adv-x="1550" d="M1190 696h242v-489q-203 -223 -580 -223q-317 0 -531.5 208.5t-214.5 528t218.5 532.5t527.5 213t514 -180l-129 -184q-84 72 -169 99.5t-198 27.5q-217 0 -364.5 -140.5t-147.5 -368.5t143.5 -366.5t347.5 -138.5t341 88v393z" />
+<glyph unicode="H" horiz-adv-x="1591" d="M199 0v1432h241v-621h711v621h242v-1432h-242v586h-711v-586h-241z" />
+<glyph unicode="I" horiz-adv-x="638" d="M199 1432h241v-1432h-241v1432z" />
+<glyph unicode="J" horiz-adv-x="1128" d="M246 1214v218h696v-945q0 -250 -127 -374.5t-326 -124.5q-250 0 -426 176l138 190q139 -133 272 -133q94 0 160.5 63.5t66.5 190.5v739h-454z" />
+<glyph unicode="K" horiz-adv-x="1441" d="M199 1432h241v-699l656 699h307l-576 -627l584 -805h-287l-475 627l-209 -226v-401h-241v1432z" />
+<glyph unicode="L" horiz-adv-x="1159" d="M199 0v1432h241v-1203h654v-229h-895z" />
+<glyph unicode="M" horiz-adv-x="2013" d="M440 0h-241v1432h376l433 -900l432 900h375v-1432h-242v1118l-500 -993h-135l-498 993v-1118z" />
+<glyph unicode="N" horiz-adv-x="1712" d="M1272 1432h241v-1432h-262l-811 1044v-1044h-241v1432h241l832 -1070v1070z" />
+<glyph unicode="O" horiz-adv-x="1720" d="M860 1245q-213 0 -359.5 -151.5t-146.5 -367.5t146.5 -367.5t359.5 -151.5t359.5 151.5t146.5 367.5t-146.5 367.5t-359.5 151.5zM860.5 -14q-319.5 0 -537 212t-217.5 528t217.5 528t537 212t536.5 -212t217 -528t-217 -528t-536.5 -212z" />
+<glyph unicode="P" horiz-adv-x="1400" d="M1165.5 1307q149.5 -125 149.5 -385t-152.5 -381t-468.5 -121h-254v-420h-241v1432h491q326 0 475.5 -125zM994.5 716q72.5 77 72.5 225.5t-92 209.5t-289 61h-246v-573h281q201 0 273.5 77z" />
+<glyph unicode="Q" horiz-adv-x="1720" d="M891 -12l-31 -2q-319 0 -536.5 212t-217.5 528t217.5 528t537 212t536.5 -212t217 -527q0 -240 -129 -425t-344 -267q70 -92 176 -92q78 0 152.5 41t113.5 106l137 -190q-178 -188 -407 -189q-131 0 -252 74t-170 203zM860 1245q-213 0 -359.5 -151.5t-146.5 -367.5 t146.5 -367.5t359.5 -151.5t359.5 151.5t146.5 367.5t-146.5 367.5t-359.5 151.5z" />
+<glyph unicode="R" horiz-adv-x="1490" d="M1341 967q0 -354 -309 -447l375 -520h-307l-342 481h-318v-481h-241v1432h532q328 0 469 -110.5t141 -354.5zM1020 763.5q74 63.5 74 204t-76 192.5t-270 52h-308v-512h301q205 0 279 63.5z" />
+<glyph unicode="S" horiz-adv-x="1290" d="M458.5 1200q-67.5 -43 -67.5 -130t67.5 -133t288 -99.5t332 -149.5t111.5 -283.5t-141.5 -304t-370.5 -116.5q-336 0 -596 231l151 182q217 -188 451 -188q117 0 185.5 50t68.5 133t-64.5 129t-222 84t-239.5 70t-146 83q-127 96 -127 294.5t144.5 306t357.5 107.5 q137 0 272.5 -45t233.5 -127l-129 -182q-63 57 -172 94t-214.5 37t-173 -43z" />
+<glyph unicode="T" horiz-adv-x="1236" d="M739 1210v-1210h-241v1210h-435v222h1111v-222h-435z" />
+<glyph unicode="U" horiz-adv-x="1572" d="M786 213q168 0 266.5 114.5t98.5 311.5v793h242v-803q0 -309 -170 -476t-436.5 -167t-436.5 166.5t-170 476.5v803h242v-793q0 -197 98 -311.5t266 -114.5z" />
+<glyph unicode="V" horiz-adv-x="1433" d="M852 0h-270l-576 1432h270l441 -1070l440 1070h270z" />
+<glyph unicode="W" horiz-adv-x="2146" d="M645 401l320 1031h217l319 -1031l361 1031h260l-500 -1432h-240l-301 981h-16l-301 -981h-240l-499 1432h260z" />
+<glyph unicode="X" horiz-adv-x="1378" d="M1047 0l-353 539h-10l-352 -539h-301l491 735l-456 697h299l319 -484h10l320 484h299l-457 -697l492 -735h-301z" />
+<glyph unicode="Y" horiz-adv-x="1277" d="M762 0h-246v565l-532 867h264l391 -652l391 652h264l-532 -867v-565z" />
+<glyph unicode="Z" horiz-adv-x="1382" d="M930 1210h-807v222h1143v-189l-832 -1014v-6h844v-223h-1182v186l834 1018v6z" />
+<glyph unicode="[" horiz-adv-x="727" d="M643 1550v-172h-283v-1493h283v-172h-463v1837h463z" />
+<glyph unicode="\" horiz-adv-x="1069" d="M57 1550h205l746 -1550h-205z" />
+<glyph unicode="]" horiz-adv-x="727" d="M84 1378v172h463v-1837h-463v172h283v1493h-283z" />
+<glyph unicode="^" horiz-adv-x="806" d="M559 1520l-158 170l-157 -170h-199l250 319h209l248 -319h-193z" />
+<glyph unicode="_" horiz-adv-x="1478" d="M147 -283v117h1184v-117h-1184z" />
+<glyph unicode="`" horiz-adv-x="1705" d="M1106 1229h-209l-250 196l242 101z" />
+<glyph unicode="a" horiz-adv-x="1202" d="M1049 0h-209v145q-135 -162 -363 -161q-170 0 -281.5 96t-111.5 257t119 240.5t321 79.5h297v41q0 217 -241 217q-152 0 -316 -110l-102 143q199 158 450 158q193 0 315 -97.5t122 -306.5v-702zM819 406v92h-258q-248 0 -248 -156q0 -80 61.5 -122t171 -42t191.5 62 t82 166z" />
+<glyph unicode="b" horiz-adv-x="1376" d="M1124.5 954.5q155.5 -151.5 155.5 -403.5t-154.5 -409.5t-360.5 -157.5t-370 180v-164h-229v1520h229v-621q135 207 354.5 207t375 -151.5zM485.5 287.5q94.5 -99.5 229.5 -99.5t235.5 98.5t100.5 255t-98.5 260t-235.5 103.5t-231.5 -103.5t-94.5 -259t94.5 -255z" />
+<glyph unicode="c" horiz-adv-x="1179" d="M649 -16q-227 0 -391 154.5t-164 404.5t171 406.5t417 156.5t416 -170l-135 -166q-141 123 -284.5 123t-249 -95.5t-105.5 -246t104 -254.5t257 -104t288 139l135 -148q-199 -200 -459 -200z" />
+<glyph unicode="d" horiz-adv-x="1376" d="M249.5 139.5q-153.5 155.5 -153.5 409.5t158 405.5t376 151.5t351 -184v598h229v-1520h-229v164q-127 -180 -371 -180q-207 0 -360.5 155.5zM426 284.5q100 -98.5 235.5 -98.5t229.5 99.5t94 255t-94 260t-231.5 104.5t-235.5 -104.5t-98 -261t100 -255z" />
+<glyph unicode="e" horiz-adv-x="1265" d="M1180 444h-854q8 -119 108.5 -191.5t229.5 -72.5q205 0 311 129l131 -143q-176 -182 -459 -182q-229 0 -390 152.5t-161 409.5t164 408.5t386 151.5t378 -134t156 -370v-158zM326 625h624q0 137 -86 210.5t-212 73.5t-226 -76.5t-100 -207.5z" />
+<glyph unicode="f" horiz-adv-x="790" d="M449 1180v-90h286v-185h-286v-905h-230v905h-137v185h137v84q0 172 103.5 273t250 101t267.5 -108l-95 -162q-68 72 -141.5 72t-114 -46t-40.5 -124z" />
+<glyph unicode="g" horiz-adv-x="1339" d="M1174 1090v-951q0 -289 -157 -433t-402.5 -144t-444.5 153l109 174q160 -121 322.5 -120.5t257.5 84.5t95 268v139q-51 -96 -146 -153.5t-214 -57.5q-217 0 -356.5 151.5t-139.5 377t139.5 377t355.5 151.5t351 -178v162h230zM406.5 355.5q82.5 -97.5 223 -97.5t227.5 94 t87 234.5t-88 238t-227.5 97.5t-222 -100.5t-82.5 -234.5t82.5 -231.5z" />
+<glyph unicode="h" horiz-adv-x="1323" d="M395 590v-590h-229v1518h229v-627q49 100 148.5 157.5t214.5 57.5q184 0 297.5 -112.5t113.5 -325.5v-668h-229v598q0 301 -250 301q-119 0 -207 -78.5t-88 -230.5z" />
+<glyph unicode="i" d="M395 0h-229v1090h229v-1090zM137 1409q0 59 43 102t102.5 43t102.5 -43t43 -102t-43 -102t-102.5 -43t-102.5 43t-43 102z" />
+<glyph unicode="j" d="M166 -51v1141h229v-1149q0 -172 -103.5 -273.5t-249.5 -101.5t-267 108l106 172q70 -68 140.5 -67.5t107.5 45.5t37 125zM133 1409q0 59 43 102t102.5 43t102.5 -43t43 -102t-43 -102t-102.5 -43t-102.5 43t-43 102z" />
+<glyph unicode="k" horiz-adv-x="1189" d="M395 0h-229v1520h229v-893l443 463h295l-414 -433l444 -657h-278l-324 477l-166 -168v-309z" />
+<glyph unicode="l" d="M395 0h-229v1520h229v-1520z" />
+<glyph unicode="m" horiz-adv-x="2076" d="M395 590v-590h-229v1090h229v-199q49 100 148.5 157.5t214.5 57.5q258 0 350 -213q162 213 403 213q184 0 298 -112.5t114 -325.5v-668h-229v598q0 301 -250 301q-117 0 -204 -74.5t-91 -218.5v-606h-229v598q0 156 -55.5 228.5t-174.5 72.5t-207 -78.5t-88 -230.5z" />
+<glyph unicode="n" horiz-adv-x="1323" d="M395 590v-590h-229v1090h229v-199q55 100 152.5 157.5t210.5 57.5q184 0 297.5 -112.5t113.5 -325.5v-668h-229v598q0 301 -250 301q-119 0 -207 -78.5t-88 -230.5z" />
+<glyph unicode="o" horiz-adv-x="1335" d="M667.5 188q149.5 0 247 99.5t97.5 257t-97.5 257t-247 99.5t-246.5 -99.5t-97 -257t97 -257t246.5 -99.5zM667.5 -16q-245.5 0 -409.5 162.5t-164 398t164 398.5t409.5 163t409.5 -163t164 -398.5t-164 -398t-409.5 -162.5z" />
+<glyph unicode="p" horiz-adv-x="1376" d="M1124.5 954.5q155.5 -151.5 155.5 -403.5t-154.5 -409.5t-360.5 -157.5t-370 180v-561h-229v1487h229v-191q135 207 354.5 207t375 -151.5zM485.5 287.5q94.5 -99.5 229.5 -99.5t235.5 98.5t100.5 255t-98.5 260t-235.5 103.5t-231.5 -103.5t-94.5 -259t94.5 -255z" />
+<glyph unicode="q" horiz-adv-x="1376" d="M251 141.5q-155 157.5 -155 409.5t156 403.5t375 151.5t354 -207v191h229v-1487h-229v561q-164 -180 -369.5 -180t-360.5 157.5zM426 286.5q100 -98.5 235.5 -98.5t229.5 99.5t94 255t-94 259t-231.5 103.5t-235.5 -103.5t-98 -260t100 -255z" />
+<glyph unicode="r" horiz-adv-x="813" d="M737 874q-170 0 -256 -110.5t-86 -296.5v-467h-229v1090h229v-220q55 102 150.5 168t202.5 68l2 -232h-13z" />
+<glyph unicode="s" horiz-adv-x="1036" d="M829.5 77q-112.5 -93 -288.5 -93q-119 0 -247 43t-226 120l110 179q190 -143 369 -144q78 0 123 36t45 91q0 82 -217 148q-16 6 -25 8q-340 92 -340 307q0 152 118 243t306 91t356 -111l-86 -170q-133 88 -288 88q-82 0 -133.5 -29.5t-51.5 -88.5q0 -53 54 -78 q37 -18 103.5 -34.5t117.5 -33t99 -37t103 -57.5q111 -74 111 -229.5t-112.5 -248.5z" />
+<glyph unicode="t" horiz-adv-x="856" d="M449 905v-553q0 -78 40.5 -124t114.5 -46t141 72l95 -162q-121 -109 -267.5 -108.5t-250 101.5t-103.5 273v547h-137v185h137v342h230v-342h286v-185h-286z" />
+<glyph unicode="u" horiz-adv-x="1323" d="M928 500v590h229v-1090h-229v199q-55 -100 -152.5 -157.5t-210.5 -57.5q-184 0 -297.5 112.5t-113.5 325.5v668h229v-598q0 -301 250 -302q119 0 207 79t88 231z" />
+<glyph unicode="v" horiz-adv-x="1171" d="M455 0l-439 1090h238l332 -824l332 824h237l-438 -1090h-262z" />
+<glyph unicode="w" horiz-adv-x="1867" d="M676 0h-262l-377 1090h237l271 -824l270 824h238l270 -824l270 824h238l-377 -1090h-262l-258 745z" />
+<glyph unicode="x" horiz-adv-x="1142" d="M340 1090l233 -359l242 359h272l-380 -533l397 -557h-283l-260 362l-254 -362h-268l387 555l-367 535h281z" />
+<glyph unicode="y" horiz-adv-x="1175" d="M303 -434q-150 0 -270 108l104 187q72 -68 148.5 -68t125 55.5t48.5 120.5q0 29 -441 1121h246l326 -803l325 803h246l-528 -1295q-47 -106 -135.5 -167.5t-194.5 -61.5z" />
+<glyph unicode="z" horiz-adv-x="1107" d="M131 889v196h852v-206l-612 -680h645v-199h-926v223l596 666h-555z" />
+<glyph unicode="{" horiz-adv-x="688" d="M565 1362q-127 0 -127 -117v-444q0 -143 -135 -168q135 -23 135 -166v-481q0 -53 30 -74t114 -21v-190h-70q-279 0 -279 270v443q0 68 -24.5 95.5t-77.5 27.5h-49v190h49q53 0 77.5 28.5t24.5 98.5v426q0 270 279 270h70v-190q-7 2 -17 2z" />
+<glyph unicode="|" horiz-adv-x="526" d="M178 -313v1915h170v-1915h-170z" />
+<glyph unicode="}" horiz-adv-x="688" d="M176 -299h-70v190q84 0 114 20.5t30 74.5v481q0 143 135 166q-135 25 -135 168v444q0 63 -34 91t-66 28h-7l-37 -4v190h70q279 0 279 -270v-426q0 -70 24.5 -98.5t77.5 -28.5h49v-190h-49q-53 0 -77.5 -28t-24.5 -95v-443q0 -270 -279 -270z" />
+<glyph unicode="~" horiz-adv-x="1157" d="M377 758q-82 0 -96 -133l-179 51q12 143 86 216t191 73q92 0 248 -84q102 -53 151 -54q82 0 96 134l181 -52q-12 -143 -87 -217t-192 -74q-88 0 -248 87q-102 53 -151 53z" />
+<glyph unicode="&#xa0;" />
+<glyph unicode="&#xa1;" horiz-adv-x="602" d="M442 -16h-284v258l61 739h164l59 -739v-258zM195 1200q-45 45 -45 107.5t45 107.5t107.5 45t107.5 -45t45 -107.5t-45 -107.5t-107.5 -45t-107.5 45z" />
+<glyph unicode="&#xa2;" horiz-adv-x="1200" d="M592 -250v238q-207 23 -349.5 173t-142.5 379.5t141.5 380t350.5 179.5v243h131v-239q231 -18 381 -168l-135 -166q-125 106 -246 119v-694q135 14 256 137l135 -148q-170 -174 -391 -196v-238h-131zM404.5 765q-74.5 -89 -74.5 -215t72.5 -220t189.5 -125v676 q-113 -27 -187.5 -116z" />
+<glyph unicode="&#xa3;" horiz-adv-x="1261" d="M539 1057v-269h342v-200h-342v-373h610v-215h-1020v215h168v373h-176v200h176v256q0 248 125 362t328 114q268 0 403 -230l-170 -135q-84 139 -217 139q-98 0 -162.5 -56t-64.5 -181z" />
+<glyph unicode="&#xa4;" horiz-adv-x="1546" d="M307 311q-109 147 -108.5 336t104.5 332l-180 180l145 144l185 -183q139 90 317 90t324 -92l184 185l145 -144l-182 -182q104 -147 104.5 -330.5t-110.5 -333.5l188 -186l-143 -143l-195 190q-137 -86 -313 -86t-313 86l-193 -190l-143 143zM772 305q143 0 237.5 96.5 t94.5 248t-94.5 246.5t-237.5 95t-237.5 -95t-94.5 -246.5t94.5 -248t237.5 -96.5z" />
+<glyph unicode="&#xa5;" horiz-adv-x="1464" d="M209 434h389v111l-8 12h-381v180h274l-411 695h264l387 -658h14l402 658h260l-426 -695h268v-180h-379l-6 -12v-111h385v-180h-387v-254h-256v254h-389v180z" />
+<glyph unicode="&#xa6;" horiz-adv-x="565" d="M186 881v669h193v-669h-193zM186 -49v670h193v-670h-193z" />
+<glyph unicode="&#xa7;" horiz-adv-x="1249" d="M297 649q0 -96 120 -159.5t306 -63.5q106 0 177 45t71 111.5t-47 109.5t-121 66q-147 43 -261 43t-179.5 -40t-65.5 -112zM468 1284q-54 -43 -54 -111.5t59 -109.5t269 -91t314.5 -130t104.5 -230q0 -102 -65.5 -185t-204.5 -116q94 -35 141 -106.5t47 -147.5 q0 -141 -119.5 -240.5t-320.5 -99.5q-293 0 -518 201l131 156q201 -166 393 -166q219 0 219 139q0 66 -68.5 109t-268 101t-311.5 141t-112 243q0 98 68 180t188 105q-166 66 -165.5 229.5t120 264t306.5 100.5q133 0 233 -33t205 -109l-117 -164q-152 113 -326 113 q-94 0 -148 -43z" />
+<glyph unicode="&#xa8;" horiz-adv-x="1249" d="M376 1268q-36 37 -36 89t37 89t89 37t89 -36t37 -88t-38 -90t-90 -38t-88 37zM756 1268q-37 37 -37 89t37 89t89 37t89 -36t37 -88t-37 -90t-89 -38t-89 37z" />
+<glyph unicode="&#xa9;" horiz-adv-x="1703" d="M1593 719q0 -305 -217 -524.5t-526 -219.5t-524 217.5t-215 522.5t217 524t524 219t524 -217t217 -522zM1503 717q0 268 -187.5 458.5t-459.5 190.5t-460.5 -191.5t-188.5 -461t186.5 -460t458.5 -190.5t461.5 193t189.5 461zM1194 459q-139 -145 -317.5 -145.5 t-297 111.5t-118.5 294t123 294.5t305 112.5t299 -122l-98 -121q-106 90 -209 90t-179.5 -68.5t-76.5 -178.5t76.5 -185.5t188 -75.5t206.5 100z" />
+<glyph unicode="&#xaa;" horiz-adv-x="720" d="M567 954h-96v68q-63 -76 -154.5 -76t-143.5 45t-52 119q0 150 203 150h139v18q0 100 -113 100q-68 0 -145 -51l-47 68q90 72 194 71q215 0 215 -186v-326zM461 1143v43h-119q-115 0 -115 -74q0 -37 29 -56.5t79 -19.5t88 30t38 77z" />
+<glyph unicode="&#xab;" horiz-adv-x="1120" d="M580 852l-236 -360l236 -361h-222l-243 361l243 360h222zM985 852l-235 -360l235 -361h-221l-244 361l244 360h221z" />
+<glyph unicode="&#xac;" horiz-adv-x="1695" d="M137 911h1370v-731h-168v551h-1202v180z" />
+<glyph unicode="&#xad;" horiz-adv-x="974" d="M147 504v215h680v-215h-680z" />
+<glyph unicode="&#xae;" horiz-adv-x="1703" d="M1593 719q0 -305 -217 -524.5t-526 -219.5t-524 217.5t-215 522.5t217 524t524 219t524 -217t217 -522zM1503 717q0 268 -187.5 458.5t-459.5 190.5t-460.5 -191.5t-188.5 -461t186.5 -460t458.5 -190.5t461.5 193t189.5 461zM1210 860q0 -199 -174 -250l213 -288h-172 l-192 268h-176v-268h-140v800h301q182 0 261 -62.5t79 -199.5zM1031 747.5q42 34.5 42 113.5t-43 109.5t-151 30.5h-170v-288h165q115 0 157 34.5z" />
+<glyph unicode="&#xaf;" horiz-adv-x="868" d="M750 1407v-178h-629v178h629z" />
+<glyph unicode="&#xb0;" horiz-adv-x="851" d="M426 1464q131 0 223 -92t92 -223t-92 -222t-223 -91t-223 91t-92 222t92 223t223 92zM277.5 1001.5q60.5 -61.5 147.5 -61.5t147.5 61.5t60.5 147.5t-60.5 146.5t-147.5 60.5t-147.5 -60.5t-60.5 -146.5t60.5 -147.5z" />
+<glyph unicode="&#xb1;" horiz-adv-x="1163" d="M489 565v277h-391v192h391v273h185v-273h391v-192h-391v-277h-185zM98 451h967v-172h-967v172z" />
+<glyph unicode="&#xb2;" horiz-adv-x="858" d="M519 1120q36 49 36 99.5t-38 85t-97 34.5q-104 0 -172 -104l-113 65q109 166 287 166q111 0 189.5 -66.5t78.5 -180.5q0 -63 -33.5 -122t-124.5 -153l-194 -199h379v-135h-572v119l252 256q86 86 122 135z" />
+<glyph unicode="&#xb3;" horiz-adv-x="811" d="M158 1305v127h495v-113l-204 -229q117 -2 181 -73t64 -183.5t-87 -186.5t-226 -74t-270 89l61 114q100 -72 217 -71q74 0 122 33.5t48 99t-53 104.5t-124 39t-116 -14v108l197 230h-305z" />
+<glyph unicode="&#xb4;" horiz-adv-x="1705" d="M901 1286h-209l217 297l242 -100z" />
+<glyph unicode="&#xb5;" horiz-adv-x="1314" d="M176 -397v1487h230v-598q0 -301 249 -302q119 0 207 79t88 231v590h230v-1090h-230v199q-55 -100 -152.5 -157.5t-204 -57.5t-187.5 34v-415h-230z" />
+<glyph unicode="&#xb6;" horiz-adv-x="1374" d="M72 1139q0 174 120.5 292.5t366.5 118.5h612v-1779h-190v1585h-229v-1585h-185v981q-49 -6 -94 -7q-113 0 -196.5 39t-124.5 101q-80 119 -80 254z" />
+<glyph unicode="&#xb7;" horiz-adv-x="595" d="M145 653.5q0 63.5 44 107.5t107.5 44t109 -44t45.5 -107.5t-45.5 -108.5t-109 -45t-107.5 45t-44 108.5z" />
+<glyph unicode="&#xb8;" horiz-adv-x="575" d="M481 -240q0 -78 -63.5 -136t-160.5 -58t-171 45l53 117q39 -20 79 -20.5t62.5 23t22.5 56.5t-23.5 58.5t-59.5 25.5t-60 -10l73 139h146l-41 -78q143 -19 143 -162z" />
+<glyph unicode="&#xb9;" horiz-adv-x="548" d="M84 1432h303v-838h-133v713h-170v125z" />
+<glyph unicode="&#xba;" horiz-adv-x="774" d="M387 1032q72 0 118 47t46 122t-46 122t-118 47t-118 -47t-46 -122t46 -122t118 -47zM387 934q-117 0 -194.5 76.5t-77.5 189.5t77.5 189.5t194.5 76.5t194.5 -76.5t77.5 -189.5t-77.5 -189.5t-194.5 -76.5z" />
+<glyph unicode="&#xbb;" horiz-adv-x="1120" d="M776 492l-235 360h221l244 -360l-244 -361h-221zM371 492l-236 360h221l244 -360l-244 -361h-221z" />
+<glyph unicode="&#xbc;" horiz-adv-x="1767" d="M1210 1550h148l-764 -1566h-148zM1452 340v154h133v-154h103v-129h-103v-211h-133v211h-358v125l305 502h155l-303 -498h201zM72 1432h303v-838h-133v713h-170v125z" />
+<glyph unicode="&#xbd;" horiz-adv-x="1900" d="M1276 1550h147l-764 -1566h-147zM1613 510q36 49 36 99t-38 85t-98 35q-100 0 -172 -104l-110 65q109 166 285 166q111 0 190.5 -66.5t79.5 -181.5q0 -63 -34 -122.5t-124 -151.5l-196 -199h378v-135h-571v119l254 256q84 86 120 135zM72 1432h303v-838h-133v713h-170 v125z" />
+<glyph unicode="&#xbe;" horiz-adv-x="1845" d="M1294 1550h148l-764 -1566h-148zM1536 340v154h133v-154h103v-129h-103v-211h-133v211h-358v125l305 502h155l-303 -498h201zM129 1305v127h496v-113l-205 -229q117 -2 181.5 -73t64.5 -183.5t-87 -186.5t-226.5 -74t-270.5 89l61 114q100 -72 217 -71q74 0 122 33.5 t48 99t-53 104.5t-123.5 39t-115.5 -14v108l196 230h-305z" />
+<glyph unicode="&#xbf;" horiz-adv-x="1040" d="M422 1004h231v-125q0 -82 -19.5 -122t-84.5 -106l-150 -149q-47 -51 -47 -127t49.5 -126t127 -50t130 48t60.5 128h248q-20 -182 -142.5 -285.5t-304.5 -103.5t-296.5 99t-114.5 277q0 123 67 205q39 49 59.5 69.5t54.5 52.5t57.5 55.5t37.5 41.5q37 43 37 125v93z M645 1414q47 -44 47 -106.5t-46 -107.5t-110.5 -45t-111.5 44t-47 106.5t46 107.5t110.5 45t111.5 -44z" />
+<glyph unicode="&#xc0;" horiz-adv-x="1495" d="M864 1432l631 -1432h-266l-146 326h-686l-139 -326h-258l631 1432h233zM987 549l-246 551l-243 -551h489zM860 1550h-209l-250 197l242 100z" />
+<glyph unicode="&#xc1;" horiz-adv-x="1519" d="M401 326l-143 -326h-258l631 1432h258l631 -1432h-258l-144 326h-717zM1020 549l-260 590l-260 -590h520zM870 1552h-208l217 297l241 -100z" />
+<glyph unicode="&#xc2;" horiz-adv-x="1495" d="M864 1432l631 -1432h-266l-146 326h-686l-139 -326h-258l631 1432h233zM987 549l-246 551l-243 -551h489zM633 1825h213l250 -275h-199l-158 115l-157 -115h-199z" />
+<glyph unicode="&#xc3;" horiz-adv-x="1495" d="M864 1432l631 -1432h-266l-146 326h-686l-139 -326h-258l631 1432h233zM987 549l-246 551l-243 -551h489zM897 1544q-53 0 -148.5 48t-121.5 48q-68 0 -70 -90h-151q0 119 48 193t134 74q55 0 153.5 -48.5t128.5 -48.5q61 0 62 90h153q-6 -266 -188 -266z" />
+<glyph unicode="&#xc4;" horiz-adv-x="1495" d="M864 1432l631 -1432h-266l-146 326h-686l-139 -326h-258l631 1432h233zM987 549l-246 551l-243 -551h489zM468 1579q-36 37 -36 89t36 89t89 37t90 -36t37 -88t-37 -90t-90 -38t-89 37zM848 1579q-37 37 -37 89t37 89t89 37t89 -36t37 -88t-38 -90t-89 -38t-88 37z" />
+<glyph unicode="&#xc5;" horiz-adv-x="1495" d="M903.5 1729.5q67.5 -64.5 67.5 -162t-97 -162.5l621 -1405h-266l-146 326h-686l-139 -326h-258l618 1407q-92 66 -92 162t66.5 160.5t155 64.5t156 -64.5zM987 549l-246 551l-243 -551h489zM829.5 1498q30.5 32 30.5 82t-30.5 82t-81 32t-82 -32t-31.5 -82t31.5 -82 t82 -32t81 32z" />
+<glyph unicode="&#xc6;" horiz-adv-x="2129" d="M1995 1432v-226h-764v-393h686v-211h-686v-377h788v-225h-1052v326h-518l-175 -326h-297l750 1432h1268zM967 557v649h-60l-342 -649h402z" />
+<glyph unicode="&#xc7;" horiz-adv-x="1507" d="M852 219q125 0 215 42t188 134l156 -159q-213 -238 -520 -250l-33 -64q143 -18 143 -162q0 -78 -63.5 -136t-160.5 -58t-171 45l53 117q39 -20 79 -20.5t62.5 23t22.5 56.5t-23.5 58.5t-59 25.5t-60.5 -10l68 129q-281 35 -461.5 237.5t-180.5 507.5t218.5 518t551 213 t556.5 -245l-154 -168q-102 98 -193.5 137t-214.5 39q-217 0 -364.5 -140.5t-147.5 -358.5t146.5 -364.5t347.5 -146.5z" />
+<glyph unicode="&#xc8;" horiz-adv-x="1339" d="M862 1550h-209l-250 197l242 100zM1204 1432v-228h-764v-379h686v-215h-686v-383h789v-227h-1030v1432h1005z" />
+<glyph unicode="&#xc9;" horiz-adv-x="1339" d="M1204 1432v-228h-764v-379h686v-215h-686v-383h789v-227h-1030v1432h1005zM811 1550h-209l217 297l242 -100z" />
+<glyph unicode="&#xca;" horiz-adv-x="1339" d="M596 1825h213l250 -275h-199l-158 115l-157 -115h-199zM1204 1432v-228h-764v-379h686v-215h-686v-383h789v-227h-1030v1432h1005z" />
+<glyph unicode="&#xcb;" horiz-adv-x="1339" d="M425 1579q-36 37 -36 89t37 89t89 37t89 -36t37 -88t-38 -90t-90 -38t-88 37zM805 1579q-37 37 -37 89t37 89t89 37t89 -36t37 -88t-37 -90t-89 -38t-89 37zM1204 1432v-228h-764v-379h686v-215h-686v-383h789v-227h-1030v1432h1005z" />
+<glyph unicode="&#xcc;" horiz-adv-x="638" d="M428 1550h-209l-250 197l242 100zM199 1432h241v-1432h-241v1432z" />
+<glyph unicode="&#xcd;" horiz-adv-x="638" d="M199 1432h241v-1432h-241v1432zM420 1550h-209l217 297l242 -100z" />
+<glyph unicode="&#xce;" horiz-adv-x="638" d="M199 1432h241v-1432h-241v1432zM236 1825h213l249 -275h-198l-158 115l-158 -115h-198z" />
+<glyph unicode="&#xcf;" horiz-adv-x="638" d="M42 1579q-36 37 -36 89t36 89t89 37t90 -36t37 -88t-37 -90t-90 -38t-89 37zM422 1579q-37 37 -37 89t37 89t89 37t89 -36t37 -88t-38 -90t-89 -38t-88 37zM199 1432h241v-1432h-241v1432z" />
+<glyph unicode="&#xd0;" horiz-adv-x="1617" d="M53 602v215h162v615h492q385 0 591.5 -187.5t206.5 -521.5t-200.5 -528.5t-614.5 -194.5h-475v602h-162zM1262 717q0 492 -564 491h-241v-391h512v-215h-512v-375h268q260 0 398.5 124t138.5 366z" />
+<glyph unicode="&#xd1;" horiz-adv-x="1712" d="M1272 1432h241v-1432h-262l-811 1044v-1044h-241v1432h241l832 -1070v1070zM1001 1544q-53 0 -148 48t-122 48q-68 0 -69 -90h-152q0 119 48 193t134 74q55 0 153.5 -48.5t129.5 -48.5q61 0 61 90h154q-7 -266 -189 -266z" />
+<glyph unicode="&#xd2;" horiz-adv-x="1720" d="M1016 1550h-209l-250 197l242 100zM860 1245q-213 0 -359.5 -151.5t-146.5 -367.5t146.5 -367.5t359.5 -151.5t359.5 151.5t146.5 367.5t-146.5 367.5t-359.5 151.5zM860.5 -14q-319.5 0 -537 212t-217.5 528t217.5 528t537 212t536.5 -212t217 -528t-217 -528 t-536.5 -212z" />
+<glyph unicode="&#xd3;" horiz-adv-x="1720" d="M860 1245q-213 0 -359.5 -151.5t-146.5 -367.5t146.5 -367.5t359.5 -151.5t359.5 151.5t146.5 367.5t-146.5 367.5t-359.5 151.5zM860.5 -14q-319.5 0 -537 212t-217.5 528t217.5 528t537 212t536.5 -212t217 -528t-217 -528t-536.5 -212zM897 1550h-209l217 297 l242 -100z" />
+<glyph unicode="&#xd4;" horiz-adv-x="1720" d="M860 1245q-213 0 -359.5 -151.5t-146.5 -367.5t146.5 -367.5t359.5 -151.5t359.5 151.5t146.5 367.5t-146.5 367.5t-359.5 151.5zM860.5 -14q-319.5 0 -537 212t-217.5 528t217.5 528t537 212t536.5 -212t217 -528t-217 -528t-536.5 -212zM750 1825h213l249 -275h-198 l-158 115l-158 -115h-198z" />
+<glyph unicode="&#xd5;" horiz-adv-x="1720" d="M860 1245q-213 0 -359.5 -151.5t-146.5 -367.5t146.5 -367.5t359.5 -151.5t359.5 151.5t146.5 367.5t-146.5 367.5t-359.5 151.5zM860.5 -14q-319.5 0 -537 212t-217.5 528t217.5 528t537 212t536.5 -212t217 -528t-217 -528t-536.5 -212zM1008 1544q-53 0 -148.5 48 t-122.5 48q-68 0 -69 -90h-152q0 119 48 193t134 74q55 0 153.5 -48.5t129.5 -48.5q61 0 61 90h154q-6 -266 -188 -266z" />
+<glyph unicode="&#xd6;" horiz-adv-x="1720" d="M570.5 1579q-35.5 37 -35.5 89t35.5 89t89 37t90 -36t36.5 -88t-36.5 -90t-90 -38t-89 37zM950 1579q-37 37 -37 89t37 89t89.5 37t89 -36t36.5 -88t-37.5 -90t-89 -38t-88.5 37zM860 1245q-213 0 -359.5 -151.5t-146.5 -367.5t146.5 -367.5t359.5 -151.5t359.5 151.5 t146.5 367.5t-146.5 367.5t-359.5 151.5zM860.5 -14q-319.5 0 -537 212t-217.5 528t217.5 528t537 212t536.5 -212t217 -528t-217 -528t-536.5 -212z" />
+<glyph unicode="&#xd7;" horiz-adv-x="1157" d="M580 907l348 350l129 -131l-346 -346l348 -350l-129 -131l-350 350l-351 -350l-131 131l351 350l-349 346l131 131z" />
+<glyph unicode="&#xd8;" horiz-adv-x="1720" d="M1614 727q0 -317 -217 -529t-537 -212q-109 0 -207 24l-116 -250h-205l149 320q-174 94 -274.5 265t-100.5 382q0 315 217.5 527t536.5 212q125 0 248 -39l111 234h204l-145 -313q156 -98 246 -261t90 -360zM860 1245q-213 0 -359.5 -151.5t-146.5 -368.5 q0 -133 60.5 -248t165.5 -186l434 930q-74 24 -154 24zM1366 725q0 250 -188 408l-428 -916q57 -10 110 -10q213 0 359.5 151.5t146.5 366.5z" />
+<glyph unicode="&#xd9;" horiz-adv-x="1572" d="M969 1550h-209l-250 197l242 100zM786 213q168 0 266.5 114.5t98.5 311.5v793h242v-803q0 -309 -170 -476t-436.5 -167t-436.5 166.5t-170 476.5v803h242v-793q0 -197 98 -311.5t266 -114.5z" />
+<glyph unicode="&#xda;" horiz-adv-x="1572" d="M786 213q168 0 266.5 114.5t98.5 311.5v793h242v-803q0 -309 -170 -476t-436.5 -167t-436.5 166.5t-170 476.5v803h242v-793q0 -197 98 -311.5t266 -114.5zM852 1552h-209l217 297l242 -100z" />
+<glyph unicode="&#xdb;" horiz-adv-x="1572" d="M786 213q168 0 266.5 114.5t98.5 311.5v793h242v-803q0 -309 -170 -476t-436.5 -167t-436.5 166.5t-170 476.5v803h242v-793q0 -197 98 -311.5t266 -114.5zM688 1825h213l250 -275h-199l-157 115l-158 -115h-199z" />
+<glyph unicode="&#xdc;" horiz-adv-x="1572" d="M511 1579q-36 37 -36 89t37 89t89 37t89 -36t37 -88t-38 -90t-90 -38t-88 37zM891 1579q-37 37 -37 89t37 89t89 37t89 -36t37 -88t-37 -90t-89 -38t-89 37zM786 213q168 0 266.5 114.5t98.5 311.5v793h242v-803q0 -309 -170 -476t-436.5 -167t-436.5 166.5t-170 476.5 v803h242v-793q0 -197 98 -311.5t266 -114.5z" />
+<glyph unicode="&#xdd;" horiz-adv-x="1277" d="M762 0h-246v565l-532 867h264l391 -652l391 652h264l-532 -867v-565zM797 1520h-209l217 297l242 -101z" />
+<glyph unicode="&#xde;" horiz-adv-x="1404" d="M1315 756q0 -272 -162 -394t-479 -122h-234v-240h-241v1432h241v-181h230q645 1 645 -495zM985 537.5q82 78.5 82 224t-100.5 208t-300.5 62.5h-226v-573h260q203 0 285 78.5z" />
+<glyph unicode="&#xdf;" horiz-adv-x="1333" d="M843.5 943q71.5 71 71.5 164t-54 160.5t-171 67.5q-156 0 -219 -96t-63 -285v-954h-242v934q0 147 13.5 207.5t30.5 114t41.5 91t63.5 78.5t86 66q111 59 258.5 59t248 -41t149.5 -108q92 -123 92 -266q0 -211 -213 -344q152 -16 227.5 -123t75.5 -246 q0 -193 -135 -307.5t-387 -114.5h-84v201h45q154 0 236.5 50t82.5 172t-81.5 180.5t-219.5 58.5q-47 0 -71 -3v191q147 22 218.5 93z" />
+<glyph unicode="&#xe0;" horiz-adv-x="1202" d="M1049 0h-209v145q-135 -162 -363 -161q-170 0 -281.5 96t-111.5 257t119 240.5t321 79.5h297v41q0 217 -241 217q-152 0 -316 -110l-102 143q199 158 450 158q193 0 315 -97.5t122 -306.5v-702zM819 406v92h-258q-248 0 -248 -156q0 -80 61.5 -122t171 -42t191.5 62 t82 166zM786 1229h-208l-250 196l241 101z" />
+<glyph unicode="&#xe1;" horiz-adv-x="1202" d="M1049 0h-209v145q-135 -162 -363 -161q-170 0 -281.5 96t-111.5 257t119 240.5t321 79.5h297v41q0 217 -241 217q-152 0 -316 -110l-102 143q199 158 450 158q193 0 315 -97.5t122 -306.5v-702zM819 406v92h-258q-248 0 -248 -156q0 -80 61.5 -122t171 -42t191.5 62 t82 166zM719 1229h-209l217 297l242 -101z" />
+<glyph unicode="&#xe2;" horiz-adv-x="1202" d="M1049 0h-209v145q-135 -162 -363 -161q-170 0 -281.5 96t-111.5 257t119 240.5t321 79.5h297v41q0 217 -241 217q-152 0 -316 -110l-102 143q199 158 450 158q193 0 315 -97.5t122 -306.5v-702zM819 406v92h-258q-248 0 -248 -156q0 -80 61.5 -122t171 -42t191.5 62 t82 166zM489 1503h213l250 -274h-198l-158 114l-158 -114h-198z" />
+<glyph unicode="&#xe3;" horiz-adv-x="1202" d="M1049 0h-209v145q-135 -162 -363 -161q-170 0 -281.5 96t-111.5 257t119 240.5t321 79.5h297v41q0 217 -241 217q-152 0 -316 -110l-102 143q199 158 450 158q193 0 315 -97.5t122 -306.5v-702zM819 406v92h-258q-248 0 -248 -156q0 -80 61.5 -122t171 -42t191.5 62 t82 166zM748 1223q-53 0 -148.5 48t-122.5 48q-68 0 -69 -90h-152q0 119 48 192.5t134 73.5q55 0 153.5 -48t129.5 -48q61 0 61 90h154q-6 -266 -188 -266z" />
+<glyph unicode="&#xe4;" horiz-adv-x="1202" d="M1049 0h-209v145q-135 -162 -363 -161q-170 0 -281.5 96t-111.5 257t119 240.5t321 79.5h297v41q0 217 -241 217q-152 0 -316 -110l-102 143q199 158 450 158q193 0 315 -97.5t122 -306.5v-702zM819 406v92h-258q-248 0 -248 -156q0 -80 61.5 -122t171 -42t191.5 62 t82 166zM285 1356q0 53 35.5 89t89 36t90.5 -36t37 -89t-37 -90t-90.5 -37t-89 37t-35.5 90zM700.5 1266q-36.5 37 -36.5 89t36.5 89t89 37t89 -36t36.5 -89t-37.5 -90t-89 -37t-88 37z" />
+<glyph unicode="&#xe5;" horiz-adv-x="1202" d="M1049 0h-209v145q-135 -162 -363 -161q-170 0 -281.5 96t-111.5 257t119 240.5t321 79.5h297v41q0 217 -241 217q-152 0 -316 -110l-102 143q199 158 450 158q193 0 315 -97.5t122 -306.5v-702zM825 1407q0 -86 -67.5 -149.5t-155.5 -63.5t-154.5 63.5t-66.5 149.5 t66.5 150.5t154.5 64.5t155.5 -64.5t67.5 -150.5zM819 406v92h-258q-248 0 -248 -156q0 -80 61.5 -122t171 -42t191.5 62t82 166zM684 1326q31 32 31 82t-31 82t-81 32t-82 -32t-32 -82t32 -82t82 -32t81 32z" />
+<glyph unicode="&#xe6;" horiz-adv-x="1949" d="M1864 471h-813q2 -131 95 -211t222 -80q184 0 291 129l131 -143q-176 -182 -441.5 -182t-414.5 196q-164 -197 -436 -196q-172 0 -293 97t-121 257t117.5 235.5t322.5 75.5h297v49q0 217 -241 217q-152 0 -316 -110l-102 143q199 158 450.5 158t362.5 -152 q147 152 371.5 152t371 -134t146.5 -370v-131zM819 406v65h-258q-190 0 -229 -57q-18 -29 -19 -72q0 -80 61.5 -122t171 -42t191.5 62t82 166zM1550.5 842.5q-75.5 66.5 -192.5 66.5t-206 -69.5t-99 -190.5l581 -2q-8 129 -83.5 195.5z" />
+<glyph unicode="&#xe7;" horiz-adv-x="1181" d="M838 -240q0 -78 -63.5 -136t-161 -58t-171.5 45l54 117q39 -20 78.5 -20.5t62 23t22.5 56.5t-23.5 58.5t-59 25.5t-60.5 -10l68 127q-207 25 -347.5 175t-140.5 390t171 396.5t417 156.5t416 -170l-135 -166q-141 123 -284.5 123t-249 -95.5t-105.5 -246t103 -254.5 t257 -104t289 139l135 -148q-168 -168 -381 -194l-35 -68q144 -19 144 -162z" />
+<glyph unicode="&#xe8;" horiz-adv-x="1265" d="M844 1229h-209l-250 196l242 101zM1180 444h-854q8 -119 108.5 -191.5t229.5 -72.5q205 0 311 129l131 -143q-176 -182 -459 -182q-229 0 -390 152.5t-161 409.5t164 408.5t386 151.5t378 -134t156 -370v-158zM326 625h624q0 137 -86 210.5t-212 73.5t-226 -76.5 t-100 -207.5z" />
+<glyph unicode="&#xe9;" horiz-adv-x="1265" d="M1180 444h-854q8 -119 108.5 -191.5t229.5 -72.5q205 0 311 129l131 -143q-176 -182 -459 -182q-229 0 -390 152.5t-161 409.5t164 408.5t386 151.5t378 -134t156 -370v-158zM326 625h624q0 137 -86 210.5t-212 73.5t-226 -76.5t-100 -207.5zM770 1233h-209l217 297 l242 -100z" />
+<glyph unicode="&#xea;" horiz-adv-x="1265" d="M1180 444h-854q8 -119 108.5 -191.5t229.5 -72.5q205 0 311 129l131 -143q-176 -182 -459 -182q-229 0 -390 152.5t-161 409.5t164 408.5t386 151.5t378 -134t156 -370v-158zM326 625h624q0 137 -86 210.5t-212 73.5t-226 -76.5t-100 -207.5zM543 1503h213l250 -274h-199 l-158 114l-157 -114h-199z" />
+<glyph unicode="&#xeb;" horiz-adv-x="1265" d="M332 1356q0 53 37 89t89 36t89 -36t37 -89t-38 -90t-90.5 -37t-88 37t-35.5 90zM747.5 1266q-36.5 37 -36.5 89t36.5 89t89 37t89.5 -36t37 -89t-37 -90t-89.5 -37t-89 37zM1180 444h-854q8 -119 108.5 -191.5t229.5 -72.5q205 0 311 129l131 -143q-176 -182 -459 -182 q-229 0 -390 152.5t-161 409.5t164 408.5t386 151.5t378 -134t156 -370v-158zM326 625h624q0 137 -86 210.5t-212 73.5t-226 -76.5t-100 -207.5z" />
+<glyph unicode="&#xec;" d="M410 1229h-209l-250 196l242 101zM166 1090h229v-1090h-229v1090z" />
+<glyph unicode="&#xed;" d="M389 1229h-192l217 287l225 -101zM166 1090h229v-1090h-229v1090z" />
+<glyph unicode="&#xee;" d="M166 1090h229v-1090h-229v1090zM184 1503h213l250 -274h-198l-158 114l-158 -114h-199z" />
+<glyph unicode="&#xef;" d="M-16 1356q0 53 36.5 89t89 36t89.5 -36t37 -89t-38 -90t-90.5 -37t-88 37t-35.5 90zM399 1266q-37 37 -37 89t37 89t89.5 37t89 -36t36.5 -89t-36.5 -90t-89 -37t-89.5 37zM166 1090h229v-1090h-229v1090z" />
+<glyph unicode="&#xf0;" horiz-adv-x="1220" d="M817 895q-78 129 -252 303l-190 -121l-117 111l193 123q-4 6 -150 127l195 112q74 -57 149 -129l174 111l121 -111l-180 -116q360 -391 360 -758q0 -252 -133 -407.5t-362.5 -155.5t-376 137t-146.5 353t143.5 354.5t346.5 138.5q145 0 221 -76zM404.5 269 q78.5 -85 206.5 -85t207 85t79 205t-79 206t-207 86t-206.5 -86t-78.5 -206t78.5 -205z" />
+<glyph unicode="&#xf1;" horiz-adv-x="1323" d="M395 590v-590h-229v1090h229v-199q55 100 152.5 157.5t210.5 57.5q184 0 297.5 -112.5t113.5 -325.5v-668h-229v598q0 301 -250 301q-119 0 -207 -78.5t-88 -230.5zM829 1223q-53 0 -148 48t-122 48q-68 0 -70 -90h-151q0 119 48 192.5t134 73.5q55 0 153.5 -48 t129.5 -48q61 0 61 90h154q-7 -266 -189 -266z" />
+<glyph unicode="&#xf2;" horiz-adv-x="1335" d="M809 1229h-209l-250 196l242 101zM667.5 188q149.5 0 247 99.5t97.5 257t-97.5 257t-247 99.5t-246.5 -99.5t-97 -257t97 -257t246.5 -99.5zM667.5 -16q-245.5 0 -409.5 162.5t-164 398t164 398.5t409.5 163t409.5 -163t164 -398.5t-164 -398t-409.5 -162.5z" />
+<glyph unicode="&#xf3;" horiz-adv-x="1335" d="M667.5 188q149.5 0 247 99.5t97.5 257t-97.5 257t-247 99.5t-246.5 -99.5t-97 -257t97 -257t246.5 -99.5zM667.5 -16q-245.5 0 -409.5 162.5t-164 398t164 398.5t409.5 163t409.5 -163t164 -398.5t-164 -398t-409.5 -162.5zM772 1229h-209l217 297l242 -101z" />
+<glyph unicode="&#xf4;" horiz-adv-x="1335" d="M667.5 188q149.5 0 247 99.5t97.5 257t-97.5 257t-247 99.5t-246.5 -99.5t-97 -257t97 -257t246.5 -99.5zM667.5 -16q-245.5 0 -409.5 162.5t-164 398t164 398.5t409.5 163t409.5 -163t164 -398.5t-164 -398t-409.5 -162.5zM563 1503h213l250 -274h-199l-157 114 l-158 -114h-199z" />
+<glyph unicode="&#xf5;" horiz-adv-x="1335" d="M667.5 188q149.5 0 247 99.5t97.5 257t-97.5 257t-247 99.5t-246.5 -99.5t-97 -257t97 -257t246.5 -99.5zM667.5 -16q-245.5 0 -409.5 162.5t-164 398t164 398.5t409.5 163t409.5 -163t164 -398.5t-164 -398t-409.5 -162.5zM819 1223q-53 0 -148.5 48t-121.5 48 q-68 0 -70 -90h-151q0 119 48 192.5t134 73.5q55 0 153.5 -48t129.5 -48q61 0 61 90h154q-7 -266 -189 -266z" />
+<glyph unicode="&#xf6;" horiz-adv-x="1335" d="M344 1356q0 53 37 89t89 36t89 -36t37 -89t-38 -90t-90 -37t-88 37t-36 90zM760 1266q-37 37 -37 89t37 89t89 37t89 -36t37 -89t-37 -90t-89 -37t-89 37zM667.5 188q149.5 0 247 99.5t97.5 257t-97.5 257t-247 99.5t-246.5 -99.5t-97 -257t97 -257t246.5 -99.5z M667.5 -16q-245.5 0 -409.5 162.5t-164 398t164 398.5t409.5 163t409.5 -163t164 -398.5t-164 -398t-409.5 -162.5z" />
+<glyph unicode="&#xf7;" horiz-adv-x="1163" d="M430 432.5q0 63.5 44 107.5t107.5 44t108.5 -44t45 -107.5t-45 -108.5t-108.5 -45t-107.5 45t-44 108.5zM430 1159.5q0 63.5 44 107.5t107.5 44t108.5 -44t45 -107.5t-45 -108.5t-108.5 -45t-107.5 45t-44 108.5zM98 889h967v-193h-967v193z" />
+<glyph unicode="&#xf8;" horiz-adv-x="1335" d="M668 -16q-57 0 -133 14l-99 -213h-205l131 281q-125 74 -196.5 200.5t-71.5 278.5q0 236 164 398.5t410 162.5q90 0 170 -25l90 193h205l-127 -270q111 -78 173 -198t62 -261q0 -236 -163.5 -398.5t-409.5 -162.5zM421 801.5q-97 -99.5 -97 -270.5t129 -273l297 635 q-35 8 -82 8q-150 0 -247 -99.5zM668 188q150 0 247 99.5t97 259.5t-101 256l-286 -613q14 -2 43 -2z" />
+<glyph unicode="&#xf9;" horiz-adv-x="1323" d="M805 1229h-209l-250 196l242 101zM928 500v590h229v-1090h-229v199q-55 -100 -152.5 -157.5t-210.5 -57.5q-184 0 -297.5 112.5t-113.5 325.5v668h229v-598q0 -301 250 -302q119 0 207 79t88 231z" />
+<glyph unicode="&#xfa;" horiz-adv-x="1323" d="M928 500v590h229v-1090h-229v199q-55 -100 -152.5 -157.5t-210.5 -57.5q-184 0 -297.5 112.5t-113.5 325.5v668h229v-598q0 -301 250 -302q119 0 207 79t88 231zM717 1233h-209l217 297l242 -100z" />
+<glyph unicode="&#xfb;" horiz-adv-x="1323" d="M928 500v590h229v-1090h-229v199q-55 -100 -152.5 -157.5t-210.5 -57.5q-184 0 -297.5 112.5t-113.5 325.5v668h229v-598q0 -301 250 -302q119 0 207 79t88 231zM553 1503h213l250 -274h-199l-158 114l-157 -114h-199z" />
+<glyph unicode="&#xfc;" horiz-adv-x="1323" d="M332 1356q0 53 37 89t89 36t89 -36t37 -89t-38 -90t-90.5 -37t-88 37t-35.5 90zM747.5 1266q-36.5 37 -36.5 89t36.5 89t89 37t89.5 -36t37 -89t-37 -90t-89.5 -37t-89 37zM928 500v590h229v-1090h-229v199q-55 -100 -152.5 -157.5t-210.5 -57.5q-184 0 -297.5 112.5 t-113.5 325.5v668h229v-598q0 -301 250 -302q119 0 207 79t88 231z" />
+<glyph unicode="&#xfd;" horiz-adv-x="1175" d="M303 -434q-150 0 -270 108l104 187q72 -68 148.5 -68t125 55.5t48.5 120.5q0 29 -441 1121h246l326 -803l325 803h246l-528 -1295q-47 -106 -135.5 -167.5t-194.5 -61.5zM680 1286h-209l217 297l242 -100z" />
+<glyph unicode="&#xfe;" horiz-adv-x="1376" d="M1132.5 946q147.5 -160 147.5 -404.5t-146.5 -401t-390.5 -156.5q-168 0 -292 106q-29 25 -41 41l-15 19v-547h-229v1917h229v-580q6 6 15.5 17.5t44 40t73.5 51.5q102 57 220 57q237 0 384.5 -160zM939 293.5q95 107.5 95 252t-94 252t-233.5 107.5t-227.5 -106.5 t-88 -254t88 -253t226.5 -105.5t233.5 107.5z" />
+<glyph unicode="&#xff;" horiz-adv-x="1175" d="M283 1356q0 53 36.5 89t89 36t89.5 -36t37 -89t-38 -90t-90.5 -37t-88 37t-35.5 90zM698.5 1266q-36.5 37 -36.5 89t36.5 89t89 37t89 -36t36.5 -89t-36.5 -90t-89 -37t-89 37zM303 -434q-150 0 -270 108l104 187q72 -68 148.5 -68t125 55.5t48.5 120.5q0 29 -441 1121 h246l326 -803l325 803h246l-528 -1295q-47 -106 -135.5 -167.5t-194.5 -61.5z" />
+<glyph unicode="&#x152;" horiz-adv-x="2183" d="M2048 1432v-228h-764v-379h686v-215h-686v-383h789v-227h-1235q-309 0 -519 205t-210 511t209.5 511t519.5 205h1210zM371 717q0 -209 142 -357.5t347 -148.5h182v1010h-182q-207 0 -348 -147.5t-141 -356.5z" />
+<glyph unicode="&#x153;" horiz-adv-x="2183" d="M2097 444h-854q8 -119 108.5 -191.5t229.5 -72.5q205 0 311 129l131 -143q-176 -182 -458 -182q-133 0 -250 55t-193 158q-166 -213 -454 -213q-246 0 -410 162.5t-164 398t164 398.5t410 163q287 0 454 -215q76 104 194 159.5t245 55.5q225 0 380.5 -134t155.5 -370 v-158zM667.5 188q149.5 0 247 99.5t97.5 257t-97.5 257t-247 99.5t-246.5 -99.5t-97 -257t97 -257t246.5 -99.5zM1243 625h625q0 137 -86 210.5t-212 73.5t-226.5 -76.5t-100.5 -207.5z" />
+<glyph unicode="&#x2c6;" horiz-adv-x="1380" d="M590 1503h213l250 -274h-199l-158 114l-157 -114h-199z" />
+<glyph unicode="&#x2dc;" horiz-adv-x="1062" d="M686 1513q-53 0 -148.5 48.5t-121.5 48.5q-68 0 -70 -90h-151q0 119 48 192.5t134 73.5q55 0 153.5 -48t128.5 -48q61 0 62 90h153q-6 -267 -188 -267z" />
+<glyph unicode="&#x2000;" horiz-adv-x="924" />
+<glyph unicode="&#x2001;" horiz-adv-x="1849" />
+<glyph unicode="&#x2002;" horiz-adv-x="924" />
+<glyph unicode="&#x2003;" horiz-adv-x="1849" />
+<glyph unicode="&#x2004;" horiz-adv-x="616" />
+<glyph unicode="&#x2005;" horiz-adv-x="462" />
+<glyph unicode="&#x2006;" horiz-adv-x="308" />
+<glyph unicode="&#x2007;" horiz-adv-x="308" />
+<glyph unicode="&#x2008;" horiz-adv-x="231" />
+<glyph unicode="&#x2009;" horiz-adv-x="369" />
+<glyph unicode="&#x200a;" horiz-adv-x="102" />
+<glyph unicode="&#x2010;" horiz-adv-x="974" d="M147 504v215h680v-215h-680z" />
+<glyph unicode="&#x2011;" horiz-adv-x="974" d="M147 504v215h680v-215h-680z" />
+<glyph unicode="&#x2012;" horiz-adv-x="974" d="M147 504v215h680v-215h-680z" />
+<glyph unicode="&#x2013;" horiz-adv-x="1101" d="M168 463v137h766v-137h-766z" />
+<glyph unicode="&#x2014;" horiz-adv-x="1484" d="M168 465v135h1149v-135h-1149z" />
+<glyph unicode="&#x2018;" horiz-adv-x="442" d="M274 1268q57 -37 57.5 -99.5t-36.5 -98.5t-92.5 -36t-93 35t-37.5 91.5t37 109.5l120 174h125z" />
+<glyph unicode="&#x2019;" horiz-adv-x="444" d="M150 1200q-55 33 -55.5 97.5t36.5 100.5t92.5 36t93 -35t37.5 -91.5t-37 -109.5l-120 -174h-125z" />
+<glyph unicode="&#x201a;" horiz-adv-x="444" d="M150 10q-55 35 -55.5 98.5t36.5 99.5t92.5 36t93 -35t37.5 -91.5t-37 -109.5l-120 -174h-125z" />
+<glyph unicode="&#x201c;" horiz-adv-x="757" d="M274 1268q57 -37 57.5 -99.5t-36.5 -98.5t-92.5 -36t-93 35t-37.5 91.5t37 109.5l120 174h125zM588 1268q57 -37 57 -99.5t-37 -98.5t-92 -36t-93 35t-38 91.5t37 109.5l121 174h125z" />
+<glyph unicode="&#x201d;" horiz-adv-x="755" d="M150 1200q-55 33 -55.5 97.5t36.5 100.5t92.5 36t93 -35t37.5 -91.5t-37 -109.5l-120 -174h-125zM461 1200q-55 33 -55 97.5t36.5 100.5t92 36t93.5 -35t38 -91.5t-37 -109.5l-121 -174h-125z" />
+<glyph unicode="&#x201e;" horiz-adv-x="755" d="M150 10q-55 35 -55.5 98.5t36.5 99.5t92.5 36t93 -35t37.5 -91.5t-37 -109.5l-120 -174h-125zM461 10q-55 35 -55 98.5t36.5 99.5t92 36t93.5 -35t38 -91.5t-37 -109.5l-121 -174h-125z" />
+<glyph unicode="&#x2022;" horiz-adv-x="876" d="M174 647.5q0 108.5 78 186t186.5 77.5t186 -77.5t77.5 -186t-77.5 -186.5t-186 -78t-186.5 78t-78 186.5z" />
+<glyph unicode="&#x2026;" horiz-adv-x="1429" d="M135 137.5q0 63.5 44 107.5t107.5 44t108.5 -44t45 -107.5t-45 -108.5t-108.5 -45t-107.5 45t-44 108.5zM563 137.5q0 63.5 44 107.5t107.5 44t108.5 -44t45 -107.5t-45 -108.5t-108.5 -45t-107.5 45t-44 108.5zM991 137.5q0 63.5 44 107.5t107.5 44t108.5 -44t45 -107.5 t-45 -108.5t-108.5 -45t-107.5 45t-44 108.5z" />
+<glyph unicode="&#x202f;" horiz-adv-x="369" />
+<glyph unicode="&#x2039;" horiz-adv-x="714" d="M580 852l-236 -360l236 -361h-222l-243 361l243 360h222z" />
+<glyph unicode="&#x203a;" horiz-adv-x="714" d="M371 492l-236 360h221l244 -360l-244 -361h-221z" />
+<glyph unicode="&#x205f;" horiz-adv-x="462" />
+<glyph unicode="&#x20ac;" horiz-adv-x="1558" d="M106 805v176h213q68 219 240 352t391 133q326 0 516 -235l-145 -184q-90 96 -171 135t-200 39t-214 -62.5t-142 -177.5h487v-176h-530q-2 -25 -2 -75t6 -95h526v-176h-471q111 -213 334 -213q111 0 189.5 42t166.5 132l146 -176q-190 -236 -502 -236q-213 0 -378 122 t-236 329h-224v176h185q-6 49 -6 98t2 72h-181z" />
+<glyph unicode="&#x2122;" horiz-adv-x="2048" d="M516 1303v-709h-141v709h-254v129h649v-129h-254zM1069 594h-141v838h221l252 -527l254 527h219v-838h-141v653l-293 -581h-80l-291 581v-653z" />
+<glyph unicode="&#xe000;" horiz-adv-x="1085" d="M0 1085h1085v-1085h-1085v1085z" />
+<glyph unicode="&#xfb01;" horiz-adv-x="1351" d="M449 1180v-90h286v-185h-286v-905h-230v905h-137v185h137v84q0 172 103.5 273t250 101t267.5 -108l-95 -162q-68 72 -141.5 72t-114 -46t-40.5 -124zM1186 0h-230v1090h230v-1090zM928 1409q0 59 43 102t102.5 43t102.5 -43t43 -102t-43 -102t-102.5 -43t-102.5 43 t-43 102z" />
+<glyph unicode="&#xfb02;" horiz-adv-x="1351" d="M449 1180v-90h286v-185h-286v-905h-230v905h-137v185h137v84q0 172 103.5 273t250 101t267.5 -108l-95 -162q-68 72 -141.5 72t-114 -46t-40.5 -124zM1186 0h-230v1520h230v-1520z" />
+<hkern u1="&#x26;" u2="&#x2019;" k="59" />
+<hkern u1="&#x26;" u2="&#xc6;" k="-27" />
+<hkern u1="&#x26;" u2="Y" k="51" />
+<hkern u1="&#x26;" u2="W" k="35" />
+<hkern u1="&#x26;" u2="V" k="45" />
+<hkern u1="&#x26;" u2="T" k="45" />
+<hkern u1="&#x26;" u2="A" k="-12" />
+<hkern u1="&#x26;" u2="&#x27;" k="59" />
+<hkern u1="&#x27;" u2="&#x2039;" k="29" />
+<hkern u1="&#x27;" u2="&#xf0;" k="33" />
+<hkern u1="&#x27;" u2="&#xc6;" k="106" />
+<hkern u1="&#x27;" u2="o" k="23" />
+<hkern u1="&#x27;" u2="J" k="35" />
+<hkern u1="&#x27;" u2="A" k="94" />
+<hkern u1="&#x27;" u2="&#x3a;" k="18" />
+<hkern u1="&#x27;" u2="&#x34;" k="45" />
+<hkern u1="&#x27;" u2="&#x2f;" k="150" />
+<hkern u1="&#x27;" u2="&#x2e;" k="258" />
+<hkern u1="&#x27;" u2="&#x26;" k="39" />
+<hkern u1="&#x28;" u2="&#xf0;" k="41" />
+<hkern u1="&#x28;" u2="&#x7b;" k="20" />
+<hkern u1="&#x28;" u2="w" k="31" />
+<hkern u1="&#x28;" u2="v" k="27" />
+<hkern u1="&#x28;" u2="u" k="43" />
+<hkern u1="&#x28;" u2="t" k="27" />
+<hkern u1="&#x28;" u2="s" k="35" />
+<hkern u1="&#x28;" u2="o" k="55" />
+<hkern u1="&#x28;" u2="n" k="31" />
+<hkern u1="&#x28;" u2="j" k="-188" />
+<hkern u1="&#x28;" u2="f" k="25" />
+<hkern u1="&#x28;" u2="a" k="39" />
+<hkern u1="&#x28;" u2="S" k="23" />
+<hkern u1="&#x28;" u2="O" k="45" />
+<hkern u1="&#x28;" u2="&#x39;" k="20" />
+<hkern u1="&#x28;" u2="&#x38;" k="33" />
+<hkern u1="&#x28;" u2="&#x36;" k="41" />
+<hkern u1="&#x28;" u2="&#x34;" k="45" />
+<hkern u1="&#x28;" u2="&#x30;" k="39" />
+<hkern u1="&#x28;" u2="&#x28;" k="20" />
+<hkern u1="&#x29;" u2="&#x29;" k="20" />
+<hkern u1="&#x2a;" u2="&#xf0;" k="35" />
+<hkern u1="&#x2a;" u2="&#xef;" k="-31" />
+<hkern u1="&#x2a;" u2="&#xee;" k="-66" />
+<hkern u1="&#x2a;" u2="&#xec;" k="-16" />
+<hkern u1="&#x2a;" u2="&#xc6;" k="102" />
+<hkern u1="&#x2a;" u2="y" k="-14" />
+<hkern u1="&#x2a;" u2="v" k="-18" />
+<hkern u1="&#x2a;" u2="o" k="23" />
+<hkern u1="&#x2a;" u2="J" k="41" />
+<hkern u1="&#x2a;" u2="A" k="90" />
+<hkern u1="&#x2b;" u2="&#x33;" k="20" />
+<hkern u1="&#x2d;" u2="&#xc6;" k="18" />
+<hkern u1="&#x2d;" u2="z" k="35" />
+<hkern u1="&#x2d;" u2="x" k="47" />
+<hkern u1="&#x2d;" u2="t" k="18" />
+<hkern u1="&#x2d;" u2="f" k="18" />
+<hkern u1="&#x2d;" u2="Z" k="39" />
+<hkern u1="&#x2d;" u2="Y" k="92" />
+<hkern u1="&#x2d;" u2="X" k="57" />
+<hkern u1="&#x2d;" u2="W" k="39" />
+<hkern u1="&#x2d;" u2="V" k="53" />
+<hkern u1="&#x2d;" u2="T" k="117" />
+<hkern u1="&#x2d;" u2="S" k="16" />
+<hkern u1="&#x2d;" u2="J" k="59" />
+<hkern u1="&#x2d;" u2="A" k="25" />
+<hkern u1="&#x2d;" u2="&#x37;" k="39" />
+<hkern u1="&#x2d;" u2="&#x33;" k="39" />
+<hkern u1="&#x2d;" u2="&#x32;" k="39" />
+<hkern u1="&#x2d;" u2="&#x31;" k="55" />
+<hkern u1="&#x2e;" u2="&#x2019;" k="289" />
+<hkern u1="&#x2e;" u2="&#x2018;" k="289" />
+<hkern u1="&#x2e;" u2="y" k="74" />
+<hkern u1="&#x2e;" u2="w" k="57" />
+<hkern u1="&#x2e;" u2="v" k="74" />
+<hkern u1="&#x2e;" u2="t" k="33" />
+<hkern u1="&#x2e;" u2="f" k="16" />
+<hkern u1="&#x2e;" u2="Y" k="127" />
+<hkern u1="&#x2e;" u2="W" k="96" />
+<hkern u1="&#x2e;" u2="V" k="119" />
+<hkern u1="&#x2e;" u2="U" k="31" />
+<hkern u1="&#x2e;" u2="T" k="119" />
+<hkern u1="&#x2e;" u2="O" k="39" />
+<hkern u1="&#x2e;" u2="&#x37;" k="35" />
+<hkern u1="&#x2e;" u2="&#x36;" k="20" />
+<hkern u1="&#x2e;" u2="&#x31;" k="63" />
+<hkern u1="&#x2e;" u2="&#x30;" k="23" />
+<hkern u1="&#x2e;" u2="&#x27;" k="258" />
+<hkern u1="&#x2f;" u2="&#xf0;" k="49" />
+<hkern u1="&#x2f;" u2="&#xcf;" k="-16" />
+<hkern u1="&#x2f;" u2="&#xc6;" k="135" />
+<hkern u1="&#x2f;" u2="z" k="53" />
+<hkern u1="&#x2f;" u2="x" k="35" />
+<hkern u1="&#x2f;" u2="w" k="23" />
+<hkern u1="&#x2f;" u2="v" k="20" />
+<hkern u1="&#x2f;" u2="u" k="53" />
+<hkern u1="&#x2f;" u2="s" k="88" />
+<hkern u1="&#x2f;" u2="o" k="94" />
+<hkern u1="&#x2f;" u2="n" k="57" />
+<hkern u1="&#x2f;" u2="f" k="27" />
+<hkern u1="&#x2f;" u2="a" k="84" />
+<hkern u1="&#x2f;" u2="S" k="33" />
+<hkern u1="&#x2f;" u2="O" k="51" />
+<hkern u1="&#x2f;" u2="J" k="31" />
+<hkern u1="&#x2f;" u2="A" k="125" />
+<hkern u1="&#x2f;" u2="&#x39;" k="20" />
+<hkern u1="&#x2f;" u2="&#x38;" k="39" />
+<hkern u1="&#x2f;" u2="&#x36;" k="45" />
+<hkern u1="&#x2f;" u2="&#x34;" k="86" />
+<hkern u1="&#x2f;" u2="&#x30;" k="43" />
+<hkern u1="&#x2f;" u2="&#x2f;" k="575" />
+<hkern u1="&#x30;" u2="]" k="43" />
+<hkern u1="&#x30;" u2="\" k="27" />
+<hkern u1="&#x30;" u2="A" k="20" />
+<hkern u1="&#x30;" u2="&#x2f;" k="49" />
+<hkern u1="&#x30;" u2="&#x2e;" k="23" />
+<hkern u1="&#x30;" u2="&#x29;" k="39" />
+<hkern u1="&#x32;" u2="&#xb7;" k="35" />
+<hkern u1="&#x32;" u2="&#x2d;" k="23" />
+<hkern u1="&#x33;" u2="&#x2f;" k="33" />
+<hkern u1="&#x34;" u2="&#xb0;" k="49" />
+<hkern u1="&#x34;" u2="]" k="31" />
+<hkern u1="&#x34;" u2="\" k="37" />
+<hkern u1="&#x34;" u2="Y" k="31" />
+<hkern u1="&#x34;" u2="V" k="27" />
+<hkern u1="&#x34;" u2="T" k="41" />
+<hkern u1="&#x34;" u2="&#x37;" k="27" />
+<hkern u1="&#x34;" u2="&#x31;" k="25" />
+<hkern u1="&#x34;" u2="&#x29;" k="31" />
+<hkern u1="&#x34;" u2="&#x27;" k="43" />
+<hkern u1="&#x35;" u2="&#x2f;" k="29" />
+<hkern u1="&#x36;" u2="&#x2f;" k="27" />
+<hkern u1="&#x37;" u2="&#xc6;" k="90" />
+<hkern u1="&#x37;" u2="&#xb7;" k="53" />
+<hkern u1="&#x37;" u2="&#xa2;" k="41" />
+<hkern u1="&#x37;" u2="Y" k="-33" />
+<hkern u1="&#x37;" u2="V" k="-12" />
+<hkern u1="&#x37;" u2="A" k="82" />
+<hkern u1="&#x37;" u2="&#x34;" k="41" />
+<hkern u1="&#x37;" u2="&#x2f;" k="123" />
+<hkern u1="&#x37;" u2="&#x2e;" k="135" />
+<hkern u1="&#x37;" u2="&#x2d;" k="53" />
+<hkern u1="&#x38;" u2="]" k="33" />
+<hkern u1="&#x38;" u2="\" k="20" />
+<hkern u1="&#x38;" u2="&#x2f;" k="31" />
+<hkern u1="&#x38;" u2="&#x29;" k="33" />
+<hkern u1="&#x39;" u2="]" k="41" />
+<hkern u1="&#x39;" u2="\" k="25" />
+<hkern u1="&#x39;" u2="A" k="20" />
+<hkern u1="&#x39;" u2="&#x2f;" k="49" />
+<hkern u1="&#x39;" u2="&#x2e;" k="25" />
+<hkern u1="&#x39;" u2="&#x29;" k="39" />
+<hkern u1="&#x3a;" u2="&#x2019;" k="127" />
+<hkern u1="&#x3a;" u2="y" k="18" />
+<hkern u1="&#x3a;" u2="v" k="20" />
+<hkern u1="&#x3a;" u2="t" k="16" />
+<hkern u1="&#x3a;" u2="Y" k="92" />
+<hkern u1="&#x3a;" u2="W" k="43" />
+<hkern u1="&#x3a;" u2="V" k="57" />
+<hkern u1="&#x3a;" u2="T" k="113" />
+<hkern u1="&#x3a;" u2="&#x27;" k="18" />
+<hkern u1="&#x40;" u2="&#x2019;" k="37" />
+<hkern u1="&#x40;" u2="Y" k="53" />
+<hkern u1="&#x40;" u2="W" k="20" />
+<hkern u1="&#x40;" u2="V" k="33" />
+<hkern u1="&#x40;" u2="T" k="51" />
+<hkern u1="A" u2="&#x2122;" k="96" />
+<hkern u1="A" u2="&#x2019;" k="109" />
+<hkern u1="A" u2="&#x2018;" k="109" />
+<hkern u1="A" u2="&#xf0;" k="18" />
+<hkern u1="A" u2="&#xae;" k="25" />
+<hkern u1="A" u2="y" k="59" />
+<hkern u1="A" u2="w" k="51" />
+<hkern u1="A" u2="v" k="59" />
+<hkern u1="A" u2="u" k="16" />
+<hkern u1="A" u2="t" k="49" />
+<hkern u1="A" u2="o" k="23" />
+<hkern u1="A" u2="f" k="18" />
+<hkern u1="A" u2="]" k="27" />
+<hkern u1="A" u2="\" k="113" />
+<hkern u1="A" u2="Y" k="104" />
+<hkern u1="A" u2="W" k="68" />
+<hkern u1="A" u2="V" k="82" />
+<hkern u1="A" u2="U" k="35" />
+<hkern u1="A" u2="T" k="113" />
+<hkern u1="A" u2="O" k="37" />
+<hkern u1="A" u2="&#x3f;" k="43" />
+<hkern u1="A" u2="&#x36;" k="20" />
+<hkern u1="A" u2="&#x31;" k="43" />
+<hkern u1="A" u2="&#x30;" k="20" />
+<hkern u1="A" u2="&#x2d;" k="25" />
+<hkern u1="A" u2="&#x2a;" k="90" />
+<hkern u1="A" u2="&#x27;" k="94" />
+<hkern u1="B" u2="z" k="10" />
+<hkern u1="B" u2="y" k="16" />
+<hkern u1="B" u2="x" k="27" />
+<hkern u1="B" u2="w" k="14" />
+<hkern u1="B" u2="v" k="16" />
+<hkern u1="B" u2="t" k="18" />
+<hkern u1="B" u2="s" k="14" />
+<hkern u1="B" u2="f" k="16" />
+<hkern u1="B" u2="]" k="41" />
+<hkern u1="B" u2="\" k="29" />
+<hkern u1="B" u2="Y" k="39" />
+<hkern u1="B" u2="X" k="20" />
+<hkern u1="B" u2="W" k="14" />
+<hkern u1="B" u2="V" k="25" />
+<hkern u1="B" u2="T" k="35" />
+<hkern u1="B" u2="J" k="14" />
+<hkern u1="B" u2="A" k="16" />
+<hkern u1="B" u2="&#x2f;" k="27" />
+<hkern u1="B" u2="&#x29;" k="35" />
+<hkern u1="C" u2="&#xf0;" k="27" />
+<hkern u1="C" u2="&#xee;" k="-47" />
+<hkern u1="C" u2="u" k="14" />
+<hkern u1="C" u2="s" k="14" />
+<hkern u1="C" u2="o" k="31" />
+<hkern u1="C" u2="n" k="10" />
+<hkern u1="C" u2="S" k="10" />
+<hkern u1="C" u2="O" k="31" />
+<hkern u1="C" u2="&#x2d;" k="20" />
+<hkern u1="E" u2="&#xf0;" k="20" />
+<hkern u1="E" u2="u" k="14" />
+<hkern u1="E" u2="t" k="16" />
+<hkern u1="E" u2="o" k="20" />
+<hkern u1="E" u2="f" k="12" />
+<hkern u1="E" u2="O" k="20" />
+<hkern u1="F" u2="&#xf0;" k="41" />
+<hkern u1="F" u2="&#xee;" k="-43" />
+<hkern u1="F" u2="&#xed;" k="20" />
+<hkern u1="F" u2="&#xec;" k="-29" />
+<hkern u1="F" u2="&#xdf;" k="16" />
+<hkern u1="F" u2="&#xc6;" k="100" />
+<hkern u1="F" u2="z" k="33" />
+<hkern u1="F" u2="x" k="18" />
+<hkern u1="F" u2="u" k="25" />
+<hkern u1="F" u2="t" k="10" />
+<hkern u1="F" u2="s" k="43" />
+<hkern u1="F" u2="o" k="31" />
+<hkern u1="F" u2="n" k="31" />
+<hkern u1="F" u2="f" k="14" />
+<hkern u1="F" u2="a" k="45" />
+<hkern u1="F" u2="J" k="35" />
+<hkern u1="F" u2="A" k="88" />
+<hkern u1="F" u2="&#x2f;" k="94" />
+<hkern u1="F" u2="&#x2e;" k="115" />
+<hkern u1="G" u2="y" k="16" />
+<hkern u1="G" u2="x" k="12" />
+<hkern u1="G" u2="w" k="16" />
+<hkern u1="G" u2="v" k="18" />
+<hkern u1="G" u2="t" k="18" />
+<hkern u1="G" u2="f" k="18" />
+<hkern u1="G" u2="]" k="20" />
+<hkern u1="G" u2="Y" k="23" />
+<hkern u1="G" u2="X" k="10" />
+<hkern u1="G" u2="V" k="16" />
+<hkern u1="G" u2="T" k="16" />
+<hkern u1="G" u2="A" k="14" />
+<hkern u1="G" u2="&#x29;" k="20" />
+<hkern u1="I" u2="&#xf0;" k="18" />
+<hkern u1="I" u2="z" k="10" />
+<hkern u1="I" u2="u" k="10" />
+<hkern u1="I" u2="t" k="16" />
+<hkern u1="I" u2="s" k="12" />
+<hkern u1="I" u2="o" k="18" />
+<hkern u1="I" u2="n" k="10" />
+<hkern u1="I" u2="l" k="10" />
+<hkern u1="I" u2="h" k="10" />
+<hkern u1="I" u2="f" k="14" />
+<hkern u1="I" u2="a" k="12" />
+<hkern u1="J" u2="&#xf0;" k="23" />
+<hkern u1="J" u2="&#xc6;" k="18" />
+<hkern u1="J" u2="z" k="16" />
+<hkern u1="J" u2="x" k="12" />
+<hkern u1="J" u2="u" k="12" />
+<hkern u1="J" u2="t" k="14" />
+<hkern u1="J" u2="s" k="20" />
+<hkern u1="J" u2="o" k="16" />
+<hkern u1="J" u2="n" k="10" />
+<hkern u1="J" u2="l" k="10" />
+<hkern u1="J" u2="h" k="10" />
+<hkern u1="J" u2="f" k="14" />
+<hkern u1="J" u2="a" k="14" />
+<hkern u1="J" u2="J" k="16" />
+<hkern u1="J" u2="A" k="18" />
+<hkern u1="J" u2="&#x2f;" k="43" />
+<hkern u1="J" u2="&#x2e;" k="18" />
+<hkern u1="K" u2="&#x2039;" k="27" />
+<hkern u1="K" u2="&#xf0;" k="68" />
+<hkern u1="K" u2="&#xef;" k="-39" />
+<hkern u1="K" u2="&#xec;" k="-70" />
+<hkern u1="K" u2="&#xae;" k="20" />
+<hkern u1="K" u2="y" k="53" />
+<hkern u1="K" u2="w" k="59" />
+<hkern u1="K" u2="v" k="53" />
+<hkern u1="K" u2="u" k="45" />
+<hkern u1="K" u2="t" k="27" />
+<hkern u1="K" u2="o" k="84" />
+<hkern u1="K" u2="n" k="10" />
+<hkern u1="K" u2="f" k="18" />
+<hkern u1="K" u2="a" k="18" />
+<hkern u1="K" u2="S" k="25" />
+<hkern u1="K" u2="O" k="63" />
+<hkern u1="K" u2="&#x2d;" k="55" />
+<hkern u1="L" u2="&#x2122;" k="176" />
+<hkern u1="L" u2="&#x2019;" k="178" />
+<hkern u1="L" u2="&#x2018;" k="178" />
+<hkern u1="L" u2="&#xf0;" k="10" />
+<hkern u1="L" u2="&#xb7;" k="152" />
+<hkern u1="L" u2="&#xae;" k="20" />
+<hkern u1="L" u2="y" k="123" />
+<hkern u1="L" u2="w" k="100" />
+<hkern u1="L" u2="v" k="123" />
+<hkern u1="L" u2="u" k="14" />
+<hkern u1="L" u2="t" k="63" />
+<hkern u1="L" u2="o" k="18" />
+<hkern u1="L" u2="f" k="27" />
+<hkern u1="L" u2="\" k="139" />
+<hkern u1="L" u2="Y" k="135" />
+<hkern u1="L" u2="W" k="115" />
+<hkern u1="L" u2="V" k="123" />
+<hkern u1="L" u2="U" k="35" />
+<hkern u1="L" u2="T" k="147" />
+<hkern u1="L" u2="O" k="41" />
+<hkern u1="L" u2="&#x3f;" k="49" />
+<hkern u1="L" u2="&#x31;" k="45" />
+<hkern u1="L" u2="&#x2d;" k="133" />
+<hkern u1="L" u2="&#x2a;" k="180" />
+<hkern u1="L" u2="&#x27;" k="178" />
+<hkern u1="O" u2="&#x2122;" k="20" />
+<hkern u1="O" u2="&#xf0;" k="10" />
+<hkern u1="O" u2="&#xc6;" k="39" />
+<hkern u1="O" u2="&#x7d;" k="23" />
+<hkern u1="O" u2="z" k="14" />
+<hkern u1="O" u2="x" k="25" />
+<hkern u1="O" u2="s" k="12" />
+<hkern u1="O" u2="n" k="10" />
+<hkern u1="O" u2="l" k="10" />
+<hkern u1="O" u2="i" k="10" />
+<hkern u1="O" u2="h" k="10" />
+<hkern u1="O" u2="a" k="10" />
+<hkern u1="O" u2="]" k="51" />
+<hkern u1="O" u2="\" k="37" />
+<hkern u1="O" u2="Z" k="25" />
+<hkern u1="O" u2="Y" k="47" />
+<hkern u1="O" u2="X" k="51" />
+<hkern u1="O" u2="W" k="14" />
+<hkern u1="O" u2="V" k="25" />
+<hkern u1="O" u2="T" k="39" />
+<hkern u1="O" u2="J" k="43" />
+<hkern u1="O" u2="A" k="37" />
+<hkern u1="O" u2="&#x2f;" k="57" />
+<hkern u1="O" u2="&#x2e;" k="39" />
+<hkern u1="O" u2="&#x29;" k="45" />
+<hkern u1="P" u2="&#x2039;" k="20" />
+<hkern u1="P" u2="&#xf0;" k="27" />
+<hkern u1="P" u2="&#xc6;" k="100" />
+<hkern u1="P" u2="s" k="12" />
+<hkern u1="P" u2="o" k="12" />
+<hkern u1="P" u2="a" k="20" />
+<hkern u1="P" u2="]" k="39" />
+<hkern u1="P" u2="Z" k="14" />
+<hkern u1="P" u2="Y" k="16" />
+<hkern u1="P" u2="X" k="39" />
+<hkern u1="P" u2="J" k="63" />
+<hkern u1="P" u2="A" k="78" />
+<hkern u1="P" u2="&#x2f;" k="98" />
+<hkern u1="P" u2="&#x2e;" k="129" />
+<hkern u1="P" u2="&#x29;" k="37" />
+<hkern u1="Q" u2="&#x7d;" k="10" />
+<hkern u1="Q" u2="j" k="-125" />
+<hkern u1="Q" u2="]" k="25" />
+<hkern u1="R" u2="&#x2039;" k="31" />
+<hkern u1="R" u2="&#xf0;" k="41" />
+<hkern u1="R" u2="u" k="18" />
+<hkern u1="R" u2="t" k="12" />
+<hkern u1="R" u2="o" k="31" />
+<hkern u1="R" u2="n" k="10" />
+<hkern u1="R" u2="f" k="10" />
+<hkern u1="R" u2="a" k="20" />
+<hkern u1="R" u2="\" k="25" />
+<hkern u1="R" u2="Y" k="27" />
+<hkern u1="R" u2="V" k="18" />
+<hkern u1="R" u2="T" k="20" />
+<hkern u1="R" u2="J" k="10" />
+<hkern u1="S" u2="z" k="12" />
+<hkern u1="S" u2="y" k="20" />
+<hkern u1="S" u2="x" k="18" />
+<hkern u1="S" u2="w" k="20" />
+<hkern u1="S" u2="v" k="20" />
+<hkern u1="S" u2="u" k="12" />
+<hkern u1="S" u2="t" k="25" />
+<hkern u1="S" u2="s" k="12" />
+<hkern u1="S" u2="n" k="12" />
+<hkern u1="S" u2="f" k="23" />
+<hkern u1="S" u2="Y" k="12" />
+<hkern u1="S" u2="V" k="10" />
+<hkern u1="S" u2="A" k="14" />
+<hkern u1="S" u2="&#x2f;" k="23" />
+<hkern u1="T" u2="&#x203a;" k="111" />
+<hkern u1="T" u2="&#x2039;" k="127" />
+<hkern u1="T" u2="&#xf0;" k="82" />
+<hkern u1="T" u2="&#xef;" k="-16" />
+<hkern u1="T" u2="&#xee;" k="-66" />
+<hkern u1="T" u2="&#xed;" k="41" />
+<hkern u1="T" u2="&#xec;" k="-49" />
+<hkern u1="T" u2="&#xdf;" k="27" />
+<hkern u1="T" u2="&#xc6;" k="111" />
+<hkern u1="T" u2="&#xae;" k="20" />
+<hkern u1="T" u2="z" k="147" />
+<hkern u1="T" u2="y" k="139" />
+<hkern u1="T" u2="x" k="137" />
+<hkern u1="T" u2="w" k="133" />
+<hkern u1="T" u2="v" k="139" />
+<hkern u1="T" u2="u" k="106" />
+<hkern u1="T" u2="t" k="20" />
+<hkern u1="T" u2="s" k="147" />
+<hkern u1="T" u2="o" k="131" />
+<hkern u1="T" u2="n" k="100" />
+<hkern u1="T" u2="l" k="10" />
+<hkern u1="T" u2="i" k="10" />
+<hkern u1="T" u2="h" k="10" />
+<hkern u1="T" u2="f" k="43" />
+<hkern u1="T" u2="a" k="150" />
+<hkern u1="T" u2="O" k="39" />
+<hkern u1="T" u2="J" k="27" />
+<hkern u1="T" u2="A" k="113" />
+<hkern u1="T" u2="&#x40;" k="55" />
+<hkern u1="T" u2="&#x3a;" k="113" />
+<hkern u1="T" u2="&#x34;" k="66" />
+<hkern u1="T" u2="&#x2f;" k="113" />
+<hkern u1="T" u2="&#x2e;" k="119" />
+<hkern u1="T" u2="&#x2d;" k="117" />
+<hkern u1="T" u2="&#x26;" k="29" />
+<hkern u1="U" u2="&#xf0;" k="27" />
+<hkern u1="U" u2="&#xc6;" k="39" />
+<hkern u1="U" u2="z" k="20" />
+<hkern u1="U" u2="x" k="12" />
+<hkern u1="U" u2="u" k="18" />
+<hkern u1="U" u2="t" k="14" />
+<hkern u1="U" u2="s" k="27" />
+<hkern u1="U" u2="o" k="18" />
+<hkern u1="U" u2="n" k="10" />
+<hkern u1="U" u2="l" k="12" />
+<hkern u1="U" u2="i" k="12" />
+<hkern u1="U" u2="h" k="12" />
+<hkern u1="U" u2="f" k="12" />
+<hkern u1="U" u2="a" k="20" />
+<hkern u1="U" u2="J" k="29" />
+<hkern u1="U" u2="A" k="35" />
+<hkern u1="U" u2="&#x2f;" k="53" />
+<hkern u1="U" u2="&#x2e;" k="33" />
+<hkern u1="V" u2="&#x2122;" k="-27" />
+<hkern u1="V" u2="&#x203a;" k="35" />
+<hkern u1="V" u2="&#x2039;" k="72" />
+<hkern u1="V" u2="&#xf0;" k="78" />
+<hkern u1="V" u2="&#xef;" k="-55" />
+<hkern u1="V" u2="&#xee;" k="-55" />
+<hkern u1="V" u2="&#xed;" k="29" />
+<hkern u1="V" u2="&#xec;" k="-104" />
+<hkern u1="V" u2="&#xdf;" k="25" />
+<hkern u1="V" u2="&#xc6;" k="92" />
+<hkern u1="V" u2="z" k="45" />
+<hkern u1="V" u2="x" k="18" />
+<hkern u1="V" u2="u" k="51" />
+<hkern u1="V" u2="t" k="10" />
+<hkern u1="V" u2="s" k="90" />
+<hkern u1="V" u2="o" k="88" />
+<hkern u1="V" u2="n" k="61" />
+<hkern u1="V" u2="f" k="12" />
+<hkern u1="V" u2="a" k="88" />
+<hkern u1="V" u2="S" k="12" />
+<hkern u1="V" u2="O" k="25" />
+<hkern u1="V" u2="J" k="27" />
+<hkern u1="V" u2="A" k="82" />
+<hkern u1="V" u2="&#x40;" k="33" />
+<hkern u1="V" u2="&#x3a;" k="57" />
+<hkern u1="V" u2="&#x34;" k="41" />
+<hkern u1="V" u2="&#x31;" k="-10" />
+<hkern u1="V" u2="&#x2f;" k="117" />
+<hkern u1="V" u2="&#x2e;" k="119" />
+<hkern u1="V" u2="&#x2d;" k="53" />
+<hkern u1="V" u2="&#x26;" k="29" />
+<hkern u1="W" u2="&#x203a;" k="23" />
+<hkern u1="W" u2="&#x2039;" k="57" />
+<hkern u1="W" u2="&#xf0;" k="72" />
+<hkern u1="W" u2="&#xef;" k="-51" />
+<hkern u1="W" u2="&#xee;" k="-49" />
+<hkern u1="W" u2="&#xed;" k="25" />
+<hkern u1="W" u2="&#xec;" k="-88" />
+<hkern u1="W" u2="&#xdf;" k="23" />
+<hkern u1="W" u2="&#xc6;" k="80" />
+<hkern u1="W" u2="z" k="35" />
+<hkern u1="W" u2="x" k="10" />
+<hkern u1="W" u2="u" k="43" />
+<hkern u1="W" u2="s" k="80" />
+<hkern u1="W" u2="o" k="78" />
+<hkern u1="W" u2="n" k="51" />
+<hkern u1="W" u2="a" k="76" />
+<hkern u1="W" u2="O" k="14" />
+<hkern u1="W" u2="J" k="25" />
+<hkern u1="W" u2="A" k="68" />
+<hkern u1="W" u2="&#x40;" k="20" />
+<hkern u1="W" u2="&#x3a;" k="43" />
+<hkern u1="W" u2="&#x34;" k="27" />
+<hkern u1="W" u2="&#x2f;" k="98" />
+<hkern u1="W" u2="&#x2e;" k="96" />
+<hkern u1="W" u2="&#x2d;" k="39" />
+<hkern u1="W" u2="&#x26;" k="20" />
+<hkern u1="X" u2="&#x2039;" k="31" />
+<hkern u1="X" u2="&#xf0;" k="51" />
+<hkern u1="X" u2="&#xef;" k="-16" />
+<hkern u1="X" u2="&#xec;" k="-41" />
+<hkern u1="X" u2="&#xae;" k="20" />
+<hkern u1="X" u2="y" k="49" />
+<hkern u1="X" u2="w" k="55" />
+<hkern u1="X" u2="v" k="49" />
+<hkern u1="X" u2="u" k="43" />
+<hkern u1="X" u2="t" k="33" />
+<hkern u1="X" u2="o" k="66" />
+<hkern u1="X" u2="n" k="12" />
+<hkern u1="X" u2="f" k="25" />
+<hkern u1="X" u2="a" k="14" />
+<hkern u1="X" u2="O" k="51" />
+<hkern u1="X" u2="&#x2d;" k="55" />
+<hkern u1="Y" u2="&#x2122;" k="-47" />
+<hkern u1="Y" u2="&#x203a;" k="66" />
+<hkern u1="Y" u2="&#x2039;" k="109" />
+<hkern u1="Y" u2="&#xf0;" k="90" />
+<hkern u1="Y" u2="&#xef;" k="-78" />
+<hkern u1="Y" u2="&#xee;" k="-45" />
+<hkern u1="Y" u2="&#xed;" k="39" />
+<hkern u1="Y" u2="&#xec;" k="-125" />
+<hkern u1="Y" u2="&#xdf;" k="29" />
+<hkern u1="Y" u2="&#xc6;" k="113" />
+<hkern u1="Y" u2="&#xae;" k="31" />
+<hkern u1="Y" u2="z" k="82" />
+<hkern u1="Y" u2="y" k="18" />
+<hkern u1="Y" u2="x" k="43" />
+<hkern u1="Y" u2="w" k="27" />
+<hkern u1="Y" u2="v" k="16" />
+<hkern u1="Y" u2="u" k="74" />
+<hkern u1="Y" u2="t" k="14" />
+<hkern u1="Y" u2="s" k="106" />
+<hkern u1="Y" u2="o" k="123" />
+<hkern u1="Y" u2="n" k="72" />
+<hkern u1="Y" u2="f" k="23" />
+<hkern u1="Y" u2="a" k="100" />
+<hkern u1="Y" u2="S" k="18" />
+<hkern u1="Y" u2="O" k="47" />
+<hkern u1="Y" u2="J" k="20" />
+<hkern u1="Y" u2="A" k="104" />
+<hkern u1="Y" u2="&#x40;" k="57" />
+<hkern u1="Y" u2="&#x3a;" k="90" />
+<hkern u1="Y" u2="&#x36;" k="20" />
+<hkern u1="Y" u2="&#x34;" k="66" />
+<hkern u1="Y" u2="&#x31;" k="-31" />
+<hkern u1="Y" u2="&#x2f;" k="119" />
+<hkern u1="Y" u2="&#x2e;" k="127" />
+<hkern u1="Y" u2="&#x2d;" k="92" />
+<hkern u1="Y" u2="&#x26;" k="37" />
+<hkern u1="Z" u2="&#xf0;" k="25" />
+<hkern u1="Z" u2="&#xee;" k="-37" />
+<hkern u1="Z" u2="y" k="16" />
+<hkern u1="Z" u2="w" k="20" />
+<hkern u1="Z" u2="v" k="16" />
+<hkern u1="Z" u2="u" k="23" />
+<hkern u1="Z" u2="t" k="20" />
+<hkern u1="Z" u2="o" k="29" />
+<hkern u1="Z" u2="n" k="14" />
+<hkern u1="Z" u2="f" k="18" />
+<hkern u1="Z" u2="O" k="25" />
+<hkern u1="Z" u2="&#x2d;" k="35" />
+<hkern u1="[" u2="&#xf0;" k="41" />
+<hkern u1="[" u2="&#xec;" k="-33" />
+<hkern u1="[" u2="&#xc6;" k="23" />
+<hkern u1="[" u2="z" k="37" />
+<hkern u1="[" u2="w" k="33" />
+<hkern u1="[" u2="v" k="29" />
+<hkern u1="[" u2="u" k="43" />
+<hkern u1="[" u2="t" k="20" />
+<hkern u1="[" u2="s" k="49" />
+<hkern u1="[" u2="o" k="59" />
+<hkern u1="[" u2="n" k="37" />
+<hkern u1="[" u2="j" k="-184" />
+<hkern u1="[" u2="f" k="20" />
+<hkern u1="[" u2="a" k="45" />
+<hkern u1="[" u2="S" k="27" />
+<hkern u1="[" u2="O" k="51" />
+<hkern u1="[" u2="A" k="27" />
+<hkern u1="[" u2="&#x39;" k="20" />
+<hkern u1="[" u2="&#x38;" k="33" />
+<hkern u1="[" u2="&#x36;" k="43" />
+<hkern u1="[" u2="&#x34;" k="55" />
+<hkern u1="[" u2="&#x30;" k="43" />
+<hkern u1="\" u2="&#x2019;" k="127" />
+<hkern u1="\" u2="&#xc6;" k="-39" />
+<hkern u1="\" u2="y" k="47" />
+<hkern u1="\" u2="w" k="37" />
+<hkern u1="\" u2="v" k="47" />
+<hkern u1="\" u2="t" k="23" />
+<hkern u1="\" u2="Y" k="90" />
+<hkern u1="\" u2="W" k="63" />
+<hkern u1="\" u2="V" k="82" />
+<hkern u1="\" u2="U" k="25" />
+<hkern u1="\" u2="T" k="84" />
+<hkern u1="\" u2="O" k="23" />
+<hkern u1="\" u2="A" k="-14" />
+<hkern u1="\" u2="&#x31;" k="41" />
+<hkern u1="\" u2="&#x27;" k="109" />
+<hkern u1="a" u2="&#x2122;" k="47" />
+<hkern u1="a" u2="&#x2019;" k="33" />
+<hkern u1="a" u2="&#x2018;" k="33" />
+<hkern u1="a" u2="&#x7d;" k="23" />
+<hkern u1="a" u2="y" k="12" />
+<hkern u1="a" u2="w" k="10" />
+<hkern u1="a" u2="v" k="12" />
+<hkern u1="a" u2="t" k="12" />
+<hkern u1="a" u2="f" k="8" />
+<hkern u1="a" u2="]" k="47" />
+<hkern u1="a" u2="\" k="70" />
+<hkern u1="a" u2="Z" k="18" />
+<hkern u1="a" u2="Y" k="96" />
+<hkern u1="a" u2="X" k="10" />
+<hkern u1="a" u2="W" k="53" />
+<hkern u1="a" u2="V" k="72" />
+<hkern u1="a" u2="U" k="16" />
+<hkern u1="a" u2="T" k="109" />
+<hkern u1="a" u2="S" k="10" />
+<hkern u1="a" u2="O" k="12" />
+<hkern u1="a" u2="J" k="14" />
+<hkern u1="a" u2="I" k="10" />
+<hkern u1="a" u2="&#x29;" k="33" />
+<hkern u1="c" u2="&#x2122;" k="35" />
+<hkern u1="c" u2="&#x2039;" k="27" />
+<hkern u1="c" u2="&#xf0;" k="25" />
+<hkern u1="c" u2="s" k="8" />
+<hkern u1="c" u2="o" k="23" />
+<hkern u1="c" u2="a" k="8" />
+<hkern u1="c" u2="]" k="33" />
+<hkern u1="c" u2="\" k="41" />
+<hkern u1="c" u2="Y" k="90" />
+<hkern u1="c" u2="W" k="35" />
+<hkern u1="c" u2="V" k="45" />
+<hkern u1="c" u2="U" k="12" />
+<hkern u1="c" u2="T" k="164" />
+<hkern u1="c" u2="S" k="12" />
+<hkern u1="c" u2="O" k="20" />
+<hkern u1="c" u2="&#x2d;" k="31" />
+<hkern u1="c" u2="&#x29;" k="27" />
+<hkern u1="d" u2="Z" k="12" />
+<hkern u1="d" u2="U" k="12" />
+<hkern u1="d" u2="T" k="10" />
+<hkern u1="d" u2="O" k="10" />
+<hkern u1="d" u2="J" k="16" />
+<hkern u1="d" u2="I" k="10" />
+<hkern u1="e" u2="&#x2122;" k="41" />
+<hkern u1="e" u2="&#x2019;" k="37" />
+<hkern u1="e" u2="&#x2018;" k="37" />
+<hkern u1="e" u2="&#x7d;" k="25" />
+<hkern u1="e" u2="y" k="12" />
+<hkern u1="e" u2="x" k="23" />
+<hkern u1="e" u2="v" k="12" />
+<hkern u1="e" u2="t" k="8" />
+<hkern u1="e" u2="f" k="8" />
+<hkern u1="e" u2="]" k="51" />
+<hkern u1="e" u2="\" k="68" />
+<hkern u1="e" u2="Z" k="29" />
+<hkern u1="e" u2="Y" k="117" />
+<hkern u1="e" u2="X" k="35" />
+<hkern u1="e" u2="W" k="74" />
+<hkern u1="e" u2="V" k="88" />
+<hkern u1="e" u2="U" k="14" />
+<hkern u1="e" u2="T" k="158" />
+<hkern u1="e" u2="S" k="14" />
+<hkern u1="e" u2="J" k="18" />
+<hkern u1="e" u2="I" k="12" />
+<hkern u1="e" u2="A" k="14" />
+<hkern u1="e" u2="&#x2f;" k="35" />
+<hkern u1="e" u2="&#x29;" k="47" />
+<hkern u1="f" u2="&#x2122;" k="-57" />
+<hkern u1="f" u2="&#x2039;" k="55" />
+<hkern u1="f" u2="&#xf0;" k="63" />
+<hkern u1="f" u2="&#xef;" k="-100" />
+<hkern u1="f" u2="&#xee;" k="-37" />
+<hkern u1="f" u2="&#xec;" k="-152" />
+<hkern u1="f" u2="&#xc6;" k="90" />
+<hkern u1="f" u2="s" k="8" />
+<hkern u1="f" u2="o" k="27" />
+<hkern u1="f" u2="a" k="10" />
+<hkern u1="f" u2="]" k="-29" />
+<hkern u1="f" u2="Y" k="-117" />
+<hkern u1="f" u2="X" k="-33" />
+<hkern u1="f" u2="W" k="-78" />
+<hkern u1="f" u2="V" k="-94" />
+<hkern u1="f" u2="T" k="-39" />
+<hkern u1="f" u2="J" k="12" />
+<hkern u1="f" u2="A" k="82" />
+<hkern u1="f" u2="&#x3a;" k="41" />
+<hkern u1="f" u2="&#x2f;" k="63" />
+<hkern u1="f" u2="&#x2e;" k="66" />
+<hkern u1="f" u2="&#x2d;" k="63" />
+<hkern u1="i" u2="Z" k="12" />
+<hkern u1="i" u2="U" k="12" />
+<hkern u1="i" u2="T" k="10" />
+<hkern u1="i" u2="O" k="10" />
+<hkern u1="i" u2="J" k="16" />
+<hkern u1="i" u2="I" k="10" />
+<hkern u1="j" u2="j" k="-33" />
+<hkern u1="k" u2="&#x2122;" k="33" />
+<hkern u1="k" u2="&#x2039;" k="41" />
+<hkern u1="k" u2="&#xf0;" k="53" />
+<hkern u1="k" u2="s" k="10" />
+<hkern u1="k" u2="o" k="51" />
+<hkern u1="k" u2="a" k="18" />
+<hkern u1="k" u2="Y" k="39" />
+<hkern u1="k" u2="V" k="16" />
+<hkern u1="k" u2="U" k="10" />
+<hkern u1="k" u2="T" k="133" />
+<hkern u1="k" u2="O" k="35" />
+<hkern u1="k" u2="&#x2d;" k="57" />
+<hkern u1="l" u2="&#xb7;" k="150" />
+<hkern u1="l" u2="Z" k="12" />
+<hkern u1="l" u2="U" k="12" />
+<hkern u1="l" u2="T" k="10" />
+<hkern u1="l" u2="O" k="10" />
+<hkern u1="l" u2="J" k="16" />
+<hkern u1="l" u2="I" k="10" />
+<hkern u1="n" u2="&#x2122;" k="49" />
+<hkern u1="n" u2="&#x2019;" k="35" />
+<hkern u1="n" u2="&#x2018;" k="35" />
+<hkern u1="n" u2="&#x7d;" k="23" />
+<hkern u1="n" u2="y" k="14" />
+<hkern u1="n" u2="w" k="12" />
+<hkern u1="n" u2="v" k="12" />
+<hkern u1="n" u2="t" k="14" />
+<hkern u1="n" u2="f" k="10" />
+<hkern u1="n" u2="]" k="47" />
+<hkern u1="n" u2="\" k="72" />
+<hkern u1="n" u2="Z" k="20" />
+<hkern u1="n" u2="Y" k="96" />
+<hkern u1="n" u2="X" k="10" />
+<hkern u1="n" u2="W" k="53" />
+<hkern u1="n" u2="V" k="72" />
+<hkern u1="n" u2="U" k="16" />
+<hkern u1="n" u2="T" k="109" />
+<hkern u1="n" u2="S" k="10" />
+<hkern u1="n" u2="O" k="12" />
+<hkern u1="n" u2="J" k="14" />
+<hkern u1="n" u2="I" k="10" />
+<hkern u1="n" u2="&#x2a;" k="16" />
+<hkern u1="n" u2="&#x29;" k="33" />
+<hkern u1="o" u2="&#x2122;" k="49" />
+<hkern u1="o" u2="&#x2019;" k="53" />
+<hkern u1="o" u2="&#x2018;" k="53" />
+<hkern u1="o" u2="&#xc6;" k="20" />
+<hkern u1="o" u2="&#x7d;" k="35" />
+<hkern u1="o" u2="z" k="12" />
+<hkern u1="o" u2="y" k="20" />
+<hkern u1="o" u2="x" k="39" />
+<hkern u1="o" u2="w" k="14" />
+<hkern u1="o" u2="v" k="18" />
+<hkern u1="o" u2="t" k="16" />
+<hkern u1="o" u2="f" k="16" />
+<hkern u1="o" u2="]" k="59" />
+<hkern u1="o" u2="\" k="76" />
+<hkern u1="o" u2="Z" k="41" />
+<hkern u1="o" u2="Y" k="123" />
+<hkern u1="o" u2="X" k="66" />
+<hkern u1="o" u2="W" k="78" />
+<hkern u1="o" u2="V" k="88" />
+<hkern u1="o" u2="U" k="18" />
+<hkern u1="o" u2="T" k="131" />
+<hkern u1="o" u2="S" k="23" />
+<hkern u1="o" u2="J" k="29" />
+<hkern u1="o" u2="I" k="18" />
+<hkern u1="o" u2="A" k="23" />
+<hkern u1="o" u2="&#x3f;" k="20" />
+<hkern u1="o" u2="&#x2f;" k="43" />
+<hkern u1="o" u2="&#x2a;" k="23" />
+<hkern u1="o" u2="&#x29;" k="55" />
+<hkern u1="o" u2="&#x27;" k="23" />
+<hkern u1="q" u2="j" k="-119" />
+<hkern u1="r" u2="&#x2122;" k="16" />
+<hkern u1="r" u2="&#x2039;" k="55" />
+<hkern u1="r" u2="&#xf0;" k="57" />
+<hkern u1="r" u2="&#xc6;" k="92" />
+<hkern u1="r" u2="&#x7d;" k="20" />
+<hkern u1="r" u2="o" k="20" />
+<hkern u1="r" u2="a" k="10" />
+<hkern u1="r" u2="]" k="39" />
+<hkern u1="r" u2="Z" k="29" />
+<hkern u1="r" u2="Y" k="14" />
+<hkern u1="r" u2="X" k="61" />
+<hkern u1="r" u2="T" k="139" />
+<hkern u1="r" u2="J" k="86" />
+<hkern u1="r" u2="A" k="90" />
+<hkern u1="r" u2="&#x3a;" k="33" />
+<hkern u1="r" u2="&#x2f;" k="88" />
+<hkern u1="r" u2="&#x2e;" k="92" />
+<hkern u1="r" u2="&#x2d;" k="57" />
+<hkern u1="r" u2="&#x29;" k="37" />
+<hkern u1="r" u2="&#x26;" k="27" />
+<hkern u1="s" u2="&#x2122;" k="47" />
+<hkern u1="s" u2="&#x7d;" k="20" />
+<hkern u1="s" u2="x" k="8" />
+<hkern u1="s" u2="v" k="8" />
+<hkern u1="s" u2="]" k="43" />
+<hkern u1="s" u2="\" k="53" />
+<hkern u1="s" u2="Y" k="92" />
+<hkern u1="s" u2="X" k="16" />
+<hkern u1="s" u2="W" k="51" />
+<hkern u1="s" u2="V" k="61" />
+<hkern u1="s" u2="U" k="18" />
+<hkern u1="s" u2="T" k="145" />
+<hkern u1="s" u2="O" k="10" />
+<hkern u1="s" u2="I" k="12" />
+<hkern u1="s" u2="A" k="10" />
+<hkern u1="s" u2="&#x2f;" k="20" />
+<hkern u1="s" u2="&#x29;" k="41" />
+<hkern u1="t" u2="&#x2122;" k="39" />
+<hkern u1="t" u2="o" k="8" />
+<hkern u1="t" u2="]" k="25" />
+<hkern u1="t" u2="\" k="33" />
+<hkern u1="t" u2="Y" k="68" />
+<hkern u1="t" u2="W" k="25" />
+<hkern u1="t" u2="V" k="37" />
+<hkern u1="t" u2="U" k="12" />
+<hkern u1="t" u2="T" k="119" />
+<hkern u1="u" u2="&#x2122;" k="37" />
+<hkern u1="u" u2="]" k="37" />
+<hkern u1="u" u2="\" k="41" />
+<hkern u1="u" u2="Z" k="14" />
+<hkern u1="u" u2="Y" k="72" />
+<hkern u1="u" u2="X" k="14" />
+<hkern u1="u" u2="W" k="51" />
+<hkern u1="u" u2="V" k="61" />
+<hkern u1="u" u2="U" k="10" />
+<hkern u1="u" u2="T" k="100" />
+<hkern u1="u" u2="O" k="10" />
+<hkern u1="u" u2="J" k="16" />
+<hkern u1="u" u2="I" k="10" />
+<hkern u1="u" u2="&#x29;" k="31" />
+<hkern u1="v" u2="&#x2039;" k="37" />
+<hkern u1="v" u2="&#xf0;" k="35" />
+<hkern u1="v" u2="&#xc6;" k="66" />
+<hkern u1="v" u2="s" k="14" />
+<hkern u1="v" u2="o" k="18" />
+<hkern u1="v" u2="a" k="14" />
+<hkern u1="v" u2="]" k="29" />
+<hkern u1="v" u2="Z" k="12" />
+<hkern u1="v" u2="Y" k="16" />
+<hkern u1="v" u2="X" k="49" />
+<hkern u1="v" u2="T" k="139" />
+<hkern u1="v" u2="J" k="53" />
+<hkern u1="v" u2="A" k="59" />
+<hkern u1="v" u2="&#x3a;" k="18" />
+<hkern u1="v" u2="&#x2f;" k="82" />
+<hkern u1="v" u2="&#x2e;" k="74" />
+<hkern u1="v" u2="&#x2a;" k="-18" />
+<hkern u1="v" u2="&#x29;" k="27" />
+<hkern u1="w" u2="&#x2039;" k="29" />
+<hkern u1="w" u2="&#xf0;" k="29" />
+<hkern u1="w" u2="&#xc6;" k="59" />
+<hkern u1="w" u2="s" k="8" />
+<hkern u1="w" u2="o" k="14" />
+<hkern u1="w" u2="a" k="10" />
+<hkern u1="w" u2="]" k="33" />
+<hkern u1="w" u2="Z" k="16" />
+<hkern u1="w" u2="Y" k="27" />
+<hkern u1="w" u2="X" k="53" />
+<hkern u1="w" u2="T" k="133" />
+<hkern u1="w" u2="J" k="57" />
+<hkern u1="w" u2="A" k="51" />
+<hkern u1="w" u2="&#x2f;" k="72" />
+<hkern u1="w" u2="&#x2e;" k="59" />
+<hkern u1="w" u2="&#x29;" k="31" />
+<hkern u1="x" u2="&#x2122;" k="27" />
+<hkern u1="x" u2="&#x2039;" k="45" />
+<hkern u1="x" u2="&#xf0;" k="45" />
+<hkern u1="x" u2="o" k="41" />
+<hkern u1="x" u2="a" k="10" />
+<hkern u1="x" u2="Y" k="39" />
+<hkern u1="x" u2="V" k="16" />
+<hkern u1="x" u2="U" k="12" />
+<hkern u1="x" u2="T" k="135" />
+<hkern u1="x" u2="O" k="25" />
+<hkern u1="x" u2="&#x2d;" k="49" />
+<hkern u1="y" u2="&#x2039;" k="37" />
+<hkern u1="y" u2="&#xf0;" k="35" />
+<hkern u1="y" u2="&#xc6;" k="66" />
+<hkern u1="y" u2="s" k="12" />
+<hkern u1="y" u2="o" k="18" />
+<hkern u1="y" u2="a" k="14" />
+<hkern u1="y" u2="]" k="23" />
+<hkern u1="y" u2="Z" k="12" />
+<hkern u1="y" u2="Y" k="16" />
+<hkern u1="y" u2="X" k="47" />
+<hkern u1="y" u2="T" k="139" />
+<hkern u1="y" u2="J" k="49" />
+<hkern u1="y" u2="A" k="59" />
+<hkern u1="y" u2="&#x3a;" k="18" />
+<hkern u1="y" u2="&#x2f;" k="76" />
+<hkern u1="y" u2="&#x2e;" k="74" />
+<hkern u1="y" u2="&#x2a;" k="-12" />
+<hkern u1="y" u2="&#x29;" k="23" />
+<hkern u1="z" u2="&#x2122;" k="43" />
+<hkern u1="z" u2="&#x2039;" k="31" />
+<hkern u1="z" u2="&#xf0;" k="14" />
+<hkern u1="z" u2="o" k="14" />
+<hkern u1="z" u2="]" k="33" />
+<hkern u1="z" u2="\" k="37" />
+<hkern u1="z" u2="Y" k="78" />
+<hkern u1="z" u2="W" k="33" />
+<hkern u1="z" u2="V" k="41" />
+<hkern u1="z" u2="U" k="20" />
+<hkern u1="z" u2="T" k="150" />
+<hkern u1="z" u2="O" k="12" />
+<hkern u1="z" u2="I" k="10" />
+<hkern u1="z" u2="&#x2d;" k="35" />
+<hkern u1="&#x7b;" u2="&#xf0;" k="23" />
+<hkern u1="&#x7b;" u2="u" k="25" />
+<hkern u1="&#x7b;" u2="s" k="20" />
+<hkern u1="&#x7b;" u2="o" k="35" />
+<hkern u1="&#x7b;" u2="j" k="-168" />
+<hkern u1="&#x7b;" u2="a" k="20" />
+<hkern u1="&#x7b;" u2="O" k="25" />
+<hkern u1="&#x7c;" u2="j" k="-104" />
+<hkern u1="&#x7d;" u2="&#x29;" k="20" />
+<hkern u1="&#xae;" u2="&#xc6;" k="25" />
+<hkern u1="&#xae;" u2="Y" k="33" />
+<hkern u1="&#xae;" u2="X" k="25" />
+<hkern u1="&#xae;" u2="T" k="25" />
+<hkern u1="&#xae;" u2="J" k="25" />
+<hkern u1="&#xae;" u2="A" k="27" />
+<hkern u1="&#xb0;" u2="&#x34;" k="49" />
+<hkern u1="&#xb7;" u2="l" k="150" />
+<hkern u1="&#xb7;" u2="&#x37;" k="41" />
+<hkern u1="&#xb7;" u2="&#x33;" k="53" />
+<hkern u1="&#xb7;" u2="&#x32;" k="51" />
+<hkern u1="&#xb7;" u2="&#x31;" k="59" />
+<hkern u1="&#xbf;" u2="Y" k="39" />
+<hkern u1="&#xbf;" u2="W" k="31" />
+<hkern u1="&#xbf;" u2="V" k="37" />
+<hkern u1="&#xbf;" u2="T" k="41" />
+<hkern u1="&#xce;" u2="&#x7d;" k="-20" />
+<hkern u1="&#xde;" u2="&#x2122;" k="25" />
+<hkern u1="&#xde;" u2="&#xc6;" k="39" />
+<hkern u1="&#xde;" u2="z" k="10" />
+<hkern u1="&#xde;" u2="x" k="14" />
+<hkern u1="&#xde;" u2="]" k="51" />
+<hkern u1="&#xde;" u2="\" k="35" />
+<hkern u1="&#xde;" u2="Z" k="27" />
+<hkern u1="&#xde;" u2="Y" k="49" />
+<hkern u1="&#xde;" u2="X" k="61" />
+<hkern u1="&#xde;" u2="W" k="12" />
+<hkern u1="&#xde;" u2="V" k="25" />
+<hkern u1="&#xde;" u2="T" k="37" />
+<hkern u1="&#xde;" u2="J" k="49" />
+<hkern u1="&#xde;" u2="A" k="39" />
+<hkern u1="&#xde;" u2="&#x2f;" k="61" />
+<hkern u1="&#xde;" u2="&#x2e;" k="66" />
+<hkern u1="&#xde;" u2="&#x29;" k="45" />
+<hkern u1="&#xdf;" u2="y" k="14" />
+<hkern u1="&#xdf;" u2="x" k="18" />
+<hkern u1="&#xdf;" u2="w" k="10" />
+<hkern u1="&#xdf;" u2="v" k="14" />
+<hkern u1="&#xdf;" u2="t" k="14" />
+<hkern u1="&#xdf;" u2="f" k="12" />
+<hkern u1="&#xdf;" u2="]" k="25" />
+<hkern u1="&#xdf;" u2="\" k="20" />
+<hkern u1="&#xdf;" u2="Z" k="14" />
+<hkern u1="&#xdf;" u2="Y" k="37" />
+<hkern u1="&#xdf;" u2="X" k="31" />
+<hkern u1="&#xdf;" u2="W" k="27" />
+<hkern u1="&#xdf;" u2="V" k="33" />
+<hkern u1="&#xdf;" u2="U" k="20" />
+<hkern u1="&#xdf;" u2="T" k="31" />
+<hkern u1="&#xdf;" u2="S" k="10" />
+<hkern u1="&#xdf;" u2="O" k="10" />
+<hkern u1="&#xdf;" u2="J" k="14" />
+<hkern u1="&#xdf;" u2="I" k="16" />
+<hkern u1="&#xdf;" u2="A" k="14" />
+<hkern u1="&#xdf;" u2="&#x2f;" k="31" />
+<hkern u1="&#xdf;" u2="&#x29;" k="33" />
+<hkern u1="&#xed;" u2="&#x2122;" k="-90" />
+<hkern u1="&#xed;" u2="&#x7d;" k="-33" />
+<hkern u1="&#xed;" u2="]" k="-55" />
+<hkern u1="&#xed;" u2="\" k="-18" />
+<hkern u1="&#xed;" u2="&#x2a;" k="-37" />
+<hkern u1="&#xee;" u2="&#x2122;" k="-72" />
+<hkern u1="&#xee;" u2="&#x3f;" k="-35" />
+<hkern u1="&#xee;" u2="&#x2a;" k="-84" />
+<hkern u1="&#xef;" u2="&#x2122;" k="-70" />
+<hkern u1="&#xef;" u2="&#x7d;" k="-12" />
+<hkern u1="&#xef;" u2="]" k="-33" />
+<hkern u1="&#xef;" u2="&#x2a;" k="-43" />
+<hkern u1="&#xf0;" u2="&#x2122;" k="31" />
+<hkern u1="&#xf0;" u2="&#x2019;" k="37" />
+<hkern u1="&#xf0;" u2="&#x2018;" k="37" />
+<hkern u1="&#xf0;" u2="&#xc6;" k="14" />
+<hkern u1="&#xf0;" u2="&#x7d;" k="20" />
+<hkern u1="&#xf0;" u2="z" k="8" />
+<hkern u1="&#xf0;" u2="y" k="12" />
+<hkern u1="&#xf0;" u2="x" k="27" />
+<hkern u1="&#xf0;" u2="w" k="8" />
+<hkern u1="&#xf0;" u2="v" k="14" />
+<hkern u1="&#xf0;" u2="t" k="12" />
+<hkern u1="&#xf0;" u2="f" k="10" />
+<hkern u1="&#xf0;" u2="]" k="39" />
+<hkern u1="&#xf0;" u2="\" k="33" />
+<hkern u1="&#xf0;" u2="Z" k="37" />
+<hkern u1="&#xf0;" u2="Y" k="80" />
+<hkern u1="&#xf0;" u2="X" k="61" />
+<hkern u1="&#xf0;" u2="W" k="59" />
+<hkern u1="&#xf0;" u2="V" k="70" />
+<hkern u1="&#xf0;" u2="U" k="18" />
+<hkern u1="&#xf0;" u2="T" k="82" />
+<hkern u1="&#xf0;" u2="S" k="16" />
+<hkern u1="&#xf0;" u2="J" k="25" />
+<hkern u1="&#xf0;" u2="I" k="12" />
+<hkern u1="&#xf0;" u2="A" k="20" />
+<hkern u1="&#xf0;" u2="&#x2f;" k="39" />
+<hkern u1="&#xf0;" u2="&#x2a;" k="18" />
+<hkern u1="&#xf0;" u2="&#x29;" k="39" />
+<hkern u1="&#xf0;" u2="&#x27;" k="18" />
+<hkern u1="&#x2018;" u2="&#xf0;" k="39" />
+<hkern u1="&#x2018;" u2="&#xc6;" k="133" />
+<hkern u1="&#x2018;" u2="s" k="49" />
+<hkern u1="&#x2018;" u2="o" k="74" />
+<hkern u1="&#x2018;" u2="a" k="43" />
+<hkern u1="&#x2018;" u2="O" k="23" />
+<hkern u1="&#x2018;" u2="J" k="29" />
+<hkern u1="&#x2018;" u2="A" k="125" />
+<hkern u1="&#x2018;" u2="&#x2e;" k="309" />
+<hkern u1="&#x2019;" u2="&#x2039;" k="33" />
+<hkern u1="&#x2019;" u2="&#xf0;" k="39" />
+<hkern u1="&#x2019;" u2="&#xc6;" k="133" />
+<hkern u1="&#x2019;" u2="&#xae;" k="25" />
+<hkern u1="&#x2019;" u2="s" k="49" />
+<hkern u1="&#x2019;" u2="o" k="74" />
+<hkern u1="&#x2019;" u2="a" k="43" />
+<hkern u1="&#x2019;" u2="O" k="23" />
+<hkern u1="&#x2019;" u2="J" k="29" />
+<hkern u1="&#x2019;" u2="A" k="125" />
+<hkern u1="&#x2019;" u2="&#x40;" k="57" />
+<hkern u1="&#x2019;" u2="&#x3a;" k="156" />
+<hkern u1="&#x2019;" u2="&#x2f;" k="172" />
+<hkern u1="&#x2019;" u2="&#x2e;" k="309" />
+<hkern u1="&#x2019;" u2="&#x26;" k="45" />
+<hkern u1="&#x2039;" u2="Y" k="66" />
+<hkern u1="&#x2039;" u2="W" k="23" />
+<hkern u1="&#x2039;" u2="V" k="35" />
+<hkern u1="&#x2039;" u2="T" k="111" />
+<hkern u1="&#x203a;" u2="z" k="25" />
+<hkern u1="&#x203a;" u2="y" k="37" />
+<hkern u1="&#x203a;" u2="x" k="43" />
+<hkern u1="&#x203a;" u2="w" k="29" />
+<hkern u1="&#x203a;" u2="v" k="37" />
+<hkern u1="&#x203a;" u2="t" k="27" />
+<hkern u1="&#x203a;" u2="s" k="20" />
+<hkern u1="&#x203a;" u2="f" k="27" />
+<hkern u1="&#x203a;" u2="Z" k="23" />
+<hkern u1="&#x203a;" u2="Y" k="109" />
+<hkern u1="&#x203a;" u2="X" k="33" />
+<hkern u1="&#x203a;" u2="W" k="57" />
+<hkern u1="&#x203a;" u2="V" k="72" />
+<hkern u1="&#x203a;" u2="T" k="127" />
+<hkern u1="&#x203a;" u2="J" k="27" />
+<hkern u1="&#x203a;" u2="&#x27;" k="29" />
+<hkern u1="&#x2122;" u2="&#xee;" k="-31" />
+<hkern u1="&#x2122;" u2="&#xec;" k="-14" />
+<hkern u1="&#x2122;" u2="&#xc6;" k="61" />
+<hkern u1="&#x2122;" u2="J" k="35" />
+<hkern u1="&#x2122;" u2="A" k="55" />
+</font>
+</defs></svg> -88t-37 -90t-89 -38t-89 37z" />
+<glyph unicode="&#xa9;" horiz-adv-x="1703" d="M1593 719q0 -305 -217 -524.5t-526 -219.5t-524 217.5t-215 522.5t217 524t524 219t524 -217t217 -522zM1503 717q0 268 -187.5 458.5t-459.5 190.5t-460.5 -191.5t-188.5 -461t186.5 -460t458.5 -190.5t461.5 193t189.5 461zM1194 459q-139 -145 -317.5 -145.5 t-297 111.5t-118.5 294t123 294.5t305 112.5t299 -122l-98 -121q-106 90 -209 90t-179.5 -68.5t-76.5 -178.5t76.5 -185.5t188 -75.5t206.5 100z" />
+<glyph unicode="&#xaa;" horiz-adv-x="720" d="M567 954h-96v68q-63 -76 -154.5 -76t-143.5 45t-52 119q0 150 203 150h139v18q0 100 -113 100q-68 0 -145 -51l-47 68q90 72 194 71q215 0 215 -186v-326zM461 1143v43h-119q-115 0 -115 -74q0 -37 29 -56.5t79 -19.5t88 30t38 77z" />
+<glyph unicode="&#xab;" horiz-adv-x="1120" d="M580 852l-236 -360l236 -361h-222l-243 361l243 360h222zM985 852l-235 -360l235 -361h-221l-244 361l244 360h221z" />
+<glyph unicode="&#xac;" horiz-adv-x="1695" d="M137 911h1370v-731h-168v551h-1202v180z" />
+<glyph unicode="&#xad;" horiz-adv-x="974" d="M147 504v215h680v-215h-680z" />
+<glyph unicode="&#xae;" horiz-adv-x="1703" d="M1593 719q0 -305 -217 -524.5t-526 -219.5t-524 217.5t-215 522.5t217 524t524 219t524 -217t217 -522zM1503 717q0 268 -187.5 458.5t-459.5 190.5t-460.5 -191.5t-188.5 -461t186.5 -460t458.5 -190.5t461.5 193t189.5 461zM1210 860q0 -199 -174 -250l213 -288h-172 l-192 268h-176v-268h-140v800h301q182 0 261 -62.5t79 -199.5zM1031 747.5q42 34.5 42 113.5t-43 109.5t-151 30.5h-170v-288h165q115 0 157 34.5z" />
+<glyph unicode="&#xaf;" horiz-adv-x="868" d="M750 1407v-178h-629v178h629z" />
+<glyph unicode="&#xb0;" horiz-adv-x="851" d="M426 1464q131 0 223 -92t92 -223t-92 -222t-223 -91t-223 91t-92 222t92 223t223 92zM277.5 1001.5q60.5 -61.5 147.5 -61.5t147.5 61.5t60.5 147.5t-60.5 146.5t-147.5 60.5t-147.5 -60.5t-60.5 -146.5t60.5 -147.5z" />
+<glyph unicode="&#xb1;" horiz-adv-x="1163" d="M489 565v277h-391v192h391v273h185v-273h391v-192h-391v-277h-185zM98 451h967v-172h-967v172z" />
+<glyph unicode="&#xb2;" horiz-adv-x="858" d="M519 1120q36 49 36 99.5t-38 85t-97 34.5q-104 0 -172 -104l-113 65q109 166 287 166q111 0 189.5 -66.5t78.5 -180.5q0 -63 -33.5 -122t-124.5 -153l-194 -199h379v-135h-572v119l252 256q86 86 122 135z" />
+<glyph unicode="&#xb3;" horiz-adv-x="811" d="M158 1305v127h495v-113l-204 -229q117 -2 181 -73t64 -183.5t-87 -186.5t-226 -74t-270 89l61 114q100 -72 217 -71q74 0 122 33.5t48 99t-53 104.5t-124 39t-116 -14v108l197 230h-305z" />
+<glyph unicode="&#xb4;" horiz-adv-x="1705" d="M901 1286h-209l217 297l242 -100z" />
+<glyph unicode="&#xb5;" horiz-adv-x="1314" d="M176 -397v1487h230v-598q0 -301 249 -302q119 0 207 79t88 231v590h230v-1090h-230v199q-55 -100 -152.5 -157.5t-204 -57.5t-187.5 34v-415h-230z" />
+<glyph unicode="&#xb6;" horiz-adv-x="1374" d="M72 1139q0 174 120.5 292.5t366.5 118.5h612v-1779h-190v1585h-229v-1585h-185v981q-49 -6 -94 -7q-113 0 -196.5 39t-124.5 101q-80 119 -80 254z" />
+<glyph unicode="&#xb7;" horiz-adv-x="595" d="M145 653.5q0 63.5 44 107.5t107.5 44t109 -44t45.5 -107.5t-45.5 -108.5t-109 -45t-107.5 45t-44 108.5z" />
+<glyph unicode="&#xb8;" horiz-adv-x="575" d="M481 -240q0 -78 -63.5 -136t-160.5 -58t-171 45l53 117q39 -20 79 -20.5t62.5 23t22.5 56.5t-23.5 58.5t-59.5 25.5t-60 -10l73 139h146l-41 -78q143 -19 143 -162z" />
+<glyph unicode="&#xb9;" horiz-adv-x="548" d="M84 1432h303v-838h-133v713h-170v125z" />
+<glyph unicode="&#xba;" horiz-adv-x="774" d="M387 1032q72 0 118 47t46 122t-46 122t-118 47t-118 -47t-46 -122t46 -122t118 -47zM387 934q-117 0 -194.5 76.5t-77.5 189.5t77.5 189.5t194.5 76.5t194.5 -76.5t77.5 -189.5t-77.5 -189.5t-194.5 -76.5z" />
+<glyph unicode="&#xbb;" horiz-adv-x="1120" d="M776 492l-235 360h221l244 -360l-244 -361h-221zM371 492l-236 360h221l244 -360l-244 -361h-221z" />
+<glyph unicode="&#xbc;" horiz-adv-x="1767" d="M1210 1550h148l-764 -1566h-148zM1452 340v154h133v-154h103v-129h-103v-211h-133v211h-358v125l305 502h155l-303 -498h201zM72 1432h303v-838h-133v713h-170v125z" />
+<glyph unicode="&#xbd;" horiz-adv-x="1900" d="M1276 1550h147l-764 -1566h-147zM1613 510q36 49 36 99t-38 85t-98 35q-100 0 -172 -104l-110 65q109 166 285 166q111 0 190.5 -66.5t79.5 -181.5q0 -63 -34 -122.5t-124 -151.5l-196 -199h378v-135h-571v119l254 256q84 86 120 135zM72 1432h303v-838h-133v713h-170 v125z" />
+<glyph unicode="&#xbe;" horiz-adv-x="1845" d="M1294 1550h148l-764 -1566h-148zM1536 340v154h133v-154h103v-129h-103v-211h-133v211h-358v125l305 502h155l-303 -498h201zM129 1305v127h496v-113l-205 -229q117 -2 181.5 -73t64.5 -183.5t-87 -186.5t-226.5 -74t-270.5 89l61 114q100 -72 217 -71q74 0 122 33.5 t48 99t-53 104.5t-123.5 39t-115.5 -14v108l196 230h-305z" />
+<glyph unicode="&#xbf;" horiz-adv-x="1040" d="M422 1004h231v-125q0 -82 -19.5 -122t-84.5 -106l-150 -149q-47 -51 -47 -127t49.5 -126t127 -50t130 48t60.5 128h248q-20 -182 -142.5 -285.5t-304.5 -103.5t-296.5 99t-114.5 277q0 123 67 205q39 49 59.5 69.5t54.5 52.5t57.5 55.5t37.5 41.5q37 43 37 125v93z M645 1414q47 -44 47 -106.5t-46 -107.5t-110.5 -45t-111.5 44t-47 106.5t46 107.5t110.5 45t111.5 -44z" />
+<glyph unicode="&#xc0;" horiz-adv-x="1495" d="M864 1432l631 -1432h-266l-146 326h-686l-139 -326h-258l631 1432h233zM987 549l-246 551l-243 -551h489zM860 1550h-209l-250 197l242 100z" />
+<glyph unicode="&#xc1;" horiz-adv-x="1519" d="M401 326l-143 -326h-258l631 1432h258l631 -1432h-258l-144 326h-717zM1020 549l-260 590l-260 -590h520zM870 1552h-208l217 297l241 -100z" />
+<glyph unicode="&#xc2;" horiz-adv-x="1495" d="M864 1432l631 -1432h-266l-146 326h-686l-139 -326h-258l631 1432h233zM987 549l-246 551l-243 -551h489zM633 1825h213l250 -275h-199l-158 115l-157 -115h-199z" />
+<glyph unicode="&#xc3;" horiz-adv-x="1495" d="M864 1432l631 -1432h-266l-146 326h-686l-139 -326h-258l631 1432h233zM987 549l-246 551l-243 -551h489zM897 1544q-53 0 -148.5 48t-121.5 48q-68 0 -70 -90h-151q0 119 48 193t134 74q55 0 153.5 -48.5t128.5 -48.5q61 0 62 90h153q-6 -266 -188 -266z" />
+<glyph unicode="&#xc4;" horiz-adv-x="1495" d="M864 1432l631 -1432h-266l-146 326h-686l-139 -326h-258l631 1432h233zM987 549l-246 551l-243 -551h489zM468 1579q-36 37 -36 89t36 89t89 37t90 -36t37 -88t-37 -90t-90 -38t-89 37zM848 1579q-37 37 -37 89t37 89t89 37t89 -36t37 -88t-38 -90t-89 -38t-88 37z" />
+<glyph unicode="&#xc5;" horiz-adv-x="1495" d="M903.5 1729.5q67.5 -64.5 67.5 -162t-97 -162.5l621 -1405h-266l-146 326h-686l-139 -326h-258l618 1407q-92 66 -92 162t66.5 160.5t155 64.5t156 -64.5zM987 549l-246 551l-243 -551h489zM829.5 1498q30.5 32 30.5 82t-30.5 82t-81 32t-82 -32t-31.5 -82t31.5 -82 t82 -32t81 32z" />
+<glyph unicode="&#xc6;" horiz-adv-x="2129" d="M1995 1432v-226h-764v-393h686v-211h-686v-377h788v-225h-1052v326h-518l-175 -326h-297l750 1432h1268zM967 557v649h-60l-342 -649h402z" />
+<glyph unicode="&#xc7;" horiz-adv-x="1507" d="M852 219q125 0 215 42t188 134l156 -159q-213 -238 -520 -250l-33 -64q143 -18 143 -162q0 -78 -63.5 -136t-160.5 -58t-171 45l53 117q39 -20 79 -20.5t62.5 23t22.5 56.5t-23.5 58.5t-59 25.5t-60.5 -10l68 129q-281 35 -461.5 237.5t-180.5 507.5t218.5 518t551 213 t556.5 -245l-154 -168q-102 98 -193.5 137t-214.5 39q-217 0 -364.5 -140.5t-147.5 -358.5t146.5 -364.5t347.5 -146.5z" />
+<glyph unicode="&#xc8;" horiz-adv-x="1339" d="M862 1550h-209l-250 197l242 100zM1204 1432v-228h-764v-379h686v-215h-686v-383h789v-227h-1030v1432h1005z" />
+<glyph unicode="&#xc9;" horiz-adv-x="1339" d="M1204 1432v-228h-764v-379h686v-215h-686v-383h789v-227h-1030v1432h1005zM811 1550h-209l217 297l242 -100z" />
+<glyph unicode="&#xca;" horiz-adv-x="1339" d="M596 1825h213l250 -275h-199l-158 115l-157 -115h-199zM1204 1432v-228h-764v-379h686v-215h-686v-383h789v-227h-1030v1432h1005z" />
+<glyph unicode="&#xcb;" horiz-adv-x="1339" d="M425 1579q-36 37 -36 89t37 89t89 37t89 -36t37 -88t-38 -90t-90 -38t-88 37zM805 1579q-37 37 -37 89t37 89t89 37t89 -36t37 -88t-37 -90t-89 -38t-89 37zM1204 1432v-228h-764v-379h686v-215h-686v-383h789v-227h-1030v1432h1005z" />
+<glyph unicode="&#xcc;" horiz-adv-x="638" d="M428 1550h-209l-250 197l242 100zM199 1432h241v-1432h-241v1432z" />
+<glyph unicode="&#xcd;" horiz-adv-x="638" d="M199 1432h241v-1432h-241v1432zM420 1550h-209l217 297l242 -100z" />
+<glyph unicode="&#xce;" horiz-adv-x="638" d="M199 1432h241v-1432h-241v1432zM236 1825h213l249 -275h-198l-158 115l-158 -115h-198z" />
+<glyph unicode="&#xcf;" horiz-adv-x="638" d="M42 1579q-36 37 -36 89t36 89t89 37t90 -36t37 -88t-37 -90t-90 -38t-89 37zM422 1579q-37 37 -37 89t37 89t89 37t89 -36t37 -88t-38 -90t-89 -38t-88 37zM199 1432h241v-1432h-241v1432z" />
+<glyph unicode="&#xd0;" horiz-adv-x="1617" d="M53 602v215h162v615h492q385 0 591.5 -187.5t206.5 -521.5t-200.5 -528.5t-614.5 -194.5h-475v602h-162zM1262 717q0 492 -564 491h-241v-391h512v-215h-512v-375h268q260 0 398.5 124t138.5 366z" />
+<glyph unicode="&#xd1;" horiz-adv-x="1712" d="M1272 1432h241v-1432h-262l-811 1044v-1044h-241v1432h241l832 -1070v1070zM1001 1544q-53 0 -148 48t-122 48q-68 0 -69 -90h-152q0 119 48 193t134 74q55 0 153.5 -48.5t129.5 -48.5q61 0 61 90h154q-7 -266 -189 -266z" />
+<glyph unicode="&#xd2;" horiz-adv-x="1720" d="M1016 1550h-209l-250 197l242 100zM860 1245q-213 0 -359.5 -151.5t-146.5 -367.5t146.5 -367.5t359.5 -151.5t359.5 151.5t146.5 367.5t-146.5 367.5t-359.5 151.5zM860.5 -14q-319.5 0 -537 212t-217.5 528t217.5 528t537 212t536.5 -212t217 -528t-217 -528 t-536.5 -212z" />
+<glyph unicode="&#xd3;" horiz-adv-x="1720" d="M860 1245q-213 0 -359.5 -151.5t-146.5 -367.5t146.5 -367.5t359.5 -151.5t359.5 151.5t146.5 367.5t-146.5 367.5t-359.5 151.5zM860.5 -14q-319.5 0 -537 212t-217.5 528t217.5 528t537 212t536.5 -212t217 -528t-217 -528t-536.5 -212zM897 1550h-209l217 297 l242 -100z" />
+<glyph unicode="&#xd4;" horiz-adv-x="1720" d="M860 1245q-213 0 -359.5 -151.5t-146.5 -367.5t146.5 -367.5t359.5 -151.5t359.5 151.5t146.5 367.5t-146.5 367.5t-359.5 151.5zM860.5 -14q-319.5 0 -537 212t-217.5 528t217.5 528t537 212t536.5 -212t217 -528t-217 -528t-536.5 -212zM750 1825h213l249 -275h-198 l-158 115l-158 -115h-198z" />
+<glyph unicode="&#xd5;" horiz-adv-x="1720" d="M860 1245q-213 0 -359.5 -151.5t-146.5 -367.5t146.5 -367.5t359.5 -151.5t359.5 151.5t146.5 367.5t-146.5 367.5t-359.5 151.5zM860.5 -14q-319.5 0 -537 212t-217.5 528t217.5 528t537 212t536.5 -212t217 -528t-217 -528t-536.5 -212zM1008 1544q-53 0 -148.5 48 t-122.5 48q-68 0 -69 -90h-152q0 119 48 193t134 74q55 0 153.5 -48.5t129.5 -48.5q61 0 61 90h154q-6 -266 -188 -266z" />
+<glyph unicode="&#xd6;" horiz-adv-x="1720" d="M570.5 1579q-35.5 37 -35.5 89t35.5 89t89 37t90 -36t36.5 -88t-36.5 -90t-90 -38t-89 37zM950 1579q-37 37 -37 89t37 89t89.5 37t89 -36t36.5 -88t-37.5 -90t-89 -38t-88.5 37zM860 1245q-213 0 -359.5 -151.5t-146.5 -367.5t146.5 -367.5t359.5 -151.5t359.5 151.5 t146.5 367.5t-146.5 367.5t-359.5 151.5zM860.5 -14q-319.5 0 -537 212t-217.5 528t217.5 528t537 212t536.5 -212t217 -528t-217 -528t-536.5 -212z" />
+<glyph unicode="&#xd7;" horiz-adv-x="1157" d="M580 907l348 350l129 -131l-346 -346l348 -350l-129 -131l-350 350l-351 -350l-131 131l351 350l-349 346l131 131z" />
+<glyph unicode="&#xd8;" horiz-adv-x="1720" d="M1614 727q0 -317 -217 -529t-537 -212q-109 0 -207 24l-116 -250h-205l149 320q-174 94 -274.5 265t-100.5 382q0 315 217.5 527t536.5 212q125 0 248 -39l111 234h204l-145 -313q156 -98 246 -261t90 -360zM860 1245q-213 0 -359.5 -151.5t-146.5 -368.5 q0 -133 60.5 -248t165.5 -186l434 930q-74 24 -154 24zM1366 725q0 250 -188 408l-428 -916q57 -10 110 -10q213 0 359.5 151.5t \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-regular.ttf b/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-regular.ttf
new file mode 100644
index 0000000..e3985ca
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-regular.ttf
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-regular.woff b/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-regular.woff
new file mode 100644
index 0000000..2e1467b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/css/montserrat-regular.woff
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/css/normalize.css b/common/src/main/webapp/thirdparty/icheck/demo/css/normalize.css
new file mode 100644
index 0000000..4d4d01d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/css/normalize.css
@@ -0,0 +1,527 @@
+/*! normalize.css v1.1.0 | MIT License | git.io/normalize */
+
+/* ==========================================================================
+ HTML5 display definitions
+ ========================================================================== */
+
+/**
+ * Correct `block` display not defined in IE 6/7/8/9 and Firefox 3.
+ */
+
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+main,
+nav,
+section,
+summary {
+ display: block;
+}
+
+/**
+ * Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3.
+ */
+
+audio,
+canvas,
+video {
+ display: inline-block;
+ *display: inline;
+ *zoom: 1;
+}
+
+/**
+ * Prevent modern browsers from displaying `audio` without controls.
+ * Remove excess height in iOS 5 devices.
+ */
+
+audio:not([controls]) {
+ display: none;
+ height: 0;
+}
+
+/**
+ * Address styling not present in IE 7/8/9, Firefox 3, and Safari 4.
+ * Known issue: no IE 6 support.
+ */
+
+[hidden] {
+ display: none;
+}
+
+/* ==========================================================================
+ Base
+ ========================================================================== */
+
+/**
+ * 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using
+ * `em` units.
+ * 2. Prevent iOS text size adjust after orientation change, without disabling
+ * user zoom.
+ */
+
+html {
+ font-size: 100%; /* 1 */
+ -webkit-text-size-adjust: 100%; /* 2 */
+ -ms-text-size-adjust: 100%; /* 2 */
+}
+
+/**
+ * Address `font-family` inconsistency between `textarea` and other form
+ * elements.
+ */
+
+html,
+button,
+input,
+select,
+textarea {
+ font-family: sans-serif;
+}
+
+/**
+ * Address margins handled incorrectly in IE 6/7.
+ */
+
+body {
+ margin: 0;
+}
+
+/* ==========================================================================
+ Links
+ ========================================================================== */
+
+/**
+ * Address `outline` inconsistency between Chrome and other browsers.
+ */
+
+a:focus {
+ outline: thin dotted;
+}
+
+/**
+ * Improve readability when focused and also mouse hovered in all browsers.
+ */
+
+a:active,
+a:hover {
+ outline: 0;
+}
+
+/* ==========================================================================
+ Typography
+ ========================================================================== */
+
+/**
+ * Address font sizes and margins set differently in IE 6/7.
+ * Address font sizes within `section` and `article` in Firefox 4+, Safari 5,
+ * and Chrome.
+ */
+
+h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+
+h2 {
+ font-size: 1.5em;
+ margin: 0.83em 0;
+}
+
+h3 {
+ font-size: 1.17em;
+ margin: 1em 0;
+}
+
+h4 {
+ font-size: 1em;
+ margin: 1.33em 0;
+}
+
+h5 {
+ font-size: 0.83em;
+ margin: 1.67em 0;
+}
+
+h6 {
+ font-size: 0.67em;
+ margin: 2.33em 0;
+}
+
+/**
+ * Address styling not present in IE 7/8/9, Safari 5, and Chrome.
+ */
+
+abbr[title] {
+ border-bottom: 1px dotted;
+}
+
+/**
+ * Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome.
+ */
+
+b,
+strong {
+ font-weight: bold;
+}
+
+blockquote {
+ margin: 1em 40px;
+}
+
+/**
+ * Address styling not present in Safari 5 and Chrome.
+ */
+
+dfn {
+ font-style: italic;
+}
+
+/**
+ * Address differences between Firefox and other browsers.
+ * Known issue: no IE 6/7 normalization.
+ */
+
+hr {
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ height: 0;
+}
+
+/**
+ * Address styling not present in IE 6/7/8/9.
+ */
+
+mark {
+ background: #ff0;
+ color: #000;
+}
+
+/**
+ * Address margins set differently in IE 6/7.
+ */
+
+p,
+pre {
+ margin: 1em 0;
+}
+
+/**
+ * Correct font family set oddly in IE 6, Safari 4/5, and Chrome.
+ */
+
+code,
+kbd,
+pre,
+samp {
+ font-family: monospace, serif;
+ _font-family: 'courier new', monospace;
+ font-size: 1em;
+}
+
+/**
+ * Improve readability of pre-formatted text in all browsers.
+ */
+
+pre {
+ white-space: pre;
+ white-space: pre-wrap;
+ word-wrap: break-word;
+}
+
+/**
+ * Address CSS quotes not supported in IE 6/7.
+ */
+
+q {
+ quotes: none;
+}
+
+/**
+ * Address `quotes` property not supported in Safari 4.
+ */
+
+q:before,
+q:after {
+ content: '';
+ content: none;
+}
+
+/**
+ * Address inconsistent and variable font size in all browsers.
+ */
+
+small {
+ font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` affecting `line-height` in all browsers.
+ */
+
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+sup {
+ top: -0.5em;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+/* ==========================================================================
+ Lists
+ ========================================================================== */
+
+/**
+ * Address margins set differently in IE 6/7.
+ */
+
+dl,
+menu,
+ol,
+ul {
+ margin: 1em 0;
+}
+
+dd {
+ margin: 0 0 0 40px;
+}
+
+/**
+ * Address paddings set differently in IE 6/7.
+ */
+
+menu,
+ol,
+ul {
+ padding: 0 0 0 40px;
+}
+
+/**
+ * Correct list images handled incorrectly in IE 7.
+ */
+
+nav ul,
+nav ol {
+ list-style: none;
+ list-style-image: none;
+}
+
+/* ==========================================================================
+ Embedded content
+ ========================================================================== */
+
+/**
+ * 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3.
+ * 2. Improve image quality when scaled in IE 7.
+ */
+
+img {
+ border: 0; /* 1 */
+ -ms-interpolation-mode: bicubic; /* 2 */
+}
+
+/**
+ * Correct overflow displayed oddly in IE 9.
+ */
+
+svg:not(:root) {
+ overflow: hidden;
+}
+
+/* ==========================================================================
+ Figures
+ ========================================================================== */
+
+/**
+ * Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11.
+ */
+
+figure {
+ margin: 0;
+}
+
+/* ==========================================================================
+ Forms
+ ========================================================================== */
+
+/**
+ * Correct margin displayed oddly in IE 6/7.
+ */
+
+form {
+ margin: 0;
+}
+
+/**
+ * Define consistent border, margin, and padding.
+ */
+
+fieldset {
+ border: 1px solid #c0c0c0;
+ margin: 0 2px;
+ padding: 0.35em 0.625em 0.75em;
+}
+
+/**
+ * 1. Correct color not being inherited in IE 6/7/8/9.
+ * 2. Correct text not wrapping in Firefox 3.
+ * 3. Correct alignment displayed oddly in IE 6/7.
+ */
+
+legend {
+ border: 0; /* 1 */
+ padding: 0;
+ white-space: normal; /* 2 */
+ *margin-left: -7px; /* 3 */
+}
+
+/**
+ * 1. Correct font size not being inherited in all browsers.
+ * 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5,
+ * and Chrome.
+ * 3. Improve appearance and consistency in all browsers.
+ */
+
+button,
+input,
+select,
+textarea {
+ font-size: 100%; /* 1 */
+ margin: 0; /* 2 */
+ vertical-align: baseline; /* 3 */
+ *vertical-align: middle; /* 3 */
+}
+
+/**
+ * Address Firefox 3+ setting `line-height` on `input` using `!important` in
+ * the UA stylesheet.
+ */
+
+button,
+input {
+ line-height: normal;
+}
+
+/**
+ * Address inconsistent `text-transform` inheritance for `button` and `select`.
+ * All other form control elements do not inherit `text-transform` values.
+ * Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+.
+ * Correct `select` style inheritance in Firefox 4+ and Opera.
+ */
+
+button,
+select {
+ text-transform: none;
+}
+
+/**
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
+ * and `video` controls.
+ * 2. Correct inability to style clickable `input` types in iOS.
+ * 3. Improve usability and consistency of cursor style between image-type
+ * `input` and others.
+ * 4. Remove inner spacing in IE 7 without affecting normal text inputs.
+ * Known issue: inner spacing remains in IE 6.
+ */
+
+button,
+html input[type="button"], /* 1 */
+input[type="reset"],
+input[type="submit"] {
+ -webkit-appearance: button; /* 2 */
+ cursor: pointer; /* 3 */
+ *overflow: visible; /* 4 */
+}
+
+/**
+ * Re-set default cursor for disabled elements.
+ */
+
+button[disabled],
+html input[disabled] {
+ cursor: default;
+}
+
+/**
+ * 1. Address box sizing set to content-box in IE 8/9.
+ * 2. Remove excess padding in IE 8/9.
+ * 3. Remove excess padding in IE 7.
+ * Known issue: excess padding remains in IE 6.
+ */
+
+input[type="checkbox"],
+input[type="radio"] {
+ box-sizing: border-box; /* 1 */
+ padding: 0; /* 2 */
+ *height: 13px; /* 3 */
+ *width: 13px; /* 3 */
+}
+
+/**
+ * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
+ * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
+ * (include `-moz` to future-proof).
+ */
+
+input[type="search"] {
+ -webkit-appearance: textfield; /* 1 */
+ -moz-box-sizing: content-box;
+ -webkit-box-sizing: content-box; /* 2 */
+ box-sizing: content-box;
+}
+
+/**
+ * Remove inner padding and search cancel button in Safari 5 and Chrome
+ * on OS X.
+ */
+
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+
+/**
+ * Remove inner padding and border in Firefox 3+.
+ */
+
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+ border: 0;
+ padding: 0;
+}
+
+/**
+ * 1. Remove default vertical scrollbar in IE 6/7/8/9.
+ * 2. Improve readability and alignment in all browsers.
+ */
+
+textarea {
+ overflow: auto; /* 1 */
+ vertical-align: top; /* 2 */
+}
+
+/* ==========================================================================
+ Tables
+ ========================================================================== */
+
+/**
+ * Remove most spacing between table cells.
+ */
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/index.html b/common/src/main/webapp/thirdparty/icheck/demo/index.html
new file mode 100644
index 0000000..6792088
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/index.html
@@ -0,0 +1,1544 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <title>Checkboxes and radio buttons customization (jQuery and Zepto) plugin</title>
+ <meta charset="utf-8">
+ <meta content="width=device-width" name="viewport">
+ <link href="./css/custom.css?v=1.0.2" rel="stylesheet">
+ <link href="../skins/all.css?v=1.0.2" rel="stylesheet">
+ <script src="./js/jquery.js"></script>
+ <script src="../icheck.js?v=1.0.2"></script>
+ <script src="./js/custom.min.js?v=1.0.2"></script>
+</head>
+<body>
+ <div class="layout clear">
+ <div class="header">
+ <h1>super customized checkboxes and radio buttons for jQuery &amp; Zepto</h1>
+ <h3>iCheck <span>v1.0.2</span></h3>
+ <strong>@<a href="http://twitter.com/fronteed/">Fronteed</a></strong>
+ </div>
+ <div class="features">
+ <div class="arrows">
+ <div class="bottom" data-to="demo"></div>
+ </div>
+ <h2>Plugin features</h2>
+ <ul>
+ <li>
+ <strong>Identical inputs across different browsers and devices</strong> &mdash; both <span class="self" data-to="download">desktop and mobile</span>
+ </li>
+ <li>
+ <strong>Touch devices support</strong> &mdash; iOS, Android, BlackBerry, Windows Phone, Amazon Kindle
+ </li>
+ <li>
+ <strong>Keyboard accessible inputs</strong> &mdash; <span class="mark">Tab</span>, <span class="mark">Spacebar</span>, <span class="mark">Arrow up/down</span> and other shortcuts
+ </li>
+ <li>
+ <strong>Screenreader accessible inputs</strong> &mdash; <a href="https://developer.mozilla.org/en-US/docs/Accessibility/ARIA" target="blank">ARIA</a> attributes for VoiceOver and others
+ </li>
+ <li>
+ <strong>Customization freedom</strong> &mdash; use any HTML and CSS to style inputs (try <span class="self" data-to="skins">6 Retina-ready skins</span>)
+ </li>
+ <li>
+ <strong>jQuery and Zepto</strong> JavaScript libraries support from single file
+ </li>
+ <li>
+ <strong>Lightweight size</strong> &mdash; 1 kb gzipped
+ </li>
+ <li class="offset">
+ <strong class="self" data-to="options">32 options</strong> to customize checkboxes and radio buttons
+ </li>
+ <li>
+ <strong class="self" data-to="callbacks">11 callbacks</strong> to handle changes
+ </li>
+ <li>
+ <strong class="self" data-to="methods">9 methods</strong> to make changes programmatically
+ </li>
+ <li>
+ Saves changes to original inputs, <span class="self" data-to="init">works carefully</span> with any selectors
+ </li>
+ </ul>
+ </div>
+ <div class="social clear">
+ <ul class="left">
+ <li>
+ <a href="http://github.com/fronteed/iCheck/">Download latest version</a>
+ </li>
+ </ul>
+ <ul class="right local">
+ <li>
+ <a href="http://twitter.com/fronteed/">Follow @fronteed</a>
+ </li>
+ <li>
+ <a href="https://twitter.com/intent/tweet?text=Highly customizable checkboxes and radio buttons&amp;url=http://fronteed.com/iCheck/&amp;via=fronteed&amp;hashtags=jQuery,Zepto">Share on Twitter</a>
+ </li>
+ <li>
+ <a href="https://github.com/fronteed/iCheck">Star on GitHub</a>
+ </li>
+ </ul>
+ </div>
+ <div class="demo-holder">
+ <h2 class="demo-title">Demo</h2>
+ <div class="demo">
+ <div class="arrows">
+ <div class="top" data-to="features"></div>
+ <div class="bottom" data-to="skins"></div>
+ </div>
+ <div class="demo-list clear">
+ <ul>
+ <li>
+ <input tabindex="1" type="checkbox" id="input-1">
+ <label for="input-1">Checkbox, <span>#input-1</span></label>
+ </li>
+ <li>
+ <input tabindex="2" type="checkbox" id="input-2" checked>
+ <label for="input-2">Checkbox, <span>#input-2</span></label>
+ </li>
+ </ul>
+ <ul>
+ <li>
+ <input tabindex="3" type="radio" id="input-3" name="demo-radio">
+ <label for="input-3">Radio button, <span>#input-3</span></label>
+ </li>
+ <li>
+ <input tabindex="4" type="radio" id="input-4" name="demo-radio" checked>
+ <label for="input-4">Radio button, <span>#input-4</span></label>
+ </li>
+ </ul>
+ <script>
+ $(document).ready(function(){
+ var callbacks_list = $('.demo-callbacks ul');
+ $('.demo-list input').on('ifCreated ifClicked ifChanged ifChecked ifUnchecked ifDisabled ifEnabled ifDestroyed', function(event){
+ callbacks_list.prepend('<li><span>#' + this.id + '</span> is ' + event.type.replace('if', '').toLowerCase() + '</li>');
+ }).iCheck({
+ checkboxClass: 'icheckbox_square-blue',
+ radioClass: 'iradio_square-blue',
+ increaseArea: '20%'
+ });
+ });
+ </script>
+ </div>
+ <dl class="demo-methods">
+ <dt>
+ <span class="self do-check">Add <span class="mark">checked</span> state to 1 and 3 inputs</span>
+ <span class="code">
+ <span class="self">show code</span>
+ </span>
+ </dt>
+ <dd>
+<pre class="markup">
+$('#input-1, #input-3').iCheck('check');
+</pre>
+ </dd>
+ <dt>
+ <span class="self do-uncheck">Remove <span class="mark">checked</span> state from 1 and 3 inputs</span>
+ <span class="code">
+ <span class="self">show code</span>
+ </span>
+ </dt>
+ <dd>
+<pre class="markup">
+$('#input-1, #input-3').iCheck('uncheck');
+</pre>
+ </dd>
+ <dt>
+ <span class="self do-disable">Add <span class="mark">disabled</span> state to 2 and 4 inputs</span>
+ <span class="code">
+ <span class="self">show code</span>
+ </span>
+ </dt>
+ <dd>
+<pre class="markup">
+$('#input-2, #input-4').iCheck('disable');
+</pre>
+ </dd>
+ <dt>
+ <span class="self do-enable">Remove <span class="mark">disabled</span> state from 2 and 4 inputs</span>
+ <span class="code">
+ <span class="self">show code</span>
+ </span>
+ </dt>
+ <dd>
+<pre class="markup">
+$('#input-2, #input-4').iCheck('enable');
+</pre>
+ </dd>
+ <dt>
+ <span class="self do-destroy">Remove all traces of iCheck</span>
+ <span class="code">
+ <span class="self">show code</span>
+ </span>
+ </dt>
+ <dd>
+<pre class="markup">
+$('input').iCheck('destroy');
+</pre>
+ </dd>
+ </dl>
+ <div class="demo-callbacks">
+ <h2>Callbacks</h2>
+ <ul></ul>
+ </div>
+ </div>
+ </div>
+ <div class="skins">
+ <h2>Skins</h2>
+ <div class="skin skin-minimal">
+ <div class="arrows">
+ <div class="top" data-to="demo"></div>
+ <div class="bottom" data-to="skin-square"></div>
+ </div>
+ <h3>Minimal skin</h3>
+ <dl class="clear">
+ <dd class="selected">
+ <div class="skin-section">
+ <h4>Live</h4>
+ <ul class="list">
+ <li>
+ <input tabindex="5" type="checkbox" id="minimal-checkbox-1">
+ <label for="minimal-checkbox-1">Checkbox 1</label>
+ </li>
+ <li>
+ <input tabindex="6" type="checkbox" id="minimal-checkbox-2" checked>
+ <label for="minimal-checkbox-2">Checkbox 2</label>
+ </li>
+ <li>
+ <input type="checkbox" id="minimal-checkbox-disabled" disabled>
+ <label for="minimal-checkbox-disabled">Disabled</label>
+ </li>
+ <li>
+ <input type="checkbox" id="minimal-checkbox-disabled-checked" checked disabled>
+ <label for="minimal-checkbox-disabled-checked">Disabled &amp; checked</label>
+ </li>
+ </ul>
+ <ul class="list">
+ <li>
+ <input tabindex="7" type="radio" id="minimal-radio-1" name="minimal-radio">
+ <label for="minimal-radio-1">Radio button 1</label>
+ </li>
+ <li>
+ <input tabindex="8" type="radio" id="minimal-radio-2" name="minimal-radio" checked>
+ <label for="minimal-radio-2">Radio button 2</label>
+ </li>
+ <li>
+ <input type="radio" id="minimal-radio-disabled" disabled>
+ <label for="minimal-radio-disabled">Disabled</label>
+ </li>
+ <li>
+ <input type="radio" id="minimal-radio-disabled-checked" checked disabled>
+ <label for="minimal-radio-disabled-checked">Disabled &amp; checked</label>
+ </li>
+ </ul>
+ <div class="colors clear">
+ <strong>Color schemes</strong>
+ <ul>
+ <li class="active" title="Black"></li>
+ <li class="red" title="Red"></li>
+ <li class="green" title="Green"></li>
+ <li class="blue" title="Blue"></li>
+ <li class="aero" title="Aero"></li>
+ <li class="grey" title="Grey"></li>
+ <li class="orange" title="Orange"></li>
+ <li class="yellow" title="Yellow"></li>
+ <li class="pink" title="Pink"></li>
+ <li class="purple" title="Purple"></li>
+ </ul>
+ </div>
+ </div>
+ <div class="skin-section skin-states">
+ <h4>States</h4>
+ <ul class="list">
+ <li>
+ <div class="state icheckbox_minimal"></div>
+ <div class="state iradio_minimal"></div>
+ Normal
+ </li>
+ <li>
+ <div class="state icheckbox_minimal hover"></div>
+ <div class="state iradio_minimal hover"></div>
+ Hover
+ </li>
+ <li>
+ <div class="state icheckbox_minimal checked"></div>
+ <div class="state iradio_minimal checked"></div>
+ Checked
+ </li>
+ <li>
+ <div class="state icheckbox_minimal disabled"></div>
+ <div class="state iradio_minimal disabled"></div>
+ Disabled
+ </li>
+ <li>
+ <div class="state icheckbox_minimal checked disabled"></div>
+ <div class="state iradio_minimal checked disabled"></div>
+ Disabled &amp; checked
+ </li>
+ </ul>
+ </div>
+ <script>
+ $(document).ready(function(){
+ $('.skin-minimal input').iCheck({
+ checkboxClass: 'icheckbox_minimal',
+ radioClass: 'iradio_minimal',
+ increaseArea: '20%'
+ });
+ });
+ </script>
+ </dd>
+ <dt class="selected">Demo</dt>
+ <dd>
+ <div class="skin-pre">
+ <p>
+ Make sure <a href="http://jquery.com" target="blank">jQuery v1.7+</a> (or <a href="http://github.com/madrobby/zepto#zepto-modules" target="blank">Zepto</a> [polyfill, event, data]) is loaded before the <span class="mark">icheck.js</span>.
+ </p>
+ </div>
+ <ol class="skin-usage">
+ <li>
+ Choose a color scheme, there are 10 different styles available:
+ <div class="schemes clear">
+ <ul>
+ <li><strong>Black</strong> &mdash; minimal.css</li>
+ <li><strong>Red</strong> &mdash; red.css</li>
+ <li><strong>Green</strong> &mdash; green.css</li>
+ <li><strong>Blue</strong> &mdash; blue.css</li>
+ <li><strong>Aero</strong> &mdash; aero.css</li>
+ </ul>
+ <ul>
+ <li><strong>Grey</strong> &mdash; grey.css</li>
+ <li><strong>Orange</strong> &mdash; orange.css</li>
+ <li><strong>Yellow</strong> &mdash; yellow.css</li>
+ <li><strong>Pink</strong> &mdash; pink.css</li>
+ <li><strong>Purple</strong> &mdash; purple.css</li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ Copy <span class="mark">/skins/minimal/</span> folder and <span class="mark">icheck.js</span> file to your site.
+ </li>
+ <li>
+ <p>Insert before <span class="mark">&lt;/head></span> in your HTML (replace <span class="mark">your-path</span> and <span class="mark">color-scheme</span>):</p>
+<pre class="markup">
+&lt;link href="your-path/minimal/color-scheme.css" rel="stylesheet">
+&lt;script src="your-path/icheck.js">&lt;/script>
+</pre>
+ <p>Example for a <strong>Red</strong> color scheme:</p>
+<pre class="markup">
+&lt;link href="your-path/minimal/red.css" rel="stylesheet">
+&lt;script src="your-path/icheck.js">&lt;/script>
+</pre>
+ </li>
+ <li>
+ <p>Add some checkboxes and radio buttons to your HTML:</p>
+<pre class="markup">
+&lt;input type="checkbox">
+&lt;input type="checkbox" checked>
+&lt;input type="radio" name="iCheck">
+&lt;input type="radio" name="iCheck" checked>
+</pre>
+ </li>
+ <li>
+ <p>Add JavaScript to your HTML to launch iCheck plugin:</p>
+<pre class="markup">
+&lt;script>
+$(document).ready(function(){
+ $('input').iCheck({
+ checkboxClass: 'icheckbox_minimal',
+ radioClass: 'iradio_minimal',
+ increaseArea: '20%' <span class="comment">// optional</span>
+ });
+});
+&lt;/script>
+</pre>
+ <p>For different from black color schemes use this code (example for <strong>Red</strong>):</p>
+<pre class="markup">
+&lt;script>
+$(document).ready(function(){
+ $('input').iCheck({
+ checkboxClass: 'icheckbox_minimal-red',
+ radioClass: 'iradio_minimal-red',
+ increaseArea: '20%' <span class="comment">// optional</span>
+ });
+});
+&lt;/script>
+</pre>
+ </li>
+ <li>Done.</li>
+ </ol>
+ </dd>
+ <dt>Usage</dt>
+ </dl>
+ </div>
+ <div class="skin skin-square">
+ <div class="arrows">
+ <div class="top" data-to="skin-minimal"></div>
+ <div class="bottom" data-to="skin-flat"></div>
+ </div>
+ <h3>Square skin</h3>
+ <dl class="clear">
+ <dd class="selected">
+ <div class="skin-section">
+ <h4>Live</h4>
+ <ul class="list">
+ <li>
+ <input tabindex="9" type="checkbox" id="square-checkbox-1">
+ <label for="square-checkbox-1">Checkbox 1</label>
+ </li>
+ <li>
+ <input tabindex="10" type="checkbox" id="square-checkbox-2" checked>
+ <label for="square-checkbox-2">Checkbox 2</label>
+ </li>
+ <li>
+ <input type="checkbox" id="square-checkbox-disabled" disabled>
+ <label for="square-checkbox-disabled">Disabled</label>
+ </li>
+ <li>
+ <input type="checkbox" id="square-checkbox-disabled-checked" checked disabled>
+ <label for="square-checkbox-disabled-checked">Disabled &amp; checked</label>
+ </li>
+ </ul>
+ <ul class="list">
+ <li>
+ <input tabindex="11" type="radio" id="square-radio-1" name="square-radio">
+ <label for="square-radio-1">Radio button 1</label>
+ </li>
+ <li>
+ <input tabindex="12" type="radio" id="square-radio-2" name="square-radio" checked>
+ <label for="square-radio-2">Radio button 2</label>
+ </li>
+ <li>
+ <input type="radio" id="square-radio-disabled" disabled>
+ <label for="square-radio-disabled">Disabled</label>
+ </li>
+ <li>
+ <input type="radio" id="square-radio-disabled-checked" checked disabled>
+ <label for="square-radio-disabled-checked">Disabled &amp; checked</label>
+ </li>
+ </ul>
+ <div class="colors clear">
+ <strong>Color schemes</strong>
+ <ul>
+ <li title="Black"></li>
+ <li class="red" title="Red"></li>
+ <li class="green active" title="Green"></li>
+ <li class="blue" title="Blue"></li>
+ <li class="aero" title="Aero"></li>
+ <li class="grey" title="Grey"></li>
+ <li class="orange" title="Orange"></li>
+ <li class="yellow" title="Yellow"></li>
+ <li class="pink" title="Pink"></li>
+ <li class="purple" title="Purple"></li>
+ </ul>
+ </div>
+ </div>
+ <div class="skin-section skin-states">
+ <h4>States</h4>
+ <ul class="list">
+ <li>
+ <div class="state icheckbox_square-green"></div>
+ <div class="state iradio_square-green"></div>
+ Normal
+ </li>
+ <li>
+ <div class="state icheckbox_square-green hover"></div>
+ <div class="state iradio_square-green hover"></div>
+ Hover
+ </li>
+ <li>
+ <div class="state icheckbox_square-green checked"></div>
+ <div class="state iradio_square-green checked"></div>
+ Checked
+ </li>
+ <li>
+ <div class="state icheckbox_square-green disabled"></div>
+ <div class="state iradio_square-green disabled"></div>
+ Disabled
+ </li>
+ <li>
+ <div class="state icheckbox_square-green checked disabled"></div>
+ <div class="state iradio_square-green checked disabled"></div>
+ Disabled &amp; checked
+ </li>
+ </ul>
+ </div>
+ <script>
+ $(document).ready(function(){
+ $('.skin-square input').iCheck({
+ checkboxClass: 'icheckbox_square-green',
+ radioClass: 'iradio_square-green',
+ increaseArea: '20%'
+ });
+ });
+ </script>
+ </dd>
+ <dt class="selected">Demo</dt>
+ <dd>
+ <div class="skin-pre">
+ <p>
+ Make sure <a href="http://jquery.com" target="blank">jQuery v1.7+</a> (or <a href="http://github.com/madrobby/zepto#zepto-modules" target="blank">Zepto</a> [polyfill, event, data]) is loaded before the <span class="mark">icheck.js</span>.
+ </p>
+ </div>
+ <ol class="skin-usage">
+ <li>
+ Choose a color scheme, there are 10 different styles available:
+ <div class="schemes clear">
+ <ul>
+ <li><strong>Black</strong> &mdash; square.css</li>
+ <li><strong>Red</strong> &mdash; red.css</li>
+ <li><strong>Green</strong> &mdash; green.css</li>
+ <li><strong>Blue</strong> &mdash; blue.css</li>
+ <li><strong>Aero</strong> &mdash; aero.css</li>
+ </ul>
+ <ul>
+ <li><strong>Grey</strong> &mdash; grey.css</li>
+ <li><strong>Orange</strong> &mdash; orange.css</li>
+ <li><strong>Yellow</strong> &mdash; yellow.css</li>
+ <li><strong>Pink</strong> &mdash; pink.css</li>
+ <li><strong>Purple</strong> &mdash; purple.css</li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ Copy <span class="mark">/skins/square/</span> folder and <span class="mark">icheck.js</span> file to your site.
+ </li>
+ <li>
+ <p>Insert before <span class="mark">&lt;/head></span> in your HTML (replace <span class="mark">your-path</span> and <span class="mark">color-scheme</span>):</p>
+<pre class="markup">
+&lt;link href="your-path/square/color-scheme.css" rel="stylesheet">
+&lt;script src="your-path/icheck.js">&lt;/script>
+</pre>
+ <p>Example for a <strong>Red</strong> color scheme:</p>
+<pre class="markup">
+&lt;link href="your-path/square/red.css" rel="stylesheet">
+&lt;script src="your-path/icheck.js">&lt;/script>
+</pre>
+ </li>
+ <li>
+ <p>Add some checkboxes and radio buttons to your HTML:</p>
+<pre class="markup">
+&lt;input type="checkbox">
+&lt;input type="checkbox" checked>
+&lt;input type="radio" name="iCheck">
+&lt;input type="radio" name="iCheck" checked>
+</pre>
+ </li>
+ <li>
+ <p>Add JavaScript to your HTML to launch iCheck plugin:</p>
+<pre class="markup">
+&lt;script>
+$(document).ready(function(){
+ $('input').iCheck({
+ checkboxClass: 'icheckbox_square',
+ radioClass: 'iradio_square',
+ increaseArea: '20%' <span class="comment">// optional</span>
+ });
+});
+&lt;/script>
+</pre>
+ <p>For different from black color schemes use this code (example for <strong>Red</strong>):</p>
+<pre class="markup">
+&lt;script>
+$(document).ready(function(){
+ $('input').iCheck({
+ checkboxClass: 'icheckbox_square-red',
+ radioClass: 'iradio_square-red',
+ increaseArea: '20%' <span class="comment">// optional</span>
+ });
+});
+&lt;/script>
+</pre>
+ </li>
+ <li>Done.</li>
+ </ol>
+ </dd>
+ <dt>Usage</dt>
+ </dl>
+ </div>
+ <div class="skin skin-flat">
+ <div class="arrows">
+ <div class="top" data-to="skin-square"></div>
+ <div class="bottom" data-to="skin-line"></div>
+ </div>
+ <h3>Flat skin</h3>
+ <dl class="clear">
+ <dd class="selected">
+ <div class="skin-section">
+ <h4>Live</h4>
+ <ul class="list">
+ <li>
+ <input tabindex="13" type="checkbox" id="flat-checkbox-1">
+ <label for="flat-checkbox-1">Checkbox 1</label>
+ </li>
+ <li>
+ <input tabindex="14" type="checkbox" id="flat-checkbox-2" checked>
+ <label for="flat-checkbox-2">Checkbox 2</label>
+ </li>
+ <li>
+ <input type="checkbox" id="flat-checkbox-disabled" disabled>
+ <label for="flat-checkbox-disabled">Disabled</label>
+ </li>
+ <li>
+ <input type="checkbox" id="flat-checkbox-disabled-checked" checked disabled>
+ <label for="flat-checkbox-disabled-checked">Disabled &amp; checked</label>
+ </li>
+ </ul>
+ <ul class="list">
+ <li>
+ <input tabindex="15" type="radio" id="flat-radio-1" name="flat-radio">
+ <label for="flat-radio-1">Radio button 1</label>
+ </li>
+ <li>
+ <input tabindex="16" type="radio" id="flat-radio-2" name="flat-radio" checked>
+ <label for="flat-radio-2">Radio button 2</label>
+ </li>
+ <li>
+ <input type="radio" id="flat-radio-disabled" disabled>
+ <label for="flat-radio-disabled">Disabled</label>
+ </li>
+ <li>
+ <input type="radio" id="flat-radio-disabled-checked" checked disabled>
+ <label for="flat-radio-disabled-checked">Disabled &amp; checked</label>
+ </li>
+ </ul>
+ <div class="colors clear">
+ <strong>Color schemes</strong>
+ <ul>
+ <li title="Black"></li>
+ <li class="red active" title="Red"></li>
+ <li class="green" title="Green"></li>
+ <li class="blue" title="Blue"></li>
+ <li class="aero" title="Aero"></li>
+ <li class="grey" title="Grey"></li>
+ <li class="orange" title="Orange"></li>
+ <li class="yellow" title="Yellow"></li>
+ <li class="pink" title="Pink"></li>
+ <li class="purple" title="Purple"></li>
+ </ul>
+ </div>
+ </div>
+ <div class="skin-section skin-states">
+ <h4>States</h4>
+ <ul class="list">
+ <li>
+ <div class="state icheckbox_flat-red"></div>
+ <div class="state iradio_flat-red"></div>
+ Normal
+ </li>
+ <li>
+ <div class="state icheckbox_flat-red checked"></div>
+ <div class="state iradio_flat-red checked"></div>
+ Checked
+ </li>
+ <li>
+ <div class="state icheckbox_flat-red disabled"></div>
+ <div class="state iradio_flat-red disabled"></div>
+ Disabled
+ </li>
+ <li>
+ <div class="state icheckbox_flat-red checked disabled"></div>
+ <div class="state iradio_flat-red checked disabled"></div>
+ Disabled &amp; checked
+ </li>
+ </ul>
+ </div>
+ <script>
+ $(document).ready(function(){
+ $('.skin-flat input').iCheck({
+ checkboxClass: 'icheckbox_flat-red',
+ radioClass: 'iradio_flat-red'
+ });
+ });
+ </script>
+ </dd>
+ <dt class="selected">Demo</dt>
+ <dd>
+ <div class="skin-pre">
+ <p>
+ Make sure <a href="http://jquery.com" target="blank">jQuery v1.7+</a> (or <a href="http://github.com/madrobby/zepto#zepto-modules" target="blank">Zepto</a> [polyfill, event, data]) is loaded before the <span class="mark">icheck.js</span>.
+ </p>
+ </div>
+ <ol class="skin-usage">
+ <li>
+ Choose a color scheme, there are 10 different styles available:
+ <div class="schemes clear">
+ <ul>
+ <li><strong>Black</strong> &mdash; flat.css</li>
+ <li><strong>Red</strong> &mdash; red.css</li>
+ <li><strong>Green</strong> &mdash; green.css</li>
+ <li><strong>Blue</strong> &mdash; blue.css</li>
+ <li><strong>Aero</strong> &mdash; aero.css</li>
+ </ul>
+ <ul>
+ <li><strong>Grey</strong> &mdash; grey.css</li>
+ <li><strong>Orange</strong> &mdash; orange.css</li>
+ <li><strong>Yellow</strong> &mdash; yellow.css</li>
+ <li><strong>Pink</strong> &mdash; pink.css</li>
+ <li><strong>Purple</strong> &mdash; purple.css</li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ Copy <span class="mark">/skins/flat/</span> folder and <span class="mark">icheck.js</span> file to your site.
+ </li>
+ <li>
+ <p>Insert before <span class="mark">&lt;/head></span> in your HTML (replace <span class="mark">your-path</span> and <span class="mark">color-scheme</span>):</p>
+<pre class="markup">
+&lt;link href="your-path/flat/color-scheme.css" rel="stylesheet">
+&lt;script src="your-path/icheck.js">&lt;/script>
+</pre>
+ <p>Example for a <strong>Red</strong> color scheme:</p>
+<pre class="markup">
+&lt;link href="your-path/flat/red.css" rel="stylesheet">
+&lt;script src="your-path/icheck.js">&lt;/script>
+</pre>
+ </li>
+ <li>
+ <p>Add some checkboxes and radio buttons to your HTML:</p>
+<pre class="markup">
+&lt;input type="checkbox">
+&lt;input type="checkbox" checked>
+&lt;input type="radio" name="iCheck">
+&lt;input type="radio" name="iCheck" checked>
+</pre>
+ </li>
+ <li>
+ <p>Add JavaScript to your HTML to launch iCheck plugin:</p>
+<pre class="markup">
+&lt;script>
+$(document).ready(function(){
+ $('input').iCheck({
+ checkboxClass: 'icheckbox_flat',
+ radioClass: 'iradio_flat'
+ });
+});
+&lt;/script>
+</pre>
+ <p>For different from black color schemes use this code (example for <strong>Red</strong>):</p>
+<pre class="markup">
+&lt;script>
+$(document).ready(function(){
+ $('input').iCheck({
+ checkboxClass: 'icheckbox_flat-red',
+ radioClass: 'iradio_flat-red'
+ });
+});
+&lt;/script>
+</pre>
+ </li>
+ <li>Done.</li>
+ </ol>
+ </dd>
+ <dt>Usage</dt>
+ </dl>
+ </div>
+ <div class="skin skin-line">
+ <div class="arrows">
+ <div class="top" data-to="skin-flat"></div>
+ <div class="bottom" data-to="skin-polaris"></div>
+ </div>
+ <h3>Line skin</h3>
+ <dl class="clear">
+ <dd class="selected">
+ <div class="skin-section">
+ <h4>Live</h4>
+ <ul class="list">
+ <li>
+ <input tabindex="17" type="checkbox" id="line-checkbox-1">
+ <label for="line-checkbox-1">Checkbox 1</label>
+ </li>
+ <li>
+ <input tabindex="18" type="checkbox" id="line-checkbox-2" checked>
+ <label for="line-checkbox-2">Checkbox 2</label>
+ </li>
+ <li>
+ <input type="checkbox" id="line-checkbox-disabled" disabled>
+ <label for="line-checkbox-disabled">Disabled</label>
+ </li>
+ <li>
+ <input type="checkbox" id="line-checkbox-disabled-checked" checked disabled>
+ <label for="line-checkbox-disabled-checked">Disabled &amp; checked</label>
+ </li>
+ </ul>
+ <ul class="list">
+ <li>
+ <input tabindex="19" type="radio" id="line-radio-1" name="line-radio">
+ <label for="line-radio-1">Radio button 1</label>
+ </li>
+ <li>
+ <input tabindex="20" type="radio" id="line-radio-2" name="line-radio" checked>
+ <label for="line-radio-2">Radio button 2</label>
+ </li>
+ <li>
+ <input type="radio" id="line-radio-disabled" disabled>
+ <label for="line-radio-disabled">Disabled</label>
+ </li>
+ <li>
+ <input type="radio" id="line-radio-disabled-checked" checked disabled>
+ <label for="line-radio-disabled-checked">Disabled &amp; checked</label>
+ </li>
+ </ul>
+ <div class="colors clear">
+ <strong>Color schemes</strong>
+ <ul>
+ <li title="Black"></li>
+ <li class="red" title="Red"></li>
+ <li class="green" title="Green"></li>
+ <li class="blue active" title="Blue"></li>
+ <li class="aero" title="Aero"></li>
+ <li class="grey" title="Grey"></li>
+ <li class="orange" title="Orange"></li>
+ <li class="yellow" title="Yellow"></li>
+ <li class="pink" title="Pink"></li>
+ <li class="purple" title="Purple"></li>
+ </ul>
+ </div>
+ </div>
+ <div class="skin-section skin-states">
+ <h4>States</h4>
+ <ul class="list">
+ <li>
+ <div class="state icheckbox_line-blue">
+ <div class="icheck_line-icon"></div>
+ Normal
+ </div>
+ </li>
+ <li>
+ <div class="state icheckbox_line-blue hover">
+ <div class="icheck_line-icon"></div>
+ Hover
+ </div>
+ </li>
+ <li>
+ <div class="state icheckbox_line-blue checked">
+ <div class="icheck_line-icon"></div>
+ Checked
+ </div>
+ </li>
+ <li>
+ <div class="state icheckbox_line-blue disabled">
+ <div class="icheck_line-icon"></div>
+ Disabled
+ </div>
+ </li>
+ <li>
+ <div class="state icheckbox_line-blue checked disabled">
+ <div class="icheck_line-icon"></div>
+ Disabled &amp; checked
+ </div>
+ </li>
+ </ul>
+ </div>
+ <script>
+ $(document).ready(function(){
+ $('.skin-line input').each(function(){
+ var self = $(this),
+ label = self.next(),
+ label_text = label.text();
+
+ label.remove();
+ self.iCheck({
+ checkboxClass: 'icheckbox_line-blue',
+ radioClass: 'iradio_line-blue',
+ insert: '<div class="icheck_line-icon"></div>' + label_text
+ });
+ });
+ });
+ </script>
+ </dd>
+ <dt class="selected">Demo</dt>
+ <dd>
+ <div class="skin-pre">
+ <p>
+ Make sure <a href="http://jquery.com" target="blank">jQuery v1.7+</a> (or <a href="http://github.com/madrobby/zepto#zepto-modules" target="blank">Zepto</a> [polyfill, event, data]) is loaded before the <span class="mark">icheck.js</span>.
+ </p>
+ </div>
+ <ol class="skin-usage">
+ <li>
+ Choose a color scheme, there are 10 different styles available:
+ <div class="schemes clear">
+ <ul>
+ <li><strong>Black</strong> &mdash; line.css</li>
+ <li><strong>Red</strong> &mdash; red.css</li>
+ <li><strong>Green</strong> &mdash; green.css</li>
+ <li><strong>Blue</strong> &mdash; blue.css</li>
+ <li><strong>Aero</strong> &mdash; aero.css</li>
+ </ul>
+ <ul>
+ <li><strong>Grey</strong> &mdash; grey.css</li>
+ <li><strong>Orange</strong> &mdash; orange.css</li>
+ <li><strong>Yellow</strong> &mdash; yellow.css</li>
+ <li><strong>Pink</strong> &mdash; pink.css</li>
+ <li><strong>Purple</strong> &mdash; purple.css</li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ Copy <span class="mark">/skins/line/</span> folder and <span class="mark">icheck.js</span> file to your site.
+ </li>
+ <li>
+ <p>Insert before <span class="mark">&lt;/head></span> in your HTML (replace <span class="mark">your-path</span> and <span class="mark">color-scheme</span>):</p>
+<pre class="markup">
+&lt;link href="your-path/line/color-scheme.css" rel="stylesheet">
+&lt;script src="your-path/icheck.js">&lt;/script>
+</pre>
+ <p>Example for a <strong>Red</strong> color scheme:</p>
+<pre class="markup">
+&lt;link href="your-path/line/red.css" rel="stylesheet">
+&lt;script src="your-path/icheck.js">&lt;/script>
+</pre>
+ </li>
+ <li>
+ <p>Add some checkboxes, radio buttons and labels to your HTML:</p>
+<pre class="markup">
+&lt;input type="checkbox">
+&lt;label>Checkbox 1&lt;/label>
+
+&lt;input type="checkbox" checked>
+&lt;label>Checkbox 2&lt;/label>
+
+&lt;input type="radio" name="iCheck">
+&lt;label>Radio button 1&lt;/label>
+
+&lt;input type="radio" name="iCheck" checked>
+&lt;label>Radio button 2&lt;/label>
+</pre>
+ </li>
+ <li>
+ <p>Add JavaScript to your HTML to launch iCheck plugin:</p>
+<pre class="markup">
+&lt;script>
+$(document).ready(function(){
+ $('input').each(function(){
+ var self = $(this),
+ label = self.next(),
+ label_text = label.text();
+
+ label.remove();
+ self.iCheck({
+ checkboxClass: 'icheckbox_line',
+ radioClass: 'iradio_line',
+ insert: '&lt;div class="icheck_line-icon">&lt;/div>' + label_text
+ });
+ });
+});
+&lt;/script>
+</pre>
+ <p>For different from black color schemes use this code (example for <strong>Red</strong>):</p>
+<pre class="markup">
+&lt;script>
+$(document).ready(function(){
+ $('input').each(function(){
+ var self = $(this),
+ label = self.next(),
+ label_text = label.text();
+
+ label.remove();
+ self.iCheck({
+ checkboxClass: 'icheckbox_line-red',
+ radioClass: 'iradio_line-red',
+ insert: '&lt;div class="icheck_line-icon">&lt;/div>' + label_text
+ });
+ });
+});
+&lt;/script>
+</pre>
+ </li>
+ <li>Done.</li>
+ </ol>
+ </dd>
+ <dt>Usage</dt>
+ </dl>
+ </div>
+ <div class="skin skin-polaris">
+ <div class="arrows">
+ <div class="top" data-to="skin-line"></div>
+ <div class="bottom" data-to="skin-futurico"></div>
+ </div>
+ <h3>Polaris skin</h3>
+ <dl class="clear">
+ <dd class="selected">
+ <div class="skin-section">
+ <h4>Live</h4>
+ <ul class="list">
+ <li>
+ <input tabindex="21" type="checkbox" id="polaris-checkbox-1">
+ <label for="polaris-checkbox-1">Checkbox 1</label>
+ </li>
+ <li>
+ <input tabindex="22" type="checkbox" id="polaris-checkbox-2" checked>
+ <label for="polaris-checkbox-2">Checkbox 2</label>
+ </li>
+ <li>
+ <input type="checkbox" id="polaris-checkbox-disabled" disabled>
+ <label for="polaris-checkbox-disabled">Disabled</label>
+ </li>
+ <li>
+ <input type="checkbox" id="polaris-checkbox-disabled-checked" checked disabled>
+ <label for="polaris-checkbox-disabled-checked">Disabled &amp; checked</label>
+ </li>
+ </ul>
+ <ul class="list">
+ <li>
+ <input tabindex="23" type="radio" id="polaris-radio-1" name="polaris-radio">
+ <label for="polaris-radio-1">Radio button 1</label>
+ </li>
+ <li>
+ <input tabindex="24" type="radio" id="polaris-radio-2" name="polaris-radio" checked>
+ <label for="polaris-radio-2">Radio button 2</label>
+ </li>
+ <li>
+ <input type="radio" id="polaris-radio-disabled" disabled>
+ <label for="polaris-radio-disabled">Disabled</label>
+ </li>
+ <li>
+ <input type="radio" id="polaris-radio-disabled-checked" checked disabled>
+ <label for="polaris-radio-disabled-checked">Disabled &amp; checked</label>
+ </li>
+ </ul>
+ </div>
+ <div class="skin-section skin-states">
+ <h4>States</h4>
+ <ul class="list">
+ <li>
+ <div class="state icheckbox_polaris"></div>
+ <div class="state iradio_polaris"></div>
+ Normal
+ </li>
+ <li>
+ <div class="state icheckbox_polaris hover"></div>
+ <div class="state iradio_polaris hover"></div>
+ Hover
+ </li>
+ <li>
+ <div class="state icheckbox_polaris checked"></div>
+ <div class="state iradio_polaris checked"></div>
+ Checked
+ </li>
+ <li>
+ <div class="state icheckbox_polaris disabled"></div>
+ <div class="state iradio_polaris disabled"></div>
+ Disabled
+ </li>
+ <li>
+ <div class="state icheckbox_polaris checked disabled"></div>
+ <div class="state iradio_polaris checked disabled"></div>
+ Disabled &amp; checked
+ </li>
+ </ul>
+ </div>
+ <script>
+ $(document).ready(function(){
+ $('.skin-polaris input').iCheck({
+ checkboxClass: 'icheckbox_polaris',
+ radioClass: 'iradio_polaris',
+ increaseArea: '-10%'
+ });
+ });
+ </script>
+ </dd>
+ <dt class="selected">Demo</dt>
+ <dd>
+ <div class="skin-pre">
+ <p>
+ Make sure <a href="http://jquery.com" target="blank">jQuery v1.7+</a> (or <a href="http://github.com/madrobby/zepto#zepto-modules" target="blank">Zepto</a> [polyfill, event, data]) is loaded before the <span class="mark">icheck.js</span>.
+ </p>
+ </div>
+ <ol class="skin-usage">
+ <li>
+ Copy <span class="mark">/skins/polaris/</span> folder and <span class="mark">icheck.js</span> file to your site.
+ </li>
+ <li>
+ <p>Insert before <span class="mark">&lt;/head></span> in your HTML (replace <span class="mark">your-path</span> and <span class="mark">color-scheme</span>):</p>
+<pre class="markup">
+&lt;link href="your-path/polaris/polaris.css" rel="stylesheet">
+&lt;script src="your-path/icheck.js">&lt;/script>
+</pre>
+ </li>
+ <li>
+ <p>Add some checkboxes and radio buttons to your HTML:</p>
+<pre class="markup">
+&lt;input type="checkbox">
+&lt;input type="checkbox" checked>
+&lt;input type="radio" name="iCheck">
+&lt;input type="radio" name="iCheck" checked>
+</pre>
+ </li>
+ <li>
+ <p>Add JavaScript to your HTML to launch iCheck plugin:</p>
+<pre class="markup">
+&lt;script>
+$(document).ready(function(){
+ $('input').iCheck({
+ checkboxClass: 'icheckbox_polaris',
+ radioClass: 'iradio_polaris',
+ increaseArea: '-10%' <span class="comment">// optional</span>
+ });
+});
+&lt;/script>
+</pre>
+ </li>
+ <li>Done.</li>
+ </ol>
+ </dd>
+ <dt>Usage</dt>
+ </dl>
+ </div>
+ <div class="skin skin-futurico">
+ <div class="arrows">
+ <div class="top" data-to="skin-polaris"></div>
+ <div class="bottom" data-to="usage"></div>
+ </div>
+ <h3>Futurico skin</h3>
+ <dl class="clear">
+ <dd class="selected">
+ <div class="skin-section">
+ <h4>Live</h4>
+ <ul class="list">
+ <li>
+ <input tabindex="25" type="checkbox" id="futurico-checkbox-1">
+ <label for="futurico-checkbox-1">Checkbox 1</label>
+ </li>
+ <li>
+ <input tabindex="26" type="checkbox" id="futurico-checkbox-2" checked>
+ <label for="futurico-checkbox-2">Checkbox 2</label>
+ </li>
+ <li>
+ <input type="checkbox" id="futurico-checkbox-disabled" disabled>
+ <label for="futurico-checkbox-disabled">Disabled</label>
+ </li>
+ <li>
+ <input type="checkbox" id="futurico-checkbox-disabled-checked" checked disabled>
+ <label for="futurico-checkbox-disabled-checked">Disabled &amp; checked</label>
+ </li>
+ </ul>
+ <ul class="list">
+ <li>
+ <input tabindex="27" type="radio" id="futurico-radio-1" name="futurico-radio">
+ <label for="futurico-radio-1">Radio button 1</label>
+ </li>
+ <li>
+ <input tabindex="28" type="radio" id="futurico-radio-2" name="futurico-radio" checked>
+ <label for="futurico-radio-2">Radio button 2</label>
+ </li>
+ <li>
+ <input type="radio" id="futurico-radio-disabled" disabled>
+ <label for="futurico-radio-disabled">Disabled</label>
+ </li>
+ <li>
+ <input type="radio" id="futurico-radio-disabled-checked" checked disabled>
+ <label for="futurico-radio-disabled-checked">Disabled &amp; checked</label>
+ </li>
+ </ul>
+ </div>
+ <div class="skin-section skin-states">
+ <h4>States</h4>
+ <ul class="list">
+ <li>
+ <div class="state icheckbox_futurico"></div>
+ <div class="state iradio_futurico"></div>
+ Normal
+ </li>
+ <li>
+ <div class="state icheckbox_futurico checked"></div>
+ <div class="state iradio_futurico checked"></div>
+ Checked
+ </li>
+ <li>
+ <div class="state icheckbox_futurico disabled"></div>
+ <div class="state iradio_futurico disabled"></div>
+ Disabled
+ </li>
+ <li>
+ <div class="state icheckbox_futurico checked disabled"></div>
+ <div class="state iradio_futurico checked disabled"></div>
+ Disabled &amp; checked
+ </li>
+ </ul>
+ </div>
+ <script>
+ $(document).ready(function(){
+ $('.skin-futurico input').iCheck({
+ checkboxClass: 'icheckbox_futurico',
+ radioClass: 'iradio_futurico',
+ increaseArea: '20%'
+ });
+ });
+ </script>
+ </dd>
+ <dt class="selected">Demo</dt>
+ <dd>
+ <div class="skin-pre">
+ <p>
+ Make sure <a href="http://jquery.com" target="blank">jQuery v1.7+</a> (or <a href="http://github.com/madrobby/zepto#zepto-modules" target="blank">Zepto</a> [polyfill, event, data]) is loaded before the <span class="mark">icheck.js</span>.
+ </p>
+ </div>
+ <ol class="skin-usage">
+ <li>
+ Copy <span class="mark">/skins/futurico/</span> folder and <span class="mark">icheck.js</span> file to your site.
+ </li>
+ <li>
+ <p>Insert before <span class="mark">&lt;/head></span> in your HTML (replace <span class="mark">your-path</span> and <span class="mark">color-scheme</span>):</p>
+<pre class="markup">
+&lt;link href="your-path/futurico/futurico.css" rel="stylesheet">
+&lt;script src="your-path/icheck.js">&lt;/script>
+</pre>
+ </li>
+ <li>
+ <p>Add some checkboxes and radio buttons to your HTML:</p>
+<pre class="markup">
+&lt;input type="checkbox">
+&lt;input type="checkbox" checked>
+&lt;input type="radio" name="iCheck">
+&lt;input type="radio" name="iCheck" checked>
+</pre>
+ </li>
+ <li>
+ <p>Add JavaScript to your HTML to launch iCheck plugin:</p>
+<pre class="markup">
+&lt;script>
+$(document).ready(function(){
+ $('input').iCheck({
+ checkboxClass: 'icheckbox_futurico',
+ radioClass: 'iradio_futurico',
+ increaseArea: '20%' <span class="comment">// optional</span>
+ });
+});
+&lt;/script>
+</pre>
+ </li>
+ <li>Done.</li>
+ </ol>
+ </dd>
+ <dt>Usage</dt>
+ </dl>
+ </div>
+ <div class="skins-info">
+ <p>All skins (except Line) are transparent, you may use them on any background.</p>
+ <p><a href="http://designmodo.com/square/?u=718" target="blank">Square</a>, <a href="http://designmodo.com/flat/?u=718" target="blank">Flat</a>, <a href="http://designmodo.com/?u=718" target="blank">Polaris</a> and <a href="http://designmodo.com/futuricopro/?u=718" target="blank">Futurico</a> skins are based on <a href="http://designmodo.com/shop/?u=718" target="blank">Designmodo's UI packs</a>.</p>
+ <p class="skins-banner">
+ <a href="http://designmodo.com/shop/?u=718" target="blank">Awesome UI packs</a>
+ </p>
+ </div>
+ </div>
+ <div class="usage">
+ <div class="arrows">
+ <div class="top" data-to="skin-futurico"></div>
+ <div class="bottom" data-to="comparison"></div>
+ </div>
+ <h2>Simple usage</h2>
+ <div class="usage-inner">
+ <p>
+ iCheck plugin works with checkboxes and radio buttons like a constructor.
+ <br><strong>It wraps each input with a div</strong>, which may be customized by you or using one of the <span class="self" data-to="skins">available skins</span>.
+ <br>You may also place inside that div some HTML code or text using <span class="mark">insert</span> option.
+ </p>
+ <p class="offset">For this HTML:</p>
+<pre class="markup">
+&lt;label>
+ &lt;input type="checkbox" name="quux[1]" disabled>
+ Foo
+&lt;/label>
+
+&lt;label for="baz[1]">Bar&lt;/label>
+&lt;input type="radio" name="quux[2]" id="baz[1]" checked>
+
+&lt;label for="baz[2]">Bar&lt;/label>
+&lt;input type="radio" name="quux[2]" id="baz[2]">
+</pre>
+ <p class="offset">With default options you'll get nearly this:</p>
+<pre class="markup">
+&lt;label>
+ &lt;div class="icheckbox disabled">
+ &lt;input type="checkbox" name="quux[1]" disabled>
+ &lt;/div>
+ Foo
+&lt;/label>
+
+&lt;label for="baz[1]">Bar&lt;/label>
+&lt;div class="iradio checked">
+ &lt;input type="radio" name="quux[2]" id="baz[1]" checked>
+&lt;/div>
+
+&lt;label for="baz[2]">Bar&lt;/label>
+&lt;div class="iradio">
+ &lt;input type="radio" name="quux[2]" id="baz[2]">
+&lt;/div>
+</pre>
+ <p><strong>By default, iCheck doesn't provide any CSS styles for wrapper divs</strong> (if you don't use <span class="self" data-to="skins">skins</span>).</p>
+ <h4 class="options">Options</h4>
+ <p>These options are default:</p>
+<pre class="markup">
+{
+ <span class="comment">// 'checkbox' or 'radio' to style only checkboxes or radio buttons, both by default</span>
+ handle: '',
+
+ <span class="comment">// base class added to customized checkboxes</span>
+ checkboxClass: 'icheckbox',
+
+ <span class="comment">// base class added to customized radio buttons</span>
+ radioClass: 'iradio',
+
+ <span class="comment">// class added on checked state (input.checked = true)</span>
+ checkedClass: 'checked',
+
+ <span class="comment">// if not empty, used instead of 'checkedClass' option (input type specific)</span>
+ checkedCheckboxClass: '',
+ checkedRadioClass: '',
+
+ <span class="comment">// if not empty, added as class name on unchecked state (input.checked = false)</span>
+ uncheckedClass: '',
+
+ <span class="comment">// if not empty, used instead of 'uncheckedClass' option (input type specific)</span>
+ uncheckedCheckboxClass: '',
+ uncheckedRadioClass: '',
+
+ <span class="comment">// class added on disabled state (input.disabled = true)</span>
+ disabledClass: 'disabled',
+
+ <span class="comment">// if not empty, used instead of 'disabledClass' option (input type specific)</span>
+ disabledCheckboxClass: '',
+ disabledRadioClass: '',
+
+ <span class="comment">// if not empty, added as class name on enabled state (input.disabled = false)</span>
+ enabledClass: '',
+
+ <span class="comment">// if not empty, used instead of 'enabledClass' option (input type specific)</span>
+ enabledCheckboxClass: '',
+ enabledRadioClass: '',
+
+ <span class="comment">// class added on <span class="self" data-to="indeterminate">indeterminate state</span> (input.indeterminate = true)</span>
+ indeterminateClass: 'indeterminate',
+
+ <span class="comment">// if not empty, used instead of 'indeterminateClass' option (input type specific)</span>
+ indeterminateCheckboxClass: '',
+ indeterminateRadioClass: '',
+
+ <span class="comment">// if not empty, added as class name on determinate state (input.indeterminate = false)</span>
+ determinateClass: '',
+
+ <span class="comment">// if not empty, used instead of 'determinateClass' option (input type specific)</span>
+ determinateCheckboxClass: '',
+ determinateRadioClass: '',
+
+ <span class="comment">// class added on hover state (pointer is moved onto input)</span>
+ hoverClass: 'hover',
+
+ <span class="comment">// class added on focus state (input has gained focus)</span>
+ focusClass: 'focus',
+
+ <span class="comment">// class added on active state (mouse button is pressed on input)</span>
+ activeClass: 'active',
+
+ <span class="comment">// adds hoverClass to customized input on label hover and labelHoverClass to label on input hover</span>
+ labelHover: true,
+
+ <span class="comment">// class added to label if labelHover set to true</span>
+ labelHoverClass: 'hover',
+
+ <span class="comment">// increase clickable area by given % (negative number to decrease)</span>
+ increaseArea: '',
+
+ <span class="comment">// true to set 'pointer' CSS cursor over enabled inputs and 'default' over disabled</span>
+ cursor: false,
+
+ <span class="comment">// set true to inherit original input's class name</span>
+ inheritClass: false,
+
+ <span class="comment">// if set to true, input's id is prefixed with 'iCheck-' and attached</span>
+ inheritID: false,
+
+ <span class="comment">// set true to activate ARIA support</span>
+ aria: false,
+
+ <span class="comment">// add HTML code or text inside customized input</span>
+ insert: ''
+}
+</pre>
+ <p>There's no need to copy and paste all of them, you can just mention the ones you need:</p>
+<pre class="markup">
+$('input').iCheck({
+ labelHover: false,
+ cursor: true
+});
+</pre>
+ <p>You can choose any class names and slyle them as you want.</p>
+ <h4 class="init">Initialize</h4>
+ <p>Just include <span class="mark">icheck.js</span> after <a href="http://jquery.com" target="blank">jQuery v1.7+</a> (or <a href="http://github.com/madrobby/zepto#zepto-modules" target="blank">Zepto</a> [polyfill, event, data]).</p>
+ <p>iCheck supports any selectors, but handles only checkboxes and radio buttons:</p>
+<pre class="markup">
+<span class="comment">// customize all inputs (will search for checkboxes and radio buttons)</span>
+$('input').iCheck();
+
+<span class="comment">// handle inputs only inside $('.block')</span>
+$('.block input').iCheck();
+
+<span class="comment">// handle only checkboxes inside $('.test')</span>
+$('.test input').iCheck({
+ handle: 'checkbox'
+});
+
+<span class="comment">// handle .vote class elements (will search inside the element, if it's not an input)</span>
+$('.vote').iCheck();
+
+<span class="comment">// you can also change options after inputs are customized</span>
+$('input.some').iCheck({
+ <span class="comment">// different options</span>
+});
+</pre>
+ <h4 class="indeterminate">Indeterminate</h4>
+ <p>HTML5 allows specifying <a href="http://css-tricks.com/indeterminate-checkboxes/" target="blank">indeterminate</a> ("partially" checked) state for checkboxes. iCheck supports it for both checkboxes and radio buttons.</p>
+ <p>You can make an input indeterminate through HTML using additional attributes (supported by iCheck). Both do the same job, but <span class="mark">indeterminate="true"</span> may not work in some browsers (like IE7):</p>
+<pre class="markup">
+<span class="comment">&lt;!-- indeterminate="true" --></span>
+&lt;input type="checkbox" indeterminate="true">
+&lt;input type="radio" indeterminate="true">
+
+<span class="comment">&lt;!-- determinate="false" --></span>
+&lt;input type="checkbox" determinate="false">
+&lt;input type="radio" determinate="false">
+</pre>
+ <p><span class="mark">indeterminate</span> and <span class="mark">determinate</span> <span class="self" data-to="methods">methods</span> can be used to toggle indeterminate state.</p>
+ <h4 class="callbacks">Callbacks</h4>
+ <p class="callbacks-info">iCheck provides plenty callbacks, which may be used to handle changes.</p>
+ <table>
+ <thead>
+ <tr>
+ <th>Callback name</th>
+ <td>When used</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <th>ifClicked</th>
+ <td>user clicked on a customized input or an assigned label</td>
+ </tr>
+ <tr>
+ <th>ifChanged</th>
+ <td>input's <span class="mark">checked</span>, <span class="mark">disabled</span> or <span class="mark">indeterminate</span> state is changed</td>
+ </tr>
+ <tr>
+ <th>ifChecked</th>
+ <td>input's state is changed to <span class="mark">checked</span></td>
+ </tr>
+ <tr>
+ <th>ifUnchecked</th>
+ <td><span class="mark">checked</span> state is removed</td>
+ </tr>
+ <tr>
+ <th>ifToggled</th>
+ <td>input's <span class="mark">checked</span> state is changed</td>
+ </tr>
+ <tr>
+ <th>ifDisabled</th>
+ <td>input's state is changed to <span class="mark">disabled</span></td>
+ </tr>
+ <tr>
+ <th>ifEnabled</th>
+ <td><span class="mark">disabled</span> state is removed</td>
+ </tr>
+ <tr>
+ <th>ifIndeterminate</th>
+ <td>input's state is changed to <span class="mark">indeterminate</span></td>
+ </tr>
+ <tr>
+ <th>ifDeterminate</th>
+ <td><span class="mark">indeterminate</span> state is removed</td>
+ </tr>
+ <tr>
+ <th>ifCreated</th>
+ <td>input is just customized</td>
+ </tr>
+ <tr>
+ <th>ifDestroyed</th>
+ <td>customization is just removed</td>
+ </tr>
+ </tbody>
+ </table>
+ <p>Use <span class="mark">on()</span> method to bind them to inputs:<p>
+<pre class="markup">
+$('input').on('ifChecked', function(event){
+ alert(event.type + ' callback');
+});
+</pre>
+ <p><span class="mark">ifCreated</span> callback should be binded before plugin init.</p>
+ <h4 class="methods">Methods</h4>
+ <p class="methods-info">These methods can be used to make changes programmatically (any selectors can be used):</p>
+ <p><span class="mark">$('input').iCheck('check');</span> &mdash; change input's state to <span class="mark">checked</span></p>
+ <p><span class="mark">$('input').iCheck('uncheck');</span> &mdash; remove <span class="mark">checked</span> state</p>
+ <p><span class="mark">$('input').iCheck('toggle');</span> &mdash; toggle <span class="mark">checked</span> state</p>
+ <p><span class="mark">$('input').iCheck('disable');</span> &mdash; change input's state to <span class="mark">disabled</span></p>
+ <p><span class="mark">$('input').iCheck('enable');</span> &mdash; remove <span class="mark">disabled</span> state</p>
+ <p><span class="mark">$('input').iCheck('indeterminate');</span> &mdash; change input's state to <span class="mark">indeterminate</span></p>
+ <p><span class="mark">$('input').iCheck('determinate');</span> &mdash; remove <span class="mark">indeterminate</span> state</p>
+ <p><span class="mark">$('input').iCheck('update');</span> &mdash; apply input changes, which were done outside the plugin</p>
+ <p><span class="mark">$('input').iCheck('destroy');</span> &mdash; remove all traces of iCheck</p>
+ <p class="methods-callback">You may also specify some function, that will be executed on each method call:</p>
+<pre class="markup">
+$('input').iCheck('check', function(){
+ alert('Well done, Sir');
+});
+</pre>
+ <p class="issue-tracker">Feel free to <a href="http://github.com/fronteed/iCheck/">fork and submit pull-request</a> or <a href="http://github.com/fronteed/iCheck/issues">submit an issue</a> if you find something not working.</p>
+ </div>
+ </div>
+ <div class="benefits comparison">
+ <div class="arrows">
+ <div class="top" data-to="usage"></div>
+ <div class="bottom" data-to="download"></div>
+ </div>
+ <h2>Comparison</h2>
+ <div class="benefits-inner">
+ <p>iCheck is created to avoid routine of reinventing the wheel when working with checkboxes and radio buttons. It provides an expected identical result for the huge number of browsers, devices and their versions. Callbacks and methods can be used to easily handle and make changes at customized inputs.</p>
+ <p>There are some CSS3 ways available to style checkboxes and radio buttons, like <a href="http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/quick-tip-easy-css3-checkboxes-and-radio-buttons/" target="blank">this one</a>. You have to know about some of the disadvantages of similar methods:</p>
+ <ul>
+ <li>
+ &mdash; inputs are keyboard inaccessible, since <span class="mark">display: none</span> or <span class="mark">visibility: hidden</span> used to hide them
+ </li>
+ <li>
+ &mdash; poor browser support
+ </li>
+ <li>
+ &mdash; multiple bugs on mobile devices
+ </li>
+ <li>
+ &mdash; tricky, harder to maintain CSS code
+ </li>
+ <li>
+ &mdash; JavaScript is still needed to fix specific issues
+ </li>
+ </ul>
+ <p>While CSS3 method is quite limited solution, iCheck is made to be an everyday replacement covering most of the tasks.</p>
+ </div>
+ </div>
+ <div class="browsers">
+ <h2>Browser support</h2>
+ <div class="browsers-inner">
+ <p>iCheck is verified to work in Internet Explorer 6+, Firefox 2+, Opera 9+, Google Chrome and Safari browsers. Should also work in many others.</p>
+ <p>Mobile browsers (like Opera mini, Chrome mobile, Safari mobile, Android browser, Silk and others) are also supported. Tested on iOS (iPad, iPhone, iPod), Android, BlackBerry and Windows Phone devices.</p>
+ </div>
+ </div>
+ <div class="download">
+ <a href="http://github.com/fronteed/iCheck/">Download plugin</a>
+ </div>
+ <div class="license">iCheck plugin is released under the <a href="http://en.wikipedia.org/wiki/MIT_License" target="blank">MIT License</a>. Feel free to use it in personal and commercial projects.</div>
+ </div>
+ <div class="footer">
+ <div class="footer-inner clear">
+ <ul class="local">
+ <li>
+ <a href="https://github.com/fronteed/iCheck">Star on Github</a>
+ </li>
+ <li>
+ <a href="https://twitter.com/intent/tweet?text=Highly customizable checkboxes and radio buttons&amp;url=http://fronteed.com/iCheck/&amp;via=fronteed&amp;hashtags=jQuery,Zepto">Share on Twitter</a>
+ </li>
+ <li>
+ <a href="http://twitter.com/fronteed/">Follow @fronteed</a>
+ </li>
+ </ul>
+ <div class="code">
+ Created by <a href="http://fronteed.com/">Damir Sultanov</a>
+ </div>
+ </div>
+ </div>
+ <a href="http://github.com/fronteed/iCheck/" class="fork-me">Fork me on GitHub</a>
+</body>
+</html>
+
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/js/custom.js b/common/src/main/webapp/thirdparty/icheck/demo/js/custom.js
new file mode 100644
index 0000000..eace30e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/js/custom.js
@@ -0,0 +1,109 @@
+$(document).ready(function() {
+ var hash = window.location.hash.replace('#', '');
+
+ if (hash && $('.' + hash).length) {
+ var point = $('.' + hash).offset().top - 40;
+
+ if (window.Zepto) {
+ window.scrollTo(0, point);
+ } else {
+ $(window).scrollTop($('.' + hash).offset().top - 40);
+ };
+ };
+
+ $('.skin dt').click(function() {
+ $(this).siblings().removeClass('selected').end().prev('dd').andSelf().addClass('selected');
+ });
+
+ $('.arrows .top, .arrows .bottom, .features .self, .skins-info .self, .usage .self').click(function(event) {
+ var target = $(this).data('to'),
+ target_offset = $('.' + target).offset().top;
+
+ event.preventDefault();
+ window.location.hash = target;
+
+ if (window.Zepto) {
+ window.scrollTo(0, target_offset - 40);
+ } else {
+ $('html, body').stop().animate({scrollTop: target_offset - 40}, 600);
+ };
+ });
+
+ $('.colors li').click(function() {
+ var self = $(this);
+
+ if (!self.hasClass('active')) {
+ self.siblings().removeClass('active');
+
+ var skin = self.closest('.skin'),
+ color = self.attr('class') ? '-' + self.attr('class') : '',
+ checkbox = skin.data('icheckbox'),
+ radio = skin.data('iradio'),
+ checkbox_default = 'icheckbox_minimal',
+ radio_default = 'iradio_minimal';
+
+ if (skin.hasClass('skin-square')) {
+ checkbox_default = 'icheckbox_square', radio_default = 'iradio_square';
+ checkbox == undefined && (checkbox = 'icheckbox_square-green', radio = 'iradio_square-green');
+ };
+
+ if (skin.hasClass('skin-flat')) {
+ checkbox_default = 'icheckbox_flat', radio_default = 'iradio_flat';
+ checkbox == undefined && (checkbox = 'icheckbox_flat-red', radio = 'iradio_flat-red');
+ };
+
+ if (skin.hasClass('skin-line')) {
+ checkbox_default = 'icheckbox_line', radio_default = 'iradio_line';
+ checkbox == undefined && (checkbox = 'icheckbox_line-blue', radio = 'iradio_line-blue');
+ };
+
+ checkbox == undefined && (checkbox = checkbox_default, radio = radio_default);
+
+ skin.find('input, .skin-states .state').each(function() {
+ var element = $(this).hasClass('state') ? $(this) : $(this).parent(),
+ element_class = element.attr('class').replace(checkbox, checkbox_default + color).replace(radio, radio_default + color);
+
+ element.attr('class', element_class);
+ });
+
+ skin.data('icheckbox', checkbox_default + color);
+ skin.data('iradio', radio_default + color);
+ self.addClass('active');
+ };
+ });
+
+ $('.demo-methods dt .self').click(function() {
+ var self = $(this),
+ self_class = self.attr('class').replace('self ', '');
+
+ switch (self_class) {
+ case 'do-check':
+ $('#input-1, #input-3').iCheck('check');
+ break;
+ case 'do-uncheck':
+ $('#input-1, #input-3').iCheck('uncheck');
+ break;
+ case 'do-disable':
+ $('#input-2, #input-4').iCheck('disable');
+ break;
+ case 'do-enable':
+ $('#input-2, #input-4').iCheck('enable');
+ break;
+ case 'do-destroy':
+ $('.demo-list input').iCheck('destroy');
+ break;
+ default:
+ var text = self.hasClass('active') ? 'show code' : 'hide code';
+
+ self.toggleClass('active').text(text);
+
+ if (window.Zepto) {
+ $(this).closest('dt').next().toggle();
+ } else {
+ $(this).closest('dt').next().slideToggle(200);
+ };
+
+ break;
+ };
+ });
+}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/js/custom.min.js b/common/src/main/webapp/thirdparty/icheck/demo/js/custom.min.js
new file mode 100644
index 0000000..cd9ab21
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/js/custom.min.js
@@ -0,0 +1,5 @@
+$(document).ready(function(){var h=window.location.hash.replace("#","");if(h&&$("."+h).length){var k=$("."+h).offset().top-40;window.Zepto?window.scrollTo(0,k):$(window).scrollTop($("."+h).offset().top-40)}$(".skin dt").click(function(){$(this).siblings().removeClass("selected").end().prev("dd").andSelf().addClass("selected")});$(".arrows .top, .arrows .bottom, .features .self, .skins-info .self, .usage .self").click(function(b){var a=$(this).data("to"),d=$("."+a).offset().top;b.preventDefault();
+window.location.hash=a;window.Zepto?window.scrollTo(0,d-40):$("html, body").stop().animate({scrollTop:d-40},600)});$(".colors li").click(function(){var b=$(this);if(!b.hasClass("active")){b.siblings().removeClass("active");var a=b.closest(".skin"),d=b.attr("class")?"-"+b.attr("class"):"",c=a.data("icheckbox"),g=a.data("iradio"),e="icheckbox_minimal",f="iradio_minimal";a.hasClass("skin-square")&&(e="icheckbox_square",f="iradio_square",void 0==c&&(c="icheckbox_square-green",g="iradio_square-green"));
+a.hasClass("skin-flat")&&(e="icheckbox_flat",f="iradio_flat",void 0==c&&(c="icheckbox_flat-red",g="iradio_flat-red"));a.hasClass("skin-line")&&(e="icheckbox_line",f="iradio_line",void 0==c&&(c="icheckbox_line-blue",g="iradio_line-blue"));void 0==c&&(c=e,g=f);a.find("input, .skin-states .state").each(function(){var a=$(this).hasClass("state")?$(this):$(this).parent(),b=a.attr("class").replace(c,e+d).replace(g,f+d);a.attr("class",b)});a.data("icheckbox",e+d);a.data("iradio",f+d);b.addClass("active")}});
+$(".demo-methods dt .self").click(function(){var b=$(this);switch(b.attr("class").replace("self ","")){case "do-check":$("#input-1, #input-3").iCheck("check");break;case "do-uncheck":$("#input-1, #input-3").iCheck("uncheck");break;case "do-disable":$("#input-2, #input-4").iCheck("disable");break;case "do-enable":$("#input-2, #input-4").iCheck("enable");break;case "do-destroy":$(".demo-list input").iCheck("destroy");break;default:var a=b.hasClass("active")?"show code":"hide code";b.toggleClass("active").text(a);
+window.Zepto?$(this).closest("dt").next().toggle():$(this).closest("dt").next().slideToggle(200)}})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/js/jquery.js b/common/src/main/webapp/thirdparty/icheck/demo/js/jquery.js
new file mode 100644
index 0000000..569f77d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/js/jquery.js
@@ -0,0 +1,4 @@
+/*!
+ * jQuery v1.8.3 jquery.com | jquery.org/license
+ */
+(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r<i;r++)v.event.add(t,n,u[n][r])}o.data&&(o.data=v.extend({},o.data))}function Ot(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n==="object"?(t.parentNode&&(t.outerHTML=e.outerHTML),v.support.html5Clone&&e.innerHTML&&!v.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):n==="input"&&Et.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):n==="option"?t.selected=e.defaultSelected:n==="input"||n==="textarea"?t.defaultValue=e.defaultValue:n==="script"&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(v.expando)}function Mt(e){return typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName("*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll("*"):[]}function _t(e){Et.test(e.type)&&(e.defaultChecked=e.checked)}function Qt(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Jt.length;while(i--){t=Jt[i]+n;if(t in e)return t}return r}function Gt(e,t){return e=t||e,v.css(e,"display")==="none"||!v.contains(e.ownerDocument,e)}function Yt(e,t){var n,r,i=[],s=0,o=e.length;for(;s<o;s++){n=e[s];if(!n.style)continue;i[s]=v._data(n,"olddisplay"),t?(!i[s]&&n.style.display==="none"&&(n.style.display=""),n.style.display===""&&Gt(n)&&(i[s]=v._data(n,"olddisplay",nn(n.nodeName)))):(r=Dt(n,"display"),!i[s]&&r!=="none"&&v._data(n,"olddisplay",r))}for(s=0;s<o;s++){n=e[s];if(!n.style)continue;if(!t||n.style.display==="none"||n.style.display==="")n.style.display=t?i[s]||"":"none"}return e}function Zt(e,t,n){var r=Rt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function en(e,t,n,r){var i=n===(r?"border":"content")?4:t==="width"?1:0,s=0;for(;i<4;i+=2)n==="margin"&&(s+=v.css(e,n+$t[i],!0)),r?(n==="content"&&(s-=parseFloat(Dt(e,"padding"+$t[i]))||0),n!=="margin"&&(s-=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0)):(s+=parseFloat(Dt(e,"padding"+$t[i]))||0,n!=="padding"&&(s+=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0));return s}function tn(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=!0,s=v.support.boxSizing&&v.css(e,"boxSizing")==="border-box";if(r<=0||r==null){r=Dt(e,t);if(r<0||r==null)r=e.style[t];if(Ut.test(r))return r;i=s&&(v.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+en(e,t,n||(s?"border":"content"),i)+"px"}function nn(e){if(Wt[e])return Wt[e];var t=v("<"+e+">").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write("<!doctype html><html><body>"),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u<a;u++)r=o[u],s=/^\+/.test(r),s&&(r=r.substr(1)||"*"),i=e[r]=e[r]||[],i[s?"unshift":"push"](n)}}function kn(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u,a=e[s],f=0,l=a?a.length:0,c=e===Sn;for(;f<l&&(c||!u);f++)u=a[f](n,r,i),typeof u=="string"&&(!c||o[u]?u=t:(n.dataTypes.unshift(u),u=kn(e,n,r,i,u,o)));return(c||!u)&&!o["*"]&&(u=kn(e,n,r,i,"*",o)),u}function Ln(e,n){var r,i,s=v.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);i&&v.extend(!0,e,i)}function An(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(s in l)s in r&&(n[l[s]]=r[s]);while(f[0]==="*")f.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("content-type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){f.unshift(s);break}if(f[0]in r)o=f[0];else{for(s in r){if(!f[0]||e.converters[s+" "+f[0]]){o=s;break}u||(u=s)}o=o||u}if(o)return o!==f[0]&&f.unshift(o),r[o]}function On(e,t){var n,r,i,s,o=e.dataTypes.slice(),u=o[0],a={},f=0;e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(o[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=o[++f];)if(i!=="*"){if(u!=="*"&&u!==i){n=a[u+" "+i]||a["* "+i];if(!n)for(r in a){s=r.split(" ");if(s[1]===i){n=a[u+" "+s[0]]||a["* "+s[0]];if(n){n===!0?n=a[r]:a[r]!==!0&&(i=s[0],o.splice(f--,0,i));break}}}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(l){return{state:"parsererror",error:n?l:"No conversion from "+u+" to "+i}}}u=i}return{state:"success",data:t}}function Fn(){try{return new e.XMLHttpRequest}catch(t){}}function In(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function $n(){return setTimeout(function(){qn=t},0),qn=v.now()}function Jn(e,t){v.each(t,function(t,n){var r=(Vn[t]||[]).concat(Vn["*"]),i=0,s=r.length;for(;i<s;i++)if(r[i].call(e,t,n))return})}function Kn(e,t,n){var r,i=0,s=0,o=Xn.length,u=v.Deferred().always(function(){delete a.elem}),a=function(){var t=qn||$n(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,i=1-r,s=0,o=f.tweens.length;for(;s<o;s++)f.tweens[s].run(i);return u.notifyWith(e,[f,i,n]),i<1&&o?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:v.extend({},t),opts:v.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:qn||$n(),duration:n.duration,tweens:[],createTween:function(t,n,r){var i=v.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(i),i},stop:function(t){var n=0,r=t?f.tweens.length:0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;Qn(l,f.opts.specialEasing);for(;i<o;i++){r=Xn[i].call(f,e,l,f.opts);if(r)return r}return Jn(f,l),v.isFunction(f.opts.start)&&f.opts.start.call(e,f),v.fx.timer(v.extend(a,{anim:f,queue:f.opts.queue,elem:e})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function Qn(e,t){var n,r,i,s,o;for(n in e){r=v.camelCase(n),i=t[r],s=e[n],v.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=v.cssHooks[r];if(o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}}function Gn(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},m=[],g=e.nodeType&&Gt(e);n.queue||(l=v._queueHooks(e,"fx"),l.unqueued==null&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,v.queue(e,"fx").length||l.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],v.css(e,"display")==="inline"&&v.css(e,"float")==="none"&&(!v.support.inlineBlockNeedsLayout||nn(e.nodeName)==="inline"?p.display="inline-block":p.zoom=1)),n.overflow&&(p.overflow="hidden",v.support.shrinkWrapBlocks||h.done(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t){s=t[r];if(Un.exec(s)){delete t[r],a=a||s==="toggle";if(s===(g?"hide":"show"))continue;m.push(r)}}o=m.length;if(o){u=v._data(e,"fxshow")||v._data(e,"fxshow",{}),"hidden"in u&&(g=u.hidden),a&&(u.hidden=!g),g?v(e).show():h.done(function(){v(e).hide()}),h.done(function(){var t;v.removeData(e,"fxshow",!0);for(t in d)v.style(e,t,d[t])});for(r=0;r<o;r++)i=m[r],f=h.createTween(i,g?u[i]:0),d[i]=u[i]||v.style(e,i),i in u||(u[i]=f.start,g&&(f.end=f.start,f.start=i==="width"||i==="height"?1:0))}}function Yn(e,t,n,r,i){return new Yn.prototype.init(e,t,n,r,i)}function Zn(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=$t[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function tr(e){return v.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n,r,i=e.document,s=e.location,o=e.navigator,u=e.jQuery,a=e.$,f=Array.prototype.push,l=Array.prototype.slice,c=Array.prototype.indexOf,h=Object.prototype.toString,p=Object.prototype.hasOwnProperty,d=String.prototype.trim,v=function(e,t){return new v.fn.init(e,t,n)},m=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,g=/\S/,y=/\s+/,b=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,w=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a<f;a++)if((e=arguments[a])!=null)for(n in e){r=u[n],i=e[n];if(u===i)continue;l&&i&&(v.isPlainObject(i)||(s=v.isArray(i)))?(s?(s=!1,o=r&&v.isArray(r)?r:[]):o=r&&v.isPlainObject(r)?r:{},u[n]=v.extend(l,o,i)):i!==t&&(u[n]=i)}return u},v.extend({noConflict:function(t){return e.$===v&&(e.$=a),t&&e.jQuery===v&&(e.jQuery=u),v},isReady:!1,readyWait:1,holdReady:function(e){e?v.readyWait++:v.ready(!0)},ready:function(e){if(e===!0?--v.readyWait:v.isReady)return;if(!i.body)return setTimeout(v.ready,1);v.isReady=!0;if(e!==!0&&--v.readyWait>0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s<o;)if(n.apply(e[s++],r)===!1)break}else if(u){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;s<o;)if(n.call(e[s],s,e[s++])===!1)break;return e},trim:d&&!d.call("\ufeff\u00a0")?function(e){return e==null?"":d.call(e)}:function(e){return e==null?"":(e+"").replace(b,"")},makeArray:function(e,t){var n,r=t||[];return e!=null&&(n=v.type(e),e.length==null||n==="string"||n==="function"||n==="regexp"||v.isWindow(e)?f.call(r,e):v.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(c)return c.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if(typeof r=="number")for(;s<r;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,n,r){var i,s,o=[],u=0,a=e.length,f=e instanceof v||a!==t&&typeof a=="number"&&(a>0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u<a;u++)i=n(e[u],u,r),i!=null&&(o[o.length]=i);else for(s in e)i=n(e[s],s,r),i!=null&&(o[o.length]=i);return o.concat.apply([],o)},guid:1,proxy:function(e,n){var r,i,s;return typeof n=="string"&&(r=e[n],n=e,e=r),v.isFunction(e)?(i=l.call(arguments,2),s=function(){return e.apply(n,i.concat(l.call(arguments)))},s.guid=e.guid=e.guid||v.guid++,s):t},access:function(e,n,r,i,s,o,u){var a,f=r==null,l=0,c=e.length;if(r&&typeof r=="object"){for(l in r)v.access(e,n,l,r[l],1,o,i);s=1}else if(i!==t){a=u===t&&v.isFunction(i),f&&(a?(a=n,n=function(e,t,n){return a.call(v(e),n)}):(n.call(e,i),n=null));if(n)for(;l<c;l++)n(e[l],r,a?i.call(e[l],l,n(e[l],r)):i,u);s=1}return s?e:f?n.call(e):c?n(e[0],r):o},now:function(){return(new Date).getTime()}}),v.ready.promise=function(t){if(!r){r=v.Deferred();if(i.readyState==="complete")setTimeout(v.ready,1);else if(i.addEventListener)i.addEventListener("DOMContentLoaded",A,!1),e.addEventListener("load",v.ready,!1);else{i.attachEvent("onreadystatechange",A),e.attachEvent("onload",v.ready);var n=!1;try{n=e.frameElement==null&&i.documentElement}catch(s){}n&&n.doScroll&&function o(){if(!v.isReady){try{n.doScroll("left")}catch(e){return setTimeout(o,50)}v.ready()}}()}}return r.promise(t)},v.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){O["[object "+t+"]"]=t.toLowerCase()}),n=v(i);var M={};v.Callbacks=function(e){e=typeof e=="string"?M[e]||_(e):v.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){n=e.memory&&t,r=!0,u=s||0,s=0,o=a.length,i=!0;for(;a&&u<o;u++)if(a[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}i=!1,a&&(f?f.length&&l(f.shift()):n?a=[]:c.disable())},c={add:function(){if(a){var t=a.length;(function r(t){v.each(t,function(t,n){var i=v.type(n);i==="function"?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&i!=="string"&&r(n)})})(arguments),i?o=a.length:n&&(s=t,l(n))}return this},remove:function(){return a&&v.each(arguments,function(e,t){var n;while((n=v.inArray(t,a,n))>-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t<r;t++)n[t]&&v.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}}),v.support=function(){var t,n,r,s,o,u,a,f,l,c,h,p=i.createElement("div");p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="<table><tr><td></td><td>t</td></tr></table>",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="<div></div>",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i<s;i++)delete r[t[i]];if(!(n?B:v.isEmptyObject)(r))return}}if(!n){delete u[a].data;if(!B(u[a]))return}o?v.cleanData([e],!0):v.support.deleteExpando||u!=u.window?delete u[a]:u[a]=null},_data:function(e,t,n){return v.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&v.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),v.fn.extend({data:function(e,n){var r,i,s,o,u,a=this[0],f=0,l=null;if(e===t){if(this.length){l=v.data(a);if(a.nodeType===1&&!v._data(a,"parsedAttrs")){s=a.attributes;for(u=s.length;f<u;f++)o=s[f].name,o.indexOf("data-")||(o=v.camelCase(o.substring(5)),H(a,o,l[o]));v._data(a,"parsedAttrs",!0)}}return l}return typeof e=="object"?this.each(function(){v.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",i=r[1]+"!",v.access(this,function(n){if(n===t)return l=this.triggerHandler("getData"+i,[r[0]]),l===t&&a&&(l=v.data(a,e),l=H(a,e,l)),l===t&&r[1]?this.data(r[0]):l;r[1]=n,this.each(function(){var t=v(this);t.triggerHandler("setData"+i,r),v.data(this,e,n),t.triggerHandler("changeData"+i,r)})},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?v.queue(this[0],e):n===t?this:this.each(function(){var t=v.queue(this,e,n);v._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&v.dequeue(this,e)})},dequeue:function(e){return this.each(function(){v.dequeue(this,e)})},delay:function(e,t){return e=v.fx?v.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=v.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};typeof e!="string"&&(n=e,e=t),e=e||"fx";while(u--)r=v._data(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var j,F,I,q=/[\t\r\n]/g,R=/\r/g,U=/^(?:button|input)$/i,z=/^(?:button|input|object|select|textarea)$/i,W=/^a(?:rea|)$/i,X=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,V=v.support.getSetAttribute;v.fn.extend({attr:function(e,t){return v.access(this,v.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{s=" "+i.className+" ";for(o=0,u=t.length;o<u;o++)s.indexOf(" "+t[o]+" ")<0&&(s+=t[o]+" ");i.className=v.trim(s)}}}return this},removeClass:function(e){var n,r,i,s,o,u,a;if(v.isFunction(e))return this.each(function(t){v(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e=="string"||e===t){n=(e||"").split(y);for(u=0,a=this.length;u<a;u++){i=this[u];if(i.nodeType===1&&i.className){r=(" "+i.className+" ").replace(q," ");for(s=0,o=n.length;s<o;s++)while(r.indexOf(" "+n[s]+" ")>=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(q," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a<u;a++){n=r[a];if((n.selected||a===i)&&(v.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!v.nodeName(n.parentNode,"optgroup"))){t=v(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n=v.makeArray(t);return v(e).find("option").each(function(){this.selected=v.inArray(v(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o<r.length;o++)i=r[o],i&&(n=v.propFix[i]||i,s=X.test(i),s||v.attr(e,i,""),e.removeAttribute(V?i:n),s&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(U.test(e.nodeName)&&e.parentNode)v.error("type property can't be changed");else if(!v.support.radioValue&&t==="radio"&&v.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return j&&v.nodeName(e,"button")?j.get(e,t):t in e?e.value:null},set:function(e,t,n){if(j&&v.nodeName(e,"button"))return j.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;return o=u!==1||!v.isXMLDoc(e),o&&(n=v.propFix[n]||n,s=v.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):z.test(e.nodeName)||W.test(e.nodeName)&&e.href?0:t}}}}),F={get:function(e,n){var r,i=v.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?v.removeAttr(e,n):(r=v.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},V||(I={name:!0,id:!0,coords:!0},j=v.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(I[n]?r.value!=="":r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=i.createAttribute(n),e.setAttributeNode(r)),r.value=t+""}},v.each(["width","height"],function(e,t){v.attrHooks[t]=v.extend(v.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),v.attrHooks.contenteditable={get:j.get,set:function(e,t,n){t===""&&(t="false"),j.set(e,t,n)}}),v.support.hrefNormalized||v.each(["href","src","width","height"],function(e,n){v.attrHooks[n]=v.extend(v.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),v.support.style||(v.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=t+""}}),v.support.optSelected||(v.propHooks.selected=v.extend(v.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),v.support.enctype||(v.propFix.enctype="encoding"),v.support.checkOn||v.each(["radio","checkbox"],function(){v.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),v.each(["radio","checkbox"],function(){v.valHooks[this]=v.extend(v.valHooks[this],{set:function(e,t){if(v.isArray(t))return e.checked=v.inArray(v(e).val(),t)>=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f<n.length;f++){l=J.exec(n[f])||[],c=l[1],h=(l[2]||"").split(".").sort(),g=v.event.special[c]||{},c=(s?g.delegateType:g.bindType)||c,g=v.event.special[c]||{},p=v.extend({type:c,origType:l[1],data:i,handler:r,guid:r.guid,selector:s,needsContext:s&&v.expr.match.needsContext.test(s),namespace:h.join(".")},d),m=a[c];if(!m){m=a[c]=[],m.delegateCount=0;if(!g.setup||g.setup.call(e,i,h,u)===!1)e.addEventListener?e.addEventListener(c,u,!1):e.attachEvent&&e.attachEvent("on"+c,u)}g.add&&(g.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),s?m.splice(m.delegateCount++,0,p):m.push(p),v.event.global[c]=!0}e=null},global:{},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,m,g=v.hasData(e)&&v._data(e);if(!g||!(h=g.events))return;t=v.trim(Z(t||"")).split(" ");for(s=0;s<t.length;s++){o=J.exec(t[s])||[],u=a=o[1],f=o[2];if(!u){for(u in h)v.event.remove(e,u+t[s],n,r,!0);continue}p=v.event.special[u]||{},u=(r?p.delegateType:p.bindType)||u,d=h[u]||[],l=d.length,f=f?new RegExp("(^|\\.)"+f.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(c=0;c<d.length;c++)m=d[c],(i||a===m.origType)&&(!n||n.guid===m.guid)&&(!f||f.test(m.namespace))&&(!r||r===m.selector||r==="**"&&m.selector)&&(d.splice(c--,1),m.selector&&d.delegateCount--,p.remove&&p.remove.call(e,m));d.length===0&&l!==d.length&&((!p.teardown||p.teardown.call(e,f,g.handle)===!1)&&v.removeEvent(e,u,g.handle),delete h[u])}v.isEmptyObject(h)&&(delete g.handle,v.removeData(e,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,s,o){if(!s||s.nodeType!==3&&s.nodeType!==8){var u,a,f,l,c,h,p,d,m,g,y=n.type||n,b=[];if(Y.test(y+v.event.triggered))return;y.indexOf("!")>=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f<m.length&&!n.isPropagationStopped();f++)l=m[f][0],n.type=m[f][1],d=(v._data(l,"events")||{})[n.type]&&v._data(l,"handle"),d&&d.apply(l,r),d=h&&l[h],d&&v.acceptData(l)&&d.apply&&d.apply(l,r)===!1&&n.preventDefault();return n.type=y,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(s.ownerDocument,r)===!1)&&(y!=="click"||!v.nodeName(s,"a"))&&v.acceptData(s)&&h&&s[y]&&(y!=="focus"&&y!=="blur"||n.target.offsetWidth!==0)&&!v.isWindow(s)&&(c=s[h],c&&(s[h]=null),v.event.triggered=y,s[y](),v.event.triggered=t,c&&(s[h]=c)),n.result}return},dispatch:function(n){n=v.event.fix(n||e.event);var r,i,s,o,u,a,f,c,h,p,d=(v._data(this,"events")||{})[n.type]||[],m=d.delegateCount,g=l.call(arguments),y=!n.exclusive&&!n.namespace,b=v.event.special[n.type]||{},w=[];g[0]=n,n.delegateTarget=this;if(b.preDispatch&&b.preDispatch.call(this,n)===!1)return;if(m&&(!n.button||n.type!=="click"))for(s=n.target;s!=this;s=s.parentNode||this)if(s.disabled!==!0||n.type!=="click"){u={},f=[];for(r=0;r<m;r++)c=d[r],h=c.selector,u[h]===t&&(u[h]=c.needsContext?v(h,this).index(s)>=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r<w.length&&!n.isPropagationStopped();r++){a=w[r],n.currentTarget=a.elem;for(i=0;i<a.matches.length&&!n.isImmediatePropagationStopped();i++){c=a.matches[i];if(y||!n.namespace&&!c.namespace||n.namespace_re&&n.namespace_re.test(c.namespace))n.data=c.data,n.handleObj=c,o=((v.event.special[c.origType]||{}).handle||c.handler).apply(a.elem,g),o!==t&&(n.result=o,o===!1&&(n.preventDefault(),n.stopPropagation()))}}return b.postDispatch&&b.postDispatch.call(this,n),n.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,s,o,u=n.button,a=n.fromElement;return e.pageX==null&&n.clientX!=null&&(r=e.target.ownerDocument||i,s=r.documentElement,o=r.body,e.pageX=n.clientX+(s&&s.scrollLeft||o&&o.scrollLeft||0)-(s&&s.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(s&&s.scrollTop||o&&o.scrollTop||0)-(s&&s.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),!e.which&&u!==t&&(e.which=u&1?1:u&2?3:u&4?2:0),e}},fix:function(e){if(e[v.expando])return e;var t,n,r=e,s=v.event.fixHooks[e.type]||{},o=s.props?this.props.concat(s.props):this.props;e=v.Event(r);for(t=o.length;t;)n=o[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||i),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,r):e},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){v.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=v.extend(new v.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?v.event.trigger(i,null,t):v.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},v.event.handle=v.event.dispatch,v.removeEvent=i.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]=="undefined"&&(e[r]=null),e.detachEvent(r,n))},v.Event=function(e,t){if(!(this instanceof v.Event))return new v.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?tt:et):this.type=e,t&&v.extend(this,t),this.timeStamp=e&&e.timeStamp||v.now(),this[v.expando]=!0},v.Event.prototype={preventDefault:function(){this.isDefaultPrevented=tt;var e=this.originalEvent;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=tt;var e=this.originalEvent;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=tt,this.stopPropagation()},isDefaultPrevented:et,isPropagationStopped:et,isImmediatePropagationStopped:et},v.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){v.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj,o=s.selector;if(!i||i!==r&&!v.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),v.support.submitBubbles||(v.event.special.submit={setup:function(){if(v.nodeName(this,"form"))return!1;v.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=v.nodeName(n,"input")||v.nodeName(n,"button")?n.form:t;r&&!v._data(r,"_submit_attached")&&(v.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),v._data(r,"_submit_attached",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&v.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(v.nodeName(this,"form"))return!1;v.event.remove(this,"._submit")}}),v.support.changeBubbles||(v.event.special.change={setup:function(){if($.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")v.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),v.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),v.event.simulate("change",this,e,!0)});return!1}v.event.add(this,"beforeactivate._change",function(e){var t=e.target;$.test(t.nodeName)&&!v._data(t,"_change_attached")&&(v.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&v.event.simulate("change",this.parentNode,e,!0)}),v._data(t,"_change_attached",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return v.event.remove(this,"._change"),!$.test(this.nodeName)}}),v.support.focusinBubbles||v.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){v.event.simulate(t,e.target,v.event.fix(e),!0)};v.event.special[t]={setup:function(){n++===0&&i.addEventListener(e,r,!0)},teardown:function(){--n===0&&i.removeEventListener(e,r,!0)}}}),v.fn.extend({on:function(e,n,r,i,s){var o,u;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(u in e)this.on(u,n,r,e[u],s);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=et;else if(!i)return this;return s===1&&(o=i,i=function(e){return v().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=v.guid++)),this.each(function(){v.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,v(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if(typeof e=="object"){for(s in e)this.off(s,n,e[s]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=et),this.each(function(){v.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return v(this.context).on(e,this.selector,t,n),this},die:function(e,t){return v(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){v.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return v.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||v.guid++,r=0,i=function(n){var i=(v._data(this,"lastToggle"+e.guid)||0)%r;return v._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),v.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){v.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u<a;u++)if(s=e[u])if(!n||n(s,r,i))o.push(s),f&&t.push(u);return o}function ct(e,t,n,r,i,s){return r&&!r[d]&&(r=ct(r)),i&&!i[d]&&(i=ct(i,s)),N(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||dt(t||"*",u.nodeType?[u]:u,[]),m=e&&(s||!t)?lt(v,h,e,u,a):v,g=n?i||(s?e:d||r)?[]:o:m;n&&n(m,g,u,a);if(r){f=lt(g,p),r(f,[],u,a),l=f.length;while(l--)if(c=f[l])g[p[l]]=!(m[p[l]]=c)}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?T.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a<s;a++)if(n=i.relative[e[a].type])h=[at(ft(h),n)];else{n=i.filter[e[a].type].apply(null,e[a].matches);if(n[d]){r=++a;for(;r<s;r++)if(i.relative[e[r].type])break;return ct(a>1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a<r&&ht(e.slice(a,r)),r<s&&ht(e=e.slice(r)),r<s&&e.join(""))}h.push(n)}return ft(h)}function pt(e,t){var r=t.length>0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r<i;r++)nt(e,t[r],n);return n}function vt(e,t,n,r,s){var o,u,f,l,c,h=ut(e),p=h.length;if(!r&&h.length===1){u=h[0]=h[0].slice(0);if(u.length>2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;t<n;t++)if(this[t]===e)return t;return-1},N=function(e,t){return e[d]=t==null||t,e},C=function(){var e={},t=[];return N(function(n,r){return t.push(n)>i.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="<a name='"+d+"'></a><div name='"+d+"'></div>",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:st(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:st(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},f=y.compareDocumentPosition?function(e,t){return e===t?(l=!0,0):(!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition:e.compareDocumentPosition(t)&4)?-1:1}:function(e,t){if(e===t)return l=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,u=t.parentNode,a=o;if(o===u)return ot(e,t);if(!o)return-1;if(!u)return 1;while(a)i.unshift(a),a=a.parentNode;a=u;while(a)s.unshift(a),a=a.parentNode;n=i.length,r=s.length;for(var f=0;f<n&&f<r;f++)if(i[f]!==s[f])return ot(i[f],s[f]);return f===n?ot(e,s[f],-1):ot(i[f],t,1)},[0,0].sort(f),h=!l,nt.uniqueSort=function(e){var t,n=[],r=1,i=0;l=h,e.sort(f);if(l){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e},nt.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},a=nt.compile=function(e,t){var n,r=[],i=[],s=A[d][e+" "];if(!s){t||(t=ut(e)),n=t.length;while(n--)s=ht(t[n]),s[d]?r.push(s):i.push(s);s=A(e,pt(i,r))}return s},g.querySelectorAll&&function(){var e,t=vt,n=/'|\\/g,r=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,i=[":focus"],s=[":active"],u=y.matchesSelector||y.mozMatchesSelector||y.webkitMatchesSelector||y.oMatchesSelector||y.msMatchesSelector;K(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="<p test=''></p>",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="<input type='hidden'/>",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t<n;t++)if(v.contains(u[t],this))return!0});o=this.pushStack("","find",e);for(t=0,n=this.length;t<n;t++){r=o.length,v.find(e,this[t],o);if(t>0)for(i=r;i<o.length;i++)for(s=0;s<r;s++)if(o[s]===o[i]){o.splice(i--,1);break}}return o},has:function(e){var t,n=v(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(v.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1),"not",e)},filter:function(e){return this.pushStack(ft(this,e,!0),"filter",e)},is:function(e){return!!e&&(typeof e=="string"?st.test(e)?v(e,this.context).index(this[0])>=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r<i;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&n.nodeType!==11){if(o?o.index(n)>-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/<tbody/i,gt=/<|&#?\w+;/,yt=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,wt=new RegExp("<(?:"+ct+")[\\s/>]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,Nt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X<div>","</div>"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return ut(this[0])?this.length?this.pushStack(v(v.isFunction(e)?e():e),"replaceWith",e):this:v.isFunction(e)?this.each(function(t){var n=v(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!="string"&&(e=v(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;v(this).remove(),t?v(t).before(e):v(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,s,o,u,a=0,f=e[0],l=[],c=this.length;if(!v.support.checkClone&&c>1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a<c;a++)r.call(n&&v.nodeName(this[a],"table")?Lt(this[a],"tbody"):this[a],a===u?o:v.clone(o,!0,!0))}o=s=null,l.length&&v.each(l,function(e,t){t.src?v.ajax?v.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):v.error("no ajax"):v.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Tt,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),v.buildFragment=function(e,n,r){var s,o,u,a=e[0];return n=n||i,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n,e.length===1&&typeof a=="string"&&a.length<512&&n===i&&a.charAt(0)==="<"&&!bt.test(a)&&(v.support.checkClone||!St.test(a))&&(v.support.html5Clone||!wt.test(a))&&(o=!0,s=v.fragments[a],u=s!==t),s||(s=n.createDocumentFragment(),v.clean(e,n,s,r),o&&(v.fragments[a]=u&&s)),{fragment:s,cacheable:o}},v.fragments={},v.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){v.fn[e]=function(n){var r,i=0,s=[],o=v(n),u=o.length,a=this.length===1&&this[0].parentNode;if((a==null||a&&a.nodeType===11&&a.childNodes.length===1)&&u===1)return o[t](this[0]),this;for(;i<u;i++)r=(i>0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1></$2>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]==="<table>"&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("<div>").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],Vn[n]=Vn[n]||[],Vn[n].unshift(t)},prefilter:function(e,t){t?Xn.unshift(e):Xn.push(e)}}),v.Tween=Yn,Yn.prototype={constructor:Yn,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(v.cssNumber[n]?"":"px")},cur:function(){var e=Yn.propHooks[this.prop];return e&&e.get?e.get(this):Yn.propHooks._default.get(this)},run:function(e){var t,n=Yn.propHooks[this.prop];return this.options.duration?this.pos=t=v.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Yn.propHooks._default.set(this),this}},Yn.prototype.init.prototype=Yn.prototype,Yn.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=v.css(e.elem,e.prop,!1,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){v.fx.step[e.prop]?v.fx.step[e.prop](e):e.elem.style&&(e.elem.style[v.cssProps[e.prop]]!=null||v.cssHooks[e.prop])?v.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Yn.propHooks.scrollTop=Yn.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},v.each(["toggle","show","hide"],function(e,t){var n=v.fn[t];v.fn[t]=function(r,i,s){return r==null||typeof r=="boolean"||!e&&v.isFunction(r)&&v.isFunction(i)?n.apply(this,arguments):this.animate(Zn(t,!0),r,i,s)}}),v.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Gt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=v.isEmptyObject(e),s=v.speed(t,n,r),o=function(){var t=Kn(this,v.extend({},e),s);i&&t.stop(!0)};return i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=e!=null&&e+"queueHooks",s=v.timers,o=v._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Wn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&v.dequeue(this,e)})}}),v.each({slideDown:Zn("show"),slideUp:Zn("hide"),slideToggle:Zn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){v.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),v.speed=function(e,t,n){var r=e&&typeof e=="object"?v.extend({},e):{complete:n||!n&&t||v.isFunction(e)&&e,duration:e,easing:n&&t||t&&!v.isFunction(t)&&t};r.duration=v.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in v.fx.speeds?v.fx.speeds[r.duration]:v.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){v.isFunction(r.old)&&r.old.call(this),r.queue&&v.dequeue(this,r.queue)},r},v.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},v.timers=[],v.fx=Yn.prototype.init,v.fx.tick=function(){var e,n=v.timers,r=0;qn=v.now();for(;r<n.length;r++)e=n[r],!e()&&n[r]===e&&n.splice(r--,1);n.length||v.fx.stop(),qn=t},v.fx.timer=function(e){e()&&v.timers.push(e)&&!Rn&&(Rn=setInterval(v.fx.tick,v.fx.interval))},v.fx.interval=13,v.fx.stop=function(){clearInterval(Rn),Rn=null},v.fx.speeds={slow:600,fast:200,_default:400},v.fx.step={},v.expr&&v.expr.filters&&(v.expr.filters.animated=function(e){return v.grep(v.timers,function(t){return e===t.elem}).length});var er=/^(?:body|html)$/i;v.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){v.offset.setOffset(this,e,t)});var n,r,i,s,o,u,a,f={top:0,left:0},l=this[0],c=l&&l.ownerDocument;if(!c)return;return(r=c.body)===l?v.offset.bodyOffset(l):(n=c.documentElement,v.contains(n,l)?(typeof l.getBoundingClientRect!="undefined"&&(f=l.getBoundingClientRect()),i=tr(c),s=n.clientTop||r.clientTop||0,o=n.clientLeft||r.clientLeft||0,u=i.pageYOffset||n.scrollTop,a=i.pageXOffset||n.scrollLeft,{top:f.top+u-s,left:f.left+a-o}):f)},v.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return v.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(v.css(e,"marginTop"))||0,n+=parseFloat(v.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=v.css(e,"position");r==="static"&&(e.style.position="relative");var i=v(e),s=i.offset(),o=v.css(e,"top"),u=v.css(e,"left"),a=(r==="absolute"||r==="fixed")&&v.inArray("auto",[o,u])>-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window);Function(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(q," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a<u;a++){n=r[a];if((n.selected||a===i)&&(v.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!v.nodeName(n.parentNode,"optgroup"))){t=v(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n=v.makeArray(t);return v(e).find("option").each(function(){this.selected=v.inArray(v(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o<r.length;o++)i=r[o],i&&(n=v.propFix[i]||i,s=X.test(i),s||v.attr(e,i,""),e.removeAttribute(V?i:n),s&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(U.test(e.nodeName)&&e.parentNode)v.error("type property can't be changed");else if(!v.support.radioValue&&t==="radio"&&v.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return j&&v.nodeName(e,"button")?j.get(e,t):t in e?e.value:null},set:function(e,t,n){if(j&&v.nodeName(e,"button"))return j.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;return o=u!==1||!v.isXMLDoc(e),o&&(n=v.propFix[n]||n,s=v.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):z.test(e.nodeName)||W.test(e.nodeName)&&e.href?0:t}}}}),F={get:function(e,n){var r,i=v.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?v.removeAttr(e,n):(r=v.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},V||(I={name:!0,id:!0,coords:!0},j=v.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(I[n]?r.value!=="":r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=i.createAttribute(n),e.setAttributeNode(r)),r.value=t+""}},v.each(["width","height"],function(e,t){v.attrHooks[t]=v.extend(v.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),v.attrHooks.contenteditable={get:j.get,set:function(e,t,n){t===""&&(t="false"),j.set(e,t,n)}}),v.support.hrefNormalized||v.each(["href","src","width","height"],function(e,n){v.attrHooks[n]=v.extend(v.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),v.support.style||(v.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()| \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/demo/js/zepto.js b/common/src/main/webapp/thirdparty/icheck/demo/js/zepto.js
new file mode 100644
index 0000000..ef1e61f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/demo/js/zepto.js
@@ -0,0 +1,41 @@
+/*!
+ * Zepto v1.0 zeptojs.com | MIT licensed
+ * Modules: zepto, polyfill, event, data, stack
+ */
+var Zepto=function(){function h(a){return null==a?String(a):G[S.call(a)]||"object"}function m(a){return"function"==h(a)}function p(a){return null!=a&&a==a.window}function s(a){return null!=a&&a.nodeType==a.DOCUMENT_NODE}function q(a){return"object"==h(a)}function k(a){return q(a)&&!p(a)&&a.__proto__==Object.prototype}function t(a){return a instanceof Array}function l(a){return"number"==typeof a.length}function j(a){return a.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,
+"$1_$2").replace(/_/g,"-").toLowerCase()}function r(a){return a in H?H[a]:H[a]=RegExp("(^|\\s)"+a+"(\\s|$)")}function A(a){return"children"in a?B.call(a.children):c.map(a.childNodes,function(a){if(1==a.nodeType)return a})}function C(a,b,d){for(g in b)d&&(k(b[g])||t(b[g]))?(k(b[g])&&!k(a[g])&&(a[g]={}),t(b[g])&&!t(a[g])&&(a[g]=[]),C(a[g],b[g],d)):b[g]!==f&&(a[g]=b[g])}function y(a,b){return b===f?c(a):c(a).filter(b)}function x(a,b,d,c){return m(b)?b.call(a,d,c):b}function z(a,b){var d=a.className,
+c=d&&d.baseVal!==f;if(b===f)return c?d.baseVal:d;c?d.baseVal=b:a.className=b}function E(a){var b;try{return a?"true"==a||("false"==a?!1:"null"==a?null:!isNaN(b=Number(a))?b:/^[\[\{]/.test(a)?c.parseJSON(a):a):a}catch(d){return a}}function e(a,b){b(a);for(var d in a.childNodes)e(a.childNodes[d],b)}var f,g,c,u,w=[],B=w.slice,D=w.filter,v=window.document,I={},H={},J=v.defaultView.getComputedStyle,M={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},N=/^\s*<(\w+|!)[^>]*>/,
+T=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,O=/^(?:body|html)$/i,U="val css html text data width height offset".split(" "),K=v.createElement("table"),P=v.createElement("tr"),Q={tr:v.createElement("tbody"),tbody:K,thead:K,tfoot:K,td:P,th:P,"*":v.createElement("div")},V=/complete|loaded|interactive/,W=/^\.([\w-]+)$/,X=/^#([\w-]*)$/,Y=/^[\w-]+$/,G={},S=G.toString,n={},L,F,R=v.createElement("div");n.matches=function(a,b){if(!a||1!==a.nodeType)return!1;var d=a.webkitMatchesSelector||
+a.mozMatchesSelector||a.oMatchesSelector||a.matchesSelector;if(d)return d.call(a,b);var c;c=a.parentNode;(d=!c)&&(c=R).appendChild(a);c=~n.qsa(c,b).indexOf(a);d&&R.removeChild(a);return c};L=function(a){return a.replace(/-+(.)?/g,function(a,d){return d?d.toUpperCase():""})};F=function(a){return D.call(a,function(b,d){return a.indexOf(b)==d})};n.fragment=function(a,b,d){a.replace&&(a=a.replace(T,"<$1></$2>"));b===f&&(b=N.test(a)&&RegExp.$1);b in Q||(b="*");var e,g=Q[b];g.innerHTML=""+a;a=c.each(B.call(g.childNodes),
+function(){g.removeChild(this)});k(d)&&(e=c(a),c.each(d,function(a,b){if(-1<U.indexOf(a))e[a](b);else e.attr(a,b)}));return a};n.Z=function(a,b){a=a||[];a.__proto__=c.fn;a.selector=b||"";return a};n.isZ=function(a){return a instanceof n.Z};n.init=function(a,b){if(a){if(m(a))return c(v).ready(a);if(n.isZ(a))return a;var d;if(t(a))d=D.call(a,function(a){return null!=a});else if(q(a))d=[k(a)?c.extend({},a):a],a=null;else if(N.test(a))d=n.fragment(a.trim(),RegExp.$1,b),a=null;else{if(b!==f)return c(b).find(a);
+d=n.qsa(v,a)}return n.Z(d,a)}return n.Z()};c=function(a,b){return n.init(a,b)};c.extend=function(a){var b,d=B.call(arguments,1);"boolean"==typeof a&&(b=a,a=d.shift());d.forEach(function(d){C(a,d,b)});return a};n.qsa=function(a,b){var d;return s(a)&&X.test(b)?(d=a.getElementById(RegExp.$1))?[d]:[]:1!==a.nodeType&&9!==a.nodeType?[]:B.call(W.test(b)?a.getElementsByClassName(RegExp.$1):Y.test(b)?a.getElementsByTagName(b):a.querySelectorAll(b))};c.contains=function(a,b){return a!==b&&a.contains(b)};c.type=
+h;c.isFunction=m;c.isWindow=p;c.isArray=t;c.isPlainObject=k;c.isEmptyObject=function(a){for(var b in a)return!1;return!0};c.inArray=function(a,b,d){return w.indexOf.call(b,a,d)};c.camelCase=L;c.trim=function(a){return a.trim()};c.uuid=0;c.support={};c.expr={};c.map=function(a,b){var d,e=[],f;if(l(a))for(f=0;f<a.length;f++)d=b(a[f],f),null!=d&&e.push(d);else for(f in a)d=b(a[f],f),null!=d&&e.push(d);return 0<e.length?c.fn.concat.apply([],e):e};c.each=function(a,b){var d;if(l(a))for(d=0;d<a.length&&
+!1!==b.call(a[d],d,a[d]);d++);else for(d in a)if(!1===b.call(a[d],d,a[d]))break;return a};c.grep=function(a,b){return D.call(a,b)};window.JSON&&(c.parseJSON=JSON.parse);c.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){G["[object "+b+"]"]=b.toLowerCase()});c.fn={forEach:w.forEach,reduce:w.reduce,push:w.push,sort:w.sort,indexOf:w.indexOf,concat:w.concat,map:function(a){return c(c.map(this,function(b,d){return a.call(b,d,b)}))},slice:function(){return c(B.apply(this,
+arguments))},ready:function(a){V.test(v.readyState)?a(c):v.addEventListener("DOMContentLoaded",function(){a(c)},!1);return this},get:function(a){return a===f?B.call(this):this[0<=a?a:a+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(a){w.every.call(this,function(b,d){return!1!==a.call(b,d,b)});return this},filter:function(a){return m(a)?this.not(this.not(a)):
+c(D.call(this,function(b){return n.matches(b,a)}))},add:function(a,b){return c(F(this.concat(c(a,b))))},is:function(a){return 0<this.length&&n.matches(this[0],a)},not:function(a){var b=[];if(m(a)&&a.call!==f)this.each(function(d){a.call(this,d)||b.push(this)});else{var d="string"==typeof a?this.filter(a):l(a)&&m(a.item)?B.call(a):c(a);this.forEach(function(a){0>d.indexOf(a)&&b.push(a)})}return c(b)},has:function(a){return this.filter(function(){return q(a)?c.contains(this,a):c(this).find(a).size()})},
+eq:function(a){return-1===a?this.slice(a):this.slice(a,+a+1)},first:function(){var a=this[0];return a&&!q(a)?a:c(a)},last:function(){var a=this[this.length-1];return a&&!q(a)?a:c(a)},find:function(a){var b=this;return"object"==typeof a?c(a).filter(function(){var a=this;return w.some.call(b,function(b){return c.contains(b,a)})}):1==this.length?c(n.qsa(this[0],a)):this.map(function(){return n.qsa(this,a)})},closest:function(a,b){var d=this[0],e=!1;for("object"==typeof a&&(e=c(a));d&&!(e?0<=e.indexOf(d):
+n.matches(d,a));)d=d!==b&&!s(d)&&d.parentNode;return c(d)},parents:function(a){for(var b=[],d=this;0<d.length;)d=c.map(d,function(a){if((a=a.parentNode)&&!s(a)&&0>b.indexOf(a))return b.push(a),a});return y(b,a)},parent:function(a){return y(F(this.pluck("parentNode")),a)},children:function(a){return y(this.map(function(){return A(this)}),a)},contents:function(){return this.map(function(){return B.call(this.childNodes)})},siblings:function(a){return y(this.map(function(a,d){return D.call(A(d.parentNode),
+function(a){return a!==d})}),a)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(a){return c.map(this,function(b){return b[a]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=null);if("none"==J(this,"").getPropertyValue("display")){var a=this.style,b=this.nodeName,d,c;I[b]||(d=v.createElement(b),v.body.appendChild(d),c=J(d,"").getPropertyValue("display"),d.parentNode.removeChild(d),"none"==c&&(c="block"),I[b]=c);a.display=
+I[b]}})},replaceWith:function(a){return this.before(a).remove()},wrap:function(a){var b=m(a);if(this[0]&&!b)var d=c(a).get(0),e=d.parentNode||1<this.length;return this.each(function(f){c(this).wrapAll(b?a.call(this,f):e?d.cloneNode(!0):d)})},wrapAll:function(a){if(this[0]){c(this[0]).before(a=c(a));for(var b;(b=a.children()).length;)a=b.first();c(a).append(this)}return this},wrapInner:function(a){var b=m(a);return this.each(function(d){var e=c(this),f=e.contents();d=b?a.call(this,d):a;f.length?f.wrapAll(d):
+e.append(d)})},unwrap:function(){this.parent().each(function(){c(this).replaceWith(c(this).children())});return this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(a){return this.each(function(){var b=c(this);(a===f?"none"==b.css("display"):a)?b.show():b.hide()})},prev:function(a){return c(this.pluck("previousElementSibling")).filter(a||"*")},next:function(a){return c(this.pluck("nextElementSibling")).filter(a||
+"*")},html:function(a){return a===f?0<this.length?this[0].innerHTML:null:this.each(function(b){var d=this.innerHTML;c(this).empty().append(x(this,a,b,d))})},text:function(a){return a===f?0<this.length?this[0].textContent:null:this.each(function(){this.textContent=a})},attr:function(a,b){var d;return"string"==typeof a&&b===f?0==this.length||1!==this[0].nodeType?f:"value"==a&&"INPUT"==this[0].nodeName?this.val():!(d=this[0].getAttribute(a))&&a in this[0]?this[0][a]:d:this.each(function(d){if(1===this.nodeType)if(q(a))for(g in a){d=
+g;var c=a[g];null==c?this.removeAttribute(d):this.setAttribute(d,c)}else d=x(this,b,d,this.getAttribute(a)),null==d?this.removeAttribute(a):this.setAttribute(a,d)})},removeAttr:function(a){return this.each(function(){1===this.nodeType&&this.removeAttribute(a)})},prop:function(a,b){return b===f?this[0]&&this[0][a]:this.each(function(d){this[a]=x(this,b,d,this[a])})},data:function(a,b){var d=this.attr("data-"+j(a),b);return null!==d?E(d):f},val:function(a){return a===f?this[0]&&(this[0].multiple?c(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):
+this[0].value):this.each(function(b){this.value=x(this,a,b,this.value)})},offset:function(a){if(a)return this.each(function(b){var e=c(this);b=x(this,a,b,e.offset());var f=e.offsetParent().offset();b={top:b.top-f.top,left:b.left-f.left};"static"==e.css("position")&&(b.position="relative");e.css(b)});if(0==this.length)return null;var b=this[0].getBoundingClientRect();return{left:b.left+window.pageXOffset,top:b.top+window.pageYOffset,width:Math.round(b.width),height:Math.round(b.height)}},css:function(a,
+b){if(2>arguments.length&&"string"==typeof a)return this[0]&&(this[0].style[L(a)]||J(this[0],"").getPropertyValue(a));var d="";if("string"==h(a))!b&&0!==b?this.each(function(){this.style.removeProperty(j(a))}):d=j(a)+":"+("number"==typeof b&&!M[j(a)]?b+"px":b);else for(g in a)!a[g]&&0!==a[g]?this.each(function(){this.style.removeProperty(j(g))}):d+=j(g)+":"+("number"==typeof a[g]&&!M[j(g)]?a[g]+"px":a[g])+";";return this.each(function(){this.style.cssText+=";"+d})},index:function(a){return a?this.indexOf(c(a)[0]):
+this.parent().children().indexOf(this[0])},hasClass:function(a){return w.some.call(this,function(a){return this.test(z(a))},r(a))},addClass:function(a){return this.each(function(b){u=[];var d=z(this);x(this,a,b,d).split(/\s+/g).forEach(function(a){c(this).hasClass(a)||u.push(a)},this);u.length&&z(this,d+(d?" ":"")+u.join(" "))})},removeClass:function(a){return this.each(function(b){if(a===f)return z(this,"");u=z(this);x(this,a,b,u).split(/\s+/g).forEach(function(a){u=u.replace(r(a)," ")});z(this,
+u.trim())})},toggleClass:function(a,b){return this.each(function(d){var e=c(this);x(this,a,d,z(this)).split(/\s+/g).forEach(function(a){(b===f?!e.hasClass(a):b)?e.addClass(a):e.removeClass(a)})})},scrollTop:function(){if(this.length)return"scrollTop"in this[0]?this[0].scrollTop:this[0].scrollY},position:function(){if(this.length){var a=this[0],b=this.offsetParent(),d=this.offset(),e=O.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c(a).css("margin-top"))||0;d.left-=parseFloat(c(a).css("margin-left"))||
+0;e.top+=parseFloat(c(b[0]).css("border-top-width"))||0;e.left+=parseFloat(c(b[0]).css("border-left-width"))||0;return{top:d.top-e.top,left:d.left-e.left}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||v.body;a&&!O.test(a.nodeName)&&"static"==c(a).css("position");)a=a.offsetParent;return a})}};c.fn.detach=c.fn.remove;["width","height"].forEach(function(a){c.fn[a]=function(b){var d,e=this[0],g=a.replace(/./,function(a){return a[0].toUpperCase()});return b===f?p(e)?
+e["inner"+g]:s(e)?e.documentElement["offset"+g]:(d=this.offset())&&d[a]:this.each(function(d){e=c(this);e.css(a,x(this,b,d,e[a]()))})}});["after","prepend","before","append"].forEach(function(a,b){var d=b%2;c.fn[a]=function(){var a,f=c.map(arguments,function(b){a=h(b);return"object"==a||"array"==a||null==b?b:n.fragment(b)}),g,u=1<this.length;return 1>f.length?this:this.each(function(a,h){g=d?h:h.parentNode;h=0==b?h.nextSibling:1==b?h.firstChild:2==b?h:null;f.forEach(function(a){if(u)a=a.cloneNode(!0);
+else if(!g)return c(a).remove();e(g.insertBefore(a,h),function(a){null!=a.nodeName&&("SCRIPT"===a.nodeName.toUpperCase()&&(!a.type||"text/javascript"===a.type)&&!a.src)&&window.eval.call(window,a.innerHTML)})})})};c.fn[d?a+"To":"insert"+(b?"Before":"After")]=function(b){c(b)[a](this);return this}});n.Z.prototype=c.fn;n.uniq=F;n.deserializeValue=E;c.zepto=n;return c}();window.Zepto=Zepto;"$"in window||(window.$=Zepto);
+(function(h){String.prototype.trim===h&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});Array.prototype.reduce===h&&(Array.prototype.reduce=function(m){if(void 0===this||null===this)throw new TypeError;var p=Object(this),s=p.length>>>0,q=0,k;if("function"!=typeof m)throw new TypeError;if(0==s&&1==arguments.length)throw new TypeError;if(2<=arguments.length)k=arguments[1];else{do{if(q in p){k=p[q++];break}if(++q>=s)throw new TypeError;}while(1)}for(;q<s;)q in p&&(k=m.call(h,
+k,p[q],q,p)),q++;return k})})();
+(function(h){function m(e){return e._zid||(e._zid=r++)}function p(e,f,g,c){f=s(f);if(f.ns)var h=RegExp("(?:^| )"+f.ns.replace(" "," .* ?")+"(?: |$)");return(j[m(e)]||[]).filter(function(e){return e&&(!f.e||e.e==f.e)&&(!f.ns||h.test(e.ns))&&(!g||m(e.fn)===m(g))&&(!c||e.sel==c)})}function s(e){e=(""+e).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function q(e,f,g){"string"!=h.type(e)?h.each(e,g):e.split(/\s/).forEach(function(e){g(e,f)})}function k(e,f,g,c,u,l){var k=m(e),r=j[k]||(j[k]=
+[]);q(f,g,function(f,g){var j=s(f);j.fn=g;j.sel=c;j.e in C&&(g=function(e){var c=e.relatedTarget;if(!c||c!==this&&!h.contains(this,c))return j.fn.apply(this,arguments)});j.del=u&&u(g,f);var k=j.del||g;j.proxy=function(c){var f=k.apply(e,[c].concat(c.data));!1===f&&(c.preventDefault(),c.stopPropagation());return f};j.i=r.length;r.push(j);e.addEventListener(C[j.e]||j.e,j.proxy,j.del&&("focus"==j.e||"blur"==j.e)||!!l)})}function t(e,f,g,c,h){var l=m(e);q(f||"",g,function(f,g){p(e,f,g,c).forEach(function(c){delete j[l][c.i];
+e.removeEventListener(C[c.e]||c.e,c.proxy,c.del&&("focus"==c.e||"blur"==c.e)||!!h)})})}function l(e){var f,g={originalEvent:e};for(f in e)!z.test(f)&&void 0!==e[f]&&(g[f]=e[f]);h.each(E,function(c,f){g[c]=function(){this[f]=y;return e[c].apply(e,arguments)};g[f]=x});return g}var j={},r=1,A={},C={mouseenter:"mouseover",mouseleave:"mouseout"};A.click=A.mousedown=A.mouseup=A.mousemove="MouseEvents";h.event={add:k,remove:t};h.proxy=function(e,f){if(h.isFunction(e)){var g=function(){return e.apply(f,arguments)};
+g._zid=m(e);return g}if("string"==typeof f)return h.proxy(e[f],e);throw new TypeError("expected function");};h.fn.bind=function(e,f){return this.each(function(){k(this,e,f)})};h.fn.unbind=function(e,f){return this.each(function(){t(this,e,f)})};h.fn.one=function(e,f){return this.each(function(g,c){k(this,e,f,null,function(e,f){return function(){var g=e.apply(c,arguments);t(c,f,e);return g}})})};var y=function(){return!0},x=function(){return!1},z=/^([A-Z]|layer[XY]$)/,E={preventDefault:"isDefaultPrevented",
+stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};h.fn.delegate=function(e,f,g){return this.each(function(c,j){k(j,f,g,e,function(c){return function(f){var g,k=h(f.target).closest(e,j).get(0);if(k)return g=h.extend(l(f),{currentTarget:k,liveFired:j}),c.apply(k,[g].concat([].slice.call(arguments,1)))}})})};h.fn.undelegate=function(e,f,g){return this.each(function(){t(this,f,g,e)})};h.fn.live=function(e,f){h(document.body).delegate(this.selector,e,f);return this};
+h.fn.die=function(e,f){h(document.body).undelegate(this.selector,e,f);return this};h.fn.on=function(e,f,g){return!f||h.isFunction(f)?this.bind(e,f||g):this.delegate(f,e,g)};h.fn.off=function(e,f,g){return!f||h.isFunction(f)?this.unbind(e,f||g):this.undelegate(f,e,g)};h.fn.trigger=function(e,f){if("string"==typeof e||h.isPlainObject(e))e=h.Event(e);var g=e;if(!("defaultPrevented"in g)){g.defaultPrevented=!1;var c=g.preventDefault;g.preventDefault=function(){this.defaultPrevented=!0;c.call(this)}}e.data=
+f;return this.each(function(){"dispatchEvent"in this&&this.dispatchEvent(e)})};h.fn.triggerHandler=function(e,f){var g,c;this.each(function(j,k){g=l("string"==typeof e?h.Event(e):e);g.data=f;g.target=k;h.each(p(k,e.type||e),function(e,f){c=f.proxy(g);if(g.isImmediatePropagationStopped())return!1})});return c};"focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){h.fn[e]=
+function(f){return f?this.bind(e,f):this.trigger(e)}});["focus","blur"].forEach(function(e){h.fn[e]=function(f){f?this.bind(e,f):this.each(function(){try{this[e]()}catch(f){}});return this}});h.Event=function(e,f){"string"!=typeof e&&(f=e,e=f.type);var g=document.createEvent(A[e]||"Events"),c=!0;if(f)for(var h in f)"bubbles"==h?c=!!f[h]:g[h]=f[h];g.initEvent(e,c,!0,null,null,null,null,null,null,null,null,null,null,null,null);g.isDefaultPrevented=function(){return this.defaultPrevented};return g}})(Zepto);
+(function(h){function m(l,j){var r=l[t],r=r&&s[r];if(void 0===j)return r||p(l);if(r){if(j in r)return r[j];var m=k(j);if(m in r)return r[m]}return q.call(h(l),j)}function p(l,j,m){var q=l[t]||(l[t]=++h.uuid),p;if(!(p=s[q])){p=s;var y={};h.each(l.attributes,function(j,l){0==l.name.indexOf("data-")&&(y[k(l.name.replace("data-",""))]=h.zepto.deserializeValue(l.value))});p=p[q]=y}l=p;void 0!==j&&(l[k(j)]=m);return l}var s={},q=h.fn.data,k=h.camelCase,t=h.expando="Zepto"+ +new Date;h.fn.data=function(l,
+j){return void 0===j?h.isPlainObject(l)?this.each(function(j,k){h.each(l,function(h,j){p(k,h,j)})}):0==this.length?void 0:m(this[0],l):this.each(function(){p(this,l,j)})};h.fn.removeData=function(l){"string"==typeof l&&(l=l.split(/\s+/));return this.each(function(){var j=this[t],m=j&&s[j];m&&h.each(l,function(){delete m[k(this)]})})}})(Zepto);(function(a){a.fn.end=function(){return this.prevObject||a()};a.fn.andSelf=function(){return this.add(this.prevObject||a())};"filter add not eq first last find closest parents parent children siblings".split(" ").forEach(function(b){var c=a.fn[b];a.fn[b]=function(){var a=c.apply(this,arguments);a.prevObject=this;return a}})})(Zepto);
diff --git a/common/src/main/webapp/thirdparty/icheck/icheck.jquery.json b/common/src/main/webapp/thirdparty/icheck/icheck.jquery.json
new file mode 100644
index 0000000..e7018a6
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/icheck.jquery.json
@@ -0,0 +1,48 @@
+{
+ "name": "icheck",
+ "version": "1.0.2",
+ "title": "iCheck",
+ "author": {
+ "name": "Damir Sultanov",
+ "email": "info@fronteed.com",
+ "homepage": "http://fronteed.com/"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "http://en.wikipedia.org/wiki/MIT_License"
+ }
+ ],
+ "dependencies": {
+ "jquery": ">=1.7"
+ },
+ "description": "Highly customizable checkboxes and radio buttons (jQuery and Zepto). Features: identical inputs across different browsers and devices (both desktop and mobile), touch devices support (iOS, Android, BlackBerry, Windows Phone, Amazon Kindle), keyboard accessible inputs (Tab, Spacebar, Arrow up/down and other shortcuts), screenreader accessible inputs — (ARIA attributes for VoiceOver and others), customization freedom (use any HTML and CSS to style inputs or try 6 Retina-ready skins), lightweight size (1 kb gzipped). Provides 32 options to customize checkboxes and radio buttons, 11 callbacks to handle changes, 9 methods to make changes programmatically. Saves changes to original inputs, works carefully with any selectors.",
+ "keywords": [
+ "checkbox",
+ "radio",
+ "input",
+ "field",
+ "form",
+ "desktop",
+ "mobile",
+ "custom",
+ "replacement",
+ "accessibility",
+ "skins",
+ "ui",
+ "checked",
+ "disabled",
+ "indeterminate",
+ "css3",
+ "html5",
+ "tiny",
+ "lightweight",
+ "jquery",
+ "zepto"
+ ],
+ "homepage": "http://fronteed.com/iCheck/",
+ "docs": "https://github.com/fronteed/iCheck",
+ "demo": "http://fronteed.com/iCheck/",
+ "download": "http://fronteed.com/iCheck/",
+ "bugs": "https://github.com/fronteed/iCheck/issues/"
+}
diff --git a/common/src/main/webapp/thirdparty/icheck/icheck.js b/common/src/main/webapp/thirdparty/icheck/icheck.js
new file mode 100644
index 0000000..7bf2768
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/icheck.js
@@ -0,0 +1,509 @@
+/*!
+ * iCheck v1.0.2, http://git.io/arlzeA
+ * ===================================
+ * Powerful jQuery and Zepto plugin for checkboxes and radio buttons customization
+ *
+ * (c) 2013 Damir Sultanov, http://fronteed.com
+ * MIT Licensed
+ */
+
+(function($) {
+
+ // Cached vars
+ var _iCheck = 'iCheck',
+ _iCheckHelper = _iCheck + '-helper',
+ _checkbox = 'checkbox',
+ _radio = 'radio',
+ _checked = 'checked',
+ _unchecked = 'un' + _checked,
+ _disabled = 'disabled',
+ _determinate = 'determinate',
+ _indeterminate = 'in' + _determinate,
+ _update = 'update',
+ _type = 'type',
+ _click = 'click',
+ _touch = 'touchbegin.i touchend.i',
+ _add = 'addClass',
+ _remove = 'removeClass',
+ _callback = 'trigger',
+ _label = 'label',
+ _cursor = 'cursor',
+ _mobile = /ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);
+
+ // Plugin init
+ $.fn[_iCheck] = function(options, fire) {
+
+ // Walker
+ var handle = 'input[type="' + _checkbox + '"], input[type="' + _radio + '"]',
+ stack = $(),
+ walker = function(object) {
+ object.each(function() {
+ var self = $(this);
+
+ if (self.is(handle)) {
+ stack = stack.add(self);
+ } else {
+ stack = stack.add(self.find(handle));
+ }
+ });
+ };
+
+ // Check if we should operate with some method
+ if (/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(options)) {
+
+ // Normalize method's name
+ options = options.toLowerCase();
+
+ // Find checkboxes and radio buttons
+ walker(this);
+
+ return stack.each(function() {
+ var self = $(this);
+
+ if (options == 'destroy') {
+ tidy(self, 'ifDestroyed');
+ } else {
+ operate(self, true, options);
+ }
+
+ // Fire method's callback
+ if ($.isFunction(fire)) {
+ fire();
+ }
+ });
+
+ // Customization
+ } else if (typeof options == 'object' || !options) {
+
+ // Check if any options were passed
+ var settings = $.extend({
+ checkedClass: _checked,
+ disabledClass: _disabled,
+ indeterminateClass: _indeterminate,
+ labelHover: true
+ }, options),
+
+ selector = settings.handle,
+ hoverClass = settings.hoverClass || 'hover',
+ focusClass = settings.focusClass || 'focus',
+ activeClass = settings.activeClass || 'active',
+ labelHover = !!settings.labelHover,
+ labelHoverClass = settings.labelHoverClass || 'hover',
+
+ // Setup clickable area
+ area = ('' + settings.increaseArea).replace('%', '') | 0;
+
+ // Selector limit
+ if (selector == _checkbox || selector == _radio) {
+ handle = 'input[type="' + selector + '"]';
+ }
+
+ // Clickable area limit
+ if (area < -50) {
+ area = -50;
+ }
+
+ // Walk around the selector
+ walker(this);
+
+ return stack.each(function() {
+ var self = $(this);
+
+ // If already customized
+ tidy(self);
+
+ var node = this,
+ id = node.id,
+
+ // Layer styles
+ offset = -area + '%',
+ size = 100 + (area * 2) + '%',
+ layer = {
+ position: 'absolute',
+ top: offset,
+ left: offset,
+ display: 'block',
+ width: size,
+ height: size,
+ margin: 0,
+ padding: 0,
+ background: '#fff',
+ border: 0,
+ opacity: 0
+ },
+
+ // Choose how to hide input
+ hide = _mobile ? {
+ position: 'absolute',
+ visibility: 'hidden'
+ } : area ? layer : {
+ position: 'absolute',
+ opacity: 0
+ },
+
+ // Get proper class
+ className = node[_type] == _checkbox ? settings.checkboxClass || 'i' + _checkbox : settings.radioClass || 'i' + _radio,
+
+ // Find assigned labels
+ label = $(_label + '[for="' + id + '"]').add(self.closest(_label)),
+
+ // Check ARIA option
+ aria = !!settings.aria,
+
+ // Set ARIA placeholder
+ ariaID = _iCheck + '-' + Math.random().toString(36).substr(2,6),
+
+ // Parent & helper
+ parent = '<div class="' + className + '" ' + (aria ? 'role="' + node[_type] + '" ' : ''),
+ helper;
+
+ // Set ARIA "labelledby"
+ if (aria) {
+ label.each(function() {
+ parent += 'aria-labelledby="';
+
+ if (this.id) {
+ parent += this.id;
+ } else {
+ this.id = ariaID;
+ parent += ariaID;
+ }
+
+ parent += '"';
+ });
+ }
+
+ // Wrap input
+ parent = self.wrap(parent + '/>')[_callback]('ifCreated').parent().append(settings.insert);
+
+ // Layer addition
+ helper = $('<ins class="' + _iCheckHelper + '"/>').css(layer).appendTo(parent);
+
+ // Finalize customization
+ self.data(_iCheck, {o: settings, s: self.attr('style')}).css(hide);
+ !!settings.inheritClass && parent[_add](node.className || '');
+ !!settings.inheritID && id && parent.attr('id', _iCheck + '-' + id);
+ parent.css('position') == 'static' && parent.css('position', 'relative');
+ operate(self, true, _update);
+
+ // Label events
+ if (label.length) {
+ label.on(_click + '.i mouseover.i mouseout.i ' + _touch, function(event) {
+ var type = event[_type],
+ item = $(this);
+
+ // Do nothing if input is disabled
+ if (!node[_disabled]) {
+
+ // Click
+ if (type == _click) {
+ if ($(event.target).is('a')) {
+ return;
+ }
+ operate(self, false, true);
+
+ // Hover state
+ } else if (labelHover) {
+
+ // mouseout|touchend
+ if (/ut|nd/.test(type)) {
+ parent[_remove](hoverClass);
+ item[_remove](labelHoverClass);
+ } else {
+ parent[_add](hoverClass);
+ item[_add](labelHoverClass);
+ }
+ }
+
+ if (_mobile) {
+ event.stopPropagation();
+ } else {
+ return false;
+ }
+ }
+ });
+ }
+
+ // Input events
+ self.on(_click + '.i focus.i blur.i keyup.i keydown.i keypress.i', function(event) {
+ var type = event[_type],
+ key = event.keyCode;
+
+ // Click
+ if (type == _click) {
+ return false;
+
+ // Keydown
+ } else if (type == 'keydown' && key == 32) {
+ if (!(node[_type] == _radio && node[_checked])) {
+ if (node[_checked]) {
+ off(self, _checked);
+ } else {
+ on(self, _checked);
+ }
+ }
+
+ return false;
+
+ // Keyup
+ } else if (type == 'keyup' && node[_type] == _radio) {
+ !node[_checked] && on(self, _checked);
+
+ // Focus/blur
+ } else if (/us|ur/.test(type)) {
+ parent[type == 'blur' ? _remove : _add](focusClass);
+ }
+ });
+
+ // Helper events
+ helper.on(_click + ' mousedown mouseup mouseover mouseout ' + _touch, function(event) {
+ var type = event[_type],
+
+ // mousedown|mouseup
+ toggle = /wn|up/.test(type) ? activeClass : hoverClass;
+
+ // Do nothing if input is disabled
+ if (!node[_disabled]) {
+
+ // Click
+ if (type == _click) {
+ operate(self, false, true);
+
+ // Active and hover states
+ } else {
+
+ // State is on
+ if (/wn|er|in/.test(type)) {
+
+ // mousedown|mouseover|touchbegin
+ parent[_add](toggle);
+
+ // State is off
+ } else {
+ parent[_remove](toggle + ' ' + activeClass);
+ }
+
+ // Label hover
+ if (label.length && labelHover && toggle == hoverClass) {
+
+ // mouseout|touchend
+ label[/ut|nd/.test(type) ? _remove : _add](labelHoverClass);
+ }
+ }
+
+ if (_mobile) {
+ event.stopPropagation();
+ } else {
+ return false;
+ }
+ }
+ });
+ });
+ } else {
+ return this;
+ }
+ };
+
+ // Do something with inputs
+ function operate(input, direct, method) {
+ var node = input[0],
+ state = /er/.test(method) ? _indeterminate : /bl/.test(method) ? _disabled : _checked,
+ active = method == _update ? {
+ checked: node[_checked],
+ disabled: node[_disabled],
+ indeterminate: input.attr(_indeterminate) == 'true' || input.attr(_determinate) == 'false'
+ } : node[state];
+
+ // Check, disable or indeterminate
+ if (/^(ch|di|in)/.test(method) && !active) {
+ on(input, state);
+
+ // Uncheck, enable or determinate
+ } else if (/^(un|en|de)/.test(method) && active) {
+ off(input, state);
+
+ // Update
+ } else if (method == _update) {
+
+ // Handle states
+ for (var each in active) {
+ if (active[each]) {
+ on(input, each, true);
+ } else {
+ off(input, each, true);
+ }
+ }
+
+ } else if (!direct || method == 'toggle') {
+
+ // Helper or label was clicked
+ if (!direct) {
+ input[_callback]('ifClicked');
+ }
+
+ // Toggle checked state
+ if (active) {
+ if (node[_type] !== _radio) {
+ off(input, state);
+ }
+ } else {
+ on(input, state);
+ }
+ }
+ }
+
+ // Add checked, disabled or indeterminate state
+ function on(input, state, keep) {
+ var node = input[0],
+ parent = input.parent(),
+ checked = state == _checked,
+ indeterminate = state == _indeterminate,
+ disabled = state == _disabled,
+ callback = indeterminate ? _determinate : checked ? _unchecked : 'enabled',
+ regular = option(input, callback + capitalize(node[_type])),
+ specific = option(input, state + capitalize(node[_type]));
+
+ // Prevent unnecessary actions
+ if (node[state] !== true) {
+
+ // Toggle assigned radio buttons
+ if (!keep && state == _checked && node[_type] == _radio && node.name) {
+ var form = input.closest('form'),
+ inputs = 'input[name="' + node.name + '"]';
+
+ inputs = form.length ? form.find(inputs) : $(inputs);
+
+ inputs.each(function() {
+ if (this !== node && $(this).data(_iCheck)) {
+ off($(this), state);
+ }
+ });
+ }
+
+ // Indeterminate state
+ if (indeterminate) {
+
+ // Add indeterminate state
+ node[state] = true;
+
+ // Remove checked state
+ if (node[_checked]) {
+ off(input, _checked, 'force');
+ }
+
+ // Checked or disabled state
+ } else {
+
+ // Add checked or disabled state
+ if (!keep) {
+ node[state] = true;
+ }
+
+ // Remove indeterminate state
+ if (checked && node[_indeterminate]) {
+ off(input, _indeterminate, false);
+ }
+ }
+
+ // Trigger callbacks
+ callbacks(input, checked, state, keep);
+ }
+
+ // Add proper cursor
+ if (node[_disabled] && !!option(input, _cursor, true)) {
+ parent.find('.' + _iCheckHelper).css(_cursor, 'default');
+ }
+
+ // Add state class
+ parent[_add](specific || option(input, state) || '');
+
+ // Set ARIA attribute
+ if (!!parent.attr('role') && !indeterminate) {
+ parent.attr('aria-' + (disabled ? _disabled : _checked), 'true');
+ }
+
+ // Remove regular state class
+ parent[_remove](regular || option(input, callback) || '');
+ }
+
+ // Remove checked, disabled or indeterminate state
+ function off(input, state, keep) {
+ var node = input[0],
+ parent = input.parent(),
+ checked = state == _checked,
+ indeterminate = state == _indeterminate,
+ disabled = state == _disabled,
+ callback = indeterminate ? _determinate : checked ? _unchecked : 'enabled',
+ regular = option(input, callback + capitalize(node[_type])),
+ specific = option(input, state + capitalize(node[_type]));
+
+ // Prevent unnecessary actions
+ if (node[state] !== false) {
+
+ // Toggle state
+ if (indeterminate || !keep || keep == 'force') {
+ node[state] = false;
+ }
+
+ // Trigger callbacks
+ callbacks(input, checked, callback, keep);
+ }
+
+ // Add proper cursor
+ if (!node[_disabled] && !!option(input, _cursor, true)) {
+ parent.find('.' + _iCheckHelper).css(_cursor, 'pointer');
+ }
+
+ // Remove state class
+ parent[_remove](specific || option(input, state) || '');
+
+ // Set ARIA attribute
+ if (!!parent.attr('role') && !indeterminate) {
+ parent.attr('aria-' + (disabled ? _disabled : _checked), 'false');
+ }
+
+ // Add regular state class
+ parent[_add](regular || option(input, callback) || '');
+ }
+
+ // Remove all traces
+ function tidy(input, callback) {
+ if (input.data(_iCheck)) {
+
+ // Remove everything except input
+ input.parent().html(input.attr('style', input.data(_iCheck).s || ''));
+
+ // Callback
+ if (callback) {
+ input[_callback](callback);
+ }
+
+ // Unbind events
+ input.off('.i').unwrap();
+ $(_label + '[for="' + input[0].id + '"]').add(input.closest(_label)).off('.i');
+ }
+ }
+
+ // Get some option
+ function option(input, state, regular) {
+ if (input.data(_iCheck)) {
+ return input.data(_iCheck).o[state + (regular ? '' : 'Class')];
+ }
+ }
+
+ // Capitalize some string
+ function capitalize(string) {
+ return string.charAt(0).toUpperCase() + string.slice(1);
+ }
+
+ // Executable handlers
+ function callbacks(input, checked, callback, keep) {
+ if (!keep) {
+ if (checked) {
+ input[_callback]('ifToggled');
+ }
+
+ input[_callback]('ifChanged')[_callback]('if' + capitalize(callback));
+ }
+ }
+})(window.jQuery || window.Zepto);
diff --git a/common/src/main/webapp/thirdparty/icheck/icheck.min.js b/common/src/main/webapp/thirdparty/icheck/icheck.min.js
new file mode 100644
index 0000000..7cdb17e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/icheck.min.js
@@ -0,0 +1,11 @@
+/*! iCheck v1.0.2 by Damir Sultanov, http://git.io/arlzeA, MIT Licensed */
+(function(f){function A(a,b,d){var c=a[0],g=/er/.test(d)?_indeterminate:/bl/.test(d)?n:k,e=d==_update?{checked:c[k],disabled:c[n],indeterminate:"true"==a.attr(_indeterminate)||"false"==a.attr(_determinate)}:c[g];if(/^(ch|di|in)/.test(d)&&!e)x(a,g);else if(/^(un|en|de)/.test(d)&&e)q(a,g);else if(d==_update)for(var f in e)e[f]?x(a,f,!0):q(a,f,!0);else if(!b||"toggle"==d){if(!b)a[_callback]("ifClicked");e?c[_type]!==r&&q(a,g):x(a,g)}}function x(a,b,d){var c=a[0],g=a.parent(),e=b==k,u=b==_indeterminate,
+v=b==n,s=u?_determinate:e?y:"enabled",F=l(a,s+t(c[_type])),B=l(a,b+t(c[_type]));if(!0!==c[b]){if(!d&&b==k&&c[_type]==r&&c.name){var w=a.closest("form"),p='input[name="'+c.name+'"]',p=w.length?w.find(p):f(p);p.each(function(){this!==c&&f(this).data(m)&&q(f(this),b)})}u?(c[b]=!0,c[k]&&q(a,k,"force")):(d||(c[b]=!0),e&&c[_indeterminate]&&q(a,_indeterminate,!1));D(a,e,b,d)}c[n]&&l(a,_cursor,!0)&&g.find("."+C).css(_cursor,"default");g[_add](B||l(a,b)||"");g.attr("role")&&!u&&g.attr("aria-"+(v?n:k),"true");
+g[_remove](F||l(a,s)||"")}function q(a,b,d){var c=a[0],g=a.parent(),e=b==k,f=b==_indeterminate,m=b==n,s=f?_determinate:e?y:"enabled",q=l(a,s+t(c[_type])),r=l(a,b+t(c[_type]));if(!1!==c[b]){if(f||!d||"force"==d)c[b]=!1;D(a,e,s,d)}!c[n]&&l(a,_cursor,!0)&&g.find("."+C).css(_cursor,"pointer");g[_remove](r||l(a,b)||"");g.attr("role")&&!f&&g.attr("aria-"+(m?n:k),"false");g[_add](q||l(a,s)||"")}function E(a,b){if(a.data(m)){a.parent().html(a.attr("style",a.data(m).s||""));if(b)a[_callback](b);a.off(".i").unwrap();
+f(_label+'[for="'+a[0].id+'"]').add(a.closest(_label)).off(".i")}}function l(a,b,f){if(a.data(m))return a.data(m).o[b+(f?"":"Class")]}function t(a){return a.charAt(0).toUpperCase()+a.slice(1)}function D(a,b,f,c){if(!c){if(b)a[_callback]("ifToggled");a[_callback]("ifChanged")[_callback]("if"+t(f))}}var m="iCheck",C=m+"-helper",r="radio",k="checked",y="un"+k,n="disabled";_determinate="determinate";_indeterminate="in"+_determinate;_update="update";_type="type";_click="click";_touch="touchbegin.i touchend.i";
+_add="addClass";_remove="removeClass";_callback="trigger";_label="label";_cursor="cursor";_mobile=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);f.fn[m]=function(a,b){var d='input[type="checkbox"], input[type="'+r+'"]',c=f(),g=function(a){a.each(function(){var a=f(this);c=a.is(d)?c.add(a):c.add(a.find(d))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(a))return a=a.toLowerCase(),g(this),c.each(function(){var c=
+f(this);"destroy"==a?E(c,"ifDestroyed"):A(c,!0,a);f.isFunction(b)&&b()});if("object"!=typeof a&&a)return this;var e=f.extend({checkedClass:k,disabledClass:n,indeterminateClass:_indeterminate,labelHover:!0},a),l=e.handle,v=e.hoverClass||"hover",s=e.focusClass||"focus",t=e.activeClass||"active",B=!!e.labelHover,w=e.labelHoverClass||"hover",p=(""+e.increaseArea).replace("%","")|0;if("checkbox"==l||l==r)d='input[type="'+l+'"]';-50>p&&(p=-50);g(this);return c.each(function(){var a=f(this);E(a);var c=this,
+b=c.id,g=-p+"%",d=100+2*p+"%",d={position:"absolute",top:g,left:g,display:"block",width:d,height:d,margin:0,padding:0,background:"#fff",border:0,opacity:0},g=_mobile?{position:"absolute",visibility:"hidden"}:p?d:{position:"absolute",opacity:0},l="checkbox"==c[_type]?e.checkboxClass||"icheckbox":e.radioClass||"i"+r,z=f(_label+'[for="'+b+'"]').add(a.closest(_label)),u=!!e.aria,y=m+"-"+Math.random().toString(36).substr(2,6),h='<div class="'+l+'" '+(u?'role="'+c[_type]+'" ':"");u&&z.each(function(){h+=
+'aria-labelledby="';this.id?h+=this.id:(this.id=y,h+=y);h+='"'});h=a.wrap(h+"/>")[_callback]("ifCreated").parent().append(e.insert);d=f('<ins class="'+C+'"/>').css(d).appendTo(h);a.data(m,{o:e,s:a.attr("style")}).css(g);e.inheritClass&&h[_add](c.className||"");e.inheritID&&b&&h.attr("id",m+"-"+b);"static"==h.css("position")&&h.css("position","relative");A(a,!0,_update);if(z.length)z.on(_click+".i mouseover.i mouseout.i "+_touch,function(b){var d=b[_type],e=f(this);if(!c[n]){if(d==_click){if(f(b.target).is("a"))return;
+A(a,!1,!0)}else B&&(/ut|nd/.test(d)?(h[_remove](v),e[_remove](w)):(h[_add](v),e[_add](w)));if(_mobile)b.stopPropagation();else return!1}});a.on(_click+".i focus.i blur.i keyup.i keydown.i keypress.i",function(b){var d=b[_type];b=b.keyCode;if(d==_click)return!1;if("keydown"==d&&32==b)return c[_type]==r&&c[k]||(c[k]?q(a,k):x(a,k)),!1;if("keyup"==d&&c[_type]==r)!c[k]&&x(a,k);else if(/us|ur/.test(d))h["blur"==d?_remove:_add](s)});d.on(_click+" mousedown mouseup mouseover mouseout "+_touch,function(b){var d=
+b[_type],e=/wn|up/.test(d)?t:v;if(!c[n]){if(d==_click)A(a,!1,!0);else{if(/wn|er|in/.test(d))h[_add](e);else h[_remove](e+" "+t);if(z.length&&B&&e==v)z[/ut|nd/.test(d)?_remove:_add](w)}if(_mobile)b.stopPropagation();else return!1}})})}})(window.jQuery||window.Zepto);
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/all.css b/common/src/main/webapp/thirdparty/icheck/skins/all.css
new file mode 100644
index 0000000..6439b74
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/all.css
@@ -0,0 +1,61 @@
+/* iCheck plugin skins
+----------------------------------- */
+@import url("minimal/_all.css");
+/*
+@import url("minimal/minimal.css");
+@import url("minimal/red.css");
+@import url("minimal/green.css");
+@import url("minimal/blue.css");
+@import url("minimal/aero.css");
+@import url("minimal/grey.css");
+@import url("minimal/orange.css");
+@import url("minimal/yellow.css");
+@import url("minimal/pink.css");
+@import url("minimal/purple.css");
+*/
+
+@import url("square/_all.css");
+/*
+@import url("square/square.css");
+@import url("square/red.css");
+@import url("square/green.css");
+@import url("square/blue.css");
+@import url("square/aero.css");
+@import url("square/grey.css");
+@import url("square/orange.css");
+@import url("square/yellow.css");
+@import url("square/pink.css");
+@import url("square/purple.css");
+*/
+
+@import url("flat/_all.css");
+/*
+@import url("flat/flat.css");
+@import url("flat/red.css");
+@import url("flat/green.css");
+@import url("flat/blue.css");
+@import url("flat/aero.css");
+@import url("flat/grey.css");
+@import url("flat/orange.css");
+@import url("flat/yellow.css");
+@import url("flat/pink.css");
+@import url("flat/purple.css");
+*/
+
+@import url("line/_all.css");
+/*
+@import url("line/line.css");
+@import url("line/red.css");
+@import url("line/green.css");
+@import url("line/blue.css");
+@import url("line/aero.css");
+@import url("line/grey.css");
+@import url("line/orange.css");
+@import url("line/yellow.css");
+@import url("line/pink.css");
+@import url("line/purple.css");
+*/
+
+@import url("polaris/polaris.css");
+
+@import url("futurico/futurico.css"); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/_all.css b/common/src/main/webapp/thirdparty/icheck/skins/flat/_all.css
new file mode 100644
index 0000000..cf5ea76
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/_all.css
@@ -0,0 +1,530 @@
+/* iCheck plugin Flat skin
+----------------------------------- */
+.icheckbox_flat,
+.iradio_flat {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 20px;
+ height: 20px;
+ background: url(flat.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_flat {
+ background-position: 0 0;
+}
+ .icheckbox_flat.checked {
+ background-position: -22px 0;
+ }
+ .icheckbox_flat.disabled {
+ background-position: -44px 0;
+ cursor: default;
+ }
+ .icheckbox_flat.checked.disabled {
+ background-position: -66px 0;
+ }
+
+.iradio_flat {
+ background-position: -88px 0;
+}
+ .iradio_flat.checked {
+ background-position: -110px 0;
+ }
+ .iradio_flat.disabled {
+ background-position: -132px 0;
+ cursor: default;
+ }
+ .iradio_flat.checked.disabled {
+ background-position: -154px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_flat,
+ .iradio_flat {
+ background-image: url(flat@2x.png);
+ -webkit-background-size: 176px 22px;
+ background-size: 176px 22px;
+ }
+}
+
+/* red */
+.icheckbox_flat-red,
+.iradio_flat-red {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 20px;
+ height: 20px;
+ background: url(red.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_flat-red {
+ background-position: 0 0;
+}
+ .icheckbox_flat-red.checked {
+ background-position: -22px 0;
+ }
+ .icheckbox_flat-red.disabled {
+ background-position: -44px 0;
+ cursor: default;
+ }
+ .icheckbox_flat-red.checked.disabled {
+ background-position: -66px 0;
+ }
+
+.iradio_flat-red {
+ background-position: -88px 0;
+}
+ .iradio_flat-red.checked {
+ background-position: -110px 0;
+ }
+ .iradio_flat-red.disabled {
+ background-position: -132px 0;
+ cursor: default;
+ }
+ .iradio_flat-red.checked.disabled {
+ background-position: -154px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_flat-red,
+ .iradio_flat-red {
+ background-image: url(red@2x.png);
+ -webkit-background-size: 176px 22px;
+ background-size: 176px 22px;
+ }
+}
+
+/* green */
+.icheckbox_flat-green,
+.iradio_flat-green {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 20px;
+ height: 20px;
+ background: url(green.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_flat-green {
+ background-position: 0 0;
+}
+ .icheckbox_flat-green.checked {
+ background-position: -22px 0;
+ }
+ .icheckbox_flat-green.disabled {
+ background-position: -44px 0;
+ cursor: default;
+ }
+ .icheckbox_flat-green.checked.disabled {
+ background-position: -66px 0;
+ }
+
+.iradio_flat-green {
+ background-position: -88px 0;
+}
+ .iradio_flat-green.checked {
+ background-position: -110px 0;
+ }
+ .iradio_flat-green.disabled {
+ background-position: -132px 0;
+ cursor: default;
+ }
+ .iradio_flat-green.checked.disabled {
+ background-position: -154px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_flat-green,
+ .iradio_flat-green {
+ background-image: url(green@2x.png);
+ -webkit-background-size: 176px 22px;
+ background-size: 176px 22px;
+ }
+}
+
+/* blue */
+.icheckbox_flat-blue,
+.iradio_flat-blue {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 20px;
+ height: 20px;
+ background: url(blue.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_flat-blue {
+ background-position: 0 0;
+}
+ .icheckbox_flat-blue.checked {
+ background-position: -22px 0;
+ }
+ .icheckbox_flat-blue.disabled {
+ background-position: -44px 0;
+ cursor: default;
+ }
+ .icheckbox_flat-blue.checked.disabled {
+ background-position: -66px 0;
+ }
+
+.iradio_flat-blue {
+ background-position: -88px 0;
+}
+ .iradio_flat-blue.checked {
+ background-position: -110px 0;
+ }
+ .iradio_flat-blue.disabled {
+ background-position: -132px 0;
+ cursor: default;
+ }
+ .iradio_flat-blue.checked.disabled {
+ background-position: -154px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_flat-blue,
+ .iradio_flat-blue {
+ background-image: url(blue@2x.png);
+ -webkit-background-size: 176px 22px;
+ background-size: 176px 22px;
+ }
+}
+
+/* aero */
+.icheckbox_flat-aero,
+.iradio_flat-aero {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 20px;
+ height: 20px;
+ background: url(aero.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_flat-aero {
+ background-position: 0 0;
+}
+ .icheckbox_flat-aero.checked {
+ background-position: -22px 0;
+ }
+ .icheckbox_flat-aero.disabled {
+ background-position: -44px 0;
+ cursor: default;
+ }
+ .icheckbox_flat-aero.checked.disabled {
+ background-position: -66px 0;
+ }
+
+.iradio_flat-aero {
+ background-position: -88px 0;
+}
+ .iradio_flat-aero.checked {
+ background-position: -110px 0;
+ }
+ .iradio_flat-aero.disabled {
+ background-position: -132px 0;
+ cursor: default;
+ }
+ .iradio_flat-aero.checked.disabled {
+ background-position: -154px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_flat-aero,
+ .iradio_flat-aero {
+ background-image: url(aero@2x.png);
+ -webkit-background-size: 176px 22px;
+ background-size: 176px 22px;
+ }
+}
+
+/* grey */
+.icheckbox_flat-grey,
+.iradio_flat-grey {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 20px;
+ height: 20px;
+ background: url(grey.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_flat-grey {
+ background-position: 0 0;
+}
+ .icheckbox_flat-grey.checked {
+ background-position: -22px 0;
+ }
+ .icheckbox_flat-grey.disabled {
+ background-position: -44px 0;
+ cursor: default;
+ }
+ .icheckbox_flat-grey.checked.disabled {
+ background-position: -66px 0;
+ }
+
+.iradio_flat-grey {
+ background-position: -88px 0;
+}
+ .iradio_flat-grey.checked {
+ background-position: -110px 0;
+ }
+ .iradio_flat-grey.disabled {
+ background-position: -132px 0;
+ cursor: default;
+ }
+ .iradio_flat-grey.checked.disabled {
+ background-position: -154px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_flat-grey,
+ .iradio_flat-grey {
+ background-image: url(grey@2x.png);
+ -webkit-background-size: 176px 22px;
+ background-size: 176px 22px;
+ }
+}
+
+/* orange */
+.icheckbox_flat-orange,
+.iradio_flat-orange {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 20px;
+ height: 20px;
+ background: url(orange.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_flat-orange {
+ background-position: 0 0;
+}
+ .icheckbox_flat-orange.checked {
+ background-position: -22px 0;
+ }
+ .icheckbox_flat-orange.disabled {
+ background-position: -44px 0;
+ cursor: default;
+ }
+ .icheckbox_flat-orange.checked.disabled {
+ background-position: -66px 0;
+ }
+
+.iradio_flat-orange {
+ background-position: -88px 0;
+}
+ .iradio_flat-orange.checked {
+ background-position: -110px 0;
+ }
+ .iradio_flat-orange.disabled {
+ background-position: -132px 0;
+ cursor: default;
+ }
+ .iradio_flat-orange.checked.disabled {
+ background-position: -154px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_flat-orange,
+ .iradio_flat-orange {
+ background-image: url(orange@2x.png);
+ -webkit-background-size: 176px 22px;
+ background-size: 176px 22px;
+ }
+}
+
+/* yellow */
+.icheckbox_flat-yellow,
+.iradio_flat-yellow {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 20px;
+ height: 20px;
+ background: url(yellow.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_flat-yellow {
+ background-position: 0 0;
+}
+ .icheckbox_flat-yellow.checked {
+ background-position: -22px 0;
+ }
+ .icheckbox_flat-yellow.disabled {
+ background-position: -44px 0;
+ cursor: default;
+ }
+ .icheckbox_flat-yellow.checked.disabled {
+ background-position: -66px 0;
+ }
+
+.iradio_flat-yellow {
+ background-position: -88px 0;
+}
+ .iradio_flat-yellow.checked {
+ background-position: -110px 0;
+ }
+ .iradio_flat-yellow.disabled {
+ background-position: -132px 0;
+ cursor: default;
+ }
+ .iradio_flat-yellow.checked.disabled {
+ background-position: -154px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_flat-yellow,
+ .iradio_flat-yellow {
+ background-image: url(yellow@2x.png);
+ -webkit-background-size: 176px 22px;
+ background-size: 176px 22px;
+ }
+}
+
+/* pink */
+.icheckbox_flat-pink,
+.iradio_flat-pink {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 20px;
+ height: 20px;
+ background: url(pink.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_flat-pink {
+ background-position: 0 0;
+}
+ .icheckbox_flat-pink.checked {
+ background-position: -22px 0;
+ }
+ .icheckbox_flat-pink.disabled {
+ background-position: -44px 0;
+ cursor: default;
+ }
+ .icheckbox_flat-pink.checked.disabled {
+ background-position: -66px 0;
+ }
+
+.iradio_flat-pink {
+ background-position: -88px 0;
+}
+ .iradio_flat-pink.checked {
+ background-position: -110px 0;
+ }
+ .iradio_flat-pink.disabled {
+ background-position: -132px 0;
+ cursor: default;
+ }
+ .iradio_flat-pink.checked.disabled {
+ background-position: -154px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_flat-pink,
+ .iradio_flat-pink {
+ background-image: url(pink@2x.png);
+ -webkit-background-size: 176px 22px;
+ background-size: 176px 22px;
+ }
+}
+
+/* purple */
+.icheckbox_flat-purple,
+.iradio_flat-purple {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 20px;
+ height: 20px;
+ background: url(purple.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_flat-purple {
+ background-position: 0 0;
+}
+ .icheckbox_flat-purple.checked {
+ background-position: -22px 0;
+ }
+ .icheckbox_flat-purple.disabled {
+ background-position: -44px 0;
+ cursor: default;
+ }
+ .icheckbox_flat-purple.checked.disabled {
+ background-position: -66px 0;
+ }
+
+.iradio_flat-purple {
+ background-position: -88px 0;
+}
+ .iradio_flat-purple.checked {
+ background-position: -110px 0;
+ }
+ .iradio_flat-purple.disabled {
+ background-position: -132px 0;
+ cursor: default;
+ }
+ .iradio_flat-purple.checked.disabled {
+ background-position: -154px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_flat-purple,
+ .iradio_flat-purple {
+ background-image: url(purple@2x.png);
+ -webkit-background-size: 176px 22px;
+ background-size: 176px 22px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/aero.css b/common/src/main/webapp/thirdparty/icheck/skins/flat/aero.css
new file mode 100644
index 0000000..dc769c7
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/aero.css
@@ -0,0 +1,53 @@
+/* iCheck plugin Flat skin, aero
+----------------------------------- */
+.icheckbox_flat-aero,
+.iradio_flat-aero {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 20px;
+ height: 20px;
+ background: url(aero.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_flat-aero {
+ background-position: 0 0;
+}
+ .icheckbox_flat-aero.checked {
+ background-position: -22px 0;
+ }
+ .icheckbox_flat-aero.disabled {
+ background-position: -44px 0;
+ cursor: default;
+ }
+ .icheckbox_flat-aero.checked.disabled {
+ background-position: -66px 0;
+ }
+
+.iradio_flat-aero {
+ background-position: -88px 0;
+}
+ .iradio_flat-aero.checked {
+ background-position: -110px 0;
+ }
+ .iradio_flat-aero.disabled {
+ background-position: -132px 0;
+ cursor: default;
+ }
+ .iradio_flat-aero.checked.disabled {
+ background-position: -154px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_flat-aero,
+ .iradio_flat-aero {
+ background-image: url(aero@2x.png);
+ -webkit-background-size: 176px 22px;
+ background-size: 176px 22px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/aero.png b/common/src/main/webapp/thirdparty/icheck/skins/flat/aero.png
new file mode 100644
index 0000000..f4277aa
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/aero.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/aero@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/flat/aero@2x.png
new file mode 100644
index 0000000..a9a7494
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/aero@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/blue.css b/common/src/main/webapp/thirdparty/icheck/skins/flat/blue.css
new file mode 100644
index 0000000..af091c8
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/blue.css
@@ -0,0 +1,53 @@
+/* iCheck plugin Flat skin, blue
+----------------------------------- */
+.icheckbox_flat-blue,
+.iradio_flat-blue {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 20px;
+ height: 20px;
+ background: url(blue.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_flat-blue {
+ background-position: 0 0;
+}
+ .icheckbox_flat-blue.checked {
+ background-position: -22px 0;
+ }
+ .icheckbox_flat-blue.disabled {
+ background-position: -44px 0;
+ cursor: default;
+ }
+ .icheckbox_flat-blue.checked.disabled {
+ background-position: -66px 0;
+ }
+
+.iradio_flat-blue {
+ background-position: -88px 0;
+}
+ .iradio_flat-blue.checked {
+ background-position: -110px 0;
+ }
+ .iradio_flat-blue.disabled {
+ background-position: -132px 0;
+ cursor: default;
+ }
+ .iradio_flat-blue.checked.disabled {
+ background-position: -154px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_flat-blue,
+ .iradio_flat-blue {
+ background-image: url(blue@2x.png);
+ -webkit-background-size: 176px 22px;
+ background-size: 176px 22px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/blue.png b/common/src/main/webapp/thirdparty/icheck/skins/flat/blue.png
new file mode 100644
index 0000000..4b6ef98
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/blue.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/blue@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/flat/blue@2x.png
new file mode 100644
index 0000000..d52da05
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/blue@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/flat.css b/common/src/main/webapp/thirdparty/icheck/skins/flat/flat.css
new file mode 100644
index 0000000..665bc7b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/flat.css
@@ -0,0 +1,53 @@
+/* iCheck plugin flat skin, black
+----------------------------------- */
+.icheckbox_flat,
+.iradio_flat {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 20px;
+ height: 20px;
+ background: url(flat.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_flat {
+ background-position: 0 0;
+}
+ .icheckbox_flat.checked {
+ background-position: -22px 0;
+ }
+ .icheckbox_flat.disabled {
+ background-position: -44px 0;
+ cursor: default;
+ }
+ .icheckbox_flat.checked.disabled {
+ background-position: -66px 0;
+ }
+
+.iradio_flat {
+ background-position: -88px 0;
+}
+ .iradio_flat.checked {
+ background-position: -110px 0;
+ }
+ .iradio_flat.disabled {
+ background-position: -132px 0;
+ cursor: default;
+ }
+ .iradio_flat.checked.disabled {
+ background-position: -154px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_flat,
+ .iradio_flat {
+ background-image: url(flat@2x.png);
+ -webkit-background-size: 176px 22px;
+ background-size: 176px 22px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/flat.png b/common/src/main/webapp/thirdparty/icheck/skins/flat/flat.png
new file mode 100644
index 0000000..15af826
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/flat.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/flat@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/flat/flat@2x.png
new file mode 100644
index 0000000..e70e438
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/flat@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/green.css b/common/src/main/webapp/thirdparty/icheck/skins/flat/green.css
new file mode 100644
index 0000000..cce7a7f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/green.css
@@ -0,0 +1,53 @@
+/* iCheck plugin Flat skin, green
+----------------------------------- */
+.icheckbox_flat-green,
+.iradio_flat-green {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 20px;
+ height: 20px;
+ background: url(green.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_flat-green {
+ background-position: 0 0;
+}
+ .icheckbox_flat-green.checked {
+ background-position: -22px 0;
+ }
+ .icheckbox_flat-green.disabled {
+ background-position: -44px 0;
+ cursor: default;
+ }
+ .icheckbox_flat-green.checked.disabled {
+ background-position: -66px 0;
+ }
+
+.iradio_flat-green {
+ background-position: -88px 0;
+}
+ .iradio_flat-green.checked {
+ background-position: -110px 0;
+ }
+ .iradio_flat-green.disabled {
+ background-position: -132px 0;
+ cursor: default;
+ }
+ .iradio_flat-green.checked.disabled {
+ background-position: -154px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_flat-green,
+ .iradio_flat-green {
+ background-image: url(green@2x.png);
+ -webkit-background-size: 176px 22px;
+ background-size: 176px 22px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/green.png b/common/src/main/webapp/thirdparty/icheck/skins/flat/green.png
new file mode 100644
index 0000000..6b303fb
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/green.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/green@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/flat/green@2x.png
new file mode 100644
index 0000000..92b4411
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/green@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/grey.css b/common/src/main/webapp/thirdparty/icheck/skins/flat/grey.css
new file mode 100644
index 0000000..46305d0
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/grey.css
@@ -0,0 +1,53 @@
+/* iCheck plugin Flat skin, grey
+----------------------------------- */
+.icheckbox_flat-grey,
+.iradio_flat-grey {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 20px;
+ height: 20px;
+ background: url(grey.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_flat-grey {
+ background-position: 0 0;
+}
+ .icheckbox_flat-grey.checked {
+ background-position: -22px 0;
+ }
+ .icheckbox_flat-grey.disabled {
+ background-position: -44px 0;
+ cursor: default;
+ }
+ .icheckbox_flat-grey.checked.disabled {
+ background-position: -66px 0;
+ }
+
+.iradio_flat-grey {
+ background-position: -88px 0;
+}
+ .iradio_flat-grey.checked {
+ background-position: -110px 0;
+ }
+ .iradio_flat-grey.disabled {
+ background-position: -132px 0;
+ cursor: default;
+ }
+ .iradio_flat-grey.checked.disabled {
+ background-position: -154px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_flat-grey,
+ .iradio_flat-grey {
+ background-image: url(grey@2x.png);
+ -webkit-background-size: 176px 22px;
+ background-size: 176px 22px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/grey.png b/common/src/main/webapp/thirdparty/icheck/skins/flat/grey.png
new file mode 100644
index 0000000..c6e2873
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/grey.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/grey@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/flat/grey@2x.png
new file mode 100644
index 0000000..0b47b1c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/grey@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/orange.css b/common/src/main/webapp/thirdparty/icheck/skins/flat/orange.css
new file mode 100644
index 0000000..c8d3caf
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/orange.css
@@ -0,0 +1,53 @@
+/* iCheck plugin Flat skin, orange
+----------------------------------- */
+.icheckbox_flat-orange,
+.iradio_flat-orange {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 20px;
+ height: 20px;
+ background: url(orange.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_flat-orange {
+ background-position: 0 0;
+}
+ .icheckbox_flat-orange.checked {
+ background-position: -22px 0;
+ }
+ .icheckbox_flat-orange.disabled {
+ background-position: -44px 0;
+ cursor: default;
+ }
+ .icheckbox_flat-orange.checked.disabled {
+ background-position: -66px 0;
+ }
+
+.iradio_flat-orange {
+ background-position: -88px 0;
+}
+ .iradio_flat-orange.checked {
+ background-position: -110px 0;
+ }
+ .iradio_flat-orange.disabled {
+ background-position: -132px 0;
+ cursor: default;
+ }
+ .iradio_flat-orange.checked.disabled {
+ background-position: -154px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_flat-orange,
+ .iradio_flat-orange {
+ background-image: url(orange@2x.png);
+ -webkit-background-size: 176px 22px;
+ background-size: 176px 22px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/orange.png b/common/src/main/webapp/thirdparty/icheck/skins/flat/orange.png
new file mode 100644
index 0000000..ec2532e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/orange.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/orange@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/flat/orange@2x.png
new file mode 100644
index 0000000..9350b50
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/orange@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/pink.css b/common/src/main/webapp/thirdparty/icheck/skins/flat/pink.css
new file mode 100644
index 0000000..e4ca254
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/pink.css
@@ -0,0 +1,53 @@
+/* iCheck plugin Flat skin, pink
+----------------------------------- */
+.icheckbox_flat-pink,
+.iradio_flat-pink {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 20px;
+ height: 20px;
+ background: url(pink.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_flat-pink {
+ background-position: 0 0;
+}
+ .icheckbox_flat-pink.checked {
+ background-position: -22px 0;
+ }
+ .icheckbox_flat-pink.disabled {
+ background-position: -44px 0;
+ cursor: default;
+ }
+ .icheckbox_flat-pink.checked.disabled {
+ background-position: -66px 0;
+ }
+
+.iradio_flat-pink {
+ background-position: -88px 0;
+}
+ .iradio_flat-pink.checked {
+ background-position: -110px 0;
+ }
+ .iradio_flat-pink.disabled {
+ background-position: -132px 0;
+ cursor: default;
+ }
+ .iradio_flat-pink.checked.disabled {
+ background-position: -154px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_flat-pink,
+ .iradio_flat-pink {
+ background-image: url(pink@2x.png);
+ -webkit-background-size: 176px 22px;
+ background-size: 176px 22px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/pink.png b/common/src/main/webapp/thirdparty/icheck/skins/flat/pink.png
new file mode 100644
index 0000000..3e65d9d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/pink.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/pink@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/flat/pink@2x.png
new file mode 100644
index 0000000..281ba06
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/pink@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/purple.css b/common/src/main/webapp/thirdparty/icheck/skins/flat/purple.css
new file mode 100644
index 0000000..15408bc
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/purple.css
@@ -0,0 +1,53 @@
+/* iCheck plugin Flat skin, purple
+----------------------------------- */
+.icheckbox_flat-purple,
+.iradio_flat-purple {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 20px;
+ height: 20px;
+ background: url(purple.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_flat-purple {
+ background-position: 0 0;
+}
+ .icheckbox_flat-purple.checked {
+ background-position: -22px 0;
+ }
+ .icheckbox_flat-purple.disabled {
+ background-position: -44px 0;
+ cursor: default;
+ }
+ .icheckbox_flat-purple.checked.disabled {
+ background-position: -66px 0;
+ }
+
+.iradio_flat-purple {
+ background-position: -88px 0;
+}
+ .iradio_flat-purple.checked {
+ background-position: -110px 0;
+ }
+ .iradio_flat-purple.disabled {
+ background-position: -132px 0;
+ cursor: default;
+ }
+ .iradio_flat-purple.checked.disabled {
+ background-position: -154px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_flat-purple,
+ .iradio_flat-purple {
+ background-image: url(purple@2x.png);
+ -webkit-background-size: 176px 22px;
+ background-size: 176px 22px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/purple.png b/common/src/main/webapp/thirdparty/icheck/skins/flat/purple.png
new file mode 100644
index 0000000..3699fd5
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/purple.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/purple@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/flat/purple@2x.png
new file mode 100644
index 0000000..7f4be74
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/purple@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/red.css b/common/src/main/webapp/thirdparty/icheck/skins/flat/red.css
new file mode 100644
index 0000000..d2e240d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/red.css
@@ -0,0 +1,53 @@
+/* iCheck plugin Flat skin, red
+----------------------------------- */
+.icheckbox_flat-red,
+.iradio_flat-red {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 20px;
+ height: 20px;
+ background: url(red.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_flat-red {
+ background-position: 0 0;
+}
+ .icheckbox_flat-red.checked {
+ background-position: -22px 0;
+ }
+ .icheckbox_flat-red.disabled {
+ background-position: -44px 0;
+ cursor: default;
+ }
+ .icheckbox_flat-red.checked.disabled {
+ background-position: -66px 0;
+ }
+
+.iradio_flat-red {
+ background-position: -88px 0;
+}
+ .iradio_flat-red.checked {
+ background-position: -110px 0;
+ }
+ .iradio_flat-red.disabled {
+ background-position: -132px 0;
+ cursor: default;
+ }
+ .iradio_flat-red.checked.disabled {
+ background-position: -154px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_flat-red,
+ .iradio_flat-red {
+ background-image: url(red@2x.png);
+ -webkit-background-size: 176px 22px;
+ background-size: 176px 22px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/red.png b/common/src/main/webapp/thirdparty/icheck/skins/flat/red.png
new file mode 100644
index 0000000..0d5ac38
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/red.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/red@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/flat/red@2x.png
new file mode 100644
index 0000000..38590d9
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/red@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/yellow.css b/common/src/main/webapp/thirdparty/icheck/skins/flat/yellow.css
new file mode 100644
index 0000000..ce130af
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/yellow.css
@@ -0,0 +1,53 @@
+/* iCheck plugin Flat skin, yellow
+----------------------------------- */
+.icheckbox_flat-yellow,
+.iradio_flat-yellow {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 20px;
+ height: 20px;
+ background: url(yellow.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_flat-yellow {
+ background-position: 0 0;
+}
+ .icheckbox_flat-yellow.checked {
+ background-position: -22px 0;
+ }
+ .icheckbox_flat-yellow.disabled {
+ background-position: -44px 0;
+ cursor: default;
+ }
+ .icheckbox_flat-yellow.checked.disabled {
+ background-position: -66px 0;
+ }
+
+.iradio_flat-yellow {
+ background-position: -88px 0;
+}
+ .iradio_flat-yellow.checked {
+ background-position: -110px 0;
+ }
+ .iradio_flat-yellow.disabled {
+ background-position: -132px 0;
+ cursor: default;
+ }
+ .iradio_flat-yellow.checked.disabled {
+ background-position: -154px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_flat-yellow,
+ .iradio_flat-yellow {
+ background-image: url(yellow@2x.png);
+ -webkit-background-size: 176px 22px;
+ background-size: 176px 22px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/yellow.png b/common/src/main/webapp/thirdparty/icheck/skins/flat/yellow.png
new file mode 100644
index 0000000..909dadc
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/yellow.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/flat/yellow@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/flat/yellow@2x.png
new file mode 100644
index 0000000..9fd5d73
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/flat/yellow@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/futurico/futurico.css b/common/src/main/webapp/thirdparty/icheck/skins/futurico/futurico.css
new file mode 100644
index 0000000..23649a7
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/futurico/futurico.css
@@ -0,0 +1,53 @@
+/* iCheck plugin Futurico skin
+----------------------------------- */
+.icheckbox_futurico,
+.iradio_futurico {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 16px;
+ height: 17px;
+ background: url(futurico.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_futurico {
+ background-position: 0 0;
+}
+ .icheckbox_futurico.checked {
+ background-position: -18px 0;
+ }
+ .icheckbox_futurico.disabled {
+ background-position: -36px 0;
+ cursor: default;
+ }
+ .icheckbox_futurico.checked.disabled {
+ background-position: -54px 0;
+ }
+
+.iradio_futurico {
+ background-position: -72px 0;
+}
+ .iradio_futurico.checked {
+ background-position: -90px 0;
+ }
+ .iradio_futurico.disabled {
+ background-position: -108px 0;
+ cursor: default;
+ }
+ .iradio_futurico.checked.disabled {
+ background-position: -126px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_futurico,
+ .iradio_futurico {
+ background-image: url(futurico@2x.png);
+ -webkit-background-size: 144px 19px;
+ background-size: 144px 19px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/futurico/futurico.png b/common/src/main/webapp/thirdparty/icheck/skins/futurico/futurico.png
new file mode 100644
index 0000000..50d62b5
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/futurico/futurico.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/futurico/futurico@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/futurico/futurico@2x.png
new file mode 100644
index 0000000..f7eb45a
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/futurico/futurico@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/line/Thumbs.db b/common/src/main/webapp/thirdparty/icheck/skins/line/Thumbs.db
new file mode 100644
index 0000000..a598050
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/line/Thumbs.db
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/line/_all.css b/common/src/main/webapp/thirdparty/icheck/skins/line/_all.css
new file mode 100644
index 0000000..14ff6cc
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/line/_all.css
@@ -0,0 +1,710 @@
+/* iCheck plugin Line skin
+----------------------------------- */
+.icheckbox_line,
+.iradio_line {
+ position: relative;
+ display: block;
+ margin: 0;
+ padding: 5px 15px 5px 38px;
+ font-size: 13px;
+ line-height: 17px;
+ color: #fff;
+ background: #000;
+ border: none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ cursor: pointer;
+}
+ .icheckbox_line .icheck_line-icon,
+ .iradio_line .icheck_line-icon {
+ position: absolute;
+ top: 50%;
+ left: 13px;
+ width: 13px;
+ height: 11px;
+ margin: -5px 0 0 0;
+ padding: 0;
+ overflow: hidden;
+ background: url(line.png) no-repeat;
+ border: none;
+ }
+ .icheckbox_line.hover,
+ .icheckbox_line.checked.hover,
+ .iradio_line.hover {
+ background: #444;
+ }
+ .icheckbox_line.checked,
+ .iradio_line.checked {
+ background: #000;
+ }
+ .icheckbox_line.checked .icheck_line-icon,
+ .iradio_line.checked .icheck_line-icon {
+ background-position: -15px 0;
+ }
+ .icheckbox_line.disabled,
+ .iradio_line.disabled {
+ background: #ccc;
+ cursor: default;
+ }
+ .icheckbox_line.disabled .icheck_line-icon,
+ .iradio_line.disabled .icheck_line-icon {
+ background-position: -30px 0;
+ }
+ .icheckbox_line.checked.disabled,
+ .iradio_line.checked.disabled {
+ background: #ccc;
+ }
+ .icheckbox_line.checked.disabled .icheck_line-icon,
+ .iradio_line.checked.disabled .icheck_line-icon {
+ background-position: -45px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_line .icheck_line-icon,
+ .iradio_line .icheck_line-icon {
+ background-image: url(line@2x.png);
+ -webkit-background-size: 60px 13px;
+ background-size: 60px 13px;
+ }
+}
+
+/* red */
+.icheckbox_line-red,
+.iradio_line-red {
+ position: relative;
+ display: block;
+ margin: 0;
+ padding: 5px 15px 5px 38px;
+ font-size: 13px;
+ line-height: 17px;
+ color: #fff;
+ background: #e56c69;
+ border: none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ cursor: pointer;
+}
+ .icheckbox_line-red .icheck_line-icon,
+ .iradio_line-red .icheck_line-icon {
+ position: absolute;
+ top: 50%;
+ left: 13px;
+ width: 13px;
+ height: 11px;
+ margin: -5px 0 0 0;
+ padding: 0;
+ overflow: hidden;
+ background: url(line.png) no-repeat;
+ border: none;
+ }
+ .icheckbox_line-red.hover,
+ .icheckbox_line-red.checked.hover,
+ .iradio_line-red.hover {
+ background: #E98582;
+ }
+ .icheckbox_line-red.checked,
+ .iradio_line-red.checked {
+ background: #e56c69;
+ }
+ .icheckbox_line-red.checked .icheck_line-icon,
+ .iradio_line-red.checked .icheck_line-icon {
+ background-position: -15px 0;
+ }
+ .icheckbox_line-red.disabled,
+ .iradio_line-red.disabled {
+ background: #F7D3D2;
+ cursor: default;
+ }
+ .icheckbox_line-red.disabled .icheck_line-icon,
+ .iradio_line-red.disabled .icheck_line-icon {
+ background-position: -30px 0;
+ }
+ .icheckbox_line-red.checked.disabled,
+ .iradio_line-red.checked.disabled {
+ background: #F7D3D2;
+ }
+ .icheckbox_line-red.checked.disabled .icheck_line-icon,
+ .iradio_line-red.checked.disabled .icheck_line-icon {
+ background-position: -45px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_line-red .icheck_line-icon,
+ .iradio_line-red .icheck_line-icon {
+ background-image: url(line@2x.png);
+ -webkit-background-size: 60px 13px;
+ background-size: 60px 13px;
+ }
+}
+
+/* green */
+.icheckbox_line-green,
+.iradio_line-green {
+ position: relative;
+ display: block;
+ margin: 0;
+ padding: 5px 15px 5px 38px;
+ font-size: 13px;
+ line-height: 17px;
+ color: #fff;
+ background: #1b7e5a;
+ border: none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ cursor: pointer;
+}
+ .icheckbox_line-green .icheck_line-icon,
+ .iradio_line-green .icheck_line-icon {
+ position: absolute;
+ top: 50%;
+ left: 13px;
+ width: 13px;
+ height: 11px;
+ margin: -5px 0 0 0;
+ padding: 0;
+ overflow: hidden;
+ background: url(line.png) no-repeat;
+ border: none;
+ }
+ .icheckbox_line-green.hover,
+ .icheckbox_line-green.checked.hover,
+ .iradio_line-green.hover {
+ background: #24AA7A;
+ }
+ .icheckbox_line-green.checked,
+ .iradio_line-green.checked {
+ background: #1b7e5a;
+ }
+ .icheckbox_line-green.checked .icheck_line-icon,
+ .iradio_line-green.checked .icheck_line-icon {
+ background-position: -15px 0;
+ }
+ .icheckbox_line-green.disabled,
+ .iradio_line-green.disabled {
+ background: #89E6C4;
+ cursor: default;
+ }
+ .icheckbox_line-green.disabled .icheck_line-icon,
+ .iradio_line-green.disabled .icheck_line-icon {
+ background-position: -30px 0;
+ }
+ .icheckbox_line-green.checked.disabled,
+ .iradio_line-green.checked.disabled {
+ background: #89E6C4;
+ }
+ .icheckbox_line-green.checked.disabled .icheck_line-icon,
+ .iradio_line-green.checked.disabled .icheck_line-icon {
+ background-position: -45px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_line-green .icheck_line-icon,
+ .iradio_line-green .icheck_line-icon {
+ background-image: url(line@2x.png);
+ -webkit-background-size: 60px 13px;
+ background-size: 60px 13px;
+ }
+}
+
+/* blue */
+.icheckbox_line-blue,
+.iradio_line-blue {
+ position: relative;
+ display: block;
+ margin: 0;
+ padding: 5px 15px 5px 38px;
+ font-size: 13px;
+ line-height: 17px;
+ color: #fff;
+ background: #2489c5;
+ border: none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ cursor: pointer;
+}
+ .icheckbox_line-blue .icheck_line-icon,
+ .iradio_line-blue .icheck_line-icon {
+ position: absolute;
+ top: 50%;
+ left: 13px;
+ width: 13px;
+ height: 11px;
+ margin: -5px 0 0 0;
+ padding: 0;
+ overflow: hidden;
+ background: url(line.png) no-repeat;
+ border: none;
+ }
+ .icheckbox_line-blue.hover,
+ .icheckbox_line-blue.checked.hover,
+ .iradio_line-blue.hover {
+ background: #3DA0DB;
+ }
+ .icheckbox_line-blue.checked,
+ .iradio_line-blue.checked {
+ background: #2489c5;
+ }
+ .icheckbox_line-blue.checked .icheck_line-icon,
+ .iradio_line-blue.checked .icheck_line-icon {
+ background-position: -15px 0;
+ }
+ .icheckbox_line-blue.disabled,
+ .iradio_line-blue.disabled {
+ background: #ADD7F0;
+ cursor: default;
+ }
+ .icheckbox_line-blue.disabled .icheck_line-icon,
+ .iradio_line-blue.disabled .icheck_line-icon {
+ background-position: -30px 0;
+ }
+ .icheckbox_line-blue.checked.disabled,
+ .iradio_line-blue.checked.disabled {
+ background: #ADD7F0;
+ }
+ .icheckbox_line-blue.checked.disabled .icheck_line-icon,
+ .iradio_line-blue.checked.disabled .icheck_line-icon {
+ background-position: -45px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_line-blue .icheck_line-icon,
+ .iradio_line-blue .icheck_line-icon {
+ background-image: url(line@2x.png);
+ -webkit-background-size: 60px 13px;
+ background-size: 60px 13px;
+ }
+}
+
+/* aero */
+.icheckbox_line-aero,
+.iradio_line-aero {
+ position: relative;
+ display: block;
+ margin: 0;
+ padding: 5px 15px 5px 38px;
+ font-size: 13px;
+ line-height: 17px;
+ color: #fff;
+ background: #9cc2cb;
+ border: none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ cursor: pointer;
+}
+ .icheckbox_line-aero .icheck_line-icon,
+ .iradio_line-aero .icheck_line-icon {
+ position: absolute;
+ top: 50%;
+ left: 13px;
+ width: 13px;
+ height: 11px;
+ margin: -5px 0 0 0;
+ padding: 0;
+ overflow: hidden;
+ background: url(line.png) no-repeat;
+ border: none;
+ }
+ .icheckbox_line-aero.hover,
+ .icheckbox_line-aero.checked.hover,
+ .iradio_line-aero.hover {
+ background: #B5D1D8;
+ }
+ .icheckbox_line-aero.checked,
+ .iradio_line-aero.checked {
+ background: #9cc2cb;
+ }
+ .icheckbox_line-aero.checked .icheck_line-icon,
+ .iradio_line-aero.checked .icheck_line-icon {
+ background-position: -15px 0;
+ }
+ .icheckbox_line-aero.disabled,
+ .iradio_line-aero.disabled {
+ background: #D2E4E8;
+ cursor: default;
+ }
+ .icheckbox_line-aero.disabled .icheck_line-icon,
+ .iradio_line-aero.disabled .icheck_line-icon {
+ background-position: -30px 0;
+ }
+ .icheckbox_line-aero.checked.disabled,
+ .iradio_line-aero.checked.disabled {
+ background: #D2E4E8;
+ }
+ .icheckbox_line-aero.checked.disabled .icheck_line-icon,
+ .iradio_line-aero.checked.disabled .icheck_line-icon {
+ background-position: -45px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_line-aero .icheck_line-icon,
+ .iradio_line-aero .icheck_line-icon {
+ background-image: url(line@2x.png);
+ -webkit-background-size: 60px 13px;
+ background-size: 60px 13px;
+ }
+}
+
+/* grey */
+.icheckbox_line-grey,
+.iradio_line-grey {
+ position: relative;
+ display: block;
+ margin: 0;
+ padding: 5px 15px 5px 38px;
+ font-size: 13px;
+ line-height: 17px;
+ color: #fff;
+ background: #73716e;
+ border: none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ cursor: pointer;
+}
+ .icheckbox_line-grey .icheck_line-icon,
+ .iradio_line-grey .icheck_line-icon {
+ position: absolute;
+ top: 50%;
+ left: 13px;
+ width: 13px;
+ height: 11px;
+ margin: -5px 0 0 0;
+ padding: 0;
+ overflow: hidden;
+ background: url(line.png) no-repeat;
+ border: none;
+ }
+ .icheckbox_line-grey.hover,
+ .icheckbox_line-grey.checked.hover,
+ .iradio_line-grey.hover {
+ background: #8B8986;
+ }
+ .icheckbox_line-grey.checked,
+ .iradio_line-grey.checked {
+ background: #73716e;
+ }
+ .icheckbox_line-grey.checked .icheck_line-icon,
+ .iradio_line-grey.checked .icheck_line-icon {
+ background-position: -15px 0;
+ }
+ .icheckbox_line-grey.disabled,
+ .iradio_line-grey.disabled {
+ background: #D5D4D3;
+ cursor: default;
+ }
+ .icheckbox_line-grey.disabled .icheck_line-icon,
+ .iradio_line-grey.disabled .icheck_line-icon {
+ background-position: -30px 0;
+ }
+ .icheckbox_line-grey.checked.disabled,
+ .iradio_line-grey.checked.disabled {
+ background: #D5D4D3;
+ }
+ .icheckbox_line-grey.checked.disabled .icheck_line-icon,
+ .iradio_line-grey.checked.disabled .icheck_line-icon {
+ background-position: -45px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_line-grey .icheck_line-icon,
+ .iradio_line-grey .icheck_line-icon {
+ background-image: url(line@2x.png);
+ -webkit-background-size: 60px 13px;
+ background-size: 60px 13px;
+ }
+}
+
+/* orange */
+.icheckbox_line-orange,
+.iradio_line-orange {
+ position: relative;
+ display: block;
+ margin: 0;
+ padding: 5px 15px 5px 38px;
+ font-size: 13px;
+ line-height: 17px;
+ color: #fff;
+ background: #f70;
+ border: none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ cursor: pointer;
+}
+ .icheckbox_line-orange .icheck_line-icon,
+ .iradio_line-orange .icheck_line-icon {
+ position: absolute;
+ top: 50%;
+ left: 13px;
+ width: 13px;
+ height: 11px;
+ margin: -5px 0 0 0;
+ padding: 0;
+ overflow: hidden;
+ background: url(line.png) no-repeat;
+ border: none;
+ }
+ .icheckbox_line-orange.hover,
+ .icheckbox_line-orange.checked.hover,
+ .iradio_line-orange.hover {
+ background: #FF9233;
+ }
+ .icheckbox_line-orange.checked,
+ .iradio_line-orange.checked {
+ background: #f70;
+ }
+ .icheckbox_line-orange.checked .icheck_line-icon,
+ .iradio_line-orange.checked .icheck_line-icon {
+ background-position: -15px 0;
+ }
+ .icheckbox_line-orange.disabled,
+ .iradio_line-orange.disabled {
+ background: #FFD6B3;
+ cursor: default;
+ }
+ .icheckbox_line-orange.disabled .icheck_line-icon,
+ .iradio_line-orange.disabled .icheck_line-icon {
+ background-position: -30px 0;
+ }
+ .icheckbox_line-orange.checked.disabled,
+ .iradio_line-orange.checked.disabled {
+ background: #FFD6B3;
+ }
+ .icheckbox_line-orange.checked.disabled .icheck_line-icon,
+ .iradio_line-orange.checked.disabled .icheck_line-icon {
+ background-position: -45px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_line-orange .icheck_line-icon,
+ .iradio_line-orange .icheck_line-icon {
+ background-image: url(line@2x.png);
+ -webkit-background-size: 60px 13px;
+ background-size: 60px 13px;
+ }
+}
+
+/* yellow */
+.icheckbox_line-yellow,
+.iradio_line-yellow {
+ position: relative;
+ display: block;
+ margin: 0;
+ padding: 5px 15px 5px 38px;
+ font-size: 13px;
+ line-height: 17px;
+ color: #fff;
+ background: #FFC414;
+ border: none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ cursor: pointer;
+}
+ .icheckbox_line-yellow .icheck_line-icon,
+ .iradio_line-yellow .icheck_line-icon {
+ position: absolute;
+ top: 50%;
+ left: 13px;
+ width: 13px;
+ height: 11px;
+ margin: -5px 0 0 0;
+ padding: 0;
+ overflow: hidden;
+ background: url(line.png) no-repeat;
+ border: none;
+ }
+ .icheckbox_line-yellow.hover,
+ .icheckbox_line-yellow.checked.hover,
+ .iradio_line-yellow.hover {
+ background: #FFD34F;
+ }
+ .icheckbox_line-yellow.checked,
+ .iradio_line-yellow.checked {
+ background: #FFC414;
+ }
+ .icheckbox_line-yellow.checked .icheck_line-icon,
+ .iradio_line-yellow.checked .icheck_line-icon {
+ background-position: -15px 0;
+ }
+ .icheckbox_line-yellow.disabled,
+ .iradio_line-yellow.disabled {
+ background: #FFE495;
+ cursor: default;
+ }
+ .icheckbox_line-yellow.disabled .icheck_line-icon,
+ .iradio_line-yellow.disabled .icheck_line-icon {
+ background-position: -30px 0;
+ }
+ .icheckbox_line-yellow.checked.disabled,
+ .iradio_line-yellow.checked.disabled {
+ background: #FFE495;
+ }
+ .icheckbox_line-yellow.checked.disabled .icheck_line-icon,
+ .iradio_line-yellow.checked.disabled .icheck_line-icon {
+ background-position: -45px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_line-yellow .icheck_line-icon,
+ .iradio_line-yellow .icheck_line-icon {
+ background-image: url(line@2x.png);
+ -webkit-background-size: 60px 13px;
+ background-size: 60px 13px;
+ }
+}
+
+/* pink */
+.icheckbox_line-pink,
+.iradio_line-pink {
+ position: relative;
+ display: block;
+ margin: 0;
+ padding: 5px 15px 5px 38px;
+ font-size: 13px;
+ line-height: 17px;
+ color: #fff;
+ background: #a77a94;
+ border: none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ cursor: pointer;
+}
+ .icheckbox_line-pink .icheck_line-icon,
+ .iradio_line-pink .icheck_line-icon {
+ position: absolute;
+ top: 50%;
+ left: 13px;
+ width: 13px;
+ height: 11px;
+ margin: -5px 0 0 0;
+ padding: 0;
+ overflow: hidden;
+ background: url(line.png) no-repeat;
+ border: none;
+ }
+ .icheckbox_line-pink.hover,
+ .icheckbox_line-pink.checked.hover,
+ .iradio_line-pink.hover {
+ background: #B995A9;
+ }
+ .icheckbox_line-pink.checked,
+ .iradio_line-pink.checked {
+ background: #a77a94;
+ }
+ .icheckbox_line-pink.checked .icheck_line-icon,
+ .iradio_line-pink.checked .icheck_line-icon {
+ background-position: -15px 0;
+ }
+ .icheckbox_line-pink.disabled,
+ .iradio_line-pink.disabled {
+ background: #E0D0DA;
+ cursor: default;
+ }
+ .icheckbox_line-pink.disabled .icheck_line-icon,
+ .iradio_line-pink.disabled .icheck_line-icon {
+ background-position: -30px 0;
+ }
+ .icheckbox_line-pink.checked.disabled,
+ .iradio_line-pink.checked.disabled {
+ background: #E0D0DA;
+ }
+ .icheckbox_line-pink.checked.disabled .icheck_line-icon,
+ .iradio_line-pink.checked.disabled .icheck_line-icon {
+ background-position: -45px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_line-pink .icheck_line-icon,
+ .iradio_line-pink .icheck_line-icon {
+ background-image: url(line@2x.png);
+ -webkit-background-size: 60px 13px;
+ background-size: 60px 13px;
+ }
+}
+
+/* purple */
+.icheckbox_line-purple,
+.iradio_line-purple {
+ position: relative;
+ display: block;
+ margin: 0;
+ padding: 5px 15px 5px 38px;
+ font-size: 13px;
+ line-height: 17px;
+ color: #fff;
+ background: #6a5a8c;
+ border: none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ cursor: pointer;
+}
+ .icheckbox_line-purple .icheck_line-icon,
+ .iradio_line-purple .icheck_line-icon {
+ position: absolute;
+ top: 50%;
+ left: 13px;
+ width: 13px;
+ height: 11px;
+ margin: -5px 0 0 0;
+ padding: 0;
+ overflow: hidden;
+ background: url(line.png) no-repeat;
+ border: none;
+ }
+ .icheckbox_line-purple.hover,
+ .icheckbox_line-purple.checked.hover,
+ .iradio_line-purple.hover {
+ background: #8677A7;
+ }
+ .icheckbox_line-purple.checked,
+ .iradio_line-purple.checked {
+ background: #6a5a8c;
+ }
+ .icheckbox_line-purple.checked .icheck_line-icon,
+ .iradio_line-purple.checked .icheck_line-icon {
+ background-position: -15px 0;
+ }
+ .icheckbox_line-purple.disabled,
+ .iradio_line-purple.disabled {
+ background: #D2CCDE;
+ cursor: default;
+ }
+ .icheckbox_line-purple.disabled .icheck_line-icon,
+ .iradio_line-purple.disabled .icheck_line-icon {
+ background-position: -30px 0;
+ }
+ .icheckbox_line-purple.checked.disabled,
+ .iradio_line-purple.checked.disabled {
+ background: #D2CCDE;
+ }
+ .icheckbox_line-purple.checked.disabled .icheck_line-icon,
+ .iradio_line-purple.checked.disabled .icheck_line-icon {
+ background-position: -45px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_line-purple .icheck_line-icon,
+ .iradio_line-purple .icheck_line-icon {
+ background-image: url(line@2x.png);
+ -webkit-background-size: 60px 13px;
+ background-size: 60px 13px;
+ }
+}
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/line/aero.css b/common/src/main/webapp/thirdparty/icheck/skins/line/aero.css
new file mode 100644
index 0000000..e6dd82a
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/line/aero.css
@@ -0,0 +1,71 @@
+/* iCheck plugin Line skin, aero
+----------------------------------- */
+.icheckbox_line-aero,
+.iradio_line-aero {
+ position: relative;
+ display: block;
+ margin: 0;
+ padding: 5px 15px 5px 38px;
+ font-size: 13px;
+ line-height: 17px;
+ color: #fff;
+ background: #9cc2cb;
+ border: none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ cursor: pointer;
+}
+ .icheckbox_line-aero .icheck_line-icon,
+ .iradio_line-aero .icheck_line-icon {
+ position: absolute;
+ top: 50%;
+ left: 13px;
+ width: 13px;
+ height: 11px;
+ margin: -5px 0 0 0;
+ padding: 0;
+ overflow: hidden;
+ background: url(line.png) no-repeat;
+ border: none;
+ }
+ .icheckbox_line-aero.hover,
+ .icheckbox_line-aero.checked.hover,
+ .iradio_line-aero.hover {
+ background: #B5D1D8;
+ }
+ .icheckbox_line-aero.checked,
+ .iradio_line-aero.checked {
+ background: #9cc2cb;
+ }
+ .icheckbox_line-aero.checked .icheck_line-icon,
+ .iradio_line-aero.checked .icheck_line-icon {
+ background-position: -15px 0;
+ }
+ .icheckbox_line-aero.disabled,
+ .iradio_line-aero.disabled {
+ background: #D2E4E8;
+ cursor: default;
+ }
+ .icheckbox_line-aero.disabled .icheck_line-icon,
+ .iradio_line-aero.disabled .icheck_line-icon {
+ background-position: -30px 0;
+ }
+ .icheckbox_line-aero.checked.disabled,
+ .iradio_line-aero.checked.disabled {
+ background: #D2E4E8;
+ }
+ .icheckbox_line-aero.checked.disabled .icheck_line-icon,
+ .iradio_line-aero.checked.disabled .icheck_line-icon {
+ background-position: -45px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_line-aero .icheck_line-icon,
+ .iradio_line-aero .icheck_line-icon {
+ background-image: url(line@2x.png);
+ -webkit-background-size: 60px 13px;
+ background-size: 60px 13px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/line/blue.css b/common/src/main/webapp/thirdparty/icheck/skins/line/blue.css
new file mode 100644
index 0000000..8f105d9
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/line/blue.css
@@ -0,0 +1,71 @@
+/* iCheck plugin Line skin, blue
+----------------------------------- */
+.icheckbox_line-blue,
+.iradio_line-blue {
+ position: relative;
+ display: block;
+ margin: 0;
+ padding: 5px 15px 5px 38px;
+ font-size: 13px;
+ line-height: 17px;
+ color: #fff;
+ background: #2489c5;
+ border: none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ cursor: pointer;
+}
+ .icheckbox_line-blue .icheck_line-icon,
+ .iradio_line-blue .icheck_line-icon {
+ position: absolute;
+ top: 50%;
+ left: 13px;
+ width: 13px;
+ height: 11px;
+ margin: -5px 0 0 0;
+ padding: 0;
+ overflow: hidden;
+ background: url(line.png) no-repeat;
+ border: none;
+ }
+ .icheckbox_line-blue.hover,
+ .icheckbox_line-blue.checked.hover,
+ .iradio_line-blue.hover {
+ background: #3DA0DB;
+ }
+ .icheckbox_line-blue.checked,
+ .iradio_line-blue.checked {
+ background: #2489c5;
+ }
+ .icheckbox_line-blue.checked .icheck_line-icon,
+ .iradio_line-blue.checked .icheck_line-icon {
+ background-position: -15px 0;
+ }
+ .icheckbox_line-blue.disabled,
+ .iradio_line-blue.disabled {
+ background: #ADD7F0;
+ cursor: default;
+ }
+ .icheckbox_line-blue.disabled .icheck_line-icon,
+ .iradio_line-blue.disabled .icheck_line-icon {
+ background-position: -30px 0;
+ }
+ .icheckbox_line-blue.checked.disabled,
+ .iradio_line-blue.checked.disabled {
+ background: #ADD7F0;
+ }
+ .icheckbox_line-blue.checked.disabled .icheck_line-icon,
+ .iradio_line-blue.checked.disabled .icheck_line-icon {
+ background-position: -45px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_line-blue .icheck_line-icon,
+ .iradio_line-blue .icheck_line-icon {
+ background-image: url(line@2x.png);
+ -webkit-background-size: 60px 13px;
+ background-size: 60px 13px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/line/green.css b/common/src/main/webapp/thirdparty/icheck/skins/line/green.css
new file mode 100644
index 0000000..9535c7c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/line/green.css
@@ -0,0 +1,71 @@
+/* iCheck plugin Line skin, green
+----------------------------------- */
+.icheckbox_line-green,
+.iradio_line-green {
+ position: relative;
+ display: block;
+ margin: 0;
+ padding: 5px 15px 5px 38px;
+ font-size: 13px;
+ line-height: 17px;
+ color: #fff;
+ background: #1b7e5a;
+ border: none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ cursor: pointer;
+}
+ .icheckbox_line-green .icheck_line-icon,
+ .iradio_line-green .icheck_line-icon {
+ position: absolute;
+ top: 50%;
+ left: 13px;
+ width: 13px;
+ height: 11px;
+ margin: -5px 0 0 0;
+ padding: 0;
+ overflow: hidden;
+ background: url(line.png) no-repeat;
+ border: none;
+ }
+ .icheckbox_line-green.hover,
+ .icheckbox_line-green.checked.hover,
+ .iradio_line-green.hover {
+ background: #24AA7A;
+ }
+ .icheckbox_line-green.checked,
+ .iradio_line-green.checked {
+ background: #1b7e5a;
+ }
+ .icheckbox_line-green.checked .icheck_line-icon,
+ .iradio_line-green.checked .icheck_line-icon {
+ background-position: -15px 0;
+ }
+ .icheckbox_line-green.disabled,
+ .iradio_line-green.disabled {
+ background: #89E6C4;
+ cursor: default;
+ }
+ .icheckbox_line-green.disabled .icheck_line-icon,
+ .iradio_line-green.disabled .icheck_line-icon {
+ background-position: -30px 0;
+ }
+ .icheckbox_line-green.checked.disabled,
+ .iradio_line-green.checked.disabled {
+ background: #89E6C4;
+ }
+ .icheckbox_line-green.checked.disabled .icheck_line-icon,
+ .iradio_line-green.checked.disabled .icheck_line-icon {
+ background-position: -45px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_line-green .icheck_line-icon,
+ .iradio_line-green .icheck_line-icon {
+ background-image: url(line@2x.png);
+ -webkit-background-size: 60px 13px;
+ background-size: 60px 13px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/line/grey.css b/common/src/main/webapp/thirdparty/icheck/skins/line/grey.css
new file mode 100644
index 0000000..9e34053
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/line/grey.css
@@ -0,0 +1,71 @@
+/* iCheck plugin Line skin, grey
+----------------------------------- */
+.icheckbox_line-grey,
+.iradio_line-grey {
+ position: relative;
+ display: block;
+ margin: 0;
+ padding: 5px 15px 5px 38px;
+ font-size: 13px;
+ line-height: 17px;
+ color: #fff;
+ background: #73716e;
+ border: none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ cursor: pointer;
+}
+ .icheckbox_line-grey .icheck_line-icon,
+ .iradio_line-grey .icheck_line-icon {
+ position: absolute;
+ top: 50%;
+ left: 13px;
+ width: 13px;
+ height: 11px;
+ margin: -5px 0 0 0;
+ padding: 0;
+ overflow: hidden;
+ background: url(line.png) no-repeat;
+ border: none;
+ }
+ .icheckbox_line-grey.hover,
+ .icheckbox_line-grey.checked.hover,
+ .iradio_line-grey.hover {
+ background: #8B8986;
+ }
+ .icheckbox_line-grey.checked,
+ .iradio_line-grey.checked {
+ background: #73716e;
+ }
+ .icheckbox_line-grey.checked .icheck_line-icon,
+ .iradio_line-grey.checked .icheck_line-icon {
+ background-position: -15px 0;
+ }
+ .icheckbox_line-grey.disabled,
+ .iradio_line-grey.disabled {
+ background: #D5D4D3;
+ cursor: default;
+ }
+ .icheckbox_line-grey.disabled .icheck_line-icon,
+ .iradio_line-grey.disabled .icheck_line-icon {
+ background-position: -30px 0;
+ }
+ .icheckbox_line-grey.checked.disabled,
+ .iradio_line-grey.checked.disabled {
+ background: #D5D4D3;
+ }
+ .icheckbox_line-grey.checked.disabled .icheck_line-icon,
+ .iradio_line-grey.checked.disabled .icheck_line-icon {
+ background-position: -45px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_line-grey .icheck_line-icon,
+ .iradio_line-grey .icheck_line-icon {
+ background-image: url(line@2x.png);
+ -webkit-background-size: 60px 13px;
+ background-size: 60px 13px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/line/line.css b/common/src/main/webapp/thirdparty/icheck/skins/line/line.css
new file mode 100644
index 0000000..2173a25
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/line/line.css
@@ -0,0 +1,71 @@
+/* iCheck plugin Line skin, black
+----------------------------------- */
+.icheckbox_line,
+.iradio_line {
+ position: relative;
+ display: block;
+ margin: 0;
+ padding: 5px 15px 5px 38px;
+ font-size: 13px;
+ line-height: 17px;
+ color: #fff;
+ background: #000;
+ border: none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ cursor: pointer;
+}
+ .icheckbox_line .icheck_line-icon,
+ .iradio_line .icheck_line-icon {
+ position: absolute;
+ top: 50%;
+ left: 13px;
+ width: 13px;
+ height: 11px;
+ margin: -5px 0 0 0;
+ padding: 0;
+ overflow: hidden;
+ background: url(line.png) no-repeat;
+ border: none;
+ }
+ .icheckbox_line.hover,
+ .icheckbox_line.checked.hover,
+ .iradio_line.hover {
+ background: #444;
+ }
+ .icheckbox_line.checked,
+ .iradio_line.checked {
+ background: #000;
+ }
+ .icheckbox_line.checked .icheck_line-icon,
+ .iradio_line.checked .icheck_line-icon {
+ background-position: -15px 0;
+ }
+ .icheckbox_line.disabled,
+ .iradio_line.disabled {
+ background: #ccc;
+ cursor: default;
+ }
+ .icheckbox_line.disabled .icheck_line-icon,
+ .iradio_line.disabled .icheck_line-icon {
+ background-position: -30px 0;
+ }
+ .icheckbox_line.checked.disabled,
+ .iradio_line.checked.disabled {
+ background: #ccc;
+ }
+ .icheckbox_line.checked.disabled .icheck_line-icon,
+ .iradio_line.checked.disabled .icheck_line-icon {
+ background-position: -45px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_line .icheck_line-icon,
+ .iradio_line .icheck_line-icon {
+ background-image: url(line@2x.png);
+ -webkit-background-size: 60px 13px;
+ background-size: 60px 13px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/line/line.png b/common/src/main/webapp/thirdparty/icheck/skins/line/line.png
new file mode 100644
index 0000000..d21d7a7
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/line/line.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/line/line@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/line/line@2x.png
new file mode 100644
index 0000000..62900a2
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/line/line@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/line/orange.css b/common/src/main/webapp/thirdparty/icheck/skins/line/orange.css
new file mode 100644
index 0000000..e408a6a
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/line/orange.css
@@ -0,0 +1,71 @@
+/* iCheck plugin Line skin, orange
+----------------------------------- */
+.icheckbox_line-orange,
+.iradio_line-orange {
+ position: relative;
+ display: block;
+ margin: 0;
+ padding: 5px 15px 5px 38px;
+ font-size: 13px;
+ line-height: 17px;
+ color: #fff;
+ background: #f70;
+ border: none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ cursor: pointer;
+}
+ .icheckbox_line-orange .icheck_line-icon,
+ .iradio_line-orange .icheck_line-icon {
+ position: absolute;
+ top: 50%;
+ left: 13px;
+ width: 13px;
+ height: 11px;
+ margin: -5px 0 0 0;
+ padding: 0;
+ overflow: hidden;
+ background: url(line.png) no-repeat;
+ border: none;
+ }
+ .icheckbox_line-orange.hover,
+ .icheckbox_line-orange.checked.hover,
+ .iradio_line-orange.hover {
+ background: #FF9233;
+ }
+ .icheckbox_line-orange.checked,
+ .iradio_line-orange.checked {
+ background: #f70;
+ }
+ .icheckbox_line-orange.checked .icheck_line-icon,
+ .iradio_line-orange.checked .icheck_line-icon {
+ background-position: -15px 0;
+ }
+ .icheckbox_line-orange.disabled,
+ .iradio_line-orange.disabled {
+ background: #FFD6B3;
+ cursor: default;
+ }
+ .icheckbox_line-orange.disabled .icheck_line-icon,
+ .iradio_line-orange.disabled .icheck_line-icon {
+ background-position: -30px 0;
+ }
+ .icheckbox_line-orange.checked.disabled,
+ .iradio_line-orange.checked.disabled {
+ background: #FFD6B3;
+ }
+ .icheckbox_line-orange.checked.disabled .icheck_line-icon,
+ .iradio_line-orange.checked.disabled .icheck_line-icon {
+ background-position: -45px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_line-orange .icheck_line-icon,
+ .iradio_line-orange .icheck_line-icon {
+ background-image: url(line@2x.png);
+ -webkit-background-size: 60px 13px;
+ background-size: 60px 13px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/line/pink.css b/common/src/main/webapp/thirdparty/icheck/skins/line/pink.css
new file mode 100644
index 0000000..d19459e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/line/pink.css
@@ -0,0 +1,71 @@
+/* iCheck plugin Line skin, pink
+----------------------------------- */
+.icheckbox_line-pink,
+.iradio_line-pink {
+ position: relative;
+ display: block;
+ margin: 0;
+ padding: 5px 15px 5px 38px;
+ font-size: 13px;
+ line-height: 17px;
+ color: #fff;
+ background: #a77a94;
+ border: none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ cursor: pointer;
+}
+ .icheckbox_line-pink .icheck_line-icon,
+ .iradio_line-pink .icheck_line-icon {
+ position: absolute;
+ top: 50%;
+ left: 13px;
+ width: 13px;
+ height: 11px;
+ margin: -5px 0 0 0;
+ padding: 0;
+ overflow: hidden;
+ background: url(line.png) no-repeat;
+ border: none;
+ }
+ .icheckbox_line-pink.hover,
+ .icheckbox_line-pink.checked.hover,
+ .iradio_line-pink.hover {
+ background: #B995A9;
+ }
+ .icheckbox_line-pink.checked,
+ .iradio_line-pink.checked {
+ background: #a77a94;
+ }
+ .icheckbox_line-pink.checked .icheck_line-icon,
+ .iradio_line-pink.checked .icheck_line-icon {
+ background-position: -15px 0;
+ }
+ .icheckbox_line-pink.disabled,
+ .iradio_line-pink.disabled {
+ background: #E0D0DA;
+ cursor: default;
+ }
+ .icheckbox_line-pink.disabled .icheck_line-icon,
+ .iradio_line-pink.disabled .icheck_line-icon {
+ background-position: -30px 0;
+ }
+ .icheckbox_line-pink.checked.disabled,
+ .iradio_line-pink.checked.disabled {
+ background: #E0D0DA;
+ }
+ .icheckbox_line-pink.checked.disabled .icheck_line-icon,
+ .iradio_line-pink.checked.disabled .icheck_line-icon {
+ background-position: -45px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_line-pink .icheck_line-icon,
+ .iradio_line-pink .icheck_line-icon {
+ background-image: url(line@2x.png);
+ -webkit-background-size: 60px 13px;
+ background-size: 60px 13px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/line/purple.css b/common/src/main/webapp/thirdparty/icheck/skins/line/purple.css
new file mode 100644
index 0000000..ecca700
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/line/purple.css
@@ -0,0 +1,71 @@
+/* iCheck plugin Line skin, purple
+----------------------------------- */
+.icheckbox_line-purple,
+.iradio_line-purple {
+ position: relative;
+ display: block;
+ margin: 0;
+ padding: 5px 15px 5px 38px;
+ font-size: 13px;
+ line-height: 17px;
+ color: #fff;
+ background: #6a5a8c;
+ border: none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ cursor: pointer;
+}
+ .icheckbox_line-purple .icheck_line-icon,
+ .iradio_line-purple .icheck_line-icon {
+ position: absolute;
+ top: 50%;
+ left: 13px;
+ width: 13px;
+ height: 11px;
+ margin: -5px 0 0 0;
+ padding: 0;
+ overflow: hidden;
+ background: url(line.png) no-repeat;
+ border: none;
+ }
+ .icheckbox_line-purple.hover,
+ .icheckbox_line-purple.checked.hover,
+ .iradio_line-purple.hover {
+ background: #8677A7;
+ }
+ .icheckbox_line-purple.checked,
+ .iradio_line-purple.checked {
+ background: #6a5a8c;
+ }
+ .icheckbox_line-purple.checked .icheck_line-icon,
+ .iradio_line-purple.checked .icheck_line-icon {
+ background-position: -15px 0;
+ }
+ .icheckbox_line-purple.disabled,
+ .iradio_line-purple.disabled {
+ background: #D2CCDE;
+ cursor: default;
+ }
+ .icheckbox_line-purple.disabled .icheck_line-icon,
+ .iradio_line-purple.disabled .icheck_line-icon {
+ background-position: -30px 0;
+ }
+ .icheckbox_line-purple.checked.disabled,
+ .iradio_line-purple.checked.disabled {
+ background: #D2CCDE;
+ }
+ .icheckbox_line-purple.checked.disabled .icheck_line-icon,
+ .iradio_line-purple.checked.disabled .icheck_line-icon {
+ background-position: -45px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_line-purple .icheck_line-icon,
+ .iradio_line-purple .icheck_line-icon {
+ background-image: url(line@2x.png);
+ -webkit-background-size: 60px 13px;
+ background-size: 60px 13px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/line/red.css b/common/src/main/webapp/thirdparty/icheck/skins/line/red.css
new file mode 100644
index 0000000..3a8aee2
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/line/red.css
@@ -0,0 +1,71 @@
+/* iCheck plugin Line skin, red
+----------------------------------- */
+.icheckbox_line-red,
+.iradio_line-red {
+ position: relative;
+ display: block;
+ margin: 0;
+ padding: 5px 15px 5px 38px;
+ font-size: 13px;
+ line-height: 17px;
+ color: #fff;
+ background: #e56c69;
+ border: none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ cursor: pointer;
+}
+ .icheckbox_line-red .icheck_line-icon,
+ .iradio_line-red .icheck_line-icon {
+ position: absolute;
+ top: 50%;
+ left: 13px;
+ width: 13px;
+ height: 11px;
+ margin: -5px 0 0 0;
+ padding: 0;
+ overflow: hidden;
+ background: url(line.png) no-repeat;
+ border: none;
+ }
+ .icheckbox_line-red.hover,
+ .icheckbox_line-red.checked.hover,
+ .iradio_line-red.hover {
+ background: #E98582;
+ }
+ .icheckbox_line-red.checked,
+ .iradio_line-red.checked {
+ background: #e56c69;
+ }
+ .icheckbox_line-red.checked .icheck_line-icon,
+ .iradio_line-red.checked .icheck_line-icon {
+ background-position: -15px 0;
+ }
+ .icheckbox_line-red.disabled,
+ .iradio_line-red.disabled {
+ background: #F7D3D2;
+ cursor: default;
+ }
+ .icheckbox_line-red.disabled .icheck_line-icon,
+ .iradio_line-red.disabled .icheck_line-icon {
+ background-position: -30px 0;
+ }
+ .icheckbox_line-red.checked.disabled,
+ .iradio_line-red.checked.disabled {
+ background: #F7D3D2;
+ }
+ .icheckbox_line-red.checked.disabled .icheck_line-icon,
+ .iradio_line-red.checked.disabled .icheck_line-icon {
+ background-position: -45px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_line-red .icheck_line-icon,
+ .iradio_line-red .icheck_line-icon {
+ background-image: url(line@2x.png);
+ -webkit-background-size: 60px 13px;
+ background-size: 60px 13px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/line/yellow.css b/common/src/main/webapp/thirdparty/icheck/skins/line/yellow.css
new file mode 100644
index 0000000..c6eaccf
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/line/yellow.css
@@ -0,0 +1,71 @@
+/* iCheck plugin Line skin, yellow
+----------------------------------- */
+.icheckbox_line-yellow,
+.iradio_line-yellow {
+ position: relative;
+ display: block;
+ margin: 0;
+ padding: 5px 15px 5px 38px;
+ font-size: 13px;
+ line-height: 17px;
+ color: #fff;
+ background: #FFC414;
+ border: none;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ cursor: pointer;
+}
+ .icheckbox_line-yellow .icheck_line-icon,
+ .iradio_line-yellow .icheck_line-icon {
+ position: absolute;
+ top: 50%;
+ left: 13px;
+ width: 13px;
+ height: 11px;
+ margin: -5px 0 0 0;
+ padding: 0;
+ overflow: hidden;
+ background: url(line.png) no-repeat;
+ border: none;
+ }
+ .icheckbox_line-yellow.hover,
+ .icheckbox_line-yellow.checked.hover,
+ .iradio_line-yellow.hover {
+ background: #FFD34F;
+ }
+ .icheckbox_line-yellow.checked,
+ .iradio_line-yellow.checked {
+ background: #FFC414;
+ }
+ .icheckbox_line-yellow.checked .icheck_line-icon,
+ .iradio_line-yellow.checked .icheck_line-icon {
+ background-position: -15px 0;
+ }
+ .icheckbox_line-yellow.disabled,
+ .iradio_line-yellow.disabled {
+ background: #FFE495;
+ cursor: default;
+ }
+ .icheckbox_line-yellow.disabled .icheck_line-icon,
+ .iradio_line-yellow.disabled .icheck_line-icon {
+ background-position: -30px 0;
+ }
+ .icheckbox_line-yellow.checked.disabled,
+ .iradio_line-yellow.checked.disabled {
+ background: #FFE495;
+ }
+ .icheckbox_line-yellow.checked.disabled .icheck_line-icon,
+ .iradio_line-yellow.checked.disabled .icheck_line-icon {
+ background-position: -45px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_line-yellow .icheck_line-icon,
+ .iradio_line-yellow .icheck_line-icon {
+ background-image: url(line@2x.png);
+ -webkit-background-size: 60px 13px;
+ background-size: 60px 13px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/_all.css b/common/src/main/webapp/thirdparty/icheck/skins/minimal/_all.css
new file mode 100644
index 0000000..61043e3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/_all.css
@@ -0,0 +1,590 @@
+/* iCheck plugin Minimal skin
+----------------------------------- */
+.icheckbox_minimal,
+.iradio_minimal {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 18px;
+ height: 18px;
+ background: url(minimal.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_minimal {
+ background-position: 0 0;
+}
+ .icheckbox_minimal.hover {
+ background-position: -20px 0;
+ }
+ .icheckbox_minimal.checked {
+ background-position: -40px 0;
+ }
+ .icheckbox_minimal.disabled {
+ background-position: -60px 0;
+ cursor: default;
+ }
+ .icheckbox_minimal.checked.disabled {
+ background-position: -80px 0;
+ }
+
+.iradio_minimal {
+ background-position: -100px 0;
+}
+ .iradio_minimal.hover {
+ background-position: -120px 0;
+ }
+ .iradio_minimal.checked {
+ background-position: -140px 0;
+ }
+ .iradio_minimal.disabled {
+ background-position: -160px 0;
+ cursor: default;
+ }
+ .iradio_minimal.checked.disabled {
+ background-position: -180px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_minimal,
+ .iradio_minimal {
+ background-image: url(minimal@2x.png);
+ -webkit-background-size: 200px 20px;
+ background-size: 200px 20px;
+ }
+}
+
+/* red */
+.icheckbox_minimal-red,
+.iradio_minimal-red {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 18px;
+ height: 18px;
+ background: url(red.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_minimal-red {
+ background-position: 0 0;
+}
+ .icheckbox_minimal-red.hover {
+ background-position: -20px 0;
+ }
+ .icheckbox_minimal-red.checked {
+ background-position: -40px 0;
+ }
+ .icheckbox_minimal-red.disabled {
+ background-position: -60px 0;
+ cursor: default;
+ }
+ .icheckbox_minimal-red.checked.disabled {
+ background-position: -80px 0;
+ }
+
+.iradio_minimal-red {
+ background-position: -100px 0;
+}
+ .iradio_minimal-red.hover {
+ background-position: -120px 0;
+ }
+ .iradio_minimal-red.checked {
+ background-position: -140px 0;
+ }
+ .iradio_minimal-red.disabled {
+ background-position: -160px 0;
+ cursor: default;
+ }
+ .iradio_minimal-red.checked.disabled {
+ background-position: -180px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_minimal-red,
+ .iradio_minimal-red {
+ background-image: url(red@2x.png);
+ -webkit-background-size: 200px 20px;
+ background-size: 200px 20px;
+ }
+}
+
+/* green */
+.icheckbox_minimal-green,
+.iradio_minimal-green {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 18px;
+ height: 18px;
+ background: url(green.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_minimal-green {
+ background-position: 0 0;
+}
+ .icheckbox_minimal-green.hover {
+ background-position: -20px 0;
+ }
+ .icheckbox_minimal-green.checked {
+ background-position: -40px 0;
+ }
+ .icheckbox_minimal-green.disabled {
+ background-position: -60px 0;
+ cursor: default;
+ }
+ .icheckbox_minimal-green.checked.disabled {
+ background-position: -80px 0;
+ }
+
+.iradio_minimal-green {
+ background-position: -100px 0;
+}
+ .iradio_minimal-green.hover {
+ background-position: -120px 0;
+ }
+ .iradio_minimal-green.checked {
+ background-position: -140px 0;
+ }
+ .iradio_minimal-green.disabled {
+ background-position: -160px 0;
+ cursor: default;
+ }
+ .iradio_minimal-green.checked.disabled {
+ background-position: -180px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_minimal-green,
+ .iradio_minimal-green {
+ background-image: url(green@2x.png);
+ -webkit-background-size: 200px 20px;
+ background-size: 200px 20px;
+ }
+}
+
+/* blue */
+.icheckbox_minimal-blue,
+.iradio_minimal-blue {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 18px;
+ height: 18px;
+ background: url(blue.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_minimal-blue {
+ background-position: 0 0;
+}
+ .icheckbox_minimal-blue.hover {
+ background-position: -20px 0;
+ }
+ .icheckbox_minimal-blue.checked {
+ background-position: -40px 0;
+ }
+ .icheckbox_minimal-blue.disabled {
+ background-position: -60px 0;
+ cursor: default;
+ }
+ .icheckbox_minimal-blue.checked.disabled {
+ background-position: -80px 0;
+ }
+
+.iradio_minimal-blue {
+ background-position: -100px 0;
+}
+ .iradio_minimal-blue.hover {
+ background-position: -120px 0;
+ }
+ .iradio_minimal-blue.checked {
+ background-position: -140px 0;
+ }
+ .iradio_minimal-blue.disabled {
+ background-position: -160px 0;
+ cursor: default;
+ }
+ .iradio_minimal-blue.checked.disabled {
+ background-position: -180px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_minimal-blue,
+ .iradio_minimal-blue {
+ background-image: url(blue@2x.png);
+ -webkit-background-size: 200px 20px;
+ background-size: 200px 20px;
+ }
+}
+
+/* aero */
+.icheckbox_minimal-aero,
+.iradio_minimal-aero {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 18px;
+ height: 18px;
+ background: url(aero.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_minimal-aero {
+ background-position: 0 0;
+}
+ .icheckbox_minimal-aero.hover {
+ background-position: -20px 0;
+ }
+ .icheckbox_minimal-aero.checked {
+ background-position: -40px 0;
+ }
+ .icheckbox_minimal-aero.disabled {
+ background-position: -60px 0;
+ cursor: default;
+ }
+ .icheckbox_minimal-aero.checked.disabled {
+ background-position: -80px 0;
+ }
+
+.iradio_minimal-aero {
+ background-position: -100px 0;
+}
+ .iradio_minimal-aero.hover {
+ background-position: -120px 0;
+ }
+ .iradio_minimal-aero.checked {
+ background-position: -140px 0;
+ }
+ .iradio_minimal-aero.disabled {
+ background-position: -160px 0;
+ cursor: default;
+ }
+ .iradio_minimal-aero.checked.disabled {
+ background-position: -180px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_minimal-aero,
+ .iradio_minimal-aero {
+ background-image: url(aero@2x.png);
+ -webkit-background-size: 200px 20px;
+ background-size: 200px 20px;
+ }
+}
+
+/* grey */
+.icheckbox_minimal-grey,
+.iradio_minimal-grey {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 18px;
+ height: 18px;
+ background: url(grey.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_minimal-grey {
+ background-position: 0 0;
+}
+ .icheckbox_minimal-grey.hover {
+ background-position: -20px 0;
+ }
+ .icheckbox_minimal-grey.checked {
+ background-position: -40px 0;
+ }
+ .icheckbox_minimal-grey.disabled {
+ background-position: -60px 0;
+ cursor: default;
+ }
+ .icheckbox_minimal-grey.checked.disabled {
+ background-position: -80px 0;
+ }
+
+.iradio_minimal-grey {
+ background-position: -100px 0;
+}
+ .iradio_minimal-grey.hover {
+ background-position: -120px 0;
+ }
+ .iradio_minimal-grey.checked {
+ background-position: -140px 0;
+ }
+ .iradio_minimal-grey.disabled {
+ background-position: -160px 0;
+ cursor: default;
+ }
+ .iradio_minimal-grey.checked.disabled {
+ background-position: -180px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_minimal-grey,
+ .iradio_minimal-grey {
+ background-image: url(grey@2x.png);
+ -webkit-background-size: 200px 20px;
+ background-size: 200px 20px;
+ }
+}
+
+/* orange */
+.icheckbox_minimal-orange,
+.iradio_minimal-orange {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 18px;
+ height: 18px;
+ background: url(orange.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_minimal-orange {
+ background-position: 0 0;
+}
+ .icheckbox_minimal-orange.hover {
+ background-position: -20px 0;
+ }
+ .icheckbox_minimal-orange.checked {
+ background-position: -40px 0;
+ }
+ .icheckbox_minimal-orange.disabled {
+ background-position: -60px 0;
+ cursor: default;
+ }
+ .icheckbox_minimal-orange.checked.disabled {
+ background-position: -80px 0;
+ }
+
+.iradio_minimal-orange {
+ background-position: -100px 0;
+}
+ .iradio_minimal-orange.hover {
+ background-position: -120px 0;
+ }
+ .iradio_minimal-orange.checked {
+ background-position: -140px 0;
+ }
+ .iradio_minimal-orange.disabled {
+ background-position: -160px 0;
+ cursor: default;
+ }
+ .iradio_minimal-orange.checked.disabled {
+ background-position: -180px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_minimal-orange,
+ .iradio_minimal-orange {
+ background-image: url(orange@2x.png);
+ -webkit-background-size: 200px 20px;
+ background-size: 200px 20px;
+ }
+}
+
+/* yellow */
+.icheckbox_minimal-yellow,
+.iradio_minimal-yellow {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 18px;
+ height: 18px;
+ background: url(yellow.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_minimal-yellow {
+ background-position: 0 0;
+}
+ .icheckbox_minimal-yellow.hover {
+ background-position: -20px 0;
+ }
+ .icheckbox_minimal-yellow.checked {
+ background-position: -40px 0;
+ }
+ .icheckbox_minimal-yellow.disabled {
+ background-position: -60px 0;
+ cursor: default;
+ }
+ .icheckbox_minimal-yellow.checked.disabled {
+ background-position: -80px 0;
+ }
+
+.iradio_minimal-yellow {
+ background-position: -100px 0;
+}
+ .iradio_minimal-yellow.hover {
+ background-position: -120px 0;
+ }
+ .iradio_minimal-yellow.checked {
+ background-position: -140px 0;
+ }
+ .iradio_minimal-yellow.disabled {
+ background-position: -160px 0;
+ cursor: default;
+ }
+ .iradio_minimal-yellow.checked.disabled {
+ background-position: -180px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_minimal-yellow,
+ .iradio_minimal-yellow {
+ background-image: url(yellow@2x.png);
+ -webkit-background-size: 200px 20px;
+ background-size: 200px 20px;
+ }
+}
+
+/* pink */
+.icheckbox_minimal-pink,
+.iradio_minimal-pink {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 18px;
+ height: 18px;
+ background: url(pink.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_minimal-pink {
+ background-position: 0 0;
+}
+ .icheckbox_minimal-pink.hover {
+ background-position: -20px 0;
+ }
+ .icheckbox_minimal-pink.checked {
+ background-position: -40px 0;
+ }
+ .icheckbox_minimal-pink.disabled {
+ background-position: -60px 0;
+ cursor: default;
+ }
+ .icheckbox_minimal-pink.checked.disabled {
+ background-position: -80px 0;
+ }
+
+.iradio_minimal-pink {
+ background-position: -100px 0;
+}
+ .iradio_minimal-pink.hover {
+ background-position: -120px 0;
+ }
+ .iradio_minimal-pink.checked {
+ background-position: -140px 0;
+ }
+ .iradio_minimal-pink.disabled {
+ background-position: -160px 0;
+ cursor: default;
+ }
+ .iradio_minimal-pink.checked.disabled {
+ background-position: -180px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_minimal-pink,
+ .iradio_minimal-pink {
+ background-image: url(pink@2x.png);
+ -webkit-background-size: 200px 20px;
+ background-size: 200px 20px;
+ }
+}
+
+/* purple */
+.icheckbox_minimal-purple,
+.iradio_minimal-purple {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 18px;
+ height: 18px;
+ background: url(purple.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_minimal-purple {
+ background-position: 0 0;
+}
+ .icheckbox_minimal-purple.hover {
+ background-position: -20px 0;
+ }
+ .icheckbox_minimal-purple.checked {
+ background-position: -40px 0;
+ }
+ .icheckbox_minimal-purple.disabled {
+ background-position: -60px 0;
+ cursor: default;
+ }
+ .icheckbox_minimal-purple.checked.disabled {
+ background-position: -80px 0;
+ }
+
+.iradio_minimal-purple {
+ background-position: -100px 0;
+}
+ .iradio_minimal-purple.hover {
+ background-position: -120px 0;
+ }
+ .iradio_minimal-purple.checked {
+ background-position: -140px 0;
+ }
+ .iradio_minimal-purple.disabled {
+ background-position: -160px 0;
+ cursor: default;
+ }
+ .iradio_minimal-purple.checked.disabled {
+ background-position: -180px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_minimal-purple,
+ .iradio_minimal-purple {
+ background-image: url(purple@2x.png);
+ -webkit-background-size: 200px 20px;
+ background-size: 200px 20px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/aero.css b/common/src/main/webapp/thirdparty/icheck/skins/minimal/aero.css
new file mode 100644
index 0000000..c0ddf79
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/aero.css
@@ -0,0 +1,59 @@
+/* iCheck plugin Minimal skin, aero
+----------------------------------- */
+.icheckbox_minimal-aero,
+.iradio_minimal-aero {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 18px;
+ height: 18px;
+ background: url(aero.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_minimal-aero {
+ background-position: 0 0;
+}
+ .icheckbox_minimal-aero.hover {
+ background-position: -20px 0;
+ }
+ .icheckbox_minimal-aero.checked {
+ background-position: -40px 0;
+ }
+ .icheckbox_minimal-aero.disabled {
+ background-position: -60px 0;
+ cursor: default;
+ }
+ .icheckbox_minimal-aero.checked.disabled {
+ background-position: -80px 0;
+ }
+
+.iradio_minimal-aero {
+ background-position: -100px 0;
+}
+ .iradio_minimal-aero.hover {
+ background-position: -120px 0;
+ }
+ .iradio_minimal-aero.checked {
+ background-position: -140px 0;
+ }
+ .iradio_minimal-aero.disabled {
+ background-position: -160px 0;
+ cursor: default;
+ }
+ .iradio_minimal-aero.checked.disabled {
+ background-position: -180px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_minimal-aero,
+ .iradio_minimal-aero {
+ background-image: url(aero@2x.png);
+ -webkit-background-size: 200px 20px;
+ background-size: 200px 20px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/aero.png b/common/src/main/webapp/thirdparty/icheck/skins/minimal/aero.png
new file mode 100644
index 0000000..dccf774
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/aero.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/aero@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/minimal/aero@2x.png
new file mode 100644
index 0000000..5537ee3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/aero@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/blue.css b/common/src/main/webapp/thirdparty/icheck/skins/minimal/blue.css
new file mode 100644
index 0000000..7205ac9
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/blue.css
@@ -0,0 +1,59 @@
+/* iCheck plugin Minimal skin, blue
+----------------------------------- */
+.icheckbox_minimal-blue,
+.iradio_minimal-blue {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 18px;
+ height: 18px;
+ background: url(blue.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_minimal-blue {
+ background-position: 0 0;
+}
+ .icheckbox_minimal-blue.hover {
+ background-position: -20px 0;
+ }
+ .icheckbox_minimal-blue.checked {
+ background-position: -40px 0;
+ }
+ .icheckbox_minimal-blue.disabled {
+ background-position: -60px 0;
+ cursor: default;
+ }
+ .icheckbox_minimal-blue.checked.disabled {
+ background-position: -80px 0;
+ }
+
+.iradio_minimal-blue {
+ background-position: -100px 0;
+}
+ .iradio_minimal-blue.hover {
+ background-position: -120px 0;
+ }
+ .iradio_minimal-blue.checked {
+ background-position: -140px 0;
+ }
+ .iradio_minimal-blue.disabled {
+ background-position: -160px 0;
+ cursor: default;
+ }
+ .iradio_minimal-blue.checked.disabled {
+ background-position: -180px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_minimal-blue,
+ .iradio_minimal-blue {
+ background-image: url(blue@2x.png);
+ -webkit-background-size: 200px 20px;
+ background-size: 200px 20px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/blue.png b/common/src/main/webapp/thirdparty/icheck/skins/minimal/blue.png
new file mode 100644
index 0000000..af04cee
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/blue.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/blue@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/minimal/blue@2x.png
new file mode 100644
index 0000000..f19210a
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/blue@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/green.css b/common/src/main/webapp/thirdparty/icheck/skins/minimal/green.css
new file mode 100644
index 0000000..ad005c1
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/green.css
@@ -0,0 +1,59 @@
+/* iCheck plugin Minimal skin, green
+----------------------------------- */
+.icheckbox_minimal-green,
+.iradio_minimal-green {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 18px;
+ height: 18px;
+ background: url(green.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_minimal-green {
+ background-position: 0 0;
+}
+ .icheckbox_minimal-green.hover {
+ background-position: -20px 0;
+ }
+ .icheckbox_minimal-green.checked {
+ background-position: -40px 0;
+ }
+ .icheckbox_minimal-green.disabled {
+ background-position: -60px 0;
+ cursor: default;
+ }
+ .icheckbox_minimal-green.checked.disabled {
+ background-position: -80px 0;
+ }
+
+.iradio_minimal-green {
+ background-position: -100px 0;
+}
+ .iradio_minimal-green.hover {
+ background-position: -120px 0;
+ }
+ .iradio_minimal-green.checked {
+ background-position: -140px 0;
+ }
+ .iradio_minimal-green.disabled {
+ background-position: -160px 0;
+ cursor: default;
+ }
+ .iradio_minimal-green.checked.disabled {
+ background-position: -180px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_minimal-green,
+ .iradio_minimal-green {
+ background-image: url(green@2x.png);
+ -webkit-background-size: 200px 20px;
+ background-size: 200px 20px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/green.png b/common/src/main/webapp/thirdparty/icheck/skins/minimal/green.png
new file mode 100644
index 0000000..9171ebc
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/green.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/green@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/minimal/green@2x.png
new file mode 100644
index 0000000..7f18f96
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/green@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/grey.css b/common/src/main/webapp/thirdparty/icheck/skins/minimal/grey.css
new file mode 100644
index 0000000..157bbd3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/grey.css
@@ -0,0 +1,59 @@
+/* iCheck plugin Minimal skin, grey
+----------------------------------- */
+.icheckbox_minimal-grey,
+.iradio_minimal-grey {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 18px;
+ height: 18px;
+ background: url(grey.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_minimal-grey {
+ background-position: 0 0;
+}
+ .icheckbox_minimal-grey.hover {
+ background-position: -20px 0;
+ }
+ .icheckbox_minimal-grey.checked {
+ background-position: -40px 0;
+ }
+ .icheckbox_minimal-grey.disabled {
+ background-position: -60px 0;
+ cursor: default;
+ }
+ .icheckbox_minimal-grey.checked.disabled {
+ background-position: -80px 0;
+ }
+
+.iradio_minimal-grey {
+ background-position: -100px 0;
+}
+ .iradio_minimal-grey.hover {
+ background-position: -120px 0;
+ }
+ .iradio_minimal-grey.checked {
+ background-position: -140px 0;
+ }
+ .iradio_minimal-grey.disabled {
+ background-position: -160px 0;
+ cursor: default;
+ }
+ .iradio_minimal-grey.checked.disabled {
+ background-position: -180px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_minimal-grey,
+ .iradio_minimal-grey {
+ background-image: url(grey@2x.png);
+ -webkit-background-size: 200px 20px;
+ background-size: 200px 20px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/grey.png b/common/src/main/webapp/thirdparty/icheck/skins/minimal/grey.png
new file mode 100644
index 0000000..22dcdbc
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/grey.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/grey@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/minimal/grey@2x.png
new file mode 100644
index 0000000..85e82dd
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/grey@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/minimal.css b/common/src/main/webapp/thirdparty/icheck/skins/minimal/minimal.css
new file mode 100644
index 0000000..f344ea6
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/minimal.css
@@ -0,0 +1,59 @@
+/* iCheck plugin Minimal skin, black
+----------------------------------- */
+.icheckbox_minimal,
+.iradio_minimal {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 18px;
+ height: 18px;
+ background: url(minimal.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_minimal {
+ background-position: 0 0;
+}
+ .icheckbox_minimal.hover {
+ background-position: -20px 0;
+ }
+ .icheckbox_minimal.checked {
+ background-position: -40px 0;
+ }
+ .icheckbox_minimal.disabled {
+ background-position: -60px 0;
+ cursor: default;
+ }
+ .icheckbox_minimal.checked.disabled {
+ background-position: -80px 0;
+ }
+
+.iradio_minimal {
+ background-position: -100px 0;
+}
+ .iradio_minimal.hover {
+ background-position: -120px 0;
+ }
+ .iradio_minimal.checked {
+ background-position: -140px 0;
+ }
+ .iradio_minimal.disabled {
+ background-position: -160px 0;
+ cursor: default;
+ }
+ .iradio_minimal.checked.disabled {
+ background-position: -180px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_minimal,
+ .iradio_minimal {
+ background-image: url(minimal@2x.png);
+ -webkit-background-size: 200px 20px;
+ background-size: 200px 20px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/minimal.png b/common/src/main/webapp/thirdparty/icheck/skins/minimal/minimal.png
new file mode 100644
index 0000000..943be16
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/minimal.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/minimal@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/minimal/minimal@2x.png
new file mode 100644
index 0000000..d62291d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/minimal@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/orange.css b/common/src/main/webapp/thirdparty/icheck/skins/minimal/orange.css
new file mode 100644
index 0000000..04779eb
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/orange.css
@@ -0,0 +1,59 @@
+/* iCheck plugin Minimal skin, orange
+----------------------------------- */
+.icheckbox_minimal-orange,
+.iradio_minimal-orange {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 18px;
+ height: 18px;
+ background: url(orange.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_minimal-orange {
+ background-position: 0 0;
+}
+ .icheckbox_minimal-orange.hover {
+ background-position: -20px 0;
+ }
+ .icheckbox_minimal-orange.checked {
+ background-position: -40px 0;
+ }
+ .icheckbox_minimal-orange.disabled {
+ background-position: -60px 0;
+ cursor: default;
+ }
+ .icheckbox_minimal-orange.checked.disabled {
+ background-position: -80px 0;
+ }
+
+.iradio_minimal-orange {
+ background-position: -100px 0;
+}
+ .iradio_minimal-orange.hover {
+ background-position: -120px 0;
+ }
+ .iradio_minimal-orange.checked {
+ background-position: -140px 0;
+ }
+ .iradio_minimal-orange.disabled {
+ background-position: -160px 0;
+ cursor: default;
+ }
+ .iradio_minimal-orange.checked.disabled {
+ background-position: -180px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_minimal-orange,
+ .iradio_minimal-orange {
+ background-image: url(orange@2x.png);
+ -webkit-background-size: 200px 20px;
+ background-size: 200px 20px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/orange.png b/common/src/main/webapp/thirdparty/icheck/skins/minimal/orange.png
new file mode 100644
index 0000000..f2a3149
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/orange.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/orange@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/minimal/orange@2x.png
new file mode 100644
index 0000000..68c8359
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/orange@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/pink.css b/common/src/main/webapp/thirdparty/icheck/skins/minimal/pink.css
new file mode 100644
index 0000000..1e2f0e4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/pink.css
@@ -0,0 +1,59 @@
+/* iCheck plugin Minimal skin, pink
+----------------------------------- */
+.icheckbox_minimal-pink,
+.iradio_minimal-pink {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 18px;
+ height: 18px;
+ background: url(pink.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_minimal-pink {
+ background-position: 0 0;
+}
+ .icheckbox_minimal-pink.hover {
+ background-position: -20px 0;
+ }
+ .icheckbox_minimal-pink.checked {
+ background-position: -40px 0;
+ }
+ .icheckbox_minimal-pink.disabled {
+ background-position: -60px 0;
+ cursor: default;
+ }
+ .icheckbox_minimal-pink.checked.disabled {
+ background-position: -80px 0;
+ }
+
+.iradio_minimal-pink {
+ background-position: -100px 0;
+}
+ .iradio_minimal-pink.hover {
+ background-position: -120px 0;
+ }
+ .iradio_minimal-pink.checked {
+ background-position: -140px 0;
+ }
+ .iradio_minimal-pink.disabled {
+ background-position: -160px 0;
+ cursor: default;
+ }
+ .iradio_minimal-pink.checked.disabled {
+ background-position: -180px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_minimal-pink,
+ .iradio_minimal-pink {
+ background-image: url(pink@2x.png);
+ -webkit-background-size: 200px 20px;
+ background-size: 200px 20px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/pink.png b/common/src/main/webapp/thirdparty/icheck/skins/minimal/pink.png
new file mode 100644
index 0000000..660553c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/pink.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/pink@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/minimal/pink@2x.png
new file mode 100644
index 0000000..7d7b385
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/pink@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/purple.css b/common/src/main/webapp/thirdparty/icheck/skins/minimal/purple.css
new file mode 100644
index 0000000..f3f8cf4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/purple.css
@@ -0,0 +1,59 @@
+/* iCheck plugin Minimal skin, purple
+----------------------------------- */
+.icheckbox_minimal-purple,
+.iradio_minimal-purple {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 18px;
+ height: 18px;
+ background: url(purple.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_minimal-purple {
+ background-position: 0 0;
+}
+ .icheckbox_minimal-purple.hover {
+ background-position: -20px 0;
+ }
+ .icheckbox_minimal-purple.checked {
+ background-position: -40px 0;
+ }
+ .icheckbox_minimal-purple.disabled {
+ background-position: -60px 0;
+ cursor: default;
+ }
+ .icheckbox_minimal-purple.checked.disabled {
+ background-position: -80px 0;
+ }
+
+.iradio_minimal-purple {
+ background-position: -100px 0;
+}
+ .iradio_minimal-purple.hover {
+ background-position: -120px 0;
+ }
+ .iradio_minimal-purple.checked {
+ background-position: -140px 0;
+ }
+ .iradio_minimal-purple.disabled {
+ background-position: -160px 0;
+ cursor: default;
+ }
+ .iradio_minimal-purple.checked.disabled {
+ background-position: -180px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_minimal-purple,
+ .iradio_minimal-purple {
+ background-image: url(purple@2x.png);
+ -webkit-background-size: 200px 20px;
+ background-size: 200px 20px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/purple.png b/common/src/main/webapp/thirdparty/icheck/skins/minimal/purple.png
new file mode 100644
index 0000000..48dec79
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/purple.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/purple@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/minimal/purple@2x.png
new file mode 100644
index 0000000..3bb7041
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/purple@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/red.css b/common/src/main/webapp/thirdparty/icheck/skins/minimal/red.css
new file mode 100644
index 0000000..0530c91
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/red.css
@@ -0,0 +1,59 @@
+/* iCheck plugin Minimal skin, red
+----------------------------------- */
+.icheckbox_minimal-red,
+.iradio_minimal-red {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 18px;
+ height: 18px;
+ background: url(red.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_minimal-red {
+ background-position: 0 0;
+}
+ .icheckbox_minimal-red.hover {
+ background-position: -20px 0;
+ }
+ .icheckbox_minimal-red.checked {
+ background-position: -40px 0;
+ }
+ .icheckbox_minimal-red.disabled {
+ background-position: -60px 0;
+ cursor: default;
+ }
+ .icheckbox_minimal-red.checked.disabled {
+ background-position: -80px 0;
+ }
+
+.iradio_minimal-red {
+ background-position: -100px 0;
+}
+ .iradio_minimal-red.hover {
+ background-position: -120px 0;
+ }
+ .iradio_minimal-red.checked {
+ background-position: -140px 0;
+ }
+ .iradio_minimal-red.disabled {
+ background-position: -160px 0;
+ cursor: default;
+ }
+ .iradio_minimal-red.checked.disabled {
+ background-position: -180px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_minimal-red,
+ .iradio_minimal-red {
+ background-image: url(red@2x.png);
+ -webkit-background-size: 200px 20px;
+ background-size: 200px 20px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/red.png b/common/src/main/webapp/thirdparty/icheck/skins/minimal/red.png
new file mode 100644
index 0000000..4443f80
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/red.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/red@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/minimal/red@2x.png
new file mode 100644
index 0000000..2eb55a6
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/red@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/yellow.css b/common/src/main/webapp/thirdparty/icheck/skins/minimal/yellow.css
new file mode 100644
index 0000000..fbd567f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/yellow.css
@@ -0,0 +1,59 @@
+/* iCheck plugin Minimal skin, yellow
+----------------------------------- */
+.icheckbox_minimal-yellow,
+.iradio_minimal-yellow {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 18px;
+ height: 18px;
+ background: url(yellow.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_minimal-yellow {
+ background-position: 0 0;
+}
+ .icheckbox_minimal-yellow.hover {
+ background-position: -20px 0;
+ }
+ .icheckbox_minimal-yellow.checked {
+ background-position: -40px 0;
+ }
+ .icheckbox_minimal-yellow.disabled {
+ background-position: -60px 0;
+ cursor: default;
+ }
+ .icheckbox_minimal-yellow.checked.disabled {
+ background-position: -80px 0;
+ }
+
+.iradio_minimal-yellow {
+ background-position: -100px 0;
+}
+ .iradio_minimal-yellow.hover {
+ background-position: -120px 0;
+ }
+ .iradio_minimal-yellow.checked {
+ background-position: -140px 0;
+ }
+ .iradio_minimal-yellow.disabled {
+ background-position: -160px 0;
+ cursor: default;
+ }
+ .iradio_minimal-yellow.checked.disabled {
+ background-position: -180px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_minimal-yellow,
+ .iradio_minimal-yellow {
+ background-image: url(yellow@2x.png);
+ -webkit-background-size: 200px 20px;
+ background-size: 200px 20px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/yellow.png b/common/src/main/webapp/thirdparty/icheck/skins/minimal/yellow.png
new file mode 100644
index 0000000..0999b7e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/yellow.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/minimal/yellow@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/minimal/yellow@2x.png
new file mode 100644
index 0000000..c16f2b7
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/minimal/yellow@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/polaris/polaris.css b/common/src/main/webapp/thirdparty/icheck/skins/polaris/polaris.css
new file mode 100644
index 0000000..8427bf2
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/polaris/polaris.css
@@ -0,0 +1,59 @@
+/* iCheck plugin Polaris skin
+----------------------------------- */
+.icheckbox_polaris,
+.iradio_polaris {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 29px;
+ height: 29px;
+ background: url(polaris.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_polaris {
+ background-position: 0 0;
+}
+ .icheckbox_polaris.hover {
+ background-position: -31px 0;
+ }
+ .icheckbox_polaris.checked {
+ background-position: -62px 0;
+ }
+ .icheckbox_polaris.disabled {
+ background-position: -93px 0;
+ cursor: default;
+ }
+ .icheckbox_polaris.checked.disabled {
+ background-position: -124px 0;
+ }
+
+.iradio_polaris {
+ background-position: -155px 0;
+}
+ .iradio_polaris.hover {
+ background-position: -186px 0;
+ }
+ .iradio_polaris.checked {
+ background-position: -217px 0;
+ }
+ .iradio_polaris.disabled {
+ background-position: -248px 0;
+ cursor: default;
+ }
+ .iradio_polaris.checked.disabled {
+ background-position: -279px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_polaris,
+ .iradio_polaris {
+ background-image: url(polaris@2x.png);
+ -webkit-background-size: 310px 31px;
+ background-size: 310px 31px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/polaris/polaris.png b/common/src/main/webapp/thirdparty/icheck/skins/polaris/polaris.png
new file mode 100644
index 0000000..60c14e6
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/polaris/polaris.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/polaris/polaris@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/polaris/polaris@2x.png
new file mode 100644
index 0000000..ed943da
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/polaris/polaris@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/Thumbs.db b/common/src/main/webapp/thirdparty/icheck/skins/square/Thumbs.db
new file mode 100644
index 0000000..95f0906
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/Thumbs.db
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/_all.css b/common/src/main/webapp/thirdparty/icheck/skins/square/_all.css
new file mode 100644
index 0000000..6b150ba
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/_all.css
@@ -0,0 +1,590 @@
+/* iCheck plugin Square skin
+----------------------------------- */
+.icheckbox_square,
+.iradio_square {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ background: url(square.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_square {
+ background-position: 0 0;
+}
+ .icheckbox_square.hover {
+ background-position: -24px 0;
+ }
+ .icheckbox_square.checked {
+ background-position: -48px 0;
+ }
+ .icheckbox_square.disabled {
+ background-position: -72px 0;
+ cursor: default;
+ }
+ .icheckbox_square.checked.disabled {
+ background-position: -96px 0;
+ }
+
+.iradio_square {
+ background-position: -120px 0;
+}
+ .iradio_square.hover {
+ background-position: -144px 0;
+ }
+ .iradio_square.checked {
+ background-position: -168px 0;
+ }
+ .iradio_square.disabled {
+ background-position: -192px 0;
+ cursor: default;
+ }
+ .iradio_square.checked.disabled {
+ background-position: -216px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_square,
+ .iradio_square {
+ background-image: url(square@2x.png);
+ -webkit-background-size: 240px 24px;
+ background-size: 240px 24px;
+ }
+}
+
+/* red */
+.icheckbox_square-red,
+.iradio_square-red {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ background: url(red.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_square-red {
+ background-position: 0 0;
+}
+ .icheckbox_square-red.hover {
+ background-position: -24px 0;
+ }
+ .icheckbox_square-red.checked {
+ background-position: -48px 0;
+ }
+ .icheckbox_square-red.disabled {
+ background-position: -72px 0;
+ cursor: default;
+ }
+ .icheckbox_square-red.checked.disabled {
+ background-position: -96px 0;
+ }
+
+.iradio_square-red {
+ background-position: -120px 0;
+}
+ .iradio_square-red.hover {
+ background-position: -144px 0;
+ }
+ .iradio_square-red.checked {
+ background-position: -168px 0;
+ }
+ .iradio_square-red.disabled {
+ background-position: -192px 0;
+ cursor: default;
+ }
+ .iradio_square-red.checked.disabled {
+ background-position: -216px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_square-red,
+ .iradio_square-red {
+ background-image: url(red@2x.png);
+ -webkit-background-size: 240px 24px;
+ background-size: 240px 24px;
+ }
+}
+
+/* green */
+.icheckbox_square-green,
+.iradio_square-green {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ background: url(green.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_square-green {
+ background-position: 0 0;
+}
+ .icheckbox_square-green.hover {
+ background-position: -24px 0;
+ }
+ .icheckbox_square-green.checked {
+ background-position: -48px 0;
+ }
+ .icheckbox_square-green.disabled {
+ background-position: -72px 0;
+ cursor: default;
+ }
+ .icheckbox_square-green.checked.disabled {
+ background-position: -96px 0;
+ }
+
+.iradio_square-green {
+ background-position: -120px 0;
+}
+ .iradio_square-green.hover {
+ background-position: -144px 0;
+ }
+ .iradio_square-green.checked {
+ background-position: -168px 0;
+ }
+ .iradio_square-green.disabled {
+ background-position: -192px 0;
+ cursor: default;
+ }
+ .iradio_square-green.checked.disabled {
+ background-position: -216px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_square-green,
+ .iradio_square-green {
+ background-image: url(green@2x.png);
+ -webkit-background-size: 240px 24px;
+ background-size: 240px 24px;
+ }
+}
+
+/* blue */
+.icheckbox_square-blue,
+.iradio_square-blue {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ background: url(blue.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_square-blue {
+ background-position: 0 0;
+}
+ .icheckbox_square-blue.hover {
+ background-position: -24px 0;
+ }
+ .icheckbox_square-blue.checked {
+ background-position: -48px 0;
+ }
+ .icheckbox_square-blue.disabled {
+ background-position: -72px 0;
+ cursor: default;
+ }
+ .icheckbox_square-blue.checked.disabled {
+ background-position: -96px 0;
+ }
+
+.iradio_square-blue {
+ background-position: -120px 0;
+}
+ .iradio_square-blue.hover {
+ background-position: -144px 0;
+ }
+ .iradio_square-blue.checked {
+ background-position: -168px 0;
+ }
+ .iradio_square-blue.disabled {
+ background-position: -192px 0;
+ cursor: default;
+ }
+ .iradio_square-blue.checked.disabled {
+ background-position: -216px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_square-blue,
+ .iradio_square-blue {
+ background-image: url(blue@2x.png);
+ -webkit-background-size: 240px 24px;
+ background-size: 240px 24px;
+ }
+}
+
+/* aero */
+.icheckbox_square-aero,
+.iradio_square-aero {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin-right: 10px;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ background: url(aero.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_square-aero {
+ background-position: 0 0;
+}
+ .icheckbox_square-aero.hover {
+ background-position: -24px 0;
+ }
+ .icheckbox_square-aero.checked {
+ background-position: -48px 0;
+ }
+ .icheckbox_square-aero.disabled {
+ background-position: -72px 0;
+ cursor: default;
+ }
+ .icheckbox_square-aero.checked.disabled {
+ background-position: -96px 0;
+ }
+
+.iradio_square-aero {
+ background-position: -120px 0;
+}
+ .iradio_square-aero.hover {
+ background-position: -144px 0;
+ }
+ .iradio_square-aero.checked {
+ background-position: -168px 0;
+ }
+ .iradio_square-aero.disabled {
+ background-position: -192px 0;
+ cursor: default;
+ }
+ .iradio_square-aero.checked.disabled {
+ background-position: -216px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_square-aero,
+ .iradio_square-aero {
+ background-image: url(aero@2x.png);
+ -webkit-background-size: 240px 24px;
+ background-size: 240px 24px;
+ }
+}
+
+/* grey */
+.icheckbox_square-grey,
+.iradio_square-grey {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ background: url(grey.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_square-grey {
+ background-position: 0 0;
+}
+ .icheckbox_square-grey.hover {
+ background-position: -24px 0;
+ }
+ .icheckbox_square-grey.checked {
+ background-position: -48px 0;
+ }
+ .icheckbox_square-grey.disabled {
+ background-position: -72px 0;
+ cursor: default;
+ }
+ .icheckbox_square-grey.checked.disabled {
+ background-position: -96px 0;
+ }
+
+.iradio_square-grey {
+ background-position: -120px 0;
+}
+ .iradio_square-grey.hover {
+ background-position: -144px 0;
+ }
+ .iradio_square-grey.checked {
+ background-position: -168px 0;
+ }
+ .iradio_square-grey.disabled {
+ background-position: -192px 0;
+ cursor: default;
+ }
+ .iradio_square-grey.checked.disabled {
+ background-position: -216px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_square-grey,
+ .iradio_square-grey {
+ background-image: url(grey@2x.png);
+ -webkit-background-size: 240px 24px;
+ background-size: 240px 24px;
+ }
+}
+
+/* orange */
+.icheckbox_square-orange,
+.iradio_square-orange {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ background: url(orange.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_square-orange {
+ background-position: 0 0;
+}
+ .icheckbox_square-orange.hover {
+ background-position: -24px 0;
+ }
+ .icheckbox_square-orange.checked {
+ background-position: -48px 0;
+ }
+ .icheckbox_square-orange.disabled {
+ background-position: -72px 0;
+ cursor: default;
+ }
+ .icheckbox_square-orange.checked.disabled {
+ background-position: -96px 0;
+ }
+
+.iradio_square-orange {
+ background-position: -120px 0;
+}
+ .iradio_square-orange.hover {
+ background-position: -144px 0;
+ }
+ .iradio_square-orange.checked {
+ background-position: -168px 0;
+ }
+ .iradio_square-orange.disabled {
+ background-position: -192px 0;
+ cursor: default;
+ }
+ .iradio_square-orange.checked.disabled {
+ background-position: -216px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_square-orange,
+ .iradio_square-orange {
+ background-image: url(orange@2x.png);
+ -webkit-background-size: 240px 24px;
+ background-size: 240px 24px;
+ }
+}
+
+/* yellow */
+.icheckbox_square-yellow,
+.iradio_square-yellow {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ background: url(yellow.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_square-yellow {
+ background-position: 0 0;
+}
+ .icheckbox_square-yellow.hover {
+ background-position: -24px 0;
+ }
+ .icheckbox_square-yellow.checked {
+ background-position: -48px 0;
+ }
+ .icheckbox_square-yellow.disabled {
+ background-position: -72px 0;
+ cursor: default;
+ }
+ .icheckbox_square-yellow.checked.disabled {
+ background-position: -96px 0;
+ }
+
+.iradio_square-yellow {
+ background-position: -120px 0;
+}
+ .iradio_square-yellow.hover {
+ background-position: -144px 0;
+ }
+ .iradio_square-yellow.checked {
+ background-position: -168px 0;
+ }
+ .iradio_square-yellow.disabled {
+ background-position: -192px 0;
+ cursor: default;
+ }
+ .iradio_square-yellow.checked.disabled {
+ background-position: -216px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_square-yellow,
+ .iradio_square-yellow {
+ background-image: url(yellow@2x.png);
+ -webkit-background-size: 240px 24px;
+ background-size: 240px 24px;
+ }
+}
+
+/* pink */
+.icheckbox_square-pink,
+.iradio_square-pink {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ background: url(pink.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_square-pink {
+ background-position: 0 0;
+}
+ .icheckbox_square-pink.hover {
+ background-position: -24px 0;
+ }
+ .icheckbox_square-pink.checked {
+ background-position: -48px 0;
+ }
+ .icheckbox_square-pink.disabled {
+ background-position: -72px 0;
+ cursor: default;
+ }
+ .icheckbox_square-pink.checked.disabled {
+ background-position: -96px 0;
+ }
+
+.iradio_square-pink {
+ background-position: -120px 0;
+}
+ .iradio_square-pink.hover {
+ background-position: -144px 0;
+ }
+ .iradio_square-pink.checked {
+ background-position: -168px 0;
+ }
+ .iradio_square-pink.disabled {
+ background-position: -192px 0;
+ cursor: default;
+ }
+ .iradio_square-pink.checked.disabled {
+ background-position: -216px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_square-pink,
+ .iradio_square-pink {
+ background-image: url(pink@2x.png);
+ -webkit-background-size: 240px 24px;
+ background-size: 240px 24px;
+ }
+}
+
+/* purple */
+.icheckbox_square-purple,
+.iradio_square-purple {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ background: url(purple.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_square-purple {
+ background-position: 0 0;
+}
+ .icheckbox_square-purple.hover {
+ background-position: -24px 0;
+ }
+ .icheckbox_square-purple.checked {
+ background-position: -48px 0;
+ }
+ .icheckbox_square-purple.disabled {
+ background-position: -72px 0;
+ cursor: default;
+ }
+ .icheckbox_square-purple.checked.disabled {
+ background-position: -96px 0;
+ }
+
+.iradio_square-purple {
+ background-position: -120px 0;
+}
+ .iradio_square-purple.hover {
+ background-position: -144px 0;
+ }
+ .iradio_square-purple.checked {
+ background-position: -168px 0;
+ }
+ .iradio_square-purple.disabled {
+ background-position: -192px 0;
+ cursor: default;
+ }
+ .iradio_square-purple.checked.disabled {
+ background-position: -216px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_square-purple,
+ .iradio_square-purple {
+ background-image: url(purple@2x.png);
+ -webkit-background-size: 240px 24px;
+ background-size: 240px 24px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/aero.css b/common/src/main/webapp/thirdparty/icheck/skins/square/aero.css
new file mode 100644
index 0000000..6c4d075
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/aero.css
@@ -0,0 +1,59 @@
+/* iCheck plugin Square skin, aero
+----------------------------------- */
+.icheckbox_square-aero,
+.iradio_square-aero {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ background: url(aero.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_square-aero {
+ background-position: 0 0;
+}
+ .icheckbox_square-aero.hover {
+ background-position: -24px 0;
+ }
+ .icheckbox_square-aero.checked {
+ background-position: -48px 0;
+ }
+ .icheckbox_square-aero.disabled {
+ background-position: -72px 0;
+ cursor: default;
+ }
+ .icheckbox_square-aero.checked.disabled {
+ background-position: -96px 0;
+ }
+
+.iradio_square-aero {
+ background-position: -120px 0;
+}
+ .iradio_square-aero.hover {
+ background-position: -144px 0;
+ }
+ .iradio_square-aero.checked {
+ background-position: -168px 0;
+ }
+ .iradio_square-aero.disabled {
+ background-position: -192px 0;
+ cursor: default;
+ }
+ .iradio_square-aero.checked.disabled {
+ background-position: -216px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_square-aero,
+ .iradio_square-aero {
+ background-image: url(aero@2x.png);
+ -webkit-background-size: 240px 24px;
+ background-size: 240px 24px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/aero.png b/common/src/main/webapp/thirdparty/icheck/skins/square/aero.png
new file mode 100644
index 0000000..8271ca9
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/aero.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/aero@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/square/aero@2x.png
new file mode 100644
index 0000000..07c5a02
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/aero@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/blue.css b/common/src/main/webapp/thirdparty/icheck/skins/square/blue.css
new file mode 100644
index 0000000..455761b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/blue.css
@@ -0,0 +1,59 @@
+/* iCheck plugin Square skin, blue
+----------------------------------- */
+.icheckbox_square-blue,
+.iradio_square-blue {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ background: url(blue.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_square-blue {
+ background-position: 0 0;
+}
+ .icheckbox_square-blue.hover {
+ background-position: -24px 0;
+ }
+ .icheckbox_square-blue.checked {
+ background-position: -48px 0;
+ }
+ .icheckbox_square-blue.disabled {
+ background-position: -72px 0;
+ cursor: default;
+ }
+ .icheckbox_square-blue.checked.disabled {
+ background-position: -96px 0;
+ }
+
+.iradio_square-blue {
+ background-position: -120px 0;
+}
+ .iradio_square-blue.hover {
+ background-position: -144px 0;
+ }
+ .iradio_square-blue.checked {
+ background-position: -168px 0;
+ }
+ .iradio_square-blue.disabled {
+ background-position: -192px 0;
+ cursor: default;
+ }
+ .iradio_square-blue.checked.disabled {
+ background-position: -216px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_square-blue,
+ .iradio_square-blue {
+ background-image: url(blue@2x.png);
+ -webkit-background-size: 240px 24px;
+ background-size: 240px 24px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/blue.png b/common/src/main/webapp/thirdparty/icheck/skins/square/blue.png
new file mode 100644
index 0000000..a3e040f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/blue.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/blue@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/square/blue@2x.png
new file mode 100644
index 0000000..8fdea12
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/blue@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/green.css b/common/src/main/webapp/thirdparty/icheck/skins/square/green.css
new file mode 100644
index 0000000..0f4409c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/green.css
@@ -0,0 +1,59 @@
+/* iCheck plugin Square skin, green
+----------------------------------- */
+.icheckbox_square-green,
+.iradio_square-green {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ background: url(green.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_square-green {
+ background-position: 0 0;
+}
+ .icheckbox_square-green.hover {
+ background-position: -24px 0;
+ }
+ .icheckbox_square-green.checked {
+ background-position: -48px 0;
+ }
+ .icheckbox_square-green.disabled {
+ background-position: -72px 0;
+ cursor: default;
+ }
+ .icheckbox_square-green.checked.disabled {
+ background-position: -96px 0;
+ }
+
+.iradio_square-green {
+ background-position: -120px 0;
+}
+ .iradio_square-green.hover {
+ background-position: -144px 0;
+ }
+ .iradio_square-green.checked {
+ background-position: -168px 0;
+ }
+ .iradio_square-green.disabled {
+ background-position: -192px 0;
+ cursor: default;
+ }
+ .iradio_square-green.checked.disabled {
+ background-position: -216px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_square-green,
+ .iradio_square-green {
+ background-image: url(green@2x.png);
+ -webkit-background-size: 240px 24px;
+ background-size: 240px 24px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/green.png b/common/src/main/webapp/thirdparty/icheck/skins/square/green.png
new file mode 100644
index 0000000..465824e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/green.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/green@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/square/green@2x.png
new file mode 100644
index 0000000..784e874
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/green@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/grey.css b/common/src/main/webapp/thirdparty/icheck/skins/square/grey.css
new file mode 100644
index 0000000..4c06d58
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/grey.css
@@ -0,0 +1,59 @@
+/* iCheck plugin Square skin, grey
+----------------------------------- */
+.icheckbox_square-grey,
+.iradio_square-grey {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ background: url(grey.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_square-grey {
+ background-position: 0 0;
+}
+ .icheckbox_square-grey.hover {
+ background-position: -24px 0;
+ }
+ .icheckbox_square-grey.checked {
+ background-position: -48px 0;
+ }
+ .icheckbox_square-grey.disabled {
+ background-position: -72px 0;
+ cursor: default;
+ }
+ .icheckbox_square-grey.checked.disabled {
+ background-position: -96px 0;
+ }
+
+.iradio_square-grey {
+ background-position: -120px 0;
+}
+ .iradio_square-grey.hover {
+ background-position: -144px 0;
+ }
+ .iradio_square-grey.checked {
+ background-position: -168px 0;
+ }
+ .iradio_square-grey.disabled {
+ background-position: -192px 0;
+ cursor: default;
+ }
+ .iradio_square-grey.checked.disabled {
+ background-position: -216px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_square-grey,
+ .iradio_square-grey {
+ background-image: url(grey@2x.png);
+ -webkit-background-size: 240px 24px;
+ background-size: 240px 24px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/grey.png b/common/src/main/webapp/thirdparty/icheck/skins/square/grey.png
new file mode 100644
index 0000000..f693758
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/grey.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/grey@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/square/grey@2x.png
new file mode 100644
index 0000000..5d6341c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/grey@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/orange.css b/common/src/main/webapp/thirdparty/icheck/skins/square/orange.css
new file mode 100644
index 0000000..55b4589
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/orange.css
@@ -0,0 +1,59 @@
+/* iCheck plugin Square skin, orange
+----------------------------------- */
+.icheckbox_square-orange,
+.iradio_square-orange {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ background: url(orange.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_square-orange {
+ background-position: 0 0;
+}
+ .icheckbox_square-orange.hover {
+ background-position: -24px 0;
+ }
+ .icheckbox_square-orange.checked {
+ background-position: -48px 0;
+ }
+ .icheckbox_square-orange.disabled {
+ background-position: -72px 0;
+ cursor: default;
+ }
+ .icheckbox_square-orange.checked.disabled {
+ background-position: -96px 0;
+ }
+
+.iradio_square-orange {
+ background-position: -120px 0;
+}
+ .iradio_square-orange.hover {
+ background-position: -144px 0;
+ }
+ .iradio_square-orange.checked {
+ background-position: -168px 0;
+ }
+ .iradio_square-orange.disabled {
+ background-position: -192px 0;
+ cursor: default;
+ }
+ .iradio_square-orange.checked.disabled {
+ background-position: -216px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_square-orange,
+ .iradio_square-orange {
+ background-image: url(orange@2x.png);
+ -webkit-background-size: 240px 24px;
+ background-size: 240px 24px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/orange.png b/common/src/main/webapp/thirdparty/icheck/skins/square/orange.png
new file mode 100644
index 0000000..8460850
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/orange.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/orange@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/square/orange@2x.png
new file mode 100644
index 0000000..b1f2319
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/orange@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/pink.css b/common/src/main/webapp/thirdparty/icheck/skins/square/pink.css
new file mode 100644
index 0000000..b3823b2
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/pink.css
@@ -0,0 +1,59 @@
+/* iCheck plugin Square skin, pink
+----------------------------------- */
+.icheckbox_square-pink,
+.iradio_square-pink {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ background: url(pink.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_square-pink {
+ background-position: 0 0;
+}
+ .icheckbox_square-pink.hover {
+ background-position: -24px 0;
+ }
+ .icheckbox_square-pink.checked {
+ background-position: -48px 0;
+ }
+ .icheckbox_square-pink.disabled {
+ background-position: -72px 0;
+ cursor: default;
+ }
+ .icheckbox_square-pink.checked.disabled {
+ background-position: -96px 0;
+ }
+
+.iradio_square-pink {
+ background-position: -120px 0;
+}
+ .iradio_square-pink.hover {
+ background-position: -144px 0;
+ }
+ .iradio_square-pink.checked {
+ background-position: -168px 0;
+ }
+ .iradio_square-pink.disabled {
+ background-position: -192px 0;
+ cursor: default;
+ }
+ .iradio_square-pink.checked.disabled {
+ background-position: -216px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_square-pink,
+ .iradio_square-pink {
+ background-image: url(pink@2x.png);
+ -webkit-background-size: 240px 24px;
+ background-size: 240px 24px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/pink.png b/common/src/main/webapp/thirdparty/icheck/skins/square/pink.png
new file mode 100644
index 0000000..9c8b4e2
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/pink.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/pink@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/square/pink@2x.png
new file mode 100644
index 0000000..b1f3a6e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/pink@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/purple.css b/common/src/main/webapp/thirdparty/icheck/skins/square/purple.css
new file mode 100644
index 0000000..39d9b3b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/purple.css
@@ -0,0 +1,59 @@
+/* iCheck plugin Square skin, purple
+----------------------------------- */
+.icheckbox_square-purple,
+.iradio_square-purple {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ background: url(purple.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_square-purple {
+ background-position: 0 0;
+}
+ .icheckbox_square-purple.hover {
+ background-position: -24px 0;
+ }
+ .icheckbox_square-purple.checked {
+ background-position: -48px 0;
+ }
+ .icheckbox_square-purple.disabled {
+ background-position: -72px 0;
+ cursor: default;
+ }
+ .icheckbox_square-purple.checked.disabled {
+ background-position: -96px 0;
+ }
+
+.iradio_square-purple {
+ background-position: -120px 0;
+}
+ .iradio_square-purple.hover {
+ background-position: -144px 0;
+ }
+ .iradio_square-purple.checked {
+ background-position: -168px 0;
+ }
+ .iradio_square-purple.disabled {
+ background-position: -192px 0;
+ cursor: default;
+ }
+ .iradio_square-purple.checked.disabled {
+ background-position: -216px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_square-purple,
+ .iradio_square-purple {
+ background-image: url(purple@2x.png);
+ -webkit-background-size: 240px 24px;
+ background-size: 240px 24px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/purple.png b/common/src/main/webapp/thirdparty/icheck/skins/square/purple.png
new file mode 100644
index 0000000..6bfc16a
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/purple.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/purple@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/square/purple@2x.png
new file mode 100644
index 0000000..6d3c8b1
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/purple@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/red.css b/common/src/main/webapp/thirdparty/icheck/skins/square/red.css
new file mode 100644
index 0000000..43399b8
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/red.css
@@ -0,0 +1,59 @@
+/* iCheck plugin Square skin, red
+----------------------------------- */
+.icheckbox_square-red,
+.iradio_square-red {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ background: url(red.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_square-red {
+ background-position: 0 0;
+}
+ .icheckbox_square-red.hover {
+ background-position: -24px 0;
+ }
+ .icheckbox_square-red.checked {
+ background-position: -48px 0;
+ }
+ .icheckbox_square-red.disabled {
+ background-position: -72px 0;
+ cursor: default;
+ }
+ .icheckbox_square-red.checked.disabled {
+ background-position: -96px 0;
+ }
+
+.iradio_square-red {
+ background-position: -120px 0;
+}
+ .iradio_square-red.hover {
+ background-position: -144px 0;
+ }
+ .iradio_square-red.checked {
+ background-position: -168px 0;
+ }
+ .iradio_square-red.disabled {
+ background-position: -192px 0;
+ cursor: default;
+ }
+ .iradio_square-red.checked.disabled {
+ background-position: -216px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_square-red,
+ .iradio_square-red {
+ background-image: url(red@2x.png);
+ -webkit-background-size: 240px 24px;
+ background-size: 240px 24px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/red.png b/common/src/main/webapp/thirdparty/icheck/skins/square/red.png
new file mode 100644
index 0000000..749675a
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/red.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/red@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/square/red@2x.png
new file mode 100644
index 0000000..c05700a
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/red@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/square.css b/common/src/main/webapp/thirdparty/icheck/skins/square/square.css
new file mode 100644
index 0000000..2f3e5bf
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/square.css
@@ -0,0 +1,59 @@
+/* iCheck plugin Square skin, black
+----------------------------------- */
+.icheckbox_square,
+.iradio_square {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ background: url(square.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_square {
+ background-position: 0 0;
+}
+ .icheckbox_square.hover {
+ background-position: -24px 0;
+ }
+ .icheckbox_square.checked {
+ background-position: -48px 0;
+ }
+ .icheckbox_square.disabled {
+ background-position: -72px 0;
+ cursor: default;
+ }
+ .icheckbox_square.checked.disabled {
+ background-position: -96px 0;
+ }
+
+.iradio_square {
+ background-position: -120px 0;
+}
+ .iradio_square.hover {
+ background-position: -144px 0;
+ }
+ .iradio_square.checked {
+ background-position: -168px 0;
+ }
+ .iradio_square.disabled {
+ background-position: -192px 0;
+ cursor: default;
+ }
+ .iradio_square.checked.disabled {
+ background-position: -216px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_square,
+ .iradio_square {
+ background-image: url(square@2x.png);
+ -webkit-background-size: 240px 24px;
+ background-size: 240px 24px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/square.png b/common/src/main/webapp/thirdparty/icheck/skins/square/square.png
new file mode 100644
index 0000000..2a3c881
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/square.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/square@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/square/square@2x.png
new file mode 100644
index 0000000..9b56c44
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/square@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/yellow.css b/common/src/main/webapp/thirdparty/icheck/skins/square/yellow.css
new file mode 100644
index 0000000..65ef0ba
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/yellow.css
@@ -0,0 +1,59 @@
+/* iCheck plugin Square skin, yellow
+----------------------------------- */
+.icheckbox_square-yellow,
+.iradio_square-yellow {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ background: url(yellow.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_square-yellow {
+ background-position: 0 0;
+}
+ .icheckbox_square-yellow.hover {
+ background-position: -24px 0;
+ }
+ .icheckbox_square-yellow.checked {
+ background-position: -48px 0;
+ }
+ .icheckbox_square-yellow.disabled {
+ background-position: -72px 0;
+ cursor: default;
+ }
+ .icheckbox_square-yellow.checked.disabled {
+ background-position: -96px 0;
+ }
+
+.iradio_square-yellow {
+ background-position: -120px 0;
+}
+ .iradio_square-yellow.hover {
+ background-position: -144px 0;
+ }
+ .iradio_square-yellow.checked {
+ background-position: -168px 0;
+ }
+ .iradio_square-yellow.disabled {
+ background-position: -192px 0;
+ cursor: default;
+ }
+ .iradio_square-yellow.checked.disabled {
+ background-position: -216px 0;
+ }
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
+ .icheckbox_square-yellow,
+ .iradio_square-yellow {
+ background-image: url(yellow@2x.png);
+ -webkit-background-size: 240px 24px;
+ background-size: 240px 24px;
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/yellow.png b/common/src/main/webapp/thirdparty/icheck/skins/square/yellow.png
new file mode 100644
index 0000000..b6c0330
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/yellow.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/icheck/skins/square/yellow@2x.png b/common/src/main/webapp/thirdparty/icheck/skins/square/yellow@2x.png
new file mode 100644
index 0000000..6b8e328
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/icheck/skins/square/yellow@2x.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/images/add.png b/common/src/main/webapp/thirdparty/images/add.png
new file mode 100644
index 0000000..d1f8299
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/images/add.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/images/checkbox-radio/checkbox-checked-disabled.png b/common/src/main/webapp/thirdparty/images/checkbox-radio/checkbox-checked-disabled.png
new file mode 100644
index 0000000..0ba905f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/images/checkbox-radio/checkbox-checked-disabled.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/images/checkbox-radio/checkbox-checked.png b/common/src/main/webapp/thirdparty/images/checkbox-radio/checkbox-checked.png
new file mode 100644
index 0000000..2ddfb0a
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/images/checkbox-radio/checkbox-checked.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/images/checkbox-radio/checkbox-disabled.png b/common/src/main/webapp/thirdparty/images/checkbox-radio/checkbox-disabled.png
new file mode 100644
index 0000000..a53c89c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/images/checkbox-radio/checkbox-disabled.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/images/checkbox-radio/checkbox-hover.png b/common/src/main/webapp/thirdparty/images/checkbox-radio/checkbox-hover.png
new file mode 100644
index 0000000..c282113
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/images/checkbox-radio/checkbox-hover.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/images/checkbox-radio/checkbox-init.png b/common/src/main/webapp/thirdparty/images/checkbox-radio/checkbox-init.png
new file mode 100644
index 0000000..e352cc5
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/images/checkbox-radio/checkbox-init.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/images/checkbox-radio/radio-checked-disabled.png b/common/src/main/webapp/thirdparty/images/checkbox-radio/radio-checked-disabled.png
new file mode 100644
index 0000000..16eecc5
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/images/checkbox-radio/radio-checked-disabled.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/images/checkbox-radio/radio-checked.png b/common/src/main/webapp/thirdparty/images/checkbox-radio/radio-checked.png
new file mode 100644
index 0000000..6c60d12
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/images/checkbox-radio/radio-checked.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/images/checkbox-radio/radio-disabled.png b/common/src/main/webapp/thirdparty/images/checkbox-radio/radio-disabled.png
new file mode 100644
index 0000000..c27289d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/images/checkbox-radio/radio-disabled.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/images/checkbox-radio/radio-hover.png b/common/src/main/webapp/thirdparty/images/checkbox-radio/radio-hover.png
new file mode 100644
index 0000000..03138ca
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/images/checkbox-radio/radio-hover.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/images/checkbox-radio/radio-init.png b/common/src/main/webapp/thirdparty/images/checkbox-radio/radio-init.png
new file mode 100644
index 0000000..b428c58
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/images/checkbox-radio/radio-init.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/images/collapse_arrow.png b/common/src/main/webapp/thirdparty/images/collapse_arrow.png
new file mode 100644
index 0000000..8830741
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/images/collapse_arrow.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/images/delete.png b/common/src/main/webapp/thirdparty/images/delete.png
new file mode 100644
index 0000000..737f879
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/images/delete.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/images/edit.png b/common/src/main/webapp/thirdparty/images/edit.png
new file mode 100644
index 0000000..68d7625
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/images/edit.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/images/expand_arrow.png b/common/src/main/webapp/thirdparty/images/expand_arrow.png
new file mode 100644
index 0000000..f8935e1
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/images/expand_arrow.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/images/openo.png b/common/src/main/webapp/thirdparty/images/openo.png
new file mode 100644
index 0000000..328b735
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/images/openo.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/images/searchicon.png b/common/src/main/webapp/thirdparty/images/searchicon.png
new file mode 100644
index 0000000..960dea1
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/images/searchicon.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/jQuery-File-Upload/css/jquery.fileupload.css b/common/src/main/webapp/thirdparty/jQuery-File-Upload/css/jquery.fileupload.css
new file mode 100644
index 0000000..ce7e422
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jQuery-File-Upload/css/jquery.fileupload.css
@@ -0,0 +1,37 @@
+@charset "UTF-8";
+/*
+ * jQuery File Upload Plugin CSS
+ * https://github.com/blueimp/jQuery-File-Upload
+ *
+ * Copyright 2013, Sebastian Tschan
+ * https://blueimp.net
+ *
+ * Licensed under the MIT license:
+ * http://www.opensource.org/licenses/MIT
+ */
+
+.fileinput-button {
+ position: relative;
+ overflow: hidden;
+ display: inline-block;
+}
+.fileinput-button input {
+ position: absolute;
+ top: 0;
+ right: 0;
+ margin: 0;
+ opacity: 0;
+ -ms-filter: 'alpha(opacity=0)';
+ font-size: 200px;
+ direction: ltr;
+ cursor: pointer;
+}
+
+/* Fixes for IE < 8 */
+@media screen\9 {
+ .fileinput-button input {
+ filter: alpha(opacity=0);
+ font-size: 100%;
+ height: 100%;
+ }
+}
diff --git a/common/src/main/webapp/thirdparty/jQuery-File-Upload/img/loading.gif b/common/src/main/webapp/thirdparty/jQuery-File-Upload/img/loading.gif
new file mode 100644
index 0000000..90f28cb
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jQuery-File-Upload/img/loading.gif
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/jQuery-File-Upload/img/progressbar.gif b/common/src/main/webapp/thirdparty/jQuery-File-Upload/img/progressbar.gif
new file mode 100644
index 0000000..fbcce6b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jQuery-File-Upload/img/progressbar.gif
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/jQuery-File-Upload/js/jquery.fileupload.js b/common/src/main/webapp/thirdparty/jQuery-File-Upload/js/jquery.fileupload.js
new file mode 100644
index 0000000..91b7254
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jQuery-File-Upload/js/jquery.fileupload.js
@@ -0,0 +1,1477 @@
+/*
+ * jQuery File Upload Plugin
+ * https://github.com/blueimp/jQuery-File-Upload
+ *
+ * Copyright 2010, Sebastian Tschan
+ * https://blueimp.net
+ *
+ * Licensed under the MIT license:
+ * http://www.opensource.org/licenses/MIT
+ */
+
+/* jshint nomen:false */
+/* global define, require, window, document, location, Blob, FormData */
+
+(function (factory) {
+ 'use strict';
+ if (typeof define === 'function' && define.amd) {
+ // Register as an anonymous AMD module:
+ define([
+ 'jquery',
+ 'jquery.ui.widget'
+ ], factory);
+ } else if (typeof exports === 'object') {
+ // Node/CommonJS:
+ factory(
+ require('jquery'),
+ require('./vendor/jquery.ui.widget')
+ );
+ } else {
+ // Browser globals:
+ factory(window.jQuery);
+ }
+}(function ($) {
+ 'use strict';
+
+ // Detect file input support, based on
+ // http://viljamis.com/blog/2012/file-upload-support-on-mobile/
+ $.support.fileInput = !(new RegExp(
+ // Handle devices which give false positives for the feature detection:
+ '(Android (1\\.[0156]|2\\.[01]))' +
+ '|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)' +
+ '|(w(eb)?OSBrowser)|(webOS)' +
+ '|(Kindle/(1\\.0|2\\.[05]|3\\.0))'
+ ).test(window.navigator.userAgent) ||
+ // Feature detection for all other devices:
+ $('<input type="file">').prop('disabled'));
+
+ // The FileReader API is not actually used, but works as feature detection,
+ // as some Safari versions (5?) support XHR file uploads via the FormData API,
+ // but not non-multipart XHR file uploads.
+ // window.XMLHttpRequestUpload is not available on IE10, so we check for
+ // window.ProgressEvent instead to detect XHR2 file upload capability:
+ $.support.xhrFileUpload = !!(window.ProgressEvent && window.FileReader);
+ $.support.xhrFormDataFileUpload = !!window.FormData;
+
+ // Detect support for Blob slicing (required for chunked uploads):
+ $.support.blobSlice = window.Blob && (Blob.prototype.slice ||
+ Blob.prototype.webkitSlice || Blob.prototype.mozSlice);
+
+ // Helper function to create drag handlers for dragover/dragenter/dragleave:
+ function getDragHandler(type) {
+ var isDragOver = type === 'dragover';
+ return function (e) {
+ e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;
+ var dataTransfer = e.dataTransfer;
+ if (dataTransfer && $.inArray('Files', dataTransfer.types) !== -1 &&
+ this._trigger(
+ type,
+ $.Event(type, {delegatedEvent: e})
+ ) !== false) {
+ e.preventDefault();
+ if (isDragOver) {
+ dataTransfer.dropEffect = 'copy';
+ }
+ }
+ };
+ }
+
+ // The fileupload widget listens for change events on file input fields defined
+ // via fileInput setting and paste or drop events of the given dropZone.
+ // In addition to the default jQuery Widget methods, the fileupload widget
+ // exposes the "add" and "send" methods, to add or directly send files using
+ // the fileupload API.
+ // By default, files added via file input selection, paste, drag & drop or
+ // "add" method are uploaded immediately, but it is possible to override
+ // the "add" callback option to queue file uploads.
+ $.widget('blueimp.fileupload', {
+
+ options: {
+ // The drop target element(s), by the default the complete document.
+ // Set to null to disable drag & drop support:
+ dropZone: $(document),
+ // The paste target element(s), by the default undefined.
+ // Set to a DOM node or jQuery object to enable file pasting:
+ pasteZone: undefined,
+ // The file input field(s), that are listened to for change events.
+ // If undefined, it is set to the file input fields inside
+ // of the widget element on plugin initialization.
+ // Set to null to disable the change listener.
+ fileInput: undefined,
+ // By default, the file input field is replaced with a clone after
+ // each input field change event. This is required for iframe transport
+ // queues and allows change events to be fired for the same file
+ // selection, but can be disabled by setting the following option to false:
+ replaceFileInput: true,
+ // The parameter name for the file form data (the request argument name).
+ // If undefined or empty, the name property of the file input field is
+ // used, or "files[]" if the file input name property is also empty,
+ // can be a string or an array of strings:
+ paramName: undefined,
+ // By default, each file of a selection is uploaded using an individual
+ // request for XHR type uploads. Set to false to upload file
+ // selections in one request each:
+ singleFileUploads: true,
+ // To limit the number of files uploaded with one XHR request,
+ // set the following option to an integer greater than 0:
+ limitMultiFileUploads: undefined,
+ // The following option limits the number of files uploaded with one
+ // XHR request to keep the request size under or equal to the defined
+ // limit in bytes:
+ limitMultiFileUploadSize: undefined,
+ // Multipart file uploads add a number of bytes to each uploaded file,
+ // therefore the following option adds an overhead for each file used
+ // in the limitMultiFileUploadSize configuration:
+ limitMultiFileUploadSizeOverhead: 512,
+ // Set the following option to true to issue all file upload requests
+ // in a sequential order:
+ sequentialUploads: false,
+ // To limit the number of concurrent uploads,
+ // set the following option to an integer greater than 0:
+ limitConcurrentUploads: undefined,
+ // Set the following option to true to force iframe transport uploads:
+ forceIframeTransport: false,
+ // Set the following option to the location of a redirect url on the
+ // origin server, for cross-domain iframe transport uploads:
+ redirect: undefined,
+ // The parameter name for the redirect url, sent as part of the form
+ // data and set to 'redirect' if this option is empty:
+ redirectParamName: undefined,
+ // Set the following option to the location of a postMessage window,
+ // to enable postMessage transport uploads:
+ postMessage: undefined,
+ // By default, XHR file uploads are sent as multipart/form-data.
+ // The iframe transport is always using multipart/form-data.
+ // Set to false to enable non-multipart XHR uploads:
+ multipart: true,
+ // To upload large files in smaller chunks, set the following option
+ // to a preferred maximum chunk size. If set to 0, null or undefined,
+ // or the browser does not support the required Blob API, files will
+ // be uploaded as a whole.
+ maxChunkSize: undefined,
+ // When a non-multipart upload or a chunked multipart upload has been
+ // aborted, this option can be used to resume the upload by setting
+ // it to the size of the already uploaded bytes. This option is most
+ // useful when modifying the options object inside of the "add" or
+ // "send" callbacks, as the options are cloned for each file upload.
+ uploadedBytes: undefined,
+ // By default, failed (abort or error) file uploads are removed from the
+ // global progress calculation. Set the following option to false to
+ // prevent recalculating the global progress data:
+ recalculateProgress: true,
+ // Interval in milliseconds to calculate and trigger progress events:
+ progressInterval: 100,
+ // Interval in milliseconds to calculate progress bitrate:
+ bitrateInterval: 500,
+ // By default, uploads are started automatically when adding files:
+ autoUpload: true,
+
+ // Error and info messages:
+ messages: {
+ uploadedBytes: 'Uploaded bytes exceed file size'
+ },
+
+ // Translation function, gets the message key to be translated
+ // and an object with context specific data as arguments:
+ i18n: function (message, context) {
+ message = this.messages[message] || message.toString();
+ if (context) {
+ $.each(context, function (key, value) {
+ message = message.replace('{' + key + '}', value);
+ });
+ }
+ return message;
+ },
+
+ // Additional form data to be sent along with the file uploads can be set
+ // using this option, which accepts an array of objects with name and
+ // value properties, a function returning such an array, a FormData
+ // object (for XHR file uploads), or a simple object.
+ // The form of the first fileInput is given as parameter to the function:
+ formData: function (form) {
+ return form.serializeArray();
+ },
+
+ // The add callback is invoked as soon as files are added to the fileupload
+ // widget (via file input selection, drag & drop, paste or add API call).
+ // If the singleFileUploads option is enabled, this callback will be
+ // called once for each file in the selection for XHR file uploads, else
+ // once for each file selection.
+ //
+ // The upload starts when the submit method is invoked on the data parameter.
+ // The data object contains a files property holding the added files
+ // and allows you to override plugin options as well as define ajax settings.
+ //
+ // Listeners for this callback can also be bound the following way:
+ // .bind('fileuploadadd', func);
+ //
+ // data.submit() returns a Promise object and allows to attach additional
+ // handlers using jQuery's Deferred callbacks:
+ // data.submit().done(func).fail(func).always(func);
+ add: function (e, data) {
+ if (e.isDefaultPrevented()) {
+ return false;
+ }
+ if (data.autoUpload || (data.autoUpload !== false &&
+ $(this).fileupload('option', 'autoUpload'))) {
+ data.process().done(function () {
+ data.submit();
+ });
+ }
+ },
+
+ // Other callbacks:
+
+ // Callback for the submit event of each file upload:
+ // submit: function (e, data) {}, // .bind('fileuploadsubmit', func);
+
+ // Callback for the start of each file upload request:
+ // send: function (e, data) {}, // .bind('fileuploadsend', func);
+
+ // Callback for successful uploads:
+ // done: function (e, data) {}, // .bind('fileuploaddone', func);
+
+ // Callback for failed (abort or error) uploads:
+ // fail: function (e, data) {}, // .bind('fileuploadfail', func);
+
+ // Callback for completed (success, abort or error) requests:
+ // always: function (e, data) {}, // .bind('fileuploadalways', func);
+
+ // Callback for upload progress events:
+ // progress: function (e, data) {}, // .bind('fileuploadprogress', func);
+
+ // Callback for global upload progress events:
+ // progressall: function (e, data) {}, // .bind('fileuploadprogressall', func);
+
+ // Callback for uploads start, equivalent to the global ajaxStart event:
+ // start: function (e) {}, // .bind('fileuploadstart', func);
+
+ // Callback for uploads stop, equivalent to the global ajaxStop event:
+ // stop: function (e) {}, // .bind('fileuploadstop', func);
+
+ // Callback for change events of the fileInput(s):
+ // change: function (e, data) {}, // .bind('fileuploadchange', func);
+
+ // Callback for paste events to the pasteZone(s):
+ // paste: function (e, data) {}, // .bind('fileuploadpaste', func);
+
+ // Callback for drop events of the dropZone(s):
+ // drop: function (e, data) {}, // .bind('fileuploaddrop', func);
+
+ // Callback for dragover events of the dropZone(s):
+ // dragover: function (e) {}, // .bind('fileuploaddragover', func);
+
+ // Callback for the start of each chunk upload request:
+ // chunksend: function (e, data) {}, // .bind('fileuploadchunksend', func);
+
+ // Callback for successful chunk uploads:
+ // chunkdone: function (e, data) {}, // .bind('fileuploadchunkdone', func);
+
+ // Callback for failed (abort or error) chunk uploads:
+ // chunkfail: function (e, data) {}, // .bind('fileuploadchunkfail', func);
+
+ // Callback for completed (success, abort or error) chunk upload requests:
+ // chunkalways: function (e, data) {}, // .bind('fileuploadchunkalways', func);
+
+ // The plugin options are used as settings object for the ajax calls.
+ // The following are jQuery ajax settings required for the file uploads:
+ processData: false,
+ contentType: false,
+ cache: false,
+ timeout: 0
+ },
+
+ // A list of options that require reinitializing event listeners and/or
+ // special initialization code:
+ _specialOptions: [
+ 'fileInput',
+ 'dropZone',
+ 'pasteZone',
+ 'multipart',
+ 'forceIframeTransport'
+ ],
+
+ _blobSlice: $.support.blobSlice && function () {
+ var slice = this.slice || this.webkitSlice || this.mozSlice;
+ return slice.apply(this, arguments);
+ },
+
+ _BitrateTimer: function () {
+ this.timestamp = ((Date.now) ? Date.now() : (new Date()).getTime());
+ this.loaded = 0;
+ this.bitrate = 0;
+ this.getBitrate = function (now, loaded, interval) {
+ var timeDiff = now - this.timestamp;
+ if (!this.bitrate || !interval || timeDiff > interval) {
+ this.bitrate = (loaded - this.loaded) * (1000 / timeDiff) * 8;
+ this.loaded = loaded;
+ this.timestamp = now;
+ }
+ return this.bitrate;
+ };
+ },
+
+ _isXHRUpload: function (options) {
+ return !options.forceIframeTransport &&
+ ((!options.multipart && $.support.xhrFileUpload) ||
+ $.support.xhrFormDataFileUpload);
+ },
+
+ _getFormData: function (options) {
+ var formData;
+ if ($.type(options.formData) === 'function') {
+ return options.formData(options.form);
+ }
+ if ($.isArray(options.formData)) {
+ return options.formData;
+ }
+ if ($.type(options.formData) === 'object') {
+ formData = [];
+ $.each(options.formData, function (name, value) {
+ formData.push({name: name, value: value});
+ });
+ return formData;
+ }
+ return [];
+ },
+
+ _getTotal: function (files) {
+ var total = 0;
+ $.each(files, function (index, file) {
+ total += file.size || 1;
+ });
+ return total;
+ },
+
+ _initProgressObject: function (obj) {
+ var progress = {
+ loaded: 0,
+ total: 0,
+ bitrate: 0
+ };
+ if (obj._progress) {
+ $.extend(obj._progress, progress);
+ } else {
+ obj._progress = progress;
+ }
+ },
+
+ _initResponseObject: function (obj) {
+ var prop;
+ if (obj._response) {
+ for (prop in obj._response) {
+ if (obj._response.hasOwnProperty(prop)) {
+ delete obj._response[prop];
+ }
+ }
+ } else {
+ obj._response = {};
+ }
+ },
+
+ _onProgress: function (e, data) {
+ if (e.lengthComputable) {
+ var now = ((Date.now) ? Date.now() : (new Date()).getTime()),
+ loaded;
+ if (data._time && data.progressInterval &&
+ (now - data._time < data.progressInterval) &&
+ e.loaded !== e.total) {
+ return;
+ }
+ data._time = now;
+ loaded = Math.floor(
+ e.loaded / e.total * (data.chunkSize || data._progress.total)
+ ) + (data.uploadedBytes || 0);
+ // Add the difference from the previously loaded state
+ // to the global loaded counter:
+ this._progress.loaded += (loaded - data._progress.loaded);
+ this._progress.bitrate = this._bitrateTimer.getBitrate(
+ now,
+ this._progress.loaded,
+ data.bitrateInterval
+ );
+ data._progress.loaded = data.loaded = loaded;
+ data._progress.bitrate = data.bitrate = data._bitrateTimer.getBitrate(
+ now,
+ loaded,
+ data.bitrateInterval
+ );
+ // Trigger a custom progress event with a total data property set
+ // to the file size(s) of the current upload and a loaded data
+ // property calculated accordingly:
+ this._trigger(
+ 'progress',
+ $.Event('progress', {delegatedEvent: e}),
+ data
+ );
+ // Trigger a global progress event for all current file uploads,
+ // including ajax calls queued for sequential file uploads:
+ this._trigger(
+ 'progressall',
+ $.Event('progressall', {delegatedEvent: e}),
+ this._progress
+ );
+ }
+ },
+
+ _initProgressListener: function (options) {
+ var that = this,
+ xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr();
+ // Accesss to the native XHR object is required to add event listeners
+ // for the upload progress event:
+ if (xhr.upload) {
+ $(xhr.upload).bind('progress', function (e) {
+ var oe = e.originalEvent;
+ // Make sure the progress event properties get copied over:
+ e.lengthComputable = oe.lengthComputable;
+ e.loaded = oe.loaded;
+ e.total = oe.total;
+ that._onProgress(e, options);
+ });
+ options.xhr = function () {
+ return xhr;
+ };
+ }
+ },
+
+ _isInstanceOf: function (type, obj) {
+ // Cross-frame instanceof check
+ return Object.prototype.toString.call(obj) === '[object ' + type + ']';
+ },
+
+ _initXHRData: function (options) {
+ var that = this,
+ formData,
+ file = options.files[0],
+ // Ignore non-multipart setting if not supported:
+ multipart = options.multipart || !$.support.xhrFileUpload,
+ paramName = $.type(options.paramName) === 'array' ?
+ options.paramName[0] : options.paramName;
+ options.headers = $.extend({}, options.headers);
+ if (options.contentRange) {
+ options.headers['Content-Range'] = options.contentRange;
+ }
+ if (!multipart || options.blob || !this._isInstanceOf('File', file)) {
+ options.headers['Content-Disposition'] = 'attachment; filename="' +
+ encodeURI(file.name) + '"';
+ }
+ if (!multipart) {
+ options.contentType = file.type || 'application/octet-stream';
+ options.data = options.blob || file;
+ } else if ($.support.xhrFormDataFileUpload) {
+ if (options.postMessage) {
+ // window.postMessage does not allow sending FormData
+ // objects, so we just add the File/Blob objects to
+ // the formData array and let the postMessage window
+ // create the FormData object out of this array:
+ formData = this._getFormData(options);
+ if (options.blob) {
+ formData.push({
+ name: paramName,
+ value: options.blob
+ });
+ } else {
+ $.each(options.files, function (index, file) {
+ formData.push({
+ name: ($.type(options.paramName) === 'array' &&
+ options.paramName[index]) || paramName,
+ value: file
+ });
+ });
+ }
+ } else {
+ if (that._isInstanceOf('FormData', options.formData)) {
+ formData = options.formData;
+ } else {
+ formData = new FormData();
+ $.each(this._getFormData(options), function (index, field) {
+ formData.append(field.name, field.value);
+ });
+ }
+ if (options.blob) {
+ formData.append(paramName, options.blob, file.name);
+ } else {
+ $.each(options.files, function (index, file) {
+ // This check allows the tests to run with
+ // dummy objects:
+ if (that._isInstanceOf('File', file) ||
+ that._isInstanceOf('Blob', file)) {
+ formData.append(
+ ($.type(options.paramName) === 'array' &&
+ options.paramName[index]) || paramName,
+ file,
+ file.uploadName || file.name
+ );
+ }
+ });
+ }
+ }
+ options.data = formData;
+ }
+ // Blob reference is not needed anymore, free memory:
+ options.blob = null;
+ },
+
+ _initIframeSettings: function (options) {
+ var targetHost = $('<a></a>').prop('href', options.url).prop('host');
+ // Setting the dataType to iframe enables the iframe transport:
+ options.dataType = 'iframe ' + (options.dataType || '');
+ // The iframe transport accepts a serialized array as form data:
+ options.formData = this._getFormData(options);
+ // Add redirect url to form data on cross-domain uploads:
+ if (options.redirect && targetHost && targetHost !== location.host) {
+ options.formData.push({
+ name: options.redirectParamName || 'redirect',
+ value: options.redirect
+ });
+ }
+ },
+
+ _initDataSettings: function (options) {
+ if (this._isXHRUpload(options)) {
+ if (!this._chunkedUpload(options, true)) {
+ if (!options.data) {
+ this._initXHRData(options);
+ }
+ this._initProgressListener(options);
+ }
+ if (options.postMessage) {
+ // Setting the dataType to postmessage enables the
+ // postMessage transport:
+ options.dataType = 'postmessage ' + (options.dataType || '');
+ }
+ } else {
+ this._initIframeSettings(options);
+ }
+ },
+
+ _getParamName: function (options) {
+ var fileInput = $(options.fileInput),
+ paramName = options.paramName;
+ if (!paramName) {
+ paramName = [];
+ fileInput.each(function () {
+ var input = $(this),
+ name = input.prop('name') || 'files[]',
+ i = (input.prop('files') || [1]).length;
+ while (i) {
+ paramName.push(name);
+ i -= 1;
+ }
+ });
+ if (!paramName.length) {
+ paramName = [fileInput.prop('name') || 'files[]'];
+ }
+ } else if (!$.isArray(paramName)) {
+ paramName = [paramName];
+ }
+ return paramName;
+ },
+
+ _initFormSettings: function (options) {
+ // Retrieve missing options from the input field and the
+ // associated form, if available:
+ if (!options.form || !options.form.length) {
+ options.form = $(options.fileInput.prop('form'));
+ // If the given file input doesn't have an associated form,
+ // use the default widget file input's form:
+ if (!options.form.length) {
+ options.form = $(this.options.fileInput.prop('form'));
+ }
+ }
+ options.paramName = this._getParamName(options);
+ if (!options.url) {
+ options.url = options.form.prop('action') || location.href;
+ }
+ // The HTTP request method must be "POST" or "PUT":
+ options.type = (options.type ||
+ ($.type(options.form.prop('method')) === 'string' &&
+ options.form.prop('method')) || ''
+ ).toUpperCase();
+ if (options.type !== 'POST' && options.type !== 'PUT' &&
+ options.type !== 'PATCH') {
+ options.type = 'POST';
+ }
+ if (!options.formAcceptCharset) {
+ options.formAcceptCharset = options.form.attr('accept-charset');
+ }
+ },
+
+ _getAJAXSettings: function (data) {
+ var options = $.extend({}, this.options, data);
+ this._initFormSettings(options);
+ this._initDataSettings(options);
+ return options;
+ },
+
+ // jQuery 1.6 doesn't provide .state(),
+ // while jQuery 1.8+ removed .isRejected() and .isResolved():
+ _getDeferredState: function (deferred) {
+ if (deferred.state) {
+ return deferred.state();
+ }
+ if (deferred.isResolved()) {
+ return 'resolved';
+ }
+ if (deferred.isRejected()) {
+ return 'rejected';
+ }
+ return 'pending';
+ },
+
+ // Maps jqXHR callbacks to the equivalent
+ // methods of the given Promise object:
+ _enhancePromise: function (promise) {
+ promise.success = promise.done;
+ promise.error = promise.fail;
+ promise.complete = promise.always;
+ return promise;
+ },
+
+ // Creates and returns a Promise object enhanced with
+ // the jqXHR methods abort, success, error and complete:
+ _getXHRPromise: function (resolveOrReject, context, args) {
+ var dfd = $.Deferred(),
+ promise = dfd.promise();
+ context = context || this.options.context || promise;
+ if (resolveOrReject === true) {
+ dfd.resolveWith(context, args);
+ } else if (resolveOrReject === false) {
+ dfd.rejectWith(context, args);
+ }
+ promise.abort = dfd.promise;
+ return this._enhancePromise(promise);
+ },
+
+ // Adds convenience methods to the data callback argument:
+ _addConvenienceMethods: function (e, data) {
+ var that = this,
+ getPromise = function (args) {
+ return $.Deferred().resolveWith(that, args).promise();
+ };
+ data.process = function (resolveFunc, rejectFunc) {
+ if (resolveFunc || rejectFunc) {
+ data._processQueue = this._processQueue =
+ (this._processQueue || getPromise([this])).pipe(
+ function () {
+ if (data.errorThrown) {
+ return $.Deferred()
+ .rejectWith(that, [data]).promise();
+ }
+ return getPromise(arguments);
+ }
+ ).pipe(resolveFunc, rejectFunc);
+ }
+ return this._processQueue || getPromise([this]);
+ };
+ data.submit = function () {
+ if (this.state() !== 'pending') {
+ data.jqXHR = this.jqXHR =
+ (that._trigger(
+ 'submit',
+ $.Event('submit', {delegatedEvent: e}),
+ this
+ ) !== false) && that._onSend(e, this);
+ }
+ return this.jqXHR || that._getXHRPromise();
+ };
+ data.abort = function () {
+ if (this.jqXHR) {
+ return this.jqXHR.abort();
+ }
+ this.errorThrown = 'abort';
+ that._trigger('fail', null, this);
+ return that._getXHRPromise(false);
+ };
+ data.state = function () {
+ if (this.jqXHR) {
+ return that._getDeferredState(this.jqXHR);
+ }
+ if (this._processQueue) {
+ return that._getDeferredState(this._processQueue);
+ }
+ };
+ data.processing = function () {
+ return !this.jqXHR && this._processQueue && that
+ ._getDeferredState(this._processQueue) === 'pending';
+ };
+ data.progress = function () {
+ return this._progress;
+ };
+ data.response = function () {
+ return this._response;
+ };
+ },
+
+ // Parses the Range header from the server response
+ // and returns the uploaded bytes:
+ _getUploadedBytes: function (jqXHR) {
+ var range = jqXHR.getResponseHeader('Range'),
+ parts = range && range.split('-'),
+ upperBytesPos = parts && parts.length > 1 &&
+ parseInt(parts[1], 10);
+ return upperBytesPos && upperBytesPos + 1;
+ },
+
+ // Uploads a file in multiple, sequential requests
+ // by splitting the file up in multiple blob chunks.
+ // If the second parameter is true, only tests if the file
+ // should be uploaded in chunks, but does not invoke any
+ // upload requests:
+ _chunkedUpload: function (options, testOnly) {
+ options.uploadedBytes = options.uploadedBytes || 0;
+ var that = this,
+ file = options.files[0],
+ fs = file.size,
+ ub = options.uploadedBytes,
+ mcs = options.maxChunkSize || fs,
+ slice = this._blobSlice,
+ dfd = $.Deferred(),
+ promise = dfd.promise(),
+ jqXHR,
+ upload;
+ if (!(this._isXHRUpload(options) && slice && (ub || mcs < fs)) ||
+ options.data) {
+ return false;
+ }
+ if (testOnly) {
+ return true;
+ }
+ if (ub >= fs) {
+ file.error = options.i18n('uploadedBytes');
+ return this._getXHRPromise(
+ false,
+ options.context,
+ [null, 'error', file.error]
+ );
+ }
+ // The chunk upload method:
+ upload = function () {
+ // Clone the options object for each chunk upload:
+ var o = $.extend({}, options),
+ currentLoaded = o._progress.loaded;
+ o.blob = slice.call(
+ file,
+ ub,
+ ub + mcs,
+ file.type
+ );
+ // Store the current chunk size, as the blob itself
+ // will be dereferenced after data processing:
+ o.chunkSize = o.blob.size;
+ // Expose the chunk bytes position range:
+ o.contentRange = 'bytes ' + ub + '-' +
+ (ub + o.chunkSize - 1) + '/' + fs;
+ // Process the upload data (the blob and potential form data):
+ that._initXHRData(o);
+ // Add progress listeners for this chunk upload:
+ that._initProgressListener(o);
+ jqXHR = ((that._trigger('chunksend', null, o) !== false && $.ajax(o)) ||
+ that._getXHRPromise(false, o.context))
+ .done(function (result, textStatus, jqXHR) {
+ ub = that._getUploadedBytes(jqXHR) ||
+ (ub + o.chunkSize);
+ // Create a progress event if no final progress event
+ // with loaded equaling total has been triggered
+ // for this chunk:
+ if (currentLoaded + o.chunkSize - o._progress.loaded) {
+ that._onProgress($.Event('progress', {
+ lengthComputable: true,
+ loaded: ub - o.uploadedBytes,
+ total: ub - o.uploadedBytes
+ }), o);
+ }
+ options.uploadedBytes = o.uploadedBytes = ub;
+ o.result = result;
+ o.textStatus = textStatus;
+ o.jqXHR = jqXHR;
+ that._trigger('chunkdone', null, o);
+ that._trigger('chunkalways', null, o);
+ if (ub < fs) {
+ // File upload not yet complete,
+ // continue with the next chunk:
+ upload();
+ } else {
+ dfd.resolveWith(
+ o.context,
+ [result, textStatus, jqXHR]
+ );
+ }
+ })
+ .fail(function (jqXHR, textStatus, errorThrown) {
+ o.jqXHR = jqXHR;
+ o.textStatus = textStatus;
+ o.errorThrown = errorThrown;
+ that._trigger('chunkfail', null, o);
+ that._trigger('chunkalways', null, o);
+ dfd.rejectWith(
+ o.context,
+ [jqXHR, textStatus, errorThrown]
+ );
+ });
+ };
+ this._enhancePromise(promise);
+ promise.abort = function () {
+ return jqXHR.abort();
+ };
+ upload();
+ return promise;
+ },
+
+ _beforeSend: function (e, data) {
+ if (this._active === 0) {
+ // the start callback is triggered when an upload starts
+ // and no other uploads are currently running,
+ // equivalent to the global ajaxStart event:
+ this._trigger('start');
+ // Set timer for global bitrate progress calculation:
+ this._bitrateTimer = new this._BitrateTimer();
+ // Reset the global progress values:
+ this._progress.loaded = this._progress.total = 0;
+ this._progress.bitrate = 0;
+ }
+ // Make sure the container objects for the .response() and
+ // .progress() methods on the data object are available
+ // and reset to their initial state:
+ this._initResponseObject(data);
+ this._initProgressObject(data);
+ data._progress.loaded = data.loaded = data.uploadedBytes || 0;
+ data._progress.total = data.total = this._getTotal(data.files) || 1;
+ data._progress.bitrate = data.bitrate = 0;
+ this._active += 1;
+ // Initialize the global progress values:
+ this._progress.loaded += data.loaded;
+ this._progress.total += data.total;
+ },
+
+ _onDone: function (result, textStatus, jqXHR, options) {
+ var total = options._progress.total,
+ response = options._response;
+ if (options._progress.loaded < total) {
+ // Create a progress event if no final progress event
+ // with loaded equaling total has been triggered:
+ this._onProgress($.Event('progress', {
+ lengthComputable: true,
+ loaded: total,
+ total: total
+ }), options);
+ }
+ response.result = options.result = result;
+ response.textStatus = options.textStatus = textStatus;
+ response.jqXHR = options.jqXHR = jqXHR;
+ this._trigger('done', null, options);
+ },
+
+ _onFail: function (jqXHR, textStatus, errorThrown, options) {
+ var response = options._response;
+ if (options.recalculateProgress) {
+ // Remove the failed (error or abort) file upload from
+ // the global progress calculation:
+ this._progress.loaded -= options._progress.loaded;
+ this._progress.total -= options._progress.total;
+ }
+ response.jqXHR = options.jqXHR = jqXHR;
+ response.textStatus = options.textStatus = textStatus;
+ response.errorThrown = options.errorThrown = errorThrown;
+ this._trigger('fail', null, options);
+ },
+
+ _onAlways: function (jqXHRorResult, textStatus, jqXHRorError, options) {
+ // jqXHRorResult, textStatus and jqXHRorError are added to the
+ // options object via done and fail callbacks
+ this._trigger('always', null, options);
+ },
+
+ _onSend: function (e, data) {
+ if (!data.submit) {
+ this._addConvenienceMethods(e, data);
+ }
+ var that = this,
+ jqXHR,
+ aborted,
+ slot,
+ pipe,
+ options = that._getAJAXSettings(data),
+ send = function () {
+ that._sending += 1;
+ // Set timer for bitrate progress calculation:
+ options._bitrateTimer = new that._BitrateTimer();
+ jqXHR = jqXHR || (
+ ((aborted || that._trigger(
+ 'send',
+ $.Event('send', {delegatedEvent: e}),
+ options
+ ) === false) &&
+ that._getXHRPromise(false, options.context, aborted)) ||
+ that._chunkedUpload(options) || $.ajax(options)
+ ).done(function (result, textStatus, jqXHR) {
+ that._onDone(result, textStatus, jqXHR, options);
+ }).fail(function (jqXHR, textStatus, errorThrown) {
+ that._onFail(jqXHR, textStatus, errorThrown, options);
+ }).always(function (jqXHRorResult, textStatus, jqXHRorError) {
+ that._onAlways(
+ jqXHRorResult,
+ textStatus,
+ jqXHRorError,
+ options
+ );
+ that._sending -= 1;
+ that._active -= 1;
+ if (options.limitConcurrentUploads &&
+ options.limitConcurrentUploads > that._sending) {
+ // Start the next queued upload,
+ // that has not been aborted:
+ var nextSlot = that._slots.shift();
+ while (nextSlot) {
+ if (that._getDeferredState(nextSlot) === 'pending') {
+ nextSlot.resolve();
+ break;
+ }
+ nextSlot = that._slots.shift();
+ }
+ }
+ if (that._active === 0) {
+ // The stop callback is triggered when all uploads have
+ // been completed, equivalent to the global ajaxStop event:
+ that._trigger('stop');
+ }
+ });
+ return jqXHR;
+ };
+ this._beforeSend(e, options);
+ if (this.options.sequentialUploads ||
+ (this.options.limitConcurrentUploads &&
+ this.options.limitConcurrentUploads <= this._sending)) {
+ if (this.options.limitConcurrentUploads > 1) {
+ slot = $.Deferred();
+ this._slots.push(slot);
+ pipe = slot.pipe(send);
+ } else {
+ this._sequence = this._sequence.pipe(send, send);
+ pipe = this._sequence;
+ }
+ // Return the piped Promise object, enhanced with an abort method,
+ // which is delegated to the jqXHR object of the current upload,
+ // and jqXHR callbacks mapped to the equivalent Promise methods:
+ pipe.abort = function () {
+ aborted = [undefined, 'abort', 'abort'];
+ if (!jqXHR) {
+ if (slot) {
+ slot.rejectWith(options.context, aborted);
+ }
+ return send();
+ }
+ return jqXHR.abort();
+ };
+ return this._enhancePromise(pipe);
+ }
+ return send();
+ },
+
+ _onAdd: function (e, data) {
+ var that = this,
+ result = true,
+ options = $.extend({}, this.options, data),
+ files = data.files,
+ filesLength = files.length,
+ limit = options.limitMultiFileUploads,
+ limitSize = options.limitMultiFileUploadSize,
+ overhead = options.limitMultiFileUploadSizeOverhead,
+ batchSize = 0,
+ paramName = this._getParamName(options),
+ paramNameSet,
+ paramNameSlice,
+ fileSet,
+ i,
+ j = 0;
+ if (!filesLength) {
+ return false;
+ }
+ if (limitSize && files[0].size === undefined) {
+ limitSize = undefined;
+ }
+ if (!(options.singleFileUploads || limit || limitSize) ||
+ !this._isXHRUpload(options)) {
+ fileSet = [files];
+ paramNameSet = [paramName];
+ } else if (!(options.singleFileUploads || limitSize) && limit) {
+ fileSet = [];
+ paramNameSet = [];
+ for (i = 0; i < filesLength; i += limit) {
+ fileSet.push(files.slice(i, i + limit));
+ paramNameSlice = paramName.slice(i, i + limit);
+ if (!paramNameSlice.length) {
+ paramNameSlice = paramName;
+ }
+ paramNameSet.push(paramNameSlice);
+ }
+ } else if (!options.singleFileUploads && limitSize) {
+ fileSet = [];
+ paramNameSet = [];
+ for (i = 0; i < filesLength; i = i + 1) {
+ batchSize += files[i].size + overhead;
+ if (i + 1 === filesLength ||
+ ((batchSize + files[i + 1].size + overhead) > limitSize) ||
+ (limit && i + 1 - j >= limit)) {
+ fileSet.push(files.slice(j, i + 1));
+ paramNameSlice = paramName.slice(j, i + 1);
+ if (!paramNameSlice.length) {
+ paramNameSlice = paramName;
+ }
+ paramNameSet.push(paramNameSlice);
+ j = i + 1;
+ batchSize = 0;
+ }
+ }
+ } else {
+ paramNameSet = paramName;
+ }
+ data.originalFiles = files;
+ $.each(fileSet || files, function (index, element) {
+ var newData = $.extend({}, data);
+ newData.files = fileSet ? element : [element];
+ newData.paramName = paramNameSet[index];
+ that._initResponseObject(newData);
+ that._initProgressObject(newData);
+ that._addConvenienceMethods(e, newData);
+ result = that._trigger(
+ 'add',
+ $.Event('add', {delegatedEvent: e}),
+ newData
+ );
+ return result;
+ });
+ return result;
+ },
+
+ _replaceFileInput: function (data) {
+ var input = data.fileInput,
+ inputClone = input.clone(true),
+ restoreFocus = input.is(document.activeElement);
+ // Add a reference for the new cloned file input to the data argument:
+ data.fileInputClone = inputClone;
+ $('<form></form>').append(inputClone)[0].reset();
+ // Detaching allows to insert the fileInput on another form
+ // without loosing the file input value:
+ input.after(inputClone).detach();
+ // If the fileInput had focus before it was detached,
+ // restore focus to the inputClone.
+ if (restoreFocus) {
+ inputClone.focus();
+ }
+ // Avoid memory leaks with the detached file input:
+ $.cleanData(input.unbind('remove'));
+ // Replace the original file input element in the fileInput
+ // elements set with the clone, which has been copied including
+ // event handlers:
+ this.options.fileInput = this.options.fileInput.map(function (i, el) {
+ if (el === input[0]) {
+ return inputClone[0];
+ }
+ return el;
+ });
+ // If the widget has been initialized on the file input itself,
+ // override this.element with the file input clone:
+ if (input[0] === this.element[0]) {
+ this.element = inputClone;
+ }
+ },
+
+ _handleFileTreeEntry: function (entry, path) {
+ var that = this,
+ dfd = $.Deferred(),
+ errorHandler = function (e) {
+ if (e && !e.entry) {
+ e.entry = entry;
+ }
+ // Since $.when returns immediately if one
+ // Deferred is rejected, we use resolve instead.
+ // This allows valid files and invalid items
+ // to be returned together in one set:
+ dfd.resolve([e]);
+ },
+ successHandler = function (entries) {
+ that._handleFileTreeEntries(
+ entries,
+ path + entry.name + '/'
+ ).done(function (files) {
+ dfd.resolve(files);
+ }).fail(errorHandler);
+ },
+ readEntries = function () {
+ dirReader.readEntries(function (results) {
+ if (!results.length) {
+ successHandler(entries);
+ } else {
+ entries = entries.concat(results);
+ readEntries();
+ }
+ }, errorHandler);
+ },
+ dirReader, entries = [];
+ path = path || '';
+ if (entry.isFile) {
+ if (entry._file) {
+ // Workaround for Chrome bug #149735
+ entry._file.relativePath = path;
+ dfd.resolve(entry._file);
+ } else {
+ entry.file(function (file) {
+ file.relativePath = path;
+ dfd.resolve(file);
+ }, errorHandler);
+ }
+ } else if (entry.isDirectory) {
+ dirReader = entry.createReader();
+ readEntries();
+ } else {
+ // Return an empy list for file system items
+ // other than files or directories:
+ dfd.resolve([]);
+ }
+ return dfd.promise();
+ },
+
+ _handleFileTreeEntries: function (entries, path) {
+ var that = this;
+ return $.when.apply(
+ $,
+ $.map(entries, function (entry) {
+ return that._handleFileTreeEntry(entry, path);
+ })
+ ).pipe(function () {
+ return Array.prototype.concat.apply(
+ [],
+ arguments
+ );
+ });
+ },
+
+ _getDroppedFiles: function (dataTransfer) {
+ dataTransfer = dataTransfer || {};
+ var items = dataTransfer.items;
+ if (items && items.length && (items[0].webkitGetAsEntry ||
+ items[0].getAsEntry)) {
+ return this._handleFileTreeEntries(
+ $.map(items, function (item) {
+ var entry;
+ if (item.webkitGetAsEntry) {
+ entry = item.webkitGetAsEntry();
+ if (entry) {
+ // Workaround for Chrome bug #149735:
+ entry._file = item.getAsFile();
+ }
+ return entry;
+ }
+ return item.getAsEntry();
+ })
+ );
+ }
+ return $.Deferred().resolve(
+ $.makeArray(dataTransfer.files)
+ ).promise();
+ },
+
+ _getSingleFileInputFiles: function (fileInput) {
+ fileInput = $(fileInput);
+ var entries = fileInput.prop('webkitEntries') ||
+ fileInput.prop('entries'),
+ files,
+ value;
+ if (entries && entries.length) {
+ return this._handleFileTreeEntries(entries);
+ }
+ files = $.makeArray(fileInput.prop('files'));
+ if (!files.length) {
+ value = fileInput.prop('value');
+ if (!value) {
+ return $.Deferred().resolve([]).promise();
+ }
+ // If the files property is not available, the browser does not
+ // support the File API and we add a pseudo File object with
+ // the input value as name with path information removed:
+ files = [{name: value.replace(/^.*\\/, '')}];
+ } else if (files[0].name === undefined && files[0].fileName) {
+ // File normalization for Safari 4 and Firefox 3:
+ $.each(files, function (index, file) {
+ file.name = file.fileName;
+ file.size = file.fileSize;
+ });
+ }
+ return $.Deferred().resolve(files).promise();
+ },
+
+ _getFileInputFiles: function (fileInput) {
+ if (!(fileInput instanceof $) || fileInput.length === 1) {
+ return this._getSingleFileInputFiles(fileInput);
+ }
+ return $.when.apply(
+ $,
+ $.map(fileInput, this._getSingleFileInputFiles)
+ ).pipe(function () {
+ return Array.prototype.concat.apply(
+ [],
+ arguments
+ );
+ });
+ },
+
+ _onChange: function (e) {
+ var that = this,
+ data = {
+ fileInput: $(e.target),
+ form: $(e.target.form)
+ };
+ this._getFileInputFiles(data.fileInput).always(function (files) {
+ data.files = files;
+ if (that.options.replaceFileInput) {
+ that._replaceFileInput(data);
+ }
+ if (that._trigger(
+ 'change',
+ $.Event('change', {delegatedEvent: e}),
+ data
+ ) !== false) {
+ that._onAdd(e, data);
+ }
+ });
+ },
+
+ _onPaste: function (e) {
+ var items = e.originalEvent && e.originalEvent.clipboardData &&
+ e.originalEvent.clipboardData.items,
+ data = {files: []};
+ if (items && items.length) {
+ $.each(items, function (index, item) {
+ var file = item.getAsFile && item.getAsFile();
+ if (file) {
+ data.files.push(file);
+ }
+ });
+ if (this._trigger(
+ 'paste',
+ $.Event('paste', {delegatedEvent: e}),
+ data
+ ) !== false) {
+ this._onAdd(e, data);
+ }
+ }
+ },
+
+ _onDrop: function (e) {
+ e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;
+ var that = this,
+ dataTransfer = e.dataTransfer,
+ data = {};
+ if (dataTransfer && dataTransfer.files && dataTransfer.files.length) {
+ e.preventDefault();
+ this._getDroppedFiles(dataTransfer).always(function (files) {
+ data.files = files;
+ if (that._trigger(
+ 'drop',
+ $.Event('drop', {delegatedEvent: e}),
+ data
+ ) !== false) {
+ that._onAdd(e, data);
+ }
+ });
+ }
+ },
+
+ _onDragOver: getDragHandler('dragover'),
+
+ _onDragEnter: getDragHandler('dragenter'),
+
+ _onDragLeave: getDragHandler('dragleave'),
+
+ _initEventHandlers: function () {
+ if (this._isXHRUpload(this.options)) {
+ this._on(this.options.dropZone, {
+ dragover: this._onDragOver,
+ drop: this._onDrop,
+ // event.preventDefault() on dragenter is required for IE10+:
+ dragenter: this._onDragEnter,
+ // dragleave is not required, but added for completeness:
+ dragleave: this._onDragLeave
+ });
+ this._on(this.options.pasteZone, {
+ paste: this._onPaste
+ });
+ }
+ if ($.support.fileInput) {
+ this._on(this.options.fileInput, {
+ change: this._onChange
+ });
+ }
+ },
+
+ _destroyEventHandlers: function () {
+ this._off(this.options.dropZone, 'dragenter dragleave dragover drop');
+ this._off(this.options.pasteZone, 'paste');
+ this._off(this.options.fileInput, 'change');
+ },
+
+ _setOption: function (key, value) {
+ var reinit = $.inArray(key, this._specialOptions) !== -1;
+ if (reinit) {
+ this._destroyEventHandlers();
+ }
+ this._super(key, value);
+ if (reinit) {
+ this._initSpecialOptions();
+ this._initEventHandlers();
+ }
+ },
+
+ _initSpecialOptions: function () {
+ var options = this.options;
+ if (options.fileInput === undefined) {
+ options.fileInput = this.element.is('input[type="file"]') ?
+ this.element : this.element.find('input[type="file"]');
+ } else if (!(options.fileInput instanceof $)) {
+ options.fileInput = $(options.fileInput);
+ }
+ if (!(options.dropZone instanceof $)) {
+ options.dropZone = $(options.dropZone);
+ }
+ if (!(options.pasteZone instanceof $)) {
+ options.pasteZone = $(options.pasteZone);
+ }
+ },
+
+ _getRegExp: function (str) {
+ var parts = str.split('/'),
+ modifiers = parts.pop();
+ parts.shift();
+ return new RegExp(parts.join('/'), modifiers);
+ },
+
+ _isRegExpOption: function (key, value) {
+ return key !== 'url' && $.type(value) === 'string' &&
+ /^\/.*\/[igm]{0,3}$/.test(value);
+ },
+
+ _initDataAttributes: function () {
+ var that = this,
+ options = this.options,
+ data = this.element.data();
+ // Initialize options set via HTML5 data-attributes:
+ $.each(
+ this.element[0].attributes,
+ function (index, attr) {
+ var key = attr.name.toLowerCase(),
+ value;
+ if (/^data-/.test(key)) {
+ // Convert hyphen-ated key to camelCase:
+ key = key.slice(5).replace(/-[a-z]/g, function (str) {
+ return str.charAt(1).toUpperCase();
+ });
+ value = data[key];
+ if (that._isRegExpOption(key, value)) {
+ value = that._getRegExp(value);
+ }
+ options[key] = value;
+ }
+ }
+ );
+ },
+
+ _create: function () {
+ this._initDataAttributes();
+ this._initSpecialOptions();
+ this._slots = [];
+ this._sequence = this._getXHRPromise(true);
+ this._sending = this._active = 0;
+ this._initProgressObject(this);
+ this._initEventHandlers();
+ },
+
+ // This method is exposed to the widget API and allows to query
+ // the number of active uploads:
+ active: function () {
+ return this._active;
+ },
+
+ // This method is exposed to the widget API and allows to query
+ // the widget upload progress.
+ // It returns an object with loaded, total and bitrate properties
+ // for the running uploads:
+ progress: function () {
+ return this._progress;
+ },
+
+ // This method is exposed to the widget API and allows adding files
+ // using the fileupload API. The data parameter accepts an object which
+ // must have a files property and can contain additional options:
+ // .fileupload('add', {files: filesList});
+ add: function (data) {
+ var that = this;
+ if (!data || this.options.disabled) {
+ return;
+ }
+ if (data.fileInput && !data.files) {
+ this._getFileInputFiles(data.fileInput).always(function (files) {
+ data.files = files;
+ that._onAdd(null, data);
+ });
+ } else {
+ data.files = $.makeArray(data.files);
+ this._onAdd(null, data);
+ }
+ },
+
+ // This method is exposed to the widget API and allows sending files
+ // using the fileupload API. The data parameter accepts an object which
+ // must have a files or fileInput property and can contain additional options:
+ // .fileupload('send', {files: filesList});
+ // The method returns a Promise object for the file upload call.
+ send: function (data) {
+ if (data && !this.options.disabled) {
+ if (data.fileInput && !data.files) {
+ var that = this,
+ dfd = $.Deferred(),
+ promise = dfd.promise(),
+ jqXHR,
+ aborted;
+ promise.abort = function () {
+ aborted = true;
+ if (jqXHR) {
+ return jqXHR.abort();
+ }
+ dfd.reject(null, 'abort', 'abort');
+ return promise;
+ };
+ this._getFileInputFiles(data.fileInput).always(
+ function (files) {
+ if (aborted) {
+ return;
+ }
+ if (!files.length) {
+ dfd.reject();
+ return;
+ }
+ data.files = files;
+ jqXHR = that._onSend(null, data);
+ jqXHR.then(
+ function (result, textStatus, jqXHR) {
+ dfd.resolve(result, textStatus, jqXHR);
+ },
+ function (jqXHR, textStatus, errorThrown) {
+ dfd.reject(jqXHR, textStatus, errorThrown);
+ }
+ );
+ }
+ );
+ return this._enhancePromise(promise);
+ }
+ data.files = $.makeArray(data.files);
+ if (data.files.length) {
+ return this._onSend(null, data);
+ }
+ }
+ return this._getXHRPromise(false, data && data.context);
+ }
+
+ });
+
+}));
diff --git a/common/src/main/webapp/thirdparty/jQuery-File-Upload/js/jquery.iframe-transport.js b/common/src/main/webapp/thirdparty/jQuery-File-Upload/js/jquery.iframe-transport.js
new file mode 100644
index 0000000..a7d34e0
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jQuery-File-Upload/js/jquery.iframe-transport.js
@@ -0,0 +1,217 @@
+/*
+ * jQuery Iframe Transport Plugin
+ * https://github.com/blueimp/jQuery-File-Upload
+ *
+ * Copyright 2011, Sebastian Tschan
+ * https://blueimp.net
+ *
+ * Licensed under the MIT license:
+ * http://www.opensource.org/licenses/MIT
+ */
+
+/* global define, require, window, document */
+
+(function (factory) {
+ 'use strict';
+ if (typeof define === 'function' && define.amd) {
+ // Register as an anonymous AMD module:
+ define(['jquery'], factory);
+ } else if (typeof exports === 'object') {
+ // Node/CommonJS:
+ factory(require('jquery'));
+ } else {
+ // Browser globals:
+ factory(window.jQuery);
+ }
+}(function ($) {
+ 'use strict';
+
+ // Helper variable to create unique names for the transport iframes:
+ var counter = 0;
+
+ // The iframe transport accepts four additional options:
+ // options.fileInput: a jQuery collection of file input fields
+ // options.paramName: the parameter name for the file form data,
+ // overrides the name property of the file input field(s),
+ // can be a string or an array of strings.
+ // options.formData: an array of objects with name and value properties,
+ // equivalent to the return data of .serializeArray(), e.g.:
+ // [{name: 'a', value: 1}, {name: 'b', value: 2}]
+ // options.initialIframeSrc: the URL of the initial iframe src,
+ // by default set to "javascript:false;"
+ $.ajaxTransport('iframe', function (options) {
+ if (options.async) {
+ // javascript:false as initial iframe src
+ // prevents warning popups on HTTPS in IE6:
+ /*jshint scripturl: true */
+ var initialIframeSrc = options.initialIframeSrc || 'javascript:false;',
+ /*jshint scripturl: false */
+ form,
+ iframe,
+ addParamChar;
+ return {
+ send: function (_, completeCallback) {
+ form = $('<form style="display:none;"></form>');
+ form.attr('accept-charset', options.formAcceptCharset);
+ addParamChar = /\?/.test(options.url) ? '&' : '?';
+ // XDomainRequest only supports GET and POST:
+ if (options.type === 'DELETE') {
+ options.url = options.url + addParamChar + '_method=DELETE';
+ options.type = 'POST';
+ } else if (options.type === 'PUT') {
+ options.url = options.url + addParamChar + '_method=PUT';
+ options.type = 'POST';
+ } else if (options.type === 'PATCH') {
+ options.url = options.url + addParamChar + '_method=PATCH';
+ options.type = 'POST';
+ }
+ // IE versions below IE8 cannot set the name property of
+ // elements that have already been added to the DOM,
+ // so we set the name along with the iframe HTML markup:
+ counter += 1;
+ iframe = $(
+ '<iframe src="' + initialIframeSrc +
+ '" name="iframe-transport-' + counter + '"></iframe>'
+ ).bind('load', function () {
+ var fileInputClones,
+ paramNames = $.isArray(options.paramName) ?
+ options.paramName : [options.paramName];
+ iframe
+ .unbind('load')
+ .bind('load', function () {
+ var response;
+ // Wrap in a try/catch block to catch exceptions thrown
+ // when trying to access cross-domain iframe contents:
+ try {
+ response = iframe.contents();
+ // Google Chrome and Firefox do not throw an
+ // exception when calling iframe.contents() on
+ // cross-domain requests, so we unify the response:
+ if (!response.length || !response[0].firstChild) {
+ throw new Error();
+ }
+ } catch (e) {
+ response = undefined;
+ }
+ // The complete callback returns the
+ // iframe content document as response object:
+ completeCallback(
+ 200,
+ 'success',
+ {'iframe': response}
+ );
+ // Fix for IE endless progress bar activity bug
+ // (happens on form submits to iframe targets):
+ $('<iframe src="' + initialIframeSrc + '"></iframe>')
+ .appendTo(form);
+ window.setTimeout(function () {
+ // Removing the form in a setTimeout call
+ // allows Chrome's developer tools to display
+ // the response result
+ form.remove();
+ }, 0);
+ });
+ form
+ .prop('target', iframe.prop('name'))
+ .prop('action', options.url)
+ .prop('method', options.type);
+ if (options.formData) {
+ $.each(options.formData, function (index, field) {
+ $('<input type="hidden"/>')
+ .prop('name', field.name)
+ .val(field.value)
+ .appendTo(form);
+ });
+ }
+ if (options.fileInput && options.fileInput.length &&
+ options.type === 'POST') {
+ fileInputClones = options.fileInput.clone();
+ // Insert a clone for each file input field:
+ options.fileInput.after(function (index) {
+ return fileInputClones[index];
+ });
+ if (options.paramName) {
+ options.fileInput.each(function (index) {
+ $(this).prop(
+ 'name',
+ paramNames[index] || options.paramName
+ );
+ });
+ }
+ // Appending the file input fields to the hidden form
+ // removes them from their original location:
+ form
+ .append(options.fileInput)
+ .prop('enctype', 'multipart/form-data')
+ // enctype must be set as encoding for IE:
+ .prop('encoding', 'multipart/form-data');
+ // Remove the HTML5 form attribute from the input(s):
+ options.fileInput.removeAttr('form');
+ }
+ form.submit();
+ // Insert the file input fields at their original location
+ // by replacing the clones with the originals:
+ if (fileInputClones && fileInputClones.length) {
+ options.fileInput.each(function (index, input) {
+ var clone = $(fileInputClones[index]);
+ // Restore the original name and form properties:
+ $(input)
+ .prop('name', clone.prop('name'))
+ .attr('form', clone.attr('form'));
+ clone.replaceWith(input);
+ });
+ }
+ });
+ form.append(iframe).appendTo(document.body);
+ },
+ abort: function () {
+ if (iframe) {
+ // javascript:false as iframe src aborts the request
+ // and prevents warning popups on HTTPS in IE6.
+ // concat is used to avoid the "Script URL" JSLint error:
+ iframe
+ .unbind('load')
+ .prop('src', initialIframeSrc);
+ }
+ if (form) {
+ form.remove();
+ }
+ }
+ };
+ }
+ });
+
+ // The iframe transport returns the iframe content document as response.
+ // The following adds converters from iframe to text, json, html, xml
+ // and script.
+ // Please note that the Content-Type for JSON responses has to be text/plain
+ // or text/html, if the browser doesn't include application/json in the
+ // Accept header, else IE will show a download dialog.
+ // The Content-Type for XML responses on the other hand has to be always
+ // application/xml or text/xml, so IE properly parses the XML response.
+ // See also
+ // https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#content-type-negotiation
+ $.ajaxSetup({
+ converters: {
+ 'iframe text': function (iframe) {
+ return iframe && $(iframe[0].body).text();
+ },
+ 'iframe json': function (iframe) {
+ return iframe && $.parseJSON($(iframe[0].body).text());
+ },
+ 'iframe html': function (iframe) {
+ return iframe && $(iframe[0].body).html();
+ },
+ 'iframe xml': function (iframe) {
+ var xmlDoc = iframe && iframe[0];
+ return xmlDoc && $.isXMLDoc(xmlDoc) ? xmlDoc :
+ $.parseXML((xmlDoc.XMLDocument && xmlDoc.XMLDocument.xml) ||
+ $(xmlDoc.body).html());
+ },
+ 'iframe script': function (iframe) {
+ return iframe && $.globalEval($(iframe[0].body).text());
+ }
+ }
+ });
+
+}));
diff --git a/common/src/main/webapp/thirdparty/jQuery-File-Upload/js/vendor/jquery.ui.widget.js b/common/src/main/webapp/thirdparty/jQuery-File-Upload/js/vendor/jquery.ui.widget.js
new file mode 100644
index 0000000..e08df3f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jQuery-File-Upload/js/vendor/jquery.ui.widget.js
@@ -0,0 +1,572 @@
+/*! jQuery UI - v1.11.4+CommonJS - 2015-08-28
+* http://jqueryui.com
+* Includes: widget.js
+* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
+
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+
+ // AMD. Register as an anonymous module.
+ define([ "jquery" ], factory );
+
+ } else if ( typeof exports === "object" ) {
+
+ // Node/CommonJS
+ factory( require( "jquery" ) );
+
+ } else {
+
+ // Browser globals
+ factory( jQuery );
+ }
+}(function( $ ) {
+/*!
+ * jQuery UI Widget 1.11.4
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/jQuery.widget/
+ */
+
+
+var widget_uuid = 0,
+ widget_slice = Array.prototype.slice;
+
+$.cleanData = (function( orig ) {
+ return function( elems ) {
+ var events, elem, i;
+ for ( i = 0; (elem = elems[i]) != null; i++ ) {
+ try {
+
+ // Only trigger remove when necessary to save time
+ events = $._data( elem, "events" );
+ if ( events && events.remove ) {
+ $( elem ).triggerHandler( "remove" );
+ }
+
+ // http://bugs.jquery.com/ticket/8235
+ } catch ( e ) {}
+ }
+ orig( elems );
+ };
+})( $.cleanData );
+
+$.widget = function( name, base, prototype ) {
+ var fullName, existingConstructor, constructor, basePrototype,
+ // proxiedPrototype allows the provided prototype to remain unmodified
+ // so that it can be used as a mixin for multiple widgets (#8876)
+ proxiedPrototype = {},
+ namespace = name.split( "." )[ 0 ];
+
+ name = name.split( "." )[ 1 ];
+ fullName = namespace + "-" + name;
+
+ if ( !prototype ) {
+ prototype = base;
+ base = $.Widget;
+ }
+
+ // create selector for plugin
+ $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
+ return !!$.data( elem, fullName );
+ };
+
+ $[ namespace ] = $[ namespace ] || {};
+ existingConstructor = $[ namespace ][ name ];
+ constructor = $[ namespace ][ name ] = function( options, element ) {
+ // allow instantiation without "new" keyword
+ if ( !this._createWidget ) {
+ return new constructor( options, element );
+ }
+
+ // allow instantiation without initializing for simple inheritance
+ // must use "new" keyword (the code above always passes args)
+ if ( arguments.length ) {
+ this._createWidget( options, element );
+ }
+ };
+ // extend with the existing constructor to carry over any static properties
+ $.extend( constructor, existingConstructor, {
+ version: prototype.version,
+ // copy the object used to create the prototype in case we need to
+ // redefine the widget later
+ _proto: $.extend( {}, prototype ),
+ // track widgets that inherit from this widget in case this widget is
+ // redefined after a widget inherits from it
+ _childConstructors: []
+ });
+
+ basePrototype = new base();
+ // we need to make the options hash a property directly on the new instance
+ // otherwise we'll modify the options hash on the prototype that we're
+ // inheriting from
+ basePrototype.options = $.widget.extend( {}, basePrototype.options );
+ $.each( prototype, function( prop, value ) {
+ if ( !$.isFunction( value ) ) {
+ proxiedPrototype[ prop ] = value;
+ return;
+ }
+ proxiedPrototype[ prop ] = (function() {
+ var _super = function() {
+ return base.prototype[ prop ].apply( this, arguments );
+ },
+ _superApply = function( args ) {
+ return base.prototype[ prop ].apply( this, args );
+ };
+ return function() {
+ var __super = this._super,
+ __superApply = this._superApply,
+ returnValue;
+
+ this._super = _super;
+ this._superApply = _superApply;
+
+ returnValue = value.apply( this, arguments );
+
+ this._super = __super;
+ this._superApply = __superApply;
+
+ return returnValue;
+ };
+ })();
+ });
+ constructor.prototype = $.widget.extend( basePrototype, {
+ // TODO: remove support for widgetEventPrefix
+ // always use the name + a colon as the prefix, e.g., draggable:start
+ // don't prefix for widgets that aren't DOM-based
+ widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name
+ }, proxiedPrototype, {
+ constructor: constructor,
+ namespace: namespace,
+ widgetName: name,
+ widgetFullName: fullName
+ });
+
+ // If this widget is being redefined then we need to find all widgets that
+ // are inheriting from it and redefine all of them so that they inherit from
+ // the new version of this widget. We're essentially trying to replace one
+ // level in the prototype chain.
+ if ( existingConstructor ) {
+ $.each( existingConstructor._childConstructors, function( i, child ) {
+ var childPrototype = child.prototype;
+
+ // redefine the child widget using the same prototype that was
+ // originally used, but inherit from the new version of the base
+ $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
+ });
+ // remove the list of existing child constructors from the old constructor
+ // so the old child constructors can be garbage collected
+ delete existingConstructor._childConstructors;
+ } else {
+ base._childConstructors.push( constructor );
+ }
+
+ $.widget.bridge( name, constructor );
+
+ return constructor;
+};
+
+$.widget.extend = function( target ) {
+ var input = widget_slice.call( arguments, 1 ),
+ inputIndex = 0,
+ inputLength = input.length,
+ key,
+ value;
+ for ( ; inputIndex < inputLength; inputIndex++ ) {
+ for ( key in input[ inputIndex ] ) {
+ value = input[ inputIndex ][ key ];
+ if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
+ // Clone objects
+ if ( $.isPlainObject( value ) ) {
+ target[ key ] = $.isPlainObject( target[ key ] ) ?
+ $.widget.extend( {}, target[ key ], value ) :
+ // Don't extend strings, arrays, etc. with objects
+ $.widget.extend( {}, value );
+ // Copy everything else by reference
+ } else {
+ target[ key ] = value;
+ }
+ }
+ }
+ }
+ return target;
+};
+
+$.widget.bridge = function( name, object ) {
+ var fullName = object.prototype.widgetFullName || name;
+ $.fn[ name ] = function( options ) {
+ var isMethodCall = typeof options === "string",
+ args = widget_slice.call( arguments, 1 ),
+ returnValue = this;
+
+ if ( isMethodCall ) {
+ this.each(function() {
+ var methodValue,
+ instance = $.data( this, fullName );
+ if ( options === "instance" ) {
+ returnValue = instance;
+ return false;
+ }
+ if ( !instance ) {
+ return $.error( "cannot call methods on " + name + " prior to initialization; " +
+ "attempted to call method '" + options + "'" );
+ }
+ if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
+ return $.error( "no such method '" + options + "' for " + name + " widget instance" );
+ }
+ methodValue = instance[ options ].apply( instance, args );
+ if ( methodValue !== instance && methodValue !== undefined ) {
+ returnValue = methodValue && methodValue.jquery ?
+ returnValue.pushStack( methodValue.get() ) :
+ methodValue;
+ return false;
+ }
+ });
+ } else {
+
+ // Allow multiple hashes to be passed on init
+ if ( args.length ) {
+ options = $.widget.extend.apply( null, [ options ].concat(args) );
+ }
+
+ this.each(function() {
+ var instance = $.data( this, fullName );
+ if ( instance ) {
+ instance.option( options || {} );
+ if ( instance._init ) {
+ instance._init();
+ }
+ } else {
+ $.data( this, fullName, new object( options, this ) );
+ }
+ });
+ }
+
+ return returnValue;
+ };
+};
+
+$.Widget = function( /* options, element */ ) {};
+$.Widget._childConstructors = [];
+
+$.Widget.prototype = {
+ widgetName: "widget",
+ widgetEventPrefix: "",
+ defaultElement: "<div>",
+ options: {
+ disabled: false,
+
+ // callbacks
+ create: null
+ },
+ _createWidget: function( options, element ) {
+ element = $( element || this.defaultElement || this )[ 0 ];
+ this.element = $( element );
+ this.uuid = widget_uuid++;
+ this.eventNamespace = "." + this.widgetName + this.uuid;
+
+ this.bindings = $();
+ this.hoverable = $();
+ this.focusable = $();
+
+ if ( element !== this ) {
+ $.data( element, this.widgetFullName, this );
+ this._on( true, this.element, {
+ remove: function( event ) {
+ if ( event.target === element ) {
+ this.destroy();
+ }
+ }
+ });
+ this.document = $( element.style ?
+ // element within the document
+ element.ownerDocument :
+ // element is window or document
+ element.document || element );
+ this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
+ }
+
+ this.options = $.widget.extend( {},
+ this.options,
+ this._getCreateOptions(),
+ options );
+
+ this._create();
+ this._trigger( "create", null, this._getCreateEventData() );
+ this._init();
+ },
+ _getCreateOptions: $.noop,
+ _getCreateEventData: $.noop,
+ _create: $.noop,
+ _init: $.noop,
+
+ destroy: function() {
+ this._destroy();
+ // we can probably remove the unbind calls in 2.0
+ // all event bindings should go through this._on()
+ this.element
+ .unbind( this.eventNamespace )
+ .removeData( this.widgetFullName )
+ // support: jquery <1.6.3
+ // http://bugs.jquery.com/ticket/9413
+ .removeData( $.camelCase( this.widgetFullName ) );
+ this.widget()
+ .unbind( this.eventNamespace )
+ .removeAttr( "aria-disabled" )
+ .removeClass(
+ this.widgetFullName + "-disabled " +
+ "ui-state-disabled" );
+
+ // clean up events and states
+ this.bindings.unbind( this.eventNamespace );
+ this.hoverable.removeClass( "ui-state-hover" );
+ this.focusable.removeClass( "ui-state-focus" );
+ },
+ _destroy: $.noop,
+
+ widget: function() {
+ return this.element;
+ },
+
+ option: function( key, value ) {
+ var options = key,
+ parts,
+ curOption,
+ i;
+
+ if ( arguments.length === 0 ) {
+ // don't return a reference to the internal hash
+ return $.widget.extend( {}, this.options );
+ }
+
+ if ( typeof key === "string" ) {
+ // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
+ options = {};
+ parts = key.split( "." );
+ key = parts.shift();
+ if ( parts.length ) {
+ curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
+ for ( i = 0; i < parts.length - 1; i++ ) {
+ curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
+ curOption = curOption[ parts[ i ] ];
+ }
+ key = parts.pop();
+ if ( arguments.length === 1 ) {
+ return curOption[ key ] === undefined ? null : curOption[ key ];
+ }
+ curOption[ key ] = value;
+ } else {
+ if ( arguments.length === 1 ) {
+ return this.options[ key ] === undefined ? null : this.options[ key ];
+ }
+ options[ key ] = value;
+ }
+ }
+
+ this._setOptions( options );
+
+ return this;
+ },
+ _setOptions: function( options ) {
+ var key;
+
+ for ( key in options ) {
+ this._setOption( key, options[ key ] );
+ }
+
+ return this;
+ },
+ _setOption: function( key, value ) {
+ this.options[ key ] = value;
+
+ if ( key === "disabled" ) {
+ this.widget()
+ .toggleClass( this.widgetFullName + "-disabled", !!value );
+
+ // If the widget is becoming disabled, then nothing is interactive
+ if ( value ) {
+ this.hoverable.removeClass( "ui-state-hover" );
+ this.focusable.removeClass( "ui-state-focus" );
+ }
+ }
+
+ return this;
+ },
+
+ enable: function() {
+ return this._setOptions({ disabled: false });
+ },
+ disable: function() {
+ return this._setOptions({ disabled: true });
+ },
+
+ _on: function( suppressDisabledCheck, element, handlers ) {
+ var delegateElement,
+ instance = this;
+
+ // no suppressDisabledCheck flag, shuffle arguments
+ if ( typeof suppressDisabledCheck !== "boolean" ) {
+ handlers = element;
+ element = suppressDisabledCheck;
+ suppressDisabledCheck = false;
+ }
+
+ // no element argument, shuffle and use this.element
+ if ( !handlers ) {
+ handlers = element;
+ element = this.element;
+ delegateElement = this.widget();
+ } else {
+ element = delegateElement = $( element );
+ this.bindings = this.bindings.add( element );
+ }
+
+ $.each( handlers, function( event, handler ) {
+ function handlerProxy() {
+ // allow widgets to customize the disabled handling
+ // - disabled as an array instead of boolean
+ // - disabled class as method for disabling individual parts
+ if ( !suppressDisabledCheck &&
+ ( instance.options.disabled === true ||
+ $( this ).hasClass( "ui-state-disabled" ) ) ) {
+ return;
+ }
+ return ( typeof handler === "string" ? instance[ handler ] : handler )
+ .apply( instance, arguments );
+ }
+
+ // copy the guid so direct unbinding works
+ if ( typeof handler !== "string" ) {
+ handlerProxy.guid = handler.guid =
+ handler.guid || handlerProxy.guid || $.guid++;
+ }
+
+ var match = event.match( /^([\w:-]*)\s*(.*)$/ ),
+ eventName = match[1] + instance.eventNamespace,
+ selector = match[2];
+ if ( selector ) {
+ delegateElement.delegate( selector, eventName, handlerProxy );
+ } else {
+ element.bind( eventName, handlerProxy );
+ }
+ });
+ },
+
+ _off: function( element, eventName ) {
+ eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) +
+ this.eventNamespace;
+ element.unbind( eventName ).undelegate( eventName );
+
+ // Clear the stack to avoid memory leaks (#10056)
+ this.bindings = $( this.bindings.not( element ).get() );
+ this.focusable = $( this.focusable.not( element ).get() );
+ this.hoverable = $( this.hoverable.not( element ).get() );
+ },
+
+ _delay: function( handler, delay ) {
+ function handlerProxy() {
+ return ( typeof handler === "string" ? instance[ handler ] : handler )
+ .apply( instance, arguments );
+ }
+ var instance = this;
+ return setTimeout( handlerProxy, delay || 0 );
+ },
+
+ _hoverable: function( element ) {
+ this.hoverable = this.hoverable.add( element );
+ this._on( element, {
+ mouseenter: function( event ) {
+ $( event.currentTarget ).addClass( "ui-state-hover" );
+ },
+ mouseleave: function( event ) {
+ $( event.currentTarget ).removeClass( "ui-state-hover" );
+ }
+ });
+ },
+
+ _focusable: function( element ) {
+ this.focusable = this.focusable.add( element );
+ this._on( element, {
+ focusin: function( event ) {
+ $( event.currentTarget ).addClass( "ui-state-focus" );
+ },
+ focusout: function( event ) {
+ $( event.currentTarget ).removeClass( "ui-state-focus" );
+ }
+ });
+ },
+
+ _trigger: function( type, event, data ) {
+ var prop, orig,
+ callback = this.options[ type ];
+
+ data = data || {};
+ event = $.Event( event );
+ event.type = ( type === this.widgetEventPrefix ?
+ type :
+ this.widgetEventPrefix + type ).toLowerCase();
+ // the original event may come from any element
+ // so we need to reset the target on the new event
+ event.target = this.element[ 0 ];
+
+ // copy original event properties over to the new event
+ orig = event.originalEvent;
+ if ( orig ) {
+ for ( prop in orig ) {
+ if ( !( prop in event ) ) {
+ event[ prop ] = orig[ prop ];
+ }
+ }
+ }
+
+ this.element.trigger( event, data );
+ return !( $.isFunction( callback ) &&
+ callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
+ event.isDefaultPrevented() );
+ }
+};
+
+$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
+ $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
+ if ( typeof options === "string" ) {
+ options = { effect: options };
+ }
+ var hasOptions,
+ effectName = !options ?
+ method :
+ options === true || typeof options === "number" ?
+ defaultEffect :
+ options.effect || defaultEffect;
+ options = options || {};
+ if ( typeof options === "number" ) {
+ options = { duration: options };
+ }
+ hasOptions = !$.isEmptyObject( options );
+ options.complete = callback;
+ if ( options.delay ) {
+ element.delay( options.delay );
+ }
+ if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
+ element[ method ]( options );
+ } else if ( effectName !== method && element[ effectName ] ) {
+ element[ effectName ]( options.duration, options.easing, callback );
+ } else {
+ element.queue(function( next ) {
+ $( this )[ method ]();
+ if ( callback ) {
+ callback.call( element[ 0 ] );
+ }
+ next();
+ });
+ }
+ };
+});
+
+var widget = $.widget;
+
+
+
+}));
diff --git a/common/src/main/webapp/thirdparty/jquery-cokie/jquery.cokie.min.js b/common/src/main/webapp/thirdparty/jquery-cokie/jquery.cokie.min.js
new file mode 100644
index 0000000..0f1b501
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-cokie/jquery.cokie.min.js
@@ -0,0 +1,9 @@
+/*!
+ * jQuery Cookie Plugin v1.3.1
+ * https://github.com/carhartl/jquery-cookie
+ * Plugin file name changed to jquery.cokie.min to prevent blocking by ModSecurity module
+ *
+ * Copyright 2013 Klaus Hartl
+ * Released under the MIT license
+ */
+(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a(jQuery)}}(function(e){var a=/\+/g;function d(g){return g}function b(g){return decodeURIComponent(g.replace(a," "))}function f(g){if(g.indexOf('"')===0){g=g.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")}try{return c.json?JSON.parse(g):g}catch(h){}}var c=e.cookie=function(p,o,u){if(o!==undefined){u=e.extend({},c.defaults,u);if(typeof u.expires==="number"){var q=u.expires,s=u.expires=new Date();s.setDate(s.getDate()+q)}o=c.json?JSON.stringify(o):String(o);return(document.cookie=[c.raw?p:encodeURIComponent(p),"=",c.raw?o:encodeURIComponent(o),u.expires?"; expires="+u.expires.toUTCString():"",u.path?"; path="+u.path:"",u.domain?"; domain="+u.domain:"",u.secure?"; secure":""].join(""))}var g=c.raw?d:b;var r=document.cookie.split("; ");var v=p?undefined:{};for(var n=0,k=r.length;n<k;n++){var m=r[n].split("=");var h=g(m.shift());var j=g(m.join("="));if(p&&p===h){v=f(j);break}if(!p){v[h]=f(j)}}return v};c.defaults={};e.removeCookie=function(h,g){if(e.cookie(h)!==undefined){e.cookie(h,"",e.extend({},g,{expires:-1}));return true}return false}})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/README.md b/common/src/main/webapp/thirdparty/jquery-validation/README.md
new file mode 100644
index 0000000..4e71318
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/README.md
@@ -0,0 +1,72 @@
+[jQuery Validation Plugin](http://jqueryvalidation.org/) - Form validation made easy
+================================
+
+[![Build Status](https://secure.travis-ci.org/jzaefferer/jquery-validation.png)](http://travis-ci.org/jzaefferer/jquery-validation)
+[![devDependency Status](https://david-dm.org/jzaefferer/jquery-validation/dev-status.png?theme=shields.io)](https://david-dm.org/jzaefferer/jquery-validation#info=devDependencies)
+
+The jQuery Validation Plugin provides drop-in validation for your existing forms, while making all kinds of customizations to fit your application really easy.
+
+## [Help the project](http://pledgie.com/campaigns/18159)
+
+[![Help the project](http://www.pledgie.com/campaigns/18159.png?skin_name=chrome)](http://pledgie.com/campaigns/18159)
+
+This project is looking for help! [You can donate to the ongoing pledgie campaign](http://pledgie.com/campaigns/18159)
+and help spread the word. If you've used the plugin, or plan to use, consider a donation - any amount will help.
+
+You can find the plan for how to spend the money on the [pledgie page](http://pledgie.com/campaigns/18159).
+
+## Getting Started
+
+### Downloading the prebuilt files
+
+Prebuilt files can be downloaded from http://jqueryvalidation.org/
+
+### Downloading the latest changes
+
+The unreleased development files can be obtained by:
+
+ 1. [Downloading](https://github.com/jzaefferer/jquery-validation/archive/master.zip) or Forking this repository
+ 2. [Setup the build](CONTRIBUTING.md#build-setup)
+ 3. Run `grunt` to create the built files in the "dist" directory
+
+### Including it on your page
+
+Include jQuery and the plugin on a page. Then select a form to validate and call the `validate` method.
+
+```html
+<form>
+ <input required>
+</form>
+<script src="jquery.js"></script>
+<script src="jquery.validate.js"></script>
+<script>
+$("form").validate();
+</script>
+```
+
+Alternatively include jQuery and the plugin via requirejs in your module.
+
+```js
+define(["jquery", "jquery.validate"], function( $ ) {
+ $("form").validate();
+});
+```
+
+For more information on how to setup a rules and customizations, [check the documentation](http://jqueryvalidation.org/documentation/).
+
+## Reporting an Issue
+
+**IMPORTANT NOTE ABOUT EMAIL VALIDATION**. As of version 1.12.0 this plugin is using the same regular expression that the [HTML5 specification suggests for browsers to use](http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#e-mail-state-%28type=email%29). We will follow their lead and use the same check. If you think the specification is wrong, please report the issue to them.
+
+1. Make sure the problem you're addressing is reproducible.
+2. Use http://jsbin.com or http://jsfiddle.net to provide a test page.
+3. Indicate what browsers the issue can be reproduced in. **Note: IE Compatibilty modes issues will not be addressed.**
+4. What version of the plug-in is the issue reproducible in. Is it reproducible after updating to the latest version.
+
+## Contributing
+
+See the [Contributing Guide](CONTRIBUTING.md)
+
+## License
+Copyright (c) 2013 Jörn Zaefferer
+Licensed under the MIT license.
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/dist/additional-methods.js b/common/src/main/webapp/thirdparty/jquery-validation/dist/additional-methods.js
new file mode 100644
index 0000000..b0534b5
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/dist/additional-methods.js
@@ -0,0 +1,617 @@
+/*!
+ * jQuery Validation Plugin 1.11.1
+ *
+ * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
+ * http://docs.jquery.com/Plugins/Validation
+ *
+ * Copyright 2013 Jörn Zaefferer
+ * Released under the MIT license:
+ * http://www.opensource.org/licenses/mit-license.php
+ */
+
+(function() {
+
+ function stripHtml(value) {
+ // remove html tags and space chars
+ return value.replace(/<.[^<>]*?>/g, ' ').replace(/&nbsp;|&#160;/gi, ' ')
+ // remove punctuation
+ .replace(/[.(),;:!?%#$'"_+=\/\-]*/g,'');
+ }
+ jQuery.validator.addMethod("maxWords", function(value, element, params) {
+ return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length <= params;
+ }, jQuery.validator.format("Please enter {0} words or less."));
+
+ jQuery.validator.addMethod("minWords", function(value, element, params) {
+ return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
+ }, jQuery.validator.format("Please enter at least {0} words."));
+
+ jQuery.validator.addMethod("rangeWords", function(value, element, params) {
+ var valueStripped = stripHtml(value);
+ var regex = /\b\w+\b/g;
+ return this.optional(element) || valueStripped.match(regex).length >= params[0] && valueStripped.match(regex).length <= params[1];
+ }, jQuery.validator.format("Please enter between {0} and {1} words."));
+
+}());
+
+jQuery.validator.addMethod("letterswithbasicpunc", function(value, element) {
+ return this.optional(element) || /^[a-z\-.,()'"\s]+$/i.test(value);
+}, "Letters or punctuation only please");
+
+jQuery.validator.addMethod("alphanumeric", function(value, element) {
+ return this.optional(element) || /^\w+$/i.test(value);
+}, "Letters, numbers, and underscores only please");
+
+jQuery.validator.addMethod("lettersonly", function(value, element) {
+ return this.optional(element) || /^[a-z]+$/i.test(value);
+}, "Letters only please");
+
+jQuery.validator.addMethod("nowhitespace", function(value, element) {
+ return this.optional(element) || /^\S+$/i.test(value);
+}, "No white space please");
+
+jQuery.validator.addMethod("ziprange", function(value, element) {
+ return this.optional(element) || /^90[2-5]\d\{2\}-\d{4}$/.test(value);
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx");
+
+jQuery.validator.addMethod("zipcodeUS", function(value, element) {
+ return this.optional(element) || /\d{5}-\d{4}$|^\d{5}$/.test(value);
+}, "The specified US ZIP Code is invalid");
+
+jQuery.validator.addMethod("integer", function(value, element) {
+ return this.optional(element) || /^-?\d+$/.test(value);
+}, "A positive or negative non-decimal number please");
+
+/**
+ * Return true, if the value is a valid vehicle identification number (VIN).
+ *
+ * Works with all kind of text inputs.
+ *
+ * @example <input type="text" size="20" name="VehicleID" class="{required:true,vinUS:true}" />
+ * @desc Declares a required input element whose value must be a valid vehicle identification number.
+ *
+ * @name jQuery.validator.methods.vinUS
+ * @type Boolean
+ * @cat Plugins/Validate/Methods
+ */
+jQuery.validator.addMethod("vinUS", function(v) {
+ if (v.length !== 17) {
+ return false;
+ }
+ var i, n, d, f, cd, cdv;
+ var LL = ["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"];
+ var VL = [1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9];
+ var FL = [8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2];
+ var rs = 0;
+ for(i = 0; i < 17; i++){
+ f = FL[i];
+ d = v.slice(i,i+1);
+ if (i === 8) {
+ cdv = d;
+ }
+ if (!isNaN(d)) {
+ d *= f;
+ } else {
+ for (n = 0; n < LL.length; n++) {
+ if (d.toUpperCase() === LL[n]) {
+ d = VL[n];
+ d *= f;
+ if (isNaN(cdv) && n === 8) {
+ cdv = LL[n];
+ }
+ break;
+ }
+ }
+ }
+ rs += d;
+ }
+ cd = rs % 11;
+ if (cd === 10) {
+ cd = "X";
+ }
+ if (cd === cdv) {
+ return true;
+ }
+ return false;
+}, "The specified vehicle identification number (VIN) is invalid.");
+
+/**
+ * Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
+ *
+ * @example jQuery.validator.methods.date("01/01/1900")
+ * @result true
+ *
+ * @example jQuery.validator.methods.date("01/13/1990")
+ * @result false
+ *
+ * @example jQuery.validator.methods.date("01.01.1900")
+ * @result false
+ *
+ * @example <input name="pippo" class="{dateITA:true}" />
+ * @desc Declares an optional input element whose value must be a valid date.
+ *
+ * @name jQuery.validator.methods.dateITA
+ * @type Boolean
+ * @cat Plugins/Validate/Methods
+ */
+jQuery.validator.addMethod("dateITA", function(value, element) {
+ var check = false;
+ var re = /^\d{1,2}\/\d{1,2}\/\d{4}$/;
+ if( re.test(value)) {
+ var adata = value.split('/');
+ var gg = parseInt(adata[0],10);
+ var mm = parseInt(adata[1],10);
+ var aaaa = parseInt(adata[2],10);
+ var xdata = new Date(aaaa,mm-1,gg);
+ if ( ( xdata.getFullYear() === aaaa ) && ( xdata.getMonth() === mm - 1 ) && ( xdata.getDate() === gg ) ){
+ check = true;
+ } else {
+ check = false;
+ }
+ } else {
+ check = false;
+ }
+ return this.optional(element) || check;
+}, "Please enter a correct date");
+
+/**
+ * IBAN is the international bank account number.
+ * It has a country - specific format, that is checked here too
+ */
+jQuery.validator.addMethod("iban", function(value, element) {
+ // some quick simple tests to prevent needless work
+ if (this.optional(element)) {
+ return true;
+ }
+ if (!(/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(value))) {
+ return false;
+ }
+
+ // check the country code and find the country specific format
+ var iban = value.replace(/ /g,'').toUpperCase(); // remove spaces and to upper case
+ var countrycode = iban.substring(0,2);
+ var bbancountrypatterns = {
+ 'AL': "\\d{8}[\\dA-Z]{16}",
+ 'AD': "\\d{8}[\\dA-Z]{12}",
+ 'AT': "\\d{16}",
+ 'AZ': "[\\dA-Z]{4}\\d{20}",
+ 'BE': "\\d{12}",
+ 'BH': "[A-Z]{4}[\\dA-Z]{14}",
+ 'BA': "\\d{16}",
+ 'BR': "\\d{23}[A-Z][\\dA-Z]",
+ 'BG': "[A-Z]{4}\\d{6}[\\dA-Z]{8}",
+ 'CR': "\\d{17}",
+ 'HR': "\\d{17}",
+ 'CY': "\\d{8}[\\dA-Z]{16}",
+ 'CZ': "\\d{20}",
+ 'DK': "\\d{14}",
+ 'DO': "[A-Z]{4}\\d{20}",
+ 'EE': "\\d{16}",
+ 'FO': "\\d{14}",
+ 'FI': "\\d{14}",
+ 'FR': "\\d{10}[\\dA-Z]{11}\\d{2}",
+ 'GE': "[\\dA-Z]{2}\\d{16}",
+ 'DE': "\\d{18}",
+ 'GI': "[A-Z]{4}[\\dA-Z]{15}",
+ 'GR': "\\d{7}[\\dA-Z]{16}",
+ 'GL': "\\d{14}",
+ 'GT': "[\\dA-Z]{4}[\\dA-Z]{20}",
+ 'HU': "\\d{24}",
+ 'IS': "\\d{22}",
+ 'IE': "[\\dA-Z]{4}\\d{14}",
+ 'IL': "\\d{19}",
+ 'IT': "[A-Z]\\d{10}[\\dA-Z]{12}",
+ 'KZ': "\\d{3}[\\dA-Z]{13}",
+ 'KW': "[A-Z]{4}[\\dA-Z]{22}",
+ 'LV': "[A-Z]{4}[\\dA-Z]{13}",
+ 'LB': "\\d{4}[\\dA-Z]{20}",
+ 'LI': "\\d{5}[\\dA-Z]{12}",
+ 'LT': "\\d{16}",
+ 'LU': "\\d{3}[\\dA-Z]{13}",
+ 'MK': "\\d{3}[\\dA-Z]{10}\\d{2}",
+ 'MT': "[A-Z]{4}\\d{5}[\\dA-Z]{18}",
+ 'MR': "\\d{23}",
+ 'MU': "[A-Z]{4}\\d{19}[A-Z]{3}",
+ 'MC': "\\d{10}[\\dA-Z]{11}\\d{2}",
+ 'MD': "[\\dA-Z]{2}\\d{18}",
+ 'ME': "\\d{18}",
+ 'NL': "[A-Z]{4}\\d{10}",
+ 'NO': "\\d{11}",
+ 'PK': "[\\dA-Z]{4}\\d{16}",
+ 'PS': "[\\dA-Z]{4}\\d{21}",
+ 'PL': "\\d{24}",
+ 'PT': "\\d{21}",
+ 'RO': "[A-Z]{4}[\\dA-Z]{16}",
+ 'SM': "[A-Z]\\d{10}[\\dA-Z]{12}",
+ 'SA': "\\d{2}[\\dA-Z]{18}",
+ 'RS': "\\d{18}",
+ 'SK': "\\d{20}",
+ 'SI': "\\d{15}",
+ 'ES': "\\d{20}",
+ 'SE': "\\d{20}",
+ 'CH': "\\d{5}[\\dA-Z]{12}",
+ 'TN': "\\d{20}",
+ 'TR': "\\d{5}[\\dA-Z]{17}",
+ 'AE': "\\d{3}\\d{16}",
+ 'GB': "[A-Z]{4}\\d{14}",
+ 'VG': "[\\dA-Z]{4}\\d{16}"
+ };
+ var bbanpattern = bbancountrypatterns[countrycode];
+ // As new countries will start using IBAN in the
+ // future, we only check if the countrycode is known.
+ // This prevents false negatives, while almost all
+ // false positives introduced by this, will be caught
+ // by the checksum validation below anyway.
+ // Strict checking should return FALSE for unknown
+ // countries.
+ if (typeof bbanpattern !== 'undefined') {
+ var ibanregexp = new RegExp("^[A-Z]{2}\\d{2}" + bbanpattern + "$", "");
+ if (!(ibanregexp.test(iban))) {
+ return false; // invalid country specific format
+ }
+ }
+
+ // now check the checksum, first convert to digits
+ var ibancheck = iban.substring(4,iban.length) + iban.substring(0,4);
+ var ibancheckdigits = "";
+ var leadingZeroes = true;
+ var charAt;
+ for (var i =0; i<ibancheck.length; i++) {
+ charAt = ibancheck.charAt(i);
+ if (charAt !== "0") {
+ leadingZeroes = false;
+ }
+ if (!leadingZeroes) {
+ ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);
+ }
+ }
+
+ // calculate the result of: ibancheckdigits % 97
+ var cRest = '';
+ var cOperator = '';
+ for (var p=0; p<ibancheckdigits.length; p++) {
+ var cChar = ibancheckdigits.charAt(p);
+ cOperator = '' + cRest + '' + cChar;
+ cRest = cOperator % 97;
+ }
+ return cRest === 1;
+}, "Please specify a valid IBAN");
+
+jQuery.validator.addMethod("dateNL", function(value, element) {
+ return this.optional(element) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(value);
+}, "Please enter a correct date");
+
+/**
+ * Dutch phone numbers have 10 digits (or 11 and start with +31).
+ */
+jQuery.validator.addMethod("phoneNL", function(value, element) {
+ return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
+}, "Please specify a valid phone number.");
+
+jQuery.validator.addMethod("mobileNL", function(value, element) {
+ return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
+}, "Please specify a valid mobile number");
+
+jQuery.validator.addMethod("postalcodeNL", function(value, element) {
+ return this.optional(element) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(value);
+}, "Please specify a valid postal code");
+
+/*
+ * Dutch bank account numbers (not 'giro' numbers) have 9 digits
+ * and pass the '11 check'.
+ * We accept the notation with spaces, as that is common.
+ * acceptable: 123456789 or 12 34 56 789
+ */
+jQuery.validator.addMethod("bankaccountNL", function(value, element) {
+ if (this.optional(element)) {
+ return true;
+ }
+ if (!(/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(value))) {
+ return false;
+ }
+ // now '11 check'
+ var account = value.replace(/ /g,''); // remove spaces
+ var sum = 0;
+ var len = account.length;
+ for (var pos=0; pos<len; pos++) {
+ var factor = len - pos;
+ var digit = account.substring(pos, pos+1);
+ sum = sum + factor * digit;
+ }
+ return sum % 11 === 0;
+}, "Please specify a valid bank account number");
+
+/**
+ * Dutch giro account numbers (not bank numbers) have max 7 digits
+ */
+jQuery.validator.addMethod("giroaccountNL", function(value, element) {
+ return this.optional(element) || /^[0-9]{1,7}$/.test(value);
+}, "Please specify a valid giro account number");
+
+jQuery.validator.addMethod("bankorgiroaccountNL", function(value, element) {
+ return this.optional(element) ||
+ ($.validator.methods["bankaccountNL"].call(this, value, element)) ||
+ ($.validator.methods["giroaccountNL"].call(this, value, element));
+}, "Please specify a valid bank or giro account number");
+
+
+jQuery.validator.addMethod("time", function(value, element) {
+ return this.optional(element) || /^([01]\d|2[0-3])(:[0-5]\d){1,2}$/.test(value);
+}, "Please enter a valid time, between 00:00 and 23:59");
+jQuery.validator.addMethod("time12h", function(value, element) {
+ return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(value);
+}, "Please enter a valid time in 12-hour am/pm format");
+
+/**
+ * matches US phone number format
+ *
+ * where the area code may not start with 1 and the prefix may not start with 1
+ * allows '-' or ' ' as a separator and allows parens around area code
+ * some people may want to put a '1' in front of their number
+ *
+ * 1(212)-999-2345 or
+ * 212 999 2344 or
+ * 212-999-0983
+ *
+ * but not
+ * 111-123-5434
+ * and not
+ * 212 123 4567
+ */
+jQuery.validator.addMethod("phoneUS", function(phone_number, element) {
+ phone_number = phone_number.replace(/\s+/g, "");
+ return this.optional(element) || phone_number.length > 9 &&
+ phone_number.match(/^(\+?1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
+}, "Please specify a valid phone number");
+
+jQuery.validator.addMethod('phoneUK', function(phone_number, element) {
+ phone_number = phone_number.replace(/\(|\)|\s+|-/g,'');
+ return this.optional(element) || phone_number.length > 9 &&
+ phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/);
+}, 'Please specify a valid phone number');
+
+jQuery.validator.addMethod('mobileUK', function(phone_number, element) {
+ phone_number = phone_number.replace(/\(|\)|\s+|-/g,'');
+ return this.optional(element) || phone_number.length > 9 &&
+ phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[45789]\d{2}|624)\s?\d{3}\s?\d{3})$/);
+}, 'Please specify a valid mobile number');
+
+//Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
+jQuery.validator.addMethod('phonesUK', function(phone_number, element) {
+ phone_number = phone_number.replace(/\(|\)|\s+|-/g,'');
+ return this.optional(element) || phone_number.length > 9 &&
+ phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[45789]\d{8}|624\d{6})))$/);
+}, 'Please specify a valid uk phone number');
+// On the above three UK functions, do the following server side processing:
+// Compare original input with this RegEx pattern:
+// ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
+// Extract $1 and set $prefix to '+44<space>' if $1 is '44', otherwise set $prefix to '0'
+// Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
+// A number of very detailed GB telephone number RegEx patterns can also be found at:
+// http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
+
+// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
+jQuery.validator.addMethod('postcodeUK', function(value, element) {
+ return this.optional(element) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(value);
+}, 'Please specify a valid UK postcode');
+
+// TODO check if value starts with <, otherwise don't try stripping anything
+jQuery.validator.addMethod("strippedminlength", function(value, element, param) {
+ return jQuery(value).text().length >= param;
+}, jQuery.validator.format("Please enter at least {0} characters"));
+
+// same as email, but TLD is optional
+jQuery.validator.addMethod("email2", function(value, element, param) {
+ return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);
+}, jQuery.validator.messages.email);
+
+// same as url, but TLD is optional
+jQuery.validator.addMethod("url2", function(value, element, param) {
+ return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
+}, jQuery.validator.messages.url);
+
+// NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
+// Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+// Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
+jQuery.validator.addMethod("creditcardtypes", function(value, element, param) {
+ if (/[^0-9\-]+/.test(value)) {
+ return false;
+ }
+
+ value = value.replace(/\D/g, "");
+
+ var validTypes = 0x0000;
+
+ if (param.mastercard) {
+ validTypes |= 0x0001;
+ }
+ if (param.visa) {
+ validTypes |= 0x0002;
+ }
+ if (param.amex) {
+ validTypes |= 0x0004;
+ }
+ if (param.dinersclub) {
+ validTypes |= 0x0008;
+ }
+ if (param.enroute) {
+ validTypes |= 0x0010;
+ }
+ if (param.discover) {
+ validTypes |= 0x0020;
+ }
+ if (param.jcb) {
+ validTypes |= 0x0040;
+ }
+ if (param.unknown) {
+ validTypes |= 0x0080;
+ }
+ if (param.all) {
+ validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
+ }
+ if (validTypes & 0x0001 && /^(5[12345])/.test(value)) { //mastercard
+ return value.length === 16;
+ }
+ if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
+ return value.length === 16;
+ }
+ if (validTypes & 0x0004 && /^(3[47])/.test(value)) { //amex
+ return value.length === 15;
+ }
+ if (validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test(value)) { //dinersclub
+ return value.length === 14;
+ }
+ if (validTypes & 0x0010 && /^(2(014|149))/.test(value)) { //enroute
+ return value.length === 15;
+ }
+ if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
+ return value.length === 16;
+ }
+ if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb
+ return value.length === 16;
+ }
+ if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb
+ return value.length === 15;
+ }
+ if (validTypes & 0x0080) { //unknown
+ return true;
+ }
+ return false;
+}, "Please enter a valid credit card number.");
+
+jQuery.validator.addMethod("ipv4", function(value, element, param) {
+ return this.optional(element) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(value);
+}, "Please enter a valid IP v4 address.");
+
+jQuery.validator.addMethod("ipv6", function(value, element, param) {
+ return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
+}, "Please enter a valid IP v6 address.");
+
+/**
+* Return true if the field value matches the given format RegExp
+*
+* @example jQuery.validator.methods.pattern("AR1004",element,/^AR\d{4}$/)
+* @result true
+*
+* @example jQuery.validator.methods.pattern("BR1004",element,/^AR\d{4}$/)
+* @result false
+*
+* @name jQuery.validator.methods.pattern
+* @type Boolean
+* @cat Plugins/Validate/Methods
+*/
+jQuery.validator.addMethod("pattern", function(value, element, param) {
+ if (this.optional(element)) {
+ return true;
+ }
+ if (typeof param === 'string') {
+ param = new RegExp('^(?:' + param + ')$');
+ }
+ return param.test(value);
+}, "Invalid format.");
+
+
+/*
+ * Lets you say "at least X inputs that match selector Y must be filled."
+ *
+ * The end result is that neither of these inputs:
+ *
+ * <input class="productinfo" name="partnumber">
+ * <input class="productinfo" name="description">
+ *
+ * ...will validate unless at least one of them is filled.
+ *
+ * partnumber: {require_from_group: [1,".productinfo"]},
+ * description: {require_from_group: [1,".productinfo"]}
+ *
+ */
+jQuery.validator.addMethod("require_from_group", function(value, element, options) {
+ var validator = this;
+ var selector = options[1];
+ var validOrNot = $(selector, element.form).filter(function() {
+ return validator.elementValue(this);
+ }).length >= options[0];
+
+ if(!$(element).data('being_validated')) {
+ var fields = $(selector, element.form);
+ fields.data('being_validated', true);
+ fields.valid();
+ fields.data('being_validated', false);
+ }
+ return validOrNot;
+}, jQuery.format("Please fill at least {0} of these fields."));
+
+/*
+ * Lets you say "either at least X inputs that match selector Y must be filled,
+ * OR they must all be skipped (left blank)."
+ *
+ * The end result, is that none of these inputs:
+ *
+ * <input class="productinfo" name="partnumber">
+ * <input class="productinfo" name="description">
+ * <input class="productinfo" name="color">
+ *
+ * ...will validate unless either at least two of them are filled,
+ * OR none of them are.
+ *
+ * partnumber: {skip_or_fill_minimum: [2,".productinfo"]},
+ * description: {skip_or_fill_minimum: [2,".productinfo"]},
+ * color: {skip_or_fill_minimum: [2,".productinfo"]}
+ *
+ */
+jQuery.validator.addMethod("skip_or_fill_minimum", function(value, element, options) {
+ var validator = this,
+ numberRequired = options[0],
+ selector = options[1];
+ var numberFilled = $(selector, element.form).filter(function() {
+ return validator.elementValue(this);
+ }).length;
+ var valid = numberFilled >= numberRequired || numberFilled === 0;
+
+ if(!$(element).data('being_validated')) {
+ var fields = $(selector, element.form);
+ fields.data('being_validated', true);
+ fields.valid();
+ fields.data('being_validated', false);
+ }
+ return valid;
+}, jQuery.format("Please either skip these fields or fill at least {0} of them."));
+
+// Accept a value from a file input based on a required mimetype
+jQuery.validator.addMethod("accept", function(value, element, param) {
+ // Split mime on commas in case we have multiple types we can accept
+ var typeParam = typeof param === "string" ? param.replace(/\s/g, '').replace(/,/g, '|') : "image/*",
+ optionalValue = this.optional(element),
+ i, file;
+
+ // Element is optional
+ if (optionalValue) {
+ return optionalValue;
+ }
+
+ if ($(element).attr("type") === "file") {
+ // If we are using a wildcard, make it regex friendly
+ typeParam = typeParam.replace(/\*/g, ".*");
+
+ // Check if the element has a FileList before checking each file
+ if (element.files && element.files.length) {
+ for (i = 0; i < element.files.length; i++) {
+ file = element.files[i];
+
+ // Grab the mimetype from the loaded file, verify it matches
+ if (!file.type.match(new RegExp( ".?(" + typeParam + ")$", "i"))) {
+ return false;
+ }
+ }
+ }
+ }
+
+ // Either return true because we've validated each file, or because the
+ // browser does not support element.files and the FileList feature
+ return true;
+}, jQuery.format("Please enter a value with a valid mimetype."));
+
+// Older "accept" file extension method. Old docs: http://docs.jquery.com/Plugins/Validation/Methods/accept
+jQuery.validator.addMethod("extension", function(value, element, param) {
+ param = typeof param === "string" ? param.replace(/,/g, '|') : "png|jpe?g|gif";
+ return this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i"));
+}, jQuery.format("Please enter a value with a valid extension."));
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/dist/additional-methods.min.js b/common/src/main/webapp/thirdparty/jquery-validation/dist/additional-methods.min.js
new file mode 100644
index 0000000..94e500b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/dist/additional-methods.min.js
@@ -0,0 +1,11 @@
+/*!
+ * jQuery Validation Plugin 1.11.1
+ *
+ * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
+ * http://docs.jquery.com/Plugins/Validation
+ *
+ * Copyright 2013 Jörn Zaefferer
+ * Released under the MIT license:
+ * http://www.opensource.org/licenses/mit-license.php
+ */
+(function(){function a(b){return b.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'"_+=\/\-]*/g,"")}jQuery.validator.addMethod("maxWords",function(c,b,d){return this.optional(b)||a(c).match(/\b\w+\b/g).length<=d},jQuery.validator.format("Please enter {0} words or less."));jQuery.validator.addMethod("minWords",function(c,b,d){return this.optional(b)||a(c).match(/\b\w+\b/g).length>=d},jQuery.validator.format("Please enter at least {0} words."));jQuery.validator.addMethod("rangeWords",function(e,b,f){var d=a(e);var c=/\b\w+\b/g;return this.optional(b)||d.match(c).length>=f[0]&&d.match(c).length<=f[1]},jQuery.validator.format("Please enter between {0} and {1} words."))}());jQuery.validator.addMethod("letterswithbasicpunc",function(b,a){return this.optional(a)||/^[a-z\-.,()'"\s]+$/i.test(b)},"Letters or punctuation only please");jQuery.validator.addMethod("alphanumeric",function(b,a){return this.optional(a)||/^\w+$/i.test(b)},"Letters, numbers, and underscores only please");jQuery.validator.addMethod("lettersonly",function(b,a){return this.optional(a)||/^[a-z]+$/i.test(b)},"Letters only please");jQuery.validator.addMethod("nowhitespace",function(b,a){return this.optional(a)||/^\S+$/i.test(b)},"No white space please");jQuery.validator.addMethod("ziprange",function(b,a){return this.optional(a)||/^90[2-5]\d\{2\}-\d{4}$/.test(b)},"Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx");jQuery.validator.addMethod("zipcodeUS",function(b,a){return this.optional(a)||/\d{5}-\d{4}$|^\d{5}$/.test(b)},"The specified US ZIP Code is invalid");jQuery.validator.addMethod("integer",function(b,a){return this.optional(a)||/^-?\d+$/.test(b)},"A positive or negative non-decimal number please");jQuery.validator.addMethod("vinUS",function(o){if(o.length!==17){return false}var h,a,l,j,b,k;var c=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"];var m=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9];var g=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2];var e=0;for(h=0;h<17;h++){j=g[h];l=o.slice(h,h+1);if(h===8){k=l}if(!isNaN(l)){l*=j}else{for(a=0;a<c.length;a++){if(l.toUpperCase()===c[a]){l=m[a];l*=j;if(isNaN(k)&&a===8){k=c[a]}break}}}e+=l}b=e%11;if(b===10){b="X"}if(b===k){return true}return false},"The specified vehicle identification number (VIN) is invalid.");jQuery.validator.addMethod("dateITA",function(e,c){var a=false;var g=/^\d{1,2}\/\d{1,2}\/\d{4}$/;if(g.test(e)){var i=e.split("/");var d=parseInt(i[0],10);var b=parseInt(i[1],10);var f=parseInt(i[2],10);var h=new Date(f,b-1,d);if((h.getFullYear()===f)&&(h.getMonth()===b-1)&&(h.getDate()===d)){a=true}else{a=false}}else{a=false}return this.optional(c)||a},"Please enter a correct date");jQuery.validator.addMethod("iban",function(q,j){if(this.optional(j)){return true}if(!(/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(q))){return false}var g=q.replace(/ /g,"").toUpperCase();var c=g.substring(0,2);var a={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-Z]{16}",CZ:"\\d{20}",DK:"\\d{14}",DO:"[A-Z]{4}\\d{20}",EE:"\\d{16}",FO:"\\d{14}",FI:"\\d{14}",FR:"\\d{10}[\\dA-Z]{11}\\d{2}",GE:"[\\dA-Z]{2}\\d{16}",DE:"\\d{18}",GI:"[A-Z]{4}[\\dA-Z]{15}",GR:"\\d{7}[\\dA-Z]{16}",GL:"\\d{14}",GT:"[\\dA-Z]{4}[\\dA-Z]{20}",HU:"\\d{24}",IS:"\\d{22}",IE:"[\\dA-Z]{4}\\d{14}",IL:"\\d{19}",IT:"[A-Z]\\d{10}[\\dA-Z]{12}",KZ:"\\d{3}[\\dA-Z]{13}",KW:"[A-Z]{4}[\\dA-Z]{22}",LV:"[A-Z]{4}[\\dA-Z]{13}",LB:"\\d{4}[\\dA-Z]{20}",LI:"\\d{5}[\\dA-Z]{12}",LT:"\\d{16}",LU:"\\d{3}[\\dA-Z]{13}",MK:"\\d{3}[\\dA-Z]{10}\\d{2}",MT:"[A-Z]{4}\\d{5}[\\dA-Z]{18}",MR:"\\d{23}",MU:"[A-Z]{4}\\d{19}[A-Z]{3}",MC:"\\d{10}[\\dA-Z]{11}\\d{2}",MD:"[\\dA-Z]{2}\\d{18}",ME:"\\d{18}",NL:"[A-Z]{4}\\d{10}",NO:"\\d{11}",PK:"[\\dA-Z]{4}\\d{16}",PS:"[\\dA-Z]{4}\\d{21}",PL:"\\d{24}",PT:"\\d{21}",RO:"[A-Z]{4}[\\dA-Z]{16}",SM:"[A-Z]\\d{10}[\\dA-Z]{12}",SA:"\\d{2}[\\dA-Z]{18}",RS:"\\d{18}",SK:"\\d{20}",SI:"\\d{15}",ES:"\\d{20}",SE:"\\d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"};var m=a[c];if(typeof m!=="undefined"){var k=new RegExp("^[A-Z]{2}\\d{2}"+m+"$","");if(!(k.test(g))){return false}}var e=g.substring(4,g.length)+g.substring(0,4);var f="";var l=true;var d;for(var h=0;h<e.length;h++){d=e.charAt(h);if(d!=="0"){l=false}if(!l){f+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(d)}}var r="";var o="";for(var b=0;b<f.length;b++){var n=f.charAt(b);o=""+r+""+n;r=o%97}return r===1},"Please specify a valid IBAN");jQuery.validator.addMethod("dateNL",function(b,a){return this.optional(a)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(b)},"Please enter a correct date");jQuery.validator.addMethod("phoneNL",function(b,a){return this.optional(a)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(b)},"Please specify a valid phone number.");jQuery.validator.addMethod("mobileNL",function(b,a){return this.optional(a)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(b)},"Please specify a valid mobile number");jQuery.validator.addMethod("postalcodeNL",function(b,a){return this.optional(a)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(b)},"Please specify a valid postal code");jQuery.validator.addMethod("bankaccountNL",function(f,c){if(this.optional(c)){return true}if(!(/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(f))){return false}var e=f.replace(/ /g,"");var d=0;var a=e.length;for(var h=0;h<a;h++){var b=a-h;var g=e.substring(h,h+1);d=d+b*g}return d%11===0},"Please specify a valid bank account number");jQuery.validator.addMethod("giroaccountNL",function(b,a){return this.optional(a)||/^[0-9]{1,7}$/.test(b)},"Please specify a valid giro account number");jQuery.validator.addMethod("bankorgiroaccountNL",function(b,a){return this.optional(a)||($.validator.methods.bankaccountNL.call(this,b,a))||($.validator.methods.giroaccountNL.call(this,b,a))},"Please specify a valid bank or giro account number");jQuery.validator.addMethod("time",function(b,a){return this.optional(a)||/^([01]\d|2[0-3])(:[0-5]\d){1,2}$/.test(b)},"Please enter a valid time, between 00:00 and 23:59");jQuery.validator.addMethod("time12h",function(b,a){return this.optional(a)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(b)},"Please enter a valid time in 12-hour am/pm format");jQuery.validator.addMethod("phoneUS",function(a,b){a=a.replace(/\s+/g,"");return this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number");jQuery.validator.addMethod("phoneUK",function(a,b){a=a.replace(/\(|\)|\s+|-/g,"");return this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number");jQuery.validator.addMethod("mobileUK",function(a,b){a=a.replace(/\(|\)|\s+|-/g,"");return this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[45789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number");jQuery.validator.addMethod("phonesUK",function(a,b){a=a.replace(/\(|\)|\s+|-/g,"");return this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[45789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number");jQuery.validator.addMethod("postcodeUK",function(b,a){return this.optional(a)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(b)},"Please specify a valid UK postcode");jQuery.validator.addMethod("strippedminlength",function(b,a,c){return jQuery(b).text().length>=c},jQuery.validator.format("Please enter at least {0} characters"));jQuery.validator.addMethod("email2",function(b,a,c){return this.optional(a)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(b)},jQuery.validator.messages.email);jQuery.validator.addMethod("url2",function(b,a,c){return this.optional(a)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(b)},jQuery.validator.messages.url);jQuery.validator.addMethod("creditcardtypes",function(b,a,c){if(/[^0-9\-]+/.test(b)){return false}b=b.replace(/\D/g,"");var d=0;if(c.mastercard){d|=1}if(c.visa){d|=2}if(c.amex){d|=4}if(c.dinersclub){d|=8}if(c.enroute){d|=16}if(c.discover){d|=32}if(c.jcb){d|=64}if(c.unknown){d|=128}if(c.all){d=1|2|4|8|16|32|64|128}if(d&1&&/^(5[12345])/.test(b)){return b.length===16}if(d&2&&/^(4)/.test(b)){return b.length===16}if(d&4&&/^(3[47])/.test(b)){return b.length===15}if(d&8&&/^(3(0[012345]|[68]))/.test(b)){return b.length===14}if(d&16&&/^(2(014|149))/.test(b)){return b.length===15}if(d&32&&/^(6011)/.test(b)){return b.length===16}if(d&64&&/^(3)/.test(b)){return b.length===16}if(d&64&&/^(2131|1800)/.test(b)){return b.length===15}if(d&128){return true}return false},"Please enter a valid credit card number.");jQuery.validator.addMethod("ipv4",function(b,a,c){return this.optional(a)||/^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(b)},"Please enter a valid IP v4 address.");jQuery.validator.addMethod("ipv6",function(b,a,c){return this.optional(a)||/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(b)},"Please enter a valid IP v6 address.");jQuery.validator.addMethod("pattern",function(b,a,c){if(this.optional(a)){return true}if(typeof c==="string"){c=new RegExp("^(?:"+c+")$")}return c.test(b)},"Invalid format.");jQuery.validator.addMethod("require_from_group",function(g,f,d){var e=this;var b=d[1];var c=$(b,f.form).filter(function(){return e.elementValue(this)}).length>=d[0];if(!$(f).data("being_validated")){var a=$(b,f.form);a.data("being_validated",true);a.valid();a.data("being_validated",false)}return c},jQuery.format("Please fill at least {0} of these fields."));jQuery.validator.addMethod("skip_or_fill_minimum",function(h,e,i){var b=this,c=i[0],d=i[1];var g=$(d,e.form).filter(function(){return b.elementValue(this)}).length;var a=g>=c||g===0;if(!$(e).data("being_validated")){var f=$(d,e.form);f.data("being_validated",true);f.valid();f.data("being_validated",false)}return a},jQuery.format("Please either skip these fields or fill at least {0} of them."));jQuery.validator.addMethod("accept",function(e,c,g){var f=typeof g==="string"?g.replace(/\s/g,"").replace(/,/g,"|"):"image/*",d=this.optional(c),b,a;if(d){return d}if($(c).attr("type")==="file"){f=f.replace(/\*/g,".*");if(c.files&&c.files.length){for(b=0;b<c.files.length;b++){a=c.files[b];if(!a.type.match(new RegExp(".?("+f+")$","i"))){return false}}}}return true},jQuery.format("Please enter a value with a valid mimetype."));jQuery.validator.addMethod("extension",function(b,a,c){c=typeof c==="string"?c.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(a)||b.match(new RegExp(".("+c+")$","i"))},jQuery.format("Please enter a value with a valid extension.")); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/dist/jquery.validate.js b/common/src/main/webapp/thirdparty/jquery-validation/dist/jquery.validate.js
new file mode 100644
index 0000000..88ba300
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/dist/jquery.validate.js
@@ -0,0 +1,1231 @@
+/*!
+ * jQuery Validation Plugin 1.11.1
+ *
+ * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
+ * http://docs.jquery.com/Plugins/Validation
+ *
+ * Copyright 2013 Jörn Zaefferer
+ * Released under the MIT license:
+ * http://www.opensource.org/licenses/mit-license.php
+ */
+
+(function($) {
+
+$.extend($.fn, {
+ // http://docs.jquery.com/Plugins/Validation/validate
+ validate: function( options ) {
+
+ // if nothing is selected, return nothing; can't chain anyway
+ if ( !this.length ) {
+ if ( options && options.debug && window.console ) {
+ console.warn( "Nothing selected, can't validate, returning nothing." );
+ }
+ return;
+ }
+
+ // check if a validator for this form was already created
+ var validator = $.data( this[0], "validator" );
+ if ( validator ) {
+ return validator;
+ }
+
+ // Add novalidate tag if HTML5.
+ this.attr( "novalidate", "novalidate" );
+
+ validator = new $.validator( options, this[0] );
+ $.data( this[0], "validator", validator );
+
+ if ( validator.settings.onsubmit ) {
+
+ this.validateDelegate( ":submit", "click", function( event ) {
+ if ( validator.settings.submitHandler ) {
+ validator.submitButton = event.target;
+ }
+ // allow suppressing validation by adding a cancel class to the submit button
+ if ( $(event.target).hasClass("cancel") ) {
+ validator.cancelSubmit = true;
+ }
+
+ // allow suppressing validation by adding the html5 formnovalidate attribute to the submit button
+ if ( $(event.target).attr("formnovalidate") !== undefined ) {
+ validator.cancelSubmit = true;
+ }
+ });
+
+ // validate the form on submit
+ this.submit( function( event ) {
+ if ( validator.settings.debug ) {
+ // prevent form submit to be able to see console output
+ event.preventDefault();
+ }
+ function handle() {
+ var hidden;
+ if ( validator.settings.submitHandler ) {
+ if ( validator.submitButton ) {
+ // insert a hidden input as a replacement for the missing submit button
+ hidden = $("<input type='hidden'/>").attr("name", validator.submitButton.name).val( $(validator.submitButton).val() ).appendTo(validator.currentForm);
+ }
+ validator.settings.submitHandler.call( validator, validator.currentForm, event );
+ if ( validator.submitButton ) {
+ // and clean up afterwards; thanks to no-block-scope, hidden can be referenced
+ hidden.remove();
+ }
+ return false;
+ }
+ return true;
+ }
+
+ // prevent submit for invalid forms or custom submit handlers
+ if ( validator.cancelSubmit ) {
+ validator.cancelSubmit = false;
+ return handle();
+ }
+ if ( validator.form() ) {
+ if ( validator.pendingRequest ) {
+ validator.formSubmitted = true;
+ return false;
+ }
+ return handle();
+ } else {
+ validator.focusInvalid();
+ return false;
+ }
+ });
+ }
+
+ return validator;
+ },
+ // http://docs.jquery.com/Plugins/Validation/valid
+ valid: function() {
+ if ( $(this[0]).is("form")) {
+ return this.validate().form();
+ } else {
+ var valid = true;
+ var validator = $(this[0].form).validate();
+ this.each(function() {
+ valid = valid && validator.element(this);
+ });
+ return valid;
+ }
+ },
+ // attributes: space seperated list of attributes to retrieve and remove
+ removeAttrs: function( attributes ) {
+ var result = {},
+ $element = this;
+ $.each(attributes.split(/\s/), function( index, value ) {
+ result[value] = $element.attr(value);
+ $element.removeAttr(value);
+ });
+ return result;
+ },
+ // http://docs.jquery.com/Plugins/Validation/rules
+ rules: function( command, argument ) {
+ var element = this[0];
+
+ if ( command ) {
+ var settings = $.data(element.form, "validator").settings;
+ var staticRules = settings.rules;
+ var existingRules = $.validator.staticRules(element);
+ switch(command) {
+ case "add":
+ $.extend(existingRules, $.validator.normalizeRule(argument));
+ // remove messages from rules, but allow them to be set separetely
+ delete existingRules.messages;
+ staticRules[element.name] = existingRules;
+ if ( argument.messages ) {
+ settings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );
+ }
+ break;
+ case "remove":
+ if ( !argument ) {
+ delete staticRules[element.name];
+ return existingRules;
+ }
+ var filtered = {};
+ $.each(argument.split(/\s/), function( index, method ) {
+ filtered[method] = existingRules[method];
+ delete existingRules[method];
+ });
+ return filtered;
+ }
+ }
+
+ var data = $.validator.normalizeRules(
+ $.extend(
+ {},
+ $.validator.classRules(element),
+ $.validator.attributeRules(element),
+ $.validator.dataRules(element),
+ $.validator.staticRules(element)
+ ), element);
+
+ // make sure required is at front
+ if ( data.required ) {
+ var param = data.required;
+ delete data.required;
+ data = $.extend({required: param}, data);
+ }
+
+ return data;
+ }
+});
+
+// Custom selectors
+$.extend($.expr[":"], {
+ // http://docs.jquery.com/Plugins/Validation/blank
+ blank: function( a ) { return !$.trim("" + $(a).val()); },
+ // http://docs.jquery.com/Plugins/Validation/filled
+ filled: function( a ) { return !!$.trim("" + $(a).val()); },
+ // http://docs.jquery.com/Plugins/Validation/unchecked
+ unchecked: function( a ) { return !$(a).prop("checked"); }
+});
+
+// constructor for validator
+$.validator = function( options, form ) {
+ this.settings = $.extend( true, {}, $.validator.defaults, options );
+ this.currentForm = form;
+ this.init();
+};
+
+$.validator.format = function( source, params ) {
+ if ( arguments.length === 1 ) {
+ return function() {
+ var args = $.makeArray(arguments);
+ args.unshift(source);
+ return $.validator.format.apply( this, args );
+ };
+ }
+ if ( arguments.length > 2 && params.constructor !== Array ) {
+ params = $.makeArray(arguments).slice(1);
+ }
+ if ( params.constructor !== Array ) {
+ params = [ params ];
+ }
+ $.each(params, function( i, n ) {
+ source = source.replace( new RegExp("\\{" + i + "\\}", "g"), function() {
+ return n;
+ });
+ });
+ return source;
+};
+
+$.extend($.validator, {
+
+ defaults: {
+ messages: {},
+ groups: {},
+ rules: {},
+ errorClass: "error",
+ validClass: "valid",
+ errorElement: "label",
+ focusInvalid: true,
+ errorContainer: $([]),
+ errorLabelContainer: $([]),
+ onsubmit: true,
+ ignore: ":hidden",
+ ignoreTitle: false,
+ onfocusin: function( element, event ) {
+ this.lastActive = element;
+
+ // hide error label and remove error class on focus if enabled
+ if ( this.settings.focusCleanup && !this.blockFocusCleanup ) {
+ if ( this.settings.unhighlight ) {
+ this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );
+ }
+ this.addWrapper(this.errorsFor(element)).hide();
+ }
+ },
+ onfocusout: function( element, event ) {
+ if ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {
+ this.element(element);
+ }
+ },
+ onkeyup: function( element, event ) {
+ if ( event.which === 9 && this.elementValue(element) === "" ) {
+ return;
+ } else if ( element.name in this.submitted || element === this.lastElement ) {
+ this.element(element);
+ }
+ },
+ onclick: function( element, event ) {
+ // click on selects, radiobuttons and checkboxes
+ if ( element.name in this.submitted ) {
+ this.element(element);
+ }
+ // or option elements, check parent select in that case
+ else if ( element.parentNode.name in this.submitted ) {
+ this.element(element.parentNode);
+ }
+ },
+ highlight: function( element, errorClass, validClass ) {
+ if ( element.type === "radio" ) {
+ this.findByName(element.name).addClass(errorClass).removeClass(validClass);
+ } else {
+ $(element).addClass(errorClass).removeClass(validClass);
+ }
+ },
+ unhighlight: function( element, errorClass, validClass ) {
+ if ( element.type === "radio" ) {
+ this.findByName(element.name).removeClass(errorClass).addClass(validClass);
+ } else {
+ $(element).removeClass(errorClass).addClass(validClass);
+ }
+ }
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/setDefaults
+ setDefaults: function( settings ) {
+ $.extend( $.validator.defaults, settings );
+ },
+
+ messages: {
+ required: "This field is required.",
+ remote: "Please fix this field.",
+ email: "Please enter a valid email address.",
+ url: "Please enter a valid URL.",
+ date: "Please enter a valid date.",
+ dateISO: "Please enter a valid date (ISO).",
+ number: "Please enter a valid number.",
+ digits: "Please enter only digits.",
+ creditcard: "Please enter a valid credit card number.",
+ equalTo: "Please enter the same value again.",
+ maxlength: $.validator.format("Please enter no more than {0} characters."),
+ minlength: $.validator.format("Please enter at least {0} characters."),
+ rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."),
+ range: $.validator.format("Please enter a value between {0} and {1}."),
+ max: $.validator.format("Please enter a value less than or equal to {0}."),
+ min: $.validator.format("Please enter a value greater than or equal to {0}.")
+ },
+
+ autoCreateRanges: false,
+
+ prototype: {
+
+ init: function() {
+ this.labelContainer = $(this.settings.errorLabelContainer);
+ this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);
+ this.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );
+ this.submitted = {};
+ this.valueCache = {};
+ this.pendingRequest = 0;
+ this.pending = {};
+ this.invalid = {};
+ this.reset();
+
+ var groups = (this.groups = {});
+ $.each(this.settings.groups, function( key, value ) {
+ if ( typeof value === "string" ) {
+ value = value.split(/\s/);
+ }
+ $.each(value, function( index, name ) {
+ groups[name] = key;
+ });
+ });
+ var rules = this.settings.rules;
+ $.each(rules, function( key, value ) {
+ rules[key] = $.validator.normalizeRule(value);
+ });
+
+ function delegate(event) {
+ var validator = $.data(this[0].form, "validator"),
+ eventType = "on" + event.type.replace(/^validate/, "");
+ if ( validator.settings[eventType] ) {
+ validator.settings[eventType].call(validator, this[0], event);
+ }
+ }
+ $(this.currentForm)
+ .validateDelegate(":text, [type='password'], [type='file'], select, textarea, " +
+ "[type='number'], [type='search'] ,[type='tel'], [type='url'], " +
+ "[type='email'], [type='datetime'], [type='date'], [type='month'], " +
+ "[type='week'], [type='time'], [type='datetime-local'], " +
+ "[type='range'], [type='color'] ",
+ "focusin focusout keyup", delegate)
+ .validateDelegate("[type='radio'], [type='checkbox'], select, option", "click", delegate);
+
+ if ( this.settings.invalidHandler ) {
+ $(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler);
+ }
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/form
+ form: function() {
+ this.checkForm();
+ $.extend(this.submitted, this.errorMap);
+ this.invalid = $.extend({}, this.errorMap);
+ if ( !this.valid() ) {
+ $(this.currentForm).triggerHandler("invalid-form", [this]);
+ }
+ this.showErrors();
+ return this.valid();
+ },
+
+ checkForm: function() {
+ this.prepareForm();
+ for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {
+ this.check( elements[i] );
+ }
+ return this.valid();
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/element
+ element: function( element ) {
+ element = this.validationTargetFor( this.clean( element ) );
+ this.lastElement = element;
+ this.prepareElement( element );
+ this.currentElements = $(element);
+ var result = this.check( element ) !== false;
+ if ( result ) {
+ delete this.invalid[element.name];
+ } else {
+ this.invalid[element.name] = true;
+ }
+ if ( !this.numberOfInvalids() ) {
+ // Hide error containers on last error
+ this.toHide = this.toHide.add( this.containers );
+ }
+ this.showErrors();
+ return result;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/showErrors
+ showErrors: function( errors ) {
+ if ( errors ) {
+ // add items to error list and map
+ $.extend( this.errorMap, errors );
+ this.errorList = [];
+ for ( var name in errors ) {
+ this.errorList.push({
+ message: errors[name],
+ element: this.findByName(name)[0]
+ });
+ }
+ // remove items from success list
+ this.successList = $.grep( this.successList, function( element ) {
+ return !(element.name in errors);
+ });
+ }
+ if ( this.settings.showErrors ) {
+ this.settings.showErrors.call( this, this.errorMap, this.errorList );
+ } else {
+ this.defaultShowErrors();
+ }
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/resetForm
+ resetForm: function() {
+ if ( $.fn.resetForm ) {
+ $(this.currentForm).resetForm();
+ }
+ this.submitted = {};
+ this.lastElement = null;
+ this.prepareForm();
+ this.hideErrors();
+ this.elements().removeClass( this.settings.errorClass ).removeData( "previousValue" );
+ },
+
+ numberOfInvalids: function() {
+ return this.objectLength(this.invalid);
+ },
+
+ objectLength: function( obj ) {
+ var count = 0;
+ for ( var i in obj ) {
+ count++;
+ }
+ return count;
+ },
+
+ hideErrors: function() {
+ this.addWrapper( this.toHide ).hide();
+ },
+
+ valid: function() {
+ return this.size() === 0;
+ },
+
+ size: function() {
+ return this.errorList.length;
+ },
+
+ focusInvalid: function() {
+ if ( this.settings.focusInvalid ) {
+ try {
+ $(this.findLastActive() || this.errorList.length && this.errorList[0].element || [])
+ .filter(":visible")
+ .focus()
+ // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
+ .trigger("focusin");
+ } catch(e) {
+ // ignore IE throwing errors when focusing hidden elements
+ }
+ }
+ },
+
+ findLastActive: function() {
+ var lastActive = this.lastActive;
+ return lastActive && $.grep(this.errorList, function( n ) {
+ return n.element.name === lastActive.name;
+ }).length === 1 && lastActive;
+ },
+
+ elements: function() {
+ var validator = this,
+ rulesCache = {};
+
+ // select all valid inputs inside the form (no submit or reset buttons)
+ return $(this.currentForm)
+ .find("input, select, textarea")
+ .not(":submit, :reset, :image, [disabled]")
+ .not( this.settings.ignore )
+ .filter(function() {
+ if ( !this.name && validator.settings.debug && window.console ) {
+ console.error( "%o has no name assigned", this);
+ }
+
+ // select only the first element for each name, and only those with rules specified
+ if ( this.name in rulesCache || !validator.objectLength($(this).rules()) ) {
+ return false;
+ }
+
+ rulesCache[this.name] = true;
+ return true;
+ });
+ },
+
+ clean: function( selector ) {
+ return $(selector)[0];
+ },
+
+ errors: function() {
+ var errorClass = this.settings.errorClass.replace(" ", ".");
+ return $(this.settings.errorElement + "." + errorClass, this.errorContext);
+ },
+
+ reset: function() {
+ this.successList = [];
+ this.errorList = [];
+ this.errorMap = {};
+ this.toShow = $([]);
+ this.toHide = $([]);
+ this.currentElements = $([]);
+ },
+
+ prepareForm: function() {
+ this.reset();
+ this.toHide = this.errors().add( this.containers );
+ },
+
+ prepareElement: function( element ) {
+ this.reset();
+ this.toHide = this.errorsFor(element);
+ },
+
+ elementValue: function( element ) {
+ var type = $(element).attr("type"),
+ val = $(element).val();
+
+ if ( type === "radio" || type === "checkbox" ) {
+ return $("input[name='" + $(element).attr("name") + "']:checked").val();
+ }
+
+ if ( typeof val === "string" ) {
+ return val.replace(/\r/g, "");
+ }
+ return val;
+ },
+
+ check: function( element ) {
+ element = this.validationTargetFor( this.clean( element ) );
+
+ var rules = $(element).rules();
+ var dependencyMismatch = false;
+ var val = this.elementValue(element);
+ var result;
+
+ for (var method in rules ) {
+ var rule = { method: method, parameters: rules[method] };
+ try {
+
+ result = $.validator.methods[method].call( this, val, element, rule.parameters );
+
+ // if a method indicates that the field is optional and therefore valid,
+ // don't mark it as valid when there are no other rules
+ if ( result === "dependency-mismatch" ) {
+ dependencyMismatch = true;
+ continue;
+ }
+ dependencyMismatch = false;
+
+ if ( result === "pending" ) {
+ this.toHide = this.toHide.not( this.errorsFor(element) );
+ return;
+ }
+
+ if ( !result ) {
+ this.formatAndAdd( element, rule );
+ return false;
+ }
+ } catch(e) {
+ if ( this.settings.debug && window.console ) {
+ console.log( "Exception occurred when checking element " + element.id + ", check the '" + rule.method + "' method.", e );
+ }
+ throw e;
+ }
+ }
+ if ( dependencyMismatch ) {
+ return;
+ }
+ if ( this.objectLength(rules) ) {
+ this.successList.push(element);
+ }
+ return true;
+ },
+
+ // return the custom message for the given element and validation method
+ // specified in the element's HTML5 data attribute
+ customDataMessage: function( element, method ) {
+ return $(element).data("msg-" + method.toLowerCase()) || (element.attributes && $(element).attr("data-msg-" + method.toLowerCase()));
+ },
+
+ // return the custom message for the given element name and validation method
+ customMessage: function( name, method ) {
+ var m = this.settings.messages[name];
+ return m && (m.constructor === String ? m : m[method]);
+ },
+
+ // return the first defined argument, allowing empty strings
+ findDefined: function() {
+ for(var i = 0; i < arguments.length; i++) {
+ if ( arguments[i] !== undefined ) {
+ return arguments[i];
+ }
+ }
+ return undefined;
+ },
+
+ defaultMessage: function( element, method ) {
+ return this.findDefined(
+ this.customMessage( element.name, method ),
+ this.customDataMessage( element, method ),
+ // title is never undefined, so handle empty string as undefined
+ !this.settings.ignoreTitle && element.title || undefined,
+ $.validator.messages[method],
+ "<strong>Warning: No message defined for " + element.name + "</strong>"
+ );
+ },
+
+ formatAndAdd: function( element, rule ) {
+ var message = this.defaultMessage( element, rule.method ),
+ theregex = /\$?\{(\d+)\}/g;
+ if ( typeof message === "function" ) {
+ message = message.call(this, rule.parameters, element);
+ } else if (theregex.test(message)) {
+ message = $.validator.format(message.replace(theregex, "{$1}"), rule.parameters);
+ }
+ this.errorList.push({
+ message: message,
+ element: element
+ });
+
+ this.errorMap[element.name] = message;
+ this.submitted[element.name] = message;
+ },
+
+ addWrapper: function( toToggle ) {
+ if ( this.settings.wrapper ) {
+ toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );
+ }
+ return toToggle;
+ },
+
+ defaultShowErrors: function() {
+ var i, elements;
+ for ( i = 0; this.errorList[i]; i++ ) {
+ var error = this.errorList[i];
+ if ( this.settings.highlight ) {
+ this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );
+ }
+ this.showLabel( error.element, error.message );
+ }
+ if ( this.errorList.length ) {
+ this.toShow = this.toShow.add( this.containers );
+ }
+ if ( this.settings.success ) {
+ for ( i = 0; this.successList[i]; i++ ) {
+ this.showLabel( this.successList[i] );
+ }
+ }
+ if ( this.settings.unhighlight ) {
+ for ( i = 0, elements = this.validElements(); elements[i]; i++ ) {
+ this.settings.unhighlight.call( this, elements[i], this.settings.errorClass, this.settings.validClass );
+ }
+ }
+ this.toHide = this.toHide.not( this.toShow );
+ this.hideErrors();
+ this.addWrapper( this.toShow ).show();
+ },
+
+ validElements: function() {
+ return this.currentElements.not(this.invalidElements());
+ },
+
+ invalidElements: function() {
+ return $(this.errorList).map(function() {
+ return this.element;
+ });
+ },
+
+ showLabel: function( element, message ) {
+ var label = this.errorsFor( element );
+ if ( label.length ) {
+ // refresh error/success class
+ label.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
+ // replace message on existing label
+ label.html(message);
+ } else {
+ // create label
+ label = $("<" + this.settings.errorElement + ">")
+ .attr("for", this.idOrName(element))
+ .addClass(this.settings.errorClass)
+ .html(message || "");
+ if ( this.settings.wrapper ) {
+ // make sure the element is visible, even in IE
+ // actually showing the wrapped element is handled elsewhere
+ label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent();
+ }
+ if ( !this.labelContainer.append(label).length ) {
+ if ( this.settings.errorPlacement ) {
+ this.settings.errorPlacement(label, $(element) );
+ } else {
+ label.insertAfter(element);
+ }
+ }
+ }
+ if ( !message && this.settings.success ) {
+ label.text("");
+ if ( typeof this.settings.success === "string" ) {
+ label.addClass( this.settings.success );
+ } else {
+ this.settings.success( label, element );
+ }
+ }
+ this.toShow = this.toShow.add(label);
+ },
+
+ errorsFor: function( element ) {
+ var name = this.idOrName(element);
+ return this.errors().filter(function() {
+ return $(this).attr("for") === name;
+ });
+ },
+
+ idOrName: function( element ) {
+ return this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);
+ },
+
+ validationTargetFor: function( element ) {
+ // if radio/checkbox, validate first element in group instead
+ if ( this.checkable(element) ) {
+ element = this.findByName( element.name ).not(this.settings.ignore)[0];
+ }
+ return element;
+ },
+
+ checkable: function( element ) {
+ return (/radio|checkbox/i).test(element.type);
+ },
+
+ findByName: function( name ) {
+ return $(this.currentForm).find("[name='" + name + "']");
+ },
+
+ getLength: function( value, element ) {
+ switch( element.nodeName.toLowerCase() ) {
+ case "select":
+ return $("option:selected", element).length;
+ case "input":
+ if ( this.checkable( element) ) {
+ return this.findByName(element.name).filter(":checked").length;
+ }
+ }
+ return value.length;
+ },
+
+ depend: function( param, element ) {
+ return this.dependTypes[typeof param] ? this.dependTypes[typeof param](param, element) : true;
+ },
+
+ dependTypes: {
+ "boolean": function( param, element ) {
+ return param;
+ },
+ "string": function( param, element ) {
+ return !!$(param, element.form).length;
+ },
+ "function": function( param, element ) {
+ return param(element);
+ }
+ },
+
+ optional: function( element ) {
+ var val = this.elementValue(element);
+ return !$.validator.methods.required.call(this, val, element) && "dependency-mismatch";
+ },
+
+ startRequest: function( element ) {
+ if ( !this.pending[element.name] ) {
+ this.pendingRequest++;
+ this.pending[element.name] = true;
+ }
+ },
+
+ stopRequest: function( element, valid ) {
+ this.pendingRequest--;
+ // sometimes synchronization fails, make sure pendingRequest is never < 0
+ if ( this.pendingRequest < 0 ) {
+ this.pendingRequest = 0;
+ }
+ delete this.pending[element.name];
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
+ $(this.currentForm).submit();
+ this.formSubmitted = false;
+ } else if (!valid && this.pendingRequest === 0 && this.formSubmitted) {
+ $(this.currentForm).triggerHandler("invalid-form", [this]);
+ this.formSubmitted = false;
+ }
+ },
+
+ previousValue: function( element ) {
+ return $.data(element, "previousValue") || $.data(element, "previousValue", {
+ old: null,
+ valid: true,
+ message: this.defaultMessage( element, "remote" )
+ });
+ }
+
+ },
+
+ classRuleSettings: {
+ required: {required: true},
+ email: {email: true},
+ url: {url: true},
+ date: {date: true},
+ dateISO: {dateISO: true},
+ number: {number: true},
+ digits: {digits: true},
+ creditcard: {creditcard: true}
+ },
+
+ addClassRules: function( className, rules ) {
+ if ( className.constructor === String ) {
+ this.classRuleSettings[className] = rules;
+ } else {
+ $.extend(this.classRuleSettings, className);
+ }
+ },
+
+ classRules: function( element ) {
+ var rules = {};
+ var classes = $(element).attr("class");
+ if ( classes ) {
+ $.each(classes.split(" "), function() {
+ if ( this in $.validator.classRuleSettings ) {
+ $.extend(rules, $.validator.classRuleSettings[this]);
+ }
+ });
+ }
+ return rules;
+ },
+
+ attributeRules: function( element ) {
+ var rules = {};
+ var $element = $(element);
+ var type = $element[0].getAttribute("type");
+
+ for (var method in $.validator.methods) {
+ var value;
+
+ // support for <input required> in both html5 and older browsers
+ if ( method === "required" ) {
+ value = $element.get(0).getAttribute(method);
+ // Some browsers return an empty string for the required attribute
+ // and non-HTML5 browsers might have required="" markup
+ if ( value === "" ) {
+ value = true;
+ }
+ // force non-HTML5 browsers to return bool
+ value = !!value;
+ } else {
+ value = $element.attr(method);
+ }
+
+ // convert the value to a number for number inputs, and for text for backwards compability
+ // allows type="date" and others to be compared as strings
+ if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
+ value = Number(value);
+ }
+
+ if ( value ) {
+ rules[method] = value;
+ } else if ( type === method && type !== 'range' ) {
+ // exception: the jquery validate 'range' method
+ // does not test for the html5 'range' type
+ rules[method] = true;
+ }
+ }
+
+ // maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs
+ if ( rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength) ) {
+ delete rules.maxlength;
+ }
+
+ return rules;
+ },
+
+ dataRules: function( element ) {
+ var method, value,
+ rules = {}, $element = $(element);
+ for (method in $.validator.methods) {
+ value = $element.data("rule-" + method.toLowerCase());
+ if ( value !== undefined ) {
+ rules[method] = value;
+ }
+ }
+ return rules;
+ },
+
+ staticRules: function( element ) {
+ var rules = {};
+ var validator = $.data(element.form, "validator");
+ if ( validator.settings.rules ) {
+ rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};
+ }
+ return rules;
+ },
+
+ normalizeRules: function( rules, element ) {
+ // handle dependency check
+ $.each(rules, function( prop, val ) {
+ // ignore rule when param is explicitly false, eg. required:false
+ if ( val === false ) {
+ delete rules[prop];
+ return;
+ }
+ if ( val.param || val.depends ) {
+ var keepRule = true;
+ switch (typeof val.depends) {
+ case "string":
+ keepRule = !!$(val.depends, element.form).length;
+ break;
+ case "function":
+ keepRule = val.depends.call(element, element);
+ break;
+ }
+ if ( keepRule ) {
+ rules[prop] = val.param !== undefined ? val.param : true;
+ } else {
+ delete rules[prop];
+ }
+ }
+ });
+
+ // evaluate parameters
+ $.each(rules, function( rule, parameter ) {
+ rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;
+ });
+
+ // clean number parameters
+ $.each(['minlength', 'maxlength'], function() {
+ if ( rules[this] ) {
+ rules[this] = Number(rules[this]);
+ }
+ });
+ $.each(['rangelength', 'range'], function() {
+ var parts;
+ if ( rules[this] ) {
+ if ( $.isArray(rules[this]) ) {
+ rules[this] = [Number(rules[this][0]), Number(rules[this][1])];
+ } else if ( typeof rules[this] === "string" ) {
+ parts = rules[this].split(/[\s,]+/);
+ rules[this] = [Number(parts[0]), Number(parts[1])];
+ }
+ }
+ });
+
+ if ( $.validator.autoCreateRanges ) {
+ // auto-create ranges
+ if ( rules.min && rules.max ) {
+ rules.range = [rules.min, rules.max];
+ delete rules.min;
+ delete rules.max;
+ }
+ if ( rules.minlength && rules.maxlength ) {
+ rules.rangelength = [rules.minlength, rules.maxlength];
+ delete rules.minlength;
+ delete rules.maxlength;
+ }
+ }
+
+ return rules;
+ },
+
+ // Converts a simple string to a {string: true} rule, e.g., "required" to {required:true}
+ normalizeRule: function( data ) {
+ if ( typeof data === "string" ) {
+ var transformed = {};
+ $.each(data.split(/\s/), function() {
+ transformed[this] = true;
+ });
+ data = transformed;
+ }
+ return data;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/addMethod
+ addMethod: function( name, method, message ) {
+ $.validator.methods[name] = method;
+ $.validator.messages[name] = message !== undefined ? message : $.validator.messages[name];
+ if ( method.length < 3 ) {
+ $.validator.addClassRules(name, $.validator.normalizeRule(name));
+ }
+ },
+
+ methods: {
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/required
+ required: function( value, element, param ) {
+ // check if dependency is met
+ if ( !this.depend(param, element) ) {
+ return "dependency-mismatch";
+ }
+ if ( element.nodeName.toLowerCase() === "select" ) {
+ // could be an array for select-multiple or a string, both are fine this way
+ var val = $(element).val();
+ return val && val.length > 0;
+ }
+ if ( this.checkable(element) ) {
+ return this.getLength(value, element) > 0;
+ }
+ return $.trim(value).length > 0;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/email
+ email: function( value, element ) {
+ // contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
+ return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/url
+ url: function( value, element ) {
+ // contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/
+ return this.optional(element) || /^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/date
+ date: function( value, element ) {
+ return this.optional(element) || !/Invalid|NaN/.test(new Date(value).toString());
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/dateISO
+ dateISO: function( value, element ) {
+ return this.optional(element) || /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/number
+ number: function( value, element ) {
+ return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/digits
+ digits: function( value, element ) {
+ return this.optional(element) || /^\d+$/.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/creditcard
+ // based on http://en.wikipedia.org/wiki/Luhn
+ creditcard: function( value, element ) {
+ if ( this.optional(element) ) {
+ return "dependency-mismatch";
+ }
+ // accept only spaces, digits and dashes
+ if ( /[^0-9 \-]+/.test(value) ) {
+ return false;
+ }
+ var nCheck = 0,
+ nDigit = 0,
+ bEven = false;
+
+ value = value.replace(/\D/g, "");
+
+ for (var n = value.length - 1; n >= 0; n--) {
+ var cDigit = value.charAt(n);
+ nDigit = parseInt(cDigit, 10);
+ if ( bEven ) {
+ if ( (nDigit *= 2) > 9 ) {
+ nDigit -= 9;
+ }
+ }
+ nCheck += nDigit;
+ bEven = !bEven;
+ }
+
+ return (nCheck % 10) === 0;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/minlength
+ minlength: function( value, element, param ) {
+ var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);
+ return this.optional(element) || length >= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/maxlength
+ maxlength: function( value, element, param ) {
+ var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);
+ return this.optional(element) || length <= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/rangelength
+ rangelength: function( value, element, param ) {
+ var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);
+ return this.optional(element) || ( length >= param[0] && length <= param[1] );
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/min
+ min: function( value, element, param ) {
+ return this.optional(element) || value >= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/max
+ max: function( value, element, param ) {
+ return this.optional(element) || value <= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/range
+ range: function( value, element, param ) {
+ return this.optional(element) || ( value >= param[0] && value <= param[1] );
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/equalTo
+ equalTo: function( value, element, param ) {
+ // bind to the blur event of the target in order to revalidate whenever the target field is updated
+ // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
+ var target = $(param);
+ if ( this.settings.onfocusout ) {
+ target.unbind(".validate-equalTo").bind("blur.validate-equalTo", function() {
+ $(element).valid();
+ });
+ }
+ return value === target.val();
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/remote
+ remote: function( value, element, param ) {
+ if ( this.optional(element) ) {
+ return "dependency-mismatch";
+ }
+
+ var previous = this.previousValue(element);
+ if (!this.settings.messages[element.name] ) {
+ this.settings.messages[element.name] = {};
+ }
+ previous.originalMessage = this.settings.messages[element.name].remote;
+ this.settings.messages[element.name].remote = previous.message;
+
+ param = typeof param === "string" && {url:param} || param;
+
+ if ( previous.old === value ) {
+ return previous.valid;
+ }
+
+ previous.old = value;
+ var validator = this;
+ this.startRequest(element);
+ var data = {};
+ data[element.name] = value;
+ $.ajax($.extend(true, {
+ url: param,
+ mode: "abort",
+ port: "validate" + element.name,
+ dataType: "json",
+ data: data,
+ success: function( response ) {
+ validator.settings.messages[element.name].remote = previous.originalMessage;
+ var valid = response === true || response === "true";
+ if ( valid ) {
+ var submitted = validator.formSubmitted;
+ validator.prepareElement(element);
+ validator.formSubmitted = submitted;
+ validator.successList.push(element);
+ delete validator.invalid[element.name];
+ validator.showErrors();
+ } else {
+ var errors = {};
+ var message = response || validator.defaultMessage( element, "remote" );
+ errors[element.name] = previous.message = $.isFunction(message) ? message(value) : message;
+ validator.invalid[element.name] = true;
+ validator.showErrors(errors);
+ }
+ previous.valid = valid;
+ validator.stopRequest(element, valid);
+ }
+ }, param));
+ return "pending";
+ }
+
+ }
+
+});
+
+// deprecated, use $.validator.format instead
+$.format = $.validator.format;
+
+}(jQuery));
+
+// ajax mode: abort
+// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
+// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
+(function($) {
+ var pendingRequests = {};
+ // Use a prefilter if available (1.5+)
+ if ( $.ajaxPrefilter ) {
+ $.ajaxPrefilter(function( settings, _, xhr ) {
+ var port = settings.port;
+ if ( settings.mode === "abort" ) {
+ if ( pendingRequests[port] ) {
+ pendingRequests[port].abort();
+ }
+ pendingRequests[port] = xhr;
+ }
+ });
+ } else {
+ // Proxy ajax
+ var ajax = $.ajax;
+ $.ajax = function( settings ) {
+ var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
+ port = ( "port" in settings ? settings : $.ajaxSettings ).port;
+ if ( mode === "abort" ) {
+ if ( pendingRequests[port] ) {
+ pendingRequests[port].abort();
+ }
+ pendingRequests[port] = ajax.apply(this, arguments);
+ return pendingRequests[port];
+ }
+ return ajax.apply(this, arguments);
+ };
+ }
+}(jQuery));
+
+// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation
+// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target
+(function($) {
+ $.extend($.fn, {
+ validateDelegate: function( delegate, type, handler ) {
+ return this.bind(type, function( event ) {
+ var target = $(event.target);
+ if ( target.is(delegate) ) {
+ return handler.apply(target, arguments);
+ }
+ });
+ }
+ });
+}(jQuery));
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/dist/jquery.validate.min.js b/common/src/main/webapp/thirdparty/jquery-validation/dist/jquery.validate.min.js
new file mode 100644
index 0000000..c0385ef
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/dist/jquery.validate.min.js
@@ -0,0 +1,12 @@
+/*!
+ * jQuery Validation Plugin 1.11.1
+ *
+ * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
+ * http://docs.jquery.com/Plugins/Validation
+ *
+ * Copyright 2013 Jörn Zaefferer
+ * Modified by KeenThemes(refer line #665)
+ * Released under the MIT license:
+ * http://www.opensource.org/licenses/mit-license.php
+ */
+(function(a){a.extend(a.fn,{validate:function(b){if(!this.length){if(b&&b.debug&&window.console){console.warn("Nothing selected, can't validate, returning nothing.")}return}var c=a.data(this[0],"validator");if(c){return c}this.attr("novalidate","novalidate");c=new a.validator(b,this[0]);a.data(this[0],"validator",c);if(c.settings.onsubmit){this.validateDelegate(":submit","click",function(d){if(c.settings.submitHandler){c.submitButton=d.target}if(a(d.target).hasClass("cancel")){c.cancelSubmit=true}if(a(d.target).attr("formnovalidate")!==undefined){c.cancelSubmit=true}});this.submit(function(d){if(c.settings.debug){d.preventDefault()}function e(){var f;if(c.settings.submitHandler){if(c.submitButton){f=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)}c.settings.submitHandler.call(c,c.currentForm,d);if(c.submitButton){f.remove()}return false}return true}if(c.cancelSubmit){c.cancelSubmit=false;return e()}if(c.form()){if(c.pendingRequest){c.formSubmitted=true;return false}return e()}else{c.focusInvalid();return false}})}return c},valid:function(){if(a(this[0]).is("form")){return this.validate().form()}else{var c=true;var b=a(this[0].form).validate();this.each(function(){c=c&&b.element(this)});return c}},removeAttrs:function(d){var b={},c=this;a.each(d.split(/\s/),function(e,f){b[f]=c.attr(f);c.removeAttr(f)});return b},rules:function(e,b){var g=this[0];if(e){var d=a.data(g.form,"validator").settings;var i=d.rules;var j=a.validator.staticRules(g);switch(e){case"add":a.extend(j,a.validator.normalizeRule(b));delete j.messages;i[g.name]=j;if(b.messages){d.messages[g.name]=a.extend(d.messages[g.name],b.messages)}break;case"remove":if(!b){delete i[g.name];return j}var h={};a.each(b.split(/\s/),function(k,l){h[l]=j[l];delete j[l]});return h}}var f=a.validator.normalizeRules(a.extend({},a.validator.classRules(g),a.validator.attributeRules(g),a.validator.dataRules(g),a.validator.staticRules(g)),g);if(f.required){var c=f.required;delete f.required;f=a.extend({required:c},f)}return f}});a.extend(a.expr[":"],{blank:function(b){return !a.trim(""+a(b).val())},filled:function(b){return !!a.trim(""+a(b).val())},unchecked:function(b){return !a(b).prop("checked")}});a.validator=function(b,c){this.settings=a.extend(true,{},a.validator.defaults,b);this.currentForm=c;this.init()};a.validator.format=function(b,c){if(arguments.length===1){return function(){var d=a.makeArray(arguments);d.unshift(b);return a.validator.format.apply(this,d)}}if(arguments.length>2&&c.constructor!==Array){c=a.makeArray(arguments).slice(1)}if(c.constructor!==Array){c=[c]}a.each(c,function(d,e){b=b.replace(new RegExp("\\{"+d+"\\}","g"),function(){return e})});return b};a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:true,ignore:":hidden",ignoreTitle:false,onfocusin:function(b,c){this.lastActive=b;if(this.settings.focusCleanup&&!this.blockFocusCleanup){if(this.settings.unhighlight){this.settings.unhighlight.call(this,b,this.settings.errorClass,this.settings.validClass)}this.addWrapper(this.errorsFor(b)).hide()}},onfocusout:function(b,c){if(!this.checkable(b)&&(b.name in this.submitted||!this.optional(b))){this.element(b)}},onkeyup:function(b,c){if(c.which===9&&this.elementValue(b)===""){return}else{if(b.name in this.submitted||b===this.lastElement){this.element(b)}}},onclick:function(b,c){if(b.name in this.submitted){this.element(b)}else{if(b.parentNode.name in this.submitted){this.element(b.parentNode)}}},highlight:function(d,b,c){if(d.type==="radio"){this.findByName(d.name).addClass(b).removeClass(c)}else{a(d).addClass(b).removeClass(c)}},unhighlight:function(d,b,c){if(d.type==="radio"){this.findByName(d.name).removeClass(b).addClass(c)}else{a(d).removeClass(b).addClass(c)}}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=a(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm);this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=(this.groups={});a.each(this.settings.groups,function(e,f){if(typeof f==="string"){f=f.split(/\s/)}a.each(f,function(h,g){b[g]=e})});var d=this.settings.rules;a.each(d,function(e,f){d[e]=a.validator.normalizeRule(f)});function c(g){var f=a.data(this[0].form,"validator"),e="on"+g.type.replace(/^validate/,"");if(f.settings[e]){f.settings[e].call(f,this[0],g)}}a(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",c).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",c);if(this.settings.invalidHandler){a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)}},form:function(){this.checkForm();a.extend(this.submitted,this.errorMap);this.invalid=a.extend({},this.errorMap);if(!this.valid()){a(this.currentForm).triggerHandler("invalid-form",[this])}this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var b=0,c=(this.currentElements=this.elements());c[b];b++){this.check(c[b])}return this.valid()},element:function(c){c=this.validationTargetFor(this.clean(c));this.lastElement=c;this.prepareElement(c);this.currentElements=a(c);var b=this.check(c)!==false;if(b){delete this.invalid[c.name]}else{this.invalid[c.name]=true}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers)}this.showErrors();return b},showErrors:function(c){if(c){a.extend(this.errorMap,c);this.errorList=[];for(var b in c){this.errorList.push({message:c[b],element:this.findByName(b)[0]})}this.successList=a.grep(this.successList,function(d){return !(d.name in c)})}if(this.settings.showErrors){this.settings.showErrors.call(this,this.errorMap,this.errorList)}else{this.defaultShowErrors()}},resetForm:function(){if(a.fn.resetForm){a(this.currentForm).resetForm()}this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(d){var c=0;for(var b in d){c++}return c},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()===0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid){try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}}},findLastActive:function(){var b=this.lastActive;return b&&a.grep(this.errorList,function(c){return c.element.name===b.name}).length===1&&b},elements:function(){var c=this,b={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){if(!this.name&&c.settings.debug&&window.console){console.error("%o has no name assigned",this)}if(this.name in b||!c.objectLength(a(this).rules())){return false}b[this.name]=true;return true})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.replace(" ",".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=a([]);this.toHide=a([]);this.currentElements=a([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(b){this.reset();this.toHide=this.errorsFor(b)},elementValue:function(b){var c=a(b).attr("type"),d=a(b).val();if(c==="radio"||c==="checkbox"){return a("input[name='"+a(b).attr("name")+"']:checked").val()}if(typeof d==="string"){return d.replace(/\r/g,"")}return d},check:function(c){c=this.validationTargetFor(this.clean(c));var i=a(c).rules();var d=false;var h=this.elementValue(c);var b;for(var j in i){var g={method:j,parameters:i[j]};try{b=a.validator.methods[j].call(this,h,c,g.parameters);if(b==="dependency-mismatch"){d=true;continue}d=false;if(b==="pending"){this.toHide=this.toHide.not(this.errorsFor(c));return}if(!b){this.formatAndAdd(c,g);return false}}catch(f){if(this.settings.debug&&window.console){console.log("Exception occurred when checking element "+c.id+", check the '"+g.method+"' method.",f)}throw f}}if(d){return}if(this.objectLength(i)){this.successList.push(c)}return true},customDataMessage:function(b,c){return a(b).data("msg-"+c.toLowerCase())||(b.attributes&&a(b).attr("data-msg-"+c.toLowerCase()))},customMessage:function(c,d){var b=this.settings.messages[c];return b&&(b.constructor===String?b:b[d])},findDefined:function(){for(var b=0;b<arguments.length;b++){if(arguments[b]!==undefined){return arguments[b]}}return undefined},defaultMessage:function(b,c){return this.findDefined(this.customMessage(b.name,c),this.customDataMessage(b,c),!this.settings.ignoreTitle&&b.title||undefined,a.validator.messages[c],"<strong>Warning: No message defined for "+b.name+"</strong>")},formatAndAdd:function(c,e){var d=this.defaultMessage(c,e.method),b=/\$?\{(\d+)\}/g;if(typeof d==="function"){d=d.call(this,e.parameters,c)}else{if(b.test(d)){d=a.validator.format(d.replace(b,"{$1}"),e.parameters)}}this.errorList.push({message:d,element:c});this.errorMap[c.name]=d;this.submitted[c.name]=d},addWrapper:function(b){if(this.settings.wrapper){b=b.add(b.parent(this.settings.wrapper))}return b},defaultShowErrors:function(){var c,d;for(c=0;this.errorList[c];c++){var b=this.errorList[c];if(this.settings.highlight){this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass)}this.showLabel(b.element,b.message)}if(this.errorList.length){this.toShow=this.toShow.add(this.containers)}if(this.settings.success){for(c=0;this.successList[c];c++){this.showLabel(this.successList[c])}}if(this.settings.unhighlight){for(c=0,d=this.validElements();d[c];c++){this.settings.unhighlight.call(this,d[c],this.settings.errorClass,this.settings.validClass)}}this.toHide=this.toHide.not(this.toShow);if(this.settings.doNotHideMessage==true){}else{this.hideErrors()}this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(c,d){var b=this.errorsFor(c);if(b.length){b.removeClass(this.settings.validClass).addClass(this.settings.errorClass);b.html(d)}else{b=a("<"+this.settings.errorElement+">").attr("for",this.idOrName(c)).addClass(this.settings.errorClass).html(d||"");if(this.settings.wrapper){b=b.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()}if(!this.labelContainer.append(b).length){if(this.settings.errorPlacement){this.settings.errorPlacement(b,a(c))}else{b.insertAfter(c)}}}if(!d&&this.settings.success){b.text("");if(typeof this.settings.success==="string"){b.addClass(this.settings.success)}else{this.settings.success(b,c)}}this.toShow=this.toShow.add(b)},errorsFor:function(c){var b=this.idOrName(c);return this.errors().filter(function(){return a(this).attr("for")===b})},idOrName:function(b){return this.groups[b.name]||(this.checkable(b)?b.name:b.id||b.name)},validationTargetFor:function(b){if(this.checkable(b)){b=this.findByName(b.name).not(this.settings.ignore)[0]}return b},checkable:function(b){return(/radio|checkbox/i).test(b.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(c,b){switch(b.nodeName.toLowerCase()){case"select":return a("option:selected",b).length;case"input":if(this.checkable(b)){return this.findByName(b.name).filter(":checked").length}}return c.length},depend:function(c,b){return this.dependTypes[typeof c]?this.dependTypes[typeof c](c,b):true},dependTypes:{"boolean":function(c,b){return c},string:function(c,b){return !!a(c,b.form).length},"function":function(c,b){return c(b)}},optional:function(b){var c=this.elementValue(b);return !a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){if(!this.pending[b.name]){this.pendingRequest++;this.pending[b.name]=true}},stopRequest:function(b,c){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0}delete this.pending[b.name];if(c&&this.pendingRequest===0&&this.formSubmitted&&this.form()){a(this.currentForm).submit();this.formSubmitted=false}else{if(!c&&this.pendingRequest===0&&this.formSubmitted){a(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false}}},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:true,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},number:{number:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(b,c){if(b.constructor===String){this.classRuleSettings[b]=c}else{a.extend(this.classRuleSettings,b)}},classRules:function(c){var d={};var b=a(c).attr("class");if(b){a.each(b.split(" "),function(){if(this in a.validator.classRuleSettings){a.extend(d,a.validator.classRuleSettings[this])}})}return d},attributeRules:function(c){var f={};var b=a(c);var d=b[0].getAttribute("type");for(var g in a.validator.methods){var e;if(g==="required"){e=b.get(0).getAttribute(g);if(e===""){e=true}e=!!e}else{e=b.attr(g)}if(/min|max/.test(g)&&(d===null||/number|range|text/.test(d))){e=Number(e)}if(e){f[g]=e}else{if(d===g&&d!=="range"){f[g]=true}}}if(f.maxlength&&/-1|2147483647|524288/.test(f.maxlength)){delete f.maxlength}return f},dataRules:function(c){var f,d,e={},b=a(c);for(f in a.validator.methods){d=b.data("rule-"+f.toLowerCase());if(d!==undefined){e[f]=d}}return e},staticRules:function(c){var d={};var b=a.data(c.form,"validator");if(b.settings.rules){d=a.validator.normalizeRule(b.settings.rules[c.name])||{}}return d},normalizeRules:function(c,b){a.each(c,function(f,e){if(e===false){delete c[f];return}if(e.param||e.depends){var d=true;switch(typeof e.depends){case"string":d=!!a(e.depends,b.form).length;break;case"function":d=e.depends.call(b,b);break}if(d){c[f]=e.param!==undefined?e.param:true}else{delete c[f]}}});a.each(c,function(d,e){c[d]=a.isFunction(e)?e(b):e});a.each(["minlength","maxlength"],function(){if(c[this]){c[this]=Number(c[this])}});a.each(["rangelength","range"],function(){var d;if(c[this]){if(a.isArray(c[this])){c[this]=[Number(c[this][0]),Number(c[this][1])]}else{if(typeof c[this]==="string"){d=c[this].split(/[\s,]+/);c[this]=[Number(d[0]),Number(d[1])]}}}});if(a.validator.autoCreateRanges){if(c.min&&c.max){c.range=[c.min,c.max];delete c.min;delete c.max}if(c.minlength&&c.maxlength){c.rangelength=[c.minlength,c.maxlength];delete c.minlength;delete c.maxlength}}return c},normalizeRule:function(c){if(typeof c==="string"){var b={};a.each(c.split(/\s/),function(){b[this]=true});c=b}return c},addMethod:function(b,d,c){a.validator.methods[b]=d;a.validator.messages[b]=c!==undefined?c:a.validator.messages[b];if(d.length<3){a.validator.addClassRules(b,a.validator.normalizeRule(b))}},methods:{required:function(c,b,e){if(!this.depend(e,b)){return"dependency-mismatch"}if(b.nodeName.toLowerCase()==="select"){var d=a(b).val();return d&&d.length>0}if(this.checkable(b)){return this.getLength(c,b)>0}return a.trim(c).length>0},email:function(c,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(c)},url:function(c,b){return this.optional(b)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(c)},date:function(c,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(c).toString())},dateISO:function(c,b){return this.optional(b)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(c)},number:function(c,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(c)},digits:function(c,b){return this.optional(b)||/^\d+$/.test(c)},creditcard:function(f,c){if(this.optional(c)){return"dependency-mismatch"}if(/[^0-9 \-]+/.test(f)){return false}var g=0,e=0,b=false;f=f.replace(/\D/g,"");for(var h=f.length-1;h>=0;h--){var d=f.charAt(h);e=parseInt(d,10);if(b){if((e*=2)>9){e-=9}}g+=e;b=!b}return(g%10)===0},minlength:function(d,b,e){var c=a.isArray(d)?d.length:this.getLength(a.trim(d),b);return this.optional(b)||c>=e},maxlength:function(d,b,e){var c=a.isArray(d)?d.length:this.getLength(a.trim(d),b);return this.optional(b)||c<=e},rangelength:function(d,b,e){var c=a.isArray(d)?d.length:this.getLength(a.trim(d),b);return this.optional(b)||(c>=e[0]&&c<=e[1])},min:function(c,b,d){return this.optional(b)||c>=d},max:function(c,b,d){return this.optional(b)||c<=d},range:function(c,b,d){return this.optional(b)||(c>=d[0]&&c<=d[1])},equalTo:function(c,b,e){var d=a(e);if(this.settings.onfocusout){d.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(b).valid()})}return c===d.val()},remote:function(f,c,g){if(this.optional(c)){return"dependency-mismatch"}var d=this.previousValue(c);if(!this.settings.messages[c.name]){this.settings.messages[c.name]={}}d.originalMessage=this.settings.messages[c.name].remote;this.settings.messages[c.name].remote=d.message;g=typeof g==="string"&&{url:g}||g;if(d.old===f){return d.valid}d.old=f;var b=this;this.startRequest(c);var e={};e[c.name]=f;a.ajax(a.extend(true,{url:g,mode:"abort",port:"validate"+c.name,dataType:"json",data:e,success:function(i){b.settings.messages[c.name].remote=d.originalMessage;var k=i===true||i==="true";if(k){var h=b.formSubmitted;b.prepareElement(c);b.formSubmitted=h;b.successList.push(c);delete b.invalid[c.name];b.showErrors()}else{var l={};var j=i||b.defaultMessage(c,"remote");l[c.name]=d.message=a.isFunction(j)?j(f):j;b.invalid[c.name]=true;b.showErrors(l)}d.valid=k;b.stopRequest(c,k)}},g));return"pending"}}});a.format=a.validator.format}(jQuery));(function(c){var a={};if(c.ajaxPrefilter){c.ajaxPrefilter(function(f,e,g){var d=f.port;if(f.mode==="abort"){if(a[d]){a[d].abort()}a[d]=g}})}else{var b=c.ajax;c.ajax=function(e){var f=("mode" in e?e:c.ajaxSettings).mode,d=("port" in e?e:c.ajaxSettings).port;if(f==="abort"){if(a[d]){a[d].abort()}a[d]=b.apply(this,arguments);return a[d]}return b.apply(this,arguments)}}}(jQuery));(function(a){a.extend(a.fn,{validateDelegate:function(d,c,b){return this.bind(c,function(e){var f=a(e.target);if(f.is(d)){return b.apply(f,arguments)}})}})}(jQuery)); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/additional-methods.js b/common/src/main/webapp/thirdparty/jquery-validation/js/additional-methods.js
new file mode 100644
index 0000000..7491439
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/additional-methods.js
@@ -0,0 +1,928 @@
+/*!
+ * jQuery Validation Plugin v1.13.0
+ *
+ * http://jqueryvalidation.org/
+ *
+ * Copyright (c) 2014 Jörn Zaefferer
+ * Released under the MIT license
+ */
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "./jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+(function() {
+
+ function stripHtml(value) {
+ // remove html tags and space chars
+ return value.replace(/<.[^<>]*?>/g, " ").replace(/&nbsp;|&#160;/gi, " ")
+ // remove punctuation
+ .replace(/[.(),;:!?%#$'\"_+=\/\-҉ۉ۪]*/g, "");
+ }
+
+ $.validator.addMethod("maxWords", function(value, element, params) {
+ return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length <= params;
+ }, $.validator.format("Please enter {0} words or less."));
+
+ $.validator.addMethod("minWords", function(value, element, params) {
+ return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
+ }, $.validator.format("Please enter at least {0} words."));
+
+ $.validator.addMethod("rangeWords", function(value, element, params) {
+ var valueStripped = stripHtml(value),
+ regex = /\b\w+\b/g;
+ return this.optional(element) || valueStripped.match(regex).length >= params[0] && valueStripped.match(regex).length <= params[1];
+ }, $.validator.format("Please enter between {0} and {1} words."));
+
+}());
+
+// Accept a value from a file input based on a required mimetype
+$.validator.addMethod("accept", function(value, element, param) {
+ // Split mime on commas in case we have multiple types we can accept
+ var typeParam = typeof param === "string" ? param.replace(/\s/g, "").replace(/,/g, "|") : "image/*",
+ optionalValue = this.optional(element),
+ i, file;
+
+ // Element is optional
+ if (optionalValue) {
+ return optionalValue;
+ }
+
+ if ($(element).attr("type") === "file") {
+ // If we are using a wildcard, make it regex friendly
+ typeParam = typeParam.replace(/\*/g, ".*");
+
+ // Check if the element has a FileList before checking each file
+ if (element.files && element.files.length) {
+ for (i = 0; i < element.files.length; i++) {
+ file = element.files[i];
+
+ // Grab the mimetype from the loaded file, verify it matches
+ if (!file.type.match(new RegExp( ".?(" + typeParam + ")$", "i"))) {
+ return false;
+ }
+ }
+ }
+ }
+
+ // Either return true because we've validated each file, or because the
+ // browser does not support element.files and the FileList feature
+ return true;
+}, $.validator.format("Please enter a value with a valid mimetype."));
+
+$.validator.addMethod("alphanumeric", function(value, element) {
+ return this.optional(element) || /^\w+$/i.test(value);
+}, "Letters, numbers, and underscores only please");
+
+/*
+ * Dutch bank account numbers (not 'giro' numbers) have 9 digits
+ * and pass the '11 check'.
+ * We accept the notation with spaces, as that is common.
+ * acceptable: 123456789 or 12 34 56 789
+ */
+$.validator.addMethod("bankaccountNL", function(value, element) {
+ if (this.optional(element)) {
+ return true;
+ }
+ if (!(/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(value))) {
+ return false;
+ }
+ // now '11 check'
+ var account = value.replace(/ /g, ""), // remove spaces
+ sum = 0,
+ len = account.length,
+ pos, factor, digit;
+ for ( pos = 0; pos < len; pos++ ) {
+ factor = len - pos;
+ digit = account.substring(pos, pos + 1);
+ sum = sum + factor * digit;
+ }
+ return sum % 11 === 0;
+}, "Please specify a valid bank account number");
+
+$.validator.addMethod("bankorgiroaccountNL", function(value, element) {
+ return this.optional(element) ||
+ ($.validator.methods.bankaccountNL.call(this, value, element)) ||
+ ($.validator.methods.giroaccountNL.call(this, value, element));
+}, "Please specify a valid bank or giro account number");
+
+/**
+ * BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
+ *
+ * BIC pattern: BBBBCCLLbbb (8 or 11 characters long; bbb is optional)
+ *
+ * BIC definition in detail:
+ * - First 4 characters - bank code (only letters)
+ * - Next 2 characters - ISO 3166-1 alpha-2 country code (only letters)
+ * - Next 2 characters - location code (letters and digits)
+ * a. shall not start with '0' or '1'
+ * b. second character must be a letter ('O' is not allowed) or one of the following digits ('0' for test (therefore not allowed), '1' for passive participant and '2' for active participant)
+ * - Last 3 characters - branch code, optional (shall not start with 'X' except in case of 'XXX' for primary office) (letters and digits)
+ */
+$.validator.addMethod("bic", function(value, element) {
+ return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value );
+}, "Please specify a valid BIC code");
+
+/*
+ * Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
+ * Further rules can be found in Spanish on http://es.wikipedia.org/wiki/C%C3%B3digo_de_identificaci%C3%B3n_fiscal
+ */
+$.validator.addMethod( "cifES", function( value ) {
+ "use strict";
+
+ var num = [],
+ controlDigit, sum, i, count, tmp, secondDigit;
+
+ value = value.toUpperCase();
+
+ // Quick format test
+ if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ return false;
+ }
+
+ for ( i = 0; i < 9; i++ ) {
+ num[ i ] = parseInt( value.charAt( i ), 10 );
+ }
+
+ // Algorithm for checking CIF codes
+ sum = num[ 2 ] + num[ 4 ] + num[ 6 ];
+ for ( count = 1; count < 8; count += 2 ) {
+ tmp = ( 2 * num[ count ] ).toString();
+ secondDigit = tmp.charAt( 1 );
+
+ sum += parseInt( tmp.charAt( 0 ), 10 ) + ( secondDigit === "" ? 0 : parseInt( secondDigit, 10 ) );
+ }
+
+ /* The first (position 1) is a letter following the following criteria:
+ * A. Corporations
+ * B. LLCs
+ * C. General partnerships
+ * D. Companies limited partnerships
+ * E. Communities of goods
+ * F. Cooperative Societies
+ * G. Associations
+ * H. Communities of homeowners in horizontal property regime
+ * J. Civil Societies
+ * K. Old format
+ * L. Old format
+ * M. Old format
+ * N. Nonresident entities
+ * P. Local authorities
+ * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
+ * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
+ * S. Organs of State Administration and regions
+ * V. Agrarian Transformation
+ * W. Permanent establishments of non-resident in Spain
+ */
+ if ( /^[ABCDEFGHJNPQRSUVW]{1}/.test( value ) ) {
+ sum += "";
+ controlDigit = 10 - parseInt( sum.charAt( sum.length - 1 ), 10 );
+ value += controlDigit;
+ return ( num[ 8 ].toString() === String.fromCharCode( 64 + controlDigit ) || num[ 8 ].toString() === value.charAt( value.length - 1 ) );
+ }
+
+ return false;
+
+}, "Please specify a valid CIF number." );
+
+/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
+ * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+ * Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
+ */
+$.validator.addMethod("creditcardtypes", function(value, element, param) {
+ if (/[^0-9\-]+/.test(value)) {
+ return false;
+ }
+
+ value = value.replace(/\D/g, "");
+
+ var validTypes = 0x0000;
+
+ if (param.mastercard) {
+ validTypes |= 0x0001;
+ }
+ if (param.visa) {
+ validTypes |= 0x0002;
+ }
+ if (param.amex) {
+ validTypes |= 0x0004;
+ }
+ if (param.dinersclub) {
+ validTypes |= 0x0008;
+ }
+ if (param.enroute) {
+ validTypes |= 0x0010;
+ }
+ if (param.discover) {
+ validTypes |= 0x0020;
+ }
+ if (param.jcb) {
+ validTypes |= 0x0040;
+ }
+ if (param.unknown) {
+ validTypes |= 0x0080;
+ }
+ if (param.all) {
+ validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
+ }
+ if (validTypes & 0x0001 && /^(5[12345])/.test(value)) { //mastercard
+ return value.length === 16;
+ }
+ if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
+ return value.length === 16;
+ }
+ if (validTypes & 0x0004 && /^(3[47])/.test(value)) { //amex
+ return value.length === 15;
+ }
+ if (validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test(value)) { //dinersclub
+ return value.length === 14;
+ }
+ if (validTypes & 0x0010 && /^(2(014|149))/.test(value)) { //enroute
+ return value.length === 15;
+ }
+ if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
+ return value.length === 16;
+ }
+ if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb
+ return value.length === 16;
+ }
+ if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb
+ return value.length === 15;
+ }
+ if (validTypes & 0x0080) { //unknown
+ return true;
+ }
+ return false;
+}, "Please enter a valid credit card number.");
+
+/**
+ * Validates currencies with any given symbols by @jameslouiz
+ * Symbols can be optional or required. Symbols required by default
+ *
+ * Usage examples:
+ * currency: ["£", false] - Use false for soft currency validation
+ * currency: ["$", false]
+ * currency: ["RM", false] - also works with text based symbols such as "RM" - Malaysia Ringgit etc
+ *
+ * <input class="currencyInput" name="currencyInput">
+ *
+ * Soft symbol checking
+ * currencyInput: {
+ * currency: ["$", false]
+ * }
+ *
+ * Strict symbol checking (default)
+ * currencyInput: {
+ * currency: "$"
+ * //OR
+ * currency: ["$", true]
+ * }
+ *
+ * Multiple Symbols
+ * currencyInput: {
+ * currency: "$,£,¢"
+ * }
+ */
+$.validator.addMethod("currency", function(value, element, param) {
+ var isParamString = typeof param === "string",
+ symbol = isParamString ? param : param[0],
+ soft = isParamString ? true : param[1],
+ regex;
+
+ symbol = symbol.replace(/,/g, "");
+ symbol = soft ? symbol + "]" : symbol + "]?";
+ regex = "^[" + symbol + "([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$";
+ regex = new RegExp(regex);
+ return this.optional(element) || regex.test(value);
+
+}, "Please specify a valid currency");
+
+$.validator.addMethod("dateFA", function(value, element) {
+ return this.optional(element) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(value);
+}, "Please enter a correct date");
+
+/**
+ * Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
+ *
+ * @example $.validator.methods.date("01/01/1900")
+ * @result true
+ *
+ * @example $.validator.methods.date("01/13/1990")
+ * @result false
+ *
+ * @example $.validator.methods.date("01.01.1900")
+ * @result false
+ *
+ * @example <input name="pippo" class="{dateITA:true}" />
+ * @desc Declares an optional input element whose value must be a valid date.
+ *
+ * @name $.validator.methods.dateITA
+ * @type Boolean
+ * @cat Plugins/Validate/Methods
+ */
+$.validator.addMethod("dateITA", function(value, element) {
+ var check = false,
+ re = /^\d{1,2}\/\d{1,2}\/\d{4}$/,
+ adata, gg, mm, aaaa, xdata;
+ if ( re.test(value)) {
+ adata = value.split("/");
+ gg = parseInt(adata[0], 10);
+ mm = parseInt(adata[1], 10);
+ aaaa = parseInt(adata[2], 10);
+ xdata = new Date(aaaa, mm - 1, gg, 12, 0, 0, 0);
+ if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth () === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
+ check = true;
+ } else {
+ check = false;
+ }
+ } else {
+ check = false;
+ }
+ return this.optional(element) || check;
+}, "Please enter a correct date");
+
+$.validator.addMethod("dateNL", function(value, element) {
+ return this.optional(element) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(value);
+}, "Please enter a correct date");
+
+// Older "accept" file extension method. Old docs: http://docs.jquery.com/Plugins/Validation/Methods/accept
+$.validator.addMethod("extension", function(value, element, param) {
+ param = typeof param === "string" ? param.replace(/,/g, "|") : "png|jpe?g|gif";
+ return this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i"));
+}, $.validator.format("Please enter a value with a valid extension."));
+
+/**
+ * Dutch giro account numbers (not bank numbers) have max 7 digits
+ */
+$.validator.addMethod("giroaccountNL", function(value, element) {
+ return this.optional(element) || /^[0-9]{1,7}$/.test(value);
+}, "Please specify a valid giro account number");
+
+/**
+ * IBAN is the international bank account number.
+ * It has a country - specific format, that is checked here too
+ */
+$.validator.addMethod("iban", function(value, element) {
+ // some quick simple tests to prevent needless work
+ if (this.optional(element)) {
+ return true;
+ }
+
+ // remove spaces and to upper case
+ var iban = value.replace(/ /g, "").toUpperCase(),
+ ibancheckdigits = "",
+ leadingZeroes = true,
+ cRest = "",
+ cOperator = "",
+ countrycode, ibancheck, charAt, cChar, bbanpattern, bbancountrypatterns, ibanregexp, i, p;
+
+ if (!(/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(iban))) {
+ return false;
+ }
+
+ // check the country code and find the country specific format
+ countrycode = iban.substring(0, 2);
+ bbancountrypatterns = {
+ "AL": "\\d{8}[\\dA-Z]{16}",
+ "AD": "\\d{8}[\\dA-Z]{12}",
+ "AT": "\\d{16}",
+ "AZ": "[\\dA-Z]{4}\\d{20}",
+ "BE": "\\d{12}",
+ "BH": "[A-Z]{4}[\\dA-Z]{14}",
+ "BA": "\\d{16}",
+ "BR": "\\d{23}[A-Z][\\dA-Z]",
+ "BG": "[A-Z]{4}\\d{6}[\\dA-Z]{8}",
+ "CR": "\\d{17}",
+ "HR": "\\d{17}",
+ "CY": "\\d{8}[\\dA-Z]{16}",
+ "CZ": "\\d{20}",
+ "DK": "\\d{14}",
+ "DO": "[A-Z]{4}\\d{20}",
+ "EE": "\\d{16}",
+ "FO": "\\d{14}",
+ "FI": "\\d{14}",
+ "FR": "\\d{10}[\\dA-Z]{11}\\d{2}",
+ "GE": "[\\dA-Z]{2}\\d{16}",
+ "DE": "\\d{18}",
+ "GI": "[A-Z]{4}[\\dA-Z]{15}",
+ "GR": "\\d{7}[\\dA-Z]{16}",
+ "GL": "\\d{14}",
+ "GT": "[\\dA-Z]{4}[\\dA-Z]{20}",
+ "HU": "\\d{24}",
+ "IS": "\\d{22}",
+ "IE": "[\\dA-Z]{4}\\d{14}",
+ "IL": "\\d{19}",
+ "IT": "[A-Z]\\d{10}[\\dA-Z]{12}",
+ "KZ": "\\d{3}[\\dA-Z]{13}",
+ "KW": "[A-Z]{4}[\\dA-Z]{22}",
+ "LV": "[A-Z]{4}[\\dA-Z]{13}",
+ "LB": "\\d{4}[\\dA-Z]{20}",
+ "LI": "\\d{5}[\\dA-Z]{12}",
+ "LT": "\\d{16}",
+ "LU": "\\d{3}[\\dA-Z]{13}",
+ "MK": "\\d{3}[\\dA-Z]{10}\\d{2}",
+ "MT": "[A-Z]{4}\\d{5}[\\dA-Z]{18}",
+ "MR": "\\d{23}",
+ "MU": "[A-Z]{4}\\d{19}[A-Z]{3}",
+ "MC": "\\d{10}[\\dA-Z]{11}\\d{2}",
+ "MD": "[\\dA-Z]{2}\\d{18}",
+ "ME": "\\d{18}",
+ "NL": "[A-Z]{4}\\d{10}",
+ "NO": "\\d{11}",
+ "PK": "[\\dA-Z]{4}\\d{16}",
+ "PS": "[\\dA-Z]{4}\\d{21}",
+ "PL": "\\d{24}",
+ "PT": "\\d{21}",
+ "RO": "[A-Z]{4}[\\dA-Z]{16}",
+ "SM": "[A-Z]\\d{10}[\\dA-Z]{12}",
+ "SA": "\\d{2}[\\dA-Z]{18}",
+ "RS": "\\d{18}",
+ "SK": "\\d{20}",
+ "SI": "\\d{15}",
+ "ES": "\\d{20}",
+ "SE": "\\d{20}",
+ "CH": "\\d{5}[\\dA-Z]{12}",
+ "TN": "\\d{20}",
+ "TR": "\\d{5}[\\dA-Z]{17}",
+ "AE": "\\d{3}\\d{16}",
+ "GB": "[A-Z]{4}\\d{14}",
+ "VG": "[\\dA-Z]{4}\\d{16}"
+ };
+
+ bbanpattern = bbancountrypatterns[countrycode];
+ // As new countries will start using IBAN in the
+ // future, we only check if the countrycode is known.
+ // This prevents false negatives, while almost all
+ // false positives introduced by this, will be caught
+ // by the checksum validation below anyway.
+ // Strict checking should return FALSE for unknown
+ // countries.
+ if (typeof bbanpattern !== "undefined") {
+ ibanregexp = new RegExp("^[A-Z]{2}\\d{2}" + bbanpattern + "$", "");
+ if (!(ibanregexp.test(iban))) {
+ return false; // invalid country specific format
+ }
+ }
+
+ // now check the checksum, first convert to digits
+ ibancheck = iban.substring(4, iban.length) + iban.substring(0, 4);
+ for (i = 0; i < ibancheck.length; i++) {
+ charAt = ibancheck.charAt(i);
+ if (charAt !== "0") {
+ leadingZeroes = false;
+ }
+ if (!leadingZeroes) {
+ ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);
+ }
+ }
+
+ // calculate the result of: ibancheckdigits % 97
+ for (p = 0; p < ibancheckdigits.length; p++) {
+ cChar = ibancheckdigits.charAt(p);
+ cOperator = "" + cRest + "" + cChar;
+ cRest = cOperator % 97;
+ }
+ return cRest === 1;
+}, "Please specify a valid IBAN");
+
+$.validator.addMethod("integer", function(value, element) {
+ return this.optional(element) || /^-?\d+$/.test(value);
+}, "A positive or negative non-decimal number please");
+
+$.validator.addMethod("ipv4", function(value, element) {
+ return this.optional(element) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(value);
+}, "Please enter a valid IP v4 address.");
+
+$.validator.addMethod("ipv6", function(value, element) {
+ return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
+}, "Please enter a valid IP v6 address.");
+
+$.validator.addMethod("lettersonly", function(value, element) {
+ return this.optional(element) || /^[a-z]+$/i.test(value);
+}, "Letters only please");
+
+$.validator.addMethod("letterswithbasicpunc", function(value, element) {
+ return this.optional(element) || /^[a-z\-.,()'"\s]+$/i.test(value);
+}, "Letters or punctuation only please");
+
+$.validator.addMethod("mobileNL", function(value, element) {
+ return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
+}, "Please specify a valid mobile number");
+
+/* For UK phone functions, do the following server side processing:
+ * Compare original input with this RegEx pattern:
+ * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
+ * Extract $1 and set $prefix to '+44<space>' if $1 is '44', otherwise set $prefix to '0'
+ * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
+ * A number of very detailed GB telephone number RegEx patterns can also be found at:
+ * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
+ */
+$.validator.addMethod("mobileUK", function(phone_number, element) {
+ phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
+ return this.optional(element) || phone_number.length > 9 &&
+ phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/);
+}, "Please specify a valid mobile number");
+
+/*
+ * The número de identidad de extranjero ( NIE )is a code used to identify the non-nationals in Spain
+ */
+$.validator.addMethod( "nieES", function( value ) {
+ "use strict";
+
+ value = value.toUpperCase();
+
+ // Basic format test
+ if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ return false;
+ }
+
+ // Test NIE
+ //T
+ if ( /^[T]{1}/.test( value ) ) {
+ return ( value[ 8 ] === /^[T]{1}[A-Z0-9]{8}$/.test( value ) );
+ }
+
+ //XYZ
+ if ( /^[XYZ]{1}/.test( value ) ) {
+ return (
+ value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt(
+ value.replace( "X", "0" )
+ .replace( "Y", "1" )
+ .replace( "Z", "2" )
+ .substring( 0, 8 ) % 23
+ )
+ );
+ }
+
+ return false;
+
+}, "Please specify a valid NIE number." );
+
+/*
+ * The Número de Identificación Fiscal ( NIF ) is the way tax identification used in Spain for individuals
+ */
+$.validator.addMethod( "nifES", function( value ) {
+ "use strict";
+
+ value = value.toUpperCase();
+
+ // Basic format test
+ if ( !value.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)") ) {
+ return false;
+ }
+
+ // Test NIF
+ if ( /^[0-9]{8}[A-Z]{1}$/.test( value ) ) {
+ return ( "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 0 ) % 23 ) === value.charAt( 8 ) );
+ }
+ // Test specials NIF (starts with K, L or M)
+ if ( /^[KLM]{1}/.test( value ) ) {
+ return ( value[ 8 ] === String.fromCharCode( 64 ) );
+ }
+
+ return false;
+
+}, "Please specify a valid NIF number." );
+
+$.validator.addMethod("nowhitespace", function(value, element) {
+ return this.optional(element) || /^\S+$/i.test(value);
+}, "No white space please");
+
+/**
+* Return true if the field value matches the given format RegExp
+*
+* @example $.validator.methods.pattern("AR1004",element,/^AR\d{4}$/)
+* @result true
+*
+* @example $.validator.methods.pattern("BR1004",element,/^AR\d{4}$/)
+* @result false
+*
+* @name $.validator.methods.pattern
+* @type Boolean
+* @cat Plugins/Validate/Methods
+*/
+$.validator.addMethod("pattern", function(value, element, param) {
+ if (this.optional(element)) {
+ return true;
+ }
+ if (typeof param === "string") {
+ param = new RegExp(param);
+ }
+ return param.test(value);
+}, "Invalid format.");
+
+/**
+ * Dutch phone numbers have 10 digits (or 11 and start with +31).
+ */
+$.validator.addMethod("phoneNL", function(value, element) {
+ return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
+}, "Please specify a valid phone number.");
+
+/* For UK phone functions, do the following server side processing:
+ * Compare original input with this RegEx pattern:
+ * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
+ * Extract $1 and set $prefix to '+44<space>' if $1 is '44', otherwise set $prefix to '0'
+ * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
+ * A number of very detailed GB telephone number RegEx patterns can also be found at:
+ * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
+ */
+$.validator.addMethod("phoneUK", function(phone_number, element) {
+ phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
+ return this.optional(element) || phone_number.length > 9 &&
+ phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/);
+}, "Please specify a valid phone number");
+
+/**
+ * matches US phone number format
+ *
+ * where the area code may not start with 1 and the prefix may not start with 1
+ * allows '-' or ' ' as a separator and allows parens around area code
+ * some people may want to put a '1' in front of their number
+ *
+ * 1(212)-999-2345 or
+ * 212 999 2344 or
+ * 212-999-0983
+ *
+ * but not
+ * 111-123-5434
+ * and not
+ * 212 123 4567
+ */
+$.validator.addMethod("phoneUS", function(phone_number, element) {
+ phone_number = phone_number.replace(/\s+/g, "");
+ return this.optional(element) || phone_number.length > 9 &&
+ phone_number.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/);
+}, "Please specify a valid phone number");
+
+/* For UK phone functions, do the following server side processing:
+ * Compare original input with this RegEx pattern:
+ * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
+ * Extract $1 and set $prefix to '+44<space>' if $1 is '44', otherwise set $prefix to '0'
+ * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
+ * A number of very detailed GB telephone number RegEx patterns can also be found at:
+ * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
+ */
+//Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
+$.validator.addMethod("phonesUK", function(phone_number, element) {
+ phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
+ return this.optional(element) || phone_number.length > 9 &&
+ phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/);
+}, "Please specify a valid uk phone number");
+
+/**
+ * Matches a valid Canadian Postal Code
+ *
+ * @example jQuery.validator.methods.postalCodeCA( "H0H 0H0", element )
+ * @result true
+ *
+ * @example jQuery.validator.methods.postalCodeCA( "H0H0H0", element )
+ * @result false
+ *
+ * @name jQuery.validator.methods.postalCodeCA
+ * @type Boolean
+ * @cat Plugins/Validate/Methods
+ */
+$.validator.addMethod( "postalCodeCA", function( value, element ) {
+ return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test( value );
+}, "Please specify a valid postal code" );
+
+/* Matches Italian postcode (CAP) */
+$.validator.addMethod("postalcodeIT", function(value, element) {
+ return this.optional(element) || /^\d{5}$/.test(value);
+}, "Please specify a valid postal code");
+
+$.validator.addMethod("postalcodeNL", function(value, element) {
+ return this.optional(element) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(value);
+}, "Please specify a valid postal code");
+
+// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
+$.validator.addMethod("postcodeUK", function(value, element) {
+ return this.optional(element) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(value);
+}, "Please specify a valid UK postcode");
+
+/*
+ * Lets you say "at least X inputs that match selector Y must be filled."
+ *
+ * The end result is that neither of these inputs:
+ *
+ * <input class="productinfo" name="partnumber">
+ * <input class="productinfo" name="description">
+ *
+ * ...will validate unless at least one of them is filled.
+ *
+ * partnumber: {require_from_group: [1,".productinfo"]},
+ * description: {require_from_group: [1,".productinfo"]}
+ *
+ * options[0]: number of fields that must be filled in the group
+ * options[1]: CSS selector that defines the group of conditionally required fields
+ */
+$.validator.addMethod("require_from_group", function(value, element, options) {
+ var $fields = $(options[1], element.form),
+ $fieldsFirst = $fields.eq(0),
+ validator = $fieldsFirst.data("valid_req_grp") ? $fieldsFirst.data("valid_req_grp") : $.extend({}, this),
+ isValid = $fields.filter(function() {
+ return validator.elementValue(this);
+ }).length >= options[0];
+
+ // Store the cloned validator for future validation
+ $fieldsFirst.data("valid_req_grp", validator);
+
+ // If element isn't being validated, run each require_from_group field's validation rules
+ if (!$(element).data("being_validated")) {
+ $fields.data("being_validated", true);
+ $fields.each(function() {
+ validator.element(this);
+ });
+ $fields.data("being_validated", false);
+ }
+ return isValid;
+}, $.validator.format("Please fill at least {0} of these fields."));
+
+/*
+ * Lets you say "either at least X inputs that match selector Y must be filled,
+ * OR they must all be skipped (left blank)."
+ *
+ * The end result, is that none of these inputs:
+ *
+ * <input class="productinfo" name="partnumber">
+ * <input class="productinfo" name="description">
+ * <input class="productinfo" name="color">
+ *
+ * ...will validate unless either at least two of them are filled,
+ * OR none of them are.
+ *
+ * partnumber: {skip_or_fill_minimum: [2,".productinfo"]},
+ * description: {skip_or_fill_minimum: [2,".productinfo"]},
+ * color: {skip_or_fill_minimum: [2,".productinfo"]}
+ *
+ * options[0]: number of fields that must be filled in the group
+ * options[1]: CSS selector that defines the group of conditionally required fields
+ *
+ */
+$.validator.addMethod("skip_or_fill_minimum", function(value, element, options) {
+ var $fields = $(options[1], element.form),
+ $fieldsFirst = $fields.eq(0),
+ validator = $fieldsFirst.data("valid_skip") ? $fieldsFirst.data("valid_skip") : $.extend({}, this),
+ numberFilled = $fields.filter(function() {
+ return validator.elementValue(this);
+ }).length,
+ isValid = numberFilled === 0 || numberFilled >= options[0];
+
+ // Store the cloned validator for future validation
+ $fieldsFirst.data("valid_skip", validator);
+
+ // If element isn't being validated, run each skip_or_fill_minimum field's validation rules
+ if (!$(element).data("being_validated")) {
+ $fields.data("being_validated", true);
+ $fields.each(function() {
+ validator.element(this);
+ });
+ $fields.data("being_validated", false);
+ }
+ return isValid;
+}, $.validator.format("Please either skip these fields or fill at least {0} of them."));
+
+/* Validates US States and/or Territories by @jdforsythe
+ * Can be case insensitive or require capitalization - default is case insensitive
+ * Can include US Territories or not - default does not
+ * Can include US Military postal abbreviations (AA, AE, AP) - default does not
+ *
+ * Note: "States" always includes DC (District of Colombia)
+ *
+ * Usage examples:
+ *
+ * This is the default - case insensitive, no territories, no military zones
+ * stateInput: {
+ * caseSensitive: false,
+ * includeTerritories: false,
+ * includeMilitary: false
+ * }
+ *
+ * Only allow capital letters, no territories, no military zones
+ * stateInput: {
+ * caseSensitive: false
+ * }
+ *
+ * Case insensitive, include territories but not military zones
+ * stateInput: {
+ * includeTerritories: true
+ * }
+ *
+ * Only allow capital letters, include territories and military zones
+ * stateInput: {
+ * caseSensitive: true,
+ * includeTerritories: true,
+ * includeMilitary: true
+ * }
+ *
+ *
+ *
+ */
+
+jQuery.validator.addMethod("stateUS", function(value, element, options) {
+ var isDefault = typeof options === "undefined",
+ caseSensitive = ( isDefault || typeof options.caseSensitive === "undefined" ) ? false : options.caseSensitive,
+ includeTerritories = ( isDefault || typeof options.includeTerritories === "undefined" ) ? false : options.includeTerritories,
+ includeMilitary = ( isDefault || typeof options.includeMilitary === "undefined" ) ? false : options.includeMilitary,
+ regex;
+
+ if (!includeTerritories && !includeMilitary) {
+ regex = "^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
+ } else if (includeTerritories && includeMilitary) {
+ regex = "^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
+ } else if (includeTerritories) {
+ regex = "^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
+ } else {
+ regex = "^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
+ }
+
+ regex = caseSensitive ? new RegExp(regex) : new RegExp(regex, "i");
+ return this.optional(element) || regex.test(value);
+},
+"Please specify a valid state");
+
+// TODO check if value starts with <, otherwise don't try stripping anything
+$.validator.addMethod("strippedminlength", function(value, element, param) {
+ return $(value).text().length >= param;
+}, $.validator.format("Please enter at least {0} characters"));
+
+$.validator.addMethod("time", function(value, element) {
+ return this.optional(element) || /^([01]\d|2[0-3])(:[0-5]\d){1,2}$/.test(value);
+}, "Please enter a valid time, between 00:00 and 23:59");
+
+$.validator.addMethod("time12h", function(value, element) {
+ return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(value);
+}, "Please enter a valid time in 12-hour am/pm format");
+
+// same as url, but TLD is optional
+$.validator.addMethod("url2", function(value, element) {
+ return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
+}, $.validator.messages.url);
+
+/**
+ * Return true, if the value is a valid vehicle identification number (VIN).
+ *
+ * Works with all kind of text inputs.
+ *
+ * @example <input type="text" size="20" name="VehicleID" class="{required:true,vinUS:true}" />
+ * @desc Declares a required input element whose value must be a valid vehicle identification number.
+ *
+ * @name $.validator.methods.vinUS
+ * @type Boolean
+ * @cat Plugins/Validate/Methods
+ */
+$.validator.addMethod("vinUS", function(v) {
+ if (v.length !== 17) {
+ return false;
+ }
+
+ var LL = [ "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" ],
+ VL = [ 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 7, 9, 2, 3, 4, 5, 6, 7, 8, 9 ],
+ FL = [ 8, 7, 6, 5, 4, 3, 2, 10, 0, 9, 8, 7, 6, 5, 4, 3, 2 ],
+ rs = 0,
+ i, n, d, f, cd, cdv;
+
+ for (i = 0; i < 17; i++) {
+ f = FL[i];
+ d = v.slice(i, i + 1);
+ if (i === 8) {
+ cdv = d;
+ }
+ if (!isNaN(d)) {
+ d *= f;
+ } else {
+ for (n = 0; n < LL.length; n++) {
+ if (d.toUpperCase() === LL[n]) {
+ d = VL[n];
+ d *= f;
+ if (isNaN(cdv) && n === 8) {
+ cdv = LL[n];
+ }
+ break;
+ }
+ }
+ }
+ rs += d;
+ }
+ cd = rs % 11;
+ if (cd === 10) {
+ cd = "X";
+ }
+ if (cd === cdv) {
+ return true;
+ }
+ return false;
+}, "The specified vehicle identification number (VIN) is invalid.");
+
+$.validator.addMethod("zipcodeUS", function(value, element) {
+ return this.optional(element) || /^\d{5}(-\d{4})?$/.test(value);
+}, "The specified US ZIP Code is invalid");
+
+$.validator.addMethod("ziprange", function(value, element) {
+ return this.optional(element) || /^90[2-5]\d\{2\}-\d{4}$/.test(value);
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx");
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/additional-methods.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/additional-methods.min.js
new file mode 100644
index 0000000..841358f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/additional-methods.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],a):a(jQuery)}(function(a){!function(){function b(a){return a.replace(/<.[^<>]*?>/g," ").replace(/&nbsp;|&#160;/gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-҉ۉ۪]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("accept",function(b,c,d){var e,f,g="string"==typeof d?d.replace(/\s/g,"").replace(/,/g,"|"):"image/*",h=this.optional(c);if(h)return h;if("file"===a(c).attr("type")&&(g=g.replace(/\*/g,".*"),c.files&&c.files.length))for(e=0;e<c.files.length;e++)if(f=c.files[e],!f.type.match(new RegExp(".?("+g+")$","i")))return!1;return!0},a.validator.format("Please enter a value with a valid mimetype.")),a.validator.addMethod("alphanumeric",function(a,b){return this.optional(b)||/^\w+$/i.test(a)},"Letters, numbers, and underscores only please"),a.validator.addMethod("bankaccountNL",function(a,b){if(this.optional(b))return!0;if(!/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(a))return!1;var c,d,e,f=a.replace(/ /g,""),g=0,h=f.length;for(c=0;h>c;c++)d=h-c,e=f.substring(c,c+1),g+=d*e;return g%11===0},"Please specify a valid bank account number"),a.validator.addMethod("bankorgiroaccountNL",function(b,c){return this.optional(c)||a.validator.methods.bankaccountNL.call(this,b,c)||a.validator.methods.giroaccountNL.call(this,b,c)},"Please specify a valid bank or giro account number"),a.validator.addMethod("bic",function(a,b){return this.optional(b)||/^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test(a)},"Please specify a valid BIC code"),a.validator.addMethod("cifES",function(a){"use strict";var b,c,d,e,f,g,h=[];if(a=a.toUpperCase(),!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)"))return!1;for(d=0;9>d;d++)h[d]=parseInt(a.charAt(d),10);for(c=h[2]+h[4]+h[6],e=1;8>e;e+=2)f=(2*h[e]).toString(),g=f.charAt(1),c+=parseInt(f.charAt(0),10)+(""===g?0:parseInt(g,10));return/^[ABCDEFGHJNPQRSUVW]{1}/.test(a)?(c+="",b=10-parseInt(c.charAt(c.length-1),10),a+=b,h[8].toString()===String.fromCharCode(64+b)||h[8].toString()===a.charAt(a.length-1)):!1},"Please specify a valid CIF number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&/^(5[12345])/.test(a)?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:128&d?!0:!1},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=e?!0:c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency"),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},"Please enter a correct date"),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(f,e-1,d,12,0,0,0),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d?!0:!1):h=!1,this.optional(b)||h},"Please enter a correct date"),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},"Please enter a correct date"),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp(".("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number"),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="";if(!/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(l))return!1;if(c=l.substring(0,2),h={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-Z]{16}",CZ:"\\d{20}",DK:"\\d{14}",DO:"[A-Z]{4}\\d{20}",EE:"\\d{16}",FO:"\\d{14}",FI:"\\d{14}",FR:"\\d{10}[\\dA-Z]{11}\\d{2}",GE:"[\\dA-Z]{2}\\d{16}",DE:"\\d{18}",GI:"[A-Z]{4}[\\dA-Z]{15}",GR:"\\d{7}[\\dA-Z]{16}",GL:"\\d{14}",GT:"[\\dA-Z]{4}[\\dA-Z]{20}",HU:"\\d{24}",IS:"\\d{22}",IE:"[\\dA-Z]{4}\\d{14}",IL:"\\d{19}",IT:"[A-Z]\\d{10}[\\dA-Z]{12}",KZ:"\\d{3}[\\dA-Z]{13}",KW:"[A-Z]{4}[\\dA-Z]{22}",LV:"[A-Z]{4}[\\dA-Z]{13}",LB:"\\d{4}[\\dA-Z]{20}",LI:"\\d{5}[\\dA-Z]{12}",LT:"\\d{16}",LU:"\\d{3}[\\dA-Z]{13}",MK:"\\d{3}[\\dA-Z]{10}\\d{2}",MT:"[A-Z]{4}\\d{5}[\\dA-Z]{18}",MR:"\\d{23}",MU:"[A-Z]{4}\\d{19}[A-Z]{3}",MC:"\\d{10}[\\dA-Z]{11}\\d{2}",MD:"[\\dA-Z]{2}\\d{18}",ME:"\\d{18}",NL:"[A-Z]{4}\\d{10}",NO:"\\d{11}",PK:"[\\dA-Z]{4}\\d{16}",PS:"[\\dA-Z]{4}\\d{21}",PL:"\\d{24}",PT:"\\d{21}",RO:"[A-Z]{4}[\\dA-Z]{16}",SM:"[A-Z]\\d{10}[\\dA-Z]{12}",SA:"\\d{2}[\\dA-Z]{18}",RS:"\\d{18}",SK:"\\d{20}",SI:"\\d{15}",ES:"\\d{20}",SE:"\\d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"},g=h[c],"undefined"!=typeof g&&(i=new RegExp("^[A-Z]{2}\\d{2}"+g+"$",""),!i.test(l)))return!1;for(d=l.substring(4,l.length)+l.substring(0,4),j=0;j<d.length;j++)e=d.charAt(j),"0"!==e&&(n=!1),n||(m+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(e));for(k=0;k<m.length;k++)f=m.charAt(k),p=""+o+f,o=p%97;return 1===o},"Please specify a valid IBAN"),a.validator.addMethod("integer",function(a,b){return this.optional(b)||/^-?\d+$/.test(a)},"A positive or negative non-decimal number please"),a.validator.addMethod("ipv4",function(a,b){return this.optional(b)||/^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(a)},"Please enter a valid IP v4 address."),a.validator.addMethod("ipv6",function(a,b){return this.optional(b)||/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(a)},"Please enter a valid IP v6 address."),a.validator.addMethod("lettersonly",function(a,b){return this.optional(b)||/^[a-z]+$/i.test(a)},"Letters only please"),a.validator.addMethod("letterswithbasicpunc",function(a,b){return this.optional(b)||/^[a-z\-.,()'"\s]+$/i.test(a)},"Letters or punctuation only please"),a.validator.addMethod("mobileNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid mobile number"),a.validator.addMethod("mobileUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),a.validator.addMethod("nieES",function(a){"use strict";return a=a.toUpperCase(),a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[T]{1}/.test(a)?a[8]===/^[T]{1}[A-Z0-9]{8}$/.test(a):/^[XYZ]{1}/.test(a)?a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.replace("X","0").replace("Y","1").replace("Z","2").substring(0,8)%23):!1:!1},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a){"use strict";return a=a.toUpperCase(),a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):/^[KLM]{1}/.test(a)?a[8]===String.fromCharCode(64):!1:!1},"Please specify a valid NIF number."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please"),a.validator.addMethod("pattern",function(a,b,c){return this.optional(b)?!0:("string"==typeof c&&(c=new RegExp(c)),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode"),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),jQuery.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=e||"undefined"==typeof c.caseSensitive?!1:c.caseSensitive,g=e||"undefined"==typeof c.includeTerritories?!1:c.includeTerritories,h=e||"undefined"==typeof c.includeMilitary?!1:c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state"),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59"),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format"),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;17>b;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c<h.length;c++)if(d.toUpperCase()===h[c]){d=i[c],d*=e,isNaN(g)&&8===c&&(g=h[c]);break}}else d*=e;k+=d}return f=k%11,10===f&&(f="X"),f===g?!0:!1},"The specified vehicle identification number (VIN) is invalid."),a.validator.addMethod("zipcodeUS",function(a,b){return this.optional(b)||/^\d{5}(-\d{4})?$/.test(a)},"The specified US ZIP Code is invalid"),a.validator.addMethod("ziprange",function(a,b){return this.optional(b)||/^90[2-5]\d\{2\}-\d{4}$/.test(a)},"Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx")}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/jquery.validate.js b/common/src/main/webapp/thirdparty/jquery-validation/js/jquery.validate.js
new file mode 100644
index 0000000..3b6c812
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/jquery.validate.js
@@ -0,0 +1,1357 @@
+/*!
+ * jQuery Validation Plugin v1.13.0
+ *
+ * http://jqueryvalidation.org/
+ *
+ * Copyright (c) 2014 Jörn Zaefferer
+ * Released under the MIT license
+ */
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+$.extend($.fn, {
+ // http://jqueryvalidation.org/validate/
+ validate: function( options ) {
+
+ // if nothing is selected, return nothing; can't chain anyway
+ if ( !this.length ) {
+ if ( options && options.debug && window.console ) {
+ console.warn( "Nothing selected, can't validate, returning nothing." );
+ }
+ return;
+ }
+
+ // check if a validator for this form was already created
+ var validator = $.data( this[ 0 ], "validator" );
+ if ( validator ) {
+ return validator;
+ }
+
+ // Add novalidate tag if HTML5.
+ this.attr( "novalidate", "novalidate" );
+
+ validator = new $.validator( options, this[ 0 ] );
+ $.data( this[ 0 ], "validator", validator );
+
+ if ( validator.settings.onsubmit ) {
+
+ this.validateDelegate( ":submit", "click", function( event ) {
+ if ( validator.settings.submitHandler ) {
+ validator.submitButton = event.target;
+ }
+ // allow suppressing validation by adding a cancel class to the submit button
+ if ( $( event.target ).hasClass( "cancel" ) ) {
+ validator.cancelSubmit = true;
+ }
+
+ // allow suppressing validation by adding the html5 formnovalidate attribute to the submit button
+ if ( $( event.target ).attr( "formnovalidate" ) !== undefined ) {
+ validator.cancelSubmit = true;
+ }
+ });
+
+ // validate the form on submit
+ this.submit( function( event ) {
+ if ( validator.settings.debug ) {
+ // prevent form submit to be able to see console output
+ event.preventDefault();
+ }
+ function handle() {
+ var hidden;
+ if ( validator.settings.submitHandler ) {
+ if ( validator.submitButton ) {
+ // insert a hidden input as a replacement for the missing submit button
+ hidden = $( "<input type='hidden'/>" )
+ .attr( "name", validator.submitButton.name )
+ .val( $( validator.submitButton ).val() )
+ .appendTo( validator.currentForm );
+ }
+ validator.settings.submitHandler.call( validator, validator.currentForm, event );
+ if ( validator.submitButton ) {
+ // and clean up afterwards; thanks to no-block-scope, hidden can be referenced
+ hidden.remove();
+ }
+ return false;
+ }
+ return true;
+ }
+
+ // prevent submit for invalid forms or custom submit handlers
+ if ( validator.cancelSubmit ) {
+ validator.cancelSubmit = false;
+ return handle();
+ }
+ if ( validator.form() ) {
+ if ( validator.pendingRequest ) {
+ validator.formSubmitted = true;
+ return false;
+ }
+ return handle();
+ } else {
+ validator.focusInvalid();
+ return false;
+ }
+ });
+ }
+
+ return validator;
+ },
+ // http://jqueryvalidation.org/valid/
+ valid: function() {
+ var valid, validator;
+
+ if ( $( this[ 0 ] ).is( "form" ) ) {
+ valid = this.validate().form();
+ } else {
+ valid = true;
+ validator = $( this[ 0 ].form ).validate();
+ this.each( function() {
+ valid = validator.element( this ) && valid;
+ });
+ }
+ return valid;
+ },
+ // attributes: space separated list of attributes to retrieve and remove
+ removeAttrs: function( attributes ) {
+ var result = {},
+ $element = this;
+ $.each( attributes.split( /\s/ ), function( index, value ) {
+ result[ value ] = $element.attr( value );
+ $element.removeAttr( value );
+ });
+ return result;
+ },
+ // http://jqueryvalidation.org/rules/
+ rules: function( command, argument ) {
+ var element = this[ 0 ],
+ settings, staticRules, existingRules, data, param, filtered;
+
+ if ( command ) {
+ settings = $.data( element.form, "validator" ).settings;
+ staticRules = settings.rules;
+ existingRules = $.validator.staticRules( element );
+ switch ( command ) {
+ case "add":
+ $.extend( existingRules, $.validator.normalizeRule( argument ) );
+ // remove messages from rules, but allow them to be set separately
+ delete existingRules.messages;
+ staticRules[ element.name ] = existingRules;
+ if ( argument.messages ) {
+ settings.messages[ element.name ] = $.extend( settings.messages[ element.name ], argument.messages );
+ }
+ break;
+ case "remove":
+ if ( !argument ) {
+ delete staticRules[ element.name ];
+ return existingRules;
+ }
+ filtered = {};
+ $.each( argument.split( /\s/ ), function( index, method ) {
+ filtered[ method ] = existingRules[ method ];
+ delete existingRules[ method ];
+ if ( method === "required" ) {
+ $( element ).removeAttr( "aria-required" );
+ }
+ });
+ return filtered;
+ }
+ }
+
+ data = $.validator.normalizeRules(
+ $.extend(
+ {},
+ $.validator.classRules( element ),
+ $.validator.attributeRules( element ),
+ $.validator.dataRules( element ),
+ $.validator.staticRules( element )
+ ), element );
+
+ // make sure required is at front
+ if ( data.required ) {
+ param = data.required;
+ delete data.required;
+ data = $.extend( { required: param }, data );
+ $( element ).attr( "aria-required", "true" );
+ }
+
+ // make sure remote is at back
+ if ( data.remote ) {
+ param = data.remote;
+ delete data.remote;
+ data = $.extend( data, { remote: param });
+ }
+
+ return data;
+ }
+});
+
+// Custom selectors
+$.extend( $.expr[ ":" ], {
+ // http://jqueryvalidation.org/blank-selector/
+ blank: function( a ) {
+ return !$.trim( "" + $( a ).val() );
+ },
+ // http://jqueryvalidation.org/filled-selector/
+ filled: function( a ) {
+ return !!$.trim( "" + $( a ).val() );
+ },
+ // http://jqueryvalidation.org/unchecked-selector/
+ unchecked: function( a ) {
+ return !$( a ).prop( "checked" );
+ }
+});
+
+// constructor for validator
+$.validator = function( options, form ) {
+ this.settings = $.extend( true, {}, $.validator.defaults, options );
+ this.currentForm = form;
+ this.init();
+};
+
+// http://jqueryvalidation.org/jQuery.validator.format/
+$.validator.format = function( source, params ) {
+ if ( arguments.length === 1 ) {
+ return function() {
+ var args = $.makeArray( arguments );
+ args.unshift( source );
+ return $.validator.format.apply( this, args );
+ };
+ }
+ if ( arguments.length > 2 && params.constructor !== Array ) {
+ params = $.makeArray( arguments ).slice( 1 );
+ }
+ if ( params.constructor !== Array ) {
+ params = [ params ];
+ }
+ $.each( params, function( i, n ) {
+ source = source.replace( new RegExp( "\\{" + i + "\\}", "g" ), function() {
+ return n;
+ });
+ });
+ return source;
+};
+
+$.extend( $.validator, {
+
+ defaults: {
+ messages: {},
+ groups: {},
+ rules: {},
+ errorClass: "error",
+ validClass: "valid",
+ errorElement: "label",
+ focusInvalid: true,
+ errorContainer: $( [] ),
+ errorLabelContainer: $( [] ),
+ onsubmit: true,
+ ignore: ":hidden",
+ ignoreTitle: false,
+ onfocusin: function( element ) {
+ this.lastActive = element;
+
+ // hide error label and remove error class on focus if enabled
+ if ( this.settings.focusCleanup && !this.blockFocusCleanup ) {
+ if ( this.settings.unhighlight ) {
+ this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );
+ }
+ this.hideThese( this.errorsFor( element ) );
+ }
+ },
+ onfocusout: function( element ) {
+ if ( !this.checkable( element ) && ( element.name in this.submitted || !this.optional( element ) ) ) {
+ this.element( element );
+ }
+ },
+ onkeyup: function( element, event ) {
+ if ( event.which === 9 && this.elementValue( element ) === "" ) {
+ return;
+ } else if ( element.name in this.submitted || element === this.lastElement ) {
+ this.element( element );
+ }
+ },
+ onclick: function( element ) {
+ // click on selects, radiobuttons and checkboxes
+ if ( element.name in this.submitted ) {
+ this.element( element );
+
+ // or option elements, check parent select in that case
+ } else if ( element.parentNode.name in this.submitted ) {
+ this.element( element.parentNode );
+ }
+ },
+ highlight: function( element, errorClass, validClass ) {
+ if ( element.type === "radio" ) {
+ this.findByName( element.name ).addClass( errorClass ).removeClass( validClass );
+ } else {
+ $( element ).addClass( errorClass ).removeClass( validClass );
+ }
+ },
+ unhighlight: function( element, errorClass, validClass ) {
+ if ( element.type === "radio" ) {
+ this.findByName( element.name ).removeClass( errorClass ).addClass( validClass );
+ } else {
+ $( element ).removeClass( errorClass ).addClass( validClass );
+ }
+ }
+ },
+
+ // http://jqueryvalidation.org/jQuery.validator.setDefaults/
+ setDefaults: function( settings ) {
+ $.extend( $.validator.defaults, settings );
+ },
+
+ messages: {
+ required: "This field is required.",
+ remote: "Please fix this field.",
+ email: "Please enter a valid email address.",
+ url: "Please enter a valid URL.",
+ date: "Please enter a valid date.",
+ dateISO: "Please enter a valid date ( ISO ).",
+ number: "Please enter a valid number.",
+ digits: "Please enter only digits.",
+ creditcard: "Please enter a valid credit card number.",
+ equalTo: "Please enter the same value again.",
+ maxlength: $.validator.format( "Please enter no more than {0} characters." ),
+ minlength: $.validator.format( "Please enter at least {0} characters." ),
+ rangelength: $.validator.format( "Please enter a value between {0} and {1} characters long." ),
+ range: $.validator.format( "Please enter a value between {0} and {1}." ),
+ max: $.validator.format( "Please enter a value less than or equal to {0}." ),
+ min: $.validator.format( "Please enter a value greater than or equal to {0}." )
+ },
+
+ autoCreateRanges: false,
+
+ prototype: {
+
+ init: function() {
+ this.labelContainer = $( this.settings.errorLabelContainer );
+ this.errorContext = this.labelContainer.length && this.labelContainer || $( this.currentForm );
+ this.containers = $( this.settings.errorContainer ).add( this.settings.errorLabelContainer );
+ this.submitted = {};
+ this.valueCache = {};
+ this.pendingRequest = 0;
+ this.pending = {};
+ this.invalid = {};
+ this.reset();
+
+ var groups = ( this.groups = {} ),
+ rules;
+ $.each( this.settings.groups, function( key, value ) {
+ if ( typeof value === "string" ) {
+ value = value.split( /\s/ );
+ }
+ $.each( value, function( index, name ) {
+ groups[ name ] = key;
+ });
+ });
+ rules = this.settings.rules;
+ $.each( rules, function( key, value ) {
+ rules[ key ] = $.validator.normalizeRule( value );
+ });
+
+ function delegate( event ) {
+ var validator = $.data( this[ 0 ].form, "validator" ),
+ eventType = "on" + event.type.replace( /^validate/, "" ),
+ settings = validator.settings;
+ if ( settings[ eventType ] && !this.is( settings.ignore ) ) {
+ settings[ eventType ].call( validator, this[ 0 ], event );
+ }
+ }
+ $( this.currentForm )
+ .validateDelegate( ":text, [type='password'], [type='file'], select, textarea, " +
+ "[type='number'], [type='search'] ,[type='tel'], [type='url'], " +
+ "[type='email'], [type='datetime'], [type='date'], [type='month'], " +
+ "[type='week'], [type='time'], [type='datetime-local'], " +
+ "[type='range'], [type='color'], [type='radio'], [type='checkbox']",
+ "focusin focusout keyup", delegate)
+ // Support: Chrome, oldIE
+ // "select" is provided as event.target when clicking a option
+ .validateDelegate("select, option, [type='radio'], [type='checkbox']", "click", delegate);
+
+ if ( this.settings.invalidHandler ) {
+ $( this.currentForm ).bind( "invalid-form.validate", this.settings.invalidHandler );
+ }
+
+ // Add aria-required to any Static/Data/Class required fields before first validation
+ // Screen readers require this attribute to be present before the initial submission http://www.w3.org/TR/WCAG-TECHS/ARIA2.html
+ $( this.currentForm ).find( "[required], [data-rule-required], .required" ).attr( "aria-required", "true" );
+ },
+
+ // http://jqueryvalidation.org/Validator.form/
+ form: function() {
+ this.checkForm();
+ $.extend( this.submitted, this.errorMap );
+ this.invalid = $.extend({}, this.errorMap );
+ if ( !this.valid() ) {
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ }
+ this.showErrors();
+ return this.valid();
+ },
+
+ checkForm: function() {
+ this.prepareForm();
+ for ( var i = 0, elements = ( this.currentElements = this.elements() ); elements[ i ]; i++ ) {
+ this.check( elements[ i ] );
+ }
+ return this.valid();
+ },
+
+ // http://jqueryvalidation.org/Validator.element/
+ element: function( element ) {
+ var cleanElement = this.clean( element ),
+ checkElement = this.validationTargetFor( cleanElement ),
+ result = true;
+
+ this.lastElement = checkElement;
+
+ if ( checkElement === undefined ) {
+ delete this.invalid[ cleanElement.name ];
+ } else {
+ this.prepareElement( checkElement );
+ this.currentElements = $( checkElement );
+
+ result = this.check( checkElement ) !== false;
+ if ( result ) {
+ delete this.invalid[ checkElement.name ];
+ } else {
+ this.invalid[ checkElement.name ] = true;
+ }
+ }
+ // Add aria-invalid status for screen readers
+ $( element ).attr( "aria-invalid", !result );
+
+ if ( !this.numberOfInvalids() ) {
+ // Hide error containers on last error
+ this.toHide = this.toHide.add( this.containers );
+ }
+ this.showErrors();
+ return result;
+ },
+
+ // http://jqueryvalidation.org/Validator.showErrors/
+ showErrors: function( errors ) {
+ if ( errors ) {
+ // add items to error list and map
+ $.extend( this.errorMap, errors );
+ this.errorList = [];
+ for ( var name in errors ) {
+ this.errorList.push({
+ message: errors[ name ],
+ element: this.findByName( name )[ 0 ]
+ });
+ }
+ // remove items from success list
+ this.successList = $.grep( this.successList, function( element ) {
+ return !( element.name in errors );
+ });
+ }
+ if ( this.settings.showErrors ) {
+ this.settings.showErrors.call( this, this.errorMap, this.errorList );
+ } else {
+ this.defaultShowErrors();
+ }
+ },
+
+ // http://jqueryvalidation.org/Validator.resetForm/
+ resetForm: function() {
+ if ( $.fn.resetForm ) {
+ $( this.currentForm ).resetForm();
+ }
+ this.submitted = {};
+ this.lastElement = null;
+ this.prepareForm();
+ this.hideErrors();
+ this.elements()
+ .removeClass( this.settings.errorClass )
+ .removeData( "previousValue" )
+ .removeAttr( "aria-invalid" );
+ },
+
+ numberOfInvalids: function() {
+ return this.objectLength( this.invalid );
+ },
+
+ objectLength: function( obj ) {
+ /* jshint unused: false */
+ var count = 0,
+ i;
+ for ( i in obj ) {
+ count++;
+ }
+ return count;
+ },
+
+ hideErrors: function() {
+ this.hideThese( this.toHide );
+ },
+
+ hideThese: function( errors ) {
+ errors.not( this.containers ).text( "" );
+ this.addWrapper( errors ).hide();
+ },
+
+ valid: function() {
+ return this.size() === 0;
+ },
+
+ size: function() {
+ return this.errorList.length;
+ },
+
+ focusInvalid: function() {
+ if ( this.settings.focusInvalid ) {
+ try {
+ $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [])
+ .filter( ":visible" )
+ .focus()
+ // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
+ .trigger( "focusin" );
+ } catch ( e ) {
+ // ignore IE throwing errors when focusing hidden elements
+ }
+ }
+ },
+
+ findLastActive: function() {
+ var lastActive = this.lastActive;
+ return lastActive && $.grep( this.errorList, function( n ) {
+ return n.element.name === lastActive.name;
+ }).length === 1 && lastActive;
+ },
+
+ elements: function() {
+ var validator = this,
+ rulesCache = {};
+
+ // select all valid inputs inside the form (no submit or reset buttons)
+ return $( this.currentForm )
+ .find( "input, select, textarea" )
+ .not( ":submit, :reset, :image, [disabled]" )
+ .not( this.settings.ignore )
+ .filter( function() {
+ if ( !this.name && validator.settings.debug && window.console ) {
+ console.error( "%o has no name assigned", this );
+ }
+
+ // select only the first element for each name, and only those with rules specified
+ if ( this.name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
+ return false;
+ }
+
+ rulesCache[ this.name ] = true;
+ return true;
+ });
+ },
+
+ clean: function( selector ) {
+ return $( selector )[ 0 ];
+ },
+
+ errors: function() {
+ var errorClass = this.settings.errorClass.split( " " ).join( "." );
+ return $( this.settings.errorElement + "." + errorClass, this.errorContext );
+ },
+
+ reset: function() {
+ this.successList = [];
+ this.errorList = [];
+ this.errorMap = {};
+ this.toShow = $( [] );
+ this.toHide = $( [] );
+ this.currentElements = $( [] );
+ },
+
+ prepareForm: function() {
+ this.reset();
+ this.toHide = this.errors().add( this.containers );
+ },
+
+ prepareElement: function( element ) {
+ this.reset();
+ this.toHide = this.errorsFor( element );
+ },
+
+ elementValue: function( element ) {
+ var val,
+ $element = $( element ),
+ type = element.type;
+
+ if ( type === "radio" || type === "checkbox" ) {
+ return $( "input[name='" + element.name + "']:checked" ).val();
+ } else if ( type === "number" && typeof element.validity !== "undefined" ) {
+ return element.validity.badInput ? false : $element.val();
+ }
+
+ val = $element.val();
+ if ( typeof val === "string" ) {
+ return val.replace(/\r/g, "" );
+ }
+ return val;
+ },
+
+ check: function( element ) {
+ element = this.validationTargetFor( this.clean( element ) );
+
+ var rules = $( element ).rules(),
+ rulesCount = $.map( rules, function( n, i ) {
+ return i;
+ }).length,
+ dependencyMismatch = false,
+ val = this.elementValue( element ),
+ result, method, rule;
+
+ for ( method in rules ) {
+ rule = { method: method, parameters: rules[ method ] };
+ try {
+
+ result = $.validator.methods[ method ].call( this, val, element, rule.parameters );
+
+ // if a method indicates that the field is optional and therefore valid,
+ // don't mark it as valid when there are no other rules
+ if ( result === "dependency-mismatch" && rulesCount === 1 ) {
+ dependencyMismatch = true;
+ continue;
+ }
+ dependencyMismatch = false;
+
+ if ( result === "pending" ) {
+ this.toHide = this.toHide.not( this.errorsFor( element ) );
+ return;
+ }
+
+ if ( !result ) {
+ this.formatAndAdd( element, rule );
+ return false;
+ }
+ } catch ( e ) {
+ if ( this.settings.debug && window.console ) {
+ console.log( "Exception occurred when checking element " + element.id + ", check the '" + rule.method + "' method.", e );
+ }
+ throw e;
+ }
+ }
+ if ( dependencyMismatch ) {
+ return;
+ }
+ if ( this.objectLength( rules ) ) {
+ this.successList.push( element );
+ }
+ return true;
+ },
+
+ // return the custom message for the given element and validation method
+ // specified in the element's HTML5 data attribute
+ // return the generic message if present and no method specific message is present
+ customDataMessage: function( element, method ) {
+ return $( element ).data( "msg" + method.charAt( 0 ).toUpperCase() +
+ method.substring( 1 ).toLowerCase() ) || $( element ).data( "msg" );
+ },
+
+ // return the custom message for the given element name and validation method
+ customMessage: function( name, method ) {
+ var m = this.settings.messages[ name ];
+ return m && ( m.constructor === String ? m : m[ method ]);
+ },
+
+ // return the first defined argument, allowing empty strings
+ findDefined: function() {
+ for ( var i = 0; i < arguments.length; i++) {
+ if ( arguments[ i ] !== undefined ) {
+ return arguments[ i ];
+ }
+ }
+ return undefined;
+ },
+
+ defaultMessage: function( element, method ) {
+ return this.findDefined(
+ this.customMessage( element.name, method ),
+ this.customDataMessage( element, method ),
+ // title is never undefined, so handle empty string as undefined
+ !this.settings.ignoreTitle && element.title || undefined,
+ $.validator.messages[ method ],
+ "<strong>Warning: No message defined for " + element.name + "</strong>"
+ );
+ },
+
+ formatAndAdd: function( element, rule ) {
+ var message = this.defaultMessage( element, rule.method ),
+ theregex = /\$?\{(\d+)\}/g;
+ if ( typeof message === "function" ) {
+ message = message.call( this, rule.parameters, element );
+ } else if ( theregex.test( message ) ) {
+ message = $.validator.format( message.replace( theregex, "{$1}" ), rule.parameters );
+ }
+ this.errorList.push({
+ message: message,
+ element: element,
+ method: rule.method
+ });
+
+ this.errorMap[ element.name ] = message;
+ this.submitted[ element.name ] = message;
+ },
+
+ addWrapper: function( toToggle ) {
+ if ( this.settings.wrapper ) {
+ toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );
+ }
+ return toToggle;
+ },
+
+ defaultShowErrors: function() {
+ var i, elements, error;
+ for ( i = 0; this.errorList[ i ]; i++ ) {
+ error = this.errorList[ i ];
+ if ( this.settings.highlight ) {
+ this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );
+ }
+ this.showLabel( error.element, error.message );
+ }
+ if ( this.errorList.length ) {
+ this.toShow = this.toShow.add( this.containers );
+ }
+ if ( this.settings.success ) {
+ for ( i = 0; this.successList[ i ]; i++ ) {
+ this.showLabel( this.successList[ i ] );
+ }
+ }
+ if ( this.settings.unhighlight ) {
+ for ( i = 0, elements = this.validElements(); elements[ i ]; i++ ) {
+ this.settings.unhighlight.call( this, elements[ i ], this.settings.errorClass, this.settings.validClass );
+ }
+ }
+ this.toHide = this.toHide.not( this.toShow );
+ this.hideErrors();
+ this.addWrapper( this.toShow ).show();
+ },
+
+ validElements: function() {
+ return this.currentElements.not( this.invalidElements() );
+ },
+
+ invalidElements: function() {
+ return $( this.errorList ).map(function() {
+ return this.element;
+ });
+ },
+
+ showLabel: function( element, message ) {
+ var place, group, errorID,
+ error = this.errorsFor( element ),
+ elementID = this.idOrName( element ),
+ describedBy = $( element ).attr( "aria-describedby" );
+ if ( error.length ) {
+ // refresh error/success class
+ error.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
+ // replace message on existing label
+ error.html( message );
+ } else {
+ // create error element
+ error = $( "<" + this.settings.errorElement + ">" )
+ .attr( "id", elementID + "-error" )
+ .addClass( this.settings.errorClass )
+ .html( message || "" );
+
+ // Maintain reference to the element to be placed into the DOM
+ place = error;
+ if ( this.settings.wrapper ) {
+ // make sure the element is visible, even in IE
+ // actually showing the wrapped element is handled elsewhere
+ place = error.hide().show().wrap( "<" + this.settings.wrapper + "/>" ).parent();
+ }
+ if ( this.labelContainer.length ) {
+ this.labelContainer.append( place );
+ } else if ( this.settings.errorPlacement ) {
+ this.settings.errorPlacement( place, $( element ) );
+ } else {
+ place.insertAfter( element );
+ }
+
+ // Link error back to the element
+ if ( error.is( "label" ) ) {
+ // If the error is a label, then associate using 'for'
+ error.attr( "for", elementID );
+ } else if ( error.parents( "label[for='" + elementID + "']" ).length === 0 ) {
+ // If the element is not a child of an associated label, then it's necessary
+ // to explicitly apply aria-describedby
+
+ errorID = error.attr( "id" );
+ // Respect existing non-error aria-describedby
+ if ( !describedBy ) {
+ describedBy = errorID;
+ } else if ( !describedBy.match( new RegExp( "\b" + errorID + "\b" ) ) ) {
+ // Add to end of list if not already present
+ describedBy += " " + errorID;
+ }
+ $( element ).attr( "aria-describedby", describedBy );
+
+ // If this element is grouped, then assign to all elements in the same group
+ group = this.groups[ element.name ];
+ if ( group ) {
+ $.each( this.groups, function( name, testgroup ) {
+ if ( testgroup === group ) {
+ $( "[name='" + name + "']", this.currentForm )
+ .attr( "aria-describedby", error.attr( "id" ) );
+ }
+ });
+ }
+ }
+ }
+ if ( !message && this.settings.success ) {
+ error.text( "" );
+ if ( typeof this.settings.success === "string" ) {
+ error.addClass( this.settings.success );
+ } else {
+ this.settings.success( error, element );
+ }
+ }
+ this.toShow = this.toShow.add( error );
+ },
+
+ errorsFor: function( element ) {
+ var name = this.idOrName( element ),
+ describer = $( element ).attr( "aria-describedby" ),
+ selector = "label[for='" + name + "'], label[for='" + name + "'] *";
+ // aria-describedby should directly reference the error element
+ if ( describer ) {
+ selector = selector + ", #" + describer.replace( /\s+/g, ", #" );
+ }
+ return this
+ .errors()
+ .filter( selector );
+ },
+
+ idOrName: function( element ) {
+ return this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name );
+ },
+
+ validationTargetFor: function( element ) {
+ // if radio/checkbox, validate first element in group instead
+ if ( this.checkable( element ) ) {
+ element = this.findByName( element.name ).not( this.settings.ignore )[ 0 ];
+ }
+ return element;
+ },
+
+ checkable: function( element ) {
+ return ( /radio|checkbox/i ).test( element.type );
+ },
+
+ findByName: function( name ) {
+ return $( this.currentForm ).find( "[name='" + name + "']" );
+ },
+
+ getLength: function( value, element ) {
+ switch ( element.nodeName.toLowerCase() ) {
+ case "select":
+ return $( "option:selected", element ).length;
+ case "input":
+ if ( this.checkable( element ) ) {
+ return this.findByName( element.name ).filter( ":checked" ).length;
+ }
+ }
+ return value.length;
+ },
+
+ depend: function( param, element ) {
+ return this.dependTypes[typeof param] ? this.dependTypes[typeof param]( param, element ) : true;
+ },
+
+ dependTypes: {
+ "boolean": function( param ) {
+ return param;
+ },
+ "string": function( param, element ) {
+ return !!$( param, element.form ).length;
+ },
+ "function": function( param, element ) {
+ return param( element );
+ }
+ },
+
+ optional: function( element ) {
+ var val = this.elementValue( element );
+ return !$.validator.methods.required.call( this, val, element ) && "dependency-mismatch";
+ },
+
+ startRequest: function( element ) {
+ if ( !this.pending[ element.name ] ) {
+ this.pendingRequest++;
+ this.pending[ element.name ] = true;
+ }
+ },
+
+ stopRequest: function( element, valid ) {
+ this.pendingRequest--;
+ // sometimes synchronization fails, make sure pendingRequest is never < 0
+ if ( this.pendingRequest < 0 ) {
+ this.pendingRequest = 0;
+ }
+ delete this.pending[ element.name ];
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
+ $( this.currentForm ).submit();
+ this.formSubmitted = false;
+ } else if (!valid && this.pendingRequest === 0 && this.formSubmitted ) {
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ this.formSubmitted = false;
+ }
+ },
+
+ previousValue: function( element ) {
+ return $.data( element, "previousValue" ) || $.data( element, "previousValue", {
+ old: null,
+ valid: true,
+ message: this.defaultMessage( element, "remote" )
+ });
+ }
+
+ },
+
+ classRuleSettings: {
+ required: { required: true },
+ email: { email: true },
+ url: { url: true },
+ date: { date: true },
+ dateISO: { dateISO: true },
+ number: { number: true },
+ digits: { digits: true },
+ creditcard: { creditcard: true }
+ },
+
+ addClassRules: function( className, rules ) {
+ if ( className.constructor === String ) {
+ this.classRuleSettings[ className ] = rules;
+ } else {
+ $.extend( this.classRuleSettings, className );
+ }
+ },
+
+ classRules: function( element ) {
+ var rules = {},
+ classes = $( element ).attr( "class" );
+
+ if ( classes ) {
+ $.each( classes.split( " " ), function() {
+ if ( this in $.validator.classRuleSettings ) {
+ $.extend( rules, $.validator.classRuleSettings[ this ]);
+ }
+ });
+ }
+ return rules;
+ },
+
+ attributeRules: function( element ) {
+ var rules = {},
+ $element = $( element ),
+ type = element.getAttribute( "type" ),
+ method, value;
+
+ for ( method in $.validator.methods ) {
+
+ // support for <input required> in both html5 and older browsers
+ if ( method === "required" ) {
+ value = element.getAttribute( method );
+ // Some browsers return an empty string for the required attribute
+ // and non-HTML5 browsers might have required="" markup
+ if ( value === "" ) {
+ value = true;
+ }
+ // force non-HTML5 browsers to return bool
+ value = !!value;
+ } else {
+ value = $element.attr( method );
+ }
+
+ // convert the value to a number for number inputs, and for text for backwards compability
+ // allows type="date" and others to be compared as strings
+ if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
+ value = Number( value );
+ }
+
+ if ( value || value === 0 ) {
+ rules[ method ] = value;
+ } else if ( type === method && type !== "range" ) {
+ // exception: the jquery validate 'range' method
+ // does not test for the html5 'range' type
+ rules[ method ] = true;
+ }
+ }
+
+ // maxlength may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
+ if ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) {
+ delete rules.maxlength;
+ }
+
+ return rules;
+ },
+
+ dataRules: function( element ) {
+ var method, value,
+ rules = {}, $element = $( element );
+ for ( method in $.validator.methods ) {
+ value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
+ if ( value !== undefined ) {
+ rules[ method ] = value;
+ }
+ }
+ return rules;
+ },
+
+ staticRules: function( element ) {
+ var rules = {},
+ validator = $.data( element.form, "validator" );
+
+ if ( validator.settings.rules ) {
+ rules = $.validator.normalizeRule( validator.settings.rules[ element.name ] ) || {};
+ }
+ return rules;
+ },
+
+ normalizeRules: function( rules, element ) {
+ // handle dependency check
+ $.each( rules, function( prop, val ) {
+ // ignore rule when param is explicitly false, eg. required:false
+ if ( val === false ) {
+ delete rules[ prop ];
+ return;
+ }
+ if ( val.param || val.depends ) {
+ var keepRule = true;
+ switch ( typeof val.depends ) {
+ case "string":
+ keepRule = !!$( val.depends, element.form ).length;
+ break;
+ case "function":
+ keepRule = val.depends.call( element, element );
+ break;
+ }
+ if ( keepRule ) {
+ rules[ prop ] = val.param !== undefined ? val.param : true;
+ } else {
+ delete rules[ prop ];
+ }
+ }
+ });
+
+ // evaluate parameters
+ $.each( rules, function( rule, parameter ) {
+ rules[ rule ] = $.isFunction( parameter ) ? parameter( element ) : parameter;
+ });
+
+ // clean number parameters
+ $.each([ "minlength", "maxlength" ], function() {
+ if ( rules[ this ] ) {
+ rules[ this ] = Number( rules[ this ] );
+ }
+ });
+ $.each([ "rangelength", "range" ], function() {
+ var parts;
+ if ( rules[ this ] ) {
+ if ( $.isArray( rules[ this ] ) ) {
+ rules[ this ] = [ Number( rules[ this ][ 0 ]), Number( rules[ this ][ 1 ] ) ];
+ } else if ( typeof rules[ this ] === "string" ) {
+ parts = rules[ this ].replace(/[\[\]]/g, "" ).split( /[\s,]+/ );
+ rules[ this ] = [ Number( parts[ 0 ]), Number( parts[ 1 ] ) ];
+ }
+ }
+ });
+
+ if ( $.validator.autoCreateRanges ) {
+ // auto-create ranges
+ if ( rules.min && rules.max ) {
+ rules.range = [ rules.min, rules.max ];
+ delete rules.min;
+ delete rules.max;
+ }
+ if ( rules.minlength && rules.maxlength ) {
+ rules.rangelength = [ rules.minlength, rules.maxlength ];
+ delete rules.minlength;
+ delete rules.maxlength;
+ }
+ }
+
+ return rules;
+ },
+
+ // Converts a simple string to a {string: true} rule, e.g., "required" to {required:true}
+ normalizeRule: function( data ) {
+ if ( typeof data === "string" ) {
+ var transformed = {};
+ $.each( data.split( /\s/ ), function() {
+ transformed[ this ] = true;
+ });
+ data = transformed;
+ }
+ return data;
+ },
+
+ // http://jqueryvalidation.org/jQuery.validator.addMethod/
+ addMethod: function( name, method, message ) {
+ $.validator.methods[ name ] = method;
+ $.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ];
+ if ( method.length < 3 ) {
+ $.validator.addClassRules( name, $.validator.normalizeRule( name ) );
+ }
+ },
+
+ methods: {
+
+ // http://jqueryvalidation.org/required-method/
+ required: function( value, element, param ) {
+ // check if dependency is met
+ if ( !this.depend( param, element ) ) {
+ return "dependency-mismatch";
+ }
+ if ( element.nodeName.toLowerCase() === "select" ) {
+ // could be an array for select-multiple or a string, both are fine this way
+ var val = $( element ).val();
+ return val && val.length > 0;
+ }
+ if ( this.checkable( element ) ) {
+ return this.getLength( value, element ) > 0;
+ }
+ return $.trim( value ).length > 0;
+ },
+
+ // http://jqueryvalidation.org/email-method/
+ email: function( value, element ) {
+ // From http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#e-mail-state-%28type=email%29
+ // Retrieved 2014-01-14
+ // If you have a problem with this implementation, report a bug against the above spec
+ // Or use custom methods to implement your own email validation
+ return this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value );
+ },
+
+ // http://jqueryvalidation.org/url-method/
+ url: function( value, element ) {
+ // contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/
+ return this.optional( element ) || /^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test( value );
+ },
+
+ // http://jqueryvalidation.org/date-method/
+ date: function( value, element ) {
+ return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
+ },
+
+ // http://jqueryvalidation.org/dateISO-method/
+ dateISO: function( value, element ) {
+ return this.optional( element ) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test( value );
+ },
+
+ // http://jqueryvalidation.org/number-method/
+ number: function( value, element ) {
+ return this.optional( element ) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value );
+ },
+
+ // http://jqueryvalidation.org/digits-method/
+ digits: function( value, element ) {
+ return this.optional( element ) || /^\d+$/.test( value );
+ },
+
+ // http://jqueryvalidation.org/creditcard-method/
+ // based on http://en.wikipedia.org/wiki/Luhn/
+ creditcard: function( value, element ) {
+ if ( this.optional( element ) ) {
+ return "dependency-mismatch";
+ }
+ // accept only spaces, digits and dashes
+ if ( /[^0-9 \-]+/.test( value ) ) {
+ return false;
+ }
+ var nCheck = 0,
+ nDigit = 0,
+ bEven = false,
+ n, cDigit;
+
+ value = value.replace( /\D/g, "" );
+
+ // Basing min and max length on
+ // http://developer.ean.com/general_info/Valid_Credit_Card_Types
+ if ( value.length < 13 || value.length > 19 ) {
+ return false;
+ }
+
+ for ( n = value.length - 1; n >= 0; n--) {
+ cDigit = value.charAt( n );
+ nDigit = parseInt( cDigit, 10 );
+ if ( bEven ) {
+ if ( ( nDigit *= 2 ) > 9 ) {
+ nDigit -= 9;
+ }
+ }
+ nCheck += nDigit;
+ bEven = !bEven;
+ }
+
+ return ( nCheck % 10 ) === 0;
+ },
+
+ // http://jqueryvalidation.org/minlength-method/
+ minlength: function( value, element, param ) {
+ var length = $.isArray( value ) ? value.length : this.getLength( $.trim( value ), element );
+ return this.optional( element ) || length >= param;
+ },
+
+ // http://jqueryvalidation.org/maxlength-method/
+ maxlength: function( value, element, param ) {
+ var length = $.isArray( value ) ? value.length : this.getLength( $.trim( value ), element );
+ return this.optional( element ) || length <= param;
+ },
+
+ // http://jqueryvalidation.org/rangelength-method/
+ rangelength: function( value, element, param ) {
+ var length = $.isArray( value ) ? value.length : this.getLength( $.trim( value ), element );
+ return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
+ },
+
+ // http://jqueryvalidation.org/min-method/
+ min: function( value, element, param ) {
+ return this.optional( element ) || value >= param;
+ },
+
+ // http://jqueryvalidation.org/max-method/
+ max: function( value, element, param ) {
+ return this.optional( element ) || value <= param;
+ },
+
+ // http://jqueryvalidation.org/range-method/
+ range: function( value, element, param ) {
+ return this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] );
+ },
+
+ // http://jqueryvalidation.org/equalTo-method/
+ equalTo: function( value, element, param ) {
+ // bind to the blur event of the target in order to revalidate whenever the target field is updated
+ // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
+ var target = $( param );
+ if ( this.settings.onfocusout ) {
+ target.unbind( ".validate-equalTo" ).bind( "blur.validate-equalTo", function() {
+ $( element ).valid();
+ });
+ }
+ return value === target.val();
+ },
+
+ // http://jqueryvalidation.org/remote-method/
+ remote: function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return "dependency-mismatch";
+ }
+
+ var previous = this.previousValue( element ),
+ validator, data;
+
+ if (!this.settings.messages[ element.name ] ) {
+ this.settings.messages[ element.name ] = {};
+ }
+ previous.originalMessage = this.settings.messages[ element.name ].remote;
+ this.settings.messages[ element.name ].remote = previous.message;
+
+ param = typeof param === "string" && { url: param } || param;
+
+ if ( previous.old === value ) {
+ return previous.valid;
+ }
+
+ previous.old = value;
+ validator = this;
+ this.startRequest( element );
+ data = {};
+ data[ element.name ] = value;
+ $.ajax( $.extend( true, {
+ url: param,
+ mode: "abort",
+ port: "validate" + element.name,
+ dataType: "json",
+ data: data,
+ context: validator.currentForm,
+ success: function( response ) {
+ var valid = response === true || response === "true",
+ errors, message, submitted;
+
+ validator.settings.messages[ element.name ].remote = previous.originalMessage;
+ if ( valid ) {
+ submitted = validator.formSubmitted;
+ validator.prepareElement( element );
+ validator.formSubmitted = submitted;
+ validator.successList.push( element );
+ delete validator.invalid[ element.name ];
+ validator.showErrors();
+ } else {
+ errors = {};
+ message = response || validator.defaultMessage( element, "remote" );
+ errors[ element.name ] = previous.message = $.isFunction( message ) ? message( value ) : message;
+ validator.invalid[ element.name ] = true;
+ validator.showErrors( errors );
+ }
+ previous.valid = valid;
+ validator.stopRequest( element, valid );
+ }
+ }, param ) );
+ return "pending";
+ }
+
+ }
+
+});
+
+$.format = function deprecated() {
+ throw "$.format has been deprecated. Please use $.validator.format instead.";
+};
+
+// ajax mode: abort
+// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
+// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
+
+var pendingRequests = {},
+ ajax;
+// Use a prefilter if available (1.5+)
+if ( $.ajaxPrefilter ) {
+ $.ajaxPrefilter(function( settings, _, xhr ) {
+ var port = settings.port;
+ if ( settings.mode === "abort" ) {
+ if ( pendingRequests[port] ) {
+ pendingRequests[port].abort();
+ }
+ pendingRequests[port] = xhr;
+ }
+ });
+} else {
+ // Proxy ajax
+ ajax = $.ajax;
+ $.ajax = function( settings ) {
+ var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
+ port = ( "port" in settings ? settings : $.ajaxSettings ).port;
+ if ( mode === "abort" ) {
+ if ( pendingRequests[port] ) {
+ pendingRequests[port].abort();
+ }
+ pendingRequests[port] = ajax.apply(this, arguments);
+ return pendingRequests[port];
+ }
+ return ajax.apply(this, arguments);
+ };
+}
+
+// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation
+// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target
+
+$.extend($.fn, {
+ validateDelegate: function( delegate, type, handler ) {
+ return this.bind(type, function( event ) {
+ var target = $(event.target);
+ if ( target.is(delegate) ) {
+ return handler.apply(target, arguments);
+ }
+ });
+ }
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/jquery.validate.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/jquery.validate.min.js
new file mode 100644
index 0000000..5264617
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/jquery.validate.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.validateDelegate(":submit","click",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(b.target).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(b.target).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.submit(function(b){function d(){var d;return c.settings.submitHandler?(c.submitButton&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c;return a(this[0]).is("form")?b=this.validate().form():(b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b})),b},removeAttrs:function(b){var c={},d=this;return a.each(b.split(/\s/),function(a,b){c[b]=d.attr(b),d.removeAttr(b)}),c},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(a,b){(9!==b.which||""!==this.elementValue(a))&&(a.name in this.submitted||a===this.lastElement)&&this.element(a)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this[0].form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!this.is(e.ignore)&&e[d].call(c,this[0],b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']","focusin focusout keyup",b).validateDelegate("select, option, [type='radio'], [type='checkbox']","click",b),this.settings.invalidHandler&&a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue").removeAttr("aria-invalid")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?a("input[name='"+b.name+"']:checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a];return void 0},defaultMessage:function(b,c){return this.findDefined(this.customMessage(b.name,c),this.customDataMessage(b,c),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c],"<strong>Warning: No message defined for "+b.name+"</strong>")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id"),i?i.match(new RegExp("\b"+f+"\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.name],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(a){return this.checkable(a)&&(a=this.findByName(a.name).not(this.settings.ignore)[0]),a},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),/min|max/.test(c)&&(null===g||/number|range|text/.test(g))&&(d=Number(d)),d||0===d?e[c]=d:g===c&&"range"!==g&&(e[c]=!0);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b);for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),void 0!==d&&(e[c]=d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(b.min&&b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),b.minlength&&b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:a.trim(b).length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(a.trim(b),c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(a.trim(b),c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(a.trim(b),c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{url:d,mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}}),a.format=function(){throw"$.format has been deprecated. Please use $.validator.format instead."};var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a.extend(a.fn,{validateDelegate:function(b,c,d){return this.bind(c,function(c){var e=a(c.target);return e.is(b)?d.apply(e,arguments):void 0})}})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ar.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ar.js
new file mode 100644
index 0000000..e609dbb
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ar.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: AR (Arabic; العربية)
+ */
+$.extend($.validator.messages, {
+ required: "هذا الحقل إلزامي",
+ remote: "يرجى تصحيح هذا الحقل للمتابعة",
+ email: "رجاء إدخال عنوان بريد إلكتروني صحيح",
+ url: "رجاء إدخال عنوان موقع إلكتروني صحيح",
+ date: "رجاء إدخال تاريخ صحيح",
+ dateISO: "رجاء إدخال تاريخ صحيح (ISO)",
+ number: "رجاء إدخال عدد بطريقة صحيحة",
+ digits: "رجاء إدخال أرقام Ùقط",
+ creditcard: "رجاء إدخال رقم بطاقة ائتمان صحيح",
+ equalTo: "رجاء إدخال Ù†Ùس القيمة",
+ extension: "رجاء إدخال مل٠بامتداد مواÙÙ‚ عليه",
+ maxlength: $.validator.format("الحد الأقصى لعدد الحرو٠هو {0}"),
+ minlength: $.validator.format("الحد الأدنى لعدد الحرو٠هو {0}"),
+ rangelength: $.validator.format("عدد الحرو٠يجب أن يكون بين {0} و {1}"),
+ range: $.validator.format("رجاء إدخال عدد قيمته بين {0} و {1}"),
+ max: $.validator.format("رجاء إدخال عدد أقل من أو يساوي (0}"),
+ min: $.validator.format("رجاء إدخال عدد أكبر من أو يساوي (0}")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ar.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ar.min.js
new file mode 100644
index 0000000..01a3200
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ar.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"هذا الحقل إلزامي",remote:"يرجى تصحيح هذا الحقل للمتابعة",email:"رجاء إدخال عنوان بريد إلكتروني صحيح",url:"رجاء إدخال عنوان موقع إلكتروني صحيح",date:"رجاء إدخال تاريخ صحيح",dateISO:"رجاء إدخال تاريخ صحيح (ISO)",number:"رجاء إدخال عدد بطريقة صحيحة",digits:"رجاء إدخال أرقام Ùقط",creditcard:"رجاء إدخال رقم بطاقة ائتمان صحيح",equalTo:"رجاء إدخال Ù†Ùس القيمة",extension:"رجاء إدخال مل٠بامتداد مواÙÙ‚ عليه",maxlength:a.validator.format("الحد الأقصى لعدد الحرو٠هو {0}"),minlength:a.validator.format("الحد الأدنى لعدد الحرو٠هو {0}"),rangelength:a.validator.format("عدد الحرو٠يجب أن يكون بين {0} Ùˆ {1}"),range:a.validator.format("رجاء إدخال عدد قيمته بين {0} Ùˆ {1}"),max:a.validator.format("رجاء إدخال عدد أقل من أو يساوي (0}"),min:a.validator.format("رجاء إدخال عدد أكبر من أو يساوي (0}")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_bg.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_bg.js
new file mode 100644
index 0000000..fea21cf
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_bg.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: BG (Bulgarian; българÑки език)
+ */
+$.extend($.validator.messages, {
+ required: "Полето е задължително.",
+ remote: "МолÑ, въведете правилната ÑтойноÑÑ‚.",
+ email: "МолÑ, въведете валиден email.",
+ url: "МолÑ, въведете валидно URL.",
+ date: "МолÑ, въведете валидна дата.",
+ dateISO: "МолÑ, въведете валидна дата (ISO).",
+ number: "МолÑ, въведете валиден номер.",
+ digits: "МолÑ, въведете Ñамо цифри.",
+ creditcard: "МолÑ, въведете валиден номер на кредитна карта.",
+ equalTo: "МолÑ, въведете Ñъщата ÑтойноÑÑ‚ отново.",
+ extension: "МолÑ, въведете ÑтойноÑÑ‚ Ñ Ð²Ð°Ð»Ð¸Ð´Ð½Ð¾ разширение.",
+ maxlength: $.validator.format("МолÑ, въведете повече от {0} Ñимвола."),
+ minlength: $.validator.format("МолÑ, въведете поне {0} Ñимвола."),
+ rangelength: $.validator.format("МолÑ, въведете ÑтойноÑÑ‚ Ñ Ð´ÑŠÐ»Ð¶Ð¸Ð½Ð° между {0} и {1} Ñимвола."),
+ range: $.validator.format("МолÑ, въведете ÑтойноÑÑ‚ между {0} и {1}."),
+ max: $.validator.format("МолÑ, въведете ÑтойноÑÑ‚ по-малка или равна на {0}."),
+ min: $.validator.format("МолÑ, въведете ÑтойноÑÑ‚ по-голÑма или равна на {0}.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_bg.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_bg.min.js
new file mode 100644
index 0000000..9a6a316
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_bg.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Полето е задължително.",remote:"МолÑ, въведете правилната ÑтойноÑÑ‚.",email:"МолÑ, въведете валиден email.",url:"МолÑ, въведете валидно URL.",date:"МолÑ, въведете валидна дата.",dateISO:"МолÑ, въведете валидна дата (ISO).",number:"МолÑ, въведете валиден номер.",digits:"МолÑ, въведете Ñамо цифри.",creditcard:"МолÑ, въведете валиден номер на кредитна карта.",equalTo:"МолÑ, въведете Ñъщата ÑтойноÑÑ‚ отново.",extension:"МолÑ, въведете ÑтойноÑÑ‚ Ñ Ð²Ð°Ð»Ð¸Ð´Ð½Ð¾ разширение.",maxlength:a.validator.format("МолÑ, въведете повече от {0} Ñимвола."),minlength:a.validator.format("МолÑ, въведете поне {0} Ñимвола."),rangelength:a.validator.format("МолÑ, въведете ÑтойноÑÑ‚ Ñ Ð´ÑŠÐ»Ð¶Ð¸Ð½Ð° между {0} и {1} Ñимвола."),range:a.validator.format("МолÑ, въведете ÑтойноÑÑ‚ между {0} и {1}."),max:a.validator.format("МолÑ, въведете ÑтойноÑÑ‚ по-малка или равна на {0}."),min:a.validator.format("МолÑ, въведете ÑтойноÑÑ‚ по-голÑма или равна на {0}.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ca.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ca.js
new file mode 100644
index 0000000..0b308e1
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ca.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: CA (Catalan; català)
+ */
+$.extend($.validator.messages, {
+ required: "Aquest camp és obligatori.",
+ remote: "Si us plau, omple aquest camp.",
+ email: "Si us plau, escriu una adreça de correu-e vàlida",
+ url: "Si us plau, escriu una URL vàlida.",
+ date: "Si us plau, escriu una data vàlida.",
+ dateISO: "Si us plau, escriu una data (ISO) vàlida.",
+ number: "Si us plau, escriu un número enter vàlid.",
+ digits: "Si us plau, escriu només dígits.",
+ creditcard: "Si us plau, escriu un número de tarjeta vàlid.",
+ equalTo: "Si us plau, escriu el maateix valor de nou.",
+ extension: "Si us plau, escriu un valor amb una extensió acceptada.",
+ maxlength: $.validator.format("Si us plau, no escriguis més de {0} caracters."),
+ minlength: $.validator.format("Si us plau, no escriguis menys de {0} caracters."),
+ rangelength: $.validator.format("Si us plau, escriu un valor entre {0} i {1} caracters."),
+ range: $.validator.format("Si us plau, escriu un valor entre {0} i {1}."),
+ max: $.validator.format("Si us plau, escriu un valor menor o igual a {0}."),
+ min: $.validator.format("Si us plau, escriu un valor major o igual a {0}.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ca.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ca.min.js
new file mode 100644
index 0000000..9e94f4f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ca.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Aquest camp és obligatori.",remote:"Si us plau, omple aquest camp.",email:"Si us plau, escriu una adreça de correu-e vàlida",url:"Si us plau, escriu una URL vàlida.",date:"Si us plau, escriu una data vàlida.",dateISO:"Si us plau, escriu una data (ISO) vàlida.",number:"Si us plau, escriu un número enter vàlid.",digits:"Si us plau, escriu només dígits.",creditcard:"Si us plau, escriu un número de tarjeta vàlid.",equalTo:"Si us plau, escriu el maateix valor de nou.",extension:"Si us plau, escriu un valor amb una extensió acceptada.",maxlength:a.validator.format("Si us plau, no escriguis més de {0} caracters."),minlength:a.validator.format("Si us plau, no escriguis menys de {0} caracters."),rangelength:a.validator.format("Si us plau, escriu un valor entre {0} i {1} caracters."),range:a.validator.format("Si us plau, escriu un valor entre {0} i {1}."),max:a.validator.format("Si us plau, escriu un valor menor o igual a {0}."),min:a.validator.format("Si us plau, escriu un valor major o igual a {0}.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_cs.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_cs.js
new file mode 100644
index 0000000..6c27e2b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_cs.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: CS (Czech; ÄeÅ¡tina, Äeský jazyk)
+ */
+$.extend($.validator.messages, {
+ required: "Tento údaj je povinný.",
+ remote: "Prosím, opravte tento údaj.",
+ email: "Prosím, zadejte platný e-mail.",
+ url: "Prosím, zadejte platné URL.",
+ date: "Prosím, zadejte platné datum.",
+ dateISO: "Prosím, zadejte platné datum (ISO).",
+ number: "Prosím, zadejte Äíslo.",
+ digits: "Prosím, zadávejte pouze Äíslice.",
+ creditcard: "Prosím, zadejte Äíslo kreditní karty.",
+ equalTo: "Prosím, zadejte znovu stejnou hodnotu.",
+ extension: "Prosím, zadejte soubor se správnou příponou.",
+ maxlength: $.validator.format("Prosím, zadejte nejvíce {0} znaků."),
+ minlength: $.validator.format("Prosím, zadejte nejméně {0} znaků."),
+ rangelength: $.validator.format("Prosím, zadejte od {0} do {1} znaků."),
+ range: $.validator.format("Prosím, zadejte hodnotu od {0} do {1}."),
+ max: $.validator.format("Prosím, zadejte hodnotu menší nebo rovnu {0}."),
+ min: $.validator.format("Prosím, zadejte hodnotu větší nebo rovnu {0}.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_cs.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_cs.min.js
new file mode 100644
index 0000000..586c7d5
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_cs.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Tento údaj je povinný.",remote:"Prosím, opravte tento údaj.",email:"Prosím, zadejte platný e-mail.",url:"Prosím, zadejte platné URL.",date:"Prosím, zadejte platné datum.",dateISO:"Prosím, zadejte platné datum (ISO).",number:"Prosím, zadejte Äíslo.",digits:"Prosím, zadávejte pouze Äíslice.",creditcard:"Prosím, zadejte Äíslo kreditní karty.",equalTo:"Prosím, zadejte znovu stejnou hodnotu.",extension:"Prosím, zadejte soubor se správnou příponou.",maxlength:a.validator.format("Prosím, zadejte nejvíce {0} znaků."),minlength:a.validator.format("Prosím, zadejte nejménÄ› {0} znaků."),rangelength:a.validator.format("Prosím, zadejte od {0} do {1} znaků."),range:a.validator.format("Prosím, zadejte hodnotu od {0} do {1}."),max:a.validator.format("Prosím, zadejte hodnotu menší nebo rovnu {0}."),min:a.validator.format("Prosím, zadejte hodnotu vÄ›tší nebo rovnu {0}.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_da.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_da.js
new file mode 100644
index 0000000..e862aba
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_da.js
@@ -0,0 +1,30 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: DA (Danish; dansk)
+ */
+$.extend($.validator.messages, {
+ required: "Dette felt er påkrævet.",
+ maxlength: $.validator.format("Indtast højst {0} tegn."),
+ minlength: $.validator.format("Indtast mindst {0} tegn."),
+ rangelength: $.validator.format("Indtast mindst {0} og højst {1} tegn."),
+ email: "Indtast en gyldig email-adresse.",
+ url: "Indtast en gyldig URL.",
+ date: "Indtast en gyldig dato.",
+ number: "Indtast et tal.",
+ digits: "Indtast kun cifre.",
+ equalTo: "Indtast den samme værdi igen.",
+ range: $.validator.format("Angiv en værdi mellem {0} og {1}."),
+ max: $.validator.format("Angiv en værdi der højst er {0}."),
+ min: $.validator.format("Angiv en værdi der mindst er {0}."),
+ creditcard: "Indtast et gyldigt kreditkortnummer."
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_da.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_da.min.js
new file mode 100644
index 0000000..3663bd6
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_da.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Dette felt er påkrævet.",maxlength:a.validator.format("Indtast højst {0} tegn."),minlength:a.validator.format("Indtast mindst {0} tegn."),rangelength:a.validator.format("Indtast mindst {0} og højst {1} tegn."),email:"Indtast en gyldig email-adresse.",url:"Indtast en gyldig URL.",date:"Indtast en gyldig dato.",number:"Indtast et tal.",digits:"Indtast kun cifre.",equalTo:"Indtast den samme værdi igen.",range:a.validator.format("Angiv en værdi mellem {0} og {1}."),max:a.validator.format("Angiv en værdi der højst er {0}."),min:a.validator.format("Angiv en værdi der mindst er {0}."),creditcard:"Indtast et gyldigt kreditkortnummer."})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_de.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_de.js
new file mode 100644
index 0000000..7f5bc8f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_de.js
@@ -0,0 +1,30 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: DE (German, Deutsch)
+ */
+$.extend($.validator.messages, {
+ required: "Dieses Feld ist ein Pflichtfeld.",
+ maxlength: $.validator.format("Geben Sie bitte maximal {0} Zeichen ein."),
+ minlength: $.validator.format("Geben Sie bitte mindestens {0} Zeichen ein."),
+ rangelength: $.validator.format("Geben Sie bitte mindestens {0} und maximal {1} Zeichen ein."),
+ email: "Geben Sie bitte eine gültige E-Mail Adresse ein.",
+ url: "Geben Sie bitte eine gültige URL ein.",
+ date: "Bitte geben Sie ein gültiges Datum ein.",
+ number: "Geben Sie bitte eine Nummer ein.",
+ digits: "Geben Sie bitte nur Ziffern ein.",
+ equalTo: "Bitte denselben Wert wiederholen.",
+ range: $.validator.format("Geben Sie bitte einen Wert zwischen {0} und {1} ein."),
+ max: $.validator.format("Geben Sie bitte einen Wert kleiner oder gleich {0} ein."),
+ min: $.validator.format("Geben Sie bitte einen Wert größer oder gleich {0} ein."),
+ creditcard: "Geben Sie bitte eine gültige Kreditkarten-Nummer ein."
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_de.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_de.min.js
new file mode 100644
index 0000000..d9c8d97
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_de.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Dieses Feld ist ein Pflichtfeld.",maxlength:a.validator.format("Geben Sie bitte maximal {0} Zeichen ein."),minlength:a.validator.format("Geben Sie bitte mindestens {0} Zeichen ein."),rangelength:a.validator.format("Geben Sie bitte mindestens {0} und maximal {1} Zeichen ein."),email:"Geben Sie bitte eine gültige E-Mail Adresse ein.",url:"Geben Sie bitte eine gültige URL ein.",date:"Bitte geben Sie ein gültiges Datum ein.",number:"Geben Sie bitte eine Nummer ein.",digits:"Geben Sie bitte nur Ziffern ein.",equalTo:"Bitte denselben Wert wiederholen.",range:a.validator.format("Geben Sie bitte einen Wert zwischen {0} und {1} ein."),max:a.validator.format("Geben Sie bitte einen Wert kleiner oder gleich {0} ein."),min:a.validator.format("Geben Sie bitte einen Wert größer oder gleich {0} ein."),creditcard:"Geben Sie bitte eine gültige Kreditkarten-Nummer ein."})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_el.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_el.js
new file mode 100644
index 0000000..5758f56
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_el.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: EL (Greek; ελληνικά)
+ */
+$.extend($.validator.messages, {
+ required: "Αυτό το πεδίο είναι υποχÏεωτικό.",
+ remote: "ΠαÏακαλώ διοÏθώστε αυτό το πεδίο.",
+ email: "ΠαÏακαλώ εισάγετε μια έγκυÏη διεÏθυνση email.",
+ url: "ΠαÏακαλώ εισάγετε ένα έγκυÏο URL.",
+ date: "ΠαÏακαλώ εισάγετε μια έγκυÏη ημεÏομηνία.",
+ dateISO: "ΠαÏακαλώ εισάγετε μια έγκυÏη ημεÏομηνία (ISO).",
+ number: "ΠαÏακαλώ εισάγετε έναν έγκυÏο αÏιθμό.",
+ digits: "ΠαÏακαλώ εισάγετε μόνο αÏιθμητικά ψηφία.",
+ creditcard: "ΠαÏακαλώ εισάγετε έναν έγκυÏο αÏιθμό πιστωτικής κάÏτας.",
+ equalTo: "ΠαÏακαλώ εισάγετε την ίδια τιμή ξανά.",
+ extension: "ΠαÏακαλώ εισάγετε μια τιμή με έγκυÏη επέκταση αÏχείου.",
+ maxlength: $.validator.format("ΠαÏακαλώ εισάγετε μέχÏι και {0} χαÏακτήÏες."),
+ minlength: $.validator.format("ΠαÏακαλώ εισάγετε τουλάχιστον {0} χαÏακτήÏες."),
+ rangelength: $.validator.format("ΠαÏακαλώ εισάγετε μια τιμή με μήκος Î¼ÎµÏ„Î±Î¾Ï {0} και {1} χαÏακτήÏων."),
+ range: $.validator.format("ΠαÏακαλώ εισάγετε μια τιμή Î¼ÎµÏ„Î±Î¾Ï {0} και {1}."),
+ max: $.validator.format("ΠαÏακαλώ εισάγετε μια τιμή μικÏότεÏη ή ίση του {0}."),
+ min: $.validator.format("ΠαÏακαλώ εισάγετε μια τιμή μεγαλÏτεÏη ή ίση του {0}.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_el.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_el.min.js
new file mode 100644
index 0000000..b8f91d1
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_el.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Αυτό το πεδίο είναι υποχÏεωτικό.",remote:"ΠαÏακαλώ διοÏθώστε αυτό το πεδίο.",email:"ΠαÏακαλώ εισάγετε μια έγκυÏη διεÏθυνση email.",url:"ΠαÏακαλώ εισάγετε ένα έγκυÏο URL.",date:"ΠαÏακαλώ εισάγετε μια έγκυÏη ημεÏομηνία.",dateISO:"ΠαÏακαλώ εισάγετε μια έγκυÏη ημεÏομηνία (ISO).",number:"ΠαÏακαλώ εισάγετε έναν έγκυÏο αÏιθμό.",digits:"ΠαÏακαλώ εισάγετε μόνο αÏιθμητικά ψηφία.",creditcard:"ΠαÏακαλώ εισάγετε έναν έγκυÏο αÏιθμό πιστωτικής κάÏτας.",equalTo:"ΠαÏακαλώ εισάγετε την ίδια τιμή ξανά.",extension:"ΠαÏακαλώ εισάγετε μια τιμή με έγκυÏη επέκταση αÏχείου.",maxlength:a.validator.format("ΠαÏακαλώ εισάγετε μέχÏι και {0} χαÏακτήÏες."),minlength:a.validator.format("ΠαÏακαλώ εισάγετε τουλάχιστον {0} χαÏακτήÏες."),rangelength:a.validator.format("ΠαÏακαλώ εισάγετε μια τιμή με μήκος Î¼ÎµÏ„Î±Î¾Ï {0} και {1} χαÏακτήÏων."),range:a.validator.format("ΠαÏακαλώ εισάγετε μια τιμή Î¼ÎµÏ„Î±Î¾Ï {0} και {1}."),max:a.validator.format("ΠαÏακαλώ εισάγετε μια τιμή μικÏότεÏη ή ίση του {0}."),min:a.validator.format("ΠαÏακαλώ εισάγετε μια τιμή μεγαλÏτεÏη ή ίση του {0}.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_es.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_es.js
new file mode 100644
index 0000000..bf37c17
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_es.js
@@ -0,0 +1,36 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: ES (Spanish; Español)
+ */
+$.extend($.validator.messages, {
+ required: "Este campo es obligatorio.",
+ remote: "Por favor, rellena este campo.",
+ email: "Por favor, escribe una dirección de correo válida.",
+ url: "Por favor, escribe una URL válida.",
+ date: "Por favor, escribe una fecha válida.",
+ dateISO: "Por favor, escribe una fecha (ISO) válida.",
+ number: "Por favor, escribe un número válido.",
+ digits: "Por favor, escribe sólo dígitos.",
+ creditcard: "Por favor, escribe un número de tarjeta válido.",
+ equalTo: "Por favor, escribe el mismo valor de nuevo.",
+ extension: "Por favor, escribe un valor con una extensión aceptada.",
+ maxlength: $.validator.format("Por favor, no escribas más de {0} caracteres."),
+ minlength: $.validator.format("Por favor, no escribas menos de {0} caracteres."),
+ rangelength: $.validator.format("Por favor, escribe un valor entre {0} y {1} caracteres."),
+ range: $.validator.format("Por favor, escribe un valor entre {0} y {1}."),
+ max: $.validator.format("Por favor, escribe un valor menor o igual a {0}."),
+ min: $.validator.format("Por favor, escribe un valor mayor o igual a {0}."),
+ nifES: "Por favor, escribe un NIF válido.",
+ nieES: "Por favor, escribe un NIE válido.",
+ cifES: "Por favor, escribe un CIF válido."
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_es.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_es.min.js
new file mode 100644
index 0000000..a248f1a
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_es.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Este campo es obligatorio.",remote:"Por favor, rellena este campo.",email:"Por favor, escribe una dirección de correo válida.",url:"Por favor, escribe una URL válida.",date:"Por favor, escribe una fecha válida.",dateISO:"Por favor, escribe una fecha (ISO) válida.",number:"Por favor, escribe un número válido.",digits:"Por favor, escribe sólo dígitos.",creditcard:"Por favor, escribe un número de tarjeta válido.",equalTo:"Por favor, escribe el mismo valor de nuevo.",extension:"Por favor, escribe un valor con una extensión aceptada.",maxlength:a.validator.format("Por favor, no escribas más de {0} caracteres."),minlength:a.validator.format("Por favor, no escribas menos de {0} caracteres."),rangelength:a.validator.format("Por favor, escribe un valor entre {0} y {1} caracteres."),range:a.validator.format("Por favor, escribe un valor entre {0} y {1}."),max:a.validator.format("Por favor, escribe un valor menor o igual a {0}."),min:a.validator.format("Por favor, escribe un valor mayor o igual a {0}."),nifES:"Por favor, escribe un NIF válido.",nieES:"Por favor, escribe un NIE válido.",cifES:"Por favor, escribe un CIF válido."})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_es_AR.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_es_AR.js
new file mode 100644
index 0000000..c7279e4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_es_AR.js
@@ -0,0 +1,37 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: ES (Spanish; Español)
+ * Region: AR (Argentina)
+ */
+$.extend($.validator.messages, {
+ required: "Este campo es obligatorio.",
+ remote: "Por favor, completá este campo.",
+ email: "Por favor, escribí una dirección de correo válida.",
+ url: "Por favor, escribí una URL válida.",
+ date: "Por favor, escribí una fecha válida.",
+ dateISO: "Por favor, escribí una fecha (ISO) válida.",
+ number: "Por favor, escribí un número entero válido.",
+ digits: "Por favor, escribí sólo dígitos.",
+ creditcard: "Por favor, escribí un número de tarjeta válido.",
+ equalTo: "Por favor, escribí el mismo valor de nuevo.",
+ extension: "Por favor, escribí un valor con una extensión aceptada.",
+ maxlength: $.validator.format("Por favor, no escribas más de {0} caracteres."),
+ minlength: $.validator.format("Por favor, no escribas menos de {0} caracteres."),
+ rangelength: $.validator.format("Por favor, escribí un valor entre {0} y {1} caracteres."),
+ range: $.validator.format("Por favor, escribí un valor entre {0} y {1}."),
+ max: $.validator.format("Por favor, escribí un valor menor o igual a {0}."),
+ min: $.validator.format("Por favor, escribí un valor mayor o igual a {0}."),
+ nifES: "Por favor, escribí un NIF válido.",
+ nieES: "Por favor, escribí un NIE válido.",
+ cifES: "Por favor, escribí un CIF válido."
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_es_AR.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_es_AR.min.js
new file mode 100644
index 0000000..18e663c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_es_AR.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Este campo es obligatorio.",remote:"Por favor, completá este campo.",email:"Por favor, escribí una dirección de correo válida.",url:"Por favor, escribí una URL válida.",date:"Por favor, escribí una fecha válida.",dateISO:"Por favor, escribí una fecha (ISO) válida.",number:"Por favor, escribí un número entero válido.",digits:"Por favor, escribí sólo dígitos.",creditcard:"Por favor, escribí un número de tarjeta válido.",equalTo:"Por favor, escribí el mismo valor de nuevo.",extension:"Por favor, escribí un valor con una extensión aceptada.",maxlength:a.validator.format("Por favor, no escribas más de {0} caracteres."),minlength:a.validator.format("Por favor, no escribas menos de {0} caracteres."),rangelength:a.validator.format("Por favor, escribí un valor entre {0} y {1} caracteres."),range:a.validator.format("Por favor, escribí un valor entre {0} y {1}."),max:a.validator.format("Por favor, escribí un valor menor o igual a {0}."),min:a.validator.format("Por favor, escribí un valor mayor o igual a {0}."),nifES:"Por favor, escribí un NIF válido.",nieES:"Por favor, escribí un NIE válido.",cifES:"Por favor, escribí un CIF válido."})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_et.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_et.js
new file mode 100644
index 0000000..0dd93cd
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_et.js
@@ -0,0 +1,31 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: ET (Estonian; eesti, eesti keel)
+ */
+$.extend($.validator.messages, {
+ required: "See väli peab olema täidetud.",
+ maxlength: $.validator.format("Palun sisestage vähem kui {0} tähemärki."),
+ minlength: $.validator.format("Palun sisestage vähemalt {0} tähemärki."),
+ rangelength: $.validator.format("Palun sisestage väärtus vahemikus {0} kuni {1} tähemärki."),
+ email: "Palun sisestage korrektne e-maili aadress.",
+ url: "Palun sisestage korrektne URL.",
+ date: "Palun sisestage korrektne kuupäev.",
+ dateISO: "Palun sisestage korrektne kuupäev (YYYY-MM-DD).",
+ number: "Palun sisestage korrektne number.",
+ digits: "Palun sisestage ainult numbreid.",
+ equalTo: "Palun sisestage sama väärtus uuesti.",
+ range: $.validator.format("Palun sisestage väärtus vahemikus {0} kuni {1}."),
+ max: $.validator.format("Palun sisestage väärtus, mis on väiksem või võrdne arvuga {0}."),
+ min: $.validator.format("Palun sisestage väärtus, mis on suurem või võrdne arvuga {0}."),
+ creditcard: "Palun sisestage korrektne krediitkaardi number."
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_et.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_et.min.js
new file mode 100644
index 0000000..54a8c5d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_et.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"See väli peab olema täidetud.",maxlength:a.validator.format("Palun sisestage vähem kui {0} tähemärki."),minlength:a.validator.format("Palun sisestage vähemalt {0} tähemärki."),rangelength:a.validator.format("Palun sisestage väärtus vahemikus {0} kuni {1} tähemärki."),email:"Palun sisestage korrektne e-maili aadress.",url:"Palun sisestage korrektne URL.",date:"Palun sisestage korrektne kuupäev.",dateISO:"Palun sisestage korrektne kuupäev (YYYY-MM-DD).",number:"Palun sisestage korrektne number.",digits:"Palun sisestage ainult numbreid.",equalTo:"Palun sisestage sama väärtus uuesti.",range:a.validator.format("Palun sisestage väärtus vahemikus {0} kuni {1}."),max:a.validator.format("Palun sisestage väärtus, mis on väiksem või võrdne arvuga {0}."),min:a.validator.format("Palun sisestage väärtus, mis on suurem või võrdne arvuga {0}."),creditcard:"Palun sisestage korrektne krediitkaardi number."})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_eu.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_eu.js
new file mode 100644
index 0000000..a9b0777
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_eu.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: EU (Basque; euskara, euskera)
+ */
+$.extend($.validator.messages, {
+ required: "Eremu hau beharrezkoa da.",
+ remote: "Mesedez, bete eremu hau.",
+ email: "Mesedez, idatzi baliozko posta helbide bat.",
+ url: "Mesedez, idatzi baliozko URL bat.",
+ date: "Mesedez, idatzi baliozko data bat.",
+ dateISO: "Mesedez, idatzi baliozko (ISO) data bat.",
+ number: "Mesedez, idatzi baliozko zenbaki oso bat.",
+ digits: "Mesedez, idatzi digituak soilik.",
+ creditcard: "Mesedez, idatzi baliozko txartel zenbaki bat.",
+ equalTo: "Mesedez, idatzi berdina berriro ere.",
+ extension: "Mesedez, idatzi onartutako luzapena duen balio bat.",
+ maxlength: $.validator.format("Mesedez, ez idatzi {0} karaktere baino gehiago."),
+ minlength: $.validator.format("Mesedez, ez idatzi {0} karaktere baino gutxiago."),
+ rangelength: $.validator.format("Mesedez, idatzi {0} eta {1} karaktere arteko balio bat."),
+ range: $.validator.format("Mesedez, idatzi {0} eta {1} arteko balio bat."),
+ max: $.validator.format("Mesedez, idatzi {0} edo txikiagoa den balio bat."),
+ min: $.validator.format("Mesedez, idatzi {0} edo handiagoa den balio bat.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_eu.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_eu.min.js
new file mode 100644
index 0000000..caa3bb6
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_eu.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Eremu hau beharrezkoa da.",remote:"Mesedez, bete eremu hau.",email:"Mesedez, idatzi baliozko posta helbide bat.",url:"Mesedez, idatzi baliozko URL bat.",date:"Mesedez, idatzi baliozko data bat.",dateISO:"Mesedez, idatzi baliozko (ISO) data bat.",number:"Mesedez, idatzi baliozko zenbaki oso bat.",digits:"Mesedez, idatzi digituak soilik.",creditcard:"Mesedez, idatzi baliozko txartel zenbaki bat.",equalTo:"Mesedez, idatzi berdina berriro ere.",extension:"Mesedez, idatzi onartutako luzapena duen balio bat.",maxlength:a.validator.format("Mesedez, ez idatzi {0} karaktere baino gehiago."),minlength:a.validator.format("Mesedez, ez idatzi {0} karaktere baino gutxiago."),rangelength:a.validator.format("Mesedez, idatzi {0} eta {1} karaktere arteko balio bat."),range:a.validator.format("Mesedez, idatzi {0} eta {1} arteko balio bat."),max:a.validator.format("Mesedez, idatzi {0} edo txikiagoa den balio bat."),min:a.validator.format("Mesedez, idatzi {0} edo handiagoa den balio bat.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fa.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fa.js
new file mode 100644
index 0000000..eb7d336
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fa.js
@@ -0,0 +1,36 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: FA (Persian; Ùارسی)
+ */
+$.extend($.validator.messages, {
+ required: "تکمیل این Ùیلد اجباری است.",
+ remote: "لطÙا این Ùیلد را تصحیح کنید.",
+ email: ".لطÙا یک ایمیل صحیح وارد کنید",
+ url: "لطÙا آدرس صحیح وارد کنید.",
+ date: "لطÙا یک تاریخ صحیح وارد کنید",
+ dateFA: "لطÙا یک تاریخ صحیح وارد کنید",
+ dateISO: "لطÙا تاریخ صحیح وارد کنید (ISO).",
+ number: "لطÙا عدد صحیح وارد کنید.",
+ digits: "لطÙا تنها رقم وارد کنید",
+ creditcard: "لطÙا کریدیت کارت صحیح وارد کنید.",
+ equalTo: "لطÙا مقدار برابری وارد کنید",
+ extension: "لطÙا مقداری وارد کنید Ú©Ù‡ ",
+ maxlength: $.validator.format("لطÙا بیشتر از {0} حر٠وارد نکنید."),
+ minlength: $.validator.format("لطÙا کمتر از {0} حر٠وارد نکنید."),
+ rangelength: $.validator.format("لطÙا مقداری بین {0} تا {1} حر٠وارد کنید."),
+ range: $.validator.format("لطÙا مقداری بین {0} تا {1} حر٠وارد کنید."),
+ max: $.validator.format("لطÙا مقداری کمتر از {0} حر٠وارد کنید."),
+ min: $.validator.format("لطÙا مقداری بیشتر از {0} حر٠وارد کنید."),
+ minWords: $.validator.format("لطÙا حداقل {0} کلمه وارد کنید."),
+ maxWords: $.validator.format("لطÙا حداکثر {0} کلمه وارد کنید.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fa.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fa.min.js
new file mode 100644
index 0000000..94e151c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fa.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"تکمیل این Ùیلد اجباری است.",remote:"لطÙا این Ùیلد را تصحیح کنید.",email:".لطÙا یک ایمیل صحیح وارد کنید",url:"لطÙا آدرس صحیح وارد کنید.",date:"لطÙا یک تاریخ صحیح وارد کنید",dateFA:"لطÙا یک تاریخ صحیح وارد کنید",dateISO:"لطÙا تاریخ صحیح وارد کنید (ISO).",number:"لطÙا عدد صحیح وارد کنید.",digits:"لطÙا تنها رقم وارد کنید",creditcard:"لطÙا کریدیت کارت صحیح وارد کنید.",equalTo:"لطÙا مقدار برابری وارد کنید",extension:"لطÙا مقداری وارد کنید Ú©Ù‡ ",maxlength:a.validator.format("لطÙا بیشتر از {0} حر٠وارد نکنید."),minlength:a.validator.format("لطÙا کمتر از {0} حر٠وارد نکنید."),rangelength:a.validator.format("لطÙا مقداری بین {0} تا {1} حر٠وارد کنید."),range:a.validator.format("لطÙا مقداری بین {0} تا {1} حر٠وارد کنید."),max:a.validator.format("لطÙا مقداری کمتر از {0} حر٠وارد کنید."),min:a.validator.format("لطÙا مقداری بیشتر از {0} حر٠وارد کنید."),minWords:a.validator.format("لطÙا حداقل {0} کلمه وارد کنید."),maxWords:a.validator.format("لطÙا حداکثر {0} کلمه وارد کنید.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fi.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fi.js
new file mode 100644
index 0000000..1486128
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fi.js
@@ -0,0 +1,31 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: FI (Finnish; suomi, suomen kieli)
+ */
+$.extend($.validator.messages, {
+ required: "T&auml;m&auml; kentt&auml; on pakollinen.",
+ email: "Sy&ouml;t&auml; oikea s&auml;hk&ouml;postiosoite.",
+ url: "Sy&ouml;t&auml; oikea URL osoite.",
+ date: "Sy&ouml;t&auml; oike p&auml;iv&auml;m&auml;&auml;r&auml;.",
+ dateISO: "Sy&ouml;t&auml; oike p&auml;iv&auml;m&auml;&auml;r&auml; (VVVV-MM-DD).",
+ number: "Sy&ouml;t&auml; numero.",
+ creditcard: "Sy&ouml;t&auml; voimassa oleva luottokorttinumero.",
+ digits: "Sy&ouml;t&auml; pelk&auml;st&auml;&auml;n numeroita.",
+ equalTo: "Sy&ouml;t&auml; sama arvo uudestaan.",
+ maxlength: $.validator.format("Voit sy&ouml;tt&auml;&auml; enint&auml;&auml;n {0} merkki&auml;."),
+ minlength: $.validator.format("V&auml;hint&auml;&auml;n {0} merkki&auml;."),
+ rangelength: $.validator.format("Sy&ouml;t&auml; v&auml;hint&auml;&auml;n {0} ja enint&auml;&auml;n {1} merkki&auml;."),
+ range: $.validator.format("Sy&ouml;t&auml; arvo {0} ja {1} v&auml;lilt&auml;."),
+ max: $.validator.format("Sy&ouml;t&auml; arvo joka on pienempi tai yht&auml; suuri kuin {0}."),
+ min: $.validator.format("Sy&ouml;t&auml; arvo joka on yht&auml; suuri tai suurempi kuin {0}.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fi.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fi.min.js
new file mode 100644
index 0000000..7cf0e97
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fi.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"T&auml;m&auml; kentt&auml; on pakollinen.",email:"Sy&ouml;t&auml; oikea s&auml;hk&ouml;postiosoite.",url:"Sy&ouml;t&auml; oikea URL osoite.",date:"Sy&ouml;t&auml; oike p&auml;iv&auml;m&auml;&auml;r&auml;.",dateISO:"Sy&ouml;t&auml; oike p&auml;iv&auml;m&auml;&auml;r&auml; (VVVV-MM-DD).",number:"Sy&ouml;t&auml; numero.",creditcard:"Sy&ouml;t&auml; voimassa oleva luottokorttinumero.",digits:"Sy&ouml;t&auml; pelk&auml;st&auml;&auml;n numeroita.",equalTo:"Sy&ouml;t&auml; sama arvo uudestaan.",maxlength:a.validator.format("Voit sy&ouml;tt&auml;&auml; enint&auml;&auml;n {0} merkki&auml;."),minlength:a.validator.format("V&auml;hint&auml;&auml;n {0} merkki&auml;."),rangelength:a.validator.format("Sy&ouml;t&auml; v&auml;hint&auml;&auml;n {0} ja enint&auml;&auml;n {1} merkki&auml;."),range:a.validator.format("Sy&ouml;t&auml; arvo {0} ja {1} v&auml;lilt&auml;."),max:a.validator.format("Sy&ouml;t&auml; arvo joka on pienempi tai yht&auml; suuri kuin {0}."),min:a.validator.format("Sy&ouml;t&auml; arvo joka on yht&auml; suuri tai suurempi kuin {0}.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fr.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fr.js
new file mode 100644
index 0000000..d465538
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fr.js
@@ -0,0 +1,59 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: FR (French; français)
+ */
+$.extend($.validator.messages, {
+ required: "Ce champ est obligatoire.",
+ remote: "Veuillez corriger ce champ.",
+ email: "Veuillez fournir une adresse électronique valide.",
+ url: "Veuillez fournir une adresse URL valide.",
+ date: "Veuillez fournir une date valide.",
+ dateISO: "Veuillez fournir une date valide (ISO).",
+ number: "Veuillez fournir un numéro valide.",
+ digits: "Veuillez fournir seulement des chiffres.",
+ creditcard: "Veuillez fournir un numéro de carte de crédit valide.",
+ equalTo: "Veuillez fournir encore la même valeur.",
+ extension: "Veuillez fournir une valeur avec une extension valide.",
+ maxlength: $.validator.format("Veuillez fournir au plus {0} caractères."),
+ minlength: $.validator.format("Veuillez fournir au moins {0} caractères."),
+ rangelength: $.validator.format("Veuillez fournir une valeur qui contient entre {0} et {1} caractères."),
+ range: $.validator.format("Veuillez fournir une valeur entre {0} et {1}."),
+ max: $.validator.format("Veuillez fournir une valeur inférieure ou égale à {0}."),
+ min: $.validator.format("Veuillez fournir une valeur supérieure ou égale à {0}."),
+ maxWords: $.validator.format("Veuillez fournir au plus {0} mots."),
+ minWords: $.validator.format("Veuillez fournir au moins {0} mots."),
+ rangeWords: $.validator.format("Veuillez fournir entre {0} et {1} mots."),
+ letterswithbasicpunc: "Veuillez fournir seulement des lettres et des signes de ponctuation.",
+ alphanumeric: "Veuillez fournir seulement des lettres, nombres, espaces et soulignages.",
+ lettersonly: "Veuillez fournir seulement des lettres.",
+ nowhitespace: "Veuillez ne pas inscrire d'espaces blancs.",
+ ziprange: "Veuillez fournir un code postal entre 902xx-xxxx et 905-xx-xxxx.",
+ integer: "Veuillez fournir un nombre non décimal qui est positif ou négatif.",
+ vinUS: "Veuillez fournir un numéro d'identification du véhicule (VIN).",
+ dateITA: "Veuillez fournir une date valide.",
+ time: "Veuillez fournir une heure valide entre 00:00 et 23:59.",
+ phoneUS: "Veuillez fournir un numéro de téléphone valide.",
+ phoneUK: "Veuillez fournir un numéro de téléphone valide.",
+ mobileUK: "Veuillez fournir un numéro de téléphone mobile valide.",
+ strippedminlength: $.validator.format("Veuillez fournir au moins {0} caractères."),
+ email2: "Veuillez fournir une adresse électronique valide.",
+ url2: "Veuillez fournir une adresse URL valide.",
+ creditcardtypes: "Veuillez fournir un numéro de carte de crédit valide.",
+ ipv4: "Veuillez fournir une adresse IP v4 valide.",
+ ipv6: "Veuillez fournir une adresse IP v6 valide.",
+ require_from_group: "Veuillez fournir au moins {0} de ces champs.",
+ nifES: "Veuillez fournir un numéro NIF valide.",
+ nieES: "Veuillez fournir un numéro NIE valide.",
+ cifES: "Veuillez fournir un numéro CIF valide.",
+ postalCodeCA: "Veuillez fournir un code postal valide."
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fr.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fr.min.js
new file mode 100644
index 0000000..065760f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_fr.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Ce champ est obligatoire.",remote:"Veuillez corriger ce champ.",email:"Veuillez fournir une adresse électronique valide.",url:"Veuillez fournir une adresse URL valide.",date:"Veuillez fournir une date valide.",dateISO:"Veuillez fournir une date valide (ISO).",number:"Veuillez fournir un numéro valide.",digits:"Veuillez fournir seulement des chiffres.",creditcard:"Veuillez fournir un numéro de carte de crédit valide.",equalTo:"Veuillez fournir encore la même valeur.",extension:"Veuillez fournir une valeur avec une extension valide.",maxlength:a.validator.format("Veuillez fournir au plus {0} caractères."),minlength:a.validator.format("Veuillez fournir au moins {0} caractères."),rangelength:a.validator.format("Veuillez fournir une valeur qui contient entre {0} et {1} caractères."),range:a.validator.format("Veuillez fournir une valeur entre {0} et {1}."),max:a.validator.format("Veuillez fournir une valeur inférieure ou égale à {0}."),min:a.validator.format("Veuillez fournir une valeur supérieure ou égale à {0}."),maxWords:a.validator.format("Veuillez fournir au plus {0} mots."),minWords:a.validator.format("Veuillez fournir au moins {0} mots."),rangeWords:a.validator.format("Veuillez fournir entre {0} et {1} mots."),letterswithbasicpunc:"Veuillez fournir seulement des lettres et des signes de ponctuation.",alphanumeric:"Veuillez fournir seulement des lettres, nombres, espaces et soulignages.",lettersonly:"Veuillez fournir seulement des lettres.",nowhitespace:"Veuillez ne pas inscrire d'espaces blancs.",ziprange:"Veuillez fournir un code postal entre 902xx-xxxx et 905-xx-xxxx.",integer:"Veuillez fournir un nombre non décimal qui est positif ou négatif.",vinUS:"Veuillez fournir un numéro d'identification du véhicule (VIN).",dateITA:"Veuillez fournir une date valide.",time:"Veuillez fournir une heure valide entre 00:00 et 23:59.",phoneUS:"Veuillez fournir un numéro de téléphone valide.",phoneUK:"Veuillez fournir un numéro de téléphone valide.",mobileUK:"Veuillez fournir un numéro de téléphone mobile valide.",strippedminlength:a.validator.format("Veuillez fournir au moins {0} caractères."),email2:"Veuillez fournir une adresse électronique valide.",url2:"Veuillez fournir une adresse URL valide.",creditcardtypes:"Veuillez fournir un numéro de carte de crédit valide.",ipv4:"Veuillez fournir une adresse IP v4 valide.",ipv6:"Veuillez fournir une adresse IP v6 valide.",require_from_group:"Veuillez fournir au moins {0} de ces champs.",nifES:"Veuillez fournir un numéro NIF valide.",nieES:"Veuillez fournir un numéro NIE valide.",cifES:"Veuillez fournir un numéro CIF valide.",postalCodeCA:"Veuillez fournir un code postal valide."})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_gl.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_gl.js
new file mode 100644
index 0000000..a36f609
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_gl.js
@@ -0,0 +1,38 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: GL (Galician; Galego)
+ */
+(function($) {
+ $.extend($.validator.messages, {
+ required: "Este campo é obrigatorio.",
+ remote: "Por favor, cubre este campo.",
+ email: "Por favor, escribe unha dirección de correo válida.",
+ url: "Por favor, escribe unha URL válida.",
+ date: "Por favor, escribe unha data válida.",
+ dateISO: "Por favor, escribe unha data (ISO) válida.",
+ number: "Por favor, escribe un número válido.",
+ digits: "Por favor, escribe só díxitos.",
+ creditcard: "Por favor, escribe un número de tarxeta válido.",
+ equalTo: "Por favor, escribe o mesmo valor de novo.",
+ extension: "Por favor, escribe un valor cunha extensión aceptada.",
+ maxlength: $.validator.format("Por favor, non escribas máis de {0} caracteres."),
+ minlength: $.validator.format("Por favor, non escribas menos de {0} caracteres."),
+ rangelength: $.validator.format("Por favor, escribe un valor entre {0} e {1} caracteres."),
+ range: $.validator.format("Por favor, escribe un valor entre {0} e {1}."),
+ max: $.validator.format("Por favor, escribe un valor menor ou igual a {0}."),
+ min: $.validator.format("Por favor, escribe un valor maior ou igual a {0}."),
+ nifES: "Por favor, escribe un NIF válido.",
+ nieES: "Por favor, escribe un NIE válido.",
+ cifES: "Por favor, escribe un CIF válido."
+ });
+}(jQuery));
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_gl.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_gl.min.js
new file mode 100644
index 0000000..1a77f40
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_gl.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(){!function(a){a.extend(a.validator.messages,{required:"Este campo é obrigatorio.",remote:"Por favor, cubre este campo.",email:"Por favor, escribe unha dirección de correo válida.",url:"Por favor, escribe unha URL válida.",date:"Por favor, escribe unha data válida.",dateISO:"Por favor, escribe unha data (ISO) válida.",number:"Por favor, escribe un número válido.",digits:"Por favor, escribe só díxitos.",creditcard:"Por favor, escribe un número de tarxeta válido.",equalTo:"Por favor, escribe o mesmo valor de novo.",extension:"Por favor, escribe un valor cunha extensión aceptada.",maxlength:a.validator.format("Por favor, non escribas máis de {0} caracteres."),minlength:a.validator.format("Por favor, non escribas menos de {0} caracteres."),rangelength:a.validator.format("Por favor, escribe un valor entre {0} e {1} caracteres."),range:a.validator.format("Por favor, escribe un valor entre {0} e {1}."),max:a.validator.format("Por favor, escribe un valor menor ou igual a {0}."),min:a.validator.format("Por favor, escribe un valor maior ou igual a {0}."),nifES:"Por favor, escribe un NIF válido.",nieES:"Por favor, escribe un NIE válido.",cifES:"Por favor, escribe un CIF válido."})}(jQuery)}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_he.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_he.js
new file mode 100644
index 0000000..b50beb0
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_he.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: HE (Hebrew; עברית)
+ */
+$.extend($.validator.messages, {
+ required: "השדה הזה הינו שדה חובה",
+ remote: "× × ×œ×ª×§×Ÿ שדה ×–×”",
+ email: "× × ×œ×ž×œ× ×›×ª×•×‘×ª דו×\"ל חוקית",
+ url: "× × ×œ×ž×œ× ×›×ª×•×‘×ª ×ינטרנט חוקית",
+ date: "× × ×œ×ž×œ× ×ª×ריך חוקי",
+ dateISO: "× × ×œ×ž×œ× ×ª×ריך חוקי (ISO)",
+ number: "× × ×œ×ž×œ× ×ž×¡×¤×¨",
+ digits: "× × ×œ×ž×œ× ×¨×§ מספרי×",
+ creditcard: "× × ×œ×ž×œ× ×ž×¡×¤×¨ כרטיס ×שר××™ חוקי",
+ equalTo: "× × ×œ×ž×œ× ×ת ×ותו ערך שוב",
+ extension: "× × ×œ×ž×œ× ×¢×¨×š ×¢× ×¡×™×•×ž×ª חוקית",
+ maxlength: $.validator.format(".× × ×œ× ×œ×ž×œ× ×™×•×ª×¨ מ- {0} תווי×"),
+ minlength: $.validator.format("× × ×œ×ž×œ× ×œ×¤×—×•×ª {0} תווי×"),
+ rangelength: $.validator.format("× × ×œ×ž×œ× ×¢×¨×š בין {0} ל- {1} תווי×"),
+ range: $.validator.format("× × ×œ×ž×œ× ×¢×¨×š בין {0} ל- {1}"),
+ max: $.validator.format("× × ×œ×ž×œ× ×¢×¨×š קטן ×ו שווה ל- {0}"),
+ min: $.validator.format("× × ×œ×ž×œ× ×¢×¨×š גדול ×ו שווה ל- {0}")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_he.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_he.min.js
new file mode 100644
index 0000000..e0e8001
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_he.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"השדה ×”×–×” הינו שדה חובה",remote:"× × ×œ×ª×§×Ÿ שדה ×–×”",email:'× × ×œ×ž×œ× ×›×ª×•×‘×ª דו×"ל חוקית',url:"× × ×œ×ž×œ× ×›×ª×•×‘×ª ×ינטרנט חוקית",date:"× × ×œ×ž×œ× ×ª×ריך חוקי",dateISO:"× × ×œ×ž×œ× ×ª×ריך חוקי (ISO)",number:"× × ×œ×ž×œ× ×ž×¡×¤×¨",digits:"× × ×œ×ž×œ× ×¨×§ מספרי×",creditcard:"× × ×œ×ž×œ× ×ž×¡×¤×¨ כרטיס ×שר××™ חוקי",equalTo:"× × ×œ×ž×œ× ×ת ×ותו ערך שוב",extension:"× × ×œ×ž×œ× ×¢×¨×š ×¢× ×¡×™×•×ž×ª חוקית",maxlength:a.validator.format(".× × ×œ× ×œ×ž×œ× ×™×•×ª×¨ מ- {0} תווי×"),minlength:a.validator.format("× × ×œ×ž×œ× ×œ×¤×—×•×ª {0} תווי×"),rangelength:a.validator.format("× × ×œ×ž×œ× ×¢×¨×š בין {0} ל- {1} תווי×"),range:a.validator.format("× × ×œ×ž×œ× ×¢×¨×š בין {0} ל- {1}"),max:a.validator.format("× × ×œ×ž×œ× ×¢×¨×š קטן ×ו שווה ל- {0}"),min:a.validator.format("× × ×œ×ž×œ× ×¢×¨×š גדול ×ו שווה ל- {0}")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_hr.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_hr.js
new file mode 100644
index 0000000..792ac44
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_hr.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: HR (Croatia; hrvatski jezik)
+ */
+$.extend($.validator.messages, {
+ required: "Ovo polje je obavezno.",
+ remote: "Ovo polje treba popraviti.",
+ email: "Unesite ispravnu e-mail adresu.",
+ url: "Unesite ispravan URL.",
+ date: "Unesite ispravan datum.",
+ dateISO: "Unesite ispravan datum (ISO).",
+ number: "Unesite ispravan broj.",
+ digits: "Unesite samo brojeve.",
+ creditcard: "Unesite ispravan broj kreditne kartice.",
+ equalTo: "Unesite ponovo istu vrijednost.",
+ extension: "Unesite vrijednost sa ispravnom ekstenzijom.",
+ maxlength: $.validator.format("Maksimalni broj znakova je {0} ."),
+ minlength: $.validator.format("Minimalni broj znakova je {0} ."),
+ rangelength: $.validator.format("Unesite vrijednost između {0} i {1} znakova."),
+ range: $.validator.format("Unesite vrijednost između {0} i {1}."),
+ max: $.validator.format("Unesite vrijednost manju ili jednaku {0}."),
+ min: $.validator.format("Unesite vrijednost veću ili jednaku {0}.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_hr.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_hr.min.js
new file mode 100644
index 0000000..184fe8a
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_hr.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Ovo polje je obavezno.",remote:"Ovo polje treba popraviti.",email:"Unesite ispravnu e-mail adresu.",url:"Unesite ispravan URL.",date:"Unesite ispravan datum.",dateISO:"Unesite ispravan datum (ISO).",number:"Unesite ispravan broj.",digits:"Unesite samo brojeve.",creditcard:"Unesite ispravan broj kreditne kartice.",equalTo:"Unesite ponovo istu vrijednost.",extension:"Unesite vrijednost sa ispravnom ekstenzijom.",maxlength:a.validator.format("Maksimalni broj znakova je {0} ."),minlength:a.validator.format("Minimalni broj znakova je {0} ."),rangelength:a.validator.format("Unesite vrijednost između {0} i {1} znakova."),range:a.validator.format("Unesite vrijednost između {0} i {1}."),max:a.validator.format("Unesite vrijednost manju ili jednaku {0}."),min:a.validator.format("Unesite vrijednost veću ili jednaku {0}.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_hu.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_hu.js
new file mode 100644
index 0000000..735bc3b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_hu.js
@@ -0,0 +1,32 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: HU (Hungarian; Magyar)
+ */
+$.extend($.validator.messages, {
+ required: "Kötelező megadni.",
+ maxlength: $.validator.format("Legfeljebb {0} karakter hosszú legyen."),
+ minlength: $.validator.format("Legalább {0} karakter hosszú legyen."),
+ rangelength: $.validator.format("Legalább {0} és legfeljebb {1} karakter hosszú legyen."),
+ email: "Érvényes e-mail címnek kell lennie.",
+ url: "Érvényes URL-nek kell lennie.",
+ date: "Dátumnak kell lennie.",
+ number: "Számnak kell lennie.",
+ digits: "Csak számjegyek lehetnek.",
+ equalTo: "Meg kell egyeznie a két értéknek.",
+ range: $.validator.format("{0} és {1} közé kell esnie."),
+ max: $.validator.format("Nem lehet nagyobb, mint {0}."),
+ min: $.validator.format("Nem lehet kisebb, mint {0}."),
+ creditcard: "Érvényes hitelkártyaszámnak kell lennie.",
+ remote: "Kérem javítsa ki ezt a mezőt.",
+ dateISO: "Kérem írjon be egy érvényes dátumot (ISO)."
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_hu.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_hu.min.js
new file mode 100644
index 0000000..55e615e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_hu.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Kötelező megadni.",maxlength:a.validator.format("Legfeljebb {0} karakter hosszú legyen."),minlength:a.validator.format("Legalább {0} karakter hosszú legyen."),rangelength:a.validator.format("Legalább {0} és legfeljebb {1} karakter hosszú legyen."),email:"Érvényes e-mail címnek kell lennie.",url:"Érvényes URL-nek kell lennie.",date:"Dátumnak kell lennie.",number:"Számnak kell lennie.",digits:"Csak számjegyek lehetnek.",equalTo:"Meg kell egyeznie a két értéknek.",range:a.validator.format("{0} és {1} közé kell esnie."),max:a.validator.format("Nem lehet nagyobb, mint {0}."),min:a.validator.format("Nem lehet kisebb, mint {0}."),creditcard:"Érvényes hitelkártyaszámnak kell lennie.",remote:"Kérem javítsa ki ezt a mezőt.",dateISO:"Kérem írjon be egy érvényes dátumot (ISO)."})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_id.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_id.js
new file mode 100644
index 0000000..48f7b9a
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_id.js
@@ -0,0 +1,32 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: ID (Indonesia; Indonesian)
+ */
+$.extend($.validator.messages, {
+ required: "Kolom ini diperlukan.",
+ remote: "Harap benarkan kolom ini.",
+ email: "Silakan masukkan format email yang benar.",
+ url: "Silakan masukkan format URL yang benar.",
+ date: "Silakan masukkan format tanggal yang benar.",
+ dateISO: "Silakan masukkan format tanggal(ISO) yang benar.",
+ number: "Silakan masukkan angka yang benar.",
+ digits: "Harap masukan angka saja.",
+ creditcard: "Harap masukkan format kartu kredit yang benar.",
+ equalTo: "Harap masukkan nilai yg sama dengan sebelumnya.",
+ maxlength: $.validator.format("Input dibatasi hanya {0} karakter."),
+ minlength: $.validator.format("Input tidak kurang dari {0} karakter."),
+ rangelength: $.validator.format("Panjang karakter yg diizinkan antara {0} dan {1} karakter."),
+ range: $.validator.format("Harap masukkan nilai antara {0} dan {1}."),
+ max: $.validator.format("Harap masukkan nilai lebih kecil atau sama dengan {0}."),
+ min: $.validator.format("Harap masukkan nilai lebih besar atau sama dengan {0}.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_id.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_id.min.js
new file mode 100644
index 0000000..5096c8d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_id.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Kolom ini diperlukan.",remote:"Harap benarkan kolom ini.",email:"Silakan masukkan format email yang benar.",url:"Silakan masukkan format URL yang benar.",date:"Silakan masukkan format tanggal yang benar.",dateISO:"Silakan masukkan format tanggal(ISO) yang benar.",number:"Silakan masukkan angka yang benar.",digits:"Harap masukan angka saja.",creditcard:"Harap masukkan format kartu kredit yang benar.",equalTo:"Harap masukkan nilai yg sama dengan sebelumnya.",maxlength:a.validator.format("Input dibatasi hanya {0} karakter."),minlength:a.validator.format("Input tidak kurang dari {0} karakter."),rangelength:a.validator.format("Panjang karakter yg diizinkan antara {0} dan {1} karakter."),range:a.validator.format("Harap masukkan nilai antara {0} dan {1}."),max:a.validator.format("Harap masukkan nilai lebih kecil atau sama dengan {0}."),min:a.validator.format("Harap masukkan nilai lebih besar atau sama dengan {0}.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_is.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_is.js
new file mode 100644
index 0000000..00948d4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_is.js
@@ -0,0 +1,31 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: IS (Icelandic; íslenska)
+ */
+$.extend($.validator.messages, {
+ required: "Þessi reitur er nauðsynlegur.",
+ remote: "Lagaðu þennan reit.",
+ maxlength: $.validator.format("Sláðu inn mest {0} stafi."),
+ minlength: $.validator.format("Sláðu inn minnst {0} stafi."),
+ rangelength: $.validator.format("Sláðu inn minnst {0} og mest {1} stafi."),
+ email: "Sláðu inn gilt netfang.",
+ url: "Sláðu inn gilda vefslóð.",
+ date: "Sláðu inn gilda dagsetningu.",
+ number: "Sláðu inn tölu.",
+ digits: "Sláðu inn tölustafi eingöngu.",
+ equalTo: "Sláðu sama gildi inn aftur.",
+ range: $.validator.format("Sláðu inn gildi milli {0} og {1}."),
+ max: $.validator.format("Sláðu inn gildi sem er minna en eða jafnt og {0}."),
+ min: $.validator.format("Sláðu inn gildi sem er stærra en eða jafnt og {0}."),
+ creditcard: "Sláðu inn gilt greiðslukortanúmer."
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_is.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_is.min.js
new file mode 100644
index 0000000..bbd362e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_is.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Þessi reitur er nauðsynlegur.",remote:"Lagaðu þennan reit.",maxlength:a.validator.format("Sláðu inn mest {0} stafi."),minlength:a.validator.format("Sláðu inn minnst {0} stafi."),rangelength:a.validator.format("Sláðu inn minnst {0} og mest {1} stafi."),email:"Sláðu inn gilt netfang.",url:"Sláðu inn gilda vefslóð.",date:"Sláðu inn gilda dagsetningu.",number:"Sláðu inn tölu.",digits:"Sláðu inn tölustafi eingöngu.",equalTo:"Sláðu sama gildi inn aftur.",range:a.validator.format("Sláðu inn gildi milli {0} og {1}."),max:a.validator.format("Sláðu inn gildi sem er minna en eða jafnt og {0}."),min:a.validator.format("Sláðu inn gildi sem er stærra en eða jafnt og {0}."),creditcard:"Sláðu inn gilt greiðslukortanúmer."})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_it.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_it.js
new file mode 100644
index 0000000..7fbee3b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_it.js
@@ -0,0 +1,36 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: IT (Italian; Italiano)
+ */
+$.extend($.validator.messages, {
+ required: "Campo obbligatorio.",
+ remote: "Controlla questo campo.",
+ email: "Inserisci un indirizzo email valido.",
+ url: "Inserisci un indirizzo web valido.",
+ date: "Inserisci una data valida.",
+ dateISO: "Inserisci una data valida (ISO).",
+ number: "Inserisci un numero valido.",
+ digits: "Inserisci solo numeri.",
+ creditcard: "Inserisci un numero di carta di credito valido.",
+ equalTo: "Il valore non corrisponde.",
+ extension: "Inserisci un valore con un&apos;estensione valida.",
+ maxlength: $.validator.format("Non inserire pi&ugrave; di {0} caratteri."),
+ minlength: $.validator.format("Inserisci almeno {0} caratteri."),
+ rangelength: $.validator.format("Inserisci un valore compreso tra {0} e {1} caratteri."),
+ range: $.validator.format("Inserisci un valore compreso tra {0} e {1}."),
+ max: $.validator.format("Inserisci un valore minore o uguale a {0}."),
+ min: $.validator.format("Inserisci un valore maggiore o uguale a {0}."),
+ nifES: "Inserisci un NIF valido.",
+ nieES: "Inserisci un NIE valido.",
+ cifES: "Inserisci un CIF valido."
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_it.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_it.min.js
new file mode 100644
index 0000000..03e4bda
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_it.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Campo obbligatorio.",remote:"Controlla questo campo.",email:"Inserisci un indirizzo email valido.",url:"Inserisci un indirizzo web valido.",date:"Inserisci una data valida.",dateISO:"Inserisci una data valida (ISO).",number:"Inserisci un numero valido.",digits:"Inserisci solo numeri.",creditcard:"Inserisci un numero di carta di credito valido.",equalTo:"Il valore non corrisponde.",extension:"Inserisci un valore con un&apos;estensione valida.",maxlength:a.validator.format("Non inserire pi&ugrave; di {0} caratteri."),minlength:a.validator.format("Inserisci almeno {0} caratteri."),rangelength:a.validator.format("Inserisci un valore compreso tra {0} e {1} caratteri."),range:a.validator.format("Inserisci un valore compreso tra {0} e {1}."),max:a.validator.format("Inserisci un valore minore o uguale a {0}."),min:a.validator.format("Inserisci un valore maggiore o uguale a {0}."),nifES:"Inserisci un NIF valido.",nieES:"Inserisci un NIE valido.",cifES:"Inserisci un CIF valido."})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ja.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ja.js
new file mode 100644
index 0000000..3eed43d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ja.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: JA (Japanese; 日本語)
+ */
+$.extend($.validator.messages, {
+ required: "ã“ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¯å¿…é ˆã§ã™ã€‚",
+ remote: "ã“ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’修正ã—ã¦ãã ã•ã„。",
+ email: "有効ãªEメールアドレスを入力ã—ã¦ãã ã•ã„。",
+ url: "有効ãªURLを入力ã—ã¦ãã ã•ã„。",
+ date: "有効ãªæ—¥ä»˜ã‚’入力ã—ã¦ãã ã•ã„。",
+ dateISO: "有効ãªæ—¥ä»˜ï¼ˆISO)を入力ã—ã¦ãã ã•ã„。",
+ number: "有効ãªæ•°å­—を入力ã—ã¦ãã ã•ã„。",
+ digits: "æ•°å­—ã®ã¿ã‚’入力ã—ã¦ãã ã•ã„。",
+ creditcard: "有効ãªã‚¯ãƒ¬ã‚¸ãƒƒãƒˆã‚«ãƒ¼ãƒ‰ç•ªå·ã‚’入力ã—ã¦ãã ã•ã„。",
+ equalTo: "åŒã˜å€¤ã‚’ã‚‚ã†ä¸€åº¦å…¥åŠ›ã—ã¦ãã ã•ã„。",
+ extension: "有効ãªæ‹¡å¼µå­ã‚’å«ã‚€å€¤ã‚’入力ã—ã¦ãã ã•ã„。",
+ maxlength: $.validator.format("{0} 文字以内ã§å…¥åŠ›ã—ã¦ãã ã•ã„。"),
+ minlength: $.validator.format("{0} 文字以上ã§å…¥åŠ›ã—ã¦ãã ã•ã„。"),
+ rangelength: $.validator.format("{0} 文字ã‹ã‚‰ {1} 文字ã¾ã§ã®å€¤ã‚’入力ã—ã¦ãã ã•ã„。"),
+ range: $.validator.format("{0} ã‹ã‚‰ {1} ã¾ã§ã®å€¤ã‚’入力ã—ã¦ãã ã•ã„。"),
+ max: $.validator.format("{0} 以下ã®å€¤ã‚’入力ã—ã¦ãã ã•ã„。"),
+ min: $.validator.format("{0} 以上ã®å€¤ã‚’入力ã—ã¦ãã ã•ã„。")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ja.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ja.min.js
new file mode 100644
index 0000000..f0c70cf
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ja.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"ã“ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¯å¿…é ˆã§ã™ã€‚",remote:"ã“ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’修正ã—ã¦ãã ã•ã„。",email:"有効ãªEメールアドレスを入力ã—ã¦ãã ã•ã„。",url:"有効ãªURLを入力ã—ã¦ãã ã•ã„。",date:"有効ãªæ—¥ä»˜ã‚’入力ã—ã¦ãã ã•ã„。",dateISO:"有効ãªæ—¥ä»˜ï¼ˆISO)を入力ã—ã¦ãã ã•ã„。",number:"有効ãªæ•°å­—を入力ã—ã¦ãã ã•ã„。",digits:"æ•°å­—ã®ã¿ã‚’入力ã—ã¦ãã ã•ã„。",creditcard:"有効ãªã‚¯ãƒ¬ã‚¸ãƒƒãƒˆã‚«ãƒ¼ãƒ‰ç•ªå·ã‚’入力ã—ã¦ãã ã•ã„。",equalTo:"åŒã˜å€¤ã‚’ã‚‚ã†ä¸€åº¦å…¥åŠ›ã—ã¦ãã ã•ã„。",extension:"有効ãªæ‹¡å¼µå­ã‚’å«ã‚€å€¤ã‚’入力ã—ã¦ãã ã•ã„。",maxlength:a.validator.format("{0} 文字以内ã§å…¥åŠ›ã—ã¦ãã ã•ã„。"),minlength:a.validator.format("{0} 文字以上ã§å…¥åŠ›ã—ã¦ãã ã•ã„。"),rangelength:a.validator.format("{0} 文字ã‹ã‚‰ {1} 文字ã¾ã§ã®å€¤ã‚’入力ã—ã¦ãã ã•ã„。"),range:a.validator.format("{0} ã‹ã‚‰ {1} ã¾ã§ã®å€¤ã‚’入力ã—ã¦ãã ã•ã„。"),max:a.validator.format("{0} 以下ã®å€¤ã‚’入力ã—ã¦ãã ã•ã„。"),min:a.validator.format("{0} 以上ã®å€¤ã‚’入力ã—ã¦ãã ã•ã„。")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ka.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ka.js
new file mode 100644
index 0000000..494ec91
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ka.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: KA (Georgian; ქáƒáƒ áƒ—ული)
+ */
+$.extend($.validator.messages, {
+ required: "áƒáƒ› ველის შევსებრáƒáƒ£áƒªáƒ˜áƒšáƒ”ბელიáƒ.",
+ remote: "გთხáƒáƒ•áƒ— მიუთითáƒáƒ— სწáƒáƒ áƒ˜ მნიშვნელáƒáƒ‘áƒ.",
+ email: "გთხáƒáƒ•áƒ— მიუთითáƒáƒ— ელ-ფáƒáƒ¡áƒ¢áƒ˜áƒ¡ კáƒáƒ áƒ”ქტული მისáƒáƒ›áƒáƒ áƒ—ი.",
+ url: "გთხáƒáƒ•áƒ— მიუთითáƒáƒ— კáƒáƒ áƒ”ქტული URL.",
+ date: "გთხáƒáƒ•áƒ— მიუთითáƒáƒ— კáƒáƒ áƒ”ქტული თáƒáƒ áƒ˜áƒ¦áƒ˜.",
+ dateISO: "გთხáƒáƒ•áƒ— მიუთითáƒáƒ— კáƒáƒ áƒ”ქტული თáƒáƒ áƒ˜áƒ¦áƒ˜ ISO ფáƒáƒ áƒ›áƒáƒ¢áƒ¨áƒ˜.",
+ number: "გთხáƒáƒ•áƒ— მიუთითáƒáƒ— ციფრი.",
+ digits: "გთხáƒáƒ•áƒ— მიუთითáƒáƒ— მხáƒáƒšáƒáƒ“ ციფრები.",
+ creditcard: "გთხáƒáƒ•áƒ— მიუთითáƒáƒ— სáƒáƒ™áƒ áƒ”დიტრბáƒáƒ áƒáƒ—ის კáƒáƒ áƒ”ქტული ნáƒáƒ›áƒ”რი.",
+ equalTo: "გთხáƒáƒ•áƒ— მიუთითáƒáƒ— áƒáƒ¡áƒ”თივე მნიშვნელáƒáƒ‘რკიდევ ერთხელ.",
+ extension: "გთხáƒáƒ•áƒ— áƒáƒ˜áƒ áƒ©áƒ˜áƒáƒ— ფáƒáƒ˜áƒšáƒ˜ კáƒáƒ áƒ”ქტული გáƒáƒ¤áƒáƒ áƒ—áƒáƒ”ბით.",
+ maxlength: $.validator.format("დáƒáƒ¡áƒáƒ¨áƒ•áƒ”ბირáƒáƒ áƒáƒ£áƒ›áƒ”ტეს {0} სიმბáƒáƒšáƒ."),
+ minlength: $.validator.format("áƒáƒ£áƒªáƒ˜áƒšáƒ”ბელირშეიყვáƒáƒœáƒáƒ— მინიმუმ {0} სიმბáƒáƒšáƒ."),
+ rangelength: $.validator.format("ტექსტში სიმბáƒáƒšáƒáƒ”ბის რáƒáƒáƒ“ენáƒáƒ‘რუნდრიყáƒáƒ¡ {0}-დáƒáƒœ {1}-მდე."),
+ range: $.validator.format("გთხáƒáƒ•áƒ— შეიყვáƒáƒœáƒáƒ— ციფრი {0}-დáƒáƒœ {1}-მდე."),
+ max: $.validator.format("გთხáƒáƒ•áƒ— შეიყვáƒáƒœáƒáƒ— ციფრი რáƒáƒ›áƒ”ლიც ნáƒáƒ™áƒšáƒ”ბირáƒáƒœ უდრის {0}-ს."),
+ min: $.validator.format("გთხáƒáƒ•áƒ— შეიყვáƒáƒœáƒáƒ— ციფრი რáƒáƒ›áƒ”ლიც მეტირáƒáƒœ უდრის {0}-ს.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ka.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ka.min.js
new file mode 100644
index 0000000..fdfe441
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ka.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"áƒáƒ› ველის შევსებრáƒáƒ£áƒªáƒ˜áƒšáƒ”ბელიáƒ.",remote:"გთხáƒáƒ•áƒ— მიუთითáƒáƒ— სწáƒáƒ áƒ˜ მნიშვნელáƒáƒ‘áƒ.",email:"გთხáƒáƒ•áƒ— მიუთითáƒáƒ— ელ-ფáƒáƒ¡áƒ¢áƒ˜áƒ¡ კáƒáƒ áƒ”ქტული მისáƒáƒ›áƒáƒ áƒ—ი.",url:"გთხáƒáƒ•áƒ— მიუთითáƒáƒ— კáƒáƒ áƒ”ქტული URL.",date:"გთხáƒáƒ•áƒ— მიუთითáƒáƒ— კáƒáƒ áƒ”ქტული თáƒáƒ áƒ˜áƒ¦áƒ˜.",dateISO:"გთხáƒáƒ•áƒ— მიუთითáƒáƒ— კáƒáƒ áƒ”ქტული თáƒáƒ áƒ˜áƒ¦áƒ˜ ISO ფáƒáƒ áƒ›áƒáƒ¢áƒ¨áƒ˜.",number:"გთხáƒáƒ•áƒ— მიუთითáƒáƒ— ციფრი.",digits:"გთხáƒáƒ•áƒ— მიუთითáƒáƒ— მხáƒáƒšáƒáƒ“ ციფრები.",creditcard:"გთხáƒáƒ•áƒ— მიუთითáƒáƒ— სáƒáƒ™áƒ áƒ”დიტრბáƒáƒ áƒáƒ—ის კáƒáƒ áƒ”ქტული ნáƒáƒ›áƒ”რი.",equalTo:"გთხáƒáƒ•áƒ— მიუთითáƒáƒ— áƒáƒ¡áƒ”თივე მნიშვნელáƒáƒ‘რკიდევ ერთხელ.",extension:"გთხáƒáƒ•áƒ— áƒáƒ˜áƒ áƒ©áƒ˜áƒáƒ— ფáƒáƒ˜áƒšáƒ˜ კáƒáƒ áƒ”ქტული გáƒáƒ¤áƒáƒ áƒ—áƒáƒ”ბით.",maxlength:a.validator.format("დáƒáƒ¡áƒáƒ¨áƒ•áƒ”ბირáƒáƒ áƒáƒ£áƒ›áƒ”ტეს {0} სიმბáƒáƒšáƒ."),minlength:a.validator.format("áƒáƒ£áƒªáƒ˜áƒšáƒ”ბელირშეიყვáƒáƒœáƒáƒ— მინიმუმ {0} სიმბáƒáƒšáƒ."),rangelength:a.validator.format("ტექსტში სიმბáƒáƒšáƒáƒ”ბის რáƒáƒáƒ“ენáƒáƒ‘რუნდრიყáƒáƒ¡ {0}-დáƒáƒœ {1}-მდე."),range:a.validator.format("გთხáƒáƒ•áƒ— შეიყვáƒáƒœáƒáƒ— ციფრი {0}-დáƒáƒœ {1}-მდე."),max:a.validator.format("გთხáƒáƒ•áƒ— შეიყვáƒáƒœáƒáƒ— ციფრი რáƒáƒ›áƒ”ლიც ნáƒáƒ™áƒšáƒ”ბირáƒáƒœ უდრის {0}-ს."),min:a.validator.format("გთხáƒáƒ•áƒ— შეიყვáƒáƒœáƒáƒ— ციფრი რáƒáƒ›áƒ”ლიც მეტირáƒáƒœ უდრის {0}-ს.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_kk.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_kk.js
new file mode 100644
index 0000000..17c8b83
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_kk.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: KK (Kazakh; қазақ тілі)
+ */
+$.extend($.validator.messages, {
+ required: "Бұл өріÑÑ‚Ñ– міндетті түрде толтырыңыз.",
+ remote: "Ð”Ò±Ñ€Ñ‹Ñ Ð¼Ð°Ò“Ñ‹Ð½Ð° енгізуіңізді Ñұраймыз.",
+ email: "Ðақты Ñлектронды поштаңызды енгізуіңізді Ñұраймыз.",
+ url: "Ðақты URL-ды енгізуіңізді Ñұраймыз.",
+ date: "Ðақты URL-ды енгізуіңізді Ñұраймыз.",
+ dateISO: "Ðақты ISO форматымен ÑÓ™Ð¹ÐºÐµÑ Ð´Ð°Ñ‚Ð°Ñын енгізуіңізді Ñұраймыз.",
+ number: "Күнді енгізуіңізді Ñұраймыз.",
+ digits: "Тек қана Ñандарды енгізуіңізді Ñұраймыз.",
+ creditcard: "ÐеÑие картаÑының нөмірін Ð´Ò±Ñ€Ñ‹Ñ ÐµÐ½Ð³Ñ–Ð·ÑƒÑ–Ò£Ñ–Ð·Ð´Ñ– Ñұраймыз.",
+ equalTo: "ОÑÑ‹ мәнді қайта енгізуіңізді Ñұраймыз.",
+ extension: "Файлдың кеңейтуін Ð´Ò±Ñ€Ñ‹Ñ Ñ‚Ð°Ò£Ð´Ð°Ò£Ñ‹Ð·.",
+ maxlength: $.validator.format("Ұзындығы {0} Ñимволдан көр болмаÑын."),
+ minlength: $.validator.format("Ұзындығы {0} Ñимволдан аз болмаÑын."),
+ rangelength: $.validator.format("Ұзындығы {0}-{1} дейін мән енгізуіңізді Ñұраймыз."),
+ range: $.validator.format("ПожалуйÑта, введите чиÑло от {0} до {1}. - {0} - {1} Ñанын енгізуіңізді Ñұраймыз."),
+ max: $.validator.format("{0} аз немеÑе тең Ñанын енгізуіңіді Ñұраймыз."),
+ min: $.validator.format("{0} көп немеÑе тең Ñанын енгізуіңізді Ñұраймыз.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_kk.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_kk.min.js
new file mode 100644
index 0000000..2a9a5cf
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_kk.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Бұл өріÑÑ‚Ñ– міндетті түрде толтырыңыз.",remote:"Ð”Ò±Ñ€Ñ‹Ñ Ð¼Ð°Ò“Ñ‹Ð½Ð° енгізуіңізді Ñұраймыз.",email:"Ðақты Ñлектронды поштаңызды енгізуіңізді Ñұраймыз.",url:"Ðақты URL-ды енгізуіңізді Ñұраймыз.",date:"Ðақты URL-ды енгізуіңізді Ñұраймыз.",dateISO:"Ðақты ISO форматымен ÑÓ™Ð¹ÐºÐµÑ Ð´Ð°Ñ‚Ð°Ñын енгізуіңізді Ñұраймыз.",number:"Күнді енгізуіңізді Ñұраймыз.",digits:"Тек қана Ñандарды енгізуіңізді Ñұраймыз.",creditcard:"ÐеÑие картаÑының нөмірін Ð´Ò±Ñ€Ñ‹Ñ ÐµÐ½Ð³Ñ–Ð·ÑƒÑ–Ò£Ñ–Ð·Ð´Ñ– Ñұраймыз.",equalTo:"ОÑÑ‹ мәнді қайта енгізуіңізді Ñұраймыз.",extension:"Файлдың кеңейтуін Ð´Ò±Ñ€Ñ‹Ñ Ñ‚Ð°Ò£Ð´Ð°Ò£Ñ‹Ð·.",maxlength:a.validator.format("Ұзындығы {0} Ñимволдан көр болмаÑын."),minlength:a.validator.format("Ұзындығы {0} Ñимволдан аз болмаÑын."),rangelength:a.validator.format("Ұзындығы {0}-{1} дейін мән енгізуіңізді Ñұраймыз."),range:a.validator.format("ПожалуйÑта, введите чиÑло от {0} до {1}. - {0} - {1} Ñанын енгізуіңізді Ñұраймыз."),max:a.validator.format("{0} аз немеÑе тең Ñанын енгізуіңіді Ñұраймыз."),min:a.validator.format("{0} көп немеÑе тең Ñанын енгізуіңізді Ñұраймыз.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ko.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ko.js
new file mode 100644
index 0000000..f6b5355
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ko.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: KO (Korean; 한국어)
+ */
+$.extend($.validator.messages, {
+ required: "필수 항목입니다.",
+ remote: "í•­ëª©ì„ ìˆ˜ì •í•˜ì„¸ìš”.",
+ email: "유효하지 ì•Šì€ E-Mail주소입니다.",
+ url: "유효하지 ì•Šì€ URL입니다.",
+ date: "올바른 날짜를 입력하세요.",
+ dateISO: "올바른 날짜(ISO)를 입력하세요.",
+ number: "유효한 숫ìžê°€ 아닙니다.",
+ digits: "숫ìžë§Œ ìž…ë ¥ 가능합니다.",
+ creditcard: "신용카드 번호가 바르지 않습니다.",
+ equalTo: "ê°™ì€ ê°’ì„ ë‹¤ì‹œ 입력하세요.",
+ extension: "올바른 확장ìžê°€ 아닙니다.",
+ maxlength: $.validator.format("{0}ìžë¥¼ ë„˜ì„ ìˆ˜ 없습니다. "),
+ minlength: $.validator.format("{0}ìž ì´ìƒ 입력하세요."),
+ rangelength: $.validator.format("ë¬¸ìž ê¸¸ì´ê°€ {0} ì—ì„œ {1} 사ì´ì˜ ê°’ì„ ìž…ë ¥í•˜ì„¸ìš”."),
+ range: $.validator.format("{0} ì—ì„œ {1} 사ì´ì˜ ê°’ì„ ìž…ë ¥í•˜ì„¸ìš”."),
+ max: $.validator.format("{0} ì´í•˜ì˜ ê°’ì„ ìž…ë ¥í•˜ì„¸ìš”."),
+ min: $.validator.format("{0} ì´ìƒì˜ ê°’ì„ ìž…ë ¥í•˜ì„¸ìš”.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ko.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ko.min.js
new file mode 100644
index 0000000..9d4de3b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ko.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"필수 항목입니다.",remote:"í•­ëª©ì„ ìˆ˜ì •í•˜ì„¸ìš”.",email:"유효하지 ì•Šì€ E-Mail주소입니다.",url:"유효하지 ì•Šì€ URL입니다.",date:"올바른 날짜를 입력하세요.",dateISO:"올바른 날짜(ISO)를 입력하세요.",number:"유효한 숫ìžê°€ 아닙니다.",digits:"숫ìžë§Œ ìž…ë ¥ 가능합니다.",creditcard:"ì‹ ìš©ì¹´ë“œ 번호가 바르지 않습니다.",equalTo:"ê°™ì€ ê°’ì„ ë‹¤ì‹œ 입력하세요.",extension:"올바른 확장ìžê°€ 아닙니다.",maxlength:a.validator.format("{0}ìžë¥¼ ë„˜ì„ ìˆ˜ 없습니다. "),minlength:a.validator.format("{0}ìž ì´ìƒ 입력하세요."),rangelength:a.validator.format("ë¬¸ìž ê¸¸ì´ê°€ {0} ì—ì„œ {1} 사ì´ì˜ ê°’ì„ ìž…ë ¥í•˜ì„¸ìš”."),range:a.validator.format("{0} ì—ì„œ {1} 사ì´ì˜ ê°’ì„ ìž…ë ¥í•˜ì„¸ìš”."),max:a.validator.format("{0} ì´í•˜ì˜ ê°’ì„ ìž…ë ¥í•˜ì„¸ìš”."),min:a.validator.format("{0} ì´ìƒì˜ ê°’ì„ ìž…ë ¥í•˜ì„¸ìš”.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_lt.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_lt.js
new file mode 100644
index 0000000..df17a1e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_lt.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: LT (Lithuanian; lietuvių kalba)
+ */
+$.extend($.validator.messages, {
+ required: "Å is laukas yra privalomas.",
+ remote: "Prašau pataisyti šį lauką.",
+ email: "Prašau įvesti teisingą elektroninio pašto adresą.",
+ url: "Prašau įvesti teisingą URL.",
+ date: "Prašau įvesti teisingą datą.",
+ dateISO: "Prašau įvesti teisingą datą (ISO).",
+ number: "PraÅ¡au įvesti teisingÄ… skaiÄių.",
+ digits: "Prašau naudoti tik skaitmenis.",
+ creditcard: "Prašau įvesti teisingą kreditinės kortelės numerį.",
+ equalTo: "PraÅ¡au įvestį tÄ… paÄiÄ… reikÅ¡mÄ™ dar kartÄ….",
+ extension: "Prašau įvesti reikšmę su teisingu plėtiniu.",
+ maxlength: $.validator.format("Prašau įvesti ne daugiau kaip {0} simbolių."),
+ minlength: $.validator.format("Prašau įvesti bent {0} simbolius."),
+ rangelength: $.validator.format("Prašau įvesti reikšmes, kurių ilgis nuo {0} iki {1} simbolių."),
+ range: $.validator.format("Prašau įvesti reikšmę intervale nuo {0} iki {1}."),
+ max: $.validator.format("Prašau įvesti reikšmę mažesnę arba lygią {0}."),
+ min: $.validator.format("Prašau įvesti reikšmę didesnę arba lygią {0}.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_lt.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_lt.min.js
new file mode 100644
index 0000000..2a20cf4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_lt.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Å is laukas yra privalomas.",remote:"PraÅ¡au pataisyti šį laukÄ….",email:"PraÅ¡au įvesti teisingÄ… elektroninio paÅ¡to adresÄ….",url:"PraÅ¡au įvesti teisingÄ… URL.",date:"PraÅ¡au įvesti teisingÄ… datÄ….",dateISO:"PraÅ¡au įvesti teisingÄ… datÄ… (ISO).",number:"PraÅ¡au įvesti teisingÄ… skaiÄių.",digits:"PraÅ¡au naudoti tik skaitmenis.",creditcard:"PraÅ¡au įvesti teisingÄ… kreditinÄ—s kortelÄ—s numerį.",equalTo:"PraÅ¡au įvestį tÄ… paÄiÄ… reikÅ¡mÄ™ dar kartÄ….",extension:"PraÅ¡au įvesti reikÅ¡mÄ™ su teisingu plÄ—tiniu.",maxlength:a.validator.format("PraÅ¡au įvesti ne daugiau kaip {0} simbolių."),minlength:a.validator.format("PraÅ¡au įvesti bent {0} simbolius."),rangelength:a.validator.format("PraÅ¡au įvesti reikÅ¡mes, kurių ilgis nuo {0} iki {1} simbolių."),range:a.validator.format("PraÅ¡au įvesti reikÅ¡mÄ™ intervale nuo {0} iki {1}."),max:a.validator.format("PraÅ¡au įvesti reikÅ¡mÄ™ mažesnÄ™ arba lygiÄ… {0}."),min:a.validator.format("PraÅ¡au įvesti reikÅ¡mÄ™ didesnÄ™ arba lygiÄ… {0}.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_lv.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_lv.js
new file mode 100644
index 0000000..ade1b88
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_lv.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: LV (Latvian; latviešu valoda)
+ */
+$.extend($.validator.messages, {
+ required: "Å is lauks ir obligÄts.",
+ remote: "LÅ«dzu, pÄrbaudiet Å¡o lauku.",
+ email: "Lūdzu, ievadiet derīgu e-pasta adresi.",
+ url: "Lūdzu, ievadiet derīgu URL adresi.",
+ date: "Lūdzu, ievadiet derīgu datumu.",
+ dateISO: "Lūdzu, ievadiet derīgu datumu (ISO).",
+ number: "Lūdzu, ievadiet derīgu numuru.",
+ digits: "LÅ«dzu, ievadiet tikai ciparus.",
+ creditcard: "Lūdzu, ievadiet derīgu kredītkartes numuru.",
+ equalTo: "Lūdzu, ievadiet to pašu vēlreiz.",
+ extension: "LÅ«dzu, ievadiet vÄ“rtÄ«bu ar derÄ«gu paplaÅ¡inÄjumu.",
+ maxlength: $.validator.format("LÅ«dzu, ievadiet ne vairÄk kÄ {0} rakstzÄ«mes."),
+ minlength: $.validator.format("Lūdzu, ievadiet vismaz {0} rakstzīmes."),
+ rangelength: $.validator.format("Lūdzu ievadiet {0} līdz {1} rakstzīmes."),
+ range: $.validator.format("Lūdzu, ievadiet skaitli no {0} līdz {1}."),
+ max: $.validator.format("LÅ«dzu, ievadiet skaitli, kurÅ¡ ir mazÄks vai vienÄds ar {0}."),
+ min: $.validator.format("LÅ«dzu, ievadiet skaitli, kurÅ¡ ir lielÄks vai vienÄds ar {0}.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_lv.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_lv.min.js
new file mode 100644
index 0000000..ce98a33
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_lv.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Å is lauks ir obligÄts.",remote:"LÅ«dzu, pÄrbaudiet Å¡o lauku.",email:"LÅ«dzu, ievadiet derÄ«gu e-pasta adresi.",url:"LÅ«dzu, ievadiet derÄ«gu URL adresi.",date:"LÅ«dzu, ievadiet derÄ«gu datumu.",dateISO:"LÅ«dzu, ievadiet derÄ«gu datumu (ISO).",number:"LÅ«dzu, ievadiet derÄ«gu numuru.",digits:"LÅ«dzu, ievadiet tikai ciparus.",creditcard:"LÅ«dzu, ievadiet derÄ«gu kredÄ«tkartes numuru.",equalTo:"LÅ«dzu, ievadiet to paÅ¡u vÄ“lreiz.",extension:"LÅ«dzu, ievadiet vÄ“rtÄ«bu ar derÄ«gu paplaÅ¡inÄjumu.",maxlength:a.validator.format("LÅ«dzu, ievadiet ne vairÄk kÄ {0} rakstzÄ«mes."),minlength:a.validator.format("LÅ«dzu, ievadiet vismaz {0} rakstzÄ«mes."),rangelength:a.validator.format("LÅ«dzu ievadiet {0} lÄ«dz {1} rakstzÄ«mes."),range:a.validator.format("LÅ«dzu, ievadiet skaitli no {0} lÄ«dz {1}."),max:a.validator.format("LÅ«dzu, ievadiet skaitli, kurÅ¡ ir mazÄks vai vienÄds ar {0}."),min:a.validator.format("LÅ«dzu, ievadiet skaitli, kurÅ¡ ir lielÄks vai vienÄds ar {0}.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_my.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_my.js
new file mode 100644
index 0000000..9de974a
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_my.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: MY (Malay; Melayu)
+ */
+$.extend($.validator.messages, {
+ required: "Medan ini diperlukan.",
+ remote: "Sila betulkan medan ini.",
+ email: "Sila masukkan alamat emel yang betul.",
+ url: "Sila masukkan URL yang betul.",
+ date: "Sila masukkan tarikh yang betul.",
+ dateISO: "Sila masukkan tarikh(ISO) yang betul.",
+ number: "Sila masukkan nombor yang betul.",
+ digits: "Sila masukkan nilai digit sahaja.",
+ creditcard: "Sila masukkan nombor kredit kad yang betul.",
+ equalTo: "Sila masukkan nilai yang sama semula.",
+ extension: "Sila masukkan nilai yang telah diterima.",
+ maxlength: $.validator.format("Sila masukkan nilai tidak lebih dari {0} aksara."),
+ minlength: $.validator.format("Sila masukkan nilai sekurang-kurangnya {0} aksara."),
+ rangelength: $.validator.format("Sila masukkan panjang nilai antara {0} dan {1} aksara."),
+ range: $.validator.format("Sila masukkan nilai antara {0} dan {1} aksara."),
+ max: $.validator.format("Sila masukkan nilai yang kurang atau sama dengan {0}."),
+ min: $.validator.format("Sila masukkan nilai yang lebih atau sama dengan {0}.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_my.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_my.min.js
new file mode 100644
index 0000000..44566bf
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_my.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Medan ini diperlukan.",remote:"Sila betulkan medan ini.",email:"Sila masukkan alamat emel yang betul.",url:"Sila masukkan URL yang betul.",date:"Sila masukkan tarikh yang betul.",dateISO:"Sila masukkan tarikh(ISO) yang betul.",number:"Sila masukkan nombor yang betul.",digits:"Sila masukkan nilai digit sahaja.",creditcard:"Sila masukkan nombor kredit kad yang betul.",equalTo:"Sila masukkan nilai yang sama semula.",extension:"Sila masukkan nilai yang telah diterima.",maxlength:a.validator.format("Sila masukkan nilai tidak lebih dari {0} aksara."),minlength:a.validator.format("Sila masukkan nilai sekurang-kurangnya {0} aksara."),rangelength:a.validator.format("Sila masukkan panjang nilai antara {0} dan {1} aksara."),range:a.validator.format("Sila masukkan nilai antara {0} dan {1} aksara."),max:a.validator.format("Sila masukkan nilai yang kurang atau sama dengan {0}."),min:a.validator.format("Sila masukkan nilai yang lebih atau sama dengan {0}.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_nl.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_nl.js
new file mode 100644
index 0000000..cdba381
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_nl.js
@@ -0,0 +1,43 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: NL (Dutch; Nederlands, Vlaams)
+ */
+$.extend($.validator.messages, {
+ required: "Dit is een verplicht veld.",
+ remote: "Controleer dit veld.",
+ email: "Vul hier een geldig e-mailadres in.",
+ url: "Vul hier een geldige URL in.",
+ date: "Vul hier een geldige datum in.",
+ dateISO: "Vul hier een geldige datum in (ISO-formaat).",
+ number: "Vul hier een geldig getal in.",
+ digits: "Vul hier alleen getallen in.",
+ creditcard: "Vul hier een geldig creditcardnummer in.",
+ equalTo: "Vul hier dezelfde waarde in.",
+ extension: "Vul hier een waarde in met een geldige extensie.",
+ maxlength: $.validator.format("Vul hier maximaal {0} tekens in."),
+ minlength: $.validator.format("Vul hier minimaal {0} tekens in."),
+ rangelength: $.validator.format("Vul hier een waarde in van minimaal {0} en maximaal {1} tekens."),
+ range: $.validator.format("Vul hier een waarde in van minimaal {0} en maximaal {1}."),
+ max: $.validator.format("Vul hier een waarde in kleiner dan of gelijk aan {0}."),
+ min: $.validator.format("Vul hier een waarde in groter dan of gelijk aan {0}."),
+
+ // for validations in additional-methods.js
+ iban: "Vul hier een geldig IBAN in.",
+ dateNL: "Vul hier een geldige datum in.",
+ phoneNL: "Vul hier een geldig Nederlands telefoonnummer in.",
+ mobileNL: "Vul hier een geldig Nederlands mobiel telefoonnummer in.",
+ postalcodeNL: "Vul hier een geldige postcode in.",
+ bankaccountNL: "Vul hier een geldig bankrekeningnummer in.",
+ giroaccountNL: "Vul hier een geldig gironummer in.",
+ bankorgiroaccountNL: "Vul hier een geldig bank- of gironummer in."
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_nl.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_nl.min.js
new file mode 100644
index 0000000..5eb962d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_nl.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Dit is een verplicht veld.",remote:"Controleer dit veld.",email:"Vul hier een geldig e-mailadres in.",url:"Vul hier een geldige URL in.",date:"Vul hier een geldige datum in.",dateISO:"Vul hier een geldige datum in (ISO-formaat).",number:"Vul hier een geldig getal in.",digits:"Vul hier alleen getallen in.",creditcard:"Vul hier een geldig creditcardnummer in.",equalTo:"Vul hier dezelfde waarde in.",extension:"Vul hier een waarde in met een geldige extensie.",maxlength:a.validator.format("Vul hier maximaal {0} tekens in."),minlength:a.validator.format("Vul hier minimaal {0} tekens in."),rangelength:a.validator.format("Vul hier een waarde in van minimaal {0} en maximaal {1} tekens."),range:a.validator.format("Vul hier een waarde in van minimaal {0} en maximaal {1}."),max:a.validator.format("Vul hier een waarde in kleiner dan of gelijk aan {0}."),min:a.validator.format("Vul hier een waarde in groter dan of gelijk aan {0}."),iban:"Vul hier een geldig IBAN in.",dateNL:"Vul hier een geldige datum in.",phoneNL:"Vul hier een geldig Nederlands telefoonnummer in.",mobileNL:"Vul hier een geldig Nederlands mobiel telefoonnummer in.",postalcodeNL:"Vul hier een geldige postcode in.",bankaccountNL:"Vul hier een geldig bankrekeningnummer in.",giroaccountNL:"Vul hier een geldig gironummer in.",bankorgiroaccountNL:"Vul hier een geldig bank- of gironummer in."})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_no.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_no.js
new file mode 100644
index 0000000..308b715
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_no.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: NO (Norwegian; Norsk)
+ */
+$.extend($.validator.messages, {
+ required: "Dette feltet er obligatorisk.",
+ maxlength: $.validator.format("Maksimalt {0} tegn."),
+ minlength: $.validator.format("Minimum {0} tegn."),
+ rangelength: $.validator.format("Angi minimum {0} og maksimum {1} tegn."),
+ email: "Oppgi en gyldig epostadresse.",
+ url: "Angi en gyldig URL.",
+ date: "Angi en gyldig dato.",
+ dateISO: "Angi en gyldig dato (&ARING;&ARING;&ARING;&ARING;-MM-DD).",
+ dateSE: "Angi en gyldig dato.",
+ number: "Angi et gyldig nummer.",
+ numberSE: "Angi et gyldig nummer.",
+ digits: "Skriv kun tall.",
+ equalTo: "Skriv samme verdi igjen.",
+ range: $.validator.format("Angi en verdi mellom {0} og {1}."),
+ max: $.validator.format("Angi en verdi som er mindre eller lik {0}."),
+ min: $.validator.format("Angi en verdi som er st&oslash;rre eller lik {0}."),
+ creditcard: "Angi et gyldig kredittkortnummer."
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_no.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_no.min.js
new file mode 100644
index 0000000..f671f55
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_no.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Dette feltet er obligatorisk.",maxlength:a.validator.format("Maksimalt {0} tegn."),minlength:a.validator.format("Minimum {0} tegn."),rangelength:a.validator.format("Angi minimum {0} og maksimum {1} tegn."),email:"Oppgi en gyldig epostadresse.",url:"Angi en gyldig URL.",date:"Angi en gyldig dato.",dateISO:"Angi en gyldig dato (&ARING;&ARING;&ARING;&ARING;-MM-DD).",dateSE:"Angi en gyldig dato.",number:"Angi et gyldig nummer.",numberSE:"Angi et gyldig nummer.",digits:"Skriv kun tall.",equalTo:"Skriv samme verdi igjen.",range:a.validator.format("Angi en verdi mellom {0} og {1}."),max:a.validator.format("Angi en verdi som er mindre eller lik {0}."),min:a.validator.format("Angi en verdi som er st&oslash;rre eller lik {0}."),creditcard:"Angi et gyldig kredittkortnummer."})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pl.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pl.js
new file mode 100644
index 0000000..453ba77
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pl.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: PL (Polish; język polski, polszczyzna)
+ */
+$.extend($.validator.messages, {
+ required: "To pole jest wymagane.",
+ remote: "Proszę o wypełnienie tego pola.",
+ email: "Proszę o podanie prawidłowego adresu email.",
+ url: "Proszę o podanie prawidłowego URL.",
+ date: "Proszę o podanie prawidłowej daty.",
+ dateISO: "Proszę o podanie prawidłowej daty (ISO).",
+ number: "Proszę o podanie prawidłowej liczby.",
+ digits: "ProszÄ™ o podanie samych cyfr.",
+ creditcard: "Proszę o podanie prawidłowej karty kredytowej.",
+ equalTo: "Proszę o podanie tej samej wartości ponownie.",
+ extension: "Proszę o podanie wartości z prawidłowym rozszerzeniem.",
+ maxlength: $.validator.format("Proszę o podanie nie więcej niż {0} znaków."),
+ minlength: $.validator.format("Proszę o podanie przynajmniej {0} znaków."),
+ rangelength: $.validator.format("Proszę o podanie wartości o długości od {0} do {1} znaków."),
+ range: $.validator.format("Proszę o podanie wartości z przedziału od {0} do {1}."),
+ max: $.validator.format("Proszę o podanie wartości mniejszej bądź równej {0}."),
+ min: $.validator.format("Proszę o podanie wartości większej bądź równej {0}.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pl.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pl.min.js
new file mode 100644
index 0000000..4e68c93
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pl.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"To pole jest wymagane.",remote:"Proszę o wypełnienie tego pola.",email:"Proszę o podanie prawidłowego adresu email.",url:"Proszę o podanie prawidłowego URL.",date:"Proszę o podanie prawidłowej daty.",dateISO:"Proszę o podanie prawidłowej daty (ISO).",number:"Proszę o podanie prawidłowej liczby.",digits:"Proszę o podanie samych cyfr.",creditcard:"Proszę o podanie prawidłowej karty kredytowej.",equalTo:"Proszę o podanie tej samej wartości ponownie.",extension:"Proszę o podanie wartości z prawidłowym rozszerzeniem.",maxlength:a.validator.format("Proszę o podanie nie więcej niż {0} znaków."),minlength:a.validator.format("Proszę o podanie przynajmniej {0} znaków."),rangelength:a.validator.format("Proszę o podanie wartości o długości od {0} do {1} znaków."),range:a.validator.format("Proszę o podanie wartości z przedziału od {0} do {1}."),max:a.validator.format("Proszę o podanie wartości mniejszej bądź równej {0}."),min:a.validator.format("Proszę o podanie wartości większej bądź równej {0}.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pt_BR.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pt_BR.js
new file mode 100644
index 0000000..71b1ef8
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pt_BR.js
@@ -0,0 +1,37 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: PT (Portuguese; português)
+ * Region: BR (Brazil)
+ */
+$.extend($.validator.messages, {
+ required: "Este campo &eacute; requerido.",
+ remote: "Por favor, corrija este campo.",
+ email: "Por favor, forne&ccedil;a um endere&ccedil;o de email v&aacute;lido.",
+ url: "Por favor, forne&ccedil;a uma URL v&aacute;lida.",
+ date: "Por favor, forne&ccedil;a uma data v&aacute;lida.",
+ dateISO: "Por favor, forne&ccedil;a uma data v&aacute;lida (ISO).",
+ number: "Por favor, forne&ccedil;a um n&uacute;mero v&aacute;lido.",
+ digits: "Por favor, forne&ccedil;a somente d&iacute;gitos.",
+ creditcard: "Por favor, forne&ccedil;a um cart&atilde;o de cr&eacute;dito v&aacute;lido.",
+ equalTo: "Por favor, forne&ccedil;a o mesmo valor novamente.",
+ extension: "Por favor, forne&ccedil;a um valor com uma extens&atilde;o v&aacute;lida.",
+ maxlength: $.validator.format("Por favor, forne&ccedil;a n&atilde;o mais que {0} caracteres."),
+ minlength: $.validator.format("Por favor, forne&ccedil;a ao menos {0} caracteres."),
+ rangelength: $.validator.format("Por favor, forne&ccedil;a um valor entre {0} e {1} caracteres de comprimento."),
+ range: $.validator.format("Por favor, forne&ccedil;a um valor entre {0} e {1}."),
+ max: $.validator.format("Por favor, forne&ccedil;a um valor menor ou igual a {0}."),
+ min: $.validator.format("Por favor, forne&ccedil;a um valor maior ou igual a {0}."),
+ nifES: "Por favor, forne&ccedil;a um NIF v&aacute;lido.",
+ nieES: "Por favor, forne&ccedil;a um NIE v&aacute;lido.",
+ cifEE: "Por favor, forne&ccedil;a um CIF v&aacute;lido."
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pt_BR.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pt_BR.min.js
new file mode 100644
index 0000000..899d36e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pt_BR.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Este campo &eacute; requerido.",remote:"Por favor, corrija este campo.",email:"Por favor, forne&ccedil;a um endere&ccedil;o de email v&aacute;lido.",url:"Por favor, forne&ccedil;a uma URL v&aacute;lida.",date:"Por favor, forne&ccedil;a uma data v&aacute;lida.",dateISO:"Por favor, forne&ccedil;a uma data v&aacute;lida (ISO).",number:"Por favor, forne&ccedil;a um n&uacute;mero v&aacute;lido.",digits:"Por favor, forne&ccedil;a somente d&iacute;gitos.",creditcard:"Por favor, forne&ccedil;a um cart&atilde;o de cr&eacute;dito v&aacute;lido.",equalTo:"Por favor, forne&ccedil;a o mesmo valor novamente.",extension:"Por favor, forne&ccedil;a um valor com uma extens&atilde;o v&aacute;lida.",maxlength:a.validator.format("Por favor, forne&ccedil;a n&atilde;o mais que {0} caracteres."),minlength:a.validator.format("Por favor, forne&ccedil;a ao menos {0} caracteres."),rangelength:a.validator.format("Por favor, forne&ccedil;a um valor entre {0} e {1} caracteres de comprimento."),range:a.validator.format("Por favor, forne&ccedil;a um valor entre {0} e {1}."),max:a.validator.format("Por favor, forne&ccedil;a um valor menor ou igual a {0}."),min:a.validator.format("Por favor, forne&ccedil;a um valor maior ou igual a {0}."),nifES:"Por favor, forne&ccedil;a um NIF v&aacute;lido.",nieES:"Por favor, forne&ccedil;a um NIE v&aacute;lido.",cifEE:"Por favor, forne&ccedil;a um CIF v&aacute;lido."})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pt_PT.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pt_PT.js
new file mode 100644
index 0000000..4c2a782
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pt_PT.js
@@ -0,0 +1,37 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: PT (Portuguese; português)
+ * Region: PT (Portugal)
+ */
+$.extend($.validator.messages, {
+ required: "Campo de preenchimento obrigat&oacute;rio.",
+ remote: "Por favor, corrija este campo.",
+ email: "Por favor, introduza um endere&ccedil;o eletr&oacute;nico v&aacute;lido.",
+ url: "Por favor, introduza um URL v&aacute;lido.",
+ date: "Por favor, introduza uma data v&aacute;lida.",
+ dateISO: "Por favor, introduza uma data v&aacute;lida (ISO).",
+ number: "Por favor, introduza um n&uacute;mero v&aacute;lido.",
+ digits: "Por favor, introduza apenas d&iacute;gitos.",
+ creditcard: "Por favor, introduza um n&uacute;mero de cart&atilde;o de cr&eacute;dito v&aacute;lido.",
+ equalTo: "Por favor, introduza de novo o mesmo valor.",
+ extension: "Por favor, introduza um ficheiro com uma extens&atilde;o v&aacute;lida.",
+ maxlength: $.validator.format("Por favor, n&atilde;o introduza mais do que {0} caracteres."),
+ minlength: $.validator.format("Por favor, introduza pelo menos {0} caracteres."),
+ rangelength: $.validator.format("Por favor, introduza entre {0} e {1} caracteres."),
+ range: $.validator.format("Por favor, introduza um valor entre {0} e {1}."),
+ max: $.validator.format("Por favor, introduza um valor menor ou igual a {0}."),
+ min: $.validator.format("Por favor, introduza um valor maior ou igual a {0}."),
+ nifES: "Por favor, introduza um NIF v&aacute;lido.",
+ nieES: "Por favor, introduza um NIE v&aacute;lido.",
+ cifES: "Por favor, introduza um CIF v&aacute;lido."
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pt_PT.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pt_PT.min.js
new file mode 100644
index 0000000..3e748a4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_pt_PT.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Campo de preenchimento obrigat&oacute;rio.",remote:"Por favor, corrija este campo.",email:"Por favor, introduza um endere&ccedil;o eletr&oacute;nico v&aacute;lido.",url:"Por favor, introduza um URL v&aacute;lido.",date:"Por favor, introduza uma data v&aacute;lida.",dateISO:"Por favor, introduza uma data v&aacute;lida (ISO).",number:"Por favor, introduza um n&uacute;mero v&aacute;lido.",digits:"Por favor, introduza apenas d&iacute;gitos.",creditcard:"Por favor, introduza um n&uacute;mero de cart&atilde;o de cr&eacute;dito v&aacute;lido.",equalTo:"Por favor, introduza de novo o mesmo valor.",extension:"Por favor, introduza um ficheiro com uma extens&atilde;o v&aacute;lida.",maxlength:a.validator.format("Por favor, n&atilde;o introduza mais do que {0} caracteres."),minlength:a.validator.format("Por favor, introduza pelo menos {0} caracteres."),rangelength:a.validator.format("Por favor, introduza entre {0} e {1} caracteres."),range:a.validator.format("Por favor, introduza um valor entre {0} e {1}."),max:a.validator.format("Por favor, introduza um valor menor ou igual a {0}."),min:a.validator.format("Por favor, introduza um valor maior ou igual a {0}."),nifES:"Por favor, introduza um NIF v&aacute;lido.",nieES:"Por favor, introduza um NIE v&aacute;lido.",cifES:"Por favor, introduza um CIF v&aacute;lido."})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ro.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ro.js
new file mode 100644
index 0000000..be77eab
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ro.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: RO (Romanian, limba română)
+ */
+$.extend($.validator.messages, {
+ required: "Acest câmp este obligatoriu.",
+ remote: "Te rugăm să completezi acest câmp.",
+ email: "Te rugăm să introduci o adresă de email validă",
+ url: "Te rugăm sa introduci o adresă URL validă.",
+ date: "Te rugăm să introduci o dată corectă.",
+ dateISO: "Te rugăm să introduci o dată (ISO) corectă.",
+ number: "Te rugăm să introduci un număr întreg valid.",
+ digits: "Te rugăm să introduci doar cifre.",
+ creditcard: "Te rugăm să introduci un numar de carte de credit valid.",
+ equalTo: "Te rugăm să reintroduci valoarea.",
+ extension: "Te rugăm să introduci o valoare cu o extensie validă.",
+ maxlength: $.validator.format("Te rugăm să nu introduci mai mult de {0} caractere."),
+ minlength: $.validator.format("Te rugăm să introduci cel puțin {0} caractere."),
+ rangelength: $.validator.format("Te rugăm să introduci o valoare între {0} și {1} caractere."),
+ range: $.validator.format("Te rugăm să introduci o valoare între {0} și {1}."),
+ max: $.validator.format("Te rugăm să introduci o valoare egal sau mai mică decât {0}."),
+ min: $.validator.format("Te rugăm să introduci o valoare egal sau mai mare decât {0}.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ro.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ro.min.js
new file mode 100644
index 0000000..9ac878e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ro.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Acest câmp este obligatoriu.",remote:"Te rugăm să completezi acest câmp.",email:"Te rugăm să introduci o adresă de email validă",url:"Te rugăm sa introduci o adresă URL validă.",date:"Te rugăm să introduci o dată corectă.",dateISO:"Te rugăm să introduci o dată (ISO) corectă.",number:"Te rugăm să introduci un număr întreg valid.",digits:"Te rugăm să introduci doar cifre.",creditcard:"Te rugăm să introduci un numar de carte de credit valid.",equalTo:"Te rugăm să reintroduci valoarea.",extension:"Te rugăm să introduci o valoare cu o extensie validă.",maxlength:a.validator.format("Te rugăm să nu introduci mai mult de {0} caractere."),minlength:a.validator.format("Te rugăm să introduci cel puțin {0} caractere."),rangelength:a.validator.format("Te rugăm să introduci o valoare între {0} și {1} caractere."),range:a.validator.format("Te rugăm să introduci o valoare între {0} și {1}."),max:a.validator.format("Te rugăm să introduci o valoare egal sau mai mică decât {0}."),min:a.validator.format("Te rugăm să introduci o valoare egal sau mai mare decât {0}.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ru.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ru.js
new file mode 100644
index 0000000..896827b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ru.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: RU (Russian; руÑÑкий Ñзык)
+ */
+$.extend($.validator.messages, {
+ required: "Это поле необходимо заполнить.",
+ remote: "ПожалуйÑта, введите правильное значение.",
+ email: "ПожалуйÑта, введите корректный Ð°Ð´Ñ€ÐµÑ Ñлектронной почты.",
+ url: "ПожалуйÑта, введите корректный URL.",
+ date: "ПожалуйÑта, введите корректную дату.",
+ dateISO: "ПожалуйÑта, введите корректную дату в формате ISO.",
+ number: "ПожалуйÑта, введите чиÑло.",
+ digits: "ПожалуйÑта, вводите только цифры.",
+ creditcard: "ПожалуйÑта, введите правильный номер кредитной карты.",
+ equalTo: "ПожалуйÑта, введите такое же значение ещё раз.",
+ extension: "ПожалуйÑта, выберите файл Ñ Ð¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ñ‹Ð¼ раÑширением.",
+ maxlength: $.validator.format("ПожалуйÑта, введите не больше {0} Ñимволов."),
+ minlength: $.validator.format("ПожалуйÑта, введите не меньше {0} Ñимволов."),
+ rangelength: $.validator.format("ПожалуйÑта, введите значение длиной от {0} до {1} Ñимволов."),
+ range: $.validator.format("ПожалуйÑта, введите чиÑло от {0} до {1}."),
+ max: $.validator.format("ПожалуйÑта, введите чиÑло, меньшее или равное {0}."),
+ min: $.validator.format("ПожалуйÑта, введите чиÑло, большее или равное {0}.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ru.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ru.min.js
new file mode 100644
index 0000000..47e5871
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_ru.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Это поле необходимо заполнить.",remote:"ПожалуйÑта, введите правильное значение.",email:"ПожалуйÑта, введите корректный Ð°Ð´Ñ€ÐµÑ Ñлектронной почты.",url:"ПожалуйÑта, введите корректный URL.",date:"ПожалуйÑта, введите корректную дату.",dateISO:"ПожалуйÑта, введите корректную дату в формате ISO.",number:"ПожалуйÑта, введите чиÑло.",digits:"ПожалуйÑта, вводите только цифры.",creditcard:"ПожалуйÑта, введите правильный номер кредитной карты.",equalTo:"ПожалуйÑта, введите такое же значение ещё раз.",extension:"ПожалуйÑта, выберите файл Ñ Ð¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ñ‹Ð¼ раÑширением.",maxlength:a.validator.format("ПожалуйÑта, введите не больше {0} Ñимволов."),minlength:a.validator.format("ПожалуйÑта, введите не меньше {0} Ñимволов."),rangelength:a.validator.format("ПожалуйÑта, введите значение длиной от {0} до {1} Ñимволов."),range:a.validator.format("ПожалуйÑта, введите чиÑло от {0} до {1}."),max:a.validator.format("ПожалуйÑта, введите чиÑло, меньшее или равное {0}."),min:a.validator.format("ПожалуйÑта, введите чиÑло, большее или равное {0}.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_si.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_si.js
new file mode 100644
index 0000000..8e04a9d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_si.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: SI (Slovenian)
+ */
+$.extend($.validator.messages, {
+ required: "To polje je obvezno.",
+ remote: "Vpis v tem polju ni v pravi obliki.",
+ email: "Prosimo, vnesite pravi email naslov.",
+ url: "Prosimo, vnesite pravi URL.",
+ date: "Prosimo, vnesite pravi datum.",
+ dateISO: "Prosimo, vnesite pravi datum (ISO).",
+ number: "Prosimo, vnesite pravo Å¡tevilko.",
+ digits: "Prosimo, vnesite samo Å¡tevilke.",
+ creditcard: "Prosimo, vnesite pravo Å¡tevilko kreditne kartice.",
+ equalTo: "Prosimo, ponovno vnesite enako vsebino.",
+ extension: "Prosimo, vnesite vsebino z pravo konÄnico.",
+ maxlength: $.validator.format("Prosimo, da ne vnaÅ¡ate veÄ kot {0} znakov."),
+ minlength: $.validator.format("Prosimo, vnesite vsaj {0} znakov."),
+ rangelength: $.validator.format("Prosimo, vnesite od {0} do {1} znakov."),
+ range: $.validator.format("Prosimo, vnesite vrednost med {0} in {1}."),
+ max: $.validator.format("Prosimo, vnesite vrednost manjšo ali enako {0}."),
+ min: $.validator.format("Prosimo, vnesite vrednost veÄjo ali enako {0}.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_si.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_si.min.js
new file mode 100644
index 0000000..da43656
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_si.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"To polje je obvezno.",remote:"Vpis v tem polju ni v pravi obliki.",email:"Prosimo, vnesite pravi email naslov.",url:"Prosimo, vnesite pravi URL.",date:"Prosimo, vnesite pravi datum.",dateISO:"Prosimo, vnesite pravi datum (ISO).",number:"Prosimo, vnesite pravo Å¡tevilko.",digits:"Prosimo, vnesite samo Å¡tevilke.",creditcard:"Prosimo, vnesite pravo Å¡tevilko kreditne kartice.",equalTo:"Prosimo, ponovno vnesite enako vsebino.",extension:"Prosimo, vnesite vsebino z pravo konÄnico.",maxlength:a.validator.format("Prosimo, da ne vnaÅ¡ate veÄ kot {0} znakov."),minlength:a.validator.format("Prosimo, vnesite vsaj {0} znakov."),rangelength:a.validator.format("Prosimo, vnesite od {0} do {1} znakov."),range:a.validator.format("Prosimo, vnesite vrednost med {0} in {1}."),max:a.validator.format("Prosimo, vnesite vrednost manjÅ¡o ali enako {0}."),min:a.validator.format("Prosimo, vnesite vrednost veÄjo ali enako {0}.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sk.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sk.js
new file mode 100644
index 0000000..cf3680e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sk.js
@@ -0,0 +1,30 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: SK (Slovak; slovenÄina, slovenský jazyk)
+ */
+$.extend($.validator.messages, {
+ required: "Povinné zadať.",
+ maxlength: $.validator.format("Maximálne {0} znakov."),
+ minlength: $.validator.format("Minimálne {0} znakov."),
+ rangelength: $.validator.format("Minimálne {0} a Maximálne {1} znakov."),
+ email: "E-mailová adresa musí byť platná.",
+ url: "URL musí byť platný.",
+ date: "Musí byť dátum.",
+ number: "Musí byÅ¥ Äíslo.",
+ digits: "Môže obsahovaÅ¥ iba Äíslice.",
+ equalTo: "Dva hodnoty sa musia rovnať.",
+ range: $.validator.format("Musí byť medzi {0} a {1}."),
+ max: $.validator.format("Nemôže byť viac ako{0}."),
+ min: $.validator.format("Nemôže byť menej ako{0}."),
+ creditcard: "Číslo platobnej karty musí byť platné."
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sk.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sk.min.js
new file mode 100644
index 0000000..8caaf0c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sk.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Povinné zadaÅ¥.",maxlength:a.validator.format("Maximálne {0} znakov."),minlength:a.validator.format("Minimálne {0} znakov."),rangelength:a.validator.format("Minimálne {0} a Maximálne {1} znakov."),email:"E-mailová adresa musí byÅ¥ platná.",url:"URL musí byÅ¥ platný.",date:"Musí byÅ¥ dátum.",number:"Musí byÅ¥ Äíslo.",digits:"Môže obsahovaÅ¥ iba Äíslice.",equalTo:"Dva hodnoty sa musia rovnaÅ¥.",range:a.validator.format("Musí byÅ¥ medzi {0} a {1}."),max:a.validator.format("Nemôže byÅ¥ viac ako{0}."),min:a.validator.format("Nemôže byÅ¥ menej ako{0}."),creditcard:"Číslo platobnej karty musí byÅ¥ platné."})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sl.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sl.js
new file mode 100644
index 0000000..6eb9e0b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sl.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Language: SL (Slovenian; slovenski jezik)
+ */
+$.extend($.validator.messages, {
+ required: "To polje je obvezno.",
+ remote: "Prosimo popravite to polje.",
+ email: "Prosimo vnesite veljaven email naslov.",
+ url: "Prosimo vnesite veljaven URL naslov.",
+ date: "Prosimo vnesite veljaven datum.",
+ dateISO: "Prosimo vnesite veljaven ISO datum.",
+ number: "Prosimo vnesite veljavno Å¡tevilo.",
+ digits: "Prosimo vnesite samo Å¡tevila.",
+ creditcard: "Prosimo vnesite veljavno Å¡tevilko kreditne kartice.",
+ equalTo: "Prosimo ponovno vnesite vrednost.",
+ extension: "Prosimo vnesite vrednost z veljavno konÄnico.",
+ maxlength: $.validator.format("Prosimo vnesite najveÄ {0} znakov."),
+ minlength: $.validator.format("Prosimo vnesite najmanj {0} znakov."),
+ rangelength: $.validator.format("Prosimo vnesite najmanj {0} in najveÄ {1} znakov."),
+ range: $.validator.format("Prosimo vnesite vrednost med {0} in {1}."),
+ max: $.validator.format("Prosimo vnesite vrednost manjše ali enako {0}."),
+ min: $.validator.format("Prosimo vnesite vrednost veÄje ali enako {0}.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sl.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sl.min.js
new file mode 100644
index 0000000..c32891f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sl.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"To polje je obvezno.",remote:"Prosimo popravite to polje.",email:"Prosimo vnesite veljaven email naslov.",url:"Prosimo vnesite veljaven URL naslov.",date:"Prosimo vnesite veljaven datum.",dateISO:"Prosimo vnesite veljaven ISO datum.",number:"Prosimo vnesite veljavno Å¡tevilo.",digits:"Prosimo vnesite samo Å¡tevila.",creditcard:"Prosimo vnesite veljavno Å¡tevilko kreditne kartice.",equalTo:"Prosimo ponovno vnesite vrednost.",extension:"Prosimo vnesite vrednost z veljavno konÄnico.",maxlength:a.validator.format("Prosimo vnesite najveÄ {0} znakov."),minlength:a.validator.format("Prosimo vnesite najmanj {0} znakov."),rangelength:a.validator.format("Prosimo vnesite najmanj {0} in najveÄ {1} znakov."),range:a.validator.format("Prosimo vnesite vrednost med {0} in {1}."),max:a.validator.format("Prosimo vnesite vrednost manjÅ¡e ali enako {0}."),min:a.validator.format("Prosimo vnesite vrednost veÄje ali enako {0}.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sr.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sr.js
new file mode 100644
index 0000000..e268be8
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sr.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: SR (Serbian; ÑрпÑки језик)
+ */
+$.extend($.validator.messages, {
+ required: "Поље је обавезно.",
+ remote: "Средите ово поље.",
+ email: "УнеÑите иÑправну и-мејл адреÑу.",
+ url: "УнеÑите иÑправан URL.",
+ date: "УнеÑите иÑправан датум.",
+ dateISO: "УнеÑите иÑправан датум (ISO).",
+ number: "УнеÑите иÑправан број.",
+ digits: "УнеÑите Ñамо цифе.",
+ creditcard: "УнеÑите иÑправан број кредитне картице.",
+ equalTo: "УнеÑите иÑту вредноÑÑ‚ поново.",
+ extension: "УнеÑите вредноÑÑ‚ Ñа одговарајућом екÑтензијом.",
+ maxlength: $.validator.format("УнеÑите мање од {0} карактера."),
+ minlength: $.validator.format("УнеÑите барем {0} карактера."),
+ rangelength: $.validator.format("УнеÑите вредноÑÑ‚ дугачку између {0} и {1} карактера."),
+ range: $.validator.format("УнеÑите вредноÑÑ‚ између {0} и {1}."),
+ max: $.validator.format("УнеÑите вредноÑÑ‚ мању или једнаку {0}."),
+ min: $.validator.format("УнеÑите вредноÑÑ‚ већу или једнаку {0}.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sr.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sr.min.js
new file mode 100644
index 0000000..cbdff67
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sr.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Поље је обавезно.",remote:"Средите ово поље.",email:"УнеÑите иÑправну и-мејл адреÑу.",url:"УнеÑите иÑправан URL.",date:"УнеÑите иÑправан датум.",dateISO:"УнеÑите иÑправан датум (ISO).",number:"УнеÑите иÑправан број.",digits:"УнеÑите Ñамо цифе.",creditcard:"УнеÑите иÑправан број кредитне картице.",equalTo:"УнеÑите иÑту вредноÑÑ‚ поново.",extension:"УнеÑите вредноÑÑ‚ Ñа одговарајућом екÑтензијом.",maxlength:a.validator.format("УнеÑите мање од {0} карактера."),minlength:a.validator.format("УнеÑите барем {0} карактера."),rangelength:a.validator.format("УнеÑите вредноÑÑ‚ дугачку између {0} и {1} карактера."),range:a.validator.format("УнеÑите вредноÑÑ‚ између {0} и {1}."),max:a.validator.format("УнеÑите вредноÑÑ‚ мању или једнаку {0}."),min:a.validator.format("УнеÑите вредноÑÑ‚ већу или једнаку {0}.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sr_lat.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sr_lat.js
new file mode 100644
index 0000000..3c14afc
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sr_lat.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: SR (Serbian - Latin alphabet; srpski jezik - latinica)
+ */
+$.extend($.validator.messages, {
+ required: "Polje je obavezno.",
+ remote: "Sredite ovo polje.",
+ email: "Unesite ispravnu i-mejl adresu",
+ url: "Unesite ispravan URL.",
+ date: "Unesite ispravan datum.",
+ dateISO: "Unesite ispravan datum (ISO).",
+ number: "Unesite ispravan broj.",
+ digits: "Unesite samo cife.",
+ creditcard: "Unesite ispravan broj kreditne kartice.",
+ equalTo: "Unesite istu vrednost ponovo.",
+ extension: "Unesite vrednost sa odgovarajućom ekstenzijom.",
+ maxlength: $.validator.format("Unesite manje od {0} karaktera."),
+ minlength: $.validator.format("Unesite barem {0} karaktera."),
+ rangelength: $.validator.format("Unesite vrednost dugaÄku izmeÄ‘u {0} i {1} karaktera."),
+ range: $.validator.format("Unesite vrednost između {0} i {1}."),
+ max: $.validator.format("Unesite vrednost manju ili jednaku {0}."),
+ min: $.validator.format("Unesite vrednost veću ili jednaku {0}.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sr_lat.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sr_lat.min.js
new file mode 100644
index 0000000..4d525c2
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sr_lat.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Polje je obavezno.",remote:"Sredite ovo polje.",email:"Unesite ispravnu i-mejl adresu",url:"Unesite ispravan URL.",date:"Unesite ispravan datum.",dateISO:"Unesite ispravan datum (ISO).",number:"Unesite ispravan broj.",digits:"Unesite samo cife.",creditcard:"Unesite ispravan broj kreditne kartice.",equalTo:"Unesite istu vrednost ponovo.",extension:"Unesite vrednost sa odgovarajućom ekstenzijom.",maxlength:a.validator.format("Unesite manje od {0} karaktera."),minlength:a.validator.format("Unesite barem {0} karaktera."),rangelength:a.validator.format("Unesite vrednost dugaÄku izmeÄ‘u {0} i {1} karaktera."),range:a.validator.format("Unesite vrednost izmeÄ‘u {0} i {1}."),max:a.validator.format("Unesite vrednost manju ili jednaku {0}."),min:a.validator.format("Unesite vrednost veću ili jednaku {0}.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sv.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sv.js
new file mode 100644
index 0000000..758c8a7
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sv.js
@@ -0,0 +1,31 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: SV (Swedish; Svenska)
+ */
+$.extend($.validator.messages, {
+ required: "Detta f&auml;lt &auml;r obligatoriskt.",
+ maxlength: $.validator.format("Du f&aring;r ange h&ouml;gst {0} tecken."),
+ minlength: $.validator.format("Du m&aring;ste ange minst {0} tecken."),
+ rangelength: $.validator.format("Ange minst {0} och max {1} tecken."),
+ email: "Ange en korrekt e-postadress.",
+ url: "Ange en korrekt URL.",
+ date: "Ange ett korrekt datum.",
+ dateISO: "Ange ett korrekt datum (&Aring;&Aring;&Aring;&Aring;-MM-DD).",
+ number: "Ange ett korrekt nummer.",
+ digits: "Ange endast siffror.",
+ equalTo: "Ange samma v&auml;rde igen.",
+ range: $.validator.format("Ange ett v&auml;rde mellan {0} och {1}."),
+ max: $.validator.format("Ange ett v&auml;rde som &auml;r mindre eller lika med {0}."),
+ min: $.validator.format("Ange ett v&auml;rde som &auml;r st&ouml;rre eller lika med {0}."),
+ creditcard: "Ange ett korrekt kreditkortsnummer."
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sv.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sv.min.js
new file mode 100644
index 0000000..625fd19
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_sv.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Detta f&auml;lt &auml;r obligatoriskt.",maxlength:a.validator.format("Du f&aring;r ange h&ouml;gst {0} tecken."),minlength:a.validator.format("Du m&aring;ste ange minst {0} tecken."),rangelength:a.validator.format("Ange minst {0} och max {1} tecken."),email:"Ange en korrekt e-postadress.",url:"Ange en korrekt URL.",date:"Ange ett korrekt datum.",dateISO:"Ange ett korrekt datum (&Aring;&Aring;&Aring;&Aring;-MM-DD).",number:"Ange ett korrekt nummer.",digits:"Ange endast siffror.",equalTo:"Ange samma v&auml;rde igen.",range:a.validator.format("Ange ett v&auml;rde mellan {0} och {1}."),max:a.validator.format("Ange ett v&auml;rde som &auml;r mindre eller lika med {0}."),min:a.validator.format("Ange ett v&auml;rde som &auml;r st&ouml;rre eller lika med {0}."),creditcard:"Ange ett korrekt kreditkortsnummer."})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_th.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_th.js
new file mode 100644
index 0000000..e354e50
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_th.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: TH (Thai; ไทย)
+ */
+$.extend($.validator.messages, {
+ required: "โปรดระบุ",
+ remote: "โปรดà¹à¸à¹‰à¹„ขให้ถูà¸à¸•à¹‰à¸­à¸‡",
+ email: "โปรดระบุที่อยู่อีเมล์ที่ถูà¸à¸•à¹‰à¸­à¸‡",
+ url: "โปรดระบุ URL ที่ถูà¸à¸•à¹‰à¸­à¸‡",
+ date: "โปรดระบุวันที่ ที่ถูà¸à¸•à¹‰à¸­à¸‡",
+ dateISO: "โปรดระบุวันที่ ที่ถูà¸à¸•à¹‰à¸­à¸‡ (ระบบ ISO).",
+ number: "โปรดระบุทศนิยมที่ถูà¸à¸•à¹‰à¸­à¸‡",
+ digits: "โปรดระบุจำนวนเต็มที่ถูà¸à¸•à¹‰à¸­à¸‡",
+ creditcard: "โปรดระบุรหัสบัตรเครดิตที่ถูà¸à¸•à¹‰à¸­à¸‡",
+ equalTo: "โปรดระบุค่าเดิมอีà¸à¸„รั้ง",
+ extension: "โปรดระบุค่าที่มีส่วนขยายที่ถูà¸à¸•à¹‰à¸­à¸‡",
+ maxlength: $.validator.format("โปรดอย่าระบุค่าที่ยาวà¸à¸§à¹ˆà¸² {0} อัà¸à¸‚ระ"),
+ minlength: $.validator.format("โปรดอย่าระบุค่าที่สั้นà¸à¸§à¹ˆà¸² {0} อัà¸à¸‚ระ"),
+ rangelength: $.validator.format("โปรดอย่าระบุค่าความยาวระหว่าง {0} ถึง {1} อัà¸à¸‚ระ"),
+ range: $.validator.format("โปรดระบุค่าระหว่าง {0} à¹à¸¥à¸° {1}"),
+ max: $.validator.format("โปรดระบุค่าน้อยà¸à¸§à¹ˆà¸²à¸«à¸£à¸·à¸­à¹€à¸—่าà¸à¸±à¸š {0}"),
+ min: $.validator.format("โปรดระบุค่ามาà¸à¸à¸§à¹ˆà¸²à¸«à¸£à¸·à¸­à¹€à¸—่าà¸à¸±à¸š {0}")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_th.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_th.min.js
new file mode 100644
index 0000000..64de749
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_th.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"โปรดระบุ",remote:"โปรดà¹à¸à¹‰à¹„ขให้ถูà¸à¸•à¹‰à¸­à¸‡",email:"โปรดระบุที่อยู่อีเมล์ที่ถูà¸à¸•à¹‰à¸­à¸‡",url:"โปรดระบุ URL ที่ถูà¸à¸•à¹‰à¸­à¸‡",date:"โปรดระบุวันที่ ที่ถูà¸à¸•à¹‰à¸­à¸‡",dateISO:"โปรดระบุวันที่ ที่ถูà¸à¸•à¹‰à¸­à¸‡ (ระบบ ISO).",number:"โปรดระบุทศนิยมที่ถูà¸à¸•à¹‰à¸­à¸‡",digits:"โปรดระบุจำนวนเต็มที่ถูà¸à¸•à¹‰à¸­à¸‡",creditcard:"โปรดระบุรหัสบัตรเครดิตที่ถูà¸à¸•à¹‰à¸­à¸‡",equalTo:"โปรดระบุค่าเดิมอีà¸à¸„รั้ง",extension:"โปรดระบุค่าที่มีส่วนขยายที่ถูà¸à¸•à¹‰à¸­à¸‡",maxlength:a.validator.format("โปรดอย่าระบุค่าที่ยาวà¸à¸§à¹ˆà¸² {0} อัà¸à¸‚ระ"),minlength:a.validator.format("โปรดอย่าระบุค่าที่สั้นà¸à¸§à¹ˆà¸² {0} อัà¸à¸‚ระ"),rangelength:a.validator.format("โปรดอย่าระบุค่าความยาวระหว่าง {0} ถึง {1} อัà¸à¸‚ระ"),range:a.validator.format("โปรดระบุค่าระหว่าง {0} à¹à¸¥à¸° {1}"),max:a.validator.format("โปรดระบุค่าน้อยà¸à¸§à¹ˆà¸²à¸«à¸£à¸·à¸­à¹€à¸—่าà¸à¸±à¸š {0}"),min:a.validator.format("โปรดระบุค่ามาà¸à¸à¸§à¹ˆà¸²à¸«à¸£à¸·à¸­à¹€à¸—่าà¸à¸±à¸š {0}")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_tj.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_tj.js
new file mode 100644
index 0000000..67e1e2c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_tj.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: TJ (Tajikistan; Забони тоҷикӣ)
+ */
+$.extend($.validator.messages, {
+ required: "Ворид кардани ин филд маҷбури аÑÑ‚.",
+ remote: "ИлтимоÑ, маълумоти Ñаҳеҳ ворид кунед.",
+ email: "ИлтимоÑ, почтаи Ñлектронии Ñаҳеҳ ворид кунед.",
+ url: "ИлтимоÑ, URL адреÑи Ñаҳеҳ ворид кунед.",
+ date: "ИлтимоÑ, таърихи Ñаҳеҳ ворид кунед.",
+ dateISO: "ИлтимоÑ, таърихи Ñаҳеҳи (ISO)Ó£ ворид кунед.",
+ number: "ИлтимоÑ, рақамҳои Ñаҳеҳ ворид кунед.",
+ digits: "ИлтимоÑ, танҳо рақам ворид кунед.",
+ creditcard: "ИлтимоÑ, кредит карди Ñаҳеҳ ворид кунед.",
+ equalTo: "ИлтимоÑ, миқдори баробар ворид кунед.",
+ extension: "ИлтимоÑ, қофиÑи файлро дуруÑÑ‚ интихоб кунед",
+ maxlength: $.validator.format("ИлтимоÑ, бештар аз {0} рамз ворид накунед."),
+ minlength: $.validator.format("ИлтимоÑ, камтар аз {0} рамз ворид накунед."),
+ rangelength: $.validator.format("ИлтимоÑ, камтар аз {0} ва зиёда аз {1} рамз ворид кунед."),
+ range: $.validator.format("ИлтимоÑ, аз {0} то {1} рақам зиёд ворид кунед."),
+ max: $.validator.format("ИлтимоÑ, бештар аз {0} рақам ворид накунед."),
+ min: $.validator.format("ИлтимоÑ, камтар аз {0} рақам ворид накунед.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_tj.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_tj.min.js
new file mode 100644
index 0000000..89d15e1
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_tj.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Ворид кардани ин филд маҷбури аÑÑ‚.",remote:"ИлтимоÑ, маълумоти Ñаҳеҳ ворид кунед.",email:"ИлтимоÑ, почтаи Ñлектронии Ñаҳеҳ ворид кунед.",url:"ИлтимоÑ, URL адреÑи Ñаҳеҳ ворид кунед.",date:"ИлтимоÑ, таърихи Ñаҳеҳ ворид кунед.",dateISO:"ИлтимоÑ, таърихи Ñаҳеҳи (ISO)Ó£ ворид кунед.",number:"ИлтимоÑ, рақамҳои Ñаҳеҳ ворид кунед.",digits:"ИлтимоÑ, танҳо рақам ворид кунед.",creditcard:"ИлтимоÑ, кредит карди Ñаҳеҳ ворид кунед.",equalTo:"ИлтимоÑ, миқдори баробар ворид кунед.",extension:"ИлтимоÑ, қофиÑи файлро дуруÑÑ‚ интихоб кунед",maxlength:a.validator.format("ИлтимоÑ, бештар аз {0} рамз ворид накунед."),minlength:a.validator.format("ИлтимоÑ, камтар аз {0} рамз ворид накунед."),rangelength:a.validator.format("ИлтимоÑ, камтар аз {0} ва зиёда аз {1} рамз ворид кунед."),range:a.validator.format("ИлтимоÑ, аз {0} то {1} рақам зиёд ворид кунед."),max:a.validator.format("ИлтимоÑ, бештар аз {0} рақам ворид накунед."),min:a.validator.format("ИлтимоÑ, камтар аз {0} рақам ворид накунед.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_tr.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_tr.js
new file mode 100644
index 0000000..1d4c55e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_tr.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: TR (Turkish; Türkçe)
+ */
+$.extend($.validator.messages, {
+ required: "Bu alanın doldurulması zorunludur.",
+ remote: "Lütfen bu alanı düzeltin.",
+ email: "Lütfen geçerli bir e-posta adresi giriniz.",
+ url: "Lütfen geçerli bir web adresi (URL) giriniz.",
+ date: "Lütfen geçerli bir tarih giriniz.",
+ dateISO: "Lütfen geçerli bir tarih giriniz(ISO formatında)",
+ number: "Lütfen geçerli bir sayı giriniz.",
+ digits: "Lütfen sadece sayısal karakterler giriniz.",
+ creditcard: "Lütfen geçerli bir kredi kartı giriniz.",
+ equalTo: "Lütfen aynı değeri tekrar giriniz.",
+ extension: "Lütfen geçerli uzantıya sahip bir değer giriniz.",
+ maxlength: $.validator.format("Lütfen en fazla {0} karakter uzunluğunda bir değer giriniz."),
+ minlength: $.validator.format("Lütfen en az {0} karakter uzunluğunda bir değer giriniz."),
+ rangelength: $.validator.format("Lütfen en az {0} ve en fazla {1} uzunluğunda bir değer giriniz."),
+ range: $.validator.format("Lütfen {0} ile {1} arasında bir değer giriniz."),
+ max: $.validator.format("Lütfen {0} değerine eşit ya da daha küçük bir değer giriniz."),
+ min: $.validator.format("Lütfen {0} değerine eşit ya da daha büyük bir değer giriniz.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_tr.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_tr.min.js
new file mode 100644
index 0000000..bfadcb9
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_tr.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Bu alanın doldurulması zorunludur.",remote:"Lütfen bu alanı düzeltin.",email:"Lütfen geçerli bir e-posta adresi giriniz.",url:"Lütfen geçerli bir web adresi (URL) giriniz.",date:"Lütfen geçerli bir tarih giriniz.",dateISO:"Lütfen geçerli bir tarih giriniz(ISO formatında)",number:"Lütfen geçerli bir sayı giriniz.",digits:"Lütfen sadece sayısal karakterler giriniz.",creditcard:"Lütfen geçerli bir kredi kartı giriniz.",equalTo:"Lütfen aynı değeri tekrar giriniz.",extension:"Lütfen geçerli uzantıya sahip bir değer giriniz.",maxlength:a.validator.format("Lütfen en fazla {0} karakter uzunluğunda bir değer giriniz."),minlength:a.validator.format("Lütfen en az {0} karakter uzunluğunda bir değer giriniz."),rangelength:a.validator.format("Lütfen en az {0} ve en fazla {1} uzunluğunda bir değer giriniz."),range:a.validator.format("Lütfen {0} ile {1} arasında bir değer giriniz."),max:a.validator.format("Lütfen {0} değerine eşit ya da daha küçük bir değer giriniz."),min:a.validator.format("Lütfen {0} değerine eşit ya da daha büyük bir değer giriniz.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_uk.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_uk.js
new file mode 100644
index 0000000..ecb855c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_uk.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: UK (Ukrainian; українÑька мова)
+ */
+$.extend($.validator.messages, {
+ required: "Це поле необхідно заповнити.",
+ remote: "Будь лаÑка, введіть правильне значеннÑ.",
+ email: "Будь лаÑка, введіть коректну адреÑу електронної пошти.",
+ url: "Будь лаÑка, введіть коректний URL.",
+ date: "Будь лаÑка, введіть коректну дату.",
+ dateISO: "Будь лаÑка, введіть коректну дату у форматі ISO.",
+ number: "Будь лаÑка, введіть чиÑло.",
+ digits: "Вводите потрібно лише цифри.",
+ creditcard: "Будь лаÑка, введіть правильний номер кредитної карти.",
+ equalTo: "Будь лаÑка, введіть таке ж Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ‰Ðµ раз.",
+ extension: "Будь лаÑка, виберіть файл з правильним розширеннÑм.",
+ maxlength: $.validator.format("Будь лаÑка, введіть не більше {0} Ñимволів."),
+ minlength: $.validator.format("Будь лаÑка, введіть не менше {0} Ñимволів."),
+ rangelength: $.validator.format("Будь лаÑка, введіть Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð¾Ð²Ð¶Ð¸Ð½Ð¾ÑŽ від {0} до {1} Ñимволів."),
+ range: $.validator.format("Будь лаÑка, введіть чиÑло від {0} до {1}."),
+ max: $.validator.format("Будь лаÑка, введіть чиÑло, менше або рівно {0}."),
+ min: $.validator.format("Будь лаÑка, введіть чиÑло, більше або рівно {0}.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_uk.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_uk.min.js
new file mode 100644
index 0000000..17708d5
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_uk.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Це поле необхідно заповнити.",remote:"Будь лаÑка, введіть правильне значеннÑ.",email:"Будь лаÑка, введіть коректну адреÑу електронної пошти.",url:"Будь лаÑка, введіть коректний URL.",date:"Будь лаÑка, введіть коректну дату.",dateISO:"Будь лаÑка, введіть коректну дату у форматі ISO.",number:"Будь лаÑка, введіть чиÑло.",digits:"Вводите потрібно лише цифри.",creditcard:"Будь лаÑка, введіть правильний номер кредитної карти.",equalTo:"Будь лаÑка, введіть таке ж Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ‰Ðµ раз.",extension:"Будь лаÑка, виберіть файл з правильним розширеннÑм.",maxlength:a.validator.format("Будь лаÑка, введіть не більше {0} Ñимволів."),minlength:a.validator.format("Будь лаÑка, введіть не менше {0} Ñимволів."),rangelength:a.validator.format("Будь лаÑка, введіть Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð¾Ð²Ð¶Ð¸Ð½Ð¾ÑŽ від {0} до {1} Ñимволів."),range:a.validator.format("Будь лаÑка, введіть чиÑло від {0} до {1}."),max:a.validator.format("Будь лаÑка, введіть чиÑло, менше або рівно {0}."),min:a.validator.format("Будь лаÑка, введіть чиÑло, більше або рівно {0}.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_vi.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_vi.js
new file mode 100644
index 0000000..f37b00e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_vi.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: VI (Vietnamese; Tiếng Việt)
+ */
+$.extend($.validator.messages, {
+ required: "Hãy nhập.",
+ remote: "Hãy sửa cho đúng.",
+ email: "Hãy nhập email.",
+ url: "Hãy nhập URL.",
+ date: "Hãy nhập ngày.",
+ dateISO: "Hãy nhập ngày (ISO).",
+ number: "Hãy nhập số.",
+ digits: "Hãy nhập chữ số.",
+ creditcard: "Hãy nhập số thẻ tín dụng.",
+ equalTo: "Hãy nhập thêm lần nữa.",
+ extension: "Phần mở rộng không đúng.",
+ maxlength: $.validator.format("Hãy nhập từ {0} kí tự trở xuống."),
+ minlength: $.validator.format("Hãy nhập từ {0} kí tự trở lên."),
+ rangelength: $.validator.format("Hãy nhập từ {0} đến {1} kí tự."),
+ range: $.validator.format("Hãy nhập từ {0} đến {1}."),
+ max: $.validator.format("Hãy nhập từ {0} trở xuống."),
+ min: $.validator.format("Hãy nhập từ {1} trở lên.")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_vi.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_vi.min.js
new file mode 100644
index 0000000..bf7d4d4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_vi.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Hãy nhập.",remote:"Hãy sửa cho đúng.",email:"Hãy nhập email.",url:"Hãy nhập URL.",date:"Hãy nhập ngày.",dateISO:"Hãy nhập ngày (ISO).",number:"Hãy nhập số.",digits:"Hãy nhập chữ số.",creditcard:"Hãy nhập số thẻ tín dụng.",equalTo:"Hãy nhập thêm lần nữa.",extension:"Phần mở rộng không đúng.",maxlength:a.validator.format("Hãy nhập từ {0} kí tự trở xuống."),minlength:a.validator.format("Hãy nhập từ {0} kí tự trở lên."),rangelength:a.validator.format("Hãy nhập từ {0} đến {1} kí tự."),range:a.validator.format("Hãy nhập từ {0} đến {1}."),max:a.validator.format("Hãy nhập từ {0} trở xuống."),min:a.validator.format("Hãy nhập từ {1} trở lên.")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_zh.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_zh.js
new file mode 100644
index 0000000..a4e121c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_zh.js
@@ -0,0 +1,33 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: ZH (Chinese, 中文 (ZhÅngwén), 汉语, 漢語)
+ */
+$.extend($.validator.messages, {
+ required: "必须填写",
+ remote: "请修正此æ ä½",
+ email: "请输入有效的电å­é‚®ä»¶",
+ url: "请输入有效的网å€",
+ date: "请输入有效的日期",
+ dateISO: "请输入有效的日期 (YYYY-MM-DD)",
+ number: "请输入正确的数字",
+ digits: "åªå¯è¾“入数字",
+ creditcard: "请输入有效的信用å¡å·ç ",
+ equalTo: "你的输入ä¸ç›¸åŒ",
+ extension: "请输入有效的åŽç¼€",
+ maxlength: $.validator.format("最多 {0} 个字"),
+ minlength: $.validator.format("最少 {0} 个字"),
+ rangelength: $.validator.format("请输入长度为 {0} 至 {1} 之間的字串"),
+ range: $.validator.format("请输入 {0} 至 {1} 之间的数值"),
+ max: $.validator.format("请输入ä¸å¤§äºŽ {0} 的数值"),
+ min: $.validator.format("请输入ä¸å°äºŽ {0} 的数值")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_zh.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_zh.min.js
new file mode 100644
index 0000000..3f78784
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_zh.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"必须填写",remote:"请修正此æ ä½",email:"请输入有效的电å­é‚®ä»¶",url:"请输入有效的网å€",date:"请输入有效的日期",dateISO:"请输入有效的日期 (YYYY-MM-DD)",number:"请输入正确的数字",digits:"åªå¯è¾“入数字",creditcard:"请输入有效的信用å¡å·ç ",equalTo:"你的输入ä¸ç›¸åŒ",extension:"请输入有效的åŽç¼€",maxlength:a.validator.format("最多 {0} 个字"),minlength:a.validator.format("最少 {0} 个字"),rangelength:a.validator.format("请输入长度为 {0} 至 {1} 之間的字串"),range:a.validator.format("请输入 {0} 至 {1} 之间的数值"),max:a.validator.format("请输入ä¸å¤§äºŽ {0} 的数值"),min:a.validator.format("请输入ä¸å°äºŽ {0} 的数值")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_zh_TW.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_zh_TW.js
new file mode 100644
index 0000000..fc86be3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_zh_TW.js
@@ -0,0 +1,34 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Translated default messages for the jQuery validation plugin.
+ * Locale: ZH (Chinese; 中文 (ZhÅngwén), 汉语, 漢語)
+ * Region: TW (Taiwan)
+ */
+$.extend($.validator.messages, {
+ required: "必須填寫",
+ remote: "請修正此欄ä½",
+ email: "請輸入有效的電å­éƒµä»¶",
+ url: "請輸入有效的網å€",
+ date: "請輸入有效的日期",
+ dateISO: "請輸入有效的日期 (YYYY-MM-DD)",
+ number: "請輸入正確的數值",
+ digits: "åªå¯è¼¸å…¥æ•¸å­—",
+ creditcard: "請輸入有效的信用å¡è™Ÿç¢¼",
+ equalTo: "è«‹é‡è¤‡è¼¸å…¥ä¸€æ¬¡",
+ extension: "請輸入有效的後綴",
+ maxlength: $.validator.format("最多 {0} 個字"),
+ minlength: $.validator.format("最少 {0} 個字"),
+ rangelength: $.validator.format("請輸入長度為 {0} 至 {1} 之間的字串"),
+ range: $.validator.format("請輸入 {0} 至 {1} 之間的數值"),
+ max: $.validator.format("請輸入ä¸å¤§æ–¼ {0} 的數值"),
+ min: $.validator.format("請輸入ä¸å°æ–¼ {0} 的數值")
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_zh_TW.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_zh_TW.min.js
new file mode 100644
index 0000000..0f1ef48
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/messages_zh_TW.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"必須填寫",remote:"請修正此欄ä½",email:"請輸入有效的電å­éƒµä»¶",url:"請輸入有效的網å€",date:"請輸入有效的日期",dateISO:"請輸入有效的日期 (YYYY-MM-DD)",number:"請輸入正確的數值",digits:"åªå¯è¼¸å…¥æ•¸å­—",creditcard:"請輸入有效的信用å¡è™Ÿç¢¼",equalTo:"è«‹é‡è¤‡è¼¸å…¥ä¸€æ¬¡",extension:"請輸入有效的後綴",maxlength:a.validator.format("最多 {0} 個字"),minlength:a.validator.format("最少 {0} 個字"),rangelength:a.validator.format("請輸入長度為 {0} 至 {1} 之間的字串"),range:a.validator.format("請輸入 {0} 至 {1} 之間的數值"),max:a.validator.format("請輸入ä¸å¤§æ–¼ {0} 的數值"),min:a.validator.format("請輸入ä¸å°æ–¼ {0} 的數值")})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_de.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_de.js
new file mode 100644
index 0000000..470133e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_de.js
@@ -0,0 +1,22 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Localized default methods for the jQuery validation plugin.
+ * Locale: DE
+ */
+$.extend($.validator.methods, {
+ date: function(value, element) {
+ return this.optional(element) || /^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(value);
+ },
+ number: function(value, element) {
+ return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value);
+ }
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_de.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_de.min.js
new file mode 100644
index 0000000..d3ac2ef
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_de.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.methods,{date:function(a,b){return this.optional(b)||/^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(a)}})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_es_CL.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_es_CL.js
new file mode 100644
index 0000000..16446e4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_es_CL.js
@@ -0,0 +1,22 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Localized default methods for the jQuery validation plugin.
+ * Locale: ES_CL
+ */
+$.extend($.validator.methods, {
+ date: function(value, element) {
+ return this.optional(element) || /^\d\d?\-\d\d?\-\d\d\d?\d?$/.test(value);
+ },
+ number: function(value, element) {
+ return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value);
+ }
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_es_CL.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_es_CL.min.js
new file mode 100644
index 0000000..63b83b5
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_es_CL.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.methods,{date:function(a,b){return this.optional(b)||/^\d\d?\-\d\d?\-\d\d\d?\d?$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(a)}})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_fi.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_fi.js
new file mode 100644
index 0000000..44b3e36
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_fi.js
@@ -0,0 +1,22 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Localized default methods for the jQuery validation plugin.
+ * Locale: FI
+ */
+$.extend($.validator.methods, {
+ date: function(value, element) {
+ return this.optional(element) || /^\d{1,2}\.\d{1,2}\.\d{4}$/.test(value);
+ },
+ number: function(value, element) {
+ return this.optional(element) || /^-?(?:\d+)(?:,\d+)?$/.test(value);
+ }
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_fi.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_fi.min.js
new file mode 100644
index 0000000..39e9dd4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_fi.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.methods,{date:function(a,b){return this.optional(b)||/^\d{1,2}\.\d{1,2}\.\d{4}$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+)(?:,\d+)?$/.test(a)}})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_nl.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_nl.js
new file mode 100644
index 0000000..91e0d8c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_nl.js
@@ -0,0 +1,19 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Localized default methods for the jQuery validation plugin.
+ * Locale: NL
+ */
+$.extend($.validator.methods, {
+ date: function(value, element) {
+ return this.optional(element) || /^\d\d?[\.\/\-]\d\d?[\.\/\-]\d\d\d?\d?$/.test(value);
+ }
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_nl.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_nl.min.js
new file mode 100644
index 0000000..52c9893
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_nl.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.methods,{date:function(a,b){return this.optional(b)||/^\d\d?[\.\/\-]\d\d?[\.\/\-]\d\d\d?\d?$/.test(a)}})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_pt.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_pt.js
new file mode 100644
index 0000000..d06ccec
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_pt.js
@@ -0,0 +1,19 @@
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "../jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+/*
+ * Localized default methods for the jQuery validation plugin.
+ * Locale: PT_BR
+ */
+$.extend($.validator.methods, {
+ date: function(value, element) {
+ return this.optional(element) || /^\d\d?\/\d\d?\/\d\d\d?\d?$/.test(value);
+ }
+});
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_pt.min.js b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_pt.min.js
new file mode 100644
index 0000000..2ad410e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery-validation/js/localization/methods_pt.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.13.0 - 7/1/2014
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.methods,{date:function(a,b){return this.optional(b)||/^\d\d?\/\d\d?\/\d\d\d?\d?$/.test(a)}})}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js b/common/src/main/webapp/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js
new file mode 100644
index 0000000..5f9b195
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js
@@ -0,0 +1,479 @@
+/******************************************************************************
+ * jquery.i18n.properties
+ *
+ * Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and
+ * MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
+ *
+ * @version 1.0.x
+ * @author Nuno Fernandes
+ * @url www.codingwithcoffee.com
+ * @inspiration Localisation assistance for jQuery (http://keith-wood.name/localisation.html)
+ * by Keith Wood (kbwood{at}iinet.com.au) June 2007
+ *
+ *****************************************************************************/
+
+(function($) {
+$.i18n = {};
+
+/** Map holding bundle keys (if mode: 'map') */
+$.i18n.map = {};
+
+/**
+ * Load and parse message bundle files (.properties),
+ * making bundles keys available as javascript variables.
+ *
+ * i18n files are named <name>.js, or <name>_<language>.js or <name>_<language>_<country>.js
+ * Where:
+ * The <language> argument is a valid ISO Language Code. These codes are the lower-case,
+ * two-letter codes as defined by ISO-639. You can find a full list of these codes at a
+ * number of sites, such as: http://www.loc.gov/standards/iso639-2/englangn.html
+ * The <country> argument is a valid ISO Country Code. These codes are the upper-case,
+ * two-letter codes as defined by ISO-3166. You can find a full list of these codes at a
+ * number of sites, such as: http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html
+ *
+ * Sample usage for a bundles/Messages.properties bundle:
+ * $.i18n.properties({
+ * name: 'Messages',
+ * language: 'en_US',
+ * path: 'bundles'
+ * });
+ * @param name (string/string[], optional) names of file to load (eg, 'Messages' or ['Msg1','Msg2']). Defaults to "Messages"
+ * @param language (string, optional) language/country code (eg, 'en', 'en_US', 'pt_PT'). if not specified, language reported by the browser will be used instead.
+ * @param path (string, optional) path of directory that contains file to load
+ * @param mode (string, optional) whether bundles keys are available as JavaScript variables/functions or as a map (eg, 'vars' or 'map')
+ * @param cache (boolean, optional) whether bundles should be cached by the browser, or forcibly reloaded on each page load. Defaults to false (i.e. forcibly reloaded)
+ * @param encoding (string, optional) the encoding to request for bundles. Property file resource bundles are specified to be in ISO-8859-1 format. Defaults to UTF-8 for backward compatibility.
+ * @param callback (function, optional) callback function to be called after script is terminated
+ */
+$.i18n.properties = function(settings) {
+ // set up settings
+ var defaults = {
+ name: 'Messages',
+ language: '',
+ path: '',
+ mode: 'vars',
+ cache: false,
+ encoding: 'UTF-8',
+ callback: null
+ };
+ settings = $.extend(defaults, settings);
+ if(settings.language === null || settings.language == '') {
+ settings.language = $.i18n.browserLang();
+ }
+ if(settings.language === null) {settings.language='';}
+
+ // load and parse bundle files
+ var files = getFiles(settings.name);
+ for(i=0; i<files.length; i++) {
+ // 1. load base (eg, Messages.properties)
+ //loadAndParseFile(settings.path + files[i] + '.properties', settings);
+ // 2. with language code (eg, Messages_pt.properties)
+ //if(settings.language.length >= 2) {
+ // loadAndParseFile(settings.path + files[i] + '-' + settings.language.substring(0, 2) +'.properties', settings);
+ //}
+ // 3. with language code and country code (eg, Messages_pt_PT.properties)
+ // 将寻找资æºæ–‡ä»¶çš„顺åºå€’ç½®
+ if(settings.language.length >= 5) {
+ loadAndParseFile(settings.path + files[i] + '-' + settings.language.substring(0, 5) +'.properties', settings);
+ } else if(settings.language.length >= 2) {
+ loadAndParseFile(settings.path + files[i] + '-' + settings.language.substring(0, 2) +'.properties', settings);
+ } else {
+ loadAndParseFile(settings.path + files[i] + '.properties', settings);
+ }
+ }
+
+ // call callback
+ if(settings.callback){ settings.callback(); }
+};
+
+
+/**
+ * When configured with mode: 'map', allows access to bundle values by specifying its key.
+ * Eg, jQuery.i18n.prop('com.company.bundles.menu_add')
+ */
+$.i18n.prop = function(key /* Add parameters as function arguments as necessary */) {
+ var value = $.i18n.map[key];
+ if (value == null)
+ return '[' + key + ']';
+
+// if(arguments.length < 2) // No arguments.
+// //if(key == 'spv.lbl.modified') {alert(value);}
+// return value;
+
+// if (!$.isArray(placeHolderValues)) {
+// // If placeHolderValues is not an array, make it into one.
+// placeHolderValues = [placeHolderValues];
+// for (var i=2; i<arguments.length; i++)
+// placeHolderValues.push(arguments[i]);
+// }
+
+ // Place holder replacement
+ /**
+ * Tested with:
+ * test.t1=asdf ''{0}''
+ * test.t2=asdf '{0}' '{1}'{1}'zxcv
+ * test.t3=This is \"a quote" 'a''{0}''s'd{fgh{ij'
+ * test.t4="'''{'0}''" {0}{a}
+ * test.t5="'''{0}'''" {1}
+ * test.t6=a {1} b {0} c
+ * test.t7=a 'quoted \\ s\ttringy' \t\t x
+ *
+ * Produces:
+ * test.t1, p1 ==> asdf 'p1'
+ * test.t2, p1 ==> asdf {0} {1}{1}zxcv
+ * test.t3, p1 ==> This is "a quote" a'{0}'sd{fgh{ij
+ * test.t4, p1 ==> "'{0}'" p1{a}
+ * test.t5, p1 ==> "'{0}'" {1}
+ * test.t6, p1 ==> a {1} b p1 c
+ * test.t6, p1, p2 ==> a p2 b p1 c
+ * test.t6, p1, p2, p3 ==> a p2 b p1 c
+ * test.t7 ==> a quoted \ s tringy x
+ */
+
+ var i;
+ if (typeof(value) == 'string') {
+ // Handle escape characters. Done separately from the tokenizing loop below because escape characters are
+ // active in quoted strings.
+ i = 0;
+ while ((i = value.indexOf('\\', i)) != -1) {
+ if (value[i+1] == 't')
+ value = value.substring(0, i) + '\t' + value.substring((i++) + 2); // tab
+ else if (value[i+1] == 'r')
+ value = value.substring(0, i) + '\r' + value.substring((i++) + 2); // return
+ else if (value[i+1] == 'n')
+ value = value.substring(0, i) + '\n' + value.substring((i++) + 2); // line feed
+ else if (value[i+1] == 'f')
+ value = value.substring(0, i) + '\f' + value.substring((i++) + 2); // form feed
+ else if (value[i+1] == '\\')
+ value = value.substring(0, i) + '\\' + value.substring((i++) + 2); // \
+ else
+ value = value.substring(0, i) + value.substring(i+1); // Quietly drop the character
+ }
+
+ // Lazily convert the string to a list of tokens.
+ var arr = [], j, index;
+ i = 0;
+ while (i < value.length) {
+ if (value[i] == '\'') {
+ // Handle quotes
+ if (i == value.length-1)
+ value = value.substring(0, i); // Silently drop the trailing quote
+ else if (value[i+1] == '\'')
+ value = value.substring(0, i) + value.substring(++i); // Escaped quote
+ else {
+ // Quoted string
+ j = i + 2;
+ while ((j = value.indexOf('\'', j)) != -1) {
+ if (j == value.length-1 || value[j+1] != '\'') {
+ // Found start and end quotes. Remove them
+ value = value.substring(0,i) + value.substring(i+1, j) + value.substring(j+1);
+ i = j - 1;
+ break;
+ }
+ else {
+ // Found a double quote, reduce to a single quote.
+ value = value.substring(0,j) + value.substring(++j);
+ }
+ }
+
+ if (j == -1) {
+ // There is no end quote. Drop the start quote
+ value = value.substring(0,i) + value.substring(i+1);
+ }
+ }
+ }
+ else if (value[i] == '{') {
+ // Beginning of an unquoted place holder.
+ j = value.indexOf('}', i+1);
+ if (j == -1)
+ i++; // No end. Process the rest of the line. Java would throw an exception
+ else {
+ // Add 1 to the index so that it aligns with the function arguments.
+ index = parseInt(value.substring(i+1, j));
+ if (!isNaN(index) && index >= 0) {
+ // Put the line thus far (if it isn't empty) into the array
+ var s = value.substring(0, i);
+ if (s != "")
+ arr.push(s);
+ // Put the parameter reference into the array
+ arr.push(index);
+ // Start the processing over again starting from the rest of the line.
+ i = 0;
+ value = value.substring(j+1);
+ }
+ else
+ i = j + 1; // Invalid parameter. Leave as is.
+ }
+ }
+ else
+ i++;
+ }
+
+ // Put the remainder of the no-empty line into the array.
+ if (value != "")
+ arr.push(value);
+ value = arr;
+
+ // Make the array the value for the entry.
+ $.i18n.map[key] = arr;
+ }
+
+ if (value.length == 0)
+ return "";
+ if (value.lengh == 1 && typeof(value[0]) == "string")
+ return value[0];
+
+ var s = "";
+ for (i=0; i<value.length; i++) {
+ if (typeof(value[i]) == "string")
+ s += value[i];
+ // Must be a number
+ else if (value[i] + 1 < arguments.length)
+ s += arguments[value[i] + 1];
+ else
+ s += "{"+ value[i] +"}";
+ }
+
+ return s;
+};
+
+/** Language reported by browser, normalized code */
+$.i18n.browserLang = function() {
+ return normaliseLanguageCode(navigator.language /* Mozilla */ || navigator.userLanguage /* IE */);
+}
+
+
+/** Load and parse .properties files */
+function loadAndParseFile(filename, settings) {
+ $.ajax({
+ url: filename,
+ async: false,
+ cache: settings.cache,
+ contentType:'text/plain;charset='+ settings.encoding,
+ dataType: 'text',
+ success: function(data, status) {
+ parseData(data, settings.mode);
+ }
+ });
+}
+
+/** Parse .properties files */
+function parseData(data, mode) {
+ var parsed = '';
+ var parameters = data.split( /\n/ );
+ var regPlaceHolder = /(\{\d+\})/g;
+ var regRepPlaceHolder = /\{(\d+)\}/g;
+ var unicodeRE = /(\\u.{4})/ig;
+ for(var i=0; i<parameters.length; i++ ) {
+ parameters[i] = parameters[i].replace( /^\s\s*/, '' ).replace( /\s\s*$/, '' ); // trim
+ if(parameters[i].length > 0 && parameters[i].match("^#")!="#") { // skip comments
+ var pair = parameters[i].split('=');
+ if(pair.length > 0) {
+ /** Process key & value */
+ var name = unescape(pair[0]).replace( /^\s\s*/, '' ).replace( /\s\s*$/, '' ); // trim
+ var value = pair.length == 1 ? "" : pair[1];
+ // process multi-line values
+ while(value.match(/\\$/)=="\\") {
+ value = value.substring(0, value.length - 1);
+ value += parameters[++i].replace( /\s\s*$/, '' ); // right trim
+ }
+ // Put values with embedded '='s back together
+ for(var s=2;s<pair.length;s++){ value +='=' + pair[s]; }
+ value = value.replace( /^\s\s*/, '' ).replace( /\s\s*$/, '' ); // trim
+
+ /** Mode: bundle keys in a map */
+ if(mode == 'map' || mode == 'both') {
+ // handle unicode chars possibly left out
+ var unicodeMatches = value.match(unicodeRE);
+ if(unicodeMatches) {
+ for(var u=0; u<unicodeMatches.length; u++) {
+ value = value.replace( unicodeMatches[u], unescapeUnicode(unicodeMatches[u]));
+ }
+ }
+ // add to map
+ $.i18n.map[name] = value;
+ }
+
+ /** Mode: bundle keys as vars/functions */
+ if(mode == 'vars' || mode == 'both') {
+ value = value.replace( /"/g, '\\"' ); // escape quotation mark (")
+
+ // make sure namespaced key exists (eg, 'some.key')
+ checkKeyNamespace(name);
+
+ // value with variable substitutions
+ if(regPlaceHolder.test(value)) {
+ var parts = value.split(regPlaceHolder);
+ // process function args
+ var first = true;
+ var fnArgs = '';
+ var usedArgs = [];
+ for(var p=0; p<parts.length; p++) {
+ if(regPlaceHolder.test(parts[p]) && (usedArgs.length == 0 || usedArgs.indexOf(parts[p]) == -1)) {
+ if(!first) {fnArgs += ',';}
+ fnArgs += parts[p].replace(regRepPlaceHolder, 'v$1');
+ usedArgs.push(parts[p]);
+ first = false;
+ }
+ }
+ parsed += name + '=function(' + fnArgs + '){';
+ // process function body
+ var fnExpr = '"' + value.replace(regRepPlaceHolder, '"+v$1+"') + '"';
+ parsed += 'return ' + fnExpr + ';' + '};';
+
+ // simple value
+ }else{
+ parsed += name+'="'+value+'";';
+ }
+ } // END: Mode: bundle keys as vars/functions
+ } // END: if(pair.length > 0)
+ } // END: skip comments
+ }
+ eval(parsed);
+}
+
+/** Make sure namespace exists (for keys with dots in name) */
+// TODO key parts that start with numbers quietly fail. i.e. month.short.1=Jan
+function checkKeyNamespace(key) {
+ var regDot = /\./;
+ if(regDot.test(key)) {
+ var fullname = '';
+ var names = key.split( /\./ );
+ for(var i=0; i<names.length; i++) {
+ if(i>0) {fullname += '.';}
+ fullname += names[i];
+ if(eval('typeof '+fullname+' == "undefined"')) {
+ eval(fullname + '={};');
+ }
+ }
+ }
+}
+
+/** Make sure filename is an array */
+function getFiles(names) {
+ return (names && names.constructor == Array) ? names : [names];
+}
+
+/** Ensure language code is in the format aa_AA. */
+function normaliseLanguageCode(lang) {
+ lang = lang.toLowerCase();
+ if(lang.length > 3) {
+ lang = lang.substring(0, 3) + lang.substring(3).toUpperCase();
+ }
+ return lang;
+}
+
+/** Unescape unicode chars ('\u00e3') */
+function unescapeUnicode(str) {
+ // unescape unicode codes
+ var codes = [];
+ var code = parseInt(str.substr(2), 16);
+ if (code >= 0 && code < Math.pow(2, 16)) {
+ codes.push(code);
+ }
+ // convert codes to text
+ var unescaped = '';
+ for (var i = 0; i < codes.length; ++i) {
+ unescaped += String.fromCharCode(codes[i]);
+ }
+ return unescaped;
+}
+
+/* Cross-Browser Split 1.0.1
+(c) Steven Levithan <stevenlevithan.com>; MIT License
+An ECMA-compliant, uniform cross-browser split method */
+var cbSplit;
+// avoid running twice, which would break `cbSplit._nativeSplit`'s reference to the native `split`
+if (!cbSplit) {
+ cbSplit = function(str, separator, limit) {
+ // if `separator` is not a regex, use the native `split`
+ if (Object.prototype.toString.call(separator) !== "[object RegExp]") {
+ if(typeof cbSplit._nativeSplit == "undefined")
+ return str.split(separator, limit);
+ else
+ return cbSplit._nativeSplit.call(str, separator, limit);
+ }
+
+ var output = [],
+ lastLastIndex = 0,
+ flags = (separator.ignoreCase ? "i" : "") +
+ (separator.multiline ? "m" : "") +
+ (separator.sticky ? "y" : ""),
+ separator = RegExp(separator.source, flags + "g"), // make `global` and avoid `lastIndex` issues by working with a copy
+ separator2, match, lastIndex, lastLength;
+
+ str = str + ""; // type conversion
+ if (!cbSplit._compliantExecNpcg) {
+ separator2 = RegExp("^" + separator.source + "$(?!\\s)", flags); // doesn't need /g or /y, but they don't hurt
+ }
+
+ /* behavior for `limit`: if it's...
+ - `undefined`: no limit.
+ - `NaN` or zero: return an empty array.
+ - a positive number: use `Math.floor(limit)`.
+ - a negative number: no limit.
+ - other: type-convert, then use the above rules. */
+ if (limit === undefined || +limit < 0) {
+ limit = Infinity;
+ } else {
+ limit = Math.floor(+limit);
+ if (!limit) {
+ return [];
+ }
+ }
+
+ while (match = separator.exec(str)) {
+ lastIndex = match.index + match[0].length; // `separator.lastIndex` is not reliable cross-browser
+
+ if (lastIndex > lastLastIndex) {
+ output.push(str.slice(lastLastIndex, match.index));
+
+ // fix browsers whose `exec` methods don't consistently return `undefined` for nonparticipating capturing groups
+ if (!cbSplit._compliantExecNpcg && match.length > 1) {
+ match[0].replace(separator2, function () {
+ for (var i = 1; i < arguments.length - 2; i++) {
+ if (arguments[i] === undefined) {
+ match[i] = undefined;
+ }
+ }
+ });
+ }
+
+ if (match.length > 1 && match.index < str.length) {
+ Array.prototype.push.apply(output, match.slice(1));
+ }
+
+ lastLength = match[0].length;
+ lastLastIndex = lastIndex;
+
+ if (output.length >= limit) {
+ break;
+ }
+ }
+
+ if (separator.lastIndex === match.index) {
+ separator.lastIndex++; // avoid an infinite loop
+ }
+ }
+
+ if (lastLastIndex === str.length) {
+ if (lastLength || !separator.test("")) {
+ output.push("");
+ }
+ } else {
+ output.push(str.slice(lastLastIndex));
+ }
+
+ return output.length > limit ? output.slice(0, limit) : output;
+ };
+
+ cbSplit._compliantExecNpcg = /()??/.exec("")[1] === undefined; // NPCG: nonparticipating capturing group
+ cbSplit._nativeSplit = String.prototype.split;
+
+} // end `if (!cbSplit)`
+String.prototype.split = function (separator, limit) {
+ return cbSplit(this, separator, limit);
+};
+
+})(jQuery);
+ \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery/jquery-1.10.2.min.js b/common/src/main/webapp/thirdparty/jquery/jquery-1.10.2.min.js
new file mode 100644
index 0000000..73f33fb
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery/jquery-1.10.2.min.js
@@ -0,0 +1,4 @@
+/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
+!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=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",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 d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.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(null)},push:f,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){return a-parseFloat(a)>=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&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.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,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}: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):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.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,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"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="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=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)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(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 mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(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 typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.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},z=b?function(a,b){if(a===b)return j=!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===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.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=db.selectors={cacheLength:50,createPseudo:fb,match:V,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(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===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]||db.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]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(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(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.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+" ").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(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(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),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?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===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.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 X.test(a.nodeName)},input:function(a){return W.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:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;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=[u,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(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(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 sb(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 tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(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?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(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(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==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(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),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=u.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.unique(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.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(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 n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(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&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},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().done(c.resolve).fail(c.reject).progress(c.notify):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=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--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){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=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};var 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}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(n.acceptData(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(n.acceptData(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]=null)}}}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--)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.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;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},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}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 typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.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(F)||[""],j=b.length;while(j--)if(h=ab.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,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.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,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!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&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||z,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?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,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(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 yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(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 Cb(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?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.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)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(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?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(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 W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),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=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Mb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)
+},a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],bc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(vc," ").indexOf(b)>=0)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Qc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Dc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Kc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Nc(Jc,k,b,v)){v.readyState=1,h&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Yc[g],b=void 0,f.onreadystatechange=n.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n});
diff --git a/common/src/main/webapp/thirdparty/jquery/jquery-1.11.2.js b/common/src/main/webapp/thirdparty/jquery/jquery-1.11.2.js
new file mode 100644
index 0000000..1c3aa82
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery/jquery-1.11.2.js
@@ -0,0 +1,10346 @@
+/*!
+ * jQuery JavaScript Library v1.11.2
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2014-12-17T15:27Z
+ */
+
+(function( global, factory ) {
+
+ if ( typeof module === "object" && typeof module.exports === "object" ) {
+ // For CommonJS and CommonJS-like environments where a proper window is present,
+ // execute the factory and get jQuery
+ // For environments that do not inherently posses a window with a document
+ // (such as Node.js), expose a jQuery-making factory as module.exports
+ // This accentuates the need for the creation of a real window
+ // e.g. var jQuery = require("jquery")(window);
+ // See ticket #14549 for more info
+ module.exports = global.document ?
+ factory( global, true ) :
+ function( w ) {
+ if ( !w.document ) {
+ throw new Error( "jQuery requires a window with a document" );
+ }
+ return factory( w );
+ };
+ } else {
+ factory( global );
+ }
+
+// Pass this if window is not defined yet
+}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
+
+// Can't do this because several apps including ASP.NET trace
+// the stack via arguments.caller.callee and Firefox dies if
+// you try to trace through "use strict" call chains. (#13335)
+// Support: Firefox 18+
+//
+
+var deletedIds = [];
+
+var slice = deletedIds.slice;
+
+var concat = deletedIds.concat;
+
+var push = deletedIds.push;
+
+var indexOf = deletedIds.indexOf;
+
+var class2type = {};
+
+var toString = class2type.toString;
+
+var hasOwn = class2type.hasOwnProperty;
+
+var support = {};
+
+
+
+var
+ version = "1.11.2",
+
+ // Define a local copy of jQuery
+ jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ // Need init if jQuery is called (just allow error to be thrown if not included)
+ return new jQuery.fn.init( selector, context );
+ },
+
+ // Support: Android<4.1, IE<9
+ // Make sure we trim BOM and NBSP
+ rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+ // Matches dashed string for camelizing
+ rmsPrefix = /^-ms-/,
+ rdashAlpha = /-([\da-z])/gi,
+
+ // Used by jQuery.camelCase as callback to replace()
+ fcamelCase = function( all, letter ) {
+ return letter.toUpperCase();
+ };
+
+jQuery.fn = jQuery.prototype = {
+ // The current version of jQuery being used
+ jquery: version,
+
+ constructor: jQuery,
+
+ // Start with an empty selector
+ selector: "",
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ toArray: function() {
+ return slice.call( this );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num != null ?
+
+ // Return just the one element from the set
+ ( num < 0 ? this[ num + this.length ] : this[ num ] ) :
+
+ // Return all the elements in a clean array
+ slice.call( this );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems ) {
+
+ // Build a new jQuery matched element set
+ var ret = jQuery.merge( this.constructor(), elems );
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+ ret.context = this.context;
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ // (You can seed the arguments with an array of args, but this is
+ // only used internally.)
+ each: function( callback, args ) {
+ return jQuery.each( this, callback, args );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ }));
+ },
+
+ slice: function() {
+ return this.pushStack( slice.apply( this, arguments ) );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ eq: function( i ) {
+ var len = this.length,
+ j = +i + ( i < 0 ? len : 0 );
+ return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
+ },
+
+ end: function() {
+ return this.prevObject || this.constructor(null);
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: push,
+ sort: deletedIds.sort,
+ splice: deletedIds.splice
+};
+
+jQuery.extend = jQuery.fn.extend = function() {
+ var src, copyIsArray, copy, name, options, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+
+ // skip the boolean and the target
+ target = arguments[ i ] || {};
+ i++;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+ target = {};
+ }
+
+ // extend jQuery itself if only one argument is passed
+ if ( i === length ) {
+ target = this;
+ i--;
+ }
+
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray(src) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend({
+ // Unique for each copy of jQuery on the page
+ expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
+
+ // Assume jQuery is ready without the ready module
+ isReady: true,
+
+ error: function( msg ) {
+ throw new Error( msg );
+ },
+
+ noop: function() {},
+
+ // See test/unit/core.js for details concerning isFunction.
+ // Since version 1.3, DOM methods and functions like alert
+ // aren't supported. They return false on IE (#2968).
+ isFunction: function( obj ) {
+ return jQuery.type(obj) === "function";
+ },
+
+ isArray: Array.isArray || function( obj ) {
+ return jQuery.type(obj) === "array";
+ },
+
+ isWindow: function( obj ) {
+ /* jshint eqeqeq: false */
+ return obj != null && obj == obj.window;
+ },
+
+ isNumeric: function( obj ) {
+ // parseFloat NaNs numeric-cast false positives (null|true|false|"")
+ // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
+ // subtraction forces infinities to NaN
+ // adding 1 corrects loss of precision from parseFloat (#15100)
+ return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0;
+ },
+
+ isEmptyObject: function( obj ) {
+ var name;
+ for ( name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ isPlainObject: function( obj ) {
+ var key;
+
+ // Must be an Object.
+ // Because of IE, we also have to check the presence of the constructor property.
+ // Make sure that DOM nodes and window objects don't pass through, as well
+ if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ try {
+ // Not own constructor property must be Object
+ if ( obj.constructor &&
+ !hasOwn.call(obj, "constructor") &&
+ !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+ return false;
+ }
+ } catch ( e ) {
+ // IE8,9 Will throw exceptions on certain host objects #9897
+ return false;
+ }
+
+ // Support: IE<9
+ // Handle iteration over inherited properties before own properties.
+ if ( support.ownLast ) {
+ for ( key in obj ) {
+ return hasOwn.call( obj, key );
+ }
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+ for ( key in obj ) {}
+
+ return key === undefined || hasOwn.call( obj, key );
+ },
+
+ type: function( obj ) {
+ if ( obj == null ) {
+ return obj + "";
+ }
+ return typeof obj === "object" || typeof obj === "function" ?
+ class2type[ toString.call(obj) ] || "object" :
+ typeof obj;
+ },
+
+ // Evaluates a script in a global context
+ // Workarounds based on findings by Jim Driscoll
+ // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+ globalEval: function( data ) {
+ if ( data && jQuery.trim( data ) ) {
+ // We use execScript on Internet Explorer
+ // We use an anonymous function so that context is window
+ // rather than jQuery in Firefox
+ ( window.execScript || function( data ) {
+ window[ "eval" ].call( window, data );
+ } )( data );
+ }
+ },
+
+ // Convert dashed to camelCase; used by the css and data modules
+ // Microsoft forgot to hump their vendor prefix (#9572)
+ camelCase: function( string ) {
+ return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+ },
+
+ // args is for internal usage only
+ each: function( obj, callback, args ) {
+ var value,
+ i = 0,
+ length = obj.length,
+ isArray = isArraylike( obj );
+
+ if ( args ) {
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback.apply( obj[ i ], args );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ value = callback.apply( obj[ i ], args );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ }
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback.call( obj[ i ], i, obj[ i ] );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ value = callback.call( obj[ i ], i, obj[ i ] );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ }
+ }
+
+ return obj;
+ },
+
+ // Support: Android<4.1, IE<9
+ trim: function( text ) {
+ return text == null ?
+ "" :
+ ( text + "" ).replace( rtrim, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( arr, results ) {
+ var ret = results || [];
+
+ if ( arr != null ) {
+ if ( isArraylike( Object(arr) ) ) {
+ jQuery.merge( ret,
+ typeof arr === "string" ?
+ [ arr ] : arr
+ );
+ } else {
+ push.call( ret, arr );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, arr, i ) {
+ var len;
+
+ if ( arr ) {
+ if ( indexOf ) {
+ return indexOf.call( arr, elem, i );
+ }
+
+ len = arr.length;
+ i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
+
+ for ( ; i < len; i++ ) {
+ // Skip accessing in sparse arrays
+ if ( i in arr && arr[ i ] === elem ) {
+ return i;
+ }
+ }
+ }
+
+ return -1;
+ },
+
+ merge: function( first, second ) {
+ var len = +second.length,
+ j = 0,
+ i = first.length;
+
+ while ( j < len ) {
+ first[ i++ ] = second[ j++ ];
+ }
+
+ // Support: IE<9
+ // Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists)
+ if ( len !== len ) {
+ while ( second[j] !== undefined ) {
+ first[ i++ ] = second[ j++ ];
+ }
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, invert ) {
+ var callbackInverse,
+ matches = [],
+ i = 0,
+ length = elems.length,
+ callbackExpect = !invert;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( ; i < length; i++ ) {
+ callbackInverse = !callback( elems[ i ], i );
+ if ( callbackInverse !== callbackExpect ) {
+ matches.push( elems[ i ] );
+ }
+ }
+
+ return matches;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var value,
+ i = 0,
+ length = elems.length,
+ isArray = isArraylike( elems ),
+ ret = [];
+
+ // Go through the array, translating each of the items to their new values
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret.push( value );
+ }
+ }
+
+ // Go through every key on the object,
+ } else {
+ for ( i in elems ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret.push( value );
+ }
+ }
+ }
+
+ // Flatten any nested arrays
+ return concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ // Bind a function to a context, optionally partially applying any
+ // arguments.
+ proxy: function( fn, context ) {
+ var args, proxy, tmp;
+
+ if ( typeof context === "string" ) {
+ tmp = fn[ context ];
+ context = fn;
+ fn = tmp;
+ }
+
+ // Quick check to determine if target is callable, in the spec
+ // this throws a TypeError, but we will just return undefined.
+ if ( !jQuery.isFunction( fn ) ) {
+ return undefined;
+ }
+
+ // Simulated bind
+ args = slice.call( arguments, 2 );
+ proxy = function() {
+ return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
+ };
+
+ // Set the guid of unique handler to the same of original handler, so it can be removed
+ proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+ return proxy;
+ },
+
+ now: function() {
+ return +( new Date() );
+ },
+
+ // jQuery.support is not used in Core but other projects attach their
+ // properties to it so it needs to exist.
+ support: support
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+function isArraylike( obj ) {
+ var length = obj.length,
+ type = jQuery.type( obj );
+
+ if ( type === "function" || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ if ( obj.nodeType === 1 && length ) {
+ return true;
+ }
+
+ return type === "array" || length === 0 ||
+ typeof length === "number" && length > 0 && ( length - 1 ) in obj;
+}
+var Sizzle =
+/*!
+ * Sizzle CSS Selector Engine v2.2.0-pre
+ * http://sizzlejs.com/
+ *
+ * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2014-12-16
+ */
+(function( window ) {
+
+var i,
+ support,
+ Expr,
+ getText,
+ isXML,
+ tokenize,
+ compile,
+ select,
+ outermostContext,
+ sortInput,
+ hasDuplicate,
+
+ // Local document vars
+ setDocument,
+ document,
+ docElem,
+ documentIsHTML,
+ rbuggyQSA,
+ rbuggyMatches,
+ matches,
+ contains,
+
+ // Instance-specific data
+ expando = "sizzle" + 1 * new Date(),
+ preferredDoc = window.document,
+ dirruns = 0,
+ done = 0,
+ classCache = createCache(),
+ tokenCache = createCache(),
+ compilerCache = createCache(),
+ sortOrder = function( a, b ) {
+ if ( a === b ) {
+ hasDuplicate = true;
+ }
+ return 0;
+ },
+
+ // General-purpose constants
+ MAX_NEGATIVE = 1 << 31,
+
+ // Instance methods
+ hasOwn = ({}).hasOwnProperty,
+ arr = [],
+ pop = arr.pop,
+ push_native = arr.push,
+ push = arr.push,
+ slice = arr.slice,
+ // Use a stripped-down indexOf as it's faster than native
+ // http://jsperf.com/thor-indexof-vs-for/5
+ indexOf = function( list, elem ) {
+ var i = 0,
+ len = list.length;
+ for ( ; i < len; i++ ) {
+ if ( list[i] === elem ) {
+ return i;
+ }
+ }
+ return -1;
+ },
+
+ booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
+
+ // Regular expressions
+
+ // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
+ whitespace = "[\\x20\\t\\r\\n\\f]",
+ // http://www.w3.org/TR/css3-syntax/#characters
+ characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
+
+ // Loosely modeled on CSS identifier characters
+ // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
+ // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+ identifier = characterEncoding.replace( "w", "w#" ),
+
+ // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
+ attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace +
+ // Operator (capture 2)
+ "*([*^$|!~]?=)" + whitespace +
+ // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
+ "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
+ "*\\]",
+
+ pseudos = ":(" + characterEncoding + ")(?:\\((" +
+ // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
+ // 1. quoted (capture 3; capture 4 or capture 5)
+ "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
+ // 2. simple (capture 6)
+ "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
+ // 3. anything else (capture 2)
+ ".*" +
+ ")\\)|)",
+
+ // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+ rwhitespace = new RegExp( whitespace + "+", "g" ),
+ rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+ rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+ rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
+
+ rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
+
+ rpseudo = new RegExp( pseudos ),
+ ridentifier = new RegExp( "^" + identifier + "$" ),
+
+ matchExpr = {
+ "ID": new RegExp( "^#(" + characterEncoding + ")" ),
+ "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
+ "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
+ "ATTR": new RegExp( "^" + attributes ),
+ "PSEUDO": new RegExp( "^" + pseudos ),
+ "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
+ "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+ "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+ "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
+ // For use in libraries implementing .is()
+ // We use this for POS matching in `select`
+ "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
+ whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+ },
+
+ rinputs = /^(?:input|select|textarea|button)$/i,
+ rheader = /^h\d$/i,
+
+ rnative = /^[^{]+\{\s*\[native \w/,
+
+ // Easily-parseable/retrievable ID or TAG or CLASS selectors
+ rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+ rsibling = /[+~]/,
+ rescape = /'|\\/g,
+
+ // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+ runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
+ funescape = function( _, escaped, escapedWhitespace ) {
+ var high = "0x" + escaped - 0x10000;
+ // NaN means non-codepoint
+ // Support: Firefox<24
+ // Workaround erroneous numeric interpretation of +"0x"
+ return high !== high || escapedWhitespace ?
+ escaped :
+ high < 0 ?
+ // BMP codepoint
+ String.fromCharCode( high + 0x10000 ) :
+ // Supplemental Plane codepoint (surrogate pair)
+ String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+ },
+
+ // Used for iframes
+ // See setDocument()
+ // Removing the function wrapper causes a "Permission Denied"
+ // error in IE
+ unloadHandler = function() {
+ setDocument();
+ };
+
+// Optimize for push.apply( _, NodeList )
+try {
+ push.apply(
+ (arr = slice.call( preferredDoc.childNodes )),
+ preferredDoc.childNodes
+ );
+ // Support: Android<4.0
+ // Detect silently failing push.apply
+ arr[ preferredDoc.childNodes.length ].nodeType;
+} catch ( e ) {
+ push = { apply: arr.length ?
+
+ // Leverage slice if possible
+ function( target, els ) {
+ push_native.apply( target, slice.call(els) );
+ } :
+
+ // Support: IE<9
+ // Otherwise append directly
+ function( target, els ) {
+ var j = target.length,
+ i = 0;
+ // Can't trust NodeList.length
+ while ( (target[j++] = els[i++]) ) {}
+ target.length = j - 1;
+ }
+ };
+}
+
+function Sizzle( selector, context, results, seed ) {
+ var match, elem, m, nodeType,
+ // QSA vars
+ i, groups, old, nid, newContext, newSelector;
+
+ if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
+ setDocument( context );
+ }
+
+ context = context || document;
+ results = results || [];
+ nodeType = context.nodeType;
+
+ if ( typeof selector !== "string" || !selector ||
+ nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
+
+ return results;
+ }
+
+ if ( !seed && documentIsHTML ) {
+
+ // Try to shortcut find operations when possible (e.g., not under DocumentFragment)
+ if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
+ // Speed-up: Sizzle("#ID")
+ if ( (m = match[1]) ) {
+ if ( nodeType === 9 ) {
+ elem = context.getElementById( m );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document (jQuery #6963)
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE, Opera, and Webkit return items
+ // by name instead of ID
+ if ( elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ } else {
+ return results;
+ }
+ } else {
+ // Context is not a document
+ if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
+ contains( context, elem ) && elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ }
+
+ // Speed-up: Sizzle("TAG")
+ } else if ( match[2] ) {
+ push.apply( results, context.getElementsByTagName( selector ) );
+ return results;
+
+ // Speed-up: Sizzle(".CLASS")
+ } else if ( (m = match[3]) && support.getElementsByClassName ) {
+ push.apply( results, context.getElementsByClassName( m ) );
+ return results;
+ }
+ }
+
+ // QSA path
+ if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
+ nid = old = expando;
+ newContext = context;
+ newSelector = nodeType !== 1 && selector;
+
+ // qSA works strangely on Element-rooted queries
+ // We can work around this by specifying an extra ID on the root
+ // and working up from there (Thanks to Andrew Dupont for the technique)
+ // IE 8 doesn't work on object elements
+ if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+ groups = tokenize( selector );
+
+ if ( (old = context.getAttribute("id")) ) {
+ nid = old.replace( rescape, "\\$&" );
+ } else {
+ context.setAttribute( "id", nid );
+ }
+ nid = "[id='" + nid + "'] ";
+
+ i = groups.length;
+ while ( i-- ) {
+ groups[i] = nid + toSelector( groups[i] );
+ }
+ newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context;
+ newSelector = groups.join(",");
+ }
+
+ if ( newSelector ) {
+ try {
+ push.apply( results,
+ newContext.querySelectorAll( newSelector )
+ );
+ return results;
+ } catch(qsaError) {
+ } finally {
+ if ( !old ) {
+ context.removeAttribute("id");
+ }
+ }
+ }
+ }
+ }
+
+ // All others
+ return select( selector.replace( rtrim, "$1" ), context, results, seed );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
+ * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ * deleting the oldest entry
+ */
+function createCache() {
+ var keys = [];
+
+ function cache( key, value ) {
+ // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+ if ( keys.push( key + " " ) > Expr.cacheLength ) {
+ // Only keep the most recent entries
+ delete cache[ keys.shift() ];
+ }
+ return (cache[ key + " " ] = value);
+ }
+ return cache;
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+ fn[ expando ] = true;
+ return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created div and expects a boolean result
+ */
+function assert( fn ) {
+ var div = document.createElement("div");
+
+ try {
+ return !!fn( div );
+ } catch (e) {
+ return false;
+ } finally {
+ // Remove from its parent by default
+ if ( div.parentNode ) {
+ div.parentNode.removeChild( div );
+ }
+ // release memory in IE
+ div = null;
+ }
+}
+
+/**
+ * Adds the same handler for all of the specified attrs
+ * @param {String} attrs Pipe-separated list of attributes
+ * @param {Function} handler The method that will be applied
+ */
+function addHandle( attrs, handler ) {
+ var arr = attrs.split("|"),
+ i = attrs.length;
+
+ while ( i-- ) {
+ Expr.attrHandle[ arr[i] ] = handler;
+ }
+}
+
+/**
+ * Checks document order of two siblings
+ * @param {Element} a
+ * @param {Element} b
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
+ */
+function siblingCheck( a, b ) {
+ var cur = b && a,
+ diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
+ ( ~b.sourceIndex || MAX_NEGATIVE ) -
+ ( ~a.sourceIndex || MAX_NEGATIVE );
+
+ // Use IE sourceIndex if available on both nodes
+ if ( diff ) {
+ return diff;
+ }
+
+ // Check if b follows a
+ if ( cur ) {
+ while ( (cur = cur.nextSibling) ) {
+ if ( cur === b ) {
+ return -1;
+ }
+ }
+ }
+
+ return a ? 1 : -1;
+}
+
+/**
+ * Returns a function to use in pseudos for input types
+ * @param {String} type
+ */
+function createInputPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for buttons
+ * @param {String} type
+ */
+function createButtonPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for positionals
+ * @param {Function} fn
+ */
+function createPositionalPseudo( fn ) {
+ return markFunction(function( argument ) {
+ argument = +argument;
+ return markFunction(function( seed, matches ) {
+ var j,
+ matchIndexes = fn( [], seed.length, argument ),
+ i = matchIndexes.length;
+
+ // Match elements found at the specified indexes
+ while ( i-- ) {
+ if ( seed[ (j = matchIndexes[i]) ] ) {
+ seed[j] = !(matches[j] = seed[j]);
+ }
+ }
+ });
+ });
+}
+
+/**
+ * Checks a node for validity as a Sizzle context
+ * @param {Element|Object=} context
+ * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
+ */
+function testContext( context ) {
+ return context && typeof context.getElementsByTagName !== "undefined" && context;
+}
+
+// Expose support vars for convenience
+support = Sizzle.support = {};
+
+/**
+ * Detects XML nodes
+ * @param {Element|Object} elem An element or a document
+ * @returns {Boolean} True iff elem is a non-HTML XML node
+ */
+isXML = Sizzle.isXML = function( elem ) {
+ // documentElement is verified for cases where it doesn't yet exist
+ // (such as loading iframes in IE - #4833)
+ var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+/**
+ * Sets document-related variables once based on the current document
+ * @param {Element|Object} [doc] An element or document object to use to set the document
+ * @returns {Object} Returns the current document
+ */
+setDocument = Sizzle.setDocument = function( node ) {
+ var hasCompare, parent,
+ doc = node ? node.ownerDocument || node : preferredDoc;
+
+ // If no document and documentElement is available, return
+ if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
+ return document;
+ }
+
+ // Set our document
+ document = doc;
+ docElem = doc.documentElement;
+ parent = doc.defaultView;
+
+ // Support: IE>8
+ // If iframe document is assigned to "document" variable and if iframe has been reloaded,
+ // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
+ // IE6-8 do not support the defaultView property so parent will be undefined
+ if ( parent && parent !== parent.top ) {
+ // IE11 does not have attachEvent, so all must suffer
+ if ( parent.addEventListener ) {
+ parent.addEventListener( "unload", unloadHandler, false );
+ } else if ( parent.attachEvent ) {
+ parent.attachEvent( "onunload", unloadHandler );
+ }
+ }
+
+ /* Support tests
+ ---------------------------------------------------------------------- */
+ documentIsHTML = !isXML( doc );
+
+ /* Attributes
+ ---------------------------------------------------------------------- */
+
+ // Support: IE<8
+ // Verify that getAttribute really returns attributes and not properties
+ // (excepting IE8 booleans)
+ support.attributes = assert(function( div ) {
+ div.className = "i";
+ return !div.getAttribute("className");
+ });
+
+ /* getElement(s)By*
+ ---------------------------------------------------------------------- */
+
+ // Check if getElementsByTagName("*") returns only elements
+ support.getElementsByTagName = assert(function( div ) {
+ div.appendChild( doc.createComment("") );
+ return !div.getElementsByTagName("*").length;
+ });
+
+ // Support: IE<9
+ support.getElementsByClassName = rnative.test( doc.getElementsByClassName );
+
+ // Support: IE<10
+ // Check if getElementById returns elements by name
+ // The broken getElementById methods don't pick up programatically-set names,
+ // so use a roundabout getElementsByName test
+ support.getById = assert(function( div ) {
+ docElem.appendChild( div ).id = expando;
+ return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
+ });
+
+ // ID find and filter
+ if ( support.getById ) {
+ Expr.find["ID"] = function( id, context ) {
+ if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
+ var m = context.getElementById( id );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ return m && m.parentNode ? [ m ] : [];
+ }
+ };
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ return elem.getAttribute("id") === attrId;
+ };
+ };
+ } else {
+ // Support: IE6/7
+ // getElementById is not reliable as a find shortcut
+ delete Expr.find["ID"];
+
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+ return node && node.value === attrId;
+ };
+ };
+ }
+
+ // Tag
+ Expr.find["TAG"] = support.getElementsByTagName ?
+ function( tag, context ) {
+ if ( typeof context.getElementsByTagName !== "undefined" ) {
+ return context.getElementsByTagName( tag );
+
+ // DocumentFragment nodes don't have gEBTN
+ } else if ( support.qsa ) {
+ return context.querySelectorAll( tag );
+ }
+ } :
+
+ function( tag, context ) {
+ var elem,
+ tmp = [],
+ i = 0,
+ // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
+ results = context.getElementsByTagName( tag );
+
+ // Filter out possible comments
+ if ( tag === "*" ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem.nodeType === 1 ) {
+ tmp.push( elem );
+ }
+ }
+
+ return tmp;
+ }
+ return results;
+ };
+
+ // Class
+ Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
+ if ( documentIsHTML ) {
+ return context.getElementsByClassName( className );
+ }
+ };
+
+ /* QSA/matchesSelector
+ ---------------------------------------------------------------------- */
+
+ // QSA and matchesSelector support
+
+ // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+ rbuggyMatches = [];
+
+ // qSa(:focus) reports false when true (Chrome 21)
+ // We allow this because of a bug in IE8/9 that throws an error
+ // whenever `document.activeElement` is accessed on an iframe
+ // So, we allow :focus to pass through QSA all the time to avoid the IE error
+ // See http://bugs.jquery.com/ticket/13378
+ rbuggyQSA = [];
+
+ if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
+ // Build QSA regex
+ // Regex strategy adopted from Diego Perini
+ assert(function( div ) {
+ // Select is set to empty string on purpose
+ // This is to test IE's treatment of not explicitly
+ // setting a boolean content attribute,
+ // since its presence should be enough
+ // http://bugs.jquery.com/ticket/12359
+ docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" +
+ "<select id='" + expando + "-\f]' msallowcapture=''>" +
+ "<option selected=''></option></select>";
+
+ // Support: IE8, Opera 11-12.16
+ // Nothing should be selected when empty strings follow ^= or $= or *=
+ // The test attribute must be unknown in Opera but "safe" for WinRT
+ // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
+ if ( div.querySelectorAll("[msallowcapture^='']").length ) {
+ rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
+ }
+
+ // Support: IE8
+ // Boolean attributes and "value" are not treated correctly
+ if ( !div.querySelectorAll("[selected]").length ) {
+ rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
+ }
+
+ // Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+
+ if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
+ rbuggyQSA.push("~=");
+ }
+
+ // Webkit/Opera - :checked should return selected option elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":checked").length ) {
+ rbuggyQSA.push(":checked");
+ }
+
+ // Support: Safari 8+, iOS 8+
+ // https://bugs.webkit.org/show_bug.cgi?id=136851
+ // In-page `selector#id sibing-combinator selector` fails
+ if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) {
+ rbuggyQSA.push(".#.+[+~]");
+ }
+ });
+
+ assert(function( div ) {
+ // Support: Windows 8 Native Apps
+ // The type and name attributes are restricted during .innerHTML assignment
+ var input = doc.createElement("input");
+ input.setAttribute( "type", "hidden" );
+ div.appendChild( input ).setAttribute( "name", "D" );
+
+ // Support: IE8
+ // Enforce case-sensitivity of name attribute
+ if ( div.querySelectorAll("[name=d]").length ) {
+ rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
+ }
+
+ // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":enabled").length ) {
+ rbuggyQSA.push( ":enabled", ":disabled" );
+ }
+
+ // Opera 10-11 does not throw on post-comma invalid pseudos
+ div.querySelectorAll("*,:x");
+ rbuggyQSA.push(",.*:");
+ });
+ }
+
+ if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
+ docElem.webkitMatchesSelector ||
+ docElem.mozMatchesSelector ||
+ docElem.oMatchesSelector ||
+ docElem.msMatchesSelector) )) ) {
+
+ assert(function( div ) {
+ // Check to see if it's possible to do matchesSelector
+ // on a disconnected node (IE 9)
+ support.disconnectedMatch = matches.call( div, "div" );
+
+ // This should fail with an exception
+ // Gecko does not error, returns false instead
+ matches.call( div, "[s!='']:x" );
+ rbuggyMatches.push( "!=", pseudos );
+ });
+ }
+
+ rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
+ rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
+
+ /* Contains
+ ---------------------------------------------------------------------- */
+ hasCompare = rnative.test( docElem.compareDocumentPosition );
+
+ // Element contains another
+ // Purposefully does not implement inclusive descendent
+ // As in, an element does not contain itself
+ contains = hasCompare || rnative.test( docElem.contains ) ?
+ function( a, b ) {
+ var adown = a.nodeType === 9 ? a.documentElement : a,
+ bup = b && b.parentNode;
+ return a === bup || !!( bup && bup.nodeType === 1 && (
+ adown.contains ?
+ adown.contains( bup ) :
+ a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+ ));
+ } :
+ function( a, b ) {
+ if ( b ) {
+ while ( (b = b.parentNode) ) {
+ if ( b === a ) {
+ return true;
+ }
+ }
+ }
+ return false;
+ };
+
+ /* Sorting
+ ---------------------------------------------------------------------- */
+
+ // Document order sorting
+ sortOrder = hasCompare ?
+ function( a, b ) {
+
+ // Flag for duplicate removal
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ // Sort on method existence if only one input has compareDocumentPosition
+ var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
+ if ( compare ) {
+ return compare;
+ }
+
+ // Calculate position if both inputs belong to the same document
+ compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
+ a.compareDocumentPosition( b ) :
+
+ // Otherwise we know they are disconnected
+ 1;
+
+ // Disconnected nodes
+ if ( compare & 1 ||
+ (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
+
+ // Choose the first element that is related to our preferred document
+ if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
+ return -1;
+ }
+ if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
+ return 1;
+ }
+
+ // Maintain original order
+ return sortInput ?
+ ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
+ 0;
+ }
+
+ return compare & 4 ? -1 : 1;
+ } :
+ function( a, b ) {
+ // Exit early if the nodes are identical
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ var cur,
+ i = 0,
+ aup = a.parentNode,
+ bup = b.parentNode,
+ ap = [ a ],
+ bp = [ b ];
+
+ // Parentless nodes are either documents or disconnected
+ if ( !aup || !bup ) {
+ return a === doc ? -1 :
+ b === doc ? 1 :
+ aup ? -1 :
+ bup ? 1 :
+ sortInput ?
+ ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
+ 0;
+
+ // If the nodes are siblings, we can do a quick check
+ } else if ( aup === bup ) {
+ return siblingCheck( a, b );
+ }
+
+ // Otherwise we need full lists of their ancestors for comparison
+ cur = a;
+ while ( (cur = cur.parentNode) ) {
+ ap.unshift( cur );
+ }
+ cur = b;
+ while ( (cur = cur.parentNode) ) {
+ bp.unshift( cur );
+ }
+
+ // Walk down the tree looking for a discrepancy
+ while ( ap[i] === bp[i] ) {
+ i++;
+ }
+
+ return i ?
+ // Do a sibling check if the nodes have a common ancestor
+ siblingCheck( ap[i], bp[i] ) :
+
+ // Otherwise nodes in our document sort first
+ ap[i] === preferredDoc ? -1 :
+ bp[i] === preferredDoc ? 1 :
+ 0;
+ };
+
+ return doc;
+};
+
+Sizzle.matches = function( expr, elements ) {
+ return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ // Make sure that attribute selectors are quoted
+ expr = expr.replace( rattributeQuotes, "='$1']" );
+
+ if ( support.matchesSelector && documentIsHTML &&
+ ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
+ ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
+
+ try {
+ var ret = matches.call( elem, expr );
+
+ // IE 9's matchesSelector returns false on disconnected nodes
+ if ( ret || support.disconnectedMatch ||
+ // As well, disconnected nodes are said to be in a document
+ // fragment in IE 9
+ elem.document && elem.document.nodeType !== 11 ) {
+ return ret;
+ }
+ } catch (e) {}
+ }
+
+ return Sizzle( expr, document, null, [ elem ] ).length > 0;
+};
+
+Sizzle.contains = function( context, elem ) {
+ // Set document vars if needed
+ if ( ( context.ownerDocument || context ) !== document ) {
+ setDocument( context );
+ }
+ return contains( context, elem );
+};
+
+Sizzle.attr = function( elem, name ) {
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ var fn = Expr.attrHandle[ name.toLowerCase() ],
+ // Don't get fooled by Object.prototype properties (jQuery #13807)
+ val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
+ fn( elem, name, !documentIsHTML ) :
+ undefined;
+
+ return val !== undefined ?
+ val :
+ support.attributes || !documentIsHTML ?
+ elem.getAttribute( name ) :
+ (val = elem.getAttributeNode(name)) && val.specified ?
+ val.value :
+ null;
+};
+
+Sizzle.error = function( msg ) {
+ throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Document sorting and removing duplicates
+ * @param {ArrayLike} results
+ */
+Sizzle.uniqueSort = function( results ) {
+ var elem,
+ duplicates = [],
+ j = 0,
+ i = 0;
+
+ // Unless we *know* we can detect duplicates, assume their presence
+ hasDuplicate = !support.detectDuplicates;
+ sortInput = !support.sortStable && results.slice( 0 );
+ results.sort( sortOrder );
+
+ if ( hasDuplicate ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem === results[ i ] ) {
+ j = duplicates.push( i );
+ }
+ }
+ while ( j-- ) {
+ results.splice( duplicates[ j ], 1 );
+ }
+ }
+
+ // Clear input after sorting to release objects
+ // See https://github.com/jquery/sizzle/pull/225
+ sortInput = null;
+
+ return results;
+};
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+ var node,
+ ret = "",
+ i = 0,
+ nodeType = elem.nodeType;
+
+ if ( !nodeType ) {
+ // If no nodeType, this is expected to be an array
+ while ( (node = elem[i++]) ) {
+ // Do not traverse comment nodes
+ ret += getText( node );
+ }
+ } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+ // Use textContent for elements
+ // innerText usage removed for consistency of new lines (jQuery #11153)
+ if ( typeof elem.textContent === "string" ) {
+ return elem.textContent;
+ } else {
+ // Traverse its children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ ret += getText( elem );
+ }
+ }
+ } else if ( nodeType === 3 || nodeType === 4 ) {
+ return elem.nodeValue;
+ }
+ // Do not include comment or processing instruction nodes
+
+ return ret;
+};
+
+Expr = Sizzle.selectors = {
+
+ // Can be adjusted by the user
+ cacheLength: 50,
+
+ createPseudo: markFunction,
+
+ match: matchExpr,
+
+ attrHandle: {},
+
+ find: {},
+
+ relative: {
+ ">": { dir: "parentNode", first: true },
+ " ": { dir: "parentNode" },
+ "+": { dir: "previousSibling", first: true },
+ "~": { dir: "previousSibling" }
+ },
+
+ preFilter: {
+ "ATTR": function( match ) {
+ match[1] = match[1].replace( runescape, funescape );
+
+ // Move the given value to match[3] whether quoted or unquoted
+ match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
+
+ if ( match[2] === "~=" ) {
+ match[3] = " " + match[3] + " ";
+ }
+
+ return match.slice( 0, 4 );
+ },
+
+ "CHILD": function( match ) {
+ /* matches from matchExpr["CHILD"]
+ 1 type (only|nth|...)
+ 2 what (child|of-type)
+ 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+ 4 xn-component of xn+y argument ([+-]?\d*n|)
+ 5 sign of xn-component
+ 6 x of xn-component
+ 7 sign of y-component
+ 8 y of y-component
+ */
+ match[1] = match[1].toLowerCase();
+
+ if ( match[1].slice( 0, 3 ) === "nth" ) {
+ // nth-* requires argument
+ if ( !match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ // numeric x and y parameters for Expr.filter.CHILD
+ // remember that false/true cast respectively to 0/1
+ match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
+ match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+
+ // other types prohibit arguments
+ } else if ( match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ return match;
+ },
+
+ "PSEUDO": function( match ) {
+ var excess,
+ unquoted = !match[6] && match[2];
+
+ if ( matchExpr["CHILD"].test( match[0] ) ) {
+ return null;
+ }
+
+ // Accept quoted arguments as-is
+ if ( match[3] ) {
+ match[2] = match[4] || match[5] || "";
+
+ // Strip excess characters from unquoted arguments
+ } else if ( unquoted && rpseudo.test( unquoted ) &&
+ // Get excess from tokenize (recursively)
+ (excess = tokenize( unquoted, true )) &&
+ // advance to the next closing parenthesis
+ (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+ // excess is a negative index
+ match[0] = match[0].slice( 0, excess );
+ match[2] = unquoted.slice( 0, excess );
+ }
+
+ // Return only captures needed by the pseudo filter method (type and argument)
+ return match.slice( 0, 3 );
+ }
+ },
+
+ filter: {
+
+ "TAG": function( nodeNameSelector ) {
+ var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
+ return nodeNameSelector === "*" ?
+ function() { return true; } :
+ function( elem ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+ };
+ },
+
+ "CLASS": function( className ) {
+ var pattern = classCache[ className + " " ];
+
+ return pattern ||
+ (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+ classCache( className, function( elem ) {
+ return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
+ });
+ },
+
+ "ATTR": function( name, operator, check ) {
+ return function( elem ) {
+ var result = Sizzle.attr( elem, name );
+
+ if ( result == null ) {
+ return operator === "!=";
+ }
+ if ( !operator ) {
+ return true;
+ }
+
+ result += "";
+
+ return operator === "=" ? result === check :
+ operator === "!=" ? result !== check :
+ operator === "^=" ? check && result.indexOf( check ) === 0 :
+ operator === "*=" ? check && result.indexOf( check ) > -1 :
+ operator === "$=" ? check && result.slice( -check.length ) === check :
+ operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
+ operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
+ false;
+ };
+ },
+
+ "CHILD": function( type, what, argument, first, last ) {
+ var simple = type.slice( 0, 3 ) !== "nth",
+ forward = type.slice( -4 ) !== "last",
+ ofType = what === "of-type";
+
+ return first === 1 && last === 0 ?
+
+ // Shortcut for :nth-*(n)
+ function( elem ) {
+ return !!elem.parentNode;
+ } :
+
+ function( elem, context, xml ) {
+ var cache, outerCache, node, diff, nodeIndex, start,
+ dir = simple !== forward ? "nextSibling" : "previousSibling",
+ parent = elem.parentNode,
+ name = ofType && elem.nodeName.toLowerCase(),
+ useCache = !xml && !ofType;
+
+ if ( parent ) {
+
+ // :(first|last|only)-(child|of-type)
+ if ( simple ) {
+ while ( dir ) {
+ node = elem;
+ while ( (node = node[ dir ]) ) {
+ if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
+ return false;
+ }
+ }
+ // Reverse direction for :only-* (if we haven't yet done so)
+ start = dir = type === "only" && !start && "nextSibling";
+ }
+ return true;
+ }
+
+ start = [ forward ? parent.firstChild : parent.lastChild ];
+
+ // non-xml :nth-child(...) stores cache data on `parent`
+ if ( forward && useCache ) {
+ // Seek `elem` from a previously-cached index
+ outerCache = parent[ expando ] || (parent[ expando ] = {});
+ cache = outerCache[ type ] || [];
+ nodeIndex = cache[0] === dirruns && cache[1];
+ diff = cache[0] === dirruns && cache[2];
+ node = nodeIndex && parent.childNodes[ nodeIndex ];
+
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+
+ // Fallback to seeking `elem` from the start
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ // When found, cache indexes on `parent` and break
+ if ( node.nodeType === 1 && ++diff && node === elem ) {
+ outerCache[ type ] = [ dirruns, nodeIndex, diff ];
+ break;
+ }
+ }
+
+ // Use previously-cached element index if available
+ } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
+ diff = cache[1];
+
+ // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
+ } else {
+ // Use the same loop as above to seek `elem` from the start
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
+ // Cache the index of each encountered element
+ if ( useCache ) {
+ (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
+ }
+
+ if ( node === elem ) {
+ break;
+ }
+ }
+ }
+ }
+
+ // Incorporate the offset, then check against cycle size
+ diff -= last;
+ return diff === first || ( diff % first === 0 && diff / first >= 0 );
+ }
+ };
+ },
+
+ "PSEUDO": function( pseudo, argument ) {
+ // pseudo-class names are case-insensitive
+ // http://www.w3.org/TR/selectors/#pseudo-classes
+ // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+ // Remember that setFilters inherits from pseudos
+ var args,
+ fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+ Sizzle.error( "unsupported pseudo: " + pseudo );
+
+ // The user may use createPseudo to indicate that
+ // arguments are needed to create the filter function
+ // just as Sizzle does
+ if ( fn[ expando ] ) {
+ return fn( argument );
+ }
+
+ // But maintain support for old signatures
+ if ( fn.length > 1 ) {
+ args = [ pseudo, pseudo, "", argument ];
+ return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+ markFunction(function( seed, matches ) {
+ var idx,
+ matched = fn( seed, argument ),
+ i = matched.length;
+ while ( i-- ) {
+ idx = indexOf( seed, matched[i] );
+ seed[ idx ] = !( matches[ idx ] = matched[i] );
+ }
+ }) :
+ function( elem ) {
+ return fn( elem, 0, args );
+ };
+ }
+
+ return fn;
+ }
+ },
+
+ pseudos: {
+ // Potentially complex pseudos
+ "not": markFunction(function( selector ) {
+ // Trim the selector passed to compile
+ // to avoid treating leading and trailing
+ // spaces as combinators
+ var input = [],
+ results = [],
+ matcher = compile( selector.replace( rtrim, "$1" ) );
+
+ return matcher[ expando ] ?
+ markFunction(function( seed, matches, context, xml ) {
+ var elem,
+ unmatched = matcher( seed, null, xml, [] ),
+ i = seed.length;
+
+ // Match elements unmatched by `matcher`
+ while ( i-- ) {
+ if ( (elem = unmatched[i]) ) {
+ seed[i] = !(matches[i] = elem);
+ }
+ }
+ }) :
+ function( elem, context, xml ) {
+ input[0] = elem;
+ matcher( input, null, xml, results );
+ // Don't keep the element (issue #299)
+ input[0] = null;
+ return !results.pop();
+ };
+ }),
+
+ "has": markFunction(function( selector ) {
+ return function( elem ) {
+ return Sizzle( selector, elem ).length > 0;
+ };
+ }),
+
+ "contains": markFunction(function( text ) {
+ text = text.replace( runescape, funescape );
+ return function( elem ) {
+ return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+ };
+ }),
+
+ // "Whether an element is represented by a :lang() selector
+ // is based solely on the element's language value
+ // being equal to the identifier C,
+ // or beginning with the identifier C immediately followed by "-".
+ // The matching of C against the element's language value is performed case-insensitively.
+ // The identifier C does not have to be a valid language name."
+ // http://www.w3.org/TR/selectors/#lang-pseudo
+ "lang": markFunction( function( lang ) {
+ // lang value must be a valid identifier
+ if ( !ridentifier.test(lang || "") ) {
+ Sizzle.error( "unsupported lang: " + lang );
+ }
+ lang = lang.replace( runescape, funescape ).toLowerCase();
+ return function( elem ) {
+ var elemLang;
+ do {
+ if ( (elemLang = documentIsHTML ?
+ elem.lang :
+ elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
+
+ elemLang = elemLang.toLowerCase();
+ return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+ }
+ } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+ return false;
+ };
+ }),
+
+ // Miscellaneous
+ "target": function( elem ) {
+ var hash = window.location && window.location.hash;
+ return hash && hash.slice( 1 ) === elem.id;
+ },
+
+ "root": function( elem ) {
+ return elem === docElem;
+ },
+
+ "focus": function( elem ) {
+ return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+ },
+
+ // Boolean properties
+ "enabled": function( elem ) {
+ return elem.disabled === false;
+ },
+
+ "disabled": function( elem ) {
+ return elem.disabled === true;
+ },
+
+ "checked": function( elem ) {
+ // In CSS3, :checked should return both checked and selected elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ var nodeName = elem.nodeName.toLowerCase();
+ return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+ },
+
+ "selected": function( elem ) {
+ // Accessing this property makes selected-by-default
+ // options in Safari work properly
+ if ( elem.parentNode ) {
+ elem.parentNode.selectedIndex;
+ }
+
+ return elem.selected === true;
+ },
+
+ // Contents
+ "empty": function( elem ) {
+ // http://www.w3.org/TR/selectors/#empty-pseudo
+ // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
+ // but not by others (comment: 8; processing instruction: 7; etc.)
+ // nodeType < 6 works because attributes (2) do not appear as children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ if ( elem.nodeType < 6 ) {
+ return false;
+ }
+ }
+ return true;
+ },
+
+ "parent": function( elem ) {
+ return !Expr.pseudos["empty"]( elem );
+ },
+
+ // Element/input types
+ "header": function( elem ) {
+ return rheader.test( elem.nodeName );
+ },
+
+ "input": function( elem ) {
+ return rinputs.test( elem.nodeName );
+ },
+
+ "button": function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === "button" || name === "button";
+ },
+
+ "text": function( elem ) {
+ var attr;
+ return elem.nodeName.toLowerCase() === "input" &&
+ elem.type === "text" &&
+
+ // Support: IE<8
+ // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
+ ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
+ },
+
+ // Position-in-collection
+ "first": createPositionalPseudo(function() {
+ return [ 0 ];
+ }),
+
+ "last": createPositionalPseudo(function( matchIndexes, length ) {
+ return [ length - 1 ];
+ }),
+
+ "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ return [ argument < 0 ? argument + length : argument ];
+ }),
+
+ "even": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 0;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "odd": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 1;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; --i >= 0; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; ++i < length; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ })
+ }
+};
+
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Add button/input type pseudos
+for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
+ Expr.pseudos[ i ] = createInputPseudo( i );
+}
+for ( i in { submit: true, reset: true } ) {
+ Expr.pseudos[ i ] = createButtonPseudo( i );
+}
+
+// Easy API for creating new setFilters
+function setFilters() {}
+setFilters.prototype = Expr.filters = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
+ var matched, match, tokens, type,
+ soFar, groups, preFilters,
+ cached = tokenCache[ selector + " " ];
+
+ if ( cached ) {
+ return parseOnly ? 0 : cached.slice( 0 );
+ }
+
+ soFar = selector;
+ groups = [];
+ preFilters = Expr.preFilter;
+
+ while ( soFar ) {
+
+ // Comma and first run
+ if ( !matched || (match = rcomma.exec( soFar )) ) {
+ if ( match ) {
+ // Don't consume trailing commas as valid
+ soFar = soFar.slice( match[0].length ) || soFar;
+ }
+ groups.push( (tokens = []) );
+ }
+
+ matched = false;
+
+ // Combinators
+ if ( (match = rcombinators.exec( soFar )) ) {
+ matched = match.shift();
+ tokens.push({
+ value: matched,
+ // Cast descendant combinators to space
+ type: match[0].replace( rtrim, " " )
+ });
+ soFar = soFar.slice( matched.length );
+ }
+
+ // Filters
+ for ( type in Expr.filter ) {
+ if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+ (match = preFilters[ type ]( match ))) ) {
+ matched = match.shift();
+ tokens.push({
+ value: matched,
+ type: type,
+ matches: match
+ });
+ soFar = soFar.slice( matched.length );
+ }
+ }
+
+ if ( !matched ) {
+ break;
+ }
+ }
+
+ // Return the length of the invalid excess
+ // if we're just parsing
+ // Otherwise, throw an error or return tokens
+ return parseOnly ?
+ soFar.length :
+ soFar ?
+ Sizzle.error( selector ) :
+ // Cache the tokens
+ tokenCache( selector, groups ).slice( 0 );
+};
+
+function toSelector( tokens ) {
+ var i = 0,
+ len = tokens.length,
+ selector = "";
+ for ( ; i < len; i++ ) {
+ selector += tokens[i].value;
+ }
+ return selector;
+}
+
+function addCombinator( matcher, combinator, base ) {
+ var dir = combinator.dir,
+ checkNonElements = base && dir === "parentNode",
+ doneName = done++;
+
+ return combinator.first ?
+ // Check against closest ancestor/preceding element
+ function( elem, context, xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ return matcher( elem, context, xml );
+ }
+ }
+ } :
+
+ // Check against all ancestor/preceding elements
+ function( elem, context, xml ) {
+ var oldCache, outerCache,
+ newCache = [ dirruns, doneName ];
+
+ // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+ if ( xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ if ( matcher( elem, context, xml ) ) {
+ return true;
+ }
+ }
+ }
+ } else {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ outerCache = elem[ expando ] || (elem[ expando ] = {});
+ if ( (oldCache = outerCache[ dir ]) &&
+ oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
+
+ // Assign to newCache so results back-propagate to previous elements
+ return (newCache[ 2 ] = oldCache[ 2 ]);
+ } else {
+ // Reuse newcache so results back-propagate to previous elements
+ outerCache[ dir ] = newCache;
+
+ // A match means we're done; a fail means we have to keep checking
+ if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ };
+}
+
+function elementMatcher( matchers ) {
+ return matchers.length > 1 ?
+ function( elem, context, xml ) {
+ var i = matchers.length;
+ while ( i-- ) {
+ if ( !matchers[i]( elem, context, xml ) ) {
+ return false;
+ }
+ }
+ return true;
+ } :
+ matchers[0];
+}
+
+function multipleContexts( selector, contexts, results ) {
+ var i = 0,
+ len = contexts.length;
+ for ( ; i < len; i++ ) {
+ Sizzle( selector, contexts[i], results );
+ }
+ return results;
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+ var elem,
+ newUnmatched = [],
+ i = 0,
+ len = unmatched.length,
+ mapped = map != null;
+
+ for ( ; i < len; i++ ) {
+ if ( (elem = unmatched[i]) ) {
+ if ( !filter || filter( elem, context, xml ) ) {
+ newUnmatched.push( elem );
+ if ( mapped ) {
+ map.push( i );
+ }
+ }
+ }
+ }
+
+ return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+ if ( postFilter && !postFilter[ expando ] ) {
+ postFilter = setMatcher( postFilter );
+ }
+ if ( postFinder && !postFinder[ expando ] ) {
+ postFinder = setMatcher( postFinder, postSelector );
+ }
+ return markFunction(function( seed, results, context, xml ) {
+ var temp, i, elem,
+ preMap = [],
+ postMap = [],
+ preexisting = results.length,
+
+ // Get initial elements from seed or context
+ elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+ // Prefilter to get matcher input, preserving a map for seed-results synchronization
+ matcherIn = preFilter && ( seed || !selector ) ?
+ condense( elems, preMap, preFilter, context, xml ) :
+ elems,
+
+ matcherOut = matcher ?
+ // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+ postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+ // ...intermediate processing is necessary
+ [] :
+
+ // ...otherwise use results directly
+ results :
+ matcherIn;
+
+ // Find primary matches
+ if ( matcher ) {
+ matcher( matcherIn, matcherOut, context, xml );
+ }
+
+ // Apply postFilter
+ if ( postFilter ) {
+ temp = condense( matcherOut, postMap );
+ postFilter( temp, [], context, xml );
+
+ // Un-match failing elements by moving them back to matcherIn
+ i = temp.length;
+ while ( i-- ) {
+ if ( (elem = temp[i]) ) {
+ matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+ }
+ }
+ }
+
+ if ( seed ) {
+ if ( postFinder || preFilter ) {
+ if ( postFinder ) {
+ // Get the final matcherOut by condensing this intermediate into postFinder contexts
+ temp = [];
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) ) {
+ // Restore matcherIn since elem is not yet a final match
+ temp.push( (matcherIn[i] = elem) );
+ }
+ }
+ postFinder( null, (matcherOut = []), temp, xml );
+ }
+
+ // Move matched elements from seed to results to keep them synchronized
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) &&
+ (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
+
+ seed[temp] = !(results[temp] = elem);
+ }
+ }
+ }
+
+ // Add elements to results, through postFinder if defined
+ } else {
+ matcherOut = condense(
+ matcherOut === results ?
+ matcherOut.splice( preexisting, matcherOut.length ) :
+ matcherOut
+ );
+ if ( postFinder ) {
+ postFinder( null, results, matcherOut, xml );
+ } else {
+ push.apply( results, matcherOut );
+ }
+ }
+ });
+}
+
+function matcherFromTokens( tokens ) {
+ var checkContext, matcher, j,
+ len = tokens.length,
+ leadingRelative = Expr.relative[ tokens[0].type ],
+ implicitRelative = leadingRelative || Expr.relative[" "],
+ i = leadingRelative ? 1 : 0,
+
+ // The foundational matcher ensures that elements are reachable from top-level context(s)
+ matchContext = addCombinator( function( elem ) {
+ return elem === checkContext;
+ }, implicitRelative, true ),
+ matchAnyContext = addCombinator( function( elem ) {
+ return indexOf( checkContext, elem ) > -1;
+ }, implicitRelative, true ),
+ matchers = [ function( elem, context, xml ) {
+ var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+ (checkContext = context).nodeType ?
+ matchContext( elem, context, xml ) :
+ matchAnyContext( elem, context, xml ) );
+ // Avoid hanging onto element (issue #299)
+ checkContext = null;
+ return ret;
+ } ];
+
+ for ( ; i < len; i++ ) {
+ if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+ matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
+ } else {
+ matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+ // Return special upon seeing a positional matcher
+ if ( matcher[ expando ] ) {
+ // Find the next relative operator (if any) for proper handling
+ j = ++i;
+ for ( ; j < len; j++ ) {
+ if ( Expr.relative[ tokens[j].type ] ) {
+ break;
+ }
+ }
+ return setMatcher(
+ i > 1 && elementMatcher( matchers ),
+ i > 1 && toSelector(
+ // If the preceding token was a descendant combinator, insert an implicit any-element `*`
+ tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
+ ).replace( rtrim, "$1" ),
+ matcher,
+ i < j && matcherFromTokens( tokens.slice( i, j ) ),
+ j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+ j < len && toSelector( tokens )
+ );
+ }
+ matchers.push( matcher );
+ }
+ }
+
+ return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+ var bySet = setMatchers.length > 0,
+ byElement = elementMatchers.length > 0,
+ superMatcher = function( seed, context, xml, results, outermost ) {
+ var elem, j, matcher,
+ matchedCount = 0,
+ i = "0",
+ unmatched = seed && [],
+ setMatched = [],
+ contextBackup = outermostContext,
+ // We must always have either seed elements or outermost context
+ elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
+ // Use integer dirruns iff this is the outermost matcher
+ dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
+ len = elems.length;
+
+ if ( outermost ) {
+ outermostContext = context !== document && context;
+ }
+
+ // Add elements passing elementMatchers directly to results
+ // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
+ // Support: IE<9, Safari
+ // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
+ for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
+ if ( byElement && elem ) {
+ j = 0;
+ while ( (matcher = elementMatchers[j++]) ) {
+ if ( matcher( elem, context, xml ) ) {
+ results.push( elem );
+ break;
+ }
+ }
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ }
+ }
+
+ // Track unmatched elements for set filters
+ if ( bySet ) {
+ // They will have gone through all possible matchers
+ if ( (elem = !matcher && elem) ) {
+ matchedCount--;
+ }
+
+ // Lengthen the array for every element, matched or not
+ if ( seed ) {
+ unmatched.push( elem );
+ }
+ }
+ }
+
+ // Apply set filters to unmatched elements
+ matchedCount += i;
+ if ( bySet && i !== matchedCount ) {
+ j = 0;
+ while ( (matcher = setMatchers[j++]) ) {
+ matcher( unmatched, setMatched, context, xml );
+ }
+
+ if ( seed ) {
+ // Reintegrate element matches to eliminate the need for sorting
+ if ( matchedCount > 0 ) {
+ while ( i-- ) {
+ if ( !(unmatched[i] || setMatched[i]) ) {
+ setMatched[i] = pop.call( results );
+ }
+ }
+ }
+
+ // Discard index placeholder values to get only actual matches
+ setMatched = condense( setMatched );
+ }
+
+ // Add matches to results
+ push.apply( results, setMatched );
+
+ // Seedless set matches succeeding multiple successful matchers stipulate sorting
+ if ( outermost && !seed && setMatched.length > 0 &&
+ ( matchedCount + setMatchers.length ) > 1 ) {
+
+ Sizzle.uniqueSort( results );
+ }
+ }
+
+ // Override manipulation of globals by nested matchers
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ outermostContext = contextBackup;
+ }
+
+ return unmatched;
+ };
+
+ return bySet ?
+ markFunction( superMatcher ) :
+ superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
+ var i,
+ setMatchers = [],
+ elementMatchers = [],
+ cached = compilerCache[ selector + " " ];
+
+ if ( !cached ) {
+ // Generate a function of recursive functions that can be used to check each element
+ if ( !match ) {
+ match = tokenize( selector );
+ }
+ i = match.length;
+ while ( i-- ) {
+ cached = matcherFromTokens( match[i] );
+ if ( cached[ expando ] ) {
+ setMatchers.push( cached );
+ } else {
+ elementMatchers.push( cached );
+ }
+ }
+
+ // Cache the compiled function
+ cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+
+ // Save selector and tokenization
+ cached.selector = selector;
+ }
+ return cached;
+};
+
+/**
+ * A low-level selection function that works with Sizzle's compiled
+ * selector functions
+ * @param {String|Function} selector A selector or a pre-compiled
+ * selector function built with Sizzle.compile
+ * @param {Element} context
+ * @param {Array} [results]
+ * @param {Array} [seed] A set of elements to match against
+ */
+select = Sizzle.select = function( selector, context, results, seed ) {
+ var i, tokens, token, type, find,
+ compiled = typeof selector === "function" && selector,
+ match = !seed && tokenize( (selector = compiled.selector || selector) );
+
+ results = results || [];
+
+ // Try to minimize operations if there is no seed and only one group
+ if ( match.length === 1 ) {
+
+ // Take a shortcut and set the context if the root selector is an ID
+ tokens = match[0] = match[0].slice( 0 );
+ if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+ support.getById && context.nodeType === 9 && documentIsHTML &&
+ Expr.relative[ tokens[1].type ] ) {
+
+ context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
+ if ( !context ) {
+ return results;
+
+ // Precompiled matchers will still verify ancestry, so step up a level
+ } else if ( compiled ) {
+ context = context.parentNode;
+ }
+
+ selector = selector.slice( tokens.shift().value.length );
+ }
+
+ // Fetch a seed set for right-to-left matching
+ i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+ while ( i-- ) {
+ token = tokens[i];
+
+ // Abort if we hit a combinator
+ if ( Expr.relative[ (type = token.type) ] ) {
+ break;
+ }
+ if ( (find = Expr.find[ type ]) ) {
+ // Search, expanding context for leading sibling combinators
+ if ( (seed = find(
+ token.matches[0].replace( runescape, funescape ),
+ rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
+ )) ) {
+
+ // If seed is empty or no tokens remain, we can return early
+ tokens.splice( i, 1 );
+ selector = seed.length && toSelector( tokens );
+ if ( !selector ) {
+ push.apply( results, seed );
+ return results;
+ }
+
+ break;
+ }
+ }
+ }
+ }
+
+ // Compile and execute a filtering function if one is not provided
+ // Provide `match` to avoid retokenization if we modified the selector above
+ ( compiled || compile( selector, match ) )(
+ seed,
+ context,
+ !documentIsHTML,
+ results,
+ rsibling.test( selector ) && testContext( context.parentNode ) || context
+ );
+ return results;
+};
+
+// One-time assignments
+
+// Sort stability
+support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
+
+// Support: Chrome 14-35+
+// Always assume duplicates if they aren't passed to the comparison function
+support.detectDuplicates = !!hasDuplicate;
+
+// Initialize against the default document
+setDocument();
+
+// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
+// Detached nodes confoundingly follow *each other*
+support.sortDetached = assert(function( div1 ) {
+ // Should return 1, but returns 4 (following)
+ return div1.compareDocumentPosition( document.createElement("div") ) & 1;
+});
+
+// Support: IE<8
+// Prevent attribute/property "interpolation"
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !assert(function( div ) {
+ div.innerHTML = "<a href='#'></a>";
+ return div.firstChild.getAttribute("href") === "#" ;
+}) ) {
+ addHandle( "type|href|height|width", function( elem, name, isXML ) {
+ if ( !isXML ) {
+ return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
+ }
+ });
+}
+
+// Support: IE<9
+// Use defaultValue in place of getAttribute("value")
+if ( !support.attributes || !assert(function( div ) {
+ div.innerHTML = "<input/>";
+ div.firstChild.setAttribute( "value", "" );
+ return div.firstChild.getAttribute( "value" ) === "";
+}) ) {
+ addHandle( "value", function( elem, name, isXML ) {
+ if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
+ return elem.defaultValue;
+ }
+ });
+}
+
+// Support: IE<9
+// Use getAttributeNode to fetch booleans when getAttribute lies
+if ( !assert(function( div ) {
+ return div.getAttribute("disabled") == null;
+}) ) {
+ addHandle( booleans, function( elem, name, isXML ) {
+ var val;
+ if ( !isXML ) {
+ return elem[ name ] === true ? name.toLowerCase() :
+ (val = elem.getAttributeNode( name )) && val.specified ?
+ val.value :
+ null;
+ }
+ });
+}
+
+return Sizzle;
+
+})( window );
+
+
+
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.pseudos;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+
+var rneedsContext = jQuery.expr.match.needsContext;
+
+var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/);
+
+
+
+var risSimple = /^.[^:#\[\.,]*$/;
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, not ) {
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep( elements, function( elem, i ) {
+ /* jshint -W018 */
+ return !!qualifier.call( elem, i, elem ) !== not;
+ });
+
+ }
+
+ if ( qualifier.nodeType ) {
+ return jQuery.grep( elements, function( elem ) {
+ return ( elem === qualifier ) !== not;
+ });
+
+ }
+
+ if ( typeof qualifier === "string" ) {
+ if ( risSimple.test( qualifier ) ) {
+ return jQuery.filter( qualifier, elements, not );
+ }
+
+ qualifier = jQuery.filter( qualifier, elements );
+ }
+
+ return jQuery.grep( elements, function( elem ) {
+ return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not;
+ });
+}
+
+jQuery.filter = function( expr, elems, not ) {
+ var elem = elems[ 0 ];
+
+ if ( not ) {
+ expr = ":not(" + expr + ")";
+ }
+
+ return elems.length === 1 && elem.nodeType === 1 ?
+ jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
+ jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
+ return elem.nodeType === 1;
+ }));
+};
+
+jQuery.fn.extend({
+ find: function( selector ) {
+ var i,
+ ret = [],
+ self = this,
+ len = self.length;
+
+ if ( typeof selector !== "string" ) {
+ return this.pushStack( jQuery( selector ).filter(function() {
+ for ( i = 0; i < len; i++ ) {
+ if ( jQuery.contains( self[ i ], this ) ) {
+ return true;
+ }
+ }
+ }) );
+ }
+
+ for ( i = 0; i < len; i++ ) {
+ jQuery.find( selector, self[ i ], ret );
+ }
+
+ // Needed because $( selector, context ) becomes $( context ).find( selector )
+ ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
+ ret.selector = this.selector ? this.selector + " " + selector : selector;
+ return ret;
+ },
+ filter: function( selector ) {
+ return this.pushStack( winnow(this, selector || [], false) );
+ },
+ not: function( selector ) {
+ return this.pushStack( winnow(this, selector || [], true) );
+ },
+ is: function( selector ) {
+ return !!winnow(
+ this,
+
+ // If this is a positional/relative selector, check membership in the returned set
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
+ typeof selector === "string" && rneedsContext.test( selector ) ?
+ jQuery( selector ) :
+ selector || [],
+ false
+ ).length;
+ }
+});
+
+
+// Initialize a jQuery object
+
+
+// A central reference to the root jQuery(document)
+var rootjQuery,
+
+ // Use the correct document accordingly with window argument (sandbox)
+ document = window.document,
+
+ // A simple way to check for HTML strings
+ // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+ // Strict HTML recognition (#11290: must start with <)
+ rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
+
+ init = jQuery.fn.init = function( selector, context ) {
+ var match, elem;
+
+ // HANDLE: $(""), $(null), $(undefined), $(false)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+ // Assume that strings that start and end with <> are HTML and skip the regex check
+ match = [ null, selector, null ];
+
+ } else {
+ match = rquickExpr.exec( selector );
+ }
+
+ // Match html or make sure no context is specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] ) {
+ context = context instanceof jQuery ? context[0] : context;
+
+ // scripts is true for back-compat
+ // Intentionally let the error be thrown if parseHTML is not present
+ jQuery.merge( this, jQuery.parseHTML(
+ match[1],
+ context && context.nodeType ? context.ownerDocument || context : document,
+ true
+ ) );
+
+ // HANDLE: $(html, props)
+ if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
+ for ( match in context ) {
+ // Properties of context are called as methods if possible
+ if ( jQuery.isFunction( this[ match ] ) ) {
+ this[ match ]( context[ match ] );
+
+ // ...and otherwise set as attributes
+ } else {
+ this.attr( match, context[ match ] );
+ }
+ }
+ }
+
+ return this;
+
+ // HANDLE: $(#id)
+ } else {
+ elem = document.getElementById( match[2] );
+
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE and Opera return items
+ // by name instead of ID
+ if ( elem.id !== match[2] ) {
+ return rootjQuery.find( selector );
+ }
+
+ // Otherwise, we inject the element directly into the jQuery object
+ this.length = 1;
+ this[0] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return ( context || rootjQuery ).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return this.constructor( context ).find( selector );
+ }
+
+ // HANDLE: $(DOMElement)
+ } else if ( selector.nodeType ) {
+ this.context = this[0] = selector;
+ this.length = 1;
+ return this;
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return typeof rootjQuery.ready !== "undefined" ?
+ rootjQuery.ready( selector ) :
+ // Execute immediately if ready is not present
+ selector( jQuery );
+ }
+
+ if ( selector.selector !== undefined ) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.makeArray( selector, this );
+ };
+
+// Give the init function the jQuery prototype for later instantiation
+init.prototype = jQuery.fn;
+
+// Initialize central reference
+rootjQuery = jQuery( document );
+
+
+var rparentsprev = /^(?:parents|prev(?:Until|All))/,
+ // methods guaranteed to produce a unique set when starting from a unique set
+ guaranteedUnique = {
+ children: true,
+ contents: true,
+ next: true,
+ prev: true
+ };
+
+jQuery.extend({
+ dir: function( elem, dir, until ) {
+ var matched = [],
+ cur = elem[ dir ];
+
+ while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+ if ( cur.nodeType === 1 ) {
+ matched.push( cur );
+ }
+ cur = cur[dir];
+ }
+ return matched;
+ },
+
+ sibling: function( n, elem ) {
+ var r = [];
+
+ for ( ; n; n = n.nextSibling ) {
+ if ( n.nodeType === 1 && n !== elem ) {
+ r.push( n );
+ }
+ }
+
+ return r;
+ }
+});
+
+jQuery.fn.extend({
+ has: function( target ) {
+ var i,
+ targets = jQuery( target, this ),
+ len = targets.length;
+
+ return this.filter(function() {
+ for ( i = 0; i < len; i++ ) {
+ if ( jQuery.contains( this, targets[i] ) ) {
+ return true;
+ }
+ }
+ });
+ },
+
+ closest: function( selectors, context ) {
+ var cur,
+ i = 0,
+ l = this.length,
+ matched = [],
+ pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
+ jQuery( selectors, context || this.context ) :
+ 0;
+
+ for ( ; i < l; i++ ) {
+ for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
+ // Always skip document fragments
+ if ( cur.nodeType < 11 && (pos ?
+ pos.index(cur) > -1 :
+
+ // Don't pass non-elements to Sizzle
+ cur.nodeType === 1 &&
+ jQuery.find.matchesSelector(cur, selectors)) ) {
+
+ matched.push( cur );
+ break;
+ }
+ }
+ }
+
+ return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched );
+ },
+
+ // Determine the position of an element within
+ // the matched set of elements
+ index: function( elem ) {
+
+ // No argument, return index in parent
+ if ( !elem ) {
+ return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
+ }
+
+ // index in selector
+ if ( typeof elem === "string" ) {
+ return jQuery.inArray( this[0], jQuery( elem ) );
+ }
+
+ // Locate the position of the desired element
+ return jQuery.inArray(
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[0] : elem, this );
+ },
+
+ add: function( selector, context ) {
+ return this.pushStack(
+ jQuery.unique(
+ jQuery.merge( this.get(), jQuery( selector, context ) )
+ )
+ );
+ },
+
+ addBack: function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter(selector)
+ );
+ }
+});
+
+function sibling( cur, dir ) {
+ do {
+ cur = cur[ dir ];
+ } while ( cur && cur.nodeType !== 1 );
+
+ return cur;
+}
+
+jQuery.each({
+ parent: function( elem ) {
+ var parent = elem.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
+ },
+ parents: function( elem ) {
+ return jQuery.dir( elem, "parentNode" );
+ },
+ parentsUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "parentNode", until );
+ },
+ next: function( elem ) {
+ return sibling( elem, "nextSibling" );
+ },
+ prev: function( elem ) {
+ return sibling( elem, "previousSibling" );
+ },
+ nextAll: function( elem ) {
+ return jQuery.dir( elem, "nextSibling" );
+ },
+ prevAll: function( elem ) {
+ return jQuery.dir( elem, "previousSibling" );
+ },
+ nextUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "nextSibling", until );
+ },
+ prevUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "previousSibling", until );
+ },
+ siblings: function( elem ) {
+ return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
+ },
+ children: function( elem ) {
+ return jQuery.sibling( elem.firstChild );
+ },
+ contents: function( elem ) {
+ return jQuery.nodeName( elem, "iframe" ) ?
+ elem.contentDocument || elem.contentWindow.document :
+ jQuery.merge( [], elem.childNodes );
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function( until, selector ) {
+ var ret = jQuery.map( this, fn, until );
+
+ if ( name.slice( -5 ) !== "Until" ) {
+ selector = until;
+ }
+
+ if ( selector && typeof selector === "string" ) {
+ ret = jQuery.filter( selector, ret );
+ }
+
+ if ( this.length > 1 ) {
+ // Remove duplicates
+ if ( !guaranteedUnique[ name ] ) {
+ ret = jQuery.unique( ret );
+ }
+
+ // Reverse order for parents* and prev-derivatives
+ if ( rparentsprev.test( name ) ) {
+ ret = ret.reverse();
+ }
+ }
+
+ return this.pushStack( ret );
+ };
+});
+var rnotwhite = (/\S+/g);
+
+
+
+// String to Object options format cache
+var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+function createOptions( options ) {
+ var object = optionsCache[ options ] = {};
+ jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
+ object[ flag ] = true;
+ });
+ return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ * options: an optional list of space-separated options that will change how
+ * the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ * once: will ensure the callback list can only be fired once (like a Deferred)
+ *
+ * memory: will keep track of previous values and will call any callback added
+ * after the list has been fired right away with the latest "memorized"
+ * values (like a Deferred)
+ *
+ * unique: will ensure a callback can only be added once (no duplicate in the list)
+ *
+ * stopOnFalse: interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+ // Convert options from String-formatted to Object-formatted if needed
+ // (we check in cache first)
+ options = typeof options === "string" ?
+ ( optionsCache[ options ] || createOptions( options ) ) :
+ jQuery.extend( {}, options );
+
+ var // Flag to know if list is currently firing
+ firing,
+ // Last fire value (for non-forgettable lists)
+ memory,
+ // Flag to know if list was already fired
+ fired,
+ // End of the loop when firing
+ firingLength,
+ // Index of currently firing callback (modified by remove if needed)
+ firingIndex,
+ // First callback to fire (used internally by add and fireWith)
+ firingStart,
+ // Actual callback list
+ list = [],
+ // Stack of fire calls for repeatable lists
+ stack = !options.once && [],
+ // Fire callbacks
+ fire = function( data ) {
+ memory = options.memory && data;
+ fired = true;
+ firingIndex = firingStart || 0;
+ firingStart = 0;
+ firingLength = list.length;
+ firing = true;
+ for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+ if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
+ memory = false; // To prevent further calls using add
+ break;
+ }
+ }
+ firing = false;
+ if ( list ) {
+ if ( stack ) {
+ if ( stack.length ) {
+ fire( stack.shift() );
+ }
+ } else if ( memory ) {
+ list = [];
+ } else {
+ self.disable();
+ }
+ }
+ },
+ // Actual Callbacks object
+ self = {
+ // Add a callback or a collection of callbacks to the list
+ add: function() {
+ if ( list ) {
+ // First, we save the current length
+ var start = list.length;
+ (function add( args ) {
+ jQuery.each( args, function( _, arg ) {
+ var type = jQuery.type( arg );
+ if ( type === "function" ) {
+ if ( !options.unique || !self.has( arg ) ) {
+ list.push( arg );
+ }
+ } else if ( arg && arg.length && type !== "string" ) {
+ // Inspect recursively
+ add( arg );
+ }
+ });
+ })( arguments );
+ // Do we need to add the callbacks to the
+ // current firing batch?
+ if ( firing ) {
+ firingLength = list.length;
+ // With memory, if we're not firing then
+ // we should call right away
+ } else if ( memory ) {
+ firingStart = start;
+ fire( memory );
+ }
+ }
+ return this;
+ },
+ // Remove a callback from the list
+ remove: function() {
+ if ( list ) {
+ jQuery.each( arguments, function( _, arg ) {
+ var index;
+ while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+ list.splice( index, 1 );
+ // Handle firing indexes
+ if ( firing ) {
+ if ( index <= firingLength ) {
+ firingLength--;
+ }
+ if ( index <= firingIndex ) {
+ firingIndex--;
+ }
+ }
+ }
+ });
+ }
+ return this;
+ },
+ // Check if a given callback is in the list.
+ // If no argument is given, return whether or not list has callbacks attached.
+ has: function( fn ) {
+ return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
+ },
+ // Remove all callbacks from the list
+ empty: function() {
+ list = [];
+ firingLength = 0;
+ return this;
+ },
+ // Have the list do nothing anymore
+ disable: function() {
+ list = stack = memory = undefined;
+ return this;
+ },
+ // Is it disabled?
+ disabled: function() {
+ return !list;
+ },
+ // Lock the list in its current state
+ lock: function() {
+ stack = undefined;
+ if ( !memory ) {
+ self.disable();
+ }
+ return this;
+ },
+ // Is it locked?
+ locked: function() {
+ return !stack;
+ },
+ // Call all callbacks with the given context and arguments
+ fireWith: function( context, args ) {
+ if ( list && ( !fired || stack ) ) {
+ args = args || [];
+ args = [ context, args.slice ? args.slice() : args ];
+ if ( firing ) {
+ stack.push( args );
+ } else {
+ fire( args );
+ }
+ }
+ return this;
+ },
+ // Call all the callbacks with the given arguments
+ fire: function() {
+ self.fireWith( this, arguments );
+ return this;
+ },
+ // To know if the callbacks have already been called at least once
+ fired: function() {
+ return !!fired;
+ }
+ };
+
+ return self;
+};
+
+
+jQuery.extend({
+
+ Deferred: function( func ) {
+ var tuples = [
+ // action, add listener, listener list, final state
+ [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
+ [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
+ [ "notify", "progress", jQuery.Callbacks("memory") ]
+ ],
+ state = "pending",
+ promise = {
+ state: function() {
+ return state;
+ },
+ always: function() {
+ deferred.done( arguments ).fail( arguments );
+ return this;
+ },
+ then: function( /* fnDone, fnFail, fnProgress */ ) {
+ var fns = arguments;
+ return jQuery.Deferred(function( newDefer ) {
+ jQuery.each( tuples, function( i, tuple ) {
+ var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
+ // deferred[ done | fail | progress ] for forwarding actions to newDefer
+ deferred[ tuple[1] ](function() {
+ var returned = fn && fn.apply( this, arguments );
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
+ returned.promise()
+ .done( newDefer.resolve )
+ .fail( newDefer.reject )
+ .progress( newDefer.notify );
+ } else {
+ newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
+ }
+ });
+ });
+ fns = null;
+ }).promise();
+ },
+ // Get a promise for this deferred
+ // If obj is provided, the promise aspect is added to the object
+ promise: function( obj ) {
+ return obj != null ? jQuery.extend( obj, promise ) : promise;
+ }
+ },
+ deferred = {};
+
+ // Keep pipe for back-compat
+ promise.pipe = promise.then;
+
+ // Add list-specific methods
+ jQuery.each( tuples, function( i, tuple ) {
+ var list = tuple[ 2 ],
+ stateString = tuple[ 3 ];
+
+ // promise[ done | fail | progress ] = list.add
+ promise[ tuple[1] ] = list.add;
+
+ // Handle state
+ if ( stateString ) {
+ list.add(function() {
+ // state = [ resolved | rejected ]
+ state = stateString;
+
+ // [ reject_list | resolve_list ].disable; progress_list.lock
+ }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
+ }
+
+ // deferred[ resolve | reject | notify ]
+ deferred[ tuple[0] ] = function() {
+ deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
+ return this;
+ };
+ deferred[ tuple[0] + "With" ] = list.fireWith;
+ });
+
+ // Make the deferred a promise
+ promise.promise( deferred );
+
+ // Call given func if any
+ if ( func ) {
+ func.call( deferred, deferred );
+ }
+
+ // All done!
+ return deferred;
+ },
+
+ // Deferred helper
+ when: function( subordinate /* , ..., subordinateN */ ) {
+ var i = 0,
+ resolveValues = slice.call( arguments ),
+ length = resolveValues.length,
+
+ // the count of uncompleted subordinates
+ remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
+
+ // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+ deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+ // Update function for both resolve and progress values
+ updateFunc = function( i, contexts, values ) {
+ return function( value ) {
+ contexts[ i ] = this;
+ values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
+ if ( values === progressValues ) {
+ deferred.notifyWith( contexts, values );
+
+ } else if ( !(--remaining) ) {
+ deferred.resolveWith( contexts, values );
+ }
+ };
+ },
+
+ progressValues, progressContexts, resolveContexts;
+
+ // add listeners to Deferred subordinates; treat others as resolved
+ if ( length > 1 ) {
+ progressValues = new Array( length );
+ progressContexts = new Array( length );
+ resolveContexts = new Array( length );
+ for ( ; i < length; i++ ) {
+ if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
+ resolveValues[ i ].promise()
+ .done( updateFunc( i, resolveContexts, resolveValues ) )
+ .fail( deferred.reject )
+ .progress( updateFunc( i, progressContexts, progressValues ) );
+ } else {
+ --remaining;
+ }
+ }
+ }
+
+ // if we're not waiting on anything, resolve the master
+ if ( !remaining ) {
+ deferred.resolveWith( resolveContexts, resolveValues );
+ }
+
+ return deferred.promise();
+ }
+});
+
+
+// The deferred used on DOM ready
+var readyList;
+
+jQuery.fn.ready = function( fn ) {
+ // Add the callback
+ jQuery.ready.promise().done( fn );
+
+ return this;
+};
+
+jQuery.extend({
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
+
+ // Hold (or release) the ready event
+ holdReady: function( hold ) {
+ if ( hold ) {
+ jQuery.readyWait++;
+ } else {
+ jQuery.ready( true );
+ }
+ },
+
+ // Handle when the DOM is ready
+ ready: function( wait ) {
+
+ // Abort if there are pending holds or we're already ready
+ if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+ return;
+ }
+
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( !document.body ) {
+ return setTimeout( jQuery.ready );
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
+ // If there are functions bound, to execute
+ readyList.resolveWith( document, [ jQuery ] );
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.triggerHandler ) {
+ jQuery( document ).triggerHandler( "ready" );
+ jQuery( document ).off( "ready" );
+ }
+ }
+});
+
+/**
+ * Clean-up method for dom ready events
+ */
+function detach() {
+ if ( document.addEventListener ) {
+ document.removeEventListener( "DOMContentLoaded", completed, false );
+ window.removeEventListener( "load", completed, false );
+
+ } else {
+ document.detachEvent( "onreadystatechange", completed );
+ window.detachEvent( "onload", completed );
+ }
+}
+
+/**
+ * The ready event handler and self cleanup method
+ */
+function completed() {
+ // readyState === "complete" is good enough for us to call the dom ready in oldIE
+ if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {
+ detach();
+ jQuery.ready();
+ }
+}
+
+jQuery.ready.promise = function( obj ) {
+ if ( !readyList ) {
+
+ readyList = jQuery.Deferred();
+
+ // Catch cases where $(document).ready() is called after the browser event has already occurred.
+ // we once tried to use readyState "interactive" here, but it caused issues like the one
+ // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+ if ( document.readyState === "complete" ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ setTimeout( jQuery.ready );
+
+ // Standards-based browsers support DOMContentLoaded
+ } else if ( document.addEventListener ) {
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", completed, false );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", completed, false );
+
+ // If IE event model is used
+ } else {
+ // Ensure firing before onload, maybe late but safe also for iframes
+ document.attachEvent( "onreadystatechange", completed );
+
+ // A fallback to window.onload, that will always work
+ window.attachEvent( "onload", completed );
+
+ // If IE and not a frame
+ // continually check to see if the document is ready
+ var top = false;
+
+ try {
+ top = window.frameElement == null && document.documentElement;
+ } catch(e) {}
+
+ if ( top && top.doScroll ) {
+ (function doScrollCheck() {
+ if ( !jQuery.isReady ) {
+
+ try {
+ // Use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ top.doScroll("left");
+ } catch(e) {
+ return setTimeout( doScrollCheck, 50 );
+ }
+
+ // detach all dom ready events
+ detach();
+
+ // and execute any waiting functions
+ jQuery.ready();
+ }
+ })();
+ }
+ }
+ }
+ return readyList.promise( obj );
+};
+
+
+var strundefined = typeof undefined;
+
+
+
+// Support: IE<9
+// Iteration over object's inherited properties before its own
+var i;
+for ( i in jQuery( support ) ) {
+ break;
+}
+support.ownLast = i !== "0";
+
+// Note: most support tests are defined in their respective modules.
+// false until the test is run
+support.inlineBlockNeedsLayout = false;
+
+// Execute ASAP in case we need to set body.style.zoom
+jQuery(function() {
+ // Minified: var a,b,c,d
+ var val, div, body, container;
+
+ body = document.getElementsByTagName( "body" )[ 0 ];
+ if ( !body || !body.style ) {
+ // Return for frameset docs that don't have a body
+ return;
+ }
+
+ // Setup
+ div = document.createElement( "div" );
+ container = document.createElement( "div" );
+ container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
+ body.appendChild( container ).appendChild( div );
+
+ if ( typeof div.style.zoom !== strundefined ) {
+ // Support: IE<8
+ // Check if natively block-level elements act like inline-block
+ // elements when setting their display to 'inline' and giving
+ // them layout
+ div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1";
+
+ support.inlineBlockNeedsLayout = val = div.offsetWidth === 3;
+ if ( val ) {
+ // Prevent IE 6 from affecting layout for positioned elements #11048
+ // Prevent IE from shrinking the body in IE 7 mode #12869
+ // Support: IE<8
+ body.style.zoom = 1;
+ }
+ }
+
+ body.removeChild( container );
+});
+
+
+
+
+(function() {
+ var div = document.createElement( "div" );
+
+ // Execute the test only if not already executed in another module.
+ if (support.deleteExpando == null) {
+ // Support: IE<9
+ support.deleteExpando = true;
+ try {
+ delete div.test;
+ } catch( e ) {
+ support.deleteExpando = false;
+ }
+ }
+
+ // Null elements to avoid leaks in IE.
+ div = null;
+})();
+
+
+/**
+ * Determines whether an object can have data
+ */
+jQuery.acceptData = function( elem ) {
+ var noData = jQuery.noData[ (elem.nodeName + " ").toLowerCase() ],
+ nodeType = +elem.nodeType || 1;
+
+ // Do not set data on non-element DOM nodes because it will not be cleared (#8335).
+ return nodeType !== 1 && nodeType !== 9 ?
+ false :
+
+ // Nodes accept data unless otherwise specified; rejection can be conditional
+ !noData || noData !== true && elem.getAttribute("classid") === noData;
+};
+
+
+var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
+ rmultiDash = /([A-Z])/g;
+
+function dataAttr( elem, key, data ) {
+ // If nothing was found internally, try to fetch any
+ // data from the HTML5 data-* attribute
+ if ( data === undefined && elem.nodeType === 1 ) {
+
+ var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+
+ data = elem.getAttribute( name );
+
+ if ( typeof data === "string" ) {
+ try {
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null :
+ // Only convert to a number if it doesn't change the string
+ +data + "" === data ? +data :
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
+ data;
+ } catch( e ) {}
+
+ // Make sure we set the data so it isn't changed later
+ jQuery.data( elem, key, data );
+
+ } else {
+ data = undefined;
+ }
+ }
+
+ return data;
+}
+
+// checks a cache object for emptiness
+function isEmptyDataObject( obj ) {
+ var name;
+ for ( name in obj ) {
+
+ // if the public data object is empty, the private is still empty
+ if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
+ continue;
+ }
+ if ( name !== "toJSON" ) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+function internalData( elem, name, data, pvt /* Internal Use Only */ ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ var ret, thisCache,
+ internalKey = jQuery.expando,
+
+ // We have to handle DOM nodes and JS objects differently because IE6-7
+ // can't GC object references properly across the DOM-JS boundary
+ isNode = elem.nodeType,
+
+ // Only DOM nodes need the global jQuery cache; JS object data is
+ // attached directly to the object so GC can occur automatically
+ cache = isNode ? jQuery.cache : elem,
+
+ // Only defining an ID for JS objects if its cache already exists allows
+ // the code to shortcut on the same path as a DOM node with no cache
+ id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
+
+ // Avoid doing any more work than we need to when trying to get data on an
+ // object that has no data at all
+ if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) {
+ return;
+ }
+
+ if ( !id ) {
+ // Only DOM nodes need a new unique ID for each element since their data
+ // ends up in the global cache
+ if ( isNode ) {
+ id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++;
+ } else {
+ id = internalKey;
+ }
+ }
+
+ if ( !cache[ id ] ) {
+ // Avoid exposing jQuery metadata on plain JS objects when the object
+ // is serialized using JSON.stringify
+ cache[ id ] = isNode ? {} : { toJSON: jQuery.noop };
+ }
+
+ // An object can be passed to jQuery.data instead of a key/value pair; this gets
+ // shallow copied over onto the existing cache
+ if ( typeof name === "object" || typeof name === "function" ) {
+ if ( pvt ) {
+ cache[ id ] = jQuery.extend( cache[ id ], name );
+ } else {
+ cache[ id ].data = jQuery.extend( cache[ id ].data, name );
+ }
+ }
+
+ thisCache = cache[ id ];
+
+ // jQuery data() is stored in a separate object inside the object's internal data
+ // cache in order to avoid key collisions between internal data and user-defined
+ // data.
+ if ( !pvt ) {
+ if ( !thisCache.data ) {
+ thisCache.data = {};
+ }
+
+ thisCache = thisCache.data;
+ }
+
+ if ( data !== undefined ) {
+ thisCache[ jQuery.camelCase( name ) ] = data;
+ }
+
+ // Check for both converted-to-camel and non-converted data property names
+ // If a data property was specified
+ if ( typeof name === "string" ) {
+
+ // First Try to find as-is property data
+ ret = thisCache[ name ];
+
+ // Test for null|undefined property data
+ if ( ret == null ) {
+
+ // Try to find the camelCased property
+ ret = thisCache[ jQuery.camelCase( name ) ];
+ }
+ } else {
+ ret = thisCache;
+ }
+
+ return ret;
+}
+
+function internalRemoveData( elem, name, pvt ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ var thisCache, i,
+ isNode = elem.nodeType,
+
+ // See jQuery.data for more information
+ cache = isNode ? jQuery.cache : elem,
+ id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
+
+ // If there is already no cache entry for this object, there is no
+ // purpose in continuing
+ if ( !cache[ id ] ) {
+ return;
+ }
+
+ if ( name ) {
+
+ thisCache = pvt ? cache[ id ] : cache[ id ].data;
+
+ if ( thisCache ) {
+
+ // Support array or space separated string names for data keys
+ if ( !jQuery.isArray( name ) ) {
+
+ // try the string as a key before any manipulation
+ if ( name in thisCache ) {
+ name = [ name ];
+ } else {
+
+ // split the camel cased version by spaces unless a key with the spaces exists
+ name = jQuery.camelCase( name );
+ if ( name in thisCache ) {
+ name = [ name ];
+ } else {
+ name = name.split(" ");
+ }
+ }
+ } else {
+ // If "name" is an array of keys...
+ // When data is initially created, via ("key", "val") signature,
+ // keys will be converted to camelCase.
+ // Since there is no way to tell _how_ a key was added, remove
+ // both plain key and camelCase key. #12786
+ // This will only penalize the array argument path.
+ name = name.concat( jQuery.map( name, jQuery.camelCase ) );
+ }
+
+ i = name.length;
+ while ( i-- ) {
+ delete thisCache[ name[i] ];
+ }
+
+ // If there is no data left in the cache, we want to continue
+ // and let the cache object itself get destroyed
+ if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) {
+ return;
+ }
+ }
+ }
+
+ // See jQuery.data for more information
+ if ( !pvt ) {
+ delete cache[ id ].data;
+
+ // Don't destroy the parent cache unless the internal data object
+ // had been the only thing left in it
+ if ( !isEmptyDataObject( cache[ id ] ) ) {
+ return;
+ }
+ }
+
+ // Destroy the cache
+ if ( isNode ) {
+ jQuery.cleanData( [ elem ], true );
+
+ // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
+ /* jshint eqeqeq: false */
+ } else if ( support.deleteExpando || cache != cache.window ) {
+ /* jshint eqeqeq: true */
+ delete cache[ id ];
+
+ // When all else fails, null
+ } else {
+ cache[ id ] = null;
+ }
+}
+
+jQuery.extend({
+ cache: {},
+
+ // The following elements (space-suffixed to avoid Object.prototype collisions)
+ // throw uncatchable exceptions if you attempt to set expando properties
+ noData: {
+ "applet ": true,
+ "embed ": true,
+ // ...but Flash objects (which have this classid) *can* handle expandos
+ "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
+ },
+
+ hasData: function( elem ) {
+ elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
+ return !!elem && !isEmptyDataObject( elem );
+ },
+
+ data: function( elem, name, data ) {
+ return internalData( elem, name, data );
+ },
+
+ removeData: function( elem, name ) {
+ return internalRemoveData( elem, name );
+ },
+
+ // For internal use only.
+ _data: function( elem, name, data ) {
+ return internalData( elem, name, data, true );
+ },
+
+ _removeData: function( elem, name ) {
+ return internalRemoveData( elem, name, true );
+ }
+});
+
+jQuery.fn.extend({
+ data: function( key, value ) {
+ var i, name, data,
+ elem = this[0],
+ attrs = elem && elem.attributes;
+
+ // Special expections of .data basically thwart jQuery.access,
+ // so implement the relevant behavior ourselves
+
+ // Gets all values
+ if ( key === undefined ) {
+ if ( this.length ) {
+ data = jQuery.data( elem );
+
+ if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
+ i = attrs.length;
+ while ( i-- ) {
+
+ // Support: IE11+
+ // The attrs elements can be null (#14894)
+ if ( attrs[ i ] ) {
+ name = attrs[ i ].name;
+ if ( name.indexOf( "data-" ) === 0 ) {
+ name = jQuery.camelCase( name.slice(5) );
+ dataAttr( elem, name, data[ name ] );
+ }
+ }
+ }
+ jQuery._data( elem, "parsedAttrs", true );
+ }
+ }
+
+ return data;
+ }
+
+ // Sets multiple values
+ if ( typeof key === "object" ) {
+ return this.each(function() {
+ jQuery.data( this, key );
+ });
+ }
+
+ return arguments.length > 1 ?
+
+ // Sets one value
+ this.each(function() {
+ jQuery.data( this, key, value );
+ }) :
+
+ // Gets one value
+ // Try to fetch any internally stored data first
+ elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined;
+ },
+
+ removeData: function( key ) {
+ return this.each(function() {
+ jQuery.removeData( this, key );
+ });
+ }
+});
+
+
+jQuery.extend({
+ queue: function( elem, type, data ) {
+ var queue;
+
+ if ( elem ) {
+ type = ( type || "fx" ) + "queue";
+ queue = jQuery._data( elem, type );
+
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( data ) {
+ if ( !queue || jQuery.isArray(data) ) {
+ queue = jQuery._data( elem, type, jQuery.makeArray(data) );
+ } else {
+ queue.push( data );
+ }
+ }
+ return queue || [];
+ }
+ },
+
+ dequeue: function( elem, type ) {
+ type = type || "fx";
+
+ var queue = jQuery.queue( elem, type ),
+ startLength = queue.length,
+ fn = queue.shift(),
+ hooks = jQuery._queueHooks( elem, type ),
+ next = function() {
+ jQuery.dequeue( elem, type );
+ };
+
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
+ startLength--;
+ }
+
+ if ( fn ) {
+
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift( "inprogress" );
+ }
+
+ // clear up the last queue stop function
+ delete hooks.stop;
+ fn.call( elem, next, hooks );
+ }
+
+ if ( !startLength && hooks ) {
+ hooks.empty.fire();
+ }
+ },
+
+ // not intended for public consumption - generates a queueHooks object, or returns the current one
+ _queueHooks: function( elem, type ) {
+ var key = type + "queueHooks";
+ return jQuery._data( elem, key ) || jQuery._data( elem, key, {
+ empty: jQuery.Callbacks("once memory").add(function() {
+ jQuery._removeData( elem, type + "queue" );
+ jQuery._removeData( elem, key );
+ })
+ });
+ }
+});
+
+jQuery.fn.extend({
+ queue: function( type, data ) {
+ var setter = 2;
+
+ if ( typeof type !== "string" ) {
+ data = type;
+ type = "fx";
+ setter--;
+ }
+
+ if ( arguments.length < setter ) {
+ return jQuery.queue( this[0], type );
+ }
+
+ return data === undefined ?
+ this :
+ this.each(function() {
+ var queue = jQuery.queue( this, type, data );
+
+ // ensure a hooks for this queue
+ jQuery._queueHooks( this, type );
+
+ if ( type === "fx" && queue[0] !== "inprogress" ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ dequeue: function( type ) {
+ return this.each(function() {
+ jQuery.dequeue( this, type );
+ });
+ },
+ clearQueue: function( type ) {
+ return this.queue( type || "fx", [] );
+ },
+ // Get a promise resolved when queues of a certain type
+ // are emptied (fx is the type by default)
+ promise: function( type, obj ) {
+ var tmp,
+ count = 1,
+ defer = jQuery.Deferred(),
+ elements = this,
+ i = this.length,
+ resolve = function() {
+ if ( !( --count ) ) {
+ defer.resolveWith( elements, [ elements ] );
+ }
+ };
+
+ if ( typeof type !== "string" ) {
+ obj = type;
+ type = undefined;
+ }
+ type = type || "fx";
+
+ while ( i-- ) {
+ tmp = jQuery._data( elements[ i ], type + "queueHooks" );
+ if ( tmp && tmp.empty ) {
+ count++;
+ tmp.empty.add( resolve );
+ }
+ }
+ resolve();
+ return defer.promise( obj );
+ }
+});
+var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;
+
+var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
+
+var isHidden = function( elem, el ) {
+ // isHidden might be called from jQuery#filter function;
+ // in that case, element will be second argument
+ elem = el || elem;
+ return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
+ };
+
+
+
+// Multifunctional method to get and set values of a collection
+// The value/s can optionally be executed if it's a function
+var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
+ var i = 0,
+ length = elems.length,
+ bulk = key == null;
+
+ // Sets many values
+ if ( jQuery.type( key ) === "object" ) {
+ chainable = true;
+ for ( i in key ) {
+ jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
+ }
+
+ // Sets one value
+ } else if ( value !== undefined ) {
+ chainable = true;
+
+ if ( !jQuery.isFunction( value ) ) {
+ raw = true;
+ }
+
+ if ( bulk ) {
+ // Bulk operations run against the entire set
+ if ( raw ) {
+ fn.call( elems, value );
+ fn = null;
+
+ // ...except when executing function values
+ } else {
+ bulk = fn;
+ fn = function( elem, key, value ) {
+ return bulk.call( jQuery( elem ), value );
+ };
+ }
+ }
+
+ if ( fn ) {
+ for ( ; i < length; i++ ) {
+ fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
+ }
+ }
+ }
+
+ return chainable ?
+ elems :
+
+ // Gets
+ bulk ?
+ fn.call( elems ) :
+ length ? fn( elems[0], key ) : emptyGet;
+};
+var rcheckableType = (/^(?:checkbox|radio)$/i);
+
+
+
+(function() {
+ // Minified: var a,b,c
+ var input = document.createElement( "input" ),
+ div = document.createElement( "div" ),
+ fragment = document.createDocumentFragment();
+
+ // Setup
+ div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
+
+ // IE strips leading whitespace when .innerHTML is used
+ support.leadingWhitespace = div.firstChild.nodeType === 3;
+
+ // Make sure that tbody elements aren't automatically inserted
+ // IE will insert them into empty tables
+ support.tbody = !div.getElementsByTagName( "tbody" ).length;
+
+ // Make sure that link elements get serialized correctly by innerHTML
+ // This requires a wrapper element in IE
+ support.htmlSerialize = !!div.getElementsByTagName( "link" ).length;
+
+ // Makes sure cloning an html5 element does not cause problems
+ // Where outerHTML is undefined, this still works
+ support.html5Clone =
+ document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav></:nav>";
+
+ // Check if a disconnected checkbox will retain its checked
+ // value of true after appended to the DOM (IE6/7)
+ input.type = "checkbox";
+ input.checked = true;
+ fragment.appendChild( input );
+ support.appendChecked = input.checked;
+
+ // Make sure textarea (and checkbox) defaultValue is properly cloned
+ // Support: IE6-IE11+
+ div.innerHTML = "<textarea>x</textarea>";
+ support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
+
+ // #11217 - WebKit loses check when the name is after the checked attribute
+ fragment.appendChild( div );
+ div.innerHTML = "<input type='radio' checked='checked' name='t'/>";
+
+ // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3
+ // old WebKit doesn't clone checked state correctly in fragments
+ support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+ // Support: IE<9
+ // Opera does not clone events (and typeof div.attachEvent === undefined).
+ // IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
+ support.noCloneEvent = true;
+ if ( div.attachEvent ) {
+ div.attachEvent( "onclick", function() {
+ support.noCloneEvent = false;
+ });
+
+ div.cloneNode( true ).click();
+ }
+
+ // Execute the test only if not already executed in another module.
+ if (support.deleteExpando == null) {
+ // Support: IE<9
+ support.deleteExpando = true;
+ try {
+ delete div.test;
+ } catch( e ) {
+ support.deleteExpando = false;
+ }
+ }
+})();
+
+
+(function() {
+ var i, eventName,
+ div = document.createElement( "div" );
+
+ // Support: IE<9 (lack submit/change bubble), Firefox 23+ (lack focusin event)
+ for ( i in { submit: true, change: true, focusin: true }) {
+ eventName = "on" + i;
+
+ if ( !(support[ i + "Bubbles" ] = eventName in window) ) {
+ // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
+ div.setAttribute( eventName, "t" );
+ support[ i + "Bubbles" ] = div.attributes[ eventName ].expando === false;
+ }
+ }
+
+ // Null elements to avoid leaks in IE.
+ div = null;
+})();
+
+
+var rformElems = /^(?:input|select|textarea)$/i,
+ rkeyEvent = /^key/,
+ rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/,
+ rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+ rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
+
+function returnTrue() {
+ return true;
+}
+
+function returnFalse() {
+ return false;
+}
+
+function safeActiveElement() {
+ try {
+ return document.activeElement;
+ } catch ( err ) { }
+}
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+ global: {},
+
+ add: function( elem, types, handler, data, selector ) {
+ var tmp, events, t, handleObjIn,
+ special, eventHandle, handleObj,
+ handlers, type, namespaces, origType,
+ elemData = jQuery._data( elem );
+
+ // Don't attach events to noData or text/comment nodes (but allow plain objects)
+ if ( !elemData ) {
+ return;
+ }
+
+ // Caller can pass in an object of custom data in lieu of the handler
+ if ( handler.handler ) {
+ handleObjIn = handler;
+ handler = handleObjIn.handler;
+ selector = handleObjIn.selector;
+ }
+
+ // Make sure that the handler has a unique ID, used to find/remove it later
+ if ( !handler.guid ) {
+ handler.guid = jQuery.guid++;
+ }
+
+ // Init the element's event structure and main handler, if this is the first
+ if ( !(events = elemData.events) ) {
+ events = elemData.events = {};
+ }
+ if ( !(eventHandle = elemData.handle) ) {
+ eventHandle = elemData.handle = function( e ) {
+ // Discard the second event of a jQuery.event.trigger() and
+ // when an event is called after a page has unloaded
+ return typeof jQuery !== strundefined && (!e || jQuery.event.triggered !== e.type) ?
+ jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
+ undefined;
+ };
+ // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
+ eventHandle.elem = elem;
+ }
+
+ // Handle multiple events separated by a space
+ types = ( types || "" ).match( rnotwhite ) || [ "" ];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tmp[1];
+ namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+ // There *must* be a type, no attaching namespace-only handlers
+ if ( !type ) {
+ continue;
+ }
+
+ // If event changes its type, use the special event handlers for the changed type
+ special = jQuery.event.special[ type ] || {};
+
+ // If selector defined, determine special event api type, otherwise given type
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+
+ // Update special based on newly reset type
+ special = jQuery.event.special[ type ] || {};
+
+ // handleObj is passed to all event handlers
+ handleObj = jQuery.extend({
+ type: type,
+ origType: origType,
+ data: data,
+ handler: handler,
+ guid: handler.guid,
+ selector: selector,
+ needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
+ namespace: namespaces.join(".")
+ }, handleObjIn );
+
+ // Init the event handler queue if we're the first
+ if ( !(handlers = events[ type ]) ) {
+ handlers = events[ type ] = [];
+ handlers.delegateCount = 0;
+
+ // Only use addEventListener/attachEvent if the special events handler returns false
+ if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+ // Bind the global event handler to the element
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, eventHandle, false );
+
+ } else if ( elem.attachEvent ) {
+ elem.attachEvent( "on" + type, eventHandle );
+ }
+ }
+ }
+
+ if ( special.add ) {
+ special.add.call( elem, handleObj );
+
+ if ( !handleObj.handler.guid ) {
+ handleObj.handler.guid = handler.guid;
+ }
+ }
+
+ // Add to the element's handler list, delegates in front
+ if ( selector ) {
+ handlers.splice( handlers.delegateCount++, 0, handleObj );
+ } else {
+ handlers.push( handleObj );
+ }
+
+ // Keep track of which events have ever been used, for event optimization
+ jQuery.event.global[ type ] = true;
+ }
+
+ // Nullify elem to prevent memory leaks in IE
+ elem = null;
+ },
+
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler, selector, mappedTypes ) {
+ var j, handleObj, tmp,
+ origCount, t, events,
+ special, handlers, type,
+ namespaces, origType,
+ elemData = jQuery.hasData( elem ) && jQuery._data( elem );
+
+ if ( !elemData || !(events = elemData.events) ) {
+ return;
+ }
+
+ // Once for each type.namespace in types; type may be omitted
+ types = ( types || "" ).match( rnotwhite ) || [ "" ];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tmp[1];
+ namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+ // Unbind all events (on this namespace, if provided) for the element
+ if ( !type ) {
+ for ( type in events ) {
+ jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+ }
+ continue;
+ }
+
+ special = jQuery.event.special[ type ] || {};
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+ handlers = events[ type ] || [];
+ tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
+
+ // Remove matching events
+ origCount = j = handlers.length;
+ while ( j-- ) {
+ handleObj = handlers[ j ];
+
+ if ( ( mappedTypes || origType === handleObj.origType ) &&
+ ( !handler || handler.guid === handleObj.guid ) &&
+ ( !tmp || tmp.test( handleObj.namespace ) ) &&
+ ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+ handlers.splice( j, 1 );
+
+ if ( handleObj.selector ) {
+ handlers.delegateCount--;
+ }
+ if ( special.remove ) {
+ special.remove.call( elem, handleObj );
+ }
+ }
+ }
+
+ // Remove generic event handler if we removed something and no more handlers exist
+ // (avoids potential for endless recursion during removal of special event handlers)
+ if ( origCount && !handlers.length ) {
+ if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+ jQuery.removeEvent( elem, type, elemData.handle );
+ }
+
+ delete events[ type ];
+ }
+ }
+
+ // Remove the expando if it's no longer used
+ if ( jQuery.isEmptyObject( events ) ) {
+ delete elemData.handle;
+
+ // removeData also checks for emptiness and clears the expando if empty
+ // so use it instead of delete
+ jQuery._removeData( elem, "events" );
+ }
+ },
+
+ trigger: function( event, data, elem, onlyHandlers ) {
+ var handle, ontype, cur,
+ bubbleType, special, tmp, i,
+ eventPath = [ elem || document ],
+ type = hasOwn.call( event, "type" ) ? event.type : event,
+ namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
+
+ cur = tmp = elem = elem || document;
+
+ // Don't do events on text and comment nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return;
+ }
+
+ // focus/blur morphs to focusin/out; ensure we're not firing them right now
+ if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+ return;
+ }
+
+ if ( type.indexOf(".") >= 0 ) {
+ // Namespaced trigger; create a regexp to match event type in handle()
+ namespaces = type.split(".");
+ type = namespaces.shift();
+ namespaces.sort();
+ }
+ ontype = type.indexOf(":") < 0 && "on" + type;
+
+ // Caller can pass in a jQuery.Event object, Object, or just an event type string
+ event = event[ jQuery.expando ] ?
+ event :
+ new jQuery.Event( type, typeof event === "object" && event );
+
+ // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
+ event.isTrigger = onlyHandlers ? 2 : 3;
+ event.namespace = namespaces.join(".");
+ event.namespace_re = event.namespace ?
+ new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
+ null;
+
+ // Clean up the event in case it is being reused
+ event.result = undefined;
+ if ( !event.target ) {
+ event.target = elem;
+ }
+
+ // Clone any incoming data and prepend the event, creating the handler arg list
+ data = data == null ?
+ [ event ] :
+ jQuery.makeArray( data, [ event ] );
+
+ // Allow special events to draw outside the lines
+ special = jQuery.event.special[ type ] || {};
+ if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
+ return;
+ }
+
+ // Determine event propagation path in advance, per W3C events spec (#9951)
+ // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+ if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+ bubbleType = special.delegateType || type;
+ if ( !rfocusMorph.test( bubbleType + type ) ) {
+ cur = cur.parentNode;
+ }
+ for ( ; cur; cur = cur.parentNode ) {
+ eventPath.push( cur );
+ tmp = cur;
+ }
+
+ // Only add window if we got to document (e.g., not plain obj or detached DOM)
+ if ( tmp === (elem.ownerDocument || document) ) {
+ eventPath.push( tmp.defaultView || tmp.parentWindow || window );
+ }
+ }
+
+ // Fire handlers on the event path
+ i = 0;
+ while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
+
+ event.type = i > 1 ?
+ bubbleType :
+ special.bindType || type;
+
+ // jQuery handler
+ handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
+ if ( handle ) {
+ handle.apply( cur, data );
+ }
+
+ // Native handler
+ handle = ontype && cur[ ontype ];
+ if ( handle && handle.apply && jQuery.acceptData( cur ) ) {
+ event.result = handle.apply( cur, data );
+ if ( event.result === false ) {
+ event.preventDefault();
+ }
+ }
+ }
+ event.type = type;
+
+ // If nobody prevented the default action, do it now
+ if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+ if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
+ jQuery.acceptData( elem ) ) {
+
+ // Call a native DOM method on the target with the same name name as the event.
+ // Can't use an .isFunction() check here because IE6/7 fails that test.
+ // Don't do default actions on window, that's where global variables be (#6170)
+ if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
+
+ // Don't re-trigger an onFOO event when we call its FOO() method
+ tmp = elem[ ontype ];
+
+ if ( tmp ) {
+ elem[ ontype ] = null;
+ }
+
+ // Prevent re-triggering of the same event, since we already bubbled it above
+ jQuery.event.triggered = type;
+ try {
+ elem[ type ]();
+ } catch ( e ) {
+ // IE<9 dies on focus/blur to hidden element (#1486,#12518)
+ // only reproducible on winXP IE8 native, not IE9 in IE8 mode
+ }
+ jQuery.event.triggered = undefined;
+
+ if ( tmp ) {
+ elem[ ontype ] = tmp;
+ }
+ }
+ }
+ }
+
+ return event.result;
+ },
+
+ dispatch: function( event ) {
+
+ // Make a writable jQuery.Event from the native event object
+ event = jQuery.event.fix( event );
+
+ var i, ret, handleObj, matched, j,
+ handlerQueue = [],
+ args = slice.call( arguments ),
+ handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
+ special = jQuery.event.special[ event.type ] || {};
+
+ // Use the fix-ed jQuery.Event rather than the (read-only) native event
+ args[0] = event;
+ event.delegateTarget = this;
+
+ // Call the preDispatch hook for the mapped type, and let it bail if desired
+ if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+ return;
+ }
+
+ // Determine handlers
+ handlerQueue = jQuery.event.handlers.call( this, event, handlers );
+
+ // Run delegates first; they may want to stop propagation beneath us
+ i = 0;
+ while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
+ event.currentTarget = matched.elem;
+
+ j = 0;
+ while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
+
+ // Triggered event must either 1) have no namespace, or
+ // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
+ if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
+
+ event.handleObj = handleObj;
+ event.data = handleObj.data;
+
+ ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+ .apply( matched.elem, args );
+
+ if ( ret !== undefined ) {
+ if ( (event.result = ret) === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+ }
+ }
+ }
+
+ // Call the postDispatch hook for the mapped type
+ if ( special.postDispatch ) {
+ special.postDispatch.call( this, event );
+ }
+
+ return event.result;
+ },
+
+ handlers: function( event, handlers ) {
+ var sel, handleObj, matches, i,
+ handlerQueue = [],
+ delegateCount = handlers.delegateCount,
+ cur = event.target;
+
+ // Find delegate handlers
+ // Black-hole SVG <use> instance trees (#13180)
+ // Avoid non-left-click bubbling in Firefox (#3861)
+ if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
+
+ /* jshint eqeqeq: false */
+ for ( ; cur != this; cur = cur.parentNode || this ) {
+ /* jshint eqeqeq: true */
+
+ // Don't check non-elements (#13208)
+ // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
+ if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) {
+ matches = [];
+ for ( i = 0; i < delegateCount; i++ ) {
+ handleObj = handlers[ i ];
+
+ // Don't conflict with Object.prototype properties (#13203)
+ sel = handleObj.selector + " ";
+
+ if ( matches[ sel ] === undefined ) {
+ matches[ sel ] = handleObj.needsContext ?
+ jQuery( sel, this ).index( cur ) >= 0 :
+ jQuery.find( sel, this, null, [ cur ] ).length;
+ }
+ if ( matches[ sel ] ) {
+ matches.push( handleObj );
+ }
+ }
+ if ( matches.length ) {
+ handlerQueue.push({ elem: cur, handlers: matches });
+ }
+ }
+ }
+ }
+
+ // Add the remaining (directly-bound) handlers
+ if ( delegateCount < handlers.length ) {
+ handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
+ }
+
+ return handlerQueue;
+ },
+
+ fix: function( event ) {
+ if ( event[ jQuery.expando ] ) {
+ return event;
+ }
+
+ // Create a writable copy of the event object and normalize some properties
+ var i, prop, copy,
+ type = event.type,
+ originalEvent = event,
+ fixHook = this.fixHooks[ type ];
+
+ if ( !fixHook ) {
+ this.fixHooks[ type ] = fixHook =
+ rmouseEvent.test( type ) ? this.mouseHooks :
+ rkeyEvent.test( type ) ? this.keyHooks :
+ {};
+ }
+ copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+ event = new jQuery.Event( originalEvent );
+
+ i = copy.length;
+ while ( i-- ) {
+ prop = copy[ i ];
+ event[ prop ] = originalEvent[ prop ];
+ }
+
+ // Support: IE<9
+ // Fix target property (#1925)
+ if ( !event.target ) {
+ event.target = originalEvent.srcElement || document;
+ }
+
+ // Support: Chrome 23+, Safari?
+ // Target should not be a text node (#504, #13143)
+ if ( event.target.nodeType === 3 ) {
+ event.target = event.target.parentNode;
+ }
+
+ // Support: IE<9
+ // For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
+ event.metaKey = !!event.metaKey;
+
+ return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
+ },
+
+ // Includes some event props shared by KeyEvent and MouseEvent
+ props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+
+ fixHooks: {},
+
+ keyHooks: {
+ props: "char charCode key keyCode".split(" "),
+ filter: function( event, original ) {
+
+ // Add which for key events
+ if ( event.which == null ) {
+ event.which = original.charCode != null ? original.charCode : original.keyCode;
+ }
+
+ return event;
+ }
+ },
+
+ mouseHooks: {
+ props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+ filter: function( event, original ) {
+ var body, eventDoc, doc,
+ button = original.button,
+ fromElement = original.fromElement;
+
+ // Calculate pageX/Y if missing and clientX/Y available
+ if ( event.pageX == null && original.clientX != null ) {
+ eventDoc = event.target.ownerDocument || document;
+ doc = eventDoc.documentElement;
+ body = eventDoc.body;
+
+ event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+ event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
+ }
+
+ // Add relatedTarget, if necessary
+ if ( !event.relatedTarget && fromElement ) {
+ event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
+ }
+
+ // Add which for click: 1 === left; 2 === middle; 3 === right
+ // Note: button is not normalized, so don't use it
+ if ( !event.which && button !== undefined ) {
+ event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+ }
+
+ return event;
+ }
+ },
+
+ special: {
+ load: {
+ // Prevent triggered image.load events from bubbling to window.load
+ noBubble: true
+ },
+ focus: {
+ // Fire native event if possible so blur/focus sequence is correct
+ trigger: function() {
+ if ( this !== safeActiveElement() && this.focus ) {
+ try {
+ this.focus();
+ return false;
+ } catch ( e ) {
+ // Support: IE<9
+ // If we error on focus to hidden element (#1486, #12518),
+ // let .trigger() run the handlers
+ }
+ }
+ },
+ delegateType: "focusin"
+ },
+ blur: {
+ trigger: function() {
+ if ( this === safeActiveElement() && this.blur ) {
+ this.blur();
+ return false;
+ }
+ },
+ delegateType: "focusout"
+ },
+ click: {
+ // For checkbox, fire native event so checked state will be right
+ trigger: function() {
+ if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
+ this.click();
+ return false;
+ }
+ },
+
+ // For cross-browser consistency, don't fire native .click() on links
+ _default: function( event ) {
+ return jQuery.nodeName( event.target, "a" );
+ }
+ },
+
+ beforeunload: {
+ postDispatch: function( event ) {
+
+ // Support: Firefox 20+
+ // Firefox doesn't alert if the returnValue field is not set.
+ if ( event.result !== undefined && event.originalEvent ) {
+ event.originalEvent.returnValue = event.result;
+ }
+ }
+ }
+ },
+
+ simulate: function( type, elem, event, bubble ) {
+ // Piggyback on a donor event to simulate a different one.
+ // Fake originalEvent to avoid donor's stopPropagation, but if the
+ // simulated event prevents default then we do the same on the donor.
+ var e = jQuery.extend(
+ new jQuery.Event(),
+ event,
+ {
+ type: type,
+ isSimulated: true,
+ originalEvent: {}
+ }
+ );
+ if ( bubble ) {
+ jQuery.event.trigger( e, null, elem );
+ } else {
+ jQuery.event.dispatch.call( elem, e );
+ }
+ if ( e.isDefaultPrevented() ) {
+ event.preventDefault();
+ }
+ }
+};
+
+jQuery.removeEvent = document.removeEventListener ?
+ function( elem, type, handle ) {
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, handle, false );
+ }
+ } :
+ function( elem, type, handle ) {
+ var name = "on" + type;
+
+ if ( elem.detachEvent ) {
+
+ // #8545, #7054, preventing memory leaks for custom events in IE6-8
+ // detachEvent needed property on element, by name of that event, to properly expose it to GC
+ if ( typeof elem[ name ] === strundefined ) {
+ elem[ name ] = null;
+ }
+
+ elem.detachEvent( name, handle );
+ }
+ };
+
+jQuery.Event = function( src, props ) {
+ // Allow instantiation without the 'new' keyword
+ if ( !(this instanceof jQuery.Event) ) {
+ return new jQuery.Event( src, props );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+
+ // Events bubbling up the document may have been marked as prevented
+ // by a handler lower down the tree; reflect the correct value.
+ this.isDefaultPrevented = src.defaultPrevented ||
+ src.defaultPrevented === undefined &&
+ // Support: IE < 9, Android < 4.0
+ src.returnValue === false ?
+ returnTrue :
+ returnFalse;
+
+ // Event type
+ } else {
+ this.type = src;
+ }
+
+ // Put explicitly provided properties onto the event object
+ if ( props ) {
+ jQuery.extend( this, props );
+ }
+
+ // Create a timestamp if incoming event doesn't have one
+ this.timeStamp = src && src.timeStamp || jQuery.now();
+
+ // Mark it as fixed
+ this[ jQuery.expando ] = true;
+};
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse,
+
+ preventDefault: function() {
+ var e = this.originalEvent;
+
+ this.isDefaultPrevented = returnTrue;
+ if ( !e ) {
+ return;
+ }
+
+ // If preventDefault exists, run it on the original event
+ if ( e.preventDefault ) {
+ e.preventDefault();
+
+ // Support: IE
+ // Otherwise set the returnValue property of the original event to false
+ } else {
+ e.returnValue = false;
+ }
+ },
+ stopPropagation: function() {
+ var e = this.originalEvent;
+
+ this.isPropagationStopped = returnTrue;
+ if ( !e ) {
+ return;
+ }
+ // If stopPropagation exists, run it on the original event
+ if ( e.stopPropagation ) {
+ e.stopPropagation();
+ }
+
+ // Support: IE
+ // Set the cancelBubble property of the original event to true
+ e.cancelBubble = true;
+ },
+ stopImmediatePropagation: function() {
+ var e = this.originalEvent;
+
+ this.isImmediatePropagationStopped = returnTrue;
+
+ if ( e && e.stopImmediatePropagation ) {
+ e.stopImmediatePropagation();
+ }
+
+ this.stopPropagation();
+ }
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+jQuery.each({
+ mouseenter: "mouseover",
+ mouseleave: "mouseout",
+ pointerenter: "pointerover",
+ pointerleave: "pointerout"
+}, function( orig, fix ) {
+ jQuery.event.special[ orig ] = {
+ delegateType: fix,
+ bindType: fix,
+
+ handle: function( event ) {
+ var ret,
+ target = this,
+ related = event.relatedTarget,
+ handleObj = event.handleObj;
+
+ // For mousenter/leave call the handler if related is outside the target.
+ // NB: No relatedTarget if the mouse left/entered the browser window
+ if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
+ event.type = handleObj.origType;
+ ret = handleObj.handler.apply( this, arguments );
+ event.type = fix;
+ }
+ return ret;
+ }
+ };
+});
+
+// IE submit delegation
+if ( !support.submitBubbles ) {
+
+ jQuery.event.special.submit = {
+ setup: function() {
+ // Only need this for delegated form submit events
+ if ( jQuery.nodeName( this, "form" ) ) {
+ return false;
+ }
+
+ // Lazy-add a submit handler when a descendant form may potentially be submitted
+ jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
+ // Node name check avoids a VML-related crash in IE (#9807)
+ var elem = e.target,
+ form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
+ if ( form && !jQuery._data( form, "submitBubbles" ) ) {
+ jQuery.event.add( form, "submit._submit", function( event ) {
+ event._submit_bubble = true;
+ });
+ jQuery._data( form, "submitBubbles", true );
+ }
+ });
+ // return undefined since we don't need an event listener
+ },
+
+ postDispatch: function( event ) {
+ // If form was submitted by the user, bubble the event up the tree
+ if ( event._submit_bubble ) {
+ delete event._submit_bubble;
+ if ( this.parentNode && !event.isTrigger ) {
+ jQuery.event.simulate( "submit", this.parentNode, event, true );
+ }
+ }
+ },
+
+ teardown: function() {
+ // Only need this for delegated form submit events
+ if ( jQuery.nodeName( this, "form" ) ) {
+ return false;
+ }
+
+ // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
+ jQuery.event.remove( this, "._submit" );
+ }
+ };
+}
+
+// IE change delegation and checkbox/radio fix
+if ( !support.changeBubbles ) {
+
+ jQuery.event.special.change = {
+
+ setup: function() {
+
+ if ( rformElems.test( this.nodeName ) ) {
+ // IE doesn't fire change on a check/radio until blur; trigger it on click
+ // after a propertychange. Eat the blur-change in special.change.handle.
+ // This still fires onchange a second time for check/radio after blur.
+ if ( this.type === "checkbox" || this.type === "radio" ) {
+ jQuery.event.add( this, "propertychange._change", function( event ) {
+ if ( event.originalEvent.propertyName === "checked" ) {
+ this._just_changed = true;
+ }
+ });
+ jQuery.event.add( this, "click._change", function( event ) {
+ if ( this._just_changed && !event.isTrigger ) {
+ this._just_changed = false;
+ }
+ // Allow triggered, simulated change events (#11500)
+ jQuery.event.simulate( "change", this, event, true );
+ });
+ }
+ return false;
+ }
+ // Delegated event; lazy-add a change handler on descendant inputs
+ jQuery.event.add( this, "beforeactivate._change", function( e ) {
+ var elem = e.target;
+
+ if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) {
+ jQuery.event.add( elem, "change._change", function( event ) {
+ if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
+ jQuery.event.simulate( "change", this.parentNode, event, true );
+ }
+ });
+ jQuery._data( elem, "changeBubbles", true );
+ }
+ });
+ },
+
+ handle: function( event ) {
+ var elem = event.target;
+
+ // Swallow native change events from checkbox/radio, we already triggered them above
+ if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
+ return event.handleObj.handler.apply( this, arguments );
+ }
+ },
+
+ teardown: function() {
+ jQuery.event.remove( this, "._change" );
+
+ return !rformElems.test( this.nodeName );
+ }
+ };
+}
+
+// Create "bubbling" focus and blur events
+if ( !support.focusinBubbles ) {
+ jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+ // Attach a single capturing handler on the document while someone wants focusin/focusout
+ var handler = function( event ) {
+ jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+ };
+
+ jQuery.event.special[ fix ] = {
+ setup: function() {
+ var doc = this.ownerDocument || this,
+ attaches = jQuery._data( doc, fix );
+
+ if ( !attaches ) {
+ doc.addEventListener( orig, handler, true );
+ }
+ jQuery._data( doc, fix, ( attaches || 0 ) + 1 );
+ },
+ teardown: function() {
+ var doc = this.ownerDocument || this,
+ attaches = jQuery._data( doc, fix ) - 1;
+
+ if ( !attaches ) {
+ doc.removeEventListener( orig, handler, true );
+ jQuery._removeData( doc, fix );
+ } else {
+ jQuery._data( doc, fix, attaches );
+ }
+ }
+ };
+ });
+}
+
+jQuery.fn.extend({
+
+ on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+ var type, origFn;
+
+ // Types can be a map of types/handlers
+ if ( typeof types === "object" ) {
+ // ( types-Object, selector, data )
+ if ( typeof selector !== "string" ) {
+ // ( types-Object, data )
+ data = data || selector;
+ selector = undefined;
+ }
+ for ( type in types ) {
+ this.on( type, selector, data, types[ type ], one );
+ }
+ return this;
+ }
+
+ if ( data == null && fn == null ) {
+ // ( types, fn )
+ fn = selector;
+ data = selector = undefined;
+ } else if ( fn == null ) {
+ if ( typeof selector === "string" ) {
+ // ( types, selector, fn )
+ fn = data;
+ data = undefined;
+ } else {
+ // ( types, data, fn )
+ fn = data;
+ data = selector;
+ selector = undefined;
+ }
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ } else if ( !fn ) {
+ return this;
+ }
+
+ if ( one === 1 ) {
+ origFn = fn;
+ fn = function( event ) {
+ // Can use an empty set, since event contains the info
+ jQuery().off( event );
+ return origFn.apply( this, arguments );
+ };
+ // Use same guid so caller can remove using origFn
+ fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+ }
+ return this.each( function() {
+ jQuery.event.add( this, types, fn, data, selector );
+ });
+ },
+ one: function( types, selector, data, fn ) {
+ return this.on( types, selector, data, fn, 1 );
+ },
+ off: function( types, selector, fn ) {
+ var handleObj, type;
+ if ( types && types.preventDefault && types.handleObj ) {
+ // ( event ) dispatched jQuery.Event
+ handleObj = types.handleObj;
+ jQuery( types.delegateTarget ).off(
+ handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
+ handleObj.selector,
+ handleObj.handler
+ );
+ return this;
+ }
+ if ( typeof types === "object" ) {
+ // ( types-object [, selector] )
+ for ( type in types ) {
+ this.off( type, selector, types[ type ] );
+ }
+ return this;
+ }
+ if ( selector === false || typeof selector === "function" ) {
+ // ( types [, fn] )
+ fn = selector;
+ selector = undefined;
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ }
+ return this.each(function() {
+ jQuery.event.remove( this, types, fn, selector );
+ });
+ },
+
+ trigger: function( type, data ) {
+ return this.each(function() {
+ jQuery.event.trigger( type, data, this );
+ });
+ },
+ triggerHandler: function( type, data ) {
+ var elem = this[0];
+ if ( elem ) {
+ return jQuery.event.trigger( type, data, elem, true );
+ }
+ }
+});
+
+
+function createSafeFragment( document ) {
+ var list = nodeNames.split( "|" ),
+ safeFrag = document.createDocumentFragment();
+
+ if ( safeFrag.createElement ) {
+ while ( list.length ) {
+ safeFrag.createElement(
+ list.pop()
+ );
+ }
+ }
+ return safeFrag;
+}
+
+var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
+ "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
+ rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
+ rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
+ rleadingWhitespace = /^\s+/,
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
+ rtagName = /<([\w:]+)/,
+ rtbody = /<tbody/i,
+ rhtml = /<|&#?\w+;/,
+ rnoInnerhtml = /<(?:script|style|link)/i,
+ // checked="checked" or checked
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+ rscriptType = /^$|\/(?:java|ecma)script/i,
+ rscriptTypeMasked = /^true\/(.*)/,
+ rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
+
+ // We have to close these tags to support XHTML (#13200)
+ wrapMap = {
+ option: [ 1, "<select multiple='multiple'>", "</select>" ],
+ legend: [ 1, "<fieldset>", "</fieldset>" ],
+ area: [ 1, "<map>", "</map>" ],
+ param: [ 1, "<object>", "</object>" ],
+ thead: [ 1, "<table>", "</table>" ],
+ tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+ col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
+ td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+
+ // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
+ // unless wrapped in a div with non-breaking characters in front of it.
+ _default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
+ },
+ safeFragment = createSafeFragment( document ),
+ fragmentDiv = safeFragment.appendChild( document.createElement("div") );
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+function getAll( context, tag ) {
+ var elems, elem,
+ i = 0,
+ found = typeof context.getElementsByTagName !== strundefined ? context.getElementsByTagName( tag || "*" ) :
+ typeof context.querySelectorAll !== strundefined ? context.querySelectorAll( tag || "*" ) :
+ undefined;
+
+ if ( !found ) {
+ for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
+ if ( !tag || jQuery.nodeName( elem, tag ) ) {
+ found.push( elem );
+ } else {
+ jQuery.merge( found, getAll( elem, tag ) );
+ }
+ }
+ }
+
+ return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
+ jQuery.merge( [ context ], found ) :
+ found;
+}
+
+// Used in buildFragment, fixes the defaultChecked property
+function fixDefaultChecked( elem ) {
+ if ( rcheckableType.test( elem.type ) ) {
+ elem.defaultChecked = elem.checked;
+ }
+}
+
+// Support: IE<8
+// Manipulating tables requires a tbody
+function manipulationTarget( elem, content ) {
+ return jQuery.nodeName( elem, "table" ) &&
+ jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?
+
+ elem.getElementsByTagName("tbody")[0] ||
+ elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
+ elem;
+}
+
+// Replace/restore the type attribute of script elements for safe DOM manipulation
+function disableScript( elem ) {
+ elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type;
+ return elem;
+}
+function restoreScript( elem ) {
+ var match = rscriptTypeMasked.exec( elem.type );
+ if ( match ) {
+ elem.type = match[1];
+ } else {
+ elem.removeAttribute("type");
+ }
+ return elem;
+}
+
+// Mark scripts as having already been evaluated
+function setGlobalEval( elems, refElements ) {
+ var elem,
+ i = 0;
+ for ( ; (elem = elems[i]) != null; i++ ) {
+ jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );
+ }
+}
+
+function cloneCopyEvent( src, dest ) {
+
+ if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
+ return;
+ }
+
+ var type, i, l,
+ oldData = jQuery._data( src ),
+ curData = jQuery._data( dest, oldData ),
+ events = oldData.events;
+
+ if ( events ) {
+ delete curData.handle;
+ curData.events = {};
+
+ for ( type in events ) {
+ for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+ jQuery.event.add( dest, type, events[ type ][ i ] );
+ }
+ }
+ }
+
+ // make the cloned public data object a copy from the original
+ if ( curData.data ) {
+ curData.data = jQuery.extend( {}, curData.data );
+ }
+}
+
+function fixCloneNodeIssues( src, dest ) {
+ var nodeName, e, data;
+
+ // We do not need to do anything for non-Elements
+ if ( dest.nodeType !== 1 ) {
+ return;
+ }
+
+ nodeName = dest.nodeName.toLowerCase();
+
+ // IE6-8 copies events bound via attachEvent when using cloneNode.
+ if ( !support.noCloneEvent && dest[ jQuery.expando ] ) {
+ data = jQuery._data( dest );
+
+ for ( e in data.events ) {
+ jQuery.removeEvent( dest, e, data.handle );
+ }
+
+ // Event data gets referenced instead of copied if the expando gets copied too
+ dest.removeAttribute( jQuery.expando );
+ }
+
+ // IE blanks contents when cloning scripts, and tries to evaluate newly-set text
+ if ( nodeName === "script" && dest.text !== src.text ) {
+ disableScript( dest ).text = src.text;
+ restoreScript( dest );
+
+ // IE6-10 improperly clones children of object elements using classid.
+ // IE10 throws NoModificationAllowedError if parent is null, #12132.
+ } else if ( nodeName === "object" ) {
+ if ( dest.parentNode ) {
+ dest.outerHTML = src.outerHTML;
+ }
+
+ // This path appears unavoidable for IE9. When cloning an object
+ // element in IE9, the outerHTML strategy above is not sufficient.
+ // If the src has innerHTML and the destination does not,
+ // copy the src.innerHTML into the dest.innerHTML. #10324
+ if ( support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {
+ dest.innerHTML = src.innerHTML;
+ }
+
+ } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
+ // IE6-8 fails to persist the checked state of a cloned checkbox
+ // or radio button. Worse, IE6-7 fail to give the cloned element
+ // a checked appearance if the defaultChecked value isn't also set
+
+ dest.defaultChecked = dest.checked = src.checked;
+
+ // IE6-7 get confused and end up setting the value of a cloned
+ // checkbox/radio button to an empty string instead of "on"
+ if ( dest.value !== src.value ) {
+ dest.value = src.value;
+ }
+
+ // IE6-8 fails to return the selected option to the default selected
+ // state when cloning options
+ } else if ( nodeName === "option" ) {
+ dest.defaultSelected = dest.selected = src.defaultSelected;
+
+ // IE6-8 fails to set the defaultValue to the correct value when
+ // cloning other types of input fields
+ } else if ( nodeName === "input" || nodeName === "textarea" ) {
+ dest.defaultValue = src.defaultValue;
+ }
+}
+
+jQuery.extend({
+ clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+ var destElements, node, clone, i, srcElements,
+ inPage = jQuery.contains( elem.ownerDocument, elem );
+
+ if ( support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
+ clone = elem.cloneNode( true );
+
+ // IE<=8 does not properly clone detached, unknown element nodes
+ } else {
+ fragmentDiv.innerHTML = elem.outerHTML;
+ fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
+ }
+
+ if ( (!support.noCloneEvent || !support.noCloneChecked) &&
+ (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
+
+ // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
+ destElements = getAll( clone );
+ srcElements = getAll( elem );
+
+ // Fix all IE cloning issues
+ for ( i = 0; (node = srcElements[i]) != null; ++i ) {
+ // Ensure that the destination node is not null; Fixes #9587
+ if ( destElements[i] ) {
+ fixCloneNodeIssues( node, destElements[i] );
+ }
+ }
+ }
+
+ // Copy the events from the original to the clone
+ if ( dataAndEvents ) {
+ if ( deepDataAndEvents ) {
+ srcElements = srcElements || getAll( elem );
+ destElements = destElements || getAll( clone );
+
+ for ( i = 0; (node = srcElements[i]) != null; i++ ) {
+ cloneCopyEvent( node, destElements[i] );
+ }
+ } else {
+ cloneCopyEvent( elem, clone );
+ }
+ }
+
+ // Preserve script evaluation history
+ destElements = getAll( clone, "script" );
+ if ( destElements.length > 0 ) {
+ setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
+ }
+
+ destElements = srcElements = node = null;
+
+ // Return the cloned set
+ return clone;
+ },
+
+ buildFragment: function( elems, context, scripts, selection ) {
+ var j, elem, contains,
+ tmp, tag, tbody, wrap,
+ l = elems.length,
+
+ // Ensure a safe fragment
+ safe = createSafeFragment( context ),
+
+ nodes = [],
+ i = 0;
+
+ for ( ; i < l; i++ ) {
+ elem = elems[ i ];
+
+ if ( elem || elem === 0 ) {
+
+ // Add nodes directly
+ if ( jQuery.type( elem ) === "object" ) {
+ jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
+
+ // Convert non-html into a text node
+ } else if ( !rhtml.test( elem ) ) {
+ nodes.push( context.createTextNode( elem ) );
+
+ // Convert html into DOM nodes
+ } else {
+ tmp = tmp || safe.appendChild( context.createElement("div") );
+
+ // Deserialize a standard representation
+ tag = (rtagName.exec( elem ) || [ "", "" ])[ 1 ].toLowerCase();
+ wrap = wrapMap[ tag ] || wrapMap._default;
+
+ tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];
+
+ // Descend through wrappers to the right content
+ j = wrap[0];
+ while ( j-- ) {
+ tmp = tmp.lastChild;
+ }
+
+ // Manually add leading whitespace removed by IE
+ if ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
+ nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
+ }
+
+ // Remove IE's autoinserted <tbody> from table fragments
+ if ( !support.tbody ) {
+
+ // String was a <table>, *may* have spurious <tbody>
+ elem = tag === "table" && !rtbody.test( elem ) ?
+ tmp.firstChild :
+
+ // String was a bare <thead> or <tfoot>
+ wrap[1] === "<table>" && !rtbody.test( elem ) ?
+ tmp :
+ 0;
+
+ j = elem && elem.childNodes.length;
+ while ( j-- ) {
+ if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {
+ elem.removeChild( tbody );
+ }
+ }
+ }
+
+ jQuery.merge( nodes, tmp.childNodes );
+
+ // Fix #12392 for WebKit and IE > 9
+ tmp.textContent = "";
+
+ // Fix #12392 for oldIE
+ while ( tmp.firstChild ) {
+ tmp.removeChild( tmp.firstChild );
+ }
+
+ // Remember the top-level container for proper cleanup
+ tmp = safe.lastChild;
+ }
+ }
+ }
+
+ // Fix #11356: Clear elements from fragment
+ if ( tmp ) {
+ safe.removeChild( tmp );
+ }
+
+ // Reset defaultChecked for any radios and checkboxes
+ // about to be appended to the DOM in IE 6/7 (#8060)
+ if ( !support.appendChecked ) {
+ jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
+ }
+
+ i = 0;
+ while ( (elem = nodes[ i++ ]) ) {
+
+ // #4087 - If origin and destination elements are the same, and this is
+ // that element, do not do anything
+ if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
+ continue;
+ }
+
+ contains = jQuery.contains( elem.ownerDocument, elem );
+
+ // Append to fragment
+ tmp = getAll( safe.appendChild( elem ), "script" );
+
+ // Preserve script evaluation history
+ if ( contains ) {
+ setGlobalEval( tmp );
+ }
+
+ // Capture executables
+ if ( scripts ) {
+ j = 0;
+ while ( (elem = tmp[ j++ ]) ) {
+ if ( rscriptType.test( elem.type || "" ) ) {
+ scripts.push( elem );
+ }
+ }
+ }
+ }
+
+ tmp = null;
+
+ return safe;
+ },
+
+ cleanData: function( elems, /* internal */ acceptData ) {
+ var elem, type, id, data,
+ i = 0,
+ internalKey = jQuery.expando,
+ cache = jQuery.cache,
+ deleteExpando = support.deleteExpando,
+ special = jQuery.event.special;
+
+ for ( ; (elem = elems[i]) != null; i++ ) {
+ if ( acceptData || jQuery.acceptData( elem ) ) {
+
+ id = elem[ internalKey ];
+ data = id && cache[ id ];
+
+ if ( data ) {
+ if ( data.events ) {
+ for ( type in data.events ) {
+ if ( special[ type ] ) {
+ jQuery.event.remove( elem, type );
+
+ // This is a shortcut to avoid jQuery.event.remove's overhead
+ } else {
+ jQuery.removeEvent( elem, type, data.handle );
+ }
+ }
+ }
+
+ // Remove cache only if it was not already removed by jQuery.event.remove
+ if ( cache[ id ] ) {
+
+ delete cache[ id ];
+
+ // IE does not allow us to delete expando properties from nodes,
+ // nor does it have a removeAttribute function on Document nodes;
+ // we must handle all of these cases
+ if ( deleteExpando ) {
+ delete elem[ internalKey ];
+
+ } else if ( typeof elem.removeAttribute !== strundefined ) {
+ elem.removeAttribute( internalKey );
+
+ } else {
+ elem[ internalKey ] = null;
+ }
+
+ deletedIds.push( id );
+ }
+ }
+ }
+ }
+ }
+});
+
+jQuery.fn.extend({
+ text: function( value ) {
+ return access( this, function( value ) {
+ return value === undefined ?
+ jQuery.text( this ) :
+ this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
+ }, null, value, arguments.length );
+ },
+
+ append: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ var target = manipulationTarget( this, elem );
+ target.appendChild( elem );
+ }
+ });
+ },
+
+ prepend: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ var target = manipulationTarget( this, elem );
+ target.insertBefore( elem, target.firstChild );
+ }
+ });
+ },
+
+ before: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.parentNode ) {
+ this.parentNode.insertBefore( elem, this );
+ }
+ });
+ },
+
+ after: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.parentNode ) {
+ this.parentNode.insertBefore( elem, this.nextSibling );
+ }
+ });
+ },
+
+ remove: function( selector, keepData /* Internal Use Only */ ) {
+ var elem,
+ elems = selector ? jQuery.filter( selector, this ) : this,
+ i = 0;
+
+ for ( ; (elem = elems[i]) != null; i++ ) {
+
+ if ( !keepData && elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem ) );
+ }
+
+ if ( elem.parentNode ) {
+ if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
+ setGlobalEval( getAll( elem, "script" ) );
+ }
+ elem.parentNode.removeChild( elem );
+ }
+ }
+
+ return this;
+ },
+
+ empty: function() {
+ var elem,
+ i = 0;
+
+ for ( ; (elem = this[i]) != null; i++ ) {
+ // Remove element nodes and prevent memory leaks
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem, false ) );
+ }
+
+ // Remove any remaining nodes
+ while ( elem.firstChild ) {
+ elem.removeChild( elem.firstChild );
+ }
+
+ // If this is a select, ensure that it displays empty (#12336)
+ // Support: IE<9
+ if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
+ elem.options.length = 0;
+ }
+ }
+
+ return this;
+ },
+
+ clone: function( dataAndEvents, deepDataAndEvents ) {
+ dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+ deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+ return this.map(function() {
+ return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+ });
+ },
+
+ html: function( value ) {
+ return access( this, function( value ) {
+ var elem = this[ 0 ] || {},
+ i = 0,
+ l = this.length;
+
+ if ( value === undefined ) {
+ return elem.nodeType === 1 ?
+ elem.innerHTML.replace( rinlinejQuery, "" ) :
+ undefined;
+ }
+
+ // See if we can take a shortcut and just use innerHTML
+ if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+ ( support.htmlSerialize || !rnoshimcache.test( value ) ) &&
+ ( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
+ !wrapMap[ (rtagName.exec( value ) || [ "", "" ])[ 1 ].toLowerCase() ] ) {
+
+ value = value.replace( rxhtmlTag, "<$1></$2>" );
+
+ try {
+ for (; i < l; i++ ) {
+ // Remove element nodes and prevent memory leaks
+ elem = this[i] || {};
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem, false ) );
+ elem.innerHTML = value;
+ }
+ }
+
+ elem = 0;
+
+ // If using innerHTML throws an exception, use the fallback method
+ } catch(e) {}
+ }
+
+ if ( elem ) {
+ this.empty().append( value );
+ }
+ }, null, value, arguments.length );
+ },
+
+ replaceWith: function() {
+ var arg = arguments[ 0 ];
+
+ // Make the changes, replacing each context element with the new content
+ this.domManip( arguments, function( elem ) {
+ arg = this.parentNode;
+
+ jQuery.cleanData( getAll( this ) );
+
+ if ( arg ) {
+ arg.replaceChild( elem, this );
+ }
+ });
+
+ // Force removal if there was no new content (e.g., from empty arguments)
+ return arg && (arg.length || arg.nodeType) ? this : this.remove();
+ },
+
+ detach: function( selector ) {
+ return this.remove( selector, true );
+ },
+
+ domManip: function( args, callback ) {
+
+ // Flatten any nested arrays
+ args = concat.apply( [], args );
+
+ var first, node, hasScripts,
+ scripts, doc, fragment,
+ i = 0,
+ l = this.length,
+ set = this,
+ iNoClone = l - 1,
+ value = args[0],
+ isFunction = jQuery.isFunction( value );
+
+ // We can't cloneNode fragments that contain checked, in WebKit
+ if ( isFunction ||
+ ( l > 1 && typeof value === "string" &&
+ !support.checkClone && rchecked.test( value ) ) ) {
+ return this.each(function( index ) {
+ var self = set.eq( index );
+ if ( isFunction ) {
+ args[0] = value.call( this, index, self.html() );
+ }
+ self.domManip( args, callback );
+ });
+ }
+
+ if ( l ) {
+ fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );
+ first = fragment.firstChild;
+
+ if ( fragment.childNodes.length === 1 ) {
+ fragment = first;
+ }
+
+ if ( first ) {
+ scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
+ hasScripts = scripts.length;
+
+ // Use the original fragment for the last item instead of the first because it can end up
+ // being emptied incorrectly in certain situations (#8070).
+ for ( ; i < l; i++ ) {
+ node = fragment;
+
+ if ( i !== iNoClone ) {
+ node = jQuery.clone( node, true, true );
+
+ // Keep references to cloned scripts for later restoration
+ if ( hasScripts ) {
+ jQuery.merge( scripts, getAll( node, "script" ) );
+ }
+ }
+
+ callback.call( this[i], node, i );
+ }
+
+ if ( hasScripts ) {
+ doc = scripts[ scripts.length - 1 ].ownerDocument;
+
+ // Reenable scripts
+ jQuery.map( scripts, restoreScript );
+
+ // Evaluate executable scripts on first document insertion
+ for ( i = 0; i < hasScripts; i++ ) {
+ node = scripts[ i ];
+ if ( rscriptType.test( node.type || "" ) &&
+ !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
+
+ if ( node.src ) {
+ // Optional AJAX dependency, but won't run scripts if not present
+ if ( jQuery._evalUrl ) {
+ jQuery._evalUrl( node.src );
+ }
+ } else {
+ jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
+ }
+ }
+ }
+ }
+
+ // Fix #11809: Avoid leaking memory
+ fragment = first = null;
+ }
+ }
+
+ return this;
+ }
+});
+
+jQuery.each({
+ appendTo: "append",
+ prependTo: "prepend",
+ insertBefore: "before",
+ insertAfter: "after",
+ replaceAll: "replaceWith"
+}, function( name, original ) {
+ jQuery.fn[ name ] = function( selector ) {
+ var elems,
+ i = 0,
+ ret = [],
+ insert = jQuery( selector ),
+ last = insert.length - 1;
+
+ for ( ; i <= last; i++ ) {
+ elems = i === last ? this : this.clone(true);
+ jQuery( insert[i] )[ original ]( elems );
+
+ // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
+ push.apply( ret, elems.get() );
+ }
+
+ return this.pushStack( ret );
+ };
+});
+
+
+var iframe,
+ elemdisplay = {};
+
+/**
+ * Retrieve the actual display of a element
+ * @param {String} name nodeName of the element
+ * @param {Object} doc Document object
+ */
+// Called only from within defaultDisplay
+function actualDisplay( name, doc ) {
+ var style,
+ elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
+
+ // getDefaultComputedStyle might be reliably used only on attached element
+ display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
+
+ // Use of this method is a temporary fix (more like optmization) until something better comes along,
+ // since it was removed from specification and supported only in FF
+ style.display : jQuery.css( elem[ 0 ], "display" );
+
+ // We don't have any data stored on the element,
+ // so use "detach" method as fast way to get rid of the element
+ elem.detach();
+
+ return display;
+}
+
+/**
+ * Try to determine the default display value of an element
+ * @param {String} nodeName
+ */
+function defaultDisplay( nodeName ) {
+ var doc = document,
+ display = elemdisplay[ nodeName ];
+
+ if ( !display ) {
+ display = actualDisplay( nodeName, doc );
+
+ // If the simple way fails, read from inside an iframe
+ if ( display === "none" || !display ) {
+
+ // Use the already-created iframe if possible
+ iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement );
+
+ // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
+ doc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument ).document;
+
+ // Support: IE
+ doc.write();
+ doc.close();
+
+ display = actualDisplay( nodeName, doc );
+ iframe.detach();
+ }
+
+ // Store the correct default display
+ elemdisplay[ nodeName ] = display;
+ }
+
+ return display;
+}
+
+
+(function() {
+ var shrinkWrapBlocksVal;
+
+ support.shrinkWrapBlocks = function() {
+ if ( shrinkWrapBlocksVal != null ) {
+ return shrinkWrapBlocksVal;
+ }
+
+ // Will be changed later if needed.
+ shrinkWrapBlocksVal = false;
+
+ // Minified: var b,c,d
+ var div, body, container;
+
+ body = document.getElementsByTagName( "body" )[ 0 ];
+ if ( !body || !body.style ) {
+ // Test fired too early or in an unsupported environment, exit.
+ return;
+ }
+
+ // Setup
+ div = document.createElement( "div" );
+ container = document.createElement( "div" );
+ container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
+ body.appendChild( container ).appendChild( div );
+
+ // Support: IE6
+ // Check if elements with layout shrink-wrap their children
+ if ( typeof div.style.zoom !== strundefined ) {
+ // Reset CSS: box-sizing; display; margin; border
+ div.style.cssText =
+ // Support: Firefox<29, Android 2.3
+ // Vendor-prefix box-sizing
+ "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
+ "box-sizing:content-box;display:block;margin:0;border:0;" +
+ "padding:1px;width:1px;zoom:1";
+ div.appendChild( document.createElement( "div" ) ).style.width = "5px";
+ shrinkWrapBlocksVal = div.offsetWidth !== 3;
+ }
+
+ body.removeChild( container );
+
+ return shrinkWrapBlocksVal;
+ };
+
+})();
+var rmargin = (/^margin/);
+
+var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
+
+
+
+var getStyles, curCSS,
+ rposition = /^(top|right|bottom|left)$/;
+
+if ( window.getComputedStyle ) {
+ getStyles = function( elem ) {
+ // Support: IE<=11+, Firefox<=30+ (#15098, #14150)
+ // IE throws on elements created in popups
+ // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
+ if ( elem.ownerDocument.defaultView.opener ) {
+ return elem.ownerDocument.defaultView.getComputedStyle( elem, null );
+ }
+
+ return window.getComputedStyle( elem, null );
+ };
+
+ curCSS = function( elem, name, computed ) {
+ var width, minWidth, maxWidth, ret,
+ style = elem.style;
+
+ computed = computed || getStyles( elem );
+
+ // getPropertyValue is only needed for .css('filter') in IE9, see #12537
+ ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;
+
+ if ( computed ) {
+
+ if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
+ ret = jQuery.style( elem, name );
+ }
+
+ // A tribute to the "awesome hack by Dean Edwards"
+ // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
+ // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
+ // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+ if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
+
+ // Remember the original values
+ width = style.width;
+ minWidth = style.minWidth;
+ maxWidth = style.maxWidth;
+
+ // Put in the new values to get a computed value out
+ style.minWidth = style.maxWidth = style.width = ret;
+ ret = computed.width;
+
+ // Revert the changed values
+ style.width = width;
+ style.minWidth = minWidth;
+ style.maxWidth = maxWidth;
+ }
+ }
+
+ // Support: IE
+ // IE returns zIndex value as an integer.
+ return ret === undefined ?
+ ret :
+ ret + "";
+ };
+} else if ( document.documentElement.currentStyle ) {
+ getStyles = function( elem ) {
+ return elem.currentStyle;
+ };
+
+ curCSS = function( elem, name, computed ) {
+ var left, rs, rsLeft, ret,
+ style = elem.style;
+
+ computed = computed || getStyles( elem );
+ ret = computed ? computed[ name ] : undefined;
+
+ // Avoid setting ret to empty string here
+ // so we don't default to auto
+ if ( ret == null && style && style[ name ] ) {
+ ret = style[ name ];
+ }
+
+ // From the awesome hack by Dean Edwards
+ // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+ // If we're not dealing with a regular pixel number
+ // but a number that has a weird ending, we need to convert it to pixels
+ // but not position css attributes, as those are proportional to the parent element instead
+ // and we can't measure the parent instead because it might trigger a "stacking dolls" problem
+ if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
+
+ // Remember the original values
+ left = style.left;
+ rs = elem.runtimeStyle;
+ rsLeft = rs && rs.left;
+
+ // Put in the new values to get a computed value out
+ if ( rsLeft ) {
+ rs.left = elem.currentStyle.left;
+ }
+ style.left = name === "fontSize" ? "1em" : ret;
+ ret = style.pixelLeft + "px";
+
+ // Revert the changed values
+ style.left = left;
+ if ( rsLeft ) {
+ rs.left = rsLeft;
+ }
+ }
+
+ // Support: IE
+ // IE returns zIndex value as an integer.
+ return ret === undefined ?
+ ret :
+ ret + "" || "auto";
+ };
+}
+
+
+
+
+function addGetHookIf( conditionFn, hookFn ) {
+ // Define the hook, we'll check on the first run if it's really needed.
+ return {
+ get: function() {
+ var condition = conditionFn();
+
+ if ( condition == null ) {
+ // The test was not ready at this point; screw the hook this time
+ // but check again when needed next time.
+ return;
+ }
+
+ if ( condition ) {
+ // Hook not needed (or it's not possible to use it due to missing dependency),
+ // remove it.
+ // Since there are no other hooks for marginRight, remove the whole object.
+ delete this.get;
+ return;
+ }
+
+ // Hook needed; redefine it so that the support test is not executed again.
+
+ return (this.get = hookFn).apply( this, arguments );
+ }
+ };
+}
+
+
+(function() {
+ // Minified: var b,c,d,e,f,g, h,i
+ var div, style, a, pixelPositionVal, boxSizingReliableVal,
+ reliableHiddenOffsetsVal, reliableMarginRightVal;
+
+ // Setup
+ div = document.createElement( "div" );
+ div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
+ a = div.getElementsByTagName( "a" )[ 0 ];
+ style = a && a.style;
+
+ // Finish early in limited (non-browser) environments
+ if ( !style ) {
+ return;
+ }
+
+ style.cssText = "float:left;opacity:.5";
+
+ // Support: IE<9
+ // Make sure that element opacity exists (as opposed to filter)
+ support.opacity = style.opacity === "0.5";
+
+ // Verify style float existence
+ // (IE uses styleFloat instead of cssFloat)
+ support.cssFloat = !!style.cssFloat;
+
+ div.style.backgroundClip = "content-box";
+ div.cloneNode( true ).style.backgroundClip = "";
+ support.clearCloneStyle = div.style.backgroundClip === "content-box";
+
+ // Support: Firefox<29, Android 2.3
+ // Vendor-prefix box-sizing
+ support.boxSizing = style.boxSizing === "" || style.MozBoxSizing === "" ||
+ style.WebkitBoxSizing === "";
+
+ jQuery.extend(support, {
+ reliableHiddenOffsets: function() {
+ if ( reliableHiddenOffsetsVal == null ) {
+ computeStyleTests();
+ }
+ return reliableHiddenOffsetsVal;
+ },
+
+ boxSizingReliable: function() {
+ if ( boxSizingReliableVal == null ) {
+ computeStyleTests();
+ }
+ return boxSizingReliableVal;
+ },
+
+ pixelPosition: function() {
+ if ( pixelPositionVal == null ) {
+ computeStyleTests();
+ }
+ return pixelPositionVal;
+ },
+
+ // Support: Android 2.3
+ reliableMarginRight: function() {
+ if ( reliableMarginRightVal == null ) {
+ computeStyleTests();
+ }
+ return reliableMarginRightVal;
+ }
+ });
+
+ function computeStyleTests() {
+ // Minified: var b,c,d,j
+ var div, body, container, contents;
+
+ body = document.getElementsByTagName( "body" )[ 0 ];
+ if ( !body || !body.style ) {
+ // Test fired too early or in an unsupported environment, exit.
+ return;
+ }
+
+ // Setup
+ div = document.createElement( "div" );
+ container = document.createElement( "div" );
+ container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
+ body.appendChild( container ).appendChild( div );
+
+ div.style.cssText =
+ // Support: Firefox<29, Android 2.3
+ // Vendor-prefix box-sizing
+ "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" +
+ "box-sizing:border-box;display:block;margin-top:1%;top:1%;" +
+ "border:1px;padding:1px;width:4px;position:absolute";
+
+ // Support: IE<9
+ // Assume reasonable values in the absence of getComputedStyle
+ pixelPositionVal = boxSizingReliableVal = false;
+ reliableMarginRightVal = true;
+
+ // Check for getComputedStyle so that this code is not run in IE<9.
+ if ( window.getComputedStyle ) {
+ pixelPositionVal = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
+ boxSizingReliableVal =
+ ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
+
+ // Support: Android 2.3
+ // Div with explicit width and no margin-right incorrectly
+ // gets computed margin-right based on width of container (#3333)
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ contents = div.appendChild( document.createElement( "div" ) );
+
+ // Reset CSS: box-sizing; display; margin; border; padding
+ contents.style.cssText = div.style.cssText =
+ // Support: Firefox<29, Android 2.3
+ // Vendor-prefix box-sizing
+ "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
+ "box-sizing:content-box;display:block;margin:0;border:0;padding:0";
+ contents.style.marginRight = contents.style.width = "0";
+ div.style.width = "1px";
+
+ reliableMarginRightVal =
+ !parseFloat( ( window.getComputedStyle( contents, null ) || {} ).marginRight );
+
+ div.removeChild( contents );
+ }
+
+ // Support: IE8
+ // Check if table cells still have offsetWidth/Height when they are set
+ // to display:none and there are still other visible table cells in a
+ // table row; if so, offsetWidth/Height are not reliable for use when
+ // determining if an element has been hidden directly using
+ // display:none (it is still safe to use offsets if a parent element is
+ // hidden; don safety goggles and see bug #4512 for more information).
+ div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
+ contents = div.getElementsByTagName( "td" );
+ contents[ 0 ].style.cssText = "margin:0;border:0;padding:0;display:none";
+ reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;
+ if ( reliableHiddenOffsetsVal ) {
+ contents[ 0 ].style.display = "";
+ contents[ 1 ].style.display = "none";
+ reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;
+ }
+
+ body.removeChild( container );
+ }
+
+})();
+
+
+// A method for quickly swapping in/out CSS properties to get correct calculations.
+jQuery.swap = function( elem, options, callback, args ) {
+ var ret, name,
+ old = {};
+
+ // Remember the old values, and insert the new ones
+ for ( name in options ) {
+ old[ name ] = elem.style[ name ];
+ elem.style[ name ] = options[ name ];
+ }
+
+ ret = callback.apply( elem, args || [] );
+
+ // Revert the old values
+ for ( name in options ) {
+ elem.style[ name ] = old[ name ];
+ }
+
+ return ret;
+};
+
+
+var
+ ralpha = /alpha\([^)]*\)/i,
+ ropacity = /opacity\s*=\s*([^)]*)/,
+
+ // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
+ // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
+ rdisplayswap = /^(none|table(?!-c[ea]).+)/,
+ rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),
+ rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ),
+
+ cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+ cssNormalTransform = {
+ letterSpacing: "0",
+ fontWeight: "400"
+ },
+
+ cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
+
+
+// return a css property mapped to a potentially vendor prefixed property
+function vendorPropName( style, name ) {
+
+ // shortcut for names that are not vendor prefixed
+ if ( name in style ) {
+ return name;
+ }
+
+ // check for vendor prefixed names
+ var capName = name.charAt(0).toUpperCase() + name.slice(1),
+ origName = name,
+ i = cssPrefixes.length;
+
+ while ( i-- ) {
+ name = cssPrefixes[ i ] + capName;
+ if ( name in style ) {
+ return name;
+ }
+ }
+
+ return origName;
+}
+
+function showHide( elements, show ) {
+ var display, elem, hidden,
+ values = [],
+ index = 0,
+ length = elements.length;
+
+ for ( ; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+
+ values[ index ] = jQuery._data( elem, "olddisplay" );
+ display = elem.style.display;
+ if ( show ) {
+ // Reset the inline display of this element to learn if it is
+ // being hidden by cascaded rules or not
+ if ( !values[ index ] && display === "none" ) {
+ elem.style.display = "";
+ }
+
+ // Set elements which have been overridden with display: none
+ // in a stylesheet to whatever the default browser style is
+ // for such an element
+ if ( elem.style.display === "" && isHidden( elem ) ) {
+ values[ index ] = jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) );
+ }
+ } else {
+ hidden = isHidden( elem );
+
+ if ( display && display !== "none" || !hidden ) {
+ jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
+ }
+ }
+ }
+
+ // Set the display of most of the elements in a second loop
+ // to avoid the constant reflow
+ for ( index = 0; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+ if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
+ elem.style.display = show ? values[ index ] || "" : "none";
+ }
+ }
+
+ return elements;
+}
+
+function setPositiveNumber( elem, value, subtract ) {
+ var matches = rnumsplit.exec( value );
+ return matches ?
+ // Guard against undefined "subtract", e.g., when used as in cssHooks
+ Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
+ value;
+}
+
+function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
+ var i = extra === ( isBorderBox ? "border" : "content" ) ?
+ // If we already have the right measurement, avoid augmentation
+ 4 :
+ // Otherwise initialize for horizontal or vertical properties
+ name === "width" ? 1 : 0,
+
+ val = 0;
+
+ for ( ; i < 4; i += 2 ) {
+ // both box models exclude margin, so add it if we want it
+ if ( extra === "margin" ) {
+ val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
+ }
+
+ if ( isBorderBox ) {
+ // border-box includes padding, so remove it if we want content
+ if ( extra === "content" ) {
+ val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+ }
+
+ // at this point, extra isn't border nor margin, so remove border
+ if ( extra !== "margin" ) {
+ val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+ }
+ } else {
+ // at this point, extra isn't content, so add padding
+ val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+
+ // at this point, extra isn't content nor padding, so add border
+ if ( extra !== "padding" ) {
+ val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+ }
+ }
+ }
+
+ return val;
+}
+
+function getWidthOrHeight( elem, name, extra ) {
+
+ // Start with offset property, which is equivalent to the border-box value
+ var valueIsBorderBox = true,
+ val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+ styles = getStyles( elem ),
+ isBorderBox = support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
+
+ // some non-html elements return undefined for offsetWidth, so check for null/undefined
+ // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
+ // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
+ if ( val <= 0 || val == null ) {
+ // Fall back to computed then uncomputed css if necessary
+ val = curCSS( elem, name, styles );
+ if ( val < 0 || val == null ) {
+ val = elem.style[ name ];
+ }
+
+ // Computed unit is not pixels. Stop here and return.
+ if ( rnumnonpx.test(val) ) {
+ return val;
+ }
+
+ // we need the check for style in case a browser which returns unreliable values
+ // for getComputedStyle silently falls back to the reliable elem.style
+ valueIsBorderBox = isBorderBox && ( support.boxSizingReliable() || val === elem.style[ name ] );
+
+ // Normalize "", auto, and prepare for extra
+ val = parseFloat( val ) || 0;
+ }
+
+ // use the active box-sizing model to add/subtract irrelevant styles
+ return ( val +
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra || ( isBorderBox ? "border" : "content" ),
+ valueIsBorderBox,
+ styles
+ )
+ ) + "px";
+}
+
+jQuery.extend({
+ // Add in style property hooks for overriding the default
+ // behavior of getting and setting a style property
+ cssHooks: {
+ opacity: {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ // We should always get a number back from opacity
+ var ret = curCSS( elem, "opacity" );
+ return ret === "" ? "1" : ret;
+ }
+ }
+ }
+ },
+
+ // Don't automatically add "px" to these possibly-unitless properties
+ cssNumber: {
+ "columnCount": true,
+ "fillOpacity": true,
+ "flexGrow": true,
+ "flexShrink": true,
+ "fontWeight": true,
+ "lineHeight": true,
+ "opacity": true,
+ "order": true,
+ "orphans": true,
+ "widows": true,
+ "zIndex": true,
+ "zoom": true
+ },
+
+ // Add in properties whose names you wish to fix before
+ // setting or getting the value
+ cssProps: {
+ // normalize float css property
+ "float": support.cssFloat ? "cssFloat" : "styleFloat"
+ },
+
+ // Get and set the style property on a DOM Node
+ style: function( elem, name, value, extra ) {
+ // Don't set styles on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+ return;
+ }
+
+ // Make sure that we're working with the right name
+ var ret, type, hooks,
+ origName = jQuery.camelCase( name ),
+ style = elem.style;
+
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
+
+ // gets hook for the prefixed version
+ // followed by the unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // Check if we're setting a value
+ if ( value !== undefined ) {
+ type = typeof value;
+
+ // convert relative number strings (+= or -=) to relative numbers. #7345
+ if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+ value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
+ // Fixes bug #9237
+ type = "number";
+ }
+
+ // Make sure that null and NaN values aren't set. See: #7116
+ if ( value == null || value !== value ) {
+ return;
+ }
+
+ // If a number was passed in, add 'px' to the (except for certain CSS properties)
+ if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+ value += "px";
+ }
+
+ // Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
+ // but it would mean to define eight (for every problematic property) identical functions
+ if ( !support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
+ style[ name ] = "inherit";
+ }
+
+ // If a hook was provided, use that value, otherwise just set the specified value
+ if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
+
+ // Support: IE
+ // Swallow errors from 'invalid' CSS values (#5509)
+ try {
+ style[ name ] = value;
+ } catch(e) {}
+ }
+
+ } else {
+ // If a hook was provided get the non-computed value from there
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+ return ret;
+ }
+
+ // Otherwise just get the value from the style object
+ return style[ name ];
+ }
+ },
+
+ css: function( elem, name, extra, styles ) {
+ var num, val, hooks,
+ origName = jQuery.camelCase( name );
+
+ // Make sure that we're working with the right name
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
+
+ // gets hook for the prefixed version
+ // followed by the unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // If a hook was provided get the computed value from there
+ if ( hooks && "get" in hooks ) {
+ val = hooks.get( elem, true, extra );
+ }
+
+ // Otherwise, if a way to get the computed value exists, use that
+ if ( val === undefined ) {
+ val = curCSS( elem, name, styles );
+ }
+
+ //convert "normal" to computed value
+ if ( val === "normal" && name in cssNormalTransform ) {
+ val = cssNormalTransform[ name ];
+ }
+
+ // Return, converting to number if forced or a qualifier was provided and val looks numeric
+ if ( extra === "" || extra ) {
+ num = parseFloat( val );
+ return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
+ }
+ return val;
+ }
+});
+
+jQuery.each([ "height", "width" ], function( i, name ) {
+ jQuery.cssHooks[ name ] = {
+ get: function( elem, computed, extra ) {
+ if ( computed ) {
+ // certain elements can have dimension info if we invisibly show them
+ // however, it must have a current display style that would benefit from this
+ return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ?
+ jQuery.swap( elem, cssShow, function() {
+ return getWidthOrHeight( elem, name, extra );
+ }) :
+ getWidthOrHeight( elem, name, extra );
+ }
+ },
+
+ set: function( elem, value, extra ) {
+ var styles = extra && getStyles( elem );
+ return setPositiveNumber( elem, value, extra ?
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra,
+ support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
+ styles
+ ) : 0
+ );
+ }
+ };
+});
+
+if ( !support.opacity ) {
+ jQuery.cssHooks.opacity = {
+ get: function( elem, computed ) {
+ // IE uses filters for opacity
+ return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
+ ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
+ computed ? "1" : "";
+ },
+
+ set: function( elem, value ) {
+ var style = elem.style,
+ currentStyle = elem.currentStyle,
+ opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
+ filter = currentStyle && currentStyle.filter || style.filter || "";
+
+ // IE has trouble with opacity if it does not have layout
+ // Force it by setting the zoom level
+ style.zoom = 1;
+
+ // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
+ // if value === "", then remove inline opacity #12685
+ if ( ( value >= 1 || value === "" ) &&
+ jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
+ style.removeAttribute ) {
+
+ // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
+ // if "filter:" is present at all, clearType is disabled, we want to avoid this
+ // style.removeAttribute is IE Only, but so apparently is this code path...
+ style.removeAttribute( "filter" );
+
+ // if there is no filter style applied in a css rule or unset inline opacity, we are done
+ if ( value === "" || currentStyle && !currentStyle.filter ) {
+ return;
+ }
+ }
+
+ // otherwise, set new filter values
+ style.filter = ralpha.test( filter ) ?
+ filter.replace( ralpha, opacity ) :
+ filter + " " + opacity;
+ }
+ };
+}
+
+jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
+ function( elem, computed ) {
+ if ( computed ) {
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ // Work around by temporarily setting element display to inline-block
+ return jQuery.swap( elem, { "display": "inline-block" },
+ curCSS, [ elem, "marginRight" ] );
+ }
+ }
+);
+
+// These hooks are used by animate to expand properties
+jQuery.each({
+ margin: "",
+ padding: "",
+ border: "Width"
+}, function( prefix, suffix ) {
+ jQuery.cssHooks[ prefix + suffix ] = {
+ expand: function( value ) {
+ var i = 0,
+ expanded = {},
+
+ // assumes a single number if not a string
+ parts = typeof value === "string" ? value.split(" ") : [ value ];
+
+ for ( ; i < 4; i++ ) {
+ expanded[ prefix + cssExpand[ i ] + suffix ] =
+ parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+ }
+
+ return expanded;
+ }
+ };
+
+ if ( !rmargin.test( prefix ) ) {
+ jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
+ }
+});
+
+jQuery.fn.extend({
+ css: function( name, value ) {
+ return access( this, function( elem, name, value ) {
+ var styles, len,
+ map = {},
+ i = 0;
+
+ if ( jQuery.isArray( name ) ) {
+ styles = getStyles( elem );
+ len = name.length;
+
+ for ( ; i < len; i++ ) {
+ map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
+ }
+
+ return map;
+ }
+
+ return value !== undefined ?
+ jQuery.style( elem, name, value ) :
+ jQuery.css( elem, name );
+ }, name, value, arguments.length > 1 );
+ },
+ show: function() {
+ return showHide( this, true );
+ },
+ hide: function() {
+ return showHide( this );
+ },
+ toggle: function( state ) {
+ if ( typeof state === "boolean" ) {
+ return state ? this.show() : this.hide();
+ }
+
+ return this.each(function() {
+ if ( isHidden( this ) ) {
+ jQuery( this ).show();
+ } else {
+ jQuery( this ).hide();
+ }
+ });
+ }
+});
+
+
+function Tween( elem, options, prop, end, easing ) {
+ return new Tween.prototype.init( elem, options, prop, end, easing );
+}
+jQuery.Tween = Tween;
+
+Tween.prototype = {
+ constructor: Tween,
+ init: function( elem, options, prop, end, easing, unit ) {
+ this.elem = elem;
+ this.prop = prop;
+ this.easing = easing || "swing";
+ this.options = options;
+ this.start = this.now = this.cur();
+ this.end = end;
+ this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
+ },
+ cur: function() {
+ var hooks = Tween.propHooks[ this.prop ];
+
+ return hooks && hooks.get ?
+ hooks.get( this ) :
+ Tween.propHooks._default.get( this );
+ },
+ run: function( percent ) {
+ var eased,
+ hooks = Tween.propHooks[ this.prop ];
+
+ if ( this.options.duration ) {
+ this.pos = eased = jQuery.easing[ this.easing ](
+ percent, this.options.duration * percent, 0, 1, this.options.duration
+ );
+ } else {
+ this.pos = eased = percent;
+ }
+ this.now = ( this.end - this.start ) * eased + this.start;
+
+ if ( this.options.step ) {
+ this.options.step.call( this.elem, this.now, this );
+ }
+
+ if ( hooks && hooks.set ) {
+ hooks.set( this );
+ } else {
+ Tween.propHooks._default.set( this );
+ }
+ return this;
+ }
+};
+
+Tween.prototype.init.prototype = Tween.prototype;
+
+Tween.propHooks = {
+ _default: {
+ get: function( tween ) {
+ var result;
+
+ if ( tween.elem[ tween.prop ] != null &&
+ (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
+ return tween.elem[ tween.prop ];
+ }
+
+ // passing an empty string as a 3rd parameter to .css will automatically
+ // attempt a parseFloat and fallback to a string if the parse fails
+ // so, simple values such as "10px" are parsed to Float.
+ // complex values such as "rotate(1rad)" are returned as is.
+ result = jQuery.css( tween.elem, tween.prop, "" );
+ // Empty strings, null, undefined and "auto" are converted to 0.
+ return !result || result === "auto" ? 0 : result;
+ },
+ set: function( tween ) {
+ // use step hook for back compat - use cssHook if its there - use .style if its
+ // available and use plain properties where available
+ if ( jQuery.fx.step[ tween.prop ] ) {
+ jQuery.fx.step[ tween.prop ]( tween );
+ } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
+ jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
+ } else {
+ tween.elem[ tween.prop ] = tween.now;
+ }
+ }
+ }
+};
+
+// Support: IE <=9
+// Panic based approach to setting things on disconnected nodes
+
+Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
+ set: function( tween ) {
+ if ( tween.elem.nodeType && tween.elem.parentNode ) {
+ tween.elem[ tween.prop ] = tween.now;
+ }
+ }
+};
+
+jQuery.easing = {
+ linear: function( p ) {
+ return p;
+ },
+ swing: function( p ) {
+ return 0.5 - Math.cos( p * Math.PI ) / 2;
+ }
+};
+
+jQuery.fx = Tween.prototype.init;
+
+// Back Compat <1.8 extension point
+jQuery.fx.step = {};
+
+
+
+
+var
+ fxNow, timerId,
+ rfxtypes = /^(?:toggle|show|hide)$/,
+ rfxnum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ),
+ rrun = /queueHooks$/,
+ animationPrefilters = [ defaultPrefilter ],
+ tweeners = {
+ "*": [ function( prop, value ) {
+ var tween = this.createTween( prop, value ),
+ target = tween.cur(),
+ parts = rfxnum.exec( value ),
+ unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
+
+ // Starting value computation is required for potential unit mismatches
+ start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
+ rfxnum.exec( jQuery.css( tween.elem, prop ) ),
+ scale = 1,
+ maxIterations = 20;
+
+ if ( start && start[ 3 ] !== unit ) {
+ // Trust units reported by jQuery.css
+ unit = unit || start[ 3 ];
+
+ // Make sure we update the tween properties later on
+ parts = parts || [];
+
+ // Iteratively approximate from a nonzero starting point
+ start = +target || 1;
+
+ do {
+ // If previous iteration zeroed out, double until we get *something*
+ // Use a string for doubling factor so we don't accidentally see scale as unchanged below
+ scale = scale || ".5";
+
+ // Adjust and apply
+ start = start / scale;
+ jQuery.style( tween.elem, prop, start + unit );
+
+ // Update scale, tolerating zero or NaN from tween.cur()
+ // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
+ } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
+ }
+
+ // Update tween properties
+ if ( parts ) {
+ start = tween.start = +start || +target || 0;
+ tween.unit = unit;
+ // If a +=/-= token was provided, we're doing a relative animation
+ tween.end = parts[ 1 ] ?
+ start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
+ +parts[ 2 ];
+ }
+
+ return tween;
+ } ]
+ };
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+ setTimeout(function() {
+ fxNow = undefined;
+ });
+ return ( fxNow = jQuery.now() );
+}
+
+// Generate parameters to create a standard animation
+function genFx( type, includeWidth ) {
+ var which,
+ attrs = { height: type },
+ i = 0;
+
+ // if we include width, step value is 1 to do all cssExpand values,
+ // if we don't include width, step value is 2 to skip over Left and Right
+ includeWidth = includeWidth ? 1 : 0;
+ for ( ; i < 4 ; i += 2 - includeWidth ) {
+ which = cssExpand[ i ];
+ attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
+ }
+
+ if ( includeWidth ) {
+ attrs.opacity = attrs.width = type;
+ }
+
+ return attrs;
+}
+
+function createTween( value, prop, animation ) {
+ var tween,
+ collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
+ index = 0,
+ length = collection.length;
+ for ( ; index < length; index++ ) {
+ if ( (tween = collection[ index ].call( animation, prop, value )) ) {
+
+ // we're done with this property
+ return tween;
+ }
+ }
+}
+
+function defaultPrefilter( elem, props, opts ) {
+ /* jshint validthis: true */
+ var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
+ anim = this,
+ orig = {},
+ style = elem.style,
+ hidden = elem.nodeType && isHidden( elem ),
+ dataShow = jQuery._data( elem, "fxshow" );
+
+ // handle queue: false promises
+ if ( !opts.queue ) {
+ hooks = jQuery._queueHooks( elem, "fx" );
+ if ( hooks.unqueued == null ) {
+ hooks.unqueued = 0;
+ oldfire = hooks.empty.fire;
+ hooks.empty.fire = function() {
+ if ( !hooks.unqueued ) {
+ oldfire();
+ }
+ };
+ }
+ hooks.unqueued++;
+
+ anim.always(function() {
+ // doing this makes sure that the complete handler will be called
+ // before this completes
+ anim.always(function() {
+ hooks.unqueued--;
+ if ( !jQuery.queue( elem, "fx" ).length ) {
+ hooks.empty.fire();
+ }
+ });
+ });
+ }
+
+ // height/width overflow pass
+ if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
+ // Make sure that nothing sneaks out
+ // Record all 3 overflow attributes because IE does not
+ // change the overflow attribute when overflowX and
+ // overflowY are set to the same value
+ opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
+
+ // Set display property to inline-block for height/width
+ // animations on inline elements that are having width/height animated
+ display = jQuery.css( elem, "display" );
+
+ // Test default display if display is currently "none"
+ checkDisplay = display === "none" ?
+ jQuery._data( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
+
+ if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {
+
+ // inline-level elements accept inline-block;
+ // block-level elements need to be inline with layout
+ if ( !support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === "inline" ) {
+ style.display = "inline-block";
+ } else {
+ style.zoom = 1;
+ }
+ }
+ }
+
+ if ( opts.overflow ) {
+ style.overflow = "hidden";
+ if ( !support.shrinkWrapBlocks() ) {
+ anim.always(function() {
+ style.overflow = opts.overflow[ 0 ];
+ style.overflowX = opts.overflow[ 1 ];
+ style.overflowY = opts.overflow[ 2 ];
+ });
+ }
+ }
+
+ // show/hide pass
+ for ( prop in props ) {
+ value = props[ prop ];
+ if ( rfxtypes.exec( value ) ) {
+ delete props[ prop ];
+ toggle = toggle || value === "toggle";
+ if ( value === ( hidden ? "hide" : "show" ) ) {
+
+ // If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden
+ if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
+ hidden = true;
+ } else {
+ continue;
+ }
+ }
+ orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
+
+ // Any non-fx value stops us from restoring the original display value
+ } else {
+ display = undefined;
+ }
+ }
+
+ if ( !jQuery.isEmptyObject( orig ) ) {
+ if ( dataShow ) {
+ if ( "hidden" in dataShow ) {
+ hidden = dataShow.hidden;
+ }
+ } else {
+ dataShow = jQuery._data( elem, "fxshow", {} );
+ }
+
+ // store state if its toggle - enables .stop().toggle() to "reverse"
+ if ( toggle ) {
+ dataShow.hidden = !hidden;
+ }
+ if ( hidden ) {
+ jQuery( elem ).show();
+ } else {
+ anim.done(function() {
+ jQuery( elem ).hide();
+ });
+ }
+ anim.done(function() {
+ var prop;
+ jQuery._removeData( elem, "fxshow" );
+ for ( prop in orig ) {
+ jQuery.style( elem, prop, orig[ prop ] );
+ }
+ });
+ for ( prop in orig ) {
+ tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
+
+ if ( !( prop in dataShow ) ) {
+ dataShow[ prop ] = tween.start;
+ if ( hidden ) {
+ tween.end = tween.start;
+ tween.start = prop === "width" || prop === "height" ? 1 : 0;
+ }
+ }
+ }
+
+ // If this is a noop like .hide().hide(), restore an overwritten display value
+ } else if ( (display === "none" ? defaultDisplay( elem.nodeName ) : display) === "inline" ) {
+ style.display = display;
+ }
+}
+
+function propFilter( props, specialEasing ) {
+ var index, name, easing, value, hooks;
+
+ // camelCase, specialEasing and expand cssHook pass
+ for ( index in props ) {
+ name = jQuery.camelCase( index );
+ easing = specialEasing[ name ];
+ value = props[ index ];
+ if ( jQuery.isArray( value ) ) {
+ easing = value[ 1 ];
+ value = props[ index ] = value[ 0 ];
+ }
+
+ if ( index !== name ) {
+ props[ name ] = value;
+ delete props[ index ];
+ }
+
+ hooks = jQuery.cssHooks[ name ];
+ if ( hooks && "expand" in hooks ) {
+ value = hooks.expand( value );
+ delete props[ name ];
+
+ // not quite $.extend, this wont overwrite keys already present.
+ // also - reusing 'index' from above because we have the correct "name"
+ for ( index in value ) {
+ if ( !( index in props ) ) {
+ props[ index ] = value[ index ];
+ specialEasing[ index ] = easing;
+ }
+ }
+ } else {
+ specialEasing[ name ] = easing;
+ }
+ }
+}
+
+function Animation( elem, properties, options ) {
+ var result,
+ stopped,
+ index = 0,
+ length = animationPrefilters.length,
+ deferred = jQuery.Deferred().always( function() {
+ // don't match elem in the :animated selector
+ delete tick.elem;
+ }),
+ tick = function() {
+ if ( stopped ) {
+ return false;
+ }
+ var currentTime = fxNow || createFxNow(),
+ remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
+ // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
+ temp = remaining / animation.duration || 0,
+ percent = 1 - temp,
+ index = 0,
+ length = animation.tweens.length;
+
+ for ( ; index < length ; index++ ) {
+ animation.tweens[ index ].run( percent );
+ }
+
+ deferred.notifyWith( elem, [ animation, percent, remaining ]);
+
+ if ( percent < 1 && length ) {
+ return remaining;
+ } else {
+ deferred.resolveWith( elem, [ animation ] );
+ return false;
+ }
+ },
+ animation = deferred.promise({
+ elem: elem,
+ props: jQuery.extend( {}, properties ),
+ opts: jQuery.extend( true, { specialEasing: {} }, options ),
+ originalProperties: properties,
+ originalOptions: options,
+ startTime: fxNow || createFxNow(),
+ duration: options.duration,
+ tweens: [],
+ createTween: function( prop, end ) {
+ var tween = jQuery.Tween( elem, animation.opts, prop, end,
+ animation.opts.specialEasing[ prop ] || animation.opts.easing );
+ animation.tweens.push( tween );
+ return tween;
+ },
+ stop: function( gotoEnd ) {
+ var index = 0,
+ // if we are going to the end, we want to run all the tweens
+ // otherwise we skip this part
+ length = gotoEnd ? animation.tweens.length : 0;
+ if ( stopped ) {
+ return this;
+ }
+ stopped = true;
+ for ( ; index < length ; index++ ) {
+ animation.tweens[ index ].run( 1 );
+ }
+
+ // resolve when we played the last frame
+ // otherwise, reject
+ if ( gotoEnd ) {
+ deferred.resolveWith( elem, [ animation, gotoEnd ] );
+ } else {
+ deferred.rejectWith( elem, [ animation, gotoEnd ] );
+ }
+ return this;
+ }
+ }),
+ props = animation.props;
+
+ propFilter( props, animation.opts.specialEasing );
+
+ for ( ; index < length ; index++ ) {
+ result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
+ if ( result ) {
+ return result;
+ }
+ }
+
+ jQuery.map( props, createTween, animation );
+
+ if ( jQuery.isFunction( animation.opts.start ) ) {
+ animation.opts.start.call( elem, animation );
+ }
+
+ jQuery.fx.timer(
+ jQuery.extend( tick, {
+ elem: elem,
+ anim: animation,
+ queue: animation.opts.queue
+ })
+ );
+
+ // attach callbacks from options
+ return animation.progress( animation.opts.progress )
+ .done( animation.opts.done, animation.opts.complete )
+ .fail( animation.opts.fail )
+ .always( animation.opts.always );
+}
+
+jQuery.Animation = jQuery.extend( Animation, {
+ tweener: function( props, callback ) {
+ if ( jQuery.isFunction( props ) ) {
+ callback = props;
+ props = [ "*" ];
+ } else {
+ props = props.split(" ");
+ }
+
+ var prop,
+ index = 0,
+ length = props.length;
+
+ for ( ; index < length ; index++ ) {
+ prop = props[ index ];
+ tweeners[ prop ] = tweeners[ prop ] || [];
+ tweeners[ prop ].unshift( callback );
+ }
+ },
+
+ prefilter: function( callback, prepend ) {
+ if ( prepend ) {
+ animationPrefilters.unshift( callback );
+ } else {
+ animationPrefilters.push( callback );
+ }
+ }
+});
+
+jQuery.speed = function( speed, easing, fn ) {
+ var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
+ complete: fn || !fn && easing ||
+ jQuery.isFunction( speed ) && speed,
+ duration: speed,
+ easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
+ };
+
+ opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+ opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
+
+ // normalize opt.queue - true/undefined/null -> "fx"
+ if ( opt.queue == null || opt.queue === true ) {
+ opt.queue = "fx";
+ }
+
+ // Queueing
+ opt.old = opt.complete;
+
+ opt.complete = function() {
+ if ( jQuery.isFunction( opt.old ) ) {
+ opt.old.call( this );
+ }
+
+ if ( opt.queue ) {
+ jQuery.dequeue( this, opt.queue );
+ }
+ };
+
+ return opt;
+};
+
+jQuery.fn.extend({
+ fadeTo: function( speed, to, easing, callback ) {
+
+ // show any hidden elements after setting opacity to 0
+ return this.filter( isHidden ).css( "opacity", 0 ).show()
+
+ // animate to the value specified
+ .end().animate({ opacity: to }, speed, easing, callback );
+ },
+ animate: function( prop, speed, easing, callback ) {
+ var empty = jQuery.isEmptyObject( prop ),
+ optall = jQuery.speed( speed, easing, callback ),
+ doAnimation = function() {
+ // Operate on a copy of prop so per-property easing won't be lost
+ var anim = Animation( this, jQuery.extend( {}, prop ), optall );
+
+ // Empty animations, or finishing resolves immediately
+ if ( empty || jQuery._data( this, "finish" ) ) {
+ anim.stop( true );
+ }
+ };
+ doAnimation.finish = doAnimation;
+
+ return empty || optall.queue === false ?
+ this.each( doAnimation ) :
+ this.queue( optall.queue, doAnimation );
+ },
+ stop: function( type, clearQueue, gotoEnd ) {
+ var stopQueue = function( hooks ) {
+ var stop = hooks.stop;
+ delete hooks.stop;
+ stop( gotoEnd );
+ };
+
+ if ( typeof type !== "string" ) {
+ gotoEnd = clearQueue;
+ clearQueue = type;
+ type = undefined;
+ }
+ if ( clearQueue && type !== false ) {
+ this.queue( type || "fx", [] );
+ }
+
+ return this.each(function() {
+ var dequeue = true,
+ index = type != null && type + "queueHooks",
+ timers = jQuery.timers,
+ data = jQuery._data( this );
+
+ if ( index ) {
+ if ( data[ index ] && data[ index ].stop ) {
+ stopQueue( data[ index ] );
+ }
+ } else {
+ for ( index in data ) {
+ if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
+ stopQueue( data[ index ] );
+ }
+ }
+ }
+
+ for ( index = timers.length; index--; ) {
+ if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
+ timers[ index ].anim.stop( gotoEnd );
+ dequeue = false;
+ timers.splice( index, 1 );
+ }
+ }
+
+ // start the next in the queue if the last step wasn't forced
+ // timers currently will call their complete callbacks, which will dequeue
+ // but only if they were gotoEnd
+ if ( dequeue || !gotoEnd ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ finish: function( type ) {
+ if ( type !== false ) {
+ type = type || "fx";
+ }
+ return this.each(function() {
+ var index,
+ data = jQuery._data( this ),
+ queue = data[ type + "queue" ],
+ hooks = data[ type + "queueHooks" ],
+ timers = jQuery.timers,
+ length = queue ? queue.length : 0;
+
+ // enable finishing flag on private data
+ data.finish = true;
+
+ // empty the queue first
+ jQuery.queue( this, type, [] );
+
+ if ( hooks && hooks.stop ) {
+ hooks.stop.call( this, true );
+ }
+
+ // look for any active animations, and finish them
+ for ( index = timers.length; index--; ) {
+ if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
+ timers[ index ].anim.stop( true );
+ timers.splice( index, 1 );
+ }
+ }
+
+ // look for any animations in the old queue and finish them
+ for ( index = 0; index < length; index++ ) {
+ if ( queue[ index ] && queue[ index ].finish ) {
+ queue[ index ].finish.call( this );
+ }
+ }
+
+ // turn off finishing flag
+ delete data.finish;
+ });
+ }
+});
+
+jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
+ var cssFn = jQuery.fn[ name ];
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return speed == null || typeof speed === "boolean" ?
+ cssFn.apply( this, arguments ) :
+ this.animate( genFx( name, true ), speed, easing, callback );
+ };
+});
+
+// Generate shortcuts for custom animations
+jQuery.each({
+ slideDown: genFx("show"),
+ slideUp: genFx("hide"),
+ slideToggle: genFx("toggle"),
+ fadeIn: { opacity: "show" },
+ fadeOut: { opacity: "hide" },
+ fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return this.animate( props, speed, easing, callback );
+ };
+});
+
+jQuery.timers = [];
+jQuery.fx.tick = function() {
+ var timer,
+ timers = jQuery.timers,
+ i = 0;
+
+ fxNow = jQuery.now();
+
+ for ( ; i < timers.length; i++ ) {
+ timer = timers[ i ];
+ // Checks the timer has not already been removed
+ if ( !timer() && timers[ i ] === timer ) {
+ timers.splice( i--, 1 );
+ }
+ }
+
+ if ( !timers.length ) {
+ jQuery.fx.stop();
+ }
+ fxNow = undefined;
+};
+
+jQuery.fx.timer = function( timer ) {
+ jQuery.timers.push( timer );
+ if ( timer() ) {
+ jQuery.fx.start();
+ } else {
+ jQuery.timers.pop();
+ }
+};
+
+jQuery.fx.interval = 13;
+
+jQuery.fx.start = function() {
+ if ( !timerId ) {
+ timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
+ }
+};
+
+jQuery.fx.stop = function() {
+ clearInterval( timerId );
+ timerId = null;
+};
+
+jQuery.fx.speeds = {
+ slow: 600,
+ fast: 200,
+ // Default speed
+ _default: 400
+};
+
+
+// Based off of the plugin by Clint Helfers, with permission.
+// http://blindsignals.com/index.php/2009/07/jquery-delay/
+jQuery.fn.delay = function( time, type ) {
+ time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+ type = type || "fx";
+
+ return this.queue( type, function( next, hooks ) {
+ var timeout = setTimeout( next, time );
+ hooks.stop = function() {
+ clearTimeout( timeout );
+ };
+ });
+};
+
+
+(function() {
+ // Minified: var a,b,c,d,e
+ var input, div, select, a, opt;
+
+ // Setup
+ div = document.createElement( "div" );
+ div.setAttribute( "className", "t" );
+ div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
+ a = div.getElementsByTagName("a")[ 0 ];
+
+ // First batch of tests.
+ select = document.createElement("select");
+ opt = select.appendChild( document.createElement("option") );
+ input = div.getElementsByTagName("input")[ 0 ];
+
+ a.style.cssText = "top:1px";
+
+ // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+ support.getSetAttribute = div.className !== "t";
+
+ // Get the style information from getAttribute
+ // (IE uses .cssText instead)
+ support.style = /top/.test( a.getAttribute("style") );
+
+ // Make sure that URLs aren't manipulated
+ // (IE normalizes it by default)
+ support.hrefNormalized = a.getAttribute("href") === "/a";
+
+ // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
+ support.checkOn = !!input.value;
+
+ // Make sure that a selected-by-default option has a working selected property.
+ // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+ support.optSelected = opt.selected;
+
+ // Tests for enctype support on a form (#6743)
+ support.enctype = !!document.createElement("form").enctype;
+
+ // Make sure that the options inside disabled selects aren't marked as disabled
+ // (WebKit marks them as disabled)
+ select.disabled = true;
+ support.optDisabled = !opt.disabled;
+
+ // Support: IE8 only
+ // Check if we can trust getAttribute("value")
+ input = document.createElement( "input" );
+ input.setAttribute( "value", "" );
+ support.input = input.getAttribute( "value" ) === "";
+
+ // Check if an input maintains its value after becoming a radio
+ input.value = "t";
+ input.setAttribute( "type", "radio" );
+ support.radioValue = input.value === "t";
+})();
+
+
+var rreturn = /\r/g;
+
+jQuery.fn.extend({
+ val: function( value ) {
+ var hooks, ret, isFunction,
+ elem = this[0];
+
+ if ( !arguments.length ) {
+ if ( elem ) {
+ hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+ return ret;
+ }
+
+ ret = elem.value;
+
+ return typeof ret === "string" ?
+ // handle most common string cases
+ ret.replace(rreturn, "") :
+ // handle cases where value is null/undef or number
+ ret == null ? "" : ret;
+ }
+
+ return;
+ }
+
+ isFunction = jQuery.isFunction( value );
+
+ return this.each(function( i ) {
+ var val;
+
+ if ( this.nodeType !== 1 ) {
+ return;
+ }
+
+ if ( isFunction ) {
+ val = value.call( this, i, jQuery( this ).val() );
+ } else {
+ val = value;
+ }
+
+ // Treat null/undefined as ""; convert numbers to string
+ if ( val == null ) {
+ val = "";
+ } else if ( typeof val === "number" ) {
+ val += "";
+ } else if ( jQuery.isArray( val ) ) {
+ val = jQuery.map( val, function( value ) {
+ return value == null ? "" : value + "";
+ });
+ }
+
+ hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+ // If set returns undefined, fall back to normal setting
+ if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+ this.value = val;
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ valHooks: {
+ option: {
+ get: function( elem ) {
+ var val = jQuery.find.attr( elem, "value" );
+ return val != null ?
+ val :
+ // Support: IE10-11+
+ // option.text throws exceptions (#14686, #14858)
+ jQuery.trim( jQuery.text( elem ) );
+ }
+ },
+ select: {
+ get: function( elem ) {
+ var value, option,
+ options = elem.options,
+ index = elem.selectedIndex,
+ one = elem.type === "select-one" || index < 0,
+ values = one ? null : [],
+ max = one ? index + 1 : options.length,
+ i = index < 0 ?
+ max :
+ one ? index : 0;
+
+ // Loop through all the selected options
+ for ( ; i < max; i++ ) {
+ option = options[ i ];
+
+ // oldIE doesn't update selected after form reset (#2551)
+ if ( ( option.selected || i === index ) &&
+ // Don't return options that are disabled or in a disabled optgroup
+ ( support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
+ ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
+
+ // Get the specific value for the option
+ value = jQuery( option ).val();
+
+ // We don't need an array for one selects
+ if ( one ) {
+ return value;
+ }
+
+ // Multi-Selects return an array
+ values.push( value );
+ }
+ }
+
+ return values;
+ },
+
+ set: function( elem, value ) {
+ var optionSet, option,
+ options = elem.options,
+ values = jQuery.makeArray( value ),
+ i = options.length;
+
+ while ( i-- ) {
+ option = options[ i ];
+
+ if ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) >= 0 ) {
+
+ // Support: IE6
+ // When new option element is added to select box we need to
+ // force reflow of newly added node in order to workaround delay
+ // of initialization properties
+ try {
+ option.selected = optionSet = true;
+
+ } catch ( _ ) {
+
+ // Will be executed only in IE6
+ option.scrollHeight;
+ }
+
+ } else {
+ option.selected = false;
+ }
+ }
+
+ // Force browsers to behave consistently when non-matching value is set
+ if ( !optionSet ) {
+ elem.selectedIndex = -1;
+ }
+
+ return options;
+ }
+ }
+ }
+});
+
+// Radios and checkboxes getter/setter
+jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = {
+ set: function( elem, value ) {
+ if ( jQuery.isArray( value ) ) {
+ return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+ }
+ }
+ };
+ if ( !support.checkOn ) {
+ jQuery.valHooks[ this ].get = function( elem ) {
+ // Support: Webkit
+ // "" is returned instead of "on" if a value isn't specified
+ return elem.getAttribute("value") === null ? "on" : elem.value;
+ };
+ }
+});
+
+
+
+
+var nodeHook, boolHook,
+ attrHandle = jQuery.expr.attrHandle,
+ ruseDefault = /^(?:checked|selected)$/i,
+ getSetAttribute = support.getSetAttribute,
+ getSetInput = support.input;
+
+jQuery.fn.extend({
+ attr: function( name, value ) {
+ return access( this, jQuery.attr, name, value, arguments.length > 1 );
+ },
+
+ removeAttr: function( name ) {
+ return this.each(function() {
+ jQuery.removeAttr( this, name );
+ });
+ }
+});
+
+jQuery.extend({
+ attr: function( elem, name, value ) {
+ var hooks, ret,
+ nType = elem.nodeType;
+
+ // don't get/set attributes on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ // Fallback to prop when attributes are not supported
+ if ( typeof elem.getAttribute === strundefined ) {
+ return jQuery.prop( elem, name, value );
+ }
+
+ // All attributes are lowercase
+ // Grab necessary hook if one is defined
+ if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
+ name = name.toLowerCase();
+ hooks = jQuery.attrHooks[ name ] ||
+ ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
+ }
+
+ if ( value !== undefined ) {
+
+ if ( value === null ) {
+ jQuery.removeAttr( elem, name );
+
+ } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ elem.setAttribute( name, value + "" );
+ return value;
+ }
+
+ } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+ ret = jQuery.find.attr( elem, name );
+
+ // Non-existent attributes return null, we normalize to undefined
+ return ret == null ?
+ undefined :
+ ret;
+ }
+ },
+
+ removeAttr: function( elem, value ) {
+ var name, propName,
+ i = 0,
+ attrNames = value && value.match( rnotwhite );
+
+ if ( attrNames && elem.nodeType === 1 ) {
+ while ( (name = attrNames[i++]) ) {
+ propName = jQuery.propFix[ name ] || name;
+
+ // Boolean attributes get special treatment (#10870)
+ if ( jQuery.expr.match.bool.test( name ) ) {
+ // Set corresponding property to false
+ if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
+ elem[ propName ] = false;
+ // Support: IE<9
+ // Also clear defaultChecked/defaultSelected (if appropriate)
+ } else {
+ elem[ jQuery.camelCase( "default-" + name ) ] =
+ elem[ propName ] = false;
+ }
+
+ // See #9699 for explanation of this approach (setting first, then removal)
+ } else {
+ jQuery.attr( elem, name, "" );
+ }
+
+ elem.removeAttribute( getSetAttribute ? name : propName );
+ }
+ }
+ },
+
+ attrHooks: {
+ type: {
+ set: function( elem, value ) {
+ if ( !support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
+ // Setting the type on a radio button after the value resets the value in IE6-9
+ // Reset value to default in case type is set after value during creation
+ var val = elem.value;
+ elem.setAttribute( "type", value );
+ if ( val ) {
+ elem.value = val;
+ }
+ return value;
+ }
+ }
+ }
+ }
+});
+
+// Hook for boolean attributes
+boolHook = {
+ set: function( elem, value, name ) {
+ if ( value === false ) {
+ // Remove boolean attributes when set to false
+ jQuery.removeAttr( elem, name );
+ } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
+ // IE<8 needs the *property* name
+ elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
+
+ // Use defaultChecked and defaultSelected for oldIE
+ } else {
+ elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
+ }
+
+ return name;
+ }
+};
+
+// Retrieve booleans specially
+jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
+
+ var getter = attrHandle[ name ] || jQuery.find.attr;
+
+ attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ?
+ function( elem, name, isXML ) {
+ var ret, handle;
+ if ( !isXML ) {
+ // Avoid an infinite loop by temporarily removing this function from the getter
+ handle = attrHandle[ name ];
+ attrHandle[ name ] = ret;
+ ret = getter( elem, name, isXML ) != null ?
+ name.toLowerCase() :
+ null;
+ attrHandle[ name ] = handle;
+ }
+ return ret;
+ } :
+ function( elem, name, isXML ) {
+ if ( !isXML ) {
+ return elem[ jQuery.camelCase( "default-" + name ) ] ?
+ name.toLowerCase() :
+ null;
+ }
+ };
+});
+
+// fix oldIE attroperties
+if ( !getSetInput || !getSetAttribute ) {
+ jQuery.attrHooks.value = {
+ set: function( elem, value, name ) {
+ if ( jQuery.nodeName( elem, "input" ) ) {
+ // Does not return so that setAttribute is also used
+ elem.defaultValue = value;
+ } else {
+ // Use nodeHook if defined (#1954); otherwise setAttribute is fine
+ return nodeHook && nodeHook.set( elem, value, name );
+ }
+ }
+ };
+}
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !getSetAttribute ) {
+
+ // Use this for any attribute in IE6/7
+ // This fixes almost every IE6/7 issue
+ nodeHook = {
+ set: function( elem, value, name ) {
+ // Set the existing or create a new attribute node
+ var ret = elem.getAttributeNode( name );
+ if ( !ret ) {
+ elem.setAttributeNode(
+ (ret = elem.ownerDocument.createAttribute( name ))
+ );
+ }
+
+ ret.value = value += "";
+
+ // Break association with cloned elements by also using setAttribute (#9646)
+ if ( name === "value" || value === elem.getAttribute( name ) ) {
+ return value;
+ }
+ }
+ };
+
+ // Some attributes are constructed with empty-string values when not defined
+ attrHandle.id = attrHandle.name = attrHandle.coords =
+ function( elem, name, isXML ) {
+ var ret;
+ if ( !isXML ) {
+ return (ret = elem.getAttributeNode( name )) && ret.value !== "" ?
+ ret.value :
+ null;
+ }
+ };
+
+ // Fixing value retrieval on a button requires this module
+ jQuery.valHooks.button = {
+ get: function( elem, name ) {
+ var ret = elem.getAttributeNode( name );
+ if ( ret && ret.specified ) {
+ return ret.value;
+ }
+ },
+ set: nodeHook.set
+ };
+
+ // Set contenteditable to false on removals(#10429)
+ // Setting to empty string throws an error as an invalid value
+ jQuery.attrHooks.contenteditable = {
+ set: function( elem, value, name ) {
+ nodeHook.set( elem, value === "" ? false : value, name );
+ }
+ };
+
+ // Set width and height to auto instead of 0 on empty string( Bug #8150 )
+ // This is for removals
+ jQuery.each([ "width", "height" ], function( i, name ) {
+ jQuery.attrHooks[ name ] = {
+ set: function( elem, value ) {
+ if ( value === "" ) {
+ elem.setAttribute( name, "auto" );
+ return value;
+ }
+ }
+ };
+ });
+}
+
+if ( !support.style ) {
+ jQuery.attrHooks.style = {
+ get: function( elem ) {
+ // Return undefined in the case of empty string
+ // Note: IE uppercases css property names, but if we were to .toLowerCase()
+ // .cssText, that would destroy case senstitivity in URL's, like in "background"
+ return elem.style.cssText || undefined;
+ },
+ set: function( elem, value ) {
+ return ( elem.style.cssText = value + "" );
+ }
+ };
+}
+
+
+
+
+var rfocusable = /^(?:input|select|textarea|button|object)$/i,
+ rclickable = /^(?:a|area)$/i;
+
+jQuery.fn.extend({
+ prop: function( name, value ) {
+ return access( this, jQuery.prop, name, value, arguments.length > 1 );
+ },
+
+ removeProp: function( name ) {
+ name = jQuery.propFix[ name ] || name;
+ return this.each(function() {
+ // try/catch handles cases where IE balks (such as removing a property on window)
+ try {
+ this[ name ] = undefined;
+ delete this[ name ];
+ } catch( e ) {}
+ });
+ }
+});
+
+jQuery.extend({
+ propFix: {
+ "for": "htmlFor",
+ "class": "className"
+ },
+
+ prop: function( elem, name, value ) {
+ var ret, hooks, notxml,
+ nType = elem.nodeType;
+
+ // don't get/set properties on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ if ( notxml ) {
+ // Fix name and attach hooks
+ name = jQuery.propFix[ name ] || name;
+ hooks = jQuery.propHooks[ name ];
+ }
+
+ if ( value !== undefined ) {
+ return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
+ ret :
+ ( elem[ name ] = value );
+
+ } else {
+ return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
+ ret :
+ elem[ name ];
+ }
+ },
+
+ propHooks: {
+ tabIndex: {
+ get: function( elem ) {
+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+ // Use proper attribute retrieval(#12072)
+ var tabindex = jQuery.find.attr( elem, "tabindex" );
+
+ return tabindex ?
+ parseInt( tabindex, 10 ) :
+ rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+ 0 :
+ -1;
+ }
+ }
+ }
+});
+
+// Some attributes require a special call on IE
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !support.hrefNormalized ) {
+ // href/src property should get the full normalized URL (#10299/#12915)
+ jQuery.each([ "href", "src" ], function( i, name ) {
+ jQuery.propHooks[ name ] = {
+ get: function( elem ) {
+ return elem.getAttribute( name, 4 );
+ }
+ };
+ });
+}
+
+// Support: Safari, IE9+
+// mis-reports the default selected property of an option
+// Accessing the parent's selectedIndex property fixes it
+if ( !support.optSelected ) {
+ jQuery.propHooks.selected = {
+ get: function( elem ) {
+ var parent = elem.parentNode;
+
+ if ( parent ) {
+ parent.selectedIndex;
+
+ // Make sure that it also works with optgroups, see #5701
+ if ( parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ }
+ return null;
+ }
+ };
+}
+
+jQuery.each([
+ "tabIndex",
+ "readOnly",
+ "maxLength",
+ "cellSpacing",
+ "cellPadding",
+ "rowSpan",
+ "colSpan",
+ "useMap",
+ "frameBorder",
+ "contentEditable"
+], function() {
+ jQuery.propFix[ this.toLowerCase() ] = this;
+});
+
+// IE6/7 call enctype encoding
+if ( !support.enctype ) {
+ jQuery.propFix.enctype = "encoding";
+}
+
+
+
+
+var rclass = /[\t\r\n\f]/g;
+
+jQuery.fn.extend({
+ addClass: function( value ) {
+ var classes, elem, cur, clazz, j, finalValue,
+ i = 0,
+ len = this.length,
+ proceed = typeof value === "string" && value;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).addClass( value.call( this, j, this.className ) );
+ });
+ }
+
+ if ( proceed ) {
+ // The disjunction here is for better compressibility (see removeClass)
+ classes = ( value || "" ).match( rnotwhite ) || [];
+
+ for ( ; i < len; i++ ) {
+ elem = this[ i ];
+ cur = elem.nodeType === 1 && ( elem.className ?
+ ( " " + elem.className + " " ).replace( rclass, " " ) :
+ " "
+ );
+
+ if ( cur ) {
+ j = 0;
+ while ( (clazz = classes[j++]) ) {
+ if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
+ cur += clazz + " ";
+ }
+ }
+
+ // only assign if different to avoid unneeded rendering.
+ finalValue = jQuery.trim( cur );
+ if ( elem.className !== finalValue ) {
+ elem.className = finalValue;
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ removeClass: function( value ) {
+ var classes, elem, cur, clazz, j, finalValue,
+ i = 0,
+ len = this.length,
+ proceed = arguments.length === 0 || typeof value === "string" && value;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).removeClass( value.call( this, j, this.className ) );
+ });
+ }
+ if ( proceed ) {
+ classes = ( value || "" ).match( rnotwhite ) || [];
+
+ for ( ; i < len; i++ ) {
+ elem = this[ i ];
+ // This expression is here for better compressibility (see addClass)
+ cur = elem.nodeType === 1 && ( elem.className ?
+ ( " " + elem.className + " " ).replace( rclass, " " ) :
+ ""
+ );
+
+ if ( cur ) {
+ j = 0;
+ while ( (clazz = classes[j++]) ) {
+ // Remove *all* instances
+ while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
+ cur = cur.replace( " " + clazz + " ", " " );
+ }
+ }
+
+ // only assign if different to avoid unneeded rendering.
+ finalValue = value ? jQuery.trim( cur ) : "";
+ if ( elem.className !== finalValue ) {
+ elem.className = finalValue;
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ toggleClass: function( value, stateVal ) {
+ var type = typeof value;
+
+ if ( typeof stateVal === "boolean" && type === "string" ) {
+ return stateVal ? this.addClass( value ) : this.removeClass( value );
+ }
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+ });
+ }
+
+ return this.each(function() {
+ if ( type === "string" ) {
+ // toggle individual class names
+ var className,
+ i = 0,
+ self = jQuery( this ),
+ classNames = value.match( rnotwhite ) || [];
+
+ while ( (className = classNames[ i++ ]) ) {
+ // check each className given, space separated list
+ if ( self.hasClass( className ) ) {
+ self.removeClass( className );
+ } else {
+ self.addClass( className );
+ }
+ }
+
+ // Toggle whole class name
+ } else if ( type === strundefined || type === "boolean" ) {
+ if ( this.className ) {
+ // store className if set
+ jQuery._data( this, "__className__", this.className );
+ }
+
+ // If the element has a class name or if we're passed "false",
+ // then remove the whole classname (if there was one, the above saved it).
+ // Otherwise bring back whatever was previously saved (if anything),
+ // falling back to the empty string if nothing was stored.
+ this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
+ }
+ });
+ },
+
+ hasClass: function( selector ) {
+ var className = " " + selector + " ",
+ i = 0,
+ l = this.length;
+ for ( ; i < l; i++ ) {
+ if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+});
+
+
+
+
+// Return jQuery for attributes-only inclusion
+
+
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+ "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+
+ // Handle event binding
+ jQuery.fn[ name ] = function( data, fn ) {
+ return arguments.length > 0 ?
+ this.on( name, null, data, fn ) :
+ this.trigger( name );
+ };
+});
+
+jQuery.fn.extend({
+ hover: function( fnOver, fnOut ) {
+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+ },
+
+ bind: function( types, data, fn ) {
+ return this.on( types, null, data, fn );
+ },
+ unbind: function( types, fn ) {
+ return this.off( types, null, fn );
+ },
+
+ delegate: function( selector, types, data, fn ) {
+ return this.on( types, selector, data, fn );
+ },
+ undelegate: function( selector, types, fn ) {
+ // ( namespace ) or ( selector, types [, fn] )
+ return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
+ }
+});
+
+
+var nonce = jQuery.now();
+
+var rquery = (/\?/);
+
+
+
+var rvalidtokens = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;
+
+jQuery.parseJSON = function( data ) {
+ // Attempt to parse using the native JSON parser first
+ if ( window.JSON && window.JSON.parse ) {
+ // Support: Android 2.3
+ // Workaround failure to string-cast null input
+ return window.JSON.parse( data + "" );
+ }
+
+ var requireNonComma,
+ depth = null,
+ str = jQuery.trim( data + "" );
+
+ // Guard against invalid (and possibly dangerous) input by ensuring that nothing remains
+ // after removing valid tokens
+ return str && !jQuery.trim( str.replace( rvalidtokens, function( token, comma, open, close ) {
+
+ // Force termination if we see a misplaced comma
+ if ( requireNonComma && comma ) {
+ depth = 0;
+ }
+
+ // Perform no more replacements after returning to outermost depth
+ if ( depth === 0 ) {
+ return token;
+ }
+
+ // Commas must not follow "[", "{", or ","
+ requireNonComma = open || comma;
+
+ // Determine new depth
+ // array/object open ("[" or "{"): depth += true - false (increment)
+ // array/object close ("]" or "}"): depth += false - true (decrement)
+ // other cases ("," or primitive): depth += true - true (numeric cast)
+ depth += !close - !open;
+
+ // Remove this token
+ return "";
+ }) ) ?
+ ( Function( "return " + str ) )() :
+ jQuery.error( "Invalid JSON: " + data );
+};
+
+
+// Cross-browser xml parsing
+jQuery.parseXML = function( data ) {
+ var xml, tmp;
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+ try {
+ if ( window.DOMParser ) { // Standard
+ tmp = new DOMParser();
+ xml = tmp.parseFromString( data, "text/xml" );
+ } else { // IE
+ xml = new ActiveXObject( "Microsoft.XMLDOM" );
+ xml.async = "false";
+ xml.loadXML( data );
+ }
+ } catch( e ) {
+ xml = undefined;
+ }
+ if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
+ jQuery.error( "Invalid XML: " + data );
+ }
+ return xml;
+};
+
+
+var
+ // Document location
+ ajaxLocParts,
+ ajaxLocation,
+
+ rhash = /#.*$/,
+ rts = /([?&])_=[^&]*/,
+ rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
+ // #7653, #8125, #8152: local protocol detection
+ rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
+ rnoContent = /^(?:GET|HEAD)$/,
+ rprotocol = /^\/\//,
+ rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
+
+ /* Prefilters
+ * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+ * 2) These are called:
+ * - BEFORE asking for a transport
+ * - AFTER param serialization (s.data is a string if s.processData is true)
+ * 3) key is the dataType
+ * 4) the catchall symbol "*" can be used
+ * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+ */
+ prefilters = {},
+
+ /* Transports bindings
+ * 1) key is the dataType
+ * 2) the catchall symbol "*" can be used
+ * 3) selection will start with transport dataType and THEN go to "*" if needed
+ */
+ transports = {},
+
+ // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+ allTypes = "*/".concat("*");
+
+// #8138, IE may throw an exception when accessing
+// a field from window.location if document.domain has been set
+try {
+ ajaxLocation = location.href;
+} catch( e ) {
+ // Use the href attribute of an A element
+ // since IE will modify it given document.location
+ ajaxLocation = document.createElement( "a" );
+ ajaxLocation.href = "";
+ ajaxLocation = ajaxLocation.href;
+}
+
+// Segment location into parts
+ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+ // dataTypeExpression is optional and defaults to "*"
+ return function( dataTypeExpression, func ) {
+
+ if ( typeof dataTypeExpression !== "string" ) {
+ func = dataTypeExpression;
+ dataTypeExpression = "*";
+ }
+
+ var dataType,
+ i = 0,
+ dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];
+
+ if ( jQuery.isFunction( func ) ) {
+ // For each dataType in the dataTypeExpression
+ while ( (dataType = dataTypes[i++]) ) {
+ // Prepend if requested
+ if ( dataType.charAt( 0 ) === "+" ) {
+ dataType = dataType.slice( 1 ) || "*";
+ (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
+
+ // Otherwise append
+ } else {
+ (structure[ dataType ] = structure[ dataType ] || []).push( func );
+ }
+ }
+ }
+ };
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
+
+ var inspected = {},
+ seekingTransport = ( structure === transports );
+
+ function inspect( dataType ) {
+ var selected;
+ inspected[ dataType ] = true;
+ jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
+ var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
+ if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
+ options.dataTypes.unshift( dataTypeOrTransport );
+ inspect( dataTypeOrTransport );
+ return false;
+ } else if ( seekingTransport ) {
+ return !( selected = dataTypeOrTransport );
+ }
+ });
+ return selected;
+ }
+
+ return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+ var deep, key,
+ flatOptions = jQuery.ajaxSettings.flatOptions || {};
+
+ for ( key in src ) {
+ if ( src[ key ] !== undefined ) {
+ ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
+ }
+ }
+ if ( deep ) {
+ jQuery.extend( true, target, deep );
+ }
+
+ return target;
+}
+
+/* Handles responses to an ajax request:
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+ var firstDataType, ct, finalDataType, type,
+ contents = s.contents,
+ dataTypes = s.dataTypes;
+
+ // Remove auto dataType and get content-type in the process
+ while ( dataTypes[ 0 ] === "*" ) {
+ dataTypes.shift();
+ if ( ct === undefined ) {
+ ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
+ }
+ }
+
+ // Check if we're dealing with a known content-type
+ if ( ct ) {
+ for ( type in contents ) {
+ if ( contents[ type ] && contents[ type ].test( ct ) ) {
+ dataTypes.unshift( type );
+ break;
+ }
+ }
+ }
+
+ // Check to see if we have a response for the expected dataType
+ if ( dataTypes[ 0 ] in responses ) {
+ finalDataType = dataTypes[ 0 ];
+ } else {
+ // Try convertible dataTypes
+ for ( type in responses ) {
+ if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+ finalDataType = type;
+ break;
+ }
+ if ( !firstDataType ) {
+ firstDataType = type;
+ }
+ }
+ // Or just use first one
+ finalDataType = finalDataType || firstDataType;
+ }
+
+ // If we found a dataType
+ // We add the dataType to the list if needed
+ // and return the corresponding response
+ if ( finalDataType ) {
+ if ( finalDataType !== dataTypes[ 0 ] ) {
+ dataTypes.unshift( finalDataType );
+ }
+ return responses[ finalDataType ];
+ }
+}
+
+/* Chain conversions given the request and the original response
+ * Also sets the responseXXX fields on the jqXHR instance
+ */
+function ajaxConvert( s, response, jqXHR, isSuccess ) {
+ var conv2, current, conv, tmp, prev,
+ converters = {},
+ // Work with a copy of dataTypes in case we need to modify it for conversion
+ dataTypes = s.dataTypes.slice();
+
+ // Create converters map with lowercased keys
+ if ( dataTypes[ 1 ] ) {
+ for ( conv in s.converters ) {
+ converters[ conv.toLowerCase() ] = s.converters[ conv ];
+ }
+ }
+
+ current = dataTypes.shift();
+
+ // Convert to each sequential dataType
+ while ( current ) {
+
+ if ( s.responseFields[ current ] ) {
+ jqXHR[ s.responseFields[ current ] ] = response;
+ }
+
+ // Apply the dataFilter if provided
+ if ( !prev && isSuccess && s.dataFilter ) {
+ response = s.dataFilter( response, s.dataType );
+ }
+
+ prev = current;
+ current = dataTypes.shift();
+
+ if ( current ) {
+
+ // There's only work to do if current dataType is non-auto
+ if ( current === "*" ) {
+
+ current = prev;
+
+ // Convert response if prev dataType is non-auto and differs from current
+ } else if ( prev !== "*" && prev !== current ) {
+
+ // Seek a direct converter
+ conv = converters[ prev + " " + current ] || converters[ "* " + current ];
+
+ // If none found, seek a pair
+ if ( !conv ) {
+ for ( conv2 in converters ) {
+
+ // If conv2 outputs current
+ tmp = conv2.split( " " );
+ if ( tmp[ 1 ] === current ) {
+
+ // If prev can be converted to accepted input
+ conv = converters[ prev + " " + tmp[ 0 ] ] ||
+ converters[ "* " + tmp[ 0 ] ];
+ if ( conv ) {
+ // Condense equivalence converters
+ if ( conv === true ) {
+ conv = converters[ conv2 ];
+
+ // Otherwise, insert the intermediate dataType
+ } else if ( converters[ conv2 ] !== true ) {
+ current = tmp[ 0 ];
+ dataTypes.unshift( tmp[ 1 ] );
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ // Apply converter (if not an equivalence)
+ if ( conv !== true ) {
+
+ // Unless errors are allowed to bubble, catch and return them
+ if ( conv && s[ "throws" ] ) {
+ response = conv( response );
+ } else {
+ try {
+ response = conv( response );
+ } catch ( e ) {
+ return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return { state: "success", data: response };
+}
+
+jQuery.extend({
+
+ // Counter for holding the number of active queries
+ active: 0,
+
+ // Last-Modified header cache for next request
+ lastModified: {},
+ etag: {},
+
+ ajaxSettings: {
+ url: ajaxLocation,
+ type: "GET",
+ isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
+ global: true,
+ processData: true,
+ async: true,
+ contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+ /*
+ timeout: 0,
+ data: null,
+ dataType: null,
+ username: null,
+ password: null,
+ cache: null,
+ throws: false,
+ traditional: false,
+ headers: {},
+ */
+
+ accepts: {
+ "*": allTypes,
+ text: "text/plain",
+ html: "text/html",
+ xml: "application/xml, text/xml",
+ json: "application/json, text/javascript"
+ },
+
+ contents: {
+ xml: /xml/,
+ html: /html/,
+ json: /json/
+ },
+
+ responseFields: {
+ xml: "responseXML",
+ text: "responseText",
+ json: "responseJSON"
+ },
+
+ // Data converters
+ // Keys separate source (or catchall "*") and destination types with a single space
+ converters: {
+
+ // Convert anything to text
+ "* text": String,
+
+ // Text to html (true = no transformation)
+ "text html": true,
+
+ // Evaluate text as a json expression
+ "text json": jQuery.parseJSON,
+
+ // Parse text as xml
+ "text xml": jQuery.parseXML
+ },
+
+ // For options that shouldn't be deep extended:
+ // you can add your own custom options here if
+ // and when you create one that shouldn't be
+ // deep extended (see ajaxExtend)
+ flatOptions: {
+ url: true,
+ context: true
+ }
+ },
+
+ // Creates a full fledged settings object into target
+ // with both ajaxSettings and settings fields.
+ // If target is omitted, writes into ajaxSettings.
+ ajaxSetup: function( target, settings ) {
+ return settings ?
+
+ // Building a settings object
+ ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
+
+ // Extending ajaxSettings
+ ajaxExtend( jQuery.ajaxSettings, target );
+ },
+
+ ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+ ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+ // Main method
+ ajax: function( url, options ) {
+
+ // If url is an object, simulate pre-1.5 signature
+ if ( typeof url === "object" ) {
+ options = url;
+ url = undefined;
+ }
+
+ // Force options to be an object
+ options = options || {};
+
+ var // Cross-domain detection vars
+ parts,
+ // Loop variable
+ i,
+ // URL without anti-cache param
+ cacheURL,
+ // Response headers as string
+ responseHeadersString,
+ // timeout handle
+ timeoutTimer,
+
+ // To know if global events are to be dispatched
+ fireGlobals,
+
+ transport,
+ // Response headers
+ responseHeaders,
+ // Create the final options object
+ s = jQuery.ajaxSetup( {}, options ),
+ // Callbacks context
+ callbackContext = s.context || s,
+ // Context for global events is callbackContext if it is a DOM node or jQuery collection
+ globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
+ jQuery( callbackContext ) :
+ jQuery.event,
+ // Deferreds
+ deferred = jQuery.Deferred(),
+ completeDeferred = jQuery.Callbacks("once memory"),
+ // Status-dependent callbacks
+ statusCode = s.statusCode || {},
+ // Headers (they are sent all at once)
+ requestHeaders = {},
+ requestHeadersNames = {},
+ // The jqXHR state
+ state = 0,
+ // Default abort message
+ strAbort = "canceled",
+ // Fake xhr
+ jqXHR = {
+ readyState: 0,
+
+ // Builds headers hashtable if needed
+ getResponseHeader: function( key ) {
+ var match;
+ if ( state === 2 ) {
+ if ( !responseHeaders ) {
+ responseHeaders = {};
+ while ( (match = rheaders.exec( responseHeadersString )) ) {
+ responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+ }
+ }
+ match = responseHeaders[ key.toLowerCase() ];
+ }
+ return match == null ? null : match;
+ },
+
+ // Raw string
+ getAllResponseHeaders: function() {
+ return state === 2 ? responseHeadersString : null;
+ },
+
+ // Caches the header
+ setRequestHeader: function( name, value ) {
+ var lname = name.toLowerCase();
+ if ( !state ) {
+ name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+ requestHeaders[ name ] = value;
+ }
+ return this;
+ },
+
+ // Overrides response content-type header
+ overrideMimeType: function( type ) {
+ if ( !state ) {
+ s.mimeType = type;
+ }
+ return this;
+ },
+
+ // Status-dependent callbacks
+ statusCode: function( map ) {
+ var code;
+ if ( map ) {
+ if ( state < 2 ) {
+ for ( code in map ) {
+ // Lazy-add the new callback in a way that preserves old ones
+ statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
+ }
+ } else {
+ // Execute the appropriate callbacks
+ jqXHR.always( map[ jqXHR.status ] );
+ }
+ }
+ return this;
+ },
+
+ // Cancel the request
+ abort: function( statusText ) {
+ var finalText = statusText || strAbort;
+ if ( transport ) {
+ transport.abort( finalText );
+ }
+ done( 0, finalText );
+ return this;
+ }
+ };
+
+ // Attach deferreds
+ deferred.promise( jqXHR ).complete = completeDeferred.add;
+ jqXHR.success = jqXHR.done;
+ jqXHR.error = jqXHR.fail;
+
+ // Remove hash character (#7531: and string promotion)
+ // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
+ // Handle falsy url in the settings object (#10093: consistency with old signature)
+ // We also use the url parameter if available
+ s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+
+ // Alias method option to type as per ticket #12004
+ s.type = options.method || options.type || s.method || s.type;
+
+ // Extract dataTypes list
+ s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
+
+ // A cross-domain request is in order when we have a protocol:host:port mismatch
+ if ( s.crossDomain == null ) {
+ parts = rurl.exec( s.url.toLowerCase() );
+ s.crossDomain = !!( parts &&
+ ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
+ ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
+ ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
+ );
+ }
+
+ // Convert data if not already a string
+ if ( s.data && s.processData && typeof s.data !== "string" ) {
+ s.data = jQuery.param( s.data, s.traditional );
+ }
+
+ // Apply prefilters
+ inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+ // If request was aborted inside a prefilter, stop there
+ if ( state === 2 ) {
+ return jqXHR;
+ }
+
+ // We can fire global events as of now if asked to
+ // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
+ fireGlobals = jQuery.event && s.global;
+
+ // Watch for a new set of requests
+ if ( fireGlobals && jQuery.active++ === 0 ) {
+ jQuery.event.trigger("ajaxStart");
+ }
+
+ // Uppercase the type
+ s.type = s.type.toUpperCase();
+
+ // Determine if request has content
+ s.hasContent = !rnoContent.test( s.type );
+
+ // Save the URL in case we're toying with the If-Modified-Since
+ // and/or If-None-Match header later on
+ cacheURL = s.url;
+
+ // More options handling for requests with no content
+ if ( !s.hasContent ) {
+
+ // If data is available, append data to url
+ if ( s.data ) {
+ cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
+ // #9682: remove data so that it's not used in an eventual retry
+ delete s.data;
+ }
+
+ // Add anti-cache in url if needed
+ if ( s.cache === false ) {
+ s.url = rts.test( cacheURL ) ?
+
+ // If there is already a '_' parameter, set its value
+ cacheURL.replace( rts, "$1_=" + nonce++ ) :
+
+ // Otherwise add one to the end
+ cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++;
+ }
+ }
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ if ( jQuery.lastModified[ cacheURL ] ) {
+ jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
+ }
+ if ( jQuery.etag[ cacheURL ] ) {
+ jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
+ }
+ }
+
+ // Set the correct header, if data is being sent
+ if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+ jqXHR.setRequestHeader( "Content-Type", s.contentType );
+ }
+
+ // Set the Accepts header for the server, depending on the dataType
+ jqXHR.setRequestHeader(
+ "Accept",
+ s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+ s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+ s.accepts[ "*" ]
+ );
+
+ // Check for headers option
+ for ( i in s.headers ) {
+ jqXHR.setRequestHeader( i, s.headers[ i ] );
+ }
+
+ // Allow custom headers/mimetypes and early abort
+ if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+ // Abort if not done already and return
+ return jqXHR.abort();
+ }
+
+ // aborting is no longer a cancellation
+ strAbort = "abort";
+
+ // Install callbacks on deferreds
+ for ( i in { success: 1, error: 1, complete: 1 } ) {
+ jqXHR[ i ]( s[ i ] );
+ }
+
+ // Get transport
+ transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+ // If no transport, we auto-abort
+ if ( !transport ) {
+ done( -1, "No Transport" );
+ } else {
+ jqXHR.readyState = 1;
+
+ // Send global event
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+ }
+ // Timeout
+ if ( s.async && s.timeout > 0 ) {
+ timeoutTimer = setTimeout(function() {
+ jqXHR.abort("timeout");
+ }, s.timeout );
+ }
+
+ try {
+ state = 1;
+ transport.send( requestHeaders, done );
+ } catch ( e ) {
+ // Propagate exception as error if not done
+ if ( state < 2 ) {
+ done( -1, e );
+ // Simply rethrow otherwise
+ } else {
+ throw e;
+ }
+ }
+ }
+
+ // Callback for when everything is done
+ function done( status, nativeStatusText, responses, headers ) {
+ var isSuccess, success, error, response, modified,
+ statusText = nativeStatusText;
+
+ // Called once
+ if ( state === 2 ) {
+ return;
+ }
+
+ // State is "done" now
+ state = 2;
+
+ // Clear timeout if it exists
+ if ( timeoutTimer ) {
+ clearTimeout( timeoutTimer );
+ }
+
+ // Dereference transport for early garbage collection
+ // (no matter how long the jqXHR object will be used)
+ transport = undefined;
+
+ // Cache response headers
+ responseHeadersString = headers || "";
+
+ // Set readyState
+ jqXHR.readyState = status > 0 ? 4 : 0;
+
+ // Determine if successful
+ isSuccess = status >= 200 && status < 300 || status === 304;
+
+ // Get response data
+ if ( responses ) {
+ response = ajaxHandleResponses( s, jqXHR, responses );
+ }
+
+ // Convert no matter what (that way responseXXX fields are always set)
+ response = ajaxConvert( s, response, jqXHR, isSuccess );
+
+ // If successful, handle type chaining
+ if ( isSuccess ) {
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ modified = jqXHR.getResponseHeader("Last-Modified");
+ if ( modified ) {
+ jQuery.lastModified[ cacheURL ] = modified;
+ }
+ modified = jqXHR.getResponseHeader("etag");
+ if ( modified ) {
+ jQuery.etag[ cacheURL ] = modified;
+ }
+ }
+
+ // if no content
+ if ( status === 204 || s.type === "HEAD" ) {
+ statusText = "nocontent";
+
+ // if not modified
+ } else if ( status === 304 ) {
+ statusText = "notmodified";
+
+ // If we have data, let's convert it
+ } else {
+ statusText = response.state;
+ success = response.data;
+ error = response.error;
+ isSuccess = !error;
+ }
+ } else {
+ // We extract error from statusText
+ // then normalize statusText and status for non-aborts
+ error = statusText;
+ if ( status || !statusText ) {
+ statusText = "error";
+ if ( status < 0 ) {
+ status = 0;
+ }
+ }
+ }
+
+ // Set data for the fake xhr object
+ jqXHR.status = status;
+ jqXHR.statusText = ( nativeStatusText || statusText ) + "";
+
+ // Success/Error
+ if ( isSuccess ) {
+ deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+ } else {
+ deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+ }
+
+ // Status-dependent callbacks
+ jqXHR.statusCode( statusCode );
+ statusCode = undefined;
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
+ [ jqXHR, s, isSuccess ? success : error ] );
+ }
+
+ // Complete
+ completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+ // Handle the global AJAX counter
+ if ( !( --jQuery.active ) ) {
+ jQuery.event.trigger("ajaxStop");
+ }
+ }
+ }
+
+ return jqXHR;
+ },
+
+ getJSON: function( url, data, callback ) {
+ return jQuery.get( url, data, callback, "json" );
+ },
+
+ getScript: function( url, callback ) {
+ return jQuery.get( url, undefined, callback, "script" );
+ }
+});
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+ jQuery[ method ] = function( url, data, callback, type ) {
+ // shift arguments if data argument was omitted
+ if ( jQuery.isFunction( data ) ) {
+ type = type || callback;
+ callback = data;
+ data = undefined;
+ }
+
+ return jQuery.ajax({
+ url: url,
+ type: method,
+ dataType: type,
+ data: data,
+ success: callback
+ });
+ };
+});
+
+
+jQuery._evalUrl = function( url ) {
+ return jQuery.ajax({
+ url: url,
+ type: "GET",
+ dataType: "script",
+ async: false,
+ global: false,
+ "throws": true
+ });
+};
+
+
+jQuery.fn.extend({
+ wrapAll: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function(i) {
+ jQuery(this).wrapAll( html.call(this, i) );
+ });
+ }
+
+ if ( this[0] ) {
+ // The elements to wrap the target around
+ var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+
+ if ( this[0].parentNode ) {
+ wrap.insertBefore( this[0] );
+ }
+
+ wrap.map(function() {
+ var elem = this;
+
+ while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
+ elem = elem.firstChild;
+ }
+
+ return elem;
+ }).append( this );
+ }
+
+ return this;
+ },
+
+ wrapInner: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function(i) {
+ jQuery(this).wrapInner( html.call(this, i) );
+ });
+ }
+
+ return this.each(function() {
+ var self = jQuery( this ),
+ contents = self.contents();
+
+ if ( contents.length ) {
+ contents.wrapAll( html );
+
+ } else {
+ self.append( html );
+ }
+ });
+ },
+
+ wrap: function( html ) {
+ var isFunction = jQuery.isFunction( html );
+
+ return this.each(function(i) {
+ jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+ });
+ },
+
+ unwrap: function() {
+ return this.parent().each(function() {
+ if ( !jQuery.nodeName( this, "body" ) ) {
+ jQuery( this ).replaceWith( this.childNodes );
+ }
+ }).end();
+ }
+});
+
+
+jQuery.expr.filters.hidden = function( elem ) {
+ // Support: Opera <= 12.12
+ // Opera reports offsetWidths and offsetHeights less than zero on some elements
+ return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||
+ (!support.reliableHiddenOffsets() &&
+ ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
+};
+
+jQuery.expr.filters.visible = function( elem ) {
+ return !jQuery.expr.filters.hidden( elem );
+};
+
+
+
+
+var r20 = /%20/g,
+ rbracket = /\[\]$/,
+ rCRLF = /\r?\n/g,
+ rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
+ rsubmittable = /^(?:input|select|textarea|keygen)/i;
+
+function buildParams( prefix, obj, traditional, add ) {
+ var name;
+
+ if ( jQuery.isArray( obj ) ) {
+ // Serialize array item.
+ jQuery.each( obj, function( i, v ) {
+ if ( traditional || rbracket.test( prefix ) ) {
+ // Treat each array item as a scalar.
+ add( prefix, v );
+
+ } else {
+ // Item is non-scalar (array or object), encode its numeric index.
+ buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
+ }
+ });
+
+ } else if ( !traditional && jQuery.type( obj ) === "object" ) {
+ // Serialize object item.
+ for ( name in obj ) {
+ buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+ }
+
+ } else {
+ // Serialize scalar item.
+ add( prefix, obj );
+ }
+}
+
+// Serialize an array of form elements or a set of
+// key/values into a query string
+jQuery.param = function( a, traditional ) {
+ var prefix,
+ s = [],
+ add = function( key, value ) {
+ // If value is a function, invoke it and return its value
+ value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
+ s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+ };
+
+ // Set traditional to true for jQuery <= 1.3.2 behavior.
+ if ( traditional === undefined ) {
+ traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
+ }
+
+ // If an array was passed in, assume that it is an array of form elements.
+ if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+ // Serialize the form elements
+ jQuery.each( a, function() {
+ add( this.name, this.value );
+ });
+
+ } else {
+ // If traditional, encode the "old" way (the way 1.3.2 or older
+ // did it), otherwise encode params recursively.
+ for ( prefix in a ) {
+ buildParams( prefix, a[ prefix ], traditional, add );
+ }
+ }
+
+ // Return the resulting serialization
+ return s.join( "&" ).replace( r20, "+" );
+};
+
+jQuery.fn.extend({
+ serialize: function() {
+ return jQuery.param( this.serializeArray() );
+ },
+ serializeArray: function() {
+ return this.map(function() {
+ // Can add propHook for "elements" to filter or add form elements
+ var elements = jQuery.prop( this, "elements" );
+ return elements ? jQuery.makeArray( elements ) : this;
+ })
+ .filter(function() {
+ var type = this.type;
+ // Use .is(":disabled") so that fieldset[disabled] works
+ return this.name && !jQuery( this ).is( ":disabled" ) &&
+ rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
+ ( this.checked || !rcheckableType.test( type ) );
+ })
+ .map(function( i, elem ) {
+ var val = jQuery( this ).val();
+
+ return val == null ?
+ null :
+ jQuery.isArray( val ) ?
+ jQuery.map( val, function( val ) {
+ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }) :
+ { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }).get();
+ }
+});
+
+
+// Create the request object
+// (This is still attached to ajaxSettings for backward compatibility)
+jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ?
+ // Support: IE6+
+ function() {
+
+ // XHR cannot access local files, always use ActiveX for that case
+ return !this.isLocal &&
+
+ // Support: IE7-8
+ // oldIE XHR does not support non-RFC2616 methods (#13240)
+ // See http://msdn.microsoft.com/en-us/library/ie/ms536648(v=vs.85).aspx
+ // and http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9
+ // Although this check for six methods instead of eight
+ // since IE also does not support "trace" and "connect"
+ /^(get|post|head|put|delete|options)$/i.test( this.type ) &&
+
+ createStandardXHR() || createActiveXHR();
+ } :
+ // For all other browsers, use the standard XMLHttpRequest object
+ createStandardXHR;
+
+var xhrId = 0,
+ xhrCallbacks = {},
+ xhrSupported = jQuery.ajaxSettings.xhr();
+
+// Support: IE<10
+// Open requests must be manually aborted on unload (#5280)
+// See https://support.microsoft.com/kb/2856746 for more info
+if ( window.attachEvent ) {
+ window.attachEvent( "onunload", function() {
+ for ( var key in xhrCallbacks ) {
+ xhrCallbacks[ key ]( undefined, true );
+ }
+ });
+}
+
+// Determine support properties
+support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
+xhrSupported = support.ajax = !!xhrSupported;
+
+// Create transport if the browser can provide an xhr
+if ( xhrSupported ) {
+
+ jQuery.ajaxTransport(function( options ) {
+ // Cross domain only allowed if supported through XMLHttpRequest
+ if ( !options.crossDomain || support.cors ) {
+
+ var callback;
+
+ return {
+ send: function( headers, complete ) {
+ var i,
+ xhr = options.xhr(),
+ id = ++xhrId;
+
+ // Open the socket
+ xhr.open( options.type, options.url, options.async, options.username, options.password );
+
+ // Apply custom fields if provided
+ if ( options.xhrFields ) {
+ for ( i in options.xhrFields ) {
+ xhr[ i ] = options.xhrFields[ i ];
+ }
+ }
+
+ // Override mime type if needed
+ if ( options.mimeType && xhr.overrideMimeType ) {
+ xhr.overrideMimeType( options.mimeType );
+ }
+
+ // X-Requested-With header
+ // For cross-domain requests, seeing as conditions for a preflight are
+ // akin to a jigsaw puzzle, we simply never set it to be sure.
+ // (it can always be set on a per-request basis or even using ajaxSetup)
+ // For same-domain requests, won't change header if already provided.
+ if ( !options.crossDomain && !headers["X-Requested-With"] ) {
+ headers["X-Requested-With"] = "XMLHttpRequest";
+ }
+
+ // Set headers
+ for ( i in headers ) {
+ // Support: IE<9
+ // IE's ActiveXObject throws a 'Type Mismatch' exception when setting
+ // request header to a null-value.
+ //
+ // To keep consistent with other XHR implementations, cast the value
+ // to string and ignore `undefined`.
+ if ( headers[ i ] !== undefined ) {
+ xhr.setRequestHeader( i, headers[ i ] + "" );
+ }
+ }
+
+ // Do send the request
+ // This may raise an exception which is actually
+ // handled in jQuery.ajax (so no try/catch here)
+ xhr.send( ( options.hasContent && options.data ) || null );
+
+ // Listener
+ callback = function( _, isAbort ) {
+ var status, statusText, responses;
+
+ // Was never called and is aborted or complete
+ if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
+ // Clean up
+ delete xhrCallbacks[ id ];
+ callback = undefined;
+ xhr.onreadystatechange = jQuery.noop;
+
+ // Abort manually if needed
+ if ( isAbort ) {
+ if ( xhr.readyState !== 4 ) {
+ xhr.abort();
+ }
+ } else {
+ responses = {};
+ status = xhr.status;
+
+ // Support: IE<10
+ // Accessing binary-data responseText throws an exception
+ // (#11426)
+ if ( typeof xhr.responseText === "string" ) {
+ responses.text = xhr.responseText;
+ }
+
+ // Firefox throws an exception when accessing
+ // statusText for faulty cross-domain requests
+ try {
+ statusText = xhr.statusText;
+ } catch( e ) {
+ // We normalize with Webkit giving an empty statusText
+ statusText = "";
+ }
+
+ // Filter status for non standard behaviors
+
+ // If the request is local and we have data: assume a success
+ // (success with no data won't get notified, that's the best we
+ // can do given current implementations)
+ if ( !status && options.isLocal && !options.crossDomain ) {
+ status = responses.text ? 200 : 404;
+ // IE - #1450: sometimes returns 1223 when it should be 204
+ } else if ( status === 1223 ) {
+ status = 204;
+ }
+ }
+ }
+
+ // Call complete if needed
+ if ( responses ) {
+ complete( status, statusText, responses, xhr.getAllResponseHeaders() );
+ }
+ };
+
+ if ( !options.async ) {
+ // if we're in sync mode we fire the callback
+ callback();
+ } else if ( xhr.readyState === 4 ) {
+ // (IE6 & IE7) if it's in cache and has been
+ // retrieved directly we need to fire the callback
+ setTimeout( callback );
+ } else {
+ // Add to the list of active xhr callbacks
+ xhr.onreadystatechange = xhrCallbacks[ id ] = callback;
+ }
+ },
+
+ abort: function() {
+ if ( callback ) {
+ callback( undefined, true );
+ }
+ }
+ };
+ }
+ });
+}
+
+// Functions to create xhrs
+function createStandardXHR() {
+ try {
+ return new window.XMLHttpRequest();
+ } catch( e ) {}
+}
+
+function createActiveXHR() {
+ try {
+ return new window.ActiveXObject( "Microsoft.XMLHTTP" );
+ } catch( e ) {}
+}
+
+
+
+
+// Install script dataType
+jQuery.ajaxSetup({
+ accepts: {
+ script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
+ },
+ contents: {
+ script: /(?:java|ecma)script/
+ },
+ converters: {
+ "text script": function( text ) {
+ jQuery.globalEval( text );
+ return text;
+ }
+ }
+});
+
+// Handle cache's special case and global
+jQuery.ajaxPrefilter( "script", function( s ) {
+ if ( s.cache === undefined ) {
+ s.cache = false;
+ }
+ if ( s.crossDomain ) {
+ s.type = "GET";
+ s.global = false;
+ }
+});
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function(s) {
+
+ // This transport only deals with cross domain requests
+ if ( s.crossDomain ) {
+
+ var script,
+ head = document.head || jQuery("head")[0] || document.documentElement;
+
+ return {
+
+ send: function( _, callback ) {
+
+ script = document.createElement("script");
+
+ script.async = true;
+
+ if ( s.scriptCharset ) {
+ script.charset = s.scriptCharset;
+ }
+
+ script.src = s.url;
+
+ // Attach handlers for all browsers
+ script.onload = script.onreadystatechange = function( _, isAbort ) {
+
+ if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
+
+ // Handle memory leak in IE
+ script.onload = script.onreadystatechange = null;
+
+ // Remove the script
+ if ( script.parentNode ) {
+ script.parentNode.removeChild( script );
+ }
+
+ // Dereference the script
+ script = null;
+
+ // Callback if not abort
+ if ( !isAbort ) {
+ callback( 200, "success" );
+ }
+ }
+ };
+
+ // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
+ // Use native DOM manipulation to avoid our domManip AJAX trickery
+ head.insertBefore( script, head.firstChild );
+ },
+
+ abort: function() {
+ if ( script ) {
+ script.onload( undefined, true );
+ }
+ }
+ };
+ }
+});
+
+
+
+
+var oldCallbacks = [],
+ rjsonp = /(=)\?(?=&|$)|\?\?/;
+
+// Default jsonp settings
+jQuery.ajaxSetup({
+ jsonp: "callback",
+ jsonpCallback: function() {
+ var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
+ this[ callback ] = true;
+ return callback;
+ }
+});
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+ var callbackName, overwritten, responseContainer,
+ jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
+ "url" :
+ typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
+ );
+
+ // Handle iff the expected data type is "jsonp" or we have a parameter to set
+ if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
+
+ // Get callback name, remembering preexisting value associated with it
+ callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
+ s.jsonpCallback() :
+ s.jsonpCallback;
+
+ // Insert callback into url or form data
+ if ( jsonProp ) {
+ s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
+ } else if ( s.jsonp !== false ) {
+ s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
+ }
+
+ // Use data converter to retrieve json after script execution
+ s.converters["script json"] = function() {
+ if ( !responseContainer ) {
+ jQuery.error( callbackName + " was not called" );
+ }
+ return responseContainer[ 0 ];
+ };
+
+ // force json dataType
+ s.dataTypes[ 0 ] = "json";
+
+ // Install callback
+ overwritten = window[ callbackName ];
+ window[ callbackName ] = function() {
+ responseContainer = arguments;
+ };
+
+ // Clean-up function (fires after converters)
+ jqXHR.always(function() {
+ // Restore preexisting value
+ window[ callbackName ] = overwritten;
+
+ // Save back as free
+ if ( s[ callbackName ] ) {
+ // make sure that re-using the options doesn't screw things around
+ s.jsonpCallback = originalSettings.jsonpCallback;
+
+ // save the callback name for future use
+ oldCallbacks.push( callbackName );
+ }
+
+ // Call if it was a function and we have a response
+ if ( responseContainer && jQuery.isFunction( overwritten ) ) {
+ overwritten( responseContainer[ 0 ] );
+ }
+
+ responseContainer = overwritten = undefined;
+ });
+
+ // Delegate to script
+ return "script";
+ }
+});
+
+
+
+
+// data: string of html
+// context (optional): If specified, the fragment will be created in this context, defaults to document
+// keepScripts (optional): If true, will include scripts passed in the html string
+jQuery.parseHTML = function( data, context, keepScripts ) {
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+ if ( typeof context === "boolean" ) {
+ keepScripts = context;
+ context = false;
+ }
+ context = context || document;
+
+ var parsed = rsingleTag.exec( data ),
+ scripts = !keepScripts && [];
+
+ // Single tag
+ if ( parsed ) {
+ return [ context.createElement( parsed[1] ) ];
+ }
+
+ parsed = jQuery.buildFragment( [ data ], context, scripts );
+
+ if ( scripts && scripts.length ) {
+ jQuery( scripts ).remove();
+ }
+
+ return jQuery.merge( [], parsed.childNodes );
+};
+
+
+// Keep a copy of the old load method
+var _load = jQuery.fn.load;
+
+/**
+ * Load a url into a page
+ */
+jQuery.fn.load = function( url, params, callback ) {
+ if ( typeof url !== "string" && _load ) {
+ return _load.apply( this, arguments );
+ }
+
+ var selector, response, type,
+ self = this,
+ off = url.indexOf(" ");
+
+ if ( off >= 0 ) {
+ selector = jQuery.trim( url.slice( off, url.length ) );
+ url = url.slice( 0, off );
+ }
+
+ // If it's a function
+ if ( jQuery.isFunction( params ) ) {
+
+ // We assume that it's the callback
+ callback = params;
+ params = undefined;
+
+ // Otherwise, build a param string
+ } else if ( params && typeof params === "object" ) {
+ type = "POST";
+ }
+
+ // If we have elements to modify, make the request
+ if ( self.length > 0 ) {
+ jQuery.ajax({
+ url: url,
+
+ // if "type" variable is undefined, then "GET" method will be used
+ type: type,
+ dataType: "html",
+ data: params
+ }).done(function( responseText ) {
+
+ // Save response for use in complete callback
+ response = arguments;
+
+ self.html( selector ?
+
+ // If a selector was specified, locate the right elements in a dummy div
+ // Exclude scripts to avoid IE 'Permission Denied' errors
+ jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
+
+ // Otherwise use the full result
+ responseText );
+
+ }).complete( callback && function( jqXHR, status ) {
+ self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
+ });
+ }
+
+ return this;
+};
+
+
+
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
+ jQuery.fn[ type ] = function( fn ) {
+ return this.on( type, fn );
+ };
+});
+
+
+
+
+jQuery.expr.filters.animated = function( elem ) {
+ return jQuery.grep(jQuery.timers, function( fn ) {
+ return elem === fn.elem;
+ }).length;
+};
+
+
+
+
+
+var docElem = window.document.documentElement;
+
+/**
+ * Gets a window from an element
+ */
+function getWindow( elem ) {
+ return jQuery.isWindow( elem ) ?
+ elem :
+ elem.nodeType === 9 ?
+ elem.defaultView || elem.parentWindow :
+ false;
+}
+
+jQuery.offset = {
+ setOffset: function( elem, options, i ) {
+ var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
+ position = jQuery.css( elem, "position" ),
+ curElem = jQuery( elem ),
+ props = {};
+
+ // set position first, in-case top/left are set even on static elem
+ if ( position === "static" ) {
+ elem.style.position = "relative";
+ }
+
+ curOffset = curElem.offset();
+ curCSSTop = jQuery.css( elem, "top" );
+ curCSSLeft = jQuery.css( elem, "left" );
+ calculatePosition = ( position === "absolute" || position === "fixed" ) &&
+ jQuery.inArray("auto", [ curCSSTop, curCSSLeft ] ) > -1;
+
+ // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
+ if ( calculatePosition ) {
+ curPosition = curElem.position();
+ curTop = curPosition.top;
+ curLeft = curPosition.left;
+ } else {
+ curTop = parseFloat( curCSSTop ) || 0;
+ curLeft = parseFloat( curCSSLeft ) || 0;
+ }
+
+ if ( jQuery.isFunction( options ) ) {
+ options = options.call( elem, i, curOffset );
+ }
+
+ if ( options.top != null ) {
+ props.top = ( options.top - curOffset.top ) + curTop;
+ }
+ if ( options.left != null ) {
+ props.left = ( options.left - curOffset.left ) + curLeft;
+ }
+
+ if ( "using" in options ) {
+ options.using.call( elem, props );
+ } else {
+ curElem.css( props );
+ }
+ }
+};
+
+jQuery.fn.extend({
+ offset: function( options ) {
+ if ( arguments.length ) {
+ return options === undefined ?
+ this :
+ this.each(function( i ) {
+ jQuery.offset.setOffset( this, options, i );
+ });
+ }
+
+ var docElem, win,
+ box = { top: 0, left: 0 },
+ elem = this[ 0 ],
+ doc = elem && elem.ownerDocument;
+
+ if ( !doc ) {
+ return;
+ }
+
+ docElem = doc.documentElement;
+
+ // Make sure it's not a disconnected DOM node
+ if ( !jQuery.contains( docElem, elem ) ) {
+ return box;
+ }
+
+ // If we don't have gBCR, just use 0,0 rather than error
+ // BlackBerry 5, iOS 3 (original iPhone)
+ if ( typeof elem.getBoundingClientRect !== strundefined ) {
+ box = elem.getBoundingClientRect();
+ }
+ win = getWindow( doc );
+ return {
+ top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),
+ left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
+ };
+ },
+
+ position: function() {
+ if ( !this[ 0 ] ) {
+ return;
+ }
+
+ var offsetParent, offset,
+ parentOffset = { top: 0, left: 0 },
+ elem = this[ 0 ];
+
+ // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent
+ if ( jQuery.css( elem, "position" ) === "fixed" ) {
+ // we assume that getBoundingClientRect is available when computed position is fixed
+ offset = elem.getBoundingClientRect();
+ } else {
+ // Get *real* offsetParent
+ offsetParent = this.offsetParent();
+
+ // Get correct offsets
+ offset = this.offset();
+ if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
+ parentOffset = offsetParent.offset();
+ }
+
+ // Add offsetParent borders
+ parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
+ parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
+ }
+
+ // Subtract parent offsets and element margins
+ // note: when an element has margin: auto the offsetLeft and marginLeft
+ // are the same in Safari causing offset.left to incorrectly be 0
+ return {
+ top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
+ left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)
+ };
+ },
+
+ offsetParent: function() {
+ return this.map(function() {
+ var offsetParent = this.offsetParent || docElem;
+
+ while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) {
+ offsetParent = offsetParent.offsetParent;
+ }
+ return offsetParent || docElem;
+ });
+ }
+});
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
+ var top = /Y/.test( prop );
+
+ jQuery.fn[ method ] = function( val ) {
+ return access( this, function( elem, method, val ) {
+ var win = getWindow( elem );
+
+ if ( val === undefined ) {
+ return win ? (prop in win) ? win[ prop ] :
+ win.document.documentElement[ method ] :
+ elem[ method ];
+ }
+
+ if ( win ) {
+ win.scrollTo(
+ !top ? val : jQuery( win ).scrollLeft(),
+ top ? val : jQuery( win ).scrollTop()
+ );
+
+ } else {
+ elem[ method ] = val;
+ }
+ }, method, val, arguments.length, null );
+ };
+});
+
+// Add the top/left cssHooks using jQuery.fn.position
+// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
+// getComputedStyle returns percent when specified for top/left/bottom/right
+// rather than make the css module depend on the offset module, we just check for it here
+jQuery.each( [ "top", "left" ], function( i, prop ) {
+ jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
+ function( elem, computed ) {
+ if ( computed ) {
+ computed = curCSS( elem, prop );
+ // if curCSS returns percentage, fallback to offset
+ return rnumnonpx.test( computed ) ?
+ jQuery( elem ).position()[ prop ] + "px" :
+ computed;
+ }
+ }
+ );
+});
+
+
+// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
+jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
+ jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
+ // margin is only for outerHeight, outerWidth
+ jQuery.fn[ funcName ] = function( margin, value ) {
+ var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
+ extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
+
+ return access( this, function( elem, type, value ) {
+ var doc;
+
+ if ( jQuery.isWindow( elem ) ) {
+ // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
+ // isn't a whole lot we can do. See pull request at this URL for discussion:
+ // https://github.com/jquery/jquery/pull/764
+ return elem.document.documentElement[ "client" + name ];
+ }
+
+ // Get document width or height
+ if ( elem.nodeType === 9 ) {
+ doc = elem.documentElement;
+
+ // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
+ // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
+ return Math.max(
+ elem.body[ "scroll" + name ], doc[ "scroll" + name ],
+ elem.body[ "offset" + name ], doc[ "offset" + name ],
+ doc[ "client" + name ]
+ );
+ }
+
+ return value === undefined ?
+ // Get width or height on the element, requesting but not forcing parseFloat
+ jQuery.css( elem, type, extra ) :
+
+ // Set width or height on the element
+ jQuery.style( elem, type, value, extra );
+ }, type, chainable ? margin : undefined, chainable, null );
+ };
+ });
+});
+
+
+// The number of elements contained in the matched element set
+jQuery.fn.size = function() {
+ return this.length;
+};
+
+jQuery.fn.andSelf = jQuery.fn.addBack;
+
+
+
+
+// Register as a named AMD module, since jQuery can be concatenated with other
+// files that may use define, but not via a proper concatenation script that
+// understands anonymous AMD modules. A named AMD is safest and most robust
+// way to register. Lowercase jquery is used because AMD module names are
+// derived from file names, and jQuery is normally delivered in a lowercase
+// file name. Do this after creating the global so that if an AMD module wants
+// to call noConflict to hide this version of jQuery, it will work.
+
+// Note that for maximum portability, libraries that are not jQuery should
+// declare themselves as anonymous modules, and avoid setting a global if an
+// AMD loader is present. jQuery is a special case. For more information, see
+// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
+
+if ( typeof define === "function" && define.amd ) {
+ define( "jquery", [], function() {
+ return jQuery;
+ });
+}
+
+
+
+
+var
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$;
+
+jQuery.noConflict = function( deep ) {
+ if ( window.$ === jQuery ) {
+ window.$ = _$;
+ }
+
+ if ( deep && window.jQuery === jQuery ) {
+ window.jQuery = _jQuery;
+ }
+
+ return jQuery;
+};
+
+// Expose jQuery and $ identifiers, even in
+// AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
+// and CommonJS for browser emulators (#13566)
+if ( typeof noGlobal === strundefined ) {
+ window.jQuery = window.$ = jQuery;
+}
+
+
+
+
+return jQuery;
+
+}));
diff --git a/common/src/main/webapp/thirdparty/jquery/jquery-1.11.2.min.js b/common/src/main/webapp/thirdparty/jquery/jquery-1.11.2.min.js
new file mode 100644
index 0000000..e6a051d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery/jquery-1.11.2.min.js
@@ -0,0 +1,4 @@
+/*! jQuery v1.11.2 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
+!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=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.2",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.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(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.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||m.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&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.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,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=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=hb(),z=hb(),A=hb(),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=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),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")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=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)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){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 gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(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 mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(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 pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.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.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);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 p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",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(".#.+[+~]")}),jb(function(a){var b=g.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=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.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===g||a.ownerDocument===v&&t(v,a)?-1:b===g||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,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||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 gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.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},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.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=gb.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=gb.selectors={cacheLength:50,createPseudo:ib,match:X,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(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===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]||gb.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]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.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(cb,db).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=gb.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(Q," ")+" ").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;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(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:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(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:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).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 Z.test(a.nodeName)},input:function(a){return Y.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:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=mb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=nb(b);function qb(){}qb.prototype=d.filters=d.pseudos,d.setFilters=new qb,g=gb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?gb.error(a):z(a,i).slice(0)};function rb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sb(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=[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(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(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 ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(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 wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(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=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(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=[sb(tb(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 wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}return h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.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(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.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(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(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}),gb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(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&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.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=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;
+return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.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()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.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=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.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 m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;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},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.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?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!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&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._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++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.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)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.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 m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight),b.removeChild(i)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)
+}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=m.event&&k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
diff --git a/common/src/main/webapp/thirdparty/jquery/jquery-1.11.2.min.map b/common/src/main/webapp/thirdparty/jquery/jquery-1.11.2.min.map
new file mode 100644
index 0000000..837de0b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery/jquery-1.11.2.min.map
@@ -0,0 +1 @@
+{"version":3,"file":"jquery-1.11.2.min.js","sources":["jquery-1.11.2.js"],"names":["global","factory","module","exports","document","w","Error","window","this","noGlobal","deletedIds","slice","concat","push","indexOf","class2type","toString","hasOwn","hasOwnProperty","support","version","jQuery","selector","context","fn","init","rtrim","rmsPrefix","rdashAlpha","fcamelCase","all","letter","toUpperCase","prototype","jquery","constructor","length","toArray","call","get","num","pushStack","elems","ret","merge","prevObject","each","callback","args","map","elem","i","apply","arguments","first","eq","last","len","j","end","sort","splice","extend","src","copyIsArray","copy","name","options","clone","target","deep","isFunction","isPlainObject","isArray","undefined","expando","Math","random","replace","isReady","error","msg","noop","obj","type","Array","isWindow","isNumeric","parseFloat","isEmptyObject","key","nodeType","e","ownLast","globalEval","data","trim","execScript","camelCase","string","nodeName","toLowerCase","value","isArraylike","text","makeArray","arr","results","Object","inArray","max","second","grep","invert","callbackInverse","matches","callbackExpect","arg","guid","proxy","tmp","now","Date","split","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","contains","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","sortOrder","a","b","MAX_NEGATIVE","pop","push_native","list","booleans","whitespace","characterEncoding","identifier","attributes","pseudos","rwhitespace","RegExp","rcomma","rcombinators","rattributeQuotes","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rinputs","rheader","rnative","rquickExpr","rsibling","rescape","runescape","funescape","_","escaped","escapedWhitespace","high","String","fromCharCode","unloadHandler","childNodes","els","seed","match","m","groups","old","nid","newContext","newSelector","ownerDocument","exec","getElementById","parentNode","id","getElementsByTagName","getElementsByClassName","qsa","test","getAttribute","setAttribute","toSelector","testContext","join","querySelectorAll","qsaError","removeAttribute","keys","cache","cacheLength","shift","markFunction","assert","div","createElement","removeChild","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createPositionalPseudo","argument","matchIndexes","documentElement","node","hasCompare","parent","doc","defaultView","top","addEventListener","attachEvent","className","appendChild","createComment","getById","getElementsByName","find","filter","attrId","getAttributeNode","tag","innerHTML","input","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","attr","val","specified","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">","dir"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","simple","forward","ofType","xml","outerCache","nodeIndex","start","useCache","lastChild","pseudo","setFilters","idx","matched","not","matcher","unmatched","has","innerText","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","disabled","checked","selected","selectedIndex","empty","header","button","even","odd","lt","gt","radio","checkbox","file","password","image","submit","reset","filters","parseOnly","tokens","soFar","preFilters","cached","addCombinator","combinator","base","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","multipleContexts","contexts","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","matcherFromGroupMatchers","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","div1","defaultValue","unique","isXMLDoc","rneedsContext","rsingleTag","risSimple","winnow","qualifier","self","is","rootjQuery","charAt","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","next","prev","until","sibling","n","r","targets","closest","l","pos","index","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","siblings","contentDocument","contentWindow","reverse","rnotwhite","optionsCache","createOptions","object","flag","Callbacks","firing","memory","fired","firingLength","firingIndex","firingStart","stack","once","fire","stopOnFalse","disable","remove","lock","locked","fireWith","Deferred","func","tuples","state","promise","always","deferred","fail","then","fns","newDefer","tuple","returned","resolve","reject","progress","notify","pipe","stateString","when","subordinate","resolveValues","remaining","updateFunc","values","progressValues","notifyWith","resolveWith","progressContexts","resolveContexts","readyList","readyWait","holdReady","hold","wait","body","setTimeout","triggerHandler","off","detach","removeEventListener","completed","detachEvent","event","readyState","frameElement","doScroll","doScrollCheck","strundefined","inlineBlockNeedsLayout","container","style","cssText","zoom","offsetWidth","deleteExpando","acceptData","noData","rbrace","rmultiDash","dataAttr","parseJSON","isEmptyDataObject","internalData","pvt","thisCache","internalKey","isNode","toJSON","internalRemoveData","cleanData","applet ","embed ","object ","hasData","removeData","_data","_removeData","queue","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","count","defer","pnum","source","cssExpand","isHidden","el","css","access","chainable","emptyGet","raw","bulk","rcheckableType","fragment","createDocumentFragment","leadingWhitespace","tbody","htmlSerialize","html5Clone","cloneNode","outerHTML","appendChecked","noCloneChecked","checkClone","noCloneEvent","click","eventName","change","focusin","rformElems","rkeyEvent","rmouseEvent","rfocusMorph","rtypenamespace","returnTrue","returnFalse","safeActiveElement","err","types","events","t","handleObjIn","special","eventHandle","handleObj","handlers","namespaces","origType","elemData","handle","triggered","dispatch","delegateType","bindType","namespace","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","trigger","onlyHandlers","ontype","bubbleType","eventPath","Event","isTrigger","namespace_re","noBubble","parentWindow","isPropagationStopped","preventDefault","isDefaultPrevented","_default","fix","handlerQueue","delegateTarget","preDispatch","currentTarget","isImmediatePropagationStopped","stopPropagation","postDispatch","sel","prop","originalEvent","fixHook","fixHooks","mouseHooks","keyHooks","props","srcElement","metaKey","original","which","charCode","keyCode","eventDoc","fromElement","pageX","clientX","scrollLeft","clientLeft","pageY","clientY","scrollTop","clientTop","relatedTarget","toElement","load","blur","beforeunload","returnValue","simulate","bubble","isSimulated","defaultPrevented","timeStamp","cancelBubble","stopImmediatePropagation","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","submitBubbles","form","_submit_bubble","changeBubbles","propertyName","_just_changed","focusinBubbles","attaches","on","one","origFn","createSafeFragment","nodeNames","safeFrag","rinlinejQuery","rnoshimcache","rleadingWhitespace","rxhtmlTag","rtagName","rtbody","rhtml","rnoInnerhtml","rchecked","rscriptType","rscriptTypeMasked","rcleanScript","wrapMap","option","legend","area","param","thead","tr","col","td","safeFragment","fragmentDiv","optgroup","tfoot","colgroup","caption","th","getAll","found","fixDefaultChecked","defaultChecked","manipulationTarget","content","disableScript","restoreScript","setGlobalEval","refElements","cloneCopyEvent","dest","oldData","curData","fixCloneNodeIssues","defaultSelected","dataAndEvents","deepDataAndEvents","destElements","srcElements","inPage","buildFragment","scripts","selection","wrap","safe","nodes","createTextNode","append","domManip","prepend","insertBefore","before","after","keepData","html","replaceWith","replaceChild","hasScripts","set","iNoClone","_evalUrl","appendTo","prependTo","insertAfter","replaceAll","insert","iframe","elemdisplay","actualDisplay","display","getDefaultComputedStyle","defaultDisplay","write","close","shrinkWrapBlocksVal","shrinkWrapBlocks","width","rmargin","rnumnonpx","getStyles","curCSS","rposition","getComputedStyle","opener","computed","minWidth","maxWidth","getPropertyValue","currentStyle","left","rs","rsLeft","runtimeStyle","pixelLeft","addGetHookIf","conditionFn","hookFn","condition","pixelPositionVal","boxSizingReliableVal","reliableHiddenOffsetsVal","reliableMarginRightVal","opacity","cssFloat","backgroundClip","clearCloneStyle","boxSizing","MozBoxSizing","WebkitBoxSizing","reliableHiddenOffsets","computeStyleTests","boxSizingReliable","pixelPosition","reliableMarginRight","marginRight","offsetHeight","swap","ralpha","ropacity","rdisplayswap","rnumsplit","rrelNum","cssShow","position","visibility","cssNormalTransform","letterSpacing","fontWeight","cssPrefixes","vendorPropName","capName","origName","showHide","show","hidden","setPositiveNumber","subtract","augmentWidthOrHeight","extra","isBorderBox","styles","getWidthOrHeight","valueIsBorderBox","cssHooks","cssNumber","columnCount","fillOpacity","flexGrow","flexShrink","lineHeight","order","orphans","widows","zIndex","cssProps","float","$1","margin","padding","border","prefix","suffix","expand","expanded","parts","hide","toggle","Tween","easing","unit","propHooks","run","percent","eased","duration","step","tween","fx","linear","p","swing","cos","PI","fxNow","timerId","rfxtypes","rfxnum","rrun","animationPrefilters","defaultPrefilter","tweeners","*","createTween","scale","maxIterations","createFxNow","genFx","includeWidth","height","animation","collection","opts","oldfire","checkDisplay","anim","dataShow","unqueued","overflow","overflowX","overflowY","propFilter","specialEasing","Animation","properties","stopped","tick","currentTime","startTime","tweens","originalProperties","originalOptions","gotoEnd","rejectWith","timer","complete","tweener","prefilter","speed","opt","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","interval","setInterval","clearInterval","slow","fast","delay","time","timeout","clearTimeout","getSetAttribute","hrefNormalized","checkOn","optSelected","enctype","optDisabled","radioValue","rreturn","valHooks","optionSet","scrollHeight","nodeHook","boolHook","ruseDefault","getSetInput","removeAttr","nType","attrHooks","propName","attrNames","propFix","getter","setAttributeNode","createAttribute","coords","contenteditable","rfocusable","rclickable","removeProp","for","class","notxml","tabindex","parseInt","rclass","addClass","classes","clazz","finalValue","proceed","removeClass","toggleClass","stateVal","classNames","hasClass","hover","fnOver","fnOut","bind","unbind","delegate","undelegate","nonce","rquery","rvalidtokens","JSON","parse","requireNonComma","depth","str","comma","open","Function","parseXML","DOMParser","parseFromString","ActiveXObject","async","loadXML","ajaxLocParts","ajaxLocation","rhash","rts","rheaders","rlocalProtocol","rnoContent","rprotocol","rurl","prefilters","transports","allTypes","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","ajaxHandleResponses","s","responses","firstDataType","ct","finalDataType","mimeType","getResponseHeader","converters","ajaxConvert","response","isSuccess","conv2","current","conv","responseFields","dataFilter","active","lastModified","etag","url","isLocal","processData","contentType","accepts","json","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","cacheURL","responseHeadersString","timeoutTimer","fireGlobals","transport","responseHeaders","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getAllResponseHeaders","setRequestHeader","lname","overrideMimeType","code","status","abort","statusText","finalText","success","method","crossDomain","traditional","hasContent","ifModified","headers","beforeSend","send","nativeStatusText","modified","getJSON","getScript","throws","wrapAll","wrapInner","unwrap","visible","r20","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","v","encodeURIComponent","serialize","serializeArray","xhr","createStandardXHR","createActiveXHR","xhrId","xhrCallbacks","xhrSupported","cors","username","xhrFields","isAbort","onreadystatechange","responseText","XMLHttpRequest","script","text script","head","scriptCharset","charset","onload","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","keepScripts","parsed","_load","params","animated","getWindow","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","calculatePosition","curElem","using","win","box","getBoundingClientRect","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","defaultExtra","funcName","size","andSelf","define","amd","_jQuery","_$","$","noConflict"],"mappings":";CAcC,SAAUA,EAAQC,GAEK,gBAAXC,SAAiD,gBAAnBA,QAAOC,QAQhDD,OAAOC,QAAUH,EAAOI,SACvBH,EAASD,GAAQ,GACjB,SAAUK,GACT,IAAMA,EAAED,SACP,KAAM,IAAIE,OAAO,2CAElB,OAAOL,GAASI,IAGlBJ,EAASD,IAIS,mBAAXO,QAAyBA,OAASC,KAAM,SAAUD,EAAQE,GAQnE,GAAIC,MAEAC,EAAQD,EAAWC,MAEnBC,EAASF,EAAWE,OAEpBC,EAAOH,EAAWG,KAElBC,EAAUJ,EAAWI,QAErBC,KAEAC,EAAWD,EAAWC,SAEtBC,EAASF,EAAWG,eAEpBC,KAKHC,EAAU,SAGVC,EAAS,SAAUC,EAAUC,GAG5B,MAAO,IAAIF,GAAOG,GAAGC,KAAMH,EAAUC,IAKtCG,EAAQ,qCAGRC,EAAY,QACZC,EAAa,eAGbC,EAAa,SAAUC,EAAKC,GAC3B,MAAOA,GAAOC,cAGhBX,GAAOG,GAAKH,EAAOY,WAElBC,OAAQd,EAERe,YAAad,EAGbC,SAAU,GAGVc,OAAQ,EAERC,QAAS,WACR,MAAO1B,GAAM2B,KAAM9B,OAKpB+B,IAAK,SAAUC,GACd,MAAc,OAAPA,EAGE,EAANA,EAAUhC,KAAMgC,EAAMhC,KAAK4B,QAAW5B,KAAMgC,GAG9C7B,EAAM2B,KAAM9B,OAKdiC,UAAW,SAAUC,GAGpB,GAAIC,GAAMtB,EAAOuB,MAAOpC,KAAK2B,cAAeO,EAO5C,OAJAC,GAAIE,WAAarC,KACjBmC,EAAIpB,QAAUf,KAAKe,QAGZoB,GAMRG,KAAM,SAAUC,EAAUC,GACzB,MAAO3B,GAAOyB,KAAMtC,KAAMuC,EAAUC,IAGrCC,IAAK,SAAUF,GACd,MAAOvC,MAAKiC,UAAWpB,EAAO4B,IAAIzC,KAAM,SAAU0C,EAAMC,GACvD,MAAOJ,GAAST,KAAMY,EAAMC,EAAGD,OAIjCvC,MAAO,WACN,MAAOH,MAAKiC,UAAW9B,EAAMyC,MAAO5C,KAAM6C,aAG3CC,MAAO,WACN,MAAO9C,MAAK+C,GAAI,IAGjBC,KAAM,WACL,MAAOhD,MAAK+C,GAAI,KAGjBA,GAAI,SAAUJ,GACb,GAAIM,GAAMjD,KAAK4B,OACdsB,GAAKP,GAAU,EAAJA,EAAQM,EAAM,EAC1B,OAAOjD,MAAKiC,UAAWiB,GAAK,GAASD,EAAJC,GAAYlD,KAAKkD,SAGnDC,IAAK,WACJ,MAAOnD,MAAKqC,YAAcrC,KAAK2B,YAAY,OAK5CtB,KAAMA,EACN+C,KAAMlD,EAAWkD,KACjBC,OAAQnD,EAAWmD,QAGpBxC,EAAOyC,OAASzC,EAAOG,GAAGsC,OAAS,WAClC,GAAIC,GAAKC,EAAaC,EAAMC,EAAMC,EAASC,EAC1CC,EAAShB,UAAU,OACnBF,EAAI,EACJf,EAASiB,UAAUjB,OACnBkC,GAAO,CAsBR,KAnBuB,iBAAXD,KACXC,EAAOD,EAGPA,EAAShB,UAAWF,OACpBA,KAIsB,gBAAXkB,IAAwBhD,EAAOkD,WAAWF,KACrDA,MAIIlB,IAAMf,IACViC,EAAS7D,KACT2C,KAGWf,EAAJe,EAAYA,IAEnB,GAAmC,OAA7BgB,EAAUd,UAAWF,IAE1B,IAAMe,IAAQC,GACbJ,EAAMM,EAAQH,GACdD,EAAOE,EAASD,GAGXG,IAAWJ,IAKXK,GAAQL,IAAU5C,EAAOmD,cAAcP,KAAUD,EAAc3C,EAAOoD,QAAQR,MAC7ED,GACJA,GAAc,EACdI,EAAQL,GAAO1C,EAAOoD,QAAQV,GAAOA,MAGrCK,EAAQL,GAAO1C,EAAOmD,cAAcT,GAAOA,KAI5CM,EAAQH,GAAS7C,EAAOyC,OAAQQ,EAAMF,EAAOH,IAGzBS,SAATT,IACXI,EAAQH,GAASD,GAOrB,OAAOI,IAGRhD,EAAOyC,QAENa,QAAS,UAAavD,EAAUwD,KAAKC,UAAWC,QAAS,MAAO,IAGhEC,SAAS,EAETC,MAAO,SAAUC,GAChB,KAAM,IAAI3E,OAAO2E,IAGlBC,KAAM,aAKNX,WAAY,SAAUY,GACrB,MAA4B,aAArB9D,EAAO+D,KAAKD,IAGpBV,QAASY,MAAMZ,SAAW,SAAUU,GACnC,MAA4B,UAArB9D,EAAO+D,KAAKD,IAGpBG,SAAU,SAAUH,GAEnB,MAAc,OAAPA,GAAeA,GAAOA,EAAI5E,QAGlCgF,UAAW,SAAUJ,GAKpB,OAAQ9D,EAAOoD,QAASU,IAAUA,EAAMK,WAAYL,GAAQ,GAAM,GAGnEM,cAAe,SAAUN,GACxB,GAAIjB,EACJ,KAAMA,IAAQiB,GACb,OAAO,CAER,QAAO,GAGRX,cAAe,SAAUW,GACxB,GAAIO,EAKJ,KAAMP,GAA4B,WAArB9D,EAAO+D,KAAKD,IAAqBA,EAAIQ,UAAYtE,EAAOiE,SAAUH,GAC9E,OAAO,CAGR,KAEC,GAAKA,EAAIhD,cACPlB,EAAOqB,KAAK6C,EAAK,iBACjBlE,EAAOqB,KAAK6C,EAAIhD,YAAYF,UAAW,iBACxC,OAAO,EAEP,MAAQ2D,GAET,OAAO,EAKR,GAAKzE,EAAQ0E,QACZ,IAAMH,IAAOP,GACZ,MAAOlE,GAAOqB,KAAM6C,EAAKO,EAM3B,KAAMA,IAAOP,IAEb,MAAeT,UAARgB,GAAqBzE,EAAOqB,KAAM6C,EAAKO,IAG/CN,KAAM,SAAUD,GACf,MAAY,OAAPA,EACGA,EAAM,GAEQ,gBAARA,IAAmC,kBAARA,GACxCpE,EAAYC,EAASsB,KAAK6C,KAAU,eAC7BA,IAMTW,WAAY,SAAUC,GAChBA,GAAQ1E,EAAO2E,KAAMD,KAIvBxF,EAAO0F,YAAc,SAAUF,GAChCxF,EAAe,KAAE+B,KAAM/B,EAAQwF,KAC3BA,IAMPG,UAAW,SAAUC,GACpB,MAAOA,GAAOrB,QAASnD,EAAW,OAAQmD,QAASlD,EAAYC,IAGhEuE,SAAU,SAAUlD,EAAMgB,GACzB,MAAOhB,GAAKkD,UAAYlD,EAAKkD,SAASC,gBAAkBnC,EAAKmC,eAI9DvD,KAAM,SAAUqC,EAAKpC,EAAUC,GAC9B,GAAIsD,GACHnD,EAAI,EACJf,EAAS+C,EAAI/C,OACbqC,EAAU8B,EAAapB,EAExB,IAAKnC,GACJ,GAAKyB,GACJ,KAAYrC,EAAJe,EAAYA,IAGnB,GAFAmD,EAAQvD,EAASK,MAAO+B,EAAKhC,GAAKH,GAE7BsD,KAAU,EACd,UAIF,KAAMnD,IAAKgC,GAGV,GAFAmB,EAAQvD,EAASK,MAAO+B,EAAKhC,GAAKH,GAE7BsD,KAAU,EACd,UAOH,IAAK7B,GACJ,KAAYrC,EAAJe,EAAYA,IAGnB,GAFAmD,EAAQvD,EAAST,KAAM6C,EAAKhC,GAAKA,EAAGgC,EAAKhC,IAEpCmD,KAAU,EACd,UAIF,KAAMnD,IAAKgC,GAGV,GAFAmB,EAAQvD,EAAST,KAAM6C,EAAKhC,GAAKA,EAAGgC,EAAKhC,IAEpCmD,KAAU,EACd,KAMJ,OAAOnB,IAIRa,KAAM,SAAUQ,GACf,MAAe,OAARA,EACN,IACEA,EAAO,IAAK1B,QAASpD,EAAO,KAIhC+E,UAAW,SAAUC,EAAKC,GACzB,GAAIhE,GAAMgE,KAaV,OAXY,OAAPD,IACCH,EAAaK,OAAOF,IACxBrF,EAAOuB,MAAOD,EACE,gBAAR+D,IACLA,GAAQA,GAGX7F,EAAKyB,KAAMK,EAAK+D,IAIX/D,GAGRkE,QAAS,SAAU3D,EAAMwD,EAAKvD,GAC7B,GAAIM,EAEJ,IAAKiD,EAAM,CACV,GAAK5F,EACJ,MAAOA,GAAQwB,KAAMoE,EAAKxD,EAAMC,EAMjC,KAHAM,EAAMiD,EAAItE,OACVe,EAAIA,EAAQ,EAAJA,EAAQyB,KAAKkC,IAAK,EAAGrD,EAAMN,GAAMA,EAAI,EAEjCM,EAAJN,EAASA,IAEhB,GAAKA,IAAKuD,IAAOA,EAAKvD,KAAQD,EAC7B,MAAOC,GAKV,MAAO,IAGRP,MAAO,SAAUU,EAAOyD,GACvB,GAAItD,IAAOsD,EAAO3E,OACjBsB,EAAI,EACJP,EAAIG,EAAMlB,MAEX,OAAYqB,EAAJC,EACPJ,EAAOH,KAAQ4D,EAAQrD,IAKxB,IAAKD,IAAQA,EACZ,MAAsBiB,SAAdqC,EAAOrD,GACdJ,EAAOH,KAAQ4D,EAAQrD,IAMzB,OAFAJ,GAAMlB,OAASe,EAERG,GAGR0D,KAAM,SAAUtE,EAAOK,EAAUkE,GAShC,IARA,GAAIC,GACHC,KACAhE,EAAI,EACJf,EAASM,EAAMN,OACfgF,GAAkBH,EAIP7E,EAAJe,EAAYA,IACnB+D,GAAmBnE,EAAUL,EAAOS,GAAKA,GACpC+D,IAAoBE,GACxBD,EAAQtG,KAAM6B,EAAOS,GAIvB,OAAOgE,IAIRlE,IAAK,SAAUP,EAAOK,EAAUsE,GAC/B,GAAIf,GACHnD,EAAI,EACJf,EAASM,EAAMN,OACfqC,EAAU8B,EAAa7D,GACvBC,IAGD,IAAK8B,EACJ,KAAYrC,EAAJe,EAAYA,IACnBmD,EAAQvD,EAAUL,EAAOS,GAAKA,EAAGkE,GAEnB,MAATf,GACJ3D,EAAI9B,KAAMyF,OAMZ,KAAMnD,IAAKT,GACV4D,EAAQvD,EAAUL,EAAOS,GAAKA,EAAGkE,GAEnB,MAATf,GACJ3D,EAAI9B,KAAMyF,EAMb,OAAO1F,GAAOwC,SAAWT,IAI1B2E,KAAM,EAINC,MAAO,SAAU/F,EAAID,GACpB,GAAIyB,GAAMuE,EAAOC,CAUjB,OARwB,gBAAZjG,KACXiG,EAAMhG,EAAID,GACVA,EAAUC,EACVA,EAAKgG,GAKAnG,EAAOkD,WAAY/C,IAKzBwB,EAAOrC,EAAM2B,KAAMe,UAAW,GAC9BkE,EAAQ,WACP,MAAO/F,GAAG4B,MAAO7B,GAAWf,KAAMwC,EAAKpC,OAAQD,EAAM2B,KAAMe,cAI5DkE,EAAMD,KAAO9F,EAAG8F,KAAO9F,EAAG8F,MAAQjG,EAAOiG,OAElCC,GAZC7C,QAeT+C,IAAK,WACJ,OAAQ,GAAMC,OAKfvG,QAASA,IAIVE,EAAOyB,KAAK,gEAAgE6E,MAAM,KAAM,SAASxE,EAAGe,GACnGnD,EAAY,WAAamD,EAAO,KAAQA,EAAKmC,eAG9C,SAASE,GAAapB,GACrB,GAAI/C,GAAS+C,EAAI/C,OAChBgD,EAAO/D,EAAO+D,KAAMD,EAErB,OAAc,aAATC,GAAuB/D,EAAOiE,SAAUH,IACrC,EAGc,IAAjBA,EAAIQ,UAAkBvD,GACnB,EAGQ,UAATgD,GAA+B,IAAXhD,GACR,gBAAXA,IAAuBA,EAAS,GAAOA,EAAS,IAAO+C,GAEhE,GAAIyC,GAWJ,SAAWrH,GAEX,GAAI4C,GACHhC,EACA0G,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAGAC,EACAlI,EACAmI,EACAC,EACAC,EACAC,EACAvB,EACAwB,EAGAhE,EAAU,SAAW,EAAI,GAAI+C,MAC7BkB,EAAerI,EAAOH,SACtByI,EAAU,EACVC,EAAO,EACPC,EAAaC,KACbC,EAAaD,KACbE,EAAgBF,KAChBG,EAAY,SAAUC,EAAGC,GAIxB,MAHKD,KAAMC,IACVhB,GAAe,GAET,GAIRiB,EAAe,GAAK,GAGpBrI,KAAcC,eACdwF,KACA6C,EAAM7C,EAAI6C,IACVC,EAAc9C,EAAI7F,KAClBA,EAAO6F,EAAI7F,KACXF,EAAQ+F,EAAI/F,MAGZG,EAAU,SAAU2I,EAAMvG,GAGzB,IAFA,GAAIC,GAAI,EACPM,EAAMgG,EAAKrH,OACAqB,EAAJN,EAASA,IAChB,GAAKsG,EAAKtG,KAAOD,EAChB,MAAOC,EAGT,OAAO,IAGRuG,EAAW,6HAKXC,EAAa,sBAEbC,EAAoB,mCAKpBC,EAAaD,EAAkB9E,QAAS,IAAK,MAG7CgF,EAAa,MAAQH,EAAa,KAAOC,EAAoB,OAASD,EAErE,gBAAkBA,EAElB,2DAA6DE,EAAa,OAASF,EACnF,OAEDI,EAAU,KAAOH,EAAoB,wFAKPE,EAAa,eAM3CE,EAAc,GAAIC,QAAQN,EAAa,IAAK,KAC5CjI,EAAQ,GAAIuI,QAAQ,IAAMN,EAAa,8BAAgCA,EAAa,KAAM,KAE1FO,EAAS,GAAID,QAAQ,IAAMN,EAAa,KAAOA,EAAa,KAC5DQ,EAAe,GAAIF,QAAQ,IAAMN,EAAa,WAAaA,EAAa,IAAMA,EAAa,KAE3FS,EAAmB,GAAIH,QAAQ,IAAMN,EAAa,iBAAmBA,EAAa,OAAQ,KAE1FU,EAAU,GAAIJ,QAAQF,GACtBO,EAAc,GAAIL,QAAQ,IAAMJ,EAAa,KAE7CU,GACCC,GAAM,GAAIP,QAAQ,MAAQL,EAAoB,KAC9Ca,MAAS,GAAIR,QAAQ,QAAUL,EAAoB,KACnDc,IAAO,GAAIT,QAAQ,KAAOL,EAAkB9E,QAAS,IAAK,MAAS,KACnE6F,KAAQ,GAAIV,QAAQ,IAAMH,GAC1Bc,OAAU,GAAIX,QAAQ,IAAMF,GAC5Bc,MAAS,GAAIZ,QAAQ,yDAA2DN,EAC/E,+BAAiCA,EAAa,cAAgBA,EAC9D,aAAeA,EAAa,SAAU,KACvCmB,KAAQ,GAAIb,QAAQ,OAASP,EAAW,KAAM,KAG9CqB,aAAgB,GAAId,QAAQ,IAAMN,EAAa,mDAC9CA,EAAa,mBAAqBA,EAAa,mBAAoB,MAGrEqB,EAAU,sCACVC,EAAU,SAEVC,EAAU,yBAGVC,EAAa,mCAEbC,GAAW,OACXC,GAAU,QAGVC,GAAY,GAAIrB,QAAQ,qBAAuBN,EAAa,MAAQA,EAAa,OAAQ,MACzF4B,GAAY,SAAUC,EAAGC,EAASC,GACjC,GAAIC,GAAO,KAAOF,EAAU,KAI5B,OAAOE,KAASA,GAAQD,EACvBD,EACO,EAAPE,EAECC,OAAOC,aAAcF,EAAO,OAE5BC,OAAOC,aAAcF,GAAQ,GAAK,MAAe,KAAPA,EAAe,QAO5DG,GAAgB,WACfxD,IAIF,KACCzH,EAAKuC,MACHsD,EAAM/F,EAAM2B,KAAMsG,EAAamD,YAChCnD,EAAamD,YAIdrF,EAAKkC,EAAamD,WAAW3J,QAASuD,SACrC,MAAQC,IACT/E,GAASuC,MAAOsD,EAAItE,OAGnB,SAAUiC,EAAQ2H,GACjBxC,EAAYpG,MAAOiB,EAAQ1D,EAAM2B,KAAK0J,KAKvC,SAAU3H,EAAQ2H,GACjB,GAAItI,GAAIW,EAAOjC,OACde,EAAI,CAEL,OAASkB,EAAOX,KAAOsI,EAAI7I,MAC3BkB,EAAOjC,OAASsB,EAAI,IAKvB,QAASkE,IAAQtG,EAAUC,EAASoF,EAASsF,GAC5C,GAAIC,GAAOhJ,EAAMiJ,EAAGxG,EAEnBxC,EAAGiJ,EAAQC,EAAKC,EAAKC,EAAYC,CAUlC,KAROjL,EAAUA,EAAQkL,eAAiBlL,EAAUqH,KAAmBxI,GACtEkI,EAAa/G,GAGdA,EAAUA,GAAWnB,EACrBuG,EAAUA,MACVhB,EAAWpE,EAAQoE,SAEM,gBAAbrE,KAA0BA,GACxB,IAAbqE,GAA+B,IAAbA,GAA+B,KAAbA,EAEpC,MAAOgB,EAGR,KAAMsF,GAAQzD,EAAiB,CAG9B,GAAkB,KAAb7C,IAAoBuG,EAAQf,EAAWuB,KAAMpL,IAEjD,GAAM6K,EAAID,EAAM,IACf,GAAkB,IAAbvG,EAAiB,CAIrB,GAHAzC,EAAO3B,EAAQoL,eAAgBR,IAG1BjJ,IAAQA,EAAK0J,WAQjB,MAAOjG,EALP,IAAKzD,EAAK2J,KAAOV,EAEhB,MADAxF,GAAQ9F,KAAMqC,GACPyD,MAOT,IAAKpF,EAAQkL,gBAAkBvJ,EAAO3B,EAAQkL,cAAcE,eAAgBR,KAC3ExD,EAAUpH,EAAS2B,IAAUA,EAAK2J,KAAOV,EAEzC,MADAxF,GAAQ9F,KAAMqC,GACPyD,MAKH,CAAA,GAAKuF,EAAM,GAEjB,MADArL,GAAKuC,MAAOuD,EAASpF,EAAQuL,qBAAsBxL,IAC5CqF,CAGD,KAAMwF,EAAID,EAAM,KAAO/K,EAAQ4L,uBAErC,MADAlM,GAAKuC,MAAOuD,EAASpF,EAAQwL,uBAAwBZ,IAC9CxF,EAKT,GAAKxF,EAAQ6L,OAASvE,IAAcA,EAAUwE,KAAM3L,IAAc,CASjE,GARAgL,EAAMD,EAAM1H,EACZ4H,EAAahL,EACbiL,EAA2B,IAAb7G,GAAkBrE,EAMd,IAAbqE,GAAqD,WAAnCpE,EAAQ6E,SAASC,cAA6B,CACpE+F,EAASpE,EAAU1G,IAEb+K,EAAM9K,EAAQ2L,aAAa,OAChCZ,EAAMD,EAAIvH,QAASuG,GAAS,QAE5B9J,EAAQ4L,aAAc,KAAMb,GAE7BA,EAAM,QAAUA,EAAM,MAEtBnJ,EAAIiJ,EAAOhK,MACX,OAAQe,IACPiJ,EAAOjJ,GAAKmJ,EAAMc,GAAYhB,EAAOjJ,GAEtCoJ,GAAanB,GAAS6B,KAAM3L,IAAc+L,GAAa9L,EAAQqL,aAAgBrL,EAC/EiL,EAAcJ,EAAOkB,KAAK,KAG3B,GAAKd,EACJ,IAIC,MAHA3L,GAAKuC,MAAOuD,EACX4F,EAAWgB,iBAAkBf,IAEvB7F,EACN,MAAM6G,IACN,QACKnB,GACL9K,EAAQkM,gBAAgB,QAQ7B,MAAOvF,GAAQ5G,EAASwD,QAASpD,EAAO,MAAQH,EAASoF,EAASsF,GASnE,QAASjD,MACR,GAAI0E,KAEJ,SAASC,GAAOjI,EAAKY,GAMpB,MAJKoH,GAAK7M,KAAM6E,EAAM,KAAQmC,EAAK+F,mBAE3BD,GAAOD,EAAKG,SAEZF,EAAOjI,EAAM,KAAQY,EAE9B,MAAOqH,GAOR,QAASG,IAActM,GAEtB,MADAA,GAAImD,IAAY,EACTnD,EAOR,QAASuM,IAAQvM,GAChB,GAAIwM,GAAM5N,EAAS6N,cAAc,MAEjC,KACC,QAASzM,EAAIwM,GACZ,MAAOpI,GACR,OAAO,EACN,QAEIoI,EAAIpB,YACRoB,EAAIpB,WAAWsB,YAAaF,GAG7BA,EAAM,MASR,QAASG,IAAWC,EAAOC,GAC1B,GAAI3H,GAAM0H,EAAMzG,MAAM,KACrBxE,EAAIiL,EAAMhM,MAEX,OAAQe,IACP0E,EAAKyG,WAAY5H,EAAIvD,IAAOkL,EAU9B,QAASE,IAAcnF,EAAGC,GACzB,GAAImF,GAAMnF,GAAKD,EACdqF,EAAOD,GAAsB,IAAfpF,EAAEzD,UAAiC,IAAf0D,EAAE1D,YAChC0D,EAAEqF,aAAepF,KACjBF,EAAEsF,aAAepF,EAGtB,IAAKmF,EACJ,MAAOA,EAIR,IAAKD,EACJ,MAASA,EAAMA,EAAIG,YAClB,GAAKH,IAAQnF,EACZ,MAAO,EAKV,OAAOD,GAAI,EAAI,GAOhB,QAASwF,IAAmBxJ,GAC3B,MAAO,UAAUlC,GAChB,GAAIgB,GAAOhB,EAAKkD,SAASC,aACzB,OAAgB,UAATnC,GAAoBhB,EAAKkC,OAASA,GAQ3C,QAASyJ,IAAoBzJ,GAC5B,MAAO,UAAUlC,GAChB,GAAIgB,GAAOhB,EAAKkD,SAASC,aACzB,QAAiB,UAATnC,GAA6B,WAATA,IAAsBhB,EAAKkC,OAASA,GAQlE,QAAS0J,IAAwBtN,GAChC,MAAOsM,IAAa,SAAUiB,GAE7B,MADAA,IAAYA,EACLjB,GAAa,SAAU7B,EAAM9E,GACnC,GAAIzD,GACHsL,EAAexN,KAAQyK,EAAK7J,OAAQ2M,GACpC5L,EAAI6L,EAAa5M,MAGlB,OAAQe,IACF8I,EAAOvI,EAAIsL,EAAa7L,MAC5B8I,EAAKvI,KAAOyD,EAAQzD,GAAKuI,EAAKvI,SAYnC,QAAS2J,IAAa9L,GACrB,MAAOA,IAAmD,mBAAjCA,GAAQuL,sBAAwCvL,EAI1EJ,EAAUyG,GAAOzG,WAOjB4G,EAAQH,GAAOG,MAAQ,SAAU7E,GAGhC,GAAI+L,GAAkB/L,IAASA,EAAKuJ,eAAiBvJ,GAAM+L,eAC3D,OAAOA,GAA+C,SAA7BA,EAAgB7I,UAAsB,GAQhEkC,EAAcV,GAAOU,YAAc,SAAU4G,GAC5C,GAAIC,GAAYC,EACfC,EAAMH,EAAOA,EAAKzC,eAAiByC,EAAOtG,CAG3C,OAAKyG,KAAQjP,GAA6B,IAAjBiP,EAAI1J,UAAmB0J,EAAIJ,iBAKpD7O,EAAWiP,EACX9G,EAAU8G,EAAIJ,gBACdG,EAASC,EAAIC,YAMRF,GAAUA,IAAWA,EAAOG,MAE3BH,EAAOI,iBACXJ,EAAOI,iBAAkB,SAAU1D,IAAe,GACvCsD,EAAOK,aAClBL,EAAOK,YAAa,WAAY3D,KAMlCtD,GAAkBT,EAAOsH,GAQzBlO,EAAQ2I,WAAaiE,GAAO,SAAUC,GAErC,MADAA,GAAI0B,UAAY,KACR1B,EAAId,aAAa,eAO1B/L,EAAQ2L,qBAAuBiB,GAAO,SAAUC,GAE/C,MADAA,GAAI2B,YAAaN,EAAIO,cAAc,MAC3B5B,EAAIlB,qBAAqB,KAAK1K,SAIvCjB,EAAQ4L,uBAAyB7B,EAAQ+B,KAAMoC,EAAItC,wBAMnD5L,EAAQ0O,QAAU9B,GAAO,SAAUC,GAElC,MADAzF,GAAQoH,YAAa3B,GAAMnB,GAAKlI,GACxB0K,EAAIS,oBAAsBT,EAAIS,kBAAmBnL,GAAUvC,SAI/DjB,EAAQ0O,SACZhI,EAAKkI,KAAS,GAAI,SAAUlD,EAAItL,GAC/B,GAAuC,mBAA3BA,GAAQoL,gBAAkCnE,EAAiB,CACtE,GAAI2D,GAAI5K,EAAQoL,eAAgBE,EAGhC,OAAOV,IAAKA,EAAES,YAAeT,QAG/BtE,EAAKmI,OAAW,GAAI,SAAUnD,GAC7B,GAAIoD,GAASpD,EAAG/H,QAASwG,GAAWC,GACpC,OAAO,UAAUrI,GAChB,MAAOA,GAAKgK,aAAa,QAAU+C,YAM9BpI,GAAKkI,KAAS,GAErBlI,EAAKmI,OAAW,GAAK,SAAUnD,GAC9B,GAAIoD,GAASpD,EAAG/H,QAASwG,GAAWC,GACpC,OAAO,UAAUrI,GAChB,GAAIgM,GAAwC,mBAA1BhM,GAAKgN,kBAAoChN,EAAKgN,iBAAiB,KACjF,OAAOhB,IAAQA,EAAK5I,QAAU2J,KAMjCpI,EAAKkI,KAAU,IAAI5O,EAAQ2L,qBAC1B,SAAUqD,EAAK5O,GACd,MAA6C,mBAAjCA,GAAQuL,qBACZvL,EAAQuL,qBAAsBqD,GAG1BhP,EAAQ6L,IACZzL,EAAQgM,iBAAkB4C,GAD3B,QAKR,SAAUA,EAAK5O,GACd,GAAI2B,GACHsE,KACArE,EAAI,EAEJwD,EAAUpF,EAAQuL,qBAAsBqD,EAGzC,IAAa,MAARA,EAAc,CAClB,MAASjN,EAAOyD,EAAQxD,KACA,IAAlBD,EAAKyC,UACT6B,EAAI3G,KAAMqC,EAIZ,OAAOsE,GAER,MAAOb,IAITkB,EAAKkI,KAAY,MAAI5O,EAAQ4L,wBAA0B,SAAU2C,EAAWnO,GAC3E,MAAKiH,GACGjH,EAAQwL,uBAAwB2C,GADxC,QAWDhH,KAOAD,MAEMtH,EAAQ6L,IAAM9B,EAAQ+B,KAAMoC,EAAI9B,qBAGrCQ,GAAO,SAAUC,GAMhBzF,EAAQoH,YAAa3B,GAAMoC,UAAY,UAAYzL,EAAU,qBAC3CA,EAAU,iEAOvBqJ,EAAIT,iBAAiB,wBAAwBnL,QACjDqG,EAAU5H,KAAM,SAAW8I,EAAa,gBAKnCqE,EAAIT,iBAAiB,cAAcnL,QACxCqG,EAAU5H,KAAM,MAAQ8I,EAAa,aAAeD,EAAW,KAI1DsE,EAAIT,iBAAkB,QAAU5I,EAAU,MAAOvC,QACtDqG,EAAU5H,KAAK,MAMVmN,EAAIT,iBAAiB,YAAYnL,QACtCqG,EAAU5H,KAAK,YAMVmN,EAAIT,iBAAkB,KAAO5I,EAAU,MAAOvC,QACnDqG,EAAU5H,KAAK,cAIjBkN,GAAO,SAAUC,GAGhB,GAAIqC,GAAQhB,EAAIpB,cAAc,QAC9BoC,GAAMlD,aAAc,OAAQ,UAC5Ba,EAAI2B,YAAaU,GAAQlD,aAAc,OAAQ,KAI1Ca,EAAIT,iBAAiB,YAAYnL,QACrCqG,EAAU5H,KAAM,OAAS8I,EAAa,eAKjCqE,EAAIT,iBAAiB,YAAYnL,QACtCqG,EAAU5H,KAAM,WAAY,aAI7BmN,EAAIT,iBAAiB,QACrB9E,EAAU5H,KAAK,YAIXM,EAAQmP,gBAAkBpF,EAAQ+B,KAAO9F,EAAUoB,EAAQpB,SAChEoB,EAAQgI,uBACRhI,EAAQiI,oBACRjI,EAAQkI,kBACRlI,EAAQmI,qBAER3C,GAAO,SAAUC,GAGhB7M,EAAQwP,kBAAoBxJ,EAAQ7E,KAAM0L,EAAK,OAI/C7G,EAAQ7E,KAAM0L,EAAK,aACnBtF,EAAc7H,KAAM,KAAMkJ,KAI5BtB,EAAYA,EAAUrG,QAAU,GAAI6H,QAAQxB,EAAU6E,KAAK,MAC3D5E,EAAgBA,EAActG,QAAU,GAAI6H,QAAQvB,EAAc4E,KAAK,MAIvE6B,EAAajE,EAAQ+B,KAAM1E,EAAQqI,yBAKnCjI,EAAWwG,GAAcjE,EAAQ+B,KAAM1E,EAAQI,UAC9C,SAAUS,EAAGC,GACZ,GAAIwH,GAAuB,IAAfzH,EAAEzD,SAAiByD,EAAE6F,gBAAkB7F,EAClD0H,EAAMzH,GAAKA,EAAEuD,UACd,OAAOxD,KAAM0H,MAAWA,GAAwB,IAAjBA,EAAInL,YAClCkL,EAAMlI,SACLkI,EAAMlI,SAAUmI,GAChB1H,EAAEwH,yBAA8D,GAAnCxH,EAAEwH,wBAAyBE,MAG3D,SAAU1H,EAAGC,GACZ,GAAKA,EACJ,MAASA,EAAIA,EAAEuD,WACd,GAAKvD,IAAMD,EACV,OAAO,CAIV,QAAO,GAOTD,EAAYgG,EACZ,SAAU/F,EAAGC,GAGZ,GAAKD,IAAMC,EAEV,MADAhB,IAAe,EACR,CAIR,IAAI0I,IAAW3H,EAAEwH,yBAA2BvH,EAAEuH,uBAC9C,OAAKG,GACGA,GAIRA,GAAY3H,EAAEqD,eAAiBrD,MAAUC,EAAEoD,eAAiBpD,GAC3DD,EAAEwH,wBAAyBvH,GAG3B,EAGc,EAAV0H,IACF5P,EAAQ6P,cAAgB3H,EAAEuH,wBAAyBxH,KAAQ2H,EAGxD3H,IAAMiG,GAAOjG,EAAEqD,gBAAkB7D,GAAgBD,EAASC,EAAcQ,GACrE,GAEHC,IAAMgG,GAAOhG,EAAEoD,gBAAkB7D,GAAgBD,EAASC,EAAcS,GACrE,EAIDjB,EACJtH,EAASsH,EAAWgB,GAAMtI,EAASsH,EAAWiB,GAChD,EAGe,EAAV0H,EAAc,GAAK,IAE3B,SAAU3H,EAAGC,GAEZ,GAAKD,IAAMC,EAEV,MADAhB,IAAe,EACR,CAGR,IAAImG,GACHrL,EAAI,EACJ8N,EAAM7H,EAAEwD,WACRkE,EAAMzH,EAAEuD,WACRsE,GAAO9H,GACP+H,GAAO9H,EAGR,KAAM4H,IAAQH,EACb,MAAO1H,KAAMiG,EAAM,GAClBhG,IAAMgG,EAAM,EACZ4B,EAAM,GACNH,EAAM,EACN1I,EACEtH,EAASsH,EAAWgB,GAAMtI,EAASsH,EAAWiB,GAChD,CAGK,IAAK4H,IAAQH,EACnB,MAAOvC,IAAcnF,EAAGC,EAIzBmF,GAAMpF,CACN,OAASoF,EAAMA,EAAI5B,WAClBsE,EAAGE,QAAS5C,EAEbA,GAAMnF,CACN,OAASmF,EAAMA,EAAI5B,WAClBuE,EAAGC,QAAS5C,EAIb,OAAQ0C,EAAG/N,KAAOgO,EAAGhO,GACpBA,GAGD,OAAOA,GAENoL,GAAc2C,EAAG/N,GAAIgO,EAAGhO,IAGxB+N,EAAG/N,KAAOyF,EAAe,GACzBuI,EAAGhO,KAAOyF,EAAe,EACzB,GAGKyG,GA1WCjP,GA6WTwH,GAAOT,QAAU,SAAUkK,EAAMC,GAChC,MAAO1J,IAAQyJ,EAAM,KAAM,KAAMC,IAGlC1J,GAAO0I,gBAAkB,SAAUpN,EAAMmO,GASxC,IAPOnO,EAAKuJ,eAAiBvJ,KAAW9C,GACvCkI,EAAapF,GAIdmO,EAAOA,EAAKvM,QAASsF,EAAkB,aAElCjJ,EAAQmP,kBAAmB9H,GAC5BE,GAAkBA,EAAcuE,KAAMoE,IACtC5I,GAAkBA,EAAUwE,KAAMoE,IAErC,IACC,GAAI1O,GAAMwE,EAAQ7E,KAAMY,EAAMmO,EAG9B,IAAK1O,GAAOxB,EAAQwP,mBAGlBzN,EAAK9C,UAAuC,KAA3B8C,EAAK9C,SAASuF,SAChC,MAAOhD,GAEP,MAAOiD,IAGV,MAAOgC,IAAQyJ,EAAMjR,EAAU,MAAQ8C,IAASd,OAAS,GAG1DwF,GAAOe,SAAW,SAAUpH,EAAS2B,GAKpC,OAHO3B,EAAQkL,eAAiBlL,KAAcnB,GAC7CkI,EAAa/G,GAEPoH,EAAUpH,EAAS2B,IAG3B0E,GAAO2J,KAAO,SAAUrO,EAAMgB,IAEtBhB,EAAKuJ,eAAiBvJ,KAAW9C,GACvCkI,EAAapF,EAGd,IAAI1B,GAAKqG,EAAKyG,WAAYpK,EAAKmC,eAE9BmL,EAAMhQ,GAAMP,EAAOqB,KAAMuF,EAAKyG,WAAYpK,EAAKmC,eAC9C7E,EAAI0B,EAAMgB,GAAOsE,GACjB9D,MAEF,OAAeA,UAAR8M,EACNA,EACArQ,EAAQ2I,aAAetB,EACtBtF,EAAKgK,aAAchJ,IAClBsN,EAAMtO,EAAKgN,iBAAiBhM,KAAUsN,EAAIC,UAC1CD,EAAIlL,MACJ,MAGJsB,GAAO5C,MAAQ,SAAUC,GACxB,KAAM,IAAI3E,OAAO,0CAA4C2E,IAO9D2C,GAAO8J,WAAa,SAAU/K,GAC7B,GAAIzD,GACHyO,KACAjO,EAAI,EACJP,EAAI,CAOL,IAJAkF,GAAgBlH,EAAQyQ,iBACxBxJ,GAAajH,EAAQ0Q,YAAclL,EAAQhG,MAAO,GAClDgG,EAAQ/C,KAAMuF,GAETd,EAAe,CACnB,MAASnF,EAAOyD,EAAQxD,KAClBD,IAASyD,EAASxD,KACtBO,EAAIiO,EAAW9Q,KAAMsC,GAGvB,OAAQO,IACPiD,EAAQ9C,OAAQ8N,EAAYjO,GAAK,GAQnC,MAFA0E,GAAY,KAELzB,GAORmB,EAAUF,GAAOE,QAAU,SAAU5E,GACpC,GAAIgM,GACHvM,EAAM,GACNQ,EAAI,EACJwC,EAAWzC,EAAKyC,QAEjB,IAAMA,GAMC,GAAkB,IAAbA,GAA+B,IAAbA,GAA+B,KAAbA,EAAkB,CAGjE,GAAiC,gBAArBzC,GAAK4O,YAChB,MAAO5O,GAAK4O,WAGZ,KAAM5O,EAAOA,EAAK6O,WAAY7O,EAAMA,EAAOA,EAAKyL,YAC/ChM,GAAOmF,EAAS5E,OAGZ,IAAkB,IAAbyC,GAA+B,IAAbA,EAC7B,MAAOzC,GAAK8O,cAhBZ,OAAS9C,EAAOhM,EAAKC,KAEpBR,GAAOmF,EAASoH,EAkBlB,OAAOvM,IAGRkF,EAAOD,GAAOqK,WAGbrE,YAAa,GAEbsE,aAAcpE,GAEd5B,MAAO3B,EAEP+D,cAEAyB,QAEAoC,UACCC,KAAOC,IAAK,aAAc/O,OAAO,GACjCgP,KAAOD,IAAK,cACZE,KAAOF,IAAK,kBAAmB/O,OAAO,GACtCkP,KAAOH,IAAK,oBAGbI,WACC9H,KAAQ,SAAUuB,GAUjB,MATAA,GAAM,GAAKA,EAAM,GAAGpH,QAASwG,GAAWC,IAGxCW,EAAM,IAAOA,EAAM,IAAMA,EAAM,IAAMA,EAAM,IAAM,IAAKpH,QAASwG,GAAWC,IAExD,OAAbW,EAAM,KACVA,EAAM,GAAK,IAAMA,EAAM,GAAK,KAGtBA,EAAMvL,MAAO,EAAG,IAGxBkK,MAAS,SAAUqB,GA6BlB,MAlBAA,GAAM,GAAKA,EAAM,GAAG7F,cAEY,QAA3B6F,EAAM,GAAGvL,MAAO,EAAG,IAEjBuL,EAAM,IACXtE,GAAO5C,MAAOkH,EAAM,IAKrBA,EAAM,KAAQA,EAAM,GAAKA,EAAM,IAAMA,EAAM,IAAM,GAAK,GAAmB,SAAbA,EAAM,IAA8B,QAAbA,EAAM,KACzFA,EAAM,KAAUA,EAAM,GAAKA,EAAM,IAAqB,QAAbA,EAAM,KAGpCA,EAAM,IACjBtE,GAAO5C,MAAOkH,EAAM,IAGdA,GAGRtB,OAAU,SAAUsB,GACnB,GAAIwG,GACHC,GAAYzG,EAAM,IAAMA,EAAM,EAE/B,OAAK3B,GAAiB,MAAE0C,KAAMf,EAAM,IAC5B,MAIHA,EAAM,GACVA,EAAM,GAAKA,EAAM,IAAMA,EAAM,IAAM,GAGxByG,GAAYtI,EAAQ4C,KAAM0F,KAEpCD,EAAS1K,EAAU2K,GAAU,MAE7BD,EAASC,EAAS7R,QAAS,IAAK6R,EAASvQ,OAASsQ,GAAWC,EAASvQ,UAGvE8J,EAAM,GAAKA,EAAM,GAAGvL,MAAO,EAAG+R,GAC9BxG,EAAM,GAAKyG,EAAShS,MAAO,EAAG+R,IAIxBxG,EAAMvL,MAAO,EAAG,MAIzBqP,QAECtF,IAAO,SAAUkI,GAChB,GAAIxM,GAAWwM,EAAiB9N,QAASwG,GAAWC,IAAYlF,aAChE,OAA4B,MAArBuM,EACN,WAAa,OAAO,GACpB,SAAU1P,GACT,MAAOA,GAAKkD,UAAYlD,EAAKkD,SAASC,gBAAkBD,IAI3DqE,MAAS,SAAUiF,GAClB,GAAImD,GAAU9J,EAAY2G,EAAY,IAEtC,OAAOmD,KACLA,EAAU,GAAI5I,QAAQ,MAAQN,EAAa,IAAM+F,EAAY,IAAM/F,EAAa,SACjFZ,EAAY2G,EAAW,SAAUxM,GAChC,MAAO2P,GAAQ5F,KAAgC,gBAAnB/J,GAAKwM,WAA0BxM,EAAKwM,WAA0C,mBAAtBxM,GAAKgK,cAAgChK,EAAKgK,aAAa,UAAY,OAI1JvC,KAAQ,SAAUzG,EAAM4O,EAAUC,GACjC,MAAO,UAAU7P,GAChB,GAAI8P,GAASpL,GAAO2J,KAAMrO,EAAMgB,EAEhC,OAAe,OAAV8O,EACgB,OAAbF,EAEFA,GAINE,GAAU,GAEU,MAAbF,EAAmBE,IAAWD,EACvB,OAAbD,EAAoBE,IAAWD,EAClB,OAAbD,EAAoBC,GAAqC,IAA5BC,EAAOlS,QAASiS,GAChC,OAAbD,EAAoBC,GAASC,EAAOlS,QAASiS,GAAU,GAC1C,OAAbD,EAAoBC,GAASC,EAAOrS,OAAQoS,EAAM3Q,UAAa2Q,EAClD,OAAbD,GAAsB,IAAME,EAAOlO,QAASkF,EAAa,KAAQ,KAAMlJ,QAASiS,GAAU,GAC7E,OAAbD,EAAoBE,IAAWD,GAASC,EAAOrS,MAAO,EAAGoS,EAAM3Q,OAAS,KAAQ2Q,EAAQ,KACxF,IAZO,IAgBVlI,MAAS,SAAUzF,EAAM6N,EAAMlE,EAAUzL,EAAOE,GAC/C,GAAI0P,GAAgC,QAAvB9N,EAAKzE,MAAO,EAAG,GAC3BwS,EAA+B,SAArB/N,EAAKzE,MAAO,IACtByS,EAAkB,YAATH,CAEV,OAAiB,KAAV3P,GAAwB,IAATE,EAGrB,SAAUN,GACT,QAASA,EAAK0J,YAGf,SAAU1J,EAAM3B,EAAS8R,GACxB,GAAI1F,GAAO2F,EAAYpE,EAAMT,EAAM8E,EAAWC,EAC7CnB,EAAMa,IAAWC,EAAU,cAAgB,kBAC3C/D,EAASlM,EAAK0J,WACd1I,EAAOkP,GAAUlQ,EAAKkD,SAASC,cAC/BoN,GAAYJ,IAAQD,CAErB,IAAKhE,EAAS,CAGb,GAAK8D,EAAS,CACb,MAAQb,EAAM,CACbnD,EAAOhM,CACP,OAASgM,EAAOA,EAAMmD,GACrB,GAAKe,EAASlE,EAAK9I,SAASC,gBAAkBnC,EAAyB,IAAlBgL,EAAKvJ,SACzD,OAAO,CAIT6N,GAAQnB,EAAe,SAATjN,IAAoBoO,GAAS,cAE5C,OAAO,EAMR,GAHAA,GAAUL,EAAU/D,EAAO2C,WAAa3C,EAAOsE,WAG1CP,GAAWM,EAAW,CAE1BH,EAAalE,EAAQzK,KAAcyK,EAAQzK,OAC3CgJ,EAAQ2F,EAAYlO,OACpBmO,EAAY5F,EAAM,KAAO9E,GAAW8E,EAAM,GAC1Cc,EAAOd,EAAM,KAAO9E,GAAW8E,EAAM,GACrCuB,EAAOqE,GAAanE,EAAOrD,WAAYwH,EAEvC,OAASrE,IAASqE,GAAarE,GAAQA,EAAMmD,KAG3C5D,EAAO8E,EAAY,IAAMC,EAAMjK,MAGhC,GAAuB,IAAlB2F,EAAKvJ,YAAoB8I,GAAQS,IAAShM,EAAO,CACrDoQ,EAAYlO,IAAWyD,EAAS0K,EAAW9E,EAC3C,YAKI,IAAKgF,IAAa9F,GAASzK,EAAMyB,KAAczB,EAAMyB,QAAkBS,KAAWuI,EAAM,KAAO9E,EACrG4F,EAAOd,EAAM,OAKb,OAASuB,IAASqE,GAAarE,GAAQA,EAAMmD,KAC3C5D,EAAO8E,EAAY,IAAMC,EAAMjK,MAEhC,IAAO6J,EAASlE,EAAK9I,SAASC,gBAAkBnC,EAAyB,IAAlBgL,EAAKvJ,aAAsB8I,IAE5EgF,KACHvE,EAAMvK,KAAcuK,EAAMvK,QAAkBS,IAAWyD,EAAS4F,IAG7DS,IAAShM,GACb,KAQJ,OADAuL,IAAQjL,EACDiL,IAASnL,GAAWmL,EAAOnL,IAAU,GAAKmL,EAAOnL,GAAS,KAKrEsH,OAAU,SAAU+I,EAAQ5E,GAK3B,GAAI/L,GACHxB,EAAKqG,EAAKkC,QAAS4J,IAAY9L,EAAK+L,WAAYD,EAAOtN,gBACtDuB,GAAO5C,MAAO,uBAAyB2O,EAKzC,OAAKnS,GAAImD,GACDnD,EAAIuN,GAIPvN,EAAGY,OAAS,GAChBY,GAAS2Q,EAAQA,EAAQ,GAAI5E,GACtBlH,EAAK+L,WAAW1S,eAAgByS,EAAOtN,eAC7CyH,GAAa,SAAU7B,EAAM9E,GAC5B,GAAI0M,GACHC,EAAUtS,EAAIyK,EAAM8C,GACpB5L,EAAI2Q,EAAQ1R,MACb,OAAQe,IACP0Q,EAAM/S,EAASmL,EAAM6H,EAAQ3Q,IAC7B8I,EAAM4H,KAAW1M,EAAS0M,GAAQC,EAAQ3Q,MAG5C,SAAUD,GACT,MAAO1B,GAAI0B,EAAM,EAAGF,KAIhBxB,IAITuI,SAECgK,IAAOjG,GAAa,SAAUxM,GAI7B,GAAI+O,MACH1J,KACAqN,EAAU/L,EAAS3G,EAASwD,QAASpD,EAAO,MAE7C,OAAOsS,GAASrP,GACfmJ,GAAa,SAAU7B,EAAM9E,EAAS5F,EAAS8R,GAC9C,GAAInQ,GACH+Q,EAAYD,EAAS/H,EAAM,KAAMoH,MACjClQ,EAAI8I,EAAK7J,MAGV,OAAQe,KACDD,EAAO+Q,EAAU9Q,MACtB8I,EAAK9I,KAAOgE,EAAQhE,GAAKD,MAI5B,SAAUA,EAAM3B,EAAS8R,GAKxB,MAJAhD,GAAM,GAAKnN,EACX8Q,EAAS3D,EAAO,KAAMgD,EAAK1M,GAE3B0J,EAAM,GAAK,MACH1J,EAAQ4C,SAInB2K,IAAOpG,GAAa,SAAUxM,GAC7B,MAAO,UAAU4B,GAChB,MAAO0E,IAAQtG,EAAU4B,GAAOd,OAAS,KAI3CuG,SAAYmF,GAAa,SAAUtH,GAElC,MADAA,GAAOA,EAAK1B,QAASwG,GAAWC,IACzB,SAAUrI,GAChB,OAASA,EAAK4O,aAAe5O,EAAKiR,WAAarM,EAAS5E,IAASpC,QAAS0F,GAAS,MAWrF4N,KAAQtG,GAAc,SAAUsG,GAM/B,MAJM9J,GAAY2C,KAAKmH,GAAQ,KAC9BxM,GAAO5C,MAAO,qBAAuBoP,GAEtCA,EAAOA,EAAKtP,QAASwG,GAAWC,IAAYlF,cACrC,SAAUnD,GAChB,GAAImR,EACJ,GACC,IAAMA,EAAW7L,EAChBtF,EAAKkR,KACLlR,EAAKgK,aAAa,aAAehK,EAAKgK,aAAa,QAGnD,MADAmH,GAAWA,EAAShO,cACbgO,IAAaD,GAA2C,IAAnCC,EAASvT,QAASsT,EAAO,YAE5ClR,EAAOA,EAAK0J,aAAiC,IAAlB1J,EAAKyC,SAC3C,QAAO,KAKTtB,OAAU,SAAUnB,GACnB,GAAIoR,GAAO/T,EAAOgU,UAAYhU,EAAOgU,SAASD,IAC9C,OAAOA,IAAQA,EAAK3T,MAAO,KAAQuC,EAAK2J,IAGzC2H,KAAQ,SAAUtR,GACjB,MAAOA,KAASqF,GAGjBkM,MAAS,SAAUvR,GAClB,MAAOA,KAAS9C,EAASsU,iBAAmBtU,EAASuU,UAAYvU,EAASuU,gBAAkBzR,EAAKkC,MAAQlC,EAAK0R,OAAS1R,EAAK2R,WAI7HC,QAAW,SAAU5R,GACpB,MAAOA,GAAK6R,YAAa,GAG1BA,SAAY,SAAU7R,GACrB,MAAOA,GAAK6R,YAAa,GAG1BC,QAAW,SAAU9R,GAGpB,GAAIkD,GAAWlD,EAAKkD,SAASC,aAC7B,OAAqB,UAAbD,KAA0BlD,EAAK8R,SAA0B,WAAb5O,KAA2BlD,EAAK+R,UAGrFA,SAAY,SAAU/R,GAOrB,MAJKA,GAAK0J,YACT1J,EAAK0J,WAAWsI,cAGVhS,EAAK+R,YAAa,GAI1BE,MAAS,SAAUjS,GAKlB,IAAMA,EAAOA,EAAK6O,WAAY7O,EAAMA,EAAOA,EAAKyL,YAC/C,GAAKzL,EAAKyC,SAAW,EACpB,OAAO,CAGT,QAAO,GAGRyJ,OAAU,SAAUlM,GACnB,OAAQ2E,EAAKkC,QAAe,MAAG7G,IAIhCkS,OAAU,SAAUlS,GACnB,MAAO+H,GAAQgC,KAAM/J,EAAKkD,WAG3BiK,MAAS,SAAUnN,GAClB,MAAO8H,GAAQiC,KAAM/J,EAAKkD,WAG3BiP,OAAU,SAAUnS,GACnB,GAAIgB,GAAOhB,EAAKkD,SAASC,aACzB,OAAgB,UAATnC,GAAkC,WAAdhB,EAAKkC,MAA8B,WAATlB,GAGtDsC,KAAQ,SAAUtD,GACjB,GAAIqO,EACJ,OAAuC,UAAhCrO,EAAKkD,SAASC,eACN,SAAdnD,EAAKkC,OAImC,OAArCmM,EAAOrO,EAAKgK,aAAa,UAA2C,SAAvBqE,EAAKlL,gBAIvD/C,MAASwL,GAAuB,WAC/B,OAAS,KAGVtL,KAAQsL,GAAuB,SAAUE,EAAc5M,GACtD,OAASA,EAAS,KAGnBmB,GAAMuL,GAAuB,SAAUE,EAAc5M,EAAQ2M,GAC5D,OAAoB,EAAXA,EAAeA,EAAW3M,EAAS2M,KAG7CuG,KAAQxG,GAAuB,SAAUE,EAAc5M,GAEtD,IADA,GAAIe,GAAI,EACIf,EAAJe,EAAYA,GAAK,EACxB6L,EAAanO,KAAMsC,EAEpB,OAAO6L,KAGRuG,IAAOzG,GAAuB,SAAUE,EAAc5M,GAErD,IADA,GAAIe,GAAI,EACIf,EAAJe,EAAYA,GAAK,EACxB6L,EAAanO,KAAMsC,EAEpB,OAAO6L,KAGRwG,GAAM1G,GAAuB,SAAUE,EAAc5M,EAAQ2M,GAE5D,IADA,GAAI5L,GAAe,EAAX4L,EAAeA,EAAW3M,EAAS2M,IACjC5L,GAAK,GACd6L,EAAanO,KAAMsC,EAEpB,OAAO6L,KAGRyG,GAAM3G,GAAuB,SAAUE,EAAc5M,EAAQ2M,GAE5D,IADA,GAAI5L,GAAe,EAAX4L,EAAeA,EAAW3M,EAAS2M,IACjC5L,EAAIf,GACb4M,EAAanO,KAAMsC,EAEpB,OAAO6L,OAKVnH,EAAKkC,QAAa,IAAIlC,EAAKkC,QAAY,EAGvC,KAAM5G,KAAOuS,OAAO,EAAMC,UAAU,EAAMC,MAAM,EAAMC,UAAU,EAAMC,OAAO,GAC5EjO,EAAKkC,QAAS5G,GAAMyL,GAAmBzL,EAExC,KAAMA,KAAO4S,QAAQ,EAAMC,OAAO,GACjCnO,EAAKkC,QAAS5G,GAAM0L,GAAoB1L,EAIzC,SAASyQ,OACTA,GAAW3R,UAAY4F,EAAKoO,QAAUpO,EAAKkC,QAC3ClC,EAAK+L,WAAa,GAAIA,IAEtB5L,EAAWJ,GAAOI,SAAW,SAAU1G,EAAU4U,GAChD,GAAIpC,GAAS5H,EAAOiK,EAAQ/Q,EAC3BgR,EAAOhK,EAAQiK,EACfC,EAASrN,EAAY3H,EAAW,IAEjC,IAAKgV,EACJ,MAAOJ,GAAY,EAAII,EAAO3V,MAAO,EAGtCyV,GAAQ9U,EACR8K,KACAiK,EAAaxO,EAAK4K,SAElB,OAAQ2D,EAAQ,GAGTtC,IAAY5H,EAAQhC,EAAOwC,KAAM0J,OACjClK,IAEJkK,EAAQA,EAAMzV,MAAOuL,EAAM,GAAG9J,SAAYgU,GAE3ChK,EAAOvL,KAAOsV,OAGfrC,GAAU,GAGJ5H,EAAQ/B,EAAauC,KAAM0J,MAChCtC,EAAU5H,EAAM2B,QAChBsI,EAAOtV,MACNyF,MAAOwN,EAEP1O,KAAM8G,EAAM,GAAGpH,QAASpD,EAAO,OAEhC0U,EAAQA,EAAMzV,MAAOmT,EAAQ1R,QAI9B,KAAMgD,IAAQyC,GAAKmI,SACZ9D,EAAQ3B,EAAWnF,GAAOsH,KAAM0J,KAAcC,EAAYjR,MAC9D8G,EAAQmK,EAAYjR,GAAQ8G,MAC7B4H,EAAU5H,EAAM2B,QAChBsI,EAAOtV,MACNyF,MAAOwN,EACP1O,KAAMA,EACN+B,QAAS+E,IAEVkK,EAAQA,EAAMzV,MAAOmT,EAAQ1R,QAI/B,KAAM0R,EACL,MAOF,MAAOoC,GACNE,EAAMhU,OACNgU,EACCxO,GAAO5C,MAAO1D,GAEd2H,EAAY3H,EAAU8K,GAASzL,MAAO,GAGzC,SAASyM,IAAY+I,GAIpB,IAHA,GAAIhT,GAAI,EACPM,EAAM0S,EAAO/T,OACbd,EAAW,GACAmC,EAAJN,EAASA,IAChB7B,GAAY6U,EAAOhT,GAAGmD,KAEvB,OAAOhF,GAGR,QAASiV,IAAevC,EAASwC,EAAYC,GAC5C,GAAIpE,GAAMmE,EAAWnE,IACpBqE,EAAmBD,GAAgB,eAARpE,EAC3BsE,EAAW7N,GAEZ,OAAO0N,GAAWlT,MAEjB,SAAUJ,EAAM3B,EAAS8R,GACxB,MAASnQ,EAAOA,EAAMmP,GACrB,GAAuB,IAAlBnP,EAAKyC,UAAkB+Q,EAC3B,MAAO1C,GAAS9Q,EAAM3B,EAAS8R,IAMlC,SAAUnQ,EAAM3B,EAAS8R,GACxB,GAAIuD,GAAUtD,EACbuD,GAAahO,EAAS8N,EAGvB,IAAKtD,GACJ,MAASnQ,EAAOA,EAAMmP,GACrB,IAAuB,IAAlBnP,EAAKyC,UAAkB+Q,IACtB1C,EAAS9Q,EAAM3B,EAAS8R,GAC5B,OAAO,MAKV,OAASnQ,EAAOA,EAAMmP,GACrB,GAAuB,IAAlBnP,EAAKyC,UAAkB+Q,EAAmB,CAE9C,GADApD,EAAapQ,EAAMyB,KAAczB,EAAMyB,QACjCiS,EAAWtD,EAAYjB,KAC5BuE,EAAU,KAAQ/N,GAAW+N,EAAU,KAAQD,EAG/C,MAAQE,GAAU,GAAMD,EAAU,EAMlC,IAHAtD,EAAYjB,GAAQwE,EAGdA,EAAU,GAAM7C,EAAS9Q,EAAM3B,EAAS8R,GAC7C,OAAO,IASf,QAASyD,IAAgBC,GACxB,MAAOA,GAAS3U,OAAS,EACxB,SAAUc,EAAM3B,EAAS8R,GACxB,GAAIlQ,GAAI4T,EAAS3U,MACjB,OAAQe,IACP,IAAM4T,EAAS5T,GAAID,EAAM3B,EAAS8R,GACjC,OAAO,CAGT,QAAO,GAER0D,EAAS,GAGX,QAASC,IAAkB1V,EAAU2V,EAAUtQ,GAG9C,IAFA,GAAIxD,GAAI,EACPM,EAAMwT,EAAS7U,OACJqB,EAAJN,EAASA,IAChByE,GAAQtG,EAAU2V,EAAS9T,GAAIwD,EAEhC,OAAOA,GAGR,QAASuQ,IAAUjD,EAAWhR,EAAK+M,EAAQzO,EAAS8R,GAOnD,IANA,GAAInQ,GACHiU,KACAhU,EAAI,EACJM,EAAMwQ,EAAU7R,OAChBgV,EAAgB,MAAPnU,EAEEQ,EAAJN,EAASA,KACVD,EAAO+Q,EAAU9Q,OAChB6M,GAAUA,EAAQ9M,EAAM3B,EAAS8R,MACtC8D,EAAatW,KAAMqC,GACdkU,GACJnU,EAAIpC,KAAMsC,GAMd,OAAOgU,GAGR,QAASE,IAAY5E,EAAWnR,EAAU0S,EAASsD,EAAYC,EAAYC,GAO1E,MANKF,KAAeA,EAAY3S,KAC/B2S,EAAaD,GAAYC,IAErBC,IAAeA,EAAY5S,KAC/B4S,EAAaF,GAAYE,EAAYC,IAE/B1J,GAAa,SAAU7B,EAAMtF,EAASpF,EAAS8R,GACrD,GAAIoE,GAAMtU,EAAGD,EACZwU,KACAC,KACAC,EAAcjR,EAAQvE,OAGtBM,EAAQuJ,GAAQ+K,GAAkB1V,GAAY,IAAKC,EAAQoE,UAAapE,GAAYA,MAGpFsW,GAAYpF,IAAexG,GAAS3K,EAEnCoB,EADAwU,GAAUxU,EAAOgV,EAAQjF,EAAWlR,EAAS8R,GAG9CyE,EAAa9D,EAEZuD,IAAgBtL,EAAOwG,EAAYmF,GAAeN,MAMjD3Q,EACDkR,CAQF,IALK7D,GACJA,EAAS6D,EAAWC,EAAYvW,EAAS8R,GAIrCiE,EAAa,CACjBG,EAAOP,GAAUY,EAAYH,GAC7BL,EAAYG,KAAUlW,EAAS8R,GAG/BlQ,EAAIsU,EAAKrV,MACT,OAAQe,KACDD,EAAOuU,EAAKtU,MACjB2U,EAAYH,EAAQxU,MAAS0U,EAAWF,EAAQxU,IAAOD,IAK1D,GAAK+I,GACJ,GAAKsL,GAAc9E,EAAY,CAC9B,GAAK8E,EAAa,CAEjBE,KACAtU,EAAI2U,EAAW1V,MACf,OAAQe,KACDD,EAAO4U,EAAW3U,KAEvBsU,EAAK5W,KAAOgX,EAAU1U,GAAKD,EAG7BqU,GAAY,KAAOO,KAAkBL,EAAMpE,GAI5ClQ,EAAI2U,EAAW1V,MACf,OAAQe,KACDD,EAAO4U,EAAW3U,MACtBsU,EAAOF,EAAazW,EAASmL,EAAM/I,GAASwU,EAAOvU,IAAM,KAE1D8I,EAAKwL,KAAU9Q,EAAQ8Q,GAAQvU,SAOlC4U,GAAaZ,GACZY,IAAenR,EACdmR,EAAWjU,OAAQ+T,EAAaE,EAAW1V,QAC3C0V,GAEGP,EACJA,EAAY,KAAM5Q,EAASmR,EAAYzE,GAEvCxS,EAAKuC,MAAOuD,EAASmR,KAMzB,QAASC,IAAmB5B,GAwB3B,IAvBA,GAAI6B,GAAchE,EAAStQ,EAC1BD,EAAM0S,EAAO/T,OACb6V,EAAkBpQ,EAAKsK,SAAUgE,EAAO,GAAG/Q,MAC3C8S,EAAmBD,GAAmBpQ,EAAKsK,SAAS,KACpDhP,EAAI8U,EAAkB,EAAI,EAG1BE,EAAe5B,GAAe,SAAUrT,GACvC,MAAOA,KAAS8U,GACdE,GAAkB,GACrBE,EAAkB7B,GAAe,SAAUrT,GAC1C,MAAOpC,GAASkX,EAAc9U,GAAS,IACrCgV,GAAkB,GACrBnB,GAAa,SAAU7T,EAAM3B,EAAS8R,GACrC,GAAI1Q,IAASsV,IAAqB5E,GAAO9R,IAAY4G,MACnD6P,EAAezW,GAASoE,SACxBwS,EAAcjV,EAAM3B,EAAS8R,GAC7B+E,EAAiBlV,EAAM3B,EAAS8R,GAGlC,OADA2E,GAAe,KACRrV,IAGGc,EAAJN,EAASA,IAChB,GAAM6Q,EAAUnM,EAAKsK,SAAUgE,EAAOhT,GAAGiC,MACxC2R,GAAaR,GAAcO,GAAgBC,GAAY/C,QACjD,CAIN,GAHAA,EAAUnM,EAAKmI,OAAQmG,EAAOhT,GAAGiC,MAAOhC,MAAO,KAAM+S,EAAOhT,GAAGgE,SAG1D6M,EAASrP,GAAY,CAGzB,IADAjB,IAAMP,EACMM,EAAJC,EAASA,IAChB,GAAKmE,EAAKsK,SAAUgE,EAAOzS,GAAG0B,MAC7B,KAGF,OAAOiS,IACNlU,EAAI,GAAK2T,GAAgBC,GACzB5T,EAAI,GAAKiK,GAER+I,EAAOxV,MAAO,EAAGwC,EAAI,GAAIvC,QAAS0F,MAAgC,MAAzB6P,EAAQhT,EAAI,GAAIiC,KAAe,IAAM,MAC7EN,QAASpD,EAAO,MAClBsS,EACItQ,EAAJP,GAAS4U,GAAmB5B,EAAOxV,MAAOwC,EAAGO,IACzCD,EAAJC,GAAWqU,GAAoB5B,EAASA,EAAOxV,MAAO+C,IAClDD,EAAJC,GAAW0J,GAAY+I,IAGzBY,EAASlW,KAAMmT,GAIjB,MAAO8C,IAAgBC,GAGxB,QAASsB,IAA0BC,EAAiBC,GACnD,GAAIC,GAAQD,EAAYnW,OAAS,EAChCqW,EAAYH,EAAgBlW,OAAS,EACrCsW,EAAe,SAAUzM,EAAM1K,EAAS8R,EAAK1M,EAASgS,GACrD,GAAIzV,GAAMQ,EAAGsQ,EACZ4E,EAAe,EACfzV,EAAI,IACJ8Q,EAAYhI,MACZ4M,KACAC,EAAgB3Q,EAEhBzF,EAAQuJ,GAAQwM,GAAa5Q,EAAKkI,KAAU,IAAG,IAAK4I,GAEpDI,EAAiBlQ,GAA4B,MAAjBiQ,EAAwB,EAAIlU,KAAKC,UAAY,GACzEpB,EAAMf,EAAMN,MAUb,KARKuW,IACJxQ,EAAmB5G,IAAYnB,GAAYmB,GAOpC4B,IAAMM,GAA4B,OAApBP,EAAOR,EAAMS,IAAaA,IAAM,CACrD,GAAKsV,GAAavV,EAAO,CACxBQ,EAAI,CACJ,OAASsQ,EAAUsE,EAAgB5U,KAClC,GAAKsQ,EAAS9Q,EAAM3B,EAAS8R,GAAQ,CACpC1M,EAAQ9F,KAAMqC,EACd,OAGGyV,IACJ9P,EAAUkQ,GAKPP,KAEEtV,GAAQ8Q,GAAW9Q,IACxB0V,IAII3M,GACJgI,EAAUpT,KAAMqC,IAOnB,GADA0V,GAAgBzV,EACXqV,GAASrV,IAAMyV,EAAe,CAClClV,EAAI,CACJ,OAASsQ,EAAUuE,EAAY7U,KAC9BsQ,EAASC,EAAW4E,EAAYtX,EAAS8R,EAG1C,IAAKpH,EAAO,CAEX,GAAK2M,EAAe,EACnB,MAAQzV,IACA8Q,EAAU9Q,IAAM0V,EAAW1V,KACjC0V,EAAW1V,GAAKoG,EAAIjH,KAAMqE,GAM7BkS,GAAa3B,GAAU2B,GAIxBhY,EAAKuC,MAAOuD,EAASkS,GAGhBF,IAAc1M,GAAQ4M,EAAWzW,OAAS,GAC5CwW,EAAeL,EAAYnW,OAAW,GAExCwF,GAAO8J,WAAY/K,GAUrB,MALKgS,KACJ9P,EAAUkQ,EACV5Q,EAAmB2Q,GAGb7E,EAGT,OAAOuE,GACN1K,GAAc4K,GACdA,EA+KF,MA5KAzQ,GAAUL,GAAOK,QAAU,SAAU3G,EAAU4K,GAC9C,GAAI/I,GACHoV,KACAD,KACAhC,EAASpN,EAAe5H,EAAW,IAEpC,KAAMgV,EAAS,CAERpK,IACLA,EAAQlE,EAAU1G,IAEnB6B,EAAI+I,EAAM9J,MACV,OAAQe,IACPmT,EAASyB,GAAmB7L,EAAM/I,IAC7BmT,EAAQ3R,GACZ4T,EAAY1X,KAAMyV,GAElBgC,EAAgBzX,KAAMyV,EAKxBA,GAASpN,EAAe5H,EAAU+W,GAA0BC,EAAiBC,IAG7EjC,EAAOhV,SAAWA,EAEnB,MAAOgV,IAYRpO,EAASN,GAAOM,OAAS,SAAU5G,EAAUC,EAASoF,EAASsF,GAC9D,GAAI9I,GAAGgT,EAAQ6C,EAAO5T,EAAM2K,EAC3BkJ,EAA+B,kBAAb3X,IAA2BA,EAC7C4K,GAASD,GAAQjE,EAAW1G,EAAW2X,EAAS3X,UAAYA,EAK7D,IAHAqF,EAAUA,MAGY,IAAjBuF,EAAM9J,OAAe,CAIzB,GADA+T,EAASjK,EAAM,GAAKA,EAAM,GAAGvL,MAAO,GAC/BwV,EAAO/T,OAAS,GAAkC,QAA5B4W,EAAQ7C,EAAO,IAAI/Q,MAC5CjE,EAAQ0O,SAAgC,IAArBtO,EAAQoE,UAAkB6C,GAC7CX,EAAKsK,SAAUgE,EAAO,GAAG/Q,MAAS,CAGnC,GADA7D,GAAYsG,EAAKkI,KAAS,GAAGiJ,EAAM7R,QAAQ,GAAGrC,QAAQwG,GAAWC,IAAYhK,QAAkB,IACzFA,EACL,MAAOoF,EAGIsS,KACX1X,EAAUA,EAAQqL,YAGnBtL,EAAWA,EAASX,MAAOwV,EAAOtI,QAAQvH,MAAMlE,QAIjDe,EAAIoH,EAAwB,aAAE0C,KAAM3L,GAAa,EAAI6U,EAAO/T,MAC5D,OAAQe,IAAM,CAIb,GAHA6V,EAAQ7C,EAAOhT,GAGV0E,EAAKsK,SAAW/M,EAAO4T,EAAM5T,MACjC,KAED,KAAM2K,EAAOlI,EAAKkI,KAAM3K,MAEjB6G,EAAO8D,EACZiJ,EAAM7R,QAAQ,GAAGrC,QAASwG,GAAWC,IACrCH,GAAS6B,KAAMkJ,EAAO,GAAG/Q,OAAUiI,GAAa9L,EAAQqL,aAAgBrL,IACpE,CAKJ,GAFA4U,EAAOtS,OAAQV,EAAG,GAClB7B,EAAW2K,EAAK7J,QAAUgL,GAAY+I,IAChC7U,EAEL,MADAT,GAAKuC,MAAOuD,EAASsF,GACdtF,CAGR,SAeJ,OAPEsS,GAAYhR,EAAS3G,EAAU4K,IAChCD,EACA1K,GACCiH,EACD7B,EACAyE,GAAS6B,KAAM3L,IAAc+L,GAAa9L,EAAQqL,aAAgBrL,GAE5DoF,GAMRxF,EAAQ0Q,WAAalN,EAAQgD,MAAM,IAAI/D,KAAMuF,GAAYmE,KAAK,MAAQ3I,EAItExD,EAAQyQ,mBAAqBvJ,EAG7BC,IAIAnH,EAAQ6P,aAAejD,GAAO,SAAUmL,GAEvC,MAAuE,GAAhEA,EAAKtI,wBAAyBxQ,EAAS6N,cAAc,UAMvDF,GAAO,SAAUC,GAEtB,MADAA,GAAIoC,UAAY,mBAC+B,MAAxCpC,EAAI+D,WAAW7E,aAAa,WAEnCiB,GAAW,yBAA0B,SAAUjL,EAAMgB,EAAM6D,GAC1D,MAAMA,GAAN,OACQ7E,EAAKgK,aAAchJ,EAA6B,SAAvBA,EAAKmC,cAA2B,EAAI,KAOjElF,EAAQ2I,YAAeiE,GAAO,SAAUC,GAG7C,MAFAA,GAAIoC,UAAY,WAChBpC,EAAI+D,WAAW5E,aAAc,QAAS,IACY,KAA3Ca,EAAI+D,WAAW7E,aAAc,YAEpCiB,GAAW,QAAS,SAAUjL,EAAMgB,EAAM6D,GACzC,MAAMA,IAAyC,UAAhC7E,EAAKkD,SAASC,cAA7B,OACQnD,EAAKiW,eAOTpL,GAAO,SAAUC,GACtB,MAAuC,OAAhCA,EAAId,aAAa,eAExBiB,GAAWzE,EAAU,SAAUxG,EAAMgB,EAAM6D,GAC1C,GAAIyJ,EACJ,OAAMzJ,GAAN,OACQ7E,EAAMgB,MAAW,EAAOA,EAAKmC,eACjCmL,EAAMtO,EAAKgN,iBAAkBhM,KAAWsN,EAAIC,UAC7CD,EAAIlL,MACL,OAKGsB,IAEHrH,EAIJc,GAAO0O,KAAOnI,EACdvG,EAAOgQ,KAAOzJ,EAAOqK,UACrB5Q,EAAOgQ,KAAK,KAAOhQ,EAAOgQ,KAAKtH,QAC/B1I,EAAO+X,OAASxR,EAAO8J,WACvBrQ,EAAOmF,KAAOoB,EAAOE,QACrBzG,EAAOgY,SAAWzR,EAAOG,MACzB1G,EAAOsH,SAAWf,EAAOe,QAIzB,IAAI2Q,GAAgBjY,EAAOgQ,KAAKnF,MAAMnB,aAElCwO,EAAa,6BAIbC,EAAY,gBAGhB,SAASC,GAAQnI,EAAUoI,EAAW3F,GACrC,GAAK1S,EAAOkD,WAAYmV,GACvB,MAAOrY,GAAO2F,KAAMsK,EAAU,SAAUpO,EAAMC,GAE7C,QAASuW,EAAUpX,KAAMY,EAAMC,EAAGD,KAAW6Q,GAK/C,IAAK2F,EAAU/T,SACd,MAAOtE,GAAO2F,KAAMsK,EAAU,SAAUpO,GACvC,MAASA,KAASwW,IAAgB3F,GAKpC,IAA0B,gBAAd2F,GAAyB,CACpC,GAAKF,EAAUvM,KAAMyM,GACpB,MAAOrY,GAAO2O,OAAQ0J,EAAWpI,EAAUyC,EAG5C2F,GAAYrY,EAAO2O,OAAQ0J,EAAWpI,GAGvC,MAAOjQ,GAAO2F,KAAMsK,EAAU,SAAUpO,GACvC,MAAS7B,GAAOwF,QAAS3D,EAAMwW,IAAe,IAAQ3F,IAIxD1S,EAAO2O,OAAS,SAAUqB,EAAM3O,EAAOqR,GACtC,GAAI7Q,GAAOR,EAAO,EAMlB,OAJKqR,KACJ1C,EAAO,QAAUA,EAAO,KAGD,IAAjB3O,EAAMN,QAAkC,IAAlBc,EAAKyC,SACjCtE,EAAO0O,KAAKO,gBAAiBpN,EAAMmO,IAAWnO,MAC9C7B,EAAO0O,KAAK5I,QAASkK,EAAMhQ,EAAO2F,KAAMtE,EAAO,SAAUQ,GACxD,MAAyB,KAAlBA,EAAKyC,aAIftE,EAAOG,GAAGsC,QACTiM,KAAM,SAAUzO,GACf,GAAI6B,GACHR,KACAgX,EAAOnZ,KACPiD,EAAMkW,EAAKvX,MAEZ,IAAyB,gBAAbd,GACX,MAAOd,MAAKiC,UAAWpB,EAAQC,GAAW0O,OAAO,WAChD,IAAM7M,EAAI,EAAOM,EAAJN,EAASA,IACrB,GAAK9B,EAAOsH,SAAUgR,EAAMxW,GAAK3C,MAChC,OAAO,IAMX,KAAM2C,EAAI,EAAOM,EAAJN,EAASA,IACrB9B,EAAO0O,KAAMzO,EAAUqY,EAAMxW,GAAKR,EAMnC,OAFAA,GAAMnC,KAAKiC,UAAWgB,EAAM,EAAIpC,EAAO+X,OAAQzW,GAAQA,GACvDA,EAAIrB,SAAWd,KAAKc,SAAWd,KAAKc,SAAW,IAAMA,EAAWA,EACzDqB,GAERqN,OAAQ,SAAU1O,GACjB,MAAOd,MAAKiC,UAAWgX,EAAOjZ,KAAMc,OAAgB,KAErDyS,IAAK,SAAUzS,GACd,MAAOd,MAAKiC,UAAWgX,EAAOjZ,KAAMc,OAAgB,KAErDsY,GAAI,SAAUtY,GACb,QAASmY,EACRjZ,KAIoB,gBAAbc,IAAyBgY,EAAcrM,KAAM3L,GACnDD,EAAQC,GACRA,OACD,GACCc,SASJ,IAAIyX,GAGHzZ,EAAWG,EAAOH,SAKlB+K,EAAa,sCAEb1J,EAAOJ,EAAOG,GAAGC,KAAO,SAAUH,EAAUC,GAC3C,GAAI2K,GAAOhJ,CAGX,KAAM5B,EACL,MAAOd,KAIR,IAAyB,gBAAbc,GAAwB,CAUnC,GAPC4K,EAF2B,MAAvB5K,EAASwY,OAAO,IAAyD,MAA3CxY,EAASwY,OAAQxY,EAASc,OAAS,IAAed,EAASc,QAAU,GAE7F,KAAMd,EAAU,MAGlB6J,EAAWuB,KAAMpL,IAIrB4K,IAAUA,EAAM,IAAO3K,EAsDrB,OAAMA,GAAWA,EAAQW,QACtBX,GAAWsY,GAAa9J,KAAMzO,GAKhCd,KAAK2B,YAAaZ,GAAUwO,KAAMzO,EAzDzC,IAAK4K,EAAM,GAAK,CAYf,GAXA3K,EAAUA,YAAmBF,GAASE,EAAQ,GAAKA,EAInDF,EAAOuB,MAAOpC,KAAMa,EAAO0Y,UAC1B7N,EAAM,GACN3K,GAAWA,EAAQoE,SAAWpE,EAAQkL,eAAiBlL,EAAUnB,GACjE,IAIImZ,EAAWtM,KAAMf,EAAM,KAAQ7K,EAAOmD,cAAejD,GACzD,IAAM2K,IAAS3K,GAETF,EAAOkD,WAAY/D,KAAM0L,IAC7B1L,KAAM0L,GAAS3K,EAAS2K,IAIxB1L,KAAK+Q,KAAMrF,EAAO3K,EAAS2K,GAK9B,OAAO1L,MAQP,GAJA0C,EAAO9C,EAASuM,eAAgBT,EAAM,IAIjChJ,GAAQA,EAAK0J,WAAa,CAG9B,GAAK1J,EAAK2J,KAAOX,EAAM,GACtB,MAAO2N,GAAW9J,KAAMzO,EAIzBd,MAAK4B,OAAS,EACd5B,KAAK,GAAK0C,EAKX,MAFA1C,MAAKe,QAAUnB,EACfI,KAAKc,SAAWA,EACTd,KAcH,MAAKc,GAASqE,UACpBnF,KAAKe,QAAUf,KAAK,GAAKc,EACzBd,KAAK4B,OAAS,EACP5B,MAIIa,EAAOkD,WAAYjD,GACK,mBAArBuY,GAAWG,MACxBH,EAAWG,MAAO1Y,GAElBA,EAAUD,IAGeqD,SAAtBpD,EAASA,WACbd,KAAKc,SAAWA,EAASA,SACzBd,KAAKe,QAAUD,EAASC,SAGlBF,EAAOoF,UAAWnF,EAAUd,OAIrCiB,GAAKQ,UAAYZ,EAAOG,GAGxBqY,EAAaxY,EAAQjB,EAGrB,IAAI6Z,GAAe,iCAElBC,GACCC,UAAU,EACVC,UAAU,EACVC,MAAM,EACNC,MAAM,EAGRjZ,GAAOyC,QACNuO,IAAK,SAAUnP,EAAMmP,EAAKkI,GACzB,GAAIzG,MACHtF,EAAMtL,EAAMmP,EAEb,OAAQ7D,GAAwB,IAAjBA,EAAI7I,WAA6BjB,SAAV6V,GAAwC,IAAjB/L,EAAI7I,WAAmBtE,EAAQmN,GAAMoL,GAAIW,IAC/E,IAAjB/L,EAAI7I,UACRmO,EAAQjT,KAAM2N,GAEfA,EAAMA,EAAI6D,EAEX,OAAOyB,IAGR0G,QAAS,SAAUC,EAAGvX,GAGrB,IAFA,GAAIwX,MAEID,EAAGA,EAAIA,EAAE9L,YACI,IAAf8L,EAAE9U,UAAkB8U,IAAMvX,GAC9BwX,EAAE7Z,KAAM4Z,EAIV,OAAOC,MAITrZ,EAAOG,GAAGsC,QACToQ,IAAK,SAAU7P,GACd,GAAIlB,GACHwX,EAAUtZ,EAAQgD,EAAQ7D,MAC1BiD,EAAMkX,EAAQvY,MAEf,OAAO5B,MAAKwP,OAAO,WAClB,IAAM7M,EAAI,EAAOM,EAAJN,EAASA,IACrB,GAAK9B,EAAOsH,SAAUnI,KAAMma,EAAQxX,IACnC,OAAO,KAMXyX,QAAS,SAAU3I,EAAW1Q,GAS7B,IARA,GAAIiN,GACHrL,EAAI,EACJ0X,EAAIra,KAAK4B,OACT0R,KACAgH,EAAMxB,EAAcrM,KAAMgF,IAAoC,gBAAdA,GAC/C5Q,EAAQ4Q,EAAW1Q,GAAWf,KAAKe,SACnC,EAEUsZ,EAAJ1X,EAAOA,IACd,IAAMqL,EAAMhO,KAAK2C,GAAIqL,GAAOA,IAAQjN,EAASiN,EAAMA,EAAI5B,WAEtD,GAAK4B,EAAI7I,SAAW,KAAOmV,EAC1BA,EAAIC,MAAMvM,GAAO,GAGA,IAAjBA,EAAI7I,UACHtE,EAAO0O,KAAKO,gBAAgB9B,EAAKyD,IAAc,CAEhD6B,EAAQjT,KAAM2N,EACd,OAKH,MAAOhO,MAAKiC,UAAWqR,EAAQ1R,OAAS,EAAIf,EAAO+X,OAAQtF,GAAYA,IAKxEiH,MAAO,SAAU7X,GAGhB,MAAMA,GAKe,gBAATA,GACJ7B,EAAOwF,QAASrG,KAAK,GAAIa,EAAQ6B,IAIlC7B,EAAOwF,QAEb3D,EAAKhB,OAASgB,EAAK,GAAKA,EAAM1C,MAXrBA,KAAK,IAAMA,KAAK,GAAGoM,WAAepM,KAAK8C,QAAQ0X,UAAU5Y,OAAS,IAc7E6Y,IAAK,SAAU3Z,EAAUC,GACxB,MAAOf,MAAKiC,UACXpB,EAAO+X,OACN/X,EAAOuB,MAAOpC,KAAK+B,MAAOlB,EAAQC,EAAUC,OAK/C2Z,QAAS,SAAU5Z,GAClB,MAAOd,MAAKya,IAAiB,MAAZ3Z,EAChBd,KAAKqC,WAAarC,KAAKqC,WAAWmN,OAAO1O,MAK5C,SAASkZ,GAAShM,EAAK6D,GACtB,EACC7D,GAAMA,EAAK6D,SACF7D,GAAwB,IAAjBA,EAAI7I,SAErB,OAAO6I,GAGRnN,EAAOyB,MACNsM,OAAQ,SAAUlM,GACjB,GAAIkM,GAASlM,EAAK0J,UAClB,OAAOwC,IAA8B,KAApBA,EAAOzJ,SAAkByJ,EAAS,MAEpD+L,QAAS,SAAUjY,GAClB,MAAO7B,GAAOgR,IAAKnP,EAAM,eAE1BkY,aAAc,SAAUlY,EAAMC,EAAGoX,GAChC,MAAOlZ,GAAOgR,IAAKnP,EAAM,aAAcqX,IAExCF,KAAM,SAAUnX,GACf,MAAOsX,GAAStX,EAAM,gBAEvBoX,KAAM,SAAUpX,GACf,MAAOsX,GAAStX,EAAM,oBAEvBmY,QAAS,SAAUnY,GAClB,MAAO7B,GAAOgR,IAAKnP,EAAM,gBAE1B8X,QAAS,SAAU9X,GAClB,MAAO7B,GAAOgR,IAAKnP,EAAM,oBAE1BoY,UAAW,SAAUpY,EAAMC,EAAGoX,GAC7B,MAAOlZ,GAAOgR,IAAKnP,EAAM,cAAeqX,IAEzCgB,UAAW,SAAUrY,EAAMC,EAAGoX,GAC7B,MAAOlZ,GAAOgR,IAAKnP,EAAM,kBAAmBqX,IAE7CiB,SAAU,SAAUtY,GACnB,MAAO7B,GAAOmZ,SAAWtX,EAAK0J,gBAAmBmF,WAAY7O,IAE9DiX,SAAU,SAAUjX,GACnB,MAAO7B,GAAOmZ,QAAStX,EAAK6O,aAE7BqI,SAAU,SAAUlX,GACnB,MAAO7B,GAAO+E,SAAUlD,EAAM,UAC7BA,EAAKuY,iBAAmBvY,EAAKwY,cAActb,SAC3CiB,EAAOuB,SAAWM,EAAK6I,cAEvB,SAAU7H,EAAM1C,GAClBH,EAAOG,GAAI0C,GAAS,SAAUqW,EAAOjZ,GACpC,GAAIqB,GAAMtB,EAAO4B,IAAKzC,KAAMgB,EAAI+Y,EAsBhC,OApB0B,UAArBrW,EAAKvD,MAAO,MAChBW,EAAWiZ,GAGPjZ,GAAgC,gBAAbA,KACvBqB,EAAMtB,EAAO2O,OAAQ1O,EAAUqB,IAG3BnC,KAAK4B,OAAS,IAEZ8X,EAAkBhW,KACvBvB,EAAMtB,EAAO+X,OAAQzW,IAIjBsX,EAAahN,KAAM/I,KACvBvB,EAAMA,EAAIgZ,YAILnb,KAAKiC,UAAWE,KAGzB,IAAIiZ,GAAY,OAKZC,IAGJ,SAASC,GAAe3X,GACvB,GAAI4X,GAASF,EAAc1X,KAI3B,OAHA9C,GAAOyB,KAAMqB,EAAQ+H,MAAO0P,OAAmB,SAAUpQ,EAAGwQ,GAC3DD,EAAQC,IAAS,IAEXD,EAyBR1a,EAAO4a,UAAY,SAAU9X,GAI5BA,EAA6B,gBAAZA,GACd0X,EAAc1X,IAAa2X,EAAe3X,GAC5C9C,EAAOyC,UAAYK,EAEpB,IACC+X,GAEAC,EAEAC,EAEAC,EAEAC,EAEAC,EAEA9S,KAEA+S,GAASrY,EAAQsY,SAEjBC,EAAO,SAAU3W,GAOhB,IANAoW,EAAShY,EAAQgY,QAAUpW,EAC3BqW,GAAQ,EACRE,EAAcC,GAAe,EAC7BA,EAAc,EACdF,EAAe5S,EAAKrH,OACpB8Z,GAAS,EACDzS,GAAsB4S,EAAdC,EAA4BA,IAC3C,GAAK7S,EAAM6S,GAAclZ,MAAO2C,EAAM,GAAKA,EAAM,OAAU,GAAS5B,EAAQwY,YAAc,CACzFR,GAAS,CACT,OAGFD,GAAS,EACJzS,IACC+S,EACCA,EAAMpa,QACVsa,EAAMF,EAAM3O,SAEFsO,EACX1S,KAEAkQ,EAAKiD,YAKRjD,GAECsB,IAAK,WACJ,GAAKxR,EAAO,CAEX,GAAI+J,GAAQ/J,EAAKrH,QACjB,QAAU6Y,GAAKjY,GACd3B,EAAOyB,KAAME,EAAM,SAAUwI,EAAGnE,GAC/B,GAAIjC,GAAO/D,EAAO+D,KAAMiC,EACV,cAATjC,EACEjB,EAAQiV,QAAWO,EAAKzF,IAAK7M,IAClCoC,EAAK5I,KAAMwG,GAEDA,GAAOA,EAAIjF,QAAmB,WAATgD,GAEhC6V,EAAK5T,MAGJhE,WAGC6Y,EACJG,EAAe5S,EAAKrH,OAGT+Z,IACXI,EAAc/I,EACdkJ,EAAMP,IAGR,MAAO3b,OAGRqc,OAAQ,WAkBP,MAjBKpT,IACJpI,EAAOyB,KAAMO,UAAW,SAAUmI,EAAGnE,GACpC,GAAI0T,EACJ,QAAUA,EAAQ1Z,EAAOwF,QAASQ,EAAKoC,EAAMsR,IAAY,GACxDtR,EAAK5F,OAAQkX,EAAO,GAEfmB,IACUG,GAATtB,GACJsB,IAEaC,GAATvB,GACJuB,OAME9b,MAIR0T,IAAK,SAAU1S,GACd,MAAOA,GAAKH,EAAOwF,QAASrF,EAAIiI,GAAS,MAASA,IAAQA,EAAKrH,SAGhE+S,MAAO,WAGN,MAFA1L,MACA4S,EAAe,EACR7b,MAGRoc,QAAS,WAER,MADAnT,GAAO+S,EAAQL,EAASzX,OACjBlE,MAGRuU,SAAU,WACT,OAAQtL,GAGTqT,KAAM,WAKL,MAJAN,GAAQ9X,OACFyX,GACLxC,EAAKiD,UAECpc,MAGRuc,OAAQ,WACP,OAAQP,GAGTQ,SAAU,SAAUzb,EAASyB,GAU5B,OATKyG,GAAW2S,IAASI,IACxBxZ,EAAOA,MACPA,GAASzB,EAASyB,EAAKrC,MAAQqC,EAAKrC,QAAUqC,GACzCkZ,EACJM,EAAM3b,KAAMmC,GAEZ0Z,EAAM1Z,IAGDxC,MAGRkc,KAAM,WAEL,MADA/C,GAAKqD,SAAUxc,KAAM6C,WACd7C,MAGR4b,MAAO,WACN,QAASA,GAIZ,OAAOzC,IAIRtY,EAAOyC,QAENmZ,SAAU,SAAUC,GACnB,GAAIC,KAEA,UAAW,OAAQ9b,EAAO4a,UAAU,eAAgB,aACpD,SAAU,OAAQ5a,EAAO4a,UAAU,eAAgB,aACnD,SAAU,WAAY5a,EAAO4a,UAAU,YAE1CmB,EAAQ,UACRC,GACCD,MAAO,WACN,MAAOA,IAERE,OAAQ,WAEP,MADAC,GAASzU,KAAMzF,WAAYma,KAAMna,WAC1B7C,MAERid,KAAM,WACL,GAAIC,GAAMra,SACV,OAAOhC,GAAO4b,SAAS,SAAUU,GAChCtc,EAAOyB,KAAMqa,EAAQ,SAAUha,EAAGya,GACjC,GAAIpc,GAAKH,EAAOkD,WAAYmZ,EAAKva,KAASua,EAAKva,EAE/Coa,GAAUK,EAAM,IAAK,WACpB,GAAIC,GAAWrc,GAAMA,EAAG4B,MAAO5C,KAAM6C,UAChCwa,IAAYxc,EAAOkD,WAAYsZ,EAASR,SAC5CQ,EAASR,UACPvU,KAAM6U,EAASG,SACfN,KAAMG,EAASI,QACfC,SAAUL,EAASM,QAErBN,EAAUC,EAAO,GAAM,QAAUpd,OAAS6c,EAAUM,EAASN,UAAY7c,KAAMgB,GAAOqc,GAAaxa,eAItGqa,EAAM,OACJL,WAIJA,QAAS,SAAUlY,GAClB,MAAc,OAAPA,EAAc9D,EAAOyC,OAAQqB,EAAKkY,GAAYA,IAGvDE,IAwCD,OArCAF,GAAQa,KAAOb,EAAQI,KAGvBpc,EAAOyB,KAAMqa,EAAQ,SAAUha,EAAGya,GACjC,GAAInU,GAAOmU,EAAO,GACjBO,EAAcP,EAAO,EAGtBP,GAASO,EAAM,IAAOnU,EAAKwR,IAGtBkD,GACJ1U,EAAKwR,IAAI,WAERmC,EAAQe,GAGNhB,EAAY,EAAJha,GAAS,GAAIyZ,QAASO,EAAQ,GAAK,GAAIL,MAInDS,EAAUK,EAAM,IAAO,WAEtB,MADAL,GAAUK,EAAM,GAAK,QAAUpd,OAAS+c,EAAWF,EAAU7c,KAAM6C,WAC5D7C,MAER+c,EAAUK,EAAM,GAAK,QAAWnU,EAAKuT,WAItCK,EAAQA,QAASE,GAGZL,GACJA,EAAK5a,KAAMib,EAAUA,GAIfA,GAIRa,KAAM,SAAUC,GACf,GAAIlb,GAAI,EACPmb,EAAgB3d,EAAM2B,KAAMe,WAC5BjB,EAASkc,EAAclc,OAGvBmc,EAAuB,IAAXnc,GAAkBic,GAAehd,EAAOkD,WAAY8Z,EAAYhB,SAAcjb,EAAS,EAGnGmb,EAAyB,IAAdgB,EAAkBF,EAAchd,EAAO4b,WAGlDuB,EAAa,SAAUrb,EAAG8T,EAAUwH,GACnC,MAAO,UAAUnY,GAChB2Q,EAAU9T,GAAM3C,KAChBie,EAAQtb,GAAME,UAAUjB,OAAS,EAAIzB,EAAM2B,KAAMe,WAAciD,EAC1DmY,IAAWC,EACfnB,EAASoB,WAAY1H,EAAUwH,KAEhBF,GACfhB,EAASqB,YAAa3H,EAAUwH,KAKnCC,EAAgBG,EAAkBC,CAGnC,IAAK1c,EAAS,EAIb,IAHAsc,EAAiB,GAAIrZ,OAAOjD,GAC5Byc,EAAmB,GAAIxZ,OAAOjD,GAC9B0c,EAAkB,GAAIzZ,OAAOjD,GACjBA,EAAJe,EAAYA,IACdmb,EAAenb,IAAO9B,EAAOkD,WAAY+Z,EAAenb,GAAIka,SAChEiB,EAAenb,GAAIka,UACjBvU,KAAM0V,EAAYrb,EAAG2b,EAAiBR,IACtCd,KAAMD,EAASQ,QACfC,SAAUQ,EAAYrb,EAAG0b,EAAkBH,MAE3CH,CAUL,OAJMA,IACLhB,EAASqB,YAAaE,EAAiBR,GAGjCf,EAASF,YAMlB,IAAI0B,EAEJ1d,GAAOG,GAAGwY,MAAQ,SAAUxY,GAI3B,MAFAH,GAAO2Y,MAAMqD,UAAUvU,KAAMtH,GAEtBhB,MAGRa,EAAOyC,QAENiB,SAAS,EAITia,UAAW,EAGXC,UAAW,SAAUC,GACfA,EACJ7d,EAAO2d,YAEP3d,EAAO2Y,OAAO,IAKhBA,MAAO,SAAUmF,GAGhB,GAAKA,KAAS,KAAS9d,EAAO2d,WAAY3d,EAAO0D,QAAjD,CAKA,IAAM3E,EAASgf,KACd,MAAOC,YAAYhe,EAAO2Y,MAI3B3Y,GAAO0D,SAAU,EAGZoa,KAAS,KAAU9d,EAAO2d,UAAY,IAK3CD,EAAUH,YAAaxe,GAAYiB,IAG9BA,EAAOG,GAAG8d,iBACdje,EAAQjB,GAAWkf,eAAgB,SACnCje,EAAQjB,GAAWmf,IAAK,cAQ3B,SAASC,KACHpf,EAASoP,kBACbpP,EAASqf,oBAAqB,mBAAoBC,GAAW,GAC7Dnf,EAAOkf,oBAAqB,OAAQC,GAAW,KAG/Ctf,EAASuf,YAAa,qBAAsBD,GAC5Cnf,EAAOof,YAAa,SAAUD,IAOhC,QAASA,MAEHtf,EAASoP,kBAAmC,SAAfoQ,MAAMxa,MAA2C,aAAxBhF,EAASyf,cACnEL,IACAne,EAAO2Y,SAIT3Y,EAAO2Y,MAAMqD,QAAU,SAAUlY,GAChC,IAAM4Z,EAOL,GALAA,EAAY1d,EAAO4b,WAKU,aAAxB7c,EAASyf,WAEbR,WAAYhe,EAAO2Y,WAGb,IAAK5Z,EAASoP,iBAEpBpP,EAASoP,iBAAkB,mBAAoBkQ,GAAW,GAG1Dnf,EAAOiP,iBAAkB,OAAQkQ,GAAW,OAGtC,CAENtf,EAASqP,YAAa,qBAAsBiQ,GAG5Cnf,EAAOkP,YAAa,SAAUiQ,EAI9B,IAAInQ,IAAM,CAEV,KACCA,EAA6B,MAAvBhP,EAAOuf,cAAwB1f,EAAS6O,gBAC7C,MAAMrJ,IAEH2J,GAAOA,EAAIwQ,WACf,QAAUC,KACT,IAAM3e,EAAO0D,QAAU,CAEtB,IAGCwK,EAAIwQ,SAAS,QACZ,MAAMna,GACP,MAAOyZ,YAAYW,EAAe,IAInCR,IAGAne,EAAO2Y,YAMZ,MAAO+E,GAAU1B,QAASlY,GAI3B,IAAI8a,GAAe,YAMf9c,CACJ,KAAMA,IAAK9B,GAAQF,GAClB,KAEDA,GAAQ0E,QAAgB,MAAN1C,EAIlBhC,EAAQ+e,wBAAyB,EAGjC7e,EAAO,WAEN,GAAImQ,GAAKxD,EAAKoR,EAAMe,CAEpBf,GAAOhf,EAAS0M,qBAAsB,QAAU,GAC1CsS,GAASA,EAAKgB,QAMpBpS,EAAM5N,EAAS6N,cAAe,OAC9BkS,EAAY/f,EAAS6N,cAAe,OACpCkS,EAAUC,MAAMC,QAAU,iEAC1BjB,EAAKzP,YAAawQ,GAAYxQ,YAAa3B,SAE/BA,GAAIoS,MAAME,OAASL,IAK9BjS,EAAIoS,MAAMC,QAAU,gEAEpBlf,EAAQ+e,uBAAyB1O,EAA0B,IAApBxD,EAAIuS,YACtC/O,IAIJ4N,EAAKgB,MAAME,KAAO,IAIpBlB,EAAKlR,YAAaiS,MAMnB,WACC,GAAInS,GAAM5N,EAAS6N,cAAe,MAGlC,IAA6B,MAAzB9M,EAAQqf,cAAuB,CAElCrf,EAAQqf,eAAgB,CACxB,WACQxS,GAAIf,KACV,MAAOrH,GACRzE,EAAQqf,eAAgB,GAK1BxS,EAAM,QAOP3M,EAAOof,WAAa,SAAUvd,GAC7B,GAAIwd,GAASrf,EAAOqf,QAASxd,EAAKkD,SAAW,KAAKC,eACjDV,GAAYzC,EAAKyC,UAAY,CAG9B,OAAoB,KAAbA,GAA+B,IAAbA,GACxB,GAGC+a,GAAUA,KAAW,GAAQxd,EAAKgK,aAAa,aAAewT,EAIjE,IAAIC,GAAS,gCACZC,EAAa,UAEd,SAASC,GAAU3d,EAAMwC,EAAKK,GAG7B,GAAcrB,SAATqB,GAAwC,IAAlB7C,EAAKyC,SAAiB,CAEhD,GAAIzB,GAAO,QAAUwB,EAAIZ,QAAS8b,EAAY,OAAQva,aAItD,IAFAN,EAAO7C,EAAKgK,aAAchJ,GAEL,gBAAT6B,GAAoB,CAC/B,IACCA,EAAgB,SAATA,GAAkB,EACf,UAATA,GAAmB,EACV,SAATA,EAAkB,MAEjBA,EAAO,KAAOA,GAAQA,EACvB4a,EAAO1T,KAAMlH,GAAS1E,EAAOyf,UAAW/a,GACxCA,EACA,MAAOH,IAGTvE,EAAO0E,KAAM7C,EAAMwC,EAAKK,OAGxBA,GAAOrB,OAIT,MAAOqB,GAIR,QAASgb,GAAmB5b,GAC3B,GAAIjB,EACJ,KAAMA,IAAQiB,GAGb,IAAc,SAATjB,IAAmB7C,EAAOoE,cAAeN,EAAIjB,MAGpC,WAATA,EACJ,OAAO,CAIT;OAAO,EAGR,QAAS8c,GAAc9d,EAAMgB,EAAM6B,EAAMkb,GACxC,GAAM5f,EAAOof,WAAYvd,GAAzB,CAIA,GAAIP,GAAKue,EACRC,EAAc9f,EAAOsD,QAIrByc,EAASle,EAAKyC,SAIdgI,EAAQyT,EAAS/f,EAAOsM,MAAQzK,EAIhC2J,EAAKuU,EAASle,EAAMie,GAAgBje,EAAMie,IAAiBA,CAI5D,IAAOtU,GAAOc,EAAMd,KAASoU,GAAQtT,EAAMd,GAAI9G,OAAmBrB,SAATqB,GAAsC,gBAAT7B,GAgEtF,MA5DM2I,KAIJA,EADIuU,EACCle,EAAMie,GAAgBzgB,EAAW6I,OAASlI,EAAOiG,OAEjD6Z,GAIDxT,EAAOd,KAGZc,EAAOd,GAAOuU,MAAgBC,OAAQhgB,EAAO6D,QAKzB,gBAAThB,IAAqC,kBAATA,MAClC+c,EACJtT,EAAOd,GAAOxL,EAAOyC,OAAQ6J,EAAOd,GAAM3I,GAE1CyJ,EAAOd,GAAK9G,KAAO1E,EAAOyC,OAAQ6J,EAAOd,GAAK9G,KAAM7B,IAItDgd,EAAYvT,EAAOd,GAKboU,IACCC,EAAUnb,OACfmb,EAAUnb,SAGXmb,EAAYA,EAAUnb,MAGTrB,SAATqB,IACJmb,EAAW7f,EAAO6E,UAAWhC,IAAW6B,GAKpB,gBAAT7B,IAGXvB,EAAMue,EAAWhd,GAGL,MAAPvB,IAGJA,EAAMue,EAAW7f,EAAO6E,UAAWhC,MAGpCvB,EAAMue,EAGAve,GAGR,QAAS2e,GAAoBpe,EAAMgB,EAAM+c,GACxC,GAAM5f,EAAOof,WAAYvd,GAAzB,CAIA,GAAIge,GAAW/d,EACdie,EAASle,EAAKyC,SAGdgI,EAAQyT,EAAS/f,EAAOsM,MAAQzK,EAChC2J,EAAKuU,EAASle,EAAM7B,EAAOsD,SAAYtD,EAAOsD,OAI/C,IAAMgJ,EAAOd,GAAb,CAIA,GAAK3I,IAEJgd,EAAYD,EAAMtT,EAAOd,GAAOc,EAAOd,GAAK9G,MAE3B,CAGV1E,EAAOoD,QAASP,GAsBrBA,EAAOA,EAAKtD,OAAQS,EAAO4B,IAAKiB,EAAM7C,EAAO6E,YAnBxChC,IAAQgd,GACZhd,GAASA,IAITA,EAAO7C,EAAO6E,UAAWhC,GAExBA,EADIA,IAAQgd,IACHhd,GAEFA,EAAKyD,MAAM,MAarBxE,EAAIe,EAAK9B,MACT,OAAQe,UACA+d,GAAWhd,EAAKf,GAKxB,IAAK8d,GAAOF,EAAkBG,IAAc7f,EAAOoE,cAAcyb,GAChE,QAMGD,UACEtT,GAAOd,GAAK9G,KAIbgb,EAAmBpT,EAAOd,QAM5BuU,EACJ/f,EAAOkgB,WAAare,IAAQ,GAIjB/B,EAAQqf,eAAiB7S,GAASA,EAAMpN,aAE5CoN,GAAOd,GAIdc,EAAOd,GAAO,QAIhBxL,EAAOyC,QACN6J,SAIA+S,QACCc,WAAW,EACXC,UAAU,EAEVC,UAAW,8CAGZC,QAAS,SAAUze,GAElB,MADAA,GAAOA,EAAKyC,SAAWtE,EAAOsM,MAAOzK,EAAK7B,EAAOsD,UAAazB,EAAM7B,EAAOsD,WAClEzB,IAAS6d,EAAmB7d,IAGtC6C,KAAM,SAAU7C,EAAMgB,EAAM6B,GAC3B,MAAOib,GAAc9d,EAAMgB,EAAM6B,IAGlC6b,WAAY,SAAU1e,EAAMgB,GAC3B,MAAOod,GAAoBpe,EAAMgB,IAIlC2d,MAAO,SAAU3e,EAAMgB,EAAM6B,GAC5B,MAAOib,GAAc9d,EAAMgB,EAAM6B,GAAM,IAGxC+b,YAAa,SAAU5e,EAAMgB,GAC5B,MAAOod,GAAoBpe,EAAMgB,GAAM,MAIzC7C,EAAOG,GAAGsC,QACTiC,KAAM,SAAUL,EAAKY,GACpB,GAAInD,GAAGe,EAAM6B,EACZ7C,EAAO1C,KAAK,GACZ4N,EAAQlL,GAAQA,EAAK4G,UAMtB,IAAapF,SAARgB,EAAoB,CACxB,GAAKlF,KAAK4B,SACT2D,EAAO1E,EAAO0E,KAAM7C,GAEG,IAAlBA,EAAKyC,WAAmBtE,EAAOwgB,MAAO3e,EAAM,gBAAkB,CAClEC,EAAIiL,EAAMhM,MACV,OAAQe,IAIFiL,EAAOjL,KACXe,EAAOkK,EAAOjL,GAAIe,KACe,IAA5BA,EAAKpD,QAAS,WAClBoD,EAAO7C,EAAO6E,UAAWhC,EAAKvD,MAAM,IACpCkgB,EAAU3d,EAAMgB,EAAM6B,EAAM7B,KAI/B7C,GAAOwgB,MAAO3e,EAAM,eAAe,GAIrC,MAAO6C,GAIR,MAAoB,gBAARL,GACJlF,KAAKsC,KAAK,WAChBzB,EAAO0E,KAAMvF,KAAMkF,KAIdrC,UAAUjB,OAAS,EAGzB5B,KAAKsC,KAAK,WACTzB,EAAO0E,KAAMvF,KAAMkF,EAAKY,KAKzBpD,EAAO2d,EAAU3d,EAAMwC,EAAKrE,EAAO0E,KAAM7C,EAAMwC,IAAUhB,QAG3Dkd,WAAY,SAAUlc,GACrB,MAAOlF,MAAKsC,KAAK,WAChBzB,EAAOugB,WAAYphB,KAAMkF,QAM5BrE,EAAOyC,QACNie,MAAO,SAAU7e,EAAMkC,EAAMW,GAC5B,GAAIgc,EAEJ,OAAK7e,IACJkC,GAASA,GAAQ,MAAS,QAC1B2c,EAAQ1gB,EAAOwgB,MAAO3e,EAAMkC,GAGvBW,KACEgc,GAAS1gB,EAAOoD,QAAQsB,GAC7Bgc,EAAQ1gB,EAAOwgB,MAAO3e,EAAMkC,EAAM/D,EAAOoF,UAAUV,IAEnDgc,EAAMlhB,KAAMkF,IAGPgc,OAZR,QAgBDC,QAAS,SAAU9e,EAAMkC,GACxBA,EAAOA,GAAQ,IAEf,IAAI2c,GAAQ1gB,EAAO0gB,MAAO7e,EAAMkC,GAC/B6c,EAAcF,EAAM3f,OACpBZ,EAAKugB,EAAMlU,QACXqU,EAAQ7gB,EAAO8gB,YAAajf,EAAMkC,GAClCiV,EAAO,WACNhZ,EAAO2gB,QAAS9e,EAAMkC,GAIZ,gBAAP5D,IACJA,EAAKugB,EAAMlU,QACXoU,KAGIzgB,IAIU,OAAT4D,GACJ2c,EAAM3Q,QAAS,oBAIT8Q,GAAME,KACb5gB,EAAGc,KAAMY,EAAMmX,EAAM6H,KAGhBD,GAAeC,GACpBA,EAAM/M,MAAMuH,QAKdyF,YAAa,SAAUjf,EAAMkC,GAC5B,GAAIM,GAAMN,EAAO,YACjB,OAAO/D,GAAOwgB,MAAO3e,EAAMwC,IAASrE,EAAOwgB,MAAO3e,EAAMwC,GACvDyP,MAAO9T,EAAO4a,UAAU,eAAehB,IAAI,WAC1C5Z,EAAOygB,YAAa5e,EAAMkC,EAAO,SACjC/D,EAAOygB,YAAa5e,EAAMwC,UAM9BrE,EAAOG,GAAGsC,QACTie,MAAO,SAAU3c,EAAMW,GACtB,GAAIsc,GAAS,CAQb,OANqB,gBAATjd,KACXW,EAAOX,EACPA,EAAO,KACPid,KAGIhf,UAAUjB,OAASigB,EAChBhhB,EAAO0gB,MAAOvhB,KAAK,GAAI4E,GAGfV,SAATqB,EACNvF,KACAA,KAAKsC,KAAK,WACT,GAAIif,GAAQ1gB,EAAO0gB,MAAOvhB,KAAM4E,EAAMW,EAGtC1E,GAAO8gB,YAAa3hB,KAAM4E,GAEZ,OAATA,GAA8B,eAAb2c,EAAM,IAC3B1gB,EAAO2gB,QAASxhB,KAAM4E,MAI1B4c,QAAS,SAAU5c,GAClB,MAAO5E,MAAKsC,KAAK,WAChBzB,EAAO2gB,QAASxhB,KAAM4E,MAGxBkd,WAAY,SAAUld,GACrB,MAAO5E,MAAKuhB,MAAO3c,GAAQ,UAI5BiY,QAAS,SAAUjY,EAAMD,GACxB,GAAIqC,GACH+a,EAAQ,EACRC,EAAQnhB,EAAO4b,WACf3L,EAAW9Q,KACX2C,EAAI3C,KAAK4B,OACT0b,EAAU,aACCyE,GACTC,EAAM5D,YAAatN,GAAYA,IAIb,iBAATlM,KACXD,EAAMC,EACNA,EAAOV,QAERU,EAAOA,GAAQ,IAEf,OAAQjC,IACPqE,EAAMnG,EAAOwgB,MAAOvQ,EAAUnO,GAAKiC,EAAO,cACrCoC,GAAOA,EAAI2N,QACfoN,IACA/a,EAAI2N,MAAM8F,IAAK6C,GAIjB,OADAA,KACO0E,EAAMnF,QAASlY,KAGxB,IAAIsd,GAAO,sCAAwCC,OAE/CC,GAAc,MAAO,QAAS,SAAU,QAExCC,EAAW,SAAU1f,EAAM2f,GAI7B,MADA3f,GAAO2f,GAAM3f,EAC4B,SAAlC7B,EAAOyhB,IAAK5f,EAAM,aAA2B7B,EAAOsH,SAAUzF,EAAKuJ,cAAevJ,IAOvF6f,EAAS1hB,EAAO0hB,OAAS,SAAUrgB,EAAOlB,EAAIkE,EAAKY,EAAO0c,EAAWC,EAAUC,GAClF,GAAI/f,GAAI,EACPf,EAASM,EAAMN,OACf+gB,EAAc,MAAPzd,CAGR,IAA4B,WAAvBrE,EAAO+D,KAAMM,GAAqB,CACtCsd,GAAY,CACZ,KAAM7f,IAAKuC,GACVrE,EAAO0hB,OAAQrgB,EAAOlB,EAAI2B,EAAGuC,EAAIvC,IAAI,EAAM8f,EAAUC,OAIhD,IAAexe,SAAV4B,IACX0c,GAAY,EAEN3hB,EAAOkD,WAAY+B,KACxB4c,GAAM,GAGFC,IAECD,GACJ1hB,EAAGc,KAAMI,EAAO4D,GAChB9E,EAAK,OAIL2hB,EAAO3hB,EACPA,EAAK,SAAU0B,EAAMwC,EAAKY,GACzB,MAAO6c,GAAK7gB,KAAMjB,EAAQ6B,GAAQoD,MAKhC9E,GACJ,KAAYY,EAAJe,EAAYA,IACnB3B,EAAIkB,EAAMS,GAAIuC,EAAKwd,EAAM5c,EAAQA,EAAMhE,KAAMI,EAAMS,GAAIA,EAAG3B,EAAIkB,EAAMS,GAAIuC,IAK3E,OAAOsd,GACNtgB,EAGAygB,EACC3hB,EAAGc,KAAMI,GACTN,EAASZ,EAAIkB,EAAM,GAAIgD,GAAQud,GAE9BG,EAAiB,yBAIrB,WAEC,GAAI/S,GAAQjQ,EAAS6N,cAAe,SACnCD,EAAM5N,EAAS6N,cAAe,OAC9BoV,EAAWjjB,EAASkjB,wBAsDrB,IAnDAtV,EAAIoC,UAAY,qEAGhBjP,EAAQoiB,kBAAgD,IAA5BvV,EAAI+D,WAAWpM,SAI3CxE,EAAQqiB,OAASxV,EAAIlB,qBAAsB,SAAU1K,OAIrDjB,EAAQsiB,gBAAkBzV,EAAIlB,qBAAsB,QAAS1K,OAI7DjB,EAAQuiB,WACyD,kBAAhEtjB,EAAS6N,cAAe,OAAQ0V,WAAW,GAAOC,UAInDvT,EAAMjL,KAAO,WACbiL,EAAM2E,SAAU,EAChBqO,EAAS1T,YAAaU,GACtBlP,EAAQ0iB,cAAgBxT,EAAM2E,QAI9BhH,EAAIoC,UAAY,yBAChBjP,EAAQ2iB,iBAAmB9V,EAAI2V,WAAW,GAAOjQ,UAAUyF,aAG3DkK,EAAS1T,YAAa3B,GACtBA,EAAIoC,UAAY,mDAIhBjP,EAAQ4iB,WAAa/V,EAAI2V,WAAW,GAAOA,WAAW,GAAOjQ,UAAUsB,QAKvE7T,EAAQ6iB,cAAe,EAClBhW,EAAIyB,cACRzB,EAAIyB,YAAa,UAAW,WAC3BtO,EAAQ6iB,cAAe,IAGxBhW,EAAI2V,WAAW,GAAOM,SAIM,MAAzB9iB,EAAQqf,cAAuB,CAElCrf,EAAQqf,eAAgB,CACxB,WACQxS,GAAIf,KACV,MAAOrH,GACRzE,EAAQqf,eAAgB,OAM3B,WACC,GAAIrd,GAAG+gB,EACNlW,EAAM5N,EAAS6N,cAAe,MAG/B,KAAM9K,KAAO4S,QAAQ,EAAMoO,QAAQ,EAAMC,SAAS,GACjDF,EAAY,KAAO/gB,GAEZhC,EAASgC,EAAI,WAAc+gB,IAAa3jB,MAE9CyN,EAAIb,aAAc+W,EAAW,KAC7B/iB,EAASgC,EAAI,WAAc6K,EAAIlE,WAAYoa,GAAYvf,WAAY,EAKrEqJ,GAAM,OAIP,IAAIqW,GAAa,+BAChBC,EAAY,OACZC,EAAc,uCACdC,EAAc,kCACdC,EAAiB,sBAElB,SAASC,MACR,OAAO,EAGR,QAASC,MACR,OAAO,EAGR,QAASC,MACR,IACC,MAAOxkB,GAASsU,cACf,MAAQmQ,KAOXxjB,EAAOue,OAEN5f,UAEAib,IAAK,SAAU/X,EAAM4hB,EAAOzW,EAAStI,EAAMzE,GAC1C,GAAIkG,GAAKud,EAAQC,EAAGC,EACnBC,EAASC,EAAaC,EACtBC,EAAUjgB,EAAMkgB,EAAYC,EAC5BC,EAAWnkB,EAAOwgB,MAAO3e,EAG1B,IAAMsiB,EAAN,CAKKnX,EAAQA,UACZ4W,EAAc5W,EACdA,EAAU4W,EAAY5W,QACtB/M,EAAW2jB,EAAY3jB,UAIlB+M,EAAQ/G,OACb+G,EAAQ/G,KAAOjG,EAAOiG,SAIhByd,EAASS,EAAST,UACxBA,EAASS,EAAST,YAEZI,EAAcK,EAASC,UAC7BN,EAAcK,EAASC,OAAS,SAAU7f,GAGzC,aAAcvE,KAAW4e,GAAkBra,GAAKvE,EAAOue,MAAM8F,YAAc9f,EAAER,KAE5EV,OADArD,EAAOue,MAAM+F,SAASviB,MAAO+hB,EAAYjiB,KAAMG,YAIjD8hB,EAAYjiB,KAAOA,GAIpB4hB,GAAUA,GAAS,IAAK5Y,MAAO0P,KAAiB,IAChDoJ,EAAIF,EAAM1iB,MACV,OAAQ4iB,IACPxd,EAAMid,EAAe/X,KAAMoY,EAAME,QACjC5f,EAAOmgB,EAAW/d,EAAI,GACtB8d,GAAe9d,EAAI,IAAM,IAAKG,MAAO,KAAM/D,OAGrCwB,IAKN8f,EAAU7jB,EAAOue,MAAMsF,QAAS9f,OAGhCA,GAAS9D,EAAW4jB,EAAQU,aAAeV,EAAQW,WAAczgB,EAGjE8f,EAAU7jB,EAAOue,MAAMsF,QAAS9f,OAGhCggB,EAAY/jB,EAAOyC,QAClBsB,KAAMA,EACNmgB,SAAUA,EACVxf,KAAMA,EACNsI,QAASA,EACT/G,KAAM+G,EAAQ/G,KACdhG,SAAUA,EACVyJ,aAAczJ,GAAYD,EAAOgQ,KAAKnF,MAAMnB,aAAakC,KAAM3L,GAC/DwkB,UAAWR,EAAWhY,KAAK,MACzB2X,IAGII,EAAWN,EAAQ3f,MACzBigB,EAAWN,EAAQ3f,MACnBigB,EAASU,cAAgB,EAGnBb,EAAQc,OAASd,EAAQc,MAAM1jB,KAAMY,EAAM6C,EAAMuf,EAAYH,MAAkB,IAE/EjiB,EAAKsM,iBACTtM,EAAKsM,iBAAkBpK,EAAM+f,GAAa,GAE/BjiB,EAAKuM,aAChBvM,EAAKuM,YAAa,KAAOrK,EAAM+f,KAK7BD,EAAQjK,MACZiK,EAAQjK,IAAI3Y,KAAMY,EAAMkiB,GAElBA,EAAU/W,QAAQ/G,OACvB8d,EAAU/W,QAAQ/G,KAAO+G,EAAQ/G,OAK9BhG,EACJ+jB,EAASxhB,OAAQwhB,EAASU,gBAAiB,EAAGX,GAE9CC,EAASxkB,KAAMukB,GAIhB/jB,EAAOue,MAAM5f,OAAQoF,IAAS,EAI/BlC,GAAO,OAIR2Z,OAAQ,SAAU3Z,EAAM4hB,EAAOzW,EAAS/M,EAAU2kB,GACjD,GAAIviB,GAAG0hB,EAAW5d,EACjB0e,EAAWlB,EAAGD,EACdG,EAASG,EAAUjgB,EACnBkgB,EAAYC,EACZC,EAAWnkB,EAAOsgB,QAASze,IAAU7B,EAAOwgB,MAAO3e,EAEpD,IAAMsiB,IAAcT,EAASS,EAAST,QAAtC,CAKAD,GAAUA,GAAS,IAAK5Y,MAAO0P,KAAiB,IAChDoJ,EAAIF,EAAM1iB,MACV,OAAQ4iB,IAMP,GALAxd,EAAMid,EAAe/X,KAAMoY,EAAME,QACjC5f,EAAOmgB,EAAW/d,EAAI,GACtB8d,GAAe9d,EAAI,IAAM,IAAKG,MAAO,KAAM/D,OAGrCwB,EAAN,CAOA8f,EAAU7jB,EAAOue,MAAMsF,QAAS9f,OAChCA,GAAS9D,EAAW4jB,EAAQU,aAAeV,EAAQW,WAAczgB,EACjEigB,EAAWN,EAAQ3f,OACnBoC,EAAMA,EAAI,IAAM,GAAIyC,QAAQ,UAAYqb,EAAWhY,KAAK,iBAAmB,WAG3E4Y,EAAYxiB,EAAI2hB,EAASjjB,MACzB,OAAQsB,IACP0hB,EAAYC,EAAU3hB,IAEfuiB,GAAeV,IAAaH,EAAUG,UACzClX,GAAWA,EAAQ/G,OAAS8d,EAAU9d,MACtCE,IAAOA,EAAIyF,KAAMmY,EAAUU,YAC3BxkB,GAAYA,IAAa8jB,EAAU9jB,WAAyB,OAAbA,IAAqB8jB,EAAU9jB,YACjF+jB,EAASxhB,OAAQH,EAAG,GAEf0hB,EAAU9jB,UACd+jB,EAASU,gBAELb,EAAQrI,QACZqI,EAAQrI,OAAOva,KAAMY,EAAMkiB,GAOzBc,KAAcb,EAASjjB,SACrB8iB,EAAQiB,UAAYjB,EAAQiB,SAAS7jB,KAAMY,EAAMoiB,EAAYE,EAASC,WAAa,GACxFpkB,EAAO+kB,YAAaljB,EAAMkC,EAAMogB,EAASC,cAGnCV,GAAQ3f,QAtCf,KAAMA,IAAQ2f,GACb1jB,EAAOue,MAAM/C,OAAQ3Z,EAAMkC,EAAO0f,EAAOE,GAAK3W,EAAS/M,GAAU,EA0C/DD,GAAOoE,cAAesf,WACnBS,GAASC,OAIhBpkB,EAAOygB,YAAa5e,EAAM,aAI5BmjB,QAAS,SAAUzG,EAAO7Z,EAAM7C,EAAMojB,GACrC,GAAIb,GAAQc,EAAQ/X,EACnBgY,EAAYtB,EAAS1d,EAAKrE,EAC1BsjB,GAAcvjB,GAAQ9C,GACtBgF,EAAOnE,EAAOqB,KAAMsd,EAAO,QAAWA,EAAMxa,KAAOwa,EACnD0F,EAAarkB,EAAOqB,KAAMsd,EAAO,aAAgBA,EAAMkG,UAAUne,MAAM,OAKxE,IAHA6G,EAAMhH,EAAMtE,EAAOA,GAAQ9C,EAGJ,IAAlB8C,EAAKyC,UAAoC,IAAlBzC,EAAKyC,WAK5B6e,EAAYvX,KAAM7H,EAAO/D,EAAOue,MAAM8F,aAItCtgB,EAAKtE,QAAQ,MAAQ,IAEzBwkB,EAAalgB,EAAKuC,MAAM,KACxBvC,EAAOkgB,EAAWzX,QAClByX,EAAW1hB,QAEZ2iB,EAASnhB,EAAKtE,QAAQ,KAAO,GAAK,KAAOsE,EAGzCwa,EAAQA,EAAOve,EAAOsD,SACrBib,EACA,GAAIve,GAAOqlB,MAAOthB,EAAuB,gBAAVwa,IAAsBA,GAGtDA,EAAM+G,UAAYL,EAAe,EAAI,EACrC1G,EAAMkG,UAAYR,EAAWhY,KAAK,KAClCsS,EAAMgH,aAAehH,EAAMkG,UAC1B,GAAI7b,QAAQ,UAAYqb,EAAWhY,KAAK,iBAAmB,WAC3D,KAGDsS,EAAM5M,OAAStO,OACTkb,EAAMvb,SACXub,EAAMvb,OAASnB,GAIhB6C,EAAe,MAARA,GACJ6Z,GACFve,EAAOoF,UAAWV,GAAQ6Z,IAG3BsF,EAAU7jB,EAAOue,MAAMsF,QAAS9f,OAC1BkhB,IAAgBpB,EAAQmB,SAAWnB,EAAQmB,QAAQjjB,MAAOF,EAAM6C,MAAW,GAAjF,CAMA,IAAMugB,IAAiBpB,EAAQ2B,WAAaxlB,EAAOiE,SAAUpC,GAAS,CAMrE,IAJAsjB,EAAatB,EAAQU,cAAgBxgB,EAC/Bof,EAAYvX,KAAMuZ,EAAaphB,KACpCoJ,EAAMA,EAAI5B,YAEH4B,EAAKA,EAAMA,EAAI5B,WACtB6Z,EAAU5lB,KAAM2N,GAChBhH,EAAMgH,CAIFhH,MAAStE,EAAKuJ,eAAiBrM,IACnCqmB,EAAU5lB,KAAM2G,EAAI8H,aAAe9H,EAAIsf,cAAgBvmB,GAKzD4C,EAAI,CACJ,QAASqL,EAAMiY,EAAUtjB,QAAUyc,EAAMmH,uBAExCnH,EAAMxa,KAAOjC,EAAI,EAChBqjB,EACAtB,EAAQW,UAAYzgB,EAGrBqgB,GAAWpkB,EAAOwgB,MAAOrT,EAAK,eAAoBoR,EAAMxa,OAAU/D,EAAOwgB,MAAOrT,EAAK,UAChFiX,GACJA,EAAOriB,MAAOoL,EAAKzI,GAIpB0f,EAASc,GAAU/X,EAAK+X,GACnBd,GAAUA,EAAOriB,OAAS/B,EAAOof,WAAYjS,KACjDoR,EAAM5M,OAASyS,EAAOriB,MAAOoL,EAAKzI,GAC7B6Z,EAAM5M,UAAW,GACrB4M,EAAMoH,iBAOT,IAHApH,EAAMxa,KAAOA,GAGPkhB,IAAiB1G,EAAMqH,wBAErB/B,EAAQgC,UAAYhC,EAAQgC,SAAS9jB,MAAOqjB,EAAUld,MAAOxD,MAAW,IAC9E1E,EAAOof,WAAYvd,IAKdqjB,GAAUrjB,EAAMkC,KAAW/D,EAAOiE,SAAUpC,GAAS,CAGzDsE,EAAMtE,EAAMqjB,GAEP/e,IACJtE,EAAMqjB,GAAW,MAIlBllB,EAAOue,MAAM8F,UAAYtgB,CACzB,KACClC,EAAMkC,KACL,MAAQQ,IAIVvE,EAAOue,MAAM8F,UAAYhhB,OAEpB8C,IACJtE,EAAMqjB,GAAW/e,GAMrB,MAAOoY,GAAM5M,SAGd2S,SAAU,SAAU/F,GAGnBA,EAAQve,EAAOue,MAAMuH,IAAKvH,EAE1B,IAAIzc,GAAGR,EAAKyiB,EAAWtR,EAASpQ,EAC/B0jB,KACApkB,EAAOrC,EAAM2B,KAAMe,WACnBgiB,GAAahkB,EAAOwgB,MAAOrhB,KAAM,eAAoBof,EAAMxa,UAC3D8f,EAAU7jB,EAAOue,MAAMsF,QAAStF,EAAMxa,SAOvC,IAJApC,EAAK,GAAK4c,EACVA,EAAMyH,eAAiB7mB,MAGlB0kB,EAAQoC,aAAepC,EAAQoC,YAAYhlB,KAAM9B,KAAMof,MAAY,EAAxE,CAKAwH,EAAe/lB,EAAOue,MAAMyF,SAAS/iB,KAAM9B,KAAMof,EAAOyF,GAGxDliB,EAAI,CACJ,QAAS2Q,EAAUsT,EAAcjkB,QAAWyc,EAAMmH,uBAAyB,CAC1EnH,EAAM2H,cAAgBzT,EAAQ5Q,KAE9BQ,EAAI,CACJ,QAAS0hB,EAAYtR,EAAQuR,SAAU3hB,QAAWkc,EAAM4H,kCAIjD5H,EAAMgH,cAAgBhH,EAAMgH,aAAa3Z,KAAMmY,EAAUU,cAE9DlG,EAAMwF,UAAYA,EAClBxF,EAAM7Z,KAAOqf,EAAUrf,KAEvBpD,IAAStB,EAAOue,MAAMsF,QAASE,EAAUG,eAAkBE,QAAUL,EAAU/W,SAC5EjL,MAAO0Q,EAAQ5Q,KAAMF,GAEX0B,SAAR/B,IACEid,EAAM5M,OAASrQ,MAAS,IAC7Bid,EAAMoH,iBACNpH,EAAM6H,oBAYX,MAJKvC,GAAQwC,cACZxC,EAAQwC,aAAaplB,KAAM9B,KAAMof,GAG3BA,EAAM5M,SAGdqS,SAAU,SAAUzF,EAAOyF,GAC1B,GAAIsC,GAAKvC,EAAWje,EAAShE,EAC5BikB,KACArB,EAAgBV,EAASU,cACzBvX,EAAMoR,EAAMvb,MAKb,IAAK0hB,GAAiBvX,EAAI7I,YAAcia,EAAMvK,QAAyB,UAAfuK,EAAMxa,MAG7D,KAAQoJ,GAAOhO,KAAMgO,EAAMA,EAAI5B,YAAcpM,KAK5C,GAAsB,IAAjBgO,EAAI7I,WAAmB6I,EAAIuG,YAAa,GAAuB,UAAf6K,EAAMxa,MAAoB,CAE9E,IADA+B,KACMhE,EAAI,EAAO4iB,EAAJ5iB,EAAmBA,IAC/BiiB,EAAYC,EAAUliB,GAGtBwkB,EAAMvC,EAAU9jB,SAAW,IAEHoD,SAAnByC,EAASwgB,KACbxgB,EAASwgB,GAAQvC,EAAUra,aAC1B1J,EAAQsmB,EAAKnnB,MAAOua,MAAOvM,IAAS,EACpCnN,EAAO0O,KAAM4X,EAAKnnB,KAAM,MAAQgO,IAAQpM,QAErC+E,EAASwgB,IACbxgB,EAAQtG,KAAMukB,EAGXje,GAAQ/E,QACZglB,EAAavmB,MAAOqC,KAAMsL,EAAK6W,SAAUle,IAW7C,MAJK4e,GAAgBV,EAASjjB,QAC7BglB,EAAavmB,MAAOqC,KAAM1C,KAAM6kB,SAAUA,EAAS1kB,MAAOolB,KAGpDqB,GAGRD,IAAK,SAAUvH,GACd,GAAKA,EAAOve,EAAOsD,SAClB,MAAOib,EAIR,IAAIzc,GAAGykB,EAAM3jB,EACZmB,EAAOwa,EAAMxa,KACbyiB,EAAgBjI,EAChBkI,EAAUtnB,KAAKunB,SAAU3iB,EAEpB0iB,KACLtnB,KAAKunB,SAAU3iB,GAAS0iB,EACvBvD,EAAYtX,KAAM7H,GAAS5E,KAAKwnB,WAChC1D,EAAUrX,KAAM7H,GAAS5E,KAAKynB,aAGhChkB,EAAO6jB,EAAQI,MAAQ1nB,KAAK0nB,MAAMtnB,OAAQknB,EAAQI,OAAU1nB,KAAK0nB,MAEjEtI,EAAQ,GAAIve,GAAOqlB,MAAOmB,GAE1B1kB,EAAIc,EAAK7B,MACT,OAAQe,IACPykB,EAAO3jB,EAAMd,GACbyc,EAAOgI,GAASC,EAAeD,EAmBhC,OAdMhI,GAAMvb,SACXub,EAAMvb,OAASwjB,EAAcM,YAAc/nB,GAKb,IAA1Bwf,EAAMvb,OAAOsB,WACjBia,EAAMvb,OAASub,EAAMvb,OAAOuI,YAK7BgT,EAAMwI,UAAYxI,EAAMwI,QAEjBN,EAAQ9X,OAAS8X,EAAQ9X,OAAQ4P,EAAOiI,GAAkBjI,GAIlEsI,MAAO,wHAAwHvgB,MAAM,KAErIogB,YAEAE,UACCC,MAAO,4BAA4BvgB,MAAM,KACzCqI,OAAQ,SAAU4P,EAAOyI,GAOxB,MAJoB,OAAfzI,EAAM0I,QACV1I,EAAM0I,MAA6B,MAArBD,EAASE,SAAmBF,EAASE,SAAWF,EAASG,SAGjE5I,IAIToI,YACCE,MAAO,mGAAmGvgB,MAAM,KAChHqI,OAAQ,SAAU4P,EAAOyI,GACxB,GAAIjJ,GAAMqJ,EAAUpZ,EACnBgG,EAASgT,EAAShT,OAClBqT,EAAcL,EAASK,WAuBxB,OApBoB,OAAf9I,EAAM+I,OAAqC,MAApBN,EAASO,UACpCH,EAAW7I,EAAMvb,OAAOoI,eAAiBrM,EACzCiP,EAAMoZ,EAASxZ,gBACfmQ,EAAOqJ,EAASrJ,KAEhBQ,EAAM+I,MAAQN,EAASO,SAAYvZ,GAAOA,EAAIwZ,YAAczJ,GAAQA,EAAKyJ,YAAc,IAAQxZ,GAAOA,EAAIyZ,YAAc1J,GAAQA,EAAK0J,YAAc,GACnJlJ,EAAMmJ,MAAQV,EAASW,SAAY3Z,GAAOA,EAAI4Z,WAAc7J,GAAQA,EAAK6J,WAAc,IAAQ5Z,GAAOA,EAAI6Z,WAAc9J,GAAQA,EAAK8J,WAAc,KAI9ItJ,EAAMuJ,eAAiBT,IAC5B9I,EAAMuJ,cAAgBT,IAAgB9I,EAAMvb,OAASgkB,EAASe,UAAYV,GAKrE9I,EAAM0I,OAAoB5jB,SAAX2Q,IACpBuK,EAAM0I,MAAmB,EAATjT,EAAa,EAAe,EAATA,EAAa,EAAe,EAATA,EAAa,EAAI,GAGjEuK,IAITsF,SACCmE,MAECxC,UAAU,GAEXpS,OAEC4R,QAAS,WACR,GAAK7lB,OAASokB,MAAuBpkB,KAAKiU,MACzC,IAEC,MADAjU,MAAKiU,SACE,EACN,MAAQ7O,MAOZggB,aAAc,WAEf0D,MACCjD,QAAS,WACR,MAAK7lB,QAASokB,MAAuBpkB,KAAK8oB,MACzC9oB,KAAK8oB,QACE,GAFR,QAKD1D,aAAc,YAEf3B,OAECoC,QAAS,WACR,MAAKhlB,GAAO+E,SAAU5F,KAAM,UAA2B,aAAdA,KAAK4E,MAAuB5E,KAAKyjB,OACzEzjB,KAAKyjB,SACE,GAFR,QAODiD,SAAU,SAAUtH,GACnB,MAAOve,GAAO+E,SAAUwZ,EAAMvb,OAAQ,OAIxCklB,cACC7B,aAAc,SAAU9H,GAIDlb,SAAjBkb,EAAM5M,QAAwB4M,EAAMiI,gBACxCjI,EAAMiI,cAAc2B,YAAc5J,EAAM5M,WAM5CyW,SAAU,SAAUrkB,EAAMlC,EAAM0c,EAAO8J,GAItC,GAAI9jB,GAAIvE,EAAOyC,OACd,GAAIzC,GAAOqlB,MACX9G,GAECxa,KAAMA,EACNukB,aAAa,EACb9B,kBAGG6B,GACJroB,EAAOue,MAAMyG,QAASzgB,EAAG,KAAM1C,GAE/B7B,EAAOue,MAAM+F,SAASrjB,KAAMY,EAAM0C,GAE9BA,EAAEqhB,sBACNrH,EAAMoH,mBAKT3lB,EAAO+kB,YAAchmB,EAASqf,oBAC7B,SAAUvc,EAAMkC,EAAMqgB,GAChBviB,EAAKuc,qBACTvc,EAAKuc,oBAAqBra,EAAMqgB,GAAQ,IAG1C,SAAUviB,EAAMkC,EAAMqgB,GACrB,GAAIvhB,GAAO,KAAOkB,CAEblC,GAAKyc,oBAIGzc,GAAMgB,KAAW+b,IAC5B/c,EAAMgB,GAAS,MAGhBhB,EAAKyc,YAAazb,EAAMuhB,KAI3BpkB,EAAOqlB,MAAQ,SAAU3iB,EAAKmkB,GAE7B,MAAO1nB,gBAAgBa,GAAOqlB,OAKzB3iB,GAAOA,EAAIqB,MACf5E,KAAKqnB,cAAgB9jB,EACrBvD,KAAK4E,KAAOrB,EAAIqB,KAIhB5E,KAAKymB,mBAAqBljB,EAAI6lB,kBACHllB,SAAzBX,EAAI6lB,kBAEJ7lB,EAAIylB,eAAgB,EACrB9E,GACAC,IAIDnkB,KAAK4E,KAAOrB,EAIRmkB,GACJ7mB,EAAOyC,OAAQtD,KAAM0nB,GAItB1nB,KAAKqpB,UAAY9lB,GAAOA,EAAI8lB,WAAaxoB,EAAOoG,WAGhDjH,KAAMa,EAAOsD,UAAY,IA/BjB,GAAItD,GAAOqlB,MAAO3iB,EAAKmkB,IAoChC7mB,EAAOqlB,MAAMzkB,WACZglB,mBAAoBtC,GACpBoC,qBAAsBpC,GACtB6C,8BAA+B7C,GAE/BqC,eAAgB,WACf,GAAIphB,GAAIpF,KAAKqnB,aAEbrnB,MAAKymB,mBAAqBvC,GACpB9e,IAKDA,EAAEohB,eACNphB,EAAEohB,iBAKFphB,EAAE4jB,aAAc,IAGlB/B,gBAAiB,WAChB,GAAI7hB,GAAIpF,KAAKqnB,aAEbrnB,MAAKumB,qBAAuBrC,GACtB9e,IAIDA,EAAE6hB,iBACN7hB,EAAE6hB,kBAKH7hB,EAAEkkB,cAAe,IAElBC,yBAA0B,WACzB,GAAInkB,GAAIpF,KAAKqnB,aAEbrnB,MAAKgnB,8BAAgC9C,GAEhC9e,GAAKA,EAAEmkB,0BACXnkB,EAAEmkB,2BAGHvpB,KAAKinB,oBAKPpmB,EAAOyB,MACNknB,WAAY,YACZC,WAAY,WACZC,aAAc,cACdC,aAAc,cACZ,SAAUC,EAAMjD,GAClB9lB,EAAOue,MAAMsF,QAASkF,IACrBxE,aAAcuB,EACdtB,SAAUsB,EAEV1B,OAAQ,SAAU7F,GACjB,GAAIjd,GACH0B,EAAS7D,KACT6pB,EAAUzK,EAAMuJ,cAChB/D,EAAYxF,EAAMwF,SASnB,SALMiF,GAAYA,IAAYhmB,IAAWhD,EAAOsH,SAAUtE,EAAQgmB,MACjEzK,EAAMxa,KAAOggB,EAAUG,SACvB5iB,EAAMyiB,EAAU/W,QAAQjL,MAAO5C,KAAM6C,WACrCuc,EAAMxa,KAAO+hB,GAEPxkB,MAMJxB,EAAQmpB,gBAEbjpB,EAAOue,MAAMsF,QAAQnP,QACpBiQ,MAAO,WAEN,MAAK3kB,GAAO+E,SAAU5F,KAAM,SACpB,MAIRa,GAAOue,MAAM3E,IAAKza,KAAM,iCAAkC,SAAUoF,GAEnE,GAAI1C,GAAO0C,EAAEvB,OACZkmB,EAAOlpB,EAAO+E,SAAUlD,EAAM,UAAa7B,EAAO+E,SAAUlD,EAAM,UAAaA,EAAKqnB,KAAO7lB,MACvF6lB,KAASlpB,EAAOwgB,MAAO0I,EAAM,mBACjClpB,EAAOue,MAAM3E,IAAKsP,EAAM,iBAAkB,SAAU3K,GACnDA,EAAM4K,gBAAiB,IAExBnpB,EAAOwgB,MAAO0I,EAAM,iBAAiB,OAMxC7C,aAAc,SAAU9H,GAElBA,EAAM4K,uBACH5K,GAAM4K,eACRhqB,KAAKoM,aAAegT,EAAM+G,WAC9BtlB,EAAOue,MAAM6J,SAAU,SAAUjpB,KAAKoM,WAAYgT,GAAO,KAK5DuG,SAAU,WAET,MAAK9kB,GAAO+E,SAAU5F,KAAM,SACpB,MAIRa,GAAOue,MAAM/C,OAAQrc,KAAM,eAMxBW,EAAQspB,gBAEbppB,EAAOue,MAAMsF,QAAQf,QAEpB6B,MAAO,WAEN,MAAK3B,GAAWpX,KAAMzM,KAAK4F,YAIP,aAAd5F,KAAK4E,MAAqC,UAAd5E,KAAK4E,QACrC/D,EAAOue,MAAM3E,IAAKza,KAAM,yBAA0B,SAAUof,GACjB,YAArCA,EAAMiI,cAAc6C,eACxBlqB,KAAKmqB,eAAgB,KAGvBtpB,EAAOue,MAAM3E,IAAKza,KAAM,gBAAiB,SAAUof,GAC7Cpf,KAAKmqB,gBAAkB/K,EAAM+G,YACjCnmB,KAAKmqB,eAAgB,GAGtBtpB,EAAOue,MAAM6J,SAAU,SAAUjpB,KAAMof,GAAO,OAGzC,OAGRve,GAAOue,MAAM3E,IAAKza,KAAM,yBAA0B,SAAUoF,GAC3D,GAAI1C,GAAO0C,EAAEvB,MAERggB,GAAWpX,KAAM/J,EAAKkD,YAAe/E,EAAOwgB,MAAO3e,EAAM,mBAC7D7B,EAAOue,MAAM3E,IAAK/X,EAAM,iBAAkB,SAAU0c,IAC9Cpf,KAAKoM,YAAegT,EAAM+J,aAAgB/J,EAAM+G,WACpDtlB,EAAOue,MAAM6J,SAAU,SAAUjpB,KAAKoM,WAAYgT,GAAO,KAG3Dve,EAAOwgB,MAAO3e,EAAM,iBAAiB,OAKxCuiB,OAAQ,SAAU7F,GACjB,GAAI1c,GAAO0c,EAAMvb,MAGjB,OAAK7D,QAAS0C,GAAQ0c,EAAM+J,aAAe/J,EAAM+G,WAA4B,UAAdzjB,EAAKkC,MAAkC,aAAdlC,EAAKkC,KACrFwa,EAAMwF,UAAU/W,QAAQjL,MAAO5C,KAAM6C,WAD7C,QAKD8iB,SAAU,WAGT,MAFA9kB,GAAOue,MAAM/C,OAAQrc,KAAM,aAEnB6jB,EAAWpX,KAAMzM,KAAK4F,aAM3BjF,EAAQypB,gBACbvpB,EAAOyB,MAAO2R,MAAO,UAAW6U,KAAM,YAAc,SAAUc,EAAMjD,GAGnE,GAAI9Y,GAAU,SAAUuR,GACtBve,EAAOue,MAAM6J,SAAUtC,EAAKvH,EAAMvb,OAAQhD,EAAOue,MAAMuH,IAAKvH,IAAS,GAGvEve,GAAOue,MAAMsF,QAASiC,IACrBnB,MAAO,WACN,GAAI3W,GAAM7O,KAAKiM,eAAiBjM,KAC/BqqB,EAAWxpB,EAAOwgB,MAAOxS,EAAK8X,EAEzB0D,IACLxb,EAAIG,iBAAkB4a,EAAM/b,GAAS,GAEtChN,EAAOwgB,MAAOxS,EAAK8X,GAAO0D,GAAY,GAAM,IAE7C1E,SAAU,WACT,GAAI9W,GAAM7O,KAAKiM,eAAiBjM,KAC/BqqB,EAAWxpB,EAAOwgB,MAAOxS,EAAK8X,GAAQ,CAEjC0D,GAILxpB,EAAOwgB,MAAOxS,EAAK8X,EAAK0D,IAHxBxb,EAAIoQ,oBAAqB2K,EAAM/b,GAAS,GACxChN,EAAOygB,YAAazS,EAAK8X,QAS9B9lB,EAAOG,GAAGsC,QAETgnB,GAAI,SAAUhG,EAAOxjB,EAAUyE,EAAMvE,EAAiBupB,GACrD,GAAI3lB,GAAM4lB,CAGV,IAAsB,gBAAVlG,GAAqB,CAEP,gBAAbxjB,KAEXyE,EAAOA,GAAQzE,EACfA,EAAWoD,OAEZ,KAAMU,IAAQ0f,GACbtkB,KAAKsqB,GAAI1lB,EAAM9D,EAAUyE,EAAM+e,EAAO1f,GAAQ2lB,EAE/C,OAAOvqB,MAmBR,GAhBa,MAARuF,GAAsB,MAANvE,GAEpBA,EAAKF,EACLyE,EAAOzE,EAAWoD,QACD,MAANlD,IACc,gBAAbF,IAEXE,EAAKuE,EACLA,EAAOrB,SAGPlD,EAAKuE,EACLA,EAAOzE,EACPA,EAAWoD,SAGRlD,KAAO,EACXA,EAAKmjB,OACC,KAAMnjB,EACZ,MAAOhB,KAaR,OAVa,KAARuqB,IACJC,EAASxpB,EACTA,EAAK,SAAUoe,GAGd,MADAve,KAASke,IAAKK,GACPoL,EAAO5nB,MAAO5C,KAAM6C,YAG5B7B,EAAG8F,KAAO0jB,EAAO1jB,OAAU0jB,EAAO1jB,KAAOjG,EAAOiG,SAE1C9G,KAAKsC,KAAM,WACjBzB,EAAOue,MAAM3E,IAAKza,KAAMskB,EAAOtjB,EAAIuE,EAAMzE,MAG3CypB,IAAK,SAAUjG,EAAOxjB,EAAUyE,EAAMvE,GACrC,MAAOhB,MAAKsqB,GAAIhG,EAAOxjB,EAAUyE,EAAMvE,EAAI,IAE5C+d,IAAK,SAAUuF,EAAOxjB,EAAUE,GAC/B,GAAI4jB,GAAWhgB,CACf,IAAK0f,GAASA,EAAMkC,gBAAkBlC,EAAMM,UAQ3C,MANAA,GAAYN,EAAMM,UAClB/jB,EAAQyjB,EAAMuC,gBAAiB9H,IAC9B6F,EAAUU,UAAYV,EAAUG,SAAW,IAAMH,EAAUU,UAAYV,EAAUG,SACjFH,EAAU9jB,SACV8jB,EAAU/W,SAEJ7N,IAER,IAAsB,gBAAVskB,GAAqB,CAEhC,IAAM1f,IAAQ0f,GACbtkB,KAAK+e,IAAKna,EAAM9D,EAAUwjB,EAAO1f,GAElC,OAAO5E,MAUR,OARKc,KAAa,GAA6B,kBAAbA,MAEjCE,EAAKF,EACLA,EAAWoD,QAEPlD,KAAO,IACXA,EAAKmjB,IAECnkB,KAAKsC,KAAK,WAChBzB,EAAOue,MAAM/C,OAAQrc,KAAMskB,EAAOtjB,EAAIF,MAIxC+kB,QAAS,SAAUjhB,EAAMW,GACxB,MAAOvF,MAAKsC,KAAK,WAChBzB,EAAOue,MAAMyG,QAASjhB,EAAMW,EAAMvF,SAGpC8e,eAAgB,SAAUla,EAAMW,GAC/B,GAAI7C,GAAO1C,KAAK,EAChB,OAAK0C,GACG7B,EAAOue,MAAMyG,QAASjhB,EAAMW,EAAM7C,GAAM,GADhD,SAOF,SAAS+nB,IAAoB7qB,GAC5B,GAAIqJ,GAAOyhB,GAAUvjB,MAAO,KAC3BwjB,EAAW/qB,EAASkjB,wBAErB,IAAK6H,EAASld,cACb,MAAQxE,EAAKrH,OACZ+oB,EAASld,cACRxE,EAAKF,MAIR,OAAO4hB,GAGR,GAAID,IAAY,6JAEfE,GAAgB,6BAChBC,GAAe,GAAIphB,QAAO,OAASihB,GAAY,WAAY,KAC3DI,GAAqB,OACrBC,GAAY,0EACZC,GAAW,YACXC,GAAS,UACTC,GAAQ,YACRC,GAAe,0BAEfC,GAAW,oCACXC,GAAc,4BACdC,GAAoB,cACpBC,GAAe,2CAGfC,IACCC,QAAU,EAAG,+BAAgC,aAC7CC,QAAU,EAAG,aAAc,eAC3BC,MAAQ,EAAG,QAAS,UACpBC,OAAS,EAAG,WAAY,aACxBC,OAAS,EAAG,UAAW,YACvBC,IAAM,EAAG,iBAAkB,oBAC3BC,KAAO,EAAG,mCAAoC,uBAC9CC,IAAM,EAAG,qBAAsB,yBAI/BtF,SAAU/lB,EAAQsiB,eAAkB,EAAG,GAAI,KAAS,EAAG,SAAU,WAElEgJ,GAAexB,GAAoB7qB,GACnCssB,GAAcD,GAAa9c,YAAavP,EAAS6N,cAAc,OAEhE+d,IAAQW,SAAWX,GAAQC,OAC3BD,GAAQxI,MAAQwI,GAAQY,MAAQZ,GAAQa,SAAWb,GAAQc,QAAUd,GAAQK,MAC7EL,GAAQe,GAAKf,GAAQQ,EAErB,SAASQ,IAAQzrB,EAAS4O,GACzB,GAAIzN,GAAOQ,EACVC,EAAI,EACJ8pB,QAAe1rB,GAAQuL,uBAAyBmT,EAAe1e,EAAQuL,qBAAsBqD,GAAO,WAC5F5O,GAAQgM,mBAAqB0S,EAAe1e,EAAQgM,iBAAkB4C,GAAO,KACpFzL,MAEF,KAAMuoB,EACL,IAAMA,KAAYvqB,EAAQnB,EAAQwK,YAAcxK,EAA8B,OAApB2B,EAAOR,EAAMS,IAAaA,KAC7EgN,GAAO9O,EAAO+E,SAAUlD,EAAMiN,GACnC8c,EAAMpsB,KAAMqC,GAEZ7B,EAAOuB,MAAOqqB,EAAOD,GAAQ9pB,EAAMiN,GAKtC,OAAezL,UAARyL,GAAqBA,GAAO9O,EAAO+E,SAAU7E,EAAS4O,GAC5D9O,EAAOuB,OAASrB,GAAW0rB,GAC3BA,EAIF,QAASC,IAAmBhqB,GACtBkgB,EAAenW,KAAM/J,EAAKkC,QAC9BlC,EAAKiqB,eAAiBjqB,EAAK8R,SAM7B,QAASoY,IAAoBlqB,EAAMmqB,GAClC,MAAOhsB,GAAO+E,SAAUlD,EAAM,UAC7B7B,EAAO+E,SAA+B,KAArBinB,EAAQ1nB,SAAkB0nB,EAAUA,EAAQtb,WAAY,MAEzE7O,EAAK4J,qBAAqB,SAAS,IAClC5J,EAAKyM,YAAazM,EAAKuJ,cAAcwB,cAAc,UACpD/K,EAIF,QAASoqB,IAAepqB,GAEvB,MADAA,GAAKkC,MAA6C,OAArC/D,EAAO0O,KAAKwB,KAAMrO,EAAM,SAAqB,IAAMA,EAAKkC,KAC9DlC,EAER,QAASqqB,IAAerqB,GACvB,GAAIgJ,GAAQ4f,GAAkBpf,KAAMxJ,EAAKkC,KAMzC,OALK8G,GACJhJ,EAAKkC,KAAO8G,EAAM,GAElBhJ,EAAKuK,gBAAgB,QAEfvK,EAIR,QAASsqB,IAAe9qB,EAAO+qB,GAG9B,IAFA,GAAIvqB,GACHC,EAAI,EACwB,OAApBD,EAAOR,EAAMS,IAAaA,IAClC9B,EAAOwgB,MAAO3e,EAAM,cAAeuqB,GAAepsB,EAAOwgB,MAAO4L,EAAYtqB,GAAI,eAIlF,QAASuqB,IAAgB3pB,EAAK4pB,GAE7B,GAAuB,IAAlBA,EAAKhoB,UAAmBtE,EAAOsgB,QAAS5d,GAA7C,CAIA,GAAIqB,GAAMjC,EAAG0X,EACZ+S,EAAUvsB,EAAOwgB,MAAO9d,GACxB8pB,EAAUxsB,EAAOwgB,MAAO8L,EAAMC,GAC9B7I,EAAS6I,EAAQ7I,MAElB,IAAKA,EAAS,OACN8I,GAAQpI,OACfoI,EAAQ9I,SAER,KAAM3f,IAAQ2f,GACb,IAAM5hB,EAAI,EAAG0X,EAAIkK,EAAQ3f,GAAOhD,OAAYyY,EAAJ1X,EAAOA,IAC9C9B,EAAOue,MAAM3E,IAAK0S,EAAMvoB,EAAM2f,EAAQ3f,GAAQjC,IAM5C0qB,EAAQ9nB,OACZ8nB,EAAQ9nB,KAAO1E,EAAOyC,UAAY+pB,EAAQ9nB,QAI5C,QAAS+nB,IAAoB/pB,EAAK4pB,GACjC,GAAIvnB,GAAUR,EAAGG,CAGjB,IAAuB,IAAlB4nB,EAAKhoB,SAAV,CAOA,GAHAS,EAAWunB,EAAKvnB,SAASC,eAGnBlF,EAAQ6iB,cAAgB2J,EAAMtsB,EAAOsD,SAAY,CACtDoB,EAAO1E,EAAOwgB,MAAO8L,EAErB,KAAM/nB,IAAKG,GAAKgf,OACf1jB,EAAO+kB,YAAauH,EAAM/nB,EAAGG,EAAK0f,OAInCkI,GAAKlgB,gBAAiBpM,EAAOsD,SAIZ,WAAbyB,GAAyBunB,EAAKnnB,OAASzC,EAAIyC,MAC/C8mB,GAAeK,GAAOnnB,KAAOzC,EAAIyC,KACjC+mB,GAAeI,IAIS,WAAbvnB,GACNunB,EAAK/gB,aACT+gB,EAAK/J,UAAY7f,EAAI6f,WAOjBziB,EAAQuiB,YAAgB3f,EAAIqM,YAAc/O,EAAO2E,KAAK2nB,EAAKvd,aAC/Dud,EAAKvd,UAAYrM,EAAIqM,YAGE,UAAbhK,GAAwBgd,EAAenW,KAAMlJ,EAAIqB,OAK5DuoB,EAAKR,eAAiBQ,EAAK3Y,QAAUjR,EAAIiR,QAIpC2Y,EAAKrnB,QAAUvC,EAAIuC,QACvBqnB,EAAKrnB,MAAQvC,EAAIuC,QAKM,WAAbF,EACXunB,EAAKI,gBAAkBJ,EAAK1Y,SAAWlR,EAAIgqB,iBAInB,UAAb3nB,GAAqC,aAAbA,KACnCunB,EAAKxU,aAAepV,EAAIoV,eAI1B9X,EAAOyC,QACNM,MAAO,SAAUlB,EAAM8qB,EAAeC,GACrC,GAAIC,GAAchf,EAAM9K,EAAOjB,EAAGgrB,EACjCC,EAAS/sB,EAAOsH,SAAUzF,EAAKuJ,cAAevJ,EAW/C,IATK/B,EAAQuiB,YAAcriB,EAAOgY,SAASnW,KAAUmoB,GAAape,KAAM,IAAM/J,EAAKkD,SAAW,KAC7FhC,EAAQlB,EAAKygB,WAAW,IAIxB+I,GAAYtc,UAAYlN,EAAK0gB,UAC7B8I,GAAYxe,YAAa9J,EAAQsoB,GAAY3a,eAGvC5Q,EAAQ6iB,cAAiB7iB,EAAQ2iB,gBACnB,IAAlB5gB,EAAKyC,UAAoC,KAAlBzC,EAAKyC,UAAqBtE,EAAOgY,SAASnW,IAOnE,IAJAgrB,EAAelB,GAAQ5oB,GACvB+pB,EAAcnB,GAAQ9pB,GAGhBC,EAAI,EAA8B,OAA1B+L,EAAOif,EAAYhrB,MAAeA,EAE1C+qB,EAAa/qB,IACjB2qB,GAAoB5e,EAAMgf,EAAa/qB,GAM1C,IAAK6qB,EACJ,GAAKC,EAIJ,IAHAE,EAAcA,GAAenB,GAAQ9pB,GACrCgrB,EAAeA,GAAgBlB,GAAQ5oB,GAEjCjB,EAAI,EAA8B,OAA1B+L,EAAOif,EAAYhrB,IAAaA,IAC7CuqB,GAAgBxe,EAAMgf,EAAa/qB,QAGpCuqB,IAAgBxqB,EAAMkB,EAaxB,OARA8pB,GAAelB,GAAQ5oB,EAAO,UACzB8pB,EAAa9rB,OAAS,GAC1BorB,GAAeU,GAAeE,GAAUpB,GAAQ9pB,EAAM,WAGvDgrB,EAAeC,EAAcjf,EAAO,KAG7B9K,GAGRiqB,cAAe,SAAU3rB,EAAOnB,EAAS+sB,EAASC,GAWjD,IAVA,GAAI7qB,GAAGR,EAAMyF,EACZnB,EAAK2I,EAAKqT,EAAOgL,EACjB3T,EAAInY,EAAMN,OAGVqsB,EAAOxD,GAAoB1pB,GAE3BmtB,KACAvrB,EAAI,EAEO0X,EAAJ1X,EAAOA,IAGd,GAFAD,EAAOR,EAAOS,GAETD,GAAiB,IAATA,EAGZ,GAA6B,WAAxB7B,EAAO+D,KAAMlC,GACjB7B,EAAOuB,MAAO8rB,EAAOxrB,EAAKyC,UAAazC,GAASA,OAG1C,IAAMwoB,GAAMze,KAAM/J,GAIlB,CACNsE,EAAMA,GAAOinB,EAAK9e,YAAapO,EAAQ0M,cAAc,QAGrDkC,GAAOqb,GAAS9e,KAAMxJ,KAAY,GAAI,KAAO,GAAImD,cACjDmoB,EAAOxC,GAAS7b,IAAS6b,GAAQ9E,SAEjC1f,EAAI4I,UAAYoe,EAAK,GAAKtrB,EAAK4B,QAASymB,GAAW,aAAgBiD,EAAK,GAGxE9qB,EAAI8qB,EAAK,EACT,OAAQ9qB,IACP8D,EAAMA,EAAIkM,SASX,KALMvS,EAAQoiB,mBAAqB+H,GAAmBre,KAAM/J,IAC3DwrB,EAAM7tB,KAAMU,EAAQotB,eAAgBrD,GAAmB5e,KAAMxJ,GAAO,MAI/D/B,EAAQqiB,MAAQ,CAGrBtgB,EAAe,UAARiN,GAAoBsb,GAAOxe,KAAM/J,GAI3B,YAAZsrB,EAAK,IAAqB/C,GAAOxe,KAAM/J,GAEtC,EADAsE,EAJDA,EAAIuK,WAOLrO,EAAIR,GAAQA,EAAK6I,WAAW3J,MAC5B,OAAQsB,IACFrC,EAAO+E,SAAWod,EAAQtgB,EAAK6I,WAAWrI,GAAK,WAAc8f,EAAMzX,WAAW3J,QAClFc,EAAKgL,YAAasV,GAKrBniB,EAAOuB,MAAO8rB,EAAOlnB,EAAIuE,YAGzBvE,EAAIsK,YAAc,EAGlB,OAAQtK,EAAIuK,WACXvK,EAAI0G,YAAa1G,EAAIuK,WAItBvK,GAAMinB,EAAK/a,cAtDXgb,GAAM7tB,KAAMU,EAAQotB,eAAgBzrB,GA4DlCsE,IACJinB,EAAKvgB,YAAa1G,GAKbrG,EAAQ0iB,eACbxiB,EAAO2F,KAAMgmB,GAAQ0B,EAAO,SAAWxB,IAGxC/pB,EAAI,CACJ,OAASD,EAAOwrB,EAAOvrB,KAItB,KAAKorB,GAAmD,KAAtCltB,EAAOwF,QAAS3D,EAAMqrB,MAIxC5lB,EAAWtH,EAAOsH,SAAUzF,EAAKuJ,cAAevJ,GAGhDsE,EAAMwlB,GAAQyB,EAAK9e,YAAazM,GAAQ,UAGnCyF,GACJ6kB,GAAehmB,GAIX8mB,GAAU,CACd5qB,EAAI,CACJ,OAASR,EAAOsE,EAAK9D,KACfmoB,GAAY5e,KAAM/J,EAAKkC,MAAQ,KACnCkpB,EAAQztB,KAAMqC,GAQlB,MAFAsE,GAAM,KAECinB,GAGRlN,UAAW,SAAU7e,EAAsB+d,GAQ1C,IAPA,GAAIvd,GAAMkC,EAAMyH,EAAI9G,EACnB5C,EAAI,EACJge,EAAc9f,EAAOsD,QACrBgJ,EAAQtM,EAAOsM,MACf6S,EAAgBrf,EAAQqf,cACxB0E,EAAU7jB,EAAOue,MAAMsF,QAEK,OAApBhiB,EAAOR,EAAMS,IAAaA,IAClC,IAAKsd,GAAcpf,EAAOof,WAAYvd,MAErC2J,EAAK3J,EAAMie,GACXpb,EAAO8G,GAAMc,EAAOd,IAER,CACX,GAAK9G,EAAKgf,OACT,IAAM3f,IAAQW,GAAKgf,OACbG,EAAS9f,GACb/D,EAAOue,MAAM/C,OAAQ3Z,EAAMkC,GAI3B/D,EAAO+kB,YAAaljB,EAAMkC,EAAMW,EAAK0f,OAMnC9X,GAAOd,WAEJc,GAAOd,GAKT2T,QACGtd,GAAMie,SAEKje,GAAKuK,kBAAoBwS,EAC3C/c,EAAKuK,gBAAiB0T,GAGtBje,EAAMie,GAAgB,KAGvBzgB,EAAWG,KAAMgM,QAQvBxL,EAAOG,GAAGsC,QACT0C,KAAM,SAAUF,GACf,MAAOyc,GAAQviB,KAAM,SAAU8F,GAC9B,MAAiB5B,UAAV4B,EACNjF,EAAOmF,KAAMhG,MACbA,KAAK2U,QAAQyZ,QAAUpuB,KAAK,IAAMA,KAAK,GAAGiM,eAAiBrM,GAAWuuB,eAAgBroB,KACrF,KAAMA,EAAOjD,UAAUjB,SAG3BwsB,OAAQ,WACP,MAAOpuB,MAAKquB,SAAUxrB,UAAW,SAAUH,GAC1C,GAAuB,IAAlB1C,KAAKmF,UAAoC,KAAlBnF,KAAKmF,UAAqC,IAAlBnF,KAAKmF,SAAiB,CACzE,GAAItB,GAAS+oB,GAAoB5sB,KAAM0C,EACvCmB,GAAOsL,YAAazM,OAKvB4rB,QAAS,WACR,MAAOtuB,MAAKquB,SAAUxrB,UAAW,SAAUH,GAC1C,GAAuB,IAAlB1C,KAAKmF,UAAoC,KAAlBnF,KAAKmF,UAAqC,IAAlBnF,KAAKmF,SAAiB,CACzE,GAAItB,GAAS+oB,GAAoB5sB,KAAM0C,EACvCmB,GAAO0qB,aAAc7rB,EAAMmB,EAAO0N,gBAKrCid,OAAQ,WACP,MAAOxuB,MAAKquB,SAAUxrB,UAAW,SAAUH,GACrC1C,KAAKoM,YACTpM,KAAKoM,WAAWmiB,aAAc7rB,EAAM1C,SAKvCyuB,MAAO,WACN,MAAOzuB,MAAKquB,SAAUxrB,UAAW,SAAUH,GACrC1C,KAAKoM,YACTpM,KAAKoM,WAAWmiB,aAAc7rB,EAAM1C,KAAKmO,gBAK5CkO,OAAQ,SAAUvb,EAAU4tB,GAK3B,IAJA,GAAIhsB,GACHR,EAAQpB,EAAWD,EAAO2O,OAAQ1O,EAAUd,MAASA,KACrD2C,EAAI,EAEwB,OAApBD,EAAOR,EAAMS,IAAaA,IAE5B+rB,GAA8B,IAAlBhsB,EAAKyC,UACtBtE,EAAOkgB,UAAWyL,GAAQ9pB,IAGtBA,EAAK0J,aACJsiB,GAAY7tB,EAAOsH,SAAUzF,EAAKuJ,cAAevJ,IACrDsqB,GAAeR,GAAQ9pB,EAAM,WAE9BA,EAAK0J,WAAWsB,YAAahL,GAI/B,OAAO1C,OAGR2U,MAAO,WAIN,IAHA,GAAIjS,GACHC,EAAI,EAEuB,OAAnBD,EAAO1C,KAAK2C,IAAaA,IAAM,CAEhB,IAAlBD,EAAKyC,UACTtE,EAAOkgB,UAAWyL,GAAQ9pB,GAAM,GAIjC,OAAQA,EAAK6O,WACZ7O,EAAKgL,YAAahL,EAAK6O,WAKnB7O,GAAKiB,SAAW9C,EAAO+E,SAAUlD,EAAM,YAC3CA,EAAKiB,QAAQ/B,OAAS,GAIxB,MAAO5B,OAGR4D,MAAO,SAAU4pB,EAAeC,GAI/B,MAHAD,GAAiC,MAAjBA,GAAwB,EAAQA,EAChDC,EAAyC,MAArBA,EAA4BD,EAAgBC,EAEzDztB,KAAKyC,IAAI,WACf,MAAO5B,GAAO+C,MAAO5D,KAAMwtB,EAAeC,MAI5CkB,KAAM,SAAU7oB,GACf,MAAOyc,GAAQviB,KAAM,SAAU8F,GAC9B,GAAIpD,GAAO1C,KAAM,OAChB2C,EAAI,EACJ0X,EAAIra,KAAK4B,MAEV,IAAesC,SAAV4B,EACJ,MAAyB,KAAlBpD,EAAKyC,SACXzC,EAAKkN,UAAUtL,QAASsmB,GAAe,IACvC1mB,MAIF,MAAsB,gBAAV4B,IAAuBqlB,GAAa1e,KAAM3G,KACnDnF,EAAQsiB,eAAkB4H,GAAape,KAAM3G,KAC7CnF,EAAQoiB,mBAAsB+H,GAAmBre,KAAM3G,IACxD0lB,IAAUR,GAAS9e,KAAMpG,KAAa,GAAI,KAAO,GAAID,gBAAkB,CAExEC,EAAQA,EAAMxB,QAASymB,GAAW,YAElC,KACC,KAAW1Q,EAAJ1X,EAAOA,IAEbD,EAAO1C,KAAK2C,OACW,IAAlBD,EAAKyC,WACTtE,EAAOkgB,UAAWyL,GAAQ9pB,GAAM,IAChCA,EAAKkN,UAAY9J,EAInBpD,GAAO,EAGN,MAAM0C,KAGJ1C,GACJ1C,KAAK2U,QAAQyZ,OAAQtoB,IAEpB,KAAMA,EAAOjD,UAAUjB,SAG3BgtB,YAAa,WACZ,GAAI/nB,GAAMhE,UAAW,EAcrB,OAXA7C,MAAKquB,SAAUxrB,UAAW,SAAUH,GACnCmE,EAAM7G,KAAKoM,WAEXvL,EAAOkgB,UAAWyL,GAAQxsB,OAErB6G,GACJA,EAAIgoB,aAAcnsB,EAAM1C,QAKnB6G,IAAQA,EAAIjF,QAAUiF,EAAI1B,UAAYnF,KAAOA,KAAKqc,UAG1D2C,OAAQ,SAAUle,GACjB,MAAOd,MAAKqc,OAAQvb,GAAU,IAG/ButB,SAAU,SAAU7rB,EAAMD,GAGzBC,EAAOpC,EAAOwC,SAAWJ,EAEzB,IAAIM,GAAO4L,EAAMogB,EAChBhB,EAASjf,EAAKgU,EACdlgB,EAAI,EACJ0X,EAAIra,KAAK4B,OACTmtB,EAAM/uB,KACNgvB,EAAW3U,EAAI,EACfvU,EAAQtD,EAAK,GACbuB,EAAalD,EAAOkD,WAAY+B,EAGjC,IAAK/B,GACDsW,EAAI,GAAsB,gBAAVvU,KAChBnF,EAAQ4iB,YAAc6H,GAAS3e,KAAM3G,GACxC,MAAO9F,MAAKsC,KAAK,SAAUiY,GAC1B,GAAIpB,GAAO4V,EAAIhsB,GAAIwX,EACdxW,KACJvB,EAAK,GAAKsD,EAAMhE,KAAM9B,KAAMua,EAAOpB,EAAKwV,SAEzCxV,EAAKkV,SAAU7rB,EAAMD,IAIvB,IAAK8X,IACJwI,EAAWhiB,EAAOgtB,cAAerrB,EAAMxC,KAAM,GAAIiM,eAAe,EAAOjM,MACvE8C,EAAQ+f,EAAStR,WAEmB,IAA/BsR,EAAStX,WAAW3J,SACxBihB,EAAW/f,GAGPA,GAAQ,CAMZ,IALAgrB,EAAUjtB,EAAO4B,IAAK+pB,GAAQ3J,EAAU,UAAYiK,IACpDgC,EAAahB,EAAQlsB,OAITyY,EAAJ1X,EAAOA,IACd+L,EAAOmU,EAEFlgB,IAAMqsB,IACVtgB,EAAO7N,EAAO+C,MAAO8K,GAAM,GAAM,GAG5BogB,GACJjuB,EAAOuB,MAAO0rB,EAAStB,GAAQ9d,EAAM,YAIvCnM,EAAST,KAAM9B,KAAK2C,GAAI+L,EAAM/L,EAG/B,IAAKmsB,EAOJ,IANAjgB,EAAMif,EAASA,EAAQlsB,OAAS,GAAIqK,cAGpCpL,EAAO4B,IAAKqrB,EAASf,IAGfpqB,EAAI,EAAOmsB,EAAJnsB,EAAgBA,IAC5B+L,EAAOof,EAASnrB,GACX0oB,GAAY5e,KAAMiC,EAAK9J,MAAQ,MAClC/D,EAAOwgB,MAAO3S,EAAM,eAAkB7N,EAAOsH,SAAU0G,EAAKH,KAExDA,EAAKnL,IAEJ1C,EAAOouB,UACXpuB,EAAOouB,SAAUvgB,EAAKnL,KAGvB1C,EAAOyE,YAAcoJ,EAAK1I,MAAQ0I,EAAK4C,aAAe5C,EAAKkB,WAAa,IAAKtL,QAASinB,GAAc,KAOxG1I,GAAW/f,EAAQ,KAIrB,MAAO9C,SAITa,EAAOyB,MACN4sB,SAAU,SACVC,UAAW,UACXZ,aAAc,SACda,YAAa,QACbC,WAAY,eACV,SAAU3rB,EAAMmkB,GAClBhnB,EAAOG,GAAI0C,GAAS,SAAU5C,GAO7B,IANA,GAAIoB,GACHS,EAAI,EACJR,KACAmtB,EAASzuB,EAAQC,GACjBkC,EAAOssB,EAAO1tB,OAAS,EAEXoB,GAALL,EAAWA,IAClBT,EAAQS,IAAMK,EAAOhD,KAAOA,KAAK4D,OAAM,GACvC/C,EAAQyuB,EAAO3sB,IAAMklB,GAAY3lB,GAGjC7B,EAAKuC,MAAOT,EAAKD,EAAMH,MAGxB,OAAO/B,MAAKiC,UAAWE,KAKzB,IAAIotB,IACHC,KAQD,SAASC,IAAe/rB,EAAMmL,GAC7B,GAAI+Q,GACHld,EAAO7B,EAAQgO,EAAIpB,cAAe/J,IAASwrB,SAAUrgB,EAAI+P,MAGzD8Q,EAAU3vB,EAAO4vB,0BAA6B/P,EAAQ7f,EAAO4vB,wBAAyBjtB,EAAM,KAI3Fkd,EAAM8P,QAAU7uB,EAAOyhB,IAAK5f,EAAM,GAAK,UAMzC,OAFAA,GAAKsc,SAEE0Q,EAOR,QAASE,IAAgBhqB,GACxB,GAAIiJ,GAAMjP,EACT8vB,EAAUF,GAAa5pB,EA0BxB,OAxBM8pB,KACLA,EAAUD,GAAe7pB,EAAUiJ,GAGlB,SAAZ6gB,GAAuBA,IAG3BH,IAAUA,IAAU1uB,EAAQ,mDAAoDquB,SAAUrgB,EAAIJ,iBAG9FI,GAAQ0gB,GAAQ,GAAIrU,eAAiBqU,GAAQ,GAAItU,iBAAkBrb,SAGnEiP,EAAIghB,QACJhhB,EAAIihB,QAEJJ,EAAUD,GAAe7pB,EAAUiJ,GACnC0gB,GAAOvQ,UAIRwQ,GAAa5pB,GAAa8pB,GAGpBA,GAIR,WACC,GAAIK,EAEJpvB,GAAQqvB,iBAAmB,WAC1B,GAA4B,MAAvBD,EACJ,MAAOA,EAIRA,IAAsB,CAGtB,IAAIviB,GAAKoR,EAAMe,CAGf,OADAf,GAAOhf,EAAS0M,qBAAsB,QAAU,GAC1CsS,GAASA,EAAKgB,OAMpBpS,EAAM5N,EAAS6N,cAAe,OAC9BkS,EAAY/f,EAAS6N,cAAe,OACpCkS,EAAUC,MAAMC,QAAU,iEAC1BjB,EAAKzP,YAAawQ,GAAYxQ,YAAa3B,SAI/BA,GAAIoS,MAAME,OAASL,IAE9BjS,EAAIoS,MAAMC,QAGT,iJAGDrS,EAAI2B,YAAavP,EAAS6N,cAAe,QAAUmS,MAAMqQ,MAAQ,MACjEF,EAA0C,IAApBviB,EAAIuS,aAG3BnB,EAAKlR,YAAaiS,GAEXoQ,GA3BP,UA+BF,IAAIG,IAAU,UAEVC,GAAY,GAAI1mB,QAAQ,KAAOwY,EAAO,kBAAmB,KAIzDmO,GAAWC,GACdC,GAAY,2BAERvwB,GAAOwwB,kBACXH,GAAY,SAAU1tB,GAIrB,MAAKA,GAAKuJ,cAAc6C,YAAY0hB,OAC5B9tB,EAAKuJ,cAAc6C,YAAYyhB,iBAAkB7tB,EAAM,MAGxD3C,EAAOwwB,iBAAkB7tB,EAAM,OAGvC2tB,GAAS,SAAU3tB,EAAMgB,EAAM+sB,GAC9B,GAAIR,GAAOS,EAAUC,EAAUxuB,EAC9Byd,EAAQld,EAAKkd,KAqCd,OAnCA6Q,GAAWA,GAAYL,GAAW1tB,GAGlCP,EAAMsuB,EAAWA,EAASG,iBAAkBltB,IAAU+sB,EAAU/sB,GAASQ,OAEpEusB,IAES,KAARtuB,GAAetB,EAAOsH,SAAUzF,EAAKuJ,cAAevJ,KACxDP,EAAMtB,EAAO+e,MAAOld,EAAMgB,IAOtBysB,GAAU1jB,KAAMtK,IAAS+tB,GAAQzjB,KAAM/I,KAG3CusB,EAAQrQ,EAAMqQ,MACdS,EAAW9Q,EAAM8Q,SACjBC,EAAW/Q,EAAM+Q,SAGjB/Q,EAAM8Q,SAAW9Q,EAAM+Q,SAAW/Q,EAAMqQ,MAAQ9tB,EAChDA,EAAMsuB,EAASR,MAGfrQ,EAAMqQ,MAAQA,EACdrQ,EAAM8Q,SAAWA,EACjB9Q,EAAM+Q,SAAWA,IAMJzsB,SAAR/B,EACNA,EACAA,EAAM,KAEGvC,EAAS6O,gBAAgBoiB,eACpCT,GAAY,SAAU1tB,GACrB,MAAOA,GAAKmuB,cAGbR,GAAS,SAAU3tB,EAAMgB,EAAM+sB,GAC9B,GAAIK,GAAMC,EAAIC,EAAQ7uB,EACrByd,EAAQld,EAAKkd,KAyCd,OAvCA6Q,GAAWA,GAAYL,GAAW1tB,GAClCP,EAAMsuB,EAAWA,EAAU/sB,GAASQ,OAIxB,MAAP/B,GAAeyd,GAASA,EAAOlc,KACnCvB,EAAMyd,EAAOlc,IAUTysB,GAAU1jB,KAAMtK,KAAUmuB,GAAU7jB,KAAM/I,KAG9CotB,EAAOlR,EAAMkR,KACbC,EAAKruB,EAAKuuB,aACVD,EAASD,GAAMA,EAAGD,KAGbE,IACJD,EAAGD,KAAOpuB,EAAKmuB,aAAaC,MAE7BlR,EAAMkR,KAAgB,aAATptB,EAAsB,MAAQvB,EAC3CA,EAAMyd,EAAMsR,UAAY,KAGxBtR,EAAMkR,KAAOA,EACRE,IACJD,EAAGD,KAAOE,IAMG9sB,SAAR/B,EACNA,EACAA,EAAM,IAAM,QAOf,SAASgvB,IAAcC,EAAaC,GAEnC,OACCtvB,IAAK,WACJ,GAAIuvB,GAAYF,GAEhB,IAAkB,MAAbE,EAML,MAAKA,cAIGtxB,MAAK+B,KAML/B,KAAK+B,IAAMsvB,GAAQzuB,MAAO5C,KAAM6C,cAM3C,WAEC,GAAI2K,GAAKoS,EAAOhX,EAAG2oB,EAAkBC,EACpCC,EAA0BC,CAS3B,IANAlkB,EAAM5N,EAAS6N,cAAe,OAC9BD,EAAIoC,UAAY,qEAChBhH,EAAI4E,EAAIlB,qBAAsB,KAAO,GACrCsT,EAAQhX,GAAKA,EAAEgX,MAGf,CAIAA,EAAMC,QAAU,wBAIhBlf,EAAQgxB,QAA4B,QAAlB/R,EAAM+R,QAIxBhxB,EAAQixB,WAAahS,EAAMgS,SAE3BpkB,EAAIoS,MAAMiS,eAAiB,cAC3BrkB,EAAI2V,WAAW,GAAOvD,MAAMiS,eAAiB,GAC7ClxB,EAAQmxB,gBAA+C,gBAA7BtkB,EAAIoS,MAAMiS,eAIpClxB,EAAQoxB,UAAgC,KAApBnS,EAAMmS,WAA2C,KAAvBnS,EAAMoS,cACzB,KAA1BpS,EAAMqS,gBAEPpxB,EAAOyC,OAAO3C,GACbuxB,sBAAuB,WAItB,MAHiC,OAA5BT,GACJU,IAEMV,GAGRW,kBAAmB,WAIlB,MAH6B,OAAxBZ,GACJW,IAEMX,GAGRa,cAAe,WAId,MAHyB,OAApBd,GACJY,IAEMZ,GAIRe,oBAAqB,WAIpB,MAH+B,OAA1BZ,GACJS,IAEMT,IAIT,SAASS,KAER,GAAI3kB,GAAKoR,EAAMe,EAAW/F,CAE1BgF,GAAOhf,EAAS0M,qBAAsB,QAAU,GAC1CsS,GAASA,EAAKgB,QAMpBpS,EAAM5N,EAAS6N,cAAe,OAC9BkS,EAAY/f,EAAS6N,cAAe,OACpCkS,EAAUC,MAAMC,QAAU,iEAC1BjB,EAAKzP,YAAawQ,GAAYxQ,YAAa3B,GAE3CA,EAAIoS,MAAMC,QAGT,uKAMD0R,EAAmBC,GAAuB,EAC1CE,GAAyB,EAGpB3xB,EAAOwwB,mBACXgB,EAA0E,QAArDxxB,EAAOwwB,iBAAkB/iB,EAAK,WAAeuB,IAClEyiB,EACwE,SAArEzxB,EAAOwwB,iBAAkB/iB,EAAK,QAAYyiB,MAAO,QAAUA,MAM9DrW,EAAWpM,EAAI2B,YAAavP,EAAS6N,cAAe,QAGpDmM,EAASgG,MAAMC,QAAUrS,EAAIoS,MAAMC,QAGlC,8HAEDjG,EAASgG,MAAM2S,YAAc3Y,EAASgG,MAAMqQ,MAAQ,IACpDziB,EAAIoS,MAAMqQ,MAAQ,MAElByB,GACE1sB,YAAcjF,EAAOwwB,iBAAkB3W,EAAU,WAAe2Y,aAElE/kB,EAAIE,YAAakM,IAUlBpM,EAAIoC,UAAY,8CAChBgK,EAAWpM,EAAIlB,qBAAsB,MACrCsN,EAAU,GAAIgG,MAAMC,QAAU,2CAC9B4R,EAA0D,IAA/B7X,EAAU,GAAI4Y,aACpCf,IACJ7X,EAAU,GAAIgG,MAAM8P,QAAU,GAC9B9V,EAAU,GAAIgG,MAAM8P,QAAU,OAC9B+B,EAA0D,IAA/B7X,EAAU,GAAI4Y,cAG1C5T,EAAKlR,YAAaiS,SAOpB9e,EAAO4xB,KAAO,SAAU/vB,EAAMiB,EAASpB,EAAUC,GAChD,GAAIL,GAAKuB,EACRmI,IAGD,KAAMnI,IAAQC,GACbkI,EAAKnI,GAAShB,EAAKkd,MAAOlc,GAC1BhB,EAAKkd,MAAOlc,GAASC,EAASD,EAG/BvB,GAAMI,EAASK,MAAOF,EAAMF,MAG5B,KAAMkB,IAAQC,GACbjB,EAAKkd,MAAOlc,GAASmI,EAAKnI,EAG3B,OAAOvB,GAIR,IACEuwB,IAAS,kBACVC,GAAW,wBAIXC,GAAe,4BACfC,GAAY,GAAIppB,QAAQ,KAAOwY,EAAO,SAAU,KAChD6Q,GAAU,GAAIrpB,QAAQ,YAAcwY,EAAO,IAAK,KAEhD8Q,IAAYC,SAAU,WAAYC,WAAY,SAAUvD,QAAS,SACjEwD,IACCC,cAAe,IACfC,WAAY,OAGbC,IAAgB,SAAU,IAAK,MAAO,KAIvC,SAASC,IAAgB1T,EAAOlc,GAG/B,GAAKA,IAAQkc,GACZ,MAAOlc,EAIR,IAAI6vB,GAAU7vB,EAAK4V,OAAO,GAAG9X,cAAgBkC,EAAKvD,MAAM,GACvDqzB,EAAW9vB,EACXf,EAAI0wB,GAAYzxB,MAEjB,OAAQe,IAEP,GADAe,EAAO2vB,GAAa1wB,GAAM4wB,EACrB7vB,IAAQkc,GACZ,MAAOlc,EAIT,OAAO8vB,GAGR,QAASC,IAAU3iB,EAAU4iB,GAM5B,IALA,GAAIhE,GAAShtB,EAAMixB,EAClB1V,KACA1D,EAAQ,EACR3Y,EAASkP,EAASlP,OAEHA,EAAR2Y,EAAgBA,IACvB7X,EAAOoO,EAAUyJ,GACX7X,EAAKkd,QAIX3B,EAAQ1D,GAAU1Z,EAAOwgB,MAAO3e,EAAM,cACtCgtB,EAAUhtB,EAAKkd,MAAM8P,QAChBgE,GAGEzV,EAAQ1D,IAAuB,SAAZmV,IACxBhtB,EAAKkd,MAAM8P,QAAU,IAMM,KAAvBhtB,EAAKkd,MAAM8P,SAAkBtN,EAAU1f,KAC3Cub,EAAQ1D,GAAU1Z,EAAOwgB,MAAO3e,EAAM,aAAcktB,GAAeltB,EAAKkD,cAGzE+tB,EAASvR,EAAU1f,IAEdgtB,GAAuB,SAAZA,IAAuBiE,IACtC9yB,EAAOwgB,MAAO3e,EAAM,aAAcixB,EAASjE,EAAU7uB,EAAOyhB,IAAK5f,EAAM,aAO1E,KAAM6X,EAAQ,EAAW3Y,EAAR2Y,EAAgBA,IAChC7X,EAAOoO,EAAUyJ,GACX7X,EAAKkd,QAGL8T,GAA+B,SAAvBhxB,EAAKkd,MAAM8P,SAA6C,KAAvBhtB,EAAKkd,MAAM8P,UACzDhtB,EAAKkd,MAAM8P,QAAUgE,EAAOzV,EAAQ1D,IAAW,GAAK,QAItD,OAAOzJ,GAGR,QAAS8iB,IAAmBlxB,EAAMoD,EAAO+tB,GACxC,GAAIltB,GAAUksB,GAAU3mB,KAAMpG,EAC9B,OAAOa,GAENvC,KAAKkC,IAAK,EAAGK,EAAS,IAAQktB,GAAY,KAAUltB,EAAS,IAAO,MACpEb,EAGF,QAASguB,IAAsBpxB,EAAMgB,EAAMqwB,EAAOC,EAAaC,GAS9D,IARA,GAAItxB,GAAIoxB,KAAYC,EAAc,SAAW,WAE5C,EAES,UAATtwB,EAAmB,EAAI,EAEvBsN,EAAM,EAEK,EAAJrO,EAAOA,GAAK,EAEJ,WAAVoxB,IACJ/iB,GAAOnQ,EAAOyhB,IAAK5f,EAAMqxB,EAAQ5R,EAAWxf,IAAK,EAAMsxB,IAGnDD,GAEW,YAAVD,IACJ/iB,GAAOnQ,EAAOyhB,IAAK5f,EAAM,UAAYyf,EAAWxf,IAAK,EAAMsxB,IAI7C,WAAVF,IACJ/iB,GAAOnQ,EAAOyhB,IAAK5f,EAAM,SAAWyf,EAAWxf,GAAM,SAAS,EAAMsxB,MAIrEjjB,GAAOnQ,EAAOyhB,IAAK5f,EAAM,UAAYyf,EAAWxf,IAAK,EAAMsxB,GAG5C,YAAVF,IACJ/iB,GAAOnQ,EAAOyhB,IAAK5f,EAAM,SAAWyf,EAAWxf,GAAM,SAAS,EAAMsxB,IAKvE,OAAOjjB,GAGR,QAASkjB,IAAkBxxB,EAAMgB,EAAMqwB,GAGtC,GAAII,IAAmB,EACtBnjB,EAAe,UAATtN,EAAmBhB,EAAKqd,YAAcrd,EAAK8vB,aACjDyB,EAAS7D,GAAW1tB,GACpBsxB,EAAcrzB,EAAQoxB,WAAgE,eAAnDlxB,EAAOyhB,IAAK5f,EAAM,aAAa,EAAOuxB,EAK1E,IAAY,GAAPjjB,GAAmB,MAAPA,EAAc,CAQ9B,GANAA,EAAMqf,GAAQ3tB,EAAMgB,EAAMuwB,IACf,EAANjjB,GAAkB,MAAPA,KACfA,EAAMtO,EAAKkd,MAAOlc,IAIdysB,GAAU1jB,KAAKuE,GACnB,MAAOA,EAKRmjB,GAAmBH,IAAiBrzB,EAAQyxB,qBAAuBphB,IAAQtO,EAAKkd,MAAOlc,IAGvFsN,EAAMhM,WAAYgM,IAAS,EAI5B,MAASA,GACR8iB,GACCpxB,EACAgB,EACAqwB,IAAWC,EAAc,SAAW,WACpCG,EACAF,GAEE,KAGLpzB,EAAOyC,QAGN8wB,UACCzC,SACC5vB,IAAK,SAAUW,EAAM+tB,GACpB,GAAKA,EAAW,CAEf,GAAItuB,GAAMkuB,GAAQ3tB,EAAM,UACxB,OAAe,KAARP,EAAa,IAAMA,MAO9BkyB,WACCC,aAAe,EACfC,aAAe,EACfC,UAAY,EACZC,YAAc,EACdrB,YAAc,EACdsB,YAAc,EACd/C,SAAW,EACXgD,OAAS,EACTC,SAAW,EACXC,QAAU,EACVC,QAAU,EACVhV,MAAQ,GAKTiV,UAECC,QAASr0B,EAAQixB,SAAW,WAAa,cAI1ChS,MAAO,SAAUld,EAAMgB,EAAMoC,EAAOiuB,GAEnC,GAAMrxB,GAA0B,IAAlBA,EAAKyC,UAAoC,IAAlBzC,EAAKyC,UAAmBzC,EAAKkd,MAAlE,CAKA,GAAIzd,GAAKyC,EAAM8c,EACd8R,EAAW3yB,EAAO6E,UAAWhC,GAC7Bkc,EAAQld,EAAKkd,KASd,IAPAlc,EAAO7C,EAAOk0B,SAAUvB,KAAgB3yB,EAAOk0B,SAAUvB,GAAaF,GAAgB1T,EAAO4T,IAI7F9R,EAAQ7gB,EAAOuzB,SAAU1wB,IAAU7C,EAAOuzB,SAAUZ,GAGrCtvB,SAAV4B,EAsCJ,MAAK4b,IAAS,OAASA,IAAqDxd,UAA3C/B,EAAMuf,EAAM3f,IAAKW,GAAM,EAAOqxB,IACvD5xB,EAIDyd,EAAOlc,EAhCd,IAVAkB,QAAckB,GAGA,WAATlB,IAAsBzC,EAAM2wB,GAAQ5mB,KAAMpG,MAC9CA,GAAU3D,EAAI,GAAK,GAAMA,EAAI,GAAK6C,WAAYnE,EAAOyhB,IAAK5f,EAAMgB,IAEhEkB,EAAO,UAIM,MAATkB,GAAiBA,IAAUA,IAKlB,WAATlB,GAAsB/D,EAAOwzB,UAAWb,KAC5C1tB,GAAS,MAKJnF,EAAQmxB,iBAA6B,KAAVhsB,GAA+C,IAA/BpC,EAAKpD,QAAQ,gBAC7Dsf,EAAOlc,GAAS,aAIXge,GAAW,OAASA,IAAwDxd,UAA7C4B,EAAQ4b,EAAMqN,IAAKrsB,EAAMoD,EAAOiuB,MAIpE,IACCnU,EAAOlc,GAASoC,EACf,MAAMV,OAcXkd,IAAK,SAAU5f,EAAMgB,EAAMqwB,EAAOE,GACjC,GAAIjyB,GAAKgP,EAAK0Q,EACb8R,EAAW3yB,EAAO6E,UAAWhC,EAyB9B,OAtBAA,GAAO7C,EAAOk0B,SAAUvB,KAAgB3yB,EAAOk0B,SAAUvB,GAAaF,GAAgB5wB,EAAKkd,MAAO4T,IAIlG9R,EAAQ7gB,EAAOuzB,SAAU1wB,IAAU7C,EAAOuzB,SAAUZ,GAG/C9R,GAAS,OAASA,KACtB1Q,EAAM0Q,EAAM3f,IAAKW,GAAM,EAAMqxB,IAIjB7vB,SAAR8M,IACJA,EAAMqf,GAAQ3tB,EAAMgB,EAAMuwB,IAId,WAARjjB,GAAoBtN,IAAQwvB,MAChCliB,EAAMkiB,GAAoBxvB,IAIZ,KAAVqwB,GAAgBA,GACpB/xB,EAAMgD,WAAYgM,GACX+iB,KAAU,GAAQlzB,EAAOkE,UAAW/C,GAAQA,GAAO,EAAIgP,GAExDA,KAITnQ,EAAOyB,MAAO,SAAU,SAAW,SAAUK,EAAGe,GAC/C7C,EAAOuzB,SAAU1wB,IAChB3B,IAAK,SAAUW,EAAM+tB,EAAUsD,GAC9B,MAAKtD,GAGGmC,GAAanmB,KAAM5L,EAAOyhB,IAAK5f,EAAM,aAAsC,IAArBA,EAAKqd,YACjElf,EAAO4xB,KAAM/vB,EAAMqwB,GAAS,WAC3B,MAAOmB,IAAkBxxB,EAAMgB,EAAMqwB,KAEtCG,GAAkBxxB,EAAMgB,EAAMqwB,GAPhC,QAWDhF,IAAK,SAAUrsB,EAAMoD,EAAOiuB,GAC3B,GAAIE,GAASF,GAAS3D,GAAW1tB,EACjC,OAAOkxB,IAAmBlxB,EAAMoD,EAAOiuB,EACtCD,GACCpxB,EACAgB,EACAqwB,EACApzB,EAAQoxB,WAAgE,eAAnDlxB,EAAOyhB,IAAK5f,EAAM,aAAa,EAAOuxB,GAC3DA,GACG,OAMFtzB,EAAQgxB,UACb9wB,EAAOuzB,SAASzC,SACf5vB,IAAK,SAAUW,EAAM+tB,GAEpB,MAAOkC,IAASlmB,MAAOgkB,GAAY/tB,EAAKmuB,aAAenuB,EAAKmuB,aAAarhB,OAAS9M,EAAKkd,MAAMpQ,SAAW,IACrG,IAAOxK,WAAYyE,OAAOwrB,IAAS,GACrCxE,EAAW,IAAM,IAGnB1B,IAAK,SAAUrsB,EAAMoD,GACpB,GAAI8Z,GAAQld,EAAKkd,MAChBiR,EAAenuB,EAAKmuB,aACpBc,EAAU9wB,EAAOkE,UAAWe,GAAU,iBAA2B,IAARA,EAAc,IAAM,GAC7E0J,EAASqhB,GAAgBA,EAAarhB,QAAUoQ,EAAMpQ,QAAU,EAIjEoQ,GAAME,KAAO,GAINha,GAAS,GAAe,KAAVA,IAC6B,KAAhDjF,EAAO2E,KAAMgK,EAAOlL,QAASouB,GAAQ,MACrC9S,EAAM3S,kBAKP2S,EAAM3S,gBAAiB,UAGR,KAAVnH,GAAgB+qB,IAAiBA,EAAarhB,UAMpDoQ,EAAMpQ,OAASkjB,GAAOjmB,KAAM+C,GAC3BA,EAAOlL,QAASouB,GAAQf,GACxBniB,EAAS,IAAMmiB,MAKnB9wB,EAAOuzB,SAAS7B,YAAcpB,GAAcxwB,EAAQ2xB,oBACnD,SAAU5vB,EAAM+tB,GACf,MAAKA,GAGG5vB,EAAO4xB,KAAM/vB,GAAQgtB,QAAW,gBACtCW,IAAU3tB,EAAM,gBAJlB,SAUF7B,EAAOyB,MACN4yB,OAAQ,GACRC,QAAS,GACTC,OAAQ,SACN,SAAUC,EAAQC,GACpBz0B,EAAOuzB,SAAUiB,EAASC,IACzBC,OAAQ,SAAUzvB,GAOjB,IANA,GAAInD,GAAI,EACP6yB,KAGAC,EAAyB,gBAAV3vB,GAAqBA,EAAMqB,MAAM,MAASrB,GAE9C,EAAJnD,EAAOA,IACd6yB,EAAUH,EAASlT,EAAWxf,GAAM2yB,GACnCG,EAAO9yB,IAAO8yB,EAAO9yB,EAAI,IAAO8yB,EAAO,EAGzC,OAAOD,KAIHtF,GAAQzjB,KAAM4oB,KACnBx0B,EAAOuzB,SAAUiB,EAASC,GAASvG,IAAM6E,MAI3C/yB,EAAOG,GAAGsC,QACTgf,IAAK,SAAU5e,EAAMoC,GACpB,MAAOyc,GAAQviB,KAAM,SAAU0C,EAAMgB,EAAMoC,GAC1C,GAAImuB,GAAQhxB,EACXR,KACAE,EAAI,CAEL,IAAK9B,EAAOoD,QAASP,GAAS,CAI7B,IAHAuwB,EAAS7D,GAAW1tB,GACpBO,EAAMS,EAAK9B,OAECqB,EAAJN,EAASA,IAChBF,EAAKiB,EAAMf,IAAQ9B,EAAOyhB,IAAK5f,EAAMgB,EAAMf,IAAK,EAAOsxB,EAGxD,OAAOxxB,GAGR,MAAiByB,UAAV4B,EACNjF,EAAO+e,MAAOld,EAAMgB,EAAMoC,GAC1BjF,EAAOyhB,IAAK5f,EAAMgB,IACjBA,EAAMoC,EAAOjD,UAAUjB,OAAS,IAEpC8xB,KAAM,WACL,MAAOD,IAAUzzB,MAAM,IAExB01B,KAAM,WACL,MAAOjC,IAAUzzB,OAElB21B,OAAQ,SAAU/Y,GACjB,MAAsB,iBAAVA,GACJA,EAAQ5c,KAAK0zB,OAAS1zB,KAAK01B,OAG5B11B,KAAKsC,KAAK,WACX8f,EAAUpiB,MACda,EAAQb,MAAO0zB,OAEf7yB,EAAQb,MAAO01B,WAOnB,SAASE,IAAOlzB,EAAMiB,EAASyjB,EAAMjkB,EAAK0yB,GACzC,MAAO,IAAID,IAAMn0B,UAAUR,KAAMyB,EAAMiB,EAASyjB,EAAMjkB,EAAK0yB;CAE5Dh1B,EAAO+0B,MAAQA,GAEfA,GAAMn0B,WACLE,YAAai0B,GACb30B,KAAM,SAAUyB,EAAMiB,EAASyjB,EAAMjkB,EAAK0yB,EAAQC,GACjD91B,KAAK0C,KAAOA,EACZ1C,KAAKonB,KAAOA,EACZpnB,KAAK61B,OAASA,GAAU,QACxB71B,KAAK2D,QAAUA,EACf3D,KAAKgT,MAAQhT,KAAKiH,IAAMjH,KAAKgO,MAC7BhO,KAAKmD,IAAMA,EACXnD,KAAK81B,KAAOA,IAAUj1B,EAAOwzB,UAAWjN,GAAS,GAAK,OAEvDpZ,IAAK,WACJ,GAAI0T,GAAQkU,GAAMG,UAAW/1B,KAAKonB,KAElC,OAAO1F,IAASA,EAAM3f,IACrB2f,EAAM3f,IAAK/B,MACX41B,GAAMG,UAAUrP,SAAS3kB,IAAK/B,OAEhCg2B,IAAK,SAAUC,GACd,GAAIC,GACHxU,EAAQkU,GAAMG,UAAW/1B,KAAKonB,KAoB/B,OAjBCpnB,MAAKsa,IAAM4b,EADPl2B,KAAK2D,QAAQwyB,SACEt1B,EAAOg1B,OAAQ71B,KAAK61B,QACtCI,EAASj2B,KAAK2D,QAAQwyB,SAAWF,EAAS,EAAG,EAAGj2B,KAAK2D,QAAQwyB,UAG3CF,EAEpBj2B,KAAKiH,KAAQjH,KAAKmD,IAAMnD,KAAKgT,OAAUkjB,EAAQl2B,KAAKgT,MAE/ChT,KAAK2D,QAAQyyB,MACjBp2B,KAAK2D,QAAQyyB,KAAKt0B,KAAM9B,KAAK0C,KAAM1C,KAAKiH,IAAKjH,MAGzC0hB,GAASA,EAAMqN,IACnBrN,EAAMqN,IAAK/uB,MAEX41B,GAAMG,UAAUrP,SAASqI,IAAK/uB,MAExBA,OAIT41B,GAAMn0B,UAAUR,KAAKQ,UAAYm0B,GAAMn0B,UAEvCm0B,GAAMG,WACLrP,UACC3kB,IAAK,SAAUs0B,GACd,GAAI7jB,EAEJ,OAAiC,OAA5B6jB,EAAM3zB,KAAM2zB,EAAMjP,OACpBiP,EAAM3zB,KAAKkd,OAA2C,MAAlCyW,EAAM3zB,KAAKkd,MAAOyW,EAAMjP,OAQ/C5U,EAAS3R,EAAOyhB,IAAK+T,EAAM3zB,KAAM2zB,EAAMjP,KAAM,IAErC5U,GAAqB,SAAXA,EAAwBA,EAAJ,GAT9B6jB,EAAM3zB,KAAM2zB,EAAMjP,OAW3B2H,IAAK,SAAUsH,GAGTx1B,EAAOy1B,GAAGF,KAAMC,EAAMjP,MAC1BvmB,EAAOy1B,GAAGF,KAAMC,EAAMjP,MAAQiP,GACnBA,EAAM3zB,KAAKkd,QAAgE,MAArDyW,EAAM3zB,KAAKkd,MAAO/e,EAAOk0B,SAAUsB,EAAMjP,QAAoBvmB,EAAOuzB,SAAUiC,EAAMjP,OACrHvmB,EAAO+e,MAAOyW,EAAM3zB,KAAM2zB,EAAMjP,KAAMiP,EAAMpvB,IAAMovB,EAAMP,MAExDO,EAAM3zB,KAAM2zB,EAAMjP,MAASiP,EAAMpvB,OASrC2uB,GAAMG,UAAUtN,UAAYmN,GAAMG,UAAU1N,YAC3C0G,IAAK,SAAUsH,GACTA,EAAM3zB,KAAKyC,UAAYkxB,EAAM3zB,KAAK0J,aACtCiqB,EAAM3zB,KAAM2zB,EAAMjP,MAASiP,EAAMpvB,OAKpCpG,EAAOg1B,QACNU,OAAQ,SAAUC,GACjB,MAAOA,IAERC,MAAO,SAAUD,GAChB,MAAO,GAAMpyB,KAAKsyB,IAAKF,EAAIpyB,KAAKuyB,IAAO,IAIzC91B,EAAOy1B,GAAKV,GAAMn0B,UAAUR,KAG5BJ,EAAOy1B,GAAGF,OAKV,IACCQ,IAAOC,GACPC,GAAW,yBACXC,GAAS,GAAIttB,QAAQ,iBAAmBwY,EAAO,cAAe,KAC9D+U,GAAO,cACPC,IAAwBC,IACxBC,IACCC,KAAO,SAAUhQ,EAAMthB,GACtB,GAAIuwB,GAAQr2B,KAAKq3B,YAAajQ,EAAMthB,GACnCjC,EAASwyB,EAAMroB,MACfynB,EAAQsB,GAAO7qB,KAAMpG,GACrBgwB,EAAOL,GAASA,EAAO,KAAS50B,EAAOwzB,UAAWjN,GAAS,GAAK,MAGhEpU,GAAUnS,EAAOwzB,UAAWjN,IAAmB,OAAT0O,IAAkBjyB,IACvDkzB,GAAO7qB,KAAMrL,EAAOyhB,IAAK+T,EAAM3zB,KAAM0kB,IACtCkQ,EAAQ,EACRC,EAAgB,EAEjB,IAAKvkB,GAASA,EAAO,KAAQ8iB,EAAO,CAEnCA,EAAOA,GAAQ9iB,EAAO,GAGtByiB,EAAQA,MAGRziB,GAASnP,GAAU,CAEnB,GAGCyzB,GAAQA,GAAS,KAGjBtkB,GAAgBskB,EAChBz2B,EAAO+e,MAAOyW,EAAM3zB,KAAM0kB,EAAMpU,EAAQ8iB,SAI/BwB,KAAWA,EAAQjB,EAAMroB,MAAQnK,IAAqB,IAAVyzB,KAAiBC,GAaxE,MATK9B,KACJziB,EAAQqjB,EAAMrjB,OAASA,IAAUnP,GAAU,EAC3CwyB,EAAMP,KAAOA,EAEbO,EAAMlzB,IAAMsyB,EAAO,GAClBziB,GAAUyiB,EAAO,GAAM,GAAMA,EAAO,IACnCA,EAAO,IAGHY,IAKV,SAASmB,MAIR,MAHA3Y,YAAW,WACV+X,GAAQ1yB,SAEA0yB,GAAQ/1B,EAAOoG,MAIzB,QAASwwB,IAAO7yB,EAAM8yB,GACrB,GAAI5P,GACHla,GAAU+pB,OAAQ/yB,GAClBjC,EAAI,CAKL,KADA+0B,EAAeA,EAAe,EAAI,EACtB,EAAJ/0B,EAAQA,GAAK,EAAI+0B,EACxB5P,EAAQ3F,EAAWxf,GACnBiL,EAAO,SAAWka,GAAUla,EAAO,UAAYka,GAAUljB,CAO1D,OAJK8yB,KACJ9pB,EAAM+jB,QAAU/jB,EAAMqiB,MAAQrrB,GAGxBgJ,EAGR,QAASypB,IAAavxB,EAAOshB,EAAMwQ,GAKlC,IAJA,GAAIvB,GACHwB,GAAeV,GAAU/P,QAAehnB,OAAQ+2B,GAAU,MAC1D5c,EAAQ,EACR3Y,EAASi2B,EAAWj2B,OACLA,EAAR2Y,EAAgBA,IACvB,GAAM8b,EAAQwB,EAAYtd,GAAQzY,KAAM81B,EAAWxQ,EAAMthB,GAGxD,MAAOuwB,GAKV,QAASa,IAAkBx0B,EAAMglB,EAAOoQ,GAEvC,GAAI1Q,GAAMthB,EAAO6vB,EAAQU,EAAO3U,EAAOqW,EAASrI,EAASsI,EACxDC,EAAOj4B,KACP4pB,KACAhK,EAAQld,EAAKkd,MACb+T,EAASjxB,EAAKyC,UAAYid,EAAU1f,GACpCw1B,EAAWr3B,EAAOwgB,MAAO3e,EAAM,SAG1Bo1B,GAAKvW,QACVG,EAAQ7gB,EAAO8gB,YAAajf,EAAM,MACX,MAAlBgf,EAAMyW,WACVzW,EAAMyW,SAAW,EACjBJ,EAAUrW,EAAM/M,MAAMuH,KACtBwF,EAAM/M,MAAMuH,KAAO,WACZwF,EAAMyW,UACXJ,MAIHrW,EAAMyW,WAENF,EAAKnb,OAAO,WAGXmb,EAAKnb,OAAO,WACX4E,EAAMyW,WACAt3B,EAAO0gB,MAAO7e,EAAM,MAAOd,QAChC8f,EAAM/M,MAAMuH,YAOO,IAAlBxZ,EAAKyC,WAAoB,UAAYuiB,IAAS,SAAWA,MAK7DoQ,EAAKM,UAAaxY,EAAMwY,SAAUxY,EAAMyY,UAAWzY,EAAM0Y,WAIzD5I,EAAU7uB,EAAOyhB,IAAK5f,EAAM,WAG5Bs1B,EAA2B,SAAZtI,EACd7uB,EAAOwgB,MAAO3e,EAAM,eAAkBktB,GAAgBltB,EAAKkD,UAAa8pB,EAEnD,WAAjBsI,GAA6D,SAAhCn3B,EAAOyhB,IAAK5f,EAAM,WAI7C/B,EAAQ+e,wBAA8D,WAApCkQ,GAAgBltB,EAAKkD,UAG5Dga,EAAME,KAAO,EAFbF,EAAM8P,QAAU,iBAOdoI,EAAKM,WACTxY,EAAMwY,SAAW,SACXz3B,EAAQqvB,oBACbiI,EAAKnb,OAAO,WACX8C,EAAMwY,SAAWN,EAAKM,SAAU,GAChCxY,EAAMyY,UAAYP,EAAKM,SAAU,GACjCxY,EAAM0Y,UAAYR,EAAKM,SAAU,KAMpC,KAAMhR,IAAQM,GAEb,GADA5hB,EAAQ4hB,EAAON,GACV0P,GAAS5qB,KAAMpG,GAAU,CAG7B,SAFO4hB,GAAON,GACduO,EAASA,GAAoB,WAAV7vB,EACdA,KAAY6tB,EAAS,OAAS,QAAW,CAG7C,GAAe,SAAV7tB,IAAoBoyB,GAAiCh0B,SAArBg0B,EAAU9Q,GAG9C,QAFAuM,IAAS,EAKX/J,EAAMxC,GAAS8Q,GAAYA,EAAU9Q,IAAUvmB,EAAO+e,MAAOld,EAAM0kB,OAInEsI,GAAUxrB,MAIZ,IAAMrD,EAAOoE,cAAe2kB,GAwCqD,YAAxD,SAAZ8F,EAAqBE,GAAgBltB,EAAKkD,UAAa8pB,KACnE9P,EAAM8P,QAAUA,OAzCoB,CAC/BwI,EACC,UAAYA,KAChBvE,EAASuE,EAASvE,QAGnBuE,EAAWr3B,EAAOwgB,MAAO3e,EAAM,aAI3BizB,IACJuC,EAASvE,QAAUA,GAEfA,EACJ9yB,EAAQ6B,GAAOgxB,OAEfuE,EAAK3vB,KAAK,WACTzH,EAAQ6B,GAAOgzB,SAGjBuC,EAAK3vB,KAAK,WACT,GAAI8e,EACJvmB,GAAOygB,YAAa5e,EAAM,SAC1B,KAAM0kB,IAAQwC,GACb/oB,EAAO+e,MAAOld,EAAM0kB,EAAMwC,EAAMxC,KAGlC,KAAMA,IAAQwC,GACbyM,EAAQgB,GAAa1D,EAASuE,EAAU9Q,GAAS,EAAGA,EAAM6Q,GAElD7Q,IAAQ8Q,KACfA,EAAU9Q,GAASiP,EAAMrjB,MACpB2gB,IACJ0C,EAAMlzB,IAAMkzB,EAAMrjB,MAClBqjB,EAAMrjB,MAAiB,UAAToU,GAA6B,WAATA,EAAoB,EAAI,KAW/D,QAASmR,IAAY7Q,EAAO8Q,GAC3B,GAAIje,GAAO7W,EAAMmyB,EAAQ/vB,EAAO4b,CAGhC,KAAMnH,IAASmN,GAed,GAdAhkB,EAAO7C,EAAO6E,UAAW6U,GACzBsb,EAAS2C,EAAe90B,GACxBoC,EAAQ4hB,EAAOnN,GACV1Z,EAAOoD,QAAS6B,KACpB+vB,EAAS/vB,EAAO,GAChBA,EAAQ4hB,EAAOnN,GAAUzU,EAAO,IAG5ByU,IAAU7W,IACdgkB,EAAOhkB,GAASoC,QACT4hB,GAAOnN,IAGfmH,EAAQ7gB,EAAOuzB,SAAU1wB,GACpBge,GAAS,UAAYA,GAAQ,CACjC5b,EAAQ4b,EAAM6T,OAAQzvB,SACf4hB,GAAOhkB,EAId,KAAM6W,IAASzU,GACNyU,IAASmN,KAChBA,EAAOnN,GAAUzU,EAAOyU,GACxBie,EAAeje,GAAUsb,OAI3B2C,GAAe90B,GAASmyB,EAK3B,QAAS4C,IAAW/1B,EAAMg2B,EAAY/0B,GACrC,GAAI6O,GACHmmB,EACApe,EAAQ,EACR3Y,EAASq1B,GAAoBr1B,OAC7Bmb,EAAWlc,EAAO4b,WAAWK,OAAQ,iBAE7B8b,GAAKl2B,OAEbk2B,EAAO,WACN,GAAKD,EACJ,OAAO,CAUR,KARA,GAAIE,GAAcjC,IAASY,KAC1BzZ,EAAY3Z,KAAKkC,IAAK,EAAGsxB,EAAUkB,UAAYlB,EAAUzB,SAAW0C,GAEpE5hB,EAAO8G,EAAY6Z,EAAUzB,UAAY,EACzCF,EAAU,EAAIhf,EACdsD,EAAQ,EACR3Y,EAASg2B,EAAUmB,OAAOn3B,OAEXA,EAAR2Y,EAAiBA,IACxBqd,EAAUmB,OAAQxe,GAAQyb,IAAKC,EAKhC,OAFAlZ,GAASoB,WAAYzb,GAAQk1B,EAAW3B,EAASlY,IAElC,EAAVkY,GAAer0B,EACZmc,GAEPhB,EAASqB,YAAa1b,GAAQk1B,KACvB,IAGTA,EAAY7a,EAASF,SACpBna,KAAMA,EACNglB,MAAO7mB,EAAOyC,UAAYo1B,GAC1BZ,KAAMj3B,EAAOyC,QAAQ,GAAQk1B,kBAAqB70B,GAClDq1B,mBAAoBN,EACpBO,gBAAiBt1B,EACjBm1B,UAAWlC,IAASY,KACpBrB,SAAUxyB,EAAQwyB,SAClB4C,UACA1B,YAAa,SAAUjQ,EAAMjkB,GAC5B,GAAIkzB,GAAQx1B,EAAO+0B,MAAOlzB,EAAMk1B,EAAUE,KAAM1Q,EAAMjkB,EACpDy0B,EAAUE,KAAKU,cAAepR,IAAUwQ,EAAUE,KAAKjC,OAEzD,OADA+B,GAAUmB,OAAO14B,KAAMg2B,GAChBA,GAERzU,KAAM,SAAUsX,GACf,GAAI3e,GAAQ,EAGX3Y,EAASs3B,EAAUtB,EAAUmB,OAAOn3B,OAAS,CAC9C,IAAK+2B,EACJ,MAAO34B,KAGR,KADA24B,GAAU,EACM/2B,EAAR2Y,EAAiBA,IACxBqd,EAAUmB,OAAQxe,GAAQyb,IAAK,EAUhC,OALKkD,GACJnc,EAASqB,YAAa1b,GAAQk1B,EAAWsB,IAEzCnc,EAASoc,WAAYz2B,GAAQk1B,EAAWsB,IAElCl5B,QAGT0nB,EAAQkQ,EAAUlQ,KAInB,KAFA6Q,GAAY7Q,EAAOkQ,EAAUE,KAAKU,eAElB52B,EAAR2Y,EAAiBA,IAExB,GADA/H,EAASykB,GAAqB1c,GAAQzY,KAAM81B,EAAWl1B,EAAMglB,EAAOkQ,EAAUE,MAE7E,MAAOtlB,EAmBT,OAfA3R,GAAO4B,IAAKilB,EAAO2P,GAAaO,GAE3B/2B,EAAOkD,WAAY6zB,EAAUE,KAAK9kB,QACtC4kB,EAAUE,KAAK9kB,MAAMlR,KAAMY,EAAMk1B,GAGlC/2B,EAAOy1B,GAAG8C,MACTv4B,EAAOyC,OAAQs1B,GACdl2B,KAAMA,EACNu1B,KAAML,EACNrW,MAAOqW,EAAUE,KAAKvW,SAKjBqW,EAAUpa,SAAUoa,EAAUE,KAAKta,UACxClV,KAAMsvB,EAAUE,KAAKxvB,KAAMsvB,EAAUE,KAAKuB,UAC1Crc,KAAM4a,EAAUE,KAAK9a,MACrBF,OAAQ8a,EAAUE,KAAKhb,QAG1Bjc,EAAO43B,UAAY53B,EAAOyC,OAAQm1B,IACjCa,QAAS,SAAU5R,EAAOnlB,GACpB1B,EAAOkD,WAAY2jB,IACvBnlB,EAAWmlB,EACXA,GAAU,MAEVA,EAAQA,EAAMvgB,MAAM,IAOrB,KAJA,GAAIigB,GACH7M,EAAQ,EACR3Y,EAAS8lB,EAAM9lB,OAEAA,EAAR2Y,EAAiBA,IACxB6M,EAAOM,EAAOnN,GACd4c,GAAU/P,GAAS+P,GAAU/P,OAC7B+P,GAAU/P,GAAOxW,QAASrO,IAI5Bg3B,UAAW,SAAUh3B,EAAU+rB,GACzBA,EACJ2I,GAAoBrmB,QAASrO,GAE7B00B,GAAoB52B,KAAMkC,MAK7B1B,EAAO24B,MAAQ,SAAUA,EAAO3D,EAAQ70B,GACvC,GAAIy4B,GAAMD,GAA0B,gBAAVA,GAAqB34B,EAAOyC,UAAYk2B,IACjEH,SAAUr4B,IAAOA,GAAM60B,GACtBh1B,EAAOkD,WAAYy1B,IAAWA,EAC/BrD,SAAUqD,EACV3D,OAAQ70B,GAAM60B,GAAUA,IAAWh1B,EAAOkD,WAAY8xB,IAAYA,EAwBnE,OArBA4D,GAAItD,SAAWt1B,EAAOy1B,GAAGvX,IAAM,EAA4B,gBAAjB0a,GAAItD,SAAwBsD,EAAItD,SACzEsD,EAAItD,WAAYt1B,GAAOy1B,GAAGoD,OAAS74B,EAAOy1B,GAAGoD,OAAQD,EAAItD,UAAat1B,EAAOy1B,GAAGoD,OAAOhT,UAGtE,MAAb+S,EAAIlY,OAAiBkY,EAAIlY,SAAU,KACvCkY,EAAIlY,MAAQ,MAIbkY,EAAI5tB,IAAM4tB,EAAIJ,SAEdI,EAAIJ,SAAW,WACTx4B,EAAOkD,WAAY01B,EAAI5tB,MAC3B4tB,EAAI5tB,IAAI/J,KAAM9B,MAGVy5B,EAAIlY,OACR1gB,EAAO2gB,QAASxhB,KAAMy5B,EAAIlY,QAIrBkY,GAGR54B,EAAOG,GAAGsC,QACTq2B,OAAQ,SAAUH,EAAOI,EAAI/D,EAAQtzB,GAGpC,MAAOvC,MAAKwP,OAAQ4S,GAAWE,IAAK,UAAW,GAAIoR,OAGjDvwB,MAAM02B,SAAUlI,QAASiI,GAAMJ,EAAO3D,EAAQtzB,IAEjDs3B,QAAS,SAAUzS,EAAMoS,EAAO3D,EAAQtzB,GACvC,GAAIoS,GAAQ9T,EAAOoE,cAAemiB,GACjC0S,EAASj5B,EAAO24B,MAAOA,EAAO3D,EAAQtzB,GACtCw3B,EAAc,WAEb,GAAI9B,GAAOQ,GAAWz4B,KAAMa,EAAOyC,UAAY8jB,GAAQ0S,IAGlDnlB,GAAS9T,EAAOwgB,MAAOrhB,KAAM,YACjCi4B,EAAKrW,MAAM,GAKd,OAFCmY,GAAYC,OAASD,EAEfplB,GAASmlB,EAAOvY,SAAU,EAChCvhB,KAAKsC,KAAMy3B,GACX/5B,KAAKuhB,MAAOuY,EAAOvY,MAAOwY,IAE5BnY,KAAM,SAAUhd,EAAMkd,EAAYoX,GACjC,GAAIe,GAAY,SAAUvY,GACzB,GAAIE,GAAOF,EAAME,WACVF,GAAME,KACbA,EAAMsX,GAYP,OATqB,gBAATt0B,KACXs0B,EAAUpX,EACVA,EAAald,EACbA,EAAOV,QAEH4d,GAAcld,KAAS,GAC3B5E,KAAKuhB,MAAO3c,GAAQ,SAGd5E,KAAKsC,KAAK,WAChB,GAAIkf,IAAU,EACbjH,EAAgB,MAAR3V,GAAgBA,EAAO,aAC/Bs1B,EAASr5B,EAAOq5B,OAChB30B,EAAO1E,EAAOwgB,MAAOrhB,KAEtB,IAAKua,EACChV,EAAMgV,IAAWhV,EAAMgV,GAAQqH,MACnCqY,EAAW10B,EAAMgV,QAGlB,KAAMA,IAAShV,GACTA,EAAMgV,IAAWhV,EAAMgV,GAAQqH,MAAQoV,GAAKvqB,KAAM8N,IACtD0f,EAAW10B,EAAMgV,GAKpB,KAAMA,EAAQ2f,EAAOt4B,OAAQ2Y,KACvB2f,EAAQ3f,GAAQ7X,OAAS1C,MAAiB,MAAR4E,GAAgBs1B,EAAQ3f,GAAQgH,QAAU3c,IAChFs1B,EAAQ3f,GAAQ0d,KAAKrW,KAAMsX,GAC3B1X,GAAU,EACV0Y,EAAO72B,OAAQkX,EAAO,KAOnBiH,IAAY0X,IAChBr4B,EAAO2gB,QAASxhB,KAAM4E,MAIzBo1B,OAAQ,SAAUp1B,GAIjB,MAHKA,MAAS,IACbA,EAAOA,GAAQ,MAET5E,KAAKsC,KAAK,WAChB,GAAIiY,GACHhV,EAAO1E,EAAOwgB,MAAOrhB,MACrBuhB,EAAQhc,EAAMX,EAAO,SACrB8c,EAAQnc,EAAMX,EAAO,cACrBs1B,EAASr5B,EAAOq5B,OAChBt4B,EAAS2f,EAAQA,EAAM3f,OAAS,CAajC,KAVA2D,EAAKy0B,QAAS,EAGdn5B,EAAO0gB,MAAOvhB,KAAM4E,MAEf8c,GAASA,EAAME,MACnBF,EAAME,KAAK9f,KAAM9B,MAAM,GAIlBua,EAAQ2f,EAAOt4B,OAAQ2Y,KACvB2f,EAAQ3f,GAAQ7X,OAAS1C,MAAQk6B,EAAQ3f,GAAQgH,QAAU3c,IAC/Ds1B,EAAQ3f,GAAQ0d,KAAKrW,MAAM,GAC3BsY,EAAO72B,OAAQkX,EAAO,GAKxB,KAAMA,EAAQ,EAAW3Y,EAAR2Y,EAAgBA,IAC3BgH,EAAOhH,IAAWgH,EAAOhH,GAAQyf,QACrCzY,EAAOhH,GAAQyf,OAAOl4B,KAAM9B,YAKvBuF,GAAKy0B,YAKfn5B,EAAOyB,MAAO,SAAU,OAAQ,QAAU,SAAUK,EAAGe,GACtD,GAAIy2B,GAAQt5B,EAAOG,GAAI0C,EACvB7C,GAAOG,GAAI0C,GAAS,SAAU81B,EAAO3D,EAAQtzB,GAC5C,MAAgB,OAATi3B,GAAkC,iBAAVA,GAC9BW,EAAMv3B,MAAO5C,KAAM6C,WACnB7C,KAAK65B,QAASpC,GAAO/zB,GAAM,GAAQ81B,EAAO3D,EAAQtzB,MAKrD1B,EAAOyB,MACN83B,UAAW3C,GAAM,QACjB4C,QAAS5C,GAAM,QACf6C,YAAa7C,GAAM,UACnB8C,QAAU5I,QAAS,QACnB6I,SAAW7I,QAAS,QACpB8I,YAAc9I,QAAS,WACrB,SAAUjuB,EAAMgkB,GAClB7mB,EAAOG,GAAI0C,GAAS,SAAU81B,EAAO3D,EAAQtzB,GAC5C,MAAOvC,MAAK65B,QAASnS,EAAO8R,EAAO3D,EAAQtzB,MAI7C1B,EAAOq5B,UACPr5B,EAAOy1B,GAAGsC,KAAO,WAChB,GAAIQ,GACHc,EAASr5B,EAAOq5B,OAChBv3B,EAAI,CAIL,KAFAi0B,GAAQ/1B,EAAOoG,MAEPtE,EAAIu3B,EAAOt4B,OAAQe,IAC1By2B,EAAQc,EAAQv3B,GAEVy2B,KAAWc,EAAQv3B,KAAQy2B,GAChCc,EAAO72B,OAAQV,IAAK,EAIhBu3B,GAAOt4B,QACZf,EAAOy1B,GAAG1U,OAEXgV,GAAQ1yB,QAGTrD,EAAOy1B,GAAG8C,MAAQ,SAAUA,GAC3Bv4B,EAAOq5B,OAAO75B,KAAM+4B,GACfA,IACJv4B,EAAOy1B,GAAGtjB,QAEVnS,EAAOq5B,OAAOnxB,OAIhBlI,EAAOy1B,GAAGoE,SAAW,GAErB75B,EAAOy1B,GAAGtjB,MAAQ,WACX6jB,KACLA,GAAU8D,YAAa95B,EAAOy1B,GAAGsC,KAAM/3B,EAAOy1B,GAAGoE,YAInD75B,EAAOy1B,GAAG1U,KAAO,WAChBgZ,cAAe/D,IACfA,GAAU,MAGXh2B,EAAOy1B,GAAGoD,QACTmB,KAAM,IACNC,KAAM,IAENpU,SAAU,KAMX7lB,EAAOG,GAAG+5B,MAAQ,SAAUC,EAAMp2B,GAIjC,MAHAo2B,GAAOn6B,EAAOy1B,GAAKz1B,EAAOy1B,GAAGoD,OAAQsB,IAAUA,EAAOA,EACtDp2B,EAAOA,GAAQ,KAER5E,KAAKuhB,MAAO3c,EAAM,SAAUiV,EAAM6H,GACxC,GAAIuZ,GAAUpc,WAAYhF,EAAMmhB,EAChCtZ,GAAME,KAAO,WACZsZ,aAAcD,OAMjB,WAEC,GAAIprB,GAAOrC,EAAK9F,EAAQkB,EAAG6wB,CAG3BjsB,GAAM5N,EAAS6N,cAAe,OAC9BD,EAAIb,aAAc,YAAa,KAC/Ba,EAAIoC,UAAY,qEAChBhH,EAAI4E,EAAIlB,qBAAqB,KAAM,GAGnC5E,EAAS9H,EAAS6N,cAAc,UAChCgsB,EAAM/xB,EAAOyH,YAAavP,EAAS6N,cAAc,WACjDoC,EAAQrC,EAAIlB,qBAAqB,SAAU,GAE3C1D,EAAEgX,MAAMC,QAAU,UAGlBlf,EAAQw6B,gBAAoC,MAAlB3tB,EAAI0B,UAI9BvO,EAAQif,MAAQ,MAAMnT,KAAM7D,EAAE8D,aAAa,UAI3C/L,EAAQy6B,eAA4C,OAA3BxyB,EAAE8D,aAAa,QAGxC/L,EAAQ06B,UAAYxrB,EAAM/J,MAI1BnF,EAAQ26B,YAAc7B,EAAIhlB,SAG1B9T,EAAQ46B,UAAY37B,EAAS6N,cAAc,QAAQ8tB,QAInD7zB,EAAO6M,UAAW,EAClB5T,EAAQ66B,aAAe/B,EAAIllB,SAI3B1E,EAAQjQ,EAAS6N,cAAe,SAChCoC,EAAMlD,aAAc,QAAS,IAC7BhM,EAAQkP,MAA0C,KAAlCA,EAAMnD,aAAc,SAGpCmD,EAAM/J,MAAQ,IACd+J,EAAMlD,aAAc,OAAQ,SAC5BhM,EAAQ86B,WAA6B,MAAhB5rB,EAAM/J,QAI5B,IAAI41B,IAAU,KAEd76B,GAAOG,GAAGsC,QACT0N,IAAK,SAAUlL,GACd,GAAI4b,GAAOvf,EAAK4B,EACfrB,EAAO1C,KAAK,EAEb,EAAA,GAAM6C,UAAUjB,OAsBhB,MAFAmC,GAAalD,EAAOkD,WAAY+B,GAEzB9F,KAAKsC,KAAK,SAAUK,GAC1B,GAAIqO,EAEmB,KAAlBhR,KAAKmF,WAKT6L,EADIjN,EACE+B,EAAMhE,KAAM9B,KAAM2C,EAAG9B,EAAQb,MAAOgR,OAEpClL,EAIK,MAAPkL,EACJA,EAAM,GACoB,gBAARA,GAClBA,GAAO,GACInQ,EAAOoD,QAAS+M,KAC3BA,EAAMnQ,EAAO4B,IAAKuO,EAAK,SAAUlL,GAChC,MAAgB,OAATA,EAAgB,GAAKA,EAAQ,MAItC4b,EAAQ7gB,EAAO86B,SAAU37B,KAAK4E,OAAU/D,EAAO86B,SAAU37B,KAAK4F,SAASC,eAGjE6b,GAAW,OAASA,IAA8Cxd,SAApCwd,EAAMqN,IAAK/uB,KAAMgR,EAAK,WACzDhR,KAAK8F,MAAQkL,KAjDd,IAAKtO,EAGJ,MAFAgf,GAAQ7gB,EAAO86B,SAAUj5B,EAAKkC,OAAU/D,EAAO86B,SAAUj5B,EAAKkD,SAASC,eAElE6b,GAAS,OAASA,IAAgDxd,UAAtC/B,EAAMuf,EAAM3f,IAAKW,EAAM,UAChDP,GAGRA,EAAMO,EAAKoD,MAEW,gBAAR3D,GAEbA,EAAImC,QAAQo3B,GAAS,IAEd,MAAPv5B,EAAc,GAAKA,OA0CxBtB,EAAOyC,QACNq4B,UACClQ,QACC1pB,IAAK,SAAUW,GACd,GAAIsO,GAAMnQ,EAAO0O,KAAKwB,KAAMrO,EAAM,QAClC,OAAc,OAAPsO,EACNA,EAGAnQ,EAAO2E,KAAM3E,EAAOmF,KAAMtD,MAG7BgF,QACC3F,IAAK,SAAUW,GAYd,IAXA,GAAIoD,GAAO2lB,EACV9nB,EAAUjB,EAAKiB,QACf4W,EAAQ7X,EAAKgS,cACb6V,EAAoB,eAAd7nB,EAAKkC,MAAiC,EAAR2V,EACpC0D,EAASsM,EAAM,QACfjkB,EAAMikB,EAAMhQ,EAAQ,EAAI5W,EAAQ/B,OAChCe,EAAY,EAAR4X,EACHjU,EACAikB,EAAMhQ,EAAQ,EAGJjU,EAAJ3D,EAASA,IAIhB,GAHA8oB,EAAS9nB,EAAShB,MAGX8oB,EAAOhX,UAAY9R,IAAM4X,IAE5B5Z,EAAQ66B,YAAe/P,EAAOlX,SAA+C,OAApCkX,EAAO/e,aAAa,cAC5D+e,EAAOrf,WAAWmI,UAAa1T,EAAO+E,SAAU6lB,EAAOrf,WAAY,aAAiB,CAMxF,GAHAtG,EAAQjF,EAAQ4qB,GAASza,MAGpBuZ,EACJ,MAAOzkB,EAIRmY,GAAO5d,KAAMyF,GAIf,MAAOmY,IAGR8Q,IAAK,SAAUrsB,EAAMoD,GACpB,GAAI81B,GAAWnQ,EACd9nB,EAAUjB,EAAKiB,QACfsa,EAASpd,EAAOoF,UAAWH,GAC3BnD,EAAIgB,EAAQ/B,MAEb,OAAQe,IAGP,GAFA8oB,EAAS9nB,EAAShB,GAEb9B,EAAOwF,QAASxF,EAAO86B,SAASlQ,OAAO1pB,IAAK0pB,GAAUxN,IAAY,EAMtE,IACCwN,EAAOhX,SAAWmnB,GAAY,EAE7B,MAAQ5wB,GAGTygB,EAAOoQ,iBAIRpQ,GAAOhX,UAAW,CASpB,OAJMmnB,KACLl5B,EAAKgS,cAAgB,IAGf/Q,OAOX9C,EAAOyB,MAAO,QAAS,YAAc,WACpCzB,EAAO86B,SAAU37B,OAChB+uB,IAAK,SAAUrsB,EAAMoD,GACpB,MAAKjF,GAAOoD,QAAS6B,GACXpD,EAAK8R,QAAU3T,EAAOwF,QAASxF,EAAO6B,GAAMsO,MAAOlL,IAAW,EADxE,SAKInF,EAAQ06B,UACbx6B,EAAO86B,SAAU37B,MAAO+B,IAAM,SAAUW,GAGvC,MAAsC,QAA/BA,EAAKgK,aAAa,SAAoB,KAAOhK,EAAKoD,SAQ5D,IAAIg2B,IAAUC,GACbjuB,GAAajN,EAAOgQ,KAAK/C,WACzBkuB,GAAc,0BACdb,GAAkBx6B,EAAQw6B,gBAC1Bc,GAAct7B,EAAQkP,KAEvBhP,GAAOG,GAAGsC,QACTyN,KAAM,SAAUrN,EAAMoC,GACrB,MAAOyc,GAAQviB,KAAMa,EAAOkQ,KAAMrN,EAAMoC,EAAOjD,UAAUjB,OAAS,IAGnEs6B,WAAY,SAAUx4B,GACrB,MAAO1D,MAAKsC,KAAK,WAChBzB,EAAOq7B,WAAYl8B,KAAM0D,QAK5B7C,EAAOyC,QACNyN,KAAM,SAAUrO,EAAMgB,EAAMoC,GAC3B,GAAI4b,GAAOvf,EACVg6B,EAAQz5B,EAAKyC,QAGd,IAAMzC,GAAkB,IAAVy5B,GAAyB,IAAVA,GAAyB,IAAVA,EAK5C,aAAYz5B,GAAKgK,eAAiB+S,EAC1B5e,EAAOumB,KAAM1kB,EAAMgB,EAAMoC,IAKlB,IAAVq2B,GAAgBt7B,EAAOgY,SAAUnW,KACrCgB,EAAOA,EAAKmC,cACZ6b,EAAQ7gB,EAAOu7B,UAAW14B,KACvB7C,EAAOgQ,KAAKnF,MAAMpB,KAAKmC,KAAM/I,GAASq4B,GAAWD,KAGtC53B,SAAV4B,EAaO4b,GAAS,OAASA,IAA6C,QAAnCvf,EAAMuf,EAAM3f,IAAKW,EAAMgB,IACvDvB,GAGPA,EAAMtB,EAAO0O,KAAKwB,KAAMrO,EAAMgB,GAGhB,MAAPvB,EACN+B,OACA/B,GApBc,OAAV2D,EAGO4b,GAAS,OAASA,IAAoDxd,UAA1C/B,EAAMuf,EAAMqN,IAAKrsB,EAAMoD,EAAOpC,IAC9DvB,GAGPO,EAAKiK,aAAcjJ,EAAMoC,EAAQ,IAC1BA,OAPPjF,GAAOq7B,WAAYx5B,EAAMgB,KAuB5Bw4B,WAAY,SAAUx5B,EAAMoD,GAC3B,GAAIpC,GAAM24B,EACT15B,EAAI,EACJ25B,EAAYx2B,GAASA,EAAM4F,MAAO0P,EAEnC,IAAKkhB,GAA+B,IAAlB55B,EAAKyC,SACtB,MAASzB,EAAO44B,EAAU35B,KACzB05B,EAAWx7B,EAAO07B,QAAS74B,IAAUA,EAGhC7C,EAAOgQ,KAAKnF,MAAMpB,KAAKmC,KAAM/I,GAE5Bu4B,IAAed,KAAoBa,GAAYvvB,KAAM/I,GACzDhB,EAAM25B,IAAa,EAInB35B,EAAM7B,EAAO6E,UAAW,WAAahC,IACpChB,EAAM25B,IAAa,EAKrBx7B,EAAOkQ,KAAMrO,EAAMgB,EAAM,IAG1BhB,EAAKuK,gBAAiBkuB,GAAkBz3B,EAAO24B,IAKlDD,WACCx3B,MACCmqB,IAAK,SAAUrsB,EAAMoD,GACpB,IAAMnF,EAAQ86B,YAAwB,UAAV31B,GAAqBjF,EAAO+E,SAASlD,EAAM,SAAW,CAGjF,GAAIsO,GAAMtO,EAAKoD,KAKf,OAJApD,GAAKiK,aAAc,OAAQ7G,GACtBkL,IACJtO,EAAKoD,MAAQkL,GAEPlL,QAQZi2B,IACChN,IAAK,SAAUrsB,EAAMoD,EAAOpC,GAa3B,MAZKoC,MAAU,EAEdjF,EAAOq7B,WAAYx5B,EAAMgB,GACdu4B,IAAed,KAAoBa,GAAYvvB,KAAM/I,GAEhEhB,EAAKiK,cAAewuB,IAAmBt6B,EAAO07B,QAAS74B,IAAUA,EAAMA,GAIvEhB,EAAM7B,EAAO6E,UAAW,WAAahC,IAAWhB,EAAMgB,IAAS,EAGzDA,IAKT7C,EAAOyB,KAAMzB,EAAOgQ,KAAKnF,MAAMpB,KAAK4X,OAAOxW,MAAO,QAAU,SAAU/I,EAAGe,GAExE,GAAI84B,GAAS1uB,GAAYpK,IAAU7C,EAAO0O,KAAKwB,IAE/CjD,IAAYpK,GAASu4B,IAAed,KAAoBa,GAAYvvB,KAAM/I,GACzE,SAAUhB,EAAMgB,EAAM6D,GACrB,GAAIpF,GAAK8iB,CAUT,OATM1d,KAEL0d,EAASnX,GAAYpK,GACrBoK,GAAYpK,GAASvB,EACrBA,EAAqC,MAA/Bq6B,EAAQ95B,EAAMgB,EAAM6D,GACzB7D,EAAKmC,cACL,KACDiI,GAAYpK,GAASuhB,GAEf9iB,GAER,SAAUO,EAAMgB,EAAM6D,GACrB,MAAMA,GAAN,OACQ7E,EAAM7B,EAAO6E,UAAW,WAAahC,IAC3CA,EAAKmC,cACL,QAMCo2B,IAAgBd,KACrBt6B,EAAOu7B,UAAUt2B,OAChBipB,IAAK,SAAUrsB,EAAMoD,EAAOpC,GAC3B,MAAK7C,GAAO+E,SAAUlD,EAAM,cAE3BA,EAAKiW,aAAe7S,GAGbg2B,IAAYA,GAAS/M,IAAKrsB,EAAMoD,EAAOpC,MAO5Cy3B,KAILW,IACC/M,IAAK,SAAUrsB,EAAMoD,EAAOpC,GAE3B,GAAIvB,GAAMO,EAAKgN,iBAAkBhM,EAUjC,OATMvB,IACLO,EAAK+5B,iBACHt6B,EAAMO,EAAKuJ,cAAcywB,gBAAiBh5B,IAI7CvB,EAAI2D,MAAQA,GAAS,GAGP,UAATpC,GAAoBoC,IAAUpD,EAAKgK,aAAchJ,GAC9CoC,EADR,SAOFgI,GAAWzB,GAAKyB,GAAWpK,KAAOoK,GAAW6uB,OAC5C,SAAUj6B,EAAMgB,EAAM6D,GACrB,GAAIpF,EACJ,OAAMoF,GAAN,QACSpF,EAAMO,EAAKgN,iBAAkBhM,KAAyB,KAAdvB,EAAI2D,MACnD3D,EAAI2D,MACJ,MAKJjF,EAAO86B,SAAS9mB,QACf9S,IAAK,SAAUW,EAAMgB,GACpB,GAAIvB,GAAMO,EAAKgN,iBAAkBhM,EACjC,OAAKvB,IAAOA,EAAI8O,UACR9O,EAAI2D,MADZ,QAIDipB,IAAK+M,GAAS/M,KAKfluB,EAAOu7B,UAAUQ,iBAChB7N,IAAK,SAAUrsB,EAAMoD,EAAOpC,GAC3Bo4B,GAAS/M,IAAKrsB,EAAgB,KAAVoD,GAAe,EAAQA,EAAOpC,KAMpD7C,EAAOyB,MAAO,QAAS,UAAY,SAAUK,EAAGe,GAC/C7C,EAAOu7B,UAAW14B,IACjBqrB,IAAK,SAAUrsB,EAAMoD,GACpB,MAAe,KAAVA,GACJpD,EAAKiK,aAAcjJ,EAAM,QAClBoC,GAFR,YASEnF,EAAQif,QACb/e,EAAOu7B,UAAUxc,OAChB7d,IAAK,SAAUW,GAId,MAAOA,GAAKkd,MAAMC,SAAW3b,QAE9B6qB,IAAK,SAAUrsB,EAAMoD,GACpB,MAASpD,GAAKkd,MAAMC,QAAU/Z,EAAQ,KAQzC,IAAI+2B,IAAa,6CAChBC,GAAa,eAEdj8B,GAAOG,GAAGsC,QACT8jB,KAAM,SAAU1jB,EAAMoC,GACrB,MAAOyc,GAAQviB,KAAMa,EAAOumB,KAAM1jB,EAAMoC,EAAOjD,UAAUjB,OAAS,IAGnEm7B,WAAY,SAAUr5B,GAErB,MADAA,GAAO7C,EAAO07B,QAAS74B,IAAUA,EAC1B1D,KAAKsC,KAAK,WAEhB,IACCtC,KAAM0D,GAASQ,aACRlE,MAAM0D,GACZ,MAAO0B,UAKZvE,EAAOyC,QACNi5B,SACCS,MAAO,UACPC,QAAS,aAGV7V,KAAM,SAAU1kB,EAAMgB,EAAMoC,GAC3B,GAAI3D,GAAKuf,EAAOwb,EACff,EAAQz5B,EAAKyC,QAGd,IAAMzC,GAAkB,IAAVy5B,GAAyB,IAAVA,GAAyB,IAAVA,EAY5C,MARAe,GAAmB,IAAVf,IAAgBt7B,EAAOgY,SAAUnW,GAErCw6B,IAEJx5B,EAAO7C,EAAO07B,QAAS74B,IAAUA,EACjCge,EAAQ7gB,EAAOk1B,UAAWryB,IAGZQ,SAAV4B,EACG4b,GAAS,OAASA,IAAoDxd,UAA1C/B,EAAMuf,EAAMqN,IAAKrsB,EAAMoD,EAAOpC,IAChEvB,EACEO,EAAMgB,GAASoC,EAGX4b,GAAS,OAASA,IAA6C,QAAnCvf,EAAMuf,EAAM3f,IAAKW,EAAMgB,IACzDvB,EACAO,EAAMgB,IAITqyB,WACC1hB,UACCtS,IAAK,SAAUW,GAId,GAAIy6B,GAAWt8B,EAAO0O,KAAKwB,KAAMrO,EAAM,WAEvC,OAAOy6B,GACNC,SAAUD,EAAU,IACpBN,GAAWpwB,KAAM/J,EAAKkD,WAAck3B,GAAWrwB,KAAM/J,EAAKkD,WAAclD,EAAK0R,KAC5E,EACA,QAQAzT,EAAQy6B,gBAEbv6B,EAAOyB,MAAO,OAAQ,OAAS,SAAUK,EAAGe,GAC3C7C,EAAOk1B,UAAWryB,IACjB3B,IAAK,SAAUW,GACd,MAAOA,GAAKgK,aAAchJ,EAAM,OAS9B/C,EAAQ26B,cACbz6B,EAAOk1B,UAAUthB,UAChB1S,IAAK,SAAUW,GACd,GAAIkM,GAASlM,EAAK0J,UAUlB,OARKwC,KACJA,EAAO8F,cAGF9F,EAAOxC,YACXwC,EAAOxC,WAAWsI,eAGb,QAKV7T,EAAOyB,MACN,WACA,WACA,YACA,cACA,cACA,UACA,UACA,SACA,cACA,mBACE,WACFzB,EAAO07B,QAASv8B,KAAK6F,eAAkB7F,OAIlCW,EAAQ46B,UACb16B,EAAO07B,QAAQhB,QAAU,WAM1B,IAAI8B,IAAS,aAEbx8B,GAAOG,GAAGsC,QACTg6B,SAAU,SAAUx3B,GACnB,GAAIy3B,GAAS76B,EAAMsL,EAAKwvB,EAAOt6B,EAAGu6B,EACjC96B,EAAI,EACJM,EAAMjD,KAAK4B,OACX87B,EAA2B,gBAAV53B,IAAsBA,CAExC,IAAKjF,EAAOkD,WAAY+B,GACvB,MAAO9F,MAAKsC,KAAK,SAAUY,GAC1BrC,EAAQb,MAAOs9B,SAAUx3B,EAAMhE,KAAM9B,KAAMkD,EAAGlD,KAAKkP,aAIrD,IAAKwuB,EAIJ,IAFAH,GAAYz3B,GAAS,IAAK4F,MAAO0P,OAErBnY,EAAJN,EAASA,IAOhB,GANAD,EAAO1C,KAAM2C,GACbqL,EAAwB,IAAlBtL,EAAKyC,WAAoBzC,EAAKwM,WACjC,IAAMxM,EAAKwM,UAAY,KAAM5K,QAAS+4B,GAAQ,KAChD,KAGU,CACVn6B,EAAI,CACJ,OAASs6B,EAAQD,EAAQr6B,KACnB8K,EAAI1N,QAAS,IAAMk9B,EAAQ,KAAQ,IACvCxvB,GAAOwvB,EAAQ,IAKjBC,GAAa58B,EAAO2E,KAAMwI,GACrBtL,EAAKwM,YAAcuuB,IACvB/6B,EAAKwM,UAAYuuB,GAMrB,MAAOz9B,OAGR29B,YAAa,SAAU73B,GACtB,GAAIy3B,GAAS76B,EAAMsL,EAAKwvB,EAAOt6B,EAAGu6B,EACjC96B,EAAI,EACJM,EAAMjD,KAAK4B,OACX87B,EAA+B,IAArB76B,UAAUjB,QAAiC,gBAAVkE,IAAsBA,CAElE,IAAKjF,EAAOkD,WAAY+B,GACvB,MAAO9F,MAAKsC,KAAK,SAAUY,GAC1BrC,EAAQb,MAAO29B,YAAa73B,EAAMhE,KAAM9B,KAAMkD,EAAGlD,KAAKkP,aAGxD,IAAKwuB,EAGJ,IAFAH,GAAYz3B,GAAS,IAAK4F,MAAO0P,OAErBnY,EAAJN,EAASA,IAQhB,GAPAD,EAAO1C,KAAM2C,GAEbqL,EAAwB,IAAlBtL,EAAKyC,WAAoBzC,EAAKwM,WACjC,IAAMxM,EAAKwM,UAAY,KAAM5K,QAAS+4B,GAAQ,KAChD,IAGU,CACVn6B,EAAI,CACJ,OAASs6B,EAAQD,EAAQr6B,KAExB,MAAQ8K,EAAI1N,QAAS,IAAMk9B,EAAQ,MAAS,EAC3CxvB,EAAMA,EAAI1J,QAAS,IAAMk5B,EAAQ,IAAK,IAKxCC,GAAa33B,EAAQjF,EAAO2E,KAAMwI,GAAQ,GACrCtL,EAAKwM,YAAcuuB,IACvB/6B,EAAKwM,UAAYuuB,GAMrB,MAAOz9B,OAGR49B,YAAa,SAAU93B,EAAO+3B,GAC7B,GAAIj5B,SAAckB,EAElB,OAAyB,iBAAb+3B,IAAmC,WAATj5B,EAC9Bi5B,EAAW79B,KAAKs9B,SAAUx3B,GAAU9F,KAAK29B,YAAa73B,GAItD9F,KAAKsC,KADRzB,EAAOkD,WAAY+B,GACN,SAAUnD,GAC1B9B,EAAQb,MAAO49B,YAAa93B,EAAMhE,KAAK9B,KAAM2C,EAAG3C,KAAKkP,UAAW2uB,GAAWA,IAI5D,WAChB,GAAc,WAATj5B,EAAoB,CAExB,GAAIsK,GACHvM,EAAI,EACJwW,EAAOtY,EAAQb,MACf89B,EAAah4B,EAAM4F,MAAO0P,MAE3B,OAASlM,EAAY4uB,EAAYn7B,KAE3BwW,EAAK4kB,SAAU7uB,GACnBiK,EAAKwkB,YAAazuB,GAElBiK,EAAKmkB,SAAUpuB,QAKNtK,IAAS6a,GAAyB,YAAT7a,KAC/B5E,KAAKkP,WAETrO,EAAOwgB,MAAOrhB,KAAM,gBAAiBA,KAAKkP,WAO3ClP,KAAKkP,UAAYlP,KAAKkP,WAAapJ,KAAU,EAAQ,GAAKjF,EAAOwgB,MAAOrhB,KAAM,kBAAqB,OAKtG+9B,SAAU,SAAUj9B,GAInB,IAHA,GAAIoO,GAAY,IAAMpO,EAAW,IAChC6B,EAAI,EACJ0X,EAAIra,KAAK4B,OACEyY,EAAJ1X,EAAOA,IACd,GAA0B,IAArB3C,KAAK2C,GAAGwC,WAAmB,IAAMnF,KAAK2C,GAAGuM,UAAY,KAAK5K,QAAQ+4B,GAAQ,KAAK/8B,QAAS4O,IAAe,EAC3G,OAAO,CAIT,QAAO,KAUTrO,EAAOyB,KAAM,0MAEqD6E,MAAM,KAAM,SAAUxE,EAAGe,GAG1F7C,EAAOG,GAAI0C,GAAS,SAAU6B,EAAMvE,GACnC,MAAO6B,WAAUjB,OAAS,EACzB5B,KAAKsqB,GAAI5mB,EAAM,KAAM6B,EAAMvE,GAC3BhB,KAAK6lB,QAASniB,MAIjB7C,EAAOG,GAAGsC,QACT06B,MAAO,SAAUC,EAAQC,GACxB,MAAOl+B,MAAKwpB,WAAYyU,GAASxU,WAAYyU,GAASD,IAGvDE,KAAM,SAAU7Z,EAAO/e,EAAMvE,GAC5B,MAAOhB,MAAKsqB,GAAIhG,EAAO,KAAM/e,EAAMvE,IAEpCo9B,OAAQ,SAAU9Z,EAAOtjB,GACxB,MAAOhB,MAAK+e,IAAKuF,EAAO,KAAMtjB,IAG/Bq9B,SAAU,SAAUv9B,EAAUwjB,EAAO/e,EAAMvE,GAC1C,MAAOhB,MAAKsqB,GAAIhG,EAAOxjB,EAAUyE,EAAMvE,IAExCs9B,WAAY,SAAUx9B,EAAUwjB,EAAOtjB,GAEtC,MAA4B,KAArB6B,UAAUjB,OAAe5B,KAAK+e,IAAKje,EAAU,MAASd,KAAK+e,IAAKuF,EAAOxjB,GAAY,KAAME,KAKlG,IAAIu9B,IAAQ19B,EAAOoG,MAEfu3B,GAAS,KAITC,GAAe,kIAEnB59B,GAAOyf,UAAY,SAAU/a,GAE5B,GAAKxF,EAAO2+B,MAAQ3+B,EAAO2+B,KAAKC,MAG/B,MAAO5+B,GAAO2+B,KAAKC,MAAOp5B,EAAO,GAGlC,IAAIq5B,GACHC,EAAQ,KACRC,EAAMj+B,EAAO2E,KAAMD,EAAO,GAI3B,OAAOu5B,KAAQj+B,EAAO2E,KAAMs5B,EAAIx6B,QAASm6B,GAAc,SAAUjmB,EAAOumB,EAAOC,EAAMlP,GAQpF,MALK8O,IAAmBG,IACvBF,EAAQ,GAIM,IAAVA,EACGrmB,GAIRomB,EAAkBI,GAAQD,EAM1BF,IAAU/O,GAASkP,EAGZ,OAELC,SAAU,UAAYH,KACxBj+B,EAAO2D,MAAO,iBAAmBe,IAKnC1E,EAAOq+B,SAAW,SAAU35B,GAC3B,GAAIsN,GAAK7L,CACT,KAAMzB,GAAwB,gBAATA,GACpB,MAAO,KAER,KACMxF,EAAOo/B,WACXn4B,EAAM,GAAIm4B,WACVtsB,EAAM7L,EAAIo4B,gBAAiB75B,EAAM,cAEjCsN,EAAM,GAAIwsB,eAAe,oBACzBxsB,EAAIysB,MAAQ,QACZzsB,EAAI0sB,QAASh6B,IAEb,MAAOH,GACRyN,EAAM3O,OAKP,MAHM2O,IAAQA,EAAIpE,kBAAmBoE,EAAIvG,qBAAsB,eAAgB1K,QAC9Ef,EAAO2D,MAAO,gBAAkBe,GAE1BsN,EAIR,IAEC2sB,IACAC,GAEAC,GAAQ,OACRC,GAAM,gBACNC,GAAW,gCAEXC,GAAiB,4DACjBC,GAAa,iBACbC,GAAY,QACZC,GAAO,4DAWPC,MAOAC,MAGAC,GAAW,KAAK//B,OAAO,IAIxB,KACCq/B,GAAe1rB,SAASK,KACvB,MAAOhP,IAGRq6B,GAAe7/B,EAAS6N,cAAe,KACvCgyB,GAAarrB,KAAO,GACpBqrB,GAAeA,GAAarrB,KAI7BorB,GAAeQ,GAAK9zB,KAAMuzB,GAAa55B,kBAGvC,SAASu6B,IAA6BC,GAGrC,MAAO,UAAUC,EAAoB5jB,GAED,gBAAvB4jB,KACX5jB,EAAO4jB,EACPA,EAAqB,IAGtB,IAAIC,GACH59B,EAAI,EACJ69B,EAAYF,EAAmBz6B,cAAc6F,MAAO0P,MAErD,IAAKva,EAAOkD,WAAY2Y,GAEvB,MAAS6jB,EAAWC,EAAU79B,KAEC,MAAzB49B,EAASjnB,OAAQ,IACrBinB,EAAWA,EAASpgC,MAAO,IAAO,KACjCkgC,EAAWE,GAAaF,EAAWE,QAAkB3vB,QAAS8L,KAI9D2jB,EAAWE,GAAaF,EAAWE,QAAkBlgC,KAAMqc,IAQjE,QAAS+jB,IAA+BJ,EAAW18B,EAASs1B,EAAiByH,GAE5E,GAAIC,MACHC,EAAqBP,IAAcH,EAEpC,SAASW,GAASN,GACjB,GAAI9rB,EAYJ,OAXAksB,GAAWJ,IAAa,EACxB1/B,EAAOyB,KAAM+9B,EAAWE,OAAkB,SAAUv1B,EAAG81B,GACtD,GAAIC,GAAsBD,EAAoBn9B,EAASs1B,EAAiByH,EACxE,OAAoC,gBAAxBK,IAAqCH,GAAqBD,EAAWI,GAIrEH,IACDnsB,EAAWssB,GADf,QAHNp9B,EAAQ68B,UAAU5vB,QAASmwB,GAC3BF,EAASE,IACF,KAKFtsB,EAGR,MAAOosB,GAASl9B,EAAQ68B,UAAW,MAAUG,EAAW,MAASE,EAAS,KAM3E,QAASG,IAAYn9B,EAAQN,GAC5B,GAAIO,GAAMoB,EACT+7B,EAAcpgC,EAAOqgC,aAAaD,eAEnC,KAAM/7B,IAAO3B,GACQW,SAAfX,EAAK2B,MACP+7B,EAAa/7B,GAAQrB,EAAWC,IAASA,OAAgBoB,GAAQ3B,EAAK2B,GAO1E,OAJKpB,IACJjD,EAAOyC,QAAQ,EAAMO,EAAQC,GAGvBD,EAOR,QAASs9B,IAAqBC,EAAGV,EAAOW,GACvC,GAAIC,GAAeC,EAAIC,EAAe58B,EACrCgV,EAAWwnB,EAAExnB,SACb4mB,EAAYY,EAAEZ,SAGf,OAA2B,MAAnBA,EAAW,GAClBA,EAAUnzB,QACEnJ,SAAPq9B,IACJA,EAAKH,EAAEK,UAAYf,EAAMgB,kBAAkB,gBAK7C,IAAKH,EACJ,IAAM38B,IAAQgV,GACb,GAAKA,EAAUhV,IAAUgV,EAAUhV,GAAO6H,KAAM80B,GAAO,CACtDf,EAAU5vB,QAAShM,EACnB,OAMH,GAAK47B,EAAW,IAAOa,GACtBG,EAAgBhB,EAAW,OACrB,CAEN,IAAM57B,IAAQy8B,GAAY,CACzB,IAAMb,EAAW,IAAOY,EAAEO,WAAY/8B,EAAO,IAAM47B,EAAU,IAAO,CACnEgB,EAAgB58B,CAChB,OAEK08B,IACLA,EAAgB18B,GAIlB48B,EAAgBA,GAAiBF,EAMlC,MAAKE,IACCA,IAAkBhB,EAAW,IACjCA,EAAU5vB,QAAS4wB,GAEbH,EAAWG,IAJnB,OAWD,QAASI,IAAaR,EAAGS,EAAUnB,EAAOoB,GACzC,GAAIC,GAAOC,EAASC,EAAMj7B,EAAK8S,EAC9B6nB,KAEAnB,EAAYY,EAAEZ,UAAUrgC,OAGzB,IAAKqgC,EAAW,GACf,IAAMyB,IAAQb,GAAEO,WACfA,EAAYM,EAAKp8B,eAAkBu7B,EAAEO,WAAYM,EAInDD,GAAUxB,EAAUnzB,OAGpB,OAAQ20B,EAcP,GAZKZ,EAAEc,eAAgBF,KACtBtB,EAAOU,EAAEc,eAAgBF,IAAcH,IAIlC/nB,GAAQgoB,GAAaV,EAAEe,aAC5BN,EAAWT,EAAEe,WAAYN,EAAUT,EAAEb,WAGtCzmB,EAAOkoB,EACPA,EAAUxB,EAAUnzB,QAKnB,GAAiB,MAAZ20B,EAEJA,EAAUloB,MAGJ,IAAc,MAATA,GAAgBA,IAASkoB,EAAU,CAM9C,GAHAC,EAAON,EAAY7nB,EAAO,IAAMkoB,IAAaL,EAAY,KAAOK,IAG1DC,EACL,IAAMF,IAASJ,GAId,GADA36B,EAAM+6B,EAAM56B,MAAO,KACdH,EAAK,KAAQg7B,IAGjBC,EAAON,EAAY7nB,EAAO,IAAM9S,EAAK,KACpC26B,EAAY,KAAO36B,EAAK,KACb,CAENi7B,KAAS,EACbA,EAAON,EAAYI,GAGRJ,EAAYI,MAAY,IACnCC,EAAUh7B,EAAK,GACfw5B,EAAU5vB,QAAS5J,EAAK,IAEzB,OAOJ,GAAKi7B,KAAS,EAGb,GAAKA,GAAQb,EAAG,UACfS,EAAWI,EAAMJ,OAEjB,KACCA,EAAWI,EAAMJ,GAChB,MAAQz8B,GACT,OAASwX,MAAO,cAAepY,MAAOy9B,EAAO78B,EAAI,sBAAwB0U,EAAO,OAASkoB,IAQ/F,OAASplB,MAAO,UAAWrX,KAAMs8B,GAGlChhC,EAAOyC,QAGN8+B,OAAQ,EAGRC,gBACAC,QAEApB,cACCqB,IAAK9C,GACL76B,KAAM,MACN49B,QAAS3C,GAAepzB,KAAM+yB,GAAc,IAC5ChgC,QAAQ,EACRijC,aAAa,EACbnD,OAAO,EACPoD,YAAa,mDAabC,SACCvL,IAAK+I,GACLn6B,KAAM,aACN2oB,KAAM,YACN9b,IAAK,4BACL+vB,KAAM,qCAGPhpB,UACC/G,IAAK,MACL8b,KAAM,OACNiU,KAAM,QAGPV,gBACCrvB,IAAK,cACL7M,KAAM,eACN48B,KAAM,gBAKPjB,YAGCkB,SAAUz3B,OAGV03B,aAAa,EAGbC,YAAaliC,EAAOyf,UAGpB0iB,WAAYniC,EAAOq+B,UAOpB+B,aACCsB,KAAK,EACLxhC,SAAS,IAOXkiC,UAAW,SAAUp/B,EAAQq/B,GAC5B,MAAOA,GAGNlC,GAAYA,GAAYn9B,EAAQhD,EAAOqgC,cAAgBgC,GAGvDlC,GAAYngC,EAAOqgC,aAAcr9B,IAGnCs/B,cAAe/C,GAA6BH,IAC5CmD,cAAehD,GAA6BF,IAG5CmD,KAAM,SAAUd,EAAK5+B,GAGA,gBAAR4+B,KACX5+B,EAAU4+B,EACVA,EAAMr+B,QAIPP,EAAUA,KAEV,IACC8xB,GAEA9yB,EAEA2gC,EAEAC,EAEAC,EAGAC,EAEAC,EAEAC,EAEAvC,EAAIvgC,EAAOoiC,aAAet/B,GAE1BigC,EAAkBxC,EAAErgC,SAAWqgC,EAE/ByC,EAAqBzC,EAAErgC,UAAa6iC,EAAgBz+B,UAAYy+B,EAAgBliC,QAC/Eb,EAAQ+iC,GACR/iC,EAAOue,MAERrC,EAAWlc,EAAO4b,WAClBqnB,EAAmBjjC,EAAO4a,UAAU,eAEpCsoB,EAAa3C,EAAE2C,eAEfC,KACAC,KAEArnB,EAAQ,EAERsnB,EAAW,WAEXxD,GACCrhB,WAAY,EAGZqiB,kBAAmB,SAAUx8B,GAC5B,GAAIwG,EACJ,IAAe,IAAVkR,EAAc,CAClB,IAAM+mB,EAAkB,CACvBA,IACA,OAASj4B,EAAQk0B,GAAS1zB,KAAMq3B,GAC/BI,EAAiBj4B,EAAM,GAAG7F,eAAkB6F,EAAO,GAGrDA,EAAQi4B,EAAiBz+B,EAAIW,eAE9B,MAAgB,OAAT6F,EAAgB,KAAOA,GAI/By4B,sBAAuB,WACtB,MAAiB,KAAVvnB,EAAc2mB,EAAwB,MAI9Ca,iBAAkB,SAAU1gC,EAAMoC,GACjC,GAAIu+B,GAAQ3gC,EAAKmC,aAKjB,OAJM+W,KACLlZ,EAAOugC,EAAqBI,GAAUJ,EAAqBI,IAAW3gC,EACtEsgC,EAAgBtgC,GAASoC,GAEnB9F,MAIRskC,iBAAkB,SAAU1/B,GAI3B,MAHMgY,KACLwkB,EAAEK,SAAW78B,GAEP5E,MAIR+jC,WAAY,SAAUthC,GACrB,GAAI8hC,EACJ,IAAK9hC,EACJ,GAAa,EAARma,EACJ,IAAM2nB,IAAQ9hC,GAEbshC,EAAYQ,IAAWR,EAAYQ,GAAQ9hC,EAAK8hC,QAIjD7D,GAAM5jB,OAAQra,EAAKi+B,EAAM8D,QAG3B,OAAOxkC,OAIRykC,MAAO,SAAUC,GAChB,GAAIC,GAAYD,GAAcR,CAK9B,OAJKR,IACJA,EAAUe,MAAOE,GAElBr8B,EAAM,EAAGq8B,GACF3kC,MAwCV,IAnCA+c,EAASF,QAAS6jB,GAAQrH,SAAWyK,EAAiBrpB,IACtDimB,EAAMkE,QAAUlE,EAAMp4B,KACtBo4B,EAAMl8B,MAAQk8B,EAAM1jB,KAMpBokB,EAAEmB,MAAUA,GAAOnB,EAAEmB,KAAO9C,IAAiB,IAAKn7B,QAASo7B,GAAO,IAAKp7B,QAASy7B,GAAWP,GAAc,GAAM,MAG/G4B,EAAEx8B,KAAOjB,EAAQkhC,QAAUlhC,EAAQiB,MAAQw8B,EAAEyD,QAAUzD,EAAEx8B,KAGzDw8B,EAAEZ,UAAY3/B,EAAO2E,KAAM47B,EAAEb,UAAY,KAAM16B,cAAc6F,MAAO0P,KAAiB,IAG/D,MAAjBgmB,EAAE0D,cACNrP,EAAQuK,GAAK9zB,KAAMk1B,EAAEmB,IAAI18B,eACzBu7B,EAAE0D,eAAkBrP,GACjBA,EAAO,KAAQ+J,GAAc,IAAO/J,EAAO,KAAQ+J,GAAc,KAChE/J,EAAO,KAAwB,UAAfA,EAAO,GAAkB,KAAO,WAC/C+J,GAAc,KAA+B,UAAtBA,GAAc,GAAkB,KAAO,UAK/D4B,EAAE77B,MAAQ67B,EAAEqB,aAAiC,gBAAXrB,GAAE77B,OACxC67B,EAAE77B,KAAO1E,EAAO+qB,MAAOwV,EAAE77B,KAAM67B,EAAE2D,cAIlCtE,GAA+BR,GAAYmB,EAAGz9B,EAAS+8B,GAGxC,IAAV9jB,EACJ,MAAO8jB,EAKR+C,GAAc5iC,EAAOue,OAASgiB,EAAE5hC,OAG3BikC,GAAmC,IAApB5iC,EAAOuhC,UAC1BvhC,EAAOue,MAAMyG,QAAQ,aAItBub,EAAEx8B,KAAOw8B,EAAEx8B,KAAKpD,cAGhB4/B,EAAE4D,YAAclF,GAAWrzB,KAAM20B,EAAEx8B,MAInC0+B,EAAWlC,EAAEmB,IAGPnB,EAAE4D,aAGF5D,EAAE77B,OACN+9B,EAAalC,EAAEmB,MAAS/D,GAAO/xB,KAAM62B,GAAa,IAAM,KAAQlC,EAAE77B,WAE3D67B,GAAE77B,MAIL67B,EAAEj0B,SAAU,IAChBi0B,EAAEmB,IAAM5C,GAAIlzB,KAAM62B,GAGjBA,EAASh/B,QAASq7B,GAAK,OAASpB,MAGhC+E,GAAa9E,GAAO/xB,KAAM62B,GAAa,IAAM,KAAQ,KAAO/E,OAK1D6C,EAAE6D,aACDpkC,EAAOwhC,aAAciB,IACzB5C,EAAM0D,iBAAkB,oBAAqBvjC,EAAOwhC,aAAciB,IAE9DziC,EAAOyhC,KAAMgB,IACjB5C,EAAM0D,iBAAkB,gBAAiBvjC,EAAOyhC,KAAMgB,MAKnDlC,EAAE77B,MAAQ67B,EAAE4D,YAAc5D,EAAEsB,eAAgB,GAAS/+B,EAAQ++B,cACjEhC,EAAM0D,iBAAkB,eAAgBhD,EAAEsB,aAI3ChC,EAAM0D,iBACL,SACAhD,EAAEZ,UAAW,IAAOY,EAAEuB,QAASvB,EAAEZ,UAAU,IAC1CY,EAAEuB,QAASvB,EAAEZ,UAAU,KAA8B,MAArBY,EAAEZ,UAAW,GAAc,KAAOL,GAAW,WAAa,IAC1FiB,EAAEuB,QAAS,KAIb,KAAMhgC,IAAKy+B,GAAE8D,QACZxE,EAAM0D,iBAAkBzhC,EAAGy+B,EAAE8D,QAASviC,GAIvC,IAAKy+B,EAAE+D,aAAgB/D,EAAE+D,WAAWrjC,KAAM8hC,EAAiBlD,EAAOU,MAAQ,GAAmB,IAAVxkB,GAElF,MAAO8jB,GAAM+D,OAIdP,GAAW,OAGX,KAAMvhC,KAAOiiC,QAAS,EAAGpgC,MAAO,EAAG60B,SAAU,GAC5CqH,EAAO/9B,GAAKy+B,EAAGz+B,GAOhB,IAHA+gC,EAAYjD,GAA+BP,GAAYkB,EAAGz9B,EAAS+8B,GAK5D,CACNA,EAAMrhB,WAAa,EAGdokB,GACJI,EAAmBhe,QAAS,YAAc6a,EAAOU,IAG7CA,EAAE9B,OAAS8B,EAAEnG,QAAU,IAC3BuI,EAAe3kB,WAAW,WACzB6hB,EAAM+D,MAAM,YACVrD,EAAEnG,SAGN,KACCre,EAAQ,EACR8mB,EAAU0B,KAAMpB,EAAgB17B,GAC/B,MAAQlD,GAET,KAAa,EAARwX,GAIJ,KAAMxX,EAHNkD,GAAM,GAAIlD,QArBZkD,GAAM,GAAI,eA8BX,SAASA,GAAMk8B,EAAQa,EAAkBhE,EAAW6D,GACnD,GAAIpD,GAAW8C,EAASpgC,EAAOq9B,EAAUyD,EACxCZ,EAAaW,CAGC,KAAVzoB,IAKLA,EAAQ,EAGH4mB,GACJtI,aAAcsI,GAKfE,EAAYx/B,OAGZq/B,EAAwB2B,GAAW,GAGnCxE,EAAMrhB,WAAamlB,EAAS,EAAI,EAAI,EAGpC1C,EAAY0C,GAAU,KAAgB,IAATA,GAA2B,MAAXA,EAGxCnD,IACJQ,EAAWV,GAAqBC,EAAGV,EAAOW,IAI3CQ,EAAWD,GAAaR,EAAGS,EAAUnB,EAAOoB,GAGvCA,GAGCV,EAAE6D,aACNK,EAAW5E,EAAMgB,kBAAkB,iBAC9B4D,IACJzkC,EAAOwhC,aAAciB,GAAagC,GAEnCA,EAAW5E,EAAMgB,kBAAkB,QAC9B4D,IACJzkC,EAAOyhC,KAAMgB,GAAagC,IAKZ,MAAXd,GAA6B,SAAXpD,EAAEx8B,KACxB8/B,EAAa,YAGS,MAAXF,EACXE,EAAa,eAIbA,EAAa7C,EAASjlB,MACtBgoB,EAAU/C,EAASt8B,KACnBf,EAAQq9B,EAASr9B,MACjBs9B,GAAat9B,KAKdA,EAAQkgC,GACHF,IAAWE,KACfA,EAAa,QACC,EAATF,IACJA,EAAS,KAMZ9D,EAAM8D,OAASA,EACf9D,EAAMgE,YAAeW,GAAoBX,GAAe,GAGnD5C,EACJ/kB,EAASqB,YAAawlB,GAAmBgB,EAASF,EAAYhE,IAE9D3jB,EAASoc,WAAYyK,GAAmBlD,EAAOgE,EAAYlgC,IAI5Dk8B,EAAMqD,WAAYA,GAClBA,EAAa7/B,OAERu/B,GACJI,EAAmBhe,QAASic,EAAY,cAAgB,aACrDpB,EAAOU,EAAGU,EAAY8C,EAAUpgC,IAIpCs/B,EAAiBtnB,SAAUonB,GAAmBlD,EAAOgE,IAEhDjB,IACJI,EAAmBhe,QAAS,gBAAkB6a,EAAOU,MAE3CvgC,EAAOuhC,QAChBvhC,EAAOue,MAAMyG,QAAQ,cAKxB,MAAO6a,IAGR6E,QAAS,SAAUhD,EAAKh9B,EAAMhD,GAC7B,MAAO1B,GAAOkB,IAAKwgC,EAAKh9B,EAAMhD,EAAU,SAGzCijC,UAAW,SAAUjD,EAAKhgC,GACzB,MAAO1B,GAAOkB,IAAKwgC,EAAKr+B,OAAW3B,EAAU,aAI/C1B,EAAOyB,MAAQ,MAAO,QAAU,SAAUK,EAAGkiC,GAC5ChkC,EAAQgkC,GAAW,SAAUtC,EAAKh9B,EAAMhD,EAAUqC,GAQjD,MANK/D,GAAOkD,WAAYwB,KACvBX,EAAOA,GAAQrC,EACfA,EAAWgD,EACXA,EAAOrB,QAGDrD,EAAOwiC,MACbd,IAAKA,EACL39B,KAAMigC,EACNtE,SAAU37B,EACVW,KAAMA,EACNq/B,QAASriC,OAMZ1B,EAAOouB,SAAW,SAAUsT,GAC3B,MAAO1hC,GAAOwiC,MACbd,IAAKA,EACL39B,KAAM,MACN27B,SAAU,SACVjB,OAAO,EACP9/B,QAAQ,EACRimC,UAAU,KAKZ5kC,EAAOG,GAAGsC,QACToiC,QAAS,SAAU/W,GAClB,GAAK9tB,EAAOkD,WAAY4qB,GACvB,MAAO3uB,MAAKsC,KAAK,SAASK,GACzB9B,EAAOb,MAAM0lC,QAAS/W,EAAK7sB,KAAK9B,KAAM2C,KAIxC,IAAK3C,KAAK,GAAK,CAEd,GAAIguB,GAAOntB,EAAQ8tB,EAAM3uB,KAAK,GAAGiM,eAAgBlJ,GAAG,GAAGa,OAAM,EAExD5D,MAAK,GAAGoM,YACZ4hB,EAAKO,aAAcvuB,KAAK,IAGzBguB,EAAKvrB,IAAI,WACR,GAAIC,GAAO1C,IAEX,OAAQ0C,EAAK6O,YAA2C,IAA7B7O,EAAK6O,WAAWpM,SAC1CzC,EAAOA,EAAK6O,UAGb,OAAO7O,KACL0rB,OAAQpuB,MAGZ,MAAOA,OAGR2lC,UAAW,SAAUhX,GACpB,MACQ3uB,MAAKsC,KADRzB,EAAOkD,WAAY4qB,GACN,SAAShsB,GACzB9B,EAAOb,MAAM2lC,UAAWhX,EAAK7sB,KAAK9B,KAAM2C,KAIzB,WAChB,GAAIwW,GAAOtY,EAAQb,MAClB4Z,EAAWT,EAAKS,UAEZA,GAAShY,OACbgY,EAAS8rB,QAAS/W,GAGlBxV,EAAKiV,OAAQO,MAKhBX,KAAM,SAAUW,GACf,GAAI5qB,GAAalD,EAAOkD,WAAY4qB,EAEpC,OAAO3uB,MAAKsC,KAAK,SAASK,GACzB9B,EAAQb,MAAO0lC,QAAS3hC,EAAa4qB,EAAK7sB,KAAK9B,KAAM2C,GAAKgsB,MAI5DiX,OAAQ,WACP,MAAO5lC,MAAK4O,SAAStM,KAAK,WACnBzB,EAAO+E,SAAU5F,KAAM,SAC5Ba,EAAQb,MAAO4uB,YAAa5uB,KAAKuL,cAEhCpI,SAKLtC,EAAOgQ,KAAK4E,QAAQke,OAAS,SAAUjxB,GAGtC,MAAOA,GAAKqd,aAAe,GAAKrd,EAAK8vB,cAAgB,IAClD7xB,EAAQuxB,yBACiE,UAAxExvB,EAAKkd,OAASld,EAAKkd,MAAM8P,SAAY7uB,EAAOyhB,IAAK5f,EAAM,aAG5D7B,EAAOgQ,KAAK4E,QAAQowB,QAAU,SAAUnjC,GACvC,OAAQ7B,EAAOgQ,KAAK4E,QAAQke,OAAQjxB,GAMrC,IAAIojC,IAAM,OACTC,GAAW,QACXC,GAAQ,SACRC,GAAkB,wCAClBC,GAAe,oCAEhB,SAASC,IAAa9Q,EAAQ1wB,EAAKogC,EAAatqB,GAC/C,GAAI/W,EAEJ,IAAK7C,EAAOoD,QAASU,GAEpB9D,EAAOyB,KAAMqC,EAAK,SAAUhC,EAAGyjC,GACzBrB,GAAegB,GAASt5B,KAAM4oB,GAElC5a,EAAK4a,EAAQ+Q,GAIbD,GAAa9Q,EAAS,KAAqB,gBAAN+Q,GAAiBzjC,EAAI,IAAO,IAAKyjC,EAAGrB,EAAatqB,SAIlF,IAAMsqB,GAAsC,WAAvBlkC,EAAO+D,KAAMD,GAQxC8V,EAAK4a,EAAQ1wB,OANb,KAAMjB,IAAQiB,GACbwhC,GAAa9Q,EAAS,IAAM3xB,EAAO,IAAKiB,EAAKjB,GAAQqhC,EAAatqB,GAWrE5Z,EAAO+qB,MAAQ,SAAUhjB,EAAGm8B,GAC3B,GAAI1P,GACH+L,KACA3mB,EAAM,SAAUvV,EAAKY,GAEpBA,EAAQjF,EAAOkD,WAAY+B,GAAUA,IAAqB,MAATA,EAAgB,GAAKA,EACtEs7B,EAAGA,EAAEx/B,QAAWykC,mBAAoBnhC,GAAQ,IAAMmhC,mBAAoBvgC,GASxE,IALqB5B,SAAhB6gC,IACJA,EAAclkC,EAAOqgC,cAAgBrgC,EAAOqgC,aAAa6D,aAIrDlkC,EAAOoD,QAAS2E,IAASA,EAAElH,SAAWb,EAAOmD,cAAe4E,GAEhE/H,EAAOyB,KAAMsG,EAAG,WACf6R,EAAKza,KAAK0D,KAAM1D,KAAK8F,aAMtB,KAAMuvB,IAAUzsB,GACfu9B,GAAa9Q,EAAQzsB,EAAGysB,GAAU0P,EAAatqB,EAKjD,OAAO2mB,GAAEt0B,KAAM,KAAMxI,QAASwhC,GAAK,MAGpCjlC,EAAOG,GAAGsC,QACTgjC,UAAW,WACV,MAAOzlC,GAAO+qB,MAAO5rB,KAAKumC,mBAE3BA,eAAgB,WACf,MAAOvmC,MAAKyC,IAAI,WAEf,GAAIqO,GAAWjQ,EAAOumB,KAAMpnB,KAAM,WAClC,OAAO8Q,GAAWjQ,EAAOoF,UAAW6K,GAAa9Q,OAEjDwP,OAAO,WACP,GAAI5K,GAAO5E,KAAK4E,IAEhB,OAAO5E,MAAK0D,OAAS7C,EAAQb,MAAOoZ,GAAI,cACvC8sB,GAAaz5B,KAAMzM,KAAK4F,YAAeqgC,GAAgBx5B,KAAM7H,KAC3D5E,KAAKwU,UAAYoO,EAAenW,KAAM7H,MAEzCnC,IAAI,SAAUE,EAAGD,GACjB,GAAIsO,GAAMnQ,EAAQb,MAAOgR,KAEzB,OAAc,OAAPA,EACN,KACAnQ,EAAOoD,QAAS+M,GACfnQ,EAAO4B,IAAKuO,EAAK,SAAUA,GAC1B,OAAStN,KAAMhB,EAAKgB,KAAMoC,MAAOkL,EAAI1M,QAAS0hC,GAAO,YAEpDtiC,KAAMhB,EAAKgB,KAAMoC,MAAOkL,EAAI1M,QAAS0hC,GAAO,WAC9CjkC,SAOLlB,EAAOqgC,aAAasF,IAA+BtiC,SAAzBnE,EAAOs/B,cAEhC,WAGC,OAAQr/B,KAAKwiC,SAQZ,wCAAwC/1B,KAAMzM,KAAK4E,OAEnD6hC,MAAuBC,MAGzBD,EAED,IAAIE,IAAQ,EACXC,MACAC,GAAehmC,EAAOqgC,aAAasF,KAK/BzmC,GAAOkP,aACXlP,EAAOkP,YAAa,WAAY,WAC/B,IAAM,GAAI/J,KAAO0hC,IAChBA,GAAc1hC,GAAOhB,QAAW,KAMnCvD,EAAQmmC,OAASD,IAAkB,mBAAqBA,IACxDA,GAAelmC,EAAQ0iC,OAASwD,GAG3BA,IAEJhmC,EAAOuiC,cAAc,SAAUz/B,GAE9B,IAAMA,EAAQmhC,aAAenkC,EAAQmmC,KAAO,CAE3C,GAAIvkC,EAEJ,QACC6iC,KAAM,SAAUF,EAAS7L,GACxB,GAAI12B,GACH6jC,EAAM7iC,EAAQ6iC,MACdn6B,IAAOs6B,EAMR,IAHAH,EAAIxH,KAAMr7B,EAAQiB,KAAMjB,EAAQ4+B,IAAK5+B,EAAQ27B,MAAO37B,EAAQojC,SAAUpjC,EAAQ0R,UAGzE1R,EAAQqjC,UACZ,IAAMrkC,IAAKgB,GAAQqjC,UAClBR,EAAK7jC,GAAMgB,EAAQqjC,UAAWrkC,EAK3BgB,GAAQ89B,UAAY+E,EAAIlC,kBAC5BkC,EAAIlC,iBAAkB3gC,EAAQ89B,UAQzB99B,EAAQmhC,aAAgBI,EAAQ,sBACrCA,EAAQ,oBAAsB,iBAI/B,KAAMviC,IAAKuiC,GAOYhhC,SAAjBghC,EAASviC,IACb6jC,EAAIpC,iBAAkBzhC,EAAGuiC,EAASviC,GAAM,GAO1C6jC,GAAIpB,KAAQzhC,EAAQqhC,YAAcrhC,EAAQ4B,MAAU,MAGpDhD,EAAW,SAAUyI,EAAGi8B,GACvB,GAAIzC,GAAQE,EAAYrD,CAGxB,IAAK9+B,IAAc0kC,GAA8B,IAAnBT,EAAInnB,YAOjC,SALOunB,IAAcv6B,GACrB9J,EAAW2B,OACXsiC,EAAIU,mBAAqBrmC,EAAO6D,KAG3BuiC,EACoB,IAAnBT,EAAInnB,YACRmnB,EAAI/B,YAEC,CACNpD,KACAmD,EAASgC,EAAIhC,OAKoB,gBAArBgC,GAAIW,eACf9F,EAAUr7B,KAAOwgC,EAAIW,aAKtB,KACCzC,EAAa8B,EAAI9B,WAChB,MAAOt/B,GAERs/B,EAAa,GAQRF,IAAU7gC,EAAQ6+B,SAAY7+B,EAAQmhC,YAGrB,OAAXN,IACXA,EAAS,KAHTA,EAASnD,EAAUr7B,KAAO,IAAM,IAS9Bq7B,GACJhI,EAAUmL,EAAQE,EAAYrD,EAAWmF,EAAIrC,0BAIzCxgC,EAAQ27B,MAGiB,IAAnBkH,EAAInnB,WAGfR,WAAYtc,GAGZikC,EAAIU,mBAAqBN,GAAcv6B,GAAO9J,EAP9CA,KAWFkiC,MAAO,WACDliC,GACJA,EAAU2B,QAAW,OAS3B,SAASuiC,MACR,IACC,MAAO,IAAI1mC,GAAOqnC,eACjB,MAAOhiC,KAGV,QAASshC,MACR,IACC,MAAO,IAAI3mC,GAAOs/B,cAAe,qBAChC,MAAOj6B,KAOVvE,EAAOoiC,WACNN,SACC0E,OAAQ,6FAETztB,UACCytB,OAAQ,uBAET1F,YACC2F,cAAe,SAAUthC,GAExB,MADAnF,GAAOyE,WAAYU,GACZA,MAMVnF,EAAOsiC,cAAe,SAAU,SAAU/B,GACxBl9B,SAAZk9B,EAAEj0B,QACNi0B,EAAEj0B,OAAQ,GAENi0B,EAAE0D,cACN1D,EAAEx8B,KAAO,MACTw8B,EAAE5hC,QAAS,KAKbqB,EAAOuiC,cAAe,SAAU,SAAShC,GAGxC,GAAKA,EAAE0D,YAAc,CAEpB,GAAIuC,GACHE,EAAO3nC,EAAS2nC,MAAQ1mC,EAAO,QAAQ,IAAMjB,EAAS6O,eAEvD,QAEC22B,KAAM,SAAUp6B,EAAGzI,GAElB8kC,EAASznC,EAAS6N,cAAc,UAEhC45B,EAAO/H,OAAQ,EAEV8B,EAAEoG,gBACNH,EAAOI,QAAUrG,EAAEoG,eAGpBH,EAAO9jC,IAAM69B,EAAEmB,IAGf8E,EAAOK,OAASL,EAAOH,mBAAqB,SAAUl8B,EAAGi8B,IAEnDA,IAAYI,EAAOhoB,YAAc,kBAAkB5S,KAAM46B,EAAOhoB,eAGpEgoB,EAAOK,OAASL,EAAOH,mBAAqB,KAGvCG,EAAOj7B,YACXi7B,EAAOj7B,WAAWsB,YAAa25B,GAIhCA,EAAS,KAGHJ,GACL1kC,EAAU,IAAK,aAOlBglC,EAAKhZ,aAAc8Y,EAAQE,EAAKh2B,aAGjCkzB,MAAO,WACD4C,GACJA,EAAOK,OAAQxjC,QAAW,OAU/B,IAAIyjC,OACHC,GAAS,mBAGV/mC,GAAOoiC,WACN4E,MAAO,WACPC,cAAe,WACd,GAAIvlC,GAAWolC,GAAa5+B,OAAWlI,EAAOsD,QAAU,IAAQo6B,IAEhE,OADAv+B,MAAMuC,IAAa,EACZA,KAKT1B,EAAOsiC,cAAe,aAAc,SAAU/B,EAAG2G,EAAkBrH,GAElE,GAAIsH,GAAcC,EAAaC,EAC9BC,EAAW/G,EAAEyG,SAAU,IAAWD,GAAOn7B,KAAM20B,EAAEmB,KAChD,MACkB,gBAAXnB,GAAE77B,QAAwB67B,EAAEsB,aAAe,IAAKpiC,QAAQ,sCAAwCsnC,GAAOn7B,KAAM20B,EAAE77B,OAAU,OAIlI,OAAK4iC,IAAiC,UAArB/G,EAAEZ,UAAW,IAG7BwH,EAAe5G,EAAE0G,cAAgBjnC,EAAOkD,WAAYq9B,EAAE0G,eACrD1G,EAAE0G,gBACF1G,EAAE0G,cAGEK,EACJ/G,EAAG+G,GAAa/G,EAAG+G,GAAW7jC,QAASsjC,GAAQ,KAAOI,GAC3C5G,EAAEyG,SAAU,IACvBzG,EAAEmB,MAAS/D,GAAO/xB,KAAM20B,EAAEmB,KAAQ,IAAM,KAAQnB,EAAEyG,MAAQ,IAAMG,GAIjE5G,EAAEO,WAAW,eAAiB,WAI7B,MAHMuG,IACLrnC,EAAO2D,MAAOwjC,EAAe,mBAEvBE,EAAmB,IAI3B9G,EAAEZ,UAAW,GAAM,OAGnByH,EAAcloC,EAAQioC,GACtBjoC,EAAQioC,GAAiB,WACxBE,EAAoBrlC,WAIrB69B,EAAM5jB,OAAO,WAEZ/c,EAAQioC,GAAiBC,EAGpB7G,EAAG4G,KAEP5G,EAAE0G,cAAgBC,EAAiBD,cAGnCH,GAAatnC,KAAM2nC,IAIfE,GAAqBrnC,EAAOkD,WAAYkkC,IAC5CA,EAAaC,EAAmB,IAGjCA,EAAoBD,EAAc/jC,SAI5B,UAtDR,SAgEDrD,EAAO0Y,UAAY,SAAUhU,EAAMxE,EAASqnC,GAC3C,IAAM7iC,GAAwB,gBAATA,GACpB,MAAO,KAEgB,kBAAZxE,KACXqnC,EAAcrnC,EACdA,GAAU,GAEXA,EAAUA,GAAWnB,CAErB,IAAIyoC,GAAStvB,EAAW7M,KAAM3G,GAC7BuoB,GAAWsa,KAGZ,OAAKC,IACKtnC,EAAQ0M,cAAe46B,EAAO,MAGxCA,EAASxnC,EAAOgtB,eAAiBtoB,GAAQxE,EAAS+sB,GAE7CA,GAAWA,EAAQlsB,QACvBf,EAAQitB,GAAUzR,SAGZxb,EAAOuB,SAAWimC,EAAO98B,aAKjC,IAAI+8B,IAAQznC,EAAOG,GAAG6nB,IAKtBhoB,GAAOG,GAAG6nB,KAAO,SAAU0Z,EAAKgG,EAAQhmC,GACvC,GAAoB,gBAARggC,IAAoB+F,GAC/B,MAAOA,IAAM1lC,MAAO5C,KAAM6C,UAG3B,IAAI/B,GAAU+gC,EAAUj9B,EACvBuU,EAAOnZ,KACP+e,EAAMwjB,EAAIjiC,QAAQ,IA+CnB,OA7CKye,IAAO,IACXje,EAAWD,EAAO2E,KAAM+8B,EAAIpiC,MAAO4e,EAAKwjB,EAAI3gC,SAC5C2gC,EAAMA,EAAIpiC,MAAO,EAAG4e,IAIhBle,EAAOkD,WAAYwkC,IAGvBhmC,EAAWgmC,EACXA,EAASrkC,QAGEqkC,GAA4B,gBAAXA,KAC5B3jC,EAAO,QAIHuU,EAAKvX,OAAS,GAClBf,EAAOwiC,MACNd,IAAKA,EAGL39B,KAAMA,EACN27B,SAAU,OACVh7B,KAAMgjC,IACJjgC,KAAK,SAAU6+B,GAGjBtF,EAAWh/B,UAEXsW,EAAKwV,KAAM7tB,EAIVD,EAAO,SAASutB,OAAQvtB,EAAO0Y,UAAW4tB,IAAiB53B,KAAMzO,GAGjEqmC,KAEC9N,SAAU92B,GAAY,SAAUm+B,EAAO8D,GACzCrrB,EAAK7W,KAAMC,EAAUs/B,IAAcnB,EAAMyG,aAAc3C,EAAQ9D,MAI1D1gC,MAORa,EAAOyB,MAAQ,YAAa,WAAY,eAAgB,YAAa,cAAe,YAAc,SAAUK,EAAGiC,GAC9G/D,EAAOG,GAAI4D,GAAS,SAAU5D,GAC7B,MAAOhB,MAAKsqB,GAAI1lB,EAAM5D,MAOxBH,EAAOgQ,KAAK4E,QAAQ+yB,SAAW,SAAU9lC,GACxC,MAAO7B,GAAO2F,KAAK3F,EAAOq5B,OAAQ,SAAUl5B,GAC3C,MAAO0B,KAAS1B,EAAG0B,OACjBd,OAOJ,IAAImG,IAAUhI,EAAOH,SAAS6O,eAK9B,SAASg6B,IAAW/lC,GACnB,MAAO7B,GAAOiE,SAAUpC,GACvBA,EACkB,IAAlBA,EAAKyC,SACJzC,EAAKoM,aAAepM,EAAK4jB,cACzB,EAGHzlB,EAAO6nC,QACNC,UAAW,SAAUjmC,EAAMiB,EAAShB,GACnC,GAAIimC,GAAaC,EAASC,EAAWC,EAAQC,EAAWC,EAAYC,EACnElW,EAAWnyB,EAAOyhB,IAAK5f,EAAM,YAC7BymC,EAAUtoC,EAAQ6B,GAClBglB,IAGiB,YAAbsL,IACJtwB,EAAKkd,MAAMoT,SAAW,YAGvBgW,EAAYG,EAAQT,SACpBI,EAAYjoC,EAAOyhB,IAAK5f,EAAM,OAC9BumC,EAAapoC,EAAOyhB,IAAK5f,EAAM,QAC/BwmC,GAAmC,aAAblW,GAAwC,UAAbA,IAChDnyB,EAAOwF,QAAQ,QAAUyiC,EAAWG,IAAiB,GAGjDC,GACJN,EAAcO,EAAQnW,WACtB+V,EAASH,EAAY75B,IACrB85B,EAAUD,EAAY9X,OAEtBiY,EAAS/jC,WAAY8jC,IAAe,EACpCD,EAAU7jC,WAAYikC,IAAgB,GAGlCpoC,EAAOkD,WAAYJ,KACvBA,EAAUA,EAAQ7B,KAAMY,EAAMC,EAAGqmC,IAGd,MAAfrlC,EAAQoL,MACZ2Y,EAAM3Y,IAAQpL,EAAQoL,IAAMi6B,EAAUj6B,IAAQg6B,GAE1B,MAAhBplC,EAAQmtB,OACZpJ,EAAMoJ,KAASntB,EAAQmtB,KAAOkY,EAAUlY,KAAS+X,GAG7C,SAAWllC,GACfA,EAAQylC,MAAMtnC,KAAMY,EAAMglB,GAE1ByhB,EAAQ7mB,IAAKoF,KAKhB7mB,EAAOG,GAAGsC,QACTolC,OAAQ,SAAU/kC,GACjB,GAAKd,UAAUjB,OACd,MAAmBsC,UAAZP,EACN3D,KACAA,KAAKsC,KAAK,SAAUK,GACnB9B,EAAO6nC,OAAOC,UAAW3oC,KAAM2D,EAAShB,IAI3C,IAAIoF,GAASshC,EACZC,GAAQv6B,IAAK,EAAG+hB,KAAM,GACtBpuB,EAAO1C,KAAM,GACb6O,EAAMnM,GAAQA,EAAKuJ,aAEpB,IAAM4C,EAON,MAHA9G,GAAU8G,EAAIJ,gBAGR5N,EAAOsH,SAAUJ,EAASrF,UAMpBA,GAAK6mC,wBAA0B9pB,IAC1C6pB,EAAM5mC,EAAK6mC,yBAEZF,EAAMZ,GAAW55B,IAEhBE,IAAKu6B,EAAIv6B,KAASs6B,EAAIG,aAAezhC,EAAQ0gB,YAAiB1gB,EAAQ2gB,WAAc,GACpFoI,KAAMwY,EAAIxY,MAASuY,EAAII,aAAe1hC,EAAQsgB,aAAiBtgB,EAAQugB,YAAc,KAX9EghB,GAeTtW,SAAU,WACT,GAAMhzB,KAAM,GAAZ,CAIA,GAAI0pC,GAAchB,EACjBiB,GAAiB56B,IAAK,EAAG+hB,KAAM,GAC/BpuB,EAAO1C,KAAM,EAwBd,OArBwC,UAAnCa,EAAOyhB,IAAK5f,EAAM,YAEtBgmC,EAAShmC,EAAK6mC,yBAGdG,EAAe1pC,KAAK0pC,eAGpBhB,EAAS1oC,KAAK0oC,SACR7nC,EAAO+E,SAAU8jC,EAAc,GAAK,UACzCC,EAAeD,EAAahB,UAI7BiB,EAAa56B,KAAQlO,EAAOyhB,IAAKonB,EAAc,GAAK,kBAAkB,GACtEC,EAAa7Y,MAAQjwB,EAAOyhB,IAAKonB,EAAc,GAAK,mBAAmB,KAOvE36B,IAAM25B,EAAO35B,IAAO46B,EAAa56B,IAAMlO,EAAOyhB,IAAK5f,EAAM,aAAa,GACtEouB,KAAM4X,EAAO5X,KAAO6Y,EAAa7Y,KAAOjwB,EAAOyhB,IAAK5f,EAAM,cAAc,MAI1EgnC,aAAc,WACb,MAAO1pC,MAAKyC,IAAI,WACf,GAAIinC,GAAe1pC,KAAK0pC,cAAgB3hC,EAExC,OAAQ2hC,IAAmB7oC,EAAO+E,SAAU8jC,EAAc,SAAuD,WAA3C7oC,EAAOyhB,IAAKonB,EAAc,YAC/FA,EAAeA,EAAaA,YAE7B,OAAOA,IAAgB3hC,QAM1BlH,EAAOyB,MAAQ+lB,WAAY,cAAeI,UAAW,eAAiB,SAAUoc,EAAQzd,GACvF,GAAIrY,GAAM,IAAItC,KAAM2a,EAEpBvmB,GAAOG,GAAI6jC,GAAW,SAAU7zB,GAC/B,MAAOuR,GAAQviB,KAAM,SAAU0C,EAAMmiC,EAAQ7zB,GAC5C,GAAIq4B,GAAMZ,GAAW/lC,EAErB,OAAawB,UAAR8M,EACGq4B,EAAOjiB,IAAQiiB,GAAOA,EAAKjiB,GACjCiiB,EAAIzpC,SAAS6O,gBAAiBo2B,GAC9BniC,EAAMmiC,QAGHwE,EACJA,EAAIO,SACF76B,EAAYlO,EAAQwoC,GAAMhhB,aAApBrX,EACPjC,EAAMiC,EAAMnQ,EAAQwoC,GAAM5gB,aAI3B/lB,EAAMmiC,GAAW7zB,IAEhB6zB,EAAQ7zB,EAAKnO,UAAUjB,OAAQ,SAQpCf,EAAOyB,MAAQ,MAAO,QAAU,SAAUK,EAAGykB,GAC5CvmB,EAAOuzB,SAAUhN,GAAS+J,GAAcxwB,EAAQ0xB,cAC/C,SAAU3vB,EAAM+tB,GACf,MAAKA,IACJA,EAAWJ,GAAQ3tB,EAAM0kB,GAElB+I,GAAU1jB,KAAMgkB,GACtB5vB,EAAQ6B,GAAOswB,WAAY5L,GAAS,KACpCqJ,GALF,WAaH5vB,EAAOyB,MAAQunC,OAAQ,SAAUC,MAAO,SAAW,SAAUpmC,EAAMkB,GAClE/D,EAAOyB,MAAQ6yB,QAAS,QAAUzxB,EAAMmpB,QAASjoB,EAAM,GAAI,QAAUlB,GAAQ,SAAUqmC,EAAcC,GAEpGnpC,EAAOG,GAAIgpC,GAAa,SAAU9U,EAAQpvB,GACzC,GAAI0c,GAAY3f,UAAUjB,SAAYmoC,GAAkC,iBAAX7U,IAC5DnB,EAAQgW,IAAkB7U,KAAW,GAAQpvB,KAAU,EAAO,SAAW,SAE1E,OAAOyc,GAAQviB,KAAM,SAAU0C,EAAMkC,EAAMkB,GAC1C,GAAI+I,EAEJ,OAAKhO,GAAOiE,SAAUpC,GAIdA,EAAK9C,SAAS6O,gBAAiB,SAAW/K,GAI3B,IAAlBhB,EAAKyC,UACT0J,EAAMnM,EAAK+L,gBAIJrK,KAAKkC,IACX5D,EAAKkc,KAAM,SAAWlb,GAAQmL,EAAK,SAAWnL,GAC9ChB,EAAKkc,KAAM,SAAWlb,GAAQmL,EAAK,SAAWnL,GAC9CmL,EAAK,SAAWnL,KAIDQ,SAAV4B,EAENjF,EAAOyhB,IAAK5f,EAAMkC,EAAMmvB,GAGxBlzB,EAAO+e,MAAOld,EAAMkC,EAAMkB,EAAOiuB,IAChCnvB,EAAM4d,EAAY0S,EAAShxB,OAAWse,EAAW,WAOvD3hB,EAAOG,GAAGipC,KAAO,WAChB,MAAOjqC,MAAK4B,QAGbf,EAAOG,GAAGkpC,QAAUrpC,EAAOG,GAAG0Z,QAkBP,kBAAXyvB,SAAyBA,OAAOC,KAC3CD,OAAQ,YAAc,WACrB,MAAOtpC,IAOT,IAECwpC,IAAUtqC,EAAOc,OAGjBypC,GAAKvqC,EAAOwqC,CAwBb,OAtBA1pC,GAAO2pC,WAAa,SAAU1mC,GAS7B,MARK/D,GAAOwqC,IAAM1pC,IACjBd,EAAOwqC,EAAID,IAGPxmC,GAAQ/D,EAAOc,SAAWA,IAC9Bd,EAAOc,OAASwpC,IAGVxpC,SAMIZ,KAAawf,IACxB1f,EAAOc,OAASd,EAAOwqC,EAAI1pC,GAMrBA"} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery/jquery-1.4.4.min.js b/common/src/main/webapp/thirdparty/jquery/jquery-1.4.4.min.js
new file mode 100644
index 0000000..2bd4cbb
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery/jquery-1.4.4.min.js
@@ -0,0 +1,167 @@
+/*!
+ * jQuery JavaScript Library v1.4.4
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Thu Nov 11 19:04:53 2010 -0500
+ */
+(function(E,B){function ka(a,b,d){if(d===B&&a.nodeType===1){d=a.getAttribute("data-"+b);if(typeof d==="string"){try{d=d==="true"?true:d==="false"?false:d==="null"?null:!c.isNaN(d)?parseFloat(d):Ja.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=B}return d}function U(){return false}function ca(){return true}function la(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ka(a){var b,d,e,f,h,l,k,o,x,r,A,C=[];f=[];h=c.data(this,this.nodeType?"events":"__events__");if(typeof h==="function")h=
+h.events;if(!(a.liveFired===this||!h||!h.live||a.button&&a.type==="click")){if(a.namespace)A=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var J=h.live.slice(0);for(k=0;k<J.length;k++){h=J[k];h.origType.replace(X,"")===a.type?f.push(h.selector):J.splice(k--,1)}f=c(a.target).closest(f,a.currentTarget);o=0;for(x=f.length;o<x;o++){r=f[o];for(k=0;k<J.length;k++){h=J[k];if(r.selector===h.selector&&(!A||A.test(h.namespace))){l=r.elem;e=null;if(h.preType==="mouseenter"||
+h.preType==="mouseleave"){a.type=h.preType;e=c(a.relatedTarget).closest(h.selector)[0]}if(!e||e!==l)C.push({elem:l,handleObj:h,level:r.level})}}}o=0;for(x=C.length;o<x;o++){f=C[o];if(d&&f.level>d)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;A=f.handleObj.origHandler.apply(f.elem,arguments);if(A===false||a.isPropagationStopped()){d=f.level;if(A===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(La,
+"`").replace(Ma,"&")}function ma(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Na.test(b))return c.filter(b,e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function na(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,
+e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var l in e[h])c.event.add(this,h,e[h][l],e[h][l].data)}}})}function Oa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function oa(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?Pa:Qa,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,
+"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function da(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Ra.test(a)?e(a,h):da(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?e(a,""):c.each(b,function(f,h){da(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(pa.concat.apply([],pa.slice(0,b)),function(){d[this]=a});return d}function qa(a){if(!ea[a]){var b=c("<"+
+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+C=/^[\],:{}\s]*$/,J=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,q=[],u,y=Object.prototype.toString,F=Object.prototype.hasOwnProperty,M=Array.prototype.push,N=Array.prototype.slice,O=String.prototype.trim,D=Array.prototype.indexOf,R={};b.fn=b.prototype={init:function(j,
+s){var v,z,H;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!s&&t.body){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((v=h.exec(j))&&(v[1]||!s))if(v[1]){H=s?s.ownerDocument||s:t;if(z=A.exec(j))if(b.isPlainObject(s)){j=[t.createElement(z[1])];b.fn.attr.call(j,s,true)}else j=[H.createElement(z[1])];else{z=b.buildFragment([v[1]],[H]);j=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this,
+j)}else{if((z=t.getElementById(v[2]))&&z.parentNode){if(z.id!==v[2])return f.find(j);this.length=1;this[0]=z}this.context=t;this.selector=j;return this}else if(!s&&!x.test(j)){this.selector=j;this.context=t;j=t.getElementsByTagName(j);return b.merge(this,j)}else return!s||s.jquery?(s||f).find(j):b(s).find(j);else if(b.isFunction(j))return f.ready(j);if(j.selector!==B){this.selector=j.selector;this.context=j.context}return b.makeArray(j,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length},
+toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z.selector=this.selector+(this.selector?" ":"")+v;else if(s)z.selector=this.selector+"."+s+"("+v+")";return z},each:function(j,s){return b.each(this,j,s)},ready:function(j){b.bindReady();if(b.isReady)j.call(t,b);else q&&q.push(j);return this},eq:function(j){return j===
+-1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(j){return this.pushStack(b.map(this,function(s,v){return j.call(s,v,s)}))},end:function(){return this.prevObject||b(null)},push:M,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var j,s,v,z,H,G=arguments[0]||{},K=1,Q=arguments.length,ga=false;
+if(typeof G==="boolean"){ga=G;G=arguments[1]||{};K=2}if(typeof G!=="object"&&!b.isFunction(G))G={};if(Q===K){G=this;--K}for(;K<Q;K++)if((j=arguments[K])!=null)for(s in j){v=G[s];z=j[s];if(G!==z)if(ga&&z&&(b.isPlainObject(z)||(H=b.isArray(z)))){if(H){H=false;v=v&&b.isArray(v)?v:[]}else v=v&&b.isPlainObject(v)?v:{};G[s]=b.extend(ga,v,z)}else if(z!==B)G[s]=z}return G};b.extend({noConflict:function(j){E.$=e;if(j)E.jQuery=d;return b},isReady:false,readyWait:1,ready:function(j){j===true&&b.readyWait--;
+if(!b.readyWait||j!==true&&!b.isReady){if(!t.body)return setTimeout(b.ready,1);b.isReady=true;if(!(j!==true&&--b.readyWait>0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return setTimeout(b.ready,1);if(t.addEventListener){t.addEventListener("DOMContentLoaded",u,false);E.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",u);E.attachEvent("onload",
+b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in j},isNaN:function(j){return j==null||!r.test(j)||isNaN(j)},type:function(j){return j==null?String(j):R[y.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&&
+!F.call(j,"constructor")&&!F.call(j.constructor.prototype,"isPrototypeOf"))return false;for(var s in j);return s===B||F.call(j,s)},isEmptyObject:function(j){for(var s in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if(typeof j!=="string"||!j)return null;j=b.trim(j);if(C.test(j.replace(J,"@").replace(w,"]").replace(I,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(j):(new Function("return "+j))();else b.error("Invalid JSON: "+j)},noop:function(){},globalEval:function(j){if(j&&
+l.test(j)){var s=t.getElementsByTagName("head")[0]||t.documentElement,v=t.createElement("script");v.type="text/javascript";if(b.support.scriptEval)v.appendChild(t.createTextNode(j));else v.text=j;s.insertBefore(v,s.firstChild);s.removeChild(v)}},nodeName:function(j,s){return j.nodeName&&j.nodeName.toUpperCase()===s.toUpperCase()},each:function(j,s,v){var z,H=0,G=j.length,K=G===B||b.isFunction(j);if(v)if(K)for(z in j){if(s.apply(j[z],v)===false)break}else for(;H<G;){if(s.apply(j[H++],v)===false)break}else if(K)for(z in j){if(s.call(j[z],
+z,j[z])===false)break}else for(v=j[0];H<G&&s.call(v,H,v)!==false;v=j[++H]);return j},trim:O?function(j){return j==null?"":O.call(j)}:function(j){return j==null?"":j.toString().replace(k,"").replace(o,"")},makeArray:function(j,s){var v=s||[];if(j!=null){var z=b.type(j);j.length==null||z==="string"||z==="function"||z==="regexp"||b.isWindow(j)?M.call(v,j):b.merge(v,j)}return v},inArray:function(j,s){if(s.indexOf)return s.indexOf(j);for(var v=0,z=s.length;v<z;v++)if(s[v]===j)return v;return-1},merge:function(j,
+s){var v=j.length,z=0;if(typeof s.length==="number")for(var H=s.length;z<H;z++)j[v++]=s[z];else for(;s[z]!==B;)j[v++]=s[z++];j.length=v;return j},grep:function(j,s,v){var z=[],H;v=!!v;for(var G=0,K=j.length;G<K;G++){H=!!s(j[G],G);v!==H&&z.push(j[G])}return z},map:function(j,s,v){for(var z=[],H,G=0,K=j.length;G<K;G++){H=s(j[G],G,v);if(H!=null)z[z.length]=H}return z.concat.apply([],z)},guid:1,proxy:function(j,s,v){if(arguments.length===2)if(typeof s==="string"){v=j;j=v[s];s=B}else if(s&&!b.isFunction(s)){v=
+s;s=B}if(!s&&j)s=function(){return j.apply(v||this,arguments)};if(j)s.guid=j.guid=j.guid||s.guid||b.guid++;return s},access:function(j,s,v,z,H,G){var K=j.length;if(typeof s==="object"){for(var Q in s)b.access(j,Q,s[Q],z,H,v);return j}if(v!==B){z=!G&&z&&b.isFunction(v);for(Q=0;Q<K;Q++)H(j[Q],s,z?v.call(j[Q],Q,H(j[Q],s)):v,G);return j}return K?H(j[0],s):B},now:function(){return(new Date).getTime()},uaMatch:function(j){j=j.toLowerCase();j=L.exec(j)||g.exec(j)||i.exec(j)||j.indexOf("compatible")<0&&n.exec(j)||
+[];return{browser:j[1]||"",version:j[2]||"0"}},browser:{}});b.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(j,s){R["[object "+s+"]"]=s.toLowerCase()});m=b.uaMatch(m);if(m.browser){b.browser[m.browser]=true;b.browser.version=m.version}if(b.browser.webkit)b.browser.safari=true;if(D)b.inArray=function(j,s){return D.call(s,j)};if(!/\s/.test("\u00a0")){k=/^[\s\xA0]+/;o=/[\s\xA0]+$/}f=b(t);if(t.addEventListener)u=function(){t.removeEventListener("DOMContentLoaded",u,
+false);b.ready()};else if(t.attachEvent)u=function(){if(t.readyState==="complete"){t.detachEvent("onreadystatechange",u);b.ready()}};return E.jQuery=E.$=b}();(function(){c.support={};var a=t.documentElement,b=t.createElement("script"),d=t.createElement("div"),e="script"+c.now();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],l=t.createElement("select"),
+k=l.appendChild(t.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:k.selected,deleteExpando:true,optDisabled:false,checkClone:false,
+scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};l.disabled=true;c.support.optDisabled=!k.disabled;b.type="text/javascript";try{b.appendChild(t.createTextNode("window."+e+"=1;"))}catch(o){}a.insertBefore(b,a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}try{delete b.test}catch(x){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function r(){c.support.noCloneEvent=
+false;d.detachEvent("onclick",r)});d.cloneNode(true).fireEvent("onclick")}d=t.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=t.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var r=t.createElement("div");r.style.width=r.style.paddingLeft="1px";t.body.appendChild(r);c.boxModel=c.support.boxModel=r.offsetWidth===2;if("zoom"in r.style){r.style.display="inline";r.style.zoom=
+1;c.support.inlineBlockNeedsLayout=r.offsetWidth===2;r.style.display="";r.innerHTML="<div style='width:4px;'></div>";c.support.shrinkWrapBlocks=r.offsetWidth!==2}r.innerHTML="<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";var A=r.getElementsByTagName("td");c.support.reliableHiddenOffsets=A[0].offsetHeight===0;A[0].style.display="";A[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&A[0].offsetHeight===0;r.innerHTML="";t.body.removeChild(r).style.display=
+"none"});a=function(r){var A=t.createElement("div");r="on"+r;var C=r in A;if(!C){A.setAttribute(r,"return;");C=typeof A[r]==="function"}return C};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var ra={},Ja=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?ra:a;var e=a.nodeType,f=e?a[c.expando]:null,h=
+c.cache;if(!(e&&!f&&typeof b==="string"&&d===B)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?ra:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando);
+else if(d)delete f[e];else for(var l in a)delete a[l]}},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(typeof a==="undefined"){if(this.length){var e=this[0].attributes,f;d=c.data(this[0]);for(var h=0,l=e.length;h<l;h++){f=e[h].name;if(f.indexOf("data-")===0){f=f.substr(5);ka(this[0],f,d[f])}}}return d}else if(typeof a==="object")return this.each(function(){c.data(this,
+a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(b===B){d=this.triggerHandler("getData"+k[1]+"!",[k[0]]);if(d===B&&this.length){d=c.data(this[0],a);d=ka(this[0],a,d)}return d===B&&k[1]?this.data(k[0]):d}else return this.each(function(){var o=c(this),x=[k[0],b];o.triggerHandler("setData"+k[1]+"!",x);c.data(this,a,b);o.triggerHandler("changeData"+k[1]+"!",x)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var e=
+c.data(a,b);if(!d)return e||[];if(!e||c.isArray(d))e=c.data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===B)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,
+a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var sa=/[\n\t]/g,ha=/\s+/,Sa=/\r/g,Ta=/^(?:href|src|style)$/,Ua=/^(?:button|input)$/i,Va=/^(?:button|input|object|select|textarea)$/i,Wa=/^a(?:rea)?$/i,ta=/^(?:radio|checkbox)$/i;c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",
+colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};c.fn.extend({attr:function(a,b){return c.access(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(x){var r=c(this);r.addClass(a.call(this,x,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===
+1)if(f.className){for(var h=" "+f.className+" ",l=f.className,k=0,o=b.length;k<o;k++)if(h.indexOf(" "+b[k]+" ")<0)l+=" "+b[k];f.className=c.trim(l)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(o){var x=c(this);x.removeClass(a.call(this,o,x.attr("class")))});if(a&&typeof a==="string"||a===B)for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1&&f.className)if(a){for(var h=(" "+f.className+" ").replace(sa," "),
+l=0,k=b.length;l<k;l++)h=h.replace(" "+b[l]+" "," ");f.className=c.trim(h)}else f.className=""}return this},toggleClass:function(a,b){var d=typeof a,e=typeof b==="boolean";if(c.isFunction(a))return this.each(function(f){var h=c(this);h.toggleClass(a.call(this,f,h.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var f,h=0,l=c(this),k=b,o=a.split(ha);f=o[h++];){k=e?k:!l.hasClass(f);l[k?"addClass":"removeClass"](f)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,
+"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(sa," ").indexOf(a)>-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";
+if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var l=f[h];if(l.selected&&(c.support.optDisabled?!l.disabled:l.getAttribute("disabled")===null)&&(!l.parentNode.disabled||!c.nodeName(l.parentNode,"optgroup"))){a=c(l).val();if(b)return a;d.push(a)}}return d}if(ta.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Sa,"")}return B}var k=c.isFunction(a);return this.each(function(o){var x=c(this),r=a;if(this.nodeType===1){if(k)r=
+a.call(this,o,x.val());if(r==null)r="";else if(typeof r==="number")r+="";else if(c.isArray(r))r=c.map(r,function(C){return C==null?"":C+""});if(c.isArray(r)&&ta.test(this.type))this.checked=c.inArray(x.val(),r)>=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},
+attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return B;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==B;b=e&&c.props[b]||b;var h=Ta.test(b);if((b in a||a[b]!==B)&&e&&!h){if(f){b==="type"&&Ua.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&
+b.specified?b.value:Va.test(a.nodeName)||Wa.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}});var X=/\.(.*)$/,ia=/^(?:textarea|input|select)$/i,La=/\./g,Ma=/ /g,Xa=/[^\w\s.|`]/g,Ya=function(a){return a.replace(Xa,"\\$&")},ua={focusin:0,focusout:0};
+c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;else if(!d)return;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var l=a.nodeType?"events":"__events__",k=h[l],o=h.handle;if(typeof k==="function"){o=k.handle;k=k.events}else if(!k){a.nodeType||(h[l]=h=function(){});h.events=k={}}if(!o)h.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,
+arguments):B};o.elem=a;b=b.split(" ");for(var x=0,r;l=b[x++];){h=f?c.extend({},f):{handler:d,data:e};if(l.indexOf(".")>-1){r=l.split(".");l=r.shift();h.namespace=r.slice(0).sort().join(".")}else{r=[];h.namespace=""}h.type=l;if(!h.guid)h.guid=d.guid;var A=k[l],C=c.event.special[l]||{};if(!A){A=k[l]=[];if(!C.setup||C.setup.call(a,e,r,o)===false)if(a.addEventListener)a.addEventListener(l,o,false);else a.attachEvent&&a.attachEvent("on"+l,o)}if(C.add){C.add.call(a,h);if(!h.handler.guid)h.handler.guid=
+d.guid}A.push(h);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,l=0,k,o,x,r,A,C,J=a.nodeType?"events":"__events__",w=c.data(a),I=w&&w[J];if(w&&I){if(typeof I==="function"){w=I;I=I.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;o=[];if(!k){o=f.split(".");f=o.shift();x=RegExp("(^|\\.)"+
+c.map(o.slice(0).sort(),Ya).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=I[f])if(d){r=c.event.special[f]||{};for(h=e||0;h<A.length;h++){C=A[h];if(d.guid===C.guid){if(k||x.test(C.namespace)){e==null&&A.splice(h--,1);r.remove&&r.remove.call(a,C)}if(e!=null)break}}if(A.length===0||e!=null&&A.length===1){if(!r.teardown||r.teardown.call(a,o)===false)c.removeEvent(a,f,w.handle);delete I[f]}}else for(h=0;h<A.length;h++){C=A[h];if(k||x.test(C.namespace)){c.event.remove(a,r,C.handler,h);A.splice(h--,1)}}}if(c.isEmptyObject(I)){if(b=
+w.handle)b.elem=null;delete w.events;delete w.handle;if(typeof w==="function")c.removeData(a,J);else c.isEmptyObject(w)&&c.removeData(a)}}}}},trigger:function(a,b,d,e){var f=a.type||a;if(!e){a=typeof a==="object"?a[c.expando]?a:c.extend(c.Event(f),a):c.Event(f);if(f.indexOf("!")>=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===
+8)return B;a.result=B;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){var l;e=a.target;var k=f.replace(X,""),o=c.nodeName(e,"a")&&k===
+"click",x=c.event.special[k]||{};if((!x._default||x._default.call(d,a)===false)&&!o&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[k]){if(l=e["on"+k])e["on"+k]=null;c.event.triggered=true;e[k]()}}catch(r){}if(l)e["on"+k]=l;c.event.triggered=false}}},handle:function(a){var b,d,e,f;d=[];var h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+
+d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var l=d.length;f<l;f++){var k=d[f];if(b||e.test(k.namespace)){a.handler=k.handler;a.data=k.data;a.handleObj=k;k=k.handler.apply(this,h);if(k!==B){a.result=k;if(k===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
+fix:function(a){if(a[c.expando])return a;var b=a;a=c.Event(b);for(var d=this.props.length,e;d;){e=this.props[--d];a[e]=b[e]}if(!a.target)a.target=a.srcElement||t;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=t.documentElement;d=t.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
+d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(a.which==null&&(a.charCode!=null||a.keyCode!=null))a.which=a.charCode!=null?a.charCode:a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==B)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,Y(a.origType,a.selector),c.extend({},a,{handler:Ka,guid:a.handler.guid}))},remove:function(a){c.event.remove(this,
+Y(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,d){if(c.isWindow(this))this.onbeforeunload=d},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.removeEvent=t.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=
+c.now();this[c.expando]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ca;var a=this.originalEvent;if(a)if(a.preventDefault)a.preventDefault();else a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=ca;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ca;this.stopPropagation()},isDefaultPrevented:U,isPropagationStopped:U,isImmediatePropagationStopped:U};
+var va=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},wa=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?wa:va,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?wa:va)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!==
+"form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length){a.liveFired=B;return la("submit",this,arguments)}});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13){a.liveFired=B;return la("submit",this,arguments)}})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var V,
+xa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ia.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=xa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===B||f===e))if(e!=null||f){a.type="change";a.liveFired=
+B;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",xa(a))}},setup:function(){if(this.type===
+"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ia.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ia.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}t.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){ua[b]++===0&&t.addEventListener(a,d,true)},teardown:function(){--ua[b]===
+0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h<k;h++)c.event.add(this[h],d,l,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,
+a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d=
+1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(e){var f=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,f+1);e.preventDefault();return b[f].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var ya={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,e,f,h){var l,k=0,o,x,r=h||this.selector;h=h?this:c(this.context);if(typeof d===
+"object"&&!d.preventDefault){for(l in d)h[b](l,e,d[l],r);return this}if(c.isFunction(e)){f=e;e=B}for(d=(d||"").split(" ");(l=d[k++])!=null;){o=X.exec(l);x="";if(o){x=o[0];l=l.replace(X,"")}if(l==="hover")d.push("mouseenter"+x,"mouseleave"+x);else{o=l;if(l==="focus"||l==="blur"){d.push(ya[l]+x);l+=x}else l=(ya[l]||l)+x;if(b==="live"){x=0;for(var A=h.length;x<A;x++)c.event.add(h[x],"live."+Y(l,r),{data:e,selector:r,handler:f,origType:l,origHandler:f,preType:o})}else h.unbind("live."+Y(l,r),f)}}return this}});
+c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d,e){if(e==null){e=d;d=null}return arguments.length>0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});
+(function(){function a(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1&&!q){y.sizcache=n;y.sizset=p}if(y.nodeName.toLowerCase()===i){F=y;break}y=y[g]}m[p]=F}}}function b(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1){if(!q){y.sizcache=n;y.sizset=p}if(typeof i!=="string"){if(y===i){F=true;break}}else if(k.filter(i,
+[y]).length>0){F=y;break}}y=y[g]}m[p]=F}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,l=true;[0,0].sort(function(){l=false;return 0});var k=function(g,i,n,m){n=n||[];var p=i=i||t;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return n;var q,u,y,F,M,N=true,O=k.isXML(i),D=[],R=g;do{d.exec("");if(q=d.exec(R)){R=q[3];D.push(q[1]);if(q[2]){F=q[3];
+break}}}while(q);if(D.length>1&&x.exec(g))if(D.length===2&&o.relative[D[0]])u=L(D[0]+D[1],i);else for(u=o.relative[D[0]]?[i]:k(D.shift(),i);D.length;){g=D.shift();if(o.relative[g])g+=D.shift();u=L(g,u)}else{if(!m&&D.length>1&&i.nodeType===9&&!O&&o.match.ID.test(D[0])&&!o.match.ID.test(D[D.length-1])){q=k.find(D.shift(),i,O);i=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]}if(i){q=m?{expr:D.pop(),set:C(m)}:k.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&i.parentNode?i.parentNode:i,O);u=q.expr?k.filter(q.expr,
+q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h=
+l;g.sort(w);if(h)for(var i=1;i<g.length;i++)g[i]===g[i-1]&&g.splice(i--,1)}return g};k.matches=function(g,i){return k(g,null,null,i)};k.matchesSelector=function(g,i){return k(i,null,null,[g]).length>0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p<q;p++){var u,y=o.order[p];if(u=o.leftMatch[y].exec(g)){var F=u[1];u.splice(1,1);if(F.substr(F.length-1)!=="\\"){u[1]=(u[1]||"").replace(/\\/g,"");m=o.find[y](u,i,n);if(m!=null){g=g.replace(o.match[y],"");break}}}}m||(m=i.getElementsByTagName("*"));
+return{set:m,expr:g}};k.filter=function(g,i,n,m){for(var p,q,u=g,y=[],F=i,M=i&&i[0]&&k.isXML(i[0]);g&&i.length;){for(var N in o.filter)if((p=o.leftMatch[N].exec(g))!=null&&p[2]){var O,D,R=o.filter[N];D=p[1];q=false;p.splice(1,1);if(D.substr(D.length-1)!=="\\"){if(F===y)y=[];if(o.preFilter[N])if(p=o.preFilter[N](p,F,n,y,m,M)){if(p===true)continue}else q=O=true;if(p)for(var j=0;(D=F[j])!=null;j++)if(D){O=R(D,p,j,F);var s=m^!!O;if(n&&O!=null)if(s)q=true;else F[j]=false;else if(s){y.push(D);q=true}}if(O!==
+B){n||(F=y);g=g.replace(o.match[N],"");if(!q)return[];break}}}if(g===u)if(q==null)k.error(g);else break;u=g}return F};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var o=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,
+POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,i){var n=typeof i==="string",m=n&&!/\W/.test(i);n=n&&!m;if(m)i=i.toLowerCase();m=0;for(var p=g.length,q;m<p;m++)if(q=g[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);g[m]=n||q&&q.nodeName.toLowerCase()===
+i?q||false:q===i}n&&k.filter(i,g,true)},">":function(g,i){var n,m=typeof i==="string",p=0,q=g.length;if(m&&!/\W/.test(i))for(i=i.toLowerCase();p<q;p++){if(n=g[p]){n=n.parentNode;g[p]=n.nodeName.toLowerCase()===i?n:false}}else{for(;p<q;p++)if(n=g[p])g[p]=m?n.parentNode:n.parentNode===i;m&&k.filter(i,g,true)}},"":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=i=i.toLowerCase();q=a}q("parentNode",i,p,g,m,n)},"~":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=
+i=i.toLowerCase();q=a}q("previousSibling",i,p,g,m,n)}},find:{ID:function(g,i,n){if(typeof i.getElementById!=="undefined"&&!n)return(g=i.getElementById(g[1]))&&g.parentNode?[g]:[]},NAME:function(g,i){if(typeof i.getElementsByName!=="undefined"){for(var n=[],m=i.getElementsByName(g[1]),p=0,q=m.length;p<q;p++)m[p].getAttribute("name")===g[1]&&n.push(m[p]);return n.length===0?null:n}},TAG:function(g,i){return i.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,i,n,m,p,q){g=" "+g[1].replace(/\\/g,
+"")+" ";if(q)return g;q=0;for(var u;(u=i[q])!=null;q++)if(u)if(p^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))n||m.push(u);else if(n)i[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n,
+m,p,q){i=g[1].replace(/\\/g,"");if(!q&&o.attrMap[i])g[1]=o.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,n,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,i);else{g=k.filter(g[3],i,n,true^p);n||m.push.apply(m,g);return false}else if(o.match.POS.test(g[0])||o.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===
+true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,i,n){return!!k(n[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===
+g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,i){return i===0},last:function(g,i,n,m){return i===m.length-1},even:function(g,i){return i%2===0},odd:function(g,i){return i%2===1},lt:function(g,i,n){return i<n[3]-0},gt:function(g,i,n){return i>n[3]-0},nth:function(g,i,n){return n[3]-
+0===i},eq:function(g,i,n){return n[3]-0===i}},filter:{PSEUDO:function(g,i,n,m){var p=i[1],q=o.filters[p];if(q)return q(g,n,i,m);else if(p==="contains")return(g.textContent||g.innerText||k.getText([g])||"").indexOf(i[3])>=0;else if(p==="not"){i=i[3];n=0;for(m=i.length;n<m;n++)if(i[n]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+p)},CHILD:function(g,i){var n=i[1],m=g;switch(n){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(n===
+"first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":n=i[2];var p=i[3];if(n===1&&p===0)return true;var q=i[0],u=g.parentNode;if(u&&(u.sizcache!==q||!g.nodeIndex)){var y=0;for(m=u.firstChild;m;m=m.nextSibling)if(m.nodeType===1)m.nodeIndex=++y;u.sizcache=q}m=g.nodeIndex-p;return n===0?m===0:m%n===0&&m/n>=0}},ID:function(g,i){return g.nodeType===1&&g.getAttribute("id")===i},TAG:function(g,i){return i==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===
+i},CLASS:function(g,i){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(i)>-1},ATTR:function(g,i){var n=i[1];n=o.attrHandle[n]?o.attrHandle[n](g):g[n]!=null?g[n]:g.getAttribute(n);var m=n+"",p=i[2],q=i[4];return n==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&n!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,i,n,m){var p=o.setFilters[i[2]];
+if(p)return p(g,n,i,m)}}},x=o.match.POS,r=function(g,i){return"\\"+(i-0+1)},A;for(A in o.match){o.match[A]=RegExp(o.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source);o.leftMatch[A]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[A].source.replace(/\\(\d+)/g,r))}var C=function(g,i){g=Array.prototype.slice.call(g,0);if(i){i.push.apply(i,g);return i}return g};try{Array.prototype.slice.call(t.documentElement.childNodes,0)}catch(J){C=function(g,i){var n=0,m=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(m,
+g);else if(typeof g.length==="number")for(var p=g.length;n<p;n++)m.push(g[n]);else for(;g[n];n++)m.push(g[n]);return m}}var w,I;if(t.documentElement.compareDocumentPosition)w=function(g,i){if(g===i){h=true;return 0}if(!g.compareDocumentPosition||!i.compareDocumentPosition)return g.compareDocumentPosition?-1:1;return g.compareDocumentPosition(i)&4?-1:1};else{w=function(g,i){var n,m,p=[],q=[];n=g.parentNode;m=i.parentNode;var u=n;if(g===i){h=true;return 0}else if(n===m)return I(g,i);else if(n){if(!m)return 1}else return-1;
+for(;u;){p.unshift(u);u=u.parentNode}for(u=m;u;){q.unshift(u);u=u.parentNode}n=p.length;m=q.length;for(u=0;u<n&&u<m;u++)if(p[u]!==q[u])return I(p[u],q[u]);return u===n?I(g,q[u],-1):I(p[u],i,1)};I=function(g,i,n){if(g===i)return n;for(g=g.nextSibling;g;){if(g===i)return-1;g=g.nextSibling}return 1}}k.getText=function(g){for(var i="",n,m=0;g[m];m++){n=g[m];if(n.nodeType===3||n.nodeType===4)i+=n.nodeValue;else if(n.nodeType!==8)i+=k.getText(n.childNodes)}return i};(function(){var g=t.createElement("div"),
+i="script"+(new Date).getTime(),n=t.documentElement;g.innerHTML="<a name='"+i+"'/>";n.insertBefore(g,n.firstChild);if(t.getElementById(i)){o.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:B:[]};o.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}n.removeChild(g);
+n=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(i,n){var m=n.getElementsByTagName(i[1]);if(i[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();t.querySelectorAll&&
+function(){var g=k,i=t.createElement("div");i.innerHTML="<p class='TEST'></p>";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){k=function(m,p,q,u){p=p||t;m=m.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!u&&!k.isXML(p))if(p.nodeType===9)try{return C(p.querySelectorAll(m),q)}catch(y){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var F=p.getAttribute("id"),M=F||"__sizzle__";F||p.setAttribute("id",M);try{return C(p.querySelectorAll("#"+M+" "+m),q)}catch(N){}finally{F||
+p.removeAttribute("id")}}return g(m,p,q,u)};for(var n in g)k[n]=g[n];i=null}}();(function(){var g=t.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,n=false;try{i.call(t.documentElement,"[test!='']:sizzle")}catch(m){n=true}if(i)k.matchesSelector=function(p,q){q=q.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(p))try{if(n||!o.match.PSEUDO.test(q)&&!/!=/.test(q))return i.call(p,q)}catch(u){}return k(q,null,null,[p]).length>0}})();(function(){var g=
+t.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){o.order.splice(1,0,"CLASS");o.find.CLASS=function(i,n,m){if(typeof n.getElementsByClassName!=="undefined"&&!m)return n.getElementsByClassName(i[1])};g=null}}})();k.contains=t.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:t.documentElement.compareDocumentPosition?
+function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};k.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var L=function(g,i){for(var n,m=[],p="",q=i.nodeType?[i]:i;n=o.match.PSEUDO.exec(g);){p+=n[0];g=g.replace(o.match.PSEUDO,"")}g=o.relative[g]?g+"*":g;n=0;for(var u=q.length;n<u;n++)k(g,q[n],m);return k.filter(p,m)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=k.getText;c.isXMLDoc=k.isXML;
+c.contains=k.contains})();var Za=/Until$/,$a=/^(?:parents|prevUntil|prevAll)/,ab=/,/,Na=/^.[^:#\[\.,]*$/,bb=Array.prototype.slice,cb=c.expr.match.POS;c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,e=0,f=this.length;e<f;e++){d=b.length;c.find(a,this[e],b);if(e>0)for(var h=d;h<b.length;h++)for(var l=0;l<d;l++)if(b[l]===b[h]){b.splice(h--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,e=b.length;d<e;d++)if(c.contains(this,b[d]))return true})},
+not:function(a){return this.pushStack(ma(this,a,false),"not",a)},filter:function(a){return this.pushStack(ma(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var l,k={},o=1;if(h&&a.length){e=0;for(f=a.length;e<f;e++){l=a[e];k[l]||(k[l]=c.expr.match.POS.test(l)?c(l,b||this.context):l)}for(;h&&h.ownerDocument&&h!==b;){for(l in k){e=k[l];if(e.jquery?e.index(h)>-1:c(h).is(e))d.push({selector:l,elem:h,level:o})}h=
+h.parentNode;o++}}return d}l=cb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e<f;e++)for(h=this[e];h;)if(l?l.index(h)>-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context):
+c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,
+2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,
+b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Za.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||ab.test(e))&&$a.test(a))f=f.reverse();return this.pushStack(f,a,bb.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===B||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&
+e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var za=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,Aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ba=/<([\w:]+)/,db=/<tbody/i,eb=/<|&#?\w+;/,Ca=/<(?:script|object|embed|option|style)/i,Da=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/\=([^="'>\s]+\/)>/g,P={option:[1,
+"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};P.optgroup=P.option;P.tbody=P.tfoot=P.colgroup=P.caption=P.thead;P.th=P.td;if(!c.support.htmlSerialize)P._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
+c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
+wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
+prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
+this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
+return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(za,"").replace(fb,'="$1">').replace($,"")],e)[0]}else return this.cloneNode(true)});if(a===true){na(this,b);na(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(za,""):null;
+else if(typeof a==="string"&&!Ca.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!P[(Ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Aa,"<$1></$2>");try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(e){this.empty().append(a)}}else c.isFunction(a)?this.each(function(f){var h=c(this);h.html(a.call(this,f,h.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=
+c(this),e=d.html();d.replaceWith(a.call(this,b,e))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){var e,f,h,l=a[0],k=[];if(!c.support.checkClone&&arguments.length===3&&typeof l==="string"&&Da.test(l))return this.each(function(){c(this).domManip(a,
+b,d,true)});if(c.isFunction(l))return this.each(function(x){var r=c(this);a[0]=l.call(this,x,b?r.html():B);r.domManip(a,b,d)});if(this[0]){e=l&&l.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:c.buildFragment(a,this,k);h=e.fragment;if(f=h.childNodes.length===1?h=h.firstChild:h.firstChild){b=b&&c.nodeName(f,"tr");f=0;for(var o=this.length;f<o;f++)d.call(b?c.nodeName(this[f],"table")?this[f].getElementsByTagName("tbody")[0]||this[f].appendChild(this[f].ownerDocument.createElement("tbody")):
+this[f]:this[f],f>0||e.cacheable||this.length>1?h.cloneNode(true):h)}k.length&&c.each(k,Oa)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:t;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===t&&!Ca.test(a[0])&&(c.support.checkClone||!Da.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",
+prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=d.length;f<h;f++){var l=(f>0?this.clone(true):this).get();c(d[f])[b](l);e=e.concat(l)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||t;if(typeof b.createElement==="undefined")b=b.ownerDocument||
+b[0]&&b[0].ownerDocument||t;for(var f=[],h=0,l;(l=a[h])!=null;h++){if(typeof l==="number")l+="";if(l){if(typeof l==="string"&&!eb.test(l))l=b.createTextNode(l);else if(typeof l==="string"){l=l.replace(Aa,"<$1></$2>");var k=(Ba.exec(l)||["",""])[1].toLowerCase(),o=P[k]||P._default,x=o[0],r=b.createElement("div");for(r.innerHTML=o[1]+l+o[2];x--;)r=r.lastChild;if(!c.support.tbody){x=db.test(l);k=k==="table"&&!x?r.firstChild&&r.firstChild.childNodes:o[1]==="<table>"&&!x?r.childNodes:[];for(o=k.length-
+1;o>=0;--o)c.nodeName(k[o],"tbody")&&!k[o].childNodes.length&&k[o].parentNode.removeChild(k[o])}!c.support.leadingWhitespace&&$.test(l)&&r.insertBefore(b.createTextNode($.exec(l)[0]),r.firstChild);l=r.childNodes}if(l.nodeType)f.push(l);else f=c.merge(f,l)}}if(d)for(h=0;f[h];h++)if(e&&c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script"))));
+d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,l=0,k;(k=a[l])!=null;l++)if(!(k.nodeName&&c.noData[k.nodeName.toLowerCase()]))if(d=k[c.expando]){if((b=e[d])&&b.events)for(var o in b.events)f[o]?c.event.remove(k,o):c.removeEvent(k,o,b.handle);if(h)delete k[c.expando];else k.removeAttribute&&k.removeAttribute(c.expando);delete e[d]}}});var Ea=/alpha\([^)]*\)/i,gb=/opacity=([^)]*)/,hb=/-([a-z])/ig,ib=/([A-Z])/g,Fa=/^-?\d+(?:px)?$/i,
+jb=/^-?\d/,kb={position:"absolute",visibility:"hidden",display:"block"},Pa=["Left","Right"],Qa=["Top","Bottom"],W,Ga,aa,lb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===B)return this;return c.access(this,a,b,true,function(d,e,f){return f!==B?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,
+zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),l=a.style,k=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==B){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!k||!("set"in k)||(d=k.set(a,d))!==B)try{l[b]=d}catch(o){}}}else{if(k&&"get"in k&&(f=k.get(a,false,e))!==B)return f;return l[b]}}},css:function(a,b,d){var e,f=c.camelCase(b),
+h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==B)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=e[f]},camelCase:function(a){return a.replace(hb,lb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=oa(d,b,f);else c.swap(d,kb,function(){h=oa(d,b,f)});if(h<=0){h=W(d,b,b);if(h==="0px"&&aa)h=aa(d,b,b);
+if(h!=null)return h===""||h==="auto"?"0px":h}if(h<0||h==null){h=d.style[b];return h===""||h==="auto"?"0px":h}return typeof h==="string"?h:h+"px"}},set:function(d,e){if(Fa.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return gb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f=
+d.filter||"";d.filter=Ea.test(f)?f.replace(Ea,e):d.filter+" "+e}};if(t.defaultView&&t.defaultView.getComputedStyle)Ga=function(a,b,d){var e;d=d.replace(ib,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return B;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};if(t.documentElement.currentStyle)aa=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!Fa.test(f)&&jb.test(f)){d=h.left;
+e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f===""?"auto":f};W=Ga||aa;if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var mb=c.now(),nb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
+ob=/^(?:select|textarea)/i,pb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,qb=/^(?:GET|HEAD)$/,Ra=/\[\]$/,T=/\=\?(&|$)/,ja=/\?/,rb=/([?&])_=[^&]*/,sb=/^(\w+:)?\/\/([^\/?#]+)/,tb=/%20/g,ub=/#.*$/,Ha=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ha)return Ha.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b===
+"object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(l,k){if(k==="success"||k==="notmodified")h.html(f?c("<div>").append(l.responseText.replace(nb,"")).find(f):l.responseText);d&&h.each(d,[l.responseText,k,l])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&
+!this.disabled&&(this.checked||ob.test(this.nodeName)||pb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})},
+getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html",
+script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),l=qb.test(h);b.url=b.url.replace(ub,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ja.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data||
+!T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+mb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var k=E[d];E[d]=function(m){if(c.isFunction(k))k(m);else{E[d]=B;try{delete E[d]}catch(p){}}f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);r&&r.removeChild(A)}}if(b.dataType==="script"&&b.cache===null)b.cache=
+false;if(b.cache===false&&l){var o=c.now(),x=b.url.replace(rb,"$1_="+o);b.url=x+(x===b.url?(ja.test(b.url)?"&":"?")+"_="+o:"")}if(b.data&&l)b.url+=(ja.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");o=(o=sb.exec(b.url))&&(o[1]&&o[1].toLowerCase()!==location.protocol||o[2].toLowerCase()!==location.host);if(b.dataType==="script"&&h==="GET"&&o){var r=t.getElementsByTagName("head")[0]||t.documentElement,A=t.createElement("script");if(b.scriptCharset)A.charset=b.scriptCharset;
+A.src=b.url;if(!d){var C=false;A.onload=A.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);A.onload=A.onreadystatechange=null;r&&A.parentNode&&r.removeChild(A)}}}r.insertBefore(A,r.firstChild);return B}var J=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!l||a&&a.contentType)w.setRequestHeader("Content-Type",
+b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}o||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(I){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&&
+c.triggerGlobal(b,"ajaxSend",[w,b]);var L=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){J||c.handleComplete(b,w,e,f);J=true;if(w)w.onreadystatechange=c.noop}else if(!J&&w&&(w.readyState===4||m==="timeout")){J=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d||
+c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&Function.prototype.call.call(g,w);L("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){w&&!J&&L("timeout")},b.timeout);try{w.send(l||b.data==null?null:b.data)}catch(n){c.handleError(b,w,null,n);c.handleComplete(b,w,e,f)}b.async||L();return w}},param:function(a,b){var d=[],e=function(h,l){l=c.isFunction(l)?l():l;d[d.length]=
+encodeURIComponent(h)+"="+encodeURIComponent(l)};if(b===B)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)da(f,a[f],b,e);return d.join("&").replace(tb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess",
+[b,a])},handleComplete:function(a,b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),
+e=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}});
+if(E.ActiveXObject)c.ajaxSettings.xhr=function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var ea={},vb=/^(?:toggle|show|hide)$/,wb=/^([+\-]=)?([\d+.\-]+)(.*)$/,ba,pa=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show",
+3),a,b,d);else{d=0;for(var e=this.length;d<e;d++){a=this[d];b=a.style.display;if(!c.data(a,"olddisplay")&&b==="none")b=a.style.display="";b===""&&c.css(a,"display")==="none"&&c.data(a,"olddisplay",qa(a.nodeName))}for(d=0;d<e;d++){a=this[d];b=a.style.display;if(b===""||b==="none")a.style.display=c.data(a,"olddisplay")||""}return this}},hide:function(a,b,d){if(a||a===0)return this.animate(S("hide",3),a,b,d);else{a=0;for(b=this.length;a<b;a++){d=c.css(this[a],"display");d!=="none"&&c.data(this[a],"olddisplay",
+d)}for(a=0;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b,d){var e=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||e?this.each(function(){var f=e?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(S("toggle",3),a,b,d);return this},fadeTo:function(a,b,d,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d,e)},animate:function(a,b,d,e){var f=c.speed(b,
+d,e);if(c.isEmptyObject(a))return this.each(f.complete);return this[f.queue===false?"each":"queue"](function(){var h=c.extend({},f),l,k=this.nodeType===1,o=k&&c(this).is(":hidden"),x=this;for(l in a){var r=c.camelCase(l);if(l!==r){a[r]=a[l];delete a[l];l=r}if(a[l]==="hide"&&o||a[l]==="show"&&!o)return h.complete.call(this);if(k&&(l==="height"||l==="width")){h.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(c.css(this,"display")==="inline"&&c.css(this,"float")==="none")if(c.support.inlineBlockNeedsLayout)if(qa(this.nodeName)===
+"inline")this.style.display="inline-block";else{this.style.display="inline";this.style.zoom=1}else this.style.display="inline-block"}if(c.isArray(a[l])){(h.specialEasing=h.specialEasing||{})[l]=a[l][1];a[l]=a[l][0]}}if(h.overflow!=null)this.style.overflow="hidden";h.curAnim=c.extend({},a);c.each(a,function(A,C){var J=new c.fx(x,h,A);if(vb.test(C))J[C==="toggle"?o?"show":"hide":C](a);else{var w=wb.exec(C),I=J.cur()||0;if(w){var L=parseFloat(w[2]),g=w[3]||"px";if(g!=="px"){c.style(x,A,(L||1)+g);I=(L||
+1)/J.cur()*I;c.style(x,A,I+g)}if(w[1])L=(w[1]==="-="?-1:1)*L+I;J.custom(I,L,g)}else J.custom(I,C,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var e=d.length-1;e>=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b,
+d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a*
+Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(l){return f.step(l)}
+var f=this,h=c.fx;this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;e.elem=this.elem;if(e()&&c.timers.push(e)&&!ba)ba=setInterval(h.tick,h.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;
+this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(k,o){f.style["overflow"+o]=h.overflow[k]})}this.options.hide&&c(this.elem).hide();if(this.options.hide||
+this.options.show)for(var l in this.options.curAnim)c.style(this.elem,l,this.options.orig[l]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=
+c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},interval:13,stop:function(){clearInterval(ba);ba=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===
+b.elem}).length};var xb=/^t(?:able|d|h)$/i,Ia=/^(?:body|html)$/i;c.fn.offset="getBoundingClientRect"in t.documentElement?function(a){var b=this[0],d;if(a)return this.each(function(l){c.offset.setOffset(this,a,l)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);try{d=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,h=f.documentElement;if(!d||!c.contains(h,b))return d||{top:0,left:0};b=f.body;f=fa(f);return{top:d.top+(f.pageYOffset||c.support.boxModel&&
+h.scrollTop||b.scrollTop)-(h.clientTop||b.clientTop||0),left:d.left+(f.pageXOffset||c.support.boxModel&&h.scrollLeft||b.scrollLeft)-(h.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(x){c.offset.setOffset(this,a,x)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d,e=b.offsetParent,f=b.ownerDocument,h=f.documentElement,l=f.body;d=(f=f.defaultView)?f.getComputedStyle(b,null):b.currentStyle;
+for(var k=b.offsetTop,o=b.offsetLeft;(b=b.parentNode)&&b!==l&&b!==h;){if(c.offset.supportsFixedPosition&&d.position==="fixed")break;d=f?f.getComputedStyle(b,null):b.currentStyle;k-=b.scrollTop;o-=b.scrollLeft;if(b===e){k+=b.offsetTop;o+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&xb.test(b.nodeName))){k+=parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}e=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"){k+=
+parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}d=d}if(d.position==="relative"||d.position==="static"){k+=l.offsetTop;o+=l.offsetLeft}if(c.offset.supportsFixedPosition&&d.position==="fixed"){k+=Math.max(h.scrollTop,l.scrollTop);o+=Math.max(h.scrollLeft,l.scrollLeft)}return{top:k,left:o}};c.offset={initialize:function(){var a=t.body,b=t.createElement("div"),d,e,f,h=parseFloat(c.css(a,"marginTop"))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",
+height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);d=b.firstChild;e=d.firstChild;f=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=e.offsetTop!==5;this.doesAddBorderForTableAndCells=
+f.offsetTop===5;e.style.position="fixed";e.style.top="20px";this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15;e.style.position=e.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==h;a.removeChild(b);c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.css(a,
+"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),l=c.css(a,"top"),k=c.css(a,"left"),o=e==="absolute"&&c.inArray("auto",[l,k])>-1;e={};var x={};if(o)x=f.position();l=o?x.top:parseInt(l,10)||0;k=o?x.left:parseInt(k,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+l;if(b.left!=null)e.left=b.left-h.left+k;"using"in b?b.using.call(a,
+e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Ia.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ia.test(a.nodeName)&&
+c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){var f=this[0],h;if(!f)return null;if(e!==B)return this.each(function(){if(h=fa(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=fa(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();
+c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(l){var k=c(this);k[d](e.call(this,l,k[d]()))});if(c.isWindow(f))return f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b];else if(f.nodeType===9)return Math.max(f.documentElement["client"+
+b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]);else if(e===B){f=c.css(f,d);var h=parseFloat(f);return c.isNaN(h)?f:h}else return this.css(d,typeof e==="string"?e:e+"px")}})})(window); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery/jquery-2.1.3.js b/common/src/main/webapp/thirdparty/jquery/jquery-2.1.3.js
new file mode 100644
index 0000000..79d631f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery/jquery-2.1.3.js
@@ -0,0 +1,9205 @@
+/*!
+ * jQuery JavaScript Library v2.1.3
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2014-12-18T15:11Z
+ */
+
+(function( global, factory ) {
+
+ if ( typeof module === "object" && typeof module.exports === "object" ) {
+ // For CommonJS and CommonJS-like environments where a proper `window`
+ // is present, execute the factory and get jQuery.
+ // For environments that do not have a `window` with a `document`
+ // (such as Node.js), expose a factory as module.exports.
+ // This accentuates the need for the creation of a real `window`.
+ // e.g. var jQuery = require("jquery")(window);
+ // See ticket #14549 for more info.
+ module.exports = global.document ?
+ factory( global, true ) :
+ function( w ) {
+ if ( !w.document ) {
+ throw new Error( "jQuery requires a window with a document" );
+ }
+ return factory( w );
+ };
+ } else {
+ factory( global );
+ }
+
+// Pass this if window is not defined yet
+}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
+
+// Support: Firefox 18+
+// Can't be in strict mode, several libs including ASP.NET trace
+// the stack via arguments.caller.callee and Firefox dies if
+// you try to trace through "use strict" call chains. (#13335)
+//
+
+var arr = [];
+
+var slice = arr.slice;
+
+var concat = arr.concat;
+
+var push = arr.push;
+
+var indexOf = arr.indexOf;
+
+var class2type = {};
+
+var toString = class2type.toString;
+
+var hasOwn = class2type.hasOwnProperty;
+
+var support = {};
+
+
+
+var
+ // Use the correct document accordingly with window argument (sandbox)
+ document = window.document,
+
+ version = "2.1.3",
+
+ // Define a local copy of jQuery
+ jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ // Need init if jQuery is called (just allow error to be thrown if not included)
+ return new jQuery.fn.init( selector, context );
+ },
+
+ // Support: Android<4.1
+ // Make sure we trim BOM and NBSP
+ rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+ // Matches dashed string for camelizing
+ rmsPrefix = /^-ms-/,
+ rdashAlpha = /-([\da-z])/gi,
+
+ // Used by jQuery.camelCase as callback to replace()
+ fcamelCase = function( all, letter ) {
+ return letter.toUpperCase();
+ };
+
+jQuery.fn = jQuery.prototype = {
+ // The current version of jQuery being used
+ jquery: version,
+
+ constructor: jQuery,
+
+ // Start with an empty selector
+ selector: "",
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ toArray: function() {
+ return slice.call( this );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num != null ?
+
+ // Return just the one element from the set
+ ( num < 0 ? this[ num + this.length ] : this[ num ] ) :
+
+ // Return all the elements in a clean array
+ slice.call( this );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems ) {
+
+ // Build a new jQuery matched element set
+ var ret = jQuery.merge( this.constructor(), elems );
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+ ret.context = this.context;
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ // (You can seed the arguments with an array of args, but this is
+ // only used internally.)
+ each: function( callback, args ) {
+ return jQuery.each( this, callback, args );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ }));
+ },
+
+ slice: function() {
+ return this.pushStack( slice.apply( this, arguments ) );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ eq: function( i ) {
+ var len = this.length,
+ j = +i + ( i < 0 ? len : 0 );
+ return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
+ },
+
+ end: function() {
+ return this.prevObject || this.constructor(null);
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: push,
+ sort: arr.sort,
+ splice: arr.splice
+};
+
+jQuery.extend = jQuery.fn.extend = function() {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+
+ // Skip the boolean and the target
+ target = arguments[ i ] || {};
+ i++;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+ target = {};
+ }
+
+ // Extend jQuery itself if only one argument is passed
+ if ( i === length ) {
+ target = this;
+ i--;
+ }
+
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray(src) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend({
+ // Unique for each copy of jQuery on the page
+ expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
+
+ // Assume jQuery is ready without the ready module
+ isReady: true,
+
+ error: function( msg ) {
+ throw new Error( msg );
+ },
+
+ noop: function() {},
+
+ isFunction: function( obj ) {
+ return jQuery.type(obj) === "function";
+ },
+
+ isArray: Array.isArray,
+
+ isWindow: function( obj ) {
+ return obj != null && obj === obj.window;
+ },
+
+ isNumeric: function( obj ) {
+ // parseFloat NaNs numeric-cast false positives (null|true|false|"")
+ // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
+ // subtraction forces infinities to NaN
+ // adding 1 corrects loss of precision from parseFloat (#15100)
+ return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0;
+ },
+
+ isPlainObject: function( obj ) {
+ // Not plain objects:
+ // - Any object or value whose internal [[Class]] property is not "[object Object]"
+ // - DOM nodes
+ // - window
+ if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ if ( obj.constructor &&
+ !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) {
+ return false;
+ }
+
+ // If the function hasn't returned already, we're confident that
+ // |obj| is a plain object, created by {} or constructed with new Object
+ return true;
+ },
+
+ isEmptyObject: function( obj ) {
+ var name;
+ for ( name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ type: function( obj ) {
+ if ( obj == null ) {
+ return obj + "";
+ }
+ // Support: Android<4.0, iOS<6 (functionish RegExp)
+ return typeof obj === "object" || typeof obj === "function" ?
+ class2type[ toString.call(obj) ] || "object" :
+ typeof obj;
+ },
+
+ // Evaluates a script in a global context
+ globalEval: function( code ) {
+ var script,
+ indirect = eval;
+
+ code = jQuery.trim( code );
+
+ if ( code ) {
+ // If the code includes a valid, prologue position
+ // strict mode pragma, execute code by injecting a
+ // script tag into the document.
+ if ( code.indexOf("use strict") === 1 ) {
+ script = document.createElement("script");
+ script.text = code;
+ document.head.appendChild( script ).parentNode.removeChild( script );
+ } else {
+ // Otherwise, avoid the DOM node creation, insertion
+ // and removal by using an indirect global eval
+ indirect( code );
+ }
+ }
+ },
+
+ // Convert dashed to camelCase; used by the css and data modules
+ // Support: IE9-11+
+ // Microsoft forgot to hump their vendor prefix (#9572)
+ camelCase: function( string ) {
+ return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+ },
+
+ // args is for internal usage only
+ each: function( obj, callback, args ) {
+ var value,
+ i = 0,
+ length = obj.length,
+ isArray = isArraylike( obj );
+
+ if ( args ) {
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback.apply( obj[ i ], args );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ value = callback.apply( obj[ i ], args );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ }
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback.call( obj[ i ], i, obj[ i ] );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ value = callback.call( obj[ i ], i, obj[ i ] );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ }
+ }
+
+ return obj;
+ },
+
+ // Support: Android<4.1
+ trim: function( text ) {
+ return text == null ?
+ "" :
+ ( text + "" ).replace( rtrim, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( arr, results ) {
+ var ret = results || [];
+
+ if ( arr != null ) {
+ if ( isArraylike( Object(arr) ) ) {
+ jQuery.merge( ret,
+ typeof arr === "string" ?
+ [ arr ] : arr
+ );
+ } else {
+ push.call( ret, arr );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, arr, i ) {
+ return arr == null ? -1 : indexOf.call( arr, elem, i );
+ },
+
+ merge: function( first, second ) {
+ var len = +second.length,
+ j = 0,
+ i = first.length;
+
+ for ( ; j < len; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, invert ) {
+ var callbackInverse,
+ matches = [],
+ i = 0,
+ length = elems.length,
+ callbackExpect = !invert;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( ; i < length; i++ ) {
+ callbackInverse = !callback( elems[ i ], i );
+ if ( callbackInverse !== callbackExpect ) {
+ matches.push( elems[ i ] );
+ }
+ }
+
+ return matches;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var value,
+ i = 0,
+ length = elems.length,
+ isArray = isArraylike( elems ),
+ ret = [];
+
+ // Go through the array, translating each of the items to their new values
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret.push( value );
+ }
+ }
+
+ // Go through every key on the object,
+ } else {
+ for ( i in elems ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret.push( value );
+ }
+ }
+ }
+
+ // Flatten any nested arrays
+ return concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ // Bind a function to a context, optionally partially applying any
+ // arguments.
+ proxy: function( fn, context ) {
+ var tmp, args, proxy;
+
+ if ( typeof context === "string" ) {
+ tmp = fn[ context ];
+ context = fn;
+ fn = tmp;
+ }
+
+ // Quick check to determine if target is callable, in the spec
+ // this throws a TypeError, but we will just return undefined.
+ if ( !jQuery.isFunction( fn ) ) {
+ return undefined;
+ }
+
+ // Simulated bind
+ args = slice.call( arguments, 2 );
+ proxy = function() {
+ return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
+ };
+
+ // Set the guid of unique handler to the same of original handler, so it can be removed
+ proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+ return proxy;
+ },
+
+ now: Date.now,
+
+ // jQuery.support is not used in Core but other projects attach their
+ // properties to it so it needs to exist.
+ support: support
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+function isArraylike( obj ) {
+ var length = obj.length,
+ type = jQuery.type( obj );
+
+ if ( type === "function" || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ if ( obj.nodeType === 1 && length ) {
+ return true;
+ }
+
+ return type === "array" || length === 0 ||
+ typeof length === "number" && length > 0 && ( length - 1 ) in obj;
+}
+var Sizzle =
+/*!
+ * Sizzle CSS Selector Engine v2.2.0-pre
+ * http://sizzlejs.com/
+ *
+ * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2014-12-16
+ */
+(function( window ) {
+
+var i,
+ support,
+ Expr,
+ getText,
+ isXML,
+ tokenize,
+ compile,
+ select,
+ outermostContext,
+ sortInput,
+ hasDuplicate,
+
+ // Local document vars
+ setDocument,
+ document,
+ docElem,
+ documentIsHTML,
+ rbuggyQSA,
+ rbuggyMatches,
+ matches,
+ contains,
+
+ // Instance-specific data
+ expando = "sizzle" + 1 * new Date(),
+ preferredDoc = window.document,
+ dirruns = 0,
+ done = 0,
+ classCache = createCache(),
+ tokenCache = createCache(),
+ compilerCache = createCache(),
+ sortOrder = function( a, b ) {
+ if ( a === b ) {
+ hasDuplicate = true;
+ }
+ return 0;
+ },
+
+ // General-purpose constants
+ MAX_NEGATIVE = 1 << 31,
+
+ // Instance methods
+ hasOwn = ({}).hasOwnProperty,
+ arr = [],
+ pop = arr.pop,
+ push_native = arr.push,
+ push = arr.push,
+ slice = arr.slice,
+ // Use a stripped-down indexOf as it's faster than native
+ // http://jsperf.com/thor-indexof-vs-for/5
+ indexOf = function( list, elem ) {
+ var i = 0,
+ len = list.length;
+ for ( ; i < len; i++ ) {
+ if ( list[i] === elem ) {
+ return i;
+ }
+ }
+ return -1;
+ },
+
+ booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
+
+ // Regular expressions
+
+ // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
+ whitespace = "[\\x20\\t\\r\\n\\f]",
+ // http://www.w3.org/TR/css3-syntax/#characters
+ characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
+
+ // Loosely modeled on CSS identifier characters
+ // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
+ // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+ identifier = characterEncoding.replace( "w", "w#" ),
+
+ // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
+ attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace +
+ // Operator (capture 2)
+ "*([*^$|!~]?=)" + whitespace +
+ // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
+ "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
+ "*\\]",
+
+ pseudos = ":(" + characterEncoding + ")(?:\\((" +
+ // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
+ // 1. quoted (capture 3; capture 4 or capture 5)
+ "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
+ // 2. simple (capture 6)
+ "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
+ // 3. anything else (capture 2)
+ ".*" +
+ ")\\)|)",
+
+ // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+ rwhitespace = new RegExp( whitespace + "+", "g" ),
+ rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+ rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+ rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
+
+ rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
+
+ rpseudo = new RegExp( pseudos ),
+ ridentifier = new RegExp( "^" + identifier + "$" ),
+
+ matchExpr = {
+ "ID": new RegExp( "^#(" + characterEncoding + ")" ),
+ "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
+ "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
+ "ATTR": new RegExp( "^" + attributes ),
+ "PSEUDO": new RegExp( "^" + pseudos ),
+ "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
+ "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+ "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+ "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
+ // For use in libraries implementing .is()
+ // We use this for POS matching in `select`
+ "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
+ whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+ },
+
+ rinputs = /^(?:input|select|textarea|button)$/i,
+ rheader = /^h\d$/i,
+
+ rnative = /^[^{]+\{\s*\[native \w/,
+
+ // Easily-parseable/retrievable ID or TAG or CLASS selectors
+ rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+ rsibling = /[+~]/,
+ rescape = /'|\\/g,
+
+ // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+ runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
+ funescape = function( _, escaped, escapedWhitespace ) {
+ var high = "0x" + escaped - 0x10000;
+ // NaN means non-codepoint
+ // Support: Firefox<24
+ // Workaround erroneous numeric interpretation of +"0x"
+ return high !== high || escapedWhitespace ?
+ escaped :
+ high < 0 ?
+ // BMP codepoint
+ String.fromCharCode( high + 0x10000 ) :
+ // Supplemental Plane codepoint (surrogate pair)
+ String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+ },
+
+ // Used for iframes
+ // See setDocument()
+ // Removing the function wrapper causes a "Permission Denied"
+ // error in IE
+ unloadHandler = function() {
+ setDocument();
+ };
+
+// Optimize for push.apply( _, NodeList )
+try {
+ push.apply(
+ (arr = slice.call( preferredDoc.childNodes )),
+ preferredDoc.childNodes
+ );
+ // Support: Android<4.0
+ // Detect silently failing push.apply
+ arr[ preferredDoc.childNodes.length ].nodeType;
+} catch ( e ) {
+ push = { apply: arr.length ?
+
+ // Leverage slice if possible
+ function( target, els ) {
+ push_native.apply( target, slice.call(els) );
+ } :
+
+ // Support: IE<9
+ // Otherwise append directly
+ function( target, els ) {
+ var j = target.length,
+ i = 0;
+ // Can't trust NodeList.length
+ while ( (target[j++] = els[i++]) ) {}
+ target.length = j - 1;
+ }
+ };
+}
+
+function Sizzle( selector, context, results, seed ) {
+ var match, elem, m, nodeType,
+ // QSA vars
+ i, groups, old, nid, newContext, newSelector;
+
+ if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
+ setDocument( context );
+ }
+
+ context = context || document;
+ results = results || [];
+ nodeType = context.nodeType;
+
+ if ( typeof selector !== "string" || !selector ||
+ nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
+
+ return results;
+ }
+
+ if ( !seed && documentIsHTML ) {
+
+ // Try to shortcut find operations when possible (e.g., not under DocumentFragment)
+ if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
+ // Speed-up: Sizzle("#ID")
+ if ( (m = match[1]) ) {
+ if ( nodeType === 9 ) {
+ elem = context.getElementById( m );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document (jQuery #6963)
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE, Opera, and Webkit return items
+ // by name instead of ID
+ if ( elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ } else {
+ return results;
+ }
+ } else {
+ // Context is not a document
+ if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
+ contains( context, elem ) && elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ }
+
+ // Speed-up: Sizzle("TAG")
+ } else if ( match[2] ) {
+ push.apply( results, context.getElementsByTagName( selector ) );
+ return results;
+
+ // Speed-up: Sizzle(".CLASS")
+ } else if ( (m = match[3]) && support.getElementsByClassName ) {
+ push.apply( results, context.getElementsByClassName( m ) );
+ return results;
+ }
+ }
+
+ // QSA path
+ if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
+ nid = old = expando;
+ newContext = context;
+ newSelector = nodeType !== 1 && selector;
+
+ // qSA works strangely on Element-rooted queries
+ // We can work around this by specifying an extra ID on the root
+ // and working up from there (Thanks to Andrew Dupont for the technique)
+ // IE 8 doesn't work on object elements
+ if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+ groups = tokenize( selector );
+
+ if ( (old = context.getAttribute("id")) ) {
+ nid = old.replace( rescape, "\\$&" );
+ } else {
+ context.setAttribute( "id", nid );
+ }
+ nid = "[id='" + nid + "'] ";
+
+ i = groups.length;
+ while ( i-- ) {
+ groups[i] = nid + toSelector( groups[i] );
+ }
+ newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context;
+ newSelector = groups.join(",");
+ }
+
+ if ( newSelector ) {
+ try {
+ push.apply( results,
+ newContext.querySelectorAll( newSelector )
+ );
+ return results;
+ } catch(qsaError) {
+ } finally {
+ if ( !old ) {
+ context.removeAttribute("id");
+ }
+ }
+ }
+ }
+ }
+
+ // All others
+ return select( selector.replace( rtrim, "$1" ), context, results, seed );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
+ * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ * deleting the oldest entry
+ */
+function createCache() {
+ var keys = [];
+
+ function cache( key, value ) {
+ // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+ if ( keys.push( key + " " ) > Expr.cacheLength ) {
+ // Only keep the most recent entries
+ delete cache[ keys.shift() ];
+ }
+ return (cache[ key + " " ] = value);
+ }
+ return cache;
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+ fn[ expando ] = true;
+ return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created div and expects a boolean result
+ */
+function assert( fn ) {
+ var div = document.createElement("div");
+
+ try {
+ return !!fn( div );
+ } catch (e) {
+ return false;
+ } finally {
+ // Remove from its parent by default
+ if ( div.parentNode ) {
+ div.parentNode.removeChild( div );
+ }
+ // release memory in IE
+ div = null;
+ }
+}
+
+/**
+ * Adds the same handler for all of the specified attrs
+ * @param {String} attrs Pipe-separated list of attributes
+ * @param {Function} handler The method that will be applied
+ */
+function addHandle( attrs, handler ) {
+ var arr = attrs.split("|"),
+ i = attrs.length;
+
+ while ( i-- ) {
+ Expr.attrHandle[ arr[i] ] = handler;
+ }
+}
+
+/**
+ * Checks document order of two siblings
+ * @param {Element} a
+ * @param {Element} b
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
+ */
+function siblingCheck( a, b ) {
+ var cur = b && a,
+ diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
+ ( ~b.sourceIndex || MAX_NEGATIVE ) -
+ ( ~a.sourceIndex || MAX_NEGATIVE );
+
+ // Use IE sourceIndex if available on both nodes
+ if ( diff ) {
+ return diff;
+ }
+
+ // Check if b follows a
+ if ( cur ) {
+ while ( (cur = cur.nextSibling) ) {
+ if ( cur === b ) {
+ return -1;
+ }
+ }
+ }
+
+ return a ? 1 : -1;
+}
+
+/**
+ * Returns a function to use in pseudos for input types
+ * @param {String} type
+ */
+function createInputPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for buttons
+ * @param {String} type
+ */
+function createButtonPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for positionals
+ * @param {Function} fn
+ */
+function createPositionalPseudo( fn ) {
+ return markFunction(function( argument ) {
+ argument = +argument;
+ return markFunction(function( seed, matches ) {
+ var j,
+ matchIndexes = fn( [], seed.length, argument ),
+ i = matchIndexes.length;
+
+ // Match elements found at the specified indexes
+ while ( i-- ) {
+ if ( seed[ (j = matchIndexes[i]) ] ) {
+ seed[j] = !(matches[j] = seed[j]);
+ }
+ }
+ });
+ });
+}
+
+/**
+ * Checks a node for validity as a Sizzle context
+ * @param {Element|Object=} context
+ * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
+ */
+function testContext( context ) {
+ return context && typeof context.getElementsByTagName !== "undefined" && context;
+}
+
+// Expose support vars for convenience
+support = Sizzle.support = {};
+
+/**
+ * Detects XML nodes
+ * @param {Element|Object} elem An element or a document
+ * @returns {Boolean} True iff elem is a non-HTML XML node
+ */
+isXML = Sizzle.isXML = function( elem ) {
+ // documentElement is verified for cases where it doesn't yet exist
+ // (such as loading iframes in IE - #4833)
+ var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+/**
+ * Sets document-related variables once based on the current document
+ * @param {Element|Object} [doc] An element or document object to use to set the document
+ * @returns {Object} Returns the current document
+ */
+setDocument = Sizzle.setDocument = function( node ) {
+ var hasCompare, parent,
+ doc = node ? node.ownerDocument || node : preferredDoc;
+
+ // If no document and documentElement is available, return
+ if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
+ return document;
+ }
+
+ // Set our document
+ document = doc;
+ docElem = doc.documentElement;
+ parent = doc.defaultView;
+
+ // Support: IE>8
+ // If iframe document is assigned to "document" variable and if iframe has been reloaded,
+ // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
+ // IE6-8 do not support the defaultView property so parent will be undefined
+ if ( parent && parent !== parent.top ) {
+ // IE11 does not have attachEvent, so all must suffer
+ if ( parent.addEventListener ) {
+ parent.addEventListener( "unload", unloadHandler, false );
+ } else if ( parent.attachEvent ) {
+ parent.attachEvent( "onunload", unloadHandler );
+ }
+ }
+
+ /* Support tests
+ ---------------------------------------------------------------------- */
+ documentIsHTML = !isXML( doc );
+
+ /* Attributes
+ ---------------------------------------------------------------------- */
+
+ // Support: IE<8
+ // Verify that getAttribute really returns attributes and not properties
+ // (excepting IE8 booleans)
+ support.attributes = assert(function( div ) {
+ div.className = "i";
+ return !div.getAttribute("className");
+ });
+
+ /* getElement(s)By*
+ ---------------------------------------------------------------------- */
+
+ // Check if getElementsByTagName("*") returns only elements
+ support.getElementsByTagName = assert(function( div ) {
+ div.appendChild( doc.createComment("") );
+ return !div.getElementsByTagName("*").length;
+ });
+
+ // Support: IE<9
+ support.getElementsByClassName = rnative.test( doc.getElementsByClassName );
+
+ // Support: IE<10
+ // Check if getElementById returns elements by name
+ // The broken getElementById methods don't pick up programatically-set names,
+ // so use a roundabout getElementsByName test
+ support.getById = assert(function( div ) {
+ docElem.appendChild( div ).id = expando;
+ return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
+ });
+
+ // ID find and filter
+ if ( support.getById ) {
+ Expr.find["ID"] = function( id, context ) {
+ if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
+ var m = context.getElementById( id );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ return m && m.parentNode ? [ m ] : [];
+ }
+ };
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ return elem.getAttribute("id") === attrId;
+ };
+ };
+ } else {
+ // Support: IE6/7
+ // getElementById is not reliable as a find shortcut
+ delete Expr.find["ID"];
+
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+ return node && node.value === attrId;
+ };
+ };
+ }
+
+ // Tag
+ Expr.find["TAG"] = support.getElementsByTagName ?
+ function( tag, context ) {
+ if ( typeof context.getElementsByTagName !== "undefined" ) {
+ return context.getElementsByTagName( tag );
+
+ // DocumentFragment nodes don't have gEBTN
+ } else if ( support.qsa ) {
+ return context.querySelectorAll( tag );
+ }
+ } :
+
+ function( tag, context ) {
+ var elem,
+ tmp = [],
+ i = 0,
+ // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
+ results = context.getElementsByTagName( tag );
+
+ // Filter out possible comments
+ if ( tag === "*" ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem.nodeType === 1 ) {
+ tmp.push( elem );
+ }
+ }
+
+ return tmp;
+ }
+ return results;
+ };
+
+ // Class
+ Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
+ if ( documentIsHTML ) {
+ return context.getElementsByClassName( className );
+ }
+ };
+
+ /* QSA/matchesSelector
+ ---------------------------------------------------------------------- */
+
+ // QSA and matchesSelector support
+
+ // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+ rbuggyMatches = [];
+
+ // qSa(:focus) reports false when true (Chrome 21)
+ // We allow this because of a bug in IE8/9 that throws an error
+ // whenever `document.activeElement` is accessed on an iframe
+ // So, we allow :focus to pass through QSA all the time to avoid the IE error
+ // See http://bugs.jquery.com/ticket/13378
+ rbuggyQSA = [];
+
+ if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
+ // Build QSA regex
+ // Regex strategy adopted from Diego Perini
+ assert(function( div ) {
+ // Select is set to empty string on purpose
+ // This is to test IE's treatment of not explicitly
+ // setting a boolean content attribute,
+ // since its presence should be enough
+ // http://bugs.jquery.com/ticket/12359
+ docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" +
+ "<select id='" + expando + "-\f]' msallowcapture=''>" +
+ "<option selected=''></option></select>";
+
+ // Support: IE8, Opera 11-12.16
+ // Nothing should be selected when empty strings follow ^= or $= or *=
+ // The test attribute must be unknown in Opera but "safe" for WinRT
+ // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
+ if ( div.querySelectorAll("[msallowcapture^='']").length ) {
+ rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
+ }
+
+ // Support: IE8
+ // Boolean attributes and "value" are not treated correctly
+ if ( !div.querySelectorAll("[selected]").length ) {
+ rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
+ }
+
+ // Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+
+ if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
+ rbuggyQSA.push("~=");
+ }
+
+ // Webkit/Opera - :checked should return selected option elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":checked").length ) {
+ rbuggyQSA.push(":checked");
+ }
+
+ // Support: Safari 8+, iOS 8+
+ // https://bugs.webkit.org/show_bug.cgi?id=136851
+ // In-page `selector#id sibing-combinator selector` fails
+ if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) {
+ rbuggyQSA.push(".#.+[+~]");
+ }
+ });
+
+ assert(function( div ) {
+ // Support: Windows 8 Native Apps
+ // The type and name attributes are restricted during .innerHTML assignment
+ var input = doc.createElement("input");
+ input.setAttribute( "type", "hidden" );
+ div.appendChild( input ).setAttribute( "name", "D" );
+
+ // Support: IE8
+ // Enforce case-sensitivity of name attribute
+ if ( div.querySelectorAll("[name=d]").length ) {
+ rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
+ }
+
+ // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":enabled").length ) {
+ rbuggyQSA.push( ":enabled", ":disabled" );
+ }
+
+ // Opera 10-11 does not throw on post-comma invalid pseudos
+ div.querySelectorAll("*,:x");
+ rbuggyQSA.push(",.*:");
+ });
+ }
+
+ if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
+ docElem.webkitMatchesSelector ||
+ docElem.mozMatchesSelector ||
+ docElem.oMatchesSelector ||
+ docElem.msMatchesSelector) )) ) {
+
+ assert(function( div ) {
+ // Check to see if it's possible to do matchesSelector
+ // on a disconnected node (IE 9)
+ support.disconnectedMatch = matches.call( div, "div" );
+
+ // This should fail with an exception
+ // Gecko does not error, returns false instead
+ matches.call( div, "[s!='']:x" );
+ rbuggyMatches.push( "!=", pseudos );
+ });
+ }
+
+ rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
+ rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
+
+ /* Contains
+ ---------------------------------------------------------------------- */
+ hasCompare = rnative.test( docElem.compareDocumentPosition );
+
+ // Element contains another
+ // Purposefully does not implement inclusive descendent
+ // As in, an element does not contain itself
+ contains = hasCompare || rnative.test( docElem.contains ) ?
+ function( a, b ) {
+ var adown = a.nodeType === 9 ? a.documentElement : a,
+ bup = b && b.parentNode;
+ return a === bup || !!( bup && bup.nodeType === 1 && (
+ adown.contains ?
+ adown.contains( bup ) :
+ a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+ ));
+ } :
+ function( a, b ) {
+ if ( b ) {
+ while ( (b = b.parentNode) ) {
+ if ( b === a ) {
+ return true;
+ }
+ }
+ }
+ return false;
+ };
+
+ /* Sorting
+ ---------------------------------------------------------------------- */
+
+ // Document order sorting
+ sortOrder = hasCompare ?
+ function( a, b ) {
+
+ // Flag for duplicate removal
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ // Sort on method existence if only one input has compareDocumentPosition
+ var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
+ if ( compare ) {
+ return compare;
+ }
+
+ // Calculate position if both inputs belong to the same document
+ compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
+ a.compareDocumentPosition( b ) :
+
+ // Otherwise we know they are disconnected
+ 1;
+
+ // Disconnected nodes
+ if ( compare & 1 ||
+ (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
+
+ // Choose the first element that is related to our preferred document
+ if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
+ return -1;
+ }
+ if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
+ return 1;
+ }
+
+ // Maintain original order
+ return sortInput ?
+ ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
+ 0;
+ }
+
+ return compare & 4 ? -1 : 1;
+ } :
+ function( a, b ) {
+ // Exit early if the nodes are identical
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ var cur,
+ i = 0,
+ aup = a.parentNode,
+ bup = b.parentNode,
+ ap = [ a ],
+ bp = [ b ];
+
+ // Parentless nodes are either documents or disconnected
+ if ( !aup || !bup ) {
+ return a === doc ? -1 :
+ b === doc ? 1 :
+ aup ? -1 :
+ bup ? 1 :
+ sortInput ?
+ ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
+ 0;
+
+ // If the nodes are siblings, we can do a quick check
+ } else if ( aup === bup ) {
+ return siblingCheck( a, b );
+ }
+
+ // Otherwise we need full lists of their ancestors for comparison
+ cur = a;
+ while ( (cur = cur.parentNode) ) {
+ ap.unshift( cur );
+ }
+ cur = b;
+ while ( (cur = cur.parentNode) ) {
+ bp.unshift( cur );
+ }
+
+ // Walk down the tree looking for a discrepancy
+ while ( ap[i] === bp[i] ) {
+ i++;
+ }
+
+ return i ?
+ // Do a sibling check if the nodes have a common ancestor
+ siblingCheck( ap[i], bp[i] ) :
+
+ // Otherwise nodes in our document sort first
+ ap[i] === preferredDoc ? -1 :
+ bp[i] === preferredDoc ? 1 :
+ 0;
+ };
+
+ return doc;
+};
+
+Sizzle.matches = function( expr, elements ) {
+ return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ // Make sure that attribute selectors are quoted
+ expr = expr.replace( rattributeQuotes, "='$1']" );
+
+ if ( support.matchesSelector && documentIsHTML &&
+ ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
+ ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
+
+ try {
+ var ret = matches.call( elem, expr );
+
+ // IE 9's matchesSelector returns false on disconnected nodes
+ if ( ret || support.disconnectedMatch ||
+ // As well, disconnected nodes are said to be in a document
+ // fragment in IE 9
+ elem.document && elem.document.nodeType !== 11 ) {
+ return ret;
+ }
+ } catch (e) {}
+ }
+
+ return Sizzle( expr, document, null, [ elem ] ).length > 0;
+};
+
+Sizzle.contains = function( context, elem ) {
+ // Set document vars if needed
+ if ( ( context.ownerDocument || context ) !== document ) {
+ setDocument( context );
+ }
+ return contains( context, elem );
+};
+
+Sizzle.attr = function( elem, name ) {
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ var fn = Expr.attrHandle[ name.toLowerCase() ],
+ // Don't get fooled by Object.prototype properties (jQuery #13807)
+ val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
+ fn( elem, name, !documentIsHTML ) :
+ undefined;
+
+ return val !== undefined ?
+ val :
+ support.attributes || !documentIsHTML ?
+ elem.getAttribute( name ) :
+ (val = elem.getAttributeNode(name)) && val.specified ?
+ val.value :
+ null;
+};
+
+Sizzle.error = function( msg ) {
+ throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Document sorting and removing duplicates
+ * @param {ArrayLike} results
+ */
+Sizzle.uniqueSort = function( results ) {
+ var elem,
+ duplicates = [],
+ j = 0,
+ i = 0;
+
+ // Unless we *know* we can detect duplicates, assume their presence
+ hasDuplicate = !support.detectDuplicates;
+ sortInput = !support.sortStable && results.slice( 0 );
+ results.sort( sortOrder );
+
+ if ( hasDuplicate ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem === results[ i ] ) {
+ j = duplicates.push( i );
+ }
+ }
+ while ( j-- ) {
+ results.splice( duplicates[ j ], 1 );
+ }
+ }
+
+ // Clear input after sorting to release objects
+ // See https://github.com/jquery/sizzle/pull/225
+ sortInput = null;
+
+ return results;
+};
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+ var node,
+ ret = "",
+ i = 0,
+ nodeType = elem.nodeType;
+
+ if ( !nodeType ) {
+ // If no nodeType, this is expected to be an array
+ while ( (node = elem[i++]) ) {
+ // Do not traverse comment nodes
+ ret += getText( node );
+ }
+ } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+ // Use textContent for elements
+ // innerText usage removed for consistency of new lines (jQuery #11153)
+ if ( typeof elem.textContent === "string" ) {
+ return elem.textContent;
+ } else {
+ // Traverse its children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ ret += getText( elem );
+ }
+ }
+ } else if ( nodeType === 3 || nodeType === 4 ) {
+ return elem.nodeValue;
+ }
+ // Do not include comment or processing instruction nodes
+
+ return ret;
+};
+
+Expr = Sizzle.selectors = {
+
+ // Can be adjusted by the user
+ cacheLength: 50,
+
+ createPseudo: markFunction,
+
+ match: matchExpr,
+
+ attrHandle: {},
+
+ find: {},
+
+ relative: {
+ ">": { dir: "parentNode", first: true },
+ " ": { dir: "parentNode" },
+ "+": { dir: "previousSibling", first: true },
+ "~": { dir: "previousSibling" }
+ },
+
+ preFilter: {
+ "ATTR": function( match ) {
+ match[1] = match[1].replace( runescape, funescape );
+
+ // Move the given value to match[3] whether quoted or unquoted
+ match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
+
+ if ( match[2] === "~=" ) {
+ match[3] = " " + match[3] + " ";
+ }
+
+ return match.slice( 0, 4 );
+ },
+
+ "CHILD": function( match ) {
+ /* matches from matchExpr["CHILD"]
+ 1 type (only|nth|...)
+ 2 what (child|of-type)
+ 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+ 4 xn-component of xn+y argument ([+-]?\d*n|)
+ 5 sign of xn-component
+ 6 x of xn-component
+ 7 sign of y-component
+ 8 y of y-component
+ */
+ match[1] = match[1].toLowerCase();
+
+ if ( match[1].slice( 0, 3 ) === "nth" ) {
+ // nth-* requires argument
+ if ( !match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ // numeric x and y parameters for Expr.filter.CHILD
+ // remember that false/true cast respectively to 0/1
+ match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
+ match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+
+ // other types prohibit arguments
+ } else if ( match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ return match;
+ },
+
+ "PSEUDO": function( match ) {
+ var excess,
+ unquoted = !match[6] && match[2];
+
+ if ( matchExpr["CHILD"].test( match[0] ) ) {
+ return null;
+ }
+
+ // Accept quoted arguments as-is
+ if ( match[3] ) {
+ match[2] = match[4] || match[5] || "";
+
+ // Strip excess characters from unquoted arguments
+ } else if ( unquoted && rpseudo.test( unquoted ) &&
+ // Get excess from tokenize (recursively)
+ (excess = tokenize( unquoted, true )) &&
+ // advance to the next closing parenthesis
+ (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+ // excess is a negative index
+ match[0] = match[0].slice( 0, excess );
+ match[2] = unquoted.slice( 0, excess );
+ }
+
+ // Return only captures needed by the pseudo filter method (type and argument)
+ return match.slice( 0, 3 );
+ }
+ },
+
+ filter: {
+
+ "TAG": function( nodeNameSelector ) {
+ var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
+ return nodeNameSelector === "*" ?
+ function() { return true; } :
+ function( elem ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+ };
+ },
+
+ "CLASS": function( className ) {
+ var pattern = classCache[ className + " " ];
+
+ return pattern ||
+ (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+ classCache( className, function( elem ) {
+ return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
+ });
+ },
+
+ "ATTR": function( name, operator, check ) {
+ return function( elem ) {
+ var result = Sizzle.attr( elem, name );
+
+ if ( result == null ) {
+ return operator === "!=";
+ }
+ if ( !operator ) {
+ return true;
+ }
+
+ result += "";
+
+ return operator === "=" ? result === check :
+ operator === "!=" ? result !== check :
+ operator === "^=" ? check && result.indexOf( check ) === 0 :
+ operator === "*=" ? check && result.indexOf( check ) > -1 :
+ operator === "$=" ? check && result.slice( -check.length ) === check :
+ operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
+ operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
+ false;
+ };
+ },
+
+ "CHILD": function( type, what, argument, first, last ) {
+ var simple = type.slice( 0, 3 ) !== "nth",
+ forward = type.slice( -4 ) !== "last",
+ ofType = what === "of-type";
+
+ return first === 1 && last === 0 ?
+
+ // Shortcut for :nth-*(n)
+ function( elem ) {
+ return !!elem.parentNode;
+ } :
+
+ function( elem, context, xml ) {
+ var cache, outerCache, node, diff, nodeIndex, start,
+ dir = simple !== forward ? "nextSibling" : "previousSibling",
+ parent = elem.parentNode,
+ name = ofType && elem.nodeName.toLowerCase(),
+ useCache = !xml && !ofType;
+
+ if ( parent ) {
+
+ // :(first|last|only)-(child|of-type)
+ if ( simple ) {
+ while ( dir ) {
+ node = elem;
+ while ( (node = node[ dir ]) ) {
+ if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
+ return false;
+ }
+ }
+ // Reverse direction for :only-* (if we haven't yet done so)
+ start = dir = type === "only" && !start && "nextSibling";
+ }
+ return true;
+ }
+
+ start = [ forward ? parent.firstChild : parent.lastChild ];
+
+ // non-xml :nth-child(...) stores cache data on `parent`
+ if ( forward && useCache ) {
+ // Seek `elem` from a previously-cached index
+ outerCache = parent[ expando ] || (parent[ expando ] = {});
+ cache = outerCache[ type ] || [];
+ nodeIndex = cache[0] === dirruns && cache[1];
+ diff = cache[0] === dirruns && cache[2];
+ node = nodeIndex && parent.childNodes[ nodeIndex ];
+
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+
+ // Fallback to seeking `elem` from the start
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ // When found, cache indexes on `parent` and break
+ if ( node.nodeType === 1 && ++diff && node === elem ) {
+ outerCache[ type ] = [ dirruns, nodeIndex, diff ];
+ break;
+ }
+ }
+
+ // Use previously-cached element index if available
+ } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
+ diff = cache[1];
+
+ // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
+ } else {
+ // Use the same loop as above to seek `elem` from the start
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
+ // Cache the index of each encountered element
+ if ( useCache ) {
+ (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
+ }
+
+ if ( node === elem ) {
+ break;
+ }
+ }
+ }
+ }
+
+ // Incorporate the offset, then check against cycle size
+ diff -= last;
+ return diff === first || ( diff % first === 0 && diff / first >= 0 );
+ }
+ };
+ },
+
+ "PSEUDO": function( pseudo, argument ) {
+ // pseudo-class names are case-insensitive
+ // http://www.w3.org/TR/selectors/#pseudo-classes
+ // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+ // Remember that setFilters inherits from pseudos
+ var args,
+ fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+ Sizzle.error( "unsupported pseudo: " + pseudo );
+
+ // The user may use createPseudo to indicate that
+ // arguments are needed to create the filter function
+ // just as Sizzle does
+ if ( fn[ expando ] ) {
+ return fn( argument );
+ }
+
+ // But maintain support for old signatures
+ if ( fn.length > 1 ) {
+ args = [ pseudo, pseudo, "", argument ];
+ return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+ markFunction(function( seed, matches ) {
+ var idx,
+ matched = fn( seed, argument ),
+ i = matched.length;
+ while ( i-- ) {
+ idx = indexOf( seed, matched[i] );
+ seed[ idx ] = !( matches[ idx ] = matched[i] );
+ }
+ }) :
+ function( elem ) {
+ return fn( elem, 0, args );
+ };
+ }
+
+ return fn;
+ }
+ },
+
+ pseudos: {
+ // Potentially complex pseudos
+ "not": markFunction(function( selector ) {
+ // Trim the selector passed to compile
+ // to avoid treating leading and trailing
+ // spaces as combinators
+ var input = [],
+ results = [],
+ matcher = compile( selector.replace( rtrim, "$1" ) );
+
+ return matcher[ expando ] ?
+ markFunction(function( seed, matches, context, xml ) {
+ var elem,
+ unmatched = matcher( seed, null, xml, [] ),
+ i = seed.length;
+
+ // Match elements unmatched by `matcher`
+ while ( i-- ) {
+ if ( (elem = unmatched[i]) ) {
+ seed[i] = !(matches[i] = elem);
+ }
+ }
+ }) :
+ function( elem, context, xml ) {
+ input[0] = elem;
+ matcher( input, null, xml, results );
+ // Don't keep the element (issue #299)
+ input[0] = null;
+ return !results.pop();
+ };
+ }),
+
+ "has": markFunction(function( selector ) {
+ return function( elem ) {
+ return Sizzle( selector, elem ).length > 0;
+ };
+ }),
+
+ "contains": markFunction(function( text ) {
+ text = text.replace( runescape, funescape );
+ return function( elem ) {
+ return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+ };
+ }),
+
+ // "Whether an element is represented by a :lang() selector
+ // is based solely on the element's language value
+ // being equal to the identifier C,
+ // or beginning with the identifier C immediately followed by "-".
+ // The matching of C against the element's language value is performed case-insensitively.
+ // The identifier C does not have to be a valid language name."
+ // http://www.w3.org/TR/selectors/#lang-pseudo
+ "lang": markFunction( function( lang ) {
+ // lang value must be a valid identifier
+ if ( !ridentifier.test(lang || "") ) {
+ Sizzle.error( "unsupported lang: " + lang );
+ }
+ lang = lang.replace( runescape, funescape ).toLowerCase();
+ return function( elem ) {
+ var elemLang;
+ do {
+ if ( (elemLang = documentIsHTML ?
+ elem.lang :
+ elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
+
+ elemLang = elemLang.toLowerCase();
+ return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+ }
+ } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+ return false;
+ };
+ }),
+
+ // Miscellaneous
+ "target": function( elem ) {
+ var hash = window.location && window.location.hash;
+ return hash && hash.slice( 1 ) === elem.id;
+ },
+
+ "root": function( elem ) {
+ return elem === docElem;
+ },
+
+ "focus": function( elem ) {
+ return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+ },
+
+ // Boolean properties
+ "enabled": function( elem ) {
+ return elem.disabled === false;
+ },
+
+ "disabled": function( elem ) {
+ return elem.disabled === true;
+ },
+
+ "checked": function( elem ) {
+ // In CSS3, :checked should return both checked and selected elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ var nodeName = elem.nodeName.toLowerCase();
+ return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+ },
+
+ "selected": function( elem ) {
+ // Accessing this property makes selected-by-default
+ // options in Safari work properly
+ if ( elem.parentNode ) {
+ elem.parentNode.selectedIndex;
+ }
+
+ return elem.selected === true;
+ },
+
+ // Contents
+ "empty": function( elem ) {
+ // http://www.w3.org/TR/selectors/#empty-pseudo
+ // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
+ // but not by others (comment: 8; processing instruction: 7; etc.)
+ // nodeType < 6 works because attributes (2) do not appear as children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ if ( elem.nodeType < 6 ) {
+ return false;
+ }
+ }
+ return true;
+ },
+
+ "parent": function( elem ) {
+ return !Expr.pseudos["empty"]( elem );
+ },
+
+ // Element/input types
+ "header": function( elem ) {
+ return rheader.test( elem.nodeName );
+ },
+
+ "input": function( elem ) {
+ return rinputs.test( elem.nodeName );
+ },
+
+ "button": function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === "button" || name === "button";
+ },
+
+ "text": function( elem ) {
+ var attr;
+ return elem.nodeName.toLowerCase() === "input" &&
+ elem.type === "text" &&
+
+ // Support: IE<8
+ // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
+ ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
+ },
+
+ // Position-in-collection
+ "first": createPositionalPseudo(function() {
+ return [ 0 ];
+ }),
+
+ "last": createPositionalPseudo(function( matchIndexes, length ) {
+ return [ length - 1 ];
+ }),
+
+ "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ return [ argument < 0 ? argument + length : argument ];
+ }),
+
+ "even": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 0;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "odd": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 1;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; --i >= 0; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; ++i < length; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ })
+ }
+};
+
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Add button/input type pseudos
+for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
+ Expr.pseudos[ i ] = createInputPseudo( i );
+}
+for ( i in { submit: true, reset: true } ) {
+ Expr.pseudos[ i ] = createButtonPseudo( i );
+}
+
+// Easy API for creating new setFilters
+function setFilters() {}
+setFilters.prototype = Expr.filters = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
+ var matched, match, tokens, type,
+ soFar, groups, preFilters,
+ cached = tokenCache[ selector + " " ];
+
+ if ( cached ) {
+ return parseOnly ? 0 : cached.slice( 0 );
+ }
+
+ soFar = selector;
+ groups = [];
+ preFilters = Expr.preFilter;
+
+ while ( soFar ) {
+
+ // Comma and first run
+ if ( !matched || (match = rcomma.exec( soFar )) ) {
+ if ( match ) {
+ // Don't consume trailing commas as valid
+ soFar = soFar.slice( match[0].length ) || soFar;
+ }
+ groups.push( (tokens = []) );
+ }
+
+ matched = false;
+
+ // Combinators
+ if ( (match = rcombinators.exec( soFar )) ) {
+ matched = match.shift();
+ tokens.push({
+ value: matched,
+ // Cast descendant combinators to space
+ type: match[0].replace( rtrim, " " )
+ });
+ soFar = soFar.slice( matched.length );
+ }
+
+ // Filters
+ for ( type in Expr.filter ) {
+ if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+ (match = preFilters[ type ]( match ))) ) {
+ matched = match.shift();
+ tokens.push({
+ value: matched,
+ type: type,
+ matches: match
+ });
+ soFar = soFar.slice( matched.length );
+ }
+ }
+
+ if ( !matched ) {
+ break;
+ }
+ }
+
+ // Return the length of the invalid excess
+ // if we're just parsing
+ // Otherwise, throw an error or return tokens
+ return parseOnly ?
+ soFar.length :
+ soFar ?
+ Sizzle.error( selector ) :
+ // Cache the tokens
+ tokenCache( selector, groups ).slice( 0 );
+};
+
+function toSelector( tokens ) {
+ var i = 0,
+ len = tokens.length,
+ selector = "";
+ for ( ; i < len; i++ ) {
+ selector += tokens[i].value;
+ }
+ return selector;
+}
+
+function addCombinator( matcher, combinator, base ) {
+ var dir = combinator.dir,
+ checkNonElements = base && dir === "parentNode",
+ doneName = done++;
+
+ return combinator.first ?
+ // Check against closest ancestor/preceding element
+ function( elem, context, xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ return matcher( elem, context, xml );
+ }
+ }
+ } :
+
+ // Check against all ancestor/preceding elements
+ function( elem, context, xml ) {
+ var oldCache, outerCache,
+ newCache = [ dirruns, doneName ];
+
+ // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+ if ( xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ if ( matcher( elem, context, xml ) ) {
+ return true;
+ }
+ }
+ }
+ } else {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ outerCache = elem[ expando ] || (elem[ expando ] = {});
+ if ( (oldCache = outerCache[ dir ]) &&
+ oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
+
+ // Assign to newCache so results back-propagate to previous elements
+ return (newCache[ 2 ] = oldCache[ 2 ]);
+ } else {
+ // Reuse newcache so results back-propagate to previous elements
+ outerCache[ dir ] = newCache;
+
+ // A match means we're done; a fail means we have to keep checking
+ if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ };
+}
+
+function elementMatcher( matchers ) {
+ return matchers.length > 1 ?
+ function( elem, context, xml ) {
+ var i = matchers.length;
+ while ( i-- ) {
+ if ( !matchers[i]( elem, context, xml ) ) {
+ return false;
+ }
+ }
+ return true;
+ } :
+ matchers[0];
+}
+
+function multipleContexts( selector, contexts, results ) {
+ var i = 0,
+ len = contexts.length;
+ for ( ; i < len; i++ ) {
+ Sizzle( selector, contexts[i], results );
+ }
+ return results;
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+ var elem,
+ newUnmatched = [],
+ i = 0,
+ len = unmatched.length,
+ mapped = map != null;
+
+ for ( ; i < len; i++ ) {
+ if ( (elem = unmatched[i]) ) {
+ if ( !filter || filter( elem, context, xml ) ) {
+ newUnmatched.push( elem );
+ if ( mapped ) {
+ map.push( i );
+ }
+ }
+ }
+ }
+
+ return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+ if ( postFilter && !postFilter[ expando ] ) {
+ postFilter = setMatcher( postFilter );
+ }
+ if ( postFinder && !postFinder[ expando ] ) {
+ postFinder = setMatcher( postFinder, postSelector );
+ }
+ return markFunction(function( seed, results, context, xml ) {
+ var temp, i, elem,
+ preMap = [],
+ postMap = [],
+ preexisting = results.length,
+
+ // Get initial elements from seed or context
+ elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+ // Prefilter to get matcher input, preserving a map for seed-results synchronization
+ matcherIn = preFilter && ( seed || !selector ) ?
+ condense( elems, preMap, preFilter, context, xml ) :
+ elems,
+
+ matcherOut = matcher ?
+ // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+ postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+ // ...intermediate processing is necessary
+ [] :
+
+ // ...otherwise use results directly
+ results :
+ matcherIn;
+
+ // Find primary matches
+ if ( matcher ) {
+ matcher( matcherIn, matcherOut, context, xml );
+ }
+
+ // Apply postFilter
+ if ( postFilter ) {
+ temp = condense( matcherOut, postMap );
+ postFilter( temp, [], context, xml );
+
+ // Un-match failing elements by moving them back to matcherIn
+ i = temp.length;
+ while ( i-- ) {
+ if ( (elem = temp[i]) ) {
+ matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+ }
+ }
+ }
+
+ if ( seed ) {
+ if ( postFinder || preFilter ) {
+ if ( postFinder ) {
+ // Get the final matcherOut by condensing this intermediate into postFinder contexts
+ temp = [];
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) ) {
+ // Restore matcherIn since elem is not yet a final match
+ temp.push( (matcherIn[i] = elem) );
+ }
+ }
+ postFinder( null, (matcherOut = []), temp, xml );
+ }
+
+ // Move matched elements from seed to results to keep them synchronized
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) &&
+ (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
+
+ seed[temp] = !(results[temp] = elem);
+ }
+ }
+ }
+
+ // Add elements to results, through postFinder if defined
+ } else {
+ matcherOut = condense(
+ matcherOut === results ?
+ matcherOut.splice( preexisting, matcherOut.length ) :
+ matcherOut
+ );
+ if ( postFinder ) {
+ postFinder( null, results, matcherOut, xml );
+ } else {
+ push.apply( results, matcherOut );
+ }
+ }
+ });
+}
+
+function matcherFromTokens( tokens ) {
+ var checkContext, matcher, j,
+ len = tokens.length,
+ leadingRelative = Expr.relative[ tokens[0].type ],
+ implicitRelative = leadingRelative || Expr.relative[" "],
+ i = leadingRelative ? 1 : 0,
+
+ // The foundational matcher ensures that elements are reachable from top-level context(s)
+ matchContext = addCombinator( function( elem ) {
+ return elem === checkContext;
+ }, implicitRelative, true ),
+ matchAnyContext = addCombinator( function( elem ) {
+ return indexOf( checkContext, elem ) > -1;
+ }, implicitRelative, true ),
+ matchers = [ function( elem, context, xml ) {
+ var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+ (checkContext = context).nodeType ?
+ matchContext( elem, context, xml ) :
+ matchAnyContext( elem, context, xml ) );
+ // Avoid hanging onto element (issue #299)
+ checkContext = null;
+ return ret;
+ } ];
+
+ for ( ; i < len; i++ ) {
+ if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+ matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
+ } else {
+ matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+ // Return special upon seeing a positional matcher
+ if ( matcher[ expando ] ) {
+ // Find the next relative operator (if any) for proper handling
+ j = ++i;
+ for ( ; j < len; j++ ) {
+ if ( Expr.relative[ tokens[j].type ] ) {
+ break;
+ }
+ }
+ return setMatcher(
+ i > 1 && elementMatcher( matchers ),
+ i > 1 && toSelector(
+ // If the preceding token was a descendant combinator, insert an implicit any-element `*`
+ tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
+ ).replace( rtrim, "$1" ),
+ matcher,
+ i < j && matcherFromTokens( tokens.slice( i, j ) ),
+ j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+ j < len && toSelector( tokens )
+ );
+ }
+ matchers.push( matcher );
+ }
+ }
+
+ return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+ var bySet = setMatchers.length > 0,
+ byElement = elementMatchers.length > 0,
+ superMatcher = function( seed, context, xml, results, outermost ) {
+ var elem, j, matcher,
+ matchedCount = 0,
+ i = "0",
+ unmatched = seed && [],
+ setMatched = [],
+ contextBackup = outermostContext,
+ // We must always have either seed elements or outermost context
+ elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
+ // Use integer dirruns iff this is the outermost matcher
+ dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
+ len = elems.length;
+
+ if ( outermost ) {
+ outermostContext = context !== document && context;
+ }
+
+ // Add elements passing elementMatchers directly to results
+ // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
+ // Support: IE<9, Safari
+ // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
+ for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
+ if ( byElement && elem ) {
+ j = 0;
+ while ( (matcher = elementMatchers[j++]) ) {
+ if ( matcher( elem, context, xml ) ) {
+ results.push( elem );
+ break;
+ }
+ }
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ }
+ }
+
+ // Track unmatched elements for set filters
+ if ( bySet ) {
+ // They will have gone through all possible matchers
+ if ( (elem = !matcher && elem) ) {
+ matchedCount--;
+ }
+
+ // Lengthen the array for every element, matched or not
+ if ( seed ) {
+ unmatched.push( elem );
+ }
+ }
+ }
+
+ // Apply set filters to unmatched elements
+ matchedCount += i;
+ if ( bySet && i !== matchedCount ) {
+ j = 0;
+ while ( (matcher = setMatchers[j++]) ) {
+ matcher( unmatched, setMatched, context, xml );
+ }
+
+ if ( seed ) {
+ // Reintegrate element matches to eliminate the need for sorting
+ if ( matchedCount > 0 ) {
+ while ( i-- ) {
+ if ( !(unmatched[i] || setMatched[i]) ) {
+ setMatched[i] = pop.call( results );
+ }
+ }
+ }
+
+ // Discard index placeholder values to get only actual matches
+ setMatched = condense( setMatched );
+ }
+
+ // Add matches to results
+ push.apply( results, setMatched );
+
+ // Seedless set matches succeeding multiple successful matchers stipulate sorting
+ if ( outermost && !seed && setMatched.length > 0 &&
+ ( matchedCount + setMatchers.length ) > 1 ) {
+
+ Sizzle.uniqueSort( results );
+ }
+ }
+
+ // Override manipulation of globals by nested matchers
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ outermostContext = contextBackup;
+ }
+
+ return unmatched;
+ };
+
+ return bySet ?
+ markFunction( superMatcher ) :
+ superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
+ var i,
+ setMatchers = [],
+ elementMatchers = [],
+ cached = compilerCache[ selector + " " ];
+
+ if ( !cached ) {
+ // Generate a function of recursive functions that can be used to check each element
+ if ( !match ) {
+ match = tokenize( selector );
+ }
+ i = match.length;
+ while ( i-- ) {
+ cached = matcherFromTokens( match[i] );
+ if ( cached[ expando ] ) {
+ setMatchers.push( cached );
+ } else {
+ elementMatchers.push( cached );
+ }
+ }
+
+ // Cache the compiled function
+ cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+
+ // Save selector and tokenization
+ cached.selector = selector;
+ }
+ return cached;
+};
+
+/**
+ * A low-level selection function that works with Sizzle's compiled
+ * selector functions
+ * @param {String|Function} selector A selector or a pre-compiled
+ * selector function built with Sizzle.compile
+ * @param {Element} context
+ * @param {Array} [results]
+ * @param {Array} [seed] A set of elements to match against
+ */
+select = Sizzle.select = function( selector, context, results, seed ) {
+ var i, tokens, token, type, find,
+ compiled = typeof selector === "function" && selector,
+ match = !seed && tokenize( (selector = compiled.selector || selector) );
+
+ results = results || [];
+
+ // Try to minimize operations if there is no seed and only one group
+ if ( match.length === 1 ) {
+
+ // Take a shortcut and set the context if the root selector is an ID
+ tokens = match[0] = match[0].slice( 0 );
+ if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+ support.getById && context.nodeType === 9 && documentIsHTML &&
+ Expr.relative[ tokens[1].type ] ) {
+
+ context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
+ if ( !context ) {
+ return results;
+
+ // Precompiled matchers will still verify ancestry, so step up a level
+ } else if ( compiled ) {
+ context = context.parentNode;
+ }
+
+ selector = selector.slice( tokens.shift().value.length );
+ }
+
+ // Fetch a seed set for right-to-left matching
+ i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+ while ( i-- ) {
+ token = tokens[i];
+
+ // Abort if we hit a combinator
+ if ( Expr.relative[ (type = token.type) ] ) {
+ break;
+ }
+ if ( (find = Expr.find[ type ]) ) {
+ // Search, expanding context for leading sibling combinators
+ if ( (seed = find(
+ token.matches[0].replace( runescape, funescape ),
+ rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
+ )) ) {
+
+ // If seed is empty or no tokens remain, we can return early
+ tokens.splice( i, 1 );
+ selector = seed.length && toSelector( tokens );
+ if ( !selector ) {
+ push.apply( results, seed );
+ return results;
+ }
+
+ break;
+ }
+ }
+ }
+ }
+
+ // Compile and execute a filtering function if one is not provided
+ // Provide `match` to avoid retokenization if we modified the selector above
+ ( compiled || compile( selector, match ) )(
+ seed,
+ context,
+ !documentIsHTML,
+ results,
+ rsibling.test( selector ) && testContext( context.parentNode ) || context
+ );
+ return results;
+};
+
+// One-time assignments
+
+// Sort stability
+support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
+
+// Support: Chrome 14-35+
+// Always assume duplicates if they aren't passed to the comparison function
+support.detectDuplicates = !!hasDuplicate;
+
+// Initialize against the default document
+setDocument();
+
+// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
+// Detached nodes confoundingly follow *each other*
+support.sortDetached = assert(function( div1 ) {
+ // Should return 1, but returns 4 (following)
+ return div1.compareDocumentPosition( document.createElement("div") ) & 1;
+});
+
+// Support: IE<8
+// Prevent attribute/property "interpolation"
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !assert(function( div ) {
+ div.innerHTML = "<a href='#'></a>";
+ return div.firstChild.getAttribute("href") === "#" ;
+}) ) {
+ addHandle( "type|href|height|width", function( elem, name, isXML ) {
+ if ( !isXML ) {
+ return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
+ }
+ });
+}
+
+// Support: IE<9
+// Use defaultValue in place of getAttribute("value")
+if ( !support.attributes || !assert(function( div ) {
+ div.innerHTML = "<input/>";
+ div.firstChild.setAttribute( "value", "" );
+ return div.firstChild.getAttribute( "value" ) === "";
+}) ) {
+ addHandle( "value", function( elem, name, isXML ) {
+ if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
+ return elem.defaultValue;
+ }
+ });
+}
+
+// Support: IE<9
+// Use getAttributeNode to fetch booleans when getAttribute lies
+if ( !assert(function( div ) {
+ return div.getAttribute("disabled") == null;
+}) ) {
+ addHandle( booleans, function( elem, name, isXML ) {
+ var val;
+ if ( !isXML ) {
+ return elem[ name ] === true ? name.toLowerCase() :
+ (val = elem.getAttributeNode( name )) && val.specified ?
+ val.value :
+ null;
+ }
+ });
+}
+
+return Sizzle;
+
+})( window );
+
+
+
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.pseudos;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+
+var rneedsContext = jQuery.expr.match.needsContext;
+
+var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/);
+
+
+
+var risSimple = /^.[^:#\[\.,]*$/;
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, not ) {
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep( elements, function( elem, i ) {
+ /* jshint -W018 */
+ return !!qualifier.call( elem, i, elem ) !== not;
+ });
+
+ }
+
+ if ( qualifier.nodeType ) {
+ return jQuery.grep( elements, function( elem ) {
+ return ( elem === qualifier ) !== not;
+ });
+
+ }
+
+ if ( typeof qualifier === "string" ) {
+ if ( risSimple.test( qualifier ) ) {
+ return jQuery.filter( qualifier, elements, not );
+ }
+
+ qualifier = jQuery.filter( qualifier, elements );
+ }
+
+ return jQuery.grep( elements, function( elem ) {
+ return ( indexOf.call( qualifier, elem ) >= 0 ) !== not;
+ });
+}
+
+jQuery.filter = function( expr, elems, not ) {
+ var elem = elems[ 0 ];
+
+ if ( not ) {
+ expr = ":not(" + expr + ")";
+ }
+
+ return elems.length === 1 && elem.nodeType === 1 ?
+ jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
+ jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
+ return elem.nodeType === 1;
+ }));
+};
+
+jQuery.fn.extend({
+ find: function( selector ) {
+ var i,
+ len = this.length,
+ ret = [],
+ self = this;
+
+ if ( typeof selector !== "string" ) {
+ return this.pushStack( jQuery( selector ).filter(function() {
+ for ( i = 0; i < len; i++ ) {
+ if ( jQuery.contains( self[ i ], this ) ) {
+ return true;
+ }
+ }
+ }) );
+ }
+
+ for ( i = 0; i < len; i++ ) {
+ jQuery.find( selector, self[ i ], ret );
+ }
+
+ // Needed because $( selector, context ) becomes $( context ).find( selector )
+ ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
+ ret.selector = this.selector ? this.selector + " " + selector : selector;
+ return ret;
+ },
+ filter: function( selector ) {
+ return this.pushStack( winnow(this, selector || [], false) );
+ },
+ not: function( selector ) {
+ return this.pushStack( winnow(this, selector || [], true) );
+ },
+ is: function( selector ) {
+ return !!winnow(
+ this,
+
+ // If this is a positional/relative selector, check membership in the returned set
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
+ typeof selector === "string" && rneedsContext.test( selector ) ?
+ jQuery( selector ) :
+ selector || [],
+ false
+ ).length;
+ }
+});
+
+
+// Initialize a jQuery object
+
+
+// A central reference to the root jQuery(document)
+var rootjQuery,
+
+ // A simple way to check for HTML strings
+ // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+ // Strict HTML recognition (#11290: must start with <)
+ rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
+
+ init = jQuery.fn.init = function( selector, context ) {
+ var match, elem;
+
+ // HANDLE: $(""), $(null), $(undefined), $(false)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) {
+ // Assume that strings that start and end with <> are HTML and skip the regex check
+ match = [ null, selector, null ];
+
+ } else {
+ match = rquickExpr.exec( selector );
+ }
+
+ // Match html or make sure no context is specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] ) {
+ context = context instanceof jQuery ? context[0] : context;
+
+ // Option to run scripts is true for back-compat
+ // Intentionally let the error be thrown if parseHTML is not present
+ jQuery.merge( this, jQuery.parseHTML(
+ match[1],
+ context && context.nodeType ? context.ownerDocument || context : document,
+ true
+ ) );
+
+ // HANDLE: $(html, props)
+ if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
+ for ( match in context ) {
+ // Properties of context are called as methods if possible
+ if ( jQuery.isFunction( this[ match ] ) ) {
+ this[ match ]( context[ match ] );
+
+ // ...and otherwise set as attributes
+ } else {
+ this.attr( match, context[ match ] );
+ }
+ }
+ }
+
+ return this;
+
+ // HANDLE: $(#id)
+ } else {
+ elem = document.getElementById( match[2] );
+
+ // Support: Blackberry 4.6
+ // gEBID returns nodes no longer in the document (#6963)
+ if ( elem && elem.parentNode ) {
+ // Inject the element directly into the jQuery object
+ this.length = 1;
+ this[0] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return ( context || rootjQuery ).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return this.constructor( context ).find( selector );
+ }
+
+ // HANDLE: $(DOMElement)
+ } else if ( selector.nodeType ) {
+ this.context = this[0] = selector;
+ this.length = 1;
+ return this;
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return typeof rootjQuery.ready !== "undefined" ?
+ rootjQuery.ready( selector ) :
+ // Execute immediately if ready is not present
+ selector( jQuery );
+ }
+
+ if ( selector.selector !== undefined ) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.makeArray( selector, this );
+ };
+
+// Give the init function the jQuery prototype for later instantiation
+init.prototype = jQuery.fn;
+
+// Initialize central reference
+rootjQuery = jQuery( document );
+
+
+var rparentsprev = /^(?:parents|prev(?:Until|All))/,
+ // Methods guaranteed to produce a unique set when starting from a unique set
+ guaranteedUnique = {
+ children: true,
+ contents: true,
+ next: true,
+ prev: true
+ };
+
+jQuery.extend({
+ dir: function( elem, dir, until ) {
+ var matched = [],
+ truncate = until !== undefined;
+
+ while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) {
+ if ( elem.nodeType === 1 ) {
+ if ( truncate && jQuery( elem ).is( until ) ) {
+ break;
+ }
+ matched.push( elem );
+ }
+ }
+ return matched;
+ },
+
+ sibling: function( n, elem ) {
+ var matched = [];
+
+ for ( ; n; n = n.nextSibling ) {
+ if ( n.nodeType === 1 && n !== elem ) {
+ matched.push( n );
+ }
+ }
+
+ return matched;
+ }
+});
+
+jQuery.fn.extend({
+ has: function( target ) {
+ var targets = jQuery( target, this ),
+ l = targets.length;
+
+ return this.filter(function() {
+ var i = 0;
+ for ( ; i < l; i++ ) {
+ if ( jQuery.contains( this, targets[i] ) ) {
+ return true;
+ }
+ }
+ });
+ },
+
+ closest: function( selectors, context ) {
+ var cur,
+ i = 0,
+ l = this.length,
+ matched = [],
+ pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
+ jQuery( selectors, context || this.context ) :
+ 0;
+
+ for ( ; i < l; i++ ) {
+ for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
+ // Always skip document fragments
+ if ( cur.nodeType < 11 && (pos ?
+ pos.index(cur) > -1 :
+
+ // Don't pass non-elements to Sizzle
+ cur.nodeType === 1 &&
+ jQuery.find.matchesSelector(cur, selectors)) ) {
+
+ matched.push( cur );
+ break;
+ }
+ }
+ }
+
+ return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched );
+ },
+
+ // Determine the position of an element within the set
+ index: function( elem ) {
+
+ // No argument, return index in parent
+ if ( !elem ) {
+ return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
+ }
+
+ // Index in selector
+ if ( typeof elem === "string" ) {
+ return indexOf.call( jQuery( elem ), this[ 0 ] );
+ }
+
+ // Locate the position of the desired element
+ return indexOf.call( this,
+
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[ 0 ] : elem
+ );
+ },
+
+ add: function( selector, context ) {
+ return this.pushStack(
+ jQuery.unique(
+ jQuery.merge( this.get(), jQuery( selector, context ) )
+ )
+ );
+ },
+
+ addBack: function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter(selector)
+ );
+ }
+});
+
+function sibling( cur, dir ) {
+ while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {}
+ return cur;
+}
+
+jQuery.each({
+ parent: function( elem ) {
+ var parent = elem.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
+ },
+ parents: function( elem ) {
+ return jQuery.dir( elem, "parentNode" );
+ },
+ parentsUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "parentNode", until );
+ },
+ next: function( elem ) {
+ return sibling( elem, "nextSibling" );
+ },
+ prev: function( elem ) {
+ return sibling( elem, "previousSibling" );
+ },
+ nextAll: function( elem ) {
+ return jQuery.dir( elem, "nextSibling" );
+ },
+ prevAll: function( elem ) {
+ return jQuery.dir( elem, "previousSibling" );
+ },
+ nextUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "nextSibling", until );
+ },
+ prevUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "previousSibling", until );
+ },
+ siblings: function( elem ) {
+ return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
+ },
+ children: function( elem ) {
+ return jQuery.sibling( elem.firstChild );
+ },
+ contents: function( elem ) {
+ return elem.contentDocument || jQuery.merge( [], elem.childNodes );
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function( until, selector ) {
+ var matched = jQuery.map( this, fn, until );
+
+ if ( name.slice( -5 ) !== "Until" ) {
+ selector = until;
+ }
+
+ if ( selector && typeof selector === "string" ) {
+ matched = jQuery.filter( selector, matched );
+ }
+
+ if ( this.length > 1 ) {
+ // Remove duplicates
+ if ( !guaranteedUnique[ name ] ) {
+ jQuery.unique( matched );
+ }
+
+ // Reverse order for parents* and prev-derivatives
+ if ( rparentsprev.test( name ) ) {
+ matched.reverse();
+ }
+ }
+
+ return this.pushStack( matched );
+ };
+});
+var rnotwhite = (/\S+/g);
+
+
+
+// String to Object options format cache
+var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+function createOptions( options ) {
+ var object = optionsCache[ options ] = {};
+ jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
+ object[ flag ] = true;
+ });
+ return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ * options: an optional list of space-separated options that will change how
+ * the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ * once: will ensure the callback list can only be fired once (like a Deferred)
+ *
+ * memory: will keep track of previous values and will call any callback added
+ * after the list has been fired right away with the latest "memorized"
+ * values (like a Deferred)
+ *
+ * unique: will ensure a callback can only be added once (no duplicate in the list)
+ *
+ * stopOnFalse: interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+ // Convert options from String-formatted to Object-formatted if needed
+ // (we check in cache first)
+ options = typeof options === "string" ?
+ ( optionsCache[ options ] || createOptions( options ) ) :
+ jQuery.extend( {}, options );
+
+ var // Last fire value (for non-forgettable lists)
+ memory,
+ // Flag to know if list was already fired
+ fired,
+ // Flag to know if list is currently firing
+ firing,
+ // First callback to fire (used internally by add and fireWith)
+ firingStart,
+ // End of the loop when firing
+ firingLength,
+ // Index of currently firing callback (modified by remove if needed)
+ firingIndex,
+ // Actual callback list
+ list = [],
+ // Stack of fire calls for repeatable lists
+ stack = !options.once && [],
+ // Fire callbacks
+ fire = function( data ) {
+ memory = options.memory && data;
+ fired = true;
+ firingIndex = firingStart || 0;
+ firingStart = 0;
+ firingLength = list.length;
+ firing = true;
+ for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+ if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
+ memory = false; // To prevent further calls using add
+ break;
+ }
+ }
+ firing = false;
+ if ( list ) {
+ if ( stack ) {
+ if ( stack.length ) {
+ fire( stack.shift() );
+ }
+ } else if ( memory ) {
+ list = [];
+ } else {
+ self.disable();
+ }
+ }
+ },
+ // Actual Callbacks object
+ self = {
+ // Add a callback or a collection of callbacks to the list
+ add: function() {
+ if ( list ) {
+ // First, we save the current length
+ var start = list.length;
+ (function add( args ) {
+ jQuery.each( args, function( _, arg ) {
+ var type = jQuery.type( arg );
+ if ( type === "function" ) {
+ if ( !options.unique || !self.has( arg ) ) {
+ list.push( arg );
+ }
+ } else if ( arg && arg.length && type !== "string" ) {
+ // Inspect recursively
+ add( arg );
+ }
+ });
+ })( arguments );
+ // Do we need to add the callbacks to the
+ // current firing batch?
+ if ( firing ) {
+ firingLength = list.length;
+ // With memory, if we're not firing then
+ // we should call right away
+ } else if ( memory ) {
+ firingStart = start;
+ fire( memory );
+ }
+ }
+ return this;
+ },
+ // Remove a callback from the list
+ remove: function() {
+ if ( list ) {
+ jQuery.each( arguments, function( _, arg ) {
+ var index;
+ while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+ list.splice( index, 1 );
+ // Handle firing indexes
+ if ( firing ) {
+ if ( index <= firingLength ) {
+ firingLength--;
+ }
+ if ( index <= firingIndex ) {
+ firingIndex--;
+ }
+ }
+ }
+ });
+ }
+ return this;
+ },
+ // Check if a given callback is in the list.
+ // If no argument is given, return whether or not list has callbacks attached.
+ has: function( fn ) {
+ return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
+ },
+ // Remove all callbacks from the list
+ empty: function() {
+ list = [];
+ firingLength = 0;
+ return this;
+ },
+ // Have the list do nothing anymore
+ disable: function() {
+ list = stack = memory = undefined;
+ return this;
+ },
+ // Is it disabled?
+ disabled: function() {
+ return !list;
+ },
+ // Lock the list in its current state
+ lock: function() {
+ stack = undefined;
+ if ( !memory ) {
+ self.disable();
+ }
+ return this;
+ },
+ // Is it locked?
+ locked: function() {
+ return !stack;
+ },
+ // Call all callbacks with the given context and arguments
+ fireWith: function( context, args ) {
+ if ( list && ( !fired || stack ) ) {
+ args = args || [];
+ args = [ context, args.slice ? args.slice() : args ];
+ if ( firing ) {
+ stack.push( args );
+ } else {
+ fire( args );
+ }
+ }
+ return this;
+ },
+ // Call all the callbacks with the given arguments
+ fire: function() {
+ self.fireWith( this, arguments );
+ return this;
+ },
+ // To know if the callbacks have already been called at least once
+ fired: function() {
+ return !!fired;
+ }
+ };
+
+ return self;
+};
+
+
+jQuery.extend({
+
+ Deferred: function( func ) {
+ var tuples = [
+ // action, add listener, listener list, final state
+ [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
+ [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
+ [ "notify", "progress", jQuery.Callbacks("memory") ]
+ ],
+ state = "pending",
+ promise = {
+ state: function() {
+ return state;
+ },
+ always: function() {
+ deferred.done( arguments ).fail( arguments );
+ return this;
+ },
+ then: function( /* fnDone, fnFail, fnProgress */ ) {
+ var fns = arguments;
+ return jQuery.Deferred(function( newDefer ) {
+ jQuery.each( tuples, function( i, tuple ) {
+ var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
+ // deferred[ done | fail | progress ] for forwarding actions to newDefer
+ deferred[ tuple[1] ](function() {
+ var returned = fn && fn.apply( this, arguments );
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
+ returned.promise()
+ .done( newDefer.resolve )
+ .fail( newDefer.reject )
+ .progress( newDefer.notify );
+ } else {
+ newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
+ }
+ });
+ });
+ fns = null;
+ }).promise();
+ },
+ // Get a promise for this deferred
+ // If obj is provided, the promise aspect is added to the object
+ promise: function( obj ) {
+ return obj != null ? jQuery.extend( obj, promise ) : promise;
+ }
+ },
+ deferred = {};
+
+ // Keep pipe for back-compat
+ promise.pipe = promise.then;
+
+ // Add list-specific methods
+ jQuery.each( tuples, function( i, tuple ) {
+ var list = tuple[ 2 ],
+ stateString = tuple[ 3 ];
+
+ // promise[ done | fail | progress ] = list.add
+ promise[ tuple[1] ] = list.add;
+
+ // Handle state
+ if ( stateString ) {
+ list.add(function() {
+ // state = [ resolved | rejected ]
+ state = stateString;
+
+ // [ reject_list | resolve_list ].disable; progress_list.lock
+ }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
+ }
+
+ // deferred[ resolve | reject | notify ]
+ deferred[ tuple[0] ] = function() {
+ deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
+ return this;
+ };
+ deferred[ tuple[0] + "With" ] = list.fireWith;
+ });
+
+ // Make the deferred a promise
+ promise.promise( deferred );
+
+ // Call given func if any
+ if ( func ) {
+ func.call( deferred, deferred );
+ }
+
+ // All done!
+ return deferred;
+ },
+
+ // Deferred helper
+ when: function( subordinate /* , ..., subordinateN */ ) {
+ var i = 0,
+ resolveValues = slice.call( arguments ),
+ length = resolveValues.length,
+
+ // the count of uncompleted subordinates
+ remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
+
+ // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+ deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+ // Update function for both resolve and progress values
+ updateFunc = function( i, contexts, values ) {
+ return function( value ) {
+ contexts[ i ] = this;
+ values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
+ if ( values === progressValues ) {
+ deferred.notifyWith( contexts, values );
+ } else if ( !( --remaining ) ) {
+ deferred.resolveWith( contexts, values );
+ }
+ };
+ },
+
+ progressValues, progressContexts, resolveContexts;
+
+ // Add listeners to Deferred subordinates; treat others as resolved
+ if ( length > 1 ) {
+ progressValues = new Array( length );
+ progressContexts = new Array( length );
+ resolveContexts = new Array( length );
+ for ( ; i < length; i++ ) {
+ if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
+ resolveValues[ i ].promise()
+ .done( updateFunc( i, resolveContexts, resolveValues ) )
+ .fail( deferred.reject )
+ .progress( updateFunc( i, progressContexts, progressValues ) );
+ } else {
+ --remaining;
+ }
+ }
+ }
+
+ // If we're not waiting on anything, resolve the master
+ if ( !remaining ) {
+ deferred.resolveWith( resolveContexts, resolveValues );
+ }
+
+ return deferred.promise();
+ }
+});
+
+
+// The deferred used on DOM ready
+var readyList;
+
+jQuery.fn.ready = function( fn ) {
+ // Add the callback
+ jQuery.ready.promise().done( fn );
+
+ return this;
+};
+
+jQuery.extend({
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
+
+ // Hold (or release) the ready event
+ holdReady: function( hold ) {
+ if ( hold ) {
+ jQuery.readyWait++;
+ } else {
+ jQuery.ready( true );
+ }
+ },
+
+ // Handle when the DOM is ready
+ ready: function( wait ) {
+
+ // Abort if there are pending holds or we're already ready
+ if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+ return;
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
+ // If there are functions bound, to execute
+ readyList.resolveWith( document, [ jQuery ] );
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.triggerHandler ) {
+ jQuery( document ).triggerHandler( "ready" );
+ jQuery( document ).off( "ready" );
+ }
+ }
+});
+
+/**
+ * The ready event handler and self cleanup method
+ */
+function completed() {
+ document.removeEventListener( "DOMContentLoaded", completed, false );
+ window.removeEventListener( "load", completed, false );
+ jQuery.ready();
+}
+
+jQuery.ready.promise = function( obj ) {
+ if ( !readyList ) {
+
+ readyList = jQuery.Deferred();
+
+ // Catch cases where $(document).ready() is called after the browser event has already occurred.
+ // We once tried to use readyState "interactive" here, but it caused issues like the one
+ // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+ if ( document.readyState === "complete" ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ setTimeout( jQuery.ready );
+
+ } else {
+
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", completed, false );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", completed, false );
+ }
+ }
+ return readyList.promise( obj );
+};
+
+// Kick off the DOM ready check even if the user does not
+jQuery.ready.promise();
+
+
+
+
+// Multifunctional method to get and set values of a collection
+// The value/s can optionally be executed if it's a function
+var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
+ var i = 0,
+ len = elems.length,
+ bulk = key == null;
+
+ // Sets many values
+ if ( jQuery.type( key ) === "object" ) {
+ chainable = true;
+ for ( i in key ) {
+ jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
+ }
+
+ // Sets one value
+ } else if ( value !== undefined ) {
+ chainable = true;
+
+ if ( !jQuery.isFunction( value ) ) {
+ raw = true;
+ }
+
+ if ( bulk ) {
+ // Bulk operations run against the entire set
+ if ( raw ) {
+ fn.call( elems, value );
+ fn = null;
+
+ // ...except when executing function values
+ } else {
+ bulk = fn;
+ fn = function( elem, key, value ) {
+ return bulk.call( jQuery( elem ), value );
+ };
+ }
+ }
+
+ if ( fn ) {
+ for ( ; i < len; i++ ) {
+ fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
+ }
+ }
+ }
+
+ return chainable ?
+ elems :
+
+ // Gets
+ bulk ?
+ fn.call( elems ) :
+ len ? fn( elems[0], key ) : emptyGet;
+};
+
+
+/**
+ * Determines whether an object can have data
+ */
+jQuery.acceptData = function( owner ) {
+ // Accepts only:
+ // - Node
+ // - Node.ELEMENT_NODE
+ // - Node.DOCUMENT_NODE
+ // - Object
+ // - Any
+ /* jshint -W018 */
+ return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
+};
+
+
+function Data() {
+ // Support: Android<4,
+ // Old WebKit does not have Object.preventExtensions/freeze method,
+ // return new empty object instead with no [[set]] accessor
+ Object.defineProperty( this.cache = {}, 0, {
+ get: function() {
+ return {};
+ }
+ });
+
+ this.expando = jQuery.expando + Data.uid++;
+}
+
+Data.uid = 1;
+Data.accepts = jQuery.acceptData;
+
+Data.prototype = {
+ key: function( owner ) {
+ // We can accept data for non-element nodes in modern browsers,
+ // but we should not, see #8335.
+ // Always return the key for a frozen object.
+ if ( !Data.accepts( owner ) ) {
+ return 0;
+ }
+
+ var descriptor = {},
+ // Check if the owner object already has a cache key
+ unlock = owner[ this.expando ];
+
+ // If not, create one
+ if ( !unlock ) {
+ unlock = Data.uid++;
+
+ // Secure it in a non-enumerable, non-writable property
+ try {
+ descriptor[ this.expando ] = { value: unlock };
+ Object.defineProperties( owner, descriptor );
+
+ // Support: Android<4
+ // Fallback to a less secure definition
+ } catch ( e ) {
+ descriptor[ this.expando ] = unlock;
+ jQuery.extend( owner, descriptor );
+ }
+ }
+
+ // Ensure the cache object
+ if ( !this.cache[ unlock ] ) {
+ this.cache[ unlock ] = {};
+ }
+
+ return unlock;
+ },
+ set: function( owner, data, value ) {
+ var prop,
+ // There may be an unlock assigned to this node,
+ // if there is no entry for this "owner", create one inline
+ // and set the unlock as though an owner entry had always existed
+ unlock = this.key( owner ),
+ cache = this.cache[ unlock ];
+
+ // Handle: [ owner, key, value ] args
+ if ( typeof data === "string" ) {
+ cache[ data ] = value;
+
+ // Handle: [ owner, { properties } ] args
+ } else {
+ // Fresh assignments by object are shallow copied
+ if ( jQuery.isEmptyObject( cache ) ) {
+ jQuery.extend( this.cache[ unlock ], data );
+ // Otherwise, copy the properties one-by-one to the cache object
+ } else {
+ for ( prop in data ) {
+ cache[ prop ] = data[ prop ];
+ }
+ }
+ }
+ return cache;
+ },
+ get: function( owner, key ) {
+ // Either a valid cache is found, or will be created.
+ // New caches will be created and the unlock returned,
+ // allowing direct access to the newly created
+ // empty data object. A valid owner object must be provided.
+ var cache = this.cache[ this.key( owner ) ];
+
+ return key === undefined ?
+ cache : cache[ key ];
+ },
+ access: function( owner, key, value ) {
+ var stored;
+ // In cases where either:
+ //
+ // 1. No key was specified
+ // 2. A string key was specified, but no value provided
+ //
+ // Take the "read" path and allow the get method to determine
+ // which value to return, respectively either:
+ //
+ // 1. The entire cache object
+ // 2. The data stored at the key
+ //
+ if ( key === undefined ||
+ ((key && typeof key === "string") && value === undefined) ) {
+
+ stored = this.get( owner, key );
+
+ return stored !== undefined ?
+ stored : this.get( owner, jQuery.camelCase(key) );
+ }
+
+ // [*]When the key is not a string, or both a key and value
+ // are specified, set or extend (existing objects) with either:
+ //
+ // 1. An object of properties
+ // 2. A key and value
+ //
+ this.set( owner, key, value );
+
+ // Since the "set" path can have two possible entry points
+ // return the expected data based on which path was taken[*]
+ return value !== undefined ? value : key;
+ },
+ remove: function( owner, key ) {
+ var i, name, camel,
+ unlock = this.key( owner ),
+ cache = this.cache[ unlock ];
+
+ if ( key === undefined ) {
+ this.cache[ unlock ] = {};
+
+ } else {
+ // Support array or space separated string of keys
+ if ( jQuery.isArray( key ) ) {
+ // If "name" is an array of keys...
+ // When data is initially created, via ("key", "val") signature,
+ // keys will be converted to camelCase.
+ // Since there is no way to tell _how_ a key was added, remove
+ // both plain key and camelCase key. #12786
+ // This will only penalize the array argument path.
+ name = key.concat( key.map( jQuery.camelCase ) );
+ } else {
+ camel = jQuery.camelCase( key );
+ // Try the string as a key before any manipulation
+ if ( key in cache ) {
+ name = [ key, camel ];
+ } else {
+ // If a key with the spaces exists, use it.
+ // Otherwise, create an array by matching non-whitespace
+ name = camel;
+ name = name in cache ?
+ [ name ] : ( name.match( rnotwhite ) || [] );
+ }
+ }
+
+ i = name.length;
+ while ( i-- ) {
+ delete cache[ name[ i ] ];
+ }
+ }
+ },
+ hasData: function( owner ) {
+ return !jQuery.isEmptyObject(
+ this.cache[ owner[ this.expando ] ] || {}
+ );
+ },
+ discard: function( owner ) {
+ if ( owner[ this.expando ] ) {
+ delete this.cache[ owner[ this.expando ] ];
+ }
+ }
+};
+var data_priv = new Data();
+
+var data_user = new Data();
+
+
+
+// Implementation Summary
+//
+// 1. Enforce API surface and semantic compatibility with 1.9.x branch
+// 2. Improve the module's maintainability by reducing the storage
+// paths to a single mechanism.
+// 3. Use the same single mechanism to support "private" and "user" data.
+// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
+// 5. Avoid exposing implementation details on user objects (eg. expando properties)
+// 6. Provide a clear path for implementation upgrade to WeakMap in 2014
+
+var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
+ rmultiDash = /([A-Z])/g;
+
+function dataAttr( elem, key, data ) {
+ var name;
+
+ // If nothing was found internally, try to fetch any
+ // data from the HTML5 data-* attribute
+ if ( data === undefined && elem.nodeType === 1 ) {
+ name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+ data = elem.getAttribute( name );
+
+ if ( typeof data === "string" ) {
+ try {
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null :
+ // Only convert to a number if it doesn't change the string
+ +data + "" === data ? +data :
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
+ data;
+ } catch( e ) {}
+
+ // Make sure we set the data so it isn't changed later
+ data_user.set( elem, key, data );
+ } else {
+ data = undefined;
+ }
+ }
+ return data;
+}
+
+jQuery.extend({
+ hasData: function( elem ) {
+ return data_user.hasData( elem ) || data_priv.hasData( elem );
+ },
+
+ data: function( elem, name, data ) {
+ return data_user.access( elem, name, data );
+ },
+
+ removeData: function( elem, name ) {
+ data_user.remove( elem, name );
+ },
+
+ // TODO: Now that all calls to _data and _removeData have been replaced
+ // with direct calls to data_priv methods, these can be deprecated.
+ _data: function( elem, name, data ) {
+ return data_priv.access( elem, name, data );
+ },
+
+ _removeData: function( elem, name ) {
+ data_priv.remove( elem, name );
+ }
+});
+
+jQuery.fn.extend({
+ data: function( key, value ) {
+ var i, name, data,
+ elem = this[ 0 ],
+ attrs = elem && elem.attributes;
+
+ // Gets all values
+ if ( key === undefined ) {
+ if ( this.length ) {
+ data = data_user.get( elem );
+
+ if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) {
+ i = attrs.length;
+ while ( i-- ) {
+
+ // Support: IE11+
+ // The attrs elements can be null (#14894)
+ if ( attrs[ i ] ) {
+ name = attrs[ i ].name;
+ if ( name.indexOf( "data-" ) === 0 ) {
+ name = jQuery.camelCase( name.slice(5) );
+ dataAttr( elem, name, data[ name ] );
+ }
+ }
+ }
+ data_priv.set( elem, "hasDataAttrs", true );
+ }
+ }
+
+ return data;
+ }
+
+ // Sets multiple values
+ if ( typeof key === "object" ) {
+ return this.each(function() {
+ data_user.set( this, key );
+ });
+ }
+
+ return access( this, function( value ) {
+ var data,
+ camelKey = jQuery.camelCase( key );
+
+ // The calling jQuery object (element matches) is not empty
+ // (and therefore has an element appears at this[ 0 ]) and the
+ // `value` parameter was not undefined. An empty jQuery object
+ // will result in `undefined` for elem = this[ 0 ] which will
+ // throw an exception if an attempt to read a data cache is made.
+ if ( elem && value === undefined ) {
+ // Attempt to get data from the cache
+ // with the key as-is
+ data = data_user.get( elem, key );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // Attempt to get data from the cache
+ // with the key camelized
+ data = data_user.get( elem, camelKey );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // Attempt to "discover" the data in
+ // HTML5 custom data-* attrs
+ data = dataAttr( elem, camelKey, undefined );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // We tried really hard, but the data doesn't exist.
+ return;
+ }
+
+ // Set the data...
+ this.each(function() {
+ // First, attempt to store a copy or reference of any
+ // data that might've been store with a camelCased key.
+ var data = data_user.get( this, camelKey );
+
+ // For HTML5 data-* attribute interop, we have to
+ // store property names with dashes in a camelCase form.
+ // This might not apply to all properties...*
+ data_user.set( this, camelKey, value );
+
+ // *... In the case of properties that might _actually_
+ // have dashes, we need to also store a copy of that
+ // unchanged property.
+ if ( key.indexOf("-") !== -1 && data !== undefined ) {
+ data_user.set( this, key, value );
+ }
+ });
+ }, null, value, arguments.length > 1, null, true );
+ },
+
+ removeData: function( key ) {
+ return this.each(function() {
+ data_user.remove( this, key );
+ });
+ }
+});
+
+
+jQuery.extend({
+ queue: function( elem, type, data ) {
+ var queue;
+
+ if ( elem ) {
+ type = ( type || "fx" ) + "queue";
+ queue = data_priv.get( elem, type );
+
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( data ) {
+ if ( !queue || jQuery.isArray( data ) ) {
+ queue = data_priv.access( elem, type, jQuery.makeArray(data) );
+ } else {
+ queue.push( data );
+ }
+ }
+ return queue || [];
+ }
+ },
+
+ dequeue: function( elem, type ) {
+ type = type || "fx";
+
+ var queue = jQuery.queue( elem, type ),
+ startLength = queue.length,
+ fn = queue.shift(),
+ hooks = jQuery._queueHooks( elem, type ),
+ next = function() {
+ jQuery.dequeue( elem, type );
+ };
+
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
+ startLength--;
+ }
+
+ if ( fn ) {
+
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift( "inprogress" );
+ }
+
+ // Clear up the last queue stop function
+ delete hooks.stop;
+ fn.call( elem, next, hooks );
+ }
+
+ if ( !startLength && hooks ) {
+ hooks.empty.fire();
+ }
+ },
+
+ // Not public - generate a queueHooks object, or return the current one
+ _queueHooks: function( elem, type ) {
+ var key = type + "queueHooks";
+ return data_priv.get( elem, key ) || data_priv.access( elem, key, {
+ empty: jQuery.Callbacks("once memory").add(function() {
+ data_priv.remove( elem, [ type + "queue", key ] );
+ })
+ });
+ }
+});
+
+jQuery.fn.extend({
+ queue: function( type, data ) {
+ var setter = 2;
+
+ if ( typeof type !== "string" ) {
+ data = type;
+ type = "fx";
+ setter--;
+ }
+
+ if ( arguments.length < setter ) {
+ return jQuery.queue( this[0], type );
+ }
+
+ return data === undefined ?
+ this :
+ this.each(function() {
+ var queue = jQuery.queue( this, type, data );
+
+ // Ensure a hooks for this queue
+ jQuery._queueHooks( this, type );
+
+ if ( type === "fx" && queue[0] !== "inprogress" ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ dequeue: function( type ) {
+ return this.each(function() {
+ jQuery.dequeue( this, type );
+ });
+ },
+ clearQueue: function( type ) {
+ return this.queue( type || "fx", [] );
+ },
+ // Get a promise resolved when queues of a certain type
+ // are emptied (fx is the type by default)
+ promise: function( type, obj ) {
+ var tmp,
+ count = 1,
+ defer = jQuery.Deferred(),
+ elements = this,
+ i = this.length,
+ resolve = function() {
+ if ( !( --count ) ) {
+ defer.resolveWith( elements, [ elements ] );
+ }
+ };
+
+ if ( typeof type !== "string" ) {
+ obj = type;
+ type = undefined;
+ }
+ type = type || "fx";
+
+ while ( i-- ) {
+ tmp = data_priv.get( elements[ i ], type + "queueHooks" );
+ if ( tmp && tmp.empty ) {
+ count++;
+ tmp.empty.add( resolve );
+ }
+ }
+ resolve();
+ return defer.promise( obj );
+ }
+});
+var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;
+
+var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
+
+var isHidden = function( elem, el ) {
+ // isHidden might be called from jQuery#filter function;
+ // in that case, element will be second argument
+ elem = el || elem;
+ return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
+ };
+
+var rcheckableType = (/^(?:checkbox|radio)$/i);
+
+
+
+(function() {
+ var fragment = document.createDocumentFragment(),
+ div = fragment.appendChild( document.createElement( "div" ) ),
+ input = document.createElement( "input" );
+
+ // Support: Safari<=5.1
+ // Check state lost if the name is set (#11217)
+ // Support: Windows Web Apps (WWA)
+ // `name` and `type` must use .setAttribute for WWA (#14901)
+ input.setAttribute( "type", "radio" );
+ input.setAttribute( "checked", "checked" );
+ input.setAttribute( "name", "t" );
+
+ div.appendChild( input );
+
+ // Support: Safari<=5.1, Android<4.2
+ // Older WebKit doesn't clone checked state correctly in fragments
+ support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+ // Support: IE<=11+
+ // Make sure textarea (and checkbox) defaultValue is properly cloned
+ div.innerHTML = "<textarea>x</textarea>";
+ support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
+})();
+var strundefined = typeof undefined;
+
+
+
+support.focusinBubbles = "onfocusin" in window;
+
+
+var
+ rkeyEvent = /^key/,
+ rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/,
+ rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+ rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
+
+function returnTrue() {
+ return true;
+}
+
+function returnFalse() {
+ return false;
+}
+
+function safeActiveElement() {
+ try {
+ return document.activeElement;
+ } catch ( err ) { }
+}
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+ global: {},
+
+ add: function( elem, types, handler, data, selector ) {
+
+ var handleObjIn, eventHandle, tmp,
+ events, t, handleObj,
+ special, handlers, type, namespaces, origType,
+ elemData = data_priv.get( elem );
+
+ // Don't attach events to noData or text/comment nodes (but allow plain objects)
+ if ( !elemData ) {
+ return;
+ }
+
+ // Caller can pass in an object of custom data in lieu of the handler
+ if ( handler.handler ) {
+ handleObjIn = handler;
+ handler = handleObjIn.handler;
+ selector = handleObjIn.selector;
+ }
+
+ // Make sure that the handler has a unique ID, used to find/remove it later
+ if ( !handler.guid ) {
+ handler.guid = jQuery.guid++;
+ }
+
+ // Init the element's event structure and main handler, if this is the first
+ if ( !(events = elemData.events) ) {
+ events = elemData.events = {};
+ }
+ if ( !(eventHandle = elemData.handle) ) {
+ eventHandle = elemData.handle = function( e ) {
+ // Discard the second event of a jQuery.event.trigger() and
+ // when an event is called after a page has unloaded
+ return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ?
+ jQuery.event.dispatch.apply( elem, arguments ) : undefined;
+ };
+ }
+
+ // Handle multiple events separated by a space
+ types = ( types || "" ).match( rnotwhite ) || [ "" ];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tmp[1];
+ namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+ // There *must* be a type, no attaching namespace-only handlers
+ if ( !type ) {
+ continue;
+ }
+
+ // If event changes its type, use the special event handlers for the changed type
+ special = jQuery.event.special[ type ] || {};
+
+ // If selector defined, determine special event api type, otherwise given type
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+
+ // Update special based on newly reset type
+ special = jQuery.event.special[ type ] || {};
+
+ // handleObj is passed to all event handlers
+ handleObj = jQuery.extend({
+ type: type,
+ origType: origType,
+ data: data,
+ handler: handler,
+ guid: handler.guid,
+ selector: selector,
+ needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
+ namespace: namespaces.join(".")
+ }, handleObjIn );
+
+ // Init the event handler queue if we're the first
+ if ( !(handlers = events[ type ]) ) {
+ handlers = events[ type ] = [];
+ handlers.delegateCount = 0;
+
+ // Only use addEventListener if the special events handler returns false
+ if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, eventHandle, false );
+ }
+ }
+ }
+
+ if ( special.add ) {
+ special.add.call( elem, handleObj );
+
+ if ( !handleObj.handler.guid ) {
+ handleObj.handler.guid = handler.guid;
+ }
+ }
+
+ // Add to the element's handler list, delegates in front
+ if ( selector ) {
+ handlers.splice( handlers.delegateCount++, 0, handleObj );
+ } else {
+ handlers.push( handleObj );
+ }
+
+ // Keep track of which events have ever been used, for event optimization
+ jQuery.event.global[ type ] = true;
+ }
+
+ },
+
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler, selector, mappedTypes ) {
+
+ var j, origCount, tmp,
+ events, t, handleObj,
+ special, handlers, type, namespaces, origType,
+ elemData = data_priv.hasData( elem ) && data_priv.get( elem );
+
+ if ( !elemData || !(events = elemData.events) ) {
+ return;
+ }
+
+ // Once for each type.namespace in types; type may be omitted
+ types = ( types || "" ).match( rnotwhite ) || [ "" ];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tmp[1];
+ namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+ // Unbind all events (on this namespace, if provided) for the element
+ if ( !type ) {
+ for ( type in events ) {
+ jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+ }
+ continue;
+ }
+
+ special = jQuery.event.special[ type ] || {};
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+ handlers = events[ type ] || [];
+ tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
+
+ // Remove matching events
+ origCount = j = handlers.length;
+ while ( j-- ) {
+ handleObj = handlers[ j ];
+
+ if ( ( mappedTypes || origType === handleObj.origType ) &&
+ ( !handler || handler.guid === handleObj.guid ) &&
+ ( !tmp || tmp.test( handleObj.namespace ) ) &&
+ ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+ handlers.splice( j, 1 );
+
+ if ( handleObj.selector ) {
+ handlers.delegateCount--;
+ }
+ if ( special.remove ) {
+ special.remove.call( elem, handleObj );
+ }
+ }
+ }
+
+ // Remove generic event handler if we removed something and no more handlers exist
+ // (avoids potential for endless recursion during removal of special event handlers)
+ if ( origCount && !handlers.length ) {
+ if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+ jQuery.removeEvent( elem, type, elemData.handle );
+ }
+
+ delete events[ type ];
+ }
+ }
+
+ // Remove the expando if it's no longer used
+ if ( jQuery.isEmptyObject( events ) ) {
+ delete elemData.handle;
+ data_priv.remove( elem, "events" );
+ }
+ },
+
+ trigger: function( event, data, elem, onlyHandlers ) {
+
+ var i, cur, tmp, bubbleType, ontype, handle, special,
+ eventPath = [ elem || document ],
+ type = hasOwn.call( event, "type" ) ? event.type : event,
+ namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
+
+ cur = tmp = elem = elem || document;
+
+ // Don't do events on text and comment nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return;
+ }
+
+ // focus/blur morphs to focusin/out; ensure we're not firing them right now
+ if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+ return;
+ }
+
+ if ( type.indexOf(".") >= 0 ) {
+ // Namespaced trigger; create a regexp to match event type in handle()
+ namespaces = type.split(".");
+ type = namespaces.shift();
+ namespaces.sort();
+ }
+ ontype = type.indexOf(":") < 0 && "on" + type;
+
+ // Caller can pass in a jQuery.Event object, Object, or just an event type string
+ event = event[ jQuery.expando ] ?
+ event :
+ new jQuery.Event( type, typeof event === "object" && event );
+
+ // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
+ event.isTrigger = onlyHandlers ? 2 : 3;
+ event.namespace = namespaces.join(".");
+ event.namespace_re = event.namespace ?
+ new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
+ null;
+
+ // Clean up the event in case it is being reused
+ event.result = undefined;
+ if ( !event.target ) {
+ event.target = elem;
+ }
+
+ // Clone any incoming data and prepend the event, creating the handler arg list
+ data = data == null ?
+ [ event ] :
+ jQuery.makeArray( data, [ event ] );
+
+ // Allow special events to draw outside the lines
+ special = jQuery.event.special[ type ] || {};
+ if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
+ return;
+ }
+
+ // Determine event propagation path in advance, per W3C events spec (#9951)
+ // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+ if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+ bubbleType = special.delegateType || type;
+ if ( !rfocusMorph.test( bubbleType + type ) ) {
+ cur = cur.parentNode;
+ }
+ for ( ; cur; cur = cur.parentNode ) {
+ eventPath.push( cur );
+ tmp = cur;
+ }
+
+ // Only add window if we got to document (e.g., not plain obj or detached DOM)
+ if ( tmp === (elem.ownerDocument || document) ) {
+ eventPath.push( tmp.defaultView || tmp.parentWindow || window );
+ }
+ }
+
+ // Fire handlers on the event path
+ i = 0;
+ while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
+
+ event.type = i > 1 ?
+ bubbleType :
+ special.bindType || type;
+
+ // jQuery handler
+ handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" );
+ if ( handle ) {
+ handle.apply( cur, data );
+ }
+
+ // Native handler
+ handle = ontype && cur[ ontype ];
+ if ( handle && handle.apply && jQuery.acceptData( cur ) ) {
+ event.result = handle.apply( cur, data );
+ if ( event.result === false ) {
+ event.preventDefault();
+ }
+ }
+ }
+ event.type = type;
+
+ // If nobody prevented the default action, do it now
+ if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+ if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
+ jQuery.acceptData( elem ) ) {
+
+ // Call a native DOM method on the target with the same name name as the event.
+ // Don't do default actions on window, that's where global variables be (#6170)
+ if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {
+
+ // Don't re-trigger an onFOO event when we call its FOO() method
+ tmp = elem[ ontype ];
+
+ if ( tmp ) {
+ elem[ ontype ] = null;
+ }
+
+ // Prevent re-triggering of the same event, since we already bubbled it above
+ jQuery.event.triggered = type;
+ elem[ type ]();
+ jQuery.event.triggered = undefined;
+
+ if ( tmp ) {
+ elem[ ontype ] = tmp;
+ }
+ }
+ }
+ }
+
+ return event.result;
+ },
+
+ dispatch: function( event ) {
+
+ // Make a writable jQuery.Event from the native event object
+ event = jQuery.event.fix( event );
+
+ var i, j, ret, matched, handleObj,
+ handlerQueue = [],
+ args = slice.call( arguments ),
+ handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [],
+ special = jQuery.event.special[ event.type ] || {};
+
+ // Use the fix-ed jQuery.Event rather than the (read-only) native event
+ args[0] = event;
+ event.delegateTarget = this;
+
+ // Call the preDispatch hook for the mapped type, and let it bail if desired
+ if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+ return;
+ }
+
+ // Determine handlers
+ handlerQueue = jQuery.event.handlers.call( this, event, handlers );
+
+ // Run delegates first; they may want to stop propagation beneath us
+ i = 0;
+ while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
+ event.currentTarget = matched.elem;
+
+ j = 0;
+ while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
+
+ // Triggered event must either 1) have no namespace, or 2) have namespace(s)
+ // a subset or equal to those in the bound event (both can have no namespace).
+ if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
+
+ event.handleObj = handleObj;
+ event.data = handleObj.data;
+
+ ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+ .apply( matched.elem, args );
+
+ if ( ret !== undefined ) {
+ if ( (event.result = ret) === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+ }
+ }
+ }
+
+ // Call the postDispatch hook for the mapped type
+ if ( special.postDispatch ) {
+ special.postDispatch.call( this, event );
+ }
+
+ return event.result;
+ },
+
+ handlers: function( event, handlers ) {
+ var i, matches, sel, handleObj,
+ handlerQueue = [],
+ delegateCount = handlers.delegateCount,
+ cur = event.target;
+
+ // Find delegate handlers
+ // Black-hole SVG <use> instance trees (#13180)
+ // Avoid non-left-click bubbling in Firefox (#3861)
+ if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
+
+ for ( ; cur !== this; cur = cur.parentNode || this ) {
+
+ // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
+ if ( cur.disabled !== true || event.type !== "click" ) {
+ matches = [];
+ for ( i = 0; i < delegateCount; i++ ) {
+ handleObj = handlers[ i ];
+
+ // Don't conflict with Object.prototype properties (#13203)
+ sel = handleObj.selector + " ";
+
+ if ( matches[ sel ] === undefined ) {
+ matches[ sel ] = handleObj.needsContext ?
+ jQuery( sel, this ).index( cur ) >= 0 :
+ jQuery.find( sel, this, null, [ cur ] ).length;
+ }
+ if ( matches[ sel ] ) {
+ matches.push( handleObj );
+ }
+ }
+ if ( matches.length ) {
+ handlerQueue.push({ elem: cur, handlers: matches });
+ }
+ }
+ }
+ }
+
+ // Add the remaining (directly-bound) handlers
+ if ( delegateCount < handlers.length ) {
+ handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
+ }
+
+ return handlerQueue;
+ },
+
+ // Includes some event props shared by KeyEvent and MouseEvent
+ props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+
+ fixHooks: {},
+
+ keyHooks: {
+ props: "char charCode key keyCode".split(" "),
+ filter: function( event, original ) {
+
+ // Add which for key events
+ if ( event.which == null ) {
+ event.which = original.charCode != null ? original.charCode : original.keyCode;
+ }
+
+ return event;
+ }
+ },
+
+ mouseHooks: {
+ props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+ filter: function( event, original ) {
+ var eventDoc, doc, body,
+ button = original.button;
+
+ // Calculate pageX/Y if missing and clientX/Y available
+ if ( event.pageX == null && original.clientX != null ) {
+ eventDoc = event.target.ownerDocument || document;
+ doc = eventDoc.documentElement;
+ body = eventDoc.body;
+
+ event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+ event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
+ }
+
+ // Add which for click: 1 === left; 2 === middle; 3 === right
+ // Note: button is not normalized, so don't use it
+ if ( !event.which && button !== undefined ) {
+ event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+ }
+
+ return event;
+ }
+ },
+
+ fix: function( event ) {
+ if ( event[ jQuery.expando ] ) {
+ return event;
+ }
+
+ // Create a writable copy of the event object and normalize some properties
+ var i, prop, copy,
+ type = event.type,
+ originalEvent = event,
+ fixHook = this.fixHooks[ type ];
+
+ if ( !fixHook ) {
+ this.fixHooks[ type ] = fixHook =
+ rmouseEvent.test( type ) ? this.mouseHooks :
+ rkeyEvent.test( type ) ? this.keyHooks :
+ {};
+ }
+ copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+ event = new jQuery.Event( originalEvent );
+
+ i = copy.length;
+ while ( i-- ) {
+ prop = copy[ i ];
+ event[ prop ] = originalEvent[ prop ];
+ }
+
+ // Support: Cordova 2.5 (WebKit) (#13255)
+ // All events should have a target; Cordova deviceready doesn't
+ if ( !event.target ) {
+ event.target = document;
+ }
+
+ // Support: Safari 6.0+, Chrome<28
+ // Target should not be a text node (#504, #13143)
+ if ( event.target.nodeType === 3 ) {
+ event.target = event.target.parentNode;
+ }
+
+ return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
+ },
+
+ special: {
+ load: {
+ // Prevent triggered image.load events from bubbling to window.load
+ noBubble: true
+ },
+ focus: {
+ // Fire native event if possible so blur/focus sequence is correct
+ trigger: function() {
+ if ( this !== safeActiveElement() && this.focus ) {
+ this.focus();
+ return false;
+ }
+ },
+ delegateType: "focusin"
+ },
+ blur: {
+ trigger: function() {
+ if ( this === safeActiveElement() && this.blur ) {
+ this.blur();
+ return false;
+ }
+ },
+ delegateType: "focusout"
+ },
+ click: {
+ // For checkbox, fire native event so checked state will be right
+ trigger: function() {
+ if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {
+ this.click();
+ return false;
+ }
+ },
+
+ // For cross-browser consistency, don't fire native .click() on links
+ _default: function( event ) {
+ return jQuery.nodeName( event.target, "a" );
+ }
+ },
+
+ beforeunload: {
+ postDispatch: function( event ) {
+
+ // Support: Firefox 20+
+ // Firefox doesn't alert if the returnValue field is not set.
+ if ( event.result !== undefined && event.originalEvent ) {
+ event.originalEvent.returnValue = event.result;
+ }
+ }
+ }
+ },
+
+ simulate: function( type, elem, event, bubble ) {
+ // Piggyback on a donor event to simulate a different one.
+ // Fake originalEvent to avoid donor's stopPropagation, but if the
+ // simulated event prevents default then we do the same on the donor.
+ var e = jQuery.extend(
+ new jQuery.Event(),
+ event,
+ {
+ type: type,
+ isSimulated: true,
+ originalEvent: {}
+ }
+ );
+ if ( bubble ) {
+ jQuery.event.trigger( e, null, elem );
+ } else {
+ jQuery.event.dispatch.call( elem, e );
+ }
+ if ( e.isDefaultPrevented() ) {
+ event.preventDefault();
+ }
+ }
+};
+
+jQuery.removeEvent = function( elem, type, handle ) {
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, handle, false );
+ }
+};
+
+jQuery.Event = function( src, props ) {
+ // Allow instantiation without the 'new' keyword
+ if ( !(this instanceof jQuery.Event) ) {
+ return new jQuery.Event( src, props );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+
+ // Events bubbling up the document may have been marked as prevented
+ // by a handler lower down the tree; reflect the correct value.
+ this.isDefaultPrevented = src.defaultPrevented ||
+ src.defaultPrevented === undefined &&
+ // Support: Android<4.0
+ src.returnValue === false ?
+ returnTrue :
+ returnFalse;
+
+ // Event type
+ } else {
+ this.type = src;
+ }
+
+ // Put explicitly provided properties onto the event object
+ if ( props ) {
+ jQuery.extend( this, props );
+ }
+
+ // Create a timestamp if incoming event doesn't have one
+ this.timeStamp = src && src.timeStamp || jQuery.now();
+
+ // Mark it as fixed
+ this[ jQuery.expando ] = true;
+};
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse,
+
+ preventDefault: function() {
+ var e = this.originalEvent;
+
+ this.isDefaultPrevented = returnTrue;
+
+ if ( e && e.preventDefault ) {
+ e.preventDefault();
+ }
+ },
+ stopPropagation: function() {
+ var e = this.originalEvent;
+
+ this.isPropagationStopped = returnTrue;
+
+ if ( e && e.stopPropagation ) {
+ e.stopPropagation();
+ }
+ },
+ stopImmediatePropagation: function() {
+ var e = this.originalEvent;
+
+ this.isImmediatePropagationStopped = returnTrue;
+
+ if ( e && e.stopImmediatePropagation ) {
+ e.stopImmediatePropagation();
+ }
+
+ this.stopPropagation();
+ }
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+// Support: Chrome 15+
+jQuery.each({
+ mouseenter: "mouseover",
+ mouseleave: "mouseout",
+ pointerenter: "pointerover",
+ pointerleave: "pointerout"
+}, function( orig, fix ) {
+ jQuery.event.special[ orig ] = {
+ delegateType: fix,
+ bindType: fix,
+
+ handle: function( event ) {
+ var ret,
+ target = this,
+ related = event.relatedTarget,
+ handleObj = event.handleObj;
+
+ // For mousenter/leave call the handler if related is outside the target.
+ // NB: No relatedTarget if the mouse left/entered the browser window
+ if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
+ event.type = handleObj.origType;
+ ret = handleObj.handler.apply( this, arguments );
+ event.type = fix;
+ }
+ return ret;
+ }
+ };
+});
+
+// Support: Firefox, Chrome, Safari
+// Create "bubbling" focus and blur events
+if ( !support.focusinBubbles ) {
+ jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+ // Attach a single capturing handler on the document while someone wants focusin/focusout
+ var handler = function( event ) {
+ jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+ };
+
+ jQuery.event.special[ fix ] = {
+ setup: function() {
+ var doc = this.ownerDocument || this,
+ attaches = data_priv.access( doc, fix );
+
+ if ( !attaches ) {
+ doc.addEventListener( orig, handler, true );
+ }
+ data_priv.access( doc, fix, ( attaches || 0 ) + 1 );
+ },
+ teardown: function() {
+ var doc = this.ownerDocument || this,
+ attaches = data_priv.access( doc, fix ) - 1;
+
+ if ( !attaches ) {
+ doc.removeEventListener( orig, handler, true );
+ data_priv.remove( doc, fix );
+
+ } else {
+ data_priv.access( doc, fix, attaches );
+ }
+ }
+ };
+ });
+}
+
+jQuery.fn.extend({
+
+ on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+ var origFn, type;
+
+ // Types can be a map of types/handlers
+ if ( typeof types === "object" ) {
+ // ( types-Object, selector, data )
+ if ( typeof selector !== "string" ) {
+ // ( types-Object, data )
+ data = data || selector;
+ selector = undefined;
+ }
+ for ( type in types ) {
+ this.on( type, selector, data, types[ type ], one );
+ }
+ return this;
+ }
+
+ if ( data == null && fn == null ) {
+ // ( types, fn )
+ fn = selector;
+ data = selector = undefined;
+ } else if ( fn == null ) {
+ if ( typeof selector === "string" ) {
+ // ( types, selector, fn )
+ fn = data;
+ data = undefined;
+ } else {
+ // ( types, data, fn )
+ fn = data;
+ data = selector;
+ selector = undefined;
+ }
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ } else if ( !fn ) {
+ return this;
+ }
+
+ if ( one === 1 ) {
+ origFn = fn;
+ fn = function( event ) {
+ // Can use an empty set, since event contains the info
+ jQuery().off( event );
+ return origFn.apply( this, arguments );
+ };
+ // Use same guid so caller can remove using origFn
+ fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+ }
+ return this.each( function() {
+ jQuery.event.add( this, types, fn, data, selector );
+ });
+ },
+ one: function( types, selector, data, fn ) {
+ return this.on( types, selector, data, fn, 1 );
+ },
+ off: function( types, selector, fn ) {
+ var handleObj, type;
+ if ( types && types.preventDefault && types.handleObj ) {
+ // ( event ) dispatched jQuery.Event
+ handleObj = types.handleObj;
+ jQuery( types.delegateTarget ).off(
+ handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
+ handleObj.selector,
+ handleObj.handler
+ );
+ return this;
+ }
+ if ( typeof types === "object" ) {
+ // ( types-object [, selector] )
+ for ( type in types ) {
+ this.off( type, selector, types[ type ] );
+ }
+ return this;
+ }
+ if ( selector === false || typeof selector === "function" ) {
+ // ( types [, fn] )
+ fn = selector;
+ selector = undefined;
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ }
+ return this.each(function() {
+ jQuery.event.remove( this, types, fn, selector );
+ });
+ },
+
+ trigger: function( type, data ) {
+ return this.each(function() {
+ jQuery.event.trigger( type, data, this );
+ });
+ },
+ triggerHandler: function( type, data ) {
+ var elem = this[0];
+ if ( elem ) {
+ return jQuery.event.trigger( type, data, elem, true );
+ }
+ }
+});
+
+
+var
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
+ rtagName = /<([\w:]+)/,
+ rhtml = /<|&#?\w+;/,
+ rnoInnerhtml = /<(?:script|style|link)/i,
+ // checked="checked" or checked
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+ rscriptType = /^$|\/(?:java|ecma)script/i,
+ rscriptTypeMasked = /^true\/(.*)/,
+ rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
+
+ // We have to close these tags to support XHTML (#13200)
+ wrapMap = {
+
+ // Support: IE9
+ option: [ 1, "<select multiple='multiple'>", "</select>" ],
+
+ thead: [ 1, "<table>", "</table>" ],
+ col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
+ tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+ td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+
+ _default: [ 0, "", "" ]
+ };
+
+// Support: IE9
+wrapMap.optgroup = wrapMap.option;
+
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+// Support: 1.x compatibility
+// Manipulating tables requires a tbody
+function manipulationTarget( elem, content ) {
+ return jQuery.nodeName( elem, "table" ) &&
+ jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?
+
+ elem.getElementsByTagName("tbody")[0] ||
+ elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
+ elem;
+}
+
+// Replace/restore the type attribute of script elements for safe DOM manipulation
+function disableScript( elem ) {
+ elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
+ return elem;
+}
+function restoreScript( elem ) {
+ var match = rscriptTypeMasked.exec( elem.type );
+
+ if ( match ) {
+ elem.type = match[ 1 ];
+ } else {
+ elem.removeAttribute("type");
+ }
+
+ return elem;
+}
+
+// Mark scripts as having already been evaluated
+function setGlobalEval( elems, refElements ) {
+ var i = 0,
+ l = elems.length;
+
+ for ( ; i < l; i++ ) {
+ data_priv.set(
+ elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" )
+ );
+ }
+}
+
+function cloneCopyEvent( src, dest ) {
+ var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
+
+ if ( dest.nodeType !== 1 ) {
+ return;
+ }
+
+ // 1. Copy private data: events, handlers, etc.
+ if ( data_priv.hasData( src ) ) {
+ pdataOld = data_priv.access( src );
+ pdataCur = data_priv.set( dest, pdataOld );
+ events = pdataOld.events;
+
+ if ( events ) {
+ delete pdataCur.handle;
+ pdataCur.events = {};
+
+ for ( type in events ) {
+ for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+ jQuery.event.add( dest, type, events[ type ][ i ] );
+ }
+ }
+ }
+ }
+
+ // 2. Copy user data
+ if ( data_user.hasData( src ) ) {
+ udataOld = data_user.access( src );
+ udataCur = jQuery.extend( {}, udataOld );
+
+ data_user.set( dest, udataCur );
+ }
+}
+
+function getAll( context, tag ) {
+ var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) :
+ context.querySelectorAll ? context.querySelectorAll( tag || "*" ) :
+ [];
+
+ return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
+ jQuery.merge( [ context ], ret ) :
+ ret;
+}
+
+// Fix IE bugs, see support tests
+function fixInput( src, dest ) {
+ var nodeName = dest.nodeName.toLowerCase();
+
+ // Fails to persist the checked state of a cloned checkbox or radio button.
+ if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
+ dest.checked = src.checked;
+
+ // Fails to return the selected option to the default selected state when cloning options
+ } else if ( nodeName === "input" || nodeName === "textarea" ) {
+ dest.defaultValue = src.defaultValue;
+ }
+}
+
+jQuery.extend({
+ clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+ var i, l, srcElements, destElements,
+ clone = elem.cloneNode( true ),
+ inPage = jQuery.contains( elem.ownerDocument, elem );
+
+ // Fix IE cloning issues
+ if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
+ !jQuery.isXMLDoc( elem ) ) {
+
+ // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
+ destElements = getAll( clone );
+ srcElements = getAll( elem );
+
+ for ( i = 0, l = srcElements.length; i < l; i++ ) {
+ fixInput( srcElements[ i ], destElements[ i ] );
+ }
+ }
+
+ // Copy the events from the original to the clone
+ if ( dataAndEvents ) {
+ if ( deepDataAndEvents ) {
+ srcElements = srcElements || getAll( elem );
+ destElements = destElements || getAll( clone );
+
+ for ( i = 0, l = srcElements.length; i < l; i++ ) {
+ cloneCopyEvent( srcElements[ i ], destElements[ i ] );
+ }
+ } else {
+ cloneCopyEvent( elem, clone );
+ }
+ }
+
+ // Preserve script evaluation history
+ destElements = getAll( clone, "script" );
+ if ( destElements.length > 0 ) {
+ setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
+ }
+
+ // Return the cloned set
+ return clone;
+ },
+
+ buildFragment: function( elems, context, scripts, selection ) {
+ var elem, tmp, tag, wrap, contains, j,
+ fragment = context.createDocumentFragment(),
+ nodes = [],
+ i = 0,
+ l = elems.length;
+
+ for ( ; i < l; i++ ) {
+ elem = elems[ i ];
+
+ if ( elem || elem === 0 ) {
+
+ // Add nodes directly
+ if ( jQuery.type( elem ) === "object" ) {
+ // Support: QtWebKit, PhantomJS
+ // push.apply(_, arraylike) throws on ancient WebKit
+ jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
+
+ // Convert non-html into a text node
+ } else if ( !rhtml.test( elem ) ) {
+ nodes.push( context.createTextNode( elem ) );
+
+ // Convert html into DOM nodes
+ } else {
+ tmp = tmp || fragment.appendChild( context.createElement("div") );
+
+ // Deserialize a standard representation
+ tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
+ wrap = wrapMap[ tag ] || wrapMap._default;
+ tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[ 2 ];
+
+ // Descend through wrappers to the right content
+ j = wrap[ 0 ];
+ while ( j-- ) {
+ tmp = tmp.lastChild;
+ }
+
+ // Support: QtWebKit, PhantomJS
+ // push.apply(_, arraylike) throws on ancient WebKit
+ jQuery.merge( nodes, tmp.childNodes );
+
+ // Remember the top-level container
+ tmp = fragment.firstChild;
+
+ // Ensure the created nodes are orphaned (#12392)
+ tmp.textContent = "";
+ }
+ }
+ }
+
+ // Remove wrapper from fragment
+ fragment.textContent = "";
+
+ i = 0;
+ while ( (elem = nodes[ i++ ]) ) {
+
+ // #4087 - If origin and destination elements are the same, and this is
+ // that element, do not do anything
+ if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
+ continue;
+ }
+
+ contains = jQuery.contains( elem.ownerDocument, elem );
+
+ // Append to fragment
+ tmp = getAll( fragment.appendChild( elem ), "script" );
+
+ // Preserve script evaluation history
+ if ( contains ) {
+ setGlobalEval( tmp );
+ }
+
+ // Capture executables
+ if ( scripts ) {
+ j = 0;
+ while ( (elem = tmp[ j++ ]) ) {
+ if ( rscriptType.test( elem.type || "" ) ) {
+ scripts.push( elem );
+ }
+ }
+ }
+ }
+
+ return fragment;
+ },
+
+ cleanData: function( elems ) {
+ var data, elem, type, key,
+ special = jQuery.event.special,
+ i = 0;
+
+ for ( ; (elem = elems[ i ]) !== undefined; i++ ) {
+ if ( jQuery.acceptData( elem ) ) {
+ key = elem[ data_priv.expando ];
+
+ if ( key && (data = data_priv.cache[ key ]) ) {
+ if ( data.events ) {
+ for ( type in data.events ) {
+ if ( special[ type ] ) {
+ jQuery.event.remove( elem, type );
+
+ // This is a shortcut to avoid jQuery.event.remove's overhead
+ } else {
+ jQuery.removeEvent( elem, type, data.handle );
+ }
+ }
+ }
+ if ( data_priv.cache[ key ] ) {
+ // Discard any remaining `private` data
+ delete data_priv.cache[ key ];
+ }
+ }
+ }
+ // Discard any remaining `user` data
+ delete data_user.cache[ elem[ data_user.expando ] ];
+ }
+ }
+});
+
+jQuery.fn.extend({
+ text: function( value ) {
+ return access( this, function( value ) {
+ return value === undefined ?
+ jQuery.text( this ) :
+ this.empty().each(function() {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ this.textContent = value;
+ }
+ });
+ }, null, value, arguments.length );
+ },
+
+ append: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ var target = manipulationTarget( this, elem );
+ target.appendChild( elem );
+ }
+ });
+ },
+
+ prepend: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ var target = manipulationTarget( this, elem );
+ target.insertBefore( elem, target.firstChild );
+ }
+ });
+ },
+
+ before: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.parentNode ) {
+ this.parentNode.insertBefore( elem, this );
+ }
+ });
+ },
+
+ after: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.parentNode ) {
+ this.parentNode.insertBefore( elem, this.nextSibling );
+ }
+ });
+ },
+
+ remove: function( selector, keepData /* Internal Use Only */ ) {
+ var elem,
+ elems = selector ? jQuery.filter( selector, this ) : this,
+ i = 0;
+
+ for ( ; (elem = elems[i]) != null; i++ ) {
+ if ( !keepData && elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem ) );
+ }
+
+ if ( elem.parentNode ) {
+ if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
+ setGlobalEval( getAll( elem, "script" ) );
+ }
+ elem.parentNode.removeChild( elem );
+ }
+ }
+
+ return this;
+ },
+
+ empty: function() {
+ var elem,
+ i = 0;
+
+ for ( ; (elem = this[i]) != null; i++ ) {
+ if ( elem.nodeType === 1 ) {
+
+ // Prevent memory leaks
+ jQuery.cleanData( getAll( elem, false ) );
+
+ // Remove any remaining nodes
+ elem.textContent = "";
+ }
+ }
+
+ return this;
+ },
+
+ clone: function( dataAndEvents, deepDataAndEvents ) {
+ dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+ deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+ return this.map(function() {
+ return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+ });
+ },
+
+ html: function( value ) {
+ return access( this, function( value ) {
+ var elem = this[ 0 ] || {},
+ i = 0,
+ l = this.length;
+
+ if ( value === undefined && elem.nodeType === 1 ) {
+ return elem.innerHTML;
+ }
+
+ // See if we can take a shortcut and just use innerHTML
+ if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+ !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
+
+ value = value.replace( rxhtmlTag, "<$1></$2>" );
+
+ try {
+ for ( ; i < l; i++ ) {
+ elem = this[ i ] || {};
+
+ // Remove element nodes and prevent memory leaks
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem, false ) );
+ elem.innerHTML = value;
+ }
+ }
+
+ elem = 0;
+
+ // If using innerHTML throws an exception, use the fallback method
+ } catch( e ) {}
+ }
+
+ if ( elem ) {
+ this.empty().append( value );
+ }
+ }, null, value, arguments.length );
+ },
+
+ replaceWith: function() {
+ var arg = arguments[ 0 ];
+
+ // Make the changes, replacing each context element with the new content
+ this.domManip( arguments, function( elem ) {
+ arg = this.parentNode;
+
+ jQuery.cleanData( getAll( this ) );
+
+ if ( arg ) {
+ arg.replaceChild( elem, this );
+ }
+ });
+
+ // Force removal if there was no new content (e.g., from empty arguments)
+ return arg && (arg.length || arg.nodeType) ? this : this.remove();
+ },
+
+ detach: function( selector ) {
+ return this.remove( selector, true );
+ },
+
+ domManip: function( args, callback ) {
+
+ // Flatten any nested arrays
+ args = concat.apply( [], args );
+
+ var fragment, first, scripts, hasScripts, node, doc,
+ i = 0,
+ l = this.length,
+ set = this,
+ iNoClone = l - 1,
+ value = args[ 0 ],
+ isFunction = jQuery.isFunction( value );
+
+ // We can't cloneNode fragments that contain checked, in WebKit
+ if ( isFunction ||
+ ( l > 1 && typeof value === "string" &&
+ !support.checkClone && rchecked.test( value ) ) ) {
+ return this.each(function( index ) {
+ var self = set.eq( index );
+ if ( isFunction ) {
+ args[ 0 ] = value.call( this, index, self.html() );
+ }
+ self.domManip( args, callback );
+ });
+ }
+
+ if ( l ) {
+ fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );
+ first = fragment.firstChild;
+
+ if ( fragment.childNodes.length === 1 ) {
+ fragment = first;
+ }
+
+ if ( first ) {
+ scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
+ hasScripts = scripts.length;
+
+ // Use the original fragment for the last item instead of the first because it can end up
+ // being emptied incorrectly in certain situations (#8070).
+ for ( ; i < l; i++ ) {
+ node = fragment;
+
+ if ( i !== iNoClone ) {
+ node = jQuery.clone( node, true, true );
+
+ // Keep references to cloned scripts for later restoration
+ if ( hasScripts ) {
+ // Support: QtWebKit
+ // jQuery.merge because push.apply(_, arraylike) throws
+ jQuery.merge( scripts, getAll( node, "script" ) );
+ }
+ }
+
+ callback.call( this[ i ], node, i );
+ }
+
+ if ( hasScripts ) {
+ doc = scripts[ scripts.length - 1 ].ownerDocument;
+
+ // Reenable scripts
+ jQuery.map( scripts, restoreScript );
+
+ // Evaluate executable scripts on first document insertion
+ for ( i = 0; i < hasScripts; i++ ) {
+ node = scripts[ i ];
+ if ( rscriptType.test( node.type || "" ) &&
+ !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
+
+ if ( node.src ) {
+ // Optional AJAX dependency, but won't run scripts if not present
+ if ( jQuery._evalUrl ) {
+ jQuery._evalUrl( node.src );
+ }
+ } else {
+ jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) );
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return this;
+ }
+});
+
+jQuery.each({
+ appendTo: "append",
+ prependTo: "prepend",
+ insertBefore: "before",
+ insertAfter: "after",
+ replaceAll: "replaceWith"
+}, function( name, original ) {
+ jQuery.fn[ name ] = function( selector ) {
+ var elems,
+ ret = [],
+ insert = jQuery( selector ),
+ last = insert.length - 1,
+ i = 0;
+
+ for ( ; i <= last; i++ ) {
+ elems = i === last ? this : this.clone( true );
+ jQuery( insert[ i ] )[ original ]( elems );
+
+ // Support: QtWebKit
+ // .get() because push.apply(_, arraylike) throws
+ push.apply( ret, elems.get() );
+ }
+
+ return this.pushStack( ret );
+ };
+});
+
+
+var iframe,
+ elemdisplay = {};
+
+/**
+ * Retrieve the actual display of a element
+ * @param {String} name nodeName of the element
+ * @param {Object} doc Document object
+ */
+// Called only from within defaultDisplay
+function actualDisplay( name, doc ) {
+ var style,
+ elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
+
+ // getDefaultComputedStyle might be reliably used only on attached element
+ display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
+
+ // Use of this method is a temporary fix (more like optimization) until something better comes along,
+ // since it was removed from specification and supported only in FF
+ style.display : jQuery.css( elem[ 0 ], "display" );
+
+ // We don't have any data stored on the element,
+ // so use "detach" method as fast way to get rid of the element
+ elem.detach();
+
+ return display;
+}
+
+/**
+ * Try to determine the default display value of an element
+ * @param {String} nodeName
+ */
+function defaultDisplay( nodeName ) {
+ var doc = document,
+ display = elemdisplay[ nodeName ];
+
+ if ( !display ) {
+ display = actualDisplay( nodeName, doc );
+
+ // If the simple way fails, read from inside an iframe
+ if ( display === "none" || !display ) {
+
+ // Use the already-created iframe if possible
+ iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement );
+
+ // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
+ doc = iframe[ 0 ].contentDocument;
+
+ // Support: IE
+ doc.write();
+ doc.close();
+
+ display = actualDisplay( nodeName, doc );
+ iframe.detach();
+ }
+
+ // Store the correct default display
+ elemdisplay[ nodeName ] = display;
+ }
+
+ return display;
+}
+var rmargin = (/^margin/);
+
+var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
+
+var getStyles = function( elem ) {
+ // Support: IE<=11+, Firefox<=30+ (#15098, #14150)
+ // IE throws on elements created in popups
+ // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
+ if ( elem.ownerDocument.defaultView.opener ) {
+ return elem.ownerDocument.defaultView.getComputedStyle( elem, null );
+ }
+
+ return window.getComputedStyle( elem, null );
+ };
+
+
+
+function curCSS( elem, name, computed ) {
+ var width, minWidth, maxWidth, ret,
+ style = elem.style;
+
+ computed = computed || getStyles( elem );
+
+ // Support: IE9
+ // getPropertyValue is only needed for .css('filter') (#12537)
+ if ( computed ) {
+ ret = computed.getPropertyValue( name ) || computed[ name ];
+ }
+
+ if ( computed ) {
+
+ if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
+ ret = jQuery.style( elem, name );
+ }
+
+ // Support: iOS < 6
+ // A tribute to the "awesome hack by Dean Edwards"
+ // iOS < 6 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
+ // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+ if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
+
+ // Remember the original values
+ width = style.width;
+ minWidth = style.minWidth;
+ maxWidth = style.maxWidth;
+
+ // Put in the new values to get a computed value out
+ style.minWidth = style.maxWidth = style.width = ret;
+ ret = computed.width;
+
+ // Revert the changed values
+ style.width = width;
+ style.minWidth = minWidth;
+ style.maxWidth = maxWidth;
+ }
+ }
+
+ return ret !== undefined ?
+ // Support: IE
+ // IE returns zIndex value as an integer.
+ ret + "" :
+ ret;
+}
+
+
+function addGetHookIf( conditionFn, hookFn ) {
+ // Define the hook, we'll check on the first run if it's really needed.
+ return {
+ get: function() {
+ if ( conditionFn() ) {
+ // Hook not needed (or it's not possible to use it due
+ // to missing dependency), remove it.
+ delete this.get;
+ return;
+ }
+
+ // Hook needed; redefine it so that the support test is not executed again.
+ return (this.get = hookFn).apply( this, arguments );
+ }
+ };
+}
+
+
+(function() {
+ var pixelPositionVal, boxSizingReliableVal,
+ docElem = document.documentElement,
+ container = document.createElement( "div" ),
+ div = document.createElement( "div" );
+
+ if ( !div.style ) {
+ return;
+ }
+
+ // Support: IE9-11+
+ // Style of cloned element affects source element cloned (#8908)
+ div.style.backgroundClip = "content-box";
+ div.cloneNode( true ).style.backgroundClip = "";
+ support.clearCloneStyle = div.style.backgroundClip === "content-box";
+
+ container.style.cssText = "border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;" +
+ "position:absolute";
+ container.appendChild( div );
+
+ // Executing both pixelPosition & boxSizingReliable tests require only one layout
+ // so they're executed at the same time to save the second computation.
+ function computePixelPositionAndBoxSizingReliable() {
+ div.style.cssText =
+ // Support: Firefox<29, Android 2.3
+ // Vendor-prefix box-sizing
+ "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" +
+ "box-sizing:border-box;display:block;margin-top:1%;top:1%;" +
+ "border:1px;padding:1px;width:4px;position:absolute";
+ div.innerHTML = "";
+ docElem.appendChild( container );
+
+ var divStyle = window.getComputedStyle( div, null );
+ pixelPositionVal = divStyle.top !== "1%";
+ boxSizingReliableVal = divStyle.width === "4px";
+
+ docElem.removeChild( container );
+ }
+
+ // Support: node.js jsdom
+ // Don't assume that getComputedStyle is a property of the global object
+ if ( window.getComputedStyle ) {
+ jQuery.extend( support, {
+ pixelPosition: function() {
+
+ // This test is executed only once but we still do memoizing
+ // since we can use the boxSizingReliable pre-computing.
+ // No need to check if the test was already performed, though.
+ computePixelPositionAndBoxSizingReliable();
+ return pixelPositionVal;
+ },
+ boxSizingReliable: function() {
+ if ( boxSizingReliableVal == null ) {
+ computePixelPositionAndBoxSizingReliable();
+ }
+ return boxSizingReliableVal;
+ },
+ reliableMarginRight: function() {
+
+ // Support: Android 2.3
+ // Check if div with explicit width and no margin-right incorrectly
+ // gets computed margin-right based on width of container. (#3333)
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ // This support function is only executed once so no memoizing is needed.
+ var ret,
+ marginDiv = div.appendChild( document.createElement( "div" ) );
+
+ // Reset CSS: box-sizing; display; margin; border; padding
+ marginDiv.style.cssText = div.style.cssText =
+ // Support: Firefox<29, Android 2.3
+ // Vendor-prefix box-sizing
+ "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
+ "box-sizing:content-box;display:block;margin:0;border:0;padding:0";
+ marginDiv.style.marginRight = marginDiv.style.width = "0";
+ div.style.width = "1px";
+ docElem.appendChild( container );
+
+ ret = !parseFloat( window.getComputedStyle( marginDiv, null ).marginRight );
+
+ docElem.removeChild( container );
+ div.removeChild( marginDiv );
+
+ return ret;
+ }
+ });
+ }
+})();
+
+
+// A method for quickly swapping in/out CSS properties to get correct calculations.
+jQuery.swap = function( elem, options, callback, args ) {
+ var ret, name,
+ old = {};
+
+ // Remember the old values, and insert the new ones
+ for ( name in options ) {
+ old[ name ] = elem.style[ name ];
+ elem.style[ name ] = options[ name ];
+ }
+
+ ret = callback.apply( elem, args || [] );
+
+ // Revert the old values
+ for ( name in options ) {
+ elem.style[ name ] = old[ name ];
+ }
+
+ return ret;
+};
+
+
+var
+ // Swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
+ // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
+ rdisplayswap = /^(none|table(?!-c[ea]).+)/,
+ rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),
+ rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ),
+
+ cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+ cssNormalTransform = {
+ letterSpacing: "0",
+ fontWeight: "400"
+ },
+
+ cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
+
+// Return a css property mapped to a potentially vendor prefixed property
+function vendorPropName( style, name ) {
+
+ // Shortcut for names that are not vendor prefixed
+ if ( name in style ) {
+ return name;
+ }
+
+ // Check for vendor prefixed names
+ var capName = name[0].toUpperCase() + name.slice(1),
+ origName = name,
+ i = cssPrefixes.length;
+
+ while ( i-- ) {
+ name = cssPrefixes[ i ] + capName;
+ if ( name in style ) {
+ return name;
+ }
+ }
+
+ return origName;
+}
+
+function setPositiveNumber( elem, value, subtract ) {
+ var matches = rnumsplit.exec( value );
+ return matches ?
+ // Guard against undefined "subtract", e.g., when used as in cssHooks
+ Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
+ value;
+}
+
+function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
+ var i = extra === ( isBorderBox ? "border" : "content" ) ?
+ // If we already have the right measurement, avoid augmentation
+ 4 :
+ // Otherwise initialize for horizontal or vertical properties
+ name === "width" ? 1 : 0,
+
+ val = 0;
+
+ for ( ; i < 4; i += 2 ) {
+ // Both box models exclude margin, so add it if we want it
+ if ( extra === "margin" ) {
+ val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
+ }
+
+ if ( isBorderBox ) {
+ // border-box includes padding, so remove it if we want content
+ if ( extra === "content" ) {
+ val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+ }
+
+ // At this point, extra isn't border nor margin, so remove border
+ if ( extra !== "margin" ) {
+ val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+ }
+ } else {
+ // At this point, extra isn't content, so add padding
+ val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+
+ // At this point, extra isn't content nor padding, so add border
+ if ( extra !== "padding" ) {
+ val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+ }
+ }
+ }
+
+ return val;
+}
+
+function getWidthOrHeight( elem, name, extra ) {
+
+ // Start with offset property, which is equivalent to the border-box value
+ var valueIsBorderBox = true,
+ val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+ styles = getStyles( elem ),
+ isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
+
+ // Some non-html elements return undefined for offsetWidth, so check for null/undefined
+ // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
+ // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
+ if ( val <= 0 || val == null ) {
+ // Fall back to computed then uncomputed css if necessary
+ val = curCSS( elem, name, styles );
+ if ( val < 0 || val == null ) {
+ val = elem.style[ name ];
+ }
+
+ // Computed unit is not pixels. Stop here and return.
+ if ( rnumnonpx.test(val) ) {
+ return val;
+ }
+
+ // Check for style in case a browser which returns unreliable values
+ // for getComputedStyle silently falls back to the reliable elem.style
+ valueIsBorderBox = isBorderBox &&
+ ( support.boxSizingReliable() || val === elem.style[ name ] );
+
+ // Normalize "", auto, and prepare for extra
+ val = parseFloat( val ) || 0;
+ }
+
+ // Use the active box-sizing model to add/subtract irrelevant styles
+ return ( val +
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra || ( isBorderBox ? "border" : "content" ),
+ valueIsBorderBox,
+ styles
+ )
+ ) + "px";
+}
+
+function showHide( elements, show ) {
+ var display, elem, hidden,
+ values = [],
+ index = 0,
+ length = elements.length;
+
+ for ( ; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+
+ values[ index ] = data_priv.get( elem, "olddisplay" );
+ display = elem.style.display;
+ if ( show ) {
+ // Reset the inline display of this element to learn if it is
+ // being hidden by cascaded rules or not
+ if ( !values[ index ] && display === "none" ) {
+ elem.style.display = "";
+ }
+
+ // Set elements which have been overridden with display: none
+ // in a stylesheet to whatever the default browser style is
+ // for such an element
+ if ( elem.style.display === "" && isHidden( elem ) ) {
+ values[ index ] = data_priv.access( elem, "olddisplay", defaultDisplay(elem.nodeName) );
+ }
+ } else {
+ hidden = isHidden( elem );
+
+ if ( display !== "none" || !hidden ) {
+ data_priv.set( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
+ }
+ }
+ }
+
+ // Set the display of most of the elements in a second loop
+ // to avoid the constant reflow
+ for ( index = 0; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+ if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
+ elem.style.display = show ? values[ index ] || "" : "none";
+ }
+ }
+
+ return elements;
+}
+
+jQuery.extend({
+
+ // Add in style property hooks for overriding the default
+ // behavior of getting and setting a style property
+ cssHooks: {
+ opacity: {
+ get: function( elem, computed ) {
+ if ( computed ) {
+
+ // We should always get a number back from opacity
+ var ret = curCSS( elem, "opacity" );
+ return ret === "" ? "1" : ret;
+ }
+ }
+ }
+ },
+
+ // Don't automatically add "px" to these possibly-unitless properties
+ cssNumber: {
+ "columnCount": true,
+ "fillOpacity": true,
+ "flexGrow": true,
+ "flexShrink": true,
+ "fontWeight": true,
+ "lineHeight": true,
+ "opacity": true,
+ "order": true,
+ "orphans": true,
+ "widows": true,
+ "zIndex": true,
+ "zoom": true
+ },
+
+ // Add in properties whose names you wish to fix before
+ // setting or getting the value
+ cssProps: {
+ "float": "cssFloat"
+ },
+
+ // Get and set the style property on a DOM Node
+ style: function( elem, name, value, extra ) {
+
+ // Don't set styles on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+ return;
+ }
+
+ // Make sure that we're working with the right name
+ var ret, type, hooks,
+ origName = jQuery.camelCase( name ),
+ style = elem.style;
+
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
+
+ // Gets hook for the prefixed version, then unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // Check if we're setting a value
+ if ( value !== undefined ) {
+ type = typeof value;
+
+ // Convert "+=" or "-=" to relative numbers (#7345)
+ if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+ value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
+ // Fixes bug #9237
+ type = "number";
+ }
+
+ // Make sure that null and NaN values aren't set (#7116)
+ if ( value == null || value !== value ) {
+ return;
+ }
+
+ // If a number, add 'px' to the (except for certain CSS properties)
+ if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+ value += "px";
+ }
+
+ // Support: IE9-11+
+ // background-* props affect original clone's values
+ if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
+ style[ name ] = "inherit";
+ }
+
+ // If a hook was provided, use that value, otherwise just set the specified value
+ if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
+ style[ name ] = value;
+ }
+
+ } else {
+ // If a hook was provided get the non-computed value from there
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+ return ret;
+ }
+
+ // Otherwise just get the value from the style object
+ return style[ name ];
+ }
+ },
+
+ css: function( elem, name, extra, styles ) {
+ var val, num, hooks,
+ origName = jQuery.camelCase( name );
+
+ // Make sure that we're working with the right name
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
+
+ // Try prefixed name followed by the unprefixed name
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // If a hook was provided get the computed value from there
+ if ( hooks && "get" in hooks ) {
+ val = hooks.get( elem, true, extra );
+ }
+
+ // Otherwise, if a way to get the computed value exists, use that
+ if ( val === undefined ) {
+ val = curCSS( elem, name, styles );
+ }
+
+ // Convert "normal" to computed value
+ if ( val === "normal" && name in cssNormalTransform ) {
+ val = cssNormalTransform[ name ];
+ }
+
+ // Make numeric if forced or a qualifier was provided and val looks numeric
+ if ( extra === "" || extra ) {
+ num = parseFloat( val );
+ return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
+ }
+ return val;
+ }
+});
+
+jQuery.each([ "height", "width" ], function( i, name ) {
+ jQuery.cssHooks[ name ] = {
+ get: function( elem, computed, extra ) {
+ if ( computed ) {
+
+ // Certain elements can have dimension info if we invisibly show them
+ // but it must have a current display style that would benefit
+ return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ?
+ jQuery.swap( elem, cssShow, function() {
+ return getWidthOrHeight( elem, name, extra );
+ }) :
+ getWidthOrHeight( elem, name, extra );
+ }
+ },
+
+ set: function( elem, value, extra ) {
+ var styles = extra && getStyles( elem );
+ return setPositiveNumber( elem, value, extra ?
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra,
+ jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
+ styles
+ ) : 0
+ );
+ }
+ };
+});
+
+// Support: Android 2.3
+jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
+ function( elem, computed ) {
+ if ( computed ) {
+ return jQuery.swap( elem, { "display": "inline-block" },
+ curCSS, [ elem, "marginRight" ] );
+ }
+ }
+);
+
+// These hooks are used by animate to expand properties
+jQuery.each({
+ margin: "",
+ padding: "",
+ border: "Width"
+}, function( prefix, suffix ) {
+ jQuery.cssHooks[ prefix + suffix ] = {
+ expand: function( value ) {
+ var i = 0,
+ expanded = {},
+
+ // Assumes a single number if not a string
+ parts = typeof value === "string" ? value.split(" ") : [ value ];
+
+ for ( ; i < 4; i++ ) {
+ expanded[ prefix + cssExpand[ i ] + suffix ] =
+ parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+ }
+
+ return expanded;
+ }
+ };
+
+ if ( !rmargin.test( prefix ) ) {
+ jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
+ }
+});
+
+jQuery.fn.extend({
+ css: function( name, value ) {
+ return access( this, function( elem, name, value ) {
+ var styles, len,
+ map = {},
+ i = 0;
+
+ if ( jQuery.isArray( name ) ) {
+ styles = getStyles( elem );
+ len = name.length;
+
+ for ( ; i < len; i++ ) {
+ map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
+ }
+
+ return map;
+ }
+
+ return value !== undefined ?
+ jQuery.style( elem, name, value ) :
+ jQuery.css( elem, name );
+ }, name, value, arguments.length > 1 );
+ },
+ show: function() {
+ return showHide( this, true );
+ },
+ hide: function() {
+ return showHide( this );
+ },
+ toggle: function( state ) {
+ if ( typeof state === "boolean" ) {
+ return state ? this.show() : this.hide();
+ }
+
+ return this.each(function() {
+ if ( isHidden( this ) ) {
+ jQuery( this ).show();
+ } else {
+ jQuery( this ).hide();
+ }
+ });
+ }
+});
+
+
+function Tween( elem, options, prop, end, easing ) {
+ return new Tween.prototype.init( elem, options, prop, end, easing );
+}
+jQuery.Tween = Tween;
+
+Tween.prototype = {
+ constructor: Tween,
+ init: function( elem, options, prop, end, easing, unit ) {
+ this.elem = elem;
+ this.prop = prop;
+ this.easing = easing || "swing";
+ this.options = options;
+ this.start = this.now = this.cur();
+ this.end = end;
+ this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
+ },
+ cur: function() {
+ var hooks = Tween.propHooks[ this.prop ];
+
+ return hooks && hooks.get ?
+ hooks.get( this ) :
+ Tween.propHooks._default.get( this );
+ },
+ run: function( percent ) {
+ var eased,
+ hooks = Tween.propHooks[ this.prop ];
+
+ if ( this.options.duration ) {
+ this.pos = eased = jQuery.easing[ this.easing ](
+ percent, this.options.duration * percent, 0, 1, this.options.duration
+ );
+ } else {
+ this.pos = eased = percent;
+ }
+ this.now = ( this.end - this.start ) * eased + this.start;
+
+ if ( this.options.step ) {
+ this.options.step.call( this.elem, this.now, this );
+ }
+
+ if ( hooks && hooks.set ) {
+ hooks.set( this );
+ } else {
+ Tween.propHooks._default.set( this );
+ }
+ return this;
+ }
+};
+
+Tween.prototype.init.prototype = Tween.prototype;
+
+Tween.propHooks = {
+ _default: {
+ get: function( tween ) {
+ var result;
+
+ if ( tween.elem[ tween.prop ] != null &&
+ (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
+ return tween.elem[ tween.prop ];
+ }
+
+ // Passing an empty string as a 3rd parameter to .css will automatically
+ // attempt a parseFloat and fallback to a string if the parse fails.
+ // Simple values such as "10px" are parsed to Float;
+ // complex values such as "rotate(1rad)" are returned as-is.
+ result = jQuery.css( tween.elem, tween.prop, "" );
+ // Empty strings, null, undefined and "auto" are converted to 0.
+ return !result || result === "auto" ? 0 : result;
+ },
+ set: function( tween ) {
+ // Use step hook for back compat.
+ // Use cssHook if its there.
+ // Use .style if available and use plain properties where available.
+ if ( jQuery.fx.step[ tween.prop ] ) {
+ jQuery.fx.step[ tween.prop ]( tween );
+ } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
+ jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
+ } else {
+ tween.elem[ tween.prop ] = tween.now;
+ }
+ }
+ }
+};
+
+// Support: IE9
+// Panic based approach to setting things on disconnected nodes
+Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
+ set: function( tween ) {
+ if ( tween.elem.nodeType && tween.elem.parentNode ) {
+ tween.elem[ tween.prop ] = tween.now;
+ }
+ }
+};
+
+jQuery.easing = {
+ linear: function( p ) {
+ return p;
+ },
+ swing: function( p ) {
+ return 0.5 - Math.cos( p * Math.PI ) / 2;
+ }
+};
+
+jQuery.fx = Tween.prototype.init;
+
+// Back Compat <1.8 extension point
+jQuery.fx.step = {};
+
+
+
+
+var
+ fxNow, timerId,
+ rfxtypes = /^(?:toggle|show|hide)$/,
+ rfxnum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ),
+ rrun = /queueHooks$/,
+ animationPrefilters = [ defaultPrefilter ],
+ tweeners = {
+ "*": [ function( prop, value ) {
+ var tween = this.createTween( prop, value ),
+ target = tween.cur(),
+ parts = rfxnum.exec( value ),
+ unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
+
+ // Starting value computation is required for potential unit mismatches
+ start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
+ rfxnum.exec( jQuery.css( tween.elem, prop ) ),
+ scale = 1,
+ maxIterations = 20;
+
+ if ( start && start[ 3 ] !== unit ) {
+ // Trust units reported by jQuery.css
+ unit = unit || start[ 3 ];
+
+ // Make sure we update the tween properties later on
+ parts = parts || [];
+
+ // Iteratively approximate from a nonzero starting point
+ start = +target || 1;
+
+ do {
+ // If previous iteration zeroed out, double until we get *something*.
+ // Use string for doubling so we don't accidentally see scale as unchanged below
+ scale = scale || ".5";
+
+ // Adjust and apply
+ start = start / scale;
+ jQuery.style( tween.elem, prop, start + unit );
+
+ // Update scale, tolerating zero or NaN from tween.cur(),
+ // break the loop if scale is unchanged or perfect, or if we've just had enough
+ } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
+ }
+
+ // Update tween properties
+ if ( parts ) {
+ start = tween.start = +start || +target || 0;
+ tween.unit = unit;
+ // If a +=/-= token was provided, we're doing a relative animation
+ tween.end = parts[ 1 ] ?
+ start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
+ +parts[ 2 ];
+ }
+
+ return tween;
+ } ]
+ };
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+ setTimeout(function() {
+ fxNow = undefined;
+ });
+ return ( fxNow = jQuery.now() );
+}
+
+// Generate parameters to create a standard animation
+function genFx( type, includeWidth ) {
+ var which,
+ i = 0,
+ attrs = { height: type };
+
+ // If we include width, step value is 1 to do all cssExpand values,
+ // otherwise step value is 2 to skip over Left and Right
+ includeWidth = includeWidth ? 1 : 0;
+ for ( ; i < 4 ; i += 2 - includeWidth ) {
+ which = cssExpand[ i ];
+ attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
+ }
+
+ if ( includeWidth ) {
+ attrs.opacity = attrs.width = type;
+ }
+
+ return attrs;
+}
+
+function createTween( value, prop, animation ) {
+ var tween,
+ collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
+ index = 0,
+ length = collection.length;
+ for ( ; index < length; index++ ) {
+ if ( (tween = collection[ index ].call( animation, prop, value )) ) {
+
+ // We're done with this property
+ return tween;
+ }
+ }
+}
+
+function defaultPrefilter( elem, props, opts ) {
+ /* jshint validthis: true */
+ var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
+ anim = this,
+ orig = {},
+ style = elem.style,
+ hidden = elem.nodeType && isHidden( elem ),
+ dataShow = data_priv.get( elem, "fxshow" );
+
+ // Handle queue: false promises
+ if ( !opts.queue ) {
+ hooks = jQuery._queueHooks( elem, "fx" );
+ if ( hooks.unqueued == null ) {
+ hooks.unqueued = 0;
+ oldfire = hooks.empty.fire;
+ hooks.empty.fire = function() {
+ if ( !hooks.unqueued ) {
+ oldfire();
+ }
+ };
+ }
+ hooks.unqueued++;
+
+ anim.always(function() {
+ // Ensure the complete handler is called before this completes
+ anim.always(function() {
+ hooks.unqueued--;
+ if ( !jQuery.queue( elem, "fx" ).length ) {
+ hooks.empty.fire();
+ }
+ });
+ });
+ }
+
+ // Height/width overflow pass
+ if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
+ // Make sure that nothing sneaks out
+ // Record all 3 overflow attributes because IE9-10 do not
+ // change the overflow attribute when overflowX and
+ // overflowY are set to the same value
+ opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
+
+ // Set display property to inline-block for height/width
+ // animations on inline elements that are having width/height animated
+ display = jQuery.css( elem, "display" );
+
+ // Test default display if display is currently "none"
+ checkDisplay = display === "none" ?
+ data_priv.get( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
+
+ if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {
+ style.display = "inline-block";
+ }
+ }
+
+ if ( opts.overflow ) {
+ style.overflow = "hidden";
+ anim.always(function() {
+ style.overflow = opts.overflow[ 0 ];
+ style.overflowX = opts.overflow[ 1 ];
+ style.overflowY = opts.overflow[ 2 ];
+ });
+ }
+
+ // show/hide pass
+ for ( prop in props ) {
+ value = props[ prop ];
+ if ( rfxtypes.exec( value ) ) {
+ delete props[ prop ];
+ toggle = toggle || value === "toggle";
+ if ( value === ( hidden ? "hide" : "show" ) ) {
+
+ // If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden
+ if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
+ hidden = true;
+ } else {
+ continue;
+ }
+ }
+ orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
+
+ // Any non-fx value stops us from restoring the original display value
+ } else {
+ display = undefined;
+ }
+ }
+
+ if ( !jQuery.isEmptyObject( orig ) ) {
+ if ( dataShow ) {
+ if ( "hidden" in dataShow ) {
+ hidden = dataShow.hidden;
+ }
+ } else {
+ dataShow = data_priv.access( elem, "fxshow", {} );
+ }
+
+ // Store state if its toggle - enables .stop().toggle() to "reverse"
+ if ( toggle ) {
+ dataShow.hidden = !hidden;
+ }
+ if ( hidden ) {
+ jQuery( elem ).show();
+ } else {
+ anim.done(function() {
+ jQuery( elem ).hide();
+ });
+ }
+ anim.done(function() {
+ var prop;
+
+ data_priv.remove( elem, "fxshow" );
+ for ( prop in orig ) {
+ jQuery.style( elem, prop, orig[ prop ] );
+ }
+ });
+ for ( prop in orig ) {
+ tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
+
+ if ( !( prop in dataShow ) ) {
+ dataShow[ prop ] = tween.start;
+ if ( hidden ) {
+ tween.end = tween.start;
+ tween.start = prop === "width" || prop === "height" ? 1 : 0;
+ }
+ }
+ }
+
+ // If this is a noop like .hide().hide(), restore an overwritten display value
+ } else if ( (display === "none" ? defaultDisplay( elem.nodeName ) : display) === "inline" ) {
+ style.display = display;
+ }
+}
+
+function propFilter( props, specialEasing ) {
+ var index, name, easing, value, hooks;
+
+ // camelCase, specialEasing and expand cssHook pass
+ for ( index in props ) {
+ name = jQuery.camelCase( index );
+ easing = specialEasing[ name ];
+ value = props[ index ];
+ if ( jQuery.isArray( value ) ) {
+ easing = value[ 1 ];
+ value = props[ index ] = value[ 0 ];
+ }
+
+ if ( index !== name ) {
+ props[ name ] = value;
+ delete props[ index ];
+ }
+
+ hooks = jQuery.cssHooks[ name ];
+ if ( hooks && "expand" in hooks ) {
+ value = hooks.expand( value );
+ delete props[ name ];
+
+ // Not quite $.extend, this won't overwrite existing keys.
+ // Reusing 'index' because we have the correct "name"
+ for ( index in value ) {
+ if ( !( index in props ) ) {
+ props[ index ] = value[ index ];
+ specialEasing[ index ] = easing;
+ }
+ }
+ } else {
+ specialEasing[ name ] = easing;
+ }
+ }
+}
+
+function Animation( elem, properties, options ) {
+ var result,
+ stopped,
+ index = 0,
+ length = animationPrefilters.length,
+ deferred = jQuery.Deferred().always( function() {
+ // Don't match elem in the :animated selector
+ delete tick.elem;
+ }),
+ tick = function() {
+ if ( stopped ) {
+ return false;
+ }
+ var currentTime = fxNow || createFxNow(),
+ remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
+ // Support: Android 2.3
+ // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
+ temp = remaining / animation.duration || 0,
+ percent = 1 - temp,
+ index = 0,
+ length = animation.tweens.length;
+
+ for ( ; index < length ; index++ ) {
+ animation.tweens[ index ].run( percent );
+ }
+
+ deferred.notifyWith( elem, [ animation, percent, remaining ]);
+
+ if ( percent < 1 && length ) {
+ return remaining;
+ } else {
+ deferred.resolveWith( elem, [ animation ] );
+ return false;
+ }
+ },
+ animation = deferred.promise({
+ elem: elem,
+ props: jQuery.extend( {}, properties ),
+ opts: jQuery.extend( true, { specialEasing: {} }, options ),
+ originalProperties: properties,
+ originalOptions: options,
+ startTime: fxNow || createFxNow(),
+ duration: options.duration,
+ tweens: [],
+ createTween: function( prop, end ) {
+ var tween = jQuery.Tween( elem, animation.opts, prop, end,
+ animation.opts.specialEasing[ prop ] || animation.opts.easing );
+ animation.tweens.push( tween );
+ return tween;
+ },
+ stop: function( gotoEnd ) {
+ var index = 0,
+ // If we are going to the end, we want to run all the tweens
+ // otherwise we skip this part
+ length = gotoEnd ? animation.tweens.length : 0;
+ if ( stopped ) {
+ return this;
+ }
+ stopped = true;
+ for ( ; index < length ; index++ ) {
+ animation.tweens[ index ].run( 1 );
+ }
+
+ // Resolve when we played the last frame; otherwise, reject
+ if ( gotoEnd ) {
+ deferred.resolveWith( elem, [ animation, gotoEnd ] );
+ } else {
+ deferred.rejectWith( elem, [ animation, gotoEnd ] );
+ }
+ return this;
+ }
+ }),
+ props = animation.props;
+
+ propFilter( props, animation.opts.specialEasing );
+
+ for ( ; index < length ; index++ ) {
+ result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
+ if ( result ) {
+ return result;
+ }
+ }
+
+ jQuery.map( props, createTween, animation );
+
+ if ( jQuery.isFunction( animation.opts.start ) ) {
+ animation.opts.start.call( elem, animation );
+ }
+
+ jQuery.fx.timer(
+ jQuery.extend( tick, {
+ elem: elem,
+ anim: animation,
+ queue: animation.opts.queue
+ })
+ );
+
+ // attach callbacks from options
+ return animation.progress( animation.opts.progress )
+ .done( animation.opts.done, animation.opts.complete )
+ .fail( animation.opts.fail )
+ .always( animation.opts.always );
+}
+
+jQuery.Animation = jQuery.extend( Animation, {
+
+ tweener: function( props, callback ) {
+ if ( jQuery.isFunction( props ) ) {
+ callback = props;
+ props = [ "*" ];
+ } else {
+ props = props.split(" ");
+ }
+
+ var prop,
+ index = 0,
+ length = props.length;
+
+ for ( ; index < length ; index++ ) {
+ prop = props[ index ];
+ tweeners[ prop ] = tweeners[ prop ] || [];
+ tweeners[ prop ].unshift( callback );
+ }
+ },
+
+ prefilter: function( callback, prepend ) {
+ if ( prepend ) {
+ animationPrefilters.unshift( callback );
+ } else {
+ animationPrefilters.push( callback );
+ }
+ }
+});
+
+jQuery.speed = function( speed, easing, fn ) {
+ var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
+ complete: fn || !fn && easing ||
+ jQuery.isFunction( speed ) && speed,
+ duration: speed,
+ easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
+ };
+
+ opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+ opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
+
+ // Normalize opt.queue - true/undefined/null -> "fx"
+ if ( opt.queue == null || opt.queue === true ) {
+ opt.queue = "fx";
+ }
+
+ // Queueing
+ opt.old = opt.complete;
+
+ opt.complete = function() {
+ if ( jQuery.isFunction( opt.old ) ) {
+ opt.old.call( this );
+ }
+
+ if ( opt.queue ) {
+ jQuery.dequeue( this, opt.queue );
+ }
+ };
+
+ return opt;
+};
+
+jQuery.fn.extend({
+ fadeTo: function( speed, to, easing, callback ) {
+
+ // Show any hidden elements after setting opacity to 0
+ return this.filter( isHidden ).css( "opacity", 0 ).show()
+
+ // Animate to the value specified
+ .end().animate({ opacity: to }, speed, easing, callback );
+ },
+ animate: function( prop, speed, easing, callback ) {
+ var empty = jQuery.isEmptyObject( prop ),
+ optall = jQuery.speed( speed, easing, callback ),
+ doAnimation = function() {
+ // Operate on a copy of prop so per-property easing won't be lost
+ var anim = Animation( this, jQuery.extend( {}, prop ), optall );
+
+ // Empty animations, or finishing resolves immediately
+ if ( empty || data_priv.get( this, "finish" ) ) {
+ anim.stop( true );
+ }
+ };
+ doAnimation.finish = doAnimation;
+
+ return empty || optall.queue === false ?
+ this.each( doAnimation ) :
+ this.queue( optall.queue, doAnimation );
+ },
+ stop: function( type, clearQueue, gotoEnd ) {
+ var stopQueue = function( hooks ) {
+ var stop = hooks.stop;
+ delete hooks.stop;
+ stop( gotoEnd );
+ };
+
+ if ( typeof type !== "string" ) {
+ gotoEnd = clearQueue;
+ clearQueue = type;
+ type = undefined;
+ }
+ if ( clearQueue && type !== false ) {
+ this.queue( type || "fx", [] );
+ }
+
+ return this.each(function() {
+ var dequeue = true,
+ index = type != null && type + "queueHooks",
+ timers = jQuery.timers,
+ data = data_priv.get( this );
+
+ if ( index ) {
+ if ( data[ index ] && data[ index ].stop ) {
+ stopQueue( data[ index ] );
+ }
+ } else {
+ for ( index in data ) {
+ if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
+ stopQueue( data[ index ] );
+ }
+ }
+ }
+
+ for ( index = timers.length; index--; ) {
+ if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
+ timers[ index ].anim.stop( gotoEnd );
+ dequeue = false;
+ timers.splice( index, 1 );
+ }
+ }
+
+ // Start the next in the queue if the last step wasn't forced.
+ // Timers currently will call their complete callbacks, which
+ // will dequeue but only if they were gotoEnd.
+ if ( dequeue || !gotoEnd ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ finish: function( type ) {
+ if ( type !== false ) {
+ type = type || "fx";
+ }
+ return this.each(function() {
+ var index,
+ data = data_priv.get( this ),
+ queue = data[ type + "queue" ],
+ hooks = data[ type + "queueHooks" ],
+ timers = jQuery.timers,
+ length = queue ? queue.length : 0;
+
+ // Enable finishing flag on private data
+ data.finish = true;
+
+ // Empty the queue first
+ jQuery.queue( this, type, [] );
+
+ if ( hooks && hooks.stop ) {
+ hooks.stop.call( this, true );
+ }
+
+ // Look for any active animations, and finish them
+ for ( index = timers.length; index--; ) {
+ if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
+ timers[ index ].anim.stop( true );
+ timers.splice( index, 1 );
+ }
+ }
+
+ // Look for any animations in the old queue and finish them
+ for ( index = 0; index < length; index++ ) {
+ if ( queue[ index ] && queue[ index ].finish ) {
+ queue[ index ].finish.call( this );
+ }
+ }
+
+ // Turn off finishing flag
+ delete data.finish;
+ });
+ }
+});
+
+jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
+ var cssFn = jQuery.fn[ name ];
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return speed == null || typeof speed === "boolean" ?
+ cssFn.apply( this, arguments ) :
+ this.animate( genFx( name, true ), speed, easing, callback );
+ };
+});
+
+// Generate shortcuts for custom animations
+jQuery.each({
+ slideDown: genFx("show"),
+ slideUp: genFx("hide"),
+ slideToggle: genFx("toggle"),
+ fadeIn: { opacity: "show" },
+ fadeOut: { opacity: "hide" },
+ fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return this.animate( props, speed, easing, callback );
+ };
+});
+
+jQuery.timers = [];
+jQuery.fx.tick = function() {
+ var timer,
+ i = 0,
+ timers = jQuery.timers;
+
+ fxNow = jQuery.now();
+
+ for ( ; i < timers.length; i++ ) {
+ timer = timers[ i ];
+ // Checks the timer has not already been removed
+ if ( !timer() && timers[ i ] === timer ) {
+ timers.splice( i--, 1 );
+ }
+ }
+
+ if ( !timers.length ) {
+ jQuery.fx.stop();
+ }
+ fxNow = undefined;
+};
+
+jQuery.fx.timer = function( timer ) {
+ jQuery.timers.push( timer );
+ if ( timer() ) {
+ jQuery.fx.start();
+ } else {
+ jQuery.timers.pop();
+ }
+};
+
+jQuery.fx.interval = 13;
+
+jQuery.fx.start = function() {
+ if ( !timerId ) {
+ timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
+ }
+};
+
+jQuery.fx.stop = function() {
+ clearInterval( timerId );
+ timerId = null;
+};
+
+jQuery.fx.speeds = {
+ slow: 600,
+ fast: 200,
+ // Default speed
+ _default: 400
+};
+
+
+// Based off of the plugin by Clint Helfers, with permission.
+// http://blindsignals.com/index.php/2009/07/jquery-delay/
+jQuery.fn.delay = function( time, type ) {
+ time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+ type = type || "fx";
+
+ return this.queue( type, function( next, hooks ) {
+ var timeout = setTimeout( next, time );
+ hooks.stop = function() {
+ clearTimeout( timeout );
+ };
+ });
+};
+
+
+(function() {
+ var input = document.createElement( "input" ),
+ select = document.createElement( "select" ),
+ opt = select.appendChild( document.createElement( "option" ) );
+
+ input.type = "checkbox";
+
+ // Support: iOS<=5.1, Android<=4.2+
+ // Default value for a checkbox should be "on"
+ support.checkOn = input.value !== "";
+
+ // Support: IE<=11+
+ // Must access selectedIndex to make default options select
+ support.optSelected = opt.selected;
+
+ // Support: Android<=2.3
+ // Options inside disabled selects are incorrectly marked as disabled
+ select.disabled = true;
+ support.optDisabled = !opt.disabled;
+
+ // Support: IE<=11+
+ // An input loses its value after becoming a radio
+ input = document.createElement( "input" );
+ input.value = "t";
+ input.type = "radio";
+ support.radioValue = input.value === "t";
+})();
+
+
+var nodeHook, boolHook,
+ attrHandle = jQuery.expr.attrHandle;
+
+jQuery.fn.extend({
+ attr: function( name, value ) {
+ return access( this, jQuery.attr, name, value, arguments.length > 1 );
+ },
+
+ removeAttr: function( name ) {
+ return this.each(function() {
+ jQuery.removeAttr( this, name );
+ });
+ }
+});
+
+jQuery.extend({
+ attr: function( elem, name, value ) {
+ var hooks, ret,
+ nType = elem.nodeType;
+
+ // don't get/set attributes on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ // Fallback to prop when attributes are not supported
+ if ( typeof elem.getAttribute === strundefined ) {
+ return jQuery.prop( elem, name, value );
+ }
+
+ // All attributes are lowercase
+ // Grab necessary hook if one is defined
+ if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
+ name = name.toLowerCase();
+ hooks = jQuery.attrHooks[ name ] ||
+ ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
+ }
+
+ if ( value !== undefined ) {
+
+ if ( value === null ) {
+ jQuery.removeAttr( elem, name );
+
+ } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ elem.setAttribute( name, value + "" );
+ return value;
+ }
+
+ } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+ ret = jQuery.find.attr( elem, name );
+
+ // Non-existent attributes return null, we normalize to undefined
+ return ret == null ?
+ undefined :
+ ret;
+ }
+ },
+
+ removeAttr: function( elem, value ) {
+ var name, propName,
+ i = 0,
+ attrNames = value && value.match( rnotwhite );
+
+ if ( attrNames && elem.nodeType === 1 ) {
+ while ( (name = attrNames[i++]) ) {
+ propName = jQuery.propFix[ name ] || name;
+
+ // Boolean attributes get special treatment (#10870)
+ if ( jQuery.expr.match.bool.test( name ) ) {
+ // Set corresponding property to false
+ elem[ propName ] = false;
+ }
+
+ elem.removeAttribute( name );
+ }
+ }
+ },
+
+ attrHooks: {
+ type: {
+ set: function( elem, value ) {
+ if ( !support.radioValue && value === "radio" &&
+ jQuery.nodeName( elem, "input" ) ) {
+ var val = elem.value;
+ elem.setAttribute( "type", value );
+ if ( val ) {
+ elem.value = val;
+ }
+ return value;
+ }
+ }
+ }
+ }
+});
+
+// Hooks for boolean attributes
+boolHook = {
+ set: function( elem, value, name ) {
+ if ( value === false ) {
+ // Remove boolean attributes when set to false
+ jQuery.removeAttr( elem, name );
+ } else {
+ elem.setAttribute( name, name );
+ }
+ return name;
+ }
+};
+jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
+ var getter = attrHandle[ name ] || jQuery.find.attr;
+
+ attrHandle[ name ] = function( elem, name, isXML ) {
+ var ret, handle;
+ if ( !isXML ) {
+ // Avoid an infinite loop by temporarily removing this function from the getter
+ handle = attrHandle[ name ];
+ attrHandle[ name ] = ret;
+ ret = getter( elem, name, isXML ) != null ?
+ name.toLowerCase() :
+ null;
+ attrHandle[ name ] = handle;
+ }
+ return ret;
+ };
+});
+
+
+
+
+var rfocusable = /^(?:input|select|textarea|button)$/i;
+
+jQuery.fn.extend({
+ prop: function( name, value ) {
+ return access( this, jQuery.prop, name, value, arguments.length > 1 );
+ },
+
+ removeProp: function( name ) {
+ return this.each(function() {
+ delete this[ jQuery.propFix[ name ] || name ];
+ });
+ }
+});
+
+jQuery.extend({
+ propFix: {
+ "for": "htmlFor",
+ "class": "className"
+ },
+
+ prop: function( elem, name, value ) {
+ var ret, hooks, notxml,
+ nType = elem.nodeType;
+
+ // Don't get/set properties on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ if ( notxml ) {
+ // Fix name and attach hooks
+ name = jQuery.propFix[ name ] || name;
+ hooks = jQuery.propHooks[ name ];
+ }
+
+ if ( value !== undefined ) {
+ return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
+ ret :
+ ( elem[ name ] = value );
+
+ } else {
+ return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
+ ret :
+ elem[ name ];
+ }
+ },
+
+ propHooks: {
+ tabIndex: {
+ get: function( elem ) {
+ return elem.hasAttribute( "tabindex" ) || rfocusable.test( elem.nodeName ) || elem.href ?
+ elem.tabIndex :
+ -1;
+ }
+ }
+ }
+});
+
+if ( !support.optSelected ) {
+ jQuery.propHooks.selected = {
+ get: function( elem ) {
+ var parent = elem.parentNode;
+ if ( parent && parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ return null;
+ }
+ };
+}
+
+jQuery.each([
+ "tabIndex",
+ "readOnly",
+ "maxLength",
+ "cellSpacing",
+ "cellPadding",
+ "rowSpan",
+ "colSpan",
+ "useMap",
+ "frameBorder",
+ "contentEditable"
+], function() {
+ jQuery.propFix[ this.toLowerCase() ] = this;
+});
+
+
+
+
+var rclass = /[\t\r\n\f]/g;
+
+jQuery.fn.extend({
+ addClass: function( value ) {
+ var classes, elem, cur, clazz, j, finalValue,
+ proceed = typeof value === "string" && value,
+ i = 0,
+ len = this.length;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).addClass( value.call( this, j, this.className ) );
+ });
+ }
+
+ if ( proceed ) {
+ // The disjunction here is for better compressibility (see removeClass)
+ classes = ( value || "" ).match( rnotwhite ) || [];
+
+ for ( ; i < len; i++ ) {
+ elem = this[ i ];
+ cur = elem.nodeType === 1 && ( elem.className ?
+ ( " " + elem.className + " " ).replace( rclass, " " ) :
+ " "
+ );
+
+ if ( cur ) {
+ j = 0;
+ while ( (clazz = classes[j++]) ) {
+ if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
+ cur += clazz + " ";
+ }
+ }
+
+ // only assign if different to avoid unneeded rendering.
+ finalValue = jQuery.trim( cur );
+ if ( elem.className !== finalValue ) {
+ elem.className = finalValue;
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ removeClass: function( value ) {
+ var classes, elem, cur, clazz, j, finalValue,
+ proceed = arguments.length === 0 || typeof value === "string" && value,
+ i = 0,
+ len = this.length;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).removeClass( value.call( this, j, this.className ) );
+ });
+ }
+ if ( proceed ) {
+ classes = ( value || "" ).match( rnotwhite ) || [];
+
+ for ( ; i < len; i++ ) {
+ elem = this[ i ];
+ // This expression is here for better compressibility (see addClass)
+ cur = elem.nodeType === 1 && ( elem.className ?
+ ( " " + elem.className + " " ).replace( rclass, " " ) :
+ ""
+ );
+
+ if ( cur ) {
+ j = 0;
+ while ( (clazz = classes[j++]) ) {
+ // Remove *all* instances
+ while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
+ cur = cur.replace( " " + clazz + " ", " " );
+ }
+ }
+
+ // Only assign if different to avoid unneeded rendering.
+ finalValue = value ? jQuery.trim( cur ) : "";
+ if ( elem.className !== finalValue ) {
+ elem.className = finalValue;
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ toggleClass: function( value, stateVal ) {
+ var type = typeof value;
+
+ if ( typeof stateVal === "boolean" && type === "string" ) {
+ return stateVal ? this.addClass( value ) : this.removeClass( value );
+ }
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+ });
+ }
+
+ return this.each(function() {
+ if ( type === "string" ) {
+ // Toggle individual class names
+ var className,
+ i = 0,
+ self = jQuery( this ),
+ classNames = value.match( rnotwhite ) || [];
+
+ while ( (className = classNames[ i++ ]) ) {
+ // Check each className given, space separated list
+ if ( self.hasClass( className ) ) {
+ self.removeClass( className );
+ } else {
+ self.addClass( className );
+ }
+ }
+
+ // Toggle whole class name
+ } else if ( type === strundefined || type === "boolean" ) {
+ if ( this.className ) {
+ // store className if set
+ data_priv.set( this, "__className__", this.className );
+ }
+
+ // If the element has a class name or if we're passed `false`,
+ // then remove the whole classname (if there was one, the above saved it).
+ // Otherwise bring back whatever was previously saved (if anything),
+ // falling back to the empty string if nothing was stored.
+ this.className = this.className || value === false ? "" : data_priv.get( this, "__className__" ) || "";
+ }
+ });
+ },
+
+ hasClass: function( selector ) {
+ var className = " " + selector + " ",
+ i = 0,
+ l = this.length;
+ for ( ; i < l; i++ ) {
+ if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+});
+
+
+
+
+var rreturn = /\r/g;
+
+jQuery.fn.extend({
+ val: function( value ) {
+ var hooks, ret, isFunction,
+ elem = this[0];
+
+ if ( !arguments.length ) {
+ if ( elem ) {
+ hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+ return ret;
+ }
+
+ ret = elem.value;
+
+ return typeof ret === "string" ?
+ // Handle most common string cases
+ ret.replace(rreturn, "") :
+ // Handle cases where value is null/undef or number
+ ret == null ? "" : ret;
+ }
+
+ return;
+ }
+
+ isFunction = jQuery.isFunction( value );
+
+ return this.each(function( i ) {
+ var val;
+
+ if ( this.nodeType !== 1 ) {
+ return;
+ }
+
+ if ( isFunction ) {
+ val = value.call( this, i, jQuery( this ).val() );
+ } else {
+ val = value;
+ }
+
+ // Treat null/undefined as ""; convert numbers to string
+ if ( val == null ) {
+ val = "";
+
+ } else if ( typeof val === "number" ) {
+ val += "";
+
+ } else if ( jQuery.isArray( val ) ) {
+ val = jQuery.map( val, function( value ) {
+ return value == null ? "" : value + "";
+ });
+ }
+
+ hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+ // If set returns undefined, fall back to normal setting
+ if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+ this.value = val;
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ valHooks: {
+ option: {
+ get: function( elem ) {
+ var val = jQuery.find.attr( elem, "value" );
+ return val != null ?
+ val :
+ // Support: IE10-11+
+ // option.text throws exceptions (#14686, #14858)
+ jQuery.trim( jQuery.text( elem ) );
+ }
+ },
+ select: {
+ get: function( elem ) {
+ var value, option,
+ options = elem.options,
+ index = elem.selectedIndex,
+ one = elem.type === "select-one" || index < 0,
+ values = one ? null : [],
+ max = one ? index + 1 : options.length,
+ i = index < 0 ?
+ max :
+ one ? index : 0;
+
+ // Loop through all the selected options
+ for ( ; i < max; i++ ) {
+ option = options[ i ];
+
+ // IE6-9 doesn't update selected after form reset (#2551)
+ if ( ( option.selected || i === index ) &&
+ // Don't return options that are disabled or in a disabled optgroup
+ ( support.optDisabled ? !option.disabled : option.getAttribute( "disabled" ) === null ) &&
+ ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
+
+ // Get the specific value for the option
+ value = jQuery( option ).val();
+
+ // We don't need an array for one selects
+ if ( one ) {
+ return value;
+ }
+
+ // Multi-Selects return an array
+ values.push( value );
+ }
+ }
+
+ return values;
+ },
+
+ set: function( elem, value ) {
+ var optionSet, option,
+ options = elem.options,
+ values = jQuery.makeArray( value ),
+ i = options.length;
+
+ while ( i-- ) {
+ option = options[ i ];
+ if ( (option.selected = jQuery.inArray( option.value, values ) >= 0) ) {
+ optionSet = true;
+ }
+ }
+
+ // Force browsers to behave consistently when non-matching value is set
+ if ( !optionSet ) {
+ elem.selectedIndex = -1;
+ }
+ return values;
+ }
+ }
+ }
+});
+
+// Radios and checkboxes getter/setter
+jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = {
+ set: function( elem, value ) {
+ if ( jQuery.isArray( value ) ) {
+ return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+ }
+ }
+ };
+ if ( !support.checkOn ) {
+ jQuery.valHooks[ this ].get = function( elem ) {
+ return elem.getAttribute("value") === null ? "on" : elem.value;
+ };
+ }
+});
+
+
+
+
+// Return jQuery for attributes-only inclusion
+
+
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+ "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+
+ // Handle event binding
+ jQuery.fn[ name ] = function( data, fn ) {
+ return arguments.length > 0 ?
+ this.on( name, null, data, fn ) :
+ this.trigger( name );
+ };
+});
+
+jQuery.fn.extend({
+ hover: function( fnOver, fnOut ) {
+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+ },
+
+ bind: function( types, data, fn ) {
+ return this.on( types, null, data, fn );
+ },
+ unbind: function( types, fn ) {
+ return this.off( types, null, fn );
+ },
+
+ delegate: function( selector, types, data, fn ) {
+ return this.on( types, selector, data, fn );
+ },
+ undelegate: function( selector, types, fn ) {
+ // ( namespace ) or ( selector, types [, fn] )
+ return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
+ }
+});
+
+
+var nonce = jQuery.now();
+
+var rquery = (/\?/);
+
+
+
+// Support: Android 2.3
+// Workaround failure to string-cast null input
+jQuery.parseJSON = function( data ) {
+ return JSON.parse( data + "" );
+};
+
+
+// Cross-browser xml parsing
+jQuery.parseXML = function( data ) {
+ var xml, tmp;
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+
+ // Support: IE9
+ try {
+ tmp = new DOMParser();
+ xml = tmp.parseFromString( data, "text/xml" );
+ } catch ( e ) {
+ xml = undefined;
+ }
+
+ if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
+ jQuery.error( "Invalid XML: " + data );
+ }
+ return xml;
+};
+
+
+var
+ rhash = /#.*$/,
+ rts = /([?&])_=[^&]*/,
+ rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
+ // #7653, #8125, #8152: local protocol detection
+ rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
+ rnoContent = /^(?:GET|HEAD)$/,
+ rprotocol = /^\/\//,
+ rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
+
+ /* Prefilters
+ * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+ * 2) These are called:
+ * - BEFORE asking for a transport
+ * - AFTER param serialization (s.data is a string if s.processData is true)
+ * 3) key is the dataType
+ * 4) the catchall symbol "*" can be used
+ * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+ */
+ prefilters = {},
+
+ /* Transports bindings
+ * 1) key is the dataType
+ * 2) the catchall symbol "*" can be used
+ * 3) selection will start with transport dataType and THEN go to "*" if needed
+ */
+ transports = {},
+
+ // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+ allTypes = "*/".concat( "*" ),
+
+ // Document location
+ ajaxLocation = window.location.href,
+
+ // Segment location into parts
+ ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+ // dataTypeExpression is optional and defaults to "*"
+ return function( dataTypeExpression, func ) {
+
+ if ( typeof dataTypeExpression !== "string" ) {
+ func = dataTypeExpression;
+ dataTypeExpression = "*";
+ }
+
+ var dataType,
+ i = 0,
+ dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];
+
+ if ( jQuery.isFunction( func ) ) {
+ // For each dataType in the dataTypeExpression
+ while ( (dataType = dataTypes[i++]) ) {
+ // Prepend if requested
+ if ( dataType[0] === "+" ) {
+ dataType = dataType.slice( 1 ) || "*";
+ (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
+
+ // Otherwise append
+ } else {
+ (structure[ dataType ] = structure[ dataType ] || []).push( func );
+ }
+ }
+ }
+ };
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
+
+ var inspected = {},
+ seekingTransport = ( structure === transports );
+
+ function inspect( dataType ) {
+ var selected;
+ inspected[ dataType ] = true;
+ jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
+ var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
+ if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
+ options.dataTypes.unshift( dataTypeOrTransport );
+ inspect( dataTypeOrTransport );
+ return false;
+ } else if ( seekingTransport ) {
+ return !( selected = dataTypeOrTransport );
+ }
+ });
+ return selected;
+ }
+
+ return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+ var key, deep,
+ flatOptions = jQuery.ajaxSettings.flatOptions || {};
+
+ for ( key in src ) {
+ if ( src[ key ] !== undefined ) {
+ ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
+ }
+ }
+ if ( deep ) {
+ jQuery.extend( true, target, deep );
+ }
+
+ return target;
+}
+
+/* Handles responses to an ajax request:
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+
+ var ct, type, finalDataType, firstDataType,
+ contents = s.contents,
+ dataTypes = s.dataTypes;
+
+ // Remove auto dataType and get content-type in the process
+ while ( dataTypes[ 0 ] === "*" ) {
+ dataTypes.shift();
+ if ( ct === undefined ) {
+ ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
+ }
+ }
+
+ // Check if we're dealing with a known content-type
+ if ( ct ) {
+ for ( type in contents ) {
+ if ( contents[ type ] && contents[ type ].test( ct ) ) {
+ dataTypes.unshift( type );
+ break;
+ }
+ }
+ }
+
+ // Check to see if we have a response for the expected dataType
+ if ( dataTypes[ 0 ] in responses ) {
+ finalDataType = dataTypes[ 0 ];
+ } else {
+ // Try convertible dataTypes
+ for ( type in responses ) {
+ if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+ finalDataType = type;
+ break;
+ }
+ if ( !firstDataType ) {
+ firstDataType = type;
+ }
+ }
+ // Or just use first one
+ finalDataType = finalDataType || firstDataType;
+ }
+
+ // If we found a dataType
+ // We add the dataType to the list if needed
+ // and return the corresponding response
+ if ( finalDataType ) {
+ if ( finalDataType !== dataTypes[ 0 ] ) {
+ dataTypes.unshift( finalDataType );
+ }
+ return responses[ finalDataType ];
+ }
+}
+
+/* Chain conversions given the request and the original response
+ * Also sets the responseXXX fields on the jqXHR instance
+ */
+function ajaxConvert( s, response, jqXHR, isSuccess ) {
+ var conv2, current, conv, tmp, prev,
+ converters = {},
+ // Work with a copy of dataTypes in case we need to modify it for conversion
+ dataTypes = s.dataTypes.slice();
+
+ // Create converters map with lowercased keys
+ if ( dataTypes[ 1 ] ) {
+ for ( conv in s.converters ) {
+ converters[ conv.toLowerCase() ] = s.converters[ conv ];
+ }
+ }
+
+ current = dataTypes.shift();
+
+ // Convert to each sequential dataType
+ while ( current ) {
+
+ if ( s.responseFields[ current ] ) {
+ jqXHR[ s.responseFields[ current ] ] = response;
+ }
+
+ // Apply the dataFilter if provided
+ if ( !prev && isSuccess && s.dataFilter ) {
+ response = s.dataFilter( response, s.dataType );
+ }
+
+ prev = current;
+ current = dataTypes.shift();
+
+ if ( current ) {
+
+ // There's only work to do if current dataType is non-auto
+ if ( current === "*" ) {
+
+ current = prev;
+
+ // Convert response if prev dataType is non-auto and differs from current
+ } else if ( prev !== "*" && prev !== current ) {
+
+ // Seek a direct converter
+ conv = converters[ prev + " " + current ] || converters[ "* " + current ];
+
+ // If none found, seek a pair
+ if ( !conv ) {
+ for ( conv2 in converters ) {
+
+ // If conv2 outputs current
+ tmp = conv2.split( " " );
+ if ( tmp[ 1 ] === current ) {
+
+ // If prev can be converted to accepted input
+ conv = converters[ prev + " " + tmp[ 0 ] ] ||
+ converters[ "* " + tmp[ 0 ] ];
+ if ( conv ) {
+ // Condense equivalence converters
+ if ( conv === true ) {
+ conv = converters[ conv2 ];
+
+ // Otherwise, insert the intermediate dataType
+ } else if ( converters[ conv2 ] !== true ) {
+ current = tmp[ 0 ];
+ dataTypes.unshift( tmp[ 1 ] );
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ // Apply converter (if not an equivalence)
+ if ( conv !== true ) {
+
+ // Unless errors are allowed to bubble, catch and return them
+ if ( conv && s[ "throws" ] ) {
+ response = conv( response );
+ } else {
+ try {
+ response = conv( response );
+ } catch ( e ) {
+ return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return { state: "success", data: response };
+}
+
+jQuery.extend({
+
+ // Counter for holding the number of active queries
+ active: 0,
+
+ // Last-Modified header cache for next request
+ lastModified: {},
+ etag: {},
+
+ ajaxSettings: {
+ url: ajaxLocation,
+ type: "GET",
+ isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
+ global: true,
+ processData: true,
+ async: true,
+ contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+ /*
+ timeout: 0,
+ data: null,
+ dataType: null,
+ username: null,
+ password: null,
+ cache: null,
+ throws: false,
+ traditional: false,
+ headers: {},
+ */
+
+ accepts: {
+ "*": allTypes,
+ text: "text/plain",
+ html: "text/html",
+ xml: "application/xml, text/xml",
+ json: "application/json, text/javascript"
+ },
+
+ contents: {
+ xml: /xml/,
+ html: /html/,
+ json: /json/
+ },
+
+ responseFields: {
+ xml: "responseXML",
+ text: "responseText",
+ json: "responseJSON"
+ },
+
+ // Data converters
+ // Keys separate source (or catchall "*") and destination types with a single space
+ converters: {
+
+ // Convert anything to text
+ "* text": String,
+
+ // Text to html (true = no transformation)
+ "text html": true,
+
+ // Evaluate text as a json expression
+ "text json": jQuery.parseJSON,
+
+ // Parse text as xml
+ "text xml": jQuery.parseXML
+ },
+
+ // For options that shouldn't be deep extended:
+ // you can add your own custom options here if
+ // and when you create one that shouldn't be
+ // deep extended (see ajaxExtend)
+ flatOptions: {
+ url: true,
+ context: true
+ }
+ },
+
+ // Creates a full fledged settings object into target
+ // with both ajaxSettings and settings fields.
+ // If target is omitted, writes into ajaxSettings.
+ ajaxSetup: function( target, settings ) {
+ return settings ?
+
+ // Building a settings object
+ ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
+
+ // Extending ajaxSettings
+ ajaxExtend( jQuery.ajaxSettings, target );
+ },
+
+ ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+ ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+ // Main method
+ ajax: function( url, options ) {
+
+ // If url is an object, simulate pre-1.5 signature
+ if ( typeof url === "object" ) {
+ options = url;
+ url = undefined;
+ }
+
+ // Force options to be an object
+ options = options || {};
+
+ var transport,
+ // URL without anti-cache param
+ cacheURL,
+ // Response headers
+ responseHeadersString,
+ responseHeaders,
+ // timeout handle
+ timeoutTimer,
+ // Cross-domain detection vars
+ parts,
+ // To know if global events are to be dispatched
+ fireGlobals,
+ // Loop variable
+ i,
+ // Create the final options object
+ s = jQuery.ajaxSetup( {}, options ),
+ // Callbacks context
+ callbackContext = s.context || s,
+ // Context for global events is callbackContext if it is a DOM node or jQuery collection
+ globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
+ jQuery( callbackContext ) :
+ jQuery.event,
+ // Deferreds
+ deferred = jQuery.Deferred(),
+ completeDeferred = jQuery.Callbacks("once memory"),
+ // Status-dependent callbacks
+ statusCode = s.statusCode || {},
+ // Headers (they are sent all at once)
+ requestHeaders = {},
+ requestHeadersNames = {},
+ // The jqXHR state
+ state = 0,
+ // Default abort message
+ strAbort = "canceled",
+ // Fake xhr
+ jqXHR = {
+ readyState: 0,
+
+ // Builds headers hashtable if needed
+ getResponseHeader: function( key ) {
+ var match;
+ if ( state === 2 ) {
+ if ( !responseHeaders ) {
+ responseHeaders = {};
+ while ( (match = rheaders.exec( responseHeadersString )) ) {
+ responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+ }
+ }
+ match = responseHeaders[ key.toLowerCase() ];
+ }
+ return match == null ? null : match;
+ },
+
+ // Raw string
+ getAllResponseHeaders: function() {
+ return state === 2 ? responseHeadersString : null;
+ },
+
+ // Caches the header
+ setRequestHeader: function( name, value ) {
+ var lname = name.toLowerCase();
+ if ( !state ) {
+ name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+ requestHeaders[ name ] = value;
+ }
+ return this;
+ },
+
+ // Overrides response content-type header
+ overrideMimeType: function( type ) {
+ if ( !state ) {
+ s.mimeType = type;
+ }
+ return this;
+ },
+
+ // Status-dependent callbacks
+ statusCode: function( map ) {
+ var code;
+ if ( map ) {
+ if ( state < 2 ) {
+ for ( code in map ) {
+ // Lazy-add the new callback in a way that preserves old ones
+ statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
+ }
+ } else {
+ // Execute the appropriate callbacks
+ jqXHR.always( map[ jqXHR.status ] );
+ }
+ }
+ return this;
+ },
+
+ // Cancel the request
+ abort: function( statusText ) {
+ var finalText = statusText || strAbort;
+ if ( transport ) {
+ transport.abort( finalText );
+ }
+ done( 0, finalText );
+ return this;
+ }
+ };
+
+ // Attach deferreds
+ deferred.promise( jqXHR ).complete = completeDeferred.add;
+ jqXHR.success = jqXHR.done;
+ jqXHR.error = jqXHR.fail;
+
+ // Remove hash character (#7531: and string promotion)
+ // Add protocol if not provided (prefilters might expect it)
+ // Handle falsy url in the settings object (#10093: consistency with old signature)
+ // We also use the url parameter if available
+ s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" )
+ .replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+
+ // Alias method option to type as per ticket #12004
+ s.type = options.method || options.type || s.method || s.type;
+
+ // Extract dataTypes list
+ s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
+
+ // A cross-domain request is in order when we have a protocol:host:port mismatch
+ if ( s.crossDomain == null ) {
+ parts = rurl.exec( s.url.toLowerCase() );
+ s.crossDomain = !!( parts &&
+ ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
+ ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
+ ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
+ );
+ }
+
+ // Convert data if not already a string
+ if ( s.data && s.processData && typeof s.data !== "string" ) {
+ s.data = jQuery.param( s.data, s.traditional );
+ }
+
+ // Apply prefilters
+ inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+ // If request was aborted inside a prefilter, stop there
+ if ( state === 2 ) {
+ return jqXHR;
+ }
+
+ // We can fire global events as of now if asked to
+ // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
+ fireGlobals = jQuery.event && s.global;
+
+ // Watch for a new set of requests
+ if ( fireGlobals && jQuery.active++ === 0 ) {
+ jQuery.event.trigger("ajaxStart");
+ }
+
+ // Uppercase the type
+ s.type = s.type.toUpperCase();
+
+ // Determine if request has content
+ s.hasContent = !rnoContent.test( s.type );
+
+ // Save the URL in case we're toying with the If-Modified-Since
+ // and/or If-None-Match header later on
+ cacheURL = s.url;
+
+ // More options handling for requests with no content
+ if ( !s.hasContent ) {
+
+ // If data is available, append data to url
+ if ( s.data ) {
+ cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
+ // #9682: remove data so that it's not used in an eventual retry
+ delete s.data;
+ }
+
+ // Add anti-cache in url if needed
+ if ( s.cache === false ) {
+ s.url = rts.test( cacheURL ) ?
+
+ // If there is already a '_' parameter, set its value
+ cacheURL.replace( rts, "$1_=" + nonce++ ) :
+
+ // Otherwise add one to the end
+ cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++;
+ }
+ }
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ if ( jQuery.lastModified[ cacheURL ] ) {
+ jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
+ }
+ if ( jQuery.etag[ cacheURL ] ) {
+ jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
+ }
+ }
+
+ // Set the correct header, if data is being sent
+ if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+ jqXHR.setRequestHeader( "Content-Type", s.contentType );
+ }
+
+ // Set the Accepts header for the server, depending on the dataType
+ jqXHR.setRequestHeader(
+ "Accept",
+ s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+ s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+ s.accepts[ "*" ]
+ );
+
+ // Check for headers option
+ for ( i in s.headers ) {
+ jqXHR.setRequestHeader( i, s.headers[ i ] );
+ }
+
+ // Allow custom headers/mimetypes and early abort
+ if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+ // Abort if not done already and return
+ return jqXHR.abort();
+ }
+
+ // Aborting is no longer a cancellation
+ strAbort = "abort";
+
+ // Install callbacks on deferreds
+ for ( i in { success: 1, error: 1, complete: 1 } ) {
+ jqXHR[ i ]( s[ i ] );
+ }
+
+ // Get transport
+ transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+ // If no transport, we auto-abort
+ if ( !transport ) {
+ done( -1, "No Transport" );
+ } else {
+ jqXHR.readyState = 1;
+
+ // Send global event
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+ }
+ // Timeout
+ if ( s.async && s.timeout > 0 ) {
+ timeoutTimer = setTimeout(function() {
+ jqXHR.abort("timeout");
+ }, s.timeout );
+ }
+
+ try {
+ state = 1;
+ transport.send( requestHeaders, done );
+ } catch ( e ) {
+ // Propagate exception as error if not done
+ if ( state < 2 ) {
+ done( -1, e );
+ // Simply rethrow otherwise
+ } else {
+ throw e;
+ }
+ }
+ }
+
+ // Callback for when everything is done
+ function done( status, nativeStatusText, responses, headers ) {
+ var isSuccess, success, error, response, modified,
+ statusText = nativeStatusText;
+
+ // Called once
+ if ( state === 2 ) {
+ return;
+ }
+
+ // State is "done" now
+ state = 2;
+
+ // Clear timeout if it exists
+ if ( timeoutTimer ) {
+ clearTimeout( timeoutTimer );
+ }
+
+ // Dereference transport for early garbage collection
+ // (no matter how long the jqXHR object will be used)
+ transport = undefined;
+
+ // Cache response headers
+ responseHeadersString = headers || "";
+
+ // Set readyState
+ jqXHR.readyState = status > 0 ? 4 : 0;
+
+ // Determine if successful
+ isSuccess = status >= 200 && status < 300 || status === 304;
+
+ // Get response data
+ if ( responses ) {
+ response = ajaxHandleResponses( s, jqXHR, responses );
+ }
+
+ // Convert no matter what (that way responseXXX fields are always set)
+ response = ajaxConvert( s, response, jqXHR, isSuccess );
+
+ // If successful, handle type chaining
+ if ( isSuccess ) {
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ modified = jqXHR.getResponseHeader("Last-Modified");
+ if ( modified ) {
+ jQuery.lastModified[ cacheURL ] = modified;
+ }
+ modified = jqXHR.getResponseHeader("etag");
+ if ( modified ) {
+ jQuery.etag[ cacheURL ] = modified;
+ }
+ }
+
+ // if no content
+ if ( status === 204 || s.type === "HEAD" ) {
+ statusText = "nocontent";
+
+ // if not modified
+ } else if ( status === 304 ) {
+ statusText = "notmodified";
+
+ // If we have data, let's convert it
+ } else {
+ statusText = response.state;
+ success = response.data;
+ error = response.error;
+ isSuccess = !error;
+ }
+ } else {
+ // Extract error from statusText and normalize for non-aborts
+ error = statusText;
+ if ( status || !statusText ) {
+ statusText = "error";
+ if ( status < 0 ) {
+ status = 0;
+ }
+ }
+ }
+
+ // Set data for the fake xhr object
+ jqXHR.status = status;
+ jqXHR.statusText = ( nativeStatusText || statusText ) + "";
+
+ // Success/Error
+ if ( isSuccess ) {
+ deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+ } else {
+ deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+ }
+
+ // Status-dependent callbacks
+ jqXHR.statusCode( statusCode );
+ statusCode = undefined;
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
+ [ jqXHR, s, isSuccess ? success : error ] );
+ }
+
+ // Complete
+ completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+ // Handle the global AJAX counter
+ if ( !( --jQuery.active ) ) {
+ jQuery.event.trigger("ajaxStop");
+ }
+ }
+ }
+
+ return jqXHR;
+ },
+
+ getJSON: function( url, data, callback ) {
+ return jQuery.get( url, data, callback, "json" );
+ },
+
+ getScript: function( url, callback ) {
+ return jQuery.get( url, undefined, callback, "script" );
+ }
+});
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+ jQuery[ method ] = function( url, data, callback, type ) {
+ // Shift arguments if data argument was omitted
+ if ( jQuery.isFunction( data ) ) {
+ type = type || callback;
+ callback = data;
+ data = undefined;
+ }
+
+ return jQuery.ajax({
+ url: url,
+ type: method,
+ dataType: type,
+ data: data,
+ success: callback
+ });
+ };
+});
+
+
+jQuery._evalUrl = function( url ) {
+ return jQuery.ajax({
+ url: url,
+ type: "GET",
+ dataType: "script",
+ async: false,
+ global: false,
+ "throws": true
+ });
+};
+
+
+jQuery.fn.extend({
+ wrapAll: function( html ) {
+ var wrap;
+
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).wrapAll( html.call(this, i) );
+ });
+ }
+
+ if ( this[ 0 ] ) {
+
+ // The elements to wrap the target around
+ wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
+
+ if ( this[ 0 ].parentNode ) {
+ wrap.insertBefore( this[ 0 ] );
+ }
+
+ wrap.map(function() {
+ var elem = this;
+
+ while ( elem.firstElementChild ) {
+ elem = elem.firstElementChild;
+ }
+
+ return elem;
+ }).append( this );
+ }
+
+ return this;
+ },
+
+ wrapInner: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).wrapInner( html.call(this, i) );
+ });
+ }
+
+ return this.each(function() {
+ var self = jQuery( this ),
+ contents = self.contents();
+
+ if ( contents.length ) {
+ contents.wrapAll( html );
+
+ } else {
+ self.append( html );
+ }
+ });
+ },
+
+ wrap: function( html ) {
+ var isFunction = jQuery.isFunction( html );
+
+ return this.each(function( i ) {
+ jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+ });
+ },
+
+ unwrap: function() {
+ return this.parent().each(function() {
+ if ( !jQuery.nodeName( this, "body" ) ) {
+ jQuery( this ).replaceWith( this.childNodes );
+ }
+ }).end();
+ }
+});
+
+
+jQuery.expr.filters.hidden = function( elem ) {
+ // Support: Opera <= 12.12
+ // Opera reports offsetWidths and offsetHeights less than zero on some elements
+ return elem.offsetWidth <= 0 && elem.offsetHeight <= 0;
+};
+jQuery.expr.filters.visible = function( elem ) {
+ return !jQuery.expr.filters.hidden( elem );
+};
+
+
+
+
+var r20 = /%20/g,
+ rbracket = /\[\]$/,
+ rCRLF = /\r?\n/g,
+ rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
+ rsubmittable = /^(?:input|select|textarea|keygen)/i;
+
+function buildParams( prefix, obj, traditional, add ) {
+ var name;
+
+ if ( jQuery.isArray( obj ) ) {
+ // Serialize array item.
+ jQuery.each( obj, function( i, v ) {
+ if ( traditional || rbracket.test( prefix ) ) {
+ // Treat each array item as a scalar.
+ add( prefix, v );
+
+ } else {
+ // Item is non-scalar (array or object), encode its numeric index.
+ buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
+ }
+ });
+
+ } else if ( !traditional && jQuery.type( obj ) === "object" ) {
+ // Serialize object item.
+ for ( name in obj ) {
+ buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+ }
+
+ } else {
+ // Serialize scalar item.
+ add( prefix, obj );
+ }
+}
+
+// Serialize an array of form elements or a set of
+// key/values into a query string
+jQuery.param = function( a, traditional ) {
+ var prefix,
+ s = [],
+ add = function( key, value ) {
+ // If value is a function, invoke it and return its value
+ value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
+ s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+ };
+
+ // Set traditional to true for jQuery <= 1.3.2 behavior.
+ if ( traditional === undefined ) {
+ traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
+ }
+
+ // If an array was passed in, assume that it is an array of form elements.
+ if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+ // Serialize the form elements
+ jQuery.each( a, function() {
+ add( this.name, this.value );
+ });
+
+ } else {
+ // If traditional, encode the "old" way (the way 1.3.2 or older
+ // did it), otherwise encode params recursively.
+ for ( prefix in a ) {
+ buildParams( prefix, a[ prefix ], traditional, add );
+ }
+ }
+
+ // Return the resulting serialization
+ return s.join( "&" ).replace( r20, "+" );
+};
+
+jQuery.fn.extend({
+ serialize: function() {
+ return jQuery.param( this.serializeArray() );
+ },
+ serializeArray: function() {
+ return this.map(function() {
+ // Can add propHook for "elements" to filter or add form elements
+ var elements = jQuery.prop( this, "elements" );
+ return elements ? jQuery.makeArray( elements ) : this;
+ })
+ .filter(function() {
+ var type = this.type;
+
+ // Use .is( ":disabled" ) so that fieldset[disabled] works
+ return this.name && !jQuery( this ).is( ":disabled" ) &&
+ rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
+ ( this.checked || !rcheckableType.test( type ) );
+ })
+ .map(function( i, elem ) {
+ var val = jQuery( this ).val();
+
+ return val == null ?
+ null :
+ jQuery.isArray( val ) ?
+ jQuery.map( val, function( val ) {
+ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }) :
+ { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }).get();
+ }
+});
+
+
+jQuery.ajaxSettings.xhr = function() {
+ try {
+ return new XMLHttpRequest();
+ } catch( e ) {}
+};
+
+var xhrId = 0,
+ xhrCallbacks = {},
+ xhrSuccessStatus = {
+ // file protocol always yields status code 0, assume 200
+ 0: 200,
+ // Support: IE9
+ // #1450: sometimes IE returns 1223 when it should be 204
+ 1223: 204
+ },
+ xhrSupported = jQuery.ajaxSettings.xhr();
+
+// Support: IE9
+// Open requests must be manually aborted on unload (#5280)
+// See https://support.microsoft.com/kb/2856746 for more info
+if ( window.attachEvent ) {
+ window.attachEvent( "onunload", function() {
+ for ( var key in xhrCallbacks ) {
+ xhrCallbacks[ key ]();
+ }
+ });
+}
+
+support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
+support.ajax = xhrSupported = !!xhrSupported;
+
+jQuery.ajaxTransport(function( options ) {
+ var callback;
+
+ // Cross domain only allowed if supported through XMLHttpRequest
+ if ( support.cors || xhrSupported && !options.crossDomain ) {
+ return {
+ send: function( headers, complete ) {
+ var i,
+ xhr = options.xhr(),
+ id = ++xhrId;
+
+ xhr.open( options.type, options.url, options.async, options.username, options.password );
+
+ // Apply custom fields if provided
+ if ( options.xhrFields ) {
+ for ( i in options.xhrFields ) {
+ xhr[ i ] = options.xhrFields[ i ];
+ }
+ }
+
+ // Override mime type if needed
+ if ( options.mimeType && xhr.overrideMimeType ) {
+ xhr.overrideMimeType( options.mimeType );
+ }
+
+ // X-Requested-With header
+ // For cross-domain requests, seeing as conditions for a preflight are
+ // akin to a jigsaw puzzle, we simply never set it to be sure.
+ // (it can always be set on a per-request basis or even using ajaxSetup)
+ // For same-domain requests, won't change header if already provided.
+ if ( !options.crossDomain && !headers["X-Requested-With"] ) {
+ headers["X-Requested-With"] = "XMLHttpRequest";
+ }
+
+ // Set headers
+ for ( i in headers ) {
+ xhr.setRequestHeader( i, headers[ i ] );
+ }
+
+ // Callback
+ callback = function( type ) {
+ return function() {
+ if ( callback ) {
+ delete xhrCallbacks[ id ];
+ callback = xhr.onload = xhr.onerror = null;
+
+ if ( type === "abort" ) {
+ xhr.abort();
+ } else if ( type === "error" ) {
+ complete(
+ // file: protocol always yields status 0; see #8605, #14207
+ xhr.status,
+ xhr.statusText
+ );
+ } else {
+ complete(
+ xhrSuccessStatus[ xhr.status ] || xhr.status,
+ xhr.statusText,
+ // Support: IE9
+ // Accessing binary-data responseText throws an exception
+ // (#11426)
+ typeof xhr.responseText === "string" ? {
+ text: xhr.responseText
+ } : undefined,
+ xhr.getAllResponseHeaders()
+ );
+ }
+ }
+ };
+ };
+
+ // Listen to events
+ xhr.onload = callback();
+ xhr.onerror = callback("error");
+
+ // Create the abort callback
+ callback = xhrCallbacks[ id ] = callback("abort");
+
+ try {
+ // Do send the request (this may raise an exception)
+ xhr.send( options.hasContent && options.data || null );
+ } catch ( e ) {
+ // #14683: Only rethrow if this hasn't been notified as an error yet
+ if ( callback ) {
+ throw e;
+ }
+ }
+ },
+
+ abort: function() {
+ if ( callback ) {
+ callback();
+ }
+ }
+ };
+ }
+});
+
+
+
+
+// Install script dataType
+jQuery.ajaxSetup({
+ accepts: {
+ script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
+ },
+ contents: {
+ script: /(?:java|ecma)script/
+ },
+ converters: {
+ "text script": function( text ) {
+ jQuery.globalEval( text );
+ return text;
+ }
+ }
+});
+
+// Handle cache's special case and crossDomain
+jQuery.ajaxPrefilter( "script", function( s ) {
+ if ( s.cache === undefined ) {
+ s.cache = false;
+ }
+ if ( s.crossDomain ) {
+ s.type = "GET";
+ }
+});
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function( s ) {
+ // This transport only deals with cross domain requests
+ if ( s.crossDomain ) {
+ var script, callback;
+ return {
+ send: function( _, complete ) {
+ script = jQuery("<script>").prop({
+ async: true,
+ charset: s.scriptCharset,
+ src: s.url
+ }).on(
+ "load error",
+ callback = function( evt ) {
+ script.remove();
+ callback = null;
+ if ( evt ) {
+ complete( evt.type === "error" ? 404 : 200, evt.type );
+ }
+ }
+ );
+ document.head.appendChild( script[ 0 ] );
+ },
+ abort: function() {
+ if ( callback ) {
+ callback();
+ }
+ }
+ };
+ }
+});
+
+
+
+
+var oldCallbacks = [],
+ rjsonp = /(=)\?(?=&|$)|\?\?/;
+
+// Default jsonp settings
+jQuery.ajaxSetup({
+ jsonp: "callback",
+ jsonpCallback: function() {
+ var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
+ this[ callback ] = true;
+ return callback;
+ }
+});
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+ var callbackName, overwritten, responseContainer,
+ jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
+ "url" :
+ typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
+ );
+
+ // Handle iff the expected data type is "jsonp" or we have a parameter to set
+ if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
+
+ // Get callback name, remembering preexisting value associated with it
+ callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
+ s.jsonpCallback() :
+ s.jsonpCallback;
+
+ // Insert callback into url or form data
+ if ( jsonProp ) {
+ s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
+ } else if ( s.jsonp !== false ) {
+ s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
+ }
+
+ // Use data converter to retrieve json after script execution
+ s.converters["script json"] = function() {
+ if ( !responseContainer ) {
+ jQuery.error( callbackName + " was not called" );
+ }
+ return responseContainer[ 0 ];
+ };
+
+ // force json dataType
+ s.dataTypes[ 0 ] = "json";
+
+ // Install callback
+ overwritten = window[ callbackName ];
+ window[ callbackName ] = function() {
+ responseContainer = arguments;
+ };
+
+ // Clean-up function (fires after converters)
+ jqXHR.always(function() {
+ // Restore preexisting value
+ window[ callbackName ] = overwritten;
+
+ // Save back as free
+ if ( s[ callbackName ] ) {
+ // make sure that re-using the options doesn't screw things around
+ s.jsonpCallback = originalSettings.jsonpCallback;
+
+ // save the callback name for future use
+ oldCallbacks.push( callbackName );
+ }
+
+ // Call if it was a function and we have a response
+ if ( responseContainer && jQuery.isFunction( overwritten ) ) {
+ overwritten( responseContainer[ 0 ] );
+ }
+
+ responseContainer = overwritten = undefined;
+ });
+
+ // Delegate to script
+ return "script";
+ }
+});
+
+
+
+
+// data: string of html
+// context (optional): If specified, the fragment will be created in this context, defaults to document
+// keepScripts (optional): If true, will include scripts passed in the html string
+jQuery.parseHTML = function( data, context, keepScripts ) {
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+ if ( typeof context === "boolean" ) {
+ keepScripts = context;
+ context = false;
+ }
+ context = context || document;
+
+ var parsed = rsingleTag.exec( data ),
+ scripts = !keepScripts && [];
+
+ // Single tag
+ if ( parsed ) {
+ return [ context.createElement( parsed[1] ) ];
+ }
+
+ parsed = jQuery.buildFragment( [ data ], context, scripts );
+
+ if ( scripts && scripts.length ) {
+ jQuery( scripts ).remove();
+ }
+
+ return jQuery.merge( [], parsed.childNodes );
+};
+
+
+// Keep a copy of the old load method
+var _load = jQuery.fn.load;
+
+/**
+ * Load a url into a page
+ */
+jQuery.fn.load = function( url, params, callback ) {
+ if ( typeof url !== "string" && _load ) {
+ return _load.apply( this, arguments );
+ }
+
+ var selector, type, response,
+ self = this,
+ off = url.indexOf(" ");
+
+ if ( off >= 0 ) {
+ selector = jQuery.trim( url.slice( off ) );
+ url = url.slice( 0, off );
+ }
+
+ // If it's a function
+ if ( jQuery.isFunction( params ) ) {
+
+ // We assume that it's the callback
+ callback = params;
+ params = undefined;
+
+ // Otherwise, build a param string
+ } else if ( params && typeof params === "object" ) {
+ type = "POST";
+ }
+
+ // If we have elements to modify, make the request
+ if ( self.length > 0 ) {
+ jQuery.ajax({
+ url: url,
+
+ // if "type" variable is undefined, then "GET" method will be used
+ type: type,
+ dataType: "html",
+ data: params
+ }).done(function( responseText ) {
+
+ // Save response for use in complete callback
+ response = arguments;
+
+ self.html( selector ?
+
+ // If a selector was specified, locate the right elements in a dummy div
+ // Exclude scripts to avoid IE 'Permission Denied' errors
+ jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
+
+ // Otherwise use the full result
+ responseText );
+
+ }).complete( callback && function( jqXHR, status ) {
+ self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
+ });
+ }
+
+ return this;
+};
+
+
+
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
+ jQuery.fn[ type ] = function( fn ) {
+ return this.on( type, fn );
+ };
+});
+
+
+
+
+jQuery.expr.filters.animated = function( elem ) {
+ return jQuery.grep(jQuery.timers, function( fn ) {
+ return elem === fn.elem;
+ }).length;
+};
+
+
+
+
+var docElem = window.document.documentElement;
+
+/**
+ * Gets a window from an element
+ */
+function getWindow( elem ) {
+ return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;
+}
+
+jQuery.offset = {
+ setOffset: function( elem, options, i ) {
+ var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
+ position = jQuery.css( elem, "position" ),
+ curElem = jQuery( elem ),
+ props = {};
+
+ // Set position first, in-case top/left are set even on static elem
+ if ( position === "static" ) {
+ elem.style.position = "relative";
+ }
+
+ curOffset = curElem.offset();
+ curCSSTop = jQuery.css( elem, "top" );
+ curCSSLeft = jQuery.css( elem, "left" );
+ calculatePosition = ( position === "absolute" || position === "fixed" ) &&
+ ( curCSSTop + curCSSLeft ).indexOf("auto") > -1;
+
+ // Need to be able to calculate position if either
+ // top or left is auto and position is either absolute or fixed
+ if ( calculatePosition ) {
+ curPosition = curElem.position();
+ curTop = curPosition.top;
+ curLeft = curPosition.left;
+
+ } else {
+ curTop = parseFloat( curCSSTop ) || 0;
+ curLeft = parseFloat( curCSSLeft ) || 0;
+ }
+
+ if ( jQuery.isFunction( options ) ) {
+ options = options.call( elem, i, curOffset );
+ }
+
+ if ( options.top != null ) {
+ props.top = ( options.top - curOffset.top ) + curTop;
+ }
+ if ( options.left != null ) {
+ props.left = ( options.left - curOffset.left ) + curLeft;
+ }
+
+ if ( "using" in options ) {
+ options.using.call( elem, props );
+
+ } else {
+ curElem.css( props );
+ }
+ }
+};
+
+jQuery.fn.extend({
+ offset: function( options ) {
+ if ( arguments.length ) {
+ return options === undefined ?
+ this :
+ this.each(function( i ) {
+ jQuery.offset.setOffset( this, options, i );
+ });
+ }
+
+ var docElem, win,
+ elem = this[ 0 ],
+ box = { top: 0, left: 0 },
+ doc = elem && elem.ownerDocument;
+
+ if ( !doc ) {
+ return;
+ }
+
+ docElem = doc.documentElement;
+
+ // Make sure it's not a disconnected DOM node
+ if ( !jQuery.contains( docElem, elem ) ) {
+ return box;
+ }
+
+ // Support: BlackBerry 5, iOS 3 (original iPhone)
+ // If we don't have gBCR, just use 0,0 rather than error
+ if ( typeof elem.getBoundingClientRect !== strundefined ) {
+ box = elem.getBoundingClientRect();
+ }
+ win = getWindow( doc );
+ return {
+ top: box.top + win.pageYOffset - docElem.clientTop,
+ left: box.left + win.pageXOffset - docElem.clientLeft
+ };
+ },
+
+ position: function() {
+ if ( !this[ 0 ] ) {
+ return;
+ }
+
+ var offsetParent, offset,
+ elem = this[ 0 ],
+ parentOffset = { top: 0, left: 0 };
+
+ // Fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent
+ if ( jQuery.css( elem, "position" ) === "fixed" ) {
+ // Assume getBoundingClientRect is there when computed position is fixed
+ offset = elem.getBoundingClientRect();
+
+ } else {
+ // Get *real* offsetParent
+ offsetParent = this.offsetParent();
+
+ // Get correct offsets
+ offset = this.offset();
+ if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
+ parentOffset = offsetParent.offset();
+ }
+
+ // Add offsetParent borders
+ parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
+ parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
+ }
+
+ // Subtract parent offsets and element margins
+ return {
+ top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
+ left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
+ };
+ },
+
+ offsetParent: function() {
+ return this.map(function() {
+ var offsetParent = this.offsetParent || docElem;
+
+ while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) {
+ offsetParent = offsetParent.offsetParent;
+ }
+
+ return offsetParent || docElem;
+ });
+ }
+});
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
+ var top = "pageYOffset" === prop;
+
+ jQuery.fn[ method ] = function( val ) {
+ return access( this, function( elem, method, val ) {
+ var win = getWindow( elem );
+
+ if ( val === undefined ) {
+ return win ? win[ prop ] : elem[ method ];
+ }
+
+ if ( win ) {
+ win.scrollTo(
+ !top ? val : window.pageXOffset,
+ top ? val : window.pageYOffset
+ );
+
+ } else {
+ elem[ method ] = val;
+ }
+ }, method, val, arguments.length, null );
+ };
+});
+
+// Support: Safari<7+, Chrome<37+
+// Add the top/left cssHooks using jQuery.fn.position
+// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
+// Blink bug: https://code.google.com/p/chromium/issues/detail?id=229280
+// getComputedStyle returns percent when specified for top/left/bottom/right;
+// rather than make the css module depend on the offset module, just check for it here
+jQuery.each( [ "top", "left" ], function( i, prop ) {
+ jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
+ function( elem, computed ) {
+ if ( computed ) {
+ computed = curCSS( elem, prop );
+ // If curCSS returns percentage, fallback to offset
+ return rnumnonpx.test( computed ) ?
+ jQuery( elem ).position()[ prop ] + "px" :
+ computed;
+ }
+ }
+ );
+});
+
+
+// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
+jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
+ jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
+ // Margin is only for outerHeight, outerWidth
+ jQuery.fn[ funcName ] = function( margin, value ) {
+ var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
+ extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
+
+ return access( this, function( elem, type, value ) {
+ var doc;
+
+ if ( jQuery.isWindow( elem ) ) {
+ // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
+ // isn't a whole lot we can do. See pull request at this URL for discussion:
+ // https://github.com/jquery/jquery/pull/764
+ return elem.document.documentElement[ "client" + name ];
+ }
+
+ // Get document width or height
+ if ( elem.nodeType === 9 ) {
+ doc = elem.documentElement;
+
+ // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
+ // whichever is greatest
+ return Math.max(
+ elem.body[ "scroll" + name ], doc[ "scroll" + name ],
+ elem.body[ "offset" + name ], doc[ "offset" + name ],
+ doc[ "client" + name ]
+ );
+ }
+
+ return value === undefined ?
+ // Get width or height on the element, requesting but not forcing parseFloat
+ jQuery.css( elem, type, extra ) :
+
+ // Set width or height on the element
+ jQuery.style( elem, type, value, extra );
+ }, type, chainable ? margin : undefined, chainable, null );
+ };
+ });
+});
+
+
+// The number of elements contained in the matched element set
+jQuery.fn.size = function() {
+ return this.length;
+};
+
+jQuery.fn.andSelf = jQuery.fn.addBack;
+
+
+
+
+// Register as a named AMD module, since jQuery can be concatenated with other
+// files that may use define, but not via a proper concatenation script that
+// understands anonymous AMD modules. A named AMD is safest and most robust
+// way to register. Lowercase jquery is used because AMD module names are
+// derived from file names, and jQuery is normally delivered in a lowercase
+// file name. Do this after creating the global so that if an AMD module wants
+// to call noConflict to hide this version of jQuery, it will work.
+
+// Note that for maximum portability, libraries that are not jQuery should
+// declare themselves as anonymous modules, and avoid setting a global if an
+// AMD loader is present. jQuery is a special case. For more information, see
+// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
+
+if ( typeof define === "function" && define.amd ) {
+ define( "jquery", [], function() {
+ return jQuery;
+ });
+}
+
+
+
+
+var
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$;
+
+jQuery.noConflict = function( deep ) {
+ if ( window.$ === jQuery ) {
+ window.$ = _$;
+ }
+
+ if ( deep && window.jQuery === jQuery ) {
+ window.jQuery = _jQuery;
+ }
+
+ return jQuery;
+};
+
+// Expose jQuery and $ identifiers, even in AMD
+// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
+// and CommonJS for browser emulators (#13566)
+if ( typeof noGlobal === strundefined ) {
+ window.jQuery = window.$ = jQuery;
+}
+
+
+
+
+return jQuery;
+
+}));
diff --git a/common/src/main/webapp/thirdparty/jquery/jquery-2.1.3.min.js b/common/src/main/webapp/thirdparty/jquery/jquery-2.1.3.min.js
new file mode 100644
index 0000000..25714ed
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery/jquery-2.1.3.min.js
@@ -0,0 +1,4 @@
+/*! jQuery v2.1.3 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
+!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=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.3",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 d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.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(null)},push:f,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!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));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,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},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,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),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):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;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,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"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=hb(),z=hb(),A=hb(),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=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),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")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=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)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){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 gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(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 mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(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 pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.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.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);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 p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",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(".#.+[+~]")}),jb(function(a){var b=g.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=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.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===g||a.ownerDocument===v&&t(v,a)?-1:b===g||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,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||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 gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.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},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.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=gb.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=gb.selectors={cacheLength:50,createPseudo:ib,match:X,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(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===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]||gb.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]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.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(cb,db).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=gb.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(Q," ")+" ").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;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(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:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(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:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).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 Z.test(a.nodeName)},input:function(a){return Y.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:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=mb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=nb(b);function qb(){}qb.prototype=d.filters=d.pseudos,d.setFilters=new qb,g=gb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?gb.error(a):z(a,i).slice(0)};function rb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sb(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=[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(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(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 ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(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 wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(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=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(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=[sb(tb(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 wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}return h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.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(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.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(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(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}),gb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(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(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==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=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir: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},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.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.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&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 n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||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&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},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().done(c.resolve).fail(c.reject).progress(c.notify):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=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;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||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;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};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),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){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)
+},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),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=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){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])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(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 L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=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(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.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=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(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.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!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&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(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)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ib={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(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 kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");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 J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),f.removeChild(c),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))
+},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec=/#.*$/,fc=/([?&])_=[^&]*/,gc=/^(.*?):[ \t]*([^\r\n]*)$/gm,hc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ic=/^(?:GET|HEAD)$/,jc=/^\/\//,kc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,lc={},mc={},nc="*/".concat("*"),oc=a.location.href,pc=kc.exec(oc.toLowerCase())||[];function qc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function rc(a,b,c,d){var e={},f=a===mc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function sc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function tc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function uc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:oc,type:"GET",isLocal:hc.test(pc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":nc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?sc(sc(a,n.ajaxSettings),b):sc(n.ajaxSettings,a)},ajaxPrefilter:qc(lc),ajaxTransport:qc(mc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=gc.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||oc)+"").replace(ec,"").replace(jc,pc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=kc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===pc[1]&&h[2]===pc[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(pc[3]||("http:"===pc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),rc(lc,k,b,v),2===t)return v;i=n.event&&k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!ic.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=fc.test(d)?d.replace(fc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+nc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=rc(mc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=tc(k,v,f)),u=uc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var vc=/%20/g,wc=/\[\]$/,xc=/\r?\n/g,yc=/^(?:submit|button|image|reset|file)$/i,zc=/^(?:input|select|textarea|keygen)/i;function Ac(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||wc.test(a)?d(a,e):Ac(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Ac(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Ac(c,a[c],b,e);return d.join("&").replace(vc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&zc.test(this.nodeName)&&!yc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(xc,"\r\n")}}):{name:b.name,value:c.replace(xc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Bc=0,Cc={},Dc={0:200,1223:204},Ec=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Cc)Cc[a]()}),k.cors=!!Ec&&"withCredentials"in Ec,k.ajax=Ec=!!Ec,n.ajaxTransport(function(a){var b;return k.cors||Ec&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Bc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Cc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Dc[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Cc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Fc=[],Gc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Fc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Gc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Gc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Fc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Hc=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Hc)return Hc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Ic=a.document.documentElement;function Jc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Jc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Ic;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Ic})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Jc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Kc=a.jQuery,Lc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Lc),b&&a.jQuery===n&&(a.jQuery=Kc),n},typeof b===U&&(a.jQuery=a.$=n),n});
diff --git a/common/src/main/webapp/thirdparty/jquery/jquery-2.1.3.min.map b/common/src/main/webapp/thirdparty/jquery/jquery-2.1.3.min.map
new file mode 100644
index 0000000..820c426
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery/jquery-2.1.3.min.map
@@ -0,0 +1 @@
+{"version":3,"file":"jquery-2.1.3.min.js","sources":["jquery-2.1.3.js"],"names":["global","factory","module","exports","document","w","Error","window","this","noGlobal","arr","slice","concat","push","indexOf","class2type","toString","hasOwn","hasOwnProperty","support","version","jQuery","selector","context","fn","init","rtrim","rmsPrefix","rdashAlpha","fcamelCase","all","letter","toUpperCase","prototype","jquery","constructor","length","toArray","call","get","num","pushStack","elems","ret","merge","prevObject","each","callback","args","map","elem","i","apply","arguments","first","eq","last","len","j","end","sort","splice","extend","options","name","src","copy","copyIsArray","clone","target","deep","isFunction","isPlainObject","isArray","undefined","expando","Math","random","replace","isReady","error","msg","noop","obj","type","Array","isWindow","isNumeric","parseFloat","nodeType","isEmptyObject","globalEval","code","script","indirect","eval","trim","createElement","text","head","appendChild","parentNode","removeChild","camelCase","string","nodeName","toLowerCase","value","isArraylike","makeArray","results","Object","inArray","second","grep","invert","callbackInverse","matches","callbackExpect","arg","guid","proxy","tmp","now","Date","split","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","contains","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","sortOrder","a","b","MAX_NEGATIVE","pop","push_native","list","booleans","whitespace","characterEncoding","identifier","attributes","pseudos","rwhitespace","RegExp","rcomma","rcombinators","rattributeQuotes","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rinputs","rheader","rnative","rquickExpr","rsibling","rescape","runescape","funescape","_","escaped","escapedWhitespace","high","String","fromCharCode","unloadHandler","childNodes","e","els","seed","match","m","groups","old","nid","newContext","newSelector","ownerDocument","exec","getElementById","id","getElementsByTagName","getElementsByClassName","qsa","test","getAttribute","setAttribute","toSelector","testContext","join","querySelectorAll","qsaError","removeAttribute","keys","cache","key","cacheLength","shift","markFunction","assert","div","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createPositionalPseudo","argument","matchIndexes","documentElement","node","hasCompare","parent","doc","defaultView","top","addEventListener","attachEvent","className","createComment","getById","getElementsByName","find","filter","attrId","getAttributeNode","tag","innerHTML","input","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","attr","val","specified","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">","dir"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","simple","forward","ofType","xml","outerCache","nodeIndex","start","useCache","lastChild","pseudo","setFilters","idx","matched","not","matcher","unmatched","has","innerText","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","disabled","checked","selected","selectedIndex","empty","header","button","even","odd","lt","gt","radio","checkbox","file","password","image","submit","reset","filters","parseOnly","tokens","soFar","preFilters","cached","addCombinator","combinator","base","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","multipleContexts","contexts","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","matcherFromGroupMatchers","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","div1","defaultValue","unique","isXMLDoc","rneedsContext","rsingleTag","risSimple","winnow","qualifier","self","is","rootjQuery","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","next","prev","until","truncate","sibling","n","targets","l","closest","pos","index","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","siblings","contentDocument","reverse","rnotwhite","optionsCache","createOptions","object","flag","Callbacks","memory","fired","firing","firingStart","firingLength","firingIndex","stack","once","fire","data","stopOnFalse","disable","remove","lock","locked","fireWith","Deferred","func","tuples","state","promise","always","deferred","fail","then","fns","newDefer","tuple","returned","resolve","reject","progress","notify","pipe","stateString","when","subordinate","resolveValues","remaining","updateFunc","values","progressValues","notifyWith","resolveWith","progressContexts","resolveContexts","readyList","readyWait","holdReady","hold","wait","triggerHandler","off","completed","removeEventListener","readyState","setTimeout","access","chainable","emptyGet","raw","bulk","acceptData","owner","Data","defineProperty","uid","accepts","descriptor","unlock","defineProperties","set","prop","stored","camel","hasData","discard","data_priv","data_user","rbrace","rmultiDash","dataAttr","parseJSON","removeData","_data","_removeData","camelKey","queue","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","count","defer","pnum","source","cssExpand","isHidden","el","css","rcheckableType","fragment","createDocumentFragment","checkClone","cloneNode","noCloneChecked","strundefined","focusinBubbles","rkeyEvent","rmouseEvent","rfocusMorph","rtypenamespace","returnTrue","returnFalse","safeActiveElement","err","event","types","handleObjIn","eventHandle","events","t","handleObj","special","handlers","namespaces","origType","elemData","handle","triggered","dispatch","delegateType","bindType","namespace","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","trigger","onlyHandlers","bubbleType","ontype","eventPath","Event","isTrigger","namespace_re","noBubble","parentWindow","isPropagationStopped","preventDefault","isDefaultPrevented","_default","fix","handlerQueue","delegateTarget","preDispatch","currentTarget","isImmediatePropagationStopped","stopPropagation","postDispatch","sel","props","fixHooks","keyHooks","original","which","charCode","keyCode","mouseHooks","eventDoc","body","pageX","clientX","scrollLeft","clientLeft","pageY","clientY","scrollTop","clientTop","originalEvent","fixHook","load","blur","click","beforeunload","returnValue","simulate","bubble","isSimulated","defaultPrevented","timeStamp","stopImmediatePropagation","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","relatedTarget","attaches","on","one","origFn","rxhtmlTag","rtagName","rhtml","rnoInnerhtml","rchecked","rscriptType","rscriptTypeMasked","rcleanScript","wrapMap","option","thead","col","tr","td","optgroup","tbody","tfoot","colgroup","caption","th","manipulationTarget","content","disableScript","restoreScript","setGlobalEval","refElements","cloneCopyEvent","dest","pdataOld","pdataCur","udataOld","udataCur","getAll","fixInput","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","buildFragment","scripts","selection","wrap","nodes","createTextNode","cleanData","append","domManip","prepend","insertBefore","before","after","keepData","html","replaceWith","replaceChild","detach","hasScripts","iNoClone","_evalUrl","appendTo","prependTo","insertAfter","replaceAll","insert","iframe","elemdisplay","actualDisplay","style","display","getDefaultComputedStyle","defaultDisplay","write","close","rmargin","rnumnonpx","getStyles","opener","getComputedStyle","curCSS","computed","width","minWidth","maxWidth","getPropertyValue","addGetHookIf","conditionFn","hookFn","pixelPositionVal","boxSizingReliableVal","container","backgroundClip","clearCloneStyle","cssText","computePixelPositionAndBoxSizingReliable","divStyle","pixelPosition","boxSizingReliable","reliableMarginRight","marginDiv","marginRight","swap","rdisplayswap","rnumsplit","rrelNum","cssShow","position","visibility","cssNormalTransform","letterSpacing","fontWeight","cssPrefixes","vendorPropName","capName","origName","setPositiveNumber","subtract","max","augmentWidthOrHeight","extra","isBorderBox","styles","getWidthOrHeight","valueIsBorderBox","offsetWidth","offsetHeight","showHide","show","hidden","cssHooks","opacity","cssNumber","columnCount","fillOpacity","flexGrow","flexShrink","lineHeight","order","orphans","widows","zIndex","zoom","cssProps","float","margin","padding","border","prefix","suffix","expand","expanded","parts","hide","toggle","Tween","easing","unit","propHooks","run","percent","eased","duration","step","tween","fx","linear","p","swing","cos","PI","fxNow","timerId","rfxtypes","rfxnum","rrun","animationPrefilters","defaultPrefilter","tweeners","*","createTween","scale","maxIterations","createFxNow","genFx","includeWidth","height","animation","collection","opts","oldfire","checkDisplay","anim","dataShow","unqueued","overflow","overflowX","overflowY","propFilter","specialEasing","Animation","properties","stopped","tick","currentTime","startTime","tweens","originalProperties","originalOptions","gotoEnd","rejectWith","timer","complete","tweener","prefilter","speed","opt","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","interval","setInterval","clearInterval","slow","fast","delay","time","timeout","clearTimeout","checkOn","optSelected","optDisabled","radioValue","nodeHook","boolHook","removeAttr","nType","attrHooks","propName","attrNames","propFix","getter","rfocusable","removeProp","for","class","notxml","hasAttribute","rclass","addClass","classes","clazz","finalValue","proceed","removeClass","toggleClass","stateVal","classNames","hasClass","rreturn","valHooks","optionSet","hover","fnOver","fnOut","bind","unbind","delegate","undelegate","nonce","rquery","JSON","parse","parseXML","DOMParser","parseFromString","rhash","rts","rheaders","rlocalProtocol","rnoContent","rprotocol","rurl","prefilters","transports","allTypes","ajaxLocation","ajaxLocParts","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","ajaxHandleResponses","s","responses","ct","finalDataType","firstDataType","mimeType","getResponseHeader","converters","ajaxConvert","response","isSuccess","conv2","current","conv","responseFields","dataFilter","active","lastModified","etag","url","isLocal","processData","async","contentType","json","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","fireGlobals","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getAllResponseHeaders","setRequestHeader","lname","overrideMimeType","status","abort","statusText","finalText","success","method","crossDomain","param","traditional","hasContent","ifModified","headers","beforeSend","send","nativeStatusText","modified","getJSON","getScript","throws","wrapAll","firstElementChild","wrapInner","unwrap","visible","r20","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","v","encodeURIComponent","serialize","serializeArray","xhr","XMLHttpRequest","xhrId","xhrCallbacks","xhrSuccessStatus",1223,"xhrSupported","cors","open","username","xhrFields","onload","onerror","responseText","text script","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","keepScripts","parsed","_load","params","animated","getWindow","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","calculatePosition","curElem","left","using","win","box","getBoundingClientRect","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","defaultExtra","funcName","size","andSelf","define","amd","_jQuery","_$","$","noConflict"],"mappings":";CAcC,SAAUA,EAAQC,GAEK,gBAAXC,SAAiD,gBAAnBA,QAAOC,QAQhDD,OAAOC,QAAUH,EAAOI,SACvBH,EAASD,GAAQ,GACjB,SAAUK,GACT,IAAMA,EAAED,SACP,KAAM,IAAIE,OAAO,2CAElB,OAAOL,GAASI,IAGlBJ,EAASD,IAIS,mBAAXO,QAAyBA,OAASC,KAAM,SAAUD,EAAQE,GAQnE,GAAIC,MAEAC,EAAQD,EAAIC,MAEZC,EAASF,EAAIE,OAEbC,EAAOH,EAAIG,KAEXC,EAAUJ,EAAII,QAEdC,KAEAC,EAAWD,EAAWC,SAEtBC,EAASF,EAAWG,eAEpBC,KAMHf,EAAWG,EAAOH,SAElBgB,EAAU,QAGVC,EAAS,SAAUC,EAAUC,GAG5B,MAAO,IAAIF,GAAOG,GAAGC,KAAMH,EAAUC,IAKtCG,EAAQ,qCAGRC,EAAY,QACZC,EAAa,eAGbC,EAAa,SAAUC,EAAKC,GAC3B,MAAOA,GAAOC,cAGhBX,GAAOG,GAAKH,EAAOY,WAElBC,OAAQd,EAERe,YAAad,EAGbC,SAAU,GAGVc,OAAQ,EAERC,QAAS,WACR,MAAO1B,GAAM2B,KAAM9B,OAKpB+B,IAAK,SAAUC,GACd,MAAc,OAAPA,EAGE,EAANA,EAAUhC,KAAMgC,EAAMhC,KAAK4B,QAAW5B,KAAMgC,GAG9C7B,EAAM2B,KAAM9B,OAKdiC,UAAW,SAAUC,GAGpB,GAAIC,GAAMtB,EAAOuB,MAAOpC,KAAK2B,cAAeO,EAO5C,OAJAC,GAAIE,WAAarC,KACjBmC,EAAIpB,QAAUf,KAAKe,QAGZoB,GAMRG,KAAM,SAAUC,EAAUC,GACzB,MAAO3B,GAAOyB,KAAMtC,KAAMuC,EAAUC,IAGrCC,IAAK,SAAUF,GACd,MAAOvC,MAAKiC,UAAWpB,EAAO4B,IAAIzC,KAAM,SAAU0C,EAAMC,GACvD,MAAOJ,GAAST,KAAMY,EAAMC,EAAGD,OAIjCvC,MAAO,WACN,MAAOH,MAAKiC,UAAW9B,EAAMyC,MAAO5C,KAAM6C,aAG3CC,MAAO,WACN,MAAO9C,MAAK+C,GAAI,IAGjBC,KAAM,WACL,MAAOhD,MAAK+C,GAAI,KAGjBA,GAAI,SAAUJ,GACb,GAAIM,GAAMjD,KAAK4B,OACdsB,GAAKP,GAAU,EAAJA,EAAQM,EAAM,EAC1B,OAAOjD,MAAKiC,UAAWiB,GAAK,GAASD,EAAJC,GAAYlD,KAAKkD,SAGnDC,IAAK,WACJ,MAAOnD,MAAKqC,YAAcrC,KAAK2B,YAAY,OAK5CtB,KAAMA,EACN+C,KAAMlD,EAAIkD,KACVC,OAAQnD,EAAImD,QAGbxC,EAAOyC,OAASzC,EAAOG,GAAGsC,OAAS,WAClC,GAAIC,GAASC,EAAMC,EAAKC,EAAMC,EAAaC,EAC1CC,EAAShB,UAAU,OACnBF,EAAI,EACJf,EAASiB,UAAUjB,OACnBkC,GAAO,CAsBR,KAnBuB,iBAAXD,KACXC,EAAOD,EAGPA,EAAShB,UAAWF,OACpBA,KAIsB,gBAAXkB,IAAwBhD,EAAOkD,WAAWF,KACrDA,MAIIlB,IAAMf,IACViC,EAAS7D,KACT2C,KAGWf,EAAJe,EAAYA,IAEnB,GAAmC,OAA7BY,EAAUV,UAAWF,IAE1B,IAAMa,IAAQD,GACbE,EAAMI,EAAQL,GACdE,EAAOH,EAASC,GAGXK,IAAWH,IAKXI,GAAQJ,IAAU7C,EAAOmD,cAAcN,KAAUC,EAAc9C,EAAOoD,QAAQP,MAC7EC,GACJA,GAAc,EACdC,EAAQH,GAAO5C,EAAOoD,QAAQR,GAAOA,MAGrCG,EAAQH,GAAO5C,EAAOmD,cAAcP,GAAOA,KAI5CI,EAAQL,GAAS3C,EAAOyC,OAAQQ,EAAMF,EAAOF,IAGzBQ,SAATR,IACXG,EAAQL,GAASE,GAOrB,OAAOG,IAGRhD,EAAOyC,QAENa,QAAS,UAAavD,EAAUwD,KAAKC,UAAWC,QAAS,MAAO,IAGhEC,SAAS,EAETC,MAAO,SAAUC,GAChB,KAAM,IAAI3E,OAAO2E,IAGlBC,KAAM,aAENX,WAAY,SAAUY,GACrB,MAA4B,aAArB9D,EAAO+D,KAAKD,IAGpBV,QAASY,MAAMZ,QAEfa,SAAU,SAAUH,GACnB,MAAc,OAAPA,GAAeA,IAAQA,EAAI5E,QAGnCgF,UAAW,SAAUJ,GAKpB,OAAQ9D,EAAOoD,QAASU,IAAUA,EAAMK,WAAYL,GAAQ,GAAM,GAGnEX,cAAe,SAAUW,GAKxB,MAA4B,WAAvB9D,EAAO+D,KAAMD,IAAsBA,EAAIM,UAAYpE,EAAOiE,SAAUH,IACjE,EAGHA,EAAIhD,cACNlB,EAAOqB,KAAM6C,EAAIhD,YAAYF,UAAW,kBACnC,GAKD,GAGRyD,cAAe,SAAUP,GACxB,GAAInB,EACJ,KAAMA,IAAQmB,GACb,OAAO,CAER,QAAO,GAGRC,KAAM,SAAUD,GACf,MAAY,OAAPA,EACGA,EAAM,GAGQ,gBAARA,IAAmC,kBAARA,GACxCpE,EAAYC,EAASsB,KAAK6C,KAAU,eAC7BA,IAITQ,WAAY,SAAUC,GACrB,GAAIC,GACHC,EAAWC,IAEZH,GAAOvE,EAAO2E,KAAMJ,GAEfA,IAIgC,IAA/BA,EAAK9E,QAAQ,eACjB+E,EAASzF,EAAS6F,cAAc,UAChCJ,EAAOK,KAAON,EACdxF,EAAS+F,KAAKC,YAAaP,GAASQ,WAAWC,YAAaT,IAI5DC,EAAUF,KAQbW,UAAW,SAAUC,GACpB,MAAOA,GAAO1B,QAASnD,EAAW,OAAQmD,QAASlD,EAAYC,IAGhE4E,SAAU,SAAUvD,EAAMc,GACzB,MAAOd,GAAKuD,UAAYvD,EAAKuD,SAASC,gBAAkB1C,EAAK0C,eAI9D5D,KAAM,SAAUqC,EAAKpC,EAAUC,GAC9B,GAAI2D,GACHxD,EAAI,EACJf,EAAS+C,EAAI/C,OACbqC,EAAUmC,EAAazB,EAExB,IAAKnC,GACJ,GAAKyB,GACJ,KAAYrC,EAAJe,EAAYA,IAGnB,GAFAwD,EAAQ5D,EAASK,MAAO+B,EAAKhC,GAAKH,GAE7B2D,KAAU,EACd,UAIF,KAAMxD,IAAKgC,GAGV,GAFAwB,EAAQ5D,EAASK,MAAO+B,EAAKhC,GAAKH,GAE7B2D,KAAU,EACd,UAOH,IAAKlC,GACJ,KAAYrC,EAAJe,EAAYA,IAGnB,GAFAwD,EAAQ5D,EAAST,KAAM6C,EAAKhC,GAAKA,EAAGgC,EAAKhC,IAEpCwD,KAAU,EACd,UAIF,KAAMxD,IAAKgC,GAGV,GAFAwB,EAAQ5D,EAAST,KAAM6C,EAAKhC,GAAKA,EAAGgC,EAAKhC,IAEpCwD,KAAU,EACd,KAMJ,OAAOxB,IAIRa,KAAM,SAAUE,GACf,MAAe,OAARA,EACN,IACEA,EAAO,IAAKpB,QAASpD,EAAO,KAIhCmF,UAAW,SAAUnG,EAAKoG,GACzB,GAAInE,GAAMmE,KAaV,OAXY,OAAPpG,IACCkG,EAAaG,OAAOrG,IACxBW,EAAOuB,MAAOD,EACE,gBAARjC,IACLA,GAAQA,GAGXG,EAAKyB,KAAMK,EAAKjC,IAIXiC,GAGRqE,QAAS,SAAU9D,EAAMxC,EAAKyC,GAC7B,MAAc,OAAPzC,EAAc,GAAKI,EAAQwB,KAAM5B,EAAKwC,EAAMC,IAGpDP,MAAO,SAAUU,EAAO2D,GAKvB,IAJA,GAAIxD,IAAOwD,EAAO7E,OACjBsB,EAAI,EACJP,EAAIG,EAAMlB,OAECqB,EAAJC,EAASA,IAChBJ,EAAOH,KAAQ8D,EAAQvD,EAKxB,OAFAJ,GAAMlB,OAASe,EAERG,GAGR4D,KAAM,SAAUxE,EAAOK,EAAUoE,GAShC,IARA,GAAIC,GACHC,KACAlE,EAAI,EACJf,EAASM,EAAMN,OACfkF,GAAkBH,EAIP/E,EAAJe,EAAYA,IACnBiE,GAAmBrE,EAAUL,EAAOS,GAAKA,GACpCiE,IAAoBE,GACxBD,EAAQxG,KAAM6B,EAAOS,GAIvB,OAAOkE,IAIRpE,IAAK,SAAUP,EAAOK,EAAUwE,GAC/B,GAAIZ,GACHxD,EAAI,EACJf,EAASM,EAAMN,OACfqC,EAAUmC,EAAalE,GACvBC,IAGD,IAAK8B,EACJ,KAAYrC,EAAJe,EAAYA,IACnBwD,EAAQ5D,EAAUL,EAAOS,GAAKA,EAAGoE,GAEnB,MAATZ,GACJhE,EAAI9B,KAAM8F,OAMZ,KAAMxD,IAAKT,GACViE,EAAQ5D,EAAUL,EAAOS,GAAKA,EAAGoE,GAEnB,MAATZ,GACJhE,EAAI9B,KAAM8F,EAMb,OAAO/F,GAAOwC,SAAWT,IAI1B6E,KAAM,EAINC,MAAO,SAAUjG,EAAID,GACpB,GAAImG,GAAK1E,EAAMyE,CAUf,OARwB,gBAAZlG,KACXmG,EAAMlG,EAAID,GACVA,EAAUC,EACVA,EAAKkG,GAKArG,EAAOkD,WAAY/C,IAKzBwB,EAAOrC,EAAM2B,KAAMe,UAAW,GAC9BoE,EAAQ,WACP,MAAOjG,GAAG4B,MAAO7B,GAAWf,KAAMwC,EAAKpC,OAAQD,EAAM2B,KAAMe,cAI5DoE,EAAMD,KAAOhG,EAAGgG,KAAOhG,EAAGgG,MAAQnG,EAAOmG,OAElCC,GAZC/C,QAeTiD,IAAKC,KAAKD,IAIVxG,QAASA,IAIVE,EAAOyB,KAAK,gEAAgE+E,MAAM,KAAM,SAAS1E,EAAGa,GACnGjD,EAAY,WAAaiD,EAAO,KAAQA,EAAK0C,eAG9C,SAASE,GAAazB,GACrB,GAAI/C,GAAS+C,EAAI/C,OAChBgD,EAAO/D,EAAO+D,KAAMD,EAErB,OAAc,aAATC,GAAuB/D,EAAOiE,SAAUH,IACrC,EAGc,IAAjBA,EAAIM,UAAkBrD,GACnB,EAGQ,UAATgD,GAA+B,IAAXhD,GACR,gBAAXA,IAAuBA,EAAS,GAAOA,EAAS,IAAO+C,GAEhE,GAAI2C,GAWJ,SAAWvH,GAEX,GAAI4C,GACHhC,EACA4G,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAGAC,EACApI,EACAqI,EACAC,EACAC,EACAC,EACAvB,EACAwB,EAGAlE,EAAU,SAAW,EAAI,GAAIiD,MAC7BkB,EAAevI,EAAOH,SACtB2I,EAAU,EACVC,EAAO,EACPC,EAAaC,KACbC,EAAaD,KACbE,EAAgBF,KAChBG,EAAY,SAAUC,EAAGC,GAIxB,MAHKD,KAAMC,IACVhB,GAAe,GAET,GAIRiB,EAAe,GAAK,GAGpBvI,KAAcC,eACdR,KACA+I,EAAM/I,EAAI+I,IACVC,EAAchJ,EAAIG,KAClBA,EAAOH,EAAIG,KACXF,EAAQD,EAAIC,MAGZG,EAAU,SAAU6I,EAAMzG,GAGzB,IAFA,GAAIC,GAAI,EACPM,EAAMkG,EAAKvH,OACAqB,EAAJN,EAASA,IAChB,GAAKwG,EAAKxG,KAAOD,EAChB,MAAOC,EAGT,OAAO,IAGRyG,EAAW,6HAKXC,EAAa,sBAEbC,EAAoB,mCAKpBC,EAAaD,EAAkBhF,QAAS,IAAK,MAG7CkF,EAAa,MAAQH,EAAa,KAAOC,EAAoB,OAASD,EAErE,gBAAkBA,EAElB,2DAA6DE,EAAa,OAASF,EACnF,OAEDI,EAAU,KAAOH,EAAoB,wFAKPE,EAAa,eAM3CE,EAAc,GAAIC,QAAQN,EAAa,IAAK,KAC5CnI,EAAQ,GAAIyI,QAAQ,IAAMN,EAAa,8BAAgCA,EAAa,KAAM,KAE1FO,EAAS,GAAID,QAAQ,IAAMN,EAAa,KAAOA,EAAa,KAC5DQ,EAAe,GAAIF,QAAQ,IAAMN,EAAa,WAAaA,EAAa,IAAMA,EAAa,KAE3FS,EAAmB,GAAIH,QAAQ,IAAMN,EAAa,iBAAmBA,EAAa,OAAQ,KAE1FU,EAAU,GAAIJ,QAAQF,GACtBO,EAAc,GAAIL,QAAQ,IAAMJ,EAAa,KAE7CU,GACCC,GAAM,GAAIP,QAAQ,MAAQL,EAAoB,KAC9Ca,MAAS,GAAIR,QAAQ,QAAUL,EAAoB,KACnDc,IAAO,GAAIT,QAAQ,KAAOL,EAAkBhF,QAAS,IAAK,MAAS,KACnE+F,KAAQ,GAAIV,QAAQ,IAAMH,GAC1Bc,OAAU,GAAIX,QAAQ,IAAMF,GAC5Bc,MAAS,GAAIZ,QAAQ,yDAA2DN,EAC/E,+BAAiCA,EAAa,cAAgBA,EAC9D,aAAeA,EAAa,SAAU,KACvCmB,KAAQ,GAAIb,QAAQ,OAASP,EAAW,KAAM,KAG9CqB,aAAgB,GAAId,QAAQ,IAAMN,EAAa,mDAC9CA,EAAa,mBAAqBA,EAAa,mBAAoB,MAGrEqB,EAAU,sCACVC,EAAU,SAEVC,EAAU,yBAGVC,EAAa,mCAEbC,GAAW,OACXC,GAAU,QAGVC,GAAY,GAAIrB,QAAQ,qBAAuBN,EAAa,MAAQA,EAAa,OAAQ,MACzF4B,GAAY,SAAUC,EAAGC,EAASC,GACjC,GAAIC,GAAO,KAAOF,EAAU,KAI5B,OAAOE,KAASA,GAAQD,EACvBD,EACO,EAAPE,EAECC,OAAOC,aAAcF,EAAO,OAE5BC,OAAOC,aAAcF,GAAQ,GAAK,MAAe,KAAPA,EAAe,QAO5DG,GAAgB,WACfxD,IAIF,KACC3H,EAAKuC,MACH1C,EAAMC,EAAM2B,KAAMwG,EAAamD,YAChCnD,EAAamD,YAIdvL,EAAKoI,EAAamD,WAAW7J,QAASqD,SACrC,MAAQyG,IACTrL,GAASuC,MAAO1C,EAAI0B,OAGnB,SAAUiC,EAAQ8H,GACjBzC,EAAYtG,MAAOiB,EAAQ1D,EAAM2B,KAAK6J,KAKvC,SAAU9H,EAAQ8H,GACjB,GAAIzI,GAAIW,EAAOjC,OACde,EAAI,CAEL,OAASkB,EAAOX,KAAOyI,EAAIhJ,MAC3BkB,EAAOjC,OAASsB,EAAI,IAKvB,QAASoE,IAAQxG,EAAUC,EAASuF,EAASsF,GAC5C,GAAIC,GAAOnJ,EAAMoJ,EAAG7G,EAEnBtC,EAAGoJ,EAAQC,EAAKC,EAAKC,EAAYC,CAUlC,KAROpL,EAAUA,EAAQqL,eAAiBrL,EAAUuH,KAAmB1I,GACtEoI,EAAajH,GAGdA,EAAUA,GAAWnB,EACrB0G,EAAUA,MACVrB,EAAWlE,EAAQkE,SAEM,gBAAbnE,KAA0BA,GACxB,IAAbmE,GAA+B,IAAbA,GAA+B,KAAbA,EAEpC,MAAOqB,EAGR,KAAMsF,GAAQ1D,EAAiB,CAG9B,GAAkB,KAAbjD,IAAoB4G,EAAQhB,EAAWwB,KAAMvL,IAEjD,GAAMgL,EAAID,EAAM,IACf,GAAkB,IAAb5G,EAAiB,CAIrB,GAHAvC,EAAO3B,EAAQuL,eAAgBR,IAG1BpJ,IAAQA,EAAKmD,WAQjB,MAAOS,EALP,IAAK5D,EAAK6J,KAAOT,EAEhB,MADAxF,GAAQjG,KAAMqC,GACP4D,MAOT,IAAKvF,EAAQqL,gBAAkB1J,EAAO3B,EAAQqL,cAAcE,eAAgBR,KAC3EzD,EAAUtH,EAAS2B,IAAUA,EAAK6J,KAAOT,EAEzC,MADAxF,GAAQjG,KAAMqC,GACP4D,MAKH,CAAA,GAAKuF,EAAM,GAEjB,MADAxL,GAAKuC,MAAO0D,EAASvF,EAAQyL,qBAAsB1L,IAC5CwF,CAGD,KAAMwF,EAAID,EAAM,KAAOlL,EAAQ8L,uBAErC,MADApM,GAAKuC,MAAO0D,EAASvF,EAAQ0L,uBAAwBX,IAC9CxF,EAKT,GAAK3F,EAAQ+L,OAASvE,IAAcA,EAAUwE,KAAM7L,IAAc,CASjE,GARAmL,EAAMD,EAAM7H,EACZ+H,EAAanL,EACboL,EAA2B,IAAblH,GAAkBnE,EAMd,IAAbmE,GAAqD,WAAnClE,EAAQkF,SAASC,cAA6B,CACpE6F,EAASrE,EAAU5G,IAEbkL,EAAMjL,EAAQ6L,aAAa,OAChCX,EAAMD,EAAI1H,QAASyG,GAAS,QAE5BhK,EAAQ8L,aAAc,KAAMZ,GAE7BA,EAAM,QAAUA,EAAM,MAEtBtJ,EAAIoJ,EAAOnK,MACX,OAAQe,IACPoJ,EAAOpJ,GAAKsJ,EAAMa,GAAYf,EAAOpJ,GAEtCuJ,GAAapB,GAAS6B,KAAM7L,IAAciM,GAAahM,EAAQ8E,aAAgB9E,EAC/EoL,EAAcJ,EAAOiB,KAAK,KAG3B,GAAKb,EACJ,IAIC,MAHA9L,GAAKuC,MAAO0D,EACX4F,EAAWe,iBAAkBd,IAEvB7F,EACN,MAAM4G,IACN,QACKlB,GACLjL,EAAQoM,gBAAgB,QAQ7B,MAAOvF,GAAQ9G,EAASwD,QAASpD,EAAO,MAAQH,EAASuF,EAASsF,GASnE,QAASlD,MACR,GAAI0E,KAEJ,SAASC,GAAOC,EAAKnH,GAMpB,MAJKiH,GAAK/M,KAAMiN,EAAM,KAAQ/F,EAAKgG,mBAE3BF,GAAOD,EAAKI,SAEZH,EAAOC,EAAM,KAAQnH,EAE9B,MAAOkH,GAOR,QAASI,IAAczM,GAEtB,MADAA,GAAImD,IAAY,EACTnD,EAOR,QAAS0M,IAAQ1M,GAChB,GAAI2M,GAAM/N,EAAS6F,cAAc,MAEjC,KACC,QAASzE,EAAI2M,GACZ,MAAOjC,GACR,OAAO,EACN,QAEIiC,EAAI9H,YACR8H,EAAI9H,WAAWC,YAAa6H,GAG7BA,EAAM,MASR,QAASC,IAAWC,EAAOC,GAC1B,GAAI5N,GAAM2N,EAAMxG,MAAM,KACrB1E,EAAIkL,EAAMjM,MAEX,OAAQe,IACP4E,EAAKwG,WAAY7N,EAAIyC,IAAOmL,EAU9B,QAASE,IAAclF,EAAGC,GACzB,GAAIkF,GAAMlF,GAAKD,EACdoF,EAAOD,GAAsB,IAAfnF,EAAE7D,UAAiC,IAAf8D,EAAE9D,YAChC8D,EAAEoF,aAAenF,KACjBF,EAAEqF,aAAenF,EAGtB,IAAKkF,EACJ,MAAOA,EAIR,IAAKD,EACJ,MAASA,EAAMA,EAAIG,YAClB,GAAKH,IAAQlF,EACZ,MAAO,EAKV,OAAOD,GAAI,EAAI,GAOhB,QAASuF,IAAmBzJ,GAC3B,MAAO,UAAUlC,GAChB,GAAIc,GAAOd,EAAKuD,SAASC,aACzB,OAAgB,UAAT1C,GAAoBd,EAAKkC,OAASA,GAQ3C,QAAS0J,IAAoB1J,GAC5B,MAAO,UAAUlC,GAChB,GAAIc,GAAOd,EAAKuD,SAASC,aACzB,QAAiB,UAAT1C,GAA6B,WAATA,IAAsBd,EAAKkC,OAASA,GAQlE,QAAS2J,IAAwBvN,GAChC,MAAOyM,IAAa,SAAUe,GAE7B,MADAA,IAAYA,EACLf,GAAa,SAAU7B,EAAM/E,GACnC,GAAI3D,GACHuL,EAAezN,KAAQ4K,EAAKhK,OAAQ4M,GACpC7L,EAAI8L,EAAa7M,MAGlB,OAAQe,IACFiJ,EAAO1I,EAAIuL,EAAa9L,MAC5BiJ,EAAK1I,KAAO2D,EAAQ3D,GAAK0I,EAAK1I,SAYnC,QAAS6J,IAAahM,GACrB,MAAOA,IAAmD,mBAAjCA,GAAQyL,sBAAwCzL,EAI1EJ,EAAU2G,GAAO3G,WAOjB8G,EAAQH,GAAOG,MAAQ,SAAU/E,GAGhC,GAAIgM,GAAkBhM,IAASA,EAAK0J,eAAiB1J,GAAMgM,eAC3D,OAAOA,GAA+C,SAA7BA,EAAgBzI,UAAsB,GAQhE+B,EAAcV,GAAOU,YAAc,SAAU2G,GAC5C,GAAIC,GAAYC,EACfC,EAAMH,EAAOA,EAAKvC,eAAiBuC,EAAOrG,CAG3C,OAAKwG,KAAQlP,GAA6B,IAAjBkP,EAAI7J,UAAmB6J,EAAIJ,iBAKpD9O,EAAWkP,EACX7G,EAAU6G,EAAIJ,gBACdG,EAASC,EAAIC,YAMRF,GAAUA,IAAWA,EAAOG,MAE3BH,EAAOI,iBACXJ,EAAOI,iBAAkB,SAAUzD,IAAe,GACvCqD,EAAOK,aAClBL,EAAOK,YAAa,WAAY1D,KAMlCtD,GAAkBT,EAAOqH,GAQzBnO,EAAQ6I,WAAakE,GAAO,SAAUC,GAErC,MADAA,GAAIwB,UAAY,KACRxB,EAAIf,aAAa,eAO1BjM,EAAQ6L,qBAAuBkB,GAAO,SAAUC,GAE/C,MADAA,GAAI/H,YAAakJ,EAAIM,cAAc,MAC3BzB,EAAInB,qBAAqB,KAAK5K,SAIvCjB,EAAQ8L,uBAAyB7B,EAAQ+B,KAAMmC,EAAIrC,wBAMnD9L,EAAQ0O,QAAU3B,GAAO,SAAUC,GAElC,MADA1F,GAAQrC,YAAa+H,GAAMpB,GAAKpI,GACxB2K,EAAIQ,oBAAsBR,EAAIQ,kBAAmBnL,GAAUvC,SAI/DjB,EAAQ0O,SACZ9H,EAAKgI,KAAS,GAAI,SAAUhD,EAAIxL,GAC/B,GAAuC,mBAA3BA,GAAQuL,gBAAkCpE,EAAiB,CACtE,GAAI4D,GAAI/K,EAAQuL,eAAgBC,EAGhC,OAAOT,IAAKA,EAAEjG,YAAeiG,QAG/BvE,EAAKiI,OAAW,GAAI,SAAUjD,GAC7B,GAAIkD,GAASlD,EAAGjI,QAAS0G,GAAWC,GACpC,OAAO,UAAUvI,GAChB,MAAOA,GAAKkK,aAAa,QAAU6C,YAM9BlI,GAAKgI,KAAS,GAErBhI,EAAKiI,OAAW,GAAK,SAAUjD,GAC9B,GAAIkD,GAASlD,EAAGjI,QAAS0G,GAAWC,GACpC,OAAO,UAAUvI,GAChB,GAAIiM,GAAwC,mBAA1BjM,GAAKgN,kBAAoChN,EAAKgN,iBAAiB,KACjF,OAAOf,IAAQA,EAAKxI,QAAUsJ,KAMjClI,EAAKgI,KAAU,IAAI5O,EAAQ6L,qBAC1B,SAAUmD,EAAK5O,GACd,MAA6C,mBAAjCA,GAAQyL,qBACZzL,EAAQyL,qBAAsBmD,GAG1BhP,EAAQ+L,IACZ3L,EAAQkM,iBAAkB0C,GAD3B,QAKR,SAAUA,EAAK5O,GACd,GAAI2B,GACHwE,KACAvE,EAAI,EAEJ2D,EAAUvF,EAAQyL,qBAAsBmD,EAGzC,IAAa,MAARA,EAAc,CAClB,MAASjN,EAAO4D,EAAQ3D,KACA,IAAlBD,EAAKuC,UACTiC,EAAI7G,KAAMqC,EAIZ,OAAOwE,GAER,MAAOZ,IAITiB,EAAKgI,KAAY,MAAI5O,EAAQ8L,wBAA0B,SAAU0C,EAAWpO,GAC3E,MAAKmH,GACGnH,EAAQ0L,uBAAwB0C,GADxC,QAWD/G,KAOAD,MAEMxH,EAAQ+L,IAAM9B,EAAQ+B,KAAMmC,EAAI7B,qBAGrCS,GAAO,SAAUC,GAMhB1F,EAAQrC,YAAa+H,GAAMiC,UAAY,UAAYzL,EAAU,qBAC3CA,EAAU,iEAOvBwJ,EAAIV,iBAAiB,wBAAwBrL,QACjDuG,EAAU9H,KAAM,SAAWgJ,EAAa,gBAKnCsE,EAAIV,iBAAiB,cAAcrL,QACxCuG,EAAU9H,KAAM,MAAQgJ,EAAa,aAAeD,EAAW,KAI1DuE,EAAIV,iBAAkB,QAAU9I,EAAU,MAAOvC,QACtDuG,EAAU9H,KAAK,MAMVsN,EAAIV,iBAAiB,YAAYrL,QACtCuG,EAAU9H,KAAK,YAMVsN,EAAIV,iBAAkB,KAAO9I,EAAU,MAAOvC,QACnDuG,EAAU9H,KAAK,cAIjBqN,GAAO,SAAUC,GAGhB,GAAIkC,GAAQf,EAAIrJ,cAAc,QAC9BoK,GAAMhD,aAAc,OAAQ,UAC5Bc,EAAI/H,YAAaiK,GAAQhD,aAAc,OAAQ,KAI1Cc,EAAIV,iBAAiB,YAAYrL,QACrCuG,EAAU9H,KAAM,OAASgJ,EAAa,eAKjCsE,EAAIV,iBAAiB,YAAYrL,QACtCuG,EAAU9H,KAAM,WAAY,aAI7BsN,EAAIV,iBAAiB,QACrB9E,EAAU9H,KAAK,YAIXM,EAAQmP,gBAAkBlF,EAAQ+B,KAAO9F,EAAUoB,EAAQpB,SAChEoB,EAAQ8H,uBACR9H,EAAQ+H,oBACR/H,EAAQgI,kBACRhI,EAAQiI,qBAERxC,GAAO,SAAUC,GAGhBhN,EAAQwP,kBAAoBtJ,EAAQ/E,KAAM6L,EAAK,OAI/C9G,EAAQ/E,KAAM6L,EAAK,aACnBvF,EAAc/H,KAAM,KAAMoJ,KAI5BtB,EAAYA,EAAUvG,QAAU,GAAI+H,QAAQxB,EAAU6E,KAAK,MAC3D5E,EAAgBA,EAAcxG,QAAU,GAAI+H,QAAQvB,EAAc4E,KAAK,MAIvE4B,EAAahE,EAAQ+B,KAAM1E,EAAQmI,yBAKnC/H,EAAWuG,GAAchE,EAAQ+B,KAAM1E,EAAQI,UAC9C,SAAUS,EAAGC,GACZ,GAAIsH,GAAuB,IAAfvH,EAAE7D,SAAiB6D,EAAE4F,gBAAkB5F,EAClDwH,EAAMvH,GAAKA,EAAElD,UACd,OAAOiD,KAAMwH,MAAWA,GAAwB,IAAjBA,EAAIrL,YAClCoL,EAAMhI,SACLgI,EAAMhI,SAAUiI,GAChBxH,EAAEsH,yBAA8D,GAAnCtH,EAAEsH,wBAAyBE,MAG3D,SAAUxH,EAAGC,GACZ,GAAKA,EACJ,MAASA,EAAIA,EAAElD,WACd,GAAKkD,IAAMD,EACV,OAAO,CAIV,QAAO,GAOTD,EAAY+F,EACZ,SAAU9F,EAAGC,GAGZ,GAAKD,IAAMC,EAEV,MADAhB,IAAe,EACR,CAIR,IAAIwI,IAAWzH,EAAEsH,yBAA2BrH,EAAEqH,uBAC9C,OAAKG,GACGA,GAIRA,GAAYzH,EAAEsD,eAAiBtD,MAAUC,EAAEqD,eAAiBrD,GAC3DD,EAAEsH,wBAAyBrH,GAG3B,EAGc,EAAVwH,IACF5P,EAAQ6P,cAAgBzH,EAAEqH,wBAAyBtH,KAAQyH,EAGxDzH,IAAMgG,GAAOhG,EAAEsD,gBAAkB9D,GAAgBD,EAASC,EAAcQ,GACrE,GAEHC,IAAM+F,GAAO/F,EAAEqD,gBAAkB9D,GAAgBD,EAASC,EAAcS,GACrE,EAIDjB,EACJxH,EAASwH,EAAWgB,GAAMxI,EAASwH,EAAWiB,GAChD,EAGe,EAAVwH,EAAc,GAAK,IAE3B,SAAUzH,EAAGC,GAEZ,GAAKD,IAAMC,EAEV,MADAhB,IAAe,EACR,CAGR,IAAIkG,GACHtL,EAAI,EACJ8N,EAAM3H,EAAEjD,WACRyK,EAAMvH,EAAElD,WACR6K,GAAO5H,GACP6H,GAAO5H,EAGR,KAAM0H,IAAQH,EACb,MAAOxH,KAAMgG,EAAM,GAClB/F,IAAM+F,EAAM,EACZ2B,EAAM,GACNH,EAAM,EACNxI,EACExH,EAASwH,EAAWgB,GAAMxI,EAASwH,EAAWiB,GAChD,CAGK,IAAK0H,IAAQH,EACnB,MAAOtC,IAAclF,EAAGC,EAIzBkF,GAAMnF,CACN,OAASmF,EAAMA,EAAIpI,WAClB6K,EAAGE,QAAS3C,EAEbA,GAAMlF,CACN,OAASkF,EAAMA,EAAIpI,WAClB8K,EAAGC,QAAS3C,EAIb,OAAQyC,EAAG/N,KAAOgO,EAAGhO,GACpBA,GAGD,OAAOA,GAENqL,GAAc0C,EAAG/N,GAAIgO,EAAGhO,IAGxB+N,EAAG/N,KAAO2F,EAAe,GACzBqI,EAAGhO,KAAO2F,EAAe,EACzB,GAGKwG,GA1WClP,GA6WT0H,GAAOT,QAAU,SAAUgK,EAAMC,GAChC,MAAOxJ,IAAQuJ,EAAM,KAAM,KAAMC,IAGlCxJ,GAAOwI,gBAAkB,SAAUpN,EAAMmO,GASxC,IAPOnO,EAAK0J,eAAiB1J,KAAW9C,GACvCoI,EAAatF,GAIdmO,EAAOA,EAAKvM,QAASwF,EAAkB,aAElCnJ,EAAQmP,kBAAmB5H,GAC5BE,GAAkBA,EAAcuE,KAAMkE,IACtC1I,GAAkBA,EAAUwE,KAAMkE,IAErC,IACC,GAAI1O,GAAM0E,EAAQ/E,KAAMY,EAAMmO,EAG9B,IAAK1O,GAAOxB,EAAQwP,mBAGlBzN,EAAK9C,UAAuC,KAA3B8C,EAAK9C,SAASqF,SAChC,MAAO9C,GAEP,MAAOuJ,IAGV,MAAOpE,IAAQuJ,EAAMjR,EAAU,MAAQ8C,IAASd,OAAS,GAG1D0F,GAAOe,SAAW,SAAUtH,EAAS2B,GAKpC,OAHO3B,EAAQqL,eAAiBrL,KAAcnB,GAC7CoI,EAAajH,GAEPsH,EAAUtH,EAAS2B,IAG3B4E,GAAOyJ,KAAO,SAAUrO,EAAMc,IAEtBd,EAAK0J,eAAiB1J,KAAW9C,GACvCoI,EAAatF,EAGd,IAAI1B,GAAKuG,EAAKwG,WAAYvK,EAAK0C,eAE9B8K,EAAMhQ,GAAMP,EAAOqB,KAAMyF,EAAKwG,WAAYvK,EAAK0C,eAC9ClF,EAAI0B,EAAMc,GAAO0E,GACjBhE,MAEF,OAAeA,UAAR8M,EACNA,EACArQ,EAAQ6I,aAAetB,EACtBxF,EAAKkK,aAAcpJ,IAClBwN,EAAMtO,EAAKgN,iBAAiBlM,KAAUwN,EAAIC,UAC1CD,EAAI7K,MACJ,MAGJmB,GAAO9C,MAAQ,SAAUC,GACxB,KAAM,IAAI3E,OAAO,0CAA4C2E,IAO9D6C,GAAO4J,WAAa,SAAU5K,GAC7B,GAAI5D,GACHyO,KACAjO,EAAI,EACJP,EAAI,CAOL,IAJAoF,GAAgBpH,EAAQyQ,iBACxBtJ,GAAanH,EAAQ0Q,YAAc/K,EAAQnG,MAAO,GAClDmG,EAAQlD,KAAMyF,GAETd,EAAe,CACnB,MAASrF,EAAO4D,EAAQ3D,KAClBD,IAAS4D,EAAS3D,KACtBO,EAAIiO,EAAW9Q,KAAMsC,GAGvB,OAAQO,IACPoD,EAAQjD,OAAQ8N,EAAYjO,GAAK,GAQnC,MAFA4E,GAAY,KAELxB,GAORkB,EAAUF,GAAOE,QAAU,SAAU9E,GACpC,GAAIiM,GACHxM,EAAM,GACNQ,EAAI,EACJsC,EAAWvC,EAAKuC,QAEjB,IAAMA,GAMC,GAAkB,IAAbA,GAA+B,IAAbA,GAA+B,KAAbA,EAAkB,CAGjE,GAAiC,gBAArBvC,GAAK4O,YAChB,MAAO5O,GAAK4O,WAGZ,KAAM5O,EAAOA,EAAK6O,WAAY7O,EAAMA,EAAOA,EAAK0L,YAC/CjM,GAAOqF,EAAS9E,OAGZ,IAAkB,IAAbuC,GAA+B,IAAbA,EAC7B,MAAOvC,GAAK8O,cAhBZ,OAAS7C,EAAOjM,EAAKC,KAEpBR,GAAOqF,EAASmH,EAkBlB,OAAOxM,IAGRoF,EAAOD,GAAOmK,WAGblE,YAAa,GAEbmE,aAAcjE,GAEd5B,MAAO5B,EAEP8D,cAEAwB,QAEAoC,UACCC,KAAOC,IAAK,aAAc/O,OAAO,GACjCgP,KAAOD,IAAK,cACZE,KAAOF,IAAK,kBAAmB/O,OAAO,GACtCkP,KAAOH,IAAK,oBAGbI,WACC5H,KAAQ,SAAUwB,GAUjB,MATAA,GAAM,GAAKA,EAAM,GAAGvH,QAAS0G,GAAWC,IAGxCY,EAAM,IAAOA,EAAM,IAAMA,EAAM,IAAMA,EAAM,IAAM,IAAKvH,QAAS0G,GAAWC,IAExD,OAAbY,EAAM,KACVA,EAAM,GAAK,IAAMA,EAAM,GAAK,KAGtBA,EAAM1L,MAAO,EAAG,IAGxBoK,MAAS,SAAUsB,GA6BlB,MAlBAA,GAAM,GAAKA,EAAM,GAAG3F,cAEY,QAA3B2F,EAAM,GAAG1L,MAAO,EAAG,IAEjB0L,EAAM,IACXvE,GAAO9C,MAAOqH,EAAM,IAKrBA,EAAM,KAAQA,EAAM,GAAKA,EAAM,IAAMA,EAAM,IAAM,GAAK,GAAmB,SAAbA,EAAM,IAA8B,QAAbA,EAAM,KACzFA,EAAM,KAAUA,EAAM,GAAKA,EAAM,IAAqB,QAAbA,EAAM,KAGpCA,EAAM,IACjBvE,GAAO9C,MAAOqH,EAAM,IAGdA,GAGRvB,OAAU,SAAUuB,GACnB,GAAIqG,GACHC,GAAYtG,EAAM,IAAMA,EAAM,EAE/B,OAAK5B,GAAiB,MAAE0C,KAAMd,EAAM,IAC5B,MAIHA,EAAM,GACVA,EAAM,GAAKA,EAAM,IAAMA,EAAM,IAAM,GAGxBsG,GAAYpI,EAAQ4C,KAAMwF,KAEpCD,EAASxK,EAAUyK,GAAU,MAE7BD,EAASC,EAAS7R,QAAS,IAAK6R,EAASvQ,OAASsQ,GAAWC,EAASvQ,UAGvEiK,EAAM,GAAKA,EAAM,GAAG1L,MAAO,EAAG+R,GAC9BrG,EAAM,GAAKsG,EAAShS,MAAO,EAAG+R,IAIxBrG,EAAM1L,MAAO,EAAG,MAIzBqP,QAECpF,IAAO,SAAUgI,GAChB,GAAInM,GAAWmM,EAAiB9N,QAAS0G,GAAWC,IAAY/E,aAChE,OAA4B,MAArBkM,EACN,WAAa,OAAO,GACpB,SAAU1P,GACT,MAAOA,GAAKuD,UAAYvD,EAAKuD,SAASC,gBAAkBD,IAI3DkE,MAAS,SAAUgF,GAClB,GAAIkD,GAAU5J,EAAY0G,EAAY,IAEtC,OAAOkD,KACLA,EAAU,GAAI1I,QAAQ,MAAQN,EAAa,IAAM8F,EAAY,IAAM9F,EAAa,SACjFZ,EAAY0G,EAAW,SAAUzM,GAChC,MAAO2P,GAAQ1F,KAAgC,gBAAnBjK,GAAKyM,WAA0BzM,EAAKyM,WAA0C,mBAAtBzM,GAAKkK,cAAgClK,EAAKkK,aAAa,UAAY,OAI1JvC,KAAQ,SAAU7G,EAAM8O,EAAUC,GACjC,MAAO,UAAU7P,GAChB,GAAI8P,GAASlL,GAAOyJ,KAAMrO,EAAMc,EAEhC,OAAe,OAAVgP,EACgB,OAAbF,EAEFA,GAINE,GAAU,GAEU,MAAbF,EAAmBE,IAAWD,EACvB,OAAbD,EAAoBE,IAAWD,EAClB,OAAbD,EAAoBC,GAAqC,IAA5BC,EAAOlS,QAASiS,GAChC,OAAbD,EAAoBC,GAASC,EAAOlS,QAASiS,GAAU,GAC1C,OAAbD,EAAoBC,GAASC,EAAOrS,OAAQoS,EAAM3Q,UAAa2Q,EAClD,OAAbD,GAAsB,IAAME,EAAOlO,QAASoF,EAAa,KAAQ,KAAMpJ,QAASiS,GAAU,GAC7E,OAAbD,EAAoBE,IAAWD,GAASC,EAAOrS,MAAO,EAAGoS,EAAM3Q,OAAS,KAAQ2Q,EAAQ,KACxF,IAZO,IAgBVhI,MAAS,SAAU3F,EAAM6N,EAAMjE,EAAU1L,EAAOE,GAC/C,GAAI0P,GAAgC,QAAvB9N,EAAKzE,MAAO,EAAG,GAC3BwS,EAA+B,SAArB/N,EAAKzE,MAAO,IACtByS,EAAkB,YAATH,CAEV,OAAiB,KAAV3P,GAAwB,IAATE,EAGrB,SAAUN,GACT,QAASA,EAAKmD,YAGf,SAAUnD,EAAM3B,EAAS8R,GACxB,GAAIxF,GAAOyF,EAAYnE,EAAMT,EAAM6E,EAAWC,EAC7CnB,EAAMa,IAAWC,EAAU,cAAgB,kBAC3C9D,EAASnM,EAAKmD,WACdrC,EAAOoP,GAAUlQ,EAAKuD,SAASC,cAC/B+M,GAAYJ,IAAQD,CAErB,IAAK/D,EAAS,CAGb,GAAK6D,EAAS,CACb,MAAQb,EAAM,CACblD,EAAOjM,CACP,OAASiM,EAAOA,EAAMkD,GACrB,GAAKe,EAASjE,EAAK1I,SAASC,gBAAkB1C,EAAyB,IAAlBmL,EAAK1J,SACzD,OAAO,CAIT+N,GAAQnB,EAAe,SAATjN,IAAoBoO,GAAS,cAE5C,OAAO,EAMR,GAHAA,GAAUL,EAAU9D,EAAO0C,WAAa1C,EAAOqE,WAG1CP,GAAWM,EAAW,CAE1BH,EAAajE,EAAQ1K,KAAc0K,EAAQ1K,OAC3CkJ,EAAQyF,EAAYlO,OACpBmO,EAAY1F,EAAM,KAAO9E,GAAW8E,EAAM,GAC1Ca,EAAOb,EAAM,KAAO9E,GAAW8E,EAAM,GACrCsB,EAAOoE,GAAalE,EAAOpD,WAAYsH,EAEvC,OAASpE,IAASoE,GAAapE,GAAQA,EAAMkD,KAG3C3D,EAAO6E,EAAY,IAAMC,EAAM/J,MAGhC,GAAuB,IAAlB0F,EAAK1J,YAAoBiJ,GAAQS,IAASjM,EAAO,CACrDoQ,EAAYlO,IAAW2D,EAASwK,EAAW7E,EAC3C,YAKI,IAAK+E,IAAa5F,GAAS3K,EAAMyB,KAAczB,EAAMyB,QAAkBS,KAAWyI,EAAM,KAAO9E,EACrG2F,EAAOb,EAAM,OAKb,OAASsB,IAASoE,GAAapE,GAAQA,EAAMkD,KAC3C3D,EAAO6E,EAAY,IAAMC,EAAM/J,MAEhC,IAAO2J,EAASjE,EAAK1I,SAASC,gBAAkB1C,EAAyB,IAAlBmL,EAAK1J,aAAsBiJ,IAE5E+E,KACHtE,EAAMxK,KAAcwK,EAAMxK,QAAkBS,IAAW2D,EAAS2F,IAG7DS,IAASjM,GACb,KAQJ,OADAwL,IAAQlL,EACDkL,IAASpL,GAAWoL,EAAOpL,IAAU,GAAKoL,EAAOpL,GAAS,KAKrEwH,OAAU,SAAU6I,EAAQ3E,GAK3B,GAAIhM,GACHxB,EAAKuG,EAAKkC,QAAS0J,IAAY5L,EAAK6L,WAAYD,EAAOjN,gBACtDoB,GAAO9C,MAAO,uBAAyB2O,EAKzC,OAAKnS,GAAImD,GACDnD,EAAIwN,GAIPxN,EAAGY,OAAS,GAChBY,GAAS2Q,EAAQA,EAAQ,GAAI3E,GACtBjH,EAAK6L,WAAW1S,eAAgByS,EAAOjN,eAC7CuH,GAAa,SAAU7B,EAAM/E,GAC5B,GAAIwM,GACHC,EAAUtS,EAAI4K,EAAM4C,GACpB7L,EAAI2Q,EAAQ1R,MACb,OAAQe,IACP0Q,EAAM/S,EAASsL,EAAM0H,EAAQ3Q,IAC7BiJ,EAAMyH,KAAWxM,EAASwM,GAAQC,EAAQ3Q,MAG5C,SAAUD,GACT,MAAO1B,GAAI0B,EAAM,EAAGF,KAIhBxB,IAITyI,SAEC8J,IAAO9F,GAAa,SAAU3M,GAI7B,GAAI+O,MACHvJ,KACAkN,EAAU7L,EAAS7G,EAASwD,QAASpD,EAAO,MAE7C,OAAOsS,GAASrP,GACfsJ,GAAa,SAAU7B,EAAM/E,EAAS9F,EAAS8R,GAC9C,GAAInQ,GACH+Q,EAAYD,EAAS5H,EAAM,KAAMiH,MACjClQ,EAAIiJ,EAAKhK,MAGV,OAAQe,KACDD,EAAO+Q,EAAU9Q,MACtBiJ,EAAKjJ,KAAOkE,EAAQlE,GAAKD,MAI5B,SAAUA,EAAM3B,EAAS8R,GAKxB,MAJAhD,GAAM,GAAKnN,EACX8Q,EAAS3D,EAAO,KAAMgD,EAAKvM,GAE3BuJ,EAAM,GAAK,MACHvJ,EAAQ2C,SAInByK,IAAOjG,GAAa,SAAU3M,GAC7B,MAAO,UAAU4B,GAChB,MAAO4E,IAAQxG,EAAU4B,GAAOd,OAAS,KAI3CyG,SAAYoF,GAAa,SAAU/H,GAElC,MADAA,GAAOA,EAAKpB,QAAS0G,GAAWC,IACzB,SAAUvI,GAChB,OAASA,EAAK4O,aAAe5O,EAAKiR,WAAanM,EAAS9E,IAASpC,QAASoF,GAAS,MAWrFkO,KAAQnG,GAAc,SAAUmG,GAM/B,MAJM5J,GAAY2C,KAAKiH,GAAQ,KAC9BtM,GAAO9C,MAAO,qBAAuBoP,GAEtCA,EAAOA,EAAKtP,QAAS0G,GAAWC,IAAY/E,cACrC,SAAUxD,GAChB,GAAImR,EACJ,GACC,IAAMA,EAAW3L,EAChBxF,EAAKkR,KACLlR,EAAKkK,aAAa,aAAelK,EAAKkK,aAAa,QAGnD,MADAiH,GAAWA,EAAS3N,cACb2N,IAAaD,GAA2C,IAAnCC,EAASvT,QAASsT,EAAO,YAE5ClR,EAAOA,EAAKmD,aAAiC,IAAlBnD,EAAKuC,SAC3C,QAAO,KAKTpB,OAAU,SAAUnB,GACnB,GAAIoR,GAAO/T,EAAOgU,UAAYhU,EAAOgU,SAASD,IAC9C,OAAOA,IAAQA,EAAK3T,MAAO,KAAQuC,EAAK6J,IAGzCyH,KAAQ,SAAUtR,GACjB,MAAOA,KAASuF,GAGjBgM,MAAS,SAAUvR,GAClB,MAAOA,KAAS9C,EAASsU,iBAAmBtU,EAASuU,UAAYvU,EAASuU,gBAAkBzR,EAAKkC,MAAQlC,EAAK0R,OAAS1R,EAAK2R,WAI7HC,QAAW,SAAU5R,GACpB,MAAOA,GAAK6R,YAAa,GAG1BA,SAAY,SAAU7R,GACrB,MAAOA,GAAK6R,YAAa,GAG1BC,QAAW,SAAU9R,GAGpB,GAAIuD,GAAWvD,EAAKuD,SAASC,aAC7B,OAAqB,UAAbD,KAA0BvD,EAAK8R,SAA0B,WAAbvO,KAA2BvD,EAAK+R,UAGrFA,SAAY,SAAU/R,GAOrB,MAJKA,GAAKmD,YACTnD,EAAKmD,WAAW6O,cAGVhS,EAAK+R,YAAa,GAI1BE,MAAS,SAAUjS,GAKlB,IAAMA,EAAOA,EAAK6O,WAAY7O,EAAMA,EAAOA,EAAK0L,YAC/C,GAAK1L,EAAKuC,SAAW,EACpB,OAAO,CAGT,QAAO,GAGR4J,OAAU,SAAUnM,GACnB,OAAQ6E,EAAKkC,QAAe,MAAG/G,IAIhCkS,OAAU,SAAUlS,GACnB,MAAOiI,GAAQgC,KAAMjK,EAAKuD,WAG3B4J,MAAS,SAAUnN,GAClB,MAAOgI,GAAQiC,KAAMjK,EAAKuD,WAG3B4O,OAAU,SAAUnS,GACnB,GAAIc,GAAOd,EAAKuD,SAASC,aACzB,OAAgB,UAAT1C,GAAkC,WAAdd,EAAKkC,MAA8B,WAATpB,GAGtDkC,KAAQ,SAAUhD,GACjB,GAAIqO,EACJ,OAAuC,UAAhCrO,EAAKuD,SAASC,eACN,SAAdxD,EAAKkC,OAImC,OAArCmM,EAAOrO,EAAKkK,aAAa,UAA2C,SAAvBmE,EAAK7K,gBAIvDpD,MAASyL,GAAuB,WAC/B,OAAS,KAGVvL,KAAQuL,GAAuB,SAAUE,EAAc7M,GACtD,OAASA,EAAS,KAGnBmB,GAAMwL,GAAuB,SAAUE,EAAc7M,EAAQ4M,GAC5D,OAAoB,EAAXA,EAAeA,EAAW5M,EAAS4M,KAG7CsG,KAAQvG,GAAuB,SAAUE,EAAc7M,GAEtD,IADA,GAAIe,GAAI,EACIf,EAAJe,EAAYA,GAAK,EACxB8L,EAAapO,KAAMsC,EAEpB,OAAO8L,KAGRsG,IAAOxG,GAAuB,SAAUE,EAAc7M,GAErD,IADA,GAAIe,GAAI,EACIf,EAAJe,EAAYA,GAAK,EACxB8L,EAAapO,KAAMsC,EAEpB,OAAO8L,KAGRuG,GAAMzG,GAAuB,SAAUE,EAAc7M,EAAQ4M,GAE5D,IADA,GAAI7L,GAAe,EAAX6L,EAAeA,EAAW5M,EAAS4M,IACjC7L,GAAK,GACd8L,EAAapO,KAAMsC,EAEpB,OAAO8L,KAGRwG,GAAM1G,GAAuB,SAAUE,EAAc7M,EAAQ4M,GAE5D,IADA,GAAI7L,GAAe,EAAX6L,EAAeA,EAAW5M,EAAS4M,IACjC7L,EAAIf,GACb6M,EAAapO,KAAMsC,EAEpB,OAAO8L,OAKVlH,EAAKkC,QAAa,IAAIlC,EAAKkC,QAAY,EAGvC,KAAM9G,KAAOuS,OAAO,EAAMC,UAAU,EAAMC,MAAM,EAAMC,UAAU,EAAMC,OAAO,GAC5E/N,EAAKkC,QAAS9G,GAAM0L,GAAmB1L,EAExC,KAAMA,KAAO4S,QAAQ,EAAMC,OAAO,GACjCjO,EAAKkC,QAAS9G,GAAM2L,GAAoB3L,EAIzC,SAASyQ,OACTA,GAAW3R,UAAY8F,EAAKkO,QAAUlO,EAAKkC,QAC3ClC,EAAK6L,WAAa,GAAIA,IAEtB1L,EAAWJ,GAAOI,SAAW,SAAU5G,EAAU4U,GAChD,GAAIpC,GAASzH,EAAO8J,EAAQ/Q,EAC3BgR,EAAO7J,EAAQ8J,EACfC,EAASnN,EAAY7H,EAAW,IAEjC,IAAKgV,EACJ,MAAOJ,GAAY,EAAII,EAAO3V,MAAO,EAGtCyV,GAAQ9U,EACRiL,KACA8J,EAAatO,EAAK0K,SAElB,OAAQ2D,EAAQ,GAGTtC,IAAYzH,EAAQjC,EAAOyC,KAAMuJ,OACjC/J,IAEJ+J,EAAQA,EAAMzV,MAAO0L,EAAM,GAAGjK,SAAYgU,GAE3C7J,EAAO1L,KAAOsV,OAGfrC,GAAU,GAGJzH,EAAQhC,EAAawC,KAAMuJ,MAChCtC,EAAUzH,EAAM2B,QAChBmI,EAAOtV,MACN8F,MAAOmN,EAEP1O,KAAMiH,EAAM,GAAGvH,QAASpD,EAAO,OAEhC0U,EAAQA,EAAMzV,MAAOmT,EAAQ1R,QAI9B,KAAMgD,IAAQ2C,GAAKiI,SACZ3D,EAAQ5B,EAAWrF,GAAOyH,KAAMuJ,KAAcC,EAAYjR,MAC9DiH,EAAQgK,EAAYjR,GAAQiH,MAC7ByH,EAAUzH,EAAM2B,QAChBmI,EAAOtV,MACN8F,MAAOmN,EACP1O,KAAMA,EACNiC,QAASgF,IAEV+J,EAAQA,EAAMzV,MAAOmT,EAAQ1R,QAI/B,KAAM0R,EACL,MAOF,MAAOoC,GACNE,EAAMhU,OACNgU,EACCtO,GAAO9C,MAAO1D,GAEd6H,EAAY7H,EAAUiL,GAAS5L,MAAO,GAGzC,SAAS2M,IAAY6I,GAIpB,IAHA,GAAIhT,GAAI,EACPM,EAAM0S,EAAO/T,OACbd,EAAW,GACAmC,EAAJN,EAASA,IAChB7B,GAAY6U,EAAOhT,GAAGwD,KAEvB,OAAOrF,GAGR,QAASiV,IAAevC,EAASwC,EAAYC,GAC5C,GAAIpE,GAAMmE,EAAWnE,IACpBqE,EAAmBD,GAAgB,eAARpE,EAC3BsE,EAAW3N,GAEZ,OAAOwN,GAAWlT,MAEjB,SAAUJ,EAAM3B,EAAS8R,GACxB,MAASnQ,EAAOA,EAAMmP,GACrB,GAAuB,IAAlBnP,EAAKuC,UAAkBiR,EAC3B,MAAO1C,GAAS9Q,EAAM3B,EAAS8R,IAMlC,SAAUnQ,EAAM3B,EAAS8R,GACxB,GAAIuD,GAAUtD,EACbuD,GAAa9N,EAAS4N,EAGvB,IAAKtD,GACJ,MAASnQ,EAAOA,EAAMmP,GACrB,IAAuB,IAAlBnP,EAAKuC,UAAkBiR,IACtB1C,EAAS9Q,EAAM3B,EAAS8R,GAC5B,OAAO,MAKV,OAASnQ,EAAOA,EAAMmP,GACrB,GAAuB,IAAlBnP,EAAKuC,UAAkBiR,EAAmB,CAE9C,GADApD,EAAapQ,EAAMyB,KAAczB,EAAMyB,QACjCiS,EAAWtD,EAAYjB,KAC5BuE,EAAU,KAAQ7N,GAAW6N,EAAU,KAAQD,EAG/C,MAAQE,GAAU,GAAMD,EAAU,EAMlC,IAHAtD,EAAYjB,GAAQwE,EAGdA,EAAU,GAAM7C,EAAS9Q,EAAM3B,EAAS8R,GAC7C,OAAO,IASf,QAASyD,IAAgBC,GACxB,MAAOA,GAAS3U,OAAS,EACxB,SAAUc,EAAM3B,EAAS8R,GACxB,GAAIlQ,GAAI4T,EAAS3U,MACjB,OAAQe,IACP,IAAM4T,EAAS5T,GAAID,EAAM3B,EAAS8R,GACjC,OAAO,CAGT,QAAO,GAER0D,EAAS,GAGX,QAASC,IAAkB1V,EAAU2V,EAAUnQ,GAG9C,IAFA,GAAI3D,GAAI,EACPM,EAAMwT,EAAS7U,OACJqB,EAAJN,EAASA,IAChB2E,GAAQxG,EAAU2V,EAAS9T,GAAI2D,EAEhC,OAAOA,GAGR,QAASoQ,IAAUjD,EAAWhR,EAAK+M,EAAQzO,EAAS8R,GAOnD,IANA,GAAInQ,GACHiU,KACAhU,EAAI,EACJM,EAAMwQ,EAAU7R,OAChBgV,EAAgB,MAAPnU,EAEEQ,EAAJN,EAASA,KACVD,EAAO+Q,EAAU9Q,OAChB6M,GAAUA,EAAQ9M,EAAM3B,EAAS8R,MACtC8D,EAAatW,KAAMqC,GACdkU,GACJnU,EAAIpC,KAAMsC,GAMd,OAAOgU,GAGR,QAASE,IAAY5E,EAAWnR,EAAU0S,EAASsD,EAAYC,EAAYC,GAO1E,MANKF,KAAeA,EAAY3S,KAC/B2S,EAAaD,GAAYC,IAErBC,IAAeA,EAAY5S,KAC/B4S,EAAaF,GAAYE,EAAYC,IAE/BvJ,GAAa,SAAU7B,EAAMtF,EAASvF,EAAS8R,GACrD,GAAIoE,GAAMtU,EAAGD,EACZwU,KACAC,KACAC,EAAc9Q,EAAQ1E,OAGtBM,EAAQ0J,GAAQ4K,GAAkB1V,GAAY,IAAKC,EAAQkE,UAAalE,GAAYA,MAGpFsW,GAAYpF,IAAerG,GAAS9K,EAEnCoB,EADAwU,GAAUxU,EAAOgV,EAAQjF,EAAWlR,EAAS8R,GAG9CyE,EAAa9D,EAEZuD,IAAgBnL,EAAOqG,EAAYmF,GAAeN,MAMjDxQ,EACD+Q,CAQF,IALK7D,GACJA,EAAS6D,EAAWC,EAAYvW,EAAS8R,GAIrCiE,EAAa,CACjBG,EAAOP,GAAUY,EAAYH,GAC7BL,EAAYG,KAAUlW,EAAS8R,GAG/BlQ,EAAIsU,EAAKrV,MACT,OAAQe,KACDD,EAAOuU,EAAKtU,MACjB2U,EAAYH,EAAQxU,MAAS0U,EAAWF,EAAQxU,IAAOD,IAK1D,GAAKkJ,GACJ,GAAKmL,GAAc9E,EAAY,CAC9B,GAAK8E,EAAa,CAEjBE,KACAtU,EAAI2U,EAAW1V,MACf,OAAQe,KACDD,EAAO4U,EAAW3U,KAEvBsU,EAAK5W,KAAOgX,EAAU1U,GAAKD,EAG7BqU,GAAY,KAAOO,KAAkBL,EAAMpE,GAI5ClQ,EAAI2U,EAAW1V,MACf,OAAQe,KACDD,EAAO4U,EAAW3U,MACtBsU,EAAOF,EAAazW,EAASsL,EAAMlJ,GAASwU,EAAOvU,IAAM,KAE1DiJ,EAAKqL,KAAU3Q,EAAQ2Q,GAAQvU,SAOlC4U,GAAaZ,GACZY,IAAehR,EACdgR,EAAWjU,OAAQ+T,EAAaE,EAAW1V,QAC3C0V,GAEGP,EACJA,EAAY,KAAMzQ,EAASgR,EAAYzE,GAEvCxS,EAAKuC,MAAO0D,EAASgR,KAMzB,QAASC,IAAmB5B,GAwB3B,IAvBA,GAAI6B,GAAchE,EAAStQ,EAC1BD,EAAM0S,EAAO/T,OACb6V,EAAkBlQ,EAAKoK,SAAUgE,EAAO,GAAG/Q,MAC3C8S,EAAmBD,GAAmBlQ,EAAKoK,SAAS,KACpDhP,EAAI8U,EAAkB,EAAI,EAG1BE,EAAe5B,GAAe,SAAUrT,GACvC,MAAOA,KAAS8U,GACdE,GAAkB,GACrBE,EAAkB7B,GAAe,SAAUrT,GAC1C,MAAOpC,GAASkX,EAAc9U,GAAS,IACrCgV,GAAkB,GACrBnB,GAAa,SAAU7T,EAAM3B,EAAS8R,GACrC,GAAI1Q,IAASsV,IAAqB5E,GAAO9R,IAAY8G,MACnD2P,EAAezW,GAASkE,SACxB0S,EAAcjV,EAAM3B,EAAS8R,GAC7B+E,EAAiBlV,EAAM3B,EAAS8R,GAGlC,OADA2E,GAAe,KACRrV,IAGGc,EAAJN,EAASA,IAChB,GAAM6Q,EAAUjM,EAAKoK,SAAUgE,EAAOhT,GAAGiC,MACxC2R,GAAaR,GAAcO,GAAgBC,GAAY/C,QACjD,CAIN,GAHAA,EAAUjM,EAAKiI,OAAQmG,EAAOhT,GAAGiC,MAAOhC,MAAO,KAAM+S,EAAOhT,GAAGkE,SAG1D2M,EAASrP,GAAY,CAGzB,IADAjB,IAAMP,EACMM,EAAJC,EAASA,IAChB,GAAKqE,EAAKoK,SAAUgE,EAAOzS,GAAG0B,MAC7B,KAGF,OAAOiS,IACNlU,EAAI,GAAK2T,GAAgBC,GACzB5T,EAAI,GAAKmK,GAER6I,EAAOxV,MAAO,EAAGwC,EAAI,GAAIvC,QAAS+F,MAAgC,MAAzBwP,EAAQhT,EAAI,GAAIiC,KAAe,IAAM,MAC7EN,QAASpD,EAAO,MAClBsS,EACItQ,EAAJP,GAAS4U,GAAmB5B,EAAOxV,MAAOwC,EAAGO,IACzCD,EAAJC,GAAWqU,GAAoB5B,EAASA,EAAOxV,MAAO+C,IAClDD,EAAJC,GAAW4J,GAAY6I,IAGzBY,EAASlW,KAAMmT,GAIjB,MAAO8C,IAAgBC,GAGxB,QAASsB,IAA0BC,EAAiBC,GACnD,GAAIC,GAAQD,EAAYnW,OAAS,EAChCqW,EAAYH,EAAgBlW,OAAS,EACrCsW,EAAe,SAAUtM,EAAM7K,EAAS8R,EAAKvM,EAAS6R,GACrD,GAAIzV,GAAMQ,EAAGsQ,EACZ4E,EAAe,EACfzV,EAAI,IACJ8Q,EAAY7H,MACZyM,KACAC,EAAgBzQ,EAEhB3F,EAAQ0J,GAAQqM,GAAa1Q,EAAKgI,KAAU,IAAG,IAAK4I,GAEpDI,EAAiBhQ,GAA4B,MAAjB+P,EAAwB,EAAIlU,KAAKC,UAAY,GACzEpB,EAAMf,EAAMN,MAUb,KARKuW,IACJtQ,EAAmB9G,IAAYnB,GAAYmB,GAOpC4B,IAAMM,GAA4B,OAApBP,EAAOR,EAAMS,IAAaA,IAAM,CACrD,GAAKsV,GAAavV,EAAO,CACxBQ,EAAI,CACJ,OAASsQ,EAAUsE,EAAgB5U,KAClC,GAAKsQ,EAAS9Q,EAAM3B,EAAS8R,GAAQ,CACpCvM,EAAQjG,KAAMqC,EACd,OAGGyV,IACJ5P,EAAUgQ,GAKPP,KAEEtV,GAAQ8Q,GAAW9Q,IACxB0V,IAIIxM,GACJ6H,EAAUpT,KAAMqC,IAOnB,GADA0V,GAAgBzV,EACXqV,GAASrV,IAAMyV,EAAe,CAClClV,EAAI,CACJ,OAASsQ,EAAUuE,EAAY7U,KAC9BsQ,EAASC,EAAW4E,EAAYtX,EAAS8R,EAG1C,IAAKjH,EAAO,CAEX,GAAKwM,EAAe,EACnB,MAAQzV,IACA8Q,EAAU9Q,IAAM0V,EAAW1V,KACjC0V,EAAW1V,GAAKsG,EAAInH,KAAMwE,GAM7B+R,GAAa3B,GAAU2B,GAIxBhY,EAAKuC,MAAO0D,EAAS+R,GAGhBF,IAAcvM,GAAQyM,EAAWzW,OAAS,GAC5CwW,EAAeL,EAAYnW,OAAW,GAExC0F,GAAO4J,WAAY5K,GAUrB,MALK6R,KACJ5P,EAAUgQ,EACV1Q,EAAmByQ,GAGb7E,EAGT,OAAOuE,GACNvK,GAAcyK,GACdA,EA+KF,MA5KAvQ,GAAUL,GAAOK,QAAU,SAAU7G,EAAU+K,GAC9C,GAAIlJ,GACHoV,KACAD,KACAhC,EAASlN,EAAe9H,EAAW,IAEpC,KAAMgV,EAAS,CAERjK,IACLA,EAAQnE,EAAU5G,IAEnB6B,EAAIkJ,EAAMjK,MACV,OAAQe,IACPmT,EAASyB,GAAmB1L,EAAMlJ,IAC7BmT,EAAQ3R,GACZ4T,EAAY1X,KAAMyV,GAElBgC,EAAgBzX,KAAMyV,EAKxBA,GAASlN,EAAe9H,EAAU+W,GAA0BC,EAAiBC,IAG7EjC,EAAOhV,SAAWA,EAEnB,MAAOgV,IAYRlO,EAASN,GAAOM,OAAS,SAAU9G,EAAUC,EAASuF,EAASsF,GAC9D,GAAIjJ,GAAGgT,EAAQ6C,EAAO5T,EAAM2K,EAC3BkJ,EAA+B,kBAAb3X,IAA2BA,EAC7C+K,GAASD,GAAQlE,EAAW5G,EAAW2X,EAAS3X,UAAYA,EAK7D,IAHAwF,EAAUA,MAGY,IAAjBuF,EAAMjK,OAAe,CAIzB,GADA+T,EAAS9J,EAAM,GAAKA,EAAM,GAAG1L,MAAO,GAC/BwV,EAAO/T,OAAS,GAAkC,QAA5B4W,EAAQ7C,EAAO,IAAI/Q,MAC5CjE,EAAQ0O,SAAgC,IAArBtO,EAAQkE,UAAkBiD,GAC7CX,EAAKoK,SAAUgE,EAAO,GAAG/Q,MAAS,CAGnC,GADA7D,GAAYwG,EAAKgI,KAAS,GAAGiJ,EAAM3R,QAAQ,GAAGvC,QAAQ0G,GAAWC,IAAYlK,QAAkB,IACzFA,EACL,MAAOuF,EAGImS,KACX1X,EAAUA,EAAQ8E,YAGnB/E,EAAWA,EAASX,MAAOwV,EAAOnI,QAAQrH,MAAMvE,QAIjDe,EAAIsH,EAAwB,aAAE0C,KAAM7L,GAAa,EAAI6U,EAAO/T,MAC5D,OAAQe,IAAM,CAIb,GAHA6V,EAAQ7C,EAAOhT,GAGV4E,EAAKoK,SAAW/M,EAAO4T,EAAM5T,MACjC,KAED,KAAM2K,EAAOhI,EAAKgI,KAAM3K,MAEjBgH,EAAO2D,EACZiJ,EAAM3R,QAAQ,GAAGvC,QAAS0G,GAAWC,IACrCH,GAAS6B,KAAMgJ,EAAO,GAAG/Q,OAAUmI,GAAahM,EAAQ8E,aAAgB9E,IACpE,CAKJ,GAFA4U,EAAOtS,OAAQV,EAAG,GAClB7B,EAAW8K,EAAKhK,QAAUkL,GAAY6I,IAChC7U,EAEL,MADAT,GAAKuC,MAAO0D,EAASsF,GACdtF,CAGR,SAeJ,OAPEmS,GAAY9Q,EAAS7G,EAAU+K,IAChCD,EACA7K,GACCmH,EACD5B,EACAwE,GAAS6B,KAAM7L,IAAciM,GAAahM,EAAQ8E,aAAgB9E,GAE5DuF,GAMR3F,EAAQ0Q,WAAalN,EAAQkD,MAAM,IAAIjE,KAAMyF,GAAYmE,KAAK,MAAQ7I,EAItExD,EAAQyQ,mBAAqBrJ,EAG7BC,IAIArH,EAAQ6P,aAAe9C,GAAO,SAAUgL,GAEvC,MAAuE,GAAhEA,EAAKtI,wBAAyBxQ,EAAS6F,cAAc,UAMvDiI,GAAO,SAAUC,GAEtB,MADAA,GAAIiC,UAAY,mBAC+B,MAAxCjC,EAAI4D,WAAW3E,aAAa,WAEnCgB,GAAW,yBAA0B,SAAUlL,EAAMc,EAAMiE,GAC1D,MAAMA,GAAN,OACQ/E,EAAKkK,aAAcpJ,EAA6B,SAAvBA,EAAK0C,cAA2B,EAAI,KAOjEvF,EAAQ6I,YAAekE,GAAO,SAAUC,GAG7C,MAFAA,GAAIiC,UAAY,WAChBjC,EAAI4D,WAAW1E,aAAc,QAAS,IACY,KAA3Cc,EAAI4D,WAAW3E,aAAc,YAEpCgB,GAAW,QAAS,SAAUlL,EAAMc,EAAMiE,GACzC,MAAMA,IAAyC,UAAhC/E,EAAKuD,SAASC,cAA7B,OACQxD,EAAKiW,eAOTjL,GAAO,SAAUC,GACtB,MAAuC,OAAhCA,EAAIf,aAAa,eAExBgB,GAAWxE,EAAU,SAAU1G,EAAMc,EAAMiE,GAC1C,GAAIuJ,EACJ,OAAMvJ,GAAN,OACQ/E,EAAMc,MAAW,EAAOA,EAAK0C,eACjC8K,EAAMtO,EAAKgN,iBAAkBlM,KAAWwN,EAAIC,UAC7CD,EAAI7K,MACL,OAKGmB,IAEHvH,EAIJc,GAAO0O,KAAOjI,EACdzG,EAAOgQ,KAAOvJ,EAAOmK,UACrB5Q,EAAOgQ,KAAK,KAAOhQ,EAAOgQ,KAAKpH,QAC/B5I,EAAO+X,OAAStR,EAAO4J,WACvBrQ,EAAO6E,KAAO4B,EAAOE,QACrB3G,EAAOgY,SAAWvR,EAAOG,MACzB5G,EAAOwH,SAAWf,EAAOe,QAIzB,IAAIyQ,GAAgBjY,EAAOgQ,KAAKhF,MAAMpB,aAElCsO,EAAa,6BAIbC,EAAY,gBAGhB,SAASC,GAAQnI,EAAUoI,EAAW3F,GACrC,GAAK1S,EAAOkD,WAAYmV,GACvB,MAAOrY,GAAO6F,KAAMoK,EAAU,SAAUpO,EAAMC,GAE7C,QAASuW,EAAUpX,KAAMY,EAAMC,EAAGD,KAAW6Q,GAK/C,IAAK2F,EAAUjU,SACd,MAAOpE,GAAO6F,KAAMoK,EAAU,SAAUpO,GACvC,MAASA,KAASwW,IAAgB3F,GAKpC,IAA0B,gBAAd2F,GAAyB,CACpC,GAAKF,EAAUrM,KAAMuM,GACpB,MAAOrY,GAAO2O,OAAQ0J,EAAWpI,EAAUyC,EAG5C2F,GAAYrY,EAAO2O,OAAQ0J,EAAWpI,GAGvC,MAAOjQ,GAAO6F,KAAMoK,EAAU,SAAUpO,GACvC,MAASpC,GAAQwB,KAAMoX,EAAWxW,IAAU,IAAQ6Q,IAItD1S,EAAO2O,OAAS,SAAUqB,EAAM3O,EAAOqR,GACtC,GAAI7Q,GAAOR,EAAO,EAMlB,OAJKqR,KACJ1C,EAAO,QAAUA,EAAO,KAGD,IAAjB3O,EAAMN,QAAkC,IAAlBc,EAAKuC,SACjCpE,EAAO0O,KAAKO,gBAAiBpN,EAAMmO,IAAWnO,MAC9C7B,EAAO0O,KAAK1I,QAASgK,EAAMhQ,EAAO6F,KAAMxE,EAAO,SAAUQ,GACxD,MAAyB,KAAlBA,EAAKuC,aAIfpE,EAAOG,GAAGsC,QACTiM,KAAM,SAAUzO,GACf,GAAI6B,GACHM,EAAMjD,KAAK4B,OACXO,KACAgX,EAAOnZ,IAER,IAAyB,gBAAbc,GACX,MAAOd,MAAKiC,UAAWpB,EAAQC,GAAW0O,OAAO,WAChD,IAAM7M,EAAI,EAAOM,EAAJN,EAASA,IACrB,GAAK9B,EAAOwH,SAAU8Q,EAAMxW,GAAK3C,MAChC,OAAO,IAMX,KAAM2C,EAAI,EAAOM,EAAJN,EAASA,IACrB9B,EAAO0O,KAAMzO,EAAUqY,EAAMxW,GAAKR,EAMnC,OAFAA,GAAMnC,KAAKiC,UAAWgB,EAAM,EAAIpC,EAAO+X,OAAQzW,GAAQA,GACvDA,EAAIrB,SAAWd,KAAKc,SAAWd,KAAKc,SAAW,IAAMA,EAAWA,EACzDqB,GAERqN,OAAQ,SAAU1O,GACjB,MAAOd,MAAKiC,UAAWgX,EAAOjZ,KAAMc,OAAgB,KAErDyS,IAAK,SAAUzS,GACd,MAAOd,MAAKiC,UAAWgX,EAAOjZ,KAAMc,OAAgB,KAErDsY,GAAI,SAAUtY,GACb,QAASmY,EACRjZ,KAIoB,gBAAbc,IAAyBgY,EAAcnM,KAAM7L,GACnDD,EAAQC,GACRA,OACD,GACCc,SASJ,IAAIyX,GAKHxO,EAAa,sCAEb5J,EAAOJ,EAAOG,GAAGC,KAAO,SAAUH,EAAUC,GAC3C,GAAI8K,GAAOnJ,CAGX,KAAM5B,EACL,MAAOd,KAIR,IAAyB,gBAAbc,GAAwB,CAUnC,GAPC+K,EAFoB,MAAhB/K,EAAS,IAAkD,MAApCA,EAAUA,EAASc,OAAS,IAAed,EAASc,QAAU,GAE/E,KAAMd,EAAU,MAGlB+J,EAAWwB,KAAMvL,IAIrB+K,IAAUA,EAAM,IAAO9K,EAgDrB,OAAMA,GAAWA,EAAQW,QACtBX,GAAWsY,GAAa9J,KAAMzO,GAKhCd,KAAK2B,YAAaZ,GAAUwO,KAAMzO,EAnDzC,IAAK+K,EAAM,GAAK,CAYf,GAXA9K,EAAUA,YAAmBF,GAASE,EAAQ,GAAKA,EAInDF,EAAOuB,MAAOpC,KAAMa,EAAOyY,UAC1BzN,EAAM,GACN9K,GAAWA,EAAQkE,SAAWlE,EAAQqL,eAAiBrL,EAAUnB,GACjE,IAIImZ,EAAWpM,KAAMd,EAAM,KAAQhL,EAAOmD,cAAejD,GACzD,IAAM8K,IAAS9K,GAETF,EAAOkD,WAAY/D,KAAM6L,IAC7B7L,KAAM6L,GAAS9K,EAAS8K,IAIxB7L,KAAK+Q,KAAMlF,EAAO9K,EAAS8K,GAK9B,OAAO7L,MAgBP,MAZA0C,GAAO9C,EAAS0M,eAAgBT,EAAM,IAIjCnJ,GAAQA,EAAKmD,aAEjB7F,KAAK4B,OAAS,EACd5B,KAAK,GAAK0C,GAGX1C,KAAKe,QAAUnB,EACfI,KAAKc,SAAWA,EACTd,KAcH,MAAKc,GAASmE,UACpBjF,KAAKe,QAAUf,KAAK,GAAKc,EACzBd,KAAK4B,OAAS,EACP5B,MAIIa,EAAOkD,WAAYjD,GACK,mBAArBuY,GAAWE,MACxBF,EAAWE,MAAOzY,GAElBA,EAAUD,IAGeqD,SAAtBpD,EAASA,WACbd,KAAKc,SAAWA,EAASA,SACzBd,KAAKe,QAAUD,EAASC,SAGlBF,EAAOwF,UAAWvF,EAAUd,OAIrCiB,GAAKQ,UAAYZ,EAAOG,GAGxBqY,EAAaxY,EAAQjB,EAGrB,IAAI4Z,GAAe,iCAElBC,GACCC,UAAU,EACVC,UAAU,EACVC,MAAM,EACNC,MAAM,EAGRhZ,GAAOyC,QACNuO,IAAK,SAAUnP,EAAMmP,EAAKiI,GACzB,GAAIxG,MACHyG,EAAqB7V,SAAV4V,CAEZ,QAASpX,EAAOA,EAAMmP,KAA4B,IAAlBnP,EAAKuC,SACpC,GAAuB,IAAlBvC,EAAKuC,SAAiB,CAC1B,GAAK8U,GAAYlZ,EAAQ6B,GAAO0W,GAAIU,GACnC,KAEDxG,GAAQjT,KAAMqC,GAGhB,MAAO4Q,IAGR0G,QAAS,SAAUC,EAAGvX,GAGrB,IAFA,GAAI4Q,MAEI2G,EAAGA,EAAIA,EAAE7L,YACI,IAAf6L,EAAEhV,UAAkBgV,IAAMvX,GAC9B4Q,EAAQjT,KAAM4Z,EAIhB,OAAO3G,MAITzS,EAAOG,GAAGsC,QACToQ,IAAK,SAAU7P,GACd,GAAIqW,GAAUrZ,EAAQgD,EAAQ7D,MAC7Bma,EAAID,EAAQtY,MAEb,OAAO5B,MAAKwP,OAAO,WAElB,IADA,GAAI7M,GAAI,EACIwX,EAAJxX,EAAOA,IACd,GAAK9B,EAAOwH,SAAUrI,KAAMka,EAAQvX,IACnC,OAAO,KAMXyX,QAAS,SAAU3I,EAAW1Q,GAS7B,IARA,GAAIkN,GACHtL,EAAI,EACJwX,EAAIna,KAAK4B,OACT0R,KACA+G,EAAMvB,EAAcnM,KAAM8E,IAAoC,gBAAdA,GAC/C5Q,EAAQ4Q,EAAW1Q,GAAWf,KAAKe,SACnC,EAEUoZ,EAAJxX,EAAOA,IACd,IAAMsL,EAAMjO,KAAK2C,GAAIsL,GAAOA,IAAQlN,EAASkN,EAAMA,EAAIpI,WAEtD,GAAKoI,EAAIhJ,SAAW,KAAOoV,EAC1BA,EAAIC,MAAMrM,GAAO,GAGA,IAAjBA,EAAIhJ,UACHpE,EAAO0O,KAAKO,gBAAgB7B,EAAKwD,IAAc,CAEhD6B,EAAQjT,KAAM4N,EACd,OAKH,MAAOjO,MAAKiC,UAAWqR,EAAQ1R,OAAS,EAAIf,EAAO+X,OAAQtF,GAAYA,IAIxEgH,MAAO,SAAU5X,GAGhB,MAAMA,GAKe,gBAATA,GACJpC,EAAQwB,KAAMjB,EAAQ6B,GAAQ1C,KAAM,IAIrCM,EAAQwB,KAAM9B,KAGpB0C,EAAKhB,OAASgB,EAAM,GAAMA,GAZjB1C,KAAM,IAAOA,KAAM,GAAI6F,WAAe7F,KAAK8C,QAAQyX,UAAU3Y,OAAS,IAgBjF4Y,IAAK,SAAU1Z,EAAUC,GACxB,MAAOf,MAAKiC,UACXpB,EAAO+X,OACN/X,EAAOuB,MAAOpC,KAAK+B,MAAOlB,EAAQC,EAAUC,OAK/C0Z,QAAS,SAAU3Z,GAClB,MAAOd,MAAKwa,IAAiB,MAAZ1Z,EAChBd,KAAKqC,WAAarC,KAAKqC,WAAWmN,OAAO1O,MAK5C,SAASkZ,GAAS/L,EAAK4D,GACtB,OAAS5D,EAAMA,EAAI4D,KAA0B,IAAjB5D,EAAIhJ,UAChC,MAAOgJ,GAGRpN,EAAOyB,MACNuM,OAAQ,SAAUnM,GACjB,GAAImM,GAASnM,EAAKmD,UAClB,OAAOgJ,IAA8B,KAApBA,EAAO5J,SAAkB4J,EAAS,MAEpD6L,QAAS,SAAUhY,GAClB,MAAO7B,GAAOgR,IAAKnP,EAAM,eAE1BiY,aAAc,SAAUjY,EAAMC,EAAGmX,GAChC,MAAOjZ,GAAOgR,IAAKnP,EAAM,aAAcoX,IAExCF,KAAM,SAAUlX,GACf,MAAOsX,GAAStX,EAAM,gBAEvBmX,KAAM,SAAUnX,GACf,MAAOsX,GAAStX,EAAM,oBAEvBkY,QAAS,SAAUlY,GAClB,MAAO7B,GAAOgR,IAAKnP,EAAM,gBAE1B6X,QAAS,SAAU7X,GAClB,MAAO7B,GAAOgR,IAAKnP,EAAM,oBAE1BmY,UAAW,SAAUnY,EAAMC,EAAGmX,GAC7B,MAAOjZ,GAAOgR,IAAKnP,EAAM,cAAeoX,IAEzCgB,UAAW,SAAUpY,EAAMC,EAAGmX,GAC7B,MAAOjZ,GAAOgR,IAAKnP,EAAM,kBAAmBoX,IAE7CiB,SAAU,SAAUrY,GACnB,MAAO7B,GAAOmZ,SAAWtX,EAAKmD,gBAAmB0L,WAAY7O,IAE9DgX,SAAU,SAAUhX,GACnB,MAAO7B,GAAOmZ,QAAStX,EAAK6O,aAE7BoI,SAAU,SAAUjX,GACnB,MAAOA,GAAKsY,iBAAmBna,EAAOuB,SAAWM,EAAK+I,cAErD,SAAUjI,EAAMxC,GAClBH,EAAOG,GAAIwC,GAAS,SAAUsW,EAAOhZ,GACpC,GAAIwS,GAAUzS,EAAO4B,IAAKzC,KAAMgB,EAAI8Y,EAsBpC,OApB0B,UAArBtW,EAAKrD,MAAO,MAChBW,EAAWgZ,GAGPhZ,GAAgC,gBAAbA,KACvBwS,EAAUzS,EAAO2O,OAAQ1O,EAAUwS,IAG/BtT,KAAK4B,OAAS,IAEZ6X,EAAkBjW,IACvB3C,EAAO+X,OAAQtF,GAIXkG,EAAa7M,KAAMnJ,IACvB8P,EAAQ2H,WAIHjb,KAAKiC,UAAWqR,KAGzB,IAAI4H,GAAY,OAKZC,IAGJ,SAASC,GAAe7X,GACvB,GAAI8X,GAASF,EAAc5X,KAI3B,OAHA1C,GAAOyB,KAAMiB,EAAQsI,MAAOqP,OAAmB,SAAUhQ,EAAGoQ,GAC3DD,EAAQC,IAAS,IAEXD,EAyBRxa,EAAO0a,UAAY,SAAUhY,GAI5BA,EAA6B,gBAAZA,GACd4X,EAAc5X,IAAa6X,EAAe7X,GAC5C1C,EAAOyC,UAAYC,EAEpB,IACCiY,GAEAC,EAEAC,EAEAC,EAEAC,EAEAC,EAEA1S,KAEA2S,GAASvY,EAAQwY,SAEjBC,EAAO,SAAUC,GAOhB,IANAT,EAASjY,EAAQiY,QAAUS,EAC3BR,GAAQ,EACRI,EAAcF,GAAe,EAC7BA,EAAc,EACdC,EAAezS,EAAKvH,OACpB8Z,GAAS,EACDvS,GAAsByS,EAAdC,EAA4BA,IAC3C,GAAK1S,EAAM0S,GAAcjZ,MAAOqZ,EAAM,GAAKA,EAAM,OAAU,GAAS1Y,EAAQ2Y,YAAc,CACzFV,GAAS,CACT,OAGFE,GAAS,EACJvS,IACC2S,EACCA,EAAMla,QACVoa,EAAMF,EAAMtO,SAEFgO,EACXrS,KAEAgQ,EAAKgD,YAKRhD,GAECqB,IAAK,WACJ,GAAKrR,EAAO,CAEX,GAAI6J,GAAQ7J,EAAKvH,QACjB,QAAU4Y,GAAKhY,GACd3B,EAAOyB,KAAME,EAAM,SAAU0I,EAAGnE,GAC/B,GAAInC,GAAO/D,EAAO+D,KAAMmC,EACV,cAATnC,EACErB,EAAQqV,QAAWO,EAAKzF,IAAK3M,IAClCoC,EAAK9I,KAAM0G,GAEDA,GAAOA,EAAInF,QAAmB,WAATgD,GAEhC4V,EAAKzT,MAGJlE,WAGC6Y,EACJE,EAAezS,EAAKvH,OAGT4Z,IACXG,EAAc3I,EACdgJ,EAAMR,IAGR,MAAOxb,OAGRoc,OAAQ,WAkBP,MAjBKjT,IACJtI,EAAOyB,KAAMO,UAAW,SAAUqI,EAAGnE,GACpC,GAAIuT,EACJ,QAAUA,EAAQzZ,EAAO2F,QAASO,EAAKoC,EAAMmR,IAAY,GACxDnR,EAAK9F,OAAQiX,EAAO,GAEfoB,IACUE,GAATtB,GACJsB,IAEaC,GAATvB,GACJuB,OAME7b,MAIR0T,IAAK,SAAU1S,GACd,MAAOA,GAAKH,EAAO2F,QAASxF,EAAImI,GAAS,MAASA,IAAQA,EAAKvH,SAGhE+S,MAAO,WAGN,MAFAxL,MACAyS,EAAe,EACR5b,MAGRmc,QAAS,WAER,MADAhT,GAAO2S,EAAQN,EAAStX,OACjBlE,MAGRuU,SAAU,WACT,OAAQpL,GAGTkT,KAAM,WAKL,MAJAP,GAAQ5X,OACFsX,GACLrC,EAAKgD,UAECnc,MAGRsc,OAAQ,WACP,OAAQR,GAGTS,SAAU,SAAUxb,EAASyB,GAU5B,OATK2G,GAAWsS,IAASK,IACxBtZ,EAAOA,MACPA,GAASzB,EAASyB,EAAKrC,MAAQqC,EAAKrC,QAAUqC,GACzCkZ,EACJI,EAAMzb,KAAMmC,GAEZwZ,EAAMxZ,IAGDxC,MAGRgc,KAAM,WAEL,MADA7C,GAAKoD,SAAUvc,KAAM6C,WACd7C,MAGRyb,MAAO,WACN,QAASA,GAIZ,OAAOtC,IAIRtY,EAAOyC,QAENkZ,SAAU,SAAUC,GACnB,GAAIC,KAEA,UAAW,OAAQ7b,EAAO0a,UAAU,eAAgB,aACpD,SAAU,OAAQ1a,EAAO0a,UAAU,eAAgB,aACnD,SAAU,WAAY1a,EAAO0a,UAAU,YAE1CoB,EAAQ,UACRC,GACCD,MAAO,WACN,MAAOA,IAERE,OAAQ,WAEP,MADAC,GAAStU,KAAM3F,WAAYka,KAAMla,WAC1B7C,MAERgd,KAAM,WACL,GAAIC,GAAMpa,SACV,OAAOhC,GAAO2b,SAAS,SAAUU,GAChCrc,EAAOyB,KAAMoa,EAAQ,SAAU/Z,EAAGwa,GACjC,GAAInc,GAAKH,EAAOkD,WAAYkZ,EAAKta,KAASsa,EAAKta,EAE/Cma,GAAUK,EAAM,IAAK,WACpB,GAAIC,GAAWpc,GAAMA,EAAG4B,MAAO5C,KAAM6C,UAChCua,IAAYvc,EAAOkD,WAAYqZ,EAASR,SAC5CQ,EAASR,UACPpU,KAAM0U,EAASG,SACfN,KAAMG,EAASI,QACfC,SAAUL,EAASM,QAErBN,EAAUC,EAAO,GAAM,QAAUnd,OAAS4c,EAAUM,EAASN,UAAY5c,KAAMgB,GAAOoc,GAAava,eAItGoa,EAAM,OACJL,WAIJA,QAAS,SAAUjY,GAClB,MAAc,OAAPA,EAAc9D,EAAOyC,OAAQqB,EAAKiY,GAAYA,IAGvDE,IAwCD,OArCAF,GAAQa,KAAOb,EAAQI,KAGvBnc,EAAOyB,KAAMoa,EAAQ,SAAU/Z,EAAGwa,GACjC,GAAIhU,GAAOgU,EAAO,GACjBO,EAAcP,EAAO,EAGtBP,GAASO,EAAM,IAAOhU,EAAKqR,IAGtBkD,GACJvU,EAAKqR,IAAI,WAERmC,EAAQe,GAGNhB,EAAY,EAAJ/Z,GAAS,GAAIwZ,QAASO,EAAQ,GAAK,GAAIL,MAInDS,EAAUK,EAAM,IAAO,WAEtB,MADAL,GAAUK,EAAM,GAAK,QAAUnd,OAAS8c,EAAWF,EAAU5c,KAAM6C,WAC5D7C,MAER8c,EAAUK,EAAM,GAAK,QAAWhU,EAAKoT,WAItCK,EAAQA,QAASE,GAGZL,GACJA,EAAK3a,KAAMgb,EAAUA,GAIfA,GAIRa,KAAM,SAAUC,GACf,GAAIjb,GAAI,EACPkb,EAAgB1d,EAAM2B,KAAMe,WAC5BjB,EAASic,EAAcjc,OAGvBkc,EAAuB,IAAXlc,GAAkBgc,GAAe/c,EAAOkD,WAAY6Z,EAAYhB,SAAchb,EAAS,EAGnGkb,EAAyB,IAAdgB,EAAkBF,EAAc/c,EAAO2b,WAGlDuB,EAAa,SAAUpb,EAAG8T,EAAUuH,GACnC,MAAO,UAAU7X,GAChBsQ,EAAU9T,GAAM3C,KAChBge,EAAQrb,GAAME,UAAUjB,OAAS,EAAIzB,EAAM2B,KAAMe,WAAcsD,EAC1D6X,IAAWC,EACfnB,EAASoB,WAAYzH,EAAUuH,KACfF,GAChBhB,EAASqB,YAAa1H,EAAUuH,KAKnCC,EAAgBG,EAAkBC,CAGnC,IAAKzc,EAAS,EAIb,IAHAqc,EAAiB,GAAIpZ,OAAOjD,GAC5Bwc,EAAmB,GAAIvZ,OAAOjD,GAC9Byc,EAAkB,GAAIxZ,OAAOjD,GACjBA,EAAJe,EAAYA,IACdkb,EAAelb,IAAO9B,EAAOkD,WAAY8Z,EAAelb,GAAIia,SAChEiB,EAAelb,GAAIia,UACjBpU,KAAMuV,EAAYpb,EAAG0b,EAAiBR,IACtCd,KAAMD,EAASQ,QACfC,SAAUQ,EAAYpb,EAAGyb,EAAkBH,MAE3CH,CAUL,OAJMA,IACLhB,EAASqB,YAAaE,EAAiBR,GAGjCf,EAASF,YAMlB,IAAI0B,EAEJzd,GAAOG,GAAGuY,MAAQ,SAAUvY,GAI3B,MAFAH,GAAO0Y,MAAMqD,UAAUpU,KAAMxH,GAEtBhB,MAGRa,EAAOyC,QAENiB,SAAS,EAITga,UAAW,EAGXC,UAAW,SAAUC,GACfA,EACJ5d,EAAO0d,YAEP1d,EAAO0Y,OAAO,IAKhBA,MAAO,SAAUmF,IAGXA,KAAS,IAAS7d,EAAO0d,UAAY1d,EAAO0D,WAKjD1D,EAAO0D,SAAU,EAGZma,KAAS,KAAU7d,EAAO0d,UAAY,IAK3CD,EAAUH,YAAave,GAAYiB,IAG9BA,EAAOG,GAAG2d,iBACd9d,EAAQjB,GAAW+e,eAAgB,SACnC9d,EAAQjB,GAAWgf,IAAK,cAQ3B,SAASC,KACRjf,EAASkf,oBAAqB,mBAAoBD,GAAW,GAC7D9e,EAAO+e,oBAAqB,OAAQD,GAAW,GAC/Che,EAAO0Y,QAGR1Y,EAAO0Y,MAAMqD,QAAU,SAAUjY,GAqBhC,MApBM2Z,KAELA,EAAYzd,EAAO2b,WAKU,aAAxB5c,EAASmf,WAEbC,WAAYne,EAAO0Y,QAKnB3Z,EAASqP,iBAAkB,mBAAoB4P,GAAW,GAG1D9e,EAAOkP,iBAAkB,OAAQ4P,GAAW,KAGvCP,EAAU1B,QAASjY,IAI3B9D,EAAO0Y,MAAMqD,SAOb,IAAIqC,GAASpe,EAAOoe,OAAS,SAAU/c,EAAOlB,EAAIsM,EAAKnH,EAAO+Y,EAAWC,EAAUC,GAClF,GAAIzc,GAAI,EACPM,EAAMf,EAAMN,OACZyd,EAAc,MAAP/R,CAGR,IAA4B,WAAvBzM,EAAO+D,KAAM0I,GAAqB,CACtC4R,GAAY,CACZ,KAAMvc,IAAK2K,GACVzM,EAAOoe,OAAQ/c,EAAOlB,EAAI2B,EAAG2K,EAAI3K,IAAI,EAAMwc,EAAUC,OAIhD,IAAelb,SAAViC,IACX+Y,GAAY,EAENre,EAAOkD,WAAYoC,KACxBiZ,GAAM,GAGFC,IAECD,GACJpe,EAAGc,KAAMI,EAAOiE,GAChBnF,EAAK,OAILqe,EAAOre,EACPA,EAAK,SAAU0B,EAAM4K,EAAKnH,GACzB,MAAOkZ,GAAKvd,KAAMjB,EAAQ6B,GAAQyD,MAKhCnF,GACJ,KAAYiC,EAAJN,EAASA,IAChB3B,EAAIkB,EAAMS,GAAI2K,EAAK8R,EAAMjZ,EAAQA,EAAMrE,KAAMI,EAAMS,GAAIA,EAAG3B,EAAIkB,EAAMS,GAAI2K,IAK3E,OAAO4R,GACNhd,EAGAmd,EACCre,EAAGc,KAAMI,GACTe,EAAMjC,EAAIkB,EAAM,GAAIoL,GAAQ6R,EAO/Bte,GAAOye,WAAa,SAAUC,GAQ7B,MAA0B,KAAnBA,EAAMta,UAAqC,IAAnBsa,EAAMta,YAAsBsa,EAAMta,SAIlE,SAASua,KAIRjZ,OAAOkZ,eAAgBzf,KAAKqN,SAAY,GACvCtL,IAAK,WACJ,YAIF/B,KAAKmE,QAAUtD,EAAOsD,QAAUqb,EAAKE,MAGtCF,EAAKE,IAAM,EACXF,EAAKG,QAAU9e,EAAOye,WAEtBE,EAAK/d,WACJ6L,IAAK,SAAUiS,GAId,IAAMC,EAAKG,QAASJ,GACnB,MAAO,EAGR,IAAIK,MAEHC,EAASN,EAAOvf,KAAKmE,QAGtB,KAAM0b,EAAS,CACdA,EAASL,EAAKE,KAGd,KACCE,EAAY5f,KAAKmE,UAAcgC,MAAO0Z,GACtCtZ,OAAOuZ,iBAAkBP,EAAOK,GAI/B,MAAQlU,GACTkU,EAAY5f,KAAKmE,SAAY0b,EAC7Bhf,EAAOyC,OAAQic,EAAOK,IASxB,MAJM5f,MAAKqN,MAAOwS,KACjB7f,KAAKqN,MAAOwS,OAGNA,GAERE,IAAK,SAAUR,EAAOtD,EAAM9V,GAC3B,GAAI6Z,GAIHH,EAAS7f,KAAKsN,IAAKiS,GACnBlS,EAAQrN,KAAKqN,MAAOwS,EAGrB,IAAqB,gBAAT5D,GACX5O,EAAO4O,GAAS9V,MAKhB,IAAKtF,EAAOqE,cAAemI,GAC1BxM,EAAOyC,OAAQtD,KAAKqN,MAAOwS,GAAU5D,OAGrC,KAAM+D,IAAQ/D,GACb5O,EAAO2S,GAAS/D,EAAM+D,EAIzB,OAAO3S,IAERtL,IAAK,SAAUwd,EAAOjS,GAKrB,GAAID,GAAQrN,KAAKqN,MAAOrN,KAAKsN,IAAKiS,GAElC,OAAerb,UAARoJ,EACND,EAAQA,EAAOC,IAEjB2R,OAAQ,SAAUM,EAAOjS,EAAKnH,GAC7B,GAAI8Z,EAYJ,OAAa/b,UAARoJ,GACDA,GAAsB,gBAARA,IAA+BpJ,SAAViC,GAEtC8Z,EAASjgB,KAAK+B,IAAKwd,EAAOjS,GAERpJ,SAAX+b,EACNA,EAASjgB,KAAK+B,IAAKwd,EAAO1e,EAAOkF,UAAUuH,MAS7CtN,KAAK+f,IAAKR,EAAOjS,EAAKnH,GAILjC,SAAViC,EAAsBA,EAAQmH,IAEtC8O,OAAQ,SAAUmD,EAAOjS,GACxB,GAAI3K,GAAGa,EAAM0c,EACZL,EAAS7f,KAAKsN,IAAKiS,GACnBlS,EAAQrN,KAAKqN,MAAOwS,EAErB,IAAa3b,SAARoJ,EACJtN,KAAKqN,MAAOwS,UAEN,CAEDhf,EAAOoD,QAASqJ,GAOpB9J,EAAO8J,EAAIlN,OAAQkN,EAAI7K,IAAK5B,EAAOkF,aAEnCma,EAAQrf,EAAOkF,UAAWuH,GAErBA,IAAOD,GACX7J,GAAS8J,EAAK4S,IAId1c,EAAO0c,EACP1c,EAAOA,IAAQ6J,IACZ7J,GAAWA,EAAKqI,MAAOqP,SAI5BvY,EAAIa,EAAK5B,MACT,OAAQe,UACA0K,GAAO7J,EAAMb,MAIvBwd,QAAS,SAAUZ,GAClB,OAAQ1e,EAAOqE,cACdlF,KAAKqN,MAAOkS,EAAOvf,KAAKmE,gBAG1Bic,QAAS,SAAUb,GACbA,EAAOvf,KAAKmE,gBACTnE,MAAKqN,MAAOkS,EAAOvf,KAAKmE,WAIlC,IAAIkc,GAAY,GAAIb,GAEhBc,EAAY,GAAId,GAchBe,EAAS,gCACZC,EAAa,UAEd,SAASC,GAAU/d,EAAM4K,EAAK2O,GAC7B,GAAIzY,EAIJ,IAAcU,SAAT+X,GAAwC,IAAlBvZ,EAAKuC,SAI/B,GAHAzB,EAAO,QAAU8J,EAAIhJ,QAASkc,EAAY,OAAQta,cAClD+V,EAAOvZ,EAAKkK,aAAcpJ,GAEL,gBAATyY,GAAoB,CAC/B,IACCA,EAAgB,SAATA,GAAkB,EACf,UAATA,GAAmB,EACV,SAATA,EAAkB,MAEjBA,EAAO,KAAOA,GAAQA,EACvBsE,EAAO5T,KAAMsP,GAASpb,EAAO6f,UAAWzE,GACxCA,EACA,MAAOvQ,IAGT4U,EAAUP,IAAKrd,EAAM4K,EAAK2O,OAE1BA,GAAO/X,MAGT,OAAO+X,GAGRpb,EAAOyC,QACN6c,QAAS,SAAUzd,GAClB,MAAO4d,GAAUH,QAASzd,IAAU2d,EAAUF,QAASzd,IAGxDuZ,KAAM,SAAUvZ,EAAMc,EAAMyY,GAC3B,MAAOqE,GAAUrB,OAAQvc,EAAMc,EAAMyY;EAGtC0E,WAAY,SAAUje,EAAMc,GAC3B8c,EAAUlE,OAAQ1Z,EAAMc,IAKzBod,MAAO,SAAUle,EAAMc,EAAMyY,GAC5B,MAAOoE,GAAUpB,OAAQvc,EAAMc,EAAMyY,IAGtC4E,YAAa,SAAUne,EAAMc,GAC5B6c,EAAUjE,OAAQ1Z,EAAMc,MAI1B3C,EAAOG,GAAGsC,QACT2Y,KAAM,SAAU3O,EAAKnH,GACpB,GAAIxD,GAAGa,EAAMyY,EACZvZ,EAAO1C,KAAM,GACb6N,EAAQnL,GAAQA,EAAK8G,UAGtB,IAAatF,SAARoJ,EAAoB,CACxB,GAAKtN,KAAK4B,SACTqa,EAAOqE,EAAUve,IAAKW,GAEC,IAAlBA,EAAKuC,WAAmBob,EAAUte,IAAKW,EAAM,iBAAmB,CACpEC,EAAIkL,EAAMjM,MACV,OAAQe,IAIFkL,EAAOlL,KACXa,EAAOqK,EAAOlL,GAAIa,KACe,IAA5BA,EAAKlD,QAAS,WAClBkD,EAAO3C,EAAOkF,UAAWvC,EAAKrD,MAAM,IACpCsgB,EAAU/d,EAAMc,EAAMyY,EAAMzY,KAI/B6c,GAAUN,IAAKrd,EAAM,gBAAgB,GAIvC,MAAOuZ,GAIR,MAAoB,gBAAR3O,GACJtN,KAAKsC,KAAK,WAChBge,EAAUP,IAAK/f,KAAMsN,KAIhB2R,EAAQjf,KAAM,SAAUmG,GAC9B,GAAI8V,GACH6E,EAAWjgB,EAAOkF,UAAWuH,EAO9B,IAAK5K,GAAkBwB,SAAViC,EAAb,CAIC,GADA8V,EAAOqE,EAAUve,IAAKW,EAAM4K,GACdpJ,SAAT+X,EACJ,MAAOA,EAMR,IADAA,EAAOqE,EAAUve,IAAKW,EAAMoe,GACd5c,SAAT+X,EACJ,MAAOA,EAMR,IADAA,EAAOwE,EAAU/d,EAAMoe,EAAU5c,QACnBA,SAAT+X,EACJ,MAAOA,OAQTjc,MAAKsC,KAAK,WAGT,GAAI2Z,GAAOqE,EAAUve,IAAK/B,KAAM8gB,EAKhCR,GAAUP,IAAK/f,KAAM8gB,EAAU3a,GAKL,KAArBmH,EAAIhN,QAAQ,MAAwB4D,SAAT+X,GAC/BqE,EAAUP,IAAK/f,KAAMsN,EAAKnH,MAG1B,KAAMA,EAAOtD,UAAUjB,OAAS,EAAG,MAAM,IAG7C+e,WAAY,SAAUrT,GACrB,MAAOtN,MAAKsC,KAAK,WAChBge,EAAUlE,OAAQpc,KAAMsN,QAM3BzM,EAAOyC,QACNyd,MAAO,SAAUre,EAAMkC,EAAMqX,GAC5B,GAAI8E,EAEJ,OAAKre,IACJkC,GAASA,GAAQ,MAAS,QAC1Bmc,EAAQV,EAAUte,IAAKW,EAAMkC,GAGxBqX,KACE8E,GAASlgB,EAAOoD,QAASgY,GAC9B8E,EAAQV,EAAUpB,OAAQvc,EAAMkC,EAAM/D,EAAOwF,UAAU4V,IAEvD8E,EAAM1gB,KAAM4b,IAGP8E,OAZR,QAgBDC,QAAS,SAAUte,EAAMkC,GACxBA,EAAOA,GAAQ,IAEf,IAAImc,GAAQlgB,EAAOkgB,MAAOre,EAAMkC,GAC/Bqc,EAAcF,EAAMnf,OACpBZ,EAAK+f,EAAMvT,QACX0T,EAAQrgB,EAAOsgB,YAAaze,EAAMkC,GAClCgV,EAAO,WACN/Y,EAAOmgB,QAASte,EAAMkC,GAIZ,gBAAP5D,IACJA,EAAK+f,EAAMvT,QACXyT,KAGIjgB,IAIU,OAAT4D,GACJmc,EAAMnQ,QAAS,oBAITsQ,GAAME,KACbpgB,EAAGc,KAAMY,EAAMkX,EAAMsH,KAGhBD,GAAeC,GACpBA,EAAMvM,MAAMqH,QAKdmF,YAAa,SAAUze,EAAMkC,GAC5B,GAAI0I,GAAM1I,EAAO,YACjB,OAAOyb,GAAUte,IAAKW,EAAM4K,IAAS+S,EAAUpB,OAAQvc,EAAM4K,GAC5DqH,MAAO9T,EAAO0a,UAAU,eAAef,IAAI,WAC1C6F,EAAUjE,OAAQ1Z,GAAQkC,EAAO,QAAS0I,WAM9CzM,EAAOG,GAAGsC,QACTyd,MAAO,SAAUnc,EAAMqX,GACtB,GAAIoF,GAAS,CAQb,OANqB,gBAATzc,KACXqX,EAAOrX,EACPA,EAAO,KACPyc,KAGIxe,UAAUjB,OAASyf,EAChBxgB,EAAOkgB,MAAO/gB,KAAK,GAAI4E,GAGfV,SAAT+X,EACNjc,KACAA,KAAKsC,KAAK,WACT,GAAIye,GAAQlgB,EAAOkgB,MAAO/gB,KAAM4E,EAAMqX,EAGtCpb,GAAOsgB,YAAanhB,KAAM4E,GAEZ,OAATA,GAA8B,eAAbmc,EAAM,IAC3BlgB,EAAOmgB,QAAShhB,KAAM4E,MAI1Boc,QAAS,SAAUpc,GAClB,MAAO5E,MAAKsC,KAAK,WAChBzB,EAAOmgB,QAAShhB,KAAM4E,MAGxB0c,WAAY,SAAU1c,GACrB,MAAO5E,MAAK+gB,MAAOnc,GAAQ,UAI5BgY,QAAS,SAAUhY,EAAMD,GACxB,GAAIuC,GACHqa,EAAQ,EACRC,EAAQ3gB,EAAO2b,WACf1L,EAAW9Q,KACX2C,EAAI3C,KAAK4B,OACTyb,EAAU,aACCkE,GACTC,EAAMrD,YAAarN,GAAYA,IAIb,iBAATlM,KACXD,EAAMC,EACNA,EAAOV,QAERU,EAAOA,GAAQ,IAEf,OAAQjC,IACPuE,EAAMmZ,EAAUte,IAAK+O,EAAUnO,GAAKiC,EAAO,cACtCsC,GAAOA,EAAIyN,QACf4M,IACAra,EAAIyN,MAAM6F,IAAK6C,GAIjB,OADAA,KACOmE,EAAM5E,QAASjY,KAGxB,IAAI8c,GAAO,sCAAwCC,OAE/CC,GAAc,MAAO,QAAS,SAAU,QAExCC,EAAW,SAAUlf,EAAMmf,GAI7B,MADAnf,GAAOmf,GAAMnf,EAC4B,SAAlC7B,EAAOihB,IAAKpf,EAAM,aAA2B7B,EAAOwH,SAAU3F,EAAK0J,cAAe1J,IAGvFqf,EAAiB,yBAIrB,WACC,GAAIC,GAAWpiB,EAASqiB,yBACvBtU,EAAMqU,EAASpc,YAAahG,EAAS6F,cAAe,QACpDoK,EAAQjQ,EAAS6F,cAAe,QAMjCoK,GAAMhD,aAAc,OAAQ,SAC5BgD,EAAMhD,aAAc,UAAW,WAC/BgD,EAAMhD,aAAc,OAAQ,KAE5Bc,EAAI/H,YAAaiK,GAIjBlP,EAAQuhB,WAAavU,EAAIwU,WAAW,GAAOA,WAAW,GAAOjP,UAAUsB,QAIvE7G,EAAIiC,UAAY,yBAChBjP,EAAQyhB,iBAAmBzU,EAAIwU,WAAW,GAAOjP,UAAUyF,eAE5D,IAAI0J,GAAe,WAInB1hB,GAAQ2hB,eAAiB,aAAeviB,EAGxC,IACCwiB,GAAY,OACZC,EAAc,uCACdC,EAAc,kCACdC,EAAiB,sBAElB,SAASC,KACR,OAAO,EAGR,QAASC,KACR,OAAO,EAGR,QAASC,KACR,IACC,MAAOjjB,GAASsU,cACf,MAAQ4O,KAOXjiB,EAAOkiB,OAENvjB,UAEAgb,IAAK,SAAU9X,EAAMsgB,EAAOlV,EAASmO,EAAMnb,GAE1C,GAAImiB,GAAaC,EAAahc,EAC7Bic,EAAQC,EAAGC,EACXC,EAASC,EAAU3e,EAAM4e,EAAYC,EACrCC,EAAWrD,EAAUte,IAAKW,EAG3B,IAAMghB,EAAN,CAKK5V,EAAQA,UACZmV,EAAcnV,EACdA,EAAUmV,EAAYnV,QACtBhN,EAAWmiB,EAAYniB,UAIlBgN,EAAQ9G,OACb8G,EAAQ9G,KAAOnG,EAAOmG,SAIhBmc,EAASO,EAASP,UACxBA,EAASO,EAASP,YAEZD,EAAcQ,EAASC,UAC7BT,EAAcQ,EAASC,OAAS,SAAUjY,GAGzC,aAAc7K,KAAWwhB,GAAgBxhB,EAAOkiB,MAAMa,YAAclY,EAAE9G,KACrE/D,EAAOkiB,MAAMc,SAASjhB,MAAOF,EAAMG,WAAcqB,SAKpD8e,GAAUA,GAAS,IAAKnX,MAAOqP,KAAiB,IAChDkI,EAAIJ,EAAMphB,MACV,OAAQwhB,IACPlc,EAAMwb,EAAerW,KAAM2W,EAAMI,QACjCxe,EAAO6e,EAAWvc,EAAI,GACtBsc,GAAetc,EAAI,IAAM,IAAKG,MAAO,KAAMjE,OAGrCwB,IAKN0e,EAAUziB,EAAOkiB,MAAMO,QAAS1e,OAGhCA,GAAS9D,EAAWwiB,EAAQQ,aAAeR,EAAQS,WAAcnf,EAGjE0e,EAAUziB,EAAOkiB,MAAMO,QAAS1e,OAGhCye,EAAYxiB,EAAOyC,QAClBsB,KAAMA,EACN6e,SAAUA,EACVxH,KAAMA,EACNnO,QAASA,EACT9G,KAAM8G,EAAQ9G,KACdlG,SAAUA,EACV2J,aAAc3J,GAAYD,EAAOgQ,KAAKhF,MAAMpB,aAAakC,KAAM7L,GAC/DkjB,UAAWR,EAAWxW,KAAK,MACzBiW,IAGIM,EAAWJ,EAAQve,MACzB2e,EAAWJ,EAAQve,MACnB2e,EAASU,cAAgB,EAGnBX,EAAQY,OAASZ,EAAQY,MAAMpiB,KAAMY,EAAMuZ,EAAMuH,EAAYN,MAAkB,GAC/ExgB,EAAKuM,kBACTvM,EAAKuM,iBAAkBrK,EAAMse,GAAa,IAKxCI,EAAQ9I,MACZ8I,EAAQ9I,IAAI1Y,KAAMY,EAAM2gB,GAElBA,EAAUvV,QAAQ9G,OACvBqc,EAAUvV,QAAQ9G,KAAO8G,EAAQ9G,OAK9BlG,EACJyiB,EAASlgB,OAAQkgB,EAASU,gBAAiB,EAAGZ,GAE9CE,EAASljB,KAAMgjB,GAIhBxiB,EAAOkiB,MAAMvjB,OAAQoF,IAAS,KAMhCwX,OAAQ,SAAU1Z,EAAMsgB,EAAOlV,EAAShN,EAAUqjB,GAEjD,GAAIjhB,GAAGkhB,EAAWld,EACjBic,EAAQC,EAAGC,EACXC,EAASC,EAAU3e,EAAM4e,EAAYC,EACrCC,EAAWrD,EAAUF,QAASzd,IAAU2d,EAAUte,IAAKW,EAExD,IAAMghB,IAAcP,EAASO,EAASP,QAAtC,CAKAH,GAAUA,GAAS,IAAKnX,MAAOqP,KAAiB,IAChDkI,EAAIJ,EAAMphB,MACV,OAAQwhB,IAMP,GALAlc,EAAMwb,EAAerW,KAAM2W,EAAMI,QACjCxe,EAAO6e,EAAWvc,EAAI,GACtBsc,GAAetc,EAAI,IAAM,IAAKG,MAAO,KAAMjE,OAGrCwB,EAAN,CAOA0e,EAAUziB,EAAOkiB,MAAMO,QAAS1e,OAChCA,GAAS9D,EAAWwiB,EAAQQ,aAAeR,EAAQS,WAAcnf,EACjE2e,EAAWJ,EAAQve,OACnBsC,EAAMA,EAAI,IAAM,GAAIyC,QAAQ,UAAY6Z,EAAWxW,KAAK,iBAAmB,WAG3EoX,EAAYlhB,EAAIqgB,EAAS3hB,MACzB,OAAQsB,IACPmgB,EAAYE,EAAUrgB,IAEfihB,GAAeV,IAAaJ,EAAUI,UACzC3V,GAAWA,EAAQ9G,OAASqc,EAAUrc,MACtCE,IAAOA,EAAIyF,KAAM0W,EAAUW,YAC3BljB,GAAYA,IAAauiB,EAAUviB,WAAyB,OAAbA,IAAqBuiB,EAAUviB,YACjFyiB,EAASlgB,OAAQH,EAAG,GAEfmgB,EAAUviB,UACdyiB,EAASU,gBAELX,EAAQlH,QACZkH,EAAQlH,OAAOta,KAAMY,EAAM2gB,GAOzBe,KAAcb,EAAS3hB,SACrB0hB,EAAQe,UAAYf,EAAQe,SAASviB,KAAMY,EAAM8gB,EAAYE,EAASC,WAAa,GACxF9iB,EAAOyjB,YAAa5hB,EAAMkC,EAAM8e,EAASC,cAGnCR,GAAQve,QAtCf,KAAMA,IAAQue,GACbtiB,EAAOkiB,MAAM3G,OAAQ1Z,EAAMkC,EAAOoe,EAAOI,GAAKtV,EAAShN,GAAU,EA0C/DD,GAAOqE,cAAeie,WACnBO,GAASC,OAChBtD,EAAUjE,OAAQ1Z,EAAM,aAI1B6hB,QAAS,SAAUxB,EAAO9G,EAAMvZ,EAAM8hB,GAErC,GAAI7hB,GAAGsL,EAAK/G,EAAKud,EAAYC,EAAQf,EAAQL,EAC5CqB,GAAcjiB,GAAQ9C,GACtBgF,EAAOnE,EAAOqB,KAAMihB,EAAO,QAAWA,EAAMne,KAAOme,EACnDS,EAAa/iB,EAAOqB,KAAMihB,EAAO,aAAgBA,EAAMiB,UAAU3c,MAAM,OAKxE,IAHA4G,EAAM/G,EAAMxE,EAAOA,GAAQ9C,EAGJ,IAAlB8C,EAAKuC,UAAoC,IAAlBvC,EAAKuC,WAK5Bwd,EAAY9V,KAAM/H,EAAO/D,EAAOkiB,MAAMa,aAItChf,EAAKtE,QAAQ,MAAQ,IAEzBkjB,EAAa5e,EAAKyC,MAAM,KACxBzC,EAAO4e,EAAWhW,QAClBgW,EAAWpgB,QAEZshB,EAAS9f,EAAKtE,QAAQ,KAAO,GAAK,KAAOsE,EAGzCme,EAAQA,EAAOliB,EAAOsD,SACrB4e,EACA,GAAIliB,GAAO+jB,MAAOhgB,EAAuB,gBAAVme,IAAsBA,GAGtDA,EAAM8B,UAAYL,EAAe,EAAI,EACrCzB,EAAMiB,UAAYR,EAAWxW,KAAK,KAClC+V,EAAM+B,aAAe/B,EAAMiB,UAC1B,GAAIra,QAAQ,UAAY6Z,EAAWxW,KAAK,iBAAmB,WAC3D,KAGD+V,EAAMvQ,OAAStO,OACT6e,EAAMlf,SACXkf,EAAMlf,OAASnB,GAIhBuZ,EAAe,MAARA,GACJ8G,GACFliB,EAAOwF,UAAW4V,GAAQ8G,IAG3BO,EAAUziB,EAAOkiB,MAAMO,QAAS1e,OAC1B4f,IAAgBlB,EAAQiB,SAAWjB,EAAQiB,QAAQ3hB,MAAOF,EAAMuZ,MAAW,GAAjF,CAMA,IAAMuI,IAAiBlB,EAAQyB,WAAalkB,EAAOiE,SAAUpC,GAAS,CAMrE,IAJA+hB,EAAanB,EAAQQ,cAAgBlf,EAC/B6d,EAAY9V,KAAM8X,EAAa7f,KACpCqJ,EAAMA,EAAIpI,YAEHoI,EAAKA,EAAMA,EAAIpI,WACtB8e,EAAUtkB,KAAM4N,GAChB/G,EAAM+G,CAIF/G,MAASxE,EAAK0J,eAAiBxM,IACnC+kB,EAAUtkB,KAAM6G,EAAI6H,aAAe7H,EAAI8d,cAAgBjlB,GAKzD4C,EAAI,CACJ,QAASsL,EAAM0W,EAAUhiB,QAAUogB,EAAMkC,uBAExClC,EAAMne,KAAOjC,EAAI,EAChB8hB,EACAnB,EAAQS,UAAYnf,EAGrB+e,GAAWtD,EAAUte,IAAKkM,EAAK,eAAoB8U,EAAMne,OAAUyb,EAAUte,IAAKkM,EAAK,UAClF0V,GACJA,EAAO/gB,MAAOqL,EAAKgO,GAIpB0H,EAASe,GAAUzW,EAAKyW,GACnBf,GAAUA,EAAO/gB,OAAS/B,EAAOye,WAAYrR,KACjD8U,EAAMvQ,OAASmR,EAAO/gB,MAAOqL,EAAKgO,GAC7B8G,EAAMvQ,UAAW,GACrBuQ,EAAMmC,iBAmCT,OA/BAnC,GAAMne,KAAOA,EAGP4f,GAAiBzB,EAAMoC,sBAErB7B,EAAQ8B,UAAY9B,EAAQ8B,SAASxiB,MAAO+hB,EAAU1b,MAAOgT,MAAW,IAC9Epb,EAAOye,WAAY5c,IAIdgiB,GAAU7jB,EAAOkD,WAAYrB,EAAMkC,MAAa/D,EAAOiE,SAAUpC,KAGrEwE,EAAMxE,EAAMgiB,GAEPxd,IACJxE,EAAMgiB,GAAW,MAIlB7jB,EAAOkiB,MAAMa,UAAYhf,EACzBlC,EAAMkC,KACN/D,EAAOkiB,MAAMa,UAAY1f,OAEpBgD,IACJxE,EAAMgiB,GAAWxd,IAMd6b,EAAMvQ,SAGdqR,SAAU,SAAUd,GAGnBA,EAAQliB,EAAOkiB,MAAMsC,IAAKtC,EAE1B,IAAIpgB,GAAGO,EAAGf,EAAKmR,EAAS+P,EACvBiC,KACA9iB,EAAOrC,EAAM2B,KAAMe,WACnB0gB,GAAalD,EAAUte,IAAK/B,KAAM,eAAoB+iB,EAAMne,UAC5D0e,EAAUziB,EAAOkiB,MAAMO,QAASP,EAAMne,SAOvC,IAJApC,EAAK,GAAKugB,EACVA,EAAMwC,eAAiBvlB,MAGlBsjB,EAAQkC,aAAelC,EAAQkC,YAAY1jB,KAAM9B,KAAM+iB,MAAY,EAAxE,CAKAuC,EAAezkB,EAAOkiB,MAAMQ,SAASzhB,KAAM9B,KAAM+iB,EAAOQ,GAGxD5gB,EAAI,CACJ,QAAS2Q,EAAUgS,EAAc3iB,QAAWogB,EAAMkC,uBAAyB,CAC1ElC,EAAM0C,cAAgBnS,EAAQ5Q,KAE9BQ,EAAI,CACJ,QAASmgB,EAAY/P,EAAQiQ,SAAUrgB,QAAW6f,EAAM2C,kCAIjD3C,EAAM+B,cAAgB/B,EAAM+B,aAAanY,KAAM0W,EAAUW,cAE9DjB,EAAMM,UAAYA,EAClBN,EAAM9G,KAAOoH,EAAUpH,KAEvB9Z,IAAStB,EAAOkiB,MAAMO,QAASD,EAAUI,eAAkBE,QAAUN,EAAUvV,SAC5ElL,MAAO0Q,EAAQ5Q,KAAMF,GAEX0B,SAAR/B,IACE4gB,EAAMvQ,OAASrQ,MAAS,IAC7B4gB,EAAMmC,iBACNnC,EAAM4C,oBAYX,MAJKrC,GAAQsC,cACZtC,EAAQsC,aAAa9jB,KAAM9B,KAAM+iB,GAG3BA,EAAMvQ,SAGd+Q,SAAU,SAAUR,EAAOQ,GAC1B,GAAI5gB,GAAGkE,EAASgf,EAAKxC,EACpBiC,KACArB,EAAgBV,EAASU,cACzBhW,EAAM8U,EAAMlf,MAKb,IAAKogB,GAAiBhW,EAAIhJ,YAAc8d,EAAMlO,QAAyB,UAAfkO,EAAMne,MAE7D,KAAQqJ,IAAQjO,KAAMiO,EAAMA,EAAIpI,YAAc7F,KAG7C,GAAKiO,EAAIsG,YAAa,GAAuB,UAAfwO,EAAMne,KAAmB,CAEtD,IADAiC,KACMlE,EAAI,EAAOshB,EAAJthB,EAAmBA,IAC/B0gB,EAAYE,EAAU5gB,GAGtBkjB,EAAMxC,EAAUviB,SAAW,IAEHoD,SAAnB2C,EAASgf,KACbhf,EAASgf,GAAQxC,EAAU5Y,aAC1B5J,EAAQglB,EAAK7lB,MAAOsa,MAAOrM,IAAS,EACpCpN,EAAO0O,KAAMsW,EAAK7lB,KAAM,MAAQiO,IAAQrM,QAErCiF,EAASgf,IACbhf,EAAQxG,KAAMgjB,EAGXxc,GAAQjF,QACZ0jB,EAAajlB,MAAOqC,KAAMuL,EAAKsV,SAAU1c,IAW7C,MAJKod,GAAgBV,EAAS3hB,QAC7B0jB,EAAajlB,MAAOqC,KAAM1C,KAAMujB,SAAUA,EAASpjB,MAAO8jB,KAGpDqB,GAIRQ,MAAO,wHAAwHze,MAAM,KAErI0e,YAEAC,UACCF,MAAO,4BAA4Bze,MAAM,KACzCmI,OAAQ,SAAUuT,EAAOkD,GAOxB,MAJoB,OAAflD,EAAMmD,QACVnD,EAAMmD,MAA6B,MAArBD,EAASE,SAAmBF,EAASE,SAAWF,EAASG,SAGjErD,IAITsD,YACCP,MAAO,uFAAuFze,MAAM,KACpGmI,OAAQ,SAAUuT,EAAOkD,GACxB,GAAIK,GAAUxX,EAAKyX,EAClB1R,EAASoR,EAASpR,MAkBnB,OAfoB,OAAfkO,EAAMyD,OAAqC,MAApBP,EAASQ,UACpCH,EAAWvD,EAAMlf,OAAOuI,eAAiBxM,EACzCkP,EAAMwX,EAAS5X,gBACf6X,EAAOD,EAASC,KAEhBxD,EAAMyD,MAAQP,EAASQ,SAAY3X,GAAOA,EAAI4X,YAAcH,GAAQA,EAAKG,YAAc,IAAQ5X,GAAOA,EAAI6X,YAAcJ,GAAQA,EAAKI,YAAc,GACnJ5D,EAAM6D,MAAQX,EAASY,SAAY/X,GAAOA,EAAIgY,WAAcP,GAAQA,EAAKO,WAAc,IAAQhY,GAAOA,EAAIiY,WAAcR,GAAQA,EAAKQ,WAAc,IAK9IhE,EAAMmD,OAAoBhiB,SAAX2Q,IACpBkO,EAAMmD,MAAmB,EAATrR,EAAa,EAAe,EAATA,EAAa,EAAe,EAATA,EAAa,EAAI,GAGjEkO,IAITsC,IAAK,SAAUtC,GACd,GAAKA,EAAOliB,EAAOsD,SAClB,MAAO4e,EAIR,IAAIpgB,GAAGqd,EAAMtc,EACZkB,EAAOme,EAAMne,KACboiB,EAAgBjE,EAChBkE,EAAUjnB,KAAK+lB,SAAUnhB,EAEpBqiB,KACLjnB,KAAK+lB,SAAUnhB,GAASqiB,EACvBzE,EAAY7V,KAAM/H,GAAS5E,KAAKqmB,WAChC9D,EAAU5V,KAAM/H,GAAS5E,KAAKgmB,aAGhCtiB,EAAOujB,EAAQnB,MAAQ9lB,KAAK8lB,MAAM1lB,OAAQ6mB,EAAQnB,OAAU9lB,KAAK8lB,MAEjE/C,EAAQ,GAAIliB,GAAO+jB,MAAOoC,GAE1BrkB,EAAIe,EAAK9B,MACT,OAAQe,IACPqd,EAAOtc,EAAMf,GACbogB,EAAO/C,GAASgH,EAAehH,EAehC,OAVM+C,GAAMlf,SACXkf,EAAMlf,OAASjE,GAKe,IAA1BmjB,EAAMlf,OAAOoB,WACjB8d,EAAMlf,OAASkf,EAAMlf,OAAOgC,YAGtBohB,EAAQzX,OAASyX,EAAQzX,OAAQuT,EAAOiE,GAAkBjE,GAGlEO,SACC4D,MAECnC,UAAU,GAEX9Q,OAECsQ,QAAS,WACR,MAAKvkB,QAAS6iB,KAAuB7iB,KAAKiU,OACzCjU,KAAKiU,SACE,GAFR,QAKD6P,aAAc,WAEfqD,MACC5C,QAAS,WACR,MAAKvkB,QAAS6iB,KAAuB7iB,KAAKmnB,MACzCnnB,KAAKmnB,QACE,GAFR,QAKDrD,aAAc,YAEfsD,OAEC7C,QAAS,WACR,MAAmB,aAAdvkB,KAAK4E,MAAuB5E,KAAKonB,OAASvmB,EAAOoF,SAAUjG,KAAM,UACrEA,KAAKonB,SACE,GAFR,QAODhC,SAAU,SAAUrC,GACnB,MAAOliB,GAAOoF,SAAU8c,EAAMlf,OAAQ,OAIxCwjB,cACCzB,aAAc,SAAU7C,GAID7e,SAAjB6e,EAAMvQ,QAAwBuQ,EAAMiE,gBACxCjE,EAAMiE,cAAcM,YAAcvE,EAAMvQ,WAM5C+U,SAAU,SAAU3iB,EAAMlC,EAAMqgB,EAAOyE,GAItC,GAAI9b,GAAI7K,EAAOyC,OACd,GAAIzC,GAAO+jB,MACX7B,GAECne,KAAMA,EACN6iB,aAAa,EACbT,kBAGGQ,GACJ3mB,EAAOkiB,MAAMwB,QAAS7Y,EAAG,KAAMhJ,GAE/B7B,EAAOkiB,MAAMc,SAAS/hB,KAAMY,EAAMgJ,GAE9BA,EAAEyZ,sBACNpC,EAAMmC,mBAKTrkB,EAAOyjB,YAAc,SAAU5hB,EAAMkC,EAAM+e,GACrCjhB,EAAKoc,qBACTpc,EAAKoc,oBAAqBla,EAAM+e,GAAQ,IAI1C9iB,EAAO+jB,MAAQ,SAAUnhB,EAAKqiB,GAE7B,MAAO9lB,gBAAgBa,GAAO+jB,OAKzBnhB,GAAOA,EAAImB,MACf5E,KAAKgnB,cAAgBvjB,EACrBzD,KAAK4E,KAAOnB,EAAImB,KAIhB5E,KAAKmlB,mBAAqB1hB,EAAIikB,kBACHxjB,SAAzBT,EAAIikB,kBAEJjkB,EAAI6jB,eAAgB,EACrB3E,EACAC,GAID5iB,KAAK4E,KAAOnB,EAIRqiB,GACJjlB,EAAOyC,OAAQtD,KAAM8lB,GAItB9lB,KAAK2nB,UAAYlkB,GAAOA,EAAIkkB,WAAa9mB,EAAOsG,WAGhDnH,KAAMa,EAAOsD,UAAY,IA/BjB,GAAItD,GAAO+jB,MAAOnhB,EAAKqiB,IAoChCjlB,EAAO+jB,MAAMnjB,WACZ0jB,mBAAoBvC,EACpBqC,qBAAsBrC,EACtB8C,8BAA+B9C,EAE/BsC,eAAgB,WACf,GAAIxZ,GAAI1L,KAAKgnB,aAEbhnB,MAAKmlB,mBAAqBxC,EAErBjX,GAAKA,EAAEwZ,gBACXxZ,EAAEwZ,kBAGJS,gBAAiB,WAChB,GAAIja,GAAI1L,KAAKgnB,aAEbhnB,MAAKilB,qBAAuBtC,EAEvBjX,GAAKA,EAAEia,iBACXja,EAAEia,mBAGJiC,yBAA0B,WACzB,GAAIlc,GAAI1L,KAAKgnB,aAEbhnB,MAAK0lB,8BAAgC/C,EAEhCjX,GAAKA,EAAEkc,0BACXlc,EAAEkc,2BAGH5nB,KAAK2lB,oBAMP9kB,EAAOyB,MACNulB,WAAY,YACZC,WAAY,WACZC,aAAc,cACdC,aAAc,cACZ,SAAUC,EAAM5C,GAClBxkB,EAAOkiB,MAAMO,QAAS2E,IACrBnE,aAAcuB,EACdtB,SAAUsB,EAEV1B,OAAQ,SAAUZ,GACjB,GAAI5gB,GACH0B,EAAS7D,KACTkoB,EAAUnF,EAAMoF,cAChB9E,EAAYN,EAAMM,SASnB,SALM6E,GAAYA,IAAYrkB,IAAWhD,EAAOwH,SAAUxE,EAAQqkB,MACjEnF,EAAMne,KAAOye,EAAUI,SACvBthB,EAAMkhB,EAAUvV,QAAQlL,MAAO5C,KAAM6C,WACrCkgB,EAAMne,KAAOygB,GAEPljB,MAOJxB,EAAQ2hB,gBACbzhB,EAAOyB,MAAO2R,MAAO,UAAWkT,KAAM,YAAc,SAAUc,EAAM5C,GAGnE,GAAIvX,GAAU,SAAUiV,GACtBliB,EAAOkiB,MAAMwE,SAAUlC,EAAKtC,EAAMlf,OAAQhD,EAAOkiB,MAAMsC,IAAKtC,IAAS,GAGvEliB,GAAOkiB,MAAMO,QAAS+B,IACrBnB,MAAO,WACN,GAAIpV,GAAM9O,KAAKoM,eAAiBpM,KAC/BooB,EAAW/H,EAAUpB,OAAQnQ,EAAKuW,EAE7B+C,IACLtZ,EAAIG,iBAAkBgZ,EAAMna,GAAS,GAEtCuS,EAAUpB,OAAQnQ,EAAKuW,GAAO+C,GAAY,GAAM,IAEjD/D,SAAU,WACT,GAAIvV,GAAM9O,KAAKoM,eAAiBpM,KAC/BooB,EAAW/H,EAAUpB,OAAQnQ,EAAKuW,GAAQ,CAErC+C,GAKL/H,EAAUpB,OAAQnQ,EAAKuW,EAAK+C,IAJ5BtZ,EAAIgQ,oBAAqBmJ,EAAMna,GAAS,GACxCuS,EAAUjE,OAAQtN,EAAKuW,QAU5BxkB,EAAOG,GAAGsC,QAET+kB,GAAI,SAAUrF,EAAOliB,EAAUmb,EAAMjb,EAAiBsnB,GACrD,GAAIC,GAAQ3jB,CAGZ,IAAsB,gBAAVoe,GAAqB,CAEP,gBAAbliB,KAEXmb,EAAOA,GAAQnb,EACfA,EAAWoD,OAEZ,KAAMU,IAAQoe,GACbhjB,KAAKqoB,GAAIzjB,EAAM9D,EAAUmb,EAAM+G,EAAOpe,GAAQ0jB,EAE/C,OAAOtoB,MAmBR,GAhBa,MAARic,GAAsB,MAANjb,GAEpBA,EAAKF,EACLmb,EAAOnb,EAAWoD,QACD,MAANlD,IACc,gBAAbF,IAEXE,EAAKib,EACLA,EAAO/X,SAGPlD,EAAKib,EACLA,EAAOnb,EACPA,EAAWoD,SAGRlD,KAAO,EACXA,EAAK4hB,MACC,KAAM5hB,EACZ,MAAOhB,KAaR,OAVa,KAARsoB,IACJC,EAASvnB,EACTA,EAAK,SAAU+hB,GAGd,MADAliB,KAAS+d,IAAKmE,GACPwF,EAAO3lB,MAAO5C,KAAM6C,YAG5B7B,EAAGgG,KAAOuhB,EAAOvhB,OAAUuhB,EAAOvhB,KAAOnG,EAAOmG,SAE1ChH,KAAKsC,KAAM,WACjBzB,EAAOkiB,MAAMvI,IAAKxa,KAAMgjB,EAAOhiB,EAAIib,EAAMnb,MAG3CwnB,IAAK,SAAUtF,EAAOliB,EAAUmb,EAAMjb,GACrC,MAAOhB,MAAKqoB,GAAIrF,EAAOliB,EAAUmb,EAAMjb,EAAI,IAE5C4d,IAAK,SAAUoE,EAAOliB,EAAUE,GAC/B,GAAIqiB,GAAWze,CACf,IAAKoe,GAASA,EAAMkC,gBAAkBlC,EAAMK,UAQ3C,MANAA,GAAYL,EAAMK,UAClBxiB,EAAQmiB,EAAMuC,gBAAiB3G,IAC9ByE,EAAUW,UAAYX,EAAUI,SAAW,IAAMJ,EAAUW,UAAYX,EAAUI,SACjFJ,EAAUviB,SACVuiB,EAAUvV,SAEJ9N,IAER,IAAsB,gBAAVgjB,GAAqB,CAEhC,IAAMpe,IAAQoe,GACbhjB,KAAK4e,IAAKha,EAAM9D,EAAUkiB,EAAOpe,GAElC,OAAO5E,MAUR,OARKc,KAAa,GAA6B,kBAAbA,MAEjCE,EAAKF,EACLA,EAAWoD,QAEPlD,KAAO,IACXA,EAAK4hB,GAEC5iB,KAAKsC,KAAK,WAChBzB,EAAOkiB,MAAM3G,OAAQpc,KAAMgjB,EAAOhiB,EAAIF,MAIxCyjB,QAAS,SAAU3f,EAAMqX,GACxB,MAAOjc,MAAKsC,KAAK,WAChBzB,EAAOkiB,MAAMwB,QAAS3f,EAAMqX,EAAMjc,SAGpC2e,eAAgB,SAAU/Z,EAAMqX,GAC/B,GAAIvZ,GAAO1C,KAAK,EAChB,OAAK0C,GACG7B,EAAOkiB,MAAMwB,QAAS3f,EAAMqX,EAAMvZ,GAAM,GADhD,SAOF,IACC8lB,IAAY,0EACZC,GAAW,YACXC,GAAQ,YACRC,GAAe,0BAEfC,GAAW,oCACXC,GAAc,4BACdC,GAAoB,cACpBC,GAAe,2CAGfC,IAGCC,QAAU,EAAG,+BAAgC,aAE7CC,OAAS,EAAG,UAAW,YACvBC,KAAO,EAAG,oBAAqB,uBAC/BC,IAAM,EAAG,iBAAkB,oBAC3BC,IAAM,EAAG,qBAAsB,yBAE/BjE,UAAY,EAAG,GAAI,IAIrB4D,IAAQM,SAAWN,GAAQC,OAE3BD,GAAQO,MAAQP,GAAQQ,MAAQR,GAAQS,SAAWT,GAAQU,QAAUV,GAAQE,MAC7EF,GAAQW,GAAKX,GAAQK,EAIrB,SAASO,IAAoBlnB,EAAMmnB,GAClC,MAAOhpB,GAAOoF,SAAUvD,EAAM,UAC7B7B,EAAOoF,SAA+B,KAArB4jB,EAAQ5kB,SAAkB4kB,EAAUA,EAAQtY,WAAY,MAEzE7O,EAAK8J,qBAAqB,SAAS,IAClC9J,EAAKkD,YAAalD,EAAK0J,cAAc3G,cAAc,UACpD/C,EAIF,QAASonB,IAAepnB,GAEvB,MADAA,GAAKkC,MAAsC,OAA9BlC,EAAKkK,aAAa,SAAoB,IAAMlK,EAAKkC,KACvDlC,EAER,QAASqnB,IAAernB,GACvB,GAAImJ,GAAQid,GAAkBzc,KAAM3J,EAAKkC,KAQzC,OANKiH,GACJnJ,EAAKkC,KAAOiH,EAAO,GAEnBnJ,EAAKyK,gBAAgB,QAGfzK,EAIR,QAASsnB,IAAe9nB,EAAO+nB,GAI9B,IAHA,GAAItnB,GAAI,EACPwX,EAAIjY,EAAMN,OAECuY,EAAJxX,EAAOA,IACd0d,EAAUN,IACT7d,EAAOS,GAAK,cAAesnB,GAAe5J,EAAUte,IAAKkoB,EAAatnB,GAAK,eAK9E,QAASunB,IAAgBzmB,EAAK0mB,GAC7B,GAAIxnB,GAAGwX,EAAGvV,EAAMwlB,EAAUC,EAAUC,EAAUC,EAAUpH,CAExD,IAAuB,IAAlBgH,EAAKllB,SAAV,CAKA,GAAKob,EAAUF,QAAS1c,KACvB2mB,EAAW/J,EAAUpB,OAAQxb,GAC7B4mB,EAAWhK,EAAUN,IAAKoK,EAAMC,GAChCjH,EAASiH,EAASjH,QAEJ,OACNkH,GAAS1G,OAChB0G,EAASlH,SAET,KAAMve,IAAQue,GACb,IAAMxgB,EAAI,EAAGwX,EAAIgJ,EAAQve,GAAOhD,OAAYuY,EAAJxX,EAAOA,IAC9C9B,EAAOkiB,MAAMvI,IAAK2P,EAAMvlB,EAAMue,EAAQve,GAAQjC,IAO7C2d,EAAUH,QAAS1c,KACvB6mB,EAAWhK,EAAUrB,OAAQxb,GAC7B8mB,EAAW1pB,EAAOyC,UAAYgnB,GAE9BhK,EAAUP,IAAKoK,EAAMI,KAIvB,QAASC,IAAQzpB,EAAS4O,GACzB,GAAIxN,GAAMpB,EAAQyL,qBAAuBzL,EAAQyL,qBAAsBmD,GAAO,KAC5E5O,EAAQkM,iBAAmBlM,EAAQkM,iBAAkB0C,GAAO,OAG9D,OAAezL,UAARyL,GAAqBA,GAAO9O,EAAOoF,SAAUlF,EAAS4O,GAC5D9O,EAAOuB,OAASrB,GAAWoB,GAC3BA,EAIF,QAASsoB,IAAUhnB,EAAK0mB,GACvB,GAAIlkB,GAAWkkB,EAAKlkB,SAASC,aAGX,WAAbD,GAAwB8b,EAAepV,KAAMlJ,EAAImB,MACrDulB,EAAK3V,QAAU/Q,EAAI+Q,SAGK,UAAbvO,GAAqC,aAAbA,KACnCkkB,EAAKxR,aAAelV,EAAIkV,cAI1B9X,EAAOyC,QACNM,MAAO,SAAUlB,EAAMgoB,EAAeC,GACrC,GAAIhoB,GAAGwX,EAAGyQ,EAAaC,EACtBjnB,EAAQlB,EAAKyf,WAAW,GACxB2I,EAASjqB,EAAOwH,SAAU3F,EAAK0J,cAAe1J,EAG/C,MAAM/B,EAAQyhB,gBAAsC,IAAlB1f,EAAKuC,UAAoC,KAAlBvC,EAAKuC,UAC3DpE,EAAOgY,SAAUnW,IAMnB,IAHAmoB,EAAeL,GAAQ5mB,GACvBgnB,EAAcJ,GAAQ9nB,GAEhBC,EAAI,EAAGwX,EAAIyQ,EAAYhpB,OAAYuY,EAAJxX,EAAOA,IAC3C8nB,GAAUG,EAAajoB,GAAKkoB,EAAcloB,GAK5C,IAAK+nB,EACJ,GAAKC,EAIJ,IAHAC,EAAcA,GAAeJ,GAAQ9nB,GACrCmoB,EAAeA,GAAgBL,GAAQ5mB,GAEjCjB,EAAI,EAAGwX,EAAIyQ,EAAYhpB,OAAYuY,EAAJxX,EAAOA,IAC3CunB,GAAgBU,EAAajoB,GAAKkoB,EAAcloB,QAGjDunB,IAAgBxnB,EAAMkB,EAWxB,OANAinB,GAAeL,GAAQ5mB,EAAO,UACzBinB,EAAajpB,OAAS,GAC1BooB,GAAea,GAAeC,GAAUN,GAAQ9nB,EAAM,WAIhDkB,GAGRmnB,cAAe,SAAU7oB,EAAOnB,EAASiqB,EAASC,GAOjD,IANA,GAAIvoB,GAAMwE,EAAKyI,EAAKub,EAAM7iB,EAAUnF,EACnC8e,EAAWjhB,EAAQkhB,yBACnBkJ,KACAxoB,EAAI,EACJwX,EAAIjY,EAAMN,OAECuY,EAAJxX,EAAOA,IAGd,GAFAD,EAAOR,EAAOS,GAETD,GAAiB,IAATA,EAGZ,GAA6B,WAAxB7B,EAAO+D,KAAMlC,GAGjB7B,EAAOuB,MAAO+oB,EAAOzoB,EAAKuC,UAAavC,GAASA,OAG1C,IAAMgmB,GAAM/b,KAAMjK,GAIlB,CACNwE,EAAMA,GAAO8a,EAASpc,YAAa7E,EAAQ0E,cAAc,QAGzDkK,GAAQ8Y,GAASpc,KAAM3J,KAAY,GAAI,KAAQ,GAAIwD,cACnDglB,EAAOlC,GAASrZ,IAASqZ,GAAQ5D,SACjCle,EAAI0I,UAAYsb,EAAM,GAAMxoB,EAAK4B,QAASkkB,GAAW,aAAgB0C,EAAM,GAG3EhoB,EAAIgoB,EAAM,EACV,OAAQhoB,IACPgE,EAAMA,EAAIgM,SAKXrS,GAAOuB,MAAO+oB,EAAOjkB,EAAIuE,YAGzBvE,EAAM8a,EAASzQ,WAGfrK,EAAIoK,YAAc,OAzBlB6Z,GAAM9qB,KAAMU,EAAQqqB,eAAgB1oB,GA+BvCsf,GAAS1Q,YAAc,GAEvB3O,EAAI,CACJ,OAASD,EAAOyoB,EAAOxoB,KAItB,KAAKsoB,GAAmD,KAAtCpqB,EAAO2F,QAAS9D,EAAMuoB,MAIxC5iB,EAAWxH,EAAOwH,SAAU3F,EAAK0J,cAAe1J,GAGhDwE,EAAMsjB,GAAQxI,EAASpc,YAAalD,GAAQ,UAGvC2F,GACJ2hB,GAAe9iB,GAIX8jB,GAAU,CACd9nB,EAAI,CACJ,OAASR,EAAOwE,EAAKhE,KACf2lB,GAAYlc,KAAMjK,EAAKkC,MAAQ,KACnComB,EAAQ3qB,KAAMqC,GAMlB,MAAOsf,IAGRqJ,UAAW,SAAUnpB,GAKpB,IAJA,GAAI+Z,GAAMvZ,EAAMkC,EAAM0I,EACrBgW,EAAUziB,EAAOkiB,MAAMO,QACvB3gB,EAAI,EAE2BuB,UAAvBxB,EAAOR,EAAOS,IAAoBA,IAAM,CAChD,GAAK9B,EAAOye,WAAY5c,KACvB4K,EAAM5K,EAAM2d,EAAUlc,SAEjBmJ,IAAQ2O,EAAOoE,EAAUhT,MAAOC,KAAS,CAC7C,GAAK2O,EAAKkH,OACT,IAAMve,IAAQqX,GAAKkH,OACbG,EAAS1e,GACb/D,EAAOkiB,MAAM3G,OAAQ1Z,EAAMkC,GAI3B/D,EAAOyjB,YAAa5hB,EAAMkC,EAAMqX,EAAK0H,OAInCtD,GAAUhT,MAAOC,UAEd+S,GAAUhT,MAAOC,SAKpBgT,GAAUjT,MAAO3K,EAAM4d,EAAUnc,cAK3CtD,EAAOG,GAAGsC,QACToC,KAAM,SAAUS,GACf,MAAO8Y,GAAQjf,KAAM,SAAUmG,GAC9B,MAAiBjC,UAAViC,EACNtF,EAAO6E,KAAM1F,MACbA,KAAK2U,QAAQrS,KAAK,YACM,IAAlBtC,KAAKiF,UAAoC,KAAlBjF,KAAKiF,UAAqC,IAAlBjF,KAAKiF,YACxDjF,KAAKsR,YAAcnL,MAGpB,KAAMA,EAAOtD,UAAUjB,SAG3B0pB,OAAQ,WACP,MAAOtrB,MAAKurB,SAAU1oB,UAAW,SAAUH,GAC1C,GAAuB,IAAlB1C,KAAKiF,UAAoC,KAAlBjF,KAAKiF,UAAqC,IAAlBjF,KAAKiF,SAAiB,CACzE,GAAIpB,GAAS+lB,GAAoB5pB,KAAM0C,EACvCmB,GAAO+B,YAAalD,OAKvB8oB,QAAS,WACR,MAAOxrB,MAAKurB,SAAU1oB,UAAW,SAAUH,GAC1C,GAAuB,IAAlB1C,KAAKiF,UAAoC,KAAlBjF,KAAKiF,UAAqC,IAAlBjF,KAAKiF,SAAiB,CACzE,GAAIpB,GAAS+lB,GAAoB5pB,KAAM0C,EACvCmB,GAAO4nB,aAAc/oB,EAAMmB,EAAO0N,gBAKrCma,OAAQ,WACP,MAAO1rB,MAAKurB,SAAU1oB,UAAW,SAAUH,GACrC1C,KAAK6F,YACT7F,KAAK6F,WAAW4lB,aAAc/oB,EAAM1C,SAKvC2rB,MAAO,WACN,MAAO3rB,MAAKurB,SAAU1oB,UAAW,SAAUH,GACrC1C,KAAK6F,YACT7F,KAAK6F,WAAW4lB,aAAc/oB,EAAM1C,KAAKoO,gBAK5CgO,OAAQ,SAAUtb,EAAU8qB,GAK3B,IAJA,GAAIlpB,GACHR,EAAQpB,EAAWD,EAAO2O,OAAQ1O,EAAUd,MAASA,KACrD2C,EAAI,EAEwB,OAApBD,EAAOR,EAAMS,IAAaA,IAC5BipB,GAA8B,IAAlBlpB,EAAKuC,UACtBpE,EAAOwqB,UAAWb,GAAQ9nB,IAGtBA,EAAKmD,aACJ+lB,GAAY/qB,EAAOwH,SAAU3F,EAAK0J,cAAe1J,IACrDsnB,GAAeQ,GAAQ9nB,EAAM,WAE9BA,EAAKmD,WAAWC,YAAapD,GAI/B,OAAO1C,OAGR2U,MAAO,WAIN,IAHA,GAAIjS,GACHC,EAAI,EAEuB,OAAnBD,EAAO1C,KAAK2C,IAAaA,IACV,IAAlBD,EAAKuC,WAGTpE,EAAOwqB,UAAWb,GAAQ9nB,GAAM,IAGhCA,EAAK4O,YAAc,GAIrB,OAAOtR,OAGR4D,MAAO,SAAU8mB,EAAeC,GAI/B,MAHAD,GAAiC,MAAjBA,GAAwB,EAAQA,EAChDC,EAAyC,MAArBA,EAA4BD,EAAgBC,EAEzD3qB,KAAKyC,IAAI,WACf,MAAO5B,GAAO+C,MAAO5D,KAAM0qB,EAAeC,MAI5CkB,KAAM,SAAU1lB,GACf,MAAO8Y,GAAQjf,KAAM,SAAUmG,GAC9B,GAAIzD,GAAO1C,KAAM,OAChB2C,EAAI,EACJwX,EAAIna,KAAK4B,MAEV,IAAesC,SAAViC,GAAyC,IAAlBzD,EAAKuC,SAChC,MAAOvC,GAAKkN,SAIb,IAAsB,gBAAVzJ,KAAuBwiB,GAAahc,KAAMxG,KACpD6iB,IAAWP,GAASpc,KAAMlG,KAAa,GAAI,KAAQ,GAAID,eAAkB,CAE1EC,EAAQA,EAAM7B,QAASkkB,GAAW,YAElC,KACC,KAAYrO,EAAJxX,EAAOA,IACdD,EAAO1C,KAAM2C,OAGU,IAAlBD,EAAKuC,WACTpE,EAAOwqB,UAAWb,GAAQ9nB,GAAM,IAChCA,EAAKkN,UAAYzJ,EAInBzD,GAAO,EAGN,MAAOgJ,KAGLhJ,GACJ1C,KAAK2U,QAAQ2W,OAAQnlB,IAEpB,KAAMA,EAAOtD,UAAUjB,SAG3BkqB,YAAa,WACZ,GAAI/kB,GAAMlE,UAAW,EAcrB,OAXA7C,MAAKurB,SAAU1oB,UAAW,SAAUH,GACnCqE,EAAM/G,KAAK6F,WAEXhF,EAAOwqB,UAAWb,GAAQxqB,OAErB+G,GACJA,EAAIglB,aAAcrpB,EAAM1C,QAKnB+G,IAAQA,EAAInF,QAAUmF,EAAI9B,UAAYjF,KAAOA,KAAKoc,UAG1D4P,OAAQ,SAAUlrB,GACjB,MAAOd,MAAKoc,OAAQtb,GAAU,IAG/ByqB,SAAU,SAAU/oB,EAAMD,GAGzBC,EAAOpC,EAAOwC,SAAWJ,EAEzB,IAAIwf,GAAUlf,EAAOkoB,EAASiB,EAAYtd,EAAMG,EAC/CnM,EAAI,EACJwX,EAAIna,KAAK4B,OACTme,EAAM/f,KACNksB,EAAW/R,EAAI,EACfhU,EAAQ3D,EAAM,GACduB,EAAalD,EAAOkD,WAAYoC,EAGjC,IAAKpC,GACDoW,EAAI,GAAsB,gBAAVhU,KAChBxF,EAAQuhB,YAAc0G,GAASjc,KAAMxG,GACxC,MAAOnG,MAAKsC,KAAK,SAAUgY,GAC1B,GAAInB,GAAO4G,EAAIhd,GAAIuX,EACdvW,KACJvB,EAAM,GAAM2D,EAAMrE,KAAM9B,KAAMsa,EAAOnB,EAAK0S,SAE3C1S,EAAKoS,SAAU/oB,EAAMD,IAIvB,IAAK4X,IACJ6H,EAAWnhB,EAAOkqB,cAAevoB,EAAMxC,KAAM,GAAIoM,eAAe,EAAOpM,MACvE8C,EAAQkf,EAASzQ,WAEmB,IAA/ByQ,EAASvW,WAAW7J,SACxBogB,EAAWlf,GAGPA,GAAQ,CAMZ,IALAkoB,EAAUnqB,EAAO4B,IAAK+nB,GAAQxI,EAAU,UAAY8H,IACpDmC,EAAajB,EAAQppB,OAITuY,EAAJxX,EAAOA,IACdgM,EAAOqT,EAEFrf,IAAMupB,IACVvd,EAAO9N,EAAO+C,MAAO+K,GAAM,GAAM,GAG5Bsd,GAGJprB,EAAOuB,MAAO4oB,EAASR,GAAQ7b,EAAM,YAIvCpM,EAAST,KAAM9B,KAAM2C,GAAKgM,EAAMhM,EAGjC,IAAKspB,EAOJ,IANAnd,EAAMkc,EAASA,EAAQppB,OAAS,GAAIwK,cAGpCvL,EAAO4B,IAAKuoB,EAASjB,IAGfpnB,EAAI,EAAOspB,EAAJtpB,EAAgBA,IAC5BgM,EAAOqc,EAASroB,GACXkmB,GAAYlc,KAAMgC,EAAK/J,MAAQ,MAClCyb,EAAUpB,OAAQtQ,EAAM,eAAkB9N,EAAOwH,SAAUyG,EAAKH,KAE5DA,EAAKlL,IAEJ5C,EAAOsrB,UACXtrB,EAAOsrB,SAAUxd,EAAKlL,KAGvB5C,EAAOsE,WAAYwJ,EAAK2C,YAAYhN,QAASykB,GAAc,MAQjE,MAAO/oB,SAITa,EAAOyB,MACN8pB,SAAU,SACVC,UAAW,UACXZ,aAAc,SACda,YAAa,QACbC,WAAY,eACV,SAAU/oB,EAAMyiB,GAClBplB,EAAOG,GAAIwC,GAAS,SAAU1C,GAO7B,IANA,GAAIoB,GACHC,KACAqqB,EAAS3rB,EAAQC,GACjBkC,EAAOwpB,EAAO5qB,OAAS,EACvBe,EAAI,EAEQK,GAALL,EAAWA,IAClBT,EAAQS,IAAMK,EAAOhD,KAAOA,KAAK4D,OAAO,GACxC/C,EAAQ2rB,EAAQ7pB,IAAOsjB,GAAY/jB,GAInC7B,EAAKuC,MAAOT,EAAKD,EAAMH,MAGxB,OAAO/B,MAAKiC,UAAWE,KAKzB,IAAIsqB,IACHC,KAQD,SAASC,IAAenpB,EAAMsL,GAC7B,GAAI8d,GACHlqB,EAAO7B,EAAQiO,EAAIrJ,cAAejC,IAAS4oB,SAAUtd,EAAIyX,MAGzDsG,EAAU9sB,EAAO+sB,0BAA6BF,EAAQ7sB,EAAO+sB,wBAAyBpqB,EAAM,KAI3FkqB,EAAMC,QAAUhsB,EAAOihB,IAAKpf,EAAM,GAAK,UAMzC,OAFAA,GAAKspB,SAEEa,EAOR,QAASE,IAAgB9mB,GACxB,GAAI6I,GAAMlP,EACTitB,EAAUH,GAAazmB,EA0BxB,OAxBM4mB,KACLA,EAAUF,GAAe1mB,EAAU6I,GAGlB,SAAZ+d,GAAuBA,IAG3BJ,IAAUA,IAAU5rB,EAAQ,mDAAoDurB,SAAUtd,EAAIJ,iBAG9FI,EAAM2d,GAAQ,GAAIzR,gBAGlBlM,EAAIke,QACJle,EAAIme,QAEJJ,EAAUF,GAAe1mB,EAAU6I,GACnC2d,GAAOT,UAIRU,GAAazmB,GAAa4mB,GAGpBA,EAER,GAAIK,IAAU,UAEVC,GAAY,GAAIxjB,QAAQ,KAAO8X,EAAO,kBAAmB,KAEzD2L,GAAY,SAAU1qB,GAIxB,MAAKA,GAAK0J,cAAc2C,YAAYse,OAC5B3qB,EAAK0J,cAAc2C,YAAYue,iBAAkB5qB,EAAM,MAGxD3C,EAAOutB,iBAAkB5qB,EAAM,MAKxC,SAAS6qB,IAAQ7qB,EAAMc,EAAMgqB,GAC5B,GAAIC,GAAOC,EAAUC,EAAUxrB,EAC9ByqB,EAAQlqB,EAAKkqB,KAsCd,OApCAY,GAAWA,GAAYJ,GAAW1qB,GAI7B8qB,IACJrrB,EAAMqrB,EAASI,iBAAkBpqB,IAAUgqB,EAAUhqB,IAGjDgqB,IAES,KAARrrB,GAAetB,EAAOwH,SAAU3F,EAAK0J,cAAe1J,KACxDP,EAAMtB,EAAO+rB,MAAOlqB,EAAMc,IAOtB2pB,GAAUxgB,KAAMxK,IAAS+qB,GAAQvgB,KAAMnJ,KAG3CiqB,EAAQb,EAAMa,MACdC,EAAWd,EAAMc,SACjBC,EAAWf,EAAMe,SAGjBf,EAAMc,SAAWd,EAAMe,SAAWf,EAAMa,MAAQtrB,EAChDA,EAAMqrB,EAASC,MAGfb,EAAMa,MAAQA,EACdb,EAAMc,SAAWA,EACjBd,EAAMe,SAAWA,IAIJzpB,SAAR/B,EAGNA,EAAM,GACNA,EAIF,QAAS0rB,IAAcC,EAAaC,GAEnC,OACChsB,IAAK,WACJ,MAAK+rB,gBAGG9tB,MAAK+B,KAKL/B,KAAK+B,IAAMgsB,GAAQnrB,MAAO5C,KAAM6C,cAM3C,WACC,GAAImrB,GAAkBC,EACrBhmB,EAAUrI,EAAS8O,gBACnBwf,EAAYtuB,EAAS6F,cAAe,OACpCkI,EAAM/N,EAAS6F,cAAe,MAE/B,IAAMkI,EAAIif,MAAV,CAMAjf,EAAIif,MAAMuB,eAAiB,cAC3BxgB,EAAIwU,WAAW,GAAOyK,MAAMuB,eAAiB,GAC7CxtB,EAAQytB,gBAA+C,gBAA7BzgB,EAAIif,MAAMuB,eAEpCD,EAAUtB,MAAMyB,QAAU,gFAE1BH,EAAUtoB,YAAa+H,EAIvB,SAAS2gB,KACR3gB,EAAIif,MAAMyB,QAGT,uKAGD1gB,EAAIiC,UAAY,GAChB3H,EAAQrC,YAAasoB,EAErB,IAAIK,GAAWxuB,EAAOutB,iBAAkB3f,EAAK,KAC7CqgB,GAAoC,OAAjBO,EAASvf,IAC5Bif,EAA0C,QAAnBM,EAASd,MAEhCxlB,EAAQnC,YAAaooB,GAKjBnuB,EAAOutB,kBACXzsB,EAAOyC,OAAQ3C,GACd6tB,cAAe,WAMd,MADAF,KACON,GAERS,kBAAmB,WAIlB,MAH6B,OAAxBR,GACJK,IAEML,GAERS,oBAAqB,WAOpB,GAAIvsB,GACHwsB,EAAYhhB,EAAI/H,YAAahG,EAAS6F,cAAe,OAiBtD,OAdAkpB,GAAU/B,MAAMyB,QAAU1gB,EAAIif,MAAMyB,QAGnC,8HAEDM,EAAU/B,MAAMgC,YAAcD,EAAU/B,MAAMa,MAAQ,IACtD9f,EAAIif,MAAMa,MAAQ,MAClBxlB,EAAQrC,YAAasoB,GAErB/rB,GAAO6C,WAAYjF,EAAOutB,iBAAkBqB,EAAW,MAAOC,aAE9D3mB,EAAQnC,YAAaooB,GACrBvgB,EAAI7H,YAAa6oB,GAEVxsB,SAQXtB,EAAOguB,KAAO,SAAUnsB,EAAMa,EAAShB,EAAUC,GAChD,GAAIL,GAAKqB,EACRwI,IAGD,KAAMxI,IAAQD,GACbyI,EAAKxI,GAASd,EAAKkqB,MAAOppB,GAC1Bd,EAAKkqB,MAAOppB,GAASD,EAASC,EAG/BrB,GAAMI,EAASK,MAAOF,EAAMF,MAG5B,KAAMgB,IAAQD,GACbb,EAAKkqB,MAAOppB,GAASwI,EAAKxI,EAG3B,OAAOrB,GAIR,IAGC2sB,IAAe,4BACfC,GAAY,GAAIplB,QAAQ,KAAO8X,EAAO,SAAU,KAChDuN,GAAU,GAAIrlB,QAAQ,YAAc8X,EAAO,IAAK,KAEhDwN,IAAYC,SAAU,WAAYC,WAAY,SAAUtC,QAAS,SACjEuC,IACCC,cAAe,IACfC,WAAY,OAGbC,IAAgB,SAAU,IAAK,MAAO,KAGvC,SAASC,IAAgB5C,EAAOppB,GAG/B,GAAKA,IAAQopB,GACZ,MAAOppB,EAIR,IAAIisB,GAAUjsB,EAAK,GAAGhC,cAAgBgC,EAAKrD,MAAM,GAChDuvB,EAAWlsB,EACXb,EAAI4sB,GAAY3tB,MAEjB,OAAQe,IAEP,GADAa,EAAO+rB,GAAa5sB,GAAM8sB,EACrBjsB,IAAQopB,GACZ,MAAOppB,EAIT,OAAOksB,GAGR,QAASC,IAAmBjtB,EAAMyD,EAAOypB,GACxC,GAAI/oB,GAAUkoB,GAAU1iB,KAAMlG,EAC9B,OAAOU,GAENzC,KAAKyrB,IAAK,EAAGhpB,EAAS,IAAQ+oB,GAAY,KAAU/oB,EAAS,IAAO,MACpEV,EAGF,QAAS2pB,IAAsBptB,EAAMc,EAAMusB,EAAOC,EAAaC,GAS9D,IARA,GAAIttB,GAAIotB,KAAYC,EAAc,SAAW,WAE5C,EAES,UAATxsB,EAAmB,EAAI,EAEvBwN,EAAM,EAEK,EAAJrO,EAAOA,GAAK,EAEJ,WAAVotB,IACJ/e,GAAOnQ,EAAOihB,IAAKpf,EAAMqtB,EAAQpO,EAAWhf,IAAK,EAAMstB,IAGnDD,GAEW,YAAVD,IACJ/e,GAAOnQ,EAAOihB,IAAKpf,EAAM,UAAYif,EAAWhf,IAAK,EAAMstB,IAI7C,WAAVF,IACJ/e,GAAOnQ,EAAOihB,IAAKpf,EAAM,SAAWif,EAAWhf,GAAM,SAAS,EAAMstB,MAIrEjf,GAAOnQ,EAAOihB,IAAKpf,EAAM,UAAYif,EAAWhf,IAAK,EAAMstB,GAG5C,YAAVF,IACJ/e,GAAOnQ,EAAOihB,IAAKpf,EAAM,SAAWif,EAAWhf,GAAM,SAAS,EAAMstB,IAKvE,OAAOjf,GAGR,QAASkf,IAAkBxtB,EAAMc,EAAMusB,GAGtC,GAAII,IAAmB,EACtBnf,EAAe,UAATxN,EAAmBd,EAAK0tB,YAAc1tB,EAAK2tB,aACjDJ,EAAS7C,GAAW1qB,GACpBstB,EAAiE,eAAnDnvB,EAAOihB,IAAKpf,EAAM,aAAa,EAAOutB,EAKrD,IAAY,GAAPjf,GAAmB,MAAPA,EAAc,CAQ9B,GANAA,EAAMuc,GAAQ7qB,EAAMc,EAAMysB,IACf,EAANjf,GAAkB,MAAPA,KACfA,EAAMtO,EAAKkqB,MAAOppB,IAId2pB,GAAUxgB,KAAKqE,GACnB,MAAOA,EAKRmf,GAAmBH,IAChBrvB,EAAQ8tB,qBAAuBzd,IAAQtO,EAAKkqB,MAAOppB,IAGtDwN,EAAMhM,WAAYgM,IAAS,EAI5B,MAASA,GACR8e,GACCptB,EACAc,EACAusB,IAAWC,EAAc,SAAW,WACpCG,EACAF,GAEE,KAGL,QAASK,IAAUxf,EAAUyf,GAM5B,IALA,GAAI1D,GAASnqB,EAAM8tB,EAClBxS,KACA1D,EAAQ,EACR1Y,EAASkP,EAASlP,OAEHA,EAAR0Y,EAAgBA,IACvB5X,EAAOoO,EAAUwJ,GACX5X,EAAKkqB,QAIX5O,EAAQ1D,GAAU+F,EAAUte,IAAKW,EAAM,cACvCmqB,EAAUnqB,EAAKkqB,MAAMC,QAChB0D,GAGEvS,EAAQ1D,IAAuB,SAAZuS,IACxBnqB,EAAKkqB,MAAMC,QAAU,IAMM,KAAvBnqB,EAAKkqB,MAAMC,SAAkBjL,EAAUlf,KAC3Csb,EAAQ1D,GAAU+F,EAAUpB,OAAQvc,EAAM,aAAcqqB,GAAerqB,EAAKuD,cAG7EuqB,EAAS5O,EAAUlf,GAEF,SAAZmqB,GAAuB2D,GAC3BnQ,EAAUN,IAAKrd,EAAM,aAAc8tB,EAAS3D,EAAUhsB,EAAOihB,IAAKpf,EAAM,aAO3E,KAAM4X,EAAQ,EAAW1Y,EAAR0Y,EAAgBA,IAChC5X,EAAOoO,EAAUwJ,GACX5X,EAAKkqB,QAGL2D,GAA+B,SAAvB7tB,EAAKkqB,MAAMC,SAA6C,KAAvBnqB,EAAKkqB,MAAMC,UACzDnqB,EAAKkqB,MAAMC,QAAU0D,EAAOvS,EAAQ1D,IAAW,GAAK,QAItD,OAAOxJ,GAGRjQ,EAAOyC,QAINmtB,UACCC,SACC3uB,IAAK,SAAUW,EAAM8qB,GACpB,GAAKA,EAAW,CAGf,GAAIrrB,GAAMorB,GAAQ7qB,EAAM,UACxB,OAAe,KAARP,EAAa,IAAMA,MAO9BwuB,WACCC,aAAe,EACfC,aAAe,EACfC,UAAY,EACZC,YAAc,EACdzB,YAAc,EACd0B,YAAc,EACdN,SAAW,EACXO,OAAS,EACTC,SAAW,EACXC,QAAU,EACVC,QAAU,EACVC,MAAQ,GAKTC,UACCC,QAAS,YAIV3E,MAAO,SAAUlqB,EAAMc,EAAM2C,EAAO4pB,GAGnC,GAAMrtB,GAA0B,IAAlBA,EAAKuC,UAAoC,IAAlBvC,EAAKuC,UAAmBvC,EAAKkqB,MAAlE,CAKA,GAAIzqB,GAAKyC,EAAMsc,EACdwO,EAAW7uB,EAAOkF,UAAWvC,GAC7BopB,EAAQlqB,EAAKkqB,KAQd,OANAppB,GAAO3C,EAAOywB,SAAU5B,KAAgB7uB,EAAOywB,SAAU5B,GAAaF,GAAgB5C,EAAO8C,IAG7FxO,EAAQrgB,EAAO4vB,SAAUjtB,IAAU3C,EAAO4vB,SAAUf,GAGrCxrB,SAAViC,EAiCC+a,GAAS,OAASA,IAAqDhd,UAA3C/B,EAAM+e,EAAMnf,IAAKW,GAAM,EAAOqtB,IACvD5tB,EAIDyqB,EAAOppB,IArCdoB,QAAcuB,GAGA,WAATvB,IAAsBzC,EAAM6sB,GAAQ3iB,KAAMlG,MAC9CA,GAAUhE,EAAI,GAAK,GAAMA,EAAI,GAAK6C,WAAYnE,EAAOihB,IAAKpf,EAAMc,IAEhEoB,EAAO,UAIM,MAATuB,GAAiBA,IAAUA,IAKlB,WAATvB,GAAsB/D,EAAO8vB,UAAWjB,KAC5CvpB,GAAS,MAKJxF,EAAQytB,iBAA6B,KAAVjoB,GAAiD,IAAjC3C,EAAKlD,QAAS,gBAC9DssB,EAAOppB,GAAS,WAIX0d,GAAW,OAASA,IAAwDhd,UAA7CiC,EAAQ+a,EAAMnB,IAAKrd,EAAMyD,EAAO4pB,MACpEnD,EAAOppB,GAAS2C,IAjBjB,UA+BF2b,IAAK,SAAUpf,EAAMc,EAAMusB,EAAOE,GACjC,GAAIjf,GAAKhP,EAAKkf,EACbwO,EAAW7uB,EAAOkF,UAAWvC,EAwB9B,OArBAA,GAAO3C,EAAOywB,SAAU5B,KAAgB7uB,EAAOywB,SAAU5B,GAAaF,GAAgB9sB,EAAKkqB,MAAO8C,IAGlGxO,EAAQrgB,EAAO4vB,SAAUjtB,IAAU3C,EAAO4vB,SAAUf,GAG/CxO,GAAS,OAASA,KACtBlQ,EAAMkQ,EAAMnf,IAAKW,GAAM,EAAMqtB,IAIjB7rB,SAAR8M,IACJA,EAAMuc,GAAQ7qB,EAAMc,EAAMysB,IAId,WAARjf,GAAoBxN,IAAQ4rB,MAChCpe,EAAMoe,GAAoB5rB,IAIZ,KAAVusB,GAAgBA,GACpB/tB,EAAMgD,WAAYgM,GACX+e,KAAU,GAAQlvB,EAAOkE,UAAW/C,GAAQA,GAAO,EAAIgP,GAExDA,KAITnQ,EAAOyB,MAAO,SAAU,SAAW,SAAUK,EAAGa,GAC/C3C,EAAO4vB,SAAUjtB,IAChBzB,IAAK,SAAUW,EAAM8qB,EAAUuC,GAC9B,MAAKvC,GAIGsB,GAAaniB,KAAM9L,EAAOihB,IAAKpf,EAAM,aAAsC,IAArBA,EAAK0tB,YACjEvvB,EAAOguB,KAAMnsB,EAAMusB,GAAS,WAC3B,MAAOiB,IAAkBxtB,EAAMc,EAAMusB,KAEtCG,GAAkBxtB,EAAMc,EAAMusB,GARhC,QAYDhQ,IAAK,SAAUrd,EAAMyD,EAAO4pB,GAC3B,GAAIE,GAASF,GAAS3C,GAAW1qB,EACjC,OAAOitB,IAAmBjtB,EAAMyD,EAAO4pB,EACtCD,GACCptB,EACAc,EACAusB,EACmD,eAAnDlvB,EAAOihB,IAAKpf,EAAM,aAAa,EAAOutB,GACtCA,GACG,OAORpvB,EAAO4vB,SAAS7B,YAAcf,GAAcltB,EAAQ+tB,oBACnD,SAAUhsB,EAAM8qB,GACf,MAAKA,GACG3sB,EAAOguB,KAAMnsB,GAAQmqB,QAAW,gBACtCU,IAAU7qB,EAAM,gBAFlB,SAQF7B,EAAOyB,MACNkvB,OAAQ,GACRC,QAAS,GACTC,OAAQ,SACN,SAAUC,EAAQC,GACpB/wB,EAAO4vB,SAAUkB,EAASC,IACzBC,OAAQ,SAAU1rB,GAOjB,IANA,GAAIxD,GAAI,EACPmvB,KAGAC,EAAyB,gBAAV5rB,GAAqBA,EAAMkB,MAAM,MAASlB,GAE9C,EAAJxD,EAAOA,IACdmvB,EAAUH,EAAShQ,EAAWhf,GAAMivB,GACnCG,EAAOpvB,IAAOovB,EAAOpvB,EAAI,IAAOovB,EAAO,EAGzC,OAAOD,KAIH5E,GAAQvgB,KAAMglB,KACnB9wB,EAAO4vB,SAAUkB,EAASC,GAAS7R,IAAM4P,MAI3C9uB,EAAOG,GAAGsC,QACTwe,IAAK,SAAUte,EAAM2C,GACpB,MAAO8Y,GAAQjf,KAAM,SAAU0C,EAAMc,EAAM2C,GAC1C,GAAI8pB,GAAQhtB,EACXR,KACAE,EAAI,CAEL,IAAK9B,EAAOoD,QAAST,GAAS,CAI7B,IAHAysB,EAAS7C,GAAW1qB,GACpBO,EAAMO,EAAK5B,OAECqB,EAAJN,EAASA,IAChBF,EAAKe,EAAMb,IAAQ9B,EAAOihB,IAAKpf,EAAMc,EAAMb,IAAK,EAAOstB,EAGxD,OAAOxtB,GAGR,MAAiByB,UAAViC,EACNtF,EAAO+rB,MAAOlqB,EAAMc,EAAM2C,GAC1BtF,EAAOihB,IAAKpf,EAAMc,IACjBA,EAAM2C,EAAOtD,UAAUjB,OAAS,IAEpC2uB,KAAM,WACL,MAAOD,IAAUtwB,MAAM,IAExBgyB,KAAM,WACL,MAAO1B,IAAUtwB,OAElBiyB,OAAQ,SAAUtV,GACjB,MAAsB,iBAAVA,GACJA,EAAQ3c,KAAKuwB,OAASvwB,KAAKgyB,OAG5BhyB,KAAKsC,KAAK,WACXsf,EAAU5hB,MACda,EAAQb,MAAOuwB,OAEf1vB,EAAQb,MAAOgyB,WAOnB,SAASE,IAAOxvB,EAAMa,EAASyc,EAAM7c,EAAKgvB,GACzC,MAAO,IAAID,IAAMzwB,UAAUR,KAAMyB,EAAMa,EAASyc,EAAM7c,EAAKgvB,GAE5DtxB,EAAOqxB,MAAQA,GAEfA,GAAMzwB,WACLE,YAAauwB,GACbjxB,KAAM,SAAUyB,EAAMa,EAASyc,EAAM7c,EAAKgvB,EAAQC,GACjDpyB,KAAK0C,KAAOA,EACZ1C,KAAKggB,KAAOA,EACZhgB,KAAKmyB,OAASA,GAAU,QACxBnyB,KAAKuD,QAAUA,EACfvD,KAAKgT,MAAQhT,KAAKmH,IAAMnH,KAAKiO,MAC7BjO,KAAKmD,IAAMA,EACXnD,KAAKoyB,KAAOA,IAAUvxB,EAAO8vB,UAAW3Q,GAAS,GAAK,OAEvD/R,IAAK,WACJ,GAAIiT,GAAQgR,GAAMG,UAAWryB,KAAKggB,KAElC,OAAOkB,IAASA,EAAMnf,IACrBmf,EAAMnf,IAAK/B,MACXkyB,GAAMG,UAAUjN,SAASrjB,IAAK/B,OAEhCsyB,IAAK,SAAUC,GACd,GAAIC,GACHtR,EAAQgR,GAAMG,UAAWryB,KAAKggB,KAoB/B,OAjBChgB,MAAKqa,IAAMmY,EADPxyB,KAAKuD,QAAQkvB,SACE5xB,EAAOsxB,OAAQnyB,KAAKmyB,QACtCI,EAASvyB,KAAKuD,QAAQkvB,SAAWF,EAAS,EAAG,EAAGvyB,KAAKuD,QAAQkvB,UAG3CF,EAEpBvyB,KAAKmH,KAAQnH,KAAKmD,IAAMnD,KAAKgT,OAAUwf,EAAQxyB,KAAKgT,MAE/ChT,KAAKuD,QAAQmvB,MACjB1yB,KAAKuD,QAAQmvB,KAAK5wB,KAAM9B,KAAK0C,KAAM1C,KAAKmH,IAAKnH,MAGzCkhB,GAASA,EAAMnB,IACnBmB,EAAMnB,IAAK/f,MAEXkyB,GAAMG,UAAUjN,SAASrF,IAAK/f,MAExBA,OAITkyB,GAAMzwB,UAAUR,KAAKQ,UAAYywB,GAAMzwB,UAEvCywB,GAAMG,WACLjN,UACCrjB,IAAK,SAAU4wB,GACd,GAAIngB,EAEJ,OAAiC,OAA5BmgB,EAAMjwB,KAAMiwB,EAAM3S,OACpB2S,EAAMjwB,KAAKkqB,OAA2C,MAAlC+F,EAAMjwB,KAAKkqB,MAAO+F,EAAM3S,OAQ/CxN,EAAS3R,EAAOihB,IAAK6Q,EAAMjwB,KAAMiwB,EAAM3S,KAAM,IAErCxN,GAAqB,SAAXA,EAAwBA,EAAJ,GAT9BmgB,EAAMjwB,KAAMiwB,EAAM3S,OAW3BD,IAAK,SAAU4S,GAIT9xB,EAAO+xB,GAAGF,KAAMC,EAAM3S,MAC1Bnf,EAAO+xB,GAAGF,KAAMC,EAAM3S,MAAQ2S,GACnBA,EAAMjwB,KAAKkqB,QAAgE,MAArD+F,EAAMjwB,KAAKkqB,MAAO/rB,EAAOywB,SAAUqB,EAAM3S,QAAoBnf,EAAO4vB,SAAUkC,EAAM3S,OACrHnf,EAAO+rB,MAAO+F,EAAMjwB,KAAMiwB,EAAM3S,KAAM2S,EAAMxrB,IAAMwrB,EAAMP,MAExDO,EAAMjwB,KAAMiwB,EAAM3S,MAAS2S,EAAMxrB,OAQrC+qB,GAAMG,UAAUvL,UAAYoL,GAAMG,UAAU3L,YAC3C3G,IAAK,SAAU4S,GACTA,EAAMjwB,KAAKuC,UAAY0tB,EAAMjwB,KAAKmD,aACtC8sB,EAAMjwB,KAAMiwB,EAAM3S,MAAS2S,EAAMxrB,OAKpCtG,EAAOsxB,QACNU,OAAQ,SAAUC,GACjB,MAAOA,IAERC,MAAO,SAAUD,GAChB,MAAO,GAAM1uB,KAAK4uB,IAAKF,EAAI1uB,KAAK6uB,IAAO,IAIzCpyB,EAAO+xB,GAAKV,GAAMzwB,UAAUR,KAG5BJ,EAAO+xB,GAAGF,OAKV,IACCQ,IAAOC,GACPC,GAAW,yBACXC,GAAS,GAAI1pB,QAAQ,iBAAmB8X,EAAO,cAAe,KAC9D6R,GAAO,cACPC,IAAwBC,IACxBC,IACCC,KAAO,SAAU1T,EAAM7Z,GACtB,GAAIwsB,GAAQ3yB,KAAK2zB,YAAa3T,EAAM7Z,GACnCtC,EAAS8uB,EAAM1kB,MACf8jB,EAAQsB,GAAOhnB,KAAMlG,GACrBisB,EAAOL,GAASA,EAAO,KAASlxB,EAAO8vB,UAAW3Q,GAAS,GAAK,MAGhEhN,GAAUnS,EAAO8vB,UAAW3Q,IAAmB,OAAToS,IAAkBvuB,IACvDwvB,GAAOhnB,KAAMxL,EAAOihB,IAAK6Q,EAAMjwB,KAAMsd,IACtC4T,EAAQ,EACRC,EAAgB,EAEjB,IAAK7gB,GAASA,EAAO,KAAQof,EAAO,CAEnCA,EAAOA,GAAQpf,EAAO,GAGtB+e,EAAQA,MAGR/e,GAASnP,GAAU,CAEnB,GAGC+vB,GAAQA,GAAS,KAGjB5gB,GAAgB4gB,EAChB/yB,EAAO+rB,MAAO+F,EAAMjwB,KAAMsd,EAAMhN,EAAQof,SAI/BwB,KAAWA,EAAQjB,EAAM1kB,MAAQpK,IAAqB,IAAV+vB,KAAiBC,GAaxE,MATK9B,KACJ/e,EAAQ2f,EAAM3f,OAASA,IAAUnP,GAAU,EAC3C8uB,EAAMP,KAAOA,EAEbO,EAAMxvB,IAAM4uB,EAAO,GAClB/e,GAAU+e,EAAO,GAAM,GAAMA,EAAO,IACnCA,EAAO,IAGHY,IAKV,SAASmB,MAIR,MAHA9U,YAAW,WACVkU,GAAQhvB,SAEAgvB,GAAQryB,EAAOsG,MAIzB,QAAS4sB,IAAOnvB,EAAMovB,GACrB,GAAI9N,GACHvjB,EAAI,EACJkL,GAAUomB,OAAQrvB,EAKnB,KADAovB,EAAeA,EAAe,EAAI,EACtB,EAAJrxB,EAAQA,GAAK,EAAIqxB,EACxB9N,EAAQvE,EAAWhf,GACnBkL,EAAO,SAAWqY,GAAUrY,EAAO,UAAYqY,GAAUthB,CAO1D,OAJKovB,KACJnmB,EAAM6iB,QAAU7iB,EAAM4f,MAAQ7oB,GAGxBiJ,EAGR,QAAS8lB,IAAaxtB,EAAO6Z,EAAMkU,GAKlC,IAJA,GAAIvB,GACHwB,GAAeV,GAAUzT,QAAe5f,OAAQqzB,GAAU,MAC1DnZ,EAAQ,EACR1Y,EAASuyB,EAAWvyB,OACLA,EAAR0Y,EAAgBA,IACvB,GAAMqY,EAAQwB,EAAY7Z,GAAQxY,KAAMoyB,EAAWlU,EAAM7Z,GAGxD,MAAOwsB,GAKV,QAASa,IAAkB9wB,EAAMojB,EAAOsO,GAEvC,GAAIpU,GAAM7Z,EAAO8rB,EAAQU,EAAOzR,EAAOmT,EAASxH,EAASyH,EACxDC,EAAOv0B,KACPioB,KACA2E,EAAQlqB,EAAKkqB,MACb4D,EAAS9tB,EAAKuC,UAAY2c,EAAUlf,GACpC8xB,EAAWnU,EAAUte,IAAKW,EAAM,SAG3B0xB,GAAKrT,QACVG,EAAQrgB,EAAOsgB,YAAaze,EAAM,MACX,MAAlBwe,EAAMuT,WACVvT,EAAMuT,SAAW,EACjBJ,EAAUnT,EAAMvM,MAAMqH,KACtBkF,EAAMvM,MAAMqH,KAAO,WACZkF,EAAMuT,UACXJ,MAIHnT,EAAMuT,WAENF,EAAK1X,OAAO,WAEX0X,EAAK1X,OAAO,WACXqE,EAAMuT,WACA5zB,EAAOkgB,MAAOre,EAAM,MAAOd,QAChCsf,EAAMvM,MAAMqH,YAOO,IAAlBtZ,EAAKuC,WAAoB,UAAY6gB,IAAS,SAAWA,MAK7DsO,EAAKM,UAAa9H,EAAM8H,SAAU9H,EAAM+H,UAAW/H,EAAMgI,WAIzD/H,EAAUhsB,EAAOihB,IAAKpf,EAAM,WAG5B4xB,EAA2B,SAAZzH,EACdxM,EAAUte,IAAKW,EAAM,eAAkBqqB,GAAgBrqB,EAAKuD,UAAa4mB,EAEpD,WAAjByH,GAA6D,SAAhCzzB,EAAOihB,IAAKpf,EAAM,WACnDkqB,EAAMC,QAAU,iBAIbuH,EAAKM,WACT9H,EAAM8H,SAAW,SACjBH,EAAK1X,OAAO,WACX+P,EAAM8H,SAAWN,EAAKM,SAAU,GAChC9H,EAAM+H,UAAYP,EAAKM,SAAU,GACjC9H,EAAMgI,UAAYR,EAAKM,SAAU,KAKnC,KAAM1U,IAAQ8F,GAEb,GADA3f,EAAQ2f,EAAO9F,GACVoT,GAAS/mB,KAAMlG,GAAU,CAG7B,SAFO2f,GAAO9F,GACdiS,EAASA,GAAoB,WAAV9rB,EACdA,KAAYqqB,EAAS,OAAS,QAAW,CAG7C,GAAe,SAAVrqB,IAAoBquB,GAAiCtwB,SAArBswB,EAAUxU,GAG9C,QAFAwQ,IAAS,EAKXvI,EAAMjI,GAASwU,GAAYA,EAAUxU,IAAUnf,EAAO+rB,MAAOlqB,EAAMsd,OAInE6M,GAAU3oB,MAIZ,IAAMrD,EAAOqE,cAAe+iB,GAyCqD,YAAxD,SAAZ4E,EAAqBE,GAAgBrqB,EAAKuD,UAAa4mB,KACnED,EAAMC,QAAUA,OA1CoB,CAC/B2H,EACC,UAAYA,KAChBhE,EAASgE,EAAShE,QAGnBgE,EAAWnU,EAAUpB,OAAQvc,EAAM,aAI/BuvB,IACJuC,EAAShE,QAAUA,GAEfA,EACJ3vB,EAAQ6B,GAAO6tB,OAEfgE,EAAK/rB,KAAK,WACT3H,EAAQ6B,GAAOsvB,SAGjBuC,EAAK/rB,KAAK,WACT,GAAIwX,EAEJK,GAAUjE,OAAQ1Z,EAAM,SACxB,KAAMsd,IAAQiI,GACbpnB,EAAO+rB,MAAOlqB,EAAMsd,EAAMiI,EAAMjI,KAGlC,KAAMA,IAAQiI,GACb0K,EAAQgB,GAAanD,EAASgE,EAAUxU,GAAS,EAAGA,EAAMuU,GAElDvU,IAAQwU,KACfA,EAAUxU,GAAS2S,EAAM3f,MACpBwd,IACJmC,EAAMxvB,IAAMwvB,EAAM3f,MAClB2f,EAAM3f,MAAiB,UAATgN,GAA6B,WAATA,EAAoB,EAAI,KAW/D,QAAS6U,IAAY/O,EAAOgP,GAC3B,GAAIxa,GAAO9W,EAAM2uB,EAAQhsB,EAAO+a,CAGhC,KAAM5G,IAASwL,GAed,GAdAtiB,EAAO3C,EAAOkF,UAAWuU,GACzB6X,EAAS2C,EAAetxB,GACxB2C,EAAQ2f,EAAOxL,GACVzZ,EAAOoD,QAASkC,KACpBgsB,EAAShsB,EAAO,GAChBA,EAAQ2f,EAAOxL,GAAUnU,EAAO,IAG5BmU,IAAU9W,IACdsiB,EAAOtiB,GAAS2C,QACT2f,GAAOxL,IAGf4G,EAAQrgB,EAAO4vB,SAAUjtB,GACpB0d,GAAS,UAAYA,GAAQ,CACjC/a,EAAQ+a,EAAM2Q,OAAQ1rB,SACf2f,GAAOtiB,EAId,KAAM8W,IAASnU,GACNmU,IAASwL,KAChBA,EAAOxL,GAAUnU,EAAOmU,GACxBwa,EAAexa,GAAU6X,OAI3B2C,GAAetxB,GAAS2uB,EAK3B,QAAS4C,IAAWryB,EAAMsyB,EAAYzxB,GACrC,GAAIiP,GACHyiB,EACA3a,EAAQ,EACR1Y,EAAS2xB,GAAoB3xB,OAC7Bkb,EAAWjc,EAAO2b,WAAWK,OAAQ,iBAE7BqY,GAAKxyB,OAEbwyB,EAAO,WACN,GAAKD,EACJ,OAAO,CAWR,KATA,GAAIE,GAAcjC,IAASY,KAC1BhW,EAAY1Z,KAAKyrB,IAAK,EAAGqE,EAAUkB,UAAYlB,EAAUzB,SAAW0C,GAGpEle,EAAO6G,EAAYoW,EAAUzB,UAAY,EACzCF,EAAU,EAAItb,EACdqD,EAAQ,EACR1Y,EAASsyB,EAAUmB,OAAOzzB,OAEXA,EAAR0Y,EAAiBA,IACxB4Z,EAAUmB,OAAQ/a,GAAQgY,IAAKC,EAKhC,OAFAzV,GAASoB,WAAYxb,GAAQwxB,EAAW3B,EAASzU,IAElC,EAAVyU,GAAe3wB,EACZkc,GAEPhB,EAASqB,YAAazb,GAAQwxB,KACvB,IAGTA,EAAYpX,EAASF,SACpBla,KAAMA,EACNojB,MAAOjlB,EAAOyC,UAAY0xB,GAC1BZ,KAAMvzB,EAAOyC,QAAQ,GAAQwxB,kBAAqBvxB,GAClD+xB,mBAAoBN,EACpBO,gBAAiBhyB,EACjB6xB,UAAWlC,IAASY,KACpBrB,SAAUlvB,EAAQkvB,SAClB4C,UACA1B,YAAa,SAAU3T,EAAM7c,GAC5B,GAAIwvB,GAAQ9xB,EAAOqxB,MAAOxvB,EAAMwxB,EAAUE,KAAMpU,EAAM7c,EACpD+wB,EAAUE,KAAKU,cAAe9U,IAAUkU,EAAUE,KAAKjC,OAEzD,OADA+B,GAAUmB,OAAOh1B,KAAMsyB,GAChBA,GAERvR,KAAM,SAAUoU,GACf,GAAIlb,GAAQ,EAGX1Y,EAAS4zB,EAAUtB,EAAUmB,OAAOzzB,OAAS,CAC9C,IAAKqzB,EACJ,MAAOj1B,KAGR,KADAi1B,GAAU,EACMrzB,EAAR0Y,EAAiBA,IACxB4Z,EAAUmB,OAAQ/a,GAAQgY,IAAK,EAShC,OALKkD,GACJ1Y,EAASqB,YAAazb,GAAQwxB,EAAWsB,IAEzC1Y,EAAS2Y,WAAY/yB,GAAQwxB,EAAWsB,IAElCx1B,QAGT8lB,EAAQoO,EAAUpO,KAInB,KAFA+O,GAAY/O,EAAOoO,EAAUE,KAAKU,eAElBlzB,EAAR0Y,EAAiBA,IAExB,GADA9H,EAAS+gB,GAAqBjZ,GAAQxY,KAAMoyB,EAAWxxB,EAAMojB,EAAOoO,EAAUE,MAE7E,MAAO5hB,EAmBT,OAfA3R,GAAO4B,IAAKqjB,EAAO6N,GAAaO,GAE3BrzB,EAAOkD,WAAYmwB,EAAUE,KAAKphB,QACtCkhB,EAAUE,KAAKphB,MAAMlR,KAAMY,EAAMwxB,GAGlCrzB,EAAO+xB,GAAG8C,MACT70B,EAAOyC,OAAQ4xB,GACdxyB,KAAMA,EACN6xB,KAAML,EACNnT,MAAOmT,EAAUE,KAAKrT,SAKjBmT,EAAU3W,SAAU2W,EAAUE,KAAK7W,UACxC/U,KAAM0rB,EAAUE,KAAK5rB,KAAM0rB,EAAUE,KAAKuB,UAC1C5Y,KAAMmX,EAAUE,KAAKrX,MACrBF,OAAQqX,EAAUE,KAAKvX,QAG1Bhc,EAAOk0B,UAAYl0B,EAAOyC,OAAQyxB,IAEjCa,QAAS,SAAU9P,EAAOvjB,GACpB1B,EAAOkD,WAAY+hB,IACvBvjB,EAAWujB,EACXA,GAAU,MAEVA,EAAQA,EAAMze,MAAM,IAOrB,KAJA,GAAI2Y,GACH1F,EAAQ,EACR1Y,EAASkkB,EAAMlkB,OAEAA,EAAR0Y,EAAiBA,IACxB0F,EAAO8F,EAAOxL,GACdmZ,GAAUzT,GAASyT,GAAUzT,OAC7ByT,GAAUzT,GAAOpP,QAASrO,IAI5BszB,UAAW,SAAUtzB,EAAUipB,GACzBA,EACJ+H,GAAoB3iB,QAASrO,GAE7BgxB,GAAoBlzB,KAAMkC,MAK7B1B,EAAOi1B,MAAQ,SAAUA,EAAO3D,EAAQnxB,GACvC,GAAI+0B,GAAMD,GAA0B,gBAAVA,GAAqBj1B,EAAOyC,UAAYwyB,IACjEH,SAAU30B,IAAOA,GAAMmxB,GACtBtxB,EAAOkD,WAAY+xB,IAAWA,EAC/BrD,SAAUqD,EACV3D,OAAQnxB,GAAMmxB,GAAUA,IAAWtxB,EAAOkD,WAAYouB,IAAYA,EAwBnE,OArBA4D,GAAItD,SAAW5xB,EAAO+xB,GAAGhU,IAAM,EAA4B,gBAAjBmX,GAAItD,SAAwBsD,EAAItD,SACzEsD,EAAItD,WAAY5xB,GAAO+xB,GAAGoD,OAASn1B,EAAO+xB,GAAGoD,OAAQD,EAAItD,UAAa5xB,EAAO+xB,GAAGoD,OAAO5Q,UAGtE,MAAb2Q,EAAIhV,OAAiBgV,EAAIhV,SAAU,KACvCgV,EAAIhV,MAAQ,MAIbgV,EAAI/pB,IAAM+pB,EAAIJ,SAEdI,EAAIJ,SAAW,WACT90B,EAAOkD,WAAYgyB,EAAI/pB,MAC3B+pB,EAAI/pB,IAAIlK,KAAM9B,MAGV+1B,EAAIhV,OACRlgB,EAAOmgB,QAAShhB,KAAM+1B,EAAIhV,QAIrBgV,GAGRl1B,EAAOG,GAAGsC,QACT2yB,OAAQ,SAAUH,EAAOI,EAAI/D,EAAQ5vB,GAGpC,MAAOvC,MAAKwP,OAAQoS,GAAWE,IAAK,UAAW,GAAIyO,OAGjDptB,MAAMgzB,SAAUzF,QAASwF,GAAMJ,EAAO3D,EAAQ5vB,IAEjD4zB,QAAS,SAAUnW,EAAM8V,EAAO3D,EAAQ5vB,GACvC,GAAIoS,GAAQ9T,EAAOqE,cAAe8a,GACjCoW,EAASv1B,EAAOi1B,MAAOA,EAAO3D,EAAQ5vB,GACtC8zB,EAAc,WAEb,GAAI9B,GAAOQ,GAAW/0B,KAAMa,EAAOyC,UAAY0c,GAAQoW,IAGlDzhB,GAAS0L,EAAUte,IAAK/B,KAAM,YAClCu0B,EAAKnT,MAAM,GAKd,OAFCiV,GAAYC,OAASD,EAEf1hB,GAASyhB,EAAOrV,SAAU,EAChC/gB,KAAKsC,KAAM+zB,GACXr2B,KAAK+gB,MAAOqV,EAAOrV,MAAOsV,IAE5BjV,KAAM,SAAUxc,EAAM0c,EAAYkU,GACjC,GAAIe,GAAY,SAAUrV,GACzB,GAAIE,GAAOF,EAAME,WACVF,GAAME,KACbA,EAAMoU,GAYP,OATqB,gBAAT5wB,KACX4wB,EAAUlU,EACVA,EAAa1c,EACbA,EAAOV,QAEHod,GAAc1c,KAAS,GAC3B5E,KAAK+gB,MAAOnc,GAAQ,SAGd5E,KAAKsC,KAAK,WAChB,GAAI0e,IAAU,EACb1G,EAAgB,MAAR1V,GAAgBA,EAAO,aAC/B4xB,EAAS31B,EAAO21B,OAChBva,EAAOoE,EAAUte,IAAK/B,KAEvB,IAAKsa,EACC2B,EAAM3B,IAAW2B,EAAM3B,GAAQ8G,MACnCmV,EAAWta,EAAM3B,QAGlB,KAAMA,IAAS2B,GACTA,EAAM3B,IAAW2B,EAAM3B,GAAQ8G,MAAQkS,GAAK3mB,KAAM2N,IACtDic,EAAWta,EAAM3B,GAKpB,KAAMA,EAAQkc,EAAO50B,OAAQ0Y,KACvBkc,EAAQlc,GAAQ5X,OAAS1C,MAAiB,MAAR4E,GAAgB4xB,EAAQlc,GAAQyG,QAAUnc,IAChF4xB,EAAQlc,GAAQia,KAAKnT,KAAMoU,GAC3BxU,GAAU,EACVwV,EAAOnzB,OAAQiX,EAAO,KAOnB0G,IAAYwU,IAChB30B,EAAOmgB,QAAShhB,KAAM4E,MAIzB0xB,OAAQ,SAAU1xB,GAIjB,MAHKA,MAAS,IACbA,EAAOA,GAAQ,MAET5E,KAAKsC,KAAK,WAChB,GAAIgY,GACH2B,EAAOoE,EAAUte,IAAK/B,MACtB+gB,EAAQ9E,EAAMrX,EAAO,SACrBsc,EAAQjF,EAAMrX,EAAO,cACrB4xB,EAAS31B,EAAO21B,OAChB50B,EAASmf,EAAQA,EAAMnf,OAAS,CAajC,KAVAqa,EAAKqa,QAAS,EAGdz1B,EAAOkgB,MAAO/gB,KAAM4E,MAEfsc,GAASA,EAAME,MACnBF,EAAME,KAAKtf,KAAM9B,MAAM,GAIlBsa,EAAQkc,EAAO50B,OAAQ0Y,KACvBkc,EAAQlc,GAAQ5X,OAAS1C,MAAQw2B,EAAQlc,GAAQyG,QAAUnc,IAC/D4xB,EAAQlc,GAAQia,KAAKnT,MAAM,GAC3BoV,EAAOnzB,OAAQiX,EAAO,GAKxB,KAAMA,EAAQ,EAAW1Y,EAAR0Y,EAAgBA,IAC3ByG,EAAOzG,IAAWyG,EAAOzG,GAAQgc,QACrCvV,EAAOzG,GAAQgc,OAAOx0B,KAAM9B,YAKvBic,GAAKqa,YAKfz1B,EAAOyB,MAAO,SAAU,OAAQ,QAAU,SAAUK,EAAGa,GACtD,GAAIizB,GAAQ51B,EAAOG,GAAIwC,EACvB3C,GAAOG,GAAIwC,GAAS,SAAUsyB,EAAO3D,EAAQ5vB,GAC5C,MAAgB,OAATuzB,GAAkC,iBAAVA,GAC9BW,EAAM7zB,MAAO5C,KAAM6C,WACnB7C,KAAKm2B,QAASpC,GAAOvwB,GAAM,GAAQsyB,EAAO3D,EAAQ5vB,MAKrD1B,EAAOyB,MACNo0B,UAAW3C,GAAM,QACjB4C,QAAS5C,GAAM,QACf6C,YAAa7C,GAAM,UACnB8C,QAAUnG,QAAS,QACnBoG,SAAWpG,QAAS,QACpBqG,YAAcrG,QAAS,WACrB,SAAUltB,EAAMsiB,GAClBjlB,EAAOG,GAAIwC,GAAS,SAAUsyB,EAAO3D,EAAQ5vB,GAC5C,MAAOvC,MAAKm2B,QAASrQ,EAAOgQ,EAAO3D,EAAQ5vB,MAI7C1B,EAAO21B,UACP31B,EAAO+xB,GAAGsC,KAAO,WAChB,GAAIQ,GACH/yB,EAAI,EACJ6zB,EAAS31B,EAAO21B,MAIjB,KAFAtD,GAAQryB,EAAOsG,MAEPxE,EAAI6zB,EAAO50B,OAAQe,IAC1B+yB,EAAQc,EAAQ7zB,GAEV+yB,KAAWc,EAAQ7zB,KAAQ+yB,GAChCc,EAAOnzB,OAAQV,IAAK,EAIhB6zB,GAAO50B,QACZf,EAAO+xB,GAAGxR,OAEX8R,GAAQhvB,QAGTrD,EAAO+xB,GAAG8C,MAAQ,SAAUA,GAC3B70B,EAAO21B,OAAOn2B,KAAMq1B,GACfA,IACJ70B,EAAO+xB,GAAG5f,QAEVnS,EAAO21B,OAAOvtB,OAIhBpI,EAAO+xB,GAAGoE,SAAW,GAErBn2B,EAAO+xB,GAAG5f,MAAQ,WACXmgB,KACLA,GAAU8D,YAAap2B,EAAO+xB,GAAGsC,KAAMr0B,EAAO+xB,GAAGoE,YAInDn2B,EAAO+xB,GAAGxR,KAAO,WAChB8V,cAAe/D,IACfA,GAAU,MAGXtyB,EAAO+xB,GAAGoD,QACTmB,KAAM,IACNC,KAAM,IAENhS,SAAU,KAMXvkB,EAAOG,GAAGq2B,MAAQ,SAAUC,EAAM1yB,GAIjC,MAHA0yB,GAAOz2B,EAAO+xB,GAAK/xB,EAAO+xB,GAAGoD,OAAQsB,IAAUA,EAAOA,EACtD1yB,EAAOA,GAAQ,KAER5E,KAAK+gB,MAAOnc,EAAM,SAAUgV,EAAMsH,GACxC,GAAIqW,GAAUvY,WAAYpF,EAAM0d,EAChCpW,GAAME,KAAO,WACZoW,aAAcD,OAMjB,WACC,GAAI1nB,GAAQjQ,EAAS6F,cAAe,SACnCmC,EAAShI,EAAS6F,cAAe,UACjCswB,EAAMnuB,EAAOhC,YAAahG,EAAS6F,cAAe,UAEnDoK,GAAMjL,KAAO,WAIbjE,EAAQ82B,QAA0B,KAAhB5nB,EAAM1J,MAIxBxF,EAAQ+2B,YAAc3B,EAAIthB,SAI1B7M,EAAO2M,UAAW,EAClB5T,EAAQg3B,aAAe5B,EAAIxhB,SAI3B1E,EAAQjQ,EAAS6F,cAAe,SAChCoK,EAAM1J,MAAQ,IACd0J,EAAMjL,KAAO,QACbjE,EAAQi3B,WAA6B,MAAhB/nB,EAAM1J,QAI5B,IAAI0xB,IAAUC,GACb/pB,GAAalN,EAAOgQ,KAAK9C,UAE1BlN,GAAOG,GAAGsC,QACTyN,KAAM,SAAUvN,EAAM2C,GACrB,MAAO8Y,GAAQjf,KAAMa,EAAOkQ,KAAMvN,EAAM2C,EAAOtD,UAAUjB,OAAS,IAGnEm2B,WAAY,SAAUv0B,GACrB,MAAOxD,MAAKsC,KAAK,WAChBzB,EAAOk3B,WAAY/3B,KAAMwD,QAK5B3C,EAAOyC,QACNyN,KAAM,SAAUrO,EAAMc,EAAM2C,GAC3B,GAAI+a,GAAO/e,EACV61B,EAAQt1B,EAAKuC,QAGd,IAAMvC,GAAkB,IAAVs1B,GAAyB,IAAVA,GAAyB,IAAVA,EAK5C,aAAYt1B,GAAKkK,eAAiByV,EAC1BxhB,EAAOmf,KAAMtd,EAAMc,EAAM2C,IAKlB,IAAV6xB,GAAgBn3B,EAAOgY,SAAUnW,KACrCc,EAAOA,EAAK0C,cACZgb,EAAQrgB,EAAOo3B,UAAWz0B,KACvB3C,EAAOgQ,KAAKhF,MAAMrB,KAAKmC,KAAMnJ,GAASs0B,GAAWD,KAGtC3zB,SAAViC,EAaO+a,GAAS,OAASA,IAA6C,QAAnC/e,EAAM+e,EAAMnf,IAAKW,EAAMc,IACvDrB,GAGPA,EAAMtB,EAAO0O,KAAKwB,KAAMrO,EAAMc,GAGhB,MAAPrB,EACN+B,OACA/B,GApBc,OAAVgE,EAGO+a,GAAS,OAASA,IAAoDhd,UAA1C/B,EAAM+e,EAAMnB,IAAKrd,EAAMyD,EAAO3C,IAC9DrB,GAGPO,EAAKmK,aAAcrJ,EAAM2C,EAAQ,IAC1BA,OAPPtF,GAAOk3B,WAAYr1B,EAAMc;EAuB5Bu0B,WAAY,SAAUr1B,EAAMyD,GAC3B,GAAI3C,GAAM00B,EACTv1B,EAAI,EACJw1B,EAAYhyB,GAASA,EAAM0F,MAAOqP,EAEnC,IAAKid,GAA+B,IAAlBz1B,EAAKuC,SACtB,MAASzB,EAAO20B,EAAUx1B,KACzBu1B,EAAWr3B,EAAOu3B,QAAS50B,IAAUA,EAGhC3C,EAAOgQ,KAAKhF,MAAMrB,KAAKmC,KAAMnJ,KAEjCd,EAAMw1B,IAAa,GAGpBx1B,EAAKyK,gBAAiB3J,IAKzBy0B,WACCrzB,MACCmb,IAAK,SAAUrd,EAAMyD,GACpB,IAAMxF,EAAQi3B,YAAwB,UAAVzxB,GAC3BtF,EAAOoF,SAAUvD,EAAM,SAAY,CACnC,GAAIsO,GAAMtO,EAAKyD,KAKf,OAJAzD,GAAKmK,aAAc,OAAQ1G,GACtB6K,IACJtO,EAAKyD,MAAQ6K,GAEP7K,QAQZ2xB,IACC/X,IAAK,SAAUrd,EAAMyD,EAAO3C,GAO3B,MANK2C,MAAU,EAEdtF,EAAOk3B,WAAYr1B,EAAMc,GAEzBd,EAAKmK,aAAcrJ,EAAMA,GAEnBA,IAGT3C,EAAOyB,KAAMzB,EAAOgQ,KAAKhF,MAAMrB,KAAKkX,OAAO7V,MAAO,QAAU,SAAUlJ,EAAGa,GACxE,GAAI60B,GAAStqB,GAAYvK,IAAU3C,EAAO0O,KAAKwB,IAE/ChD,IAAYvK,GAAS,SAAUd,EAAMc,EAAMiE,GAC1C,GAAItF,GAAKwhB,CAUT,OATMlc,KAELkc,EAAS5V,GAAYvK,GACrBuK,GAAYvK,GAASrB,EACrBA,EAAqC,MAA/Bk2B,EAAQ31B,EAAMc,EAAMiE,GACzBjE,EAAK0C,cACL,KACD6H,GAAYvK,GAASmgB,GAEfxhB,IAOT,IAAIm2B,IAAa,qCAEjBz3B,GAAOG,GAAGsC,QACT0c,KAAM,SAAUxc,EAAM2C,GACrB,MAAO8Y,GAAQjf,KAAMa,EAAOmf,KAAMxc,EAAM2C,EAAOtD,UAAUjB,OAAS,IAGnE22B,WAAY,SAAU/0B,GACrB,MAAOxD,MAAKsC,KAAK,iBACTtC,MAAMa,EAAOu3B,QAAS50B,IAAUA,QAK1C3C,EAAOyC,QACN80B,SACCI,MAAO,UACPC,QAAS,aAGVzY,KAAM,SAAUtd,EAAMc,EAAM2C,GAC3B,GAAIhE,GAAK+e,EAAOwX,EACfV,EAAQt1B,EAAKuC,QAGd,IAAMvC,GAAkB,IAAVs1B,GAAyB,IAAVA,GAAyB,IAAVA,EAY5C,MARAU,GAAmB,IAAVV,IAAgBn3B,EAAOgY,SAAUnW,GAErCg2B,IAEJl1B,EAAO3C,EAAOu3B,QAAS50B,IAAUA,EACjC0d,EAAQrgB,EAAOwxB,UAAW7uB,IAGZU,SAAViC,EACG+a,GAAS,OAASA,IAAoDhd,UAA1C/B,EAAM+e,EAAMnB,IAAKrd,EAAMyD,EAAO3C,IAChErB,EACEO,EAAMc,GAAS2C,EAGX+a,GAAS,OAASA,IAA6C,QAAnC/e,EAAM+e,EAAMnf,IAAKW,EAAMc,IACzDrB,EACAO,EAAMc,IAIT6uB,WACChe,UACCtS,IAAK,SAAUW,GACd,MAAOA,GAAKi2B,aAAc,aAAgBL,GAAW3rB,KAAMjK,EAAKuD,WAAcvD,EAAK0R,KAClF1R,EAAK2R,SACL,QAMC1T,EAAQ+2B,cACb72B,EAAOwxB,UAAU5d,UAChB1S,IAAK,SAAUW,GACd,GAAImM,GAASnM,EAAKmD,UAIlB,OAHKgJ,IAAUA,EAAOhJ,YACrBgJ,EAAOhJ,WAAW6O,cAEZ,QAKV7T,EAAOyB,MACN,WACA,WACA,YACA,cACA,cACA,UACA,UACA,SACA,cACA,mBACE,WACFzB,EAAOu3B,QAASp4B,KAAKkG,eAAkBlG,MAMxC,IAAI44B,IAAS,aAEb/3B,GAAOG,GAAGsC,QACTu1B,SAAU,SAAU1yB,GACnB,GAAI2yB,GAASp2B,EAAMuL,EAAK8qB,EAAO71B,EAAG81B,EACjCC,EAA2B,gBAAV9yB,IAAsBA,EACvCxD,EAAI,EACJM,EAAMjD,KAAK4B,MAEZ,IAAKf,EAAOkD,WAAYoC,GACvB,MAAOnG,MAAKsC,KAAK,SAAUY,GAC1BrC,EAAQb,MAAO64B,SAAU1yB,EAAMrE,KAAM9B,KAAMkD,EAAGlD,KAAKmP,aAIrD,IAAK8pB,EAIJ,IAFAH,GAAY3yB,GAAS,IAAK0F,MAAOqP,OAErBjY,EAAJN,EAASA,IAOhB,GANAD,EAAO1C,KAAM2C,GACbsL,EAAwB,IAAlBvL,EAAKuC,WAAoBvC,EAAKyM,WACjC,IAAMzM,EAAKyM,UAAY,KAAM7K,QAASs0B,GAAQ,KAChD,KAGU,CACV11B,EAAI,CACJ,OAAS61B,EAAQD,EAAQ51B,KACnB+K,EAAI3N,QAAS,IAAMy4B,EAAQ,KAAQ,IACvC9qB,GAAO8qB,EAAQ,IAKjBC,GAAan4B,EAAO2E,KAAMyI,GACrBvL,EAAKyM,YAAc6pB,IACvBt2B,EAAKyM,UAAY6pB,GAMrB,MAAOh5B,OAGRk5B,YAAa,SAAU/yB,GACtB,GAAI2yB,GAASp2B,EAAMuL,EAAK8qB,EAAO71B,EAAG81B,EACjCC,EAA+B,IAArBp2B,UAAUjB,QAAiC,gBAAVuE,IAAsBA,EACjExD,EAAI,EACJM,EAAMjD,KAAK4B,MAEZ,IAAKf,EAAOkD,WAAYoC,GACvB,MAAOnG,MAAKsC,KAAK,SAAUY,GAC1BrC,EAAQb,MAAOk5B,YAAa/yB,EAAMrE,KAAM9B,KAAMkD,EAAGlD,KAAKmP,aAGxD,IAAK8pB,EAGJ,IAFAH,GAAY3yB,GAAS,IAAK0F,MAAOqP,OAErBjY,EAAJN,EAASA,IAQhB,GAPAD,EAAO1C,KAAM2C,GAEbsL,EAAwB,IAAlBvL,EAAKuC,WAAoBvC,EAAKyM,WACjC,IAAMzM,EAAKyM,UAAY,KAAM7K,QAASs0B,GAAQ,KAChD,IAGU,CACV11B,EAAI,CACJ,OAAS61B,EAAQD,EAAQ51B,KAExB,MAAQ+K,EAAI3N,QAAS,IAAMy4B,EAAQ,MAAS,EAC3C9qB,EAAMA,EAAI3J,QAAS,IAAMy0B,EAAQ,IAAK,IAKxCC,GAAa7yB,EAAQtF,EAAO2E,KAAMyI,GAAQ,GACrCvL,EAAKyM,YAAc6pB,IACvBt2B,EAAKyM,UAAY6pB,GAMrB,MAAOh5B,OAGRm5B,YAAa,SAAUhzB,EAAOizB,GAC7B,GAAIx0B,SAAcuB,EAElB,OAAyB,iBAAbizB,IAAmC,WAATx0B,EAC9Bw0B,EAAWp5B,KAAK64B,SAAU1yB,GAAUnG,KAAKk5B,YAAa/yB,GAItDnG,KAAKsC,KADRzB,EAAOkD,WAAYoC,GACN,SAAUxD,GAC1B9B,EAAQb,MAAOm5B,YAAahzB,EAAMrE,KAAK9B,KAAM2C,EAAG3C,KAAKmP,UAAWiqB,GAAWA,IAI5D,WAChB,GAAc,WAATx0B,EAAoB,CAExB,GAAIuK,GACHxM,EAAI,EACJwW,EAAOtY,EAAQb,MACfq5B,EAAalzB,EAAM0F,MAAOqP,MAE3B,OAAS/L,EAAYkqB,EAAY12B,KAE3BwW,EAAKmgB,SAAUnqB,GACnBgK,EAAK+f,YAAa/pB,GAElBgK,EAAK0f,SAAU1pB,QAKNvK,IAASyd,GAAyB,YAATzd,KAC/B5E,KAAKmP,WAETkR,EAAUN,IAAK/f,KAAM,gBAAiBA,KAAKmP,WAO5CnP,KAAKmP,UAAYnP,KAAKmP,WAAahJ,KAAU,EAAQ,GAAKka,EAAUte,IAAK/B,KAAM,kBAAqB,OAKvGs5B,SAAU,SAAUx4B,GAInB,IAHA,GAAIqO,GAAY,IAAMrO,EAAW,IAChC6B,EAAI,EACJwX,EAAIna,KAAK4B,OACEuY,EAAJxX,EAAOA,IACd,GAA0B,IAArB3C,KAAK2C,GAAGsC,WAAmB,IAAMjF,KAAK2C,GAAGwM,UAAY,KAAK7K,QAAQs0B,GAAQ,KAAKt4B,QAAS6O,IAAe,EAC3G,OAAO,CAIT,QAAO,IAOT,IAAIoqB,IAAU,KAEd14B,GAAOG,GAAGsC,QACT0N,IAAK,SAAU7K,GACd,GAAI+a,GAAO/e,EAAK4B,EACfrB,EAAO1C,KAAK,EAEb,EAAA,GAAM6C,UAAUjB,OAsBhB,MAFAmC,GAAalD,EAAOkD,WAAYoC,GAEzBnG,KAAKsC,KAAK,SAAUK,GAC1B,GAAIqO,EAEmB,KAAlBhR,KAAKiF,WAKT+L,EADIjN,EACEoC,EAAMrE,KAAM9B,KAAM2C,EAAG9B,EAAQb,MAAOgR,OAEpC7K,EAIK,MAAP6K,EACJA,EAAM,GAEoB,gBAARA,GAClBA,GAAO,GAEInQ,EAAOoD,QAAS+M,KAC3BA,EAAMnQ,EAAO4B,IAAKuO,EAAK,SAAU7K,GAChC,MAAgB,OAATA,EAAgB,GAAKA,EAAQ,MAItC+a,EAAQrgB,EAAO24B,SAAUx5B,KAAK4E,OAAU/D,EAAO24B,SAAUx5B,KAAKiG,SAASC,eAGjEgb,GAAW,OAASA,IAA8Chd,SAApCgd,EAAMnB,IAAK/f,KAAMgR,EAAK,WACzDhR,KAAKmG,MAAQ6K,KAnDd,IAAKtO,EAGJ,MAFAwe,GAAQrgB,EAAO24B,SAAU92B,EAAKkC,OAAU/D,EAAO24B,SAAU92B,EAAKuD,SAASC,eAElEgb,GAAS,OAASA,IAAgDhd,UAAtC/B,EAAM+e,EAAMnf,IAAKW,EAAM,UAChDP,GAGRA,EAAMO,EAAKyD,MAEW,gBAARhE,GAEbA,EAAImC,QAAQi1B,GAAS,IAEd,MAAPp3B,EAAc,GAAKA,OA4CxBtB,EAAOyC,QACNk2B,UACCvQ,QACClnB,IAAK,SAAUW,GACd,GAAIsO,GAAMnQ,EAAO0O,KAAKwB,KAAMrO,EAAM,QAClC,OAAc,OAAPsO,EACNA,EAGAnQ,EAAO2E,KAAM3E,EAAO6E,KAAMhD,MAG7BkF,QACC7F,IAAK,SAAUW,GAYd,IAXA,GAAIyD,GAAO8iB,EACV1lB,EAAUb,EAAKa,QACf+W,EAAQ5X,EAAKgS,cACb4T,EAAoB,eAAd5lB,EAAKkC,MAAiC,EAAR0V,EACpC0D,EAASsK,EAAM,QACfuH,EAAMvH,EAAMhO,EAAQ,EAAI/W,EAAQ3B,OAChCe,EAAY,EAAR2X,EACHuV,EACAvH,EAAMhO,EAAQ,EAGJuV,EAAJltB,EAASA,IAIhB,GAHAsmB,EAAS1lB,EAASZ,MAGXsmB,EAAOxU,UAAY9R,IAAM2X,IAE5B3Z,EAAQg3B,YAAe1O,EAAO1U,SAAiD,OAAtC0U,EAAOrc,aAAc,cAC7Dqc,EAAOpjB,WAAW0O,UAAa1T,EAAOoF,SAAUgjB,EAAOpjB,WAAY,aAAiB,CAMxF,GAHAM,EAAQtF,EAAQooB,GAASjY,MAGpBsX,EACJ,MAAOniB,EAIR6X,GAAO3d,KAAM8F,GAIf,MAAO6X,IAGR+B,IAAK,SAAUrd,EAAMyD,GACpB,GAAIszB,GAAWxQ,EACd1lB,EAAUb,EAAKa,QACfya,EAASnd,EAAOwF,UAAWF,GAC3BxD,EAAIY,EAAQ3B,MAEb,OAAQe,IACPsmB,EAAS1lB,EAASZ,IACZsmB,EAAOxU,SAAW5T,EAAO2F,QAASyiB,EAAO9iB,MAAO6X,IAAY,KACjEyb,GAAY,EAQd,OAHMA,KACL/2B,EAAKgS,cAAgB,IAEfsJ,OAOXnd,EAAOyB,MAAO,QAAS,YAAc,WACpCzB,EAAO24B,SAAUx5B,OAChB+f,IAAK,SAAUrd,EAAMyD,GACpB,MAAKtF,GAAOoD,QAASkC,GACXzD,EAAK8R,QAAU3T,EAAO2F,QAAS3F,EAAO6B,GAAMsO,MAAO7K,IAAW,EADxE,SAKIxF,EAAQ82B,UACb52B,EAAO24B,SAAUx5B,MAAO+B,IAAM,SAAUW,GACvC,MAAsC,QAA/BA,EAAKkK,aAAa,SAAoB,KAAOlK,EAAKyD,UAW5DtF,EAAOyB,KAAM,0MAEqD+E,MAAM,KAAM,SAAU1E,EAAGa,GAG1F3C,EAAOG,GAAIwC,GAAS,SAAUyY,EAAMjb,GACnC,MAAO6B,WAAUjB,OAAS,EACzB5B,KAAKqoB,GAAI7kB,EAAM,KAAMyY,EAAMjb,GAC3BhB,KAAKukB,QAAS/gB,MAIjB3C,EAAOG,GAAGsC,QACTo2B,MAAO,SAAUC,EAAQC,GACxB,MAAO55B,MAAK6nB,WAAY8R,GAAS7R,WAAY8R,GAASD,IAGvDE,KAAM,SAAU7W,EAAO/G,EAAMjb,GAC5B,MAAOhB,MAAKqoB,GAAIrF,EAAO,KAAM/G,EAAMjb,IAEpC84B,OAAQ,SAAU9W,EAAOhiB,GACxB,MAAOhB,MAAK4e,IAAKoE,EAAO,KAAMhiB,IAG/B+4B,SAAU,SAAUj5B,EAAUkiB,EAAO/G,EAAMjb,GAC1C,MAAOhB,MAAKqoB,GAAIrF,EAAOliB,EAAUmb,EAAMjb,IAExCg5B,WAAY,SAAUl5B,EAAUkiB,EAAOhiB,GAEtC,MAA4B,KAArB6B,UAAUjB,OAAe5B,KAAK4e,IAAK9d,EAAU,MAASd,KAAK4e,IAAKoE,EAAOliB,GAAY,KAAME,KAKlG,IAAIi5B,IAAQp5B,EAAOsG,MAEf+yB,GAAS,IAMbr5B,GAAO6f,UAAY,SAAUzE,GAC5B,MAAOke,MAAKC,MAAOne,EAAO,KAK3Bpb,EAAOw5B,SAAW,SAAUpe,GAC3B,GAAIpJ,GAAK3L,CACT,KAAM+U,GAAwB,gBAATA,GACpB,MAAO,KAIR,KACC/U,EAAM,GAAIozB,WACVznB,EAAM3L,EAAIqzB,gBAAiBte,EAAM,YAChC,MAAQvQ,GACTmH,EAAM3O,OAMP,QAHM2O,GAAOA,EAAIrG,qBAAsB,eAAgB5K,SACtDf,EAAO2D,MAAO,gBAAkByX,GAE1BpJ,EAIR,IACC2nB,IAAQ,OACRC,GAAM,gBACNC,GAAW,6BAEXC,GAAiB,4DACjBC,GAAa,iBACbC,GAAY,QACZC,GAAO,4DAWPC,MAOAC,MAGAC,GAAW,KAAK76B,OAAQ,KAGxB86B,GAAen7B,EAAOgU,SAASK,KAG/B+mB,GAAeL,GAAKzuB,KAAM6uB,GAAah1B,kBAGxC,SAASk1B,IAA6BC,GAGrC,MAAO,UAAUC,EAAoB7e,GAED,gBAAvB6e,KACX7e,EAAO6e,EACPA,EAAqB,IAGtB,IAAIC,GACH54B,EAAI,EACJ64B,EAAYF,EAAmBp1B,cAAc2F,MAAOqP,MAErD,IAAKra,EAAOkD,WAAY0Y,GAEvB,MAAS8e,EAAWC,EAAU74B,KAER,MAAhB44B,EAAS,IACbA,EAAWA,EAASp7B,MAAO,IAAO,KACjCk7B,EAAWE,GAAaF,EAAWE,QAAkB3qB,QAAS6L,KAI9D4e,EAAWE,GAAaF,EAAWE,QAAkBl7B,KAAMoc,IAQjE,QAASgf,IAA+BJ,EAAW93B,EAASgyB,EAAiBmG,GAE5E,GAAIC,MACHC,EAAqBP,IAAcL,EAEpC,SAASa,GAASN,GACjB,GAAI9mB,EAYJ,OAXAknB,GAAWJ,IAAa,EACxB16B,EAAOyB,KAAM+4B,EAAWE,OAAkB,SAAUrwB,EAAG4wB,GACtD,GAAIC,GAAsBD,EAAoBv4B,EAASgyB,EAAiBmG,EACxE,OAAoC,gBAAxBK,IAAqCH,GAAqBD,EAAWI,GAIrEH,IACDnnB,EAAWsnB,GADf,QAHNx4B,EAAQi4B,UAAU5qB,QAASmrB,GAC3BF,EAASE,IACF,KAKFtnB,EAGR,MAAOonB,GAASt4B,EAAQi4B,UAAW,MAAUG,EAAW,MAASE,EAAS,KAM3E,QAASG,IAAYn4B,EAAQJ,GAC5B,GAAI6J,GAAKxJ,EACRm4B,EAAcp7B,EAAOq7B,aAAaD,eAEnC,KAAM3uB,IAAO7J,GACQS,SAAfT,EAAK6J,MACP2uB,EAAa3uB,GAAQzJ,EAAWC,IAASA,OAAgBwJ,GAAQ7J,EAAK6J,GAO1E,OAJKxJ,IACJjD,EAAOyC,QAAQ,EAAMO,EAAQC,GAGvBD,EAOR,QAASs4B,IAAqBC,EAAGV,EAAOW,GAEvC,GAAIC,GAAI13B,EAAM23B,EAAeC,EAC5B7iB,EAAWyiB,EAAEziB,SACb6hB,EAAYY,EAAEZ,SAGf,OAA2B,MAAnBA,EAAW,GAClBA,EAAUhuB,QACEtJ,SAAPo4B,IACJA,EAAKF,EAAEK,UAAYf,EAAMgB,kBAAkB,gBAK7C,IAAKJ,EACJ,IAAM13B,IAAQ+U,GACb,GAAKA,EAAU/U,IAAU+U,EAAU/U,GAAO+H,KAAM2vB,GAAO,CACtDd,EAAU5qB,QAAShM,EACnB,OAMH,GAAK42B,EAAW,IAAOa,GACtBE,EAAgBf,EAAW,OACrB,CAEN,IAAM52B,IAAQy3B,GAAY,CACzB,IAAMb,EAAW,IAAOY,EAAEO,WAAY/3B,EAAO,IAAM42B,EAAU,IAAO,CACnEe,EAAgB33B,CAChB,OAEK43B,IACLA,EAAgB53B,GAIlB23B,EAAgBA,GAAiBC,EAMlC,MAAKD,IACCA,IAAkBf,EAAW,IACjCA,EAAU5qB,QAAS2rB,GAEbF,EAAWE,IAJnB,OAWD,QAASK,IAAaR,EAAGS,EAAUnB,EAAOoB,GACzC,GAAIC,GAAOC,EAASC,EAAM/1B,EAAK2S,EAC9B8iB,KAEAnB,EAAYY,EAAEZ,UAAUr7B,OAGzB,IAAKq7B,EAAW,GACf,IAAMyB,IAAQb,GAAEO,WACfA,EAAYM,EAAK/2B,eAAkBk2B,EAAEO,WAAYM,EAInDD,GAAUxB,EAAUhuB,OAGpB,OAAQwvB,EAcP,GAZKZ,EAAEc,eAAgBF,KACtBtB,EAAOU,EAAEc,eAAgBF,IAAcH,IAIlChjB,GAAQijB,GAAaV,EAAEe,aAC5BN,EAAWT,EAAEe,WAAYN,EAAUT,EAAEb,WAGtC1hB,EAAOmjB,EACPA,EAAUxB,EAAUhuB,QAKnB,GAAiB,MAAZwvB,EAEJA,EAAUnjB,MAGJ,IAAc,MAATA,GAAgBA,IAASmjB,EAAU,CAM9C,GAHAC,EAAON,EAAY9iB,EAAO,IAAMmjB,IAAaL,EAAY,KAAOK,IAG1DC,EACL,IAAMF,IAASJ,GAId,GADAz1B,EAAM61B,EAAM11B,MAAO,KACdH,EAAK,KAAQ81B,IAGjBC,EAAON,EAAY9iB,EAAO,IAAM3S,EAAK,KACpCy1B,EAAY,KAAOz1B,EAAK,KACb,CAEN+1B,KAAS,EACbA,EAAON,EAAYI,GAGRJ,EAAYI,MAAY,IACnCC,EAAU91B,EAAK,GACfs0B,EAAU5qB,QAAS1J,EAAK,IAEzB,OAOJ,GAAK+1B,KAAS,EAGb,GAAKA,GAAQb,EAAG,UACfS,EAAWI,EAAMJ,OAEjB,KACCA,EAAWI,EAAMJ,GAChB,MAAQnxB,GACT,OAASiR,MAAO,cAAenY,MAAOy4B,EAAOvxB,EAAI,sBAAwBmO,EAAO,OAASmjB,IAQ/F,OAASrgB,MAAO,UAAWV,KAAM4gB,GAGlCh8B,EAAOyC,QAGN85B,OAAQ,EAGRC,gBACAC,QAEApB,cACCqB,IAAKrC,GACLt2B,KAAM,MACN44B,QAAS7C,GAAehuB,KAAMwuB,GAAc,IAC5C37B,QAAQ,EACRi+B,aAAa,EACbC,OAAO,EACPC,YAAa,mDAabhe,SACC+T,IAAKuH,GACLv1B,KAAM,aACNmmB,KAAM,YACNhZ,IAAK,4BACL+qB,KAAM,qCAGPjkB,UACC9G,IAAK,MACLgZ,KAAM,OACN+R,KAAM,QAGPV,gBACCrqB,IAAK,cACLnN,KAAM,eACNk4B,KAAM,gBAKPjB,YAGCkB,SAAUvyB,OAGVwyB,aAAa,EAGbC,YAAal9B,EAAO6f,UAGpBsd,WAAYn9B,EAAOw5B,UAOpB4B,aACCsB,KAAK,EACLx8B,SAAS,IAOXk9B,UAAW,SAAUp6B,EAAQq6B,GAC5B,MAAOA,GAGNlC,GAAYA,GAAYn4B,EAAQhD,EAAOq7B,cAAgBgC,GAGvDlC,GAAYn7B,EAAOq7B,aAAcr4B,IAGnCs6B,cAAe/C,GAA6BL,IAC5CqD,cAAehD,GAA6BJ,IAG5CqD,KAAM,SAAUd,EAAKh6B,GAGA,gBAARg6B,KACXh6B,EAAUg6B,EACVA,EAAMr5B,QAIPX,EAAUA,KAEV,IAAI+6B,GAEHC,EAEAC,EACAC,EAEAC,EAEA3M,EAEA4M,EAEAh8B,EAEAy5B,EAAIv7B,EAAOo9B,aAAe16B,GAE1Bq7B,EAAkBxC,EAAEr7B,SAAWq7B,EAE/ByC,EAAqBzC,EAAEr7B,UAAa69B,EAAgB35B,UAAY25B,EAAgBl9B,QAC/Eb,EAAQ+9B,GACR/9B,EAAOkiB,MAERjG,EAAWjc,EAAO2b,WAClBsiB,EAAmBj+B,EAAO0a,UAAU,eAEpCwjB,EAAa3C,EAAE2C,eAEfC,KACAC,KAEAtiB,EAAQ,EAERuiB,EAAW,WAEXxD,GACC3c,WAAY,EAGZ2d,kBAAmB,SAAUpvB,GAC5B,GAAIzB,EACJ,IAAe,IAAV8Q,EAAc,CAClB,IAAM8hB,EAAkB,CACvBA,IACA,OAAS5yB,EAAQ6uB,GAASruB,KAAMmyB,GAC/BC,EAAiB5yB,EAAM,GAAG3F,eAAkB2F,EAAO,GAGrDA,EAAQ4yB,EAAiBnxB,EAAIpH,eAE9B,MAAgB,OAAT2F,EAAgB,KAAOA,GAI/BszB,sBAAuB,WACtB,MAAiB,KAAVxiB,EAAc6hB,EAAwB,MAI9CY,iBAAkB,SAAU57B,EAAM2C,GACjC,GAAIk5B,GAAQ77B,EAAK0C,aAKjB,OAJMyW,KACLnZ,EAAOy7B,EAAqBI,GAAUJ,EAAqBI,IAAW77B,EACtEw7B,EAAgBx7B,GAAS2C,GAEnBnG,MAIRs/B,iBAAkB,SAAU16B,GAI3B,MAHM+X,KACLyf,EAAEK,SAAW73B,GAEP5E,MAIR++B,WAAY,SAAUt8B,GACrB,GAAI2C,EACJ,IAAK3C,EACJ,GAAa,EAARka,EACJ,IAAMvX,IAAQ3C,GAEbs8B,EAAY35B,IAAW25B,EAAY35B,GAAQ3C,EAAK2C,QAIjDs2B,GAAM7e,OAAQpa,EAAKi5B,EAAM6D,QAG3B,OAAOv/B,OAIRw/B,MAAO,SAAUC,GAChB,GAAIC,GAAYD,GAAcP,CAK9B,OAJKZ,IACJA,EAAUkB,MAAOE,GAElBl3B,EAAM,EAAGk3B,GACF1/B,MAyCV,IApCA8c,EAASF,QAAS8e,GAAQ/F,SAAWmJ,EAAiBtkB,IACtDkhB,EAAMiE,QAAUjE,EAAMlzB,KACtBkzB,EAAMl3B,MAAQk3B,EAAM3e,KAMpBqf,EAAEmB,MAAUA,GAAOnB,EAAEmB,KAAOrC,IAAiB,IAAK52B,QAASk2B,GAAO,IAChEl2B,QAASu2B,GAAWM,GAAc,GAAM,MAG1CiB,EAAEx3B,KAAOrB,EAAQq8B,QAAUr8B,EAAQqB,MAAQw3B,EAAEwD,QAAUxD,EAAEx3B,KAGzDw3B,EAAEZ,UAAY36B,EAAO2E,KAAM42B,EAAEb,UAAY,KAAMr1B,cAAc2F,MAAOqP,KAAiB,IAG/D,MAAjBkhB,EAAEyD,cACN9N,EAAQ+I,GAAKzuB,KAAM+vB,EAAEmB,IAAIr3B,eACzBk2B,EAAEyD,eAAkB9N,GACjBA,EAAO,KAAQoJ,GAAc,IAAOpJ,EAAO,KAAQoJ,GAAc,KAChEpJ,EAAO,KAAwB,UAAfA,EAAO,GAAkB,KAAO,WAC/CoJ,GAAc,KAA+B,UAAtBA,GAAc,GAAkB,KAAO,UAK/DiB,EAAEngB,MAAQmgB,EAAEqB,aAAiC,gBAAXrB,GAAEngB,OACxCmgB,EAAEngB,KAAOpb,EAAOi/B,MAAO1D,EAAEngB,KAAMmgB,EAAE2D,cAIlCtE,GAA+BV,GAAYqB,EAAG74B,EAASm4B,GAGxC,IAAV/e,EACJ,MAAO+e,EAKRiD,GAAc99B,EAAOkiB,OAASqZ,EAAE58B,OAG3Bm/B,GAAmC,IAApB99B,EAAOu8B,UAC1Bv8B,EAAOkiB,MAAMwB,QAAQ,aAItB6X,EAAEx3B,KAAOw3B,EAAEx3B,KAAKpD,cAGhB46B,EAAE4D,YAAcpF,GAAWjuB,KAAMyvB,EAAEx3B,MAInC25B,EAAWnC,EAAEmB,IAGPnB,EAAE4D,aAGF5D,EAAEngB,OACNsiB,EAAanC,EAAEmB,MAASrD,GAAOvtB,KAAM4xB,GAAa,IAAM,KAAQnC,EAAEngB,WAE3DmgB,GAAEngB,MAILmgB,EAAE/uB,SAAU,IAChB+uB,EAAEmB,IAAM9C,GAAI9tB,KAAM4xB,GAGjBA,EAASj6B,QAASm2B,GAAK,OAASR,MAGhCsE,GAAarE,GAAOvtB,KAAM4xB,GAAa,IAAM,KAAQ,KAAOtE,OAK1DmC,EAAE6D,aACDp/B,EAAOw8B,aAAckB,IACzB7C,EAAM0D,iBAAkB,oBAAqBv+B,EAAOw8B,aAAckB,IAE9D19B,EAAOy8B,KAAMiB,IACjB7C,EAAM0D,iBAAkB,gBAAiBv+B,EAAOy8B,KAAMiB,MAKnDnC,EAAEngB,MAAQmgB,EAAE4D,YAAc5D,EAAEuB,eAAgB,GAASp6B,EAAQo6B,cACjEjC,EAAM0D,iBAAkB,eAAgBhD,EAAEuB,aAI3CjC,EAAM0D,iBACL,SACAhD,EAAEZ,UAAW,IAAOY,EAAEzc,QAASyc,EAAEZ,UAAU,IAC1CY,EAAEzc,QAASyc,EAAEZ,UAAU,KAA8B,MAArBY,EAAEZ,UAAW,GAAc,KAAOP,GAAW,WAAa,IAC1FmB,EAAEzc,QAAS,KAIb,KAAMhd,IAAKy5B,GAAE8D,QACZxE,EAAM0D,iBAAkBz8B,EAAGy5B,EAAE8D,QAASv9B,GAIvC,IAAKy5B,EAAE+D,aAAgB/D,EAAE+D,WAAWr+B,KAAM88B,EAAiBlD,EAAOU,MAAQ,GAAmB,IAAVzf,GAElF,MAAO+e,GAAM8D,OAIdN,GAAW,OAGX,KAAMv8B,KAAOg9B,QAAS,EAAGn7B,MAAO,EAAGmxB,SAAU,GAC5C+F,EAAO/4B,GAAKy5B,EAAGz5B,GAOhB,IAHA27B,EAAY7C,GAA+BT,GAAYoB,EAAG74B,EAASm4B,GAK5D,CACNA,EAAM3c,WAAa,EAGd4f,GACJE,EAAmBta,QAAS,YAAcmX,EAAOU,IAG7CA,EAAEsB,OAAStB,EAAE7E,QAAU,IAC3BmH,EAAe1f,WAAW,WACzB0c,EAAM8D,MAAM,YACVpD,EAAE7E,SAGN,KACC5a,EAAQ,EACR2hB,EAAU8B,KAAMpB,EAAgBx2B,GAC/B,MAAQkD,GAET,KAAa,EAARiR,GAIJ,KAAMjR,EAHNlD,GAAM,GAAIkD,QArBZlD,GAAM,GAAI,eA8BX,SAASA,GAAM+2B,EAAQc,EAAkBhE,EAAW6D,GACnD,GAAIpD,GAAW6C,EAASn7B,EAAOq4B,EAAUyD,EACxCb,EAAaY,CAGC,KAAV1jB,IAKLA,EAAQ,EAGH+hB,GACJlH,aAAckH,GAKfJ,EAAYp6B,OAGZs6B,EAAwB0B,GAAW,GAGnCxE,EAAM3c,WAAawgB,EAAS,EAAI,EAAI,EAGpCzC,EAAYyC,GAAU,KAAgB,IAATA,GAA2B,MAAXA,EAGxClD,IACJQ,EAAWV,GAAqBC,EAAGV,EAAOW,IAI3CQ,EAAWD,GAAaR,EAAGS,EAAUnB,EAAOoB,GAGvCA,GAGCV,EAAE6D,aACNK,EAAW5E,EAAMgB,kBAAkB,iBAC9B4D,IACJz/B,EAAOw8B,aAAckB,GAAa+B,GAEnCA,EAAW5E,EAAMgB,kBAAkB,QAC9B4D,IACJz/B,EAAOy8B,KAAMiB,GAAa+B,IAKZ,MAAXf,GAA6B,SAAXnD,EAAEx3B,KACxB66B,EAAa,YAGS,MAAXF,EACXE,EAAa,eAIbA,EAAa5C,EAASlgB,MACtBgjB,EAAU9C,EAAS5gB,KACnBzX,EAAQq4B,EAASr4B,MACjBs4B,GAAat4B,KAIdA,EAAQi7B,GACHF,IAAWE,KACfA,EAAa,QACC,EAATF,IACJA,EAAS,KAMZ7D,EAAM6D,OAASA,EACf7D,EAAM+D,YAAeY,GAAoBZ,GAAe,GAGnD3C,EACJhgB,EAASqB,YAAaygB,GAAmBe,EAASF,EAAY/D,IAE9D5e,EAAS2Y,WAAYmJ,GAAmBlD,EAAO+D,EAAYj7B,IAI5Dk3B,EAAMqD,WAAYA,GAClBA,EAAa76B,OAERy6B,GACJE,EAAmBta,QAASuY,EAAY,cAAgB,aACrDpB,EAAOU,EAAGU,EAAY6C,EAAUn7B,IAIpCs6B,EAAiBviB,SAAUqiB,GAAmBlD,EAAO+D,IAEhDd,IACJE,EAAmBta,QAAS,gBAAkBmX,EAAOU,MAE3Cv7B,EAAOu8B,QAChBv8B,EAAOkiB,MAAMwB,QAAQ,cAKxB,MAAOmX,IAGR6E,QAAS,SAAUhD,EAAKthB,EAAM1Z,GAC7B,MAAO1B,GAAOkB,IAAKw7B,EAAKthB,EAAM1Z,EAAU,SAGzCi+B,UAAW,SAAUjD,EAAKh7B,GACzB,MAAO1B,GAAOkB,IAAKw7B,EAAKr5B,OAAW3B,EAAU,aAI/C1B,EAAOyB,MAAQ,MAAO,QAAU,SAAUK,EAAGi9B,GAC5C/+B,EAAQ++B,GAAW,SAAUrC,EAAKthB,EAAM1Z,EAAUqC,GAQjD,MANK/D,GAAOkD,WAAYkY,KACvBrX,EAAOA,GAAQrC,EACfA,EAAW0Z,EACXA,EAAO/X,QAGDrD,EAAOw9B,MACbd,IAAKA,EACL34B,KAAMg7B,EACNrE,SAAU32B,EACVqX,KAAMA,EACN0jB,QAASp9B,OAMZ1B,EAAOsrB,SAAW,SAAUoR,GAC3B,MAAO18B,GAAOw9B,MACbd,IAAKA,EACL34B,KAAM,MACN22B,SAAU,SACVmC,OAAO,EACPl+B,QAAQ,EACRihC,UAAU,KAKZ5/B,EAAOG,GAAGsC,QACTo9B,QAAS,SAAU7U,GAClB,GAAIX,EAEJ,OAAKrqB,GAAOkD,WAAY8nB,GAChB7rB,KAAKsC,KAAK,SAAUK,GAC1B9B,EAAQb,MAAO0gC,QAAS7U,EAAK/pB,KAAK9B,KAAM2C,OAIrC3C,KAAM,KAGVkrB,EAAOrqB,EAAQgrB,EAAM7rB,KAAM,GAAIoM,eAAgBrJ,GAAI,GAAIa,OAAO,GAEzD5D,KAAM,GAAI6F,YACdqlB,EAAKO,aAAczrB,KAAM,IAG1BkrB,EAAKzoB,IAAI,WACR,GAAIC,GAAO1C,IAEX,OAAQ0C,EAAKi+B,kBACZj+B,EAAOA,EAAKi+B,iBAGb,OAAOj+B,KACL4oB,OAAQtrB,OAGLA,OAGR4gC,UAAW,SAAU/U,GACpB,MACQ7rB,MAAKsC,KADRzB,EAAOkD,WAAY8nB,GACN,SAAUlpB,GAC1B9B,EAAQb,MAAO4gC,UAAW/U,EAAK/pB,KAAK9B,KAAM2C,KAI3B,WAChB,GAAIwW,GAAOtY,EAAQb,MAClB2Z,EAAWR,EAAKQ,UAEZA,GAAS/X,OACb+X,EAAS+mB,QAAS7U,GAGlB1S,EAAKmS,OAAQO,MAKhBX,KAAM,SAAUW,GACf,GAAI9nB,GAAalD,EAAOkD,WAAY8nB,EAEpC,OAAO7rB,MAAKsC,KAAK,SAAUK,GAC1B9B,EAAQb,MAAO0gC,QAAS38B,EAAa8nB,EAAK/pB,KAAK9B,KAAM2C,GAAKkpB,MAI5DgV,OAAQ,WACP,MAAO7gC,MAAK6O,SAASvM,KAAK,WACnBzB,EAAOoF,SAAUjG,KAAM,SAC5Ba,EAAQb,MAAO8rB,YAAa9rB,KAAKyL,cAEhCtI,SAKLtC,EAAOgQ,KAAK4E,QAAQ+a,OAAS,SAAU9tB,GAGtC,MAAOA,GAAK0tB,aAAe,GAAK1tB,EAAK2tB,cAAgB,GAEtDxvB,EAAOgQ,KAAK4E,QAAQqrB,QAAU,SAAUp+B,GACvC,OAAQ7B,EAAOgQ,KAAK4E,QAAQ+a,OAAQ9tB,GAMrC,IAAIq+B,IAAM,OACTC,GAAW,QACXC,GAAQ,SACRC,GAAkB,wCAClBC,GAAe,oCAEhB,SAASC,IAAazP,EAAQhtB,EAAKo7B,EAAavlB,GAC/C,GAAIhX,EAEJ,IAAK3C,EAAOoD,QAASU,GAEpB9D,EAAOyB,KAAMqC,EAAK,SAAUhC,EAAG0+B,GACzBtB,GAAeiB,GAASr0B,KAAMglB,GAElCnX,EAAKmX,EAAQ0P,GAIbD,GAAazP,EAAS,KAAqB,gBAAN0P,GAAiB1+B,EAAI,IAAO,IAAK0+B,EAAGtB,EAAavlB,SAIlF,IAAMulB,GAAsC,WAAvBl/B,EAAO+D,KAAMD,GAQxC6V,EAAKmX,EAAQhtB,OANb,KAAMnB,IAAQmB,GACby8B,GAAazP,EAAS,IAAMnuB,EAAO,IAAKmB,EAAKnB,GAAQu8B,EAAavlB,GAWrE3Z,EAAOi/B,MAAQ,SAAUh3B,EAAGi3B,GAC3B,GAAIpO,GACHyK,KACA5hB,EAAM,SAAUlN,EAAKnH,GAEpBA,EAAQtF,EAAOkD,WAAYoC,GAAUA,IAAqB,MAATA,EAAgB,GAAKA,EACtEi2B,EAAGA,EAAEx6B,QAAW0/B,mBAAoBh0B,GAAQ,IAAMg0B,mBAAoBn7B,GASxE,IALqBjC,SAAhB67B,IACJA,EAAcl/B,EAAOq7B,cAAgBr7B,EAAOq7B,aAAa6D,aAIrDl/B,EAAOoD,QAAS6E,IAASA,EAAEpH,SAAWb,EAAOmD,cAAe8E,GAEhEjI,EAAOyB,KAAMwG,EAAG,WACf0R,EAAKxa,KAAKwD,KAAMxD,KAAKmG,aAMtB,KAAMwrB,IAAU7oB,GACfs4B,GAAazP,EAAQ7oB,EAAG6oB,GAAUoO,EAAavlB,EAKjD,OAAO4hB,GAAEpvB,KAAM,KAAM1I,QAASy8B,GAAK,MAGpClgC,EAAOG,GAAGsC,QACTi+B,UAAW,WACV,MAAO1gC,GAAOi/B,MAAO9/B,KAAKwhC,mBAE3BA,eAAgB,WACf,MAAOxhC,MAAKyC,IAAI,WAEf,GAAIqO,GAAWjQ,EAAOmf,KAAMhgB,KAAM,WAClC,OAAO8Q,GAAWjQ,EAAOwF,UAAWyK,GAAa9Q,OAEjDwP,OAAO,WACP,GAAI5K,GAAO5E,KAAK4E,IAGhB,OAAO5E,MAAKwD,OAAS3C,EAAQb,MAAOoZ,GAAI,cACvC+nB,GAAax0B,KAAM3M,KAAKiG,YAAei7B,GAAgBv0B,KAAM/H,KAC3D5E,KAAKwU,UAAYuN,EAAepV,KAAM/H,MAEzCnC,IAAI,SAAUE,EAAGD,GACjB,GAAIsO,GAAMnQ,EAAQb,MAAOgR,KAEzB,OAAc,OAAPA,EACN,KACAnQ,EAAOoD,QAAS+M,GACfnQ,EAAO4B,IAAKuO,EAAK,SAAUA,GAC1B,OAASxN,KAAMd,EAAKc,KAAM2C,MAAO6K,EAAI1M,QAAS28B,GAAO,YAEpDz9B,KAAMd,EAAKc,KAAM2C,MAAO6K,EAAI1M,QAAS28B,GAAO,WAC9Cl/B,SAKLlB,EAAOq7B,aAAauF,IAAM,WACzB,IACC,MAAO,IAAIC,gBACV,MAAOh2B,KAGV,IAAIi2B,IAAQ,EACXC,MACAC,IAEC,EAAG,IAGHC,KAAM,KAEPC,GAAelhC,EAAOq7B,aAAauF,KAK/B1hC,GAAOmP,aACXnP,EAAOmP,YAAa,WAAY,WAC/B,IAAM,GAAI5B,KAAOs0B,IAChBA,GAAct0B,OAKjB3M,EAAQqhC,OAASD,IAAkB,mBAAqBA,IACxDphC,EAAQ09B,KAAO0D,KAAiBA,GAEhClhC,EAAOu9B,cAAc,SAAU76B,GAC9B,GAAIhB,EAGJ,OAAK5B,GAAQqhC,MAAQD,KAAiBx+B,EAAQs8B,aAE5CO,KAAM,SAAUF,EAASvK,GACxB,GAAIhzB,GACH8+B,EAAMl+B,EAAQk+B,MACdl1B,IAAOo1B,EAKR,IAHAF,EAAIQ,KAAM1+B,EAAQqB,KAAMrB,EAAQg6B,IAAKh6B,EAAQm6B,MAAOn6B,EAAQ2+B,SAAU3+B,EAAQ8R,UAGzE9R,EAAQ4+B,UACZ,IAAMx/B,IAAKY,GAAQ4+B,UAClBV,EAAK9+B,GAAMY,EAAQ4+B,UAAWx/B,EAK3BY,GAAQk5B,UAAYgF,EAAInC,kBAC5BmC,EAAInC,iBAAkB/7B,EAAQk5B,UAQzBl5B,EAAQs8B,aAAgBK,EAAQ,sBACrCA,EAAQ,oBAAsB,iBAI/B,KAAMv9B,IAAKu9B,GACVuB,EAAIrC,iBAAkBz8B,EAAGu9B,EAASv9B,GAInCJ,GAAW,SAAUqC,GACpB,MAAO,YACDrC,UACGq/B,IAAcr1B,GACrBhK,EAAWk/B,EAAIW,OAASX,EAAIY,QAAU,KAExB,UAATz9B,EACJ68B,EAAIjC,QACgB,UAAT56B,EACX+wB,EAEC8L,EAAIlC,OACJkC,EAAIhC,YAGL9J,EACCkM,GAAkBJ,EAAIlC,SAAYkC,EAAIlC,OACtCkC,EAAIhC,WAIwB,gBAArBgC,GAAIa,cACV58B,KAAM+7B,EAAIa,cACPp+B,OACJu9B,EAAItC,4BAQTsC,EAAIW,OAAS7/B,IACbk/B,EAAIY,QAAU9/B,EAAS,SAGvBA,EAAWq/B,GAAcr1B,GAAOhK,EAAS,QAEzC,KAECk/B,EAAIrB,KAAM78B,EAAQy8B,YAAcz8B,EAAQ0Y,MAAQ,MAC/C,MAAQvQ,GAET,GAAKnJ,EACJ,KAAMmJ,KAKT8zB,MAAO,WACDj9B,GACJA,MAvFJ,SAkGD1B,EAAOo9B,WACNte,SACCta,OAAQ,6FAETsU,UACCtU,OAAQ,uBAETs3B,YACC4F,cAAe,SAAU78B,GAExB,MADA7E,GAAOsE,WAAYO,GACZA,MAMV7E,EAAOs9B,cAAe,SAAU,SAAU/B,GACxBl4B,SAAZk4B,EAAE/uB,QACN+uB,EAAE/uB,OAAQ,GAEN+uB,EAAEyD,cACNzD,EAAEx3B,KAAO,SAKX/D,EAAOu9B,cAAe,SAAU,SAAUhC,GAEzC,GAAKA,EAAEyD,YAAc,CACpB,GAAIx6B,GAAQ9C,CACZ,QACC69B,KAAM,SAAUl1B,EAAGyqB,GAClBtwB,EAASxE,EAAO,YAAYmf,MAC3B0d,OAAO,EACP8E,QAASpG,EAAEqG,cACXh/B,IAAK24B,EAAEmB,MACLlV,GACF,aACA9lB,EAAW,SAAUmgC,GACpBr9B,EAAO+W,SACP7Z,EAAW,KACNmgC,GACJ/M,EAAuB,UAAb+M,EAAI99B,KAAmB,IAAM,IAAK89B,EAAI99B,QAInDhF,EAAS+F,KAAKC,YAAaP,EAAQ,KAEpCm6B,MAAO,WACDj9B,GACJA,QAUL,IAAIogC,OACHC,GAAS,mBAGV/hC,GAAOo9B,WACN4E,MAAO,WACPC,cAAe,WACd,GAAIvgC,GAAWogC,GAAa15B,OAAWpI,EAAOsD,QAAU,IAAQ81B,IAEhE,OADAj6B,MAAMuC,IAAa,EACZA,KAKT1B,EAAOs9B,cAAe,aAAc,SAAU/B,EAAG2G,EAAkBrH,GAElE,GAAIsH,GAAcC,EAAaC,EAC9BC,EAAW/G,EAAEyG,SAAU,IAAWD,GAAOj2B,KAAMyvB,EAAEmB,KAChD,MACkB,gBAAXnB,GAAEngB,QAAwBmgB,EAAEuB,aAAe,IAAKr9B,QAAQ,sCAAwCsiC,GAAOj2B,KAAMyvB,EAAEngB,OAAU,OAIlI,OAAKknB,IAAiC,UAArB/G,EAAEZ,UAAW,IAG7BwH,EAAe5G,EAAE0G,cAAgBjiC,EAAOkD,WAAYq4B,EAAE0G,eACrD1G,EAAE0G,gBACF1G,EAAE0G,cAGEK,EACJ/G,EAAG+G,GAAa/G,EAAG+G,GAAW7+B,QAASs+B,GAAQ,KAAOI,GAC3C5G,EAAEyG,SAAU,IACvBzG,EAAEmB,MAASrD,GAAOvtB,KAAMyvB,EAAEmB,KAAQ,IAAM,KAAQnB,EAAEyG,MAAQ,IAAMG,GAIjE5G,EAAEO,WAAW,eAAiB,WAI7B,MAHMuG,IACLriC,EAAO2D,MAAOw+B,EAAe,mBAEvBE,EAAmB,IAI3B9G,EAAEZ,UAAW,GAAM,OAGnByH,EAAcljC,EAAQijC,GACtBjjC,EAAQijC,GAAiB,WACxBE,EAAoBrgC,WAIrB64B,EAAM7e,OAAO,WAEZ9c,EAAQijC,GAAiBC,EAGpB7G,EAAG4G,KAEP5G,EAAE0G,cAAgBC,EAAiBD,cAGnCH,GAAatiC,KAAM2iC,IAIfE,GAAqBriC,EAAOkD,WAAYk/B,IAC5CA,EAAaC,EAAmB,IAGjCA,EAAoBD,EAAc/+B,SAI5B,UAtDR,SAgEDrD,EAAOyY,UAAY,SAAU2C,EAAMlb,EAASqiC,GAC3C,IAAMnnB,GAAwB,gBAATA,GACpB,MAAO,KAEgB,kBAAZlb,KACXqiC,EAAcriC,EACdA,GAAU,GAEXA,EAAUA,GAAWnB,CAErB,IAAIyjC,GAAStqB,EAAW1M,KAAM4P,GAC7B+O,GAAWoY,KAGZ,OAAKC,IACKtiC,EAAQ0E,cAAe49B,EAAO,MAGxCA,EAASxiC,EAAOkqB,eAAiB9O,GAAQlb,EAASiqB,GAE7CA,GAAWA,EAAQppB,QACvBf,EAAQmqB,GAAU5O,SAGZvb,EAAOuB,SAAWihC,EAAO53B,aAKjC,IAAI63B,IAAQziC,EAAOG,GAAGkmB,IAKtBrmB,GAAOG,GAAGkmB,KAAO,SAAUqW,EAAKgG,EAAQhhC,GACvC,GAAoB,gBAARg7B,IAAoB+F,GAC/B,MAAOA,IAAM1gC,MAAO5C,KAAM6C,UAG3B,IAAI/B,GAAU8D,EAAMi4B,EACnB1jB,EAAOnZ,KACP4e,EAAM2e,EAAIj9B,QAAQ,IA+CnB,OA7CKse,IAAO,IACX9d,EAAWD,EAAO2E,KAAM+3B,EAAIp9B,MAAOye,IACnC2e,EAAMA,EAAIp9B,MAAO,EAAGye,IAIhB/d,EAAOkD,WAAYw/B,IAGvBhhC,EAAWghC,EACXA,EAASr/B,QAGEq/B,GAA4B,gBAAXA,KAC5B3+B,EAAO,QAIHuU,EAAKvX,OAAS,GAClBf,EAAOw9B,MACNd,IAAKA,EAGL34B,KAAMA,EACN22B,SAAU,OACVtf,KAAMsnB,IACJ/6B,KAAK,SAAU85B,GAGjBzF,EAAWh6B,UAEXsW,EAAK0S,KAAM/qB,EAIVD,EAAO,SAASyqB,OAAQzqB,EAAOyY,UAAWgpB,IAAiB/yB,KAAMzO,GAGjEwhC,KAEC3M,SAAUpzB,GAAY,SAAUm5B,EAAO6D,GACzCpmB,EAAK7W,KAAMC,EAAUs6B,IAAcnB,EAAM4G,aAAc/C,EAAQ7D,MAI1D17B,MAORa,EAAOyB,MAAQ,YAAa,WAAY,eAAgB,YAAa,cAAe,YAAc,SAAUK,EAAGiC,GAC9G/D,EAAOG,GAAI4D,GAAS,SAAU5D,GAC7B,MAAOhB,MAAKqoB,GAAIzjB,EAAM5D,MAOxBH,EAAOgQ,KAAK4E,QAAQ+tB,SAAW,SAAU9gC,GACxC,MAAO7B,GAAO6F,KAAK7F,EAAO21B,OAAQ,SAAUx1B,GAC3C,MAAO0B,KAAS1B,EAAG0B,OACjBd,OAMJ,IAAIqG,IAAUlI,EAAOH,SAAS8O,eAK9B,SAAS+0B,IAAW/gC,GACnB,MAAO7B,GAAOiE,SAAUpC,GAASA,EAAyB,IAAlBA,EAAKuC,UAAkBvC,EAAKqM,YAGrElO,EAAO6iC,QACNC,UAAW,SAAUjhC,EAAMa,EAASZ,GACnC,GAAIihC,GAAaC,EAASC,EAAWC,EAAQC,EAAWC,EAAYC,EACnEhV,EAAWruB,EAAOihB,IAAKpf,EAAM,YAC7ByhC,EAAUtjC,EAAQ6B,GAClBojB,IAGiB,YAAboJ,IACJxsB,EAAKkqB,MAAMsC,SAAW,YAGvB8U,EAAYG,EAAQT,SACpBI,EAAYjjC,EAAOihB,IAAKpf,EAAM,OAC9BuhC,EAAapjC,EAAOihB,IAAKpf,EAAM,QAC/BwhC,GAAmC,aAAbhV,GAAwC,UAAbA,KAC9C4U,EAAYG,GAAa3jC,QAAQ,QAAU,GAIzC4jC,GACJN,EAAcO,EAAQjV,WACtB6U,EAASH,EAAY50B,IACrB60B,EAAUD,EAAYQ,OAGtBL,EAAS/+B,WAAY8+B,IAAe,EACpCD,EAAU7+B,WAAYi/B,IAAgB,GAGlCpjC,EAAOkD,WAAYR,KACvBA,EAAUA,EAAQzB,KAAMY,EAAMC,EAAGqhC,IAGd,MAAfzgC,EAAQyL,MACZ8W,EAAM9W,IAAQzL,EAAQyL,IAAMg1B,EAAUh1B,IAAQ+0B,GAE1B,MAAhBxgC,EAAQ6gC,OACZte,EAAMse,KAAS7gC,EAAQ6gC,KAAOJ,EAAUI,KAASP,GAG7C,SAAWtgC,GACfA,EAAQ8gC,MAAMviC,KAAMY,EAAMojB,GAG1Bqe,EAAQriB,IAAKgE,KAKhBjlB,EAAOG,GAAGsC,QACTogC,OAAQ,SAAUngC,GACjB,GAAKV,UAAUjB,OACd,MAAmBsC,UAAZX,EACNvD,KACAA,KAAKsC,KAAK,SAAUK,GACnB9B,EAAO6iC,OAAOC,UAAW3jC,KAAMuD,EAASZ,IAI3C,IAAIsF,GAASq8B,EACZ5hC,EAAO1C,KAAM,GACbukC,GAAQv1B,IAAK,EAAGo1B,KAAM,GACtBt1B,EAAMpM,GAAQA,EAAK0J,aAEpB,IAAM0C,EAON,MAHA7G,GAAU6G,EAAIJ,gBAGR7N,EAAOwH,SAAUJ,EAASvF,UAMpBA,GAAK8hC,wBAA0BniB,IAC1CkiB,EAAM7hC,EAAK8hC,yBAEZF,EAAMb,GAAW30B,IAEhBE,IAAKu1B,EAAIv1B,IAAMs1B,EAAIG,YAAcx8B,EAAQ8e,UACzCqd,KAAMG,EAAIH,KAAOE,EAAII,YAAcz8B,EAAQ0e,aAXpC4d,GAeTrV,SAAU,WACT,GAAMlvB,KAAM,GAAZ,CAIA,GAAI2kC,GAAcjB,EACjBhhC,EAAO1C,KAAM,GACb4kC,GAAiB51B,IAAK,EAAGo1B,KAAM,EAuBhC,OApBwC,UAAnCvjC,EAAOihB,IAAKpf,EAAM,YAEtBghC,EAAShhC,EAAK8hC,yBAIdG,EAAe3kC,KAAK2kC,eAGpBjB,EAAS1jC,KAAK0jC,SACR7iC,EAAOoF,SAAU0+B,EAAc,GAAK,UACzCC,EAAeD,EAAajB,UAI7BkB,EAAa51B,KAAOnO,EAAOihB,IAAK6iB,EAAc,GAAK,kBAAkB,GACrEC,EAAaR,MAAQvjC,EAAOihB,IAAK6iB,EAAc,GAAK,mBAAmB,KAKvE31B,IAAK00B,EAAO10B,IAAM41B,EAAa51B,IAAMnO,EAAOihB,IAAKpf,EAAM,aAAa,GACpE0hC,KAAMV,EAAOU,KAAOQ,EAAaR,KAAOvjC,EAAOihB,IAAKpf,EAAM,cAAc,MAI1EiiC,aAAc,WACb,MAAO3kC,MAAKyC,IAAI,WACf,GAAIkiC,GAAe3kC,KAAK2kC,cAAgB18B,EAExC,OAAQ08B,IAAmB9jC,EAAOoF,SAAU0+B,EAAc,SAAuD,WAA3C9jC,EAAOihB,IAAK6iB,EAAc,YAC/FA,EAAeA,EAAaA,YAG7B,OAAOA,IAAgB18B,QAM1BpH,EAAOyB,MAAQokB,WAAY,cAAeI,UAAW,eAAiB,SAAU8Y,EAAQ5f,GACvF,GAAIhR,GAAM,gBAAkBgR,CAE5Bnf,GAAOG,GAAI4+B,GAAW,SAAU5uB,GAC/B,MAAOiO,GAAQjf,KAAM,SAAU0C,EAAMk9B,EAAQ5uB,GAC5C,GAAIszB,GAAMb,GAAW/gC,EAErB,OAAawB,UAAR8M,EACGszB,EAAMA,EAAKtkB,GAAStd,EAAMk9B,QAG7B0E,EACJA,EAAIO,SACF71B,EAAYjP,EAAO2kC,YAAb1zB,EACPhC,EAAMgC,EAAMjR,EAAO0kC,aAIpB/hC,EAAMk9B,GAAW5uB,IAEhB4uB,EAAQ5uB,EAAKnO,UAAUjB,OAAQ,SAUpCf,EAAOyB,MAAQ,MAAO,QAAU,SAAUK,EAAGqd,GAC5Cnf,EAAO4vB,SAAUzQ,GAAS6N,GAAcltB,EAAQ6tB,cAC/C,SAAU9rB,EAAM8qB,GACf,MAAKA,IACJA,EAAWD,GAAQ7qB,EAAMsd,GAElBmN,GAAUxgB,KAAM6gB,GACtB3sB,EAAQ6B,GAAOwsB,WAAYlP,GAAS,KACpCwN,GALF,WAaH3sB,EAAOyB,MAAQwiC,OAAQ,SAAUC,MAAO,SAAW,SAAUvhC,EAAMoB,GAClE/D,EAAOyB,MAAQmvB,QAAS,QAAUjuB,EAAMqmB,QAASjlB,EAAM,GAAI,QAAUpB,GAAQ,SAAUwhC,EAAcC,GAEpGpkC,EAAOG,GAAIikC,GAAa,SAAUzT,EAAQrrB,GACzC,GAAI+Y,GAAYrc,UAAUjB,SAAYojC,GAAkC,iBAAXxT,IAC5DzB,EAAQiV,IAAkBxT,KAAW,GAAQrrB,KAAU,EAAO,SAAW,SAE1E,OAAO8Y,GAAQjf,KAAM,SAAU0C,EAAMkC,EAAMuB,GAC1C,GAAI2I,EAEJ,OAAKjO,GAAOiE,SAAUpC,GAIdA,EAAK9C,SAAS8O,gBAAiB,SAAWlL,GAI3B,IAAlBd,EAAKuC,UACT6J,EAAMpM,EAAKgM,gBAIJtK,KAAKyrB,IACXntB,EAAK6jB,KAAM,SAAW/iB,GAAQsL,EAAK,SAAWtL,GAC9Cd,EAAK6jB,KAAM,SAAW/iB,GAAQsL,EAAK,SAAWtL,GAC9CsL,EAAK,SAAWtL,KAIDU,SAAViC,EAENtF,EAAOihB,IAAKpf,EAAMkC,EAAMmrB,GAGxBlvB,EAAO+rB,MAAOlqB,EAAMkC,EAAMuB,EAAO4pB,IAChCnrB,EAAMsa,EAAYsS,EAASttB,OAAWgb,EAAW,WAOvDre,EAAOG,GAAGkkC,KAAO,WAChB,MAAOllC,MAAK4B,QAGbf,EAAOG,GAAGmkC,QAAUtkC,EAAOG,GAAGyZ,QAkBP,kBAAX2qB,SAAyBA,OAAOC,KAC3CD,OAAQ,YAAc,WACrB,MAAOvkC,IAOT,IAECykC,IAAUvlC,EAAOc,OAGjB0kC,GAAKxlC,EAAOylC,CAwBb,OAtBA3kC,GAAO4kC,WAAa,SAAU3hC,GAS7B,MARK/D,GAAOylC,IAAM3kC,IACjBd,EAAOylC,EAAID,IAGPzhC,GAAQ/D,EAAOc,SAAWA,IAC9Bd,EAAOc,OAASykC,IAGVzkC,SAMIZ,KAAaoiB,IACxBtiB,EAAOc,OAASd,EAAOylC,EAAI3kC,GAMrBA"} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery/jquery-migrate-1.2.1.js b/common/src/main/webapp/thirdparty/jquery/jquery-migrate-1.2.1.js
new file mode 100644
index 0000000..25b6c81
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery/jquery-migrate-1.2.1.js
@@ -0,0 +1,521 @@
+/*!
+ * jQuery Migrate - v1.2.1 - 2013-05-08
+ * https://github.com/jquery/jquery-migrate
+ * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
+ */
+(function( jQuery, window, undefined ) {
+// See http://bugs.jquery.com/ticket/13335
+// "use strict";
+
+
+var warnedAbout = {};
+
+// List of warnings already given; public read only
+jQuery.migrateWarnings = [];
+
+// Set to true to prevent console output; migrateWarnings still maintained
+// jQuery.migrateMute = false;
+
+// Show a message on the console so devs know we're active
+if ( !jQuery.migrateMute && window.console && window.console.log ) {
+ window.console.log("JQMIGRATE: Logging is active");
+}
+
+// Set to false to disable traces that appear with warnings
+if ( jQuery.migrateTrace === undefined ) {
+ jQuery.migrateTrace = true;
+}
+
+// Forget any warnings we've already given; public
+jQuery.migrateReset = function() {
+ warnedAbout = {};
+ jQuery.migrateWarnings.length = 0;
+};
+
+function migrateWarn( msg) {
+ var console = window.console;
+ if ( !warnedAbout[ msg ] ) {
+ warnedAbout[ msg ] = true;
+ jQuery.migrateWarnings.push( msg );
+ if ( console && console.warn && !jQuery.migrateMute ) {
+ console.warn( "JQMIGRATE: " + msg );
+ if ( jQuery.migrateTrace && console.trace ) {
+ console.trace();
+ }
+ }
+ }
+}
+
+function migrateWarnProp( obj, prop, value, msg ) {
+ if ( Object.defineProperty ) {
+ // On ES5 browsers (non-oldIE), warn if the code tries to get prop;
+ // allow property to be overwritten in case some other plugin wants it
+ try {
+ Object.defineProperty( obj, prop, {
+ configurable: true,
+ enumerable: true,
+ get: function() {
+ migrateWarn( msg );
+ return value;
+ },
+ set: function( newValue ) {
+ migrateWarn( msg );
+ value = newValue;
+ }
+ });
+ return;
+ } catch( err ) {
+ // IE8 is a dope about Object.defineProperty, can't warn there
+ }
+ }
+
+ // Non-ES5 (or broken) browser; just set the property
+ jQuery._definePropertyBroken = true;
+ obj[ prop ] = value;
+}
+
+if ( document.compatMode === "BackCompat" ) {
+ // jQuery has never supported or tested Quirks Mode
+ migrateWarn( "jQuery is not compatible with Quirks Mode" );
+}
+
+
+var attrFn = jQuery( "<input/>", { size: 1 } ).attr("size") && jQuery.attrFn,
+ oldAttr = jQuery.attr,
+ valueAttrGet = jQuery.attrHooks.value && jQuery.attrHooks.value.get ||
+ function() { return null; },
+ valueAttrSet = jQuery.attrHooks.value && jQuery.attrHooks.value.set ||
+ function() { return undefined; },
+ rnoType = /^(?:input|button)$/i,
+ rnoAttrNodeType = /^[238]$/,
+ rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
+ ruseDefault = /^(?:checked|selected)$/i;
+
+// jQuery.attrFn
+migrateWarnProp( jQuery, "attrFn", attrFn || {}, "jQuery.attrFn is deprecated" );
+
+jQuery.attr = function( elem, name, value, pass ) {
+ var lowerName = name.toLowerCase(),
+ nType = elem && elem.nodeType;
+
+ if ( pass ) {
+ // Since pass is used internally, we only warn for new jQuery
+ // versions where there isn't a pass arg in the formal params
+ if ( oldAttr.length < 4 ) {
+ migrateWarn("jQuery.fn.attr( props, pass ) is deprecated");
+ }
+ if ( elem && !rnoAttrNodeType.test( nType ) &&
+ (attrFn ? name in attrFn : jQuery.isFunction(jQuery.fn[name])) ) {
+ return jQuery( elem )[ name ]( value );
+ }
+ }
+
+ // Warn if user tries to set `type`, since it breaks on IE 6/7/8; by checking
+ // for disconnected elements we don't warn on $( "<button>", { type: "button" } ).
+ if ( name === "type" && value !== undefined && rnoType.test( elem.nodeName ) && elem.parentNode ) {
+ migrateWarn("Can't change the 'type' of an input or button in IE 6/7/8");
+ }
+
+ // Restore boolHook for boolean property/attribute synchronization
+ if ( !jQuery.attrHooks[ lowerName ] && rboolean.test( lowerName ) ) {
+ jQuery.attrHooks[ lowerName ] = {
+ get: function( elem, name ) {
+ // Align boolean attributes with corresponding properties
+ // Fall back to attribute presence where some booleans are not supported
+ var attrNode,
+ property = jQuery.prop( elem, name );
+ return property === true || typeof property !== "boolean" &&
+ ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
+
+ name.toLowerCase() :
+ undefined;
+ },
+ set: function( elem, value, name ) {
+ var propName;
+ if ( value === false ) {
+ // Remove boolean attributes when set to false
+ jQuery.removeAttr( elem, name );
+ } else {
+ // value is true since we know at this point it's type boolean and not false
+ // Set boolean attributes to the same name and set the DOM property
+ propName = jQuery.propFix[ name ] || name;
+ if ( propName in elem ) {
+ // Only set the IDL specifically if it already exists on the element
+ elem[ propName ] = true;
+ }
+
+ elem.setAttribute( name, name.toLowerCase() );
+ }
+ return name;
+ }
+ };
+
+ // Warn only for attributes that can remain distinct from their properties post-1.9
+ if ( ruseDefault.test( lowerName ) ) {
+ migrateWarn( "jQuery.fn.attr('" + lowerName + "') may use property instead of attribute" );
+ }
+ }
+
+ return oldAttr.call( jQuery, elem, name, value );
+};
+
+// attrHooks: value
+jQuery.attrHooks.value = {
+ get: function( elem, name ) {
+ var nodeName = ( elem.nodeName || "" ).toLowerCase();
+ if ( nodeName === "button" ) {
+ return valueAttrGet.apply( this, arguments );
+ }
+ if ( nodeName !== "input" && nodeName !== "option" ) {
+ migrateWarn("jQuery.fn.attr('value') no longer gets properties");
+ }
+ return name in elem ?
+ elem.value :
+ null;
+ },
+ set: function( elem, value ) {
+ var nodeName = ( elem.nodeName || "" ).toLowerCase();
+ if ( nodeName === "button" ) {
+ return valueAttrSet.apply( this, arguments );
+ }
+ if ( nodeName !== "input" && nodeName !== "option" ) {
+ migrateWarn("jQuery.fn.attr('value', val) no longer sets properties");
+ }
+ // Does not return so that setAttribute is also used
+ elem.value = value;
+ }
+};
+
+
+var matched, browser,
+ oldInit = jQuery.fn.init,
+ oldParseJSON = jQuery.parseJSON,
+ // Note: XSS check is done below after string is trimmed
+ rquickExpr = /^([^<]*)(<[\w\W]+>)([^>]*)$/;
+
+// $(html) "looks like html" rule change
+jQuery.fn.init = function( selector, context, rootjQuery ) {
+ var match;
+
+ if ( selector && typeof selector === "string" && !jQuery.isPlainObject( context ) &&
+ (match = rquickExpr.exec( jQuery.trim( selector ) )) && match[ 0 ] ) {
+ // This is an HTML string according to the "old" rules; is it still?
+ if ( selector.charAt( 0 ) !== "<" ) {
+ migrateWarn("$(html) HTML strings must start with '<' character");
+ }
+ if ( match[ 3 ] ) {
+ migrateWarn("$(html) HTML text after last tag is ignored");
+ }
+ // Consistently reject any HTML-like string starting with a hash (#9521)
+ // Note that this may break jQuery 1.6.x code that otherwise would work.
+ if ( match[ 0 ].charAt( 0 ) === "#" ) {
+ migrateWarn("HTML string cannot start with a '#' character");
+ jQuery.error("JQMIGRATE: Invalid selector string (XSS)");
+ }
+ // Now process using loose rules; let pre-1.8 play too
+ if ( context && context.context ) {
+ // jQuery object as context; parseHTML expects a DOM object
+ context = context.context;
+ }
+ if ( jQuery.parseHTML ) {
+ return oldInit.call( this, jQuery.parseHTML( match[ 2 ], context, true ),
+ context, rootjQuery );
+ }
+ }
+ return oldInit.apply( this, arguments );
+};
+jQuery.fn.init.prototype = jQuery.fn;
+
+// Let $.parseJSON(falsy_value) return null
+jQuery.parseJSON = function( json ) {
+ if ( !json && json !== null ) {
+ migrateWarn("jQuery.parseJSON requires a valid JSON string");
+ return null;
+ }
+ return oldParseJSON.apply( this, arguments );
+};
+
+jQuery.uaMatch = function( ua ) {
+ ua = ua.toLowerCase();
+
+ var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
+ /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
+ /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
+ /(msie) ([\w.]+)/.exec( ua ) ||
+ ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
+ [];
+
+ return {
+ browser: match[ 1 ] || "",
+ version: match[ 2 ] || "0"
+ };
+};
+
+// Don't clobber any existing jQuery.browser in case it's different
+if ( !jQuery.browser ) {
+ matched = jQuery.uaMatch( navigator.userAgent );
+ browser = {};
+
+ if ( matched.browser ) {
+ browser[ matched.browser ] = true;
+ browser.version = matched.version;
+ }
+
+ // Chrome is Webkit, but Webkit is also Safari.
+ if ( browser.chrome ) {
+ browser.webkit = true;
+ } else if ( browser.webkit ) {
+ browser.safari = true;
+ }
+
+ jQuery.browser = browser;
+}
+
+// Warn if the code tries to get jQuery.browser
+migrateWarnProp( jQuery, "browser", jQuery.browser, "jQuery.browser is deprecated" );
+
+jQuery.sub = function() {
+ function jQuerySub( selector, context ) {
+ return new jQuerySub.fn.init( selector, context );
+ }
+ jQuery.extend( true, jQuerySub, this );
+ jQuerySub.superclass = this;
+ jQuerySub.fn = jQuerySub.prototype = this();
+ jQuerySub.fn.constructor = jQuerySub;
+ jQuerySub.sub = this.sub;
+ jQuerySub.fn.init = function init( selector, context ) {
+ if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
+ context = jQuerySub( context );
+ }
+
+ return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
+ };
+ jQuerySub.fn.init.prototype = jQuerySub.fn;
+ var rootjQuerySub = jQuerySub(document);
+ migrateWarn( "jQuery.sub() is deprecated" );
+ return jQuerySub;
+};
+
+
+// Ensure that $.ajax gets the new parseJSON defined in core.js
+jQuery.ajaxSetup({
+ converters: {
+ "text json": jQuery.parseJSON
+ }
+});
+
+
+var oldFnData = jQuery.fn.data;
+
+jQuery.fn.data = function( name ) {
+ var ret, evt,
+ elem = this[0];
+
+ // Handles 1.7 which has this behavior and 1.8 which doesn't
+ if ( elem && name === "events" && arguments.length === 1 ) {
+ ret = jQuery.data( elem, name );
+ evt = jQuery._data( elem, name );
+ if ( ( ret === undefined || ret === evt ) && evt !== undefined ) {
+ migrateWarn("Use of jQuery.fn.data('events') is deprecated");
+ return evt;
+ }
+ }
+ return oldFnData.apply( this, arguments );
+};
+
+
+var rscriptType = /\/(java|ecma)script/i,
+ oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack;
+
+jQuery.fn.andSelf = function() {
+ migrateWarn("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()");
+ return oldSelf.apply( this, arguments );
+};
+
+// Since jQuery.clean is used internally on older versions, we only shim if it's missing
+if ( !jQuery.clean ) {
+ jQuery.clean = function( elems, context, fragment, scripts ) {
+ // Set context per 1.8 logic
+ context = context || document;
+ context = !context.nodeType && context[0] || context;
+ context = context.ownerDocument || context;
+
+ migrateWarn("jQuery.clean() is deprecated");
+
+ var i, elem, handleScript, jsTags,
+ ret = [];
+
+ jQuery.merge( ret, jQuery.buildFragment( elems, context ).childNodes );
+
+ // Complex logic lifted directly from jQuery 1.8
+ if ( fragment ) {
+ // Special handling of each script element
+ handleScript = function( elem ) {
+ // Check if we consider it executable
+ if ( !elem.type || rscriptType.test( elem.type ) ) {
+ // Detach the script and store it in the scripts array (if provided) or the fragment
+ // Return truthy to indicate that it has been handled
+ return scripts ?
+ scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) :
+ fragment.appendChild( elem );
+ }
+ };
+
+ for ( i = 0; (elem = ret[i]) != null; i++ ) {
+ // Check if we're done after handling an executable script
+ if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) {
+ // Append to fragment and handle embedded scripts
+ fragment.appendChild( elem );
+ if ( typeof elem.getElementsByTagName !== "undefined" ) {
+ // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration
+ jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript );
+
+ // Splice the scripts into ret after their former ancestor and advance our index beyond them
+ ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
+ i += jsTags.length;
+ }
+ }
+ }
+ }
+
+ return ret;
+ };
+}
+
+var eventAdd = jQuery.event.add,
+ eventRemove = jQuery.event.remove,
+ eventTrigger = jQuery.event.trigger,
+ oldToggle = jQuery.fn.toggle,
+ oldLive = jQuery.fn.live,
+ oldDie = jQuery.fn.die,
+ ajaxEvents = "ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",
+ rajaxEvent = new RegExp( "\\b(?:" + ajaxEvents + ")\\b" ),
+ rhoverHack = /(?:^|\s)hover(\.\S+|)\b/,
+ hoverHack = function( events ) {
+ if ( typeof( events ) !== "string" || jQuery.event.special.hover ) {
+ return events;
+ }
+ if ( rhoverHack.test( events ) ) {
+ migrateWarn("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'");
+ }
+ return events && events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
+ };
+
+// Event props removed in 1.9, put them back if needed; no practical way to warn them
+if ( jQuery.event.props && jQuery.event.props[ 0 ] !== "attrChange" ) {
+ jQuery.event.props.unshift( "attrChange", "attrName", "relatedNode", "srcElement" );
+}
+
+// Undocumented jQuery.event.handle was "deprecated" in jQuery 1.7
+if ( jQuery.event.dispatch ) {
+ migrateWarnProp( jQuery.event, "handle", jQuery.event.dispatch, "jQuery.event.handle is undocumented and deprecated" );
+}
+
+// Support for 'hover' pseudo-event and ajax event warnings
+jQuery.event.add = function( elem, types, handler, data, selector ){
+ if ( elem !== document && rajaxEvent.test( types ) ) {
+ migrateWarn( "AJAX events should be attached to document: " + types );
+ }
+ eventAdd.call( this, elem, hoverHack( types || "" ), handler, data, selector );
+};
+jQuery.event.remove = function( elem, types, handler, selector, mappedTypes ){
+ eventRemove.call( this, elem, hoverHack( types ) || "", handler, selector, mappedTypes );
+};
+
+jQuery.fn.error = function() {
+ var args = Array.prototype.slice.call( arguments, 0);
+ migrateWarn("jQuery.fn.error() is deprecated");
+ args.splice( 0, 0, "error" );
+ if ( arguments.length ) {
+ return this.bind.apply( this, args );
+ }
+ // error event should not bubble to window, although it does pre-1.7
+ this.triggerHandler.apply( this, args );
+ return this;
+};
+
+jQuery.fn.toggle = function( fn, fn2 ) {
+
+ // Don't mess with animation or css toggles
+ if ( !jQuery.isFunction( fn ) || !jQuery.isFunction( fn2 ) ) {
+ return oldToggle.apply( this, arguments );
+ }
+ migrateWarn("jQuery.fn.toggle(handler, handler...) is deprecated");
+
+ // Save reference to arguments for access in closure
+ var args = arguments,
+ guid = fn.guid || jQuery.guid++,
+ i = 0,
+ toggler = function( event ) {
+ // Figure out which function to execute
+ var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
+ jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
+
+ // Make sure that clicks stop
+ event.preventDefault();
+
+ // and execute the function
+ return args[ lastToggle ].apply( this, arguments ) || false;
+ };
+
+ // link all the functions, so any of them can unbind this click handler
+ toggler.guid = guid;
+ while ( i < args.length ) {
+ args[ i++ ].guid = guid;
+ }
+
+ return this.click( toggler );
+};
+
+jQuery.fn.live = function( types, data, fn ) {
+ migrateWarn("jQuery.fn.live() is deprecated");
+ if ( oldLive ) {
+ return oldLive.apply( this, arguments );
+ }
+ jQuery( this.context ).on( types, this.selector, data, fn );
+ return this;
+};
+
+jQuery.fn.die = function( types, fn ) {
+ migrateWarn("jQuery.fn.die() is deprecated");
+ if ( oldDie ) {
+ return oldDie.apply( this, arguments );
+ }
+ jQuery( this.context ).off( types, this.selector || "**", fn );
+ return this;
+};
+
+// Turn global events into document-triggered events
+jQuery.event.trigger = function( event, data, elem, onlyHandlers ){
+ if ( !elem && !rajaxEvent.test( event ) ) {
+ migrateWarn( "Global events are undocumented and deprecated" );
+ }
+ return eventTrigger.call( this, event, data, elem || document, onlyHandlers );
+};
+jQuery.each( ajaxEvents.split("|"),
+ function( _, name ) {
+ jQuery.event.special[ name ] = {
+ setup: function() {
+ var elem = this;
+
+ // The document needs no shimming; must be !== for oldIE
+ if ( elem !== document ) {
+ jQuery.event.add( document, name + "." + jQuery.guid, function() {
+ jQuery.event.trigger( name, null, elem, true );
+ });
+ jQuery._data( this, name, jQuery.guid++ );
+ }
+ return false;
+ },
+ teardown: function() {
+ if ( this !== document ) {
+ jQuery.event.remove( document, name + "." + jQuery._data( this, name ) );
+ }
+ return false;
+ }
+ };
+ }
+);
+
+
+})( jQuery, window );
diff --git a/common/src/main/webapp/thirdparty/jquery/jquery-migrate-1.2.1.min.js b/common/src/main/webapp/thirdparty/jquery/jquery-migrate-1.2.1.min.js
new file mode 100644
index 0000000..62149c2
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery/jquery-migrate-1.2.1.min.js
@@ -0,0 +1,2 @@
+/*! jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */
+jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(e,t,n){function r(n){var r=t.console;i[n]||(i[n]=!0,e.migrateWarnings.push(n),r&&r.warn&&!e.migrateMute&&(r.warn("JQMIGRATE: "+n),e.migrateTrace&&r.trace&&r.trace()))}function a(t,a,i,o){if(Object.defineProperty)try{return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){return r(o),i},set:function(e){r(o),i=e}}),n}catch(s){}e._definePropertyBroken=!0,t[a]=i}var i={};e.migrateWarnings=[],!e.migrateMute&&t.console&&t.console.log&&t.console.log("JQMIGRATE: Logging is active"),e.migrateTrace===n&&(e.migrateTrace=!0),e.migrateReset=function(){i={},e.migrateWarnings.length=0},"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var o=e("<input/>",{size:1}).attr("size")&&e.attrFn,s=e.attr,u=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},c=e.attrHooks.value&&e.attrHooks.value.set||function(){return n},l=/^(?:input|button)$/i,d=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:checked|selected)$/i;a(e,"attrFn",o||{},"jQuery.attrFn is deprecated"),e.attr=function(t,a,i,u){var c=a.toLowerCase(),g=t&&t.nodeType;return u&&(4>s.length&&r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!d.test(g)&&(o?a in o:e.isFunction(e.fn[a])))?e(t)[a](i):("type"===a&&i!==n&&l.test(t.nodeName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[c]&&p.test(c)&&(e.attrHooks[c]={get:function(t,r){var a,i=e.prop(t,r);return i===!0||"boolean"!=typeof i&&(a=t.getAttributeNode(r))&&a.nodeValue!==!1?r.toLowerCase():n},set:function(t,n,r){var a;return n===!1?e.removeAttr(t,r):(a=e.propFix[r]||r,a in t&&(t[a]=!0),t.setAttribute(r,r.toLowerCase())),r}},f.test(c)&&r("jQuery.fn.attr('"+c+"') may use property instead of attribute")),s.call(e,t,a,i))},e.attrHooks.value={get:function(e,t){var n=(e.nodeName||"").toLowerCase();return"button"===n?u.apply(this,arguments):("input"!==n&&"option"!==n&&r("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var a=(e.nodeName||"").toLowerCase();return"button"===a?c.apply(this,arguments):("input"!==a&&"option"!==a&&r("jQuery.fn.attr('value', val) no longer sets properties"),e.value=t,n)}};var g,h,v=e.fn.init,m=e.parseJSON,y=/^([^<]*)(<[\w\W]+>)([^>]*)$/;e.fn.init=function(t,n,a){var i;return t&&"string"==typeof t&&!e.isPlainObject(n)&&(i=y.exec(e.trim(t)))&&i[0]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must start with '<' character"),i[3]&&r("$(html) HTML text after last tag is ignored"),"#"===i[0].charAt(0)&&(r("HTML string cannot start with a '#' character"),e.error("JQMIGRATE: Invalid selector string (XSS)")),n&&n.context&&(n=n.context),e.parseHTML)?v.call(this,e.parseHTML(i[2],n,!0),n,a):v.apply(this,arguments)},e.fn.init.prototype=e.fn,e.parseJSON=function(e){return e||null===e?m.apply(this,arguments):(r("jQuery.parseJSON requires a valid JSON string"),null)},e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e.browser||(g=e.uaMatch(navigator.userAgent),h={},g.browser&&(h[g.browser]=!0,h.version=g.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h),a(e,"browser",e.browser,"jQuery.browser is deprecated"),e.sub=function(){function t(e,n){return new t.fn.init(e,n)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(r,a){return a&&a instanceof e&&!(a instanceof t)&&(a=t(a)),e.fn.init.call(this,r,a,n)},t.fn.init.prototype=t.fn;var n=t(document);return r("jQuery.sub() is deprecated"),t},e.ajaxSetup({converters:{"text json":e.parseJSON}});var b=e.fn.data;e.fn.data=function(t){var a,i,o=this[0];return!o||"events"!==t||1!==arguments.length||(a=e.data(o,t),i=e._data(o,t),a!==n&&a!==i||i===n)?b.apply(this,arguments):(r("Use of jQuery.fn.data('events') is deprecated"),i)};var j=/\/(java|ecma)script/i,w=e.fn.andSelf||e.fn.addBack;e.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)},e.clean||(e.clean=function(t,a,i,o){a=a||document,a=!a.nodeType&&a[0]||a,a=a.ownerDocument||a,r("jQuery.clean() is deprecated");var s,u,c,l,d=[];if(e.merge(d,e.buildFragment(t,a).childNodes),i)for(c=function(e){return!e.type||j.test(e.type)?o?o.push(e.parentNode?e.parentNode.removeChild(e):e):i.appendChild(e):n},s=0;null!=(u=d[s]);s++)e.nodeName(u,"script")&&c(u)||(i.appendChild(u),u.getElementsByTagName!==n&&(l=e.grep(e.merge([],u.getElementsByTagName("script")),c),d.splice.apply(d,[s+1,0].concat(l)),s+=l.length));return d});var Q=e.event.add,x=e.event.remove,k=e.event.trigger,N=e.fn.toggle,T=e.fn.live,M=e.fn.die,S="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",C=RegExp("\\b(?:"+S+")\\b"),H=/(?:^|\s)hover(\.\S+|)\b/,A=function(t){return"string"!=typeof t||e.event.special.hover?t:(H.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(H,"mouseenter$1 mouseleave$1"))};e.event.props&&"attrChange"!==e.event.props[0]&&e.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),e.event.dispatch&&a(e.event,"handle",e.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),e.event.add=function(e,t,n,a,i){e!==document&&C.test(t)&&r("AJAX events should be attached to document: "+t),Q.call(this,e,A(t||""),n,a,i)},e.event.remove=function(e,t,n,r,a){x.call(this,e,A(t)||"",n,r,a)},e.fn.error=function(){var e=Array.prototype.slice.call(arguments,0);return r("jQuery.fn.error() is deprecated"),e.splice(0,0,"error"),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this)},e.fn.toggle=function(t,n){if(!e.isFunction(t)||!e.isFunction(n))return N.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var a=arguments,i=t.guid||e.guid++,o=0,s=function(n){var r=(e._data(this,"lastToggle"+t.guid)||0)%o;return e._data(this,"lastToggle"+t.guid,r+1),n.preventDefault(),a[r].apply(this,arguments)||!1};for(s.guid=i;a.length>o;)a[o++].guid=i;return this.click(s)},e.fn.live=function(t,n,a){return r("jQuery.fn.live() is deprecated"),T?T.apply(this,arguments):(e(this.context).on(t,this.selector,n,a),this)},e.fn.die=function(t,n){return r("jQuery.fn.die() is deprecated"),M?M.apply(this,arguments):(e(this.context).off(t,this.selector||"**",n),this)},e.event.trigger=function(e,t,n,a){return n||C.test(e)||r("Global events are undocumented and deprecated"),k.call(this,e,t,n||document,a)},e.each(S.split("|"),function(t,n){e.event.special[n]={setup:function(){var t=this;return t!==document&&(e.event.add(document,n+"."+e.guid,function(){e.event.trigger(n,null,t,!0)}),e._data(this,n,e.guid++)),!1},teardown:function(){return this!==document&&e.event.remove(document,n+"."+e._data(this,n)),!1}}})}(jQuery,window); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/jquery/jquery.reveal.js b/common/src/main/webapp/thirdparty/jquery/jquery.reveal.js
new file mode 100644
index 0000000..4c9504c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/jquery/jquery.reveal.js
@@ -0,0 +1,152 @@
+
+(function($) {
+
+/*---------------------------
+ Defaults for Reveal
+----------------------------*/
+
+/*---------------------------
+ Listener for data-reveal-id attributes
+----------------------------*/
+
+ $('a[data-reveal-id]').live('click', function(e) {
+ e.preventDefault();
+ var modalLocation = $(this).attr('data-reveal-id');
+ $('#'+modalLocation).reveal($(this).data());
+ });
+
+/*---------------------------
+ Extend and Execute
+----------------------------*/
+
+ $.fn.reveal = function(options) {
+
+
+ var defaults = {
+ animation: 'fadeAndPop', //fade, fadeAndPop, none
+ animationspeed: 300, //how fast animtions are
+ closeonbackgroundclick: true, //if you click background will modal close?
+ dismissmodalclass: 'close-reveal-modal' //the class of a button or element that will close an open modal
+ };
+
+ //Extend dem' options
+ var options = $.extend({}, defaults, options);
+
+ return this.each(function() {
+
+/*---------------------------
+ Global Variables
+----------------------------*/
+ var modal = $(this),
+ topMeasure = parseInt(modal.css('top')),
+ topOffset = modal.height() + topMeasure,
+ locked = false,
+ modalBG = $('.reveal-modal-bg');
+
+/*---------------------------
+ Create Modal BG
+----------------------------*/
+ if(modalBG.length == 0) {
+ modalBG = $('<div class="reveal-modal-bg" />').insertAfter(modal);
+ }
+
+/*---------------------------
+ Open & Close Animations
+----------------------------*/
+ //Entrance Animations
+ modal.bind('reveal:open', function () {
+ modalBG.unbind('click.modalEvent');
+ $('.' + options.dismissmodalclass).unbind('click.modalEvent');
+ if(!locked) {
+ lockModal();
+ if(options.animation == "fadeAndPop") {
+ modal.css({'top': $(document).scrollTop()-topOffset, 'opacity' : 0, 'visibility' : 'visible'});
+ modalBG.fadeIn(options.animationspeed/2);
+ modal.delay(options.animationspeed/2).animate({
+ "top": $(document).scrollTop()+topMeasure + 'px',
+ "opacity" : 1
+ }, options.animationspeed,unlockModal());
+ }
+ if(options.animation == "fade") {
+ modal.css({'opacity' : 0, 'visibility' : 'visible', 'top': $(document).scrollTop()+topMeasure});
+ modalBG.fadeIn(options.animationspeed/2);
+ modal.delay(options.animationspeed/2).animate({
+ "opacity" : 1
+ }, options.animationspeed,unlockModal());
+ }
+ if(options.animation == "none") {
+ modal.css({'visibility' : 'visible', 'top':$(document).scrollTop()+topMeasure});
+ modalBG.css({"display":"block"});
+ unlockModal()
+ }
+ }
+ modal.unbind('reveal:open');
+ });
+
+ //Closing Animation
+ modal.bind('reveal:close', function () {
+ if(!locked) {
+ lockModal();
+ if(options.animation == "fadeAndPop") {
+ modalBG.delay(options.animationspeed).fadeOut(options.animationspeed);
+ modal.animate({
+ "top": $(document).scrollTop()-topOffset + 'px',
+ "opacity" : 0
+ }, options.animationspeed/2, function() {
+ modal.css({'top':topMeasure, 'opacity' : 1, 'visibility' : 'hidden'});
+ unlockModal();
+ });
+ }
+ if(options.animation == "fade") {
+ modalBG.delay(options.animationspeed).fadeOut(options.animationspeed);
+ modal.animate({
+ "opacity" : 0
+ }, options.animationspeed, function() {
+ modal.css({'opacity' : 1, 'visibility' : 'hidden', 'top' : topMeasure});
+ unlockModal();
+ });
+ }
+ if(options.animation == "none") {
+ modal.css({'visibility' : 'hidden', 'top' : topMeasure});
+ modalBG.css({'display' : 'none'});
+ }
+ }
+ modal.unbind('reveal:close');
+ });
+
+/*---------------------------
+ Open and add Closing Listeners
+----------------------------*/
+ //Open Modal Immediately
+ modal.trigger('reveal:open')
+
+ //Close Modal Listeners
+ var closeButton = $('.' + options.dismissmodalclass).bind('click.modalEvent', function () {
+ modal.trigger('reveal:close')
+ });
+
+ if(options.closeonbackgroundclick) {
+ modalBG.css({"cursor":"pointer"})
+ modalBG.bind('click.modalEvent', function () {
+ modal.trigger('reveal:close')
+ });
+ }
+ $('body').keyup(function(e) {
+ if(e.which===27){ modal.trigger('reveal:close'); } // 27 is the keycode for the Escape key
+ });
+
+
+/*---------------------------
+ Animations Locks
+----------------------------*/
+ function unlockModal() {
+ locked = false;
+ }
+ function lockModal() {
+ locked = true;
+ }
+
+ });//each call
+ }//orbit plugin call
+})(jQuery);
+
diff --git a/common/src/main/webapp/thirdparty/js/angular-ui-router.min.js b/common/src/main/webapp/thirdparty/js/angular-ui-router.min.js
new file mode 100644
index 0000000..d320295
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/js/angular-ui-router.min.js
@@ -0,0 +1,8 @@
+/**
+ * State-based routing for AngularJS
+ * @version v0.3.1
+ * @link http://angular-ui.github.com/
+ * @license MIT License, http://www.opensource.org/licenses/MIT
+ */
+"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(a,b,c){"use strict";function d(a,b){return R(new(R(function(){},{prototype:a})),b)}function e(a){return Q(arguments,function(b){b!==a&&Q(b,function(b,c){a.hasOwnProperty(c)||(a[c]=b)})}),a}function f(a,b){var c=[];for(var d in a.path){if(a.path[d]!==b.path[d])break;c.push(a.path[d])}return c}function g(a){if(Object.keys)return Object.keys(a);var b=[];return Q(a,function(a,c){b.push(c)}),b}function h(a,b){if(Array.prototype.indexOf)return a.indexOf(b,Number(arguments[2])||0);var c=a.length>>>0,d=Number(arguments[2])||0;for(d=0>d?Math.ceil(d):Math.floor(d),0>d&&(d+=c);c>d;d++)if(d in a&&a[d]===b)return d;return-1}function i(a,b,c,d){var e,i=f(c,d),j={},k=[];for(var l in i)if(i[l]&&i[l].params&&(e=g(i[l].params),e.length))for(var m in e)h(k,e[m])>=0||(k.push(e[m]),j[e[m]]=a[e[m]]);return R({},j,b)}function j(a,b,c){if(!c){c=[];for(var d in a)c.push(d)}for(var e=0;e<c.length;e++){var f=c[e];if(a[f]!=b[f])return!1}return!0}function k(a,b){var c={};return Q(a,function(a){c[a]=b[a]}),c}function l(a){var b={},c=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));return Q(c,function(c){c in a&&(b[c]=a[c])}),b}function m(a){var b={},c=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));for(var d in a)-1==h(c,d)&&(b[d]=a[d]);return b}function n(a,b){var c=P(a),d=c?[]:{};return Q(a,function(a,e){b(a,e)&&(d[c?d.length:e]=a)}),d}function o(a,b){var c=P(a)?[]:{};return Q(a,function(a,d){c[d]=b(a,d)}),c}function p(a,b){var d=1,f=2,i={},j=[],k=i,l=R(a.when(i),{$$promises:i,$$values:i});this.study=function(i){function n(a,c){if(s[c]!==f){if(r.push(c),s[c]===d)throw r.splice(0,h(r,c)),new Error("Cyclic dependency: "+r.join(" -> "));if(s[c]=d,N(a))q.push(c,[function(){return b.get(a)}],j);else{var e=b.annotate(a);Q(e,function(a){a!==c&&i.hasOwnProperty(a)&&n(i[a],a)}),q.push(c,a,e)}r.pop(),s[c]=f}}function o(a){return O(a)&&a.then&&a.$$promises}if(!O(i))throw new Error("'invocables' must be an object");var p=g(i||{}),q=[],r=[],s={};return Q(i,n),i=r=s=null,function(d,f,g){function h(){--u||(v||e(t,f.$$values),r.$$values=t,r.$$promises=r.$$promises||!0,delete r.$$inheritedValues,n.resolve(t))}function i(a){r.$$failure=a,n.reject(a)}function j(c,e,f){function j(a){l.reject(a),i(a)}function k(){if(!L(r.$$failure))try{l.resolve(b.invoke(e,g,t)),l.promise.then(function(a){t[c]=a,h()},j)}catch(a){j(a)}}var l=a.defer(),m=0;Q(f,function(a){s.hasOwnProperty(a)&&!d.hasOwnProperty(a)&&(m++,s[a].then(function(b){t[a]=b,--m||k()},j))}),m||k(),s[c]=l.promise}if(o(d)&&g===c&&(g=f,f=d,d=null),d){if(!O(d))throw new Error("'locals' must be an object")}else d=k;if(f){if(!o(f))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else f=l;var n=a.defer(),r=n.promise,s=r.$$promises={},t=R({},d),u=1+q.length/3,v=!1;if(L(f.$$failure))return i(f.$$failure),r;f.$$inheritedValues&&e(t,m(f.$$inheritedValues,p)),R(s,f.$$promises),f.$$values?(v=e(t,m(f.$$values,p)),r.$$inheritedValues=m(f.$$values,p),h()):(f.$$inheritedValues&&(r.$$inheritedValues=m(f.$$inheritedValues,p)),f.then(h,i));for(var w=0,x=q.length;x>w;w+=3)d.hasOwnProperty(q[w])?h():j(q[w],q[w+1],q[w+2]);return r}},this.resolve=function(a,b,c,d){return this.study(a)(b,c,d)}}function q(a,b,c){this.fromConfig=function(a,b,c){return L(a.template)?this.fromString(a.template,b):L(a.templateUrl)?this.fromUrl(a.templateUrl,b):L(a.templateProvider)?this.fromProvider(a.templateProvider,b,c):null},this.fromString=function(a,b){return M(a)?a(b):a},this.fromUrl=function(c,d){return M(c)&&(c=c(d)),null==c?null:a.get(c,{cache:b,headers:{Accept:"text/html"}}).then(function(a){return a.data})},this.fromProvider=function(a,b,d){return c.invoke(a,null,d||{params:b})}}function r(a,b,e){function f(b,c,d,e){if(q.push(b),o[b])return o[b];if(!/^\w+([-.]+\w+)*(?:\[\])?$/.test(b))throw new Error("Invalid parameter name '"+b+"' in pattern '"+a+"'");if(p[b])throw new Error("Duplicate parameter name '"+b+"' in pattern '"+a+"'");return p[b]=new U.Param(b,c,d,e),p[b]}function g(a,b,c,d){var e=["",""],f=a.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!b)return f;switch(c){case!1:e=["(",")"+(d?"?":"")];break;case!0:f=f.replace(/\/$/,""),e=["(?:/(",")|/)?"];break;default:e=["("+c+"|",")?"]}return f+e[0]+b+e[1]}function h(e,f){var g,h,i,j,k;return g=e[2]||e[3],k=b.params[g],i=a.substring(m,e.index),h=f?e[4]:e[4]||("*"==e[1]?".*":null),h&&(j=U.type(h)||d(U.type("string"),{pattern:new RegExp(h,b.caseInsensitive?"i":c)})),{id:g,regexp:h,segment:i,type:j,cfg:k}}b=R({params:{}},O(b)?b:{});var i,j=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,k=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,l="^",m=0,n=this.segments=[],o=e?e.params:{},p=this.params=e?e.params.$$new():new U.ParamSet,q=[];this.source=a;for(var r,s,t;(i=j.exec(a))&&(r=h(i,!1),!(r.segment.indexOf("?")>=0));)s=f(r.id,r.type,r.cfg,"path"),l+=g(r.segment,s.type.pattern.source,s.squash,s.isOptional),n.push(r.segment),m=j.lastIndex;t=a.substring(m);var u=t.indexOf("?");if(u>=0){var v=this.sourceSearch=t.substring(u);if(t=t.substring(0,u),this.sourcePath=a.substring(0,m+u),v.length>0)for(m=0;i=k.exec(v);)r=h(i,!0),s=f(r.id,r.type,r.cfg,"search"),m=j.lastIndex}else this.sourcePath=a,this.sourceSearch="";l+=g(t)+(b.strict===!1?"/?":"")+"$",n.push(t),this.regexp=new RegExp(l,b.caseInsensitive?"i":c),this.prefix=n[0],this.$$paramNames=q}function s(a){R(this,a)}function t(){function a(a){return null!=a?a.toString().replace(/~/g,"~~").replace(/\//g,"~2F"):a}function e(a){return null!=a?a.toString().replace(/~2F/g,"/").replace(/~~/g,"~"):a}function f(){return{strict:p,caseInsensitive:m}}function i(a){return M(a)||P(a)&&M(a[a.length-1])}function j(){for(;w.length;){var a=w.shift();if(a.pattern)throw new Error("You cannot override a type's .pattern at runtime.");b.extend(u[a.name],l.invoke(a.def))}}function k(a){R(this,a||{})}U=this;var l,m=!1,p=!0,q=!1,u={},v=!0,w=[],x={string:{encode:a,decode:e,is:function(a){return null==a||!L(a)||"string"==typeof a},pattern:/[^\/]*/},"int":{encode:a,decode:function(a){return parseInt(a,10)},is:function(a){return L(a)&&this.decode(a.toString())===a},pattern:/\d+/},bool:{encode:function(a){return a?1:0},decode:function(a){return 0!==parseInt(a,10)},is:function(a){return a===!0||a===!1},pattern:/0|1/},date:{encode:function(a){return this.is(a)?[a.getFullYear(),("0"+(a.getMonth()+1)).slice(-2),("0"+a.getDate()).slice(-2)].join("-"):c},decode:function(a){if(this.is(a))return a;var b=this.capture.exec(a);return b?new Date(b[1],b[2]-1,b[3]):c},is:function(a){return a instanceof Date&&!isNaN(a.valueOf())},equals:function(a,b){return this.is(a)&&this.is(b)&&a.toISOString()===b.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:b.toJson,decode:b.fromJson,is:b.isObject,equals:b.equals,pattern:/[^\/]*/},any:{encode:b.identity,decode:b.identity,equals:b.equals,pattern:/.*/}};t.$$getDefaultValue=function(a){if(!i(a.value))return a.value;if(!l)throw new Error("Injectable functions cannot be called at configuration time");return l.invoke(a.value)},this.caseInsensitive=function(a){return L(a)&&(m=a),m},this.strictMode=function(a){return L(a)&&(p=a),p},this.defaultSquashPolicy=function(a){if(!L(a))return q;if(a!==!0&&a!==!1&&!N(a))throw new Error("Invalid squash policy: "+a+". Valid policies: false, true, arbitrary-string");return q=a,a},this.compile=function(a,b){return new r(a,R(f(),b))},this.isMatcher=function(a){if(!O(a))return!1;var b=!0;return Q(r.prototype,function(c,d){M(c)&&(b=b&&L(a[d])&&M(a[d]))}),b},this.type=function(a,b,c){if(!L(b))return u[a];if(u.hasOwnProperty(a))throw new Error("A type named '"+a+"' has already been defined.");return u[a]=new s(R({name:a},b)),c&&(w.push({name:a,def:c}),v||j()),this},Q(x,function(a,b){u[b]=new s(R({name:b},a))}),u=d(u,{}),this.$get=["$injector",function(a){return l=a,v=!1,j(),Q(x,function(a,b){u[b]||(u[b]=new s(a))}),this}],this.Param=function(a,d,e,f){function j(a){var b=O(a)?g(a):[],c=-1===h(b,"value")&&-1===h(b,"type")&&-1===h(b,"squash")&&-1===h(b,"array");return c&&(a={value:a}),a.$$fn=i(a.value)?a.value:function(){return a.value},a}function k(c,d,e){if(c.type&&d)throw new Error("Param '"+a+"' has two type configurations.");return d?d:c.type?b.isString(c.type)?u[c.type]:c.type instanceof s?c.type:new s(c.type):"config"===e?u.any:u.string}function m(){var b={array:"search"===f?"auto":!1},c=a.match(/\[\]$/)?{array:!0}:{};return R(b,c,e).array}function p(a,b){var c=a.squash;if(!b||c===!1)return!1;if(!L(c)||null==c)return q;if(c===!0||N(c))return c;throw new Error("Invalid squash policy: '"+c+"'. Valid policies: false, true, or arbitrary string")}function r(a,b,d,e){var f,g,i=[{from:"",to:d||b?c:""},{from:null,to:d||b?c:""}];return f=P(a.replace)?a.replace:[],N(e)&&f.push({from:e,to:c}),g=o(f,function(a){return a.from}),n(i,function(a){return-1===h(g,a.from)}).concat(f)}function t(){if(!l)throw new Error("Injectable functions cannot be called at configuration time");var a=l.invoke(e.$$fn);if(null!==a&&a!==c&&!x.type.is(a))throw new Error("Default value ("+a+") for parameter '"+x.id+"' is not an instance of Type ("+x.type.name+")");return a}function v(a){function b(a){return function(b){return b.from===a}}function c(a){var c=o(n(x.replace,b(a)),function(a){return a.to});return c.length?c[0]:a}return a=c(a),L(a)?x.type.$normalize(a):t()}function w(){return"{Param:"+a+" "+d+" squash: '"+A+"' optional: "+z+"}"}var x=this;e=j(e),d=k(e,d,f);var y=m();d=y?d.$asArray(y,"search"===f):d,"string"!==d.name||y||"path"!==f||e.value!==c||(e.value="");var z=e.value!==c,A=p(e,z),B=r(e,y,z,A);R(this,{id:a,type:d,location:f,array:y,squash:A,replace:B,isOptional:z,value:v,dynamic:c,config:e,toString:w})},k.prototype={$$new:function(){return d(this,R(new k,{$$parent:this}))},$$keys:function(){for(var a=[],b=[],c=this,d=g(k.prototype);c;)b.push(c),c=c.$$parent;return b.reverse(),Q(b,function(b){Q(g(b),function(b){-1===h(a,b)&&-1===h(d,b)&&a.push(b)})}),a},$$values:function(a){var b={},c=this;return Q(c.$$keys(),function(d){b[d]=c[d].value(a&&a[d])}),b},$$equals:function(a,b){var c=!0,d=this;return Q(d.$$keys(),function(e){var f=a&&a[e],g=b&&b[e];d[e].type.equals(f,g)||(c=!1)}),c},$$validates:function(a){var d,e,f,g,h,i=this.$$keys();for(d=0;d<i.length&&(e=this[i[d]],f=a[i[d]],f!==c&&null!==f||!e.isOptional);d++){if(g=e.type.$normalize(f),!e.type.is(g))return!1;if(h=e.type.encode(g),b.isString(h)&&!e.type.pattern.exec(h))return!1}return!0},$$parent:c},this.ParamSet=k}function u(a,d){function e(a){var b=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(a.source);return null!=b?b[1].replace(/\\(.)/g,"$1"):""}function f(a,b){return a.replace(/\$(\$|\d{1,2})/,function(a,c){return b["$"===c?0:Number(c)]})}function g(a,b,c){if(!c)return!1;var d=a.invoke(b,b,{$match:c});return L(d)?d:!0}function h(d,e,f,g,h){function m(a,b,c){return"/"===q?a:b?q.slice(0,-1)+a:c?q.slice(1)+a:a}function n(a){function b(a){var b=a(f,d);return b?(N(b)&&d.replace().url(b),!0):!1}if(!a||!a.defaultPrevented){p&&d.url()===p;p=c;var e,g=j.length;for(e=0;g>e;e++)if(b(j[e]))return;k&&b(k)}}function o(){return i=i||e.$on("$locationChangeSuccess",n)}var p,q=g.baseHref(),r=d.url();return l||o(),{sync:function(){n()},listen:function(){return o()},update:function(a){return a?void(r=d.url()):void(d.url()!==r&&(d.url(r),d.replace()))},push:function(a,b,e){var f=a.format(b||{});null!==f&&b&&b["#"]&&(f+="#"+b["#"]),d.url(f),p=e&&e.$$avoidResync?d.url():c,e&&e.replace&&d.replace()},href:function(c,e,f){if(!c.validates(e))return null;var g=a.html5Mode();b.isObject(g)&&(g=g.enabled),g=g&&h.history;var i=c.format(e);if(f=f||{},g||null===i||(i="#"+a.hashPrefix()+i),null!==i&&e&&e["#"]&&(i+="#"+e["#"]),i=m(i,g,f.absolute),!f.absolute||!i)return i;var j=!g&&i?"/":"",k=d.port();return k=80===k||443===k?"":":"+k,[d.protocol(),"://",d.host(),k,j,i].join("")}}}var i,j=[],k=null,l=!1;this.rule=function(a){if(!M(a))throw new Error("'rule' must be a function");return j.push(a),this},this.otherwise=function(a){if(N(a)){var b=a;a=function(){return b}}else if(!M(a))throw new Error("'rule' must be a function");return k=a,this},this.when=function(a,b){var c,h=N(b);if(N(a)&&(a=d.compile(a)),!h&&!M(b)&&!P(b))throw new Error("invalid 'handler' in when()");var i={matcher:function(a,b){return h&&(c=d.compile(b),b=["$match",function(a){return c.format(a)}]),R(function(c,d){return g(c,b,a.exec(d.path(),d.search()))},{prefix:N(a.prefix)?a.prefix:""})},regex:function(a,b){if(a.global||a.sticky)throw new Error("when() RegExp must not be global or sticky");return h&&(c=b,b=["$match",function(a){return f(c,a)}]),R(function(c,d){return g(c,b,a.exec(d.path()))},{prefix:e(a)})}},j={matcher:d.isMatcher(a),regex:a instanceof RegExp};for(var k in j)if(j[k])return this.rule(i[k](a,b));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(a){a===c&&(a=!0),l=a},this.$get=h,h.$inject=["$location","$rootScope","$injector","$browser","$sniffer"]}function v(a,e){function f(a){return 0===a.indexOf(".")||0===a.indexOf("^")}function m(a,b){if(!a)return c;var d=N(a),e=d?a:a.name,g=f(e);if(g){if(!b)throw new Error("No reference point given for path '"+e+"'");b=m(b);for(var h=e.split("."),i=0,j=h.length,k=b;j>i;i++)if(""!==h[i]||0!==i){if("^"!==h[i])break;if(!k.parent)throw new Error("Path '"+e+"' not valid for state '"+b.name+"'");k=k.parent}else k=b;h=h.slice(i).join("."),e=k.name+(k.name&&h?".":"")+h}var l=z[e];return!l||!d&&(d||l!==a&&l.self!==a)?c:l}function n(a,b){A[a]||(A[a]=[]),A[a].push(b)}function p(a){for(var b=A[a]||[];b.length;)q(b.shift())}function q(b){b=d(b,{self:b,resolve:b.resolve||{},toString:function(){return this.name}});var c=b.name;if(!N(c)||c.indexOf("@")>=0)throw new Error("State must have a valid name");if(z.hasOwnProperty(c))throw new Error("State '"+c+"' is already defined");var e=-1!==c.indexOf(".")?c.substring(0,c.lastIndexOf(".")):N(b.parent)?b.parent:O(b.parent)&&N(b.parent.name)?b.parent.name:"";if(e&&!z[e])return n(e,b.self);for(var f in C)M(C[f])&&(b[f]=C[f](b,C.$delegates[f]));return z[c]=b,!b[B]&&b.url&&a.when(b.url,["$match","$stateParams",function(a,c){y.$current.navigable==b&&j(a,c)||y.transitionTo(b,a,{inherit:!0,location:!1})}]),p(c),b}function r(a){return a.indexOf("*")>-1}function s(a){for(var b=a.split("."),c=y.$current.name.split("."),d=0,e=b.length;e>d;d++)"*"===b[d]&&(c[d]="*");return"**"===b[0]&&(c=c.slice(h(c,b[1])),c.unshift("**")),"**"===b[b.length-1]&&(c.splice(h(c,b[b.length-2])+1,Number.MAX_VALUE),c.push("**")),b.length!=c.length?!1:c.join("")===b.join("")}function t(a,b){return N(a)&&!L(b)?C[a]:M(b)&&N(a)?(C[a]&&!C.$delegates[a]&&(C.$delegates[a]=C[a]),C[a]=b,this):this}function u(a,b){return O(a)?b=a:b.name=a,q(b),this}function v(a,e,f,h,l,n,p,q,t){function u(b,c,d,f){var g=a.$broadcast("$stateNotFound",b,c,d);if(g.defaultPrevented)return p.update(),D;if(!g.retry)return null;if(f.$retry)return p.update(),E;var h=y.transition=e.when(g.retry);return h.then(function(){return h!==y.transition?A:(b.options.$retry=!0,y.transitionTo(b.to,b.toParams,b.options))},function(){return D}),p.update(),h}function v(a,c,d,g,i,j){function m(){var c=[];return Q(a.views,function(d,e){var g=d.resolve&&d.resolve!==a.resolve?d.resolve:{};g.$template=[function(){return f.load(e,{view:d,locals:i.globals,params:n,notify:j.notify})||""}],c.push(l.resolve(g,i.globals,i.resolve,a).then(function(c){if(M(d.controllerProvider)||P(d.controllerProvider)){var f=b.extend({},g,i.globals);c.$$controller=h.invoke(d.controllerProvider,null,f)}else c.$$controller=d.controller;c.$$state=a,c.$$controllerAs=d.controllerAs,c.$$resolveAs=d.resolveAs,i[e]=c}))}),e.all(c).then(function(){return i.globals})}var n=d?c:k(a.params.$$keys(),c),o={$stateParams:n};i.resolve=l.resolve(a.resolve,o,i.resolve,a);var p=[i.resolve.then(function(a){i.globals=a})];return g&&p.push(g),e.all(p).then(m).then(function(a){return i})}var A=e.reject(new Error("transition superseded")),C=e.reject(new Error("transition prevented")),D=e.reject(new Error("transition aborted")),E=e.reject(new Error("transition failed"));return x.locals={resolve:null,globals:{$stateParams:{}}},y={params:{},current:x.self,$current:x,transition:null},y.reload=function(a){return y.transitionTo(y.current,n,{reload:a||!0,inherit:!1,notify:!0})},y.go=function(a,b,c){return y.transitionTo(a,b,R({inherit:!0,relative:y.$current},c))},y.transitionTo=function(b,c,f){c=c||{},f=R({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},f||{});var g,j=y.$current,l=y.params,o=j.path,q=m(b,f.relative),r=c["#"];if(!L(q)){var s={to:b,toParams:c,options:f},t=u(s,j.self,l,f);if(t)return t;if(b=s.to,c=s.toParams,f=s.options,q=m(b,f.relative),!L(q)){if(!f.relative)throw new Error("No such state '"+b+"'");throw new Error("Could not resolve '"+b+"' from state '"+f.relative+"'")}}if(q[B])throw new Error("Cannot transition to abstract state '"+b+"'");if(f.inherit&&(c=i(n,c||{},y.$current,q)),!q.params.$$validates(c))return E;c=q.params.$$values(c),b=q;var z=b.path,D=0,F=z[D],G=x.locals,H=[];if(f.reload){if(N(f.reload)||O(f.reload)){if(O(f.reload)&&!f.reload.name)throw new Error("Invalid reload state object");var I=f.reload===!0?o[0]:m(f.reload);if(f.reload&&!I)throw new Error("No such reload state '"+(N(f.reload)?f.reload:f.reload.name)+"'");for(;F&&F===o[D]&&F!==I;)G=H[D]=F.locals,D++,F=z[D]}}else for(;F&&F===o[D]&&F.ownParams.$$equals(c,l);)G=H[D]=F.locals,D++,F=z[D];if(w(b,c,j,l,G,f))return r&&(c["#"]=r),y.params=c,S(y.params,n),S(k(b.params.$$keys(),n),b.locals.globals.$stateParams),f.location&&b.navigable&&b.navigable.url&&(p.push(b.navigable.url,c,{$$avoidResync:!0,replace:"replace"===f.location}),p.update(!0)),y.transition=null,e.when(y.current);if(c=k(b.params.$$keys(),c||{}),r&&(c["#"]=r),f.notify&&a.$broadcast("$stateChangeStart",b.self,c,j.self,l,f).defaultPrevented)return a.$broadcast("$stateChangeCancel",b.self,c,j.self,l),null==y.transition&&p.update(),C;for(var J=e.when(G),K=D;K<z.length;K++,F=z[K])G=H[K]=d(G),J=v(F,c,F===b,J,G,f);var M=y.transition=J.then(function(){var d,e,g;if(y.transition!==M)return A;for(d=o.length-1;d>=D;d--)g=o[d],g.self.onExit&&h.invoke(g.self.onExit,g.self,g.locals.globals),g.locals=null;for(d=D;d<z.length;d++)e=z[d],e.locals=H[d],e.self.onEnter&&h.invoke(e.self.onEnter,e.self,e.locals.globals);return y.transition!==M?A:(y.$current=b,y.current=b.self,y.params=c,S(y.params,n),y.transition=null,f.location&&b.navigable&&p.push(b.navigable.url,b.navigable.locals.globals.$stateParams,{$$avoidResync:!0,replace:"replace"===f.location}),f.notify&&a.$broadcast("$stateChangeSuccess",b.self,c,j.self,l),p.update(!0),y.current)}).then(null,function(d){return y.transition!==M?A:(y.transition=null,g=a.$broadcast("$stateChangeError",b.self,c,j.self,l,d),g.defaultPrevented||p.update(),e.reject(d))});return M},y.is=function(a,b,d){d=R({relative:y.$current},d||{});var e=m(a,d.relative);return L(e)?y.$current!==e?!1:b?j(e.params.$$values(b),n):!0:c},y.includes=function(a,b,d){if(d=R({relative:y.$current},d||{}),N(a)&&r(a)){if(!s(a))return!1;a=y.$current.name}var e=m(a,d.relative);return L(e)?L(y.$current.includes[e.name])?b?j(e.params.$$values(b),n,g(b)):!0:!1:c},y.href=function(a,b,d){d=R({lossy:!0,inherit:!0,absolute:!1,relative:y.$current},d||{});var e=m(a,d.relative);if(!L(e))return null;d.inherit&&(b=i(n,b||{},y.$current,e));var f=e&&d.lossy?e.navigable:e;return f&&f.url!==c&&null!==f.url?p.href(f.url,k(e.params.$$keys().concat("#"),b||{}),{absolute:d.absolute}):null},y.get=function(a,b){if(0===arguments.length)return o(g(z),function(a){return z[a].self});var c=m(a,b||y.$current);return c&&c.self?c.self:null},y}function w(a,b,c,d,e,f){function g(a,b,c){function d(b){return"search"!=a.params[b].location}var e=a.params.$$keys().filter(d),f=l.apply({},[a.params].concat(e)),g=new U.ParamSet(f);return g.$$equals(b,c)}return!f.reload&&a===c&&(e===c.locals||a.self.reloadOnSearch===!1&&g(c,d,b))?!0:void 0}var x,y,z={},A={},B="abstract",C={parent:function(a){if(L(a.parent)&&a.parent)return m(a.parent);var b=/^(.+)\.[^.]+$/.exec(a.name);return b?m(b[1]):x},data:function(a){return a.parent&&a.parent.data&&(a.data=a.self.data=d(a.parent.data,a.data)),a.data},url:function(a){var b=a.url,c={params:a.params||{}};if(N(b))return"^"==b.charAt(0)?e.compile(b.substring(1),c):(a.parent.navigable||x).url.concat(b,c);if(!b||e.isMatcher(b))return b;throw new Error("Invalid url '"+b+"' in state '"+a+"'")},navigable:function(a){return a.url?a:a.parent?a.parent.navigable:null},ownParams:function(a){var b=a.url&&a.url.params||new U.ParamSet;return Q(a.params||{},function(a,c){b[c]||(b[c]=new U.Param(c,null,a,"config"))}),b},params:function(a){var b=l(a.ownParams,a.ownParams.$$keys());return a.parent&&a.parent.params?R(a.parent.params.$$new(),b):new U.ParamSet},views:function(a){var b={};return Q(L(a.views)?a.views:{"":a},function(c,d){d.indexOf("@")<0&&(d+="@"+a.parent.name),c.resolveAs=c.resolveAs||a.resolveAs||"$resolve",b[d]=c}),b},path:function(a){return a.parent?a.parent.path.concat(a):[]},includes:function(a){var b=a.parent?R({},a.parent.includes):{};return b[a.name]=!0,b},$delegates:{}};x=q({name:"",url:"^",views:null,"abstract":!0}),x.navigable=null,this.decorator=t,this.state=u,this.$get=v,v.$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$urlRouter","$location","$urlMatcherFactory"]}function w(){function a(a,b){return{load:function(a,c){var d,e={template:null,controller:null,view:null,locals:null,notify:!0,async:!0,params:{}};return c=R(e,c),c.view&&(d=b.fromConfig(c.view,c.params,c.locals)),d}}}this.$get=a,a.$inject=["$rootScope","$templateFactory"]}function x(){var a=!1;this.useAnchorScroll=function(){a=!0},this.$get=["$anchorScroll","$timeout",function(b,c){return a?b:function(a){return c(function(){a[0].scrollIntoView()},0,!1)}}]}function y(a,c,d,e,f){function g(){return c.has?function(a){return c.has(a)?c.get(a):null}:function(a){try{return c.get(a)}catch(b){return null}}}function h(a,c){var d=function(){return{enter:function(a,b,c){b.after(a),c()},leave:function(a,b){a.remove(),b()}}};if(k)return{enter:function(a,c,d){b.version.minor>2?k.enter(a,null,c).then(d):k.enter(a,null,c,d)},leave:function(a,c){b.version.minor>2?k.leave(a).then(c):k.leave(a,c)}};if(j){var e=j&&j(c,a);return{enter:function(a,b,c){e.enter(a,null,b),c()},leave:function(a,b){e.leave(a),b()}}}return d()}var i=g(),j=i("$animator"),k=i("$animate"),l={restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(c,g,i){return function(c,g,j){function k(){if(m&&(m.remove(),m=null),o&&(o.$destroy(),o=null),n){var a=n.data("$uiViewAnim");s.leave(n,function(){a.$$animLeave.resolve(),m=null}),m=n,n=null}}function l(h){var l,m=A(c,j,g,e),t=m&&a.$current&&a.$current.locals[m];if(h||t!==p){l=c.$new(),p=a.$current.locals[m],l.$emit("$viewContentLoading",m);var u=i(l,function(a){var e=f.defer(),h=f.defer(),i={$animEnter:e.promise,$animLeave:h.promise,$$animLeave:h};a.data("$uiViewAnim",i),s.enter(a,g,function(){e.resolve(),o&&o.$emit("$viewContentAnimationEnded"),(b.isDefined(r)&&!r||c.$eval(r))&&d(a)}),k()});n=u,o=l,o.$emit("$viewContentLoaded",m),o.$eval(q)}}var m,n,o,p,q=j.onload||"",r=j.autoscroll,s=h(j,c);g.inheritedData("$uiView");c.$on("$stateChangeSuccess",function(){l(!1)}),l(!0)}}};return l}function z(a,c,d,e){return{restrict:"ECA",priority:-400,compile:function(f){var g=f.html();return function(f,h,i){var j=d.$current,k=A(f,i,h,e),l=j&&j.locals[k];if(l){h.data("$uiView",{name:k,state:l.$$state}),h.html(l.$template?l.$template:g);var m=b.extend({},l);f[l.$$resolveAs]=m;var n=a(h.contents());if(l.$$controller){l.$scope=f,l.$element=h;var o=c(l.$$controller,l);l.$$controllerAs&&(f[l.$$controllerAs]=o,f[l.$$controllerAs][l.$$resolveAs]=m),M(o.$onInit)&&o.$onInit(),h.data("$ngControllerController",o),h.children().data("$ngControllerController",o)}n(f)}}}}}function A(a,b,c,d){var e=d(b.uiView||b.name||"")(a),f=c.inheritedData("$uiView");return e.indexOf("@")>=0?e:e+"@"+(f?f.state.name:"")}function B(a,b){var c,d=a.match(/^\s*({[^}]*})\s*$/);if(d&&(a=b+"("+d[1]+")"),c=a.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!c||4!==c.length)throw new Error("Invalid state ref '"+a+"'");return{state:c[1],paramExpr:c[3]||null}}function C(a){var b=a.parent().inheritedData("$uiView");return b&&b.state&&b.state.name?b.state:void 0}function D(a){var b="[object SVGAnimatedString]"===Object.prototype.toString.call(a.prop("href")),c="FORM"===a[0].nodeName;return{attr:c?"action":b?"xlink:href":"href",isAnchor:"A"===a.prop("tagName").toUpperCase(),clickable:!c}}function E(a,b,c,d,e){return function(f){var g=f.which||f.button,h=e();if(!(g>1||f.ctrlKey||f.metaKey||f.shiftKey||a.attr("target"))){var i=c(function(){b.go(h.state,h.params,h.options)});f.preventDefault();var j=d.isAnchor&&!h.href?1:0;f.preventDefault=function(){j--<=0&&c.cancel(i)}}}}function F(a,b){return{relative:C(a)||b.$current,inherit:!0}}function G(a,c){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(d,e,f,g){var h,i=B(f.uiSref,a.current.name),j={state:i.state,href:null,params:null},k=D(e),l=g[1]||g[0],m=null;j.options=R(F(e,a),f.uiSrefOpts?d.$eval(f.uiSrefOpts):{});var n=function(c){c&&(j.params=b.copy(c)),j.href=a.href(i.state,j.params,j.options),m&&m(),l&&(m=l.$$addStateInfo(i.state,j.params)),null!==j.href&&f.$set(k.attr,j.href)};i.paramExpr&&(d.$watch(i.paramExpr,function(a){a!==j.params&&n(a)},!0),j.params=b.copy(d.$eval(i.paramExpr))),n(),k.clickable&&(h=E(e,a,c,k,function(){return j}),e.bind("click",h),d.$on("$destroy",function(){e.unbind("click",h)}))}}}function H(a,b){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(c,d,e,f){function g(b){m.state=b[0],m.params=b[1],m.options=b[2],m.href=a.href(m.state,m.params,m.options),n&&n(),j&&(n=j.$$addStateInfo(m.state,m.params)),m.href&&e.$set(i.attr,m.href)}var h,i=D(d),j=f[1]||f[0],k=[e.uiState,e.uiStateParams||null,e.uiStateOpts||null],l="["+k.map(function(a){return a||"null"}).join(", ")+"]",m={state:null,params:null,options:null,href:null},n=null;c.$watch(l,g,!0),g(c.$eval(l)),i.clickable&&(h=E(d,a,b,i,function(){return m}),d.bind("click",h),c.$on("$destroy",function(){d.unbind("click",h)}))}}}function I(a,b,c){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(b,d,e,f){function g(b,c,e){var f=a.get(b,C(d)),g=h(b,c),i={state:f||{name:b},params:c,hash:g};return p.push(i),q[g]=e,function(){var a=p.indexOf(i);-1!==a&&p.splice(a,1)}}function h(a,c){if(!N(a))throw new Error("state should be a string");return O(c)?a+T(c):(c=b.$eval(c),O(c)?a+T(c):a)}function i(){for(var a=0;a<p.length;a++)l(p[a].state,p[a].params)?j(d,q[p[a].hash]):k(d,q[p[a].hash]),m(p[a].state,p[a].params)?j(d,n):k(d,n)}function j(a,b){f(function(){a.addClass(b)})}function k(a,b){a.removeClass(b)}function l(b,c){return a.includes(b.name,c)}function m(b,c){return a.is(b.name,c)}var n,o,p=[],q={};n=c(e.uiSrefActiveEq||"",!1)(b);try{o=b.$eval(e.uiSrefActive)}catch(r){}o=o||c(e.uiSrefActive||"",!1)(b),O(o)&&Q(o,function(c,d){if(N(c)){var e=B(c,a.current.name);g(e.state,b.$eval(e.paramExpr),d)}}),this.$$addStateInfo=function(a,b){if(!(O(o)&&p.length>0)){var c=g(a,b,o);return i(),c}},b.$on("$stateChangeSuccess",i),i()}]}}function J(a){var b=function(b,c){return a.is(b,c)};return b.$stateful=!0,b}function K(a){var b=function(b,c,d){return a.includes(b,c,d)};return b.$stateful=!0,b}var L=b.isDefined,M=b.isFunction,N=b.isString,O=b.isObject,P=b.isArray,Q=b.forEach,R=b.extend,S=b.copy,T=b.toJson;b.module("ui.router.util",["ng"]),b.module("ui.router.router",["ui.router.util"]),b.module("ui.router.state",["ui.router.router","ui.router.util"]),b.module("ui.router",["ui.router.state"]),b.module("ui.router.compat",["ui.router"]),p.$inject=["$q","$injector"],b.module("ui.router.util").service("$resolve",p),q.$inject=["$http","$templateCache","$injector"],b.module("ui.router.util").service("$templateFactory",q);var U;r.prototype.concat=function(a,b){var c={caseInsensitive:U.caseInsensitive(),strict:U.strictMode(),squash:U.defaultSquashPolicy()};return new r(this.sourcePath+a+this.sourceSearch,R(c,b),this)},r.prototype.toString=function(){return this.source},r.prototype.exec=function(a,b){function c(a){function b(a){return a.split("").reverse().join("")}function c(a){return a.replace(/\\-/g,"-")}var d=b(a).split(/-(?!\\)/),e=o(d,b);return o(e,c).reverse()}var d=this.regexp.exec(a);if(!d)return null;b=b||{};var e,f,g,h=this.parameters(),i=h.length,j=this.segments.length-1,k={};if(j!==d.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");var l,m;for(e=0;j>e;e++){for(g=h[e],l=this.params[g],m=d[e+1],f=0;f<l.replace.length;f++)l.replace[f].from===m&&(m=l.replace[f].to);m&&l.array===!0&&(m=c(m)),L(m)&&(m=l.type.decode(m)),k[g]=l.value(m)}for(;i>e;e++){for(g=h[e],k[g]=this.params[g].value(b[g]),l=this.params[g],m=b[g],f=0;f<l.replace.length;f++)l.replace[f].from===m&&(m=l.replace[f].to);L(m)&&(m=l.type.decode(m)),k[g]=l.value(m)}return k},r.prototype.parameters=function(a){return L(a)?this.params[a]||null:this.$$paramNames},r.prototype.validates=function(a){return this.params.$$validates(a)},r.prototype.format=function(a){function b(a){return encodeURIComponent(a).replace(/-/g,function(a){return"%5C%"+a.charCodeAt(0).toString(16).toUpperCase()})}a=a||{};var c=this.segments,d=this.parameters(),e=this.params;if(!this.validates(a))return null;var f,g=!1,h=c.length-1,i=d.length,j=c[0];for(f=0;i>f;f++){var k=h>f,l=d[f],m=e[l],n=m.value(a[l]),p=m.isOptional&&m.type.equals(m.value(),n),q=p?m.squash:!1,r=m.type.encode(n);if(k){var s=c[f+1],t=f+1===h;if(q===!1)null!=r&&(j+=P(r)?o(r,b).join("-"):encodeURIComponent(r)),j+=s;else if(q===!0){var u=j.match(/\/$/)?/\/?(.*)/:/(.*)/;j+=s.match(u)[1]}else N(q)&&(j+=q+s);t&&m.squash===!0&&"/"===j.slice(-1)&&(j=j.slice(0,-1))}else{if(null==r||p&&q!==!1)continue;if(P(r)||(r=[r]),0===r.length)continue;r=o(r,encodeURIComponent).join("&"+l+"="),j+=(g?"&":"?")+(l+"="+r),g=!0}}return j},s.prototype.is=function(a,b){return!0},s.prototype.encode=function(a,b){return a},s.prototype.decode=function(a,b){return a},s.prototype.equals=function(a,b){return a==b},s.prototype.$subPattern=function(){var a=this.pattern.toString();return a.substr(1,a.length-2)},s.prototype.pattern=/.*/,s.prototype.toString=function(){return"{Type:"+this.name+"}"},s.prototype.$normalize=function(a){return this.is(a)?a:this.decode(a)},s.prototype.$asArray=function(a,b){function d(a,b){function d(a,b){return function(){return a[b].apply(a,arguments)}}function e(a){return P(a)?a:L(a)?[a]:[]}function f(a){switch(a.length){case 0:return c;case 1:return"auto"===b?a[0]:a;default:return a}}function g(a){return!a}function h(a,b){return function(c){if(P(c)&&0===c.length)return c;c=e(c);var d=o(c,a);return b===!0?0===n(d,g).length:f(d)}}function i(a){return function(b,c){var d=e(b),f=e(c);if(d.length!==f.length)return!1;for(var g=0;g<d.length;g++)if(!a(d[g],f[g]))return!1;return!0}}this.encode=h(d(a,"encode")),this.decode=h(d(a,"decode")),this.is=h(d(a,"is"),!0),this.equals=i(d(a,"equals")),this.pattern=a.pattern,this.$normalize=h(d(a,"$normalize")),this.name=a.name,this.$arrayMode=b}if(!a)return this;if("auto"===a&&!b)throw new Error("'auto' array mode is for query parameters only");return new d(this,a)},b.module("ui.router.util").provider("$urlMatcherFactory",t),b.module("ui.router.util").run(["$urlMatcherFactory",function(a){}]),u.$inject=["$locationProvider","$urlMatcherFactoryProvider"],b.module("ui.router.router").provider("$urlRouter",u),v.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"],b.module("ui.router.state").factory("$stateParams",function(){return{}}).constant("$state.runtime",{autoinject:!0}).provider("$state",v).run(["$injector",function(a){
+a.get("$state.runtime").autoinject&&a.get("$state")}]),w.$inject=[],b.module("ui.router.state").provider("$view",w),b.module("ui.router.state").provider("$uiViewScroll",x),y.$inject=["$state","$injector","$uiViewScroll","$interpolate","$q"],z.$inject=["$compile","$controller","$state","$interpolate"],b.module("ui.router.state").directive("uiView",y),b.module("ui.router.state").directive("uiView",z),G.$inject=["$state","$timeout"],H.$inject=["$state","$timeout"],I.$inject=["$state","$stateParams","$interpolate"],b.module("ui.router.state").directive("uiSref",G).directive("uiSrefActive",I).directive("uiSrefActiveEq",I).directive("uiState",H),J.$inject=["$state"],K.$inject=["$state"],b.module("ui.router.state").filter("isState",J).filter("includedByState",K)}(window,window.angular); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/js/angular.min.js b/common/src/main/webapp/thirdparty/js/angular.min.js
new file mode 100644
index 0000000..89d4aaa
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/js/angular.min.js
@@ -0,0 +1,295 @@
+/*
+ AngularJS v1.4.8
+ (c) 2010-2015 Google, Inc. http://angularjs.org
+ License: MIT
+ */
+(function(S,X,u){'use strict';function G(a){return function(){var b=arguments[0],d;d="["+(a?a+":":"")+b+"] http://errors.angularjs.org/1.4.8/"+(a?a+"/":"")+b;for(b=1;b<arguments.length;b++){d=d+(1==b?"?":"&")+"p"+(b-1)+"=";var c=encodeURIComponent,e;e=arguments[b];e="function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof e?"undefined":"string"!=typeof e?JSON.stringify(e):e;d+=c(e)}return Error(d)}}function za(a){if(null==a||Xa(a))return!1;if(I(a)||E(a)||B&&a instanceof B)return!0;
+ var b="length"in Object(a)&&a.length;return Q(b)&&(0<=b&&b-1 in a||"function"==typeof a.item)}function n(a,b,d){var c,e;if(a)if(z(a))for(c in a)"prototype"==c||"length"==c||"name"==c||a.hasOwnProperty&&!a.hasOwnProperty(c)||b.call(d,a[c],c,a);else if(I(a)||za(a)){var f="object"!==typeof a;c=0;for(e=a.length;c<e;c++)(f||c in a)&&b.call(d,a[c],c,a)}else if(a.forEach&&a.forEach!==n)a.forEach(b,d,a);else if(nc(a))for(c in a)b.call(d,a[c],c,a);else if("function"===typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&
+b.call(d,a[c],c,a);else for(c in a)qa.call(a,c)&&b.call(d,a[c],c,a);return a}function oc(a,b,d){for(var c=Object.keys(a).sort(),e=0;e<c.length;e++)b.call(d,a[c[e]],c[e]);return c}function pc(a){return function(b,d){a(d,b)}}function Td(){return++nb}function Mb(a,b,d){for(var c=a.$$hashKey,e=0,f=b.length;e<f;++e){var g=b[e];if(H(g)||z(g))for(var h=Object.keys(g),k=0,l=h.length;k<l;k++){var m=h[k],r=g[m];d&&H(r)?da(r)?a[m]=new Date(r.valueOf()):Ma(r)?a[m]=new RegExp(r):r.nodeName?a[m]=r.cloneNode(!0):
+ Nb(r)?a[m]=r.clone():(H(a[m])||(a[m]=I(r)?[]:{}),Mb(a[m],[r],!0)):a[m]=r}}c?a.$$hashKey=c:delete a.$$hashKey;return a}function M(a){return Mb(a,ra.call(arguments,1),!1)}function Ud(a){return Mb(a,ra.call(arguments,1),!0)}function ea(a){return parseInt(a,10)}function Ob(a,b){return M(Object.create(a),b)}function x(){}function Ya(a){return a}function na(a){return function(){return a}}function qc(a){return z(a.toString)&&a.toString!==sa}function q(a){return"undefined"===typeof a}function y(a){return"undefined"!==
+ typeof a}function H(a){return null!==a&&"object"===typeof a}function nc(a){return null!==a&&"object"===typeof a&&!rc(a)}function E(a){return"string"===typeof a}function Q(a){return"number"===typeof a}function da(a){return"[object Date]"===sa.call(a)}function z(a){return"function"===typeof a}function Ma(a){return"[object RegExp]"===sa.call(a)}function Xa(a){return a&&a.window===a}function Za(a){return a&&a.$evalAsync&&a.$watch}function $a(a){return"boolean"===typeof a}function sc(a){return a&&Q(a.length)&&
+ Vd.test(sa.call(a))}function Nb(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function Wd(a){var b={};a=a.split(",");var d;for(d=0;d<a.length;d++)b[a[d]]=!0;return b}function ta(a){return F(a.nodeName||a[0]&&a[0].nodeName)}function ab(a,b){var d=a.indexOf(b);0<=d&&a.splice(d,1);return d}function bb(a,b){function d(a,b){var d=b.$$hashKey,e;if(I(a)){e=0;for(var f=a.length;e<f;e++)b.push(c(a[e]))}else if(nc(a))for(e in a)b[e]=c(a[e]);else if(a&&"function"===typeof a.hasOwnProperty)for(e in a)a.hasOwnProperty(e)&&
+(b[e]=c(a[e]));else for(e in a)qa.call(a,e)&&(b[e]=c(a[e]));d?b.$$hashKey=d:delete b.$$hashKey;return b}function c(a){if(!H(a))return a;var b=e.indexOf(a);if(-1!==b)return f[b];if(Xa(a)||Za(a))throw Aa("cpws");var b=!1,c;I(a)?(c=[],b=!0):sc(a)?c=new a.constructor(a):da(a)?c=new Date(a.getTime()):Ma(a)?(c=new RegExp(a.source,a.toString().match(/[^\/]*$/)[0]),c.lastIndex=a.lastIndex):z(a.cloneNode)?c=a.cloneNode(!0):(c=Object.create(rc(a)),b=!0);e.push(a);f.push(c);return b?d(a,c):c}var e=[],f=[];if(b){if(sc(b))throw Aa("cpta");
+ if(a===b)throw Aa("cpi");I(b)?b.length=0:n(b,function(a,c){"$$hashKey"!==c&&delete b[c]});e.push(a);f.push(b);return d(a,b)}return c(a)}function ia(a,b){if(I(a)){b=b||[];for(var d=0,c=a.length;d<c;d++)b[d]=a[d]}else if(H(a))for(d in b=b||{},a)if("$"!==d.charAt(0)||"$"!==d.charAt(1))b[d]=a[d];return b||a}function ma(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var d=typeof a,c;if(d==typeof b&&"object"==d)if(I(a)){if(!I(b))return!1;if((d=a.length)==b.length){for(c=
+ 0;c<d;c++)if(!ma(a[c],b[c]))return!1;return!0}}else{if(da(a))return da(b)?ma(a.getTime(),b.getTime()):!1;if(Ma(a))return Ma(b)?a.toString()==b.toString():!1;if(Za(a)||Za(b)||Xa(a)||Xa(b)||I(b)||da(b)||Ma(b))return!1;d=$();for(c in a)if("$"!==c.charAt(0)&&!z(a[c])){if(!ma(a[c],b[c]))return!1;d[c]=!0}for(c in b)if(!(c in d)&&"$"!==c.charAt(0)&&y(b[c])&&!z(b[c]))return!1;return!0}return!1}function cb(a,b,d){return a.concat(ra.call(b,d))}function tc(a,b){var d=2<arguments.length?ra.call(arguments,2):
+ [];return!z(b)||b instanceof RegExp?b:d.length?function(){return arguments.length?b.apply(a,cb(d,arguments,0)):b.apply(a,d)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function Xd(a,b){var d=b;"string"===typeof a&&"$"===a.charAt(0)&&"$"===a.charAt(1)?d=u:Xa(b)?d="$WINDOW":b&&X===b?d="$DOCUMENT":Za(b)&&(d="$SCOPE");return d}function db(a,b){if("undefined"===typeof a)return u;Q(b)||(b=b?2:null);return JSON.stringify(a,Xd,b)}function uc(a){return E(a)?JSON.parse(a):a}function vc(a,
+ b){var d=Date.parse("Jan 01, 1970 00:00:00 "+a)/6E4;return isNaN(d)?b:d}function Pb(a,b,d){d=d?-1:1;var c=vc(b,a.getTimezoneOffset());b=a;a=d*(c-a.getTimezoneOffset());b=new Date(b.getTime());b.setMinutes(b.getMinutes()+a);return b}function ua(a){a=B(a).clone();try{a.empty()}catch(b){}var d=B("<div>").append(a).html();try{return a[0].nodeType===Na?F(d):d.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+F(b)})}catch(c){return F(d)}}function wc(a){try{return decodeURIComponent(a)}catch(b){}}
+ function xc(a){var b={};n((a||"").split("&"),function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=wc(e),y(e)&&(f=y(f)?wc(f):!0,qa.call(b,e)?I(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function Qb(a){var b=[];n(a,function(a,c){I(a)?n(a,function(a){b.push(ja(c,!0)+(!0===a?"":"="+ja(a,!0)))}):b.push(ja(c,!0)+(!0===a?"":"="+ja(a,!0)))});return b.length?b.join("&"):""}function ob(a){return ja(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,
+ "=").replace(/%2B/gi,"+")}function ja(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function Yd(a,b){var d,c,e=Oa.length;for(c=0;c<e;++c)if(d=Oa[c]+b,E(d=a.getAttribute(d)))return d;return null}function Zd(a,b){var d,c,e={};n(Oa,function(b){b+="app";!d&&a.hasAttribute&&a.hasAttribute(b)&&(d=a,c=a.getAttribute(b))});n(Oa,function(b){b+="app";var e;!d&&(e=a.querySelector("["+b.replace(":",
+ "\\:")+"]"))&&(d=e,c=e.getAttribute(b))});d&&(e.strictDi=null!==Yd(d,"strict-di"),b(d,c?[c]:[],e))}function yc(a,b,d){H(d)||(d={});d=M({strictDi:!1},d);var c=function(){a=B(a);if(a.injector()){var c=a[0]===X?"document":ua(a);throw Aa("btstrpd",c.replace(/</,"&lt;").replace(/>/,"&gt;"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]);b.unshift("ng");c=eb(b,d.strictDi);c.invoke(["$rootScope",
+ "$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;S&&e.test(S.name)&&(d.debugInfoEnabled=!0,S.name=S.name.replace(e,""));if(S&&!f.test(S.name))return c();S.name=S.name.replace(f,"");fa.resumeBootstrap=function(a){n(a,function(a){b.push(a)});return c()};z(fa.resumeDeferredBootstrap)&&fa.resumeDeferredBootstrap()}function $d(){S.name="NG_ENABLE_DEBUG_INFO!"+S.name;S.location.reload()}
+ function ae(a){a=fa.element(a).injector();if(!a)throw Aa("test");return a.get("$$testability")}function zc(a,b){b=b||"_";return a.replace(be,function(a,c){return(c?b:"")+a.toLowerCase()})}function ce(){var a;if(!Ac){var b=pb();(oa=q(b)?S.jQuery:b?S[b]:u)&&oa.fn.on?(B=oa,M(oa.fn,{scope:Pa.scope,isolateScope:Pa.isolateScope,controller:Pa.controller,injector:Pa.injector,inheritedData:Pa.inheritedData}),a=oa.cleanData,oa.cleanData=function(b){var c;if(Rb)Rb=!1;else for(var e=0,f;null!=(f=b[e]);e++)(c=
+ oa._data(f,"events"))&&c.$destroy&&oa(f).triggerHandler("$destroy");a(b)}):B=N;fa.element=B;Ac=!0}}function qb(a,b,d){if(!a)throw Aa("areq",b||"?",d||"required");return a}function Qa(a,b,d){d&&I(a)&&(a=a[a.length-1]);qb(z(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Ra(a,b){if("hasOwnProperty"===a)throw Aa("badname",b);}function Bc(a,b,d){if(!b)return a;b=b.split(".");for(var c,e=a,f=b.length,g=0;g<f;g++)c=b[g],a&&(a=(e=a)[c]);return!d&&
+ z(a)?tc(e,a):a}function rb(a){for(var b=a[0],d=a[a.length-1],c,e=1;b!==d&&(b=b.nextSibling);e++)if(c||a[e]!==b)c||(c=B(ra.call(a,0,e))),c.push(b);return c||a}function $(){return Object.create(null)}function de(a){function b(a,b,c){return a[b]||(a[b]=c())}var d=G("$injector"),c=G("ng");a=b(a,"angular",Object);a.$$minErr=a.$$minErr||G;return b(a,"module",function(){var a={};return function(f,g,h){if("hasOwnProperty"===f)throw c("badname","module");g&&a.hasOwnProperty(f)&&(a[f]=null);return b(a,f,function(){function a(b,
+ d,e,f){f||(f=c);return function(){f[e||"push"]([b,d,arguments]);return v}}function b(a,d){return function(b,e){e&&z(e)&&(e.$$moduleName=f);c.push([a,d,arguments]);return v}}if(!g)throw d("nomod",f);var c=[],e=[],t=[],A=a("$injector","invoke","push",e),v={_invokeQueue:c,_configBlocks:e,_runBlocks:t,requires:g,name:f,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:b("$provide",
+ "decorator"),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider","directive"),config:A,run:function(a){t.push(a);return this}};h&&A(h);return v})}})}function ee(a){M(a,{bootstrap:yc,copy:bb,extend:M,merge:Ud,equals:ma,element:B,forEach:n,injector:eb,noop:x,bind:tc,toJson:db,fromJson:uc,identity:Ya,isUndefined:q,isDefined:y,isString:E,isFunction:z,isObject:H,isNumber:Q,isElement:Nb,isArray:I,
+ version:fe,isDate:da,lowercase:F,uppercase:sb,callbacks:{counter:0},getTestability:ae,$$minErr:G,$$csp:Ba,reloadWithDebugInfo:$d});Sb=de(S);Sb("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:ge});a.provider("$compile",Cc).directive({a:he,input:Dc,textarea:Dc,form:ie,script:je,select:ke,style:le,option:me,ngBind:ne,ngBindHtml:oe,ngBindTemplate:pe,ngClass:qe,ngClassEven:re,ngClassOdd:se,ngCloak:te,ngController:ue,ngForm:ve,ngHide:we,ngIf:xe,ngInclude:ye,ngInit:ze,ngNonBindable:Ae,
+ ngPluralize:Be,ngRepeat:Ce,ngShow:De,ngStyle:Ee,ngSwitch:Fe,ngSwitchWhen:Ge,ngSwitchDefault:He,ngOptions:Ie,ngTransclude:Je,ngModel:Ke,ngList:Le,ngChange:Me,pattern:Ec,ngPattern:Ec,required:Fc,ngRequired:Fc,minlength:Gc,ngMinlength:Gc,maxlength:Hc,ngMaxlength:Hc,ngValue:Ne,ngModelOptions:Oe}).directive({ngInclude:Pe}).directive(tb).directive(Ic);a.provider({$anchorScroll:Qe,$animate:Re,$animateCss:Se,$$animateQueue:Te,$$AnimateRunner:Ue,$browser:Ve,$cacheFactory:We,$controller:Xe,$document:Ye,$exceptionHandler:Ze,
+ $filter:Jc,$$forceReflow:$e,$interpolate:af,$interval:bf,$http:cf,$httpParamSerializer:df,$httpParamSerializerJQLike:ef,$httpBackend:ff,$xhrFactory:gf,$location:hf,$log:jf,$parse:kf,$rootScope:lf,$q:mf,$$q:nf,$sce:of,$sceDelegate:pf,$sniffer:qf,$templateCache:rf,$templateRequest:sf,$$testability:tf,$timeout:uf,$window:vf,$$rAF:wf,$$jqLite:xf,$$HashMap:yf,$$cookieReader:zf})}])}function fb(a){return a.replace(Af,function(a,d,c,e){return e?c.toUpperCase():c}).replace(Bf,"Moz$1")}function Kc(a){a=a.nodeType;
+ return 1===a||!a||9===a}function Lc(a,b){var d,c,e=b.createDocumentFragment(),f=[];if(Tb.test(a)){d=d||e.appendChild(b.createElement("div"));c=(Cf.exec(a)||["",""])[1].toLowerCase();c=ka[c]||ka._default;d.innerHTML=c[1]+a.replace(Df,"<$1></$2>")+c[2];for(c=c[0];c--;)d=d.lastChild;f=cb(f,d.childNodes);d=e.firstChild;d.textContent=""}else f.push(b.createTextNode(a));e.textContent="";e.innerHTML="";n(f,function(a){e.appendChild(a)});return e}function N(a){if(a instanceof N)return a;var b;E(a)&&(a=U(a),
+ b=!0);if(!(this instanceof N)){if(b&&"<"!=a.charAt(0))throw Ub("nosel");return new N(a)}if(b){b=X;var d;a=(d=Ef.exec(a))?[b.createElement(d[1])]:(d=Lc(a,b))?d.childNodes:[]}Mc(this,a)}function Vb(a){return a.cloneNode(!0)}function ub(a,b){b||vb(a);if(a.querySelectorAll)for(var d=a.querySelectorAll("*"),c=0,e=d.length;c<e;c++)vb(d[c])}function Nc(a,b,d,c){if(y(c))throw Ub("offargs");var e=(c=wb(a))&&c.events,f=c&&c.handle;if(f)if(b){var g=function(b){var c=e[b];y(d)&&ab(c||[],d);y(d)&&c&&0<c.length||
+ (a.removeEventListener(b,f,!1),delete e[b])};n(b.split(" "),function(a){g(a);xb[a]&&g(xb[a])})}else for(b in e)"$destroy"!==b&&a.removeEventListener(b,f,!1),delete e[b]}function vb(a,b){var d=a.ng339,c=d&&gb[d];c&&(b?delete c.data[b]:(c.handle&&(c.events.$destroy&&c.handle({},"$destroy"),Nc(a)),delete gb[d],a.ng339=u))}function wb(a,b){var d=a.ng339,d=d&&gb[d];b&&!d&&(a.ng339=d=++Ff,d=gb[d]={events:{},data:{},handle:u});return d}function Wb(a,b,d){if(Kc(a)){var c=y(d),e=!c&&b&&!H(b),f=!b;a=(a=wb(a,
+ !e))&&a.data;if(c)a[b]=d;else{if(f)return a;if(e)return a&&a[b];M(a,b)}}}function yb(a,b){return a.getAttribute?-1<(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" "):!1}function zb(a,b){b&&a.setAttribute&&n(b.split(" "),function(b){a.setAttribute("class",U((" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+U(b)+" "," ")))})}function Ab(a,b){if(b&&a.setAttribute){var d=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");n(b.split(" "),
+ function(a){a=U(a);-1===d.indexOf(" "+a+" ")&&(d+=a+" ")});a.setAttribute("class",U(d))}}function Mc(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var d=b.length;if("number"===typeof d&&b.window!==b){if(d)for(var c=0;c<d;c++)a[a.length++]=b[c]}else a[a.length++]=b}}function Oc(a,b){return Bb(a,"$"+(b||"ngController")+"Controller")}function Bb(a,b,d){9==a.nodeType&&(a=a.documentElement);for(b=I(b)?b:[b];a;){for(var c=0,e=b.length;c<e;c++)if(y(d=B.data(a,b[c])))return d;a=a.parentNode||11===a.nodeType&&
+ a.host}}function Pc(a){for(ub(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Xb(a,b){b||ub(a);var d=a.parentNode;d&&d.removeChild(a)}function Gf(a,b){b=b||S;if("complete"===b.document.readyState)b.setTimeout(a);else B(b).on("load",a)}function Qc(a,b){var d=Cb[b.toLowerCase()];return d&&Rc[ta(a)]&&d}function Hf(a,b){var d=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var f=b[d||c.type],g=f?f.length:0;if(g){if(q(c.immediatePropagationStopped)){var h=c.stopImmediatePropagation;
+ c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0;c.stopPropagation&&c.stopPropagation();h&&h.call(c)}}c.isImmediatePropagationStopped=function(){return!0===c.immediatePropagationStopped};var k=f.specialHandlerWrapper||If;1<g&&(f=ia(f));for(var l=0;l<g;l++)c.isImmediatePropagationStopped()||k(a,c,f[l])}};d.elem=a;return d}function If(a,b,d){d.call(a,b)}function Jf(a,b,d){var c=b.relatedTarget;c&&(c===a||Kf.call(a,c))||d.call(a,b)}function xf(){this.$get=function(){return M(N,
+ {hasClass:function(a,b){a.attr&&(a=a[0]);return yb(a,b)},addClass:function(a,b){a.attr&&(a=a[0]);return Ab(a,b)},removeClass:function(a,b){a.attr&&(a=a[0]);return zb(a,b)}})}}function Ca(a,b){var d=a&&a.$$hashKey;if(d)return"function"===typeof d&&(d=a.$$hashKey()),d;d=typeof a;return d="function"==d||"object"==d&&null!==a?a.$$hashKey=d+":"+(b||Td)():d+":"+a}function Sa(a,b){if(b){var d=0;this.nextUid=function(){return++d}}n(a,this.put,this)}function Lf(a){return(a=a.toString().replace(Sc,"").match(Tc))?
+ "function("+(a[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function eb(a,b){function d(a){return function(b,c){if(H(b))n(b,pc(a));else return a(b,c)}}function c(a,b){Ra(a,"service");if(z(b)||I(b))b=t.instantiate(b);if(!b.$get)throw Da("pget",a);return r[a+"Provider"]=b}function e(a,b){return function(){var c=v.invoke(b,this);if(q(c))throw Da("undef",a);return c}}function f(a,b,d){return c(a,{$get:!1!==d?e(a,b):b})}function g(a){qb(q(a)||I(a),"modulesToLoad","not an array");var b=[],c;n(a,function(a){function d(a){var b,
+ c;b=0;for(c=a.length;b<c;b++){var e=a[b],f=t.get(e[0]);f[e[1]].apply(f,e[2])}}if(!m.get(a)){m.put(a,!0);try{E(a)?(c=Sb(a),b=b.concat(g(c.requires)).concat(c._runBlocks),d(c._invokeQueue),d(c._configBlocks)):z(a)?b.push(t.invoke(a)):I(a)?b.push(t.invoke(a)):Qa(a,"module")}catch(e){throw I(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Da("modulerr",a,e.stack||e.message||e);}}});return b}function h(a,c){function d(b,e){if(a.hasOwnProperty(b)){if(a[b]===
+ k)throw Da("cdep",b+" <- "+l.join(" <- "));return a[b]}try{return l.unshift(b),a[b]=k,a[b]=c(b,e)}catch(f){throw a[b]===k&&delete a[b],f;}finally{l.shift()}}function e(a,c,f,g){"string"===typeof f&&(g=f,f=null);var h=[],k=eb.$$annotate(a,b,g),l,m,t;m=0;for(l=k.length;m<l;m++){t=k[m];if("string"!==typeof t)throw Da("itkn",t);h.push(f&&f.hasOwnProperty(t)?f[t]:d(t,g))}I(a)&&(a=a[l]);return a.apply(c,h)}return{invoke:e,instantiate:function(a,b,c){var d=Object.create((I(a)?a[a.length-1]:a).prototype||
+ null);a=e(a,d,b,c);return H(a)||z(a)?a:d},get:d,annotate:eb.$$annotate,has:function(b){return r.hasOwnProperty(b+"Provider")||a.hasOwnProperty(b)}}}b=!0===b;var k={},l=[],m=new Sa([],!0),r={$provide:{provider:d(c),factory:d(f),service:d(function(a,b){return f(a,["$injector",function(a){return a.instantiate(b)}])}),value:d(function(a,b){return f(a,na(b),!1)}),constant:d(function(a,b){Ra(a,"constant");r[a]=b;A[a]=b}),decorator:function(a,b){var c=t.get(a+"Provider"),d=c.$get;c.$get=function(){var a=
+ v.invoke(d,c);return v.invoke(b,null,{$delegate:a})}}}},t=r.$injector=h(r,function(a,b){fa.isString(b)&&l.push(b);throw Da("unpr",l.join(" <- "));}),A={},v=A.$injector=h(A,function(a,b){var c=t.get(a+"Provider",b);return v.invoke(c.$get,c,u,a)});n(g(a),function(a){a&&v.invoke(a)});return v}function Qe(){var a=!0;this.disableAutoScrolling=function(){a=!1};this.$get=["$window","$location","$rootScope",function(b,d,c){function e(a){var b=null;Array.prototype.some.call(a,function(a){if("a"===ta(a))return b=
+ a,!0});return b}function f(a){if(a){a.scrollIntoView();var c;c=g.yOffset;z(c)?c=c():Nb(c)?(c=c[0],c="fixed"!==b.getComputedStyle(c).position?0:c.getBoundingClientRect().bottom):Q(c)||(c=0);c&&(a=a.getBoundingClientRect().top,b.scrollBy(0,a-c))}else b.scrollTo(0,0)}function g(a){a=E(a)?a:d.hash();var b;a?(b=h.getElementById(a))?f(b):(b=e(h.getElementsByName(a)))?f(b):"top"===a&&f(null):f(null)}var h=b.document;a&&c.$watch(function(){return d.hash()},function(a,b){a===b&&""===a||Gf(function(){c.$evalAsync(g)})});
+ return g}]}function hb(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;I(a)&&(a=a.join(" "));I(b)&&(b=b.join(" "));return a+" "+b}function Mf(a){E(a)&&(a=a.split(" "));var b=$();n(a,function(a){a.length&&(b[a]=!0)});return b}function Ea(a){return H(a)?a:{}}function Nf(a,b,d,c){function e(a){try{a.apply(null,ra.call(arguments,1))}finally{if(v--,0===v)for(;T.length;)try{T.pop()()}catch(b){d.error(b)}}}function f(){L=null;g();h()}function g(){a:{try{p=m.state;break a}catch(a){}p=void 0}p=q(p)?
+ null:p;ma(p,J)&&(p=J);J=p}function h(){if(w!==k.url()||C!==p)w=k.url(),C=p,n(aa,function(a){a(k.url(),p)})}var k=this,l=a.location,m=a.history,r=a.setTimeout,t=a.clearTimeout,A={};k.isMock=!1;var v=0,T=[];k.$$completeOutstandingRequest=e;k.$$incOutstandingRequestCount=function(){v++};k.notifyWhenNoOutstandingRequests=function(a){0===v?a():T.push(a)};var p,C,w=l.href,ga=b.find("base"),L=null;g();C=p;k.url=function(b,d,e){q(e)&&(e=null);l!==a.location&&(l=a.location);m!==a.history&&(m=a.history);if(b){var f=
+ C===e;if(w===b&&(!c.history||f))return k;var h=w&&Fa(w)===Fa(b);w=b;C=e;if(!c.history||h&&f){if(!h||L)L=b;d?l.replace(b):h?(d=l,e=b.indexOf("#"),e=-1===e?"":b.substr(e),d.hash=e):l.href=b;l.href!==b&&(L=b)}else m[d?"replaceState":"pushState"](e,"",b),g(),C=p;return k}return L||l.href.replace(/%27/g,"'")};k.state=function(){return p};var aa=[],D=!1,J=null;k.onUrlChange=function(b){if(!D){if(c.history)B(a).on("popstate",f);B(a).on("hashchange",f);D=!0}aa.push(b);return b};k.$$applicationDestroyed=function(){B(a).off("hashchange popstate",
+ f)};k.$$checkUrlChange=h;k.baseHref=function(){var a=ga.attr("href");return a?a.replace(/^(https?\:)?\/\/[^\/]*/,""):""};k.defer=function(a,b){var c;v++;c=r(function(){delete A[c];e(a)},b||0);A[c]=!0;return c};k.defer.cancel=function(a){return A[a]?(delete A[a],t(a),e(x),!0):!1}}function Ve(){this.$get=["$window","$log","$sniffer","$document",function(a,b,d,c){return new Nf(a,c,b,d)}]}function We(){this.$get=function(){function a(a,c){function e(a){a!=r&&(t?t==a&&(t=a.n):t=a,f(a.n,a.p),f(a,r),r=a,
+ r.n=null)}function f(a,b){a!=b&&(a&&(a.p=b),b&&(b.n=a))}if(a in b)throw G("$cacheFactory")("iid",a);var g=0,h=M({},c,{id:a}),k=$(),l=c&&c.capacity||Number.MAX_VALUE,m=$(),r=null,t=null;return b[a]={put:function(a,b){if(!q(b)){if(l<Number.MAX_VALUE){var c=m[a]||(m[a]={key:a});e(c)}a in k||g++;k[a]=b;g>l&&this.remove(t.key);return b}},get:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;e(b)}return k[a]},remove:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;b==r&&(r=b.p);b==t&&
+ (t=b.n);f(b.n,b.p);delete m[a]}a in k&&(delete k[a],g--)},removeAll:function(){k=$();g=0;m=$();r=t=null},destroy:function(){m=h=k=null;delete b[a]},info:function(){return M({},h,{size:g})}}}var b={};a.info=function(){var a={};n(b,function(b,e){a[e]=b.info()});return a};a.get=function(a){return b[a]};return a}}function rf(){this.$get=["$cacheFactory",function(a){return a("templates")}]}function Cc(a,b){function d(a,b,c){var d=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,e={};n(a,function(a,f){var g=a.match(d);
+ if(!g)throw ha("iscp",b,f,a,c?"controller bindings definition":"isolate scope definition");e[f]={mode:g[1][0],collection:"*"===g[2],optional:"?"===g[3],attrName:g[4]||f}});return e}function c(a){var b=a.charAt(0);if(!b||b!==F(b))throw ha("baddir",a);if(a!==a.trim())throw ha("baddir",a);}var e={},f=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,g=/(([\w\-]+)(?:\:([^;]+))?;?)/,h=Wd("ngSrc,ngSrcset,src,srcset"),k=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,l=/^(on[a-z]+|formaction)$/;this.directive=function t(b,f){Ra(b,"directive");
+ E(b)?(c(b),qb(f,"directiveFactory"),e.hasOwnProperty(b)||(e[b]=[],a.factory(b+"Directive",["$injector","$exceptionHandler",function(a,c){var f=[];n(e[b],function(e,g){try{var h=a.invoke(e);z(h)?h={compile:na(h)}:!h.compile&&h.link&&(h.compile=na(h.link));h.priority=h.priority||0;h.index=g;h.name=h.name||b;h.require=h.require||h.controller&&h.name;h.restrict=h.restrict||"EA";var k=h,l=h,m=h.name,t={isolateScope:null,bindToController:null};H(l.scope)&&(!0===l.bindToController?(t.bindToController=d(l.scope,
+ m,!0),t.isolateScope={}):t.isolateScope=d(l.scope,m,!1));H(l.bindToController)&&(t.bindToController=d(l.bindToController,m,!0));if(H(t.bindToController)){var v=l.controller,R=l.controllerAs;if(!v)throw ha("noctrl",m);var V;a:if(R&&E(R))V=R;else{if(E(v)){var n=Uc.exec(v);if(n){V=n[3];break a}}V=void 0}if(!V)throw ha("noident",m);}var s=k.$$bindings=t;H(s.isolateScope)&&(h.$$isolateBindings=s.isolateScope);h.$$moduleName=e.$$moduleName;f.push(h)}catch(u){c(u)}});return f}])),e[b].push(f)):n(b,pc(t));
+ return this};this.aHrefSanitizationWhitelist=function(a){return y(a)?(b.aHrefSanitizationWhitelist(a),this):b.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(a){return y(a)?(b.imgSrcSanitizationWhitelist(a),this):b.imgSrcSanitizationWhitelist()};var m=!0;this.debugInfoEnabled=function(a){return y(a)?(m=a,this):m};this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(a,
+ b,c,d,p,C,w,ga,L,aa,D){function J(a,b){try{a.addClass(b)}catch(c){}}function K(a,b,c,d,e){a instanceof B||(a=B(a));n(a,function(b,c){b.nodeType==Na&&b.nodeValue.match(/\S+/)&&(a[c]=B(b).wrap("<span></span>").parent()[0])});var f=O(a,b,a,c,d,e);K.$$addScopeClass(a);var g=null;return function(b,c,d){qb(b,"scope");e&&e.needsNewScope&&(b=b.$parent.$new());d=d||{};var h=d.parentBoundTranscludeFn,k=d.transcludeControllers;d=d.futureParentElement;h&&h.$$boundTransclude&&(h=h.$$boundTransclude);g||(g=(d=
+ d&&d[0])?"foreignobject"!==ta(d)&&d.toString().match(/SVG/)?"svg":"html":"html");d="html"!==g?B(Yb(g,B("<div>").append(a).html())):c?Pa.clone.call(a):a;if(k)for(var l in k)d.data("$"+l+"Controller",k[l].instance);K.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,h);return d}}function O(a,b,c,d,e,f){function g(a,c,d,e){var f,k,l,m,t,w,D;if(p)for(D=Array(c.length),m=0;m<h.length;m+=3)f=h[m],D[f]=c[f];else D=c;m=0;for(t=h.length;m<t;)k=D[h[m++]],c=h[m++],f=h[m++],c?(c.scope?(l=a.$new(),K.$$addScopeInfo(B(k),
+ l)):l=a,w=c.transcludeOnThisElement?R(a,c.transclude,e):!c.templateOnThisElement&&e?e:!e&&b?R(a,b):null,c(f,l,k,d,w)):f&&f(a,k.childNodes,u,e)}for(var h=[],k,l,m,t,p,w=0;w<a.length;w++){k=new fa;l=V(a[w],[],k,0===w?d:u,e);(f=l.length?Z(l,a[w],k,b,c,null,[],[],f):null)&&f.scope&&K.$$addScopeClass(k.$$element);k=f&&f.terminal||!(m=a[w].childNodes)||!m.length?null:O(m,f?(f.transcludeOnThisElement||!f.templateOnThisElement)&&f.transclude:b);if(f||k)h.push(w,f,k),t=!0,p=p||f;f=null}return t?g:null}function R(a,
+ b,c){return function(d,e,f,g,h){d||(d=a.$new(!1,h),d.$$transcluded=!0);return b(d,e,{parentBoundTranscludeFn:c,transcludeControllers:f,futureParentElement:g})}}function V(a,b,c,d,e){var h=c.$attr,k;switch(a.nodeType){case 1:P(b,va(ta(a)),"E",d,e);for(var l,m,t,p=a.attributes,w=0,D=p&&p.length;w<D;w++){var K=!1,A=!1;l=p[w];k=l.name;m=U(l.value);l=va(k);if(t=ka.test(l))k=k.replace(Vc,"").substr(8).replace(/_(.)/g,function(a,b){return b.toUpperCase()});(l=l.match(la))&&G(l[1])&&(K=k,A=k.substr(0,k.length-
+ 5)+"end",k=k.substr(0,k.length-6));l=va(k.toLowerCase());h[l]=k;if(t||!c.hasOwnProperty(l))c[l]=m,Qc(a,l)&&(c[l]=!0);W(a,b,m,l,t);P(b,l,"A",d,e,K,A)}a=a.className;H(a)&&(a=a.animVal);if(E(a)&&""!==a)for(;k=g.exec(a);)l=va(k[2]),P(b,l,"C",d,e)&&(c[l]=U(k[3])),a=a.substr(k.index+k[0].length);break;case Na:if(11===Ha)for(;a.parentNode&&a.nextSibling&&a.nextSibling.nodeType===Na;)a.nodeValue+=a.nextSibling.nodeValue,a.parentNode.removeChild(a.nextSibling);N(b,a.nodeValue);break;case 8:try{if(k=f.exec(a.nodeValue))l=
+ va(k[1]),P(b,l,"M",d,e)&&(c[l]=U(k[2]))}catch(R){}}b.sort(Ia);return b}function Ta(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw ha("uterdir",b,c);1==a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return B(d)}function s(a,b,c){return function(d,e,f,g,h){e=Ta(e[0],b,c);return a(d,e,f,g,h)}}function Z(a,b,d,e,f,g,h,l,m){function t(a,b,c,d){if(a){c&&(a=s(a,c,d));a.require=q.require;a.directiveName=x;if(O===
+ q||q.$$isolateScope)a=ca(a,{isolateScope:!0});h.push(a)}if(b){c&&(b=s(b,c,d));b.require=q.require;b.directiveName=x;if(O===q||q.$$isolateScope)b=ca(b,{isolateScope:!0});l.push(b)}}function p(a,b,c,d){var e;if(E(b)){var f=b.match(k);b=b.substring(f[0].length);var g=f[1]||f[3],f="?"===f[2];"^^"===g?c=c.parent():e=(e=d&&d[b])&&e.instance;e||(d="$"+b+"Controller",e=g?c.inheritedData(d):c.data(d));if(!e&&!f)throw ha("ctreq",b,a);}else if(I(b))for(e=[],g=0,f=b.length;g<f;g++)e[g]=p(a,b[g],c,d);return e||
+ null}function w(a,b,c,d,e,f){var g=$(),h;for(h in d){var k=d[h],l={$scope:k===O||k.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},m=k.controller;"@"==m&&(m=b[k.name]);l=C(m,l,!0,k.controllerAs);g[k.name]=l;aa||a.data("$"+k.name+"Controller",l.instance)}return g}function D(a,c,e,f,g){function k(a,b,c){var d;Za(a)||(c=b,b=a,a=u);aa&&(d=v);c||(c=aa?V.parent():V);return g(a,b,d,c,Ta)}var m,t,A,v,C,V,Ga;b===e?(f=d,V=d.$$element):(V=B(e),f=new fa(V,d));A=c;O?t=c.$new(!0):R&&(A=c.$parent);g&&(C=k,
+ C.$$boundTransclude=g);T&&(v=w(V,f,C,T,t,c));O&&(K.$$addScopeInfo(V,t,!0,!(J&&(J===O||J===O.$$originalDirective))),K.$$addScopeClass(V,!0),t.$$isolateBindings=O.$$isolateBindings,(Ga=ba(c,f,t,t.$$isolateBindings,O))&&t.$on("$destroy",Ga));for(var n in v){Ga=T[n];var ga=v[n],L=Ga.$$bindings.bindToController;ga.identifier&&L&&(m=ba(A,f,ga.instance,L,Ga));var q=ga();q!==ga.instance&&(ga.instance=q,V.data("$"+Ga.name+"Controller",q),m&&m(),m=ba(A,f,ga.instance,L,Ga))}F=0;for(M=h.length;F<M;F++)m=h[F],
+ ea(m,m.isolateScope?t:c,V,f,m.require&&p(m.directiveName,m.require,V,v),C);var Ta=c;O&&(O.template||null===O.templateUrl)&&(Ta=t);a&&a(Ta,e.childNodes,u,g);for(F=l.length-1;0<=F;F--)m=l[F],ea(m,m.isolateScope?t:c,V,f,m.require&&p(m.directiveName,m.require,V,v),C)}m=m||{};for(var A=-Number.MAX_VALUE,R=m.newScopeDirective,T=m.controllerDirectives,O=m.newIsolateScopeDirective,J=m.templateDirective,n=m.nonTlbTranscludeDirective,ga=!1,L=!1,aa=m.hasElementTranscludeDirective,Z=d.$$element=B(b),q,x,P,Ia=
+ e,G,F=0,M=a.length;F<M;F++){q=a[F];var N=q.$$start,Q=q.$$end;N&&(Z=Ta(b,N,Q));P=u;if(A>q.priority)break;if(P=q.scope)q.templateUrl||(H(P)?(Ua("new/isolated scope",O||R,q,Z),O=q):Ua("new/isolated scope",O,q,Z)),R=R||q;x=q.name;!q.templateUrl&&q.controller&&(P=q.controller,T=T||$(),Ua("'"+x+"' controller",T[x],q,Z),T[x]=q);if(P=q.transclude)ga=!0,q.$$tlb||(Ua("transclusion",n,q,Z),n=q),"element"==P?(aa=!0,A=q.priority,P=Z,Z=d.$$element=B(X.createComment(" "+x+": "+d[x]+" ")),b=Z[0],Y(f,ra.call(P,0),
+ b),Ia=K(P,e,A,g&&g.name,{nonTlbTranscludeDirective:n})):(P=B(Vb(b)).contents(),Z.empty(),Ia=K(P,e,u,u,{needsNewScope:q.$$isolateScope||q.$$newScope}));if(q.template)if(L=!0,Ua("template",J,q,Z),J=q,P=z(q.template)?q.template(Z,d):q.template,P=ja(P),q.replace){g=q;P=Tb.test(P)?Xc(Yb(q.templateNamespace,U(P))):[];b=P[0];if(1!=P.length||1!==b.nodeType)throw ha("tplrt",x,"");Y(f,Z,b);P={$attr:{}};var Wc=V(b,[],P),W=a.splice(F+1,a.length-(F+1));(O||R)&&y(Wc,O,R);a=a.concat(Wc).concat(W);S(d,P);M=a.length}else Z.html(P);
+ if(q.templateUrl)L=!0,Ua("template",J,q,Z),J=q,q.replace&&(g=q),D=Of(a.splice(F,a.length-F),Z,d,f,ga&&Ia,h,l,{controllerDirectives:T,newScopeDirective:R!==q&&R,newIsolateScopeDirective:O,templateDirective:J,nonTlbTranscludeDirective:n}),M=a.length;else if(q.compile)try{G=q.compile(Z,d,Ia),z(G)?t(null,G,N,Q):G&&t(G.pre,G.post,N,Q)}catch(da){c(da,ua(Z))}q.terminal&&(D.terminal=!0,A=Math.max(A,q.priority))}D.scope=R&&!0===R.scope;D.transcludeOnThisElement=ga;D.templateOnThisElement=L;D.transclude=Ia;
+ m.hasElementTranscludeDirective=aa;return D}function y(a,b,c){for(var d=0,e=a.length;d<e;d++)a[d]=Ob(a[d],{$$isolateScope:b,$$newScope:c})}function P(b,d,f,g,h,k,l){if(d===h)return null;h=null;if(e.hasOwnProperty(d)){var m;d=a.get(d+"Directive");for(var p=0,w=d.length;p<w;p++)try{m=d[p],(q(g)||g>m.priority)&&-1!=m.restrict.indexOf(f)&&(k&&(m=Ob(m,{$$start:k,$$end:l})),b.push(m),h=m)}catch(D){c(D)}}return h}function G(b){if(e.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,f=c.length;d<f;d++)if(b=
+ c[d],b.multiElement)return!0;return!1}function S(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;n(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});n(b,function(b,f){"class"==f?(J(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):"style"==f?(e.attr("style",e.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==f.charAt(0)||a.hasOwnProperty(f)||(a[f]=b,d[f]=c[f])})}function Of(a,b,c,e,f,g,h,k){var l=[],m,t,p=b[0],w=a.shift(),D=Ob(w,{templateUrl:null,
+ transclude:null,replace:null,$$originalDirective:w}),A=z(w.templateUrl)?w.templateUrl(b,c):w.templateUrl,K=w.templateNamespace;b.empty();d(A).then(function(d){var T,v;d=ja(d);if(w.replace){d=Tb.test(d)?Xc(Yb(K,U(d))):[];T=d[0];if(1!=d.length||1!==T.nodeType)throw ha("tplrt",w.name,A);d={$attr:{}};Y(e,b,T);var C=V(T,[],d);H(w.scope)&&y(C,!0);a=C.concat(a);S(c,d)}else T=p,b.html(d);a.unshift(D);m=Z(a,T,c,f,b,w,g,h,k);n(e,function(a,c){a==T&&(e[c]=b[0])});for(t=O(b[0].childNodes,f);l.length;){d=l.shift();
+ v=l.shift();var ga=l.shift(),L=l.shift(),C=b[0];if(!d.$$destroyed){if(v!==p){var q=v.className;k.hasElementTranscludeDirective&&w.replace||(C=Vb(T));Y(ga,B(v),C);J(B(C),q)}v=m.transcludeOnThisElement?R(d,m.transclude,L):L;m(t,d,C,e,v)}}l=null});return function(a,b,c,d,e){a=e;b.$$destroyed||(l?l.push(b,c,d,a):(m.transcludeOnThisElement&&(a=R(b,m.transclude,e)),m(t,b,c,d,a)))}}function Ia(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function Ua(a,
+ b,c,d){function e(a){return a?" (module: "+a+")":""}if(b)throw ha("multidir",b.name,e(b.$$moduleName),c.name,e(c.$$moduleName),a,ua(d));}function N(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:function(a){a=a.parent();var b=!!a.length;b&&K.$$addBindingClass(a);return function(a,c){var e=c.parent();b||K.$$addBindingClass(e);K.$$addBindingInfo(e,d.expressions);a.$watch(d,function(a){c[0].nodeValue=a})}}})}function Yb(a,b){a=F(a||"html");switch(a){case "svg":case "math":var c=X.createElement("div");
+ c.innerHTML="<"+a+">"+b+"</"+a+">";return c.childNodes[0].childNodes;default:return b}}function Q(a,b){if("srcdoc"==b)return L.HTML;var c=ta(a);if("xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b))return L.RESOURCE_URL}function W(a,c,d,e,f){var g=Q(a,e);f=h[e]||f;var k=b(d,!0,g,f);if(k){if("multiple"===e&&"select"===ta(a))throw ha("selmulti",ua(a));c.push({priority:100,compile:function(){return{pre:function(a,c,h){c=h.$$observers||(h.$$observers=$());if(l.test(e))throw ha("nodomevents");
+ var m=h[e];m!==d&&(k=m&&b(m,!0,g,f),d=m);k&&(h[e]=k(a),(c[e]||(c[e]=[])).$$inter=!0,(h.$$observers&&h.$$observers[e].$$scope||a).$watch(k,function(a,b){"class"===e&&a!=b?h.$updateClass(a,b):h.$set(e,a)}))}}}})}}function Y(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g<h;g++)if(a[g]==d){a[g++]=c;h=g+e-1;for(var k=a.length;g<k;g++,h++)h<k?a[g]=a[h]:delete a[g];a.length-=e-1;a.context===d&&(a.context=c);break}f&&f.replaceChild(c,d);a=X.createDocumentFragment();a.appendChild(d);
+ B.hasData(d)&&(B.data(c,B.data(d)),oa?(Rb=!0,oa.cleanData([d])):delete B.cache[d[B.expando]]);d=1;for(e=b.length;d<e;d++)f=b[d],B(f).remove(),a.appendChild(f),delete b[d];b[0]=c;b.length=1}function ca(a,b){return M(function(){return a.apply(null,arguments)},a,b)}function ea(a,b,d,e,f,g){try{a(b,d,e,f,g)}catch(h){c(h,ua(d))}}function ba(a,c,d,e,f){var g=[];n(e,function(e,h){var k=e.attrName,l=e.optional,m,t,w,D;switch(e.mode){case "@":l||qa.call(c,k)||(d[h]=c[k]=void 0);c.$observe(k,function(a){E(a)&&
+ (d[h]=a)});c.$$observers[k].$$scope=a;E(c[k])&&(d[h]=b(c[k])(a));break;case "=":if(!qa.call(c,k)){if(l)break;c[k]=void 0}if(l&&!c[k])break;t=p(c[k]);D=t.literal?ma:function(a,b){return a===b||a!==a&&b!==b};w=t.assign||function(){m=d[h]=t(a);throw ha("nonassign",c[k],f.name);};m=d[h]=t(a);l=function(b){D(b,d[h])||(D(b,m)?w(a,b=d[h]):d[h]=b);return m=b};l.$stateful=!0;l=e.collection?a.$watchCollection(c[k],l):a.$watch(p(c[k],l),null,t.literal);g.push(l);break;case "&":t=c.hasOwnProperty(k)?p(c[k]):
+ x;if(t===x&&l)break;d[h]=function(b){return t(a,b)}}});return g.length&&function(){for(var a=0,b=g.length;a<b;++a)g[a]()}}var fa=function(a,b){if(b){var c=Object.keys(b),d,e,f;d=0;for(e=c.length;d<e;d++)f=c[d],this[f]=b[f]}else this.$attr={};this.$$element=a};fa.prototype={$normalize:va,$addClass:function(a){a&&0<a.length&&aa.addClass(this.$$element,a)},$removeClass:function(a){a&&0<a.length&&aa.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=Yc(a,b);c&&c.length&&aa.addClass(this.$$element,
+ c);(c=Yc(b,a))&&c.length&&aa.removeClass(this.$$element,c)},$set:function(a,b,d,e){var f=Qc(this.$$element[0],a),g=Zc[a],h=a;f?(this.$$element.prop(a,b),e=f):g&&(this[g]=b,h=g);this[a]=b;e?this.$attr[a]=e:(e=this.$attr[a])||(this.$attr[a]=e=zc(a,"-"));f=ta(this.$$element);if("a"===f&&"href"===a||"img"===f&&"src"===a)this[a]=b=D(b,"src"===a);else if("img"===f&&"srcset"===a){for(var f="",g=U(b),k=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,k=/\s/.test(g)?k:/(,)/,g=g.split(k),k=Math.floor(g.length/2),l=0;l<
+ k;l++)var m=2*l,f=f+D(U(g[m]),!0),f=f+(" "+U(g[m+1]));g=U(g[2*l]).split(/\s/);f+=D(U(g[0]),!0);2===g.length&&(f+=" "+U(g[1]));this[a]=b=f}!1!==d&&(null===b||q(b)?this.$$element.removeAttr(e):this.$$element.attr(e,b));(a=this.$$observers)&&n(a[h],function(a){try{a(b)}catch(d){c(d)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=$()),e=d[a]||(d[a]=[]);e.push(b);w.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||q(c[a])||b(c[a])});return function(){ab(e,b)}}};var da=b.startSymbol(),
+ ia=b.endSymbol(),ja="{{"==da||"}}"==ia?Ya:function(a){return a.replace(/\{\{/g,da).replace(/}}/g,ia)},ka=/^ngAttr[A-Z]/,la=/^(.+)Start$/;K.$$addBindingInfo=m?function(a,b){var c=a.data("$binding")||[];I(b)?c=c.concat(b):c.push(b);a.data("$binding",c)}:x;K.$$addBindingClass=m?function(a){J(a,"ng-binding")}:x;K.$$addScopeInfo=m?function(a,b,c,d){a.data(c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope",b)}:x;K.$$addScopeClass=m?function(a,b){J(a,b?"ng-isolate-scope":"ng-scope")}:x;return K}]}function va(a){return fb(a.replace(Vc,
+ ""))}function Yc(a,b){var d="",c=a.split(/\s+/),e=b.split(/\s+/),f=0;a:for(;f<c.length;f++){for(var g=c[f],h=0;h<e.length;h++)if(g==e[h])continue a;d+=(0<d.length?" ":"")+g}return d}function Xc(a){a=B(a);var b=a.length;if(1>=b)return a;for(;b--;)8===a[b].nodeType&&Pf.call(a,b,1);return a}function Xe(){var a={},b=!1;this.register=function(b,c){Ra(b,"controller");H(b)?M(a,b):a[b]=c};this.allowGlobals=function(){b=!0};this.$get=["$injector","$window",function(d,c){function e(a,b,c,d){if(!a||!H(a.$scope))throw G("$controller")("noscp",
+ d,b);a.$scope[b]=c}return function(f,g,h,k){var l,m,r;h=!0===h;k&&E(k)&&(r=k);if(E(f)){k=f.match(Uc);if(!k)throw Qf("ctrlfmt",f);m=k[1];r=r||k[3];f=a.hasOwnProperty(m)?a[m]:Bc(g.$scope,m,!0)||(b?Bc(c,m,!0):u);Qa(f,m,!0)}if(h)return h=(I(f)?f[f.length-1]:f).prototype,l=Object.create(h||null),r&&e(g,r,l,m||f.name),M(function(){var a=d.invoke(f,l,g,m);a!==l&&(H(a)||z(a))&&(l=a,r&&e(g,r,l,m||f.name));return l},{instance:l,identifier:r});l=d.instantiate(f,g,m);r&&e(g,r,l,m||f.name);return l}}]}function Ye(){this.$get=
+ ["$window",function(a){return B(a.document)}]}function Ze(){this.$get=["$log",function(a){return function(b,d){a.error.apply(a,arguments)}}]}function Zb(a){return H(a)?da(a)?a.toISOString():db(a):a}function df(){this.$get=function(){return function(a){if(!a)return"";var b=[];oc(a,function(a,c){null===a||q(a)||(I(a)?n(a,function(a,d){b.push(ja(c)+"="+ja(Zb(a)))}):b.push(ja(c)+"="+ja(Zb(a))))});return b.join("&")}}}function ef(){this.$get=function(){return function(a){function b(a,e,f){null===a||q(a)||
+ (I(a)?n(a,function(a,c){b(a,e+"["+(H(a)?c:"")+"]")}):H(a)&&!da(a)?oc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):d.push(ja(e)+"="+ja(Zb(a))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function $b(a,b){if(E(a)){var d=a.replace(Rf,"").trim();if(d){var c=b("Content-Type");(c=c&&0===c.indexOf($c))||(c=(c=d.match(Sf))&&Tf[c[0]].test(d));c&&(a=uc(d))}}return a}function ad(a){var b=$(),d;E(a)?n(a.split("\n"),function(a){d=a.indexOf(":");var e=F(U(a.substr(0,d)));a=U(a.substr(d+1));e&&
+ (b[e]=b[e]?b[e]+", "+a:a)}):H(a)&&n(a,function(a,d){var f=F(d),g=U(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function bd(a){var b;return function(d){b||(b=ad(a));return d?(d=b[F(d)],void 0===d&&(d=null),d):b}}function cd(a,b,d,c){if(z(c))return c(a,b,d);n(c,function(c){a=c(a,b,d)});return a}function cf(){var a=this.defaults={transformResponse:[$b],transformRequest:[function(a){return H(a)&&"[object File]"!==sa.call(a)&&"[object Blob]"!==sa.call(a)&&"[object FormData]"!==sa.call(a)?db(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},
+ post:ia(ac),put:ia(ac),patch:ia(ac)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},b=!1;this.useApplyAsync=function(a){return y(a)?(b=!!a,this):b};var d=!0;this.useLegacyPromiseExtensions=function(a){return y(a)?(d=!!a,this):d};var c=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(e,f,g,h,k,l){function m(b){function c(a){var b=M({},a);b.data=cd(a.data,a.headers,a.status,f.transformResponse);
+ a=a.status;return 200<=a&&300>a?b:k.reject(b)}function e(a,b){var c,d={};n(a,function(a,e){z(a)?(c=a(b),null!=c&&(d[e]=c)):d[e]=a});return d}if(!fa.isObject(b))throw G("$http")("badreq",b);var f=M({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer},b);f.headers=function(b){var c=a.headers,d=M({},b.headers),f,g,h,c=M({},c.common,c[F(b.method)]);a:for(f in c){g=F(f);for(h in d)if(F(h)===g)continue a;d[f]=c[f]}return e(d,ia(b))}(b);
+ f.method=sb(f.method);f.paramSerializer=E(f.paramSerializer)?l.get(f.paramSerializer):f.paramSerializer;var g=[function(b){var d=b.headers,e=cd(b.data,bd(d),u,b.transformRequest);q(e)&&n(d,function(a,b){"content-type"===F(b)&&delete d[b]});q(b.withCredentials)&&!q(a.withCredentials)&&(b.withCredentials=a.withCredentials);return r(b,e).then(c,c)},u],h=k.when(f);for(n(v,function(a){(a.request||a.requestError)&&g.unshift(a.request,a.requestError);(a.response||a.responseError)&&g.push(a.response,a.responseError)});g.length;){b=
+ g.shift();var m=g.shift(),h=h.then(b,m)}d?(h.success=function(a){Qa(a,"fn");h.then(function(b){a(b.data,b.status,b.headers,f)});return h},h.error=function(a){Qa(a,"fn");h.then(null,function(b){a(b.data,b.status,b.headers,f)});return h}):(h.success=dd("success"),h.error=dd("error"));return h}function r(c,d){function g(a,c,d,e){function f(){l(c,a,d,e)}J&&(200<=a&&300>a?J.put(R,[a,c,ad(d),e]):J.remove(R));b?h.$applyAsync(f):(f(),h.$$phase||h.$apply())}function l(a,b,d,e){b=-1<=b?b:0;(200<=b&&300>b?n.resolve:
+ n.reject)({data:a,status:b,headers:bd(d),config:c,statusText:e})}function r(a){l(a.data,a.status,ia(a.headers()),a.statusText)}function v(){var a=m.pendingRequests.indexOf(c);-1!==a&&m.pendingRequests.splice(a,1)}var n=k.defer(),D=n.promise,J,K,O=c.headers,R=t(c.url,c.paramSerializer(c.params));m.pendingRequests.push(c);D.then(v,v);!c.cache&&!a.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(J=H(c.cache)?c.cache:H(a.cache)?a.cache:A);J&&(K=J.get(R),y(K)?K&&z(K.then)?K.then(r,r):I(K)?l(K[1],
+ K[0],ia(K[2]),K[3]):l(K,200,{},"OK"):J.put(R,D));q(K)&&((K=ed(c.url)?f()[c.xsrfCookieName||a.xsrfCookieName]:u)&&(O[c.xsrfHeaderName||a.xsrfHeaderName]=K),e(c.method,R,d,g,O,c.timeout,c.withCredentials,c.responseType));return D}function t(a,b){0<b.length&&(a+=(-1==a.indexOf("?")?"?":"&")+b);return a}var A=g("$http");a.paramSerializer=E(a.paramSerializer)?l.get(a.paramSerializer):a.paramSerializer;var v=[];n(c,function(a){v.unshift(E(a)?l.get(a):l.invoke(a))});m.pendingRequests=[];(function(a){n(arguments,
+ function(a){m[a]=function(b,c){return m(M({},c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){n(arguments,function(a){m[a]=function(b,c,d){return m(M({},d||{},{method:a,url:b,data:c}))}})})("post","put","patch");m.defaults=a;return m}]}function gf(){this.$get=function(){return function(){return new S.XMLHttpRequest}}}function ff(){this.$get=["$browser","$window","$document","$xhrFactory",function(a,b,d,c){return Uf(a,c,a.defer,b.angular.callbacks,d[0])}]}function Uf(a,b,d,
+ c,e){function f(a,b,d){var f=e.createElement("script"),m=null;f.type="text/javascript";f.src=a;f.async=!0;m=function(a){f.removeEventListener("load",m,!1);f.removeEventListener("error",m,!1);e.body.removeChild(f);f=null;var g=-1,A="unknown";a&&("load"!==a.type||c[b].called||(a={type:"error"}),A=a.type,g="error"===a.type?404:200);d&&d(g,A)};f.addEventListener("load",m,!1);f.addEventListener("error",m,!1);e.body.appendChild(f);return m}return function(e,h,k,l,m,r,t,A){function v(){C&&C();w&&w.abort()}
+ function T(b,c,e,f,g){y(L)&&d.cancel(L);C=w=null;b(c,e,f,g);a.$$completeOutstandingRequest(x)}a.$$incOutstandingRequestCount();h=h||a.url();if("jsonp"==F(e)){var p="_"+(c.counter++).toString(36);c[p]=function(a){c[p].data=a;c[p].called=!0};var C=f(h.replace("JSON_CALLBACK","angular.callbacks."+p),p,function(a,b){T(l,a,c[p].data,"",b);c[p]=x})}else{var w=b(e,h);w.open(e,h,!0);n(m,function(a,b){y(a)&&w.setRequestHeader(b,a)});w.onload=function(){var a=w.statusText||"",b="response"in w?w.response:w.responseText,
+ c=1223===w.status?204:w.status;0===c&&(c=b?200:"file"==wa(h).protocol?404:0);T(l,c,b,w.getAllResponseHeaders(),a)};e=function(){T(l,-1,null,null,"")};w.onerror=e;w.onabort=e;t&&(w.withCredentials=!0);if(A)try{w.responseType=A}catch(ga){if("json"!==A)throw ga;}w.send(q(k)?null:k)}if(0<r)var L=d(v,r);else r&&z(r.then)&&r.then(v)}}function af(){var a="{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a};this.endSymbol=function(a){return a?(b=a,this):b};this.$get=["$parse","$exceptionHandler",
+ "$sce",function(d,c,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(m,a).replace(r,b)}function h(f,h,m,r){function p(a){try{var b=a;a=m?e.getTrusted(m,b):e.valueOf(b);var d;if(r&&!y(a))d=a;else if(null==a)d="";else{switch(typeof a){case "string":break;case "number":a=""+a;break;default:a=db(a)}d=a}return d}catch(g){c(Ja.interr(f,g))}}r=!!r;for(var C,w,n=0,L=[],s=[],D=f.length,J=[],K=[];n<D;)if(-1!=(C=f.indexOf(a,n))&&-1!=(w=f.indexOf(b,C+k)))n!==C&&J.push(g(f.substring(n,C))),n=f.substring(C+
+ k,w),L.push(n),s.push(d(n,p)),n=w+l,K.push(J.length),J.push("");else{n!==D&&J.push(g(f.substring(n)));break}m&&1<J.length&&Ja.throwNoconcat(f);if(!h||L.length){var O=function(a){for(var b=0,c=L.length;b<c;b++){if(r&&q(a[b]))return;J[K[b]]=a[b]}return J.join("")};return M(function(a){var b=0,d=L.length,e=Array(d);try{for(;b<d;b++)e[b]=s[b](a);return O(e)}catch(g){c(Ja.interr(f,g))}},{exp:f,expressions:L,$$watchDelegate:function(a,b){var c;return a.$watchGroup(s,function(d,e){var f=O(d);z(b)&&b.call(this,
+ f,d!==e?c:f,a);c=f})}})}}var k=a.length,l=b.length,m=new RegExp(a.replace(/./g,f),"g"),r=new RegExp(b.replace(/./g,f),"g");h.startSymbol=function(){return a};h.endSymbol=function(){return b};return h}]}function bf(){this.$get=["$rootScope","$window","$q","$$q",function(a,b,d,c){function e(e,h,k,l){var m=4<arguments.length,r=m?ra.call(arguments,4):[],t=b.setInterval,A=b.clearInterval,v=0,n=y(l)&&!l,p=(n?c:d).defer(),C=p.promise;k=y(k)?k:0;C.then(null,null,m?function(){e.apply(null,r)}:e);C.$$intervalId=
+ t(function(){p.notify(v++);0<k&&v>=k&&(p.resolve(v),A(C.$$intervalId),delete f[C.$$intervalId]);n||a.$apply()},h);f[C.$$intervalId]=p;return C}var f={};e.cancel=function(a){return a&&a.$$intervalId in f?(f[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),delete f[a.$$intervalId],!0):!1};return e}]}function bc(a){a=a.split("/");for(var b=a.length;b--;)a[b]=ob(a[b]);return a.join("/")}function fd(a,b){var d=wa(a);b.$$protocol=d.protocol;b.$$host=d.hostname;b.$$port=ea(d.port)||Vf[d.protocol]||
+ null}function gd(a,b){var d="/"!==a.charAt(0);d&&(a="/"+a);var c=wa(a);b.$$path=decodeURIComponent(d&&"/"===c.pathname.charAt(0)?c.pathname.substring(1):c.pathname);b.$$search=xc(c.search);b.$$hash=decodeURIComponent(c.hash);b.$$path&&"/"!=b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function pa(a,b){if(0===b.indexOf(a))return b.substr(a.length)}function Fa(a){var b=a.indexOf("#");return-1==b?a:a.substr(0,b)}function ib(a){return a.replace(/(#.+)|#$/,"$1")}function cc(a,b,d){this.$$html5=!0;d=d||"";
+ fd(a,this);this.$$parse=function(a){var d=pa(b,a);if(!E(d))throw Db("ipthprfx",a,b);gd(d,this);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Qb(this.$$search),d=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=bc(this.$$path)+(a?"?"+a:"")+d;this.$$absUrl=b+this.$$url.substr(1)};this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;y(f=pa(a,c))?(g=f,g=y(f=pa(d,f))?b+(pa("/",f)||f):a+g):y(f=pa(b,c))?g=b+f:b==c+"/"&&(g=b);g&&this.$$parse(g);
+ return!!g}}function dc(a,b,d){fd(a,this);this.$$parse=function(c){var e=pa(a,c)||pa(b,c),f;q(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",q(e)&&(a=c,this.replace())):(f=pa(d,e),q(f)&&(f=e));gd(f,this);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;0===f.indexOf(e)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))?f[1]:c);this.$$path=c;this.$$compose()};this.$$compose=function(){var b=Qb(this.$$search),e=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=bc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+(this.$$url?
+ d+this.$$url:"")};this.$$parseLinkUrl=function(b,d){return Fa(a)==Fa(b)?(this.$$parse(b),!0):!1}}function hd(a,b,d){this.$$html5=!0;dc.apply(this,arguments);this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a==Fa(c)?f=c:(g=pa(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$compose=function(){var b=Qb(this.$$search),e=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=bc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+d+this.$$url}}function Eb(a){return function(){return this[a]}}
+ function id(a,b){return function(d){if(q(d))return this[a];this[a]=b(d);this.$$compose();return this}}function hf(){var a="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return y(b)?(a=b,this):a};this.html5Mode=function(a){return $a(a)?(b.enabled=a,this):H(a)?($a(a.enabled)&&(b.enabled=a.enabled),$a(a.requireBase)&&(b.requireBase=a.requireBase),$a(a.rewriteLinks)&&(b.rewriteLinks=a.rewriteLinks),this):b};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",
+ function(d,c,e,f,g){function h(a,b,d){var e=l.url(),f=l.$$state;try{c.url(a,b,d),l.$$state=c.state()}catch(g){throw l.url(e),l.$$state=f,g;}}function k(a,b){d.$broadcast("$locationChangeSuccess",l.absUrl(),a,l.$$state,b)}var l,m;m=c.baseHref();var r=c.url(),t;if(b.enabled){if(!m&&b.requireBase)throw Db("nobase");t=r.substring(0,r.indexOf("/",r.indexOf("//")+2))+(m||"/");m=e.history?cc:hd}else t=Fa(r),m=dc;var A=t.substr(0,Fa(t).lastIndexOf("/")+1);l=new m(t,A,"#"+a);l.$$parseLinkUrl(r,r);l.$$state=
+ c.state();var v=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(b.rewriteLinks&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!=a.which&&2!=a.button){for(var e=B(a.target);"a"!==ta(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),k=e.attr("href")||e.attr("xlink:href");H(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=wa(h.animVal).href);v.test(h)||!h||e.attr("target")||a.isDefaultPrevented()||!l.$$parseLinkUrl(h,k)||(a.preventDefault(),l.absUrl()!=c.url()&&(d.$apply(),g.angular["ff-684208-preventDefault"]=
+ !0))}});ib(l.absUrl())!=ib(r)&&c.url(l.absUrl(),!0);var n=!0;c.onUrlChange(function(a,b){q(pa(A,a))?g.location.href=a:(d.$evalAsync(function(){var c=l.absUrl(),e=l.$$state,f;a=ib(a);l.$$parse(a);l.$$state=b;f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented;l.absUrl()===a&&(f?(l.$$parse(c),l.$$state=e,h(c,!1,e)):(n=!1,k(c,e)))}),d.$$phase||d.$digest())});d.$watch(function(){var a=ib(c.url()),b=ib(l.absUrl()),f=c.state(),g=l.$$replace,m=a!==b||l.$$html5&&e.history&&f!==l.$$state;if(n||
+ m)n=!1,d.$evalAsync(function(){var b=l.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,l.$$state,f).defaultPrevented;l.absUrl()===b&&(c?(l.$$parse(a),l.$$state=f):(m&&h(b,g,f===l.$$state?null:l.$$state),k(a,f)))});l.$$replace=!1});return l}]}function jf(){var a=!0,b=this;this.debugEnabled=function(b){return y(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&
+ (a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=d.console||{},e=b[a]||b.log||x;a=!1;try{a=!!e.apply}catch(k){}return a?function(){var a=[];n(arguments,function(b){a.push(c(b))});return e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function Va(a,b){if("__defineGetter__"===a||"__defineSetter__"===a||"__lookupGetter__"===a||"__lookupSetter__"===
+ a||"__proto__"===a)throw ba("isecfld",b);return a}function jd(a,b){a+="";if(!E(a))throw ba("iseccst",b);return a}function xa(a,b){if(a){if(a.constructor===a)throw ba("isecfn",b);if(a.window===a)throw ba("isecwindow",b);if(a.children&&(a.nodeName||a.prop&&a.attr&&a.find))throw ba("isecdom",b);if(a===Object)throw ba("isecobj",b);}return a}function kd(a,b){if(a){if(a.constructor===a)throw ba("isecfn",b);if(a===Wf||a===Xf||a===Yf)throw ba("isecff",b);}}function ld(a,b){if(a&&(a===(0).constructor||a===
+ (!1).constructor||a==="".constructor||a==={}.constructor||a===[].constructor||a===Function.constructor))throw ba("isecaf",b);}function Zf(a,b){return"undefined"!==typeof a?a:b}function md(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function W(a,b){var d,c;switch(a.type){case s.Program:d=!0;n(a.body,function(a){W(a.expression,b);d=d&&a.expression.constant});a.constant=d;break;case s.Literal:a.constant=!0;a.toWatch=[];break;case s.UnaryExpression:W(a.argument,b);a.constant=a.argument.constant;
+ a.toWatch=a.argument.toWatch;break;case s.BinaryExpression:W(a.left,b);W(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case s.LogicalExpression:W(a.left,b);W(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case s.ConditionalExpression:W(a.test,b);W(a.alternate,b);W(a.consequent,b);a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case s.Identifier:a.constant=
+ !1;a.toWatch=[a];break;case s.MemberExpression:W(a.object,b);a.computed&&W(a.property,b);a.constant=a.object.constant&&(!a.computed||a.property.constant);a.toWatch=[a];break;case s.CallExpression:d=a.filter?!b(a.callee.name).$stateful:!1;c=[];n(a.arguments,function(a){W(a,b);d=d&&a.constant;a.constant||c.push.apply(c,a.toWatch)});a.constant=d;a.toWatch=a.filter&&!b(a.callee.name).$stateful?c:[a];break;case s.AssignmentExpression:W(a.left,b);W(a.right,b);a.constant=a.left.constant&&a.right.constant;
+ a.toWatch=[a];break;case s.ArrayExpression:d=!0;c=[];n(a.elements,function(a){W(a,b);d=d&&a.constant;a.constant||c.push.apply(c,a.toWatch)});a.constant=d;a.toWatch=c;break;case s.ObjectExpression:d=!0;c=[];n(a.properties,function(a){W(a.value,b);d=d&&a.value.constant;a.value.constant||c.push.apply(c,a.value.toWatch)});a.constant=d;a.toWatch=c;break;case s.ThisExpression:a.constant=!1,a.toWatch=[]}}function nd(a){if(1==a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:u}}
+ function od(a){return a.type===s.Identifier||a.type===s.MemberExpression}function pd(a){if(1===a.body.length&&od(a.body[0].expression))return{type:s.AssignmentExpression,left:a.body[0].expression,right:{type:s.NGValueParameter},operator:"="}}function qd(a){return 0===a.body.length||1===a.body.length&&(a.body[0].expression.type===s.Literal||a.body[0].expression.type===s.ArrayExpression||a.body[0].expression.type===s.ObjectExpression)}function rd(a,b){this.astBuilder=a;this.$filter=b}function sd(a,
+ b){this.astBuilder=a;this.$filter=b}function Fb(a){return"constructor"==a}function ec(a){return z(a.valueOf)?a.valueOf():$f.call(a)}function kf(){var a=$(),b=$();this.$get=["$filter",function(d){function c(a,b){return null==a||null==b?a===b:"object"===typeof a&&(a=ec(a),"object"===typeof a)?!1:a===b||a!==a&&b!==b}function e(a,b,d,e,f){var g=e.inputs,h;if(1===g.length){var k=c,g=g[0];return a.$watch(function(a){var b=g(a);c(b,k)||(h=e(a,u,u,[b]),k=b&&ec(b));return h},b,d,f)}for(var l=[],m=[],r=0,n=
+ g.length;r<n;r++)l[r]=c,m[r]=null;return a.$watch(function(a){for(var b=!1,d=0,f=g.length;d<f;d++){var k=g[d](a);if(b||(b=!c(k,l[d])))m[d]=k,l[d]=k&&ec(k)}b&&(h=e(a,u,u,m));return h},b,d,f)}function f(a,b,c,d){var e,f;return e=a.$watch(function(a){return d(a)},function(a,c,d){f=a;z(b)&&b.apply(this,arguments);y(a)&&d.$$postDigest(function(){y(f)&&e()})},c)}function g(a,b,c,d){function e(a){var b=!0;n(a,function(a){y(a)||(b=!1)});return b}var f,g;return f=a.$watch(function(a){return d(a)},function(a,
+ c,d){g=a;z(b)&&b.call(this,a,c,d);e(a)&&d.$$postDigest(function(){e(g)&&f()})},c)}function h(a,b,c,d){var e;return e=a.$watch(function(a){return d(a)},function(a,c,d){z(b)&&b.apply(this,arguments);e()},c)}function k(a,b){if(!b)return a;var c=a.$$watchDelegate,d=!1,c=c!==g&&c!==f?function(c,e,f,g){f=d&&g?g[0]:a(c,e,f,g);return b(f,c,e)}:function(c,d,e,f){e=a(c,d,e,f);c=b(e,c,d);return y(e)?c:e};a.$$watchDelegate&&a.$$watchDelegate!==e?c.$$watchDelegate=a.$$watchDelegate:b.$stateful||(c.$$watchDelegate=
+ e,d=!a.inputs,c.inputs=a.inputs?a.inputs:[a]);return c}var l=Ba().noUnsafeEval,m={csp:l,expensiveChecks:!1},r={csp:l,expensiveChecks:!0};return function(c,l,v){var n,p,q;switch(typeof c){case "string":q=c=c.trim();var w=v?b:a;n=w[q];n||(":"===c.charAt(0)&&":"===c.charAt(1)&&(p=!0,c=c.substring(2)),v=v?r:m,n=new fc(v),n=(new gc(n,d,v)).parse(c),n.constant?n.$$watchDelegate=h:p?n.$$watchDelegate=n.literal?g:f:n.inputs&&(n.$$watchDelegate=e),w[q]=n);return k(n,l);case "function":return k(c,l);default:return x}}}]}
+ function mf(){this.$get=["$rootScope","$exceptionHandler",function(a,b){return td(function(b){a.$evalAsync(b)},b)}]}function nf(){this.$get=["$browser","$exceptionHandler",function(a,b){return td(function(b){a.defer(b)},b)}]}function td(a,b){function d(a,b,c){function d(b){return function(c){e||(e=!0,b.call(a,c))}}var e=!1;return[d(b),d(c)]}function c(){this.$$state={status:0}}function e(a,b){return function(c){b.call(a,c)}}function f(c){!c.processScheduled&&c.pending&&(c.processScheduled=!0,a(function(){var a,
+ d,e;e=c.pending;c.processScheduled=!1;c.pending=u;for(var f=0,g=e.length;f<g;++f){d=e[f][0];a=e[f][c.status];try{z(a)?d.resolve(a(c.value)):1===c.status?d.resolve(c.value):d.reject(c.value)}catch(h){d.reject(h),b(h)}}}))}function g(){this.promise=new c;this.resolve=e(this,this.resolve);this.reject=e(this,this.reject);this.notify=e(this,this.notify)}var h=G("$q",TypeError);M(c.prototype,{then:function(a,b,c){if(q(a)&&q(b)&&q(c))return this;var d=new g;this.$$state.pending=this.$$state.pending||[];
+ this.$$state.pending.push([d,a,b,c]);0<this.$$state.status&&f(this.$$state);return d.promise},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return l(b,!0,a)},function(b){return l(b,!1,a)},b)}});M(g.prototype,{resolve:function(a){this.promise.$$state.status||(a===this.promise?this.$$reject(h("qcycle",a)):this.$$resolve(a))},$$resolve:function(a){var c,e;e=d(this,this.$$resolve,this.$$reject);try{if(H(a)||z(a))c=a&&a.then;z(c)?(this.promise.$$state.status=
+ -1,c.call(a,e[0],e[1],this.notify)):(this.promise.$$state.value=a,this.promise.$$state.status=1,f(this.promise.$$state))}catch(g){e[1](g),b(g)}},reject:function(a){this.promise.$$state.status||this.$$reject(a)},$$reject:function(a){this.promise.$$state.value=a;this.promise.$$state.status=2;f(this.promise.$$state)},notify:function(c){var d=this.promise.$$state.pending;0>=this.promise.$$state.status&&d&&d.length&&a(function(){for(var a,e,f=0,g=d.length;f<g;f++){e=d[f][0];a=d[f][3];try{e.notify(z(a)?
+ a(c):c)}catch(h){b(h)}}})}});var k=function(a,b){var c=new g;b?c.resolve(a):c.reject(a);return c.promise},l=function(a,b,c){var d=null;try{z(c)&&(d=c())}catch(e){return k(e,!1)}return d&&z(d.then)?d.then(function(){return k(a,b)},function(a){return k(a,!1)}):k(a,b)},m=function(a,b,c,d){var e=new g;e.resolve(a);return e.promise.then(b,c,d)},r=function A(a){if(!z(a))throw h("norslvr",a);if(!(this instanceof A))return new A(a);var b=new g;a(function(a){b.resolve(a)},function(a){b.reject(a)});return b.promise};
+ r.defer=function(){return new g};r.reject=function(a){var b=new g;b.reject(a);return b.promise};r.when=m;r.resolve=m;r.all=function(a){var b=new g,c=0,d=I(a)?[]:{};n(a,function(a,e){c++;m(a).then(function(a){d.hasOwnProperty(e)||(d[e]=a,--c||b.resolve(d))},function(a){d.hasOwnProperty(e)||b.reject(a)})});0===c&&b.resolve(d);return b.promise};return r}function wf(){this.$get=["$window","$timeout",function(a,b){var d=a.requestAnimationFrame||a.webkitRequestAnimationFrame,c=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||
+ a.webkitCancelRequestAnimationFrame,e=!!d,f=e?function(a){var b=d(a);return function(){c(b)}}:function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};f.supported=e;return f}]}function lf(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$id=++nb;this.$$ChildScope=null}b.prototype=a;return b}var b=10,d=G("$rootScope"),c=null,e=null;this.digestTtl=function(a){arguments.length&&
+ (b=a);return b};this.$get=["$injector","$exceptionHandler","$parse","$browser",function(f,g,h,k){function l(a){a.currentScope.$$destroyed=!0}function m(a){9===Ha&&(a.$$childHead&&m(a.$$childHead),a.$$nextSibling&&m(a.$$nextSibling));a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function r(){this.$id=++nb;this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this.$root=this;this.$$destroyed=
+ !1;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$$isolateBindings=null}function t(a){if(w.$$phase)throw d("inprog",w.$$phase);w.$$phase=a}function A(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function v(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function s(){}function p(){for(;aa.length;)try{aa.shift()()}catch(a){g(a)}e=null}function C(){null===e&&(e=k.defer(function(){w.$apply(p)}))}r.prototype={constructor:r,
+ $new:function(b,c){var d;c=c||this;b?(d=new r,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope);d.$parent=c;d.$$prevSibling=c.$$childTail;c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d;(b||c!=this)&&d.$on("$destroy",l);return d},$watch:function(a,b,d,e){var f=h(a);if(f.$$watchDelegate)return f.$$watchDelegate(this,b,d,f,a);var g=this,k=g.$$watchers,l={fn:b,last:s,get:f,exp:e||a,eq:!!d};c=null;z(b)||(l.fn=x);k||
+ (k=g.$$watchers=[]);k.unshift(l);A(this,1);return function(){0<=ab(k,l)&&A(g,-1);c=null}},$watchGroup:function(a,b){function c(){h=!1;k?(k=!1,b(e,e,g)):b(e,d,g)}var d=Array(a.length),e=Array(a.length),f=[],g=this,h=!1,k=!0;if(!a.length){var l=!0;g.$evalAsync(function(){l&&b(e,e,g)});return function(){l=!1}}if(1===a.length)return this.$watch(a[0],function(a,c,f){e[0]=a;d[0]=c;b(e,a===c?e:d,f)});n(a,function(a,b){var k=g.$watch(a,function(a,f){e[b]=a;d[b]=f;h||(h=!0,g.$evalAsync(c))});f.push(k)});return function(){for(;f.length;)f.shift()()}},
+ $watchCollection:function(a,b){function c(a){e=a;var b,d,g,h;if(!q(e)){if(H(e))if(za(e))for(f!==r&&(f=r,n=f.length=0,l++),a=e.length,n!==a&&(l++,f.length=n=a),b=0;b<a;b++)h=f[b],g=e[b],d=h!==h&&g!==g,d||h===g||(l++,f[b]=g);else{f!==t&&(f=t={},n=0,l++);a=0;for(b in e)qa.call(e,b)&&(a++,g=e[b],h=f[b],b in f?(d=h!==h&&g!==g,d||h===g||(l++,f[b]=g)):(n++,f[b]=g,l++));if(n>a)for(b in l++,f)qa.call(e,b)||(n--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$stateful=!0;var d=this,e,f,g,k=1<b.length,l=0,m=
+ h(a,c),r=[],t={},p=!0,n=0;return this.$watch(m,function(){p?(p=!1,b(e,e,d)):b(e,g,d);if(k)if(H(e))if(za(e)){g=Array(e.length);for(var a=0;a<e.length;a++)g[a]=e[a]}else for(a in g={},e)qa.call(e,a)&&(g[a]=e[a]);else g=e})},$digest:function(){var a,f,h,l,m,r,n=b,A,q=[],v,C;t("$digest");k.$$checkUrlChange();this===w&&null!==e&&(k.defer.cancel(e),p());c=null;do{r=!1;for(A=this;u.length;){try{C=u.shift(),C.scope.$eval(C.expression,C.locals)}catch(aa){g(aa)}c=null}a:do{if(l=A.$$watchers)for(m=l.length;m--;)try{if(a=
+ l[m])if((f=a.get(A))!==(h=a.last)&&!(a.eq?ma(f,h):"number"===typeof f&&"number"===typeof h&&isNaN(f)&&isNaN(h)))r=!0,c=a,a.last=a.eq?bb(f,null):f,a.fn(f,h===s?f:h,A),5>n&&(v=4-n,q[v]||(q[v]=[]),q[v].push({msg:z(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:f,oldVal:h}));else if(a===c){r=!1;break a}}catch(y){g(y)}if(!(l=A.$$watchersCount&&A.$$childHead||A!==this&&A.$$nextSibling))for(;A!==this&&!(l=A.$$nextSibling);)A=A.$parent}while(A=l);if((r||u.length)&&!n--)throw w.$$phase=null,d("infdig",
+ b,q);}while(r||u.length);for(w.$$phase=null;L.length;)try{L.shift()()}catch(x){g(x)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this===w&&k.$$applicationDestroyed();A(this,-this.$$watchersCount);for(var b in this.$$listenerCount)v(this,this.$$listenerCount[b],b);a&&a.$$childHead==this&&(a.$$childHead=this.$$nextSibling);a&&a.$$childTail==this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=
+ this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=x;this.$on=this.$watch=this.$watchGroup=function(){return x};this.$$listeners={};this.$$nextSibling=null;m(this)}},$eval:function(a,b){return h(a)(this,b)},$evalAsync:function(a,b){w.$$phase||u.length||k.defer(function(){u.length&&w.$digest()});u.push({scope:this,expression:a,locals:b})},$$postDigest:function(a){L.push(a)},$apply:function(a){try{t("$apply");
+ try{return this.$eval(a)}finally{w.$$phase=null}}catch(b){g(b)}finally{try{w.$digest()}catch(c){throw g(c),c;}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&aa.push(b);C()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(c[d]=null,v(e,1,a))}},$emit:function(a,b){var c=[],d,e=this,f=!1,h=
+ {name:a,targetScope:e,stopPropagation:function(){f=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},k=cb([h],arguments,1),l,m;do{d=e.$$listeners[a]||c;h.currentScope=e;l=0;for(m=d.length;l<m;l++)if(d[l])try{d[l].apply(null,k)}catch(r){g(r)}else d.splice(l,1),l--,m--;if(f)return h.currentScope=null,h;e=e.$parent}while(e);h.currentScope=null;return h},$broadcast:function(a,b){var c=this,d=this,e={name:a,targetScope:this,preventDefault:function(){e.defaultPrevented=!0},defaultPrevented:!1};
+ if(!this.$$listenerCount[a])return e;for(var f=cb([e],arguments,1),h,k;c=d;){e.currentScope=c;d=c.$$listeners[a]||[];h=0;for(k=d.length;h<k;h++)if(d[h])try{d[h].apply(null,f)}catch(l){g(l)}else d.splice(h,1),h--,k--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}e.currentScope=null;return e}};var w=new r,u=w.$$asyncQueue=[],L=w.$$postDigestQueue=[],aa=w.$$applyAsyncQueue=[];return w}]}function ge(){var a=/^\s*(https?|ftp|mailto|tel|file):/,
+ b=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(b){return y(b)?(a=b,this):a};this.imgSrcSanitizationWhitelist=function(a){return y(a)?(b=a,this):b};this.$get=function(){return function(d,c){var e=c?b:a,f;f=wa(d).href;return""===f||f.match(e)?d:"unsafe:"+f}}}function ag(a){if("self"===a)return a;if(E(a)){if(-1<a.indexOf("***"))throw ya("iwcard",a);a=ud(a).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*");return new RegExp("^"+a+"$")}if(Ma(a))return new RegExp("^"+
+ a.source+"$");throw ya("imatcher");}function vd(a){var b=[];y(a)&&n(a,function(a){b.push(ag(a))});return b}function pf(){this.SCE_CONTEXTS=la;var a=["self"],b=[];this.resourceUrlWhitelist=function(b){arguments.length&&(a=vd(b));return a};this.resourceUrlBlacklist=function(a){arguments.length&&(b=vd(a));return b};this.$get=["$injector",function(d){function c(a,b){return"self"===a?ed(b):!!a.exec(b.href)}function e(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=
+ new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()};return b}var f=function(a){throw ya("unsafe");};d.has("$sanitize")&&(f=d.get("$sanitize"));var g=e(),h={};h[la.HTML]=e(g);h[la.CSS]=e(g);h[la.URL]=e(g);h[la.JS]=e(g);h[la.RESOURCE_URL]=e(h[la.URL]);return{trustAs:function(a,b){var c=h.hasOwnProperty(a)?h[a]:null;if(!c)throw ya("icontext",a,b);if(null===b||q(b)||""===b)return b;if("string"!==typeof b)throw ya("itype",
+ a);return new c(b)},getTrusted:function(d,e){if(null===e||q(e)||""===e)return e;var g=h.hasOwnProperty(d)?h[d]:null;if(g&&e instanceof g)return e.$$unwrapTrustedValue();if(d===la.RESOURCE_URL){var g=wa(e.toString()),r,t,n=!1;r=0;for(t=a.length;r<t;r++)if(c(a[r],g)){n=!0;break}if(n)for(r=0,t=b.length;r<t;r++)if(c(b[r],g)){n=!1;break}if(n)return e;throw ya("insecurl",e.toString());}if(d===la.HTML)return f(e);throw ya("unsafe");},valueOf:function(a){return a instanceof g?a.$$unwrapTrustedValue():a}}}]}
+ function of(){var a=!0;this.enabled=function(b){arguments.length&&(a=!!b);return a};this.$get=["$parse","$sceDelegate",function(b,d){if(a&&8>Ha)throw ya("iequirks");var c=ia(la);c.isEnabled=function(){return a};c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b},c.valueOf=Ya);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;n(la,function(a,
+ b){var d=F(b);c[fb("parse_as_"+d)]=function(b){return e(a,b)};c[fb("get_trusted_"+d)]=function(b){return f(a,b)};c[fb("trust_as_"+d)]=function(b){return g(a,b)}});return c}]}function qf(){this.$get=["$window","$document",function(a,b){var d={},c=ea((/android (\d+)/.exec(F((a.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((a.navigator||{}).userAgent),f=b[0]||{},g,h=/^(Moz|webkit|ms)(?=[A-Z])/,k=f.body&&f.body.style,l=!1,m=!1;if(k){for(var r in k)if(l=h.exec(r)){g=l[0];g=g.substr(0,1).toUpperCase()+
+ g.substr(1);break}g||(g="WebkitOpacity"in k&&"webkit");l=!!("transition"in k||g+"Transition"in k);m=!!("animation"in k||g+"Animation"in k);!c||l&&m||(l=E(k.webkitTransition),m=E(k.webkitAnimation))}return{history:!(!a.history||!a.history.pushState||4>c||e),hasEvent:function(a){if("input"===a&&11>=Ha)return!1;if(q(d[a])){var b=f.createElement("div");d[a]="on"+a in b}return d[a]},csp:Ba(),vendorPrefix:g,transitions:l,animations:m,android:c}}]}function sf(){this.$get=["$templateCache","$http","$q","$sce",
+ function(a,b,d,c){function e(f,g){e.totalPendingRequests++;E(f)&&a.get(f)||(f=c.getTrustedResourceUrl(f));var h=b.defaults&&b.defaults.transformResponse;I(h)?h=h.filter(function(a){return a!==$b}):h===$b&&(h=null);return b.get(f,{cache:a,transformResponse:h})["finally"](function(){e.totalPendingRequests--}).then(function(b){a.put(f,b.data);return b.data},function(a){if(!g)throw ha("tpload",f,a.status,a.statusText);return d.reject(a)})}e.totalPendingRequests=0;return e}]}function tf(){this.$get=["$rootScope",
+ "$browser","$location",function(a,b,d){return{findBindings:function(a,b,d){a=a.getElementsByClassName("ng-binding");var g=[];n(a,function(a){var c=fa.element(a).data("$binding");c&&n(c,function(c){d?(new RegExp("(^|\\s)"+ud(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!=c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-","data-ng-","ng\\:"],h=0;h<g.length;++h){var k=a.querySelectorAll("["+g[h]+"model"+(d?"=":"*=")+'"'+b+'"]');if(k.length)return k}},getLocation:function(){return d.url()},
+ setLocation:function(b){b!==d.url()&&(d.url(b),a.$digest())},whenStable:function(a){b.notifyWhenNoOutstandingRequests(a)}}}]}function uf(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(a,b,d,c,e){function f(f,k,l){z(f)||(l=k,k=f,f=x);var m=ra.call(arguments,3),r=y(l)&&!l,t=(r?c:d).defer(),n=t.promise,q;q=b.defer(function(){try{t.resolve(f.apply(null,m))}catch(b){t.reject(b),e(b)}finally{delete g[n.$$timeoutId]}r||a.$apply()},k);n.$$timeoutId=q;g[q]=t;return n}var g={};
+ f.cancel=function(a){return a&&a.$$timeoutId in g?(g[a.$$timeoutId].reject("canceled"),delete g[a.$$timeoutId],b.defer.cancel(a.$$timeoutId)):!1};return f}]}function wa(a){Ha&&(Y.setAttribute("href",a),a=Y.href);Y.setAttribute("href",a);return{href:Y.href,protocol:Y.protocol?Y.protocol.replace(/:$/,""):"",host:Y.host,search:Y.search?Y.search.replace(/^\?/,""):"",hash:Y.hash?Y.hash.replace(/^#/,""):"",hostname:Y.hostname,port:Y.port,pathname:"/"===Y.pathname.charAt(0)?Y.pathname:"/"+Y.pathname}}function ed(a){a=
+ E(a)?wa(a):a;return a.protocol===wd.protocol&&a.host===wd.host}function vf(){this.$get=na(S)}function xd(a){function b(a){try{return decodeURIComponent(a)}catch(b){return a}}var d=a[0]||{},c={},e="";return function(){var a,g,h,k,l;a=d.cookie||"";if(a!==e)for(e=a,a=e.split("; "),c={},h=0;h<a.length;h++)g=a[h],k=g.indexOf("="),0<k&&(l=b(g.substring(0,k)),q(c[l])&&(c[l]=b(g.substring(k+1))));return c}}function zf(){this.$get=xd}function Jc(a){function b(d,c){if(H(d)){var e={};n(d,function(a,c){e[c]=
+ b(c,a)});return e}return a.factory(d+"Filter",c)}this.register=b;this.$get=["$injector",function(a){return function(b){return a.get(b+"Filter")}}];b("currency",yd);b("date",zd);b("filter",bg);b("json",cg);b("limitTo",dg);b("lowercase",eg);b("number",Ad);b("orderBy",Bd);b("uppercase",fg)}function bg(){return function(a,b,d){if(!za(a)){if(null==a)return a;throw G("filter")("notarray",a);}var c;switch(hc(b)){case "function":break;case "boolean":case "null":case "number":case "string":c=!0;case "object":b=
+ gg(b,d,c);break;default:return a}return Array.prototype.filter.call(a,b)}}function gg(a,b,d){var c=H(a)&&"$"in a;!0===b?b=ma:z(b)||(b=function(a,b){if(q(a))return!1;if(null===a||null===b)return a===b;if(H(b)||H(a)&&!qc(a))return!1;a=F(""+a);b=F(""+b);return-1!==a.indexOf(b)});return function(e){return c&&!H(e)?Ka(e,a.$,b,!1):Ka(e,a,b,d)}}function Ka(a,b,d,c,e){var f=hc(a),g=hc(b);if("string"===g&&"!"===b.charAt(0))return!Ka(a,b.substring(1),d,c);if(I(a))return a.some(function(a){return Ka(a,b,d,c)});
+ switch(f){case "object":var h;if(c){for(h in a)if("$"!==h.charAt(0)&&Ka(a[h],b,d,!0))return!0;return e?!1:Ka(a,b,d,!1)}if("object"===g){for(h in b)if(e=b[h],!z(e)&&!q(e)&&(f="$"===h,!Ka(f?a:a[h],e,d,f,f)))return!1;return!0}return d(a,b);case "function":return!1;default:return d(a,b)}}function hc(a){return null===a?"null":typeof a}function yd(a){var b=a.NUMBER_FORMATS;return function(a,c,e){q(c)&&(c=b.CURRENCY_SYM);q(e)&&(e=b.PATTERNS[1].maxFrac);return null==a?a:Cd(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,
+ e).replace(/\u00A4/g,c)}}function Ad(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Cd(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function Cd(a,b,d,c,e){if(H(a))return"";var f=0>a;a=Math.abs(a);var g=Infinity===a;if(!g&&!isFinite(a))return"";var h=a+"",k="",l=!1,m=[];g&&(k="\u221e");if(!g&&-1!==h.indexOf("e")){var r=h.match(/([\d\.]+)e(-?)(\d+)/);r&&"-"==r[2]&&r[3]>e+1?a=0:(k=h,l=!0)}if(g||l)0<e&&1>a&&(k=a.toFixed(e),a=parseFloat(k),k=k.replace(ic,c));else{g=(h.split(ic)[1]||"").length;
+ q(e)&&(e=Math.min(Math.max(b.minFrac,g),b.maxFrac));a=+(Math.round(+(a.toString()+"e"+e)).toString()+"e"+-e);var g=(""+a).split(ic),h=g[0],g=g[1]||"",r=0,t=b.lgSize,n=b.gSize;if(h.length>=t+n)for(r=h.length-t,l=0;l<r;l++)0===(r-l)%n&&0!==l&&(k+=d),k+=h.charAt(l);for(l=r;l<h.length;l++)0===(h.length-l)%t&&0!==l&&(k+=d),k+=h.charAt(l);for(;g.length<e;)g+="0";e&&"0"!==e&&(k+=c+g.substr(0,e))}0===a&&(f=!1);m.push(f?b.negPre:b.posPre,k,f?b.negSuf:b.posSuf);return m.join("")}function Gb(a,b,d){var c="";
+ 0>a&&(c="-",a=-a);for(a=""+a;a.length<b;)a="0"+a;d&&(a=a.substr(a.length-b));return c+a}function ca(a,b,d,c){d=d||0;return function(e){e=e["get"+a]();if(0<d||e>-d)e+=d;0===e&&-12==d&&(e=12);return Gb(e,b,c)}}function Hb(a,b){return function(d,c){var e=d["get"+a](),f=sb(b?"SHORT"+a:a);return c[f][e]}}function Dd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Ed(a){return function(b){var d=Dd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-
+ +d;b=1+Math.round(b/6048E5);return Gb(b,a)}}function jc(a,b){return 0>=a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function zd(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,h=b[8]?a.setUTCFullYear:a.setFullYear,k=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=ea(b[9]+b[10]),g=ea(b[9]+b[11]));h.call(a,ea(b[1]),ea(b[2])-1,ea(b[3]));f=ea(b[4]||0)-f;g=ea(b[5]||0)-g;h=ea(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));k.call(a,f,g,h,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;
+ return function(c,d,f){var g="",h=[],k,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;E(c)&&(c=hg.test(c)?ea(c):b(c));Q(c)&&(c=new Date(c));if(!da(c)||!isFinite(c.getTime()))return c;for(;d;)(l=ig.exec(d))?(h=cb(h,l,1),d=h.pop()):(h.push(d),d=null);var m=c.getTimezoneOffset();f&&(m=vc(f,c.getTimezoneOffset()),c=Pb(c,f,!0));n(h,function(b){k=jg[b];g+=k?k(c,a.DATETIME_FORMATS,m):b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function cg(){return function(a,b){q(b)&&(b=2);return db(a,b)}}function dg(){return function(a,
+ b,d){b=Infinity===Math.abs(Number(b))?Number(b):ea(b);if(isNaN(b))return a;Q(a)&&(a=a.toString());if(!I(a)&&!E(a))return a;d=!d||isNaN(d)?0:ea(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?a.slice(d,d+b):0===d?a.slice(b,a.length):a.slice(Math.max(0,d+b),d)}}function Bd(a){function b(b,d){d=d?-1:1;return b.map(function(b){var c=1,h=Ya;if(z(b))h=b;else if(E(b)){if("+"==b.charAt(0)||"-"==b.charAt(0))c="-"==b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(h=a(b),h.constant))var k=h(),h=function(a){return a[k]}}return{get:h,
+ descending:c*d}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}return function(a,e,f){if(!za(a))return a;I(e)||(e=[e]);0===e.length&&(e=["+"]);var g=b(e,f);g.push({get:function(){return{}},descending:f?-1:1});a=Array.prototype.map.call(a,function(a,b){return{value:a,predicateValues:g.map(function(c){var e=c.get(a);c=typeof e;if(null===e)c="string",e="null";else if("string"===c)e=e.toLowerCase();else if("object"===c)a:{if("function"===typeof e.valueOf&&
+ (e=e.valueOf(),d(e)))break a;if(qc(e)&&(e=e.toString(),d(e)))break a;e=b}return{value:e,type:c}})}});a.sort(function(a,b){for(var c=0,d=0,e=g.length;d<e;++d){var c=a.predicateValues[d],f=b.predicateValues[d],n=0;c.type===f.type?c.value!==f.value&&(n=c.value<f.value?-1:1):n=c.type<f.type?-1:1;if(c=n*g[d].descending)break}return c});return a=a.map(function(a){return a.value})}}function La(a){z(a)&&(a={link:a});a.restrict=a.restrict||"AC";return na(a)}function Fd(a,b,d,c,e){var f=this,g=[];f.$error=
+ {};f.$$success={};f.$pending=u;f.$name=e(b.name||b.ngForm||"")(d);f.$dirty=!1;f.$pristine=!0;f.$valid=!0;f.$invalid=!1;f.$submitted=!1;f.$$parentForm=Ib;f.$rollbackViewValue=function(){n(g,function(a){a.$rollbackViewValue()})};f.$commitViewValue=function(){n(g,function(a){a.$commitViewValue()})};f.$addControl=function(a){Ra(a.$name,"input");g.push(a);a.$name&&(f[a.$name]=a);a.$$parentForm=f};f.$$renameControl=function(a,b){var c=a.$name;f[c]===a&&delete f[c];f[b]=a;a.$name=b};f.$removeControl=function(a){a.$name&&
+ f[a.$name]===a&&delete f[a.$name];n(f.$pending,function(b,c){f.$setValidity(c,null,a)});n(f.$error,function(b,c){f.$setValidity(c,null,a)});n(f.$$success,function(b,c){f.$setValidity(c,null,a)});ab(g,a);a.$$parentForm=Ib};Gd({ctrl:this,$element:a,set:function(a,b,c){var d=a[b];d?-1===d.indexOf(c)&&d.push(c):a[b]=[c]},unset:function(a,b,c){var d=a[b];d&&(ab(d,c),0===d.length&&delete a[b])},$animate:c});f.$setDirty=function(){c.removeClass(a,Wa);c.addClass(a,Jb);f.$dirty=!0;f.$pristine=!1;f.$$parentForm.$setDirty()};
+ f.$setPristine=function(){c.setClass(a,Wa,Jb+" ng-submitted");f.$dirty=!1;f.$pristine=!0;f.$submitted=!1;n(g,function(a){a.$setPristine()})};f.$setUntouched=function(){n(g,function(a){a.$setUntouched()})};f.$setSubmitted=function(){c.addClass(a,"ng-submitted");f.$submitted=!0;f.$$parentForm.$setSubmitted()}}function kc(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function jb(a,b,d,c,e,f){var g=F(b[0].type);if(!e.android){var h=!1;b.on("compositionstart",function(a){h=!0});
+ b.on("compositionend",function(){h=!1;k()})}var k=function(a){l&&(f.defer.cancel(l),l=null);if(!h){var e=b.val();a=a&&a.type;"password"===g||d.ngTrim&&"false"===d.ngTrim||(e=U(e));(c.$viewValue!==e||""===e&&c.$$hasNativeValidators)&&c.$setViewValue(e,a)}};if(e.hasEvent("input"))b.on("input",k);else{var l,m=function(a,b,c){l||(l=f.defer(function(){l=null;b&&b.value===c||k(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||15<b&&19>b||37<=b&&40>=b||m(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut",
+ m)}b.on("change",k);c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Kb(a,b){return function(d,c){var e,f;if(da(d))return d;if(E(d)){'"'==d.charAt(0)&&'"'==d.charAt(d.length-1)&&(d=d.substring(1,d.length-1));if(kg.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(),ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,
+ mm:0,ss:0,sss:0},n(e,function(a,c){c<b.length&&(f[b[c]]=+a)}),new Date(f.yyyy,f.MM-1,f.dd,f.HH,f.mm,f.ss||0,1E3*f.sss||0)}return NaN}}function kb(a,b,d,c){return function(e,f,g,h,k,l,m){function r(a){return a&&!(a.getTime&&a.getTime()!==a.getTime())}function n(a){return y(a)&&!da(a)?d(a)||u:a}Hd(e,f,g,h);jb(e,f,g,h,k,l);var A=h&&h.$options&&h.$options.timezone,v;h.$$parserName=a;h.$parsers.push(function(a){return h.$isEmpty(a)?null:b.test(a)?(a=d(a,v),A&&(a=Pb(a,A)),a):u});h.$formatters.push(function(a){if(a&&
+ !da(a))throw lb("datefmt",a);if(r(a))return(v=a)&&A&&(v=Pb(v,A,!0)),m("date")(a,c,A);v=null;return""});if(y(g.min)||g.ngMin){var s;h.$validators.min=function(a){return!r(a)||q(s)||d(a)>=s};g.$observe("min",function(a){s=n(a);h.$validate()})}if(y(g.max)||g.ngMax){var p;h.$validators.max=function(a){return!r(a)||q(p)||d(a)<=p};g.$observe("max",function(a){p=n(a);h.$validate()})}}}function Hd(a,b,d,c){(c.$$hasNativeValidators=H(b[0].validity))&&c.$parsers.push(function(a){var c=b.prop("validity")||{};
+ return c.badInput&&!c.typeMismatch?u:a})}function Id(a,b,d,c,e){if(y(c)){a=a(c);if(!a.constant)throw lb("constexpr",d,c);return a(b)}return e}function lc(a,b){a="ngClass"+a;return["$animate",function(d){function c(a,b){var c=[],d=0;a:for(;d<a.length;d++){for(var e=a[d],m=0;m<b.length;m++)if(e==b[m])continue a;c.push(e)}return c}function e(a){var b=[];return I(a)?(n(a,function(a){b=b.concat(e(a))}),b):E(a)?a.split(" "):H(a)?(n(a,function(a,c){a&&(b=b.concat(c.split(" ")))}),b):a}return{restrict:"AC",
+ link:function(f,g,h){function k(a,b){var c=g.data("$classCounts")||$(),d=[];n(a,function(a){if(0<b||c[a])c[a]=(c[a]||0)+b,c[a]===+(0<b)&&d.push(a)});g.data("$classCounts",c);return d.join(" ")}function l(a){if(!0===b||f.$index%2===b){var l=e(a||[]);if(!m){var n=k(l,1);h.$addClass(n)}else if(!ma(a,m)){var q=e(m),n=c(l,q),l=c(q,l),n=k(n,1),l=k(l,-1);n&&n.length&&d.addClass(g,n);l&&l.length&&d.removeClass(g,l)}}m=ia(a)}var m;f.$watch(h[a],l,!0);h.$observe("class",function(b){l(f.$eval(h[a]))});"ngClass"!==
+ a&&f.$watch("$index",function(c,d){var g=c&1;if(g!==(d&1)){var l=e(f.$eval(h[a]));g===b?(g=k(l,1),h.$addClass(g)):(g=k(l,-1),h.$removeClass(g))}})}}}]}function Gd(a){function b(a,b){b&&!f[a]?(k.addClass(e,a),f[a]=!0):!b&&f[a]&&(k.removeClass(e,a),f[a]=!1)}function d(a,c){a=a?"-"+zc(a,"-"):"";b(mb+a,!0===c);b(Jd+a,!1===c)}var c=a.ctrl,e=a.$element,f={},g=a.set,h=a.unset,k=a.$animate;f[Jd]=!(f[mb]=e.hasClass(mb));c.$setValidity=function(a,e,f){q(e)?(c.$pending||(c.$pending={}),g(c.$pending,a,f)):(c.$pending&&
+ h(c.$pending,a,f),Kd(c.$pending)&&(c.$pending=u));$a(e)?e?(h(c.$error,a,f),g(c.$$success,a,f)):(g(c.$error,a,f),h(c.$$success,a,f)):(h(c.$error,a,f),h(c.$$success,a,f));c.$pending?(b(Ld,!0),c.$valid=c.$invalid=u,d("",null)):(b(Ld,!1),c.$valid=Kd(c.$error),c.$invalid=!c.$valid,d("",c.$valid));e=c.$pending&&c.$pending[a]?u:c.$error[a]?!1:c.$$success[a]?!0:null;d(a,e);c.$$parentForm.$setValidity(a,e,c)}}function Kd(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}var lg=/^\/(.+)\/([a-z]*)$/,
+ F=function(a){return E(a)?a.toLowerCase():a},qa=Object.prototype.hasOwnProperty,sb=function(a){return E(a)?a.toUpperCase():a},Ha,B,oa,ra=[].slice,Pf=[].splice,mg=[].push,sa=Object.prototype.toString,rc=Object.getPrototypeOf,Aa=G("ng"),fa=S.angular||(S.angular={}),Sb,nb=0;Ha=X.documentMode;x.$inject=[];Ya.$inject=[];var I=Array.isArray,Vd=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,U=function(a){return E(a)?a.trim():a},ud=function(a){return a.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,
+ "\\$1").replace(/\x08/g,"\\x08")},Ba=function(){if(!y(Ba.rules)){var a=X.querySelector("[ng-csp]")||X.querySelector("[data-ng-csp]");if(a){var b=a.getAttribute("ng-csp")||a.getAttribute("data-ng-csp");Ba.rules={noUnsafeEval:!b||-1!==b.indexOf("no-unsafe-eval"),noInlineStyle:!b||-1!==b.indexOf("no-inline-style")}}else{a=Ba;try{new Function(""),b=!1}catch(d){b=!0}a.rules={noUnsafeEval:b,noInlineStyle:!1}}}return Ba.rules},pb=function(){if(y(pb.name_))return pb.name_;var a,b,d=Oa.length,c,e;for(b=0;b<
+ d;++b)if(c=Oa[b],a=X.querySelector("["+c.replace(":","\\:")+"jq]")){e=a.getAttribute(c+"jq");break}return pb.name_=e},Oa=["ng-","data-ng-","ng:","x-ng-"],be=/[A-Z]/g,Ac=!1,Rb,Na=3,fe={full:"1.4.8",major:1,minor:4,dot:8,codeName:"ice-manipulation"};N.expando="ng339";var gb=N.cache={},Ff=1;N._data=function(a){return this.cache[a[this.expando]]||{}};var Af=/([\:\-\_]+(.))/g,Bf=/^moz([A-Z])/,xb={mouseleave:"mouseout",mouseenter:"mouseover"},Ub=G("jqLite"),Ef=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Tb=/<|&#?\w+;/,
+ Cf=/<([\w:-]+)/,Df=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ka={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ka.optgroup=ka.option;ka.tbody=ka.tfoot=ka.colgroup=ka.caption=ka.thead;ka.th=ka.td;var Kf=Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&
+ 16)},Pa=N.prototype={ready:function(a){function b(){d||(d=!0,a())}var d=!1;"complete"===X.readyState?setTimeout(b):(this.on("DOMContentLoaded",b),N(S).on("load",b))},toString:function(){var a=[];n(this,function(b){a.push(""+b)});return"["+a.join(", ")+"]"},eq:function(a){return 0<=a?B(this[a]):B(this[this.length+a])},length:0,push:mg,sort:[].sort,splice:[].splice},Cb={};n("multiple selected checked disabled readOnly required open".split(" "),function(a){Cb[F(a)]=a});var Rc={};n("input select option textarea button form details".split(" "),
+ function(a){Rc[a]=!0});var Zc={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};n({data:Wb,removeData:vb,hasData:function(a){for(var b in gb[a.ng339])return!0;return!1}},function(a,b){N[b]=a});n({data:Wb,inheritedData:Bb,scope:function(a){return B.data(a,"$scope")||Bb(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return B.data(a,"$isolateScope")||B.data(a,"$isolateScopeNoTemplate")},controller:Oc,injector:function(a){return Bb(a,
+ "$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:yb,css:function(a,b,d){b=fb(b);if(y(d))a.style[b]=d;else return a.style[b]},attr:function(a,b,d){var c=a.nodeType;if(c!==Na&&2!==c&&8!==c)if(c=F(b),Cb[c])if(y(d))d?(a[b]=!0,a.setAttribute(b,c)):(a[b]=!1,a.removeAttribute(c));else return a[b]||(a.attributes.getNamedItem(b)||x).specified?c:u;else if(y(d))a.setAttribute(b,d);else if(a.getAttribute)return a=a.getAttribute(b,2),null===a?u:a},prop:function(a,b,d){if(y(d))a[b]=d;else return a[b]},
+ text:function(){function a(a,d){if(q(d)){var c=a.nodeType;return 1===c||c===Na?a.textContent:""}a.textContent=d}a.$dv="";return a}(),val:function(a,b){if(q(b)){if(a.multiple&&"select"===ta(a)){var d=[];n(a.options,function(a){a.selected&&d.push(a.value||a.text)});return 0===d.length?null:d}return a.value}a.value=b},html:function(a,b){if(q(b))return a.innerHTML;ub(a,!0);a.innerHTML=b},empty:Pc},function(a,b){N.prototype[b]=function(b,c){var e,f,g=this.length;if(a!==Pc&&q(2==a.length&&a!==yb&&a!==Oc?
+ b:c)){if(H(b)){for(e=0;e<g;e++)if(a===Wb)a(this[e],b);else for(f in b)a(this[e],f,b[f]);return this}e=a.$dv;g=q(e)?Math.min(g,1):g;for(f=0;f<g;f++){var h=a(this[f],b,c);e=e?e+h:h}return e}for(e=0;e<g;e++)a(this[e],b,c);return this}});n({removeData:vb,on:function(a,b,d,c){if(y(c))throw Ub("onargs");if(Kc(a)){c=wb(a,!0);var e=c.events,f=c.handle;f||(f=c.handle=Hf(a,e));c=0<=b.indexOf(" ")?b.split(" "):[b];for(var g=c.length,h=function(b,c,g){var h=e[b];h||(h=e[b]=[],h.specialHandlerWrapper=c,"$destroy"===
+ b||g||a.addEventListener(b,f,!1));h.push(d)};g--;)b=c[g],xb[b]?(h(xb[b],Jf),h(b,u,!0)):h(b)}},off:Nc,one:function(a,b,d){a=B(a);a.on(b,function e(){a.off(b,d);a.off(b,e)});a.on(b,d)},replaceWith:function(a,b){var d,c=a.parentNode;ub(a);n(new N(b),function(b){d?c.insertBefore(b,d.nextSibling):c.replaceChild(b,a);d=b})},children:function(a){var b=[];n(a.childNodes,function(a){1===a.nodeType&&b.push(a)});return b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var d=
+ a.nodeType;if(1===d||11===d){b=new N(b);for(var d=0,c=b.length;d<c;d++)a.appendChild(b[d])}},prepend:function(a,b){if(1===a.nodeType){var d=a.firstChild;n(new N(b),function(b){a.insertBefore(b,d)})}},wrap:function(a,b){b=B(b).eq(0).clone()[0];var d=a.parentNode;d&&d.replaceChild(b,a);b.appendChild(a)},remove:Xb,detach:function(a){Xb(a,!0)},after:function(a,b){var d=a,c=a.parentNode;b=new N(b);for(var e=0,f=b.length;e<f;e++){var g=b[e];c.insertBefore(g,d.nextSibling);d=g}},addClass:Ab,removeClass:zb,
+ toggleClass:function(a,b,d){b&&n(b.split(" "),function(b){var e=d;q(e)&&(e=!yb(a,b));(e?Ab:zb)(a,b)})},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){return a.nextElementSibling},find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:Vb,triggerHandler:function(a,b,d){var c,e,f=b.type||b,g=wb(a);if(g=(g=g&&g.events)&&g[f])c={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},
+ stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:x,type:f,target:a},b.type&&(c=M(c,b)),b=ia(g),e=d?[c].concat(d):[c],n(b,function(b){c.isImmediatePropagationStopped()||b.apply(a,e)})}},function(a,b){N.prototype[b]=function(b,c,e){for(var f,g=0,h=this.length;g<h;g++)q(f)?(f=a(this[g],b,c,e),y(f)&&(f=B(f))):Mc(f,a(this[g],b,c,e));return y(f)?f:this};N.prototype.bind=N.prototype.on;
+ N.prototype.unbind=N.prototype.off});Sa.prototype={put:function(a,b){this[Ca(a,this.nextUid)]=b},get:function(a){return this[Ca(a,this.nextUid)]},remove:function(a){var b=this[a=Ca(a,this.nextUid)];delete this[a];return b}};var yf=[function(){this.$get=[function(){return Sa}]}],Tc=/^[^\(]*\(\s*([^\)]*)\)/m,ng=/,/,og=/^\s*(_?)(\S+?)\1\s*$/,Sc=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Da=G("$injector");eb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw E(d)&&
+ d||(d=a.name||Lf(a)),Da("strictdi",d);b=a.toString().replace(Sc,"");b=b.match(Tc);n(b[1].split(ng),function(a){a.replace(og,function(a,b,d){c.push(d)})})}a.$inject=c}}else I(a)?(b=a.length-1,Qa(a[b],"fn"),c=a.slice(0,b)):Qa(a,"fn",!0);return c};var Md=G("$animate"),Ue=function(){this.$get=["$q","$$rAF",function(a,b){function d(){}d.all=x;d.chain=x;d.prototype={end:x,cancel:x,resume:x,pause:x,complete:x,then:function(c,d){return a(function(a){b(function(){a()})}).then(c,d)}};return d}]},Te=function(){var a=
+ new Sa,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;b&&(b=E(b)?b.split(" "):I(b)?b:[],n(b,function(b){b&&(d=!0,a[b]=c)}));return d}function f(){n(b,function(b){var c=a.get(b);if(c){var d=Mf(b.attr("class")),e="",f="";n(c,function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)});n(b,function(a){e&&Ab(a,e);f&&zb(a,f)});a.remove(b)}});b.length=0}return{enabled:x,on:x,off:x,pin:x,push:function(g,h,k,l){l&&l();k=k||{};k.from&&g.css(k.from);
+ k.to&&g.css(k.to);if(k.addClass||k.removeClass)if(h=k.addClass,l=k.removeClass,k=a.get(g)||{},h=e(k,h,!0),l=e(k,l,!1),h||l)a.put(g,k),b.push(g),1===b.length&&c.$$postDigest(f);return new d}}}]},Re=["$provide",function(a){var b=this;this.$$registeredAnimations=Object.create(null);this.register=function(d,c){if(d&&"."!==d.charAt(0))throw Md("notcsel",d);var e=d+"-animation";b.$$registeredAnimations[d.substr(1)]=e;a.factory(e,c)};this.classNameFilter=function(a){if(1===arguments.length&&(this.$$classNameFilter=
+ a instanceof RegExp?a:null)&&/(\s+|\/)ng-animate(\s+|\/)/.test(this.$$classNameFilter.toString()))throw Md("nongcls","ng-animate");return this.$$classNameFilter};this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var h;a:{for(h=0;h<d.length;h++){var k=d[h];if(1===k.nodeType){h=k;break a}}h=void 0}!h||h.parentNode||h.previousElementSibling||(d=null)}d?d.after(a):c.prepend(a)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.end&&a.end()},enter:function(e,f,g,h){f=
+ f&&B(f);g=g&&B(g);f=f||g.parent();b(e,f,g);return a.push(e,"enter",Ea(h))},move:function(e,f,g,h){f=f&&B(f);g=g&&B(g);f=f||g.parent();b(e,f,g);return a.push(e,"move",Ea(h))},leave:function(b,c){return a.push(b,"leave",Ea(c),function(){b.remove()})},addClass:function(b,c,g){g=Ea(g);g.addClass=hb(g.addclass,c);return a.push(b,"addClass",g)},removeClass:function(b,c,g){g=Ea(g);g.removeClass=hb(g.removeClass,c);return a.push(b,"removeClass",g)},setClass:function(b,c,g,h){h=Ea(h);h.addClass=hb(h.addClass,
+ c);h.removeClass=hb(h.removeClass,g);return a.push(b,"setClass",h)},animate:function(b,c,g,h,k){k=Ea(k);k.from=k.from?M(k.from,c):c;k.to=k.to?M(k.to,g):g;k.tempClasses=hb(k.tempClasses,h||"ng-inline-animate");return a.push(b,"animate",k)}}}]}],Se=function(){this.$get=["$$rAF","$q",function(a,b){var d=function(){};d.prototype={done:function(a){this.defer&&this.defer[!0===a?"reject":"resolve"]()},end:function(){this.done()},cancel:function(){this.done(!0)},getPromise:function(){this.defer||(this.defer=
+ b.defer());return this.defer.promise},then:function(a,b){return this.getPromise().then(a,b)},"catch":function(a){return this.getPromise()["catch"](a)},"finally":function(a){return this.getPromise()["finally"](a)}};return function(b,e){function f(){a(function(){e.addClass&&(b.addClass(e.addClass),e.addClass=null);e.removeClass&&(b.removeClass(e.removeClass),e.removeClass=null);e.to&&(b.css(e.to),e.to=null);g||h.done();g=!0});return h}e.cleanupStyles&&(e.from=e.to=null);e.from&&(b.css(e.from),e.from=
+ null);var g,h=new d;return{start:f,end:f}}}]},ha=G("$compile");Cc.$inject=["$provide","$$sanitizeUriProvider"];var Vc=/^((?:x|data)[\:\-_])/i,Qf=G("$controller"),Uc=/^(\S+)(\s+as\s+(\w+))?$/,$e=function(){this.$get=["$document",function(a){return function(b){b?!b.nodeType&&b instanceof B&&(b=b[0]):b=a[0].body;return b.offsetWidth+1}}]},$c="application/json",ac={"Content-Type":$c+";charset=utf-8"},Sf=/^\[|^\{(?!\{)/,Tf={"[":/]$/,"{":/}$/},Rf=/^\)\]\}',?\n/,pg=G("$http"),dd=function(a){return function(){throw pg("legacy",
+ a);}},Ja=fa.$interpolateMinErr=G("$interpolate");Ja.throwNoconcat=function(a){throw Ja("noconcat",a);};Ja.interr=function(a,b){return Ja("interr",a,b.toString())};var qg=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,Vf={http:80,https:443,ftp:21},Db=G("$location"),rg={$$html5:!1,$$replace:!1,absUrl:Eb("$$absUrl"),url:function(a){if(q(a))return this.$$url;var b=qg.exec(a);(b[1]||""===a)&&this.path(decodeURIComponent(b[1]));(b[2]||b[1]||""===a)&&this.search(b[3]||"");this.hash(b[5]||"");return this},protocol:Eb("$$protocol"),
+ host:Eb("$$host"),port:Eb("$$port"),path:id("$$path",function(a){a=null!==a?a.toString():"";return"/"==a.charAt(0)?a:"/"+a}),search:function(a,b){switch(arguments.length){case 0:return this.$$search;case 1:if(E(a)||Q(a))a=a.toString(),this.$$search=xc(a);else if(H(a))a=bb(a,{}),n(a,function(b,c){null==b&&delete a[c]}),this.$$search=a;else throw Db("isrcharg");break;default:q(b)||null===b?delete this.$$search[a]:this.$$search[a]=b}this.$$compose();return this},hash:id("$$hash",function(a){return null!==
+ a?a.toString():""}),replace:function(){this.$$replace=!0;return this}};n([hd,dc,cc],function(a){a.prototype=Object.create(rg);a.prototype.state=function(b){if(!arguments.length)return this.$$state;if(a!==cc||!this.$$html5)throw Db("nostate");this.$$state=q(b)?null:b;return this}});var ba=G("$parse"),Wf=Function.prototype.call,Xf=Function.prototype.apply,Yf=Function.prototype.bind,Lb=$();n("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(a){Lb[a]=!0});var sg={n:"\n",f:"\f",r:"\r",
+ t:"\t",v:"\v","'":"'",'"':'"'},fc=function(a){this.options=a};fc.prototype={constructor:fc,lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index<this.text.length;)if(a=this.text.charAt(this.index),'"'===a||"'"===a)this.readString(a);else if(this.isNumber(a)||"."===a&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(a))this.readIdent();else if(this.is(a,"(){}[].,;:?"))this.tokens.push({index:this.index,text:a}),this.index++;else if(this.isWhitespace(a))this.index++;
+ else{var b=a+this.peek(),d=b+this.peek(2),c=Lb[b],e=Lb[d];Lb[a]||c||e?(a=e?d:c?b:a,this.tokens.push({index:this.index,text:a,operator:!0}),this.index+=a.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(a,b){return-1!==b.indexOf(a)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=a&&"string"===typeof a},isWhitespace:function(a){return" "===a||"\r"===a||
+ "\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdent:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b=y(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw ba("lexerr",a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index<this.text.length;){var d=F(this.text.charAt(this.index));if("."==d||this.isNumber(d))a+=d;else{var c=this.peek();
+ if("e"==d&&this.isExpOperator(c))a+=d;else if(this.isExpOperator(d)&&c&&this.isNumber(c)&&"e"==a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||c&&this.isNumber(c)||"e"!=a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}this.tokens.push({index:b,text:a,constant:!0,value:Number(a)})},readIdent:function(){for(var a=this.index;this.index<this.text.length;){var b=this.text.charAt(this.index);if(!this.isIdent(b)&&!this.isNumber(b))break;this.index++}this.tokens.push({index:a,
+ text:this.text.slice(a,this.index),identifier:!0})},readString:function(a){var b=this.index;this.index++;for(var d="",c=a,e=!1;this.index<this.text.length;){var f=this.text.charAt(this.index),c=c+f;if(e)"u"===f?(e=this.text.substring(this.index+1,this.index+5),e.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+e+"]"),this.index+=4,d+=String.fromCharCode(parseInt(e,16))):d+=sg[f]||f,e=!1;else if("\\"===f)e=!0;else{if(f===a){this.index++;this.tokens.push({index:b,text:c,constant:!0,
+ value:d});return}d+=f}this.index++}this.throwError("Unterminated quote",b)}};var s=function(a,b){this.lexer=a;this.options=b};s.Program="Program";s.ExpressionStatement="ExpressionStatement";s.AssignmentExpression="AssignmentExpression";s.ConditionalExpression="ConditionalExpression";s.LogicalExpression="LogicalExpression";s.BinaryExpression="BinaryExpression";s.UnaryExpression="UnaryExpression";s.CallExpression="CallExpression";s.MemberExpression="MemberExpression";s.Identifier="Identifier";s.Literal=
+ "Literal";s.ArrayExpression="ArrayExpression";s.Property="Property";s.ObjectExpression="ObjectExpression";s.ThisExpression="ThisExpression";s.NGValueParameter="NGValueParameter";s.prototype={ast:function(a){this.text=a;this.tokens=this.lexer.lex(a);a=this.program();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);return a},program:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:s.Program,
+ body:a}},expressionStatement:function(){return{type:s.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a=this.expression();this.expect("|");)a=this.filter(a);return a},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();this.expect("=")&&(a={type:s.AssignmentExpression,left:a,right:this.assignment(),operator:"="});return a},ternary:function(){var a=this.logicalOR(),b,d;return this.expect("?")&&(b=this.expression(),this.consume(":"))?
+ (d=this.expression(),{type:s.ConditionalExpression,test:a,alternate:b,consequent:d}):a},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:s.LogicalExpression,operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a={type:s.LogicalExpression,operator:"&&",left:a,right:this.equality()};return a},equality:function(){for(var a=this.relational(),b;b=this.expect("==","!=","===","!==");)a={type:s.BinaryExpression,
+ operator:b.text,left:a,right:this.relational()};return a},relational:function(){for(var a=this.additive(),b;b=this.expect("<",">","<=",">=");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),b;b=this.expect("+","-");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:s.BinaryExpression,operator:b.text,
+ left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:s.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.constants.hasOwnProperty(this.peek().text)?a=bb(this.constants[this.consume().text]):this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():
+ this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:s.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:s.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:s.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:s.CallExpression,callee:this.identifier(),
+ arguments:a,filter:!0};this.expect(":");)a.push(this.expression());return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.expression());while(this.expect(","))}return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:s.Identifier,name:a.text}},constant:function(){return{type:s.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;
+ a.push(this.expression())}while(this.expect(","))}this.consume("]");return{type:s.ArrayExpression,elements:a}},object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;b={type:s.Property,kind:"init"};this.peek().constant?b.key=this.constant():this.peek().identifier?b.key=this.identifier():this.throwError("invalid key",this.peek());this.consume(":");b.value=this.expression();a.push(b)}while(this.expect(","))}this.consume("}");return{type:s.ObjectExpression,properties:a}},
+ throwError:function(a,b){throw ba("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0===this.tokens.length)throw ba("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw ba("ueoe",this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,e){if(this.tokens.length>a){a=this.tokens[a];
+ var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))?(this.tokens.shift(),a):!1},constants:{"true":{type:s.Literal,value:!0},"false":{type:s.Literal,value:!1},"null":{type:s.Literal,value:null},undefined:{type:s.Literal,value:u},"this":{type:s.ThisExpression}}};rd.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.state={nextId:0,filters:{},expensiveChecks:b,fn:{vars:[],body:[],own:{}},assign:{vars:[],
+ body:[],own:{}},inputs:[]};W(c,d.$filter);var e="",f;this.stage="assign";if(f=pd(c))this.state.computing="assign",e=this.nextId(),this.recurse(f,e),this.return_(e),e="fn.assign="+this.generateFunction("assign","s,v,l");f=nd(c.body);d.stage="inputs";n(f,function(a,b){var c="fn"+b;d.state[c]={vars:[],body:[],own:{}};d.state.computing=c;var e=d.nextId();d.recurse(a,e);d.return_(e);d.state.inputs.push(c);a.watchId=b});this.state.computing="fn";this.stage="main";this.recurse(c);e='"'+this.USE+" "+this.STRICT+
+ '";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+e+this.watchFns()+"return fn;";e=(new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",e))(this.$filter,Va,xa,kd,jd,ld,Zf,md,a);this.state=this.stage=u;e.literal=qd(c);e.constant=c.constant;return e},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;n(b,function(b){a.push("var "+b+"="+d.generateFunction(b,
+ "s"))});b.length&&a.push("fn.inputs=["+b.join(",")+"];");return a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;n(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,
+ d,c,e,f){var g,h,k=this,l,m;c=c||x;if(!f&&y(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case s.Program:n(a.body,function(b,c){k.recurse(b.expression,u,u,function(a){h=a});c!==a.body.length-1?k.current().body.push(h,";"):k.return_(h)});break;case s.Literal:m=this.escape(a.value);this.assign(b,m);c(m);break;case s.UnaryExpression:this.recurse(a.argument,u,u,function(a){h=a});m=a.operator+"("+this.ifDefined(h,
+ 0)+")";this.assign(b,m);c(m);break;case s.BinaryExpression:this.recurse(a.left,u,u,function(a){g=a});this.recurse(a.right,u,u,function(a){h=a});m="+"===a.operator?this.plus(g,h):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(h,0):"("+g+")"+a.operator+"("+h+")";this.assign(b,m);c(m);break;case s.LogicalExpression:b=b||this.nextId();k.recurse(a.left,b);k.if_("&&"===a.operator?b:k.not(b),k.lazyRecurse(a.right,b));c(b);break;case s.ConditionalExpression:b=b||this.nextId();k.recurse(a.test,
+ b);k.if_(b,k.lazyRecurse(a.alternate,b),k.lazyRecurse(a.consequent,b));c(b);break;case s.Identifier:b=b||this.nextId();d&&(d.context="inputs"===k.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name);Va(a.name);k.if_("inputs"===k.stage||k.not(k.getHasOwnProperty("l",a.name)),function(){k.if_("inputs"===k.stage||"s",function(){e&&1!==e&&k.if_(k.not(k.nonComputedMember("s",a.name)),k.lazyAssign(k.nonComputedMember("s",a.name),"{}"));k.assign(b,k.nonComputedMember("s",
+ a.name))})},b&&k.lazyAssign(b,k.nonComputedMember("l",a.name)));(k.state.expensiveChecks||Fb(a.name))&&k.addEnsureSafeObject(b);c(b);break;case s.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId();b=b||this.nextId();k.recurse(a.object,g,u,function(){k.if_(k.notNull(g),function(){if(a.computed)h=k.nextId(),k.recurse(a.property,h),k.getStringValue(h),k.addEnsureSafeMemberName(h),e&&1!==e&&k.if_(k.not(k.computedMember(g,h)),k.lazyAssign(k.computedMember(g,h),"{}")),m=k.ensureSafeObject(k.computedMember(g,
+ h)),k.assign(b,m),d&&(d.computed=!0,d.name=h);else{Va(a.property.name);e&&1!==e&&k.if_(k.not(k.nonComputedMember(g,a.property.name)),k.lazyAssign(k.nonComputedMember(g,a.property.name),"{}"));m=k.nonComputedMember(g,a.property.name);if(k.state.expensiveChecks||Fb(a.property.name))m=k.ensureSafeObject(m);k.assign(b,m);d&&(d.computed=!1,d.name=a.property.name)}},function(){k.assign(b,"undefined")});c(b)},!!e);break;case s.CallExpression:b=b||this.nextId();a.filter?(h=k.filter(a.callee.name),l=[],n(a.arguments,
+ function(a){var b=k.nextId();k.recurse(a,b);l.push(b)}),m=h+"("+l.join(",")+")",k.assign(b,m),c(b)):(h=k.nextId(),g={},l=[],k.recurse(a.callee,h,g,function(){k.if_(k.notNull(h),function(){k.addEnsureSafeFunction(h);n(a.arguments,function(a){k.recurse(a,k.nextId(),u,function(a){l.push(k.ensureSafeObject(a))})});g.name?(k.state.expensiveChecks||k.addEnsureSafeObject(g.context),m=k.member(g.context,g.name,g.computed)+"("+l.join(",")+")"):m=h+"("+l.join(",")+")";m=k.ensureSafeObject(m);k.assign(b,m)},
+ function(){k.assign(b,"undefined")});c(b)}));break;case s.AssignmentExpression:h=this.nextId();g={};if(!od(a.left))throw ba("lval");this.recurse(a.left,u,g,function(){k.if_(k.notNull(g.context),function(){k.recurse(a.right,h);k.addEnsureSafeObject(k.member(g.context,g.name,g.computed));k.addEnsureSafeAssignContext(g.context);m=k.member(g.context,g.name,g.computed)+a.operator+h;k.assign(b,m);c(b||m)})},1);break;case s.ArrayExpression:l=[];n(a.elements,function(a){k.recurse(a,k.nextId(),u,function(a){l.push(a)})});
+ m="["+l.join(",")+"]";this.assign(b,m);c(m);break;case s.ObjectExpression:l=[];n(a.properties,function(a){k.recurse(a.value,k.nextId(),u,function(b){l.push(k.escape(a.key.type===s.Identifier?a.key.name:""+a.key.value)+":"+b)})});m="{"+l.join(",")+"}";this.assign(b,m);c(m);break;case s.ThisExpression:this.assign(b,"s");c("s");break;case s.NGValueParameter:this.assign(b,"v"),c("v")}},getHasOwnProperty:function(a,b){var d=a+"."+b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+
+ this.escape(b)+" in "+a+")"));return c[d]},assign:function(a,b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,
+ "){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){return a+"."+b},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a,b)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),";")},
+ addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a),";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},getStringValue:function(a){this.assign(a,"getStringValue("+a+",text)")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+
+ a+",text)"},lazyRecurse:function(a,b,d,c,e,f){var g=this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(E(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(Q(a))return a.toString();if(!0===a)return"true";if(!1===a)return"false";if(null===a)return"null";if("undefined"===
+ typeof a)return"undefined";throw ba("esc");},nextId:function(a,b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};sd.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.expression=a;this.expensiveChecks=b;W(c,d.$filter);var e,f;if(e=pd(c))f=this.recurse(e);e=nd(c.body);var g;e&&(g=[],n(e,function(a,b){var c=d.recurse(a);a.input=c;g.push(c);a.watchId=b}));var h=[];n(c.body,function(a){h.push(d.recurse(a.expression))});
+ e=0===c.body.length?function(){}:1===c.body.length?h[0]:function(a,b){var c;n(h,function(d){c=d(a,b)});return c};f&&(e.assign=function(a,b,c){return f(a,c,b)});g&&(e.inputs=g);e.literal=qd(c);e.constant=c.constant;return e},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case s.Literal:return this.value(a.value,b);case s.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case s.BinaryExpression:return c=this.recurse(a.left),
+ e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case s.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case s.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case s.Identifier:return Va(a.name,f.expression),f.identifier(a.name,f.expensiveChecks||Fb(a.name),b,d,f.expression);case s.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(Va(a.property.name,
+ f.expression),e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c,e,b,d,f.expression):this.nonComputedMember(c,e,f.expensiveChecks,b,d,f.expression);case s.CallExpression:return g=[],n(a.arguments,function(a){g.push(f.recurse(a))}),a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var r=[],n=0;n<g.length;++n)r.push(g[n](a,c,d,f));a=e.apply(u,r,f);return b?{context:u,name:u,value:a}:a}:function(a,
+ c,d,m){var r=e(a,c,d,m),n;if(null!=r.value){xa(r.context,f.expression);kd(r.value,f.expression);n=[];for(var q=0;q<g.length;++q)n.push(xa(g[q](a,c,d,m),f.expression));n=xa(r.value.apply(r.context,n),f.expression)}return b?{value:n}:n};case s.AssignmentExpression:return c=this.recurse(a.left,!0,1),e=this.recurse(a.right),function(a,d,g,m){var n=c(a,d,g,m);a=e(a,d,g,m);xa(n.value,f.expression);ld(n.context);n.context[n.name]=a;return b?{value:a}:a};case s.ArrayExpression:return g=[],n(a.elements,function(a){g.push(f.recurse(a))}),
+ function(a,c,d,e){for(var f=[],n=0;n<g.length;++n)f.push(g[n](a,c,d,e));return b?{value:f}:f};case s.ObjectExpression:return g=[],n(a.properties,function(a){g.push({key:a.key.type===s.Identifier?a.key.name:""+a.key.value,value:f.recurse(a.value)})}),function(a,c,d,e){for(var f={},n=0;n<g.length;++n)f[g[n].key]=g[n].value(a,c,d,e);return b?{value:f}:f};case s.ThisExpression:return function(a){return b?{value:a}:a};case s.NGValueParameter:return function(a,c,d,e){return b?{value:d}:d}}},"unary+":function(a,
+ b){return function(d,c,e,f){d=a(d,c,e,f);d=y(d)?+d:0;return b?{value:d}:d}},"unary-":function(a,b){return function(d,c,e,f){d=a(d,c,e,f);d=y(d)?-d:0;return b?{value:d}:d}},"unary!":function(a,b){return function(d,c,e,f){d=!a(d,c,e,f);return b?{value:d}:d}},"binary+":function(a,b,d){return function(c,e,f,g){var h=a(c,e,f,g);c=b(c,e,f,g);h=md(h,c);return d?{value:h}:h}},"binary-":function(a,b,d){return function(c,e,f,g){var h=a(c,e,f,g);c=b(c,e,f,g);h=(y(h)?h:0)-(y(c)?c:0);return d?{value:h}:h}},"binary*":function(a,
+ b,d){return function(c,e,f,g){c=a(c,e,f,g)*b(c,e,f,g);return d?{value:c}:c}},"binary/":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)/b(c,e,f,g);return d?{value:c}:c}},"binary%":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)%b(c,e,f,g);return d?{value:c}:c}},"binary===":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)===b(c,e,f,g);return d?{value:c}:c}},"binary!==":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!==b(c,e,f,g);return d?{value:c}:c}},"binary==":function(a,b,
+ d){return function(c,e,f,g){c=a(c,e,f,g)==b(c,e,f,g);return d?{value:c}:c}},"binary!=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!=b(c,e,f,g);return d?{value:c}:c}},"binary<":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<b(c,e,f,g);return d?{value:c}:c}},"binary>":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,
+ e,f,g){c=a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,h){e=a(e,f,g,h)?b(e,f,g,h):d(e,f,g,h);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:u,name:u,value:a}:a}},identifier:function(a,b,d,c,e){return function(f,g,h,k){f=
+ g&&a in g?g:f;c&&1!==c&&f&&!f[a]&&(f[a]={});g=f?f[a]:u;b&&xa(g,e);return d?{context:f,name:a,value:g}:g}},computedMember:function(a,b,d,c,e){return function(f,g,h,k){var l=a(f,g,h,k),m,n;null!=l&&(m=b(f,g,h,k),m=jd(m),Va(m,e),c&&1!==c&&l&&!l[m]&&(l[m]={}),n=l[m],xa(n,e));return d?{context:l,name:m,value:n}:n}},nonComputedMember:function(a,b,d,c,e,f){return function(g,h,k,l){g=a(g,h,k,l);e&&1!==e&&g&&!g[b]&&(g[b]={});h=null!=g?g[b]:u;(d||Fb(b))&&xa(h,f);return c?{context:g,name:b,value:h}:h}},inputs:function(a,
+ b){return function(d,c,e,f){return f?f[b]:a(d,c,e)}}};var gc=function(a,b,d){this.lexer=a;this.$filter=b;this.options=d;this.ast=new s(this.lexer);this.astCompiler=d.csp?new sd(this.ast,b):new rd(this.ast,b)};gc.prototype={constructor:gc,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};$();$();var $f=Object.prototype.valueOf,ya=G("$sce"),la={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},ha=G("$compile"),Y=X.createElement("a"),wd=wa(S.location.href);
+ xd.$inject=["$document"];Jc.$inject=["$provide"];yd.$inject=["$locale"];Ad.$inject=["$locale"];var ic=".",jg={yyyy:ca("FullYear",4),yy:ca("FullYear",2,0,!0),y:ca("FullYear",1),MMMM:Hb("Month"),MMM:Hb("Month",!0),MM:ca("Month",2,1),M:ca("Month",1,1),dd:ca("Date",2),d:ca("Date",1),HH:ca("Hours",2),H:ca("Hours",1),hh:ca("Hours",2,-12),h:ca("Hours",1,-12),mm:ca("Minutes",2),m:ca("Minutes",1),ss:ca("Seconds",2),s:ca("Seconds",1),sss:ca("Milliseconds",3),EEEE:Hb("Day"),EEE:Hb("Day",!0),a:function(a,b){return 12>
+ a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Gb(Math[0<a?"floor":"ceil"](a/60),2)+Gb(Math.abs(a%60),2))},ww:Ed(2),w:Ed(1),G:jc,GG:jc,GGG:jc,GGGG:function(a,b){return 0>=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},ig=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,hg=/^\-?\d+$/;zd.$inject=["$locale"];var eg=na(F),fg=na(sb);Bd.$inject=["$parse"];var he=na({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,
+ b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===sa.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),tb={};n(Cb,function(a,b){function d(a,d,e){a.$watch(e[c],function(a){e.$set(b,!!a)})}if("multiple"!=a){var c=va("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)});tb[c]=function(){return{restrict:"A",priority:100,link:e}}}});n(Zc,function(a,b){tb[b]=function(){return{priority:100,link:function(a,
+ c,e){if("ngPattern"===b&&"/"==e.ngPattern.charAt(0)&&(c=e.ngPattern.match(lg))){e.$set("ngPattern",new RegExp(c[1],c[2]));return}a.$watch(e[b],function(a){e.$set(b,a)})}}}});n(["src","srcset","href"],function(a){var b=va("ng-"+a);tb[b]=function(){return{priority:99,link:function(d,c,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"===sa.call(c.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null);e.$observe(b,function(b){b?(e.$set(g,b),Ha&&f&&c.prop(f,e[g])):"href"===a&&e.$set(g,null)})}}}});
+ var Ib={$addControl:x,$$renameControl:function(a,b){a.$name=b},$removeControl:x,$setValidity:x,$setDirty:x,$setPristine:x,$setSubmitted:x};Fd.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Nd=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||x}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Fd,compile:function(d,f){d.addClass(Wa).addClass(mb);var g=f.name?"name":a&&f.ngForm?"ngForm":
+ !1;return{pre:function(a,d,e,f){var n=f[0];if(!("action"in e)){var q=function(b){a.$apply(function(){n.$commitViewValue();n.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",q,!1);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",q,!1)},0,!1)})}(f[1]||n.$$parentForm).$addControl(n);var s=g?c(n.$name):x;g&&(s(a,n),e.$observe(g,function(b){n.$name!==b&&(s(a,u),n.$$parentForm.$$renameControl(n,b),s=c(n.$name),s(a,n))}));d.on("$destroy",function(){n.$$parentForm.$removeControl(n);
+ s(a,u);M(n,Ib)})}}}}}]},ie=Nd(),ve=Nd(!0),kg=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,tg=/^[A-Za-z][A-Za-z\d.+-]*:\/*(?:\w+(?::\w+)?@)?[^\s/]+(?::\d+)?(?:\/[\w#!:.?+=&%@\-/]*)?$/,ug=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,vg=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Od=/^(\d{4})-(\d{2})-(\d{2})$/,Pd=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,mc=/^(\d{4})-W(\d\d)$/,Qd=/^(\d{4})-(\d\d)$/,
+ Rd=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Sd={text:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);kc(c)},date:kb("date",Od,Kb(Od,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":kb("datetimelocal",Pd,Kb(Pd,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:kb("time",Rd,Kb(Rd,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:kb("week",mc,function(a,b){if(da(a))return a;if(E(a)){mc.lastIndex=0;var d=mc.exec(a);if(d){var c=+d[1],e=+d[2],f=d=0,g=0,h=0,k=Dd(c),e=7*(e-1);b&&(d=b.getHours(),f=
+ b.getMinutes(),g=b.getSeconds(),h=b.getMilliseconds());return new Date(c,0,k.getDate()+e,d,f,g,h)}}return NaN},"yyyy-Www"),month:kb("month",Qd,Kb(Qd,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f){Hd(a,b,d,c);jb(a,b,d,c,e,f);c.$$parserName="number";c.$parsers.push(function(a){return c.$isEmpty(a)?null:vg.test(a)?parseFloat(a):u});c.$formatters.push(function(a){if(!c.$isEmpty(a)){if(!Q(a))throw lb("numfmt",a);a=a.toString()}return a});if(y(d.min)||d.ngMin){var g;c.$validators.min=function(a){return c.$isEmpty(a)||
+ q(g)||a>=g};d.$observe("min",function(a){y(a)&&!Q(a)&&(a=parseFloat(a,10));g=Q(a)&&!isNaN(a)?a:u;c.$validate()})}if(y(d.max)||d.ngMax){var h;c.$validators.max=function(a){return c.$isEmpty(a)||q(h)||a<=h};d.$observe("max",function(a){y(a)&&!Q(a)&&(a=parseFloat(a,10));h=Q(a)&&!isNaN(a)?a:u;c.$validate()})}},url:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);kc(c);c.$$parserName="url";c.$validators.url=function(a,b){var d=a||b;return c.$isEmpty(d)||tg.test(d)}},email:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);kc(c);
+ c.$$parserName="email";c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||ug.test(d)}},radio:function(a,b,d,c){q(d.name)&&b.attr("name",++nb);b.on("click",function(a){b[0].checked&&c.$setViewValue(d.value,a&&a.type)});c.$render=function(){b[0].checked=d.value==c.$viewValue};d.$observe("value",c.$render)},checkbox:function(a,b,d,c,e,f,g,h){var k=Id(h,a,"ngTrueValue",d.ngTrueValue,!0),l=Id(h,a,"ngFalseValue",d.ngFalseValue,!1);b.on("click",function(a){c.$setViewValue(b[0].checked,a&&
+ a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty=function(a){return!1===a};c.$formatters.push(function(a){return ma(a,k)});c.$parsers.push(function(a){return a?k:l})},hidden:x,button:x,submit:x,reset:x,file:x},Dc=["$browser","$sniffer","$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,h){h[0]&&(Sd[F(g.type)]||Sd.text)(e,f,g,h[0],b,a,d,c)}}}}],wg=/^(true|false|\d+)$/,Ne=function(){return{restrict:"A",priority:100,compile:function(a,
+ b){return wg.test(b.ngValue)?function(a,b,e){e.$set("value",a.$eval(e.ngValue))}:function(a,b,e){a.$watch(e.ngValue,function(a){e.$set("value",a)})}}}},ne=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b);return function(b,c,e){a.$$addBindingInfo(c,e.ngBind);c=c[0];b.$watch(e.ngBind,function(a){c.textContent=q(a)?"":a})}}}}],pe=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate));
+ b.$$addBindingInfo(d,c.expressions);d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=q(a)?"":a})}}}}],oe=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(a){return(a||"").toString()});d.$$addBindingClass(c);return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){c.html(a.getTrustedHtml(f(b))||"")})}}}}],Me=na({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),
+ qe=lc("",!0),se=lc("Odd",0),re=lc("Even",1),te=La({compile:function(a,b){b.$set("ngCloak",u);a.removeClass("ng-cloak")}}),ue=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Ic={},xg={blur:!0,focus:!0};n("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=va("ng-"+a);Ic[b]=["$parse","$rootScope",function(d,c){return{restrict:"A",compile:function(e,f){var g=
+ d(f[b],null,!0);return function(b,d){d.on(a,function(d){var e=function(){g(b,{$event:d})};xg[a]&&c.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var xe=["$animate",function(a){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(b,d,c,e,f){var g,h,k;b.$watch(c.ngIf,function(b){b?h||f(function(b,e){h=e;b[b.length++]=X.createComment(" end ngIf: "+c.ngIf+" ");g={clone:b};a.enter(b,d.parent(),d)}):(k&&(k.remove(),k=null),h&&(h.$destroy(),h=null),g&&(k=
+ rb(g.clone),a.leave(k).then(function(){k=null}),g=null))})}}}],ye=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:fa.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",h=e.autoscroll;return function(c,e,m,n,q){var s=0,v,u,p,C=function(){u&&(u.remove(),u=null);v&&(v.$destroy(),v=null);p&&(d.leave(p).then(function(){u=null}),u=p,p=null)};c.$watch(f,function(f){var m=function(){!y(h)||h&&!c.$eval(h)||
+ b()},u=++s;f?(a(f,!0).then(function(a){if(u===s){var b=c.$new();n.template=a;a=q(b,function(a){C();d.enter(a,null,e).then(m)});v=b;p=a;v.$emit("$includeContentLoaded",f);c.$eval(g)}},function(){u===s&&(C(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(C(),n.template=null)})}}}}],Pe=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){/SVG/.test(d[0].toString())?(d.empty(),a(Lc(e.template,X).childNodes)(b,function(a){d.append(a)},
+ {futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],ze=La({priority:450,compile:function(){return{pre:function(a,b,d){a.$eval(d.ngInit)}}}}),Le=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=b.attr(d.$attr.ngList)||", ",f="false"!==d.ngTrim,g=f?U(e):e;c.$parsers.push(function(a){if(!q(a)){var b=[];a&&n(a.split(g),function(a){a&&b.push(f?U(a):a)});return b}});c.$formatters.push(function(a){return I(a)?a.join(e):u});c.$isEmpty=function(a){return!a||
+ !a.length}}}},mb="ng-valid",Jd="ng-invalid",Wa="ng-pristine",Jb="ng-dirty",Ld="ng-pending",lb=G("ngModel"),yg=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,b,d,c,e,f,g,h,k,l){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=u;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$untouched=!0;this.$touched=!1;this.$pristine=!0;this.$dirty=!1;
+ this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success={};this.$pending=u;this.$name=l(d.name||"",!1)(a);this.$$parentForm=Ib;var m=e(d.ngModel),r=m.assign,t=m,s=r,v=null,B,p=this;this.$$setOptions=function(a){if((p.$options=a)&&a.getterSetter){var b=e(d.ngModel+"()"),f=e(d.ngModel+"($$$p)");t=function(a){var c=m(a);z(c)&&(c=b(a));return c};s=function(a,b){z(m(a))?f(a,{$$$p:p.$modelValue}):r(a,p.$modelValue)}}else if(!m.assign)throw lb("nonassign",d.ngModel,ua(c));};this.$render=x;this.$isEmpty=
+ function(a){return q(a)||""===a||null===a||a!==a};var C=0;Gd({ctrl:this,$element:c,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]},$animate:f});this.$setPristine=function(){p.$dirty=!1;p.$pristine=!0;f.removeClass(c,Jb);f.addClass(c,Wa)};this.$setDirty=function(){p.$dirty=!0;p.$pristine=!1;f.removeClass(c,Wa);f.addClass(c,Jb);p.$$parentForm.$setDirty()};this.$setUntouched=function(){p.$touched=!1;p.$untouched=!0;f.setClass(c,"ng-untouched","ng-touched")};this.$setTouched=function(){p.$touched=
+ !0;p.$untouched=!1;f.setClass(c,"ng-touched","ng-untouched")};this.$rollbackViewValue=function(){g.cancel(v);p.$viewValue=p.$$lastCommittedViewValue;p.$render()};this.$validate=function(){if(!Q(p.$modelValue)||!isNaN(p.$modelValue)){var a=p.$$rawModelValue,b=p.$valid,c=p.$modelValue,d=p.$options&&p.$options.allowInvalid;p.$$runValidators(a,p.$$lastCommittedViewValue,function(e){d||b===e||(p.$modelValue=e?a:u,p.$modelValue!==c&&p.$$writeModelToScope())})}};this.$$runValidators=function(a,b,c){function d(){var c=
+ !0;n(p.$validators,function(d,e){var g=d(a,b);c=c&&g;f(e,g)});return c?!0:(n(p.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;n(p.$asyncValidators,function(e,g){var h=e(a,b);if(!h||!z(h.then))throw lb("$asyncValidators",h);f(g,u);c.push(h.then(function(){f(g,!0)},function(a){d=!1;f(g,!1)}))});c.length?k.all(c).then(function(){g(d)},x):g(!0)}function f(a,b){h===C&&p.$setValidity(a,b)}function g(a){h===C&&c(a)}C++;var h=C;(function(){var a=p.$$parserName||"parse";if(q(B))f(a,
+ null);else return B||(n(p.$validators,function(a,b){f(b,null)}),n(p.$asyncValidators,function(a,b){f(b,null)})),f(a,B),B;return!0})()?d()?e():g(!1):g(!1)};this.$commitViewValue=function(){var a=p.$viewValue;g.cancel(v);if(p.$$lastCommittedViewValue!==a||""===a&&p.$$hasNativeValidators)p.$$lastCommittedViewValue=a,p.$pristine&&this.$setDirty(),this.$$parseAndValidate()};this.$$parseAndValidate=function(){var b=p.$$lastCommittedViewValue;if(B=q(b)?u:!0)for(var c=0;c<p.$parsers.length;c++)if(b=p.$parsers[c](b),
+ q(b)){B=!1;break}Q(p.$modelValue)&&isNaN(p.$modelValue)&&(p.$modelValue=t(a));var d=p.$modelValue,e=p.$options&&p.$options.allowInvalid;p.$$rawModelValue=b;e&&(p.$modelValue=b,p.$modelValue!==d&&p.$$writeModelToScope());p.$$runValidators(b,p.$$lastCommittedViewValue,function(a){e||(p.$modelValue=a?b:u,p.$modelValue!==d&&p.$$writeModelToScope())})};this.$$writeModelToScope=function(){s(a,p.$modelValue);n(p.$viewChangeListeners,function(a){try{a()}catch(c){b(c)}})};this.$setViewValue=function(a,b){p.$viewValue=
+ a;p.$options&&!p.$options.updateOnDefault||p.$$debounceViewValueCommit(b)};this.$$debounceViewValueCommit=function(b){var c=0,d=p.$options;d&&y(d.debounce)&&(d=d.debounce,Q(d)?c=d:Q(d[b])?c=d[b]:Q(d["default"])&&(c=d["default"]));g.cancel(v);c?v=g(function(){p.$commitViewValue()},c):h.$$phase?p.$commitViewValue():a.$apply(function(){p.$commitViewValue()})};a.$watch(function(){var b=t(a);if(b!==p.$modelValue&&(p.$modelValue===p.$modelValue||b===b)){p.$modelValue=p.$$rawModelValue=b;B=u;for(var c=p.$formatters,
+ d=c.length,e=b;d--;)e=c[d](e);p.$viewValue!==e&&(p.$viewValue=p.$$lastCommittedViewValue=e,p.$render(),p.$$runValidators(b,e,x))}return b})}],Ke=["$rootScope",function(a){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:yg,priority:1,compile:function(b){b.addClass(Wa).addClass("ng-untouched").addClass(mb);return{pre:function(a,b,e,f){var g=f[0];b=f[1]||g.$$parentForm;g.$$setOptions(f[2]&&f[2].$options);b.$addControl(g);e.$observe("name",function(a){g.$name!==a&&g.$$parentForm.$$renameControl(g,
+ a)});a.$on("$destroy",function(){g.$$parentForm.$removeControl(g)})},post:function(b,c,e,f){var g=f[0];if(g.$options&&g.$options.updateOn)c.on(g.$options.updateOn,function(a){g.$$debounceViewValueCommit(a&&a.type)});c.on("blur",function(c){g.$touched||(a.$$phase?b.$evalAsync(g.$setTouched):b.$apply(g.$setTouched))})}}}}}],zg=/(\s+|^)default(\s+|$)/,Oe=function(){return{restrict:"A",controller:["$scope","$attrs",function(a,b){var d=this;this.$options=bb(a.$eval(b.ngModelOptions));y(this.$options.updateOn)?
+ (this.$options.updateOnDefault=!1,this.$options.updateOn=U(this.$options.updateOn.replace(zg,function(){d.$options.updateOnDefault=!0;return" "}))):this.$options.updateOnDefault=!0}]}},Ae=La({terminal:!0,priority:1E3}),Ag=G("ngOptions"),Bg=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,Ie=["$compile","$parse",function(a,
+ b){function d(a,c,d){function e(a,b,c,d,f){this.selectValue=a;this.viewValue=b;this.label=c;this.group=d;this.disabled=f}function l(a){var b;if(!q&&za(a))b=a;else{b=[];for(var c in a)a.hasOwnProperty(c)&&"$"!==c.charAt(0)&&b.push(c)}return b}var m=a.match(Bg);if(!m)throw Ag("iexp",a,ua(c));var n=m[5]||m[7],q=m[6];a=/ as /.test(m[0])&&m[1];var s=m[9];c=b(m[2]?m[1]:n);var v=a&&b(a)||c,u=s&&b(s),p=s?function(a,b){return u(d,b)}:function(a){return Ca(a)},C=function(a,b){return p(a,z(a,b))},w=b(m[2]||
+ m[1]),y=b(m[3]||""),B=b(m[4]||""),x=b(m[8]),D={},z=q?function(a,b){D[q]=b;D[n]=a;return D}:function(a){D[n]=a;return D};return{trackBy:s,getTrackByValue:C,getWatchables:b(x,function(a){var b=[];a=a||[];for(var c=l(a),e=c.length,f=0;f<e;f++){var g=a===c?f:c[f],k=z(a[g],g),g=p(a[g],k);b.push(g);if(m[2]||m[1])g=w(d,k),b.push(g);m[4]&&(k=B(d,k),b.push(k))}return b}),getOptions:function(){for(var a=[],b={},c=x(d)||[],f=l(c),g=f.length,m=0;m<g;m++){var n=c===f?m:f[m],r=z(c[n],n),q=v(d,r),n=p(q,r),t=w(d,
+ r),u=y(d,r),r=B(d,r),q=new e(n,q,t,u,r);a.push(q);b[n]=q}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[C(a)]},getViewValueFromOption:function(a){return s?fa.copy(a.viewValue):a.viewValue}}}}}var c=X.createElement("option"),e=X.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","?ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=x},post:function(b,g,h,k){function l(a,b){a.element=b;b.disabled=a.disabled;a.label!==b.label&&(b.label=a.label,
+ b.textContent=a.label);a.value!==b.value&&(b.value=a.selectValue)}function m(a,b,c,d){b&&F(b.nodeName)===c?c=b:(c=d.cloneNode(!1),b?a.insertBefore(c,b):a.appendChild(c));return c}function r(a){for(var b;a;)b=a.nextSibling,Xb(a),a=b}function q(a){var b=p&&p[0],c=z&&z[0];if(b||c)for(;a&&(a===b||a===c||8===a.nodeType||""===a.value);)a=a.nextSibling;return a}function s(){var a=D&&u.readValue();D=E.getOptions();var b={},d=g[0].firstChild;x&&g.prepend(p);d=q(d);D.items.forEach(function(a){var f,h;a.group?
+ (f=b[a.group],f||(f=m(g[0],d,"optgroup",e),d=f.nextSibling,f.label=a.group,f=b[a.group]={groupElement:f,currentOptionElement:f.firstChild}),h=m(f.groupElement,f.currentOptionElement,"option",c),l(a,h),f.currentOptionElement=h.nextSibling):(h=m(g[0],d,"option",c),l(a,h),d=h.nextSibling)});Object.keys(b).forEach(function(a){r(b[a].currentOptionElement)});r(d);v.$render();if(!v.$isEmpty(a)){var f=u.readValue();(E.trackBy?ma(a,f):a===f)||(v.$setViewValue(f),v.$render())}}var v=k[1];if(v){var u=k[0];k=
+ h.multiple;for(var p,C=0,w=g.children(),y=w.length;C<y;C++)if(""===w[C].value){p=w.eq(C);break}var x=!!p,z=B(c.cloneNode(!1));z.val("?");var D,E=d(h.ngOptions,g,b);k?(v.$isEmpty=function(a){return!a||0===a.length},u.writeValue=function(a){D.items.forEach(function(a){a.element.selected=!1});a&&a.forEach(function(a){(a=D.getOptionFromViewValue(a))&&!a.disabled&&(a.element.selected=!0)})},u.readValue=function(){var a=g.val()||[],b=[];n(a,function(a){(a=D.selectValueMap[a])&&!a.disabled&&b.push(D.getViewValueFromOption(a))});
+ return b},E.trackBy&&b.$watchCollection(function(){if(I(v.$viewValue))return v.$viewValue.map(function(a){return E.getTrackByValue(a)})},function(){v.$render()})):(u.writeValue=function(a){var b=D.getOptionFromViewValue(a);b&&!b.disabled?g[0].value!==b.selectValue&&(z.remove(),x||p.remove(),g[0].value=b.selectValue,b.element.selected=!0,b.element.setAttribute("selected","selected")):null===a||x?(z.remove(),x||g.prepend(p),g.val(""),p.prop("selected",!0),p.attr("selected",!0)):(x||p.remove(),g.prepend(z),
+ g.val("?"),z.prop("selected",!0),z.attr("selected",!0))},u.readValue=function(){var a=D.selectValueMap[g.val()];return a&&!a.disabled?(x||p.remove(),z.remove(),D.getViewValueFromOption(a)):null},E.trackBy&&b.$watch(function(){return E.getTrackByValue(v.$viewValue)},function(){v.$render()}));x?(p.remove(),a(p)(b),p.removeClass("ng-scope")):p=B(c.cloneNode(!1));s();b.$watchCollection(E.getWatchables,s)}}}}}],Be=["$locale","$interpolate","$log",function(a,b,d){var c=/{}/g,e=/^when(Minus)?(.+)$/;return{link:function(f,
+ g,h){function k(a){g.text(a||"")}var l=h.count,m=h.$attr.when&&g.attr(h.$attr.when),r=h.offset||0,s=f.$eval(m)||{},u={},v=b.startSymbol(),y=b.endSymbol(),p=v+l+"-"+r+y,C=fa.noop,w;n(h,function(a,b){var c=e.exec(b);c&&(c=(c[1]?"-":"")+F(c[2]),s[c]=g.attr(h.$attr[b]))});n(s,function(a,d){u[d]=b(a.replace(c,p))});f.$watch(l,function(b){var c=parseFloat(b),e=isNaN(c);e||c in s||(c=a.pluralCat(c-r));c===w||e&&Q(w)&&isNaN(w)||(C(),e=u[c],q(e)?(null!=b&&d.debug("ngPluralize: no rule defined for '"+c+"' in "+
+ m),C=x,k()):C=f.$watch(e,k),w=c)})}}}],Ce=["$parse","$animate",function(a,b){var d=G("ngRepeat"),c=function(a,b,c,d,k,l,m){a[c]=d;k&&(a[k]=l);a.$index=b;a.$first=0===b;a.$last=b===m-1;a.$middle=!(a.$first||a.$last);a.$odd=!(a.$even=0===(b&1))};return{restrict:"A",multiElement:!0,transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,compile:function(e,f){var g=f.ngRepeat,h=X.createComment(" end ngRepeat: "+g+" "),k=g.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);
+ if(!k)throw d("iexp",g);var l=k[1],m=k[2],r=k[3],q=k[4],k=l.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/);if(!k)throw d("iidexp",l);var s=k[3]||k[1],v=k[2];if(r&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(r)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(r)))throw d("badident",r);var x,p,y,w,z={$id:Ca};q?x=a(q):(y=function(a,b){return Ca(b)},w=function(a){return a});return function(a,e,f,k,l){x&&(p=function(b,c,d){v&&(z[v]=b);z[s]=c;z.$index=
+ d;return x(a,z)});var q=$();a.$watchCollection(m,function(f){var k,m,t=e[0],x,z=$(),D,E,H,F,I,G,J;r&&(a[r]=f);if(za(f))I=f,m=p||y;else for(J in m=p||w,I=[],f)qa.call(f,J)&&"$"!==J.charAt(0)&&I.push(J);D=I.length;J=Array(D);for(k=0;k<D;k++)if(E=f===I?k:I[k],H=f[E],F=m(E,H,k),q[F])G=q[F],delete q[F],z[F]=G,J[k]=G;else{if(z[F])throw n(J,function(a){a&&a.scope&&(q[a.id]=a)}),d("dupes",g,F,H);J[k]={id:F,scope:u,clone:u};z[F]=!0}for(x in q){G=q[x];F=rb(G.clone);b.leave(F);if(F[0].parentNode)for(k=0,m=F.length;k<
+ m;k++)F[k].$$NG_REMOVED=!0;G.scope.$destroy()}for(k=0;k<D;k++)if(E=f===I?k:I[k],H=f[E],G=J[k],G.scope){x=t;do x=x.nextSibling;while(x&&x.$$NG_REMOVED);G.clone[0]!=x&&b.move(rb(G.clone),null,B(t));t=G.clone[G.clone.length-1];c(G.scope,k,s,H,v,E,D)}else l(function(a,d){G.scope=d;var e=h.cloneNode(!1);a[a.length++]=e;b.enter(a,null,B(t));t=e;G.clone=a;z[G.id]=G;c(G.scope,k,s,H,v,E,D)});q=z})}}}}],De=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngShow,function(b){a[b?
+ "removeClass":"addClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],we=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngHide,function(b){a[b?"addClass":"removeClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],Ee=La(function(a,b,d){a.$watch(d.ngStyle,function(a,d){d&&a!==d&&n(d,function(a,c){b.css(c,"")});a&&b.css(a)},!0)}),Fe=["$animate",function(a){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(b,
+ d,c,e){var f=[],g=[],h=[],k=[],l=function(a,b){return function(){a.splice(b,1)}};b.$watch(c.ngSwitch||c.on,function(b){var c,d;c=0;for(d=h.length;c<d;++c)a.cancel(h[c]);c=h.length=0;for(d=k.length;c<d;++c){var q=rb(g[c].clone);k[c].$destroy();(h[c]=a.leave(q)).then(l(h,c))}g.length=0;k.length=0;(f=e.cases["!"+b]||e.cases["?"])&&n(f,function(b){b.transclude(function(c,d){k.push(d);var e=b.element;c[c.length++]=X.createComment(" end ngSwitchWhen: ");g.push({clone:c});a.enter(c,e.parent(),e)})})})}}}],
+ Ge=La({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){c.cases["!"+d.ngSwitchWhen]=c.cases["!"+d.ngSwitchWhen]||[];c.cases["!"+d.ngSwitchWhen].push({transclude:e,element:b})}}),He=La({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){c.cases["?"]=c.cases["?"]||[];c.cases["?"].push({transclude:e,element:b})}}),Je=La({restrict:"EAC",link:function(a,b,d,c,e){if(!e)throw G("ngTransclude")("orphan",ua(b));e(function(a){b.empty();
+ b.append(a)})}}),je=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,d){"text/ng-template"==d.type&&a.put(d.id,b[0].text)}}}],Cg={$setViewValue:x,$render:x},Dg=["$element","$scope","$attrs",function(a,b,d){var c=this,e=new Sa;c.ngModelCtrl=Cg;c.unknownOption=B(X.createElement("option"));c.renderUnknownOption=function(b){b="? "+Ca(b)+" ?";c.unknownOption.val(b);a.prepend(c.unknownOption);a.val(b)};b.$on("$destroy",function(){c.renderUnknownOption=x});c.removeUnknownOption=
+ function(){c.unknownOption.parent()&&c.unknownOption.remove()};c.readValue=function(){c.removeUnknownOption();return a.val()};c.writeValue=function(b){c.hasOption(b)?(c.removeUnknownOption(),a.val(b),""===b&&c.emptyOption.prop("selected",!0)):null==b&&c.emptyOption?(c.removeUnknownOption(),a.val("")):c.renderUnknownOption(b)};c.addOption=function(a,b){Ra(a,'"option value"');""===a&&(c.emptyOption=b);var d=e.get(a)||0;e.put(a,d+1);c.ngModelCtrl.$render();b[0].hasAttribute("selected")&&(b[0].selected=
+ !0)};c.removeOption=function(a){var b=e.get(a);b&&(1===b?(e.remove(a),""===a&&(c.emptyOption=u)):e.put(a,b-1))};c.hasOption=function(a){return!!e.get(a)};c.registerOption=function(a,b,d,e,l){if(e){var m;d.$observe("value",function(a){y(m)&&c.removeOption(m);m=a;c.addOption(a,b)})}else l?a.$watch(l,function(a,e){d.$set("value",a);e!==a&&c.removeOption(e);c.addOption(a,b)}):c.addOption(d.value,b);b.on("$destroy",function(){c.removeOption(d.value);c.ngModelCtrl.$render()})}}],ke=function(){return{restrict:"E",
+ require:["select","?ngModel"],controller:Dg,priority:1,link:{pre:function(a,b,d,c){var e=c[1];if(e){var f=c[0];f.ngModelCtrl=e;e.$render=function(){f.writeValue(e.$viewValue)};b.on("change",function(){a.$apply(function(){e.$setViewValue(f.readValue())})});if(d.multiple){f.readValue=function(){var a=[];n(b.find("option"),function(b){b.selected&&a.push(b.value)});return a};f.writeValue=function(a){var c=new Sa(a);n(b.find("option"),function(a){a.selected=y(c.get(a.value))})};var g,h=NaN;a.$watch(function(){h!==
+ e.$viewValue||ma(g,e.$viewValue)||(g=ia(e.$viewValue),e.$render());h=e.$viewValue});e.$isEmpty=function(a){return!a||0===a.length}}}}}}},me=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,d){if(y(d.value))var c=a(d.value,!0);else{var e=a(b.text(),!0);e||d.$set("value",b.text())}return function(a,b,d){var k=b.parent();(k=k.data("$selectController")||k.parent().data("$selectController"))&&k.registerOption(a,b,d,c,e)}}}}],le=na({restrict:"E",terminal:!1}),Fc=function(){return{restrict:"A",
+ require:"?ngModel",link:function(a,b,d,c){c&&(d.required=!0,c.$validators.required=function(a,b){return!d.required||!c.$isEmpty(b)},d.$observe("required",function(){c.$validate()}))}}},Ec=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e,f=d.ngPattern||d.pattern;d.$observe("pattern",function(a){E(a)&&0<a.length&&(a=new RegExp("^"+a+"$"));if(a&&!a.test)throw G("ngPattern")("noregexp",f,a,ua(b));e=a||u;c.$validate()});c.$validators.pattern=function(a,b){return c.$isEmpty(b)||
+ q(e)||e.test(b)}}}}},Hc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e=-1;d.$observe("maxlength",function(a){a=ea(a);e=isNaN(a)?-1:a;c.$validate()});c.$validators.maxlength=function(a,b){return 0>e||c.$isEmpty(b)||b.length<=e}}}}},Gc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e=0;d.$observe("minlength",function(a){e=ea(a)||0;c.$validate()});c.$validators.minlength=function(a,b){return c.$isEmpty(b)||b.length>=e}}}}};S.angular.bootstrap?
+ console.log("WARNING: Tried to load angular more than once."):(ce(),ee(fa),fa.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),
+ SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-\u00a4",
+ negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",pluralCat:function(a,c){var e=a|0,f=c;u===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),B(X).ready(function(){Zd(X,yc)}))})(window,document);!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>');
+//# sourceMappingURL=angular.min.js.map
diff --git a/common/src/main/webapp/thirdparty/js/bootstrap-table-filter-control.min.js b/common/src/main/webapp/thirdparty/js/bootstrap-table-filter-control.min.js
new file mode 100644
index 0000000..78dfa70
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/js/bootstrap-table-filter-control.min.js
@@ -0,0 +1,7 @@
+/*
+ * bootstrap-table - v1.11.0 - 2016-07-02
+ * https://github.com/wenzhixin/bootstrap-table
+ * Copyright (c) 2016 zhixin wen
+ * Licensed MIT License
+ */
+!function(a){"use strict";var b=a.fn.bootstrapTable.utils.sprintf,c=a.fn.bootstrapTable.utils.objectKeys,d=function(b,c,d){c=a.trim(c),b=a(b.get(b.length-1)),f(b,c)||b.append(a("<option></option>").attr("value",c).text(a("<div />").html(d).text()))},e=function(b){var c=b.find("option:gt(0)");c.sort(function(b,c){return b=a(b).text().toLowerCase(),c=a(c).text().toLowerCase(),a.isNumeric(b)&&a.isNumeric(c)&&(b=parseFloat(b),c=parseFloat(c)),b>c?1:c>b?-1:0}),b.find("option:gt(0)").remove(),b.append(c)},f=function(a,b){for(var c=a.get(a.length-1).options,d=0;d<c.length;d++)if(c[d].value===b.toString())return!0;return!1},g=function(a){a.$tableHeader.css("height","77px")},h=function(a){var b=a.$header;return a.options.height&&(b=a.$tableHeader),b},i=function(a){var b="select, input";return a.options.height&&(b="table select, table input"),b},j=function(b){if(a.fn.bootstrapTable.utils.isIEBrowser()){if(a(b).is("input")){var c=0;if("selectionStart"in b)c=b.selectionStart;else if("selection"in document){b.focus();var d=document.selection.createRange(),e=document.selection.createRange().text.length;d.moveStart("character",-b.value.length),c=d.text.length-e}return c}return-1}return-1},k=function(b,c){a.fn.bootstrapTable.utils.isIEBrowser()&&(void 0!==b.setSelectionRange?b.setSelectionRange(c,c):a(b).val(b.value))},l=function(b){var c=h(b),d=i(b);b.options.valuesFilterControl=[],c.find(d).each(function(){b.options.valuesFilterControl.push({field:a(this).closest("[data-field]").data("field"),value:a(this).val(),position:j(a(this).get(0))})})},m=function(b){var c=null,d=[],e=h(b),f=i(b);b.options.valuesFilterControl.length>0&&e.find(f).each(function(){c=a(this).closest("[data-field]").data("field"),d=a.grep(b.options.valuesFilterControl,function(a){return a.field===c}),d.length>0&&(a(this).val(d[0].value),k(a(this).get(0),d[0].position))})},n=function(){var b=[],c=document.cookie.match(/(?:bs.table.)(\w*)/g);return c?(a.each(c,function(c,d){/./.test(d)&&(d=d.split(".").pop()),-1===a.inArray(d,b)&&b.push(d)}),b):void 0},o=function(b){var c=b.options.data,f=(b.pageTo<b.options.data.length?b.options.data.length:b.pageTo,function(a){return a.filterControl&&"select"===a.filterControl.toLowerCase()&&a.searchable}),g=function(a){return void 0===a.filterData||"column"===a.filterData.toLowerCase()},h=function(a){return a&&a.length>0},i=b.options.pagination?"server"===b.options.sidePagination?b.pageTo:b.options.totalRows:b.pageTo;a.each(b.header.fields,function(j,k){var l=b.columns[a.fn.bootstrapTable.utils.getFieldIndex(b.columns,k)],m=a(".bootstrap-table-filter-control-"+p(l.field));if(f(l)&&g(l)&&h(m)){0===m.get(m.length-1).options.length&&d(m,"","");for(var n={},o=0;i>o;o++){var q=c[o][k],r=a.fn.bootstrapTable.utils.calculateObjectValue(b.header,b.header.formatters[j],[q,c[o],o],q);n[r]=q}for(var s in n)d(m,n[s],s);e(m)}})},p=function(a){return String(a).replace(/(:|\.|\[|\]|,)/g,"\\$1")},q=function(b,c){var f,g,h=!1,i=0;a.each(b.columns,function(i,j){if(f="hidden",g=[],j.visible){if(j.filterControl){g.push('<div style="margin: 0 2px 2px 2px;" class="filterControl">');var k=j.filterControl.toLowerCase();j.searchable&&b.options.filterTemplate[k]&&(h=!0,f="visible",g.push(b.options.filterTemplate[k](b,j.field,f)))}else g.push('<div style="height: 34px;"></div>');if(a.each(c.children().children(),function(b,c){return c=a(c),c.data("field")===j.field?(c.find(".fht-cell").append(g.join("")),!1):void 0}),void 0!==j.filterData&&"column"!==j.filterData.toLowerCase()){var l,m,n=t(s,j.filterData.substring(0,j.filterData.indexOf(":")));if(null===n)throw new SyntaxError('Error. You should use any of these allowed filter data methods: var, json, url. Use like this: var: {key: "value"}');l=j.filterData.substring(j.filterData.indexOf(":")+1,j.filterData.length),m=a(".bootstrap-table-filter-control-"+p(j.field)),d(m,"",""),n(l,m);var o,q;switch(n){case"url":a.ajax({url:l,dataType:"json",success:function(a){for(var b in a)d(m,b,a[b]);e(m)}});break;case"var":o=window[l];for(q in o)d(m,q,o[q]);e(m);break;case"jso":o=JSON.parse(l);for(q in o)d(m,q,o[q]);e(m)}}}}),h?(c.off("keyup","input").on("keyup","input",function(a){clearTimeout(i),i=setTimeout(function(){b.onColumnSearch(a)},b.options.searchTimeOut)}),c.off("change","select").on("change","select",function(a){clearTimeout(i),i=setTimeout(function(){b.onColumnSearch(a)},b.options.searchTimeOut)}),c.off("mouseup","input").on("mouseup","input",function(c){var d=a(this),e=d.val();""!==e&&setTimeout(function(){var a=d.val();""===a&&(clearTimeout(i),i=setTimeout(function(){b.onColumnSearch(c)},b.options.searchTimeOut))},1)}),c.find(".date-filter-control").length>0&&a.each(b.columns,function(b,d){void 0!==d.filterControl&&"datepicker"===d.filterControl.toLowerCase()&&c.find(".date-filter-control.bootstrap-table-filter-control-"+d.field).datepicker(d.filterDatepickerOptions).on("changeDate",function(b){a(b.currentTarget).keyup()})})):c.find(".filterControl").hide()},r=function(a){switch(a=void 0===a?"left":a.toLowerCase()){case"left":return"ltr";case"right":return"rtl";case"auto":return"auto";default:return"ltr"}},s={"var":function(a,b){var c=window[a];for(var f in c)d(b,f,c[f]);e(b)},url:function(b,c){a.ajax({url:b,dataType:"json",success:function(a){for(var b in a)d(c,b,a[b]);e(c)}})},json:function(a,b){var c=JSON.parse(a);for(var f in c)d(b,f,c[f]);e(b)}},t=function(a,b){for(var c=Object.keys(a),d=0;d<c.length;d++)if(c[d]===b)return a[b];return null};a.extend(a.fn.bootstrapTable.defaults,{filterControl:!1,onColumnSearch:function(){return!1},filterShowClear:!1,alignmentSelectControlOptions:void 0,filterTemplate:{input:function(a,c,d){return b('<input type="text" class="form-control bootstrap-table-filter-control-%s" style="width: 100%; visibility: %s">',c,d)},select:function(a,c,d){return b('<select class="form-control bootstrap-table-filter-control-%s" style="width: 100%; visibility: %s" dir="%s"></select>',c,d,r(a.options.alignmentSelectControlOptions))},datepicker:function(a,c,d){return b('<input type="text" class="form-control date-filter-control bootstrap-table-filter-control-%s" style="width: 100%; visibility: %s">',c,d)}},valuesFilterControl:[]}),a.extend(a.fn.bootstrapTable.COLUMN_DEFAULTS,{filterControl:void 0,filterData:void 0,filterDatepickerOptions:void 0,filterStrictSearch:!1,filterStartsWithSearch:!1}),a.extend(a.fn.bootstrapTable.Constructor.EVENTS,{"column-search.bs.table":"onColumnSearch"}),a.extend(a.fn.bootstrapTable.defaults.icons,{clear:"glyphicon-trash icon-clear"}),a.extend(a.fn.bootstrapTable.locales,{formatClearFilters:function(){return"Clear Filters"}}),a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales);var u=a.fn.bootstrapTable.Constructor,v=u.prototype.init,w=u.prototype.initToolbar,x=u.prototype.initHeader,y=u.prototype.initBody,z=u.prototype.initSearch;u.prototype.init=function(){if(this.options.filterControl){var a=this;Object.keys||c(),this.options.valuesFilterControl=[],this.$el.on("reset-view.bs.table",function(){a.options.height&&(a.$tableHeader.find("select").length>0||a.$tableHeader.find("input").length>0||q(a,a.$tableHeader))}).on("post-header.bs.table",function(){m(a)}).on("post-body.bs.table",function(){a.options.height&&g(a)}).on("column-switch.bs.table",function(){m(a)})}v.apply(this,Array.prototype.slice.apply(arguments))},u.prototype.initToolbar=function(){if(this.showToolbar=this.options.filterControl&&this.options.filterShowClear,w.apply(this,Array.prototype.slice.apply(arguments)),this.options.filterControl&&this.options.filterShowClear){var c=this.$toolbar.find(">.btn-group"),d=c.find(".filter-show-clear");d.length||(d=a(['<button class="btn btn-default filter-show-clear" ',b('type="button" title="%s">',this.options.formatClearFilters()),b('<i class="%s %s"></i> ',this.options.iconsPrefix,this.options.icons.clear),"</button>"].join("")).appendTo(c),d.off("click").on("click",a.proxy(this.clearFilterControl,this)))}},u.prototype.initHeader=function(){x.apply(this,Array.prototype.slice.apply(arguments)),this.options.filterControl&&q(this,this.$header)},u.prototype.initBody=function(){y.apply(this,Array.prototype.slice.apply(arguments)),o(this)},u.prototype.initSearch=function(){if(z.apply(this,Array.prototype.slice.apply(arguments)),"server"!==this.options.sidePagination){var b=this,c=a.isEmptyObject(this.filterColumnsPartial)?null:this.filterColumnsPartial;this.data=c?a.grep(this.data,function(d,e){for(var f in c){var g=b.columns[a.fn.bootstrapTable.utils.getFieldIndex(b.columns,f)],h=c[f].toLowerCase(),i=d[f];if(g&&g.searchFormatter&&(i=a.fn.bootstrapTable.utils.calculateObjectValue(b.header,b.header.formatters[a.inArray(f,b.header.fields)],[i,d,e],i)),g.filterStrictSearch){if(-1===a.inArray(f,b.header.fields)||"string"!=typeof i&&"number"!=typeof i||i.toString().toLowerCase()!==h.toString().toLowerCase())return!1}else if(g.filterStartsWithSearch){if(-1===a.inArray(f,b.header.fields)||"string"!=typeof i&&"number"!=typeof i||0!==(i+"").toLowerCase().indexOf(h))return!1}else if(-1===a.inArray(f,b.header.fields)||"string"!=typeof i&&"number"!=typeof i||-1===(i+"").toLowerCase().indexOf(h))return!1}return!0}):this.data}},u.prototype.initColumnSearch=function(a){if(l(this),a){this.filterColumnsPartial=a,this.updatePagination();for(var b in a)this.trigger("column-search",b,a[b])}},u.prototype.onColumnSearch=function(b){if(!(a.inArray(b.keyCode,[37,38,39,40])>-1)){l(this);var c=a.trim(a(b.currentTarget).val()),d=a(b.currentTarget).closest("[data-field]").data("field");a.isEmptyObject(this.filterColumnsPartial)&&(this.filterColumnsPartial={}),c?this.filterColumnsPartial[d]=c:delete this.filterColumnsPartial[d],this.searchText+="randomText",this.options.pageNumber=1,this.onSearch(b),this.trigger("column-search",d,c)}},u.prototype.clearFilterControl=function(){if(this.options.filterControl&&this.options.filterShowClear){var c=this,d=n(),e=h(c),f=e.closest("table"),g=e.find(i(c)),j=c.$toolbar.find(".search input"),k=0;if(a.each(c.options.valuesFilterControl,function(a,b){b.value=""}),m(c),!(g.length>0))return;if(this.filterColumnsPartial={},a(g[0]).trigger("INPUT"===g[0].tagName?"keyup":"change"),j.length>0&&c.resetSearch(),c.options.sortName!==f.data("sortName")||c.options.sortOrder!==f.data("sortOrder")){var l=e.find(b('[data-field="%s"]',a(g[0]).closest("table").data("sortName")));l.length>0&&(c.onSort(f.data("sortName"),f.data("sortName")),a(l).find(".sortable").trigger("click"))}clearTimeout(k),k=setTimeout(function(){d&&d.length>0&&a.each(d,function(a,b){void 0!==c.deleteCookie&&c.deleteCookie(b)})},c.options.searchTimeOut)}}}(jQuery); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/js/bootstrap-table.min.js b/common/src/main/webapp/thirdparty/js/bootstrap-table.min.js
new file mode 100644
index 0000000..b6602c3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/js/bootstrap-table.min.js
@@ -0,0 +1,8 @@
+/*
+* bootstrap-table - v1.11.0 - 2016-07-02
+* https://github.com/wenzhixin/bootstrap-table
+* Copyright 2016 zhixin wen
+* Licensed MIT License
+*/
+!function(a){"use strict";var b=null,c=function(a){var b=arguments,c=!0,d=1;return a=a.replace(/%s/g,function(){var a=b[d++];return"undefined"==typeof a?(c=!1,""):a}),c?a:""},d=function(b,c,d,e){var f="";return a.each(b,function(a,b){return b[c]===e?(f=b[d],!1):!0}),f},e=function(b,c){var d=-1;return a.each(b,function(a,b){return b.field===c?(d=a,!1):!0}),d},f=function(b){var c,d,e,f=0,g=[];for(c=0;c<b[0].length;c++)f+=b[0][c].colspan||1;for(c=0;c<b.length;c++)for(g[c]=[],d=0;f>d;d++)g[c][d]=!1;for(c=0;c<b.length;c++)for(d=0;d<b[c].length;d++){var h=b[c][d],i=h.rowspan||1,j=h.colspan||1,k=a.inArray(!1,g[c]);for(1===j&&(h.fieldIndex=k,"undefined"==typeof h.field&&(h.field=k)),e=0;i>e;e++)g[c+e][k]=!0;for(e=0;j>e;e++)g[c][k+e]=!0}},g=function(){if(null===b){var c,d,e=a("<p/>").addClass("fixed-table-scroll-inner"),f=a("<div/>").addClass("fixed-table-scroll-outer");f.append(e),a("body").append(f),c=e[0].offsetWidth,f.css("overflow","scroll"),d=e[0].offsetWidth,c===d&&(d=f[0].clientWidth),f.remove(),b=c-d}return b},h=function(b,d,e,f){var g=d;if("string"==typeof d){var h=d.split(".");h.length>1?(g=window,a.each(h,function(a,b){g=g[b]})):g=window[d]}return"object"==typeof g?g:"function"==typeof g?g.apply(b,e):!g&&"string"==typeof d&&c.apply(this,[d].concat(e))?c.apply(this,[d].concat(e)):f},i=function(b,c,d){var e=Object.getOwnPropertyNames(b),f=Object.getOwnPropertyNames(c),g="";if(d&&e.length!==f.length)return!1;for(var h=0;h<e.length;h++)if(g=e[h],a.inArray(g,f)>-1&&b[g]!==c[g])return!1;return!0},j=function(a){return"string"==typeof a?a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/`/g,"&#x60;"):a},k=function(b){var c=0;return b.children().each(function(){c<a(this).outerHeight(!0)&&(c=a(this).outerHeight(!0))}),c},l=function(a){for(var b in a){var c=b.split(/(?=[A-Z])/).join("-").toLowerCase();c!==b&&(a[c]=a[b],delete a[b])}return a},m=function(a,b,c){var d=a;if("string"!=typeof b||a.hasOwnProperty(b))return c?j(a[b]):a[b];var e=b.split(".");for(var f in e)d=d&&d[e[f]];return c?j(d):d},n=function(){return!!(navigator.userAgent.indexOf("MSIE ")>0||navigator.userAgent.match(/Trident.*rv\:11\./))},o=function(){Object.keys||(Object.keys=function(){var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=c.length;return function(e){if("object"!=typeof e&&("function"!=typeof e||null===e))throw new TypeError("Object.keys called on non-object");var f,g,h=[];for(f in e)a.call(e,f)&&h.push(f);if(b)for(g=0;d>g;g++)a.call(e,c[g])&&h.push(c[g]);return h}}())},p=function(b,c){this.options=c,this.$el=a(b),this.$el_=this.$el.clone(),this.timeoutId_=0,this.timeoutFooter_=0,this.init()};p.DEFAULTS={classes:"table table-hover",locale:void 0,height:void 0,undefinedText:"-",sortName:void 0,sortOrder:"asc",sortStable:!1,striped:!1,columns:[[]],data:[],dataField:"rows",method:"get",url:void 0,ajax:void 0,cache:!0,contentType:"application/json",dataType:"json",ajaxOptions:{},queryParams:function(a){return a},queryParamsType:"limit",responseHandler:function(a){return a},pagination:!1,onlyInfoPagination:!1,sidePagination:"client",totalRows:0,pageNumber:1,pageSize:10,pageList:[10,25,50,100],paginationHAlign:"right",paginationVAlign:"bottom",paginationDetailHAlign:"left",paginationPreText:"&lsaquo;",paginationNextText:"&rsaquo;",search:!1,searchOnEnterKey:!1,strictSearch:!1,searchAlign:"right",selectItemName:"btSelectItem",showHeader:!0,showFooter:!1,showColumns:!1,showPaginationSwitch:!1,showRefresh:!1,showToggle:!1,buttonsAlign:"right",smartDisplay:!0,escape:!1,minimumCountColumns:1,idField:void 0,uniqueId:void 0,cardView:!1,detailView:!1,detailFormatter:function(){return""},trimOnSearch:!0,clickToSelect:!1,singleSelect:!1,toolbar:void 0,toolbarAlign:"left",checkboxHeader:!0,sortable:!0,silentSort:!0,maintainSelected:!1,searchTimeOut:500,searchText:"",iconSize:void 0,buttonsClass:"default",iconsPrefix:"glyphicon",icons:{paginationSwitchDown:"glyphicon-collapse-down icon-chevron-down",paginationSwitchUp:"glyphicon-collapse-up icon-chevron-up",refresh:"glyphicon-refresh icon-refresh",toggle:"glyphicon-list-alt icon-list-alt",columns:"glyphicon-th icon-th",detailOpen:"glyphicon-plus icon-plus",detailClose:"glyphicon-minus icon-minus"},customSearch:a.noop,customSort:a.noop,rowStyle:function(){return{}},rowAttributes:function(){return{}},footerStyle:function(){return{}},onAll:function(){return!1},onClickCell:function(){return!1},onDblClickCell:function(){return!1},onClickRow:function(){return!1},onDblClickRow:function(){return!1},onSort:function(){return!1},onCheck:function(){return!1},onUncheck:function(){return!1},onCheckAll:function(){return!1},onUncheckAll:function(){return!1},onCheckSome:function(){return!1},onUncheckSome:function(){return!1},onLoadSuccess:function(){return!1},onLoadError:function(){return!1},onColumnSwitch:function(){return!1},onPageChange:function(){return!1},onSearch:function(){return!1},onToggle:function(){return!1},onPreBody:function(){return!1},onPostBody:function(){return!1},onPostHeader:function(){return!1},onExpandRow:function(){return!1},onCollapseRow:function(){return!1},onRefreshOptions:function(){return!1},onRefresh:function(){return!1},onResetView:function(){return!1}},p.LOCALES={},p.LOCALES["en-US"]=p.LOCALES.en={formatLoadingMessage:function(){return"Loading, please wait..."},formatRecordsPerPage:function(a){return c("%s rows per page",a)},formatShowingRows:function(a,b,d){return c("Showing %s to %s of %s rows",a,b,d)},formatDetailPagination:function(a){return c("Showing %s rows",a)},formatSearch:function(){return"Search"},formatNoMatches:function(){return"No matching records found"},formatPaginationSwitch:function(){return"Hide/Show pagination"},formatRefresh:function(){return"Refresh"},formatToggle:function(){return"Toggle"},formatColumns:function(){return"Columns"},formatAllRows:function(){return"All"}},a.extend(p.DEFAULTS,p.LOCALES["en-US"]),p.COLUMN_DEFAULTS={radio:!1,checkbox:!1,checkboxEnabled:!0,field:void 0,title:void 0,titleTooltip:void 0,"class":void 0,align:void 0,halign:void 0,falign:void 0,valign:void 0,width:void 0,sortable:!1,order:"asc",visible:!0,switchable:!0,clickToSelect:!0,formatter:void 0,footerFormatter:void 0,events:void 0,sorter:void 0,sortName:void 0,cellStyle:void 0,searchable:!0,searchFormatter:!0,cardVisible:!0},p.EVENTS={"all.bs.table":"onAll","click-cell.bs.table":"onClickCell","dbl-click-cell.bs.table":"onDblClickCell","click-row.bs.table":"onClickRow","dbl-click-row.bs.table":"onDblClickRow","sort.bs.table":"onSort","check.bs.table":"onCheck","uncheck.bs.table":"onUncheck","check-all.bs.table":"onCheckAll","uncheck-all.bs.table":"onUncheckAll","check-some.bs.table":"onCheckSome","uncheck-some.bs.table":"onUncheckSome","load-success.bs.table":"onLoadSuccess","load-error.bs.table":"onLoadError","column-switch.bs.table":"onColumnSwitch","page-change.bs.table":"onPageChange","search.bs.table":"onSearch","toggle.bs.table":"onToggle","pre-body.bs.table":"onPreBody","post-body.bs.table":"onPostBody","post-header.bs.table":"onPostHeader","expand-row.bs.table":"onExpandRow","collapse-row.bs.table":"onCollapseRow","refresh-options.bs.table":"onRefreshOptions","reset-view.bs.table":"onResetView","refresh.bs.table":"onRefresh"},p.prototype.init=function(){this.initLocale(),this.initContainer(),this.initTable(),this.initHeader(),this.initData(),this.initFooter(),this.initToolbar(),this.initPagination(),this.initBody(),this.initSearchText(),this.initServer()},p.prototype.initLocale=function(){if(this.options.locale){var b=this.options.locale.split(/-|_/);b[0].toLowerCase(),b[1]&&b[1].toUpperCase(),a.fn.bootstrapTable.locales[this.options.locale]?a.extend(this.options,a.fn.bootstrapTable.locales[this.options.locale]):a.fn.bootstrapTable.locales[b.join("-")]?a.extend(this.options,a.fn.bootstrapTable.locales[b.join("-")]):a.fn.bootstrapTable.locales[b[0]]&&a.extend(this.options,a.fn.bootstrapTable.locales[b[0]])}},p.prototype.initContainer=function(){this.$container=a(['<div class="bootstrap-table">','<div class="fixed-table-toolbar"></div>',"top"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'<div class="fixed-table-pagination" style="clear: both;"></div>':"",'<div class="fixed-table-container">','<div class="fixed-table-header"><table></table></div>','<div class="fixed-table-body">','<div class="fixed-table-loading">',this.options.formatLoadingMessage(),"</div>","</div>",'<div class="fixed-table-footer"><table><tr></tr></table></div>',"bottom"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'<div class="fixed-table-pagination"></div>':"","</div>","</div>"].join("")),this.$container.insertAfter(this.$el),this.$tableContainer=this.$container.find(".fixed-table-container"),this.$tableHeader=this.$container.find(".fixed-table-header"),this.$tableBody=this.$container.find(".fixed-table-body"),this.$tableLoading=this.$container.find(".fixed-table-loading"),this.$tableFooter=this.$container.find(".fixed-table-footer"),this.$toolbar=this.$container.find(".fixed-table-toolbar"),this.$pagination=this.$container.find(".fixed-table-pagination"),this.$tableBody.append(this.$el),this.$container.after('<div class="clearfix"></div>'),this.$el.addClass(this.options.classes),this.options.striped&&this.$el.addClass("table-striped"),-1!==a.inArray("table-no-bordered",this.options.classes.split(" "))&&this.$tableContainer.addClass("table-no-bordered")},p.prototype.initTable=function(){var b=this,c=[],d=[];if(this.$header=this.$el.find(">thead"),this.$header.length||(this.$header=a("<thead></thead>").appendTo(this.$el)),this.$header.find("tr").each(function(){var b=[];a(this).find("th").each(function(){"undefined"!=typeof a(this).data("field")&&a(this).data("field",a(this).data("field")+""),b.push(a.extend({},{title:a(this).html(),"class":a(this).attr("class"),titleTooltip:a(this).attr("title"),rowspan:a(this).attr("rowspan")?+a(this).attr("rowspan"):void 0,colspan:a(this).attr("colspan")?+a(this).attr("colspan"):void 0},a(this).data()))}),c.push(b)}),a.isArray(this.options.columns[0])||(this.options.columns=[this.options.columns]),this.options.columns=a.extend(!0,[],c,this.options.columns),this.columns=[],f(this.options.columns),a.each(this.options.columns,function(c,d){a.each(d,function(d,e){e=a.extend({},p.COLUMN_DEFAULTS,e),"undefined"!=typeof e.fieldIndex&&(b.columns[e.fieldIndex]=e),b.options.columns[c][d]=e})}),!this.options.data.length){var e=[];this.$el.find(">tbody>tr").each(function(c){var f={};f._id=a(this).attr("id"),f._class=a(this).attr("class"),f._data=l(a(this).data()),a(this).find(">td").each(function(d){for(var g,h,i=a(this),j=+i.attr("colspan")||1,k=+i.attr("rowspan")||1;e[c]&&e[c][d];d++);for(g=d;d+j>g;g++)for(h=c;c+k>h;h++)e[h]||(e[h]=[]),e[h][g]=!0;var m=b.columns[d].field;f[m]=a(this).html(),f["_"+m+"_id"]=a(this).attr("id"),f["_"+m+"_class"]=a(this).attr("class"),f["_"+m+"_rowspan"]=a(this).attr("rowspan"),f["_"+m+"_colspan"]=a(this).attr("colspan"),f["_"+m+"_title"]=a(this).attr("title"),f["_"+m+"_data"]=l(a(this).data())}),d.push(f)}),this.options.data=d,d.length&&(this.fromHtml=!0)}},p.prototype.initHeader=function(){var b=this,d={},e=[];this.header={fields:[],styles:[],classes:[],formatters:[],events:[],sorters:[],sortNames:[],cellStyles:[],searchables:[]},a.each(this.options.columns,function(f,g){e.push("<tr>"),0===f&&!b.options.cardView&&b.options.detailView&&e.push(c('<th class="detail" rowspan="%s"><div class="fht-cell"></div></th>',b.options.columns.length)),a.each(g,function(a,f){var g="",h="",i="",j="",k=c(' class="%s"',f["class"]),l=(b.options.sortOrder||f.order,"px"),m=f.width;if(void 0===f.width||b.options.cardView||"string"==typeof f.width&&-1!==f.width.indexOf("%")&&(l="%"),f.width&&"string"==typeof f.width&&(m=f.width.replace("%","").replace("px","")),h=c("text-align: %s; ",f.halign?f.halign:f.align),i=c("text-align: %s; ",f.align),j=c("vertical-align: %s; ",f.valign),j+=c("width: %s; ",!f.checkbox&&!f.radio||m?m?m+l:void 0:"36px"),"undefined"!=typeof f.fieldIndex){if(b.header.fields[f.fieldIndex]=f.field,b.header.styles[f.fieldIndex]=i+j,b.header.classes[f.fieldIndex]=k,b.header.formatters[f.fieldIndex]=f.formatter,b.header.events[f.fieldIndex]=f.events,b.header.sorters[f.fieldIndex]=f.sorter,b.header.sortNames[f.fieldIndex]=f.sortName,b.header.cellStyles[f.fieldIndex]=f.cellStyle,b.header.searchables[f.fieldIndex]=f.searchable,!f.visible)return;if(b.options.cardView&&!f.cardVisible)return;d[f.field]=f}e.push("<th"+c(' title="%s"',f.titleTooltip),f.checkbox||f.radio?c(' class="bs-checkbox %s"',f["class"]||""):k,c(' style="%s"',h+j),c(' rowspan="%s"',f.rowspan),c(' colspan="%s"',f.colspan),c(' data-field="%s"',f.field),"tabindex='0'",">"),e.push(c('<div class="th-inner %s">',b.options.sortable&&f.sortable?"sortable both":"")),g=f.title,f.checkbox&&(!b.options.singleSelect&&b.options.checkboxHeader&&(g='<input name="btSelectAll" type="checkbox" />'),b.header.stateField=f.field),f.radio&&(g="",b.header.stateField=f.field,b.options.singleSelect=!0),e.push(g),e.push("</div>"),e.push('<div class="fht-cell"></div>'),e.push("</div>"),e.push("</th>")}),e.push("</tr>")}),this.$header.html(e.join("")),this.$header.find("th[data-field]").each(function(){a(this).data(d[a(this).data("field")])}),this.$container.off("click",".th-inner").on("click",".th-inner",function(c){var d=a(this);return b.options.detailView&&d.closest(".bootstrap-table")[0]!==b.$container[0]?!1:void(b.options.sortable&&d.parent().data().sortable&&b.onSort(c))}),this.$header.children().children().off("keypress").on("keypress",function(c){if(b.options.sortable&&a(this).data().sortable){var d=c.keyCode||c.which;13==d&&b.onSort(c)}}),a(window).off("resize.bootstrap-table"),!this.options.showHeader||this.options.cardView?(this.$header.hide(),this.$tableHeader.hide(),this.$tableLoading.css("top",0)):(this.$header.show(),this.$tableHeader.show(),this.$tableLoading.css("top",this.$header.outerHeight()+1),this.getCaret(),a(window).on("resize.bootstrap-table",a.proxy(this.resetWidth,this))),this.$selectAll=this.$header.find('[name="btSelectAll"]'),this.$selectAll.off("click").on("click",function(){var c=a(this).prop("checked");b[c?"checkAll":"uncheckAll"](),b.updateSelected()})},p.prototype.initFooter=function(){!this.options.showFooter||this.options.cardView?this.$tableFooter.hide():this.$tableFooter.show()},p.prototype.initData=function(a,b){this.data="append"===b?this.data.concat(a):"prepend"===b?[].concat(a).concat(this.data):a||this.options.data,this.options.data="append"===b?this.options.data.concat(a):"prepend"===b?[].concat(a).concat(this.options.data):this.data,"server"!==this.options.sidePagination&&this.initSort()},p.prototype.initSort=function(){var b=this,c=this.options.sortName,d="desc"===this.options.sortOrder?-1:1,e=a.inArray(this.options.sortName,this.header.fields);return this.options.customSort!==a.noop?void this.options.customSort.apply(this,[this.options.sortName,this.options.sortOrder]):void(-1!==e&&(this.options.sortStable&&a.each(this.data,function(a,b){b.hasOwnProperty("_position")||(b._position=a)}),this.data.sort(function(f,g){b.header.sortNames[e]&&(c=b.header.sortNames[e]);var i=m(f,c,b.options.escape),j=m(g,c,b.options.escape),k=h(b.header,b.header.sorters[e],[i,j]);return void 0!==k?d*k:((void 0===i||null===i)&&(i=""),(void 0===j||null===j)&&(j=""),b.options.sortStable&&i===j&&(i=f._position,j=g._position),a.isNumeric(i)&&a.isNumeric(j)?(i=parseFloat(i),j=parseFloat(j),j>i?-1*d:d):i===j?0:("string"!=typeof i&&(i=i.toString()),-1===i.localeCompare(j)?-1*d:d))})))},p.prototype.onSort=function(b){var c="keypress"===b.type?a(b.currentTarget):a(b.currentTarget).parent(),d=this.$header.find("th").eq(c.index());return this.$header.add(this.$header_).find("span.order").remove(),this.options.sortName===c.data("field")?this.options.sortOrder="asc"===this.options.sortOrder?"desc":"asc":(this.options.sortName=c.data("field"),this.options.sortOrder="asc"===c.data("order")?"desc":"asc"),this.trigger("sort",this.options.sortName,this.options.sortOrder),c.add(d).data("order",this.options.sortOrder),this.getCaret(),"server"===this.options.sidePagination?void this.initServer(this.options.silentSort):(this.initSort(),void this.initBody())},p.prototype.initToolbar=function(){var b,d,e=this,f=[],g=0,i=0;this.$toolbar.find(".bs-bars").children().length&&a("body").append(a(this.options.toolbar)),this.$toolbar.html(""),("string"==typeof this.options.toolbar||"object"==typeof this.options.toolbar)&&a(c('<div class="bs-bars pull-%s"></div>',this.options.toolbarAlign)).appendTo(this.$toolbar).append(a(this.options.toolbar)),f=[c('<div class="columns columns-%s btn-group pull-%s">',this.options.buttonsAlign,this.options.buttonsAlign)],"string"==typeof this.options.icons&&(this.options.icons=h(null,this.options.icons)),this.options.showPaginationSwitch&&f.push(c('<button class="btn'+c(" btn-%s",this.options.buttonsClass)+c(" btn-%s",this.options.iconSize)+'" type="button" name="paginationSwitch" title="%s">',this.options.formatPaginationSwitch()),c('<i class="%s %s"></i>',this.options.iconsPrefix,this.options.icons.paginationSwitchDown),"</button>"),this.options.showRefresh&&f.push(c('<button class="btn'+c(" btn-%s",this.options.buttonsClass)+c(" btn-%s",this.options.iconSize)+'" type="button" name="refresh" title="%s">',this.options.formatRefresh()),c('<i class="%s %s"></i>',this.options.iconsPrefix,this.options.icons.refresh),"</button>"),this.options.showToggle&&f.push(c('<button class="btn'+c(" btn-%s",this.options.buttonsClass)+c(" btn-%s",this.options.iconSize)+'" type="button" name="toggle" title="%s">',this.options.formatToggle()),c('<i class="%s %s"></i>',this.options.iconsPrefix,this.options.icons.toggle),"</button>"),this.options.showColumns&&(f.push(c('<div class="keep-open btn-group" title="%s">',this.options.formatColumns()),'<button type="button" class="btn'+c(" btn-%s",this.options.buttonsClass)+c(" btn-%s",this.options.iconSize)+' dropdown-toggle" data-toggle="dropdown">',c('<i class="%s %s"></i>',this.options.iconsPrefix,this.options.icons.columns),' <span class="caret"></span>',"</button>",'<ul class="dropdown-menu" role="menu">'),a.each(this.columns,function(a,b){if(!(b.radio||b.checkbox||e.options.cardView&&!b.cardVisible)){var d=b.visible?' checked="checked"':"";b.switchable&&(f.push(c('<li><label><input type="checkbox" data-field="%s" value="%s"%s> %s</label></li>',b.field,a,d,b.title)),i++)}}),f.push("</ul>","</div>")),f.push("</div>"),(this.showToolbar||f.length>2)&&this.$toolbar.append(f.join("")),this.options.showPaginationSwitch&&this.$toolbar.find('button[name="paginationSwitch"]').off("click").on("click",a.proxy(this.togglePagination,this)),this.options.showRefresh&&this.$toolbar.find('button[name="refresh"]').off("click").on("click",a.proxy(this.refresh,this)),this.options.showToggle&&this.$toolbar.find('button[name="toggle"]').off("click").on("click",function(){e.toggleView()}),this.options.showColumns&&(b=this.$toolbar.find(".keep-open"),i<=this.options.minimumCountColumns&&b.find("input").prop("disabled",!0),b.find("li").off("click").on("click",function(a){a.stopImmediatePropagation()}),b.find("input").off("click").on("click",function(){var b=a(this);e.toggleColumn(a(this).val(),b.prop("checked"),!1),e.trigger("column-switch",a(this).data("field"),b.prop("checked"))})),this.options.search&&(f=[],f.push('<div class="pull-'+this.options.searchAlign+' search">',c('<input class="form-control'+c(" input-%s",this.options.iconSize)+'" type="text" placeholder="%s">',this.options.formatSearch()),"</div>"),this.$toolbar.append(f.join("")),d=this.$toolbar.find(".search input"),d.off("keyup drop").on("keyup drop",function(b){e.options.searchOnEnterKey&&13!==b.keyCode||a.inArray(b.keyCode,[37,38,39,40])>-1||(clearTimeout(g),g=setTimeout(function(){e.onSearch(b)},e.options.searchTimeOut))}),n()&&d.off("mouseup").on("mouseup",function(a){clearTimeout(g),g=setTimeout(function(){e.onSearch(a)},e.options.searchTimeOut)}))},p.prototype.onSearch=function(b){var c=a.trim(a(b.currentTarget).val());this.options.trimOnSearch&&a(b.currentTarget).val()!==c&&a(b.currentTarget).val(c),c!==this.searchText&&(this.searchText=c,this.options.searchText=c,this.options.pageNumber=1,this.initSearch(),this.updatePagination(),this.trigger("search",c))},p.prototype.initSearch=function(){var b=this;if("server"!==this.options.sidePagination){if(this.options.customSearch!==a.noop)return void this.options.customSearch.apply(this,[this.searchText]);var c=this.searchText&&(this.options.escape?j(this.searchText):this.searchText).toLowerCase(),d=a.isEmptyObject(this.filterColumns)?null:this.filterColumns;this.data=d?a.grep(this.options.data,function(b){for(var c in d)if(a.isArray(d[c])&&-1===a.inArray(b[c],d[c])||b[c]!==d[c])return!1;return!0}):this.options.data,this.data=c?a.grep(this.data,function(d,f){for(var g=0;g<b.header.fields.length;g++)if(b.header.searchables[g]){var i,j=a.isNumeric(b.header.fields[g])?parseInt(b.header.fields[g],10):b.header.fields[g],k=b.columns[e(b.columns,j)];if("string"==typeof j){i=d;for(var l=j.split("."),m=0;m<l.length;m++)i=i[l[m]];k&&k.searchFormatter&&(i=h(k,b.header.formatters[g],[i,d,f],i))}else i=d[j];if("string"==typeof i||"number"==typeof i)if(b.options.strictSearch){if((i+"").toLowerCase()===c)return!0}else if(-1!==(i+"").toLowerCase().indexOf(c))return!0}return!1}):this.data}},p.prototype.initPagination=function(){if(!this.options.pagination)return void this.$pagination.hide();this.$pagination.show();var b,d,e,f,g,h,i,j,k,l=this,m=[],n=!1,o=this.getData(),p=this.options.pageList;if("server"!==this.options.sidePagination&&(this.options.totalRows=o.length),this.totalPages=0,this.options.totalRows){if(this.options.pageSize===this.options.formatAllRows())this.options.pageSize=this.options.totalRows,n=!0;else if(this.options.pageSize===this.options.totalRows){var q="string"==typeof this.options.pageList?this.options.pageList.replace("[","").replace("]","").replace(/ /g,"").toLowerCase().split(","):this.options.pageList;a.inArray(this.options.formatAllRows().toLowerCase(),q)>-1&&(n=!0)}this.totalPages=~~((this.options.totalRows-1)/this.options.pageSize)+1,this.options.totalPages=this.totalPages}if(this.totalPages>0&&this.options.pageNumber>this.totalPages&&(this.options.pageNumber=this.totalPages),this.pageFrom=(this.options.pageNumber-1)*this.options.pageSize+1,this.pageTo=this.options.pageNumber*this.options.pageSize,this.pageTo>this.options.totalRows&&(this.pageTo=this.options.totalRows),m.push('<div class="pull-'+this.options.paginationDetailHAlign+' pagination-detail">','<span class="pagination-info">',this.options.onlyInfoPagination?this.options.formatDetailPagination(this.options.totalRows):this.options.formatShowingRows(this.pageFrom,this.pageTo,this.options.totalRows),"</span>"),!this.options.onlyInfoPagination){m.push('<span class="page-list">');var r=[c('<span class="btn-group %s">',"top"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?"dropdown":"dropup"),'<button type="button" class="btn'+c(" btn-%s",this.options.buttonsClass)+c(" btn-%s",this.options.iconSize)+' dropdown-toggle" data-toggle="dropdown">','<span class="page-size">',n?this.options.formatAllRows():this.options.pageSize,"</span>",' <span class="caret"></span>',"</button>",'<ul class="dropdown-menu" role="menu">'];if("string"==typeof this.options.pageList){var s=this.options.pageList.replace("[","").replace("]","").replace(/ /g,"").split(",");p=[],a.each(s,function(a,b){p.push(b.toUpperCase()===l.options.formatAllRows().toUpperCase()?l.options.formatAllRows():+b)})}for(a.each(p,function(a,b){if(!l.options.smartDisplay||0===a||p[a-1]<=l.options.totalRows){var d;d=n?b===l.options.formatAllRows()?' class="active"':"":b===l.options.pageSize?' class="active"':"",r.push(c('<li%s><a href="javascript:void(0)">%s</a></li>',d,b))}}),r.push("</ul></span>"),m.push(this.options.formatRecordsPerPage(r.join(""))),m.push("</span>"),m.push("</div>",'<div class="pull-'+this.options.paginationHAlign+' pagination">','<ul class="pagination'+c(" pagination-%s",this.options.iconSize)+'">','<li class="page-pre"><a href="javascript:void(0)">'+this.options.paginationPreText+"</a></li>"),this.totalPages<5?(d=1,e=this.totalPages):(d=this.options.pageNumber-2,e=d+4,1>d&&(d=1,e=5),e>this.totalPages&&(e=this.totalPages,d=e-4)),this.totalPages>=6&&(this.options.pageNumber>=3&&(m.push('<li class="page-first'+(1===this.options.pageNumber?" active":"")+'">','<a href="javascript:void(0)">',1,"</a>","</li>"),d++),this.options.pageNumber>=4&&(4==this.options.pageNumber||6==this.totalPages||7==this.totalPages?d--:m.push('<li class="page-first-separator disabled">','<a href="javascript:void(0)">...</a>',"</li>"),e--)),this.totalPages>=7&&this.options.pageNumber>=this.totalPages-2&&d--,6==this.totalPages?this.options.pageNumber>=this.totalPages-2&&e++:this.totalPages>=7&&(7==this.totalPages||this.options.pageNumber>=this.totalPages-3)&&e++,b=d;e>=b;b++)m.push('<li class="page-number'+(b===this.options.pageNumber?" active":"")+'">','<a href="javascript:void(0)">',b,"</a>","</li>");this.totalPages>=8&&this.options.pageNumber<=this.totalPages-4&&m.push('<li class="page-last-separator disabled">','<a href="javascript:void(0)">...</a>',"</li>"),this.totalPages>=6&&this.options.pageNumber<=this.totalPages-3&&m.push('<li class="page-last'+(this.totalPages===this.options.pageNumber?" active":"")+'">','<a href="javascript:void(0)">',this.totalPages,"</a>","</li>"),m.push('<li class="page-next"><a href="javascript:void(0)">'+this.options.paginationNextText+"</a></li>","</ul>","</div>")}this.$pagination.html(m.join("")),this.options.onlyInfoPagination||(f=this.$pagination.find(".page-list a"),g=this.$pagination.find(".page-first"),h=this.$pagination.find(".page-pre"),i=this.$pagination.find(".page-next"),j=this.$pagination.find(".page-last"),k=this.$pagination.find(".page-number"),this.options.smartDisplay&&(this.totalPages<=1&&this.$pagination.find("div.pagination").hide(),(p.length<2||this.options.totalRows<=p[0])&&this.$pagination.find("span.page-list").hide(),this.$pagination[this.getData().length?"show":"hide"]()),n&&(this.options.pageSize=this.options.formatAllRows()),f.off("click").on("click",a.proxy(this.onPageListChange,this)),g.off("click").on("click",a.proxy(this.onPageFirst,this)),h.off("click").on("click",a.proxy(this.onPagePre,this)),i.off("click").on("click",a.proxy(this.onPageNext,this)),j.off("click").on("click",a.proxy(this.onPageLast,this)),k.off("click").on("click",a.proxy(this.onPageNumber,this)))},p.prototype.updatePagination=function(b){b&&a(b.currentTarget).hasClass("disabled")||(this.options.maintainSelected||this.resetRows(),this.initPagination(),"server"===this.options.sidePagination?this.initServer():this.initBody(),this.trigger("page-change",this.options.pageNumber,this.options.pageSize))},p.prototype.onPageListChange=function(b){var c=a(b.currentTarget);c.parent().addClass("active").siblings().removeClass("active"),this.options.pageSize=c.text().toUpperCase()===this.options.formatAllRows().toUpperCase()?this.options.formatAllRows():+c.text(),this.$toolbar.find(".page-size").text(this.options.pageSize),this.updatePagination(b)},p.prototype.onPageFirst=function(a){this.options.pageNumber=1,this.updatePagination(a)},p.prototype.onPagePre=function(a){this.options.pageNumber-1===0?this.options.pageNumber=this.options.totalPages:this.options.pageNumber--,this.updatePagination(a)},p.prototype.onPageNext=function(a){this.options.pageNumber+1>this.options.totalPages?this.options.pageNumber=1:this.options.pageNumber++,this.updatePagination(a)},p.prototype.onPageLast=function(a){this.options.pageNumber=this.totalPages,this.updatePagination(a)},p.prototype.onPageNumber=function(b){this.options.pageNumber!==+a(b.currentTarget).text()&&(this.options.pageNumber=+a(b.currentTarget).text(),this.updatePagination(b))},p.prototype.initBody=function(b){var f=this,g=[],i=this.getData();this.trigger("pre-body",i),this.$body=this.$el.find(">tbody"),this.$body.length||(this.$body=a("<tbody></tbody>").appendTo(this.$el)),this.options.pagination&&"server"!==this.options.sidePagination||(this.pageFrom=1,this.pageTo=i.length);for(var k=this.pageFrom-1;k<this.pageTo;k++){var l,n=i[k],o={},p=[],q="",r={},s=[];if(o=h(this.options,this.options.rowStyle,[n,k],o),o&&o.css)for(l in o.css)p.push(l+": "+o.css[l]);if(r=h(this.options,this.options.rowAttributes,[n,k],r))for(l in r)s.push(c('%s="%s"',l,j(r[l])));n._data&&!a.isEmptyObject(n._data)&&a.each(n._data,function(a,b){"index"!==a&&(q+=c(' data-%s="%s"',a,b))}),g.push("<tr",c(" %s",s.join(" ")),c(' id="%s"',a.isArray(n)?void 0:n._id),c(' class="%s"',o.classes||(a.isArray(n)?void 0:n._class)),c(' data-index="%s"',k),c(' data-uniqueid="%s"',n[this.options.uniqueId]),c("%s",q),">"),this.options.cardView&&g.push(c('<td colspan="%s"><div class="card-views">',this.header.fields.length)),!this.options.cardView&&this.options.detailView&&g.push("<td>",'<a class="detail-icon" href="javascript:">',c('<i class="%s %s"></i>',this.options.iconsPrefix,this.options.icons.detailOpen),"</a>","</td>"),a.each(this.header.fields,function(b,e){var i="",j=m(n,e,f.options.escape),l="",q={},r="",s=f.header.classes[b],t="",u="",v="",w="",x=f.columns[b];if(!(f.fromHtml&&"undefined"==typeof j||!x.visible||f.options.cardView&&!x.cardVisible)){if(o=c('style="%s"',p.concat(f.header.styles[b]).join("; ")),n["_"+e+"_id"]&&(r=c(' id="%s"',n["_"+e+"_id"])),n["_"+e+"_class"]&&(s=c(' class="%s"',n["_"+e+"_class"])),n["_"+e+"_rowspan"]&&(u=c(' rowspan="%s"',n["_"+e+"_rowspan"])),n["_"+e+"_colspan"]&&(v=c(' colspan="%s"',n["_"+e+"_colspan"])),n["_"+e+"_title"]&&(w=c(' title="%s"',n["_"+e+"_title"])),q=h(f.header,f.header.cellStyles[b],[j,n,k,e],q),q.classes&&(s=c(' class="%s"',q.classes)),q.css){var y=[];for(var z in q.css)y.push(z+": "+q.css[z]);o=c('style="%s"',y.concat(f.header.styles[b]).join("; "))}j=h(x,f.header.formatters[b],[j,n,k],j),n["_"+e+"_data"]&&!a.isEmptyObject(n["_"+e+"_data"])&&a.each(n["_"+e+"_data"],function(a,b){"index"!==a&&(t+=c(' data-%s="%s"',a,b))}),x.checkbox||x.radio?(l=x.checkbox?"checkbox":l,l=x.radio?"radio":l,i=[c(f.options.cardView?'<div class="card-view %s">':'<td class="bs-checkbox %s">',x["class"]||""),"<input"+c(' data-index="%s"',k)+c(' name="%s"',f.options.selectItemName)+c(' type="%s"',l)+c(' value="%s"',n[f.options.idField])+c(' checked="%s"',j===!0||j&&j.checked?"checked":void 0)+c(' disabled="%s"',!x.checkboxEnabled||j&&j.disabled?"disabled":void 0)+" />",f.header.formatters[b]&&"string"==typeof j?j:"",f.options.cardView?"</div>":"</td>"].join(""),n[f.header.stateField]=j===!0||j&&j.checked):(j="undefined"==typeof j||null===j?f.options.undefinedText:j,i=f.options.cardView?['<div class="card-view">',f.options.showHeader?c('<span class="title" %s>%s</span>',o,d(f.columns,"field","title",e)):"",c('<span class="value">%s</span>',j),"</div>"].join(""):[c("<td%s %s %s %s %s %s %s>",r,s,o,t,u,v,w),j,"</td>"].join(""),f.options.cardView&&f.options.smartDisplay&&""===j&&(i='<div class="card-view"></div>')),g.push(i)}}),this.options.cardView&&g.push("</div></td>"),g.push("</tr>")}g.length||g.push('<tr class="no-records-found">',c('<td colspan="%s">%s</td>',this.$header.find("th").length,this.options.formatNoMatches()),"</tr>"),this.$body.html(g.join("")),b||this.scrollTo(0),this.$body.find("> tr[data-index] > td").off("click dblclick").on("click dblclick",function(b){var d=a(this),g=d.parent(),h=f.data[g.data("index")],i=d[0].cellIndex,j=f.getVisibleFields(),k=j[f.options.detailView&&!f.options.cardView?i-1:i],l=f.columns[e(f.columns,k)],n=m(h,k,f.options.escape);if(!d.find(".detail-icon").length&&(f.trigger("click"===b.type?"click-cell":"dbl-click-cell",k,n,h,d),f.trigger("click"===b.type?"click-row":"dbl-click-row",h,g,k),
+"click"===b.type&&f.options.clickToSelect&&l.clickToSelect)){var o=g.find(c('[name="%s"]',f.options.selectItemName));o.length&&o[0].click()}}),this.$body.find("> tr[data-index] > td > .detail-icon").off("click").on("click",function(){var b=a(this),d=b.parent().parent(),e=d.data("index"),g=i[e];if(d.next().is("tr.detail-view"))b.find("i").attr("class",c("%s %s",f.options.iconsPrefix,f.options.icons.detailOpen)),d.next().remove(),f.trigger("collapse-row",e,g);else{b.find("i").attr("class",c("%s %s",f.options.iconsPrefix,f.options.icons.detailClose)),d.after(c('<tr class="detail-view"><td colspan="%s"></td></tr>',d.find("td").length));var j=d.next().find("td"),k=h(f.options,f.options.detailFormatter,[e,g,j],"");1===j.length&&j.append(k),f.trigger("expand-row",e,g,j)}f.resetView()}),this.$selectItem=this.$body.find(c('[name="%s"]',this.options.selectItemName)),this.$selectItem.off("click").on("click",function(b){b.stopImmediatePropagation();var c=a(this),d=c.prop("checked"),e=f.data[c.data("index")];f.options.maintainSelected&&a(this).is(":radio")&&a.each(f.options.data,function(a,b){b[f.header.stateField]=!1}),e[f.header.stateField]=d,f.options.singleSelect&&(f.$selectItem.not(this).each(function(){f.data[a(this).data("index")][f.header.stateField]=!1}),f.$selectItem.filter(":checked").not(this).prop("checked",!1)),f.updateSelected(),f.trigger(d?"check":"uncheck",e,c)}),a.each(this.header.events,function(b,c){if(c){"string"==typeof c&&(c=h(null,c));var d=f.header.fields[b],e=a.inArray(d,f.getVisibleFields());f.options.detailView&&!f.options.cardView&&(e+=1);for(var g in c)f.$body.find(">tr:not(.no-records-found)").each(function(){var b=a(this),h=b.find(f.options.cardView?".card-view":"td").eq(e),i=g.indexOf(" "),j=g.substring(0,i),k=g.substring(i+1),l=c[g];h.find(k).off(j).on(j,function(a){var c=b.data("index"),e=f.data[c],g=e[d];l.apply(this,[a,g,e,c])})})}}),this.updateSelected(),this.resetView(),this.trigger("post-body",i)},p.prototype.initServer=function(b,c,d){var e,f=this,g={},i={searchText:this.searchText,sortName:this.options.sortName,sortOrder:this.options.sortOrder};this.options.pagination&&(i.pageSize=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize,i.pageNumber=this.options.pageNumber),(d||this.options.url||this.options.ajax)&&("limit"===this.options.queryParamsType&&(i={search:i.searchText,sort:i.sortName,order:i.sortOrder},this.options.pagination&&(i.offset=this.options.pageSize===this.options.formatAllRows()?0:this.options.pageSize*(this.options.pageNumber-1),i.limit=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize)),a.isEmptyObject(this.filterColumnsPartial)||(i.filter=JSON.stringify(this.filterColumnsPartial,null)),g=h(this.options,this.options.queryParams,[i],g),a.extend(g,c||{}),g!==!1&&(b||this.$tableLoading.show(),e=a.extend({},h(null,this.options.ajaxOptions),{type:this.options.method,url:d||this.options.url,data:"application/json"===this.options.contentType&&"post"===this.options.method?JSON.stringify(g):g,cache:this.options.cache,contentType:this.options.contentType,dataType:this.options.dataType,success:function(a){a=h(f.options,f.options.responseHandler,[a],a),f.load(a),f.trigger("load-success",a),b||f.$tableLoading.hide()},error:function(a){f.trigger("load-error",a.status,a),b||f.$tableLoading.hide()}}),this.options.ajax?h(this,this.options.ajax,[e],null):(this._xhr&&4!==this._xhr.readyState&&this._xhr.abort(),this._xhr=a.ajax(e))))},p.prototype.initSearchText=function(){if(this.options.search&&""!==this.options.searchText){var a=this.$toolbar.find(".search input");a.val(this.options.searchText),this.onSearch({currentTarget:a})}},p.prototype.getCaret=function(){var b=this;a.each(this.$header.find("th"),function(c,d){a(d).find(".sortable").removeClass("desc asc").addClass(a(d).data("field")===b.options.sortName?b.options.sortOrder:"both")})},p.prototype.updateSelected=function(){var b=this.$selectItem.filter(":enabled").length&&this.$selectItem.filter(":enabled").length===this.$selectItem.filter(":enabled").filter(":checked").length;this.$selectAll.add(this.$selectAll_).prop("checked",b),this.$selectItem.each(function(){a(this).closest("tr")[a(this).prop("checked")?"addClass":"removeClass"]("selected")})},p.prototype.updateRows=function(){var b=this;this.$selectItem.each(function(){b.data[a(this).data("index")][b.header.stateField]=a(this).prop("checked")})},p.prototype.resetRows=function(){var b=this;a.each(this.data,function(a,c){b.$selectAll.prop("checked",!1),b.$selectItem.prop("checked",!1),b.header.stateField&&(c[b.header.stateField]=!1)})},p.prototype.trigger=function(b){var c=Array.prototype.slice.call(arguments,1);b+=".bs.table",this.options[p.EVENTS[b]].apply(this.options,c),this.$el.trigger(a.Event(b),c),this.options.onAll(b,c),this.$el.trigger(a.Event("all.bs.table"),[b,c])},p.prototype.resetHeader=function(){clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(a.proxy(this.fitHeader,this),this.$el.is(":hidden")?100:0)},p.prototype.fitHeader=function(){var b,d,e,f,h=this;if(h.$el.is(":hidden"))return void(h.timeoutId_=setTimeout(a.proxy(h.fitHeader,h),100));if(b=this.$tableBody.get(0),d=b.scrollWidth>b.clientWidth&&b.scrollHeight>b.clientHeight+this.$header.outerHeight()?g():0,this.$el.css("margin-top",-this.$header.outerHeight()),e=a(":focus"),e.length>0){var i=e.parents("th");if(i.length>0){var j=i.attr("data-field");if(void 0!==j){var k=this.$header.find("[data-field='"+j+"']");k.length>0&&k.find(":input").addClass("focus-temp")}}}this.$header_=this.$header.clone(!0,!0),this.$selectAll_=this.$header_.find('[name="btSelectAll"]'),this.$tableHeader.css({"margin-right":d}).find("table").css("width",this.$el.outerWidth()).html("").attr("class",this.$el.attr("class")).append(this.$header_),f=a(".focus-temp:visible:eq(0)"),f.length>0&&(f.focus(),this.$header.find(".focus-temp").removeClass("focus-temp")),this.$header.find("th[data-field]").each(function(){h.$header_.find(c('th[data-field="%s"]',a(this).data("field"))).data(a(this).data())});var l=this.getVisibleFields(),m=this.$header_.find("th");this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(b){var d=a(this),e=b;h.options.detailView&&!h.options.cardView&&(0===b&&h.$header_.find("th.detail").find(".fht-cell").width(d.innerWidth()),e=b-1);var f=h.$header_.find(c('th[data-field="%s"]',l[e]));f.length>1&&(f=a(m[d[0].cellIndex])),f.find(".fht-cell").width(d.innerWidth())}),this.$tableBody.off("scroll").on("scroll",function(){h.$tableHeader.scrollLeft(a(this).scrollLeft()),h.options.showFooter&&!h.options.cardView&&h.$tableFooter.scrollLeft(a(this).scrollLeft())}),h.trigger("post-header")},p.prototype.resetFooter=function(){var b=this,d=b.getData(),e=[];this.options.showFooter&&!this.options.cardView&&(!this.options.cardView&&this.options.detailView&&e.push('<td><div class="th-inner">&nbsp;</div><div class="fht-cell"></div></td>'),a.each(this.columns,function(a,f){var g,i="",j="",k=[],l={},m=c(' class="%s"',f["class"]);if(f.visible&&(!b.options.cardView||f.cardVisible)){if(i=c("text-align: %s; ",f.falign?f.falign:f.align),j=c("vertical-align: %s; ",f.valign),l=h(null,b.options.footerStyle),l&&l.css)for(g in l.css)k.push(g+": "+l.css[g]);e.push("<td",m,c(' style="%s"',i+j+k.concat().join("; ")),">"),e.push('<div class="th-inner">'),e.push(h(f,f.footerFormatter,[d],"&nbsp;")||"&nbsp;"),e.push("</div>"),e.push('<div class="fht-cell"></div>'),e.push("</div>"),e.push("</td>")}}),this.$tableFooter.find("tr").html(e.join("")),this.$tableFooter.show(),clearTimeout(this.timeoutFooter_),this.timeoutFooter_=setTimeout(a.proxy(this.fitFooter,this),this.$el.is(":hidden")?100:0))},p.prototype.fitFooter=function(){var b,c,d;return clearTimeout(this.timeoutFooter_),this.$el.is(":hidden")?void(this.timeoutFooter_=setTimeout(a.proxy(this.fitFooter,this),100)):(c=this.$el.css("width"),d=c>this.$tableBody.width()?g():0,this.$tableFooter.css({"margin-right":d}).find("table").css("width",c).attr("class",this.$el.attr("class")),b=this.$tableFooter.find("td"),void this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(c){var d=a(this);b.eq(c).find(".fht-cell").width(d.innerWidth())}))},p.prototype.toggleColumn=function(a,b,d){if(-1!==a&&(this.columns[a].visible=b,this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns)){var e=this.$toolbar.find(".keep-open input").prop("disabled",!1);d&&e.filter(c('[value="%s"]',a)).prop("checked",b),e.filter(":checked").length<=this.options.minimumCountColumns&&e.filter(":checked").prop("disabled",!0)}},p.prototype.toggleRow=function(a,b,d){-1!==a&&this.$body.find("undefined"!=typeof a?c('tr[data-index="%s"]',a):c('tr[data-uniqueid="%s"]',b))[d?"show":"hide"]()},p.prototype.getVisibleFields=function(){var b=this,c=[];return a.each(this.header.fields,function(a,d){var f=b.columns[e(b.columns,d)];f.visible&&c.push(d)}),c},p.prototype.resetView=function(a){var b=0;if(a&&a.height&&(this.options.height=a.height),this.$selectAll.prop("checked",this.$selectItem.length>0&&this.$selectItem.length===this.$selectItem.filter(":checked").length),this.options.height){var c=k(this.$toolbar),d=k(this.$pagination),e=this.options.height-c-d;this.$tableContainer.css("height",e+"px")}return this.options.cardView?(this.$el.css("margin-top","0"),this.$tableContainer.css("padding-bottom","0"),void this.$tableFooter.hide()):(this.options.showHeader&&this.options.height?(this.$tableHeader.show(),this.resetHeader(),b+=this.$header.outerHeight()):(this.$tableHeader.hide(),this.trigger("post-header")),this.options.showFooter&&(this.resetFooter(),this.options.height&&(b+=this.$tableFooter.outerHeight()+1)),this.getCaret(),this.$tableContainer.css("padding-bottom",b+"px"),void this.trigger("reset-view"))},p.prototype.getData=function(b){return!this.searchText&&a.isEmptyObject(this.filterColumns)&&a.isEmptyObject(this.filterColumnsPartial)?b?this.options.data.slice(this.pageFrom-1,this.pageTo):this.options.data:b?this.data.slice(this.pageFrom-1,this.pageTo):this.data},p.prototype.load=function(b){var c=!1;"server"===this.options.sidePagination?(this.options.totalRows=b.total,c=b.fixedScroll,b=b[this.options.dataField]):a.isArray(b)||(c=b.fixedScroll,b=b.data),this.initData(b),this.initSearch(),this.initPagination(),this.initBody(c)},p.prototype.append=function(a){this.initData(a,"append"),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},p.prototype.prepend=function(a){this.initData(a,"prepend"),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},p.prototype.remove=function(b){var c,d,e=this.options.data.length;if(b.hasOwnProperty("field")&&b.hasOwnProperty("values")){for(c=e-1;c>=0;c--)d=this.options.data[c],d.hasOwnProperty(b.field)&&-1!==a.inArray(d[b.field],b.values)&&this.options.data.splice(c,1);e!==this.options.data.length&&(this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0))}},p.prototype.removeAll=function(){this.options.data.length>0&&(this.options.data.splice(0,this.options.data.length),this.initSearch(),this.initPagination(),this.initBody(!0))},p.prototype.getRowByUniqueId=function(a){var b,c,d,e=this.options.uniqueId,f=this.options.data.length,g=null;for(b=f-1;b>=0;b--){if(c=this.options.data[b],c.hasOwnProperty(e))d=c[e];else{if(!c._data.hasOwnProperty(e))continue;d=c._data[e]}if("string"==typeof d?a=a.toString():"number"==typeof d&&(Number(d)===d&&d%1===0?a=parseInt(a):d===Number(d)&&0!==d&&(a=parseFloat(a))),d===a){g=c;break}}return g},p.prototype.removeByUniqueId=function(a){var b=this.options.data.length,c=this.getRowByUniqueId(a);c&&this.options.data.splice(this.options.data.indexOf(c),1),b!==this.options.data.length&&(this.initSearch(),this.initPagination(),this.initBody(!0))},p.prototype.updateByUniqueId=function(b){var c=this,d=a.isArray(b)?b:[b];a.each(d,function(b,d){var e;d.hasOwnProperty("id")&&d.hasOwnProperty("row")&&(e=a.inArray(c.getRowByUniqueId(d.id),c.options.data),-1!==e&&a.extend(c.options.data[e],d.row))}),this.initSearch(),this.initSort(),this.initBody(!0)},p.prototype.insertRow=function(a){a.hasOwnProperty("index")&&a.hasOwnProperty("row")&&(this.data.splice(a.index,0,a.row),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0))},p.prototype.updateRow=function(b){var c=this,d=a.isArray(b)?b:[b];a.each(d,function(b,d){d.hasOwnProperty("index")&&d.hasOwnProperty("row")&&a.extend(c.options.data[d.index],d.row)}),this.initSearch(),this.initSort(),this.initBody(!0)},p.prototype.showRow=function(a){(a.hasOwnProperty("index")||a.hasOwnProperty("uniqueId"))&&this.toggleRow(a.index,a.uniqueId,!0)},p.prototype.hideRow=function(a){(a.hasOwnProperty("index")||a.hasOwnProperty("uniqueId"))&&this.toggleRow(a.index,a.uniqueId,!1)},p.prototype.getRowsHidden=function(b){var c=a(this.$body[0]).children().filter(":hidden"),d=0;if(b)for(;d<c.length;d++)a(c[d]).show();return c},p.prototype.mergeCells=function(b){var c,d,e,f=b.index,g=a.inArray(b.field,this.getVisibleFields()),h=b.rowspan||1,i=b.colspan||1,j=this.$body.find(">tr");if(this.options.detailView&&!this.options.cardView&&(g+=1),e=j.eq(f).find(">td").eq(g),!(0>f||0>g||f>=this.data.length)){for(c=f;f+h>c;c++)for(d=g;g+i>d;d++)j.eq(c).find(">td").eq(d).hide();e.attr("rowspan",h).attr("colspan",i).show()}},p.prototype.updateCell=function(a){a.hasOwnProperty("index")&&a.hasOwnProperty("field")&&a.hasOwnProperty("value")&&(this.data[a.index][a.field]=a.value,a.reinit!==!1&&(this.initSort(),this.initBody(!0)))},p.prototype.getOptions=function(){return this.options},p.prototype.getSelections=function(){var b=this;return a.grep(this.options.data,function(a){return a[b.header.stateField]})},p.prototype.getAllSelections=function(){var b=this;return a.grep(this.options.data,function(a){return a[b.header.stateField]})},p.prototype.checkAll=function(){this.checkAll_(!0)},p.prototype.uncheckAll=function(){this.checkAll_(!1)},p.prototype.checkInvert=function(){var b=this,c=b.$selectItem.filter(":enabled"),d=c.filter(":checked");c.each(function(){a(this).prop("checked",!a(this).prop("checked"))}),b.updateRows(),b.updateSelected(),b.trigger("uncheck-some",d),d=b.getSelections(),b.trigger("check-some",d)},p.prototype.checkAll_=function(a){var b;a||(b=this.getSelections()),this.$selectAll.add(this.$selectAll_).prop("checked",a),this.$selectItem.filter(":enabled").prop("checked",a),this.updateRows(),a&&(b=this.getSelections()),this.trigger(a?"check-all":"uncheck-all",b)},p.prototype.check=function(a){this.check_(!0,a)},p.prototype.uncheck=function(a){this.check_(!1,a)},p.prototype.check_=function(a,b){var d=this.$selectItem.filter(c('[data-index="%s"]',b)).prop("checked",a);this.data[b][this.header.stateField]=a,this.updateSelected(),this.trigger(a?"check":"uncheck",this.data[b],d)},p.prototype.checkBy=function(a){this.checkBy_(!0,a)},p.prototype.uncheckBy=function(a){this.checkBy_(!1,a)},p.prototype.checkBy_=function(b,d){if(d.hasOwnProperty("field")&&d.hasOwnProperty("values")){var e=this,f=[];a.each(this.options.data,function(g,h){if(!h.hasOwnProperty(d.field))return!1;if(-1!==a.inArray(h[d.field],d.values)){var i=e.$selectItem.filter(":enabled").filter(c('[data-index="%s"]',g)).prop("checked",b);h[e.header.stateField]=b,f.push(h),e.trigger(b?"check":"uncheck",h,i)}}),this.updateSelected(),this.trigger(b?"check-some":"uncheck-some",f)}},p.prototype.destroy=function(){this.$el.insertBefore(this.$container),a(this.options.toolbar).insertBefore(this.$el),this.$container.next().remove(),this.$container.remove(),this.$el.html(this.$el_.html()).css("margin-top","0").attr("class",this.$el_.attr("class")||"")},p.prototype.showLoading=function(){this.$tableLoading.show()},p.prototype.hideLoading=function(){this.$tableLoading.hide()},p.prototype.togglePagination=function(){this.options.pagination=!this.options.pagination;var a=this.$toolbar.find('button[name="paginationSwitch"] i');this.options.pagination?a.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchDown):a.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchUp),this.updatePagination()},p.prototype.refresh=function(a){a&&a.url&&(this.options.pageNumber=1),this.initServer(a&&a.silent,a&&a.query,a&&a.url),this.trigger("refresh",a)},p.prototype.resetWidth=function(){this.options.showHeader&&this.options.height&&this.fitHeader(),this.options.showFooter&&this.fitFooter()},p.prototype.showColumn=function(a){this.toggleColumn(e(this.columns,a),!0,!0)},p.prototype.hideColumn=function(a){this.toggleColumn(e(this.columns,a),!1,!0)},p.prototype.getHiddenColumns=function(){return a.grep(this.columns,function(a){return!a.visible})},p.prototype.getVisibleColumns=function(){return a.grep(this.columns,function(a){return a.visible})},p.prototype.toggleAllColumns=function(b){if(a.each(this.columns,function(a){this.columns[a].visible=b}),this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns){var c=this.$toolbar.find(".keep-open input").prop("disabled",!1);c.filter(":checked").length<=this.options.minimumCountColumns&&c.filter(":checked").prop("disabled",!0)}},p.prototype.showAllColumns=function(){this.toggleAllColumns(!0)},p.prototype.hideAllColumns=function(){this.toggleAllColumns(!1)},p.prototype.filterBy=function(b){this.filterColumns=a.isEmptyObject(b)?{}:b,this.options.pageNumber=1,this.initSearch(),this.updatePagination()},p.prototype.scrollTo=function(a){return"string"==typeof a&&(a="bottom"===a?this.$tableBody[0].scrollHeight:0),"number"==typeof a&&this.$tableBody.scrollTop(a),"undefined"==typeof a?this.$tableBody.scrollTop():void 0},p.prototype.getScrollPosition=function(){return this.scrollTo()},p.prototype.selectPage=function(a){a>0&&a<=this.options.totalPages&&(this.options.pageNumber=a,this.updatePagination())},p.prototype.prevPage=function(){this.options.pageNumber>1&&(this.options.pageNumber--,this.updatePagination())},p.prototype.nextPage=function(){this.options.pageNumber<this.options.totalPages&&(this.options.pageNumber++,this.updatePagination())},p.prototype.toggleView=function(){this.options.cardView=!this.options.cardView,this.initHeader(),this.initBody(),this.trigger("toggle",this.options.cardView)},p.prototype.refreshOptions=function(b){i(this.options,b,!0)||(this.options=a.extend(this.options,b),this.trigger("refresh-options",this.options),this.destroy(),this.init())},p.prototype.resetSearch=function(a){var b=this.$toolbar.find(".search input");b.val(a||""),this.onSearch({currentTarget:b})},p.prototype.expandRow_=function(a,b){var d=this.$body.find(c('> tr[data-index="%s"]',b));d.next().is("tr.detail-view")===(a?!1:!0)&&d.find("> td > .detail-icon").click()},p.prototype.expandRow=function(a){this.expandRow_(!0,a)},p.prototype.collapseRow=function(a){this.expandRow_(!1,a)},p.prototype.expandAllRows=function(b){if(b){var d=this.$body.find(c('> tr[data-index="%s"]',0)),e=this,f=null,g=!1,h=-1;if(d.next().is("tr.detail-view")?d.next().next().is("tr.detail-view")||(d.next().find(".detail-icon").click(),g=!0):(d.find("> td > .detail-icon").click(),g=!0),g)try{h=setInterval(function(){f=e.$body.find("tr.detail-view").last().find(".detail-icon"),f.length>0?f.click():clearInterval(h)},1)}catch(i){clearInterval(h)}}else for(var j=this.$body.children(),k=0;k<j.length;k++)this.expandRow_(!0,a(j[k]).data("index"))},p.prototype.collapseAllRows=function(b){if(b)this.expandRow_(!1,0);else for(var c=this.$body.children(),d=0;d<c.length;d++)this.expandRow_(!1,a(c[d]).data("index"))},p.prototype.updateFormatText=function(a,b){this.options[c("format%s",a)]&&("string"==typeof b?this.options[c("format%s",a)]=function(){return b}:"function"==typeof b&&(this.options[c("format%s",a)]=b)),this.initToolbar(),this.initPagination(),this.initBody()};var q=["getOptions","getSelections","getAllSelections","getData","load","append","prepend","remove","removeAll","insertRow","updateRow","updateCell","updateByUniqueId","removeByUniqueId","getRowByUniqueId","showRow","hideRow","getRowsHidden","mergeCells","checkAll","uncheckAll","checkInvert","check","uncheck","checkBy","uncheckBy","refresh","resetView","resetWidth","destroy","showLoading","hideLoading","showColumn","hideColumn","getHiddenColumns","getVisibleColumns","showAllColumns","hideAllColumns","filterBy","scrollTo","getScrollPosition","selectPage","prevPage","nextPage","togglePagination","toggleView","refreshOptions","resetSearch","expandRow","collapseRow","expandAllRows","collapseAllRows","updateFormatText"];a.fn.bootstrapTable=function(b){var c,d=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=a(this),f=e.data("bootstrap.table"),g=a.extend({},p.DEFAULTS,e.data(),"object"==typeof b&&b);if("string"==typeof b){if(a.inArray(b,q)<0)throw new Error("Unknown method: "+b);if(!f)return;c=f[b].apply(f,d),"destroy"===b&&e.removeData("bootstrap.table")}f||e.data("bootstrap.table",f=new p(this,g))}),"undefined"==typeof c?this:c},a.fn.bootstrapTable.Constructor=p,a.fn.bootstrapTable.defaults=p.DEFAULTS,a.fn.bootstrapTable.columnDefaults=p.COLUMN_DEFAULTS,a.fn.bootstrapTable.locales=p.LOCALES,a.fn.bootstrapTable.methods=q,a.fn.bootstrapTable.utils={sprintf:c,getFieldIndex:e,compareObjects:i,calculateObjectValue:h,getItemField:m,objectKeys:o,isIEBrowser:n},a(function(){a('[data-toggle="table"]').bootstrapTable()})}(jQuery); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/js/bootstrap.min.js b/common/src/main/webapp/thirdparty/js/bootstrap.min.js
new file mode 100644
index 0000000..b04a0e8
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/js/bootstrap.min.js
@@ -0,0 +1,6 @@
+/*!
+ * Bootstrap v3.1.1 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown",h),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=" li:not(.divider):visible a",i=f.find("[role=menu]"+h+", [role=listbox]"+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j<i.length-1&&j++,~j||(j=0),i.eq(j).focus()}}}};var g=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new f(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=f,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=g,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",e,f.prototype.toggle).on("keydown.bs.dropdown.data-api",e+", [role=menu], [role=listbox]",f.prototype.keydown)}(jQuery),+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};b.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isShown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body),c.$element.show().scrollTop(0),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulateTransitionEnd(300):c.$element.focus().trigger(e)}))},b.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},b.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.focus()},this))},b.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());c.is("a")&&b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this,d=this.tip();this.setContent(),this.options.animation&&d.addClass("fade");var e="function"==typeof this.options.placement?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,f=/\s?auto?\s?/i,g=f.test(e);g&&(e=e.replace(f,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(e),this.options.container?d.appendTo(this.options.container):d.insertAfter(this.$element);var h=this.getPosition(),i=d[0].offsetWidth,j=d[0].offsetHeight;if(g){var k=this.$element.parent(),l=e,m=document.documentElement.scrollTop||document.body.scrollTop,n="body"==this.options.container?window.innerWidth:k.outerWidth(),o="body"==this.options.container?window.innerHeight:k.outerHeight(),p="body"==this.options.container?0:k.offset().left;e="bottom"==e&&h.top+h.height+j-m>o?"top":"top"==e&&h.top-m-j<0?"bottom":"right"==e&&h.right+i>n?"left":"left"==e&&h.left-i<p?"right":e,d.removeClass(l).addClass(e)}var q=this.getCalculatedOffset(e,h,i,j);this.applyPlacement(q,e),this.hoverState=null;var r=function(){c.$element.trigger("shown.bs."+c.type)};a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,r).emulateTransitionEnd(150):r()}},b.prototype.applyPlacement=function(b,c){var d,e=this.tip(),f=e[0].offsetWidth,g=e[0].offsetHeight,h=parseInt(e.css("margin-top"),10),i=parseInt(e.css("margin-left"),10);isNaN(h)&&(h=0),isNaN(i)&&(i=0),b.top=b.top+h,b.left=b.left+i,a.offset.setOffset(e[0],a.extend({using:function(a){e.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),e.addClass("in");var j=e[0].offsetWidth,k=e[0].offsetHeight;if("top"==c&&k!=g&&(d=!0,b.top=b.top+g-k),/bottom|top/.test(c)){var l=0;b.left<0&&(l=-2*b.left,b.left=0,e.offset(b),j=e[0].offsetWidth,k=e[0].offsetHeight),this.replaceArrow(l-f+j,j,"left")}else this.replaceArrow(k-g,k,"top");d&&e.offset(b)},b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},b.prototype.hide=function(){function b(){"in"!=c.hoverState&&d.detach(),c.$element.trigger("hidden.bs."+c.type)}var c=this,d=this.tip(),e=a.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(d.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,b).emulateTransitionEnd(150):b(),this.hoverState=null,this)},b.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},b.prototype.hasContent=function(){return this.getTitle()},b.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},b.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},b.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},b.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},b.prototype.enable=function(){this.enabled=!0},b.prototype.disable=function(){this.enabled=!1},b.prototype.toggleEnabled=function(){this.enabled=!this.enabled},b.prototype.toggle=function(b){var c=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;c.tip().hasClass("in")?c.leave(c):c.enter(c)},b.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.tooltip",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.tooltip.Constructor=b,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(jQuery),+function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");b.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/js/core/const.js b/common/src/main/webapp/thirdparty/js/core/const.js
new file mode 100644
index 0000000..66bee91
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/js/core/const.js
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2016, CMCC Technologies Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+var fMenuSiderDivId = 'page-f-sidebar-menu';
+var ICTFRAME_CONST_SPINNER_GIF_PATH="image/loading-spinner-grey.gif";
+var ICTFRAME_CONST_IFRAME_HEIGHT_AJUST = 10;
+var ICTFRAME_CONST_IFRAME_HEIGHT_AJUST_IE = 5;
+var ICTFRAME_CONST_THEME_COLOR_CSS_PREFFIX = "css/themes/";
+var ICTFRAME_CONST_DEFAULTPAGE_PATH = "default.html?";
+var ICTFRAME_CONST_DATABACKUP_PATH = 'menus/dataBackup-mysql.html';
+var IS_V5_TESTVERSION = true;
+
+var FrameConst={};
+//ĬÈϵǼ³É¹¦ÌøתҳÃæ
+FrameConst.DEFAULT_LOGINSKIP_PAGE = "common/main-page.html";
+FrameConst.DEFAULT_PAGE = "default.html";
+
+FrameConst.do_heartbeat = false;
+FrameConst.change_pass = false;
+//ÊÇ·ñ¼ÓÃÜ
+FrameConst.isEncypt = "false";
+FrameConst.REST_FRAMECOMMIFO = "../../api/uiframe/v1/frameCommInfo";
+FrameConst.REST_HEARTBEAT = "../../api/uiframe/v1/heartbeat";
+FrameConst.REST_GETLICENSEINFO = "../../api/uiframe/v1/licensevalueinfo";
+FrameConst.REST_CHECKRIGHT = "../../api/uiframe/v1/checkRight";
+FrameConst.REST_LOGIN = "../../api/uiframe/v1/login";
+FrameConst.REST_GET_FRAME_MENUDIRECTION = "../../api/uiframe/v1/confByKey?key=usf.mainframe.web.navigation.direction";
+FrameConst.REST_GET_USERNAME = "../../api/uiframe/v1/userName";
+
+
+FrameConst.REST_GET_VERSIONINFO = "../../api/uiframe/v1/versionInfo";
+var zte_http_headers=new Array();
+zte_http_headers.push({"key":"ICTAuthentication","value":"icttka","store":true});
+zte_http_headers.push({"key":"isFromWeb","value":"1","store":false}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/js/core/hk.min.js b/common/src/main/webapp/thirdparty/js/core/hk.min.js
new file mode 100644
index 0000000..73ab7f2
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/js/core/hk.min.js
@@ -0,0 +1,819 @@
+/*
+ * Copyright 2016, CMCC Technologies Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+;(function(window, define) {
+ var _ = {
+ version: "2.3.0",
+ areas: {},
+ apis: {},
+
+ // utilities
+ inherit: function(api, o) {
+ for (var p in api) {
+ if (!o.hasOwnProperty(p)) {
+ o[p] = api[p];
+ }
+ }
+ return o;
+ },
+ stringify: function(d) {
+ return d === undefined || typeof d === "function" ? d+'' : JSON.stringify(d);
+ },
+ parse: function(s) {
+ // if it doesn't parse, return as is
+ try{ return JSON.parse(s); }catch(e){ return s; }
+ },
+
+ // extension hooks
+ fn: function(name, fn) {
+ _.storeAPI[name] = fn;
+ for (var api in _.apis) {
+ _.apis[api][name] = fn;
+ }
+ },
+ get: function(area, key){ return area.getItem(key); },
+ set: function(area, key, string){ area.setItem(key, string); },
+ remove: function(area, key){ area.removeItem(key); },
+ key: function(area, i){ return area.key(i); },
+ length: function(area){ return area.length; },
+ clear: function(area){ area.clear(); },
+
+ // core functions
+ Store: function(id, area, namespace) {
+ var store = _.inherit(_.storeAPI, function(key, data, overwrite) {
+ if (arguments.length === 0){ return store.getAll(); }
+ if (data !== undefined){ return store.set(key, data, overwrite); }
+ if (typeof key === "string"){ return store.get(key); }
+ if (!key){ return store.clear(); }
+ return store.setAll(key, data);// overwrite=data, data=key
+ });
+ store._id = id;
+ try {
+ var testKey = '_safariPrivate_';
+ area.setItem(testKey, 'sucks');
+ store._area = area;
+ area.removeItem(testKey);
+ } catch (e) {}
+ if (!store._area) {
+ store._area = _.inherit(_.storageAPI, { items: {}, name: 'fake' });
+ }
+ store._ns = namespace || '';
+ if (!_.areas[id]) {
+ _.areas[id] = store._area;
+ }
+ if (!_.apis[store._ns+store._id]) {
+ _.apis[store._ns+store._id] = store;
+ }
+ return store;
+ },
+ storeAPI: {
+ // admin functions
+ area: function(id, area) {
+ var store = this[id];
+ if (!store || !store.area) {
+ store = _.Store(id, area, this._ns);//new area-specific api in this namespace
+ if (!this[id]){ this[id] = store; }
+ }
+ return store;
+ },
+ namespace: function(namespace, noSession) {
+ if (!namespace){
+ return this._ns ? this._ns.substring(0,this._ns.length-1) : '';
+ }
+ var ns = namespace, store = this[ns];
+ if (!store || !store.namespace) {
+ store = _.Store(this._id, this._area, this._ns+ns+'.');//new namespaced api
+ if (!this[ns]){ this[ns] = store; }
+ if (!noSession){ store.area('session', _.areas.session); }
+ }
+ return store;
+ },
+ isFake: function(){ return this._area.name === 'fake'; },
+ toString: function() {
+ return 'store'+(this._ns?'.'+this.namespace():'')+'['+this._id+']';
+ },
+
+ // storage functions
+ has: function(key) {
+ if (this._area.has) {
+ return this._area.has(this._in(key));//extension hook
+ }
+ return !!(this._in(key) in this._area);
+ },
+ size: function(){ return this.keys().length; },
+ each: function(fn, and) {
+ for (var i=0, m=_.length(this._area); i<m; i++) {
+ var key = this._out(_.key(this._area, i));
+ if (key !== undefined) {
+ if (fn.call(this, key, and || this.get(key)) === false) {
+ break;
+ }
+ }
+ if (m > _.length(this._area)) { m--; i--; }// in case of removeItem
+ }
+ return and || this;
+ },
+ keys: function() {
+ return this.each(function(k, list){ list.push(k); }, []);
+ },
+ get: function(key, alt) {
+ var s = _.get(this._area, this._in(key));
+ return s !== null ? _.parse(s) : alt || s;// support alt for easy default mgmt
+ },
+ getAll: function() {
+ return this.each(function(k, all){ all[k] = this.get(k); }, {});
+ },
+ set: function(key, data, overwrite) {
+ var d = this.get(key);
+ if (d != null && overwrite === false) {
+ return data;
+ }
+ return _.set(this._area, this._in(key), _.stringify(data), overwrite) || d;
+ },
+ setAll: function(data, overwrite) {
+ var changed, val;
+ for (var key in data) {
+ val = data[key];
+ if (this.set(key, val, overwrite) !== val) {
+ changed = true;
+ }
+ }
+ return changed;
+ },
+ remove: function(key) {
+ var d = this.get(key);
+ _.remove(this._area, this._in(key));
+ return d;
+ },
+ clear: function() {
+ if (!this._ns) {
+ _.clear(this._area);
+ } else {
+ this.each(function(k){ _.remove(this._area, this._in(k)); }, 1);
+ }
+ return this;
+ },
+ clearAll: function() {
+ var area = this._area;
+ for (var id in _.areas) {
+ if (_.areas.hasOwnProperty(id)) {
+ this._area = _.areas[id];
+ this.clear();
+ }
+ }
+ this._area = area;
+ return this;
+ },
+
+ // internal use functions
+ _in: function(k) {
+ if (typeof k !== "string"){ k = _.stringify(k); }
+ return this._ns ? this._ns + k : k;
+ },
+ _out: function(k) {
+ return this._ns ?
+ k && k.indexOf(this._ns) === 0 ?
+ k.substring(this._ns.length) :
+ undefined : // so each() knows to skip it
+ k;
+ }
+ },// end _.storeAPI
+ storageAPI: {
+ length: 0,
+ has: function(k){ return this.items.hasOwnProperty(k); },
+ key: function(i) {
+ var c = 0;
+ for (var k in this.items){
+ if (this.has(k) && i === c++) {
+ return k;
+ }
+ }
+ },
+ setItem: function(k, v) {
+ if (!this.has(k)) {
+ this.length++;
+ }
+ this.items[k] = v;
+ },
+ removeItem: function(k) {
+ if (this.has(k)) {
+ delete this.items[k];
+ this.length--;
+ }
+ },
+ getItem: function(k){ return this.has(k) ? this.items[k] : null; },
+ clear: function(){ for (var k in this.list){ this.removeItem(k); } },
+ toString: function(){ return this.length+' items in '+this.name+'Storage'; }
+ }// end _.storageAPI
+ };
+
+ // setup the primary store fn
+ if (window.store){ _.conflict = window.store; }
+ var store =
+ // safely set this up (throws error in IE10/32bit mode for local files)
+ _.Store("local", (function(){try{ return localStorage; }catch(e){}})());
+ store.local = store;// for completeness
+ store._ = _;// for extenders and debuggers...
+ // safely setup store.session (throws exception in FF for file:/// urls)
+ store.area("session", (function(){try{ return sessionStorage; }catch(e){}})());
+
+ //Expose store to the global object
+ window.store = store;
+
+ if (typeof define === 'function' && define.amd !== undefined) {
+ define(function () {
+ return store;
+ });
+ } else if (typeof module !== 'undefined' && module.exports) {
+ module.exports = store;
+ }
+
+})(this, null);
+
+// XHook - v1.3.3 - https://github.com/jpillora/xhook
+// Jaime Pillora <dev@jpillora.com> - MIT Copyright 2015
+(function(window,undefined) {
+var AFTER, BEFORE, COMMON_EVENTS, EventEmitter, FIRE, FormData, NativeFormData, NativeXMLHttp, OFF, ON, READY_STATE, UPLOAD_EVENTS, XHookFormData, XHookHttpRequest, XMLHTTP, convertHeaders, depricatedProp, document, fakeEvent, mergeObjects, msie, proxyEvents, slice, xhook, _base,
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
+
+document = window.document;
+
+BEFORE = 'before';
+
+AFTER = 'after';
+
+READY_STATE = 'readyState';
+
+ON = 'addEventListener';
+
+OFF = 'removeEventListener';
+
+FIRE = 'dispatchEvent';
+
+XMLHTTP = 'XMLHttpRequest';
+
+FormData = 'FormData';
+
+UPLOAD_EVENTS = ['load', 'loadend', 'loadstart'];
+
+COMMON_EVENTS = ['progress', 'abort', 'error', 'timeout'];
+
+msie = parseInt((/msie (\d+)/.exec(navigator.userAgent.toLowerCase()) || [])[1]);
+
+if (isNaN(msie)) {
+ msie = parseInt((/trident\/.*; rv:(\d+)/.exec(navigator.userAgent.toLowerCase()) || [])[1]);
+}
+
+(_base = Array.prototype).indexOf || (_base.indexOf = function(item) {
+ var i, x, _i, _len;
+ for (i = _i = 0, _len = this.length; _i < _len; i = ++_i) {
+ x = this[i];
+ if (x === item) {
+ return i;
+ }
+ }
+ return -1;
+});
+
+slice = function(o, n) {
+ return Array.prototype.slice.call(o, n);
+};
+
+depricatedProp = function(p) {
+ return p === "returnValue" || p === "totalSize" || p === "position";
+};
+
+mergeObjects = function(src, dst) {
+ var k, v;
+ for (k in src) {
+ v = src[k];
+ if (depricatedProp(k)) {
+ continue;
+ }
+ try {
+ dst[k] = src[k];
+ } catch (_error) {}
+ }
+ return dst;
+};
+
+proxyEvents = function(events, src, dst) {
+ var event, p, _i, _len;
+ p = function(event) {
+ return function(e) {
+ var clone, k, val;
+ clone = {};
+ for (k in e) {
+ if (depricatedProp(k)) {
+ continue;
+ }
+ val = e[k];
+ clone[k] = val === src ? dst : val;
+ }
+ return dst[FIRE](event, clone);
+ };
+ };
+ for (_i = 0, _len = events.length; _i < _len; _i++) {
+ event = events[_i];
+ if (dst._has(event)) {
+ src["on" + event] = p(event);
+ }
+ }
+};
+
+fakeEvent = function(type) {
+ var msieEventObject;
+ if (document.createEventObject != null) {
+ msieEventObject = document.createEventObject();
+ msieEventObject.type = type;
+ return msieEventObject;
+ } else {
+ try {
+ return new Event(type);
+ } catch (_error) {
+ return {
+ type: type
+ };
+ }
+ }
+};
+
+EventEmitter = function(nodeStyle) {
+ var emitter, events, listeners;
+ events = {};
+ listeners = function(event) {
+ return events[event] || [];
+ };
+ emitter = {};
+ emitter[ON] = function(event, callback, i) {
+ events[event] = listeners(event);
+ if (events[event].indexOf(callback) >= 0) {
+ return;
+ }
+ i = i === undefined ? events[event].length : i;
+ events[event].splice(i, 0, callback);
+ };
+ emitter[OFF] = function(event, callback) {
+ var i;
+ if (event === undefined) {
+ events = {};
+ return;
+ }
+ if (callback === undefined) {
+ events[event] = [];
+ }
+ i = listeners(event).indexOf(callback);
+ if (i === -1) {
+ return;
+ }
+ listeners(event).splice(i, 1);
+ };
+ emitter[FIRE] = function() {
+ var args, event, i, legacylistener, listener, _i, _len, _ref;
+ args = slice(arguments);
+ event = args.shift();
+ if (!nodeStyle) {
+ args[0] = mergeObjects(args[0], fakeEvent(event));
+ }
+ legacylistener = emitter["on" + event];
+ if (legacylistener) {
+ legacylistener.apply(undefined, args);
+ }
+ _ref = listeners(event).concat(listeners("*"));
+ for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
+ listener = _ref[i];
+ listener.apply(undefined, args);
+ }
+ };
+ emitter._has = function(event) {
+ return !!(events[event] || emitter["on" + event]);
+ };
+ if (nodeStyle) {
+ emitter.listeners = function(event) {
+ return slice(listeners(event));
+ };
+ emitter.on = emitter[ON];
+ emitter.off = emitter[OFF];
+ emitter.fire = emitter[FIRE];
+ emitter.once = function(e, fn) {
+ var fire;
+ fire = function() {
+ emitter.off(e, fire);
+ return fn.apply(null, arguments);
+ };
+ return emitter.on(e, fire);
+ };
+ emitter.destroy = function() {
+ return events = {};
+ };
+ }
+ return emitter;
+};
+
+xhook = EventEmitter(true);
+
+xhook.EventEmitter = EventEmitter;
+
+xhook[BEFORE] = function(handler, i) {
+ if (handler.length < 1 || handler.length > 2) {
+ throw "invalid hook";
+ }
+ return xhook[ON](BEFORE, handler, i);
+};
+
+xhook[AFTER] = function(handler, i) {
+ if (handler.length < 2 || handler.length > 3) {
+ throw "invalid hook";
+ }
+ return xhook[ON](AFTER, handler, i);
+};
+
+xhook.enable = function() {
+ window[XMLHTTP] = XHookHttpRequest;
+ if (NativeFormData) {
+ window[FormData] = XHookFormData;
+ }
+};
+
+xhook.disable = function() {
+ window[XMLHTTP] = xhook[XMLHTTP];
+ window[FormData] = NativeFormData;
+};
+
+convertHeaders = xhook.headers = function(h, dest) {
+ var header, headers, k, name, v, value, _i, _len, _ref;
+ if (dest == null) {
+ dest = {};
+ }
+ switch (typeof h) {
+ case "object":
+ headers = [];
+ for (k in h) {
+ v = h[k];
+ name = k.toLowerCase();
+ headers.push("" + name + ":\t" + v);
+ }
+ return headers.join('\n');
+ case "string":
+ headers = h.split('\n');
+ for (_i = 0, _len = headers.length; _i < _len; _i++) {
+ header = headers[_i];
+ if (/([^:]+):\s*(.+)/.test(header)) {
+ name = (_ref = RegExp.$1) != null ? _ref.toLowerCase() : void 0;
+ value = RegExp.$2;
+ if (dest[name] == null) {
+ dest[name] = value;
+ }
+ }
+ }
+ return dest;
+ }
+};
+
+NativeFormData = window[FormData];
+
+XHookFormData = function(form) {
+ var entries;
+ this.fd = form ? new NativeFormData(form) : new NativeFormData();
+ this.form = form;
+ entries = [];
+ Object.defineProperty(this, 'entries', {
+ get: function() {
+ var fentries;
+ fentries = !form ? [] : slice(form.querySelectorAll("input,select")).filter(function(e) {
+ var _ref;
+ return ((_ref = e.type) !== 'checkbox' && _ref !== 'radio') || e.checked;
+ }).map(function(e) {
+ return [e.name, e.type === "file" ? e.files : e.value];
+ });
+ return fentries.concat(entries);
+ }
+ });
+ this.append = (function(_this) {
+ return function() {
+ var args;
+ args = slice(arguments);
+ entries.push(args);
+ return _this.fd.append.apply(_this.fd, args);
+ };
+ })(this);
+};
+
+if (NativeFormData) {
+ xhook[FormData] = NativeFormData;
+ window[FormData] = XHookFormData;
+}
+
+NativeXMLHttp = window[XMLHTTP];
+
+xhook[XMLHTTP] = NativeXMLHttp;
+
+XHookHttpRequest = window[XMLHTTP] = function() {
+ var ABORTED, currentState, emitFinal, emitReadyState, facade, hasError, hasErrorHandler, readBody, readHead, request, response, setReadyState, status, transiting, writeBody, writeHead, xhr;
+ ABORTED = -1;
+ xhr = new xhook[XMLHTTP]();
+ request = {};
+ status = null;
+ hasError = void 0;
+ transiting = void 0;
+ response = void 0;
+ readHead = function() {
+ var key, name, val, _ref;
+ response.status = status || xhr.status;
+ if (!(status === ABORTED && msie < 10)) {
+ response.statusText = xhr.statusText;
+ }
+ if (status !== ABORTED) {
+ _ref = convertHeaders(xhr.getAllResponseHeaders());
+ for (key in _ref) {
+ val = _ref[key];
+ if (!response.headers[key]) {
+ name = key.toLowerCase();
+ response.headers[name] = val;
+ }
+ }
+ }
+ };
+ readBody = function() {
+ if (!xhr.responseType || xhr.responseType === "text") {
+ response.text = xhr.responseText;
+ response.data = xhr.responseText;
+ } else if (xhr.responseType === "document") {
+ response.xml = xhr.responseXML;
+ response.data = xhr.responseXML;
+ } else {
+ response.data = xhr.response;
+ }
+ if ("responseURL" in xhr) {
+ response.finalUrl = xhr.responseURL;
+ }
+ };
+ writeHead = function() {
+ facade.status = response.status;
+ facade.statusText = response.statusText;
+ };
+ writeBody = function() {
+ if ('text' in response) {
+ facade.responseText = response.text;
+ }
+ if ('xml' in response) {
+ facade.responseXML = response.xml;
+ }
+ if ('data' in response) {
+ facade.response = response.data;
+ }
+ if ('finalUrl' in response) {
+ facade.responseURL = response.finalUrl;
+ }
+ };
+ emitReadyState = function(n) {
+ while (n > currentState && currentState < 4) {
+ facade[READY_STATE] = ++currentState;
+ if (currentState === 1) {
+ facade[FIRE]("loadstart", {});
+ }
+ if (currentState === 2) {
+ writeHead();
+ }
+ if (currentState === 4) {
+ writeHead();
+ writeBody();
+ }
+ facade[FIRE]("readystatechange", {});
+ if (currentState === 4) {
+ setTimeout(emitFinal, 0);
+ }
+ }
+ };
+ emitFinal = function() {
+ if (!hasError) {
+ facade[FIRE]("load", {});
+ }
+ facade[FIRE]("loadend", {});
+ if (hasError) {
+ facade[READY_STATE] = 0;
+ }
+ };
+ currentState = 0;
+ setReadyState = function(n) {
+ var hooks, process;
+ if (n !== 4) {
+ emitReadyState(n);
+ return;
+ }
+ hooks = xhook.listeners(AFTER);
+ process = function() {
+ var hook;
+ if (!hooks.length) {
+ return emitReadyState(4);
+ }
+ hook = hooks.shift();
+ if (hook.length === 2) {
+ hook(request, response);
+ return process();
+ } else if (hook.length === 3 && request.async) {
+ return hook(request, response, process);
+ } else {
+ return process();
+ }
+ };
+ process();
+ };
+ facade = request.xhr = EventEmitter();
+ xhr.onreadystatechange = function(event) {
+ try {
+ if (xhr[READY_STATE] === 2) {
+ readHead();
+ }
+ } catch (_error) {}
+ if (xhr[READY_STATE] === 4) {
+ transiting = false;
+ readHead();
+ readBody();
+ }
+ setReadyState(xhr[READY_STATE]);
+ };
+ hasErrorHandler = function() {
+ hasError = true;
+ };
+ facade[ON]('error', hasErrorHandler);
+ facade[ON]('timeout', hasErrorHandler);
+ facade[ON]('abort', hasErrorHandler);
+ facade[ON]('progress', function() {
+ if (currentState < 3) {
+ setReadyState(3);
+ } else {
+ facade[FIRE]("readystatechange", {});
+ }
+ });
+ if ('withCredentials' in xhr || xhook.addWithCredentials) {
+ facade.withCredentials = false;
+ }
+ facade.status = 0;
+ facade.open = function(method, url, async, user, pass) {
+ currentState = 0;
+ hasError = false;
+ transiting = false;
+ request.headers = {};
+ request.headerNames = {};
+ request.status = 0;
+ response = {};
+ response.headers = {};
+ request.method = method;
+ request.url = url;
+ request.async = async !== false;
+ request.user = user;
+ request.pass = pass;
+ setReadyState(1);
+ };
+ facade.send = function(body) {
+ var hooks, k, modk, process, send, _i, _len, _ref;
+ _ref = ['type', 'timeout', 'withCredentials'];
+ if(navigator.userAgent.indexOf("Firefox/") != -1){http://atmosphere-framework.2306103.n4.nabble.com/Atmosphere-js-withCredentials-true-does-not-work-in-Firefox-td4656661.html
+ _ref = ['type', 'timeout'];
+ }
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ k = _ref[_i];
+ modk = k === "type" ? "responseType" : k;
+ if (modk in facade) {
+ request[k] = facade[modk];
+ }
+ }
+ request.body = body;
+ send = function() {
+ var header, value, _j, _len1, _ref1, _ref2;
+ proxyEvents(COMMON_EVENTS, xhr, facade);
+ if (facade.upload) {
+ proxyEvents(COMMON_EVENTS.concat(UPLOAD_EVENTS), xhr.upload, facade.upload);
+ }
+ transiting = true;
+ xhr.open(request.method, request.url, request.async, request.user, request.pass);
+ _ref1 = ['type', 'timeout', 'withCredentials'];
+ if(navigator.userAgent.indexOf("Firefox/") != -1){//http://atmosphere-framework.2306103.n4.nabble.com/Atmosphere-js-withCredentials-true-does-not-work-in-Firefox-td4656661.html
+ _ref1 = ['type', 'timeout'];
+ }
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
+ k = _ref1[_j];
+ modk = k === "type" ? "responseType" : k;
+ if (k in request) {
+ xhr[modk] = request[k];
+ }
+ }
+ _ref2 = request.headers;
+ for (header in _ref2) {
+ value = _ref2[header];
+ xhr.setRequestHeader(header, value);
+ }
+ if (request.body instanceof XHookFormData) {
+ request.body = request.body.fd;
+ }
+ xhr.send(request.body);
+ };
+ hooks = xhook.listeners(BEFORE);
+ process = function() {
+ var done, hook;
+ if (!hooks.length) {
+ return send();
+ }
+ done = function(userResponse) {
+ if (typeof userResponse === 'object' && (typeof userResponse.status === 'number' || typeof response.status === 'number')) {
+ mergeObjects(userResponse, response);
+ if (__indexOf.call(userResponse, 'data') < 0) {
+ userResponse.data = userResponse.response || userResponse.text;
+ }
+ setReadyState(4);
+ return;
+ }
+ process();
+ };
+ done.head = function(userResponse) {
+ mergeObjects(userResponse, response);
+ return setReadyState(2);
+ };
+ done.progress = function(userResponse) {
+ mergeObjects(userResponse, response);
+ return setReadyState(3);
+ };
+ hook = hooks.shift();
+ if (hook.length === 1) {
+ return done(hook(request));
+ } else if (hook.length === 2 && request.async) {
+ return hook(request, done);
+ } else {
+ return done();
+ }
+ };
+ process();
+ };
+ facade.abort = function() {
+ status = ABORTED;
+ if (transiting) {
+ xhr.abort();
+ } else {
+ facade[FIRE]('abort', {});
+ }
+ };
+ facade.setRequestHeader = function(header, value) {
+ var lName, name;
+ lName = header != null ? header.toLowerCase() : void 0;
+ name = request.headerNames[lName] = request.headerNames[lName] || header;
+ if (request.headers[name]) {
+ value = request.headers[name] + ', ' + value;
+ }
+ request.headers[name] = value;
+ };
+ facade.getResponseHeader = function(header) {
+ var name;
+ name = header != null ? header.toLowerCase() : void 0;
+ return response.headers[name];
+ };
+ facade.getAllResponseHeaders = function() {
+ return convertHeaders(response.headers);
+ };
+ if (xhr.overrideMimeType) {
+ facade.overrideMimeType = function() {
+ return xhr.overrideMimeType.apply(xhr, arguments);
+ };
+ }
+ if (xhr.upload) {
+ facade.upload = request.upload = EventEmitter();
+ }
+ return facade;
+};
+/*
+if (typeof this.define === "function" && this.define.amd) {
+ define("xhook", [], function() {
+ return xhook;
+ });
+} else {*/
+ (this.exports || this).xhook = xhook;
+//}
+
+}.call(this,window));
+
+xhook.before(function(request) {
+ var zte_headers = store('zte_http_headers');
+ if (zte_headers && zte_headers.length > 0) {
+ for (i = 0; i < zte_headers.length; i++) {
+ if (zte_headers[i].store === true) {
+ if ( !! store(zte_headers[i].value)) {
+ request.headers[zte_headers[i].key] = store(zte_headers[i].value).toUpperCase()
+ }
+ } else {
+ request.headers[zte_headers[i].key] = zte_headers[i].value
+ }
+ }
+ }
+}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/js/core/load_menuList.js b/common/src/main/webapp/thirdparty/js/core/load_menuList.js
new file mode 100644
index 0000000..972e782
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/js/core/load_menuList.js
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2016, CMCC Technologies Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+var initLeftMenu = function() {
+ var i18nName = "openo_frame_left_menu_i18n";
+ var parentMenus;
+ var childMenus;
+
+ $.ajax({
+ async : false,
+ "type" : "GET",
+ url : "json/menu_list.json",
+ dataType : "json",
+ "success" : function (res, textStatus, jqXHR) {
+ parentMenus = res.parentMenus;
+ childMenus = res.childMenus;
+ },
+ error : function () {
+ }
+ });
+
+ var templateParent = "<a href='javascript:'>" +
+ "<i class='{iconClass}'></i>" +
+ "<span id='{id}' name_i18n='{i18nName}' class='title'></span>" +
+ "<span class='selected'></span>" +
+ "<span class='arrow'></span>" +
+ "</a>";
+
+ var templateChild = "<li>" +
+ "<a href='{url}' class='iframe' id='{hrefId}'>" +
+ "<i class='{iconClass}'></i>" +
+ "<span id='{id}' name_i18n='{i18nName}'></span>" +
+ "</a>" +
+ "</li>";
+
+ var menuContent = "";
+ for (var i = 0; i < parentMenus.length; i++) {
+ var parentMenuContent = templateParent.replace("{id}", parentMenus[i].id)
+ .replace("{iconClass}", parentMenus[i].iconClass)
+ .replace("{i18nName}", i18nName);
+
+ var childMenuContent = "";
+ for (var j = 0; j < childMenus.length; j++) {
+ if (childMenus[j].parentId == parentMenus[i].id) {
+ childMenuContent = childMenuContent + templateChild.replace("{id}", childMenus[j].id)
+ .replace("{url}", childMenus[j].url)
+ .replace("{iconClass}", childMenus[j].iconClass)
+ .replace("{hrefId}", childMenus[j].id + "_href")
+ .replace("{i18nName}", i18nName);
+ }
+ }
+ childMenuContent = "<ul class='sub-menu'>" + childMenuContent + "</ul>";
+
+ menuContent = menuContent + "<li>" + parentMenuContent + childMenuContent + "</li>";
+ }
+
+ return menuContent;
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/js/core/openoFrameWork.js b/common/src/main/webapp/thirdparty/js/core/openoFrameWork.js
new file mode 100644
index 0000000..3b7e4b3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/js/core/openoFrameWork.js
@@ -0,0 +1,3701 @@
+/*
+主框架
+*/
+/*string类型的去å‰åŽç©ºæ ¼å’Œformat方法*/
+String.prototype.trim = function() {
+ return this.replace(/(^\s*)|(\s*$)/g, "");
+};
+String.prototype.format=function() {
+ if(arguments.length==0) return this;
+ for(var s=this, i=0; i<arguments.length; i++)
+ s=s.replace(new RegExp("\\{"+i+"\\}","g"), arguments[i]);
+ return s;
+};
+String.prototype.startWith=function(str){
+ var reg=new RegExp("^"+str);
+ return reg.test(this);
+};
+String.prototype.endWith=function(str){
+ var reg=new RegExp(str+"$");
+ return reg.test(this);
+};
+
+/*å…¨å± å‚考:http://www.alixixi.com/web/a/2015031794521.shtml */
+var s=!function(w,d){
+ var fs={
+ supportsFullScreen:false,
+ isFullScreen:false,
+ requestFullScreen:'',
+ exitFullScreen:'',
+ fullscreenchange:'',
+ prefix:''
+ },
+ aP=['webkit','moz','ms'], //opera 15 支æŒå…¨å±æ˜¯webkit内核
+ len=aP.length,
+ i=0;
+ if(d.exitFullscreen){
+ fs.supportsFullScreen=true
+ }else{
+ for(; i<len; i++){
+ if(d[aP[i]+'ExitFullscreen']||d[aP[i]+'CancelFullScreen']){
+ fs.supportsFullScreen=true;
+ fs.prefix=aP[i];
+ break
+ }
+ }
+ }
+ if(fs.supportsFullScreen){
+ var p=fs.prefix;
+ fs.fullscreenchange=function(fn){
+ d.addEventListener(p=='ms' ? 'MSFullscreenChange' : p+'fullscreenchange',function(){
+ fn && fn()
+ },false)
+ };
+ fs.fullscreenchange(function(){
+ fs.isFullScreen=(function(p){
+ switch (p) {
+ case '':
+ return d.fullscreen;
+ case 'webkit':
+ return d.webkitIsFullScreen;
+ case 'moz':
+ return d.mozFullScreen;
+ case 'ms':
+ return d.msFullscreenElement ? true : false
+ }
+ })(p)
+ });
+ fs.requestFullScreen=function(elem){
+ var elem=elem||d.documentElement;
+ try{
+ p ? elem[p+'RequestFullScreen']() : elem.requestFullScreen() //chrome,ff,标准
+ }catch(e){
+ elem[p+'RequestFullscreen']() //elem.msRequestFullscreen
+ }
+ };
+ fs.exitFullScreen=function(){
+ try{
+ p ? d[p+'ExitFullscreen']() : d.exitFullscreen() //ie,新版chrome或标准
+ }catch(e){
+ d[p+'CancelFullScreen']() //è€ç‰ˆchrome ç«ç‹
+ }
+ }
+ }
+ w.screenfull=fs
+}(window,document);
+/*
+ * Purl (A JavaScript URL parser) v2.3.1
+ * Developed and maintanined by Mark Perkins, mark@allmarkedup.com
+ * Source repository: https://github.com/allmarkedup/jQuery-URL-Parser
+ * Licensed under an MIT-style license. See https://github.com/allmarkedup/jQuery-URL-Parser/blob/master/LICENSE for details.
+ */
+;(function(factory) {
+ if (typeof define === 'function' && define.amd) {
+ define(factory);
+ } else {
+ window.purl = factory();
+ }
+})(function() {
+ var tag2attr = {
+ a : 'href',
+ img : 'src',
+ form : 'action',
+ base : 'href',
+ script : 'src',
+ iframe : 'src',
+ link : 'href',
+ embed : 'src',
+ object : 'data'
+ },
+
+ key = ['source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'fragment'], // keys available to query
+ aliases = { 'anchor' : 'fragment' }, // aliases for backwards compatability
+ parser = {
+ strict : /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, //less intuitive, more accurate to the specs
+ loose : /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ // more intuitive, fails on relative paths and deviates from specs
+ },
+ isint = /^[0-9]+$/;
+
+ function parseUri( url, strictMode ) {
+ var str = decodeURI( url ),
+ res = parser[ strictMode || false ? 'strict' : 'loose' ].exec( str ),
+ uri = { attr : {}, param : {}, seg : {} },
+ i = 14;
+ while ( i-- ) {
+ uri.attr[ key[i] ] = res[i] || '';
+ }
+ // build query and fragment parameters
+ uri.param['query'] = parseString(uri.attr['query']);
+ uri.param['fragment'] = parseString(uri.attr['fragment']);
+ // split path and fragement into segments
+ uri.seg['path'] = uri.attr.path.replace(/^\/+|\/+$/g,'').split('/');
+ uri.seg['fragment'] = uri.attr.fragment.replace(/^\/+|\/+$/g,'').split('/');
+ // compile a 'base' domain attribute
+ uri.attr['base'] = uri.attr.host ? (uri.attr.protocol ? uri.attr.protocol+'://'+uri.attr.host : uri.attr.host) + (uri.attr.port ? ':'+uri.attr.port : '') : '';
+
+ return uri;
+ }
+
+ function getAttrName( elm ) {
+ var tn = elm.tagName;
+ if ( typeof tn !== 'undefined' ) return tag2attr[tn.toLowerCase()];
+ return tn;
+ }
+
+ function promote(parent, key) {
+ if (parent[key].length === 0) return parent[key] = {};
+ var t = {};
+ for (var i in parent[key]) t[i] = parent[key][i];
+ parent[key] = t;
+ return t;
+ }
+
+ function parse(parts, parent, key, val) {
+ var part = parts.shift();
+ if (!part) {
+ if (isArray(parent[key])) {
+ parent[key].push(val);
+ } else if ('object' == typeof parent[key]) {
+ parent[key] = val;
+ } else if ('undefined' == typeof parent[key]) {
+ parent[key] = val;
+ } else {
+ parent[key] = [parent[key], val];
+ }
+ } else {
+ var obj = parent[key] = parent[key] || [];
+ if (']' == part) {
+ if (isArray(obj)) {
+ if ('' !== val) obj.push(val);
+ } else if ('object' == typeof obj) {
+ obj[keys(obj).length] = val;
+ } else {
+ obj = parent[key] = [parent[key], val];
+ }
+ } else if (~part.indexOf(']')) {
+ part = part.substr(0, part.length - 1);
+ if (!isint.test(part) && isArray(obj)) obj = promote(parent, key);
+ parse(parts, obj, part, val);
+ // key
+ } else {
+ if (!isint.test(part) && isArray(obj)) obj = promote(parent, key);
+ parse(parts, obj, part, val);
+ }
+ }
+ }
+
+ function merge(parent, key, val) {
+ if (~key.indexOf(']')) {
+ var parts = key.split('[');
+ parse(parts, parent, 'base', val);
+ } else {
+ if (!isint.test(key) && isArray(parent.base)) {
+ var t = {};
+ for (var k in parent.base) t[k] = parent.base[k];
+ parent.base = t;
+ }
+ if (key !== '') {
+ set(parent.base, key, val);
+ }
+ }
+ return parent;
+ }
+
+ function parseString(str) {
+ return reduce(String(str).split(/&|;/), function(ret, pair) {
+ try {
+ pair = decodeURIComponent(pair.replace(/\+/g, ' '));
+ } catch(e) {
+ // ignore
+ }
+ var eql = pair.indexOf('='),
+ brace = lastBraceInKey(pair),
+ key = pair.substr(0, brace || eql),
+ val = pair.substr(brace || eql, pair.length);
+
+ val = val.substr(val.indexOf('=') + 1, val.length);
+
+ if (key === '') {
+ key = pair;
+ val = '';
+ }
+
+ return merge(ret, key, val);
+ }, { base: {} }).base;
+ }
+
+ function set(obj, key, val) {
+ var v = obj[key];
+ if (typeof v === 'undefined') {
+ obj[key] = val;
+ } else if (isArray(v)) {
+ v.push(val);
+ } else {
+ obj[key] = [v, val];
+ }
+ }
+
+ function lastBraceInKey(str) {
+ var len = str.length,
+ brace,
+ c;
+ for (var i = 0; i < len; ++i) {
+ c = str[i];
+ if (']' == c) brace = false;
+ if ('[' == c) brace = true;
+ if ('=' == c && !brace) return i;
+ }
+ }
+
+ function reduce(obj, accumulator){
+ var i = 0,
+ l = obj.length >> 0,
+ curr = arguments[2];
+ while (i < l) {
+ if (i in obj) curr = accumulator.call(undefined, curr, obj[i], i, obj);
+ ++i;
+ }
+ return curr;
+ }
+
+ function isArray(vArg) {
+ return Object.prototype.toString.call(vArg) === "[object Array]";
+ }
+
+ function keys(obj) {
+ var key_array = [];
+ for ( var prop in obj ) {
+ if ( obj.hasOwnProperty(prop) ) key_array.push(prop);
+ }
+ return key_array;
+ }
+
+ function purl( url, strictMode ) {
+ if ( arguments.length === 1 && url === true ) {
+ strictMode = true;
+ url = undefined;
+ }
+ strictMode = strictMode || false;
+ url = url || window.location.toString();
+
+ return {
+ data : parseUri(url, strictMode),
+ // get various attributes from the URI
+ attr : function( attr ) {
+ attr = aliases[attr] || attr;
+ return typeof attr !== 'undefined' ? this.data.attr[attr] : this.data.attr;
+ },
+ // return query string parameters
+ param : function( param ) {
+ return typeof param !== 'undefined' ? this.data.param.query[param] : this.data.param.query;
+ },
+
+ // return fragment parameters
+ fparam : function( param ) {
+ return typeof param !== 'undefined' ? this.data.param.fragment[param] : this.data.param.fragment;
+ },
+ // return path segments
+ segment : function( seg ) {
+ if ( typeof seg === 'undefined' ) {
+ return this.data.seg.path;
+ } else {
+ seg = seg < 0 ? this.data.seg.path.length + seg : seg - 1; // negative segments count from the end
+ return this.data.seg.path[seg];
+ }
+ },
+ // return fragment segments
+ fsegment : function( seg ) {
+ if ( typeof seg === 'undefined' ) {
+ return this.data.seg.fragment;
+ } else {
+ seg = seg < 0 ? this.data.seg.fragment.length + seg : seg - 1; // negative segments count from the end
+ return this.data.seg.fragment[seg];
+ }
+ }
+ };
+ }
+ purl.jQuery = function($){
+ if ($ != null) {
+ $.fn.url = function( strictMode ) {
+ var url = '';
+ if ( this.length ) {
+ url = $(this).attr( getAttrName(this[0]) ) || '';
+ }
+ return purl( url, strictMode );
+ };
+ $.url = purl;
+ }
+ };
+ purl.jQuery(window.jQuery);
+ return purl;
+});
+//把框架所有的ajax请求集中到一起,å‘一æ¡è¯·æ±‚,获å–所有的é…置信æ¯ã€‚
+openoFrameWork_conf = {
+ userName:store("loginUserName"),
+ changePassItem:FrameConst.change_pass?FrameConst.change_pass:true,
+ helpMenuItem:false,
+ aboutMenuItem:false,
+ flightMenuItem:false,
+ fullscreenMenuItem:true,
+ logoutMenuItem:true,
+ defaultThemeColor:"ztebluelight2",
+ dbType:"other",
+ acceptLanguage:"en-US"
+};
+$("#currentUser").html(openoFrameWork_conf.userName);
+
+$.ajax({
+ url : FrameConst.REST_FRAMECOMMIFO,
+ type : "GET",
+ cache:false,
+ contentType : 'application/json; charset=utf-8',
+ success: function(data){
+ var tempConf = data;
+ if( tempConf.helpMenuItem && tempConf.helpMenuItem != "" ){
+ openoFrameWork_conf.helpMenuItem = tempConf.helpMenuItem;
+ }
+ if( tempConf.aboutMenuItem && tempConf.aboutMenuItem != "" ){
+ openoFrameWork_conf.aboutMenuItem = tempConf.aboutMenuItem;
+ }
+ if( tempConf.flightMenuItem && tempConf.flightMenuItem != "" ){
+ openoFrameWork_conf.flightMenuItem = tempConf.flightMenuItem;
+ }
+ if( tempConf.fullscreenMenuItem && tempConf.fullscreenMenuItem != "" ){
+ openoFrameWork_conf.fullscreenMenuItem = tempConf.fullscreenMenuItem;
+ }
+ if( tempConf.logoutMenuItem && tempConf.logoutMenuItem != "" ){
+ openoFrameWork_conf.logoutMenuItem = tempConf.logoutMenuItem;
+ }
+ if( tempConf.defaultThemeColor && tempConf.defaultThemeColor != "" ){
+ openoFrameWork_conf.defaultThemeColor = tempConf.defaultThemeColor;
+ }
+ if( tempConf.dbType && tempConf.dbType != "" ){
+ openoFrameWork_conf.dbType = tempConf.dbType;
+ }
+ if( tempConf.acceptLanguage && tempConf.acceptLanguage != "" ){
+ openoFrameWork_conf.acceptLanguage = tempConf.acceptLanguage;
+ }
+ if( tempConf.changePassItem && tempConf.changePassItem != "" ){
+ openoFrameWork_conf.changePassItem = tempConf.changePassItem;
+ }
+
+ setFrameWorkByConf();
+ //userName = data;
+ //console.info('login user is :' + data);
+ },
+ error:function(data){
+ setFrameWorkByConf();
+ }
+});
+
+function setThemeColor( configColor ){
+ var panel = $('.zte-theme-panel');
+ $('.theme-colors > ul > li', panel).each(function () {
+ var color = $(this).attr("data-style");
+ if (color == configColor) {
+ // 匹é…上了æ‰é‡è®¾é»˜è®¤ä¸»é¢˜
+ $(this).addClass("current");
+ $('#style_color').attr("href", "css/themes/" + color + ".css");
+ //if (store) {
+ store('style_color', color);
+ //}
+ }
+ });
+};
+
+function setFrameWorkByConf() {
+ //设置用户相关的框架下拉èœå•æ˜¯å¦å¯ç”¨
+ var helpMenuItem = openoFrameWork_conf.helpMenuItem;
+ var aboutMenuItem = openoFrameWork_conf.aboutMenuItem;
+ var flightMenuItem = openoFrameWork_conf.flightMenuItem;
+ var fullscreenMenuItem = openoFrameWork_conf.fullscreenMenuItem;
+ var logoutMenuItem = openoFrameWork_conf.logoutMenuItem;
+ var changePassMenuItem = openoFrameWork_conf.changePassMenuItem;
+ if (!helpMenuItem || helpMenuItem === "false") {
+ $('#uep_ict_help_url').parent('li').remove();
+ }
+ if (!aboutMenuItem|| aboutMenuItem === "false") {
+ $('[data-target="#aboutDlg"]').parent('li').remove();
+ }
+ if (!helpMenuItem && !aboutMenuItem) {
+ $('#uep_ict_help_div').remove();
+ }
+ if (!flightMenuItem|| flightMenuItem === "false") {
+ $('#header_notification_bar').html("<div>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</div>");
+ }
+ if (!fullscreenMenuItem|| fullscreenMenuItem === "false") {
+ //$('#trigger_fullscreen').parent().css("display", "none");
+ $('#trigger_fullscreen_div').html("");
+ }
+ if (!logoutMenuItem || logoutMenuItem === "false") {
+ //$('#trigger_logout').parent().css("display", "none");
+ $('#trigger_logout_div').html("");
+ }
+ if ((!fullscreenMenuItem && !logoutMenuItem) || (fullscreenMenuItem === "false" && logoutMenuItem === "false")) {
+ $('#full_logout_divider').css("display", "none");
+ }
+ if (!changePassMenuItem ) {
+ $('#changePwd_labellink').css('display','none');
+ $('#full_logout_divider').css('display','none');
+ }
+
+ //设置二次开å‘者选择的框架皮肤
+ var defaultColor = openoFrameWork_conf.defaultThemeColor;
+ var panel = $('.zte-theme-panel');
+ $('ul > li', panel).removeClass("current");
+ if (store && !store('style_color')) { // cookie没有æ‰è®¾ç½®é»˜è®¤ä¸»é¢˜
+ setThemeColor(defaultColor);
+ } else {
+ setThemeColor(store('style_color'));
+ }
+};
+
+/*新增的hashtabel实现类,用户åŽç»­iframe的缓存,å‰è¿›åŽé€€æ—¶æ‰“开过的页é¢çš„èœå•id的缓存等*/
+function Hashtable()
+{
+ this._hash = {};
+ this._count = 0;
+ this.add = function(key, value)
+ {
+ if (this._hash.hasOwnProperty(key))
+ return false;
+ else {
+ this._hash[key] = value; this._count++; return true;
+ }
+ } ;
+ this.hash = function() { return this._hash; };
+ this.remove = function(key) { delete this._hash[key]; this._count--; } ;
+ this.count = function() { return this._count; };
+ this.items = function(key) { if (this.contains(key)) return this._hash[key]; };
+ this.contains = function(key) { return this._hash.hasOwnProperty(key); };
+ this.clear = function() { this._hash = {}; this._count = 0; };
+ this.replace = function(key, value)
+ { //有则删除åŽå¢žåŠ ///相当于更新
+ if(this.contains(key)){
+ this.remove(key);
+ }
+ return this.add(key, value);
+ } ;
+};
+
+var fMenuSiderDivId = 'page-f-sidebar-menu';
+var fMenuMegaDivId = 'f_hormenu';
+var megaSiderDivId = 'page-megachild-sidebar-menu';
+var megaDivId = 'main_hormenu';
+var openoFrameWork_menu_horizontal = "horizontal";
+var openoFrameWork_menu_vertical = "vertical";
+var openoFrameWork_menu_fmenu = "fmenu";
+var openoFrameWork_showNav = "true";
+var openoFrameWork_smallView = 960;//原æ¥ä¸º992,但是在投影仪上ä¸å‡†ï¼ˆæŠ•å½±ä»ªè®¾ç½®ä¸º1024,但是实际尺寸比1024å°ï¼‰ï¼Œè¾¹æ èœå•ä¹Ÿä¼šè¢«ç§»é™¤ï¼Œè¿™ä¸ªè®¾ç½®ä¸€ä¸ªç¨å°çš„值。
+
+/*下é¢æ˜¯ä¸»æ¡†æž¶çš„核心*/
+var openoFrameWork = function () {
+ var defaultLanage=getLanguage();
+ var isRTL = false;//文档顺åº
+ var isTouch=function(){
+ try {
+ document.createEvent("TouchEvent");
+ return true;
+ } catch (e) {
+ return false;
+ }
+ };
+ var isDesktop = !isTouch;
+ var isIE8 = false;
+ var isIE9 = false;
+ var isIE10 = false;
+ var gdocTitle="";
+ var _sidebarWidth = 225;
+ var _sidebarCollapsedWidth = 35;
+ var responsiveHandlers = [];
+ var cachedIframes=new Hashtable();
+ var cachedIframesObject=new Hashtable();
+ var breadcrumbBtnMenus=new Hashtable();
+ var _menuCategorys=new Hashtable();
+ var _iframe="page-mainIframe"; //全局å˜é‡ä¿å­˜çš„是当å‰æ­£åœ¨æ‰“开使用的iframe
+ var _sceneURLRootPath="";
+ var _hashSource="";//ä¿¡å·é‡
+ var _isClicked=false;//ä¿¡å·é‡
+ //var _breadcrumbSource=false;
+
+ // 皮肤颜色
+ var layoutColorCodes = {
+ 'blue': '#4b8df8',
+ 'red': '#e02222',
+ 'green': '#35aa47',
+ 'purple': '#852b99',
+ 'grey': '#555555',
+ 'light-grey': '#fafafa',
+ 'yellow': '#ffb848',
+ 'ztebluelight': '#3366cc'
+ };
+ // 获å–真实的设备窗å£å¤§å°ï¼Œå‚考了 http://andylangton.co.uk/articles/javascript/get-viewport-size-javascript/
+ var _getViewPort = function () {
+ var e = window, a = 'inner';
+ if (!('innerWidth' in window)) {
+ a = 'client';
+ e = document.documentElement || document.body;
+ }
+ return {
+ width: e[a + 'Width'],
+ height: e[a + 'Height']
+ }
+ }
+ // åˆå§‹åŒ–
+ var dealInit = function () {
+ var sence = '0';
+ var menuSence = getUrlParam("menu");
+ var confSence = 0;
+ if (menuSence) {
+ sence = menuSence;
+ } else {
+ sence = confSence;
+ }
+ switch (sence) {
+ case "1":
+ gdocTitle = $('#com_zte_ums_ict_framework_ui_page_title_1').text().trim();
+ break;
+ case "2":
+ gdocTitle = $('#com_zte_ums_ict_framework_ui_page_title_2').text().trim();
+ break;
+ case "3":
+ gdocTitle = $('#com_zte_ums_ict_framework_ui_page_title_3').text().trim();
+ break;
+ case "0":
+ default:
+ gdocTitle = $('#com_zte_ums_ict_framework_ui_page_title').text().trim();
+ break;
+ }
+ if ($('body').css('direction') === 'rtl') {
+ isRTL = true;
+ }
+ isIE8 = !! navigator.userAgent.match(/MSIE 8.0/);
+ isIE9 = !! navigator.userAgent.match(/MSIE 9.0/);
+ isIE10 = !! navigator.userAgent.match(/MSIE 10.0/);
+ if (isIE10) {
+ $('html').addClass('ie10'); // IE10
+ }
+ if (isIE10 || isIE9 || isIE8) {
+ $('html').addClass('ie'); // IE10
+ }
+ var deviceAgent = navigator.userAgent.toLowerCase();
+ if (deviceAgent.match(/(iphone|ipod|ipad)/)) {
+ $(document).on('focus', 'input, textarea', function () {
+ $('.page-header').hide();
+ if($('.page-footer')&&$('.page-footer').length>0)
+ $('.page-footer').hide();
+ });
+ $(document).on('blur', 'input, textarea', function () {
+ $('.page-header').show();
+ if($('.page-footer')&&$('.page-footer').length>0)
+ $('.page-footer').show();
+ });
+ } else {
+ $(document).on('focus', 'input, textarea', function () {
+ if($('.page-footer')&&$('.page-footer').length>0)
+ $('.page-footer').hide();
+ });
+ $(document).on('blur', 'input, textarea', function () {
+ if($('.page-footer')&&$('.page-footer').length>0)
+ $('.page-footer').show();
+ });
+ }
+ }
+ //处ç†æ»šåŠ¨åˆ°
+ var dealScrollTo=function (el, offeset) {
+
+ }
+ var dealstartPageLoading=function(message) {
+ $('.page-loading').remove();
+ $('body').append('<div class="page-loading"><img src="'+ ICTFRAME_CONST_SPINNER_GIF_PATH +'"/>&nbsp;&nbsp;<span>' + (message ? message : $.i18n.prop('com_zte_ums_ict_framework_ui_loading')) + '</span></div>');
+ }
+ var dealstopPageLoading=function() {
+ $('.page-loading').remove();
+ }
+ var dealSidebarState = function () {
+ // 窗体宽度å°å°ºå¯¸ï¼ˆå¹³æ¿å’Œiphone模å¼ä¸‹ï¼‰æ—¶ç§»å‡ºå·¦è¾¹æ 
+ var viewport = _getViewPort();
+ if (viewport.width < openoFrameWork_smallView) {
+ $('body').removeClass("page-sidebar-closed");
+ }else{
+ if (getCookie('sidebar_closed') === '1') {
+ $('body').addClass('page-sidebar-closed');
+ }
+ }
+ }
+ // openoFrameWork.addResponsiveHandler()回调函数.
+ var runResponsiveHandlers = function () {
+ //é‡æ–°åˆå§‹åŒ–其他订阅的元素elements
+ for (var i = 0; i < responsiveHandlers.length; i++) {
+ var each = responsiveHandlers[i];
+ each.call();
+ }
+ }
+ // 窗体é‡æ–°è°ƒæ•´å¤§å°æ—¶åˆå§‹åŒ–调整边æ çŠ¶æ€é«˜åº¦
+ var dealResponsive = function () {
+ dealSidebarState();
+ ajustHorMenuDropDirection();
+ dealSidebarAndContentHeight();
+ dealFixedSidebar();
+ runResponsiveHandlers();
+ }
+ // 页é¢é‡è½½å…¥æ—¶åˆå§‹åŒ–调整内部布局
+ var dealResponsiveOnInit = function () {
+ dealSidebarState();
+ dealSidebarAndContentHeight();
+ setTimeout(function () {
+ ajustHorMenuDropDirection(true);
+ }, 100);
+ }
+ // 窗体é‡æ–°è°ƒæ•´å¤§å°æ—¶åˆå§‹åŒ–调整布局
+ var dealResponsiveOnResize = function () {
+ var resize;
+ if (isIE8) {
+ var currheight;
+ $(window).resize(function () {
+ if (currheight == document.documentElement.clientHeight) {
+ return;
+ }
+ if (resize) {
+ clearTimeout(resize);
+ }
+ resize = setTimeout(function () {
+ dealResponsive();
+ }, 50);
+ currheight = document.documentElement.clientHeight;
+ });
+ } else {
+ $(window).resize(function () {
+ if (resize) {
+ clearTimeout(resize);
+ }
+ resize = setTimeout(function () {
+ dealResponsive();
+ }, 50);
+ });
+ }
+ }
+ var changeSiderBar = function(hideAllMenu){
+ var siderbarpos = $(".nav-pos-direction", $(".zte-theme-panel")).val();
+ var sidermenu = $("#page-sidebar-menu");
+ var hormenu = $("#main_hormenu");
+ var fhorMenu = $("#" + fMenuMegaDivId);
+ var fsiderMenu = $("#" + fMenuSiderDivId);
+ if(hideAllMenu){
+ sidermenu.css('display','block');// 侧边æ æ˜¾ç¤º
+ hormenu.css("display", "none");//éšè—æ°´å¹³èœå•æ 
+ fhorMenu.css('display','none');
+ fsiderMenu.css('display','none');
+ return;
+ }
+
+ sidermenu.css('display','none');
+ hormenu.css("display", "none");
+ fhorMenu.css('display','block');
+ fsiderMenu.css('display','block');
+ //除了toggle按钮之外,是å¦è¿˜æœ‰å…¶ä»–å„¿å­æ˜¯è¦æ˜¾ç¤ºçš„,如果没有,那么竖èœå•ä¸æ˜¾ç¤ºï¼›å之,显示。
+ var lis = fsiderMenu.children(".sidebar-toggler-wrapper").siblings();
+ if(lis.length > 0 && lis.css('display') != "none"){
+ fsiderMenu.css('display','block');
+ $("body").removeClass("page-full-width");
+ if ($('body').hasClass("page-sidebar-closed")) {
+ $(".page-content").css("marginLeft", _sidebarCollapsedWidth);
+ } else {
+ $(".page-content").css("marginLeft", _sidebarWidth);
+ }
+ }
+ }
+ //æ ¹æ®å½“å‰èœå•åœ¨å±å¹•çš„ä½ç½®ï¼Œå’Œä¸€çº§èœå•ä¸‹äºŒçº§èœå•çš„排列,æ¥å†³å®šèœå•æ˜¯å‘左展开还是å‘å³å±•å¼€
+ var ajustHorMenuDropDirection = function( isInit ){
+ //获å–å±å¹•å®½åº¦
+ var bodyWidth = document.body.clientWidth;
+ //循环,获å–æ¯ä¸ªä¸€çº§èœå•åœ¨å±å¹•ä¸­çš„ä½ç½®
+ var levelOneAdropdowns = $('a.dropdown-toggle', '#main_hormenu' );
+ //æ¯ä¸€ä¸ªæ–‡å­—span的图标ã€ä»–父亲的margin\paddingç­‰å ç”¨çš„ä½ç½®
+ var marginCount = 5 * 2 + 17.5 + 2 * 2 + 30 + 15 * 2 + 3;
+ for( var i = 0 ; i < levelOneAdropdowns.length ; i++ ){
+ var a = $(levelOneAdropdowns[i]);
+ var leftOffset = a.offset().left;
+ //获å–二级èœå•çš„æ•°é‡
+ var ul = a.parent().children('.dropdown-menu');
+ var groupDivs = $('.zteDivWidth' , ul);
+ var widthOfDropDownMenu = 0;
+ for(var j = 0 ; j < groupDivs.length && groupDivs.length >0 ; j++ ){//循环获å–æ¯ä¸ªåˆ†ç»„的宽度
+ var eachDiv = groupDivs[j];
+ var maxLengthText = "";
+ var maxLength = 0;
+ var spans = $('span' , eachDiv).each(function(){
+ var innerText = this.innerText;
+ if( innerText.length > maxLength ){
+ maxLength= innerText.length;
+ maxLengthText = innerText;
+ }
+ });
+ widthOfDropDownMenu = widthOfDropDownMenu + getStringWidth(maxLengthText , 14) + marginCount;
+ }
+ //预估æ¯ä¸ªç»„å å®½åº¦150PX,多预计一点
+ if( widthOfDropDownMenu + leftOffset > bodyWidth ){
+ console.log("ajust class dropdown-menu-right ,id = "+ a.attr("id") );
+ ul.addClass('dropdown-menu-right');
+ //var right = bodyWidth - (leftOffset + a.width() + 15);
+ //ul.attr('style' ,'right:' + right );
+ }else{
+ ul.removeClass('dropdown-menu-right');
+ //ul.removeAttr('style');
+ }
+ }
+ }
+ // å±å¹•å¤§å°å‘生å˜åŒ–或者移动设备旋转å±å¹•æ—¶å¤„ç†å“应å¼å¸ƒå±€.
+ var dealSidebarAndContentHeight = function (isToggler) {
+ var content = $('.page-content');
+ var contentbody = $('.page-content-body');
+ var sidebar = $('.page-sidebar');
+ var body = $('body');
+ var height;
+ var viewport = _getViewPort();
+ var scrAvaHeight=Math.min(window.screen.availHeight,viewport.height)-5;
+ var footer=$('.footer');
+ var pgbread=$('.page-breadcrumb');
+ var pageableDiv=$('#pageableDiv');
+ console.log("pageableDiv height:"+pageableDiv.outerHeight(true));
+ var pheader=$('.header');
+ var childPagetype=!!cachedIframesObject.items(_iframe)?cachedIframesObject.items(_iframe).childpageType:"";
+ if(childPagetype==="isc")//smartclientçš„å­é¡µé¢å›ºå®šé«˜åº¦ä¸ºè§†å£å¯ç”¨å†…容区高度
+ {
+ $('.sidebar-option', panel).val("fixed");
+ }
+ dealShownav();
+ var available_height =scrAvaHeight - ((!footer||footer.length<=0)?0:footer.outerHeight(true)) - pheader.outerHeight(true);
+ var _pageableDivHeight=(!pageableDiv||pageableDiv.length<=0||pageableDiv.is(":visible")==false)?0:pageableDiv.outerHeight(true);
+ var h= scrAvaHeight-pheader.outerHeight(true)-((!footer||footer.length<=0||footer.is(":visible")==false)?0:footer.outerHeight(true))-pgbread.outerHeight(true)-_pageableDivHeight-(contentbody.outerHeight(true)-contentbody.height());
+ var miframe=_iframe==""?"page-mainIframe": _iframe;
+ var pagemyIframe=$('.page-content .page-content-body .'+miframe); //.page-mainIframe
+ if(pagemyIframe&&pagemyIframe.length>0){
+ //处ç†iframe,下é¢è®¡ç®—中间iframe的高度
+ var deviceAgent = navigator.userAgent.toLowerCase();
+ if (deviceAgent.match(/(iphone|ipod|ipad)/)) { //||viewport.height<=480
+ var w=viewport.width-content.offset().left-(pagemyIframe.offset().left-content.offset().left)*2;//宽度=总宽度-左边æ å®½åº¦-内容区内边è·ã€‚å·¦å³ä¸¤ä¸ª
+ pagemyIframe.width(w);
+ }
+ //对桌é¢å¿…须计算高度
+ var tmp_style = sidebar.attr('style');// firefox下执行 sidebar.height()会改å˜styleæ ·å¼ï¼Œè¿™é‡Œç¼“存下执行å‰çš„styleæ ·å¼ï¼Œæ‰§è¡Œå®ŒåŽé‡æ–°èµ‹ç»™é¡µé¢å…ƒç´ 
+ console.log("pym:parent iframe "+miframe+" sidebar.height:"+sidebar.height()+" h:"+h);
+ h=sidebar.height()>h?sidebar.height():h;
+ //IE下,把iframe的高度å†å‡æŽ‰7,因为IE10åŠä»¥ä¸‹ç‰ˆæœ¬ï¼Œè®¡ç®—的高度会比IE实际显示区域大,导致出现IE滚动æ¡ã€‚
+ /*h=h-ICTFRAME_CONST_IFRAME_HEIGHT_AJUST;
+ if(isIE){
+ h=h-ICTFRAME_CONST_IFRAME_HEIGHT_AJUST_IE;
+ }*/
+ sidebar.attr('style',tmp_style);
+ if (isDesktop) {
+ //pagemyIframe.attr("height",h);
+ if(cachedIframesObject.items(miframe).setMinHeight){
+ var minHeight=Math.min(scrAvaHeight,h);
+ console.log("pym:parent iframe "+miframe+" window.screen.availHeight:"+scrAvaHeight+" viewport.height:"+viewport.height+" h:"+h+" minHeight:"+minHeight);
+ cachedIframesObject.items(miframe).setMinHeight(minHeight);
+ }
+ }else{
+ //pagemyIframe.attr("height","100%");//去掉这里错误的设置,ipad上测试高度ä¸æ­£ç¡®
+ var _h=h;
+ try{
+ _h=pagemyIframe.contents().height();
+ }catch(e){}
+ h=_h>h?_h:h;
+ if(cachedIframesObject.items(miframe).setMinHeight){
+ var minHeight=Math.min(scrAvaHeight,h);
+ console.log("pym:parent iframe "+miframe+" window.screen.availHeight:"+scrAvaHeight+" viewport.height:"+viewport.height+" h:"+h+" minHeight:"+minHeight);
+ cachedIframesObject.items(miframe).setMinHeight(minHeight);
+ }
+ }
+ }
+
+ if (body.hasClass("page-footer-fixed") === true && body.hasClass("page-sidebar-fixed") === true) {
+ if (content.height() < available_height) {
+ //content.attr('style', 'min-height:' + available_height + 'px !important');
+ dealAddStyle(content,'min-height',available_height + 'px',true);
+ }
+ } else{
+ if (body.hasClass("page-footer-fixed") === true && body.hasClass("page-sidebar-fixed") === false) {
+ if (content.height() < available_height) {
+ //content.attr('style', 'min-height:' + available_height + 'px !important');
+ dealAddStyle(content,'min-height',available_height + 'px',true);
+ }
+ } else {
+ if (body.hasClass('page-sidebar-fixed')) {
+ height = _calculateFixedSidebarViewportHeight();
+ } else {
+ // firefox下执行 sidebar.height()会改å˜styleæ ·å¼ï¼Œè¿™é‡Œç¼“存下执行å‰çš„styleæ ·å¼ï¼Œæ‰§è¡Œå®ŒåŽé‡æ–°èµ‹ç»™é¡µé¢å…ƒç´ 
+ var tmp_style = sidebar.attr('style');
+ // height = sidebar.height() + 20;
+ sidebar.attr('style',tmp_style);
+ var headerHeight = pheader.outerHeight(true);
+ var footerHeight = (!footer||footer.length<=0)?0:footer.outerHeight(true);
+ if ($(window).width() > 1024 && (height + headerHeight + footerHeight) < scrAvaHeight) {
+ height = scrAvaHeight - headerHeight - footerHeight;
+ }
+ }
+ if (height <= content.height()) {//这里为了é¿å…内容区域很å°çš„时候出现内容区域无法充满å±å¹•,把min-height修改为height
+ //content.attr('style', 'min-height:' + height + 'px !important');
+ dealAddStyle(content,'min-height',height + 'px',true);
+ }
+ }
+ }
+ // å±å¹•å°å°ºå¯¸æ—¶ä¼šéšè—è¾¹æ ï¼Œè¿™æ—¶èœå•ç”±å°å±å¹•å³ä¸Šå›¾æ ‡æŽ§åˆ¶ï¼Œå½“å±å¹•å˜åŒ–到大尺寸å±å¹•æ—¶ï¼Œ
+ // 需è¦æŒ‰åŽŸèœå•å‡ºçŽ°æ–¹å¼æ¢å¤èœå•æ˜¾ç¤ºã€‚
+ var screenwidth = $(window).width();
+ if(screenwidth >= openoFrameWork_smallView){
+ changeSiderBar();
+ if($(".page-sidebar-menu li").css('display') != "none"){
+ if ($('body').hasClass("page-sidebar-closed") && $(".sidebar-toggler").hasClass("close-by-viewportChange")) {
+ if( !isToggler ){
+ $(".sidebar-toggler")[1].click();
+ }
+ $(".sidebar-toggler").removeClass("close-by-viewportChange");
+ }
+ }
+ }
+ else {
+ changeSiderBar(true);
+ }
+ }
+ var showIframe=function(iframe){
+ var resize,pagemainIframe;
+ if (cachedIframes.count()>0) {
+ for (var i in cachedIframes.hash()) {
+ cachedIframes.replace(i,0);
+ var pagemyIframe=$('.page-content .page-content-body .'+i);
+ if(pagemyIframe&&pagemyIframe.length>0){
+ if(iframe==i){
+ pagemyIframe.show();
+ cachedIframes.replace(i,1);
+ } else{
+ if("page-mainIframe"===i){//2015å¹´12月10æ—¥ wimaxè¦æ±‚页é¢åˆ‡æ¢åŽåˆ é™¤æ²¡æœ‰é…ç½®cacheNum的缓存页é¢
+ pagemainIframe=i;
+ pagemyIframe.attr("src","");
+ pagemyIframe.remove();
+ }else{
+ pagemyIframe.hide();
+ }
+ cachedIframes.replace(i,0);
+ }
+ }
+ }
+ }
+ if(pagemainIframe){
+ delete cachedIframes._hash[pagemainIframe];
+ delete cachedIframesObject._hash[pagemainIframe];
+ }
+ if (!cachedIframes.contains(iframe)) {
+ cachedIframes.add(iframe,1);
+ //增加的iframeåŠ è½½å®Œæ¯•åŽ åœæ­¢åŠ è½½ä¸­æ示信æ¯
+ myIframe=$('.'+iframe);
+ myIframe.show();
+ myIframe.load(function(){
+ /*if (!isDesktop) {
+ if (resize) {
+ clearInterval(resize);
+ }
+ resize = setInterval(dealIframeHeight, 400,$(this));
+ }*/
+ openoFrameWork.stopPageLoading();
+ });
+ }
+ }
+ var hidemenu=function(){
+ $('.hor-menu').hide();
+ dealAddStyle($('.page-content'),'margin-left','0px',true);
+ dealAddStyle($('.page-sidebar'),'display','none',true);
+ var fsiderMenu = $("#" + fMenuSiderDivId);
+ fsiderMenu.children().css('display' , 'none');
+ }
+ var hideAlarmLight=function(){
+ //$('#header_notification_bar').hide();
+ //$('#header_notification_bar').empty();
+ $('#header_notification_bar').html("<div>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</div>");
+ }
+ var dealShownav=function(){
+ var showNav=openoFrameWork.getLocationURLParameter('showNav');
+ if( showNav=="false"){
+ openoFrameWork_showNav = showNav;
+ hidemenu();
+ hideAlarmLight();
+ }
+ }
+ /* 点击èœå•æ—¶ï¼Œå¤„ç†å¯¹åº”该èœå•é¡¹çš„横,左èœå•é¡¹ */
+ var dealRelateMenu = function(source) {
+ // 点击å­èœå•æ—¶ï¼Œå¯¹åº”的横竖èœå•é¡¹ä¹Ÿè”动为选择样å¼ï¼Œ(高亮,箭头å˜åŒ–)
+ var panel = $('.zte-theme-panel');
+ var navPosOption = $('.nav-pos-direction', panel).val();
+ var targetsource = null;
+ var targetContainer = null;
+ if (navPosOption === "vertical") {
+ // 当å‰æ˜¯å·¦èœå•ï¼Œåˆ™å¤„ç†å¯¹åº”的横èœå•
+ targetsource = $("#"+source.attr("id"), $("#main_hormenu"));
+ targetContainer = $(".header ul");
+ } else if (navPosOption === "horizontal") {
+ var rtn = dealMgaBarRelated(source);
+ dealFMenuRelated(source , megaSiderDivId);
+ targetContainer = rtn[0];
+ targetsource = rtn[1];
+ }else if(navPosOption === openoFrameWork_menu_fmenu){
+ dealFMenuRelated(source , fMenuSiderDivId);
+ }
+ if (targetContainer) {
+ // 移除原有èœå•é¡¹çš„活动åŠç®­å¤´æ ·å¼
+ targetContainer.children('li.active').removeClass('active');
+ targetContainer.find('.arrow.open').removeClass('open');
+ }
+ if (targetsource) {
+ // 增加活动åŠç®­å¤´æ ·å¼
+ targetsource.parents('li').each(function () {
+ $(this).addClass('iframe active');
+ $(this).find('a > span.arrow').addClass('open');
+ });
+ targetsource.parents('li').addClass('active');
+ if (navPosOption === "horizontal") {
+ if (targetsource.parent().parent().parent().is("li")) {
+ $('.arrow', targetsource.parent().parent().parent()).addClass("open");
+ }
+ }
+ }
+ }
+ var dealMgaBarRelated = function(source){
+ // 当å‰æ˜¯æ¨ªèœå•ï¼Œåˆ™å¤„ç†å¯¹åº”çš„å·¦èœå•
+ targetsource = $("#"+source.attr("id"), $("[class='page-sidebar-menu']"));
+ targetContainer = $("#page-sidebar-menu ul");
+ // 将先å‰å·¦èœå•å±•å¼€çš„å­èœå•æ”¶ç¼©
+ $("li.open",targetContainer).each(function() {
+ var style = $("ul.sub-menu", this).attr("style");
+ if (style) {
+ $("ul.sub-menu", this).removeAttr("style");
+ $(this).removeClass('open');
+ }
+ });
+ // 当å‰æ˜¯æ¨ªèœå•ï¼Œä½†åœ¨å±å¹•ç¼©å°çš„情况下显示的是tipåž‚ç›´èœå•ï¼Œè€Œæ¨ªèœå•æ˜¯éšè—的,所以需é¢å¤–处ç†æ¨ªèœå•
+ if (source.parent().parent().parent().parent().attr("class").indexOf("page-sidebar-menu") >= 0) {
+ var tiptargetsource = $("#"+source.attr("id"), $("#main_hormenu"));
+ var tiptargetContainer = $(".header ul");
+ tiptargetContainer.children('li.active').removeClass('active');
+ tiptargetContainer.find('.arrow.open').removeClass('open');
+ tiptargetsource.parents('li').each(function () {
+ $(this).addClass('iframe active');
+ $(this).find('a > span.arrow').addClass('open');
+ });
+ tiptargetsource.parents('li').addClass('active');
+ }
+ return [targetContainer ,targetsource ];
+ }
+ var dealFMenuRelated = function(source , siderDivId ){
+ var fsiderMenu = $("#" + siderDivId);
+ if(isMoreMenuItemClick){//更多èœå•ç‚¹å‡» , 临时方案,增加信å·é‡ï¼Œä½¿ç”¨ä¹‹åŽå°±ç½®ä¸ºfalse
+ isMoreMenuItemClick = false
+ }else if($(source).parents('li').hasClass('mega-menu-dropdown')){//F的横å‘èœå•çš„点击
+ var id = source.attr('id');
+ //éžè¢«ç‚¹å‡»çš„一级èœå•çš„二级èœå•éƒ½ä¸æ˜¾ç¤º
+ $('#' + siderDivId + '>li').hide();
+ var level2Lis = $("a[hparentid= " + id + "]" , fsiderMenu).parent();
+ level2Lis.show();
+ if(level2Lis.length > 0){//把竖å‘èœå•çš„收起放大按钮显示出æ¥
+ $('#' + siderDivId + '>li.sidebar-toggler-wrapper').show();
+ }
+ if($("a[hparentid= " + id + "]" , fsiderMenu).length > 0){ //有å­å­™èœå•æ—¶ï¼ŒæŠŠFèœå•çš„ç«–èœå•æ˜¾ç¤ºå‡ºæ¥
+ dealFSidermenu(source ,siderDivId );
+ }else{//å¦åˆ™éšè—ç«–èœå•
+ fsiderMenu.css('display','none');
+ $("body").addClass("page-full-width");
+ $(".page-content").css("marginLeft", _sidebarWidth);
+ }
+
+ }else{//Fèœå•çš„ç«–å‘èœå•ç‚¹å‡»
+ //处ç†ä¸€ç§ç‰¹æ®Šæƒ…况,告警ç¯æ‰“开新页é¢ï¼Œæ‰€æœ‰çš„èœå•éƒ½ä¸å‡ºçŽ°ï¼Œå› æ­¤ï¼Œè™½ç„¶è¿™ä¸ªsource在竖èœå•ï¼Œä½†ç«–èœå•è¿™ä¸ªæ—¶å€™å®žé™…上是没有显示的
+ if( openoFrameWork_showNav == "true") {
+ $('#' + siderDivId + '>li').hide();
+ var lis = $(source).parents('li');
+ var id = lis.eq(lis.length-1).children( 'a' ).attr('hparentid');
+ //var id = $(source).parents('li').children('a').attr('hparentId');
+ var level2Lis = $("a[hparentid=" + id + "]" , fsiderMenu).parent();
+ level2Lis.show();
+ if(level2Lis.length > 0) {//把竖å‘èœå•çš„收起放大按钮显示出æ¥
+ $('#'+ siderDivId + '>li.sidebar-toggler-wrapper').show();
+ }
+ //$('#' + siderDivId + '>li')[0].show();
+ dealFSidermenu(source , siderDivId);
+ }
+ }
+ }
+ var dealFSidermenu = function(source , siderDivId){
+ var fsiderMenu = $("#" + siderDivId);
+ fsiderMenu.css('display','block');
+ $('ul.sub-menu',fsiderMenu).css('display','block');
+ $('.arrow',fsiderMenu).addClass('open');
+ $("body").removeClass("page-full-width");
+ if ($('body').hasClass("page-sidebar-closed")) {
+ $(".page-content").css("marginLeft", _sidebarCollapsedWidth);
+ } else {
+ $(".page-content").css("marginLeft", _sidebarWidth);
+ }
+ var href = source.attr("href");
+ $('li.iframe' ,fsiderMenu ).removeClass('active');
+ var selectedIframeLi = $("a[href ='" + href + "']" ,fsiderMenu ).parent();
+ selectedIframeLi.addClass('active');
+ selectedIframeLi.parent().parent().addClass("open").addClass("active");
+ selectedIframeLi.parent().css('display','block');
+ selectedIframeLi.parent().parent().children('a').children('.arrow').addClass('open');
+ }
+ var dealMenuItemClick=function(source,e,menuContainerStr){
+ var url = source.attr("href");
+ if(!url||url.length<2)
+ return;
+ e.preventDefault();
+ if(!_isClicked){//导航情况下,首先è¦æ¨¡æ‹Ÿç‚¹å¼€èœå•åˆ†ç»„
+ _isClicked=true;//如果èœå•æœ‰å­èœå•ç‚¹å‡»ä¸€æ¬¡æ¥å±•å¼€å­èœå•ï¼Œæ³¨æ„这个信å·é‡çš„å˜åŒ–,é¿å…死循环
+ var mainMenu=source.parents('li').last();
+ if(!mainMenu.hasClass('open')){
+ dealLiAClick(mainMenu.children('a:eq(0)'));
+ }
+ }
+ if(menuContainerStr&&menuContainerStr.length>0){
+ var menuContainer = $('.'+menuContainerStr+' ul');
+
+ menuContainer.children('li.active').removeClass('active');
+ // menuContainer.children('arrow.open').removeClass('open');
+ //menuContainer.find('.arrow.open').addClass('open');
+ }
+ source.parents('li').each(function () {
+ $(this).addClass('iframe active');
+ $(this).children('a > span.arrow').addClass('open');
+ });
+ source.parents('li').addClass('active');
+ // 处ç†ç‚¹å‡»èœå•å¯¹åº”的横或左èœå•é¡¹çš„选择样å¼
+ dealRelateMenu(source);
+ if(menuContainerStr&&menuContainerStr.length>0){
+ if ($(window).width() <= 991 && $('.'+menuContainerStr).hasClass("in")) {
+ $('.navbar-toggle').click();
+ }
+ }
+ if(dealMultTabPage(source))
+ return true;
+ dealScrollTo();
+ var breadmenuID=e.data&&e.data.breadcrumbBtnMenuItem&&e.data.breadcrumbBtnMenuItem.length>0?e.data.breadcrumbBtnMenuItem:"";
+ if(breadmenuID.length>0){//é¢åŒ…削导航æ¥çš„,åªéœ€è¦é‡æ–°ç”Ÿæˆé¢åŒ…削å³å¯
+ //找到更多èœå•æŒ‰é’®
+ var moreMenuItem = $('#' + breadmenuID , $('#pageableDiv'));
+ if( moreMenuItem.length == 0 ){
+ moreMenuItem = $('#' + breadmenuID , $('.more-botton-zone'));
+ }
+ dealBreadcrumbBtnMenuItemClick(moreMenuItem,e);
+ //dealBreadcrumb(source,false,e);
+ }else{//éžé¢åŒ…削导航æ¥çš„,
+ dealstartPageLoading();
+ if(dealIframe(source,e))//当返回true时说明是正常加载iframe了,å¦åˆ™é¢åŒ…削ä¸èƒ½åˆ‡æ¢
+ dealBreadcrumb(source,false,e);
+ }
+ //dealShownav();
+ };
+ var dealMenuItemGetFocus=function(source,e,menuContainerStr){
+ var url = source.attr("href");
+ if(!url||url.length<2)
+ return;
+ e.preventDefault();
+ if(!_isClicked){//导航情况下,首先è¦æ¨¡æ‹Ÿç‚¹å¼€èœå•åˆ†ç»„
+ _isClicked=true;//如果èœå•æœ‰å­èœå•ç‚¹å‡»ä¸€æ¬¡æ¥å±•å¼€å­èœå•ï¼Œæ³¨æ„这个信å·é‡çš„å˜åŒ–,é¿å…死循环
+ var mainMenu=source.parents('li').last();
+ dealLiAClick(mainMenu.children('a:eq(0)'));
+ }
+ if(menuContainerStr&&menuContainerStr.length>0){
+ var menuContainer = $('.'+menuContainerStr+' ul');
+
+ menuContainer.children('li.active').removeClass('active');
+ menuContainer.children('arrow.open').removeClass('open');
+ }
+ source.parents('li').each(function () {
+ $(this).addClass('iframe active');
+ $(this).children('a > span.arrow').addClass('open');
+ });
+ source.parents('li').addClass('active');
+
+ if(menuContainerStr&&menuContainerStr.length>0){
+ if ($(window).width() <= 991 && $('.'+menuContainerStr).hasClass("in")) {
+ $('.navbar-toggle').click();
+ }
+ }
+ };
+ //处ç†iframe的核心处ç†ç±»ï¼Œé€»è¾‘较为å¤æ‚,注æ„å„ç§å‚数的处ç†
+ var dealIframe=function(aObject,e){
+ _hashSource="";
+ var url = aObject.attr("href");
+ if(!url||url.length<2)
+ return;
+ url=openoFrameWork.handlBaseURL(url);
+ //-----------2015å¹´9月21日新增V5中大O需è¦çš„按照实例(根æ®é€‰æ‹©çš„系统实例å˜åŒ–urlçš„ip和端å£åœ°å€ï¼‰è¿›è¡ŒåŠ¨æ€åˆ‡æ¢èœå•çš„功能
+ var category= aObject.attr("category");//处ç†èœå•ä¸­å®šä¹‰çš„Category属性
+ if(category&&category.length>0){//处ç†Category属性
+ var newIpPort=_menuCategorys.items(category);
+ if(newIpPort&&newIpPort.ipPort&&newIpPort.ipPort.trim()!=""){//如果找到了
+ var newIpPortstr=openoFrameWork.getDomainURL(newIpPort.ipPort);//去掉ipå’ŒportåŽå¤šä½™çš„部分
+ var urlipport=openoFrameWork.getDomainURL(url);
+ console.log("old url:"+url);
+ url=newIpPortstr+url.replace(urlipport,"");
+ console.log("newIpPort:"+newIpPortstr+" newURL:"+url);
+ }
+ }
+ //------------
+ dealstartPageLoading();
+ var cacheNum= aObject.attr("cacheNum");//当第三方应用需è¦æ¡†æž¶ç¼“存曾ç»æ‰“开过的页é¢æ—¶ä½¿ç”¨ã€‚
+ var shiftJS= aObject.attr("shiftJS");//当第三方应用ä¸éœ€è¦åŽé¢çš„href页é¢è¿›è¡Œé‡æ–°åŠ è½½ä»…仅执行æŸä¸ªè„šæœ¬æ‰“å¼€æŸä¸ªåŠŸèƒ½æ—¶ä½¿ç”¨
+ var _iframeName= aObject.attr("iframeName");//对有些第三方应用设置了顶层frameå字的,这个必须设置
+ var _iframeAutoScroll= aObject.attr("iframeAutoScroll");//设置iframe的滚动æ¡æ˜¯å¦å‡ºçŽ°,å¯ä»¥è®¾ç½®ä¸ºauto,yes或者no,默认为no ä¸å‡ºçŽ°.
+ _iframeAutoScroll=!!_iframeAutoScroll?(_iframeAutoScroll==='yes'?'yes':_iframeAutoScroll==='auto'?'auto':'no'):'no';
+ _xdomain= aObject.attr("xdomain");//对有些第三方应用如果跨域了,需è¦è®¾ç½®è¿™ä¸ªä¿¡ä»»åŸŸå±žæ€§,以便于æ¥è·¨åŸŸé€šè®¯.这里å–值是一个正则表达å¼
+ _xdomain=_xdomain&&_xdomain.length>0?_xdomain:"*";
+ var _cssfile= aObject.attr("cssSrc");//设置iframe中页é¢éœ€è¦åŠ¨æ€åŠ è½½çš„css文件.
+ _cssfile=(_cssfile&&_cssfile.length>0)?_cssfile:"";
+ var _runShiftJS="";
+ var pageContentBody=$('.page-content .page-content-body');
+ var tabHtml="";
+ var tabContentHtml="";
+ var tabID="";
+ var tabContentID="";
+ var iframename='';
+ function createIframe(pdiv,url,id,name,clsname,xdom,autoScroll){
+ var pymParent = new pym.Parent(pdiv, url, {xdomain:xdom});
+ pymParent.iframe.id=id;
+ pymParent.iframe.name=name;
+ //pymParent.iframe.setAttribute('display', "none");
+ //pymParent.iframe.style.height="100%";
+ //pymParent.iframe.setAttribute('height', "100%");
+ pymParent.iframe.setAttribute('class', clsname);
+ pymParent.iframe.setAttribute('allowfullscreen','');
+ pymParent.iframe.setAttribute('mozallowfullscreen','');
+ pymParent.iframe.setAttribute('oallowfullscreen','');
+ pymParent.iframe.setAttribute('msallowfullscreen','');
+ pymParent.iframe.setAttribute('webkitallowfullscreen','');
+ //pymParent.iframe.setAttribute('scrolling',autoScroll);
+ pymParent.iframe.setAttribute('onload', 'openoFrameWork.SyncCSS(this,0,"'+_cssfile+'");openoFrameWork.stopPageLoading();');
+ cachedIframesObject.replace(id,pymParent);//缓存iframe对象实体
+ pymParent.onMessage('height', function(he){
+ console.log("The frame "+id+" receive message height is "+he);
+ var pagemyIframe=$('.page-content .page-content-body .'+id);
+ var h=Math.max(this.minHeight,he);
+ pagemyIframe.height(h);
+ });
+ return pymParent;
+ };
+
+ if(cacheNum){//处ç†ç¼“å­˜iframeå’Œiframename标签
+ cacheNum="page-mainIframe"+cacheNum;
+ iframename="fraMain"+cacheNum;
+ }else{
+ cacheNum="page-mainIframe";
+ iframename="fraMain";
+ }
+ iframename=!!_iframeName?_iframeName:iframename;
+ _iframe= cacheNum;//注æ„这里_iframe是一个全局å˜é‡
+
+ var miframe=_iframe==""?"page-mainIframe": _iframe;
+ var pagemyIframe=$('.page-content .page-content-body .'+miframe);
+ var nagivJS=e&&e.data&&e.data.action?e.data.action:"";
+ nagivJS=(!!nagivJS&&nagivJS.length>0)?(nagivJS.trim().toLowerCase()=="null"?nagivJS:"javascript:$('.page-content .page-content-body ."+miframe+"')[0].contentWindow."+nagivJS.trim()+";"):"";
+ nagivJS=nagivJS.trim();
+
+ _runShiftJS=(!!shiftJS&&shiftJS.length>0)?(shiftJS.trim().toLowerCase()=="null"?shiftJS:"javascript:$('.page-content .page-content-body ."+miframe+"')[0].contentWindow."+shiftJS+";"):"";
+ if(pagemyIframe&&pagemyIframe.length>0){//如果iframeå·²ç»æ·»åŠ äº†ï¼Œåˆ™ç›´æŽ¥æ›´æ”¹url或者执行切æ¢æˆ–导航函数
+ var src=pagemyIframe.attr("src");
+ if((!!shiftJS||nagivJS.length>0)&&(src==url||src.split('?')[0]==url.split('?')[0])&& cacheNum!="page-mainIframe") { //url相åŒæ—¶,处ç†ç¼“å­˜shiftJS标签
+ //这里shiftJS必须定义iframe中的页é¢å®šä¹‰åˆ°window上的函数;
+ //pagemyIframe.attr("scrolling",_iframeAutoScroll);
+ cachedIframesObject.items(miframe).settings.xdomain=_xdomain;
+ if(nagivJS.length>0&&nagivJS.toLowerCase()!="null")
+ _runShiftJS=nagivJS;//如果是nagivJS导航过æ¥çš„,nagivJS优先级高于shiftJS,如果有nagivJS就用nagivJS替æ¢_runShiftJSï¼› 直接执行一次导航切æ¢
+ try{
+ if(_runShiftJS.trim().toLowerCase()!="null")
+ eval(_runShiftJS);
+ }catch(e){
+ if (e instanceof EvalError) {
+ console.log(e.name + " EvalError: " + e.message);
+ } else if (e instanceof SyntaxError) {
+ console.log(e.name + " SyntaxError: " + e.message);
+ }else if (e instanceof Error) {
+ if(e.name.toLowerCase().trim()=="typeerror")
+ {
+ //console.log($.i18n.prop('com_zte_ums_ict_framework_ui_clickTooFast'));
+ var parm={runShiftJS:_runShiftJS};
+ pagemyIframe.one('load',parm,function(e){
+ var runShiftJS=e&&e.data&&e.data.runShiftJS?e.data.runShiftJS:"";
+ if(runShiftJS.length>0&&runShiftJS.toLowerCase()!="null")
+ eval(runShiftJS);//点击太快了,页é¢æ²¡æœ‰åŠ è½½å®Œæ¯•ï¼Œé‚£å°±åŠ è½½å®Œæ¯•äº†å†æ¬¡æ‰§è¡Œ
+ })
+ }
+ }
+ return false;//返回false åŽç»­ä¸å†åšå…¶ä»–动作了
+ }
+ finally{
+ openoFrameWork.stopPageLoading();
+ }
+ }else{//å¦åˆ™urlä¸åŒ,或者url相åŒä½†æ²¡æœ‰shiftjs
+ if(nagivJS.length>0&&nagivJS.toLowerCase()!="null"){//如果是代ç å¯¼èˆªè¿‡æ¥çš„去掉urlå‚数中的默认action动作
+ url=url.split('?')[0];//去掉?å‚数,防止默认执行动作,åªå“应nagivJS指定的动作;
+ }
+ if(src.split('#')[0]!=url.split('#')[0])//如果相等说明是通过锚点导航的,真实url没有å˜åŒ–,对SPA应用比较普é
+ {
+ pagemyIframe.attr("src","");//urlå’Œsrcä¸åŒè¯´æ˜Žæ›´æ¢äº†é¡µé¢ï¼Œéœ€è¦æ¸…空é‡æ–°åŠ è½½
+ }else //if (src.trim()==url.trim()) //没有shiftjs并且url相åŒï¼Œè¯´æ˜Žä¸éœ€è¦å†æ¬¡åŠ è½½äº†,å·²ç»åŠ è½½è¿‡äº†
+ {
+ openoFrameWork.stopPageLoading();
+ }
+ pagemyIframe.attr("src",url);
+
+ if(nagivJS.length>0&&nagivJS.toLowerCase()!="null"){//如果是nagivJS导航过æ¥çš„,iframe加载完毕åŽæ‰§è¡Œä¸€æ¬¡å¯¼èˆªåˆ‡æ¢è„šæœ¬
+ var parm={nagivJS:nagivJS};
+ pagemyIframe.one('load',parm,function(e){
+ var nagivJS=e&&e.data&&e.data.nagivJS?e.data.nagivJS:"";
+ if(nagivJS.length>0&&nagivJS.toLowerCase()!="null")
+ eval(nagivJS);//如果没有加载过,加载åŽä¹Ÿè¦æ‰§è¡Œè·³è½¬çš„函数
+ });
+ }
+ if(_cssfile.length>0&&_cssfile.toLowerCase()!="null"){//如果é…置了cssSrc,æ¯æ¬¡åˆ‡æ¢éƒ½é‡æ–°æ‰§è¡Œä¸€è¾¹è¿™ä¸ªcss文件,防止有é—æ¼
+ parm={syncCSSJS:'openoFrameWork.SyncCSS(this,10,"'+_cssfile+'");openoFrameWork.stopPageLoading();'};
+ pagemyIframe.one('load',parm,function(e){
+ var syncCSSJS=e&&e.data&&e.data.syncCSSJS?e.data.syncCSSJS:"";
+ if(syncCSSJS.length>0&&syncCSSJS.toLowerCase()!="null")
+ eval(syncCSSJS);
+ });
+ }
+ }
+
+ }else{//å¦åˆ™æ·»åŠ æ–°çš„iframe元素 overflow:visible;
+ if(nagivJS.length>0&&nagivJS.toLowerCase()!="null"){//如果是代ç å¯¼èˆªè¿‡æ¥çš„去掉urlå‚数中的默认action动作
+ url=url.split('?')[0];//去掉?å‚数,防止默认执行动作,åªå“应nagivJS指定的动作;
+ }
+ var pdiv="pdiv_"+miframe;
+ if($("#"+pdiv).length<=0){//检查下,如果该div没有添加过就添加
+ pageContentBody.append("<div id='"+pdiv+"' style='height:800px;overflow:auto'></div>");
+ }
+ dealstartPageLoading();
+ pymParent=createIframe(pdiv, url,miframe,miframe,miframe,_xdomain,_iframeAutoScroll);
+ pagemyIframe=$(pymParent.iframe);
+
+ if(nagivJS.length>0&&nagivJS.toLowerCase()!="null"){//如果是nagivJS导航过æ¥çš„,iframe加载完毕åŽæ‰§è¡Œä¸€æ¬¡å¯¼èˆªåˆ‡æ¢
+ var parm={nagivJS:nagivJS};
+ pagemyIframe=$('.page-content .page-content-body .'+miframe);
+ if(pagemyIframe&&pagemyIframe.length>0){
+ pagemyIframe.one('load',parm,function(e){
+ var nagivJS=e&&e.data&&e.data.nagivJS?e.data.nagivJS:"";
+ if(nagivJS.length>0&&nagivJS.toLowerCase()!="null")
+ eval(nagivJS);//如果没有加载过,加载åŽä¹Ÿè¦æ‰§è¡Œè·³è½¬çš„函数
+ })
+ }
+ }
+
+ }
+ showIframe(miframe);
+ openoFrameWork.fixContentHeight(); // 调整高度
+ return true;
+ }
+ // 处ç†è¾¹æ èœå•
+ var dealLiAClick=function(source){
+ if (source.next().hasClass('sub-menu') == false) {
+ if ($('.btn-navbar').hasClass('collapsed') == false) {
+ $('.btn-navbar').click();
+ }
+ return;
+ }
+
+ if (source.next().hasClass('sub-menu always-open')) {
+ return;
+ }
+ var parent = source.parent().parent();
+ var the = source;
+ var menu = $('.page-sidebar-menu');
+ var sub = source.next();
+ var autoScroll = menu.data("auto-scroll") ? menu.data("auto-scroll") : true;
+ var slideSpeed = menu.data("slide-speed") ? parseInt(menu.data("slide-speed")) : 200;
+ parent.children('li.open').children('a').children('.arrow').removeClass('open');
+ parent.children('li.open').children('.sub-menu:not(.always-open)').slideUp(200);
+ parent.children('li.open').removeClass('open');
+ var slideOffeset = -200;
+ if (sub.is(":visible")) {
+ $('.arrow', source).removeClass("open");
+ source.parent().removeClass("open");
+ sub.slideUp(slideSpeed, function () {
+ if (autoScroll == true && $('body').hasClass('page-sidebar-closed') == false) {
+ if ($('body').hasClass('page-sidebar-fixed')) {
+
+ } else {
+ dealScrollTo(the, slideOffeset);
+ }
+ }
+ dealSidebarAndContentHeight();
+ });
+ } else {
+ $('.arrow', source).addClass("open");
+ source.parent().addClass("open");
+ sub.slideDown(slideSpeed, function () {
+ if (autoScroll == true && $('body').hasClass('page-sidebar-closed') == false) {
+ if ($('body').hasClass('page-sidebar-fixed')) {
+ dealScrollTo(the, slideOffeset);
+ }
+ }
+ dealSidebarAndContentHeight();
+ });
+ }
+ }
+ var dealSidebarMenu = function () {//这里注册和处ç†è¾¹æ èœå•çš„å„类点击事件
+ $('.page-sidebar').on('click', 'li > a', function (e) {
+ if ($(this).next().hasClass('sub-menu') == false) {
+ if ($('.btn-navbar').hasClass('collapsed') == false) {
+ $('.btn-navbar').click();
+ }
+ return;
+ }
+ if ($(this).next().hasClass('sub-menu always-open')) {
+ return;
+ }
+ dealLiAClick($(this));
+ e.preventDefault();
+ });
+
+ // 处ç†å·¦è¾¹å¯¼èˆªä¸­çš„èœå•è¿žæŽ¥ï¼Œæ˜¾ç¤ºåœ¨iframe中
+ $('.page-sidebar').on('click', ' li > a.iframe', function (e) {
+ //dealMenuItemClick($(this),e,"page-sidebar")
+ e.preventDefault();
+ var menuItemID=$(this).attr("id");
+ if(!!menuItemID&&menuItemID.length>0){
+ _setLocationHash(menuItemID);
+ _hashSource="dhByInterface";
+ }//else{
+ _isClicked=true;
+ dealMenuItemClick($(this),e,"page-sidebar");
+ //}
+ });
+ // 处ç†æ›´å¤šèœå•çš„èœå•è¿žæŽ¥ï¼Œæ˜¾ç¤ºåœ¨iframe中dropdown-menu
+ $('.page-breadcrumb').on('click', ' li > a.iframe', function (e) {
+ var url = $(this).attr("href");
+ if(url.length<2)
+ return;
+ e.preventDefault();
+ dealBreadcrumbBtnMenuItemClick($(this),e);
+ });
+ // 处ç†å¯ç¿»é¡µæ›´å¤šèœå•ä¸­çš„èœå•è¿žæŽ¥ï¼Œæ˜¾ç¤ºåœ¨iframe中dropdown-menu
+ $('#pageableDiv').on('click', ' div > a.iframe', function (e) {
+ var url = $(this).attr("href");
+ if(url.length<2)
+ return;
+ e.preventDefault();
+ dealBreadcrumbBtnMenuItemClick($(this),e);
+ });
+ // 处ç†å¯ç¿»é¡µæ›´å¤šèœå•ä¸­çš„èœå•è¿žæŽ¥ï¼Œæ˜¾ç¤ºåœ¨iframe中dropdown-menu
+ $('#pageableDiv').on('click', ' li > a.iframe', function (e) {
+ var url = $(this).attr("href");
+ if(url.length<2)
+ return;
+ e.preventDefault();
+ if(e.target){
+ var tg=$("span",e.target);
+ tg=tg.length>0?tg[0]:e.target;
+ $(".open a>div>span",e.target.parentNode.parentNode.parentNode.parentNode.parentNode).replaceWith(tg.outerHTML);
+ }
+ dealBreadcrumbBtnMenuItemClick($(this),e);
+ });
+
+ // 处ç†header下拉èœå•ä¸­çš„èœå•è¿žæŽ¥ï¼Œæ˜¾ç¤ºåœ¨iframe中
+ $('.dropdown').on('click', ' li > a.iframe', function (e) {
+ var url = $(this).attr("href");
+ if(url.length<2)
+ return;
+ e.preventDefault();
+ dealScrollTo();
+ dealstartPageLoading();
+
+ dealIframe($(this),e)
+ dealBreadcrumb($(this),false,e);
+ });
+ }
+ var getSceneURL=function(url){
+ if(url&&url.trim().length>0){
+ url=url.trim();
+ //url=
+ _sceneURLRootPath=_sceneURLRootPath+url;
+ }
+ }
+ var gurl="";//临时全局å˜é‡ï¼Œå­˜å‚¨å½“å‰åŠ è½½çš„moreèœå•ï¼Œå¦‚果加载过了,就ä¸å†åŠ è½½äº†ã€‚下é¢çš„方法中会用到
+ var moreMenusisLoaded=true;
+ var waittime=null;
+ var getBreadcrumbRightButtons=function(url,e){
+ if (url.length<2){
+ return;
+ }
+ url=openoFrameWork.handlBaseURL(url);
+ if (gurl==url){
+ if(e===true){
+ $('#pageableDiv').show();
+ }else if(e&&e.target&&e.currentTarget){
+ var defaultDisplay=$(e.target).attr("defaultDisplay");
+ defaultDisplay=(!defaultDisplay)?$(e.currentTarget).attr("defaultDisplay"):defaultDisplay;
+ if(defaultDisplay&&defaultDisplay.trim()=="false"){
+ $('#pageableDiv').hide();
+ }else{
+ $('#pageableDiv').show();
+ }
+ }
+ return;
+
+ }else{
+ gurl=url;
+ clearMoreOperations();
+ }
+ //处ç†eå‚数,注æ„eå¯èƒ½ä¸ºnull
+ var breadmenuID=e&&e.data&&e.data.breadcrumbBtnMenuItem&&e.data.breadcrumbBtnMenuItem.length>0?e.data.breadcrumbBtnMenuItem:"";
+ breadmenuID=breadmenuID.length<=0?(e&&e.breadcrumbBtnMenuItem&&e.breadcrumbBtnMenuItem.length>0?e.breadcrumbBtnMenuItem:""):breadmenuID;
+ moreMenusisLoaded=false;
+ $.ajax({
+ type: "GET",
+ cache: false,
+ url: url,
+ dataType: "html",
+ success: function (res) {
+ try{
+ //$('.page-breadcrumb').append(res);
+ var resScriptsSriped = stripHtmlScripts(res);
+ //$('.page-breadcrumb').append(resScriptsSriped);
+ $('.more-botton-zone').children().remove();
+ //V5新增逻辑,如果displayType = pageableDiv,那么就用滑动的DIVæ¥æ˜¾ç¤ºæ›´å¤šèœå•é‡Œé¢çš„内容,如果没有é…置,或为其他值,就按原有方å¼æ˜¾ç¤º
+ var tempDiv = $('<div style="display:none"></div>');
+ tempDiv.children().remove();
+ tempDiv.append(resScriptsSriped);
+
+ //获å–UL属性
+ var displayType = $('.dropdown-menu',tempDiv).attr('displayType');
+ if( displayType && displayType != 'pageableDiv'){
+ $('.more-botton-zone').append(resScriptsSriped);
+ $('#pageableDiv').hide();
+ }else{
+ var tempUl = $('.dropdown-menu',tempDiv);
+ if(tempUl.length>0){
+ moreOperations(tempUl[0]);
+ if(e&&e.target&&e.currentTarget){
+ var defaultDisplay=$(e.target).attr("defaultDisplay");
+ defaultDisplay=(!defaultDisplay)?$(e.currentTarget).attr("defaultDisplay"):defaultDisplay;
+ if(defaultDisplay&&defaultDisplay.trim()=="false"){
+ $('#pageableDiv').hide();
+ }else{
+ $('#pageableDiv').show();
+ }
+ }
+ }
+ }
+ runHtmlScripts(res);
+ }catch(ex){
+ }finally{
+ moreMenusisLoaded=true;
+ }
+ groupButtonAuthentication();
+ if(breadmenuID.length>0){//é¢åŒ…削导航æ¥çš„,åªéœ€è¦é‡æ–°ç”Ÿæˆé¢åŒ…削å³å¯
+ var menuitem=undefined;
+ var panel = $('.zte-theme-panel');
+ var navPosOption = $('.nav-pos-direction', panel).val();
+ //var items=$("a[id='"+breadmenuID+"']");
+ var items = undefined;
+ if (navPosOption === "vertical"){ //从垂直èœå•é‡Œé¢æ‰¾
+ items=$("#page-sidebar-menu a[id='"+breadmenuID+"']");
+
+ }else{//从水平èœå•é‡Œé¢æ‰¾
+ items=$(".hor-menu a[id='"+breadmenuID+"']");
+ }
+ if (!items || items.length < 1) {
+ items=$(".page-content a[id='"+breadmenuID+"']");
+ }
+ if(items.length>0){
+ for(var i=0;i<items.length;i++){
+ if($(items[i]).parentsUntil('.more-botton-zone .btn-group').hasClass('dropdown-menu')){
+ menuitem=$(items[i]);
+ break;
+ }
+ if($(items[i]).parentsUntil('#pageableDiv').hasClass('row1')){
+ menuitem=$(items[i]);
+ break;
+ }
+ }
+ }
+ if(!!menuitem&&menuitem.length>0)
+ dealBreadcrumbBtnMenuItemClick(menuitem,e);
+ }
+ },
+ error: function (xhr, ajaxOptions, thrownError) {//加载æ“作èœå•å¤±è´¥!com_zte_ums_ict_framework_ui_loadmenuerror
+ $('.page-breadcrumb').append('<h4>'+$.i18n.prop('com_zte_ums_ict_framework_ui_loadmenuerror')+'</h4>');
+ moreMenusisLoaded=true;
+ }
+ });
+ }
+
+ //处ç†å¤štab也场景 ----redirect 该标签暂时ä¿ç•™,ä¸å»ºè®®ä½¿ç”¨äº†
+ dealMultTabPage=function(clickedObject){
+ var url = clickedObject.attr("href");
+ if(!url||url.length<2)
+ return;
+ var redirect=clickedObject.attr("redirect"); //处ç†å¤štab页é¢çš„需求
+ if (!!redirect&&redirect.length>0){
+ var miframe=_iframe==""?"page-mainIframe": _iframe;
+ var pagemyIframe=$('.page-content .page-content-body .'+miframe); //.page-mainIframe
+ //var pagemyIframe=$('.page-content .page-content-body .page-mainIframe');
+ var oldhref="";
+ if(pagemyIframe&&pagemyIframe.length>0){
+ oldhref=pagemyIframe.attr("src");
+ if(url.split("?")[0]==oldhref.split("?")[0])
+ {
+ eval(redirect);
+ dealBreadcrumb(clickedObject,false,e);
+ return true;
+ }
+ }
+ };
+ return false;
+ };
+ //处ç†ä¸»èœå•é¢åŒ…削导航
+ var globleCurrentBreadcrumb="";
+ var globleCurrentMainMenuItemID="";
+ var dhByBreadcrumb = false;
+ var dealBreadcrumb=function(clickedObject,notGenUID,e){//notGenUID为trueå°±ä¸é‡æ–°ç”Ÿæˆid
+ var mbreadcrumb=$('.breadcrumbUl');
+ openoFrameWork.setPageTitle(clickedObject.find('span').text().trim());
+ var clieckedObj= clickedObject.parent('li');
+ if(clieckedObj.length == 0){ //分页å¼æ›´å¤šèœå•ï¼Œa链接的父亲是div
+ clieckedObj= clickedObject.parent('div');
+ }
+ //如果点击的是Fèœå•çš„ç«–èœå•ï¼Œè¿˜éœ€è¦æ‰¾åˆ°æ¨ªèœå•ä¸Šçš„对应父亲加入到clieckedObj
+ var navPosOption = $('.nav-pos-direction', panel).val();
+ var parentid = clickedObject.attr('hparentid');
+ var breadcrumGroupButtonSrc=clickedObject.attr("breadcrumGroupButtonSrc");
+ globleCurrentMainMenuItemID=clickedObject.attr("id");
+ var mhmtl="";
+ var url="";
+ var tempObj=null;
+ //var breadChangeType = e? (e.data ? e.data.breadChangeType:null):null;
+ if( dhByBreadcrumb ){
+ mhmtl = dealClickBreadcrumb(clieckedObj);
+ dhByBreadcrumb = "";
+ }else{
+ while (clieckedObj&&clieckedObj.length>0){
+ if(clieckedObj.children('a')){
+ if(!notGenUID){
+ url=openoFrameWork.getUniqueID("aid");//+Math.floor(Math.random() * (new Date()).getTime());
+ clieckedObj.children('a').attr("name",url);
+ }else{
+ url=clieckedObj.children('a').attr("name");
+ }
+ tempObj=clieckedObj.clone();
+ tempObj.children('a').removeClass('iframe');
+ tempObj.children('a').removeClass('active');
+ tempObj.children('a').attr("href","javascript:openoFrameWork.goToURL('"+url+"');");
+ var arrowdown = $(".fa-angle-down", tempObj.children('a'));
+ if (arrowdown) {
+ arrowdown.remove();
+ }
+ if(tempObj.children('a').length>0){
+ mhmtl=tempObj.children('a')[0].outerHTML+"<i class='fa fa-angle-right'></i>"+mhmtl;
+ }
+ //如果是Fèœå•å’Œæ¨ªèœå•çš„å­ç«–èœå•ç‚¹å‡»ï¼Œéœ€è¦åšç‰¹æ®Šå¤„ç†
+ if( clieckedObj.parent('ul').attr('id') == fMenuSiderDivId || clieckedObj.parent('ul').attr('id') == megaSiderDivId){
+ var id = clieckedObj.children( 'a' ).attr('hparentid');
+ //判断是Fèœå•è¿˜æ˜¯æ¨ªèœå•
+ var megaMenu = null;
+ if(navPosOption == openoFrameWork_menu_horizontal){
+ magaMenu = $('#'+megaDivId);
+ }else if(navPosOption == openoFrameWork_menu_fmenu){
+ magaMenu = $('#'+fMenuMegaDivId);
+ }
+ clieckedObj = $("a[id=" + id + "]" , magaMenu).parent('li');
+ }else{
+ clieckedObj=clieckedObj.parents('li');
+ }
+ }
+ }
+ if(clieckedObj[0]&&clieckedObj[0].length>0) {
+ mhmtl=clieckedObj.children('a')[0].outerHTML+"<i class='fa fa-angle-right'></i>"+mhmtl;
+ }
+ }
+ mbreadcrumb.empty();
+ $('.more-botton-zone').empty();
+ globleCurrentBreadcrumb=mhmtl;
+ store("globleCurrentBreadcrumb",globleCurrentBreadcrumb);
+ mbreadcrumb.append(mhmtl);
+ if(breadcrumGroupButtonSrc&&breadcrumGroupButtonSrc.length>0){
+ getBreadcrumbRightButtons(breadcrumGroupButtonSrc,e);
+ }else{
+ $('#pageableDiv').hide();
+ }
+
+ };
+ //é¢åŒ…屑å‘起的点击,就ä¸é‡æ–°ç”Ÿæˆé¢åŒ…屑,åªæ˜¯æŠŠè¯¥é¢åŒ…屑的åŽç»­èŠ‚点移出。
+ var dealClickBreadcrumb = function(clieckedObj){
+ var index = globleCurrentBreadcrumb.indexOf(clieckedObj.children('a').attr("name"));
+ if( index > -1 ){//截å–
+ var indexofSign = globleCurrentBreadcrumb.indexOf("<i class='fa fa-angle-right'>",index);
+ var newBreadcrumb = globleCurrentBreadcrumb.substring(0,indexofSign) + "<i class='fa fa-angle-right'></i>";
+ return newBreadcrumb;
+ }
+ }
+ //处ç†é¢åŒ…削中èœå•ç‚¹å‡»åŽçš„导航(更多èœå•çš„é¢åŒ…屑)
+ var dealBreadcrumbBtnGroupMenus=function(clickedObject,notGenUID , e ){
+ var mbreadcrumb=$('.breadcrumbUl');
+ var clieckedObj= clickedObject.parent();
+ var breadcrumGroupButtonSrc=clickedObject.attr("breadcrumGroupButtonSrc");
+ var mhmtl="";
+ var url="";
+ var tempObj=null;
+ var menuid=clickedObject.attr("id");
+ if (!breadcrumbBtnMenus.contains(menuid)) {//把当å‰é¢åŒ…削中的èœå•id和该å­èœå•å¯¹åº”的父èœå•å…³è”缓存起æ¥
+ breadcrumbBtnMenus.add(menuid,globleCurrentMainMenuItemID);
+ }
+ while (clieckedObj&&clieckedObj.length>0){
+ tempObj=clieckedObj.clone();
+ if(tempObj.children('a')){
+ tempObj.children('a').removeClass('iframe');
+ url=tempObj.children('a').attr("href");
+ tempObj.children('a').attr("onclick","openoFrameWork.openbreadcrumbLink($(this),event);");
+ var tempdiv = tempObj.children('a').children('div');
+ if( tempdiv.length > 0 ){
+ var innerofDiv = tempdiv[0].innerHTML;
+ tempdiv.remove();
+ tempObj.children('a')[0].innerHTML = innerofDiv;
+ }
+ if(tempObj.children('a').length>0){
+ mhmtl=tempObj.children('a')[0].outerHTML+"<i class='fa fa-angle-right'></i>"+mhmtl;
+ }
+ clieckedObj=clieckedObj.parents('li');
+ }
+
+ }
+ if(clieckedObj[0]&&clieckedObj[0].length>0) {
+ mhmtl=clieckedObj.children('a')[0].outerHTML+"<i class='fa fa-angle-right'></i>"+mhmtl;
+ }
+
+ if(breadcrumGroupButtonSrc&&breadcrumGroupButtonSrc.length>0){
+ getBreadcrumbRightButtons(breadcrumGroupButtonSrc,true);
+ }else{
+ $('#pageableDiv').hide();
+ }
+ mbreadcrumb.empty();
+ var category= clickedObject.attr("category");//处ç†èœå•ä¸­å®šä¹‰çš„Category属性
+ if(category&&category.length>0){//处ç†Category属性
+ var newIpPort=_menuCategorys.items(category);
+ if(newIpPort&&newIpPort.ipTitle&&newIpPort.ipTitle.trim()!=""){//如果找到了
+ mhmtl=newIpPort.ipTitle+'<i class="fa fa-angle-right"></i>'+mhmtl;
+ }
+ }
+ mhmtl=globleCurrentBreadcrumb+mhmtl;
+ mbreadcrumb.append(mhmtl);
+ };
+ var isMoreMenuItemClick = false;
+ var dealBreadcrumbBtnMenuItemClick=function(clickObj,e){
+ dealScrollTo();
+ var menuItemID=clickObj.attr("id");
+ if(!!menuItemID&&menuItemID.length>0){
+ _setLocationHash(menuItemID);
+ var breadmenuID=e&&e.data&&e.data.breadcrumbBtnMenuItem&&e.data.breadcrumbBtnMenuItem.length>0?e.data.breadcrumbBtnMenuItem:"";
+ _hashSource=breadmenuID&&breadmenuID.length>0?"":"dhByInterface";//hashè¿›æ¥çš„,ä¸æ˜¯å¯¼èˆªè¿›æ¥çš„。
+ }
+ if(!(e&&e.breadcrumbBtnMenuItem&&e.breadcrumbBtnMenuItem.length>0)){//如果仅仅是tab跳转设置breadè¿›æ¥çš„,就框架ä¸å¤„ç†èœå•ç‚¹å‡»ï¼Œç›´æŽ¥é‡æ–°å»ºç«‹breadå³å¯
+ dealstartPageLoading();
+ dealIframe(clickObj,e);
+ }
+ dealBreadcrumbBtnGroupMenus(clickObj,false,e);
+ }
+ // 固定边æ å¸ƒå±€æ—¶è®¡ç®—è¾¹æ é«˜åº¦.
+ var _calculateFixedSidebarViewportHeight = function () {
+ var viewport = _getViewPort();
+ var sidebarHeight =viewport.height - $('.header').height() + 1;
+ if ($('body').hasClass("page-footer-fixed")) {
+ sidebarHeight = sidebarHeight - (!$('.footer')||$('.footer').length<=0)?0:$('.footer').outerHeight();
+ }
+ return sidebarHeight;
+ }
+ // 处ç†å›ºå®šè¾¹æ 
+ var dealFixedSidebar = function () {
+ var menu = $('.page-sidebar-menu');
+ if (menu.parent('.slimScrollDiv').size() === 1) {
+ menu.removeAttr('style');
+ $('.page-sidebar').removeAttr('style');
+ }
+
+ if ($('.page-sidebar-fixed').size() === 0) {
+ dealSidebarAndContentHeight();
+ return;
+ }
+
+ var viewport = _getViewPort();
+ if (viewport.width >= openoFrameWork_smallView) {
+ var sidebarHeight = _calculateFixedSidebarViewportHeight();
+ dealSidebarAndContentHeight();
+ }
+ }
+ // 固定边æ æ—¶å¤„ç†èœå• hover 效果.
+ var dealFixedSidebarHoverable = function () {
+ if ($('body').hasClass('page-sidebar-fixed') === false) {
+ return;
+ }
+ $('.page-sidebar').off('mouseenter').on('mouseenter', function () {
+ dealSiderBarMouseenter();
+ });
+ $('.page-sidebar').off('mouseleave').on('mouseleave', function () {
+ dealSiderBarMouseLeave();
+ });
+ }
+ var dealSiderBarMouseenter=function(){
+ var body = $('body');
+ var siderbar=$('.page-sidebar');
+ if ((body.hasClass('page-sidebar-closed') === false || body.hasClass('page-sidebar-fixed') === false) || $(this).hasClass('page-sidebar-hovering')) {
+ return;
+ }
+ body.removeClass('page-sidebar-closed').addClass('page-sidebar-hover-on');
+ var siderbartoggle=$('.sidebar-toggler');
+
+ if (body.hasClass("page-sidebar-reversed")) {
+ siderbar.width(_sidebarWidth);
+ dealSiderBarWidthChange();
+ } else {
+ siderbar.addClass('page-sidebar-hovering');
+ siderbar.animate({
+ width: _sidebarWidth
+ }, 350, '', function () {
+ siderbar.removeClass('page-sidebar-hovering');
+ dealSiderBarWidthChange();
+ });
+ }
+ }
+ var dealSiderBarMouseLeave=function(){
+ var body = $('body');
+ if ((body.hasClass('page-sidebar-hover-on') === false || body.hasClass('page-sidebar-fixed') === false) || $(this).hasClass('page-sidebar-hovering')) {
+ return;
+ }
+ var siderbar=$('.page-sidebar');
+ var siderbartoggle=$('.sidebar-toggler');
+ if (body.hasClass("page-sidebar-reversed")) {
+ body.addClass('page-sidebar-closed').removeClass('page-sidebar-hover-on');
+ siderbar.width(_sidebarCollapsedWidth);
+ if(siderbartoggle){
+ siderbartoggle.removeAttr('style');
+ }
+ dealSiderBarWidthChange();
+ } else {
+ siderbar.addClass('page-sidebar-hovering');
+ siderbar.animate({
+ width: _sidebarCollapsedWidth
+ }, 350, '', function () {
+ body.addClass('page-sidebar-closed').removeClass('page-sidebar-hover-on');
+ dealSiderBarWidthChange();
+ siderbar.removeClass('page-sidebar-hovering');
+ if(siderbartoggle){
+ siderbartoggle.removeAttr('style');
+ }
+ });
+ }
+
+ }
+ //处ç†style css
+ var dealAddStyle=function(element, property, value, important) {
+ var styleText=element.attr('style')?element.attr('style'):"";
+ styles=styleText.split(";");
+ var find="";
+ for(i=0;i<styles.length;i++){
+ if(styles[i].indexOf(property)>=0){
+ find=styles[i];//看是å¦å·²ç»æ·»åŠ è¿‡,如果添加过就需è¦æ›¿æ¢æŽ‰
+ break;
+ }
+ }
+ styleText=find.length>0?styleText.replace(find,""):styleText;
+ styleText=(styleText + ';'+property + ':' + value + ((important) ? ' !important' : '') + ';').replace(/;;/g,";");
+ element.attr('style',styleText );
+ }
+ var dealSiderBarWidthChange=function(){
+
+ }
+ // 处ç†è¾¹æ èœå•åˆ‡æ¢æ—¶çš„关闭和éšè—.
+ var dealSidebarToggler = function () {
+ var viewport = _getViewPort();
+ if (getCookie('sidebar_closed') === '1' && viewport.width >= openoFrameWork_smallView) {
+ $('body').addClass('page-sidebar-closed');
+ }
+ $('.page-sidebar, .sidebar-toggler').on('click', '.sidebar-toggler', function (e) {
+ e.preventDefault();
+ var body = $('body');
+ var sidebar = $('.page-sidebar');
+ if(body.hasClass('page-sidebar-closed')){
+ $(this).removeAttr('style');
+ }
+ } );
+ $('.page-sidebar, .header').on('click', '.sidebar-toggler', function (e) {
+ var body = $('body');
+ var sidebar = $('.page-sidebar');
+ if ((body.hasClass("page-sidebar-hover-on") && body.hasClass('page-sidebar-fixed')) || sidebar.hasClass('page-sidebar-hovering')) {
+ body.removeClass('page-sidebar-hover-on');
+ sidebar.css('width', '').hide().show();
+ dealSidebarAndContentHeight(); //fix content & sidebar height
+ setCookie('sidebar_closed', '0');
+ dealSiderBarWidthChange();
+ e.stopPropagation();
+ runResponsiveHandlers();
+ return;
+ }
+ $(".sidebar-search", sidebar).removeClass("open");
+ var panel = $('.zte-theme-panel');
+ var sidebarPosOption = $('.sidebar-pos-option', panel).val();
+ var pcontent = $("[class='page-content']");
+ if (body.hasClass("page-sidebar-closed")) {
+ body.removeClass("page-sidebar-closed");
+ if (body.hasClass('page-sidebar-fixed')) {
+ sidebar.css('width', '');
+ }
+ setCookie('sidebar_closed', '0');
+ pcontent.css("marginLeft",_sidebarWidth);
+ dealSiderBarWidthChange();
+ } else {
+ body.addClass("page-sidebar-closed");
+ $(this).removeAttr('style');
+ setCookie('sidebar_closed', '1');
+ pcontent.css("marginLeft", _sidebarCollapsedWidth);
+ dealSiderBarWidthChange();
+ }
+ //针对侧边æ ä¼¸ç¼©çš„情况需加入对.page-content的判断。
+ dealSidebarAndContentHeight(true);
+ runResponsiveHandlers();
+ });
+ }
+ // 处ç†æ°´å¹³èœå•
+ var dealHorizontalMenu = function () {
+ $('.header').on('click', '.hor-menu .hor-menu-search-form-toggler', function (e) {
+ if ($(this).hasClass('off')) {
+ $(this).removeClass('off');
+ $('.header .hor-menu .search-form').hide();
+ } else {
+ $(this).addClass('off');
+ $('.header .hor-menu .search-form').show();
+ }
+ e.preventDefault();
+ });
+ // 处ç†æ°´å¹³èœå• 处ç†header下拉èœå•ä¸­çš„èœå•è¿žæŽ¥ï¼Œæ˜¾ç¤ºåœ¨iframe中
+ $('.header').on('click', ' li > a.iframe', function (e) {
+ //dealMenuItemClick($(this),e,"header");
+ e.preventDefault();
+ var menuItemID=$(this).attr("id");
+ if(!!menuItemID&&menuItemID.length>0){
+ _setLocationHash(menuItemID);
+ _hashSource="dhByInterface";
+ }//else{
+ _isClicked=true;
+ dealMenuItemClick($(this),e,"header");
+ //}
+ });
+ //处ç†TAB点击
+ $('.header').on('click', '.hor-menu a[data-toggle="tab"]', function (e) {
+ e.preventDefault();
+ var nav = $(".hor-menu .nav");
+ var active_link = nav.find('li.current');
+ $('li.active', active_link).removeClass("active");
+ $('.selected', active_link).remove();
+ var new_link = $(this).parents('li').last();
+ new_link.addClass("current");
+ new_link.find("a:first").append('<span class="selected"></span>');
+ });
+ }
+ // 增加一个对æœåŠ¡ç«¯çš„心跳
+ var doHeartbeat = function() {
+ //心跳超时次数
+ var heartBeatTimes = 0;
+ return setInterval(function() {
+ var userName;
+ if( userName == null ){
+ var userName = openoFrameWork_conf.userName;
+ }
+ var heartUrl = FrameConst.REST_HEARTBEAT + "?username=" + encodeURIComponent(userName);
+ $.ajax(heartUrl, {
+ dataType : "text",
+ cache : false
+ }).done(function(data) {
+ // if (data != "true") { //收到ä¸å±žäºŽå–值范围内的回å¤ï¼Œè¯´æ˜Žå‡ºçŽ°ä¸å¯é¢„知情况,å–消心跳。是原framework.js中的逻辑,比较奇怪,先ä¿ç•™æ³¨é‡Šã€‚
+ // disableHeartbeat();
+ // }
+ //收到心跳回应消æ¯ï¼Œå¿ƒè·³è¶…时次数置0
+ if( data == "true" ){
+ heartBeatTimes = 0;
+ }
+ });
+ heartBeatTimes++;
+ //心跳超时6次å³1分钟,转到登录界é¢ï¼Œè®¤ä¸ºé“¾è·¯æ–­ã€‚
+ if(heartBeatTimes >= 6){
+ disableHeartbeat();
+ //console.log(com_zte_ums_aos_framework_ui_heartbeat_timeout);
+ bootbox.alert($.i18n.prop('com_zte_ums_aos_framework_ui_heartbeat_fail'), function () {
+ window.location.replace("login.html");
+ });
+ }
+ }, 10000);
+ };
+ if( FrameConst.do_heartbeat ){
+ var heartbeatTimer = doHeartbeat();
+ }
+ window.enableHeartbeat = function() {
+ if (!heartbeatTimer) {
+ //é‡æ–°å¯åŠ¨å¿ƒè·³åŠŸèƒ½ï¼Œå¿ƒè·³è¶…时次数置0
+ heartBeatTimes = 0;
+ heartbeatTimer = doHeartbeat();
+ return "Enabled";
+ }
+ return "Already enabled!";
+ };
+ window.disableHeartbeat = function() {
+ if (heartbeatTimer) {
+ clearInterval(heartbeatTimer);
+ heartbeatTimer = null;
+ return "Disabled";
+ }
+ return "Already disabled!";
+ };
+ window.doLogout = function(){
+ logoutSubmit();
+ };
+ //处ç†ict注销确认
+ $('#trigger_logout').click(function(){
+ bootbox.confirm($.i18n.prop('com_zte_ums_ict_framework_ui_confirmlogout'), function(result) { //你确认è¦æ³¨é”€å—?
+ if(result){
+ doLogout();
+ }
+ });
+ });
+ // Handle full screen mode toggle
+ var isscreenFull=false;
+ var dealFullScreenMode = function() {
+ // 处ç†å…¨å±äº‹ä»¶
+ function toggleFullScreen() {
+ if(!screenfull.supportsFullScreen){//ä¸æ”¯æŒå…¨å±
+ if (isIE&&typeof window.ActiveXObject !== "undefined") { // Older IE.
+ var wscript = new ActiveXObject("WScript.Shell");
+ if (wscript !== null) {
+ wscript.SendKeys("{F11}");
+ isscreenFull=!isscreenFull;
+ }
+ }else{
+ isscreenFull=screenfull.supportsFullScreen;
+ };
+ }else{
+ screenfull.isFullScreen?screenfull.exitFullScreen():screenfull.requestFullScreen();
+ isscreenFull= screenfull.isFullscreen;
+ }
+ setTimeout(function(){
+ if(isscreenFull){
+ $("#fullscreen_label").text($.i18n.prop('com_zte_ums_ict_framework_ui_group_exitfullscreen'));
+ }else{
+ $("#fullscreen_label").text($.i18n.prop('com_zte_ums_ict_framework_ui_group_fullscreen'));
+ }
+ },500);
+ }
+
+ $('#trigger_fullscreen').click(function() {
+ toggleFullScreen();
+ });
+ }
+ //清ç†å½“å‰æ­£åœ¨æ˜¾ç¤ºçš„iframe之外缓存的iframe,
+ var dealClearCachedIframes=function(isall){
+ if (cachedIframes.count()>0) {
+ for (var i in cachedIframes.hash()) {
+ var pagemyIframe=$('.page-content .page-content-body .'+i);
+ if(pagemyIframe&&pagemyIframe.length>0){
+ if(isall==true){
+ pagemyIframe.attr("src","");
+ pagemyIframe.remove();
+ }else if(i!=_iframe)
+ pagemyIframe.attr("src","");
+ pagemyIframe.remove();
+ }
+ }
+ }
+ cachedIframes.clear();
+ if (cachedIframesObject.count()>0) {//清ç†ç¼“存的iframe实体对象。
+ for (var i in cachedIframesObject.hash()) {
+ if(i!=_iframe)
+ cachedIframesObject.remove(i);
+ }
+ }
+ }
+ var lastSelectedLayout = '';
+ var dealTheme = function () {
+ var panel = $('.zte-theme-panel');
+ if ($('body').hasClass('page-boxed') == false) {
+ $('.layout-option', panel).val("fluid");
+ }
+ $('.sidebar-option', panel).val("default");
+ $('.language-option', panel).val(defaultLanage);
+ $('.header-option', panel).val("fixed");
+ $('.footer-option', panel).val("default");
+ if ( $('.sidebar-pos-option').attr("disabled") === false) {
+ $('.sidebar-pos-option', panel).val(openoFrameWork.isRTL() ? 'right' : 'left');
+ }
+ var _resetLayout = function () {
+ dealResetLayout();
+ }
+ var _setLayout = function () {
+ dealSetLayout();
+ }
+ var setColor = function (color) {
+ var color_ = (openoFrameWork.isRTL() ? color + '-rtl' : color);
+ $('#style_color').attr("href", ICTFRAME_CONST_THEME_COLOR_CSS_PREFFIX + color_ + ".css");
+ setCookie('style_color', color);
+ syncColorCSS();
+ }
+ $('.toggler', panel).click(function () {
+ $('.toggler').hide();
+ $('.toggler-close').show();
+ $('.zte-theme-panel > .theme-options').show();
+ });
+
+ $('.toggler-close', panel).click(function () {
+ $('.toggler').show();
+ $('.toggler-close').hide();
+ $('.zte-theme-panel > .theme-options').hide();
+ });
+ $('.theme-colors > ul > li', panel).click(function () {
+ var color = $(this).attr("data-style");
+ setColor(color);
+ $('ul > li', panel).removeClass("current");
+ $(this).addClass("current");
+ });
+ $('.layout-option,.header-option, .sidebar-option, .footer-option, .sidebar-pos-option, .nav-pos-direction', panel).change(_setLayout);
+ if (getCookie('style_color') != undefined) {
+ setColor(getCookie('style_color'));
+ }
+ $('.language-option', panel).change(function(){
+ var languageOption = $('.language-option', panel).val();
+ setCookie('language-option', languageOption);
+ window.location.reload();
+ });
+ }
+ var dealResetLayout = function () {
+ $("body").
+ removeClass("page-boxed").
+ removeClass("page-footer-fixed").
+ removeClass("page-sidebar-fixed").
+ removeClass("page-header-fixed").
+ removeClass("page-sidebar-reversed");
+ $('.header > .header-inner').removeClass("container");
+ if ($('.page-container').parent(".container").size() === 1) {
+ $('.page-container').insertAfter('body > .clearfix');
+ }
+ if ($('.footer > .container').size() === 1) {
+ $('.footer').html($('.footer > .container').html());
+ } else if ($('.footer').parent(".container").size() === 1) {
+ $('.footer').insertAfter('.page-container');
+ }
+ $('body > .container').remove();
+ }
+ /*
+ * 此方法在客户端åˆå§‹åŒ–和设置é¢æ¿ä¸Šé€‰æ‹©èœå•æ–¹å‘的时候用。
+ * param navPosOption
+ */
+ var dealNavPos = function(navPosOption) {
+ // 横竖边æ åˆ‡æ¢åŠŸèƒ½ç¦ç”¨ï¼Œåˆ™è¿”回
+ var panel = $('.zte-theme-panel');
+ if ($('.nav-pos-direction', panel).attr("disabled") == "disabled") {
+ return;
+ }
+ var sidermenu = $("#page-sidebar-menu");
+ var hormenu = $("#main_hormenu");
+ var sidermenu = $("#page-sidebar-menu");
+ var hormenu = $("#main_hormenu");
+ var horSiderMenu = $('#' + megaSiderDivId );
+ var fhorMenu = $("#" + fMenuMegaDivId);
+ var fsiderMenu = $("#" + fMenuSiderDivId);
+ var pcontent = $("[class='page-content']");
+ if (sidermenu && sidermenu.length > 0 && hormenu && hormenu.length > 0 && fhorMenu && fhorMenu.length > 0) {
+ if (navPosOption === openoFrameWork_menu_horizontal) {
+ sidermenu.css('display','none');// 侧边æ éšè—
+ fhorMenu.css('display','none');
+ fsiderMenu.css('display','none');
+ pcontent.css("marginLeft",0);
+ $("body").addClass("page-full-width");//调整内容显示
+ hormenu.css("display", "block");//显示水平èœå•æ 
+ // 导航ä½ç½®ä¸ºæ°´å¹³èœå•æ—¶ï¼Œè¾¹æ å’Œè¾¹æ ä½ç½®ä¸ºé»˜è®¤å’Œé å·¦ï¼Œä¸”将其切æ¢åŠŸèƒ½ç¦ç”¨æŽ‰
+ $('.sidebar-option', panel).val("default");
+ $('.sidebar-option', panel).attr("disabled", true);
+ $('.sidebar-pos-option', panel).val("left");
+ $('.sidebar-pos-option', panel).attr("disabled", true);
+ } else if (navPosOption === openoFrameWork_menu_vertical ) {
+ $("body").removeClass("page-full-width");
+ sidermenu.css('display','block');//侧边æ æ˜¾ç¤º
+ var body = $('body');
+ if (body.hasClass("page-sidebar-closed")) {
+ pcontent.css("marginLeft", _sidebarCollapsedWidth);
+ } else {
+ pcontent.css("marginLeft", _sidebarWidth);
+ }
+ hormenu.css("display", "none");//éšè—æ°´å¹³èœå•æ 
+ fhorMenu.css('display','none');
+ fsiderMenu.css('display','none');
+ horSiderMenu.css('display','none');
+ $('.sidebar-option', panel).attr("disabled", false);
+ $('.sidebar-pos-option', panel).attr("disabled", false);
+ } else if(navPosOption === openoFrameWork_menu_fmenu ){
+ sidermenu.css('display','none');// 侧边æ éšè—
+ hormenu.css("display", "none");//éšè—æ°´å¹³èœå•æ 
+ fsiderMenu.css('display','none');
+ fhorMenu.css('display','block');
+ pcontent.css("marginLeft",0);
+ $("body").addClass("page-full-width");//调整内容显示
+ // 导航ä½ç½®ä¸ºæ°´å¹³èœå•æ—¶ï¼Œè¾¹æ å’Œè¾¹æ ä½ç½®ä¸ºé»˜è®¤å’Œé å·¦ï¼Œä¸”将其切æ¢åŠŸèƒ½ç¦ç”¨æŽ‰
+ $('.sidebar-option', panel).val("default");
+ $('.sidebar-option', panel).attr("disabled", true);
+ $('.sidebar-pos-option', panel).val("left");
+ $('.sidebar-pos-option', panel).attr("disabled", true);
+ }
+ }
+ }
+ var dealSetLayout = function(){
+ var panel = $('.zte-theme-panel');
+ var layoutOption = $('.layout-option', panel).val();
+ var languageOption = $('.language-option', panel).val();
+ var headerOption = $('.header-option', panel).val();
+ var footerOption = $('.footer-option', panel).val();
+ var navPosOption = $('.nav-pos-direction', panel).val();
+ dealNavPos(navPosOption);
+ var sidebarOption = $('.sidebar-option', panel).val();
+ var sidebarPosOption = $('.sidebar-pos-option', panel).val();
+ if (sidebarOption == "fixed" && headerOption == "default") {
+ alert($.i18n.prop('com_zte_ums_ict_framework_ui_fixedsidedefaultheaderError')); //页头ä¸æ”¯æŒå›ºå®šè¾¹æ ,先固定页头æ‰èƒ½å›ºå®šè¾¹æ .
+ $('.header-option', panel).val("fixed");
+ $('.sidebar-option', panel).val("fixed");
+ sidebarOption = 'fixed';
+ headerOption = 'fixed';
+ }
+ if (sidebarOption == "fixed" && sidebarPosOption == "right") {
+ alert($.i18n.prop('com_zte_ums_ict_framework_ui_fixedsiderightpositionError')); //固定边æ æƒ…况下,边æ ä¸èƒ½é å³ã€‚.
+ $('.sidebar-pos-option', panel).val("left");
+ sidebarPosOption = 'left';
+ }
+ dealResetLayout(); // reset layout to default state
+ if (layoutOption === "boxed") {
+ $("body").addClass("page-boxed");
+ // set header
+ $('.header > .header-inner').addClass("container");
+ var cont = $('body > .clearfix').after('<div class="container"></div>');
+ // set content
+ $('.page-container').appendTo('body > .container');
+ // set footer
+ if (footerOption === 'fixed') {
+ $('.footer').html('<div class="container">' + $('.footer').html() + '</div>');
+ } else {
+ $('.footer').appendTo('body > .container');
+ }
+ }
+ if (lastSelectedLayout != layoutOption) {
+ runResponsiveHandlers();
+ }
+ lastSelectedLayout = layoutOption;
+ //header
+ if (headerOption === 'fixed') {
+ $("body").addClass("page-header-fixed");
+ $(".header").removeClass("navbar-static-top").addClass("navbar-fixed-top");
+ } else {
+ $("body").removeClass("page-header-fixed");
+ $(".header").removeClass("navbar-fixed-top").addClass("navbar-static-top");
+ }
+ //sidebar
+ if ($('body').hasClass('page-full-width') === false) {
+ if (sidebarOption === 'fixed') {
+ $("body").addClass("page-sidebar-fixed");
+ } else {
+ $("body").removeClass("page-sidebar-fixed");
+ }
+ }
+ //footer
+ if (footerOption === 'fixed') {
+ $("body").addClass("page-footer-fixed");
+ } else {
+ $("body").removeClass("page-footer-fixed");
+ }
+ //sidebar position
+ if (openoFrameWork.isRTL()) {
+ if (sidebarPosOption === 'left') {
+ $("body").addClass("page-sidebar-reversed");
+ $('#frontend-link').tooltip('destroy').tooltip({placement: 'right'});
+ } else {
+ var pcontent = $("[class='page-content']");
+ pcontent.css("marginLeft",0);//侧边æ é å³ï¼Œåˆ™å·¦è¾¹å†…容填充为0
+ $("body").removeClass("page-sidebar-reversed");
+ $('#frontend-link').tooltip('destroy').tooltip({placement: 'left'});
+ }
+ } else {
+ if (sidebarPosOption === 'right') {
+ var pcontent = $("[class='page-content']");
+ pcontent.css("marginLeft",0);//侧边æ é å³ï¼Œåˆ™å·¦è¾¹å†…容填充为0
+ $("body").addClass("page-sidebar-reversed");
+ $('#frontend-link').tooltip('destroy').tooltip({placement: 'left'});
+ } else {
+ $("body").removeClass("page-sidebar-reversed");
+ $('#frontend-link').tooltip('destroy').tooltip({placement: 'right'});
+ }
+ }
+ dealSidebarAndContentHeight();
+ dealFixedSidebar();
+ dealFixedSidebarHoverable();
+ dealSiderBarWidthChange();
+ setCookie('layout-option', layoutOption);
+ setCookie('language-option', languageOption);
+ setCookie('header-option', headerOption);
+ setCookie('sidebar-option', sidebarOption);
+ setCookie('sidebar-pos-option', sidebarPosOption);
+ setCookie('nav-pos-direction', navPosOption);
+ }
+ var setCookie = function (key, value) {
+ if (store) {
+ store(key, value);
+ }
+ }
+ var getCookie = function (key) {
+ if (store) {
+ return store(key);
+ } else {
+ return undefined;
+ }
+ }
+ /*下é¢å¤„ç†å‰è¿›åŽé€€å’Œé”šç‚¹è®¿é—®*/
+ var _getLocationHash = function() {
+ return location.hash.replace("#_", "");
+ }
+ /*统一入å£è®¾ç½®é”šç‚¹*/
+ var _setLocationHash = function(menuItemID) {
+ location.hash = getLocationHashByMenuId(menuItemID);
+ }
+ var getLocationHashByMenuId = function(menuItemID){
+ return "#_" + menuItemID;
+ }
+ // hash control
+ var loadCurrentHash = function(e,data){
+ var locationhash = _getLocationHash(); //important
+ if(!!locationhash&&locationhash.length>0){
+ if(_hashSource.trim()=="dhByInterface"){
+ _hashSource="";
+ }else{
+ processChangedHash(locationhash,data);
+ }
+ }
+ }
+ // hash control è¿™ç§å†™æ³•å®‰å…¨ç‚¹
+ var processChangedHash = function(path) {
+ var id = path;
+ var action = undefined;
+ var spIndex = path.indexOf("/");
+ if(spIndex != -1) {
+ id = path.substring(0,spIndex);
+ action = path.substring(spIndex+1);
+ }
+ openoFrameWork.goToURLByIDAndNewAction(id,action);
+ }
+ var syncColorCSS=function(){//注册皮肤切æ¢äº‹ä»¶å¤„ç†å‡½æ•°ï¼Œå¤„ç†iframe中的皮肤切æ¢
+ var pagemyIframe=null;
+ if (cachedIframes.count()>0) {
+ for (var i in cachedIframes.hash()) {
+ pagemyIframe=$('.page-content .page-content-body .'+i);
+ if(pagemyIframe&&pagemyIframe.length>0){
+ openoFrameWork.SyncCSS(pagemyIframe[0],1,"");
+ }
+ }
+ }
+ }
+ var getCurrentVisibleIframe=function(){
+ var pagemyIframe=null;
+ if (cachedIframes.count()>0) {
+ for (var i in cachedIframes.hash()) {
+ if(cachedIframes.items(i)===1){
+ pagemyIframe=$('.page-content .page-content-body .'+i);
+ }
+ }
+ }
+ return pagemyIframe;
+ }
+ //处ç†è·¨åŸŸè¯·æ±‚代ç†ï¼Œé€šè¿‡è¯¥ä»£ç†è¿›è¡Œiframe间传递å‚数,注æ„这里的代ç†é¡µé¢proxy.html必须部署到è¦è·¨åŸŸçš„对端域的æœåŠ¡å™¨web根目录下
+ var dealCrossProxy=function(ifrm,crossproxysrc,ifmHeadlins,flag){//crossproxysrc这个是proxy.html对应的url根路径
+ var url=$.url(openoFrameWork.getCurrentScript(document));
+ var proxyHtmlPath=url.attr("directory")+"proxy/proxy.html"//这中情况适用于使用了该界é¢é›†æˆæ¡†æž¶çš„应用系统
+ var _ifmProxy=$('<iframe id="ifm_Proxy" name="ifm_Proxy" oldproxyorigin="'+crossproxysrc+'" src="'+crossproxysrc+proxyHtmlPath+'" style="border: 0px; margin: 0px; padding: 0px; width: 100%; display:none;" ></iframe>');
+ var _ifm=$('#ifm_Proxy');
+ _ifm.hide();
+ var pageContentBody=$('.page-content .page-content-body');
+ var linksrcs=new Array();
+ var linksids=new Array();
+ var linktyps=new Array();
+ var _src="";
+ for (i=0;i<ifmHeadlins.length;i++){
+ if(typeof ifmHeadlins[i].link.href!== "undefined"){
+ _src=ifmHeadlins[i].link.href;
+ linktyps.push("css");
+ }
+ else if(typeof ifmHeadlins[i].link.src!== "undefined"){
+ if(!!ifmHeadlins[i].link.src&&ifmHeadlins[i].link.src.length>0){
+ _src=ifmHeadlins[i].link.src;
+ linktyps.push("javascriptfile");
+ }else{
+ _src=ifmHeadlins[i].link.text;
+ linktyps.push("javascripttext");
+ }
+ }else{
+ linktyps.push("undefined");
+ }
+ linksrcs.push(_src);
+ linksids.push({"pos":ifmHeadlins[i].pos,"scope":ifmHeadlins[i].scope,"id":ifmHeadlins[i].link.id});
+ }
+ var parm={iFrame:ifrm,cssLinktyps:linktyps,cssLinksrcs:linksrcs,cssLinkids:linksids,origin:crossproxysrc,flag:flag};
+ if(_ifm&&_ifm.length<=0){//没有添加过
+ _ifmProxy.appendTo(pageContentBody);
+ _ifmProxy.one('load',parm,function(e){
+ var data={iFrame:e.data.iFrame,cssLinktyps:e.data.cssLinktyps,cssLinksrcs:e.data.cssLinksrcs,cssLinkids:e.data.cssLinkids,flag:flag};
+ $('#ifm_Proxy')[0].contentWindow.postMessage(data,e.data.origin);//window.location.origin
+ });
+ }else if(_ifm.attr("oldproxyorigin")!=crossproxysrc){//代ç†å·²ç»æ·»åŠ è¿‡äº†ï¼Œçœ‹æ˜¯å¦æ˜¯åŒä¸€ä¸ªç½‘站的代ç†ï¼Œå¦‚æžœä¸æ˜¯éœ€è¦é‡æ–°åŠ è½½
+ _ifm.attr("src","");
+ _ifm.attr("oldproxyorigin",crossproxysrc);
+ _ifm.one('load',parm,function(e){
+ var data={iFrame:e.data.iFrame,cssLinktyps:e.data.cssLinktyps,cssLinksrcs:e.data.cssLinksrcs,cssLinkids:e.data.cssLinkids,flag:flag};
+ $('#ifm_Proxy')[0].contentWindow.postMessage(data,e.data.origin);//window.location.origin
+ });
+ _ifm.attr("src",_ifmProxy.attr("src"));
+ }else{//å·²ç»æ·»åŠ è¿‡ï¼Œç›´æŽ¥è§¦å‘消æ¯å‘é€å³å¯
+ var data={iFrame:parm.iFrame,cssLinktyps:parm.cssLinktyps,cssLinksrcs:parm.cssLinksrcs,cssLinkids:parm.cssLinkids,flag:flag};
+ _ifm[0].contentWindow.postMessage(data,parm.origin);//window.location.origin
+ }
+ }
+ return {
+ init: function () {
+ if(zte_http_headers){
+ store("zte_http_headers",zte_http_headers);
+ }
+ dealInit();
+ dealResponsiveOnResize();
+ dealResponsiveOnInit();
+ dealClearCachedIframes(true); ////清ç†å½“å‰æ­£åœ¨æ˜¾ç¤ºçš„iframe之外缓存的iframe,
+ breadcrumbBtnMenus.clear();
+ dealFixedSidebar(); // deals fixed sidebar menu
+ dealFixedSidebarHoverable(); // deals fixed sidebar on hover effect
+ dealSidebarMenu(); // deals main menu
+ dealHorizontalMenu(); // deals horizontal menu
+ dealSidebarToggler(); // deals sidebar hide/show
+ dealTheme(); // deals style customer tool
+ dealSetLayout();
+ $(function() {
+ $(window).on('hashchange',function(){
+ loadCurrentHash();
+ });
+ });
+ dealFullScreenMode(); // deals full screen
+ $("#header_dropdown_user").css('display','block');
+ $("#com_zte_ums_ict_framework_img_netnumenLogo").css('display','inline');
+ $("#com_zte_ums_ict_framework_ui_main_title").css('display','inline');
+ handeCtxMenuitem();
+ },
+ //公开清ç†ç¼“存的所有Iframe的方法:isALL==true则清ç†æ‰€æœ‰ï¼Œå¦åˆ™æ¸…ç†å½“å‰æ­£åœ¨æ˜¾ç¤ºçš„iframe之外缓存的iframe,。
+ clearCachedIframes:function(isAll){
+ dealClearCachedIframes(isAll);
+ },
+
+ setBaseURLRoot:function(ipportStr){//èœå•urlçš„è·Ÿip和端å£ä¾‹å¦‚:http://10.74.151.122:21180
+ if (store) {
+ store('baseURLRoot', ipportStr);
+ }
+ var url = $.url(ipportStr);
+ location.hash=url.attr('fragment');
+ var auth=url.attr('query');
+ if (store) {
+ store('baseURLRootAuth', auth);
+ }
+ },
+ getBaseURLRoot:function(ipportStr){//èœå•urlçš„è·Ÿip和端å£ä¾‹å¦‚:http://10.74.151.122:21180
+ var rooturl="";
+ if (store) {
+ rooturl=store('baseURLRoot');
+ }
+ return !rooturl?"":rooturl;
+ },
+ clearBaseURLRoot:function(){//èœå•urlçš„è·Ÿip和端å£ä¾‹å¦‚:http://10.74.151.122:21180
+ if (store) {
+ store('baseURLRoot', "",-1);
+ }
+ },
+ setPageTitle:function(title){//设置页é¢æ ‡é¢˜
+ $('title').html(title+" - "+gdocTitle);
+ },
+ getLanguage:function(){//获å–语言
+ return openoFrameWork_conf.acceptLanguage;
+ },
+
+ getLocationHash:function(){
+ return _getLocationHash();
+ },
+ setSceneURLRootPath:function(sceneURLRootPath){
+ if(sceneURLRootPath&&sceneURLRootPath.trim().length>0){//如果定义了场景的全局å‚æ•°
+ _sceneURLRootPath=sceneURLRootPath.trim();
+ if(_sceneURLRootPath.charAt(_sceneURLRootPath.length-1)!='/')
+ {
+ _sceneURLRootPath=_sceneURLRootPath+'/';
+ }
+ }
+ },
+ //public function to add callback a function which will be called on window resize
+ addResponsiveHandler: function (func) {
+ responsiveHandlers.push(func);
+ },
+
+ hiddenAlarmLight:function(){
+ hideAlarmLight();
+ },
+
+ hiddenMenu:function(){
+ hidemenu();
+ },
+ setBreadcrumbByMenuID:function(id){
+ //var breaditem=$('#'+id);
+ var menuitem=undefined;
+ // var items=$("a[id='"+id+"']");
+ var items = undefined;
+ var panel = $('.zte-theme-panel');
+ var navPosOption = $('.nav-pos-direction', panel).val();
+ if (navPosOption === "vertical"){ //从垂直èœå•é‡Œé¢æ‰¾
+ items=$("#page-sidebar-menu a[id='"+id+"']");
+ if (!items || items.length < 1) {
+ items=$(".page-content a[id='"+id+"']");
+ }
+ }else if(navPosOption === openoFrameWork_menu_horizontal){//从水平èœå•é‡Œé¢æ‰¾
+ items=$("#main_hormenu a[id='"+id+"']");
+ if(items.length == 0){
+ //横èœå•æ²¡æœ‰æ‰¾åˆ°ï¼Œå†åœ¨æ¨ªèœå•çš„å­èœå•æ‰¾ä¸€æ¬¡
+ items=$("#page-megachild-sidebar-menu a[id='"+id+"']");
+ }
+ }else if(navPosOption === openoFrameWork_menu_fmenu){
+ items=$("#f_hormenu a[id='"+id+"']");
+ if(items.length == 0){
+ //横èœå•æ²¡æœ‰æ‰¾åˆ°ï¼Œå†åœ¨ç«–èœå•æ‰¾ä¸€æ¬¡ã€‚
+ items=$("#page-f-sidebar-menu a[id='"+id+"']");
+ }
+ }
+ var isbreadcrumbMenuItem=false;
+ if(items.length>0){
+ for(var i=0;i<items.length;i++){
+ if($(items[i]).parentsUntil('.header-inner').hasClass('hor-menu')){
+ menuitem=$(items[i]);
+ break;
+ }else if($(items[i]).parentsUntil('.page-container').hasClass('page-sidebar')){
+ menuitem=$(items[i]);
+ break;
+ }else if($(items[i]).parentsUntil('.more-botton-zone .btn-group').hasClass('dropdown-menu')){
+ menuitem=$(items[i]);
+ isbreadcrumbMenuItem=true;
+ break;
+ }else if($(items[i]).parentsUntil('#pageableDiv').hasClass('row1')){
+ menuitem=$(items[i]);
+ isbreadcrumbMenuItem=true;
+ break;
+ }
+ }
+ }
+
+ if(menuitem&&menuitem.length>0){
+ if(isbreadcrumbMenuItem){
+ dealBreadcrumbBtnGroupMenus(menuitem,false);
+ }else{
+ dealBreadcrumb(menuitem,true,null);
+ }
+ }else{
+ var breadcrumbBtnMenuItemParent="";
+ if(!menuitem||menuitem.length<=0){//没有找到该èœå•ï¼Œå¯èƒ½æ˜¯é¢åŒ…削中的,需è¦é¢å¤–处ç†
+ var menuItemID=id;
+ if (breadcrumbBtnMenus.contains(menuItemID)) {//有缓存
+ breadcrumbBtnMenuItemParent="#"+breadcrumbBtnMenus.items(menuItemID);
+ menuitem=$(breadcrumbBtnMenuItemParent);
+ //_breadcrumbSource=true;
+ }
+ }
+ var parm=undefined;
+ if(breadcrumbBtnMenuItemParent&&breadcrumbBtnMenuItemParent.length>0){
+ parm={breadcrumbBtnMenuItem:menuItemID};
+ }
+ if(parm&&menuitem&&menuitem.length>0) {
+ dealBreadcrumb(menuitem,true,parm);
+ }
+ }
+ },
+ setSiderbarCollapseWidth:function(width){
+ _sidebarCollapsedWidth = width;
+ },
+ getSiderbarCollapseWidth:function(){
+ return _sidebarCollapsedWidth;
+ },
+ setSidebarWidth:function(width){
+ _sidebarWidth = width;
+ },
+ getSidebarWidth:function(){
+ return _sidebarWidth;
+ },
+ //2015å¹´10月26日新增动æ€åˆ‡æ¢èœå•çš„功能,这里的èœå•è¿˜éœ€è¦å†æ¬¡æ›´æ¢èœå•é¡¹è®¿é—®çš„ip端å£ä¿¡æ¯
+ handlBaseURL:function(url){
+ var baseURLRoot=openoFrameWork.getBaseURLRoot();
+ if (baseURLRoot.length>0) {//2015å¹´10月26日新增动æ€åˆ‡æ¢èœå•çš„功能,这里的èœå•è¿˜éœ€è¦å†æ¬¡æ›´æ¢èœå•é¡¹è®¿é—®çš„ip端å£ä¿¡æ¯
+ baseURLRoot=openoFrameWork.getDomainURL(baseURLRoot);//去掉ipå’ŒportåŽå¤šä½™çš„部分
+ console.log("old a link href url:"+url);
+ url=baseURLRoot+url.replace(openoFrameWork.getDomainURL(url),"");
+ console.log("baseURLRoot:"+baseURLRoot+" newURL:"+url);
+ };
+ return url;
+ },
+
+ startPageLoading: function(message) {
+ dealstartPageLoading(message);
+ },
+ stopPageLoading: function() {
+ dealstopPageLoading();
+ },
+ //public function to get a paremeter by name from URL
+ getLocationURLParameter: function (paramName,separator) {
+ var searchString = decodeURIComponent(window.location.search.substring(1)).toLowerCase(),
+ i, val, params = searchString.split(separator?separator:"&");
+ paramName=paramName.toLowerCase();
+ for (i = 0; i < params.length; i++) {
+ val = params[i].split("=");
+ if (val[0] == paramName) {
+ return unescape(val[1]);
+ }
+ }
+ return null;
+ },
+ //public function to get a paremeter by name from URL
+ getURLParameter: function (paramName,url) {
+ var searchString = decodeURIComponent(url).toLowerCase(),
+ i, val, params = searchString.split("&");
+ paramName=paramName.toLowerCase();
+ for (i = 0; i < params.length; i++) {
+ val = params[i].split("=");
+ if (val[0] == paramName) {
+ return unescape(val[1]);
+ }
+ }
+ return null;
+ },
+ // check for device touch support
+ isTouchDevice: function () {
+ return isTouch;
+ },
+ getUniqueID: function(prefix) {
+ return prefix+'_' + Math.floor(Math.random() * (new Date()).getTime());
+ },
+ // check IE8 mode
+ isIE8: function () {
+ return isIE8;
+ },
+ // check IE9 mode
+ isIE9: function () {
+ return isIE9;
+ },
+ //check RTL mode
+ isRTL: function () {
+ return isRTL;
+ },
+ getViewPort:function(){
+ return _getViewPort();
+ },
+ // get layout color code by color name
+ getLayoutColorCode: function (name) {
+ if (layoutColorCodes[name]) {
+ return layoutColorCodes[name];
+ } else {
+ return '';
+ }
+ } ,
+ fixContentHeight: function () {
+ dealSidebarAndContentHeight();
+ },
+ dealAtoIframe:function(aObj,event){
+ var containerStr=aObj.parentsUntil('.page-container').hasClass('page-sidebar')?'page-sidebar':"";//
+ containerStr=aObj.parentsUntil('.header-inner').hasClass('hor-menu')?'header':containerStr;
+ dealMenuItemClick(aObj,event,containerStr);
+ _isClicked=false;
+ },
+ getDomainURL:function(urlAddress){
+ var url = $.url(urlAddress);
+ var protocol=url.attr('protocol');
+ var host=url.attr('host');
+ var port=url.attr('port');
+ var crossOrign=protocol+"://"+host+(port.length>0?":"+port:"");
+ return crossOrign;
+ },
+ getCurrentScript:function(doc) {//doc为 document对象
+ /* 注æ„该功能在其他脚本中调用时出safari获å–到的脚本路径为本方法所在脚本的路径,
+ 其他æµè§ˆå™¨èŽ·å–到的为调用该方法的脚本所在路径
+ å–得正在解æžçš„script节点
+ */
+ if(doc&&doc.currentScript) { //firefox 4+
+ console.log("0〠"+doc.currentScript.src);
+ return doc.currentScript.src;
+ }
+ // å‚考 https://github.com/samyk/jiagra/blob/master/jiagra.js
+ var stack;
+ try {
+ a.b.c(); //强制报错,以便æ•èŽ·e.stack
+ } catch(e) {//safari的错误对象åªæœ‰line,sourceId 或者高版本还有sourceURL
+ stack = e.stack;
+ if(e.sourceURL){//safari æµè§ˆå™¨æ²¡æœ‰e.stack但有e.sourceURL
+ stack=e.sourceURL;
+ }else if(!stack && window.opera){
+ //opera 9没有e.stack,但有e.Backtrace,但ä¸èƒ½ç›´æŽ¥å–å¾—,需è¦å¯¹e对象转字符串进行抽å–
+ stack = (String(e).match(/of linked script \S+/g) || []).join(" ");
+ }
+ console.log("1〠"+stack);
+ }
+ if(stack) {
+ /*e.stack最åŽä¸€è¡Œåœ¨æ‰€æœ‰æ”¯æŒçš„æµè§ˆå™¨å¤§è‡´å¦‚下:
+ *chrome23:
+ * at http://113.93.50.63/data.js:4:1
+ *firefox17:
+ *@http://113.93.50.63/query.js:4
+ *opera12:
+ *@http://113.93.50.63/data.js:4
+ *IE10:
+ * at Global code (http://113.93.50.63/data.js:4:1)
+ */
+ console.log("2〠"+stack);
+ stack = stack.split( /[@ ]/g).pop();//å–得最åŽä¸€è¡Œ,最åŽä¸€ä¸ªç©ºæ ¼æˆ–@之åŽçš„部分
+ stack = stack[0] == "(" ? stack.slice(1,-1) : stack;
+ console.log("3〠"+stack);
+ return stack.replace(/(:\d+)?:\d+$/i, "");//去掉行å·ä¸Žæˆ–许存在的出错字符起始ä½ç½®
+ }
+ if(doc){
+ var nodes = doc.getElementsByTagName("script"); //åªåœ¨head标签中寻找
+ for(var i = 0, node; node = nodes[i++];) {
+ if(node.readyState === "interactive") {
+ console.log("4〠"+(node.className = node.src));
+ return node.className = node.src;
+ }
+ }
+ }
+ },
+ /*下é¢çš„flag为0表示默认ä¸è§¦å‘å­™å­iframe中的onload事件,为1表示è¦è§¦å‘,flag为10则对cssSrcé‡å¤æ‰§è¡Œï¼Œå…¶ä»–ä¸åšé‡å¤æ‰§è¡Œ*/
+ SyncCSS:function(ifrm,flag,cssSrc){//将主框架中的皮肤css应用到打开的iframe页é¢ä¸­
+ if(!ifrm)return;
+ var ifmHeadlins = new Array();
+ if(cssSrc&&cssSrc.length>0&&cssSrc.endWith(".css")){
+ var _div = $('<a href="'+cssSrc+'"></a>');
+ var csslink=document.createElement("link");
+ csslink.href=_div[0].href;//这里åŒæ­¥èœå•å®šä¹‰ä¸­cssSrc属性指定的css文件到iframe
+ _div = null;
+ csslink.rel="stylesheet";
+ csslink.type="text/css";
+ csslink.id="ifram_csssrc";
+ ifmHeadlins.push({"pos":"head","scope":"all","link":csslink});//pos是添加到å­iframe中的ä½ç½®ï¼Œscope是å­çª—体作用返回,one表示直接å­çª—体,all表示嵌套所有å­çª—体
+ }
+ if(flag!=10){//当flag为10时下é¢çš„csså’Œjs都ä¸æ‰§è¡Œ
+ if($('#style_color').length>0){
+ var csslink=document.createElement("link");
+ csslink.href=$('#style_color')[0].href.replace(".css","_ifrm.css");//这里åŒæ­¥çš„皮肤页é¢ä¿®æ”¹ä¸ºåŽŸçš®è‚¤é¡µé¢æ–‡ä»¶ååŽç¼€æ·»åŠ ifrmçš„css皮肤文件
+ csslink.rel="stylesheet";
+ csslink.type="text/css";
+ csslink.id="style_color";
+ ifmHeadlins.push({"pos":"head","scope":"all","link":csslink});//pos是添加到å­iframe中的ä½ç½®ï¼Œscope是å­çª—体作用返回,one表示直接å­çª—体,all表示嵌套所有å­çª—体
+ }
+ // å°† font-awesome字体图标应用到模å—iframe
+ if($('#font_awesome').length>0){
+ var awesomelink=document.createElement("link");
+ awesomelink.href=$('#font_awesome')[0].href;
+ awesomelink.rel="stylesheet";
+ awesomelink.type="text/css";
+ awesomelink.id="font_awesome";
+ ifmHeadlins.push({"pos":"head","scope":"all","link":awesomelink});
+ }
+ // å°†pym.js or pym.min.js应用到模å—iframe
+ var pymjsObj=$("script[src*='/pym.']");//模糊查找
+ pymjsObj=pymjsObj.length>0?pymjsObj:$("script[src*='/pym1.']");
+ if(pymjsObj.length>0){
+ var pymjs=document.createElement("script");
+ pymjs.src=pymjsObj[0].src;
+ pymjs.type="text/javascript";
+ pymjs.id=!!pymjsObj[0].id?pymjsObj[0].id:"pymjs";
+ ifmHeadlins.push({"pos":"head","scope":"one","link":pymjs});
+ pymjs=document.createElement("script"); //pym脚本文件加载åŽè¦æ‰§è¡Œnew pym.Child()进行iframeå­çª—体实例化,便于å­çª—体和父窗体通讯new pym.Child({ id: '"+_iframe+"' ,polling: 1000})
+ var frameid=(_iframe.split('-').length>0?_iframe.split('-')[1]:"1");
+ pymjs.text="var t1;function pmchd(){console.log('In the frame "+_iframe+",pym code call is begining; '+(typeof pym!= 'undefined'));if(typeof pym != 'undefined'){pymChild"+frameid+" = new pym.Child({ id: 'pdiv_"+_iframe+"' ,polling: 500});window.clearInterval(t1); }};t1 = window.setInterval(pmchd,5);";
+ pymjs.type="text/javascript";
+ pymjs.id="pymChild";
+ ifmHeadlins.push({"pos":"htmlend","scope":"one","link":pymjs});
+ }
+ // å°†hk.js or hk.min.js应用到模å—iframe
+ var hkjsObj=$("script[src*='/hk.']");//模糊查找
+ hkjsObj=hkjsObj.length>0?hkjsObj:$("script[src*='/hk1.']");
+ if(hkjsObj.length>0){
+ var hkjs=document.createElement("script");
+ hkjs.src=hkjsObj[0].src;
+ hkjs.type="text/javascript";
+ hkjs.id=!!hkjsObj[0].id?hkjsObj[0].id:"hkjs";
+ ifmHeadlins.push({"pos":"head","scope":"one","link":hkjs});
+ hkjs=document.createElement("script"); ////hk.js 加载åŽæ‹¦æˆªajax请求进行转å‘
+ }
+ }
+ var crossOrign=openoFrameWork.getDomainURL(ifrm.src);
+ if( window.location.origin==crossOrign){ //第一层åŒåŸŸå¤„ç†
+ for (i=0;i<ifmHeadlins.length;i++){
+ var link=ifrm.contentDocument.getElementById(ifmHeadlins[i].link.id);
+ if(link){
+ if(link.parentNode.tagName.toUpperCase==="HEAD"){
+ ifrm.contentDocument.head.removeChild(link);
+ }else if(link.parentNode.tagName.toUpperCase==="HTML"){
+ ifrm.contentDocument.removeChild(link);
+ }
+ }
+ if(ifmHeadlins[i].pos=="head")
+ ifrm.contentDocument.head.appendChild(ifmHeadlins[i].link);
+ else if (ifmHeadlins[i].pos=="bodyend")
+ ifrm.contentDocument.body.appendChild(ifmHeadlins[i].link);
+ else if (ifmHeadlins[i].pos=="htmlend")
+ ifrm.contentDocument.body.parentNode.appendChild(ifmHeadlins[i].link);
+ }
+ //对iframe中åˆæœ‰åµŒå¥—一级iframe的地方进行åŒæ­¥ï¼ŒåªåŒæ­¥scope为allçš„
+ var childifrms=ifrm.contentDocument.getElementsByTagName("iframe");
+ if(childifrms&&childifrms.length>0){
+ var ifmHeadlins2 = new Array();
+ for (i=0;i<ifmHeadlins.length;i++){//筛选出scope为all的
+ if(ifmHeadlins[i].scope=="one") break;
+ ifmHeadlins2.push(ifmHeadlins[i]);
+ }
+ for(j=0;j<childifrms.length;j++){
+ var parm={ifmHeadlins:ifmHeadlins2};
+ var childOrign=openoFrameWork.getDomainURL(childifrms[j].src);
+ if(window.location.origin==childOrign){//åŒåŸŸ
+ var ifrmload=function(e){
+ for (i=0;i<e.data.ifmHeadlins.length;i++){
+ var ifmheadlink=$(e.data.ifmHeadlins[i].link).clone()[0];////注æ„这里必须克隆,å¦åˆ™ä¼šå‡ºçŽ°å…ƒç´ ç§»åŠ¨ï¼Œå‰é¢ifrm添加的都会被移出
+ var link=this.contentDocument.getElementById(ifmheadlink.id);
+ if(link){
+ if(link.parentNode.tagName.toUpperCase==="HEAD"){
+ this.contentDocument.head.removeChild(link);
+ }else if(link.parentNode.tagName.toUpperCase==="HTML"){
+ this.contentDocument.removeChild(link);
+ }
+ }
+ if(e.data.ifmHeadlins[i].pos=="head"){
+ this.contentDocument.head.appendChild(ifmheadlink);
+ }else if(e.data.ifmHeadlins[i].pos=="bodyend"){
+ this.contentDocument.body.appendChild(ifmheadlink);
+ }else if (ifmHeadlins2[i].pos=="htmlend"){
+ this.contentDocument.body.parentNode.appendChild(ifmheadlink);
+ }
+ }
+ }
+ $(childifrms[j]).off('onload',parm,ifrmload);
+ $(childifrms[j]).on('onload',parm,ifrmload);
+ $(childifrms[j]).trigger("onload");
+
+ }else{
+ if(ifmHeadlins2.length>0){
+ console.log('跨域访问: 系统将进入跨域访问代ç†å¤„ç†æµç¨‹ ');
+ dealCrossProxy(childifrms[j].name,childOrign,ifmHeadlins2,flag);
+ }
+ }
+ }
+ }
+ }else{
+ if(ifmHeadlins.length>0){
+ console.log('跨域访问: 系统将进入跨域访问代ç†å¤„ç†æµç¨‹ ');
+ dealCrossProxy(ifrm.name,crossOrign,ifmHeadlins,flag);
+ }
+ }
+ },
+ goToURL:function(url){
+ dhByBreadcrumb = true;//全局å˜é‡ï¼Œå£°æ˜Žæ­¤æ¬¡äº‹ä»¶æ˜¯ç”±ç‚¹å‡»é¢åŒ…屑å‘èµ·çš„
+ var showNav=openoFrameWork.getLocationURLParameter('showNav');
+ if(showNav=="false"){//如果ä¸æ˜¾ç¤ºèœå•,就强制刷新本页
+ location.reload();
+ }else{
+ url="a[name='"+url+"']";
+ $(url).click();
+ }
+ },
+ goToURLByName:function(name){
+ var showNav=openoFrameWork.getLocationURLParameter('showNav');
+ if(showNav=="false"){//如果ä¸æ˜¾ç¤ºèœå•,就强制刷新本页
+ location.reload();
+ }else{
+ url="a[name='"+name+"']";
+ $(url).click();
+ }
+ },
+ goToURLByID:function(id){
+ if(!id){
+ return;
+ }
+ var showNav=openoFrameWork.getLocationURLParameter('showNav');
+ if(showNav=="false"){//如果ä¸æ˜¾ç¤ºèœå•,就强制刷新本页
+ location.reload();
+ }else{
+ if(id.indexOf("#")<0){
+ id="#"+id;
+ }
+ $(id).click();
+ }
+ },
+ goToPortal:function(id){
+ var _url=top.location.href;
+ console.log(_url);
+ //_url="/ngict/iui/framework/";
+ var url=$.url(_url);
+ top.location=url.attr("directory")+"uifportal.html#"+id+"/";
+ },
+ //Category
+ goToURLByIDAndNewIPPort:function(id,newIPPort,newActionStr){
+ //先把NewIPPort对象:newIPPort={menuCategoryID:'vim',ipPortStr:'htpp://10.74.151.123:31180',newTitle:''}缓存到Category数组中,
+ //menuCategoryID属性是更多èœå•ä¸Šé…置的èœå•çš„分类id,;
+ //ipPortStr属性是该idçš„èœå•è¦æ›¿æ¢çš„æ–°çš„ip和端å£åœ°å€å­—符串,包括å议部分,比如http://10.74.151.64:21169
+ //newTitle属性用于放置新开ip的页é¢å¯¹åº”到é¢åŒ…屑上的å字,å¯ä»¥ä¸ºâ€œâ€ï¼Œç©ºæ ‡è¯†ä¸å…³æ³¨
+ _menuCategorys.replace(newIPPort.menuCategoryID,{ipPort:newIPPort.ipPortStr,ipTitle:newIPPort.newTitle});//把当å‰é¢åŒ…削中的èœå•id和该å­èœå•å¯¹åº”的父èœå•å…³è”缓存起æ¥
+ if (store) {
+ store('menuCategoryID', newIPPort.menuCategoryID+"[menuCategoryID]"+newIPPort.ipPortStr+"[menuCategoryID]"+(!!newIPPort.newTitle?newIPPort.newTitle:""));
+ }
+ //这里增加按照newIPPort.menuCategoryID分类加载moreèœå•çš„处ç†é€»è¾‘
+ //首先根æ®id找到对应的主èœå•èœå•é¡¹
+ var menuitem = this.findMenuItemByMenuId(id);
+ if(!menuitem||menuitem.length<=0){//主èœå•ä¸­æ²¡æœ‰æ‰¾åˆ°ï¼Œå°±æ‰¾moreèœå•ï¼Œæ‰¾åˆ°id对应的moreèœå•é¡¹æ‰€å±žçš„主èœå•é¡¹
+ var mainMenuId = this.getMenuItemId_From_MoreMenuRelation(id);
+ if( !!mainMenuId&&mainMenuId.length>0 ){//moreèœå•ä¸­æ‰¾åˆ°äº†id对应的主èœå•é¡¹id,根æ®id返回主èœå•é¡¹
+ menuitem = this.findMenuItemByMenuId(mainMenuId);
+ if(!!menuitem&&menuitem.length>0){
+ var more=$("#"+id,$('#pageableDiv')).parent();
+ $(".box.boxOperation", $(".carousel-inner")).removeClass("moreButtonSelected");
+ more=$('a>div.box',more);
+ if (more.hasClass('moreButtonSelected') == false){
+ more.addClass('moreButtonSelected');
+ }
+ var pagesTags=$('.item.moreButtonsTag');
+ if(pagesTags.length>0){
+ for(var i=0;i<pagesTags.length;i++){
+ var tags=$(pagesTags[i]);
+ tags.removeClass('active');
+ if($('.moreButtonSelected',tags).length>0){
+ tags.addClass('active');
+ }
+ }
+ }
+ }
+ }
+ }
+ //其次找到的èœå•é¡¹ä¸­newIPPort.menuCategoryID对应的src覆盖breadcrumgroupbuttonsrc属性值,
+ if(!!menuitem&&menuitem.length>0){
+ var mulsrc=menuitem.attr(newIPPort.menuCategoryID+"-multiInsrc");
+ if(!!mulsrc){
+ menuitem.attr("breadcrumgroupbuttonsrc" ,mulsrc);
+ getBreadcrumbRightButtons(mulsrc,true);
+ }
+ }
+ if (waittime) {
+ clearInterval(waittime);
+ }
+ waittime = setInterval(function () {
+ if(moreMenusisLoaded==true){
+ clearInterval(waittime);
+ openoFrameWork.goToURLByIDAndNewAction(id,newActionStr,null);
+ }
+ }, 10);
+ },
+ goToURLByIDAndNewAction:function(id,newActionStr,newBrowserPageOption){
+ if(!id){
+ return;
+ }
+
+ /*if(id.indexOf("#")<0){
+ id="#"+id;
+ }*/
+ var menuitem = this.findMenuItemByMenuId(id);
+ //处ç†æ–°å¼€é¡µé¢æƒ…况
+ if(newBrowserPageOption){
+ var href = ICTFRAME_CONST_DEFAULTPAGE_PATH;
+ var hash = getLocationHashByMenuId(id);
+ var newin=window.open(href + newBrowserPageOption.paramStr + hash,newBrowserPageOption.windowTitle);
+ newin.name=newActionStr;//注æ„è¿™ç§ä¼ é€’å‚数的方法,被打开的页é¢ä¸­éœ€è¦é€šè¿‡top.name中获å–该传递的å‚数。
+ return;
+ }
+ //$(window).off('hashchange', loadCurrentHash);
+ var menuItemID=menuitem?menuitem.attr("id"):"";
+ if(!!menuItemID&&menuItemID.length>0){
+ //menuItemID="#" + menuItemID;
+ //menuItemID=!!newActionStr?menuItemID:menuItemID+"/no";
+ _setLocationHash(menuItemID);
+ }
+ var breadcrumbBtnMenuItemParent="";
+ if(!menuitem||menuitem.length<=0){//没有找到该èœå•ï¼Œå¯èƒ½æ˜¯é¢åŒ…削中的,需è¦é¢å¤–处ç†
+ menuItemID=id;
+ if (breadcrumbBtnMenus.contains(menuItemID)) {//有缓存
+ breadcrumbBtnMenuItemParent=breadcrumbBtnMenus.items(menuItemID);
+ menuitem=this.findMenuItemByMenuId(breadcrumbBtnMenuItemParent);
+ //_breadcrumbSource=true;
+ }
+ // else{//在新增的å¯ç¿»é¡µçš„更多èœå•é‡Œé¢æ‰¾
+ // var pageDiv = $('#pageableDiv');
+ // menuitem=$('#' + menuItemID , pageDiv);
+ // }
+ if( menuitem && menuitem.length > 0){
+ isMoreMenuItemClick = true;
+ }
+ }
+ if(!menuitem||menuitem.length<=0){
+ //é¢åŒ…屑和主èœå•éƒ½æ²¡æœ‰æ‰¾åˆ°ï¼Œæƒ…况å¯èƒ½æ˜¯ï¼šæ›´å¤šèœå•ç‚¹å‡»æ‰“å¼€åŽï¼Œåˆ·æ–°ï¼Œhashå·²ç»æ›´æ”¹ï¼Œä½†æ˜¯å¯¹åº”的更多èœå•çš„html没有加载,需è¦æ‰¾åˆ°æ›´å¤šèœå•å’Œä¸»èœå•çš„对应关系
+ var mainMenuId = this.getMenuItemId_From_MoreMenuRelation( id );
+ if( mainMenuId ){
+ menuitem = this.findMenuItemByMenuId(mainMenuId);
+ }
+
+ }
+ if (store&&store("globleCurrentBreadcrumb")){
+ globleCurrentBreadcrumb=store("globleCurrentBreadcrumb");
+ //下é¢å¤„ç†ä¸‹åˆ·æ–°æ•´ä¸ªé¡µé¢åŽä»Žcookie中获å–æ¥çš„最åŽä¸€æ¬¡æ“作的é¢åŒ…屑对应的对应èœå•çš„name属性回写,便于é¢åŒ…屑事件å“应能够找到对应的èœå•
+ var al=$("a",$("<div>"+globleCurrentBreadcrumb+"</div>"));
+ var alink,gal;
+ for(i=0;i<al.length;i++){
+ alink=$(al[i]);
+ gal=$("a[id='"+alink.attr("id")+"']");//从整个页é¢æŸ¥æ‰¾
+ for(j=0;j<gal.length;j++){
+ $(gal[j]).attr("name",alink.attr("name"));
+ }
+ }
+ }
+ if(menuitem&&menuitem.length>0){
+ var panel = $('.zte-theme-panel');
+ var navPosOption = $('.nav-pos-direction', panel).val();
+ if(navPosOption === openoFrameWork_menu_fmenu){
+ var hparentid=menuitem.attr("hparentid");
+ var id=menuitem.attr("id");
+ var i=0,menuItemH=menuitem;
+ while (id!=hparentid&&i<20){
+ menuItemH=openoFrameWork.findMenuItemByMenuId(hparentid);
+ hparentid=menuItemH.attr("hparentid");
+ id=menuItemH.attr("id");
+ i++;
+ };
+ if(!menuItemH.hasClass('active'))
+ menuItemH.parent().addClass("active");
+ }
+ }else{
+ console.log("goToURLByIDAndNewAction():Can't find the menuitem.The menu ID is:"+id+".Please check if the ID or ID cache is correct.");
+ }
+ //try{
+ var parm=undefined;
+ if(!!newActionStr&&breadcrumbBtnMenuItemParent&&breadcrumbBtnMenuItemParent.length>0){
+ parm={action:newActionStr,breadcrumbBtnMenuItem:menuItemID};
+ }else if(!!newActionStr){
+ parm={action:newActionStr};
+ }else if(breadcrumbBtnMenuItemParent&&breadcrumbBtnMenuItemParent.length>0){
+ parm={breadcrumbBtnMenuItem:menuItemID};
+ }else if(mainMenuId){
+ isMoreMenuItemClick = true;
+ parm={breadcrumbBtnMenuItem:menuItemID};
+ }
+ //if(breadChangeType){
+ // if(!parm){
+ // parm = {};
+ // }
+ // parm.breadChangeType = breadChangeType;
+ //}
+ if(parm&&parm.action || parm&&parm.breadChangeType) {
+ _hashSource="dhByInterface";
+ }
+
+ if(menuitem&&menuitem.length>0){
+ menuitem.one('click',parm,function(e){ //临时一次性的注册一次click事件处ç†å‡½æ•°ï¼Œæ‰§è¡Œå®Œæ¯•ä¼šè‡ªåŠ¨åˆ é™¤
+ openoFrameWork.dealAtoIframe($(this),e);
+ //$(window).one('hashchange', loadCurrentHash);
+ return false;
+ });
+ menuitem.click();//åŽæ‰§è¡Œ
+ }
+ /*}catch(e){}
+ finally{
+ //$(window).on('hashchange', loadCurrentHash);
+ }*/
+ },
+
+ getBreadcrumbEle:function(){
+ return $('.breadcrumbUl')[0];
+ },
+
+
+ findMenuItemByMenuId:function( id ){
+ var menuitem=undefined;
+ var panel = $('.zte-theme-panel');
+ var navPosOption = $('.nav-pos-direction', panel).val();
+
+ var items = undefined;
+ if (navPosOption === "vertical"){ //从垂直èœå•é‡Œé¢æ‰¾
+ items=$("#page-sidebar-menu a[id='"+id+"']");
+ }else if(navPosOption === openoFrameWork_menu_horizontal){//从水平èœå•é‡Œé¢æ‰¾
+ items=$("#main_hormenu a[id='"+id+"']");
+ if(items.length == 0){
+ //横èœå•æ²¡æœ‰æ‰¾åˆ°ï¼Œå†åœ¨æ¨ªèœå•çš„å­èœå•æ‰¾ä¸€æ¬¡
+ items=$("#page-megachild-sidebar-menu a[id='"+id+"']");
+ }
+ }else if(navPosOption === openoFrameWork_menu_fmenu){
+ items=$("#f_hormenu a[id='"+id+"']");
+ if(items.length == 0){
+ //横èœå•æ²¡æœ‰æ‰¾åˆ°ï¼Œå†åœ¨ç«–èœå•æ‰¾ä¸€æ¬¡ã€‚
+ items=$("#page-f-sidebar-menu a[id='"+id+"']");
+
+ }
+
+ }
+ if( items&&items.length == 0 ){
+ console.log( 'fmenu alink length is :' + $("#page-f-sidebar-menu a").length );
+ console.log( 'cant find menu in sidemenuã€megamenu and fmenu , the menu id is ' + id );
+ }
+ if(items&&items.length>0){
+ for(var i=0;i<items.length;i++){
+ if($(items[i]).parentsUntil('.header-inner').hasClass('hor-menu')){
+ menuitem=$(items[i]);
+ break;
+ }else if($(items[i]).parentsUntil('.page-container').hasClass('page-sidebar')){
+ menuitem=$(items[i]);
+ break;
+ }
+ }
+ }
+ return menuitem;
+ },
+
+ getMenuItemId_From_MoreMenuRelation:function( id ){
+ var panel = $('.zte-theme-panel');
+ var navPosOption = $('.nav-pos-direction', panel).val();
+ var mainMenuId = null;
+ if (navPosOption === openoFrameWork_menu_vertical){
+ relationAry=sideBarMenu_to_moreMenu_frame;
+ }else if(navPosOption === openoFrameWork_menu_horizontal){
+ relationAry=horBarMenu_to_moreMenu_frame;
+ }else if(navPosOption === openoFrameWork_menu_fmenu){
+ relationAry=horBarMenu_to_moreMenu_frame;
+ }
+ if ( !relationAry || !id ){
+ return;
+ }
+ for ( var i = 0 ; i < relationAry.length ; i++ ){
+ var eachMain = relationAry[i];
+ var moreMenuIds = eachMain.moreMenuIds;
+ for ( var j = 0 ; j < moreMenuIds.length ; j++ ){
+ if( moreMenuIds[j] && moreMenuIds[j] == id ){
+ return eachMain.mainMenuId;
+ }
+ }
+ }
+ return null;
+ },
+
+ getMenuItemFoucsByID : function (id) {
+ if(!id){
+ return;
+ }
+ var menuitem=undefined;
+ // var items=$("a[id='"+id+"']");
+ var items = undefined;
+ var panel = $('.zte-theme-panel');
+ var navPosOption = $('.nav-pos-direction', panel).val();
+ if (navPosOption === "vertical"){ //从垂直èœå•é‡Œé¢æ‰¾
+ items=$("#page-sidebar-menu a[id='"+id+"']");
+ }else if(navPosOption === openoFrameWork_menu_horizontal){//从水平èœå•é‡Œé¢æ‰¾
+ items=$("#main_hormenu a[id='"+id+"']");
+ if(items.length == 0){
+ //横èœå•æ²¡æœ‰æ‰¾åˆ°ï¼Œå†åœ¨æ¨ªèœå•çš„å­èœå•æ‰¾ä¸€æ¬¡
+ items=$("#page-megachild-sidebar-menu a[id='"+id+"']");
+ }
+ }else if(navPosOption === openoFrameWork_menu_fmenu){
+ items=$("#f_hormenu a[id='"+id+"']");
+ if(items.length == 0){
+ //横èœå•æ²¡æœ‰æ‰¾åˆ°ï¼Œå†åœ¨ç«–èœå•æ‰¾ä¸€æ¬¡ã€‚
+ items=$("#page-f-sidebar-menu a[id='"+id+"']");
+
+ }
+ }
+ if(items.length>0){
+ for(var i=0;i<items.length;i++){
+ if($(items[i]).parentsUntil('.header-inner').hasClass('hor-menu')){
+ menuitem=$(items[i]);
+ break;
+ }else if($(items[i]).parentsUntil('.page-container').hasClass('page-sidebar')){
+ menuitem=$(items[i]);
+ break;
+ }
+ }
+ }
+ var breadcrumbBtnMenuItemParent="";
+ if(!menuitem||menuitem.length<=0){//没有找到该èœå•ï¼Œå¯èƒ½æ˜¯é¢åŒ…削中的,需è¦é¢å¤–处ç†
+ menuItemID=id;
+ if (breadcrumbBtnMenus.contains(menuItemID)) {//有缓存
+ breadcrumbBtnMenuItemParent="#"+breadcrumbBtnMenus.items(menuItemID);
+ menuitem=$(breadcrumbBtnMenuItemParent);
+ }
+ }
+ var parm = undefined;
+ if (breadcrumbBtnMenuItemParent && breadcrumbBtnMenuItemParent.length > 0) {
+ parm = {
+ breadcrumbBtnMenuItem : menuItemID
+ };
+ }
+ if (menuitem && menuitem.length > 0) {
+ menuitem.one('click', parm, function (e) { //临时一次性的注册一次click事件处ç†å‡½æ•°ï¼Œæ‰§è¡Œå®Œæ¯•ä¼šè‡ªåŠ¨åˆ é™¤
+ var containerStr = $(this).parentsUntil('.page-container').hasClass('page-sidebar') ? 'page-sidebar' : ""; //
+ containerStr = $(this).parentsUntil('.header-inner').hasClass('hor-menu') ? 'header' : containerStr;
+ _isClicked = false;
+ dealMenuItemGetFocus($(this),e,containerStr);
+ return false;
+ });
+ menuitem.click(); //åŽæ‰§è¡Œ
+ }
+ },
+ // 处ç†é¢åŒ…削中的按钮èœå•å¢žåŠ çš„导航连接,显示在iframe中
+ openbreadcrumbLink:function(aObject,e) {
+ var url = aObject.attr("href");
+ if(!url||url.length<2)
+ return;
+ e.preventDefault();
+ dealScrollTo();
+ var menuItemID=aObject.attr("id");
+ if(!!menuItemID&&menuItemID.length>0){
+ _setLocationHash(menuItemID);
+ _hashSource="dhByInterface";
+ }
+ dealstartPageLoading();
+ dealIframe(aObject,e);
+ },
+ getURLParam:function(name){
+ var reg = new RegExp("(^|&)" + name.toLowerCase() + "=([^&]*)(&|$)"); //构造一个å«æœ‰ç›®æ ‡å‚数的正则表达å¼å¯¹è±¡
+ var search =decodeURIComponent(location.search.substring(1)).toLowerCase();
+ var r =search.match(reg); //匹é…目标å‚æ•°
+ if (r != null) return unescape(r[2]);
+ return null; //返回å‚数值
+ }
+ };
+}();
+
+//抽å–html片段中任æ„ä½ç½®çš„script标签(包括代ç æ˜¯å†…嵌的情况)é€ä¸ªè¿è¡Œï¼ˆä¸ä¼šåœ¨å•ä¸ªscript加载ä¸åˆ°çš„时候åœä¸‹æ¥ï¼‰
+function runHtmlScripts(s) {
+ var div = document.createElement('div');
+ div.innerHTML = s;
+ var scripts = div.getElementsByTagName('script');
+
+ var currentRunningScriptSrcPath = {};
+ $(scripts).each(function() {
+ var src = this.src;
+ src = openoFrameWork.handlBaseURL(src);
+ if (src) {
+ currentRunningScriptSrcPath[src.substring(src.lastIndexOf("/") + 1)] = src.substring(0, src.lastIndexOf("/") + 1);
+ $.getScript(src);
+ } else {
+ $.globalEval(this.text || this.textContent || this.innerHTML || '');
+ }
+ });
+};
+
+function stripHtmlScripts(htmlContent) {
+ var divContent = document.createElement('div');
+ divContent.innerHTML = htmlContent;
+ var scripts = divContent.getElementsByTagName('script');
+
+ $(scripts).each(function() {
+ this.src = openoFrameWork.handlBaseURL(this.src);
+ this.parentNode.removeChild(this);
+ });
+ return divContent.innerHTML;
+};
+
+function getsiderBarMenu(url){
+ if (url.length<2){
+ return;
+ }
+ url=openoFrameWork.handlBaseURL(url);
+ openoFrameWork.startPageLoading();//èœå•åŠ è½½ä¸­è¯·ç¨å€™....
+ var pagesidebar=$('#page-sidebar-menu');
+ pagesidebar.empty();
+ pagesidebar.append("<li class='sidebar-toggler-wrapper'><div class='sidebar-toggler hidden-xs hidden-sm'></div></li>");
+ $.ajax({
+ type: "GET",
+ cache: false,
+ url: url,
+ dataType: "html",
+ success: function (res) {
+ //去除script标签以åŽæ·»åŠ åˆ°ä¸»æ¡†æž¶ä»¥é˜²æ­¢append方法因为加载script标签失败导致åŽé¢çš„代ç æ— æ³•è¿è¡Œ
+ //res = stripHtmlScripts(res);
+ var resScriptsSriped = stripHtmlScripts(res);
+ pagesidebar.append(resScriptsSriped);
+ runHtmlScripts(res);
+
+ siderBarMenuAuthentication();
+ dealMysqlBackupMenu();
+ //loadi18n_WebFramework_sideMenu();
+ setTimeout(function () {
+ openoFrameWork.stopPageLoading();
+ goToHomePage();
+ }, 1000);
+ },
+ error: function (xhr, ajaxOptions, thrownError) {
+ //$('#page-sidebar-menu').append('<h4 class="nav-load-error">'+$.i18n.prop('com_zte_ums_ict_framework_ui_loadmenuerror')+'</h4>');//加载系统èœå•å¤±è´¥!;//加载系统èœå•å¤±è´¥!
+ }
+ });
+};
+var setLayoutValueByCookie = function () {
+ var panel = $('.zte-theme-panel');
+ if (store('layout-option') != undefined) {
+ $('.layout-option', panel).val(store('layout-option'));
+ }
+ if (store('language-option') != undefined) {
+ $('.language-option', panel).val(store('language-option'));
+ }
+ if (store('sidebar-option') != undefined) {
+ $('.sidebar-option', panel).val(store('sidebar-option'));
+ }
+ if (store('header-option') != undefined) {
+ $('.header-option', panel).val(store('header-option'));
+ }
+ if (store('sidebar-pos-option') != undefined) {
+ $('.sidebar-pos-option', panel).val(store('sidebar-pos-option'));
+ }
+ var horMenuLoadTip = $("[class='nav-load-error']", $(".hormenu"));
+ var sideMenuLoadTip = $("[class='nav-load-error']", $("[class='page-sidebar-menu']"));
+ // 横竖èœå•éƒ½æ— é”™è¯¯æ示,都正确加载
+ // if ((!horMenuLoadTip || horMenuLoadTip.length <= 0) && (!sideMenuLoadTip || sideMenuLoadTip.length <= 0)) {
+ // if (store('nav-pos-direction') != undefined) {
+ // var navPosOption = store('nav-pos-direction');
+ // $('.nav-pos-direction', panel).val(navPosOption);
+ // } else {
+ $('.nav-pos-direction', panel).val('fmenu');
+ // $.ajax({
+ // "dataType" : 'json',
+ // "type" : "GET",
+ // "async" : false,
+ // url : FrameConst.REST_GET_FRAME_MENUDIRECTION + "&tmpstamp=" + new Date().getTime(),
+ // "success" : function (obj) {
+ // if (obj.value && (obj.value != "")) {
+ // $('.nav-pos-direction', panel).val(obj.value);
+ // }
+ // }
+ // });
+ //}
+ // } else {
+ // $('.nav-pos-direction', panel).attr("disabled", true);
+ // }
+};
+
+
+function iniFMenu() {
+ var fsidemenu = $('#' + fMenuSiderDivId);
+
+ if (fsidemenu) {
+ openoFrameWork.startPageLoading();
+
+ var menuContent = initLeftMenu();
+ fsidemenu.empty();
+ fsidemenu.append("<li class='sidebar-toggler-wrapper'><div class='sidebar-toggler hidden-xs hidden-sm'></div></li>");
+ fsidemenu.append(menuContent);
+ loadi18n_WebFramework('web-framework-menu-i18n', 'i18n/', 'openo_frame_left_menu_i18n');
+
+ openoFrameWork.stopPageLoading();
+ }
+};
+
+function goToHomePage(){
+ locationhash = openoFrameWork.getLocationHash();
+ if(!!locationhash&&locationhash.length>0){//有锚点,直接触å‘
+ var newIPPort=null;
+ if (store&&store('menuCategoryID')) {
+ var s=store('menuCategoryID').split('[menuCategoryID]');
+ if(s.length>2){
+ newIPPort={menuCategoryID:s[0],ipPortStr:s[1],newTitle:s[2]};
+ }
+ }
+ if(!!newIPPort){
+ openoFrameWork.goToURLByIDAndNewIPPort(locationhash,newIPPort,null);
+ }else{
+ openoFrameWork.goToURLByIDAndNewAction(locationhash,null,null);
+ }
+ }else{//å¦åˆ™è¿˜æ˜¯æ¨¡æ‹Ÿç‚¹å‡»é…置了start类的èœå•
+ var containerStr = "";
+ //var sidermenu = $("[class='page-sidebar-menu']", $("[class='page-sidebar navbar-collapse collapse']"));
+ var sidermenu = $("#page-sidebar-menu");
+ var hormenu = $("#main_hormenu");
+ var fhormenu = $('#' + fMenuMegaDivId);
+ var fhormenusider = $('#page-f-sidebar-menu');
+ var startmenu = null;
+ var navPosOption = $('.nav-pos-direction', panel).val();
+ // 侧边æ æ˜¾ç¤ºï¼Œæ ¹æ®ä¾§è¾¹æ CSS选择
+ if (navPosOption === "vertical") {
+ //containerStr=$('.page-sidebar').length>0?'.page-sidebar':"";
+ startmenu = $('.iframe.start' , sidermenu);
+ dealStartMenu( startmenu, sidermenu );
+ }
+ // æ°´å¹³èœå•æ˜¾ç¤ºï¼Œæ ¹æ®æ°´å¹³èœå•CSS选择
+ else if (navPosOption === "horizontal") {
+ //containerStr=$('.hor-menu').length>0?'.header':containerStr;
+ startmenu = $('.iframe.start' , hormenu);
+ dealStartMenu( startmenu, hormenu );
+
+ }
+ //Fèœå•çš„æ’èœå•æ˜¾ç¤º
+ else if (navPosOption === openoFrameWork_menu_fmenu) {
+ //containerStr=$('.hor-menu').length>0?'.header':containerStr;
+ startmenu = $('.iframe.start' ,fhormenu);
+ if (startmenu && startmenu.length < 1) {
+ startmenu = $('.iframe.start' ,fhormenusider);
+ }
+ dealStartMenu( startmenu, fhormenu,fhormenusider );
+ }
+ }
+};
+var dealStartMenu = function(startmenu , menuContainer,menuContainer2 ){
+ var timer =setInterval(function () {
+ if(startmenu&&startmenu.length>0){
+ startmenu.click();
+ clearInterval(timer);
+ }else{
+ console.log('the start menu click event is not be triggerd ,so do it repeat!!');
+ $('a[operation]', menuContainer).each(function () {
+ startmenu = $(this);
+ return false;
+ });
+ if (menuContainer2&&startmenu && startmenu.length < 1) {
+ $('a[operation]', menuContainer2).each(function () {
+ startmenu = $(this);
+ return false;
+ });
+ }
+ }
+ }, 100);
+ handeCtxMenuitem();
+ }
+// å±è”½æ¨ªç«–èœå•é¡¹çš„å³é”®åŠŸèƒ½
+function handeCtxMenuitem() {
+ $(".page-sidebar ul li a").each(function() {
+ if ($(this).attr("href") && $(this).attr("href") != "javascript:;" && $(this).attr("href") != "#") {
+ $(this).attr("oncontextmenu", "return false");
+ }
+ });
+ $(".hormenu li a").each(function() {
+ if ($(this).attr("href") && $(this).attr("href") != "javascript:;" && $(this).attr("href") != "#") {
+ $(this).attr("oncontextmenu", "return false");
+ }
+ });
+}
+function initBaseInfo(){
+ $("#logout_label").text($.i18n.prop('com_zte_ums_ict_framework_ui_group_logout'));
+ $("#fullscreen_label").text($.i18n.prop('com_zte_ums_ict_framework_ui_group_fullscreen'));
+ $("#changePwd_label").text($.i18n.prop('com_zte_ums_ict_framework_ui_changePwd'));
+ $("#com_zte_ums_ict_framework_moudle_about").text($.i18n.prop('com_zte_ums_ict_framework_moudle_about'));
+ $("#com_zte_ums_ict_framework_moudle_help").text($.i18n.prop('com_zte_ums_ict_framework_moudle_help'));
+ $("#zte_menu-toggler").attr("title",$.i18n.prop('com_zte_ums_ict_framework_moudle_menutoggler'));
+};
+window.closeModal = function(modalid) {
+ if(!modalid){
+ return;
+ }
+ if(modalid.indexOf("#")<0){
+ modalid="#"+modalid;
+ }
+ $(modalid).modal('hide');
+};
+function getLcsRight(lcsoperations) {
+ var lcsrights = new Array();
+ if (lcsoperations && (lcsoperations.length > 0)) {
+ // 请求åŽå°license value
+ //----test data----
+ // var testjson = '{"data":[{"id":"mylcs","name":"xxx","value":"false"}]}';
+ // var testopt = eval('(' + testjson + ')');
+ // var testarray = testopt.data;
+ //-----end test data---
+ var keys = {
+ "keys" : lcsoperations
+ };
+ var jsonvalues = JSON.stringify(keys);
+ var data = {
+ "data" : jsonvalues
+ };
+ var url=FrameConst.REST_GETLICENSEINFO + "?tmpstamp=" + new Date().getTime();
+ url=openoFrameWork.handlBaseURL(url);
+ $.ajax({
+ "dataType" : 'json',
+ "type" : "GET",
+ "async" : false,
+ "url" : url,
+ "data" : data,
+ //"contentType" : 'application/json; charset=utf-8',
+ "success" : function (response) {
+ if (response) {
+ lcsrights = response.data;
+ }
+ },
+ "error" : function (XMLHttpRequest, textStatus, errorThrown) {
+ lcsrights = null;
+ }
+ });
+ return lcsrights;
+ }
+ return lcsrights;
+}
+// 侧边æ èœå•é‰´æƒ
+function siderBarMenuAuthentication() {
+ // license 鉴æƒ
+ var menuids = new Array();
+ var lcsoperations = new Array();
+ //从页é¢DOMå–å¾—èœå•license项。
+ $('a[licenseid]', $('.page-sidebar-menu')).each(function () {
+ var licenseid = $(this).attr("licenseid");
+ if (licenseid) {
+ lcsoperations.push(licenseid);
+ var id = $(this).attr("id");
+ menuids.push(id);
+ }
+ });
+ var lcsrights = getLcsRight(lcsoperations);// å–å¾—licenseæ•°æ®ã€‚
+ if (lcsrights && (lcsrights.length == menuids.length)) {
+ // æ ¹æ®åŽå°license值判断所在èœå•é¡¹æ˜¯å¦æ˜¾ç¤º
+ for (var i = 0; i < menuids.length; i++) {
+ var id = menuids[i];
+ var lcskey = lcsoperations[i];
+ var lcsitem = lcsrights[i];
+ // èœå•é¡¹å¦‚æžœé…了licenseid, 并且ä¸æ˜¯true字符串, 则移除èœå•é¡¹
+ if (lcsitem.value != "True") {
+ $('#'+id, $('.page-sidebar-menu')).parent().remove();
+ }
+ }
+ }
+ var operations = new Array();
+ $('a[operation]', $('.page-sidebar-menu')).each(function () {
+ var operation = $(this).attr("operation");
+ if (operation) {
+ operations.push(operation);
+ }
+ }); // é历èœå•é¡¹ï¼Œæå–所有的æ“作ç 
+ var rightObj = getAllOperCodeRights(operations); // 对æ“作ç è¿›è¡Œé‰´æƒåˆ¤æ–­
+ $('a[operation]', $('.page-sidebar-menu')).each(function () {
+ var operation = $(this).attr("operation");
+ if (operation) {
+ if (!hasRight(operation, rightObj)) {
+ $(this).parent("li").remove(); // 删除没有æƒé™çš„èœå•é¡¹
+ }
+ }
+ });
+ rebuildSiderBarMenu();
+};
+// 横å‘èœå•æ é‰´æƒ
+function horMenuAuthentication( horMenuId ) {
+ // license 鉴æƒ
+ var menuids = new Array();
+ var lcsoperations = new Array();
+ //从页é¢DOMå–å¾—èœå•license项。
+ $('a[licenseid]', $('#'+ horMenuId)).each(function () {
+ var licenseid = $(this).attr("licenseid");
+ if (licenseid) {
+ lcsoperations.push(licenseid);
+ var id = $(this).attr("id");
+ menuids.push(id);
+ }
+ });
+ var lcsrights = getLcsRight(lcsoperations);// å–å¾—licenseæ•°æ®ã€‚
+ if (lcsrights && (lcsrights.length == menuids.length)) {
+ // æ ¹æ®åŽå°license值判断所在èœå•é¡¹æ˜¯å¦æ˜¾ç¤º
+ for (var i = 0; i < menuids.length; i++) {
+ var id = menuids[i];
+ var lcskey = lcsoperations[i];
+ var lcsitem = lcsrights[i];
+ // èœå•é¡¹å¦‚æžœé…了licenseid, 并且ä¸æ˜¯true字符串, 则移除èœå•é¡¹
+ if (lcsitem.value != "True") {
+ $('#'+id, $('#'+ horMenuId)).parent().remove();
+ }
+ }
+ }
+ var operations = new Array();
+ $('a[operation]', $('#'+ horMenuId)).each(function () {
+ var operation = $(this).attr("operation");
+ if (operation) {
+ operations.push(operation);
+ }
+ }); // é历èœå•é¡¹ï¼Œæå–所有的æ“作ç 
+ var rightObj = getAllOperCodeRights(operations); // 对æ“作ç è¿›è¡Œé‰´æƒåˆ¤æ–­
+ $('a[operation]', $('#'+ horMenuId)).each(function () {
+ var operation = $(this).attr("operation");
+ if (operation) {
+ if (!hasRight(operation, rightObj)) {
+ $(this).parent("li").remove(); // 删除没有æƒé™çš„èœå•é¡¹
+ }
+ }
+ });
+ rebuildHorMenu();
+};
+
+// “更多æ“作â€åˆ†ç»„按钮鉴æƒ
+function groupButtonAuthentication() {
+ // license 鉴æƒ
+ var menuids = new Array();
+ var lcsoperations = new Array();
+ //从页é¢DOMå–å¾—èœå•license项。
+ $('a[licenseid]', $('.more-botton-zone > li.btn-group')).each(function () {
+ var licenseid = $(this).attr("licenseid");
+ if (licenseid) {
+ lcsoperations.push(licenseid);
+ var id = $(this).attr("id");
+ menuids.push(id);
+ }
+ });
+ var lcsrights = getLcsRight(lcsoperations);// å–å¾—licenseæ•°æ®ã€‚
+ if (lcsrights && (lcsrights.length == menuids.length)) {
+ // æ ¹æ®åŽå°license值判断所在èœå•é¡¹æ˜¯å¦æ˜¾ç¤º
+ for (var i = 0; i < menuids.length; i++) {
+ var id = menuids[i];
+ var lcskey = lcsoperations[i];
+ var lcsitem = lcsrights[i];
+ // èœå•é¡¹å¦‚æžœé…了licenseid, 并且ä¸æ˜¯true字符串, 则移除èœå•é¡¹
+ if (lcsitem.value != "True") {
+ $('#'+id, $('.more-botton-zone > li.btn-group')).parent().remove();
+ }
+ }
+ }
+ // 增加mysql判断,如果数æ®åº“为mysql,去掉基础数æ®å¤‡ä»½åŠŸèƒ½èœå•é¡¹
+ var dbType = openoFrameWork_conf.dbType;
+ if (dbType == "mysql") {
+ $("#uep-ict-backup-baseDataBack",$('.more-botton-zone > li.btn-group')).parent().remove();
+ }
+ var operations = new Array();
+ $('a[operation]', $('.more-botton-zone > li.btn-group')).each(function () {
+ var operation = $(this).attr("operation");
+ if (operation) {
+ operations.push(operation);
+ }
+ }); // é历èœå•é¡¹ï¼Œæå–所有的æ“作ç 
+ var rightObj = getAllOperCodeRights(operations); // 对æ“作ç è¿›è¡Œé‰´æƒåˆ¤æ–­
+ $('a[operation]', $('.more-botton-zone > li.btn-group')).each(function () {
+ var operation = $(this).attr("operation");
+ if (operation) {
+ if (!hasRight(operation, rightObj)) {
+ $(this).parent("li").remove(); // 删除没有æƒé™çš„èœå•é¡¹
+ }
+ }
+ });
+ // 如果“更多èœå•â€ä¸‹æ²¡æœ‰å­èœå•äº†ï¼Œåˆ™åˆ é™¤æ•´ä¸ªâ€œæ›´å¤šèœå•â€ä¸‹æ‹‰æ¡†ã€‚
+ if ($('li > a', $('.more-botton-zone > li.btn-group')).length == 0) {
+ $('.more-botton-zone > li.btn-group').remove();
+ }
+};
+// 删除没有å­èœå•çš„一级èœå•ï¼ŒæŸ¥çœ‹æ–°èœå•æ˜¯å¦é…了登录默认页é¢ï¼Œå¦‚没有则指定第一个有æƒé™çš„èœå•ä½œä¸ºç™»å½•åŽé»˜è®¤é¡µé¢
+function rebuildSiderBarMenu() {
+ if ($('a.start').length == 0) {
+ $('li > a[href!="javascript:;"]', $('.page-sidebar-menu')).eq(0).addClass("start");
+ }
+ $('ul.sub-menu', $('.page-sidebar-menu')).each(function () {
+ if ($(this).has('li').length == 0) {
+ $(this).parent("li").remove();
+ }
+ });
+};
+// 删除没有å­èœå•çš„一级èœå•ï¼ŒæŸ¥çœ‹æ–°èœå•æ˜¯å¦é…了登录默认页é¢ï¼Œå¦‚没有则指定第一个有æƒé™çš„èœå•ä½œä¸ºç™»å½•åŽé»˜è®¤é¡µé¢
+function rebuildHorMenu() {
+ if ($('a.start').length == 0) {
+ $('li > a[href!="#"]', $('#main_hormenu')).eq(0).addClass("start");
+ }
+ $('ul.mega-menu-submenu', $('#main_hormenu')).each(function () {
+ if ($(this).has('li > a').length == 0) {
+ $(this).remove(); // 删空的分组列
+ }
+ });
+ //删除增加的分组div
+ $('div.zteDivWidth', $('#main_hormenu')).each(function () {
+ if ($(this).has('ul').length == 0) {
+ $(this).remove(); // 删空的分组列
+ }
+ });
+ $('ul.dropdown-menu', $('#main_hormenu')).each(function () {
+ if ($(this).has('ul').length == 0) {
+ $(this).parent("li").remove(); // 删空的一级èœå•æ 
+ }
+ });
+ $('li.divider', $('#main_hormenu')).each(function () {
+ if ($(this).next().hasClass('divider')) {
+ $(this).remove(); // 连续出现分隔线则删除一个
+ }
+ });
+ $('li.divider', $('#main_hormenu')).each(function () {
+ if ($(this).next().length == 0) {
+ $(this).remove(); // 如果分隔线在最åŽä¸€è¡Œï¼Œåˆ™åˆ é™¤ä¹‹
+ }
+ });
+}
+//获å–页é¢èœå•æ æ‰€æœ‰çš„æ“作ç æƒé™
+function getAllOperCodeRights(operations) {
+ var rights = new Array();
+ if( operations && operations.length > 0 ){
+ var data = {
+ "operations" : operations
+ };
+ var sendData = JSON.stringify(data);
+ var url=FrameConst.REST_CHECKRIGHT + "?data=" + sendData + "&tmpstamp=" + new Date().getTime();
+ url=openoFrameWork.handlBaseURL(url);
+ $.ajax({
+ "dataType" : 'json',
+ "type" : "GET",
+ "async" : false,
+ "url" : url,
+ "data" : null,
+ //"contentType" : 'application/json; charset=utf-8',
+ "success" : function (response) {
+ rights = response.value;
+ },
+ "error" : function (XMLHttpRequest, textStatus, errorThrown) {
+ if (XMLHttpRequest.status == 401) {
+ window.location.replace("login.html");
+ } else {
+ console.log('Communication Error!');
+ }
+ }
+ });
+ }
+ return {
+ opCodes : operations,
+ rights : rights
+ };
+};
+// 判断æ“作ç æ˜¯å¦æœ‰æƒé™
+function hasRight(opCode, rightObj) {
+ for (var i = 0; i < rightObj.opCodes.length; i++) {
+ if (rightObj.opCodes[i] == opCode) {
+ return (rightObj.rights[i] == true);
+ }
+ }
+ return false;
+};
+// 处ç†mysql环境下备份èœå•çš„åˆå¹¶é—®é¢˜
+function dealMysqlBackupMenu() {
+ var dbType = openoFrameWork_conf.dbType;
+ if (dbType !== undefined && dbType !== "mysql") {
+ return;
+ }
+ var sidermenu = $("[class='page-sidebar-menu']");
+ var hormenu = $(".hormenu");
+ //这段代ç å…ˆè¿™ä¹ˆå†™,htmlçš„ä½ç½®ä¸ä¸€å®šæ­£ç¡®ï¼Œå¦‚æžœåŽé¢ä½ç½®ä¸ä¸€è‡´ï¼Œå†ä¿®æ”¹ã€‚
+ if (sidermenu.length > 0 && $('#uep-ict-backup-dataBackup').length > 0) {
+ $('#uep-ict-backup-dataBackup', sidermenu).attr("breadcrumGroupButtonSrc", ICTFRAME_CONST_DATABACKUP_PATH);
+ }
+ if (hormenu.length > 0 && $('#uep-ict-backup-dataBackup').length > 0) {
+ $('#uep-ict-backup-dataBackup', hormenu).attr("breadcrumGroupButtonSrc", ICTFRAME_CONST_DATABACKUP_PATH);
+ $('#uep-ict-backup-dataBackup').parent('li').attr('style', 'display:block');
+ $('#uep-ict-backup-allDbStructBackup').parent('li').attr('style', 'display:none');
+ $('#uep-ict-backup-baseDataBack').parent('li').attr('style', 'display:none');
+ }
+};
+// æµè§ˆå™¨ç¼©å°åŽå¯¼èˆªæ éšè—的情况下点击navbar-toggle显示èœå•çš„å‰ç½®å·¥ä½œï¼Œ
+// æµè§ˆå™¨ç¼©å°åŽå¯¼èˆªæ éšè—的情况下点击navbar-toggle显示èœå•çš„å‰ç½®å·¥ä½œï¼Œ
+function dealMavToggle(navtoggle) {
+ var sidermenu = $("#page-sidebar-menu");
+ var hormenu = $("#main_hormenu");
+ var panel = $(".zte-theme-panel");
+ var siderbarpos = $(".nav-pos-direction", panel).val()
+ if ("hidden" == $(navtoggle).attr("navtoggledispattr")) {
+ $(navtoggle).attr("navtoggledispattr", "display");
+ sidermenu.css('display','block');//侧边æ æ˜¾ç¤º
+ hormenu.css("display", "none");//éšè—æ°´å¹³èœå•æ 
+ } else {
+ $(navtoggle).attr("navtoggledispattr", "hidden");
+ sidermenu.css('display','none');//侧边æ éšè—
+ hormenu.css("display", "none");
+ }
+};
diff --git a/common/src/main/webapp/thirdparty/js/core/pym.min.js b/common/src/main/webapp/thirdparty/js/core/pym.min.js
new file mode 100644
index 0000000..78b2f51
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/js/core/pym.min.js
@@ -0,0 +1,16 @@
+/*
+ * Copyright 2016, CMCC Technologies Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+(function(a){if(typeof define==="function"&&define.amd){define("pym",[],a)}else{if(typeof module!=="undefined"&&module.exports){module.exports=a()}else{window.pym=a.call(this)}}window.pym=a.call(this)})(function(){var a="xPYMx";function e(){var k,i;if(window.innerHeight&&window.scrollMaxY){k=window.innerWidth+window.scrollMaxX;i=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){k=document.body.scrollWidth;i=document.body.scrollHeight}else{k=document.body.offsetWidth;i=document.body.offsetHeight}}var j,l;if(self.innerHeight){if(document.documentElement.clientWidth){j=document.documentElement.clientWidth}else{j=self.innerWidth}l=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){j=document.documentElement.clientWidth;l=document.documentElement.clientHeight}else{if(document.body){j=document.body.clientWidth;l=document.body.clientHeight}}}if(i<l){pageHeight=l}else{pageHeight=i}if(k<j){pageWidth=k}else{pageWidth=j}arrayPageSize=new Array(pageWidth,pageHeight,j,l);return arrayPageSize}var g={};var c=function(i){var k=new RegExp("[\\?&]"+i.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]")+"=([^&#]*)");var j=k.exec(location.search);if(j===null){return""}return decodeURIComponent(j[1].replace(/\+/g," "))};var b=function(j,i){if(i.xdomain!=="*"){if(!j.origin.match(new RegExp(i.xdomain+"$"))){return}}return true};var h=function(l,i,j){var k=["pym",l,i,j];return k.join(a)};var f=function(j){var i=["pym",j,"(\\S+)","(.+)"];return new RegExp("^"+i.join(a)+"$")};var d=function(){var n=document.querySelectorAll("[data-pym-src]:not([data-pym-auto-initialized])");var m=n.length;for(var i=0;i<m;++i){var l=n[i];l.setAttribute("data-pym-auto-initialized","");if(l.id===""){l.id="pym-"+i}var o=l.getAttribute("data-pym-src");var k=l.getAttribute("data-pym-xdomain");var j={};if(k){j.xdomain=k}new g.Parent(l.id,o,j)}};g.Parent=function(m,j,i){this.id=m;this.url=j;this.el=document.getElementById(m);this.iframe=null;this.minHeight="0";this._olddisplay="";this.oldHeight=0;this.childpageType="";this.setMinHeight=function(n){this.minHeight=n;this._onHeightMessage(n)};this.settings={xdomain:"*"};this.messageRegex=f(this.id);this.messageHandlers={};i=(i||{});this._constructIframe=function(){var o=this.el.offsetWidth.toString();this.iframe=document.createElement("iframe");var q="";var n=this.url.indexOf("#");if(n>-1){q=this.url.substring(n,this.url.length);this.url=this.url.substring(0,n)}if(this.url.indexOf("?")<0){this.url+="?"}else{this.url+="&"}this.iframe.src=this.url.trim().indexOf("javascript:")>=0?"":this.url+"initialWidth="+o+"&childId="+this.id;"&parentUrl="+encodeURIComponent(window.location.href)+q;this.iframe.setAttribute("width","100%");this.iframe.setAttribute("scrolling","no");this.iframe.setAttribute("marginheight","0");this.iframe.setAttribute("frameborder","0");this.el.appendChild(this.iframe);var p=this;window.addEventListener("resize",this._onResize)};this._onResize=function(){this.sendWidth()}.bind(this);this._fire=function(o,p){if(o in this.messageHandlers){for(var n=0;n<this.messageHandlers[o].length;n++){this.messageHandlers[o][n].call(this,p)}}};this.remove=function(){window.removeEventListener("message",this._processMessage);window.removeEventListener("resize",this._onResize);this.el.removeChild(this.iframe)};this._processMessage=function(q){if(!b(q,this.settings)){return}if(typeof q.data!=="string"){return}var n=q.data.match(this.messageRegex);if(!n||n.length!==3){return false}var o=n[1];var p=n[2];this._fire(o,p)}.bind(this);this._onHeightMessage=function(o){var n=parseInt(o);n=Math.max(this.minHeight,n);if(this.oldHeight!=n){if(this.childpageType&&this.childpageType.length>0&&this.childpageType==="isc"){console.log("parent window detect that the child iframe page loaded smartclient,the iframe height will ignore the child's Height change message;");if(this.minHeight<n){n=this.minHeight}}this.oldHeight=n;this.iframe.setAttribute("height",n+"px")}};this._onNavigateToMessage=function(n){document.location.href=n};this._onChildpageTypeMessage=function(n){this.childpageType=n};this.onMessage=function(n,o){if(!(n in this.messageHandlers)){this.messageHandlers[n]=[]}this.messageHandlers[n].push(o)};this.sendMessage=function(n,o){this.el.getElementsByTagName("iframe")[0].contentWindow.postMessage(h(this.id,n,o),"*")};this.sendWidth=function(){var n=this.el.offsetWidth.toString();this.sendMessage("width",n)};for(var k in i){this.settings[k]=i[k]}this.onMessage("height",this._onHeightMessage);this.onMessage("navigateTo",this._onNavigateToMessage);this.onMessage("childpageType",this._onChildpageTypeMessage);var l=this;window.addEventListener("message",this._processMessage,false);this._constructIframe();return this};g.Child=function(i){this.parentWidth=null;this.id=null;this.oldHeight=0;this.parentUrl=null;this.settings={renderCallback:null,xdomain:"*",polling:0};this.messageRegex=null;this.messageHandlers={};i=(i||{});this.onMessage=function(m,n){if(!(m in this.messageHandlers)){this.messageHandlers[m]=[]}this.messageHandlers[m].push(n)};this._fire=function(n,o){if(n in this.messageHandlers){for(var m=0;m<this.messageHandlers[n].length;m++){this.messageHandlers[n][m].call(this,o)}}};this._processMessage=function(p){if(!b(p,this.settings)){return}if(typeof p.data!=="string"){return}var m=p.data.match(this.messageRegex);if(!m||m.length!==3){return}var n=m[1];var o=m[2];this._fire(n,o)}.bind(this);this._onWidthMessage=function(n){var m=parseInt(n);if(m!==this.parentWidth){this.parentWidth=m;if(this.settings.renderCallback){this.settings.renderCallback(m)}this.sendHeight()}};this.sendMessage=function(m,n){window.parent.postMessage(h(this.id,m,n),"*")};this.sendHeight=function(){var n=document.getElementsByTagName("body")[0];height=n.offsetHeight;if(typeof isc!="undefined"&&l.oldPageType!="isc"){height=5;console.log("child iframe id="+l.id+" loaded smartclient");l.oldPageType="isc";l.sendMessage("childpageType","isc")}var m=0;if(l.oldHeight>height){m=l.oldHeight-height}else{m=height-l.oldHeight}if(m<=70){return}if(l.oldHeight!=height){l.oldHeight=height;console.log("child iframe id="+l.id+" sedHeight:"+height);l.sendMessage("height",height)}}.bind(this);this.scrollParentTo=function(m){this.sendMessage("navigateTo","#"+m)};this.navigateParentTo=function(m){this.sendMessage("navigateTo",m)};this.id=c("childId")||i.id;this.messageRegex=new RegExp("^pym"+a+this.id+a+"(\\S+)"+a+"(.+)$");var k=parseInt(c("initialWidth"));this.parentUrl=c("parentUrl");this.onMessage("width",this._onWidthMessage);for(var j in i){this.settings[j]=i[j]}var l=this;window.addEventListener("message",this._processMessage,false);if(this.settings.renderCallback){this.settings.renderCallback(k)}this.sendHeight();if(this.settings.polling){window.setInterval(this.sendHeight,this.settings.polling)}return this};d();return g});
diff --git a/common/src/main/webapp/thirdparty/js/jquery-ui.js b/common/src/main/webapp/thirdparty/js/jquery-ui.js
new file mode 100644
index 0000000..0213552
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/js/jquery-ui.js
@@ -0,0 +1,18706 @@
+/*! jQuery UI - v1.12.1 - 2016-09-14
+* http://jqueryui.com
+* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
+* Copyright jQuery Foundation and other contributors; Licensed MIT */
+
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+
+ // AMD. Register as an anonymous module.
+ define([ "jquery" ], factory );
+ } else {
+
+ // Browser globals
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+$.ui = $.ui || {};
+
+var version = $.ui.version = "1.12.1";
+
+
+/*!
+ * jQuery UI Widget 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Widget
+//>>group: Core
+//>>description: Provides a factory for creating stateful widgets with a common API.
+//>>docs: http://api.jqueryui.com/jQuery.widget/
+//>>demos: http://jqueryui.com/widget/
+
+
+
+var widgetUuid = 0;
+var widgetSlice = Array.prototype.slice;
+
+$.cleanData = ( function( orig ) {
+ return function( elems ) {
+ var events, elem, i;
+ for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {
+ try {
+
+ // Only trigger remove when necessary to save time
+ events = $._data( elem, "events" );
+ if ( events && events.remove ) {
+ $( elem ).triggerHandler( "remove" );
+ }
+
+ // Http://bugs.jquery.com/ticket/8235
+ } catch ( e ) {}
+ }
+ orig( elems );
+ };
+} )( $.cleanData );
+
+$.widget = function( name, base, prototype ) {
+ var existingConstructor, constructor, basePrototype;
+
+ // ProxiedPrototype allows the provided prototype to remain unmodified
+ // so that it can be used as a mixin for multiple widgets (#8876)
+ var proxiedPrototype = {};
+
+ var namespace = name.split( "." )[ 0 ];
+ name = name.split( "." )[ 1 ];
+ var fullName = namespace + "-" + name;
+
+ if ( !prototype ) {
+ prototype = base;
+ base = $.Widget;
+ }
+
+ if ( $.isArray( prototype ) ) {
+ prototype = $.extend.apply( null, [ {} ].concat( prototype ) );
+ }
+
+ // Create selector for plugin
+ $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
+ return !!$.data( elem, fullName );
+ };
+
+ $[ namespace ] = $[ namespace ] || {};
+ existingConstructor = $[ namespace ][ name ];
+ constructor = $[ namespace ][ name ] = function( options, element ) {
+
+ // Allow instantiation without "new" keyword
+ if ( !this._createWidget ) {
+ return new constructor( options, element );
+ }
+
+ // Allow instantiation without initializing for simple inheritance
+ // must use "new" keyword (the code above always passes args)
+ if ( arguments.length ) {
+ this._createWidget( options, element );
+ }
+ };
+
+ // Extend with the existing constructor to carry over any static properties
+ $.extend( constructor, existingConstructor, {
+ version: prototype.version,
+
+ // Copy the object used to create the prototype in case we need to
+ // redefine the widget later
+ _proto: $.extend( {}, prototype ),
+
+ // Track widgets that inherit from this widget in case this widget is
+ // redefined after a widget inherits from it
+ _childConstructors: []
+ } );
+
+ basePrototype = new base();
+
+ // We need to make the options hash a property directly on the new instance
+ // otherwise we'll modify the options hash on the prototype that we're
+ // inheriting from
+ basePrototype.options = $.widget.extend( {}, basePrototype.options );
+ $.each( prototype, function( prop, value ) {
+ if ( !$.isFunction( value ) ) {
+ proxiedPrototype[ prop ] = value;
+ return;
+ }
+ proxiedPrototype[ prop ] = ( function() {
+ function _super() {
+ return base.prototype[ prop ].apply( this, arguments );
+ }
+
+ function _superApply( args ) {
+ return base.prototype[ prop ].apply( this, args );
+ }
+
+ return function() {
+ var __super = this._super;
+ var __superApply = this._superApply;
+ var returnValue;
+
+ this._super = _super;
+ this._superApply = _superApply;
+
+ returnValue = value.apply( this, arguments );
+
+ this._super = __super;
+ this._superApply = __superApply;
+
+ return returnValue;
+ };
+ } )();
+ } );
+ constructor.prototype = $.widget.extend( basePrototype, {
+
+ // TODO: remove support for widgetEventPrefix
+ // always use the name + a colon as the prefix, e.g., draggable:start
+ // don't prefix for widgets that aren't DOM-based
+ widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name
+ }, proxiedPrototype, {
+ constructor: constructor,
+ namespace: namespace,
+ widgetName: name,
+ widgetFullName: fullName
+ } );
+
+ // If this widget is being redefined then we need to find all widgets that
+ // are inheriting from it and redefine all of them so that they inherit from
+ // the new version of this widget. We're essentially trying to replace one
+ // level in the prototype chain.
+ if ( existingConstructor ) {
+ $.each( existingConstructor._childConstructors, function( i, child ) {
+ var childPrototype = child.prototype;
+
+ // Redefine the child widget using the same prototype that was
+ // originally used, but inherit from the new version of the base
+ $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor,
+ child._proto );
+ } );
+
+ // Remove the list of existing child constructors from the old constructor
+ // so the old child constructors can be garbage collected
+ delete existingConstructor._childConstructors;
+ } else {
+ base._childConstructors.push( constructor );
+ }
+
+ $.widget.bridge( name, constructor );
+
+ return constructor;
+};
+
+$.widget.extend = function( target ) {
+ var input = widgetSlice.call( arguments, 1 );
+ var inputIndex = 0;
+ var inputLength = input.length;
+ var key;
+ var value;
+
+ for ( ; inputIndex < inputLength; inputIndex++ ) {
+ for ( key in input[ inputIndex ] ) {
+ value = input[ inputIndex ][ key ];
+ if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
+
+ // Clone objects
+ if ( $.isPlainObject( value ) ) {
+ target[ key ] = $.isPlainObject( target[ key ] ) ?
+ $.widget.extend( {}, target[ key ], value ) :
+
+ // Don't extend strings, arrays, etc. with objects
+ $.widget.extend( {}, value );
+
+ // Copy everything else by reference
+ } else {
+ target[ key ] = value;
+ }
+ }
+ }
+ }
+ return target;
+};
+
+$.widget.bridge = function( name, object ) {
+ var fullName = object.prototype.widgetFullName || name;
+ $.fn[ name ] = function( options ) {
+ var isMethodCall = typeof options === "string";
+ var args = widgetSlice.call( arguments, 1 );
+ var returnValue = this;
+
+ if ( isMethodCall ) {
+
+ // If this is an empty collection, we need to have the instance method
+ // return undefined instead of the jQuery instance
+ if ( !this.length && options === "instance" ) {
+ returnValue = undefined;
+ } else {
+ this.each( function() {
+ var methodValue;
+ var instance = $.data( this, fullName );
+
+ if ( options === "instance" ) {
+ returnValue = instance;
+ return false;
+ }
+
+ if ( !instance ) {
+ return $.error( "cannot call methods on " + name +
+ " prior to initialization; " +
+ "attempted to call method '" + options + "'" );
+ }
+
+ if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) {
+ return $.error( "no such method '" + options + "' for " + name +
+ " widget instance" );
+ }
+
+ methodValue = instance[ options ].apply( instance, args );
+
+ if ( methodValue !== instance && methodValue !== undefined ) {
+ returnValue = methodValue && methodValue.jquery ?
+ returnValue.pushStack( methodValue.get() ) :
+ methodValue;
+ return false;
+ }
+ } );
+ }
+ } else {
+
+ // Allow multiple hashes to be passed on init
+ if ( args.length ) {
+ options = $.widget.extend.apply( null, [ options ].concat( args ) );
+ }
+
+ this.each( function() {
+ var instance = $.data( this, fullName );
+ if ( instance ) {
+ instance.option( options || {} );
+ if ( instance._init ) {
+ instance._init();
+ }
+ } else {
+ $.data( this, fullName, new object( options, this ) );
+ }
+ } );
+ }
+
+ return returnValue;
+ };
+};
+
+$.Widget = function( /* options, element */ ) {};
+$.Widget._childConstructors = [];
+
+$.Widget.prototype = {
+ widgetName: "widget",
+ widgetEventPrefix: "",
+ defaultElement: "<div>",
+
+ options: {
+ classes: {},
+ disabled: false,
+
+ // Callbacks
+ create: null
+ },
+
+ _createWidget: function( options, element ) {
+ element = $( element || this.defaultElement || this )[ 0 ];
+ this.element = $( element );
+ this.uuid = widgetUuid++;
+ this.eventNamespace = "." + this.widgetName + this.uuid;
+
+ this.bindings = $();
+ this.hoverable = $();
+ this.focusable = $();
+ this.classesElementLookup = {};
+
+ if ( element !== this ) {
+ $.data( element, this.widgetFullName, this );
+ this._on( true, this.element, {
+ remove: function( event ) {
+ if ( event.target === element ) {
+ this.destroy();
+ }
+ }
+ } );
+ this.document = $( element.style ?
+
+ // Element within the document
+ element.ownerDocument :
+
+ // Element is window or document
+ element.document || element );
+ this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow );
+ }
+
+ this.options = $.widget.extend( {},
+ this.options,
+ this._getCreateOptions(),
+ options );
+
+ this._create();
+
+ if ( this.options.disabled ) {
+ this._setOptionDisabled( this.options.disabled );
+ }
+
+ this._trigger( "create", null, this._getCreateEventData() );
+ this._init();
+ },
+
+ _getCreateOptions: function() {
+ return {};
+ },
+
+ _getCreateEventData: $.noop,
+
+ _create: $.noop,
+
+ _init: $.noop,
+
+ destroy: function() {
+ var that = this;
+
+ this._destroy();
+ $.each( this.classesElementLookup, function( key, value ) {
+ that._removeClass( value, key );
+ } );
+
+ // We can probably remove the unbind calls in 2.0
+ // all event bindings should go through this._on()
+ this.element
+ .off( this.eventNamespace )
+ .removeData( this.widgetFullName );
+ this.widget()
+ .off( this.eventNamespace )
+ .removeAttr( "aria-disabled" );
+
+ // Clean up events and states
+ this.bindings.off( this.eventNamespace );
+ },
+
+ _destroy: $.noop,
+
+ widget: function() {
+ return this.element;
+ },
+
+ option: function( key, value ) {
+ var options = key;
+ var parts;
+ var curOption;
+ var i;
+
+ if ( arguments.length === 0 ) {
+
+ // Don't return a reference to the internal hash
+ return $.widget.extend( {}, this.options );
+ }
+
+ if ( typeof key === "string" ) {
+
+ // Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
+ options = {};
+ parts = key.split( "." );
+ key = parts.shift();
+ if ( parts.length ) {
+ curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
+ for ( i = 0; i < parts.length - 1; i++ ) {
+ curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
+ curOption = curOption[ parts[ i ] ];
+ }
+ key = parts.pop();
+ if ( arguments.length === 1 ) {
+ return curOption[ key ] === undefined ? null : curOption[ key ];
+ }
+ curOption[ key ] = value;
+ } else {
+ if ( arguments.length === 1 ) {
+ return this.options[ key ] === undefined ? null : this.options[ key ];
+ }
+ options[ key ] = value;
+ }
+ }
+
+ this._setOptions( options );
+
+ return this;
+ },
+
+ _setOptions: function( options ) {
+ var key;
+
+ for ( key in options ) {
+ this._setOption( key, options[ key ] );
+ }
+
+ return this;
+ },
+
+ _setOption: function( key, value ) {
+ if ( key === "classes" ) {
+ this._setOptionClasses( value );
+ }
+
+ this.options[ key ] = value;
+
+ if ( key === "disabled" ) {
+ this._setOptionDisabled( value );
+ }
+
+ return this;
+ },
+
+ _setOptionClasses: function( value ) {
+ var classKey, elements, currentElements;
+
+ for ( classKey in value ) {
+ currentElements = this.classesElementLookup[ classKey ];
+ if ( value[ classKey ] === this.options.classes[ classKey ] ||
+ !currentElements ||
+ !currentElements.length ) {
+ continue;
+ }
+
+ // We are doing this to create a new jQuery object because the _removeClass() call
+ // on the next line is going to destroy the reference to the current elements being
+ // tracked. We need to save a copy of this collection so that we can add the new classes
+ // below.
+ elements = $( currentElements.get() );
+ this._removeClass( currentElements, classKey );
+
+ // We don't use _addClass() here, because that uses this.options.classes
+ // for generating the string of classes. We want to use the value passed in from
+ // _setOption(), this is the new value of the classes option which was passed to
+ // _setOption(). We pass this value directly to _classes().
+ elements.addClass( this._classes( {
+ element: elements,
+ keys: classKey,
+ classes: value,
+ add: true
+ } ) );
+ }
+ },
+
+ _setOptionDisabled: function( value ) {
+ this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value );
+
+ // If the widget is becoming disabled, then nothing is interactive
+ if ( value ) {
+ this._removeClass( this.hoverable, null, "ui-state-hover" );
+ this._removeClass( this.focusable, null, "ui-state-focus" );
+ }
+ },
+
+ enable: function() {
+ return this._setOptions( { disabled: false } );
+ },
+
+ disable: function() {
+ return this._setOptions( { disabled: true } );
+ },
+
+ _classes: function( options ) {
+ var full = [];
+ var that = this;
+
+ options = $.extend( {
+ element: this.element,
+ classes: this.options.classes || {}
+ }, options );
+
+ function processClassString( classes, checkOption ) {
+ var current, i;
+ for ( i = 0; i < classes.length; i++ ) {
+ current = that.classesElementLookup[ classes[ i ] ] || $();
+ if ( options.add ) {
+ current = $( $.unique( current.get().concat( options.element.get() ) ) );
+ } else {
+ current = $( current.not( options.element ).get() );
+ }
+ that.classesElementLookup[ classes[ i ] ] = current;
+ full.push( classes[ i ] );
+ if ( checkOption && options.classes[ classes[ i ] ] ) {
+ full.push( options.classes[ classes[ i ] ] );
+ }
+ }
+ }
+
+ this._on( options.element, {
+ "remove": "_untrackClassesElement"
+ } );
+
+ if ( options.keys ) {
+ processClassString( options.keys.match( /\S+/g ) || [], true );
+ }
+ if ( options.extra ) {
+ processClassString( options.extra.match( /\S+/g ) || [] );
+ }
+
+ return full.join( " " );
+ },
+
+ _untrackClassesElement: function( event ) {
+ var that = this;
+ $.each( that.classesElementLookup, function( key, value ) {
+ if ( $.inArray( event.target, value ) !== -1 ) {
+ that.classesElementLookup[ key ] = $( value.not( event.target ).get() );
+ }
+ } );
+ },
+
+ _removeClass: function( element, keys, extra ) {
+ return this._toggleClass( element, keys, extra, false );
+ },
+
+ _addClass: function( element, keys, extra ) {
+ return this._toggleClass( element, keys, extra, true );
+ },
+
+ _toggleClass: function( element, keys, extra, add ) {
+ add = ( typeof add === "boolean" ) ? add : extra;
+ var shift = ( typeof element === "string" || element === null ),
+ options = {
+ extra: shift ? keys : extra,
+ keys: shift ? element : keys,
+ element: shift ? this.element : element,
+ add: add
+ };
+ options.element.toggleClass( this._classes( options ), add );
+ return this;
+ },
+
+ _on: function( suppressDisabledCheck, element, handlers ) {
+ var delegateElement;
+ var instance = this;
+
+ // No suppressDisabledCheck flag, shuffle arguments
+ if ( typeof suppressDisabledCheck !== "boolean" ) {
+ handlers = element;
+ element = suppressDisabledCheck;
+ suppressDisabledCheck = false;
+ }
+
+ // No element argument, shuffle and use this.element
+ if ( !handlers ) {
+ handlers = element;
+ element = this.element;
+ delegateElement = this.widget();
+ } else {
+ element = delegateElement = $( element );
+ this.bindings = this.bindings.add( element );
+ }
+
+ $.each( handlers, function( event, handler ) {
+ function handlerProxy() {
+
+ // Allow widgets to customize the disabled handling
+ // - disabled as an array instead of boolean
+ // - disabled class as method for disabling individual parts
+ if ( !suppressDisabledCheck &&
+ ( instance.options.disabled === true ||
+ $( this ).hasClass( "ui-state-disabled" ) ) ) {
+ return;
+ }
+ return ( typeof handler === "string" ? instance[ handler ] : handler )
+ .apply( instance, arguments );
+ }
+
+ // Copy the guid so direct unbinding works
+ if ( typeof handler !== "string" ) {
+ handlerProxy.guid = handler.guid =
+ handler.guid || handlerProxy.guid || $.guid++;
+ }
+
+ var match = event.match( /^([\w:-]*)\s*(.*)$/ );
+ var eventName = match[ 1 ] + instance.eventNamespace;
+ var selector = match[ 2 ];
+
+ if ( selector ) {
+ delegateElement.on( eventName, selector, handlerProxy );
+ } else {
+ element.on( eventName, handlerProxy );
+ }
+ } );
+ },
+
+ _off: function( element, eventName ) {
+ eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) +
+ this.eventNamespace;
+ element.off( eventName ).off( eventName );
+
+ // Clear the stack to avoid memory leaks (#10056)
+ this.bindings = $( this.bindings.not( element ).get() );
+ this.focusable = $( this.focusable.not( element ).get() );
+ this.hoverable = $( this.hoverable.not( element ).get() );
+ },
+
+ _delay: function( handler, delay ) {
+ function handlerProxy() {
+ return ( typeof handler === "string" ? instance[ handler ] : handler )
+ .apply( instance, arguments );
+ }
+ var instance = this;
+ return setTimeout( handlerProxy, delay || 0 );
+ },
+
+ _hoverable: function( element ) {
+ this.hoverable = this.hoverable.add( element );
+ this._on( element, {
+ mouseenter: function( event ) {
+ this._addClass( $( event.currentTarget ), null, "ui-state-hover" );
+ },
+ mouseleave: function( event ) {
+ this._removeClass( $( event.currentTarget ), null, "ui-state-hover" );
+ }
+ } );
+ },
+
+ _focusable: function( element ) {
+ this.focusable = this.focusable.add( element );
+ this._on( element, {
+ focusin: function( event ) {
+ this._addClass( $( event.currentTarget ), null, "ui-state-focus" );
+ },
+ focusout: function( event ) {
+ this._removeClass( $( event.currentTarget ), null, "ui-state-focus" );
+ }
+ } );
+ },
+
+ _trigger: function( type, event, data ) {
+ var prop, orig;
+ var callback = this.options[ type ];
+
+ data = data || {};
+ event = $.Event( event );
+ event.type = ( type === this.widgetEventPrefix ?
+ type :
+ this.widgetEventPrefix + type ).toLowerCase();
+
+ // The original event may come from any element
+ // so we need to reset the target on the new event
+ event.target = this.element[ 0 ];
+
+ // Copy original event properties over to the new event
+ orig = event.originalEvent;
+ if ( orig ) {
+ for ( prop in orig ) {
+ if ( !( prop in event ) ) {
+ event[ prop ] = orig[ prop ];
+ }
+ }
+ }
+
+ this.element.trigger( event, data );
+ return !( $.isFunction( callback ) &&
+ callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false ||
+ event.isDefaultPrevented() );
+ }
+};
+
+$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
+ $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
+ if ( typeof options === "string" ) {
+ options = { effect: options };
+ }
+
+ var hasOptions;
+ var effectName = !options ?
+ method :
+ options === true || typeof options === "number" ?
+ defaultEffect :
+ options.effect || defaultEffect;
+
+ options = options || {};
+ if ( typeof options === "number" ) {
+ options = { duration: options };
+ }
+
+ hasOptions = !$.isEmptyObject( options );
+ options.complete = callback;
+
+ if ( options.delay ) {
+ element.delay( options.delay );
+ }
+
+ if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
+ element[ method ]( options );
+ } else if ( effectName !== method && element[ effectName ] ) {
+ element[ effectName ]( options.duration, options.easing, callback );
+ } else {
+ element.queue( function( next ) {
+ $( this )[ method ]();
+ if ( callback ) {
+ callback.call( element[ 0 ] );
+ }
+ next();
+ } );
+ }
+ };
+} );
+
+var widget = $.widget;
+
+
+/*!
+ * jQuery UI Position 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/position/
+ */
+
+//>>label: Position
+//>>group: Core
+//>>description: Positions elements relative to other elements.
+//>>docs: http://api.jqueryui.com/position/
+//>>demos: http://jqueryui.com/position/
+
+
+( function() {
+var cachedScrollbarWidth,
+ max = Math.max,
+ abs = Math.abs,
+ rhorizontal = /left|center|right/,
+ rvertical = /top|center|bottom/,
+ roffset = /[\+\-]\d+(\.[\d]+)?%?/,
+ rposition = /^\w+/,
+ rpercent = /%$/,
+ _position = $.fn.position;
+
+function getOffsets( offsets, width, height ) {
+ return [
+ parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
+ parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
+ ];
+}
+
+function parseCss( element, property ) {
+ return parseInt( $.css( element, property ), 10 ) || 0;
+}
+
+function getDimensions( elem ) {
+ var raw = elem[ 0 ];
+ if ( raw.nodeType === 9 ) {
+ return {
+ width: elem.width(),
+ height: elem.height(),
+ offset: { top: 0, left: 0 }
+ };
+ }
+ if ( $.isWindow( raw ) ) {
+ return {
+ width: elem.width(),
+ height: elem.height(),
+ offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
+ };
+ }
+ if ( raw.preventDefault ) {
+ return {
+ width: 0,
+ height: 0,
+ offset: { top: raw.pageY, left: raw.pageX }
+ };
+ }
+ return {
+ width: elem.outerWidth(),
+ height: elem.outerHeight(),
+ offset: elem.offset()
+ };
+}
+
+$.position = {
+ scrollbarWidth: function() {
+ if ( cachedScrollbarWidth !== undefined ) {
+ return cachedScrollbarWidth;
+ }
+ var w1, w2,
+ div = $( "<div " +
+ "style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>" +
+ "<div style='height:100px;width:auto;'></div></div>" ),
+ innerDiv = div.children()[ 0 ];
+
+ $( "body" ).append( div );
+ w1 = innerDiv.offsetWidth;
+ div.css( "overflow", "scroll" );
+
+ w2 = innerDiv.offsetWidth;
+
+ if ( w1 === w2 ) {
+ w2 = div[ 0 ].clientWidth;
+ }
+
+ div.remove();
+
+ return ( cachedScrollbarWidth = w1 - w2 );
+ },
+ getScrollInfo: function( within ) {
+ var overflowX = within.isWindow || within.isDocument ? "" :
+ within.element.css( "overflow-x" ),
+ overflowY = within.isWindow || within.isDocument ? "" :
+ within.element.css( "overflow-y" ),
+ hasOverflowX = overflowX === "scroll" ||
+ ( overflowX === "auto" && within.width < within.element[ 0 ].scrollWidth ),
+ hasOverflowY = overflowY === "scroll" ||
+ ( overflowY === "auto" && within.height < within.element[ 0 ].scrollHeight );
+ return {
+ width: hasOverflowY ? $.position.scrollbarWidth() : 0,
+ height: hasOverflowX ? $.position.scrollbarWidth() : 0
+ };
+ },
+ getWithinInfo: function( element ) {
+ var withinElement = $( element || window ),
+ isWindow = $.isWindow( withinElement[ 0 ] ),
+ isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9,
+ hasOffset = !isWindow && !isDocument;
+ return {
+ element: withinElement,
+ isWindow: isWindow,
+ isDocument: isDocument,
+ offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 },
+ scrollLeft: withinElement.scrollLeft(),
+ scrollTop: withinElement.scrollTop(),
+ width: withinElement.outerWidth(),
+ height: withinElement.outerHeight()
+ };
+ }
+};
+
+$.fn.position = function( options ) {
+ if ( !options || !options.of ) {
+ return _position.apply( this, arguments );
+ }
+
+ // Make a copy, we don't want to modify arguments
+ options = $.extend( {}, options );
+
+ var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
+ target = $( options.of ),
+ within = $.position.getWithinInfo( options.within ),
+ scrollInfo = $.position.getScrollInfo( within ),
+ collision = ( options.collision || "flip" ).split( " " ),
+ offsets = {};
+
+ dimensions = getDimensions( target );
+ if ( target[ 0 ].preventDefault ) {
+
+ // Force left top to allow flipping
+ options.at = "left top";
+ }
+ targetWidth = dimensions.width;
+ targetHeight = dimensions.height;
+ targetOffset = dimensions.offset;
+
+ // Clone to reuse original targetOffset later
+ basePosition = $.extend( {}, targetOffset );
+
+ // Force my and at to have valid horizontal and vertical positions
+ // if a value is missing or invalid, it will be converted to center
+ $.each( [ "my", "at" ], function() {
+ var pos = ( options[ this ] || "" ).split( " " ),
+ horizontalOffset,
+ verticalOffset;
+
+ if ( pos.length === 1 ) {
+ pos = rhorizontal.test( pos[ 0 ] ) ?
+ pos.concat( [ "center" ] ) :
+ rvertical.test( pos[ 0 ] ) ?
+ [ "center" ].concat( pos ) :
+ [ "center", "center" ];
+ }
+ pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
+ pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
+
+ // Calculate offsets
+ horizontalOffset = roffset.exec( pos[ 0 ] );
+ verticalOffset = roffset.exec( pos[ 1 ] );
+ offsets[ this ] = [
+ horizontalOffset ? horizontalOffset[ 0 ] : 0,
+ verticalOffset ? verticalOffset[ 0 ] : 0
+ ];
+
+ // Reduce to just the positions without the offsets
+ options[ this ] = [
+ rposition.exec( pos[ 0 ] )[ 0 ],
+ rposition.exec( pos[ 1 ] )[ 0 ]
+ ];
+ } );
+
+ // Normalize collision option
+ if ( collision.length === 1 ) {
+ collision[ 1 ] = collision[ 0 ];
+ }
+
+ if ( options.at[ 0 ] === "right" ) {
+ basePosition.left += targetWidth;
+ } else if ( options.at[ 0 ] === "center" ) {
+ basePosition.left += targetWidth / 2;
+ }
+
+ if ( options.at[ 1 ] === "bottom" ) {
+ basePosition.top += targetHeight;
+ } else if ( options.at[ 1 ] === "center" ) {
+ basePosition.top += targetHeight / 2;
+ }
+
+ atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
+ basePosition.left += atOffset[ 0 ];
+ basePosition.top += atOffset[ 1 ];
+
+ return this.each( function() {
+ var collisionPosition, using,
+ elem = $( this ),
+ elemWidth = elem.outerWidth(),
+ elemHeight = elem.outerHeight(),
+ marginLeft = parseCss( this, "marginLeft" ),
+ marginTop = parseCss( this, "marginTop" ),
+ collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) +
+ scrollInfo.width,
+ collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) +
+ scrollInfo.height,
+ position = $.extend( {}, basePosition ),
+ myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
+
+ if ( options.my[ 0 ] === "right" ) {
+ position.left -= elemWidth;
+ } else if ( options.my[ 0 ] === "center" ) {
+ position.left -= elemWidth / 2;
+ }
+
+ if ( options.my[ 1 ] === "bottom" ) {
+ position.top -= elemHeight;
+ } else if ( options.my[ 1 ] === "center" ) {
+ position.top -= elemHeight / 2;
+ }
+
+ position.left += myOffset[ 0 ];
+ position.top += myOffset[ 1 ];
+
+ collisionPosition = {
+ marginLeft: marginLeft,
+ marginTop: marginTop
+ };
+
+ $.each( [ "left", "top" ], function( i, dir ) {
+ if ( $.ui.position[ collision[ i ] ] ) {
+ $.ui.position[ collision[ i ] ][ dir ]( position, {
+ targetWidth: targetWidth,
+ targetHeight: targetHeight,
+ elemWidth: elemWidth,
+ elemHeight: elemHeight,
+ collisionPosition: collisionPosition,
+ collisionWidth: collisionWidth,
+ collisionHeight: collisionHeight,
+ offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
+ my: options.my,
+ at: options.at,
+ within: within,
+ elem: elem
+ } );
+ }
+ } );
+
+ if ( options.using ) {
+
+ // Adds feedback as second argument to using callback, if present
+ using = function( props ) {
+ var left = targetOffset.left - position.left,
+ right = left + targetWidth - elemWidth,
+ top = targetOffset.top - position.top,
+ bottom = top + targetHeight - elemHeight,
+ feedback = {
+ target: {
+ element: target,
+ left: targetOffset.left,
+ top: targetOffset.top,
+ width: targetWidth,
+ height: targetHeight
+ },
+ element: {
+ element: elem,
+ left: position.left,
+ top: position.top,
+ width: elemWidth,
+ height: elemHeight
+ },
+ horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
+ vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
+ };
+ if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
+ feedback.horizontal = "center";
+ }
+ if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
+ feedback.vertical = "middle";
+ }
+ if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
+ feedback.important = "horizontal";
+ } else {
+ feedback.important = "vertical";
+ }
+ options.using.call( this, props, feedback );
+ };
+ }
+
+ elem.offset( $.extend( position, { using: using } ) );
+ } );
+};
+
+$.ui.position = {
+ fit: {
+ left: function( position, data ) {
+ var within = data.within,
+ withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
+ outerWidth = within.width,
+ collisionPosLeft = position.left - data.collisionPosition.marginLeft,
+ overLeft = withinOffset - collisionPosLeft,
+ overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
+ newOverRight;
+
+ // Element is wider than within
+ if ( data.collisionWidth > outerWidth ) {
+
+ // Element is initially over the left side of within
+ if ( overLeft > 0 && overRight <= 0 ) {
+ newOverRight = position.left + overLeft + data.collisionWidth - outerWidth -
+ withinOffset;
+ position.left += overLeft - newOverRight;
+
+ // Element is initially over right side of within
+ } else if ( overRight > 0 && overLeft <= 0 ) {
+ position.left = withinOffset;
+
+ // Element is initially over both left and right sides of within
+ } else {
+ if ( overLeft > overRight ) {
+ position.left = withinOffset + outerWidth - data.collisionWidth;
+ } else {
+ position.left = withinOffset;
+ }
+ }
+
+ // Too far left -> align with left edge
+ } else if ( overLeft > 0 ) {
+ position.left += overLeft;
+
+ // Too far right -> align with right edge
+ } else if ( overRight > 0 ) {
+ position.left -= overRight;
+
+ // Adjust based on position and margin
+ } else {
+ position.left = max( position.left - collisionPosLeft, position.left );
+ }
+ },
+ top: function( position, data ) {
+ var within = data.within,
+ withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
+ outerHeight = data.within.height,
+ collisionPosTop = position.top - data.collisionPosition.marginTop,
+ overTop = withinOffset - collisionPosTop,
+ overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
+ newOverBottom;
+
+ // Element is taller than within
+ if ( data.collisionHeight > outerHeight ) {
+
+ // Element is initially over the top of within
+ if ( overTop > 0 && overBottom <= 0 ) {
+ newOverBottom = position.top + overTop + data.collisionHeight - outerHeight -
+ withinOffset;
+ position.top += overTop - newOverBottom;
+
+ // Element is initially over bottom of within
+ } else if ( overBottom > 0 && overTop <= 0 ) {
+ position.top = withinOffset;
+
+ // Element is initially over both top and bottom of within
+ } else {
+ if ( overTop > overBottom ) {
+ position.top = withinOffset + outerHeight - data.collisionHeight;
+ } else {
+ position.top = withinOffset;
+ }
+ }
+
+ // Too far up -> align with top
+ } else if ( overTop > 0 ) {
+ position.top += overTop;
+
+ // Too far down -> align with bottom edge
+ } else if ( overBottom > 0 ) {
+ position.top -= overBottom;
+
+ // Adjust based on position and margin
+ } else {
+ position.top = max( position.top - collisionPosTop, position.top );
+ }
+ }
+ },
+ flip: {
+ left: function( position, data ) {
+ var within = data.within,
+ withinOffset = within.offset.left + within.scrollLeft,
+ outerWidth = within.width,
+ offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
+ collisionPosLeft = position.left - data.collisionPosition.marginLeft,
+ overLeft = collisionPosLeft - offsetLeft,
+ overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
+ myOffset = data.my[ 0 ] === "left" ?
+ -data.elemWidth :
+ data.my[ 0 ] === "right" ?
+ data.elemWidth :
+ 0,
+ atOffset = data.at[ 0 ] === "left" ?
+ data.targetWidth :
+ data.at[ 0 ] === "right" ?
+ -data.targetWidth :
+ 0,
+ offset = -2 * data.offset[ 0 ],
+ newOverRight,
+ newOverLeft;
+
+ if ( overLeft < 0 ) {
+ newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth -
+ outerWidth - withinOffset;
+ if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
+ position.left += myOffset + atOffset + offset;
+ }
+ } else if ( overRight > 0 ) {
+ newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset +
+ atOffset + offset - offsetLeft;
+ if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
+ position.left += myOffset + atOffset + offset;
+ }
+ }
+ },
+ top: function( position, data ) {
+ var within = data.within,
+ withinOffset = within.offset.top + within.scrollTop,
+ outerHeight = within.height,
+ offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
+ collisionPosTop = position.top - data.collisionPosition.marginTop,
+ overTop = collisionPosTop - offsetTop,
+ overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
+ top = data.my[ 1 ] === "top",
+ myOffset = top ?
+ -data.elemHeight :
+ data.my[ 1 ] === "bottom" ?
+ data.elemHeight :
+ 0,
+ atOffset = data.at[ 1 ] === "top" ?
+ data.targetHeight :
+ data.at[ 1 ] === "bottom" ?
+ -data.targetHeight :
+ 0,
+ offset = -2 * data.offset[ 1 ],
+ newOverTop,
+ newOverBottom;
+ if ( overTop < 0 ) {
+ newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight -
+ outerHeight - withinOffset;
+ if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {
+ position.top += myOffset + atOffset + offset;
+ }
+ } else if ( overBottom > 0 ) {
+ newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset +
+ offset - offsetTop;
+ if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {
+ position.top += myOffset + atOffset + offset;
+ }
+ }
+ }
+ },
+ flipfit: {
+ left: function() {
+ $.ui.position.flip.left.apply( this, arguments );
+ $.ui.position.fit.left.apply( this, arguments );
+ },
+ top: function() {
+ $.ui.position.flip.top.apply( this, arguments );
+ $.ui.position.fit.top.apply( this, arguments );
+ }
+ }
+};
+
+} )();
+
+var position = $.ui.position;
+
+
+/*!
+ * jQuery UI :data 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: :data Selector
+//>>group: Core
+//>>description: Selects elements which have data stored under the specified key.
+//>>docs: http://api.jqueryui.com/data-selector/
+
+
+var data = $.extend( $.expr[ ":" ], {
+ data: $.expr.createPseudo ?
+ $.expr.createPseudo( function( dataName ) {
+ return function( elem ) {
+ return !!$.data( elem, dataName );
+ };
+ } ) :
+
+ // Support: jQuery <1.8
+ function( elem, i, match ) {
+ return !!$.data( elem, match[ 3 ] );
+ }
+} );
+
+/*!
+ * jQuery UI Disable Selection 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: disableSelection
+//>>group: Core
+//>>description: Disable selection of text content within the set of matched elements.
+//>>docs: http://api.jqueryui.com/disableSelection/
+
+// This file is deprecated
+
+
+var disableSelection = $.fn.extend( {
+ disableSelection: ( function() {
+ var eventType = "onselectstart" in document.createElement( "div" ) ?
+ "selectstart" :
+ "mousedown";
+
+ return function() {
+ return this.on( eventType + ".ui-disableSelection", function( event ) {
+ event.preventDefault();
+ } );
+ };
+ } )(),
+
+ enableSelection: function() {
+ return this.off( ".ui-disableSelection" );
+ }
+} );
+
+
+/*!
+ * jQuery UI Effects 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Effects Core
+//>>group: Effects
+// jscs:disable maximumLineLength
+//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects.
+// jscs:enable maximumLineLength
+//>>docs: http://api.jqueryui.com/category/effects-core/
+//>>demos: http://jqueryui.com/effect/
+
+
+
+var dataSpace = "ui-effects-",
+ dataSpaceStyle = "ui-effects-style",
+ dataSpaceAnimated = "ui-effects-animated",
+
+ // Create a local jQuery because jQuery Color relies on it and the
+ // global may not exist with AMD and a custom build (#10199)
+ jQuery = $;
+
+$.effects = {
+ effect: {}
+};
+
+/*!
+ * jQuery Color Animations v2.1.2
+ * https://github.com/jquery/jquery-color
+ *
+ * Copyright 2014 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * Date: Wed Jan 16 08:47:09 2013 -0600
+ */
+( function( jQuery, undefined ) {
+
+ var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " +
+ "borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
+
+ // Plusequals test for += 100 -= 100
+ rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
+
+ // A set of RE's that can match strings and generate color tuples.
+ stringParsers = [ {
+ re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
+ parse: function( execResult ) {
+ return [
+ execResult[ 1 ],
+ execResult[ 2 ],
+ execResult[ 3 ],
+ execResult[ 4 ]
+ ];
+ }
+ }, {
+ re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
+ parse: function( execResult ) {
+ return [
+ execResult[ 1 ] * 2.55,
+ execResult[ 2 ] * 2.55,
+ execResult[ 3 ] * 2.55,
+ execResult[ 4 ]
+ ];
+ }
+ }, {
+
+ // This regex ignores A-F because it's compared against an already lowercased string
+ re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
+ parse: function( execResult ) {
+ return [
+ parseInt( execResult[ 1 ], 16 ),
+ parseInt( execResult[ 2 ], 16 ),
+ parseInt( execResult[ 3 ], 16 )
+ ];
+ }
+ }, {
+
+ // This regex ignores A-F because it's compared against an already lowercased string
+ re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
+ parse: function( execResult ) {
+ return [
+ parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
+ parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
+ parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
+ ];
+ }
+ }, {
+ re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
+ space: "hsla",
+ parse: function( execResult ) {
+ return [
+ execResult[ 1 ],
+ execResult[ 2 ] / 100,
+ execResult[ 3 ] / 100,
+ execResult[ 4 ]
+ ];
+ }
+ } ],
+
+ // JQuery.Color( )
+ color = jQuery.Color = function( color, green, blue, alpha ) {
+ return new jQuery.Color.fn.parse( color, green, blue, alpha );
+ },
+ spaces = {
+ rgba: {
+ props: {
+ red: {
+ idx: 0,
+ type: "byte"
+ },
+ green: {
+ idx: 1,
+ type: "byte"
+ },
+ blue: {
+ idx: 2,
+ type: "byte"
+ }
+ }
+ },
+
+ hsla: {
+ props: {
+ hue: {
+ idx: 0,
+ type: "degrees"
+ },
+ saturation: {
+ idx: 1,
+ type: "percent"
+ },
+ lightness: {
+ idx: 2,
+ type: "percent"
+ }
+ }
+ }
+ },
+ propTypes = {
+ "byte": {
+ floor: true,
+ max: 255
+ },
+ "percent": {
+ max: 1
+ },
+ "degrees": {
+ mod: 360,
+ floor: true
+ }
+ },
+ support = color.support = {},
+
+ // Element for support tests
+ supportElem = jQuery( "<p>" )[ 0 ],
+
+ // Colors = jQuery.Color.names
+ colors,
+
+ // Local aliases of functions called often
+ each = jQuery.each;
+
+// Determine rgba support immediately
+supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
+support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
+
+// Define cache name and alpha properties
+// for rgba and hsla spaces
+each( spaces, function( spaceName, space ) {
+ space.cache = "_" + spaceName;
+ space.props.alpha = {
+ idx: 3,
+ type: "percent",
+ def: 1
+ };
+} );
+
+function clamp( value, prop, allowEmpty ) {
+ var type = propTypes[ prop.type ] || {};
+
+ if ( value == null ) {
+ return ( allowEmpty || !prop.def ) ? null : prop.def;
+ }
+
+ // ~~ is an short way of doing floor for positive numbers
+ value = type.floor ? ~~value : parseFloat( value );
+
+ // IE will pass in empty strings as value for alpha,
+ // which will hit this case
+ if ( isNaN( value ) ) {
+ return prop.def;
+ }
+
+ if ( type.mod ) {
+
+ // We add mod before modding to make sure that negatives values
+ // get converted properly: -10 -> 350
+ return ( value + type.mod ) % type.mod;
+ }
+
+ // For now all property types without mod have min and max
+ return 0 > value ? 0 : type.max < value ? type.max : value;
+}
+
+function stringParse( string ) {
+ var inst = color(),
+ rgba = inst._rgba = [];
+
+ string = string.toLowerCase();
+
+ each( stringParsers, function( i, parser ) {
+ var parsed,
+ match = parser.re.exec( string ),
+ values = match && parser.parse( match ),
+ spaceName = parser.space || "rgba";
+
+ if ( values ) {
+ parsed = inst[ spaceName ]( values );
+
+ // If this was an rgba parse the assignment might happen twice
+ // oh well....
+ inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
+ rgba = inst._rgba = parsed._rgba;
+
+ // Exit each( stringParsers ) here because we matched
+ return false;
+ }
+ } );
+
+ // Found a stringParser that handled it
+ if ( rgba.length ) {
+
+ // If this came from a parsed string, force "transparent" when alpha is 0
+ // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
+ if ( rgba.join() === "0,0,0,0" ) {
+ jQuery.extend( rgba, colors.transparent );
+ }
+ return inst;
+ }
+
+ // Named colors
+ return colors[ string ];
+}
+
+color.fn = jQuery.extend( color.prototype, {
+ parse: function( red, green, blue, alpha ) {
+ if ( red === undefined ) {
+ this._rgba = [ null, null, null, null ];
+ return this;
+ }
+ if ( red.jquery || red.nodeType ) {
+ red = jQuery( red ).css( green );
+ green = undefined;
+ }
+
+ var inst = this,
+ type = jQuery.type( red ),
+ rgba = this._rgba = [];
+
+ // More than 1 argument specified - assume ( red, green, blue, alpha )
+ if ( green !== undefined ) {
+ red = [ red, green, blue, alpha ];
+ type = "array";
+ }
+
+ if ( type === "string" ) {
+ return this.parse( stringParse( red ) || colors._default );
+ }
+
+ if ( type === "array" ) {
+ each( spaces.rgba.props, function( key, prop ) {
+ rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
+ } );
+ return this;
+ }
+
+ if ( type === "object" ) {
+ if ( red instanceof color ) {
+ each( spaces, function( spaceName, space ) {
+ if ( red[ space.cache ] ) {
+ inst[ space.cache ] = red[ space.cache ].slice();
+ }
+ } );
+ } else {
+ each( spaces, function( spaceName, space ) {
+ var cache = space.cache;
+ each( space.props, function( key, prop ) {
+
+ // If the cache doesn't exist, and we know how to convert
+ if ( !inst[ cache ] && space.to ) {
+
+ // If the value was null, we don't need to copy it
+ // if the key was alpha, we don't need to copy it either
+ if ( key === "alpha" || red[ key ] == null ) {
+ return;
+ }
+ inst[ cache ] = space.to( inst._rgba );
+ }
+
+ // This is the only case where we allow nulls for ALL properties.
+ // call clamp with alwaysAllowEmpty
+ inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
+ } );
+
+ // Everything defined but alpha?
+ if ( inst[ cache ] &&
+ jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
+
+ // Use the default of 1
+ inst[ cache ][ 3 ] = 1;
+ if ( space.from ) {
+ inst._rgba = space.from( inst[ cache ] );
+ }
+ }
+ } );
+ }
+ return this;
+ }
+ },
+ is: function( compare ) {
+ var is = color( compare ),
+ same = true,
+ inst = this;
+
+ each( spaces, function( _, space ) {
+ var localCache,
+ isCache = is[ space.cache ];
+ if ( isCache ) {
+ localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
+ each( space.props, function( _, prop ) {
+ if ( isCache[ prop.idx ] != null ) {
+ same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
+ return same;
+ }
+ } );
+ }
+ return same;
+ } );
+ return same;
+ },
+ _space: function() {
+ var used = [],
+ inst = this;
+ each( spaces, function( spaceName, space ) {
+ if ( inst[ space.cache ] ) {
+ used.push( spaceName );
+ }
+ } );
+ return used.pop();
+ },
+ transition: function( other, distance ) {
+ var end = color( other ),
+ spaceName = end._space(),
+ space = spaces[ spaceName ],
+ startColor = this.alpha() === 0 ? color( "transparent" ) : this,
+ start = startColor[ space.cache ] || space.to( startColor._rgba ),
+ result = start.slice();
+
+ end = end[ space.cache ];
+ each( space.props, function( key, prop ) {
+ var index = prop.idx,
+ startValue = start[ index ],
+ endValue = end[ index ],
+ type = propTypes[ prop.type ] || {};
+
+ // If null, don't override start value
+ if ( endValue === null ) {
+ return;
+ }
+
+ // If null - use end
+ if ( startValue === null ) {
+ result[ index ] = endValue;
+ } else {
+ if ( type.mod ) {
+ if ( endValue - startValue > type.mod / 2 ) {
+ startValue += type.mod;
+ } else if ( startValue - endValue > type.mod / 2 ) {
+ startValue -= type.mod;
+ }
+ }
+ result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
+ }
+ } );
+ return this[ spaceName ]( result );
+ },
+ blend: function( opaque ) {
+
+ // If we are already opaque - return ourself
+ if ( this._rgba[ 3 ] === 1 ) {
+ return this;
+ }
+
+ var rgb = this._rgba.slice(),
+ a = rgb.pop(),
+ blend = color( opaque )._rgba;
+
+ return color( jQuery.map( rgb, function( v, i ) {
+ return ( 1 - a ) * blend[ i ] + a * v;
+ } ) );
+ },
+ toRgbaString: function() {
+ var prefix = "rgba(",
+ rgba = jQuery.map( this._rgba, function( v, i ) {
+ return v == null ? ( i > 2 ? 1 : 0 ) : v;
+ } );
+
+ if ( rgba[ 3 ] === 1 ) {
+ rgba.pop();
+ prefix = "rgb(";
+ }
+
+ return prefix + rgba.join() + ")";
+ },
+ toHslaString: function() {
+ var prefix = "hsla(",
+ hsla = jQuery.map( this.hsla(), function( v, i ) {
+ if ( v == null ) {
+ v = i > 2 ? 1 : 0;
+ }
+
+ // Catch 1 and 2
+ if ( i && i < 3 ) {
+ v = Math.round( v * 100 ) + "%";
+ }
+ return v;
+ } );
+
+ if ( hsla[ 3 ] === 1 ) {
+ hsla.pop();
+ prefix = "hsl(";
+ }
+ return prefix + hsla.join() + ")";
+ },
+ toHexString: function( includeAlpha ) {
+ var rgba = this._rgba.slice(),
+ alpha = rgba.pop();
+
+ if ( includeAlpha ) {
+ rgba.push( ~~( alpha * 255 ) );
+ }
+
+ return "#" + jQuery.map( rgba, function( v ) {
+
+ // Default to 0 when nulls exist
+ v = ( v || 0 ).toString( 16 );
+ return v.length === 1 ? "0" + v : v;
+ } ).join( "" );
+ },
+ toString: function() {
+ return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
+ }
+} );
+color.fn.parse.prototype = color.fn;
+
+// Hsla conversions adapted from:
+// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
+
+function hue2rgb( p, q, h ) {
+ h = ( h + 1 ) % 1;
+ if ( h * 6 < 1 ) {
+ return p + ( q - p ) * h * 6;
+ }
+ if ( h * 2 < 1 ) {
+ return q;
+ }
+ if ( h * 3 < 2 ) {
+ return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6;
+ }
+ return p;
+}
+
+spaces.hsla.to = function( rgba ) {
+ if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
+ return [ null, null, null, rgba[ 3 ] ];
+ }
+ var r = rgba[ 0 ] / 255,
+ g = rgba[ 1 ] / 255,
+ b = rgba[ 2 ] / 255,
+ a = rgba[ 3 ],
+ max = Math.max( r, g, b ),
+ min = Math.min( r, g, b ),
+ diff = max - min,
+ add = max + min,
+ l = add * 0.5,
+ h, s;
+
+ if ( min === max ) {
+ h = 0;
+ } else if ( r === max ) {
+ h = ( 60 * ( g - b ) / diff ) + 360;
+ } else if ( g === max ) {
+ h = ( 60 * ( b - r ) / diff ) + 120;
+ } else {
+ h = ( 60 * ( r - g ) / diff ) + 240;
+ }
+
+ // Chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
+ // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
+ if ( diff === 0 ) {
+ s = 0;
+ } else if ( l <= 0.5 ) {
+ s = diff / add;
+ } else {
+ s = diff / ( 2 - add );
+ }
+ return [ Math.round( h ) % 360, s, l, a == null ? 1 : a ];
+};
+
+spaces.hsla.from = function( hsla ) {
+ if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
+ return [ null, null, null, hsla[ 3 ] ];
+ }
+ var h = hsla[ 0 ] / 360,
+ s = hsla[ 1 ],
+ l = hsla[ 2 ],
+ a = hsla[ 3 ],
+ q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
+ p = 2 * l - q;
+
+ return [
+ Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
+ Math.round( hue2rgb( p, q, h ) * 255 ),
+ Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
+ a
+ ];
+};
+
+each( spaces, function( spaceName, space ) {
+ var props = space.props,
+ cache = space.cache,
+ to = space.to,
+ from = space.from;
+
+ // Makes rgba() and hsla()
+ color.fn[ spaceName ] = function( value ) {
+
+ // Generate a cache for this space if it doesn't exist
+ if ( to && !this[ cache ] ) {
+ this[ cache ] = to( this._rgba );
+ }
+ if ( value === undefined ) {
+ return this[ cache ].slice();
+ }
+
+ var ret,
+ type = jQuery.type( value ),
+ arr = ( type === "array" || type === "object" ) ? value : arguments,
+ local = this[ cache ].slice();
+
+ each( props, function( key, prop ) {
+ var val = arr[ type === "object" ? key : prop.idx ];
+ if ( val == null ) {
+ val = local[ prop.idx ];
+ }
+ local[ prop.idx ] = clamp( val, prop );
+ } );
+
+ if ( from ) {
+ ret = color( from( local ) );
+ ret[ cache ] = local;
+ return ret;
+ } else {
+ return color( local );
+ }
+ };
+
+ // Makes red() green() blue() alpha() hue() saturation() lightness()
+ each( props, function( key, prop ) {
+
+ // Alpha is included in more than one space
+ if ( color.fn[ key ] ) {
+ return;
+ }
+ color.fn[ key ] = function( value ) {
+ var vtype = jQuery.type( value ),
+ fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
+ local = this[ fn ](),
+ cur = local[ prop.idx ],
+ match;
+
+ if ( vtype === "undefined" ) {
+ return cur;
+ }
+
+ if ( vtype === "function" ) {
+ value = value.call( this, cur );
+ vtype = jQuery.type( value );
+ }
+ if ( value == null && prop.empty ) {
+ return this;
+ }
+ if ( vtype === "string" ) {
+ match = rplusequals.exec( value );
+ if ( match ) {
+ value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
+ }
+ }
+ local[ prop.idx ] = value;
+ return this[ fn ]( local );
+ };
+ } );
+} );
+
+// Add cssHook and .fx.step function for each named hook.
+// accept a space separated string of properties
+color.hook = function( hook ) {
+ var hooks = hook.split( " " );
+ each( hooks, function( i, hook ) {
+ jQuery.cssHooks[ hook ] = {
+ set: function( elem, value ) {
+ var parsed, curElem,
+ backgroundColor = "";
+
+ if ( value !== "transparent" && ( jQuery.type( value ) !== "string" ||
+ ( parsed = stringParse( value ) ) ) ) {
+ value = color( parsed || value );
+ if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
+ curElem = hook === "backgroundColor" ? elem.parentNode : elem;
+ while (
+ ( backgroundColor === "" || backgroundColor === "transparent" ) &&
+ curElem && curElem.style
+ ) {
+ try {
+ backgroundColor = jQuery.css( curElem, "backgroundColor" );
+ curElem = curElem.parentNode;
+ } catch ( e ) {
+ }
+ }
+
+ value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
+ backgroundColor :
+ "_default" );
+ }
+
+ value = value.toRgbaString();
+ }
+ try {
+ elem.style[ hook ] = value;
+ } catch ( e ) {
+
+ // Wrapped to prevent IE from throwing errors on "invalid" values like
+ // 'auto' or 'inherit'
+ }
+ }
+ };
+ jQuery.fx.step[ hook ] = function( fx ) {
+ if ( !fx.colorInit ) {
+ fx.start = color( fx.elem, hook );
+ fx.end = color( fx.end );
+ fx.colorInit = true;
+ }
+ jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
+ };
+ } );
+
+};
+
+color.hook( stepHooks );
+
+jQuery.cssHooks.borderColor = {
+ expand: function( value ) {
+ var expanded = {};
+
+ each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
+ expanded[ "border" + part + "Color" ] = value;
+ } );
+ return expanded;
+ }
+};
+
+// Basic color names only.
+// Usage of any of the other color names requires adding yourself or including
+// jquery.color.svg-names.js.
+colors = jQuery.Color.names = {
+
+ // 4.1. Basic color keywords
+ aqua: "#00ffff",
+ black: "#000000",
+ blue: "#0000ff",
+ fuchsia: "#ff00ff",
+ gray: "#808080",
+ green: "#008000",
+ lime: "#00ff00",
+ maroon: "#800000",
+ navy: "#000080",
+ olive: "#808000",
+ purple: "#800080",
+ red: "#ff0000",
+ silver: "#c0c0c0",
+ teal: "#008080",
+ white: "#ffffff",
+ yellow: "#ffff00",
+
+ // 4.2.3. "transparent" color keyword
+ transparent: [ null, null, null, 0 ],
+
+ _default: "#ffffff"
+};
+
+} )( jQuery );
+
+/******************************************************************************/
+/****************************** CLASS ANIMATIONS ******************************/
+/******************************************************************************/
+( function() {
+
+var classAnimationActions = [ "add", "remove", "toggle" ],
+ shorthandStyles = {
+ border: 1,
+ borderBottom: 1,
+ borderColor: 1,
+ borderLeft: 1,
+ borderRight: 1,
+ borderTop: 1,
+ borderWidth: 1,
+ margin: 1,
+ padding: 1
+ };
+
+$.each(
+ [ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ],
+ function( _, prop ) {
+ $.fx.step[ prop ] = function( fx ) {
+ if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
+ jQuery.style( fx.elem, prop, fx.end );
+ fx.setAttr = true;
+ }
+ };
+ }
+);
+
+function getElementStyles( elem ) {
+ var key, len,
+ style = elem.ownerDocument.defaultView ?
+ elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
+ elem.currentStyle,
+ styles = {};
+
+ if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
+ len = style.length;
+ while ( len-- ) {
+ key = style[ len ];
+ if ( typeof style[ key ] === "string" ) {
+ styles[ $.camelCase( key ) ] = style[ key ];
+ }
+ }
+
+ // Support: Opera, IE <9
+ } else {
+ for ( key in style ) {
+ if ( typeof style[ key ] === "string" ) {
+ styles[ key ] = style[ key ];
+ }
+ }
+ }
+
+ return styles;
+}
+
+function styleDifference( oldStyle, newStyle ) {
+ var diff = {},
+ name, value;
+
+ for ( name in newStyle ) {
+ value = newStyle[ name ];
+ if ( oldStyle[ name ] !== value ) {
+ if ( !shorthandStyles[ name ] ) {
+ if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
+ diff[ name ] = value;
+ }
+ }
+ }
+ }
+
+ return diff;
+}
+
+// Support: jQuery <1.8
+if ( !$.fn.addBack ) {
+ $.fn.addBack = function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter( selector )
+ );
+ };
+}
+
+$.effects.animateClass = function( value, duration, easing, callback ) {
+ var o = $.speed( duration, easing, callback );
+
+ return this.queue( function() {
+ var animated = $( this ),
+ baseClass = animated.attr( "class" ) || "",
+ applyClassChange,
+ allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
+
+ // Map the animated objects to store the original styles.
+ allAnimations = allAnimations.map( function() {
+ var el = $( this );
+ return {
+ el: el,
+ start: getElementStyles( this )
+ };
+ } );
+
+ // Apply class change
+ applyClassChange = function() {
+ $.each( classAnimationActions, function( i, action ) {
+ if ( value[ action ] ) {
+ animated[ action + "Class" ]( value[ action ] );
+ }
+ } );
+ };
+ applyClassChange();
+
+ // Map all animated objects again - calculate new styles and diff
+ allAnimations = allAnimations.map( function() {
+ this.end = getElementStyles( this.el[ 0 ] );
+ this.diff = styleDifference( this.start, this.end );
+ return this;
+ } );
+
+ // Apply original class
+ animated.attr( "class", baseClass );
+
+ // Map all animated objects again - this time collecting a promise
+ allAnimations = allAnimations.map( function() {
+ var styleInfo = this,
+ dfd = $.Deferred(),
+ opts = $.extend( {}, o, {
+ queue: false,
+ complete: function() {
+ dfd.resolve( styleInfo );
+ }
+ } );
+
+ this.el.animate( this.diff, opts );
+ return dfd.promise();
+ } );
+
+ // Once all animations have completed:
+ $.when.apply( $, allAnimations.get() ).done( function() {
+
+ // Set the final class
+ applyClassChange();
+
+ // For each animated element,
+ // clear all css properties that were animated
+ $.each( arguments, function() {
+ var el = this.el;
+ $.each( this.diff, function( key ) {
+ el.css( key, "" );
+ } );
+ } );
+
+ // This is guarnteed to be there if you use jQuery.speed()
+ // it also handles dequeuing the next anim...
+ o.complete.call( animated[ 0 ] );
+ } );
+ } );
+};
+
+$.fn.extend( {
+ addClass: ( function( orig ) {
+ return function( classNames, speed, easing, callback ) {
+ return speed ?
+ $.effects.animateClass.call( this,
+ { add: classNames }, speed, easing, callback ) :
+ orig.apply( this, arguments );
+ };
+ } )( $.fn.addClass ),
+
+ removeClass: ( function( orig ) {
+ return function( classNames, speed, easing, callback ) {
+ return arguments.length > 1 ?
+ $.effects.animateClass.call( this,
+ { remove: classNames }, speed, easing, callback ) :
+ orig.apply( this, arguments );
+ };
+ } )( $.fn.removeClass ),
+
+ toggleClass: ( function( orig ) {
+ return function( classNames, force, speed, easing, callback ) {
+ if ( typeof force === "boolean" || force === undefined ) {
+ if ( !speed ) {
+
+ // Without speed parameter
+ return orig.apply( this, arguments );
+ } else {
+ return $.effects.animateClass.call( this,
+ ( force ? { add: classNames } : { remove: classNames } ),
+ speed, easing, callback );
+ }
+ } else {
+
+ // Without force parameter
+ return $.effects.animateClass.call( this,
+ { toggle: classNames }, force, speed, easing );
+ }
+ };
+ } )( $.fn.toggleClass ),
+
+ switchClass: function( remove, add, speed, easing, callback ) {
+ return $.effects.animateClass.call( this, {
+ add: add,
+ remove: remove
+ }, speed, easing, callback );
+ }
+} );
+
+} )();
+
+/******************************************************************************/
+/*********************************** EFFECTS **********************************/
+/******************************************************************************/
+
+( function() {
+
+if ( $.expr && $.expr.filters && $.expr.filters.animated ) {
+ $.expr.filters.animated = ( function( orig ) {
+ return function( elem ) {
+ return !!$( elem ).data( dataSpaceAnimated ) || orig( elem );
+ };
+ } )( $.expr.filters.animated );
+}
+
+if ( $.uiBackCompat !== false ) {
+ $.extend( $.effects, {
+
+ // Saves a set of properties in a data storage
+ save: function( element, set ) {
+ var i = 0, length = set.length;
+ for ( ; i < length; i++ ) {
+ if ( set[ i ] !== null ) {
+ element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
+ }
+ }
+ },
+
+ // Restores a set of previously saved properties from a data storage
+ restore: function( element, set ) {
+ var val, i = 0, length = set.length;
+ for ( ; i < length; i++ ) {
+ if ( set[ i ] !== null ) {
+ val = element.data( dataSpace + set[ i ] );
+ element.css( set[ i ], val );
+ }
+ }
+ },
+
+ setMode: function( el, mode ) {
+ if ( mode === "toggle" ) {
+ mode = el.is( ":hidden" ) ? "show" : "hide";
+ }
+ return mode;
+ },
+
+ // Wraps the element around a wrapper that copies position properties
+ createWrapper: function( element ) {
+
+ // If the element is already wrapped, return it
+ if ( element.parent().is( ".ui-effects-wrapper" ) ) {
+ return element.parent();
+ }
+
+ // Wrap the element
+ var props = {
+ width: element.outerWidth( true ),
+ height: element.outerHeight( true ),
+ "float": element.css( "float" )
+ },
+ wrapper = $( "<div></div>" )
+ .addClass( "ui-effects-wrapper" )
+ .css( {
+ fontSize: "100%",
+ background: "transparent",
+ border: "none",
+ margin: 0,
+ padding: 0
+ } ),
+
+ // Store the size in case width/height are defined in % - Fixes #5245
+ size = {
+ width: element.width(),
+ height: element.height()
+ },
+ active = document.activeElement;
+
+ // Support: Firefox
+ // Firefox incorrectly exposes anonymous content
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=561664
+ try {
+ active.id;
+ } catch ( e ) {
+ active = document.body;
+ }
+
+ element.wrap( wrapper );
+
+ // Fixes #7595 - Elements lose focus when wrapped.
+ if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
+ $( active ).trigger( "focus" );
+ }
+
+ // Hotfix for jQuery 1.4 since some change in wrap() seems to actually
+ // lose the reference to the wrapped element
+ wrapper = element.parent();
+
+ // Transfer positioning properties to the wrapper
+ if ( element.css( "position" ) === "static" ) {
+ wrapper.css( { position: "relative" } );
+ element.css( { position: "relative" } );
+ } else {
+ $.extend( props, {
+ position: element.css( "position" ),
+ zIndex: element.css( "z-index" )
+ } );
+ $.each( [ "top", "left", "bottom", "right" ], function( i, pos ) {
+ props[ pos ] = element.css( pos );
+ if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
+ props[ pos ] = "auto";
+ }
+ } );
+ element.css( {
+ position: "relative",
+ top: 0,
+ left: 0,
+ right: "auto",
+ bottom: "auto"
+ } );
+ }
+ element.css( size );
+
+ return wrapper.css( props ).show();
+ },
+
+ removeWrapper: function( element ) {
+ var active = document.activeElement;
+
+ if ( element.parent().is( ".ui-effects-wrapper" ) ) {
+ element.parent().replaceWith( element );
+
+ // Fixes #7595 - Elements lose focus when wrapped.
+ if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
+ $( active ).trigger( "focus" );
+ }
+ }
+
+ return element;
+ }
+ } );
+}
+
+$.extend( $.effects, {
+ version: "1.12.1",
+
+ define: function( name, mode, effect ) {
+ if ( !effect ) {
+ effect = mode;
+ mode = "effect";
+ }
+
+ $.effects.effect[ name ] = effect;
+ $.effects.effect[ name ].mode = mode;
+
+ return effect;
+ },
+
+ scaledDimensions: function( element, percent, direction ) {
+ if ( percent === 0 ) {
+ return {
+ height: 0,
+ width: 0,
+ outerHeight: 0,
+ outerWidth: 0
+ };
+ }
+
+ var x = direction !== "horizontal" ? ( ( percent || 100 ) / 100 ) : 1,
+ y = direction !== "vertical" ? ( ( percent || 100 ) / 100 ) : 1;
+
+ return {
+ height: element.height() * y,
+ width: element.width() * x,
+ outerHeight: element.outerHeight() * y,
+ outerWidth: element.outerWidth() * x
+ };
+
+ },
+
+ clipToBox: function( animation ) {
+ return {
+ width: animation.clip.right - animation.clip.left,
+ height: animation.clip.bottom - animation.clip.top,
+ left: animation.clip.left,
+ top: animation.clip.top
+ };
+ },
+
+ // Injects recently queued functions to be first in line (after "inprogress")
+ unshift: function( element, queueLength, count ) {
+ var queue = element.queue();
+
+ if ( queueLength > 1 ) {
+ queue.splice.apply( queue,
+ [ 1, 0 ].concat( queue.splice( queueLength, count ) ) );
+ }
+ element.dequeue();
+ },
+
+ saveStyle: function( element ) {
+ element.data( dataSpaceStyle, element[ 0 ].style.cssText );
+ },
+
+ restoreStyle: function( element ) {
+ element[ 0 ].style.cssText = element.data( dataSpaceStyle ) || "";
+ element.removeData( dataSpaceStyle );
+ },
+
+ mode: function( element, mode ) {
+ var hidden = element.is( ":hidden" );
+
+ if ( mode === "toggle" ) {
+ mode = hidden ? "show" : "hide";
+ }
+ if ( hidden ? mode === "hide" : mode === "show" ) {
+ mode = "none";
+ }
+ return mode;
+ },
+
+ // Translates a [top,left] array into a baseline value
+ getBaseline: function( origin, original ) {
+ var y, x;
+
+ switch ( origin[ 0 ] ) {
+ case "top":
+ y = 0;
+ break;
+ case "middle":
+ y = 0.5;
+ break;
+ case "bottom":
+ y = 1;
+ break;
+ default:
+ y = origin[ 0 ] / original.height;
+ }
+
+ switch ( origin[ 1 ] ) {
+ case "left":
+ x = 0;
+ break;
+ case "center":
+ x = 0.5;
+ break;
+ case "right":
+ x = 1;
+ break;
+ default:
+ x = origin[ 1 ] / original.width;
+ }
+
+ return {
+ x: x,
+ y: y
+ };
+ },
+
+ // Creates a placeholder element so that the original element can be made absolute
+ createPlaceholder: function( element ) {
+ var placeholder,
+ cssPosition = element.css( "position" ),
+ position = element.position();
+
+ // Lock in margins first to account for form elements, which
+ // will change margin if you explicitly set height
+ // see: http://jsfiddle.net/JZSMt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380
+ // Support: Safari
+ element.css( {
+ marginTop: element.css( "marginTop" ),
+ marginBottom: element.css( "marginBottom" ),
+ marginLeft: element.css( "marginLeft" ),
+ marginRight: element.css( "marginRight" )
+ } )
+ .outerWidth( element.outerWidth() )
+ .outerHeight( element.outerHeight() );
+
+ if ( /^(static|relative)/.test( cssPosition ) ) {
+ cssPosition = "absolute";
+
+ placeholder = $( "<" + element[ 0 ].nodeName + ">" ).insertAfter( element ).css( {
+
+ // Convert inline to inline block to account for inline elements
+ // that turn to inline block based on content (like img)
+ display: /^(inline|ruby)/.test( element.css( "display" ) ) ?
+ "inline-block" :
+ "block",
+ visibility: "hidden",
+
+ // Margins need to be set to account for margin collapse
+ marginTop: element.css( "marginTop" ),
+ marginBottom: element.css( "marginBottom" ),
+ marginLeft: element.css( "marginLeft" ),
+ marginRight: element.css( "marginRight" ),
+ "float": element.css( "float" )
+ } )
+ .outerWidth( element.outerWidth() )
+ .outerHeight( element.outerHeight() )
+ .addClass( "ui-effects-placeholder" );
+
+ element.data( dataSpace + "placeholder", placeholder );
+ }
+
+ element.css( {
+ position: cssPosition,
+ left: position.left,
+ top: position.top
+ } );
+
+ return placeholder;
+ },
+
+ removePlaceholder: function( element ) {
+ var dataKey = dataSpace + "placeholder",
+ placeholder = element.data( dataKey );
+
+ if ( placeholder ) {
+ placeholder.remove();
+ element.removeData( dataKey );
+ }
+ },
+
+ // Removes a placeholder if it exists and restores
+ // properties that were modified during placeholder creation
+ cleanUp: function( element ) {
+ $.effects.restoreStyle( element );
+ $.effects.removePlaceholder( element );
+ },
+
+ setTransition: function( element, list, factor, value ) {
+ value = value || {};
+ $.each( list, function( i, x ) {
+ var unit = element.cssUnit( x );
+ if ( unit[ 0 ] > 0 ) {
+ value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
+ }
+ } );
+ return value;
+ }
+} );
+
+// Return an effect options object for the given parameters:
+function _normalizeArguments( effect, options, speed, callback ) {
+
+ // Allow passing all options as the first parameter
+ if ( $.isPlainObject( effect ) ) {
+ options = effect;
+ effect = effect.effect;
+ }
+
+ // Convert to an object
+ effect = { effect: effect };
+
+ // Catch (effect, null, ...)
+ if ( options == null ) {
+ options = {};
+ }
+
+ // Catch (effect, callback)
+ if ( $.isFunction( options ) ) {
+ callback = options;
+ speed = null;
+ options = {};
+ }
+
+ // Catch (effect, speed, ?)
+ if ( typeof options === "number" || $.fx.speeds[ options ] ) {
+ callback = speed;
+ speed = options;
+ options = {};
+ }
+
+ // Catch (effect, options, callback)
+ if ( $.isFunction( speed ) ) {
+ callback = speed;
+ speed = null;
+ }
+
+ // Add options to effect
+ if ( options ) {
+ $.extend( effect, options );
+ }
+
+ speed = speed || options.duration;
+ effect.duration = $.fx.off ? 0 :
+ typeof speed === "number" ? speed :
+ speed in $.fx.speeds ? $.fx.speeds[ speed ] :
+ $.fx.speeds._default;
+
+ effect.complete = callback || options.complete;
+
+ return effect;
+}
+
+function standardAnimationOption( option ) {
+
+ // Valid standard speeds (nothing, number, named speed)
+ if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) {
+ return true;
+ }
+
+ // Invalid strings - treat as "normal" speed
+ if ( typeof option === "string" && !$.effects.effect[ option ] ) {
+ return true;
+ }
+
+ // Complete callback
+ if ( $.isFunction( option ) ) {
+ return true;
+ }
+
+ // Options hash (but not naming an effect)
+ if ( typeof option === "object" && !option.effect ) {
+ return true;
+ }
+
+ // Didn't match any standard API
+ return false;
+}
+
+$.fn.extend( {
+ effect: function( /* effect, options, speed, callback */ ) {
+ var args = _normalizeArguments.apply( this, arguments ),
+ effectMethod = $.effects.effect[ args.effect ],
+ defaultMode = effectMethod.mode,
+ queue = args.queue,
+ queueName = queue || "fx",
+ complete = args.complete,
+ mode = args.mode,
+ modes = [],
+ prefilter = function( next ) {
+ var el = $( this ),
+ normalizedMode = $.effects.mode( el, mode ) || defaultMode;
+
+ // Sentinel for duck-punching the :animated psuedo-selector
+ el.data( dataSpaceAnimated, true );
+
+ // Save effect mode for later use,
+ // we can't just call $.effects.mode again later,
+ // as the .show() below destroys the initial state
+ modes.push( normalizedMode );
+
+ // See $.uiBackCompat inside of run() for removal of defaultMode in 1.13
+ if ( defaultMode && ( normalizedMode === "show" ||
+ ( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) {
+ el.show();
+ }
+
+ if ( !defaultMode || normalizedMode !== "none" ) {
+ $.effects.saveStyle( el );
+ }
+
+ if ( $.isFunction( next ) ) {
+ next();
+ }
+ };
+
+ if ( $.fx.off || !effectMethod ) {
+
+ // Delegate to the original method (e.g., .show()) if possible
+ if ( mode ) {
+ return this[ mode ]( args.duration, complete );
+ } else {
+ return this.each( function() {
+ if ( complete ) {
+ complete.call( this );
+ }
+ } );
+ }
+ }
+
+ function run( next ) {
+ var elem = $( this );
+
+ function cleanup() {
+ elem.removeData( dataSpaceAnimated );
+
+ $.effects.cleanUp( elem );
+
+ if ( args.mode === "hide" ) {
+ elem.hide();
+ }
+
+ done();
+ }
+
+ function done() {
+ if ( $.isFunction( complete ) ) {
+ complete.call( elem[ 0 ] );
+ }
+
+ if ( $.isFunction( next ) ) {
+ next();
+ }
+ }
+
+ // Override mode option on a per element basis,
+ // as toggle can be either show or hide depending on element state
+ args.mode = modes.shift();
+
+ if ( $.uiBackCompat !== false && !defaultMode ) {
+ if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
+
+ // Call the core method to track "olddisplay" properly
+ elem[ mode ]();
+ done();
+ } else {
+ effectMethod.call( elem[ 0 ], args, done );
+ }
+ } else {
+ if ( args.mode === "none" ) {
+
+ // Call the core method to track "olddisplay" properly
+ elem[ mode ]();
+ done();
+ } else {
+ effectMethod.call( elem[ 0 ], args, cleanup );
+ }
+ }
+ }
+
+ // Run prefilter on all elements first to ensure that
+ // any showing or hiding happens before placeholder creation,
+ // which ensures that any layout changes are correctly captured.
+ return queue === false ?
+ this.each( prefilter ).each( run ) :
+ this.queue( queueName, prefilter ).queue( queueName, run );
+ },
+
+ show: ( function( orig ) {
+ return function( option ) {
+ if ( standardAnimationOption( option ) ) {
+ return orig.apply( this, arguments );
+ } else {
+ var args = _normalizeArguments.apply( this, arguments );
+ args.mode = "show";
+ return this.effect.call( this, args );
+ }
+ };
+ } )( $.fn.show ),
+
+ hide: ( function( orig ) {
+ return function( option ) {
+ if ( standardAnimationOption( option ) ) {
+ return orig.apply( this, arguments );
+ } else {
+ var args = _normalizeArguments.apply( this, arguments );
+ args.mode = "hide";
+ return this.effect.call( this, args );
+ }
+ };
+ } )( $.fn.hide ),
+
+ toggle: ( function( orig ) {
+ return function( option ) {
+ if ( standardAnimationOption( option ) || typeof option === "boolean" ) {
+ return orig.apply( this, arguments );
+ } else {
+ var args = _normalizeArguments.apply( this, arguments );
+ args.mode = "toggle";
+ return this.effect.call( this, args );
+ }
+ };
+ } )( $.fn.toggle ),
+
+ cssUnit: function( key ) {
+ var style = this.css( key ),
+ val = [];
+
+ $.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
+ if ( style.indexOf( unit ) > 0 ) {
+ val = [ parseFloat( style ), unit ];
+ }
+ } );
+ return val;
+ },
+
+ cssClip: function( clipObj ) {
+ if ( clipObj ) {
+ return this.css( "clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " +
+ clipObj.bottom + "px " + clipObj.left + "px)" );
+ }
+ return parseClip( this.css( "clip" ), this );
+ },
+
+ transfer: function( options, done ) {
+ var element = $( this ),
+ target = $( options.to ),
+ targetFixed = target.css( "position" ) === "fixed",
+ body = $( "body" ),
+ fixTop = targetFixed ? body.scrollTop() : 0,
+ fixLeft = targetFixed ? body.scrollLeft() : 0,
+ endPosition = target.offset(),
+ animation = {
+ top: endPosition.top - fixTop,
+ left: endPosition.left - fixLeft,
+ height: target.innerHeight(),
+ width: target.innerWidth()
+ },
+ startPosition = element.offset(),
+ transfer = $( "<div class='ui-effects-transfer'></div>" )
+ .appendTo( "body" )
+ .addClass( options.className )
+ .css( {
+ top: startPosition.top - fixTop,
+ left: startPosition.left - fixLeft,
+ height: element.innerHeight(),
+ width: element.innerWidth(),
+ position: targetFixed ? "fixed" : "absolute"
+ } )
+ .animate( animation, options.duration, options.easing, function() {
+ transfer.remove();
+ if ( $.isFunction( done ) ) {
+ done();
+ }
+ } );
+ }
+} );
+
+function parseClip( str, element ) {
+ var outerWidth = element.outerWidth(),
+ outerHeight = element.outerHeight(),
+ clipRegex = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,
+ values = clipRegex.exec( str ) || [ "", 0, outerWidth, outerHeight, 0 ];
+
+ return {
+ top: parseFloat( values[ 1 ] ) || 0,
+ right: values[ 2 ] === "auto" ? outerWidth : parseFloat( values[ 2 ] ),
+ bottom: values[ 3 ] === "auto" ? outerHeight : parseFloat( values[ 3 ] ),
+ left: parseFloat( values[ 4 ] ) || 0
+ };
+}
+
+$.fx.step.clip = function( fx ) {
+ if ( !fx.clipInit ) {
+ fx.start = $( fx.elem ).cssClip();
+ if ( typeof fx.end === "string" ) {
+ fx.end = parseClip( fx.end, fx.elem );
+ }
+ fx.clipInit = true;
+ }
+
+ $( fx.elem ).cssClip( {
+ top: fx.pos * ( fx.end.top - fx.start.top ) + fx.start.top,
+ right: fx.pos * ( fx.end.right - fx.start.right ) + fx.start.right,
+ bottom: fx.pos * ( fx.end.bottom - fx.start.bottom ) + fx.start.bottom,
+ left: fx.pos * ( fx.end.left - fx.start.left ) + fx.start.left
+ } );
+};
+
+} )();
+
+/******************************************************************************/
+/*********************************** EASING ***********************************/
+/******************************************************************************/
+
+( function() {
+
+// Based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
+
+var baseEasings = {};
+
+$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
+ baseEasings[ name ] = function( p ) {
+ return Math.pow( p, i + 2 );
+ };
+} );
+
+$.extend( baseEasings, {
+ Sine: function( p ) {
+ return 1 - Math.cos( p * Math.PI / 2 );
+ },
+ Circ: function( p ) {
+ return 1 - Math.sqrt( 1 - p * p );
+ },
+ Elastic: function( p ) {
+ return p === 0 || p === 1 ? p :
+ -Math.pow( 2, 8 * ( p - 1 ) ) * Math.sin( ( ( p - 1 ) * 80 - 7.5 ) * Math.PI / 15 );
+ },
+ Back: function( p ) {
+ return p * p * ( 3 * p - 2 );
+ },
+ Bounce: function( p ) {
+ var pow2,
+ bounce = 4;
+
+ while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
+ return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
+ }
+} );
+
+$.each( baseEasings, function( name, easeIn ) {
+ $.easing[ "easeIn" + name ] = easeIn;
+ $.easing[ "easeOut" + name ] = function( p ) {
+ return 1 - easeIn( 1 - p );
+ };
+ $.easing[ "easeInOut" + name ] = function( p ) {
+ return p < 0.5 ?
+ easeIn( p * 2 ) / 2 :
+ 1 - easeIn( p * -2 + 2 ) / 2;
+ };
+} );
+
+} )();
+
+var effect = $.effects;
+
+
+/*!
+ * jQuery UI Effects Blind 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Blind Effect
+//>>group: Effects
+//>>description: Blinds the element.
+//>>docs: http://api.jqueryui.com/blind-effect/
+//>>demos: http://jqueryui.com/effect/
+
+
+
+var effectsEffectBlind = $.effects.define( "blind", "hide", function( options, done ) {
+ var map = {
+ up: [ "bottom", "top" ],
+ vertical: [ "bottom", "top" ],
+ down: [ "top", "bottom" ],
+ left: [ "right", "left" ],
+ horizontal: [ "right", "left" ],
+ right: [ "left", "right" ]
+ },
+ element = $( this ),
+ direction = options.direction || "up",
+ start = element.cssClip(),
+ animate = { clip: $.extend( {}, start ) },
+ placeholder = $.effects.createPlaceholder( element );
+
+ animate.clip[ map[ direction ][ 0 ] ] = animate.clip[ map[ direction ][ 1 ] ];
+
+ if ( options.mode === "show" ) {
+ element.cssClip( animate.clip );
+ if ( placeholder ) {
+ placeholder.css( $.effects.clipToBox( animate ) );
+ }
+
+ animate.clip = start;
+ }
+
+ if ( placeholder ) {
+ placeholder.animate( $.effects.clipToBox( animate ), options.duration, options.easing );
+ }
+
+ element.animate( animate, {
+ queue: false,
+ duration: options.duration,
+ easing: options.easing,
+ complete: done
+ } );
+} );
+
+
+/*!
+ * jQuery UI Effects Bounce 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Bounce Effect
+//>>group: Effects
+//>>description: Bounces an element horizontally or vertically n times.
+//>>docs: http://api.jqueryui.com/bounce-effect/
+//>>demos: http://jqueryui.com/effect/
+
+
+
+var effectsEffectBounce = $.effects.define( "bounce", function( options, done ) {
+ var upAnim, downAnim, refValue,
+ element = $( this ),
+
+ // Defaults:
+ mode = options.mode,
+ hide = mode === "hide",
+ show = mode === "show",
+ direction = options.direction || "up",
+ distance = options.distance,
+ times = options.times || 5,
+
+ // Number of internal animations
+ anims = times * 2 + ( show || hide ? 1 : 0 ),
+ speed = options.duration / anims,
+ easing = options.easing,
+
+ // Utility:
+ ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
+ motion = ( direction === "up" || direction === "left" ),
+ i = 0,
+
+ queuelen = element.queue().length;
+
+ $.effects.createPlaceholder( element );
+
+ refValue = element.css( ref );
+
+ // Default distance for the BIGGEST bounce is the outer Distance / 3
+ if ( !distance ) {
+ distance = element[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3;
+ }
+
+ if ( show ) {
+ downAnim = { opacity: 1 };
+ downAnim[ ref ] = refValue;
+
+ // If we are showing, force opacity 0 and set the initial position
+ // then do the "first" animation
+ element
+ .css( "opacity", 0 )
+ .css( ref, motion ? -distance * 2 : distance * 2 )
+ .animate( downAnim, speed, easing );
+ }
+
+ // Start at the smallest distance if we are hiding
+ if ( hide ) {
+ distance = distance / Math.pow( 2, times - 1 );
+ }
+
+ downAnim = {};
+ downAnim[ ref ] = refValue;
+
+ // Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
+ for ( ; i < times; i++ ) {
+ upAnim = {};
+ upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
+
+ element
+ .animate( upAnim, speed, easing )
+ .animate( downAnim, speed, easing );
+
+ distance = hide ? distance * 2 : distance / 2;
+ }
+
+ // Last Bounce when Hiding
+ if ( hide ) {
+ upAnim = { opacity: 0 };
+ upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
+
+ element.animate( upAnim, speed, easing );
+ }
+
+ element.queue( done );
+
+ $.effects.unshift( element, queuelen, anims + 1 );
+} );
+
+
+/*!
+ * jQuery UI Effects Clip 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Clip Effect
+//>>group: Effects
+//>>description: Clips the element on and off like an old TV.
+//>>docs: http://api.jqueryui.com/clip-effect/
+//>>demos: http://jqueryui.com/effect/
+
+
+
+var effectsEffectClip = $.effects.define( "clip", "hide", function( options, done ) {
+ var start,
+ animate = {},
+ element = $( this ),
+ direction = options.direction || "vertical",
+ both = direction === "both",
+ horizontal = both || direction === "horizontal",
+ vertical = both || direction === "vertical";
+
+ start = element.cssClip();
+ animate.clip = {
+ top: vertical ? ( start.bottom - start.top ) / 2 : start.top,
+ right: horizontal ? ( start.right - start.left ) / 2 : start.right,
+ bottom: vertical ? ( start.bottom - start.top ) / 2 : start.bottom,
+ left: horizontal ? ( start.right - start.left ) / 2 : start.left
+ };
+
+ $.effects.createPlaceholder( element );
+
+ if ( options.mode === "show" ) {
+ element.cssClip( animate.clip );
+ animate.clip = start;
+ }
+
+ element.animate( animate, {
+ queue: false,
+ duration: options.duration,
+ easing: options.easing,
+ complete: done
+ } );
+
+} );
+
+
+/*!
+ * jQuery UI Effects Drop 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Drop Effect
+//>>group: Effects
+//>>description: Moves an element in one direction and hides it at the same time.
+//>>docs: http://api.jqueryui.com/drop-effect/
+//>>demos: http://jqueryui.com/effect/
+
+
+
+var effectsEffectDrop = $.effects.define( "drop", "hide", function( options, done ) {
+
+ var distance,
+ element = $( this ),
+ mode = options.mode,
+ show = mode === "show",
+ direction = options.direction || "left",
+ ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
+ motion = ( direction === "up" || direction === "left" ) ? "-=" : "+=",
+ oppositeMotion = ( motion === "+=" ) ? "-=" : "+=",
+ animation = {
+ opacity: 0
+ };
+
+ $.effects.createPlaceholder( element );
+
+ distance = options.distance ||
+ element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2;
+
+ animation[ ref ] = motion + distance;
+
+ if ( show ) {
+ element.css( animation );
+
+ animation[ ref ] = oppositeMotion + distance;
+ animation.opacity = 1;
+ }
+
+ // Animate
+ element.animate( animation, {
+ queue: false,
+ duration: options.duration,
+ easing: options.easing,
+ complete: done
+ } );
+} );
+
+
+/*!
+ * jQuery UI Effects Explode 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Explode Effect
+//>>group: Effects
+// jscs:disable maximumLineLength
+//>>description: Explodes an element in all directions into n pieces. Implodes an element to its original wholeness.
+// jscs:enable maximumLineLength
+//>>docs: http://api.jqueryui.com/explode-effect/
+//>>demos: http://jqueryui.com/effect/
+
+
+
+var effectsEffectExplode = $.effects.define( "explode", "hide", function( options, done ) {
+
+ var i, j, left, top, mx, my,
+ rows = options.pieces ? Math.round( Math.sqrt( options.pieces ) ) : 3,
+ cells = rows,
+ element = $( this ),
+ mode = options.mode,
+ show = mode === "show",
+
+ // Show and then visibility:hidden the element before calculating offset
+ offset = element.show().css( "visibility", "hidden" ).offset(),
+
+ // Width and height of a piece
+ width = Math.ceil( element.outerWidth() / cells ),
+ height = Math.ceil( element.outerHeight() / rows ),
+ pieces = [];
+
+ // Children animate complete:
+ function childComplete() {
+ pieces.push( this );
+ if ( pieces.length === rows * cells ) {
+ animComplete();
+ }
+ }
+
+ // Clone the element for each row and cell.
+ for ( i = 0; i < rows; i++ ) { // ===>
+ top = offset.top + i * height;
+ my = i - ( rows - 1 ) / 2;
+
+ for ( j = 0; j < cells; j++ ) { // |||
+ left = offset.left + j * width;
+ mx = j - ( cells - 1 ) / 2;
+
+ // Create a clone of the now hidden main element that will be absolute positioned
+ // within a wrapper div off the -left and -top equal to size of our pieces
+ element
+ .clone()
+ .appendTo( "body" )
+ .wrap( "<div></div>" )
+ .css( {
+ position: "absolute",
+ visibility: "visible",
+ left: -j * width,
+ top: -i * height
+ } )
+
+ // Select the wrapper - make it overflow: hidden and absolute positioned based on
+ // where the original was located +left and +top equal to the size of pieces
+ .parent()
+ .addClass( "ui-effects-explode" )
+ .css( {
+ position: "absolute",
+ overflow: "hidden",
+ width: width,
+ height: height,
+ left: left + ( show ? mx * width : 0 ),
+ top: top + ( show ? my * height : 0 ),
+ opacity: show ? 0 : 1
+ } )
+ .animate( {
+ left: left + ( show ? 0 : mx * width ),
+ top: top + ( show ? 0 : my * height ),
+ opacity: show ? 1 : 0
+ }, options.duration || 500, options.easing, childComplete );
+ }
+ }
+
+ function animComplete() {
+ element.css( {
+ visibility: "visible"
+ } );
+ $( pieces ).remove();
+ done();
+ }
+} );
+
+
+/*!
+ * jQuery UI Effects Fade 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Fade Effect
+//>>group: Effects
+//>>description: Fades the element.
+//>>docs: http://api.jqueryui.com/fade-effect/
+//>>demos: http://jqueryui.com/effect/
+
+
+
+var effectsEffectFade = $.effects.define( "fade", "toggle", function( options, done ) {
+ var show = options.mode === "show";
+
+ $( this )
+ .css( "opacity", show ? 0 : 1 )
+ .animate( {
+ opacity: show ? 1 : 0
+ }, {
+ queue: false,
+ duration: options.duration,
+ easing: options.easing,
+ complete: done
+ } );
+} );
+
+
+/*!
+ * jQuery UI Effects Fold 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Fold Effect
+//>>group: Effects
+//>>description: Folds an element first horizontally and then vertically.
+//>>docs: http://api.jqueryui.com/fold-effect/
+//>>demos: http://jqueryui.com/effect/
+
+
+
+var effectsEffectFold = $.effects.define( "fold", "hide", function( options, done ) {
+
+ // Create element
+ var element = $( this ),
+ mode = options.mode,
+ show = mode === "show",
+ hide = mode === "hide",
+ size = options.size || 15,
+ percent = /([0-9]+)%/.exec( size ),
+ horizFirst = !!options.horizFirst,
+ ref = horizFirst ? [ "right", "bottom" ] : [ "bottom", "right" ],
+ duration = options.duration / 2,
+
+ placeholder = $.effects.createPlaceholder( element ),
+
+ start = element.cssClip(),
+ animation1 = { clip: $.extend( {}, start ) },
+ animation2 = { clip: $.extend( {}, start ) },
+
+ distance = [ start[ ref[ 0 ] ], start[ ref[ 1 ] ] ],
+
+ queuelen = element.queue().length;
+
+ if ( percent ) {
+ size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];
+ }
+ animation1.clip[ ref[ 0 ] ] = size;
+ animation2.clip[ ref[ 0 ] ] = size;
+ animation2.clip[ ref[ 1 ] ] = 0;
+
+ if ( show ) {
+ element.cssClip( animation2.clip );
+ if ( placeholder ) {
+ placeholder.css( $.effects.clipToBox( animation2 ) );
+ }
+
+ animation2.clip = start;
+ }
+
+ // Animate
+ element
+ .queue( function( next ) {
+ if ( placeholder ) {
+ placeholder
+ .animate( $.effects.clipToBox( animation1 ), duration, options.easing )
+ .animate( $.effects.clipToBox( animation2 ), duration, options.easing );
+ }
+
+ next();
+ } )
+ .animate( animation1, duration, options.easing )
+ .animate( animation2, duration, options.easing )
+ .queue( done );
+
+ $.effects.unshift( element, queuelen, 4 );
+} );
+
+
+/*!
+ * jQuery UI Effects Highlight 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Highlight Effect
+//>>group: Effects
+//>>description: Highlights the background of an element in a defined color for a custom duration.
+//>>docs: http://api.jqueryui.com/highlight-effect/
+//>>demos: http://jqueryui.com/effect/
+
+
+
+var effectsEffectHighlight = $.effects.define( "highlight", "show", function( options, done ) {
+ var element = $( this ),
+ animation = {
+ backgroundColor: element.css( "backgroundColor" )
+ };
+
+ if ( options.mode === "hide" ) {
+ animation.opacity = 0;
+ }
+
+ $.effects.saveStyle( element );
+
+ element
+ .css( {
+ backgroundImage: "none",
+ backgroundColor: options.color || "#ffff99"
+ } )
+ .animate( animation, {
+ queue: false,
+ duration: options.duration,
+ easing: options.easing,
+ complete: done
+ } );
+} );
+
+
+/*!
+ * jQuery UI Effects Size 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Size Effect
+//>>group: Effects
+//>>description: Resize an element to a specified width and height.
+//>>docs: http://api.jqueryui.com/size-effect/
+//>>demos: http://jqueryui.com/effect/
+
+
+
+var effectsEffectSize = $.effects.define( "size", function( options, done ) {
+
+ // Create element
+ var baseline, factor, temp,
+ element = $( this ),
+
+ // Copy for children
+ cProps = [ "fontSize" ],
+ vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
+ hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],
+
+ // Set options
+ mode = options.mode,
+ restore = mode !== "effect",
+ scale = options.scale || "both",
+ origin = options.origin || [ "middle", "center" ],
+ position = element.css( "position" ),
+ pos = element.position(),
+ original = $.effects.scaledDimensions( element ),
+ from = options.from || original,
+ to = options.to || $.effects.scaledDimensions( element, 0 );
+
+ $.effects.createPlaceholder( element );
+
+ if ( mode === "show" ) {
+ temp = from;
+ from = to;
+ to = temp;
+ }
+
+ // Set scaling factor
+ factor = {
+ from: {
+ y: from.height / original.height,
+ x: from.width / original.width
+ },
+ to: {
+ y: to.height / original.height,
+ x: to.width / original.width
+ }
+ };
+
+ // Scale the css box
+ if ( scale === "box" || scale === "both" ) {
+
+ // Vertical props scaling
+ if ( factor.from.y !== factor.to.y ) {
+ from = $.effects.setTransition( element, vProps, factor.from.y, from );
+ to = $.effects.setTransition( element, vProps, factor.to.y, to );
+ }
+
+ // Horizontal props scaling
+ if ( factor.from.x !== factor.to.x ) {
+ from = $.effects.setTransition( element, hProps, factor.from.x, from );
+ to = $.effects.setTransition( element, hProps, factor.to.x, to );
+ }
+ }
+
+ // Scale the content
+ if ( scale === "content" || scale === "both" ) {
+
+ // Vertical props scaling
+ if ( factor.from.y !== factor.to.y ) {
+ from = $.effects.setTransition( element, cProps, factor.from.y, from );
+ to = $.effects.setTransition( element, cProps, factor.to.y, to );
+ }
+ }
+
+ // Adjust the position properties based on the provided origin points
+ if ( origin ) {
+ baseline = $.effects.getBaseline( origin, original );
+ from.top = ( original.outerHeight - from.outerHeight ) * baseline.y + pos.top;
+ from.left = ( original.outerWidth - from.outerWidth ) * baseline.x + pos.left;
+ to.top = ( original.outerHeight - to.outerHeight ) * baseline.y + pos.top;
+ to.left = ( original.outerWidth - to.outerWidth ) * baseline.x + pos.left;
+ }
+ element.css( from );
+
+ // Animate the children if desired
+ if ( scale === "content" || scale === "both" ) {
+
+ vProps = vProps.concat( [ "marginTop", "marginBottom" ] ).concat( cProps );
+ hProps = hProps.concat( [ "marginLeft", "marginRight" ] );
+
+ // Only animate children with width attributes specified
+ // TODO: is this right? should we include anything with css width specified as well
+ element.find( "*[width]" ).each( function() {
+ var child = $( this ),
+ childOriginal = $.effects.scaledDimensions( child ),
+ childFrom = {
+ height: childOriginal.height * factor.from.y,
+ width: childOriginal.width * factor.from.x,
+ outerHeight: childOriginal.outerHeight * factor.from.y,
+ outerWidth: childOriginal.outerWidth * factor.from.x
+ },
+ childTo = {
+ height: childOriginal.height * factor.to.y,
+ width: childOriginal.width * factor.to.x,
+ outerHeight: childOriginal.height * factor.to.y,
+ outerWidth: childOriginal.width * factor.to.x
+ };
+
+ // Vertical props scaling
+ if ( factor.from.y !== factor.to.y ) {
+ childFrom = $.effects.setTransition( child, vProps, factor.from.y, childFrom );
+ childTo = $.effects.setTransition( child, vProps, factor.to.y, childTo );
+ }
+
+ // Horizontal props scaling
+ if ( factor.from.x !== factor.to.x ) {
+ childFrom = $.effects.setTransition( child, hProps, factor.from.x, childFrom );
+ childTo = $.effects.setTransition( child, hProps, factor.to.x, childTo );
+ }
+
+ if ( restore ) {
+ $.effects.saveStyle( child );
+ }
+
+ // Animate children
+ child.css( childFrom );
+ child.animate( childTo, options.duration, options.easing, function() {
+
+ // Restore children
+ if ( restore ) {
+ $.effects.restoreStyle( child );
+ }
+ } );
+ } );
+ }
+
+ // Animate
+ element.animate( to, {
+ queue: false,
+ duration: options.duration,
+ easing: options.easing,
+ complete: function() {
+
+ var offset = element.offset();
+
+ if ( to.opacity === 0 ) {
+ element.css( "opacity", from.opacity );
+ }
+
+ if ( !restore ) {
+ element
+ .css( "position", position === "static" ? "relative" : position )
+ .offset( offset );
+
+ // Need to save style here so that automatic style restoration
+ // doesn't restore to the original styles from before the animation.
+ $.effects.saveStyle( element );
+ }
+
+ done();
+ }
+ } );
+
+} );
+
+
+/*!
+ * jQuery UI Effects Scale 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Scale Effect
+//>>group: Effects
+//>>description: Grows or shrinks an element and its content.
+//>>docs: http://api.jqueryui.com/scale-effect/
+//>>demos: http://jqueryui.com/effect/
+
+
+
+var effectsEffectScale = $.effects.define( "scale", function( options, done ) {
+
+ // Create element
+ var el = $( this ),
+ mode = options.mode,
+ percent = parseInt( options.percent, 10 ) ||
+ ( parseInt( options.percent, 10 ) === 0 ? 0 : ( mode !== "effect" ? 0 : 100 ) ),
+
+ newOptions = $.extend( true, {
+ from: $.effects.scaledDimensions( el ),
+ to: $.effects.scaledDimensions( el, percent, options.direction || "both" ),
+ origin: options.origin || [ "middle", "center" ]
+ }, options );
+
+ // Fade option to support puff
+ if ( options.fade ) {
+ newOptions.from.opacity = 1;
+ newOptions.to.opacity = 0;
+ }
+
+ $.effects.effect.size.call( this, newOptions, done );
+} );
+
+
+/*!
+ * jQuery UI Effects Puff 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Puff Effect
+//>>group: Effects
+//>>description: Creates a puff effect by scaling the element up and hiding it at the same time.
+//>>docs: http://api.jqueryui.com/puff-effect/
+//>>demos: http://jqueryui.com/effect/
+
+
+
+var effectsEffectPuff = $.effects.define( "puff", "hide", function( options, done ) {
+ var newOptions = $.extend( true, {}, options, {
+ fade: true,
+ percent: parseInt( options.percent, 10 ) || 150
+ } );
+
+ $.effects.effect.scale.call( this, newOptions, done );
+} );
+
+
+/*!
+ * jQuery UI Effects Pulsate 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Pulsate Effect
+//>>group: Effects
+//>>description: Pulsates an element n times by changing the opacity to zero and back.
+//>>docs: http://api.jqueryui.com/pulsate-effect/
+//>>demos: http://jqueryui.com/effect/
+
+
+
+var effectsEffectPulsate = $.effects.define( "pulsate", "show", function( options, done ) {
+ var element = $( this ),
+ mode = options.mode,
+ show = mode === "show",
+ hide = mode === "hide",
+ showhide = show || hide,
+
+ // Showing or hiding leaves off the "last" animation
+ anims = ( ( options.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
+ duration = options.duration / anims,
+ animateTo = 0,
+ i = 1,
+ queuelen = element.queue().length;
+
+ if ( show || !element.is( ":visible" ) ) {
+ element.css( "opacity", 0 ).show();
+ animateTo = 1;
+ }
+
+ // Anims - 1 opacity "toggles"
+ for ( ; i < anims; i++ ) {
+ element.animate( { opacity: animateTo }, duration, options.easing );
+ animateTo = 1 - animateTo;
+ }
+
+ element.animate( { opacity: animateTo }, duration, options.easing );
+
+ element.queue( done );
+
+ $.effects.unshift( element, queuelen, anims + 1 );
+} );
+
+
+/*!
+ * jQuery UI Effects Shake 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Shake Effect
+//>>group: Effects
+//>>description: Shakes an element horizontally or vertically n times.
+//>>docs: http://api.jqueryui.com/shake-effect/
+//>>demos: http://jqueryui.com/effect/
+
+
+
+var effectsEffectShake = $.effects.define( "shake", function( options, done ) {
+
+ var i = 1,
+ element = $( this ),
+ direction = options.direction || "left",
+ distance = options.distance || 20,
+ times = options.times || 3,
+ anims = times * 2 + 1,
+ speed = Math.round( options.duration / anims ),
+ ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
+ positiveMotion = ( direction === "up" || direction === "left" ),
+ animation = {},
+ animation1 = {},
+ animation2 = {},
+
+ queuelen = element.queue().length;
+
+ $.effects.createPlaceholder( element );
+
+ // Animation
+ animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
+ animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
+ animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;
+
+ // Animate
+ element.animate( animation, speed, options.easing );
+
+ // Shakes
+ for ( ; i < times; i++ ) {
+ element
+ .animate( animation1, speed, options.easing )
+ .animate( animation2, speed, options.easing );
+ }
+
+ element
+ .animate( animation1, speed, options.easing )
+ .animate( animation, speed / 2, options.easing )
+ .queue( done );
+
+ $.effects.unshift( element, queuelen, anims + 1 );
+} );
+
+
+/*!
+ * jQuery UI Effects Slide 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Slide Effect
+//>>group: Effects
+//>>description: Slides an element in and out of the viewport.
+//>>docs: http://api.jqueryui.com/slide-effect/
+//>>demos: http://jqueryui.com/effect/
+
+
+
+var effectsEffectSlide = $.effects.define( "slide", "show", function( options, done ) {
+ var startClip, startRef,
+ element = $( this ),
+ map = {
+ up: [ "bottom", "top" ],
+ down: [ "top", "bottom" ],
+ left: [ "right", "left" ],
+ right: [ "left", "right" ]
+ },
+ mode = options.mode,
+ direction = options.direction || "left",
+ ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
+ positiveMotion = ( direction === "up" || direction === "left" ),
+ distance = options.distance ||
+ element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ),
+ animation = {};
+
+ $.effects.createPlaceholder( element );
+
+ startClip = element.cssClip();
+ startRef = element.position()[ ref ];
+
+ // Define hide animation
+ animation[ ref ] = ( positiveMotion ? -1 : 1 ) * distance + startRef;
+ animation.clip = element.cssClip();
+ animation.clip[ map[ direction ][ 1 ] ] = animation.clip[ map[ direction ][ 0 ] ];
+
+ // Reverse the animation if we're showing
+ if ( mode === "show" ) {
+ element.cssClip( animation.clip );
+ element.css( ref, animation[ ref ] );
+ animation.clip = startClip;
+ animation[ ref ] = startRef;
+ }
+
+ // Actually animate
+ element.animate( animation, {
+ queue: false,
+ duration: options.duration,
+ easing: options.easing,
+ complete: done
+ } );
+} );
+
+
+/*!
+ * jQuery UI Effects Transfer 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Transfer Effect
+//>>group: Effects
+//>>description: Displays a transfer effect from one element to another.
+//>>docs: http://api.jqueryui.com/transfer-effect/
+//>>demos: http://jqueryui.com/effect/
+
+
+
+var effect;
+if ( $.uiBackCompat !== false ) {
+ effect = $.effects.define( "transfer", function( options, done ) {
+ $( this ).transfer( options, done );
+ } );
+}
+var effectsEffectTransfer = effect;
+
+
+/*!
+ * jQuery UI Focusable 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: :focusable Selector
+//>>group: Core
+//>>description: Selects elements which can be focused.
+//>>docs: http://api.jqueryui.com/focusable-selector/
+
+
+
+// Selectors
+$.ui.focusable = function( element, hasTabindex ) {
+ var map, mapName, img, focusableIfVisible, fieldset,
+ nodeName = element.nodeName.toLowerCase();
+
+ if ( "area" === nodeName ) {
+ map = element.parentNode;
+ mapName = map.name;
+ if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
+ return false;
+ }
+ img = $( "img[usemap='#" + mapName + "']" );
+ return img.length > 0 && img.is( ":visible" );
+ }
+
+ if ( /^(input|select|textarea|button|object)$/.test( nodeName ) ) {
+ focusableIfVisible = !element.disabled;
+
+ if ( focusableIfVisible ) {
+
+ // Form controls within a disabled fieldset are disabled.
+ // However, controls within the fieldset's legend do not get disabled.
+ // Since controls generally aren't placed inside legends, we skip
+ // this portion of the check.
+ fieldset = $( element ).closest( "fieldset" )[ 0 ];
+ if ( fieldset ) {
+ focusableIfVisible = !fieldset.disabled;
+ }
+ }
+ } else if ( "a" === nodeName ) {
+ focusableIfVisible = element.href || hasTabindex;
+ } else {
+ focusableIfVisible = hasTabindex;
+ }
+
+ return focusableIfVisible && $( element ).is( ":visible" ) && visible( $( element ) );
+};
+
+// Support: IE 8 only
+// IE 8 doesn't resolve inherit to visible/hidden for computed values
+function visible( element ) {
+ var visibility = element.css( "visibility" );
+ while ( visibility === "inherit" ) {
+ element = element.parent();
+ visibility = element.css( "visibility" );
+ }
+ return visibility !== "hidden";
+}
+
+$.extend( $.expr[ ":" ], {
+ focusable: function( element ) {
+ return $.ui.focusable( element, $.attr( element, "tabindex" ) != null );
+ }
+} );
+
+var focusable = $.ui.focusable;
+
+
+
+
+// Support: IE8 Only
+// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop
+// with a string, so we need to find the proper form.
+var form = $.fn.form = function() {
+ return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form );
+};
+
+
+/*!
+ * jQuery UI Form Reset Mixin 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Form Reset Mixin
+//>>group: Core
+//>>description: Refresh input widgets when their form is reset
+//>>docs: http://api.jqueryui.com/form-reset-mixin/
+
+
+
+var formResetMixin = $.ui.formResetMixin = {
+ _formResetHandler: function() {
+ var form = $( this );
+
+ // Wait for the form reset to actually happen before refreshing
+ setTimeout( function() {
+ var instances = form.data( "ui-form-reset-instances" );
+ $.each( instances, function() {
+ this.refresh();
+ } );
+ } );
+ },
+
+ _bindFormResetHandler: function() {
+ this.form = this.element.form();
+ if ( !this.form.length ) {
+ return;
+ }
+
+ var instances = this.form.data( "ui-form-reset-instances" ) || [];
+ if ( !instances.length ) {
+
+ // We don't use _on() here because we use a single event handler per form
+ this.form.on( "reset.ui-form-reset", this._formResetHandler );
+ }
+ instances.push( this );
+ this.form.data( "ui-form-reset-instances", instances );
+ },
+
+ _unbindFormResetHandler: function() {
+ if ( !this.form.length ) {
+ return;
+ }
+
+ var instances = this.form.data( "ui-form-reset-instances" );
+ instances.splice( $.inArray( this, instances ), 1 );
+ if ( instances.length ) {
+ this.form.data( "ui-form-reset-instances", instances );
+ } else {
+ this.form
+ .removeData( "ui-form-reset-instances" )
+ .off( "reset.ui-form-reset" );
+ }
+ }
+};
+
+
+/*!
+ * jQuery UI Support for jQuery core 1.7.x 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ */
+
+//>>label: jQuery 1.7 Support
+//>>group: Core
+//>>description: Support version 1.7.x of jQuery core
+
+
+
+// Support: jQuery 1.7 only
+// Not a great way to check versions, but since we only support 1.7+ and only
+// need to detect <1.8, this is a simple check that should suffice. Checking
+// for "1.7." would be a bit safer, but the version string is 1.7, not 1.7.0
+// and we'll never reach 1.70.0 (if we do, we certainly won't be supporting
+// 1.7 anymore). See #11197 for why we're not using feature detection.
+if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) {
+
+ // Setters for .innerWidth(), .innerHeight(), .outerWidth(), .outerHeight()
+ // Unlike jQuery Core 1.8+, these only support numeric values to set the
+ // dimensions in pixels
+ $.each( [ "Width", "Height" ], function( i, name ) {
+ var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
+ type = name.toLowerCase(),
+ orig = {
+ innerWidth: $.fn.innerWidth,
+ innerHeight: $.fn.innerHeight,
+ outerWidth: $.fn.outerWidth,
+ outerHeight: $.fn.outerHeight
+ };
+
+ function reduce( elem, size, border, margin ) {
+ $.each( side, function() {
+ size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
+ if ( border ) {
+ size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
+ }
+ if ( margin ) {
+ size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
+ }
+ } );
+ return size;
+ }
+
+ $.fn[ "inner" + name ] = function( size ) {
+ if ( size === undefined ) {
+ return orig[ "inner" + name ].call( this );
+ }
+
+ return this.each( function() {
+ $( this ).css( type, reduce( this, size ) + "px" );
+ } );
+ };
+
+ $.fn[ "outer" + name ] = function( size, margin ) {
+ if ( typeof size !== "number" ) {
+ return orig[ "outer" + name ].call( this, size );
+ }
+
+ return this.each( function() {
+ $( this ).css( type, reduce( this, size, true, margin ) + "px" );
+ } );
+ };
+ } );
+
+ $.fn.addBack = function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter( selector )
+ );
+ };
+}
+
+;
+/*!
+ * jQuery UI Keycode 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Keycode
+//>>group: Core
+//>>description: Provide keycodes as keynames
+//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/
+
+
+var keycode = $.ui.keyCode = {
+ BACKSPACE: 8,
+ COMMA: 188,
+ DELETE: 46,
+ DOWN: 40,
+ END: 35,
+ ENTER: 13,
+ ESCAPE: 27,
+ HOME: 36,
+ LEFT: 37,
+ PAGE_DOWN: 34,
+ PAGE_UP: 33,
+ PERIOD: 190,
+ RIGHT: 39,
+ SPACE: 32,
+ TAB: 9,
+ UP: 38
+};
+
+
+
+
+// Internal use only
+var escapeSelector = $.ui.escapeSelector = ( function() {
+ var selectorEscape = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;
+ return function( selector ) {
+ return selector.replace( selectorEscape, "\\$1" );
+ };
+} )();
+
+
+/*!
+ * jQuery UI Labels 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: labels
+//>>group: Core
+//>>description: Find all the labels associated with a given input
+//>>docs: http://api.jqueryui.com/labels/
+
+
+
+var labels = $.fn.labels = function() {
+ var ancestor, selector, id, labels, ancestors;
+
+ // Check control.labels first
+ if ( this[ 0 ].labels && this[ 0 ].labels.length ) {
+ return this.pushStack( this[ 0 ].labels );
+ }
+
+ // Support: IE <= 11, FF <= 37, Android <= 2.3 only
+ // Above browsers do not support control.labels. Everything below is to support them
+ // as well as document fragments. control.labels does not work on document fragments
+ labels = this.eq( 0 ).parents( "label" );
+
+ // Look for the label based on the id
+ id = this.attr( "id" );
+ if ( id ) {
+
+ // We don't search against the document in case the element
+ // is disconnected from the DOM
+ ancestor = this.eq( 0 ).parents().last();
+
+ // Get a full set of top level ancestors
+ ancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() );
+
+ // Create a selector for the label based on the id
+ selector = "label[for='" + $.ui.escapeSelector( id ) + "']";
+
+ labels = labels.add( ancestors.find( selector ).addBack( selector ) );
+
+ }
+
+ // Return whatever we have found for labels
+ return this.pushStack( labels );
+};
+
+
+/*!
+ * jQuery UI Scroll Parent 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: scrollParent
+//>>group: Core
+//>>description: Get the closest ancestor element that is scrollable.
+//>>docs: http://api.jqueryui.com/scrollParent/
+
+
+
+var scrollParent = $.fn.scrollParent = function( includeHidden ) {
+ var position = this.css( "position" ),
+ excludeStaticParent = position === "absolute",
+ overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
+ scrollParent = this.parents().filter( function() {
+ var parent = $( this );
+ if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
+ return false;
+ }
+ return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) +
+ parent.css( "overflow-x" ) );
+ } ).eq( 0 );
+
+ return position === "fixed" || !scrollParent.length ?
+ $( this[ 0 ].ownerDocument || document ) :
+ scrollParent;
+};
+
+
+/*!
+ * jQuery UI Tabbable 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: :tabbable Selector
+//>>group: Core
+//>>description: Selects elements which can be tabbed to.
+//>>docs: http://api.jqueryui.com/tabbable-selector/
+
+
+
+var tabbable = $.extend( $.expr[ ":" ], {
+ tabbable: function( element ) {
+ var tabIndex = $.attr( element, "tabindex" ),
+ hasTabindex = tabIndex != null;
+ return ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex );
+ }
+} );
+
+
+/*!
+ * jQuery UI Unique ID 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: uniqueId
+//>>group: Core
+//>>description: Functions to generate and remove uniqueId's
+//>>docs: http://api.jqueryui.com/uniqueId/
+
+
+
+var uniqueId = $.fn.extend( {
+ uniqueId: ( function() {
+ var uuid = 0;
+
+ return function() {
+ return this.each( function() {
+ if ( !this.id ) {
+ this.id = "ui-id-" + ( ++uuid );
+ }
+ } );
+ };
+ } )(),
+
+ removeUniqueId: function() {
+ return this.each( function() {
+ if ( /^ui-id-\d+$/.test( this.id ) ) {
+ $( this ).removeAttr( "id" );
+ }
+ } );
+ }
+} );
+
+
+/*!
+ * jQuery UI Accordion 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Accordion
+//>>group: Widgets
+// jscs:disable maximumLineLength
+//>>description: Displays collapsible content panels for presenting information in a limited amount of space.
+// jscs:enable maximumLineLength
+//>>docs: http://api.jqueryui.com/accordion/
+//>>demos: http://jqueryui.com/accordion/
+//>>css.structure: ../../themes/base/core.css
+//>>css.structure: ../../themes/base/accordion.css
+//>>css.theme: ../../themes/base/theme.css
+
+
+
+var widgetsAccordion = $.widget( "ui.accordion", {
+ version: "1.12.1",
+ options: {
+ active: 0,
+ animate: {},
+ classes: {
+ "ui-accordion-header": "ui-corner-top",
+ "ui-accordion-header-collapsed": "ui-corner-all",
+ "ui-accordion-content": "ui-corner-bottom"
+ },
+ collapsible: false,
+ event: "click",
+ header: "> li > :first-child, > :not(li):even",
+ heightStyle: "auto",
+ icons: {
+ activeHeader: "ui-icon-triangle-1-s",
+ header: "ui-icon-triangle-1-e"
+ },
+
+ // Callbacks
+ activate: null,
+ beforeActivate: null
+ },
+
+ hideProps: {
+ borderTopWidth: "hide",
+ borderBottomWidth: "hide",
+ paddingTop: "hide",
+ paddingBottom: "hide",
+ height: "hide"
+ },
+
+ showProps: {
+ borderTopWidth: "show",
+ borderBottomWidth: "show",
+ paddingTop: "show",
+ paddingBottom: "show",
+ height: "show"
+ },
+
+ _create: function() {
+ var options = this.options;
+
+ this.prevShow = this.prevHide = $();
+ this._addClass( "ui-accordion", "ui-widget ui-helper-reset" );
+ this.element.attr( "role", "tablist" );
+
+ // Don't allow collapsible: false and active: false / null
+ if ( !options.collapsible && ( options.active === false || options.active == null ) ) {
+ options.active = 0;
+ }
+
+ this._processPanels();
+
+ // handle negative values
+ if ( options.active < 0 ) {
+ options.active += this.headers.length;
+ }
+ this._refresh();
+ },
+
+ _getCreateEventData: function() {
+ return {
+ header: this.active,
+ panel: !this.active.length ? $() : this.active.next()
+ };
+ },
+
+ _createIcons: function() {
+ var icon, children,
+ icons = this.options.icons;
+
+ if ( icons ) {
+ icon = $( "<span>" );
+ this._addClass( icon, "ui-accordion-header-icon", "ui-icon " + icons.header );
+ icon.prependTo( this.headers );
+ children = this.active.children( ".ui-accordion-header-icon" );
+ this._removeClass( children, icons.header )
+ ._addClass( children, null, icons.activeHeader )
+ ._addClass( this.headers, "ui-accordion-icons" );
+ }
+ },
+
+ _destroyIcons: function() {
+ this._removeClass( this.headers, "ui-accordion-icons" );
+ this.headers.children( ".ui-accordion-header-icon" ).remove();
+ },
+
+ _destroy: function() {
+ var contents;
+
+ // Clean up main element
+ this.element.removeAttr( "role" );
+
+ // Clean up headers
+ this.headers
+ .removeAttr( "role aria-expanded aria-selected aria-controls tabIndex" )
+ .removeUniqueId();
+
+ this._destroyIcons();
+
+ // Clean up content panels
+ contents = this.headers.next()
+ .css( "display", "" )
+ .removeAttr( "role aria-hidden aria-labelledby" )
+ .removeUniqueId();
+
+ if ( this.options.heightStyle !== "content" ) {
+ contents.css( "height", "" );
+ }
+ },
+
+ _setOption: function( key, value ) {
+ if ( key === "active" ) {
+
+ // _activate() will handle invalid values and update this.options
+ this._activate( value );
+ return;
+ }
+
+ if ( key === "event" ) {
+ if ( this.options.event ) {
+ this._off( this.headers, this.options.event );
+ }
+ this._setupEvents( value );
+ }
+
+ this._super( key, value );
+
+ // Setting collapsible: false while collapsed; open first panel
+ if ( key === "collapsible" && !value && this.options.active === false ) {
+ this._activate( 0 );
+ }
+
+ if ( key === "icons" ) {
+ this._destroyIcons();
+ if ( value ) {
+ this._createIcons();
+ }
+ }
+ },
+
+ _setOptionDisabled: function( value ) {
+ this._super( value );
+
+ this.element.attr( "aria-disabled", value );
+
+ // Support: IE8 Only
+ // #5332 / #6059 - opacity doesn't cascade to positioned elements in IE
+ // so we need to add the disabled class to the headers and panels
+ this._toggleClass( null, "ui-state-disabled", !!value );
+ this._toggleClass( this.headers.add( this.headers.next() ), null, "ui-state-disabled",
+ !!value );
+ },
+
+ _keydown: function( event ) {
+ if ( event.altKey || event.ctrlKey ) {
+ return;
+ }
+
+ var keyCode = $.ui.keyCode,
+ length = this.headers.length,
+ currentIndex = this.headers.index( event.target ),
+ toFocus = false;
+
+ switch ( event.keyCode ) {
+ case keyCode.RIGHT:
+ case keyCode.DOWN:
+ toFocus = this.headers[ ( currentIndex + 1 ) % length ];
+ break;
+ case keyCode.LEFT:
+ case keyCode.UP:
+ toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
+ break;
+ case keyCode.SPACE:
+ case keyCode.ENTER:
+ this._eventHandler( event );
+ break;
+ case keyCode.HOME:
+ toFocus = this.headers[ 0 ];
+ break;
+ case keyCode.END:
+ toFocus = this.headers[ length - 1 ];
+ break;
+ }
+
+ if ( toFocus ) {
+ $( event.target ).attr( "tabIndex", -1 );
+ $( toFocus ).attr( "tabIndex", 0 );
+ $( toFocus ).trigger( "focus" );
+ event.preventDefault();
+ }
+ },
+
+ _panelKeyDown: function( event ) {
+ if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
+ $( event.currentTarget ).prev().trigger( "focus" );
+ }
+ },
+
+ refresh: function() {
+ var options = this.options;
+ this._processPanels();
+
+ // Was collapsed or no panel
+ if ( ( options.active === false && options.collapsible === true ) ||
+ !this.headers.length ) {
+ options.active = false;
+ this.active = $();
+
+ // active false only when collapsible is true
+ } else if ( options.active === false ) {
+ this._activate( 0 );
+
+ // was active, but active panel is gone
+ } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
+
+ // all remaining panel are disabled
+ if ( this.headers.length === this.headers.find( ".ui-state-disabled" ).length ) {
+ options.active = false;
+ this.active = $();
+
+ // activate previous panel
+ } else {
+ this._activate( Math.max( 0, options.active - 1 ) );
+ }
+
+ // was active, active panel still exists
+ } else {
+
+ // make sure active index is correct
+ options.active = this.headers.index( this.active );
+ }
+
+ this._destroyIcons();
+
+ this._refresh();
+ },
+
+ _processPanels: function() {
+ var prevHeaders = this.headers,
+ prevPanels = this.panels;
+
+ this.headers = this.element.find( this.options.header );
+ this._addClass( this.headers, "ui-accordion-header ui-accordion-header-collapsed",
+ "ui-state-default" );
+
+ this.panels = this.headers.next().filter( ":not(.ui-accordion-content-active)" ).hide();
+ this._addClass( this.panels, "ui-accordion-content", "ui-helper-reset ui-widget-content" );
+
+ // Avoid memory leaks (#10056)
+ if ( prevPanels ) {
+ this._off( prevHeaders.not( this.headers ) );
+ this._off( prevPanels.not( this.panels ) );
+ }
+ },
+
+ _refresh: function() {
+ var maxHeight,
+ options = this.options,
+ heightStyle = options.heightStyle,
+ parent = this.element.parent();
+
+ this.active = this._findActive( options.active );
+ this._addClass( this.active, "ui-accordion-header-active", "ui-state-active" )
+ ._removeClass( this.active, "ui-accordion-header-collapsed" );
+ this._addClass( this.active.next(), "ui-accordion-content-active" );
+ this.active.next().show();
+
+ this.headers
+ .attr( "role", "tab" )
+ .each( function() {
+ var header = $( this ),
+ headerId = header.uniqueId().attr( "id" ),
+ panel = header.next(),
+ panelId = panel.uniqueId().attr( "id" );
+ header.attr( "aria-controls", panelId );
+ panel.attr( "aria-labelledby", headerId );
+ } )
+ .next()
+ .attr( "role", "tabpanel" );
+
+ this.headers
+ .not( this.active )
+ .attr( {
+ "aria-selected": "false",
+ "aria-expanded": "false",
+ tabIndex: -1
+ } )
+ .next()
+ .attr( {
+ "aria-hidden": "true"
+ } )
+ .hide();
+
+ // Make sure at least one header is in the tab order
+ if ( !this.active.length ) {
+ this.headers.eq( 0 ).attr( "tabIndex", 0 );
+ } else {
+ this.active.attr( {
+ "aria-selected": "true",
+ "aria-expanded": "true",
+ tabIndex: 0
+ } )
+ .next()
+ .attr( {
+ "aria-hidden": "false"
+ } );
+ }
+
+ this._createIcons();
+
+ this._setupEvents( options.event );
+
+ if ( heightStyle === "fill" ) {
+ maxHeight = parent.height();
+ this.element.siblings( ":visible" ).each( function() {
+ var elem = $( this ),
+ position = elem.css( "position" );
+
+ if ( position === "absolute" || position === "fixed" ) {
+ return;
+ }
+ maxHeight -= elem.outerHeight( true );
+ } );
+
+ this.headers.each( function() {
+ maxHeight -= $( this ).outerHeight( true );
+ } );
+
+ this.headers.next()
+ .each( function() {
+ $( this ).height( Math.max( 0, maxHeight -
+ $( this ).innerHeight() + $( this ).height() ) );
+ } )
+ .css( "overflow", "auto" );
+ } else if ( heightStyle === "auto" ) {
+ maxHeight = 0;
+ this.headers.next()
+ .each( function() {
+ var isVisible = $( this ).is( ":visible" );
+ if ( !isVisible ) {
+ $( this ).show();
+ }
+ maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
+ if ( !isVisible ) {
+ $( this ).hide();
+ }
+ } )
+ .height( maxHeight );
+ }
+ },
+
+ _activate: function( index ) {
+ var active = this._findActive( index )[ 0 ];
+
+ // Trying to activate the already active panel
+ if ( active === this.active[ 0 ] ) {
+ return;
+ }
+
+ // Trying to collapse, simulate a click on the currently active header
+ active = active || this.active[ 0 ];
+
+ this._eventHandler( {
+ target: active,
+ currentTarget: active,
+ preventDefault: $.noop
+ } );
+ },
+
+ _findActive: function( selector ) {
+ return typeof selector === "number" ? this.headers.eq( selector ) : $();
+ },
+
+ _setupEvents: function( event ) {
+ var events = {
+ keydown: "_keydown"
+ };
+ if ( event ) {
+ $.each( event.split( " " ), function( index, eventName ) {
+ events[ eventName ] = "_eventHandler";
+ } );
+ }
+
+ this._off( this.headers.add( this.headers.next() ) );
+ this._on( this.headers, events );
+ this._on( this.headers.next(), { keydown: "_panelKeyDown" } );
+ this._hoverable( this.headers );
+ this._focusable( this.headers );
+ },
+
+ _eventHandler: function( event ) {
+ var activeChildren, clickedChildren,
+ options = this.options,
+ active = this.active,
+ clicked = $( event.currentTarget ),
+ clickedIsActive = clicked[ 0 ] === active[ 0 ],
+ collapsing = clickedIsActive && options.collapsible,
+ toShow = collapsing ? $() : clicked.next(),
+ toHide = active.next(),
+ eventData = {
+ oldHeader: active,
+ oldPanel: toHide,
+ newHeader: collapsing ? $() : clicked,
+ newPanel: toShow
+ };
+
+ event.preventDefault();
+
+ if (
+
+ // click on active header, but not collapsible
+ ( clickedIsActive && !options.collapsible ) ||
+
+ // allow canceling activation
+ ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
+ return;
+ }
+
+ options.active = collapsing ? false : this.headers.index( clicked );
+
+ // When the call to ._toggle() comes after the class changes
+ // it causes a very odd bug in IE 8 (see #6720)
+ this.active = clickedIsActive ? $() : clicked;
+ this._toggle( eventData );
+
+ // Switch classes
+ // corner classes on the previously active header stay after the animation
+ this._removeClass( active, "ui-accordion-header-active", "ui-state-active" );
+ if ( options.icons ) {
+ activeChildren = active.children( ".ui-accordion-header-icon" );
+ this._removeClass( activeChildren, null, options.icons.activeHeader )
+ ._addClass( activeChildren, null, options.icons.header );
+ }
+
+ if ( !clickedIsActive ) {
+ this._removeClass( clicked, "ui-accordion-header-collapsed" )
+ ._addClass( clicked, "ui-accordion-header-active", "ui-state-active" );
+ if ( options.icons ) {
+ clickedChildren = clicked.children( ".ui-accordion-header-icon" );
+ this._removeClass( clickedChildren, null, options.icons.header )
+ ._addClass( clickedChildren, null, options.icons.activeHeader );
+ }
+
+ this._addClass( clicked.next(), "ui-accordion-content-active" );
+ }
+ },
+
+ _toggle: function( data ) {
+ var toShow = data.newPanel,
+ toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
+
+ // Handle activating a panel during the animation for another activation
+ this.prevShow.add( this.prevHide ).stop( true, true );
+ this.prevShow = toShow;
+ this.prevHide = toHide;
+
+ if ( this.options.animate ) {
+ this._animate( toShow, toHide, data );
+ } else {
+ toHide.hide();
+ toShow.show();
+ this._toggleComplete( data );
+ }
+
+ toHide.attr( {
+ "aria-hidden": "true"
+ } );
+ toHide.prev().attr( {
+ "aria-selected": "false",
+ "aria-expanded": "false"
+ } );
+
+ // if we're switching panels, remove the old header from the tab order
+ // if we're opening from collapsed state, remove the previous header from the tab order
+ // if we're collapsing, then keep the collapsing header in the tab order
+ if ( toShow.length && toHide.length ) {
+ toHide.prev().attr( {
+ "tabIndex": -1,
+ "aria-expanded": "false"
+ } );
+ } else if ( toShow.length ) {
+ this.headers.filter( function() {
+ return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0;
+ } )
+ .attr( "tabIndex", -1 );
+ }
+
+ toShow
+ .attr( "aria-hidden", "false" )
+ .prev()
+ .attr( {
+ "aria-selected": "true",
+ "aria-expanded": "true",
+ tabIndex: 0
+ } );
+ },
+
+ _animate: function( toShow, toHide, data ) {
+ var total, easing, duration,
+ that = this,
+ adjust = 0,
+ boxSizing = toShow.css( "box-sizing" ),
+ down = toShow.length &&
+ ( !toHide.length || ( toShow.index() < toHide.index() ) ),
+ animate = this.options.animate || {},
+ options = down && animate.down || animate,
+ complete = function() {
+ that._toggleComplete( data );
+ };
+
+ if ( typeof options === "number" ) {
+ duration = options;
+ }
+ if ( typeof options === "string" ) {
+ easing = options;
+ }
+
+ // fall back from options to animation in case of partial down settings
+ easing = easing || options.easing || animate.easing;
+ duration = duration || options.duration || animate.duration;
+
+ if ( !toHide.length ) {
+ return toShow.animate( this.showProps, duration, easing, complete );
+ }
+ if ( !toShow.length ) {
+ return toHide.animate( this.hideProps, duration, easing, complete );
+ }
+
+ total = toShow.show().outerHeight();
+ toHide.animate( this.hideProps, {
+ duration: duration,
+ easing: easing,
+ step: function( now, fx ) {
+ fx.now = Math.round( now );
+ }
+ } );
+ toShow
+ .hide()
+ .animate( this.showProps, {
+ duration: duration,
+ easing: easing,
+ complete: complete,
+ step: function( now, fx ) {
+ fx.now = Math.round( now );
+ if ( fx.prop !== "height" ) {
+ if ( boxSizing === "content-box" ) {
+ adjust += fx.now;
+ }
+ } else if ( that.options.heightStyle !== "content" ) {
+ fx.now = Math.round( total - toHide.outerHeight() - adjust );
+ adjust = 0;
+ }
+ }
+ } );
+ },
+
+ _toggleComplete: function( data ) {
+ var toHide = data.oldPanel,
+ prev = toHide.prev();
+
+ this._removeClass( toHide, "ui-accordion-content-active" );
+ this._removeClass( prev, "ui-accordion-header-active" )
+ ._addClass( prev, "ui-accordion-header-collapsed" );
+
+ // Work around for rendering bug in IE (#5421)
+ if ( toHide.length ) {
+ toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className;
+ }
+ this._trigger( "activate", null, data );
+ }
+} );
+
+
+
+var safeActiveElement = $.ui.safeActiveElement = function( document ) {
+ var activeElement;
+
+ // Support: IE 9 only
+ // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
+ try {
+ activeElement = document.activeElement;
+ } catch ( error ) {
+ activeElement = document.body;
+ }
+
+ // Support: IE 9 - 11 only
+ // IE may return null instead of an element
+ // Interestingly, this only seems to occur when NOT in an iframe
+ if ( !activeElement ) {
+ activeElement = document.body;
+ }
+
+ // Support: IE 11 only
+ // IE11 returns a seemingly empty object in some cases when accessing
+ // document.activeElement from an <iframe>
+ if ( !activeElement.nodeName ) {
+ activeElement = document.body;
+ }
+
+ return activeElement;
+};
+
+
+/*!
+ * jQuery UI Menu 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Menu
+//>>group: Widgets
+//>>description: Creates nestable menus.
+//>>docs: http://api.jqueryui.com/menu/
+//>>demos: http://jqueryui.com/menu/
+//>>css.structure: ../../themes/base/core.css
+//>>css.structure: ../../themes/base/menu.css
+//>>css.theme: ../../themes/base/theme.css
+
+
+
+var widgetsMenu = $.widget( "ui.menu", {
+ version: "1.12.1",
+ defaultElement: "<ul>",
+ delay: 300,
+ options: {
+ icons: {
+ submenu: "ui-icon-caret-1-e"
+ },
+ items: "> *",
+ menus: "ul",
+ position: {
+ my: "left top",
+ at: "right top"
+ },
+ role: "menu",
+
+ // Callbacks
+ blur: null,
+ focus: null,
+ select: null
+ },
+
+ _create: function() {
+ this.activeMenu = this.element;
+
+ // Flag used to prevent firing of the click handler
+ // as the event bubbles up through nested menus
+ this.mouseHandled = false;
+ this.element
+ .uniqueId()
+ .attr( {
+ role: this.options.role,
+ tabIndex: 0
+ } );
+
+ this._addClass( "ui-menu", "ui-widget ui-widget-content" );
+ this._on( {
+
+ // Prevent focus from sticking to links inside menu after clicking
+ // them (focus should always stay on UL during navigation).
+ "mousedown .ui-menu-item": function( event ) {
+ event.preventDefault();
+ },
+ "click .ui-menu-item": function( event ) {
+ var target = $( event.target );
+ var active = $( $.ui.safeActiveElement( this.document[ 0 ] ) );
+ if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
+ this.select( event );
+
+ // Only set the mouseHandled flag if the event will bubble, see #9469.
+ if ( !event.isPropagationStopped() ) {
+ this.mouseHandled = true;
+ }
+
+ // Open submenu on click
+ if ( target.has( ".ui-menu" ).length ) {
+ this.expand( event );
+ } else if ( !this.element.is( ":focus" ) &&
+ active.closest( ".ui-menu" ).length ) {
+
+ // Redirect focus to the menu
+ this.element.trigger( "focus", [ true ] );
+
+ // If the active item is on the top level, let it stay active.
+ // Otherwise, blur the active item since it is no longer visible.
+ if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
+ clearTimeout( this.timer );
+ }
+ }
+ }
+ },
+ "mouseenter .ui-menu-item": function( event ) {
+
+ // Ignore mouse events while typeahead is active, see #10458.
+ // Prevents focusing the wrong item when typeahead causes a scroll while the mouse
+ // is over an item in the menu
+ if ( this.previousFilter ) {
+ return;
+ }
+
+ var actualTarget = $( event.target ).closest( ".ui-menu-item" ),
+ target = $( event.currentTarget );
+
+ // Ignore bubbled events on parent items, see #11641
+ if ( actualTarget[ 0 ] !== target[ 0 ] ) {
+ return;
+ }
+
+ // Remove ui-state-active class from siblings of the newly focused menu item
+ // to avoid a jump caused by adjacent elements both having a class with a border
+ this._removeClass( target.siblings().children( ".ui-state-active" ),
+ null, "ui-state-active" );
+ this.focus( event, target );
+ },
+ mouseleave: "collapseAll",
+ "mouseleave .ui-menu": "collapseAll",
+ focus: function( event, keepActiveItem ) {
+
+ // If there's already an active item, keep it active
+ // If not, activate the first item
+ var item = this.active || this.element.find( this.options.items ).eq( 0 );
+
+ if ( !keepActiveItem ) {
+ this.focus( event, item );
+ }
+ },
+ blur: function( event ) {
+ this._delay( function() {
+ var notContained = !$.contains(
+ this.element[ 0 ],
+ $.ui.safeActiveElement( this.document[ 0 ] )
+ );
+ if ( notContained ) {
+ this.collapseAll( event );
+ }
+ } );
+ },
+ keydown: "_keydown"
+ } );
+
+ this.refresh();
+
+ // Clicks outside of a menu collapse any open menus
+ this._on( this.document, {
+ click: function( event ) {
+ if ( this._closeOnDocumentClick( event ) ) {
+ this.collapseAll( event );
+ }
+
+ // Reset the mouseHandled flag
+ this.mouseHandled = false;
+ }
+ } );
+ },
+
+ _destroy: function() {
+ var items = this.element.find( ".ui-menu-item" )
+ .removeAttr( "role aria-disabled" ),
+ submenus = items.children( ".ui-menu-item-wrapper" )
+ .removeUniqueId()
+ .removeAttr( "tabIndex role aria-haspopup" );
+
+ // Destroy (sub)menus
+ this.element
+ .removeAttr( "aria-activedescendant" )
+ .find( ".ui-menu" ).addBack()
+ .removeAttr( "role aria-labelledby aria-expanded aria-hidden aria-disabled " +
+ "tabIndex" )
+ .removeUniqueId()
+ .show();
+
+ submenus.children().each( function() {
+ var elem = $( this );
+ if ( elem.data( "ui-menu-submenu-caret" ) ) {
+ elem.remove();
+ }
+ } );
+ },
+
+ _keydown: function( event ) {
+ var match, prev, character, skip,
+ preventDefault = true;
+
+ switch ( event.keyCode ) {
+ case $.ui.keyCode.PAGE_UP:
+ this.previousPage( event );
+ break;
+ case $.ui.keyCode.PAGE_DOWN:
+ this.nextPage( event );
+ break;
+ case $.ui.keyCode.HOME:
+ this._move( "first", "first", event );
+ break;
+ case $.ui.keyCode.END:
+ this._move( "last", "last", event );
+ break;
+ case $.ui.keyCode.UP:
+ this.previous( event );
+ break;
+ case $.ui.keyCode.DOWN:
+ this.next( event );
+ break;
+ case $.ui.keyCode.LEFT:
+ this.collapse( event );
+ break;
+ case $.ui.keyCode.RIGHT:
+ if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
+ this.expand( event );
+ }
+ break;
+ case $.ui.keyCode.ENTER:
+ case $.ui.keyCode.SPACE:
+ this._activate( event );
+ break;
+ case $.ui.keyCode.ESCAPE:
+ this.collapse( event );
+ break;
+ default:
+ preventDefault = false;
+ prev = this.previousFilter || "";
+ skip = false;
+
+ // Support number pad values
+ character = event.keyCode >= 96 && event.keyCode <= 105 ?
+ ( event.keyCode - 96 ).toString() : String.fromCharCode( event.keyCode );
+
+ clearTimeout( this.filterTimer );
+
+ if ( character === prev ) {
+ skip = true;
+ } else {
+ character = prev + character;
+ }
+
+ match = this._filterMenuItems( character );
+ match = skip && match.index( this.active.next() ) !== -1 ?
+ this.active.nextAll( ".ui-menu-item" ) :
+ match;
+
+ // If no matches on the current filter, reset to the last character pressed
+ // to move down the menu to the first item that starts with that character
+ if ( !match.length ) {
+ character = String.fromCharCode( event.keyCode );
+ match = this._filterMenuItems( character );
+ }
+
+ if ( match.length ) {
+ this.focus( event, match );
+ this.previousFilter = character;
+ this.filterTimer = this._delay( function() {
+ delete this.previousFilter;
+ }, 1000 );
+ } else {
+ delete this.previousFilter;
+ }
+ }
+
+ if ( preventDefault ) {
+ event.preventDefault();
+ }
+ },
+
+ _activate: function( event ) {
+ if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
+ if ( this.active.children( "[aria-haspopup='true']" ).length ) {
+ this.expand( event );
+ } else {
+ this.select( event );
+ }
+ }
+ },
+
+ refresh: function() {
+ var menus, items, newSubmenus, newItems, newWrappers,
+ that = this,
+ icon = this.options.icons.submenu,
+ submenus = this.element.find( this.options.menus );
+
+ this._toggleClass( "ui-menu-icons", null, !!this.element.find( ".ui-icon" ).length );
+
+ // Initialize nested menus
+ newSubmenus = submenus.filter( ":not(.ui-menu)" )
+ .hide()
+ .attr( {
+ role: this.options.role,
+ "aria-hidden": "true",
+ "aria-expanded": "false"
+ } )
+ .each( function() {
+ var menu = $( this ),
+ item = menu.prev(),
+ submenuCaret = $( "<span>" ).data( "ui-menu-submenu-caret", true );
+
+ that._addClass( submenuCaret, "ui-menu-icon", "ui-icon " + icon );
+ item
+ .attr( "aria-haspopup", "true" )
+ .prepend( submenuCaret );
+ menu.attr( "aria-labelledby", item.attr( "id" ) );
+ } );
+
+ this._addClass( newSubmenus, "ui-menu", "ui-widget ui-widget-content ui-front" );
+
+ menus = submenus.add( this.element );
+ items = menus.find( this.options.items );
+
+ // Initialize menu-items containing spaces and/or dashes only as dividers
+ items.not( ".ui-menu-item" ).each( function() {
+ var item = $( this );
+ if ( that._isDivider( item ) ) {
+ that._addClass( item, "ui-menu-divider", "ui-widget-content" );
+ }
+ } );
+
+ // Don't refresh list items that are already adapted
+ newItems = items.not( ".ui-menu-item, .ui-menu-divider" );
+ newWrappers = newItems.children()
+ .not( ".ui-menu" )
+ .uniqueId()
+ .attr( {
+ tabIndex: -1,
+ role: this._itemRole()
+ } );
+ this._addClass( newItems, "ui-menu-item" )
+ ._addClass( newWrappers, "ui-menu-item-wrapper" );
+
+ // Add aria-disabled attribute to any disabled menu item
+ items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
+
+ // If the active item has been removed, blur the menu
+ if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
+ this.blur();
+ }
+ },
+
+ _itemRole: function() {
+ return {
+ menu: "menuitem",
+ listbox: "option"
+ }[ this.options.role ];
+ },
+
+ _setOption: function( key, value ) {
+ if ( key === "icons" ) {
+ var icons = this.element.find( ".ui-menu-icon" );
+ this._removeClass( icons, null, this.options.icons.submenu )
+ ._addClass( icons, null, value.submenu );
+ }
+ this._super( key, value );
+ },
+
+ _setOptionDisabled: function( value ) {
+ this._super( value );
+
+ this.element.attr( "aria-disabled", String( value ) );
+ this._toggleClass( null, "ui-state-disabled", !!value );
+ },
+
+ focus: function( event, item ) {
+ var nested, focused, activeParent;
+ this.blur( event, event && event.type === "focus" );
+
+ this._scrollIntoView( item );
+
+ this.active = item.first();
+
+ focused = this.active.children( ".ui-menu-item-wrapper" );
+ this._addClass( focused, null, "ui-state-active" );
+
+ // Only update aria-activedescendant if there's a role
+ // otherwise we assume focus is managed elsewhere
+ if ( this.options.role ) {
+ this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
+ }
+
+ // Highlight active parent menu item, if any
+ activeParent = this.active
+ .parent()
+ .closest( ".ui-menu-item" )
+ .children( ".ui-menu-item-wrapper" );
+ this._addClass( activeParent, null, "ui-state-active" );
+
+ if ( event && event.type === "keydown" ) {
+ this._close();
+ } else {
+ this.timer = this._delay( function() {
+ this._close();
+ }, this.delay );
+ }
+
+ nested = item.children( ".ui-menu" );
+ if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
+ this._startOpening( nested );
+ }
+ this.activeMenu = item.parent();
+
+ this._trigger( "focus", event, { item: item } );
+ },
+
+ _scrollIntoView: function( item ) {
+ var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
+ if ( this._hasScroll() ) {
+ borderTop = parseFloat( $.css( this.activeMenu[ 0 ], "borderTopWidth" ) ) || 0;
+ paddingTop = parseFloat( $.css( this.activeMenu[ 0 ], "paddingTop" ) ) || 0;
+ offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
+ scroll = this.activeMenu.scrollTop();
+ elementHeight = this.activeMenu.height();
+ itemHeight = item.outerHeight();
+
+ if ( offset < 0 ) {
+ this.activeMenu.scrollTop( scroll + offset );
+ } else if ( offset + itemHeight > elementHeight ) {
+ this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
+ }
+ }
+ },
+
+ blur: function( event, fromFocus ) {
+ if ( !fromFocus ) {
+ clearTimeout( this.timer );
+ }
+
+ if ( !this.active ) {
+ return;
+ }
+
+ this._removeClass( this.active.children( ".ui-menu-item-wrapper" ),
+ null, "ui-state-active" );
+
+ this._trigger( "blur", event, { item: this.active } );
+ this.active = null;
+ },
+
+ _startOpening: function( submenu ) {
+ clearTimeout( this.timer );
+
+ // Don't open if already open fixes a Firefox bug that caused a .5 pixel
+ // shift in the submenu position when mousing over the caret icon
+ if ( submenu.attr( "aria-hidden" ) !== "true" ) {
+ return;
+ }
+
+ this.timer = this._delay( function() {
+ this._close();
+ this._open( submenu );
+ }, this.delay );
+ },
+
+ _open: function( submenu ) {
+ var position = $.extend( {
+ of: this.active
+ }, this.options.position );
+
+ clearTimeout( this.timer );
+ this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
+ .hide()
+ .attr( "aria-hidden", "true" );
+
+ submenu
+ .show()
+ .removeAttr( "aria-hidden" )
+ .attr( "aria-expanded", "true" )
+ .position( position );
+ },
+
+ collapseAll: function( event, all ) {
+ clearTimeout( this.timer );
+ this.timer = this._delay( function() {
+
+ // If we were passed an event, look for the submenu that contains the event
+ var currentMenu = all ? this.element :
+ $( event && event.target ).closest( this.element.find( ".ui-menu" ) );
+
+ // If we found no valid submenu ancestor, use the main menu to close all
+ // sub menus anyway
+ if ( !currentMenu.length ) {
+ currentMenu = this.element;
+ }
+
+ this._close( currentMenu );
+
+ this.blur( event );
+
+ // Work around active item staying active after menu is blurred
+ this._removeClass( currentMenu.find( ".ui-state-active" ), null, "ui-state-active" );
+
+ this.activeMenu = currentMenu;
+ }, this.delay );
+ },
+
+ // With no arguments, closes the currently active menu - if nothing is active
+ // it closes all menus. If passed an argument, it will search for menus BELOW
+ _close: function( startMenu ) {
+ if ( !startMenu ) {
+ startMenu = this.active ? this.active.parent() : this.element;
+ }
+
+ startMenu.find( ".ui-menu" )
+ .hide()
+ .attr( "aria-hidden", "true" )
+ .attr( "aria-expanded", "false" );
+ },
+
+ _closeOnDocumentClick: function( event ) {
+ return !$( event.target ).closest( ".ui-menu" ).length;
+ },
+
+ _isDivider: function( item ) {
+
+ // Match hyphen, em dash, en dash
+ return !/[^\-\u2014\u2013\s]/.test( item.text() );
+ },
+
+ collapse: function( event ) {
+ var newItem = this.active &&
+ this.active.parent().closest( ".ui-menu-item", this.element );
+ if ( newItem && newItem.length ) {
+ this._close();
+ this.focus( event, newItem );
+ }
+ },
+
+ expand: function( event ) {
+ var newItem = this.active &&
+ this.active
+ .children( ".ui-menu " )
+ .find( this.options.items )
+ .first();
+
+ if ( newItem && newItem.length ) {
+ this._open( newItem.parent() );
+
+ // Delay so Firefox will not hide activedescendant change in expanding submenu from AT
+ this._delay( function() {
+ this.focus( event, newItem );
+ } );
+ }
+ },
+
+ next: function( event ) {
+ this._move( "next", "first", event );
+ },
+
+ previous: function( event ) {
+ this._move( "prev", "last", event );
+ },
+
+ isFirstItem: function() {
+ return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
+ },
+
+ isLastItem: function() {
+ return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
+ },
+
+ _move: function( direction, filter, event ) {
+ var next;
+ if ( this.active ) {
+ if ( direction === "first" || direction === "last" ) {
+ next = this.active
+ [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
+ .eq( -1 );
+ } else {
+ next = this.active
+ [ direction + "All" ]( ".ui-menu-item" )
+ .eq( 0 );
+ }
+ }
+ if ( !next || !next.length || !this.active ) {
+ next = this.activeMenu.find( this.options.items )[ filter ]();
+ }
+
+ this.focus( event, next );
+ },
+
+ nextPage: function( event ) {
+ var item, base, height;
+
+ if ( !this.active ) {
+ this.next( event );
+ return;
+ }
+ if ( this.isLastItem() ) {
+ return;
+ }
+ if ( this._hasScroll() ) {
+ base = this.active.offset().top;
+ height = this.element.height();
+ this.active.nextAll( ".ui-menu-item" ).each( function() {
+ item = $( this );
+ return item.offset().top - base - height < 0;
+ } );
+
+ this.focus( event, item );
+ } else {
+ this.focus( event, this.activeMenu.find( this.options.items )
+ [ !this.active ? "first" : "last" ]() );
+ }
+ },
+
+ previousPage: function( event ) {
+ var item, base, height;
+ if ( !this.active ) {
+ this.next( event );
+ return;
+ }
+ if ( this.isFirstItem() ) {
+ return;
+ }
+ if ( this._hasScroll() ) {
+ base = this.active.offset().top;
+ height = this.element.height();
+ this.active.prevAll( ".ui-menu-item" ).each( function() {
+ item = $( this );
+ return item.offset().top - base + height > 0;
+ } );
+
+ this.focus( event, item );
+ } else {
+ this.focus( event, this.activeMenu.find( this.options.items ).first() );
+ }
+ },
+
+ _hasScroll: function() {
+ return this.element.outerHeight() < this.element.prop( "scrollHeight" );
+ },
+
+ select: function( event ) {
+
+ // TODO: It should never be possible to not have an active item at this
+ // point, but the tests don't trigger mouseenter before click.
+ this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
+ var ui = { item: this.active };
+ if ( !this.active.has( ".ui-menu" ).length ) {
+ this.collapseAll( event, true );
+ }
+ this._trigger( "select", event, ui );
+ },
+
+ _filterMenuItems: function( character ) {
+ var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ),
+ regex = new RegExp( "^" + escapedCharacter, "i" );
+
+ return this.activeMenu
+ .find( this.options.items )
+
+ // Only match on items, not dividers or other content (#10571)
+ .filter( ".ui-menu-item" )
+ .filter( function() {
+ return regex.test(
+ $.trim( $( this ).children( ".ui-menu-item-wrapper" ).text() ) );
+ } );
+ }
+} );
+
+
+/*!
+ * jQuery UI Autocomplete 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Autocomplete
+//>>group: Widgets
+//>>description: Lists suggested words as the user is typing.
+//>>docs: http://api.jqueryui.com/autocomplete/
+//>>demos: http://jqueryui.com/autocomplete/
+//>>css.structure: ../../themes/base/core.css
+//>>css.structure: ../../themes/base/autocomplete.css
+//>>css.theme: ../../themes/base/theme.css
+
+
+
+$.widget( "ui.autocomplete", {
+ version: "1.12.1",
+ defaultElement: "<input>",
+ options: {
+ appendTo: null,
+ autoFocus: false,
+ delay: 300,
+ minLength: 1,
+ position: {
+ my: "left top",
+ at: "left bottom",
+ collision: "none"
+ },
+ source: null,
+
+ // Callbacks
+ change: null,
+ close: null,
+ focus: null,
+ open: null,
+ response: null,
+ search: null,
+ select: null
+ },
+
+ requestIndex: 0,
+ pending: 0,
+
+ _create: function() {
+
+ // Some browsers only repeat keydown events, not keypress events,
+ // so we use the suppressKeyPress flag to determine if we've already
+ // handled the keydown event. #7269
+ // Unfortunately the code for & in keypress is the same as the up arrow,
+ // so we use the suppressKeyPressRepeat flag to avoid handling keypress
+ // events when we know the keydown event was used to modify the
+ // search term. #7799
+ var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
+ nodeName = this.element[ 0 ].nodeName.toLowerCase(),
+ isTextarea = nodeName === "textarea",
+ isInput = nodeName === "input";
+
+ // Textareas are always multi-line
+ // Inputs are always single-line, even if inside a contentEditable element
+ // IE also treats inputs as contentEditable
+ // All other element types are determined by whether or not they're contentEditable
+ this.isMultiLine = isTextarea || !isInput && this._isContentEditable( this.element );
+
+ this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
+ this.isNewMenu = true;
+
+ this._addClass( "ui-autocomplete-input" );
+ this.element.attr( "autocomplete", "off" );
+
+ this._on( this.element, {
+ keydown: function( event ) {
+ if ( this.element.prop( "readOnly" ) ) {
+ suppressKeyPress = true;
+ suppressInput = true;
+ suppressKeyPressRepeat = true;
+ return;
+ }
+
+ suppressKeyPress = false;
+ suppressInput = false;
+ suppressKeyPressRepeat = false;
+ var keyCode = $.ui.keyCode;
+ switch ( event.keyCode ) {
+ case keyCode.PAGE_UP:
+ suppressKeyPress = true;
+ this._move( "previousPage", event );
+ break;
+ case keyCode.PAGE_DOWN:
+ suppressKeyPress = true;
+ this._move( "nextPage", event );
+ break;
+ case keyCode.UP:
+ suppressKeyPress = true;
+ this._keyEvent( "previous", event );
+ break;
+ case keyCode.DOWN:
+ suppressKeyPress = true;
+ this._keyEvent( "next", event );
+ break;
+ case keyCode.ENTER:
+
+ // when menu is open and has focus
+ if ( this.menu.active ) {
+
+ // #6055 - Opera still allows the keypress to occur
+ // which causes forms to submit
+ suppressKeyPress = true;
+ event.preventDefault();
+ this.menu.select( event );
+ }
+ break;
+ case keyCode.TAB:
+ if ( this.menu.active ) {
+ this.menu.select( event );
+ }
+ break;
+ case keyCode.ESCAPE:
+ if ( this.menu.element.is( ":visible" ) ) {
+ if ( !this.isMultiLine ) {
+ this._value( this.term );
+ }
+ this.close( event );
+
+ // Different browsers have different default behavior for escape
+ // Single press can mean undo or clear
+ // Double press in IE means clear the whole form
+ event.preventDefault();
+ }
+ break;
+ default:
+ suppressKeyPressRepeat = true;
+
+ // search timeout should be triggered before the input value is changed
+ this._searchTimeout( event );
+ break;
+ }
+ },
+ keypress: function( event ) {
+ if ( suppressKeyPress ) {
+ suppressKeyPress = false;
+ if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
+ event.preventDefault();
+ }
+ return;
+ }
+ if ( suppressKeyPressRepeat ) {
+ return;
+ }
+
+ // Replicate some key handlers to allow them to repeat in Firefox and Opera
+ var keyCode = $.ui.keyCode;
+ switch ( event.keyCode ) {
+ case keyCode.PAGE_UP:
+ this._move( "previousPage", event );
+ break;
+ case keyCode.PAGE_DOWN:
+ this._move( "nextPage", event );
+ break;
+ case keyCode.UP:
+ this._keyEvent( "previous", event );
+ break;
+ case keyCode.DOWN:
+ this._keyEvent( "next", event );
+ break;
+ }
+ },
+ input: function( event ) {
+ if ( suppressInput ) {
+ suppressInput = false;
+ event.preventDefault();
+ return;
+ }
+ this._searchTimeout( event );
+ },
+ focus: function() {
+ this.selectedItem = null;
+ this.previous = this._value();
+ },
+ blur: function( event ) {
+ if ( this.cancelBlur ) {
+ delete this.cancelBlur;
+ return;
+ }
+
+ clearTimeout( this.searching );
+ this.close( event );
+ this._change( event );
+ }
+ } );
+
+ this._initSource();
+ this.menu = $( "<ul>" )
+ .appendTo( this._appendTo() )
+ .menu( {
+
+ // disable ARIA support, the live region takes care of that
+ role: null
+ } )
+ .hide()
+ .menu( "instance" );
+
+ this._addClass( this.menu.element, "ui-autocomplete", "ui-front" );
+ this._on( this.menu.element, {
+ mousedown: function( event ) {
+
+ // prevent moving focus out of the text field
+ event.preventDefault();
+
+ // IE doesn't prevent moving focus even with event.preventDefault()
+ // so we set a flag to know when we should ignore the blur event
+ this.cancelBlur = true;
+ this._delay( function() {
+ delete this.cancelBlur;
+
+ // Support: IE 8 only
+ // Right clicking a menu item or selecting text from the menu items will
+ // result in focus moving out of the input. However, we've already received
+ // and ignored the blur event because of the cancelBlur flag set above. So
+ // we restore focus to ensure that the menu closes properly based on the user's
+ // next actions.
+ if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) {
+ this.element.trigger( "focus" );
+ }
+ } );
+ },
+ menufocus: function( event, ui ) {
+ var label, item;
+
+ // support: Firefox
+ // Prevent accidental activation of menu items in Firefox (#7024 #9118)
+ if ( this.isNewMenu ) {
+ this.isNewMenu = false;
+ if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
+ this.menu.blur();
+
+ this.document.one( "mousemove", function() {
+ $( event.target ).trigger( event.originalEvent );
+ } );
+
+ return;
+ }
+ }
+
+ item = ui.item.data( "ui-autocomplete-item" );
+ if ( false !== this._trigger( "focus", event, { item: item } ) ) {
+
+ // use value to match what will end up in the input, if it was a key event
+ if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
+ this._value( item.value );
+ }
+ }
+
+ // Announce the value in the liveRegion
+ label = ui.item.attr( "aria-label" ) || item.value;
+ if ( label && $.trim( label ).length ) {
+ this.liveRegion.children().hide();
+ $( "<div>" ).text( label ).appendTo( this.liveRegion );
+ }
+ },
+ menuselect: function( event, ui ) {
+ var item = ui.item.data( "ui-autocomplete-item" ),
+ previous = this.previous;
+
+ // Only trigger when focus was lost (click on menu)
+ if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) {
+ this.element.trigger( "focus" );
+ this.previous = previous;
+
+ // #6109 - IE triggers two focus events and the second
+ // is asynchronous, so we need to reset the previous
+ // term synchronously and asynchronously :-(
+ this._delay( function() {
+ this.previous = previous;
+ this.selectedItem = item;
+ } );
+ }
+
+ if ( false !== this._trigger( "select", event, { item: item } ) ) {
+ this._value( item.value );
+ }
+
+ // reset the term after the select event
+ // this allows custom select handling to work properly
+ this.term = this._value();
+
+ this.close( event );
+ this.selectedItem = item;
+ }
+ } );
+
+ this.liveRegion = $( "<div>", {
+ role: "status",
+ "aria-live": "assertive",
+ "aria-relevant": "additions"
+ } )
+ .appendTo( this.document[ 0 ].body );
+
+ this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" );
+
+ // Turning off autocomplete prevents the browser from remembering the
+ // value when navigating through history, so we re-enable autocomplete
+ // if the page is unloaded before the widget is destroyed. #7790
+ this._on( this.window, {
+ beforeunload: function() {
+ this.element.removeAttr( "autocomplete" );
+ }
+ } );
+ },
+
+ _destroy: function() {
+ clearTimeout( this.searching );
+ this.element.removeAttr( "autocomplete" );
+ this.menu.element.remove();
+ this.liveRegion.remove();
+ },
+
+ _setOption: function( key, value ) {
+ this._super( key, value );
+ if ( key === "source" ) {
+ this._initSource();
+ }
+ if ( key === "appendTo" ) {
+ this.menu.element.appendTo( this._appendTo() );
+ }
+ if ( key === "disabled" && value && this.xhr ) {
+ this.xhr.abort();
+ }
+ },
+
+ _isEventTargetInWidget: function( event ) {
+ var menuElement = this.menu.element[ 0 ];
+
+ return event.target === this.element[ 0 ] ||
+ event.target === menuElement ||
+ $.contains( menuElement, event.target );
+ },
+
+ _closeOnClickOutside: function( event ) {
+ if ( !this._isEventTargetInWidget( event ) ) {
+ this.close();
+ }
+ },
+
+ _appendTo: function() {
+ var element = this.options.appendTo;
+
+ if ( element ) {
+ element = element.jquery || element.nodeType ?
+ $( element ) :
+ this.document.find( element ).eq( 0 );
+ }
+
+ if ( !element || !element[ 0 ] ) {
+ element = this.element.closest( ".ui-front, dialog" );
+ }
+
+ if ( !element.length ) {
+ element = this.document[ 0 ].body;
+ }
+
+ return element;
+ },
+
+ _initSource: function() {
+ var array, url,
+ that = this;
+ if ( $.isArray( this.options.source ) ) {
+ array = this.options.source;
+ this.source = function( request, response ) {
+ response( $.ui.autocomplete.filter( array, request.term ) );
+ };
+ } else if ( typeof this.options.source === "string" ) {
+ url = this.options.source;
+ this.source = function( request, response ) {
+ if ( that.xhr ) {
+ that.xhr.abort();
+ }
+ that.xhr = $.ajax( {
+ url: url,
+ data: request,
+ dataType: "json",
+ success: function( data ) {
+ response( data );
+ },
+ error: function() {
+ response( [] );
+ }
+ } );
+ };
+ } else {
+ this.source = this.options.source;
+ }
+ },
+
+ _searchTimeout: function( event ) {
+ clearTimeout( this.searching );
+ this.searching = this._delay( function() {
+
+ // Search if the value has changed, or if the user retypes the same value (see #7434)
+ var equalValues = this.term === this._value(),
+ menuVisible = this.menu.element.is( ":visible" ),
+ modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
+
+ if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {
+ this.selectedItem = null;
+ this.search( null, event );
+ }
+ }, this.options.delay );
+ },
+
+ search: function( value, event ) {
+ value = value != null ? value : this._value();
+
+ // Always save the actual value, not the one passed as an argument
+ this.term = this._value();
+
+ if ( value.length < this.options.minLength ) {
+ return this.close( event );
+ }
+
+ if ( this._trigger( "search", event ) === false ) {
+ return;
+ }
+
+ return this._search( value );
+ },
+
+ _search: function( value ) {
+ this.pending++;
+ this._addClass( "ui-autocomplete-loading" );
+ this.cancelSearch = false;
+
+ this.source( { term: value }, this._response() );
+ },
+
+ _response: function() {
+ var index = ++this.requestIndex;
+
+ return $.proxy( function( content ) {
+ if ( index === this.requestIndex ) {
+ this.__response( content );
+ }
+
+ this.pending--;
+ if ( !this.pending ) {
+ this._removeClass( "ui-autocomplete-loading" );
+ }
+ }, this );
+ },
+
+ __response: function( content ) {
+ if ( content ) {
+ content = this._normalize( content );
+ }
+ this._trigger( "response", null, { content: content } );
+ if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
+ this._suggest( content );
+ this._trigger( "open" );
+ } else {
+
+ // use ._close() instead of .close() so we don't cancel future searches
+ this._close();
+ }
+ },
+
+ close: function( event ) {
+ this.cancelSearch = true;
+ this._close( event );
+ },
+
+ _close: function( event ) {
+
+ // Remove the handler that closes the menu on outside clicks
+ this._off( this.document, "mousedown" );
+
+ if ( this.menu.element.is( ":visible" ) ) {
+ this.menu.element.hide();
+ this.menu.blur();
+ this.isNewMenu = true;
+ this._trigger( "close", event );
+ }
+ },
+
+ _change: function( event ) {
+ if ( this.previous !== this._value() ) {
+ this._trigger( "change", event, { item: this.selectedItem } );
+ }
+ },
+
+ _normalize: function( items ) {
+
+ // assume all items have the right format when the first item is complete
+ if ( items.length && items[ 0 ].label && items[ 0 ].value ) {
+ return items;
+ }
+ return $.map( items, function( item ) {
+ if ( typeof item === "string" ) {
+ return {
+ label: item,
+ value: item
+ };
+ }
+ return $.extend( {}, item, {
+ label: item.label || item.value,
+ value: item.value || item.label
+ } );
+ } );
+ },
+
+ _suggest: function( items ) {
+ var ul = this.menu.element.empty();
+ this._renderMenu( ul, items );
+ this.isNewMenu = true;
+ this.menu.refresh();
+
+ // Size and position menu
+ ul.show();
+ this._resizeMenu();
+ ul.position( $.extend( {
+ of: this.element
+ }, this.options.position ) );
+
+ if ( this.options.autoFocus ) {
+ this.menu.next();
+ }
+
+ // Listen for interactions outside of the widget (#6642)
+ this._on( this.document, {
+ mousedown: "_closeOnClickOutside"
+ } );
+ },
+
+ _resizeMenu: function() {
+ var ul = this.menu.element;
+ ul.outerWidth( Math.max(
+
+ // Firefox wraps long text (possibly a rounding bug)
+ // so we add 1px to avoid the wrapping (#7513)
+ ul.width( "" ).outerWidth() + 1,
+ this.element.outerWidth()
+ ) );
+ },
+
+ _renderMenu: function( ul, items ) {
+ var that = this;
+ $.each( items, function( index, item ) {
+ that._renderItemData( ul, item );
+ } );
+ },
+
+ _renderItemData: function( ul, item ) {
+ return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
+ },
+
+ _renderItem: function( ul, item ) {
+ return $( "<li>" )
+ .append( $( "<div>" ).text( item.label ) )
+ .appendTo( ul );
+ },
+
+ _move: function( direction, event ) {
+ if ( !this.menu.element.is( ":visible" ) ) {
+ this.search( null, event );
+ return;
+ }
+ if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
+ this.menu.isLastItem() && /^next/.test( direction ) ) {
+
+ if ( !this.isMultiLine ) {
+ this._value( this.term );
+ }
+
+ this.menu.blur();
+ return;
+ }
+ this.menu[ direction ]( event );
+ },
+
+ widget: function() {
+ return this.menu.element;
+ },
+
+ _value: function() {
+ return this.valueMethod.apply( this.element, arguments );
+ },
+
+ _keyEvent: function( keyEvent, event ) {
+ if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
+ this._move( keyEvent, event );
+
+ // Prevents moving cursor to beginning/end of the text field in some browsers
+ event.preventDefault();
+ }
+ },
+
+ // Support: Chrome <=50
+ // We should be able to just use this.element.prop( "isContentEditable" )
+ // but hidden elements always report false in Chrome.
+ // https://code.google.com/p/chromium/issues/detail?id=313082
+ _isContentEditable: function( element ) {
+ if ( !element.length ) {
+ return false;
+ }
+
+ var editable = element.prop( "contentEditable" );
+
+ if ( editable === "inherit" ) {
+ return this._isContentEditable( element.parent() );
+ }
+
+ return editable === "true";
+ }
+} );
+
+$.extend( $.ui.autocomplete, {
+ escapeRegex: function( value ) {
+ return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
+ },
+ filter: function( array, term ) {
+ var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" );
+ return $.grep( array, function( value ) {
+ return matcher.test( value.label || value.value || value );
+ } );
+ }
+} );
+
+// Live region extension, adding a `messages` option
+// NOTE: This is an experimental API. We are still investigating
+// a full solution for string manipulation and internationalization.
+$.widget( "ui.autocomplete", $.ui.autocomplete, {
+ options: {
+ messages: {
+ noResults: "No search results.",
+ results: function( amount ) {
+ return amount + ( amount > 1 ? " results are" : " result is" ) +
+ " available, use up and down arrow keys to navigate.";
+ }
+ }
+ },
+
+ __response: function( content ) {
+ var message;
+ this._superApply( arguments );
+ if ( this.options.disabled || this.cancelSearch ) {
+ return;
+ }
+ if ( content && content.length ) {
+ message = this.options.messages.results( content.length );
+ } else {
+ message = this.options.messages.noResults;
+ }
+ this.liveRegion.children().hide();
+ $( "<div>" ).text( message ).appendTo( this.liveRegion );
+ }
+} );
+
+var widgetsAutocomplete = $.ui.autocomplete;
+
+
+/*!
+ * jQuery UI Controlgroup 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Controlgroup
+//>>group: Widgets
+//>>description: Visually groups form control widgets
+//>>docs: http://api.jqueryui.com/controlgroup/
+//>>demos: http://jqueryui.com/controlgroup/
+//>>css.structure: ../../themes/base/core.css
+//>>css.structure: ../../themes/base/controlgroup.css
+//>>css.theme: ../../themes/base/theme.css
+
+
+var controlgroupCornerRegex = /ui-corner-([a-z]){2,6}/g;
+
+var widgetsControlgroup = $.widget( "ui.controlgroup", {
+ version: "1.12.1",
+ defaultElement: "<div>",
+ options: {
+ direction: "horizontal",
+ disabled: null,
+ onlyVisible: true,
+ items: {
+ "button": "input[type=button], input[type=submit], input[type=reset], button, a",
+ "controlgroupLabel": ".ui-controlgroup-label",
+ "checkboxradio": "input[type='checkbox'], input[type='radio']",
+ "selectmenu": "select",
+ "spinner": ".ui-spinner-input"
+ }
+ },
+
+ _create: function() {
+ this._enhance();
+ },
+
+ // To support the enhanced option in jQuery Mobile, we isolate DOM manipulation
+ _enhance: function() {
+ this.element.attr( "role", "toolbar" );
+ this.refresh();
+ },
+
+ _destroy: function() {
+ this._callChildMethod( "destroy" );
+ this.childWidgets.removeData( "ui-controlgroup-data" );
+ this.element.removeAttr( "role" );
+ if ( this.options.items.controlgroupLabel ) {
+ this.element
+ .find( this.options.items.controlgroupLabel )
+ .find( ".ui-controlgroup-label-contents" )
+ .contents().unwrap();
+ }
+ },
+
+ _initWidgets: function() {
+ var that = this,
+ childWidgets = [];
+
+ // First we iterate over each of the items options
+ $.each( this.options.items, function( widget, selector ) {
+ var labels;
+ var options = {};
+
+ // Make sure the widget has a selector set
+ if ( !selector ) {
+ return;
+ }
+
+ if ( widget === "controlgroupLabel" ) {
+ labels = that.element.find( selector );
+ labels.each( function() {
+ var element = $( this );
+
+ if ( element.children( ".ui-controlgroup-label-contents" ).length ) {
+ return;
+ }
+ element.contents()
+ .wrapAll( "<span class='ui-controlgroup-label-contents'></span>" );
+ } );
+ that._addClass( labels, null, "ui-widget ui-widget-content ui-state-default" );
+ childWidgets = childWidgets.concat( labels.get() );
+ return;
+ }
+
+ // Make sure the widget actually exists
+ if ( !$.fn[ widget ] ) {
+ return;
+ }
+
+ // We assume everything is in the middle to start because we can't determine
+ // first / last elements until all enhancments are done.
+ if ( that[ "_" + widget + "Options" ] ) {
+ options = that[ "_" + widget + "Options" ]( "middle" );
+ } else {
+ options = { classes: {} };
+ }
+
+ // Find instances of this widget inside controlgroup and init them
+ that.element
+ .find( selector )
+ .each( function() {
+ var element = $( this );
+ var instance = element[ widget ]( "instance" );
+
+ // We need to clone the default options for this type of widget to avoid
+ // polluting the variable options which has a wider scope than a single widget.
+ var instanceOptions = $.widget.extend( {}, options );
+
+ // If the button is the child of a spinner ignore it
+ // TODO: Find a more generic solution
+ if ( widget === "button" && element.parent( ".ui-spinner" ).length ) {
+ return;
+ }
+
+ // Create the widget if it doesn't exist
+ if ( !instance ) {
+ instance = element[ widget ]()[ widget ]( "instance" );
+ }
+ if ( instance ) {
+ instanceOptions.classes =
+ that._resolveClassesValues( instanceOptions.classes, instance );
+ }
+ element[ widget ]( instanceOptions );
+
+ // Store an instance of the controlgroup to be able to reference
+ // from the outermost element for changing options and refresh
+ var widgetElement = element[ widget ]( "widget" );
+ $.data( widgetElement[ 0 ], "ui-controlgroup-data",
+ instance ? instance : element[ widget ]( "instance" ) );
+
+ childWidgets.push( widgetElement[ 0 ] );
+ } );
+ } );
+
+ this.childWidgets = $( $.unique( childWidgets ) );
+ this._addClass( this.childWidgets, "ui-controlgroup-item" );
+ },
+
+ _callChildMethod: function( method ) {
+ this.childWidgets.each( function() {
+ var element = $( this ),
+ data = element.data( "ui-controlgroup-data" );
+ if ( data && data[ method ] ) {
+ data[ method ]();
+ }
+ } );
+ },
+
+ _updateCornerClass: function( element, position ) {
+ var remove = "ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all";
+ var add = this._buildSimpleOptions( position, "label" ).classes.label;
+
+ this._removeClass( element, null, remove );
+ this._addClass( element, null, add );
+ },
+
+ _buildSimpleOptions: function( position, key ) {
+ var direction = this.options.direction === "vertical";
+ var result = {
+ classes: {}
+ };
+ result.classes[ key ] = {
+ "middle": "",
+ "first": "ui-corner-" + ( direction ? "top" : "left" ),
+ "last": "ui-corner-" + ( direction ? "bottom" : "right" ),
+ "only": "ui-corner-all"
+ }[ position ];
+
+ return result;
+ },
+
+ _spinnerOptions: function( position ) {
+ var options = this._buildSimpleOptions( position, "ui-spinner" );
+
+ options.classes[ "ui-spinner-up" ] = "";
+ options.classes[ "ui-spinner-down" ] = "";
+
+ return options;
+ },
+
+ _buttonOptions: function( position ) {
+ return this._buildSimpleOptions( position, "ui-button" );
+ },
+
+ _checkboxradioOptions: function( position ) {
+ return this._buildSimpleOptions( position, "ui-checkboxradio-label" );
+ },
+
+ _selectmenuOptions: function( position ) {
+ var direction = this.options.direction === "vertical";
+ return {
+ width: direction ? "auto" : false,
+ classes: {
+ middle: {
+ "ui-selectmenu-button-open": "",
+ "ui-selectmenu-button-closed": ""
+ },
+ first: {
+ "ui-selectmenu-button-open": "ui-corner-" + ( direction ? "top" : "tl" ),
+ "ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "top" : "left" )
+ },
+ last: {
+ "ui-selectmenu-button-open": direction ? "" : "ui-corner-tr",
+ "ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "bottom" : "right" )
+ },
+ only: {
+ "ui-selectmenu-button-open": "ui-corner-top",
+ "ui-selectmenu-button-closed": "ui-corner-all"
+ }
+
+ }[ position ]
+ };
+ },
+
+ _resolveClassesValues: function( classes, instance ) {
+ var result = {};
+ $.each( classes, function( key ) {
+ var current = instance.options.classes[ key ] || "";
+ current = $.trim( current.replace( controlgroupCornerRegex, "" ) );
+ result[ key ] = ( current + " " + classes[ key ] ).replace( /\s+/g, " " );
+ } );
+ return result;
+ },
+
+ _setOption: function( key, value ) {
+ if ( key === "direction" ) {
+ this._removeClass( "ui-controlgroup-" + this.options.direction );
+ }
+
+ this._super( key, value );
+ if ( key === "disabled" ) {
+ this._callChildMethod( value ? "disable" : "enable" );
+ return;
+ }
+
+ this.refresh();
+ },
+
+ refresh: function() {
+ var children,
+ that = this;
+
+ this._addClass( "ui-controlgroup ui-controlgroup-" + this.options.direction );
+
+ if ( this.options.direction === "horizontal" ) {
+ this._addClass( null, "ui-helper-clearfix" );
+ }
+ this._initWidgets();
+
+ children = this.childWidgets;
+
+ // We filter here because we need to track all childWidgets not just the visible ones
+ if ( this.options.onlyVisible ) {
+ children = children.filter( ":visible" );
+ }
+
+ if ( children.length ) {
+
+ // We do this last because we need to make sure all enhancment is done
+ // before determining first and last
+ $.each( [ "first", "last" ], function( index, value ) {
+ var instance = children[ value ]().data( "ui-controlgroup-data" );
+
+ if ( instance && that[ "_" + instance.widgetName + "Options" ] ) {
+ var options = that[ "_" + instance.widgetName + "Options" ](
+ children.length === 1 ? "only" : value
+ );
+ options.classes = that._resolveClassesValues( options.classes, instance );
+ instance.element[ instance.widgetName ]( options );
+ } else {
+ that._updateCornerClass( children[ value ](), value );
+ }
+ } );
+
+ // Finally call the refresh method on each of the child widgets.
+ this._callChildMethod( "refresh" );
+ }
+ }
+} );
+
+/*!
+ * jQuery UI Checkboxradio 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Checkboxradio
+//>>group: Widgets
+//>>description: Enhances a form with multiple themeable checkboxes or radio buttons.
+//>>docs: http://api.jqueryui.com/checkboxradio/
+//>>demos: http://jqueryui.com/checkboxradio/
+//>>css.structure: ../../themes/base/core.css
+//>>css.structure: ../../themes/base/button.css
+//>>css.structure: ../../themes/base/checkboxradio.css
+//>>css.theme: ../../themes/base/theme.css
+
+
+
+$.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
+ version: "1.12.1",
+ options: {
+ disabled: null,
+ label: null,
+ icon: true,
+ classes: {
+ "ui-checkboxradio-label": "ui-corner-all",
+ "ui-checkboxradio-icon": "ui-corner-all"
+ }
+ },
+
+ _getCreateOptions: function() {
+ var disabled, labels;
+ var that = this;
+ var options = this._super() || {};
+
+ // We read the type here, because it makes more sense to throw a element type error first,
+ // rather then the error for lack of a label. Often if its the wrong type, it
+ // won't have a label (e.g. calling on a div, btn, etc)
+ this._readType();
+
+ labels = this.element.labels();
+
+ // If there are multiple labels, use the last one
+ this.label = $( labels[ labels.length - 1 ] );
+ if ( !this.label.length ) {
+ $.error( "No label found for checkboxradio widget" );
+ }
+
+ this.originalLabel = "";
+
+ // We need to get the label text but this may also need to make sure it does not contain the
+ // input itself.
+ this.label.contents().not( this.element[ 0 ] ).each( function() {
+
+ // The label contents could be text, html, or a mix. We concat each element to get a
+ // string representation of the label, without the input as part of it.
+ that.originalLabel += this.nodeType === 3 ? $( this ).text() : this.outerHTML;
+ } );
+
+ // Set the label option if we found label text
+ if ( this.originalLabel ) {
+ options.label = this.originalLabel;
+ }
+
+ disabled = this.element[ 0 ].disabled;
+ if ( disabled != null ) {
+ options.disabled = disabled;
+ }
+ return options;
+ },
+
+ _create: function() {
+ var checked = this.element[ 0 ].checked;
+
+ this._bindFormResetHandler();
+
+ if ( this.options.disabled == null ) {
+ this.options.disabled = this.element[ 0 ].disabled;
+ }
+
+ this._setOption( "disabled", this.options.disabled );
+ this._addClass( "ui-checkboxradio", "ui-helper-hidden-accessible" );
+ this._addClass( this.label, "ui-checkboxradio-label", "ui-button ui-widget" );
+
+ if ( this.type === "radio" ) {
+ this._addClass( this.label, "ui-checkboxradio-radio-label" );
+ }
+
+ if ( this.options.label && this.options.label !== this.originalLabel ) {
+ this._updateLabel();
+ } else if ( this.originalLabel ) {
+ this.options.label = this.originalLabel;
+ }
+
+ this._enhance();
+
+ if ( checked ) {
+ this._addClass( this.label, "ui-checkboxradio-checked", "ui-state-active" );
+ if ( this.icon ) {
+ this._addClass( this.icon, null, "ui-state-hover" );
+ }
+ }
+
+ this._on( {
+ change: "_toggleClasses",
+ focus: function() {
+ this._addClass( this.label, null, "ui-state-focus ui-visual-focus" );
+ },
+ blur: function() {
+ this._removeClass( this.label, null, "ui-state-focus ui-visual-focus" );
+ }
+ } );
+ },
+
+ _readType: function() {
+ var nodeName = this.element[ 0 ].nodeName.toLowerCase();
+ this.type = this.element[ 0 ].type;
+ if ( nodeName !== "input" || !/radio|checkbox/.test( this.type ) ) {
+ $.error( "Can't create checkboxradio on element.nodeName=" + nodeName +
+ " and element.type=" + this.type );
+ }
+ },
+
+ // Support jQuery Mobile enhanced option
+ _enhance: function() {
+ this._updateIcon( this.element[ 0 ].checked );
+ },
+
+ widget: function() {
+ return this.label;
+ },
+
+ _getRadioGroup: function() {
+ var group;
+ var name = this.element[ 0 ].name;
+ var nameSelector = "input[name='" + $.ui.escapeSelector( name ) + "']";
+
+ if ( !name ) {
+ return $( [] );
+ }
+
+ if ( this.form.length ) {
+ group = $( this.form[ 0 ].elements ).filter( nameSelector );
+ } else {
+
+ // Not inside a form, check all inputs that also are not inside a form
+ group = $( nameSelector ).filter( function() {
+ return $( this ).form().length === 0;
+ } );
+ }
+
+ return group.not( this.element );
+ },
+
+ _toggleClasses: function() {
+ var checked = this.element[ 0 ].checked;
+ this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked );
+
+ if ( this.options.icon && this.type === "checkbox" ) {
+ this._toggleClass( this.icon, null, "ui-icon-check ui-state-checked", checked )
+ ._toggleClass( this.icon, null, "ui-icon-blank", !checked );
+ }
+
+ if ( this.type === "radio" ) {
+ this._getRadioGroup()
+ .each( function() {
+ var instance = $( this ).checkboxradio( "instance" );
+
+ if ( instance ) {
+ instance._removeClass( instance.label,
+ "ui-checkboxradio-checked", "ui-state-active" );
+ }
+ } );
+ }
+ },
+
+ _destroy: function() {
+ this._unbindFormResetHandler();
+
+ if ( this.icon ) {
+ this.icon.remove();
+ this.iconSpace.remove();
+ }
+ },
+
+ _setOption: function( key, value ) {
+
+ // We don't allow the value to be set to nothing
+ if ( key === "label" && !value ) {
+ return;
+ }
+
+ this._super( key, value );
+
+ if ( key === "disabled" ) {
+ this._toggleClass( this.label, null, "ui-state-disabled", value );
+ this.element[ 0 ].disabled = value;
+
+ // Don't refresh when setting disabled
+ return;
+ }
+ this.refresh();
+ },
+
+ _updateIcon: function( checked ) {
+ var toAdd = "ui-icon ui-icon-background ";
+
+ if ( this.options.icon ) {
+ if ( !this.icon ) {
+ this.icon = $( "<span>" );
+ this.iconSpace = $( "<span> </span>" );
+ this._addClass( this.iconSpace, "ui-checkboxradio-icon-space" );
+ }
+
+ if ( this.type === "checkbox" ) {
+ toAdd += checked ? "ui-icon-check ui-state-checked" : "ui-icon-blank";
+ this._removeClass( this.icon, null, checked ? "ui-icon-blank" : "ui-icon-check" );
+ } else {
+ toAdd += "ui-icon-blank";
+ }
+ this._addClass( this.icon, "ui-checkboxradio-icon", toAdd );
+ if ( !checked ) {
+ this._removeClass( this.icon, null, "ui-icon-check ui-state-checked" );
+ }
+ this.icon.prependTo( this.label ).after( this.iconSpace );
+ } else if ( this.icon !== undefined ) {
+ this.icon.remove();
+ this.iconSpace.remove();
+ delete this.icon;
+ }
+ },
+
+ _updateLabel: function() {
+
+ // Remove the contents of the label ( minus the icon, icon space, and input )
+ var contents = this.label.contents().not( this.element[ 0 ] );
+ if ( this.icon ) {
+ contents = contents.not( this.icon[ 0 ] );
+ }
+ if ( this.iconSpace ) {
+ contents = contents.not( this.iconSpace[ 0 ] );
+ }
+ contents.remove();
+
+ this.label.append( this.options.label );
+ },
+
+ refresh: function() {
+ var checked = this.element[ 0 ].checked,
+ isDisabled = this.element[ 0 ].disabled;
+
+ this._updateIcon( checked );
+ this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked );
+ if ( this.options.label !== null ) {
+ this._updateLabel();
+ }
+
+ if ( isDisabled !== this.options.disabled ) {
+ this._setOptions( { "disabled": isDisabled } );
+ }
+ }
+
+} ] );
+
+var widgetsCheckboxradio = $.ui.checkboxradio;
+
+
+/*!
+ * jQuery UI Button 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Button
+//>>group: Widgets
+//>>description: Enhances a form with themeable buttons.
+//>>docs: http://api.jqueryui.com/button/
+//>>demos: http://jqueryui.com/button/
+//>>css.structure: ../../themes/base/core.css
+//>>css.structure: ../../themes/base/button.css
+//>>css.theme: ../../themes/base/theme.css
+
+
+
+$.widget( "ui.button", {
+ version: "1.12.1",
+ defaultElement: "<button>",
+ options: {
+ classes: {
+ "ui-button": "ui-corner-all"
+ },
+ disabled: null,
+ icon: null,
+ iconPosition: "beginning",
+ label: null,
+ showLabel: true
+ },
+
+ _getCreateOptions: function() {
+ var disabled,
+
+ // This is to support cases like in jQuery Mobile where the base widget does have
+ // an implementation of _getCreateOptions
+ options = this._super() || {};
+
+ this.isInput = this.element.is( "input" );
+
+ disabled = this.element[ 0 ].disabled;
+ if ( disabled != null ) {
+ options.disabled = disabled;
+ }
+
+ this.originalLabel = this.isInput ? this.element.val() : this.element.html();
+ if ( this.originalLabel ) {
+ options.label = this.originalLabel;
+ }
+
+ return options;
+ },
+
+ _create: function() {
+ if ( !this.option.showLabel & !this.options.icon ) {
+ this.options.showLabel = true;
+ }
+
+ // We have to check the option again here even though we did in _getCreateOptions,
+ // because null may have been passed on init which would override what was set in
+ // _getCreateOptions
+ if ( this.options.disabled == null ) {
+ this.options.disabled = this.element[ 0 ].disabled || false;
+ }
+
+ this.hasTitle = !!this.element.attr( "title" );
+
+ // Check to see if the label needs to be set or if its already correct
+ if ( this.options.label && this.options.label !== this.originalLabel ) {
+ if ( this.isInput ) {
+ this.element.val( this.options.label );
+ } else {
+ this.element.html( this.options.label );
+ }
+ }
+ this._addClass( "ui-button", "ui-widget" );
+ this._setOption( "disabled", this.options.disabled );
+ this._enhance();
+
+ if ( this.element.is( "a" ) ) {
+ this._on( {
+ "keyup": function( event ) {
+ if ( event.keyCode === $.ui.keyCode.SPACE ) {
+ event.preventDefault();
+
+ // Support: PhantomJS <= 1.9, IE 8 Only
+ // If a native click is available use it so we actually cause navigation
+ // otherwise just trigger a click event
+ if ( this.element[ 0 ].click ) {
+ this.element[ 0 ].click();
+ } else {
+ this.element.trigger( "click" );
+ }
+ }
+ }
+ } );
+ }
+ },
+
+ _enhance: function() {
+ if ( !this.element.is( "button" ) ) {
+ this.element.attr( "role", "button" );
+ }
+
+ if ( this.options.icon ) {
+ this._updateIcon( "icon", this.options.icon );
+ this._updateTooltip();
+ }
+ },
+
+ _updateTooltip: function() {
+ this.title = this.element.attr( "title" );
+
+ if ( !this.options.showLabel && !this.title ) {
+ this.element.attr( "title", this.options.label );
+ }
+ },
+
+ _updateIcon: function( option, value ) {
+ var icon = option !== "iconPosition",
+ position = icon ? this.options.iconPosition : value,
+ displayBlock = position === "top" || position === "bottom";
+
+ // Create icon
+ if ( !this.icon ) {
+ this.icon = $( "<span>" );
+
+ this._addClass( this.icon, "ui-button-icon", "ui-icon" );
+
+ if ( !this.options.showLabel ) {
+ this._addClass( "ui-button-icon-only" );
+ }
+ } else if ( icon ) {
+
+ // If we are updating the icon remove the old icon class
+ this._removeClass( this.icon, null, this.options.icon );
+ }
+
+ // If we are updating the icon add the new icon class
+ if ( icon ) {
+ this._addClass( this.icon, null, value );
+ }
+
+ this._attachIcon( position );
+
+ // If the icon is on top or bottom we need to add the ui-widget-icon-block class and remove
+ // the iconSpace if there is one.
+ if ( displayBlock ) {
+ this._addClass( this.icon, null, "ui-widget-icon-block" );
+ if ( this.iconSpace ) {
+ this.iconSpace.remove();
+ }
+ } else {
+
+ // Position is beginning or end so remove the ui-widget-icon-block class and add the
+ // space if it does not exist
+ if ( !this.iconSpace ) {
+ this.iconSpace = $( "<span> </span>" );
+ this._addClass( this.iconSpace, "ui-button-icon-space" );
+ }
+ this._removeClass( this.icon, null, "ui-wiget-icon-block" );
+ this._attachIconSpace( position );
+ }
+ },
+
+ _destroy: function() {
+ this.element.removeAttr( "role" );
+
+ if ( this.icon ) {
+ this.icon.remove();
+ }
+ if ( this.iconSpace ) {
+ this.iconSpace.remove();
+ }
+ if ( !this.hasTitle ) {
+ this.element.removeAttr( "title" );
+ }
+ },
+
+ _attachIconSpace: function( iconPosition ) {
+ this.icon[ /^(?:end|bottom)/.test( iconPosition ) ? "before" : "after" ]( this.iconSpace );
+ },
+
+ _attachIcon: function( iconPosition ) {
+ this.element[ /^(?:end|bottom)/.test( iconPosition ) ? "append" : "prepend" ]( this.icon );
+ },
+
+ _setOptions: function( options ) {
+ var newShowLabel = options.showLabel === undefined ?
+ this.options.showLabel :
+ options.showLabel,
+ newIcon = options.icon === undefined ? this.options.icon : options.icon;
+
+ if ( !newShowLabel && !newIcon ) {
+ options.showLabel = true;
+ }
+ this._super( options );
+ },
+
+ _setOption: function( key, value ) {
+ if ( key === "icon" ) {
+ if ( value ) {
+ this._updateIcon( key, value );
+ } else if ( this.icon ) {
+ this.icon.remove();
+ if ( this.iconSpace ) {
+ this.iconSpace.remove();
+ }
+ }
+ }
+
+ if ( key === "iconPosition" ) {
+ this._updateIcon( key, value );
+ }
+
+ // Make sure we can't end up with a button that has neither text nor icon
+ if ( key === "showLabel" ) {
+ this._toggleClass( "ui-button-icon-only", null, !value );
+ this._updateTooltip();
+ }
+
+ if ( key === "label" ) {
+ if ( this.isInput ) {
+ this.element.val( value );
+ } else {
+
+ // If there is an icon, append it, else nothing then append the value
+ // this avoids removal of the icon when setting label text
+ this.element.html( value );
+ if ( this.icon ) {
+ this._attachIcon( this.options.iconPosition );
+ this._attachIconSpace( this.options.iconPosition );
+ }
+ }
+ }
+
+ this._super( key, value );
+
+ if ( key === "disabled" ) {
+ this._toggleClass( null, "ui-state-disabled", value );
+ this.element[ 0 ].disabled = value;
+ if ( value ) {
+ this.element.blur();
+ }
+ }
+ },
+
+ refresh: function() {
+
+ // Make sure to only check disabled if its an element that supports this otherwise
+ // check for the disabled class to determine state
+ var isDisabled = this.element.is( "input, button" ) ?
+ this.element[ 0 ].disabled : this.element.hasClass( "ui-button-disabled" );
+
+ if ( isDisabled !== this.options.disabled ) {
+ this._setOptions( { disabled: isDisabled } );
+ }
+
+ this._updateTooltip();
+ }
+} );
+
+// DEPRECATED
+if ( $.uiBackCompat !== false ) {
+
+ // Text and Icons options
+ $.widget( "ui.button", $.ui.button, {
+ options: {
+ text: true,
+ icons: {
+ primary: null,
+ secondary: null
+ }
+ },
+
+ _create: function() {
+ if ( this.options.showLabel && !this.options.text ) {
+ this.options.showLabel = this.options.text;
+ }
+ if ( !this.options.showLabel && this.options.text ) {
+ this.options.text = this.options.showLabel;
+ }
+ if ( !this.options.icon && ( this.options.icons.primary ||
+ this.options.icons.secondary ) ) {
+ if ( this.options.icons.primary ) {
+ this.options.icon = this.options.icons.primary;
+ } else {
+ this.options.icon = this.options.icons.secondary;
+ this.options.iconPosition = "end";
+ }
+ } else if ( this.options.icon ) {
+ this.options.icons.primary = this.options.icon;
+ }
+ this._super();
+ },
+
+ _setOption: function( key, value ) {
+ if ( key === "text" ) {
+ this._super( "showLabel", value );
+ return;
+ }
+ if ( key === "showLabel" ) {
+ this.options.text = value;
+ }
+ if ( key === "icon" ) {
+ this.options.icons.primary = value;
+ }
+ if ( key === "icons" ) {
+ if ( value.primary ) {
+ this._super( "icon", value.primary );
+ this._super( "iconPosition", "beginning" );
+ } else if ( value.secondary ) {
+ this._super( "icon", value.secondary );
+ this._super( "iconPosition", "end" );
+ }
+ }
+ this._superApply( arguments );
+ }
+ } );
+
+ $.fn.button = ( function( orig ) {
+ return function() {
+ if ( !this.length || ( this.length && this[ 0 ].tagName !== "INPUT" ) ||
+ ( this.length && this[ 0 ].tagName === "INPUT" && (
+ this.attr( "type" ) !== "checkbox" && this.attr( "type" ) !== "radio"
+ ) ) ) {
+ return orig.apply( this, arguments );
+ }
+ if ( !$.ui.checkboxradio ) {
+ $.error( "Checkboxradio widget missing" );
+ }
+ if ( arguments.length === 0 ) {
+ return this.checkboxradio( {
+ "icon": false
+ } );
+ }
+ return this.checkboxradio.apply( this, arguments );
+ };
+ } )( $.fn.button );
+
+ $.fn.buttonset = function() {
+ if ( !$.ui.controlgroup ) {
+ $.error( "Controlgroup widget missing" );
+ }
+ if ( arguments[ 0 ] === "option" && arguments[ 1 ] === "items" && arguments[ 2 ] ) {
+ return this.controlgroup.apply( this,
+ [ arguments[ 0 ], "items.button", arguments[ 2 ] ] );
+ }
+ if ( arguments[ 0 ] === "option" && arguments[ 1 ] === "items" ) {
+ return this.controlgroup.apply( this, [ arguments[ 0 ], "items.button" ] );
+ }
+ if ( typeof arguments[ 0 ] === "object" && arguments[ 0 ].items ) {
+ arguments[ 0 ].items = {
+ button: arguments[ 0 ].items
+ };
+ }
+ return this.controlgroup.apply( this, arguments );
+ };
+}
+
+var widgetsButton = $.ui.button;
+
+
+// jscs:disable maximumLineLength
+/* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */
+/*!
+ * jQuery UI Datepicker 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Datepicker
+//>>group: Widgets
+//>>description: Displays a calendar from an input or inline for selecting dates.
+//>>docs: http://api.jqueryui.com/datepicker/
+//>>demos: http://jqueryui.com/datepicker/
+//>>css.structure: ../../themes/base/core.css
+//>>css.structure: ../../themes/base/datepicker.css
+//>>css.theme: ../../themes/base/theme.css
+
+
+
+$.extend( $.ui, { datepicker: { version: "1.12.1" } } );
+
+var datepicker_instActive;
+
+function datepicker_getZindex( elem ) {
+ var position, value;
+ while ( elem.length && elem[ 0 ] !== document ) {
+
+ // Ignore z-index if position is set to a value where z-index is ignored by the browser
+ // This makes behavior of this function consistent across browsers
+ // WebKit always returns auto if the element is positioned
+ position = elem.css( "position" );
+ if ( position === "absolute" || position === "relative" || position === "fixed" ) {
+
+ // IE returns 0 when zIndex is not specified
+ // other browsers return a string
+ // we ignore the case of nested elements with an explicit value of 0
+ // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
+ value = parseInt( elem.css( "zIndex" ), 10 );
+ if ( !isNaN( value ) && value !== 0 ) {
+ return value;
+ }
+ }
+ elem = elem.parent();
+ }
+
+ return 0;
+}
+/* Date picker manager.
+ Use the singleton instance of this class, $.datepicker, to interact with the date picker.
+ Settings for (groups of) date pickers are maintained in an instance object,
+ allowing multiple different settings on the same page. */
+
+function Datepicker() {
+ this._curInst = null; // The current instance in use
+ this._keyEvent = false; // If the last event was a key event
+ this._disabledInputs = []; // List of date picker inputs that have been disabled
+ this._datepickerShowing = false; // True if the popup picker is showing , false if not
+ this._inDialog = false; // True if showing within a "dialog", false if not
+ this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division
+ this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class
+ this._appendClass = "ui-datepicker-append"; // The name of the append marker class
+ this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class
+ this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class
+ this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class
+ this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class
+ this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class
+ this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class
+ this.regional = []; // Available regional settings, indexed by language code
+ this.regional[ "" ] = { // Default regional settings
+ closeText: "Done", // Display text for close link
+ prevText: "Prev", // Display text for previous month link
+ nextText: "Next", // Display text for next month link
+ currentText: "Today", // Display text for current month link
+ monthNames: [ "January","February","March","April","May","June",
+ "July","August","September","October","November","December" ], // Names of months for drop-down and formatting
+ monthNamesShort: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], // For formatting
+ dayNames: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], // For formatting
+ dayNamesShort: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], // For formatting
+ dayNamesMin: [ "Su","Mo","Tu","We","Th","Fr","Sa" ], // Column headings for days starting at Sunday
+ weekHeader: "Wk", // Column header for week of the year
+ dateFormat: "mm/dd/yy", // See format options on parseDate
+ firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
+ isRTL: false, // True if right-to-left language, false if left-to-right
+ showMonthAfterYear: false, // True if the year select precedes month, false for month then year
+ yearSuffix: "" // Additional text to append to the year in the month headers
+ };
+ this._defaults = { // Global defaults for all the date picker instances
+ showOn: "focus", // "focus" for popup on focus,
+ // "button" for trigger button, or "both" for either
+ showAnim: "fadeIn", // Name of jQuery animation for popup
+ showOptions: {}, // Options for enhanced animations
+ defaultDate: null, // Used when field is blank: actual date,
+ // +/-number for offset from today, null for today
+ appendText: "", // Display text following the input box, e.g. showing the format
+ buttonText: "...", // Text for trigger button
+ buttonImage: "", // URL for trigger button image
+ buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
+ hideIfNoPrevNext: false, // True to hide next/previous month links
+ // if not applicable, false to just disable them
+ navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
+ gotoCurrent: false, // True if today link goes back to current selection instead
+ changeMonth: false, // True if month can be selected directly, false if only prev/next
+ changeYear: false, // True if year can be selected directly, false if only prev/next
+ yearRange: "c-10:c+10", // Range of years to display in drop-down,
+ // either relative to today's year (-nn:+nn), relative to currently displayed year
+ // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
+ showOtherMonths: false, // True to show dates in other months, false to leave blank
+ selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
+ showWeek: false, // True to show week of the year, false to not show it
+ calculateWeek: this.iso8601Week, // How to calculate the week of the year,
+ // takes a Date and returns the number of the week for it
+ shortYearCutoff: "+10", // Short year values < this are in the current century,
+ // > this are in the previous century,
+ // string value starting with "+" for current year + value
+ minDate: null, // The earliest selectable date, or null for no limit
+ maxDate: null, // The latest selectable date, or null for no limit
+ duration: "fast", // Duration of display/closure
+ beforeShowDay: null, // Function that takes a date and returns an array with
+ // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "",
+ // [2] = cell title (optional), e.g. $.datepicker.noWeekends
+ beforeShow: null, // Function that takes an input field and
+ // returns a set of custom settings for the date picker
+ onSelect: null, // Define a callback function when a date is selected
+ onChangeMonthYear: null, // Define a callback function when the month or year is changed
+ onClose: null, // Define a callback function when the datepicker is closed
+ numberOfMonths: 1, // Number of months to show at a time
+ showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
+ stepMonths: 1, // Number of months to step back/forward
+ stepBigMonths: 12, // Number of months to step back/forward for the big links
+ altField: "", // Selector for an alternate field to store selected dates into
+ altFormat: "", // The date format to use for the alternate field
+ constrainInput: true, // The input is constrained by the current date format
+ showButtonPanel: false, // True to show button panel, false to not show it
+ autoSize: false, // True to size the input for the date format, false to leave as is
+ disabled: false // The initial disabled state
+ };
+ $.extend( this._defaults, this.regional[ "" ] );
+ this.regional.en = $.extend( true, {}, this.regional[ "" ] );
+ this.regional[ "en-US" ] = $.extend( true, {}, this.regional.en );
+ this.dpDiv = datepicker_bindHover( $( "<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) );
+}
+
+$.extend( Datepicker.prototype, {
+ /* Class name added to elements to indicate already configured with a date picker. */
+ markerClassName: "hasDatepicker",
+
+ //Keep track of the maximum number of rows displayed (see #7043)
+ maxRows: 4,
+
+ // TODO rename to "widget" when switching to widget factory
+ _widgetDatepicker: function() {
+ return this.dpDiv;
+ },
+
+ /* Override the default settings for all instances of the date picker.
+ * @param settings object - the new settings to use as defaults (anonymous object)
+ * @return the manager object
+ */
+ setDefaults: function( settings ) {
+ datepicker_extendRemove( this._defaults, settings || {} );
+ return this;
+ },
+
+ /* Attach the date picker to a jQuery selection.
+ * @param target element - the target input field or division or span
+ * @param settings object - the new settings to use for this date picker instance (anonymous)
+ */
+ _attachDatepicker: function( target, settings ) {
+ var nodeName, inline, inst;
+ nodeName = target.nodeName.toLowerCase();
+ inline = ( nodeName === "div" || nodeName === "span" );
+ if ( !target.id ) {
+ this.uuid += 1;
+ target.id = "dp" + this.uuid;
+ }
+ inst = this._newInst( $( target ), inline );
+ inst.settings = $.extend( {}, settings || {} );
+ if ( nodeName === "input" ) {
+ this._connectDatepicker( target, inst );
+ } else if ( inline ) {
+ this._inlineDatepicker( target, inst );
+ }
+ },
+
+ /* Create a new instance object. */
+ _newInst: function( target, inline ) {
+ var id = target[ 0 ].id.replace( /([^A-Za-z0-9_\-])/g, "\\\\$1" ); // escape jQuery meta chars
+ return { id: id, input: target, // associated target
+ selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
+ drawMonth: 0, drawYear: 0, // month being drawn
+ inline: inline, // is datepicker inline or not
+ dpDiv: ( !inline ? this.dpDiv : // presentation div
+ datepicker_bindHover( $( "<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) ) ) };
+ },
+
+ /* Attach the date picker to an input field. */
+ _connectDatepicker: function( target, inst ) {
+ var input = $( target );
+ inst.append = $( [] );
+ inst.trigger = $( [] );
+ if ( input.hasClass( this.markerClassName ) ) {
+ return;
+ }
+ this._attachments( input, inst );
+ input.addClass( this.markerClassName ).on( "keydown", this._doKeyDown ).
+ on( "keypress", this._doKeyPress ).on( "keyup", this._doKeyUp );
+ this._autoSize( inst );
+ $.data( target, "datepicker", inst );
+
+ //If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
+ if ( inst.settings.disabled ) {
+ this._disableDatepicker( target );
+ }
+ },
+
+ /* Make attachments based on settings. */
+ _attachments: function( input, inst ) {
+ var showOn, buttonText, buttonImage,
+ appendText = this._get( inst, "appendText" ),
+ isRTL = this._get( inst, "isRTL" );
+
+ if ( inst.append ) {
+ inst.append.remove();
+ }
+ if ( appendText ) {
+ inst.append = $( "<span class='" + this._appendClass + "'>" + appendText + "</span>" );
+ input[ isRTL ? "before" : "after" ]( inst.append );
+ }
+
+ input.off( "focus", this._showDatepicker );
+
+ if ( inst.trigger ) {
+ inst.trigger.remove();
+ }
+
+ showOn = this._get( inst, "showOn" );
+ if ( showOn === "focus" || showOn === "both" ) { // pop-up date picker when in the marked field
+ input.on( "focus", this._showDatepicker );
+ }
+ if ( showOn === "button" || showOn === "both" ) { // pop-up date picker when button clicked
+ buttonText = this._get( inst, "buttonText" );
+ buttonImage = this._get( inst, "buttonImage" );
+ inst.trigger = $( this._get( inst, "buttonImageOnly" ) ?
+ $( "<img/>" ).addClass( this._triggerClass ).
+ attr( { src: buttonImage, alt: buttonText, title: buttonText } ) :
+ $( "<button type='button'></button>" ).addClass( this._triggerClass ).
+ html( !buttonImage ? buttonText : $( "<img/>" ).attr(
+ { src:buttonImage, alt:buttonText, title:buttonText } ) ) );
+ input[ isRTL ? "before" : "after" ]( inst.trigger );
+ inst.trigger.on( "click", function() {
+ if ( $.datepicker._datepickerShowing && $.datepicker._lastInput === input[ 0 ] ) {
+ $.datepicker._hideDatepicker();
+ } else if ( $.datepicker._datepickerShowing && $.datepicker._lastInput !== input[ 0 ] ) {
+ $.datepicker._hideDatepicker();
+ $.datepicker._showDatepicker( input[ 0 ] );
+ } else {
+ $.datepicker._showDatepicker( input[ 0 ] );
+ }
+ return false;
+ } );
+ }
+ },
+
+ /* Apply the maximum length for the date format. */
+ _autoSize: function( inst ) {
+ if ( this._get( inst, "autoSize" ) && !inst.inline ) {
+ var findMax, max, maxI, i,
+ date = new Date( 2009, 12 - 1, 20 ), // Ensure double digits
+ dateFormat = this._get( inst, "dateFormat" );
+
+ if ( dateFormat.match( /[DM]/ ) ) {
+ findMax = function( names ) {
+ max = 0;
+ maxI = 0;
+ for ( i = 0; i < names.length; i++ ) {
+ if ( names[ i ].length > max ) {
+ max = names[ i ].length;
+ maxI = i;
+ }
+ }
+ return maxI;
+ };
+ date.setMonth( findMax( this._get( inst, ( dateFormat.match( /MM/ ) ?
+ "monthNames" : "monthNamesShort" ) ) ) );
+ date.setDate( findMax( this._get( inst, ( dateFormat.match( /DD/ ) ?
+ "dayNames" : "dayNamesShort" ) ) ) + 20 - date.getDay() );
+ }
+ inst.input.attr( "size", this._formatDate( inst, date ).length );
+ }
+ },
+
+ /* Attach an inline date picker to a div. */
+ _inlineDatepicker: function( target, inst ) {
+ var divSpan = $( target );
+ if ( divSpan.hasClass( this.markerClassName ) ) {
+ return;
+ }
+ divSpan.addClass( this.markerClassName ).append( inst.dpDiv );
+ $.data( target, "datepicker", inst );
+ this._setDate( inst, this._getDefaultDate( inst ), true );
+ this._updateDatepicker( inst );
+ this._updateAlternate( inst );
+
+ //If disabled option is true, disable the datepicker before showing it (see ticket #5665)
+ if ( inst.settings.disabled ) {
+ this._disableDatepicker( target );
+ }
+
+ // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
+ // http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
+ inst.dpDiv.css( "display", "block" );
+ },
+
+ /* Pop-up the date picker in a "dialog" box.
+ * @param input element - ignored
+ * @param date string or Date - the initial date to display
+ * @param onSelect function - the function to call when a date is selected
+ * @param settings object - update the dialog date picker instance's settings (anonymous object)
+ * @param pos int[2] - coordinates for the dialog's position within the screen or
+ * event - with x/y coordinates or
+ * leave empty for default (screen centre)
+ * @return the manager object
+ */
+ _dialogDatepicker: function( input, date, onSelect, settings, pos ) {
+ var id, browserWidth, browserHeight, scrollX, scrollY,
+ inst = this._dialogInst; // internal instance
+
+ if ( !inst ) {
+ this.uuid += 1;
+ id = "dp" + this.uuid;
+ this._dialogInput = $( "<input type='text' id='" + id +
+ "' style='position: absolute; top: -100px; width: 0px;'/>" );
+ this._dialogInput.on( "keydown", this._doKeyDown );
+ $( "body" ).append( this._dialogInput );
+ inst = this._dialogInst = this._newInst( this._dialogInput, false );
+ inst.settings = {};
+ $.data( this._dialogInput[ 0 ], "datepicker", inst );
+ }
+ datepicker_extendRemove( inst.settings, settings || {} );
+ date = ( date && date.constructor === Date ? this._formatDate( inst, date ) : date );
+ this._dialogInput.val( date );
+
+ this._pos = ( pos ? ( pos.length ? pos : [ pos.pageX, pos.pageY ] ) : null );
+ if ( !this._pos ) {
+ browserWidth = document.documentElement.clientWidth;
+ browserHeight = document.documentElement.clientHeight;
+ scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
+ scrollY = document.documentElement.scrollTop || document.body.scrollTop;
+ this._pos = // should use actual width/height below
+ [ ( browserWidth / 2 ) - 100 + scrollX, ( browserHeight / 2 ) - 150 + scrollY ];
+ }
+
+ // Move input on screen for focus, but hidden behind dialog
+ this._dialogInput.css( "left", ( this._pos[ 0 ] + 20 ) + "px" ).css( "top", this._pos[ 1 ] + "px" );
+ inst.settings.onSelect = onSelect;
+ this._inDialog = true;
+ this.dpDiv.addClass( this._dialogClass );
+ this._showDatepicker( this._dialogInput[ 0 ] );
+ if ( $.blockUI ) {
+ $.blockUI( this.dpDiv );
+ }
+ $.data( this._dialogInput[ 0 ], "datepicker", inst );
+ return this;
+ },
+
+ /* Detach a datepicker from its control.
+ * @param target element - the target input field or division or span
+ */
+ _destroyDatepicker: function( target ) {
+ var nodeName,
+ $target = $( target ),
+ inst = $.data( target, "datepicker" );
+
+ if ( !$target.hasClass( this.markerClassName ) ) {
+ return;
+ }
+
+ nodeName = target.nodeName.toLowerCase();
+ $.removeData( target, "datepicker" );
+ if ( nodeName === "input" ) {
+ inst.append.remove();
+ inst.trigger.remove();
+ $target.removeClass( this.markerClassName ).
+ off( "focus", this._showDatepicker ).
+ off( "keydown", this._doKeyDown ).
+ off( "keypress", this._doKeyPress ).
+ off( "keyup", this._doKeyUp );
+ } else if ( nodeName === "div" || nodeName === "span" ) {
+ $target.removeClass( this.markerClassName ).empty();
+ }
+
+ if ( datepicker_instActive === inst ) {
+ datepicker_instActive = null;
+ }
+ },
+
+ /* Enable the date picker to a jQuery selection.
+ * @param target element - the target input field or division or span
+ */
+ _enableDatepicker: function( target ) {
+ var nodeName, inline,
+ $target = $( target ),
+ inst = $.data( target, "datepicker" );
+
+ if ( !$target.hasClass( this.markerClassName ) ) {
+ return;
+ }
+
+ nodeName = target.nodeName.toLowerCase();
+ if ( nodeName === "input" ) {
+ target.disabled = false;
+ inst.trigger.filter( "button" ).
+ each( function() { this.disabled = false; } ).end().
+ filter( "img" ).css( { opacity: "1.0", cursor: "" } );
+ } else if ( nodeName === "div" || nodeName === "span" ) {
+ inline = $target.children( "." + this._inlineClass );
+ inline.children().removeClass( "ui-state-disabled" );
+ inline.find( "select.ui-datepicker-month, select.ui-datepicker-year" ).
+ prop( "disabled", false );
+ }
+ this._disabledInputs = $.map( this._disabledInputs,
+ function( value ) { return ( value === target ? null : value ); } ); // delete entry
+ },
+
+ /* Disable the date picker to a jQuery selection.
+ * @param target element - the target input field or division or span
+ */
+ _disableDatepicker: function( target ) {
+ var nodeName, inline,
+ $target = $( target ),
+ inst = $.data( target, "datepicker" );
+
+ if ( !$target.hasClass( this.markerClassName ) ) {
+ return;
+ }
+
+ nodeName = target.nodeName.toLowerCase();
+ if ( nodeName === "input" ) {
+ target.disabled = true;
+ inst.trigger.filter( "button" ).
+ each( function() { this.disabled = true; } ).end().
+ filter( "img" ).css( { opacity: "0.5", cursor: "default" } );
+ } else if ( nodeName === "div" || nodeName === "span" ) {
+ inline = $target.children( "." + this._inlineClass );
+ inline.children().addClass( "ui-state-disabled" );
+ inline.find( "select.ui-datepicker-month, select.ui-datepicker-year" ).
+ prop( "disabled", true );
+ }
+ this._disabledInputs = $.map( this._disabledInputs,
+ function( value ) { return ( value === target ? null : value ); } ); // delete entry
+ this._disabledInputs[ this._disabledInputs.length ] = target;
+ },
+
+ /* Is the first field in a jQuery collection disabled as a datepicker?
+ * @param target element - the target input field or division or span
+ * @return boolean - true if disabled, false if enabled
+ */
+ _isDisabledDatepicker: function( target ) {
+ if ( !target ) {
+ return false;
+ }
+ for ( var i = 0; i < this._disabledInputs.length; i++ ) {
+ if ( this._disabledInputs[ i ] === target ) {
+ return true;
+ }
+ }
+ return false;
+ },
+
+ /* Retrieve the instance data for the target control.
+ * @param target element - the target input field or division or span
+ * @return object - the associated instance data
+ * @throws error if a jQuery problem getting data
+ */
+ _getInst: function( target ) {
+ try {
+ return $.data( target, "datepicker" );
+ }
+ catch ( err ) {
+ throw "Missing instance data for this datepicker";
+ }
+ },
+
+ /* Update or retrieve the settings for a date picker attached to an input field or division.
+ * @param target element - the target input field or division or span
+ * @param name object - the new settings to update or
+ * string - the name of the setting to change or retrieve,
+ * when retrieving also "all" for all instance settings or
+ * "defaults" for all global defaults
+ * @param value any - the new value for the setting
+ * (omit if above is an object or to retrieve a value)
+ */
+ _optionDatepicker: function( target, name, value ) {
+ var settings, date, minDate, maxDate,
+ inst = this._getInst( target );
+
+ if ( arguments.length === 2 && typeof name === "string" ) {
+ return ( name === "defaults" ? $.extend( {}, $.datepicker._defaults ) :
+ ( inst ? ( name === "all" ? $.extend( {}, inst.settings ) :
+ this._get( inst, name ) ) : null ) );
+ }
+
+ settings = name || {};
+ if ( typeof name === "string" ) {
+ settings = {};
+ settings[ name ] = value;
+ }
+
+ if ( inst ) {
+ if ( this._curInst === inst ) {
+ this._hideDatepicker();
+ }
+
+ date = this._getDateDatepicker( target, true );
+ minDate = this._getMinMaxDate( inst, "min" );
+ maxDate = this._getMinMaxDate( inst, "max" );
+ datepicker_extendRemove( inst.settings, settings );
+
+ // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
+ if ( minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined ) {
+ inst.settings.minDate = this._formatDate( inst, minDate );
+ }
+ if ( maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined ) {
+ inst.settings.maxDate = this._formatDate( inst, maxDate );
+ }
+ if ( "disabled" in settings ) {
+ if ( settings.disabled ) {
+ this._disableDatepicker( target );
+ } else {
+ this._enableDatepicker( target );
+ }
+ }
+ this._attachments( $( target ), inst );
+ this._autoSize( inst );
+ this._setDate( inst, date );
+ this._updateAlternate( inst );
+ this._updateDatepicker( inst );
+ }
+ },
+
+ // Change method deprecated
+ _changeDatepicker: function( target, name, value ) {
+ this._optionDatepicker( target, name, value );
+ },
+
+ /* Redraw the date picker attached to an input field or division.
+ * @param target element - the target input field or division or span
+ */
+ _refreshDatepicker: function( target ) {
+ var inst = this._getInst( target );
+ if ( inst ) {
+ this._updateDatepicker( inst );
+ }
+ },
+
+ /* Set the dates for a jQuery selection.
+ * @param target element - the target input field or division or span
+ * @param date Date - the new date
+ */
+ _setDateDatepicker: function( target, date ) {
+ var inst = this._getInst( target );
+ if ( inst ) {
+ this._setDate( inst, date );
+ this._updateDatepicker( inst );
+ this._updateAlternate( inst );
+ }
+ },
+
+ /* Get the date(s) for the first entry in a jQuery selection.
+ * @param target element - the target input field or division or span
+ * @param noDefault boolean - true if no default date is to be used
+ * @return Date - the current date
+ */
+ _getDateDatepicker: function( target, noDefault ) {
+ var inst = this._getInst( target );
+ if ( inst && !inst.inline ) {
+ this._setDateFromField( inst, noDefault );
+ }
+ return ( inst ? this._getDate( inst ) : null );
+ },
+
+ /* Handle keystrokes. */
+ _doKeyDown: function( event ) {
+ var onSelect, dateStr, sel,
+ inst = $.datepicker._getInst( event.target ),
+ handled = true,
+ isRTL = inst.dpDiv.is( ".ui-datepicker-rtl" );
+
+ inst._keyEvent = true;
+ if ( $.datepicker._datepickerShowing ) {
+ switch ( event.keyCode ) {
+ case 9: $.datepicker._hideDatepicker();
+ handled = false;
+ break; // hide on tab out
+ case 13: sel = $( "td." + $.datepicker._dayOverClass + ":not(." +
+ $.datepicker._currentClass + ")", inst.dpDiv );
+ if ( sel[ 0 ] ) {
+ $.datepicker._selectDay( event.target, inst.selectedMonth, inst.selectedYear, sel[ 0 ] );
+ }
+
+ onSelect = $.datepicker._get( inst, "onSelect" );
+ if ( onSelect ) {
+ dateStr = $.datepicker._formatDate( inst );
+
+ // Trigger custom callback
+ onSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] );
+ } else {
+ $.datepicker._hideDatepicker();
+ }
+
+ return false; // don't submit the form
+ case 27: $.datepicker._hideDatepicker();
+ break; // hide on escape
+ case 33: $.datepicker._adjustDate( event.target, ( event.ctrlKey ?
+ -$.datepicker._get( inst, "stepBigMonths" ) :
+ -$.datepicker._get( inst, "stepMonths" ) ), "M" );
+ break; // previous month/year on page up/+ ctrl
+ case 34: $.datepicker._adjustDate( event.target, ( event.ctrlKey ?
+ +$.datepicker._get( inst, "stepBigMonths" ) :
+ +$.datepicker._get( inst, "stepMonths" ) ), "M" );
+ break; // next month/year on page down/+ ctrl
+ case 35: if ( event.ctrlKey || event.metaKey ) {
+ $.datepicker._clearDate( event.target );
+ }
+ handled = event.ctrlKey || event.metaKey;
+ break; // clear on ctrl or command +end
+ case 36: if ( event.ctrlKey || event.metaKey ) {
+ $.datepicker._gotoToday( event.target );
+ }
+ handled = event.ctrlKey || event.metaKey;
+ break; // current on ctrl or command +home
+ case 37: if ( event.ctrlKey || event.metaKey ) {
+ $.datepicker._adjustDate( event.target, ( isRTL ? +1 : -1 ), "D" );
+ }
+ handled = event.ctrlKey || event.metaKey;
+
+ // -1 day on ctrl or command +left
+ if ( event.originalEvent.altKey ) {
+ $.datepicker._adjustDate( event.target, ( event.ctrlKey ?
+ -$.datepicker._get( inst, "stepBigMonths" ) :
+ -$.datepicker._get( inst, "stepMonths" ) ), "M" );
+ }
+
+ // next month/year on alt +left on Mac
+ break;
+ case 38: if ( event.ctrlKey || event.metaKey ) {
+ $.datepicker._adjustDate( event.target, -7, "D" );
+ }
+ handled = event.ctrlKey || event.metaKey;
+ break; // -1 week on ctrl or command +up
+ case 39: if ( event.ctrlKey || event.metaKey ) {
+ $.datepicker._adjustDate( event.target, ( isRTL ? -1 : +1 ), "D" );
+ }
+ handled = event.ctrlKey || event.metaKey;
+
+ // +1 day on ctrl or command +right
+ if ( event.originalEvent.altKey ) {
+ $.datepicker._adjustDate( event.target, ( event.ctrlKey ?
+ +$.datepicker._get( inst, "stepBigMonths" ) :
+ +$.datepicker._get( inst, "stepMonths" ) ), "M" );
+ }
+
+ // next month/year on alt +right
+ break;
+ case 40: if ( event.ctrlKey || event.metaKey ) {
+ $.datepicker._adjustDate( event.target, +7, "D" );
+ }
+ handled = event.ctrlKey || event.metaKey;
+ break; // +1 week on ctrl or command +down
+ default: handled = false;
+ }
+ } else if ( event.keyCode === 36 && event.ctrlKey ) { // display the date picker on ctrl+home
+ $.datepicker._showDatepicker( this );
+ } else {
+ handled = false;
+ }
+
+ if ( handled ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ },
+
+ /* Filter entered characters - based on date format. */
+ _doKeyPress: function( event ) {
+ var chars, chr,
+ inst = $.datepicker._getInst( event.target );
+
+ if ( $.datepicker._get( inst, "constrainInput" ) ) {
+ chars = $.datepicker._possibleChars( $.datepicker._get( inst, "dateFormat" ) );
+ chr = String.fromCharCode( event.charCode == null ? event.keyCode : event.charCode );
+ return event.ctrlKey || event.metaKey || ( chr < " " || !chars || chars.indexOf( chr ) > -1 );
+ }
+ },
+
+ /* Synchronise manual entry and field/alternate field. */
+ _doKeyUp: function( event ) {
+ var date,
+ inst = $.datepicker._getInst( event.target );
+
+ if ( inst.input.val() !== inst.lastVal ) {
+ try {
+ date = $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ),
+ ( inst.input ? inst.input.val() : null ),
+ $.datepicker._getFormatConfig( inst ) );
+
+ if ( date ) { // only if valid
+ $.datepicker._setDateFromField( inst );
+ $.datepicker._updateAlternate( inst );
+ $.datepicker._updateDatepicker( inst );
+ }
+ }
+ catch ( err ) {
+ }
+ }
+ return true;
+ },
+
+ /* Pop-up the date picker for a given input field.
+ * If false returned from beforeShow event handler do not show.
+ * @param input element - the input field attached to the date picker or
+ * event - if triggered by focus
+ */
+ _showDatepicker: function( input ) {
+ input = input.target || input;
+ if ( input.nodeName.toLowerCase() !== "input" ) { // find from button/image trigger
+ input = $( "input", input.parentNode )[ 0 ];
+ }
+
+ if ( $.datepicker._isDisabledDatepicker( input ) || $.datepicker._lastInput === input ) { // already here
+ return;
+ }
+
+ var inst, beforeShow, beforeShowSettings, isFixed,
+ offset, showAnim, duration;
+
+ inst = $.datepicker._getInst( input );
+ if ( $.datepicker._curInst && $.datepicker._curInst !== inst ) {
+ $.datepicker._curInst.dpDiv.stop( true, true );
+ if ( inst && $.datepicker._datepickerShowing ) {
+ $.datepicker._hideDatepicker( $.datepicker._curInst.input[ 0 ] );
+ }
+ }
+
+ beforeShow = $.datepicker._get( inst, "beforeShow" );
+ beforeShowSettings = beforeShow ? beforeShow.apply( input, [ input, inst ] ) : {};
+ if ( beforeShowSettings === false ) {
+ return;
+ }
+ datepicker_extendRemove( inst.settings, beforeShowSettings );
+
+ inst.lastVal = null;
+ $.datepicker._lastInput = input;
+ $.datepicker._setDateFromField( inst );
+
+ if ( $.datepicker._inDialog ) { // hide cursor
+ input.value = "";
+ }
+ if ( !$.datepicker._pos ) { // position below input
+ $.datepicker._pos = $.datepicker._findPos( input );
+ $.datepicker._pos[ 1 ] += input.offsetHeight; // add the height
+ }
+
+ isFixed = false;
+ $( input ).parents().each( function() {
+ isFixed |= $( this ).css( "position" ) === "fixed";
+ return !isFixed;
+ } );
+
+ offset = { left: $.datepicker._pos[ 0 ], top: $.datepicker._pos[ 1 ] };
+ $.datepicker._pos = null;
+
+ //to avoid flashes on Firefox
+ inst.dpDiv.empty();
+
+ // determine sizing offscreen
+ inst.dpDiv.css( { position: "absolute", display: "block", top: "-1000px" } );
+ $.datepicker._updateDatepicker( inst );
+
+ // fix width for dynamic number of date pickers
+ // and adjust position before showing
+ offset = $.datepicker._checkOffset( inst, offset, isFixed );
+ inst.dpDiv.css( { position: ( $.datepicker._inDialog && $.blockUI ?
+ "static" : ( isFixed ? "fixed" : "absolute" ) ), display: "none",
+ left: offset.left + "px", top: offset.top + "px" } );
+
+ if ( !inst.inline ) {
+ showAnim = $.datepicker._get( inst, "showAnim" );
+ duration = $.datepicker._get( inst, "duration" );
+ inst.dpDiv.css( "z-index", datepicker_getZindex( $( input ) ) + 1 );
+ $.datepicker._datepickerShowing = true;
+
+ if ( $.effects && $.effects.effect[ showAnim ] ) {
+ inst.dpDiv.show( showAnim, $.datepicker._get( inst, "showOptions" ), duration );
+ } else {
+ inst.dpDiv[ showAnim || "show" ]( showAnim ? duration : null );
+ }
+
+ if ( $.datepicker._shouldFocusInput( inst ) ) {
+ inst.input.trigger( "focus" );
+ }
+
+ $.datepicker._curInst = inst;
+ }
+ },
+
+ /* Generate the date picker content. */
+ _updateDatepicker: function( inst ) {
+ this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
+ datepicker_instActive = inst; // for delegate hover events
+ inst.dpDiv.empty().append( this._generateHTML( inst ) );
+ this._attachHandlers( inst );
+
+ var origyearshtml,
+ numMonths = this._getNumberOfMonths( inst ),
+ cols = numMonths[ 1 ],
+ width = 17,
+ activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" );
+
+ if ( activeCell.length > 0 ) {
+ datepicker_handleMouseover.apply( activeCell.get( 0 ) );
+ }
+
+ inst.dpDiv.removeClass( "ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4" ).width( "" );
+ if ( cols > 1 ) {
+ inst.dpDiv.addClass( "ui-datepicker-multi-" + cols ).css( "width", ( width * cols ) + "em" );
+ }
+ inst.dpDiv[ ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ? "add" : "remove" ) +
+ "Class" ]( "ui-datepicker-multi" );
+ inst.dpDiv[ ( this._get( inst, "isRTL" ) ? "add" : "remove" ) +
+ "Class" ]( "ui-datepicker-rtl" );
+
+ if ( inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {
+ inst.input.trigger( "focus" );
+ }
+
+ // Deffered render of the years select (to avoid flashes on Firefox)
+ if ( inst.yearshtml ) {
+ origyearshtml = inst.yearshtml;
+ setTimeout( function() {
+
+ //assure that inst.yearshtml didn't change.
+ if ( origyearshtml === inst.yearshtml && inst.yearshtml ) {
+ inst.dpDiv.find( "select.ui-datepicker-year:first" ).replaceWith( inst.yearshtml );
+ }
+ origyearshtml = inst.yearshtml = null;
+ }, 0 );
+ }
+ },
+
+ // #6694 - don't focus the input if it's already focused
+ // this breaks the change event in IE
+ // Support: IE and jQuery <1.9
+ _shouldFocusInput: function( inst ) {
+ return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" );
+ },
+
+ /* Check positioning to remain on screen. */
+ _checkOffset: function( inst, offset, isFixed ) {
+ var dpWidth = inst.dpDiv.outerWidth(),
+ dpHeight = inst.dpDiv.outerHeight(),
+ inputWidth = inst.input ? inst.input.outerWidth() : 0,
+ inputHeight = inst.input ? inst.input.outerHeight() : 0,
+ viewWidth = document.documentElement.clientWidth + ( isFixed ? 0 : $( document ).scrollLeft() ),
+ viewHeight = document.documentElement.clientHeight + ( isFixed ? 0 : $( document ).scrollTop() );
+
+ offset.left -= ( this._get( inst, "isRTL" ) ? ( dpWidth - inputWidth ) : 0 );
+ offset.left -= ( isFixed && offset.left === inst.input.offset().left ) ? $( document ).scrollLeft() : 0;
+ offset.top -= ( isFixed && offset.top === ( inst.input.offset().top + inputHeight ) ) ? $( document ).scrollTop() : 0;
+
+ // Now check if datepicker is showing outside window viewport - move to a better place if so.
+ offset.left -= Math.min( offset.left, ( offset.left + dpWidth > viewWidth && viewWidth > dpWidth ) ?
+ Math.abs( offset.left + dpWidth - viewWidth ) : 0 );
+ offset.top -= Math.min( offset.top, ( offset.top + dpHeight > viewHeight && viewHeight > dpHeight ) ?
+ Math.abs( dpHeight + inputHeight ) : 0 );
+
+ return offset;
+ },
+
+ /* Find an object's position on the screen. */
+ _findPos: function( obj ) {
+ var position,
+ inst = this._getInst( obj ),
+ isRTL = this._get( inst, "isRTL" );
+
+ while ( obj && ( obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden( obj ) ) ) {
+ obj = obj[ isRTL ? "previousSibling" : "nextSibling" ];
+ }
+
+ position = $( obj ).offset();
+ return [ position.left, position.top ];
+ },
+
+ /* Hide the date picker from view.
+ * @param input element - the input field attached to the date picker
+ */
+ _hideDatepicker: function( input ) {
+ var showAnim, duration, postProcess, onClose,
+ inst = this._curInst;
+
+ if ( !inst || ( input && inst !== $.data( input, "datepicker" ) ) ) {
+ return;
+ }
+
+ if ( this._datepickerShowing ) {
+ showAnim = this._get( inst, "showAnim" );
+ duration = this._get( inst, "duration" );
+ postProcess = function() {
+ $.datepicker._tidyDialog( inst );
+ };
+
+ // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
+ if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {
+ inst.dpDiv.hide( showAnim, $.datepicker._get( inst, "showOptions" ), duration, postProcess );
+ } else {
+ inst.dpDiv[ ( showAnim === "slideDown" ? "slideUp" :
+ ( showAnim === "fadeIn" ? "fadeOut" : "hide" ) ) ]( ( showAnim ? duration : null ), postProcess );
+ }
+
+ if ( !showAnim ) {
+ postProcess();
+ }
+ this._datepickerShowing = false;
+
+ onClose = this._get( inst, "onClose" );
+ if ( onClose ) {
+ onClose.apply( ( inst.input ? inst.input[ 0 ] : null ), [ ( inst.input ? inst.input.val() : "" ), inst ] );
+ }
+
+ this._lastInput = null;
+ if ( this._inDialog ) {
+ this._dialogInput.css( { position: "absolute", left: "0", top: "-100px" } );
+ if ( $.blockUI ) {
+ $.unblockUI();
+ $( "body" ).append( this.dpDiv );
+ }
+ }
+ this._inDialog = false;
+ }
+ },
+
+ /* Tidy up after a dialog display. */
+ _tidyDialog: function( inst ) {
+ inst.dpDiv.removeClass( this._dialogClass ).off( ".ui-datepicker-calendar" );
+ },
+
+ /* Close date picker if clicked elsewhere. */
+ _checkExternalClick: function( event ) {
+ if ( !$.datepicker._curInst ) {
+ return;
+ }
+
+ var $target = $( event.target ),
+ inst = $.datepicker._getInst( $target[ 0 ] );
+
+ if ( ( ( $target[ 0 ].id !== $.datepicker._mainDivId &&
+ $target.parents( "#" + $.datepicker._mainDivId ).length === 0 &&
+ !$target.hasClass( $.datepicker.markerClassName ) &&
+ !$target.closest( "." + $.datepicker._triggerClass ).length &&
+ $.datepicker._datepickerShowing && !( $.datepicker._inDialog && $.blockUI ) ) ) ||
+ ( $target.hasClass( $.datepicker.markerClassName ) && $.datepicker._curInst !== inst ) ) {
+ $.datepicker._hideDatepicker();
+ }
+ },
+
+ /* Adjust one of the date sub-fields. */
+ _adjustDate: function( id, offset, period ) {
+ var target = $( id ),
+ inst = this._getInst( target[ 0 ] );
+
+ if ( this._isDisabledDatepicker( target[ 0 ] ) ) {
+ return;
+ }
+ this._adjustInstDate( inst, offset +
+ ( period === "M" ? this._get( inst, "showCurrentAtPos" ) : 0 ), // undo positioning
+ period );
+ this._updateDatepicker( inst );
+ },
+
+ /* Action for current link. */
+ _gotoToday: function( id ) {
+ var date,
+ target = $( id ),
+ inst = this._getInst( target[ 0 ] );
+
+ if ( this._get( inst, "gotoCurrent" ) && inst.currentDay ) {
+ inst.selectedDay = inst.currentDay;
+ inst.drawMonth = inst.selectedMonth = inst.currentMonth;
+ inst.drawYear = inst.selectedYear = inst.currentYear;
+ } else {
+ date = new Date();
+ inst.selectedDay = date.getDate();
+ inst.drawMonth = inst.selectedMonth = date.getMonth();
+ inst.drawYear = inst.selectedYear = date.getFullYear();
+ }
+ this._notifyChange( inst );
+ this._adjustDate( target );
+ },
+
+ /* Action for selecting a new month/year. */
+ _selectMonthYear: function( id, select, period ) {
+ var target = $( id ),
+ inst = this._getInst( target[ 0 ] );
+
+ inst[ "selected" + ( period === "M" ? "Month" : "Year" ) ] =
+ inst[ "draw" + ( period === "M" ? "Month" : "Year" ) ] =
+ parseInt( select.options[ select.selectedIndex ].value, 10 );
+
+ this._notifyChange( inst );
+ this._adjustDate( target );
+ },
+
+ /* Action for selecting a day. */
+ _selectDay: function( id, month, year, td ) {
+ var inst,
+ target = $( id );
+
+ if ( $( td ).hasClass( this._unselectableClass ) || this._isDisabledDatepicker( target[ 0 ] ) ) {
+ return;
+ }
+
+ inst = this._getInst( target[ 0 ] );
+ inst.selectedDay = inst.currentDay = $( "a", td ).html();
+ inst.selectedMonth = inst.currentMonth = month;
+ inst.selectedYear = inst.currentYear = year;
+ this._selectDate( id, this._formatDate( inst,
+ inst.currentDay, inst.currentMonth, inst.currentYear ) );
+ },
+
+ /* Erase the input field and hide the date picker. */
+ _clearDate: function( id ) {
+ var target = $( id );
+ this._selectDate( target, "" );
+ },
+
+ /* Update the input field with the selected date. */
+ _selectDate: function( id, dateStr ) {
+ var onSelect,
+ target = $( id ),
+ inst = this._getInst( target[ 0 ] );
+
+ dateStr = ( dateStr != null ? dateStr : this._formatDate( inst ) );
+ if ( inst.input ) {
+ inst.input.val( dateStr );
+ }
+ this._updateAlternate( inst );
+
+ onSelect = this._get( inst, "onSelect" );
+ if ( onSelect ) {
+ onSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] ); // trigger custom callback
+ } else if ( inst.input ) {
+ inst.input.trigger( "change" ); // fire the change event
+ }
+
+ if ( inst.inline ) {
+ this._updateDatepicker( inst );
+ } else {
+ this._hideDatepicker();
+ this._lastInput = inst.input[ 0 ];
+ if ( typeof( inst.input[ 0 ] ) !== "object" ) {
+ inst.input.trigger( "focus" ); // restore focus
+ }
+ this._lastInput = null;
+ }
+ },
+
+ /* Update any alternate field to synchronise with the main field. */
+ _updateAlternate: function( inst ) {
+ var altFormat, date, dateStr,
+ altField = this._get( inst, "altField" );
+
+ if ( altField ) { // update alternate field too
+ altFormat = this._get( inst, "altFormat" ) || this._get( inst, "dateFormat" );
+ date = this._getDate( inst );
+ dateStr = this.formatDate( altFormat, date, this._getFormatConfig( inst ) );
+ $( altField ).val( dateStr );
+ }
+ },
+
+ /* Set as beforeShowDay function to prevent selection of weekends.
+ * @param date Date - the date to customise
+ * @return [boolean, string] - is this date selectable?, what is its CSS class?
+ */
+ noWeekends: function( date ) {
+ var day = date.getDay();
+ return [ ( day > 0 && day < 6 ), "" ];
+ },
+
+ /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
+ * @param date Date - the date to get the week for
+ * @return number - the number of the week within the year that contains this date
+ */
+ iso8601Week: function( date ) {
+ var time,
+ checkDate = new Date( date.getTime() );
+
+ // Find Thursday of this week starting on Monday
+ checkDate.setDate( checkDate.getDate() + 4 - ( checkDate.getDay() || 7 ) );
+
+ time = checkDate.getTime();
+ checkDate.setMonth( 0 ); // Compare with Jan 1
+ checkDate.setDate( 1 );
+ return Math.floor( Math.round( ( time - checkDate ) / 86400000 ) / 7 ) + 1;
+ },
+
+ /* Parse a string value into a date object.
+ * See formatDate below for the possible formats.
+ *
+ * @param format string - the expected format of the date
+ * @param value string - the date in the above format
+ * @param settings Object - attributes include:
+ * shortYearCutoff number - the cutoff year for determining the century (optional)
+ * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
+ * dayNames string[7] - names of the days from Sunday (optional)
+ * monthNamesShort string[12] - abbreviated names of the months (optional)
+ * monthNames string[12] - names of the months (optional)
+ * @return Date - the extracted date value or null if value is blank
+ */
+ parseDate: function( format, value, settings ) {
+ if ( format == null || value == null ) {
+ throw "Invalid arguments";
+ }
+
+ value = ( typeof value === "object" ? value.toString() : value + "" );
+ if ( value === "" ) {
+ return null;
+ }
+
+ var iFormat, dim, extra,
+ iValue = 0,
+ shortYearCutoffTemp = ( settings ? settings.shortYearCutoff : null ) || this._defaults.shortYearCutoff,
+ shortYearCutoff = ( typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp :
+ new Date().getFullYear() % 100 + parseInt( shortYearCutoffTemp, 10 ) ),
+ dayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort,
+ dayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames,
+ monthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort,
+ monthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames,
+ year = -1,
+ month = -1,
+ day = -1,
+ doy = -1,
+ literal = false,
+ date,
+
+ // Check whether a format character is doubled
+ lookAhead = function( match ) {
+ var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
+ if ( matches ) {
+ iFormat++;
+ }
+ return matches;
+ },
+
+ // Extract a number from the string value
+ getNumber = function( match ) {
+ var isDoubled = lookAhead( match ),
+ size = ( match === "@" ? 14 : ( match === "!" ? 20 :
+ ( match === "y" && isDoubled ? 4 : ( match === "o" ? 3 : 2 ) ) ) ),
+ minSize = ( match === "y" ? size : 1 ),
+ digits = new RegExp( "^\\d{" + minSize + "," + size + "}" ),
+ num = value.substring( iValue ).match( digits );
+ if ( !num ) {
+ throw "Missing number at position " + iValue;
+ }
+ iValue += num[ 0 ].length;
+ return parseInt( num[ 0 ], 10 );
+ },
+
+ // Extract a name from the string value and convert to an index
+ getName = function( match, shortNames, longNames ) {
+ var index = -1,
+ names = $.map( lookAhead( match ) ? longNames : shortNames, function( v, k ) {
+ return [ [ k, v ] ];
+ } ).sort( function( a, b ) {
+ return -( a[ 1 ].length - b[ 1 ].length );
+ } );
+
+ $.each( names, function( i, pair ) {
+ var name = pair[ 1 ];
+ if ( value.substr( iValue, name.length ).toLowerCase() === name.toLowerCase() ) {
+ index = pair[ 0 ];
+ iValue += name.length;
+ return false;
+ }
+ } );
+ if ( index !== -1 ) {
+ return index + 1;
+ } else {
+ throw "Unknown name at position " + iValue;
+ }
+ },
+
+ // Confirm that a literal character matches the string value
+ checkLiteral = function() {
+ if ( value.charAt( iValue ) !== format.charAt( iFormat ) ) {
+ throw "Unexpected literal at position " + iValue;
+ }
+ iValue++;
+ };
+
+ for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
+ if ( literal ) {
+ if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
+ literal = false;
+ } else {
+ checkLiteral();
+ }
+ } else {
+ switch ( format.charAt( iFormat ) ) {
+ case "d":
+ day = getNumber( "d" );
+ break;
+ case "D":
+ getName( "D", dayNamesShort, dayNames );
+ break;
+ case "o":
+ doy = getNumber( "o" );
+ break;
+ case "m":
+ month = getNumber( "m" );
+ break;
+ case "M":
+ month = getName( "M", monthNamesShort, monthNames );
+ break;
+ case "y":
+ year = getNumber( "y" );
+ break;
+ case "@":
+ date = new Date( getNumber( "@" ) );
+ year = date.getFullYear();
+ month = date.getMonth() + 1;
+ day = date.getDate();
+ break;
+ case "!":
+ date = new Date( ( getNumber( "!" ) - this._ticksTo1970 ) / 10000 );
+ year = date.getFullYear();
+ month = date.getMonth() + 1;
+ day = date.getDate();
+ break;
+ case "'":
+ if ( lookAhead( "'" ) ) {
+ checkLiteral();
+ } else {
+ literal = true;
+ }
+ break;
+ default:
+ checkLiteral();
+ }
+ }
+ }
+
+ if ( iValue < value.length ) {
+ extra = value.substr( iValue );
+ if ( !/^\s+/.test( extra ) ) {
+ throw "Extra/unparsed characters found in date: " + extra;
+ }
+ }
+
+ if ( year === -1 ) {
+ year = new Date().getFullYear();
+ } else if ( year < 100 ) {
+ year += new Date().getFullYear() - new Date().getFullYear() % 100 +
+ ( year <= shortYearCutoff ? 0 : -100 );
+ }
+
+ if ( doy > -1 ) {
+ month = 1;
+ day = doy;
+ do {
+ dim = this._getDaysInMonth( year, month - 1 );
+ if ( day <= dim ) {
+ break;
+ }
+ month++;
+ day -= dim;
+ } while ( true );
+ }
+
+ date = this._daylightSavingAdjust( new Date( year, month - 1, day ) );
+ if ( date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day ) {
+ throw "Invalid date"; // E.g. 31/02/00
+ }
+ return date;
+ },
+
+ /* Standard date formats. */
+ ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601)
+ COOKIE: "D, dd M yy",
+ ISO_8601: "yy-mm-dd",
+ RFC_822: "D, d M y",
+ RFC_850: "DD, dd-M-y",
+ RFC_1036: "D, d M y",
+ RFC_1123: "D, d M yy",
+ RFC_2822: "D, d M yy",
+ RSS: "D, d M y", // RFC 822
+ TICKS: "!",
+ TIMESTAMP: "@",
+ W3C: "yy-mm-dd", // ISO 8601
+
+ _ticksTo1970: ( ( ( 1970 - 1 ) * 365 + Math.floor( 1970 / 4 ) - Math.floor( 1970 / 100 ) +
+ Math.floor( 1970 / 400 ) ) * 24 * 60 * 60 * 10000000 ),
+
+ /* Format a date object into a string value.
+ * The format can be combinations of the following:
+ * d - day of month (no leading zero)
+ * dd - day of month (two digit)
+ * o - day of year (no leading zeros)
+ * oo - day of year (three digit)
+ * D - day name short
+ * DD - day name long
+ * m - month of year (no leading zero)
+ * mm - month of year (two digit)
+ * M - month name short
+ * MM - month name long
+ * y - year (two digit)
+ * yy - year (four digit)
+ * @ - Unix timestamp (ms since 01/01/1970)
+ * ! - Windows ticks (100ns since 01/01/0001)
+ * "..." - literal text
+ * '' - single quote
+ *
+ * @param format string - the desired format of the date
+ * @param date Date - the date value to format
+ * @param settings Object - attributes include:
+ * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
+ * dayNames string[7] - names of the days from Sunday (optional)
+ * monthNamesShort string[12] - abbreviated names of the months (optional)
+ * monthNames string[12] - names of the months (optional)
+ * @return string - the date in the above format
+ */
+ formatDate: function( format, date, settings ) {
+ if ( !date ) {
+ return "";
+ }
+
+ var iFormat,
+ dayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort,
+ dayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames,
+ monthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort,
+ monthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames,
+
+ // Check whether a format character is doubled
+ lookAhead = function( match ) {
+ var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
+ if ( matches ) {
+ iFormat++;
+ }
+ return matches;
+ },
+
+ // Format a number, with leading zero if necessary
+ formatNumber = function( match, value, len ) {
+ var num = "" + value;
+ if ( lookAhead( match ) ) {
+ while ( num.length < len ) {
+ num = "0" + num;
+ }
+ }
+ return num;
+ },
+
+ // Format a name, short or long as requested
+ formatName = function( match, value, shortNames, longNames ) {
+ return ( lookAhead( match ) ? longNames[ value ] : shortNames[ value ] );
+ },
+ output = "",
+ literal = false;
+
+ if ( date ) {
+ for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
+ if ( literal ) {
+ if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
+ literal = false;
+ } else {
+ output += format.charAt( iFormat );
+ }
+ } else {
+ switch ( format.charAt( iFormat ) ) {
+ case "d":
+ output += formatNumber( "d", date.getDate(), 2 );
+ break;
+ case "D":
+ output += formatName( "D", date.getDay(), dayNamesShort, dayNames );
+ break;
+ case "o":
+ output += formatNumber( "o",
+ Math.round( ( new Date( date.getFullYear(), date.getMonth(), date.getDate() ).getTime() - new Date( date.getFullYear(), 0, 0 ).getTime() ) / 86400000 ), 3 );
+ break;
+ case "m":
+ output += formatNumber( "m", date.getMonth() + 1, 2 );
+ break;
+ case "M":
+ output += formatName( "M", date.getMonth(), monthNamesShort, monthNames );
+ break;
+ case "y":
+ output += ( lookAhead( "y" ) ? date.getFullYear() :
+ ( date.getFullYear() % 100 < 10 ? "0" : "" ) + date.getFullYear() % 100 );
+ break;
+ case "@":
+ output += date.getTime();
+ break;
+ case "!":
+ output += date.getTime() * 10000 + this._ticksTo1970;
+ break;
+ case "'":
+ if ( lookAhead( "'" ) ) {
+ output += "'";
+ } else {
+ literal = true;
+ }
+ break;
+ default:
+ output += format.charAt( iFormat );
+ }
+ }
+ }
+ }
+ return output;
+ },
+
+ /* Extract all possible characters from the date format. */
+ _possibleChars: function( format ) {
+ var iFormat,
+ chars = "",
+ literal = false,
+
+ // Check whether a format character is doubled
+ lookAhead = function( match ) {
+ var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
+ if ( matches ) {
+ iFormat++;
+ }
+ return matches;
+ };
+
+ for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
+ if ( literal ) {
+ if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
+ literal = false;
+ } else {
+ chars += format.charAt( iFormat );
+ }
+ } else {
+ switch ( format.charAt( iFormat ) ) {
+ case "d": case "m": case "y": case "@":
+ chars += "0123456789";
+ break;
+ case "D": case "M":
+ return null; // Accept anything
+ case "'":
+ if ( lookAhead( "'" ) ) {
+ chars += "'";
+ } else {
+ literal = true;
+ }
+ break;
+ default:
+ chars += format.charAt( iFormat );
+ }
+ }
+ }
+ return chars;
+ },
+
+ /* Get a setting value, defaulting if necessary. */
+ _get: function( inst, name ) {
+ return inst.settings[ name ] !== undefined ?
+ inst.settings[ name ] : this._defaults[ name ];
+ },
+
+ /* Parse existing date and initialise date picker. */
+ _setDateFromField: function( inst, noDefault ) {
+ if ( inst.input.val() === inst.lastVal ) {
+ return;
+ }
+
+ var dateFormat = this._get( inst, "dateFormat" ),
+ dates = inst.lastVal = inst.input ? inst.input.val() : null,
+ defaultDate = this._getDefaultDate( inst ),
+ date = defaultDate,
+ settings = this._getFormatConfig( inst );
+
+ try {
+ date = this.parseDate( dateFormat, dates, settings ) || defaultDate;
+ } catch ( event ) {
+ dates = ( noDefault ? "" : dates );
+ }
+ inst.selectedDay = date.getDate();
+ inst.drawMonth = inst.selectedMonth = date.getMonth();
+ inst.drawYear = inst.selectedYear = date.getFullYear();
+ inst.currentDay = ( dates ? date.getDate() : 0 );
+ inst.currentMonth = ( dates ? date.getMonth() : 0 );
+ inst.currentYear = ( dates ? date.getFullYear() : 0 );
+ this._adjustInstDate( inst );
+ },
+
+ /* Retrieve the default date shown on opening. */
+ _getDefaultDate: function( inst ) {
+ return this._restrictMinMax( inst,
+ this._determineDate( inst, this._get( inst, "defaultDate" ), new Date() ) );
+ },
+
+ /* A date may be specified as an exact value or a relative one. */
+ _determineDate: function( inst, date, defaultDate ) {
+ var offsetNumeric = function( offset ) {
+ var date = new Date();
+ date.setDate( date.getDate() + offset );
+ return date;
+ },
+ offsetString = function( offset ) {
+ try {
+ return $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ),
+ offset, $.datepicker._getFormatConfig( inst ) );
+ }
+ catch ( e ) {
+
+ // Ignore
+ }
+
+ var date = ( offset.toLowerCase().match( /^c/ ) ?
+ $.datepicker._getDate( inst ) : null ) || new Date(),
+ year = date.getFullYear(),
+ month = date.getMonth(),
+ day = date.getDate(),
+ pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
+ matches = pattern.exec( offset );
+
+ while ( matches ) {
+ switch ( matches[ 2 ] || "d" ) {
+ case "d" : case "D" :
+ day += parseInt( matches[ 1 ], 10 ); break;
+ case "w" : case "W" :
+ day += parseInt( matches[ 1 ], 10 ) * 7; break;
+ case "m" : case "M" :
+ month += parseInt( matches[ 1 ], 10 );
+ day = Math.min( day, $.datepicker._getDaysInMonth( year, month ) );
+ break;
+ case "y": case "Y" :
+ year += parseInt( matches[ 1 ], 10 );
+ day = Math.min( day, $.datepicker._getDaysInMonth( year, month ) );
+ break;
+ }
+ matches = pattern.exec( offset );
+ }
+ return new Date( year, month, day );
+ },
+ newDate = ( date == null || date === "" ? defaultDate : ( typeof date === "string" ? offsetString( date ) :
+ ( typeof date === "number" ? ( isNaN( date ) ? defaultDate : offsetNumeric( date ) ) : new Date( date.getTime() ) ) ) );
+
+ newDate = ( newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate );
+ if ( newDate ) {
+ newDate.setHours( 0 );
+ newDate.setMinutes( 0 );
+ newDate.setSeconds( 0 );
+ newDate.setMilliseconds( 0 );
+ }
+ return this._daylightSavingAdjust( newDate );
+ },
+
+ /* Handle switch to/from daylight saving.
+ * Hours may be non-zero on daylight saving cut-over:
+ * > 12 when midnight changeover, but then cannot generate
+ * midnight datetime, so jump to 1AM, otherwise reset.
+ * @param date (Date) the date to check
+ * @return (Date) the corrected date
+ */
+ _daylightSavingAdjust: function( date ) {
+ if ( !date ) {
+ return null;
+ }
+ date.setHours( date.getHours() > 12 ? date.getHours() + 2 : 0 );
+ return date;
+ },
+
+ /* Set the date(s) directly. */
+ _setDate: function( inst, date, noChange ) {
+ var clear = !date,
+ origMonth = inst.selectedMonth,
+ origYear = inst.selectedYear,
+ newDate = this._restrictMinMax( inst, this._determineDate( inst, date, new Date() ) );
+
+ inst.selectedDay = inst.currentDay = newDate.getDate();
+ inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
+ inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
+ if ( ( origMonth !== inst.selectedMonth || origYear !== inst.selectedYear ) && !noChange ) {
+ this._notifyChange( inst );
+ }
+ this._adjustInstDate( inst );
+ if ( inst.input ) {
+ inst.input.val( clear ? "" : this._formatDate( inst ) );
+ }
+ },
+
+ /* Retrieve the date(s) directly. */
+ _getDate: function( inst ) {
+ var startDate = ( !inst.currentYear || ( inst.input && inst.input.val() === "" ) ? null :
+ this._daylightSavingAdjust( new Date(
+ inst.currentYear, inst.currentMonth, inst.currentDay ) ) );
+ return startDate;
+ },
+
+ /* Attach the onxxx handlers. These are declared statically so
+ * they work with static code transformers like Caja.
+ */
+ _attachHandlers: function( inst ) {
+ var stepMonths = this._get( inst, "stepMonths" ),
+ id = "#" + inst.id.replace( /\\\\/g, "\\" );
+ inst.dpDiv.find( "[data-handler]" ).map( function() {
+ var handler = {
+ prev: function() {
+ $.datepicker._adjustDate( id, -stepMonths, "M" );
+ },
+ next: function() {
+ $.datepicker._adjustDate( id, +stepMonths, "M" );
+ },
+ hide: function() {
+ $.datepicker._hideDatepicker();
+ },
+ today: function() {
+ $.datepicker._gotoToday( id );
+ },
+ selectDay: function() {
+ $.datepicker._selectDay( id, +this.getAttribute( "data-month" ), +this.getAttribute( "data-year" ), this );
+ return false;
+ },
+ selectMonth: function() {
+ $.datepicker._selectMonthYear( id, this, "M" );
+ return false;
+ },
+ selectYear: function() {
+ $.datepicker._selectMonthYear( id, this, "Y" );
+ return false;
+ }
+ };
+ $( this ).on( this.getAttribute( "data-event" ), handler[ this.getAttribute( "data-handler" ) ] );
+ } );
+ },
+
+ /* Generate the HTML for the current state of the date picker. */
+ _generateHTML: function( inst ) {
+ var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
+ controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
+ monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
+ selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
+ cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows,
+ printDate, dRow, tbody, daySettings, otherMonth, unselectable,
+ tempDate = new Date(),
+ today = this._daylightSavingAdjust(
+ new Date( tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate() ) ), // clear time
+ isRTL = this._get( inst, "isRTL" ),
+ showButtonPanel = this._get( inst, "showButtonPanel" ),
+ hideIfNoPrevNext = this._get( inst, "hideIfNoPrevNext" ),
+ navigationAsDateFormat = this._get( inst, "navigationAsDateFormat" ),
+ numMonths = this._getNumberOfMonths( inst ),
+ showCurrentAtPos = this._get( inst, "showCurrentAtPos" ),
+ stepMonths = this._get( inst, "stepMonths" ),
+ isMultiMonth = ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ),
+ currentDate = this._daylightSavingAdjust( ( !inst.currentDay ? new Date( 9999, 9, 9 ) :
+ new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) ),
+ minDate = this._getMinMaxDate( inst, "min" ),
+ maxDate = this._getMinMaxDate( inst, "max" ),
+ drawMonth = inst.drawMonth - showCurrentAtPos,
+ drawYear = inst.drawYear;
+
+ if ( drawMonth < 0 ) {
+ drawMonth += 12;
+ drawYear--;
+ }
+ if ( maxDate ) {
+ maxDraw = this._daylightSavingAdjust( new Date( maxDate.getFullYear(),
+ maxDate.getMonth() - ( numMonths[ 0 ] * numMonths[ 1 ] ) + 1, maxDate.getDate() ) );
+ maxDraw = ( minDate && maxDraw < minDate ? minDate : maxDraw );
+ while ( this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 ) ) > maxDraw ) {
+ drawMonth--;
+ if ( drawMonth < 0 ) {
+ drawMonth = 11;
+ drawYear--;
+ }
+ }
+ }
+ inst.drawMonth = drawMonth;
+ inst.drawYear = drawYear;
+
+ prevText = this._get( inst, "prevText" );
+ prevText = ( !navigationAsDateFormat ? prevText : this.formatDate( prevText,
+ this._daylightSavingAdjust( new Date( drawYear, drawMonth - stepMonths, 1 ) ),
+ this._getFormatConfig( inst ) ) );
+
+ prev = ( this._canAdjustMonth( inst, -1, drawYear, drawMonth ) ?
+ "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" +
+ " title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w" ) + "'>" + prevText + "</span></a>" :
+ ( hideIfNoPrevNext ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w" ) + "'>" + prevText + "</span></a>" ) );
+
+ nextText = this._get( inst, "nextText" );
+ nextText = ( !navigationAsDateFormat ? nextText : this.formatDate( nextText,
+ this._daylightSavingAdjust( new Date( drawYear, drawMonth + stepMonths, 1 ) ),
+ this._getFormatConfig( inst ) ) );
+
+ next = ( this._canAdjustMonth( inst, +1, drawYear, drawMonth ) ?
+ "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" +
+ " title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e" ) + "'>" + nextText + "</span></a>" :
+ ( hideIfNoPrevNext ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e" ) + "'>" + nextText + "</span></a>" ) );
+
+ currentText = this._get( inst, "currentText" );
+ gotoDate = ( this._get( inst, "gotoCurrent" ) && inst.currentDay ? currentDate : today );
+ currentText = ( !navigationAsDateFormat ? currentText :
+ this.formatDate( currentText, gotoDate, this._getFormatConfig( inst ) ) );
+
+ controls = ( !inst.inline ? "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" +
+ this._get( inst, "closeText" ) + "</button>" : "" );
+
+ buttonPanel = ( showButtonPanel ) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + ( isRTL ? controls : "" ) +
+ ( this._isInRange( inst, gotoDate ) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'" +
+ ">" + currentText + "</button>" : "" ) + ( isRTL ? "" : controls ) + "</div>" : "";
+
+ firstDay = parseInt( this._get( inst, "firstDay" ), 10 );
+ firstDay = ( isNaN( firstDay ) ? 0 : firstDay );
+
+ showWeek = this._get( inst, "showWeek" );
+ dayNames = this._get( inst, "dayNames" );
+ dayNamesMin = this._get( inst, "dayNamesMin" );
+ monthNames = this._get( inst, "monthNames" );
+ monthNamesShort = this._get( inst, "monthNamesShort" );
+ beforeShowDay = this._get( inst, "beforeShowDay" );
+ showOtherMonths = this._get( inst, "showOtherMonths" );
+ selectOtherMonths = this._get( inst, "selectOtherMonths" );
+ defaultDate = this._getDefaultDate( inst );
+ html = "";
+
+ for ( row = 0; row < numMonths[ 0 ]; row++ ) {
+ group = "";
+ this.maxRows = 4;
+ for ( col = 0; col < numMonths[ 1 ]; col++ ) {
+ selectedDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, inst.selectedDay ) );
+ cornerClass = " ui-corner-all";
+ calender = "";
+ if ( isMultiMonth ) {
+ calender += "<div class='ui-datepicker-group";
+ if ( numMonths[ 1 ] > 1 ) {
+ switch ( col ) {
+ case 0: calender += " ui-datepicker-group-first";
+ cornerClass = " ui-corner-" + ( isRTL ? "right" : "left" ); break;
+ case numMonths[ 1 ] - 1: calender += " ui-datepicker-group-last";
+ cornerClass = " ui-corner-" + ( isRTL ? "left" : "right" ); break;
+ default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break;
+ }
+ }
+ calender += "'>";
+ }
+ calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" +
+ ( /all|left/.test( cornerClass ) && row === 0 ? ( isRTL ? next : prev ) : "" ) +
+ ( /all|right/.test( cornerClass ) && row === 0 ? ( isRTL ? prev : next ) : "" ) +
+ this._generateMonthYearHeader( inst, drawMonth, drawYear, minDate, maxDate,
+ row > 0 || col > 0, monthNames, monthNamesShort ) + // draw month headers
+ "</div><table class='ui-datepicker-calendar'><thead>" +
+ "<tr>";
+ thead = ( showWeek ? "<th class='ui-datepicker-week-col'>" + this._get( inst, "weekHeader" ) + "</th>" : "" );
+ for ( dow = 0; dow < 7; dow++ ) { // days of the week
+ day = ( dow + firstDay ) % 7;
+ thead += "<th scope='col'" + ( ( dow + firstDay + 6 ) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "" ) + ">" +
+ "<span title='" + dayNames[ day ] + "'>" + dayNamesMin[ day ] + "</span></th>";
+ }
+ calender += thead + "</tr></thead><tbody>";
+ daysInMonth = this._getDaysInMonth( drawYear, drawMonth );
+ if ( drawYear === inst.selectedYear && drawMonth === inst.selectedMonth ) {
+ inst.selectedDay = Math.min( inst.selectedDay, daysInMonth );
+ }
+ leadDays = ( this._getFirstDayOfMonth( drawYear, drawMonth ) - firstDay + 7 ) % 7;
+ curRows = Math.ceil( ( leadDays + daysInMonth ) / 7 ); // calculate the number of rows to generate
+ numRows = ( isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows ); //If multiple months, use the higher number of rows (see #7043)
+ this.maxRows = numRows;
+ printDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 - leadDays ) );
+ for ( dRow = 0; dRow < numRows; dRow++ ) { // create date picker rows
+ calender += "<tr>";
+ tbody = ( !showWeek ? "" : "<td class='ui-datepicker-week-col'>" +
+ this._get( inst, "calculateWeek" )( printDate ) + "</td>" );
+ for ( dow = 0; dow < 7; dow++ ) { // create date picker days
+ daySettings = ( beforeShowDay ?
+ beforeShowDay.apply( ( inst.input ? inst.input[ 0 ] : null ), [ printDate ] ) : [ true, "" ] );
+ otherMonth = ( printDate.getMonth() !== drawMonth );
+ unselectable = ( otherMonth && !selectOtherMonths ) || !daySettings[ 0 ] ||
+ ( minDate && printDate < minDate ) || ( maxDate && printDate > maxDate );
+ tbody += "<td class='" +
+ ( ( dow + firstDay + 6 ) % 7 >= 5 ? " ui-datepicker-week-end" : "" ) + // highlight weekends
+ ( otherMonth ? " ui-datepicker-other-month" : "" ) + // highlight days from other months
+ ( ( printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent ) || // user pressed key
+ ( defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime() ) ?
+
+ // or defaultDate is current printedDate and defaultDate is selectedDate
+ " " + this._dayOverClass : "" ) + // highlight selected day
+ ( unselectable ? " " + this._unselectableClass + " ui-state-disabled" : "" ) + // highlight unselectable days
+ ( otherMonth && !showOtherMonths ? "" : " " + daySettings[ 1 ] + // highlight custom dates
+ ( printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "" ) + // highlight selected day
+ ( printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "" ) ) + "'" + // highlight today (if different)
+ ( ( !otherMonth || showOtherMonths ) && daySettings[ 2 ] ? " title='" + daySettings[ 2 ].replace( /'/g, "&#39;" ) + "'" : "" ) + // cell title
+ ( unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'" ) + ">" + // actions
+ ( otherMonth && !showOtherMonths ? "&#xa0;" : // display for other months
+ ( unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" +
+ ( printDate.getTime() === today.getTime() ? " ui-state-highlight" : "" ) +
+ ( printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "" ) + // highlight selected day
+ ( otherMonth ? " ui-priority-secondary" : "" ) + // distinguish dates from other months
+ "' href='#'>" + printDate.getDate() + "</a>" ) ) + "</td>"; // display selectable date
+ printDate.setDate( printDate.getDate() + 1 );
+ printDate = this._daylightSavingAdjust( printDate );
+ }
+ calender += tbody + "</tr>";
+ }
+ drawMonth++;
+ if ( drawMonth > 11 ) {
+ drawMonth = 0;
+ drawYear++;
+ }
+ calender += "</tbody></table>" + ( isMultiMonth ? "</div>" +
+ ( ( numMonths[ 0 ] > 0 && col === numMonths[ 1 ] - 1 ) ? "<div class='ui-datepicker-row-break'></div>" : "" ) : "" );
+ group += calender;
+ }
+ html += group;
+ }
+ html += buttonPanel;
+ inst._keyEvent = false;
+ return html;
+ },
+
+ /* Generate the month and year header. */
+ _generateMonthYearHeader: function( inst, drawMonth, drawYear, minDate, maxDate,
+ secondary, monthNames, monthNamesShort ) {
+
+ var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,
+ changeMonth = this._get( inst, "changeMonth" ),
+ changeYear = this._get( inst, "changeYear" ),
+ showMonthAfterYear = this._get( inst, "showMonthAfterYear" ),
+ html = "<div class='ui-datepicker-title'>",
+ monthHtml = "";
+
+ // Month selection
+ if ( secondary || !changeMonth ) {
+ monthHtml += "<span class='ui-datepicker-month'>" + monthNames[ drawMonth ] + "</span>";
+ } else {
+ inMinYear = ( minDate && minDate.getFullYear() === drawYear );
+ inMaxYear = ( maxDate && maxDate.getFullYear() === drawYear );
+ monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";
+ for ( month = 0; month < 12; month++ ) {
+ if ( ( !inMinYear || month >= minDate.getMonth() ) && ( !inMaxYear || month <= maxDate.getMonth() ) ) {
+ monthHtml += "<option value='" + month + "'" +
+ ( month === drawMonth ? " selected='selected'" : "" ) +
+ ">" + monthNamesShort[ month ] + "</option>";
+ }
+ }
+ monthHtml += "</select>";
+ }
+
+ if ( !showMonthAfterYear ) {
+ html += monthHtml + ( secondary || !( changeMonth && changeYear ) ? "&#xa0;" : "" );
+ }
+
+ // Year selection
+ if ( !inst.yearshtml ) {
+ inst.yearshtml = "";
+ if ( secondary || !changeYear ) {
+ html += "<span class='ui-datepicker-year'>" + drawYear + "</span>";
+ } else {
+
+ // determine range of years to display
+ years = this._get( inst, "yearRange" ).split( ":" );
+ thisYear = new Date().getFullYear();
+ determineYear = function( value ) {
+ var year = ( value.match( /c[+\-].*/ ) ? drawYear + parseInt( value.substring( 1 ), 10 ) :
+ ( value.match( /[+\-].*/ ) ? thisYear + parseInt( value, 10 ) :
+ parseInt( value, 10 ) ) );
+ return ( isNaN( year ) ? thisYear : year );
+ };
+ year = determineYear( years[ 0 ] );
+ endYear = Math.max( year, determineYear( years[ 1 ] || "" ) );
+ year = ( minDate ? Math.max( year, minDate.getFullYear() ) : year );
+ endYear = ( maxDate ? Math.min( endYear, maxDate.getFullYear() ) : endYear );
+ inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";
+ for ( ; year <= endYear; year++ ) {
+ inst.yearshtml += "<option value='" + year + "'" +
+ ( year === drawYear ? " selected='selected'" : "" ) +
+ ">" + year + "</option>";
+ }
+ inst.yearshtml += "</select>";
+
+ html += inst.yearshtml;
+ inst.yearshtml = null;
+ }
+ }
+
+ html += this._get( inst, "yearSuffix" );
+ if ( showMonthAfterYear ) {
+ html += ( secondary || !( changeMonth && changeYear ) ? "&#xa0;" : "" ) + monthHtml;
+ }
+ html += "</div>"; // Close datepicker_header
+ return html;
+ },
+
+ /* Adjust one of the date sub-fields. */
+ _adjustInstDate: function( inst, offset, period ) {
+ var year = inst.selectedYear + ( period === "Y" ? offset : 0 ),
+ month = inst.selectedMonth + ( period === "M" ? offset : 0 ),
+ day = Math.min( inst.selectedDay, this._getDaysInMonth( year, month ) ) + ( period === "D" ? offset : 0 ),
+ date = this._restrictMinMax( inst, this._daylightSavingAdjust( new Date( year, month, day ) ) );
+
+ inst.selectedDay = date.getDate();
+ inst.drawMonth = inst.selectedMonth = date.getMonth();
+ inst.drawYear = inst.selectedYear = date.getFullYear();
+ if ( period === "M" || period === "Y" ) {
+ this._notifyChange( inst );
+ }
+ },
+
+ /* Ensure a date is within any min/max bounds. */
+ _restrictMinMax: function( inst, date ) {
+ var minDate = this._getMinMaxDate( inst, "min" ),
+ maxDate = this._getMinMaxDate( inst, "max" ),
+ newDate = ( minDate && date < minDate ? minDate : date );
+ return ( maxDate && newDate > maxDate ? maxDate : newDate );
+ },
+
+ /* Notify change of month/year. */
+ _notifyChange: function( inst ) {
+ var onChange = this._get( inst, "onChangeMonthYear" );
+ if ( onChange ) {
+ onChange.apply( ( inst.input ? inst.input[ 0 ] : null ),
+ [ inst.selectedYear, inst.selectedMonth + 1, inst ] );
+ }
+ },
+
+ /* Determine the number of months to show. */
+ _getNumberOfMonths: function( inst ) {
+ var numMonths = this._get( inst, "numberOfMonths" );
+ return ( numMonths == null ? [ 1, 1 ] : ( typeof numMonths === "number" ? [ 1, numMonths ] : numMonths ) );
+ },
+
+ /* Determine the current maximum date - ensure no time components are set. */
+ _getMinMaxDate: function( inst, minMax ) {
+ return this._determineDate( inst, this._get( inst, minMax + "Date" ), null );
+ },
+
+ /* Find the number of days in a given month. */
+ _getDaysInMonth: function( year, month ) {
+ return 32 - this._daylightSavingAdjust( new Date( year, month, 32 ) ).getDate();
+ },
+
+ /* Find the day of the week of the first of a month. */
+ _getFirstDayOfMonth: function( year, month ) {
+ return new Date( year, month, 1 ).getDay();
+ },
+
+ /* Determines if we should allow a "next/prev" month display change. */
+ _canAdjustMonth: function( inst, offset, curYear, curMonth ) {
+ var numMonths = this._getNumberOfMonths( inst ),
+ date = this._daylightSavingAdjust( new Date( curYear,
+ curMonth + ( offset < 0 ? offset : numMonths[ 0 ] * numMonths[ 1 ] ), 1 ) );
+
+ if ( offset < 0 ) {
+ date.setDate( this._getDaysInMonth( date.getFullYear(), date.getMonth() ) );
+ }
+ return this._isInRange( inst, date );
+ },
+
+ /* Is the given date in the accepted range? */
+ _isInRange: function( inst, date ) {
+ var yearSplit, currentYear,
+ minDate = this._getMinMaxDate( inst, "min" ),
+ maxDate = this._getMinMaxDate( inst, "max" ),
+ minYear = null,
+ maxYear = null,
+ years = this._get( inst, "yearRange" );
+ if ( years ) {
+ yearSplit = years.split( ":" );
+ currentYear = new Date().getFullYear();
+ minYear = parseInt( yearSplit[ 0 ], 10 );
+ maxYear = parseInt( yearSplit[ 1 ], 10 );
+ if ( yearSplit[ 0 ].match( /[+\-].*/ ) ) {
+ minYear += currentYear;
+ }
+ if ( yearSplit[ 1 ].match( /[+\-].*/ ) ) {
+ maxYear += currentYear;
+ }
+ }
+
+ return ( ( !minDate || date.getTime() >= minDate.getTime() ) &&
+ ( !maxDate || date.getTime() <= maxDate.getTime() ) &&
+ ( !minYear || date.getFullYear() >= minYear ) &&
+ ( !maxYear || date.getFullYear() <= maxYear ) );
+ },
+
+ /* Provide the configuration settings for formatting/parsing. */
+ _getFormatConfig: function( inst ) {
+ var shortYearCutoff = this._get( inst, "shortYearCutoff" );
+ shortYearCutoff = ( typeof shortYearCutoff !== "string" ? shortYearCutoff :
+ new Date().getFullYear() % 100 + parseInt( shortYearCutoff, 10 ) );
+ return { shortYearCutoff: shortYearCutoff,
+ dayNamesShort: this._get( inst, "dayNamesShort" ), dayNames: this._get( inst, "dayNames" ),
+ monthNamesShort: this._get( inst, "monthNamesShort" ), monthNames: this._get( inst, "monthNames" ) };
+ },
+
+ /* Format the given date for display. */
+ _formatDate: function( inst, day, month, year ) {
+ if ( !day ) {
+ inst.currentDay = inst.selectedDay;
+ inst.currentMonth = inst.selectedMonth;
+ inst.currentYear = inst.selectedYear;
+ }
+ var date = ( day ? ( typeof day === "object" ? day :
+ this._daylightSavingAdjust( new Date( year, month, day ) ) ) :
+ this._daylightSavingAdjust( new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) );
+ return this.formatDate( this._get( inst, "dateFormat" ), date, this._getFormatConfig( inst ) );
+ }
+} );
+
+/*
+ * Bind hover events for datepicker elements.
+ * Done via delegate so the binding only occurs once in the lifetime of the parent div.
+ * Global datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
+ */
+function datepicker_bindHover( dpDiv ) {
+ var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
+ return dpDiv.on( "mouseout", selector, function() {
+ $( this ).removeClass( "ui-state-hover" );
+ if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) {
+ $( this ).removeClass( "ui-datepicker-prev-hover" );
+ }
+ if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) {
+ $( this ).removeClass( "ui-datepicker-next-hover" );
+ }
+ } )
+ .on( "mouseover", selector, datepicker_handleMouseover );
+}
+
+function datepicker_handleMouseover() {
+ if ( !$.datepicker._isDisabledDatepicker( datepicker_instActive.inline ? datepicker_instActive.dpDiv.parent()[ 0 ] : datepicker_instActive.input[ 0 ] ) ) {
+ $( this ).parents( ".ui-datepicker-calendar" ).find( "a" ).removeClass( "ui-state-hover" );
+ $( this ).addClass( "ui-state-hover" );
+ if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) {
+ $( this ).addClass( "ui-datepicker-prev-hover" );
+ }
+ if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) {
+ $( this ).addClass( "ui-datepicker-next-hover" );
+ }
+ }
+}
+
+/* jQuery extend now ignores nulls! */
+function datepicker_extendRemove( target, props ) {
+ $.extend( target, props );
+ for ( var name in props ) {
+ if ( props[ name ] == null ) {
+ target[ name ] = props[ name ];
+ }
+ }
+ return target;
+}
+
+/* Invoke the datepicker functionality.
+ @param options string - a command, optionally followed by additional parameters or
+ Object - settings for attaching new datepicker functionality
+ @return jQuery object */
+$.fn.datepicker = function( options ) {
+
+ /* Verify an empty collection wasn't passed - Fixes #6976 */
+ if ( !this.length ) {
+ return this;
+ }
+
+ /* Initialise the date picker. */
+ if ( !$.datepicker.initialized ) {
+ $( document ).on( "mousedown", $.datepicker._checkExternalClick );
+ $.datepicker.initialized = true;
+ }
+
+ /* Append datepicker main container to body if not exist. */
+ if ( $( "#" + $.datepicker._mainDivId ).length === 0 ) {
+ $( "body" ).append( $.datepicker.dpDiv );
+ }
+
+ var otherArgs = Array.prototype.slice.call( arguments, 1 );
+ if ( typeof options === "string" && ( options === "isDisabled" || options === "getDate" || options === "widget" ) ) {
+ return $.datepicker[ "_" + options + "Datepicker" ].
+ apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) );
+ }
+ if ( options === "option" && arguments.length === 2 && typeof arguments[ 1 ] === "string" ) {
+ return $.datepicker[ "_" + options + "Datepicker" ].
+ apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) );
+ }
+ return this.each( function() {
+ typeof options === "string" ?
+ $.datepicker[ "_" + options + "Datepicker" ].
+ apply( $.datepicker, [ this ].concat( otherArgs ) ) :
+ $.datepicker._attachDatepicker( this, options );
+ } );
+};
+
+$.datepicker = new Datepicker(); // singleton instance
+$.datepicker.initialized = false;
+$.datepicker.uuid = new Date().getTime();
+$.datepicker.version = "1.12.1";
+
+var widgetsDatepicker = $.datepicker;
+
+
+
+
+// This file is deprecated
+var ie = $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
+
+/*!
+ * jQuery UI Mouse 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Mouse
+//>>group: Widgets
+//>>description: Abstracts mouse-based interactions to assist in creating certain widgets.
+//>>docs: http://api.jqueryui.com/mouse/
+
+
+
+var mouseHandled = false;
+$( document ).on( "mouseup", function() {
+ mouseHandled = false;
+} );
+
+var widgetsMouse = $.widget( "ui.mouse", {
+ version: "1.12.1",
+ options: {
+ cancel: "input, textarea, button, select, option",
+ distance: 1,
+ delay: 0
+ },
+ _mouseInit: function() {
+ var that = this;
+
+ this.element
+ .on( "mousedown." + this.widgetName, function( event ) {
+ return that._mouseDown( event );
+ } )
+ .on( "click." + this.widgetName, function( event ) {
+ if ( true === $.data( event.target, that.widgetName + ".preventClickEvent" ) ) {
+ $.removeData( event.target, that.widgetName + ".preventClickEvent" );
+ event.stopImmediatePropagation();
+ return false;
+ }
+ } );
+
+ this.started = false;
+ },
+
+ // TODO: make sure destroying one instance of mouse doesn't mess with
+ // other instances of mouse
+ _mouseDestroy: function() {
+ this.element.off( "." + this.widgetName );
+ if ( this._mouseMoveDelegate ) {
+ this.document
+ .off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
+ .off( "mouseup." + this.widgetName, this._mouseUpDelegate );
+ }
+ },
+
+ _mouseDown: function( event ) {
+
+ // don't let more than one widget handle mouseStart
+ if ( mouseHandled ) {
+ return;
+ }
+
+ this._mouseMoved = false;
+
+ // We may have missed mouseup (out of window)
+ ( this._mouseStarted && this._mouseUp( event ) );
+
+ this._mouseDownEvent = event;
+
+ var that = this,
+ btnIsLeft = ( event.which === 1 ),
+
+ // event.target.nodeName works around a bug in IE 8 with
+ // disabled inputs (#7620)
+ elIsCancel = ( typeof this.options.cancel === "string" && event.target.nodeName ?
+ $( event.target ).closest( this.options.cancel ).length : false );
+ if ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) {
+ return true;
+ }
+
+ this.mouseDelayMet = !this.options.delay;
+ if ( !this.mouseDelayMet ) {
+ this._mouseDelayTimer = setTimeout( function() {
+ that.mouseDelayMet = true;
+ }, this.options.delay );
+ }
+
+ if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
+ this._mouseStarted = ( this._mouseStart( event ) !== false );
+ if ( !this._mouseStarted ) {
+ event.preventDefault();
+ return true;
+ }
+ }
+
+ // Click event may never have fired (Gecko & Opera)
+ if ( true === $.data( event.target, this.widgetName + ".preventClickEvent" ) ) {
+ $.removeData( event.target, this.widgetName + ".preventClickEvent" );
+ }
+
+ // These delegates are required to keep context
+ this._mouseMoveDelegate = function( event ) {
+ return that._mouseMove( event );
+ };
+ this._mouseUpDelegate = function( event ) {
+ return that._mouseUp( event );
+ };
+
+ this.document
+ .on( "mousemove." + this.widgetName, this._mouseMoveDelegate )
+ .on( "mouseup." + this.widgetName, this._mouseUpDelegate );
+
+ event.preventDefault();
+
+ mouseHandled = true;
+ return true;
+ },
+
+ _mouseMove: function( event ) {
+
+ // Only check for mouseups outside the document if you've moved inside the document
+ // at least once. This prevents the firing of mouseup in the case of IE<9, which will
+ // fire a mousemove event if content is placed under the cursor. See #7778
+ // Support: IE <9
+ if ( this._mouseMoved ) {
+
+ // IE mouseup check - mouseup happened when mouse was out of window
+ if ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) &&
+ !event.button ) {
+ return this._mouseUp( event );
+
+ // Iframe mouseup check - mouseup occurred in another document
+ } else if ( !event.which ) {
+
+ // Support: Safari <=8 - 9
+ // Safari sets which to 0 if you press any of the following keys
+ // during a drag (#14461)
+ if ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||
+ event.originalEvent.metaKey || event.originalEvent.shiftKey ) {
+ this.ignoreMissingWhich = true;
+ } else if ( !this.ignoreMissingWhich ) {
+ return this._mouseUp( event );
+ }
+ }
+ }
+
+ if ( event.which || event.button ) {
+ this._mouseMoved = true;
+ }
+
+ if ( this._mouseStarted ) {
+ this._mouseDrag( event );
+ return event.preventDefault();
+ }
+
+ if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
+ this._mouseStarted =
+ ( this._mouseStart( this._mouseDownEvent, event ) !== false );
+ ( this._mouseStarted ? this._mouseDrag( event ) : this._mouseUp( event ) );
+ }
+
+ return !this._mouseStarted;
+ },
+
+ _mouseUp: function( event ) {
+ this.document
+ .off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
+ .off( "mouseup." + this.widgetName, this._mouseUpDelegate );
+
+ if ( this._mouseStarted ) {
+ this._mouseStarted = false;
+
+ if ( event.target === this._mouseDownEvent.target ) {
+ $.data( event.target, this.widgetName + ".preventClickEvent", true );
+ }
+
+ this._mouseStop( event );
+ }
+
+ if ( this._mouseDelayTimer ) {
+ clearTimeout( this._mouseDelayTimer );
+ delete this._mouseDelayTimer;
+ }
+
+ this.ignoreMissingWhich = false;
+ mouseHandled = false;
+ event.preventDefault();
+ },
+
+ _mouseDistanceMet: function( event ) {
+ return ( Math.max(
+ Math.abs( this._mouseDownEvent.pageX - event.pageX ),
+ Math.abs( this._mouseDownEvent.pageY - event.pageY )
+ ) >= this.options.distance
+ );
+ },
+
+ _mouseDelayMet: function( /* event */ ) {
+ return this.mouseDelayMet;
+ },
+
+ // These are placeholder methods, to be overriden by extending plugin
+ _mouseStart: function( /* event */ ) {},
+ _mouseDrag: function( /* event */ ) {},
+ _mouseStop: function( /* event */ ) {},
+ _mouseCapture: function( /* event */ ) { return true; }
+} );
+
+
+
+
+// $.ui.plugin is deprecated. Use $.widget() extensions instead.
+var plugin = $.ui.plugin = {
+ add: function( module, option, set ) {
+ var i,
+ proto = $.ui[ module ].prototype;
+ for ( i in set ) {
+ proto.plugins[ i ] = proto.plugins[ i ] || [];
+ proto.plugins[ i ].push( [ option, set[ i ] ] );
+ }
+ },
+ call: function( instance, name, args, allowDisconnected ) {
+ var i,
+ set = instance.plugins[ name ];
+
+ if ( !set ) {
+ return;
+ }
+
+ if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode ||
+ instance.element[ 0 ].parentNode.nodeType === 11 ) ) {
+ return;
+ }
+
+ for ( i = 0; i < set.length; i++ ) {
+ if ( instance.options[ set[ i ][ 0 ] ] ) {
+ set[ i ][ 1 ].apply( instance.element, args );
+ }
+ }
+ }
+};
+
+
+
+var safeBlur = $.ui.safeBlur = function( element ) {
+
+ // Support: IE9 - 10 only
+ // If the <body> is blurred, IE will switch windows, see #9420
+ if ( element && element.nodeName.toLowerCase() !== "body" ) {
+ $( element ).trigger( "blur" );
+ }
+};
+
+
+/*!
+ * jQuery UI Draggable 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Draggable
+//>>group: Interactions
+//>>description: Enables dragging functionality for any element.
+//>>docs: http://api.jqueryui.com/draggable/
+//>>demos: http://jqueryui.com/draggable/
+//>>css.structure: ../../themes/base/draggable.css
+
+
+
+$.widget( "ui.draggable", $.ui.mouse, {
+ version: "1.12.1",
+ widgetEventPrefix: "drag",
+ options: {
+ addClasses: true,
+ appendTo: "parent",
+ axis: false,
+ connectToSortable: false,
+ containment: false,
+ cursor: "auto",
+ cursorAt: false,
+ grid: false,
+ handle: false,
+ helper: "original",
+ iframeFix: false,
+ opacity: false,
+ refreshPositions: false,
+ revert: false,
+ revertDuration: 500,
+ scope: "default",
+ scroll: true,
+ scrollSensitivity: 20,
+ scrollSpeed: 20,
+ snap: false,
+ snapMode: "both",
+ snapTolerance: 20,
+ stack: false,
+ zIndex: false,
+
+ // Callbacks
+ drag: null,
+ start: null,
+ stop: null
+ },
+ _create: function() {
+
+ if ( this.options.helper === "original" ) {
+ this._setPositionRelative();
+ }
+ if ( this.options.addClasses ) {
+ this._addClass( "ui-draggable" );
+ }
+ this._setHandleClassName();
+
+ this._mouseInit();
+ },
+
+ _setOption: function( key, value ) {
+ this._super( key, value );
+ if ( key === "handle" ) {
+ this._removeHandleClassName();
+ this._setHandleClassName();
+ }
+ },
+
+ _destroy: function() {
+ if ( ( this.helper || this.element ).is( ".ui-draggable-dragging" ) ) {
+ this.destroyOnClear = true;
+ return;
+ }
+ this._removeHandleClassName();
+ this._mouseDestroy();
+ },
+
+ _mouseCapture: function( event ) {
+ var o = this.options;
+
+ // Among others, prevent a drag on a resizable-handle
+ if ( this.helper || o.disabled ||
+ $( event.target ).closest( ".ui-resizable-handle" ).length > 0 ) {
+ return false;
+ }
+
+ //Quit if we're not on a valid handle
+ this.handle = this._getHandle( event );
+ if ( !this.handle ) {
+ return false;
+ }
+
+ this._blurActiveElement( event );
+
+ this._blockFrames( o.iframeFix === true ? "iframe" : o.iframeFix );
+
+ return true;
+
+ },
+
+ _blockFrames: function( selector ) {
+ this.iframeBlocks = this.document.find( selector ).map( function() {
+ var iframe = $( this );
+
+ return $( "<div>" )
+ .css( "position", "absolute" )
+ .appendTo( iframe.parent() )
+ .outerWidth( iframe.outerWidth() )
+ .outerHeight( iframe.outerHeight() )
+ .offset( iframe.offset() )[ 0 ];
+ } );
+ },
+
+ _unblockFrames: function() {
+ if ( this.iframeBlocks ) {
+ this.iframeBlocks.remove();
+ delete this.iframeBlocks;
+ }
+ },
+
+ _blurActiveElement: function( event ) {
+ var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),
+ target = $( event.target );
+
+ // Don't blur if the event occurred on an element that is within
+ // the currently focused element
+ // See #10527, #12472
+ if ( target.closest( activeElement ).length ) {
+ return;
+ }
+
+ // Blur any element that currently has focus, see #4261
+ $.ui.safeBlur( activeElement );
+ },
+
+ _mouseStart: function( event ) {
+
+ var o = this.options;
+
+ //Create and append the visible helper
+ this.helper = this._createHelper( event );
+
+ this._addClass( this.helper, "ui-draggable-dragging" );
+
+ //Cache the helper size
+ this._cacheHelperProportions();
+
+ //If ddmanager is used for droppables, set the global draggable
+ if ( $.ui.ddmanager ) {
+ $.ui.ddmanager.current = this;
+ }
+
+ /*
+ * - Position generation -
+ * This block generates everything position related - it's the core of draggables.
+ */
+
+ //Cache the margins of the original element
+ this._cacheMargins();
+
+ //Store the helper's css position
+ this.cssPosition = this.helper.css( "position" );
+ this.scrollParent = this.helper.scrollParent( true );
+ this.offsetParent = this.helper.offsetParent();
+ this.hasFixedAncestor = this.helper.parents().filter( function() {
+ return $( this ).css( "position" ) === "fixed";
+ } ).length > 0;
+
+ //The element's absolute position on the page minus margins
+ this.positionAbs = this.element.offset();
+ this._refreshOffsets( event );
+
+ //Generate the original position
+ this.originalPosition = this.position = this._generatePosition( event, false );
+ this.originalPageX = event.pageX;
+ this.originalPageY = event.pageY;
+
+ //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
+ ( o.cursorAt && this._adjustOffsetFromHelper( o.cursorAt ) );
+
+ //Set a containment if given in the options
+ this._setContainment();
+
+ //Trigger event + callbacks
+ if ( this._trigger( "start", event ) === false ) {
+ this._clear();
+ return false;
+ }
+
+ //Recache the helper size
+ this._cacheHelperProportions();
+
+ //Prepare the droppable offsets
+ if ( $.ui.ddmanager && !o.dropBehaviour ) {
+ $.ui.ddmanager.prepareOffsets( this, event );
+ }
+
+ // Execute the drag once - this causes the helper not to be visible before getting its
+ // correct position
+ this._mouseDrag( event, true );
+
+ // If the ddmanager is used for droppables, inform the manager that dragging has started
+ // (see #5003)
+ if ( $.ui.ddmanager ) {
+ $.ui.ddmanager.dragStart( this, event );
+ }
+
+ return true;
+ },
+
+ _refreshOffsets: function( event ) {
+ this.offset = {
+ top: this.positionAbs.top - this.margins.top,
+ left: this.positionAbs.left - this.margins.left,
+ scroll: false,
+ parent: this._getParentOffset(),
+ relative: this._getRelativeOffset()
+ };
+
+ this.offset.click = {
+ left: event.pageX - this.offset.left,
+ top: event.pageY - this.offset.top
+ };
+ },
+
+ _mouseDrag: function( event, noPropagation ) {
+
+ // reset any necessary cached properties (see #5009)
+ if ( this.hasFixedAncestor ) {
+ this.offset.parent = this._getParentOffset();
+ }
+
+ //Compute the helpers position
+ this.position = this._generatePosition( event, true );
+ this.positionAbs = this._convertPositionTo( "absolute" );
+
+ //Call plugins and callbacks and use the resulting position if something is returned
+ if ( !noPropagation ) {
+ var ui = this._uiHash();
+ if ( this._trigger( "drag", event, ui ) === false ) {
+ this._mouseUp( new $.Event( "mouseup", event ) );
+ return false;
+ }
+ this.position = ui.position;
+ }
+
+ this.helper[ 0 ].style.left = this.position.left + "px";
+ this.helper[ 0 ].style.top = this.position.top + "px";
+
+ if ( $.ui.ddmanager ) {
+ $.ui.ddmanager.drag( this, event );
+ }
+
+ return false;
+ },
+
+ _mouseStop: function( event ) {
+
+ //If we are using droppables, inform the manager about the drop
+ var that = this,
+ dropped = false;
+ if ( $.ui.ddmanager && !this.options.dropBehaviour ) {
+ dropped = $.ui.ddmanager.drop( this, event );
+ }
+
+ //if a drop comes from outside (a sortable)
+ if ( this.dropped ) {
+ dropped = this.dropped;
+ this.dropped = false;
+ }
+
+ if ( ( this.options.revert === "invalid" && !dropped ) ||
+ ( this.options.revert === "valid" && dropped ) ||
+ this.options.revert === true || ( $.isFunction( this.options.revert ) &&
+ this.options.revert.call( this.element, dropped ) )
+ ) {
+ $( this.helper ).animate(
+ this.originalPosition,
+ parseInt( this.options.revertDuration, 10 ),
+ function() {
+ if ( that._trigger( "stop", event ) !== false ) {
+ that._clear();
+ }
+ }
+ );
+ } else {
+ if ( this._trigger( "stop", event ) !== false ) {
+ this._clear();
+ }
+ }
+
+ return false;
+ },
+
+ _mouseUp: function( event ) {
+ this._unblockFrames();
+
+ // If the ddmanager is used for droppables, inform the manager that dragging has stopped
+ // (see #5003)
+ if ( $.ui.ddmanager ) {
+ $.ui.ddmanager.dragStop( this, event );
+ }
+
+ // Only need to focus if the event occurred on the draggable itself, see #10527
+ if ( this.handleElement.is( event.target ) ) {
+
+ // The interaction is over; whether or not the click resulted in a drag,
+ // focus the element
+ this.element.trigger( "focus" );
+ }
+
+ return $.ui.mouse.prototype._mouseUp.call( this, event );
+ },
+
+ cancel: function() {
+
+ if ( this.helper.is( ".ui-draggable-dragging" ) ) {
+ this._mouseUp( new $.Event( "mouseup", { target: this.element[ 0 ] } ) );
+ } else {
+ this._clear();
+ }
+
+ return this;
+
+ },
+
+ _getHandle: function( event ) {
+ return this.options.handle ?
+ !!$( event.target ).closest( this.element.find( this.options.handle ) ).length :
+ true;
+ },
+
+ _setHandleClassName: function() {
+ this.handleElement = this.options.handle ?
+ this.element.find( this.options.handle ) : this.element;
+ this._addClass( this.handleElement, "ui-draggable-handle" );
+ },
+
+ _removeHandleClassName: function() {
+ this._removeClass( this.handleElement, "ui-draggable-handle" );
+ },
+
+ _createHelper: function( event ) {
+
+ var o = this.options,
+ helperIsFunction = $.isFunction( o.helper ),
+ helper = helperIsFunction ?
+ $( o.helper.apply( this.element[ 0 ], [ event ] ) ) :
+ ( o.helper === "clone" ?
+ this.element.clone().removeAttr( "id" ) :
+ this.element );
+
+ if ( !helper.parents( "body" ).length ) {
+ helper.appendTo( ( o.appendTo === "parent" ?
+ this.element[ 0 ].parentNode :
+ o.appendTo ) );
+ }
+
+ // Http://bugs.jqueryui.com/ticket/9446
+ // a helper function can return the original element
+ // which wouldn't have been set to relative in _create
+ if ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) {
+ this._setPositionRelative();
+ }
+
+ if ( helper[ 0 ] !== this.element[ 0 ] &&
+ !( /(fixed|absolute)/ ).test( helper.css( "position" ) ) ) {
+ helper.css( "position", "absolute" );
+ }
+
+ return helper;
+
+ },
+
+ _setPositionRelative: function() {
+ if ( !( /^(?:r|a|f)/ ).test( this.element.css( "position" ) ) ) {
+ this.element[ 0 ].style.position = "relative";
+ }
+ },
+
+ _adjustOffsetFromHelper: function( obj ) {
+ if ( typeof obj === "string" ) {
+ obj = obj.split( " " );
+ }
+ if ( $.isArray( obj ) ) {
+ obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
+ }
+ if ( "left" in obj ) {
+ this.offset.click.left = obj.left + this.margins.left;
+ }
+ if ( "right" in obj ) {
+ this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
+ }
+ if ( "top" in obj ) {
+ this.offset.click.top = obj.top + this.margins.top;
+ }
+ if ( "bottom" in obj ) {
+ this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
+ }
+ },
+
+ _isRootNode: function( element ) {
+ return ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ];
+ },
+
+ _getParentOffset: function() {
+
+ //Get the offsetParent and cache its position
+ var po = this.offsetParent.offset(),
+ document = this.document[ 0 ];
+
+ // This is a special case where we need to modify a offset calculated on start, since the
+ // following happened:
+ // 1. The position of the helper is absolute, so it's position is calculated based on the
+ // next positioned parent
+ // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't
+ // the document, which means that the scroll is included in the initial calculation of the
+ // offset of the parent, and never recalculated upon drag
+ if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== document &&
+ $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {
+ po.left += this.scrollParent.scrollLeft();
+ po.top += this.scrollParent.scrollTop();
+ }
+
+ if ( this._isRootNode( this.offsetParent[ 0 ] ) ) {
+ po = { top: 0, left: 0 };
+ }
+
+ return {
+ top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ),
+ left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 )
+ };
+
+ },
+
+ _getRelativeOffset: function() {
+ if ( this.cssPosition !== "relative" ) {
+ return { top: 0, left: 0 };
+ }
+
+ var p = this.element.position(),
+ scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );
+
+ return {
+ top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) +
+ ( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ),
+ left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) +
+ ( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 )
+ };
+
+ },
+
+ _cacheMargins: function() {
+ this.margins = {
+ left: ( parseInt( this.element.css( "marginLeft" ), 10 ) || 0 ),
+ top: ( parseInt( this.element.css( "marginTop" ), 10 ) || 0 ),
+ right: ( parseInt( this.element.css( "marginRight" ), 10 ) || 0 ),
+ bottom: ( parseInt( this.element.css( "marginBottom" ), 10 ) || 0 )
+ };
+ },
+
+ _cacheHelperProportions: function() {
+ this.helperProportions = {
+ width: this.helper.outerWidth(),
+ height: this.helper.outerHeight()
+ };
+ },
+
+ _setContainment: function() {
+
+ var isUserScrollable, c, ce,
+ o = this.options,
+ document = this.document[ 0 ];
+
+ this.relativeContainer = null;
+
+ if ( !o.containment ) {
+ this.containment = null;
+ return;
+ }
+
+ if ( o.containment === "window" ) {
+ this.containment = [
+ $( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
+ $( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,
+ $( window ).scrollLeft() + $( window ).width() -
+ this.helperProportions.width - this.margins.left,
+ $( window ).scrollTop() +
+ ( $( window ).height() || document.body.parentNode.scrollHeight ) -
+ this.helperProportions.height - this.margins.top
+ ];
+ return;
+ }
+
+ if ( o.containment === "document" ) {
+ this.containment = [
+ 0,
+ 0,
+ $( document ).width() - this.helperProportions.width - this.margins.left,
+ ( $( document ).height() || document.body.parentNode.scrollHeight ) -
+ this.helperProportions.height - this.margins.top
+ ];
+ return;
+ }
+
+ if ( o.containment.constructor === Array ) {
+ this.containment = o.containment;
+ return;
+ }
+
+ if ( o.containment === "parent" ) {
+ o.containment = this.helper[ 0 ].parentNode;
+ }
+
+ c = $( o.containment );
+ ce = c[ 0 ];
+
+ if ( !ce ) {
+ return;
+ }
+
+ isUserScrollable = /(scroll|auto)/.test( c.css( "overflow" ) );
+
+ this.containment = [
+ ( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) +
+ ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ),
+ ( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) +
+ ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ),
+ ( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -
+ ( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) -
+ ( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) -
+ this.helperProportions.width -
+ this.margins.left -
+ this.margins.right,
+ ( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -
+ ( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) -
+ ( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) -
+ this.helperProportions.height -
+ this.margins.top -
+ this.margins.bottom
+ ];
+ this.relativeContainer = c;
+ },
+
+ _convertPositionTo: function( d, pos ) {
+
+ if ( !pos ) {
+ pos = this.position;
+ }
+
+ var mod = d === "absolute" ? 1 : -1,
+ scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );
+
+ return {
+ top: (
+
+ // The absolute mouse position
+ pos.top +
+
+ // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.relative.top * mod +
+
+ // The offsetParent's offset without borders (offset + border)
+ this.offset.parent.top * mod -
+ ( ( this.cssPosition === "fixed" ?
+ -this.offset.scroll.top :
+ ( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod )
+ ),
+ left: (
+
+ // The absolute mouse position
+ pos.left +
+
+ // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.relative.left * mod +
+
+ // The offsetParent's offset without borders (offset + border)
+ this.offset.parent.left * mod -
+ ( ( this.cssPosition === "fixed" ?
+ -this.offset.scroll.left :
+ ( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod )
+ )
+ };
+
+ },
+
+ _generatePosition: function( event, constrainPosition ) {
+
+ var containment, co, top, left,
+ o = this.options,
+ scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ),
+ pageX = event.pageX,
+ pageY = event.pageY;
+
+ // Cache the scroll
+ if ( !scrollIsRootNode || !this.offset.scroll ) {
+ this.offset.scroll = {
+ top: this.scrollParent.scrollTop(),
+ left: this.scrollParent.scrollLeft()
+ };
+ }
+
+ /*
+ * - Position constraining -
+ * Constrain the position to a mix of grid, containment.
+ */
+
+ // If we are not dragging yet, we won't check for options
+ if ( constrainPosition ) {
+ if ( this.containment ) {
+ if ( this.relativeContainer ) {
+ co = this.relativeContainer.offset();
+ containment = [
+ this.containment[ 0 ] + co.left,
+ this.containment[ 1 ] + co.top,
+ this.containment[ 2 ] + co.left,
+ this.containment[ 3 ] + co.top
+ ];
+ } else {
+ containment = this.containment;
+ }
+
+ if ( event.pageX - this.offset.click.left < containment[ 0 ] ) {
+ pageX = containment[ 0 ] + this.offset.click.left;
+ }
+ if ( event.pageY - this.offset.click.top < containment[ 1 ] ) {
+ pageY = containment[ 1 ] + this.offset.click.top;
+ }
+ if ( event.pageX - this.offset.click.left > containment[ 2 ] ) {
+ pageX = containment[ 2 ] + this.offset.click.left;
+ }
+ if ( event.pageY - this.offset.click.top > containment[ 3 ] ) {
+ pageY = containment[ 3 ] + this.offset.click.top;
+ }
+ }
+
+ if ( o.grid ) {
+
+ //Check for grid elements set to 0 to prevent divide by 0 error causing invalid
+ // argument errors in IE (see ticket #6950)
+ top = o.grid[ 1 ] ? this.originalPageY + Math.round( ( pageY -
+ this.originalPageY ) / o.grid[ 1 ] ) * o.grid[ 1 ] : this.originalPageY;
+ pageY = containment ? ( ( top - this.offset.click.top >= containment[ 1 ] ||
+ top - this.offset.click.top > containment[ 3 ] ) ?
+ top :
+ ( ( top - this.offset.click.top >= containment[ 1 ] ) ?
+ top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) : top;
+
+ left = o.grid[ 0 ] ? this.originalPageX +
+ Math.round( ( pageX - this.originalPageX ) / o.grid[ 0 ] ) * o.grid[ 0 ] :
+ this.originalPageX;
+ pageX = containment ? ( ( left - this.offset.click.left >= containment[ 0 ] ||
+ left - this.offset.click.left > containment[ 2 ] ) ?
+ left :
+ ( ( left - this.offset.click.left >= containment[ 0 ] ) ?
+ left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) : left;
+ }
+
+ if ( o.axis === "y" ) {
+ pageX = this.originalPageX;
+ }
+
+ if ( o.axis === "x" ) {
+ pageY = this.originalPageY;
+ }
+ }
+
+ return {
+ top: (
+
+ // The absolute mouse position
+ pageY -
+
+ // Click offset (relative to the element)
+ this.offset.click.top -
+
+ // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.relative.top -
+
+ // The offsetParent's offset without borders (offset + border)
+ this.offset.parent.top +
+ ( this.cssPosition === "fixed" ?
+ -this.offset.scroll.top :
+ ( scrollIsRootNode ? 0 : this.offset.scroll.top ) )
+ ),
+ left: (
+
+ // The absolute mouse position
+ pageX -
+
+ // Click offset (relative to the element)
+ this.offset.click.left -
+
+ // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.relative.left -
+
+ // The offsetParent's offset without borders (offset + border)
+ this.offset.parent.left +
+ ( this.cssPosition === "fixed" ?
+ -this.offset.scroll.left :
+ ( scrollIsRootNode ? 0 : this.offset.scroll.left ) )
+ )
+ };
+
+ },
+
+ _clear: function() {
+ this._removeClass( this.helper, "ui-draggable-dragging" );
+ if ( this.helper[ 0 ] !== this.element[ 0 ] && !this.cancelHelperRemoval ) {
+ this.helper.remove();
+ }
+ this.helper = null;
+ this.cancelHelperRemoval = false;
+ if ( this.destroyOnClear ) {
+ this.destroy();
+ }
+ },
+
+ // From now on bulk stuff - mainly helpers
+
+ _trigger: function( type, event, ui ) {
+ ui = ui || this._uiHash();
+ $.ui.plugin.call( this, type, [ event, ui, this ], true );
+
+ // Absolute position and offset (see #6884 ) have to be recalculated after plugins
+ if ( /^(drag|start|stop)/.test( type ) ) {
+ this.positionAbs = this._convertPositionTo( "absolute" );
+ ui.offset = this.positionAbs;
+ }
+ return $.Widget.prototype._trigger.call( this, type, event, ui );
+ },
+
+ plugins: {},
+
+ _uiHash: function() {
+ return {
+ helper: this.helper,
+ position: this.position,
+ originalPosition: this.originalPosition,
+ offset: this.positionAbs
+ };
+ }
+
+} );
+
+$.ui.plugin.add( "draggable", "connectToSortable", {
+ start: function( event, ui, draggable ) {
+ var uiSortable = $.extend( {}, ui, {
+ item: draggable.element
+ } );
+
+ draggable.sortables = [];
+ $( draggable.options.connectToSortable ).each( function() {
+ var sortable = $( this ).sortable( "instance" );
+
+ if ( sortable && !sortable.options.disabled ) {
+ draggable.sortables.push( sortable );
+
+ // RefreshPositions is called at drag start to refresh the containerCache
+ // which is used in drag. This ensures it's initialized and synchronized
+ // with any changes that might have happened on the page since initialization.
+ sortable.refreshPositions();
+ sortable._trigger( "activate", event, uiSortable );
+ }
+ } );
+ },
+ stop: function( event, ui, draggable ) {
+ var uiSortable = $.extend( {}, ui, {
+ item: draggable.element
+ } );
+
+ draggable.cancelHelperRemoval = false;
+
+ $.each( draggable.sortables, function() {
+ var sortable = this;
+
+ if ( sortable.isOver ) {
+ sortable.isOver = 0;
+
+ // Allow this sortable to handle removing the helper
+ draggable.cancelHelperRemoval = true;
+ sortable.cancelHelperRemoval = false;
+
+ // Use _storedCSS To restore properties in the sortable,
+ // as this also handles revert (#9675) since the draggable
+ // may have modified them in unexpected ways (#8809)
+ sortable._storedCSS = {
+ position: sortable.placeholder.css( "position" ),
+ top: sortable.placeholder.css( "top" ),
+ left: sortable.placeholder.css( "left" )
+ };
+
+ sortable._mouseStop( event );
+
+ // Once drag has ended, the sortable should return to using
+ // its original helper, not the shared helper from draggable
+ sortable.options.helper = sortable.options._helper;
+ } else {
+
+ // Prevent this Sortable from removing the helper.
+ // However, don't set the draggable to remove the helper
+ // either as another connected Sortable may yet handle the removal.
+ sortable.cancelHelperRemoval = true;
+
+ sortable._trigger( "deactivate", event, uiSortable );
+ }
+ } );
+ },
+ drag: function( event, ui, draggable ) {
+ $.each( draggable.sortables, function() {
+ var innermostIntersecting = false,
+ sortable = this;
+
+ // Copy over variables that sortable's _intersectsWith uses
+ sortable.positionAbs = draggable.positionAbs;
+ sortable.helperProportions = draggable.helperProportions;
+ sortable.offset.click = draggable.offset.click;
+
+ if ( sortable._intersectsWith( sortable.containerCache ) ) {
+ innermostIntersecting = true;
+
+ $.each( draggable.sortables, function() {
+
+ // Copy over variables that sortable's _intersectsWith uses
+ this.positionAbs = draggable.positionAbs;
+ this.helperProportions = draggable.helperProportions;
+ this.offset.click = draggable.offset.click;
+
+ if ( this !== sortable &&
+ this._intersectsWith( this.containerCache ) &&
+ $.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) {
+ innermostIntersecting = false;
+ }
+
+ return innermostIntersecting;
+ } );
+ }
+
+ if ( innermostIntersecting ) {
+
+ // If it intersects, we use a little isOver variable and set it once,
+ // so that the move-in stuff gets fired only once.
+ if ( !sortable.isOver ) {
+ sortable.isOver = 1;
+
+ // Store draggable's parent in case we need to reappend to it later.
+ draggable._parent = ui.helper.parent();
+
+ sortable.currentItem = ui.helper
+ .appendTo( sortable.element )
+ .data( "ui-sortable-item", true );
+
+ // Store helper option to later restore it
+ sortable.options._helper = sortable.options.helper;
+
+ sortable.options.helper = function() {
+ return ui.helper[ 0 ];
+ };
+
+ // Fire the start events of the sortable with our passed browser event,
+ // and our own helper (so it doesn't create a new one)
+ event.target = sortable.currentItem[ 0 ];
+ sortable._mouseCapture( event, true );
+ sortable._mouseStart( event, true, true );
+
+ // Because the browser event is way off the new appended portlet,
+ // modify necessary variables to reflect the changes
+ sortable.offset.click.top = draggable.offset.click.top;
+ sortable.offset.click.left = draggable.offset.click.left;
+ sortable.offset.parent.left -= draggable.offset.parent.left -
+ sortable.offset.parent.left;
+ sortable.offset.parent.top -= draggable.offset.parent.top -
+ sortable.offset.parent.top;
+
+ draggable._trigger( "toSortable", event );
+
+ // Inform draggable that the helper is in a valid drop zone,
+ // used solely in the revert option to handle "valid/invalid".
+ draggable.dropped = sortable.element;
+
+ // Need to refreshPositions of all sortables in the case that
+ // adding to one sortable changes the location of the other sortables (#9675)
+ $.each( draggable.sortables, function() {
+ this.refreshPositions();
+ } );
+
+ // Hack so receive/update callbacks work (mostly)
+ draggable.currentItem = draggable.element;
+ sortable.fromOutside = draggable;
+ }
+
+ if ( sortable.currentItem ) {
+ sortable._mouseDrag( event );
+
+ // Copy the sortable's position because the draggable's can potentially reflect
+ // a relative position, while sortable is always absolute, which the dragged
+ // element has now become. (#8809)
+ ui.position = sortable.position;
+ }
+ } else {
+
+ // If it doesn't intersect with the sortable, and it intersected before,
+ // we fake the drag stop of the sortable, but make sure it doesn't remove
+ // the helper by using cancelHelperRemoval.
+ if ( sortable.isOver ) {
+
+ sortable.isOver = 0;
+ sortable.cancelHelperRemoval = true;
+
+ // Calling sortable's mouseStop would trigger a revert,
+ // so revert must be temporarily false until after mouseStop is called.
+ sortable.options._revert = sortable.options.revert;
+ sortable.options.revert = false;
+
+ sortable._trigger( "out", event, sortable._uiHash( sortable ) );
+ sortable._mouseStop( event, true );
+
+ // Restore sortable behaviors that were modfied
+ // when the draggable entered the sortable area (#9481)
+ sortable.options.revert = sortable.options._revert;
+ sortable.options.helper = sortable.options._helper;
+
+ if ( sortable.placeholder ) {
+ sortable.placeholder.remove();
+ }
+
+ // Restore and recalculate the draggable's offset considering the sortable
+ // may have modified them in unexpected ways. (#8809, #10669)
+ ui.helper.appendTo( draggable._parent );
+ draggable._refreshOffsets( event );
+ ui.position = draggable._generatePosition( event, true );
+
+ draggable._trigger( "fromSortable", event );
+
+ // Inform draggable that the helper is no longer in a valid drop zone
+ draggable.dropped = false;
+
+ // Need to refreshPositions of all sortables just in case removing
+ // from one sortable changes the location of other sortables (#9675)
+ $.each( draggable.sortables, function() {
+ this.refreshPositions();
+ } );
+ }
+ }
+ } );
+ }
+} );
+
+$.ui.plugin.add( "draggable", "cursor", {
+ start: function( event, ui, instance ) {
+ var t = $( "body" ),
+ o = instance.options;
+
+ if ( t.css( "cursor" ) ) {
+ o._cursor = t.css( "cursor" );
+ }
+ t.css( "cursor", o.cursor );
+ },
+ stop: function( event, ui, instance ) {
+ var o = instance.options;
+ if ( o._cursor ) {
+ $( "body" ).css( "cursor", o._cursor );
+ }
+ }
+} );
+
+$.ui.plugin.add( "draggable", "opacity", {
+ start: function( event, ui, instance ) {
+ var t = $( ui.helper ),
+ o = instance.options;
+ if ( t.css( "opacity" ) ) {
+ o._opacity = t.css( "opacity" );
+ }
+ t.css( "opacity", o.opacity );
+ },
+ stop: function( event, ui, instance ) {
+ var o = instance.options;
+ if ( o._opacity ) {
+ $( ui.helper ).css( "opacity", o._opacity );
+ }
+ }
+} );
+
+$.ui.plugin.add( "draggable", "scroll", {
+ start: function( event, ui, i ) {
+ if ( !i.scrollParentNotHidden ) {
+ i.scrollParentNotHidden = i.helper.scrollParent( false );
+ }
+
+ if ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] &&
+ i.scrollParentNotHidden[ 0 ].tagName !== "HTML" ) {
+ i.overflowOffset = i.scrollParentNotHidden.offset();
+ }
+ },
+ drag: function( event, ui, i ) {
+
+ var o = i.options,
+ scrolled = false,
+ scrollParent = i.scrollParentNotHidden[ 0 ],
+ document = i.document[ 0 ];
+
+ if ( scrollParent !== document && scrollParent.tagName !== "HTML" ) {
+ if ( !o.axis || o.axis !== "x" ) {
+ if ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY <
+ o.scrollSensitivity ) {
+ scrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed;
+ } else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) {
+ scrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed;
+ }
+ }
+
+ if ( !o.axis || o.axis !== "y" ) {
+ if ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX <
+ o.scrollSensitivity ) {
+ scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed;
+ } else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) {
+ scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed;
+ }
+ }
+
+ } else {
+
+ if ( !o.axis || o.axis !== "x" ) {
+ if ( event.pageY - $( document ).scrollTop() < o.scrollSensitivity ) {
+ scrolled = $( document ).scrollTop( $( document ).scrollTop() - o.scrollSpeed );
+ } else if ( $( window ).height() - ( event.pageY - $( document ).scrollTop() ) <
+ o.scrollSensitivity ) {
+ scrolled = $( document ).scrollTop( $( document ).scrollTop() + o.scrollSpeed );
+ }
+ }
+
+ if ( !o.axis || o.axis !== "y" ) {
+ if ( event.pageX - $( document ).scrollLeft() < o.scrollSensitivity ) {
+ scrolled = $( document ).scrollLeft(
+ $( document ).scrollLeft() - o.scrollSpeed
+ );
+ } else if ( $( window ).width() - ( event.pageX - $( document ).scrollLeft() ) <
+ o.scrollSensitivity ) {
+ scrolled = $( document ).scrollLeft(
+ $( document ).scrollLeft() + o.scrollSpeed
+ );
+ }
+ }
+
+ }
+
+ if ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) {
+ $.ui.ddmanager.prepareOffsets( i, event );
+ }
+
+ }
+} );
+
+$.ui.plugin.add( "draggable", "snap", {
+ start: function( event, ui, i ) {
+
+ var o = i.options;
+
+ i.snapElements = [];
+
+ $( o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap )
+ .each( function() {
+ var $t = $( this ),
+ $o = $t.offset();
+ if ( this !== i.element[ 0 ] ) {
+ i.snapElements.push( {
+ item: this,
+ width: $t.outerWidth(), height: $t.outerHeight(),
+ top: $o.top, left: $o.left
+ } );
+ }
+ } );
+
+ },
+ drag: function( event, ui, inst ) {
+
+ var ts, bs, ls, rs, l, r, t, b, i, first,
+ o = inst.options,
+ d = o.snapTolerance,
+ x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
+ y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
+
+ for ( i = inst.snapElements.length - 1; i >= 0; i-- ) {
+
+ l = inst.snapElements[ i ].left - inst.margins.left;
+ r = l + inst.snapElements[ i ].width;
+ t = inst.snapElements[ i ].top - inst.margins.top;
+ b = t + inst.snapElements[ i ].height;
+
+ if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d ||
+ !$.contains( inst.snapElements[ i ].item.ownerDocument,
+ inst.snapElements[ i ].item ) ) {
+ if ( inst.snapElements[ i ].snapping ) {
+ ( inst.options.snap.release &&
+ inst.options.snap.release.call(
+ inst.element,
+ event,
+ $.extend( inst._uiHash(), { snapItem: inst.snapElements[ i ].item } )
+ ) );
+ }
+ inst.snapElements[ i ].snapping = false;
+ continue;
+ }
+
+ if ( o.snapMode !== "inner" ) {
+ ts = Math.abs( t - y2 ) <= d;
+ bs = Math.abs( b - y1 ) <= d;
+ ls = Math.abs( l - x2 ) <= d;
+ rs = Math.abs( r - x1 ) <= d;
+ if ( ts ) {
+ ui.position.top = inst._convertPositionTo( "relative", {
+ top: t - inst.helperProportions.height,
+ left: 0
+ } ).top;
+ }
+ if ( bs ) {
+ ui.position.top = inst._convertPositionTo( "relative", {
+ top: b,
+ left: 0
+ } ).top;
+ }
+ if ( ls ) {
+ ui.position.left = inst._convertPositionTo( "relative", {
+ top: 0,
+ left: l - inst.helperProportions.width
+ } ).left;
+ }
+ if ( rs ) {
+ ui.position.left = inst._convertPositionTo( "relative", {
+ top: 0,
+ left: r
+ } ).left;
+ }
+ }
+
+ first = ( ts || bs || ls || rs );
+
+ if ( o.snapMode !== "outer" ) {
+ ts = Math.abs( t - y1 ) <= d;
+ bs = Math.abs( b - y2 ) <= d;
+ ls = Math.abs( l - x1 ) <= d;
+ rs = Math.abs( r - x2 ) <= d;
+ if ( ts ) {
+ ui.position.top = inst._convertPositionTo( "relative", {
+ top: t,
+ left: 0
+ } ).top;
+ }
+ if ( bs ) {
+ ui.position.top = inst._convertPositionTo( "relative", {
+ top: b - inst.helperProportions.height,
+ left: 0
+ } ).top;
+ }
+ if ( ls ) {
+ ui.position.left = inst._convertPositionTo( "relative", {
+ top: 0,
+ left: l
+ } ).left;
+ }
+ if ( rs ) {
+ ui.position.left = inst._convertPositionTo( "relative", {
+ top: 0,
+ left: r - inst.helperProportions.width
+ } ).left;
+ }
+ }
+
+ if ( !inst.snapElements[ i ].snapping && ( ts || bs || ls || rs || first ) ) {
+ ( inst.options.snap.snap &&
+ inst.options.snap.snap.call(
+ inst.element,
+ event,
+ $.extend( inst._uiHash(), {
+ snapItem: inst.snapElements[ i ].item
+ } ) ) );
+ }
+ inst.snapElements[ i ].snapping = ( ts || bs || ls || rs || first );
+
+ }
+
+ }
+} );
+
+$.ui.plugin.add( "draggable", "stack", {
+ start: function( event, ui, instance ) {
+ var min,
+ o = instance.options,
+ group = $.makeArray( $( o.stack ) ).sort( function( a, b ) {
+ return ( parseInt( $( a ).css( "zIndex" ), 10 ) || 0 ) -
+ ( parseInt( $( b ).css( "zIndex" ), 10 ) || 0 );
+ } );
+
+ if ( !group.length ) { return; }
+
+ min = parseInt( $( group[ 0 ] ).css( "zIndex" ), 10 ) || 0;
+ $( group ).each( function( i ) {
+ $( this ).css( "zIndex", min + i );
+ } );
+ this.css( "zIndex", ( min + group.length ) );
+ }
+} );
+
+$.ui.plugin.add( "draggable", "zIndex", {
+ start: function( event, ui, instance ) {
+ var t = $( ui.helper ),
+ o = instance.options;
+
+ if ( t.css( "zIndex" ) ) {
+ o._zIndex = t.css( "zIndex" );
+ }
+ t.css( "zIndex", o.zIndex );
+ },
+ stop: function( event, ui, instance ) {
+ var o = instance.options;
+
+ if ( o._zIndex ) {
+ $( ui.helper ).css( "zIndex", o._zIndex );
+ }
+ }
+} );
+
+var widgetsDraggable = $.ui.draggable;
+
+
+/*!
+ * jQuery UI Resizable 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Resizable
+//>>group: Interactions
+//>>description: Enables resize functionality for any element.
+//>>docs: http://api.jqueryui.com/resizable/
+//>>demos: http://jqueryui.com/resizable/
+//>>css.structure: ../../themes/base/core.css
+//>>css.structure: ../../themes/base/resizable.css
+//>>css.theme: ../../themes/base/theme.css
+
+
+
+$.widget( "ui.resizable", $.ui.mouse, {
+ version: "1.12.1",
+ widgetEventPrefix: "resize",
+ options: {
+ alsoResize: false,
+ animate: false,
+ animateDuration: "slow",
+ animateEasing: "swing",
+ aspectRatio: false,
+ autoHide: false,
+ classes: {
+ "ui-resizable-se": "ui-icon ui-icon-gripsmall-diagonal-se"
+ },
+ containment: false,
+ ghost: false,
+ grid: false,
+ handles: "e,s,se",
+ helper: false,
+ maxHeight: null,
+ maxWidth: null,
+ minHeight: 10,
+ minWidth: 10,
+
+ // See #7960
+ zIndex: 90,
+
+ // Callbacks
+ resize: null,
+ start: null,
+ stop: null
+ },
+
+ _num: function( value ) {
+ return parseFloat( value ) || 0;
+ },
+
+ _isNumber: function( value ) {
+ return !isNaN( parseFloat( value ) );
+ },
+
+ _hasScroll: function( el, a ) {
+
+ if ( $( el ).css( "overflow" ) === "hidden" ) {
+ return false;
+ }
+
+ var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
+ has = false;
+
+ if ( el[ scroll ] > 0 ) {
+ return true;
+ }
+
+ // TODO: determine which cases actually cause this to happen
+ // if the element doesn't have the scroll set, see if it's possible to
+ // set the scroll
+ el[ scroll ] = 1;
+ has = ( el[ scroll ] > 0 );
+ el[ scroll ] = 0;
+ return has;
+ },
+
+ _create: function() {
+
+ var margins,
+ o = this.options,
+ that = this;
+ this._addClass( "ui-resizable" );
+
+ $.extend( this, {
+ _aspectRatio: !!( o.aspectRatio ),
+ aspectRatio: o.aspectRatio,
+ originalElement: this.element,
+ _proportionallyResizeElements: [],
+ _helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null
+ } );
+
+ // Wrap the element if it cannot hold child nodes
+ if ( this.element[ 0 ].nodeName.match( /^(canvas|textarea|input|select|button|img)$/i ) ) {
+
+ this.element.wrap(
+ $( "<div class='ui-wrapper' style='overflow: hidden;'></div>" ).css( {
+ position: this.element.css( "position" ),
+ width: this.element.outerWidth(),
+ height: this.element.outerHeight(),
+ top: this.element.css( "top" ),
+ left: this.element.css( "left" )
+ } )
+ );
+
+ this.element = this.element.parent().data(
+ "ui-resizable", this.element.resizable( "instance" )
+ );
+
+ this.elementIsWrapper = true;
+
+ margins = {
+ marginTop: this.originalElement.css( "marginTop" ),
+ marginRight: this.originalElement.css( "marginRight" ),
+ marginBottom: this.originalElement.css( "marginBottom" ),
+ marginLeft: this.originalElement.css( "marginLeft" )
+ };
+
+ this.element.css( margins );
+ this.originalElement.css( "margin", 0 );
+
+ // support: Safari
+ // Prevent Safari textarea resize
+ this.originalResizeStyle = this.originalElement.css( "resize" );
+ this.originalElement.css( "resize", "none" );
+
+ this._proportionallyResizeElements.push( this.originalElement.css( {
+ position: "static",
+ zoom: 1,
+ display: "block"
+ } ) );
+
+ // Support: IE9
+ // avoid IE jump (hard set the margin)
+ this.originalElement.css( margins );
+
+ this._proportionallyResize();
+ }
+
+ this._setupHandles();
+
+ if ( o.autoHide ) {
+ $( this.element )
+ .on( "mouseenter", function() {
+ if ( o.disabled ) {
+ return;
+ }
+ that._removeClass( "ui-resizable-autohide" );
+ that._handles.show();
+ } )
+ .on( "mouseleave", function() {
+ if ( o.disabled ) {
+ return;
+ }
+ if ( !that.resizing ) {
+ that._addClass( "ui-resizable-autohide" );
+ that._handles.hide();
+ }
+ } );
+ }
+
+ this._mouseInit();
+ },
+
+ _destroy: function() {
+
+ this._mouseDestroy();
+
+ var wrapper,
+ _destroy = function( exp ) {
+ $( exp )
+ .removeData( "resizable" )
+ .removeData( "ui-resizable" )
+ .off( ".resizable" )
+ .find( ".ui-resizable-handle" )
+ .remove();
+ };
+
+ // TODO: Unwrap at same DOM position
+ if ( this.elementIsWrapper ) {
+ _destroy( this.element );
+ wrapper = this.element;
+ this.originalElement.css( {
+ position: wrapper.css( "position" ),
+ width: wrapper.outerWidth(),
+ height: wrapper.outerHeight(),
+ top: wrapper.css( "top" ),
+ left: wrapper.css( "left" )
+ } ).insertAfter( wrapper );
+ wrapper.remove();
+ }
+
+ this.originalElement.css( "resize", this.originalResizeStyle );
+ _destroy( this.originalElement );
+
+ return this;
+ },
+
+ _setOption: function( key, value ) {
+ this._super( key, value );
+
+ switch ( key ) {
+ case "handles":
+ this._removeHandles();
+ this._setupHandles();
+ break;
+ default:
+ break;
+ }
+ },
+
+ _setupHandles: function() {
+ var o = this.options, handle, i, n, hname, axis, that = this;
+ this.handles = o.handles ||
+ ( !$( ".ui-resizable-handle", this.element ).length ?
+ "e,s,se" : {
+ n: ".ui-resizable-n",
+ e: ".ui-resizable-e",
+ s: ".ui-resizable-s",
+ w: ".ui-resizable-w",
+ se: ".ui-resizable-se",
+ sw: ".ui-resizable-sw",
+ ne: ".ui-resizable-ne",
+ nw: ".ui-resizable-nw"
+ } );
+
+ this._handles = $();
+ if ( this.handles.constructor === String ) {
+
+ if ( this.handles === "all" ) {
+ this.handles = "n,e,s,w,se,sw,ne,nw";
+ }
+
+ n = this.handles.split( "," );
+ this.handles = {};
+
+ for ( i = 0; i < n.length; i++ ) {
+
+ handle = $.trim( n[ i ] );
+ hname = "ui-resizable-" + handle;
+ axis = $( "<div>" );
+ this._addClass( axis, "ui-resizable-handle " + hname );
+
+ axis.css( { zIndex: o.zIndex } );
+
+ this.handles[ handle ] = ".ui-resizable-" + handle;
+ this.element.append( axis );
+ }
+
+ }
+
+ this._renderAxis = function( target ) {
+
+ var i, axis, padPos, padWrapper;
+
+ target = target || this.element;
+
+ for ( i in this.handles ) {
+
+ if ( this.handles[ i ].constructor === String ) {
+ this.handles[ i ] = this.element.children( this.handles[ i ] ).first().show();
+ } else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) {
+ this.handles[ i ] = $( this.handles[ i ] );
+ this._on( this.handles[ i ], { "mousedown": that._mouseDown } );
+ }
+
+ if ( this.elementIsWrapper &&
+ this.originalElement[ 0 ]
+ .nodeName
+ .match( /^(textarea|input|select|button)$/i ) ) {
+ axis = $( this.handles[ i ], this.element );
+
+ padWrapper = /sw|ne|nw|se|n|s/.test( i ) ?
+ axis.outerHeight() :
+ axis.outerWidth();
+
+ padPos = [ "padding",
+ /ne|nw|n/.test( i ) ? "Top" :
+ /se|sw|s/.test( i ) ? "Bottom" :
+ /^e$/.test( i ) ? "Right" : "Left" ].join( "" );
+
+ target.css( padPos, padWrapper );
+
+ this._proportionallyResize();
+ }
+
+ this._handles = this._handles.add( this.handles[ i ] );
+ }
+ };
+
+ // TODO: make renderAxis a prototype function
+ this._renderAxis( this.element );
+
+ this._handles = this._handles.add( this.element.find( ".ui-resizable-handle" ) );
+ this._handles.disableSelection();
+
+ this._handles.on( "mouseover", function() {
+ if ( !that.resizing ) {
+ if ( this.className ) {
+ axis = this.className.match( /ui-resizable-(se|sw|ne|nw|n|e|s|w)/i );
+ }
+ that.axis = axis && axis[ 1 ] ? axis[ 1 ] : "se";
+ }
+ } );
+
+ if ( o.autoHide ) {
+ this._handles.hide();
+ this._addClass( "ui-resizable-autohide" );
+ }
+ },
+
+ _removeHandles: function() {
+ this._handles.remove();
+ },
+
+ _mouseCapture: function( event ) {
+ var i, handle,
+ capture = false;
+
+ for ( i in this.handles ) {
+ handle = $( this.handles[ i ] )[ 0 ];
+ if ( handle === event.target || $.contains( handle, event.target ) ) {
+ capture = true;
+ }
+ }
+
+ return !this.options.disabled && capture;
+ },
+
+ _mouseStart: function( event ) {
+
+ var curleft, curtop, cursor,
+ o = this.options,
+ el = this.element;
+
+ this.resizing = true;
+
+ this._renderProxy();
+
+ curleft = this._num( this.helper.css( "left" ) );
+ curtop = this._num( this.helper.css( "top" ) );
+
+ if ( o.containment ) {
+ curleft += $( o.containment ).scrollLeft() || 0;
+ curtop += $( o.containment ).scrollTop() || 0;
+ }
+
+ this.offset = this.helper.offset();
+ this.position = { left: curleft, top: curtop };
+
+ this.size = this._helper ? {
+ width: this.helper.width(),
+ height: this.helper.height()
+ } : {
+ width: el.width(),
+ height: el.height()
+ };
+
+ this.originalSize = this._helper ? {
+ width: el.outerWidth(),
+ height: el.outerHeight()
+ } : {
+ width: el.width(),
+ height: el.height()
+ };
+
+ this.sizeDiff = {
+ width: el.outerWidth() - el.width(),
+ height: el.outerHeight() - el.height()
+ };
+
+ this.originalPosition = { left: curleft, top: curtop };
+ this.originalMousePosition = { left: event.pageX, top: event.pageY };
+
+ this.aspectRatio = ( typeof o.aspectRatio === "number" ) ?
+ o.aspectRatio :
+ ( ( this.originalSize.width / this.originalSize.height ) || 1 );
+
+ cursor = $( ".ui-resizable-" + this.axis ).css( "cursor" );
+ $( "body" ).css( "cursor", cursor === "auto" ? this.axis + "-resize" : cursor );
+
+ this._addClass( "ui-resizable-resizing" );
+ this._propagate( "start", event );
+ return true;
+ },
+
+ _mouseDrag: function( event ) {
+
+ var data, props,
+ smp = this.originalMousePosition,
+ a = this.axis,
+ dx = ( event.pageX - smp.left ) || 0,
+ dy = ( event.pageY - smp.top ) || 0,
+ trigger = this._change[ a ];
+
+ this._updatePrevProperties();
+
+ if ( !trigger ) {
+ return false;
+ }
+
+ data = trigger.apply( this, [ event, dx, dy ] );
+
+ this._updateVirtualBoundaries( event.shiftKey );
+ if ( this._aspectRatio || event.shiftKey ) {
+ data = this._updateRatio( data, event );
+ }
+
+ data = this._respectSize( data, event );
+
+ this._updateCache( data );
+
+ this._propagate( "resize", event );
+
+ props = this._applyChanges();
+
+ if ( !this._helper && this._proportionallyResizeElements.length ) {
+ this._proportionallyResize();
+ }
+
+ if ( !$.isEmptyObject( props ) ) {
+ this._updatePrevProperties();
+ this._trigger( "resize", event, this.ui() );
+ this._applyChanges();
+ }
+
+ return false;
+ },
+
+ _mouseStop: function( event ) {
+
+ this.resizing = false;
+ var pr, ista, soffseth, soffsetw, s, left, top,
+ o = this.options, that = this;
+
+ if ( this._helper ) {
+
+ pr = this._proportionallyResizeElements;
+ ista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName );
+ soffseth = ista && this._hasScroll( pr[ 0 ], "left" ) ? 0 : that.sizeDiff.height;
+ soffsetw = ista ? 0 : that.sizeDiff.width;
+
+ s = {
+ width: ( that.helper.width() - soffsetw ),
+ height: ( that.helper.height() - soffseth )
+ };
+ left = ( parseFloat( that.element.css( "left" ) ) +
+ ( that.position.left - that.originalPosition.left ) ) || null;
+ top = ( parseFloat( that.element.css( "top" ) ) +
+ ( that.position.top - that.originalPosition.top ) ) || null;
+
+ if ( !o.animate ) {
+ this.element.css( $.extend( s, { top: top, left: left } ) );
+ }
+
+ that.helper.height( that.size.height );
+ that.helper.width( that.size.width );
+
+ if ( this._helper && !o.animate ) {
+ this._proportionallyResize();
+ }
+ }
+
+ $( "body" ).css( "cursor", "auto" );
+
+ this._removeClass( "ui-resizable-resizing" );
+
+ this._propagate( "stop", event );
+
+ if ( this._helper ) {
+ this.helper.remove();
+ }
+
+ return false;
+
+ },
+
+ _updatePrevProperties: function() {
+ this.prevPosition = {
+ top: this.position.top,
+ left: this.position.left
+ };
+ this.prevSize = {
+ width: this.size.width,
+ height: this.size.height
+ };
+ },
+
+ _applyChanges: function() {
+ var props = {};
+
+ if ( this.position.top !== this.prevPosition.top ) {
+ props.top = this.position.top + "px";
+ }
+ if ( this.position.left !== this.prevPosition.left ) {
+ props.left = this.position.left + "px";
+ }
+ if ( this.size.width !== this.prevSize.width ) {
+ props.width = this.size.width + "px";
+ }
+ if ( this.size.height !== this.prevSize.height ) {
+ props.height = this.size.height + "px";
+ }
+
+ this.helper.css( props );
+
+ return props;
+ },
+
+ _updateVirtualBoundaries: function( forceAspectRatio ) {
+ var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
+ o = this.options;
+
+ b = {
+ minWidth: this._isNumber( o.minWidth ) ? o.minWidth : 0,
+ maxWidth: this._isNumber( o.maxWidth ) ? o.maxWidth : Infinity,
+ minHeight: this._isNumber( o.minHeight ) ? o.minHeight : 0,
+ maxHeight: this._isNumber( o.maxHeight ) ? o.maxHeight : Infinity
+ };
+
+ if ( this._aspectRatio || forceAspectRatio ) {
+ pMinWidth = b.minHeight * this.aspectRatio;
+ pMinHeight = b.minWidth / this.aspectRatio;
+ pMaxWidth = b.maxHeight * this.aspectRatio;
+ pMaxHeight = b.maxWidth / this.aspectRatio;
+
+ if ( pMinWidth > b.minWidth ) {
+ b.minWidth = pMinWidth;
+ }
+ if ( pMinHeight > b.minHeight ) {
+ b.minHeight = pMinHeight;
+ }
+ if ( pMaxWidth < b.maxWidth ) {
+ b.maxWidth = pMaxWidth;
+ }
+ if ( pMaxHeight < b.maxHeight ) {
+ b.maxHeight = pMaxHeight;
+ }
+ }
+ this._vBoundaries = b;
+ },
+
+ _updateCache: function( data ) {
+ this.offset = this.helper.offset();
+ if ( this._isNumber( data.left ) ) {
+ this.position.left = data.left;
+ }
+ if ( this._isNumber( data.top ) ) {
+ this.position.top = data.top;
+ }
+ if ( this._isNumber( data.height ) ) {
+ this.size.height = data.height;
+ }
+ if ( this._isNumber( data.width ) ) {
+ this.size.width = data.width;
+ }
+ },
+
+ _updateRatio: function( data ) {
+
+ var cpos = this.position,
+ csize = this.size,
+ a = this.axis;
+
+ if ( this._isNumber( data.height ) ) {
+ data.width = ( data.height * this.aspectRatio );
+ } else if ( this._isNumber( data.width ) ) {
+ data.height = ( data.width / this.aspectRatio );
+ }
+
+ if ( a === "sw" ) {
+ data.left = cpos.left + ( csize.width - data.width );
+ data.top = null;
+ }
+ if ( a === "nw" ) {
+ data.top = cpos.top + ( csize.height - data.height );
+ data.left = cpos.left + ( csize.width - data.width );
+ }
+
+ return data;
+ },
+
+ _respectSize: function( data ) {
+
+ var o = this._vBoundaries,
+ a = this.axis,
+ ismaxw = this._isNumber( data.width ) && o.maxWidth && ( o.maxWidth < data.width ),
+ ismaxh = this._isNumber( data.height ) && o.maxHeight && ( o.maxHeight < data.height ),
+ isminw = this._isNumber( data.width ) && o.minWidth && ( o.minWidth > data.width ),
+ isminh = this._isNumber( data.height ) && o.minHeight && ( o.minHeight > data.height ),
+ dw = this.originalPosition.left + this.originalSize.width,
+ dh = this.originalPosition.top + this.originalSize.height,
+ cw = /sw|nw|w/.test( a ), ch = /nw|ne|n/.test( a );
+ if ( isminw ) {
+ data.width = o.minWidth;
+ }
+ if ( isminh ) {
+ data.height = o.minHeight;
+ }
+ if ( ismaxw ) {
+ data.width = o.maxWidth;
+ }
+ if ( ismaxh ) {
+ data.height = o.maxHeight;
+ }
+
+ if ( isminw && cw ) {
+ data.left = dw - o.minWidth;
+ }
+ if ( ismaxw && cw ) {
+ data.left = dw - o.maxWidth;
+ }
+ if ( isminh && ch ) {
+ data.top = dh - o.minHeight;
+ }
+ if ( ismaxh && ch ) {
+ data.top = dh - o.maxHeight;
+ }
+
+ // Fixing jump error on top/left - bug #2330
+ if ( !data.width && !data.height && !data.left && data.top ) {
+ data.top = null;
+ } else if ( !data.width && !data.height && !data.top && data.left ) {
+ data.left = null;
+ }
+
+ return data;
+ },
+
+ _getPaddingPlusBorderDimensions: function( element ) {
+ var i = 0,
+ widths = [],
+ borders = [
+ element.css( "borderTopWidth" ),
+ element.css( "borderRightWidth" ),
+ element.css( "borderBottomWidth" ),
+ element.css( "borderLeftWidth" )
+ ],
+ paddings = [
+ element.css( "paddingTop" ),
+ element.css( "paddingRight" ),
+ element.css( "paddingBottom" ),
+ element.css( "paddingLeft" )
+ ];
+
+ for ( ; i < 4; i++ ) {
+ widths[ i ] = ( parseFloat( borders[ i ] ) || 0 );
+ widths[ i ] += ( parseFloat( paddings[ i ] ) || 0 );
+ }
+
+ return {
+ height: widths[ 0 ] + widths[ 2 ],
+ width: widths[ 1 ] + widths[ 3 ]
+ };
+ },
+
+ _proportionallyResize: function() {
+
+ if ( !this._proportionallyResizeElements.length ) {
+ return;
+ }
+
+ var prel,
+ i = 0,
+ element = this.helper || this.element;
+
+ for ( ; i < this._proportionallyResizeElements.length; i++ ) {
+
+ prel = this._proportionallyResizeElements[ i ];
+
+ // TODO: Seems like a bug to cache this.outerDimensions
+ // considering that we are in a loop.
+ if ( !this.outerDimensions ) {
+ this.outerDimensions = this._getPaddingPlusBorderDimensions( prel );
+ }
+
+ prel.css( {
+ height: ( element.height() - this.outerDimensions.height ) || 0,
+ width: ( element.width() - this.outerDimensions.width ) || 0
+ } );
+
+ }
+
+ },
+
+ _renderProxy: function() {
+
+ var el = this.element, o = this.options;
+ this.elementOffset = el.offset();
+
+ if ( this._helper ) {
+
+ this.helper = this.helper || $( "<div style='overflow:hidden;'></div>" );
+
+ this._addClass( this.helper, this._helper );
+ this.helper.css( {
+ width: this.element.outerWidth(),
+ height: this.element.outerHeight(),
+ position: "absolute",
+ left: this.elementOffset.left + "px",
+ top: this.elementOffset.top + "px",
+ zIndex: ++o.zIndex //TODO: Don't modify option
+ } );
+
+ this.helper
+ .appendTo( "body" )
+ .disableSelection();
+
+ } else {
+ this.helper = this.element;
+ }
+
+ },
+
+ _change: {
+ e: function( event, dx ) {
+ return { width: this.originalSize.width + dx };
+ },
+ w: function( event, dx ) {
+ var cs = this.originalSize, sp = this.originalPosition;
+ return { left: sp.left + dx, width: cs.width - dx };
+ },
+ n: function( event, dx, dy ) {
+ var cs = this.originalSize, sp = this.originalPosition;
+ return { top: sp.top + dy, height: cs.height - dy };
+ },
+ s: function( event, dx, dy ) {
+ return { height: this.originalSize.height + dy };
+ },
+ se: function( event, dx, dy ) {
+ return $.extend( this._change.s.apply( this, arguments ),
+ this._change.e.apply( this, [ event, dx, dy ] ) );
+ },
+ sw: function( event, dx, dy ) {
+ return $.extend( this._change.s.apply( this, arguments ),
+ this._change.w.apply( this, [ event, dx, dy ] ) );
+ },
+ ne: function( event, dx, dy ) {
+ return $.extend( this._change.n.apply( this, arguments ),
+ this._change.e.apply( this, [ event, dx, dy ] ) );
+ },
+ nw: function( event, dx, dy ) {
+ return $.extend( this._change.n.apply( this, arguments ),
+ this._change.w.apply( this, [ event, dx, dy ] ) );
+ }
+ },
+
+ _propagate: function( n, event ) {
+ $.ui.plugin.call( this, n, [ event, this.ui() ] );
+ ( n !== "resize" && this._trigger( n, event, this.ui() ) );
+ },
+
+ plugins: {},
+
+ ui: function() {
+ return {
+ originalElement: this.originalElement,
+ element: this.element,
+ helper: this.helper,
+ position: this.position,
+ size: this.size,
+ originalSize: this.originalSize,
+ originalPosition: this.originalPosition
+ };
+ }
+
+} );
+
+/*
+ * Resizable Extensions
+ */
+
+$.ui.plugin.add( "resizable", "animate", {
+
+ stop: function( event ) {
+ var that = $( this ).resizable( "instance" ),
+ o = that.options,
+ pr = that._proportionallyResizeElements,
+ ista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName ),
+ soffseth = ista && that._hasScroll( pr[ 0 ], "left" ) ? 0 : that.sizeDiff.height,
+ soffsetw = ista ? 0 : that.sizeDiff.width,
+ style = {
+ width: ( that.size.width - soffsetw ),
+ height: ( that.size.height - soffseth )
+ },
+ left = ( parseFloat( that.element.css( "left" ) ) +
+ ( that.position.left - that.originalPosition.left ) ) || null,
+ top = ( parseFloat( that.element.css( "top" ) ) +
+ ( that.position.top - that.originalPosition.top ) ) || null;
+
+ that.element.animate(
+ $.extend( style, top && left ? { top: top, left: left } : {} ), {
+ duration: o.animateDuration,
+ easing: o.animateEasing,
+ step: function() {
+
+ var data = {
+ width: parseFloat( that.element.css( "width" ) ),
+ height: parseFloat( that.element.css( "height" ) ),
+ top: parseFloat( that.element.css( "top" ) ),
+ left: parseFloat( that.element.css( "left" ) )
+ };
+
+ if ( pr && pr.length ) {
+ $( pr[ 0 ] ).css( { width: data.width, height: data.height } );
+ }
+
+ // Propagating resize, and updating values for each animation step
+ that._updateCache( data );
+ that._propagate( "resize", event );
+
+ }
+ }
+ );
+ }
+
+} );
+
+$.ui.plugin.add( "resizable", "containment", {
+
+ start: function() {
+ var element, p, co, ch, cw, width, height,
+ that = $( this ).resizable( "instance" ),
+ o = that.options,
+ el = that.element,
+ oc = o.containment,
+ ce = ( oc instanceof $ ) ?
+ oc.get( 0 ) :
+ ( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc;
+
+ if ( !ce ) {
+ return;
+ }
+
+ that.containerElement = $( ce );
+
+ if ( /document/.test( oc ) || oc === document ) {
+ that.containerOffset = {
+ left: 0,
+ top: 0
+ };
+ that.containerPosition = {
+ left: 0,
+ top: 0
+ };
+
+ that.parentData = {
+ element: $( document ),
+ left: 0,
+ top: 0,
+ width: $( document ).width(),
+ height: $( document ).height() || document.body.parentNode.scrollHeight
+ };
+ } else {
+ element = $( ce );
+ p = [];
+ $( [ "Top", "Right", "Left", "Bottom" ] ).each( function( i, name ) {
+ p[ i ] = that._num( element.css( "padding" + name ) );
+ } );
+
+ that.containerOffset = element.offset();
+ that.containerPosition = element.position();
+ that.containerSize = {
+ height: ( element.innerHeight() - p[ 3 ] ),
+ width: ( element.innerWidth() - p[ 1 ] )
+ };
+
+ co = that.containerOffset;
+ ch = that.containerSize.height;
+ cw = that.containerSize.width;
+ width = ( that._hasScroll ( ce, "left" ) ? ce.scrollWidth : cw );
+ height = ( that._hasScroll ( ce ) ? ce.scrollHeight : ch ) ;
+
+ that.parentData = {
+ element: ce,
+ left: co.left,
+ top: co.top,
+ width: width,
+ height: height
+ };
+ }
+ },
+
+ resize: function( event ) {
+ var woset, hoset, isParent, isOffsetRelative,
+ that = $( this ).resizable( "instance" ),
+ o = that.options,
+ co = that.containerOffset,
+ cp = that.position,
+ pRatio = that._aspectRatio || event.shiftKey,
+ cop = {
+ top: 0,
+ left: 0
+ },
+ ce = that.containerElement,
+ continueResize = true;
+
+ if ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( "position" ) ) ) {
+ cop = co;
+ }
+
+ if ( cp.left < ( that._helper ? co.left : 0 ) ) {
+ that.size.width = that.size.width +
+ ( that._helper ?
+ ( that.position.left - co.left ) :
+ ( that.position.left - cop.left ) );
+
+ if ( pRatio ) {
+ that.size.height = that.size.width / that.aspectRatio;
+ continueResize = false;
+ }
+ that.position.left = o.helper ? co.left : 0;
+ }
+
+ if ( cp.top < ( that._helper ? co.top : 0 ) ) {
+ that.size.height = that.size.height +
+ ( that._helper ?
+ ( that.position.top - co.top ) :
+ that.position.top );
+
+ if ( pRatio ) {
+ that.size.width = that.size.height * that.aspectRatio;
+ continueResize = false;
+ }
+ that.position.top = that._helper ? co.top : 0;
+ }
+
+ isParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 );
+ isOffsetRelative = /relative|absolute/.test( that.containerElement.css( "position" ) );
+
+ if ( isParent && isOffsetRelative ) {
+ that.offset.left = that.parentData.left + that.position.left;
+ that.offset.top = that.parentData.top + that.position.top;
+ } else {
+ that.offset.left = that.element.offset().left;
+ that.offset.top = that.element.offset().top;
+ }
+
+ woset = Math.abs( that.sizeDiff.width +
+ ( that._helper ?
+ that.offset.left - cop.left :
+ ( that.offset.left - co.left ) ) );
+
+ hoset = Math.abs( that.sizeDiff.height +
+ ( that._helper ?
+ that.offset.top - cop.top :
+ ( that.offset.top - co.top ) ) );
+
+ if ( woset + that.size.width >= that.parentData.width ) {
+ that.size.width = that.parentData.width - woset;
+ if ( pRatio ) {
+ that.size.height = that.size.width / that.aspectRatio;
+ continueResize = false;
+ }
+ }
+
+ if ( hoset + that.size.height >= that.parentData.height ) {
+ that.size.height = that.parentData.height - hoset;
+ if ( pRatio ) {
+ that.size.width = that.size.height * that.aspectRatio;
+ continueResize = false;
+ }
+ }
+
+ if ( !continueResize ) {
+ that.position.left = that.prevPosition.left;
+ that.position.top = that.prevPosition.top;
+ that.size.width = that.prevSize.width;
+ that.size.height = that.prevSize.height;
+ }
+ },
+
+ stop: function() {
+ var that = $( this ).resizable( "instance" ),
+ o = that.options,
+ co = that.containerOffset,
+ cop = that.containerPosition,
+ ce = that.containerElement,
+ helper = $( that.helper ),
+ ho = helper.offset(),
+ w = helper.outerWidth() - that.sizeDiff.width,
+ h = helper.outerHeight() - that.sizeDiff.height;
+
+ if ( that._helper && !o.animate && ( /relative/ ).test( ce.css( "position" ) ) ) {
+ $( this ).css( {
+ left: ho.left - cop.left - co.left,
+ width: w,
+ height: h
+ } );
+ }
+
+ if ( that._helper && !o.animate && ( /static/ ).test( ce.css( "position" ) ) ) {
+ $( this ).css( {
+ left: ho.left - cop.left - co.left,
+ width: w,
+ height: h
+ } );
+ }
+ }
+} );
+
+$.ui.plugin.add( "resizable", "alsoResize", {
+
+ start: function() {
+ var that = $( this ).resizable( "instance" ),
+ o = that.options;
+
+ $( o.alsoResize ).each( function() {
+ var el = $( this );
+ el.data( "ui-resizable-alsoresize", {
+ width: parseFloat( el.width() ), height: parseFloat( el.height() ),
+ left: parseFloat( el.css( "left" ) ), top: parseFloat( el.css( "top" ) )
+ } );
+ } );
+ },
+
+ resize: function( event, ui ) {
+ var that = $( this ).resizable( "instance" ),
+ o = that.options,
+ os = that.originalSize,
+ op = that.originalPosition,
+ delta = {
+ height: ( that.size.height - os.height ) || 0,
+ width: ( that.size.width - os.width ) || 0,
+ top: ( that.position.top - op.top ) || 0,
+ left: ( that.position.left - op.left ) || 0
+ };
+
+ $( o.alsoResize ).each( function() {
+ var el = $( this ), start = $( this ).data( "ui-resizable-alsoresize" ), style = {},
+ css = el.parents( ui.originalElement[ 0 ] ).length ?
+ [ "width", "height" ] :
+ [ "width", "height", "top", "left" ];
+
+ $.each( css, function( i, prop ) {
+ var sum = ( start[ prop ] || 0 ) + ( delta[ prop ] || 0 );
+ if ( sum && sum >= 0 ) {
+ style[ prop ] = sum || null;
+ }
+ } );
+
+ el.css( style );
+ } );
+ },
+
+ stop: function() {
+ $( this ).removeData( "ui-resizable-alsoresize" );
+ }
+} );
+
+$.ui.plugin.add( "resizable", "ghost", {
+
+ start: function() {
+
+ var that = $( this ).resizable( "instance" ), cs = that.size;
+
+ that.ghost = that.originalElement.clone();
+ that.ghost.css( {
+ opacity: 0.25,
+ display: "block",
+ position: "relative",
+ height: cs.height,
+ width: cs.width,
+ margin: 0,
+ left: 0,
+ top: 0
+ } );
+
+ that._addClass( that.ghost, "ui-resizable-ghost" );
+
+ // DEPRECATED
+ // TODO: remove after 1.12
+ if ( $.uiBackCompat !== false && typeof that.options.ghost === "string" ) {
+
+ // Ghost option
+ that.ghost.addClass( this.options.ghost );
+ }
+
+ that.ghost.appendTo( that.helper );
+
+ },
+
+ resize: function() {
+ var that = $( this ).resizable( "instance" );
+ if ( that.ghost ) {
+ that.ghost.css( {
+ position: "relative",
+ height: that.size.height,
+ width: that.size.width
+ } );
+ }
+ },
+
+ stop: function() {
+ var that = $( this ).resizable( "instance" );
+ if ( that.ghost && that.helper ) {
+ that.helper.get( 0 ).removeChild( that.ghost.get( 0 ) );
+ }
+ }
+
+} );
+
+$.ui.plugin.add( "resizable", "grid", {
+
+ resize: function() {
+ var outerDimensions,
+ that = $( this ).resizable( "instance" ),
+ o = that.options,
+ cs = that.size,
+ os = that.originalSize,
+ op = that.originalPosition,
+ a = that.axis,
+ grid = typeof o.grid === "number" ? [ o.grid, o.grid ] : o.grid,
+ gridX = ( grid[ 0 ] || 1 ),
+ gridY = ( grid[ 1 ] || 1 ),
+ ox = Math.round( ( cs.width - os.width ) / gridX ) * gridX,
+ oy = Math.round( ( cs.height - os.height ) / gridY ) * gridY,
+ newWidth = os.width + ox,
+ newHeight = os.height + oy,
+ isMaxWidth = o.maxWidth && ( o.maxWidth < newWidth ),
+ isMaxHeight = o.maxHeight && ( o.maxHeight < newHeight ),
+ isMinWidth = o.minWidth && ( o.minWidth > newWidth ),
+ isMinHeight = o.minHeight && ( o.minHeight > newHeight );
+
+ o.grid = grid;
+
+ if ( isMinWidth ) {
+ newWidth += gridX;
+ }
+ if ( isMinHeight ) {
+ newHeight += gridY;
+ }
+ if ( isMaxWidth ) {
+ newWidth -= gridX;
+ }
+ if ( isMaxHeight ) {
+ newHeight -= gridY;
+ }
+
+ if ( /^(se|s|e)$/.test( a ) ) {
+ that.size.width = newWidth;
+ that.size.height = newHeight;
+ } else if ( /^(ne)$/.test( a ) ) {
+ that.size.width = newWidth;
+ that.size.height = newHeight;
+ that.position.top = op.top - oy;
+ } else if ( /^(sw)$/.test( a ) ) {
+ that.size.width = newWidth;
+ that.size.height = newHeight;
+ that.position.left = op.left - ox;
+ } else {
+ if ( newHeight - gridY <= 0 || newWidth - gridX <= 0 ) {
+ outerDimensions = that._getPaddingPlusBorderDimensions( this );
+ }
+
+ if ( newHeight - gridY > 0 ) {
+ that.size.height = newHeight;
+ that.position.top = op.top - oy;
+ } else {
+ newHeight = gridY - outerDimensions.height;
+ that.size.height = newHeight;
+ that.position.top = op.top + os.height - newHeight;
+ }
+ if ( newWidth - gridX > 0 ) {
+ that.size.width = newWidth;
+ that.position.left = op.left - ox;
+ } else {
+ newWidth = gridX - outerDimensions.width;
+ that.size.width = newWidth;
+ that.position.left = op.left + os.width - newWidth;
+ }
+ }
+ }
+
+} );
+
+var widgetsResizable = $.ui.resizable;
+
+
+/*!
+ * jQuery UI Dialog 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Dialog
+//>>group: Widgets
+//>>description: Displays customizable dialog windows.
+//>>docs: http://api.jqueryui.com/dialog/
+//>>demos: http://jqueryui.com/dialog/
+//>>css.structure: ../../themes/base/core.css
+//>>css.structure: ../../themes/base/dialog.css
+//>>css.theme: ../../themes/base/theme.css
+
+
+
+$.widget( "ui.dialog", {
+ version: "1.12.1",
+ options: {
+ appendTo: "body",
+ autoOpen: true,
+ buttons: [],
+ classes: {
+ "ui-dialog": "ui-corner-all",
+ "ui-dialog-titlebar": "ui-corner-all"
+ },
+ closeOnEscape: true,
+ closeText: "Close",
+ draggable: true,
+ hide: null,
+ height: "auto",
+ maxHeight: null,
+ maxWidth: null,
+ minHeight: 150,
+ minWidth: 150,
+ modal: false,
+ position: {
+ my: "center",
+ at: "center",
+ of: window,
+ collision: "fit",
+
+ // Ensure the titlebar is always visible
+ using: function( pos ) {
+ var topOffset = $( this ).css( pos ).offset().top;
+ if ( topOffset < 0 ) {
+ $( this ).css( "top", pos.top - topOffset );
+ }
+ }
+ },
+ resizable: true,
+ show: null,
+ title: null,
+ width: 300,
+
+ // Callbacks
+ beforeClose: null,
+ close: null,
+ drag: null,
+ dragStart: null,
+ dragStop: null,
+ focus: null,
+ open: null,
+ resize: null,
+ resizeStart: null,
+ resizeStop: null
+ },
+
+ sizeRelatedOptions: {
+ buttons: true,
+ height: true,
+ maxHeight: true,
+ maxWidth: true,
+ minHeight: true,
+ minWidth: true,
+ width: true
+ },
+
+ resizableRelatedOptions: {
+ maxHeight: true,
+ maxWidth: true,
+ minHeight: true,
+ minWidth: true
+ },
+
+ _create: function() {
+ this.originalCss = {
+ display: this.element[ 0 ].style.display,
+ width: this.element[ 0 ].style.width,
+ minHeight: this.element[ 0 ].style.minHeight,
+ maxHeight: this.element[ 0 ].style.maxHeight,
+ height: this.element[ 0 ].style.height
+ };
+ this.originalPosition = {
+ parent: this.element.parent(),
+ index: this.element.parent().children().index( this.element )
+ };
+ this.originalTitle = this.element.attr( "title" );
+ if ( this.options.title == null && this.originalTitle != null ) {
+ this.options.title = this.originalTitle;
+ }
+
+ // Dialogs can't be disabled
+ if ( this.options.disabled ) {
+ this.options.disabled = false;
+ }
+
+ this._createWrapper();
+
+ this.element
+ .show()
+ .removeAttr( "title" )
+ .appendTo( this.uiDialog );
+
+ this._addClass( "ui-dialog-content", "ui-widget-content" );
+
+ this._createTitlebar();
+ this._createButtonPane();
+
+ if ( this.options.draggable && $.fn.draggable ) {
+ this._makeDraggable();
+ }
+ if ( this.options.resizable && $.fn.resizable ) {
+ this._makeResizable();
+ }
+
+ this._isOpen = false;
+
+ this._trackFocus();
+ },
+
+ _init: function() {
+ if ( this.options.autoOpen ) {
+ this.open();
+ }
+ },
+
+ _appendTo: function() {
+ var element = this.options.appendTo;
+ if ( element && ( element.jquery || element.nodeType ) ) {
+ return $( element );
+ }
+ return this.document.find( element || "body" ).eq( 0 );
+ },
+
+ _destroy: function() {
+ var next,
+ originalPosition = this.originalPosition;
+
+ this._untrackInstance();
+ this._destroyOverlay();
+
+ this.element
+ .removeUniqueId()
+ .css( this.originalCss )
+
+ // Without detaching first, the following becomes really slow
+ .detach();
+
+ this.uiDialog.remove();
+
+ if ( this.originalTitle ) {
+ this.element.attr( "title", this.originalTitle );
+ }
+
+ next = originalPosition.parent.children().eq( originalPosition.index );
+
+ // Don't try to place the dialog next to itself (#8613)
+ if ( next.length && next[ 0 ] !== this.element[ 0 ] ) {
+ next.before( this.element );
+ } else {
+ originalPosition.parent.append( this.element );
+ }
+ },
+
+ widget: function() {
+ return this.uiDialog;
+ },
+
+ disable: $.noop,
+ enable: $.noop,
+
+ close: function( event ) {
+ var that = this;
+
+ if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) {
+ return;
+ }
+
+ this._isOpen = false;
+ this._focusedElement = null;
+ this._destroyOverlay();
+ this._untrackInstance();
+
+ if ( !this.opener.filter( ":focusable" ).trigger( "focus" ).length ) {
+
+ // Hiding a focused element doesn't trigger blur in WebKit
+ // so in case we have nothing to focus on, explicitly blur the active element
+ // https://bugs.webkit.org/show_bug.cgi?id=47182
+ $.ui.safeBlur( $.ui.safeActiveElement( this.document[ 0 ] ) );
+ }
+
+ this._hide( this.uiDialog, this.options.hide, function() {
+ that._trigger( "close", event );
+ } );
+ },
+
+ isOpen: function() {
+ return this._isOpen;
+ },
+
+ moveToTop: function() {
+ this._moveToTop();
+ },
+
+ _moveToTop: function( event, silent ) {
+ var moved = false,
+ zIndices = this.uiDialog.siblings( ".ui-front:visible" ).map( function() {
+ return +$( this ).css( "z-index" );
+ } ).get(),
+ zIndexMax = Math.max.apply( null, zIndices );
+
+ if ( zIndexMax >= +this.uiDialog.css( "z-index" ) ) {
+ this.uiDialog.css( "z-index", zIndexMax + 1 );
+ moved = true;
+ }
+
+ if ( moved && !silent ) {
+ this._trigger( "focus", event );
+ }
+ return moved;
+ },
+
+ open: function() {
+ var that = this;
+ if ( this._isOpen ) {
+ if ( this._moveToTop() ) {
+ this._focusTabbable();
+ }
+ return;
+ }
+
+ this._isOpen = true;
+ this.opener = $( $.ui.safeActiveElement( this.document[ 0 ] ) );
+
+ this._size();
+ this._position();
+ this._createOverlay();
+ this._moveToTop( null, true );
+
+ // Ensure the overlay is moved to the top with the dialog, but only when
+ // opening. The overlay shouldn't move after the dialog is open so that
+ // modeless dialogs opened after the modal dialog stack properly.
+ if ( this.overlay ) {
+ this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1 );
+ }
+
+ this._show( this.uiDialog, this.options.show, function() {
+ that._focusTabbable();
+ that._trigger( "focus" );
+ } );
+
+ // Track the dialog immediately upon openening in case a focus event
+ // somehow occurs outside of the dialog before an element inside the
+ // dialog is focused (#10152)
+ this._makeFocusTarget();
+
+ this._trigger( "open" );
+ },
+
+ _focusTabbable: function() {
+
+ // Set focus to the first match:
+ // 1. An element that was focused previously
+ // 2. First element inside the dialog matching [autofocus]
+ // 3. Tabbable element inside the content element
+ // 4. Tabbable element inside the buttonpane
+ // 5. The close button
+ // 6. The dialog itself
+ var hasFocus = this._focusedElement;
+ if ( !hasFocus ) {
+ hasFocus = this.element.find( "[autofocus]" );
+ }
+ if ( !hasFocus.length ) {
+ hasFocus = this.element.find( ":tabbable" );
+ }
+ if ( !hasFocus.length ) {
+ hasFocus = this.uiDialogButtonPane.find( ":tabbable" );
+ }
+ if ( !hasFocus.length ) {
+ hasFocus = this.uiDialogTitlebarClose.filter( ":tabbable" );
+ }
+ if ( !hasFocus.length ) {
+ hasFocus = this.uiDialog;
+ }
+ hasFocus.eq( 0 ).trigger( "focus" );
+ },
+
+ _keepFocus: function( event ) {
+ function checkFocus() {
+ var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),
+ isActive = this.uiDialog[ 0 ] === activeElement ||
+ $.contains( this.uiDialog[ 0 ], activeElement );
+ if ( !isActive ) {
+ this._focusTabbable();
+ }
+ }
+ event.preventDefault();
+ checkFocus.call( this );
+
+ // support: IE
+ // IE <= 8 doesn't prevent moving focus even with event.preventDefault()
+ // so we check again later
+ this._delay( checkFocus );
+ },
+
+ _createWrapper: function() {
+ this.uiDialog = $( "<div>" )
+ .hide()
+ .attr( {
+
+ // Setting tabIndex makes the div focusable
+ tabIndex: -1,
+ role: "dialog"
+ } )
+ .appendTo( this._appendTo() );
+
+ this._addClass( this.uiDialog, "ui-dialog", "ui-widget ui-widget-content ui-front" );
+ this._on( this.uiDialog, {
+ keydown: function( event ) {
+ if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
+ event.keyCode === $.ui.keyCode.ESCAPE ) {
+ event.preventDefault();
+ this.close( event );
+ return;
+ }
+
+ // Prevent tabbing out of dialogs
+ if ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) {
+ return;
+ }
+ var tabbables = this.uiDialog.find( ":tabbable" ),
+ first = tabbables.filter( ":first" ),
+ last = tabbables.filter( ":last" );
+
+ if ( ( event.target === last[ 0 ] || event.target === this.uiDialog[ 0 ] ) &&
+ !event.shiftKey ) {
+ this._delay( function() {
+ first.trigger( "focus" );
+ } );
+ event.preventDefault();
+ } else if ( ( event.target === first[ 0 ] ||
+ event.target === this.uiDialog[ 0 ] ) && event.shiftKey ) {
+ this._delay( function() {
+ last.trigger( "focus" );
+ } );
+ event.preventDefault();
+ }
+ },
+ mousedown: function( event ) {
+ if ( this._moveToTop( event ) ) {
+ this._focusTabbable();
+ }
+ }
+ } );
+
+ // We assume that any existing aria-describedby attribute means
+ // that the dialog content is marked up properly
+ // otherwise we brute force the content as the description
+ if ( !this.element.find( "[aria-describedby]" ).length ) {
+ this.uiDialog.attr( {
+ "aria-describedby": this.element.uniqueId().attr( "id" )
+ } );
+ }
+ },
+
+ _createTitlebar: function() {
+ var uiDialogTitle;
+
+ this.uiDialogTitlebar = $( "<div>" );
+ this._addClass( this.uiDialogTitlebar,
+ "ui-dialog-titlebar", "ui-widget-header ui-helper-clearfix" );
+ this._on( this.uiDialogTitlebar, {
+ mousedown: function( event ) {
+
+ // Don't prevent click on close button (#8838)
+ // Focusing a dialog that is partially scrolled out of view
+ // causes the browser to scroll it into view, preventing the click event
+ if ( !$( event.target ).closest( ".ui-dialog-titlebar-close" ) ) {
+
+ // Dialog isn't getting focus when dragging (#8063)
+ this.uiDialog.trigger( "focus" );
+ }
+ }
+ } );
+
+ // Support: IE
+ // Use type="button" to prevent enter keypresses in textboxes from closing the
+ // dialog in IE (#9312)
+ this.uiDialogTitlebarClose = $( "<button type='button'></button>" )
+ .button( {
+ label: $( "<a>" ).text( this.options.closeText ).html(),
+ icon: "ui-icon-closethick",
+ showLabel: false
+ } )
+ .appendTo( this.uiDialogTitlebar );
+
+ this._addClass( this.uiDialogTitlebarClose, "ui-dialog-titlebar-close" );
+ this._on( this.uiDialogTitlebarClose, {
+ click: function( event ) {
+ event.preventDefault();
+ this.close( event );
+ }
+ } );
+
+ uiDialogTitle = $( "<span>" ).uniqueId().prependTo( this.uiDialogTitlebar );
+ this._addClass( uiDialogTitle, "ui-dialog-title" );
+ this._title( uiDialogTitle );
+
+ this.uiDialogTitlebar.prependTo( this.uiDialog );
+
+ this.uiDialog.attr( {
+ "aria-labelledby": uiDialogTitle.attr( "id" )
+ } );
+ },
+
+ _title: function( title ) {
+ if ( this.options.title ) {
+ title.text( this.options.title );
+ } else {
+ title.html( "&#160;" );
+ }
+ },
+
+ _createButtonPane: function() {
+ this.uiDialogButtonPane = $( "<div>" );
+ this._addClass( this.uiDialogButtonPane, "ui-dialog-buttonpane",
+ "ui-widget-content ui-helper-clearfix" );
+
+ this.uiButtonSet = $( "<div>" )
+ .appendTo( this.uiDialogButtonPane );
+ this._addClass( this.uiButtonSet, "ui-dialog-buttonset" );
+
+ this._createButtons();
+ },
+
+ _createButtons: function() {
+ var that = this,
+ buttons = this.options.buttons;
+
+ // If we already have a button pane, remove it
+ this.uiDialogButtonPane.remove();
+ this.uiButtonSet.empty();
+
+ if ( $.isEmptyObject( buttons ) || ( $.isArray( buttons ) && !buttons.length ) ) {
+ this._removeClass( this.uiDialog, "ui-dialog-buttons" );
+ return;
+ }
+
+ $.each( buttons, function( name, props ) {
+ var click, buttonOptions;
+ props = $.isFunction( props ) ?
+ { click: props, text: name } :
+ props;
+
+ // Default to a non-submitting button
+ props = $.extend( { type: "button" }, props );
+
+ // Change the context for the click callback to be the main element
+ click = props.click;
+ buttonOptions = {
+ icon: props.icon,
+ iconPosition: props.iconPosition,
+ showLabel: props.showLabel,
+
+ // Deprecated options
+ icons: props.icons,
+ text: props.text
+ };
+
+ delete props.click;
+ delete props.icon;
+ delete props.iconPosition;
+ delete props.showLabel;
+
+ // Deprecated options
+ delete props.icons;
+ if ( typeof props.text === "boolean" ) {
+ delete props.text;
+ }
+
+ $( "<button></button>", props )
+ .button( buttonOptions )
+ .appendTo( that.uiButtonSet )
+ .on( "click", function() {
+ click.apply( that.element[ 0 ], arguments );
+ } );
+ } );
+ this._addClass( this.uiDialog, "ui-dialog-buttons" );
+ this.uiDialogButtonPane.appendTo( this.uiDialog );
+ },
+
+ _makeDraggable: function() {
+ var that = this,
+ options = this.options;
+
+ function filteredUi( ui ) {
+ return {
+ position: ui.position,
+ offset: ui.offset
+ };
+ }
+
+ this.uiDialog.draggable( {
+ cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
+ handle: ".ui-dialog-titlebar",
+ containment: "document",
+ start: function( event, ui ) {
+ that._addClass( $( this ), "ui-dialog-dragging" );
+ that._blockFrames();
+ that._trigger( "dragStart", event, filteredUi( ui ) );
+ },
+ drag: function( event, ui ) {
+ that._trigger( "drag", event, filteredUi( ui ) );
+ },
+ stop: function( event, ui ) {
+ var left = ui.offset.left - that.document.scrollLeft(),
+ top = ui.offset.top - that.document.scrollTop();
+
+ options.position = {
+ my: "left top",
+ at: "left" + ( left >= 0 ? "+" : "" ) + left + " " +
+ "top" + ( top >= 0 ? "+" : "" ) + top,
+ of: that.window
+ };
+ that._removeClass( $( this ), "ui-dialog-dragging" );
+ that._unblockFrames();
+ that._trigger( "dragStop", event, filteredUi( ui ) );
+ }
+ } );
+ },
+
+ _makeResizable: function() {
+ var that = this,
+ options = this.options,
+ handles = options.resizable,
+
+ // .ui-resizable has position: relative defined in the stylesheet
+ // but dialogs have to use absolute or fixed positioning
+ position = this.uiDialog.css( "position" ),
+ resizeHandles = typeof handles === "string" ?
+ handles :
+ "n,e,s,w,se,sw,ne,nw";
+
+ function filteredUi( ui ) {
+ return {
+ originalPosition: ui.originalPosition,
+ originalSize: ui.originalSize,
+ position: ui.position,
+ size: ui.size
+ };
+ }
+
+ this.uiDialog.resizable( {
+ cancel: ".ui-dialog-content",
+ containment: "document",
+ alsoResize: this.element,
+ maxWidth: options.maxWidth,
+ maxHeight: options.maxHeight,
+ minWidth: options.minWidth,
+ minHeight: this._minHeight(),
+ handles: resizeHandles,
+ start: function( event, ui ) {
+ that._addClass( $( this ), "ui-dialog-resizing" );
+ that._blockFrames();
+ that._trigger( "resizeStart", event, filteredUi( ui ) );
+ },
+ resize: function( event, ui ) {
+ that._trigger( "resize", event, filteredUi( ui ) );
+ },
+ stop: function( event, ui ) {
+ var offset = that.uiDialog.offset(),
+ left = offset.left - that.document.scrollLeft(),
+ top = offset.top - that.document.scrollTop();
+
+ options.height = that.uiDialog.height();
+ options.width = that.uiDialog.width();
+ options.position = {
+ my: "left top",
+ at: "left" + ( left >= 0 ? "+" : "" ) + left + " " +
+ "top" + ( top >= 0 ? "+" : "" ) + top,
+ of: that.window
+ };
+ that._removeClass( $( this ), "ui-dialog-resizing" );
+ that._unblockFrames();
+ that._trigger( "resizeStop", event, filteredUi( ui ) );
+ }
+ } )
+ .css( "position", position );
+ },
+
+ _trackFocus: function() {
+ this._on( this.widget(), {
+ focusin: function( event ) {
+ this._makeFocusTarget();
+ this._focusedElement = $( event.target );
+ }
+ } );
+ },
+
+ _makeFocusTarget: function() {
+ this._untrackInstance();
+ this._trackingInstances().unshift( this );
+ },
+
+ _untrackInstance: function() {
+ var instances = this._trackingInstances(),
+ exists = $.inArray( this, instances );
+ if ( exists !== -1 ) {
+ instances.splice( exists, 1 );
+ }
+ },
+
+ _trackingInstances: function() {
+ var instances = this.document.data( "ui-dialog-instances" );
+ if ( !instances ) {
+ instances = [];
+ this.document.data( "ui-dialog-instances", instances );
+ }
+ return instances;
+ },
+
+ _minHeight: function() {
+ var options = this.options;
+
+ return options.height === "auto" ?
+ options.minHeight :
+ Math.min( options.minHeight, options.height );
+ },
+
+ _position: function() {
+
+ // Need to show the dialog to get the actual offset in the position plugin
+ var isVisible = this.uiDialog.is( ":visible" );
+ if ( !isVisible ) {
+ this.uiDialog.show();
+ }
+ this.uiDialog.position( this.options.position );
+ if ( !isVisible ) {
+ this.uiDialog.hide();
+ }
+ },
+
+ _setOptions: function( options ) {
+ var that = this,
+ resize = false,
+ resizableOptions = {};
+
+ $.each( options, function( key, value ) {
+ that._setOption( key, value );
+
+ if ( key in that.sizeRelatedOptions ) {
+ resize = true;
+ }
+ if ( key in that.resizableRelatedOptions ) {
+ resizableOptions[ key ] = value;
+ }
+ } );
+
+ if ( resize ) {
+ this._size();
+ this._position();
+ }
+ if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
+ this.uiDialog.resizable( "option", resizableOptions );
+ }
+ },
+
+ _setOption: function( key, value ) {
+ var isDraggable, isResizable,
+ uiDialog = this.uiDialog;
+
+ if ( key === "disabled" ) {
+ return;
+ }
+
+ this._super( key, value );
+
+ if ( key === "appendTo" ) {
+ this.uiDialog.appendTo( this._appendTo() );
+ }
+
+ if ( key === "buttons" ) {
+ this._createButtons();
+ }
+
+ if ( key === "closeText" ) {
+ this.uiDialogTitlebarClose.button( {
+
+ // Ensure that we always pass a string
+ label: $( "<a>" ).text( "" + this.options.closeText ).html()
+ } );
+ }
+
+ if ( key === "draggable" ) {
+ isDraggable = uiDialog.is( ":data(ui-draggable)" );
+ if ( isDraggable && !value ) {
+ uiDialog.draggable( "destroy" );
+ }
+
+ if ( !isDraggable && value ) {
+ this._makeDraggable();
+ }
+ }
+
+ if ( key === "position" ) {
+ this._position();
+ }
+
+ if ( key === "resizable" ) {
+
+ // currently resizable, becoming non-resizable
+ isResizable = uiDialog.is( ":data(ui-resizable)" );
+ if ( isResizable && !value ) {
+ uiDialog.resizable( "destroy" );
+ }
+
+ // Currently resizable, changing handles
+ if ( isResizable && typeof value === "string" ) {
+ uiDialog.resizable( "option", "handles", value );
+ }
+
+ // Currently non-resizable, becoming resizable
+ if ( !isResizable && value !== false ) {
+ this._makeResizable();
+ }
+ }
+
+ if ( key === "title" ) {
+ this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) );
+ }
+ },
+
+ _size: function() {
+
+ // If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
+ // divs will both have width and height set, so we need to reset them
+ var nonContentHeight, minContentHeight, maxContentHeight,
+ options = this.options;
+
+ // Reset content sizing
+ this.element.show().css( {
+ width: "auto",
+ minHeight: 0,
+ maxHeight: "none",
+ height: 0
+ } );
+
+ if ( options.minWidth > options.width ) {
+ options.width = options.minWidth;
+ }
+
+ // Reset wrapper sizing
+ // determine the height of all the non-content elements
+ nonContentHeight = this.uiDialog.css( {
+ height: "auto",
+ width: options.width
+ } )
+ .outerHeight();
+ minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
+ maxContentHeight = typeof options.maxHeight === "number" ?
+ Math.max( 0, options.maxHeight - nonContentHeight ) :
+ "none";
+
+ if ( options.height === "auto" ) {
+ this.element.css( {
+ minHeight: minContentHeight,
+ maxHeight: maxContentHeight,
+ height: "auto"
+ } );
+ } else {
+ this.element.height( Math.max( 0, options.height - nonContentHeight ) );
+ }
+
+ if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
+ this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
+ }
+ },
+
+ _blockFrames: function() {
+ this.iframeBlocks = this.document.find( "iframe" ).map( function() {
+ var iframe = $( this );
+
+ return $( "<div>" )
+ .css( {
+ position: "absolute",
+ width: iframe.outerWidth(),
+ height: iframe.outerHeight()
+ } )
+ .appendTo( iframe.parent() )
+ .offset( iframe.offset() )[ 0 ];
+ } );
+ },
+
+ _unblockFrames: function() {
+ if ( this.iframeBlocks ) {
+ this.iframeBlocks.remove();
+ delete this.iframeBlocks;
+ }
+ },
+
+ _allowInteraction: function( event ) {
+ if ( $( event.target ).closest( ".ui-dialog" ).length ) {
+ return true;
+ }
+
+ // TODO: Remove hack when datepicker implements
+ // the .ui-front logic (#8989)
+ return !!$( event.target ).closest( ".ui-datepicker" ).length;
+ },
+
+ _createOverlay: function() {
+ if ( !this.options.modal ) {
+ return;
+ }
+
+ // We use a delay in case the overlay is created from an
+ // event that we're going to be cancelling (#2804)
+ var isOpening = true;
+ this._delay( function() {
+ isOpening = false;
+ } );
+
+ if ( !this.document.data( "ui-dialog-overlays" ) ) {
+
+ // Prevent use of anchors and inputs
+ // Using _on() for an event handler shared across many instances is
+ // safe because the dialogs stack and must be closed in reverse order
+ this._on( this.document, {
+ focusin: function( event ) {
+ if ( isOpening ) {
+ return;
+ }
+
+ if ( !this._allowInteraction( event ) ) {
+ event.preventDefault();
+ this._trackingInstances()[ 0 ]._focusTabbable();
+ }
+ }
+ } );
+ }
+
+ this.overlay = $( "<div>" )
+ .appendTo( this._appendTo() );
+
+ this._addClass( this.overlay, null, "ui-widget-overlay ui-front" );
+ this._on( this.overlay, {
+ mousedown: "_keepFocus"
+ } );
+ this.document.data( "ui-dialog-overlays",
+ ( this.document.data( "ui-dialog-overlays" ) || 0 ) + 1 );
+ },
+
+ _destroyOverlay: function() {
+ if ( !this.options.modal ) {
+ return;
+ }
+
+ if ( this.overlay ) {
+ var overlays = this.document.data( "ui-dialog-overlays" ) - 1;
+
+ if ( !overlays ) {
+ this._off( this.document, "focusin" );
+ this.document.removeData( "ui-dialog-overlays" );
+ } else {
+ this.document.data( "ui-dialog-overlays", overlays );
+ }
+
+ this.overlay.remove();
+ this.overlay = null;
+ }
+ }
+} );
+
+// DEPRECATED
+// TODO: switch return back to widget declaration at top of file when this is removed
+if ( $.uiBackCompat !== false ) {
+
+ // Backcompat for dialogClass option
+ $.widget( "ui.dialog", $.ui.dialog, {
+ options: {
+ dialogClass: ""
+ },
+ _createWrapper: function() {
+ this._super();
+ this.uiDialog.addClass( this.options.dialogClass );
+ },
+ _setOption: function( key, value ) {
+ if ( key === "dialogClass" ) {
+ this.uiDialog
+ .removeClass( this.options.dialogClass )
+ .addClass( value );
+ }
+ this._superApply( arguments );
+ }
+ } );
+}
+
+var widgetsDialog = $.ui.dialog;
+
+
+/*!
+ * jQuery UI Droppable 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Droppable
+//>>group: Interactions
+//>>description: Enables drop targets for draggable elements.
+//>>docs: http://api.jqueryui.com/droppable/
+//>>demos: http://jqueryui.com/droppable/
+
+
+
+$.widget( "ui.droppable", {
+ version: "1.12.1",
+ widgetEventPrefix: "drop",
+ options: {
+ accept: "*",
+ addClasses: true,
+ greedy: false,
+ scope: "default",
+ tolerance: "intersect",
+
+ // Callbacks
+ activate: null,
+ deactivate: null,
+ drop: null,
+ out: null,
+ over: null
+ },
+ _create: function() {
+
+ var proportions,
+ o = this.options,
+ accept = o.accept;
+
+ this.isover = false;
+ this.isout = true;
+
+ this.accept = $.isFunction( accept ) ? accept : function( d ) {
+ return d.is( accept );
+ };
+
+ this.proportions = function( /* valueToWrite */ ) {
+ if ( arguments.length ) {
+
+ // Store the droppable's proportions
+ proportions = arguments[ 0 ];
+ } else {
+
+ // Retrieve or derive the droppable's proportions
+ return proportions ?
+ proportions :
+ proportions = {
+ width: this.element[ 0 ].offsetWidth,
+ height: this.element[ 0 ].offsetHeight
+ };
+ }
+ };
+
+ this._addToManager( o.scope );
+
+ o.addClasses && this._addClass( "ui-droppable" );
+
+ },
+
+ _addToManager: function( scope ) {
+
+ // Add the reference and positions to the manager
+ $.ui.ddmanager.droppables[ scope ] = $.ui.ddmanager.droppables[ scope ] || [];
+ $.ui.ddmanager.droppables[ scope ].push( this );
+ },
+
+ _splice: function( drop ) {
+ var i = 0;
+ for ( ; i < drop.length; i++ ) {
+ if ( drop[ i ] === this ) {
+ drop.splice( i, 1 );
+ }
+ }
+ },
+
+ _destroy: function() {
+ var drop = $.ui.ddmanager.droppables[ this.options.scope ];
+
+ this._splice( drop );
+ },
+
+ _setOption: function( key, value ) {
+
+ if ( key === "accept" ) {
+ this.accept = $.isFunction( value ) ? value : function( d ) {
+ return d.is( value );
+ };
+ } else if ( key === "scope" ) {
+ var drop = $.ui.ddmanager.droppables[ this.options.scope ];
+
+ this._splice( drop );
+ this._addToManager( value );
+ }
+
+ this._super( key, value );
+ },
+
+ _activate: function( event ) {
+ var draggable = $.ui.ddmanager.current;
+
+ this._addActiveClass();
+ if ( draggable ) {
+ this._trigger( "activate", event, this.ui( draggable ) );
+ }
+ },
+
+ _deactivate: function( event ) {
+ var draggable = $.ui.ddmanager.current;
+
+ this._removeActiveClass();
+ if ( draggable ) {
+ this._trigger( "deactivate", event, this.ui( draggable ) );
+ }
+ },
+
+ _over: function( event ) {
+
+ var draggable = $.ui.ddmanager.current;
+
+ // Bail if draggable and droppable are same element
+ if ( !draggable || ( draggable.currentItem ||
+ draggable.element )[ 0 ] === this.element[ 0 ] ) {
+ return;
+ }
+
+ if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem ||
+ draggable.element ) ) ) {
+ this._addHoverClass();
+ this._trigger( "over", event, this.ui( draggable ) );
+ }
+
+ },
+
+ _out: function( event ) {
+
+ var draggable = $.ui.ddmanager.current;
+
+ // Bail if draggable and droppable are same element
+ if ( !draggable || ( draggable.currentItem ||
+ draggable.element )[ 0 ] === this.element[ 0 ] ) {
+ return;
+ }
+
+ if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem ||
+ draggable.element ) ) ) {
+ this._removeHoverClass();
+ this._trigger( "out", event, this.ui( draggable ) );
+ }
+
+ },
+
+ _drop: function( event, custom ) {
+
+ var draggable = custom || $.ui.ddmanager.current,
+ childrenIntersection = false;
+
+ // Bail if draggable and droppable are same element
+ if ( !draggable || ( draggable.currentItem ||
+ draggable.element )[ 0 ] === this.element[ 0 ] ) {
+ return false;
+ }
+
+ this.element
+ .find( ":data(ui-droppable)" )
+ .not( ".ui-draggable-dragging" )
+ .each( function() {
+ var inst = $( this ).droppable( "instance" );
+ if (
+ inst.options.greedy &&
+ !inst.options.disabled &&
+ inst.options.scope === draggable.options.scope &&
+ inst.accept.call(
+ inst.element[ 0 ], ( draggable.currentItem || draggable.element )
+ ) &&
+ intersect(
+ draggable,
+ $.extend( inst, { offset: inst.element.offset() } ),
+ inst.options.tolerance, event
+ )
+ ) {
+ childrenIntersection = true;
+ return false; }
+ } );
+ if ( childrenIntersection ) {
+ return false;
+ }
+
+ if ( this.accept.call( this.element[ 0 ],
+ ( draggable.currentItem || draggable.element ) ) ) {
+ this._removeActiveClass();
+ this._removeHoverClass();
+
+ this._trigger( "drop", event, this.ui( draggable ) );
+ return this.element;
+ }
+
+ return false;
+
+ },
+
+ ui: function( c ) {
+ return {
+ draggable: ( c.currentItem || c.element ),
+ helper: c.helper,
+ position: c.position,
+ offset: c.positionAbs
+ };
+ },
+
+ // Extension points just to make backcompat sane and avoid duplicating logic
+ // TODO: Remove in 1.13 along with call to it below
+ _addHoverClass: function() {
+ this._addClass( "ui-droppable-hover" );
+ },
+
+ _removeHoverClass: function() {
+ this._removeClass( "ui-droppable-hover" );
+ },
+
+ _addActiveClass: function() {
+ this._addClass( "ui-droppable-active" );
+ },
+
+ _removeActiveClass: function() {
+ this._removeClass( "ui-droppable-active" );
+ }
+} );
+
+var intersect = $.ui.intersect = ( function() {
+ function isOverAxis( x, reference, size ) {
+ return ( x >= reference ) && ( x < ( reference + size ) );
+ }
+
+ return function( draggable, droppable, toleranceMode, event ) {
+
+ if ( !droppable.offset ) {
+ return false;
+ }
+
+ var x1 = ( draggable.positionAbs ||
+ draggable.position.absolute ).left + draggable.margins.left,
+ y1 = ( draggable.positionAbs ||
+ draggable.position.absolute ).top + draggable.margins.top,
+ x2 = x1 + draggable.helperProportions.width,
+ y2 = y1 + draggable.helperProportions.height,
+ l = droppable.offset.left,
+ t = droppable.offset.top,
+ r = l + droppable.proportions().width,
+ b = t + droppable.proportions().height;
+
+ switch ( toleranceMode ) {
+ case "fit":
+ return ( l <= x1 && x2 <= r && t <= y1 && y2 <= b );
+ case "intersect":
+ return ( l < x1 + ( draggable.helperProportions.width / 2 ) && // Right Half
+ x2 - ( draggable.helperProportions.width / 2 ) < r && // Left Half
+ t < y1 + ( draggable.helperProportions.height / 2 ) && // Bottom Half
+ y2 - ( draggable.helperProportions.height / 2 ) < b ); // Top Half
+ case "pointer":
+ return isOverAxis( event.pageY, t, droppable.proportions().height ) &&
+ isOverAxis( event.pageX, l, droppable.proportions().width );
+ case "touch":
+ return (
+ ( y1 >= t && y1 <= b ) || // Top edge touching
+ ( y2 >= t && y2 <= b ) || // Bottom edge touching
+ ( y1 < t && y2 > b ) // Surrounded vertically
+ ) && (
+ ( x1 >= l && x1 <= r ) || // Left edge touching
+ ( x2 >= l && x2 <= r ) || // Right edge touching
+ ( x1 < l && x2 > r ) // Surrounded horizontally
+ );
+ default:
+ return false;
+ }
+ };
+} )();
+
+/*
+ This manager tracks offsets of draggables and droppables
+*/
+$.ui.ddmanager = {
+ current: null,
+ droppables: { "default": [] },
+ prepareOffsets: function( t, event ) {
+
+ var i, j,
+ m = $.ui.ddmanager.droppables[ t.options.scope ] || [],
+ type = event ? event.type : null, // workaround for #2317
+ list = ( t.currentItem || t.element ).find( ":data(ui-droppable)" ).addBack();
+
+ droppablesLoop: for ( i = 0; i < m.length; i++ ) {
+
+ // No disabled and non-accepted
+ if ( m[ i ].options.disabled || ( t && !m[ i ].accept.call( m[ i ].element[ 0 ],
+ ( t.currentItem || t.element ) ) ) ) {
+ continue;
+ }
+
+ // Filter out elements in the current dragged item
+ for ( j = 0; j < list.length; j++ ) {
+ if ( list[ j ] === m[ i ].element[ 0 ] ) {
+ m[ i ].proportions().height = 0;
+ continue droppablesLoop;
+ }
+ }
+
+ m[ i ].visible = m[ i ].element.css( "display" ) !== "none";
+ if ( !m[ i ].visible ) {
+ continue;
+ }
+
+ // Activate the droppable if used directly from draggables
+ if ( type === "mousedown" ) {
+ m[ i ]._activate.call( m[ i ], event );
+ }
+
+ m[ i ].offset = m[ i ].element.offset();
+ m[ i ].proportions( {
+ width: m[ i ].element[ 0 ].offsetWidth,
+ height: m[ i ].element[ 0 ].offsetHeight
+ } );
+
+ }
+
+ },
+ drop: function( draggable, event ) {
+
+ var dropped = false;
+
+ // Create a copy of the droppables in case the list changes during the drop (#9116)
+ $.each( ( $.ui.ddmanager.droppables[ draggable.options.scope ] || [] ).slice(), function() {
+
+ if ( !this.options ) {
+ return;
+ }
+ if ( !this.options.disabled && this.visible &&
+ intersect( draggable, this, this.options.tolerance, event ) ) {
+ dropped = this._drop.call( this, event ) || dropped;
+ }
+
+ if ( !this.options.disabled && this.visible && this.accept.call( this.element[ 0 ],
+ ( draggable.currentItem || draggable.element ) ) ) {
+ this.isout = true;
+ this.isover = false;
+ this._deactivate.call( this, event );
+ }
+
+ } );
+ return dropped;
+
+ },
+ dragStart: function( draggable, event ) {
+
+ // Listen for scrolling so that if the dragging causes scrolling the position of the
+ // droppables can be recalculated (see #5003)
+ draggable.element.parentsUntil( "body" ).on( "scroll.droppable", function() {
+ if ( !draggable.options.refreshPositions ) {
+ $.ui.ddmanager.prepareOffsets( draggable, event );
+ }
+ } );
+ },
+ drag: function( draggable, event ) {
+
+ // If you have a highly dynamic page, you might try this option. It renders positions
+ // every time you move the mouse.
+ if ( draggable.options.refreshPositions ) {
+ $.ui.ddmanager.prepareOffsets( draggable, event );
+ }
+
+ // Run through all droppables and check their positions based on specific tolerance options
+ $.each( $.ui.ddmanager.droppables[ draggable.options.scope ] || [], function() {
+
+ if ( this.options.disabled || this.greedyChild || !this.visible ) {
+ return;
+ }
+
+ var parentInstance, scope, parent,
+ intersects = intersect( draggable, this, this.options.tolerance, event ),
+ c = !intersects && this.isover ?
+ "isout" :
+ ( intersects && !this.isover ? "isover" : null );
+ if ( !c ) {
+ return;
+ }
+
+ if ( this.options.greedy ) {
+
+ // find droppable parents with same scope
+ scope = this.options.scope;
+ parent = this.element.parents( ":data(ui-droppable)" ).filter( function() {
+ return $( this ).droppable( "instance" ).options.scope === scope;
+ } );
+
+ if ( parent.length ) {
+ parentInstance = $( parent[ 0 ] ).droppable( "instance" );
+ parentInstance.greedyChild = ( c === "isover" );
+ }
+ }
+
+ // We just moved into a greedy child
+ if ( parentInstance && c === "isover" ) {
+ parentInstance.isover = false;
+ parentInstance.isout = true;
+ parentInstance._out.call( parentInstance, event );
+ }
+
+ this[ c ] = true;
+ this[ c === "isout" ? "isover" : "isout" ] = false;
+ this[ c === "isover" ? "_over" : "_out" ].call( this, event );
+
+ // We just moved out of a greedy child
+ if ( parentInstance && c === "isout" ) {
+ parentInstance.isout = false;
+ parentInstance.isover = true;
+ parentInstance._over.call( parentInstance, event );
+ }
+ } );
+
+ },
+ dragStop: function( draggable, event ) {
+ draggable.element.parentsUntil( "body" ).off( "scroll.droppable" );
+
+ // Call prepareOffsets one final time since IE does not fire return scroll events when
+ // overflow was caused by drag (see #5003)
+ if ( !draggable.options.refreshPositions ) {
+ $.ui.ddmanager.prepareOffsets( draggable, event );
+ }
+ }
+};
+
+// DEPRECATED
+// TODO: switch return back to widget declaration at top of file when this is removed
+if ( $.uiBackCompat !== false ) {
+
+ // Backcompat for activeClass and hoverClass options
+ $.widget( "ui.droppable", $.ui.droppable, {
+ options: {
+ hoverClass: false,
+ activeClass: false
+ },
+ _addActiveClass: function() {
+ this._super();
+ if ( this.options.activeClass ) {
+ this.element.addClass( this.options.activeClass );
+ }
+ },
+ _removeActiveClass: function() {
+ this._super();
+ if ( this.options.activeClass ) {
+ this.element.removeClass( this.options.activeClass );
+ }
+ },
+ _addHoverClass: function() {
+ this._super();
+ if ( this.options.hoverClass ) {
+ this.element.addClass( this.options.hoverClass );
+ }
+ },
+ _removeHoverClass: function() {
+ this._super();
+ if ( this.options.hoverClass ) {
+ this.element.removeClass( this.options.hoverClass );
+ }
+ }
+ } );
+}
+
+var widgetsDroppable = $.ui.droppable;
+
+
+/*!
+ * jQuery UI Progressbar 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Progressbar
+//>>group: Widgets
+// jscs:disable maximumLineLength
+//>>description: Displays a status indicator for loading state, standard percentage, and other progress indicators.
+// jscs:enable maximumLineLength
+//>>docs: http://api.jqueryui.com/progressbar/
+//>>demos: http://jqueryui.com/progressbar/
+//>>css.structure: ../../themes/base/core.css
+//>>css.structure: ../../themes/base/progressbar.css
+//>>css.theme: ../../themes/base/theme.css
+
+
+
+var widgetsProgressbar = $.widget( "ui.progressbar", {
+ version: "1.12.1",
+ options: {
+ classes: {
+ "ui-progressbar": "ui-corner-all",
+ "ui-progressbar-value": "ui-corner-left",
+ "ui-progressbar-complete": "ui-corner-right"
+ },
+ max: 100,
+ value: 0,
+
+ change: null,
+ complete: null
+ },
+
+ min: 0,
+
+ _create: function() {
+
+ // Constrain initial value
+ this.oldValue = this.options.value = this._constrainedValue();
+
+ this.element.attr( {
+
+ // Only set static values; aria-valuenow and aria-valuemax are
+ // set inside _refreshValue()
+ role: "progressbar",
+ "aria-valuemin": this.min
+ } );
+ this._addClass( "ui-progressbar", "ui-widget ui-widget-content" );
+
+ this.valueDiv = $( "<div>" ).appendTo( this.element );
+ this._addClass( this.valueDiv, "ui-progressbar-value", "ui-widget-header" );
+ this._refreshValue();
+ },
+
+ _destroy: function() {
+ this.element.removeAttr( "role aria-valuemin aria-valuemax aria-valuenow" );
+
+ this.valueDiv.remove();
+ },
+
+ value: function( newValue ) {
+ if ( newValue === undefined ) {
+ return this.options.value;
+ }
+
+ this.options.value = this._constrainedValue( newValue );
+ this._refreshValue();
+ },
+
+ _constrainedValue: function( newValue ) {
+ if ( newValue === undefined ) {
+ newValue = this.options.value;
+ }
+
+ this.indeterminate = newValue === false;
+
+ // Sanitize value
+ if ( typeof newValue !== "number" ) {
+ newValue = 0;
+ }
+
+ return this.indeterminate ? false :
+ Math.min( this.options.max, Math.max( this.min, newValue ) );
+ },
+
+ _setOptions: function( options ) {
+
+ // Ensure "value" option is set after other values (like max)
+ var value = options.value;
+ delete options.value;
+
+ this._super( options );
+
+ this.options.value = this._constrainedValue( value );
+ this._refreshValue();
+ },
+
+ _setOption: function( key, value ) {
+ if ( key === "max" ) {
+
+ // Don't allow a max less than min
+ value = Math.max( this.min, value );
+ }
+ this._super( key, value );
+ },
+
+ _setOptionDisabled: function( value ) {
+ this._super( value );
+
+ this.element.attr( "aria-disabled", value );
+ this._toggleClass( null, "ui-state-disabled", !!value );
+ },
+
+ _percentage: function() {
+ return this.indeterminate ?
+ 100 :
+ 100 * ( this.options.value - this.min ) / ( this.options.max - this.min );
+ },
+
+ _refreshValue: function() {
+ var value = this.options.value,
+ percentage = this._percentage();
+
+ this.valueDiv
+ .toggle( this.indeterminate || value > this.min )
+ .width( percentage.toFixed( 0 ) + "%" );
+
+ this
+ ._toggleClass( this.valueDiv, "ui-progressbar-complete", null,
+ value === this.options.max )
+ ._toggleClass( "ui-progressbar-indeterminate", null, this.indeterminate );
+
+ if ( this.indeterminate ) {
+ this.element.removeAttr( "aria-valuenow" );
+ if ( !this.overlayDiv ) {
+ this.overlayDiv = $( "<div>" ).appendTo( this.valueDiv );
+ this._addClass( this.overlayDiv, "ui-progressbar-overlay" );
+ }
+ } else {
+ this.element.attr( {
+ "aria-valuemax": this.options.max,
+ "aria-valuenow": value
+ } );
+ if ( this.overlayDiv ) {
+ this.overlayDiv.remove();
+ this.overlayDiv = null;
+ }
+ }
+
+ if ( this.oldValue !== value ) {
+ this.oldValue = value;
+ this._trigger( "change" );
+ }
+ if ( value === this.options.max ) {
+ this._trigger( "complete" );
+ }
+ }
+} );
+
+
+/*!
+ * jQuery UI Selectable 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Selectable
+//>>group: Interactions
+//>>description: Allows groups of elements to be selected with the mouse.
+//>>docs: http://api.jqueryui.com/selectable/
+//>>demos: http://jqueryui.com/selectable/
+//>>css.structure: ../../themes/base/selectable.css
+
+
+
+var widgetsSelectable = $.widget( "ui.selectable", $.ui.mouse, {
+ version: "1.12.1",
+ options: {
+ appendTo: "body",
+ autoRefresh: true,
+ distance: 0,
+ filter: "*",
+ tolerance: "touch",
+
+ // Callbacks
+ selected: null,
+ selecting: null,
+ start: null,
+ stop: null,
+ unselected: null,
+ unselecting: null
+ },
+ _create: function() {
+ var that = this;
+
+ this._addClass( "ui-selectable" );
+
+ this.dragged = false;
+
+ // Cache selectee children based on filter
+ this.refresh = function() {
+ that.elementPos = $( that.element[ 0 ] ).offset();
+ that.selectees = $( that.options.filter, that.element[ 0 ] );
+ that._addClass( that.selectees, "ui-selectee" );
+ that.selectees.each( function() {
+ var $this = $( this ),
+ selecteeOffset = $this.offset(),
+ pos = {
+ left: selecteeOffset.left - that.elementPos.left,
+ top: selecteeOffset.top - that.elementPos.top
+ };
+ $.data( this, "selectable-item", {
+ element: this,
+ $element: $this,
+ left: pos.left,
+ top: pos.top,
+ right: pos.left + $this.outerWidth(),
+ bottom: pos.top + $this.outerHeight(),
+ startselected: false,
+ selected: $this.hasClass( "ui-selected" ),
+ selecting: $this.hasClass( "ui-selecting" ),
+ unselecting: $this.hasClass( "ui-unselecting" )
+ } );
+ } );
+ };
+ this.refresh();
+
+ this._mouseInit();
+
+ this.helper = $( "<div>" );
+ this._addClass( this.helper, "ui-selectable-helper" );
+ },
+
+ _destroy: function() {
+ this.selectees.removeData( "selectable-item" );
+ this._mouseDestroy();
+ },
+
+ _mouseStart: function( event ) {
+ var that = this,
+ options = this.options;
+
+ this.opos = [ event.pageX, event.pageY ];
+ this.elementPos = $( this.element[ 0 ] ).offset();
+
+ if ( this.options.disabled ) {
+ return;
+ }
+
+ this.selectees = $( options.filter, this.element[ 0 ] );
+
+ this._trigger( "start", event );
+
+ $( options.appendTo ).append( this.helper );
+
+ // position helper (lasso)
+ this.helper.css( {
+ "left": event.pageX,
+ "top": event.pageY,
+ "width": 0,
+ "height": 0
+ } );
+
+ if ( options.autoRefresh ) {
+ this.refresh();
+ }
+
+ this.selectees.filter( ".ui-selected" ).each( function() {
+ var selectee = $.data( this, "selectable-item" );
+ selectee.startselected = true;
+ if ( !event.metaKey && !event.ctrlKey ) {
+ that._removeClass( selectee.$element, "ui-selected" );
+ selectee.selected = false;
+ that._addClass( selectee.$element, "ui-unselecting" );
+ selectee.unselecting = true;
+
+ // selectable UNSELECTING callback
+ that._trigger( "unselecting", event, {
+ unselecting: selectee.element
+ } );
+ }
+ } );
+
+ $( event.target ).parents().addBack().each( function() {
+ var doSelect,
+ selectee = $.data( this, "selectable-item" );
+ if ( selectee ) {
+ doSelect = ( !event.metaKey && !event.ctrlKey ) ||
+ !selectee.$element.hasClass( "ui-selected" );
+ that._removeClass( selectee.$element, doSelect ? "ui-unselecting" : "ui-selected" )
+ ._addClass( selectee.$element, doSelect ? "ui-selecting" : "ui-unselecting" );
+ selectee.unselecting = !doSelect;
+ selectee.selecting = doSelect;
+ selectee.selected = doSelect;
+
+ // selectable (UN)SELECTING callback
+ if ( doSelect ) {
+ that._trigger( "selecting", event, {
+ selecting: selectee.element
+ } );
+ } else {
+ that._trigger( "unselecting", event, {
+ unselecting: selectee.element
+ } );
+ }
+ return false;
+ }
+ } );
+
+ },
+
+ _mouseDrag: function( event ) {
+
+ this.dragged = true;
+
+ if ( this.options.disabled ) {
+ return;
+ }
+
+ var tmp,
+ that = this,
+ options = this.options,
+ x1 = this.opos[ 0 ],
+ y1 = this.opos[ 1 ],
+ x2 = event.pageX,
+ y2 = event.pageY;
+
+ if ( x1 > x2 ) { tmp = x2; x2 = x1; x1 = tmp; }
+ if ( y1 > y2 ) { tmp = y2; y2 = y1; y1 = tmp; }
+ this.helper.css( { left: x1, top: y1, width: x2 - x1, height: y2 - y1 } );
+
+ this.selectees.each( function() {
+ var selectee = $.data( this, "selectable-item" ),
+ hit = false,
+ offset = {};
+
+ //prevent helper from being selected if appendTo: selectable
+ if ( !selectee || selectee.element === that.element[ 0 ] ) {
+ return;
+ }
+
+ offset.left = selectee.left + that.elementPos.left;
+ offset.right = selectee.right + that.elementPos.left;
+ offset.top = selectee.top + that.elementPos.top;
+ offset.bottom = selectee.bottom + that.elementPos.top;
+
+ if ( options.tolerance === "touch" ) {
+ hit = ( !( offset.left > x2 || offset.right < x1 || offset.top > y2 ||
+ offset.bottom < y1 ) );
+ } else if ( options.tolerance === "fit" ) {
+ hit = ( offset.left > x1 && offset.right < x2 && offset.top > y1 &&
+ offset.bottom < y2 );
+ }
+
+ if ( hit ) {
+
+ // SELECT
+ if ( selectee.selected ) {
+ that._removeClass( selectee.$element, "ui-selected" );
+ selectee.selected = false;
+ }
+ if ( selectee.unselecting ) {
+ that._removeClass( selectee.$element, "ui-unselecting" );
+ selectee.unselecting = false;
+ }
+ if ( !selectee.selecting ) {
+ that._addClass( selectee.$element, "ui-selecting" );
+ selectee.selecting = true;
+
+ // selectable SELECTING callback
+ that._trigger( "selecting", event, {
+ selecting: selectee.element
+ } );
+ }
+ } else {
+
+ // UNSELECT
+ if ( selectee.selecting ) {
+ if ( ( event.metaKey || event.ctrlKey ) && selectee.startselected ) {
+ that._removeClass( selectee.$element, "ui-selecting" );
+ selectee.selecting = false;
+ that._addClass( selectee.$element, "ui-selected" );
+ selectee.selected = true;
+ } else {
+ that._removeClass( selectee.$element, "ui-selecting" );
+ selectee.selecting = false;
+ if ( selectee.startselected ) {
+ that._addClass( selectee.$element, "ui-unselecting" );
+ selectee.unselecting = true;
+ }
+
+ // selectable UNSELECTING callback
+ that._trigger( "unselecting", event, {
+ unselecting: selectee.element
+ } );
+ }
+ }
+ if ( selectee.selected ) {
+ if ( !event.metaKey && !event.ctrlKey && !selectee.startselected ) {
+ that._removeClass( selectee.$element, "ui-selected" );
+ selectee.selected = false;
+
+ that._addClass( selectee.$element, "ui-unselecting" );
+ selectee.unselecting = true;
+
+ // selectable UNSELECTING callback
+ that._trigger( "unselecting", event, {
+ unselecting: selectee.element
+ } );
+ }
+ }
+ }
+ } );
+
+ return false;
+ },
+
+ _mouseStop: function( event ) {
+ var that = this;
+
+ this.dragged = false;
+
+ $( ".ui-unselecting", this.element[ 0 ] ).each( function() {
+ var selectee = $.data( this, "selectable-item" );
+ that._removeClass( selectee.$element, "ui-unselecting" );
+ selectee.unselecting = false;
+ selectee.startselected = false;
+ that._trigger( "unselected", event, {
+ unselected: selectee.element
+ } );
+ } );
+ $( ".ui-selecting", this.element[ 0 ] ).each( function() {
+ var selectee = $.data( this, "selectable-item" );
+ that._removeClass( selectee.$element, "ui-selecting" )
+ ._addClass( selectee.$element, "ui-selected" );
+ selectee.selecting = false;
+ selectee.selected = true;
+ selectee.startselected = true;
+ that._trigger( "selected", event, {
+ selected: selectee.element
+ } );
+ } );
+ this._trigger( "stop", event );
+
+ this.helper.remove();
+
+ return false;
+ }
+
+} );
+
+
+/*!
+ * jQuery UI Selectmenu 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Selectmenu
+//>>group: Widgets
+// jscs:disable maximumLineLength
+//>>description: Duplicates and extends the functionality of a native HTML select element, allowing it to be customizable in behavior and appearance far beyond the limitations of a native select.
+// jscs:enable maximumLineLength
+//>>docs: http://api.jqueryui.com/selectmenu/
+//>>demos: http://jqueryui.com/selectmenu/
+//>>css.structure: ../../themes/base/core.css
+//>>css.structure: ../../themes/base/selectmenu.css, ../../themes/base/button.css
+//>>css.theme: ../../themes/base/theme.css
+
+
+
+var widgetsSelectmenu = $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
+ version: "1.12.1",
+ defaultElement: "<select>",
+ options: {
+ appendTo: null,
+ classes: {
+ "ui-selectmenu-button-open": "ui-corner-top",
+ "ui-selectmenu-button-closed": "ui-corner-all"
+ },
+ disabled: null,
+ icons: {
+ button: "ui-icon-triangle-1-s"
+ },
+ position: {
+ my: "left top",
+ at: "left bottom",
+ collision: "none"
+ },
+ width: false,
+
+ // Callbacks
+ change: null,
+ close: null,
+ focus: null,
+ open: null,
+ select: null
+ },
+
+ _create: function() {
+ var selectmenuId = this.element.uniqueId().attr( "id" );
+ this.ids = {
+ element: selectmenuId,
+ button: selectmenuId + "-button",
+ menu: selectmenuId + "-menu"
+ };
+
+ this._drawButton();
+ this._drawMenu();
+ this._bindFormResetHandler();
+
+ this._rendered = false;
+ this.menuItems = $();
+ },
+
+ _drawButton: function() {
+ var icon,
+ that = this,
+ item = this._parseOption(
+ this.element.find( "option:selected" ),
+ this.element[ 0 ].selectedIndex
+ );
+
+ // Associate existing label with the new button
+ this.labels = this.element.labels().attr( "for", this.ids.button );
+ this._on( this.labels, {
+ click: function( event ) {
+ this.button.focus();
+ event.preventDefault();
+ }
+ } );
+
+ // Hide original select element
+ this.element.hide();
+
+ // Create button
+ this.button = $( "<span>", {
+ tabindex: this.options.disabled ? -1 : 0,
+ id: this.ids.button,
+ role: "combobox",
+ "aria-expanded": "false",
+ "aria-autocomplete": "list",
+ "aria-owns": this.ids.menu,
+ "aria-haspopup": "true",
+ title: this.element.attr( "title" )
+ } )
+ .insertAfter( this.element );
+
+ this._addClass( this.button, "ui-selectmenu-button ui-selectmenu-button-closed",
+ "ui-button ui-widget" );
+
+ icon = $( "<span>" ).appendTo( this.button );
+ this._addClass( icon, "ui-selectmenu-icon", "ui-icon " + this.options.icons.button );
+ this.buttonItem = this._renderButtonItem( item )
+ .appendTo( this.button );
+
+ if ( this.options.width !== false ) {
+ this._resizeButton();
+ }
+
+ this._on( this.button, this._buttonEvents );
+ this.button.one( "focusin", function() {
+
+ // Delay rendering the menu items until the button receives focus.
+ // The menu may have already been rendered via a programmatic open.
+ if ( !that._rendered ) {
+ that._refreshMenu();
+ }
+ } );
+ },
+
+ _drawMenu: function() {
+ var that = this;
+
+ // Create menu
+ this.menu = $( "<ul>", {
+ "aria-hidden": "true",
+ "aria-labelledby": this.ids.button,
+ id: this.ids.menu
+ } );
+
+ // Wrap menu
+ this.menuWrap = $( "<div>" ).append( this.menu );
+ this._addClass( this.menuWrap, "ui-selectmenu-menu", "ui-front" );
+ this.menuWrap.appendTo( this._appendTo() );
+
+ // Initialize menu widget
+ this.menuInstance = this.menu
+ .menu( {
+ classes: {
+ "ui-menu": "ui-corner-bottom"
+ },
+ role: "listbox",
+ select: function( event, ui ) {
+ event.preventDefault();
+
+ // Support: IE8
+ // If the item was selected via a click, the text selection
+ // will be destroyed in IE
+ that._setSelection();
+
+ that._select( ui.item.data( "ui-selectmenu-item" ), event );
+ },
+ focus: function( event, ui ) {
+ var item = ui.item.data( "ui-selectmenu-item" );
+
+ // Prevent inital focus from firing and check if its a newly focused item
+ if ( that.focusIndex != null && item.index !== that.focusIndex ) {
+ that._trigger( "focus", event, { item: item } );
+ if ( !that.isOpen ) {
+ that._select( item, event );
+ }
+ }
+ that.focusIndex = item.index;
+
+ that.button.attr( "aria-activedescendant",
+ that.menuItems.eq( item.index ).attr( "id" ) );
+ }
+ } )
+ .menu( "instance" );
+
+ // Don't close the menu on mouseleave
+ this.menuInstance._off( this.menu, "mouseleave" );
+
+ // Cancel the menu's collapseAll on document click
+ this.menuInstance._closeOnDocumentClick = function() {
+ return false;
+ };
+
+ // Selects often contain empty items, but never contain dividers
+ this.menuInstance._isDivider = function() {
+ return false;
+ };
+ },
+
+ refresh: function() {
+ this._refreshMenu();
+ this.buttonItem.replaceWith(
+ this.buttonItem = this._renderButtonItem(
+
+ // Fall back to an empty object in case there are no options
+ this._getSelectedItem().data( "ui-selectmenu-item" ) || {}
+ )
+ );
+ if ( this.options.width === null ) {
+ this._resizeButton();
+ }
+ },
+
+ _refreshMenu: function() {
+ var item,
+ options = this.element.find( "option" );
+
+ this.menu.empty();
+
+ this._parseOptions( options );
+ this._renderMenu( this.menu, this.items );
+
+ this.menuInstance.refresh();
+ this.menuItems = this.menu.find( "li" )
+ .not( ".ui-selectmenu-optgroup" )
+ .find( ".ui-menu-item-wrapper" );
+
+ this._rendered = true;
+
+ if ( !options.length ) {
+ return;
+ }
+
+ item = this._getSelectedItem();
+
+ // Update the menu to have the correct item focused
+ this.menuInstance.focus( null, item );
+ this._setAria( item.data( "ui-selectmenu-item" ) );
+
+ // Set disabled state
+ this._setOption( "disabled", this.element.prop( "disabled" ) );
+ },
+
+ open: function( event ) {
+ if ( this.options.disabled ) {
+ return;
+ }
+
+ // If this is the first time the menu is being opened, render the items
+ if ( !this._rendered ) {
+ this._refreshMenu();
+ } else {
+
+ // Menu clears focus on close, reset focus to selected item
+ this._removeClass( this.menu.find( ".ui-state-active" ), null, "ui-state-active" );
+ this.menuInstance.focus( null, this._getSelectedItem() );
+ }
+
+ // If there are no options, don't open the menu
+ if ( !this.menuItems.length ) {
+ return;
+ }
+
+ this.isOpen = true;
+ this._toggleAttr();
+ this._resizeMenu();
+ this._position();
+
+ this._on( this.document, this._documentClick );
+
+ this._trigger( "open", event );
+ },
+
+ _position: function() {
+ this.menuWrap.position( $.extend( { of: this.button }, this.options.position ) );
+ },
+
+ close: function( event ) {
+ if ( !this.isOpen ) {
+ return;
+ }
+
+ this.isOpen = false;
+ this._toggleAttr();
+
+ this.range = null;
+ this._off( this.document );
+
+ this._trigger( "close", event );
+ },
+
+ widget: function() {
+ return this.button;
+ },
+
+ menuWidget: function() {
+ return this.menu;
+ },
+
+ _renderButtonItem: function( item ) {
+ var buttonItem = $( "<span>" );
+
+ this._setText( buttonItem, item.label );
+ this._addClass( buttonItem, "ui-selectmenu-text" );
+
+ return buttonItem;
+ },
+
+ _renderMenu: function( ul, items ) {
+ var that = this,
+ currentOptgroup = "";
+
+ $.each( items, function( index, item ) {
+ var li;
+
+ if ( item.optgroup !== currentOptgroup ) {
+ li = $( "<li>", {
+ text: item.optgroup
+ } );
+ that._addClass( li, "ui-selectmenu-optgroup", "ui-menu-divider" +
+ ( item.element.parent( "optgroup" ).prop( "disabled" ) ?
+ " ui-state-disabled" :
+ "" ) );
+
+ li.appendTo( ul );
+
+ currentOptgroup = item.optgroup;
+ }
+
+ that._renderItemData( ul, item );
+ } );
+ },
+
+ _renderItemData: function( ul, item ) {
+ return this._renderItem( ul, item ).data( "ui-selectmenu-item", item );
+ },
+
+ _renderItem: function( ul, item ) {
+ var li = $( "<li>" ),
+ wrapper = $( "<div>", {
+ title: item.element.attr( "title" )
+ } );
+
+ if ( item.disabled ) {
+ this._addClass( li, null, "ui-state-disabled" );
+ }
+ this._setText( wrapper, item.label );
+
+ return li.append( wrapper ).appendTo( ul );
+ },
+
+ _setText: function( element, value ) {
+ if ( value ) {
+ element.text( value );
+ } else {
+ element.html( "&#160;" );
+ }
+ },
+
+ _move: function( direction, event ) {
+ var item, next,
+ filter = ".ui-menu-item";
+
+ if ( this.isOpen ) {
+ item = this.menuItems.eq( this.focusIndex ).parent( "li" );
+ } else {
+ item = this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" );
+ filter += ":not(.ui-state-disabled)";
+ }
+
+ if ( direction === "first" || direction === "last" ) {
+ next = item[ direction === "first" ? "prevAll" : "nextAll" ]( filter ).eq( -1 );
+ } else {
+ next = item[ direction + "All" ]( filter ).eq( 0 );
+ }
+
+ if ( next.length ) {
+ this.menuInstance.focus( event, next );
+ }
+ },
+
+ _getSelectedItem: function() {
+ return this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" );
+ },
+
+ _toggle: function( event ) {
+ this[ this.isOpen ? "close" : "open" ]( event );
+ },
+
+ _setSelection: function() {
+ var selection;
+
+ if ( !this.range ) {
+ return;
+ }
+
+ if ( window.getSelection ) {
+ selection = window.getSelection();
+ selection.removeAllRanges();
+ selection.addRange( this.range );
+
+ // Support: IE8
+ } else {
+ this.range.select();
+ }
+
+ // Support: IE
+ // Setting the text selection kills the button focus in IE, but
+ // restoring the focus doesn't kill the selection.
+ this.button.focus();
+ },
+
+ _documentClick: {
+ mousedown: function( event ) {
+ if ( !this.isOpen ) {
+ return;
+ }
+
+ if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" +
+ $.ui.escapeSelector( this.ids.button ) ).length ) {
+ this.close( event );
+ }
+ }
+ },
+
+ _buttonEvents: {
+
+ // Prevent text selection from being reset when interacting with the selectmenu (#10144)
+ mousedown: function() {
+ var selection;
+
+ if ( window.getSelection ) {
+ selection = window.getSelection();
+ if ( selection.rangeCount ) {
+ this.range = selection.getRangeAt( 0 );
+ }
+
+ // Support: IE8
+ } else {
+ this.range = document.selection.createRange();
+ }
+ },
+
+ click: function( event ) {
+ this._setSelection();
+ this._toggle( event );
+ },
+
+ keydown: function( event ) {
+ var preventDefault = true;
+ switch ( event.keyCode ) {
+ case $.ui.keyCode.TAB:
+ case $.ui.keyCode.ESCAPE:
+ this.close( event );
+ preventDefault = false;
+ break;
+ case $.ui.keyCode.ENTER:
+ if ( this.isOpen ) {
+ this._selectFocusedItem( event );
+ }
+ break;
+ case $.ui.keyCode.UP:
+ if ( event.altKey ) {
+ this._toggle( event );
+ } else {
+ this._move( "prev", event );
+ }
+ break;
+ case $.ui.keyCode.DOWN:
+ if ( event.altKey ) {
+ this._toggle( event );
+ } else {
+ this._move( "next", event );
+ }
+ break;
+ case $.ui.keyCode.SPACE:
+ if ( this.isOpen ) {
+ this._selectFocusedItem( event );
+ } else {
+ this._toggle( event );
+ }
+ break;
+ case $.ui.keyCode.LEFT:
+ this._move( "prev", event );
+ break;
+ case $.ui.keyCode.RIGHT:
+ this._move( "next", event );
+ break;
+ case $.ui.keyCode.HOME:
+ case $.ui.keyCode.PAGE_UP:
+ this._move( "first", event );
+ break;
+ case $.ui.keyCode.END:
+ case $.ui.keyCode.PAGE_DOWN:
+ this._move( "last", event );
+ break;
+ default:
+ this.menu.trigger( event );
+ preventDefault = false;
+ }
+
+ if ( preventDefault ) {
+ event.preventDefault();
+ }
+ }
+ },
+
+ _selectFocusedItem: function( event ) {
+ var item = this.menuItems.eq( this.focusIndex ).parent( "li" );
+ if ( !item.hasClass( "ui-state-disabled" ) ) {
+ this._select( item.data( "ui-selectmenu-item" ), event );
+ }
+ },
+
+ _select: function( item, event ) {
+ var oldIndex = this.element[ 0 ].selectedIndex;
+
+ // Change native select element
+ this.element[ 0 ].selectedIndex = item.index;
+ this.buttonItem.replaceWith( this.buttonItem = this._renderButtonItem( item ) );
+ this._setAria( item );
+ this._trigger( "select", event, { item: item } );
+
+ if ( item.index !== oldIndex ) {
+ this._trigger( "change", event, { item: item } );
+ }
+
+ this.close( event );
+ },
+
+ _setAria: function( item ) {
+ var id = this.menuItems.eq( item.index ).attr( "id" );
+
+ this.button.attr( {
+ "aria-labelledby": id,
+ "aria-activedescendant": id
+ } );
+ this.menu.attr( "aria-activedescendant", id );
+ },
+
+ _setOption: function( key, value ) {
+ if ( key === "icons" ) {
+ var icon = this.button.find( "span.ui-icon" );
+ this._removeClass( icon, null, this.options.icons.button )
+ ._addClass( icon, null, value.button );
+ }
+
+ this._super( key, value );
+
+ if ( key === "appendTo" ) {
+ this.menuWrap.appendTo( this._appendTo() );
+ }
+
+ if ( key === "width" ) {
+ this._resizeButton();
+ }
+ },
+
+ _setOptionDisabled: function( value ) {
+ this._super( value );
+
+ this.menuInstance.option( "disabled", value );
+ this.button.attr( "aria-disabled", value );
+ this._toggleClass( this.button, null, "ui-state-disabled", value );
+
+ this.element.prop( "disabled", value );
+ if ( value ) {
+ this.button.attr( "tabindex", -1 );
+ this.close();
+ } else {
+ this.button.attr( "tabindex", 0 );
+ }
+ },
+
+ _appendTo: function() {
+ var element = this.options.appendTo;
+
+ if ( element ) {
+ element = element.jquery || element.nodeType ?
+ $( element ) :
+ this.document.find( element ).eq( 0 );
+ }
+
+ if ( !element || !element[ 0 ] ) {
+ element = this.element.closest( ".ui-front, dialog" );
+ }
+
+ if ( !element.length ) {
+ element = this.document[ 0 ].body;
+ }
+
+ return element;
+ },
+
+ _toggleAttr: function() {
+ this.button.attr( "aria-expanded", this.isOpen );
+
+ // We can't use two _toggleClass() calls here, because we need to make sure
+ // we always remove classes first and add them second, otherwise if both classes have the
+ // same theme class, it will be removed after we add it.
+ this._removeClass( this.button, "ui-selectmenu-button-" +
+ ( this.isOpen ? "closed" : "open" ) )
+ ._addClass( this.button, "ui-selectmenu-button-" +
+ ( this.isOpen ? "open" : "closed" ) )
+ ._toggleClass( this.menuWrap, "ui-selectmenu-open", null, this.isOpen );
+
+ this.menu.attr( "aria-hidden", !this.isOpen );
+ },
+
+ _resizeButton: function() {
+ var width = this.options.width;
+
+ // For `width: false`, just remove inline style and stop
+ if ( width === false ) {
+ this.button.css( "width", "" );
+ return;
+ }
+
+ // For `width: null`, match the width of the original element
+ if ( width === null ) {
+ width = this.element.show().outerWidth();
+ this.element.hide();
+ }
+
+ this.button.outerWidth( width );
+ },
+
+ _resizeMenu: function() {
+ this.menu.outerWidth( Math.max(
+ this.button.outerWidth(),
+
+ // Support: IE10
+ // IE10 wraps long text (possibly a rounding bug)
+ // so we add 1px to avoid the wrapping
+ this.menu.width( "" ).outerWidth() + 1
+ ) );
+ },
+
+ _getCreateOptions: function() {
+ var options = this._super();
+
+ options.disabled = this.element.prop( "disabled" );
+
+ return options;
+ },
+
+ _parseOptions: function( options ) {
+ var that = this,
+ data = [];
+ options.each( function( index, item ) {
+ data.push( that._parseOption( $( item ), index ) );
+ } );
+ this.items = data;
+ },
+
+ _parseOption: function( option, index ) {
+ var optgroup = option.parent( "optgroup" );
+
+ return {
+ element: option,
+ index: index,
+ value: option.val(),
+ label: option.text(),
+ optgroup: optgroup.attr( "label" ) || "",
+ disabled: optgroup.prop( "disabled" ) || option.prop( "disabled" )
+ };
+ },
+
+ _destroy: function() {
+ this._unbindFormResetHandler();
+ this.menuWrap.remove();
+ this.button.remove();
+ this.element.show();
+ this.element.removeUniqueId();
+ this.labels.attr( "for", this.ids.element );
+ }
+} ] );
+
+
+/*!
+ * jQuery UI Slider 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Slider
+//>>group: Widgets
+//>>description: Displays a flexible slider with ranges and accessibility via keyboard.
+//>>docs: http://api.jqueryui.com/slider/
+//>>demos: http://jqueryui.com/slider/
+//>>css.structure: ../../themes/base/core.css
+//>>css.structure: ../../themes/base/slider.css
+//>>css.theme: ../../themes/base/theme.css
+
+
+
+var widgetsSlider = $.widget( "ui.slider", $.ui.mouse, {
+ version: "1.12.1",
+ widgetEventPrefix: "slide",
+
+ options: {
+ animate: false,
+ classes: {
+ "ui-slider": "ui-corner-all",
+ "ui-slider-handle": "ui-corner-all",
+
+ // Note: ui-widget-header isn't the most fittingly semantic framework class for this
+ // element, but worked best visually with a variety of themes
+ "ui-slider-range": "ui-corner-all ui-widget-header"
+ },
+ distance: 0,
+ max: 100,
+ min: 0,
+ orientation: "horizontal",
+ range: false,
+ step: 1,
+ value: 0,
+ values: null,
+
+ // Callbacks
+ change: null,
+ slide: null,
+ start: null,
+ stop: null
+ },
+
+ // Number of pages in a slider
+ // (how many times can you page up/down to go through the whole range)
+ numPages: 5,
+
+ _create: function() {
+ this._keySliding = false;
+ this._mouseSliding = false;
+ this._animateOff = true;
+ this._handleIndex = null;
+ this._detectOrientation();
+ this._mouseInit();
+ this._calculateNewMax();
+
+ this._addClass( "ui-slider ui-slider-" + this.orientation,
+ "ui-widget ui-widget-content" );
+
+ this._refresh();
+
+ this._animateOff = false;
+ },
+
+ _refresh: function() {
+ this._createRange();
+ this._createHandles();
+ this._setupEvents();
+ this._refreshValue();
+ },
+
+ _createHandles: function() {
+ var i, handleCount,
+ options = this.options,
+ existingHandles = this.element.find( ".ui-slider-handle" ),
+ handle = "<span tabindex='0'></span>",
+ handles = [];
+
+ handleCount = ( options.values && options.values.length ) || 1;
+
+ if ( existingHandles.length > handleCount ) {
+ existingHandles.slice( handleCount ).remove();
+ existingHandles = existingHandles.slice( 0, handleCount );
+ }
+
+ for ( i = existingHandles.length; i < handleCount; i++ ) {
+ handles.push( handle );
+ }
+
+ this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );
+
+ this._addClass( this.handles, "ui-slider-handle", "ui-state-default" );
+
+ this.handle = this.handles.eq( 0 );
+
+ this.handles.each( function( i ) {
+ $( this )
+ .data( "ui-slider-handle-index", i )
+ .attr( "tabIndex", 0 );
+ } );
+ },
+
+ _createRange: function() {
+ var options = this.options;
+
+ if ( options.range ) {
+ if ( options.range === true ) {
+ if ( !options.values ) {
+ options.values = [ this._valueMin(), this._valueMin() ];
+ } else if ( options.values.length && options.values.length !== 2 ) {
+ options.values = [ options.values[ 0 ], options.values[ 0 ] ];
+ } else if ( $.isArray( options.values ) ) {
+ options.values = options.values.slice( 0 );
+ }
+ }
+
+ if ( !this.range || !this.range.length ) {
+ this.range = $( "<div>" )
+ .appendTo( this.element );
+
+ this._addClass( this.range, "ui-slider-range" );
+ } else {
+ this._removeClass( this.range, "ui-slider-range-min ui-slider-range-max" );
+
+ // Handle range switching from true to min/max
+ this.range.css( {
+ "left": "",
+ "bottom": ""
+ } );
+ }
+ if ( options.range === "min" || options.range === "max" ) {
+ this._addClass( this.range, "ui-slider-range-" + options.range );
+ }
+ } else {
+ if ( this.range ) {
+ this.range.remove();
+ }
+ this.range = null;
+ }
+ },
+
+ _setupEvents: function() {
+ this._off( this.handles );
+ this._on( this.handles, this._handleEvents );
+ this._hoverable( this.handles );
+ this._focusable( this.handles );
+ },
+
+ _destroy: function() {
+ this.handles.remove();
+ if ( this.range ) {
+ this.range.remove();
+ }
+
+ this._mouseDestroy();
+ },
+
+ _mouseCapture: function( event ) {
+ var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
+ that = this,
+ o = this.options;
+
+ if ( o.disabled ) {
+ return false;
+ }
+
+ this.elementSize = {
+ width: this.element.outerWidth(),
+ height: this.element.outerHeight()
+ };
+ this.elementOffset = this.element.offset();
+
+ position = { x: event.pageX, y: event.pageY };
+ normValue = this._normValueFromMouse( position );
+ distance = this._valueMax() - this._valueMin() + 1;
+ this.handles.each( function( i ) {
+ var thisDistance = Math.abs( normValue - that.values( i ) );
+ if ( ( distance > thisDistance ) ||
+ ( distance === thisDistance &&
+ ( i === that._lastChangedValue || that.values( i ) === o.min ) ) ) {
+ distance = thisDistance;
+ closestHandle = $( this );
+ index = i;
+ }
+ } );
+
+ allowed = this._start( event, index );
+ if ( allowed === false ) {
+ return false;
+ }
+ this._mouseSliding = true;
+
+ this._handleIndex = index;
+
+ this._addClass( closestHandle, null, "ui-state-active" );
+ closestHandle.trigger( "focus" );
+
+ offset = closestHandle.offset();
+ mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" );
+ this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
+ left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
+ top: event.pageY - offset.top -
+ ( closestHandle.height() / 2 ) -
+ ( parseInt( closestHandle.css( "borderTopWidth" ), 10 ) || 0 ) -
+ ( parseInt( closestHandle.css( "borderBottomWidth" ), 10 ) || 0 ) +
+ ( parseInt( closestHandle.css( "marginTop" ), 10 ) || 0 )
+ };
+
+ if ( !this.handles.hasClass( "ui-state-hover" ) ) {
+ this._slide( event, index, normValue );
+ }
+ this._animateOff = true;
+ return true;
+ },
+
+ _mouseStart: function() {
+ return true;
+ },
+
+ _mouseDrag: function( event ) {
+ var position = { x: event.pageX, y: event.pageY },
+ normValue = this._normValueFromMouse( position );
+
+ this._slide( event, this._handleIndex, normValue );
+
+ return false;
+ },
+
+ _mouseStop: function( event ) {
+ this._removeClass( this.handles, null, "ui-state-active" );
+ this._mouseSliding = false;
+
+ this._stop( event, this._handleIndex );
+ this._change( event, this._handleIndex );
+
+ this._handleIndex = null;
+ this._clickOffset = null;
+ this._animateOff = false;
+
+ return false;
+ },
+
+ _detectOrientation: function() {
+ this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
+ },
+
+ _normValueFromMouse: function( position ) {
+ var pixelTotal,
+ pixelMouse,
+ percentMouse,
+ valueTotal,
+ valueMouse;
+
+ if ( this.orientation === "horizontal" ) {
+ pixelTotal = this.elementSize.width;
+ pixelMouse = position.x - this.elementOffset.left -
+ ( this._clickOffset ? this._clickOffset.left : 0 );
+ } else {
+ pixelTotal = this.elementSize.height;
+ pixelMouse = position.y - this.elementOffset.top -
+ ( this._clickOffset ? this._clickOffset.top : 0 );
+ }
+
+ percentMouse = ( pixelMouse / pixelTotal );
+ if ( percentMouse > 1 ) {
+ percentMouse = 1;
+ }
+ if ( percentMouse < 0 ) {
+ percentMouse = 0;
+ }
+ if ( this.orientation === "vertical" ) {
+ percentMouse = 1 - percentMouse;
+ }
+
+ valueTotal = this._valueMax() - this._valueMin();
+ valueMouse = this._valueMin() + percentMouse * valueTotal;
+
+ return this._trimAlignValue( valueMouse );
+ },
+
+ _uiHash: function( index, value, values ) {
+ var uiHash = {
+ handle: this.handles[ index ],
+ handleIndex: index,
+ value: value !== undefined ? value : this.value()
+ };
+
+ if ( this._hasMultipleValues() ) {
+ uiHash.value = value !== undefined ? value : this.values( index );
+ uiHash.values = values || this.values();
+ }
+
+ return uiHash;
+ },
+
+ _hasMultipleValues: function() {
+ return this.options.values && this.options.values.length;
+ },
+
+ _start: function( event, index ) {
+ return this._trigger( "start", event, this._uiHash( index ) );
+ },
+
+ _slide: function( event, index, newVal ) {
+ var allowed, otherVal,
+ currentValue = this.value(),
+ newValues = this.values();
+
+ if ( this._hasMultipleValues() ) {
+ otherVal = this.values( index ? 0 : 1 );
+ currentValue = this.values( index );
+
+ if ( this.options.values.length === 2 && this.options.range === true ) {
+ newVal = index === 0 ? Math.min( otherVal, newVal ) : Math.max( otherVal, newVal );
+ }
+
+ newValues[ index ] = newVal;
+ }
+
+ if ( newVal === currentValue ) {
+ return;
+ }
+
+ allowed = this._trigger( "slide", event, this._uiHash( index, newVal, newValues ) );
+
+ // A slide can be canceled by returning false from the slide callback
+ if ( allowed === false ) {
+ return;
+ }
+
+ if ( this._hasMultipleValues() ) {
+ this.values( index, newVal );
+ } else {
+ this.value( newVal );
+ }
+ },
+
+ _stop: function( event, index ) {
+ this._trigger( "stop", event, this._uiHash( index ) );
+ },
+
+ _change: function( event, index ) {
+ if ( !this._keySliding && !this._mouseSliding ) {
+
+ //store the last changed value index for reference when handles overlap
+ this._lastChangedValue = index;
+ this._trigger( "change", event, this._uiHash( index ) );
+ }
+ },
+
+ value: function( newValue ) {
+ if ( arguments.length ) {
+ this.options.value = this._trimAlignValue( newValue );
+ this._refreshValue();
+ this._change( null, 0 );
+ return;
+ }
+
+ return this._value();
+ },
+
+ values: function( index, newValue ) {
+ var vals,
+ newValues,
+ i;
+
+ if ( arguments.length > 1 ) {
+ this.options.values[ index ] = this._trimAlignValue( newValue );
+ this._refreshValue();
+ this._change( null, index );
+ return;
+ }
+
+ if ( arguments.length ) {
+ if ( $.isArray( arguments[ 0 ] ) ) {
+ vals = this.options.values;
+ newValues = arguments[ 0 ];
+ for ( i = 0; i < vals.length; i += 1 ) {
+ vals[ i ] = this._trimAlignValue( newValues[ i ] );
+ this._change( null, i );
+ }
+ this._refreshValue();
+ } else {
+ if ( this._hasMultipleValues() ) {
+ return this._values( index );
+ } else {
+ return this.value();
+ }
+ }
+ } else {
+ return this._values();
+ }
+ },
+
+ _setOption: function( key, value ) {
+ var i,
+ valsLength = 0;
+
+ if ( key === "range" && this.options.range === true ) {
+ if ( value === "min" ) {
+ this.options.value = this._values( 0 );
+ this.options.values = null;
+ } else if ( value === "max" ) {
+ this.options.value = this._values( this.options.values.length - 1 );
+ this.options.values = null;
+ }
+ }
+
+ if ( $.isArray( this.options.values ) ) {
+ valsLength = this.options.values.length;
+ }
+
+ this._super( key, value );
+
+ switch ( key ) {
+ case "orientation":
+ this._detectOrientation();
+ this._removeClass( "ui-slider-horizontal ui-slider-vertical" )
+ ._addClass( "ui-slider-" + this.orientation );
+ this._refreshValue();
+ if ( this.options.range ) {
+ this._refreshRange( value );
+ }
+
+ // Reset positioning from previous orientation
+ this.handles.css( value === "horizontal" ? "bottom" : "left", "" );
+ break;
+ case "value":
+ this._animateOff = true;
+ this._refreshValue();
+ this._change( null, 0 );
+ this._animateOff = false;
+ break;
+ case "values":
+ this._animateOff = true;
+ this._refreshValue();
+
+ // Start from the last handle to prevent unreachable handles (#9046)
+ for ( i = valsLength - 1; i >= 0; i-- ) {
+ this._change( null, i );
+ }
+ this._animateOff = false;
+ break;
+ case "step":
+ case "min":
+ case "max":
+ this._animateOff = true;
+ this._calculateNewMax();
+ this._refreshValue();
+ this._animateOff = false;
+ break;
+ case "range":
+ this._animateOff = true;
+ this._refresh();
+ this._animateOff = false;
+ break;
+ }
+ },
+
+ _setOptionDisabled: function( value ) {
+ this._super( value );
+
+ this._toggleClass( null, "ui-state-disabled", !!value );
+ },
+
+ //internal value getter
+ // _value() returns value trimmed by min and max, aligned by step
+ _value: function() {
+ var val = this.options.value;
+ val = this._trimAlignValue( val );
+
+ return val;
+ },
+
+ //internal values getter
+ // _values() returns array of values trimmed by min and max, aligned by step
+ // _values( index ) returns single value trimmed by min and max, aligned by step
+ _values: function( index ) {
+ var val,
+ vals,
+ i;
+
+ if ( arguments.length ) {
+ val = this.options.values[ index ];
+ val = this._trimAlignValue( val );
+
+ return val;
+ } else if ( this._hasMultipleValues() ) {
+
+ // .slice() creates a copy of the array
+ // this copy gets trimmed by min and max and then returned
+ vals = this.options.values.slice();
+ for ( i = 0; i < vals.length; i += 1 ) {
+ vals[ i ] = this._trimAlignValue( vals[ i ] );
+ }
+
+ return vals;
+ } else {
+ return [];
+ }
+ },
+
+ // Returns the step-aligned value that val is closest to, between (inclusive) min and max
+ _trimAlignValue: function( val ) {
+ if ( val <= this._valueMin() ) {
+ return this._valueMin();
+ }
+ if ( val >= this._valueMax() ) {
+ return this._valueMax();
+ }
+ var step = ( this.options.step > 0 ) ? this.options.step : 1,
+ valModStep = ( val - this._valueMin() ) % step,
+ alignValue = val - valModStep;
+
+ if ( Math.abs( valModStep ) * 2 >= step ) {
+ alignValue += ( valModStep > 0 ) ? step : ( -step );
+ }
+
+ // Since JavaScript has problems with large floats, round
+ // the final value to 5 digits after the decimal point (see #4124)
+ return parseFloat( alignValue.toFixed( 5 ) );
+ },
+
+ _calculateNewMax: function() {
+ var max = this.options.max,
+ min = this._valueMin(),
+ step = this.options.step,
+ aboveMin = Math.round( ( max - min ) / step ) * step;
+ max = aboveMin + min;
+ if ( max > this.options.max ) {
+
+ //If max is not divisible by step, rounding off may increase its value
+ max -= step;
+ }
+ this.max = parseFloat( max.toFixed( this._precision() ) );
+ },
+
+ _precision: function() {
+ var precision = this._precisionOf( this.options.step );
+ if ( this.options.min !== null ) {
+ precision = Math.max( precision, this._precisionOf( this.options.min ) );
+ }
+ return precision;
+ },
+
+ _precisionOf: function( num ) {
+ var str = num.toString(),
+ decimal = str.indexOf( "." );
+ return decimal === -1 ? 0 : str.length - decimal - 1;
+ },
+
+ _valueMin: function() {
+ return this.options.min;
+ },
+
+ _valueMax: function() {
+ return this.max;
+ },
+
+ _refreshRange: function( orientation ) {
+ if ( orientation === "vertical" ) {
+ this.range.css( { "width": "", "left": "" } );
+ }
+ if ( orientation === "horizontal" ) {
+ this.range.css( { "height": "", "bottom": "" } );
+ }
+ },
+
+ _refreshValue: function() {
+ var lastValPercent, valPercent, value, valueMin, valueMax,
+ oRange = this.options.range,
+ o = this.options,
+ that = this,
+ animate = ( !this._animateOff ) ? o.animate : false,
+ _set = {};
+
+ if ( this._hasMultipleValues() ) {
+ this.handles.each( function( i ) {
+ valPercent = ( that.values( i ) - that._valueMin() ) / ( that._valueMax() -
+ that._valueMin() ) * 100;
+ _set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
+ $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
+ if ( that.options.range === true ) {
+ if ( that.orientation === "horizontal" ) {
+ if ( i === 0 ) {
+ that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
+ left: valPercent + "%"
+ }, o.animate );
+ }
+ if ( i === 1 ) {
+ that.range[ animate ? "animate" : "css" ]( {
+ width: ( valPercent - lastValPercent ) + "%"
+ }, {
+ queue: false,
+ duration: o.animate
+ } );
+ }
+ } else {
+ if ( i === 0 ) {
+ that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
+ bottom: ( valPercent ) + "%"
+ }, o.animate );
+ }
+ if ( i === 1 ) {
+ that.range[ animate ? "animate" : "css" ]( {
+ height: ( valPercent - lastValPercent ) + "%"
+ }, {
+ queue: false,
+ duration: o.animate
+ } );
+ }
+ }
+ }
+ lastValPercent = valPercent;
+ } );
+ } else {
+ value = this.value();
+ valueMin = this._valueMin();
+ valueMax = this._valueMax();
+ valPercent = ( valueMax !== valueMin ) ?
+ ( value - valueMin ) / ( valueMax - valueMin ) * 100 :
+ 0;
+ _set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
+ this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
+
+ if ( oRange === "min" && this.orientation === "horizontal" ) {
+ this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
+ width: valPercent + "%"
+ }, o.animate );
+ }
+ if ( oRange === "max" && this.orientation === "horizontal" ) {
+ this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
+ width: ( 100 - valPercent ) + "%"
+ }, o.animate );
+ }
+ if ( oRange === "min" && this.orientation === "vertical" ) {
+ this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
+ height: valPercent + "%"
+ }, o.animate );
+ }
+ if ( oRange === "max" && this.orientation === "vertical" ) {
+ this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
+ height: ( 100 - valPercent ) + "%"
+ }, o.animate );
+ }
+ }
+ },
+
+ _handleEvents: {
+ keydown: function( event ) {
+ var allowed, curVal, newVal, step,
+ index = $( event.target ).data( "ui-slider-handle-index" );
+
+ switch ( event.keyCode ) {
+ case $.ui.keyCode.HOME:
+ case $.ui.keyCode.END:
+ case $.ui.keyCode.PAGE_UP:
+ case $.ui.keyCode.PAGE_DOWN:
+ case $.ui.keyCode.UP:
+ case $.ui.keyCode.RIGHT:
+ case $.ui.keyCode.DOWN:
+ case $.ui.keyCode.LEFT:
+ event.preventDefault();
+ if ( !this._keySliding ) {
+ this._keySliding = true;
+ this._addClass( $( event.target ), null, "ui-state-active" );
+ allowed = this._start( event, index );
+ if ( allowed === false ) {
+ return;
+ }
+ }
+ break;
+ }
+
+ step = this.options.step;
+ if ( this._hasMultipleValues() ) {
+ curVal = newVal = this.values( index );
+ } else {
+ curVal = newVal = this.value();
+ }
+
+ switch ( event.keyCode ) {
+ case $.ui.keyCode.HOME:
+ newVal = this._valueMin();
+ break;
+ case $.ui.keyCode.END:
+ newVal = this._valueMax();
+ break;
+ case $.ui.keyCode.PAGE_UP:
+ newVal = this._trimAlignValue(
+ curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages )
+ );
+ break;
+ case $.ui.keyCode.PAGE_DOWN:
+ newVal = this._trimAlignValue(
+ curVal - ( ( this._valueMax() - this._valueMin() ) / this.numPages ) );
+ break;
+ case $.ui.keyCode.UP:
+ case $.ui.keyCode.RIGHT:
+ if ( curVal === this._valueMax() ) {
+ return;
+ }
+ newVal = this._trimAlignValue( curVal + step );
+ break;
+ case $.ui.keyCode.DOWN:
+ case $.ui.keyCode.LEFT:
+ if ( curVal === this._valueMin() ) {
+ return;
+ }
+ newVal = this._trimAlignValue( curVal - step );
+ break;
+ }
+
+ this._slide( event, index, newVal );
+ },
+ keyup: function( event ) {
+ var index = $( event.target ).data( "ui-slider-handle-index" );
+
+ if ( this._keySliding ) {
+ this._keySliding = false;
+ this._stop( event, index );
+ this._change( event, index );
+ this._removeClass( $( event.target ), null, "ui-state-active" );
+ }
+ }
+ }
+} );
+
+
+/*!
+ * jQuery UI Sortable 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Sortable
+//>>group: Interactions
+//>>description: Enables items in a list to be sorted using the mouse.
+//>>docs: http://api.jqueryui.com/sortable/
+//>>demos: http://jqueryui.com/sortable/
+//>>css.structure: ../../themes/base/sortable.css
+
+
+
+var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, {
+ version: "1.12.1",
+ widgetEventPrefix: "sort",
+ ready: false,
+ options: {
+ appendTo: "parent",
+ axis: false,
+ connectWith: false,
+ containment: false,
+ cursor: "auto",
+ cursorAt: false,
+ dropOnEmpty: true,
+ forcePlaceholderSize: false,
+ forceHelperSize: false,
+ grid: false,
+ handle: false,
+ helper: "original",
+ items: "> *",
+ opacity: false,
+ placeholder: false,
+ revert: false,
+ scroll: true,
+ scrollSensitivity: 20,
+ scrollSpeed: 20,
+ scope: "default",
+ tolerance: "intersect",
+ zIndex: 1000,
+
+ // Callbacks
+ activate: null,
+ beforeStop: null,
+ change: null,
+ deactivate: null,
+ out: null,
+ over: null,
+ receive: null,
+ remove: null,
+ sort: null,
+ start: null,
+ stop: null,
+ update: null
+ },
+
+ _isOverAxis: function( x, reference, size ) {
+ return ( x >= reference ) && ( x < ( reference + size ) );
+ },
+
+ _isFloating: function( item ) {
+ return ( /left|right/ ).test( item.css( "float" ) ) ||
+ ( /inline|table-cell/ ).test( item.css( "display" ) );
+ },
+
+ _create: function() {
+ this.containerCache = {};
+ this._addClass( "ui-sortable" );
+
+ //Get the items
+ this.refresh();
+
+ //Let's determine the parent's offset
+ this.offset = this.element.offset();
+
+ //Initialize mouse events for interaction
+ this._mouseInit();
+
+ this._setHandleClassName();
+
+ //We're ready to go
+ this.ready = true;
+
+ },
+
+ _setOption: function( key, value ) {
+ this._super( key, value );
+
+ if ( key === "handle" ) {
+ this._setHandleClassName();
+ }
+ },
+
+ _setHandleClassName: function() {
+ var that = this;
+ this._removeClass( this.element.find( ".ui-sortable-handle" ), "ui-sortable-handle" );
+ $.each( this.items, function() {
+ that._addClass(
+ this.instance.options.handle ?
+ this.item.find( this.instance.options.handle ) :
+ this.item,
+ "ui-sortable-handle"
+ );
+ } );
+ },
+
+ _destroy: function() {
+ this._mouseDestroy();
+
+ for ( var i = this.items.length - 1; i >= 0; i-- ) {
+ this.items[ i ].item.removeData( this.widgetName + "-item" );
+ }
+
+ return this;
+ },
+
+ _mouseCapture: function( event, overrideHandle ) {
+ var currentItem = null,
+ validHandle = false,
+ that = this;
+
+ if ( this.reverting ) {
+ return false;
+ }
+
+ if ( this.options.disabled || this.options.type === "static" ) {
+ return false;
+ }
+
+ //We have to refresh the items data once first
+ this._refreshItems( event );
+
+ //Find out if the clicked node (or one of its parents) is a actual item in this.items
+ $( event.target ).parents().each( function() {
+ if ( $.data( this, that.widgetName + "-item" ) === that ) {
+ currentItem = $( this );
+ return false;
+ }
+ } );
+ if ( $.data( event.target, that.widgetName + "-item" ) === that ) {
+ currentItem = $( event.target );
+ }
+
+ if ( !currentItem ) {
+ return false;
+ }
+ if ( this.options.handle && !overrideHandle ) {
+ $( this.options.handle, currentItem ).find( "*" ).addBack().each( function() {
+ if ( this === event.target ) {
+ validHandle = true;
+ }
+ } );
+ if ( !validHandle ) {
+ return false;
+ }
+ }
+
+ this.currentItem = currentItem;
+ this._removeCurrentsFromItems();
+ return true;
+
+ },
+
+ _mouseStart: function( event, overrideHandle, noActivation ) {
+
+ var i, body,
+ o = this.options;
+
+ this.currentContainer = this;
+
+ //We only need to call refreshPositions, because the refreshItems call has been moved to
+ // mouseCapture
+ this.refreshPositions();
+
+ //Create and append the visible helper
+ this.helper = this._createHelper( event );
+
+ //Cache the helper size
+ this._cacheHelperProportions();
+
+ /*
+ * - Position generation -
+ * This block generates everything position related - it's the core of draggables.
+ */
+
+ //Cache the margins of the original element
+ this._cacheMargins();
+
+ //Get the next scrolling parent
+ this.scrollParent = this.helper.scrollParent();
+
+ //The element's absolute position on the page minus margins
+ this.offset = this.currentItem.offset();
+ this.offset = {
+ top: this.offset.top - this.margins.top,
+ left: this.offset.left - this.margins.left
+ };
+
+ $.extend( this.offset, {
+ click: { //Where the click happened, relative to the element
+ left: event.pageX - this.offset.left,
+ top: event.pageY - this.offset.top
+ },
+ parent: this._getParentOffset(),
+
+ // This is a relative to absolute position minus the actual position calculation -
+ // only used for relative positioned helper
+ relative: this._getRelativeOffset()
+ } );
+
+ // Only after we got the offset, we can change the helper's position to absolute
+ // TODO: Still need to figure out a way to make relative sorting possible
+ this.helper.css( "position", "absolute" );
+ this.cssPosition = this.helper.css( "position" );
+
+ //Generate the original position
+ this.originalPosition = this._generatePosition( event );
+ this.originalPageX = event.pageX;
+ this.originalPageY = event.pageY;
+
+ //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
+ ( o.cursorAt && this._adjustOffsetFromHelper( o.cursorAt ) );
+
+ //Cache the former DOM position
+ this.domPosition = {
+ prev: this.currentItem.prev()[ 0 ],
+ parent: this.currentItem.parent()[ 0 ]
+ };
+
+ // If the helper is not the original, hide the original so it's not playing any role during
+ // the drag, won't cause anything bad this way
+ if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {
+ this.currentItem.hide();
+ }
+
+ //Create the placeholder
+ this._createPlaceholder();
+
+ //Set a containment if given in the options
+ if ( o.containment ) {
+ this._setContainment();
+ }
+
+ if ( o.cursor && o.cursor !== "auto" ) { // cursor option
+ body = this.document.find( "body" );
+
+ // Support: IE
+ this.storedCursor = body.css( "cursor" );
+ body.css( "cursor", o.cursor );
+
+ this.storedStylesheet =
+ $( "<style>*{ cursor: " + o.cursor + " !important; }</style>" ).appendTo( body );
+ }
+
+ if ( o.opacity ) { // opacity option
+ if ( this.helper.css( "opacity" ) ) {
+ this._storedOpacity = this.helper.css( "opacity" );
+ }
+ this.helper.css( "opacity", o.opacity );
+ }
+
+ if ( o.zIndex ) { // zIndex option
+ if ( this.helper.css( "zIndex" ) ) {
+ this._storedZIndex = this.helper.css( "zIndex" );
+ }
+ this.helper.css( "zIndex", o.zIndex );
+ }
+
+ //Prepare scrolling
+ if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
+ this.scrollParent[ 0 ].tagName !== "HTML" ) {
+ this.overflowOffset = this.scrollParent.offset();
+ }
+
+ //Call callbacks
+ this._trigger( "start", event, this._uiHash() );
+
+ //Recache the helper size
+ if ( !this._preserveHelperProportions ) {
+ this._cacheHelperProportions();
+ }
+
+ //Post "activate" events to possible containers
+ if ( !noActivation ) {
+ for ( i = this.containers.length - 1; i >= 0; i-- ) {
+ this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );
+ }
+ }
+
+ //Prepare possible droppables
+ if ( $.ui.ddmanager ) {
+ $.ui.ddmanager.current = this;
+ }
+
+ if ( $.ui.ddmanager && !o.dropBehaviour ) {
+ $.ui.ddmanager.prepareOffsets( this, event );
+ }
+
+ this.dragging = true;
+
+ this._addClass( this.helper, "ui-sortable-helper" );
+
+ // Execute the drag once - this causes the helper not to be visiblebefore getting its
+ // correct position
+ this._mouseDrag( event );
+ return true;
+
+ },
+
+ _mouseDrag: function( event ) {
+ var i, item, itemElement, intersection,
+ o = this.options,
+ scrolled = false;
+
+ //Compute the helpers position
+ this.position = this._generatePosition( event );
+ this.positionAbs = this._convertPositionTo( "absolute" );
+
+ if ( !this.lastPositionAbs ) {
+ this.lastPositionAbs = this.positionAbs;
+ }
+
+ //Do scrolling
+ if ( this.options.scroll ) {
+ if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
+ this.scrollParent[ 0 ].tagName !== "HTML" ) {
+
+ if ( ( this.overflowOffset.top + this.scrollParent[ 0 ].offsetHeight ) -
+ event.pageY < o.scrollSensitivity ) {
+ this.scrollParent[ 0 ].scrollTop =
+ scrolled = this.scrollParent[ 0 ].scrollTop + o.scrollSpeed;
+ } else if ( event.pageY - this.overflowOffset.top < o.scrollSensitivity ) {
+ this.scrollParent[ 0 ].scrollTop =
+ scrolled = this.scrollParent[ 0 ].scrollTop - o.scrollSpeed;
+ }
+
+ if ( ( this.overflowOffset.left + this.scrollParent[ 0 ].offsetWidth ) -
+ event.pageX < o.scrollSensitivity ) {
+ this.scrollParent[ 0 ].scrollLeft = scrolled =
+ this.scrollParent[ 0 ].scrollLeft + o.scrollSpeed;
+ } else if ( event.pageX - this.overflowOffset.left < o.scrollSensitivity ) {
+ this.scrollParent[ 0 ].scrollLeft = scrolled =
+ this.scrollParent[ 0 ].scrollLeft - o.scrollSpeed;
+ }
+
+ } else {
+
+ if ( event.pageY - this.document.scrollTop() < o.scrollSensitivity ) {
+ scrolled = this.document.scrollTop( this.document.scrollTop() - o.scrollSpeed );
+ } else if ( this.window.height() - ( event.pageY - this.document.scrollTop() ) <
+ o.scrollSensitivity ) {
+ scrolled = this.document.scrollTop( this.document.scrollTop() + o.scrollSpeed );
+ }
+
+ if ( event.pageX - this.document.scrollLeft() < o.scrollSensitivity ) {
+ scrolled = this.document.scrollLeft(
+ this.document.scrollLeft() - o.scrollSpeed
+ );
+ } else if ( this.window.width() - ( event.pageX - this.document.scrollLeft() ) <
+ o.scrollSensitivity ) {
+ scrolled = this.document.scrollLeft(
+ this.document.scrollLeft() + o.scrollSpeed
+ );
+ }
+
+ }
+
+ if ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) {
+ $.ui.ddmanager.prepareOffsets( this, event );
+ }
+ }
+
+ //Regenerate the absolute position used for position checks
+ this.positionAbs = this._convertPositionTo( "absolute" );
+
+ //Set the helper position
+ if ( !this.options.axis || this.options.axis !== "y" ) {
+ this.helper[ 0 ].style.left = this.position.left + "px";
+ }
+ if ( !this.options.axis || this.options.axis !== "x" ) {
+ this.helper[ 0 ].style.top = this.position.top + "px";
+ }
+
+ //Rearrange
+ for ( i = this.items.length - 1; i >= 0; i-- ) {
+
+ //Cache variables and intersection, continue if no intersection
+ item = this.items[ i ];
+ itemElement = item.item[ 0 ];
+ intersection = this._intersectsWithPointer( item );
+ if ( !intersection ) {
+ continue;
+ }
+
+ // Only put the placeholder inside the current Container, skip all
+ // items from other containers. This works because when moving
+ // an item from one container to another the
+ // currentContainer is switched before the placeholder is moved.
+ //
+ // Without this, moving items in "sub-sortables" can cause
+ // the placeholder to jitter between the outer and inner container.
+ if ( item.instance !== this.currentContainer ) {
+ continue;
+ }
+
+ // Cannot intersect with itself
+ // no useless actions that have been done before
+ // no action if the item moved is the parent of the item checked
+ if ( itemElement !== this.currentItem[ 0 ] &&
+ this.placeholder[ intersection === 1 ? "next" : "prev" ]()[ 0 ] !== itemElement &&
+ !$.contains( this.placeholder[ 0 ], itemElement ) &&
+ ( this.options.type === "semi-dynamic" ?
+ !$.contains( this.element[ 0 ], itemElement ) :
+ true
+ )
+ ) {
+
+ this.direction = intersection === 1 ? "down" : "up";
+
+ if ( this.options.tolerance === "pointer" || this._intersectsWithSides( item ) ) {
+ this._rearrange( event, item );
+ } else {
+ break;
+ }
+
+ this._trigger( "change", event, this._uiHash() );
+ break;
+ }
+ }
+
+ //Post events to containers
+ this._contactContainers( event );
+
+ //Interconnect with droppables
+ if ( $.ui.ddmanager ) {
+ $.ui.ddmanager.drag( this, event );
+ }
+
+ //Call callbacks
+ this._trigger( "sort", event, this._uiHash() );
+
+ this.lastPositionAbs = this.positionAbs;
+ return false;
+
+ },
+
+ _mouseStop: function( event, noPropagation ) {
+
+ if ( !event ) {
+ return;
+ }
+
+ //If we are using droppables, inform the manager about the drop
+ if ( $.ui.ddmanager && !this.options.dropBehaviour ) {
+ $.ui.ddmanager.drop( this, event );
+ }
+
+ if ( this.options.revert ) {
+ var that = this,
+ cur = this.placeholder.offset(),
+ axis = this.options.axis,
+ animation = {};
+
+ if ( !axis || axis === "x" ) {
+ animation.left = cur.left - this.offset.parent.left - this.margins.left +
+ ( this.offsetParent[ 0 ] === this.document[ 0 ].body ?
+ 0 :
+ this.offsetParent[ 0 ].scrollLeft
+ );
+ }
+ if ( !axis || axis === "y" ) {
+ animation.top = cur.top - this.offset.parent.top - this.margins.top +
+ ( this.offsetParent[ 0 ] === this.document[ 0 ].body ?
+ 0 :
+ this.offsetParent[ 0 ].scrollTop
+ );
+ }
+ this.reverting = true;
+ $( this.helper ).animate(
+ animation,
+ parseInt( this.options.revert, 10 ) || 500,
+ function() {
+ that._clear( event );
+ }
+ );
+ } else {
+ this._clear( event, noPropagation );
+ }
+
+ return false;
+
+ },
+
+ cancel: function() {
+
+ if ( this.dragging ) {
+
+ this._mouseUp( new $.Event( "mouseup", { target: null } ) );
+
+ if ( this.options.helper === "original" ) {
+ this.currentItem.css( this._storedCSS );
+ this._removeClass( this.currentItem, "ui-sortable-helper" );
+ } else {
+ this.currentItem.show();
+ }
+
+ //Post deactivating events to containers
+ for ( var i = this.containers.length - 1; i >= 0; i-- ) {
+ this.containers[ i ]._trigger( "deactivate", null, this._uiHash( this ) );
+ if ( this.containers[ i ].containerCache.over ) {
+ this.containers[ i ]._trigger( "out", null, this._uiHash( this ) );
+ this.containers[ i ].containerCache.over = 0;
+ }
+ }
+
+ }
+
+ if ( this.placeholder ) {
+
+ //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,
+ // it unbinds ALL events from the original node!
+ if ( this.placeholder[ 0 ].parentNode ) {
+ this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );
+ }
+ if ( this.options.helper !== "original" && this.helper &&
+ this.helper[ 0 ].parentNode ) {
+ this.helper.remove();
+ }
+
+ $.extend( this, {
+ helper: null,
+ dragging: false,
+ reverting: false,
+ _noFinalSort: null
+ } );
+
+ if ( this.domPosition.prev ) {
+ $( this.domPosition.prev ).after( this.currentItem );
+ } else {
+ $( this.domPosition.parent ).prepend( this.currentItem );
+ }
+ }
+
+ return this;
+
+ },
+
+ serialize: function( o ) {
+
+ var items = this._getItemsAsjQuery( o && o.connected ),
+ str = [];
+ o = o || {};
+
+ $( items ).each( function() {
+ var res = ( $( o.item || this ).attr( o.attribute || "id" ) || "" )
+ .match( o.expression || ( /(.+)[\-=_](.+)/ ) );
+ if ( res ) {
+ str.push(
+ ( o.key || res[ 1 ] + "[]" ) +
+ "=" + ( o.key && o.expression ? res[ 1 ] : res[ 2 ] ) );
+ }
+ } );
+
+ if ( !str.length && o.key ) {
+ str.push( o.key + "=" );
+ }
+
+ return str.join( "&" );
+
+ },
+
+ toArray: function( o ) {
+
+ var items = this._getItemsAsjQuery( o && o.connected ),
+ ret = [];
+
+ o = o || {};
+
+ items.each( function() {
+ ret.push( $( o.item || this ).attr( o.attribute || "id" ) || "" );
+ } );
+ return ret;
+
+ },
+
+ /* Be careful with the following core functions */
+ _intersectsWith: function( item ) {
+
+ var x1 = this.positionAbs.left,
+ x2 = x1 + this.helperProportions.width,
+ y1 = this.positionAbs.top,
+ y2 = y1 + this.helperProportions.height,
+ l = item.left,
+ r = l + item.width,
+ t = item.top,
+ b = t + item.height,
+ dyClick = this.offset.click.top,
+ dxClick = this.offset.click.left,
+ isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t &&
+ ( y1 + dyClick ) < b ),
+ isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l &&
+ ( x1 + dxClick ) < r ),
+ isOverElement = isOverElementHeight && isOverElementWidth;
+
+ if ( this.options.tolerance === "pointer" ||
+ this.options.forcePointerForContainers ||
+ ( this.options.tolerance !== "pointer" &&
+ this.helperProportions[ this.floating ? "width" : "height" ] >
+ item[ this.floating ? "width" : "height" ] )
+ ) {
+ return isOverElement;
+ } else {
+
+ return ( l < x1 + ( this.helperProportions.width / 2 ) && // Right Half
+ x2 - ( this.helperProportions.width / 2 ) < r && // Left Half
+ t < y1 + ( this.helperProportions.height / 2 ) && // Bottom Half
+ y2 - ( this.helperProportions.height / 2 ) < b ); // Top Half
+
+ }
+ },
+
+ _intersectsWithPointer: function( item ) {
+ var verticalDirection, horizontalDirection,
+ isOverElementHeight = ( this.options.axis === "x" ) ||
+ this._isOverAxis(
+ this.positionAbs.top + this.offset.click.top, item.top, item.height ),
+ isOverElementWidth = ( this.options.axis === "y" ) ||
+ this._isOverAxis(
+ this.positionAbs.left + this.offset.click.left, item.left, item.width ),
+ isOverElement = isOverElementHeight && isOverElementWidth;
+
+ if ( !isOverElement ) {
+ return false;
+ }
+
+ verticalDirection = this._getDragVerticalDirection();
+ horizontalDirection = this._getDragHorizontalDirection();
+
+ return this.floating ?
+ ( ( horizontalDirection === "right" || verticalDirection === "down" ) ? 2 : 1 )
+ : ( verticalDirection && ( verticalDirection === "down" ? 2 : 1 ) );
+
+ },
+
+ _intersectsWithSides: function( item ) {
+
+ var isOverBottomHalf = this._isOverAxis( this.positionAbs.top +
+ this.offset.click.top, item.top + ( item.height / 2 ), item.height ),
+ isOverRightHalf = this._isOverAxis( this.positionAbs.left +
+ this.offset.click.left, item.left + ( item.width / 2 ), item.width ),
+ verticalDirection = this._getDragVerticalDirection(),
+ horizontalDirection = this._getDragHorizontalDirection();
+
+ if ( this.floating && horizontalDirection ) {
+ return ( ( horizontalDirection === "right" && isOverRightHalf ) ||
+ ( horizontalDirection === "left" && !isOverRightHalf ) );
+ } else {
+ return verticalDirection && ( ( verticalDirection === "down" && isOverBottomHalf ) ||
+ ( verticalDirection === "up" && !isOverBottomHalf ) );
+ }
+
+ },
+
+ _getDragVerticalDirection: function() {
+ var delta = this.positionAbs.top - this.lastPositionAbs.top;
+ return delta !== 0 && ( delta > 0 ? "down" : "up" );
+ },
+
+ _getDragHorizontalDirection: function() {
+ var delta = this.positionAbs.left - this.lastPositionAbs.left;
+ return delta !== 0 && ( delta > 0 ? "right" : "left" );
+ },
+
+ refresh: function( event ) {
+ this._refreshItems( event );
+ this._setHandleClassName();
+ this.refreshPositions();
+ return this;
+ },
+
+ _connectWith: function() {
+ var options = this.options;
+ return options.connectWith.constructor === String ?
+ [ options.connectWith ] :
+ options.connectWith;
+ },
+
+ _getItemsAsjQuery: function( connected ) {
+
+ var i, j, cur, inst,
+ items = [],
+ queries = [],
+ connectWith = this._connectWith();
+
+ if ( connectWith && connected ) {
+ for ( i = connectWith.length - 1; i >= 0; i-- ) {
+ cur = $( connectWith[ i ], this.document[ 0 ] );
+ for ( j = cur.length - 1; j >= 0; j-- ) {
+ inst = $.data( cur[ j ], this.widgetFullName );
+ if ( inst && inst !== this && !inst.options.disabled ) {
+ queries.push( [ $.isFunction( inst.options.items ) ?
+ inst.options.items.call( inst.element ) :
+ $( inst.options.items, inst.element )
+ .not( ".ui-sortable-helper" )
+ .not( ".ui-sortable-placeholder" ), inst ] );
+ }
+ }
+ }
+ }
+
+ queries.push( [ $.isFunction( this.options.items ) ?
+ this.options.items
+ .call( this.element, null, { options: this.options, item: this.currentItem } ) :
+ $( this.options.items, this.element )
+ .not( ".ui-sortable-helper" )
+ .not( ".ui-sortable-placeholder" ), this ] );
+
+ function addItems() {
+ items.push( this );
+ }
+ for ( i = queries.length - 1; i >= 0; i-- ) {
+ queries[ i ][ 0 ].each( addItems );
+ }
+
+ return $( items );
+
+ },
+
+ _removeCurrentsFromItems: function() {
+
+ var list = this.currentItem.find( ":data(" + this.widgetName + "-item)" );
+
+ this.items = $.grep( this.items, function( item ) {
+ for ( var j = 0; j < list.length; j++ ) {
+ if ( list[ j ] === item.item[ 0 ] ) {
+ return false;
+ }
+ }
+ return true;
+ } );
+
+ },
+
+ _refreshItems: function( event ) {
+
+ this.items = [];
+ this.containers = [ this ];
+
+ var i, j, cur, inst, targetData, _queries, item, queriesLength,
+ items = this.items,
+ queries = [ [ $.isFunction( this.options.items ) ?
+ this.options.items.call( this.element[ 0 ], event, { item: this.currentItem } ) :
+ $( this.options.items, this.element ), this ] ],
+ connectWith = this._connectWith();
+
+ //Shouldn't be run the first time through due to massive slow-down
+ if ( connectWith && this.ready ) {
+ for ( i = connectWith.length - 1; i >= 0; i-- ) {
+ cur = $( connectWith[ i ], this.document[ 0 ] );
+ for ( j = cur.length - 1; j >= 0; j-- ) {
+ inst = $.data( cur[ j ], this.widgetFullName );
+ if ( inst && inst !== this && !inst.options.disabled ) {
+ queries.push( [ $.isFunction( inst.options.items ) ?
+ inst.options.items
+ .call( inst.element[ 0 ], event, { item: this.currentItem } ) :
+ $( inst.options.items, inst.element ), inst ] );
+ this.containers.push( inst );
+ }
+ }
+ }
+ }
+
+ for ( i = queries.length - 1; i >= 0; i-- ) {
+ targetData = queries[ i ][ 1 ];
+ _queries = queries[ i ][ 0 ];
+
+ for ( j = 0, queriesLength = _queries.length; j < queriesLength; j++ ) {
+ item = $( _queries[ j ] );
+
+ // Data for target checking (mouse manager)
+ item.data( this.widgetName + "-item", targetData );
+
+ items.push( {
+ item: item,
+ instance: targetData,
+ width: 0, height: 0,
+ left: 0, top: 0
+ } );
+ }
+ }
+
+ },
+
+ refreshPositions: function( fast ) {
+
+ // Determine whether items are being displayed horizontally
+ this.floating = this.items.length ?
+ this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) :
+ false;
+
+ //This has to be redone because due to the item being moved out/into the offsetParent,
+ // the offsetParent's position will change
+ if ( this.offsetParent && this.helper ) {
+ this.offset.parent = this._getParentOffset();
+ }
+
+ var i, item, t, p;
+
+ for ( i = this.items.length - 1; i >= 0; i-- ) {
+ item = this.items[ i ];
+
+ //We ignore calculating positions of all connected containers when we're not over them
+ if ( item.instance !== this.currentContainer && this.currentContainer &&
+ item.item[ 0 ] !== this.currentItem[ 0 ] ) {
+ continue;
+ }
+
+ t = this.options.toleranceElement ?
+ $( this.options.toleranceElement, item.item ) :
+ item.item;
+
+ if ( !fast ) {
+ item.width = t.outerWidth();
+ item.height = t.outerHeight();
+ }
+
+ p = t.offset();
+ item.left = p.left;
+ item.top = p.top;
+ }
+
+ if ( this.options.custom && this.options.custom.refreshContainers ) {
+ this.options.custom.refreshContainers.call( this );
+ } else {
+ for ( i = this.containers.length - 1; i >= 0; i-- ) {
+ p = this.containers[ i ].element.offset();
+ this.containers[ i ].containerCache.left = p.left;
+ this.containers[ i ].containerCache.top = p.top;
+ this.containers[ i ].containerCache.width =
+ this.containers[ i ].element.outerWidth();
+ this.containers[ i ].containerCache.height =
+ this.containers[ i ].element.outerHeight();
+ }
+ }
+
+ return this;
+ },
+
+ _createPlaceholder: function( that ) {
+ that = that || this;
+ var className,
+ o = that.options;
+
+ if ( !o.placeholder || o.placeholder.constructor === String ) {
+ className = o.placeholder;
+ o.placeholder = {
+ element: function() {
+
+ var nodeName = that.currentItem[ 0 ].nodeName.toLowerCase(),
+ element = $( "<" + nodeName + ">", that.document[ 0 ] );
+
+ that._addClass( element, "ui-sortable-placeholder",
+ className || that.currentItem[ 0 ].className )
+ ._removeClass( element, "ui-sortable-helper" );
+
+ if ( nodeName === "tbody" ) {
+ that._createTrPlaceholder(
+ that.currentItem.find( "tr" ).eq( 0 ),
+ $( "<tr>", that.document[ 0 ] ).appendTo( element )
+ );
+ } else if ( nodeName === "tr" ) {
+ that._createTrPlaceholder( that.currentItem, element );
+ } else if ( nodeName === "img" ) {
+ element.attr( "src", that.currentItem.attr( "src" ) );
+ }
+
+ if ( !className ) {
+ element.css( "visibility", "hidden" );
+ }
+
+ return element;
+ },
+ update: function( container, p ) {
+
+ // 1. If a className is set as 'placeholder option, we don't force sizes -
+ // the class is responsible for that
+ // 2. The option 'forcePlaceholderSize can be enabled to force it even if a
+ // class name is specified
+ if ( className && !o.forcePlaceholderSize ) {
+ return;
+ }
+
+ //If the element doesn't have a actual height by itself (without styles coming
+ // from a stylesheet), it receives the inline height from the dragged item
+ if ( !p.height() ) {
+ p.height(
+ that.currentItem.innerHeight() -
+ parseInt( that.currentItem.css( "paddingTop" ) || 0, 10 ) -
+ parseInt( that.currentItem.css( "paddingBottom" ) || 0, 10 ) );
+ }
+ if ( !p.width() ) {
+ p.width(
+ that.currentItem.innerWidth() -
+ parseInt( that.currentItem.css( "paddingLeft" ) || 0, 10 ) -
+ parseInt( that.currentItem.css( "paddingRight" ) || 0, 10 ) );
+ }
+ }
+ };
+ }
+
+ //Create the placeholder
+ that.placeholder = $( o.placeholder.element.call( that.element, that.currentItem ) );
+
+ //Append it after the actual current item
+ that.currentItem.after( that.placeholder );
+
+ //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
+ o.placeholder.update( that, that.placeholder );
+
+ },
+
+ _createTrPlaceholder: function( sourceTr, targetTr ) {
+ var that = this;
+
+ sourceTr.children().each( function() {
+ $( "<td>&#160;</td>", that.document[ 0 ] )
+ .attr( "colspan", $( this ).attr( "colspan" ) || 1 )
+ .appendTo( targetTr );
+ } );
+ },
+
+ _contactContainers: function( event ) {
+ var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom,
+ floating, axis,
+ innermostContainer = null,
+ innermostIndex = null;
+
+ // Get innermost container that intersects with item
+ for ( i = this.containers.length - 1; i >= 0; i-- ) {
+
+ // Never consider a container that's located within the item itself
+ if ( $.contains( this.currentItem[ 0 ], this.containers[ i ].element[ 0 ] ) ) {
+ continue;
+ }
+
+ if ( this._intersectsWith( this.containers[ i ].containerCache ) ) {
+
+ // If we've already found a container and it's more "inner" than this, then continue
+ if ( innermostContainer &&
+ $.contains(
+ this.containers[ i ].element[ 0 ],
+ innermostContainer.element[ 0 ] ) ) {
+ continue;
+ }
+
+ innermostContainer = this.containers[ i ];
+ innermostIndex = i;
+
+ } else {
+
+ // container doesn't intersect. trigger "out" event if necessary
+ if ( this.containers[ i ].containerCache.over ) {
+ this.containers[ i ]._trigger( "out", event, this._uiHash( this ) );
+ this.containers[ i ].containerCache.over = 0;
+ }
+ }
+
+ }
+
+ // If no intersecting containers found, return
+ if ( !innermostContainer ) {
+ return;
+ }
+
+ // Move the item into the container if it's not there already
+ if ( this.containers.length === 1 ) {
+ if ( !this.containers[ innermostIndex ].containerCache.over ) {
+ this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) );
+ this.containers[ innermostIndex ].containerCache.over = 1;
+ }
+ } else {
+
+ // When entering a new container, we will find the item with the least distance and
+ // append our item near it
+ dist = 10000;
+ itemWithLeastDistance = null;
+ floating = innermostContainer.floating || this._isFloating( this.currentItem );
+ posProperty = floating ? "left" : "top";
+ sizeProperty = floating ? "width" : "height";
+ axis = floating ? "pageX" : "pageY";
+
+ for ( j = this.items.length - 1; j >= 0; j-- ) {
+ if ( !$.contains(
+ this.containers[ innermostIndex ].element[ 0 ], this.items[ j ].item[ 0 ] )
+ ) {
+ continue;
+ }
+ if ( this.items[ j ].item[ 0 ] === this.currentItem[ 0 ] ) {
+ continue;
+ }
+
+ cur = this.items[ j ].item.offset()[ posProperty ];
+ nearBottom = false;
+ if ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) {
+ nearBottom = true;
+ }
+
+ if ( Math.abs( event[ axis ] - cur ) < dist ) {
+ dist = Math.abs( event[ axis ] - cur );
+ itemWithLeastDistance = this.items[ j ];
+ this.direction = nearBottom ? "up" : "down";
+ }
+ }
+
+ //Check if dropOnEmpty is enabled
+ if ( !itemWithLeastDistance && !this.options.dropOnEmpty ) {
+ return;
+ }
+
+ if ( this.currentContainer === this.containers[ innermostIndex ] ) {
+ if ( !this.currentContainer.containerCache.over ) {
+ this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash() );
+ this.currentContainer.containerCache.over = 1;
+ }
+ return;
+ }
+
+ itemWithLeastDistance ?
+ this._rearrange( event, itemWithLeastDistance, null, true ) :
+ this._rearrange( event, null, this.containers[ innermostIndex ].element, true );
+ this._trigger( "change", event, this._uiHash() );
+ this.containers[ innermostIndex ]._trigger( "change", event, this._uiHash( this ) );
+ this.currentContainer = this.containers[ innermostIndex ];
+
+ //Update the placeholder
+ this.options.placeholder.update( this.currentContainer, this.placeholder );
+
+ this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) );
+ this.containers[ innermostIndex ].containerCache.over = 1;
+ }
+
+ },
+
+ _createHelper: function( event ) {
+
+ var o = this.options,
+ helper = $.isFunction( o.helper ) ?
+ $( o.helper.apply( this.element[ 0 ], [ event, this.currentItem ] ) ) :
+ ( o.helper === "clone" ? this.currentItem.clone() : this.currentItem );
+
+ //Add the helper to the DOM if that didn't happen already
+ if ( !helper.parents( "body" ).length ) {
+ $( o.appendTo !== "parent" ?
+ o.appendTo :
+ this.currentItem[ 0 ].parentNode )[ 0 ].appendChild( helper[ 0 ] );
+ }
+
+ if ( helper[ 0 ] === this.currentItem[ 0 ] ) {
+ this._storedCSS = {
+ width: this.currentItem[ 0 ].style.width,
+ height: this.currentItem[ 0 ].style.height,
+ position: this.currentItem.css( "position" ),
+ top: this.currentItem.css( "top" ),
+ left: this.currentItem.css( "left" )
+ };
+ }
+
+ if ( !helper[ 0 ].style.width || o.forceHelperSize ) {
+ helper.width( this.currentItem.width() );
+ }
+ if ( !helper[ 0 ].style.height || o.forceHelperSize ) {
+ helper.height( this.currentItem.height() );
+ }
+
+ return helper;
+
+ },
+
+ _adjustOffsetFromHelper: function( obj ) {
+ if ( typeof obj === "string" ) {
+ obj = obj.split( " " );
+ }
+ if ( $.isArray( obj ) ) {
+ obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
+ }
+ if ( "left" in obj ) {
+ this.offset.click.left = obj.left + this.margins.left;
+ }
+ if ( "right" in obj ) {
+ this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
+ }
+ if ( "top" in obj ) {
+ this.offset.click.top = obj.top + this.margins.top;
+ }
+ if ( "bottom" in obj ) {
+ this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
+ }
+ },
+
+ _getParentOffset: function() {
+
+ //Get the offsetParent and cache its position
+ this.offsetParent = this.helper.offsetParent();
+ var po = this.offsetParent.offset();
+
+ // This is a special case where we need to modify a offset calculated on start, since the
+ // following happened:
+ // 1. The position of the helper is absolute, so it's position is calculated based on the
+ // next positioned parent
+ // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't
+ // the document, which means that the scroll is included in the initial calculation of the
+ // offset of the parent, and never recalculated upon drag
+ if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== this.document[ 0 ] &&
+ $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {
+ po.left += this.scrollParent.scrollLeft();
+ po.top += this.scrollParent.scrollTop();
+ }
+
+ // This needs to be actually done for all browsers, since pageX/pageY includes this
+ // information with an ugly IE fix
+ if ( this.offsetParent[ 0 ] === this.document[ 0 ].body ||
+ ( this.offsetParent[ 0 ].tagName &&
+ this.offsetParent[ 0 ].tagName.toLowerCase() === "html" && $.ui.ie ) ) {
+ po = { top: 0, left: 0 };
+ }
+
+ return {
+ top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ),
+ left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 )
+ };
+
+ },
+
+ _getRelativeOffset: function() {
+
+ if ( this.cssPosition === "relative" ) {
+ var p = this.currentItem.position();
+ return {
+ top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) +
+ this.scrollParent.scrollTop(),
+ left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) +
+ this.scrollParent.scrollLeft()
+ };
+ } else {
+ return { top: 0, left: 0 };
+ }
+
+ },
+
+ _cacheMargins: function() {
+ this.margins = {
+ left: ( parseInt( this.currentItem.css( "marginLeft" ), 10 ) || 0 ),
+ top: ( parseInt( this.currentItem.css( "marginTop" ), 10 ) || 0 )
+ };
+ },
+
+ _cacheHelperProportions: function() {
+ this.helperProportions = {
+ width: this.helper.outerWidth(),
+ height: this.helper.outerHeight()
+ };
+ },
+
+ _setContainment: function() {
+
+ var ce, co, over,
+ o = this.options;
+ if ( o.containment === "parent" ) {
+ o.containment = this.helper[ 0 ].parentNode;
+ }
+ if ( o.containment === "document" || o.containment === "window" ) {
+ this.containment = [
+ 0 - this.offset.relative.left - this.offset.parent.left,
+ 0 - this.offset.relative.top - this.offset.parent.top,
+ o.containment === "document" ?
+ this.document.width() :
+ this.window.width() - this.helperProportions.width - this.margins.left,
+ ( o.containment === "document" ?
+ ( this.document.height() || document.body.parentNode.scrollHeight ) :
+ this.window.height() || this.document[ 0 ].body.parentNode.scrollHeight
+ ) - this.helperProportions.height - this.margins.top
+ ];
+ }
+
+ if ( !( /^(document|window|parent)$/ ).test( o.containment ) ) {
+ ce = $( o.containment )[ 0 ];
+ co = $( o.containment ).offset();
+ over = ( $( ce ).css( "overflow" ) !== "hidden" );
+
+ this.containment = [
+ co.left + ( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) +
+ ( parseInt( $( ce ).css( "paddingLeft" ), 10 ) || 0 ) - this.margins.left,
+ co.top + ( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) +
+ ( parseInt( $( ce ).css( "paddingTop" ), 10 ) || 0 ) - this.margins.top,
+ co.left + ( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -
+ ( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) -
+ ( parseInt( $( ce ).css( "paddingRight" ), 10 ) || 0 ) -
+ this.helperProportions.width - this.margins.left,
+ co.top + ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -
+ ( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) -
+ ( parseInt( $( ce ).css( "paddingBottom" ), 10 ) || 0 ) -
+ this.helperProportions.height - this.margins.top
+ ];
+ }
+
+ },
+
+ _convertPositionTo: function( d, pos ) {
+
+ if ( !pos ) {
+ pos = this.position;
+ }
+ var mod = d === "absolute" ? 1 : -1,
+ scroll = this.cssPosition === "absolute" &&
+ !( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
+ $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?
+ this.offsetParent :
+ this.scrollParent,
+ scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );
+
+ return {
+ top: (
+
+ // The absolute mouse position
+ pos.top +
+
+ // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.relative.top * mod +
+
+ // The offsetParent's offset without borders (offset + border)
+ this.offset.parent.top * mod -
+ ( ( this.cssPosition === "fixed" ?
+ -this.scrollParent.scrollTop() :
+ ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod )
+ ),
+ left: (
+
+ // The absolute mouse position
+ pos.left +
+
+ // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.relative.left * mod +
+
+ // The offsetParent's offset without borders (offset + border)
+ this.offset.parent.left * mod -
+ ( ( this.cssPosition === "fixed" ?
+ -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 :
+ scroll.scrollLeft() ) * mod )
+ )
+ };
+
+ },
+
+ _generatePosition: function( event ) {
+
+ var top, left,
+ o = this.options,
+ pageX = event.pageX,
+ pageY = event.pageY,
+ scroll = this.cssPosition === "absolute" &&
+ !( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
+ $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?
+ this.offsetParent :
+ this.scrollParent,
+ scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );
+
+ // This is another very weird special case that only happens for relative elements:
+ // 1. If the css position is relative
+ // 2. and the scroll parent is the document or similar to the offset parent
+ // we have to refresh the relative offset during the scroll so there are no jumps
+ if ( this.cssPosition === "relative" && !( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
+ this.scrollParent[ 0 ] !== this.offsetParent[ 0 ] ) ) {
+ this.offset.relative = this._getRelativeOffset();
+ }
+
+ /*
+ * - Position constraining -
+ * Constrain the position to a mix of grid, containment.
+ */
+
+ if ( this.originalPosition ) { //If we are not dragging yet, we won't check for options
+
+ if ( this.containment ) {
+ if ( event.pageX - this.offset.click.left < this.containment[ 0 ] ) {
+ pageX = this.containment[ 0 ] + this.offset.click.left;
+ }
+ if ( event.pageY - this.offset.click.top < this.containment[ 1 ] ) {
+ pageY = this.containment[ 1 ] + this.offset.click.top;
+ }
+ if ( event.pageX - this.offset.click.left > this.containment[ 2 ] ) {
+ pageX = this.containment[ 2 ] + this.offset.click.left;
+ }
+ if ( event.pageY - this.offset.click.top > this.containment[ 3 ] ) {
+ pageY = this.containment[ 3 ] + this.offset.click.top;
+ }
+ }
+
+ if ( o.grid ) {
+ top = this.originalPageY + Math.round( ( pageY - this.originalPageY ) /
+ o.grid[ 1 ] ) * o.grid[ 1 ];
+ pageY = this.containment ?
+ ( ( top - this.offset.click.top >= this.containment[ 1 ] &&
+ top - this.offset.click.top <= this.containment[ 3 ] ) ?
+ top :
+ ( ( top - this.offset.click.top >= this.containment[ 1 ] ) ?
+ top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) :
+ top;
+
+ left = this.originalPageX + Math.round( ( pageX - this.originalPageX ) /
+ o.grid[ 0 ] ) * o.grid[ 0 ];
+ pageX = this.containment ?
+ ( ( left - this.offset.click.left >= this.containment[ 0 ] &&
+ left - this.offset.click.left <= this.containment[ 2 ] ) ?
+ left :
+ ( ( left - this.offset.click.left >= this.containment[ 0 ] ) ?
+ left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) :
+ left;
+ }
+
+ }
+
+ return {
+ top: (
+
+ // The absolute mouse position
+ pageY -
+
+ // Click offset (relative to the element)
+ this.offset.click.top -
+
+ // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.relative.top -
+
+ // The offsetParent's offset without borders (offset + border)
+ this.offset.parent.top +
+ ( ( this.cssPosition === "fixed" ?
+ -this.scrollParent.scrollTop() :
+ ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) )
+ ),
+ left: (
+
+ // The absolute mouse position
+ pageX -
+
+ // Click offset (relative to the element)
+ this.offset.click.left -
+
+ // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.relative.left -
+
+ // The offsetParent's offset without borders (offset + border)
+ this.offset.parent.left +
+ ( ( this.cssPosition === "fixed" ?
+ -this.scrollParent.scrollLeft() :
+ scrollIsRootNode ? 0 : scroll.scrollLeft() ) )
+ )
+ };
+
+ },
+
+ _rearrange: function( event, i, a, hardRefresh ) {
+
+ a ? a[ 0 ].appendChild( this.placeholder[ 0 ] ) :
+ i.item[ 0 ].parentNode.insertBefore( this.placeholder[ 0 ],
+ ( this.direction === "down" ? i.item[ 0 ] : i.item[ 0 ].nextSibling ) );
+
+ //Various things done here to improve the performance:
+ // 1. we create a setTimeout, that calls refreshPositions
+ // 2. on the instance, we have a counter variable, that get's higher after every append
+ // 3. on the local scope, we copy the counter variable, and check in the timeout,
+ // if it's still the same
+ // 4. this lets only the last addition to the timeout stack through
+ this.counter = this.counter ? ++this.counter : 1;
+ var counter = this.counter;
+
+ this._delay( function() {
+ if ( counter === this.counter ) {
+
+ //Precompute after each DOM insertion, NOT on mousemove
+ this.refreshPositions( !hardRefresh );
+ }
+ } );
+
+ },
+
+ _clear: function( event, noPropagation ) {
+
+ this.reverting = false;
+
+ // We delay all events that have to be triggered to after the point where the placeholder
+ // has been removed and everything else normalized again
+ var i,
+ delayedTriggers = [];
+
+ // We first have to update the dom position of the actual currentItem
+ // Note: don't do it if the current item is already removed (by a user), or it gets
+ // reappended (see #4088)
+ if ( !this._noFinalSort && this.currentItem.parent().length ) {
+ this.placeholder.before( this.currentItem );
+ }
+ this._noFinalSort = null;
+
+ if ( this.helper[ 0 ] === this.currentItem[ 0 ] ) {
+ for ( i in this._storedCSS ) {
+ if ( this._storedCSS[ i ] === "auto" || this._storedCSS[ i ] === "static" ) {
+ this._storedCSS[ i ] = "";
+ }
+ }
+ this.currentItem.css( this._storedCSS );
+ this._removeClass( this.currentItem, "ui-sortable-helper" );
+ } else {
+ this.currentItem.show();
+ }
+
+ if ( this.fromOutside && !noPropagation ) {
+ delayedTriggers.push( function( event ) {
+ this._trigger( "receive", event, this._uiHash( this.fromOutside ) );
+ } );
+ }
+ if ( ( this.fromOutside ||
+ this.domPosition.prev !==
+ this.currentItem.prev().not( ".ui-sortable-helper" )[ 0 ] ||
+ this.domPosition.parent !== this.currentItem.parent()[ 0 ] ) && !noPropagation ) {
+
+ // Trigger update callback if the DOM position has changed
+ delayedTriggers.push( function( event ) {
+ this._trigger( "update", event, this._uiHash() );
+ } );
+ }
+
+ // Check if the items Container has Changed and trigger appropriate
+ // events.
+ if ( this !== this.currentContainer ) {
+ if ( !noPropagation ) {
+ delayedTriggers.push( function( event ) {
+ this._trigger( "remove", event, this._uiHash() );
+ } );
+ delayedTriggers.push( ( function( c ) {
+ return function( event ) {
+ c._trigger( "receive", event, this._uiHash( this ) );
+ };
+ } ).call( this, this.currentContainer ) );
+ delayedTriggers.push( ( function( c ) {
+ return function( event ) {
+ c._trigger( "update", event, this._uiHash( this ) );
+ };
+ } ).call( this, this.currentContainer ) );
+ }
+ }
+
+ //Post events to containers
+ function delayEvent( type, instance, container ) {
+ return function( event ) {
+ container._trigger( type, event, instance._uiHash( instance ) );
+ };
+ }
+ for ( i = this.containers.length - 1; i >= 0; i-- ) {
+ if ( !noPropagation ) {
+ delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) );
+ }
+ if ( this.containers[ i ].containerCache.over ) {
+ delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) );
+ this.containers[ i ].containerCache.over = 0;
+ }
+ }
+
+ //Do what was originally in plugins
+ if ( this.storedCursor ) {
+ this.document.find( "body" ).css( "cursor", this.storedCursor );
+ this.storedStylesheet.remove();
+ }
+ if ( this._storedOpacity ) {
+ this.helper.css( "opacity", this._storedOpacity );
+ }
+ if ( this._storedZIndex ) {
+ this.helper.css( "zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex );
+ }
+
+ this.dragging = false;
+
+ if ( !noPropagation ) {
+ this._trigger( "beforeStop", event, this._uiHash() );
+ }
+
+ //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,
+ // it unbinds ALL events from the original node!
+ this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );
+
+ if ( !this.cancelHelperRemoval ) {
+ if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {
+ this.helper.remove();
+ }
+ this.helper = null;
+ }
+
+ if ( !noPropagation ) {
+ for ( i = 0; i < delayedTriggers.length; i++ ) {
+
+ // Trigger all delayed events
+ delayedTriggers[ i ].call( this, event );
+ }
+ this._trigger( "stop", event, this._uiHash() );
+ }
+
+ this.fromOutside = false;
+ return !this.cancelHelperRemoval;
+
+ },
+
+ _trigger: function() {
+ if ( $.Widget.prototype._trigger.apply( this, arguments ) === false ) {
+ this.cancel();
+ }
+ },
+
+ _uiHash: function( _inst ) {
+ var inst = _inst || this;
+ return {
+ helper: inst.helper,
+ placeholder: inst.placeholder || $( [] ),
+ position: inst.position,
+ originalPosition: inst.originalPosition,
+ offset: inst.positionAbs,
+ item: inst.currentItem,
+ sender: _inst ? _inst.element : null
+ };
+ }
+
+} );
+
+
+/*!
+ * jQuery UI Spinner 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Spinner
+//>>group: Widgets
+//>>description: Displays buttons to easily input numbers via the keyboard or mouse.
+//>>docs: http://api.jqueryui.com/spinner/
+//>>demos: http://jqueryui.com/spinner/
+//>>css.structure: ../../themes/base/core.css
+//>>css.structure: ../../themes/base/spinner.css
+//>>css.theme: ../../themes/base/theme.css
+
+
+
+function spinnerModifer( fn ) {
+ return function() {
+ var previous = this.element.val();
+ fn.apply( this, arguments );
+ this._refresh();
+ if ( previous !== this.element.val() ) {
+ this._trigger( "change" );
+ }
+ };
+}
+
+$.widget( "ui.spinner", {
+ version: "1.12.1",
+ defaultElement: "<input>",
+ widgetEventPrefix: "spin",
+ options: {
+ classes: {
+ "ui-spinner": "ui-corner-all",
+ "ui-spinner-down": "ui-corner-br",
+ "ui-spinner-up": "ui-corner-tr"
+ },
+ culture: null,
+ icons: {
+ down: "ui-icon-triangle-1-s",
+ up: "ui-icon-triangle-1-n"
+ },
+ incremental: true,
+ max: null,
+ min: null,
+ numberFormat: null,
+ page: 10,
+ step: 1,
+
+ change: null,
+ spin: null,
+ start: null,
+ stop: null
+ },
+
+ _create: function() {
+
+ // handle string values that need to be parsed
+ this._setOption( "max", this.options.max );
+ this._setOption( "min", this.options.min );
+ this._setOption( "step", this.options.step );
+
+ // Only format if there is a value, prevents the field from being marked
+ // as invalid in Firefox, see #9573.
+ if ( this.value() !== "" ) {
+
+ // Format the value, but don't constrain.
+ this._value( this.element.val(), true );
+ }
+
+ this._draw();
+ this._on( this._events );
+ this._refresh();
+
+ // Turning off autocomplete prevents the browser from remembering the
+ // value when navigating through history, so we re-enable autocomplete
+ // if the page is unloaded before the widget is destroyed. #7790
+ this._on( this.window, {
+ beforeunload: function() {
+ this.element.removeAttr( "autocomplete" );
+ }
+ } );
+ },
+
+ _getCreateOptions: function() {
+ var options = this._super();
+ var element = this.element;
+
+ $.each( [ "min", "max", "step" ], function( i, option ) {
+ var value = element.attr( option );
+ if ( value != null && value.length ) {
+ options[ option ] = value;
+ }
+ } );
+
+ return options;
+ },
+
+ _events: {
+ keydown: function( event ) {
+ if ( this._start( event ) && this._keydown( event ) ) {
+ event.preventDefault();
+ }
+ },
+ keyup: "_stop",
+ focus: function() {
+ this.previous = this.element.val();
+ },
+ blur: function( event ) {
+ if ( this.cancelBlur ) {
+ delete this.cancelBlur;
+ return;
+ }
+
+ this._stop();
+ this._refresh();
+ if ( this.previous !== this.element.val() ) {
+ this._trigger( "change", event );
+ }
+ },
+ mousewheel: function( event, delta ) {
+ if ( !delta ) {
+ return;
+ }
+ if ( !this.spinning && !this._start( event ) ) {
+ return false;
+ }
+
+ this._spin( ( delta > 0 ? 1 : -1 ) * this.options.step, event );
+ clearTimeout( this.mousewheelTimer );
+ this.mousewheelTimer = this._delay( function() {
+ if ( this.spinning ) {
+ this._stop( event );
+ }
+ }, 100 );
+ event.preventDefault();
+ },
+ "mousedown .ui-spinner-button": function( event ) {
+ var previous;
+
+ // We never want the buttons to have focus; whenever the user is
+ // interacting with the spinner, the focus should be on the input.
+ // If the input is focused then this.previous is properly set from
+ // when the input first received focus. If the input is not focused
+ // then we need to set this.previous based on the value before spinning.
+ previous = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] ) ?
+ this.previous : this.element.val();
+ function checkFocus() {
+ var isActive = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] );
+ if ( !isActive ) {
+ this.element.trigger( "focus" );
+ this.previous = previous;
+
+ // support: IE
+ // IE sets focus asynchronously, so we need to check if focus
+ // moved off of the input because the user clicked on the button.
+ this._delay( function() {
+ this.previous = previous;
+ } );
+ }
+ }
+
+ // Ensure focus is on (or stays on) the text field
+ event.preventDefault();
+ checkFocus.call( this );
+
+ // Support: IE
+ // IE doesn't prevent moving focus even with event.preventDefault()
+ // so we set a flag to know when we should ignore the blur event
+ // and check (again) if focus moved off of the input.
+ this.cancelBlur = true;
+ this._delay( function() {
+ delete this.cancelBlur;
+ checkFocus.call( this );
+ } );
+
+ if ( this._start( event ) === false ) {
+ return;
+ }
+
+ this._repeat( null, $( event.currentTarget )
+ .hasClass( "ui-spinner-up" ) ? 1 : -1, event );
+ },
+ "mouseup .ui-spinner-button": "_stop",
+ "mouseenter .ui-spinner-button": function( event ) {
+
+ // button will add ui-state-active if mouse was down while mouseleave and kept down
+ if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) {
+ return;
+ }
+
+ if ( this._start( event ) === false ) {
+ return false;
+ }
+ this._repeat( null, $( event.currentTarget )
+ .hasClass( "ui-spinner-up" ) ? 1 : -1, event );
+ },
+
+ // TODO: do we really want to consider this a stop?
+ // shouldn't we just stop the repeater and wait until mouseup before
+ // we trigger the stop event?
+ "mouseleave .ui-spinner-button": "_stop"
+ },
+
+ // Support mobile enhanced option and make backcompat more sane
+ _enhance: function() {
+ this.uiSpinner = this.element
+ .attr( "autocomplete", "off" )
+ .wrap( "<span>" )
+ .parent()
+
+ // Add buttons
+ .append(
+ "<a></a><a></a>"
+ );
+ },
+
+ _draw: function() {
+ this._enhance();
+
+ this._addClass( this.uiSpinner, "ui-spinner", "ui-widget ui-widget-content" );
+ this._addClass( "ui-spinner-input" );
+
+ this.element.attr( "role", "spinbutton" );
+
+ // Button bindings
+ this.buttons = this.uiSpinner.children( "a" )
+ .attr( "tabIndex", -1 )
+ .attr( "aria-hidden", true )
+ .button( {
+ classes: {
+ "ui-button": ""
+ }
+ } );
+
+ // TODO: Right now button does not support classes this is already updated in button PR
+ this._removeClass( this.buttons, "ui-corner-all" );
+
+ this._addClass( this.buttons.first(), "ui-spinner-button ui-spinner-up" );
+ this._addClass( this.buttons.last(), "ui-spinner-button ui-spinner-down" );
+ this.buttons.first().button( {
+ "icon": this.options.icons.up,
+ "showLabel": false
+ } );
+ this.buttons.last().button( {
+ "icon": this.options.icons.down,
+ "showLabel": false
+ } );
+
+ // IE 6 doesn't understand height: 50% for the buttons
+ // unless the wrapper has an explicit height
+ if ( this.buttons.height() > Math.ceil( this.uiSpinner.height() * 0.5 ) &&
+ this.uiSpinner.height() > 0 ) {
+ this.uiSpinner.height( this.uiSpinner.height() );
+ }
+ },
+
+ _keydown: function( event ) {
+ var options = this.options,
+ keyCode = $.ui.keyCode;
+
+ switch ( event.keyCode ) {
+ case keyCode.UP:
+ this._repeat( null, 1, event );
+ return true;
+ case keyCode.DOWN:
+ this._repeat( null, -1, event );
+ return true;
+ case keyCode.PAGE_UP:
+ this._repeat( null, options.page, event );
+ return true;
+ case keyCode.PAGE_DOWN:
+ this._repeat( null, -options.page, event );
+ return true;
+ }
+
+ return false;
+ },
+
+ _start: function( event ) {
+ if ( !this.spinning && this._trigger( "start", event ) === false ) {
+ return false;
+ }
+
+ if ( !this.counter ) {
+ this.counter = 1;
+ }
+ this.spinning = true;
+ return true;
+ },
+
+ _repeat: function( i, steps, event ) {
+ i = i || 500;
+
+ clearTimeout( this.timer );
+ this.timer = this._delay( function() {
+ this._repeat( 40, steps, event );
+ }, i );
+
+ this._spin( steps * this.options.step, event );
+ },
+
+ _spin: function( step, event ) {
+ var value = this.value() || 0;
+
+ if ( !this.counter ) {
+ this.counter = 1;
+ }
+
+ value = this._adjustValue( value + step * this._increment( this.counter ) );
+
+ if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false ) {
+ this._value( value );
+ this.counter++;
+ }
+ },
+
+ _increment: function( i ) {
+ var incremental = this.options.incremental;
+
+ if ( incremental ) {
+ return $.isFunction( incremental ) ?
+ incremental( i ) :
+ Math.floor( i * i * i / 50000 - i * i / 500 + 17 * i / 200 + 1 );
+ }
+
+ return 1;
+ },
+
+ _precision: function() {
+ var precision = this._precisionOf( this.options.step );
+ if ( this.options.min !== null ) {
+ precision = Math.max( precision, this._precisionOf( this.options.min ) );
+ }
+ return precision;
+ },
+
+ _precisionOf: function( num ) {
+ var str = num.toString(),
+ decimal = str.indexOf( "." );
+ return decimal === -1 ? 0 : str.length - decimal - 1;
+ },
+
+ _adjustValue: function( value ) {
+ var base, aboveMin,
+ options = this.options;
+
+ // Make sure we're at a valid step
+ // - find out where we are relative to the base (min or 0)
+ base = options.min !== null ? options.min : 0;
+ aboveMin = value - base;
+
+ // - round to the nearest step
+ aboveMin = Math.round( aboveMin / options.step ) * options.step;
+
+ // - rounding is based on 0, so adjust back to our base
+ value = base + aboveMin;
+
+ // Fix precision from bad JS floating point math
+ value = parseFloat( value.toFixed( this._precision() ) );
+
+ // Clamp the value
+ if ( options.max !== null && value > options.max ) {
+ return options.max;
+ }
+ if ( options.min !== null && value < options.min ) {
+ return options.min;
+ }
+
+ return value;
+ },
+
+ _stop: function( event ) {
+ if ( !this.spinning ) {
+ return;
+ }
+
+ clearTimeout( this.timer );
+ clearTimeout( this.mousewheelTimer );
+ this.counter = 0;
+ this.spinning = false;
+ this._trigger( "stop", event );
+ },
+
+ _setOption: function( key, value ) {
+ var prevValue, first, last;
+
+ if ( key === "culture" || key === "numberFormat" ) {
+ prevValue = this._parse( this.element.val() );
+ this.options[ key ] = value;
+ this.element.val( this._format( prevValue ) );
+ return;
+ }
+
+ if ( key === "max" || key === "min" || key === "step" ) {
+ if ( typeof value === "string" ) {
+ value = this._parse( value );
+ }
+ }
+ if ( key === "icons" ) {
+ first = this.buttons.first().find( ".ui-icon" );
+ this._removeClass( first, null, this.options.icons.up );
+ this._addClass( first, null, value.up );
+ last = this.buttons.last().find( ".ui-icon" );
+ this._removeClass( last, null, this.options.icons.down );
+ this._addClass( last, null, value.down );
+ }
+
+ this._super( key, value );
+ },
+
+ _setOptionDisabled: function( value ) {
+ this._super( value );
+
+ this._toggleClass( this.uiSpinner, null, "ui-state-disabled", !!value );
+ this.element.prop( "disabled", !!value );
+ this.buttons.button( value ? "disable" : "enable" );
+ },
+
+ _setOptions: spinnerModifer( function( options ) {
+ this._super( options );
+ } ),
+
+ _parse: function( val ) {
+ if ( typeof val === "string" && val !== "" ) {
+ val = window.Globalize && this.options.numberFormat ?
+ Globalize.parseFloat( val, 10, this.options.culture ) : +val;
+ }
+ return val === "" || isNaN( val ) ? null : val;
+ },
+
+ _format: function( value ) {
+ if ( value === "" ) {
+ return "";
+ }
+ return window.Globalize && this.options.numberFormat ?
+ Globalize.format( value, this.options.numberFormat, this.options.culture ) :
+ value;
+ },
+
+ _refresh: function() {
+ this.element.attr( {
+ "aria-valuemin": this.options.min,
+ "aria-valuemax": this.options.max,
+
+ // TODO: what should we do with values that can't be parsed?
+ "aria-valuenow": this._parse( this.element.val() )
+ } );
+ },
+
+ isValid: function() {
+ var value = this.value();
+
+ // Null is invalid
+ if ( value === null ) {
+ return false;
+ }
+
+ // If value gets adjusted, it's invalid
+ return value === this._adjustValue( value );
+ },
+
+ // Update the value without triggering change
+ _value: function( value, allowAny ) {
+ var parsed;
+ if ( value !== "" ) {
+ parsed = this._parse( value );
+ if ( parsed !== null ) {
+ if ( !allowAny ) {
+ parsed = this._adjustValue( parsed );
+ }
+ value = this._format( parsed );
+ }
+ }
+ this.element.val( value );
+ this._refresh();
+ },
+
+ _destroy: function() {
+ this.element
+ .prop( "disabled", false )
+ .removeAttr( "autocomplete role aria-valuemin aria-valuemax aria-valuenow" );
+
+ this.uiSpinner.replaceWith( this.element );
+ },
+
+ stepUp: spinnerModifer( function( steps ) {
+ this._stepUp( steps );
+ } ),
+ _stepUp: function( steps ) {
+ if ( this._start() ) {
+ this._spin( ( steps || 1 ) * this.options.step );
+ this._stop();
+ }
+ },
+
+ stepDown: spinnerModifer( function( steps ) {
+ this._stepDown( steps );
+ } ),
+ _stepDown: function( steps ) {
+ if ( this._start() ) {
+ this._spin( ( steps || 1 ) * -this.options.step );
+ this._stop();
+ }
+ },
+
+ pageUp: spinnerModifer( function( pages ) {
+ this._stepUp( ( pages || 1 ) * this.options.page );
+ } ),
+
+ pageDown: spinnerModifer( function( pages ) {
+ this._stepDown( ( pages || 1 ) * this.options.page );
+ } ),
+
+ value: function( newVal ) {
+ if ( !arguments.length ) {
+ return this._parse( this.element.val() );
+ }
+ spinnerModifer( this._value ).call( this, newVal );
+ },
+
+ widget: function() {
+ return this.uiSpinner;
+ }
+} );
+
+// DEPRECATED
+// TODO: switch return back to widget declaration at top of file when this is removed
+if ( $.uiBackCompat !== false ) {
+
+ // Backcompat for spinner html extension points
+ $.widget( "ui.spinner", $.ui.spinner, {
+ _enhance: function() {
+ this.uiSpinner = this.element
+ .attr( "autocomplete", "off" )
+ .wrap( this._uiSpinnerHtml() )
+ .parent()
+
+ // Add buttons
+ .append( this._buttonHtml() );
+ },
+ _uiSpinnerHtml: function() {
+ return "<span>";
+ },
+
+ _buttonHtml: function() {
+ return "<a></a><a></a>";
+ }
+ } );
+}
+
+var widgetsSpinner = $.ui.spinner;
+
+
+/*!
+ * jQuery UI Tabs 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Tabs
+//>>group: Widgets
+//>>description: Transforms a set of container elements into a tab structure.
+//>>docs: http://api.jqueryui.com/tabs/
+//>>demos: http://jqueryui.com/tabs/
+//>>css.structure: ../../themes/base/core.css
+//>>css.structure: ../../themes/base/tabs.css
+//>>css.theme: ../../themes/base/theme.css
+
+
+
+$.widget( "ui.tabs", {
+ version: "1.12.1",
+ delay: 300,
+ options: {
+ active: null,
+ classes: {
+ "ui-tabs": "ui-corner-all",
+ "ui-tabs-nav": "ui-corner-all",
+ "ui-tabs-panel": "ui-corner-bottom",
+ "ui-tabs-tab": "ui-corner-top"
+ },
+ collapsible: false,
+ event: "click",
+ heightStyle: "content",
+ hide: null,
+ show: null,
+
+ // Callbacks
+ activate: null,
+ beforeActivate: null,
+ beforeLoad: null,
+ load: null
+ },
+
+ _isLocal: ( function() {
+ var rhash = /#.*$/;
+
+ return function( anchor ) {
+ var anchorUrl, locationUrl;
+
+ anchorUrl = anchor.href.replace( rhash, "" );
+ locationUrl = location.href.replace( rhash, "" );
+
+ // Decoding may throw an error if the URL isn't UTF-8 (#9518)
+ try {
+ anchorUrl = decodeURIComponent( anchorUrl );
+ } catch ( error ) {}
+ try {
+ locationUrl = decodeURIComponent( locationUrl );
+ } catch ( error ) {}
+
+ return anchor.hash.length > 1 && anchorUrl === locationUrl;
+ };
+ } )(),
+
+ _create: function() {
+ var that = this,
+ options = this.options;
+
+ this.running = false;
+
+ this._addClass( "ui-tabs", "ui-widget ui-widget-content" );
+ this._toggleClass( "ui-tabs-collapsible", null, options.collapsible );
+
+ this._processTabs();
+ options.active = this._initialActive();
+
+ // Take disabling tabs via class attribute from HTML
+ // into account and update option properly.
+ if ( $.isArray( options.disabled ) ) {
+ options.disabled = $.unique( options.disabled.concat(
+ $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
+ return that.tabs.index( li );
+ } )
+ ) ).sort();
+ }
+
+ // Check for length avoids error when initializing empty list
+ if ( this.options.active !== false && this.anchors.length ) {
+ this.active = this._findActive( options.active );
+ } else {
+ this.active = $();
+ }
+
+ this._refresh();
+
+ if ( this.active.length ) {
+ this.load( options.active );
+ }
+ },
+
+ _initialActive: function() {
+ var active = this.options.active,
+ collapsible = this.options.collapsible,
+ locationHash = location.hash.substring( 1 );
+
+ if ( active === null ) {
+
+ // check the fragment identifier in the URL
+ if ( locationHash ) {
+ this.tabs.each( function( i, tab ) {
+ if ( $( tab ).attr( "aria-controls" ) === locationHash ) {
+ active = i;
+ return false;
+ }
+ } );
+ }
+
+ // Check for a tab marked active via a class
+ if ( active === null ) {
+ active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
+ }
+
+ // No active tab, set to false
+ if ( active === null || active === -1 ) {
+ active = this.tabs.length ? 0 : false;
+ }
+ }
+
+ // Handle numbers: negative, out of range
+ if ( active !== false ) {
+ active = this.tabs.index( this.tabs.eq( active ) );
+ if ( active === -1 ) {
+ active = collapsible ? false : 0;
+ }
+ }
+
+ // Don't allow collapsible: false and active: false
+ if ( !collapsible && active === false && this.anchors.length ) {
+ active = 0;
+ }
+
+ return active;
+ },
+
+ _getCreateEventData: function() {
+ return {
+ tab: this.active,
+ panel: !this.active.length ? $() : this._getPanelForTab( this.active )
+ };
+ },
+
+ _tabKeydown: function( event ) {
+ var focusedTab = $( $.ui.safeActiveElement( this.document[ 0 ] ) ).closest( "li" ),
+ selectedIndex = this.tabs.index( focusedTab ),
+ goingForward = true;
+
+ if ( this._handlePageNav( event ) ) {
+ return;
+ }
+
+ switch ( event.keyCode ) {
+ case $.ui.keyCode.RIGHT:
+ case $.ui.keyCode.DOWN:
+ selectedIndex++;
+ break;
+ case $.ui.keyCode.UP:
+ case $.ui.keyCode.LEFT:
+ goingForward = false;
+ selectedIndex--;
+ break;
+ case $.ui.keyCode.END:
+ selectedIndex = this.anchors.length - 1;
+ break;
+ case $.ui.keyCode.HOME:
+ selectedIndex = 0;
+ break;
+ case $.ui.keyCode.SPACE:
+
+ // Activate only, no collapsing
+ event.preventDefault();
+ clearTimeout( this.activating );
+ this._activate( selectedIndex );
+ return;
+ case $.ui.keyCode.ENTER:
+
+ // Toggle (cancel delayed activation, allow collapsing)
+ event.preventDefault();
+ clearTimeout( this.activating );
+
+ // Determine if we should collapse or activate
+ this._activate( selectedIndex === this.options.active ? false : selectedIndex );
+ return;
+ default:
+ return;
+ }
+
+ // Focus the appropriate tab, based on which key was pressed
+ event.preventDefault();
+ clearTimeout( this.activating );
+ selectedIndex = this._focusNextTab( selectedIndex, goingForward );
+
+ // Navigating with control/command key will prevent automatic activation
+ if ( !event.ctrlKey && !event.metaKey ) {
+
+ // Update aria-selected immediately so that AT think the tab is already selected.
+ // Otherwise AT may confuse the user by stating that they need to activate the tab,
+ // but the tab will already be activated by the time the announcement finishes.
+ focusedTab.attr( "aria-selected", "false" );
+ this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
+
+ this.activating = this._delay( function() {
+ this.option( "active", selectedIndex );
+ }, this.delay );
+ }
+ },
+
+ _panelKeydown: function( event ) {
+ if ( this._handlePageNav( event ) ) {
+ return;
+ }
+
+ // Ctrl+up moves focus to the current tab
+ if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
+ event.preventDefault();
+ this.active.trigger( "focus" );
+ }
+ },
+
+ // Alt+page up/down moves focus to the previous/next tab (and activates)
+ _handlePageNav: function( event ) {
+ if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {
+ this._activate( this._focusNextTab( this.options.active - 1, false ) );
+ return true;
+ }
+ if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {
+ this._activate( this._focusNextTab( this.options.active + 1, true ) );
+ return true;
+ }
+ },
+
+ _findNextTab: function( index, goingForward ) {
+ var lastTabIndex = this.tabs.length - 1;
+
+ function constrain() {
+ if ( index > lastTabIndex ) {
+ index = 0;
+ }
+ if ( index < 0 ) {
+ index = lastTabIndex;
+ }
+ return index;
+ }
+
+ while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {
+ index = goingForward ? index + 1 : index - 1;
+ }
+
+ return index;
+ },
+
+ _focusNextTab: function( index, goingForward ) {
+ index = this._findNextTab( index, goingForward );
+ this.tabs.eq( index ).trigger( "focus" );
+ return index;
+ },
+
+ _setOption: function( key, value ) {
+ if ( key === "active" ) {
+
+ // _activate() will handle invalid values and update this.options
+ this._activate( value );
+ return;
+ }
+
+ this._super( key, value );
+
+ if ( key === "collapsible" ) {
+ this._toggleClass( "ui-tabs-collapsible", null, value );
+
+ // Setting collapsible: false while collapsed; open first panel
+ if ( !value && this.options.active === false ) {
+ this._activate( 0 );
+ }
+ }
+
+ if ( key === "event" ) {
+ this._setupEvents( value );
+ }
+
+ if ( key === "heightStyle" ) {
+ this._setupHeightStyle( value );
+ }
+ },
+
+ _sanitizeSelector: function( hash ) {
+ return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";
+ },
+
+ refresh: function() {
+ var options = this.options,
+ lis = this.tablist.children( ":has(a[href])" );
+
+ // Get disabled tabs from class attribute from HTML
+ // this will get converted to a boolean if needed in _refresh()
+ options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {
+ return lis.index( tab );
+ } );
+
+ this._processTabs();
+
+ // Was collapsed or no tabs
+ if ( options.active === false || !this.anchors.length ) {
+ options.active = false;
+ this.active = $();
+
+ // was active, but active tab is gone
+ } else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {
+
+ // all remaining tabs are disabled
+ if ( this.tabs.length === options.disabled.length ) {
+ options.active = false;
+ this.active = $();
+
+ // activate previous tab
+ } else {
+ this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );
+ }
+
+ // was active, active tab still exists
+ } else {
+
+ // make sure active index is correct
+ options.active = this.tabs.index( this.active );
+ }
+
+ this._refresh();
+ },
+
+ _refresh: function() {
+ this._setOptionDisabled( this.options.disabled );
+ this._setupEvents( this.options.event );
+ this._setupHeightStyle( this.options.heightStyle );
+
+ this.tabs.not( this.active ).attr( {
+ "aria-selected": "false",
+ "aria-expanded": "false",
+ tabIndex: -1
+ } );
+ this.panels.not( this._getPanelForTab( this.active ) )
+ .hide()
+ .attr( {
+ "aria-hidden": "true"
+ } );
+
+ // Make sure one tab is in the tab order
+ if ( !this.active.length ) {
+ this.tabs.eq( 0 ).attr( "tabIndex", 0 );
+ } else {
+ this.active
+ .attr( {
+ "aria-selected": "true",
+ "aria-expanded": "true",
+ tabIndex: 0
+ } );
+ this._addClass( this.active, "ui-tabs-active", "ui-state-active" );
+ this._getPanelForTab( this.active )
+ .show()
+ .attr( {
+ "aria-hidden": "false"
+ } );
+ }
+ },
+
+ _processTabs: function() {
+ var that = this,
+ prevTabs = this.tabs,
+ prevAnchors = this.anchors,
+ prevPanels = this.panels;
+
+ this.tablist = this._getList().attr( "role", "tablist" );
+ this._addClass( this.tablist, "ui-tabs-nav",
+ "ui-helper-reset ui-helper-clearfix ui-widget-header" );
+
+ // Prevent users from focusing disabled tabs via click
+ this.tablist
+ .on( "mousedown" + this.eventNamespace, "> li", function( event ) {
+ if ( $( this ).is( ".ui-state-disabled" ) ) {
+ event.preventDefault();
+ }
+ } )
+
+ // Support: IE <9
+ // Preventing the default action in mousedown doesn't prevent IE
+ // from focusing the element, so if the anchor gets focused, blur.
+ // We don't have to worry about focusing the previously focused
+ // element since clicking on a non-focusable element should focus
+ // the body anyway.
+ .on( "focus" + this.eventNamespace, ".ui-tabs-anchor", function() {
+ if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {
+ this.blur();
+ }
+ } );
+
+ this.tabs = this.tablist.find( "> li:has(a[href])" )
+ .attr( {
+ role: "tab",
+ tabIndex: -1
+ } );
+ this._addClass( this.tabs, "ui-tabs-tab", "ui-state-default" );
+
+ this.anchors = this.tabs.map( function() {
+ return $( "a", this )[ 0 ];
+ } )
+ .attr( {
+ role: "presentation",
+ tabIndex: -1
+ } );
+ this._addClass( this.anchors, "ui-tabs-anchor" );
+
+ this.panels = $();
+
+ this.anchors.each( function( i, anchor ) {
+ var selector, panel, panelId,
+ anchorId = $( anchor ).uniqueId().attr( "id" ),
+ tab = $( anchor ).closest( "li" ),
+ originalAriaControls = tab.attr( "aria-controls" );
+
+ // Inline tab
+ if ( that._isLocal( anchor ) ) {
+ selector = anchor.hash;
+ panelId = selector.substring( 1 );
+ panel = that.element.find( that._sanitizeSelector( selector ) );
+
+ // remote tab
+ } else {
+
+ // If the tab doesn't already have aria-controls,
+ // generate an id by using a throw-away element
+ panelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id;
+ selector = "#" + panelId;
+ panel = that.element.find( selector );
+ if ( !panel.length ) {
+ panel = that._createPanel( panelId );
+ panel.insertAfter( that.panels[ i - 1 ] || that.tablist );
+ }
+ panel.attr( "aria-live", "polite" );
+ }
+
+ if ( panel.length ) {
+ that.panels = that.panels.add( panel );
+ }
+ if ( originalAriaControls ) {
+ tab.data( "ui-tabs-aria-controls", originalAriaControls );
+ }
+ tab.attr( {
+ "aria-controls": panelId,
+ "aria-labelledby": anchorId
+ } );
+ panel.attr( "aria-labelledby", anchorId );
+ } );
+
+ this.panels.attr( "role", "tabpanel" );
+ this._addClass( this.panels, "ui-tabs-panel", "ui-widget-content" );
+
+ // Avoid memory leaks (#10056)
+ if ( prevTabs ) {
+ this._off( prevTabs.not( this.tabs ) );
+ this._off( prevAnchors.not( this.anchors ) );
+ this._off( prevPanels.not( this.panels ) );
+ }
+ },
+
+ // Allow overriding how to find the list for rare usage scenarios (#7715)
+ _getList: function() {
+ return this.tablist || this.element.find( "ol, ul" ).eq( 0 );
+ },
+
+ _createPanel: function( id ) {
+ return $( "<div>" )
+ .attr( "id", id )
+ .data( "ui-tabs-destroy", true );
+ },
+
+ _setOptionDisabled: function( disabled ) {
+ var currentItem, li, i;
+
+ if ( $.isArray( disabled ) ) {
+ if ( !disabled.length ) {
+ disabled = false;
+ } else if ( disabled.length === this.anchors.length ) {
+ disabled = true;
+ }
+ }
+
+ // Disable tabs
+ for ( i = 0; ( li = this.tabs[ i ] ); i++ ) {
+ currentItem = $( li );
+ if ( disabled === true || $.inArray( i, disabled ) !== -1 ) {
+ currentItem.attr( "aria-disabled", "true" );
+ this._addClass( currentItem, null, "ui-state-disabled" );
+ } else {
+ currentItem.removeAttr( "aria-disabled" );
+ this._removeClass( currentItem, null, "ui-state-disabled" );
+ }
+ }
+
+ this.options.disabled = disabled;
+
+ this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null,
+ disabled === true );
+ },
+
+ _setupEvents: function( event ) {
+ var events = {};
+ if ( event ) {
+ $.each( event.split( " " ), function( index, eventName ) {
+ events[ eventName ] = "_eventHandler";
+ } );
+ }
+
+ this._off( this.anchors.add( this.tabs ).add( this.panels ) );
+
+ // Always prevent the default action, even when disabled
+ this._on( true, this.anchors, {
+ click: function( event ) {
+ event.preventDefault();
+ }
+ } );
+ this._on( this.anchors, events );
+ this._on( this.tabs, { keydown: "_tabKeydown" } );
+ this._on( this.panels, { keydown: "_panelKeydown" } );
+
+ this._focusable( this.tabs );
+ this._hoverable( this.tabs );
+ },
+
+ _setupHeightStyle: function( heightStyle ) {
+ var maxHeight,
+ parent = this.element.parent();
+
+ if ( heightStyle === "fill" ) {
+ maxHeight = parent.height();
+ maxHeight -= this.element.outerHeight() - this.element.height();
+
+ this.element.siblings( ":visible" ).each( function() {
+ var elem = $( this ),
+ position = elem.css( "position" );
+
+ if ( position === "absolute" || position === "fixed" ) {
+ return;
+ }
+ maxHeight -= elem.outerHeight( true );
+ } );
+
+ this.element.children().not( this.panels ).each( function() {
+ maxHeight -= $( this ).outerHeight( true );
+ } );
+
+ this.panels.each( function() {
+ $( this ).height( Math.max( 0, maxHeight -
+ $( this ).innerHeight() + $( this ).height() ) );
+ } )
+ .css( "overflow", "auto" );
+ } else if ( heightStyle === "auto" ) {
+ maxHeight = 0;
+ this.panels.each( function() {
+ maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
+ } ).height( maxHeight );
+ }
+ },
+
+ _eventHandler: function( event ) {
+ var options = this.options,
+ active = this.active,
+ anchor = $( event.currentTarget ),
+ tab = anchor.closest( "li" ),
+ clickedIsActive = tab[ 0 ] === active[ 0 ],
+ collapsing = clickedIsActive && options.collapsible,
+ toShow = collapsing ? $() : this._getPanelForTab( tab ),
+ toHide = !active.length ? $() : this._getPanelForTab( active ),
+ eventData = {
+ oldTab: active,
+ oldPanel: toHide,
+ newTab: collapsing ? $() : tab,
+ newPanel: toShow
+ };
+
+ event.preventDefault();
+
+ if ( tab.hasClass( "ui-state-disabled" ) ||
+
+ // tab is already loading
+ tab.hasClass( "ui-tabs-loading" ) ||
+
+ // can't switch durning an animation
+ this.running ||
+
+ // click on active header, but not collapsible
+ ( clickedIsActive && !options.collapsible ) ||
+
+ // allow canceling activation
+ ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
+ return;
+ }
+
+ options.active = collapsing ? false : this.tabs.index( tab );
+
+ this.active = clickedIsActive ? $() : tab;
+ if ( this.xhr ) {
+ this.xhr.abort();
+ }
+
+ if ( !toHide.length && !toShow.length ) {
+ $.error( "jQuery UI Tabs: Mismatching fragment identifier." );
+ }
+
+ if ( toShow.length ) {
+ this.load( this.tabs.index( tab ), event );
+ }
+ this._toggle( event, eventData );
+ },
+
+ // Handles show/hide for selecting tabs
+ _toggle: function( event, eventData ) {
+ var that = this,
+ toShow = eventData.newPanel,
+ toHide = eventData.oldPanel;
+
+ this.running = true;
+
+ function complete() {
+ that.running = false;
+ that._trigger( "activate", event, eventData );
+ }
+
+ function show() {
+ that._addClass( eventData.newTab.closest( "li" ), "ui-tabs-active", "ui-state-active" );
+
+ if ( toShow.length && that.options.show ) {
+ that._show( toShow, that.options.show, complete );
+ } else {
+ toShow.show();
+ complete();
+ }
+ }
+
+ // Start out by hiding, then showing, then completing
+ if ( toHide.length && this.options.hide ) {
+ this._hide( toHide, this.options.hide, function() {
+ that._removeClass( eventData.oldTab.closest( "li" ),
+ "ui-tabs-active", "ui-state-active" );
+ show();
+ } );
+ } else {
+ this._removeClass( eventData.oldTab.closest( "li" ),
+ "ui-tabs-active", "ui-state-active" );
+ toHide.hide();
+ show();
+ }
+
+ toHide.attr( "aria-hidden", "true" );
+ eventData.oldTab.attr( {
+ "aria-selected": "false",
+ "aria-expanded": "false"
+ } );
+
+ // If we're switching tabs, remove the old tab from the tab order.
+ // If we're opening from collapsed state, remove the previous tab from the tab order.
+ // If we're collapsing, then keep the collapsing tab in the tab order.
+ if ( toShow.length && toHide.length ) {
+ eventData.oldTab.attr( "tabIndex", -1 );
+ } else if ( toShow.length ) {
+ this.tabs.filter( function() {
+ return $( this ).attr( "tabIndex" ) === 0;
+ } )
+ .attr( "tabIndex", -1 );
+ }
+
+ toShow.attr( "aria-hidden", "false" );
+ eventData.newTab.attr( {
+ "aria-selected": "true",
+ "aria-expanded": "true",
+ tabIndex: 0
+ } );
+ },
+
+ _activate: function( index ) {
+ var anchor,
+ active = this._findActive( index );
+
+ // Trying to activate the already active panel
+ if ( active[ 0 ] === this.active[ 0 ] ) {
+ return;
+ }
+
+ // Trying to collapse, simulate a click on the current active header
+ if ( !active.length ) {
+ active = this.active;
+ }
+
+ anchor = active.find( ".ui-tabs-anchor" )[ 0 ];
+ this._eventHandler( {
+ target: anchor,
+ currentTarget: anchor,
+ preventDefault: $.noop
+ } );
+ },
+
+ _findActive: function( index ) {
+ return index === false ? $() : this.tabs.eq( index );
+ },
+
+ _getIndex: function( index ) {
+
+ // meta-function to give users option to provide a href string instead of a numerical index.
+ if ( typeof index === "string" ) {
+ index = this.anchors.index( this.anchors.filter( "[href$='" +
+ $.ui.escapeSelector( index ) + "']" ) );
+ }
+
+ return index;
+ },
+
+ _destroy: function() {
+ if ( this.xhr ) {
+ this.xhr.abort();
+ }
+
+ this.tablist
+ .removeAttr( "role" )
+ .off( this.eventNamespace );
+
+ this.anchors
+ .removeAttr( "role tabIndex" )
+ .removeUniqueId();
+
+ this.tabs.add( this.panels ).each( function() {
+ if ( $.data( this, "ui-tabs-destroy" ) ) {
+ $( this ).remove();
+ } else {
+ $( this ).removeAttr( "role tabIndex " +
+ "aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded" );
+ }
+ } );
+
+ this.tabs.each( function() {
+ var li = $( this ),
+ prev = li.data( "ui-tabs-aria-controls" );
+ if ( prev ) {
+ li
+ .attr( "aria-controls", prev )
+ .removeData( "ui-tabs-aria-controls" );
+ } else {
+ li.removeAttr( "aria-controls" );
+ }
+ } );
+
+ this.panels.show();
+
+ if ( this.options.heightStyle !== "content" ) {
+ this.panels.css( "height", "" );
+ }
+ },
+
+ enable: function( index ) {
+ var disabled = this.options.disabled;
+ if ( disabled === false ) {
+ return;
+ }
+
+ if ( index === undefined ) {
+ disabled = false;
+ } else {
+ index = this._getIndex( index );
+ if ( $.isArray( disabled ) ) {
+ disabled = $.map( disabled, function( num ) {
+ return num !== index ? num : null;
+ } );
+ } else {
+ disabled = $.map( this.tabs, function( li, num ) {
+ return num !== index ? num : null;
+ } );
+ }
+ }
+ this._setOptionDisabled( disabled );
+ },
+
+ disable: function( index ) {
+ var disabled = this.options.disabled;
+ if ( disabled === true ) {
+ return;
+ }
+
+ if ( index === undefined ) {
+ disabled = true;
+ } else {
+ index = this._getIndex( index );
+ if ( $.inArray( index, disabled ) !== -1 ) {
+ return;
+ }
+ if ( $.isArray( disabled ) ) {
+ disabled = $.merge( [ index ], disabled ).sort();
+ } else {
+ disabled = [ index ];
+ }
+ }
+ this._setOptionDisabled( disabled );
+ },
+
+ load: function( index, event ) {
+ index = this._getIndex( index );
+ var that = this,
+ tab = this.tabs.eq( index ),
+ anchor = tab.find( ".ui-tabs-anchor" ),
+ panel = this._getPanelForTab( tab ),
+ eventData = {
+ tab: tab,
+ panel: panel
+ },
+ complete = function( jqXHR, status ) {
+ if ( status === "abort" ) {
+ that.panels.stop( false, true );
+ }
+
+ that._removeClass( tab, "ui-tabs-loading" );
+ panel.removeAttr( "aria-busy" );
+
+ if ( jqXHR === that.xhr ) {
+ delete that.xhr;
+ }
+ };
+
+ // Not remote
+ if ( this._isLocal( anchor[ 0 ] ) ) {
+ return;
+ }
+
+ this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );
+
+ // Support: jQuery <1.8
+ // jQuery <1.8 returns false if the request is canceled in beforeSend,
+ // but as of 1.8, $.ajax() always returns a jqXHR object.
+ if ( this.xhr && this.xhr.statusText !== "canceled" ) {
+ this._addClass( tab, "ui-tabs-loading" );
+ panel.attr( "aria-busy", "true" );
+
+ this.xhr
+ .done( function( response, status, jqXHR ) {
+
+ // support: jQuery <1.8
+ // http://bugs.jquery.com/ticket/11778
+ setTimeout( function() {
+ panel.html( response );
+ that._trigger( "load", event, eventData );
+
+ complete( jqXHR, status );
+ }, 1 );
+ } )
+ .fail( function( jqXHR, status ) {
+
+ // support: jQuery <1.8
+ // http://bugs.jquery.com/ticket/11778
+ setTimeout( function() {
+ complete( jqXHR, status );
+ }, 1 );
+ } );
+ }
+ },
+
+ _ajaxSettings: function( anchor, event, eventData ) {
+ var that = this;
+ return {
+
+ // Support: IE <11 only
+ // Strip any hash that exists to prevent errors with the Ajax request
+ url: anchor.attr( "href" ).replace( /#.*$/, "" ),
+ beforeSend: function( jqXHR, settings ) {
+ return that._trigger( "beforeLoad", event,
+ $.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) );
+ }
+ };
+ },
+
+ _getPanelForTab: function( tab ) {
+ var id = $( tab ).attr( "aria-controls" );
+ return this.element.find( this._sanitizeSelector( "#" + id ) );
+ }
+} );
+
+// DEPRECATED
+// TODO: Switch return back to widget declaration at top of file when this is removed
+if ( $.uiBackCompat !== false ) {
+
+ // Backcompat for ui-tab class (now ui-tabs-tab)
+ $.widget( "ui.tabs", $.ui.tabs, {
+ _processTabs: function() {
+ this._superApply( arguments );
+ this._addClass( this.tabs, "ui-tab" );
+ }
+ } );
+}
+
+var widgetsTabs = $.ui.tabs;
+
+
+/*!
+ * jQuery UI Tooltip 1.12.1
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+//>>label: Tooltip
+//>>group: Widgets
+//>>description: Shows additional information for any element on hover or focus.
+//>>docs: http://api.jqueryui.com/tooltip/
+//>>demos: http://jqueryui.com/tooltip/
+//>>css.structure: ../../themes/base/core.css
+//>>css.structure: ../../themes/base/tooltip.css
+//>>css.theme: ../../themes/base/theme.css
+
+
+
+$.widget( "ui.tooltip", {
+ version: "1.12.1",
+ options: {
+ classes: {
+ "ui-tooltip": "ui-corner-all ui-widget-shadow"
+ },
+ content: function() {
+
+ // support: IE<9, Opera in jQuery <1.7
+ // .text() can't accept undefined, so coerce to a string
+ var title = $( this ).attr( "title" ) || "";
+
+ // Escape title, since we're going from an attribute to raw HTML
+ return $( "<a>" ).text( title ).html();
+ },
+ hide: true,
+
+ // Disabled elements have inconsistent behavior across browsers (#8661)
+ items: "[title]:not([disabled])",
+ position: {
+ my: "left top+15",
+ at: "left bottom",
+ collision: "flipfit flip"
+ },
+ show: true,
+ track: false,
+
+ // Callbacks
+ close: null,
+ open: null
+ },
+
+ _addDescribedBy: function( elem, id ) {
+ var describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ );
+ describedby.push( id );
+ elem
+ .data( "ui-tooltip-id", id )
+ .attr( "aria-describedby", $.trim( describedby.join( " " ) ) );
+ },
+
+ _removeDescribedBy: function( elem ) {
+ var id = elem.data( "ui-tooltip-id" ),
+ describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ ),
+ index = $.inArray( id, describedby );
+
+ if ( index !== -1 ) {
+ describedby.splice( index, 1 );
+ }
+
+ elem.removeData( "ui-tooltip-id" );
+ describedby = $.trim( describedby.join( " " ) );
+ if ( describedby ) {
+ elem.attr( "aria-describedby", describedby );
+ } else {
+ elem.removeAttr( "aria-describedby" );
+ }
+ },
+
+ _create: function() {
+ this._on( {
+ mouseover: "open",
+ focusin: "open"
+ } );
+
+ // IDs of generated tooltips, needed for destroy
+ this.tooltips = {};
+
+ // IDs of parent tooltips where we removed the title attribute
+ this.parents = {};
+
+ // Append the aria-live region so tooltips announce correctly
+ this.liveRegion = $( "<div>" )
+ .attr( {
+ role: "log",
+ "aria-live": "assertive",
+ "aria-relevant": "additions"
+ } )
+ .appendTo( this.document[ 0 ].body );
+ this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" );
+
+ this.disabledTitles = $( [] );
+ },
+
+ _setOption: function( key, value ) {
+ var that = this;
+
+ this._super( key, value );
+
+ if ( key === "content" ) {
+ $.each( this.tooltips, function( id, tooltipData ) {
+ that._updateContent( tooltipData.element );
+ } );
+ }
+ },
+
+ _setOptionDisabled: function( value ) {
+ this[ value ? "_disable" : "_enable" ]();
+ },
+
+ _disable: function() {
+ var that = this;
+
+ // Close open tooltips
+ $.each( this.tooltips, function( id, tooltipData ) {
+ var event = $.Event( "blur" );
+ event.target = event.currentTarget = tooltipData.element[ 0 ];
+ that.close( event, true );
+ } );
+
+ // Remove title attributes to prevent native tooltips
+ this.disabledTitles = this.disabledTitles.add(
+ this.element.find( this.options.items ).addBack()
+ .filter( function() {
+ var element = $( this );
+ if ( element.is( "[title]" ) ) {
+ return element
+ .data( "ui-tooltip-title", element.attr( "title" ) )
+ .removeAttr( "title" );
+ }
+ } )
+ );
+ },
+
+ _enable: function() {
+
+ // restore title attributes
+ this.disabledTitles.each( function() {
+ var element = $( this );
+ if ( element.data( "ui-tooltip-title" ) ) {
+ element.attr( "title", element.data( "ui-tooltip-title" ) );
+ }
+ } );
+ this.disabledTitles = $( [] );
+ },
+
+ open: function( event ) {
+ var that = this,
+ target = $( event ? event.target : this.element )
+
+ // we need closest here due to mouseover bubbling,
+ // but always pointing at the same event target
+ .closest( this.options.items );
+
+ // No element to show a tooltip for or the tooltip is already open
+ if ( !target.length || target.data( "ui-tooltip-id" ) ) {
+ return;
+ }
+
+ if ( target.attr( "title" ) ) {
+ target.data( "ui-tooltip-title", target.attr( "title" ) );
+ }
+
+ target.data( "ui-tooltip-open", true );
+
+ // Kill parent tooltips, custom or native, for hover
+ if ( event && event.type === "mouseover" ) {
+ target.parents().each( function() {
+ var parent = $( this ),
+ blurEvent;
+ if ( parent.data( "ui-tooltip-open" ) ) {
+ blurEvent = $.Event( "blur" );
+ blurEvent.target = blurEvent.currentTarget = this;
+ that.close( blurEvent, true );
+ }
+ if ( parent.attr( "title" ) ) {
+ parent.uniqueId();
+ that.parents[ this.id ] = {
+ element: this,
+ title: parent.attr( "title" )
+ };
+ parent.attr( "title", "" );
+ }
+ } );
+ }
+
+ this._registerCloseHandlers( event, target );
+ this._updateContent( target, event );
+ },
+
+ _updateContent: function( target, event ) {
+ var content,
+ contentOption = this.options.content,
+ that = this,
+ eventType = event ? event.type : null;
+
+ if ( typeof contentOption === "string" || contentOption.nodeType ||
+ contentOption.jquery ) {
+ return this._open( event, target, contentOption );
+ }
+
+ content = contentOption.call( target[ 0 ], function( response ) {
+
+ // IE may instantly serve a cached response for ajax requests
+ // delay this call to _open so the other call to _open runs first
+ that._delay( function() {
+
+ // Ignore async response if tooltip was closed already
+ if ( !target.data( "ui-tooltip-open" ) ) {
+ return;
+ }
+
+ // JQuery creates a special event for focusin when it doesn't
+ // exist natively. To improve performance, the native event
+ // object is reused and the type is changed. Therefore, we can't
+ // rely on the type being correct after the event finished
+ // bubbling, so we set it back to the previous value. (#8740)
+ if ( event ) {
+ event.type = eventType;
+ }
+ this._open( event, target, response );
+ } );
+ } );
+ if ( content ) {
+ this._open( event, target, content );
+ }
+ },
+
+ _open: function( event, target, content ) {
+ var tooltipData, tooltip, delayedShow, a11yContent,
+ positionOption = $.extend( {}, this.options.position );
+
+ if ( !content ) {
+ return;
+ }
+
+ // Content can be updated multiple times. If the tooltip already
+ // exists, then just update the content and bail.
+ tooltipData = this._find( target );
+ if ( tooltipData ) {
+ tooltipData.tooltip.find( ".ui-tooltip-content" ).html( content );
+ return;
+ }
+
+ // If we have a title, clear it to prevent the native tooltip
+ // we have to check first to avoid defining a title if none exists
+ // (we don't want to cause an element to start matching [title])
+ //
+ // We use removeAttr only for key events, to allow IE to export the correct
+ // accessible attributes. For mouse events, set to empty string to avoid
+ // native tooltip showing up (happens only when removing inside mouseover).
+ if ( target.is( "[title]" ) ) {
+ if ( event && event.type === "mouseover" ) {
+ target.attr( "title", "" );
+ } else {
+ target.removeAttr( "title" );
+ }
+ }
+
+ tooltipData = this._tooltip( target );
+ tooltip = tooltipData.tooltip;
+ this._addDescribedBy( target, tooltip.attr( "id" ) );
+ tooltip.find( ".ui-tooltip-content" ).html( content );
+
+ // Support: Voiceover on OS X, JAWS on IE <= 9
+ // JAWS announces deletions even when aria-relevant="additions"
+ // Voiceover will sometimes re-read the entire log region's contents from the beginning
+ this.liveRegion.children().hide();
+ a11yContent = $( "<div>" ).html( tooltip.find( ".ui-tooltip-content" ).html() );
+ a11yContent.removeAttr( "name" ).find( "[name]" ).removeAttr( "name" );
+ a11yContent.removeAttr( "id" ).find( "[id]" ).removeAttr( "id" );
+ a11yContent.appendTo( this.liveRegion );
+
+ function position( event ) {
+ positionOption.of = event;
+ if ( tooltip.is( ":hidden" ) ) {
+ return;
+ }
+ tooltip.position( positionOption );
+ }
+ if ( this.options.track && event && /^mouse/.test( event.type ) ) {
+ this._on( this.document, {
+ mousemove: position
+ } );
+
+ // trigger once to override element-relative positioning
+ position( event );
+ } else {
+ tooltip.position( $.extend( {
+ of: target
+ }, this.options.position ) );
+ }
+
+ tooltip.hide();
+
+ this._show( tooltip, this.options.show );
+
+ // Handle tracking tooltips that are shown with a delay (#8644). As soon
+ // as the tooltip is visible, position the tooltip using the most recent
+ // event.
+ // Adds the check to add the timers only when both delay and track options are set (#14682)
+ if ( this.options.track && this.options.show && this.options.show.delay ) {
+ delayedShow = this.delayedShow = setInterval( function() {
+ if ( tooltip.is( ":visible" ) ) {
+ position( positionOption.of );
+ clearInterval( delayedShow );
+ }
+ }, $.fx.interval );
+ }
+
+ this._trigger( "open", event, { tooltip: tooltip } );
+ },
+
+ _registerCloseHandlers: function( event, target ) {
+ var events = {
+ keyup: function( event ) {
+ if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
+ var fakeEvent = $.Event( event );
+ fakeEvent.currentTarget = target[ 0 ];
+ this.close( fakeEvent, true );
+ }
+ }
+ };
+
+ // Only bind remove handler for delegated targets. Non-delegated
+ // tooltips will handle this in destroy.
+ if ( target[ 0 ] !== this.element[ 0 ] ) {
+ events.remove = function() {
+ this._removeTooltip( this._find( target ).tooltip );
+ };
+ }
+
+ if ( !event || event.type === "mouseover" ) {
+ events.mouseleave = "close";
+ }
+ if ( !event || event.type === "focusin" ) {
+ events.focusout = "close";
+ }
+ this._on( true, target, events );
+ },
+
+ close: function( event ) {
+ var tooltip,
+ that = this,
+ target = $( event ? event.currentTarget : this.element ),
+ tooltipData = this._find( target );
+
+ // The tooltip may already be closed
+ if ( !tooltipData ) {
+
+ // We set ui-tooltip-open immediately upon open (in open()), but only set the
+ // additional data once there's actually content to show (in _open()). So even if the
+ // tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in
+ // the period between open() and _open().
+ target.removeData( "ui-tooltip-open" );
+ return;
+ }
+
+ tooltip = tooltipData.tooltip;
+
+ // Disabling closes the tooltip, so we need to track when we're closing
+ // to avoid an infinite loop in case the tooltip becomes disabled on close
+ if ( tooltipData.closing ) {
+ return;
+ }
+
+ // Clear the interval for delayed tracking tooltips
+ clearInterval( this.delayedShow );
+
+ // Only set title if we had one before (see comment in _open())
+ // If the title attribute has changed since open(), don't restore
+ if ( target.data( "ui-tooltip-title" ) && !target.attr( "title" ) ) {
+ target.attr( "title", target.data( "ui-tooltip-title" ) );
+ }
+
+ this._removeDescribedBy( target );
+
+ tooltipData.hiding = true;
+ tooltip.stop( true );
+ this._hide( tooltip, this.options.hide, function() {
+ that._removeTooltip( $( this ) );
+ } );
+
+ target.removeData( "ui-tooltip-open" );
+ this._off( target, "mouseleave focusout keyup" );
+
+ // Remove 'remove' binding only on delegated targets
+ if ( target[ 0 ] !== this.element[ 0 ] ) {
+ this._off( target, "remove" );
+ }
+ this._off( this.document, "mousemove" );
+
+ if ( event && event.type === "mouseleave" ) {
+ $.each( this.parents, function( id, parent ) {
+ $( parent.element ).attr( "title", parent.title );
+ delete that.parents[ id ];
+ } );
+ }
+
+ tooltipData.closing = true;
+ this._trigger( "close", event, { tooltip: tooltip } );
+ if ( !tooltipData.hiding ) {
+ tooltipData.closing = false;
+ }
+ },
+
+ _tooltip: function( element ) {
+ var tooltip = $( "<div>" ).attr( "role", "tooltip" ),
+ content = $( "<div>" ).appendTo( tooltip ),
+ id = tooltip.uniqueId().attr( "id" );
+
+ this._addClass( content, "ui-tooltip-content" );
+ this._addClass( tooltip, "ui-tooltip", "ui-widget ui-widget-content" );
+
+ tooltip.appendTo( this._appendTo( element ) );
+
+ return this.tooltips[ id ] = {
+ element: element,
+ tooltip: tooltip
+ };
+ },
+
+ _find: function( target ) {
+ var id = target.data( "ui-tooltip-id" );
+ return id ? this.tooltips[ id ] : null;
+ },
+
+ _removeTooltip: function( tooltip ) {
+ tooltip.remove();
+ delete this.tooltips[ tooltip.attr( "id" ) ];
+ },
+
+ _appendTo: function( target ) {
+ var element = target.closest( ".ui-front, dialog" );
+
+ if ( !element.length ) {
+ element = this.document[ 0 ].body;
+ }
+
+ return element;
+ },
+
+ _destroy: function() {
+ var that = this;
+
+ // Close open tooltips
+ $.each( this.tooltips, function( id, tooltipData ) {
+
+ // Delegate to close method to handle common cleanup
+ var event = $.Event( "blur" ),
+ element = tooltipData.element;
+ event.target = event.currentTarget = element[ 0 ];
+ that.close( event, true );
+
+ // Remove immediately; destroying an open tooltip doesn't use the
+ // hide animation
+ $( "#" + id ).remove();
+
+ // Restore the title
+ if ( element.data( "ui-tooltip-title" ) ) {
+
+ // If the title attribute has changed since open(), don't restore
+ if ( !element.attr( "title" ) ) {
+ element.attr( "title", element.data( "ui-tooltip-title" ) );
+ }
+ element.removeData( "ui-tooltip-title" );
+ }
+ } );
+ this.liveRegion.remove();
+ }
+} );
+
+// DEPRECATED
+// TODO: Switch return back to widget declaration at top of file when this is removed
+if ( $.uiBackCompat !== false ) {
+
+ // Backcompat for tooltipClass option
+ $.widget( "ui.tooltip", $.ui.tooltip, {
+ options: {
+ tooltipClass: null
+ },
+ _tooltip: function() {
+ var tooltipData = this._superApply( arguments );
+ if ( this.options.tooltipClass ) {
+ tooltipData.tooltip.addClass( this.options.tooltipClass );
+ }
+ return tooltipData;
+ }
+ } );
+}
+
+var widgetsTooltip = $.ui.tooltip;
+
+
+
+
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/js/jquery.cookie.js b/common/src/main/webapp/thirdparty/js/jquery.cookie.js
new file mode 100644
index 0000000..c7f3a59
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/js/jquery.cookie.js
@@ -0,0 +1,117 @@
+/*!
+ * jQuery Cookie Plugin v1.4.1
+ * https://github.com/carhartl/jquery-cookie
+ *
+ * Copyright 2013 Klaus Hartl
+ * Released under the MIT license
+ */
+(function (factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD
+ define(['jquery'], factory);
+ } else if (typeof exports === 'object') {
+ // CommonJS
+ factory(require('jquery'));
+ } else {
+ // Browser globals
+ factory(jQuery);
+ }
+}(function ($) {
+
+ var pluses = /\+/g;
+
+ function encode(s) {
+ return config.raw ? s : encodeURIComponent(s);
+ }
+
+ function decode(s) {
+ return config.raw ? s : decodeURIComponent(s);
+ }
+
+ function stringifyCookieValue(value) {
+ return encode(config.json ? JSON.stringify(value) : String(value));
+ }
+
+ function parseCookieValue(s) {
+ if (s.indexOf('"') === 0) {
+ // This is a quoted cookie as according to RFC2068, unescape...
+ s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
+ }
+
+ try {
+ // Replace server-side written pluses with spaces.
+ // If we can't decode the cookie, ignore it, it's unusable.
+ // If we can't parse the cookie, ignore it, it's unusable.
+ s = decodeURIComponent(s.replace(pluses, ' '));
+ return config.json ? JSON.parse(s) : s;
+ } catch(e) {}
+ }
+
+ function read(s, converter) {
+ var value = config.raw ? s : parseCookieValue(s);
+ return $.isFunction(converter) ? converter(value) : value;
+ }
+
+ var config = $.cookie = function (key, value, options) {
+
+ // Write
+
+ if (value !== undefined && !$.isFunction(value)) {
+ options = $.extend({}, config.defaults, options);
+
+ if (typeof options.expires === 'number') {
+ var days = options.expires, t = options.expires = new Date();
+ t.setTime(+t + days * 864e+5);
+ }
+
+ return (document.cookie = [
+ encode(key), '=', stringifyCookieValue(value),
+ options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
+ options.path ? '; path=' + options.path : '',
+ options.domain ? '; domain=' + options.domain : '',
+ options.secure ? '; secure' : ''
+ ].join(''));
+ }
+
+ // Read
+
+ var result = key ? undefined : {};
+
+ // To prevent the for loop in the first place assign an empty array
+ // in case there are no cookies at all. Also prevents odd result when
+ // calling $.cookie().
+ var cookies = document.cookie ? document.cookie.split('; ') : [];
+
+ for (var i = 0, l = cookies.length; i < l; i++) {
+ var parts = cookies[i].split('=');
+ var name = decode(parts.shift());
+ var cookie = parts.join('=');
+
+ if (key && key === name) {
+ // If second argument (value) is a function it's a converter...
+ result = read(cookie, value);
+ break;
+ }
+
+ // Prevent storing a cookie that we couldn't decode.
+ if (!key && (cookie = read(cookie)) !== undefined) {
+ result[name] = cookie;
+ }
+ }
+
+ return result;
+ };
+
+ config.defaults = {};
+
+ $.removeCookie = function (key, options) {
+ if ($.cookie(key) === undefined) {
+ return false;
+ }
+
+ // Must not alter options, thus extending a fresh object...
+ $.cookie(key, '', $.extend({}, options, { expires: -1 }));
+ return !$.cookie(key);
+ };
+
+}));
diff --git a/common/src/main/webapp/thirdparty/js/jquery.ztree.core-3.5.js b/common/src/main/webapp/thirdparty/js/jquery.ztree.core-3.5.js
new file mode 100644
index 0000000..0e7b338
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/js/jquery.ztree.core-3.5.js
@@ -0,0 +1,70 @@
+/*
+ * JQuery zTree core v3.5.18
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2015-06-18
+ */
+(function(p){var G,H,I,J,K,L,r={},u={},v={},M={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{children:"children",name:"name",title:"",url:"url"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",url:"",autoParam:[],
+otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},w=[function(b){var a=b.treeObj,c=e.event;a.bind(c.NODECREATED,function(a,c,g){j.apply(b.callback.onNodeCreated,
+[a,c,g])});a.bind(c.CLICK,function(a,c,g,l,h){j.apply(b.callback.onClick,[c,g,l,h])});a.bind(c.EXPAND,function(a,c,g){j.apply(b.callback.onExpand,[a,c,g])});a.bind(c.COLLAPSE,function(a,c,g){j.apply(b.callback.onCollapse,[a,c,g])});a.bind(c.ASYNC_SUCCESS,function(a,c,g,l){j.apply(b.callback.onAsyncSuccess,[a,c,g,l])});a.bind(c.ASYNC_ERROR,function(a,c,g,l,h,e){j.apply(b.callback.onAsyncError,[a,c,g,l,h,e])});a.bind(c.REMOVE,function(a,c,g){j.apply(b.callback.onRemove,[a,c,g])});a.bind(c.SELECTED,
+function(a,c,g,l){j.apply(b.callback.onSelected,[c,g,l])});a.bind(c.UNSELECTED,function(a,c,g,l){j.apply(b.callback.onUnSelected,[c,g,l])})}],x=[function(b){var a=e.event;b.treeObj.unbind(a.NODECREATED).unbind(a.CLICK).unbind(a.EXPAND).unbind(a.COLLAPSE).unbind(a.ASYNC_SUCCESS).unbind(a.ASYNC_ERROR).unbind(a.REMOVE).unbind(a.SELECTED).unbind(a.UNSELECTED)}],y=[function(b){var a=h.getCache(b);a||(a={},h.setCache(b,a));a.nodes=[];a.doms=[]}],z=[function(b,a,c,d,f,g){if(c){var l=h.getRoot(b),e=b.data.key.children;
+c.level=a;c.tId=b.treeId+"_"+ ++l.zId;c.parentTId=d?d.tId:null;c.open=typeof c.open=="string"?j.eqs(c.open,"true"):!!c.open;c[e]&&c[e].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent=typeof c.isParent=="string"?j.eqs(c.isParent,"true"):!!c.isParent,c.open=c.isParent&&!b.async.enable?c.open:!1,c.zAsync=!c.isParent);c.isFirstNode=f;c.isLastNode=g;c.getParentNode=function(){return h.getNodeCache(b,c.parentTId)};c.getPreNode=function(){return h.getPreNode(b,c)};c.getNextNode=function(){return h.getNextNode(b,
+c)};c.isAjaxing=!1;h.fixPIdKeyValue(b,c)}}],s=[function(b){var a=b.target,c=h.getSetting(b.data.treeId),d="",f=null,g="",l="",i=null,o=null,k=null;if(j.eqs(b.type,"mousedown"))l="mousedown";else if(j.eqs(b.type,"mouseup"))l="mouseup";else if(j.eqs(b.type,"contextmenu"))l="contextmenu";else if(j.eqs(b.type,"click"))if(j.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+e.id.SWITCH)!==null)d=j.getNodeMainDom(a).id,g="switchNode";else{if(k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}]))d=j.getNodeMainDom(k).id,
+g="clickNode"}else if(j.eqs(b.type,"dblclick")&&(l="dblclick",k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}])))d=j.getNodeMainDom(k).id,g="switchNode";if(l.length>0&&d.length==0&&(k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}])))d=j.getNodeMainDom(k).id;if(d.length>0)switch(f=h.getNodeCache(c,d),g){case "switchNode":f.isParent?j.eqs(b.type,"click")||j.eqs(b.type,"dblclick")&&j.apply(c.view.dblClickExpand,[c.treeId,f],c.view.dblClickExpand)?i=G:g="":g="";break;case "clickNode":i=
+H}switch(l){case "mousedown":o=I;break;case "mouseup":o=J;break;case "dblclick":o=K;break;case "contextmenu":o=L}return{stop:!1,node:f,nodeEventType:g,nodeEventCallback:i,treeEventType:l,treeEventCallback:o}}],A=[function(b){var a=h.getRoot(b);a||(a={},h.setRoot(b,a));a[b.data.key.children]=[];a.expandTriggerFlag=!1;a.curSelectedList=[];a.noSelection=!0;a.createdNodes=[];a.zId=0;a._ver=(new Date).getTime()}],B=[],C=[],D=[],E=[],F=[],h={addNodeCache:function(b,a){h.getCache(b).nodes[h.getNodeCacheId(a.tId)]=
+a},getNodeCacheId:function(b){return b.substring(b.lastIndexOf("_")+1)},addAfterA:function(b){C.push(b)},addBeforeA:function(b){B.push(b)},addInnerAfterA:function(b){E.push(b)},addInnerBeforeA:function(b){D.push(b)},addInitBind:function(b){w.push(b)},addInitUnBind:function(b){x.push(b)},addInitCache:function(b){y.push(b)},addInitNode:function(b){z.push(b)},addInitProxy:function(b,a){a?s.splice(0,0,b):s.push(b)},addInitRoot:function(b){A.push(b)},addNodesData:function(b,a,c){var d=b.data.key.children;
+a[d]||(a[d]=[]);if(a[d].length>0)a[d][a[d].length-1].isLastNode=!1,i.setNodeLineIcos(b,a[d][a[d].length-1]);a.isParent=!0;a[d]=a[d].concat(c)},addSelectedNode:function(b,a){var c=h.getRoot(b);h.isSelectedNode(b,a)||c.curSelectedList.push(a)},addCreatedNode:function(b,a){(b.callback.onNodeCreated||b.view.addDiyDom)&&h.getRoot(b).createdNodes.push(a)},addZTreeTools:function(b){F.push(b)},exSetting:function(b){p.extend(!0,M,b)},fixPIdKeyValue:function(b,a){b.data.simpleData.enable&&(a[b.data.simpleData.pIdKey]=
+a.parentTId?a.getParentNode()[b.data.simpleData.idKey]:b.data.simpleData.rootPId)},getAfterA:function(b,a,c){for(var d=0,f=C.length;d<f;d++)C[d].apply(this,arguments)},getBeforeA:function(b,a,c){for(var d=0,f=B.length;d<f;d++)B[d].apply(this,arguments)},getInnerAfterA:function(b,a,c){for(var d=0,f=E.length;d<f;d++)E[d].apply(this,arguments)},getInnerBeforeA:function(b,a,c){for(var d=0,f=D.length;d<f;d++)D[d].apply(this,arguments)},getCache:function(b){return v[b.treeId]},getNextNode:function(b,a){if(!a)return null;
+for(var c=b.data.key.children,d=a.parentTId?a.getParentNode():h.getRoot(b),f=0,g=d[c].length-1;f<=g;f++)if(d[c][f]===a)return f==g?null:d[c][f+1];return null},getNodeByParam:function(b,a,c,d){if(!a||!c)return null;for(var f=b.data.key.children,g=0,l=a.length;g<l;g++){if(a[g][c]==d)return a[g];var e=h.getNodeByParam(b,a[g][f],c,d);if(e)return e}return null},getNodeCache:function(b,a){if(!a)return null;var c=v[b.treeId].nodes[h.getNodeCacheId(a)];return c?c:null},getNodeName:function(b,a){return""+
+a[b.data.key.name]},getNodeTitle:function(b,a){return""+a[b.data.key.title===""?b.data.key.name:b.data.key.title]},getNodes:function(b){return h.getRoot(b)[b.data.key.children]},getNodesByParam:function(b,a,c,d){if(!a||!c)return[];for(var f=b.data.key.children,g=[],l=0,e=a.length;l<e;l++)a[l][c]==d&&g.push(a[l]),g=g.concat(h.getNodesByParam(b,a[l][f],c,d));return g},getNodesByParamFuzzy:function(b,a,c,d){if(!a||!c)return[];for(var f=b.data.key.children,g=[],d=d.toLowerCase(),l=0,e=a.length;l<e;l++)typeof a[l][c]==
+"string"&&a[l][c].toLowerCase().indexOf(d)>-1&&g.push(a[l]),g=g.concat(h.getNodesByParamFuzzy(b,a[l][f],c,d));return g},getNodesByFilter:function(b,a,c,d,f){if(!a)return d?null:[];for(var g=b.data.key.children,e=d?null:[],i=0,o=a.length;i<o;i++){if(j.apply(c,[a[i],f],!1)){if(d)return a[i];e.push(a[i])}var k=h.getNodesByFilter(b,a[i][g],c,d,f);if(d&&k)return k;e=d?k:e.concat(k)}return e},getPreNode:function(b,a){if(!a)return null;for(var c=b.data.key.children,d=a.parentTId?a.getParentNode():h.getRoot(b),
+f=0,g=d[c].length;f<g;f++)if(d[c][f]===a)return f==0?null:d[c][f-1];return null},getRoot:function(b){return b?u[b.treeId]:null},getRoots:function(){return u},getSetting:function(b){return r[b]},getSettings:function(){return r},getZTreeTools:function(b){return(b=this.getRoot(this.getSetting(b)))?b.treeTools:null},initCache:function(b){for(var a=0,c=y.length;a<c;a++)y[a].apply(this,arguments)},initNode:function(b,a,c,d,f,g){for(var e=0,h=z.length;e<h;e++)z[e].apply(this,arguments)},initRoot:function(b){for(var a=
+0,c=A.length;a<c;a++)A[a].apply(this,arguments)},isSelectedNode:function(b,a){for(var c=h.getRoot(b),d=0,f=c.curSelectedList.length;d<f;d++)if(a===c.curSelectedList[d])return!0;return!1},removeNodeCache:function(b,a){var c=b.data.key.children;if(a[c])for(var d=0,f=a[c].length;d<f;d++)arguments.callee(b,a[c][d]);h.getCache(b).nodes[h.getNodeCacheId(a.tId)]=null},removeSelectedNode:function(b,a){for(var c=h.getRoot(b),d=0,f=c.curSelectedList.length;d<f;d++)if(a===c.curSelectedList[d]||!h.getNodeCache(b,
+c.curSelectedList[d].tId))c.curSelectedList.splice(d,1),d--,f--},setCache:function(b,a){v[b.treeId]=a},setRoot:function(b,a){u[b.treeId]=a},setZTreeTools:function(b,a){for(var c=0,d=F.length;c<d;c++)F[c].apply(this,arguments)},transformToArrayFormat:function(b,a){if(!a)return[];var c=b.data.key.children,d=[];if(j.isArray(a))for(var f=0,g=a.length;f<g;f++)d.push(a[f]),a[f][c]&&(d=d.concat(h.transformToArrayFormat(b,a[f][c])));else d.push(a),a[c]&&(d=d.concat(h.transformToArrayFormat(b,a[c])));return d},
+transformTozTreeFormat:function(b,a){var c,d,f=b.data.simpleData.idKey,g=b.data.simpleData.pIdKey,e=b.data.key.children;if(!f||f==""||!a)return[];if(j.isArray(a)){var h=[],i=[];for(c=0,d=a.length;c<d;c++)i[a[c][f]]=a[c];for(c=0,d=a.length;c<d;c++)i[a[c][g]]&&a[c][f]!=a[c][g]?(i[a[c][g]][e]||(i[a[c][g]][e]=[]),i[a[c][g]][e].push(a[c])):h.push(a[c]);return h}else return[a]}},m={bindEvent:function(b){for(var a=0,c=w.length;a<c;a++)w[a].apply(this,arguments)},unbindEvent:function(b){for(var a=0,c=x.length;a<
+c;a++)x[a].apply(this,arguments)},bindTree:function(b){var a={treeId:b.treeId},c=b.treeObj;b.view.txtSelectedEnable||c.bind("selectstart",function(a){a=a.originalEvent.srcElement.nodeName.toLowerCase();return a==="input"||a==="textarea"}).css({"-moz-user-select":"-moz-none"});c.bind("click",a,m.proxy);c.bind("dblclick",a,m.proxy);c.bind("mouseover",a,m.proxy);c.bind("mouseout",a,m.proxy);c.bind("mousedown",a,m.proxy);c.bind("mouseup",a,m.proxy);c.bind("contextmenu",a,m.proxy)},unbindTree:function(b){b.treeObj.unbind("click",
+m.proxy).unbind("dblclick",m.proxy).unbind("mouseover",m.proxy).unbind("mouseout",m.proxy).unbind("mousedown",m.proxy).unbind("mouseup",m.proxy).unbind("contextmenu",m.proxy)},doProxy:function(b){for(var a=[],c=0,d=s.length;c<d;c++){var f=s[c].apply(this,arguments);a.push(f);if(f.stop)break}return a},proxy:function(b){var a=h.getSetting(b.data.treeId);if(!j.uCanDo(a,b))return!0;for(var a=m.doProxy(b),c=!0,d=0,f=a.length;d<f;d++){var g=a[d];g.nodeEventCallback&&(c=g.nodeEventCallback.apply(g,[b,g.node])&&
+c);g.treeEventCallback&&(c=g.treeEventCallback.apply(g,[b,g.node])&&c)}return c}};G=function(b,a){var c=h.getSetting(b.data.treeId);if(a.open){if(j.apply(c.callback.beforeCollapse,[c.treeId,a],!0)==!1)return!0}else if(j.apply(c.callback.beforeExpand,[c.treeId,a],!0)==!1)return!0;h.getRoot(c).expandTriggerFlag=!0;i.switchNode(c,a);return!0};H=function(b,a){var c=h.getSetting(b.data.treeId),d=c.view.autoCancelSelected&&(b.ctrlKey||b.metaKey)&&h.isSelectedNode(c,a)?0:c.view.autoCancelSelected&&(b.ctrlKey||
+b.metaKey)&&c.view.selectedMulti?2:1;if(j.apply(c.callback.beforeClick,[c.treeId,a,d],!0)==!1)return!0;d===0?i.cancelPreSelectedNode(c,a):i.selectNode(c,a,d===2);c.treeObj.trigger(e.event.CLICK,[b,c.treeId,a,d]);return!0};I=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeMouseDown,[c.treeId,a],!0)&&j.apply(c.callback.onMouseDown,[b,c.treeId,a]);return!0};J=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeMouseUp,[c.treeId,a],!0)&&j.apply(c.callback.onMouseUp,
+[b,c.treeId,a]);return!0};K=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeDblClick,[c.treeId,a],!0)&&j.apply(c.callback.onDblClick,[b,c.treeId,a]);return!0};L=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeRightClick,[c.treeId,a],!0)&&j.apply(c.callback.onRightClick,[b,c.treeId,a]);return typeof c.callback.onRightClick!="function"};var j={apply:function(b,a,c){return typeof b=="function"?b.apply(N,a?a:[]):c},canAsync:function(b,a){var c=b.data.key.children;
+return b.async.enable&&a&&a.isParent&&!(a.zAsync||a[c]&&a[c].length>0)},clone:function(b){if(b===null)return null;var a=j.isArray(b)?[]:{},c;for(c in b)a[c]=b[c]instanceof Date?new Date(b[c].getTime()):typeof b[c]==="object"?arguments.callee(b[c]):b[c];return a},eqs:function(b,a){return b.toLowerCase()===a.toLowerCase()},isArray:function(b){return Object.prototype.toString.apply(b)==="[object Array]"},$:function(b,a,c){a&&typeof a!="string"&&(c=a,a="");return typeof b=="string"?p(b,c?c.treeObj.get(0).ownerDocument:
+null):p("#"+b.tId+a,c?c.treeObj:null)},getMDom:function(b,a,c){if(!a)return null;for(;a&&a.id!==b.treeId;){for(var d=0,f=c.length;a.tagName&&d<f;d++)if(j.eqs(a.tagName,c[d].tagName)&&a.getAttribute(c[d].attrName)!==null)return a;a=a.parentNode}return null},getNodeMainDom:function(b){return p(b).parent("li").get(0)||p(b).parentsUntil("li").parent().get(0)},isChildOrSelf:function(b,a){return p(b).closest("#"+a).length>0},uCanDo:function(){return!0}},i={addNodes:function(b,a,c,d){if(!b.data.keep.leaf||
+!a||a.isParent)if(j.isArray(c)||(c=[c]),b.data.simpleData.enable&&(c=h.transformTozTreeFormat(b,c)),a){var f=k(a,e.id.SWITCH,b),g=k(a,e.id.ICON,b),l=k(a,e.id.UL,b);if(!a.open)i.replaceSwitchClass(a,f,e.folder.CLOSE),i.replaceIcoClass(a,g,e.folder.CLOSE),a.open=!1,l.css({display:"none"});h.addNodesData(b,a,c);i.createNodes(b,a.level+1,c,a);d||i.expandCollapseParentNode(b,a,!0)}else h.addNodesData(b,h.getRoot(b),c),i.createNodes(b,0,c,null)},appendNodes:function(b,a,c,d,f,g){if(!c)return[];for(var e=
+[],j=b.data.key.children,k=0,m=c.length;k<m;k++){var n=c[k];if(f){var t=(d?d:h.getRoot(b))[j].length==c.length&&k==0;h.initNode(b,a,n,d,t,k==c.length-1,g);h.addNodeCache(b,n)}t=[];n[j]&&n[j].length>0&&(t=i.appendNodes(b,a+1,n[j],n,f,g&&n.open));g&&(i.makeDOMNodeMainBefore(e,b,n),i.makeDOMNodeLine(e,b,n),h.getBeforeA(b,n,e),i.makeDOMNodeNameBefore(e,b,n),h.getInnerBeforeA(b,n,e),i.makeDOMNodeIcon(e,b,n),h.getInnerAfterA(b,n,e),i.makeDOMNodeNameAfter(e,b,n),h.getAfterA(b,n,e),n.isParent&&n.open&&i.makeUlHtml(b,
+n,e,t.join("")),i.makeDOMNodeMainAfter(e,b,n),h.addCreatedNode(b,n))}return e},appendParentULDom:function(b,a){var c=[],d=k(a,b);!d.get(0)&&a.parentTId&&(i.appendParentULDom(b,a.getParentNode()),d=k(a,b));var f=k(a,e.id.UL,b);f.get(0)&&f.remove();f=i.appendNodes(b,a.level+1,a[b.data.key.children],a,!1,!0);i.makeUlHtml(b,a,c,f.join(""));d.append(c.join(""))},asyncNode:function(b,a,c,d){var f,g;if(a&&!a.isParent)return j.apply(d),!1;else if(a&&a.isAjaxing)return!1;else if(j.apply(b.callback.beforeAsync,
+[b.treeId,a],!0)==!1)return j.apply(d),!1;if(a)a.isAjaxing=!0,k(a,e.id.ICON,b).attr({style:"","class":e.className.BUTTON+" "+e.className.ICO_LOADING});var l={};for(f=0,g=b.async.autoParam.length;a&&f<g;f++){var q=b.async.autoParam[f].split("="),o=q;q.length>1&&(o=q[1],q=q[0]);l[o]=a[q]}if(j.isArray(b.async.otherParam))for(f=0,g=b.async.otherParam.length;f<g;f+=2)l[b.async.otherParam[f]]=b.async.otherParam[f+1];else for(var m in b.async.otherParam)l[m]=b.async.otherParam[m];var n=h.getRoot(b)._ver;
+p.ajax({contentType:b.async.contentType,cache:!1,type:b.async.type,url:j.apply(b.async.url,[b.treeId,a],b.async.url),data:l,dataType:b.async.dataType,success:function(f){if(n==h.getRoot(b)._ver){var g=[];try{g=!f||f.length==0?[]:typeof f=="string"?eval("("+f+")"):f}catch(l){g=f}if(a)a.isAjaxing=null,a.zAsync=!0;i.setNodeLineIcos(b,a);g&&g!==""?(g=j.apply(b.async.dataFilter,[b.treeId,a,g],g),i.addNodes(b,a,g?j.clone(g):[],!!c)):i.addNodes(b,a,[],!!c);b.treeObj.trigger(e.event.ASYNC_SUCCESS,[b.treeId,
+a,f]);j.apply(d)}},error:function(c,d,f){if(n==h.getRoot(b)._ver){if(a)a.isAjaxing=null;i.setNodeLineIcos(b,a);b.treeObj.trigger(e.event.ASYNC_ERROR,[b.treeId,a,c,d,f])}}});return!0},cancelPreSelectedNode:function(b,a,c){var d=h.getRoot(b).curSelectedList,f,g;for(f=d.length-1;f>=0;f--)if(g=d[f],a===g||!a&&(!c||c!==g))if(k(g,e.id.A,b).removeClass(e.node.CURSELECTED),a){h.removeSelectedNode(b,a);b.treeObj.trigger(e.event.UNSELECTED,[m,b.treeId,g]);break}else d.splice(f,1),b.treeObj.trigger(e.event.UNSELECTED,
+[m,b.treeId,g])},createNodeCallback:function(b){if(b.callback.onNodeCreated||b.view.addDiyDom)for(var a=h.getRoot(b);a.createdNodes.length>0;){var c=a.createdNodes.shift();j.apply(b.view.addDiyDom,[b.treeId,c]);b.callback.onNodeCreated&&b.treeObj.trigger(e.event.NODECREATED,[b.treeId,c])}},createNodes:function(b,a,c,d){if(c&&c.length!=0){var f=h.getRoot(b),g=b.data.key.children,g=!d||d.open||!!k(d[g][0],b).get(0);f.createdNodes=[];a=i.appendNodes(b,a,c,d,!0,g);d?(d=k(d,e.id.UL,b),d.get(0)&&d.append(a.join(""))):
+b.treeObj.append(a.join(""));i.createNodeCallback(b)}},destroy:function(b){b&&(h.initCache(b),h.initRoot(b),m.unbindTree(b),m.unbindEvent(b),b.treeObj.empty(),delete r[b.treeId])},expandCollapseNode:function(b,a,c,d,f){var g=h.getRoot(b),l=b.data.key.children;if(a){if(g.expandTriggerFlag){var q=f,f=function(){q&&q();a.open?b.treeObj.trigger(e.event.EXPAND,[b.treeId,a]):b.treeObj.trigger(e.event.COLLAPSE,[b.treeId,a])};g.expandTriggerFlag=!1}if(!a.open&&a.isParent&&(!k(a,e.id.UL,b).get(0)||a[l]&&a[l].length>
+0&&!k(a[l][0],b).get(0)))i.appendParentULDom(b,a),i.createNodeCallback(b);if(a.open==c)j.apply(f,[]);else{var c=k(a,e.id.UL,b),g=k(a,e.id.SWITCH,b),o=k(a,e.id.ICON,b);a.isParent?(a.open=!a.open,a.iconOpen&&a.iconClose&&o.attr("style",i.makeNodeIcoStyle(b,a)),a.open?(i.replaceSwitchClass(a,g,e.folder.OPEN),i.replaceIcoClass(a,o,e.folder.OPEN),d==!1||b.view.expandSpeed==""?(c.show(),j.apply(f,[])):a[l]&&a[l].length>0?c.slideDown(b.view.expandSpeed,f):(c.show(),j.apply(f,[]))):(i.replaceSwitchClass(a,
+g,e.folder.CLOSE),i.replaceIcoClass(a,o,e.folder.CLOSE),d==!1||b.view.expandSpeed==""||!(a[l]&&a[l].length>0)?(c.hide(),j.apply(f,[])):c.slideUp(b.view.expandSpeed,f))):j.apply(f,[])}}else j.apply(f,[])},expandCollapseParentNode:function(b,a,c,d,f){a&&(a.parentTId?(i.expandCollapseNode(b,a,c,d),a.parentTId&&i.expandCollapseParentNode(b,a.getParentNode(),c,d,f)):i.expandCollapseNode(b,a,c,d,f))},expandCollapseSonNode:function(b,a,c,d,f){var g=h.getRoot(b),e=b.data.key.children,g=a?a[e]:g[e],e=a?!1:
+d,j=h.getRoot(b).expandTriggerFlag;h.getRoot(b).expandTriggerFlag=!1;if(g)for(var k=0,m=g.length;k<m;k++)g[k]&&i.expandCollapseSonNode(b,g[k],c,e);h.getRoot(b).expandTriggerFlag=j;i.expandCollapseNode(b,a,c,d,f)},isSelectedNode:function(b,a){if(!a)return!1;var c=h.getRoot(b).curSelectedList,d;for(d=c.length-1;d>=0;d--)if(a===c[d])return!0;return!1},makeDOMNodeIcon:function(b,a,c){var d=h.getNodeName(a,c),d=a.view.nameIsHTML?d:d.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");b.push("<span id='",
+c.tId,e.id.ICON,"' title='' treeNode",e.id.ICON," class='",i.makeNodeIcoClass(a,c),"' style='",i.makeNodeIcoStyle(a,c),"'></span><span id='",c.tId,e.id.SPAN,"'>",d,"</span>")},makeDOMNodeLine:function(b,a,c){b.push("<span id='",c.tId,e.id.SWITCH,"' title='' class='",i.makeNodeLineClass(a,c),"' treeNode",e.id.SWITCH,"></span>")},makeDOMNodeMainAfter:function(b){b.push("</li>")},makeDOMNodeMainBefore:function(b,a,c){b.push("<li id='",c.tId,"' class='",e.className.LEVEL,c.level,"' tabindex='0' hidefocus='true' treenode>")},
+makeDOMNodeNameAfter:function(b){b.push("</a>")},makeDOMNodeNameBefore:function(b,a,c){var d=h.getNodeTitle(a,c),f=i.makeNodeUrl(a,c),g=i.makeNodeFontCss(a,c),l=[],k;for(k in g)l.push(k,":",g[k],";");b.push("<a id='",c.tId,e.id.A,"' class='",e.className.LEVEL,c.level,"' treeNode",e.id.A,' onclick="',c.click||"",'" ',f!=null&&f.length>0?"href='"+f+"'":""," target='",i.makeNodeTarget(c),"' style='",l.join(""),"'");j.apply(a.view.showTitle,[a.treeId,c],a.view.showTitle)&&d&&b.push("title='",d.replace(/'/g,
+"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"'");b.push(">")},makeNodeFontCss:function(b,a){var c=j.apply(b.view.fontCss,[b.treeId,a],b.view.fontCss);return c&&typeof c!="function"?c:{}},makeNodeIcoClass:function(b,a){var c=["ico"];a.isAjaxing||(c[0]=(a.iconSkin?a.iconSkin+"_":"")+c[0],a.isParent?c.push(a.open?e.folder.OPEN:e.folder.CLOSE):c.push(e.folder.DOCU));return e.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(b,a){var c=[];if(!a.isAjaxing){var d=a.isParent&&a.iconOpen&&
+a.iconClose?a.open?a.iconOpen:a.iconClose:a.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;");(b.view.showIcon==!1||!j.apply(b.view.showIcon,[b.treeId,a],!0))&&c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(b,a){var c=[];b.view.showLine?a.level==0&&a.isFirstNode&&a.isLastNode?c.push(e.line.ROOT):a.level==0&&a.isFirstNode?c.push(e.line.ROOTS):a.isLastNode?c.push(e.line.BOTTOM):c.push(e.line.CENTER):c.push(e.line.NOLINE);a.isParent?c.push(a.open?e.folder.OPEN:e.folder.CLOSE):
+c.push(e.folder.DOCU);return i.makeNodeLineClassEx(a)+c.join("_")},makeNodeLineClassEx:function(b){return e.className.BUTTON+" "+e.className.LEVEL+b.level+" "+e.className.SWITCH+" "},makeNodeTarget:function(b){return b.target||"_blank"},makeNodeUrl:function(b,a){var c=b.data.key.url;return a[c]?a[c]:null},makeUlHtml:function(b,a,c,d){c.push("<ul id='",a.tId,e.id.UL,"' class='",e.className.LEVEL,a.level," ",i.makeUlLineClass(b,a),"' style='display:",a.open?"block":"none","'>");c.push(d);c.push("</ul>")},
+makeUlLineClass:function(b,a){return b.view.showLine&&!a.isLastNode?e.line.LINE:""},removeChildNodes:function(b,a){if(a){var c=b.data.key.children,d=a[c];if(d){for(var f=0,g=d.length;f<g;f++)h.removeNodeCache(b,d[f]);h.removeSelectedNode(b);delete a[c];b.data.keep.parent?k(a,e.id.UL,b).empty():(a.isParent=!1,a.open=!1,c=k(a,e.id.SWITCH,b),d=k(a,e.id.ICON,b),i.replaceSwitchClass(a,c,e.folder.DOCU),i.replaceIcoClass(a,d,e.folder.DOCU),k(a,e.id.UL,b).remove())}}},setFirstNode:function(b,a){var c=b.data.key.children;
+if(a[c].length>0)a[c][0].isFirstNode=!0},setLastNode:function(b,a){var c=b.data.key.children,d=a[c].length;if(d>0)a[c][d-1].isLastNode=!0},removeNode:function(b,a){var c=h.getRoot(b),d=b.data.key.children,f=a.parentTId?a.getParentNode():c;a.isFirstNode=!1;a.isLastNode=!1;a.getPreNode=function(){return null};a.getNextNode=function(){return null};if(h.getNodeCache(b,a.tId)){k(a,b).remove();h.removeNodeCache(b,a);h.removeSelectedNode(b,a);for(var g=0,l=f[d].length;g<l;g++)if(f[d][g].tId==a.tId){f[d].splice(g,
+1);break}i.setFirstNode(b,f);i.setLastNode(b,f);var j,g=f[d].length;if(!b.data.keep.parent&&g==0)f.isParent=!1,f.open=!1,g=k(f,e.id.UL,b),l=k(f,e.id.SWITCH,b),j=k(f,e.id.ICON,b),i.replaceSwitchClass(f,l,e.folder.DOCU),i.replaceIcoClass(f,j,e.folder.DOCU),g.css("display","none");else if(b.view.showLine&&g>0){var o=f[d][g-1],g=k(o,e.id.UL,b),l=k(o,e.id.SWITCH,b);j=k(o,e.id.ICON,b);f==c?f[d].length==1?i.replaceSwitchClass(o,l,e.line.ROOT):(c=k(f[d][0],e.id.SWITCH,b),i.replaceSwitchClass(f[d][0],c,e.line.ROOTS),
+i.replaceSwitchClass(o,l,e.line.BOTTOM)):i.replaceSwitchClass(o,l,e.line.BOTTOM);g.removeClass(e.line.LINE)}}},replaceIcoClass:function(b,a,c){if(a&&!b.isAjaxing&&(b=a.attr("class"),b!=void 0)){b=b.split("_");switch(c){case e.folder.OPEN:case e.folder.CLOSE:case e.folder.DOCU:b[b.length-1]=c}a.attr("class",b.join("_"))}},replaceSwitchClass:function(b,a,c){if(a){var d=a.attr("class");if(d!=void 0){d=d.split("_");switch(c){case e.line.ROOT:case e.line.ROOTS:case e.line.CENTER:case e.line.BOTTOM:case e.line.NOLINE:d[0]=
+i.makeNodeLineClassEx(b)+c;break;case e.folder.OPEN:case e.folder.CLOSE:case e.folder.DOCU:d[1]=c}a.attr("class",d.join("_"));c!==e.folder.DOCU?a.removeAttr("disabled"):a.attr("disabled","disabled")}}},selectNode:function(b,a,c){c||i.cancelPreSelectedNode(b,null,a);k(a,e.id.A,b).addClass(e.node.CURSELECTED);h.addSelectedNode(b,a);b.treeObj.trigger(e.event.SELECTED,[m,b.treeId,a])},setNodeFontCss:function(b,a){var c=k(a,e.id.A,b),d=i.makeNodeFontCss(b,a);d&&c.css(d)},setNodeLineIcos:function(b,a){if(a){var c=
+k(a,e.id.SWITCH,b),d=k(a,e.id.UL,b),f=k(a,e.id.ICON,b),g=i.makeUlLineClass(b,a);g.length==0?d.removeClass(e.line.LINE):d.addClass(g);c.attr("class",i.makeNodeLineClass(b,a));a.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled");f.removeAttr("style");f.attr("style",i.makeNodeIcoStyle(b,a));f.attr("class",i.makeNodeIcoClass(b,a))}},setNodeName:function(b,a){var c=h.getNodeTitle(b,a),d=k(a,e.id.SPAN,b);d.empty();b.view.nameIsHTML?d.html(h.getNodeName(b,a)):d.text(h.getNodeName(b,a));j.apply(b.view.showTitle,
+[b.treeId,a],b.view.showTitle)&&k(a,e.id.A,b).attr("title",!c?"":c)},setNodeTarget:function(b,a){k(a,e.id.A,b).attr("target",i.makeNodeTarget(a))},setNodeUrl:function(b,a){var c=k(a,e.id.A,b),d=i.makeNodeUrl(b,a);d==null||d.length==0?c.removeAttr("href"):c.attr("href",d)},switchNode:function(b,a){a.open||!j.canAsync(b,a)?i.expandCollapseNode(b,a,!a.open):b.async.enable?i.asyncNode(b,a)||i.expandCollapseNode(b,a,!a.open):a&&i.expandCollapseNode(b,a,!a.open)}};p.fn.zTree={consts:{className:{BUTTON:"button",
+LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch"},event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove",SELECTED:"ztree_selected",UNSELECTED:"ztree_unselected"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",
+DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_z:{tools:j,view:i,event:m,data:h},getZTreeObj:function(b){return(b=h.getZTreeTools(b))?b:null},destroy:function(b){if(b&&b.length>0)i.destroy(h.getSetting(b));else for(var a in r)i.destroy(r[a])},init:function(b,a,c){var d=j.clone(M);p.extend(!0,d,a);d.treeId=b.attr("id");d.treeObj=b;d.treeObj.empty();r[d.treeId]=d;if(typeof document.body.style.maxHeight==="undefined")d.view.expandSpeed="";h.initRoot(d);b=h.getRoot(d);a=d.data.key.children;c=c?j.clone(j.isArray(c)?
+c:[c]):[];b[a]=d.data.simpleData.enable?h.transformTozTreeFormat(d,c):c;h.initCache(d);m.unbindTree(d);m.bindTree(d);m.unbindEvent(d);m.bindEvent(d);c={setting:d,addNodes:function(a,b,c){function e(){i.addNodes(d,a,h,c==!0)}if(!b)return null;a||(a=null);if(a&&!a.isParent&&d.data.keep.leaf)return null;var h=j.clone(j.isArray(b)?b:[b]);j.canAsync(d,a)?i.asyncNode(d,a,c,e):e();return h},cancelSelectedNode:function(a){i.cancelPreSelectedNode(d,a)},destroy:function(){i.destroy(d)},expandAll:function(a){a=
+!!a;i.expandCollapseSonNode(d,null,a,!0);return a},expandNode:function(a,b,c,e,m){if(!a||!a.isParent)return null;b!==!0&&b!==!1&&(b=!a.open);if((m=!!m)&&b&&j.apply(d.callback.beforeExpand,[d.treeId,a],!0)==!1)return null;else if(m&&!b&&j.apply(d.callback.beforeCollapse,[d.treeId,a],!0)==!1)return null;b&&a.parentTId&&i.expandCollapseParentNode(d,a.getParentNode(),b,!1);if(b===a.open&&!c)return null;h.getRoot(d).expandTriggerFlag=m;if(!j.canAsync(d,a)&&c)i.expandCollapseSonNode(d,a,b,!0,function(){if(e!==
+!1)try{k(a,d).focus().blur()}catch(b){}});else if(a.open=!b,i.switchNode(this.setting,a),e!==!1)try{k(a,d).focus().blur()}catch(p){}return b},getNodes:function(){return h.getNodes(d)},getNodeByParam:function(a,b,c){return!a?null:h.getNodeByParam(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodeByTId:function(a){return h.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return!a?null:h.getNodesByParam(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodesByParamFuzzy:function(a,b,c){return!a?
+null:h.getNodesByParamFuzzy(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodesByFilter:function(a,b,c,e){b=!!b;return!a||typeof a!="function"?b?null:[]:h.getNodesByFilter(d,c?c[d.data.key.children]:h.getNodes(d),a,b,e)},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():h.getRoot(d),e=0,i=c[b].length;e<i;e++)if(c[b][e]==a)return e;return-1},getSelectedNodes:function(){for(var a=[],b=h.getRoot(d).curSelectedList,c=0,e=b.length;c<e;c++)a.push(b[c]);
+return a},isSelectedNode:function(a){return h.isSelectedNode(d,a)},reAsyncChildNodes:function(a,b,c){if(this.setting.async.enable){var j=!a;j&&(a=h.getRoot(d));if(b=="refresh"){for(var b=this.setting.data.key.children,m=0,p=a[b]?a[b].length:0;m<p;m++)h.removeNodeCache(d,a[b][m]);h.removeSelectedNode(d);a[b]=[];j?this.setting.treeObj.empty():k(a,e.id.UL,d).empty()}i.asyncNode(this.setting,j?null:a,!!c)}},refresh:function(){this.setting.treeObj.empty();var a=h.getRoot(d),b=a[d.data.key.children];h.initRoot(d);
+a[d.data.key.children]=b;h.initCache(d);i.createNodes(d,0,a[d.data.key.children])},removeChildNodes:function(a){if(!a)return null;var b=a[d.data.key.children];i.removeChildNodes(d,a);return b?b:null},removeNode:function(a,b){a&&(b=!!b,b&&j.apply(d.callback.beforeRemove,[d.treeId,a],!0)==!1||(i.removeNode(d,a),b&&this.setting.treeObj.trigger(e.event.REMOVE,[d.treeId,a])))},selectNode:function(a,b){if(a&&j.uCanDo(d)){b=d.view.selectedMulti&&b;if(a.parentTId)i.expandCollapseParentNode(d,a.getParentNode(),
+!0,!1,function(){try{k(a,d).focus().blur()}catch(b){}});else try{k(a,d).focus().blur()}catch(c){}i.selectNode(d,a,b)}},transformTozTreeNodes:function(a){return h.transformTozTreeFormat(d,a)},transformToArray:function(a){return h.transformToArrayFormat(d,a)},updateNode:function(a){a&&k(a,d).get(0)&&j.uCanDo(d)&&(i.setNodeName(d,a),i.setNodeTarget(d,a),i.setNodeUrl(d,a),i.setNodeLineIcos(d,a),i.setNodeFontCss(d,a))}};b.treeTools=c;h.setZTreeTools(d,c);b[a]&&b[a].length>0?i.createNodes(d,0,b[a]):d.async.enable&&
+d.async.url&&d.async.url!==""&&i.asyncNode(d);return c}};var N=p.fn.zTree,k=j.$,e=N.consts})(jQuery);
diff --git a/common/src/main/webapp/thirdparty/js/jquery_1.12.4.min.js b/common/src/main/webapp/thirdparty/js/jquery_1.12.4.min.js
new file mode 100644
index 0000000..db07c59
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/js/jquery_1.12.4.min.js
@@ -0,0 +1,5 @@
+/*! jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license */
+!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 id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",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;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=la(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=ma(b);function pa(){}pa.prototype=d.filters=d.pseudos,d.setFilters=new pa,g=fa.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=R.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=S.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(Q," ")}),h=h.slice(c.length));for(g in d.filter)!(e=W[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fa.error(a):z(a,i).slice(0)};function qa(a){for(var b=0,c=a.length,d="";c>b;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 href='#'></a>","#"===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="<input/>",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<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){n.each(b,function(b,c){n.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==n.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return n.each(arguments,function(a,b){var c;while((c=n.inArray(b,f,c))>-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;
+}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.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}}),function(){var a;l.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,e;return 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="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(d.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(e),a):void 0}}();var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),V=["Top","Right","Bottom","Left"],W=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function X(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNumber[b]||"px"!==j&&+i)&&U.exec(n.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,n.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var Y=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)Y(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;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=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",l.leadingWhitespace=3===a.firstChild.nodeType,l.tbody=!a.getElementsByTagName("tbody").length,l.htmlSerialize=!!a.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==d.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,b.appendChild(c),l.appendChecked=c.checked,a.innerHTML="<textarea>x</textarea>",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,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};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=/<tbody/i;function ia(a){Z.test(a.type)&&(a.defaultChecked=a.checked)}function ja(a,b,c,d,e){for(var f,g,h,i,j,k,m,o=a.length,p=ca(b),q=[],r=0;o>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)?"<table>"!==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<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,e,f=a.type,g=a,h=this.fixHooks[f];h||(this.fixHooks[f]=h=ma.test(f)?this.mouseHooks:la.test(f)?this.keyHooks:{}),e=h.props?this.props.concat(h.props):this.props,a=new n.Event(g),b=e.length;while(b--)c=e[b],a[c]=g[c];return a.target||(a.target=g.srcElement||d),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,h.filter?h.filter(a,g):a},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,e,f,g=b.button,h=b.fromElement;return null==a.pageX&&null!=b.clientX&&(e=a.target.ownerDocument||d,f=e.documentElement,c=e.body,a.pageX=b.clientX+(f&&f.scrollLeft||c&&c.scrollLeft||0)-(f&&f.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(f&&f.scrollTop||c&&c.scrollTop||0)-(f&&f.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&h&&(a.relatedTarget=h===a.target?b.toElement:h),a.which||void 0===g||(a.which=1&g?1:2&g?3:4&g?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ra()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ra()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c){var d=n.extend(new n.Event,c,{type:a,isSimulated:!0});n.event.trigger(d,null,b),d.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=d.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)}:function(a,b,c){var d="on"+b;a.detachEvent&&("undefined"==typeof a[d]&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?pa:qa):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={constructor:n.Event,isDefaultPrevented:qa,isPropagationStopped:qa,isImmediatePropagationStopped:qa,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=pa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=pa,a&&!this.isSimulated&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=pa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||n.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submit||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?n.prop(b,"form"):void 0;c&&!n._data(c,"submit")&&(n.event.add(c,"submit._submit",function(a){a._submitBubble=!0}),n._data(c,"submit",!0))})},postDispatch:function(a){a._submitBubble&&(delete a._submitBubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.change||(n.event.special.change={setup:function(){return ka.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._justChanged=!0)}),n.event.add(this,"click._change",function(a){this._justChanged&&!a.isTrigger&&(this._justChanged=!1),n.event.simulate("change",this,a)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;ka.test(b.nodeName)&&!n._data(b,"change")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a)}),n._data(b,"change",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!ka.test(this.nodeName)}}),l.focusin||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a))};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d){return sa(this,a,b,c,d)},one:function(a,b,c,d){return sa(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=qa),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ta=/ jQuery\d+="(?:null|\d+)"/g,ua=new RegExp("<(?:"+ba+")[\\s/>]","i"),va=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,wa=/<script|<style|<link/i,xa=/checked\s*(?:[^=]|=\s*.checked.)/i,ya=/^true\/(.*)/,za=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\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></$2>")},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("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ja[0].contentWindow||Ja[0].contentDocument).document,b.write(),b.close(),c=La(a,b),Ja.detach()),Ka[a]=c),c}var Na=/^margin/,Oa=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Pa=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},Qa=d.documentElement;!function(){var b,c,e,f,g,h,i=d.createElement("div"),j=d.createElement("div");if(j.style){j.style.cssText="float:left;opacity:.5",l.opacity="0.5"===j.style.opacity,l.cssFloat=!!j.style.cssFloat,j.style.backgroundClip="content-box",j.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===j.style.backgroundClip,i=d.createElement("div"),i.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",j.innerHTML="",i.appendChild(j),l.boxSizing=""===j.style.boxSizing||""===j.style.MozBoxSizing||""===j.style.WebkitBoxSizing,n.extend(l,{reliableHiddenOffsets:function(){return null==b&&k(),f},boxSizingReliable:function(){return null==b&&k(),e},pixelMarginRight:function(){return null==b&&k(),c},pixelPosition:function(){return null==b&&k(),b},reliableMarginRight:function(){return null==b&&k(),g},reliableMarginLeft:function(){return null==b&&k(),h}});function k(){var k,l,m=d.documentElement;m.appendChild(i),j.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",b=e=h=!1,c=g=!0,a.getComputedStyle&&(l=a.getComputedStyle(j),b="1%"!==(l||{}).top,h="2px"===(l||{}).marginLeft,e="4px"===(l||{width:"4px"}).width,j.style.marginRight="50%",c="4px"===(l||{marginRight:"4px"}).marginRight,k=j.appendChild(d.createElement("div")),k.style.cssText=j.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",k.style.marginRight=k.style.width="0",j.style.width="1px",g=!parseFloat((a.getComputedStyle(k)||{}).marginRight),j.removeChild(k)),j.style.display="none",f=0===j.getClientRects().length,f&&(j.style.display="",j.innerHTML="<table><tr><td></td><td>t</td></tr></table>",j.childNodes[0].style.borderCollapse="separate",k=j.getElementsByTagName("td"),k[0].style.cssText="margin:0;border:0;padding:0;display:none",f=0===k[0].offsetHeight,f&&(k[0].style.display="",k[1].style.display="none",f=0===k[0].offsetHeight)),m.removeChild(i)}}}();var Ra,Sa,Ta=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ra=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c.getPropertyValue(b)||c[b]:void 0,""!==g&&void 0!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),c&&!l.pixelMarginRight()&&Oa.test(g)&&Na.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f),void 0===g?g:g+""}):Qa.currentStyle&&(Ra=function(a){return a.currentStyle},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Oa.test(g)&&!Ta.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Ua(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Va=/alpha\([^)]*\)/i,Wa=/opacity\s*=\s*([^)]*)/i,Xa=/^(none|table(?!-c[ea]).+)/,Ya=new RegExp("^("+T+")(.*)$","i"),Za={position:"absolute",visibility:"hidden",display:"block"},$a={letterSpacing:"0",fontWeight:"400"},_a=["Webkit","O","Moz","ms"],ab=d.createElement("div").style;function bb(a){if(a in ab)return a;var b=a.charAt(0).toUpperCase()+a.slice(1),c=_a.length;while(c--)if(a=_a[c]+b,a in ab)return a}function cb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&W(d)&&(f[g]=n._data(d,"olddisplay",Ma(d.nodeName)))):(e=W(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function db(a,b,c){var d=Ya.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function eb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+V[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+V[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+V[f]+"Width",!0,e))):(g+=n.css(a,"padding"+V[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+V[f]+"Width",!0,e)));return g}function fb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ra(a),g=l.boxSizing&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Sa(a,b,f),(0>e||null==e)&&(e=a.style[b]),Oa.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+eb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Sa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=U.exec(c))&&e[1]&&(c=X(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(n.cssNumber[h]?"":"px")),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Sa(a,b,d)),"normal"===f&&b in $a&&(f=$a[b]),""===c||c?(e=parseFloat(f),c===!0||isFinite(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?Xa.test(n.css(a,"display"))&&0===a.offsetWidth?Pa(a,Za,function(){return fb(a,b,d)}):fb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ra(a);return db(a,c,d?eb(a,b,d,l.boxSizing&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Wa.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Va,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Va.test(f)?f.replace(Va,e):f+" "+e)}}),n.cssHooks.marginRight=Ua(l.reliableMarginRight,function(a,b){return b?Pa(a,{display:"inline-block"},Sa,[a,"marginRight"]):void 0}),n.cssHooks.marginLeft=Ua(l.reliableMarginLeft,function(a,b){return b?(parseFloat(Sa(a,"marginLeft"))||(n.contains(a.ownerDocument,a)?a.getBoundingClientRect().left-Pa(a,{
+ marginLeft:0},function(){return a.getBoundingClientRect().left}):0))+"px":void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+V[d]+b]=f[d]||f[d-2]||f[0];return e}},Na.test(a)||(n.cssHooks[a+b].set=db)}),n.fn.extend({css:function(a,b){return Y(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Ra(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return cb(this,!0)},hide:function(){return cb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){W(this)?n(this).show():n(this).hide()})}});function gb(a,b,c,d,e){return new gb.prototype.init(a,b,c,d,e)}n.Tween=gb,gb.prototype={constructor:gb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||n.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=gb.propHooks[this.prop];return a&&a.get?a.get(this):gb.propHooks._default.get(this)},run:function(a){var b,c=gb.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):gb.propHooks._default.set(this),this}},gb.prototype.init.prototype=gb.prototype,gb.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[n.cssProps[a.prop]]&&!n.cssHooks[a.prop]?a.elem[a.prop]=a.now:n.style(a.elem,a.prop,a.now+a.unit)}}},gb.propHooks.scrollTop=gb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},n.fx=gb.prototype.init,n.fx.step={};var hb,ib,jb=/^(?:toggle|show|hide)$/,kb=/queueHooks$/;function lb(){return a.setTimeout(function(){hb=void 0}),hb=n.now()}function mb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=V[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function nb(a,b,c){for(var d,e=(qb.tweeners[b]||[]).concat(qb.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ob(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&W(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k="none"===j?n._data(a,"olddisplay")||Ma(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==Ma(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],jb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(o))"inline"===("none"===j?Ma(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=nb(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function pb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function qb(a,b,c){var d,e,f=0,g=qb.prefilters.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=hb||lb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{},easing:n.easing._default},c),originalProperties:b,originalOptions:c,startTime:hb||lb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(pb(k,j.opts.specialEasing);g>f;f++)if(d=qb.prefilters[f].call(j,a,k,j.opts))return n.isFunction(d.stop)&&(n._queueHooks(j.elem,j.opts.queue).stop=n.proxy(d.stop,d)),d;return n.map(k,nb,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(qb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return X(c.elem,a,U.exec(b),c),c}]},tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.match(G);for(var c,d=0,e=a.length;e>d;d++)c=a[d],qb.tweeners[c]=qb.tweeners[c]||[],qb.tweeners[c].unshift(b)},prefilters:[ob],prefilter:function(a,b){b?qb.prefilters.unshift(a):qb.prefilters.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(W).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=qb(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&kb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(mb(b,!0),a,d,e)}}),n.each({slideDown:mb("show"),slideUp:mb("hide"),slideToggle:mb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(hb=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),hb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ib||(ib=a.setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){a.clearInterval(ib),ib=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(b,c){return b=n.fx?n.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a,b=d.createElement("input"),c=d.createElement("div"),e=d.createElement("select"),f=e.appendChild(d.createElement("option"));c=d.createElement("div"),c.setAttribute("className","t"),c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],b.setAttribute("type","checkbox"),c.appendChild(b),a=c.getElementsByTagName("a")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==c.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=f.selected,l.enctype=!!d.createElement("form").enctype,e.disabled=!0,l.optDisabled=!f.disabled,b=d.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value}();var rb=/\r/g,sb=/[\x20\t\r\n\f]+/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a)).replace(sb," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&(l.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>-1)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>-1:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var tb,ub,vb=n.expr.attrHandle,wb=/^(?:checked|selected)$/i,xb=l.getSetAttribute,yb=l.input;n.fn.extend({attr:function(a,b){return Y(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),e=n.attrHooks[b]||(n.expr.match.bool.test(b)?ub:tb)),void 0!==c?null===c?void n.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=n.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(G);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?yb&&xb||!wb.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(xb?c:d)}}),ub={set:function(a,b,c){return b===!1?n.removeAttr(a,c):yb&&xb||!wb.test(c)?a.setAttribute(!xb&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=vb[b]||n.find.attr;yb&&xb||!wb.test(b)?vb[b]=function(a,b,d){var e,f;return d||(f=vb[b],vb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,vb[b]=f),e}:vb[b]=function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),yb&&xb||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):tb&&tb.set(a,b,c)}}),xb||(tb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},vb.id=vb.name=vb.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:tb.set},n.attrHooks.contenteditable={set:function(a,b,c){tb.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var zb=/^(?:input|select|textarea|button|object)$/i,Ab=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return Y(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&n.isXMLDoc(a)||(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):zb.test(a.nodeName)||Ab.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var Bb=/[\t\r\n\f]/g;function Cb(a){return n.attr(a,"class")||""}n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,Cb(this)))});if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Cb(c),d=1===c.nodeType&&(" "+e+" ").replace(Bb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,Cb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Cb(c),d=1===c.nodeType&&(" "+e+" ").replace(Bb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,Cb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=n(this),f=a.match(G)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=Cb(this),b&&n._data(this,"__className__",b),n.attr(this,"class",b||a===!1?"":n._data(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+Cb(c)+" ").replace(Bb," ").indexOf(b)>-1)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Db=a.location,Eb=n.now(),Fb=/\?/,Gb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(Gb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new a.DOMParser,c=d.parseFromString(b,"text/xml")):(c=new a.ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var Hb=/#.*$/,Ib=/([?&])_=[^&]*/,Jb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Kb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Lb=/^(?:GET|HEAD)$/,Mb=/^\/\//,Nb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ob={},Pb={},Qb="*/".concat("*"),Rb=Db.href,Sb=Nb.exec(Rb.toLowerCase())||[];function Tb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(G)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Ub(a,b,c,d){var e={},f=a===Pb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Vb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Wb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Xb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Rb,type:"GET",isLocal:Kb.test(Sb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Vb(Vb(a,n.ajaxSettings),b):Vb(n.ajaxSettings,a)},ajaxPrefilter:Tb(Ob),ajaxTransport:Tb(Pb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var d,e,f,g,h,i,j,k,l=n.ajaxSetup({},c),m=l.context||l,o=l.context&&(m.nodeType||m.jquery)?n(m):n.event,p=n.Deferred(),q=n.Callbacks("once memory"),r=l.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!k){k={};while(b=Jb.exec(g))k[b[1].toLowerCase()]=b[2]}b=k[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(l.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>u)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return j&&j.abort(b),y(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,l.url=((b||l.url||Rb)+"").replace(Hb,"").replace(Mb,Sb[1]+"//"),l.type=c.method||c.type||l.method||l.type,l.dataTypes=n.trim(l.dataType||"*").toLowerCase().match(G)||[""],null==l.crossDomain&&(d=Nb.exec(l.url.toLowerCase()),l.crossDomain=!(!d||d[1]===Sb[1]&&d[2]===Sb[2]&&(d[3]||("http:"===d[1]?"80":"443"))===(Sb[3]||("http:"===Sb[1]?"80":"443")))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=n.param(l.data,l.traditional)),Ub(Ob,l,c,w),2===u)return w;i=n.event&&l.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!Lb.test(l.type),f=l.url,l.hasContent||(l.data&&(f=l.url+=(Fb.test(f)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=Ib.test(f)?f.replace(Ib,"$1_="+Eb++):f+(Fb.test(f)?"&":"?")+"_="+Eb++)),l.ifModified&&(n.lastModified[f]&&w.setRequestHeader("If-Modified-Since",n.lastModified[f]),n.etag[f]&&w.setRequestHeader("If-None-Match",n.etag[f])),(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",l.contentType),w.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+Qb+"; q=0.01":""):l.accepts["*"]);for(e in l.headers)w.setRequestHeader(e,l.headers[e]);if(l.beforeSend&&(l.beforeSend.call(m,w,l)===!1||2===u))return w.abort();v="abort";for(e in{success:1,error:1,complete:1})w[e](l[e]);if(j=Ub(Pb,l,c,w)){if(w.readyState=1,i&&o.trigger("ajaxSend",[w,l]),2===u)return w;l.async&&l.timeout>0&&(h=a.setTimeout(function(){w.abort("timeout")},l.timeout));try{u=1,j.send(s,y)}catch(x){if(!(2>u))throw x;y(-1,x)}}else y(-1,"No Transport");function y(b,c,d,e){var k,s,t,v,x,y=c;2!==u&&(u=2,h&&a.clearTimeout(h),j=void 0,g=e||"",w.readyState=b>0?4:0,k=b>=200&&300>b||304===b,d&&(v=Wb(l,w,d)),v=Xb(l,v,w,k),k?(l.ifModified&&(x=w.getResponseHeader("Last-Modified"),x&&(n.lastModified[f]=x),x=w.getResponseHeader("etag"),x&&(n.etag[f]=x)),204===b||"HEAD"===l.type?y="nocontent":304===b?y="notmodified":(y=v.state,s=v.data,t=v.error,k=!t)):(t=y,!b&&y||(y="error",0>b&&(b=0))),w.status=b,w.statusText=(c||y)+"",k?p.resolveWith(m,[s,y,w]):p.rejectWith(m,[w,y,t]),w.statusCode(r),r=void 0,i&&o.trigger(k?"ajaxSuccess":"ajaxError",[w,l,k?s:t]),q.fireWith(m,[w,y]),i&&(o.trigger("ajaxComplete",[w,l]),--n.active||n.event.trigger("ajaxStop")))}return w},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax(n.extend({url:a,type:b,dataType:e,data:c,success:d},n.isPlainObject(a)&&a))}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return n.isFunction(a)?this.each(function(b){n(this).wrapInner(a.call(this,b))}):this.each(function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}});function Yb(a){return a.style&&a.style.display||n.css(a,"display")}function Zb(a){if(!n.contains(a.ownerDocument||d,a))return!0;while(a&&1===a.nodeType){if("none"===Yb(a)||"hidden"===a.type)return!0;a=a.parentNode}return!1}n.expr.filters.hidden=function(a){return l.reliableHiddenOffsets()?a.offsetWidth<=0&&a.offsetHeight<=0&&!a.getClientRects().length:Zb(a)},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var $b=/%20/g,_b=/\[\]$/,ac=/\r?\n/g,bc=/^(?:submit|button|image|reset|file)$/i,cc=/^(?:input|select|textarea|keygen)/i;function dc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||_b.test(a)?d(a,e):dc(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)dc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)dc(c,a[c],b,e);return d.join("&").replace($b,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&cc.test(this.nodeName)&&!bc.test(a)&&(this.checked||!Z.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(ac,"\r\n")}}):{name:b.name,value:c.replace(ac,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return this.isLocal?ic():d.documentMode>8?hc():/^(get|post|head|put|delete|options)$/i.test(this.type)&&hc()||ic()}:hc;var ec=0,fc={},gc=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in fc)fc[a](void 0,!0)}),l.cors=!!gc&&"withCredentials"in gc,gc=l.ajax=!!gc,gc&&n.ajaxTransport(function(b){if(!b.crossDomain||l.cors){var c;return{send:function(d,e){var f,g=b.xhr(),h=++ec;if(g.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(f in b.xhrFields)g[f]=b.xhrFields[f];b.mimeType&&g.overrideMimeType&&g.overrideMimeType(b.mimeType),b.crossDomain||d["X-Requested-With"]||(d["X-Requested-With"]="XMLHttpRequest");for(f in d)void 0!==d[f]&&g.setRequestHeader(f,d[f]+"");g.send(b.hasContent&&b.data||null),c=function(a,d){var f,i,j;if(c&&(d||4===g.readyState))if(delete fc[h],c=void 0,g.onreadystatechange=n.noop,d)4!==g.readyState&&g.abort();else{j={},f=g.status,"string"==typeof g.responseText&&(j.text=g.responseText);try{i=g.statusText}catch(k){i=""}f||!b.isLocal||b.crossDomain?1223===f&&(f=204):f=j.text?200:404}j&&e(f,i,j,g.getAllResponseHeaders())},b.async?4===g.readyState?a.setTimeout(c):g.onreadystatechange=fc[h]=c:c()},abort:function(){c&&c(void 0,!0)}}}});function hc(){try{return new a.XMLHttpRequest}catch(b){}}function ic(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=d.head||n("head")[0]||d.documentElement;return{send:function(e,f){b=d.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||f(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var jc=[],kc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=jc.pop()||n.expando+"_"+Eb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(kc.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&kc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(kc,"$1"+e):b.jsonp!==!1&&(b.url+=(Fb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?n(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,jc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||d;var e=x.exec(a),f=!c&&[];return e?[b.createElement(e[1])]:(e=ja([a],b,f),f&&f.length&&n(f).remove(),n.merge([],e.childNodes))};var lc=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&lc)return lc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=n.trim(a.slice(h,a.length)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};function mc(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,n.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?("undefined"!=typeof e.getBoundingClientRect&&(d=e.getBoundingClientRect()),c=mc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Qa})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return Y(this,function(a,d,e){var f=mc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Ua(l.pixelPosition,function(a,c){return c?(c=Sa(a,b),Oa.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({
+ padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return Y(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var nc=a.jQuery,oc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=oc),b&&a.jQuery===n&&(a.jQuery=nc),n},b||(a.jQuery=a.$=n),n}); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/js/mustache.js b/common/src/main/webapp/thirdparty/js/mustache.js
new file mode 100644
index 0000000..a8560c0
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/js/mustache.js
@@ -0,0 +1,630 @@
+/*!
+ * mustache.js - Logic-less {{mustache}} templates with JavaScript
+ * http://github.com/janl/mustache.js
+ */
+
+/*global define: false Mustache: true*/
+
+(function defineMustache (global, factory) {
+ if (typeof exports === 'object' && exports && typeof exports.nodeName !== 'string') {
+ factory(exports); // CommonJS
+ } else if (typeof define === 'function' && define.amd) {
+ define(['exports'], factory); // AMD
+ } else {
+ global.Mustache = {};
+ factory(global.Mustache); // script, wsh, asp
+ }
+}(this, function mustacheFactory (mustache) {
+
+ var objectToString = Object.prototype.toString;
+ var isArray = Array.isArray || function isArrayPolyfill (object) {
+ return objectToString.call(object) === '[object Array]';
+ };
+
+ function isFunction (object) {
+ return typeof object === 'function';
+ }
+
+ /**
+ * More correct typeof string handling array
+ * which normally returns typeof 'object'
+ */
+ function typeStr (obj) {
+ return isArray(obj) ? 'array' : typeof obj;
+ }
+
+ function escapeRegExp (string) {
+ return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&');
+ }
+
+ /**
+ * Null safe way of checking whether or not an object,
+ * including its prototype, has a given property
+ */
+ function hasProperty (obj, propName) {
+ return obj != null && typeof obj === 'object' && (propName in obj);
+ }
+
+ // Workaround for https://issues.apache.org/jira/browse/COUCHDB-577
+ // See https://github.com/janl/mustache.js/issues/189
+ var regExpTest = RegExp.prototype.test;
+ function testRegExp (re, string) {
+ return regExpTest.call(re, string);
+ }
+
+ var nonSpaceRe = /\S/;
+ function isWhitespace (string) {
+ return !testRegExp(nonSpaceRe, string);
+ }
+
+ var entityMap = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#39;',
+ '/': '&#x2F;',
+ '`': '&#x60;',
+ '=': '&#x3D;'
+ };
+
+ function escapeHtml (string) {
+ return String(string).replace(/[&<>"'`=\/]/g, function fromEntityMap (s) {
+ return entityMap[s];
+ });
+ }
+
+ var whiteRe = /\s*/;
+ var spaceRe = /\s+/;
+ var equalsRe = /\s*=/;
+ var curlyRe = /\s*\}/;
+ var tagRe = /#|\^|\/|>|\{|&|=|!/;
+
+ /**
+ * Breaks up the given `template` string into a tree of tokens. If the `tags`
+ * argument is given here it must be an array with two string values: the
+ * opening and closing tags used in the template (e.g. [ "<%", "%>" ]). Of
+ * course, the default is to use mustaches (i.e. mustache.tags).
+ *
+ * A token is an array with at least 4 elements. The first element is the
+ * mustache symbol that was used inside the tag, e.g. "#" or "&". If the tag
+ * did not contain a symbol (i.e. {{myValue}}) this element is "name". For
+ * all text that appears outside a symbol this element is "text".
+ *
+ * The second element of a token is its "value". For mustache tags this is
+ * whatever else was inside the tag besides the opening symbol. For text tokens
+ * this is the text itself.
+ *
+ * The third and fourth elements of the token are the start and end indices,
+ * respectively, of the token in the original template.
+ *
+ * Tokens that are the root node of a subtree contain two more elements: 1) an
+ * array of tokens in the subtree and 2) the index in the original template at
+ * which the closing tag for that section begins.
+ */
+ function parseTemplate (template, tags) {
+ if (!template)
+ return [];
+
+ var sections = []; // Stack to hold section tokens
+ var tokens = []; // Buffer to hold the tokens
+ var spaces = []; // Indices of whitespace tokens on the current line
+ var hasTag = false; // Is there a {{tag}} on the current line?
+ var nonSpace = false; // Is there a non-space char on the current line?
+
+ // Strips all whitespace tokens array for the current line
+ // if there was a {{#tag}} on it and otherwise only space.
+ function stripSpace () {
+ if (hasTag && !nonSpace) {
+ while (spaces.length)
+ delete tokens[spaces.pop()];
+ } else {
+ spaces = [];
+ }
+
+ hasTag = false;
+ nonSpace = false;
+ }
+
+ var openingTagRe, closingTagRe, closingCurlyRe;
+ function compileTags (tagsToCompile) {
+ if (typeof tagsToCompile === 'string')
+ tagsToCompile = tagsToCompile.split(spaceRe, 2);
+
+ if (!isArray(tagsToCompile) || tagsToCompile.length !== 2)
+ throw new Error('Invalid tags: ' + tagsToCompile);
+
+ openingTagRe = new RegExp(escapeRegExp(tagsToCompile[0]) + '\\s*');
+ closingTagRe = new RegExp('\\s*' + escapeRegExp(tagsToCompile[1]));
+ closingCurlyRe = new RegExp('\\s*' + escapeRegExp('}' + tagsToCompile[1]));
+ }
+
+ compileTags(tags || mustache.tags);
+
+ var scanner = new Scanner(template);
+
+ var start, type, value, chr, token, openSection;
+ while (!scanner.eos()) {
+ start = scanner.pos;
+
+ // Match any text between tags.
+ value = scanner.scanUntil(openingTagRe);
+
+ if (value) {
+ for (var i = 0, valueLength = value.length; i < valueLength; ++i) {
+ chr = value.charAt(i);
+
+ if (isWhitespace(chr)) {
+ spaces.push(tokens.length);
+ } else {
+ nonSpace = true;
+ }
+
+ tokens.push([ 'text', chr, start, start + 1 ]);
+ start += 1;
+
+ // Check for whitespace on the current line.
+ if (chr === '\n')
+ stripSpace();
+ }
+ }
+
+ // Match the opening tag.
+ if (!scanner.scan(openingTagRe))
+ break;
+
+ hasTag = true;
+
+ // Get the tag type.
+ type = scanner.scan(tagRe) || 'name';
+ scanner.scan(whiteRe);
+
+ // Get the tag value.
+ if (type === '=') {
+ value = scanner.scanUntil(equalsRe);
+ scanner.scan(equalsRe);
+ scanner.scanUntil(closingTagRe);
+ } else if (type === '{') {
+ value = scanner.scanUntil(closingCurlyRe);
+ scanner.scan(curlyRe);
+ scanner.scanUntil(closingTagRe);
+ type = '&';
+ } else {
+ value = scanner.scanUntil(closingTagRe);
+ }
+
+ // Match the closing tag.
+ if (!scanner.scan(closingTagRe))
+ throw new Error('Unclosed tag at ' + scanner.pos);
+
+ token = [ type, value, start, scanner.pos ];
+ tokens.push(token);
+
+ if (type === '#' || type === '^') {
+ sections.push(token);
+ } else if (type === '/') {
+ // Check section nesting.
+ openSection = sections.pop();
+
+ if (!openSection)
+ throw new Error('Unopened section "' + value + '" at ' + start);
+
+ if (openSection[1] !== value)
+ throw new Error('Unclosed section "' + openSection[1] + '" at ' + start);
+ } else if (type === 'name' || type === '{' || type === '&') {
+ nonSpace = true;
+ } else if (type === '=') {
+ // Set the tags for the next time around.
+ compileTags(value);
+ }
+ }
+
+ // Make sure there are no open sections when we're done.
+ openSection = sections.pop();
+
+ if (openSection)
+ throw new Error('Unclosed section "' + openSection[1] + '" at ' + scanner.pos);
+
+ return nestTokens(squashTokens(tokens));
+ }
+
+ /**
+ * Combines the values of consecutive text tokens in the given `tokens` array
+ * to a single token.
+ */
+ function squashTokens (tokens) {
+ var squashedTokens = [];
+
+ var token, lastToken;
+ for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {
+ token = tokens[i];
+
+ if (token) {
+ if (token[0] === 'text' && lastToken && lastToken[0] === 'text') {
+ lastToken[1] += token[1];
+ lastToken[3] = token[3];
+ } else {
+ squashedTokens.push(token);
+ lastToken = token;
+ }
+ }
+ }
+
+ return squashedTokens;
+ }
+
+ /**
+ * Forms the given array of `tokens` into a nested tree structure where
+ * tokens that represent a section have two additional items: 1) an array of
+ * all tokens that appear in that section and 2) the index in the original
+ * template that represents the end of that section.
+ */
+ function nestTokens (tokens) {
+ var nestedTokens = [];
+ var collector = nestedTokens;
+ var sections = [];
+
+ var token, section;
+ for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {
+ token = tokens[i];
+
+ switch (token[0]) {
+ case '#':
+ case '^':
+ collector.push(token);
+ sections.push(token);
+ collector = token[4] = [];
+ break;
+ case '/':
+ section = sections.pop();
+ section[5] = token[2];
+ collector = sections.length > 0 ? sections[sections.length - 1][4] : nestedTokens;
+ break;
+ default:
+ collector.push(token);
+ }
+ }
+
+ return nestedTokens;
+ }
+
+ /**
+ * A simple string scanner that is used by the template parser to find
+ * tokens in template strings.
+ */
+ function Scanner (string) {
+ this.string = string;
+ this.tail = string;
+ this.pos = 0;
+ }
+
+ /**
+ * Returns `true` if the tail is empty (end of string).
+ */
+ Scanner.prototype.eos = function eos () {
+ return this.tail === '';
+ };
+
+ /**
+ * Tries to match the given regular expression at the current position.
+ * Returns the matched text if it can match, the empty string otherwise.
+ */
+ Scanner.prototype.scan = function scan (re) {
+ var match = this.tail.match(re);
+
+ if (!match || match.index !== 0)
+ return '';
+
+ var string = match[0];
+
+ this.tail = this.tail.substring(string.length);
+ this.pos += string.length;
+
+ return string;
+ };
+
+ /**
+ * Skips all text until the given regular expression can be matched. Returns
+ * the skipped string, which is the entire tail if no match can be made.
+ */
+ Scanner.prototype.scanUntil = function scanUntil (re) {
+ var index = this.tail.search(re), match;
+
+ switch (index) {
+ case -1:
+ match = this.tail;
+ this.tail = '';
+ break;
+ case 0:
+ match = '';
+ break;
+ default:
+ match = this.tail.substring(0, index);
+ this.tail = this.tail.substring(index);
+ }
+
+ this.pos += match.length;
+
+ return match;
+ };
+
+ /**
+ * Represents a rendering context by wrapping a view object and
+ * maintaining a reference to the parent context.
+ */
+ function Context (view, parentContext) {
+ this.view = view;
+ this.cache = { '.': this.view };
+ this.parent = parentContext;
+ }
+
+ /**
+ * Creates a new context using the given view with this context
+ * as the parent.
+ */
+ Context.prototype.push = function push (view) {
+ return new Context(view, this);
+ };
+
+ /**
+ * Returns the value of the given name in this context, traversing
+ * up the context hierarchy if the value is absent in this context's view.
+ */
+ Context.prototype.lookup = function lookup (name) {
+ var cache = this.cache;
+
+ var value;
+ if (cache.hasOwnProperty(name)) {
+ value = cache[name];
+ } else {
+ var context = this, names, index, lookupHit = false;
+
+ while (context) {
+ if (name.indexOf('.') > 0) {
+ value = context.view;
+ names = name.split('.');
+ index = 0;
+
+ /**
+ * Using the dot notion path in `name`, we descend through the
+ * nested objects.
+ *
+ * To be certain that the lookup has been successful, we have to
+ * check if the last object in the path actually has the property
+ * we are looking for. We store the result in `lookupHit`.
+ *
+ * This is specially necessary for when the value has been set to
+ * `undefined` and we want to avoid looking up parent contexts.
+ **/
+ while (value != null && index < names.length) {
+ if (index === names.length - 1)
+ lookupHit = hasProperty(value, names[index]);
+
+ value = value[names[index++]];
+ }
+ } else {
+ value = context.view[name];
+ lookupHit = hasProperty(context.view, name);
+ }
+
+ if (lookupHit)
+ break;
+
+ context = context.parent;
+ }
+
+ cache[name] = value;
+ }
+
+ if (isFunction(value))
+ value = value.call(this.view);
+
+ return value;
+ };
+
+ /**
+ * A Writer knows how to take a stream of tokens and render them to a
+ * string, given a context. It also maintains a cache of templates to
+ * avoid the need to parse the same template twice.
+ */
+ function Writer () {
+ this.cache = {};
+ }
+
+ /**
+ * Clears all cached templates in this writer.
+ */
+ Writer.prototype.clearCache = function clearCache () {
+ this.cache = {};
+ };
+
+ /**
+ * Parses and caches the given `template` and returns the array of tokens
+ * that is generated from the parse.
+ */
+ Writer.prototype.parse = function parse (template, tags) {
+ var cache = this.cache;
+ var tokens = cache[template];
+
+ if (tokens == null)
+ tokens = cache[template] = parseTemplate(template, tags);
+
+ return tokens;
+ };
+
+ /**
+ * High-level method that is used to render the given `template` with
+ * the given `view`.
+ *
+ * The optional `partials` argument may be an object that contains the
+ * names and templates of partials that are used in the template. It may
+ * also be a function that is used to load partial templates on the fly
+ * that takes a single argument: the name of the partial.
+ */
+ Writer.prototype.render = function render (template, view, partials) {
+ var tokens = this.parse(template);
+ var context = (view instanceof Context) ? view : new Context(view);
+ return this.renderTokens(tokens, context, partials, template);
+ };
+
+ /**
+ * Low-level method that renders the given array of `tokens` using
+ * the given `context` and `partials`.
+ *
+ * Note: The `originalTemplate` is only ever used to extract the portion
+ * of the original template that was contained in a higher-order section.
+ * If the template doesn't use higher-order sections, this argument may
+ * be omitted.
+ */
+ Writer.prototype.renderTokens = function renderTokens (tokens, context, partials, originalTemplate) {
+ var buffer = '';
+
+ var token, symbol, value;
+ for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {
+ value = undefined;
+ token = tokens[i];
+ symbol = token[0];
+
+ if (symbol === '#') value = this.renderSection(token, context, partials, originalTemplate);
+ else if (symbol === '^') value = this.renderInverted(token, context, partials, originalTemplate);
+ else if (symbol === '>') value = this.renderPartial(token, context, partials, originalTemplate);
+ else if (symbol === '&') value = this.unescapedValue(token, context);
+ else if (symbol === 'name') value = this.escapedValue(token, context);
+ else if (symbol === 'text') value = this.rawValue(token);
+
+ if (value !== undefined)
+ buffer += value;
+ }
+
+ return buffer;
+ };
+
+ Writer.prototype.renderSection = function renderSection (token, context, partials, originalTemplate) {
+ var self = this;
+ var buffer = '';
+ var value = context.lookup(token[1]);
+
+ // This function is used to render an arbitrary template
+ // in the current context by higher-order sections.
+ function subRender (template) {
+ return self.render(template, context, partials);
+ }
+
+ if (!value) return;
+
+ if (isArray(value)) {
+ for (var j = 0, valueLength = value.length; j < valueLength; ++j) {
+ buffer += this.renderTokens(token[4], context.push(value[j]), partials, originalTemplate);
+ }
+ } else if (typeof value === 'object' || typeof value === 'string' || typeof value === 'number') {
+ buffer += this.renderTokens(token[4], context.push(value), partials, originalTemplate);
+ } else if (isFunction(value)) {
+ if (typeof originalTemplate !== 'string')
+ throw new Error('Cannot use higher-order sections without the original template');
+
+ // Extract the portion of the original template that the section contains.
+ value = value.call(context.view, originalTemplate.slice(token[3], token[5]), subRender);
+
+ if (value != null)
+ buffer += value;
+ } else {
+ buffer += this.renderTokens(token[4], context, partials, originalTemplate);
+ }
+ return buffer;
+ };
+
+ Writer.prototype.renderInverted = function renderInverted (token, context, partials, originalTemplate) {
+ var value = context.lookup(token[1]);
+
+ // Use JavaScript's definition of falsy. Include empty arrays.
+ // See https://github.com/janl/mustache.js/issues/186
+ if (!value || (isArray(value) && value.length === 0))
+ return this.renderTokens(token[4], context, partials, originalTemplate);
+ };
+
+ Writer.prototype.renderPartial = function renderPartial (token, context, partials) {
+ if (!partials) return;
+
+ var value = isFunction(partials) ? partials(token[1]) : partials[token[1]];
+ if (value != null)
+ return this.renderTokens(this.parse(value), context, partials, value);
+ };
+
+ Writer.prototype.unescapedValue = function unescapedValue (token, context) {
+ var value = context.lookup(token[1]);
+ if (value != null)
+ return value;
+ };
+
+ Writer.prototype.escapedValue = function escapedValue (token, context) {
+ var value = context.lookup(token[1]);
+ if (value != null)
+ return mustache.escape(value);
+ };
+
+ Writer.prototype.rawValue = function rawValue (token) {
+ return token[1];
+ };
+
+ mustache.name = 'mustache.js';
+ mustache.version = '2.3.0';
+ mustache.tags = [ '{{', '}}' ];
+
+ // All high-level mustache.* functions use this writer.
+ var defaultWriter = new Writer();
+
+ /**
+ * Clears all cached templates in the default writer.
+ */
+ mustache.clearCache = function clearCache () {
+ return defaultWriter.clearCache();
+ };
+
+ /**
+ * Parses and caches the given template in the default writer and returns the
+ * array of tokens it contains. Doing this ahead of time avoids the need to
+ * parse templates on the fly as they are rendered.
+ */
+ mustache.parse = function parse (template, tags) {
+ return defaultWriter.parse(template, tags);
+ };
+
+ /**
+ * Renders the `template` with the given `view` and `partials` using the
+ * default writer.
+ */
+ mustache.render = function render (template, view, partials) {
+ if (typeof template !== 'string') {
+ throw new TypeError('Invalid template! Template should be a "string" ' +
+ 'but "' + typeStr(template) + '" was given as the first ' +
+ 'argument for mustache#render(template, view, partials)');
+ }
+
+ return defaultWriter.render(template, view, partials);
+ };
+
+ // This is here for backwards compatibility with 0.4.x.,
+ /*eslint-disable */ // eslint wants camel cased function name
+ mustache.to_html = function to_html (template, view, partials, send) {
+ /*eslint-enable*/
+
+ var result = mustache.render(template, view, partials);
+
+ if (isFunction(send)) {
+ send(result);
+ } else {
+ return result;
+ }
+ };
+
+ // Export the escaping function so that the user may override it.
+ // See https://github.com/janl/mustache.js/issues/244
+ mustache.escape = escapeHtml;
+
+ // Export these mainly for testing, but also for advanced usage.
+ mustache.Scanner = Scanner;
+ mustache.Context = Context;
+ mustache.Writer = Writer;
+
+ return mustache;
+})); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/js/ng-table.min.js b/common/src/main/webapp/thirdparty/js/ng-table.min.js
new file mode 100644
index 0000000..ccbc8ab
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/js/ng-table.min.js
@@ -0,0 +1,2 @@
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("angular")):"function"==typeof define&&define.amd?define(["angular"],e):"object"==typeof exports?exports["ng-table"]=e(require("angular")):t["ng-table"]=e(t.angular)}(this,function(t){return function(t){function e(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return t[r].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,e,n){Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=33)}(function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(typeof t[e]){case"function":break;case"object":t[e]=function(e){var n=e.slice(1),r=t[e[0]];return function(t,e,a){r.apply(this,[t,e,a].concat(n))}}(t[e]);break;default:t[e]=t[t[e]]}return t}([function(e,n){e.exports=t},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}var a=n(0),i=n(4),o=n(5),l=n(6),s=n(7),u=n(8),c=n(9),p=n(10),f=n(11),g=n(12),d=n(13),h=n(14),m=n(15),b=n(16),v=n(17);n(25),n(27),n(26),n(28),n(31),n(30),Object.defineProperty(e,"__esModule",{value:!0}),e.default=a.module("ngTable-browser",[]).directive("ngTable",i.ngTable).factory("ngTableColumn",o.ngTableColumn).directive("ngTableColumnsBinding",l.ngTableColumnsBinding).controller("ngTableController",s.ngTableController).directive("ngTableDynamic",u.ngTableDynamic).provider("ngTableFilterConfig",c.ngTableFilterConfigProvider).directive("ngTableFilterRow",p.ngTableFilterRow).controller("ngTableFilterRowController",f.ngTableFilterRowController).directive("ngTableGroupRow",g.ngTableGroupRow).controller("ngTableGroupRowController",d.ngTableGroupRowController).directive("ngTablePagination",h.ngTablePagination).directive("ngTableSelectFilterDs",m.ngTableSelectFilterDs).directive("ngTableSorterRow",b.ngTableSorterRow).controller("ngTableSorterRowController",v.ngTableSorterRowController),r(n(18))},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}var a=n(0),i=n(19),o=n(20),l=n(22),s=n(21);Object.defineProperty(e,"__esModule",{value:!0}),e.default=a.module("ngTable-core",[]).provider("ngTableDefaultGetData",i.ngTableDefaultGetDataProvider).value("ngTableDefaults",o.ngTableDefaults).factory("NgTableParams",l.ngTableParamsFactory).factory("ngTableEventsChannel",s.ngTableEventsChannel),r(n(23))},,function(t,e,n){"use strict";function r(t,e){return{restrict:"A",priority:1001,scope:!0,controller:"ngTableController",compile:function(t){var n,r,i=[],o=0,l=[];if(a.forEach(t.find("tr"),function(t){l.push(a.element(t))}),n=l.filter(function(t){return!t.hasClass("ng-table-group")})[0],r=l.filter(function(t){return t.hasClass("ng-table-group")})[0],n)return a.forEach(n.find("td"),function(t){var n=a.element(t);if(!n.attr("ignore-cell")||"true"!==n.attr("ignore-cell")){var l=function(t){return n.attr("x-data-"+t)||n.attr("data-"+t)||n.attr(t)},s=function(t,e){n.attr("x-data-"+t)?n.attr("x-data-"+t,e):n.attr("data"+t)?n.attr("data"+t,e):n.attr(t,e)},u=function(t){var n=l(t);if(n){var r,a=function(t){return void 0!==r?r:e(n)(t)};return a.assign=function(t,a){var i=e(n);i.assign?i.assign(t.$parent,a):r=a},a}},c=l("title-alt")||l("title");c&&n.attr("data-title-text","{{"+c+"}}"),i.push({id:o++,title:u("title"),titleAlt:u("title-alt"),headerTitle:u("header-title"),sortable:u("sortable"),"class":u("header-class"),filter:u("filter"),groupable:u("groupable"),headerTemplateURL:u("header"),filterData:u("filter-data"),show:n.attr("ng-if")?u("ng-if"):void 0}),(r||n.attr("ng-if"))&&s("ng-if","$columns["+(i.length-1)+"].show(this)")}}),function(t,e,n,r){t.$columns=i=r.buildColumns(i),r.setupBindingsToInternalScope(n.ngTable),r.loadFilterData(i),r.compileDirectiveTemplates()}}}}var a=n(0);r.$inject=["$q","$parse"],e.ngTable=r},function(t,e,n){"use strict";function r(){function t(t,n,i){var o=Object.create(t),l=e();for(var s in l)void 0===o[s]&&(o[s]=l[s]),a.isFunction(o[s])||!function(e){var n=function a(){return 1!==arguments.length||r(arguments[0])?t[e]:void a.assign(null,arguments[0])};n.assign=function(n,r){t[e]=r},o[e]=n}(s),function(e){var l=o[e];o[e]=function(){if(1!==arguments.length||r(arguments[0])){var e=arguments[0]||n,s=Object.create(e);return a.extend(s,{$column:o,$columns:i}),l.call(t,s)}l.assign(null,arguments[0])},l.assign&&(o[e].assign=l.assign)}(s);return o}function e(){return{"class":n(""),filter:n(!1),groupable:n(!1),filterData:a.noop,headerTemplateURL:n(!1),headerTitle:n(""),sortable:n(!1),show:n(!0),title:n(""),titleAlt:n("")}}function n(t){var e=t,n=function a(){return 1!==arguments.length||r(arguments[0])?e:void a.assign(null,arguments[0])};return n.assign=function(t,n){e=n},n}function r(t){return null!=t&&a.isFunction(t.$new)}return{buildColumn:t}}var a=n(0);r.$inject=[],e.ngTableColumn=r},function(t,e){"use strict";function n(t){function e(e,n,r){var a=t(r.ngTableColumnsBinding).assign;a&&e.$watch("$columns",function(t){var n=(t||[]).slice(0);a(e,n)})}var n={restrict:"A",require:"ngTable",link:e};return n}n.$inject=["$parse"],e.ngTableColumnsBinding=n},function(t,e,n){"use strict";function r(t,e,n,r,i,o,l,s,u,c){function p(e){if(e&&!t.params.hasErrorState()){var n=t.params,r=n.settings().filterOptions;if(n.hasFilterChanges()){var a=function(){n.page(1),n.reload()};r.filterDelay?v(a,r.filterDelay):a()}else n.reload()}}function f(){o.showFilter?t.$parent.$watch(o.showFilter,function(e){t.show_filter=e}):t.$watch(h,function(e){t.show_filter=e}),o.disableFilter&&t.$parent.$watch(o.disableFilter,function(e){t.$filterRow.disabled=e})}function g(){if(t.$groupRow={show:!1},o.showGroup){var e=r(o.showGroup);t.$parent.$watch(e,function(e){t.$groupRow.show=e}),e.assign&&t.$watch("$groupRow.show",function(n){e.assign(t.$parent,n)})}else t.$watch("params.hasGroup()",function(e){t.$groupRow.show=e})}function d(){return(t.$columns||[]).filter(function(e){return e.show(t)})}function h(){return!!t.$columns&&m(t.$columns,function(e){return e.show(t)&&!!e.filter(t)})}function m(t,e){for(var n=!1,r=0;r<t.length;r++){var a=t[r];if(e(a)){n=!0;break}}return n}function b(){c.onAfterReloadData(function(e,n){var r=d();e.hasGroup()?(t.$groups=n||[],t.$groups.visibleColumnCount=r.length):(t.$data=n||[],t.$data.visibleColumnCount=r.length)},t,function(e){return t.params===e}),c.onPagesChanged(function(e,n){t.pages=n},t,function(e){return t.params===e})}t.$filterRow={disabled:!1},t.$loading=!1,t.hasOwnProperty("params")||(t.params=new e((!0)));var v=function(){var t;return function(e,r){n.cancel(t),t=n(e,r)}}();t.$watch("params",function(t,e){t!==e&&t&&t.reload()},!1),t.$watch("params.isDataReloadRequired()",p),this.compileDirectiveTemplates=function(){if(!l.hasClass("ng-table")){t.templates={header:o.templateHeader?o.templateHeader:"ng-table/header.html",pagination:o.templatePagination?o.templatePagination:"ng-table/pager.html"},l.addClass("ng-table");var e=null,n=!1;a.forEach(l.children(),function(t){"THEAD"===t.tagName&&(n=!0)}),n||(e=a.element('<thead ng-include="templates.header"></thead>',s),l.prepend(e));var r=a.element('<div ng-table-pagination="params" template-url="templates.pagination"></div>',s);l.after(r),e&&i(e)(t),i(r)(t)}},this.loadFilterData=function(e){function n(t){return t&&"object"==typeof t&&"function"==typeof t.then}a.forEach(e,function(e){var r=e.filterData(t);return r?n(r)?(delete e.filterData,r.then(function(t){a.isArray(t)||a.isFunction(t)||a.isObject(t)||(t=[]),e.data=t})):e.data=r:void delete e.filterData})},this.buildColumns=function(e){var n=[];return(e||[]).forEach(function(e){n.push(u.buildColumn(e,t,n))}),n},this.parseNgTableDynamicExpr=function(t){if(!t||t.indexOf(" with ")>-1){var e=t.split(/\s+with\s+/);return{tableParams:e[0],columns:e[1]}}throw new Error("Parse error (expected example: ng-table-dynamic='tableParams with cols')")},this.setupBindingsToInternalScope=function(e){t.$watch(e,function(e){void 0!==e&&(t.params=e)},!1),f(),g()},b()}var a=n(0);r.$inject=["$scope","NgTableParams","$timeout","$parse","$compile","$attrs","$element","$document","ngTableColumn","ngTableEventsChannel"],e.ngTableController=r},function(t,e,n){"use strict";function r(){return{restrict:"A",priority:1001,scope:!0,controller:"ngTableController",compile:function(t){var e;if(a.forEach(t.find("tr"),function(t){t=a.element(t),t.hasClass("ng-table-group")||e||(e=t)}),e)return a.forEach(e.find("td"),function(t){var e=a.element(t),n=function(t){return e.attr("x-data-"+t)||e.attr("data-"+t)||e.attr(t)},r=n("title");r||e.attr("data-title-text","{{$columns[$index].titleAlt(this) || $columns[$index].title(this)}}");var i=e.attr("ng-if");i||e.attr("ng-if","$columns[$index].show(this)")}),function(t,e,n,r){var a=r.parseNgTableDynamicExpr(n.ngTableDynamic);r.setupBindingsToInternalScope(a.tableParams),r.compileDirectiveTemplates(),t.$watchCollection(a.columns,function(e){t.$columns=r.buildColumns(e),r.loadFilterData(t.$columns)})}}}}var a=n(0);r.$inject=[],e.ngTableDynamic=r},function(t,e,n){"use strict";function r(){function t(){e()}function e(){i=o}function n(t){var e=a.extend({},i,t);e.aliasUrls=a.extend({},i.aliasUrls,t.aliasUrls),i=e}function r(){function t(t,e){var n;return n="string"!=typeof t?t.id:t,n.indexOf("/")!==-1?n:r.getUrlForAlias(n,e)}function e(t,e){return i.aliasUrls[t]||i.defaultBaseUrl+t+i.defaultExt}var n,r={config:n,getTemplateUrl:t,getUrlForAlias:e};return Object.defineProperty(r,"config",{get:function(){return n=n||a.copy(i)},enumerable:!0}),r}var i,o={defaultBaseUrl:"ng-table/filters/",defaultExt:".html",aliasUrls:{}};this.$get=r,this.resetConfigs=e,this.setConfig=n,t(),r.$inject=[]}var a=n(0);r.$inject=[],e.ngTableFilterConfigProvider=r},function(t,e,n){"use strict";function r(){var t={restrict:"E",replace:!0,templateUrl:a,scope:!0,controller:"ngTableFilterRowController"};return t}var a=n(24);r.$inject=[],e.ngTableFilterRow=r},function(t,e){"use strict";function n(t,e){t.config=e,t.getFilterCellCss=function(t,e){if("horizontal"!==e)return"s12";var n=Object.keys(t).length,r=parseInt((12/n).toString(),10);return"s"+r},t.getFilterPlaceholderValue=function(t,e){return"string"==typeof t?"":t.placeholder}}n.$inject=["$scope","ngTableFilterConfig"],e.ngTableFilterRowController=n},function(t,e,n){"use strict";function r(){var t={restrict:"E",replace:!0,templateUrl:a,scope:!0,controller:"ngTableGroupRowController",controllerAs:"dctrl"};return t}var a=n(29);r.$inject=[],e.ngTableGroupRow=r},function(t,e){"use strict";function n(t){function e(){t.getGroupables=i,t.getGroupTitle=a,t.getVisibleColumns=o,t.groupBy=l,t.isSelectedGroup=u,t.toggleDetail=p,t.$watch("params.group()",c,!0)}function n(){var e;e=t.params.hasGroup(t.$selGroup,"asc")?"desc":t.params.hasGroup(t.$selGroup,"desc")?"":"asc",t.params.group(t.$selGroup,e)}function r(e){return t.$columns.filter(function(n){return n.groupable(t)===e})[0]}function a(e){return s(e)?e.title:e.title(t)}function i(){var e=t.$columns.filter(function(e){return!!e.groupable(t)});return f.concat(e)}function o(){return t.$columns.filter(function(e){return e.show(t)})}function l(e){u(e)?n():s(e)?t.params.group(e):t.params.group(e.groupable(t))}function s(t){return"function"==typeof t}function u(e){return s(e)?e===t.$selGroup:e.groupable(t)===t.$selGroup}function c(e){var n=r(t.$selGroup);if(n&&n.show.assign&&n.show.assign(t,!0),s(e))f=[e],t.$selGroup=e,t.$selGroupTitle=e.title;else{var a=Object.keys(e||{})[0],i=r(a);i&&(t.$selGroupTitle=i.title(t),t.$selGroup=a,i.show.assign&&i.show.assign(t,!1))}}function p(){return t.params.settings().groupOptions.isExpanded=!t.params.settings().groupOptions.isExpanded,t.params.reload()}var f=[];e()}n.$inject=["$scope"],e.ngTableGroupRowController=n},function(t,e,n){"use strict";function r(t,e,n){return{restrict:"A",scope:{params:"=ngTablePagination",templateUrl:"="},replace:!1,link:function(r,i){n.onAfterReloadData(function(t){r.pages=t.generatePagesArray()},r,function(t){return t===r.params}),r.$watch("templateUrl",function(n){if(void 0!==n){var o=a.element('<div ng-include="templateUrl"></div>',e);i.append(o),t(o)(r)}})}}}var a=n(0);r.$inject=["$compile","$document","ngTableEventsChannel"],e.ngTablePagination=r},function(t,e){"use strict";function n(){var t={restrict:"A",controller:r};return t}function r(t,e,n,r){function a(){s=e(n.ngTableSelectFilterDs)(t),t.$watch(function(){return s&&s.data},i)}function i(){l(s).then(function(e){e&&!o(e)&&e.unshift({id:"",title:""}),e=e||[],t.$selectData=e})}function o(t){for(var e,n=0;n<t.length;n++){var r=t[n];if(r&&""===r.id){e=!0;break}}return e}function l(t){var e=t.data;return e instanceof Array?r.when(e):r.when(e&&e())}var s;a()}n.$inject=[],e.ngTableSelectFilterDs=n,r.$inject=["$scope","$parse","$attrs","$q"]},function(t,e,n){"use strict";function r(){var t={restrict:"E",replace:!0,templateUrl:a,scope:!0,controller:"ngTableSorterRowController"};return t}var a=n(32);r.$inject=[],e.ngTableSorterRow=r},function(t,e){"use strict";function n(t){function e(e,n){var r=e.sortable&&e.sortable();if(r&&"string"==typeof r){var a=t.params.settings().defaultSort,i="asc"===a?"desc":"asc",o=t.params.sorting()&&t.params.sorting()[r]&&t.params.sorting()[r]===a,l=n.ctrlKey||n.metaKey?t.params.sorting():{};l[r]=o?i:a,t.params.parameters({sorting:l})}}t.sortBy=e}n.$inject=["$scope"],e.ngTableSorterRowController=n},function(t,e){"use strict"},function(t,e,n){"use strict";var r=n(0),a=function(){function t(){function t(t){function n(n){var a=n.settings().filterOptions;return r.isFunction(a.filterFn)?a.filterFn:t(a.filterFilterName||e.filterFilterName)}function a(n){return t(e.sortingFilterName)}function i(t,e){if(!e.hasFilter())return t;var r=e.filter(!0),a=Object.keys(r),i=a.reduce(function(t,e){return t=u(t,r[e],e)},{}),o=n(e);return o.call(e,t,i,e.settings().filterOptions.filterComparator)}function o(t,e){var n=t.slice((e.page()-1)*e.count(),e.page()*e.count());return e.total(t.length),n}function l(t,e){var n=e.orderBy(),r=a(e);return n.length?r(t,n):t}function s(t,e){if(null==t)return[];var n=r.extend({},c,e.settings().dataOptions),a=n.applyFilter?i(t,e):t,s=n.applySort?l(a,e):a;return n.applyPaging?o(s,e):s}function u(t,e,n){var r=n.split("."),a=t,i=r[r.length-1],o=a,l=r.slice(0,r.length-1);return l.forEach(function(t){o.hasOwnProperty(t)||(o[t]={}),o=o[t]}),o[i]=e,a}var c={applyFilter:!0,applySort:!0,applyPaging:!0};return s.applyPaging=o,s.getFilterFn=n,s.getOrderByFn=a,s}this.filterFilterName="filter",this.sortingFilterName="orderBy";var e=this;this.$get=t,t.$inject=["$filter"]}return t}();e.ngTableDefaultGetDataProvider=a},function(t,e){"use strict";e.ngTableDefaults={params:{},settings:{}}},function(t,e,n){"use strict";function r(t){function e(t,e){var i=t.charAt(0).toUpperCase()+t.substring(1),o=(l={},l["on"+i]=n(t),l["publish"+i]=r(t),l);return a.extend(e,o);var l}function n(e){function n(t){return t?r(t)?t:function(e){return e===t}:function(t){return!0}}function r(t){return"function"==typeof t}function a(t){return t&&"function"==typeof t.$new}return function(r,i,o){var l,s=t;return a(i)?(s=i,l=n(o)):l=n(i),s.$on("ngTable:"+e,function(t,e){for(var n=[],a=2;a<arguments.length;a++)n[a-2]=arguments[a];if(!e.isNullInstance){var i=[e].concat(n);l.apply(this,i)&&r.apply(this,i)}})}}function r(e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r-0]=arguments[r];t.$broadcast.apply(t,["ngTable:"+e].concat(n))}}var i={};return i=e("afterCreated",i),i=e("afterReloadData",i),i=e("datasetChanged",i),i=e("pagesChanged",i)}var a=n(0);r.$inject=["$rootScope"],e.ngTableEventsChannel=r},function(t,e,n){"use strict";function r(t,e,n,r,i,o){function l(n,l){function s(t){return!isNaN(parseFloat(t))&&isFinite(t)}function u(t){var e=F.groupOptions&&F.groupOptions.defaultSort;if(t){if(f(t))return null==t.sortDirection&&(t.sortDirection=e),t;if("object"==typeof t){for(var n in t)null==t[n]&&(t[n]=e);return t}return r={},r[t]=e,r}return t;var r}function c(t){var e=[];for(var n in t)e.push(("asc"===t[n]?"+":"-")+n);return e}function p(){var t=O.group;return{params:O,groupSortDirection:f(t)?t.sortDirection:void 0}}function f(t){return"function"==typeof t}function g(){var t=O.filter&&O.filter.$,e=b&&b.params.filter&&b.params.filter.$;return!a.equals(t,e)}function d(){F.filterOptions.filterDelay===C.filterDelay&&F.total<=F.filterOptions.filterDelayThreshold&&F.getData===x.getData&&(F.filterOptions.filterDelay=0)}function h(e){var n=F.interceptors||[];return n.reduce(function(e,n){var r=n.response&&n.response.bind(n)||t.when,a=n.responseError&&n.responseError.bind(n)||t.reject;return e.then(function(t){return r(t,$)},function(t){return a(t,$)})},e)}function m(){function e(t){return i(t.settings().dataset,t)}function n(e){var n,o=e.group(),l=void 0;if(f(o))n=o,l=o.sortDirection;else{var s=Object.keys(o)[0];l=o[s],n=function(t){return r(t,s)}}var u=e.settings(),p=u.dataOptions;u.dataOptions={applyPaging:!1};var g=u.getData,d=t.when(g(e));return d.then(function(t){var r={};a.forEach(t,function(t){var e=n(t);r[e]=r[e]||{data:[],$hideRows:!u.groupOptions.isExpanded,value:e},r[e].data.push(t)});var o=[];for(var s in r)o.push(r[s]);if(l){var p=i.getOrderByFn(),f=c({value:l});o=p(o,f)}return i.applyPaging(o,e)}).finally(function(){u.dataOptions=p})}function r(t,e){var n;if(n="string"==typeof e?e.split("."):e,void 0!==t){if(0===n.length)return t;if(null!==t)return r(t[n[0]],n.slice(1))}}return{getData:e,getGroups:n}}"boolean"==typeof n&&(this.isNullInstance=!0);var b,v,$=this,y=!1,w=[],T=function(){for(var t=[],n=0;n<arguments.length;n++)t[n-0]=arguments[n];F.debugMode&&e.debug&&e.debug.apply(e,t)},C={filterComparator:void 0,filterDelay:500,filterDelayThreshold:1e4,filterFilterName:void 0,filterFn:void 0,filterLayout:"stack"},D={defaultSort:"asc",isExpanded:!0},x=m();this.data=[],this.parameters=function(t,e){if(e=e||!1,void 0!==typeof t){for(var n in t){var r=t[n];if(e&&n.indexOf("[")>=0){for(var i=n.split(/\[(.*)\]/).reverse(),o="",l=0,c=i.length;l<c;l++){var p=i[l];if(""!==p){var f=r;r={},r[o=p]=s(f)?parseFloat(f):f}}"sorting"===o&&(O[o]={}),O[o]=a.extend(O[o]||{},r[o])}else"group"===n?O[n]=u(t[n]):O[n]=s(t[n])?parseFloat(t[n]):t[n]}return T("ngTable: set parameters",O),this}return O},this.settings=function(t){if(a.isDefined(t)){t.filterOptions&&(t.filterOptions=a.extend({},F.filterOptions,t.filterOptions)),t.groupOptions&&(t.groupOptions=a.extend({},F.groupOptions,t.groupOptions)),a.isArray(t.dataset)&&(t.total=t.dataset.length);var e=F.dataset;F=a.extend(F,t),a.isArray(t.dataset)&&d();var n=t.hasOwnProperty("dataset")&&t.dataset!=e;if(n){y&&this.page(1),y=!1;var r=function(){o.publishDatasetChanged($,t.dataset,e)};w?w.push(r):r()}return T("ngTable: set settings",F),this}return F},this.page=function(t){return void 0!==t?this.parameters({page:t}):O.page},this.total=function(t){return void 0!==t?this.settings({total:t}):F.total},this.count=function(t){return void 0!==t?this.parameters({count:t,page:1}):O.count},this.filter=function(t){if(null!=t&&"object"==typeof t)return this.parameters({filter:t,page:1});if(t===!0){for(var e=Object.keys(O.filter),n={},r=0;r<e.length;r++){var a=O.filter[e[r]];null!=a&&""!==a&&(n[e[r]]=a)}return n}return O.filter},this.group=function(t,e){if(void 0===t)return O.group;var n={page:1};return f(t)&&void 0!==e?(t.sortDirection=e,n.group=t):"string"==typeof t&&void 0!==e?n.group=(r={},r[t]=e,r):n.group=t,this.parameters(n),this;var r},this.sorting=function(t,e){return"string"==typeof t&&void 0!==e?(this.parameters({sorting:(n={},n[t]=e,n)}),this):void 0!==t?this.parameters({sorting:t}):O.sorting;var n},this.isSortBy=function(t,e){return void 0!==e?void 0!==O.sorting[t]&&O.sorting[t]==e:void 0!==O.sorting[t]},this.orderBy=function(){return c(O.sorting)},this.generatePagesArray=function(t,e,n,r){arguments.length||(t=this.page(),e=this.total(),n=this.count());var a,i,o,l;r=r&&r<6?6:r;var s=[];if(l=Math.ceil(e/n),l>1){s.push({type:"prev",number:Math.max(1,t-1),active:t>1}),s.push({type:"first",number:1,active:t>1,current:1===t}),i=Math.round((F.paginationMaxBlocks-F.paginationMinBlocks)/2),o=Math.max(2,t-i),a=Math.min(l-1,t+2*i-(t-o)),o=Math.max(2,o-(2*i-(a-o)));for(var u=o;u<=a;)u===o&&2!==u||u===a&&u!==l-1?s.push({type:"more",active:!1}):s.push({type:"page",number:u,active:t!==u,current:t===u}),u++;s.push({type:"last",number:l,active:t!==l,current:t===l}),s.push({type:"next",number:Math.min(l,t+1),active:t<l})}return s},this.isDataReloadRequired=function(){return!y||!a.equals(p(),b)||g()},this.hasFilter=function(){return Object.keys(this.filter(!0)).length>0},this.hasGroup=function(t,e){return null==t?f(O.group)||Object.keys(O.group).length>0:f(t)?null==e?O.group===t:O.group===t&&t.sortDirection===e:null==e?Object.keys(O.group).indexOf(t)!==-1:O.group[t]===e},this.hasFilterChanges=function(){var t=b&&b.params.filter;return!a.equals(O.filter,t)||g()},this.url=function(t){function e(t,e){n(i)?i.push(e+"="+encodeURIComponent(t)):i[e]=encodeURIComponent(t)}function n(e){return t}function r(t,e){return"group"===e||void 0!==typeof t&&""!==t}t=t||!1;var i=t?[]:{};for(var o in O)if(O.hasOwnProperty(o)){var l=O[o],s=encodeURIComponent(o);if("object"==typeof l){for(var u in l)if(r(l[u],o)){var c=s+"["+encodeURIComponent(u)+"]";e(l[u],c)}}else!a.isFunction(l)&&r(l,o)&&e(l,s)}return i},this.reload=function(){var e=this,n=null;if(F.$loading=!0,b=a.copy(p()),y=!0,e.hasGroup())n=h(t.when(F.getGroups(e)));else{var r=F.getData;n=h(t.when(r(e)))}T("ngTable: reload data");var i=e.data;return n.then(function(t){return F.$loading=!1,v=null,e.data=t,o.publishAfterReloadData(e,t,i),e.reloadPages(),t}).catch(function(e){return v=b,t.reject(e)})},this.hasErrorState=function(){return!(!v||!a.equals(v,p()))},this.reloadPages=function(){var t;return function(){var e=t,n=$.generatePagesArray($.page(),$.total(),$.count());a.equals(e,n)||(t=n,o.publishPagesChanged(this,n,e))}}();var O={page:1,count:10,filter:{},sorting:{},group:{}};a.extend(O,r.params);var F={$loading:!1,dataset:null,total:0,defaultSort:"desc",filterOptions:a.copy(C),groupOptions:a.copy(D),counts:[10,25,50,100],interceptors:[],paginationMaxBlocks:11,paginationMinBlocks:5,sortingIndicator:"span"};return this.settings(x),this.settings(r.settings),this.settings(l),this.parameters(n,!0),o.publishAfterCreated(this),a.forEach(w,function(t){t()}),w=null,this}return l}var a=n(0);r.$inject=["$q","$log","$filter","ngTableDefaults","ngTableDefaultGetData","ngTableEventsChannel"],e.ngTableParamsFactory=r},18,function(t,e,n){var r="ng-table/filterRow.html",a='<tr ng-show=show_filter class=ng-table-filters> <th data-title-text="{{$column.titleAlt(this) || $column.title(this)}}" ng-repeat="$column in $columns" ng-if=$column.show(this) class="filter {{$column.class(this)}}" ng-class="params.settings().filterOptions.filterLayout === \'horizontal\' ? \'filter-horizontal\' : \'\'"> <div ng-repeat="(name, filter) in $column.filter(this)" ng-include=config.getTemplateUrl(filter) class=filter-cell ng-class="[getFilterCellCss($column.filter(this), params.settings().filterOptions.filterLayout), $last ? \'last\' : \'\']"> </div> </th> </tr> ',i=n(0);i.module("ng").run(["$templateCache",function(t){t.put(r,a)}]),t.exports=r},function(t,e,n){var r="ng-table/filters/number.html",a='<input type=number name={{name}} ng-disabled=$filterRow.disabled ng-model=params.filter()[name] class="input-filter form-control" placeholder="{{getFilterPlaceholderValue(filter, name)}}"/> ',i=n(0);i.module("ng").run(["$templateCache",function(t){t.put(r,a)}]),t.exports=r},function(t,e,n){var r="ng-table/filters/select-multiple.html",a='<select ng-options="data.id as data.title for data in $column.data" ng-disabled=$filterRow.disabled multiple=multiple ng-multiple=true ng-model=params.filter()[name] class="filter filter-select-multiple form-control" name={{name}}> </select> ',i=n(0);i.module("ng").run(["$templateCache",function(t){t.put(r,a)}]),t.exports=r},function(t,e,n){var r="ng-table/filters/select.html",a='<select ng-options="data.id as data.title for data in $selectData" ng-table-select-filter-ds=$column ng-disabled=$filterRow.disabled ng-model=params.filter()[name] class="filter filter-select form-control" name={{name}}> <option style=display:none value=""></option> </select> ',i=n(0);i.module("ng").run(["$templateCache",function(t){t.put(r,a)}]),t.exports=r},function(t,e,n){var r="ng-table/filters/text.html",a='<input type=text name={{name}} ng-disabled=$filterRow.disabled ng-model=params.filter()[name] class="input-filter form-control" placeholder="{{getFilterPlaceholderValue(filter, name)}}"/> ',i=n(0);i.module("ng").run(["$templateCache",function(t){t.put(r,a)}]),t.exports=r},function(t,e,n){var r="ng-table/groupRow.html",a='<tr ng-if=params.hasGroup() ng-show=$groupRow.show class=ng-table-group-header> <th colspan={{getVisibleColumns().length}} class=sortable ng-class="{\n \'sort-asc\': params.hasGroup($selGroup, \'asc\'),\n \'sort-desc\':params.hasGroup($selGroup, \'desc\')\n }"> <a href="" ng-click="isSelectorOpen = !isSelectorOpen" class=ng-table-group-selector> <strong class=sort-indicator>{{$selGroupTitle}}</strong> <button class="btn btn-default btn-xs ng-table-group-close" ng-click="$groupRow.show = false; $event.preventDefault(); $event.stopPropagation();"> <span class="glyphicon glyphicon-remove"></span> </button> <button class="btn btn-default btn-xs ng-table-group-toggle" ng-click="toggleDetail(); $event.preventDefault(); $event.stopPropagation();"> <span class=glyphicon ng-class="{\n \'glyphicon-resize-small\': params.settings().groupOptions.isExpanded,\n \'glyphicon-resize-full\': !params.settings().groupOptions.isExpanded\n }"></span> </button> </a> <div class=list-group ng-if=isSelectorOpen> <a href="" class=list-group-item ng-repeat="group in getGroupables()" ng-click=groupBy(group)> <strong>{{ getGroupTitle(group)}}</strong> <strong ng-class="isSelectedGroup(group) && \'sort-indicator\'"></strong> </a> </div> </th> </tr> ',i=n(0);i.module("ng").run(["$templateCache",function(t){t.put(r,a)}]),t.exports=r},function(t,e,n){var r="ng-table/header.html",a="<ng-table-group-row></ng-table-group-row> <ng-table-sorter-row></ng-table-sorter-row> <ng-table-filter-row></ng-table-filter-row> ",i=n(0);i.module("ng").run(["$templateCache",function(t){t.put(r,a)}]),t.exports=r},function(t,e,n){var r="ng-table/pager.html",a='<div class="ng-cloak ng-table-pager" ng-if=params.data.length> <div ng-if=params.settings().counts.length class="ng-table-counts btn-group pull-right"> <button ng-repeat="count in params.settings().counts" type=button ng-class="{\'active\':params.count() == count}" ng-click=params.count(count) class="btn btn-default"> <span ng-bind=count></span> </button> </div> <ul ng-if=pages.length class="pagination ng-table-pagination"> <li ng-class="{\'disabled\': !page.active && !page.current, \'active\': page.current}" ng-repeat="page in pages" ng-switch=page.type> <a ng-switch-when=prev ng-click=params.page(page.number) href="">&laquo;</a> <a ng-switch-when=first ng-click=params.page(page.number) href=""><span ng-bind=page.number></span></a> <a ng-switch-when=page ng-click=params.page(page.number) href=""><span ng-bind=page.number></span></a> <a ng-switch-when=more ng-click=params.page(page.number) href="">&#8230;</a> <a ng-switch-when=last ng-click=params.page(page.number) href=""><span ng-bind=page.number></span></a> <a ng-switch-when=next ng-click=params.page(page.number) href="">&raquo;</a> </li> </ul> </div> ',i=n(0);i.module("ng").run(["$templateCache",function(t){t.put(r,a)}]),t.exports=r},function(t,e,n){var r="ng-table/sorterRow.html",a="<tr class=ng-table-sort-header> <th title={{$column.headerTitle(this)}} ng-repeat=\"$column in $columns\" ng-class=\"{\n 'sortable': $column.sortable(this),\n 'sort-asc': params.sorting()[$column.sortable(this)]=='asc',\n 'sort-desc': params.sorting()[$column.sortable(this)]=='desc'\n }\" ng-click=\"sortBy($column, $event)\" ng-if=$column.show(this) ng-init=\"template = $column.headerTemplateURL(this)\" class=\"header {{$column.class(this)}}\"> <div ng-if=!template class=ng-table-header ng-class=\"{'sort-indicator': params.settings().sortingIndicator == 'div'}\"> <span ng-bind=$column.title(this) ng-class=\"{'sort-indicator': params.settings().sortingIndicator == 'span'}\"></span> </div> <div ng-if=template ng-include=template></div> </th> </tr> ",i=n(0);i.module("ng").run(["$templateCache",function(t){t.put(r,a)}]),t.exports=r},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}var a=n(0),i=n(2),o=n(1),l=a.module("ngTable",[i.default.name,o.default.name]);e.ngTable=l,r(n(2)),r(n(1))}]))});
+//# sourceMappingURL=ng-table.min.js.map \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/js/tools.js b/common/src/main/webapp/thirdparty/js/tools.js
new file mode 100644
index 0000000..b4a6e68
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/js/tools.js
@@ -0,0 +1,1021 @@
+/*
+ * Copyright 2016, CMCC Technologies Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+;(function(window, define) {
+ var _ = {
+ version: "2.3.0",
+ areas: {},
+ apis: {},
+
+ // utilities
+ inherit: function(api, o) {
+ for (var p in api) {
+ if (!o.hasOwnProperty(p)) {
+ o[p] = api[p];
+ }
+ }
+ return o;
+ },
+ stringify: function(d) {
+ return d === undefined || typeof d === "function" ? d+'' : JSON.stringify(d);
+ },
+ parse: function(s) {
+ // if it doesn't parse, return as is
+ try{ return JSON.parse(s); }catch(e){ return s; }
+ },
+
+ // extension hooks
+ fn: function(name, fn) {
+ _.storeAPI[name] = fn;
+ for (var api in _.apis) {
+ _.apis[api][name] = fn;
+ }
+ },
+ get: function(area, key){ return area.getItem(key); },
+ set: function(area, key, string){ area.setItem(key, string); },
+ remove: function(area, key){ area.removeItem(key); },
+ key: function(area, i){ return area.key(i); },
+ length: function(area){ return area.length; },
+ clear: function(area){ area.clear(); },
+
+ // core functions
+ Store: function(id, area, namespace) {
+ var store = _.inherit(_.storeAPI, function(key, data, overwrite) {
+ if (arguments.length === 0){ return store.getAll(); }
+ if (data !== undefined){ return store.set(key, data, overwrite); }
+ if (typeof key === "string"){ return store.get(key); }
+ if (!key){ return store.clear(); }
+ return store.setAll(key, data);// overwrite=data, data=key
+ });
+ store._id = id;
+ try {
+ var testKey = '_safariPrivate_';
+ area.setItem(testKey, 'sucks');
+ store._area = area;
+ area.removeItem(testKey);
+ } catch (e) {}
+ if (!store._area) {
+ store._area = _.inherit(_.storageAPI, { items: {}, name: 'fake' });
+ }
+ store._ns = namespace || '';
+ if (!_.areas[id]) {
+ _.areas[id] = store._area;
+ }
+ if (!_.apis[store._ns+store._id]) {
+ _.apis[store._ns+store._id] = store;
+ }
+ return store;
+ },
+ storeAPI: {
+ // admin functions
+ area: function(id, area) {
+ var store = this[id];
+ if (!store || !store.area) {
+ store = _.Store(id, area, this._ns);//new area-specific api in this namespace
+ if (!this[id]){ this[id] = store; }
+ }
+ return store;
+ },
+ namespace: function(namespace, noSession) {
+ if (!namespace){
+ return this._ns ? this._ns.substring(0,this._ns.length-1) : '';
+ }
+ var ns = namespace, store = this[ns];
+ if (!store || !store.namespace) {
+ store = _.Store(this._id, this._area, this._ns+ns+'.');//new namespaced api
+ if (!this[ns]){ this[ns] = store; }
+ if (!noSession){ store.area('session', _.areas.session); }
+ }
+ return store;
+ },
+ isFake: function(){ return this._area.name === 'fake'; },
+ toString: function() {
+ return 'store'+(this._ns?'.'+this.namespace():'')+'['+this._id+']';
+ },
+
+ // storage functions
+ has: function(key) {
+ if (this._area.has) {
+ return this._area.has(this._in(key));//extension hook
+ }
+ return !!(this._in(key) in this._area);
+ },
+ size: function(){ return this.keys().length; },
+ each: function(fn, and) {
+ for (var i=0, m=_.length(this._area); i<m; i++) {
+ var key = this._out(_.key(this._area, i));
+ if (key !== undefined) {
+ if (fn.call(this, key, and || this.get(key)) === false) {
+ break;
+ }
+ }
+ if (m > _.length(this._area)) { m--; i--; }// in case of removeItem
+ }
+ return and || this;
+ },
+ keys: function() {
+ return this.each(function(k, list){ list.push(k); }, []);
+ },
+ get: function(key, alt) {
+ var s = _.get(this._area, this._in(key));
+ return s !== null ? _.parse(s) : alt || s;// support alt for easy default mgmt
+ },
+ getAll: function() {
+ return this.each(function(k, all){ all[k] = this.get(k); }, {});
+ },
+ set: function(key, data, overwrite) {
+ var d = this.get(key);
+ if (d != null && overwrite === false) {
+ return data;
+ }
+ return _.set(this._area, this._in(key), _.stringify(data), overwrite) || d;
+ },
+ setAll: function(data, overwrite) {
+ var changed, val;
+ for (var key in data) {
+ val = data[key];
+ if (this.set(key, val, overwrite) !== val) {
+ changed = true;
+ }
+ }
+ return changed;
+ },
+ remove: function(key) {
+ var d = this.get(key);
+ _.remove(this._area, this._in(key));
+ return d;
+ },
+ clear: function() {
+ if (!this._ns) {
+ _.clear(this._area);
+ } else {
+ this.each(function(k){ _.remove(this._area, this._in(k)); }, 1);
+ }
+ return this;
+ },
+ clearAll: function() {
+ var area = this._area;
+ for (var id in _.areas) {
+ if (_.areas.hasOwnProperty(id)) {
+ this._area = _.areas[id];
+ this.clear();
+ }
+ }
+ this._area = area;
+ return this;
+ },
+
+ // internal use functions
+ _in: function(k) {
+ if (typeof k !== "string"){ k = _.stringify(k); }
+ return this._ns ? this._ns + k : k;
+ },
+ _out: function(k) {
+ return this._ns ?
+ k && k.indexOf(this._ns) === 0 ?
+ k.substring(this._ns.length) :
+ undefined : // so each() knows to skip it
+ k;
+ }
+ },// end _.storeAPI
+ storageAPI: {
+ length: 0,
+ has: function(k){ return this.items.hasOwnProperty(k); },
+ key: function(i) {
+ var c = 0;
+ for (var k in this.items){
+ if (this.has(k) && i === c++) {
+ return k;
+ }
+ }
+ },
+ setItem: function(k, v) {
+ if (!this.has(k)) {
+ this.length++;
+ }
+ this.items[k] = v;
+ },
+ removeItem: function(k) {
+ if (this.has(k)) {
+ delete this.items[k];
+ this.length--;
+ }
+ },
+ getItem: function(k){ return this.has(k) ? this.items[k] : null; },
+ clear: function(){ for (var k in this.list){ this.removeItem(k); } },
+ toString: function(){ return this.length+' items in '+this.name+'Storage'; }
+ }// end _.storageAPI
+ };
+
+ // setup the primary store fn
+ if (window.store){ _.conflict = window.store; }
+ var store =
+ // safely set this up (throws error in IE10/32bit mode for local files)
+ _.Store("local", (function(){try{ return localStorage; }catch(e){}})());
+ store.local = store;// for completeness
+ store._ = _;// for extenders and debuggers...
+ // safely setup store.session (throws exception in FF for file:/// urls)
+ store.area("session", (function(){try{ return sessionStorage; }catch(e){}})());
+
+ //Expose store to the global object
+ window.store = store;
+
+ if (typeof define === 'function' && define.amd !== undefined) {
+ define(function () {
+ return store;
+ });
+ } else if (typeof module !== 'undefined' && module.exports) {
+ module.exports = store;
+ }
+
+})(this, null);
+
+// XHook - v1.3.3 - https://github.com/jpillora/xhook
+// Jaime Pillora <dev@jpillora.com> - MIT Copyright 2015
+(function(window,undefined) {
+var AFTER, BEFORE, COMMON_EVENTS, EventEmitter, FIRE, FormData, NativeFormData, NativeXMLHttp, OFF, ON, READY_STATE, UPLOAD_EVENTS, XHookFormData, XHookHttpRequest, XMLHTTP, convertHeaders, depricatedProp, document, fakeEvent, mergeObjects, msie, proxyEvents, slice, xhook, _base,
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
+
+document = window.document;
+
+BEFORE = 'before';
+
+AFTER = 'after';
+
+READY_STATE = 'readyState';
+
+ON = 'addEventListener';
+
+OFF = 'removeEventListener';
+
+FIRE = 'dispatchEvent';
+
+XMLHTTP = 'XMLHttpRequest';
+
+FormData = 'FormData';
+
+UPLOAD_EVENTS = ['load', 'loadend', 'loadstart'];
+
+COMMON_EVENTS = ['progress', 'abort', 'error', 'timeout'];
+
+msie = parseInt((/msie (\d+)/.exec(navigator.userAgent.toLowerCase()) || [])[1]);
+
+if (isNaN(msie)) {
+ msie = parseInt((/trident\/.*; rv:(\d+)/.exec(navigator.userAgent.toLowerCase()) || [])[1]);
+}
+
+(_base = Array.prototype).indexOf || (_base.indexOf = function(item) {
+ var i, x, _i, _len;
+ for (i = _i = 0, _len = this.length; _i < _len; i = ++_i) {
+ x = this[i];
+ if (x === item) {
+ return i;
+ }
+ }
+ return -1;
+});
+
+slice = function(o, n) {
+ return Array.prototype.slice.call(o, n);
+};
+
+depricatedProp = function(p) {
+ return p === "returnValue" || p === "totalSize" || p === "position";
+};
+
+mergeObjects = function(src, dst) {
+ var k, v;
+ for (k in src) {
+ v = src[k];
+ if (depricatedProp(k)) {
+ continue;
+ }
+ try {
+ dst[k] = src[k];
+ } catch (_error) {}
+ }
+ return dst;
+};
+
+proxyEvents = function(events, src, dst) {
+ var event, p, _i, _len;
+ p = function(event) {
+ return function(e) {
+ var clone, k, val;
+ clone = {};
+ for (k in e) {
+ if (depricatedProp(k)) {
+ continue;
+ }
+ val = e[k];
+ clone[k] = val === src ? dst : val;
+ }
+ return dst[FIRE](event, clone);
+ };
+ };
+ for (_i = 0, _len = events.length; _i < _len; _i++) {
+ event = events[_i];
+ if (dst._has(event)) {
+ src["on" + event] = p(event);
+ }
+ }
+};
+
+fakeEvent = function(type) {
+ var msieEventObject;
+ if (document.createEventObject != null) {
+ msieEventObject = document.createEventObject();
+ msieEventObject.type = type;
+ return msieEventObject;
+ } else {
+ try {
+ return new Event(type);
+ } catch (_error) {
+ return {
+ type: type
+ };
+ }
+ }
+};
+
+EventEmitter = function(nodeStyle) {
+ var emitter, events, listeners;
+ events = {};
+ listeners = function(event) {
+ return events[event] || [];
+ };
+ emitter = {};
+ emitter[ON] = function(event, callback, i) {
+ events[event] = listeners(event);
+ if (events[event].indexOf(callback) >= 0) {
+ return;
+ }
+ i = i === undefined ? events[event].length : i;
+ events[event].splice(i, 0, callback);
+ };
+ emitter[OFF] = function(event, callback) {
+ var i;
+ if (event === undefined) {
+ events = {};
+ return;
+ }
+ if (callback === undefined) {
+ events[event] = [];
+ }
+ i = listeners(event).indexOf(callback);
+ if (i === -1) {
+ return;
+ }
+ listeners(event).splice(i, 1);
+ };
+ emitter[FIRE] = function() {
+ var args, event, i, legacylistener, listener, _i, _len, _ref;
+ args = slice(arguments);
+ event = args.shift();
+ if (!nodeStyle) {
+ args[0] = mergeObjects(args[0], fakeEvent(event));
+ }
+ legacylistener = emitter["on" + event];
+ if (legacylistener) {
+ legacylistener.apply(undefined, args);
+ }
+ _ref = listeners(event).concat(listeners("*"));
+ for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
+ listener = _ref[i];
+ listener.apply(undefined, args);
+ }
+ };
+ emitter._has = function(event) {
+ return !!(events[event] || emitter["on" + event]);
+ };
+ if (nodeStyle) {
+ emitter.listeners = function(event) {
+ return slice(listeners(event));
+ };
+ emitter.on = emitter[ON];
+ emitter.off = emitter[OFF];
+ emitter.fire = emitter[FIRE];
+ emitter.once = function(e, fn) {
+ var fire;
+ fire = function() {
+ emitter.off(e, fire);
+ return fn.apply(null, arguments);
+ };
+ return emitter.on(e, fire);
+ };
+ emitter.destroy = function() {
+ return events = {};
+ };
+ }
+ return emitter;
+};
+
+xhook = EventEmitter(true);
+
+xhook.EventEmitter = EventEmitter;
+
+xhook[BEFORE] = function(handler, i) {
+ if (handler.length < 1 || handler.length > 2) {
+ throw "invalid hook";
+ }
+ return xhook[ON](BEFORE, handler, i);
+};
+
+xhook[AFTER] = function(handler, i) {
+ if (handler.length < 2 || handler.length > 3) {
+ throw "invalid hook";
+ }
+ return xhook[ON](AFTER, handler, i);
+};
+
+xhook.enable = function() {
+ window[XMLHTTP] = XHookHttpRequest;
+ if (NativeFormData) {
+ window[FormData] = XHookFormData;
+ }
+};
+
+xhook.disable = function() {
+ window[XMLHTTP] = xhook[XMLHTTP];
+ window[FormData] = NativeFormData;
+};
+
+convertHeaders = xhook.headers = function(h, dest) {
+ var header, headers, k, name, v, value, _i, _len, _ref;
+ if (dest == null) {
+ dest = {};
+ }
+ switch (typeof h) {
+ case "object":
+ headers = [];
+ for (k in h) {
+ v = h[k];
+ name = k.toLowerCase();
+ headers.push("" + name + ":\t" + v);
+ }
+ return headers.join('\n');
+ case "string":
+ headers = h.split('\n');
+ for (_i = 0, _len = headers.length; _i < _len; _i++) {
+ header = headers[_i];
+ if (/([^:]+):\s*(.+)/.test(header)) {
+ name = (_ref = RegExp.$1) != null ? _ref.toLowerCase() : void 0;
+ value = RegExp.$2;
+ if (dest[name] == null) {
+ dest[name] = value;
+ }
+ }
+ }
+ return dest;
+ }
+};
+
+NativeFormData = window[FormData];
+
+XHookFormData = function(form) {
+ var entries;
+ this.fd = form ? new NativeFormData(form) : new NativeFormData();
+ this.form = form;
+ entries = [];
+ Object.defineProperty(this, 'entries', {
+ get: function() {
+ var fentries;
+ fentries = !form ? [] : slice(form.querySelectorAll("input,select")).filter(function(e) {
+ var _ref;
+ return ((_ref = e.type) !== 'checkbox' && _ref !== 'radio') || e.checked;
+ }).map(function(e) {
+ return [e.name, e.type === "file" ? e.files : e.value];
+ });
+ return fentries.concat(entries);
+ }
+ });
+ this.append = (function(_this) {
+ return function() {
+ var args;
+ args = slice(arguments);
+ entries.push(args);
+ return _this.fd.append.apply(_this.fd, args);
+ };
+ })(this);
+};
+
+if (NativeFormData) {
+ xhook[FormData] = NativeFormData;
+ window[FormData] = XHookFormData;
+}
+
+NativeXMLHttp = window[XMLHTTP];
+
+xhook[XMLHTTP] = NativeXMLHttp;
+
+XHookHttpRequest = window[XMLHTTP] = function() {
+ var ABORTED, currentState, emitFinal, emitReadyState, facade, hasError, hasErrorHandler, readBody, readHead, request, response, setReadyState, status, transiting, writeBody, writeHead, xhr;
+ ABORTED = -1;
+ xhr = new xhook[XMLHTTP]();
+ request = {};
+ status = null;
+ hasError = void 0;
+ transiting = void 0;
+ response = void 0;
+ readHead = function() {
+ var key, name, val, _ref;
+ response.status = status || xhr.status;
+ if (!(status === ABORTED && msie < 10)) {
+ response.statusText = xhr.statusText;
+ }
+ if (status !== ABORTED) {
+ _ref = convertHeaders(xhr.getAllResponseHeaders());
+ for (key in _ref) {
+ val = _ref[key];
+ if (!response.headers[key]) {
+ name = key.toLowerCase();
+ response.headers[name] = val;
+ }
+ }
+ }
+ };
+ readBody = function() {
+ if (!xhr.responseType || xhr.responseType === "text") {
+ response.text = xhr.responseText;
+ response.data = xhr.responseText;
+ } else if (xhr.responseType === "document") {
+ response.xml = xhr.responseXML;
+ response.data = xhr.responseXML;
+ } else {
+ response.data = xhr.response;
+ }
+ if ("responseURL" in xhr) {
+ response.finalUrl = xhr.responseURL;
+ }
+ };
+ writeHead = function() {
+ facade.status = response.status;
+ facade.statusText = response.statusText;
+ };
+ writeBody = function() {
+ if ('text' in response) {
+ facade.responseText = response.text;
+ }
+ if ('xml' in response) {
+ facade.responseXML = response.xml;
+ }
+ if ('data' in response) {
+ facade.response = response.data;
+ }
+ if ('finalUrl' in response) {
+ facade.responseURL = response.finalUrl;
+ }
+ };
+ emitReadyState = function(n) {
+ while (n > currentState && currentState < 4) {
+ facade[READY_STATE] = ++currentState;
+ if (currentState === 1) {
+ facade[FIRE]("loadstart", {});
+ }
+ if (currentState === 2) {
+ writeHead();
+ }
+ if (currentState === 4) {
+ writeHead();
+ writeBody();
+ }
+ facade[FIRE]("readystatechange", {});
+ if (currentState === 4) {
+ setTimeout(emitFinal, 0);
+ }
+ }
+ };
+ emitFinal = function() {
+ if (!hasError) {
+ facade[FIRE]("load", {});
+ }
+ facade[FIRE]("loadend", {});
+ if (hasError) {
+ facade[READY_STATE] = 0;
+ }
+ };
+ currentState = 0;
+ setReadyState = function(n) {
+ var hooks, process;
+ if (n !== 4) {
+ emitReadyState(n);
+ return;
+ }
+ hooks = xhook.listeners(AFTER);
+ process = function() {
+ var hook;
+ if (!hooks.length) {
+ return emitReadyState(4);
+ }
+ hook = hooks.shift();
+ if (hook.length === 2) {
+ hook(request, response);
+ return process();
+ } else if (hook.length === 3 && request.async) {
+ return hook(request, response, process);
+ } else {
+ return process();
+ }
+ };
+ process();
+ };
+ facade = request.xhr = EventEmitter();
+ xhr.onreadystatechange = function(event) {
+ try {
+ if (xhr[READY_STATE] === 2) {
+ readHead();
+ }
+ } catch (_error) {}
+ if (xhr[READY_STATE] === 4) {
+ transiting = false;
+ readHead();
+ readBody();
+ }
+ setReadyState(xhr[READY_STATE]);
+ };
+ hasErrorHandler = function() {
+ hasError = true;
+ };
+ facade[ON]('error', hasErrorHandler);
+ facade[ON]('timeout', hasErrorHandler);
+ facade[ON]('abort', hasErrorHandler);
+ facade[ON]('progress', function() {
+ if (currentState < 3) {
+ setReadyState(3);
+ } else {
+ facade[FIRE]("readystatechange", {});
+ }
+ });
+ if ('withCredentials' in xhr || xhook.addWithCredentials) {
+ facade.withCredentials = false;
+ }
+ facade.status = 0;
+ facade.open = function(method, url, async, user, pass) {
+ currentState = 0;
+ hasError = false;
+ transiting = false;
+ request.headers = {};
+ request.headerNames = {};
+ request.status = 0;
+ response = {};
+ response.headers = {};
+ request.method = method;
+ request.url = url;
+ request.async = async !== false;
+ request.user = user;
+ request.pass = pass;
+ setReadyState(1);
+ };
+ facade.send = function(body) {
+ var hooks, k, modk, process, send, _i, _len, _ref;
+ _ref = ['type', 'timeout', 'withCredentials'];
+ if(navigator.userAgent.indexOf("Firefox/") != -1){http://atmosphere-framework.2306103.n4.nabble.com/Atmosphere-js-withCredentials-true-does-not-work-in-Firefox-td4656661.html
+ _ref = ['type', 'timeout'];
+ }
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ k = _ref[_i];
+ modk = k === "type" ? "responseType" : k;
+ if (modk in facade) {
+ request[k] = facade[modk];
+ }
+ }
+ request.body = body;
+ send = function() {
+ var header, value, _j, _len1, _ref1, _ref2;
+ proxyEvents(COMMON_EVENTS, xhr, facade);
+ if (facade.upload) {
+ proxyEvents(COMMON_EVENTS.concat(UPLOAD_EVENTS), xhr.upload, facade.upload);
+ }
+ transiting = true;
+ xhr.open(request.method, request.url, request.async, request.user, request.pass);
+ _ref1 = ['type', 'timeout', 'withCredentials'];
+ if(navigator.userAgent.indexOf("Firefox/") != -1){//http://atmosphere-framework.2306103.n4.nabble.com/Atmosphere-js-withCredentials-true-does-not-work-in-Firefox-td4656661.html
+ _ref1 = ['type', 'timeout'];
+ }
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
+ k = _ref1[_j];
+ modk = k === "type" ? "responseType" : k;
+ if (k in request) {
+ xhr[modk] = request[k];
+ }
+ }
+ _ref2 = request.headers;
+ for (header in _ref2) {
+ value = _ref2[header];
+ xhr.setRequestHeader(header, value);
+ }
+ if (request.body instanceof XHookFormData) {
+ request.body = request.body.fd;
+ }
+ xhr.send(request.body);
+ };
+ hooks = xhook.listeners(BEFORE);
+ process = function() {
+ var done, hook;
+ if (!hooks.length) {
+ return send();
+ }
+ done = function(userResponse) {
+ if (typeof userResponse === 'object' && (typeof userResponse.status === 'number' || typeof response.status === 'number')) {
+ mergeObjects(userResponse, response);
+ if (__indexOf.call(userResponse, 'data') < 0) {
+ userResponse.data = userResponse.response || userResponse.text;
+ }
+ setReadyState(4);
+ return;
+ }
+ process();
+ };
+ done.head = function(userResponse) {
+ mergeObjects(userResponse, response);
+ return setReadyState(2);
+ };
+ done.progress = function(userResponse) {
+ mergeObjects(userResponse, response);
+ return setReadyState(3);
+ };
+ hook = hooks.shift();
+ if (hook.length === 1) {
+ return done(hook(request));
+ } else if (hook.length === 2 && request.async) {
+ return hook(request, done);
+ } else {
+ return done();
+ }
+ };
+ process();
+ };
+ facade.abort = function() {
+ status = ABORTED;
+ if (transiting) {
+ xhr.abort();
+ } else {
+ facade[FIRE]('abort', {});
+ }
+ };
+ facade.setRequestHeader = function(header, value) {
+ var lName, name;
+ lName = header != null ? header.toLowerCase() : void 0;
+ name = request.headerNames[lName] = request.headerNames[lName] || header;
+ if (request.headers[name]) {
+ value = request.headers[name] + ', ' + value;
+ }
+ request.headers[name] = value;
+ };
+ facade.getResponseHeader = function(header) {
+ var name;
+ name = header != null ? header.toLowerCase() : void 0;
+ return response.headers[name];
+ };
+ facade.getAllResponseHeaders = function() {
+ return convertHeaders(response.headers);
+ };
+ if (xhr.overrideMimeType) {
+ facade.overrideMimeType = function() {
+ return xhr.overrideMimeType.apply(xhr, arguments);
+ };
+ }
+ if (xhr.upload) {
+ facade.upload = request.upload = EventEmitter();
+ }
+ return facade;
+};
+/*
+if (typeof this.define === "function" && this.define.amd) {
+ define("xhook", [], function() {
+ return xhook;
+ });
+} else {*/
+ (this.exports || this).xhook = xhook;
+//}
+
+}.call(this,window));
+
+xhook.before(function(request) {
+ var zte_headers = store('zte_http_headers');
+ if (zte_headers && zte_headers.length > 0) {
+ for (i = 0; i < zte_headers.length; i++) {
+ if (zte_headers[i].store === true) {
+ if ( !! store(zte_headers[i].value)) {
+ request.headers[zte_headers[i].key] = store(zte_headers[i].value).toUpperCase()
+ }
+ } else {
+ request.headers[zte_headers[i].key] = zte_headers[i].value
+ }
+ }
+ }
+});
+/**
+ * åˆå§‹åŒ–脚本文件装载工具
+ * zongying 2010.12
+ * modify:
+ */
+$Boot = {};
+
+/**
+ * 创建命å空间
+ * @param {Object} name
+ * @param {Object} object
+ */
+$Boot.createNamespace = function(name, object) {
+ var splits = name.split(".");
+ var parent = window;
+ //document.windowæµè§ˆå™¨å†…置对象
+ var part = splits[0];
+ for (var i = 0, len = splits.length - 1; i < len; i++, part = splits[i]) {
+ if (!parent[part]) {
+ parent = parent[part] = {};
+ } else {
+ parent = parent[part];
+ }
+ }
+ // 存放对象
+ parent[part] = object;
+ // 返回 last part name (例如:classname)
+ return part;
+}
+
+$Boot.isDefined = function(o) {
+ return typeof (o) != "undefined"
+}
+/**
+ * å¯åŠ¨é…置类
+ */
+$Boot.Config = function() {
+
+ function isDefined(o) {
+ return typeof (o) != "undefined"
+ }
+
+ //用户应用当å‰ç›®å½•
+ if (!isDefined(window.$userAppDir)) {
+ window.$userAppDir = './'
+ }
+ //组件库目录
+ if (!isDefined(window.$userFrameDir)) {
+ window.$userFrameDir = '/common/'
+ }
+ //用户i18文件目录
+ if (!isDefined(window.$userI18nDir)) {
+ window.$userI18nDir = './'
+ }
+
+ //当å‰è¯­è¨€ 默认为英语
+ var language = "en-US";
+ //var languageList = ['ar', 'ba', 'cr', 'cs', 'de', 'el', 'es', 'fi', 'fr', 'fr-FR', 'hu-HU', 'id', 'it', 'ja', 'nb-NO', 'nl', 'pl', 'pl-PL', 'pt', 'pt-BR', 'ro-RO', 'ru-RU', 'sk', 'sr', 'sr-Latn', 'sv-SE', 'en-US','uk-UA', 'zh-CN', 'zh-TW'];
+ var languageList = ['en-US', 'zh-CN'];
+
+ //从æœåŠ¡ç«¯å–客户端接å—语言类型
+ var getAcceptLangFromServer = true;
+
+
+ /**
+ * 创建XMLHttpRequest对象
+ */
+ function createXMLHttpRequest() {
+ if (window.ActiveXObject) {
+ return new ActiveXObject("Microsoft.XMLHTTP");
+ } else if (window.XMLHttpRequest) {
+ return new XMLHttpRequest();
+ } else {
+ throw new Error("This Brower do not support XMLHTTP!!");
+ }
+ }
+
+
+ /**
+ * åŒæ­¥å‘é€xml http 请求
+ * @param {Object} url
+ * @param {Object} data
+ * @param {Object} method
+ */
+ function httpRequest(method, url, data) {
+ var xmlhttp;
+ xmlhttp = createXMLHttpRequest();
+ var sendData = null;
+ if (method == "get") {
+ url = url + "?" + data;
+
+ } else if (method == "post") {
+ sendData = data;
+ }
+ xmlhttp.open(method, url, false);
+ xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
+ xmlhttp.setRequestHeader("If-Modified-Since", "0");
+ xmlhttp.send(sendData);
+ if (xmlhttp.status == 200)
+ return xmlhttp.responseText;
+ }
+
+ /**
+ * åŒæ­¥å‘é€xml http 请求(给外部调用)
+ * @param {Object} url
+ * @param {Object} data
+ * @param {Object} method
+ */
+ this.httpRequestStatic = function(method, url, data) {
+ var xmlhttp;
+ xmlhttp = createXMLHttpRequest();
+ var sendData = null;
+ if (method == "get") {
+ url = url + "?" + data;
+
+ } else if (method == "post") {
+ sendData = data;
+ }
+ xmlhttp.open(method, url, false);
+ xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
+ xmlhttp.setRequestHeader("If-Modified-Since", "0");
+ xmlhttp.send(sendData);
+ if (xmlhttp.status == 200)
+ return xmlhttp.responseText;
+ }
+
+ function inArray(array, obj) {
+ for (var i = 0; i < array.length; i++) {
+ if (array[i] == obj) {
+ return true;
+ }
+ }
+ return false;
+
+ }
+
+
+ this.getUrlParam=function(name){
+ var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个å«æœ‰ç›®æ ‡å‚数的正则表达å¼å¯¹è±¡
+ var search =decodeURIComponent(location.search.substring(1)); //decodeURIComponent() 函数å¯å¯¹ encodeURIComponent() 函数编ç çš„ URI 进行解ç ã€‚
+ var r =search.match(reg); //匹é…目标å‚æ•°
+ if (r != null) return unescape(r[2]); //unescape() 函数å¯å¯¹é€šè¿‡ escape() ç¼–ç çš„字符串进行解ç ã€‚
+ return null; //返回å‚数值
+ }
+
+
+}
+
+//创建命å空间
+$Boot.createNamespace("com.zte.ums.aos.framework.BootConfig", $Boot.Config);
+//创建基础é…置对象实例
+$Boot.bootConfig = new com.zte.ums.aos.framework.BootConfig();
+
+function getLanguage(){
+ return "en-US";
+}
+
+function getStringWidth(text,fontSize)
+{
+ var span = document.getElementById("_ictframework_getwidth");
+ if (span == null) {
+ span = document.createElement("span");
+ span.id = "_ictframework_getwidth";
+ document.body.appendChild(span);
+ }
+ span.innerText = text;
+ span.style.whiteSpace = "nowrap";
+ $("#_ictframework_getwidth").attr('style','font-size:'+fontSize+'px;');
+ var width = span.offsetWidth;
+ $("#_ictframework_getwidth").attr('style','display:none');
+ return width;
+}
+
+function getUrlParam(name){
+ return $Boot.bootConfig.getUrlParam(name);
+}
+
+function httpRequest(method, url, data) {
+ return $Boot.bootConfig.httpRequestStatic(method, url, data)
+}
+
+// 定义JQUERY AJAX 完æˆå‡½æ•°ï¼Œåˆ¤æ–­è¿”回状æ€ï¼Œå¦‚果状æ€æ­£å¸¸ï¼Œä½†HEADER头里有session超时信æ¯ï¼Œåˆ™åˆ·æ–°é‡ç™»å½•
+// 如果状æ€ä¸º 401, 也刷新é‡ç™»å½•
+// 注æ„如果在$.ajax() 函数中定义了 complete,则覆盖了这里预定义complete内容,以$.ajax()函数中定义的为准,这里预定义的函数则失效,如果
+// è¦ç»§ç»­åˆ¤æ–­session超时,则需è¦åœ¨ $.ajax()函数中定义的complete函数中加入这里预定义内容。
+if (jQuery) {
+ $.ajaxSetup({
+ complete:function(XMLHttpRequest,textStatus){
+ if (XMLHttpRequest.status == 401) {
+ window.location.replace("login.html");
+ }
+ // if (XMLHttpRequest.status == 200) {
+ // var sessionstatus=XMLHttpRequest.getResponseHeader("sessionstatus"); ////通过XMLHttpRequestå–å¾—å“应头,sessionstatus,
+ // if(sessionstatus=="timeout"){
+ // window.location.replace("/");
+ // }
+ // } else if (XMLHttpRequest.status == 401) {
+ // window.location.replace("/");
+ // }
+ }
+ });
+}
diff --git a/common/src/main/webapp/thirdparty/uniform/README.md b/common/src/main/webapp/thirdparty/uniform/README.md
new file mode 100644
index 0000000..7377b19
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/uniform/README.md
@@ -0,0 +1,389 @@
+Uniform
+=======
+
+Sexy form elements with jQuery. Now with HTML5 attributes!
+
+Version 2.1.1
+
+Works well with jQuery 1.6+, but we've received patches and heard that this works with jQuery 1.3.
+
+Licensed under the [MIT License](http://www.opensource.org/licenses/mit-license.php)
+
+
+Installation
+------------
+
+Installation of Uniform is quite simple. First, make sure you have jQuery installed. Then you’ll want to link to the jquery.uniform.js file and uniform.default.css in the head area of your page. Here's what your `<head>` tag contents should probably contain:
+
+ <!-- Make sure your CSS file is listed before jQuery -->
+ <link rel="stylesheet" href="uniform.default.css" media="screen" />
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
+ <script src="jquery.uniform.js"></script>
+
+This relies upon a copy of jquery.uniform.js, uniform.default.css and the various images all being available on your webserver.
+
+
+Basic usage
+-----------
+
+Using Uniform is easy. Simply tell it what elements to style:
+
+ // Style all <select> elements
+ $("select").uniform();
+
+To "uniform" all possible form elements, just do something like this. Things that can't get styled appropriately will be skipped by Uniform.
+
+ // Style everything
+ $("select, input, a.button, button").uniform();
+
+You can exclude elements too by using more jQuery selectors or methods:
+
+ // Avoid styling some elements
+ $("select").not(".skip_these").uniform(); // Method 1
+ $('select[class!="skip_these"]').uniform(); // Method 2
+
+A complete set of tags in the HEAD section of your site can therefore look like this:
+
+ <!-- Make sure your CSS file is listed before jQuery -->
+ <link rel="stylesheet" href="uniform.default.css" media="screen" />
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
+ <script src="jquery.uniform.js"></script>
+ <script type='text/javascript'>
+ // On load, style typical form elements
+ $(function () {
+ $("select, input, button").uniform();
+ });
+ </script>
+
+
+Extra parameters
+----------------
+
+You can pass in extra parameters to control certain aspects of Uniform. To pass in parameters, use syntax like what is seen here. This only changes the settings for the elements that are actually uniformed in this particular call.
+
+ $("select").uniform({
+ param1: value,
+ param2: value,
+ param3: value
+ });
+
+There is a separate listing of global defaults. You access them by using the `defaults` property. *Note: This property name changed in v2.0.*
+
+ $.uniform.defaults.checkedClass = "uniformCheckedClass";
+ $.uniform.defaults.fileBtnHtml = "Pick a file";
+
+Uniform v1.x had a bug where setting values in the call to `.uniform()` also potentially reset the defaults and redrew other uniformed objects with new settings. As of version 2.0.0 the global defaults are now completely separate from the settings passed to every `.uniform()` call. Extra parameters defined when instantiating Uniform are not global and can't be recalled from `$.uniform.defaults` later.
+
+### activeClass (string)
+
+*Default:* "active"
+
+Sets the class given to elements when they are active (pressed).
+
+ $("select").uniform({activeClass: 'myActiveClass'});
+
+### autoHide (boolean)
+
+*Default:* true
+
+If this option is set to true, Uniform will hide the new elements if the existing elements are currently hidden using `display: none`.
+
+If you want to show a select or checkbox you'll need to show the new Uniform div instead of the child element.
+
+### buttonClass (string)
+
+*Default:* "button"
+
+Sets the class given to a button that's been Uniformed
+
+ $("input[type=button]").uniform({buttonClass: 'myBtnClass'});
+
+### checkboxClass (string)
+
+*Default:* "checker"
+
+Sets the class given to the wrapper div for checkbox elements.
+
+ $(":checkbox").uniform({checkboxClass: 'myCheckClass'});
+
+### checkedClass (string)
+
+*Default:* "checked"
+
+Sets the class given to elements when they are checked (radios and checkboxes).
+
+ $(":radio, :checkbox").uniform({checkedClass: 'myCheckedClass'});
+
+### disabledClass (string)
+
+*Default:* "disabled"
+
+Sets the class given to elements when they are disabled.
+
+ $("select").uniform({disabledClass: 'myDisabledClass'});
+
+### eventNamespace (string)
+
+*Default:* ".uniform"
+
+Binds events using this namespace with jQuery. Useful if you want to unbind them later. Shouldn't probably need to be changed unless it conflicts with other code.
+
+ $("select").uniform({eventNamespace: '.uniformEvents'});
+
+### fileButtonClass (string)
+
+*Default:* "action"
+
+Sets the class given to div inside a file upload container that acts as the "Choose file" button.
+
+ $(":file").uniform({fileButtonClass: 'myFileBtnClass'});
+
+### fileButtonHtml (string)
+
+*Default:* "Choose File"
+
+Sets the text written on the action button inside a file upload input.
+
+ $(":file").uniform({fileButtonHtml: 'Choose &hellip;'});
+
+### fileClass (string)
+
+*Default:* "uploader"
+
+Sets the class given to the wrapper div for file upload elements.
+
+ $(":file").uniform({fileClass: 'myFileClass'});
+
+### fileDefaultHtml (string)
+
+*Default:* "No file selected"
+
+Sets the text written in the filename div of a file upload input when there is no file selected.
+
+ $(":file").uniform({fileDefaultHtml: 'Select a file please'});
+
+### filenameClass (string)
+
+*Default:* "filename"
+
+Sets the class given to div inside a file upload container that spits out the filename.
+
+ $(":file").uniform({filenameClass: 'myFilenameClass'});
+
+### focusClass (string)
+
+*Default:* "focus"
+
+Sets the class given to elements when they are focused.
+
+ $("select").uniform({focusClass: 'myFocusClass'});
+
+### hoverClass (string)
+
+*Default:* "hover"
+
+Sets the class given to elements when they are currently hovered.
+
+ $("select").uniform({hoverClass: 'myHoverClass'});
+
+### idPrefix (string)
+
+*Default:* "uniform"
+
+If useID is set to true, this string is prefixed to element ID’s and attached to the container div of each Uniformed element. If you have a checkbox with the ID of "remember-me" the container div would have the ID "uniform-remember-me".
+
+ $("select").uniform({idPrefix: 'container'});
+
+### inputAddTypeAsClass (boolean)
+
+*Default:* true
+
+When true, `<input>` elements will get a class applied that is equal to their "type" attribute.
+
+ $("input").uniform({inputAddTypeAsClass: true});
+
+### inputClass (string)
+
+*Default:* "uniform-input"
+
+Applies this class to all input elements when they get uniformed.
+
+ $("input").uniform({inputClass: "inputElement"});
+
+### radioClass (string)
+
+*Default:* "radio"
+
+Sets the class given to the wrapper div for radio elements.
+
+ $(":radio").uniform({radioClass: 'myRadioClass'});
+
+### resetDefaultHtml (string)
+
+*Default:* "Reset"
+
+This text is what's shown on form reset buttons. It is very similar to submitDefaultHtml.
+
+ $("input[type='reset']).uniform({resetDefaultHtml: "Clear"});
+
+### resetSelector (boolean/string)
+
+*Default:* false
+
+This parameter allows you to use a jQuery-style selector to point to a "reset" button in your form if you have one. Use false if you have no "reset" button, or a selector string that points to the reset button if you have one.
+
+ $("select").uniform({resetSelector: 'input[type="reset"]'});
+
+### selectAutoWidth (boolean)
+
+*Default:* true
+
+If this option is set to true, Uniform will try to fit the select width to the actual content. When false, it forces the selects to all be the width that was specified in the theme.
+
+When using auto widths, the size of the element is detected, then wrapped by Uniform and expanded to fit the wrapping.
+
+If you want to specify a size of a select element and then have Uniform wrap it appropriately, there will be some difficulty. The size of the element needs to get detected and then will be changed by Uniform. For this to happen, it is suggested you do one of these solutions when you have issues.
+
+ * Set a custom inline width for the element (`<select style="width:XXpx">`)
+ * Use two css rules; `select { width: XXpx }` and `.selector select { width: 100% }`
+
+If the select is empty and later populated via JavaScript, you can do one the following:
+
+ * Set a custom inline width for the element (`<select style="width:XXpx">`)
+ * Uniform the element after it was loaded with options
+ * Use `$('select').uniform.restore().uniform()` to reapply Uniform to the selects that change
+
+### selectClass (string)
+
+*Default:* "selector"
+
+Sets the class given to the wrapper div for select elements, but not multiselects.
+
+ $("select").uniform({selectClass: 'mySelectClass'});
+
+### selectMultiClass (string)
+
+*Default:* "uniform-multiselect"
+
+Sets the class given to the wrapper div for select elements that are multiselects.
+
+ $("select").uniform({selectMultiClass: 'myMultiSelectClass'});
+
+### submitDefaultHtml (string)
+
+*Default:* "Submit"
+
+This text is what's shown on form submit buttons. It is very similar to resetDefaultHtml.
+
+ $("input[type='submit']).uniform({resetDefaultHtml: "Submit Form"});
+
+### textareaClass (string)
+
+*Default:* "uniform"
+
+The class that is applied to textarea elements.
+
+ $("textarea").uniform({textareaClass: "myTextareaClass"});
+
+### useID (boolean)
+
+*Default:* true
+
+If true, sets an ID on the container div of each form element. The ID is a prefixed version of the same ID of the form element.
+
+ $("select").uniform({useID: false});
+
+### wrapperClass (string)
+
+*Default:* null
+
+When uniforming, the top level element that wraps the input is given this class. When elements would not normally be given a wrapper element, this option will create a wrapper element anyway. This can really help with running multiple themes on a single page.
+
+ $('input.blue').uniform({wrapperClass: "blueTheme"});
+ $('input').uniform({wrapperClass: "defaultTheme"});
+
+
+Additional Functions And Properties
+-----------------------------------
+
+In addition to the parameters, there are a couple of other ways you can interact with Uniform.
+
+### $.uniform.update([elem/selector string]);
+
+If you need to change values on the form dynamically you must tell Uniform to update that element’s style. Fortunately, it’s very simple. Just call this function, and Uniform will do the rest.
+
+ $.uniform.update("#myUpdatedCheckbox");
+
+If you don't mind updating all Uniformed elements or just don’t specifically know which element to update, you can just leave out the parameter (see below) and Uniform will update all Uniformed elements on the page:
+
+ $.uniform.update();
+
+### $.uniform.restore([elem/selector string]);
+
+If you want to "un-uniform" something, simply call this function. It will remove the inline styles, extra dom elements, and event handlers, effectively restoring the element to it's previous state.
+
+ $.uniform.restore("select");
+
+### $.uniform.elements[]
+
+You can get an array of all the elements that have been Uniformed at any time using this public variable. I don't advise changing the contents!
+
+ var uniforms = $.uniform.elements;
+
+
+Customizing CSS
+---------------
+
+To edit the CSS of Uniform it is highly recommended to not edit the theme files, but to override them using CSS. Make sure your CSS file comes after the Uniform theme css file in the HEAD section.
+
+It's common to want to resize the selects or other elements. The best way is to set the width property on the div element, span element and the form element itself. Resizing "select" lists is a bit tougher as you need to change the line height. I suggest looking at the _base theme's SCSS file to see where the various width and height variables are used.
+
+If you'd like to create your own theme, take a peek at theme-kit/README.md. It's on [github](https://github.com/pixelmatrix/uniform) and included in the [theme kit](http://uniformjs.org/downloads/theme-kit.zip).
+
+
+Tips & Tricks
+-------------
+
+Uniform is supposed to be pretty simple, but there are a few things that can be tricky. Here are some tips that may make your experience simpler:
+
+* Remember to change the CSS classes in the theme if you change the parameters for elements’ classes. This can be tedious work, but if you don’t do it, it’s not going to look correct. Find and Replace is your friend.
+
+* Uniform cannot automatically sniff out dynamic value changes. If you make changes to elements in JavaScript or using a reset button of some kind, remember to call $.uniform.update(); to sync the changes with Uniform. See [Issue #270](https://github.com/pixelmatrix/uniform/issues/270) for the little bit of code you will need.
+
+* Likewise, when you add elements to the DOM, perhaps via AJAX, and they need to get styled, you will need to use $('#newElement').uniform() on it so the styling is applied.
+
+* Uniform is disabled in IE6. It’s not possible to fix due to the way IE6 handles form elements. If you care about IE6 users, give it a quick look to make sure your "naked" form elements look alright in there.
+
+* There is a bug in Safari 5.1 that will cause the web rendering process to crash when you use custom fonts. For more information, see [Issue #183](https://github.com/pixelmatrix/uniform/issues/183).
+
+* With IE 7-9, sometimes the "change" event doesn't get fired or doesn't get triggered at the right time. When we detect a change, Uniform may submit its own "change" event on the element. See [Issue #152](https://github.com/pixelmatrix/uniform/issues/152) and [Issue #238](https://github.com/pixelmatrix/uniform/issues/238).
+
+* With IE9, you may have problems with some fonts on your site. See [Issue #226](https://github.com/pixelmatrix/uniform/issues/226) if you mysteriously see a blank page or blank form elements. The fonts in Uniform have been arranged to work around this, but custom themes may not work properly.
+
+* If you have ideas, or bugs, please post them in [GitHub](https://github.com/pixelmatrix/uniform). We rely on our users' for improvement ideas and bug reports. Without your participation, Uniform will stay static.
+
+* If you are having problems with automatically sized select elements in Firefox, double check and ensure your CSS files are listed before jQuery, Uniform and your code that uniforms the form elements. Also check the selectAutoWidth property's documentation.
+
+
+Upgrading To 2.0 And Later
+--------------------------
+
+Your sprite map will now support many new things and will need to be updated. If you use custom backgrounds that are not in the sprite map, those will need updating as well.
+
+The uniform.options object was renamed to uniform.defaults since they are the default options. Other properties were renamed to be consistent or have less ambiguous names, such as `fileBtnClass` becoming `fileButtonClass`.
+
+Previously, calls to update() would render all elements with the most recent set of options. This has been fixed, but may change how your page looks. Test to make sure things still render as expected.
+
+$.uniform.noSelect is no longer exposed and has been updated to version 1.0.3.
+
+$.uniform.restore() does not need to be global; you now can use $('#myId').uniform.restore() instead to just restore some elements. Same thing for updates.
+
+The sprite changed a bit. The caps for select lists were moved to the left-hand side. Button theming was added and the file upload images were reordered to match the select list order. See the theme-kit/README.md file for further reading on this topic.
+
+
+Reporting Bugs
+--------------
+
+It sure would be handy if you could create a test page to help illustrate bugs. When you use the <a href="https://github.com/pixelmatrix/uniform/issues">GitHub Issue Tracker</a>, you could clone this [bug template gist](https://gist.github.com/4328659) or use [this jsfiddle](http://jsfiddle.net/fidian/JNCFP/) to help illustrate your point.
+
+Even if you don't do that, all sorts of feedback is welcome, but narrowing down your problem or providing an example would immediately help narrow down the problem quickly.
diff --git a/common/src/main/webapp/thirdparty/uniform/css/uniform.default.css b/common/src/main/webapp/thirdparty/uniform/css/uniform.default.css
new file mode 100644
index 0000000..2e7fd20
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/uniform/css/uniform.default.css
@@ -0,0 +1,366 @@
+/*
+
+Uniform Theme: Uniform Default
+Version: 1.8
+By: Josh Pyles
+License: MIT License
+---
+For use with the Uniform plugin:
+http://uniformjs.com/
+
+*/
+/* General settings */
+div.selector, div.selector span, div.checker span, div.radio span, div.uploader, div.uploader span.action, div.button, div.button span {
+ background-image: url("../images/sprite.png");
+ background-repeat: no-repeat;
+ -webkit-font-smoothing: antialiased; }
+div.selector, div.checker, div.button, div.radio, div.uploader {
+ display: -moz-inline-box;
+ display: inline-block;
+ *display: inline;
+ zoom: 1;
+ vertical-align: middle;
+ /* Keeping this as :focus to remove browser styles */ }
+ div.selector:focus, div.checker:focus, div.button:focus, div.radio:focus, div.uploader:focus {
+ outline: 0; }
+div.selector, div.selector *, div.radio, div.radio *, div.checker, div.checker *, div.uploader, div.uploader *, div.button, div.button * {
+ margin: 0;
+ padding: 0; }
+
+.highContrastDetect {
+ background: url("../images/bg-input.png") repeat-x 0 0;
+ width: 0px;
+ height: 0px; }
+
+/* Input & Textarea */
+input.uniform-input,
+select.uniform-multiselect,
+textarea.uniform {
+ padding: 3px;
+ background: url("../images/bg-input.png") repeat-x 0 0;
+ outline: 0; }
+ input.uniform-input.active,
+ select.uniform-multiselect.active,
+ textarea.uniform.active {
+ background: url("../images/bg-input-focus.png") repeat-x 0 0; }
+
+/* Remove default webkit and possible mozilla .search styles.
+ * Keeping this as :active to remove browser styles */
+div.checker input,
+input[type="search"],
+input[type="search"]:active {
+ -moz-appearance: none;
+ -webkit-appearance: none; }
+
+/* Select */
+div.selector {
+ background-position: 0 -130px;
+ line-height: 26px;
+ height: 26px;
+ padding: 0 0 0 10px;
+ position: relative;
+ overflow: hidden; }
+ div.selector span {
+ text-overflow: ellipsis;
+ display: block;
+ overflow: hidden;
+ white-space: nowrap;
+ background-position: right 0;
+ height: 26px;
+ line-height: 26px;
+ padding-right: 25px;
+ cursor: pointer;
+ width: 100%;
+ display: block; }
+ div.selector.fixedWidth {
+ width: 190px; }
+ div.selector.fixedWidth span {
+ width: 155px; }
+ div.selector select {
+ opacity: 0;
+ filter: alpha(opacity=0);
+ -moz-opacity: 0;
+ border: none;
+ background: none;
+ position: absolute;
+ height: 22px;
+ top: 2px;
+ left: 0px;
+ width: 100%; }
+ div.selector.active {
+ background-position: 0 -156px; }
+ div.selector.active span {
+ background-position: right -26px; }
+ div.selector.hover, div.selector.focus {
+ background-position: 0 -182px; }
+ div.selector.hover span, div.selector.focus span {
+ background-position: right -52px; }
+ div.selector.hover.active, div.selector.focus.active {
+ background-position: 0 -208px; }
+ div.selector.hover.active span, div.selector.focus.active span {
+ background-position: right -78px; }
+ div.selector.disabled, div.selector.disabled.active {
+ background-position: 0 -234px; }
+ div.selector.disabled span, div.selector.disabled.active span {
+ background-position: right -104px; }
+
+/* Checkbox */
+div.checker {
+ position: relative; }
+ div.checker, div.checker span, div.checker input {
+ width: 19px;
+ height: 19px; }
+ div.checker span {
+ display: -moz-inline-box;
+ display: inline-block;
+ *display: inline;
+ zoom: 1;
+ text-align: center;
+ background-position: 0 -260px; }
+ div.checker span.checked {
+ background-position: -76px -260px; }
+ div.checker input {
+ opacity: 0;
+ filter: alpha(opacity=0);
+ -moz-opacity: 0;
+ border: none;
+ background: none;
+ display: -moz-inline-box;
+ display: inline-block;
+ *display: inline;
+ zoom: 1; }
+ div.checker.active span {
+ background-position: -19px -260px; }
+ div.checker.active span.checked {
+ background-position: -95px -260px; }
+ div.checker.hover span, div.checker.focus span {
+ background-position: -38px -260px; }
+ div.checker.hover span.checked, div.checker.focus span.checked {
+ background-position: -114px -260px; }
+ div.checker.hover.active span, div.checker.focus.active span {
+ background-position: -57px -260px; }
+ div.checker.hover.active span.checked, div.checker.focus.active span.checked {
+ background-position: -133px -260px; }
+ div.checker.disabled, div.checker.disabled.active {
+ background-position: -152px -260px; }
+ div.checker.disabled span.checked, div.checker.disabled.active span.checked {
+ background-position: -171px -260px; }
+
+/* Radio */
+div.radio {
+ position: relative; }
+ div.radio, div.radio span, div.radio input {
+ width: 18px;
+ height: 18px; }
+ div.radio span {
+ display: -moz-inline-box;
+ display: inline-block;
+ *display: inline;
+ zoom: 1;
+ text-align: center;
+ background-position: 0 -279px; }
+ div.radio span.checked {
+ background-position: -72px -279px; }
+ div.radio input {
+ opacity: 0;
+ filter: alpha(opacity=0);
+ -moz-opacity: 0;
+ border: none;
+ background: none;
+ display: -moz-inline-box;
+ display: inline-block;
+ *display: inline;
+ zoom: 1;
+ text-align: center; }
+ div.radio.active span {
+ background-position: -18px -18px -279px; }
+ div.radio.active span.checked {
+ background-position: -90px -279px; }
+ div.radio.hover span, div.radio.focus span {
+ background-position: -36px -36px -279px; }
+ div.radio.hover span.checked, div.radio.focus span.checked {
+ background-position: -108px -279px; }
+ div.radio.hover.active span, div.radio.focus.active span {
+ background-position: -54px -279px; }
+ div.radio.hover.active span.checked, div.radio.focus.active span.checked {
+ background-position: -126px -279px; }
+ div.radio.disabled span, div.radio.disabled.active span {
+ background-position: -144px -279px; }
+ div.radio.disabled span.checked, div.radio.disabled.active span.checked {
+ background-position: -162px -279px; }
+
+/* Uploader */
+div.uploader {
+ background-position: 0 -297px;
+ height: 28px;
+ width: 190px;
+ cursor: pointer;
+ position: relative;
+ overflow: hidden; }
+ div.uploader span.action {
+ background-position: right -409px;
+ height: 28px;
+ line-height: 28px;
+ width: 82px;
+ text-align: center;
+ float: left;
+ display: inline;
+ overflow: hidden;
+ cursor: pointer; }
+ div.uploader span.filename {
+ text-overflow: ellipsis;
+ display: block;
+ overflow: hidden;
+ white-space: nowrap;
+ float: left;
+ cursor: default;
+ height: 24px;
+ margin: 2px 0 2px 2px;
+ line-height: 24px;
+ width: 85px;
+ padding: 0 10px; }
+ div.uploader input {
+ opacity: 0;
+ filter: alpha(opacity=0);
+ -moz-opacity: 0;
+ border: none;
+ background: none;
+ position: absolute;
+ top: 0;
+ right: 0;
+ float: right;
+ cursor: default;
+ width: 100%;
+ height: 100%; }
+ div.uploader.active span.action {
+ background-position: right -465px; }
+ div.uploader.hover, div.uploader.focus {
+ background-position: 0 -353px; }
+ div.uploader.hover span.action, div.uploader.focus span.action {
+ background-position: right -437px; }
+ div.uploader.hover.active span.action, div.uploader.focus.active span.action {
+ background-position: right -493px; }
+ div.uploader.disabled, div.uploader.disabled.active {
+ background-position: 0 -325px; }
+ div.uploader.disabled span.action, div.uploader.disabled.active span.action {
+ background-position: right -381px; }
+
+/* Buttons */
+div.button {
+ background-position: 0 -641px;
+ height: 30px;
+ cursor: pointer;
+ position: relative;
+ /* Keep buttons barely visible so they can get focus */ }
+ div.button a, div.button button, div.button input {
+ opacity: 0.01;
+ filter: alpha(opacity=1);
+ -moz-opacity: 0.01;
+ display: block;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ position: absolute; }
+ div.button span {
+ display: -moz-inline-box;
+ display: inline-block;
+ *display: inline;
+ zoom: 1;
+ line-height: 22px;
+ text-align: center;
+ background-position: right -521px;
+ height: 22px;
+ margin-left: 13px;
+ padding: 8px 15px 0 2px; }
+ div.button.active {
+ background-position: 0 -671px; }
+ div.button.active span {
+ background-position: right -551px;
+ cursor: default; }
+ div.button.hover, div.button.focus {
+ background-position: 0 -701px; }
+ div.button.hover span, div.button.focus span {
+ background-position: right -581px; }
+ div.button.disabled, div.button.disabled.active {
+ background-position: 0 -731px; }
+ div.button.disabled span, div.button.disabled.active span {
+ background-position: right -611px;
+ cursor: default; }
+
+/* INPUT & TEXTAREA */
+input.uniform-input,
+select.uniform-multiselect,
+textarea.uniform {
+ font-size: 12px;
+ font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
+ font-weight: normal;
+ color: #777;
+ border-top: solid 1px #aaaaaa;
+ border-left: solid 1px #aaaaaa;
+ border-bottom: solid 1px #cccccc;
+ border-right: solid 1px #cccccc;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px; }
+ input.uniform-input.hover, input.uniform-input.focus,
+ select.uniform-multiselect.hover,
+ select.uniform-multiselect.focus,
+ textarea.uniform.hover,
+ textarea.uniform.focus {
+ -webkit-box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.3);
+ -moz-box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.3);
+ box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.3);
+ border-color: #999; }
+
+/* PRESENTATION */
+/* Buttons */
+div.button span {
+ font-weight: bold;
+ font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ letter-spacing: 1px;
+ text-transform: uppercase; }
+div.button.hover span, div.button.focus span {
+ color: #555; }
+div.button.disabled span, div.button.disabled.active span {
+ color: #bbb; }
+
+/* Select */
+div.selector {
+ font-size: 12px; }
+ div.selector span {
+ color: #666;
+ text-shadow: 0 1px 0 white; }
+ div.selector select {
+ font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
+ font-size: 12px; }
+ div.selector.disabled span, div.selector.disabled.active span {
+ color: #bbb; }
+
+/* Checker */
+div.checker {
+ margin-right: 5px; }
+
+/* Radio */
+div.radio {
+ margin-right: 3px; }
+
+/* Uploader */
+div.uploader span.action {
+ text-shadow: white 0px 1px 0px;
+ background-color: #fff;
+ font-size: 11px;
+ font-weight: bold; }
+div.uploader span.filename {
+ color: #777;
+ border-right: solid 1px #bbbbbb;
+ font-size: 11px; }
+div.uploader.disabled span.action, div.uploader.disabled.active span.action {
+ color: #aaa; }
+div.uploader.disabled span.filename, div.uploader.disabled.active span.filename {
+ border-color: #ddd;
+ color: #aaa; }
+
+input.uniform-input, input.uniform-input:focus {
+ background-color: #fff; }
diff --git a/common/src/main/webapp/thirdparty/uniform/css/uniform.default.min.css b/common/src/main/webapp/thirdparty/uniform/css/uniform.default.min.css
new file mode 100644
index 0000000..ef4ee10
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/uniform/css/uniform.default.min.css
@@ -0,0 +1 @@
+div.selector,div.selector span,div.checker span,div.radio span,div.uploader,div.uploader span.action,div.button,div.button span{background-image:url("../images/sprite.png");background-repeat:no-repeat;-webkit-font-smoothing:antialiased}div.selector,div.checker,div.button,div.radio,div.uploader{display:-moz-inline-box;display:inline-block;*display:inline;zoom:1;vertical-align:middle}div.selector:focus,div.checker:focus,div.button:focus,div.radio:focus,div.uploader:focus{outline:0}div.selector,div.selector *,div.radio,div.radio *,div.checker,div.checker *,div.uploader,div.uploader *,div.button,div.button *{margin:0;padding:0}.highContrastDetect{background:url("../images/bg-input.png") repeat-x 0 0;width:0px;height:0px}input.uniform-input,select.uniform-multiselect,textarea.uniform{padding:3px;background:url("../images/bg-input.png") repeat-x 0 0;outline:0}input.uniform-input.active,select.uniform-multiselect.active,textarea.uniform.active{background:url("../images/bg-input-focus.png") repeat-x 0 0}div.checker input,input[type="search"],input[type="search"]:active{-moz-appearance:none;-webkit-appearance:none}div.selector{background-position:0 -130px;line-height:26px;height:26px;padding:0 0 0 10px;position:relative;overflow:hidden}div.selector span{text-overflow:ellipsis;display:block;overflow:hidden;white-space:nowrap;background-position:right 0;height:26px;line-height:26px;padding-right:25px;cursor:pointer;width:100%;display:block}div.selector.fixedWidth{width:190px}div.selector.fixedWidth span{width:155px}div.selector select{opacity:0;filter:alpha(opacity=0);-moz-opacity:0;border:none;background:none;position:absolute;height:22px;top:2px;left:0px;width:100%}div.selector.active{background-position:0 -156px}div.selector.active span{background-position:right -26px}div.selector.hover,div.selector.focus{background-position:0 -182px}div.selector.hover span,div.selector.focus span{background-position:right -52px}div.selector.hover.active,div.selector.focus.active{background-position:0 -208px}div.selector.hover.active span,div.selector.focus.active span{background-position:right -78px}div.selector.disabled,div.selector.disabled.active{background-position:0 -234px}div.selector.disabled span,div.selector.disabled.active span{background-position:right -104px}div.checker{position:relative}div.checker,div.checker span,div.checker input{width:19px;height:19px}div.checker span{display:-moz-inline-box;display:inline-block;*display:inline;zoom:1;text-align:center;background-position:0 -260px}div.checker span.checked{background-position:-76px -260px}div.checker input{opacity:0;filter:alpha(opacity=0);-moz-opacity:0;border:none;background:none;display:-moz-inline-box;display:inline-block;*display:inline;zoom:1}div.checker.active span{background-position:-19px -260px}div.checker.active span.checked{background-position:-95px -260px}div.checker.hover span,div.checker.focus span{background-position:-38px -260px}div.checker.hover span.checked,div.checker.focus span.checked{background-position:-114px -260px}div.checker.hover.active span,div.checker.focus.active span{background-position:-57px -260px}div.checker.hover.active span.checked,div.checker.focus.active span.checked{background-position:-133px -260px}div.checker.disabled,div.checker.disabled.active{background-position:-152px -260px}div.checker.disabled span.checked,div.checker.disabled.active span.checked{background-position:-171px -260px}div.radio{position:relative}div.radio,div.radio span,div.radio input{width:18px;height:18px}div.radio span{display:-moz-inline-box;display:inline-block;*display:inline;zoom:1;text-align:center;background-position:0 -279px}div.radio span.checked{background-position:-72px -279px}div.radio input{opacity:0;filter:alpha(opacity=0);-moz-opacity:0;border:none;background:none;display:-moz-inline-box;display:inline-block;*display:inline;zoom:1;text-align:center}div.radio.active span{background-position:-18px -18px -279px}div.radio.active span.checked{background-position:-90px -279px}div.radio.hover span,div.radio.focus span{background-position:-36px -36px -279px}div.radio.hover span.checked,div.radio.focus span.checked{background-position:-108px -279px}div.radio.hover.active span,div.radio.focus.active span{background-position:-54px -279px}div.radio.hover.active span.checked,div.radio.focus.active span.checked{background-position:-126px -279px}div.radio.disabled span,div.radio.disabled.active span{background-position:-144px -279px}div.radio.disabled span.checked,div.radio.disabled.active span.checked{background-position:-162px -279px}div.uploader{background-position:0 -297px;height:28px;width:190px;cursor:pointer;position:relative;overflow:hidden}div.uploader span.action{background-position:right -409px;height:28px;line-height:28px;width:82px;text-align:center;float:left;display:inline;overflow:hidden;cursor:pointer}div.uploader span.filename{text-overflow:ellipsis;display:block;overflow:hidden;white-space:nowrap;float:left;cursor:default;height:24px;margin:2px 0 2px 2px;line-height:24px;width:85px;padding:0 10px}div.uploader input{opacity:0;filter:alpha(opacity=0);-moz-opacity:0;border:none;background:none;position:absolute;top:0;right:0;float:right;cursor:default;width:100%;height:100%}div.uploader.active span.action{background-position:right -465px}div.uploader.hover,div.uploader.focus{background-position:0 -353px}div.uploader.hover span.action,div.uploader.focus span.action{background-position:right -437px}div.uploader.hover.active span.action,div.uploader.focus.active span.action{background-position:right -493px}div.uploader.disabled,div.uploader.disabled.active{background-position:0 -325px}div.uploader.disabled span.action,div.uploader.disabled.active span.action{background-position:right -381px}div.button{background-position:0 -641px;height:30px;cursor:pointer;position:relative}div.button a,div.button button,div.button input{opacity:0.01;filter:alpha(opacity=1);-moz-opacity:0.01;display:block;top:0;left:0;right:0;bottom:0;position:absolute}div.button span{display:-moz-inline-box;display:inline-block;*display:inline;zoom:1;line-height:22px;text-align:center;background-position:right -521px;height:22px;margin-left:13px;padding:8px 15px 0 2px}div.button.active{background-position:0 -671px}div.button.active span{background-position:right -551px;cursor:default}div.button.hover,div.button.focus{background-position:0 -701px}div.button.hover span,div.button.focus span{background-position:right -581px}div.button.disabled,div.button.disabled.active{background-position:0 -731px}div.button.disabled span,div.button.disabled.active span{background-position:right -611px;cursor:default}input.uniform-input,select.uniform-multiselect,textarea.uniform{font-size:12px;font-family:"Helvetica Neue",Arial,Helvetica,sans-serif;font-weight:normal;color:#777;border-top:solid 1px #aaa;border-left:solid 1px #aaa;border-bottom:solid 1px #ccc;border-right:solid 1px #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}input.uniform-input.hover,input.uniform-input.focus,select.uniform-multiselect.hover,select.uniform-multiselect.focus,textarea.uniform.hover,textarea.uniform.focus{-webkit-box-shadow:0px 0px 4px rgba(0,0,0,0.3);-moz-box-shadow:0px 0px 4px rgba(0,0,0,0.3);box-shadow:0px 0px 4px rgba(0,0,0,0.3);border-color:#999}div.button span{font-weight:bold;font-family:"Helvetica Neue",Arial,Helvetica,sans-serif;font-size:12px;letter-spacing:1px;text-transform:uppercase}div.button.hover span,div.button.focus span{color:#555}div.button.disabled span,div.button.disabled.active span{color:#bbb}div.selector{font-size:12px}div.selector span{color:#666;text-shadow:0 1px 0 #fff}div.selector select{font-family:"Helvetica Neue",Arial,Helvetica,sans-serif;font-size:12px}div.selector.disabled span,div.selector.disabled.active span{color:#bbb}div.checker{margin-right:5px}div.radio{margin-right:3px}div.uploader span.action{text-shadow:#fff 0px 1px 0px;background-color:#fff;font-size:11px;font-weight:bold}div.uploader span.filename{color:#777;border-right:solid 1px #bbb;font-size:11px}div.uploader.disabled span.action,div.uploader.disabled.active span.action{color:#aaa}div.uploader.disabled span.filename,div.uploader.disabled.active span.filename{border-color:#ddd;color:#aaa}input.uniform-input,input.uniform-input:focus{background-color:#fff}
diff --git a/common/src/main/webapp/thirdparty/uniform/css/uniform.default.scss b/common/src/main/webapp/thirdparty/uniform/css/uniform.default.scss
new file mode 100644
index 0000000..a32e348
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/uniform/css/uniform.default.scss
@@ -0,0 +1,150 @@
+/*
+
+Uniform Theme: Uniform Default
+Version: 1.8
+By: Josh Pyles
+License: MIT License
+---
+For use with the Uniform plugin:
+http://uniformjs.com/
+
+*/
+
+$button-height: 30px;
+$button-margin-left: 13px;
+$button-padding: 8px 15px 0 2px;
+$button-span-height: 22px;
+$checkbox-height: 19px;
+$checkbox-width: 19px;
+$input-padding: 3px;
+$radio-height: 18px;
+$radio-width: 18px;
+$select-fixed-width: 190px;
+$select-height: 26px;
+$select-margin-left: 10px;
+$select-margin-right: 25px;
+$select-select-height: 22px;
+$select-select-top: 2px;
+$upload-action-width: 82px;
+$upload-filename-margin-top: 2px;
+$upload-filename-margin-bottom: 2px;
+$upload-filename-margin-left: 2px;
+$upload-filename-width: 85px;
+$upload-filename-padding: 0 10px;
+$upload-height: 28px;
+$upload-width: 190px;
+
+@import "../../_base/css/uniform._base.scss";
+
+/* INPUT & TEXTAREA */
+
+#{$class-wrapper-element}#{$class-wrapper} input#{$class-input},
+#{$class-wrapper-element}#{$class-wrapper} select#{$class-multiselect},
+#{$class-wrapper-element}#{$class-wrapper} textarea#{$class-textarea} {
+ font-size: 12px;
+ font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
+ font-weight: normal;
+ color: #777;
+ border-top: solid 1px #aaa;
+ border-left: solid 1px #aaa;
+ border-bottom: solid 1px #ccc;
+ border-right: solid 1px #ccc;
+ @include border-radius($input-padding);
+
+ @include whenHover {
+ @include box-shadow(0px 0px 4px rgba(0,0,0,0.3));
+ border-color: #999;
+ }
+}
+
+/* PRESENTATION */
+
+/* Buttons */
+
+div#{$class-wrapper}#{$class-button} {
+ span {
+ font-weight: bold;
+ font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ letter-spacing: 1px;
+ text-transform: uppercase;
+ }
+
+ @include whenHover {
+ span {
+ color: #555;
+ }
+ }
+
+ @include whenDisabled {
+ span {
+ color: #bbb;
+ }
+ }
+}
+
+
+/* Select */
+
+div#{$class-wrapper}#{$class-select} {
+ font-size: 12px;
+
+ span {
+ color: #666;
+ text-shadow: 0 1px 0 #fff;
+ }
+
+ select {
+ font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ }
+
+ @include whenDisabled {
+ span {
+ color: #bbb;
+ }
+ }
+}
+
+/* Checker */
+div#{$class-wrapper}#{$class-checkbox} {
+ margin-right: 5px;
+}
+
+/* Radio */
+div#{$class-wrapper}#{$class-radio} {
+ margin-right: 3px;
+}
+
+/* Uploader */
+div#{$class-wrapper}#{$class-upload} {
+ span#{$class-action} {
+ text-shadow: #fff 0px 1px 0px;
+ background-color: #fff;
+ font-size: 11px;
+ font-weight: bold;
+ }
+
+ span#{$class-filename} {
+ color: #777;
+ border-right: solid 1px #bbb;
+ font-size: 11px;
+ }
+
+ @include whenDisabled {
+ span#{$class-action} {
+ color: #aaa;
+ }
+
+ span#{$class-filename} {
+ border-color: #ddd;
+ color: #aaa;
+ }
+ }
+}
+
+#{$class-wrapper-element}#{$class-wrapper} input#{$class-input} {
+ &, &:focus {
+ background-color: #fff;
+ }
+}
diff --git a/common/src/main/webapp/thirdparty/uniform/images/bg-input-focus.png b/common/src/main/webapp/thirdparty/uniform/images/bg-input-focus.png
new file mode 100644
index 0000000..0b059d4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/uniform/images/bg-input-focus.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/uniform/images/bg-input.png b/common/src/main/webapp/thirdparty/uniform/images/bg-input.png
new file mode 100644
index 0000000..485d222
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/uniform/images/bg-input.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/uniform/images/sprite.png b/common/src/main/webapp/thirdparty/uniform/images/sprite.png
new file mode 100644
index 0000000..358d7be
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/uniform/images/sprite.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/uniform/images/sprite_original.png b/common/src/main/webapp/thirdparty/uniform/images/sprite_original.png
new file mode 100644
index 0000000..66b558f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/uniform/images/sprite_original.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/uniform/jquery.uniform.js b/common/src/main/webapp/thirdparty/uniform/jquery.uniform.js
new file mode 100644
index 0000000..ad2d613
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/uniform/jquery.uniform.js
@@ -0,0 +1,1068 @@
+/*
+
+Uniform v2.1.0
+Copyright © 2009 Josh Pyles / Pixelmatrix Design LLC
+http://pixelmatrixdesign.com
+
+Requires jQuery 1.3 or newer
+
+Much thanks to Thomas Reynolds and Buck Wilson for their help and advice on
+this.
+
+Disabling text selection is made possible by Mathias Bynens
+<http://mathiasbynens.be/> and his noSelect plugin.
+<https://github.com/mathiasbynens/jquery-noselect>, which is embedded.
+
+Also, thanks to David Kaneda and Eugene Bond for their contributions to the
+plugin.
+
+Tyler Akins has also rewritten chunks of the plugin, helped close many issues,
+and ensured version 2 got out the door.
+
+License:
+MIT License - http://www.opensource.org/licenses/mit-license.php
+
+Enjoy!
+
+*/
+/*global jQuery, window, document, navigator*/
+
+(function ($, undef) {
+ "use strict";
+
+ /**
+ * Use .prop() if jQuery supports it, otherwise fall back to .attr()
+ *
+ * @param jQuery $el jQuery'd element on which we're calling attr/prop
+ * @param ... All other parameters are passed to jQuery's function
+ * @return The result from jQuery
+ */
+ function attrOrProp($el) {
+ var args = Array.prototype.slice.call(arguments, 1);
+
+ if ($el.prop) {
+ // jQuery 1.6+
+ return $el.prop.apply($el, args);
+ }
+
+ // jQuery 1.5 and below
+ return $el.attr.apply($el, args);
+ }
+
+ /**
+ * For backwards compatibility with older jQuery libraries, only bind
+ * one thing at a time. Also, this function adds our namespace to
+ * events in one consistent location, shrinking the minified code.
+ *
+ * The properties on the events object are the names of the events
+ * that we are supposed to add to. It can be a space separated list.
+ * The namespace will be added automatically.
+ *
+ * @param jQuery $el
+ * @param Object options Uniform options for this element
+ * @param Object events Events to bind, properties are event names
+ */
+ function bindMany($el, options, events) {
+ var name, namespaced;
+
+ for (name in events) {
+ if (events.hasOwnProperty(name)) {
+ namespaced = name.replace(/ |$/g, options.eventNamespace);
+ $el.bind(namespaced, events[name]);
+ }
+ }
+ }
+
+ /**
+ * Bind the hover, active, focus, and blur UI updates
+ *
+ * @param jQuery $el Original element
+ * @param jQuery $target Target for the events (our div/span)
+ * @param Object options Uniform options for the element $target
+ */
+ function bindUi($el, $target, options) {
+ bindMany($el, options, {
+ focus: function () {
+ $target.addClass(options.focusClass);
+ },
+ blur: function () {
+ $target.removeClass(options.focusClass);
+ $target.removeClass(options.activeClass);
+ },
+ mouseenter: function () {
+ $target.addClass(options.hoverClass);
+ },
+ mouseleave: function () {
+ $target.removeClass(options.hoverClass);
+ $target.removeClass(options.activeClass);
+ },
+ "mousedown touchbegin": function () {
+ if (!$el.is(":disabled")) {
+ $target.addClass(options.activeClass);
+ }
+ },
+ "mouseup touchend": function () {
+ $target.removeClass(options.activeClass);
+ }
+ });
+ }
+
+ /**
+ * Remove the hover, focus, active classes.
+ *
+ * @param jQuery $el Element with classes
+ * @param Object options Uniform options for the element
+ */
+ function classClearStandard($el, options) {
+ $el.removeClass(options.hoverClass + " " + options.focusClass + " " + options.activeClass);
+ }
+
+ /**
+ * Add or remove a class, depending on if it's "enabled"
+ *
+ * @param jQuery $el Element that has the class added/removed
+ * @param String className Class or classes to add/remove
+ * @param Boolean enabled True to add the class, false to remove
+ */
+ function classUpdate($el, className, enabled) {
+ if (enabled) {
+ $el.addClass(className);
+ } else {
+ $el.removeClass(className);
+ }
+ }
+
+ /**
+ * Updating the "checked" property can be a little tricky. This
+ * changed in jQuery 1.6 and now we can pass booleans to .prop().
+ * Prior to that, one either adds an attribute ("checked=checked") or
+ * removes the attribute.
+ *
+ * @param jQuery $tag Our Uniform span/div
+ * @param jQuery $el Original form element
+ * @param Object options Uniform options for this element
+ */
+ function classUpdateChecked($tag, $el, options) {
+ var c = "checked",
+ isChecked = $el.is(":" + c);
+
+ if ($el.prop) {
+ // jQuery 1.6+
+ $el.prop(c, isChecked);
+ } else {
+ // jQuery 1.5 and below
+ if (isChecked) {
+ $el.attr(c, c);
+ } else {
+ $el.removeAttr(c);
+ }
+ }
+
+ classUpdate($tag, options.checkedClass, isChecked);
+ }
+
+ /**
+ * Set or remove the "disabled" class for disabled elements, based on
+ * if the
+ *
+ * @param jQuery $tag Our Uniform span/div
+ * @param jQuery $el Original form element
+ * @param Object options Uniform options for this element
+ */
+ function classUpdateDisabled($tag, $el, options) {
+ classUpdate($tag, options.disabledClass, $el.is(":disabled"));
+ }
+
+ /**
+ * Wrap an element inside of a container or put the container next
+ * to the element. See the code for examples of the different methods.
+ *
+ * Returns the container that was added to the HTML.
+ *
+ * @param jQuery $el Element to wrap
+ * @param jQuery $container Add this new container around/near $el
+ * @param String method One of "after", "before" or "wrap"
+ * @return $container after it has been cloned for adding to $el
+ */
+ function divSpanWrap($el, $container, method) {
+ switch (method) {
+ case "after":
+ // Result: <element /> <container />
+ $el.after($container);
+ return $el.next();
+ case "before":
+ // Result: <container /> <element />
+ $el.before($container);
+ return $el.prev();
+ case "wrap":
+ // Result: <container> <element /> </container>
+ $el.wrap($container);
+ return $el.parent();
+ }
+
+ return null;
+ }
+
+
+ /**
+ * Create a div/span combo for uniforming an element
+ *
+ * @param jQuery $el Element to wrap
+ * @param Object options Options for the element, set by the user
+ * @param Object divSpanConfig Options for how we wrap the div/span
+ * @return Object Contains the div and span as properties
+ */
+ function divSpan($el, options, divSpanConfig) {
+ var $div, $span, id;
+
+ if (!divSpanConfig) {
+ divSpanConfig = {};
+ }
+
+ divSpanConfig = $.extend({
+ bind: {},
+ divClass: null,
+ divWrap: "wrap",
+ spanClass: null,
+ spanHtml: null,
+ spanWrap: "wrap"
+ }, divSpanConfig);
+
+ $div = $('<div />');
+ $span = $('<span />');
+
+ // Automatically hide this div/span if the element is hidden.
+ // Do not hide if the element is hidden because a parent is hidden.
+ if (options.autoHide && $el.is(':hidden') && $el.css('display') === 'none') {
+ $div.hide();
+ }
+
+ if (divSpanConfig.divClass) {
+ $div.addClass(divSpanConfig.divClass);
+ }
+
+ if (options.wrapperClass) {
+ $div.addClass(options.wrapperClass);
+ }
+
+ if (divSpanConfig.spanClass) {
+ $span.addClass(divSpanConfig.spanClass);
+ }
+
+ id = attrOrProp($el, 'id');
+
+ if (options.useID && id) {
+ attrOrProp($div, 'id', options.idPrefix + '-' + id);
+ }
+
+ if (divSpanConfig.spanHtml) {
+ $span.html(divSpanConfig.spanHtml);
+ }
+
+ $div = divSpanWrap($el, $div, divSpanConfig.divWrap);
+ $span = divSpanWrap($el, $span, divSpanConfig.spanWrap);
+ classUpdateDisabled($div, $el, options);
+ return {
+ div: $div,
+ span: $span
+ };
+ }
+
+
+ /**
+ * Wrap an element with a span to apply a global wrapper class
+ *
+ * @param jQuery $el Element to wrap
+ * @param object options
+ * @return jQuery Wrapper element
+ */
+ function wrapWithWrapperClass($el, options) {
+ var $span;
+
+ if (!options.wrapperClass) {
+ return null;
+ }
+
+ $span = $('<span />').addClass(options.wrapperClass);
+ $span = divSpanWrap($el, $span, "wrap");
+ return $span;
+ }
+
+
+ /**
+ * Test if high contrast mode is enabled.
+ *
+ * In high contrast mode, background images can not be set and
+ * they are always returned as 'none'.
+ *
+ * @return boolean True if in high contrast mode
+ */
+ function highContrast() {
+ var c, $div, el, rgb;
+
+ // High contrast mode deals with white and black
+ rgb = 'rgb(120,2,153)';
+ $div = $('<div style="width:0;height:0;color:' + rgb + '">');
+ $('body').append($div);
+ el = $div.get(0);
+
+ // $div.css() will get the style definition, not
+ // the actually displaying style
+ if (window.getComputedStyle) {
+ c = window.getComputedStyle(el, '').color;
+ } else {
+ c = (el.currentStyle || el.style || {}).color;
+ }
+
+ $div.remove();
+ return c.replace(/ /g, '') !== rgb;
+ }
+
+
+ /**
+ * Change text into safe HTML
+ *
+ * @param String text
+ * @return String HTML version
+ */
+ function htmlify(text) {
+ if (!text) {
+ return "";
+ }
+
+ return $('<span />').text(text).html();
+ }
+
+ /**
+ * If not MSIE, return false.
+ * If it is, return the version number.
+ *
+ * @return false|number
+ */
+ function isMsie() {
+ return navigator.cpuClass && !navigator.product;
+ }
+
+ /**
+ * Return true if this version of IE allows styling
+ *
+ * @return boolean
+ */
+ function isMsieSevenOrNewer() {
+ if (typeof window.XMLHttpRequest !== 'undefined') {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Test if the element is a multiselect
+ *
+ * @param jQuery $el Element
+ * @return boolean true/false
+ */
+ function isMultiselect($el) {
+ var elSize;
+
+ if ($el[0].multiple) {
+ return true;
+ }
+
+ elSize = attrOrProp($el, "size");
+
+ if (!elSize || elSize <= 1) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Meaningless utility function. Used mostly for improving minification.
+ *
+ * @return false
+ */
+ function returnFalse() {
+ return false;
+ }
+
+ /**
+ * noSelect plugin, very slightly modified
+ * http://mths.be/noselect v1.0.3
+ *
+ * @param jQuery $elem Element that we don't want to select
+ * @param Object options Uniform options for the element
+ */
+ function noSelect($elem, options) {
+ var none = 'none';
+ bindMany($elem, options, {
+ 'selectstart dragstart mousedown': returnFalse
+ });
+
+ $elem.css({
+ MozUserSelect: none,
+ msUserSelect: none,
+ webkitUserSelect: none,
+ userSelect: none
+ });
+ }
+
+ /**
+ * Updates the filename tag based on the value of the real input
+ * element.
+ *
+ * @param jQuery $el Actual form element
+ * @param jQuery $filenameTag Span/div to update
+ * @param Object options Uniform options for this element
+ */
+ function setFilename($el, $filenameTag, options) {
+ var filename = $el.val();
+
+ if (filename === "") {
+ filename = options.fileDefaultHtml;
+ } else {
+ filename = filename.split(/[\/\\]+/);
+ filename = filename[(filename.length - 1)];
+ }
+
+ $filenameTag.text(filename);
+ }
+
+
+ /**
+ * Function from jQuery to swap some CSS values, run a callback,
+ * then restore the CSS. Modified to pass JSLint and handle undefined
+ * values with 'use strict'.
+ *
+ * @param jQuery $el Element
+ * @param object newCss CSS values to swap out
+ * @param Function callback Function to run
+ */
+ function swap($elements, newCss, callback) {
+ var restore, item;
+
+ restore = [];
+
+ $elements.each(function () {
+ var name;
+
+ for (name in newCss) {
+ if (Object.prototype.hasOwnProperty.call(newCss, name)) {
+ restore.push({
+ el: this,
+ name: name,
+ old: this.style[name]
+ });
+
+ this.style[name] = newCss[name];
+ }
+ }
+ });
+
+ callback();
+
+ while (restore.length) {
+ item = restore.pop();
+ item.el.style[item.name] = item.old;
+ }
+ }
+
+
+ /**
+ * The browser doesn't provide sizes of elements that are not visible.
+ * This will clone an element and add it to the DOM for calculations.
+ *
+ * @param jQuery $el
+ * @param String method
+ */
+ function sizingInvisible($el, callback) {
+ var targets;
+
+ // We wish to target ourselves and any parents as long as
+ // they are not visible
+ targets = $el.parents();
+ targets.push($el[0]);
+ targets = targets.not(':visible');
+ swap(targets, {
+ visibility: "hidden",
+ display: "block",
+ position: "absolute"
+ }, callback);
+ }
+
+
+ /**
+ * Standard way to unwrap the div/span combination from an element
+ *
+ * @param jQuery $el Element that we wish to preserve
+ * @param Object options Uniform options for the element
+ * @return Function This generated function will perform the given work
+ */
+ function unwrapUnwrapUnbindFunction($el, options) {
+ return function () {
+ $el.unwrap().unwrap().unbind(options.eventNamespace);
+ };
+ }
+
+ var allowStyling = true, // False if IE6 or other unsupported browsers
+ highContrastTest = false, // Was the high contrast test ran?
+ uniformHandlers = [ // Objects that take care of "unification"
+ {
+ // Buttons
+ match: function ($el) {
+ return $el.is("a, button, :submit, :reset, input[type='button']");
+ },
+ apply: function ($el, options) {
+ var $div, defaultSpanHtml, ds, getHtml, doingClickEvent;
+ defaultSpanHtml = options.submitDefaultHtml;
+
+ if ($el.is(":reset")) {
+ defaultSpanHtml = options.resetDefaultHtml;
+ }
+
+ if ($el.is("a, button")) {
+ // Use the HTML inside the tag
+ getHtml = function () {
+ return $el.html() || defaultSpanHtml;
+ };
+ } else {
+ // Use the value property of the element
+ getHtml = function () {
+ return htmlify(attrOrProp($el, "value")) || defaultSpanHtml;
+ };
+ }
+
+ ds = divSpan($el, options, {
+ divClass: options.buttonClass,
+ spanHtml: getHtml(),
+ });
+ $div = ds.div;
+ bindUi($el, $div, options);
+ doingClickEvent = false;
+ bindMany($div, options, {
+ "click touchend": function () {
+ var ev, res, target, href;
+
+ if (doingClickEvent) {
+ return;
+ }
+
+ if ($el.is(':disabled')) {
+ return;
+ }
+
+ doingClickEvent = true;
+
+ if ($el[0].dispatchEvent) {
+ ev = document.createEvent("MouseEvents");
+ ev.initEvent("click", true, true);
+ res = $el[0].dispatchEvent(ev);
+
+ if ($el.is('a') && res) {
+ target = attrOrProp($el, 'target');
+ href = attrOrProp($el, 'href');
+
+ if (!target || target === '_self') {
+ document.location.href = href;
+ } else {
+ window.open(href, target);
+ }
+ }
+ } else {
+ $el.click();
+ }
+
+ doingClickEvent = false;
+ }
+ });
+ noSelect($div, options);
+ return {
+ remove: function () {
+ // Move $el out
+ $div.after($el);
+
+ // Remove div and span
+ $div.remove();
+
+ // Unbind events
+ $el.unbind(options.eventNamespace);
+ return $el;
+ },
+ update: function () {
+ classClearStandard($div, options);
+ classUpdateDisabled($div, $el, options);
+ $el.detach();
+ ds.span.html(getHtml()).append($el);
+ }
+ };
+ }
+ },
+ {
+ // Checkboxes
+ match: function ($el) {
+ return $el.is(":checkbox");
+ },
+ apply: function ($el, options) {
+ var ds, $div, $span;
+ ds = divSpan($el, options, {
+ divClass: options.checkboxClass
+ });
+ $div = ds.div;
+ $span = ds.span;
+
+ // Add focus classes, toggling, active, etc.
+ bindUi($el, $div, options);
+ bindMany($el, options, {
+ "click touchend": function () {
+ classUpdateChecked($span, $el, options);
+ }
+ });
+ classUpdateChecked($span, $el, options);
+ return {
+ remove: unwrapUnwrapUnbindFunction($el, options),
+ update: function () {
+ classClearStandard($div, options);
+ $span.removeClass(options.checkedClass);
+ classUpdateChecked($span, $el, options);
+ classUpdateDisabled($div, $el, options);
+ }
+ };
+ }
+ },
+ {
+ // File selection / uploads
+ match: function ($el) {
+ return $el.is(":file");
+ },
+ apply: function ($el, options) {
+ var ds, $div, $filename, $button;
+
+ // The "span" is the button
+ ds = divSpan($el, options, {
+ divClass: options.fileClass,
+ spanClass: options.fileButtonClass,
+ spanHtml: options.fileButtonHtml,
+ spanWrap: "after"
+ });
+ $div = ds.div;
+ $button = ds.span;
+ $filename = $("<span />").html(options.fileDefaultHtml);
+ $filename.addClass(options.filenameClass);
+ $filename = divSpanWrap($el, $filename, "after");
+
+ // Set the size
+ if (!attrOrProp($el, "size")) {
+ attrOrProp($el, "size", $div.width() / 10);
+ }
+
+ // Actions
+ function filenameUpdate() {
+ setFilename($el, $filename, options);
+ }
+
+ bindUi($el, $div, options);
+
+ // Account for input saved across refreshes
+ filenameUpdate();
+
+ // IE7 doesn't fire onChange until blur or second fire.
+ if (isMsie()) {
+ // IE considers browser chrome blocking I/O, so it
+ // suspends tiemouts until after the file has
+ // been selected.
+ bindMany($el, options, {
+ click: function () {
+ $el.trigger("change");
+ setTimeout(filenameUpdate, 0);
+ }
+ });
+ } else {
+ // All other browsers behave properly
+ bindMany($el, options, {
+ change: filenameUpdate
+ });
+ }
+
+ noSelect($filename, options);
+ noSelect($button, options);
+ return {
+ remove: function () {
+ // Remove filename and button
+ $filename.remove();
+ $button.remove();
+
+ // Unwrap parent div, remove events
+ return $el.unwrap().unbind(options.eventNamespace);
+ },
+ update: function () {
+ classClearStandard($div, options);
+ setFilename($el, $filename, options);
+ classUpdateDisabled($div, $el, options);
+ }
+ };
+ }
+ },
+ {
+ // Input fields (text)
+ match: function ($el) {
+ if ($el.is("input")) {
+ var t = (" " + attrOrProp($el, "type") + " ").toLowerCase(),
+ allowed = " color date datetime datetime-local email month number password search tel text time url week ";
+ return allowed.indexOf(t) >= 0;
+ }
+
+ return false;
+ },
+ apply: function ($el, options) {
+ var elType, $wrapper;
+
+ elType = attrOrProp($el, "type");
+ $el.addClass(options.inputClass);
+ $wrapper = wrapWithWrapperClass($el, options);
+ bindUi($el, $el, options);
+
+ if (options.inputAddTypeAsClass) {
+ $el.addClass(elType);
+ }
+
+ return {
+ remove: function () {
+ $el.removeClass(options.inputClass);
+
+ if (options.inputAddTypeAsClass) {
+ $el.removeClass(elType);
+ }
+
+ if ($wrapper) {
+ $el.unwrap();
+ }
+ },
+ update: returnFalse
+ };
+ }
+ },
+ {
+ // Radio buttons
+ match: function ($el) {
+ return $el.is(":radio");
+ },
+ apply: function ($el, options) {
+ var ds, $div, $span;
+ ds = divSpan($el, options, {
+ divClass: options.radioClass
+ });
+ $div = ds.div;
+ $span = ds.span;
+
+ // Add classes for focus, handle active, checked
+ bindUi($el, $div, options);
+ bindMany($el, options, {
+ "click touchend": function () {
+ // Find all radios with the same name, then update
+ // them with $.uniform.update() so the right
+ // per-element options are used
+ $.uniform.update($(':radio[name="' + attrOrProp($el, "name") + '"]'));
+ }
+ });
+ classUpdateChecked($span, $el, options);
+ return {
+ remove: unwrapUnwrapUnbindFunction($el, options),
+ update: function () {
+ classClearStandard($div, options);
+ classUpdateChecked($span, $el, options);
+ classUpdateDisabled($div, $el, options);
+ }
+ };
+ }
+ },
+ {
+ // Select lists, but do not style multiselects here
+ match: function ($el) {
+ if ($el.is("select") && !isMultiselect($el)) {
+ return true;
+ }
+
+ return false;
+ },
+ apply: function ($el, options) {
+ var ds, $div, $span, origElemWidth;
+
+ if (options.selectAutoWidth) {
+ sizingInvisible($el, function () {
+ origElemWidth = $el.width();
+ });
+ }
+
+ ds = divSpan($el, options, {
+ divClass: options.selectClass,
+ spanHtml: ($el.find(":selected:first") || $el.find("option:first")).html(),
+ spanWrap: "before"
+ });
+ $div = ds.div;
+ $span = ds.span;
+
+ if (options.selectAutoWidth) {
+ // Use the width of the select and adjust the
+ // span and div accordingly
+ sizingInvisible($el, function () {
+ // Force "display: block" - related to bug #287
+ swap($([ $span[0], $div[0] ]), {
+ display: "block"
+ }, function () {
+ var spanPad;
+ spanPad = $span.outerWidth() - $span.width();
+ $div.width(origElemWidth + spanPad);
+ $span.width(origElemWidth);
+ });
+ });
+ } else {
+ // Force the select to fill the size of the div
+ $div.addClass('fixedWidth');
+ }
+
+ // Take care of events
+ bindUi($el, $div, options);
+ bindMany($el, options, {
+ change: function () {
+ $span.html($el.find(":selected").html());
+ $div.removeClass(options.activeClass);
+ },
+ "click touchend": function () {
+ // IE7 and IE8 may not update the value right
+ // until after click event - issue #238
+ var selHtml = $el.find(":selected").html();
+
+ if ($span.html() !== selHtml) {
+ // Change was detected
+ // Fire the change event on the select tag
+ $el.trigger('change');
+ }
+ },
+ keyup: function () {
+ $span.html($el.find(":selected").html());
+ }
+ });
+ noSelect($span, options);
+ return {
+ remove: function () {
+ // Remove sibling span
+ $span.remove();
+
+ // Unwrap parent div
+ $el.unwrap().unbind(options.eventNamespace);
+ return $el;
+ },
+ update: function () {
+ if (options.selectAutoWidth) {
+ // Easier to remove and reapply formatting
+ $.uniform.restore($el);
+ $el.uniform(options);
+ } else {
+ classClearStandard($div, options);
+
+ // Reset current selected text
+ $span.html($el.find(":selected").html());
+ classUpdateDisabled($div, $el, options);
+ }
+ }
+ };
+ }
+ },
+ {
+ // Select lists - multiselect lists only
+ match: function ($el) {
+ if ($el.is("select") && isMultiselect($el)) {
+ return true;
+ }
+
+ return false;
+ },
+ apply: function ($el, options) {
+ var $wrapper;
+
+ $el.addClass(options.selectMultiClass);
+ $wrapper = wrapWithWrapperClass($el, options);
+ bindUi($el, $el, options);
+
+ return {
+ remove: function () {
+ $el.removeClass(options.selectMultiClass);
+
+ if ($wrapper) {
+ $el.unwrap();
+ }
+ },
+ update: returnFalse
+ };
+ }
+ },
+ {
+ // Textareas
+ match: function ($el) {
+ return $el.is("textarea");
+ },
+ apply: function ($el, options) {
+ var $wrapper;
+
+ $el.addClass(options.textareaClass);
+ $wrapper = wrapWithWrapperClass($el, options);
+ bindUi($el, $el, options);
+
+ return {
+ remove: function () {
+ $el.removeClass(options.textareaClass);
+
+ if ($wrapper) {
+ $el.unwrap();
+ }
+ },
+ update: returnFalse
+ };
+ }
+ }
+ ];
+
+ // IE6 can't be styled - can't set opacity on select
+ if (isMsie() && !isMsieSevenOrNewer()) {
+ allowStyling = false;
+ }
+
+ $.uniform = {
+ // Default options that can be overridden globally or when uniformed
+ // globally: $.uniform.defaults.fileButtonHtml = "Pick A File";
+ // on uniform: $('input').uniform({fileButtonHtml: "Pick a File"});
+ defaults: {
+ activeClass: "active",
+ autoHide: true,
+ buttonClass: "button",
+ checkboxClass: "checker",
+ checkedClass: "checked",
+ disabledClass: "disabled",
+ eventNamespace: ".uniform",
+ fileButtonClass: "action",
+ fileButtonHtml: "Choose File",
+ fileClass: "uploader",
+ fileDefaultHtml: "No file selected",
+ filenameClass: "filename",
+ focusClass: "focus",
+ hoverClass: "hover",
+ idPrefix: "uniform",
+ inputAddTypeAsClass: true,
+ inputClass: "uniform-input",
+ radioClass: "radio",
+ resetDefaultHtml: "Reset",
+ resetSelector: false, // We'll use our own function when you don't specify one
+ selectAutoWidth: true,
+ selectClass: "selector",
+ selectMultiClass: "uniform-multiselect",
+ submitDefaultHtml: "Submit", // Only text allowed
+ textareaClass: "uniform",
+ useID: true,
+ wrapperClass: null
+ },
+
+ // All uniformed elements - DOM objects
+ elements: []
+ };
+
+ $.fn.uniform = function (options) {
+ var el = this;
+ options = $.extend({}, $.uniform.defaults, options);
+
+ // If we are in high contrast mode, do not allow styling
+ if (!highContrastTest) {
+ highContrastTest = true;
+
+ if (highContrast()) {
+ allowStyling = false;
+ }
+ }
+
+ // Only uniform on browsers that work
+ if (!allowStyling) {
+ return this;
+ }
+
+ // Code for specifying a reset button
+ if (options.resetSelector) {
+ $(options.resetSelector).mouseup(function () {
+ window.setTimeout(function () {
+ $.uniform.update(el);
+ }, 10);
+ });
+ }
+
+ return this.each(function () {
+ var $el = $(this), i, handler, callbacks;
+
+ // Avoid uniforming elements already uniformed - just update
+ if ($el.data("uniformed")) {
+ $.uniform.update($el);
+ return;
+ }
+
+ // See if we have any handler for this type of element
+ for (i = 0; i < uniformHandlers.length; i = i + 1) {
+ handler = uniformHandlers[i];
+
+ if (handler.match($el, options)) {
+ callbacks = handler.apply($el, options);
+ $el.data("uniformed", callbacks);
+
+ // Store element in our global array
+ $.uniform.elements.push($el.get(0));
+ return;
+ }
+ }
+
+ // Could not style this element
+ });
+ };
+
+ $.uniform.restore = $.fn.uniform.restore = function (elem) {
+ if (elem === undef) {
+ elem = $.uniform.elements;
+ }
+
+ $(elem).each(function () {
+ var $el = $(this), index, elementData;
+ elementData = $el.data("uniformed");
+
+ // Skip elements that are not uniformed
+ if (!elementData) {
+ return;
+ }
+
+ // Unbind events, remove additional markup that was added
+ elementData.remove();
+
+ // Remove item from list of uniformed elements
+ index = $.inArray(this, $.uniform.elements);
+
+ if (index >= 0) {
+ $.uniform.elements.splice(index, 1);
+ }
+
+ $el.removeData("uniformed");
+ });
+ };
+
+ $.uniform.update = $.fn.uniform.update = function (elem) {
+ if (elem === undef) {
+ elem = $.uniform.elements;
+ }
+
+ $(elem).each(function () {
+ var $el = $(this), elementData;
+ elementData = $el.data("uniformed");
+
+ // Skip elements that are not uniformed
+ if (!elementData) {
+ return;
+ }
+
+ elementData.update($el, elementData.options);
+ });
+ };
+}(jQuery));
diff --git a/common/src/main/webapp/thirdparty/uniform/jquery.uniform.min.js b/common/src/main/webapp/thirdparty/uniform/jquery.uniform.min.js
new file mode 100644
index 0000000..33c92df
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/uniform/jquery.uniform.min.js
@@ -0,0 +1 @@
+(function(e,t){"use strict";function n(e){var t=Array.prototype.slice.call(arguments,1);return e.prop?e.prop.apply(e,t):e.attr.apply(e,t)}function s(e,t,n){var s,a;for(s in n)n.hasOwnProperty(s)&&(a=s.replace(/ |$/g,t.eventNamespace),e.bind(a,n[s]))}function a(e,t,n){s(e,n,{focus:function(){t.addClass(n.focusClass)},blur:function(){t.removeClass(n.focusClass),t.removeClass(n.activeClass)},mouseenter:function(){t.addClass(n.hoverClass)},mouseleave:function(){t.removeClass(n.hoverClass),t.removeClass(n.activeClass)},"mousedown touchbegin":function(){e.is(":disabled")||t.addClass(n.activeClass)},"mouseup touchend":function(){t.removeClass(n.activeClass)}})}function i(e,t){e.removeClass(t.hoverClass+" "+t.focusClass+" "+t.activeClass)}function r(e,t,n){n?e.addClass(t):e.removeClass(t)}function l(e,t,n){var s="checked",a=t.is(":"+s);t.prop?t.prop(s,a):a?t.attr(s,s):t.removeAttr(s),r(e,n.checkedClass,a)}function u(e,t,n){r(e,n.disabledClass,t.is(":disabled"))}function o(e,t,n){switch(n){case"after":return e.after(t),e.next();case"before":return e.before(t),e.prev();case"wrap":return e.wrap(t),e.parent()}return null}function c(t,s,a){var i,r,l;return a||(a={}),a=e.extend({bind:{},divClass:null,divWrap:"wrap",spanClass:null,spanHtml:null,spanWrap:"wrap"},a),i=e("<div />"),r=e("<span />"),s.autoHide&&t.is(":hidden")&&"none"===t.css("display")&&i.hide(),a.divClass&&i.addClass(a.divClass),s.wrapperClass&&i.addClass(s.wrapperClass),a.spanClass&&r.addClass(a.spanClass),l=n(t,"id"),s.useID&&l&&n(i,"id",s.idPrefix+"-"+l),a.spanHtml&&r.html(a.spanHtml),i=o(t,i,a.divWrap),r=o(t,r,a.spanWrap),u(i,t,s),{div:i,span:r}}function d(t,n){var s;return n.wrapperClass?(s=e("<span />").addClass(n.wrapperClass),s=o(t,s,"wrap")):null}function f(){var t,n,s,a;return a="rgb(120,2,153)",n=e('<div style="width:0;height:0;color:'+a+'">'),e("body").append(n),s=n.get(0),t=window.getComputedStyle?window.getComputedStyle(s,"").color:(s.currentStyle||s.style||{}).color,n.remove(),t.replace(/ /g,"")!==a}function p(t){return t?e("<span />").text(t).html():""}function m(){return navigator.cpuClass&&!navigator.product}function v(){return window.XMLHttpRequest!==void 0?!0:!1}function h(e){var t;return e[0].multiple?!0:(t=n(e,"size"),!t||1>=t?!1:!0)}function C(){return!1}function w(e,t){var n="none";s(e,t,{"selectstart dragstart mousedown":C}),e.css({MozUserSelect:n,msUserSelect:n,webkitUserSelect:n,userSelect:n})}function b(e,t,n){var s=e.val();""===s?s=n.fileDefaultHtml:(s=s.split(/[\/\\]+/),s=s[s.length-1]),t.text(s)}function y(e,t,n){var s,a;for(s=[],e.each(function(){var e;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(s.push({el:this,name:e,old:this.style[e]}),this.style[e]=t[e])}),n();s.length;)a=s.pop(),a.el.style[a.name]=a.old}function g(e,t){var n;n=e.parents(),n.push(e[0]),n=n.not(":visible"),y(n,{visibility:"hidden",display:"block",position:"absolute"},t)}function k(e,t){return function(){e.unwrap().unwrap().unbind(t.eventNamespace)}}var H=!0,x=!1,A=[{match:function(e){return e.is("a, button, :submit, :reset, input[type='button']")},apply:function(e,t){var r,l,o,d,f;return l=t.submitDefaultHtml,e.is(":reset")&&(l=t.resetDefaultHtml),d=e.is("a, button")?function(){return e.html()||l}:function(){return p(n(e,"value"))||l},o=c(e,t,{divClass:t.buttonClass,spanHtml:d()}),r=o.div,a(e,r,t),f=!1,s(r,t,{"click touchend":function(){var t,s,a,i;f||e.is(":disabled")||(f=!0,e[0].dispatchEvent?(t=document.createEvent("MouseEvents"),t.initEvent("click",!0,!0),s=e[0].dispatchEvent(t),e.is("a")&&s&&(a=n(e,"target"),i=n(e,"href"),a&&"_self"!==a?window.open(i,a):document.location.href=i)):e.click(),f=!1)}}),w(r,t),{remove:function(){return r.after(e),r.remove(),e.unbind(t.eventNamespace),e},update:function(){i(r,t),u(r,e,t),e.detach(),o.span.html(d()).append(e)}}}},{match:function(e){return e.is(":checkbox")},apply:function(e,t){var n,r,o;return n=c(e,t,{divClass:t.checkboxClass}),r=n.div,o=n.span,a(e,r,t),s(e,t,{"click touchend":function(){l(o,e,t)}}),l(o,e,t),{remove:k(e,t),update:function(){i(r,t),o.removeClass(t.checkedClass),l(o,e,t),u(r,e,t)}}}},{match:function(e){return e.is(":file")},apply:function(t,r){function l(){b(t,p,r)}var d,f,p,v;return d=c(t,r,{divClass:r.fileClass,spanClass:r.fileButtonClass,spanHtml:r.fileButtonHtml,spanWrap:"after"}),f=d.div,v=d.span,p=e("<span />").html(r.fileDefaultHtml),p.addClass(r.filenameClass),p=o(t,p,"after"),n(t,"size")||n(t,"size",f.width()/10),a(t,f,r),l(),m()?s(t,r,{click:function(){t.trigger("change"),setTimeout(l,0)}}):s(t,r,{change:l}),w(p,r),w(v,r),{remove:function(){return p.remove(),v.remove(),t.unwrap().unbind(r.eventNamespace)},update:function(){i(f,r),b(t,p,r),u(f,t,r)}}}},{match:function(e){if(e.is("input")){var t=(" "+n(e,"type")+" ").toLowerCase(),s=" color date datetime datetime-local email month number password search tel text time url week ";return s.indexOf(t)>=0}return!1},apply:function(e,t){var s,i;return s=n(e,"type"),e.addClass(t.inputClass),i=d(e,t),a(e,e,t),t.inputAddTypeAsClass&&e.addClass(s),{remove:function(){e.removeClass(t.inputClass),t.inputAddTypeAsClass&&e.removeClass(s),i&&e.unwrap()},update:C}}},{match:function(e){return e.is(":radio")},apply:function(t,r){var o,d,f;return o=c(t,r,{divClass:r.radioClass}),d=o.div,f=o.span,a(t,d,r),s(t,r,{"click touchend":function(){e.uniform.update(e(':radio[name="'+n(t,"name")+'"]'))}}),l(f,t,r),{remove:k(t,r),update:function(){i(d,r),l(f,t,r),u(d,t,r)}}}},{match:function(e){return e.is("select")&&!h(e)?!0:!1},apply:function(t,n){var r,l,o,d;return n.selectAutoWidth&&g(t,function(){d=t.width()}),r=c(t,n,{divClass:n.selectClass,spanHtml:(t.find(":selected:first")||t.find("option:first")).html(),spanWrap:"before"}),l=r.div,o=r.span,n.selectAutoWidth?g(t,function(){y(e([o[0],l[0]]),{display:"block"},function(){var e;e=o.outerWidth()-o.width(),l.width(d+e),o.width(d)})}):l.addClass("fixedWidth"),a(t,l,n),s(t,n,{change:function(){o.html(t.find(":selected").html()),l.removeClass(n.activeClass)},"click touchend":function(){var e=t.find(":selected").html();o.html()!==e&&t.trigger("change")},keyup:function(){o.html(t.find(":selected").html())}}),w(o,n),{remove:function(){return o.remove(),t.unwrap().unbind(n.eventNamespace),t},update:function(){n.selectAutoWidth?(e.uniform.restore(t),t.uniform(n)):(i(l,n),o.html(t.find(":selected").html()),u(l,t,n))}}}},{match:function(e){return e.is("select")&&h(e)?!0:!1},apply:function(e,t){var n;return e.addClass(t.selectMultiClass),n=d(e,t),a(e,e,t),{remove:function(){e.removeClass(t.selectMultiClass),n&&e.unwrap()},update:C}}},{match:function(e){return e.is("textarea")},apply:function(e,t){var n;return e.addClass(t.textareaClass),n=d(e,t),a(e,e,t),{remove:function(){e.removeClass(t.textareaClass),n&&e.unwrap()},update:C}}}];m()&&!v()&&(H=!1),e.uniform={defaults:{activeClass:"active",autoHide:!0,buttonClass:"button",checkboxClass:"checker",checkedClass:"checked",disabledClass:"disabled",eventNamespace:".uniform",fileButtonClass:"action",fileButtonHtml:"Choose File",fileClass:"uploader",fileDefaultHtml:"No file selected",filenameClass:"filename",focusClass:"focus",hoverClass:"hover",idPrefix:"uniform",inputAddTypeAsClass:!0,inputClass:"uniform-input",radioClass:"radio",resetDefaultHtml:"Reset",resetSelector:!1,selectAutoWidth:!0,selectClass:"selector",selectMultiClass:"uniform-multiselect",submitDefaultHtml:"Submit",textareaClass:"uniform",useID:!0,wrapperClass:null},elements:[]},e.fn.uniform=function(t){var n=this;return t=e.extend({},e.uniform.defaults,t),x||(x=!0,f()&&(H=!1)),H?(t.resetSelector&&e(t.resetSelector).mouseup(function(){window.setTimeout(function(){e.uniform.update(n)},10)}),this.each(function(){var n,s,a,i=e(this);if(i.data("uniformed"))return e.uniform.update(i),void 0;for(n=0;A.length>n;n+=1)if(s=A[n],s.match(i,t))return a=s.apply(i,t),i.data("uniformed",a),e.uniform.elements.push(i.get(0)),void 0})):this},e.uniform.restore=e.fn.uniform.restore=function(n){n===t&&(n=e.uniform.elements),e(n).each(function(){var t,n,s=e(this);n=s.data("uniformed"),n&&(n.remove(),t=e.inArray(this,e.uniform.elements),t>=0&&e.uniform.elements.splice(t,1),s.removeData("uniformed"))})},e.uniform.update=e.fn.uniform.update=function(n){n===t&&(n=e.uniform.elements),e(n).each(function(){var t,n=e(this);t=n.data("uniformed"),t&&t.update(n,t.options)})}})(jQuery); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/API_cn.html b/common/src/main/webapp/thirdparty/zTree/api/API_cn.html
new file mode 100644
index 0000000..1fe011d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/API_cn.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>API 文档 [zTree -- jQuery æ ‘æ’件]</title>
+ <link rel="stylesheet" href="apiCss/common.css" type="text/css">
+ <link rel='stylesheet' href='apiCss/zTreeStyleForApi.css' type='text/css'>
+ <script type="text/javascript">
+ var ie = (function(){
+ var undef,
+ v = 3,
+ div = document.createElement('div'),
+ all = div.getElementsByTagName('i');
+ while (
+ div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',
+ all[0]
+ );
+ return v > 4 ? v : undef;
+ }()), ie6 = (ie === 6),
+ path = window.location.pathname.replace(/.*\/([^\/\.]*)\..*/g,"$1"),
+ langLib = [];
+ ie = ie<9;
+ if(ie) {
+ document.write('<link rel="stylesheet" href="apiCss/common_ie6.css" type="text/css">');
+ }
+ var lang = "cn",
+ ajaxMsg = "如果你使用的是 Chrome æµè§ˆå™¨ï¼Œé‚£ä¹ˆè¯·æŠŠ API 文档å‘布到 web æœåŠ¡ç›®å½•ä¸‹è®¿é—®ã€‚\n\n(Chrome æµè§ˆå™¨ä¸æ”¯æŒæœ¬åœ° ajax 访问, å³ï¼šfile://)";
+
+ </script>
+ </head>
+ <body>
+ <div id="header_wrap" class="header_wrap" style="padding-top: 30px;">
+ <div id="header" class="header round">
+ <div class="light-bulb" alt=""></div>
+ <div class="ieSuggest">æµè§ˆæœ¬ç½‘站建议您使用 Chromeã€FireFoxã€Operaã€IE9 ç­‰æµè§ˆå™¨ï¼ˆåªè¦ä¸æ˜¯ IE6 7 8 就行), 速度会更快,画é¢ä¼šæ›´ç‚«ï¼</div>
+ <div class="google_plus"><g:plusone></g:plusone></div>
+ <div class="header-text">
+ <h1><em>zTree v3.5.16 API 文档</em></h1><p></p>
+ <p>all.js = core + excheck + exedit ( ä¸åŒ…括 exhide ); å‘现错误请åŠæ—¶é€šçŸ¥ï¼Œè°¢è°¢ã€‚</p>
+ </div>
+ <ul class="shortcuts language" style="top:0;">
+ <li><a href="API_en.html" onclick="window.location.href='API_en.html'"><button class="ico en" title="英文版" type="button"></button><span class=""></span></a></li>
+ </ul>
+ </div>
+ </div>
+ <div id="content_wrap" class="content_wrap">
+ <div id="content" class="content">
+ <div class="nav_section">
+ <ul>
+ <li class="first">注释:</li>
+ <li><button class="ico16 z_core" onfocus="this.blur();"></button><span>core 核心包</span></li>
+ <li><button class="ico16 z_check" onfocus="this.blur();"></button><span>excheck 扩展</span></li>
+ <li><button class="ico16 z_edit" onfocus="this.blur();"></button><span>exedit 扩展</span></li>
+ <li><button class="ico16 z_hide" onfocus="this.blur();"></button><span>exhide 扩展</span></li>
+ <li class="noline">
+ <button class="ico16 z_search" onfocus="this.blur();" title="Enter ä»¥åŠ å·¦ã€å³é”®å¯ä»¥å¿«é€Ÿå®šä½æŸ¥æ‰¾ç»“æžœ"></button>
+ <input type="text" class="searchKey search empty" value=""><input type="text" class="searchResult search" value="">
+ <button class="ico16 searchPrev disabled" onfocus="this.blur();" title="Enter ä»¥åŠ å·¦ã€å³é”®å¯ä»¥å¿«é€Ÿå®šä½æŸ¥æ‰¾ç»“æžœ"></button><button class="ico16 searchNext disabled" onfocus="this.blur();" title="Enter ä»¥åŠ å·¦ã€å³é”®å¯ä»¥å¿«é€Ÿå®šä½æŸ¥æ‰¾ç»“æžœ"></button>
+ </li>
+ </ul>
+ </div>
+
+ <div id="contentBox" class="contentBox round clearfix">
+ <div id="apiContent" class="apiContent">
+ <div id="api_setting" class="api_setting left">
+ <ul class="api_content_title"><li>setting é…置详解</li></ul>
+ <ul id="settingTree" class="ztree"></ul>
+ </div>
+ <div id="api_function" class="api_function right">
+ <ul class="api_content_title"><li>zTree 方法详解</li></ul>
+ <ul id="functionTree" class="ztree"></ul>
+ <ul class="api_content_title"><li>treeNode 节点数æ®è¯¦è§£</li></ul>
+ <ul id="treenodeTree" class="ztree"></ul>
+ </div>
+ </div>
+ </div>
+ <div class="clear"></div>
+ </div>
+ </div>
+
+ <!-- overlayed -->
+ <div id="overlayDiv" class="baby_overlay">
+ <div id="overlayContent" class="content round clearfix">
+ <div class="overlaySearch">
+ <button class="ico16 z_search" onfocus="this.blur();" title="Enter ä»¥åŠ å·¦ã€å³é”®å¯ä»¥å¿«é€Ÿå®šä½æŸ¥æ‰¾ç»“æžœ"></button>
+ <input type="text" class="searchKey search empty" value=""><input type="text" class="searchResult search" value="">
+ <button class="ico16 searchPrev disabled" onfocus="this.blur();" title="Enter ä»¥åŠ å·¦ã€å³é”®å¯ä»¥å¿«é€Ÿå®šä½æŸ¥æ‰¾ç»“æžœ"></button><button class="ico16 searchNext disabled" onfocus="this.blur();" title="Enter ä»¥åŠ å·¦ã€å³é”®å¯ä»¥å¿«é€Ÿå®šä½æŸ¥æ‰¾ç»“æžœ"></button>
+ </div>
+ <a id="overlayDivCloseBtn" class="close"></a>
+ <div id="overlayDetailDiv" class="details"></div>
+ </div>
+ <div id="overlayDivArrow" class="baby_overlay_arrow"></div>
+ </div>
+ <script type="text/javascript" src="apiCss/jquery-1.6.2.min.js"></script>
+ <script type='text/javascript' src='apiCss/jquery.ztree.core-3.5.js'></script>
+ <script type='text/javascript' src='apiCss/api.js'></script>
+ <script type="text/javascript">
+ $(document).ready(function(){
+ apiContent._init();
+ });
+ </script>
+ </body>
+</html> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/API_en.html b/common/src/main/webapp/thirdparty/zTree/api/API_en.html
new file mode 100644
index 0000000..fc7488b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/API_en.html
@@ -0,0 +1,102 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>API Document [zTree -- jQuery tree plug-ins.]</title>
+ <link rel="stylesheet" href="apiCss/common.css" type="text/css">
+ <link rel='stylesheet' href='apiCss/zTreeStyleForApi.css' type='text/css'>
+ <script type="text/javascript">
+ var ie = (function(){
+ var undef,
+ v = 3,
+ div = document.createElement('div'),
+ all = div.getElementsByTagName('i');
+ while (
+ div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',
+ all[0]
+ );
+ return v > 4 ? v : undef;
+ }()), ie6 = (ie === 6),
+ path = window.location.pathname.replace(/.*\/([^\/\.]*)\..*/g,"$1"),
+ langLib = [];
+ ie = ie<9;
+ if(ie) {
+ document.write('<link rel="stylesheet" href="apiCss/common_ie6.css" type="text/css">');
+ }
+ var lang = "en",
+ ajaxMsg = "If you use chrome browser, please copy the API files to local webserver. \n\n( because chrome browser can't allow AJAX access to 'file://' )";
+ </script>
+ </head>
+ <body>
+ <div id="header_wrap" class="header_wrap" style="padding-top: 30px;">
+ <div id="header" class="header round">
+ <div class="light-bulb" alt=""></div>
+ <div class="ieSuggest">If you use the Chrome / FireFox / Opera / IE9 browser will be even more dazzling effect!</div>
+ <div class="google_plus"><g:plusone></g:plusone></div>
+ <div class="header-text">
+ <h1><em>zTree v3.5.16 API Document</em></h1><p></p>
+ <p>all.js = core + excheck + exedit ( without exhide ); if you found some mistakes please contact me.</p>
+ </div>
+ <ul class="shortcuts language" style="top:0;">
+ <li><a href="API_cn.html" onclick="window.location.href='API_cn.html'"><button class="ico cn" title="Chinese" type="button"></button><span class=""></span></a></li>
+ </ul>
+ </div>
+ </div>
+ <div id="content_wrap" class="content_wrap">
+ <div id="content" class="content">
+ <div class="nav_section">
+ <ul>
+ <li class="first">Notes: </li>
+ <li><button class="ico16 z_core" onfocus="this.blur();"></button><span>core package</span></li>
+ <li><button class="ico16 z_check" onfocus="this.blur();"></button><span>excheck pack</span></li>
+ <li><button class="ico16 z_edit" onfocus="this.blur();"></button><span>exedit pack</span></li>
+ <li><button class="ico16 z_hide" onfocus="this.blur();"></button><span>exhide pack</span></li>
+ <li class="noline">
+ <button class="ico16 z_search" onfocus="this.blur();" title="'Enter', 'left' and 'right' key can locate the search results quickly."></button>
+ <input type="text" class="searchKey search empty" value=""><input type="text" class="searchResult search" value="">
+ <button class="ico16 searchPrev disabled" onfocus="this.blur();" title="'Enter', 'left' and 'right' key can locate the search results quickly."></button><button class="ico16 searchNext disabled" onfocus="this.blur();" title="'Enter', 'left' and 'right' key can locate the search results quickly."></button>
+ </li>
+ </ul>
+ </div>
+
+ <div id="contentBox" class="contentBox round clearfix">
+ <div id="apiContent" class="apiContent">
+ <div id="api_setting" class="api_setting left">
+ <ul class="api_content_title"><li>setting details</li></ul>
+ <ul id="settingTree" class="ztree"></ul>
+ </div>
+ <div id="api_function" class="api_function right">
+ <ul class="api_content_title"><li>zTree method details</li></ul>
+ <ul id="functionTree" class="ztree"></ul>
+ <ul class="api_content_title"><li>treeNode data details</li></ul>
+ <ul id="treenodeTree" class="ztree"></ul>
+ </div>
+ </div>
+ </div>
+ <div class="clear"></div>
+ </div>
+ </div>
+
+ <!-- overlayed -->
+ <div id="overlayDiv" class="baby_overlay">
+ <div id="overlayContent" class="content round clearfix">
+ <div class="overlaySearch">
+ <button class="ico16 z_search" onfocus="this.blur();" title="'Enter', 'left' and 'right' key can locate the search results quickly."></button>
+ <input type="text" class="searchKey search empty" value=""><input type="text" class="searchResult search" value="">
+ <button class="ico16 searchPrev disabled" onfocus="this.blur();" title="'Enter', 'left' and 'right' key can locate the search results quickly."></button><button class="ico16 searchNext disabled" onfocus="this.blur();" title="'Enter', 'left' and 'right' key can locate the search results quickly."></button>
+ </div>
+ <a id="overlayDivCloseBtn" class="close"></a>
+ <div id="overlayDetailDiv" class="details"></div>
+ </div>
+ <div id="overlayDivArrow" class="baby_overlay_arrow"></div>
+ </div>
+ <script type="text/javascript" src="apiCss/jquery-1.6.2.min.js"></script>
+ <script type='text/javascript' src='apiCss/jquery.ztree.core-3.5.js'></script>
+ <script type='text/javascript' src='apiCss/api.js'></script>
+ <script type="text/javascript">
+ $(document).ready(function(){
+ apiContent._init();
+ });
+ </script>
+ </body>
+</html> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/apiCss/api.js b/common/src/main/webapp/thirdparty/zTree/api/apiCss/api.js
new file mode 100644
index 0000000..37dd4ba
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/apiCss/api.js
@@ -0,0 +1,592 @@
+var apiContent = {
+ zTree_Setting: null,
+ zTree_Node: null,
+ zTree_Function: null,
+ overlayDiv : null,
+ overlayContent : null,
+ overlayDetailDiv : null,
+ overlayCloseBtn: null,
+ overlayArrow: null,
+ contentBoxDiv : null,
+ settingDiv : null,
+ functionDiv : null,
+ overlaySearch: null,
+ searchKey: null,
+ searchResultInput: null,
+ searchPrevBtn: null,
+ searchNextBtn: null,
+ apiCache: {},
+ lastValue: "",
+ searchNodes: [],
+ searchNodesCur: 0,
+
+ _init: function() {
+ this.overlayDiv = $("#overlayDiv");
+ this.overlayContent = $("#overlayContent");
+ this.overlayDetailDiv = $("#overlayDetailDiv");
+ this.overlayCloseBtn = $("#overlayDivCloseBtn");
+ this.overlayArrow = $("#overlayDivArrow");
+ this.contentBoxDiv = $("#contentBox");
+ this.settingDiv = $("#api_setting");
+ this.functionDiv = $("#api_function");
+ this.searchKey = $(".searchKey");
+ this.overlaySearch = $(".overlaySearch");
+ this.searchResultInput = $(".searchResult");
+ this.searchPrevBtn = $(".searchPrev");
+ this.searchNextBtn = $(".searchNext");
+ var setting = {
+ view: {
+ fontCss: this.getFontCss,
+ showLine: false,
+ showIcon: this.showIcon,
+ showTitle: this.getTitle,
+ selectedMulti: false,
+ dblClickExpand: false
+ },
+ data: {
+ key: {
+ title: "tt"
+ },
+ simpleData: {
+ enable:true,
+ idKey: "id",
+ pIdKey: "pId",
+ rootPId: ""
+ }
+ },
+ callback: {
+ onNodeCreated: this.onNodeCreated,
+ beforeClick: this.beforeClick
+ }
+ };
+ var setting_nodes =[
+ {id:1, pId:0, t:"setting", name:"var setting = {", open:true},
+ {id:11, pId:1, t:"treeId", name:"treeId : \"\",", iconSkin:"core", showAPI:true},
+ {id:12, pId:1, t:"treeObj", name:"treeObj : null,", iconSkin:"core", showAPI:true},
+ {id:121, pId:1, name:""},
+
+ {id:20, pId:1, t:"async", name:"async : {", open:true},
+ {id:201, pId:20, t:"autoParam", name:"autoParam : [],", iconSkin:"core", showAPI:true},
+ {id:208, pId:20, t:"contentType", name:"contentType : \"application...\",", iconSkin:"core", showAPI:true},
+ {id:202, pId:20, t:"dataFilter", name:"dataFilter : null,", iconSkin:"core", showAPI:true},
+ {id:203, pId:20, t:"dataType", name:"dataType : \"text\",", iconSkin:"core", showAPI:true},
+ {id:204, pId:20, t:"enable", name:"enable : false,", iconSkin:"core", showAPI:true},
+ {id:205, pId:20, t:"otherParam", name:"otherParam : [],", iconSkin:"core", showAPI:true},
+ {id:206, pId:20, t:"type", name:"type : \"post\",", iconSkin:"core", showAPI:true},
+ {id:207, pId:20, t:"url", name:"url : \"\"", iconSkin:"core", showAPI:true},
+ {id:21, pId:1, name:"},"},
+ {id:22, pId:1, name:""},
+
+ {id:30, pId:1, t:"callback", name:"callback : {", open:true},
+ {id:3001, pId:30, t:"beforeAsync", name:"beforeAsync : null,", iconSkin:"core", showAPI:true},
+ {id:3002, pId:30, t:"beforeCheck", name:"beforeCheck : null,", iconSkin:"check", showAPI:true},
+ {id:3003, pId:30, t:"beforeClick", name:"beforeClick : null,", iconSkin:"core", showAPI:true},
+ {id:3004, pId:30, t:"beforeCollapse", name:"beforeCollapse : null,", iconSkin:"core", showAPI:true},
+ {id:3004, pId:30, t:"beforeDblClick", name:"beforeDblClick : null,", iconSkin:"core", showAPI:true},
+ {id:3005, pId:30, t:"beforeDrag", name:"beforeDrag : null,", iconSkin:"edit", showAPI:true},
+ {id:3006, pId:30, t:"beforeDragOpen", name:"beforeDragOpen : null,", iconSkin:"edit", showAPI:true},
+ {id:3007, pId:30, t:"beforeDrop", name:"beforeDrop : null,", iconSkin:"edit", showAPI:true},
+ {id:3029, pId:30, t:"beforeEditName", name:"beforeEditName : null,", iconSkin:"edit", showAPI:true},
+ {id:3008, pId:30, t:"beforeExpand", name:"beforeExpand : null,", iconSkin:"core", showAPI:true},
+ {id:3009, pId:30, t:"beforeMouseDown", name:"beforeMouseDown : null,", iconSkin:"core", showAPI:true},
+ {id:3010, pId:30, t:"beforeMouseUp", name:"beforeMouseUp : null,", iconSkin:"core", showAPI:true},
+ {id:3011, pId:30, t:"beforeRemove", name:"beforeRemove : null,", iconSkin:"edit", showAPI:true},
+ {id:3012, pId:30, t:"beforeRename", name:"beforeRename : null,", iconSkin:"edit", showAPI:true},
+ {id:3013, pId:30, t:"beforeRightClick", name:"beforeRightClick : null,", iconSkin:"core", showAPI:true},
+ {id:3014, pId:30, name:""},
+ {id:3015, pId:30, t:"onAsyncError", name:"onAsyncError : null,", iconSkin:"core", showAPI:true},
+ {id:3016, pId:30, t:"onAsyncSuccess", name:"onAsyncSuccess : null,", iconSkin:"core", showAPI:true},
+ {id:3017, pId:30, t:"onCheck", name:"onCheck : null,", iconSkin:"check", showAPI:true},
+ {id:3018, pId:30, t:"onClick", name:"onClick : null,", iconSkin:"core", showAPI:true},
+ {id:3019, pId:30, t:"onCollapse", name:"onCollapse : null,", iconSkin:"core", showAPI:true},
+ {id:3029, pId:30, t:"onDblClick", name:"onDblClick : null,", iconSkin:"core", showAPI:true},
+ {id:3020, pId:30, t:"onDrag", name:"onDrag : null,", iconSkin:"edit", showAPI:true},
+ {id:3030, pId:30, t:"onDragMove", name:"onDragMove : null,", iconSkin:"edit", showAPI:true},
+ {id:3021, pId:30, t:"onDrop", name:"onDrop : null,", iconSkin:"edit", showAPI:true},
+ {id:3022, pId:30, t:"onExpand", name:"onExpand : null,", iconSkin:"core", showAPI:true},
+ {id:3023, pId:30, t:"onMouseDown", name:"onMouseDown : null,", iconSkin:"core", showAPI:true},
+ {id:3024, pId:30, t:"onMouseUp", name:"onMouseUp : null,", iconSkin:"core", showAPI:true},
+ {id:3025, pId:30, t:"onNodeCreated", name:"onNodeCreated : null,", iconSkin:"core", showAPI:true},
+ {id:3026, pId:30, t:"onRemove", name:"onRemove : null,", iconSkin:"edit", showAPI:true},
+ {id:3027, pId:30, t:"onRename", name:"onRename : null,", iconSkin:"edit", showAPI:true},
+ {id:3028, pId:30, t:"onRightClick", name:"onRightClick : null", iconSkin:"core", showAPI:true},
+ {id:31, pId:1, name:"},"},
+ {id:32, pId:1, name:""},
+
+ {id:40, pId:1, t:"check", name:"check : {", open:true},
+ {id:405, pId:40, t:"autoCheckTrigger", name:"autoCheckTrigger : false,", iconSkin:"check", showAPI:true},
+ {id:401, pId:40, t:"chkboxType", name:"chkboxType : {\"Y\": \"ps\", \"N\": \"ps\"},", iconSkin:"check", showAPI:true},
+ {id:402, pId:40, t:"chkStyle", name:"chkStyle : \"checkbox\",", iconSkin:"check", showAPI:true},
+ {id:403, pId:40, t:"enable", name:"enable : false,", iconSkin:"check", showAPI:true},
+ {id:406, pId:40, t:"nocheckInherit", name:"nocheckInherit : false", iconSkin:"check", showAPI:true},
+ {id:407, pId:40, t:"chkDisabledInherit", name:"chkDisabledInherit : false", iconSkin:"check", showAPI:true},
+ {id:404, pId:40, t:"radioType", name:"radioType : \"level\"", iconSkin:"check", showAPI:true},
+ {id:41, pId:1, name:"},"},
+ {id:42, pId:1, name:""},
+
+ {id:50, pId:1, t:"data", name:"data : {", open:true},
+ {id:500, pId:50, t:"keep", name:"keep : {", open:true},
+ {id:5001, pId:500, t:"leaf", name:"leaf : false,", iconSkin:"core", showAPI:true},
+ {id:5002, pId:500, t:"parent", name:"parent : false", iconSkin:"core", showAPI:true},
+ {id:501, pId:50, name:"},"},
+
+ {id:510, pId:50, t:"key", name:"key : {", open:true},
+ {id:5101, pId:510, t:"checked", name:"checked : \"checked\",", iconSkin:"check", showAPI:true},
+ {id:5102, pId:510, t:"children", name:"children : \"children\",", iconSkin:"core", showAPI:true},
+ {id:5103, pId:510, t:"name", name:"name : \"name\",", iconSkin:"core", showAPI:true},
+ {id:5104, pId:510, t:"title", name:"title : \"\"", iconSkin:"core", showAPI:true},
+ {id:5105, pId:510, t:"url", name:"url : \"url\"", iconSkin:"core", showAPI:true},
+ {id:511, pId:50, name:"},"},
+
+ {id:520, pId:50, t:"simpleData", name:"simpleData : {", open:true},
+ {id:5201, pId:520, t:"enable", name:"enable : false,", iconSkin:"core", showAPI:true},
+ {id:5202, pId:520, t:"idKey", name:"idKey : \"id\",", iconSkin:"core", showAPI:true},
+ {id:5203, pId:520, t:"pIdKey", name:"pIdKey : \"pId\",", iconSkin:"core", showAPI:true},
+ {id:5204, pId:520, t:"rootPId", name:"rootPId : null", iconSkin:"core", showAPI:true},
+ {id:521, pId:50, name:"}"},
+ {id:51, pId:1, name:"},"},
+ {id:52, pId:1, name:""},
+
+ {id:60, pId:1, t:"edit", name:"edit : {", open:true},
+ {id:601, pId:60, t:"drag", name:"drag : {", open:true},
+ {id:60111, pId:601, t:"autoExpandTrigger", name:"autoExpandTrigger : true,", iconSkin:"edit", showAPI:true},
+ {id:60101, pId:601, t:"isCopy", name:"isCopy : true,", iconSkin:"edit", showAPI:true},
+ {id:60102, pId:601, t:"isMove", name:"isMove : true,", iconSkin:"edit", showAPI:true},
+ {id:60103, pId:601, t:"prev", name:"prev : true,", iconSkin:"edit", showAPI:true},
+ {id:60104, pId:601, t:"next", name:"next : true,", iconSkin:"edit", showAPI:true},
+ {id:60105, pId:601, t:"inner", name:"inner : true,", iconSkin:"edit", showAPI:true},
+ {id:60107, pId:601, t:"borderMax", name:"borderMax : 10,", iconSkin:"edit", showAPI:true},
+ {id:60108, pId:601, t:"borderMin", name:"borderMin : -5,", iconSkin:"edit", showAPI:true},
+ {id:60106, pId:601, t:"minMoveSize", name:"minMoveSize : 5,", iconSkin:"edit", showAPI:true},
+ {id:60109, pId:601, t:"maxShowNodeNum", name:"maxShowNodeNum : 5,", iconSkin:"edit", showAPI:true},
+ {id:60110, pId:601, t:"autoOpenTime", name:"autoOpenTime : 500", iconSkin:"edit", showAPI:true},
+ {id:602, pId:60, name:"},"},
+ {id:608, pId:60, t:"editNameSelectAll", name:"editNameSelectAll : false,", iconSkin:"edit", showAPI:true},
+ {id:603, pId:60, t:"enable", name:"enable : false,", iconSkin:"edit", showAPI:true},
+ {id:604, pId:60, t:"removeTitle", name:"removeTitle : \"remove\",", iconSkin:"edit", showAPI:true},
+ {id:605, pId:60, t:"renameTitle", name:"renameTitle : \"rename\",", iconSkin:"edit", showAPI:true},
+ {id:606, pId:60, t:"showRemoveBtn", name:"showRemoveBtn : true,", iconSkin:"edit", showAPI:true},
+ {id:607, pId:60, t:"showRenameBtn", name:"showRenameBtn : true", iconSkin:"edit", showAPI:true},
+ {id:61, pId:1, name:"},"},
+ {id:62, pId:1, name:""},
+
+ {id:70, pId:1, t:"view", name:"view : {", open:true},
+ {id:7001, pId:70, t:"addDiyDom", name:"addDiyDom : null,", iconSkin:"core", showAPI:true},
+ {id:7002, pId:70, t:"addHoverDom", name:"addHoverDom : null,", iconSkin:"edit", showAPI:true},
+ {id:7003, pId:70, t:"autoCancelSelected", name:"autoCancelSelected : true,", iconSkin:"core", showAPI:true},
+ {id:7004, pId:70, t:"dblClickExpand", name:"dblClickExpand : true,", iconSkin:"core", showAPI:true},
+ {id:7005, pId:70, t:"expandSpeed", name:"expandSpeed : \"fast\",", iconSkin:"core", showAPI:true},
+ {id:7006, pId:70, t:"fontCss", name:"fontCss : {},", iconSkin:"core", showAPI:true},
+ {id:7012, pId:70, t:"nameIsHTML", name:"nameIsHTML : false,", iconSkin:"core", showAPI:true},
+ {id:7007, pId:70, t:"removeHoverDom", name:"removeHoverDom : null,", iconSkin:"edit", showAPI:true},
+ {id:7008, pId:70, t:"selectedMulti", name:"selectedMulti : true,", iconSkin:"core", showAPI:true},
+ {id:7009, pId:70, t:"showIcon", name:"showIcon : true,", iconSkin:"core", showAPI:true},
+ {id:7010, pId:70, t:"showLine", name:"showLine : true,", iconSkin:"core", showAPI:true},
+ {id:7011, pId:70, t:"showTitle", name:"showTitle : true,", iconSkin:"core", showAPI:true},
+ {id:7012, pId:70, t:"txtSelectedEnable", name:"txtSelectedEnable : false", iconSkin:"core", showAPI:true},
+ {id:71, pId:1, name:"}"},
+
+ {id:2, pId:0, name:"}"}
+ ];
+
+ var treenode_nodes =[
+ {id:1, pId:0, t:"treeNode", name:"treeNode : {", open:true},
+ {id:101, pId:1, t:"checked", name:"checked", iconSkin:"check", showAPI:true},
+ {id:102, pId:1, t:"children", name:"children", iconSkin:"core", showAPI:true},
+ {id:128, pId:1, t:"chkDisabled", name:"chkDisabled", iconSkin:"check", showAPI:true},
+ {id:127, pId:1, t:"click", name:"click", iconSkin:"core", showAPI:true},
+ {id:103, pId:1, t:"getCheckStatus", name:"getCheckStatus ()", iconSkin:"check", showAPI:true},
+ {id:104, pId:1, t:"getNextNode", name:"getNextNode ()", iconSkin:"core", showAPI:true},
+ {id:105, pId:1, t:"getParentNode", name:"getParentNode ()", iconSkin:"core", showAPI:true},
+ {id:106, pId:1, t:"getPreNode", name:"getPreNode ()", iconSkin:"core", showAPI:true},
+ {id:129, pId:1, t:"halfCheck", name:"halfCheck", iconSkin:"check", showAPI:true},
+ {id:107, pId:1, t:"icon", name:"icon", iconSkin:"core", showAPI:true},
+ {id:108, pId:1, t:"iconClose", name:"iconClose", iconSkin:"core", showAPI:true},
+ {id:109, pId:1, t:"iconOpen", name:"iconOpen", iconSkin:"core", showAPI:true},
+ {id:110, pId:1, t:"iconSkin", name:"iconSkin", iconSkin:"core", showAPI:true},
+ {id:131, pId:1, t:"isHidden", name:"isHidden", iconSkin:"hide", showAPI:true},
+ {id:111, pId:1, t:"isParent", name:"isParent", iconSkin:"core", showAPI:true},
+ {id:132, pId:1, t:"name", name:"name", iconSkin:"core", showAPI:true},
+ {id:112, pId:1, t:"nocheck", name:"nocheck", iconSkin:"check", showAPI:true},
+ {id:113, pId:1, t:"open", name:"open", iconSkin:"core", showAPI:true},
+ {id:133, pId:1, t:"target", name:"target", iconSkin:"core", showAPI:true},
+ {id:134, pId:1, t:"url", name:"url", iconSkin:"core", showAPI:true},
+ {id:114, pId:1, t:"diy", name:"*DIY*", iconSkin:"core", showAPI:true},
+ {id:115, pId:1, name:""},
+ {id:116, pId:1, t:"check_Child_State", name:"[check_Child_State]", iconSkin:"check", showAPI:true},
+ {id:117, pId:1, t:"check_Focus", name:"[check_Focus]", iconSkin:"check", showAPI:true},
+ {id:118, pId:1, t:"checkedOld", name:"[checkedOld]", iconSkin:"check", showAPI:true},
+ {id:119, pId:1, t:"editNameFlag", name:"[editNameFlag]", iconSkin:"edit", showAPI:true},
+ {id:120, pId:1, t:"isAjaxing", name:"[isAjaxing]", iconSkin:"core", showAPI:true},
+ {id:121, pId:1, t:"isFirstNode", name:"[isFirstNode]", iconSkin:"core", showAPI:true},
+ {id:122, pId:1, t:"isHover", name:"[isHover]", iconSkin:"edit", showAPI:true},
+ {id:123, pId:1, t:"isLastNode", name:"[isLastNode]", iconSkin:"core", showAPI:true},
+ {id:124, pId:1, t:"level", name:"[level]", iconSkin:"core", showAPI:true},
+ {id:125, pId:1, t:"parentTId", name:"[parentTId]", iconSkin:"core", showAPI:true},
+ {id:126, pId:1, t:"tId", name:"[tId]", iconSkin:"core", showAPI:true},
+ {id:130, pId:1, t:"zAsync", name:"[zAsync]", iconSkin:"core", showAPI:true},
+ {id:2, pId:0, name:"}"}
+ ];
+
+ var function_nodes =[
+ {id:1, pId:0, t:"$.fn.zTree", name:"$.fn.zTree : {", open:true},
+ {id:11, pId:1, t:"init", name:"init (obj, zSetting, zNodes)", iconSkin:"core", showAPI:true},
+ {id:12, pId:1, t:"getZTreeObj", name:"getZTreeObj (treeId)", iconSkin:"core", showAPI:true},
+ {id:14, pId:1, t:"destroy", name:"destroy (treeId)", iconSkin:"core", showAPI:true},
+ {id:13, pId:1, t:"_z", name:"_z : {tools, view, event, data}", iconSkin:"core", showAPI:true},
+ {id:2, pId:0, name:"}"},
+ {id:3, pId:0, name:""},
+ {id:4, pId:0, t:"zTreeObj", name:"zTreeObj : {", open:true},
+ {id:401, pId:4, t:"setting", name:"setting", iconSkin:"core", showAPI:true},
+ {id:402, pId:4, t:"addNodes", name:"addNodes (parentNode, newNodes, isSilent)", iconSkin:"core", showAPI:true},
+ {id:403, pId:4, t:"cancelEditName", name:"cancelEditName (newName)", iconSkin:"edit", showAPI:true},
+ {id:404, pId:4, t:"cancelSelectedNode", name:"cancelSelectedNode (node)", iconSkin:"core", showAPI:true},
+ {id:405, pId:4, t:"checkAllNodes", name:"checkAllNodes (checked)", iconSkin:"check", showAPI:true},
+ {id:406, pId:4, t:"checkNode", name:"checkNode (node, checked, checkTypeFlag, callbackFlag)", iconSkin:"check", showAPI:true},
+ {id:407, pId:4, t:"copyNode", name:"copyNode (targetNode, node, moveType, isSilent)", iconSkin:"edit", showAPI:true},
+ {id:436, pId:4, t:"destroy", name:"destroy ()", iconSkin:"core", showAPI:true},
+ {id:408, pId:4, t:"editName", name:"editName (node)", iconSkin:"edit", showAPI:true},
+ {id:409, pId:4, t:"expandAll", name:"expandAll (expandFlag)", iconSkin:"core", showAPI:true},
+ {id:410, pId:4, t:"expandNode", name:"expandNode (node, expandFlag, sonSign, focus, callbackFlag)", iconSkin:"core", showAPI:true},
+ {id:411, pId:4, t:"getChangeCheckedNodes", name:"getChangeCheckedNodes ()", iconSkin:"check", showAPI:true},
+ {id:412, pId:4, t:"getCheckedNodes", name:"getCheckedNodes (checked)", iconSkin:"check", showAPI:true},
+ {id:413, pId:4, t:"getNodeByParam", name:"getNodeByParam (key, value, parentNode)", iconSkin:"core", showAPI:true},
+ {id:414, pId:4, t:"getNodeByTId", name:"getNodeByTId (tId)", iconSkin:"core", showAPI:true},
+ {id:415, pId:4, t:"getNodeIndex", name:"getNodeIndex (node)", iconSkin:"core", showAPI:true},
+ {id:416, pId:4, t:"getNodes", name:"getNodes ()", iconSkin:"core", showAPI:true},
+ {id:431, pId:4, t:"getNodesByFilter", name:"getNodesByFilter (filter, isSingle, parentNode, invokeParam)", iconSkin:"core", showAPI:true},
+ {id:417, pId:4, t:"getNodesByParam", name:"getNodesByParam (key, value, parentNode)", iconSkin:"core", showAPI:true},
+ {id:418, pId:4, t:"getNodesByParamFuzzy", name:"getNodesByParamFuzzy (key, value, parentNode)", iconSkin:"core", showAPI:true},
+ {id:419, pId:4, t:"getSelectedNodes", name:"getSelectedNodes ()", iconSkin:"core", showAPI:true},
+ {id:432, pId:4, t:"hideNode", name:"hideNode (node)", iconSkin:"hide", showAPI:true},
+ {id:433, pId:4, t:"hideNodes", name:"hideNodes (nodes)", iconSkin:"hide", showAPI:true},
+ {id:420, pId:4, t:"moveNode", name:"moveNode (targetNode, node, moveType, isSilent)", iconSkin:"edit", showAPI:true},
+ {id:421, pId:4, t:"reAsyncChildNodes", name:"reAsyncChildNodes (parentNode, reloadType, isSilent)", iconSkin:"core", showAPI:true},
+ {id:422, pId:4, t:"refresh", name:"refresh ()", iconSkin:"core", showAPI:true},
+ {id:423, pId:4, t:"removeChildNodes", name:"removeChildNodes (parentNode)", iconSkin:"core", showAPI:true},
+ {id:424, pId:4, t:"removeNode", name:"removeNode (node, callbackFlag)", iconSkin:"core", showAPI:true},
+ {id:425, pId:4, t:"selectNode", name:"selectNode (node, addFlag)", iconSkin:"core", showAPI:true},
+ {id:430, pId:4, t:"setChkDisabled", name:"setChkDisabled (node, disabled, inheritParent, inheritChildren)", iconSkin:"check", showAPI:true},
+ {id:426, pId:4, t:"setEditable", name:"setEditable (editable)", iconSkin:"edit", showAPI:true},
+ {id:434, pId:4, t:"showNode", name:"showNode (node)", iconSkin:"hide", showAPI:true},
+ {id:435, pId:4, t:"showNodes", name:"showNodes (nodes)", iconSkin:"hide", showAPI:true},
+ {id:427, pId:4, t:"transformToArray", name:"transformToArray (nodes)", iconSkin:"core", showAPI:true},
+ {id:428, pId:4, t:"transformTozTreeNodes", name:"transformTozTreeNodes (simpleNodes)", iconSkin:"core", showAPI:true},
+ {id:429, pId:4, t:"updateNode", name:"updateNode (node, checkTypeFlag)", iconSkin:"core", showAPI:true},
+ {id:5, pId:0, name:"}"}
+ ];
+
+ apiContent.zTree_Setting = $.fn.zTree.init($("#settingTree"), $.fn.zTree._z.tools.clone(setting), setting_nodes);
+ apiContent.zTree_Node = $.fn.zTree.init($("#treenodeTree"), $.fn.zTree._z.tools.clone(setting), treenode_nodes);
+ apiContent.zTree_Function = $.fn.zTree.init($("#functionTree"), $.fn.zTree._z.tools.clone(setting), function_nodes);
+ this.bindEvent();
+
+ },
+ bindEvent: function() {
+ $(document).bind("keydown", this.listenKeyDown)
+ this.overlayCloseBtn.bind("click", apiContent.overlayClose);
+ this.searchResultInput.bind("click", function(e) {
+ $(this).prev().get(0).focus();
+ this.blur();
+ }).bind("focus", function(e) {
+ this.blur();
+ });
+ this.searchKey.bind("focus", this.focusKey)
+ .bind("blur", this.blurKey)
+ .bind("propertychange", this.searchNode)
+ .bind("input", this.searchNode);
+ this.searchPrevBtn.bind("click", this.searchPrev);
+ this.searchNextBtn.bind("click", this.searchNext);
+ },
+ setSameKey: function(value) {
+ apiContent.searchKey.attr("value", value);
+ },
+ focusKey: function(e) {
+ if (apiContent.searchKey.hasClass("empty")) {
+ apiContent.searchKey.removeClass("empty");
+ }
+ },
+ blurKey: function(e) {
+ apiContent.setSameKey(e.target.value);
+ if (e.target.value === "") {
+ apiContent.searchKey.addClass("empty");
+ }
+ },
+ listenKeyDown: function(e) {
+ if (e.keyCode=="13" && apiContent.overlayDiv.is(":hidden")) {
+ apiContent.openAPI();
+ } else if (e.keyCode=="37") {
+ apiContent.searchPrev();
+ } else if (e.keyCode=="13" || e.keyCode=="39") {
+ apiContent.searchNext();
+ }
+ },
+ openAPI: function() {
+ if (apiContent.searchNodes.length > 0) {
+ var setting_zTree = $.fn.zTree.getZTreeObj("settingTree"),
+ treenode_zTree = $.fn.zTree.getZTreeObj("treenodeTree"),
+ function_zTree = $.fn.zTree.getZTreeObj("functionTree");
+ if (apiContent.searchNodesCur < 0 || apiContent.searchNodesCur > apiContent.searchNodes.length -1) {
+ apiContent.searchNodesCur = 0;
+ }
+ var node = apiContent.searchNodes[apiContent.searchNodesCur];
+
+ if (node.tId.indexOf("setting") > -1) {
+ setting_zTree.selectNode(node);
+ } else if (node.tId.indexOf("treenode") > -1) {
+ treenode_zTree.selectNode(node);
+ } else {
+ function_zTree.selectNode(node);
+ }
+ apiContent.beforeClick(node.tId.substring(0, node.tId.indexOf("_")), node, true);
+ apiContent.searchCur();
+ }
+ },
+ searchNode: function(e) {
+ var setting_zTree = $.fn.zTree.getZTreeObj("settingTree"),
+ treenode_zTree = $.fn.zTree.getZTreeObj("treenodeTree"),
+ function_zTree = $.fn.zTree.getZTreeObj("functionTree");
+ if (apiContent.curKey == e.target.value) return;
+ apiContent.curKey = e.target.value;
+ var value = $.trim(apiContent.curKey);
+ apiContent.setSameKey(apiContent.curKey);
+ if (apiContent.searchKey.hasClass("empty")) {
+ value = "";
+ apiContent.searchResultInput.removeClass("noResult").attr("value","");
+ }
+ if (apiContent.lastValue === value) return;
+
+ apiContent.updateNodes(false);
+ apiContent.lastValue = value;
+ if (value === "" || value.length < 2) {
+ apiContent.searchNodes = [];
+ apiContent.searchNodesCur = -1;
+ apiContent.searchCur(true);
+ return;
+ }
+
+ var settingNodeList = setting_zTree.getNodesByFilter(apiContent.searchFilter);
+ var functionNodeList = function_zTree.getNodesByFilter(apiContent.searchFilter);
+ var treenodeNodeList = treenode_zTree.getNodesByFilter(apiContent.searchFilter);
+ apiContent.searchNodes = settingNodeList.concat(functionNodeList).concat(treenodeNodeList);
+ apiContent.searchNodesCur = -1;
+ apiContent.searchCur();
+ apiContent.updateNodes(true);
+ },
+ searchFilter: function(node) {
+ var value = $.trim(apiContent.searchKey.get(0).value).toLowerCase();
+ return (node.showAPI && node.name.toLowerCase().indexOf(value) > -1);
+ },
+ searchPrev: function(e) {
+ if (apiContent.searchPrevBtn.hasClass("disabled")) return;
+ apiContent.searchNodesCur--;
+ if (apiContent.searchNodesCur < 0 || apiContent.searchNodesCur > apiContent.searchNodes.length -1) {
+ apiContent.searchNodesCur = apiContent.searchNodes.length -1;
+ }
+ apiContent.openAPI();
+ },
+ searchNext: function(e) {
+ if (apiContent.searchNextBtn.hasClass("disabled")) return;
+ apiContent.searchNodesCur++;
+ apiContent.openAPI();
+ },
+ searchCur: function(init) {
+ var result = apiContent.searchNodes;
+ if (init) {
+ apiContent.searchResultInput.removeClass("noResult").attr("value","");
+ } else if (result.length == 0) {
+ apiContent.searchResultInput.addClass("noResult").attr("value"," [ 0 / 0 ] ");
+ } else {
+ apiContent.searchResultInput.removeClass("noResult").attr("value"," [ " + (apiContent.searchNodesCur > -1 ? apiContent.searchNodesCur+1 : "?")+ " / " + result.length + " ] ");
+ }
+ if (result.length > 0) {
+ apiContent.searchPrevBtn.removeClass("disabled");
+ apiContent.searchNextBtn.removeClass("disabled");
+ } else {
+ apiContent.searchPrevBtn.addClass("disabled");
+ apiContent.searchNextBtn.addClass("disabled");
+ }
+ },
+ updateNodes: function(highlight) {
+ var setting_zTree = $.fn.zTree.getZTreeObj("settingTree"),
+ treenode_zTree = $.fn.zTree.getZTreeObj("treenodeTree"),
+ function_zTree = $.fn.zTree.getZTreeObj("functionTree"),
+ node = null;
+ for( var i=0, l=apiContent.searchNodes.length; i<l; i++) {
+ node = apiContent.searchNodes[i];
+ if (node.level > 0) {
+ node.highlight = highlight;
+ if (node.tId.indexOf("setting") > -1) {
+ setting_zTree.updateNode(node);
+ } else if (node.tId.indexOf("treenode") > -1) {
+ treenode_zTree.updateNode(node);
+ } else {
+ function_zTree.updateNode(node);
+ }
+ }
+ }
+ },
+ getFontCss: function(treeId, treeNode) {
+ return (!!treeNode.highlight) ? {color:"#A60000", "font-weight":"bold"} : {color:"#333", "font-weight":"normal"};
+ },
+ getTitle: function(treeId, node) {
+ var t = [], n = node;
+ while (n && !!n.t) {
+ t.push(n.t);
+ n = n.getParentNode();
+ }
+ t = t.reverse();
+ node.tt = t.join('.');
+ return true;
+ },
+ showIcon: function(treeId, node) {
+ return (!!node.iconSkin);
+ },
+ onNodeCreated: function (e, treeId, node) {
+ var a = $("#" + node.tId + "_a");
+ if (node.showAPI) {
+ a.attr("rel", "#overlayDiv");
+ } else {
+ a.css({cursor: "default"});
+ }
+ },
+ beforeClick: function (treeId, node, noClear) {
+ if (!node.showAPI) return false;
+ var o = $("#" + node.tId + "_a");
+ if (!!apiContent.apiCache[node.tId]) {
+ apiContent.tmpDiv.html(apiContent.apiCache[node.tId]);
+ apiContent.overlayShow(o, (apiContent.lastNode === node));
+ } else {
+ apiContent.overlayAjax(treeId, node);
+ }
+ apiContent.lastNode = node;
+ if (node.tId.indexOf("settingTree")>-1) {
+ apiContent.settingDiv.removeClass("right").addClass("left");
+ apiContent.functionDiv.removeClass("left").addClass("right");
+ } else {
+ apiContent.settingDiv.removeClass("left").addClass("right");
+ apiContent.functionDiv.removeClass("right").addClass("left");
+ }
+
+ if (!noClear) {
+ apiContent.clearSelectedNode();
+ }
+ return true;
+ },
+ clearSelectedNode: function() {
+ apiContent.zTree_Setting.cancelSelectedNode();
+ apiContent.zTree_Node.cancelSelectedNode();
+ apiContent.zTree_Function.cancelSelectedNode();
+ },
+ overlayAutoClose: function(e) {
+ var eId = e.target.id, eRel = e.target.getAttribute("rel"), eClass = e.target.className;
+ if (eId === "overlayDiv" || eId === "overlayDivArrow" || eClass.indexOf("searchPrev") > -1 || eClass.indexOf("searchNext") > -1 || !!eRel) return;
+ if (!$(e.target).parents("[rel]").length && !$(e.target).parents("#overlayDiv").length) {
+ apiContent.overlayClose();
+ }
+ },
+ overlayClose: function() {
+ var o = apiContent.overlayDiv;
+ o.stop();
+ apiContent.clearSelectedNode();
+ if (ie) {
+ o.hide();
+ } else {
+ setTimeout(function() {o.fadeTo("fast", 0, function(){o.hide();})}, 200);
+ }
+ $(document).unbind("click", apiContent.overlayAutoClose);
+ },
+ overlayShow: function(target, isSameNode) {
+ var w = $(window), o = apiContent.overlayDiv, a = apiContent.overlayArrow,
+ oc = apiContent.overlayContent, c = apiContent.contentBoxDiv,
+ t = target.offset().top - 30,
+ cMaxLeft = c.offset().left + c.outerWidth({margin:true}) - o.outerWidth({margin:true}) - 10,
+ l = Math.min(cMaxLeft, target.offset().left + target.width() + 40),
+ arrowT = target.offset().top + 16,
+ wMinTop = 100, footerHeight = 50, onlyFade = false,
+ wHeight = w.height(), wScrollTop=w.scrollTop(), wMaxTop = wHeight + wScrollTop - footerHeight;
+ if (!apiContent.overlayMaxTop) {
+ apiContent.overlayMaxTop = apiContent.contentBoxDiv.offset().top + apiContent.contentBoxDiv.height();
+ }
+ o.stop();
+ if (o.css("display") !== "block") {
+ o.css({top: t, left: l});
+ a.css({top:arrowT - t});
+ $(document).bind("click", apiContent.overlayAutoClose);
+ }
+ if (ie) {
+ onlyFade = true;
+ o.show();
+ } else {
+ o.fadeTo("fast", 1);
+ }
+
+ var h = apiContent.tmpDiv.outerHeight({margin:true}) + apiContent.overlaySearch.outerHeight();
+ if ((t + h) > wMaxTop) {
+ t = wMaxTop - h;
+ }
+ if ((t + h) > apiContent.overlayMaxTop) {
+ t = apiContent.overlayMaxTop - h;
+ }
+ t = Math.max(t, wScrollTop, wMinTop);
+ if ((t + h) > ($("body").height()-footerHeight-20)) {
+ o.css("padding-bottom", footerHeight + "px");
+ } else {
+ o.css("padding-bottom", "0");
+ }
+ apiContent.overlayDetailDiv.empty();
+ apiContent.overlayDetailDiv.append(apiContent.tmpDiv.children());
+ if (!onlyFade) {
+ onlyFade = (isSameNode && t === parseInt(o.css("top").replace("px", "")));
+ }
+
+ a.removeClass("reverse");
+ if ( (arrowT - t) > (h-55) ) {
+ a.addClass("reverse");
+ arrowT -= 55;
+ }
+
+ if (onlyFade) {
+ o.css({top: t, left: l});
+ oc.css({height: h});
+ a.css({top:arrowT - t});
+ } else {
+ o.animate({top: t, left: l}, {duration: "normal",easing: "swing", complete:null});
+ oc.animate({height: h}, {duration: "fast",easing: "swing", complete:null});
+ a.animate({top:arrowT - t}, {duration: "normal",easing: "linear", complete:null});
+ }
+ },
+ overlayAjax: function(treeId, node) {
+ var o = $("#" + node.tId + "_a");
+ if (node.isAjax) return;
+ node.isAjax = true;
+ $.ajax({
+ type: "get",
+ url: "" + lang + "/" + node.tt.replace("$.", "") + ".html",
+ data: null,
+ dataType: "text",
+ success: function(msg) {
+ if (!apiContent.tmpDiv) {
+ var tmpDiv = $(document.createElement("div"));
+ tmpDiv.addClass("baby_overlay_tmp");
+ $("body").append(tmpDiv)
+ apiContent.tmpDiv = $(document.createElement("div"));
+ apiContent.tmpDiv.addClass("details");
+ tmpDiv.append(apiContent.tmpDiv);
+
+ } else {
+ apiContent.tmpDiv.empty();
+ }
+ apiContent.tmpDiv.html(msg);
+ apiContent.overlayShow(o, false);
+ apiContent.apiCache[node.tId] = msg;
+ node.isAjax = false;
+ },
+ error: function(XMLHttpRequest, textStatus, errorThrown) {
+ alert(ajaxMsg)
+ if (apiContent.tmpDiv) apiContent.tmpDiv.empty();
+ node.isAjax = false;
+ }
+ });
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/apiCss/common.css b/common/src/main/webapp/thirdparty/zTree/api/apiCss/common.css
new file mode 100644
index 0000000..78f910c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/apiCss/common.css
@@ -0,0 +1,219 @@
+/* Resets */
+html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
+ margin: 0;padding: 0;border: 0;outline: 0;font-weight: inherit;font-style: inherit;font-size: 100%;font-family: inherit;vertical-align: baseline;}
+:focus {outline: 0;}
+body {color: #2f332a;font: 15px/21px Arial, Helvetica, simsun, sans-serif;background: #528036 url(img/background.jpg) no-repeat fixed 0 0;}
+p {padding-bottom: 20px;}
+ol, ul {list-style: none;}
+table {border-collapse: separate;border-spacing: 0;}
+caption, th, td {text-align: left;font-weight: normal;}
+strong {font-weight: bold;}
+em {font-style: italic;}
+hr {display: none;}
+.font1 {color: white;background-color: #528036;}
+.right {float: right;}
+.left {float: left;}
+.hide {display: none;}
+.round {-moz-border-radius: 15px;-webkit-border-radius: 15px;-khtml-border-radius: 15px;border-radius: 15px;}
+.clear {clear: both;}
+.clearfix {display: block;}
+.clearfix:after {content: ".";display: block;clear: both;visibility: hidden;line-height: 0;height: 0;}
+html[xmlns] .clearfix {display: block;}
+* html .clearfix {height: 1%;}
+
+/* Link Styles */
+a {color: #528036;}
+a:link, a:visited {text-decoration: none;}
+a:hover {color: #000;text-decoration: none;}
+a:active {text-decoration: none;}
+
+/* Headings */
+h1, h2, h3, h4, h5, h6 {color: #2f332a;font-weight: bold;font-family: Helvetica, Arial, simsun, sans-serif;padding-bottom: 5px;}
+h1 {font-size: 36px;line-height: 44px;}
+h2 {font-size: 20px;line-height: 20px;}
+h3 {font-size: 14px;line-height: 14px;}
+h4 {font-size: 14px;font-weight: normal;line-height: 25px;}
+
+/* Wraps */
+.header_wrap {position: relative;min-width: 940px;padding: 100px 30px 0 30px;}
+.content_wrap {position: relative;min-width: 940px;padding: 0 30px 50px 30px;}
+.footer_wrap {bottom: 0;height: 47px;width: 100%;background-color: #1b1b1b;border-top: 1px solid #749e58;}
+
+/* Header */
+.header {position: relative;width: 940px;margin: 0 auto;height: 160px;border: 1px solid white;background: transparent url(img/header-bg.png) repeat-x 0 -50px;}
+.header-text {padding: 40px 25px 15px 120px;font-size: 18px;line-height: 24px;color: #747d67;font-family: Helvetica, sans-serif;}
+.header-text img {padding-bottom: 5px;}
+.shortcuts {white-space: nowrap;text-align: right;position: absolute;top: -45px;right: 5px;}
+.shortcuts.language {top: -85px;right:0px;}
+.shortcuts li {display: inline;font-size: 18px;line-height: 28px;font-family: Helvetica, Arial, simsun, sans-serif;padding-bottom: 5px;margin-left: 30px;cursor: pointer;}
+.shortcuts li button {cursor: pointer;}
+.shortcuts li span {border-bottom: 1px dotted white;}
+.shortcuts li span.selected {padding: 2px;background-color: #528036;}
+.shortcuts li a {color: #fff;}
+.ieSuggest {display:none;font-size: 12px;color: silver;position: absolute;left: 10px;top: 2px;}
+.google_plus {position: absolute;right: 10px; top:10px;}
+.light-bulb {position: absolute;left: -20px;bottom: -35px;width:116px;height:180px;background-image:url(img/lightbulb.png);background-repeat: no-repeat;}
+
+/* Content */
+.content {position: relative;width: 940px;margin: 0 auto;}
+.nav_section {position: relative;height: 20px;font-family: "Myriad Pro", "Trebuchet MS", sans-serif;font-size: 15px;color: #253;padding: 20px 0;}
+.nav_section ul {position: absolute;right: 10px;}
+.nav_section ul li {display: inline;line-height: 20px;margin: 0 5px 0 20px;border-bottom: 1px dotted white;}
+.nav_section ul li.noline {border-bottom: 0;}
+.nav_section ul li a {color: #fff;}
+.nav_section ul li a.selected {padding: 2px;background-color: #528036;}
+.nav_section ul li.first {border: none;}
+.content .title {margin: 50px 30px 20px 70px;}
+.content li {margin-bottom: 5px;}
+.contentBox {position: relative;overflow: hidden;border: 1px solid white;min-height: 200px;line-height: 25px;background: transparent url(img/contact-bg.png) repeat-x 0 0;}
+
+.zTreeInfo {display:none;width: 940px;position: absolute;}
+.zTreeInfo p {padding-bottom: 50px;}
+.zTreeInfo-left {float: left;width: 280px;height:300px;padding: 0 50px 60px 75px;background:url(img/zTreeIntroduction.jpg) no-repeat 30px 30px;}
+.zTreeInfo-right {position: relative;float: right;width: 475px;padding: 0 50px 60px 0;}
+.zTreeInfo-right li {font-size: 12px;list-style-type: disc;}
+
+.license {display:none;width: 940px;position: absolute;}
+
+.donateInfo {display:block;width: 940px;position: absolute;}
+
+.links {display:none;width: 940px;position: absolute;}
+.links .content {float: left;width: 160px;height:200px;padding: 0 10px 10px 2px;text-align: center;}
+.links .content.first {margin-left: 30px;}
+
+.contact {display:none;width: 940px;position: absolute;}
+.contact .myhome { position: absolute; top:10px; left:620px; width:300px; height:266px; background: transparent url(img/myhome.gif) scroll no-repeat 0 0;}
+
+.siteTag {position: absolute;left: -16px;top: 109px;z-index: 10;width: 65px;height: 46px;padding:0;margin:0 10px 0 0;
+ vertical-align:middle;border:0 none;background: transparent url(img/siteTag.png) scroll no-repeat 0 0;}
+.siteTag.tag_zTreeInfo {background-position: 0 0}
+.siteTag.tag_license {background-position: 0 -46px}
+.siteTag.tag_donate {background-position: 0 -92px}
+.siteTag.tag_contact {background-position: 0 -138px}
+
+.apiContent {width: 940px;}
+.apiContent .right {float: right;padding-right: 100px;}
+.apiContent .left {float: left;padding-right: 20px;border-right: 1px dotted silver;}
+.api_setting {position: relative;margin:20px 0 20px 20px;}
+.api_function {position: relative;margin:20px 0 20px 30px;padding-right: 10px;}
+.api_content_title {text-align: center;font-weight: bold;}
+
+.demoContent {width: 940px;}
+.demoContent .right {float: right;padding: 20px;width: 600px;}
+.demoContent .left {float: left;padding: 20px;}
+.demoContent iframe {width:600px;min-height: 530px;}
+
+.faqContent {width: 940px;}
+.faqContent .right {float: right;padding: 20px;width: 600px;}
+.faqContent .left {float: left;padding: 20px;}
+.faqContent iframe {width:600px;min-height: 300px;}
+
+.baby_overlay_tmp {position: absolute;top:0; left:-5000px;display:block;visibility: hidden;width:640px;font-size:11px;}
+.baby_overlay_tmp .details {padding: 20px;}
+.baby_overlay {display:none;position:absolute;z-index:99;left:0; top:0;width:640px;color:#fff;font-size:11px;}
+.baby_overlay .content {width:100%; height:100px;overflow: hidden;background: transparent url(img/overlay_bg.png) scroll repeat 0 0;}
+.baby_overlay .details {padding:0 20px 20px 20px;}
+.baby_overlay .close {background-image:url(img/close.png);position:absolute; right:5px; top:5px;cursor:pointer;height:36px;width:36px;}
+.baby_overlay_arrow {background-image:url(img/overlay_arrow.png);background-position:0 0;position:absolute;height:40px;width:40px;left: -40px;}
+.baby_overlay_arrow.reverse {background-position:0 -40px;}
+
+/* Footer */
+.footer {position: relative;min-width: 1000px;font: 14px/24px arial, helvetica, sans-serif;}
+.footer ul {position:absolute;left: 0px;border:1px solid #393939;background:#262626;padding:12px 0px;line-height: 18px;display: none;list-style: none;}
+.footer ul li a {display:block;padding: 2px 15px;color: #9c9c9c;text-indent: 0;}
+.footer ul li a:hover {text-decoration:none;color: #fff;}
+.footer-logo {position:absolute;margin: 10px 0 0 30px;width:122px; height:24px;top:0; left:0;background: transparent url(img/footer-logo.png) no-repeat 0 0;}
+.footer_mii {position: absolute;right: 558px;top: 8px;z-index: 10;padding: 4px 0;}
+.footer_mii a {font-size:10px;color:#649140}
+.footer_mii a:hover {color:#B6D76F}
+.footer_siteMap {position: absolute;right: 358px;top: 8px;width: 155px;z-index: 10;padding: 4px 0;}
+.footer_siteMap .footer_siteMap_header {width:155px;text-indent: -9999px;background: transparent url(img/footer_siteMap.gif) no-repeat 0 0;}
+.footer_siteMap ul {top:-202px;width:180px;}
+.footer_siteMap:hover ul {left: 0}
+.footer_contact {position: absolute;right: 193px;top: 8px;width: 155px;z-index: 10;padding: 4px 0;}
+.footer_contact .footer_contact_header {width:155px;text-indent: -9999px;background: transparent url(img/footer_contact.gif) no-repeat 0px 0px;}
+.footer_contact ul {top:-113px;width:153px;}
+.footer_contact:hover ul {left: 0}
+.footer_download {position: absolute;right: 60px;top: 8px;width: 123px;z-index: 10;padding: 4px 0;}
+.footer_download .footer_download_header {width:123px;text-indent: -9999px;background: transparent url(img/footer_download.png) no-repeat 0px 0px;}
+.footer_download ul {top:-113px;width:140px;}
+.footer_download:hover ul {left: 0}
+
+/* button icon */
+button {vertical-align:middle;border:0 none;background: transparent no-repeat 0 0 scroll;}
+
+.shortcuts button.ico {width:24px; height:24px;padding:0; margin:0 10px 0 0;background-image:url(img/menuIcon.png)}
+.shortcuts button.home {background-position: 0 0}
+.shortcuts button.demo {background-position: 0 -24px}
+.shortcuts button.api {background-position: 0 -48px}
+.shortcuts button.faq {background-position: 0 -72px}
+.shortcuts button.donate {background-position: 0 -144px}
+.shortcuts button.download {background-position: 0 -96px}
+.shortcuts button.face {background-position: 0 -120px}
+.shortcuts button.cn {width:48px; height:24px;padding:0; margin:0 10px 0 0;background-image:url(img/chinese.png)}
+.shortcuts button.en {width:48px; height:24px;padding:0; margin:0 10px 0 0;background-image:url(img/english.png)}
+
+.content button.ico {width:24px; height:24px;padding:0; margin:0 10px 0 0;}
+
+.content button.ico16 {width:16px; height:16px;padding:0; margin:0 5px 0 0;background-image:url("img/apiMenu.png");}
+button.z_core {margin-top: -4px;background-position:0 0;}
+button.z_check {margin-top: -4px;background-position:0 -16px;}
+button.z_edit {margin-top: -4px;background-position:0 -32px;}
+button.z_hide {margin-top: -4px;background-position:0 -64px;}
+button.z_search {margin-top: -4px;background-position:0 -48px;}
+button.searchPrev {margin-top: -4px;background-position:-16px 0;cursor:pointer}
+button.searchNext {margin-top: -4px;background-position:-16px -16px;cursor:pointer}
+button.searchPrev.disabled {margin-top: -4px;background-position:-16px -32px;cursor:auto}
+button.searchNext.disabled {margin-top: -4px;background-position:-16px -48px;cursor:auto}
+input.search {margin:0;padding:2px 0; border:0;}
+input.searchKey {width:150px;}
+input.searchResult {margin-left:-3px;width:65px;text-align:right;background-color:white;color:#707070}
+input.searchResult.noResult {background-color:#ff6666;color:black}
+.baby_overlay div.overlaySearch {text-align:right;padding-right:50px;padding-top:12px;}
+
+/* api overlay*/
+.apiDetail .topLine {border-top: 1px dashed #376B29;margin-top: 5px;padding-top: 5px;}
+.apiDetail .highlight_red {color:#A60000;}
+.apiDetail .highlight_green {color:#A7F43D;}
+.apiDetail h1, .apiDetail h2, .apiDetail h3, .apiDetail h4, .apiDetail h5, .apiDetail h6 {color: white;padding: 0;}
+.apiDetail h2 {color: #A7F43D;margin: 5px auto;padding: 5px;font-size: 20px;}
+.apiDetail h2 span {font-size: 14px;float: right;font-weight: normal;margin: 2px 20px 0 0;vertical-align: bottom;}
+.apiDetail h2 span.path {float: left;margin: 2px 0 0 0;vertical-align: bottom;}
+.apiDetail h3 {margin: 5px auto;padding: 5px;font-size: 14px;font-weight: normal;}
+.apiDetail h3 span.h3_info {margin-left: 20px;font-size: 12px;}
+.apiDetail h4 {margin: 0 auto;padding: 0 5px;font-size: 12px;font-weight: normal;line-height: 16px;}
+.apiDetail .desc h4 {color: black;}
+.apiDetail h4 b{width: 150px;display:inline-block;}
+.apiDetail h4 span{width: 230px;display:inline-block;}
+
+.apiDetail pre, .apiDetail .desc {background: #E8FCD6;color: black;margin: 10px;padding: 10px;display: block;}
+.apiDetail pre {word-wrap: break-word;}
+.apiDetail p{margin-left: 5px;padding: 0;}
+.apiDetail .longdesc {margin-top: 5px;}
+.apiDetail .longdesc p{font-size: 12px;line-height:1.5;margin:3px 0;}
+.apiDetail .longdesc b{font-size: 14px;}
+.apiDetail table {border-collapse:collapse;}
+.apiDetail table td {border:1px solid silver;text-align: center;vertical-align: middle;}
+.apiDetail table thead td {font-weight: bold}
+
+.apiDetail button {width:16px; height:16px; vertical-align:middle; border:0 none; cursor: pointer;
+ background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
+ background-image:url("zTreeStyle/img/zTreeStandard.png");}
+
+.apiDetail button.chk {width:13px; height:13px; margin:0 3px 2px 0; cursor: auto}
+.apiDetail button.chk.checkbox_false_full {background-position:0 0}
+.apiDetail button.chk.checkbox_false_full_focus {background-position:0 -14px}
+.apiDetail button.chk.checkbox_false_part {background-position:0 -28px}
+.apiDetail button.chk.checkbox_false_part_focus {background-position:0 -42px}
+.apiDetail button.chk.checkbox_true_full {background-position:-14px 0}
+.apiDetail button.chk.checkbox_true_full_focus {background-position:-14px -14px}
+.apiDetail button.chk.checkbox_true_part {background-position:-14px -28px}
+.apiDetail button.chk.checkbox_true_part_focus {background-position:-14px -42px}
+.apiDetail button.chk.radio_false_full {background-position:-28px 0}
+.apiDetail button.chk.radio_false_full_focus {background-position:-28px -14px}
+.apiDetail button.chk.radio_false_part {background-position:-28px -28px}
+.apiDetail button.chk.radio_false_part_focus {background-position:-28px -42px}
+.apiDetail button.chk.radio_true_full {background-position:-42px 0}
+.apiDetail button.chk.radio_true_full_focus {background-position:-42px -14px}
+.apiDetail button.chk.radio_true_part {background-position:-42px -28px}
+.apiDetail button.chk.radio_true_part_focus {background-position:-42px -42px} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/apiCss/common_ie6.css b/common/src/main/webapp/thirdparty/zTree/api/apiCss/common_ie6.css
new file mode 100644
index 0000000..aacaf59
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/apiCss/common_ie6.css
@@ -0,0 +1,23 @@
+* html{
+/* background-image:url(about:blank);*/
+ background-attachment:fixed;
+}
+html pre {word-wrap: break-word}
+.header {background-image: none;background-color: #F0F6E4;}
+
+.ieSuggest {display:block;}
+.shortcuts button.cn {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='apiCss/img/chinese.png');background-image: none;}
+.shortcuts button.en {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='apiCss/img/english.png');background-image: none;}
+
+.light-bulb {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='apiCss/img/lightbulb.png');background-image: none;}
+.contentBox {background-image: none;background-color: #F0F6E4;}
+.zTreeInfo {background-image: none;background-color: #F0F6E4;}
+
+.content button.ico16 {*background-image:url("img/apiMenu.gif")}
+.siteTag {background-image: none;}
+.apiContent .right {float: right;padding-right: 50px;}
+
+div.baby_overlay {background-color: #3C6E31;background-image:none;color:#fff;}
+div.baby_overlay .close {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='apiCss/img/overlay_close_IE6.gif');background-image: none;}
+.baby_overlay_arrow {background-image:url(img/overlay_arrow.gif);}
+.apiDetail button {background-image:url("img/zTreeStandard.gif")} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/apiMenu.gif b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/apiMenu.gif
new file mode 100644
index 0000000..066fc8e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/apiMenu.gif
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/apiMenu.png b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/apiMenu.png
new file mode 100644
index 0000000..9acec50
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/apiMenu.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/background.jpg b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/background.jpg
new file mode 100644
index 0000000..003375f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/background.jpg
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/chinese.png b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/chinese.png
new file mode 100644
index 0000000..d3b57fc
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/chinese.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/close.png b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/close.png
new file mode 100644
index 0000000..69e41e3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/close.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/contact-bg.png b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/contact-bg.png
new file mode 100644
index 0000000..a3d7a5f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/contact-bg.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/english.png b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/english.png
new file mode 100644
index 0000000..2ad2d7d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/english.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/header-bg.png b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/header-bg.png
new file mode 100644
index 0000000..a2baacf
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/header-bg.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/lightbulb.png b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/lightbulb.png
new file mode 100644
index 0000000..c99357a
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/lightbulb.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/overlay_arrow.gif b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/overlay_arrow.gif
new file mode 100644
index 0000000..e7c3e6d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/overlay_arrow.gif
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/overlay_arrow.png b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/overlay_arrow.png
new file mode 100644
index 0000000..d790a11
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/overlay_arrow.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/overlay_bg.png b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/overlay_bg.png
new file mode 100644
index 0000000..5f81ee6
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/overlay_bg.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/overlay_close_IE6.gif b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/overlay_close_IE6.gif
new file mode 100644
index 0000000..42cb8d8
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/overlay_close_IE6.gif
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/zTreeStandard.gif b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/zTreeStandard.gif
new file mode 100644
index 0000000..3f69a5b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/zTreeStandard.gif
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/zTreeStandard.png b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/zTreeStandard.png
new file mode 100644
index 0000000..33c9e84
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/apiCss/img/zTreeStandard.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/api/apiCss/jquery-1.6.2.min.js b/common/src/main/webapp/thirdparty/zTree/api/apiCss/jquery-1.6.2.min.js
new file mode 100644
index 0000000..8cdc80e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/apiCss/jquery-1.6.2.min.js
@@ -0,0 +1,18 @@
+/*!
+ * jQuery JavaScript Library v1.6.2
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Thu Jun 30 14:16:56 2011 -0400
+ */
+(function(a,b){function cv(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cs(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cr(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cq(){cn=b}function cp(){setTimeout(cq,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bZ(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bY(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bC.test(a)?d(a,e):bY(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bY(a+"["+e+"]",b[e],c,d);else d(a,b)}function bX(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bR,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bX(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bX(a,c,d,e,"*",g));return l}function bW(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bN),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bA(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bv:bw;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bx(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bm(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(be,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bl(a){f.nodeName(a,"input")?bk(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bk)}function bk(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bj(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bi(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bh(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bg(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function W(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(R.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(a,b){return(a&&a!=="*"?a+".":"")+b.replace(z,"`").replace(A,"&")}function M(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(x,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function K(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function E(){return!0}function D(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z])/ig,x=function(a,b){return b.toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!A){A=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||D.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(H)return H.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g](h)}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0},m&&f.extend(p,{position:"absolute",left:-1e3,top:-1e3});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]||i[c]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u=/\:|^on/,v,w;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(o);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(o);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(n," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=w:v&&c!=="className"&&(f.nodeName(a,"form")||u.test(c))&&(i=v)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}},value:{get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return f.prop(a,c)?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.attrHooks.title=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var x=/\.(.*)$/,y=/^(?:textarea|input|select)$/i,z=/\./g,A=/ /g,B=/[^\w\s.|`]/g,C=function(a){return a.replace(B,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=D;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=D);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),C).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.
+shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,N(a.origType,a.selector),f.extend({},a,{handler:M,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,N(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?E:D):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=E;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=E;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=E,this.stopPropagation()},isDefaultPrevented:D,isPropagationStopped:D,isImmediatePropagationStopped:D};var F=function(a){var b=a.relatedTarget,c=!1,d=a.type;a.type=a.data,b!==this&&(b&&(c=f.contains(this,b)),c||(f.event.handle.apply(this,arguments),a.type=d))},G=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?G:F,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?G:F)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=b.type;(c==="submit"||c==="image")&&f(b).closest("form").length&&K("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=b.type;(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&K("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var H,I=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},J=function(c){var d=c.target,e,g;if(!!y.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=I(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:J,beforedeactivate:J,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&J.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&J.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",I(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in H)f.event.add(this,c+".specialChange",H[c]);return y.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return y.test(this.nodeName)}},H=f.event.special.change.filters,H.focus=H.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f.data(this,"lastToggle"+a.guid)||0)%d;f.data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var L={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||D,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=x.exec(h),k="",j&&(k=j[0],h=h.replace(x,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,L[h]?(a.push(L[h]+k),h=h+k):h=(L[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+N(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+N(h,m),e)}return this}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){if(a===b){g=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var O=/Until$/,P=/^(?:parents|prevUntil|prevAll)/,Q=/,/,R=/^.[^:#\[\.,]*$/,S=Array.prototype.slice,T=f.expr.match.POS,U={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(W(this,a,!1),"not",a)},filter:function(a){return this.pushStack(W(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d<e;d++)i=a[d],j[i]||(j[i]=T.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(l?l.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var X=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,Z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,$=/<([\w:]+)/,_=/<tbody/i,ba=/<|&#?\w+;/,bb=/<(?:script|object|embed|option|style)/i,bc=/checked\s*(?:[^=]|=\s*.checked.)/i,bd=/\/(java|ecma)script/i,be=/^\s*<!(?:\[CDATA\[|\-\-)/,bf={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};bf.optgroup=bf.option,bf.tbody=bf.tfoot=bf.colgroup=bf.caption=bf.thead,bf.th=bf.td,f.support.htmlSerialize||(bf._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(X,""):null;if(typeof a=="string"&&!bb.test(a)&&(f.support.leadingWhitespace||!Y.test(a))&&!bf[($.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Z,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bc.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bg(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bm)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i;b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!bb.test(a[0])&&(f.support.checkClone||!bc.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[a[0]]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j
+)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bi(a,d),e=bj(a),g=bj(d);for(h=0;e[h];++h)bi(e[h],g[h])}if(b){bh(a,d);if(c){e=bj(a),g=bj(d);for(h=0;e[h];++h)bh(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!ba.test(k))k=b.createTextNode(k);else{k=k.replace(Z,"<$1></$2>");var l=($.exec(k)||["",""])[1].toLowerCase(),m=bf[l]||bf._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=_.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&Y.test(k)&&o.insertBefore(b.createTextNode(Y.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bl(k[i]);else bl(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bd.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bn=/alpha\([^)]*\)/i,bo=/opacity=([^)]*)/,bp=/([A-Z]|^ms)/g,bq=/^-?\d+(?:px)?$/i,br=/^-?\d/,bs=/^[+\-]=/,bt=/[^+\-\.\de]+/g,bu={position:"absolute",visibility:"hidden",display:"block"},bv=["Left","Right"],bw=["Top","Bottom"],bx,by,bz;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bx(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d;if(h==="number"&&isNaN(d)||d==null)return;h==="string"&&bs.test(d)&&(d=+d.replace(bt,"")+parseFloat(f.css(a,c)),h="number"),h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bx)return bx(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bA(a,b,d);f.swap(a,bu,function(){e=bA(a,b,d)});return e}},set:function(a,b){if(!bq.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bo.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bn.test(g)?g.replace(bn,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bx(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(by=function(a,c){var d,e,g;c=c.replace(bp,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bz=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bq.test(d)&&br.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bx=by||bz,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bB=/%20/g,bC=/\[\]$/,bD=/\r?\n/g,bE=/#.*$/,bF=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bG=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bH=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bI=/^(?:GET|HEAD)$/,bJ=/^\/\//,bK=/\?/,bL=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bM=/^(?:select|textarea)/i,bN=/\s+/,bO=/([?&])_=[^&]*/,bP=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bQ=f.fn.load,bR={},bS={},bT,bU;try{bT=e.href}catch(bV){bT=c.createElement("a"),bT.href="",bT=bT.href}bU=bP.exec(bT.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bQ)return bQ.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bL,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bM.test(this.nodeName)||bG.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bD,"\r\n")}}):{name:b.name,value:c.replace(bD,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bT,isLocal:bH.test(bU[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML}},ajaxPrefilter:bW(bR),ajaxTransport:bW(bS),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a?4:0;var o,r,u,w=l?bZ(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=b$(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bF.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bE,"").replace(bJ,bU[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bN),d.crossDomain==null&&(r=bP.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bU[1]&&r[2]==bU[2]&&(r[3]||(r[1]==="http:"?80:443))==(bU[3]||(bU[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bX(bR,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bI.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bK.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bO,"$1_="+x);d.url=y+(y===d.url?(bK.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", */*; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bX(bS,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){status<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bB,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn,co=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cr("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cs(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cr("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cr("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return this[e.queue===!1?"each":"queue"](function(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(j=cs(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],cj.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=ck.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[i]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cr("show",1),slideUp:cr("hide",1),slideToggle:cr("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default,d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function h(a){return d.step(a)}var d=this,e=f.fx,g;this.startTime=cn||cp(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,h.elem=this.elem,h()&&f.timers.push(h)&&!cl&&(co?(cl=!0,g=function(){cl&&(co(g),e.tick())},co(g)):cl=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=cn||cp(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cl),cl=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var ct=/^t(?:able|d|h)$/i,cu=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cv(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!ct.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cu.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cu.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cv(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cv(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/apiCss/jquery.ztree.core-3.5.js b/common/src/main/webapp/thirdparty/zTree/api/apiCss/jquery.ztree.core-3.5.js
new file mode 100644
index 0000000..705bdb4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/apiCss/jquery.ztree.core-3.5.js
@@ -0,0 +1,69 @@
+/*
+ * JQuery zTree core v3.5.16
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2014-03-09
+ */
+(function(p){var G,H,I,J,K,L,r={},u={},v={},M={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{children:"children",name:"name",title:"",url:"url"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",url:"",autoParam:[],
+otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},w=[function(b){var a=b.treeObj,c=e.event;a.bind(c.NODECREATED,function(a,c,g){j.apply(b.callback.onNodeCreated,
+[a,c,g])});a.bind(c.CLICK,function(a,c,g,l,h){j.apply(b.callback.onClick,[c,g,l,h])});a.bind(c.EXPAND,function(a,c,g){j.apply(b.callback.onExpand,[a,c,g])});a.bind(c.COLLAPSE,function(a,c,g){j.apply(b.callback.onCollapse,[a,c,g])});a.bind(c.ASYNC_SUCCESS,function(a,c,g,l){j.apply(b.callback.onAsyncSuccess,[a,c,g,l])});a.bind(c.ASYNC_ERROR,function(a,c,g,l,h,e){j.apply(b.callback.onAsyncError,[a,c,g,l,h,e])});a.bind(c.REMOVE,function(a,c,g){j.apply(b.callback.onRemove,[a,c,g])})}],x=[function(b){var a=
+e.event;b.treeObj.unbind(a.NODECREATED).unbind(a.CLICK).unbind(a.EXPAND).unbind(a.COLLAPSE).unbind(a.ASYNC_SUCCESS).unbind(a.ASYNC_ERROR).unbind(a.REMOVE)}],y=[function(b){var a=h.getCache(b);a||(a={},h.setCache(b,a));a.nodes=[];a.doms=[]}],z=[function(b,a,c,d,f,g){if(c){var l=h.getRoot(b),e=b.data.key.children;c.level=a;c.tId=b.treeId+"_"+ ++l.zId;c.parentTId=d?d.tId:null;c.open=typeof c.open=="string"?j.eqs(c.open,"true"):!!c.open;c[e]&&c[e].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent=typeof c.isParent==
+"string"?j.eqs(c.isParent,"true"):!!c.isParent,c.open=c.isParent&&!b.async.enable?c.open:!1,c.zAsync=!c.isParent);c.isFirstNode=f;c.isLastNode=g;c.getParentNode=function(){return h.getNodeCache(b,c.parentTId)};c.getPreNode=function(){return h.getPreNode(b,c)};c.getNextNode=function(){return h.getNextNode(b,c)};c.isAjaxing=!1;h.fixPIdKeyValue(b,c)}}],s=[function(b){var a=b.target,c=h.getSetting(b.data.treeId),d="",f=null,g="",l="",i=null,n=null,k=null;if(j.eqs(b.type,"mousedown"))l="mousedown";else if(j.eqs(b.type,
+"mouseup"))l="mouseup";else if(j.eqs(b.type,"contextmenu"))l="contextmenu";else if(j.eqs(b.type,"click"))if(j.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+e.id.SWITCH)!==null)d=j.getNodeMainDom(a).id,g="switchNode";else{if(k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}]))d=j.getNodeMainDom(k).id,g="clickNode"}else if(j.eqs(b.type,"dblclick")&&(l="dblclick",k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}])))d=j.getNodeMainDom(k).id,g="switchNode";if(l.length>0&&d.length==0&&
+(k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}])))d=j.getNodeMainDom(k).id;if(d.length>0)switch(f=h.getNodeCache(c,d),g){case "switchNode":f.isParent?j.eqs(b.type,"click")||j.eqs(b.type,"dblclick")&&j.apply(c.view.dblClickExpand,[c.treeId,f],c.view.dblClickExpand)?i=G:g="":g="";break;case "clickNode":i=H}switch(l){case "mousedown":n=I;break;case "mouseup":n=J;break;case "dblclick":n=K;break;case "contextmenu":n=L}return{stop:!1,node:f,nodeEventType:g,nodeEventCallback:i,treeEventType:l,
+treeEventCallback:n}}],A=[function(b){var a=h.getRoot(b);a||(a={},h.setRoot(b,a));a[b.data.key.children]=[];a.expandTriggerFlag=!1;a.curSelectedList=[];a.noSelection=!0;a.createdNodes=[];a.zId=0;a._ver=(new Date).getTime()}],B=[],C=[],D=[],E=[],F=[],h={addNodeCache:function(b,a){h.getCache(b).nodes[h.getNodeCacheId(a.tId)]=a},getNodeCacheId:function(b){return b.substring(b.lastIndexOf("_")+1)},addAfterA:function(b){C.push(b)},addBeforeA:function(b){B.push(b)},addInnerAfterA:function(b){E.push(b)},
+addInnerBeforeA:function(b){D.push(b)},addInitBind:function(b){w.push(b)},addInitUnBind:function(b){x.push(b)},addInitCache:function(b){y.push(b)},addInitNode:function(b){z.push(b)},addInitProxy:function(b,a){a?s.splice(0,0,b):s.push(b)},addInitRoot:function(b){A.push(b)},addNodesData:function(b,a,c){var d=b.data.key.children;a[d]||(a[d]=[]);if(a[d].length>0)a[d][a[d].length-1].isLastNode=!1,i.setNodeLineIcos(b,a[d][a[d].length-1]);a.isParent=!0;a[d]=a[d].concat(c)},addSelectedNode:function(b,a){var c=
+h.getRoot(b);h.isSelectedNode(b,a)||c.curSelectedList.push(a)},addCreatedNode:function(b,a){(b.callback.onNodeCreated||b.view.addDiyDom)&&h.getRoot(b).createdNodes.push(a)},addZTreeTools:function(b){F.push(b)},exSetting:function(b){p.extend(!0,M,b)},fixPIdKeyValue:function(b,a){b.data.simpleData.enable&&(a[b.data.simpleData.pIdKey]=a.parentTId?a.getParentNode()[b.data.simpleData.idKey]:b.data.simpleData.rootPId)},getAfterA:function(b,a,c){for(var d=0,f=C.length;d<f;d++)C[d].apply(this,arguments)},
+getBeforeA:function(b,a,c){for(var d=0,f=B.length;d<f;d++)B[d].apply(this,arguments)},getInnerAfterA:function(b,a,c){for(var d=0,f=E.length;d<f;d++)E[d].apply(this,arguments)},getInnerBeforeA:function(b,a,c){for(var d=0,f=D.length;d<f;d++)D[d].apply(this,arguments)},getCache:function(b){return v[b.treeId]},getNextNode:function(b,a){if(!a)return null;for(var c=b.data.key.children,d=a.parentTId?a.getParentNode():h.getRoot(b),f=0,g=d[c].length-1;f<=g;f++)if(d[c][f]===a)return f==g?null:d[c][f+1];return null},
+getNodeByParam:function(b,a,c,d){if(!a||!c)return null;for(var f=b.data.key.children,g=0,l=a.length;g<l;g++){if(a[g][c]==d)return a[g];var e=h.getNodeByParam(b,a[g][f],c,d);if(e)return e}return null},getNodeCache:function(b,a){if(!a)return null;var c=v[b.treeId].nodes[h.getNodeCacheId(a)];return c?c:null},getNodeName:function(b,a){return""+a[b.data.key.name]},getNodeTitle:function(b,a){return""+a[b.data.key.title===""?b.data.key.name:b.data.key.title]},getNodes:function(b){return h.getRoot(b)[b.data.key.children]},
+getNodesByParam:function(b,a,c,d){if(!a||!c)return[];for(var f=b.data.key.children,g=[],l=0,e=a.length;l<e;l++)a[l][c]==d&&g.push(a[l]),g=g.concat(h.getNodesByParam(b,a[l][f],c,d));return g},getNodesByParamFuzzy:function(b,a,c,d){if(!a||!c)return[];for(var f=b.data.key.children,g=[],d=d.toLowerCase(),l=0,e=a.length;l<e;l++)typeof a[l][c]=="string"&&a[l][c].toLowerCase().indexOf(d)>-1&&g.push(a[l]),g=g.concat(h.getNodesByParamFuzzy(b,a[l][f],c,d));return g},getNodesByFilter:function(b,a,c,d,f){if(!a)return d?
+null:[];for(var g=b.data.key.children,e=d?null:[],i=0,n=a.length;i<n;i++){if(j.apply(c,[a[i],f],!1)){if(d)return a[i];e.push(a[i])}var k=h.getNodesByFilter(b,a[i][g],c,d,f);if(d&&k)return k;e=d?k:e.concat(k)}return e},getPreNode:function(b,a){if(!a)return null;for(var c=b.data.key.children,d=a.parentTId?a.getParentNode():h.getRoot(b),f=0,g=d[c].length;f<g;f++)if(d[c][f]===a)return f==0?null:d[c][f-1];return null},getRoot:function(b){return b?u[b.treeId]:null},getRoots:function(){return u},getSetting:function(b){return r[b]},
+getSettings:function(){return r},getZTreeTools:function(b){return(b=this.getRoot(this.getSetting(b)))?b.treeTools:null},initCache:function(b){for(var a=0,c=y.length;a<c;a++)y[a].apply(this,arguments)},initNode:function(b,a,c,d,f,g){for(var e=0,h=z.length;e<h;e++)z[e].apply(this,arguments)},initRoot:function(b){for(var a=0,c=A.length;a<c;a++)A[a].apply(this,arguments)},isSelectedNode:function(b,a){for(var c=h.getRoot(b),d=0,f=c.curSelectedList.length;d<f;d++)if(a===c.curSelectedList[d])return!0;return!1},
+removeNodeCache:function(b,a){var c=b.data.key.children;if(a[c])for(var d=0,f=a[c].length;d<f;d++)arguments.callee(b,a[c][d]);h.getCache(b).nodes[h.getNodeCacheId(a.tId)]=null},removeSelectedNode:function(b,a){for(var c=h.getRoot(b),d=0,f=c.curSelectedList.length;d<f;d++)if(a===c.curSelectedList[d]||!h.getNodeCache(b,c.curSelectedList[d].tId))c.curSelectedList.splice(d,1),d--,f--},setCache:function(b,a){v[b.treeId]=a},setRoot:function(b,a){u[b.treeId]=a},setZTreeTools:function(b,a){for(var c=0,d=
+F.length;c<d;c++)F[c].apply(this,arguments)},transformToArrayFormat:function(b,a){if(!a)return[];var c=b.data.key.children,d=[];if(j.isArray(a))for(var f=0,g=a.length;f<g;f++)d.push(a[f]),a[f][c]&&(d=d.concat(h.transformToArrayFormat(b,a[f][c])));else d.push(a),a[c]&&(d=d.concat(h.transformToArrayFormat(b,a[c])));return d},transformTozTreeFormat:function(b,a){var c,d,f=b.data.simpleData.idKey,g=b.data.simpleData.pIdKey,e=b.data.key.children;if(!f||f==""||!a)return[];if(j.isArray(a)){var h=[],i=[];
+for(c=0,d=a.length;c<d;c++)i[a[c][f]]=a[c];for(c=0,d=a.length;c<d;c++)i[a[c][g]]&&a[c][f]!=a[c][g]?(i[a[c][g]][e]||(i[a[c][g]][e]=[]),i[a[c][g]][e].push(a[c])):h.push(a[c]);return h}else return[a]}},m={bindEvent:function(b){for(var a=0,c=w.length;a<c;a++)w[a].apply(this,arguments)},unbindEvent:function(b){for(var a=0,c=x.length;a<c;a++)x[a].apply(this,arguments)},bindTree:function(b){var a={treeId:b.treeId},c=b.treeObj;b.view.txtSelectedEnable||c.bind("selectstart",function(a){a=a.originalEvent.srcElement.nodeName.toLowerCase();
+return a==="input"||a==="textarea"}).css({"-moz-user-select":"-moz-none"});c.bind("click",a,m.proxy);c.bind("dblclick",a,m.proxy);c.bind("mouseover",a,m.proxy);c.bind("mouseout",a,m.proxy);c.bind("mousedown",a,m.proxy);c.bind("mouseup",a,m.proxy);c.bind("contextmenu",a,m.proxy)},unbindTree:function(b){b.treeObj.unbind("click",m.proxy).unbind("dblclick",m.proxy).unbind("mouseover",m.proxy).unbind("mouseout",m.proxy).unbind("mousedown",m.proxy).unbind("mouseup",m.proxy).unbind("contextmenu",m.proxy)},
+doProxy:function(b){for(var a=[],c=0,d=s.length;c<d;c++){var f=s[c].apply(this,arguments);a.push(f);if(f.stop)break}return a},proxy:function(b){var a=h.getSetting(b.data.treeId);if(!j.uCanDo(a,b))return!0;for(var a=m.doProxy(b),c=!0,d=0,f=a.length;d<f;d++){var g=a[d];g.nodeEventCallback&&(c=g.nodeEventCallback.apply(g,[b,g.node])&&c);g.treeEventCallback&&(c=g.treeEventCallback.apply(g,[b,g.node])&&c)}return c}};G=function(b,a){var c=h.getSetting(b.data.treeId);if(a.open){if(j.apply(c.callback.beforeCollapse,
+[c.treeId,a],!0)==!1)return!0}else if(j.apply(c.callback.beforeExpand,[c.treeId,a],!0)==!1)return!0;h.getRoot(c).expandTriggerFlag=!0;i.switchNode(c,a);return!0};H=function(b,a){var c=h.getSetting(b.data.treeId),d=c.view.autoCancelSelected&&(b.ctrlKey||b.metaKey)&&h.isSelectedNode(c,a)?0:c.view.autoCancelSelected&&(b.ctrlKey||b.metaKey)&&c.view.selectedMulti?2:1;if(j.apply(c.callback.beforeClick,[c.treeId,a,d],!0)==!1)return!0;d===0?i.cancelPreSelectedNode(c,a):i.selectNode(c,a,d===2);c.treeObj.trigger(e.event.CLICK,
+[b,c.treeId,a,d]);return!0};I=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeMouseDown,[c.treeId,a],!0)&&j.apply(c.callback.onMouseDown,[b,c.treeId,a]);return!0};J=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeMouseUp,[c.treeId,a],!0)&&j.apply(c.callback.onMouseUp,[b,c.treeId,a]);return!0};K=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeDblClick,[c.treeId,a],!0)&&j.apply(c.callback.onDblClick,[b,c.treeId,a]);return!0};
+L=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeRightClick,[c.treeId,a],!0)&&j.apply(c.callback.onRightClick,[b,c.treeId,a]);return typeof c.callback.onRightClick!="function"};var j={apply:function(b,a,c){return typeof b=="function"?b.apply(N,a?a:[]):c},canAsync:function(b,a){var c=b.data.key.children;return b.async.enable&&a&&a.isParent&&!(a.zAsync||a[c]&&a[c].length>0)},clone:function(b){if(b===null)return null;var a=j.isArray(b)?[]:{},c;for(c in b)a[c]=b[c]instanceof
+Date?new Date(b[c].getTime()):typeof b[c]==="object"?arguments.callee(b[c]):b[c];return a},eqs:function(b,a){return b.toLowerCase()===a.toLowerCase()},isArray:function(b){return Object.prototype.toString.apply(b)==="[object Array]"},$:function(b,a,c){a&&typeof a!="string"&&(c=a,a="");return typeof b=="string"?p(b,c?c.treeObj.get(0).ownerDocument:null):p("#"+b.tId+a,c?c.treeObj:null)},getMDom:function(b,a,c){if(!a)return null;for(;a&&a.id!==b.treeId;){for(var d=0,f=c.length;a.tagName&&d<f;d++)if(j.eqs(a.tagName,
+c[d].tagName)&&a.getAttribute(c[d].attrName)!==null)return a;a=a.parentNode}return null},getNodeMainDom:function(b){return p(b).parent("li").get(0)||p(b).parentsUntil("li").parent().get(0)},isChildOrSelf:function(b,a){return p(b).closest("#"+a).length>0},uCanDo:function(){return!0}},i={addNodes:function(b,a,c,d){if(!b.data.keep.leaf||!a||a.isParent)if(j.isArray(c)||(c=[c]),b.data.simpleData.enable&&(c=h.transformTozTreeFormat(b,c)),a){var f=k(a,e.id.SWITCH,b),g=k(a,e.id.ICON,b),l=k(a,e.id.UL,b);if(!a.open)i.replaceSwitchClass(a,
+f,e.folder.CLOSE),i.replaceIcoClass(a,g,e.folder.CLOSE),a.open=!1,l.css({display:"none"});h.addNodesData(b,a,c);i.createNodes(b,a.level+1,c,a);d||i.expandCollapseParentNode(b,a,!0)}else h.addNodesData(b,h.getRoot(b),c),i.createNodes(b,0,c,null)},appendNodes:function(b,a,c,d,f,g){if(!c)return[];for(var e=[],j=b.data.key.children,k=0,m=c.length;k<m;k++){var o=c[k];if(f){var t=(d?d:h.getRoot(b))[j].length==c.length&&k==0;h.initNode(b,a,o,d,t,k==c.length-1,g);h.addNodeCache(b,o)}t=[];o[j]&&o[j].length>
+0&&(t=i.appendNodes(b,a+1,o[j],o,f,g&&o.open));g&&(i.makeDOMNodeMainBefore(e,b,o),i.makeDOMNodeLine(e,b,o),h.getBeforeA(b,o,e),i.makeDOMNodeNameBefore(e,b,o),h.getInnerBeforeA(b,o,e),i.makeDOMNodeIcon(e,b,o),h.getInnerAfterA(b,o,e),i.makeDOMNodeNameAfter(e,b,o),h.getAfterA(b,o,e),o.isParent&&o.open&&i.makeUlHtml(b,o,e,t.join("")),i.makeDOMNodeMainAfter(e,b,o),h.addCreatedNode(b,o))}return e},appendParentULDom:function(b,a){var c=[],d=k(a,b);!d.get(0)&&a.parentTId&&(i.appendParentULDom(b,a.getParentNode()),
+d=k(a,b));var f=k(a,e.id.UL,b);f.get(0)&&f.remove();f=i.appendNodes(b,a.level+1,a[b.data.key.children],a,!1,!0);i.makeUlHtml(b,a,c,f.join(""));d.append(c.join(""))},asyncNode:function(b,a,c,d){var f,g;if(a&&!a.isParent)return j.apply(d),!1;else if(a&&a.isAjaxing)return!1;else if(j.apply(b.callback.beforeAsync,[b.treeId,a],!0)==!1)return j.apply(d),!1;if(a)a.isAjaxing=!0,k(a,e.id.ICON,b).attr({style:"","class":e.className.BUTTON+" "+e.className.ICO_LOADING});var l={};for(f=0,g=b.async.autoParam.length;a&&
+f<g;f++){var q=b.async.autoParam[f].split("="),n=q;q.length>1&&(n=q[1],q=q[0]);l[n]=a[q]}if(j.isArray(b.async.otherParam))for(f=0,g=b.async.otherParam.length;f<g;f+=2)l[b.async.otherParam[f]]=b.async.otherParam[f+1];else for(var m in b.async.otherParam)l[m]=b.async.otherParam[m];var o=h.getRoot(b)._ver;p.ajax({contentType:b.async.contentType,type:b.async.type,url:j.apply(b.async.url,[b.treeId,a],b.async.url),data:l,dataType:b.async.dataType,success:function(f){if(o==h.getRoot(b)._ver){var g=[];try{g=
+!f||f.length==0?[]:typeof f=="string"?eval("("+f+")"):f}catch(l){g=f}if(a)a.isAjaxing=null,a.zAsync=!0;i.setNodeLineIcos(b,a);g&&g!==""?(g=j.apply(b.async.dataFilter,[b.treeId,a,g],g),i.addNodes(b,a,g?j.clone(g):[],!!c)):i.addNodes(b,a,[],!!c);b.treeObj.trigger(e.event.ASYNC_SUCCESS,[b.treeId,a,f]);j.apply(d)}},error:function(c,d,f){if(o==h.getRoot(b)._ver){if(a)a.isAjaxing=null;i.setNodeLineIcos(b,a);b.treeObj.trigger(e.event.ASYNC_ERROR,[b.treeId,a,c,d,f])}}});return!0},cancelPreSelectedNode:function(b,
+a){for(var c=h.getRoot(b).curSelectedList,d=c.length-1;d>=0;d--)if(!a||a===c[d])if(k(c[d],e.id.A,b).removeClass(e.node.CURSELECTED),a){h.removeSelectedNode(b,a);break}if(!a)h.getRoot(b).curSelectedList=[]},createNodeCallback:function(b){if(b.callback.onNodeCreated||b.view.addDiyDom)for(var a=h.getRoot(b);a.createdNodes.length>0;){var c=a.createdNodes.shift();j.apply(b.view.addDiyDom,[b.treeId,c]);b.callback.onNodeCreated&&b.treeObj.trigger(e.event.NODECREATED,[b.treeId,c])}},createNodes:function(b,
+a,c,d){if(c&&c.length!=0){var f=h.getRoot(b),g=b.data.key.children,g=!d||d.open||!!k(d[g][0],b).get(0);f.createdNodes=[];a=i.appendNodes(b,a,c,d,!0,g);d?(d=k(d,e.id.UL,b),d.get(0)&&d.append(a.join(""))):b.treeObj.append(a.join(""));i.createNodeCallback(b)}},destroy:function(b){b&&(h.initCache(b),h.initRoot(b),m.unbindTree(b),m.unbindEvent(b),b.treeObj.empty(),delete r[b.treeId])},expandCollapseNode:function(b,a,c,d,f){var g=h.getRoot(b),l=b.data.key.children;if(a){if(g.expandTriggerFlag){var q=f,
+f=function(){q&&q();a.open?b.treeObj.trigger(e.event.EXPAND,[b.treeId,a]):b.treeObj.trigger(e.event.COLLAPSE,[b.treeId,a])};g.expandTriggerFlag=!1}if(!a.open&&a.isParent&&(!k(a,e.id.UL,b).get(0)||a[l]&&a[l].length>0&&!k(a[l][0],b).get(0)))i.appendParentULDom(b,a),i.createNodeCallback(b);if(a.open==c)j.apply(f,[]);else{var c=k(a,e.id.UL,b),g=k(a,e.id.SWITCH,b),n=k(a,e.id.ICON,b);a.isParent?(a.open=!a.open,a.iconOpen&&a.iconClose&&n.attr("style",i.makeNodeIcoStyle(b,a)),a.open?(i.replaceSwitchClass(a,
+g,e.folder.OPEN),i.replaceIcoClass(a,n,e.folder.OPEN),d==!1||b.view.expandSpeed==""?(c.show(),j.apply(f,[])):a[l]&&a[l].length>0?c.slideDown(b.view.expandSpeed,f):(c.show(),j.apply(f,[]))):(i.replaceSwitchClass(a,g,e.folder.CLOSE),i.replaceIcoClass(a,n,e.folder.CLOSE),d==!1||b.view.expandSpeed==""||!(a[l]&&a[l].length>0)?(c.hide(),j.apply(f,[])):c.slideUp(b.view.expandSpeed,f))):j.apply(f,[])}}else j.apply(f,[])},expandCollapseParentNode:function(b,a,c,d,f){a&&(a.parentTId?(i.expandCollapseNode(b,
+a,c,d),a.parentTId&&i.expandCollapseParentNode(b,a.getParentNode(),c,d,f)):i.expandCollapseNode(b,a,c,d,f))},expandCollapseSonNode:function(b,a,c,d,f){var g=h.getRoot(b),e=b.data.key.children,g=a?a[e]:g[e],e=a?!1:d,j=h.getRoot(b).expandTriggerFlag;h.getRoot(b).expandTriggerFlag=!1;if(g)for(var k=0,m=g.length;k<m;k++)g[k]&&i.expandCollapseSonNode(b,g[k],c,e);h.getRoot(b).expandTriggerFlag=j;i.expandCollapseNode(b,a,c,d,f)},makeDOMNodeIcon:function(b,a,c){var d=h.getNodeName(a,c),d=a.view.nameIsHTML?
+d:d.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");b.push("<span id='",c.tId,e.id.ICON,"' title='' treeNode",e.id.ICON," class='",i.makeNodeIcoClass(a,c),"' style='",i.makeNodeIcoStyle(a,c),"'></span><span id='",c.tId,e.id.SPAN,"'>",d,"</span>")},makeDOMNodeLine:function(b,a,c){b.push("<span id='",c.tId,e.id.SWITCH,"' title='' class='",i.makeNodeLineClass(a,c),"' treeNode",e.id.SWITCH,"></span>")},makeDOMNodeMainAfter:function(b){b.push("</li>")},makeDOMNodeMainBefore:function(b,
+a,c){b.push("<li id='",c.tId,"' class='",e.className.LEVEL,c.level,"' tabindex='0' hidefocus='true' treenode>")},makeDOMNodeNameAfter:function(b){b.push("</a>")},makeDOMNodeNameBefore:function(b,a,c){var d=h.getNodeTitle(a,c),f=i.makeNodeUrl(a,c),g=i.makeNodeFontCss(a,c),l=[],k;for(k in g)l.push(k,":",g[k],";");b.push("<a id='",c.tId,e.id.A,"' class='",e.className.LEVEL,c.level,"' treeNode",e.id.A,' onclick="',c.click||"",'" ',f!=null&&f.length>0?"href='"+f+"'":""," target='",i.makeNodeTarget(c),
+"' style='",l.join(""),"'");j.apply(a.view.showTitle,[a.treeId,c],a.view.showTitle)&&d&&b.push("title='",d.replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"'");b.push(">")},makeNodeFontCss:function(b,a){var c=j.apply(b.view.fontCss,[b.treeId,a],b.view.fontCss);return c&&typeof c!="function"?c:{}},makeNodeIcoClass:function(b,a){var c=["ico"];a.isAjaxing||(c[0]=(a.iconSkin?a.iconSkin+"_":"")+c[0],a.isParent?c.push(a.open?e.folder.OPEN:e.folder.CLOSE):c.push(e.folder.DOCU));return e.className.BUTTON+
+" "+c.join("_")},makeNodeIcoStyle:function(b,a){var c=[];if(!a.isAjaxing){var d=a.isParent&&a.iconOpen&&a.iconClose?a.open?a.iconOpen:a.iconClose:a.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;");(b.view.showIcon==!1||!j.apply(b.view.showIcon,[b.treeId,a],!0))&&c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(b,a){var c=[];b.view.showLine?a.level==0&&a.isFirstNode&&a.isLastNode?c.push(e.line.ROOT):a.level==0&&a.isFirstNode?c.push(e.line.ROOTS):a.isLastNode?c.push(e.line.BOTTOM):
+c.push(e.line.CENTER):c.push(e.line.NOLINE);a.isParent?c.push(a.open?e.folder.OPEN:e.folder.CLOSE):c.push(e.folder.DOCU);return i.makeNodeLineClassEx(a)+c.join("_")},makeNodeLineClassEx:function(b){return e.className.BUTTON+" "+e.className.LEVEL+b.level+" "+e.className.SWITCH+" "},makeNodeTarget:function(b){return b.target||"_blank"},makeNodeUrl:function(b,a){var c=b.data.key.url;return a[c]?a[c]:null},makeUlHtml:function(b,a,c,d){c.push("<ul id='",a.tId,e.id.UL,"' class='",e.className.LEVEL,a.level,
+" ",i.makeUlLineClass(b,a),"' style='display:",a.open?"block":"none","'>");c.push(d);c.push("</ul>")},makeUlLineClass:function(b,a){return b.view.showLine&&!a.isLastNode?e.line.LINE:""},removeChildNodes:function(b,a){if(a){var c=b.data.key.children,d=a[c];if(d){for(var f=0,g=d.length;f<g;f++)h.removeNodeCache(b,d[f]);h.removeSelectedNode(b);delete a[c];b.data.keep.parent?k(a,e.id.UL,b).empty():(a.isParent=!1,a.open=!1,c=k(a,e.id.SWITCH,b),d=k(a,e.id.ICON,b),i.replaceSwitchClass(a,c,e.folder.DOCU),
+i.replaceIcoClass(a,d,e.folder.DOCU),k(a,e.id.UL,b).remove())}}},setFirstNode:function(b,a){var c=b.data.key.children;if(a[c].length>0)a[c][0].isFirstNode=!0},setLastNode:function(b,a){var c=b.data.key.children,d=a[c].length;if(d>0)a[c][d-1].isLastNode=!0},removeNode:function(b,a){var c=h.getRoot(b),d=b.data.key.children,f=a.parentTId?a.getParentNode():c;a.isFirstNode=!1;a.isLastNode=!1;a.getPreNode=function(){return null};a.getNextNode=function(){return null};if(h.getNodeCache(b,a.tId)){k(a,b).remove();
+h.removeNodeCache(b,a);h.removeSelectedNode(b,a);for(var g=0,l=f[d].length;g<l;g++)if(f[d][g].tId==a.tId){f[d].splice(g,1);break}i.setFirstNode(b,f);i.setLastNode(b,f);var j,g=f[d].length;if(!b.data.keep.parent&&g==0)f.isParent=!1,f.open=!1,g=k(f,e.id.UL,b),l=k(f,e.id.SWITCH,b),j=k(f,e.id.ICON,b),i.replaceSwitchClass(f,l,e.folder.DOCU),i.replaceIcoClass(f,j,e.folder.DOCU),g.css("display","none");else if(b.view.showLine&&g>0){var n=f[d][g-1],g=k(n,e.id.UL,b),l=k(n,e.id.SWITCH,b);j=k(n,e.id.ICON,b);
+f==c?f[d].length==1?i.replaceSwitchClass(n,l,e.line.ROOT):(c=k(f[d][0],e.id.SWITCH,b),i.replaceSwitchClass(f[d][0],c,e.line.ROOTS),i.replaceSwitchClass(n,l,e.line.BOTTOM)):i.replaceSwitchClass(n,l,e.line.BOTTOM);g.removeClass(e.line.LINE)}}},replaceIcoClass:function(b,a,c){if(a&&!b.isAjaxing&&(b=a.attr("class"),b!=void 0)){b=b.split("_");switch(c){case e.folder.OPEN:case e.folder.CLOSE:case e.folder.DOCU:b[b.length-1]=c}a.attr("class",b.join("_"))}},replaceSwitchClass:function(b,a,c){if(a){var d=
+a.attr("class");if(d!=void 0){d=d.split("_");switch(c){case e.line.ROOT:case e.line.ROOTS:case e.line.CENTER:case e.line.BOTTOM:case e.line.NOLINE:d[0]=i.makeNodeLineClassEx(b)+c;break;case e.folder.OPEN:case e.folder.CLOSE:case e.folder.DOCU:d[1]=c}a.attr("class",d.join("_"));c!==e.folder.DOCU?a.removeAttr("disabled"):a.attr("disabled","disabled")}}},selectNode:function(b,a,c){c||i.cancelPreSelectedNode(b);k(a,e.id.A,b).addClass(e.node.CURSELECTED);h.addSelectedNode(b,a)},setNodeFontCss:function(b,
+a){var c=k(a,e.id.A,b),d=i.makeNodeFontCss(b,a);d&&c.css(d)},setNodeLineIcos:function(b,a){if(a){var c=k(a,e.id.SWITCH,b),d=k(a,e.id.UL,b),f=k(a,e.id.ICON,b),g=i.makeUlLineClass(b,a);g.length==0?d.removeClass(e.line.LINE):d.addClass(g);c.attr("class",i.makeNodeLineClass(b,a));a.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled");f.removeAttr("style");f.attr("style",i.makeNodeIcoStyle(b,a));f.attr("class",i.makeNodeIcoClass(b,a))}},setNodeName:function(b,a){var c=h.getNodeTitle(b,a),d=
+k(a,e.id.SPAN,b);d.empty();b.view.nameIsHTML?d.html(h.getNodeName(b,a)):d.text(h.getNodeName(b,a));j.apply(b.view.showTitle,[b.treeId,a],b.view.showTitle)&&k(a,e.id.A,b).attr("title",!c?"":c)},setNodeTarget:function(b,a){k(a,e.id.A,b).attr("target",i.makeNodeTarget(a))},setNodeUrl:function(b,a){var c=k(a,e.id.A,b),d=i.makeNodeUrl(b,a);d==null||d.length==0?c.removeAttr("href"):c.attr("href",d)},switchNode:function(b,a){a.open||!j.canAsync(b,a)?i.expandCollapseNode(b,a,!a.open):b.async.enable?i.asyncNode(b,
+a)||i.expandCollapseNode(b,a,!a.open):a&&i.expandCollapseNode(b,a,!a.open)}};p.fn.zTree={consts:{className:{BUTTON:"button",LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch"},event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",
+NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_z:{tools:j,view:i,event:m,data:h},getZTreeObj:function(b){return(b=h.getZTreeTools(b))?b:null},destroy:function(b){if(b&&b.length>0)i.destroy(h.getSetting(b));else for(var a in r)i.destroy(r[a])},init:function(b,a,c){var d=j.clone(M);p.extend(!0,d,a);d.treeId=b.attr("id");d.treeObj=b;d.treeObj.empty();r[d.treeId]=d;if(typeof document.body.style.maxHeight==="undefined")d.view.expandSpeed=
+"";h.initRoot(d);b=h.getRoot(d);a=d.data.key.children;c=c?j.clone(j.isArray(c)?c:[c]):[];b[a]=d.data.simpleData.enable?h.transformTozTreeFormat(d,c):c;h.initCache(d);m.unbindTree(d);m.bindTree(d);m.unbindEvent(d);m.bindEvent(d);c={setting:d,addNodes:function(a,b,c){function e(){i.addNodes(d,a,h,c==!0)}if(!b)return null;a||(a=null);if(a&&!a.isParent&&d.data.keep.leaf)return null;var h=j.clone(j.isArray(b)?b:[b]);j.canAsync(d,a)?i.asyncNode(d,a,c,e):e();return h},cancelSelectedNode:function(a){i.cancelPreSelectedNode(d,
+a)},destroy:function(){i.destroy(d)},expandAll:function(a){a=!!a;i.expandCollapseSonNode(d,null,a,!0);return a},expandNode:function(a,b,c,e,n){if(!a||!a.isParent)return null;b!==!0&&b!==!1&&(b=!a.open);if((n=!!n)&&b&&j.apply(d.callback.beforeExpand,[d.treeId,a],!0)==!1)return null;else if(n&&!b&&j.apply(d.callback.beforeCollapse,[d.treeId,a],!0)==!1)return null;b&&a.parentTId&&i.expandCollapseParentNode(d,a.getParentNode(),b,!1);if(b===a.open&&!c)return null;h.getRoot(d).expandTriggerFlag=n;if(!j.canAsync(d,
+a)&&c)i.expandCollapseSonNode(d,a,b,!0,function(){if(e!==!1)try{k(a,d).focus().blur()}catch(b){}});else if(a.open=!b,i.switchNode(this.setting,a),e!==!1)try{k(a,d).focus().blur()}catch(m){}return b},getNodes:function(){return h.getNodes(d)},getNodeByParam:function(a,b,c){return!a?null:h.getNodeByParam(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodeByTId:function(a){return h.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return!a?null:h.getNodesByParam(d,c?c[d.data.key.children]:h.getNodes(d),
+a,b)},getNodesByParamFuzzy:function(a,b,c){return!a?null:h.getNodesByParamFuzzy(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodesByFilter:function(a,b,c,e){b=!!b;return!a||typeof a!="function"?b?null:[]:h.getNodesByFilter(d,c?c[d.data.key.children]:h.getNodes(d),a,b,e)},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():h.getRoot(d),e=0,i=c[b].length;e<i;e++)if(c[b][e]==a)return e;return-1},getSelectedNodes:function(){for(var a=[],b=h.getRoot(d).curSelectedList,
+c=0,e=b.length;c<e;c++)a.push(b[c]);return a},isSelectedNode:function(a){return h.isSelectedNode(d,a)},reAsyncChildNodes:function(a,b,c){if(this.setting.async.enable){var j=!a;j&&(a=h.getRoot(d));if(b=="refresh"){for(var b=this.setting.data.key.children,m=0,p=a[b]?a[b].length:0;m<p;m++)h.removeNodeCache(d,a[b][m]);h.removeSelectedNode(d);a[b]=[];j?this.setting.treeObj.empty():k(a,e.id.UL,d).empty()}i.asyncNode(this.setting,j?null:a,!!c)}},refresh:function(){this.setting.treeObj.empty();var a=h.getRoot(d),
+b=a[d.data.key.children];h.initRoot(d);a[d.data.key.children]=b;h.initCache(d);i.createNodes(d,0,a[d.data.key.children])},removeChildNodes:function(a){if(!a)return null;var b=a[d.data.key.children];i.removeChildNodes(d,a);return b?b:null},removeNode:function(a,b){a&&(b=!!b,b&&j.apply(d.callback.beforeRemove,[d.treeId,a],!0)==!1||(i.removeNode(d,a),b&&this.setting.treeObj.trigger(e.event.REMOVE,[d.treeId,a])))},selectNode:function(a,b){if(a&&j.uCanDo(d)){b=d.view.selectedMulti&&b;if(a.parentTId)i.expandCollapseParentNode(d,
+a.getParentNode(),!0,!1,function(){try{k(a,d).focus().blur()}catch(b){}});else try{k(a,d).focus().blur()}catch(c){}i.selectNode(d,a,b)}},transformTozTreeNodes:function(a){return h.transformTozTreeFormat(d,a)},transformToArray:function(a){return h.transformToArrayFormat(d,a)},updateNode:function(a){a&&k(a,d).get(0)&&j.uCanDo(d)&&(i.setNodeName(d,a),i.setNodeTarget(d,a),i.setNodeUrl(d,a),i.setNodeLineIcos(d,a),i.setNodeFontCss(d,a))}};b.treeTools=c;h.setZTreeTools(d,c);b[a]&&b[a].length>0?i.createNodes(d,
+0,b[a]):d.async.enable&&d.async.url&&d.async.url!==""&&i.asyncNode(d);return c}};var N=p.fn.zTree,k=j.$,e=N.consts})(jQuery);
diff --git a/common/src/main/webapp/thirdparty/zTree/api/apiCss/zTreeStyleForApi.css b/common/src/main/webapp/thirdparty/zTree/api/apiCss/zTreeStyleForApi.css
new file mode 100644
index 0000000..bb4717b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/apiCss/zTreeStyleForApi.css
@@ -0,0 +1,49 @@
+/*-------------------------------------
+zTree Style
+
+version: 3.0
+author: Hunter.z
+email: hunter.z@263.net
+website: http://code.google.com/p/jquerytree/
+
+-------------------------------------*/
+
+.ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif}
+.ztree {margin:0; padding:5px; color:#333}
+.ztree li{padding:0; margin:0; list-style:none; line-height:14px; text-align:left; white-space:nowrap}
+.ztree li ul{ margin:0; padding:0 0 0 18px}
+.ztree li ul.line{ background:url(./img/line_conn.gif) 0 0 repeat-y;}
+
+.ztree li a {padding:1px 3px 0 0; margin:0; cursor:pointer; color:#333; height:17px; text-decoration:none; vertical-align:top; display: inline-block}
+.ztree li a:hover {text-decoration:none}
+.ztree li a.curSelectedNode {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid;}
+.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8; filter:alpha(opacity=80)}
+.ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#316AC5; color:white; height:16px; border:1px #316AC5 solid; opacity:0.8; filter:alpha(opacity=80)}
+.ztree li a.tmpTargetNode_prev {}
+.ztree li a.tmpTargetNode_next {}
+.ztree li a input.rename {height:14px; width:80px; padding:0; margin:0;
+ font-size:12px; border:1px #7EC4CC solid; *border:0px}
+.ztree li span {line-height:16px; margin-right: 2px}
+.ztree li span.button {line-height:0; margin:0;width:16px; height:16px; display: inline-block; vertical-align:middle;
+ border:0 none; cursor: pointer;
+ background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
+ background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")}
+
+.ztree li span.button.switch {width:1px; height:18px; visibility: hidden}
+
+.zTreeDragUL {margin:0; padding:0; position:absolute; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)}
+.zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute}
+
+/* level 等级样å¼*/
+/*.ztree li button.level0 {
+ display:none;
+}
+.ztree li ul.level0 {
+ padding:0;
+ background:none;
+}*/
+
+.ztree li span.button.core_ico_docu{margin-right:2px; background-position:-126px 0; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.check_ico_docu{margin-right:2px; background-position:-126px -16px; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.edit_ico_docu{margin-right:2px; background-position:-126px -32px; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.hide_ico_docu{margin-right:2px; background-position:-160px 0; vertical-align:top; *vertical-align:middle}
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/fn.zTree._z.html b/common/src/main/webapp/thirdparty/zTree/api/cn/fn.zTree._z.html
new file mode 100644
index 0000000..7af3e40
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/fn.zTree._z.html
@@ -0,0 +1,13 @@
+<div class="apiDetail">
+<div>
+ <h2><span>JSON</span><span class="path">$.fn.zTree.</span>_z</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>zTree v3.x 内部的全部方法都å¯ä»¥é€šè¿‡ $.fn.zTree._z 进行调用,开放出æ¥æ˜¯ä¸ºäº†æ›´ä¾¿äºŽå¤§å®¶å¼€å‘制作自己的 zTree æ’件。 </p>
+ <p class="highlight_red">如无特殊需求请勿使用此对象,以åŠä¿®æ”¹æ­¤å¯¹è±¡å†…部的å„个函数。</p>
+ </div>
+ </div>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/fn.zTree.destroy.html b/common/src/main/webapp/thirdparty/zTree/api/cn/fn.zTree.destroy.html
new file mode 100644
index 0000000..7105807
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/fn.zTree.destroy.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId)</span><span class="path">$.fn.zTree.</span>destroy</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>从 zTree v3.4 开始æä¾›é”€æ¯ zTree 的方法。 </p>
+ <p>1ã€ç”¨æ­¤æ–¹æ³•å¯ä»¥é”€æ¯æŒ‡å®š treeId çš„ zTree,也å¯ä»¥é”€æ¯å½“å‰é¡µé¢å…¨éƒ¨çš„ zTree。</p>
+ <p class="highlight_red">2ã€é”€æ¯æŒ‡å®š treeId çš„ zTree 也å¯ä»¥ä½¿ç”¨ zTreeObj.destroy() 方法。</p>
+ <p class="highlight_red">3ã€é‡æ–°ä½¿ç”¨å·²ç»è¢«é”€æ¯çš„树,必须è¦ä½¿ç”¨ init 方法进行åˆå§‹åŒ–。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree 的 DOM 容器的 id</p>
+ <p class="highlight_red">çœç•¥ treeId,表示销æ¯å½“å‰é¡µé¢å…¨éƒ¨çš„ zTree</p>
+ <h4 class="topLine"><b>返回值</b><span>无</span></h4>
+ <p>ç›®å‰æ— ä»»ä½•è¿”回值</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. é”€æ¯ id 为 "treeDemo" çš„ zTree</h4>
+ <pre xmlns=""><code>$.fn.zTree.destroy("treeDemo");</code></pre>
+ <h4>2. 销æ¯å…¨éƒ¨ çš„ zTree</h4>
+ <pre xmlns=""><code>$.fn.zTree.destroy();</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/fn.zTree.getZTreeObj.html b/common/src/main/webapp/thirdparty/zTree/api/cn/fn.zTree.getZTreeObj.html
new file mode 100644
index 0000000..b1d1db4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/fn.zTree.getZTreeObj.html
@@ -0,0 +1,24 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId)</span><span class="path">$.fn.zTree.</span>getZTreeObj</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>zTree v3.x 专门æä¾›çš„æ ¹æ® treeId èŽ·å– zTree 对象的方法。 </p>
+ <p class="highlight_red">必须在åˆå§‹åŒ– zTree 以åŽæ‰å¯ä»¥ä½¿ç”¨æ­¤æ–¹æ³•ã€‚</p>
+ <p>有了这个方法,用户ä¸å†éœ€è¦è‡ªå·±è®¾å®šå…¨å±€å˜é‡æ¥ä¿å­˜ zTree åˆå§‹åŒ–åŽå¾—到的对象了,而且在所有回调函数中全都会返回 treeId 属性,用户å¯ä»¥éšæ—¶ä½¿ç”¨æ­¤æ–¹æ³•èŽ·å–需è¦è¿›è¡Œæ“作的 zTree 对象</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree 的 DOM 容器的 id</p>
+ <h4 class="topLine"><b>返回值</b><span>JSON</span></h4>
+ <p>zTree 对象,æä¾›æ“作 zTree çš„å„ç§æ–¹æ³•ï¼Œå¯¹äºŽé€šè¿‡ js æ“作 zTree æ¥è¯´å¿…须通过此对象</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. èŽ·å– id 为 tree çš„ zTree 对象</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/fn.zTree.init.html b/common/src/main/webapp/thirdparty/zTree/api/cn/fn.zTree.init.html
new file mode 100644
index 0000000..8db6d2c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/fn.zTree.init.html
@@ -0,0 +1,74 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(obj, zSetting, zNodes)</span><span class="path">$.fn.zTree.</span>init</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>zTree åˆå§‹åŒ–方法,创建 zTree 必须使用此方法</p>
+ <p>1ã€é¡µé¢éœ€è¦è¿›è¡Œ W3C 申明,例如:&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"&nbsp;&nbsp; &nbsp;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;。</p>
+ <p>2ã€éœ€è¦é¦–先加载 jquery-1.4.2.js 或其他更高版本的 jQuery 。</p>
+ <p>3ã€éœ€è¦åŠ è½½ jquery-ztree.core-3.0.js,如果需è¦ç”¨åˆ° 编辑功能 或 checkbox / radio 还需è¦åˆ†åˆ«åŠ è½½ jquery-ztree.exedit-3.0.js å’Œ jquery-ztree.excheck-3.0.js 。</p>
+ <p>4ã€éœ€è¦åŠ è½½ zTreeStyle.css ä»¥åŠ zTreeStyle 目录下的 img 文件。</p>
+ <p>5ã€å¦‚果需è¦ä½¿ç”¨è‡ªå®šä¹‰å›¾æ ‡è¯·å‚考相应的Demo。</p>
+ <p>6ã€è¯·æ³¨æ„设置 zTree çš„å®¹å™¨æ ·å¼ class="ztree",其中 "ztree" 这个 className,å¯ä»¥æ ¹æ®éœ€è¦éšæ„修改,别忘了修改 css 中对应å字就是了,对于容器如果需è¦å¢žåŠ å…¶ä»–特殊样å¼ï¼Œå¯æ ¹æ®è‡ªå·±çš„需è¦è¿›è¡Œä¿®æ”¹ã€‚</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>obj</b><span>jQuery Object</span></h4>
+ <p>用于展现 zTree 的 DOM 容器</p>
+ <h4 class="topLine"><b>zSetting</b><span>JSON</span></h4>
+ <p>zTree çš„é…置数æ®ï¼Œå…·ä½“请å‚考 “setting é…置详解â€ä¸­çš„å„个属性详细说明</p>
+ <h4 class="topLine"><b>zNodes</b><span>Array(JSON) / JSON</span></h4>
+ <p>zTree 的节点数æ®ï¼Œå…·ä½“请å‚考 “treeNode 节点数æ®è¯¦è§£â€ä¸­çš„å„个属性详细说明</p>
+ <p class="highlight_red">1ã€v3.x 支æŒå•ç‹¬æ·»åŠ ä¸€ä¸ªèŠ‚点,å³å¦‚æžœåªæ–°å¢žä¸€ä¸ªèŠ‚点,ä¸ç”¨å¿…须包在数组中</p>
+ <p class="highlight_red">2ã€å¦‚果需è¦å¼‚步加载根节点,å¯ä»¥è®¾ç½®ä¸º null 或 [ ]</p>
+ <p class="highlight_red">3ã€ä½¿ç”¨ç®€å•æ•°æ®æ¨¡å¼ï¼Œè¯·å‚考 setting.data.simpleData 内的属性说明</p>
+ <h4 class="topLine"><b>返回值</b><span>JSON</span></h4>
+ <p>zTree 对象,æä¾›æ“作 zTree çš„å„ç§æ–¹æ³•ï¼Œå¯¹äºŽé€šè¿‡ js æ“作 zTree æ¥è¯´å¿…须通过此对象</p>
+ <p class="highlight_red">如果ä¸éœ€è¦è‡ªè¡Œè®¾å®šå…¨å±€å˜é‡ä¿å­˜ï¼Œå¯ä»¥åˆ©ç”¨ $.fn.zTree.getZTreeObj 方法éšæ—¶èŽ·å–</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. 简å•åˆ›å»º zTree 演示</h4>
+ <pre xmlns=""><code>&lt;!DOCTYPE html&gt;
+&lt;HTML&gt;
+ &lt;HEAD&gt;
+ &lt;TITLE&gt; ZTREE DEMO &lt;/TITLE&gt;
+ &lt;meta http-equiv="content-type" content="text/html; charset=UTF-8"&gt;
+ &lt;link rel="stylesheet" href="zTreeStyle/zTreeStyle.css" type="text/css"&gt;
+ &lt;script type="text/javascript" src="jquery-1.4.2.js"&gt;&lt;/script&gt;
+ &lt;script type="text/javascript" src="jquery.ztree.core-3.5.js"&gt;&lt;/script&gt;
+&lt;!--
+ &lt;script type="text/javascript" src="jquery.ztree.excheck-3.5.js"&gt;&lt;/script&gt;
+ &lt;script type="text/javascript" src="jquery.ztree.exedit-3.5.js"&gt;&lt;/script&gt;
+--&gt;
+ &lt;SCRIPT type="text/javascript" &gt;
+ var zTreeObj,
+ setting = {
+ view: {
+ selectedMulti: false
+ }
+ },
+ zTreeNodes = [
+ {"name":"网站导航", open:true, children: [
+ { "name":"google", "url":"http://g.cn", "target":"_blank"},
+ { "name":"baidu", "url":"http://baidu.com", "target":"_blank"},
+ { "name":"sina", "url":"http://www.sina.com.cn", "target":"_blank"}
+ ]
+ }
+ ];
+
+ $(document).ready(function(){
+ zTreeObj = $.fn.zTree.init($("#tree"), setting, zTreeNodes);
+
+ });
+ &lt;/SCRIPT&gt;
+ &lt;/HEAD&gt;
+
+&lt;BODY&gt;
+&lt;ul id="tree" class="ztree" style="width:230px; overflow:auto;"&gt;&lt;/ul&gt;
+ &lt;/BODY&gt;
+&lt;/HTML&gt;</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.autoParam.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.autoParam.html
new file mode 100644
index 0000000..cf0f4d2
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.autoParam.html
@@ -0,0 +1,39 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Array(String)</span><span class="path">setting.async.</span>autoParam</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>异步加载时需è¦è‡ªåŠ¨æ交父节点属性的å‚数。<span class="highlight_red">[setting.async.enable = true 时生效]</span></p>
+ <p>默认值:[ ]</p>
+ </div>
+ </div>
+ <h3>Array(String) æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>1ã€å°†éœ€è¦ä½œä¸ºå‚æ•°æ交的属性åç§°ï¼Œåˆ¶ä½œæˆ Array å³å¯ï¼Œä¾‹å¦‚:["id", "name"]</p>
+ <p>2ã€å¯ä»¥è®¾ç½®æ交时的å‚æ•°å称,例如 server åªæŽ¥å— zId : ["id=zId"]</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 设置 id 属性为自动æ交的å‚æ•°</h4>
+ <pre xmlns=""><code>var setting = {
+ async: {
+ enable: true,
+ url: "http://host/getNode.php",
+ autoParam: ["id"]
+ }
+};
+å‡è®¾ 异步加载 父节点(node = {id:1, name:"test"}) çš„å­èŠ‚点时,将æ交å‚æ•° id=1
+......</code></pre>
+ <h4>2. 设置 id 属性作为 zId æˆä¸ºè‡ªåŠ¨æ交的å‚æ•°</h4>
+ <pre xmlns=""><code>var setting = {
+ async: {
+ enable: true,
+ url: "http://host/getNode.php",
+ autoParam: ["id=zId"]
+ }
+};
+å‡è®¾ 对父节点 node = {id:1, name:"test"},进行异步加载时,将æ交å‚æ•° zId=1
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.contentType.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.contentType.html
new file mode 100644
index 0000000..db0c92f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.contentType.html
@@ -0,0 +1,29 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.async.</span>contentType</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Ajax æ交å‚æ•°çš„æ•°æ®ç±»åž‹ã€‚<span class="highlight_red">[setting.async.enable = true 时生效]</span></p>
+ <p>默认值:"application/x-www-form-urlencoded"</p>
+ </div>
+ </div>
+ <h3>String æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> contentType = "application/x-www-form-urlencoded" å¯ä»¥æ»¡è¶³ç»å¤§éƒ¨åˆ†è¯·æ±‚,按照标准的 Form æ ¼å¼æ交å‚æ•°</p>
+ <p> contentType = "application/json" å¯ä»¥æ»¡è¶³ .Net 的编程需è¦ï¼ŒæŒ‰ç…§ JSON æ ¼å¼æ交å‚æ•°</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 设置 Ajax æ交å‚æ•°çš„æ•°æ®ç±»åž‹ä¸º JSON æ ¼å¼</h4>
+ <pre xmlns=""><code>var setting = {
+ async: {
+ enable: true,
+ contentType: "application/json",
+ url: "http://host/getNode.php",
+ autoParam: ["id", "name"]
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.dataFilter.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.dataFilter.html
new file mode 100644
index 0000000..f174bf0
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.dataFilter.html
@@ -0,0 +1,45 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, parentNode, responseData)</span><span class="path">setting.async.</span>dataFilter</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于对 Ajax 返回数æ®è¿›è¡Œé¢„处ç†çš„函数。<span class="highlight_red">[setting.async.enable = true 时生效]</span></p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>parentNode</b><span>JSON</span></h4>
+ <p>进行异步加载的父节点 JSON æ•°æ®å¯¹è±¡</p>
+ <p class="highlight_red">对根进行异步加载时,parentNode = null</p>
+ <h4 class="topLine"><b>responseData</b><span>Array(JSON) / JSON / String</span></h4>
+ <p>异步加载获å–到的数æ®è½¬æ¢åŽçš„ Array(JSON) / JSON / String æ•°æ®å¯¹è±¡</p>
+ <p class="highlight_red">v3.4开始 æ”¯æŒ XML æ•°æ®æ ¼å¼çš„ String</p>
+ <h4 class="topLine"><b>返回值</b><span>Array(JSON) / JSON</span></h4>
+ <p>返回值是 zTree 支æŒçš„JSON æ•°æ®ç»“æž„å³å¯ã€‚</p>
+ <p class="highlight_red">v3.x 支æŒå•ä¸ª JSON 节点数æ®è¿›è¡ŒåŠ è½½</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. 修改异步获å–到的节点name属性</h4>
+ <pre xmlns=""><code>function ajaxDataFilter(treeId, parentNode, responseData) {
+ if (responseData) {
+ for(var i =0; i < responseData.length; i++) {
+ responseData[i].name += "_filter";
+ }
+ }
+ return responseData;
+};
+var setting = {
+ async: {
+ enable: true,
+ url: "http://host/getNode.php",
+ dataFilter: ajaxDataFilter
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.dataType.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.dataType.html
new file mode 100644
index 0000000..6d639b7
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.dataType.html
@@ -0,0 +1,29 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.async.</span>dataType</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Ajax 获å–çš„æ•°æ®ç±»åž‹ã€‚<span class="highlight_red">[setting.async.enable = true 时生效]</span></p>
+ <p>默认值:"text"</p>
+ </div>
+ </div>
+ <h3>String æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> dataType = "text" å¯ä»¥æ»¡è¶³ç»å¤§éƒ¨åˆ†è¯·æ±‚</p>
+ <p class="highlight_red">其余 dataType 类型请å‚考 jQuery ajax 中的 dataType å‚æ•°</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 设置 Ajax 获å–çš„æ•°æ®ç±»åž‹ä¸º 纯文本</h4>
+ <pre xmlns=""><code>var setting = {
+ async: {
+ enable: true,
+ dataType: "text",
+ url: "http://host/getNode.php",
+ autoParam: ["id", "name"]
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.enable.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.enable.html
new file mode 100644
index 0000000..9079ae1
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.enable.html
@@ -0,0 +1,30 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.async.</span>enable</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>设置 zTree 是å¦å¼€å¯å¼‚步加载模å¼</p>
+ <p>默认值:false</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true 表示 å¼€å¯ å¼‚æ­¥åŠ è½½æ¨¡å¼</p>
+ <p> false 表示 关闭 异步加载模å¼</p>
+ <p class="highlight_red">如果设置为 true,请务必设置 setting.async 内的其它å‚数。</p>
+ <p class="highlight_red">如果需è¦æ ¹èŠ‚点也异步加载,åˆå§‹åŒ–æ—¶ treeNodes å‚数设置为 null å³å¯ã€‚</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 需è¦å¼€å¯å¼‚步加载模å¼</h4>
+ <pre xmlns=""><code>var setting = {
+ async: {
+ enable: true,
+ url: "http://host/getNode.php",
+ autoParam: ["id", "name"]
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.otherParam.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.otherParam.html
new file mode 100644
index 0000000..981715f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.otherParam.html
@@ -0,0 +1,40 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Array(String) / JSON</span><span class="path">setting.async.</span>otherParam</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Ajax 请求æ交的é™æ€å‚数键值对。<span class="highlight_red">[setting.async.enable = true 时生效]</span></p>
+ <p>默认值:[ ]</p>
+ </div>
+ </div>
+ <h3>Array(String) æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>å¯ä»¥ä¸ºç©º[ ],如果有 key,则必须存在 value。 例如:[key, value]</p>
+ </div>
+ <h3>JSON æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>直接用 JSON æ ¼å¼åˆ¶ä½œé”®å€¼å¯¹ï¼Œä¾‹å¦‚:{ key1:value1, key2:value2 }</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 设置 Array(String) æ ¼å¼çš„å‚æ•°</h4>
+ <pre xmlns=""><code>var setting = {
+ async: {
+ enable: true,
+ url: "http://host/getNode.php",
+ otherParam: ["id", "1", "name", "test"]
+ }
+};
+进行异步加载时,将æ交å‚æ•° id=1&name=test</code></pre>
+ <h4>2. 设置 JSON æ ¼å¼çš„å‚æ•°</h4>
+ <pre xmlns=""><code>var setting = {
+ async: {
+ enable: true,
+ url: "http://host/getNode.php",
+ otherParam: { "id":"1", "name":"test"}
+ }
+};
+进行异步加载时,将æ交å‚æ•° id=1&name=test</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.type.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.type.html
new file mode 100644
index 0000000..20d9a6b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.type.html
@@ -0,0 +1,30 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.async.</span>type</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Ajax çš„ http 请求模å¼ã€‚<span class="highlight_red">[setting.async.enable = true 时生效]</span></p>
+ <p>默认值:"post"</p>
+ </div>
+ </div>
+ <h3>String æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> type = "post" 表示异步加载采用 post 方法请求</p>
+ <p> type = "get" 表示异步加载采用 get 方法请求</p>
+ <p class="highlight_red">对应于 jQuery ajax 中的 type å‚æ•°</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 设置使用 get æ–¹å¼è¯·æ±‚æ•°æ®</h4>
+ <pre xmlns=""><code>var setting = {
+ async: {
+ enable: true,
+ type: "get",
+ url: "http://host/getNode.php",
+ autoParam: ["id", "name"]
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.url.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.url.html
new file mode 100644
index 0000000..a5209af
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.async.url.html
@@ -0,0 +1,50 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String / Function(treeId, treeNode)</span><span class="path">setting.async.</span>url</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Ajax 获å–æ•°æ®çš„ URL 地å€ã€‚<span class="highlight_red">[setting.async.enable = true 时生效]</span></p>
+ <p>默认值:""</p>
+ </div>
+ </div>
+ <h3>String æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>设置固定的异步加载 url 字符串,请注æ„地å€çš„路径,确ä¿é¡µé¢èƒ½æ­£å¸¸åŠ è½½</p>
+ <p class="highlight_red">url 内也å¯ä»¥å¸¦å‚数,这些å‚æ•°å°±åªèƒ½æ˜¯é€šè¿‡ get æ–¹å¼æ交了,并且请注æ„进行转ç </p>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>需è¦å¼‚步加载å­èŠ‚点的的父节点 JSON æ•°æ®å¯¹è±¡</p>
+ <p class="highlight_red">针对根进行异步加载时,treeNode = null</p>
+ <h4 class="topLine"><b>返回值</b><span>String</span></h4>
+ <p>è¿”å›žå€¼åŒ String æ ¼å¼çš„æ•°æ®</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. 设置异步获å–节点的 URL 为 nodes.php</h4>
+ <pre xmlns=""><code>var setting = {
+ async: {
+ enable: true,
+ url: "nodes.php",
+ autoParam: ["id", "name"]
+ }
+};
+......</code></pre>
+ <h4>2. 设置异步获å–节点的 URL 为 function 动æ€èŽ·å–</h4>
+ <pre xmlns=""><code>function getAsyncUrl(treeId, treeNode) {
+ return treeNode.isParent ? "nodes1.php" : "nodes2.php";
+};
+var setting = {
+ async: {
+ enable: true,
+ url: getAsyncUrl,
+ autoParam: ["id", "name"]
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeAsync.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeAsync.html
new file mode 100644
index 0000000..70ba0fc
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeAsync.html
@@ -0,0 +1,35 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeAsync</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ·å¼‚步加载之å‰çš„事件回调函数,zTree æ ¹æ®è¿”回值确定是å¦å…许进行异步加载</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>进行异步加载的父节点 JSON æ•°æ®å¯¹è±¡</p>
+ <p class="highlight_red">针对根进行异步加载时,treeNode = null</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>返回值是 true / false</p>
+ <p class="highlight_red">如果返回 false,zTree å°†ä¸è¿›è¡Œå¼‚æ­¥åŠ è½½ï¼Œä¹Ÿæ— æ³•è§¦å‘ onAsyncSuccess / onAsyncError 事件回调函数</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. ç¦æ­¢ id 为 1 的父节点进行异步加载æ“作</h4>
+ <pre xmlns=""><code>function zTreeBeforeAsync(treeId, treeNode) {
+ return (treeNode.id !== 1);
+};
+var setting = {
+ callback: {
+ beforeAsync: zTreeBeforeAsync
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeCheck.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeCheck.html
new file mode 100644
index 0000000..a0e1f42
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeCheck.html
@@ -0,0 +1,34 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeCheck</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ· 勾选 或 å–消勾选 之å‰çš„事件回调函数,并且根æ®è¿”回值确定是å¦å…许 勾选 或 å–消勾选 </p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>进行 勾选 或 å–消勾选 的节点 JSON æ•°æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>返回值是 true / false</p>
+ <p class="highlight_red">如果返回 false,将ä¸ä¼šæ”¹å˜å‹¾é€‰çŠ¶æ€ï¼Œå¹¶ä¸”æ— æ³•è§¦å‘ onCheck 事件回调函数</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. ç¦æ­¢æ‰€æœ‰å‹¾é€‰æ“作,ä¿æŒåˆå§‹åŒ–的勾选状æ€</h4>
+ <pre xmlns=""><code>function zTreeBeforeCheck(treeId, treeNode) {
+ return false;
+};
+var setting = {
+ callback: {
+ beforeCheck: zTreeBeforeCheck
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeClick.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeClick.html
new file mode 100644
index 0000000..6efe928
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeClick.html
@@ -0,0 +1,49 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode, clickFlag)</span><span class="path">setting.callback.</span>beforeClick</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ·å•å‡»èŠ‚点之å‰çš„事件回调函数,并且根æ®è¿”回值确定是å¦å…许å•å‡»æ“作</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>被å•å‡»çš„节点 JSON æ•°æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>clickFlag</b><span>Number</span></h4>
+ <p>节点被点击åŽçš„选中æ“作类型,详细看下表</p>
+ <table width="100%" border="0" cellspacing="1" cellpadding="0">
+ <thead><tr><td>clickFlag</td><td title="是å¦å…许多点选中">selectedMulti</td><td title="是å¦æŒ‰ä¸‹ Ctrl 或 Cmd é”®">autoCancelSelected<br/>&&<br/>event.ctrlKey / metaKey</td><td title="节点当å‰é€‰æ‹©çŠ¶æ€">isSelected</td><td>选中æ“作</td></tr></thead>
+ <tbody>
+ <tr><td>1</td><td>true</td><td>false</td><td>false</td><td>普通选中</td></tr>
+ <tr><td>1</td><td>true</td><td>false</td><td>true</td><td>普通选中</td></tr>
+ <tr><td>2</td><td>true</td><td>true</td><td>false</td><td>追加选中</td></tr>
+ <tr><td>0</td><td>true</td><td>true</td><td>true</td><td>å–消选中</td></tr>
+ <tr><td>1</td><td>false</td><td>false</td><td>false</td><td>普通选中</td></tr>
+ <tr><td>1</td><td>false</td><td>false</td><td>true</td><td>普通选中</td></tr>
+ <tr><td>1</td><td>false</td><td>true</td><td>false</td><td>普通选中</td></tr>
+ <tr><td>0</td><td>false</td><td>true</td><td>true</td><td>å–消选中</td></tr>
+ </tbody>
+ </table>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>返回值是 true / false</p>
+ <p class="highlight_red">如果返回 false,zTree å°†ä¸ä¼šé€‰ä¸­èŠ‚ç‚¹ï¼Œä¹Ÿæ— æ³•è§¦å‘ onClick 事件回调函数</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. ç¦æ­¢èŠ‚点被选中</h4>
+ <pre xmlns=""><code>function zTreeBeforeClick(treeId, treeNode, clickFlag) {
+ return (treeNode.id !== 1);
+};
+var setting = {
+ callback: {
+ beforeClick: zTreeBeforeClick
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeCollapse.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeCollapse.html
new file mode 100644
index 0000000..d778e9c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeCollapse.html
@@ -0,0 +1,34 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeCollapse</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ·çˆ¶èŠ‚点折å ä¹‹å‰çš„事件回调函数,并且根æ®è¿”回值确定是å¦å…许折å æ“作</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>è¦æŠ˜å çš„父节点 JSON æ•°æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>返回值是 true / false</p>
+ <p class="highlight_red">如果返回 false,zTree å°†ä¸ä¼šæŠ˜å èŠ‚ç‚¹ï¼Œä¹Ÿæ— æ³•è§¦å‘ onCollapse 事件回调函数</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. ç¦æ­¢æ‰€æœ‰å·²å±•å¼€çš„父节点折å </h4>
+ <pre xmlns=""><code>function zTreeBeforeCollapse(treeId, treeNode) {
+ return false;
+};
+var setting = {
+ callback: {
+ beforeCollapse: zTreeBeforeCollapse
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeDblClick.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeDblClick.html
new file mode 100644
index 0000000..ed7e4dc
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeDblClick.html
@@ -0,0 +1,36 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeDblClick</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ· zTree 上鼠标åŒå‡»ä¹‹å‰çš„事件回调函数,并且根æ®è¿”å›žå€¼ç¡®å®šè§¦å‘ onDblClick 事件回调函数</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>é¼ æ ‡åŒå‡»æ—¶æ‰€åœ¨èŠ‚点的 JSON æ•°æ®å¯¹è±¡</p>
+ <p class="highlight_red">如果ä¸åœ¨èŠ‚点上,则返回 null</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>返回值是 true / false</p>
+ <p class="highlight_red">如果返回 falseï¼Œå°†ä»…ä»…æ— æ³•è§¦å‘ onDblClick 事件回调函数,对其他æ“作无任何影å“</p>
+ <p class="highlight_red">此事件回调函数对åŒå‡»èŠ‚点展开功能无任何影å“,如果需è¦è®¾ç½®è¯·å‚考 setting.view.dblClickExpand 属性</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. ç¦æ­¢ onDblClick 事件</h4>
+ <pre xmlns=""><code>function zTreeBeforeDblClick(treeId, treeNode) {
+ return false;
+};
+var setting = {
+ callback: {
+ beforeDblClick: zTreeBeforeDblClick
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeDrag.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeDrag.html
new file mode 100644
index 0000000..1e783a3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeDrag.html
@@ -0,0 +1,39 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNodes)</span><span class="path">setting.callback.</span>beforeDrag</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ·èŠ‚点被拖拽之å‰çš„事件回调函数,并且根æ®è¿”回值确定是å¦å…许开å¯æ‹–拽æ“作</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>被拖拽的节点 treeNodes 所在 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
+ <p>è¦è¢«æ‹–拽的节点 JSON æ•°æ®é›†åˆ</p>
+ <p class="highlight_red">v3.x å…许多个åŒçº§èŠ‚点åŒæ—¶è¢«æ‹–拽,因此将此å‚数修改为 Array(JSON)</p>
+ <p class="highlight_red">如果拖拽时多个被选择的节点ä¸æ˜¯åŒçº§å…³ç³»ï¼Œåˆ™åªèƒ½æ‹–拽鼠标当å‰æ‰€åœ¨ä½ç½®çš„节点</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>返回值是 true / false</p>
+ <p class="highlight_red">如果返回 false,zTree å°†ç»ˆæ­¢æ‹–æ‹½ï¼Œä¹Ÿæ— æ³•è§¦å‘ onDrag / beforeDrop / onDrop 事件回调函数</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. ç¦æ­¢å…¨éƒ¨æ‹–拽æ“作</h4>
+ <pre xmlns=""><code>function zTreeBeforeDrag(treeId, treeNodes) {
+ return false;
+};
+var setting = {
+ edit: {
+ enable: true
+ },
+ callback: {
+ beforeDrag: zTreeBeforeDrag
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeDragOpen.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeDragOpen.html
new file mode 100644
index 0000000..ceab2d3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeDragOpen.html
@@ -0,0 +1,37 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeDragOpen</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ·æ‹–拽节点移动到折å çŠ¶æ€çš„父节点åŽï¼Œå³å°†è‡ªåŠ¨å±•å¼€è¯¥çˆ¶èŠ‚点之å‰çš„事件回调函数,并且根æ®è¿”回值确定是å¦å…许自动展开æ“作</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>需è¦è¢«å±•å¼€çš„父节点 treeNode 所在 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>è¦è¢«è‡ªåŠ¨å±•å¼€çš„父节点 JSON æ•°æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>返回值是 true / false</p>
+ <p class="highlight_red">如果返回 false,zTree 将无法进行自动展开æ“作</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. ç¦æ­¢å…¨éƒ¨æ‹–拽时的自动展开æ“作</h4>
+ <pre xmlns=""><code>function zTreeBeforeDragOpen(treeId, treeNode) {
+ return false;
+};
+var setting = {
+ edit: {
+ enable: true
+ },
+ callback: {
+ beforeDragOpen: zTreeBeforeDragOpen
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeDrop.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeDrop.html
new file mode 100644
index 0000000..4123743
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeDrop.html
@@ -0,0 +1,48 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNodes, targetNode, moveType, isCopy)</span><span class="path">setting.callback.</span>beforeDrop</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ·èŠ‚点拖拽æ“作结æŸä¹‹å‰çš„事件回调函数,并且根æ®è¿”回值确定是å¦å…许此拖拽æ“作</p>
+ <p>默认值:null</p>
+ <p class="highlight_red">如未拖拽到有效ä½ç½®ï¼Œåˆ™ä¸è§¦å‘此回调函数,直接将节点æ¢å¤åŽŸä½ç½®</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>目标节点 targetNode 所在 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
+ <p>被拖拽的节点 JSON æ•°æ®é›†åˆ</p>
+ <p class="highlight_red">无论拖拽æ“作为 å¤åˆ¶ 还是 移动,treeNodes 都是当å‰è¢«æ‹–拽节点的数æ®é›†åˆã€‚</p>
+ <h4 class="topLine"><b>targetNode</b><span>JSON</span></h4>
+ <p>treeNodes 被拖拽放开的目标节点 JSON æ•°æ®å¯¹è±¡ã€‚</p>
+ <p class="highlight_red">如果拖拽æˆä¸ºæ ¹èŠ‚点,则 targetNode = null</p>
+ <h4 class="topLine"><b>moveType</b><span>String</span></h4>
+ <p>指定移动到目标节点的相对ä½ç½®</p>
+ <p class="highlight_red">"inner":æˆä¸ºå­èŠ‚点,"prev":æˆä¸ºåŒçº§å‰ä¸€ä¸ªèŠ‚点,"next":æˆä¸ºåŒçº§åŽä¸€ä¸ªèŠ‚点</p>
+ <h4 class="topLine"><b>isCopy</b><span>Boolean</span></h4>
+ <p>拖拽节点æ“作是 å¤åˆ¶ 或 移动</p>
+ <p class="highlight_red">true:å¤åˆ¶ï¼›false:移动</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>返回值是 true / false</p>
+ <p class="highlight_red">如果返回 false,zTree å°†æ¢å¤è¢«æ‹–æ‹½çš„èŠ‚ç‚¹ï¼Œä¹Ÿæ— æ³•è§¦å‘ onDrop 事件回调函数</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. ç¦æ­¢å°†èŠ‚点拖拽æˆä¸ºæ ¹èŠ‚点</h4>
+ <pre xmlns=""><code>function zTreeBeforeDrop(treeId, treeNodes, targetNode, moveType) {
+ return !(targetNode == null || (moveType != "inner" && !targetNode.parentTId));
+};
+var setting = {
+ edit: {
+ enable: true
+ },
+ callback: {
+ beforeDrop: zTreeBeforeDrop
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeEditName.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeEditName.html
new file mode 100644
index 0000000..9df3ca2
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeEditName.html
@@ -0,0 +1,38 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeEditName</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ·èŠ‚点编辑按钮的 click 事件,并且根æ®è¿”回值确定是å¦å…许进入å称编辑状æ€</p>
+ <p class="highlight_red">此事件回调函数最主è¦æ˜¯ç”¨äºŽæ•èŽ·ç¼–辑按钮的点击事件,然åŽè§¦å‘自定义的编辑界é¢æ“作。</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>å°†è¦è¿›å…¥ç¼–辑å称状æ€çš„节点 JSON æ•°æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>返回值是 true / false</p>
+ <p class="highlight_red">如果返回 false,节点将无法进入 zTree 默认的编辑å称状æ€</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. ç¦æ­¢ä¿®æ”¹çˆ¶èŠ‚点的å称</h4>
+ <pre xmlns=""><code>function zTreeBeforeEditName(treeId, treeNode) {
+ return !treeNode.isParent;
+}
+var setting = {
+ edit: {
+ enable: true
+ },
+ callback: {
+ beforeEditName: zTreeBeforeEditName
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeExpand.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeExpand.html
new file mode 100644
index 0000000..350972b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeExpand.html
@@ -0,0 +1,34 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeExpand</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ·çˆ¶èŠ‚点展开之å‰çš„事件回调函数,并且根æ®è¿”回值确定是å¦å…许展开æ“作</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>è¦å±•å¼€çš„父节点 JSON æ•°æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>返回值是 true / false</p>
+ <p class="highlight_red">如果返回 false,zTree å°†ä¸ä¼šå±•å¼€èŠ‚ç‚¹ï¼Œä¹Ÿæ— æ³•è§¦å‘ onExpand 事件回调函数</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. ç¦æ­¢æ‰€æœ‰å·²æŠ˜å çš„父节点展开</h4>
+ <pre xmlns=""><code>function zTreeBeforeExpand(treeId, treeNode) {
+ return false;
+};
+var setting = {
+ callback: {
+ beforeExpand: zTreeBeforeExpand
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeMouseDown.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeMouseDown.html
new file mode 100644
index 0000000..2c3f28d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeMouseDown.html
@@ -0,0 +1,35 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeMouseDown</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ· zTree 上鼠标按键按下之å‰çš„事件回调函数,并且根æ®è¿”å›žå€¼ç¡®å®šè§¦å‘ onMouseDown 事件回调函数</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>鼠标按键按下时所在节点的 JSON æ•°æ®å¯¹è±¡</p>
+ <p class="highlight_red">如果ä¸åœ¨èŠ‚点上,则返回 null</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>返回值是 true / false</p>
+ <p class="highlight_red">如果返回 falseï¼Œå°†ä»…ä»…æ— æ³•è§¦å‘ onMouseDown 事件回调函数,对其他æ“作无任何影å“</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. ç¦æ­¢ onMouseDown 事件</h4>
+ <pre xmlns=""><code>function zTreeBeforeMouseDown(treeId, treeNode) {
+ return false;
+};
+var setting = {
+ callback: {
+ beforeMouseDown: zTreeBeforeMouseDown
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeMouseUp.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeMouseUp.html
new file mode 100644
index 0000000..f0b01b9
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeMouseUp.html
@@ -0,0 +1,35 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeMouseUp</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ· zTree 上鼠标按键æ¾å¼€ä¹‹å‰çš„事件回调函数,并且根æ®è¿”å›žå€¼ç¡®å®šè§¦å‘ onMouseUp 事件回调函数</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>鼠标按键æ¾å¼€æ—¶æ‰€åœ¨èŠ‚点的 JSON æ•°æ®å¯¹è±¡</p>
+ <p class="highlight_red">如果ä¸åœ¨èŠ‚点上,则返回 null</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>返回值是 true / false</p>
+ <p class="highlight_red">如果返回 falseï¼Œå°†ä»…ä»…æ— æ³•è§¦å‘ onMouseUp 事件回调函数,对其他æ“作无任何影å“</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. ç¦æ­¢ onMouseUp 事件</h4>
+ <pre xmlns=""><code>function zTreeBeforeMouseUp(treeId, treeNode) {
+ return false;
+};
+var setting = {
+ callback: {
+ beforeMouseUp: zTreeBeforeMouseUp
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeRemove.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeRemove.html
new file mode 100644
index 0000000..0edb3fd
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeRemove.html
@@ -0,0 +1,37 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeRemove</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ·èŠ‚点被删除之å‰çš„事件回调函数,并且根æ®è¿”回值确定是å¦å…许删除æ“作</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>å°†è¦åˆ é™¤çš„节点 JSON æ•°æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>返回值是 true / false</p>
+ <p class="highlight_red">如果返回 false,zTree å°†ä¸åˆ é™¤èŠ‚ç‚¹ï¼Œä¹Ÿæ— æ³•è§¦å‘ onRemove 事件回调函数</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. ç¦æ­¢å…¨éƒ¨åˆ é™¤æ“作</h4>
+ <pre xmlns=""><code>function zTreeBeforeRemove(treeId, treeNode) {
+ return false;
+}
+var setting = {
+ edit: {
+ enable: true
+ },
+ callback: {
+ beforeRemove: zTreeBeforeRemove
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeRename.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeRename.html
new file mode 100644
index 0000000..0709961
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeRename.html
@@ -0,0 +1,46 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode, newName, isCancel)</span><span class="path">setting.callback.</span>beforeRename</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ·èŠ‚点编辑å称结æŸï¼ˆInput 失去焦点 或 按下 Enter 键)之åŽï¼Œæ›´æ–°èŠ‚点å称数æ®ä¹‹å‰çš„事件回调函数,并且根æ®è¿”回值确定是å¦å…许更改å称的æ“作</p>
+ <p class="highlight_red">节点进入编辑å称状æ€åŽï¼ŒæŒ‰ ESC é”®å¯ä»¥æ”¾å¼ƒå½“å‰ä¿®æ”¹ï¼Œæ¢å¤åŽŸå称,å–消编辑å称状æ€</p>
+ <p class="highlight_red">从 v3.5.13 开始,å–消编辑状æ€ä¹Ÿä¼šè§¦å‘æ­¤å›žè°ƒï¼Œæ ¹æ® isCancel å‚数判断</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>å°†è¦æ›´æ”¹å称的节点 JSON æ•°æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>newName</b><span>String</span></h4>
+ <p>修改åŽçš„æ–°å称</p>
+ <h4 class="topLine"><b>isCancel</b><span>Boolean</span></h4>
+ <p>是å¦å–消æ“作 (v3.5.13+)</p>
+ <p class="highlight_red">isCancel = true 表示å–消编辑æ“作(按下 ESC 或 使用 cancelEditName 方法)</p>
+ <p class="highlight_red">isCancel = false 表示确认修改æ“作</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>返回值是 true / false</p>
+ <p class="highlight_red">如果返回 false,zTree å°†ä¿æŒå称编辑状æ€ï¼Œæ— æ³•è§¦å‘ onRename 事件回调函数,并且会导致å±è”½å…¶å®ƒäº‹ä»¶ï¼Œç›´åˆ°ä¿®æ”¹å称使得 beforeRename 返回 true</p>
+ <p class="highlight_red">如果返回 false,ä¸ä¼šè®© input 输入框获å–焦点,é¿å…由于警告信æ¯è€Œå¯¼è‡´åå¤è§¦å‘ beforeRename。 请在关闭æ示警告信æ¯åŽï¼Œåˆ©ç”¨ editName 方法让 input é‡æ–°èŽ·å–焦点。</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. ç¦æ­¢ä¿®æ”¹çš„å称的长度å°äºŽ 5</h4>
+ <pre xmlns=""><code>function zTreeBeforeRename(treeId, treeNode, newName, isCancel) {
+ return newName.length > 5;
+}
+var setting = {
+ edit: {
+ enable: true
+ },
+ callback: {
+ beforeRename: zTreeBeforeRename
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeRightClick.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeRightClick.html
new file mode 100644
index 0000000..1a5bdaa
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.beforeRightClick.html
@@ -0,0 +1,35 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeRightClick</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ· zTree 上鼠标å³é”®ç‚¹å‡»ä¹‹å‰çš„事件回调函数,并且根æ®è¿”å›žå€¼ç¡®å®šè§¦å‘ onRightClick 事件回调函数</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>é¼ æ ‡å³é”®ç‚¹å‡»æ—¶æ‰€åœ¨èŠ‚点的 JSON æ•°æ®å¯¹è±¡</p>
+ <p class="highlight_red">如果ä¸åœ¨èŠ‚点上,则返回 null</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>返回值是 true / false</p>
+ <p class="highlight_red">如果返回 falseï¼Œå°†ä»…ä»…æ— æ³•è§¦å‘ onRightClick 事件回调函数,对其他æ“作无任何影å“</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. ç¦æ­¢ onRightClick 事件</h4>
+ <pre xmlns=""><code>function zTreeBeforeRightClick(treeId, treeNode) {
+ return false;
+};
+var setting = {
+ callback: {
+ beforeRightClick: zTreeBeforeRightClick
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onAsyncError.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onAsyncError.html
new file mode 100644
index 0000000..c469e11
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onAsyncError.html
@@ -0,0 +1,42 @@
+<div class="apiDetail">
+<div>
+ <h2><span class="path">setting.callback.</span>onAsyncError</h2>
+ <h2><span>Function(event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown)</span>&nbsp;</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ·å¼‚步加载出现异常错误的事件回调函数</p>
+ <p class="highlight_red">如果设置了 setting.callback.beforeAsync 方法,且返回 falseï¼Œå°†æ— æ³•è§¦å‘ onAsyncSuccess / onAsyncError 事件回调函数。</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event 对象</span></h4>
+ <p>标准的 js event 对象</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>进行异步加载的父节点 JSON æ•°æ®å¯¹è±¡</p>
+ <p class="highlight_red">针对根进行异步加载时,treeNode = null</p>
+ <h4 class="topLine"><b>XMLHttpRequest</b><span>String</span></h4>
+ <p>标准 XMLHttpRequest 对象,请å‚考 JQuery API 文档。</p>
+ <h4 class="topLine"><b>textStatus</b><span>String</span></h4>
+ <p>请求状æ€ï¼šsuccess,error,请å‚考 JQuery API 文档。</p>
+ <h4 class="topLine"><b>errorThrown</b><span>String</span></h4>
+ <p>errorThrown åªæœ‰å½“异常å‘生时æ‰ä¼šè¢«ä¼ é€’,请å‚考 JQuery API 文档。</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. 异步加载出现异常åŽï¼Œå¼¹å‡ºé”™è¯¯ä¿¡æ¯</h4>
+ <pre xmlns=""><code>function zTreeOnAsyncError(event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown) {
+ alert(XMLHttpRequest);
+};
+var setting = {
+ callback: {
+ onAsyncError: zTreeOnAsyncError
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onAsyncSuccess.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onAsyncSuccess.html
new file mode 100644
index 0000000..081e9d7
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onAsyncSuccess.html
@@ -0,0 +1,38 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode, msg)</span><span class="path">setting.callback.</span>onAsyncSuccess</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ·å¼‚步加载正常结æŸçš„事件回调函数</p>
+ <p class="highlight_red">如果设置了 setting.callback.beforeAsync 方法,且返回 falseï¼Œå°†æ— æ³•è§¦å‘ onAsyncSuccess / onAsyncError 事件回调函数。</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event 对象</span></h4>
+ <p>标准的 js event 对象</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>进行异步加载的父节点 JSON æ•°æ®å¯¹è±¡</p>
+ <p class="highlight_red">针对根进行异步加载时,treeNode = null</p>
+ <h4 class="topLine"><b>msg</b><span>String / Object</span></h4>
+ <p>异步获å–的节点数æ®å­—符串,主è¦ä¾¿äºŽç”¨æˆ·è°ƒè¯•ä½¿ç”¨ã€‚</p>
+ <p class="highlight_red">实际数æ®ç±»åž‹ä¼šå— setting.async.dataType 的设置影å“,请å‚考 JQuery API 文档。</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. 异步加载æˆåŠŸåŽï¼Œå¼¹å‡ºæ示信æ¯</h4>
+ <pre xmlns=""><code>function zTreeOnAsyncSuccess(event, treeId, treeNode, msg) {
+ alert(msg);
+};
+var setting = {
+ callback: {
+ onAsyncSuccess: zTreeOnAsyncSuccess
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onCheck.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onCheck.html
new file mode 100644
index 0000000..113eee9
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onCheck.html
@@ -0,0 +1,34 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onCheck</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ· checkbox / radio 被勾选 或 å–消勾选的事件回调函数</p>
+ <p class="highlight_red">如果设置了 setting.callback.beforeCheck 方法,且返回 falseï¼Œå°†æ— æ³•è§¦å‘ onCheck 事件回调函数。</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event 对象</span></h4>
+ <p>标准的 js event 对象</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>被勾选 或 å–消勾选的节点 JSON æ•°æ®å¯¹è±¡</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. æ¯æ¬¡ç‚¹å‡» checkbox 或 radio åŽï¼Œ 弹出该节点的 tIdã€name 以åŠå½“å‰å‹¾é€‰çŠ¶æ€çš„ä¿¡æ¯</h4>
+ <pre xmlns=""><code>function zTreeOnCheck(event, treeId, treeNode) {
+ alert(treeNode.tId + ", " + treeNode.name + "," + treeNode.checked);
+};
+var setting = {
+ callback: {
+ onCheck: zTreeOnCheck
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onClick.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onClick.html
new file mode 100644
index 0000000..1f7a266
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onClick.html
@@ -0,0 +1,49 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode, clickFlag)</span><span class="path">setting.callback.</span>onClick</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ·èŠ‚点被点击的事件回调函数</p>
+ <p class="highlight_red">如果设置了 setting.callback.beforeClick 方法,且返回 falseï¼Œå°†æ— æ³•è§¦å‘ onClick 事件回调函数。</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event 对象</span></h4>
+ <p>标准的 js event 对象</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>被点击的节点 JSON æ•°æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>clickFlag</b><span>Number</span></h4>
+ <p>节点被点击åŽçš„选中æ“作类型,详细看下表</p>
+ <table width="100%" border="0" cellspacing="1" cellpadding="0">
+ <thead><tr><td>clickFlag</td><td title="是å¦å…许多点选中">selectedMulti</td><td title="是å¦æŒ‰ä¸‹ Ctrl 或 Cmd é”®">autoCancelSelected<br/>&&<br/>event.ctrlKey / metaKey</td><td title="节点当å‰é€‰æ‹©çŠ¶æ€">isSelected</td><td>选中æ“作</td></tr></thead>
+ <tbody>
+ <tr><td>1</td><td>true</td><td>false</td><td>false</td><td>普通选中</td></tr>
+ <tr><td>1</td><td>true</td><td>false</td><td>true</td><td>普通选中</td></tr>
+ <tr><td>2</td><td>true</td><td>true</td><td>false</td><td>追加选中</td></tr>
+ <tr><td>0</td><td>true</td><td>true</td><td>true</td><td>å–消选中</td></tr>
+ <tr><td>1</td><td>false</td><td>false</td><td>false</td><td>普通选中</td></tr>
+ <tr><td>1</td><td>false</td><td>false</td><td>true</td><td>普通选中</td></tr>
+ <tr><td>1</td><td>false</td><td>true</td><td>false</td><td>普通选中</td></tr>
+ <tr><td>0</td><td>false</td><td>true</td><td>true</td><td>å–消选中</td></tr>
+ </tbody>
+ </table>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. æ¯æ¬¡ç‚¹å‡»èŠ‚点åŽï¼Œ 弹出该节点的 tIdã€name çš„ä¿¡æ¯</h4>
+ <pre xmlns=""><code>function zTreeOnClick(event, treeId, treeNode) {
+ alert(treeNode.tId + ", " + treeNode.name);
+};
+var setting = {
+ callback: {
+ onClick: zTreeOnClick
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onCollapse.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onCollapse.html
new file mode 100644
index 0000000..1c816c2
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onCollapse.html
@@ -0,0 +1,34 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onCollapse</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ·èŠ‚点被折å çš„事件回调函数</p>
+ <p class="highlight_red">如果设置了 setting.callback.beforeCollapse 方法,且返回 falseï¼Œå°†æ— æ³•è§¦å‘ onCollapse 事件回调函数。</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event 对象</span></h4>
+ <p>标准的 js event 对象</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>被折å çš„节点 JSON æ•°æ®å¯¹è±¡</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. æ¯æ¬¡æŠ˜å èŠ‚点åŽï¼Œ 弹出该节点的 tIdã€name çš„ä¿¡æ¯</h4>
+ <pre xmlns=""><code>function zTreeOnCollapse(event, treeId, treeNode) {
+ alert(treeNode.tId + ", " + treeNode.name);
+};
+var setting = {
+ callback: {
+ onCollapse: zTreeOnCollapse
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onDblClick.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onDblClick.html
new file mode 100644
index 0000000..deb8e62
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onDblClick.html
@@ -0,0 +1,35 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onDblClick</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ· zTree 上鼠标åŒå‡»ä¹‹åŽçš„事件回调函数</p>
+ <p class="highlight_red">如果设置了 setting.callback.beforeDblClick 方法,且返回 falseï¼Œå°†æ— æ³•è§¦å‘ onDblClick 事件回调函数。</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event 对象</span></h4>
+ <p>标准的 js event 对象</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>é¼ æ ‡åŒå‡»æ—¶æ‰€åœ¨èŠ‚点的 JSON æ•°æ®å¯¹è±¡</p>
+ <p class="highlight_red">如果ä¸åœ¨èŠ‚点上,则返回 null</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. æ¯æ¬¡é¼ æ ‡åŒå‡»åŽï¼Œ 弹出鼠标所在节点的 tIdã€name çš„ä¿¡æ¯</h4>
+ <pre xmlns=""><code>function zTreeOnDblClick(event, treeId, treeNode) {
+ alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
+};
+var setting = {
+ callback: {
+ onDblClick: zTreeOnDblClick
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onDrag.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onDrag.html
new file mode 100644
index 0000000..efd115b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onDrag.html
@@ -0,0 +1,34 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNodes)</span><span class="path">setting.callback.</span>onDrag</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ·èŠ‚点被拖拽的事件回调函数</p>
+ <p class="highlight_red">如果设置了 setting.callback.beforeDrag 方法,且返回 falseï¼Œå°†æ— æ³•è§¦å‘ onDragMove å’Œ onDrag 事件回调函数。</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event 对象</span></h4>
+ <p>标准的 js event 对象</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>被拖拽的节点 treeNodes 所在 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
+ <p>è¦è¢«æ‹–拽的节点 JSON æ•°æ®é›†åˆ</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. æ¯æ¬¡å¼€å§‹è¿›è¡Œæ‹–拽节点åŽï¼Œ 弹出被拖拽节点的个数信æ¯</h4>
+ <pre xmlns=""><code>function zTreeOnDrag(event, treeId, treeNodes) {
+ alert(treeNodes.length);
+};
+var setting = {
+ callback: {
+ onDrag: zTreeOnDrag
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onDragMove.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onDragMove.html
new file mode 100644
index 0000000..e6a8dd9
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onDragMove.html
@@ -0,0 +1,34 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNodes)</span><span class="path">setting.callback.</span>onDragMove</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ·èŠ‚点被拖拽过程中移动的事件回调函数</p>
+ <p class="highlight_red">主è¦ç”¨äºŽæ•èŽ· zTree 节点拖拽到的 DOM,从而æ“作对应的 DOM。</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event 对象</span></h4>
+ <p>标准的 js event 对象</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>被拖拽的节点 treeNodes 所在 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
+ <p>è¦è¢«æ‹–拽的节点 JSON æ•°æ®é›†åˆ</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. 拖拽节点时,éšæ—¶è¾“出 当å‰æ‹–拽到的目标 DOM</h4>
+ <pre xmlns=""><code>function zTreeOnDragMove(event, treeId, treeNodes) {
+ console.log(event.target);
+};
+var setting = {
+ callback: {
+ onDragMove: zTreeOnDragMove
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onDrop.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onDrop.html
new file mode 100644
index 0000000..c6773a8
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onDrop.html
@@ -0,0 +1,46 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNodes, targetNode, moveType, isCopy)</span><span class="path">setting.callback.</span>onDrop</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ·èŠ‚点拖拽æ“作结æŸçš„事件回调函数</p>
+ <p class="highlight_red">如果设置了 setting.callback.beforeDrop 方法,且返回 falseï¼Œå°†æ— æ³•è§¦å‘ onDrop 事件回调函数。</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event 对象</span></h4>
+ <p>标准的 js event 对象</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>目标节点 targetNode 所在 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
+ <p>被拖拽的节点 JSON æ•°æ®é›†åˆ</p>
+ <p class="highlight_red">如果拖拽æ“作为 移动,treeNodes 是当å‰è¢«æ‹–拽节点的数æ®é›†åˆã€‚</p>
+ <p class="highlight_red">如果拖拽æ“作为 å¤åˆ¶ï¼ŒtreeNodes 是å¤åˆ¶åŽ clone 得到的新节点数æ®ã€‚</p>
+ <h4 class="topLine"><b>targetNode</b><span>JSON</span></h4>
+ <p>æˆä¸º treeNodes 拖拽结æŸçš„目标节点 JSON æ•°æ®å¯¹è±¡ã€‚</p>
+ <p class="highlight_red">如果拖拽æˆä¸ºæ ¹èŠ‚点,则 targetNode = null</p>
+ <h4 class="topLine"><b>moveType</b><span>String</span></h4>
+ <p>指定移动到目标节点的相对ä½ç½®</p>
+ <p class="highlight_red">"inner":æˆä¸ºå­èŠ‚点,"prev":æˆä¸ºåŒçº§å‰ä¸€ä¸ªèŠ‚点,"next":æˆä¸ºåŒçº§åŽä¸€ä¸ªèŠ‚点</p>
+ <p class="highlight_red">如果 moveType = null,表明拖拽无效</p>
+ <h4 class="topLine"><b>isCopy</b><span>Boolean</span></h4>
+ <p>拖拽节点æ“作是 å¤åˆ¶ 或 移动</p>
+ <p class="highlight_red">true:å¤åˆ¶ï¼›false:移动</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. æ¯æ¬¡æ‹–拽æ“作结æŸåŽï¼Œ 弹出该被拖拽节点的个数以åŠç›®æ ‡èŠ‚点的 tIdã€name çš„ä¿¡æ¯</h4>
+ <pre xmlns=""><code>function zTreeOnDrop(event, treeId, treeNodes, targetNode, moveType) {
+ alert(treeNodes.length + "," + (targetNode ? (targetNode.tId + ", " + targetNode.name) : "isRoot" ));
+};
+var setting = {
+ callback: {
+ onDrop: zTreeOnDrop
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onExpand.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onExpand.html
new file mode 100644
index 0000000..791c5f6
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onExpand.html
@@ -0,0 +1,34 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onExpand</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ·èŠ‚点被展开的事件回调函数</p>
+ <p class="highlight_red">如果设置了 setting.callback.beforeExpand 方法,且返回 falseï¼Œå°†æ— æ³•è§¦å‘ onExpand 事件回调函数。</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event 对象</span></h4>
+ <p>标准的 js event 对象</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>被展开的节点 JSON æ•°æ®å¯¹è±¡</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. æ¯æ¬¡å±•å¼€èŠ‚点åŽï¼Œ 弹出该节点的 tIdã€name çš„ä¿¡æ¯</h4>
+ <pre xmlns=""><code>function zTreeOnExpand(event, treeId, treeNode) {
+ alert(treeNode.tId + ", " + treeNode.name);
+};
+var setting = {
+ callback: {
+ onExpand: zTreeOnExpand
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onMouseDown.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onMouseDown.html
new file mode 100644
index 0000000..bc9d0ea
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onMouseDown.html
@@ -0,0 +1,35 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onMouseDown</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ· zTree 上鼠标按键按下åŽçš„事件回调函数</p>
+ <p class="highlight_red">如果设置了 setting.callback.beforeMouseDown 方法,且返回 falseï¼Œå°†æ— æ³•è§¦å‘ onMouseDown 事件回调函数。</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event 对象</span></h4>
+ <p>标准的 js event 对象</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>鼠标按键按下时所在节点的 JSON æ•°æ®å¯¹è±¡</p>
+ <p class="highlight_red">如果ä¸åœ¨èŠ‚点上,则返回 null</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. æ¯æ¬¡é¼ æ ‡æŒ‰é”®æŒ‰ä¸‹åŽï¼Œ 弹出鼠标所在节点的 tIdã€name çš„ä¿¡æ¯</h4>
+ <pre xmlns=""><code>function zTreeOnMouseDown(event, treeId, treeNode) {
+ alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
+};
+var setting = {
+ callback: {
+ onMouseDown: zTreeOnMouseDown
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onMouseUp.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onMouseUp.html
new file mode 100644
index 0000000..a969fef
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onMouseUp.html
@@ -0,0 +1,35 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onMouseUp</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ· zTree 上鼠标按键æ¾å¼€åŽçš„事件回调函数</p>
+ <p class="highlight_red">如果设置了 setting.callback.beforeMouseUp 方法,且返回 falseï¼Œå°†æ— æ³•è§¦å‘ onMouseUp 事件回调函数。</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event 对象</span></h4>
+ <p>标准的 js event 对象</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>鼠标按键æ¾å¼€æ—¶æ‰€åœ¨èŠ‚点的 JSON æ•°æ®å¯¹è±¡</p>
+ <p class="highlight_red">如果ä¸åœ¨èŠ‚点上,则返回 null</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. æ¯æ¬¡é¼ æ ‡æŒ‰é”®æ¾å¼€åŽï¼Œ 弹出鼠标所在节点的 tIdã€name çš„ä¿¡æ¯</h4>
+ <pre xmlns=""><code>function zTreeOnMouseUp(event, treeId, treeNode) {
+ alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
+};
+var setting = {
+ callback: {
+ onMouseUp: zTreeOnMouseUp
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onNodeCreated.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onNodeCreated.html
new file mode 100644
index 0000000..2ebaee6
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onNodeCreated.html
@@ -0,0 +1,35 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onNodeCreated</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ·èŠ‚ç‚¹ç”Ÿæˆ DOM åŽçš„事件回调函数</p>
+ <p class="highlight_red">v3.x 采用了延迟加载技术,因此对于父节点未展开的å­èŠ‚点æ¥è¯´ï¼Œåˆå§‹åŒ–åŽæ˜¯ä¸ä¼šè§¦å‘此回调函数,直到其父节点被展开</p>
+ <p class="highlight_red">大数æ®é‡çš„节点加载请注æ„:ä¸è®¾ç½® onNodeCreated,å¯ä»¥æå‡ä¸€éƒ¨åˆ†åˆå§‹åŒ–性能</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event 对象</span></h4>
+ <p>标准的 js event 对象</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>ç”Ÿæˆ DOM 完毕的节点的 JSON æ•°æ®å¯¹è±¡</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. 创建节点 DOM åŽï¼Œ 弹出该节点的 tIdã€name çš„ä¿¡æ¯</h4>
+ <pre xmlns=""><code>function zTreeOnNodeCreated(event, treeId, treeNode) {
+ alert(treeNode.tId + ", " + treeNode.name);
+};
+var setting = {
+ callback: {
+ onNodeCreated: zTreeOnNodeCreated
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onRemove.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onRemove.html
new file mode 100644
index 0000000..e7e625d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onRemove.html
@@ -0,0 +1,34 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onRemove</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ·åˆ é™¤èŠ‚点之åŽçš„事件回调函数。</p>
+ <p class="highlight_red">如果用户设置了 beforeRemove 回调函数,并返回 falseï¼Œå°†æ— æ³•è§¦å‘ onRemove 事件回调函数。</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event 对象</span></h4>
+ <p>标准的 js event 对象</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>å°†è¦åˆ é™¤çš„节点 JSON æ•°æ®å¯¹è±¡</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. 删除节点时,弹出被删除的节点的 tId ä»¥åŠ name ä¿¡æ¯</h4>
+ <pre xmlns=""><code>function zTreeOnRemove(event, treeId, treeNode) {
+ alert(treeNode.tId + ", " + treeNode.name);
+}
+var setting = {
+ callback: {
+ onRemove: zTreeOnRemove
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onRename.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onRename.html
new file mode 100644
index 0000000..f225463
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onRename.html
@@ -0,0 +1,40 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode, isCancel)</span><span class="path">setting.callback.</span>onRename</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ·èŠ‚点编辑å称结æŸä¹‹åŽçš„事件回调函数。</p>
+ <p>1ã€èŠ‚点进入编辑å称状æ€ï¼Œå¹¶ä¸”修改节点å称åŽè§¦å‘此回调函数。<span class="highlight_red">如果用户设置了 beforeRename 回调函数,并返回 falseï¼Œå°†æ— æ³•è§¦å‘ onRename 事件回调函数。</span></p>
+ <p>2ã€<span class="highlight_red">如果通过直接修改 treeNode çš„æ•°æ®ï¼Œå¹¶ä¸”利用 updateNode 方法更新,是ä¸ä¼šè§¦å‘此回调函数的。</span></p>
+ <p class="highlight_red">3ã€ä»Ž v3.5.13 开始,å–消编辑状æ€ä¹Ÿä¼šè§¦å‘æ­¤å›žè°ƒï¼Œæ ¹æ® isCancel å‚数判断</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event 对象</span></h4>
+ <p>标准的 js event 对象</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>被修改å称的节点 JSON æ•°æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>isCancel</b><span>Boolean</span></h4>
+ <p>是å¦å–消æ“作 (v3.5.13+)</p>
+ <p class="highlight_red">isCancel = true 表示å–消编辑æ“作(按下 ESC 或 使用 cancelEditName 方法)</p>
+ <p class="highlight_red">isCancel = false 表示确认修改æ“作</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. 修改å称åŽï¼Œå¼¹å‡ºè¢«ä¿®æ”¹å称的节点的 tId ä»¥åŠ name ä¿¡æ¯</h4>
+ <pre xmlns=""><code>function zTreeOnRename(event, treeId, treeNode, isCancel) {
+ alert(treeNode.tId + ", " + treeNode.name);
+}
+var setting = {
+ callback: {
+ onRename: zTreeOnRename
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onRightClick.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onRightClick.html
new file mode 100644
index 0000000..d51c68d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.callback.onRightClick.html
@@ -0,0 +1,36 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onRightClick</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于æ•èŽ· zTree 上鼠标å³é”®ç‚¹å‡»ä¹‹åŽçš„事件回调函数</p>
+ <p class="highlight_red">1ã€å¦‚果设置了 setting.callback.beforeRightClick 方法,且返回 falseï¼Œå°†æ— æ³•è§¦å‘ onRightClick 事件回调函数。</p>
+ <p class="highlight_red">2ã€åªè¦å°† function 的引用赋给 onRightClick 属性,则å³é”®ç‚¹å‡» zTree 时,将å±è”½æµè§ˆå™¨çš„å³é”®èœå•ã€‚</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event 对象</span></h4>
+ <p>标准的 js event 对象</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>é¼ æ ‡å³é”®ç‚¹å‡»æ—¶æ‰€åœ¨èŠ‚点的 JSON æ•°æ®å¯¹è±¡</p>
+ <p class="highlight_red">如果ä¸åœ¨èŠ‚点上,则返回 null</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. æ¯æ¬¡é¼ æ ‡å³é”®ç‚¹å‡»åŽï¼Œ 弹出鼠标所在节点的 tIdã€name çš„ä¿¡æ¯</h4>
+ <pre xmlns=""><code>function zTreeOnRightClick(event, treeId, treeNode) {
+ alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
+};
+var setting = {
+ callback: {
+ onRightClick: zTreeOnRightClick
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.autoCheckTrigger.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.autoCheckTrigger.html
new file mode 100644
index 0000000..d1efd77
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.autoCheckTrigger.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.check.</span>autoCheckTrigger</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>设置自动关è”勾选时是å¦è§¦å‘ beforeCheck / onCheck 事件回调函数。<span class="highlight_red">[setting.check.enable = true 且 setting.check.chkStyle = "checkbox" 时生效]</span></p>
+ <p class="highlight_red">1ã€å¦‚果设置 setting.check.chkboxType = { "Y": "", "N": "" },将ä¸ä¼šæœ‰ä»»ä½•è‡ªåŠ¨å…³è”勾选的æ“作。</p>
+ <p class="highlight_red">2ã€å¦‚果开å¯è§¦å‘,对于节点较多的树将会影å“性能,因为所有被è”动勾选的æ“作都会触å‘事件回调函数,请根æ®éœ€è¦å†³å®šæ˜¯å¦ä½¿ç”¨æ­¤åŠŸèƒ½ã€‚</p>
+ <p>默认值: false</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true / false 分别表示 è§¦å‘ / ä¸è§¦å‘ 事件回调函数</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 需è¦è§¦å‘自动关è”勾选æ“作</h4>
+ <pre xmlns=""><code>var setting = {
+ check: {
+ enable: true,
+ autoCheckTrigger: true
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.chkDisabledInherit.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.chkDisabledInherit.html
new file mode 100644
index 0000000..8af1c2c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.chkDisabledInherit.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.check.</span>chkDisabledInherit</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>当父节点设置 chkDisabled = true 时,设置å­èŠ‚点是å¦è‡ªåŠ¨ç»§æ‰¿ chkDisabled = true 。<span class="highlight_red">[setting.check.enable = true 时生效]</span></p>
+ <p class="highlight_red">1ã€åªä½¿ç”¨äºŽåˆå§‹åŒ–节点时,便于批é‡æ“作。 对于已存在的节点请利用 setChkDisabled 方法å•ä¸ªèŠ‚点设置。</p>
+ <p>默认值: false</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true 表示 新加入å­èŠ‚点时,自动继承父节点 chkDisabled = true 的属性。</p>
+ <p> false 表示 新加入å­èŠ‚点时,ä¸ç»§æ‰¿çˆ¶èŠ‚点 chkDisabled 的属性。</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 需è¦å­èŠ‚点自动继承 chkDisabled = true</h4>
+ <pre xmlns=""><code>var setting = {
+ check: {
+ enable: true,
+ chkDisabledInherit: true
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.chkStyle.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.chkStyle.html
new file mode 100644
index 0000000..9706c13
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.chkStyle.html
@@ -0,0 +1,48 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.check.</span>chkStyle</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>勾选框类型(checkbox 或 radio)<span class="highlight_red">[setting.check.enable = true 时生效]</span></p>
+ <p>默认值:"checkbox"</p>
+ </div>
+ </div>
+ <h3>String æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>chkStyle = "checkbox" 时,显示 checkbox 选择框,<span class="highlight_red">setting.check.chkboxType</span> 属性有效。
+<br/>chkStyle = "radio" 时,显示 radio 选择框, <span class="highlight_red">setting.check.radioType</span> 属性有效。</p>
+ <p class="highlight_red">请注æ„大å°å†™ï¼Œä¸è¦æ”¹å˜</p>
+ </div>
+ <h3>checkbox 状æ€è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p><button type="button" class="chk checkbox_false_full"></button>未勾选;<span class="highlight_red">如果是父节点,则无å­èŠ‚点被勾选</span>。鼠标移到该节点上显示为:<button type="button" class="chk checkbox_false_full_focus"></button></p>
+ <p><button type="button" class="chk checkbox_false_part"></button>未勾选;(åªæœ‰çˆ¶èŠ‚点存在此状æ€ï¼‰<span class="highlight_red">存在被勾选的å­èŠ‚点</span>。鼠标移到该节点上显示为:<button type="button" class="chk checkbox_false_part_focus"></button></p>
+ <p><button type="button" class="chk checkbox_true_full"></button>被勾选;<span class="highlight_red">如果是父节点,则全部å­èŠ‚点都被勾选</span>。鼠标移到该节点上显示为:<button type="button" class="chk checkbox_true_full_focus"></button></p>
+ <p><button type="button" class="chk checkbox_true_part"></button>被勾选;(åªæœ‰çˆ¶èŠ‚点存在此状æ€ï¼‰<span class="highlight_red">且部分或无å­èŠ‚点被勾选</span>。鼠标移到该节点上显示为:<button type="button" class="chk checkbox_true_part_focus"></button></p>
+ </div>
+ </div>
+ <h3>radio 状æ€è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p><button type="button" class="chk radio_false_full"></button>未勾选;<span class="highlight_red">如果是父节点,则没有å­èŠ‚点被勾选</span>。鼠标移到该节点上显示为:<button type="button" class="chk radio_false_full_focus"></button></p>
+ <p><button type="button" class="chk radio_false_part"></button>未勾选;(åªæœ‰çˆ¶èŠ‚点存在此状æ€ï¼‰<span class="highlight_red">且存在被勾选的å­èŠ‚点</span>。鼠标移到该节点上显示为:<button type="button" class="chk radio_false_part_focus"></button></p>
+ <p><button type="button" class="chk radio_true_full"></button>被勾选;<span class="highlight_red">如果是父节点,则没有å­èŠ‚点被勾选</span>。鼠标移到该节点上显示为:<button type="button" class="chk radio_true_full_focus"></button></p>
+ <p><button type="button" class="chk radio_true_part"></button>被勾选;(åªæœ‰çˆ¶èŠ‚点存在此状æ€ï¼‰<span class="highlight_red">且存在被勾选的å­èŠ‚点</span>。鼠标移到该节点上显示为:<button type="button" class="chk radio_true_part_focus"></button></p>
+ </div>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 设置选择框为 radio</h4>
+ <pre xmlns=""><code>var setting = {
+ check: {
+ enable: true,
+ chkStyle: "radio"
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.chkboxType.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.chkboxType.html
new file mode 100644
index 0000000..da06b6c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.chkboxType.html
@@ -0,0 +1,31 @@
+<div class="apiDetail">
+<div>
+ <h2><span>JSON</span><span class="path">setting.check.</span>chkboxType</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>勾选 checkbox 对于父å­èŠ‚点的关è”关系。<span class="highlight_red">[setting.check.enable = true 且 setting.check.chkStyle = "checkbox" 时生效]</span></p>
+ <p>默认值:{ "Y": "ps", "N": "ps" }</p>
+ </div>
+ </div>
+ <h3>JSON æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>Y 属性定义 checkbox 被勾选åŽçš„情况;
+<br/>N 属性定义 checkbox å–消勾选åŽçš„情况;
+<br/>"p" 表示æ“作会影å“父级节点;
+<br/>"s" 表示æ“作会影å“å­çº§èŠ‚点。</p>
+ <p class="highlight_red">请注æ„大å°å†™ï¼Œä¸è¦æ”¹å˜</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. checkbox 勾选æ“作,åªå½±å“父级节点;å–消勾选æ“作,åªå½±å“å­çº§èŠ‚点</h4>
+ <pre xmlns=""><code>var setting = {
+ check: {
+ enable: true,
+ chkStyle: "checkbox",
+ chkboxType: { "Y": "p", "N": "s" }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.enable.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.enable.html
new file mode 100644
index 0000000..8b1387e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.enable.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.check.</span>enable</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>设置 zTree 的节点上是å¦æ˜¾ç¤º checkbox / radio</p>
+ <p>默认值: false</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true / false 分别表示 显示 / ä¸æ˜¾ç¤º å¤é€‰æ¡†æˆ–å•é€‰æ¡†</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 需è¦æ˜¾ç¤º checkbox</h4>
+ <pre xmlns=""><code>var setting = {
+ check: {
+ enable: true
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.nocheckInherit.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.nocheckInherit.html
new file mode 100644
index 0000000..caf9902
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.nocheckInherit.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.check.</span>nocheckInherit</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>当父节点设置 nocheck = true 时,设置å­èŠ‚点是å¦è‡ªåŠ¨ç»§æ‰¿ nocheck = true 。<span class="highlight_red">[setting.check.enable = true 时生效]</span></p>
+ <p class="highlight_red">1ã€åªä½¿ç”¨äºŽåˆå§‹åŒ–节点时,便于批é‡æ“作。 对于已存在的节点请利用 updateNode 方法å•ä¸ªèŠ‚点设置。</p>
+ <p>默认值: false</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true 表示 新加入å­èŠ‚点时,自动继承父节点 nocheck = true 的属性。</p>
+ <p> false 表示 新加入å­èŠ‚点时,ä¸ç»§æ‰¿çˆ¶èŠ‚点 nocheck 的属性。</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 需è¦å­èŠ‚点自动继承 nocheck = true</h4>
+ <pre xmlns=""><code>var setting = {
+ check: {
+ enable: true,
+ nocheckInherit: true
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.radioType.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.radioType.html
new file mode 100644
index 0000000..19f84ca
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.check.radioType.html
@@ -0,0 +1,29 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.check.</span>radioType</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>radio 的分组范围。<span class="highlight_red">[setting.check.enable = true 且 setting.check.chkStyle = "radio" 时生效]</span></p>
+ <p>默认值:"level"</p>
+ </div>
+ </div>
+ <h3>String æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>radioType = "level" 时,在æ¯ä¸€çº§èŠ‚点范围内当åšä¸€ä¸ªåˆ†ç»„。
+<br/>radioType = "all" 时,在整棵树范围内当åšä¸€ä¸ªåˆ†ç»„。</p>
+ <p class="highlight_red">请注æ„大å°å†™ï¼Œä¸è¦æ”¹å˜</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 设置 radio 的判别规则为整棵树内</h4>
+ <pre xmlns=""><code>var setting = {
+ check: {
+ enable: true,
+ chkStyle: "radio",
+ radioType: "all"
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.keep.leaf.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.keep.leaf.html
new file mode 100644
index 0000000..af3a721
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.keep.leaf.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.data.keep.</span>leaf</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>zTree 的节点å¶å­èŠ‚点属性é”,是å¦å§‹ç»ˆä¿æŒ isParent = false</p>
+ <p>默认值:false</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true / false 分别表示 é”定 / ä¸é”定 å¶å­èŠ‚点属性</p>
+ <p class="highlight_red">如果设置为 true,则所有 isParent = false 的节点,都无法添加å­èŠ‚点。</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 需è¦é”定å¶å­èŠ‚点状æ€</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ keep: {
+ leaf: true
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.keep.parent.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.keep.parent.html
new file mode 100644
index 0000000..c4975df
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.keep.parent.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.data.keep.</span>parent</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>zTree 的节点父节点属性é”,是å¦å§‹ç»ˆä¿æŒ isParent = true</p>
+ <p>默认值:false</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true / false 分别表示 é”定 / ä¸é”定 父节点属性</p>
+ <p class="highlight_red">如果设置为 true,则所有 isParent = true 的节点,å³ä½¿è¯¥èŠ‚点的å­èŠ‚点被全部删除或移走,ä¾æ—§ä¿æŒçˆ¶èŠ‚点状æ€ã€‚</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 需è¦é”定父节点状æ€</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ keep: {
+ parent: true
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.key.checked.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.key.checked.html
new file mode 100644
index 0000000..ac9fdc1
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.key.checked.html
@@ -0,0 +1,24 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.data.key.</span>checked</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>zTree 节点数æ®ä¸­ä¿å­˜ check 状æ€çš„属性å称。</p>
+ <p>默认值:"checked"</p>
+ <p class="highlight_red">请勿与 zTree 节点数æ®çš„其他å‚数冲çªï¼Œä¾‹å¦‚:checkedOld</p>
+ </div>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 设置 zTree 显示节点时,将 treeNode çš„ isChecked 属性当åšèŠ‚点å称</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ key: {
+ checked: "isChecked"
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.key.children.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.key.children.html
new file mode 100644
index 0000000..66a49a7
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.key.children.html
@@ -0,0 +1,23 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.data.key.</span>children</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>zTree 节点数æ®ä¸­ä¿å­˜å­èŠ‚点数æ®çš„属性å称。</p>
+ <p>默认值:"children"</p>
+ </div>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 设置 zTree 显示节点时,将 treeNode çš„ nodes 属性当åšèŠ‚点å称</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ key: {
+ children: "nodes"
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.key.name.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.key.name.html
new file mode 100644
index 0000000..c25d250
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.key.name.html
@@ -0,0 +1,23 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.data.key.</span>name</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>zTree 节点数æ®ä¿å­˜èŠ‚点å称的属性å称。</p>
+ <p>默认值:"name"</p>
+ </div>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 设置 zTree 显示节点时,将 treeNode çš„ ename 属性当åšèŠ‚点å称</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ key: {
+ name: "ename"
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.key.title.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.key.title.html
new file mode 100644
index 0000000..43e6855
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.key.title.html
@@ -0,0 +1,24 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.data.key.</span>title</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>zTree 节点数æ®ä¿å­˜èŠ‚点æ示信æ¯çš„属性å称。<span class="highlight_red">[setting.view.showTitle = true 时生效]</span></p>
+ <p class="highlight_red">如果设置为 "" ,则自动与 setting.data.key.name ä¿æŒä¸€è‡´ï¼Œé¿å…用户åå¤è®¾ç½®</p>
+ <p>默认值:""</p>
+ </div>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 设置 zTree 显示节点时,将 treeNode çš„ fullName 属性当åšèŠ‚点å称</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ key: {
+ title: "fullName"
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.key.url.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.key.url.html
new file mode 100644
index 0000000..e534d98
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.key.url.html
@@ -0,0 +1,24 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.data.key.</span>url</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>zTree 节点数æ®ä¿å­˜èŠ‚点链接的目标 URL 的属性å称。</p>
+ <p class="highlight_red">特殊用途:当åŽå°æ•°æ®åªèƒ½ç”Ÿæˆ url 属性,åˆä¸æƒ³å®žçŽ°ç‚¹å‡»èŠ‚点跳转的功能时,å¯ä»¥ç›´æŽ¥ä¿®æ”¹æ­¤å±žæ€§ä¸ºå…¶ä»–ä¸å­˜åœ¨çš„属性å称</p>
+ <p>默认值:"url"</p>
+ </div>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 设置 zTree 显示节点时,将 treeNode çš„ xUrl 属性当åšèŠ‚点链接的目标 URL</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ key: {
+ url: "xUrl"
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.simpleData.enable.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.simpleData.enable.html
new file mode 100644
index 0000000..65bd407
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.simpleData.enable.html
@@ -0,0 +1,38 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.data.simpleData.</span>enable</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>确定 zTree åˆå§‹åŒ–时的节点数æ®ã€å¼‚步加载时的节点数æ®ã€æˆ– <span class="highlight_red">addNodes</span> 方法中输入的 newNodes æ•°æ®æ˜¯å¦é‡‡ç”¨ç®€å•æ•°æ®æ¨¡å¼ (Array)</p>
+ <p>ä¸éœ€è¦ç”¨æˆ·å†æŠŠæ•°æ®åº“中å–出的 List 强行转æ¢ä¸ºå¤æ‚çš„ JSON 嵌套格å¼</p>
+ <p>默认值:false</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true / false 分别表示 使用 / ä¸ä½¿ç”¨ 简å•æ•°æ®æ¨¡å¼</p>
+ <p class="highlight_red">如果设置为 true,请务必设置 setting.data.simpleData 内的其他å‚æ•°: idKey / pIdKey / rootPId,并且让数æ®æ»¡è¶³çˆ¶å­å…³ç³»ã€‚</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. ä½¿ç”¨ç®€å• Array æ ¼å¼çš„æ•°æ®</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ simpleData: {
+ enable: true,
+ idKey: "id",
+ pIdKey: "pId",
+ rootPId: 0,
+ }
+ }
+};
+var treeNodes = [
+ {"id":1, "pId":0, "name":"test1"},
+ {"id":11, "pId":1, "name":"test11"},
+ {"id":12, "pId":1, "name":"test12"},
+ {"id":111, "pId":11, "name":"test111"}
+];
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.simpleData.idKey.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.simpleData.idKey.html
new file mode 100644
index 0000000..81129e9
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.simpleData.idKey.html
@@ -0,0 +1,32 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.data.simpleData.</span>idKey</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>节点数æ®ä¸­ä¿å­˜å”¯ä¸€æ ‡è¯†çš„属性å称。<span class="highlight_red">[setting.data.simpleData.enable = true 时生效]</span></p>
+ <p>默认值:"id"</p>
+ </div>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. ä½¿ç”¨ç®€å• Array æ ¼å¼çš„æ•°æ®</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ simpleData: {
+ enable: true,
+ idKey: "id",
+ pIdKey: "pId",
+ rootPId: 0,
+ }
+ }
+};
+var treeNodes = [
+ {"id":1, "pId":0, "name":"test1"},
+ {"id":11, "pId":1, "name":"test11"},
+ {"id":12, "pId":1, "name":"test12"},
+ {"id":111, "pId":11, "name":"test111"}
+];
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.simpleData.pIdKey.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.simpleData.pIdKey.html
new file mode 100644
index 0000000..d434bc3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.simpleData.pIdKey.html
@@ -0,0 +1,32 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.data.simpleData.</span>pIdKey</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>节点数æ®ä¸­ä¿å­˜å…¶çˆ¶èŠ‚点唯一标识的属性å称。<span class="highlight_red">[setting.data.simpleData.enable = true 时生效]</span></p>
+ <p>默认值:"pId"</p>
+ </div>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. ä½¿ç”¨ç®€å• Array æ ¼å¼çš„æ•°æ®</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ simpleData: {
+ enable: true,
+ idKey: "id",
+ pIdKey: "pId",
+ rootPId: 0
+ }
+ }
+};
+var treeNodes = [
+ {"id":1, "pId":0, "name":"test1"},
+ {"id":11, "pId":1, "name":"test11"},
+ {"id":12, "pId":1, "name":"test12"},
+ {"id":111, "pId":11, "name":"test111"}
+];
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.simpleData.rootPId.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.simpleData.rootPId.html
new file mode 100644
index 0000000..8cff82d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.data.simpleData.rootPId.html
@@ -0,0 +1,32 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String / Number</span><span class="path">setting.data.simpleData.</span>rootPId</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于修正根节点父节点数æ®ï¼Œå³ pIdKey 指定的属性值。<span class="highlight_red">[setting.data.simpleData.enable = true 时生效]</span></p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. ä½¿ç”¨ç®€å• Array æ ¼å¼çš„æ•°æ®</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ simpleData: {
+ enable: true,
+ idKey: "id",
+ pIdKey: "pId",
+ rootPId: 0
+ }
+ }
+};
+var treeNodes = [
+ {"id":1, "pId":0, "name":"test1"},
+ {"id":11, "pId":1, "name":"test11"},
+ {"id":12, "pId":1, "name":"test12"},
+ {"id":111, "pId":11, "name":"test111"}
+];
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.autoExpandTrigger.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.autoExpandTrigger.html
new file mode 100644
index 0000000..126b8a8
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.autoExpandTrigger.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.edit.drag.</span>autoExpandTrigger</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>拖拽时父节点自动展开是å¦è§¦å‘ onExpand 事件回调函数。<span class="highlight_red">[setting.edit.enable = true 时生效]</span></p>
+ <p>默认值:false</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true / false 分别表示 è§¦å‘ / ä¸è§¦å‘ onExpand 事件回调函数。</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. è®¾ç½®æ‹–æ‹½æ—¶çˆ¶èŠ‚ç‚¹è‡ªåŠ¨å±•å¼€è§¦å‘ onExpand 事件回调函数</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ autoExpandTrigger: true
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.autoOpenTime.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.autoOpenTime.html
new file mode 100644
index 0000000..df78339
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.autoOpenTime.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Number</span><span class="path">setting.edit.drag.</span>autoOpenTime</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>拖拽时父节点自动展开的延时间隔。 (å•ä½ï¼šms)<span class="highlight_red">[setting.edit.enable = true 时生效]</span></p>
+ <p>默认值:500</p>
+ <p class="highlight_red">请根æ®è‡ªå·±çš„需求适当调整此值</p>
+ </div>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 设置拖拽到父节点上立刻自动展开</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ autoOpenTime: 0
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.borderMax.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.borderMax.html
new file mode 100644
index 0000000..1d4dd68
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.borderMax.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Number</span><span class="path">setting.edit.drag.</span>borderMax</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>拖拽节点æˆä¸ºæ ¹èŠ‚点时的 Tree 内边界范围 (å•ä½ï¼špx)。<span class="highlight_red">[setting.edit.enable = true 时生效]</span></p>
+ <p>默认值:10</p>
+ <p class="highlight_red">请根æ®è‡ªå·±çš„需求适当调整此值</p>
+ </div>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 更改拖拽æ“作节点æˆä¸ºæ ¹èŠ‚点时的 Tree 内边界范围为20px</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ borderMax: 20
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.borderMin.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.borderMin.html
new file mode 100644
index 0000000..463eb2b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.borderMin.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Number</span><span class="path">setting.edit.drag.</span>borderMin</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>拖拽节点æˆä¸ºæ ¹èŠ‚点时的 Tree 外边界范围 (å•ä½ï¼špx)。<span class="highlight_red">[setting.edit.enable = true 时生效]</span></p>
+ <p>默认值:-5</p>
+ <p class="highlight_red">请根æ®è‡ªå·±çš„需求适当调整此值</p>
+ </div>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 更改拖拽æ“作节点æˆä¸ºæ ¹èŠ‚点时的 Tree 外边界范围为10px</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ borderMin: -10
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.inner.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.inner.html
new file mode 100644
index 0000000..06679e1
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.inner.html
@@ -0,0 +1,59 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean / Function(treeId, treeNodes, targetNode)</span><span class="path">setting.edit.drag.</span>inner</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>拖拽到目标节点时,设置是å¦å…许æˆä¸ºç›®æ ‡èŠ‚点的å­èŠ‚点。<span class="highlight_red">[setting.edit.enable = true 时生效]</span></p>
+ <p class="highlight_red">拖拽目标是 æ ¹ 的时候,ä¸è§¦å‘ prev å’Œ next,åªä¼šè§¦å‘ inner</p>
+ <p class="highlight_red">此功能主è¦ä½œç”¨æ˜¯å¯¹æ‹–拽进行适当é™åˆ¶ï¼ˆè¾…助箭头),需è¦ç»“åˆ prevã€next 一起使用,æ‰èƒ½å®žçŽ°å®Œæ•´åŠŸèƒ½ã€‚</p>
+ <p>默认值:true</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true / false 分别表示 å…许 / ä¸å…许 æˆä¸ºç›®æ ‡èŠ‚点的å­èŠ‚点</p>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控(多棵树拖拽时,是目标节点所在树的 treeId)</p>
+ <h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
+ <p>被拖拽的节点 JSON æ•°æ®é›†åˆ</p>
+ <h4 class="topLine"><b>targetNode</b><span>JSON</span></h4>
+ <p>拖拽时的目标节点 JSON æ•°æ®å¯¹è±¡</p>
+ <p class="highlight_red">如果拖拽的节点è¦æˆä¸ºæ ¹èŠ‚点,则 targetNode = null</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>è¿”å›žå€¼åŒ Boolean æ ¼å¼çš„æ•°æ®</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. ç¦æ­¢æ‹–拽æˆä¸ºç›®æ ‡èŠ‚点的å­èŠ‚点</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ prev: true,
+ next: true,
+ inner: false
+ }
+ }
+};
+......</code></pre>
+ <h4>2. ç¦æ­¢æ‹–拽æˆä¸ºæ ¹èŠ‚点的å­èŠ‚点</h4>
+ <pre xmlns=""><code>function canInner(treeId, nodes, targetNode) {
+ return !(targetNode && targetNode.level === 0);
+}
+var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ prev: true,
+ next: true,
+ inner: canInner
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.isCopy.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.isCopy.html
new file mode 100644
index 0000000..cff17af
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.isCopy.html
@@ -0,0 +1,32 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.edit.drag.</span>isCopy</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>拖拽时, 设置是å¦å…许å¤åˆ¶èŠ‚点。<span class="highlight_red">[setting.edit.enable = true 时生效]</span></p>
+ <p>默认值:true</p>
+ </div>
+ </div>
+ <h3>规则说明</h3>
+ <div class="desc">
+ <p>1ã€isCopy = true; isMove = true 时,拖拽节点按下 Ctrl 或 Cmd 键表示 copy; å¦åˆ™ä¸º move</p>
+ <p>2ã€isCopy = true; isMove = false 时,所有拖拽æ“作都是 copy</p>
+ <p>3ã€isCopy = false; isMove = true 时,所有拖拽æ“作都是 move</p>
+ <p>4ã€isCopy = false; isMove = false 时,ç¦æ­¢æ‹–拽æ“作</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 设置所有拖拽æ“作都是 copy</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ isCopy: true,
+ isMove: false
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.isMove.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.isMove.html
new file mode 100644
index 0000000..7fdadd1
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.isMove.html
@@ -0,0 +1,32 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.edit.drag.</span>isMove</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>拖拽时, 设置是å¦å…许移动节点。<span class="highlight_red">[setting.edit.enable = true 时生效]</span></p>
+ <p>默认值:true</p>
+ </div>
+ </div>
+ <h3>规则说明</h3>
+ <div class="desc">
+ <p>1ã€isCopy = true; isMove = true 时,拖拽节点按下 Ctrl 或 Cmd 键表示 copy; å¦åˆ™ä¸º move</p>
+ <p>2ã€isCopy = true; isMove = false 时,所有拖拽æ“作都是 copy</p>
+ <p>3ã€isCopy = false; isMove = true 时,所有拖拽æ“作都是 move</p>
+ <p>4ã€isCopy = false; isMove = false 时,ç¦æ­¢æ‹–拽æ“作</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 设置所有拖拽æ“作都是 move</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ isCopy: false,
+ isMove: true
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.maxShowNodeNum.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.maxShowNodeNum.html
new file mode 100644
index 0000000..3e7a3d2
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.maxShowNodeNum.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Number</span><span class="path">setting.edit.drag.</span>maxShowNodeNum</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>拖拽多个兄弟节点时,浮动图层中显示的最大节点数。 多余的节点用...代替。<span class="highlight_red">[setting.edit.enable = true 时生效]</span></p>
+ <p>默认值:5</p>
+ <p class="highlight_red">请根æ®è‡ªå·±çš„需求适当调整此值</p>
+ </div>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 设置拖拽时最多å¯æ˜¾ç¤º10个节点</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ maxShowNodeNum: 10
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.minMoveSize.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.minMoveSize.html
new file mode 100644
index 0000000..904be41
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.minMoveSize.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Number</span><span class="path">setting.edit.drag.</span>minMoveSize</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>判定是å¦æ‹–拽æ“作的最å°ä½ç§»å€¼ (å•ä½ï¼špx)。<span class="highlight_red">[setting.edit.enable = true 时生效]</span></p>
+ <p class="highlight_red">æ ¹æ®è‡ªå·±çš„需求å¯é€‚当调整此值,如果太å°å®¹æ˜“导致点击鼠标时误æ“作进行拖拽</p>
+ <p>默认值:5</p>
+ </div>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 更改拖拽æ“作å¯åŠ¨ä½ç§»å€¼ä¸º10px</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ minMoveSize: 10
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.next.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.next.html
new file mode 100644
index 0000000..ffc874a
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.next.html
@@ -0,0 +1,58 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean / Function(treeId, treeNodes, targetNode)</span><span class="path">setting.edit.drag.</span>next</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>拖拽到目标节点时,设置是å¦å…许移动到目标节点åŽé¢çš„æ“作。<span class="highlight_red">[setting.edit.enable = true 时生效]</span></p>
+ <p class="highlight_red">拖拽目标是 æ ¹ 的时候,ä¸è§¦å‘ prev å’Œ next,åªä¼šè§¦å‘ inner</p>
+ <p class="highlight_red">此功能主è¦ä½œç”¨æ˜¯å¯¹æ‹–拽进行适当é™åˆ¶ï¼ˆè¾…助箭头),需è¦ç»“åˆ prevã€inner 一起使用,æ‰èƒ½å®žçŽ°å®Œæ•´åŠŸèƒ½ã€‚</p>
+ <p>默认值:true</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true / false 分别表示 å…许 / ä¸å…许 移动到目标节点åŽé¢</p>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控(多棵树拖拽时,是目标节点所在树的 treeId)</p>
+ <h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
+ <p>被拖拽的节点 JSON æ•°æ®é›†åˆ</p>
+ <h4 class="topLine"><b>targetNode</b><span>JSON</span></h4>
+ <p>拖拽时的目标节点 JSON æ•°æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>è¿”å›žå€¼åŒ Boolean æ ¼å¼çš„æ•°æ®</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. ç¦æ­¢æ‹–拽到节点åŽé¢çš„æ“作</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ prev: true,
+ next: false,
+ inner: true
+ }
+ }
+};
+......</code></pre>
+ <h4>2. ç¦æ­¢æ‹–拽到父节点åŽé¢çš„æ“作</h4>
+ <pre xmlns=""><code>function canNext(treeId, nodes, targetNode) {
+ return !targetNode.isParent;
+}
+var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ prev: true,
+ next: canNext,
+ inner: true
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.prev.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.prev.html
new file mode 100644
index 0000000..bd05361
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.drag.prev.html
@@ -0,0 +1,58 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean / Function(treeId, treeNodes, targetNode)</span><span class="path">setting.edit.drag.</span>prev</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>拖拽到目标节点时,设置是å¦å…许移动到目标节点å‰é¢çš„æ“作。<span class="highlight_red">[setting.edit.enable = true 时生效]</span></p>
+ <p class="highlight_red">拖拽目标是 æ ¹ 的时候,ä¸è§¦å‘ prev å’Œ next,åªä¼šè§¦å‘ inner</p>
+ <p class="highlight_red">此功能主è¦ä½œç”¨æ˜¯å¯¹æ‹–拽进行适当é™åˆ¶ï¼ˆè¾…助箭头),需è¦ç»“åˆ nextã€inner 一起使用,æ‰èƒ½å®žçŽ°å®Œæ•´åŠŸèƒ½ã€‚</p>
+ <p>默认值:true</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true / false 分别表示 å…许 / ä¸å…许 移动到目标节点å‰é¢</p>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控(多棵树拖拽时,是目标节点所在树的 treeId)</p>
+ <h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
+ <p>被拖拽的节点 JSON æ•°æ®é›†åˆ</p>
+ <h4 class="topLine"><b>targetNode</b><span>JSON</span></h4>
+ <p>拖拽时的目标节点 JSON æ•°æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>è¿”å›žå€¼åŒ Boolean æ ¼å¼çš„æ•°æ®</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. ç¦æ­¢æ‹–拽到节点å‰é¢çš„æ“作</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ prev: false,
+ next: true,
+ inner: true
+ }
+ }
+};
+......</code></pre>
+ <h4>2. ç¦æ­¢æ‹–拽到父节点å‰é¢çš„æ“作</h4>
+ <pre xmlns=""><code>function canPrev(treeId, nodes, targetNode) {
+ return !targetNode.isParent;
+}
+var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ prev: canPrev,
+ next: true,
+ inner: true
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.editNameSelectAll.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.editNameSelectAll.html
new file mode 100644
index 0000000..30784f3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.editNameSelectAll.html
@@ -0,0 +1,27 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.edit.</span>editNameSelectAll</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>节点编辑å称 input åˆæ¬¡æ˜¾ç¤ºæ—¶,设置 txt 内容是å¦ä¸ºå…¨é€‰çŠ¶æ€ã€‚ <span class="highlight_red">[setting.edit.enable = true 时生效]</span></p>
+ <p>默认值: false</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true 表示 全选状æ€</p>
+ <p> false 表示 ä¸æ˜¯å…¨é€‰çŠ¶æ€ï¼Œå…‰æ ‡é»˜è®¤åœ¨æœ€åŽ</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 设置节点编辑å称 input åˆæ¬¡æ˜¾ç¤ºæ—¶ï¼Œtxt内容为全选状æ€</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ editNameSelectAll: true
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.enable.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.enable.html
new file mode 100644
index 0000000..de1afea
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.enable.html
@@ -0,0 +1,38 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.edit.</span>enable</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>设置 zTree 是å¦å¤„于编辑状æ€</p>
+ <p class="highlight_red">请在åˆå§‹åŒ–之å‰è®¾ç½®ï¼Œåˆå§‹åŒ–åŽéœ€è¦æ”¹å˜ç¼–辑状æ€è¯·ä½¿ç”¨ zTreeObj.setEditable() 方法</p>
+ <p>默认值: false</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true / false 分别表示 å¯ä»¥ / ä¸å¯ä»¥ 编辑</p>
+ </div>
+ <h3>编辑状æ€è§„则说明</h3>
+ <div class="desc">
+ <p>1ã€ç‚¹å‡»èŠ‚点时,ä¸ä¼šæ‰“å¼€ <span class="highlight_red">node.url</span> 指定的 URL。
+<br/>2ã€å…¨é¢æ”¯æŒ 编辑 与 异步加载 状æ€å…±å­˜ã€‚
+<br/>3ã€å¯ä»¥å¯¹èŠ‚点进行拖拽,且支æŒå¤šæ£µæ ‘之间进行拖拽。
+<br/>4ã€æ”¯æŒæ‹–拽时 å¤åˆ¶/移动 节点。(å‚考: <span class="highlight_red">setting.edit.drag.isCopy / setting.edit.drag.isMove</span>)
+<br/>5ã€å¯ä»¥é€šè¿‡ç¼–辑按钮修改 name 属性。
+<br/>6ã€å¯ä»¥é€šè¿‡åˆ é™¤æŒ‰é’®åˆ é™¤èŠ‚点。
+<br/>
+</p>
+ <p class="highlight_red">请注æ„大å°å†™ï¼Œä¸è¦æ”¹å˜</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 设置 zTree 进入编辑状æ€</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.removeTitle.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.removeTitle.html
new file mode 100644
index 0000000..55257da
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.removeTitle.html
@@ -0,0 +1,48 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String / Function(treeId, treeNode)</span><span class="path">setting.edit.</span>removeTitle</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>删除按钮的 Title 辅助信æ¯ã€‚<span class="highlight_red">[setting.edit.enable = true & setting.edit.showRemoveBtn = true 时生效]</span></p>
+ <p>默认值:"remove"</p>
+ </div>
+ </div>
+ <h3>String æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>鼠标移动到 删除按钮 上时,æµè§ˆå™¨è‡ªåŠ¨å¼¹å‡ºçš„辅助信æ¯å†…容,å¯æ ¹æ®ç”¨æˆ·éœ€è¦è‡ªè¡Œä¿®æ”¹</p>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>需è¦è®¾ç½®åˆ é™¤æŒ‰é’® Title ä¿¡æ¯çš„节点 JSON æ•°æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>String</span></h4>
+ <p>è¿”å›žå€¼åŒ String æ ¼å¼çš„æ•°æ®</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. 设置删除按钮的 Title 辅助信æ¯ä¸º: "删除节点"</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ showRemoveBtn: true,
+ removeTitle: "删除节点"
+ }
+};
+......</code></pre>
+ <h4>2. 设置父节点删除按钮的 Title 辅助信æ¯ä¸º: "删除父节点"</h4>
+ <pre xmlns=""><code>function setRemoveTitle(treeId, treeNode) {
+ return treeNode.isParent ? "删除父节点":"删除å¶å­èŠ‚点";
+}
+var setting = {
+ edit: {
+ enable: true,
+ showRemoveBtn: true,
+ removeTitle: setRemoveTitle
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.renameTitle.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.renameTitle.html
new file mode 100644
index 0000000..2dfbcca
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.renameTitle.html
@@ -0,0 +1,48 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String / Function(treeId, treeNode)</span><span class="path">setting.edit.</span>renameTitle</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>编辑å称按钮的 Title 辅助信æ¯ã€‚<span class="highlight_red">[setting.edit.enable = true & setting.edit.showRenameBtn = true 时生效]</span></p>
+ <p>默认值:"rename"</p>
+ </div>
+ </div>
+ <h3>String æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>设置鼠标移动到 编辑å称按钮 上时,æµè§ˆå™¨è‡ªåŠ¨å¼¹å‡ºçš„辅助信æ¯å†…容,å¯æ ¹æ®ç”¨æˆ·éœ€è¦è‡ªè¡Œä¿®æ”¹</p>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>需è¦è®¾ç½®ç¼–辑å称按钮 Title ä¿¡æ¯çš„节点 JSON æ•°æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>String</span></h4>
+ <p>è¿”å›žå€¼åŒ String æ ¼å¼çš„æ•°æ®</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. 设置编辑å称按钮的 Title 辅助信æ¯ä¸º: "编辑节点å称"</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ showRenameBtn: true,
+ renameTitle: "编辑节点å称"
+ }
+};
+......</code></pre>
+ <h4>2. 设置父节点编辑å称按钮的 Title 辅助信æ¯ä¸º: "编辑父节点å称"</h4>
+ <pre xmlns=""><code>function setRenameTitle(treeId, treeNode) {
+ return treeNode.isParent ? "编辑父节点å称":"编辑å¶å­èŠ‚点å称";
+}
+var setting = {
+ edit: {
+ enable: true,
+ showRenameBtn: true,
+ renameTitle: setRenameTitle
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.showRemoveBtn.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.showRemoveBtn.html
new file mode 100644
index 0000000..db62053
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.showRemoveBtn.html
@@ -0,0 +1,49 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean / Function(treeId, treeNode)</span><span class="path">setting.edit.</span>showRemoveBtn</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>设置是å¦æ˜¾ç¤ºåˆ é™¤æŒ‰é’®ã€‚<span class="highlight_red">[setting.edit.enable = true 时生效]</span></p>
+ <p>当点击æŸèŠ‚点的删除按钮时:</p>
+ <p>1ã€é¦–å…ˆè§¦å‘ <span class="highlight_red">setting.callback.beforeRemove</span> 回调函数,用户å¯åˆ¤å®šæ˜¯å¦è¿›è¡Œåˆ é™¤æ“作。</p>
+ <p>2ã€å¦‚果未设置 beforeRemove 或 beforeRemove 返回 trueï¼Œåˆ™åˆ é™¤èŠ‚ç‚¹å¹¶è§¦å‘ <span class="highlight_red">setting.callback.onRemove</span> 回调函数。</p>
+ <p>默认值:true</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true / false 分别表示 显示 / éšè— 删除按钮</p>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>需è¦è®¾ç½®æ˜¯å¦æ˜¾ç¤ºåˆ é™¤æŒ‰é’®çš„节点 JSON æ•°æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>è¿”å›žå€¼åŒ Boolean æ ¼å¼çš„æ•°æ®</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. ä¸æ˜¾ç¤ºåˆ é™¤æŒ‰é’®</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ showRemoveBtn: false
+ }
+};
+......</code></pre>
+ <h4>2. 设置所有的父节点ä¸æ˜¾ç¤ºåˆ é™¤æŒ‰é’®</h4>
+ <pre xmlns=""><code>function setRemoveBtn(treeId, treeNode) {
+ return !treeNode.isParent;
+}
+var setting = {
+ edit: {
+ enable: true,
+ showRemoveBtn: setRemoveBtn
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.showRenameBtn.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.showRenameBtn.html
new file mode 100644
index 0000000..33dd37a
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.edit.showRenameBtn.html
@@ -0,0 +1,51 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean / Function(treeId, treeNode)</span><span class="path">setting.edit.</span>showRenameBtn</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>设置是å¦æ˜¾ç¤ºç¼–辑å称按钮。<span class="highlight_red">[setting.edit.enable = true 时生效]</span></p>
+ <p>当点击æŸèŠ‚点的编辑å称按钮时:</p>
+ <p>1ã€è¿›å…¥èŠ‚点编辑å称状æ€ã€‚</p>
+ <p>2ã€ç¼–辑å称完毕(Input 失去焦点 或 按下 Enter é”®ï¼‰ï¼Œä¼šè§¦å‘ <span class="highlight_red">setting.callback.beforeRename</span> 回调函数,用户å¯æ ¹æ®è‡ªå·±çš„规则判定是å¦å…许修改å称。</p>
+ <p>3ã€å¦‚æžœ beforeRename 返回 false,则继续ä¿æŒç¼–辑å称状æ€ï¼Œç›´åˆ°å称符åˆè§„则ä½ç½® (按下 ESC é”®å¯å–消编辑å称状æ€ï¼Œæ¢å¤åŽŸå称)。</p>
+ <p>4ã€å¦‚果未设置 beforeRename 或 beforeRename 返回 true,则结æŸèŠ‚点编辑å称状æ€ï¼Œæ›´æ–°èŠ‚点åç§°ï¼Œå¹¶è§¦å‘ <span class="highlight_red">setting.callback.onRename</span> 回调函数。</p>
+ <p>默认值:true</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true / false 分别表示 显示 / éšè— 编辑å称按钮</p>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>需è¦è®¾ç½®æ˜¯å¦æ˜¾ç¤ºç¼–辑å称按钮的节点 JSON æ•°æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>è¿”å›žå€¼åŒ Boolean æ ¼å¼çš„æ•°æ®</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. ä¸æ˜¾ç¤ºç¼–辑å称按钮</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ showRenameBtn: false
+ }
+};
+......</code></pre>
+ <h4>2. 设置所有的父节点ä¸æ˜¾ç¤ºç¼–辑å称按钮</h4>
+ <pre xmlns=""><code>function setRenameBtn(treeId, treeNode) {
+ return !treeNode.isParent;
+}
+var setting = {
+ edit: {
+ enable: true,
+ showRenameBtn: setRenameBtn
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.treeId.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.treeId.html
new file mode 100644
index 0000000..819743e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.treeId.html
@@ -0,0 +1,14 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.</span>treeId</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>zTree 的唯一标识,åˆå§‹åŒ–åŽï¼Œç­‰äºŽ 用户定义的 zTree 容器的 id 属性值。</p>
+ <p class="highlight_red">请勿进行åˆå§‹åŒ– 或 修改,属于内部å‚数。</p>
+ </div>
+ </div>
+
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.treeObj.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.treeObj.html
new file mode 100644
index 0000000..37684a1
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.treeObj.html
@@ -0,0 +1,14 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Object</span><span class="path">setting.</span>treeObj</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>zTree 容器的 jQuery 对象,主è¦åŠŸèƒ½ï¼šä¾¿äºŽæ“作。</p>
+ <p class="highlight_red">请勿进行åˆå§‹åŒ– 或 修改,属于内部å‚数。</p>
+ </div>
+ </div>
+
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.addDiyDom.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.addDiyDom.html
new file mode 100644
index 0000000..0a508ac
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.addDiyDom.html
@@ -0,0 +1,40 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.view.</span>addDiyDom</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于在节点上固定显示用户自定义控件</p>
+ <p class="highlight_red">1. 大数æ®é‡çš„节点加载请注æ„:在 addDiyDom 中针对æ¯ä¸ªèŠ‚点 查找 DOM 对象并且添加新 DOM 控件,肯定会影å“åˆå§‹åŒ–性能;如果ä¸æ˜¯å¿…须使用,建议ä¸ä½¿ç”¨æ­¤åŠŸèƒ½</p>
+ <p class="highlight_red">2. 属于高级应用,使用时请确ä¿å¯¹ zTree 比较了解。</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>需è¦æ˜¾ç¤ºè‡ªå®šä¹‰æŽ§ä»¶çš„节点 JSON æ•°æ®å¯¹è±¡</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. 设置节点åŽé¢æ˜¾ç¤ºä¸€ä¸ªæŒ‰é’®</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ addDiyDom: addDiyDom
+ }
+};
+function addDiyDom(treeId, treeNode) {
+ var aObj = $("#" + treeNode.tId + "_a");
+ if ($("#diyBtn_"+treeNode.id).length>0) return;
+ var editStr = "&lt;span id='diyBtn_space_" +treeNode.id+ "' &gt; &lt;/span&gt;"
+ + "&lt;button type='button' class='diyBtn1' id='diyBtn_" + treeNode.id
+ + "' title='"+treeNode.name+"' onfocus='this.blur();'&gt;&lt;/button&gt;";
+ aObj.append(editStr);
+ var btn = $("#diyBtn_"+treeNode.id);
+ if (btn) btn.bind("click", function(){alert("diy Button for " + treeNode.name);});
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.addHoverDom.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.addHoverDom.html
new file mode 100644
index 0000000..f073e79
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.addHoverDom.html
@@ -0,0 +1,45 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.view.</span>addHoverDom</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于当鼠标移动到节点上时,显示用户自定义控件,显示éšè—状æ€åŒ zTree 内部的编辑ã€åˆ é™¤æŒ‰é’®</p>
+ <p class="highlight_red">请务必与 <span class="highlight_red">setting.view.removeHoverDom</span> åŒæ—¶ä½¿ç”¨ï¼›å±žäºŽé«˜çº§åº”用,使用时请确ä¿å¯¹ zTree 比较了解。</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>需è¦æ˜¾ç¤ºè‡ªå®šä¹‰æŽ§ä»¶çš„节点 JSON æ•°æ®å¯¹è±¡</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. 设置鼠标移到节点上,在åŽé¢æ˜¾ç¤ºä¸€ä¸ªæŒ‰é’®</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ addHoverDom: addHoverDom,
+ removeHoverDom: removeHoverDom,
+ ......
+ }
+};
+function addHoverDom(treeId, treeNode) {
+ var aObj = $("#" + treeNode.tId + "_a");
+ if ($("#diyBtn_"+treeNode.id).length>0) return;
+ var editStr = "&lt;span id='diyBtn_space_" +treeNode.id+ "' &gt;&nbsp;&lt;/span&gt;"
+ + "&lt;button type='button' class='diyBtn1' id='diyBtn_" + treeNode.id
+ + "' title='"+treeNode.name+"' onfocus='this.blur();'&gt;&lt;/button&gt;";
+ aObj.append(editStr);
+ var btn = $("#diyBtn_"+treeNode.id);
+ if (btn) btn.bind("click", function(){alert("diy Button for " + treeNode.name);});
+};
+function removeHoverDom(treeId, treeNode) {
+ $("#diyBtn_"+treeNode.id).unbind().remove();
+ $("#diyBtn_space_" +treeNode.id).unbind().remove();
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.autoCancelSelected.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.autoCancelSelected.html
new file mode 100644
index 0000000..4890f78
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.autoCancelSelected.html
@@ -0,0 +1,26 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.view.</span>autoCancelSelected</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>点击节点时,按下 Ctrl 或 Cmd 键是å¦å…许å–消选择æ“作。</p>
+ <p class="highlight_red">如果ä¸éœ€è¦æ­¤åŠŸèƒ½ï¼Œè¯·è®¾ç½®ä¸º false。</p>
+ <p>默认值: true</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true / false 分别表示 æ”¯æŒ / ä¸æ”¯æŒ é…åˆ Ctrl 或 Cmd 键进行å–消节点选择的æ“作</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. ç¦æ­¢é…åˆ Ctrl 或 Cmd 键进行å–消节点选择的æ“作</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ autoCancelSelected: false
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.dblClickExpand.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.dblClickExpand.html
new file mode 100644
index 0000000..5f3db96
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.dblClickExpand.html
@@ -0,0 +1,44 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean / Function(treeId, treeNode)</span><span class="path">setting.view.</span>dblClickExpand</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>åŒå‡»èŠ‚点时,是å¦è‡ªåŠ¨å±•å¼€çˆ¶èŠ‚点的标识</p>
+ <p>默认值: true</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true / false 分别表示åŒå‡»èŠ‚点 åˆ‡æ¢ / ä¸åˆ‡æ¢ 展开状æ€</p>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>需è¦è®¾ç½®æ˜¯å¦åŒå‡»åˆ‡æ¢å±•å¼€çŠ¶æ€çš„节点 JSON æ•°æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>è¿”å›žå€¼åŒ Boolean æ ¼å¼çš„æ•°æ®</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. å–消默认åŒå‡»å±•å¼€çˆ¶èŠ‚点的功能</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ dblClickExpand: false
+ }
+};
+......</code></pre>
+ <h4>2. 设置 zTree ä»…ä»… level=0 的父节点å–消åŒå‡»å±•å¼€çš„功能</h4>
+ <pre xmlns=""><code>function dblClickExpand(treeId, treeNode) {
+ return treeNode.level > 0;
+};
+var setting = {
+ view: {
+ dblClickExpand: dblClickExpand
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.expandSpeed.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.expandSpeed.html
new file mode 100644
index 0000000..3b799c3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.expandSpeed.html
@@ -0,0 +1,31 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String / Number</span><span class="path">setting.view.</span>expandSpeed</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>zTree 节点展开ã€æŠ˜å æ—¶çš„åŠ¨ç”»é€Ÿåº¦ï¼Œè®¾ç½®æ–¹æ³•åŒ JQuery 动画效果中 speed å‚数。</p>
+ <p class="highlight_red">IE6 下会自动关闭动画效果,以ä¿è¯ zTree çš„æ“作速度</p>
+ <p>默认值:"fast"</p>
+ </div>
+ </div>
+ <h3>String æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>三ç§é¢„定速度之一的字符串("slow", "normal", or "fast")</p>
+ <p class="highlight_red">设置为 "" 时,ä¸æ˜¾ç¤ºåŠ¨ç”»æ•ˆæžœ</p>
+ </div>
+ <h3>Number æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>表示动画时长的毫秒数值 (如:1000)</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 设置为慢速显示动画效果</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ expandSpeed: "slow"
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.fontCss.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.fontCss.html
new file mode 100644
index 0000000..54efb1b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.fontCss.html
@@ -0,0 +1,42 @@
+<div class="apiDetail">
+<div>
+ <h2><span>JSON / Function(treeId, treeNode)</span><span class="path">setting.view.</span>fontCss</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>个性化文字样å¼ï¼Œåªé’ˆå¯¹ zTree 在节点上显示的&lt;A&gt;对象。</p>
+ <p>默认值:{}</p>
+ </div>
+ </div>
+ <h3>JSON æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>JSON æ ¼å¼ä¸º JQuery css方法中的 JSON 对象格å¼ï¼Œä¾‹å¦‚:<span class="highlight_red">{color:"#ff0011", background:"blue"}</span></p>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>需è¦è®¾ç½®è‡ªå®šä¹‰æ ·å¼çš„节点 JSON æ•°æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>JSON</span></h4>
+ <p>è¿”å›žå€¼åŒ JSON æ ¼å¼çš„æ•°æ®ï¼Œä¾‹å¦‚:<span class="highlight_red">{color:"#ff0011", background:"blue"}</span></p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. ä¸ä¿®æ”¹CSS,设置全部节点 name 显示为红色</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ fontCss : {color:"red"}
+ }
+};</code></pre>
+ <h4>2. 设置 level=0 的节点 name 显示为红色</h4>
+ <pre xmlns=""><code>function setFontCss(treeId, treeNode) {
+ return treeNode.level == 0 ? {color:"red"} : {};
+};
+var setting = {
+ view: {
+ fontCss: setFontCss
+ }
+};</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.nameIsHTML.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.nameIsHTML.html
new file mode 100644
index 0000000..a1d916c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.nameIsHTML.html
@@ -0,0 +1,27 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.view.</span>nameIsHTML</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>设置 name 属性是å¦æ”¯æŒ HTML 脚本</p>
+ <p class="highlight_red">如果å…许 HTML 脚本,请根æ®è‡ªå·±çš„需求åšæ ¡éªŒï¼Œé¿å…出现 js 注入等安全问题。</p>
+ <p>默认值: false</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true / false 分别表示 æ”¯æŒ / ä¸æ”¯æŒ HTML 脚本</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 设置 name å±žæ€§æ”¯æŒ HTML 脚本</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ nameIsHTML: true
+ }
+};
+var node = {"name":"&lt;font color='red'&gt;test&lt;/font&gt;"};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.removeHoverDom.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.removeHoverDom.html
new file mode 100644
index 0000000..bb1a9aa
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.removeHoverDom.html
@@ -0,0 +1,45 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.view.</span>removeHoverDom</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于当鼠标移出节点时,éšè—用户自定义控件,显示éšè—状æ€åŒ zTree 内部的编辑ã€åˆ é™¤æŒ‰é’®</p>
+ <p class="highlight_red">请务必与 <span class="highlight_red">addHoverDom</span> åŒæ—¶ä½¿ç”¨ï¼›å±žäºŽé«˜çº§åº”用,使用时请确ä¿å¯¹ zTree 比较了解。</p>
+ <p>默认值:null</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>需è¦éšè—自定义控件的节点 JSON æ•°æ®å¯¹è±¡</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. 设置鼠标移到节点上,在åŽé¢æ˜¾ç¤ºä¸€ä¸ªæŒ‰é’®</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ addHoverDom: addHoverDom,
+ removeHoverDom: removeHoverDom,
+ ......
+ }
+};
+function addHoverDom(treeId, treeNode) {
+ var aObj = $("#" + treeNode.tId + "_a");
+ if ($("#diyBtn_"+treeNode.id).length>0) return;
+ var editStr = "&lt;span id='diyBtn_space_" +treeNode.id+ "' &gt;&nbsp;&lt;/span&gt;"
+ + "&lt;button type='button' class='diyBtn1' id='diyBtn_" + treeNode.id
+ + "' title='"+treeNode.name+"' onfocus='this.blur();'&gt;&lt;/button&gt;";
+ aObj.append(editStr);
+ var btn = $("#diyBtn_"+treeNode.id);
+ if (btn) btn.bind("click", function(){alert("diy Button for " + treeNode.name);});
+};
+function removeHoverDom(treeId, treeNode) {
+ $("#diyBtn_"+treeNode.id).unbind().remove();
+ $("#diyBtn_space_" +treeNode.id).unbind().remove();
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.selectedMulti.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.selectedMulti.html
new file mode 100644
index 0000000..2cc65a2
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.selectedMulti.html
@@ -0,0 +1,27 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.view.</span>selectedMulti</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>设置是å¦å…许åŒæ—¶é€‰ä¸­å¤šä¸ªèŠ‚点。</p>
+ <p>默认值: true</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true / false 分别表示 æ”¯æŒ / ä¸æ”¯æŒ åŒæ—¶é€‰ä¸­å¤šä¸ªèŠ‚点</p>
+ <p class="highlight_red">1ã€è®¾ç½®ä¸º true时,按下 Ctrl 或 Cmd é”®å¯ä»¥é€‰ä¸­å¤šä¸ªèŠ‚点</p>
+ <p class="highlight_red">2ã€è®¾ç½®ä¸º true / false 都ä¸å½±å“按下 Ctrl 或 Cmd é”®å¯ä»¥è®©å·²é€‰ä¸­çš„节点å–消选中状æ€ï¼ˆ å–消选中状æ€å¯ä»¥å‚考 setting.view.autoCancelSelected )</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. ç¦æ­¢å¤šç‚¹åŒæ—¶é€‰ä¸­çš„功能</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ selectedMulti: false
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.showIcon.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.showIcon.html
new file mode 100644
index 0000000..ebe423c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.showIcon.html
@@ -0,0 +1,44 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean / Function(treeId, treeNode)</span><span class="path">setting.view.</span>showIcon</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>设置 zTree 是å¦æ˜¾ç¤ºèŠ‚点的图标。</p>
+ <p>默认值:true</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true / false 分别表示 显示 / éšè— 图标</p>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>需è¦è®¾ç½®æ˜¯å¦æ˜¾ç¤ºå›¾æ ‡çš„节点 JSON æ•°æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>è¿”å›žå€¼åŒ Boolean æ ¼å¼çš„æ•°æ®</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. 设置 zTree ä¸æ˜¾ç¤ºå›¾æ ‡</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ showIcon: false
+ }
+};
+......</code></pre>
+ <h4>2. 设置 zTree ä»…ä»… level=2 的节点ä¸æ˜¾ç¤ºå›¾æ ‡</h4>
+ <pre xmlns=""><code>function showIconForTree(treeId, treeNode) {
+ return treeNode.level != 2;
+};
+var setting = {
+ view: {
+ showIcon: showIconForTree
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.showLine.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.showLine.html
new file mode 100644
index 0000000..02ab5eb
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.showLine.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.view.</span>showLine</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>设置 zTree 是å¦æ˜¾ç¤ºèŠ‚点之间的连线。</p>
+ <p>默认值:true</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true / false 分别表示 显示 / ä¸æ˜¾ç¤º 连线</p>
+ </div>
+ <h3>setting 举例</h3>
+ <h4>1. 设置 zTree ä¸æ˜¾ç¤ºèŠ‚点之间的连线</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ showLine: false
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.showTitle.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.showTitle.html
new file mode 100644
index 0000000..5bcb860
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.showTitle.html
@@ -0,0 +1,46 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean / Function(treeId, treeNode)</span><span class="path">setting.view.</span>showTitle</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>设置 zTree 是å¦æ˜¾ç¤ºèŠ‚点的 title æ示信æ¯(å³èŠ‚点 DOM çš„ title 属性)。</p>
+ <p class="highlight_red">请务必与 <span class="highlight_red">setting.data.key.title</span> åŒæ—¶ä½¿ç”¨ã€‚</p>
+ <p>默认值:true</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true / false 分别表示 显示 / éšè— æ示信æ¯</p>
+ <p class="highlight_red">如果 setting.view.showTitle = true & setting.data.key.title = '',zTree 会自动使用 setting.data.key.name 指定的节点åç§°å½“åš title</p>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>对应 zTree çš„ <b class="highlight_red">treeId</b>,便于用户æ“控</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>需è¦è®¾ç½®æ˜¯å¦æ˜¾ç¤ºæ示信æ¯çš„节点 JSON æ•°æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>è¿”å›žå€¼åŒ Boolean æ ¼å¼çš„æ•°æ®</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. 设置 zTree ä¸æ˜¾ç¤ºæ示信æ¯</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ showTitle: false
+ }
+};
+......</code></pre>
+ <h4>2. 设置 zTree ä»…ä»… level=2 的节点ä¸æ˜¾ç¤ºæ示信æ¯</h4>
+ <pre xmlns=""><code>function showTitleForTree(treeId, treeNode) {
+ return treeNode.level != 2;
+};
+var setting = {
+ view: {
+ showTitle: showTitleForTree
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.txtSelectedEnable.html b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.txtSelectedEnable.html
new file mode 100644
index 0000000..c22a8c0
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/setting.view.txtSelectedEnable.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.view.</span>txtSelectedEnable</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>设置 zTree 是å¦å…许å¯ä»¥é€‰æ‹© zTree DOM 内的文本。</p>
+ <p>默认值:false</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true / false 分别表示 å…许 / ä¸å…许 选择 zTree Dom 内的文本</p>
+ </div>
+ <h3>setting & function 举例</h3>
+ <h4>1. 设置 zTree å…许选择文本</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ txtSelectedEnable: true
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.check_Child_State.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.check_Child_State.html
new file mode 100644
index 0000000..fa37899
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.check_Child_State.html
@@ -0,0 +1,43 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Number</span><span class="path">treeNode.</span>check_Child_State</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于设置节点的å­èŠ‚点的 checkBox / radio çš„åŠé€‰çŠ¶æ€ã€‚<span class="highlight_red">[setting.check.enable = true 时有效]</span></p>
+ <p class="highlight_red">v3.x 针对节点数æ®å¯¹è±¡æä¾› treeNode.getCheckStatus() 方法获å–标准的åŠé€‰çŠ¶æ€</p>
+ <p class="highlight_red">zTree 内部使用,请勿进行åˆå§‹åŒ– 或 éšæ„修改</p>
+ <p>默认值:true</p>
+ </div>
+ </div>
+ <h3>Number æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>规则如下:</p>
+ <table width="100%" border="0" cellspacing="1" cellpadding="0">
+ <thead>
+ <tr><td colspan="4">setting.check.checkType = "checkbox"</td></tr>
+ <tr><td>treeNode.check_Child_State</td><td>勾选状æ€è¯´æ˜Ž</td></tr>
+ </thead>
+ <tbody>
+ <tr><td>-1</td><td>ä¸å­˜åœ¨å­èŠ‚点 或 å­èŠ‚点全部设置为 nocheck = true</td></tr>
+ <tr><td>0</td><td>æ—  å­èŠ‚点被勾选</td></tr>
+ <tr><td>1</td><td>部分 å­èŠ‚点被勾选</td></tr>
+ <tr><td>2</td><td>全部 å­èŠ‚点被勾选</td></tr>
+ </tbody>
+ </table>
+ <br/>
+ <table width="100%" border="0" cellspacing="1" cellpadding="0">
+ <thead>
+ <tr><td colspan="4">setting.check.checkType = "radio"</td></tr>
+ <tr><td>treeNode.check_Child_State</td><td>勾选状æ€è¯´æ˜Ž</td></tr>
+ </thead>
+ <tbody>
+ <tr><td>-1</td><td>ä¸å­˜åœ¨å­èŠ‚点 或 å­èŠ‚点全部设置为 nocheck = true</td></tr>
+ <tr><td>0</td><td>æ—  å­èŠ‚点被勾选</td></tr>
+ <tr><td>2</td><td>有 å­èŠ‚点被勾选</td></tr>
+ </tbody>
+ </table>
+ </div>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.check_Focus.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.check_Focus.html
new file mode 100644
index 0000000..785aec9
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.check_Focus.html
@@ -0,0 +1,19 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>check_Focus</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于设置节点的 checkBox / radio çš„ focus 状æ€ã€‚<span class="highlight_red">[setting.check.enable = true 时有效]</span></p>
+ <p class="highlight_red">zTree 内部使用,请勿进行åˆå§‹åŒ– 或 éšæ„修改</p>
+ <p>默认值:false</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>true 表示当å‰é¼ æ ‡ç§»åŠ¨åˆ°è¾“入框内</p>
+ <p>false 表示当å‰é¼ æ ‡ç§»åŠ¨åˆ°è¾“入框外</p>
+ </div>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.checked.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.checked.html
new file mode 100644
index 0000000..049d6ba
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.checked.html
@@ -0,0 +1,32 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>checked</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>节点的 checkBox / radio çš„ 勾选状æ€ã€‚<span class="highlight_red">[setting.check.enable = true & treeNode.nocheck = false 时有效]</span></p>
+ <p class="highlight_red">1ã€å¦‚æžœä¸ä½¿ç”¨ checked 属性设置勾选状æ€ï¼Œè¯·ä¿®æ”¹ setting.data.key.checked </p>
+ <p class="highlight_red">2ã€å»ºç«‹ treeNode æ•°æ®æ—¶è®¾ç½® treeNode.checked = true å¯ä»¥è®©èŠ‚点的输入框默认为勾选状æ€</p>
+ <p class="highlight_red">3ã€ä¿®æ”¹èŠ‚点勾选状æ€ï¼Œå¯ä»¥ä½¿ç”¨ treeObj.checkNode / checkAllNodes / updateNode 方法,具体使用哪ç§è¯·æ ¹æ®è‡ªå·±çš„需求而定</p>
+ <p class="highlight_red">4ã€ä¸ºäº†è§£å†³éƒ¨åˆ†æœ‹å‹ç”Ÿæˆ json æ•°æ®å‡ºçŽ°çš„兼容问题, æ”¯æŒ "false","true" 字符串格å¼çš„æ•°æ®</p>
+ <p>默认值:false</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>true 表示节点的输入框被勾选</p>
+ <p>false 表示节点的输入框未勾选</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. åˆå§‹åŒ–çš„æ•°æ®è®¾ç½® 默认为勾选状æ€</h4>
+ <pre xmlns=""><code>var nodes = [
+{ "id":1, "name":"test1", checked:true },
+{ "id":2, "name":"test2", checked:true }
+]</code></pre>
+ <h4>2. 获å–第一个根节点的勾选状æ€</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var checked = treeObj.getNodes()[0].checked;
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.checkedOld.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.checkedOld.html
new file mode 100644
index 0000000..cab717e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.checkedOld.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>checkedOld</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>节点的 checkBox / radio 在åˆå§‹åŒ–时的 勾选状æ€ã€‚<span class="highlight_red">[setting.check.enable = true & treeNode.nocheck = false 时有效]</span></p>
+ <p class="highlight_red">1ã€zTree åˆå§‹åŒ–节点数æ®æ—¶ä¼šå¯¹æ­¤å±žæ€§è¿›è¡Œèµ‹å€¼ï¼Œå› æ­¤è¯·å‹¿å¯¹æ­¤å±žæ€§åˆå§‹åŒ–</p>
+ <p class="highlight_red">2ã€å¦‚需é…åˆ zTreeObj.getChangeCheckedNodes 方法实现特殊功能,å¯ä»¥æ ¹æ®éœ€æ±‚在使用中自行修改 checkedOld æ•°æ®</p>
+ <p>默认值:checkedçš„åˆå§‹åŒ–值</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>true 表示节点åˆå§‹åŒ–æ—¶ 输入框被勾选</p>
+ <p>false 表示节点åˆå§‹åŒ–æ—¶ 输入框未勾选</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 获å–第一个根节点的åˆå§‹å‹¾é€‰çŠ¶æ€</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var checkedOld = treeObj.getNodes()[0].checkedOld;
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.children.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.children.html
new file mode 100644
index 0000000..4bab835
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.children.html
@@ -0,0 +1,35 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Array(JSON)</span><span class="path">treeNode.</span>children</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>节点的å­èŠ‚点数æ®é›†åˆã€‚</p>
+ <p class="highlight_red">1ã€å¦‚æžœä¸ä½¿ç”¨ children 属性ä¿å­˜å­èŠ‚点数æ®ï¼Œè¯·ä¿®æ”¹ setting.data.key.children </p>
+ <p class="highlight_red">2ã€å¼‚步加载时,对于设置了 isParent = true 的节点,在展开时将进行异步加载</p>
+ <p>默认值:无</p>
+ </div>
+ </div>
+ <h3>Array(JSON) æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>标准的 JSON æ•°æ®å¯¹è±¡</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. åˆå§‹åŒ–的标准嵌套格å¼çš„ JSON æ•°æ®å¯¹è±¡</h4>
+ <pre xmlns=""><code>var nodes = [
+{ "id":1, "name":"test1",
+ children: [
+ { "id":3, "name":"test3"},
+ { "id":4, "name":"test4"},
+ { "id":5, "name":"test5"}
+ ]
+},
+{ "id":2, "name":"test2" }
+]</code></pre>
+ <h4>2. 获å–第一个根节点的å­èŠ‚点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodes()[0].children;
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.chkDisabled.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.chkDisabled.html
new file mode 100644
index 0000000..e6bb032
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.chkDisabled.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>chkDisabled</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>1ã€è®¾ç½®èŠ‚点的 checkbox / radio 是å¦ç¦ç”¨ <span class="highlight_red">[setting.check.enable = true 时有效]</span></p>
+ <p class="highlight_red">2ã€ä¸ºäº†è§£å†³éƒ¨åˆ†æœ‹å‹ç”Ÿæˆ json æ•°æ®å‡ºçŽ°çš„兼容问题, æ”¯æŒ "false","true" 字符串格å¼çš„æ•°æ®</p>
+ <p class="highlight_red">3ã€è¯·å‹¿å¯¹å·²åŠ è½½çš„节点修改此属性,ç¦æ­¢ 或 å–消ç¦æ­¢ 请使用 setChkDisabled() 方法</p>
+ <p class="highlight_red">4ã€åˆå§‹åŒ–时,如果需è¦å­å­™èŠ‚点继承父节点的 chkDisabled 属性,请设置 setting.check.chkDisabledInherit 属性</p>
+ <p>默认值:false</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p class="highlight_red">true 表示此节点的 checkbox / radio 被ç¦ç”¨ã€‚</p>
+ <p class="highlight_red">false 表示此节点的 checkbox / radio å¯ä»¥ä½¿ç”¨ã€‚</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. ç¦ç”¨èŠ‚点 checkbox / radio </h4>
+ <pre xmlns=""><code>var nodes = [
+ { "id":1, "name":"test1", "checked":true, "chkDisabled":true},
+ { "id":2, "name":"test2", "chkDisabled":true},
+ { "id":3, "name":"test3"}
+]</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.click.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.click.html
new file mode 100644
index 0000000..833c678
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.click.html
@@ -0,0 +1,24 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">treeNode.</span>click</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>最简å•çš„ click 事件æ“作。相当于 onclick="..." 的内容。 如果æ“作较å¤æ‚,请使用 onClick 事件回调函数。</p>
+ <p class="highlight_red">由于 IE 对于 onclick å’Œ click事件共存时的处ç†ä¸Žå…¶ä»–æµè§ˆå™¨ä¸åŒï¼Œæ‰€ä»¥è¯·ä¸è¦åˆ©ç”¨æ­¤å‚数控制是å¦å…许跳转的æ“作(例如:treeNode.click = "return false;")。如有类似需求,请ä¸è¦ä½¿ç”¨ url 属性设置网å€ï¼ŒåŒæ—¶åˆ©ç”¨ onClick 回调函数控制跳转。</p>
+ <p>默认值:无</p>
+ </div>
+ </div>
+ <h3>String æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>标准 javascript 语法, 例如:alert("test"); 等</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 设置æŸèŠ‚点点击时,弹出信æ¯æ¡†</h4>
+ <pre xmlns=""><code>var nodes = [
+ { "id":1, "name":"Google CN", "url":"http://g.cn", "click":"alert('test');"},
+ ......
+]</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.diy.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.diy.html
new file mode 100644
index 0000000..b2fb0d9
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.diy.html
@@ -0,0 +1,15 @@
+<div class="apiDetail">
+<div>
+ <h2><span>?</span><span class="path">treeNode.</span>* DIY *</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于ä¿å­˜èŠ‚点的其他自定义数æ®ä¿¡æ¯ï¼Œä¸è¦ä¸Ž zTree 使用的属性相åŒå³å¯ï¼Œç”¨æˆ·å¯éšæ„设定。</p>
+ </div>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 设置节点的备用英文å称</h4>
+ <pre xmlns=""><code>var node = { "id":1, "name":"test1", "ename":"test eName"};</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.editNameFlag.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.editNameFlag.html
new file mode 100644
index 0000000..51162b8
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.editNameFlag.html
@@ -0,0 +1,19 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>editNameFlag</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>用于记录节点是å¦å¤„于编辑å称状æ€ã€‚<span class="highlight_red">[setting.edit.enable = true 时有效]</span></p>
+ <p class="highlight_red">zTree 内部使用,请勿进行åˆå§‹åŒ– 或 éšæ„修改</p>
+ <p>默认值:false</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>true 表示节点处于编辑å称状æ€</p>
+ <p>false 表示节点未处于编辑å称状æ€</p>
+ </div>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.getCheckStatus.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.getCheckStatus.html
new file mode 100644
index 0000000..fc20eac
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.getCheckStatus.html
@@ -0,0 +1,63 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function()</span><span class="path">treeNode.</span>getCheckStatus</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>获å–节点 checkbox / radio åŠå‹¾é€‰çŠ¶æ€ã€‚<span class="highlight_red">[setting.check.enable = true 时有效]</span></p>
+ <p class="highlight_red">åˆå§‹åŒ–节点数æ®æ—¶ï¼Œç”± zTree 增加此属性,请勿æå‰èµ‹å€¼</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>返回值</b><span>JSON</span></h4>
+ <pre xmlns=""><code>{
+ checked: true, //ç­‰åŒäºŽ treeNode.checked
+ half: true //规则è§ä¸‹è¡¨
+}</code></pre>
+ <table width="100%" border="0" cellspacing="1" cellpadding="0">
+ <thead>
+ <tr><td colspan="4">setting.check.checkType = "checkbox"</td></tr>
+ <tr><td>treeNode.checked</td><td>treeNode.check_Child_State</td><td>treeNode.halfCheck</td><td> half </td></tr>
+ </thead>
+ <tbody>
+ <tr><td>-</td><td>-</td><td>true</td><td>true</td></tr>
+ <tr><td colspan="4">&nbsp;</td></tr>
+ <tr><td>true</td><td>-1</td><td>false</td><td>false</td></tr>
+ <tr><td>true</td><td>0</td><td>false</td><td>true</td></tr>
+ <tr><td>true</td><td>1</td><td>false</td><td>true</td></tr>
+ <tr><td>true</td><td>2</td><td>false</td><td>false</td></tr>
+ <tr><td colspan="4">&nbsp;</td></tr>
+ <tr><td>false</td><td>-1</td><td>false</td><td>false</td></tr>
+ <tr><td>false</td><td>0</td><td>false</td><td>false</td></tr>
+ <tr><td>false</td><td>1</td><td>false</td><td>true</td></tr>
+ <tr><td>false</td><td>2</td><td>false</td><td>true</td></tr>
+ </tbody>
+ </table>
+ <br/>
+ <table width="100%" border="0" cellspacing="1" cellpadding="0">
+ <thead>
+ <tr><td colspan="4">setting.check.checkType = "radio"</td></tr>
+ <tr><td>treeNode.checked</td><td>treeNode.check_Child_State</td><td>treeNode.halfCheck</td><td> half </td></tr>
+ </thead>
+ <tbody>
+ <tr><td>-</td><td>-</td><td>true</td><td>true</td></tr>
+ <tr><td colspan="4">&nbsp;</td></tr>
+ <tr><td>true</td><td>-1</td><td>false</td><td>false</td></tr>
+ <tr><td>true</td><td>0</td><td>false</td><td>false</td></tr>
+ <tr><td>true</td><td>2</td><td>false</td><td>true</td></tr>
+ <tr><td colspan="4">&nbsp;</td></tr>
+ <tr><td>false</td><td>-1</td><td>false</td><td>false</td></tr>
+ <tr><td>false</td><td>0</td><td>false</td><td>false</td></tr>
+ <tr><td>false</td><td>2</td><td>false</td><td>true</td></tr>
+ </tbody>
+ </table>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 获å–第一个根节点的åŠé€‰çŠ¶æ€</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var halfCheck = treeObj.getNodes()[0].getCheckStatus();
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.getNextNode.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.getNextNode.html
new file mode 100644
index 0000000..7a0fa5c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.getNextNode.html
@@ -0,0 +1,27 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function()</span><span class="path">treeNode.</span>getNextNode</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>获å–与 treeNode 节点相邻的åŽä¸€ä¸ªèŠ‚点。</p>
+ <p class="highlight_red">åˆå§‹åŒ–节点数æ®æ—¶ï¼Œç”± zTree 增加此属性,请勿æå‰èµ‹å€¼</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>返回值</b><span>JSON</span></h4>
+ <p>与 treeNode 节点相邻的åŽä¸€ä¸ªèŠ‚点。</p>
+ <p class="highlight_red">如果 treeNode 是最åŽä¸€ä¸ªèŠ‚点,返回 null 。</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 获å–当å‰è¢«é€‰ä¸­çš„节点的下一个节点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var node = sNodes[0].getNextNode();
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.getParentNode.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.getParentNode.html
new file mode 100644
index 0000000..31309a6
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.getParentNode.html
@@ -0,0 +1,27 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function()</span><span class="path">treeNode.</span>getParentNode</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>èŽ·å– treeNode 节点的父节点。</p>
+ <p class="highlight_red">åˆå§‹åŒ–节点数æ®æ—¶ï¼Œç”± zTree 增加此属性,请勿æå‰èµ‹å€¼</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>返回值</b><span>JSON</span></h4>
+ <p> treeNode 节点的父节点 JSON æ•°æ®å¯¹è±¡ã€‚</p>
+ <p class="highlight_red">如果 treeNode 是根节点,返回 null 。</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 获å–当å‰è¢«é€‰ä¸­çš„节点的父节点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var node = sNodes[0].getParentNode();
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.getPreNode.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.getPreNode.html
new file mode 100644
index 0000000..9d84184
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.getPreNode.html
@@ -0,0 +1,27 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function()</span><span class="path">treeNode.</span>getPreNode</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>获å–与 treeNode 节点相邻的å‰ä¸€ä¸ªèŠ‚点。</p>
+ <p class="highlight_red">åˆå§‹åŒ–节点数æ®æ—¶ï¼Œç”± zTree 增加此属性,请勿æå‰èµ‹å€¼</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>返回值</b><span>JSON</span></h4>
+ <p>与 treeNode 节点相邻的å‰ä¸€ä¸ªèŠ‚点。</p>
+ <p class="highlight_red">如果 treeNode 是第一个节点,返回 null 。</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 获å–当å‰è¢«é€‰ä¸­çš„节点的å‰ä¸€ä¸ªèŠ‚点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var node = sNodes[0].getPreNode();
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.halfCheck.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.halfCheck.html
new file mode 100644
index 0000000..23ac744
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.halfCheck.html
@@ -0,0 +1,29 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>halfCheck</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>强制节点的 checkBox / radio çš„ åŠå‹¾é€‰çŠ¶æ€ã€‚<span class="highlight_red">[setting.check.enable = true & treeNode.nocheck = false 时有效]</span></p>
+ <p class="highlight_red">1ã€å¼ºåˆ¶ä¸ºåŠå‹¾é€‰çŠ¶æ€åŽï¼Œä¸å†è¿›è¡Œè‡ªåŠ¨è®¡ç®—åŠå‹¾é€‰çŠ¶æ€</p>
+ <p class="highlight_red">2ã€è®¾ç½® treeNode.halfCheck = false 或 null æ‰èƒ½æ¢å¤è‡ªåŠ¨è®¡ç®—åŠå‹¾é€‰çŠ¶æ€</p>
+ <p class="highlight_red">3ã€ä¸ºäº†è§£å†³éƒ¨åˆ†æœ‹å‹ç”Ÿæˆ json æ•°æ®å‡ºçŽ°çš„兼容问题, æ”¯æŒ "false","true" 字符串格å¼çš„æ•°æ®</p>
+ <p>默认值:false</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>true 表示节点的输入框 强行设置为åŠå‹¾é€‰</p>
+ <p>false 表示节点的输入框 æ ¹æ® zTree 的规则自动计算åŠå‹¾é€‰çŠ¶æ€</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. åˆå§‹åŒ–çš„æ•°æ®è®¾ç½® 默认为åŠå‹¾é€‰çŠ¶æ€</h4>
+ <pre xmlns=""><code>var nodes = [
+{ "id":1, "name":"test1", isParent:true, checked:true, halfCheck:true },
+{ "id":2, "name":"test2", isParent:true, checked:false, halfCheck:true },
+{ "id":3, "name":"test3", isParent:true, checked:true },
+{ "id":4, "name":"test4", isParent:true, checked:false }
+]</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.icon.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.icon.html
new file mode 100644
index 0000000..69c5db1
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.icon.html
@@ -0,0 +1,33 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">treeNode.</span>icon</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>节点自定义图标的 URL 路径。</p>
+ <p class="highlight_red">1ã€çˆ¶èŠ‚点如果åªè®¾ç½® icon ,会导致展开ã€æŠ˜å æ—¶éƒ½ä½¿ç”¨åŒä¸€ä¸ªå›¾æ ‡</p>
+ <p class="highlight_red">2ã€çˆ¶èŠ‚点展开ã€æŠ˜å ä½¿ç”¨ä¸åŒçš„个性化图标需è¦åŒæ—¶è®¾ç½® treeNode.iconOpen / treeNode.iconClose 两个属性</p>
+ <p class="highlight_red">3ã€å¦‚果想利用 className 设置个性化图标,需è¦è®¾ç½® treeNode.iconSkin 属性</p>
+ <p>默认值:无</p>
+ </div>
+ </div>
+ <h3>String æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>图标图片的 url å¯ä»¥æ˜¯ç›¸å¯¹è·¯å¾„也å¯ä»¥æ˜¯ç»å¯¹è·¯å¾„</p>
+ <p class="highlight_red">设置相对路径请注æ„页é¢ä¸Žå›¾ç‰‡ä¹‹é—´çš„关系,确ä¿å›¾ç‰‡èƒ½å¤Ÿæ­£å¸¸åŠ è½½</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 设置节点的个性化图标</h4>
+ <pre xmlns=""><code>var nodes = [
+ //父节点展开 折å æ—¶ä½¿ç”¨ç›¸åŒçš„图标
+ { name:"父节点1", icon:"/img/parent.gif"},
+
+ //父节点展开 折å æ—¶åˆ†åˆ«ä½¿ç”¨ä¸åŒçš„图标
+ { name:"父节点2", iconOpen:"/img/open.gif", iconClose:"/img/close.gif"},
+
+ //å¶å­èŠ‚点个性化图标
+ { name:"å¶å­èŠ‚点", icon:"/img/leaf.gif"}
+]</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.iconClose.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.iconClose.html
new file mode 100644
index 0000000..f51da9c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.iconClose.html
@@ -0,0 +1,33 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">treeNode.</span>iconClose</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>父节点自定义折å æ—¶å›¾æ ‡çš„ URL 路径。</p>
+ <p class="highlight_red">1ã€æ­¤å±žæ€§åªé’ˆå¯¹çˆ¶èŠ‚点有效</p>
+ <p class="highlight_red">2ã€æ­¤å±žæ€§å¿…须与 iconOpen åŒæ—¶ä½¿ç”¨</p>
+ <p class="highlight_red">3ã€å¦‚果想利用 className 设置个性化图标,需è¦è®¾ç½® treeNode.iconSkin 属性</p>
+ <p>默认值:无</p>
+ </div>
+ </div>
+ <h3>String æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>图标图片的 url å¯ä»¥æ˜¯ç›¸å¯¹è·¯å¾„也å¯ä»¥æ˜¯ç»å¯¹è·¯å¾„</p>
+ <p class="highlight_red">设置相对路径请注æ„页é¢ä¸Žå›¾ç‰‡ä¹‹é—´çš„关系,确ä¿å›¾ç‰‡èƒ½å¤Ÿæ­£å¸¸åŠ è½½</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 设置节点的个性化图标</h4>
+ <pre xmlns=""><code>var nodes = [
+ //父节点展开 折å æ—¶ä½¿ç”¨ç›¸åŒçš„图标
+ { name:"父节点1", icon:"/img/parent.gif"},
+
+ //父节点展开 折å æ—¶åˆ†åˆ«ä½¿ç”¨ä¸åŒçš„图标
+ { name:"父节点2", iconOpen:"/img/open.gif", iconClose:"/img/close.gif"},
+
+ //å¶å­èŠ‚点个性化图标
+ { name:"å¶å­èŠ‚点", icon:"/img/leaf.gif"}
+]</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.iconOpen.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.iconOpen.html
new file mode 100644
index 0000000..29c9baa
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.iconOpen.html
@@ -0,0 +1,33 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">treeNode.</span>iconOpen</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>父节点自定义展开时图标的 URL 路径。</p>
+ <p class="highlight_red">1ã€æ­¤å±žæ€§åªé’ˆå¯¹çˆ¶èŠ‚点有效</p>
+ <p class="highlight_red">2ã€æ­¤å±žæ€§å¿…须与 iconClose åŒæ—¶ä½¿ç”¨</p>
+ <p class="highlight_red">3ã€å¦‚果想利用 className 设置个性化图标,需è¦è®¾ç½® treeNode.iconSkin 属性</p>
+ <p>默认值:无</p>
+ </div>
+ </div>
+ <h3>String æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>图标图片的 url å¯ä»¥æ˜¯ç›¸å¯¹è·¯å¾„也å¯ä»¥æ˜¯ç»å¯¹è·¯å¾„</p>
+ <p class="highlight_red">设置相对路径请注æ„页é¢ä¸Žå›¾ç‰‡ä¹‹é—´çš„关系,确ä¿å›¾ç‰‡èƒ½å¤Ÿæ­£å¸¸åŠ è½½</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 设置节点的个性化图标</h4>
+ <pre xmlns=""><code>var nodes = [
+ //父节点展开 折å æ—¶ä½¿ç”¨ç›¸åŒçš„图标
+ { name:"父节点1", icon:"/img/parent.gif"},
+
+ //父节点展开 折å æ—¶åˆ†åˆ«ä½¿ç”¨ä¸åŒçš„图标
+ { name:"父节点2", iconOpen:"/img/open.gif", iconClose:"/img/close.gif"},
+
+ //å¶å­èŠ‚点个性化图标
+ { name:"å¶å­èŠ‚点", icon:"/img/leaf.gif"}
+]</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.iconSkin.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.iconSkin.html
new file mode 100644
index 0000000..d5d9726
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.iconSkin.html
@@ -0,0 +1,43 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">treeNode.</span>iconSkin</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>节点自定义图标的 className</p>
+ <p class="highlight_red">1ã€éœ€è¦ä¿®æ”¹ css,增加相应 className 的设置</p>
+ <p class="highlight_red">2ã€css æ–¹å¼ç®€å•ã€æ–¹ä¾¿ï¼Œå¹¶ä¸”åŒæ—¶æ”¯æŒçˆ¶èŠ‚点展开ã€æŠ˜å çŠ¶æ€åˆ‡æ¢å›¾ç‰‡</p>
+ <p class="highlight_red">3ã€css 建议采用图片分割渲染的方å¼ä»¥å‡å°‘åå¤åŠ è½½å›¾ç‰‡ï¼Œå¹¶ä¸”é¿å…图片闪动</p>
+ <p class="highlight_red">4ã€zTree v3.x çš„ iconSkin åŒæ ·æ”¯æŒ IE6</p>
+ <p class="highlight_red">5ã€å¦‚果想直接使用 图片的Url路径 设置节点的个性化图标,需è¦è®¾ç½® treeNode.icon / treeNode.iconOpen / treeNode.iconClose 属性</p>
+ <p>默认值:无</p>
+ </div>
+ </div>
+ <h3>String æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>设置个性图标的 className</p>
+ </div>
+ <h3>css & treeNode 举例</h3>
+ <h4>1. 设置节点的个性化图标</h4>
+ <pre xmlns=""><code>css 内容:
+.ztree li span.button.diy01_ico_open, .ztree li span.button.diy01_ico_close{...}
+
+.ztree li span.button.diy02_ico_open{...}
+.ztree li span.button.diy02_ico_close{...}
+
+.ztree li span.button.diy03_ico_docu{...}
+
+js中节点数æ®ï¼š
+var nodes = [
+ //父节点展开 折å æ—¶ä½¿ç”¨ç›¸åŒçš„图标
+ { name:"父节点1", iconSkin:"diy01"},
+
+ //父节点展开 折å æ—¶åˆ†åˆ«ä½¿ç”¨ä¸åŒçš„图标
+ { name:"父节点2", iconSkin:"diy02"},
+
+ //å¶å­èŠ‚点个性化图标
+ { name:"å¶å­èŠ‚点", iconSkin:"diy03"}
+]</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isAjaxing.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isAjaxing.html
new file mode 100644
index 0000000..330c120
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isAjaxing.html
@@ -0,0 +1,26 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>isAjaxing</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>记录 treeNode 节点是å¦æ­£åœ¨è¿›è¡Œå¼‚步加载。</p>
+ <p class="highlight_red">åˆå§‹åŒ–节点数æ®æ—¶ï¼Œç”± zTree 增加此属性,请勿æå‰èµ‹å€¼</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true 表示节点正在进行异步加载</p>
+ <p> false 表示节点没有进行异步加载</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 查看当å‰è¢«é€‰ä¸­çš„节点是å¦èŠ‚点正在进行异步加载</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var isAjaxing = sNodes[0].isAjaxing;
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isFirstNode.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isFirstNode.html
new file mode 100644
index 0000000..83b80bd
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isFirstNode.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>isFirstNode</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>记录 treeNode 节点是å¦ä¸ºåŒçº§èŠ‚点中的第一个节点。</p>
+ <p class="highlight_red">使用 exhide 扩展åŽï¼Œåªé’ˆå¯¹æ˜¾ç¤ºçš„节点设置此属性</p>
+ <p class="highlight_red">åˆå§‹åŒ–节点数æ®æ—¶ï¼Œç”± zTree 增加此属性,请勿æå‰èµ‹å€¼</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true 表示是åŒçº§èŠ‚点中的第一个节点</p>
+ <p> false 表示ä¸æ˜¯åŒçº§èŠ‚点中的第一个节点</p>
+ <p class="highlight_red">节点被éšè—åŽï¼ŒisFirstNode = false</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 查看当å‰è¢«é€‰ä¸­çš„节点是å¦æ˜¯åŒçº§èŠ‚点中的第一个节点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var isFirstNode = sNodes[0].isFirstNode;
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isHidden.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isHidden.html
new file mode 100644
index 0000000..5fb388e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isHidden.html
@@ -0,0 +1,27 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>isHidden</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exhide</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>判断 treeNode 节点是å¦è¢«éšè—。</p>
+ <p class="highlight_red">1ã€åˆå§‹åŒ– zTree 时,如果节点设置 isHidden = true,会被自动éšè—</p>
+ <p class="highlight_red">2ã€è¯·å‹¿å¯¹å·²åŠ è½½çš„节点修改此属性,éšè— / 显示 请使用 hideNode() / hideNodes() / showNode() / showNodes() 方法</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true 表示被éšè—</p>
+ <p> false 表示被显示</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 查看第一个根节点是å¦è¢«éšè—</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getNodes();
+if (sNodes.length > 0) {
+ var isHidden = sNodes[0].isHidden;
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isHover.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isHover.html
new file mode 100644
index 0000000..dcef6eb
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isHover.html
@@ -0,0 +1,19 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>isHover</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>记录节点 çš„ hover 状æ€ï¼Œä¸»è¦ç”¨äºŽ setting.view.addHoverDom / removeHoverDom 。</p>
+ <p class="highlight_red">zTree 内部使用,请勿进行åˆå§‹åŒ– 或 éšæ„修改</p>
+ <p>默认值:false</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>true 表示节点处于 hover 状æ€</p>
+ <p>false 表示节点未处于 hover 状æ€</p>
+ </div>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isLastNode.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isLastNode.html
new file mode 100644
index 0000000..5d5ac82
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isLastNode.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>isLastNode</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>记录 treeNode 节点是å¦ä¸ºåŒçº§èŠ‚点中的最åŽä¸€ä¸ªèŠ‚点。</p>
+ <p class="highlight_red">使用 exhide 扩展åŽï¼Œåªé’ˆå¯¹æ˜¾ç¤ºçš„节点设置此属性</p>
+ <p class="highlight_red">åˆå§‹åŒ–节点数æ®æ—¶ï¼Œç”± zTree 增加此属性,请勿æå‰èµ‹å€¼</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true 表示是åŒçº§èŠ‚点中的最åŽä¸€ä¸ªèŠ‚点</p>
+ <p> false 表示ä¸æ˜¯åŒçº§èŠ‚点中的最åŽä¸€ä¸ªèŠ‚点</p>
+ <p class="highlight_red">节点被éšè—åŽï¼ŒisLastNode = false</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 查看当å‰è¢«é€‰ä¸­çš„节点是å¦æ˜¯åŒçº§èŠ‚点中的最åŽä¸€ä¸ªèŠ‚点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var isLastNode = sNodes[0].isLastNode;
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isParent.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isParent.html
new file mode 100644
index 0000000..bab887e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.isParent.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>isParent</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>记录 treeNode 节点是å¦ä¸ºçˆ¶èŠ‚点。</p>
+ <p class="highlight_red">1ã€åˆå§‹åŒ–节点数æ®æ—¶ï¼Œæ ¹æ® treeNode.children 属性判断,有å­èŠ‚点则设置为 true,å¦åˆ™ä¸º false</p>
+ <p class="highlight_red">2ã€åˆå§‹åŒ–节点数æ®æ—¶ï¼Œå¦‚果设定 treeNode.isParent = true,å³ä½¿æ— å­èŠ‚点数æ®ï¼Œä¹Ÿä¼šè®¾ç½®ä¸ºçˆ¶èŠ‚点</p>
+ <p class="highlight_red">3ã€ä¸ºäº†è§£å†³éƒ¨åˆ†æœ‹å‹ç”Ÿæˆ json æ•°æ®å‡ºçŽ°çš„兼容问题, æ”¯æŒ "false","true" 字符串格å¼çš„æ•°æ®</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true 表示是父节点</p>
+ <p> false 表示ä¸æ˜¯çˆ¶èŠ‚点</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 查看当å‰è¢«é€‰ä¸­çš„节点是å¦æ˜¯çˆ¶èŠ‚点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var isParent = sNodes[0].isParent;
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.level.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.level.html
new file mode 100644
index 0000000..aff3254
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.level.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Number</span><span class="path">treeNode.</span>level</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>记录节点的层级</p>
+ <p class="highlight_red">åˆå§‹åŒ–节点数æ®æ—¶ï¼Œç”± zTree 增加此属性,请勿æå‰èµ‹å€¼</p>
+ </div>
+ </div>
+ <h3>Number æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p class="highlight_red">根节点 level = 0,ä¾æ¬¡é€’增</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 查看当å‰è¢«é€‰ä¸­çš„节点的级数</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var level = sNodes[0].level;
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.name.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.name.html
new file mode 100644
index 0000000..918f2b4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.name.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">treeNode.</span>name</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>节点å称。</p>
+ <p class="highlight_red">1ã€å¦‚æžœä¸ä½¿ç”¨ name 属性ä¿å­˜èŠ‚点å称,请修改 setting.data.key.name </p>
+ <p>默认值:无</p>
+ </div>
+ </div>
+ <h3>String æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>节点显示的å称字符串,标准 String å³å¯ï¼Œæ‰€æœ‰ç‰¹æ®Šå­—符都会被自动转义</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 设置节点的å称为 test1ã€test2ã€test3</h4>
+ <pre xmlns=""><code>var nodes = [
+ { "id":1, "name":"test1"},
+ { "id":2, "name":"test2"},
+ { "id":3, "name":"test3"}
+]</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.nocheck.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.nocheck.html
new file mode 100644
index 0000000..afaa62f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.nocheck.html
@@ -0,0 +1,26 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>nocheck</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>1ã€è®¾ç½®èŠ‚点是å¦éšè— checkbox / radio <span class="highlight_red">[setting.check.enable = true 时有效]</span></p>
+ <p class="highlight_red">2ã€ä¸ºäº†è§£å†³éƒ¨åˆ†æœ‹å‹ç”Ÿæˆ json æ•°æ®å‡ºçŽ°çš„兼容问题, æ”¯æŒ "false","true" 字符串格å¼çš„æ•°æ®</p>
+ <p>默认值:false</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p class="highlight_red">true 表示此节点ä¸æ˜¾ç¤º checkbox / radio,ä¸å½±å“勾选的关è”关系,ä¸å½±å“父节点的åŠé€‰çŠ¶æ€ã€‚</p>
+ <p class="highlight_red">false 表示节点具有正常的勾选功能</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. ä¸æ˜¾ç¤ºæŸä¸ªèŠ‚点的 checkbox / radio </h4>
+ <pre xmlns=""><code>var nodes = [
+ { "id":1, "name":"test1", "nocheck":true},
+ { "id":2, "name":"test2"},
+ { "id":3, "name":"test3"}
+]</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.open.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.open.html
new file mode 100644
index 0000000..1eb9aec
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.open.html
@@ -0,0 +1,30 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>open</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>记录 treeNode 节点的 展开 / æŠ˜å  çŠ¶æ€ã€‚</p>
+ <p class="highlight_red">1ã€åˆå§‹åŒ–节点数æ®æ—¶ï¼Œå¦‚果设定 treeNode.open = true,则会直接展开此节点</p>
+ <p class="highlight_red">2ã€å¶å­èŠ‚点 treeNode.open = false</p>
+ <p class="highlight_red">3ã€ä¸ºäº†è§£å†³éƒ¨åˆ†æœ‹å‹ç”Ÿæˆ json æ•°æ®å‡ºçŽ°çš„兼容问题, æ”¯æŒ "false","true" 字符串格å¼çš„æ•°æ®</p>
+ <p class="highlight_red">4ã€éžå¼‚步加载模å¼ä¸‹ï¼Œæ— å­èŠ‚点的父节点设置 open=true åŽï¼Œå¯æ˜¾ç¤ºä¸ºå±•å¼€çŠ¶æ€ï¼Œä½†å¼‚步加载模å¼ä¸‹ä¸ä¼šç”Ÿæ•ˆã€‚(v3.5.15+) </p>
+ <p>默认值:false</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true 表示节点为 展开 状æ€</p>
+ <p> false 表示节点为 æŠ˜å  çŠ¶æ€</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 查看当å‰è¢«é€‰ä¸­çš„节点的 展开 / æŠ˜å  çŠ¶æ€</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var isOpen = sNodes[0].open;
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.parentTId.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.parentTId.html
new file mode 100644
index 0000000..d228a23
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.parentTId.html
@@ -0,0 +1,27 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">treeNode.</span>parentTId</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>treeNode 节点的父节点唯一标识 tId。</p>
+ <p class="highlight_red">1ã€v3.x 用 parentTId 替æ¢äº†åŽŸå…ˆçš„ parentNode 属性,åŒæ—¶å¢žåŠ äº† getParentNode 方法,以é¿å…原先 parentNode 造æˆçš„ clone 死循环</p>
+ <p class="highlight_red">2ã€åˆå§‹åŒ–节点数æ®æ—¶ï¼Œç”± zTree 增加此属性,请勿æå‰èµ‹å€¼</p>
+ </div>
+ </div>
+ <h3>String æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>zTree 内部生æˆçš„节点唯一标识,请å‚考 treeNode.tId 的说明</p>
+ <p class="highlight_red">如果 treeNode 是根节点,则 parentTId = null</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 查看当å‰è¢«é€‰ä¸­çš„节点的父节点 tId</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var parentTId = sNodes[0].parentTId;
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.tId.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.tId.html
new file mode 100644
index 0000000..c32285c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.tId.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">treeNode.</span>tId</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>treeNode 节点的唯一标识 tId。</p>
+ <p class="highlight_red">åˆå§‹åŒ–节点数æ®æ—¶ï¼Œç”± zTree 增加此属性,请勿æå‰èµ‹å€¼</p>
+ </div>
+ </div>
+ <h3>String æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>生æˆè§„则:setting.treeId + "_" + 内部计数</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 查看当å‰è¢«é€‰ä¸­çš„节点的 tId</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var tId = sNodes[0].tId;
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.target.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.target.html
new file mode 100644
index 0000000..f7c1b6b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.target.html
@@ -0,0 +1,24 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">treeNode.</span>target</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>设置点击节点åŽåœ¨ä½•å¤„打开 url。<span class="highlight_red">[treeNode.url 存在时有效]</span></p>
+ <p>默认值:无</p>
+ </div>
+ </div>
+ <h3>String æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>åŒè¶…链接 target 属性: "_blank", "_self" 或 其他指定窗å£å称 </p>
+ <p>çœç•¥æ­¤å±žæ€§ï¼Œåˆ™é»˜è®¤ä¸º "_blank"</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 设置点击æŸèŠ‚点时,弹出新页é¢</h4>
+ <pre xmlns=""><code>var nodes = [
+ { "id":1, "name":"test1", "url":"http://myTest.com", "target":"_blank"},
+ ......
+]</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.url.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.url.html
new file mode 100644
index 0000000..0b2e007
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.url.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">treeNode.</span>url</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>节点链接的目标 URL</p>
+ <p class="highlight_red">1ã€ç¼–è¾‘æ¨¡å¼ (setting.edit.enable = true) 下此属性功能失效,如果必须使用类似功能,请利用 onClick 事件回调函数自行控制。</p>
+ <p class="highlight_red">2ã€å¦‚果需è¦åœ¨ onClick 事件回调函数中进行跳转控制,那么请将 URL 地å€ä¿å­˜åœ¨å…¶ä»–自定义的属性内,请勿使用 url</p>
+ <p>默认值:无</p>
+ </div>
+ </div>
+ <h3>String æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p>åŒè¶…链接 href 属性</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 设置æŸèŠ‚点点击时,跳转到 g.cn</h4>
+ <pre xmlns=""><code>var nodes = [
+ { "id":1, "name":"Google CN", "url":"http://g.cn"},
+ ......
+]</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.zAsync.html b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.zAsync.html
new file mode 100644
index 0000000..00e48f3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/treeNode.zAsync.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>zAsync</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>记录 treeNode 节点是å¦å·²ç»è¿›è¡Œè¿‡å¼‚步加载,é¿å…父节点åå¤å¼‚步加载数æ®ã€‚</p>
+ <p class="highlight_red">åˆå§‹åŒ–节点数æ®æ—¶ï¼Œç”± zTree 增加此属性,请勿æå‰èµ‹å€¼</p>
+ <p class="highlight_red">默认值:false (无å­èŠ‚点的父节点); true (有å­èŠ‚点的父节点 & å¶å­èŠ‚点)</p>
+ </div>
+ </div>
+ <h3>Boolean æ ¼å¼è¯´æ˜Ž</h3>
+ <div class="desc">
+ <p> true 表示父节点展开时ä¸éœ€è¦è‡ªåŠ¨å¼‚步加载</p>
+ <p> false 表示父节点展开时需è¦è‡ªåŠ¨å¼‚步加载</p>
+ <p class="highlight_red"> æ­¤å‚æ•°ä¸ä¼šå¯¹ reAsyncChildNodes 方法造æˆä»»ä½•å½±å“</p>
+ </div>
+ <h3>treeNode 举例</h3>
+ <h4>1. 查看当å‰è¢«é€‰ä¸­çš„节点是å¦èŠ‚点是å¦éœ€è¦è‡ªåŠ¨å¼‚步加载</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var zAsync = sNodes[0].zAsync;
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.addNodes.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.addNodes.html
new file mode 100644
index 0000000..eac2152
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.addNodes.html
@@ -0,0 +1,42 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(parentNode, newNodes, isSilent)</span><span class="path">zTreeObj.</span>addNodes</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>添加节点。</p>
+ <p class="highlight_red">v3.x 为了é¿å…原先åå¤åˆå§‹åŒ–造æˆçš„æ•°æ®é‡å¤é—®é¢˜ï¼Œåœ¨ åˆå§‹åŒ– å’Œ 添加节点 时内部进行 clone æ“作。如果需è¦èŽ·å–æ•°æ®åœ¨ zTree 内的对象,请获å–此方法的返回值。</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>parentNode</b><span>JSON</span></h4>
+ <p>指定的父节点,如果增加根节点,请设置 parentNode 为 null å³å¯ã€‚</p>
+ <p class="highlight_red">请务必ä¿è¯æ­¤èŠ‚点数æ®å¯¹è±¡ 是 zTree 内部的数æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>newNodes</b><span>JSON / Array(JSON)</span></h4>
+ <p>需è¦å¢žåŠ çš„èŠ‚ç‚¹æ•°æ® JSON 对象集åˆï¼Œæ•°æ®åªéœ€è¦æ»¡è¶³ zTree 的节点数æ®å¿…需的属性å³å¯ï¼Œè¯¦ç»†è¯·å‚考“treeNode 节点数æ®è¯¦è§£â€</p>
+ <p class="highlight_red">1ã€v3.x 支æŒå•ç‹¬æ·»åŠ ä¸€ä¸ªèŠ‚点,å³å¦‚æžœåªæ–°å¢žä¸€ä¸ªèŠ‚点,ä¸ç”¨å¿…须包在数组中</p>
+ <p class="highlight_red">2ã€ä½¿ç”¨ç®€å•æ•°æ®æ¨¡å¼ï¼Œè¯·å‚考 setting.data.simpleData 内的属性说明</p>
+ <h4 class="topLine"><b>isSilent</b><span>Boolean</span></h4>
+ <p>设定增加节点åŽæ˜¯å¦è‡ªåŠ¨å±•å¼€çˆ¶èŠ‚点。</p>
+ <p>isSilent = true 时,ä¸å±•å¼€çˆ¶èŠ‚点,其他值或缺çœçŠ¶æ€éƒ½è‡ªåŠ¨å±•å¼€ã€‚</p>
+ <h4 class="topLine"><b>返回值</b><span>Array(JSON)</span></h4>
+ <p>返回值是 zTree 最终添加的节点数æ®é›†åˆ</p>
+ <p class="highlight_red">如果 newNodes 是å•ä¸ªèŠ‚ç‚¹æ•°æ® JSON,返回值也是将其包在 Array 内</p>
+ <p class="highlight_red">请务必记ä½ï¼šè¿”回值中的数æ®å¯¹è±¡ 是 newNodes 被 clone åŽçš„,所以ç»å¯¹ä¸ç›¸ç­‰ï¼</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 对于 id = "tree" 的 zTree 增加 1 个根节点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var newNode = {name:"newNode1"};
+newNode = treeObj.addNodes(null, newNode);
+</code></pre>
+ <h4>2. 对于 id = "tree" 的 zTree 增加 3 个根节点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var newNodes = [{name:"newNode1"}, {name:"newNode2"}, {name:"newNode3"}];
+newNodes = treeObj.addNodes(null, newNodes);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.cancelEditName.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.cancelEditName.html
new file mode 100644
index 0000000..9df098f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.cancelEditName.html
@@ -0,0 +1,30 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(newName)</span><span class="path">zTreeObj.</span>cancelEditName</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>å–消节点的编辑å称状æ€ï¼Œå¯ä»¥æ¢å¤åŽŸå称,也å¯ä»¥å¼ºè¡Œèµ‹ç»™æ–°çš„å称。</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>newName</b><span>String</span></h4>
+ <p>é‡æ–°ç»™å®šçš„æ–°å称。</p>
+ <p class="highlight_red">如果çœç•¥æ­¤å‚数,则æ¢å¤åŽŸå称。</p>
+ <h4 class="topLine"><b>返回值</b><span>无</span></h4>
+ <p>ç›®å‰æ— ä»»ä½•è¿”回值</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. å–消 zTree 的编辑å称状æ€ï¼Œæ¢å¤è¯¥èŠ‚点原有å称</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+treeObj.cancelEditName();
+</code></pre>
+ <h4>2. å–消 zTree 的编辑å称状æ€ï¼Œå¹¶ä¸”é‡æ–°è®¾å®šè¯¥èŠ‚点å称</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+treeObj.cancelEditName("test_new_name");
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.cancelSelectedNode.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.cancelSelectedNode.html
new file mode 100644
index 0000000..26d5706
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.cancelSelectedNode.html
@@ -0,0 +1,35 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNode)</span><span class="path">zTreeObj.</span>cancelSelectedNode</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>å–消节点的选中状æ€ã€‚</p>
+ <p class="highlight_red">v3.x 支æŒå¤šç‚¹åŒæ—¶é€‰ä¸­ï¼Œå› æ­¤å–消选中状æ€å¯ä»¥å…¨éƒ¨å–消,也å¯ä»¥å•ç‹¬å–消æŸä¸ªèŠ‚点的选中状æ€ã€‚</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>需è¦å–消选中状æ€çš„节点。</p>
+ <p class="highlight_red">请务必ä¿è¯æ­¤èŠ‚点数æ®å¯¹è±¡ 是 zTree 内部的数æ®å¯¹è±¡</p>
+ <p class="highlight_red">如果çœç•¥æ­¤å‚数,则将å–消全部被选中节点的选中状æ€ã€‚</p>
+ <h4 class="topLine"><b>返回值</b><span>无</span></h4>
+ <p>ç›®å‰æ— ä»»ä½•è¿”回值</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. å–消当å‰æ‰€æœ‰è¢«é€‰ä¸­èŠ‚点的选中状æ€</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+treeObj.cancelSelectedNode();
+</code></pre>
+ <h4>2. å–消当å‰ç¬¬ä¸€ä¸ªè¢«é€‰ä¸­èŠ‚点的选中状æ€</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getSelectedNode();
+if (nodes.length>0) {
+ treeObj.cancelSelectedNode(nodes[0]);
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.checkAllNodes.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.checkAllNodes.html
new file mode 100644
index 0000000..d6eaadf
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.checkAllNodes.html
@@ -0,0 +1,29 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(checked)</span><span class="path">zTreeObj.</span>checkAllNodes</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>勾选 或 å–消勾选 全部节点。<span class="highlight_red">[setting.check.enable = true 且 setting.check.chkStyle = "checkbox" 时有效]</span></p>
+ <p class="highlight_red">此方法ä¸ä¼šè§¦å‘ beforeCheck / onCheck 事件回调函数。</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>checked</b><span>Boolean</span></h4>
+ <p>checked = true 表示勾选全部节点</p>
+ <p>checked = false 表示全部节点å–消勾选</p>
+ <p class="highlight_red">ä¸ä¼šå½±å“ treeNode.nochecked = true 的节点。</p>
+ <p class="highlight_red">ä¸ä¼šå½±å“未加载的节点。</p>
+ <h4 class="topLine"><b>返回值</b><span>无</span></h4>
+ <p>ç›®å‰æ— ä»»ä½•è¿”回值</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 勾选全部节点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+treeObj.checkAllNodes(true);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.checkNode.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.checkNode.html
new file mode 100644
index 0000000..cb8bb7d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.checkNode.html
@@ -0,0 +1,44 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNode, checked, checkTypeFlag, callbackFlag)</span><span class="path">zTreeObj.</span>checkNode</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>勾选 或 å–消勾选 å•ä¸ªèŠ‚点。<span class="highlight_red">[setting.check.enable = true 时有效]</span></p>
+ <p class="highlight_red">v3.x 中 checkNode() 方法å¯ä»¥è§¦å‘ beforeCheck / onCheck 事件回调函数。便于å‡å°‘冗余代ç </p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>需è¦å‹¾é€‰ 或 å–消勾选 的节点数æ®</p>
+ <p class="highlight_red">请务必ä¿è¯æ­¤èŠ‚点数æ®å¯¹è±¡ 是 zTree 内部的数æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>checked</b><span>Boolean</span></h4>
+ <p>checked = true 表示勾选节点</p>
+ <p>checked = false 表示节点å–消勾选</p>
+ <p class="highlight_red">çœç•¥æ­¤å‚数,则根æ®å¯¹æ­¤èŠ‚点的勾选状æ€è¿›è¡Œ toggle 切æ¢</p>
+ <p class="highlight_red">ä¸å½±å“ treeNode.nochecked = true 的节点。</p>
+ <h4 class="topLine"><b>checkTypeFlag</b><span>Boolean</span></h4>
+ <p>checkTypeFlag = true 表示按照 setting.check.chkboxType 属性进行父å­èŠ‚点的勾选è”动æ“作</p>
+ <p>checkTypeFlag = false 表示åªä¿®æ”¹æ­¤èŠ‚点勾选状æ€ï¼Œæ— ä»»ä½•å‹¾é€‰è”动æ“作</p>
+ <p class="highlight_red">checkTypeFlag = false 且 treeNode.checked = checked 时,ä¸ä¼šè§¦å‘回调函数,直接返回</p>
+ <p class="highlight_red">ä¸å½±å“父å­èŠ‚点中 treeNode.nochecked = true 的节点。</p>
+ <h4 class="topLine"><b>callbackFlag</b><span>Boolean</span></h4>
+ <p>callbackFlag = true è¡¨ç¤ºæ‰§è¡Œæ­¤æ–¹æ³•æ—¶è§¦å‘ beforeCheck & onCheck 事件回调函数</p>
+ <p>callbackFlag = false 表示执行此方法时ä¸è§¦å‘事件回调函数</p>
+ <p class="highlight_red">çœç•¥æ­¤å‚数,等åŒäºŽ false</p>
+ <h4 class="topLine"><b>返回值</b><span>无</span></h4>
+ <p>ç›®å‰æ— ä»»ä½•è¿”回值</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 勾选当å‰é€‰ä¸­çš„节点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getSelectedNodes();
+for (var i=0, l=nodes.length; i < l; i++) {
+ treeObj.checkNode(nodes[i], true, true);
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.copyNode.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.copyNode.html
new file mode 100644
index 0000000..f1b624b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.copyNode.html
@@ -0,0 +1,44 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(targetNode, treeNode, moveType, isSilent)</span><span class="path">zTreeObj.</span>copyNode</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>å¤åˆ¶èŠ‚点。</p>
+ <p class="highlight_red">v3.x å¤åˆ¶èŠ‚点时进行 clone æ“作。如果需è¦èŽ·å–æ•°æ®åœ¨ zTree 内的对象,请获å–此方法的返回值。</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>targetNode</b><span>JSON</span></h4>
+ <p>è¦å¤åˆ¶åˆ°çš„目标节点 JSON æ•°æ®</p>
+ <p class="highlight_red">如果å¤åˆ¶æˆä¸ºæ ¹èŠ‚点,请设置 targetNode 为 null å³å¯</p>
+ <p class="highlight_red">请务必ä¿è¯æ­¤èŠ‚点数æ®å¯¹è±¡ 是 zTree 内部的数æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>需è¦è¢«å¤åˆ¶çš„节点数æ®</p>
+ <p class="highlight_red">请务必ä¿è¯æ­¤èŠ‚点数æ®å¯¹è±¡ 是 zTree 内部的数æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>moveType</b><span>String</span></h4>
+ <p>å¤åˆ¶åˆ°ç›®æ ‡èŠ‚点的相对ä½ç½®</p>
+ <p class="highlight_red">"inner":æˆä¸ºå­èŠ‚点,"prev":æˆä¸ºåŒçº§å‰ä¸€ä¸ªèŠ‚点,"next":æˆä¸ºåŒçº§åŽä¸€ä¸ªèŠ‚点</p>
+ <h4 class="topLine"><b>isSilent</b><span>Boolean</span></h4>
+ <p>设定å¤åˆ¶èŠ‚点åŽæ˜¯å¦è‡ªåŠ¨å±•å¼€çˆ¶èŠ‚点。</p>
+ <p>isSilent = true 时,ä¸å±•å¼€çˆ¶èŠ‚点,其他值或缺çœçŠ¶æ€éƒ½è‡ªåŠ¨å±•å¼€ã€‚</p>
+ <h4 class="topLine"><b>返回值</b><span>JSON</span></h4>
+ <p>返回值是最终加入到 zTree 内的节点数æ®</p>
+ <p class="highlight_red">请务必记ä½ï¼šè¿”回值中的数æ®å¯¹è±¡ 是 treeNode 被 clone åŽçš„,所以ç»å¯¹ä¸ç›¸ç­‰ï¼</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 将根节点中第二个节点 å¤åˆ¶æˆä¸º 第一个节点的å­èŠ‚点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodes();
+treeObj.copyNode(nodes[0], nodes[1], "inner");
+</code></pre>
+ <h4>2. 将根节点中第二个节点 å¤åˆ¶æˆä¸º 第一个节点的å‰ä¸€ä¸ªèŠ‚点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodes();
+treeObj.copyNode(nodes[0], nodes[1], "before");
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.destroy.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.destroy.html
new file mode 100644
index 0000000..d9f6da0
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.destroy.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId)</span><span class="path">zTreeObj.</span>destroy</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>从 zTree v3.4 开始æä¾›é”€æ¯ zTree 的方法。</p>
+ <p>1ã€ç”¨æ­¤æ–¹æ³•å¯ä»¥é”€æ¯ zTreeObj 代表的 zTree。</p>
+ <p class="highlight_red">2ã€é”€æ¯å½“å‰é¡µé¢å…¨éƒ¨çš„ zTree,也å¯ä»¥ä½¿ç”¨ $.fn.zTree.destroy() 方法。</p>
+ <p class="highlight_red">3ã€é‡æ–°ä½¿ç”¨å·²ç»è¢«é”€æ¯çš„树,必须è¦ä½¿ç”¨ init 方法进行åˆå§‹åŒ–。</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>返回值</b><span>无</span></h4>
+ <p>ç›®å‰æ— ä»»ä½•è¿”回值</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. é”€æ¯ id 为 "treeDemo" çš„ zTree</h4>
+ <pre xmlns=""><code>var zTreeObj = $.fn.zTree.getZTreeObj("treeDemo");
+zTreeObj.destroy();
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.editName.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.editName.html
new file mode 100644
index 0000000..2d4eaf7
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.editName.html
@@ -0,0 +1,29 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNode)</span><span class="path">zTreeObj.</span>editName</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>设置æŸèŠ‚点进入编辑å称状æ€ã€‚</p>
+ <p class="highlight_red">1ã€å¦‚果需è¦ç”¨ js å–消编辑å称状æ€ï¼Œè¯·ä½¿ç”¨ cancelEditName(newName) 方法。</p>
+ <p class="highlight_red">2ã€å¯åˆ©ç”¨æ­¤æ–¹æ³•è®©å½“å‰æ­£ç¼–辑的节点 input 输入框获å–焦点。</p>
+ <p class="highlight_red">3ã€è¯·é€šè¿‡ zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>指定进入编辑å称状æ€çš„节点 JSON æ•°æ®</p>
+ <p class="highlight_red">请务必ä¿è¯æ­¤èŠ‚点数æ®å¯¹è±¡ 是 zTree 内部的数æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>无</span></h4>
+ <p>ç›®å‰æ— ä»»ä½•è¿”回值</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 设置根节点第一个节点进入编辑å称状æ€</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodes();
+treeObj.editName(nodes[0]);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.expandAll.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.expandAll.html
new file mode 100644
index 0000000..aaa3e46
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.expandAll.html
@@ -0,0 +1,30 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(expandFlag)</span><span class="path">zTreeObj.</span>expandAll</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>展开 / æŠ˜å  å…¨éƒ¨èŠ‚ç‚¹</p>
+ <p class="highlight_red">此方法ä¸ä¼šè§¦å‘ beforeExpand / onExpand å’Œ beforeCollapse / onCollapse 事件回调函数。</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>expandFlag</b><span>Boolean</span></h4>
+ <p>expandFlag = true 表示 展开 全部节点</p>
+ <p>expandFlag = false 表示 æŠ˜å  å…¨éƒ¨èŠ‚ç‚¹</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>返回值表示最终实际æ“作情况</p>
+ <p>true 表示 展开 全部节点</p>
+ <p>false 表示 æŠ˜å  å…¨éƒ¨èŠ‚ç‚¹</p>
+ <p>null 表示 ä¸å­˜åœ¨ä»»ä½•çˆ¶èŠ‚点</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 展开全部节点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+treeObj.expandAll(true);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.expandNode.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.expandNode.html
new file mode 100644
index 0000000..5d96d3f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.expandNode.html
@@ -0,0 +1,50 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNode, expandFlag, sonSign, focus, callbackFlag)</span><span class="path">zTreeObj.</span>expandNode</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>展开 / æŠ˜å  æŒ‡å®šçš„èŠ‚ç‚¹</p>
+ <p class="highlight_red">v3.x 中执行此方法å¯ä»¥è§¦å‘ beforeExpand / onExpand 或 beforeCollapse / onCollapse 事件回调函数。便于å‡å°‘冗余代ç </p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>éœ€è¦ å±•å¼€ / æŠ˜å  çš„èŠ‚ç‚¹æ•°æ®</p>
+ <p class="highlight_red">请务必ä¿è¯æ­¤èŠ‚点数æ®å¯¹è±¡ 是 zTree 内部的数æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>expandFlag</b><span>Boolean</span></h4>
+ <p>expandFlag = true 表示 展开 节点</p>
+ <p>expandFlag = false 表示 æŠ˜å  èŠ‚ç‚¹</p>
+ <p class="highlight_red">çœç•¥æ­¤å‚数,则根æ®å¯¹æ­¤èŠ‚点的展开状æ€è¿›è¡Œ toggle 切æ¢</p>
+ <h4 class="topLine"><b>sonSign</b><span>Boolean</span></h4>
+ <p>sonSign = true 表示 全部å­å­™èŠ‚点 进行与 expandFlag 相åŒçš„æ“作</p>
+ <p>sonSign = false 表示 åªå½±å“此节点,对于其 å­å­™èŠ‚点无任何影å“</p>
+ <p class="highlight_red">sonSign = false 且 treeNode.open = expandFlag 时,ä¸ä¼šè§¦å‘回调函数,直接返回</p>
+ <p class="highlight_red">çœç•¥æ­¤å‚数,等åŒäºŽ false</p>
+ <h4 class="topLine"><b>focus</b><span>Boolean</span></h4>
+ <p>focus = true 表示 展开 / æŠ˜å  æ“作åŽï¼Œé€šè¿‡è®¾ç½®ç„¦ç‚¹ä¿è¯æ­¤ç„¦ç‚¹è¿›å…¥å¯è§†åŒºåŸŸå†…</p>
+ <p>focus = false 表示 展开 / æŠ˜å  æ“作åŽï¼Œä¸è®¾ç½®ä»»ä½•ç„¦ç‚¹</p>
+ <p class="highlight_red">çœç•¥æ­¤å‚数,等åŒäºŽ true</p>
+ <h4 class="topLine"><b>callbackFlag</b><span>Boolean</span></h4>
+ <p>callbackFlag = true è¡¨ç¤ºæ‰§è¡Œæ­¤æ–¹æ³•æ—¶è§¦å‘ beforeExpand / onExpand 或 beforeCollapse / onCollapse 事件回调函数</p>
+ <p>callbackFlag = false 表示执行此方法时ä¸è§¦å‘事件回调函数</p>
+ <p class="highlight_red">çœç•¥æ­¤å‚数,等åŒäºŽ false</p>
+ <h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
+ <p>返回值表示最终实际æ“作情况</p>
+ <p>true 表示 展开 节点</p>
+ <p>false 表示 æŠ˜å  èŠ‚ç‚¹</p>
+ <p>null 表示 ä¸æ˜¯çˆ¶èŠ‚点</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 展开当å‰é€‰æ‹©çš„第一个节点(包括其全部å­èŠ‚点)</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getSelectedNodes();
+if (nodes.length>0) {
+ treeObj.expandNode(nodes[0], true, true, true);
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getChangeCheckedNodes.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getChangeCheckedNodes.html
new file mode 100644
index 0000000..ba86534
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getChangeCheckedNodes.html
@@ -0,0 +1,24 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function()</span><span class="path">zTreeObj.</span>getChangeCheckedNodes</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>获å–输入框勾选状æ€è¢«æ”¹å˜çš„节点集åˆï¼ˆä¸ŽåŽŸå§‹æ•°æ® checkedOld 对比)。<span class="highlight_red">[setting.check.enable = true 时有效]</span></p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>返回值</b><span>Array(JSON)</span></h4>
+ <p>返回全部勾选状æ€è¢«æ”¹å˜çš„èŠ‚ç‚¹é›†åˆ Array</p>
+ <p class="highlight_red">如果需è¦èŽ·å–æ¯æ¬¡æ“作åŽå…¨éƒ¨è¢«æ”¹å˜å‹¾é€‰çŠ¶æ€çš„节点数æ®ï¼Œè¯·åœ¨æ¯æ¬¡å‹¾é€‰æ“作åŽï¼Œé历所有被改å˜å‹¾é€‰çŠ¶æ€çš„节点数æ®ï¼Œè®©å…¶ checkedOld = checked å°±å¯ä»¥äº†ã€‚</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 获å–当å‰å‹¾é€‰çŠ¶æ€è¢«æ”¹å˜çš„节点集åˆ</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getChangeCheckedNodes();
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getCheckedNodes.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getCheckedNodes.html
new file mode 100644
index 0000000..85f4ba0
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getCheckedNodes.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(checked)</span><span class="path">zTreeObj.</span>getCheckedNodes</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>获å–输入框被勾选 或 未勾选的节点集åˆã€‚<span class="highlight_red">[setting.check.enable = true 时有效]</span></p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>checked</b><span>Boolean</span></h4>
+ <p>checked = true è¡¨ç¤ºèŽ·å– è¢«å‹¾é€‰ 的节点集åˆ</p>
+ <p>checked = false è¡¨ç¤ºèŽ·å– æœªå‹¾é€‰ 的节点集åˆ</p>
+ <p class="highlight_red">çœç•¥æ­¤å‚数,等åŒäºŽ true。</p>
+ <p class="highlight_red">对于 treeNode.nochecked = true 的节点ä¸è¿›è¡ŒèŽ·å–。</p>
+ <h4 class="topLine"><b>返回值</b><span>Array(JSON)</span></h4>
+ <p>返回全部符åˆè¦æ±‚çš„èŠ‚ç‚¹é›†åˆ Array</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 获å–当å‰è¢«å‹¾é€‰çš„节点集åˆ</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getCheckedNodes(true);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodeByParam.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodeByParam.html
new file mode 100644
index 0000000..89e72c7
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodeByParam.html
@@ -0,0 +1,32 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(key, value, parentNode)</span><span class="path">zTreeObj.</span>getNodeByParam</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>æ ¹æ®èŠ‚点数æ®çš„属性æœç´¢ï¼ŒèŽ·å–æ¡ä»¶å®Œå…¨åŒ¹é…çš„èŠ‚ç‚¹æ•°æ® JSON 对象</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>key</b><span>String</span></h4>
+ <p>需è¦ç²¾ç¡®åŒ¹é…的属性å称</p>
+ <h4 class="topLine"><b>value</b><span>?</span></h4>
+ <p>需è¦ç²¾ç¡®åŒ¹é…的属性值,å¯ä»¥æ˜¯ä»»ä½•ç±»åž‹ï¼Œåªè¦ä¿è¯ä¸Ž key 指定的属性值ä¿æŒä¸€è‡´å³å¯</p>
+ <h4 class="topLine"><b>parentNode</b><span>JSON</span></h4>
+ <p>æœç´¢èŒƒå›´ï¼ŒæŒ‡å®šåœ¨æŸä¸ªçˆ¶èŠ‚点下的å­èŠ‚点中进行æœç´¢</p>
+ <p class="highlight_red">忽略此å‚数,表示在全部节点中æœç´¢</p>
+ <h4 class="topLine"><b>返回值</b><span>JSON</span></h4>
+ <p>匹é…精确æœç´¢çš„节点数æ®</p>
+ <p class="highlight_red">1ã€å¦‚无结果,返回 null</p>
+ <p class="highlight_red">2ã€å¦‚有多个节点满足查询æ¡ä»¶ï¼Œåªè¿”回第一个匹é…到的节点</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 查找 id = 1 的节点数æ®</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var node = treeObj.getNodeByParam("id", 1, null);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodeByTId.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodeByTId.html
new file mode 100644
index 0000000..76fcc48
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodeByTId.html
@@ -0,0 +1,27 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(tId)</span><span class="path">zTreeObj.</span>getNodeByTId</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>æ ¹æ® zTree 的唯一标识 tId 快速获å–节点 JSON æ•°æ®å¯¹è±¡</p>
+ <p class="highlight_red">通过内部的 cache 获å–,ä¸éœ€è¦é历节点。</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>tId</b><span>String</span></h4>
+ <p>节点在 zTree 内的唯一标识 tId</p>
+ <h4 class="topLine"><b>返回值</b><span>JSON</span></h4>
+ <p>tId 对应的节点 JSON æ•°æ®å¯¹è±¡</p>
+ <p class="highlight_red">如无结果,返回 null</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. èŽ·å– tId = "tree_10" 的节点数æ®</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var node = treeObj.getNodeByTId("tree_10");
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodeIndex.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodeIndex.html
new file mode 100644
index 0000000..b2c757d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodeIndex.html
@@ -0,0 +1,30 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNode)</span><span class="path">zTreeObj.</span>getNodeIndex</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>获å–æŸèŠ‚点在åŒçº§èŠ‚点中的åºå·ï¼ˆä»Ž0开始)</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>需è¦æŸ¥è¯¢é¡ºåºçš„节点 JSON æ•°æ®å¯¹è±¡</p>
+ <p class="highlight_red">请务必ä¿è¯æ­¤èŠ‚点数æ®å¯¹è±¡ 是 zTree 内部的数æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>Number</span></h4>
+ <p class="highlight_red">返回值从 0 开始计数</p>
+ <p class="highlight_red">如果ä¸å­˜åœ¨è¯¥èŠ‚点数æ®ï¼Œè¿”回 -1</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 获å–当å‰é€‰ä¸­çš„第一个节点在åŒçº§èŠ‚点中的åºå·</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getSelectedNodes();
+if (nodes.length>0) {
+ var index = treeObj.getNodeIndex(nodes[0]);
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodes.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodes.html
new file mode 100644
index 0000000..b368535
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodes.html
@@ -0,0 +1,26 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function()</span><span class="path">zTreeObj.</span>getNodes</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>èŽ·å– zTree 的全部节点数æ®</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>返回值</b><span>Array(JSON)</span></h4>
+ <p>全部节点数æ®</p>
+ <p class="highlight_red">1ã€Array 仅仅是根节点的集åˆï¼ˆé»˜è®¤æƒ…况å­èŠ‚点都处于 children 属性下); </p>
+ <p class="highlight_red">2ã€å¦‚需é历全部节点需è¦åˆ©ç”¨é€’归,或利用 transformToArray 方法 将数æ®å˜æˆç®€å•çš„ Array 集åˆ</p>
+ <p class="highlight_red">3ã€å¯¹äºŽå¼‚步加载模å¼ä¸‹ï¼Œå°šæœªåŠ è½½çš„å­èŠ‚点是无法通过此方法获å–的。</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 获å–全部节点数æ®</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodes();
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodesByFilter.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodesByFilter.html
new file mode 100644
index 0000000..6917425
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodesByFilter.html
@@ -0,0 +1,43 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(filter, isSingle, parentNode, invokeParam)</span><span class="path">zTreeObj.</span>getNodesByFilter</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>æ ¹æ®è‡ªå®šä¹‰è§„则æœç´¢èŠ‚ç‚¹æ•°æ® JSON å¯¹è±¡é›†åˆ æˆ– å•ä¸ªèŠ‚点数æ®</p>
+ <p class="highlight_red">å¯è‡ªå®šä¹‰å¤æ‚çš„æœç´¢è§„则</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>filter</b><span>Function</span></h4>
+ <p>自定义过滤器函数 function filter(node) {...}</p>
+ <p>filter å‚数:node (èŠ‚ç‚¹æ•°æ® JSON)</p>
+ <p>filter 返回值:boolean (true 表示符åˆæœç´¢æ¡ä»¶ï¼›false 表示ä¸ç¬¦åˆæœç´¢æ¡ä»¶)</p>
+ <h4 class="topLine"><b>isSingle</b><span>Boolean</span></h4>
+ <p>isSingle = true 表示åªæŸ¥æ‰¾å•ä¸ªèŠ‚点</p>
+ <p>isSingle = false 表示查找节点集åˆ</p>
+ <p class="highlight_red">忽略此å‚数,表示查找节点集åˆ</p>
+ <h4 class="topLine"><b>parentNode</b><span>JSON</span></h4>
+ <p>å¯ä»¥æŒ‡å®šåœ¨æŸä¸ªçˆ¶èŠ‚点下的å­èŠ‚点中æœç´¢</p>
+ <p class="highlight_red">忽略此å‚数,表示在全部节点中æœç´¢</p>
+ <h4 class="topLine"><b>invokeParam</b><span>ä»»æ„类型</span></h4>
+ <p>用户自定义的数æ®å¯¹è±¡ï¼Œç”¨äºŽ filter 中进行计算</p>
+ <h4 class="topLine"><b>返回值</b><span>Array(JSON) / JSON</span></h4>
+ <p>isSingle = true 返回 ç¬¬ä¸€ä¸ªæ‰¾åˆ°çš„èŠ‚ç‚¹æ•°æ® JSON,无结果时返回 null</p>
+ <p>isSingle = false 返回 节点数æ®é›†åˆ Array(JSON),无结果时返回 [ ]</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 查找 level = 2 & name ä¸­åŒ…å« "test" 的节点数æ®</h4>
+ <pre xmlns=""><code>function filter(node) {
+ return (node.level == 2 && node.name.indexOf("test")>-1);
+}
+......
+var treeObj = $.fn.zTree.getZTreeObj("tree");
+var node = treeObj.getNodesByFilter(filter, true); // 仅查找一个节点
+var nodes = treeObj.getNodesByFilter(filter); // 查找节点集åˆ
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodesByParam.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodesByParam.html
new file mode 100644
index 0000000..cf45939
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodesByParam.html
@@ -0,0 +1,31 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(key, value, parentNode)</span><span class="path">zTreeObj.</span>getNodesByParam</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>æ ¹æ®èŠ‚点数æ®çš„属性æœç´¢ï¼ŒèŽ·å–æ¡ä»¶å®Œå…¨åŒ¹é…çš„èŠ‚ç‚¹æ•°æ® JSON 对象集åˆ</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>key</b><span>String</span></h4>
+ <p>需è¦ç²¾ç¡®åŒ¹é…的属性å称</p>
+ <h4 class="topLine"><b>value</b><span>?</span></h4>
+ <p>需è¦ç²¾ç¡®åŒ¹é…的属性值,å¯ä»¥æ˜¯ä»»ä½•ç±»åž‹ï¼Œåªè¦ä¿è¯ä¸Ž key 指定的属性值ä¿æŒä¸€è‡´å³å¯</p>
+ <h4 class="topLine"><b>parentNode</b><span>JSON</span></h4>
+ <p>å¯ä»¥æŒ‡å®šåœ¨æŸä¸ªçˆ¶èŠ‚点下的å­èŠ‚点中æœç´¢</p>
+ <p class="highlight_red">忽略此å‚数,表示在全部节点中æœç´¢</p>
+ <h4 class="topLine"><b>返回值</b><span>Array(JSON)</span></h4>
+ <p>匹é…精确æœç´¢çš„节点数æ®é›†åˆ</p>
+ <p class="highlight_red">如无结果,返回 [ ]</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 查找 name = "test" 的节点数æ®</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodesByParam("name", "test", null);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodesByParamFuzzy.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodesByParamFuzzy.html
new file mode 100644
index 0000000..04d183f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodesByParamFuzzy.html
@@ -0,0 +1,32 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(key, value, parentNode)</span><span class="path">zTreeObj.</span>getNodesByParamFuzzy</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>æ ¹æ®èŠ‚点数æ®çš„属性æœç´¢ï¼ŒèŽ·å–æ¡ä»¶æ¨¡ç³ŠåŒ¹é…çš„èŠ‚ç‚¹æ•°æ® JSON 对象集åˆ</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>key</b><span>String</span></h4>
+ <p>需è¦æ¨¡ç³ŠåŒ¹é…的属性å称</p>
+ <h4 class="topLine"><b>value</b><span>String</span></h4>
+ <p>需è¦æ¨¡ç³ŠåŒ¹é…的属性值</p>
+ <p class="highlight_red">模糊匹é…åªèƒ½é’ˆå¯¹ String 类型的数æ®</p>
+ <h4 class="topLine"><b>parentNode</b><span>JSON</span></h4>
+ <p>å¯ä»¥æŒ‡å®šåœ¨æŸä¸ªçˆ¶èŠ‚点下的å­èŠ‚点中æœç´¢</p>
+ <p class="highlight_red">忽略此å‚数,表示在全部节点中æœç´¢</p>
+ <h4 class="topLine"><b>返回值</b><span>Array(JSON)</span></h4>
+ <p>匹é…模糊æœç´¢çš„节点数æ®é›†åˆ</p>
+ <p class="highlight_red">如无结果,返回 [ ]</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 查找 name åŒ…å« "test" 的节点数æ®</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodesByParamFuzzy("name", "test", null);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getSelectedNodes.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getSelectedNodes.html
new file mode 100644
index 0000000..ab36f8e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getSelectedNodes.html
@@ -0,0 +1,23 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function()</span><span class="path">zTreeObj.</span>getSelectedNodes</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>èŽ·å– zTree 当å‰è¢«é€‰ä¸­çš„节点数æ®é›†åˆ</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>返回值</b><span>Array(JSON)</span></h4>
+ <p>当å‰è¢«é€‰ä¸­çš„节点数æ®é›†åˆ</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 获å–当å‰è¢«é€‰ä¸­çš„节点数æ®é›†åˆ</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getSelectedNodes();
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.hideNode.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.hideNode.html
new file mode 100644
index 0000000..a1996b8
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.hideNode.html
@@ -0,0 +1,29 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNode)</span><span class="path">zTreeObj.</span>hideNode</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exhide</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>éšè—æŸä¸ªèŠ‚点。</p>
+ <p class="highlight_red">1ã€æ­¤åŠŸèƒ½ä¸æ”¯æŒ exedit 扩展,因此ä¸è¦åœ¨ç¼–辑状æ€æ—¶ä½¿ç”¨éšè—节点的方法。</p>
+ <p class="highlight_red">2ã€éšè—/显示节点,会影å“节点的 isFirstNode å’Œ isLastNode 属性。</p>
+ <p class="highlight_red">3ã€è¯·é€šè¿‡ zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>指定被éšè—的节点 JSON æ•°æ®</p>
+ <p class="highlight_red">请务必ä¿è¯æ­¤èŠ‚点数æ®å¯¹è±¡ 是 zTree 内部的数æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>无</span></h4>
+ <p>ç›®å‰æ— ä»»ä½•è¿”回值</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. éšè—根节点第一个节点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodes();
+treeObj.hideNode(nodes[0]);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.hideNodes.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.hideNodes.html
new file mode 100644
index 0000000..cf752b5
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.hideNodes.html
@@ -0,0 +1,29 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNodes)</span><span class="path">zTreeObj.</span>hideNodes</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exhide</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>éšè—一批节点。</p>
+ <p class="highlight_red">1ã€æ­¤åŠŸèƒ½ä¸æ”¯æŒ exedit 扩展,因此ä¸è¦åœ¨ç¼–辑状æ€æ—¶ä½¿ç”¨éšè—节点的方法。</p>
+ <p class="highlight_red">2ã€éšè—/显示节点,会影å“节点的 isFirstNode å’Œ isLastNode 属性。</p>
+ <p class="highlight_red">3ã€è¯·é€šè¿‡ zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeNodes</b><span>Array(JSON)</span></h4>
+ <p>指定被éšè—的节点 JSON æ•°æ®é›†åˆ</p>
+ <p class="highlight_red">请务必ä¿è¯è¿™äº›èŠ‚点数æ®å¯¹è±¡ 是 zTree 内部的数æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>无</span></h4>
+ <p>ç›®å‰æ— ä»»ä½•è¿”回值</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. éšè—根节点第一个节点的å­èŠ‚点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodes();
+treeObj.hideNodes(nodes[0].children);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.moveNode.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.moveNode.html
new file mode 100644
index 0000000..9c9180b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.moveNode.html
@@ -0,0 +1,46 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(targetNode, treeNode, moveType, isSilent)</span><span class="path">zTreeObj.</span>moveNode</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>移动节点。</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>targetNode</b><span>JSON</span></h4>
+ <p>è¦ç§»åŠ¨åˆ°çš„目标节点 JSON æ•°æ®</p>
+ <p class="highlight_red">如果移动æˆä¸ºæ ¹èŠ‚点,请设置 targetNode 为 null å³å¯</p>
+ <p class="highlight_red">请务必ä¿è¯æ­¤èŠ‚点数æ®å¯¹è±¡ 是 zTree 内部的数æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>需è¦è¢«ç§»åŠ¨çš„节点数æ®</p>
+ <p class="highlight_red">请务必ä¿è¯æ­¤èŠ‚点数æ®å¯¹è±¡ 是 zTree 内部的数æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>moveType</b><span>String</span></h4>
+ <p>指定移动到目标节点的相对ä½ç½®</p>
+ <p class="highlight_red">"inner":æˆä¸ºå­èŠ‚点,"prev":æˆä¸ºåŒçº§å‰ä¸€ä¸ªèŠ‚点,"next":æˆä¸ºåŒçº§åŽä¸€ä¸ªèŠ‚点</p>
+ <h4 class="topLine"><b>isSilent</b><span>Boolean</span></h4>
+ <p>设定移动节点åŽæ˜¯å¦è‡ªåŠ¨å±•å¼€çˆ¶èŠ‚点。</p>
+ <p>isSilent = true 时,ä¸å±•å¼€çˆ¶èŠ‚点,其他值或缺çœçŠ¶æ€éƒ½è‡ªåŠ¨å±•å¼€ã€‚</p>
+ <h4 class="topLine"><b>返回值</b><span>JSON</span></h4>
+ <p>返回值是最终被移动的节点数æ®ï¼Œæ­£å¸¸æƒ…况下与 treeNode å‚数完全相åŒ</p>
+ <p class="highlight_red">如果 返回值 为 null,说明 移动失败,主è¦åŽŸå› æœ‰ï¼š<br/>
+ &nbsp;1ã€targetNode 是 treeNode 父节点,且 moveType = "inner"<br/>
+ &nbsp;2ã€targetNode 是 treeNode å­å­™èŠ‚点
+ </p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 将根节点中第二个节点 移动æˆä¸º 第一个节点的å­èŠ‚点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodes();
+treeObj.moveNode(nodes[0], nodes[1], "inner");
+</code></pre>
+ <h4>2. 将根节点中第二个节点 移动æˆä¸º 第一个节点的å‰ä¸€ä¸ªèŠ‚点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodes();
+treeObj.moveNode(nodes[0], nodes[1], "prev");
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.reAsyncChildNodes.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.reAsyncChildNodes.html
new file mode 100644
index 0000000..4a354e2
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.reAsyncChildNodes.html
@@ -0,0 +1,42 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(parentNode, reloadType, isSilent)</span><span class="path">zTreeObj.</span>reAsyncChildNodes</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>强行异步加载父节点的å­èŠ‚点。<span class="highlight_red">[setting.async.enable = true 时有效]</span></p>
+ <p class="highlight_red">å·²ç»åŠ è½½è¿‡çš„父节点å¯åå¤ä½¿ç”¨æ­¤æ–¹æ³•é‡æ–°åŠ è½½ã€‚</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>parentNode</b><span>JSON</span></h4>
+ <p>指定需è¦å¼‚步加载的父节点 JSON æ•°æ®</p>
+ <p class="highlight_red">1ã€parentNode = null 时,相当于从根节点 Root 进行异步加载</p>
+ <p class="highlight_red">2ã€parentNode.isParent = false 时,ä¸è¿›è¡Œå¼‚步加载</p>
+ <p class="highlight_red">3ã€è¯·åŠ¡å¿…ä¿è¯æ­¤èŠ‚点数æ®å¯¹è±¡ 是 zTree 内部的数æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>reloadType</b><span>String</span></h4>
+ <p>reloadType = "refresh" 表示清空åŽé‡æ–°åŠ è½½ã€‚</p>
+ <p>reloadType != "refresh" 时,表示追加å­èŠ‚点处ç†ã€‚</p>
+ <h4 class="topLine"><b>isSilent</b><span>Boolean</span></h4>
+ <p>设定异步加载åŽæ˜¯å¦è‡ªåŠ¨å±•å¼€çˆ¶èŠ‚点。</p>
+ <p>isSilent = true 时,ä¸å±•å¼€çˆ¶èŠ‚点,其他值或缺çœçŠ¶æ€éƒ½è‡ªåŠ¨å±•å¼€ã€‚</p>
+ <h4 class="topLine"><b>返回值</b><span>无</span></h4>
+ <p>ç›®å‰æ— ä»»ä½•è¿”回值</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. é‡æ–°å¼‚步加载 zTree </h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+treeObj.reAsyncChildNodes(null, "refresh");
+</code></pre>
+ <h4>2. é‡æ–°å¼‚步加载当å‰é€‰ä¸­çš„第一个节点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getSelectedNodes();
+if (nodes.length>0) {
+ treeObj.reAsyncChildNodes(nodes[0], "refresh");
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.refresh.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.refresh.html
new file mode 100644
index 0000000..09a74ca
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.refresh.html
@@ -0,0 +1,24 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function()</span><span class="path">zTreeObj.</span>refresh</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>刷新 zTree 。</p>
+ <p class="highlight_red">没有特殊必è¦ï¼Œå°½é‡ä¸è¦ä½¿ç”¨æ­¤æ–¹æ³•ã€‚å•ä¸ªèŠ‚点更新请使用 updateNode 方法,异步加载模å¼ä¸‹è¯·ä½¿ç”¨ reAsyncChildNodes 方法。</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>返回值</b><span>无</span></h4>
+ <p>ç›®å‰æ— ä»»ä½•è¿”回值</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 刷新 zTree </h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+treeObj.refresh();
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.removeChildNodes.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.removeChildNodes.html
new file mode 100644
index 0000000..588639f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.removeChildNodes.html
@@ -0,0 +1,32 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(parentNode)</span><span class="path">zTreeObj.</span>removeChildNodes</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>清空æŸçˆ¶èŠ‚点的å­èŠ‚点。</p>
+ <p class="highlight_red">1ã€æ¸…空å­èŠ‚点åŽï¼Œçˆ¶èŠ‚点会自动å˜ä¸ºå¶å­èŠ‚点,如需è¦çˆ¶èŠ‚点ä¿æŒçˆ¶èŠ‚点状æ€ï¼Œè¯·è®¾ç½® setting.data.keep.parent 属性。</p>
+ <p class="highlight_red">2ã€è¯·å‹¿ç”¨æ­¤æ–¹æ³•æ¸…空根节点,如果需è¦æ¸…空根节点,直接åˆå§‹åŒ– zTree,并且设置åˆå§‹èŠ‚点为 null å³å¯ã€‚</p>
+ <p class="highlight_red">3ã€æ­¤æ–¹æ³•ä¸ä¼šè§¦å‘任何事件回调函数。</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>parentNode</b><span>JSON</span></h4>
+ <p>需è¦æ¸…空å­èŠ‚点的父节点数æ®</p>
+ <p class="highlight_red">请务必ä¿è¯æ­¤èŠ‚点数æ®å¯¹è±¡ 是 zTree 内部的数æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>Array(JSON)</span></h4>
+ <p>将该父节点的å­èŠ‚点数æ®è¿”回,如果ä¸å­˜åœ¨åˆ™è¿”回 null</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 清空选中的第一个节点的å­èŠ‚点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getSelectedNodes();
+if (nodes && nodes.length>0) {
+ treeObj.removeChildNodes(nodes[0]);
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.removeNode.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.removeNode.html
new file mode 100644
index 0000000..442f5c7
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.removeNode.html
@@ -0,0 +1,34 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNode, callbackFlag)</span><span class="path">zTreeObj.</span>removeNode</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>删除节点。</p>
+ <p class="highlight_red">v3.x 中删除节点å¯ä»¥è§¦å‘ beforeRemove / onRemove 事件回调函数。便于å‡å°‘冗余代ç </p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>需è¦è¢«åˆ é™¤çš„节点数æ®</p>
+ <p class="highlight_red">请务必ä¿è¯æ­¤èŠ‚点数æ®å¯¹è±¡ 是 zTree 内部的数æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>callbackFlag</b><span>Boolean</span></h4>
+ <p>callbackFlag = true è¡¨ç¤ºæ‰§è¡Œæ­¤æ–¹æ³•æ—¶è§¦å‘ beforeRemove & onRemove 事件回调函数</p>
+ <p>callbackFlag = false 表示执行此方法时ä¸è§¦å‘事件回调函数</p>
+ <p class="highlight_red">çœç•¥æ­¤å‚数,等åŒäºŽ false</p>
+ <h4 class="topLine"><b>返回值</b><span>无</span></h4>
+ <p>ç›®å‰æ— ä»»ä½•è¿”回值</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 删除所有选中的节点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getSelectedNodes();
+for (var i=0, l=nodes.length; i < l; i++) {
+ treeObj.removeNode(nodes[i]);
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.selectNode.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.selectNode.html
new file mode 100644
index 0000000..6e80d81
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.selectNode.html
@@ -0,0 +1,34 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNode, addFlag)</span><span class="path">zTreeObj.</span>selectNode</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>选中指定节点</p>
+ <p class="highlight_red">v3.x 支æŒåŒæ—¶é€‰ä¸­å¤šä¸ªèŠ‚点。</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>需è¦è¢«é€‰ä¸­çš„节点数æ®</p>
+ <p class="highlight_red">请务必ä¿è¯æ­¤èŠ‚点数æ®å¯¹è±¡ 是 zTree 内部的数æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>addFlag</b><span>Boolean</span></h4>
+ <p>addFlag = true 表示追加选中,会出现多点åŒæ—¶è¢«é€‰ä¸­çš„情况</p>
+ <p>addFlag = false 表示å•ç‹¬é€‰ä¸­ï¼ŒåŽŸå…ˆè¢«é€‰ä¸­çš„节点会被å–消选中状æ€</p>
+ <p class="highlight_red">setting.view.selectedMulti = false 时,此å‚数无效,始终进行å•ç‹¬é€‰ä¸­</p>
+ <h4 class="topLine"><b>返回值</b><span>无</span></h4>
+ <p>ç›®å‰æ— ä»»ä½•è¿”回值</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. å•ç‹¬é€‰ä¸­æ ¹èŠ‚点中第一个节点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodes();
+if (nodes.length>0) {
+ treeObj.selectNode(nodes[0]);
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.setChkDisabled.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.setChkDisabled.html
new file mode 100644
index 0000000..b042ab4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.setChkDisabled.html
@@ -0,0 +1,44 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(node, disabled, inheritParent, inheritChildren)</span><span class="path">zTreeObj.</span>setChkDisabled</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>ç¦ç”¨ 或 è§£ç¦ æŸä¸ªèŠ‚点的 checkbox / radio <span class="highlight_red">[setting.check.enable = true 时有效]</span></p>
+ <p class="highlight_red">1ã€èŠ‚点的 checkbox / radio 被ç¦ç”¨åŽï¼Œæ— æ³•å‹¾é€‰æˆ–å–消勾选,但能够影å“父节点的åŠé€‰çŠ¶æ€</p>
+ <p class="highlight_red">2ã€è¯·ä¸è¦ç›´æŽ¥ä¿®æ”¹å·²åŠ è½½èŠ‚点的 treeNode.chkDisabled 属性。</p>
+ <p class="highlight_red">3ã€è¯·é€šè¿‡ zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>需è¦ç¦ç”¨ 或 è§£ç¦ checkbox / radio 的节点数æ®</p>
+ <p class="highlight_red">请务必ä¿è¯æ­¤èŠ‚点数æ®å¯¹è±¡ 是 zTree 内部的数æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>disabled</b><span>Boolean</span></h4>
+ <p>disabled = true 表示ç¦ç”¨ checkbox / radio</p>
+ <p>disabled = false è¡¨ç¤ºè§£ç¦ checkbox / radio</p>
+ <p class="highlight_red">çœç•¥æ­¤å‚数,等åŒäºŽ disabled = false </p>
+ <p class="highlight_red">ä¸å½±å“ treeNode.nochecked = true 的节点。</p>
+ <h4 class="topLine"><b>inheritParent</b><span>Boolean</span></h4>
+ <p>inheritParent = true 表示全部父节点进行åŒæ ·çš„æ“作</p>
+ <p>inheritParent = false 表示ä¸å½±å“父节点</p>
+ <p class="highlight_red">çœç•¥æ­¤å‚数,等åŒäºŽ inheritParent = false </p>
+ <h4 class="topLine"><b>inheritChildren</b><span>Boolean</span></h4>
+ <p>inheritChildren = true 表示全部å­èŠ‚点进行åŒæ ·çš„æ“作</p>
+ <p>inheritChildren = false 表示ä¸å½±å“å­èŠ‚点</p>
+ <p class="highlight_red">çœç•¥æ­¤å‚数,等åŒäºŽ inheritChildren = false </p>
+ <h4 class="topLine"><b>返回值</b><span>无</span></h4>
+ <p>ç›®å‰æ— ä»»ä½•è¿”回值</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. ç¦ç”¨å½“å‰é€‰ä¸­çš„节点的 checkbox / radio</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getSelectedNodes();
+for (var i=0, l=nodes.length; i < l; i++) {
+ treeObj.setChkDisabled(nodes[i], true);
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.setEditable.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.setEditable.html
new file mode 100644
index 0000000..c90c8de
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.setEditable.html
@@ -0,0 +1,27 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(editable)</span><span class="path">zTreeObj.</span>setEditable</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>设置 zTree 进入 / å–消 编辑状æ€ã€‚</p>
+ <p class="highlight_red">对于编辑状æ€çš„å„ç§åŠŸèƒ½éœ€è¦æå‰è®¾ç½®å¯¹åº” setting 中的ä¸åŒå±žæ€§</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>editable</b><span>Boolean</span></h4>
+ <p>true 表示进入 编辑状æ€</p>
+ <p>false 表示å–消 编辑状æ€</p>
+ <h4 class="topLine"><b>返回值</b><span>无</span></h4>
+ <p>ç›®å‰æ— ä»»ä½•è¿”回值</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 设置 zTree 进入编辑状æ€</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+treeObj.setEditable(true);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.setting.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.setting.html
new file mode 100644
index 0000000..61abd53
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.setting.html
@@ -0,0 +1,13 @@
+<div class="apiDetail">
+<div>
+ <h2><span>JSON</span><span class="path">zTreeObj.</span>setting</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>zTree 对象使用的 setting é…置数æ®ï¼Œè¯¦ç»†è¯·å‚考 “setting é…置详解â€ä¸­çš„å„个属性详细说明</p>
+ <p class="highlight_red">v3.x å–消了原先æ“作 setting 的方法,让用户å¯ä»¥è¾ƒè‡ªç”±çš„修改å‚数,但请注æ„,对于 zTree åˆå§‹åŒ–有影å“çš„å‚æ•°åŽæœŸä¿®æ”¹æ˜¯ä¸ä¼šèµ·ä½œç”¨çš„,请对å„个属性有较深入的了解以åŽå†è€ƒè™‘进行修改。</p>
+ </div>
+ </div>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.showNode.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.showNode.html
new file mode 100644
index 0000000..ed22d51
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.showNode.html
@@ -0,0 +1,31 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNode)</span><span class="path">zTreeObj.</span>showNode</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exhide</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>显示æŸä¸ªè¢«éšè—的节点。</p>
+ <p class="highlight_red">1ã€æ­¤åŠŸèƒ½ä¸æ”¯æŒ exedit 扩展,因此ä¸è¦åœ¨ç¼–辑状æ€æ—¶ä½¿ç”¨éšè—节点的方法。</p>
+ <p class="highlight_red">2ã€éšè—/显示节点,会影å“节点的 isFirstNode å’Œ isLastNode 属性。</p>
+ <p class="highlight_red">3ã€è¯·é€šè¿‡ zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>指定被显示的节点 JSON æ•°æ®</p>
+ <p class="highlight_red">请务必ä¿è¯æ­¤èŠ‚点数æ®å¯¹è±¡ 是 zTree 内部的数æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>无</span></h4>
+ <p>ç›®å‰æ— ä»»ä½•è¿”回值</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 显示æŸä¸ªéšè—的节点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var node = treeObj.getNodeByParam("isHidden", true);
+if (node) {
+ treeObj.showNode(node);
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.showNodes.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.showNodes.html
new file mode 100644
index 0000000..b090657
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.showNodes.html
@@ -0,0 +1,29 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNodes)</span><span class="path">zTreeObj.</span>showNodes</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.exhide</span> 扩展 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>显示一批已ç»è¢«éšè—的节点。</p>
+ <p class="highlight_red">1ã€æ­¤åŠŸèƒ½ä¸æ”¯æŒ exedit 扩展,因此ä¸è¦åœ¨ç¼–辑状æ€æ—¶ä½¿ç”¨éšè—节点的方法。</p>
+ <p class="highlight_red">2ã€éšè—/显示节点,会影å“节点的 isFirstNode å’Œ isLastNode 属性。</p>
+ <p class="highlight_red">3ã€è¯·é€šè¿‡ zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeNodes</b><span>Array(JSON)</span></h4>
+ <p>指定被显示的节点 JSON æ•°æ®é›†åˆ</p>
+ <p class="highlight_red">请务必ä¿è¯è¿™äº›èŠ‚点数æ®å¯¹è±¡ 是 zTree 内部的数æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>无</span></h4>
+ <p>ç›®å‰æ— ä»»ä½•è¿”回值</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 显示全部éšè—的节点</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodesByParam("isHidden", true);
+treeObj.showNodes(nodes);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.transformToArray.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.transformToArray.html
new file mode 100644
index 0000000..a46dc61
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.transformToArray.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNodes)</span><span class="path">zTreeObj.</span>transformToArray</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>å°† zTree 使用的标准 JSON 嵌套格å¼çš„æ•°æ®è½¬æ¢ä¸ºç®€å• Array æ ¼å¼ã€‚(å…去用户自行编写递归é历全部节点的麻烦)</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeNodes</b><span>Array(JSON) / JSON</span></h4>
+ <p>需è¦è¢«è½¬æ¢çš„ zTree 节点数æ®å¯¹è±¡é›†åˆ 或 æŸä¸ªå•ç‹¬èŠ‚点的数æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>Array(JSON)</span></h4>
+ <p>转æ¢åŽçš„ç®€å• Array æ•°æ®æ ¼å¼</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. å°† zTree 节点数æ®è½¬æ¢ä¸ºç®€å• Array æ ¼å¼</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.transformToArray(treeObj.getNodes());
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.transformTozTreeNodes.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.transformTozTreeNodes.html
new file mode 100644
index 0000000..8a52770
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.transformTozTreeNodes.html
@@ -0,0 +1,43 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(simpleNodes)</span><span class="path">zTreeObj.</span>transformTozTreeNodes</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>å°†ç®€å• Array æ ¼å¼æ•°æ®è½¬æ¢ä¸º zTree 使用的标准 JSON 嵌套数æ®æ ¼å¼ã€‚</p>
+ <p class="highlight_red">使用此方法,请务必设置节点唯一标识属性å称 setting.data.simpleData.idKey å’Œ 父节点唯一标识属性å称 setting.data.simpleData.pIdKey,并且让数æ®æ»¡è¶³çˆ¶å­å…³ç³»ã€‚</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>simpleNodes</b><span>Array(JSON) / JSON</span></h4>
+ <p>需è¦è¢«è½¬æ¢çš„ç®€å• Array æ ¼å¼æ•°æ® 或 æŸä¸ªå•ç‹¬çš„æ•°æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>返回值</b><span>Array(JSON)</span></h4>
+ <p>zTree 使用的标准数æ®ï¼Œå­èŠ‚点都存在于父节点数æ®çš„ children 属性中</p>
+ <p class="highlight_red">如果 simpleNodes 是一个 JSON 对象,则被简å•å°è£…æˆé•¿åº¦ä¸º 1 的数组。</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. å°†ç®€å• Array æ ¼å¼è½¬æ¢ä¸ºzTree使用的标准格å¼</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ simpleData: {
+ enable: true,
+ idKey: "id",
+ pIdKey: "pId",
+ rootPId: 0,
+ }
+ }
+};
+var simpleNodes = [
+ {"id":1, "pId":0, "name":"test1"},
+ {"id":11, "pId":1, "name":"test11"},
+ {"id":12, "pId":1, "name":"test12"},
+ {"id":111, "pId":11, "name":"test111"}
+];
+var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.transformTozTreeNodes(simpleNodes);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.updateNode.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.updateNode.html
new file mode 100644
index 0000000..847fa6e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.updateNode.html
@@ -0,0 +1,37 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNode, checkTypeFlag)</span><span class="path">zTreeObj.</span>updateNode</h2>
+ <h3>概述<span class="h3_info">[ ä¾èµ– <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>æ›´æ–°æŸèŠ‚点数æ®ï¼Œä¸»è¦ç”¨äºŽè¯¥èŠ‚点显示属性的更新。</p>
+ <p class="highlight_red">1ã€å¯é’ˆå¯¹ nameã€target〠urlã€icon〠iconSkinã€checkedã€nocheck 等这几个用于显示效果的å‚数进行更新,其他用于 zTreeNodes çš„å‚数请ä¸è¦éšæ„更新,对于展开节点,还请调用 expandNode方法,因此请勿éšæ„修改 open 属性。</p>
+ <p class="highlight_red">2ã€ç”¨æ­¤æ–¹æ³•ä¿®æ”¹ checked 勾选状æ€ä¸ä¼šè§¦å‘ beforeCheck / onCheck 事件回调函数。</p>
+ <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
+ </div>
+ </div>
+ <h3>Function å‚数说明</h3>
+ <div class="desc">
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>指定需è¦æ›´æ–°çš„节点 JSON æ•°æ®</p>
+ <p class="highlight_red">请务必ä¿è¯æ­¤èŠ‚点数æ®å¯¹è±¡ 是 zTree 内部的数æ®å¯¹è±¡</p>
+ <h4 class="topLine"><b>checkTypeFlag</b><span>Boolean</span></h4>
+ <p>checkTypeFlag = true 表示按照 setting.check.chkboxType 属性进行父å­èŠ‚点的勾选è”动æ“作</p>
+ <p>checkTypeFlag = false 表示åªä¿®æ”¹æ­¤èŠ‚点勾选状æ€ï¼Œæ— ä»»ä½•å‹¾é€‰è”动æ“作</p>
+ <p class="highlight_red">当 setting.check.enable = true 且 setting.check.chkStyle = "checkbox" æ—¶æ‰æœ‰æ•ˆ</p>
+ <p class="highlight_red">ä¸å½±å“父å­èŠ‚点中 treeNode.nochecked = true 的节点。</p>
+ <h4 class="topLine"><b>返回值</b><span>无</span></h4>
+ <p>ç›®å‰æ— ä»»ä½•è¿”回值</p>
+ </div>
+ <h3>function 举例</h3>
+ <h4>1. 更新根节点中第一个节点的å称</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodes();
+if (nodes.length>0) {
+ nodes[0].name = "test";
+ treeObj.updateNode(nodes[0]);
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/fn.zTree._z.html b/common/src/main/webapp/thirdparty/zTree/api/en/fn.zTree._z.html
new file mode 100644
index 0000000..61da261
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/fn.zTree._z.html
@@ -0,0 +1,13 @@
+<div class="apiDetail">
+<div>
+ <h2><span>JSON</span><span class="path">$.fn.zTree.</span>_z</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>All of the methods in zTree v3.x are available through the '$. fn.zTree._z' calls, open it for you to develop your own zTree plug-ins.</p>
+ <p class="highlight_red">If you have no special requirements, please don't use this object, and don't modify the methods in this object.</p>
+ </div>
+ </div>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/fn.zTree.destroy.html b/common/src/main/webapp/thirdparty/zTree/api/en/fn.zTree.destroy.html
new file mode 100644
index 0000000..3a31699
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/fn.zTree.destroy.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId)</span><span class="path">$.fn.zTree.</span>destroy</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>From zTree v3.4, zTree support the method for destruction.</p>
+ <p>1. This method can destroy the zTree with specify treeId, and can destroy all of the zTrees.</p>
+ <p class="highlight_red">2. If you want to destory some one zTree, you can use the 'zTreeObj.destroy()' method.</p>
+ <p class="highlight_red">3. If you want to use the tree which has been destroyed, you must use the 'init()' method at first.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier</p>
+ <p class="highlight_red">If this parameter is omitted, then will destroy all of the zTrees.</p>
+ <h4 class="topLine"><b>Return </b><span>none</span></h4>
+ <p>no return value</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. destroy the zTree which its id is 'treeDemo'</h4>
+ <pre xmlns=""><code>$.fn.zTree.destroy("treeDemo");</code></pre>
+ <h4>2. destroy all of the zTrees</h4>
+ <pre xmlns=""><code>$.fn.zTree.destroy();</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/fn.zTree.getZTreeObj.html b/common/src/main/webapp/thirdparty/zTree/api/en/fn.zTree.getZTreeObj.html
new file mode 100644
index 0000000..2bc0447
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/fn.zTree.getZTreeObj.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId)</span><span class="path">$.fn.zTree.</span>getZTreeObj</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>zTree v3.x specifically provide the method which can use the tree's Id to get zTree object.</p>
+ <p class="highlight_red">Please initialize zTree first, then you can use this method.</p>
+ <p>Users don't need to set the global variable to hold the zTree object, and all of the callback will return 'treeId' parameters, the user can always use this method to get the zTree object.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier</p>
+ <h4 class="topLine"><b>Return </b><span>JSON</span></h4>
+ <p>zTree object</p>
+ <p>This object can provide the methods of operate the zTree</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Get the zTree object which id is 'tree'</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/fn.zTree.init.html b/common/src/main/webapp/thirdparty/zTree/api/en/fn.zTree.init.html
new file mode 100644
index 0000000..cf97d2b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/fn.zTree.init.html
@@ -0,0 +1,75 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(obj, zSetting, zNodes)</span><span class="path">$.fn.zTree.</span>init</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The method which used to create zTree.</p>
+ <p>1. The web page need to use W3C markup. For example: &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"&nbsp;&nbsp; &nbsp;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;</p>
+ <p>2. Need to load jquery-1.4.2.js or other higher versions.</p>
+ <p>3. Need to load jquery-ztree.core-3.0.js. If you need to use the edit mode or checkbox / radio mode, you need to load jquery-ztree.exedit-3.0.js and jquery-ztree.excheck-3.0.js.</p>
+ <p>4. Need to load zTreeStyle.css and image files</p>
+ <p>5. If you need to use custom icons, please refer to the appropriate Demo.</p>
+ <p>6. Note: You need to set zTree container's class name to "ztree". If you need to change, don't forget to modify the css file. If you need other special styles, can modify the css file to their own needs.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>object</b><span>jQuery Object</span></h4>
+ <p>DOM Container for zTree</p>
+ <h4 class="topLine"><b>zSetting</b><span>JSON</span></h4>
+ <p>zTree's configuration data, please refer to "setting details" in the API Document.</p>
+ <h4 class="topLine"><b>zNodes</b><span>Array(JSON) / JSON</span></h4>
+ <p>zTree's node data, please refer to "treeNode data details" in the API Document.</p>
+ <p class="highlight_red">1. zTree v3.x support to add single node, that is, if only to add one node, you can use JSON without using Array.</p>
+ <p class="highlight_red">2. If you need asynchronous load root nodes, can be set to null or [ ]</p>
+ <p class="highlight_red">3. If you use simple data mode, please refer to "setting.data.simpleData" in the API Document.</p>
+ <h4 class="topLine"><b>Return </b><span>JSON</span></h4>
+ <p>zTree object</p>
+ <p>This object can provide the methods of operate the zTree</p>
+ <p class="highlight_red">You can use $.fn.zTree.getZTreeObj method at any time to obtain.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. create a simple tree</h4>
+ <pre xmlns=""><code>&lt;!DOCTYPE html&gt;
+&lt;HTML&gt;
+ &lt;HEAD&gt;
+ &lt;TITLE&gt; ZTREE DEMO &lt;/TITLE&gt;
+ &lt;meta http-equiv="content-type" content="text/html; charset=UTF-8"&gt;
+ &lt;link rel="stylesheet" href="zTreeStyle/zTreeStyle.css" type="text/css"&gt;
+ &lt;script type="text/javascript" src="jquery-1.4.2.js"&gt;&lt;/script&gt;
+ &lt;script type="text/javascript" src="jquery.ztree.core-3.5.js"&gt;&lt;/script&gt;
+&lt;!--
+ &lt;script type="text/javascript" src="jquery.ztree.excheck-3.5.js"&gt;&lt;/script&gt;
+ &lt;script type="text/javascript" src="jquery.ztree.exedit-3.5.js"&gt;&lt;/script&gt;
+--&gt;
+ &lt;SCRIPT type="text/javascript" &gt;
+ var zTreeObj,
+ setting = {
+ view: {
+ selectedMulti: false
+ }
+ },
+ zTreeNodes = [
+ {"name":"Site Map", open:true, children: [
+ { "name":"google", "url":"http://www.google.com", "target":"_blank"},
+ { "name":"baidu", "url":"http://baidu.com", "target":"_blank"},
+ { "name":"sina", "url":"http://www.sina.com.cn", "target":"_blank"}
+ ]
+ }
+ ];
+
+ $(document).ready(function(){
+ zTreeObj = $.fn.zTree.init($("#tree"), setting, zTreeNodes);
+
+ });
+ &lt;/SCRIPT&gt;
+ &lt;/HEAD&gt;
+
+&lt;BODY&gt;
+&lt;ul id="tree" class="ztree" style="width:230px; overflow:auto;"&gt;&lt;/ul&gt;
+ &lt;/BODY&gt;
+&lt;/HTML&gt;</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.autoParam.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.autoParam.html
new file mode 100644
index 0000000..85cd469
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.autoParam.html
@@ -0,0 +1,39 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Array(String)</span><span class="path">setting.async.</span>autoParam</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Required automatically submit the parameters about the properties of the parent node, when the asynchronous load. It is valid when <span class="highlight_red">[setting.async.enable = true]</span></p>
+ <p>Default:[ ]</p>
+ </div>
+ </div>
+ <h3>Array(String) Format</h3>
+ <div class="desc">
+ <p>1. Just save the attribute name of node to the array. For example: ["id", "name"]</p>
+ <p>2. You can change the parameter name. For example: server only accepts "zId" -- ["id=zId"]</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. set auto commit 'id' attribute</h4>
+ <pre xmlns=""><code>var setting = {
+ async: {
+ enable: true,
+ url: "http://host/getNode.php",
+ autoParam: ["id"]
+ }
+};
+If have the parent node: {id:1, name:"test"}, When asynchronously load this parent node's child nodes, will be submitted parameters: id=1
+......</code></pre>
+ <h4>2. set auto commit 'id' attribute, but parameter name is 'zId'</h4>
+ <pre xmlns=""><code>var setting = {
+ async: {
+ enable: true,
+ url: "http://host/getNode.php",
+ autoParam: ["id=zId"]
+ }
+};
+If have the parent node: {id:1, name:"test"}, When asynchronously load this parent node's child nodes, will be submitted parameters: zId=1
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.contentType.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.contentType.html
new file mode 100644
index 0000000..cc9bfcd
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.contentType.html
@@ -0,0 +1,29 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.async.</span>contentType</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>When Ajax sending data to the server, use this content-type. It is valid when <span class="highlight_red">[setting.async.enable = true]</span></p>
+ <p>Default:"application/x-www-form-urlencoded"</p>
+ </div>
+ </div>
+ <h3>String Format</h3>
+ <div class="desc">
+ <p> contentType = "application/x-www-form-urlencoded", means: the sending data format is "form" format.</p>
+ <p> contentType = "application/json", means: the sending data format is "json" format. (for .Net)</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. set the sending data format to "json" format.</h4>
+ <pre xmlns=""><code>var setting = {
+ async: {
+ enable: true,
+ contentType: "application/json",
+ url: "http://host/getNode.php",
+ autoParam: ["id", "name"]
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.dataFilter.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.dataFilter.html
new file mode 100644
index 0000000..34733e4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.dataFilter.html
@@ -0,0 +1,45 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, parentNode, responseData)</span><span class="path">setting.async.</span>dataFilter</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Function used to pre-process for the return data of Ajax. It is valid when <span class="highlight_red">[setting.async.enable = true]</span></p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>parentNode</b><span>JSON</span></h4>
+ <p>Parent node's JSON data object</p>
+ <p class="highlight_red">When asynchronously loading the root, the parentNode = null</p>
+ <h4 class="topLine"><b>responseData</b><span>Array(JSON) / JSON / String</span></h4>
+ <p>Ajax got Array (JSON) / JSON / String data objects</p>
+ <p class="highlight_red">From v3.4, support the string with XML format.</p>
+ <h4 class="topLine"><b>Return </b><span>Array(JSON) / JSON</span></h4>
+ <p>The return value should be the JSON data structure which is supported by the zTree.</p>
+ <p class="highlight_red">v3.x supports to load single node JSON data object.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. Modify the node name attribute which is ajax got.</h4>
+ <pre xmlns=""><code>function ajaxDataFilter(treeId, parentNode, responseData) {
+ if (responseData) {
+ for(var i =0; i < responseData.length; i++) {
+ responseData[i].name += "_filter";
+ }
+ }
+ return responseData;
+};
+var setting = {
+ async: {
+ enable: true,
+ url: "http://host/getNode.php",
+ dataFilter: ajaxDataFilter
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.dataType.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.dataType.html
new file mode 100644
index 0000000..e6672e9
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.dataType.html
@@ -0,0 +1,29 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.async.</span>dataType</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The data type of Ajax. It is valid when <span class="highlight_red">[setting.async.enable = true]</span></p>
+ <p>Default:"text"</p>
+ </div>
+ </div>
+ <h3>String Format</h3>
+ <div class="desc">
+ <p> dataType = "text", It can meet most of the needs.</p>
+ <p class="highlight_red">The 'dataType' in zTree and jQuery's ajax is same.</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. Set the dataType which ajax got is text.</h4>
+ <pre xmlns=""><code>var setting = {
+ async: {
+ enable: true,
+ dataType: "text",
+ url: "http://host/getNode.php",
+ autoParam: ["id", "name"]
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.enable.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.enable.html
new file mode 100644
index 0000000..806ba6c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.enable.html
@@ -0,0 +1,30 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.async.</span>enable</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Set zTree asynchronous loading mode is turned on or off.</p>
+ <p>Default: false</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true - turn on asynchronous loading mode</p>
+ <p> false - turn off asynchronous loading mode</p>
+ <p class="highlight_red">If set it is true, you must set attributes in setting.async</p>
+ <p class="highlight_red">If you don't pass 'treeNodes' parameter when initialize zTree, the root nodes will get by ajax.</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. Turn on asynchronous loading mode</h4>
+ <pre xmlns=""><code>var setting = {
+ async: {
+ enable: true,
+ url: "http://host/getNode.php",
+ autoParam: ["id", "name"]
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.otherParam.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.otherParam.html
new file mode 100644
index 0000000..2e37390
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.otherParam.html
@@ -0,0 +1,40 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Array(String) / JSON</span><span class="path">setting.async.</span>otherParam</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The static parameters of the Ajax request. (key - value) It is valid when <span class="highlight_red">[setting.async.enable = true]</span></p>
+ <p>Default: [ ]</p>
+ </div>
+ </div>
+ <h3>Array(String) Format</h3>
+ <div class="desc">
+ <p>Can be empty array. e.g. [ ]. If set key, you must set value, e.g. [key, value]. ([key] or [key, value, key] is wrong!!)</p>
+ </div>
+ <h3>JSON Format</h3>
+ <div class="desc">
+ <p>Use JSON data format set the key-value. e.g. { key1:value1, key2:value2 }</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. Use Array(String) Format</h4>
+ <pre xmlns=""><code>var setting = {
+ async: {
+ enable: true,
+ url: "http://host/getNode.php",
+ otherParam: ["id", "1", "name", "test"]
+ }
+};
+when zTree send ajax, the parameters will has: id=1&name=test</code></pre>
+ <h4>2. Use JSON data Format</h4>
+ <pre xmlns=""><code>var setting = {
+ async: {
+ enable: true,
+ url: "http://host/getNode.php",
+ otherParam: { "id":"1", "name":"test"}
+ }
+};
+when zTree send ajax, the parameters will has: id=1&name=test</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.type.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.type.html
new file mode 100644
index 0000000..ae54338
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.type.html
@@ -0,0 +1,30 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.async.</span>type</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Http request mode in ajax. It is valid when <span class="highlight_red">[setting.async.enable = true]</span></p>
+ <p>Defalut: "post"</p>
+ </div>
+ </div>
+ <h3>String Format</h3>
+ <div class="desc">
+ <p> "post" - http request mode</p>
+ <p> "get" - http request mode</p>
+ <p class="highlight_red">The 'type' in zTree and jQuery's ajax is same.</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. Set http request mode is 'get'</h4>
+ <pre xmlns=""><code>var setting = {
+ async: {
+ enable: true,
+ type: "get",
+ url: "http://host/getNode.php",
+ autoParam: ["id", "name"]
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.url.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.url.html
new file mode 100644
index 0000000..5587f29
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.async.url.html
@@ -0,0 +1,50 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String / Function(treeId, treeNode)</span><span class="path">setting.async.</span>url</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The URL to which the ajax request is sent. It is valid when <span class="highlight_red">[setting.async.enable = true]</span></p>
+ <p>Default: ""</p>
+ </div>
+ </div>
+ <h3>String Format</h3>
+ <div class="desc">
+ <p>A url string(e.g. "http://www.domain.com"). Note: please ensure that the url can be loaded</p>
+ <p class="highlight_red">Url can also take parameters, please note that transcode.</p>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>Parent node's JSON data object</p>
+ <p class="highlight_red">When asynchronously loading the root, the treeNode = null</p>
+ <h4 class="topLine"><b>Return </b><span>String</span></h4>
+ <p>Return value is same as 'String Format'</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. set ajax url is "nodes.php"</h4>
+ <pre xmlns=""><code>var setting = {
+ async: {
+ enable: true,
+ url: "nodes.php",
+ autoParam: ["id", "name"]
+ }
+};
+......</code></pre>
+ <h4>2. set ajax url is "function"</h4>
+ <pre xmlns=""><code>function getAsyncUrl(treeId, treeNode) {
+ return treeNode.isParent ? "nodes1.php" : "nodes2.php";
+};
+var setting = {
+ async: {
+ enable: true,
+ url: getAsyncUrl,
+ autoParam: ["id", "name"]
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeAsync.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeAsync.html
new file mode 100644
index 0000000..6563ff2
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeAsync.html
@@ -0,0 +1,35 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeAsync</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the event before zTree execute ajax, zTree based on return value to determine whether to execute ajax.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the parent node</p>
+ <p class="highlight_red">When asynchronously loading the root, the treeNode = null</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>return true or false</p>
+ <p class="highlight_red">If return false, zTree will not execute ajax, and will not trigger the 'onAsyncSuccess / onAsyncError' callback.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. If the parent node's attribute 'id' is 1, zTree will not execute ajax.</h4>
+ <pre xmlns=""><code>function zTreeBeforeAsync(treeId, treeNode) {
+ return (treeNode.id !== 1);
+};
+var setting = {
+ callback: {
+ beforeAsync: zTreeBeforeAsync
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeCheck.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeCheck.html
new file mode 100644
index 0000000..5260412
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeCheck.html
@@ -0,0 +1,34 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeCheck</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the event before check or uncheck node, zTree based on return value to determine whether to change check state.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which is checked or unchecked</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>return true or false</p>
+ <p class="highlight_red">If return false, zTree will not change check state, and will not trigger the 'onCheck' callback.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. disable to change check state of all nodes, and keep the check state initialization</h4>
+ <pre xmlns=""><code>function zTreeBeforeCheck(treeId, treeNode) {
+ return false;
+};
+var setting = {
+ callback: {
+ beforeCheck: zTreeBeforeCheck
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeClick.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeClick.html
new file mode 100644
index 0000000..32ddbf7
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeClick.html
@@ -0,0 +1,49 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode, clickFlag)</span><span class="path">setting.callback.</span>beforeClick</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the event before click node, zTree based on return value to determine whether to trigger the 'onClick' callback.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which is clicked</p>
+ <h4 class="topLine"><b>clickFlag</b><span>Number</span></h4>
+ <p>Node is selected or deselected state, please see table below for details</p>
+ <table width="100%" border="0" cellspacing="1" cellpadding="0">
+ <thead><tr><td>clickFlag</td><td title="Whether to allow multi-select">selectedMulti</td><td title="Whether to press Ctrl-key or Cmd-key">autoCancelSelected<br/>&&<br/>event.ctrlKey / metaKey</td><td title="Node's selection state">isSelected</td><td>operate for selected</td></tr></thead>
+ <tbody>
+ <tr><td>1</td><td>true</td><td>false</td><td>false</td><td>node is selected (single)</td></tr>
+ <tr><td>1</td><td>true</td><td>false</td><td>true</td><td>node is selected (single)</td></tr>
+ <tr><td>2</td><td>true</td><td>true</td><td>false</td><td>node is selected (multi)</td></tr>
+ <tr><td>0</td><td>true</td><td>true</td><td>true</td><td>node is deselected</td></tr>
+ <tr><td>1</td><td>false</td><td>false</td><td>false</td><td>node is selected (single)</td></tr>
+ <tr><td>1</td><td>false</td><td>false</td><td>true</td><td>node is selected (single)</td></tr>
+ <tr><td>1</td><td>false</td><td>true</td><td>false</td><td>node is selected (single)</td></tr>
+ <tr><td>0</td><td>false</td><td>true</td><td>true</td><td>node is deselected</td></tr>
+ </tbody>
+ </table>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>return true or false</p>
+ <p class="highlight_red">If return false, zTree will not change selected state, and will not trigger the 'onClick' callback.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. disabled to click the node</h4>
+ <pre xmlns=""><code>function zTreeBeforeClick(treeId, treeNode, clickFlag) {
+ return (treeNode.id !== 1);
+};
+var setting = {
+ callback: {
+ beforeClick: zTreeBeforeClick
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeCollapse.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeCollapse.html
new file mode 100644
index 0000000..b2713e8
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeCollapse.html
@@ -0,0 +1,34 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeCollapse</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the event before collapse node, zTree based on return value to determine whether to collapse node.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which will be collapsed</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>return true or false</p>
+ <p class="highlight_red">If return false, zTree will not collapse node, and will not trigger the 'onCollapse' callback.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. disabled to collapse node which is expanded</h4>
+ <pre xmlns=""><code>function zTreeBeforeCollapse(treeId, treeNode) {
+ return false;
+};
+var setting = {
+ callback: {
+ beforeCollapse: zTreeBeforeCollapse
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeDblClick.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeDblClick.html
new file mode 100644
index 0000000..6f1c743
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeDblClick.html
@@ -0,0 +1,36 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeDblClick</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the dblclick event before the 'onDblClick' callback, zTree based on return value to determine whether to trigger the 'onDblClick' callback.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which is double clicked</p>
+ <p class="highlight_red">If the DOM which dblclicked isn't a node, it will return null.</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>return true or false</p>
+ <p class="highlight_red">If return false, ztree will not trigger the 'onDblClick' callback, no effect on other operations.</p>
+ <p class="highlight_red">This callback function does not affect the dblclick the parent node to auto expand, please refer to setting.view.dblClickExpand properties.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. disable to trigger the 'onDblClick' callback</h4>
+ <pre xmlns=""><code>function zTreeBeforeDblClick(treeId, treeNode) {
+ return false;
+};
+var setting = {
+ callback: {
+ beforeDblClick: zTreeBeforeDblClick
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeDrag.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeDrag.html
new file mode 100644
index 0000000..5175244
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeDrag.html
@@ -0,0 +1,39 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNodes)</span><span class="path">setting.callback.</span>beforeDrag</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the event before drag node, zTree based on return value to determine whether to start to drag node.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, the tree is what the treeNodes are belong to, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
+ <p>A collection of the nodes which will be dragged</p>
+ <p class="highlight_red">v3.x allows drag and drop multiple sibling nodes, so this parameter is modified to Array(JSON).</p>
+ <p class="highlight_red">If the selected nodes aren't the sibling nodes, you can only drag one node which mouse over.</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>return true or false</p>
+ <p class="highlight_red">If return false, zTree will stop drag, and will not trigger the 'onDrag / beforeDrop / onDrop' callback.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. disable to drag all node</h4>
+ <pre xmlns=""><code>function zTreeBeforeDrag(treeId, treeNodes) {
+ return false;
+};
+var setting = {
+ edit: {
+ enable: true
+ },
+ callback: {
+ beforeDrag: zTreeBeforeDrag
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeDragOpen.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeDragOpen.html
new file mode 100644
index 0000000..ed1ae97
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeDragOpen.html
@@ -0,0 +1,37 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeDragOpen</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the event when drag node to collapsed parent node, zTree based on return value to determine whether to auto expand parent node.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, the tree is what the treeNode(parent node) is belong to, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the parent node which will be auto expanded</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>return true or false</p>
+ <p class="highlight_red">If return false, zTree will not auto expand parent node.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. disable to auto expand parent node.</h4>
+ <pre xmlns=""><code>function zTreeBeforeDragOpen(treeId, treeNode) {
+ return false;
+};
+var setting = {
+ edit: {
+ enable: true
+ },
+ callback: {
+ beforeDragOpen: zTreeBeforeDragOpen
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeDrop.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeDrop.html
new file mode 100644
index 0000000..7014321
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeDrop.html
@@ -0,0 +1,50 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNodes, targetNode, moveType, isCopy)</span><span class="path">setting.callback.</span>beforeDrop</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the event before drag-drop node, zTree based on return value to determine whether to allow drag-drop node.</p>
+ <p>Default: null</p>
+ <p class="highlight_red">When drop the nodes, if the dragged nodes is not in a valid location, this callback will not triggered, and will restore the original position.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, the tree is what the targetNode is belong to, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
+ <p>A collection of the nodes which has been dragged</p>
+ <p class="highlight_red">The treeNodes are the data of the nodes which has been dragged, when copy nodes or move nodes.</p>
+ <h4 class="topLine"><b>targetNode</b><span>JSON</span></h4>
+ <p>JSON data object of the target node which treeNodes are drag-dropped.</p>
+ <p class="highlight_red">If the treeNodes will be root node, the targetNode = null</p>
+ <h4 class="topLine"><b>moveType</b><span>String</span></h4>
+ <p>the relative position of move to the target node</p>
+ <p class="highlight_red">"inner": will be child of targetNode</p>
+ <p class="highlight_red">"prev": will be sibling node, and be in front of targetNode</p>
+ <p class="highlight_red">"next": will be sibling node, and be behind targetNode</p>
+ <h4 class="topLine"><b>isCopy</b><span>Boolean</span></h4>
+ <p>the flag used to judge copy node or move node</p>
+ <p class="highlight_red">true: copy node; false: move node</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>return true or false</p>
+ <p class="highlight_red">If return false, zTree will restore the dragged nodes, and will not trigger the 'onDrop' callback.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. disable to drag nodes to root</h4>
+ <pre xmlns=""><code>function zTreeBeforeDrop(treeId, treeNodes, targetNode, moveType) {
+ return !(targetNode == null || (moveType != "inner" && !targetNode.parentTId));
+};
+var setting = {
+ edit: {
+ enable: true
+ },
+ callback: {
+ beforeDrop: zTreeBeforeDrop
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeEditName.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeEditName.html
new file mode 100644
index 0000000..8772a3e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeEditName.html
@@ -0,0 +1,38 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeEditName</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the event before click edit button, zTree based on return value to determine whether to allow to edit the name.</p>
+ <p class="highlight_red">This callback is used to capture the event which edit button is clicked, then trigger the custom editing operation.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which will be edited name.</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>return true or false</p>
+ <p class="highlight_red">If return false, the node will not be able to edit the name.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. disable to edit the parent node's name</h4>
+ <pre xmlns=""><code>function zTreeBeforeEditName(treeId, treeNode) {
+ return !treeNode.isParent;
+}
+var setting = {
+ edit: {
+ enable: true
+ },
+ callback: {
+ beforeEditName: zTreeBeforeEditName
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeExpand.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeExpand.html
new file mode 100644
index 0000000..73cf55a
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeExpand.html
@@ -0,0 +1,34 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeExpand</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the event before expand node, zTree based on return value to determine whether to expand node.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which will be expanded</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>return true or false</p>
+ <p class="highlight_red">If return false, zTree will not expand node, and will not trigger the 'onExpand' callback.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. disabled to expand node which is collapsed</h4>
+ <pre xmlns=""><code>function zTreeBeforeExpand(treeId, treeNode) {
+ return false;
+};
+var setting = {
+ callback: {
+ beforeExpand: zTreeBeforeExpand
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeMouseDown.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeMouseDown.html
new file mode 100644
index 0000000..4af0818
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeMouseDown.html
@@ -0,0 +1,35 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeMouseDown</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the mousedown event before the 'onMouseDown' callback, zTree based on return value to determine whether to trigger the 'onMouseDown' callback.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which mouse over</p>
+ <p class="highlight_red">If the DOM which mouse over isn't a node, it will return null.</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>return true or false</p>
+ <p class="highlight_red">If return false, zTree will not trigger the 'onMouseDown' callback, no effect on other operations.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. disable to trigger the 'onMouseDown' callback</h4>
+ <pre xmlns=""><code>function zTreeBeforeMouseDown(treeId, treeNode) {
+ return false;
+};
+var setting = {
+ callback: {
+ beforeMouseDown: zTreeBeforeMouseDown
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeMouseUp.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeMouseUp.html
new file mode 100644
index 0000000..0c008fc
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeMouseUp.html
@@ -0,0 +1,35 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeMouseUp</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the mouseup event before the 'onMouseUp' callback, zTree based on return value to determine whether to trigger the 'onMouseUp' callback.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which mouse over</p>
+ <p class="highlight_red">If the DOM which mouse over isn't a node, it will return null.</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>return true or false</p>
+ <p class="highlight_red">If return false, zTree will not trigger the 'onMouseUp' callback, no effect on other operations.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. disable to trigger the 'onMouseUp' callback</h4>
+ <pre xmlns=""><code>function zTreeBeforeMouseUp(treeId, treeNode) {
+ return false;
+};
+var setting = {
+ callback: {
+ beforeMouseUp: zTreeBeforeMouseUp
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeRemove.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeRemove.html
new file mode 100644
index 0000000..38e14c1
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeRemove.html
@@ -0,0 +1,37 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeRemove</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the event before remove node, zTree based on return value to determine whether to allow to remove node.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which will be removed.</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>return true or false</p>
+ <p class="highlight_red">If return false, zTree will not remove node, and will not trigger the 'onRemove' callback.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. disable to remove node</h4>
+ <pre xmlns=""><code>function zTreeBeforeRemove(treeId, treeNode) {
+ return false;
+}
+var setting = {
+ edit: {
+ enable: true
+ },
+ callback: {
+ beforeRemove: zTreeBeforeRemove
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeRename.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeRename.html
new file mode 100644
index 0000000..76438a9
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeRename.html
@@ -0,0 +1,46 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode, newName, isCancel)</span><span class="path">setting.callback.</span>beforeRename</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the event before rename(when input DOM blur or press Enter Key), zTree based on return value to determine whether to allow to rename node.</p>
+ <p class="highlight_red">When node is editing name, press the ESC key to restore the original name and stop edit name.</p>
+ <p class="highlight_red">From v3.5.13, zTree will trigger this callback when user cancel edit name. please see 'isCancel' parameter.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which will be rename.</p>
+ <h4 class="topLine"><b>newName</b><span>String</span></h4>
+ <p>the new name</p>
+ <h4 class="topLine"><b>isCancel</b><span>Boolean</span></h4>
+ <p>the status about cancel edit name (v3.5.13+)</p>
+ <p class="highlight_red">isCancel = true means: user cancel edit name. (press ESC or use cancelEditName() function)</p>
+ <p class="highlight_red">isCancel = false means: user submit edit name.</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>return true or false</p>
+ <p class="highlight_red">If return false, the treeNode will keep the editing name, don't trigger the 'onRename' callback, and will ignore other enents, until the callback return true.</p>
+ <p class="highlight_red">If returns false, zTree will not set the input box to get focus to avoid the warning message which led to repeated triggering ‘beforeRename’ callback. Please use editName() method to set the input box to get focus when user close the warning message.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. the length of the new name can't less than 5</h4>
+ <pre xmlns=""><code>function zTreeBeforeRename(treeId, treeNode, newName, isCancel) {
+ return newName.length > 5;
+}
+var setting = {
+ edit: {
+ enable: true
+ },
+ callback: {
+ beforeRename: zTreeBeforeRename
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeRightClick.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeRightClick.html
new file mode 100644
index 0000000..15c38cd
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.beforeRightClick.html
@@ -0,0 +1,35 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeRightClick</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the right click event before the 'onRightClick' callback, zTree based on return value to determine whether to trigger the 'onRightClick' callback.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which is mouse right clicked</p>
+ <p class="highlight_red">If the DOM which mouse right clicked isn't a node, it will return null.</p>
+ <h4 class="topLine"><b>Return</b><span>Boolean</span></h4>
+ <p>return true or false</p>
+ <p class="highlight_red">If return false, ztree will not trigger the 'onRightClick' callback, no effect on other operations.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. disable to trigger the 'onRightClick' callback</h4>
+ <pre xmlns=""><code>function zTreeBeforeRightClick(treeId, treeNode) {
+ return false;
+};
+var setting = {
+ callback: {
+ beforeRightClick: zTreeBeforeRightClick
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onAsyncError.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onAsyncError.html
new file mode 100644
index 0000000..785c8d8
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onAsyncError.html
@@ -0,0 +1,42 @@
+<div class="apiDetail">
+<div>
+ <h2><span class="path">setting.callback.</span>onAsyncError</h2>
+ <h2><span>Function(event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown)</span>&nbsp;</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the error event when execute ajax.</p>
+ <p class="highlight_red">If you set 'setting.callback.beforeAsync',and return false, zTree will not execute ajax, and will not trigger the 'onAsyncSuccess / onAsyncError' callback.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event Object</span></h4>
+ <p>event Object</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the parent node</p>
+ <p class="highlight_red">When load root nodes, treeNode = null</p>
+ <h4 class="topLine"><b>XMLHttpRequest</b><span>String</span></h4>
+ <p>XMLHttpRequest Object, please refer to JQuery API documentation.</p>
+ <h4 class="topLine"><b>textStatus</b><span>String</span></h4>
+ <p>a string categorizing the status of the request("success", "error"...), please refer to JQuery API documentation.</p>
+ <h4 class="topLine"><b>errorThrown</b><span>String</span></h4>
+ <p>eWhen an HTTP error occurs, errorThrown receives the textual portion of the HTTP status, please refer to JQuery API documentation.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. When execute ajax make error, alert message.</h4>
+ <pre xmlns=""><code>function zTreeOnAsyncError(event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown) {
+ alert(XMLHttpRequest);
+};
+var setting = {
+ callback: {
+ onAsyncError: zTreeOnAsyncError
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onAsyncSuccess.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onAsyncSuccess.html
new file mode 100644
index 0000000..2722691
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onAsyncSuccess.html
@@ -0,0 +1,38 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode, msg)</span><span class="path">setting.callback.</span>onAsyncSuccess</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the complete success event when execute ajax.</p>
+ <p class="highlight_red">If you set 'setting.callback.beforeAsync',and return false, zTree will not execute ajax, and will not trigger the 'onAsyncSuccess / onAsyncError' callback.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event Object</span></h4>
+ <p>event Object</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the parent node</p>
+ <p class="highlight_red">When load root nodes, treeNode = null</p>
+ <h4 class="topLine"><b>msg</b><span>String / Object</span></h4>
+ <p>The actualnode data which got by ajax. User-friendly debugging.</p>
+ <p class="highlight_red">The actual data's type of msg is affected by 'setting.async.dataType', please refer to JQuery API documentation.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. When execute ajax complete success, alert message.</h4>
+ <pre xmlns=""><code>function zTreeOnAsyncSuccess(event, treeId, treeNode, msg) {
+ alert(msg);
+};
+var setting = {
+ callback: {
+ onAsyncSuccess: zTreeOnAsyncSuccess
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onCheck.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onCheck.html
new file mode 100644
index 0000000..ed33f8d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onCheck.html
@@ -0,0 +1,34 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onCheck</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the check or uncheck event when check or uncheck the checkbox and radio.</p>
+ <p class="highlight_red">If you set 'setting.callback.beforeCheck',and return false, zTree will not change check state, and will not trigger the 'onCheck' callback.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event Object</span></h4>
+ <p>event Object</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which is checked or unchecked</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. When check or uncheck the checkbox and radio, alert info about 'tId' and 'name' and 'checked'.</h4>
+ <pre xmlns=""><code>function zTreeOnCheck(event, treeId, treeNode) {
+ alert(treeNode.tId + ", " + treeNode.name + "," + treeNode.checked);
+};
+var setting = {
+ callback: {
+ onCheck: zTreeOnCheck
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onClick.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onClick.html
new file mode 100644
index 0000000..0453af8
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onClick.html
@@ -0,0 +1,49 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode, clickFlag)</span><span class="path">setting.callback.</span>onClick</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the click event when click node.</p>
+ <p class="highlight_red">If you set 'setting.callback.beforeClick',and return false, zTree will not change selected state, and will not trigger the 'onClick' callback.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event Object</span></h4>
+ <p>event Object</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which is clicked</p>
+ <h4 class="topLine"><b>clickFlag</b><span>Number</span></h4>
+ <p>Node is selected or deselected state, please see table below for details</p>
+ <table width="100%" border="0" cellspacing="1" cellpadding="0">
+ <thead><tr><td>clickFlag</td><td title="Whether to allow multi-select">selectedMulti</td><td title="Whether to press Ctrl-key or Cmd-key">autoCancelSelected<br/>&&<br/>event.ctrlKey / metaKey</td><td title="Node's selection state">isSelected</td><td>operate for selected</td></tr></thead>
+ <tbody>
+ <tr><td>1</td><td>true</td><td>false</td><td>false</td><td>node is selected (single)</td></tr>
+ <tr><td>1</td><td>true</td><td>false</td><td>true</td><td>node is selected (single)</td></tr>
+ <tr><td>2</td><td>true</td><td>true</td><td>false</td><td>node is selected (multi)</td></tr>
+ <tr><td>0</td><td>true</td><td>true</td><td>true</td><td>node is deselected</td></tr>
+ <tr><td>1</td><td>false</td><td>false</td><td>false</td><td>node is selected (single)</td></tr>
+ <tr><td>1</td><td>false</td><td>false</td><td>true</td><td>node is selected (single)</td></tr>
+ <tr><td>1</td><td>false</td><td>true</td><td>false</td><td>node is selected (single)</td></tr>
+ <tr><td>0</td><td>false</td><td>true</td><td>true</td><td>node is deselected</td></tr>
+ </tbody>
+ </table>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. When click node, alert info about 'tId' and 'name'.</h4>
+ <pre xmlns=""><code>function zTreeOnClick(event, treeId, treeNode) {
+ alert(treeNode.tId + ", " + treeNode.name);
+};
+var setting = {
+ callback: {
+ onClick: zTreeOnClick
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onCollapse.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onCollapse.html
new file mode 100644
index 0000000..d605dc8
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onCollapse.html
@@ -0,0 +1,34 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onCollapse</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the event when collapse node.</p>
+ <p class="highlight_red">If you set 'setting.callback.beforeCollapse',and return false, zTree will not collapse node, and will not trigger the 'onCollapse' callback.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event Object</span></h4>
+ <p>event Object</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which will be collapsed</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. When collapse node, alert info about 'tId' and 'name'.</h4>
+ <pre xmlns=""><code>function zTreeOnCollapse(event, treeId, treeNode) {
+ alert(treeNode.tId + ", " + treeNode.name);
+};
+var setting = {
+ callback: {
+ onCollapse: zTreeOnCollapse
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onDblClick.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onDblClick.html
new file mode 100644
index 0000000..fbd47e8
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onDblClick.html
@@ -0,0 +1,35 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onDblClick</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the dblclick event when double click node.</p>
+ <p class="highlight_red">If you set 'setting.callback.beforeDblClick',and return false, zTree will not trigger the 'onDblClick' callback.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event Object</span></h4>
+ <p>event Object</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which is double clicked</p>
+ <p class="highlight_red">If the DOM which dblclicked isn't a node, it will return null.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. When double click node, alert info about 'tId' and 'name'.</h4>
+ <pre xmlns=""><code>function zTreeOnDblClick(event, treeId, treeNode) {
+ alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
+};
+var setting = {
+ callback: {
+ onDblClick: zTreeOnDblClick
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onDrag.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onDrag.html
new file mode 100644
index 0000000..d178b63
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onDrag.html
@@ -0,0 +1,34 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNodes)</span><span class="path">setting.callback.</span>onDrag</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the drag event when drag node.</p>
+ <p class="highlight_red">If you set 'setting.callback.beforeDrag',and return false, zTree will stop drag, and will not trigger the 'onDragMove' & 'onDrag' callback.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event Object</span></h4>
+ <p>event Object</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, the tree is what the treeNodes are belong to, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
+ <p>A collection of the nodes which will be dragged</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. When drag nodes, alert the number of dragged nodes.</h4>
+ <pre xmlns=""><code>function zTreeOnDrag(event, treeId, treeNodes) {
+ alert(treeNodes.length);
+};
+var setting = {
+ callback: {
+ onDrag: zTreeOnDrag
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onDragMove.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onDragMove.html
new file mode 100644
index 0000000..a56e835
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onDragMove.html
@@ -0,0 +1,34 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNodes)</span><span class="path">setting.callback.</span>onDragMove</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the drag-move event when drag & drop node.</p>
+ <p class="highlight_red">Mainly used to capture the DOM which the nodes was drag in. </p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event Object</span></h4>
+ <p>event Object</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, the tree is what the treeNodes are belong to, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
+ <p>A collection of the nodes which will be dragged</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. When drag nodes, output the target dom.</h4>
+ <pre xmlns=""><code>function zTreeOnDragMove(event, treeId, treeNodes) {
+ console.log(event.target);
+};
+var setting = {
+ callback: {
+ onDragMove: zTreeOnDragMove
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onDrop.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onDrop.html
new file mode 100644
index 0000000..6362463
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onDrop.html
@@ -0,0 +1,48 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNodes, targetNode, moveType, isCopy)</span><span class="path">setting.callback.</span>onDrop</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the drop event when drag-drop node.</p>
+ <p class="highlight_red">If you set 'setting.callback.beforeDrop',and return false, zTree will restore the dragged nodes, and will not trigger the 'onDrop' callback.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event Object</span></h4>
+ <p>event Object</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, the tree is what the targetNode is belong to, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
+ <p>A collection of the nodes which has been dragged</p>
+ <p class="highlight_red">The treeNodes are the data of the nodes which be dragged, when move nodes.</p>
+ <p class="highlight_red">The treeNodes are the clone data of the nodes which be dragged, when copy nodes.</p>
+ <h4 class="topLine"><b>targetNode</b><span>JSON</span></h4>
+ <p>JSON data object of the target node which treeNodes are drag-dropped.</p>
+ <p class="highlight_red">If the treeNodes will be root node, the targetNode = null</p>
+ <h4 class="topLine"><b>moveType</b><span>String</span></h4>
+ <p>the relative position of move to the target node</p>
+ <p class="highlight_red">"inner": will be child of targetNode</p>
+ <p class="highlight_red">"prev": will be sibling node, and be in front of targetNode</p>
+ <p class="highlight_red">"next": will be sibling node, and be behind targetNode</p>
+ <p class="highlight_red">If moveType is null, means drag & drop is cancel.</p>
+ <h4 class="topLine"><b>isCopy</b><span>Boolean</span></h4>
+ <p>the flag used to judge copy node or move node</p>
+ <p class="highlight_red">true: copy node; false: move node</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. When drag-drop nodes complete, alert the number of dragged nodes and info about targetNode.</h4>
+ <pre xmlns=""><code>function zTreeOnDrop(event, treeId, treeNodes, targetNode, moveType) {
+ alert(treeNodes.length + "," + (targetNode ? (targetNode.tId + ", " + targetNode.name) : "isRoot" ));
+};
+var setting = {
+ callback: {
+ onDrop: zTreeOnDrop
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onExpand.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onExpand.html
new file mode 100644
index 0000000..7b9d8d5
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onExpand.html
@@ -0,0 +1,34 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onExpand</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the event when expand node.</p>
+ <p class="highlight_red">If you set 'setting.callback.beforeExpand',and return false, zTree will not expand node, and will not trigger the 'onExpand' callback.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event Object</span></h4>
+ <p>event Object</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which will be expanded</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. When expand node, alert info about 'tId' and 'name'.</h4>
+ <pre xmlns=""><code>function zTreeOnExpand(event, treeId, treeNode) {
+ alert(treeNode.tId + ", " + treeNode.name);
+};
+var setting = {
+ callback: {
+ onExpand: zTreeOnExpand
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onMouseDown.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onMouseDown.html
new file mode 100644
index 0000000..bfd714c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onMouseDown.html
@@ -0,0 +1,35 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onMouseDown</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the event when mouse down.</p>
+ <p class="highlight_red">If you set 'setting.callback.beforeMouseDown',and return false, zTree will not trigger the 'onMouseDown' callback.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event Object</span></h4>
+ <p>event Object</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which mouse over</p>
+ <p class="highlight_red">If the DOM which mouse over isn't a node, it will return null.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. When mouse down, alert info about 'tId' and 'name'.</h4>
+ <pre xmlns=""><code>function zTreeOnMouseDown(event, treeId, treeNode) {
+ alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
+};
+var setting = {
+ callback: {
+ onMouseDown: zTreeOnMouseDown
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onMouseUp.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onMouseUp.html
new file mode 100644
index 0000000..93edf31
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onMouseUp.html
@@ -0,0 +1,35 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onMouseUp</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the event when mouse up.</p>
+ <p class="highlight_red">If you set 'setting.callback.beforeMouseUp',and return false, zTree will not trigger the 'onMouseUp' callback.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event Object</span></h4>
+ <p>event Object</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which mouse over</p>
+ <p class="highlight_red">If the DOM which mouse over isn't a node, it will return null.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. When mouse up, alert info about 'tId' and 'name'.</h4>
+ <pre xmlns=""><code>function zTreeOnMouseUp(event, treeId, treeNode) {
+ alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
+};
+var setting = {
+ callback: {
+ onMouseUp: zTreeOnMouseUp
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onNodeCreated.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onNodeCreated.html
new file mode 100644
index 0000000..a98b572
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onNodeCreated.html
@@ -0,0 +1,35 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onNodeCreated</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the event when node's DOM is created.</p>
+ <p class="highlight_red">Because v3.x uses lazy loading technology, so the nodes which doesn't create DOM when initialized will not trigger this callback, until its parent node is expanded.</p>
+ <p class="highlight_red">Large amount of data to load, please note: do not set onNodeCreated, can improve performance as when initialized.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event Object</span></h4>
+ <p>event Object</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which DOM is created</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. When node's DOM is created, alert info about 'tId' and 'name'.</h4>
+ <pre xmlns=""><code>function zTreeOnNodeCreated(event, treeId, treeNode) {
+ alert(treeNode.tId + ", " + treeNode.name);
+};
+var setting = {
+ callback: {
+ onNodeCreated: zTreeOnNodeCreated
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onRemove.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onRemove.html
new file mode 100644
index 0000000..ce29413
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onRemove.html
@@ -0,0 +1,34 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onRemove</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the event when remove node.</p>
+ <p class="highlight_red">If you set 'setting.callback.beforeRemove',and return false, zTree will not remove node, and will not trigger the 'onRemove' callback.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event Object</span></h4>
+ <p>event Object</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which was removed.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. When remove node, alert info about 'tId' and 'name'.</h4>
+ <pre xmlns=""><code>function zTreeOnRemove(event, treeId, treeNode) {
+ alert(treeNode.tId + ", " + treeNode.name);
+}
+var setting = {
+ callback: {
+ onRemove: zTreeOnRemove
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onRename.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onRename.html
new file mode 100644
index 0000000..cd47eae
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onRename.html
@@ -0,0 +1,40 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode, isCancel)</span><span class="path">setting.callback.</span>onRename</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the event when remove node.</p>
+ <p class="highlight_red">1. If you set 'setting.callback.beforeRename',and return false, zTree will keep the editing name, and will not trigger the 'onRename' callback.</p>
+ <p class="highlight_red">2. If you modity treeNode data, and use 'updateNode' function, zTree will not trigger the 'onRename' callback.</p>
+ <p class="highlight_red">3. From v3.5.13, zTree will trigger this callback when user cancel edit name. please see 'isCancel' parameter.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event Object</span></h4>
+ <p>event Object</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which was rename.</p>
+ <h4 class="topLine"><b>isCancel</b><span>Boolean</span></h4>
+ <p>the status about cancel edit name (v3.5.13+)</p>
+ <p class="highlight_red">isCancel = true means: user cancel edit name. (press ESC or use cancelEditName() function)</p>
+ <p class="highlight_red">isCancel = false means: user submit edit name.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. When rename node, alert info about 'tId' and 'name'.</h4>
+ <pre xmlns=""><code>function zTreeOnRename(event, treeId, treeNode, isCancel) {
+ alert(treeNode.tId + ", " + treeNode.name);
+}
+var setting = {
+ callback: {
+ onRename: zTreeOnRename
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onRightClick.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onRightClick.html
new file mode 100644
index 0000000..86b4b01
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.callback.onRightClick.html
@@ -0,0 +1,36 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onRightClick</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to capture the event when mouse right click node.</p>
+ <p class="highlight_red">If you set 'setting.callback.beforeRightClick',and return false, zTree will not trigger the 'onRightClick' callback.</p>
+ <p class="highlight_red">If you set 'setting.callback.onRightClick', zTree will shield the browser context menu when mouse right click on zTree.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>event</b><span>js event Object</span></h4>
+ <p>event Object</p>
+ <h4 class="topLine"><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which is mouse right clicked</p>
+ <p class="highlight_red">If the DOM which mouse right clicked isn't a node, it will return null.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. When mouse right click node, alert info about 'tId' and 'name'.</h4>
+ <pre xmlns=""><code>function zTreeOnRightClick(event, treeId, treeNode) {
+ alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
+};
+var setting = {
+ callback: {
+ onRightClick: zTreeOnRightClick
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.check.autoCheckTrigger.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.check.autoCheckTrigger.html
new file mode 100644
index 0000000..b8b04cc
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.check.autoCheckTrigger.html
@@ -0,0 +1,29 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.check.</span>autoCheckTrigger</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>When node is automatically checked or unchecked, this parameter used to set to trigger 'beforeCheck / onCheck' callback. It is valid when <span class="highlight_red">[setting.check.enable = true & setting.check.chkStyle = "checkbox"]</span></p>
+ <p class="highlight_red">1. If you set 'setting.check.chkboxType' to { "Y": "", "N": "" }, will not automatically checked or unchecked.</p>
+ <p class="highlight_red">2. If you turn on the trigger and there are many more nodes, will affect the performance, because the check or uncheck node can cause many nodes to be automatically checked or unchecked, it will trigger a lot of callbacks, according to the need to decide whether to use this feature.</p>
+ <p>Default: false</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: trigger callback</p>
+ <p> false means: don't trigger callback</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. When node is automatically checked or unchecked, zTree trigger 'beforeCheck / onCheck' callback.</h4>
+ <pre xmlns=""><code>var setting = {
+ check: {
+ enable: true,
+ autoCheckTrigger: true
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.check.chkDisabledInherit.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.check.chkDisabledInherit.html
new file mode 100644
index 0000000..98d824e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.check.chkDisabledInherit.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.check.</span>chkDisabledInherit</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>When the parent node's 'chkDisabled' attribute is true, set the child nodes automatically inherit the 'chkDisabled' attribute. It is valid when <span class="highlight_red">[setting.check.enable = true]</span></p>
+ <p class="highlight_red">1. Only be used to initialize the nodes, easy batch operations. Please use the 'updateNode' method modify existing node.</p>
+ <p>Default: false</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: When add new child nodes, if parent node's 'chkDisabled' attribute is true, the child nodes automatically inherit the 'chkDisabled' attribute.</p>
+ <p> false means: When add new child nodes, the child nodes don't inherit the 'chkDisabled' attribute from parent node.</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. When add new child nodes, the child nodes automatically inherit the 'chkDisabled' attribute from parent node.</h4>
+ <pre xmlns=""><code>var setting = {
+ check: {
+ enable: true,
+ chkDisabledInherit: true
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.check.chkStyle.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.check.chkStyle.html
new file mode 100644
index 0000000..d42e757
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.check.chkStyle.html
@@ -0,0 +1,48 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.check.</span>chkStyle</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Use the checkbox or radio. It is valid when <span class="highlight_red">[setting.check.enable = true]</span></p>
+ <p>Default: "checkbox"</p>
+ </div>
+ </div>
+ <h3>String Format</h3>
+ <div class="desc">
+ <p>When chkStyle = "checkbox", zTree show checkbox, and '<span class="highlight_red">setting.check.chkboxType</span>' attribute is valid.
+<br/>When chkStyle = "radio", zTree show radio, and '<span class="highlight_red">setting.check.radioType</span>' attribute is valid.</p>
+ <p class="highlight_red">Please note that letter case, do not change.</p>
+ </div>
+ <h3>checkbox States Descriptions</h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p><button type="button" class="chk checkbox_false_full"></button>not checked; <span class="highlight_red">If node is parent, so its child nodes have been not checked.</span> when mouse over: <button type="button" class="chk checkbox_false_full_focus"></button></p>
+ <p><button type="button" class="chk checkbox_false_part"></button>not checked; (only parent node) <span class="highlight_red">some of its child nodes have been checked.</span> when mouse over: <button type="button" class="chk checkbox_false_part_focus"></button></p>
+ <p><button type="button" class="chk checkbox_true_full"></button>be checked; <span class="highlight_red">If node is parent, so its all child nodes have been checked.</span> when mouse over: <button type="button" class="chk checkbox_true_full_focus"></button></p>
+ <p><button type="button" class="chk checkbox_true_part"></button>be checked; (only parent node) <span class="highlight_red">some of its child nodes or all have been not checked.</span> when mouse over: <button type="button" class="chk checkbox_true_part_focus"></button></p>
+ </div>
+ </div>
+ <h3>radio States Descriptions</h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p><button type="button" class="chk radio_false_full"></button>not checked; <span class="highlight_red">If node is parent, so its child have been not checked.</span> when mouse over: <button type="button" class="chk radio_false_full_focus"></button></p>
+ <p><button type="button" class="chk radio_false_part"></button>not checked; (only parent node) <span class="highlight_red">some of its child have been checked.</span> when mouse over: <button type="button" class="chk radio_false_part_focus"></button></p>
+ <p><button type="button" class="chk radio_true_full"></button>be checked; <span class="highlight_red">If node is parent, so its child have been not checked.</span> when mouse over: <button type="button" class="chk radio_true_full_focus"></button></p>
+ <p><button type="button" class="chk radio_true_part"></button>be checked; (only parent node) <span class="highlight_red">some of its child have been checked.</span> when mouse over: <button type="button" class="chk radio_true_part_focus"></button></p>
+ </div>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. use radio</h4>
+ <pre xmlns=""><code>var setting = {
+ check: {
+ enable: true,
+ chkStyle: "radio"
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.check.chkboxType.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.check.chkboxType.html
new file mode 100644
index 0000000..5cecc9e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.check.chkboxType.html
@@ -0,0 +1,31 @@
+<div class="apiDetail">
+<div>
+ <h2><span>JSON</span><span class="path">setting.check.</span>chkboxType</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>When one node is checked or unchecked, control its parent node and its child node auto checked or unchecked. It is valid when <span class="highlight_red">[setting.check.enable = true &amp; setting.check.chkStyle = "checkbox"]</span></p>
+ <p>Default: { "Y": "ps", "N": "ps" }</p>
+ </div>
+ </div>
+ <h3>JSON Format</h3>
+ <div class="desc">
+ <p>"Y" attribute use to set auto check after checkbox was checked.
+<br/>"N" attribute use to set auto uncheck after checkbox was unchecked.
+<br/>If value has "p", so parent nodes will be checked or unchecked.
+<br/>If value has "s", so child nodes will be checked or unchecked.</p>
+ <p class="highlight_red">Please note that letter case, do not change.</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. If check the node, so only auto check parent nodes; If uncheck the node, so only auto uncheck child nodes;</h4>
+ <pre xmlns=""><code>var setting = {
+ check: {
+ enable: true,
+ chkStyle: "checkbox",
+ chkboxType: { "Y": "p", "N": "s" }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.check.enable.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.check.enable.html
new file mode 100644
index 0000000..0236b5f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.check.enable.html
@@ -0,0 +1,26 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.check.</span>enable</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Set to use checkbox or radio in zTree</p>
+ <p>Default: false</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: use the checkbox or radio</p>
+ <p> false means: don't use the checkbox or radio</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. use the checkbox</h4>
+ <pre xmlns=""><code>var setting = {
+ check: {
+ enable: true
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.check.nocheckInherit.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.check.nocheckInherit.html
new file mode 100644
index 0000000..758b437
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.check.nocheckInherit.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.check.</span>nocheckInherit</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>When the parent node's 'nocheck' attribute is true, set the child nodes automatically inherit the 'nocheck' attribute. It is valid when <span class="highlight_red">[setting.check.enable = true]</span></p>
+ <p class="highlight_red">1. Only be used to initialize the nodes, easy batch operations. Please use the 'updateNode' method modify existing node.</p>
+ <p>Default: false</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: When add new child nodes, if parent node's 'nocheck' attribute is true, the child nodes automatically inherit the 'nocheck' attribute.</p>
+ <p> false means: When add new child nodes, the child nodes don't inherit the 'nocheck' attribute from parent node.</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. When add new child nodes, the child nodes automatically inherit the 'nocheck' attribute from parent node.</h4>
+ <pre xmlns=""><code>var setting = {
+ check: {
+ enable: true,
+ nocheckInherit: true
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.check.radioType.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.check.radioType.html
new file mode 100644
index 0000000..be867d7
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.check.radioType.html
@@ -0,0 +1,29 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.check.</span>radioType</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The group about radio. It is valid when <span class="highlight_red">[setting.check.enable = true &amp; setting.check.chkStyle = "radio"]</span></p>
+ <p>Default: "level"</p>
+ </div>
+ </div>
+ <h3>String Format</h3>
+ <div class="desc">
+ <p>When radioType = "level", will be grouped with same level nodes which have the same parent node.
+<br/>When radioType = "all", will be grouped with all nodes.</p>
+ <p class="highlight_red">Please note that letter case, do not change.</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. Set the group about radio is all nodes.</h4>
+ <pre xmlns=""><code>var setting = {
+ check: {
+ enable: true,
+ chkStyle: "radio",
+ radioType: "all"
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.keep.leaf.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.keep.leaf.html
new file mode 100644
index 0000000..71c573e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.keep.leaf.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.data.keep.</span>leaf</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The leaf node's lock, the leaf node will lock the 'isParent' attribute to false.</p>
+ <p>Default: false</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: lock the leaf node, and <span class="highlight_red">the node which 'isParent' attribute is false can't add child nodes</span>.</p>
+ <p> false means: don't lock the leaf node, and <span class="highlight_red">the node which 'isParent' attribute is false can add child nodes</span>.</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. lock the leaf node</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ keep: {
+ leaf: true
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.keep.parent.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.keep.parent.html
new file mode 100644
index 0000000..5bab2f1
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.keep.parent.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.data.keep.</span>parent</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The parent node's lock, the parent node will lock 'isParent' attribute to true.</p>
+ <p>Default: false</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: lock the parent node, and <span class="highlight_red">if remove all of the parent node's child nodes, its 'isParent' attribute still keep to be true.</span>.</p>
+ <p> false means: don't lock the parent node, and <span class="highlight_red">if remove all of the parent node's child nodes, its 'isParent' attribute will change to be false.</span>.</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. lock the parent node</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ keep: {
+ parent: true
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.key.checked.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.key.checked.html
new file mode 100644
index 0000000..2678cf2
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.key.checked.html
@@ -0,0 +1,24 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.data.key.</span>checked</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The node data's attribute to save the checked state.</p>
+ <p>Default: "checked"</p>
+ <p class="highlight_red">Please don't set the other node attribute which zTree used. (e.g., checkedOld)</p>
+ </div>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. set the 'isChecked' attribute to save the checked state.</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ key: {
+ checked: "isChecked"
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.key.children.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.key.children.html
new file mode 100644
index 0000000..321a1a7
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.key.children.html
@@ -0,0 +1,23 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.data.key.</span>children</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The node data's attribute to save the child nodes.</p>
+ <p>Default: "children"</p>
+ </div>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. Set the 'nodes' attribute to save the child nodes.</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ key: {
+ children: "nodes"
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.key.name.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.key.name.html
new file mode 100644
index 0000000..0208c55
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.key.name.html
@@ -0,0 +1,23 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.data.key.</span>name</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The node data's attribute to save the node name.</p>
+ <p>Default: "name"</p>
+ </div>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. Set the 'ename' attribute to save the node name.</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ key: {
+ name: "ename"
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.key.title.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.key.title.html
new file mode 100644
index 0000000..96540eb
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.key.title.html
@@ -0,0 +1,24 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.data.key.</span>title</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The node data's attribute to save the 'title' attribute of node DOM. It is valid when <span class="highlight_red">[setting.view.showTitle = true]</span></p>
+ <p class="highlight_red">If set it to "", the title of node DOM will be same as 'setting.data.key.name' attribute.</p>
+ <p>Default: ""</p>
+ </div>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. Set the 'fullName' attribute to save the title of node DOM.</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ key: {
+ title: "fullName"
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.key.url.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.key.url.html
new file mode 100644
index 0000000..e9a08ce
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.key.url.html
@@ -0,0 +1,24 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.data.key.</span>url</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The node data's attribute to save the node link's url.</p>
+ <p class="highlight_red">Special: If the nodes's data can only use the 'url' attribute, and don't use the link to jump feature, you can modify this attribute to any nonexistent attribute.</p>
+ <p>Default: "url"</p>
+ </div>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. Set the 'xUrl' attribute to save the node link's url.</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ key: {
+ url: "xUrl"
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.simpleData.enable.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.simpleData.enable.html
new file mode 100644
index 0000000..7ea21db
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.simpleData.enable.html
@@ -0,0 +1,39 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.data.simpleData.</span>enable</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Set zTree's node to accept the simple data format, when zTree is initialized or when ajax get / or when use <span class="highlight_red">addNodes</span> method.</p>
+ <p>Don't have to generate the complex nested data.</p>
+ <p>Default: false</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: zTree's node accept the simple data format.</p>
+ <p> false means: zTree's node only accept the nested data format.</p>
+ <p class="highlight_red">If set it is true, you must set the other attributes in 'setting.data.simpleData'. (e.g., idKey, pIdKey, rootPId) And let the data satisfy the parent-child relationship.</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. use the simple data format</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ simpleData: {
+ enable: true,
+ idKey: "id",
+ pIdKey: "pId",
+ rootPId: 0,
+ }
+ }
+};
+var treeNodes = [
+ {"id":1, "pId":0, "name":"test1"},
+ {"id":11, "pId":1, "name":"test11"},
+ {"id":12, "pId":1, "name":"test12"},
+ {"id":111, "pId":11, "name":"test111"}
+];
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.simpleData.idKey.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.simpleData.idKey.html
new file mode 100644
index 0000000..43df260
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.simpleData.idKey.html
@@ -0,0 +1,32 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.data.simpleData.</span>idKey</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The node data's attribute to save node data's unique identifier. It is valid when <span class="highlight_red">[setting.data.simpleData.enable = true]</span></p>
+ <p>Default: "id"</p>
+ </div>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. use the simple data format</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ simpleData: {
+ enable: true,
+ idKey: "id",
+ pIdKey: "pId",
+ rootPId: 0,
+ }
+ }
+};
+var treeNodes = [
+ {"id":1, "pId":0, "name":"test1"},
+ {"id":11, "pId":1, "name":"test11"},
+ {"id":12, "pId":1, "name":"test12"},
+ {"id":111, "pId":11, "name":"test111"}
+];
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.simpleData.pIdKey.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.simpleData.pIdKey.html
new file mode 100644
index 0000000..8378c6e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.simpleData.pIdKey.html
@@ -0,0 +1,32 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.data.simpleData.</span>pIdKey</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The node data's attribute to save its parent node data's unique identifier. It is valid when <span class="highlight_red">[setting.data.simpleData.enable = true]</span></p>
+ <p>Default: "pId"</p>
+ </div>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. use the simple data format</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ simpleData: {
+ enable: true,
+ idKey: "id",
+ pIdKey: "pId",
+ rootPId: 0
+ }
+ }
+};
+var treeNodes = [
+ {"id":1, "pId":0, "name":"test1"},
+ {"id":11, "pId":1, "name":"test11"},
+ {"id":12, "pId":1, "name":"test12"},
+ {"id":111, "pId":11, "name":"test111"}
+];
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.simpleData.rootPId.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.simpleData.rootPId.html
new file mode 100644
index 0000000..61c9bbd
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.data.simpleData.rootPId.html
@@ -0,0 +1,32 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String / Number</span><span class="path">setting.data.simpleData.</span>rootPId</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Set the default value of root's 'pIdKey' specified attribute values​​. It is valid when <span class="highlight_red">[setting.data.simpleData.enable = true]</span></p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. use the simple data format</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ simpleData: {
+ enable: true,
+ idKey: "id",
+ pIdKey: "pId",
+ rootPId: 0
+ }
+ }
+};
+var treeNodes = [
+ {"id":1, "pId":0, "name":"test1"},
+ {"id":11, "pId":1, "name":"test11"},
+ {"id":12, "pId":1, "name":"test12"},
+ {"id":111, "pId":11, "name":"test111"}
+];
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.autoExpandTrigger.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.autoExpandTrigger.html
new file mode 100644
index 0000000..804ee66
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.autoExpandTrigger.html
@@ -0,0 +1,29 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.edit.drag.</span>autoExpandTrigger</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>When drag node cause the parent node is automatically expanded, set whether to allow to trigger the 'onExpand' callback. It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
+ <p>Default: false</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: trigger the 'onExpand' callback.</p>
+ <p> false means: don't trigger the 'onExpand' callback.</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. Set to allow to trigger the 'onExpand' callback</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ autoExpandTrigger: true
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.autoOpenTime.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.autoOpenTime.html
new file mode 100644
index 0000000..74982af
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.autoOpenTime.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Number</span><span class="path">setting.edit.drag.</span>autoOpenTime</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Drag to the parent node, the parent node auto expand time interval. (Unit: ms) It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
+ <p>Default: 500</p>
+ <p class="highlight_red">Please adjust the value according to needs.</p>
+ </div>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. When drag node to other parent node, expand it at once.</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ autoOpenTime: 0
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.borderMax.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.borderMax.html
new file mode 100644
index 0000000..edbb752
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.borderMax.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Number</span><span class="path">setting.edit.drag.</span>borderMax</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>When drag a node to root, the zTree's inner border width. (Unit: px) It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
+ <p>Default: 10</p>
+ <p class="highlight_red">Please adjust the value according to needs.</p>
+ </div>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. adjust the inner border width is 20px</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ borderMax: 20
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.borderMin.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.borderMin.html
new file mode 100644
index 0000000..e845853
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.borderMin.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Number</span><span class="path">setting.edit.drag.</span>borderMin</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>When drag a node to root, the zTree's outer border width. (Unit: px) It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
+ <p>Default: -5</p>
+ <p class="highlight_red">Please adjust the value according to needs.</p>
+ </div>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. adjust the outer border width is 10px</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ borderMin: -10
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.inner.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.inner.html
new file mode 100644
index 0000000..1065df3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.inner.html
@@ -0,0 +1,60 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean / Function(treeId, treeNodes, targetNode)</span><span class="path">setting.edit.drag.</span>inner</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>When drag one node to the target node, set whether to allow the node to be the target node's child. It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
+ <p class="highlight_red">If the target node is root, so zTree will only trigger 'inner' and not trigger 'prev / next'.</p>
+ <p class="highlight_red">This function mainly for the appropriate limit drag and drop (auxiliary arrow), it requires a combination of 'prev, next' together, to achieve full functionality.</p>
+ <p>Default: true</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: allow the node to be the target node's child.</p>
+ <p> false means: don't allow the node to be the target node's child.</p>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
+ <p>A collection of the nodes which has been dragged</p>
+ <h4 class="topLine"><b>targetNode</b><span>JSON</span></h4>
+ <p>JSON data object of the target node which treeNodes are draged over.</p>
+ <p class="highlight_red">If the treeNodes will be root node, the targetNode = null</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>return true or false</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. disable to drag the node to the target node's inner.</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ prev: true,
+ next: true,
+ inner: false
+ }
+ }
+};
+......</code></pre>
+ <h4>2. disable to drag the node to be root node's child.</h4>
+ <pre xmlns=""><code>function canInner(treeId, nodes, targetNode) {
+ return !(targetNode && targetNode.level === 0);
+}
+var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ prev: true,
+ next: true,
+ inner: canInner
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.isCopy.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.isCopy.html
new file mode 100644
index 0000000..1207d2a
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.isCopy.html
@@ -0,0 +1,32 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.edit.drag.</span>isCopy</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>When drag-drop node, set whether to allow to copy node. It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
+ <p>Default: true</p>
+ </div>
+ </div>
+ <h3>Rules Description</h3>
+ <div class="desc">
+ <p>1. If isCopy = true and isMove = true, when drag-drop node, press Ctrl-Key or Cmd-key can copy node, don't press Ctrl-Key or Cmd-key can move node.</p>
+ <p>2. If isCopy = true and isMove = false, when drag-drop node, will copy node.</p>
+ <p>3. If isCopy = false and isMove = true, when drag-drop node, will move node.</p>
+ <p>4. If isCopy = false and isMove = false, so disable to drag-drop node.</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. all of the drag-drop operation will copy node.</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ isCopy: true,
+ isMove: false
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.isMove.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.isMove.html
new file mode 100644
index 0000000..e4a7ca3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.isMove.html
@@ -0,0 +1,32 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.edit.drag.</span>isMove</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>When drag-drop node, set whether to allow to move node. It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
+ <p>Default: true</p>
+ </div>
+ </div>
+ <h3>Rules Description</h3>
+ <div class="desc">
+ <p>1. If isCopy = true and isMove = true, when drag-drop node, press Ctrl-Key or Cmd-key can copy node, don't press Ctrl-Key or Cmd-key can move node.</p>
+ <p>2. If isCopy = true and isMove = false, when drag-drop node, will copy node.</p>
+ <p>3. If isCopy = false and isMove = true, when drag-drop node, will move node.</p>
+ <p>4. If isCopy = false and isMove = false, so disable to drag-drop node.</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. all of the drag-drop operation will move node.</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ isCopy: false,
+ isMove: true
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.maxShowNodeNum.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.maxShowNodeNum.html
new file mode 100644
index 0000000..dbc3ae4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.maxShowNodeNum.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Number</span><span class="path">setting.edit.drag.</span>maxShowNodeNum</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>When dragging more than one sibling node, the floating layer shows the maximum number of nodes. zTree using '...' instead of redundant nodes. It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
+ <p>Default: 5</p>
+ <p class="highlight_red">Please adjust the value according to needs.</p>
+ </div>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. Set the maximum number is 10</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ maxShowNodeNum: 10
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.minMoveSize.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.minMoveSize.html
new file mode 100644
index 0000000..8270a99
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.minMoveSize.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Number</span><span class="path">setting.edit.drag.</span>minMoveSize</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The minimum offset which used to determine the drag operator start. (Unit: px) It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
+ <p class="highlight_red">Please adjust the value according to needs. Note: If it is too small, will easily lead to misoperation when you click mouse.</p>
+ <p>Default: 5</p>
+ </div>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. Set the minimum offset is 10px.</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ minMoveSize: 10
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.next.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.next.html
new file mode 100644
index 0000000..82eb6fb
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.next.html
@@ -0,0 +1,59 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean / Function(treeId, treeNodes, targetNode)</span><span class="path">setting.edit.drag.</span>next</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>When drag one node to the target node, set whether to allow the node to be the target node's next sibling. It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
+ <p class="highlight_red">If the target node is root, so zTree will only trigger 'inner' and not trigger 'prev / next'.</p>
+ <p class="highlight_red">This function mainly for the appropriate limit drag and drop (auxiliary arrow), it requires a combination of 'prev, inner' together, to achieve full functionality.</p>
+ <p>Default: true</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: allow the node to be the target node's next sibling.</p>
+ <p> false means: don't allow the node to be the target node's next sibling.</p>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
+ <p>A collection of the nodes which has been dragged</p>
+ <h4 class="topLine"><b>targetNode</b><span>JSON</span></h4>
+ <p>JSON data object of the target node which treeNodes are draged over.</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>return true or false</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. disable to drag the node to the target node's next sibling.</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ prev: true,
+ next: false,
+ inner: true
+ }
+ }
+};
+......</code></pre>
+ <h4>2. disable to drag the node to be all of the parent nodes's next sibling.</h4>
+ <pre xmlns=""><code>function canNext(treeId, nodes, targetNode) {
+ return !targetNode.isParent;
+}
+var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ prev: true,
+ next: canNext,
+ inner: true
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.prev.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.prev.html
new file mode 100644
index 0000000..de6f0c8
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.drag.prev.html
@@ -0,0 +1,59 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean / Function(treeId, treeNodes, targetNode)</span><span class="path">setting.edit.drag.</span>prev</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>When drag one node to the target node, set whether to allow the node to be the target node's previous sibling. It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
+ <p class="highlight_red">If the target node is root, so zTree will only trigger 'inner' and not trigger 'prev / next'.</p>
+ <p class="highlight_red">This function mainly for the appropriate limit drag and drop (auxiliary arrow), it requires a combination of 'next, inner' together, to achieve full functionality.</p>
+ <p>Default: true</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: allow the node to be the target node's previous sibling.</p>
+ <p> false means: don't allow the node to be the target node's previous sibling.</p>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
+ <p>A collection of the nodes which has been dragged</p>
+ <h4 class="topLine"><b>targetNode</b><span>JSON</span></h4>
+ <p>JSON data object of the target node which treeNodes are draged over.</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>return true or false</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. disable to drag the node to the target node's previous sibling.</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ prev: false,
+ next: true,
+ inner: true
+ }
+ }
+};
+......</code></pre>
+ <h4>2. disable to drag the node to be all of the parent nodes's previous sibling.</h4>
+ <pre xmlns=""><code>function canPrev(treeId, nodes, targetNode) {
+ return !targetNode.isParent;
+}
+var setting = {
+ edit: {
+ enable: true,
+ drag: {
+ prev: canPrev,
+ next: true,
+ inner: true
+ }
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.editNameSelectAll.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.editNameSelectAll.html
new file mode 100644
index 0000000..a030359
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.editNameSelectAll.html
@@ -0,0 +1,27 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.edit.</span>editNameSelectAll</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>When edit node's name, the text in input is selected or unselected. It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
+ <p>Default: false</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: when show the input, the text in input is selected</p>
+ <p> false means: when show the input, the text in input is not selected</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. When edit node's name, the text in input is selected.</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ editNameSelectAll: true
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.enable.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.enable.html
new file mode 100644
index 0000000..ec9d2b3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.enable.html
@@ -0,0 +1,39 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.edit.</span>enable</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Set zTree is in edit mode</p>
+ <p class="highlight_red">Please set this attribute before zTree initialization. If you need to change the edit mode after the initialization, please use zTreeObj.setEditable() method.</p>
+ <p>Default: false</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: zTree is in edit mode.</p>
+ <p> false means: zTree is not in edit mode.</p>
+ </div>
+ <h3>Editing Rules Description</h3>
+ <div class="desc">
+ <p>1. When click the node, it will not open '<span class="highlight_red">node.url</span>' specified URL.
+<br/>2. Support for dynamic tree editing.
+<br/>3. You can drag-drop nodes, and support drag-drop nodes between multiple trees.
+<br/>4. Support use drag-drop to copy or move the node. (Reference: <span class="highlight_red">setting.edit.drag.isCopy / setting.edit.drag.isMove</span>)
+<br/>5. You can use the Edit button to modify the name attribute.
+<br/>6. You can use the Remove button to remove the node.
+<br/>
+ </p>
+ <p class="highlight_red">Please note that letter case, do not change.</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. edit the tree</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.removeTitle.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.removeTitle.html
new file mode 100644
index 0000000..e217527
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.removeTitle.html
@@ -0,0 +1,48 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String / Function(treeId, treeNode)</span><span class="path">setting.edit.</span>removeTitle</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>the title of the remove button DOM. It is valid when <span class="highlight_red">[setting.edit.enable = true & setting.edit.showRemoveBtn = true]</span></p>
+ <p>Default: "remove"</p>
+ </div>
+ </div>
+ <h3>String Format</h3>
+ <div class="desc">
+ <p>When the mouse over the remove button, the browser auto pop-up message content.</p>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which show the remove button</p>
+ <h4 class="topLine"><b>Return </b><span>String</span></h4>
+ <p>Return value is same as 'String Format'</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. Set title is 'remove the node' about all the remove button</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ showRemoveBtn: true,
+ removeTitle: "remove the node"
+ }
+};
+......</code></pre>
+ <h4>2. Set title is 'remove the parent node' about the parent node, and is 'remove the leaf node' about the leaf node</h4>
+ <pre xmlns=""><code>function setRemoveTitle(treeId, treeNode) {
+ return treeNode.isParent ? "remove the parent node":"remove the leaf node";
+}
+var setting = {
+ edit: {
+ enable: true,
+ showRemoveBtn: true,
+ removeTitle: setRemoveTitle
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.renameTitle.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.renameTitle.html
new file mode 100644
index 0000000..b8ce5a6
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.renameTitle.html
@@ -0,0 +1,48 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String / Function(treeId, treeNode)</span><span class="path">setting.edit.</span>renameTitle</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>the title of the rename button DOM. It is valid when <span class="highlight_red">[setting.edit.enable = true & setting.edit.showRenameBtn = true]</span></p>
+ <p>Default: "rename"</p>
+ </div>
+ </div>
+ <h3>String Format</h3>
+ <div class="desc">
+ <p>When the mouse over the rename button, the browser auto pop-up message content.</p>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which show the rename button</p>
+ <h4 class="topLine"><b>Return </b><span>String</span></h4>
+ <p>return value is same as 'String Format'</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. Set title is 'rename the node' about all the rename button</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ showRenameBtn: true,
+ renameTitle: "rename the node"
+ }
+};
+......</code></pre>
+ <h4>2. Set title is 'rename the parent node' about the parent node, and is 'rename the leaf node' about the leaf node</h4>
+ <pre xmlns=""><code>function setRenameTitle(treeId, treeNode) {
+ return treeNode.isParent ? "rename the parent node":"rename the leaf node";
+}
+var setting = {
+ edit: {
+ enable: true,
+ showRenameBtn: true,
+ renameTitle: setRenameTitle
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.showRemoveBtn.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.showRemoveBtn.html
new file mode 100644
index 0000000..f0f1fe1
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.showRemoveBtn.html
@@ -0,0 +1,50 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean / Function(treeId, treeNode)</span><span class="path">setting.edit.</span>showRemoveBtn</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Set to show or hide the remove button. It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
+ <p>When you click the remove button:</p>
+ <p>1. zTree will trigger the <span class="highlight_red">setting.callback.beforeRemove</span> callback, and you can decide whether to allow delete.</p>
+ <p>2. If you don't set the 'beforeRemove' or the 'beforeRemove' callback return true, so zTree will trigger the <span class="highlight_red">setting.callback.onRemove</span> callback after remove the node.</p>
+ <p>Default: true</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: show the remove button</p>
+ <p> false means: hide the remove button</p>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which show the remove button</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>Return value is same as 'Boolean Format'</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. Hide the remove button</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ showRemoveBtn: false
+ }
+};
+......</code></pre>
+ <h4>2. Hide the remove button of parent node</h4>
+ <pre xmlns=""><code>function setRemoveBtn(treeId, treeNode) {
+ return !treeNode.isParent;
+}
+var setting = {
+ edit: {
+ enable: true,
+ showRemoveBtn: setRemoveBtn
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.showRenameBtn.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.showRenameBtn.html
new file mode 100644
index 0000000..4fe2f58
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.edit.showRenameBtn.html
@@ -0,0 +1,52 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean / Function(treeId, treeNode)</span><span class="path">setting.edit.</span>showRenameBtn</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Set to show or hide the rename button. It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
+ <p>When you click the rename button:</p>
+ <p>1. Click the rename button, you can rename the node.</p>
+ <p>2. After rename operation (the input DOM blur or press the Enter Key), zTree will trigger the <span class="highlight_red">setting.callback.beforeRename</span> callback, and you can decide whether to allow rename.</p>
+ <p>3. If the 'beforeRename' callback return false, so zTree will keep the edit status. (Press the ESC key, can be restored to the original state.</p>
+ <p>4. If you don't set the 'beforeRename' or the 'beforeRename' callback return true, so zTree will trigger the <span class="highlight_red">setting.callback.onRename</span> callback after rename the node.</p>
+ <p>Default: true</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: show the rename button</p>
+ <p> false means: hide the rename button</p>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which show the rename button</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>Return value is same as 'Boolean Format'</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. Hide the rename button</h4>
+ <pre xmlns=""><code>var setting = {
+ edit: {
+ enable: true,
+ showRenameBtn: false
+ }
+};
+......</code></pre>
+ <h4>2. Hide the rename button of parent node</h4>
+ <pre xmlns=""><code>function setRenameBtn(treeId, treeNode) {
+ return !treeNode.isParent;
+}
+var setting = {
+ edit: {
+ enable: true,
+ showRenameBtn: setRenameBtn
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.treeId.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.treeId.html
new file mode 100644
index 0000000..e4b04b3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.treeId.html
@@ -0,0 +1,14 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">setting.</span>treeId</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>zTree unique identifier. After the initialization, it equals to the id attribute value of the user-defined zTree container.</p>
+ <p class="highlight_red">Do not initialize or modify it, it is an internal argument.</p>
+ </div>
+ </div>
+
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.treeObj.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.treeObj.html
new file mode 100644
index 0000000..30eb66c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.treeObj.html
@@ -0,0 +1,14 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Object</span><span class="path">setting.</span>treeObj</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>zTree DOM's jQuery object, the main function: easy to internal operations.</p>
+ <p class="highlight_red">Do not initialize or modify it, it is an internal argument.</p>
+ </div>
+ </div>
+
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.addDiyDom.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.addDiyDom.html
new file mode 100644
index 0000000..fa22bef
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.addDiyDom.html
@@ -0,0 +1,40 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.view.</span>addDiyDom</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>This function used to display the custom control on the node.</p>
+ <p class="highlight_red">1. If you have huge node data, please note: this function will affect the initialization performance. If not required, it is recommended not to use this function.</p>
+ <p class="highlight_red">2. This function is an advanced application, please make sure that a better understanding of zTree before you use it.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which display the custom control.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. Display button in all nodes.</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ addDiyDom: addDiyDom
+ }
+};
+function addDiyDom(treeId, treeNode) {
+ var aObj = $("#" + treeNode.tId + "_a");
+ if ($("#diyBtn_"+treeNode.id).length>0) return;
+ var editStr = "&lt;span id='diyBtn_space_" +treeNode.id+ "' &gt; &lt;/span&gt;"
+ + "&lt;button type='button' class='diyBtn1' id='diyBtn_" + treeNode.id
+ + "' title='"+treeNode.name+"' onfocus='this.blur();'&gt;&lt;/button&gt;";
+ aObj.append(editStr);
+ var btn = $("#diyBtn_"+treeNode.id);
+ if (btn) btn.bind("click", function(){alert("diy Button for " + treeNode.name);});
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.addHoverDom.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.addHoverDom.html
new file mode 100644
index 0000000..1ea8b6d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.addHoverDom.html
@@ -0,0 +1,45 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.view.</span>addHoverDom</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to display custom control when mouse move over the node. (e.g. the rename and remove button)</p>
+ <p class="highlight_red">If you use this function, so must set <span class="highlight_red">setting.view.removeHoverDom</span>, please make sure that a better understanding of zTree before you use it.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which need to display the custom control.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. Display a button when mouse move over the node, and hide the button when mouse move out.</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ addHoverDom: addHoverDom,
+ removeHoverDom: removeHoverDom,
+ ......
+ }
+};
+function addHoverDom(treeId, treeNode) {
+ var aObj = $("#" + treeNode.tId + "_a");
+ if ($("#diyBtn_"+treeNode.id).length>0) return;
+ var editStr = "&lt;span id='diyBtn_space_" +treeNode.id+ "' &gt;&nbsp;&lt;/span&gt;"
+ + "&lt;button type='button' class='diyBtn1' id='diyBtn_" + treeNode.id
+ + "' title='"+treeNode.name+"' onfocus='this.blur();'&gt;&lt;/button&gt;";
+ aObj.append(editStr);
+ var btn = $("#diyBtn_"+treeNode.id);
+ if (btn) btn.bind("click", function(){alert("diy Button for " + treeNode.name);});
+};
+function removeHoverDom(treeId, treeNode) {
+ $("#diyBtn_"+treeNode.id).unbind().remove();
+ $("#diyBtn_space_" +treeNode.id).unbind().remove();
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.autoCancelSelected.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.autoCancelSelected.html
new file mode 100644
index 0000000..44ab90d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.autoCancelSelected.html
@@ -0,0 +1,27 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.view.</span>autoCancelSelected</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>When click the selected node while pressing the Ctrl-key or Cmd-key, allow to cancel selected the node.</p>
+ <p class="highlight_red">If you don't need this function, please set to false.</p>
+ <p>Default: true</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: press the Ctrl-key or Cmd-key, can cancel selected node.</p>
+ <p> false means: press the Ctrl-key or Cmd-key, can't cancel selected node.</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. Press the Ctrl-key or Cmd-key, can't cancel selected node.</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ autoCancelSelected: false
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.dblClickExpand.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.dblClickExpand.html
new file mode 100644
index 0000000..2517624
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.dblClickExpand.html
@@ -0,0 +1,45 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean / Function(treeId, treeNode)</span><span class="path">setting.view.</span>dblClickExpand</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>When double-click the parent node, 'dblClickExpand' is used to decide whether to expand the parent node.</p>
+ <p>Default: true</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: When double-click the parent node, zTree will expand the parent node.</p>
+ <p> false means: When double-click the parent node, zTree will not expand the parent node.</p>
+ </div>
+ <h3>Function Pamameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which be double-clicked.</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>Return value is same as 'Boolean Format'</p>
+ </div>
+ <h3>Example of setting</h3>
+ <h4>1. When double-click the parent node, zTree will not expand the parent node.</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ dblClickExpand: false
+ }
+};
+......</code></pre>
+ <h4>2. When double-click the parent node, zTree will expand the parent node which level>0.</h4>
+ <pre xmlns=""><code>function dblClickExpand(treeId, treeNode) {
+ return treeNode.level > 0;
+};
+var setting = {
+ view: {
+ dblClickExpand: dblClickExpand
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.expandSpeed.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.expandSpeed.html
new file mode 100644
index 0000000..1911e74
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.expandSpeed.html
@@ -0,0 +1,31 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String / Number</span><span class="path">setting.view.</span>expandSpeed</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The animation speed of expand or collapse node. As same as 'speed' parameter in jQuery</p>
+ <p class="highlight_red">In order to ensure zTree operating speed, if use the IE6, zTree will not use animation.</p>
+ <p>Default: "fast"</p>
+ </div>
+ </div>
+ <h3>String Format</h3>
+ <div class="desc">
+ <p>e.g. "slow", "normal", or "fast"</p>
+ <p class="highlight_red">If set to "", zTree will not use animation.</p>
+ </div>
+ <h3>Number Format</h3>
+ <div class="desc">
+ <p>How long the animation will run. [Unit: ms] (e.g. 1000)</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. Set the animation speed to slow</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ expandSpeed: "slow"
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.fontCss.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.fontCss.html
new file mode 100644
index 0000000..1ad5f51
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.fontCss.html
@@ -0,0 +1,42 @@
+<div class="apiDetail">
+<div>
+ <h2><span>JSON / Function(treeId, treeNode)</span><span class="path">setting.view.</span>fontCss</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Personalized text style, only applies to &lt;A&gt; object in the node DOM</p>
+ <p>Default: {}</p>
+ </div>
+ </div>
+ <h3>JSON Format</h3>
+ <div class="desc">
+ <p>As same as .css() method in jQuery. e.g. <span class="highlight_red">{color:"#ff0011", background:"blue"}</span></p>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which use the personalized text style</p>
+ <h4 class="topLine"><b>Return </b><span>JSON</span></h4>
+ <p>Return value is same as 'JSON Format'. e.g. <span class="highlight_red">{color:"#ff0011", background:"blue"}</span></p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. Don't modify css file, and set the node name's color to red</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ fontCss : {color:"red"}
+ }
+};</code></pre>
+ <h4>2. Don't modify css file, and set the root node name's color to red</h4>
+ <pre xmlns=""><code>function setFontCss(treeId, treeNode) {
+ return treeNode.level == 0 ? {color:"red"} : {};
+};
+var setting = {
+ view: {
+ fontCss: setFontCss
+ }
+};</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.nameIsHTML.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.nameIsHTML.html
new file mode 100644
index 0000000..4fe19ad
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.nameIsHTML.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.view.</span>nameIsHTML</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Set to use HTML in 'name' attribute.</p>
+ <p class="highlight_red">If allow HTML, please do check to avoid security issues, e.g. JavaScript Injection...</p>
+ <p>Default: false</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: 'name' attribute can be HTML.</p>
+ <p> false means: 'name' attribute is only TEXT.</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. Set to allow HTML</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ nameIsHTML: true
+ }
+};
+var node = {"name":"&lt;font color='red'&gt;test&lt;/font&gt;"};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.removeHoverDom.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.removeHoverDom.html
new file mode 100644
index 0000000..0c70aff
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.removeHoverDom.html
@@ -0,0 +1,45 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId, treeNode)</span><span class="path">setting.view.</span>removeHoverDom</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to hide custom control when mouse move out the node. (e.g. the rename and remove button)</p>
+ <p class="highlight_red">If you use this function, so must set <span class="highlight_red">setting.view.addHoverDom</span>, please make sure that a better understanding of zTree before you use it.</p>
+ <p>Default: null</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which need to hide the custom control.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. Display a button when mouse move over the node, and hide the button when mouse move out.</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ addHoverDom: addHoverDom,
+ removeHoverDom: removeHoverDom,
+ ......
+ }
+};
+function addHoverDom(treeId, treeNode) {
+ var aObj = $("#" + treeNode.tId + "_a");
+ if ($("#diyBtn_"+treeNode.id).length>0) return;
+ var editStr = "&lt;span id='diyBtn_space_" +treeNode.id+ "' &gt;&nbsp;&lt;/span&gt;"
+ + "&lt;button type='button' class='diyBtn1' id='diyBtn_" + treeNode.id
+ + "' title='"+treeNode.name+"' onfocus='this.blur();'&gt;&lt;/button&gt;";
+ aObj.append(editStr);
+ var btn = $("#diyBtn_"+treeNode.id);
+ if (btn) btn.bind("click", function(){alert("diy Button for " + treeNode.name);});
+};
+function removeHoverDom(treeId, treeNode) {
+ $("#diyBtn_"+treeNode.id).unbind().remove();
+ $("#diyBtn_space_" +treeNode.id).unbind().remove();
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.selectedMulti.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.selectedMulti.html
new file mode 100644
index 0000000..074fb68
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.selectedMulti.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.view.</span>selectedMulti</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Set whether to allow select multiple nodes.</p>
+ <p>Default: true</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true mean: you can select multiple nodes.</p>
+ <p> false mean: you can only select one node.</p>
+ <p class="highlight_red">1. Press Ctrl-key or Cmd-key, you can select multiple nodes.</p>
+ <p class="highlight_red">2ã€This attribute don't affect the feature of cancel select node. ( please see setting.view.autoCancelSelected )</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. Only select one node.</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ selectedMulti: false
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.showIcon.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.showIcon.html
new file mode 100644
index 0000000..9adf003
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.showIcon.html
@@ -0,0 +1,45 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean / Function(treeId, treeNode)</span><span class="path">setting.view.</span>showIcon</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Set to show or hide node icon.</p>
+ <p>Default: true</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: show node icon.</p>
+ <p> false means: hide node icon.</p>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which need to show icon.</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>Return value is same as 'Boolean Format'</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. Hide node icon</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ showIcon: false
+ }
+};
+......</code></pre>
+ <h4>2. Hide node icon which level=2</h4>
+ <pre xmlns=""><code>function showIconForTree(treeId, treeNode) {
+ return treeNode.level != 2;
+};
+var setting = {
+ view: {
+ showIcon: showIconForTree
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.showLine.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.showLine.html
new file mode 100644
index 0000000..a554014
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.showLine.html
@@ -0,0 +1,26 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.view.</span>showLine</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Set to show or hide line.</p>
+ <p>Default: true</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: show line.</p>
+ <p> false means: hide line.</p>
+ </div>
+ <h3>Examples of setting</h3>
+ <h4>1. Hide line</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ showLine: false
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.showTitle.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.showTitle.html
new file mode 100644
index 0000000..66bb26e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.showTitle.html
@@ -0,0 +1,47 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean / Function(treeId, treeNode)</span><span class="path">setting.view.</span>showTitle</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Set to show or hide the 'title' attribute of node DOM.</p>
+ <p class="highlight_red">Please see the <span class="highlight_red">setting.data.key.title</span> attribute</p>
+ <p>Default: true</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: show the 'title' attribute of node DOM.</p>
+ <p> false means: hide the 'title' attribute of node DOM.</p>
+ <p class="highlight_red">When setting.view.showTitle = true & setting.data.key.title = '', zTree will set the 'setting.data.key.name' attribute to the 'setting.data.key.title'.</p>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeId</b><span>String</span></h4>
+ <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which need to show title.</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>Return value is same as 'Boolean Format'</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. Hide the 'title' attribute of node DOM.</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ showTitle: false
+ }
+};
+......</code></pre>
+ <h4>2. Hide the 'title' attribute of node DOM which level=2.</h4>
+ <pre xmlns=""><code>function showTitleForTree(treeId, treeNode) {
+ return treeNode.level != 2;
+};
+var setting = {
+ view: {
+ showTitle: showTitleForTree
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.txtSelectedEnable.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.txtSelectedEnable.html
new file mode 100644
index 0000000..a380930
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.txtSelectedEnable.html
@@ -0,0 +1,26 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">setting.view.</span>txtSelectedEnable</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Set to allow or don't allow to select the text which in zTree's DOM.</p>
+ <p>Default: false</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: Allow to select the txt which in zTree's DOM.</p>
+ <p> false means: Don't allow to select the txt which in zTree's DOM.</p>
+ </div>
+ <h3>Examples of setting & function</h3>
+ <h4>1. Allow to select the txt which in zTree's DOM.</h4>
+ <pre xmlns=""><code>var setting = {
+ view: {
+ txtSelectedEnable: true
+ }
+};
+......</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.check_Child_State.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.check_Child_State.html
new file mode 100644
index 0000000..48efb79
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.check_Child_State.html
@@ -0,0 +1,43 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Number</span><span class="path">treeNode.</span>check_Child_State</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to record the node's half-checked state about its all child nodes's checkbox or radio. It is valid when <span class="highlight_red">[setting.check.enable = true]</span></p>
+ <p class="highlight_red">zTree v3.x provides treeNode.getCheckStatus () method to get an accurate the half-checked status.</p>
+ <p class="highlight_red">Do not initialize or modify it, it is an internal argument.</p>
+ <p>Default: true</p>
+ </div>
+ </div>
+ <h3>Number Format</h3>
+ <div class="desc">
+ <p>Rules:</p>
+ <table width="100%" border="0" cellspacing="1" cellpadding="0">
+ <thead>
+ <tr><td colspan="4">setting.check.checkType = "checkbox"</td></tr>
+ <tr><td>treeNode.check_Child_State</td><td>Checked Status Description</td></tr>
+ </thead>
+ <tbody>
+ <tr><td>-1</td><td>Has no child nodes or all child nodes's 'nocheck' attribute is true.</td></tr>
+ <tr><td>0</td><td>All of the child nodes has not been checked.</td></tr>
+ <tr><td>1</td><td>Some of the child nodes has been checked.</td></tr>
+ <tr><td>2</td><td>All of the child nodes has been checked.</td></tr>
+ </tbody>
+ </table>
+ <br/>
+ <table width="100%" border="0" cellspacing="1" cellpadding="0">
+ <thead>
+ <tr><td colspan="4">setting.check.checkType = "radio"</td></tr>
+ <tr><td>treeNode.check_Child_State</td><td>Checked Status Description</td></tr>
+ </thead>
+ <tbody>
+ <tr><td>-1</td><td>Has no child nodes or all child nodes's 'nocheck' attribute is true.</td></tr>
+ <tr><td>0</td><td>All of the child nodes has not been checked.</td></tr>
+ <tr><td>2</td><td>Some of the child nodes has been checked.</td></tr>
+ </tbody>
+ </table>
+ </div>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.check_Focus.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.check_Focus.html
new file mode 100644
index 0000000..77b7359
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.check_Focus.html
@@ -0,0 +1,19 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>check_Focus</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to record the status which the checkbox or radio get focus. It is valid when <span class="highlight_red">[setting.check.enable = true]</span></p>
+ <p class="highlight_red">Do not initialize or modify it, it is an internal argument.</p>
+ <p>Default: false</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p>true means: mouse move over the checkbox</p>
+ <p>false means: mouse move out the checkbox</p>
+ </div>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.checked.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.checked.html
new file mode 100644
index 0000000..8a55f3d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.checked.html
@@ -0,0 +1,32 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>checked</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The checked status about node's checkbox or radio. It is valid when <span class="highlight_red">[setting.check.enable = true & treeNode.nocheck = false]</span></p>
+ <p class="highlight_red">1. If change the 'checked' to other attribute, please set the 'setting.data.key.checked' attribute.</p>
+ <p class="highlight_red">2. If you create node data, and set 'checked' attribute to true, zTree will check this node's checkbox or radio when zTree is initialized.</p>
+ <p class="highlight_red">3. Use the treeObj.checkNode or checkAllNodes or updateNode method, you can check or uncheck the node. Please see the API about these methods.</p>
+ <p class="highlight_red">4. zTree support identification string 'true' & 'false'.</p>
+ <p>Default: false</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p>true means: check the checkbox or radio when zTree is initialized.</p>
+ <p>false means: uncheck the checkbox or radio when zTree is initialized.</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. check the checkbox when zTree is initialized</h4>
+ <pre xmlns=""><code>var nodes = [
+{ "id":1, "name":"test1", checked:true },
+{ "id":2, "name":"test2", checked:true }
+]</code></pre>
+ <h4>2. Get the checked status of the first root node</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var checked = treeObj.getNodes()[0].checked;
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.checkedOld.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.checkedOld.html
new file mode 100644
index 0000000..ee51626
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.checkedOld.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>checkedOld</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The checked status about node's checkbox or radio when zTree was initialized. It is valid when <span class="highlight_red">[setting.check.enable = true & treeNode.nocheck = false]</span></p>
+ <p class="highlight_red">1. Do not initialize it, it will be initialized when the node is initialized.</p>
+ <p class="highlight_red">2. If you need to achieve special features, you can use the zTreeObj.getChangeCheckedNodes method and modify the value of 'checkedOld' attribute.</p>
+ <p>Default: the value of 'checked' attribute when zTree is initialized</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p>true means: the checkbox or radio is checked when zTree is initialized.</p>
+ <p>false means: the checkbox or radio is not checked when zTree is initialized.</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Get the original checked status of the first root node</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var checkedOld = treeObj.getNodes()[0].checkedOld;
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.children.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.children.html
new file mode 100644
index 0000000..d765bb9
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.children.html
@@ -0,0 +1,35 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Array(JSON)</span><span class="path">treeNode.</span>children</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The data collections of node's child nodes.</p>
+ <p class="highlight_red">1. If change the 'children' to other attribute, please set the 'setting.data.key.children' attribute.</p>
+ <p class="highlight_red">2. If you set to use dynamic tree, when a node is expanded which 'isParent' attribute is true and which has no child nodes, zTree will use ajax to get its child nodes.</p>
+ <p>Default: undefined</p>
+ </div>
+ </div>
+ <h3>Array(JSON) Format</h3>
+ <div class="desc">
+ <p>Standard JSON Data object</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Use the standard JSON data object.</h4>
+ <pre xmlns=""><code>var nodes = [
+{ "id":1, "name":"test1",
+ children: [
+ { "id":3, "name":"test3"},
+ { "id":4, "name":"test4"},
+ { "id":5, "name":"test5"}
+ ]
+},
+{ "id":2, "name":"test2" }
+]</code></pre>
+ <h4>2. Get the first root node's child nodes</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodes()[0].children;
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.chkDisabled.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.chkDisabled.html
new file mode 100644
index 0000000..7a5fcf3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.chkDisabled.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>chkDisabled</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>1. Set node's checkbox / radio to disabled. It is valid when <span class="highlight_red">[setting.check.enable = true]</span></p>
+ <p class="highlight_red">2. zTree support identification string 'true' & 'false'.</p>
+ <p class="highlight_red">3. Please don't change this attribute of the nodes which have been created. If you want to disable or undisable the nodes, please use 'setChkDisabled()' methods.</p>
+ <p class="highlight_red">4. When zTree initialize the nodes, if you need to the child nodes automatically inherit the 'chkDisabled' attribute, please see 'setting.check.chkDisabledInherit'.</p>
+ <p>Default: false</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p class="highlight_red">true means: this node's checkbox / radio is disabled.</p>
+ <p class="highlight_red">false means: this node's checkbox / radio is able.</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. disable some node's checkbox / radio </h4>
+ <pre xmlns=""><code>var nodes = [
+ { "id":1, "name":"test1", "checked":true, "chkDisabled":true},
+ { "id":2, "name":"test2", "chkDisabled":true},
+ { "id":3, "name":"test3"}
+]</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.click.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.click.html
new file mode 100644
index 0000000..1f9db62
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.click.html
@@ -0,0 +1,24 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">treeNode.</span>click</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Simple click event operations. As same as : (onclick ="...") the code. If the operation is more complex, please use the onClick callback.</p>
+ <p class="highlight_red">Because IE is different to other browsers in operating the event of ‘onclick’ and ‘click’ coexistence, please do not use this parameter to control whether to allow the redirection operation (for example: treeNode.click = "return false;"). If there is similar requirements, please do not use the 'url' attribute to save the website address, but use the 'onClick' callback to control jumps.</p>
+ <p>Default: undefined</p>
+ </div>
+ </div>
+ <h3>String Format</h3>
+ <div class="desc">
+ <p>Standard javascript syntax, for example: alert ("test"); etc.</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. When click this node, will alert msg.</h4>
+ <pre xmlns=""><code>var nodes = [
+ { "id":1, "name":"Google CN", "url":"http://g.cn", "click":"alert('test');"},
+ ......
+]</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.diy.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.diy.html
new file mode 100644
index 0000000..68c39ba
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.diy.html
@@ -0,0 +1,15 @@
+<div class="apiDetail">
+<div>
+ <h2><span>?</span><span class="path">treeNode.</span>* DIY *</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to save other custom data of node, do not use the same attribute name with ztree used, the user can freely set.</p>
+ </div>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Use 'ename' attribute to save more info</h4>
+ <pre xmlns=""><code>var node = { "id":1, "name":"test1", "ename":"test eName"};</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.editNameFlag.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.editNameFlag.html
new file mode 100644
index 0000000..f60ef2a
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.editNameFlag.html
@@ -0,0 +1,19 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>editNameFlag</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to save the node editing name status. It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
+ <p class="highlight_red">Do not initialize or modify it, it is an internal argument.</p>
+ <p>Default: false</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p>true means: node is being edited.</p>
+ <p>false means: node is not being edited.</p>
+ </div>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.getCheckStatus.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.getCheckStatus.html
new file mode 100644
index 0000000..3c9a2e6
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.getCheckStatus.html
@@ -0,0 +1,63 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function()</span><span class="path">treeNode.</span>getCheckStatus</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Get the node's half-checked status of checkbox or radio. It is valid when <span class="highlight_red">[setting.check.enable = true]</span></p>
+ <p class="highlight_red">Do not initialize or modify it, it is created by the zTree.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>Return</b><span>JSON</span></h4>
+ <pre xmlns=""><code>{
+ checked: true, //As same as 'treeNode.checked'
+ half: true //Rule the table below
+}</code></pre>
+ <table width="100%" border="0" cellspacing="1" cellpadding="0">
+ <thead>
+ <tr><td colspan="4">setting.check.checkType = "checkbox"</td></tr>
+ <tr><td>treeNode.checked</td><td>treeNode.check_Child_State</td><td>treeNode.halfCheck</td><td> half </td></tr>
+ </thead>
+ <tbody>
+ <tr><td>-</td><td>-</td><td>true</td><td>true</td></tr>
+ <tr><td colspan="4">&nbsp;</td></tr>
+ <tr><td>true</td><td>-1</td><td>false</td><td>false</td></tr>
+ <tr><td>true</td><td>0</td><td>false</td><td>true</td></tr>
+ <tr><td>true</td><td>1</td><td>false</td><td>true</td></tr>
+ <tr><td>true</td><td>2</td><td>false</td><td>false</td></tr>
+ <tr><td colspan="4">&nbsp;</td></tr>
+ <tr><td>false</td><td>-1</td><td>false</td><td>false</td></tr>
+ <tr><td>false</td><td>0</td><td>false</td><td>false</td></tr>
+ <tr><td>false</td><td>1</td><td>false</td><td>true</td></tr>
+ <tr><td>false</td><td>2</td><td>false</td><td>true</td></tr>
+ </tbody>
+ </table>
+ <br/>
+ <table width="100%" border="0" cellspacing="1" cellpadding="0">
+ <thead>
+ <tr><td colspan="4">setting.check.checkType = "radio"</td></tr>
+ <tr><td>treeNode.checked</td><td>treeNode.check_Child_State</td><td>treeNode.halfCheck</td><td> half </td></tr>
+ </thead>
+ <tbody>
+ <tr><td>-</td><td>-</td><td>true</td><td>true</td></tr>
+ <tr><td colspan="4">&nbsp;</td></tr>
+ <tr><td>true</td><td>-1</td><td>false</td><td>false</td></tr>
+ <tr><td>true</td><td>0</td><td>false</td><td>false</td></tr>
+ <tr><td>true</td><td>2</td><td>false</td><td>true</td></tr>
+ <tr><td colspan="4">&nbsp;</td></tr>
+ <tr><td>false</td><td>-1</td><td>false</td><td>false</td></tr>
+ <tr><td>false</td><td>0</td><td>false</td><td>false</td></tr>
+ <tr><td>false</td><td>2</td><td>false</td><td>true</td></tr>
+ </tbody>
+ </table>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Get the first root node's half-checked status</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var halfCheck = treeObj.getNodes()[0].getCheckStatus();
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.getNextNode.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.getNextNode.html
new file mode 100644
index 0000000..755aa6e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.getNextNode.html
@@ -0,0 +1,27 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function()</span><span class="path">treeNode.</span>getNextNode</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Get the treeNode's next sibling node.</p>
+ <p class="highlight_red">Do not initialize or modify it, it is created by the zTree.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>Return</b><span>JSON</span></h4>
+ <p>JSON data object of the treeNode's next sibling node</p>
+ <p class="highlight_red">If have not the next node, return null.</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Get the first selected node's next sibling node.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var node = sNodes[0].getNextNode();
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.getParentNode.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.getParentNode.html
new file mode 100644
index 0000000..16bab30
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.getParentNode.html
@@ -0,0 +1,27 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function()</span><span class="path">treeNode.</span>getParentNode</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Get the treeNode's parent node.</p>
+ <p class="highlight_red">Do not initialize or modify it, it is created by the zTree.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>Return</b><span>JSON</span></h4>
+ <p>JSON data object of treeNode's parent node.</p>
+ <p class="highlight_red">If treeNode is root, return null.</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Get the first selected node's parent node.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var node = sNodes[0].getParentNode();
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.getPreNode.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.getPreNode.html
new file mode 100644
index 0000000..f6745b1
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.getPreNode.html
@@ -0,0 +1,27 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function()</span><span class="path">treeNode.</span>getPreNode</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Get the treeNode's previous sibling node.</p>
+ <p class="highlight_red">Do not initialize or modify it, it is created by the zTree.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>Return</b><span>JSON</span></h4>
+ <p>JSON data object of the treeNode's previous sibling node</p>
+ <p class="highlight_red">If have not the previous node, return null.</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Get the first selected node's previous sibling node.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var node = sNodes[0].getPreNode();
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.halfCheck.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.halfCheck.html
new file mode 100644
index 0000000..8375326
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.halfCheck.html
@@ -0,0 +1,29 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>halfCheck</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Force node checkBox / radio to the half-checked status. It is valid when <span class="highlight_red">[setting.check.enable = true & treeNode.nocheck = false]</span></p>
+ <p class="highlight_red">1. If you force to the half-checked status, zTree will not automatically calculated the half-checked status about this node.</p>
+ <p class="highlight_red">2. Until you set treeNode.halfCheck to false or null, zTree will automatically calculated the half-checked status about this node.</p>
+ <p class="highlight_red">3. zTree support identification string 'true' & 'false'.</p>
+ <p>Defaul: false</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p>true means: the checkbox or radio is half-checked when zTree is initialized.</p>
+ <p>false means: the half-checked status will be automatically calculated</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. set the half-checked status when zTree is initialized</h4>
+ <pre xmlns=""><code>var nodes = [
+{ "id":1, "name":"test1", isParent:true, checked:true, halfCheck:true },
+{ "id":2, "name":"test2", isParent:true, checked:false, halfCheck:true },
+{ "id":3, "name":"test3", isParent:true, checked:true },
+{ "id":4, "name":"test4", isParent:true, checked:false }
+]</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.icon.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.icon.html
new file mode 100644
index 0000000..4e1c99f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.icon.html
@@ -0,0 +1,33 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">treeNode.</span>icon</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>URL path of node's custom icon.</p>
+ <p class="highlight_red">1. If you only set the 'icon' attribute to parent node, the parent node will only show one icon when it is expanded or collapsed.</p>
+ <p class="highlight_red">2. If you need to show two icons when it is expanded or collapsed, please set the 'treeNode.iconOpen' and 'treeNode.iconClose' attribute.</p>
+ <p class="highlight_red">3. If you need to use css to set the custom icon, please set the 'treeNode.iconSkin' attribute.</p>
+ <p>Default: undefined</p>
+ </div>
+ </div>
+ <h3>String Format</h3>
+ <div class="desc">
+ <p>Icon image url can be a relative path or absolute path.</p>
+ <p class="highlight_red">If use a relative path, please note the relationship between icon image and the page, ensure the correct image path.</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Set the custom icon</h4>
+ <pre xmlns=""><code>var nodes = [
+ //Only show one icon when it is expanded or collapsed.
+ { name:"Parent Node 1", icon:"/img/parent.gif"},
+
+ //Show two icons when it is expanded or collapsed.
+ { name:"Parent Node 2", iconOpen:"/img/open.gif", iconClose:"/img/close.gif"},
+
+ //the custom icon for leaf node
+ { name:"Leaf Node", icon:"/img/leaf.gif"}
+]</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.iconClose.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.iconClose.html
new file mode 100644
index 0000000..2259e8f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.iconClose.html
@@ -0,0 +1,33 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">treeNode.</span>iconClose</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>URL path of parent node's custom icon when it is collapsed.</p>
+ <p class="highlight_red">1. Only parent node support this attribute.</p>
+ <p class="highlight_red">2. This attribute must be used simultaneously with 'iconOpen' attribute.</p>
+ <p class="highlight_red">3. If you need to use css to set the custom icon, please set the 'treeNode.iconSkin' attribute.</p>
+ <p>Default: undefined</p>
+ </div>
+ </div>
+ <h3>String Format</h3>
+ <div class="desc">
+ <p>Icon image url can be a relative path or absolute path.</p>
+ <p class="highlight_red">If use a relative path, please note the relationship between icon image and the page, ensure the correct image path.</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Set the custom icon</h4>
+ <pre xmlns=""><code>var nodes = [
+ //Only show one icon when it is expanded or collapsed.
+ { name:"Parent Node 1", icon:"/img/parent.gif"},
+
+ //Show two icons when it is expanded or collapsed.
+ { name:"Parent Node 2", iconOpen:"/img/open.gif", iconClose:"/img/close.gif"},
+
+ //the custom icon for leaf node
+ { name:"Leaf Node", icon:"/img/leaf.gif"}
+]</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.iconOpen.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.iconOpen.html
new file mode 100644
index 0000000..3203615
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.iconOpen.html
@@ -0,0 +1,33 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">treeNode.</span>iconOpen</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>URL path of parent node's custom icon when it is expanded.</p>
+ <p class="highlight_red">1. Only parent node support this attribute.</p>
+ <p class="highlight_red">2. This attribute must be used simultaneously with 'iconClose' attribute.</p>
+ <p class="highlight_red">3. If you need to use css to set the custom icon, please set the 'treeNode.iconSkin' attribute.</p>
+ <p>Default: undefined</p>
+ </div>
+ </div>
+ <h3>String Format</h3>
+ <div class="desc">
+ <p>Icon image url can be a relative path or absolute path.</p>
+ <p class="highlight_red">If use a relative path, please note the relationship between icon image and the page, ensure the correct image path.</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Set the custom icon</h4>
+ <pre xmlns=""><code>var nodes = [
+ //Only show one icon when it is expanded or collapsed.
+ { name:"Parent Node 1", icon:"/img/parent.gif"},
+
+ //Show two icons when it is expanded or collapsed.
+ { name:"Parent Node 2", iconOpen:"/img/open.gif", iconClose:"/img/close.gif"},
+
+ //the custom icon for leaf node
+ { name:"Leaf Node", icon:"/img/leaf.gif"}
+]</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.iconSkin.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.iconSkin.html
new file mode 100644
index 0000000..fca7fbf
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.iconSkin.html
@@ -0,0 +1,43 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">treeNode.</span>iconSkin</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The className of node's custom icon.</p>
+ <p class="highlight_red">1. You need to modify the css, add the definition of className.</p>
+ <p class="highlight_red">2. The css is simple, convenient, and support the parent node to switch icons when it is expanded or collapsed.</p>
+ <p class="highlight_red">3. Recommend the use of CSS Sprites, can reduce repeating load the image, to avoid image flicker.</p>
+ <p class="highlight_red">4. The 'iconSkin' support IE6 in zTree v3.x.</p>
+ <p class="highlight_red">5. If you need to use image's URL to set the custom icon, please set the 'treeNode.icon' or 'treeNode.iconOpen' or 'treeNode.iconClose' attribute.</p>
+ <p>Default: undefined</p>
+ </div>
+ </div>
+ <h3>String Format</h3>
+ <div class="desc">
+ <p>The string about custom icon's className.</p>
+ </div>
+ <h3>Examples of css & treeNode</h3>
+ <h4>1. Set the custom icon</h4>
+ <pre xmlns=""><code>css example:
+.ztree li span.button.diy01_ico_open, .ztree li span.button.diy01_ico_close{...}
+
+.ztree li span.button.diy02_ico_open{...}
+.ztree li span.button.diy02_ico_close{...}
+
+.ztree li span.button.diy03_ico_docu{...}
+
+node's data example:
+var nodes = [
+ //Only show one icon when it is expanded or collapsed.
+ { name:"Parent Node 1", iconSkin:"diy01"},
+
+ //Show two icons when it is expanded or collapsed.
+ { name:"Parent Node 2", iconSkin:"diy02"},
+
+ //the custom icon for leaf node
+ { name:"Leaf Node", iconSkin:"diy03"}
+]</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isAjaxing.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isAjaxing.html
new file mode 100644
index 0000000..ddadf41
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isAjaxing.html
@@ -0,0 +1,26 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>isAjaxing</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Judge whether the node's child nodes being loaded asynchronously.</p>
+ <p class="highlight_red">Do not initialize or modify it, it is created by the zTree.</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: the node's child nodes is being loaded asynchronously</p>
+ <p> false means: the node's child nodes is not being loaded asynchronously</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Judge whether the first selected node's child nodes being loaded asynchronously</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var isAjaxing = sNodes[0].isAjaxing;
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isFirstNode.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isFirstNode.html
new file mode 100644
index 0000000..a8ee61c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isFirstNode.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>isFirstNode</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Judge whether the node is the sibling nodes's first node.</p>
+ <p class="highlight_red">If you use the 'exhide' pack, so this attribute will only support the node which be shown. </p>
+ <p class="highlight_red">Do not initialize or modify it, it is created by the zTree.</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: the node is first node.</p>
+ <p> false means: the node is not first node.</p>
+ <p class="highlight_red">If the node has been hidden, isFirstNode = false</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Judge whether the first selected node is the sibling nodes's first node.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var isFirstNode = sNodes[0].isFirstNode;
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isHidden.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isHidden.html
new file mode 100644
index 0000000..3a07b94
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isHidden.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>isHidden</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exhide</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Judge whether the node has been hidden.</p>
+ <p class="highlight_red">1. When initialize zTree, the nodes which be set 'isHidden = true' will be hidden.</p>
+ <p class="highlight_red"></p>
+ <p class="highlight_red">2. Please don't change this attribute of the nodes which have been created. If you want to hide or show nodes, please use 'hideNode() / hideNodes() / showNode() / showNodes()' methods.</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: this node is hidden.</p>
+ <p> false means: this node is shown.</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Judge whether the first root node has been hidden.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getNodes();
+if (sNodes.length > 0) {
+ var isHidden = sNodes[0].isHidden;
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isHover.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isHover.html
new file mode 100644
index 0000000..e18ed0c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isHover.html
@@ -0,0 +1,19 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>isHover</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to record the hover status of node's DOM. For 'setting.view.addHoverDom / removeHoverDom'.</p>
+ <p class="highlight_red">Do not initialize or modify it, it is an internal argument.</p>
+ <p>Default: false</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p>true means: the node's DOM is in hover.</p>
+ <p>false means: the node's DOM is not in hover.</p>
+ </div>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isLastNode.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isLastNode.html
new file mode 100644
index 0000000..cd2ca26
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isLastNode.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>isLastNode</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Judge whether the node is the sibling nodes's last node.</p>
+ <p class="highlight_red">If you use the 'exhide' pack, so this attribute will only support the node which be shown. </p>
+ <p class="highlight_red">Do not initialize or modify it, it is created by the zTree.</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: the node is last node.</p>
+ <p> false means: the node is not last node.</p>
+ <p class="highlight_red">If the node has been hidden, isLastNode = false</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Judge whether the first selected node is the sibling nodes's last node.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var isLastNode = sNodes[0].isLastNode;
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isParent.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isParent.html
new file mode 100644
index 0000000..dad4b81
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.isParent.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>isParent</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Judge whether the node is the parent node.</p>
+ <p class="highlight_red">1. When zTree initialize the node data, the node which has children is set to true, otherwise false.</p>
+ <p class="highlight_red">2. When zTree initialize the node data, if set treeNode.isParent to true, the node will be set to be parent node.</p>
+ <p class="highlight_red">3. In order to solve the problem of someone make json data, supporting "false", "true" format of the data string.</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: the node is parent node.</p>
+ <p> false means: the node is not parent node.</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Judge whether the first selected node is the parent node.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var isParent = sNodes[0].isParent;
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.level.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.level.html
new file mode 100644
index 0000000..d151162
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.level.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Number</span><span class="path">treeNode.</span>level</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The level of node</p>
+ <p class="highlight_red">Do not initialize or modify it, it is created by the zTree.</p>
+ </div>
+ </div>
+ <h3>Number Format</h3>
+ <div class="desc">
+ <p class="highlight_red">The root node's level = 0, and next level = 1, ...</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Get the first selected node's level</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var level = sNodes[0].level;
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.name.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.name.html
new file mode 100644
index 0000000..fa508cc
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.name.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">treeNode.</span>name</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The node's name</p>
+ <p class="highlight_red">1. If you want to change 'name' attribute, please modify the 'setting.data.key.name' attribute.</p>
+ <p>Default: undenfined</p>
+ </div>
+ </div>
+ <h3>String Format</h3>
+ <div class="desc">
+ <p>String object. The HTML special characters are escaped</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Set node's name to 'test1', 'test2', 'test3'</h4>
+ <pre xmlns=""><code>var nodes = [
+ { "id":1, "name":"test1"},
+ { "id":2, "name":"test2"},
+ { "id":3, "name":"test3"}
+]</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.nocheck.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.nocheck.html
new file mode 100644
index 0000000..6c4880c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.nocheck.html
@@ -0,0 +1,26 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>nocheck</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>1. Set node to hide the checkbox or radio. It is valid when <span class="highlight_red">[setting.check.enable = true]</span></p>
+ <p class="highlight_red">2. zTree support identification string 'true' & 'false'.</p>
+ <p>Default: false</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p class="highlight_red">true means: the node hide the checkbox or radio, and don't affect the checked association, and don't affect its parent node's half-checked status.</p>
+ <p class="highlight_red">false means: the node show the checkbox or radio.</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Hide some node's checkbox / radio </h4>
+ <pre xmlns=""><code>var nodes = [
+ { "id":1, "name":"test1", "nocheck":true},
+ { "id":2, "name":"test2"},
+ { "id":3, "name":"test3"}
+]</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.open.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.open.html
new file mode 100644
index 0000000..bc910de
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.open.html
@@ -0,0 +1,30 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>open</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to record the parent node's expand status.</p>
+ <p class="highlight_red">1. When zTree initialize the node data, if you set treeNode.open = true, zTree will default expand this parent node.</p>
+ <p class="highlight_red">2. Leaf node's 'open' attribute is false.</p>
+ <p class="highlight_red">3. In order to solve the problem of someone make json data, supporting "false", "true" format of the data string.</p>
+ <p class="highlight_red">4. When setting.async.enable = false, the parent node will be expanded which have no child nodes and its attribute 'open' is true. (v3.5.15+) </p>
+ <p>Default: false</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: the parent node is expanded.</p>
+ <p> false means: the parent node is collapsed.</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Get the first selected node's expand status.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var isOpen = sNodes[0].open;
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.parentTId.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.parentTId.html
new file mode 100644
index 0000000..0bc2a6d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.parentTId.html
@@ -0,0 +1,27 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">treeNode.</span>parentTId</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The unique identifier of node's parent node.</p>
+ <p class="highlight_red">1. zTree v3.x using 'parentTId' replaced the original 'parentNode' attribute, and increased getParentNode () method, in order to avoid the original 'parentNode' cause the clone () method infinite loop.</p>
+ <p class="highlight_red">2. Do not initialize or modify it, it is created by the zTree.</p>
+ </div>
+ </div>
+ <h3>String Format</h3>
+ <div class="desc">
+ <p>String object of node's parent node's tId. please see API about 'treeNode.tId'</p>
+ <p class="highlight_red">If treeNode is root node, parentTId is null.</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Get the first selected node's parent node's tId</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var parentTId = sNodes[0].parentTId;
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.tId.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.tId.html
new file mode 100644
index 0000000..18c2855
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.tId.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">treeNode.</span>tId</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The unique identifier of node.</p>
+ <p class="highlight_red">Do not initialize or modify it, it is created by the zTree.</p>
+ </div>
+ </div>
+ <h3>String Format</h3>
+ <div class="desc">
+ <p>tId rules: setting.treeId + "_" + zTree counter</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Get the first selected node's tId</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var tId = sNodes[0].tId;
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.target.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.target.html
new file mode 100644
index 0000000..176a7a3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.target.html
@@ -0,0 +1,24 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">treeNode.</span>target</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Used to set the target where the node is clicked to open url. It is valid when <span class="highlight_red">[treeNode.url exists]</span></p>
+ <p>Default: undefined</p>
+ </div>
+ </div>
+ <h3>String Format</h3>
+ <div class="desc">
+ <p>As same as &lt;a&gt; tag's 'target' attribute. e.g. '_blank', '_self' or other window name.</p>
+ <p>if this attribute is omitted, zTree default set it to '_blank'</p>
+ </div>
+ <h3>Exmaples of treeNode</h3>
+ <h4>1. Set target is '_blank'</h4>
+ <pre xmlns=""><code>var nodes = [
+ { "id":1, "name":"test1", "url":"http://myTest.com", "target":"_blank"},
+ ......
+]</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.url.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.url.html
new file mode 100644
index 0000000..5552445
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.url.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>String</span><span class="path">treeNode.</span>url</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The URL of node link</p>
+ <p class="highlight_red">1. In edit mode (setting.edit.enable = true) , this feature fails. If you must use a similar feature, please use the 'onClick' callback for their own control.</p>
+ <p class="highlight_red">2. If you use the 'onClick' callback function to control opening URL , then set the URL in the other custom attribute, do not use the 'url' attribute.</p>
+ <p>Default: undefined</p>
+ </div>
+ </div>
+ <h3>String Format</h3>
+ <div class="desc">
+ <p>As same as &lt;a&gt; tag's 'href' attribute.</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Set the URL is 'g.cn'</h4>
+ <pre xmlns=""><code>var nodes = [
+ { "id":1, "name":"Google CN", "url":"http://g.cn"},
+ ......
+]</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.zAsync.html b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.zAsync.html
new file mode 100644
index 0000000..b3ff414
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/treeNode.zAsync.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Boolean</span><span class="path">treeNode.</span>zAsync</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Judge whether the parent node's child nodes will be loaded asynchronously when the parent node is expanded.</p>
+ <p class="highlight_red">Do not initialize or modify it, it is created by the zTree.</p>
+ <p class="highlight_red">Default:false (the parent node which have no child nodes); true (the parent node which have child nodes or the leaf node)</p>
+ </div>
+ </div>
+ <h3>Boolean Format</h3>
+ <div class="desc">
+ <p> true means: the node's child nodes will not be loaded asynchronously when the parent node is expanded.</p>
+ <p> false means: the node's child nodes will be loaded asynchronously when the parent node is expanded.</p>
+ <p class="highlight_red"> This attribute will not effect to 'reAsyncChildNodes()' method</p>
+ </div>
+ <h3>Examples of treeNode</h3>
+ <h4>1. Judge whether the first selected node's child nodes has been loaded asynchronously</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var sNodes = treeObj.getSelectedNodes();
+if (sNodes.length > 0) {
+ var zAsync = sNodes[0].zAsync;
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.addNodes.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.addNodes.html
new file mode 100644
index 0000000..680ccc4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.addNodes.html
@@ -0,0 +1,42 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(parentNode, newNodes, isSilent)</span><span class="path">zTreeObj.</span>addNodes</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Add nodes</p>
+ <p class="highlight_red">In order to avoid duplication data resulting from repeated initialization, zTree v3.x will automatically clone node data when zTree initialized or add nodes. If you need to get the data objects within the zTree, please get the return value of this method.</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>parentNode</b><span>JSON</span></h4>
+ <p>The additional node's parent node. If additional node is root node, please the parentNode is null.</p>
+ <p class="highlight_red">Please ensure this node data object is a data object within zTree.</p>
+ <h4 class="topLine"><b>newNodes</b><span>JSON / Array(JSON)</span></h4>
+ <p>The node data's JSON object collection which need to increase, refer to 'treeNode treeNode data details'</p>
+ <p class="highlight_red">1. zTree v3.x support to add single node, that is, if you only add a node, you can don't use the array.</p>
+ <p class="highlight_red">2. If you use simple data model, please refer to the attributes within the 'setting.data.simpleData'.</p>
+ <h4 class="topLine"><b>isSilent</b><span>Boolean</span></h4>
+ <p>Set whether to automatically expand the parent node, after add nodes.</p>
+ <p>isSilent = true means: don't auto expand the parent node. Otherwise auto expand.</p>
+ <h4 class="topLine"><b>Return </b><span>Array(JSON)</span></h4>
+ <p>return the new nodes in zTree</p>
+ <p class="highlight_red">If the newNodes is single data object, the return value is a array with length is 1.</p>
+ <p class="highlight_red">Note: the node data JSON object in the return value is not equal to the JSON object in the 'newNodes'.</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Add one root node to zTree which id is 'tree'</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var newNode = {name:"newNode1"};
+newNode = treeObj.addNodes(null, newNode);
+</code></pre>
+ <h4>2. Add three root nodes to zTree which id is 'tree'</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var newNodes = [{name:"newNode1"}, {name:"newNode2"}, {name:"newNode3"}];
+newNodes = treeObj.addNodes(null, newNodes);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.cancelEditName.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.cancelEditName.html
new file mode 100644
index 0000000..8afdae0
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.cancelEditName.html
@@ -0,0 +1,30 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(newName)</span><span class="path">zTreeObj.</span>cancelEditName</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Cancel the edit name status. Can restore the original name, and can also force assigned to a new name.</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>newName</b><span>String</span></h4>
+ <p>Re given a new name</p>
+ <p class="highlight_red">If this parameter is omitted, then restore the original name.</p>
+ <h4 class="topLine"><b>Return </b><span>none</span></h4>
+ <p>no return value</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Cancel edit name, and restore the original name.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+treeObj.cancelEditName();
+</code></pre>
+ <h4>2. Cancel edit name , and set the new name.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+treeObj.cancelEditName("test_new_name");
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.cancelSelectedNode.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.cancelSelectedNode.html
new file mode 100644
index 0000000..581c2d2
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.cancelSelectedNode.html
@@ -0,0 +1,35 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNode)</span><span class="path">zTreeObj.</span>cancelSelectedNode</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>To cancel the selected node.</p>
+ <p class="highlight_red">zTree v3.x support to select multiple nodes, so you can cancel a single selected node, and you can cancel all of the selected nodes too.</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which need to cancel selected.</p>
+ <p class="highlight_red">Please ensure that this data object is an internal node data object in zTree.</p>
+ <p class="highlight_red">If you omit this parameter, zTree will cancel all of the selected nodes.</p>
+ <h4 class="topLine"><b>Return </b><span>none</span></h4>
+ <p>no return value</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Cancel all of the selected nodes</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+treeObj.cancelSelectedNode();
+</code></pre>
+ <h4>2. Cancel the first node of the selected nodes</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getSelectedNode();
+if (nodes.length>0) {
+ treeObj.cancelSelectedNode(nodes[0]);
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.checkAllNodes.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.checkAllNodes.html
new file mode 100644
index 0000000..276b629
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.checkAllNodes.html
@@ -0,0 +1,29 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(checked)</span><span class="path">zTreeObj.</span>checkAllNodes</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Check or unCheck all nodes which have been initialized. It is valid when <span class="highlight_red">[setting.check.enable = true & setting.check.chkStyle = "checkbox"]</span></p>
+ <p class="highlight_red">This method does not trigger 'beforeCheck' or 'onCheck' callback function.</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>checked</b><span>Boolean</span></h4>
+ <p>checked = true means: check all nodes.</p>
+ <p>checked = false means: uncheck all nodes.</p>
+ <p class="highlight_red">Don't affect the node which 'nochecked' attribute is true.</p>
+ <p class="highlight_red">Don't affect the node is not loaded.</p>
+ <h4 class="topLine"><b>Return </b><span>none</span></h4>
+ <p>no return value</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. check all nodes</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+treeObj.checkAllNodes(true);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.checkNode.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.checkNode.html
new file mode 100644
index 0000000..7411ef8
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.checkNode.html
@@ -0,0 +1,44 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNode, checked, checkTypeFlag, callbackFlag)</span><span class="path">zTreeObj.</span>checkNode</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Check or unCheck a single node. It is valid when <span class="highlight_red">[setting.check.enable = true]</span></p>
+ <p class="highlight_red">Use checkNode() method of zTree v3.x can trigger 'beforeCheck' or 'onCheck' callback function. for reduce redundant code.</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which need to be checked or unchecked.</p>
+ <p class="highlight_red">Please ensure that this data object is an internal node data object in zTree.</p>
+ <h4 class="topLine"><b>checked</b><span>Boolean</span></h4>
+ <p>checked = true means: check node.</p>
+ <p>checked = false means: uncheck node.</p>
+ <p class="highlight_red">If this parameter is omitted, then toggle check or uncheck depend this node's expanded state.</p>
+ <p class="highlight_red">Don't affect the node which 'nochecked' attribute is true.</p>
+ <h4 class="topLine"><b>checkTypeFlag</b><span>Boolean</span></h4>
+ <p>checkTypeFlag = true means: According to 'setting.check.chkboxType' attribute automatically check or uncheck the parent and child nodes.</p>
+ <p>checkTypeFlag = false means: only check or uncheck this node, don't affect its parent and child nodes.</p>
+ <p class="highlight_red">When checkTypeFlag = false and treeNode.checked = checked, will not trigger callback function.</p>
+ <p class="highlight_red">Don't affect the parent and child nodes which 'nochecked' attribute is true.</p>
+ <h4 class="topLine"><b>callbackFlag</b><span>Boolean</span></h4>
+ <p>callbackFlag = true means: call this method, will trigger 'beforeCheck' & 'onCheck' callback.</p>
+ <p>callbackFlag = false means: call this method, will not trigger callback.</p>
+ <p class="highlight_red">If this parameter is omitted, it is same as 'callbackFlag = false'</p>
+ <h4 class="topLine"><b>Return </b><span>none</span></h4>
+ <p>no return value</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. check the selected nodes</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getSelectedNodes();
+for (var i=0, l=nodes.length; i < l; i++) {
+ treeObj.checkNode(nodes[i], true, true);
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.copyNode.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.copyNode.html
new file mode 100644
index 0000000..a98e84d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.copyNode.html
@@ -0,0 +1,47 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(targetNode, treeNode, moveType, isSilent)</span><span class="path">zTreeObj.</span>copyNode</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Copy the node</p>
+ <p class="highlight_red">When copy nodes, zTree v3.x will clone nodes. If you need to get the data object in zTree, please get the return value of this method.</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>targetNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which will be target.</p>
+ <p class="highlight_red">If copy the node to root node, please set the 'targetNode' to null.</p>
+ <p class="highlight_red">Please ensure that this data object is an internal node data object in zTree.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which will be copied.</p>
+ <p class="highlight_red">Please ensure that this data object is an internal node data object in zTree.</p>
+ <h4 class="topLine"><b>moveType</b><span>String</span></h4>
+ <p>Copied to the target node's relative position.</p>
+ <p class="highlight_red">"inner" means: to be taregetNode's child node.</p>
+ <p class="highlight_red">"prev" means: to be taregetNode's previous sibling node.</p>
+ <p class="highlight_red">"next" means: to be taregetNode's next sibling node.</p>
+ <h4 class="topLine"><b>isSilent</b><span>Boolean</span></h4>
+ <p>After copy the node, whether to automatically expand its parent node.</p>
+ <p>isSilent = true means: don't expand its parent node.</p>
+ <p>isSilent = false or omit this parameter means: expand its parent node.</p>
+ <h4 class="topLine"><b>Return </b><span>JSON</span></h4>
+ <p>return the new node in zTree</p>
+ <p class="highlight_red">Note: the node data JSON object in the return value is not equal to the treeNode.</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Copy the second root node to the first root node's child node.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodes();
+treeObj.copyNode(nodes[0], nodes[1], "inner");
+</code></pre>
+ <h4>2. Copy the second root node to the first root node's previous sibling node.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodes();
+treeObj.copyNode(nodes[0], nodes[1], "before");
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.destroy.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.destroy.html
new file mode 100644
index 0000000..80c5281
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.destroy.html
@@ -0,0 +1,25 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeId)</span><span class="path">zTreeObj.</span>destroy</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>From zTree v3.4, zTree support the method for destruction.</p>
+ <p>1. This method can destroy the zTreeObj's zTree.</p>
+ <p class="highlight_red">2. If you want to destory all of the zTrees, you can use the '$.fn.zTree.destroy()' method.</p>
+ <p class="highlight_red">3. If you want to use the tree which has been destroyed, you must use the 'init()' method at first.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>Return </b><span>none</span></h4>
+ <p>no return value</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. destroy the zTree which its id is 'treeDemo'</h4>
+ <pre xmlns=""><code>var zTreeObj = $.fn.zTree.getZTreeObj("treeDemo");
+zTreeObj.destroy();
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.editName.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.editName.html
new file mode 100644
index 0000000..92ac5c1
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.editName.html
@@ -0,0 +1,29 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNode)</span><span class="path">zTreeObj.</span>editName</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Start editing the node's name.</p>
+ <p class="highlight_red">1. If need to cancel editing the node's name, please use cancelEditName(newName) method.</p>
+ <p class="highlight_red">2. This method can be used to set the editing node‘s input box to get focus.</p>
+ <p class="highlight_red">3. Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which will be editing name</p>
+ <p class="highlight_red">Please ensure that this data object is an internal node data object in zTree.</p>
+ <h4 class="topLine"><b>Retrun </b><span>none</span></h4>
+ <p>no return value</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Start editing the first selected node's name.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodes();
+treeObj.editName(nodes[0]);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.expandAll.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.expandAll.html
new file mode 100644
index 0000000..ef28a31
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.expandAll.html
@@ -0,0 +1,30 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(expandFlag)</span><span class="path">zTreeObj.</span>expandAll</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Expand or collapse all nodes.</p>
+ <p class="highlight_red">This method does not trigger 'beforeExpand / onExpand' or 'beforeCollapse / onCollapse' callback function.</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>expandFlag</b><span>Boolean</span></h4>
+ <p>expandFlag = true means: expand all nodes.</p>
+ <p>expandFlag = false means: collapse all nodes.</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>return the result of expand or collapse.</p>
+ <p>true means: expand all nodes</p>
+ <p>false means: collapse all nodes</p>
+ <p>null means: have no parent node to expand or collapse.</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Expand all nodes</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+treeObj.expandAll(true);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.expandNode.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.expandNode.html
new file mode 100644
index 0000000..f99ff77
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.expandNode.html
@@ -0,0 +1,50 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNode, expandFlag, sonSign, focus, callbackFlag)</span><span class="path">zTreeObj.</span>expandNode</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Expand or collapse single node.</p>
+ <p class="highlight_red">Use expandNode() method of zTree v3.x can trigger 'beforeExpand / onExpand' or 'beforeCollapse / onCollapse' callback function. for reduce redundant code.</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which will be expanded or collapsed</p>
+ <p class="highlight_red">Please ensure that this data object is an internal node data object in zTree.</p>
+ <h4 class="topLine"><b>expandFlag</b><span>Boolean</span></h4>
+ <p>expandFlag = true means: expand the node.</p>
+ <p>expandFlag = false means: collapse the node.</p>
+ <p class="highlight_red">If this parameter is omitted, then toggle expand or collapse depend this node's expanded state.</p>
+ <h4 class="topLine"><b>sonSign</b><span>Boolean</span></h4>
+ <p>sonSign = true means: expand or collapse all of the child nodes depend the 'expandFlag' parameter.</p>
+ <p>sonSign = false means: only expand or collapse this node.</p>
+ <p class="highlight_red">When sonSign = false and treeNode.open = expandFlag, will not trigger the callback.</p>
+ <p class="highlight_red">If this parameter is omitted, it is same as 'sonSign = false'.</p>
+ <h4 class="topLine"><b>focus</b><span>Boolean</span></h4>
+ <p>focus = true means: after expand or collapse, set the focus of this node for view.</p>
+ <p>focus = false means: after expand or coolapse, don't set the focus of this node.</p>
+ <p class="highlight_red">If this parameter is omitted, it is same as 'focus = true'.</p>
+ <h4 class="topLine"><b>callbackFlag</b><span>Boolean</span></h4>
+ <p>callbackFlag = true means: call this method, will trigger 'beforeExpand / onExpand' or 'beforeCollapse / onCollapse' callback.</p>
+ <p>callbackFlag = false means: call this method, will not trigger callback.</p>
+ <p class="highlight_red">If this parameter is omitted, it is same as 'callbackFlag = false'</p>
+ <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
+ <p>return the result of expand or collapse.</p>
+ <p>true means: expand node</p>
+ <p>false means: collapse node</p>
+ <p>null means: the node is not parent node.</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Expand the first selected node. (and expand this node's child nodes)</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getSelectedNodes();
+if (nodes.length>0) {
+ treeObj.expandNode(nodes[0], true, true, true);
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getChangeCheckedNodes.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getChangeCheckedNodes.html
new file mode 100644
index 0000000..d0f9cf3
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getChangeCheckedNodes.html
@@ -0,0 +1,24 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function()</span><span class="path">zTreeObj.</span>getChangeCheckedNodes</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Get the collection of nodes which be changed checked status. (Compared with the original data checkedOld) It is valid when <span class="highlight_red">[setting.check.enable = true]</span></p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>Return </b><span>Array(JSON)</span></h4>
+ <p>return the collection of nodes which be changed checked status (Array)</p>
+ <p class="highlight_red">If you need to get the collection of nodes which changed the checked status, when nodes be checked or unchecked, so please set treeNode.checkedOld = treeNode.checked ( for all of the be changed checked status nodes ).</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Get the collection of nodes which be changed checked status</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getChangeCheckedNodes();
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getCheckedNodes.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getCheckedNodes.html
new file mode 100644
index 0000000..7a7c3b9
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getCheckedNodes.html
@@ -0,0 +1,28 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(checked)</span><span class="path">zTreeObj.</span>getCheckedNodes</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Get the collection of nodes which be checked or unchecked. It is valid when <span class="highlight_red">[setting.check.enable = true]</span></p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>checked</b><span>Boolean</span></h4>
+ <p>checked = true means: get the collection of nodes which be checked</p>
+ <p>checked = false means: get the collection of nodes which be unchecked</p>
+ <p class="highlight_red">If this parameter is omitted, it is same as 'checked = true'</p>
+ <p class="highlight_red">Don't get the nodes which 'nochecked' attribute is true.</p>
+ <h4 class="topLine"><b>Return </b><span>Array(JSON)</span></h4>
+ <p>return the collection of nodes which be checked or unchecked. (Array)</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Get the collection of nodes which be checked.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getCheckedNodes(true);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodeByParam.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodeByParam.html
new file mode 100644
index 0000000..05572e7
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodeByParam.html
@@ -0,0 +1,32 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(key, value, parentNode)</span><span class="path">zTreeObj.</span>getNodeByParam</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>According to the node data attribute, search the node which exactly matches, and get the JSON object of node.</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>key</b><span>String</span></h4>
+ <p>The name of attribute which need to exactly match</p>
+ <h4 class="topLine"><b>value</b><span>?</span></h4>
+ <p>The value which need to exactly match, can be any type, please ensure its type consistent with the attribute values.</p>
+ <h4 class="topLine"><b>parentNode</b><span>JSON</span></h4>
+ <p>The search range, you can search node from a parent node's child nodes.</p>
+ <p class="highlight_red">If this parameter is omitted, zTree will search node from all nodes.</p>
+ <h4 class="topLine"><b>Return </b><span>JSON</span></h4>
+ <p>JSON data object of the node which be searched.</p>
+ <p class="highlight_red">1. If search none node, return null.</p>
+ <p class="highlight_red">2. If there are many nodes can be searched, return the first node.</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Search the node which its 'id' attribute is 1.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var node = treeObj.getNodeByParam("id", 1, null);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodeByTId.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodeByTId.html
new file mode 100644
index 0000000..8fd26ea
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodeByTId.html
@@ -0,0 +1,27 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(tId)</span><span class="path">zTreeObj.</span>getNodeByTId</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>According the unique identifier tId of zTree, quick get the node's JSON data object.</p>
+ <p class="highlight_red">Get the node from the cache, don't need to search from all nodes.</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>tId</b><span>String</span></h4>
+ <p>The unique identifier of node.</p>
+ <h4 class="topLine"><b>Return </b><span>JSON</span></h4>
+ <p>JSON data object of the node which be searched.</p>
+ <p class="highlight_red">If no result, return null.</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. 1. Search the node which its 'tId' attribute is 'tree_10'</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var node = treeObj.getNodeByTId("tree_10");
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodeIndex.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodeIndex.html
new file mode 100644
index 0000000..ad828e7
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodeIndex.html
@@ -0,0 +1,30 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNode)</span><span class="path">zTreeObj.</span>getNodeIndex</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Get the node's index in the same level nodes. (start from 0)</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which need to get index.</p>
+ <p class="highlight_red">Please ensure that this data object is an internal node data object in zTree.</p>
+ <h4 class="topLine"><b>Return </b><span>Number</span></h4>
+ <p class="highlight_red">return the index. (start from 0)</p>
+ <p class="highlight_red">If there is no this node, return -1.</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Get the first selected node's index in the same level nodes.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getSelectedNodes();
+if (nodes.length>0) {
+ var index = treeObj.getNodeIndex(nodes[0]);
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodes.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodes.html
new file mode 100644
index 0000000..5906a43
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodes.html
@@ -0,0 +1,26 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function()</span><span class="path">zTreeObj.</span>getNodes</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Get all of the nodes in zTree</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>Return </b><span>Array(JSON)</span></h4>
+ <p>return all of the nodes</p>
+ <p class="highlight_red">1. This array is a collection of the root nodes (the default child nodes are in the 'children' attributes);</p>
+ <p class="highlight_red">2. Traverse all the nodes need to use recursion, or the use of transformToArray() method make the nodes to be a simple array.</p>
+ <p class="highlight_red">3. For the asynchronous loading mode, can't get the nodes which are yet loaded.</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Get all of the nodes</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodes();
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodesByFilter.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodesByFilter.html
new file mode 100644
index 0000000..2cd6baa
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodesByFilter.html
@@ -0,0 +1,43 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(filter, isSingle, parentNode, invokeParam)</span><span class="path">zTreeObj.</span>getNodesByFilter</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Search the single node's data or collection of nodes's data by custom rules.</p>
+ <p class="highlight_red">Can be customized complex search rules.</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>filter</b><span>Function</span></h4>
+ <p>Custom search function. e.g. function filter(node) {...}</p>
+ <p>filter's parameter: node (node's data -- JSON)</p>
+ <p>filter's return: boolean (true means: match the rules; false means: don't match the rules)</p>
+ <h4 class="topLine"><b>isSingle</b><span>Boolean</span></h4>
+ <p>isSingle = true means: search only one node</p>
+ <p>isSingle = false means: search the array of the nodes</p>
+ <p class="highlight_red">If this parameter is omitted, as same as false</p>
+ <h4 class="topLine"><b>parentNode</b><span>JSON</span></h4>
+ <p>The search range, you can search node from a parent node's child nodes.</p>
+ <p class="highlight_red">If this parameter is omitted, zTree will search node from all nodes.</p>
+ <h4 class="topLine"><b>invokeParam</b><span>anything</span></h4>
+ <p>Custom data object by user, used to calculate in the filter function.</p>
+ <h4 class="topLine"><b>Return </b><span>Array(JSON) / JSON</span></h4>
+ <p>If isSingle = true, will return the first node's data (JSON) what be matched. If no match, return null.</p>
+ <p>If isSingle = false, will return the array of all nodes's data what be matched. if no match, return [ ].</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Search the nodes which their 'name' contains 'test' and 'level' is 2.</h4>
+ <pre xmlns=""><code>function filter(node) {
+ return (node.level == 2 && node.name.indexOf("test")>-1);
+}
+......
+var treeObj = $.fn.zTree.getZTreeObj("tree");
+var node = treeObj.getNodesByFilter(filter, true); // search only one node
+var nodes = treeObj.getNodesByFilter(filter); // search the array of the nodes
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodesByParam.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodesByParam.html
new file mode 100644
index 0000000..3173af4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodesByParam.html
@@ -0,0 +1,31 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(key, value, parentNode)</span><span class="path">zTreeObj.</span>getNodesByParam</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>According to the node data attribute, search the nodes which exactly matches, and get the JSON objects collection of nodes.</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>key</b><span>String</span></h4>
+ <p>The name of attribute which need to exactly match</p>
+ <h4 class="topLine"><b>value</b><span>?</span></h4>
+ <p>The value which need to exactly match, can be any type, please ensure its type consistent with the attribute values.</p>
+ <h4 class="topLine"><b>parentNode</b><span>JSON</span></h4>
+ <p>The search range, you can search node from a parent node's child nodes.</p>
+ <p class="highlight_red">If this parameter is omitted, zTree will search node from all nodes.</p>
+ <h4 class="topLine"><b>Return </b><span>Array(JSON)</span></h4>
+ <p>The JSON data objects collection of the nodes which be searched.</p>
+ <p class="highlight_red">If search none node, return [ ].</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Search the nodes which their 'name' attribute is 'test'.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodesByParam("name", "test", null);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodesByParamFuzzy.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodesByParamFuzzy.html
new file mode 100644
index 0000000..14b6c29
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getNodesByParamFuzzy.html
@@ -0,0 +1,32 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(key, value, parentNode)</span><span class="path">zTreeObj.</span>getNodesByParamFuzzy</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>According to the node data attribute, search the nodes which fuzzy matches, and get the JSON objects collection of nodes.</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>key</b><span>String</span></h4>
+ <p>The name of attribute which need to fuzzy match</p>
+ <h4 class="topLine"><b>value</b><span>String</span></h4>
+ <p>The value which need to fuzzy match.</p>
+ <p class="highlight_red">The type of value can only be String</p>
+ <h4 class="topLine"><b>parentNode</b><span>JSON</span></h4>
+ <p>The search range, you can search node from a parent node's child nodes.</p>
+ <p class="highlight_red">If this parameter is omitted, zTree will search node from all nodes.</p>
+ <h4 class="topLine"><b>Return </b><span>Array(JSON)</span></h4>
+ <p>The JSON data objects collection of the nodes which be searched.</p>
+ <p class="highlight_red">If search none node, return [ ].</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Search the nodes which their 'name' attribute contains the string 'test'.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodesByParamFuzzy("name", "test", null);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getSelectedNodes.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getSelectedNodes.html
new file mode 100644
index 0000000..4a0f060
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.getSelectedNodes.html
@@ -0,0 +1,23 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function()</span><span class="path">zTreeObj.</span>getSelectedNodes</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Get the JSON data objects collection of the selected nodes in zTree.</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>Return </b><span>Array(JSON)</span></h4>
+ <p>The JSON data objects collection of the selected nodes.</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. get the selected nodes</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getSelectedNodes();
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.hideNode.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.hideNode.html
new file mode 100644
index 0000000..f02f523
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.hideNode.html
@@ -0,0 +1,29 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNode)</span><span class="path">zTreeObj.</span>hideNode</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exhide</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>To hide any node.</p>
+ <p class="highlight_red">1. This feature can't support the 'exedit' feature, so please don't use this feature in edit mode.</p>
+ <p class="highlight_red">2. If you hide or show the nodes, it will effect the 'isFirstNode' and 'isLastNode' attribute.</p>
+ <p class="highlight_red">3. Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which will be hidden</p>
+ <p class="highlight_red">Please ensure that this data object is an internal node data object in zTree.</p>
+ <h4 class="topLine"><b>Retrun </b><span>none</span></h4>
+ <p>no return value</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. hide the first root node.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodes();
+treeObj.hideNode(nodes[0]);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.hideNodes.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.hideNodes.html
new file mode 100644
index 0000000..9bf8e6b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.hideNodes.html
@@ -0,0 +1,29 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNodes)</span><span class="path">zTreeObj.</span>hideNodes</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exhide</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>To hide a group of nodes.</p>
+ <p class="highlight_red">1. This feature can't support the 'exedit' feature, so please don't use this feature in edit mode.</p>
+ <p class="highlight_red">2. If you hide or show the nodes, it will effect the 'isFirstNode' and 'isLastNode' attribute.</p>
+ <p class="highlight_red">3. Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeNodes</b><span>Array(JSON)</span></h4>
+ <p>the array of the nodes which will be hidden</p>
+ <p class="highlight_red">Please ensure that this data object is an internal node data object in zTree.</p>
+ <h4 class="topLine"><b>Retrun </b><span>none</span></h4>
+ <p>no return value</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. hide the first root node's children.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodes();
+treeObj.hideNodes(nodes[0].children);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.moveNode.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.moveNode.html
new file mode 100644
index 0000000..93f066b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.moveNode.html
@@ -0,0 +1,49 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(targetNode, treeNode, moveType, isSilent)</span><span class="path">zTreeObj.</span>moveNode</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Move the node</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>targetNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which will be target.</p>
+ <p class="highlight_red">If move the node to root node, please set the 'targetNode' to null.</p>
+ <p class="highlight_red">Please ensure that this data object is an internal node data object in zTree.</p>
+ <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which will be moved.</p>
+ <p class="highlight_red">Please ensure that this data object is an internal node data object in zTree.</p>
+ <h4 class="topLine"><b>moveType</b><span>String</span></h4>
+ <p>Moved to the target node's relative position.</p>
+ <p class="highlight_red">"inner" means: to be taregetNode's child node.</p>
+ <p class="highlight_red">"prev" means: to be taregetNode's previous sibling node.</p>
+ <p class="highlight_red">"next" means: to be taregetNode's next sibling node.</p>
+ <h4 class="topLine"><b>isSilent</b><span>Boolean</span></h4>
+ <p>After move the node, whether to automatically expand its parent node.</p>
+ <p>isSilent = true means: don't expand its parent node.</p>
+ <p>isSilent = false or omit this parameter means: expand its parent node.</p>
+ <h4 class="topLine"><b>Return </b><span>JSON</span></h4>
+ <p>return the node which be moved, it is same as the 'treeNode' parameter.</p>
+ <p class="highlight_red">Return null means: move node has failed. The cause:<br/>
+ &nbsp;1. the targetNode is the treeNode's parent node, and moveType = "inner"<br/>
+ &nbsp;2. the targetNode is the treeNode's child node.
+ </p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Move the second root node to the first root node's child node.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodes();
+treeObj.moveNode(nodes[0], nodes[1], "inner");
+</code></pre>
+ <h4>2. Move the second root node to the first root node's previous sibling node.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodes();
+treeObj.moveNode(nodes[0], nodes[1], "prev");
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.reAsyncChildNodes.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.reAsyncChildNodes.html
new file mode 100644
index 0000000..63a0896
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.reAsyncChildNodes.html
@@ -0,0 +1,42 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(parentNode, reloadType, isSilent)</span><span class="path">zTreeObj.</span>reAsyncChildNodes</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Forced asynchronous loading child nodes of parent node. It is valid when <span class="highlight_red">[setting.async.enable = true]</span></p>
+ <p class="highlight_red">You can use this method to reload child nodes.</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>parentNode</b><span>JSON</span></h4>
+ <p>The parent node which will asynchronous loading child nodes.</p>
+ <p class="highlight_red">1. If parentNode = null, it is same as reload root nodes.</p>
+ <p class="highlight_red">2. If parentNode.isParent = false, don't load nodes.</p>
+ <p class="highlight_red">3. Please ensure that this data object is an internal node data object in zTree.</p>
+ <h4 class="topLine"><b>reloadType</b><span>String</span></h4>
+ <p>reloadType = "refresh" means: reload child nodes.</p>
+ <p>reloadType != "refresh" means: append to load child nodes.</p>
+ <h4 class="topLine"><b>isSilent</b><span>Boolean</span></h4>
+ <p>Set whether to automatically expand the parent node, after load nodes.</p>
+ <p>isSilent = true means: don't auto expand the parent node. Otherwise auto expand.</p>
+ <h4 class="topLine"><b>Return </b><span>none</span></h4>
+ <p>no return value</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. reload root nodes</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+treeObj.reAsyncChildNodes(null, "refresh");
+</code></pre>
+ <h4>2. reload the first selected node's child nodes.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getSelectedNodes();
+if (nodes.length>0) {
+ treeObj.reAsyncChildNodes(nodes[0], "refresh");
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.refresh.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.refresh.html
new file mode 100644
index 0000000..8316192
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.refresh.html
@@ -0,0 +1,24 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function()</span><span class="path">zTreeObj.</span>refresh</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Refresh zTree</p>
+ <p class="highlight_red">If you have no special need, try not to use this method. If you refresh single node, please use updateNode() method. If you refresh child nodes in dynamic mode, please use the reAsyncChildNodes() method.</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>Return </b><span>none</span></h4>
+ <p>no return value</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. refresh zTree </h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+treeObj.refresh();
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.removeChildNodes.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.removeChildNodes.html
new file mode 100644
index 0000000..c249e17
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.removeChildNodes.html
@@ -0,0 +1,32 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(parentNode)</span><span class="path">zTreeObj.</span>removeChildNodes</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Remove a parent node's child nodes</p>
+ <p class="highlight_red">1. After remove child nodes, the parent node will become a leaf node. Such as the need to maintain the parent node is still a parent node, set 'setting.data.keep.parent' attribute.</p>
+ <p class="highlight_red">2. Do not use this method to empty the root. If you need to empty the root, you can initialization zTree, and set the initial nodes is null.</p>
+ <p class="highlight_red">3. This method does not trigger any callback function.</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>parentNode</b><span>JSON</span></h4>
+ <p>The parent node which need to clear its child nodes.</p>
+ <p class="highlight_red">Please ensure that this data object is an internal node data object in zTree.</p>
+ <h4 class="topLine"><b>Return </b><span>Array(JSON)</span></h4>
+ <p>Return the parent node's child nodes which have been removed. If has no child nodes, return null.</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Remove the first selected node's child nodes</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getSelectedNodes();
+if (nodes && nodes.length>0) {
+ treeObj.removeChildNodes(nodes[0]);
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.removeNode.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.removeNode.html
new file mode 100644
index 0000000..605322f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.removeNode.html
@@ -0,0 +1,34 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNode, callbackFlag)</span><span class="path">zTreeObj.</span>removeNode</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Remove a node</p>
+ <p class="highlight_red">Use removeNode() method of zTree v3.x can trigger 'beforeRemove / onRemove' callback function. for reduce redundant code.</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which will be removed.</p>
+ <p class="highlight_red">Please ensure that this data object is an internal node data object in zTree.</p>
+ <h4 class="topLine"><b>callbackFlag</b><span>Boolean</span></h4>
+ <p>callbackFlag = true means: call this method, will trigger 'beforeRemove' & 'onRemove' callback.</p>
+ <p>callbackFlag = false means: call this method, will not trigger callback.</p>
+ <p class="highlight_red">If this parameter is omitted, it is same as 'callbackFlag = false'</p>
+ <h4 class="topLine"><b>Return </b><span>none</span></h4>
+ <p>no return value</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Remove all of the selected nodes.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getSelectedNodes();
+for (var i=0, l=nodes.length; i < l; i++) {
+ treeObj.removeNode(nodes[i]);
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.selectNode.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.selectNode.html
new file mode 100644
index 0000000..237f199
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.selectNode.html
@@ -0,0 +1,34 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNode, addFlag)</span><span class="path">zTreeObj.</span>selectNode</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Select a node</p>
+ <p class="highlight_red">zTree v3.x supports select multiple nodes.</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which will be selected.</p>
+ <p class="highlight_red">Please ensure that this data object is an internal node data object in zTree.</p>
+ <h4 class="topLine"><b>addFlag</b><span>Boolean</span></h4>
+ <p>addFlag = true means: append to select node, don't affect the previously selected node, can select multiple nodes.</p>
+ <p>addFlag = false means: select single node, prior the selected node is deselected.</p>
+ <p class="highlight_red">If setting.view.selectedMulti = false, this para, this parameter is not valid, always select single node</p>
+ <h4 class="topLine"><b>Return </b><span>none</span></h4>
+ <p>no return value</p>
+ </div>
+ <h3>Exampleso of function</h3>
+ <h4>1. Select single node which be first selected.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodes();
+if (nodes.length>0) {
+ treeObj.selectNode(nodes[0]);
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.setChkDisabled.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.setChkDisabled.html
new file mode 100644
index 0000000..1d645e8
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.setChkDisabled.html
@@ -0,0 +1,44 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(node, disabled, inheritParent, inheritChildren)</span><span class="path">zTreeObj.</span>setChkDisabled</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Set the node's checkbox or radio is disabled or remove disabled. It is valid when <span class="highlight_red">[setting.check.enable = true]</span></p>
+ <p class="highlight_red">1. After the node's checkbox / radio is disabled, it can not be checked or unchecked, but it can affect the half-checked status of the parent node.</p>
+ <p class="highlight_red">2. Please do not directly modify the 'chkDisabled' attribute of the loaded node.</p>
+ <p class="highlight_red">3. Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which need to be checked or unchecked.</p>
+ <p class="highlight_red">Please ensure that this data object is an internal node data object in zTree.</p>
+ <h4 class="topLine"><b>disabled</b><span>Boolean</span></h4>
+ <p>disabled = true means: the node's checkbox / radio is disabled.</p>
+ <p>disabled = false means: the node's checkbox / radio is removed disabled.</p>
+ <p class="highlight_red">If this parameter is omitted, it is same as disabled = false </p>
+ <p class="highlight_red">Don't affect the node which 'nochecked' attribute is true.</p>
+ <h4 class="topLine"><b>inheritParent</b><span>Boolean</span></h4>
+ <p>inheritParent = true means: all parent nodes's disabled status will be same as this node.</p>
+ <p>inheritParent = false means: all parent nodes's disabled status will be not affected.</p>
+ <p class="highlight_red">If this parameter is omitted, it is same as 'inheritParent = false'</p>
+ <h4 class="topLine"><b>inheritChildren</b><span>Boolean</span></h4>
+ <p>inheritChildren = true means: all child nodes's disabled status will be same as this node.</p>
+ <p>inheritChildren = false means: all child nodes's disabled status will be not affected.</p>
+ <p class="highlight_red">If this parameter is omitted, it is same as 'inheritChildren = false'</p>
+ <h4 class="topLine"><b>Return </b><span>none</span></h4>
+ <p>no return value</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Set the selected nodes's checkbox / radio to be disabled.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getSelectedNodes();
+for (var i=0, l=nodes.length; i < l; i++) {
+ treeObj.setChkDisabled(nodes[i], true);
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.setEditable.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.setEditable.html
new file mode 100644
index 0000000..a44b0ff
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.setEditable.html
@@ -0,0 +1,27 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(editable)</span><span class="path">zTreeObj.</span>setEditable</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Edit mode and normal mode switch.</p>
+ <p class="highlight_red">To use edit mode, please set the attributes in 'setting.edit'</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>editable</b><span>Boolean</span></h4>
+ <p>true means: set zTree to edit mode.</p>
+ <p>false means: set zTree to normal mode.</p>
+ <h4><b>Return </b><span>none</span></h4>
+ <p>no return value</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. set zTree to edit mode</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+treeObj.setEditable(true);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.setting.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.setting.html
new file mode 100644
index 0000000..d80c139
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.setting.html
@@ -0,0 +1,14 @@
+<div class="apiDetail">
+<div>
+ <h2><span>JSON</span><span class="path">zTreeObj.</span>setting</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>The configuration data of zTree, refer to "<span class="highlight_red">setting details</span>" </p>
+ <p class="highlight_red">zTree v3.x to cancel the original operation setting method, so users can modify.</p>
+ <p class="highlight_red">Note: Modify the parameters which affect zTree initialization will not work, please first understand the different attributes.</p>
+ </div>
+ </div>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.showNode.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.showNode.html
new file mode 100644
index 0000000..53b5cbd
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.showNode.html
@@ -0,0 +1,31 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNode)</span><span class="path">zTreeObj.</span>showNode</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exhide</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>To hide any node which be hidden.</p>
+ <p class="highlight_red">1. This feature can't support the 'exedit' feature, so please don't use this feature in edit mode.</p>
+ <p class="highlight_red">2. If you hide or show the nodes, it will effect the 'isFirstNode' and 'isLastNode' attribute.</p>
+ <p class="highlight_red">3. Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeNodes</b><span>Array(JSON)</span></h4>
+ <p>JSON data object of the node which will be shown</p>
+ <p class="highlight_red">Please ensure that this data object is an internal node data object in zTree.</p>
+ <h4 class="topLine"><b>Retrun </b><span>none</span></h4>
+ <p>no return value</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. show someone node which be hidden.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var node = treeObj.getNodeByParam("isHidden", true);
+if (node) {
+ treeObj.showNode(node);
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.showNodes.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.showNodes.html
new file mode 100644
index 0000000..c0c926c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.showNodes.html
@@ -0,0 +1,29 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNodes)</span><span class="path">zTreeObj.</span>showNodes</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exhide</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>To show a group of nodes which be hidden.</p>
+ <p class="highlight_red">1. This feature can't support the 'exedit' feature, so please don't use this feature in edit mode.</p>
+ <p class="highlight_red">2. If you hide or show the nodes, it will effect the 'isFirstNode' and 'isLastNode' attribute.</p>
+ <p class="highlight_red">3. Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeNodes</b><span>Array(JSON)</span></h4>
+ <p>the array of the nodes which will be shown</p>
+ <p class="highlight_red">Please ensure that this data object is an internal node data object in zTree.</p>
+ <h4 class="topLine"><b>Retrun </b><span>none</span></h4>
+ <p>no return value</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. show all of the nodes which be hidden.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodesByParam("isHidden", true);
+treeObj.showNodes(nodes);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.transformToArray.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.transformToArray.html
new file mode 100644
index 0000000..4b2296d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.transformToArray.html
@@ -0,0 +1,27 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNodes)</span><span class="path">zTreeObj.</span>transformToArray</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p></p>
+ <p>Transform the zTree nodes data into simple array. (To avoid the user to write code to traverse all nodes)</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeNodes</b><span>Array(JSON) / JSON</span></h4>
+ <p>JSON data object of the node which need to be transformed.</p>
+ <p>or JSON data objects collection of the nodes which need to be transformed.</p>
+ <h4 class="topLine"><b>Return </b><span>Array(JSON)</span></h4>
+ <p>The JSON data objects array of the nodes which be transformed.</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Transform the zTree nodes data into simple array.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.transformToArray(treeObj.getNodes());
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.transformTozTreeNodes.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.transformTozTreeNodes.html
new file mode 100644
index 0000000..51d4a62
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.transformTozTreeNodes.html
@@ -0,0 +1,44 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(simpleNodes)</span><span class="path">zTreeObj.</span>transformTozTreeNodes</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Transform the simple array into zTree nodes data.</p>
+ <p class="highlight_red">If you use this method, you must set 'setting.data.simpleData.idKey' and 'setting.data.simpleData.pIdKey' attribute, and let the data are consistent with parent-child relationship.</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>simpleNodes</b><span>Array(JSON) / JSON</span></h4>
+ <p>JSON data object of the node which need to be transformed.</p>
+ <p>or JSON data objects array of the nodes which need to be transformed.</p>
+ <h4 class="topLine"><b>Return </b><span>Array(JSON)</span></h4>
+ <p>Standard data which zTree use. The child nodes are stored in the parent node's 'children' attribute.</p>
+ <p class="highlight_red">If simpleNodes is a single JSON, so the return array's length is 1.</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Transform the simple array data into zTree nodes format.</h4>
+ <pre xmlns=""><code>var setting = {
+ data: {
+ simpleData: {
+ enable: true,
+ idKey: "id",
+ pIdKey: "pId",
+ rootPId: 0,
+ }
+ }
+};
+var simpleNodes = [
+ {"id":1, "pId":0, "name":"test1"},
+ {"id":11, "pId":1, "name":"test11"},
+ {"id":12, "pId":1, "name":"test12"},
+ {"id":111, "pId":11, "name":"test111"}
+];
+var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.transformTozTreeNodes(simpleNodes);
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.updateNode.html b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.updateNode.html
new file mode 100644
index 0000000..7639ff4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/api/en/zTreeObj.updateNode.html
@@ -0,0 +1,37 @@
+<div class="apiDetail">
+<div>
+ <h2><span>Function(treeNode, checkTypeFlag)</span><span class="path">zTreeObj.</span>updateNode</h2>
+ <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
+ <div class="desc">
+ <p></p>
+ <div class="longdesc">
+ <p>Update node data. Primarily used to update the node's DOM.</p>
+ <p class="highlight_red">1. Can update the attributes for display (e.g. 'name', 'target', 'url', 'icon', 'iconSkin', 'checked', 'nocheck'), do not update the other attributes. For example: If you need to expand the node, please use expandNode() method, do not modify the 'open' attribute.</p>
+ <p class="highlight_red">2. Use updateNode() method of zTree can't trigger 'beforeCheck' or 'onCheck' callback function.</p>
+ <p class="highlight_red">Please use zTree object to executing the method.</p>
+ </div>
+ </div>
+ <h3>Function Parameter Descriptions</h3>
+ <div class="desc">
+ <h4><b>treeNode</b><span>JSON</span></h4>
+ <p>JSON data object of the node which need to update.</p>
+ <p class="highlight_red">Please ensure that this data object is an internal node data object in zTree.</p>
+ <h4 class="topLine"><b>checkTypeFlag</b><span>Boolean</span></h4>
+ <p>checkTypeFlag = true means: According to 'setting.check.chkboxType' attribute automatically check or uncheck the parent and child nodes.</p>
+ <p>checkTypeFlag = false means: only check or uncheck this node, don't affect its parent and child nodes.</p>
+ <p class="highlight_red">This parameter is valid when 'setting.check.enable = true' and 'setting.check.chkStyle = "checkbox"'</p>
+ <p class="highlight_red">Don't affect the parent and child nodes which 'nochecked' attribute is true.</p>
+ <h4 class="topLine"><b>Return </b><span>none</span></h4>
+ <p>no return value</p>
+ </div>
+ <h3>Examples of function</h3>
+ <h4>1. Modify the first selected node's name, and update it.</h4>
+ <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getNodes();
+if (nodes.length>0) {
+ nodes[0].name = "test";
+ treeObj.updateNode(nodes[0]);
+}
+</code></pre>
+</div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/css/demo.css b/common/src/main/webapp/thirdparty/zTree/css/demo.css
new file mode 100644
index 0000000..8406006
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/css/demo.css
@@ -0,0 +1,33 @@
+/* html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
+ margin: 0;padding: 0;border: 0;outline: 0;font-weight: inherit;font-style: inherit;font-size: 100%;font-family: inherit;vertical-align: baseline;}
+body {color: #2f332a;font: 15px/21px Arial, Helvetica, simsun, sans-serif;background: #f0f6e4 \9;}
+h1, h2, h3, h4, h5, h6 {color: #2f332a;font-weight: bold;font-family: Helvetica, Arial, sans-serif;padding-bottom: 5px;}
+h1 {font-size: 24px;line-height: 34px;text-align: center;}
+h2 {font-size: 14px;line-height: 24px;padding-top: 5px;}
+h6 {font-weight: normal;font-size: 12px;letter-spacing: 1px;line-height: 24px;text-align: center;} */
+/* a {color:#3C6E31;text-decoration: underline;}
+a:hover {background-color:#3C6E31;color:white;} */
+input.radio {margin: 0 2px 0 8px;}
+input.radio.first {margin-left:0;}
+input.empty {color: lightgray;}
+code {color: #2f332a;}
+.highlight_red {color:#A60000;}
+.highlight_green {color:#A7F43D;}
+li {list-style: circle;font-size: 12px;}
+li.title {list-style: none;}
+ul.list {margin-left: 17px;}
+
+div.content_wrap {width: 600px;height:380px;}
+div.content_wrap div.left{float: left;width: 250px;}
+div.content_wrap div.right{float: right;width: 340px;}
+div.zTreeDemoBackground {width:250px;height:362px;text-align:left;}
+
+ul.ztree {margin-top: 10px;border: 1px solid #eee;/*background: #f0f6e4;width:220px;height:360px;*/overflow-y:auto;overflow-x:auto;/*ict*/padding: 25px;padding-right: 50px;}
+ul.log {border: 1px solid #617775;background: #f0f6e4;width:300px;height:170px;overflow: hidden;}
+ul.log.small {height:45px;}
+ul.log li {color: #666666;list-style: none;padding-left: 10px;}
+ul.log li.dark {background-color: #E3E3E3;}
+
+/* ruler */
+div.ruler {height:20px; width:220px; background-color:#f0f6e4;border: 1px solid #333; margin-bottom: 5px; cursor: pointer}
+div.ruler div.cursor {height:20px; width:30px; background-color:#3C6E31; color:white; text-align: right; padding-right: 5px; cursor: pointer} \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/ReadMe.txt b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/ReadMe.txt
new file mode 100644
index 0000000..c4ae443
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/ReadMe.txt
@@ -0,0 +1 @@
+Èç¹ûÒýÈëµÄÊ÷×é¼þÎÞÐè¸üнڵ㣬ÈçÌí¼Óɾ³ý¸üÐÂÍÏק½Úµã£¬ÇëÒýÈëzTreeStyle_select.cssÎļþ¡£ \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/Thumbs.db b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/Thumbs.db
new file mode 100644
index 0000000..4fe7e7e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/Thumbs.db
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/1_close.png b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/1_close.png
new file mode 100644
index 0000000..68ccb3c
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/1_close.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/1_open.png b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/1_open.png
new file mode 100644
index 0000000..d6ff36d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/1_open.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/2.png b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/2.png
new file mode 100644
index 0000000..9eff506
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/2.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/3.png b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/3.png
new file mode 100644
index 0000000..d7ba6d0
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/3.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/4.png b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/4.png
new file mode 100644
index 0000000..753e2bf
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/4.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/5.png b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/5.png
new file mode 100644
index 0000000..0c5eccd
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/5.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/6.png b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/6.png
new file mode 100644
index 0000000..070b835
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/6.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/7.png b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/7.png
new file mode 100644
index 0000000..532b037
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/7.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/8.png b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/8.png
new file mode 100644
index 0000000..a8f3a86
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/8.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/9.png b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/9.png
new file mode 100644
index 0000000..4db73cd
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/9.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/Thumbs.db b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/Thumbs.db
new file mode 100644
index 0000000..f4a4617
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/diy/Thumbs.db
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/line_conn.gif b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/line_conn.gif
new file mode 100644
index 0000000..d561d36
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/line_conn.gif
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/loading.gif b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/loading.gif
new file mode 100644
index 0000000..e8c2892
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/loading.gif
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/zTreeStandard.gif b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/zTreeStandard.gif
new file mode 100644
index 0000000..50c94fd
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/zTreeStandard.gif
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/zTreeStandard.gifbak b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/zTreeStandard.gifbak
new file mode 100644
index 0000000..50c94fd
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/zTreeStandard.gifbak
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/zTreeStandard.png b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/zTreeStandard.png
new file mode 100644
index 0000000..e831f6d
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/zTreeStandard.png
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/zTreeStandard.pngbak b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/zTreeStandard.pngbak
new file mode 100644
index 0000000..ffda01e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/zTreeStandard.pngbak
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/zTreeStandard.psd b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/zTreeStandard.psd
new file mode 100644
index 0000000..e3630f4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/img/zTreeStandard.psd
Binary files differ
diff --git a/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/zTreeStyle.css b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/zTreeStyle.css
new file mode 100644
index 0000000..d40353f
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/css/zTreeStyle/zTreeStyle.css
@@ -0,0 +1,107 @@
+/*-------------------------------------
+zTree Style
+
+version: 3.4
+author: Hunter.z
+email: hunter.z@263.net
+website: http://code.google.com/p/jquerytree/
+
+-------------------------------------*/
+
+.ztree * {padding:0; margin:0; font-size:14px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif}
+.ztree {margin:0; padding:5px; color:#333; /*overflow-x: auto;*/ overflow-x: visible;}
+.ztree li{padding:0; margin:0; list-style:none; line-height:14px; text-align:left; white-space:nowrap; outline:0}
+.ztree li ul{ margin:0; padding:0 0 0 18px}
+.ztree li ul.line{ background:url(./img/line_conn.gif) 0 0 repeat-y;}
+
+.ztree li a {padding:1px 3px 0 0; margin:0; cursor:pointer; height:30px; color:#333; background-color: transparent;
+ text-decoration:none; vertical-align:top; display: inline-block;
+ /*ict*/width:100%;
+ background: #fff;
+ border: 1px solid #eeeeee;
+ color: #606060;
+ padding: 10px ;
+ padding-top: 5px;
+ padding-right:10%;
+}
+.ztree li a:hover {text-decoration:underline}
+.ztree li a.curSelectedNode {padding-top:5px; background-color:#e7f2f9; color:#2a2a2a; height:28px; border:1px #accbdd solid; opacity:0.8;}
+.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#e7f2f9; color:#2a2a2a; height:16px; border:1px #accbdd solid; opacity:0.8;}
+.ztree li a.tmpTargetNode_inner {padding-top:5px; background-color:#316AC5; color:white; height:26px; border:1px #316AC5 solid;
+ opacity:0.8; filter:alpha(opacity=80)}
+.ztree li a.tmpTargetNode_prev {}
+.ztree li a.tmpTargetNode_next {}
+.ztree li a input.rename {height:14px; width:80px; padding:0; margin:0;
+ font-size:12px; border:1px #7EC4CC solid; *border:0px}
+.ztree li span {line-height:16px; margin-right:2px}
+.ztree li span.button {line-height:0; margin:0; width:16px; height:16px; display: inline-block; vertical-align:middle;
+ border:0 none; cursor: pointer;outline:none;
+ background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
+ background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")}
+
+.ztree li span.button.chk {width:13px; height:13px; margin:0 3px 0 0; cursor: auto}
+.ztree li span.button.chk.checkbox_false_full {background-position:0 0}
+.ztree li span.button.chk.checkbox_false_full_focus {background-position:0 -14px}
+.ztree li span.button.chk.checkbox_false_part {background-position:0 -28px}
+.ztree li span.button.chk.checkbox_false_part_focus {background-position:0 -42px}
+.ztree li span.button.chk.checkbox_false_disable {background-position:0 -56px}
+.ztree li span.button.chk.checkbox_true_full {background-position:-14px 0}
+.ztree li span.button.chk.checkbox_true_full_focus {background-position:-14px -14px}
+.ztree li span.button.chk.checkbox_true_part {background-position:-14px -28px}
+.ztree li span.button.chk.checkbox_true_part_focus {background-position:-14px -42px}
+.ztree li span.button.chk.checkbox_true_disable {background-position:-14px -56px}
+.ztree li span.button.chk.radio_false_full {background-position:-28px 0}
+.ztree li span.button.chk.radio_false_full_focus {background-position:-28px -14px}
+.ztree li span.button.chk.radio_false_part {background-position:-28px -28px}
+.ztree li span.button.chk.radio_false_part_focus {background-position:-28px -42px}
+.ztree li span.button.chk.radio_false_disable {background-position:-28px -56px}
+.ztree li span.button.chk.radio_true_full {background-position:-42px 0}
+.ztree li span.button.chk.radio_true_full_focus {background-position:-42px -14px}
+.ztree li span.button.chk.radio_true_part {background-position:-42px -28px}
+.ztree li span.button.chk.radio_true_part_focus {background-position:-42px -42px}
+.ztree li span.button.chk.radio_true_disable {background-position:-42px -56px}
+
+.ztree li span.button.switch {width:18px; height:18px}
+.ztree li span.button.root_open{background-position:-92px -54px}
+.ztree li span.button.root_close{background-position:-74px -54px}
+.ztree li span.button.roots_open{background-position:-92px 0}
+.ztree li span.button.roots_close{background-position:-74px 0}
+.ztree li span.button.center_open{background-position:-92px -18px}
+.ztree li span.button.center_close{background-position:-74px -18px}
+.ztree li span.button.bottom_open{background-position:-92px -36px}
+.ztree li span.button.bottom_close{background-position:-74px -36px}
+.ztree li span.button.noline_open{background-position:-92px -72px}
+.ztree li span.button.noline_close{background-position:-74px -72px}
+.ztree li span.button.root_docu{ background:none;}
+.ztree li span.button.roots_docu{background-position:-56px 0}
+.ztree li span.button.center_docu{background-position:-56px -18px}
+.ztree li span.button.bottom_docu{background-position:-56px -36px}
+.ztree li span.button.noline_docu{ background:none;}
+
+.ztree li span.button.ico_open{margin-right:2px; background-position:-110px -16px; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.ico_close{margin-right:2px; background-position:-110px 0; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.ico_docu{margin-right:2px; background-position:-110px -32px; vertical-align:top; *vertical-align:middle}
+/*ict*/
+.ztree li span.button.add {margin-left:2px; /* margin-right: -1px; */ margin-right: 2px; background-position:-144px 0; vertical-align:top; *vertical-align:middle;float: right;}
+.ztree li span.button.edit {margin-right:2px; background-position:-110px -48px; vertical-align:top; *vertical-align:middle;float: right;}
+.ztree li span.button.remove {margin-right:2px; background-position:-110px -64px; vertical-align:top; *vertical-align:middle;float: right;}
+
+.ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
+
+ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)}
+
+span.tmpzTreeMove_arrow {width:16px; height:16px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute;
+ background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
+ background-position:-110px -80px; background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")}
+
+ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)}
+.zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute}
+
+/* level style*/
+/*.ztree li span.button.level0 {
+ display:none;
+}
+.ztree li ul.level0 {
+ padding:0;
+ background:none;
+}*/ \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.all.js b/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.all.js
new file mode 100644
index 0000000..28bca45
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.all.js
@@ -0,0 +1,3506 @@
+
+/*
+ * JQuery zTree core v3.5.16
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2014-03-09
+ */
+(function($){
+ var settings = {}, roots = {}, caches = {},
+ //default consts of core
+ _consts = {
+ className: {
+ BUTTON: "button",
+ LEVEL: "level",
+ ICO_LOADING: "ico_loading",
+ SWITCH: "switch"
+ },
+ event: {
+ NODECREATED: "ztree_nodeCreated",
+ CLICK: "ztree_click",
+ EXPAND: "ztree_expand",
+ COLLAPSE: "ztree_collapse",
+ ASYNC_SUCCESS: "ztree_async_success",
+ ASYNC_ERROR: "ztree_async_error",
+ REMOVE: "ztree_remove"
+ },
+ id: {
+ A: "_a",
+ ICON: "_ico",
+ SPAN: "_span",
+ SWITCH: "_switch",
+ UL: "_ul"
+ },
+ line: {
+ ROOT: "root",
+ ROOTS: "roots",
+ CENTER: "center",
+ BOTTOM: "bottom",
+ NOLINE: "noline",
+ LINE: "line"
+ },
+ folder: {
+ OPEN: "open",
+ CLOSE: "close",
+ DOCU: "docu"
+ },
+ node: {
+ CURSELECTED: "curSelectedNode"
+ }
+ },
+ //default setting of core
+ _setting = {
+ treeId: "",
+ treeObj: null,
+ view: {
+ addDiyDom: null,
+ autoCancelSelected: true,
+ dblClickExpand: true,
+ expandSpeed: "fast",
+ fontCss: {},
+ nameIsHTML: false,
+ selectedMulti: true,
+ showIcon: true,
+ showLine: true,
+ showTitle: true,
+ txtSelectedEnable: false
+ },
+ data: {
+ key: {
+ children: "children",
+ name: "name",
+ title: "",
+ url: "url"
+ },
+ simpleData: {
+ enable: false,
+ idKey: "id",
+ pIdKey: "pId",
+ rootPId: null
+ },
+ keep: {
+ parent: false,
+ leaf: false
+ }
+ },
+ async: {
+ enable: false,
+ contentType: "application/x-www-form-urlencoded",
+ type: "post",
+ dataType: "text",
+ url: "",
+ autoParam: [],
+ otherParam: [],
+ dataFilter: null
+ },
+ callback: {
+ beforeAsync:null,
+ beforeClick:null,
+ beforeDblClick:null,
+ beforeRightClick:null,
+ beforeMouseDown:null,
+ beforeMouseUp:null,
+ beforeExpand:null,
+ beforeCollapse:null,
+ beforeRemove:null,
+
+ onAsyncError:null,
+ onAsyncSuccess:null,
+ onNodeCreated:null,
+ onClick:null,
+ onDblClick:null,
+ onRightClick:null,
+ onMouseDown:null,
+ onMouseUp:null,
+ onExpand:null,
+ onCollapse:null,
+ onRemove:null
+ }
+ },
+ //default root of core
+ //zTree use root to save full data
+ _initRoot = function (setting) {
+ var r = data.getRoot(setting);
+ if (!r) {
+ r = {};
+ data.setRoot(setting, r);
+ }
+ r[setting.data.key.children] = [];
+ r.expandTriggerFlag = false;
+ r.curSelectedList = [];
+ r.noSelection = true;
+ r.createdNodes = [];
+ r.zId = 0;
+ r._ver = (new Date()).getTime();
+ },
+ //default cache of core
+ _initCache = function(setting) {
+ var c = data.getCache(setting);
+ if (!c) {
+ c = {};
+ data.setCache(setting, c);
+ }
+ c.nodes = [];
+ c.doms = [];
+ },
+ //default bindEvent of core
+ _bindEvent = function(setting) {
+ var o = setting.treeObj,
+ c = consts.event;
+ o.bind(c.NODECREATED, function (event, treeId, node) {
+ tools.apply(setting.callback.onNodeCreated, [event, treeId, node]);
+ });
+
+ o.bind(c.CLICK, function (event, srcEvent, treeId, node, clickFlag) {
+ tools.apply(setting.callback.onClick, [srcEvent, treeId, node, clickFlag]);
+ });
+
+ o.bind(c.EXPAND, function (event, treeId, node) {
+ tools.apply(setting.callback.onExpand, [event, treeId, node]);
+ });
+
+ o.bind(c.COLLAPSE, function (event, treeId, node) {
+ tools.apply(setting.callback.onCollapse, [event, treeId, node]);
+ });
+
+ o.bind(c.ASYNC_SUCCESS, function (event, treeId, node, msg) {
+ tools.apply(setting.callback.onAsyncSuccess, [event, treeId, node, msg]);
+ });
+
+ o.bind(c.ASYNC_ERROR, function (event, treeId, node, XMLHttpRequest, textStatus, errorThrown) {
+ tools.apply(setting.callback.onAsyncError, [event, treeId, node, XMLHttpRequest, textStatus, errorThrown]);
+ });
+
+ o.bind(c.REMOVE, function (event, treeId, treeNode) {
+ tools.apply(setting.callback.onRemove, [event, treeId, treeNode]);
+ });
+ },
+ _unbindEvent = function(setting) {
+ var o = setting.treeObj,
+ c = consts.event;
+ o.unbind(c.NODECREATED)
+ .unbind(c.CLICK)
+ .unbind(c.EXPAND)
+ .unbind(c.COLLAPSE)
+ .unbind(c.ASYNC_SUCCESS)
+ .unbind(c.ASYNC_ERROR)
+ .unbind(c.REMOVE);
+ },
+ //default event proxy of core
+ _eventProxy = function(event) {
+ var target = event.target,
+ setting = data.getSetting(event.data.treeId),
+ tId = "", node = null,
+ nodeEventType = "", treeEventType = "",
+ nodeEventCallback = null, treeEventCallback = null,
+ tmp = null;
+
+ if (tools.eqs(event.type, "mousedown")) {
+ treeEventType = "mousedown";
+ } else if (tools.eqs(event.type, "mouseup")) {
+ treeEventType = "mouseup";
+ } else if (tools.eqs(event.type, "contextmenu")) {
+ treeEventType = "contextmenu";
+ } else if (tools.eqs(event.type, "click")) {
+ if (tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.SWITCH) !== null) {
+ tId = tools.getNodeMainDom(target).id;
+ nodeEventType = "switchNode";
+ } else {
+ tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (tmp) {
+ tId = tools.getNodeMainDom(tmp).id;
+ nodeEventType = "clickNode";
+ }
+ }
+ } else if (tools.eqs(event.type, "dblclick")) {
+ treeEventType = "dblclick";
+ tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (tmp) {
+ tId = tools.getNodeMainDom(tmp).id;
+ nodeEventType = "switchNode";
+ }
+ }
+ if (treeEventType.length > 0 && tId.length == 0) {
+ tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (tmp) {tId = tools.getNodeMainDom(tmp).id;}
+ }
+ // event to node
+ if (tId.length>0) {
+ node = data.getNodeCache(setting, tId);
+ switch (nodeEventType) {
+ case "switchNode" :
+ if (!node.isParent) {
+ nodeEventType = "";
+ } else if (tools.eqs(event.type, "click")
+ || (tools.eqs(event.type, "dblclick") && tools.apply(setting.view.dblClickExpand, [setting.treeId, node], setting.view.dblClickExpand))) {
+ nodeEventCallback = handler.onSwitchNode;
+ } else {
+ nodeEventType = "";
+ }
+ break;
+ case "clickNode" :
+ nodeEventCallback = handler.onClickNode;
+ break;
+ }
+ }
+ // event to zTree
+ switch (treeEventType) {
+ case "mousedown" :
+ treeEventCallback = handler.onZTreeMousedown;
+ break;
+ case "mouseup" :
+ treeEventCallback = handler.onZTreeMouseup;
+ break;
+ case "dblclick" :
+ treeEventCallback = handler.onZTreeDblclick;
+ break;
+ case "contextmenu" :
+ treeEventCallback = handler.onZTreeContextmenu;
+ break;
+ }
+ var proxyResult = {
+ stop: false,
+ node: node,
+ nodeEventType: nodeEventType,
+ nodeEventCallback: nodeEventCallback,
+ treeEventType: treeEventType,
+ treeEventCallback: treeEventCallback
+ };
+ return proxyResult
+ },
+ //default init node of core
+ _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
+ if (!n) return;
+ var r = data.getRoot(setting),
+ childKey = setting.data.key.children;
+ n.level = level;
+ n.tId = setting.treeId + "_" + (++r.zId);
+ n.parentTId = parentNode ? parentNode.tId : null;
+ n.open = (typeof n.open == "string") ? tools.eqs(n.open, "true") : !!n.open;
+ if (n[childKey] && n[childKey].length > 0) {
+ n.isParent = true;
+ n.zAsync = true;
+ } else {
+ n.isParent = (typeof n.isParent == "string") ? tools.eqs(n.isParent, "true") : !!n.isParent;
+ n.open = (n.isParent && !setting.async.enable) ? n.open : false;
+ n.zAsync = !n.isParent;
+ }
+ n.isFirstNode = isFirstNode;
+ n.isLastNode = isLastNode;
+ n.getParentNode = function() {return data.getNodeCache(setting, n.parentTId);};
+ n.getPreNode = function() {return data.getPreNode(setting, n);};
+ n.getNextNode = function() {return data.getNextNode(setting, n);};
+ n.isAjaxing = false;
+ data.fixPIdKeyValue(setting, n);
+ },
+ _init = {
+ bind: [_bindEvent],
+ unbind: [_unbindEvent],
+ caches: [_initCache],
+ nodes: [_initNode],
+ proxys: [_eventProxy],
+ roots: [_initRoot],
+ beforeA: [],
+ afterA: [],
+ innerBeforeA: [],
+ innerAfterA: [],
+ zTreeTools: []
+ },
+ //method of operate data
+ data = {
+ addNodeCache: function(setting, node) {
+ data.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = node;
+ },
+ getNodeCacheId: function(tId) {
+ return tId.substring(tId.lastIndexOf("_")+1);
+ },
+ addAfterA: function(afterA) {
+ _init.afterA.push(afterA);
+ },
+ addBeforeA: function(beforeA) {
+ _init.beforeA.push(beforeA);
+ },
+ addInnerAfterA: function(innerAfterA) {
+ _init.innerAfterA.push(innerAfterA);
+ },
+ addInnerBeforeA: function(innerBeforeA) {
+ _init.innerBeforeA.push(innerBeforeA);
+ },
+ addInitBind: function(bindEvent) {
+ _init.bind.push(bindEvent);
+ },
+ addInitUnBind: function(unbindEvent) {
+ _init.unbind.push(unbindEvent);
+ },
+ addInitCache: function(initCache) {
+ _init.caches.push(initCache);
+ },
+ addInitNode: function(initNode) {
+ _init.nodes.push(initNode);
+ },
+ addInitProxy: function(initProxy, isFirst) {
+ if (!!isFirst) {
+ _init.proxys.splice(0,0,initProxy);
+ } else {
+ _init.proxys.push(initProxy);
+ }
+ },
+ addInitRoot: function(initRoot) {
+ _init.roots.push(initRoot);
+ },
+ addNodesData: function(setting, parentNode, nodes) {
+ var childKey = setting.data.key.children;
+ if (!parentNode[childKey]) parentNode[childKey] = [];
+ if (parentNode[childKey].length > 0) {
+ parentNode[childKey][parentNode[childKey].length - 1].isLastNode = false;
+ view.setNodeLineIcos(setting, parentNode[childKey][parentNode[childKey].length - 1]);
+ }
+ parentNode.isParent = true;
+ parentNode[childKey] = parentNode[childKey].concat(nodes);
+ },
+ addSelectedNode: function(setting, node) {
+ var root = data.getRoot(setting);
+ if (!data.isSelectedNode(setting, node)) {
+ root.curSelectedList.push(node);
+ }
+ },
+ addCreatedNode: function(setting, node) {
+ if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) {
+ var root = data.getRoot(setting);
+ root.createdNodes.push(node);
+ }
+ },
+ addZTreeTools: function(zTreeTools) {
+ _init.zTreeTools.push(zTreeTools);
+ },
+ exSetting: function(s) {
+ $.extend(true, _setting, s);
+ },
+ fixPIdKeyValue: function(setting, node) {
+ if (setting.data.simpleData.enable) {
+ node[setting.data.simpleData.pIdKey] = node.parentTId ? node.getParentNode()[setting.data.simpleData.idKey] : setting.data.simpleData.rootPId;
+ }
+ },
+ getAfterA: function(setting, node, array) {
+ for (var i=0, j=_init.afterA.length; i<j; i++) {
+ _init.afterA[i].apply(this, arguments);
+ }
+ },
+ getBeforeA: function(setting, node, array) {
+ for (var i=0, j=_init.beforeA.length; i<j; i++) {
+ _init.beforeA[i].apply(this, arguments);
+ }
+ },
+ getInnerAfterA: function(setting, node, array) {
+ for (var i=0, j=_init.innerAfterA.length; i<j; i++) {
+ _init.innerAfterA[i].apply(this, arguments);
+ }
+ },
+ getInnerBeforeA: function(setting, node, array) {
+ for (var i=0, j=_init.innerBeforeA.length; i<j; i++) {
+ _init.innerBeforeA[i].apply(this, arguments);
+ }
+ },
+ getCache: function(setting) {
+ return caches[setting.treeId];
+ },
+ getNextNode: function(setting, node) {
+ if (!node) return null;
+ var childKey = setting.data.key.children,
+ p = node.parentTId ? node.getParentNode() : data.getRoot(setting);
+ for (var i=0, l=p[childKey].length-1; i<=l; i++) {
+ if (p[childKey][i] === node) {
+ return (i==l ? null : p[childKey][i+1]);
+ }
+ }
+ return null;
+ },
+ getNodeByParam: function(setting, nodes, key, value) {
+ if (!nodes || !key) return null;
+ var childKey = setting.data.key.children;
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ if (nodes[i][key] == value) {
+ return nodes[i];
+ }
+ var tmp = data.getNodeByParam(setting, nodes[i][childKey], key, value);
+ if (tmp) return tmp;
+ }
+ return null;
+ },
+ getNodeCache: function(setting, tId) {
+ if (!tId) return null;
+ var n = caches[setting.treeId].nodes[data.getNodeCacheId(tId)];
+ return n ? n : null;
+ },
+ getNodeName: function(setting, node) {
+ var nameKey = setting.data.key.name;
+ return "" + node[nameKey];
+ },
+ getNodeTitle: function(setting, node) {
+ var t = setting.data.key.title === "" ? setting.data.key.name : setting.data.key.title;
+ return "" + node[t];
+ },
+ getNodes: function(setting) {
+ return data.getRoot(setting)[setting.data.key.children];
+ },
+ getNodesByParam: function(setting, nodes, key, value) {
+ if (!nodes || !key) return [];
+ var childKey = setting.data.key.children,
+ result = [];
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ if (nodes[i][key] == value) {
+ result.push(nodes[i]);
+ }
+ result = result.concat(data.getNodesByParam(setting, nodes[i][childKey], key, value));
+ }
+ return result;
+ },
+ getNodesByParamFuzzy: function(setting, nodes, key, value) {
+ if (!nodes || !key) return [];
+ var childKey = setting.data.key.children,
+ result = [];
+ value = value.toLowerCase();
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ if (typeof nodes[i][key] == "string" && nodes[i][key].toLowerCase().indexOf(value)>-1) {
+ result.push(nodes[i]);
+ }
+ result = result.concat(data.getNodesByParamFuzzy(setting, nodes[i][childKey], key, value));
+ }
+ return result;
+ },
+ getNodesByFilter: function(setting, nodes, filter, isSingle, invokeParam) {
+ if (!nodes) return (isSingle ? null : []);
+ var childKey = setting.data.key.children,
+ result = isSingle ? null : [];
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ if (tools.apply(filter, [nodes[i], invokeParam], false)) {
+ if (isSingle) {return nodes[i];}
+ result.push(nodes[i]);
+ }
+ var tmpResult = data.getNodesByFilter(setting, nodes[i][childKey], filter, isSingle, invokeParam);
+ if (isSingle && !!tmpResult) {return tmpResult;}
+ result = isSingle ? tmpResult : result.concat(tmpResult);
+ }
+ return result;
+ },
+ getPreNode: function(setting, node) {
+ if (!node) return null;
+ var childKey = setting.data.key.children,
+ p = node.parentTId ? node.getParentNode() : data.getRoot(setting);
+ for (var i=0, l=p[childKey].length; i<l; i++) {
+ if (p[childKey][i] === node) {
+ return (i==0 ? null : p[childKey][i-1]);
+ }
+ }
+ return null;
+ },
+ getRoot: function(setting) {
+ return setting ? roots[setting.treeId] : null;
+ },
+ getRoots: function() {
+ return roots;
+ },
+ getSetting: function(treeId) {
+ return settings[treeId];
+ },
+ getSettings: function() {
+ return settings;
+ },
+ getZTreeTools: function(treeId) {
+ var r = this.getRoot(this.getSetting(treeId));
+ return r ? r.treeTools : null;
+ },
+ initCache: function(setting) {
+ for (var i=0, j=_init.caches.length; i<j; i++) {
+ _init.caches[i].apply(this, arguments);
+ }
+ },
+ initNode: function(setting, level, node, parentNode, preNode, nextNode) {
+ for (var i=0, j=_init.nodes.length; i<j; i++) {
+ _init.nodes[i].apply(this, arguments);
+ }
+ },
+ initRoot: function(setting) {
+ for (var i=0, j=_init.roots.length; i<j; i++) {
+ _init.roots[i].apply(this, arguments);
+ }
+ },
+ isSelectedNode: function(setting, node) {
+ var root = data.getRoot(setting);
+ for (var i=0, j=root.curSelectedList.length; i<j; i++) {
+ if(node === root.curSelectedList[i]) return true;
+ }
+ return false;
+ },
+ removeNodeCache: function(setting, node) {
+ var childKey = setting.data.key.children;
+ if (node[childKey]) {
+ for (var i=0, l=node[childKey].length; i<l; i++) {
+ arguments.callee(setting, node[childKey][i]);
+ }
+ }
+ data.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = null;
+ },
+ removeSelectedNode: function(setting, node) {
+ var root = data.getRoot(setting);
+ for (var i=0, j=root.curSelectedList.length; i<j; i++) {
+ if(node === root.curSelectedList[i] || !data.getNodeCache(setting, root.curSelectedList[i].tId)) {
+ root.curSelectedList.splice(i, 1);
+ i--;j--;
+ }
+ }
+ },
+ setCache: function(setting, cache) {
+ caches[setting.treeId] = cache;
+ },
+ setRoot: function(setting, root) {
+ roots[setting.treeId] = root;
+ },
+ setZTreeTools: function(setting, zTreeTools) {
+ for (var i=0, j=_init.zTreeTools.length; i<j; i++) {
+ _init.zTreeTools[i].apply(this, arguments);
+ }
+ },
+ transformToArrayFormat: function (setting, nodes) {
+ if (!nodes) return [];
+ var childKey = setting.data.key.children,
+ r = [];
+ if (tools.isArray(nodes)) {
+ for (var i=0, l=nodes.length; i<l; i++) {
+ r.push(nodes[i]);
+ if (nodes[i][childKey])
+ r = r.concat(data.transformToArrayFormat(setting, nodes[i][childKey]));
+ }
+ } else {
+ r.push(nodes);
+ if (nodes[childKey])
+ r = r.concat(data.transformToArrayFormat(setting, nodes[childKey]));
+ }
+ return r;
+ },
+ transformTozTreeFormat: function(setting, sNodes) {
+ var i,l,
+ key = setting.data.simpleData.idKey,
+ parentKey = setting.data.simpleData.pIdKey,
+ childKey = setting.data.key.children;
+ if (!key || key=="" || !sNodes) return [];
+
+ if (tools.isArray(sNodes)) {
+ var r = [];
+ var tmpMap = [];
+ for (i=0, l=sNodes.length; i<l; i++) {
+ tmpMap[sNodes[i][key]] = sNodes[i];
+ }
+ for (i=0, l=sNodes.length; i<l; i++) {
+ if (tmpMap[sNodes[i][parentKey]] && sNodes[i][key] != sNodes[i][parentKey]) {
+ if (!tmpMap[sNodes[i][parentKey]][childKey])
+ tmpMap[sNodes[i][parentKey]][childKey] = [];
+ tmpMap[sNodes[i][parentKey]][childKey].push(sNodes[i]);
+ } else {
+ r.push(sNodes[i]);
+ }
+ }
+ return r;
+ }else {
+ return [sNodes];
+ }
+ }
+ },
+ //method of event proxy
+ event = {
+ bindEvent: function(setting) {
+ for (var i=0, j=_init.bind.length; i<j; i++) {
+ _init.bind[i].apply(this, arguments);
+ }
+ },
+ unbindEvent: function(setting) {
+ for (var i=0, j=_init.unbind.length; i<j; i++) {
+ _init.unbind[i].apply(this, arguments);
+ }
+ },
+ bindTree: function(setting) {
+ var eventParam = {
+ treeId: setting.treeId
+ },
+ o = setting.treeObj;
+ if (!setting.view.txtSelectedEnable) {
+ // for can't select text
+ o.bind('selectstart', function(e){
+ var node
+ var n = e.originalEvent.srcElement.nodeName.toLowerCase();
+ return (n === "input" || n === "textarea" );
+ }).css({
+ "-moz-user-select":"-moz-none"
+ });
+ }
+ o.bind('click', eventParam, event.proxy);
+ o.bind('dblclick', eventParam, event.proxy);
+ o.bind('mouseover', eventParam, event.proxy);
+ o.bind('mouseout', eventParam, event.proxy);
+ o.bind('mousedown', eventParam, event.proxy);
+ o.bind('mouseup', eventParam, event.proxy);
+ o.bind('contextmenu', eventParam, event.proxy);
+ },
+ unbindTree: function(setting) {
+ var o = setting.treeObj;
+ o.unbind('click', event.proxy)
+ .unbind('dblclick', event.proxy)
+ .unbind('mouseover', event.proxy)
+ .unbind('mouseout', event.proxy)
+ .unbind('mousedown', event.proxy)
+ .unbind('mouseup', event.proxy)
+ .unbind('contextmenu', event.proxy);
+ },
+ doProxy: function(e) {
+ var results = [];
+ for (var i=0, j=_init.proxys.length; i<j; i++) {
+ var proxyResult = _init.proxys[i].apply(this, arguments);
+ results.push(proxyResult);
+ if (proxyResult.stop) {
+ break;
+ }
+ }
+ return results;
+ },
+ proxy: function(e) {
+ var setting = data.getSetting(e.data.treeId);
+ if (!tools.uCanDo(setting, e)) return true;
+ var results = event.doProxy(e),
+ r = true, x = false;
+ for (var i=0, l=results.length; i<l; i++) {
+ var proxyResult = results[i];
+ if (proxyResult.nodeEventCallback) {
+ x = true;
+ r = proxyResult.nodeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r;
+ }
+ if (proxyResult.treeEventCallback) {
+ x = true;
+ r = proxyResult.treeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r;
+ }
+ }
+ return r;
+ }
+ },
+ //method of event handler
+ handler = {
+ onSwitchNode: function (event, node) {
+ var setting = data.getSetting(event.data.treeId);
+ if (node.open) {
+ if (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false) return true;
+ data.getRoot(setting).expandTriggerFlag = true;
+ view.switchNode(setting, node);
+ } else {
+ if (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false) return true;
+ data.getRoot(setting).expandTriggerFlag = true;
+ view.switchNode(setting, node);
+ }
+ return true;
+ },
+ onClickNode: function (event, node) {
+ var setting = data.getSetting(event.data.treeId),
+ clickFlag = ( (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey)) && data.isSelectedNode(setting, node)) ? 0 : (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey) && setting.view.selectedMulti) ? 2 : 1;
+ if (tools.apply(setting.callback.beforeClick, [setting.treeId, node, clickFlag], true) == false) return true;
+ if (clickFlag === 0) {
+ view.cancelPreSelectedNode(setting, node);
+ } else {
+ view.selectNode(setting, node, clickFlag === 2);
+ }
+ setting.treeObj.trigger(consts.event.CLICK, [event, setting.treeId, node, clickFlag]);
+ return true;
+ },
+ onZTreeMousedown: function(event, node) {
+ var setting = data.getSetting(event.data.treeId);
+ if (tools.apply(setting.callback.beforeMouseDown, [setting.treeId, node], true)) {
+ tools.apply(setting.callback.onMouseDown, [event, setting.treeId, node]);
+ }
+ return true;
+ },
+ onZTreeMouseup: function(event, node) {
+ var setting = data.getSetting(event.data.treeId);
+ if (tools.apply(setting.callback.beforeMouseUp, [setting.treeId, node], true)) {
+ tools.apply(setting.callback.onMouseUp, [event, setting.treeId, node]);
+ }
+ return true;
+ },
+ onZTreeDblclick: function(event, node) {
+ var setting = data.getSetting(event.data.treeId);
+ if (tools.apply(setting.callback.beforeDblClick, [setting.treeId, node], true)) {
+ tools.apply(setting.callback.onDblClick, [event, setting.treeId, node]);
+ }
+ return true;
+ },
+ onZTreeContextmenu: function(event, node) {
+ var setting = data.getSetting(event.data.treeId);
+ if (tools.apply(setting.callback.beforeRightClick, [setting.treeId, node], true)) {
+ tools.apply(setting.callback.onRightClick, [event, setting.treeId, node]);
+ }
+ return (typeof setting.callback.onRightClick) != "function";
+ }
+ },
+ //method of tools for zTree
+ tools = {
+ apply: function(fun, param, defaultValue) {
+ if ((typeof fun) == "function") {
+ return fun.apply(zt, param?param:[]);
+ }
+ return defaultValue;
+ },
+ canAsync: function(setting, node) {
+ var childKey = setting.data.key.children;
+ return (setting.async.enable && node && node.isParent && !(node.zAsync || (node[childKey] && node[childKey].length > 0)));
+ },
+ clone: function (obj){
+ if (obj === null) return null;
+ var o = tools.isArray(obj) ? [] : {};
+ for(var i in obj){
+ o[i] = (obj[i] instanceof Date) ? new Date(obj[i].getTime()) : (typeof obj[i] === "object" ? arguments.callee(obj[i]) : obj[i]);
+ }
+ return o;
+ },
+ eqs: function(str1, str2) {
+ return str1.toLowerCase() === str2.toLowerCase();
+ },
+ isArray: function(arr) {
+ return Object.prototype.toString.apply(arr) === "[object Array]";
+ },
+ $: function(node, exp, setting) {
+ if (!!exp && typeof exp != "string") {
+ setting = exp;
+ exp = "";
+ }
+ if (typeof node == "string") {
+ return $(node, setting ? setting.treeObj.get(0).ownerDocument : null);
+ } else {
+ return $("#" + node.tId + exp, setting ? setting.treeObj : null);
+ }
+ },
+ getMDom: function (setting, curDom, targetExpr) {
+ if (!curDom) return null;
+ while (curDom && curDom.id !== setting.treeId) {
+ for (var i=0, l=targetExpr.length; curDom.tagName && i<l; i++) {
+ if (tools.eqs(curDom.tagName, targetExpr[i].tagName) && curDom.getAttribute(targetExpr[i].attrName) !== null) {
+ return curDom;
+ }
+ }
+ curDom = curDom.parentNode;
+ }
+ return null;
+ },
+ getNodeMainDom:function(target) {
+ return ($(target).parent("li").get(0) || $(target).parentsUntil("li").parent().get(0));
+ },
+ isChildOrSelf: function(dom, parentId) {
+ return ( $(dom).closest("#" + parentId).length> 0 );
+ },
+ uCanDo: function(setting, e) {
+ return true;
+ }
+ },
+ //method of operate ztree dom
+ view = {
+ addNodes: function(setting, parentNode, newNodes, isSilent) {
+ if (setting.data.keep.leaf && parentNode && !parentNode.isParent) {
+ return;
+ }
+ if (!tools.isArray(newNodes)) {
+ newNodes = [newNodes];
+ }
+ if (setting.data.simpleData.enable) {
+ newNodes = data.transformTozTreeFormat(setting, newNodes);
+ }
+ if (parentNode) {
+ var target_switchObj = $$(parentNode, consts.id.SWITCH, setting),
+ target_icoObj = $$(parentNode, consts.id.ICON, setting),
+ target_ulObj = $$(parentNode, consts.id.UL, setting);
+
+ if (!parentNode.open) {
+ view.replaceSwitchClass(parentNode, target_switchObj, consts.folder.CLOSE);
+ view.replaceIcoClass(parentNode, target_icoObj, consts.folder.CLOSE);
+ parentNode.open = false;
+ target_ulObj.css({
+ "display": "none"
+ });
+ }
+
+ data.addNodesData(setting, parentNode, newNodes);
+ view.createNodes(setting, parentNode.level + 1, newNodes, parentNode);
+ if (!isSilent) {
+ view.expandCollapseParentNode(setting, parentNode, true);
+ }
+ } else {
+ data.addNodesData(setting, data.getRoot(setting), newNodes);
+ view.createNodes(setting, 0, newNodes, null);
+ }
+ },
+ appendNodes: function(setting, level, nodes, parentNode, initFlag, openFlag) {
+ if (!nodes) return [];
+ var html = [],
+ childKey = setting.data.key.children;
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ var node = nodes[i];
+ if (initFlag) {
+ var tmpPNode = (parentNode) ? parentNode: data.getRoot(setting),
+ tmpPChild = tmpPNode[childKey],
+ isFirstNode = ((tmpPChild.length == nodes.length) && (i == 0)),
+ isLastNode = (i == (nodes.length - 1));
+ data.initNode(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag);
+ data.addNodeCache(setting, node);
+ }
+
+ var childHtml = [];
+ if (node[childKey] && node[childKey].length > 0) {
+ //make child html first, because checkType
+ childHtml = view.appendNodes(setting, level + 1, node[childKey], node, initFlag, openFlag && node.open);
+ }
+ if (openFlag) {
+
+ view.makeDOMNodeMainBefore(html, setting, node);
+ view.makeDOMNodeLine(html, setting, node);
+ data.getBeforeA(setting, node, html);
+ view.makeDOMNodeNameBefore(html, setting, node);
+ data.getInnerBeforeA(setting, node, html);
+ view.makeDOMNodeIcon(html, setting, node);
+ data.getInnerAfterA(setting, node, html);
+ view.makeDOMNodeNameAfter(html, setting, node);
+ data.getAfterA(setting, node, html);
+ if (node.isParent && node.open) {
+ view.makeUlHtml(setting, node, html, childHtml.join(''));
+ }
+ view.makeDOMNodeMainAfter(html, setting, node);
+ data.addCreatedNode(setting, node);
+ }
+ }
+ return html;
+ },
+ appendParentULDom: function(setting, node) {
+ var html = [],
+ nObj = $$(node, setting);
+ if (!nObj.get(0) && !!node.parentTId) {
+ view.appendParentULDom(setting, node.getParentNode());
+ nObj = $$(node, setting);
+ }
+ var ulObj = $$(node, consts.id.UL, setting);
+ if (ulObj.get(0)) {
+ ulObj.remove();
+ }
+ var childKey = setting.data.key.children,
+ childHtml = view.appendNodes(setting, node.level+1, node[childKey], node, false, true);
+ view.makeUlHtml(setting, node, html, childHtml.join(''));
+ nObj.append(html.join(''));
+ },
+ asyncNode: function(setting, node, isSilent, callback) {
+ var i, l;
+ if (node && !node.isParent) {
+ tools.apply(callback);
+ return false;
+ } else if (node && node.isAjaxing) {
+ return false;
+ } else if (tools.apply(setting.callback.beforeAsync, [setting.treeId, node], true) == false) {
+ tools.apply(callback);
+ return false;
+ }
+ if (node) {
+ node.isAjaxing = true;
+ var icoObj = $$(node, consts.id.ICON, setting);
+ icoObj.attr({"style":"", "class":consts.className.BUTTON + " " + consts.className.ICO_LOADING});
+ }
+
+ var tmpParam = {};
+ for (i = 0, l = setting.async.autoParam.length; node && i < l; i++) {
+ var pKey = setting.async.autoParam[i].split("="), spKey = pKey;
+ if (pKey.length>1) {
+ spKey = pKey[1];
+ pKey = pKey[0];
+ }
+ tmpParam[spKey] = node[pKey];
+ }
+ if (tools.isArray(setting.async.otherParam)) {
+ for (i = 0, l = setting.async.otherParam.length; i < l; i += 2) {
+ tmpParam[setting.async.otherParam[i]] = setting.async.otherParam[i + 1];
+ }
+ } else {
+ for (var p in setting.async.otherParam) {
+ tmpParam[p] = setting.async.otherParam[p];
+ }
+ }
+
+ var _tmpV = data.getRoot(setting)._ver;
+ $.ajax({
+ contentType: setting.async.contentType,
+ type: setting.async.type,
+ url: tools.apply(setting.async.url, [setting.treeId, node], setting.async.url),
+ data: tmpParam,
+ dataType: setting.async.dataType,
+ success: function(msg) {
+ if (_tmpV != data.getRoot(setting)._ver) {
+ return;
+ }
+ var newNodes = [];
+ try {
+ if (!msg || msg.length == 0) {
+ newNodes = [];
+ } else if (typeof msg == "string") {
+ newNodes = eval("(" + msg + ")");
+ } else {
+ newNodes = msg;
+ }
+ } catch(err) {
+ newNodes = msg;
+ }
+
+ if (node) {
+ node.isAjaxing = null;
+ node.zAsync = true;
+ }
+ view.setNodeLineIcos(setting, node);
+ if (newNodes && newNodes !== "") {
+ newNodes = tools.apply(setting.async.dataFilter, [setting.treeId, node, newNodes], newNodes);
+ view.addNodes(setting, node, !!newNodes ? tools.clone(newNodes) : [], !!isSilent);
+ } else {
+ view.addNodes(setting, node, [], !!isSilent);
+ }
+ setting.treeObj.trigger(consts.event.ASYNC_SUCCESS, [setting.treeId, node, msg]);
+ tools.apply(callback);
+ },
+ error: function(XMLHttpRequest, textStatus, errorThrown) {
+ if (_tmpV != data.getRoot(setting)._ver) {
+ return;
+ }
+ if (node) node.isAjaxing = null;
+ view.setNodeLineIcos(setting, node);
+ setting.treeObj.trigger(consts.event.ASYNC_ERROR, [setting.treeId, node, XMLHttpRequest, textStatus, errorThrown]);
+ }
+ });
+ return true;
+ },
+ cancelPreSelectedNode: function (setting, node) {
+ var list = data.getRoot(setting).curSelectedList;
+ for (var i=0, j=list.length-1; j>=i; j--) {
+ if (!node || node === list[j]) {
+ $$(list[j], consts.id.A, setting).removeClass(consts.node.CURSELECTED);
+ if (node) {
+ data.removeSelectedNode(setting, node);
+ break;
+ }
+ }
+ }
+ if (!node) data.getRoot(setting).curSelectedList = [];
+ },
+ createNodeCallback: function(setting) {
+ if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) {
+ var root = data.getRoot(setting);
+ while (root.createdNodes.length>0) {
+ var node = root.createdNodes.shift();
+ tools.apply(setting.view.addDiyDom, [setting.treeId, node]);
+ if (!!setting.callback.onNodeCreated) {
+ setting.treeObj.trigger(consts.event.NODECREATED, [setting.treeId, node]);
+ }
+ }
+ }
+ },
+ createNodes: function(setting, level, nodes, parentNode) {
+ if (!nodes || nodes.length == 0) return;
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children,
+ openFlag = !parentNode || parentNode.open || !!$$(parentNode[childKey][0], setting).get(0);
+ root.createdNodes = [];
+ var zTreeHtml = view.appendNodes(setting, level, nodes, parentNode, true, openFlag);
+ if (!parentNode) {
+ setting.treeObj.append(zTreeHtml.join(''));
+ } else {
+ var ulObj = $$(parentNode, consts.id.UL, setting);
+ if (ulObj.get(0)) {
+ ulObj.append(zTreeHtml.join(''));
+ }
+ }
+ view.createNodeCallback(setting);
+ },
+ destroy: function(setting) {
+ if (!setting) return;
+ data.initCache(setting);
+ data.initRoot(setting);
+ event.unbindTree(setting);
+ event.unbindEvent(setting);
+ setting.treeObj.empty();
+ delete settings[setting.treeId];
+ },
+ expandCollapseNode: function(setting, node, expandFlag, animateFlag, callback) {
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children;
+ if (!node) {
+ tools.apply(callback, []);
+ return;
+ }
+ if (root.expandTriggerFlag) {
+ var _callback = callback;
+ callback = function(){
+ if (_callback) _callback();
+ if (node.open) {
+ setting.treeObj.trigger(consts.event.EXPAND, [setting.treeId, node]);
+ } else {
+ setting.treeObj.trigger(consts.event.COLLAPSE, [setting.treeId, node]);
+ }
+ };
+ root.expandTriggerFlag = false;
+ }
+ if (!node.open && node.isParent && ((!$$(node, consts.id.UL, setting).get(0)) || (node[childKey] && node[childKey].length>0 && !$$(node[childKey][0], setting).get(0)))) {
+ view.appendParentULDom(setting, node);
+ view.createNodeCallback(setting);
+ }
+ if (node.open == expandFlag) {
+ tools.apply(callback, []);
+ return;
+ }
+ var ulObj = $$(node, consts.id.UL, setting),
+ switchObj = $$(node, consts.id.SWITCH, setting),
+ icoObj = $$(node, consts.id.ICON, setting);
+
+ if (node.isParent) {
+ node.open = !node.open;
+ if (node.iconOpen && node.iconClose) {
+ icoObj.attr("style", view.makeNodeIcoStyle(setting, node));
+ }
+
+ if (node.open) {
+ view.replaceSwitchClass(node, switchObj, consts.folder.OPEN);
+ view.replaceIcoClass(node, icoObj, consts.folder.OPEN);
+ if (animateFlag == false || setting.view.expandSpeed == "") {
+ ulObj.show();
+ tools.apply(callback, []);
+ } else {
+ if (node[childKey] && node[childKey].length > 0) {
+ ulObj.slideDown(setting.view.expandSpeed, callback);
+ } else {
+ ulObj.show();
+ tools.apply(callback, []);
+ }
+ }
+ } else {
+ view.replaceSwitchClass(node, switchObj, consts.folder.CLOSE);
+ view.replaceIcoClass(node, icoObj, consts.folder.CLOSE);
+ if (animateFlag == false || setting.view.expandSpeed == "" || !(node[childKey] && node[childKey].length > 0)) {
+ ulObj.hide();
+ tools.apply(callback, []);
+ } else {
+ ulObj.slideUp(setting.view.expandSpeed, callback);
+ }
+ }
+ } else {
+ tools.apply(callback, []);
+ }
+ },
+ expandCollapseParentNode: function(setting, node, expandFlag, animateFlag, callback) {
+ if (!node) return;
+ if (!node.parentTId) {
+ view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback);
+ return;
+ } else {
+ view.expandCollapseNode(setting, node, expandFlag, animateFlag);
+ }
+ if (node.parentTId) {
+ view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, animateFlag, callback);
+ }
+ },
+ expandCollapseSonNode: function(setting, node, expandFlag, animateFlag, callback) {
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children,
+ treeNodes = (node) ? node[childKey]: root[childKey],
+ selfAnimateSign = (node) ? false : animateFlag,
+ expandTriggerFlag = data.getRoot(setting).expandTriggerFlag;
+ data.getRoot(setting).expandTriggerFlag = false;
+ if (treeNodes) {
+ for (var i = 0, l = treeNodes.length; i < l; i++) {
+ if (treeNodes[i]) view.expandCollapseSonNode(setting, treeNodes[i], expandFlag, selfAnimateSign);
+ }
+ }
+ data.getRoot(setting).expandTriggerFlag = expandTriggerFlag;
+ view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback );
+ },
+ makeDOMNodeIcon: function(html, setting, node) {
+ var nameStr = data.getNodeName(setting, node),
+ name = setting.view.nameIsHTML ? nameStr : nameStr.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
+ html.push("<span id='", node.tId, consts.id.ICON,
+ "' title='' treeNode", consts.id.ICON," class='", view.makeNodeIcoClass(setting, node),
+ "' style='", view.makeNodeIcoStyle(setting, node), "'></span><span id='", node.tId, consts.id.SPAN,
+ "'>",name,"</span>");
+ },
+ makeDOMNodeLine: function(html, setting, node) {
+ html.push("<span id='", node.tId, consts.id.SWITCH, "' title='' class='", view.makeNodeLineClass(setting, node), "' treeNode", consts.id.SWITCH,"></span>");
+ },
+ makeDOMNodeMainAfter: function(html, setting, node) {
+ html.push("</li>");
+ },
+ makeDOMNodeMainBefore: function(html, setting, node) {
+ html.push("<li id='", node.tId, "' class='", consts.className.LEVEL, node.level,"' tabindex='0' hidefocus='true' treenode>");
+ },
+ makeDOMNodeNameAfter: function(html, setting, node) {
+ html.push("</a>");
+ },
+ makeDOMNodeNameBefore: function(html, setting, node) {
+ var title = data.getNodeTitle(setting, node),
+ url = view.makeNodeUrl(setting, node),
+ fontcss = view.makeNodeFontCss(setting, node),
+ fontStyle = [];
+ for (var f in fontcss) {
+ fontStyle.push(f, ":", fontcss[f], ";");
+ }
+ html.push("<a id='", node.tId, consts.id.A, "' class='", consts.className.LEVEL, node.level,"' treeNode", consts.id.A," onclick=\"", (node.click || ''),
+ "\" ", ((url != null && url.length > 0) ? "href='" + url + "'" : ""), " target='",view.makeNodeTarget(node),"' style='", fontStyle.join(''),
+ "'");
+ if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && title) {html.push("title='", title.replace(/'/g,"&#39;").replace(/</g,'&lt;').replace(/>/g,'&gt;'),"'");}
+ html.push(">");
+ },
+ makeNodeFontCss: function(setting, node) {
+ var fontCss = tools.apply(setting.view.fontCss, [setting.treeId, node], setting.view.fontCss);
+ return (fontCss && ((typeof fontCss) != "function")) ? fontCss : {};
+ },
+ makeNodeIcoClass: function(setting, node) {
+ var icoCss = ["ico"];
+ if (!node.isAjaxing) {
+ icoCss[0] = (node.iconSkin ? node.iconSkin + "_" : "") + icoCss[0];
+ if (node.isParent) {
+ icoCss.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE);
+ } else {
+ icoCss.push(consts.folder.DOCU);
+ }
+ }
+ return consts.className.BUTTON + " " + icoCss.join('_');
+ },
+ makeNodeIcoStyle: function(setting, node) {
+ var icoStyle = [];
+ if (!node.isAjaxing) {
+ var icon = (node.isParent && node.iconOpen && node.iconClose) ? (node.open ? node.iconOpen : node.iconClose) : node.icon;
+ if (icon) icoStyle.push("background:url(", icon, ") 0 0 no-repeat;");
+ if (setting.view.showIcon == false || !tools.apply(setting.view.showIcon, [setting.treeId, node], true)) {
+ icoStyle.push("width:0px;height:0px;");
+ }
+ }
+ return icoStyle.join('');
+ },
+ makeNodeLineClass: function(setting, node) {
+ var lineClass = [];
+ if (setting.view.showLine) {
+ if (node.level == 0 && node.isFirstNode && node.isLastNode) {
+ lineClass.push(consts.line.ROOT);
+ } else if (node.level == 0 && node.isFirstNode) {
+ lineClass.push(consts.line.ROOTS);
+ } else if (node.isLastNode) {
+ lineClass.push(consts.line.BOTTOM);
+ } else {
+ lineClass.push(consts.line.CENTER);
+ }
+ } else {
+ lineClass.push(consts.line.NOLINE);
+ }
+ if (node.isParent) {
+ lineClass.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE);
+ } else {
+ lineClass.push(consts.folder.DOCU);
+ }
+ return view.makeNodeLineClassEx(node) + lineClass.join('_');
+ },
+ makeNodeLineClassEx: function(node) {
+ return consts.className.BUTTON + " " + consts.className.LEVEL + node.level + " " + consts.className.SWITCH + " ";
+ },
+ makeNodeTarget: function(node) {
+ return (node.target || "_blank");
+ },
+ makeNodeUrl: function(setting, node) {
+ var urlKey = setting.data.key.url;
+ return node[urlKey] ? node[urlKey] : null;
+ },
+ makeUlHtml: function(setting, node, html, content) {
+ html.push("<ul id='", node.tId, consts.id.UL, "' class='", consts.className.LEVEL, node.level, " ", view.makeUlLineClass(setting, node), "' style='display:", (node.open ? "block": "none"),"'>");
+ html.push(content);
+ html.push("</ul>");
+ },
+ makeUlLineClass: function(setting, node) {
+ return ((setting.view.showLine && !node.isLastNode) ? consts.line.LINE : "");
+ },
+ removeChildNodes: function(setting, node) {
+ if (!node) return;
+ var childKey = setting.data.key.children,
+ nodes = node[childKey];
+ if (!nodes) return;
+
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ data.removeNodeCache(setting, nodes[i]);
+ }
+ data.removeSelectedNode(setting);
+ delete node[childKey];
+
+ if (!setting.data.keep.parent) {
+ node.isParent = false;
+ node.open = false;
+ var tmp_switchObj = $$(node, consts.id.SWITCH, setting),
+ tmp_icoObj = $$(node, consts.id.ICON, setting);
+ view.replaceSwitchClass(node, tmp_switchObj, consts.folder.DOCU);
+ view.replaceIcoClass(node, tmp_icoObj, consts.folder.DOCU);
+ $$(node, consts.id.UL, setting).remove();
+ } else {
+ $$(node, consts.id.UL, setting).empty();
+ }
+ },
+ setFirstNode: function(setting, parentNode) {
+ var childKey = setting.data.key.children, childLength = parentNode[childKey].length;
+ if ( childLength > 0) {
+ parentNode[childKey][0].isFirstNode = true;
+ }
+ },
+ setLastNode: function(setting, parentNode) {
+ var childKey = setting.data.key.children, childLength = parentNode[childKey].length;
+ if ( childLength > 0) {
+ parentNode[childKey][childLength - 1].isLastNode = true;
+ }
+ },
+ removeNode: function(setting, node) {
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children,
+ parentNode = (node.parentTId) ? node.getParentNode() : root;
+
+ node.isFirstNode = false;
+ node.isLastNode = false;
+ node.getPreNode = function() {return null;};
+ node.getNextNode = function() {return null;};
+
+ if (!data.getNodeCache(setting, node.tId)) {
+ return;
+ }
+
+ $$(node, setting).remove();
+ data.removeNodeCache(setting, node);
+ data.removeSelectedNode(setting, node);
+
+ for (var i = 0, l = parentNode[childKey].length; i < l; i++) {
+ if (parentNode[childKey][i].tId == node.tId) {
+ parentNode[childKey].splice(i, 1);
+ break;
+ }
+ }
+ view.setFirstNode(setting, parentNode);
+ view.setLastNode(setting, parentNode);
+
+ var tmp_ulObj,tmp_switchObj,tmp_icoObj,
+ childLength = parentNode[childKey].length;
+
+ //repair nodes old parent
+ if (!setting.data.keep.parent && childLength == 0) {
+ //old parentNode has no child nodes
+ parentNode.isParent = false;
+ parentNode.open = false;
+ tmp_ulObj = $$(parentNode, consts.id.UL, setting);
+ tmp_switchObj = $$(parentNode, consts.id.SWITCH, setting);
+ tmp_icoObj = $$(parentNode, consts.id.ICON, setting);
+ view.replaceSwitchClass(parentNode, tmp_switchObj, consts.folder.DOCU);
+ view.replaceIcoClass(parentNode, tmp_icoObj, consts.folder.DOCU);
+ tmp_ulObj.css("display", "none");
+
+ } else if (setting.view.showLine && childLength > 0) {
+ //old parentNode has child nodes
+ var newLast = parentNode[childKey][childLength - 1];
+ tmp_ulObj = $$(newLast, consts.id.UL, setting);
+ tmp_switchObj = $$(newLast, consts.id.SWITCH, setting);
+ tmp_icoObj = $$(newLast, consts.id.ICON, setting);
+ if (parentNode == root) {
+ if (parentNode[childKey].length == 1) {
+ //node was root, and ztree has only one root after move node
+ view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.ROOT);
+ } else {
+ var tmp_first_switchObj = $$(parentNode[childKey][0], consts.id.SWITCH, setting);
+ view.replaceSwitchClass(parentNode[childKey][0], tmp_first_switchObj, consts.line.ROOTS);
+ view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM);
+ }
+ } else {
+ view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM);
+ }
+ tmp_ulObj.removeClass(consts.line.LINE);
+ }
+ },
+ replaceIcoClass: function(node, obj, newName) {
+ if (!obj || node.isAjaxing) return;
+ var tmpName = obj.attr("class");
+ if (tmpName == undefined) return;
+ var tmpList = tmpName.split("_");
+ switch (newName) {
+ case consts.folder.OPEN:
+ case consts.folder.CLOSE:
+ case consts.folder.DOCU:
+ tmpList[tmpList.length-1] = newName;
+ break;
+ }
+ obj.attr("class", tmpList.join("_"));
+ },
+ replaceSwitchClass: function(node, obj, newName) {
+ if (!obj) return;
+ var tmpName = obj.attr("class");
+ if (tmpName == undefined) return;
+ var tmpList = tmpName.split("_");
+ switch (newName) {
+ case consts.line.ROOT:
+ case consts.line.ROOTS:
+ case consts.line.CENTER:
+ case consts.line.BOTTOM:
+ case consts.line.NOLINE:
+ tmpList[0] = view.makeNodeLineClassEx(node) + newName;
+ break;
+ case consts.folder.OPEN:
+ case consts.folder.CLOSE:
+ case consts.folder.DOCU:
+ tmpList[1] = newName;
+ break;
+ }
+ obj.attr("class", tmpList.join("_"));
+ if (newName !== consts.folder.DOCU) {
+ obj.removeAttr("disabled");
+ } else {
+ obj.attr("disabled", "disabled");
+ }
+ },
+ selectNode: function(setting, node, addFlag) {
+ if (!addFlag) {
+ view.cancelPreSelectedNode(setting);
+ }
+ $$(node, consts.id.A, setting).addClass(consts.node.CURSELECTED);
+ data.addSelectedNode(setting, node);
+ },
+ setNodeFontCss: function(setting, treeNode) {
+ var aObj = $$(treeNode, consts.id.A, setting),
+ fontCss = view.makeNodeFontCss(setting, treeNode);
+ if (fontCss) {
+ aObj.css(fontCss);
+ }
+ },
+ setNodeLineIcos: function(setting, node) {
+ if (!node) return;
+ var switchObj = $$(node, consts.id.SWITCH, setting),
+ ulObj = $$(node, consts.id.UL, setting),
+ icoObj = $$(node, consts.id.ICON, setting),
+ ulLine = view.makeUlLineClass(setting, node);
+ if (ulLine.length==0) {
+ ulObj.removeClass(consts.line.LINE);
+ } else {
+ ulObj.addClass(ulLine);
+ }
+ switchObj.attr("class", view.makeNodeLineClass(setting, node));
+ if (node.isParent) {
+ switchObj.removeAttr("disabled");
+ } else {
+ switchObj.attr("disabled", "disabled");
+ }
+ icoObj.removeAttr("style");
+ icoObj.attr("style", view.makeNodeIcoStyle(setting, node));
+ icoObj.attr("class", view.makeNodeIcoClass(setting, node));
+ },
+ setNodeName: function(setting, node) {
+ var title = data.getNodeTitle(setting, node),
+ nObj = $$(node, consts.id.SPAN, setting);
+ nObj.empty();
+ if (setting.view.nameIsHTML) {
+ nObj.html(data.getNodeName(setting, node));
+ } else {
+ nObj.text(data.getNodeName(setting, node));
+ }
+ if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle)) {
+ var aObj = $$(node, consts.id.A, setting);
+ aObj.attr("title", !title ? "" : title);
+ }
+ },
+ setNodeTarget: function(setting, node) {
+ var aObj = $$(node, consts.id.A, setting);
+ aObj.attr("target", view.makeNodeTarget(node));
+ },
+ setNodeUrl: function(setting, node) {
+ var aObj = $$(node, consts.id.A, setting),
+ url = view.makeNodeUrl(setting, node);
+ if (url == null || url.length == 0) {
+ aObj.removeAttr("href");
+ } else {
+ aObj.attr("href", url);
+ }
+ },
+ switchNode: function(setting, node) {
+ if (node.open || !tools.canAsync(setting, node)) {
+ view.expandCollapseNode(setting, node, !node.open);
+ } else if (setting.async.enable) {
+ if (!view.asyncNode(setting, node)) {
+ view.expandCollapseNode(setting, node, !node.open);
+ return;
+ }
+ } else if (node) {
+ view.expandCollapseNode(setting, node, !node.open);
+ }
+ }
+ };
+ // zTree defind
+ $.fn.zTree = {
+ consts : _consts,
+ _z : {
+ tools: tools,
+ view: view,
+ event: event,
+ data: data
+ },
+ getZTreeObj: function(treeId) {
+ var o = data.getZTreeTools(treeId);
+ return o ? o : null;
+ },
+ destroy: function(treeId) {
+ if (!!treeId && treeId.length > 0) {
+ view.destroy(data.getSetting(treeId));
+ } else {
+ for(var s in settings) {
+ view.destroy(settings[s]);
+ }
+ }
+ },
+ init: function(obj, zSetting, zNodes) {
+ var setting = tools.clone(_setting);
+ $.extend(true, setting, zSetting);
+ setting.treeId = obj.attr("id");
+ setting.treeObj = obj;
+ setting.treeObj.empty();
+ settings[setting.treeId] = setting;
+ //For some older browser,(e.g., ie6)
+ if(typeof document.body.style.maxHeight === "undefined") {
+ setting.view.expandSpeed = "";
+ }
+ data.initRoot(setting);
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children;
+ zNodes = zNodes ? tools.clone(tools.isArray(zNodes)? zNodes : [zNodes]) : [];
+ if (setting.data.simpleData.enable) {
+ root[childKey] = data.transformTozTreeFormat(setting, zNodes);
+ } else {
+ root[childKey] = zNodes;
+ }
+
+ data.initCache(setting);
+ event.unbindTree(setting);
+ event.bindTree(setting);
+ event.unbindEvent(setting);
+ event.bindEvent(setting);
+
+ var zTreeTools = {
+ setting : setting,
+ addNodes : function(parentNode, newNodes, isSilent) {
+ if (!newNodes) return null;
+ if (!parentNode) parentNode = null;
+ if (parentNode && !parentNode.isParent && setting.data.keep.leaf) return null;
+ var xNewNodes = tools.clone(tools.isArray(newNodes)? newNodes: [newNodes]);
+ function addCallback() {
+ view.addNodes(setting, parentNode, xNewNodes, (isSilent==true));
+ }
+
+ if (tools.canAsync(setting, parentNode)) {
+ view.asyncNode(setting, parentNode, isSilent, addCallback);
+ } else {
+ addCallback();
+ }
+ return xNewNodes;
+ },
+ cancelSelectedNode : function(node) {
+ view.cancelPreSelectedNode(setting, node);
+ },
+ destroy : function() {
+ view.destroy(setting);
+ },
+ expandAll : function(expandFlag) {
+ expandFlag = !!expandFlag;
+ view.expandCollapseSonNode(setting, null, expandFlag, true);
+ return expandFlag;
+ },
+ expandNode : function(node, expandFlag, sonSign, focus, callbackFlag) {
+ if (!node || !node.isParent) return null;
+ if (expandFlag !== true && expandFlag !== false) {
+ expandFlag = !node.open;
+ }
+ callbackFlag = !!callbackFlag;
+
+ if (callbackFlag && expandFlag && (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false)) {
+ return null;
+ } else if (callbackFlag && !expandFlag && (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false)) {
+ return null;
+ }
+ if (expandFlag && node.parentTId) {
+ view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, false);
+ }
+ if (expandFlag === node.open && !sonSign) {
+ return null;
+ }
+
+ data.getRoot(setting).expandTriggerFlag = callbackFlag;
+ if (!tools.canAsync(setting, node) && sonSign) {
+ view.expandCollapseSonNode(setting, node, expandFlag, true, function() {
+ if (focus !== false) {try{$$(node, setting).focus().blur();}catch(e){}}
+ });
+ } else {
+ node.open = !expandFlag;
+ view.switchNode(this.setting, node);
+ if (focus !== false) {try{$$(node, setting).focus().blur();}catch(e){}}
+ }
+ return expandFlag;
+ },
+ getNodes : function() {
+ return data.getNodes(setting);
+ },
+ getNodeByParam : function(key, value, parentNode) {
+ if (!key) return null;
+ return data.getNodeByParam(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value);
+ },
+ getNodeByTId : function(tId) {
+ return data.getNodeCache(setting, tId);
+ },
+ getNodesByParam : function(key, value, parentNode) {
+ if (!key) return null;
+ return data.getNodesByParam(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value);
+ },
+ getNodesByParamFuzzy : function(key, value, parentNode) {
+ if (!key) return null;
+ return data.getNodesByParamFuzzy(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value);
+ },
+ getNodesByFilter: function(filter, isSingle, parentNode, invokeParam) {
+ isSingle = !!isSingle;
+ if (!filter || (typeof filter != "function")) return (isSingle ? null : []);
+ return data.getNodesByFilter(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), filter, isSingle, invokeParam);
+ },
+ getNodeIndex : function(node) {
+ if (!node) return null;
+ var childKey = setting.data.key.children,
+ parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting);
+ for (var i=0, l = parentNode[childKey].length; i < l; i++) {
+ if (parentNode[childKey][i] == node) return i;
+ }
+ return -1;
+ },
+ getSelectedNodes : function() {
+ var r = [], list = data.getRoot(setting).curSelectedList;
+ for (var i=0, l=list.length; i<l; i++) {
+ r.push(list[i]);
+ }
+ return r;
+ },
+ isSelectedNode : function(node) {
+ return data.isSelectedNode(setting, node);
+ },
+ reAsyncChildNodes : function(parentNode, reloadType, isSilent) {
+ if (!this.setting.async.enable) return;
+ var isRoot = !parentNode;
+ if (isRoot) {
+ parentNode = data.getRoot(setting);
+ }
+ if (reloadType=="refresh") {
+ var childKey = this.setting.data.key.children;
+ for (var i = 0, l = parentNode[childKey] ? parentNode[childKey].length : 0; i < l; i++) {
+ data.removeNodeCache(setting, parentNode[childKey][i]);
+ }
+ data.removeSelectedNode(setting);
+ parentNode[childKey] = [];
+ if (isRoot) {
+ this.setting.treeObj.empty();
+ } else {
+ var ulObj = $$(parentNode, consts.id.UL, setting);
+ ulObj.empty();
+ }
+ }
+ view.asyncNode(this.setting, isRoot? null:parentNode, !!isSilent);
+ },
+ refresh : function() {
+ this.setting.treeObj.empty();
+ var root = data.getRoot(setting),
+ nodes = root[setting.data.key.children]
+ data.initRoot(setting);
+ root[setting.data.key.children] = nodes
+ data.initCache(setting);
+ view.createNodes(setting, 0, root[setting.data.key.children]);
+ },
+ removeChildNodes : function(node) {
+ if (!node) return null;
+ var childKey = setting.data.key.children,
+ nodes = node[childKey];
+ view.removeChildNodes(setting, node);
+ return nodes ? nodes : null;
+ },
+ removeNode : function(node, callbackFlag) {
+ if (!node) return;
+ callbackFlag = !!callbackFlag;
+ if (callbackFlag && tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return;
+ view.removeNode(setting, node);
+ if (callbackFlag) {
+ this.setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]);
+ }
+ },
+ selectNode : function(node, addFlag) {
+ if (!node) return;
+ if (tools.uCanDo(setting)) {
+ addFlag = setting.view.selectedMulti && addFlag;
+ if (node.parentTId) {
+ view.expandCollapseParentNode(setting, node.getParentNode(), true, false, function() {
+ try{$$(node, setting).focus().blur();}catch(e){}
+ });
+ } else {
+ try{$$(node, setting).focus().blur();}catch(e){}
+ }
+ view.selectNode(setting, node, addFlag);
+ }
+ },
+ transformTozTreeNodes : function(simpleNodes) {
+ return data.transformTozTreeFormat(setting, simpleNodes);
+ },
+ transformToArray : function(nodes) {
+ return data.transformToArrayFormat(setting, nodes);
+ },
+ updateNode : function(node, checkTypeFlag) {
+ if (!node) return;
+ var nObj = $$(node, setting);
+ if (nObj.get(0) && tools.uCanDo(setting)) {
+ view.setNodeName(setting, node);
+ view.setNodeTarget(setting, node);
+ view.setNodeUrl(setting, node);
+ view.setNodeLineIcos(setting, node);
+ view.setNodeFontCss(setting, node);
+ }
+ }
+ }
+ root.treeTools = zTreeTools;
+ data.setZTreeTools(setting, zTreeTools);
+
+ if (root[childKey] && root[childKey].length > 0) {
+ view.createNodes(setting, 0, root[childKey]);
+ } else if (setting.async.enable && setting.async.url && setting.async.url !== '') {
+ view.asyncNode(setting);
+ }
+ return zTreeTools;
+ }
+ };
+
+ var zt = $.fn.zTree,
+ $$ = tools.$,
+ consts = zt.consts;
+})(jQuery);
+/*
+ * JQuery zTree excheck v3.5.16
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2014-03-09
+ */
+(function($){
+ //default consts of excheck
+ var _consts = {
+ event: {
+ CHECK: "ztree_check"
+ },
+ id: {
+ CHECK: "_check"
+ },
+ checkbox: {
+ STYLE: "checkbox",
+ DEFAULT: "chk",
+ DISABLED: "disable",
+ FALSE: "false",
+ TRUE: "true",
+ FULL: "full",
+ PART: "part",
+ FOCUS: "focus"
+ },
+ radio: {
+ STYLE: "radio",
+ TYPE_ALL: "all",
+ TYPE_LEVEL: "level"
+ }
+ },
+ //default setting of excheck
+ _setting = {
+ check: {
+ enable: false,
+ autoCheckTrigger: false,
+ chkStyle: _consts.checkbox.STYLE,
+ nocheckInherit: false,
+ chkDisabledInherit: false,
+ radioType: _consts.radio.TYPE_LEVEL,
+ chkboxType: {
+ "Y": "ps",
+ "N": "ps"
+ }
+ },
+ data: {
+ key: {
+ checked: "checked"
+ }
+ },
+ callback: {
+ beforeCheck:null,
+ onCheck:null
+ }
+ },
+ //default root of excheck
+ _initRoot = function (setting) {
+ var r = data.getRoot(setting);
+ r.radioCheckedList = [];
+ },
+ //default cache of excheck
+ _initCache = function(treeId) {},
+ //default bind event of excheck
+ _bindEvent = function(setting) {
+ var o = setting.treeObj,
+ c = consts.event;
+ o.bind(c.CHECK, function (event, srcEvent, treeId, node) {
+ event.srcEvent = srcEvent;
+ tools.apply(setting.callback.onCheck, [event, treeId, node]);
+ });
+ },
+ _unbindEvent = function(setting) {
+ var o = setting.treeObj,
+ c = consts.event;
+ o.unbind(c.CHECK);
+ },
+ //default event proxy of excheck
+ _eventProxy = function(e) {
+ var target = e.target,
+ setting = data.getSetting(e.data.treeId),
+ tId = "", node = null,
+ nodeEventType = "", treeEventType = "",
+ nodeEventCallback = null, treeEventCallback = null;
+
+ if (tools.eqs(e.type, "mouseover")) {
+ if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
+ tId = tools.getNodeMainDom(target).id;
+ nodeEventType = "mouseoverCheck";
+ }
+ } else if (tools.eqs(e.type, "mouseout")) {
+ if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
+ tId = tools.getNodeMainDom(target).id;
+ nodeEventType = "mouseoutCheck";
+ }
+ } else if (tools.eqs(e.type, "click")) {
+ if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
+ tId = tools.getNodeMainDom(target).id;
+ nodeEventType = "checkNode";
+ }
+ }
+ if (tId.length>0) {
+ node = data.getNodeCache(setting, tId);
+ switch (nodeEventType) {
+ case "checkNode" :
+ nodeEventCallback = _handler.onCheckNode;
+ break;
+ case "mouseoverCheck" :
+ nodeEventCallback = _handler.onMouseoverCheck;
+ break;
+ case "mouseoutCheck" :
+ nodeEventCallback = _handler.onMouseoutCheck;
+ break;
+ }
+ }
+ var proxyResult = {
+ stop: nodeEventType === "checkNode",
+ node: node,
+ nodeEventType: nodeEventType,
+ nodeEventCallback: nodeEventCallback,
+ treeEventType: treeEventType,
+ treeEventCallback: treeEventCallback
+ };
+ return proxyResult
+ },
+ //default init node of excheck
+ _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
+ if (!n) return;
+ var checkedKey = setting.data.key.checked;
+ if (typeof n[checkedKey] == "string") n[checkedKey] = tools.eqs(n[checkedKey], "true");
+ n[checkedKey] = !!n[checkedKey];
+ n.checkedOld = n[checkedKey];
+ if (typeof n.nocheck == "string") n.nocheck = tools.eqs(n.nocheck, "true");
+ n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck);
+ if (typeof n.chkDisabled == "string") n.chkDisabled = tools.eqs(n.chkDisabled, "true");
+ n.chkDisabled = !!n.chkDisabled || (setting.check.chkDisabledInherit && parentNode && !!parentNode.chkDisabled);
+ if (typeof n.halfCheck == "string") n.halfCheck = tools.eqs(n.halfCheck, "true");
+ n.halfCheck = !!n.halfCheck;
+ n.check_Child_State = -1;
+ n.check_Focus = false;
+ n.getCheckStatus = function() {return data.getCheckStatus(setting, n);};
+
+ if (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && n[checkedKey] ) {
+ var r = data.getRoot(setting);
+ r.radioCheckedList.push(n);
+ }
+ },
+ //add dom for check
+ _beforeA = function(setting, node, html) {
+ var checkedKey = setting.data.key.checked;
+ if (setting.check.enable) {
+ data.makeChkFlag(setting, node);
+ html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true?" style='display:none;'":""),"></span>");
+ }
+ },
+ //update zTreeObj, add method of check
+ _zTreeTools = function(setting, zTreeTools) {
+ zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) {
+ var checkedKey = this.setting.data.key.checked;
+ if (node.chkDisabled === true) return;
+ if (checked !== true && checked !== false) {
+ checked = !node[checkedKey];
+ }
+ callbackFlag = !!callbackFlag;
+
+ if (node[checkedKey] === checked && !checkTypeFlag) {
+ return;
+ } else if (callbackFlag && tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) {
+ return;
+ }
+ if (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) {
+ node[checkedKey] = checked;
+ var checkObj = $$(node, consts.id.CHECK, this.setting);
+ if (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);
+ view.setChkClass(this.setting, checkObj, node);
+ view.repairParentChkClassWithSelf(this.setting, node);
+ if (callbackFlag) {
+ this.setting.treeObj.trigger(consts.event.CHECK, [null, this.setting.treeId, node]);
+ }
+ }
+ }
+
+ zTreeTools.checkAllNodes = function(checked) {
+ view.repairAllChk(this.setting, !!checked);
+ }
+
+ zTreeTools.getCheckedNodes = function(checked) {
+ var childKey = this.setting.data.key.children;
+ checked = (checked !== false);
+ return data.getTreeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey], checked);
+ }
+
+ zTreeTools.getChangeCheckedNodes = function() {
+ var childKey = this.setting.data.key.children;
+ return data.getTreeChangeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey]);
+ }
+
+ zTreeTools.setChkDisabled = function(node, disabled, inheritParent, inheritChildren) {
+ disabled = !!disabled;
+ inheritParent = !!inheritParent;
+ inheritChildren = !!inheritChildren;
+ view.repairSonChkDisabled(this.setting, node, disabled, inheritChildren);
+ view.repairParentChkDisabled(this.setting, node.getParentNode(), disabled, inheritParent);
+ }
+
+ var _updateNode = zTreeTools.updateNode;
+ zTreeTools.updateNode = function(node, checkTypeFlag) {
+ if (_updateNode) _updateNode.apply(zTreeTools, arguments);
+ if (!node || !this.setting.check.enable) return;
+ var nObj = $$(node, this.setting);
+ if (nObj.get(0) && tools.uCanDo(this.setting)) {
+ var checkObj = $$(node, consts.id.CHECK, this.setting);
+ if (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);
+ view.setChkClass(this.setting, checkObj, node);
+ view.repairParentChkClassWithSelf(this.setting, node);
+ }
+ }
+ },
+ //method of operate data
+ _data = {
+ getRadioCheckedList: function(setting) {
+ var checkedList = data.getRoot(setting).radioCheckedList;
+ for (var i=0, j=checkedList.length; i<j; i++) {
+ if(!data.getNodeCache(setting, checkedList[i].tId)) {
+ checkedList.splice(i, 1);
+ i--; j--;
+ }
+ }
+ return checkedList;
+ },
+ getCheckStatus: function(setting, node) {
+ if (!setting.check.enable || node.nocheck || node.chkDisabled) return null;
+ var checkedKey = setting.data.key.checked,
+ r = {
+ checked: node[checkedKey],
+ half: node.halfCheck ? node.halfCheck : (setting.check.chkStyle == consts.radio.STYLE ? (node.check_Child_State === 2) : (node[checkedKey] ? (node.check_Child_State > -1 && node.check_Child_State < 2) : (node.check_Child_State > 0)))
+ };
+ return r;
+ },
+ getTreeCheckedNodes: function(setting, nodes, checked, results) {
+ if (!nodes) return [];
+ var childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked,
+ onlyOne = (checked && setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL);
+ results = !results ? [] : results;
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] == checked) {
+ results.push(nodes[i]);
+ if(onlyOne) {
+ break;
+ }
+ }
+ data.getTreeCheckedNodes(setting, nodes[i][childKey], checked, results);
+ if(onlyOne && results.length > 0) {
+ break;
+ }
+ }
+ return results;
+ },
+ getTreeChangeCheckedNodes: function(setting, nodes, results) {
+ if (!nodes) return [];
+ var childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked;
+ results = !results ? [] : results;
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] != nodes[i].checkedOld) {
+ results.push(nodes[i]);
+ }
+ data.getTreeChangeCheckedNodes(setting, nodes[i][childKey], results);
+ }
+ return results;
+ },
+ makeChkFlag: function(setting, node) {
+ if (!node) return;
+ var childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked,
+ chkFlag = -1;
+ if (node[childKey]) {
+ for (var i = 0, l = node[childKey].length; i < l; i++) {
+ var cNode = node[childKey][i];
+ var tmp = -1;
+ if (setting.check.chkStyle == consts.radio.STYLE) {
+ if (cNode.nocheck === true || cNode.chkDisabled === true) {
+ tmp = cNode.check_Child_State;
+ } else if (cNode.halfCheck === true) {
+ tmp = 2;
+ } else if (cNode[checkedKey]) {
+ tmp = 2;
+ } else {
+ tmp = cNode.check_Child_State > 0 ? 2:0;
+ }
+ if (tmp == 2) {
+ chkFlag = 2; break;
+ } else if (tmp == 0){
+ chkFlag = 0;
+ }
+ } else if (setting.check.chkStyle == consts.checkbox.STYLE) {
+ if (cNode.nocheck === true || cNode.chkDisabled === true) {
+ tmp = cNode.check_Child_State;
+ } else if (cNode.halfCheck === true) {
+ tmp = 1;
+ } else if (cNode[checkedKey] ) {
+ tmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1;
+ } else {
+ tmp = (cNode.check_Child_State > 0) ? 1 : 0;
+ }
+ if (tmp === 1) {
+ chkFlag = 1; break;
+ } else if (tmp === 2 && chkFlag > -1 && i > 0 && tmp !== chkFlag) {
+ chkFlag = 1; break;
+ } else if (chkFlag === 2 && tmp > -1 && tmp < 2) {
+ chkFlag = 1; break;
+ } else if (tmp > -1) {
+ chkFlag = tmp;
+ }
+ }
+ }
+ }
+ node.check_Child_State = chkFlag;
+ }
+ },
+ //method of event proxy
+ _event = {
+
+ },
+ //method of event handler
+ _handler = {
+ onCheckNode: function (event, node) {
+ if (node.chkDisabled === true) return false;
+ var setting = data.getSetting(event.data.treeId),
+ checkedKey = setting.data.key.checked;
+ if (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true;
+ node[checkedKey] = !node[checkedKey];
+ view.checkNodeRelation(setting, node);
+ var checkObj = $$(node, consts.id.CHECK, setting);
+ view.setChkClass(setting, checkObj, node);
+ view.repairParentChkClassWithSelf(setting, node);
+ setting.treeObj.trigger(consts.event.CHECK, [event, setting.treeId, node]);
+ return true;
+ },
+ onMouseoverCheck: function(event, node) {
+ if (node.chkDisabled === true) return false;
+ var setting = data.getSetting(event.data.treeId),
+ checkObj = $$(node, consts.id.CHECK, setting);
+ node.check_Focus = true;
+ view.setChkClass(setting, checkObj, node);
+ return true;
+ },
+ onMouseoutCheck: function(event, node) {
+ if (node.chkDisabled === true) return false;
+ var setting = data.getSetting(event.data.treeId),
+ checkObj = $$(node, consts.id.CHECK, setting);
+ node.check_Focus = false;
+ view.setChkClass(setting, checkObj, node);
+ return true;
+ }
+ },
+ //method of tools for zTree
+ _tools = {
+
+ },
+ //method of operate ztree dom
+ _view = {
+ checkNodeRelation: function(setting, node) {
+ var pNode, i, l,
+ childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked,
+ r = consts.radio;
+ if (setting.check.chkStyle == r.STYLE) {
+ var checkedList = data.getRadioCheckedList(setting);
+ if (node[checkedKey]) {
+ if (setting.check.radioType == r.TYPE_ALL) {
+ for (i = checkedList.length-1; i >= 0; i--) {
+ pNode = checkedList[i];
+ if (pNode[checkedKey] && pNode != node) {
+ pNode[checkedKey] = false;
+ checkedList.splice(i, 1);
+
+ view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode);
+ if (pNode.parentTId != node.parentTId) {
+ view.repairParentChkClassWithSelf(setting, pNode);
+ }
+ }
+ }
+ checkedList.push(node);
+ } else {
+ var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting);
+ for (i = 0, l = parentNode[childKey].length; i < l; i++) {
+ pNode = parentNode[childKey][i];
+ if (pNode[checkedKey] && pNode != node) {
+ pNode[checkedKey] = false;
+ view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode);
+ }
+ }
+ }
+ } else if (setting.check.radioType == r.TYPE_ALL) {
+ for (i = 0, l = checkedList.length; i < l; i++) {
+ if (node == checkedList[i]) {
+ checkedList.splice(i, 1);
+ break;
+ }
+ }
+ }
+
+ } else {
+ if (node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.Y.indexOf("s") > -1)) {
+ view.setSonNodeCheckBox(setting, node, true);
+ }
+ if (!node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.N.indexOf("s") > -1)) {
+ view.setSonNodeCheckBox(setting, node, false);
+ }
+ if (node[checkedKey] && setting.check.chkboxType.Y.indexOf("p") > -1) {
+ view.setParentNodeCheckBox(setting, node, true);
+ }
+ if (!node[checkedKey] && setting.check.chkboxType.N.indexOf("p") > -1) {
+ view.setParentNodeCheckBox(setting, node, false);
+ }
+ }
+ },
+ makeChkClass: function(setting, node) {
+ var checkedKey = setting.data.key.checked,
+ c = consts.checkbox, r = consts.radio,
+ fullStyle = "";
+ if (node.chkDisabled === true) {
+ fullStyle = c.DISABLED;
+ } else if (node.halfCheck) {
+ fullStyle = c.PART;
+ } else if (setting.check.chkStyle == r.STYLE) {
+ fullStyle = (node.check_Child_State < 1)? c.FULL:c.PART;
+ } else {
+ fullStyle = node[checkedKey] ? ((node.check_Child_State === 2 || node.check_Child_State === -1) ? c.FULL:c.PART) : ((node.check_Child_State < 1)? c.FULL:c.PART);
+ }
+ var chkName = setting.check.chkStyle + "_" + (node[checkedKey] ? c.TRUE : c.FALSE) + "_" + fullStyle;
+ chkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + "_" + c.FOCUS : chkName;
+ return consts.className.BUTTON + " " + c.DEFAULT + " " + chkName;
+ },
+ repairAllChk: function(setting, checked) {
+ if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) {
+ var checkedKey = setting.data.key.checked,
+ childKey = setting.data.key.children,
+ root = data.getRoot(setting);
+ for (var i = 0, l = root[childKey].length; i<l ; i++) {
+ var node = root[childKey][i];
+ if (node.nocheck !== true && node.chkDisabled !== true) {
+ node[checkedKey] = checked;
+ }
+ view.setSonNodeCheckBox(setting, node, checked);
+ }
+ }
+ },
+ repairChkClass: function(setting, node) {
+ if (!node) return;
+ data.makeChkFlag(setting, node);
+ if (node.nocheck !== true) {
+ var checkObj = $$(node, consts.id.CHECK, setting);
+ view.setChkClass(setting, checkObj, node);
+ }
+ },
+ repairParentChkClass: function(setting, node) {
+ if (!node || !node.parentTId) return;
+ var pNode = node.getParentNode();
+ view.repairChkClass(setting, pNode);
+ view.repairParentChkClass(setting, pNode);
+ },
+ repairParentChkClassWithSelf: function(setting, node) {
+ if (!node) return;
+ var childKey = setting.data.key.children;
+ if (node[childKey] && node[childKey].length > 0) {
+ view.repairParentChkClass(setting, node[childKey][0]);
+ } else {
+ view.repairParentChkClass(setting, node);
+ }
+ },
+ repairSonChkDisabled: function(setting, node, chkDisabled, inherit) {
+ if (!node) return;
+ var childKey = setting.data.key.children;
+ if (node.chkDisabled != chkDisabled) {
+ node.chkDisabled = chkDisabled;
+ }
+ view.repairChkClass(setting, node);
+ if (node[childKey] && inherit) {
+ for (var i = 0, l = node[childKey].length; i < l; i++) {
+ var sNode = node[childKey][i];
+ view.repairSonChkDisabled(setting, sNode, chkDisabled, inherit);
+ }
+ }
+ },
+ repairParentChkDisabled: function(setting, node, chkDisabled, inherit) {
+ if (!node) return;
+ if (node.chkDisabled != chkDisabled && inherit) {
+ node.chkDisabled = chkDisabled;
+ }
+ view.repairChkClass(setting, node);
+ view.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled, inherit);
+ },
+ setChkClass: function(setting, obj, node) {
+ if (!obj) return;
+ if (node.nocheck === true) {
+ obj.hide();
+ } else {
+ obj.show();
+ }
+ obj.removeClass();
+ obj.addClass(view.makeChkClass(setting, node));
+ },
+ setParentNodeCheckBox: function(setting, node, value, srcNode) {
+ var childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked,
+ checkObj = $$(node, consts.id.CHECK, setting);
+ if (!srcNode) srcNode = node;
+ data.makeChkFlag(setting, node);
+ if (node.nocheck !== true && node.chkDisabled !== true) {
+ node[checkedKey] = value;
+ view.setChkClass(setting, checkObj, node);
+ if (setting.check.autoCheckTrigger && node != srcNode) {
+ setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]);
+ }
+ }
+ if (node.parentTId) {
+ var pSign = true;
+ if (!value) {
+ var pNodes = node.getParentNode()[childKey];
+ for (var i = 0, l = pNodes.length; i < l; i++) {
+ if ((pNodes[i].nocheck !== true && pNodes[i].chkDisabled !== true && pNodes[i][checkedKey])
+ || ((pNodes[i].nocheck === true || pNodes[i].chkDisabled === true) && pNodes[i].check_Child_State > 0)) {
+ pSign = false;
+ break;
+ }
+ }
+ }
+ if (pSign) {
+ view.setParentNodeCheckBox(setting, node.getParentNode(), value, srcNode);
+ }
+ }
+ },
+ setSonNodeCheckBox: function(setting, node, value, srcNode) {
+ if (!node) return;
+ var childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked,
+ checkObj = $$(node, consts.id.CHECK, setting);
+ if (!srcNode) srcNode = node;
+
+ var hasDisable = false;
+ if (node[childKey]) {
+ for (var i = 0, l = node[childKey].length; i < l && node.chkDisabled !== true; i++) {
+ var sNode = node[childKey][i];
+ view.setSonNodeCheckBox(setting, sNode, value, srcNode);
+ if (sNode.chkDisabled === true) hasDisable = true;
+ }
+ }
+
+ if (node != data.getRoot(setting) && node.chkDisabled !== true) {
+ if (hasDisable && node.nocheck !== true) {
+ data.makeChkFlag(setting, node);
+ }
+ if (node.nocheck !== true && node.chkDisabled !== true) {
+ node[checkedKey] = value;
+ if (!hasDisable) node.check_Child_State = (node[childKey] && node[childKey].length > 0) ? (value ? 2 : 0) : -1;
+ } else {
+ node.check_Child_State = -1;
+ }
+ view.setChkClass(setting, checkObj, node);
+ if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true && node.chkDisabled !== true) {
+ setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]);
+ }
+ }
+
+ }
+ },
+
+ _z = {
+ tools: _tools,
+ view: _view,
+ event: _event,
+ data: _data
+ };
+ $.extend(true, $.fn.zTree.consts, _consts);
+ $.extend(true, $.fn.zTree._z, _z);
+
+ var zt = $.fn.zTree,
+ tools = zt._z.tools,
+ consts = zt.consts,
+ view = zt._z.view,
+ data = zt._z.data,
+ event = zt._z.event,
+ $$ = tools.$;
+
+ data.exSetting(_setting);
+ data.addInitBind(_bindEvent);
+ data.addInitUnBind(_unbindEvent);
+ data.addInitCache(_initCache);
+ data.addInitNode(_initNode);
+ data.addInitProxy(_eventProxy, true);
+ data.addInitRoot(_initRoot);
+ data.addBeforeA(_beforeA);
+ data.addZTreeTools(_zTreeTools);
+
+ var _createNodes = view.createNodes;
+ view.createNodes = function(setting, level, nodes, parentNode) {
+ if (_createNodes) _createNodes.apply(view, arguments);
+ if (!nodes) return;
+ view.repairParentChkClassWithSelf(setting, parentNode);
+ }
+ var _removeNode = view.removeNode;
+ view.removeNode = function(setting, node) {
+ var parentNode = node.getParentNode();
+ if (_removeNode) _removeNode.apply(view, arguments);
+ if (!node || !parentNode) return;
+ view.repairChkClass(setting, parentNode);
+ view.repairParentChkClass(setting, parentNode);
+ }
+
+ var _appendNodes = view.appendNodes;
+ view.appendNodes = function(setting, level, nodes, parentNode, initFlag, openFlag) {
+ var html = "";
+ if (_appendNodes) {
+ html = _appendNodes.apply(view, arguments);
+ }
+ if (parentNode) {
+ data.makeChkFlag(setting, parentNode);
+ }
+ return html;
+ }
+})(jQuery);
+/*
+ * JQuery zTree exedit v3.5.16
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2014-03-09
+ */
+(function($){
+ //default consts of exedit
+ var _consts = {
+ event: {
+ DRAG: "ztree_drag",
+ DROP: "ztree_drop",
+ RENAME: "ztree_rename",
+ DRAGMOVE:"ztree_dragmove"
+ },
+ id: {
+ EDIT: "_edit",
+ INPUT: "_input",
+ REMOVE: "_remove"
+ },
+ move: {
+ TYPE_INNER: "inner",
+ TYPE_PREV: "prev",
+ TYPE_NEXT: "next"
+ },
+ node: {
+ CURSELECTED_EDIT: "curSelectedNode_Edit",
+ TMPTARGET_TREE: "tmpTargetzTree",
+ TMPTARGET_NODE: "tmpTargetNode"
+ }
+ },
+ //default setting of exedit
+ _setting = {
+ edit: {
+ enable: false,
+ editNameSelectAll: false,
+ showRemoveBtn: true,
+ showRenameBtn: true,
+ removeTitle: "remove",
+ renameTitle: "rename",
+ drag: {
+ autoExpandTrigger: false,
+ isCopy: true,
+ isMove: true,
+ prev: true,
+ next: true,
+ inner: true,
+ minMoveSize: 5,
+ borderMax: 10,
+ borderMin: -5,
+ maxShowNodeNum: 5,
+ autoOpenTime: 500
+ }
+ },
+ view: {
+ addHoverDom: null,
+ removeHoverDom: null
+ },
+ callback: {
+ beforeDrag:null,
+ beforeDragOpen:null,
+ beforeDrop:null,
+ beforeEditName:null,
+ beforeRename:null,
+ onDrag:null,
+ onDragMove:null,
+ onDrop:null,
+ onRename:null
+ }
+ },
+ //default root of exedit
+ _initRoot = function (setting) {
+ var r = data.getRoot(setting), rs = data.getRoots();
+ r.curEditNode = null;
+ r.curEditInput = null;
+ r.curHoverNode = null;
+ r.dragFlag = 0;
+ r.dragNodeShowBefore = [];
+ r.dragMaskList = new Array();
+ rs.showHoverDom = true;
+ },
+ //default cache of exedit
+ _initCache = function(treeId) {},
+ //default bind event of exedit
+ _bindEvent = function(setting) {
+ var o = setting.treeObj;
+ var c = consts.event;
+ o.bind(c.RENAME, function (event, treeId, treeNode, isCancel) {
+ tools.apply(setting.callback.onRename, [event, treeId, treeNode, isCancel]);
+ });
+
+ o.bind(c.DRAG, function (event, srcEvent, treeId, treeNodes) {
+ tools.apply(setting.callback.onDrag, [srcEvent, treeId, treeNodes]);
+ });
+
+ o.bind(c.DRAGMOVE,function(event, srcEvent, treeId, treeNodes){
+ tools.apply(setting.callback.onDragMove,[srcEvent, treeId, treeNodes]);
+ });
+
+ o.bind(c.DROP, function (event, srcEvent, treeId, treeNodes, targetNode, moveType, isCopy) {
+ tools.apply(setting.callback.onDrop, [srcEvent, treeId, treeNodes, targetNode, moveType, isCopy]);
+ });
+ },
+ _unbindEvent = function(setting) {
+ var o = setting.treeObj;
+ var c = consts.event;
+ o.unbind(c.RENAME);
+ o.unbind(c.DRAG);
+ o.unbind(c.DRAGMOVE);
+ o.unbind(c.DROP);
+ },
+ //default event proxy of exedit
+ _eventProxy = function(e) {
+ var target = e.target,
+ setting = data.getSetting(e.data.treeId),
+ relatedTarget = e.relatedTarget,
+ tId = "", node = null,
+ nodeEventType = "", treeEventType = "",
+ nodeEventCallback = null, treeEventCallback = null,
+ tmp = null;
+
+ if (tools.eqs(e.type, "mouseover")) {
+ tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (tmp) {
+ tId = tools.getNodeMainDom(tmp).id;
+ nodeEventType = "hoverOverNode";
+ }
+ } else if (tools.eqs(e.type, "mouseout")) {
+ tmp = tools.getMDom(setting, relatedTarget, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (!tmp) {
+ tId = "remove";
+ nodeEventType = "hoverOutNode";
+ }
+ } else if (tools.eqs(e.type, "mousedown")) {
+ tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (tmp) {
+ tId = tools.getNodeMainDom(tmp).id;
+ nodeEventType = "mousedownNode";
+ }
+ }
+ if (tId.length>0) {
+ node = data.getNodeCache(setting, tId);
+ switch (nodeEventType) {
+ case "mousedownNode" :
+ nodeEventCallback = _handler.onMousedownNode;
+ break;
+ case "hoverOverNode" :
+ nodeEventCallback = _handler.onHoverOverNode;
+ break;
+ case "hoverOutNode" :
+ nodeEventCallback = _handler.onHoverOutNode;
+ break;
+ }
+ }
+ var proxyResult = {
+ stop: false,
+ node: node,
+ nodeEventType: nodeEventType,
+ nodeEventCallback: nodeEventCallback,
+ treeEventType: treeEventType,
+ treeEventCallback: treeEventCallback
+ };
+ return proxyResult
+ },
+ //default init node of exedit
+ _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
+ if (!n) return;
+ n.isHover = false;
+ n.editNameFlag = false;
+ },
+ //update zTreeObj, add method of edit
+ _zTreeTools = function(setting, zTreeTools) {
+ zTreeTools.cancelEditName = function(newName) {
+ var root = data.getRoot(this.setting);
+ if (!root.curEditNode) return;
+ view.cancelCurEditNode(this.setting, newName?newName:null, true);
+ }
+ zTreeTools.copyNode = function(targetNode, node, moveType, isSilent) {
+ if (!node) return null;
+ if (targetNode && !targetNode.isParent && this.setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) return null;
+ var _this = this,
+ newNode = tools.clone(node);
+ if (!targetNode) {
+ targetNode = null;
+ moveType = consts.move.TYPE_INNER;
+ }
+ if (moveType == consts.move.TYPE_INNER) {
+ function copyCallback() {
+ view.addNodes(_this.setting, targetNode, [newNode], isSilent);
+ }
+
+ if (tools.canAsync(this.setting, targetNode)) {
+ view.asyncNode(this.setting, targetNode, isSilent, copyCallback);
+ } else {
+ copyCallback();
+ }
+ } else {
+ view.addNodes(this.setting, targetNode.parentNode, [newNode], isSilent);
+ view.moveNode(this.setting, targetNode, newNode, moveType, false, isSilent);
+ }
+ return newNode;
+ }
+ zTreeTools.editName = function(node) {
+ if (!node || !node.tId || node !== data.getNodeCache(this.setting, node.tId)) return;
+ if (node.parentTId) view.expandCollapseParentNode(this.setting, node.getParentNode(), true);
+ view.editNode(this.setting, node)
+ }
+ zTreeTools.moveNode = function(targetNode, node, moveType, isSilent) {
+ if (!node) return node;
+ if (targetNode && !targetNode.isParent && this.setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) {
+ return null;
+ } else if (targetNode && ((node.parentTId == targetNode.tId && moveType == consts.move.TYPE_INNER) || $$(node, this.setting).find("#" + targetNode.tId).length > 0)) {
+ return null;
+ } else if (!targetNode) {
+ targetNode = null;
+ }
+ var _this = this;
+ function moveCallback() {
+ view.moveNode(_this.setting, targetNode, node, moveType, false, isSilent);
+ }
+ if (tools.canAsync(this.setting, targetNode) && moveType === consts.move.TYPE_INNER) {
+ view.asyncNode(this.setting, targetNode, isSilent, moveCallback);
+ } else {
+ moveCallback();
+ }
+ return node;
+ }
+ zTreeTools.setEditable = function(editable) {
+ this.setting.edit.enable = editable;
+ return this.refresh();
+ }
+ },
+ //method of operate data
+ _data = {
+ setSonNodeLevel: function(setting, parentNode, node) {
+ if (!node) return;
+ var childKey = setting.data.key.children;
+ node.level = (parentNode)? parentNode.level + 1 : 0;
+ if (!node[childKey]) return;
+ for (var i = 0, l = node[childKey].length; i < l; i++) {
+ if (node[childKey][i]) data.setSonNodeLevel(setting, node, node[childKey][i]);
+ }
+ }
+ },
+ //method of event proxy
+ _event = {
+
+ },
+ //method of event handler
+ _handler = {
+ onHoverOverNode: function(event, node) {
+ var setting = data.getSetting(event.data.treeId),
+ root = data.getRoot(setting);
+ if (root.curHoverNode != node) {
+ _handler.onHoverOutNode(event);
+ }
+ root.curHoverNode = node;
+ view.addHoverDom(setting, node);
+ },
+ onHoverOutNode: function(event, node) {
+ var setting = data.getSetting(event.data.treeId),
+ root = data.getRoot(setting);
+ if (root.curHoverNode && !data.isSelectedNode(setting, root.curHoverNode)) {
+ view.removeTreeDom(setting, root.curHoverNode);
+ root.curHoverNode = null;
+ }
+ },
+ onMousedownNode: function(eventMouseDown, _node) {
+ var i,l,
+ setting = data.getSetting(eventMouseDown.data.treeId),
+ root = data.getRoot(setting), roots = data.getRoots();
+ //right click can't drag & drop
+ if (eventMouseDown.button == 2 || !setting.edit.enable || (!setting.edit.drag.isCopy && !setting.edit.drag.isMove)) return true;
+
+ //input of edit node name can't drag & drop
+ var target = eventMouseDown.target,
+ _nodes = data.getRoot(setting).curSelectedList,
+ nodes = [];
+ if (!data.isSelectedNode(setting, _node)) {
+ nodes = [_node];
+ } else {
+ for (i=0, l=_nodes.length; i<l; i++) {
+ if (_nodes[i].editNameFlag && tools.eqs(target.tagName, "input") && target.getAttribute("treeNode"+consts.id.INPUT) !== null) {
+ return true;
+ }
+ nodes.push(_nodes[i]);
+ if (nodes[0].parentTId !== _nodes[i].parentTId) {
+ nodes = [_node];
+ break;
+ }
+ }
+ }
+
+ view.editNodeBlur = true;
+ view.cancelCurEditNode(setting);
+
+ var doc = $(setting.treeObj.get(0).ownerDocument),
+ body = $(setting.treeObj.get(0).ownerDocument.body), curNode, tmpArrow, tmpTarget,
+ isOtherTree = false,
+ targetSetting = setting,
+ sourceSetting = setting,
+ preNode, nextNode,
+ preTmpTargetNodeId = null,
+ preTmpMoveType = null,
+ tmpTargetNodeId = null,
+ moveType = consts.move.TYPE_INNER,
+ mouseDownX = eventMouseDown.clientX,
+ mouseDownY = eventMouseDown.clientY,
+ startTime = (new Date()).getTime();
+
+ if (tools.uCanDo(setting)) {
+ doc.bind("mousemove", _docMouseMove);
+ }
+ function _docMouseMove(event) {
+ //avoid start drag after click node
+ if (root.dragFlag == 0 && Math.abs(mouseDownX - event.clientX) < setting.edit.drag.minMoveSize
+ && Math.abs(mouseDownY - event.clientY) < setting.edit.drag.minMoveSize) {
+ return true;
+ }
+ var i, l, tmpNode, tmpDom, tmpNodes,
+ childKey = setting.data.key.children;
+ body.css("cursor", "pointer");
+
+ if (root.dragFlag == 0) {
+ if (tools.apply(setting.callback.beforeDrag, [setting.treeId, nodes], true) == false) {
+ _docMouseUp(event);
+ return true;
+ }
+
+ for (i=0, l=nodes.length; i<l; i++) {
+ if (i==0) {
+ root.dragNodeShowBefore = [];
+ }
+ tmpNode = nodes[i];
+ if (tmpNode.isParent && tmpNode.open) {
+ view.expandCollapseNode(setting, tmpNode, !tmpNode.open);
+ root.dragNodeShowBefore[tmpNode.tId] = true;
+ } else {
+ root.dragNodeShowBefore[tmpNode.tId] = false;
+ }
+ }
+
+ root.dragFlag = 1;
+ roots.showHoverDom = false;
+ tools.showIfameMask(setting, true);
+
+ //sort
+ var isOrder = true, lastIndex = -1;
+ if (nodes.length>1) {
+ var pNodes = nodes[0].parentTId ? nodes[0].getParentNode()[childKey] : data.getNodes(setting);
+ tmpNodes = [];
+ for (i=0, l=pNodes.length; i<l; i++) {
+ if (root.dragNodeShowBefore[pNodes[i].tId] !== undefined) {
+ if (isOrder && lastIndex > -1 && (lastIndex+1) !== i) {
+ isOrder = false;
+ }
+ tmpNodes.push(pNodes[i]);
+ lastIndex = i;
+ }
+ if (nodes.length === tmpNodes.length) {
+ nodes = tmpNodes;
+ break;
+ }
+ }
+ }
+ if (isOrder) {
+ preNode = nodes[0].getPreNode();
+ nextNode = nodes[nodes.length-1].getNextNode();
+ }
+
+ //set node in selected
+ curNode = $$("<ul class='zTreeDragUL'></ul>", setting);
+ for (i=0, l=nodes.length; i<l; i++) {
+ tmpNode = nodes[i];
+ tmpNode.editNameFlag = false;
+ view.selectNode(setting, tmpNode, i>0);
+ view.removeTreeDom(setting, tmpNode);
+
+ if (i > setting.edit.drag.maxShowNodeNum-1) {
+ continue;
+ }
+
+ tmpDom = $$("<li id='"+ tmpNode.tId +"_tmp'></li>", setting);
+ tmpDom.append($$(tmpNode, consts.id.A, setting).clone());
+ tmpDom.css("padding", "0");
+ tmpDom.children("#" + tmpNode.tId + consts.id.A).removeClass(consts.node.CURSELECTED);
+ curNode.append(tmpDom);
+ if (i == setting.edit.drag.maxShowNodeNum-1) {
+ tmpDom = $$("<li id='"+ tmpNode.tId +"_moretmp'><a> ... </a></li>", setting);
+ curNode.append(tmpDom);
+ }
+ }
+ curNode.attr("id", nodes[0].tId + consts.id.UL + "_tmp");
+ curNode.addClass(setting.treeObj.attr("class"));
+ curNode.appendTo(body);
+
+ tmpArrow = $$("<span class='tmpzTreeMove_arrow'></span>", setting);
+ tmpArrow.attr("id", "zTreeMove_arrow_tmp");
+ tmpArrow.appendTo(body);
+
+ setting.treeObj.trigger(consts.event.DRAG, [event, setting.treeId, nodes]);
+ }
+
+ if (root.dragFlag == 1) {
+ if (tmpTarget && tmpArrow.attr("id") == event.target.id && tmpTargetNodeId && (event.clientX + doc.scrollLeft()+2) > ($("#" + tmpTargetNodeId + consts.id.A, tmpTarget).offset().left)) {
+ var xT = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget);
+ event.target = (xT.length > 0) ? xT.get(0) : event.target;
+ } else if (tmpTarget) {
+ tmpTarget.removeClass(consts.node.TMPTARGET_TREE);
+ if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV)
+ .removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER);
+ }
+ tmpTarget = null;
+ tmpTargetNodeId = null;
+
+ //judge drag & drop in multi ztree
+ isOtherTree = false;
+ targetSetting = setting;
+ var settings = data.getSettings();
+ for (var s in settings) {
+ if (settings[s].treeId && settings[s].edit.enable && settings[s].treeId != setting.treeId
+ && (event.target.id == settings[s].treeId || $(event.target).parents("#" + settings[s].treeId).length>0)) {
+ isOtherTree = true;
+ targetSetting = settings[s];
+ }
+ }
+
+ var docScrollTop = doc.scrollTop(),
+ docScrollLeft = doc.scrollLeft(),
+ treeOffset = targetSetting.treeObj.offset(),
+ scrollHeight = targetSetting.treeObj.get(0).scrollHeight,
+ scrollWidth = targetSetting.treeObj.get(0).scrollWidth,
+ dTop = (event.clientY + docScrollTop - treeOffset.top),
+ dBottom = (targetSetting.treeObj.height() + treeOffset.top - event.clientY - docScrollTop),
+ dLeft = (event.clientX + docScrollLeft - treeOffset.left),
+ dRight = (targetSetting.treeObj.width() + treeOffset.left - event.clientX - docScrollLeft),
+ isTop = (dTop < setting.edit.drag.borderMax && dTop > setting.edit.drag.borderMin),
+ isBottom = (dBottom < setting.edit.drag.borderMax && dBottom > setting.edit.drag.borderMin),
+ isLeft = (dLeft < setting.edit.drag.borderMax && dLeft > setting.edit.drag.borderMin),
+ isRight = (dRight < setting.edit.drag.borderMax && dRight > setting.edit.drag.borderMin),
+ isTreeInner = dTop > setting.edit.drag.borderMin && dBottom > setting.edit.drag.borderMin && dLeft > setting.edit.drag.borderMin && dRight > setting.edit.drag.borderMin,
+ isTreeTop = (isTop && targetSetting.treeObj.scrollTop() <= 0),
+ isTreeBottom = (isBottom && (targetSetting.treeObj.scrollTop() + targetSetting.treeObj.height()+10) >= scrollHeight),
+ isTreeLeft = (isLeft && targetSetting.treeObj.scrollLeft() <= 0),
+ isTreeRight = (isRight && (targetSetting.treeObj.scrollLeft() + targetSetting.treeObj.width()+10) >= scrollWidth);
+
+ if (event.target && tools.isChildOrSelf(event.target, targetSetting.treeId)) {
+ //get node <li> dom
+ var targetObj = event.target;
+ while (targetObj && targetObj.tagName && !tools.eqs(targetObj.tagName, "li") && targetObj.id != targetSetting.treeId) {
+ targetObj = targetObj.parentNode;
+ }
+
+ var canMove = true;
+ //don't move to self or children of self
+ for (i=0, l=nodes.length; i<l; i++) {
+ tmpNode = nodes[i];
+ if (targetObj.id === tmpNode.tId) {
+ canMove = false;
+ break;
+ } else if ($$(tmpNode, setting).find("#" + targetObj.id).length > 0) {
+ canMove = false;
+ break;
+ }
+ }
+ if (canMove && event.target && tools.isChildOrSelf(event.target, targetObj.id + consts.id.A)) {
+ tmpTarget = $(targetObj);
+ tmpTargetNodeId = targetObj.id;
+ }
+ }
+
+ //the mouse must be in zTree
+ tmpNode = nodes[0];
+ if (isTreeInner && tools.isChildOrSelf(event.target, targetSetting.treeId)) {
+ //judge mouse move in root of ztree
+ if (!tmpTarget && (event.target.id == targetSetting.treeId || isTreeTop || isTreeBottom || isTreeLeft || isTreeRight) && (isOtherTree || (!isOtherTree && tmpNode.parentTId))) {
+ tmpTarget = targetSetting.treeObj;
+ }
+ //auto scroll top
+ if (isTop) {
+ targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop()-10);
+ } else if (isBottom) {
+ targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop()+10);
+ }
+ if (isLeft) {
+ targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()-10);
+ } else if (isRight) {
+ targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()+10);
+ }
+ //auto scroll left
+ if (tmpTarget && tmpTarget != targetSetting.treeObj && tmpTarget.offset().left < targetSetting.treeObj.offset().left) {
+ targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()+ tmpTarget.offset().left - targetSetting.treeObj.offset().left);
+ }
+ }
+
+ curNode.css({
+ "top": (event.clientY + docScrollTop + 3) + "px",
+ "left": (event.clientX + docScrollLeft + 3) + "px"
+ });
+
+ var dX = 0;
+ var dY = 0;
+ if (tmpTarget && tmpTarget.attr("id")!=targetSetting.treeId) {
+ var tmpTargetNode = tmpTargetNodeId == null ? null: data.getNodeCache(targetSetting, tmpTargetNodeId),
+ isCopy = ((event.ctrlKey || event.metaKey) && setting.edit.drag.isMove && setting.edit.drag.isCopy) || (!setting.edit.drag.isMove && setting.edit.drag.isCopy),
+ isPrev = !!(preNode && tmpTargetNodeId === preNode.tId),
+ isNext = !!(nextNode && tmpTargetNodeId === nextNode.tId),
+ isInner = (tmpNode.parentTId && tmpNode.parentTId == tmpTargetNodeId),
+ canPrev = (isCopy || !isNext) && tools.apply(targetSetting.edit.drag.prev, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.prev),
+ canNext = (isCopy || !isPrev) && tools.apply(targetSetting.edit.drag.next, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.next),
+ canInner = (isCopy || !isInner) && !(targetSetting.data.keep.leaf && !tmpTargetNode.isParent) && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.inner);
+ if (!canPrev && !canNext && !canInner) {
+ tmpTarget = null;
+ tmpTargetNodeId = "";
+ moveType = consts.move.TYPE_INNER;
+ tmpArrow.css({
+ "display":"none"
+ });
+ if (window.zTreeMoveTimer) {
+ clearTimeout(window.zTreeMoveTimer);
+ window.zTreeMoveTargetNodeTId = null
+ }
+ } else {
+ var tmpTargetA = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget),
+ tmpNextA = tmpTargetNode.isLastNode ? null : $("#" + tmpTargetNode.getNextNode().tId + consts.id.A, tmpTarget.next()),
+ tmpTop = tmpTargetA.offset().top,
+ tmpLeft = tmpTargetA.offset().left,
+ prevPercent = canPrev ? (canInner ? 0.25 : (canNext ? 0.5 : 1) ) : -1,
+ nextPercent = canNext ? (canInner ? 0.75 : (canPrev ? 0.5 : 0) ) : -1,
+ dY_percent = (event.clientY + docScrollTop - tmpTop)/tmpTargetA.height();
+ if ((prevPercent==1 ||dY_percent<=prevPercent && dY_percent>=-.2) && canPrev) {
+ dX = 1 - tmpArrow.width();
+ dY = tmpTop - tmpArrow.height()/2;
+ moveType = consts.move.TYPE_PREV;
+ } else if ((nextPercent==0 || dY_percent>=nextPercent && dY_percent<=1.2) && canNext) {
+ dX = 1 - tmpArrow.width();
+ dY = (tmpNextA == null || (tmpTargetNode.isParent && tmpTargetNode.open)) ? (tmpTop + tmpTargetA.height() - tmpArrow.height()/2) : (tmpNextA.offset().top - tmpArrow.height()/2);
+ moveType = consts.move.TYPE_NEXT;
+ }else {
+ dX = 5 - tmpArrow.width();
+ dY = tmpTop;
+ moveType = consts.move.TYPE_INNER;
+ }
+ tmpArrow.css({
+ "display":"block",
+ "top": dY + "px",
+ "left": (tmpLeft + dX) + "px"
+ });
+ tmpTargetA.addClass(consts.node.TMPTARGET_NODE + "_" + moveType);
+
+ if (preTmpTargetNodeId != tmpTargetNodeId || preTmpMoveType != moveType) {
+ startTime = (new Date()).getTime();
+ }
+ if (tmpTargetNode && tmpTargetNode.isParent && moveType == consts.move.TYPE_INNER) {
+ var startTimer = true;
+ if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId !== tmpTargetNode.tId) {
+ clearTimeout(window.zTreeMoveTimer);
+ window.zTreeMoveTargetNodeTId = null;
+ }else if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId === tmpTargetNode.tId) {
+ startTimer = false;
+ }
+ if (startTimer) {
+ window.zTreeMoveTimer = setTimeout(function() {
+ if (moveType != consts.move.TYPE_INNER) return;
+ if (tmpTargetNode && tmpTargetNode.isParent && !tmpTargetNode.open && (new Date()).getTime() - startTime > targetSetting.edit.drag.autoOpenTime
+ && tools.apply(targetSetting.callback.beforeDragOpen, [targetSetting.treeId, tmpTargetNode], true)) {
+ view.switchNode(targetSetting, tmpTargetNode);
+ if (targetSetting.edit.drag.autoExpandTrigger) {
+ targetSetting.treeObj.trigger(consts.event.EXPAND, [targetSetting.treeId, tmpTargetNode]);
+ }
+ }
+ }, targetSetting.edit.drag.autoOpenTime+50);
+ window.zTreeMoveTargetNodeTId = tmpTargetNode.tId;
+ }
+ }
+ }
+ } else {
+ moveType = consts.move.TYPE_INNER;
+ if (tmpTarget && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, null], !!targetSetting.edit.drag.inner)) {
+ tmpTarget.addClass(consts.node.TMPTARGET_TREE);
+ } else {
+ tmpTarget = null;
+ }
+ tmpArrow.css({
+ "display":"none"
+ });
+ if (window.zTreeMoveTimer) {
+ clearTimeout(window.zTreeMoveTimer);
+ window.zTreeMoveTargetNodeTId = null;
+ }
+ }
+ preTmpTargetNodeId = tmpTargetNodeId;
+ preTmpMoveType = moveType;
+
+ setting.treeObj.trigger(consts.event.DRAGMOVE, [event, setting.treeId, nodes]);
+ }
+ return false;
+ }
+
+ doc.bind("mouseup", _docMouseUp);
+ function _docMouseUp(event) {
+ if (window.zTreeMoveTimer) {
+ clearTimeout(window.zTreeMoveTimer);
+ window.zTreeMoveTargetNodeTId = null;
+ }
+ preTmpTargetNodeId = null;
+ preTmpMoveType = null;
+ doc.unbind("mousemove", _docMouseMove);
+ doc.unbind("mouseup", _docMouseUp);
+ doc.unbind("selectstart", _docSelect);
+ body.css("cursor", "auto");
+ if (tmpTarget) {
+ tmpTarget.removeClass(consts.node.TMPTARGET_TREE);
+ if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV)
+ .removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER);
+ }
+ tools.showIfameMask(setting, false);
+
+ roots.showHoverDom = true;
+ if (root.dragFlag == 0) return;
+ root.dragFlag = 0;
+
+ var i, l, tmpNode;
+ for (i=0, l=nodes.length; i<l; i++) {
+ tmpNode = nodes[i];
+ if (tmpNode.isParent && root.dragNodeShowBefore[tmpNode.tId] && !tmpNode.open) {
+ view.expandCollapseNode(setting, tmpNode, !tmpNode.open);
+ delete root.dragNodeShowBefore[tmpNode.tId];
+ }
+ }
+
+ if (curNode) curNode.remove();
+ if (tmpArrow) tmpArrow.remove();
+
+ var isCopy = ((event.ctrlKey || event.metaKey) && setting.edit.drag.isMove && setting.edit.drag.isCopy) || (!setting.edit.drag.isMove && setting.edit.drag.isCopy);
+ if (!isCopy && tmpTarget && tmpTargetNodeId && nodes[0].parentTId && tmpTargetNodeId==nodes[0].parentTId && moveType == consts.move.TYPE_INNER) {
+ tmpTarget = null;
+ }
+ if (tmpTarget) {
+ var dragTargetNode = tmpTargetNodeId == null ? null: data.getNodeCache(targetSetting, tmpTargetNodeId);
+ if (tools.apply(setting.callback.beforeDrop, [targetSetting.treeId, nodes, dragTargetNode, moveType, isCopy], true) == false) {
+ view.selectNodes(sourceSetting, nodes);
+ return;
+ }
+ var newNodes = isCopy ? tools.clone(nodes) : nodes;
+
+ function dropCallback() {
+ if (isOtherTree) {
+ if (!isCopy) {
+ for(var i=0, l=nodes.length; i<l; i++) {
+ view.removeNode(setting, nodes[i]);
+ }
+ }
+ if (moveType == consts.move.TYPE_INNER) {
+ view.addNodes(targetSetting, dragTargetNode, newNodes);
+ } else {
+ view.addNodes(targetSetting, dragTargetNode.getParentNode(), newNodes);
+ if (moveType == consts.move.TYPE_PREV) {
+ for (i=0, l=newNodes.length; i<l; i++) {
+ view.moveNode(targetSetting, dragTargetNode, newNodes[i], moveType, false);
+ }
+ } else {
+ for (i=-1, l=newNodes.length-1; i<l; l--) {
+ view.moveNode(targetSetting, dragTargetNode, newNodes[l], moveType, false);
+ }
+ }
+ }
+ } else {
+ if (isCopy && moveType == consts.move.TYPE_INNER) {
+ view.addNodes(targetSetting, dragTargetNode, newNodes);
+ } else {
+ if (isCopy) {
+ view.addNodes(targetSetting, dragTargetNode.getParentNode(), newNodes);
+ }
+ if (moveType != consts.move.TYPE_NEXT) {
+ for (i=0, l=newNodes.length; i<l; i++) {
+ view.moveNode(targetSetting, dragTargetNode, newNodes[i], moveType, false);
+ }
+ } else {
+ for (i=-1, l=newNodes.length-1; i<l; l--) {
+ view.moveNode(targetSetting, dragTargetNode, newNodes[l], moveType, false);
+ }
+ }
+ }
+ }
+ view.selectNodes(targetSetting, newNodes);
+ $$(newNodes[0], setting).focus().blur();
+
+ setting.treeObj.trigger(consts.event.DROP, [event, targetSetting.treeId, newNodes, dragTargetNode, moveType, isCopy]);
+ }
+
+ if (moveType == consts.move.TYPE_INNER && tools.canAsync(targetSetting, dragTargetNode)) {
+ view.asyncNode(targetSetting, dragTargetNode, false, dropCallback);
+ } else {
+ dropCallback();
+ }
+
+ } else {
+ view.selectNodes(sourceSetting, nodes);
+ setting.treeObj.trigger(consts.event.DROP, [event, setting.treeId, nodes, null, null, null]);
+ }
+ }
+
+ doc.bind("selectstart", _docSelect);
+ function _docSelect() {
+ return false;
+ }
+
+ //Avoid FireFox's Bug
+ //If zTree Div CSS set 'overflow', so drag node outside of zTree, and event.target is error.
+ if(eventMouseDown.preventDefault) {
+ eventMouseDown.preventDefault();
+ }
+ return true;
+ }
+ },
+ //method of tools for zTree
+ _tools = {
+ getAbs: function (obj) {
+ var oRect = obj.getBoundingClientRect(),
+ scrollTop = document.body.scrollTop+document.documentElement.scrollTop,
+ scrollLeft = document.body.scrollLeft+document.documentElement.scrollLeft;
+ return [oRect.left+scrollLeft,oRect.top+scrollTop];
+ },
+ inputFocus: function(inputObj) {
+ if (inputObj.get(0)) {
+ inputObj.focus();
+ tools.setCursorPosition(inputObj.get(0), inputObj.val().length);
+ }
+ },
+ inputSelect: function(inputObj) {
+ if (inputObj.get(0)) {
+ inputObj.focus();
+ inputObj.select();
+ }
+ },
+ setCursorPosition: function(obj, pos){
+ if(obj.setSelectionRange) {
+ obj.focus();
+ obj.setSelectionRange(pos,pos);
+ } else if (obj.createTextRange) {
+ var range = obj.createTextRange();
+ range.collapse(true);
+ range.moveEnd('character', pos);
+ range.moveStart('character', pos);
+ range.select();
+ }
+ },
+ showIfameMask: function(setting, showSign) {
+ var root = data.getRoot(setting);
+ //clear full mask
+ while (root.dragMaskList.length > 0) {
+ root.dragMaskList[0].remove();
+ root.dragMaskList.shift();
+ }
+ if (showSign) {
+ //show mask
+ var iframeList = $$("iframe", setting);
+ for (var i = 0, l = iframeList.length; i < l; i++) {
+ var obj = iframeList.get(i),
+ r = tools.getAbs(obj),
+ dragMask = $$("<div id='zTreeMask_" + i + "' class='zTreeMask' style='top:" + r[1] + "px; left:" + r[0] + "px; width:" + obj.offsetWidth + "px; height:" + obj.offsetHeight + "px;'></div>", setting);
+ dragMask.appendTo($$("body", setting));
+ root.dragMaskList.push(dragMask);
+ }
+ }
+ }
+ },
+ //method of operate ztree dom
+ _view = {
+ addEditBtn: function(setting, node) {
+ if (node.editNameFlag || $$(node, consts.id.EDIT, setting).length > 0) {
+ return;
+ }
+ if (!tools.apply(setting.edit.showRenameBtn, [setting.treeId, node], setting.edit.showRenameBtn)) {
+ return;
+ }
+ var aObj = $$(node, consts.id.A, setting),
+ editStr = "<span class='" + consts.className.BUTTON + " edit' id='" + node.tId + consts.id.EDIT + "' title='"+tools.apply(setting.edit.renameTitle, [setting.treeId, node], setting.edit.renameTitle)+"' treeNode"+consts.id.EDIT+" style='display:none;'></span>";
+ aObj.append(editStr);
+
+ $$(node, consts.id.EDIT, setting).bind('click',
+ function() {
+ if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeEditName, [setting.treeId, node], true) == false) return false;
+ view.editNode(setting, node);
+ return false;
+ }
+ ).show();
+ },
+ addRemoveBtn: function(setting, node) {
+ if (node.editNameFlag || $$(node, consts.id.REMOVE, setting).length > 0) {
+ return;
+ }
+ if (!tools.apply(setting.edit.showRemoveBtn, [setting.treeId, node], setting.edit.showRemoveBtn)) {
+ return;
+ }
+ var aObj = $$(node, consts.id.A, setting),
+ removeStr = "<span class='" + consts.className.BUTTON + " remove' id='" + node.tId + consts.id.REMOVE + "' title='"+tools.apply(setting.edit.removeTitle, [setting.treeId, node], setting.edit.removeTitle)+"' treeNode"+consts.id.REMOVE+" style='display:none;'></span>";
+ aObj.append(removeStr);
+
+ $$(node, consts.id.REMOVE, setting).bind('click',
+ function() {
+ if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return false;
+ view.removeNode(setting, node);
+ setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]);
+ return false;
+ }
+ ).bind('mousedown',
+ function(eventMouseDown) {
+ return true;
+ }
+ ).show();
+ },
+ addHoverDom: function(setting, node) {
+ if (data.getRoots().showHoverDom) {
+ node.isHover = true;
+ if (setting.edit.enable) {
+ //view.addEditBtn(setting, node);
+ view.addRemoveBtn(setting, node);
+ view.addEditBtn(setting, node);
+ }
+ tools.apply(setting.view.addHoverDom, [setting.treeId, node]);
+ }
+ },
+ cancelCurEditNode: function (setting, forceName, isCancel) {
+ var root = data.getRoot(setting),
+ nameKey = setting.data.key.name,
+ node = root.curEditNode;
+
+ if (node) {
+ var inputObj = root.curEditInput,
+ newName = forceName ? forceName:(isCancel ? node[nameKey]: inputObj.val());
+ if (tools.apply(setting.callback.beforeRename, [setting.treeId, node, newName, isCancel], true) === false) {
+ return false;
+ } else {
+ node[nameKey] = newName;
+ setting.treeObj.trigger(consts.event.RENAME, [setting.treeId, node, isCancel]);
+ }
+ var aObj = $$(node, consts.id.A, setting);
+ aObj.removeClass(consts.node.CURSELECTED_EDIT);
+ inputObj.unbind();
+ view.setNodeName(setting, node);
+ node.editNameFlag = false;
+ root.curEditNode = null;
+ root.curEditInput = null;
+ view.selectNode(setting, node, false);
+ }
+ root.noSelection = true;
+ return true;
+ },
+ editNode: function(setting, node) {
+ var root = data.getRoot(setting);
+ view.editNodeBlur = false;
+ if (data.isSelectedNode(setting, node) && root.curEditNode == node && node.editNameFlag) {
+ setTimeout(function() {tools.inputFocus(root.curEditInput);}, 0);
+ return;
+ }
+ var nameKey = setting.data.key.name;
+ node.editNameFlag = true;
+ view.removeTreeDom(setting, node);
+ view.cancelCurEditNode(setting);
+ view.selectNode(setting, node, false);
+ $$(node, consts.id.SPAN, setting).html("<input type=text class='rename' id='" + node.tId + consts.id.INPUT + "' treeNode" + consts.id.INPUT + " >");
+ var inputObj = $$(node, consts.id.INPUT, setting);
+ inputObj.attr("value", node[nameKey]);
+ if (setting.edit.editNameSelectAll) {
+ tools.inputSelect(inputObj);
+ } else {
+ tools.inputFocus(inputObj);
+ }
+
+ inputObj.bind('blur', function(event) {
+ if (!view.editNodeBlur) {
+ view.cancelCurEditNode(setting);
+ }
+ }).bind('keydown', function(event) {
+ if (event.keyCode=="13") {
+ view.editNodeBlur = true;
+ view.cancelCurEditNode(setting);
+ } else if (event.keyCode=="27") {
+ view.cancelCurEditNode(setting, null, true);
+ }
+ }).bind('click', function(event) {
+ return false;
+ }).bind('dblclick', function(event) {
+ return false;
+ });
+
+ $$(node, consts.id.A, setting).addClass(consts.node.CURSELECTED_EDIT);
+ root.curEditInput = inputObj;
+ root.noSelection = false;
+ root.curEditNode = node;
+ },
+ moveNode: function(setting, targetNode, node, moveType, animateFlag, isSilent) {
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children;
+ if (targetNode == node) return;
+ if (setting.data.keep.leaf && targetNode && !targetNode.isParent && moveType == consts.move.TYPE_INNER) return;
+ var oldParentNode = (node.parentTId ? node.getParentNode(): root),
+ targetNodeIsRoot = (targetNode === null || targetNode == root);
+ if (targetNodeIsRoot && targetNode === null) targetNode = root;
+ if (targetNodeIsRoot) moveType = consts.move.TYPE_INNER;
+ var targetParentNode = (targetNode.parentTId ? targetNode.getParentNode() : root);
+
+ if (moveType != consts.move.TYPE_PREV && moveType != consts.move.TYPE_NEXT) {
+ moveType = consts.move.TYPE_INNER;
+ }
+
+ if (moveType == consts.move.TYPE_INNER) {
+ if (targetNodeIsRoot) {
+ //parentTId of root node is null
+ node.parentTId = null;
+ } else {
+ if (!targetNode.isParent) {
+ targetNode.isParent = true;
+ targetNode.open = !!targetNode.open;
+ view.setNodeLineIcos(setting, targetNode);
+ }
+ node.parentTId = targetNode.tId;
+ }
+ }
+
+ //move node Dom
+ var targetObj, target_ulObj;
+ if (targetNodeIsRoot) {
+ targetObj = setting.treeObj;
+ target_ulObj = targetObj;
+ } else {
+ if (!isSilent && moveType == consts.move.TYPE_INNER) {
+ view.expandCollapseNode(setting, targetNode, true, false);
+ } else if (!isSilent) {
+ view.expandCollapseNode(setting, targetNode.getParentNode(), true, false);
+ }
+ targetObj = $$(targetNode, setting);
+ target_ulObj = $$(targetNode, consts.id.UL, setting);
+ if (!!targetObj.get(0) && !target_ulObj.get(0)) {
+ var ulstr = [];
+ view.makeUlHtml(setting, targetNode, ulstr, '');
+ targetObj.append(ulstr.join(''));
+ }
+ target_ulObj = $$(targetNode, consts.id.UL, setting);
+ }
+ var nodeDom = $$(node, setting);
+ if (!nodeDom.get(0)) {
+ nodeDom = view.appendNodes(setting, node.level, [node], null, false, true).join('');
+ } else if (!targetObj.get(0)) {
+ nodeDom.remove();
+ }
+ if (target_ulObj.get(0) && moveType == consts.move.TYPE_INNER) {
+ target_ulObj.append(nodeDom);
+ } else if (targetObj.get(0) && moveType == consts.move.TYPE_PREV) {
+ targetObj.before(nodeDom);
+ } else if (targetObj.get(0) && moveType == consts.move.TYPE_NEXT) {
+ targetObj.after(nodeDom);
+ }
+
+ //repair the data after move
+ var i,l,
+ tmpSrcIndex = -1,
+ tmpTargetIndex = 0,
+ oldNeighbor = null,
+ newNeighbor = null,
+ oldLevel = node.level;
+ if (node.isFirstNode) {
+ tmpSrcIndex = 0;
+ if (oldParentNode[childKey].length > 1 ) {
+ oldNeighbor = oldParentNode[childKey][1];
+ oldNeighbor.isFirstNode = true;
+ }
+ } else if (node.isLastNode) {
+ tmpSrcIndex = oldParentNode[childKey].length -1;
+ oldNeighbor = oldParentNode[childKey][tmpSrcIndex - 1];
+ oldNeighbor.isLastNode = true;
+ } else {
+ for (i = 0, l = oldParentNode[childKey].length; i < l; i++) {
+ if (oldParentNode[childKey][i].tId == node.tId) {
+ tmpSrcIndex = i;
+ break;
+ }
+ }
+ }
+ if (tmpSrcIndex >= 0) {
+ oldParentNode[childKey].splice(tmpSrcIndex, 1);
+ }
+ if (moveType != consts.move.TYPE_INNER) {
+ for (i = 0, l = targetParentNode[childKey].length; i < l; i++) {
+ if (targetParentNode[childKey][i].tId == targetNode.tId) tmpTargetIndex = i;
+ }
+ }
+ if (moveType == consts.move.TYPE_INNER) {
+ if (!targetNode[childKey]) targetNode[childKey] = new Array();
+ if (targetNode[childKey].length > 0) {
+ newNeighbor = targetNode[childKey][targetNode[childKey].length - 1];
+ newNeighbor.isLastNode = false;
+ }
+ targetNode[childKey].splice(targetNode[childKey].length, 0, node);
+ node.isLastNode = true;
+ node.isFirstNode = (targetNode[childKey].length == 1);
+ } else if (targetNode.isFirstNode && moveType == consts.move.TYPE_PREV) {
+ targetParentNode[childKey].splice(tmpTargetIndex, 0, node);
+ newNeighbor = targetNode;
+ newNeighbor.isFirstNode = false;
+ node.parentTId = targetNode.parentTId;
+ node.isFirstNode = true;
+ node.isLastNode = false;
+
+ } else if (targetNode.isLastNode && moveType == consts.move.TYPE_NEXT) {
+ targetParentNode[childKey].splice(tmpTargetIndex + 1, 0, node);
+ newNeighbor = targetNode;
+ newNeighbor.isLastNode = false;
+ node.parentTId = targetNode.parentTId;
+ node.isFirstNode = false;
+ node.isLastNode = true;
+
+ } else {
+ if (moveType == consts.move.TYPE_PREV) {
+ targetParentNode[childKey].splice(tmpTargetIndex, 0, node);
+ } else {
+ targetParentNode[childKey].splice(tmpTargetIndex + 1, 0, node);
+ }
+ node.parentTId = targetNode.parentTId;
+ node.isFirstNode = false;
+ node.isLastNode = false;
+ }
+ data.fixPIdKeyValue(setting, node);
+ data.setSonNodeLevel(setting, node.getParentNode(), node);
+
+ //repair node what been moved
+ view.setNodeLineIcos(setting, node);
+ view.repairNodeLevelClass(setting, node, oldLevel)
+
+ //repair node's old parentNode dom
+ if (!setting.data.keep.parent && oldParentNode[childKey].length < 1) {
+ //old parentNode has no child nodes
+ oldParentNode.isParent = false;
+ oldParentNode.open = false;
+ var tmp_ulObj = $$(oldParentNode, consts.id.UL, setting),
+ tmp_switchObj = $$(oldParentNode, consts.id.SWITCH, setting),
+ tmp_icoObj = $$(oldParentNode, consts.id.ICON, setting);
+ view.replaceSwitchClass(oldParentNode, tmp_switchObj, consts.folder.DOCU);
+ view.replaceIcoClass(oldParentNode, tmp_icoObj, consts.folder.DOCU);
+ tmp_ulObj.css("display", "none");
+
+ } else if (oldNeighbor) {
+ //old neigbor node
+ view.setNodeLineIcos(setting, oldNeighbor);
+ }
+
+ //new neigbor node
+ if (newNeighbor) {
+ view.setNodeLineIcos(setting, newNeighbor);
+ }
+
+ //repair checkbox / radio
+ if (!!setting.check && setting.check.enable && view.repairChkClass) {
+ view.repairChkClass(setting, oldParentNode);
+ view.repairParentChkClassWithSelf(setting, oldParentNode);
+ if (oldParentNode != node.parent)
+ view.repairParentChkClassWithSelf(setting, node);
+ }
+
+ //expand parents after move
+ if (!isSilent) {
+ view.expandCollapseParentNode(setting, node.getParentNode(), true, animateFlag);
+ }
+ },
+ removeEditBtn: function(setting, node) {
+ $$(node, consts.id.EDIT, setting).unbind().remove();
+ },
+ removeRemoveBtn: function(setting, node) {
+ $$(node, consts.id.REMOVE, setting).unbind().remove();
+ },
+ removeTreeDom: function(setting, node) {
+ node.isHover = false;
+ view.removeEditBtn(setting, node);
+ view.removeRemoveBtn(setting, node);
+ tools.apply(setting.view.removeHoverDom, [setting.treeId, node]);
+ },
+ repairNodeLevelClass: function(setting, node, oldLevel) {
+ if (oldLevel === node.level) return;
+ var liObj = $$(node, setting),
+ aObj = $$(node, consts.id.A, setting),
+ ulObj = $$(node, consts.id.UL, setting),
+ oldClass = consts.className.LEVEL + oldLevel,
+ newClass = consts.className.LEVEL + node.level;
+ liObj.removeClass(oldClass);
+ liObj.addClass(newClass);
+ aObj.removeClass(oldClass);
+ aObj.addClass(newClass);
+ ulObj.removeClass(oldClass);
+ ulObj.addClass(newClass);
+ },
+ selectNodes : function(setting, nodes) {
+ for (var i=0, l=nodes.length; i<l; i++) {
+ view.selectNode(setting, nodes[i], i>0);
+ }
+ }
+ },
+
+ _z = {
+ tools: _tools,
+ view: _view,
+ event: _event,
+ data: _data
+ };
+ $.extend(true, $.fn.zTree.consts, _consts);
+ $.extend(true, $.fn.zTree._z, _z);
+
+ var zt = $.fn.zTree,
+ tools = zt._z.tools,
+ consts = zt.consts,
+ view = zt._z.view,
+ data = zt._z.data,
+ event = zt._z.event,
+ $$ = tools.$;
+
+ data.exSetting(_setting);
+ data.addInitBind(_bindEvent);
+ data.addInitUnBind(_unbindEvent);
+ data.addInitCache(_initCache);
+ data.addInitNode(_initNode);
+ data.addInitProxy(_eventProxy);
+ data.addInitRoot(_initRoot);
+ data.addZTreeTools(_zTreeTools);
+
+ var _cancelPreSelectedNode = view.cancelPreSelectedNode;
+ view.cancelPreSelectedNode = function (setting, node) {
+ var list = data.getRoot(setting).curSelectedList;
+ for (var i=0, j=list.length; i<j; i++) {
+ if (!node || node === list[i]) {
+ view.removeTreeDom(setting, list[i]);
+ if (node) break;
+ }
+ }
+ if (_cancelPreSelectedNode) _cancelPreSelectedNode.apply(view, arguments);
+ }
+
+ var _createNodes = view.createNodes;
+ view.createNodes = function(setting, level, nodes, parentNode) {
+ if (_createNodes) {
+ _createNodes.apply(view, arguments);
+ }
+ if (!nodes) return;
+ if (view.repairParentChkClassWithSelf) {
+ view.repairParentChkClassWithSelf(setting, parentNode);
+ }
+ }
+
+ var _makeNodeUrl = view.makeNodeUrl;
+ view.makeNodeUrl = function(setting, node) {
+ return setting.edit.enable ? null : (_makeNodeUrl.apply(view, arguments));
+ }
+
+ var _removeNode = view.removeNode;
+ view.removeNode = function(setting, node) {
+ var root = data.getRoot(setting);
+ if (root.curEditNode === node) root.curEditNode = null;
+ if (_removeNode) {
+ _removeNode.apply(view, arguments);
+ }
+ }
+
+ var _selectNode = view.selectNode;
+ view.selectNode = function(setting, node, addFlag) {
+ var root = data.getRoot(setting);
+ if (data.isSelectedNode(setting, node) && root.curEditNode == node && node.editNameFlag) {
+ return false;
+ }
+ if (_selectNode) _selectNode.apply(view, arguments);
+ view.addHoverDom(setting, node);
+ return true;
+ }
+
+ var _uCanDo = tools.uCanDo;
+ tools.uCanDo = function(setting, e) {
+ var root = data.getRoot(setting);
+ if (e && (tools.eqs(e.type, "mouseover") || tools.eqs(e.type, "mouseout") || tools.eqs(e.type, "mousedown") || tools.eqs(e.type, "mouseup"))) {
+ return true;
+ }
+ if (root.curEditNode) {
+ view.editNodeBlur = false;
+ root.curEditInput.focus();
+ }
+ return (!root.curEditNode) && (_uCanDo ? _uCanDo.apply(view, arguments) : true);
+ }
+})(jQuery);
diff --git a/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.all.min.js b/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.all.min.js
new file mode 100644
index 0000000..0677d9e
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.all.min.js
@@ -0,0 +1,160 @@
+
+/*
+ * JQuery zTree core v3.5.16
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2014-03-09
+ */
+(function(p){var G,H,I,J,K,L,r={},u={},v={},M={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{children:"children",name:"name",title:"",url:"url"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",url:"",autoParam:[],
+otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},w=[function(b){var a=b.treeObj,c=e.event;a.bind(c.NODECREATED,function(a,c,g){j.apply(b.callback.onNodeCreated,
+[a,c,g])});a.bind(c.CLICK,function(a,c,g,l,h){j.apply(b.callback.onClick,[c,g,l,h])});a.bind(c.EXPAND,function(a,c,g){j.apply(b.callback.onExpand,[a,c,g])});a.bind(c.COLLAPSE,function(a,c,g){j.apply(b.callback.onCollapse,[a,c,g])});a.bind(c.ASYNC_SUCCESS,function(a,c,g,l){j.apply(b.callback.onAsyncSuccess,[a,c,g,l])});a.bind(c.ASYNC_ERROR,function(a,c,g,l,h,e){j.apply(b.callback.onAsyncError,[a,c,g,l,h,e])});a.bind(c.REMOVE,function(a,c,g){j.apply(b.callback.onRemove,[a,c,g])})}],x=[function(b){var a=
+e.event;b.treeObj.unbind(a.NODECREATED).unbind(a.CLICK).unbind(a.EXPAND).unbind(a.COLLAPSE).unbind(a.ASYNC_SUCCESS).unbind(a.ASYNC_ERROR).unbind(a.REMOVE)}],y=[function(b){var a=h.getCache(b);a||(a={},h.setCache(b,a));a.nodes=[];a.doms=[]}],z=[function(b,a,c,d,f,g){if(c){var l=h.getRoot(b),e=b.data.key.children;c.level=a;c.tId=b.treeId+"_"+ ++l.zId;c.parentTId=d?d.tId:null;c.open=typeof c.open=="string"?j.eqs(c.open,"true"):!!c.open;c[e]&&c[e].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent=typeof c.isParent==
+"string"?j.eqs(c.isParent,"true"):!!c.isParent,c.open=c.isParent&&!b.async.enable?c.open:!1,c.zAsync=!c.isParent);c.isFirstNode=f;c.isLastNode=g;c.getParentNode=function(){return h.getNodeCache(b,c.parentTId)};c.getPreNode=function(){return h.getPreNode(b,c)};c.getNextNode=function(){return h.getNextNode(b,c)};c.isAjaxing=!1;h.fixPIdKeyValue(b,c)}}],s=[function(b){var a=b.target,c=h.getSetting(b.data.treeId),d="",f=null,g="",l="",i=null,n=null,k=null;if(j.eqs(b.type,"mousedown"))l="mousedown";else if(j.eqs(b.type,
+"mouseup"))l="mouseup";else if(j.eqs(b.type,"contextmenu"))l="contextmenu";else if(j.eqs(b.type,"click"))if(j.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+e.id.SWITCH)!==null)d=j.getNodeMainDom(a).id,g="switchNode";else{if(k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}]))d=j.getNodeMainDom(k).id,g="clickNode"}else if(j.eqs(b.type,"dblclick")&&(l="dblclick",k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}])))d=j.getNodeMainDom(k).id,g="switchNode";if(l.length>0&&d.length==0&&
+(k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}])))d=j.getNodeMainDom(k).id;if(d.length>0)switch(f=h.getNodeCache(c,d),g){case "switchNode":f.isParent?j.eqs(b.type,"click")||j.eqs(b.type,"dblclick")&&j.apply(c.view.dblClickExpand,[c.treeId,f],c.view.dblClickExpand)?i=G:g="":g="";break;case "clickNode":i=H}switch(l){case "mousedown":n=I;break;case "mouseup":n=J;break;case "dblclick":n=K;break;case "contextmenu":n=L}return{stop:!1,node:f,nodeEventType:g,nodeEventCallback:i,treeEventType:l,
+treeEventCallback:n}}],A=[function(b){var a=h.getRoot(b);a||(a={},h.setRoot(b,a));a[b.data.key.children]=[];a.expandTriggerFlag=!1;a.curSelectedList=[];a.noSelection=!0;a.createdNodes=[];a.zId=0;a._ver=(new Date).getTime()}],B=[],C=[],D=[],E=[],F=[],h={addNodeCache:function(b,a){h.getCache(b).nodes[h.getNodeCacheId(a.tId)]=a},getNodeCacheId:function(b){return b.substring(b.lastIndexOf("_")+1)},addAfterA:function(b){C.push(b)},addBeforeA:function(b){B.push(b)},addInnerAfterA:function(b){E.push(b)},
+addInnerBeforeA:function(b){D.push(b)},addInitBind:function(b){w.push(b)},addInitUnBind:function(b){x.push(b)},addInitCache:function(b){y.push(b)},addInitNode:function(b){z.push(b)},addInitProxy:function(b,a){a?s.splice(0,0,b):s.push(b)},addInitRoot:function(b){A.push(b)},addNodesData:function(b,a,c){var d=b.data.key.children;a[d]||(a[d]=[]);if(a[d].length>0)a[d][a[d].length-1].isLastNode=!1,i.setNodeLineIcos(b,a[d][a[d].length-1]);a.isParent=!0;a[d]=a[d].concat(c)},addSelectedNode:function(b,a){var c=
+h.getRoot(b);h.isSelectedNode(b,a)||c.curSelectedList.push(a)},addCreatedNode:function(b,a){(b.callback.onNodeCreated||b.view.addDiyDom)&&h.getRoot(b).createdNodes.push(a)},addZTreeTools:function(b){F.push(b)},exSetting:function(b){p.extend(!0,M,b)},fixPIdKeyValue:function(b,a){b.data.simpleData.enable&&(a[b.data.simpleData.pIdKey]=a.parentTId?a.getParentNode()[b.data.simpleData.idKey]:b.data.simpleData.rootPId)},getAfterA:function(b,a,c){for(var d=0,f=C.length;d<f;d++)C[d].apply(this,arguments)},
+getBeforeA:function(b,a,c){for(var d=0,f=B.length;d<f;d++)B[d].apply(this,arguments)},getInnerAfterA:function(b,a,c){for(var d=0,f=E.length;d<f;d++)E[d].apply(this,arguments)},getInnerBeforeA:function(b,a,c){for(var d=0,f=D.length;d<f;d++)D[d].apply(this,arguments)},getCache:function(b){return v[b.treeId]},getNextNode:function(b,a){if(!a)return null;for(var c=b.data.key.children,d=a.parentTId?a.getParentNode():h.getRoot(b),f=0,g=d[c].length-1;f<=g;f++)if(d[c][f]===a)return f==g?null:d[c][f+1];return null},
+getNodeByParam:function(b,a,c,d){if(!a||!c)return null;for(var f=b.data.key.children,g=0,l=a.length;g<l;g++){if(a[g][c]==d)return a[g];var e=h.getNodeByParam(b,a[g][f],c,d);if(e)return e}return null},getNodeCache:function(b,a){if(!a)return null;var c=v[b.treeId].nodes[h.getNodeCacheId(a)];return c?c:null},getNodeName:function(b,a){return""+a[b.data.key.name]},getNodeTitle:function(b,a){return""+a[b.data.key.title===""?b.data.key.name:b.data.key.title]},getNodes:function(b){return h.getRoot(b)[b.data.key.children]},
+getNodesByParam:function(b,a,c,d){if(!a||!c)return[];for(var f=b.data.key.children,g=[],l=0,e=a.length;l<e;l++)a[l][c]==d&&g.push(a[l]),g=g.concat(h.getNodesByParam(b,a[l][f],c,d));return g},getNodesByParamFuzzy:function(b,a,c,d){if(!a||!c)return[];for(var f=b.data.key.children,g=[],d=d.toLowerCase(),l=0,e=a.length;l<e;l++)typeof a[l][c]=="string"&&a[l][c].toLowerCase().indexOf(d)>-1&&g.push(a[l]),g=g.concat(h.getNodesByParamFuzzy(b,a[l][f],c,d));return g},getNodesByFilter:function(b,a,c,d,f){if(!a)return d?
+null:[];for(var g=b.data.key.children,e=d?null:[],i=0,n=a.length;i<n;i++){if(j.apply(c,[a[i],f],!1)){if(d)return a[i];e.push(a[i])}var k=h.getNodesByFilter(b,a[i][g],c,d,f);if(d&&k)return k;e=d?k:e.concat(k)}return e},getPreNode:function(b,a){if(!a)return null;for(var c=b.data.key.children,d=a.parentTId?a.getParentNode():h.getRoot(b),f=0,g=d[c].length;f<g;f++)if(d[c][f]===a)return f==0?null:d[c][f-1];return null},getRoot:function(b){return b?u[b.treeId]:null},getRoots:function(){return u},getSetting:function(b){return r[b]},
+getSettings:function(){return r},getZTreeTools:function(b){return(b=this.getRoot(this.getSetting(b)))?b.treeTools:null},initCache:function(b){for(var a=0,c=y.length;a<c;a++)y[a].apply(this,arguments)},initNode:function(b,a,c,d,f,g){for(var e=0,h=z.length;e<h;e++)z[e].apply(this,arguments)},initRoot:function(b){for(var a=0,c=A.length;a<c;a++)A[a].apply(this,arguments)},isSelectedNode:function(b,a){for(var c=h.getRoot(b),d=0,f=c.curSelectedList.length;d<f;d++)if(a===c.curSelectedList[d])return!0;return!1},
+removeNodeCache:function(b,a){var c=b.data.key.children;if(a[c])for(var d=0,f=a[c].length;d<f;d++)arguments.callee(b,a[c][d]);h.getCache(b).nodes[h.getNodeCacheId(a.tId)]=null},removeSelectedNode:function(b,a){for(var c=h.getRoot(b),d=0,f=c.curSelectedList.length;d<f;d++)if(a===c.curSelectedList[d]||!h.getNodeCache(b,c.curSelectedList[d].tId))c.curSelectedList.splice(d,1),d--,f--},setCache:function(b,a){v[b.treeId]=a},setRoot:function(b,a){u[b.treeId]=a},setZTreeTools:function(b,a){for(var c=0,d=
+F.length;c<d;c++)F[c].apply(this,arguments)},transformToArrayFormat:function(b,a){if(!a)return[];var c=b.data.key.children,d=[];if(j.isArray(a))for(var f=0,g=a.length;f<g;f++)d.push(a[f]),a[f][c]&&(d=d.concat(h.transformToArrayFormat(b,a[f][c])));else d.push(a),a[c]&&(d=d.concat(h.transformToArrayFormat(b,a[c])));return d},transformTozTreeFormat:function(b,a){var c,d,f=b.data.simpleData.idKey,g=b.data.simpleData.pIdKey,e=b.data.key.children;if(!f||f==""||!a)return[];if(j.isArray(a)){var h=[],i=[];
+for(c=0,d=a.length;c<d;c++)i[a[c][f]]=a[c];for(c=0,d=a.length;c<d;c++)i[a[c][g]]&&a[c][f]!=a[c][g]?(i[a[c][g]][e]||(i[a[c][g]][e]=[]),i[a[c][g]][e].push(a[c])):h.push(a[c]);return h}else return[a]}},m={bindEvent:function(b){for(var a=0,c=w.length;a<c;a++)w[a].apply(this,arguments)},unbindEvent:function(b){for(var a=0,c=x.length;a<c;a++)x[a].apply(this,arguments)},bindTree:function(b){var a={treeId:b.treeId},c=b.treeObj;b.view.txtSelectedEnable||c.bind("selectstart",function(a){a=a.originalEvent.srcElement.nodeName.toLowerCase();
+return a==="input"||a==="textarea"}).css({"-moz-user-select":"-moz-none"});c.bind("click",a,m.proxy);c.bind("dblclick",a,m.proxy);c.bind("mouseover",a,m.proxy);c.bind("mouseout",a,m.proxy);c.bind("mousedown",a,m.proxy);c.bind("mouseup",a,m.proxy);c.bind("contextmenu",a,m.proxy)},unbindTree:function(b){b.treeObj.unbind("click",m.proxy).unbind("dblclick",m.proxy).unbind("mouseover",m.proxy).unbind("mouseout",m.proxy).unbind("mousedown",m.proxy).unbind("mouseup",m.proxy).unbind("contextmenu",m.proxy)},
+doProxy:function(b){for(var a=[],c=0,d=s.length;c<d;c++){var f=s[c].apply(this,arguments);a.push(f);if(f.stop)break}return a},proxy:function(b){var a=h.getSetting(b.data.treeId);if(!j.uCanDo(a,b))return!0;for(var a=m.doProxy(b),c=!0,d=0,f=a.length;d<f;d++){var g=a[d];g.nodeEventCallback&&(c=g.nodeEventCallback.apply(g,[b,g.node])&&c);g.treeEventCallback&&(c=g.treeEventCallback.apply(g,[b,g.node])&&c)}return c}};G=function(b,a){var c=h.getSetting(b.data.treeId);if(a.open){if(j.apply(c.callback.beforeCollapse,
+[c.treeId,a],!0)==!1)return!0}else if(j.apply(c.callback.beforeExpand,[c.treeId,a],!0)==!1)return!0;h.getRoot(c).expandTriggerFlag=!0;i.switchNode(c,a);return!0};H=function(b,a){var c=h.getSetting(b.data.treeId),d=c.view.autoCancelSelected&&(b.ctrlKey||b.metaKey)&&h.isSelectedNode(c,a)?0:c.view.autoCancelSelected&&(b.ctrlKey||b.metaKey)&&c.view.selectedMulti?2:1;if(j.apply(c.callback.beforeClick,[c.treeId,a,d],!0)==!1)return!0;d===0?i.cancelPreSelectedNode(c,a):i.selectNode(c,a,d===2);c.treeObj.trigger(e.event.CLICK,
+[b,c.treeId,a,d]);return!0};I=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeMouseDown,[c.treeId,a],!0)&&j.apply(c.callback.onMouseDown,[b,c.treeId,a]);return!0};J=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeMouseUp,[c.treeId,a],!0)&&j.apply(c.callback.onMouseUp,[b,c.treeId,a]);return!0};K=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeDblClick,[c.treeId,a],!0)&&j.apply(c.callback.onDblClick,[b,c.treeId,a]);return!0};
+L=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeRightClick,[c.treeId,a],!0)&&j.apply(c.callback.onRightClick,[b,c.treeId,a]);return typeof c.callback.onRightClick!="function"};var j={apply:function(b,a,c){return typeof b=="function"?b.apply(N,a?a:[]):c},canAsync:function(b,a){var c=b.data.key.children;return b.async.enable&&a&&a.isParent&&!(a.zAsync||a[c]&&a[c].length>0)},clone:function(b){if(b===null)return null;var a=j.isArray(b)?[]:{},c;for(c in b)a[c]=b[c]instanceof
+Date?new Date(b[c].getTime()):typeof b[c]==="object"?arguments.callee(b[c]):b[c];return a},eqs:function(b,a){return b.toLowerCase()===a.toLowerCase()},isArray:function(b){return Object.prototype.toString.apply(b)==="[object Array]"},$:function(b,a,c){a&&typeof a!="string"&&(c=a,a="");return typeof b=="string"?p(b,c?c.treeObj.get(0).ownerDocument:null):p("#"+b.tId+a,c?c.treeObj:null)},getMDom:function(b,a,c){if(!a)return null;for(;a&&a.id!==b.treeId;){for(var d=0,f=c.length;a.tagName&&d<f;d++)if(j.eqs(a.tagName,
+c[d].tagName)&&a.getAttribute(c[d].attrName)!==null)return a;a=a.parentNode}return null},getNodeMainDom:function(b){return p(b).parent("li").get(0)||p(b).parentsUntil("li").parent().get(0)},isChildOrSelf:function(b,a){return p(b).closest("#"+a).length>0},uCanDo:function(){return!0}},i={addNodes:function(b,a,c,d){if(!b.data.keep.leaf||!a||a.isParent)if(j.isArray(c)||(c=[c]),b.data.simpleData.enable&&(c=h.transformTozTreeFormat(b,c)),a){var f=k(a,e.id.SWITCH,b),g=k(a,e.id.ICON,b),l=k(a,e.id.UL,b);if(!a.open)i.replaceSwitchClass(a,
+f,e.folder.CLOSE),i.replaceIcoClass(a,g,e.folder.CLOSE),a.open=!1,l.css({display:"none"});h.addNodesData(b,a,c);i.createNodes(b,a.level+1,c,a);d||i.expandCollapseParentNode(b,a,!0)}else h.addNodesData(b,h.getRoot(b),c),i.createNodes(b,0,c,null)},appendNodes:function(b,a,c,d,f,g){if(!c)return[];for(var e=[],j=b.data.key.children,k=0,m=c.length;k<m;k++){var o=c[k];if(f){var t=(d?d:h.getRoot(b))[j].length==c.length&&k==0;h.initNode(b,a,o,d,t,k==c.length-1,g);h.addNodeCache(b,o)}t=[];o[j]&&o[j].length>
+0&&(t=i.appendNodes(b,a+1,o[j],o,f,g&&o.open));g&&(i.makeDOMNodeMainBefore(e,b,o),i.makeDOMNodeLine(e,b,o),h.getBeforeA(b,o,e),i.makeDOMNodeNameBefore(e,b,o),h.getInnerBeforeA(b,o,e),i.makeDOMNodeIcon(e,b,o),h.getInnerAfterA(b,o,e),i.makeDOMNodeNameAfter(e,b,o),h.getAfterA(b,o,e),o.isParent&&o.open&&i.makeUlHtml(b,o,e,t.join("")),i.makeDOMNodeMainAfter(e,b,o),h.addCreatedNode(b,o))}return e},appendParentULDom:function(b,a){var c=[],d=k(a,b);!d.get(0)&&a.parentTId&&(i.appendParentULDom(b,a.getParentNode()),
+d=k(a,b));var f=k(a,e.id.UL,b);f.get(0)&&f.remove();f=i.appendNodes(b,a.level+1,a[b.data.key.children],a,!1,!0);i.makeUlHtml(b,a,c,f.join(""));d.append(c.join(""))},asyncNode:function(b,a,c,d){var f,g;if(a&&!a.isParent)return j.apply(d),!1;else if(a&&a.isAjaxing)return!1;else if(j.apply(b.callback.beforeAsync,[b.treeId,a],!0)==!1)return j.apply(d),!1;if(a)a.isAjaxing=!0,k(a,e.id.ICON,b).attr({style:"","class":e.className.BUTTON+" "+e.className.ICO_LOADING});var l={};for(f=0,g=b.async.autoParam.length;a&&
+f<g;f++){var q=b.async.autoParam[f].split("="),n=q;q.length>1&&(n=q[1],q=q[0]);l[n]=a[q]}if(j.isArray(b.async.otherParam))for(f=0,g=b.async.otherParam.length;f<g;f+=2)l[b.async.otherParam[f]]=b.async.otherParam[f+1];else for(var m in b.async.otherParam)l[m]=b.async.otherParam[m];var o=h.getRoot(b)._ver;p.ajax({contentType:b.async.contentType,type:b.async.type,url:j.apply(b.async.url,[b.treeId,a],b.async.url),data:l,dataType:b.async.dataType,success:function(f){if(o==h.getRoot(b)._ver){var g=[];try{g=
+!f||f.length==0?[]:typeof f=="string"?eval("("+f+")"):f}catch(l){g=f}if(a)a.isAjaxing=null,a.zAsync=!0;i.setNodeLineIcos(b,a);g&&g!==""?(g=j.apply(b.async.dataFilter,[b.treeId,a,g],g),i.addNodes(b,a,g?j.clone(g):[],!!c)):i.addNodes(b,a,[],!!c);b.treeObj.trigger(e.event.ASYNC_SUCCESS,[b.treeId,a,f]);j.apply(d)}},error:function(c,d,f){if(o==h.getRoot(b)._ver){if(a)a.isAjaxing=null;i.setNodeLineIcos(b,a);b.treeObj.trigger(e.event.ASYNC_ERROR,[b.treeId,a,c,d,f])}}});return!0},cancelPreSelectedNode:function(b,
+a){for(var c=h.getRoot(b).curSelectedList,d=c.length-1;d>=0;d--)if(!a||a===c[d])if(k(c[d],e.id.A,b).removeClass(e.node.CURSELECTED),a){h.removeSelectedNode(b,a);break}if(!a)h.getRoot(b).curSelectedList=[]},createNodeCallback:function(b){if(b.callback.onNodeCreated||b.view.addDiyDom)for(var a=h.getRoot(b);a.createdNodes.length>0;){var c=a.createdNodes.shift();j.apply(b.view.addDiyDom,[b.treeId,c]);b.callback.onNodeCreated&&b.treeObj.trigger(e.event.NODECREATED,[b.treeId,c])}},createNodes:function(b,
+a,c,d){if(c&&c.length!=0){var f=h.getRoot(b),g=b.data.key.children,g=!d||d.open||!!k(d[g][0],b).get(0);f.createdNodes=[];a=i.appendNodes(b,a,c,d,!0,g);d?(d=k(d,e.id.UL,b),d.get(0)&&d.append(a.join(""))):b.treeObj.append(a.join(""));i.createNodeCallback(b)}},destroy:function(b){b&&(h.initCache(b),h.initRoot(b),m.unbindTree(b),m.unbindEvent(b),b.treeObj.empty(),delete r[b.treeId])},expandCollapseNode:function(b,a,c,d,f){var g=h.getRoot(b),l=b.data.key.children;if(a){if(g.expandTriggerFlag){var q=f,
+f=function(){q&&q();a.open?b.treeObj.trigger(e.event.EXPAND,[b.treeId,a]):b.treeObj.trigger(e.event.COLLAPSE,[b.treeId,a])};g.expandTriggerFlag=!1}if(!a.open&&a.isParent&&(!k(a,e.id.UL,b).get(0)||a[l]&&a[l].length>0&&!k(a[l][0],b).get(0)))i.appendParentULDom(b,a),i.createNodeCallback(b);if(a.open==c)j.apply(f,[]);else{var c=k(a,e.id.UL,b),g=k(a,e.id.SWITCH,b),n=k(a,e.id.ICON,b);a.isParent?(a.open=!a.open,a.iconOpen&&a.iconClose&&n.attr("style",i.makeNodeIcoStyle(b,a)),a.open?(i.replaceSwitchClass(a,
+g,e.folder.OPEN),i.replaceIcoClass(a,n,e.folder.OPEN),d==!1||b.view.expandSpeed==""?(c.show(),j.apply(f,[])):a[l]&&a[l].length>0?c.slideDown(b.view.expandSpeed,f):(c.show(),j.apply(f,[]))):(i.replaceSwitchClass(a,g,e.folder.CLOSE),i.replaceIcoClass(a,n,e.folder.CLOSE),d==!1||b.view.expandSpeed==""||!(a[l]&&a[l].length>0)?(c.hide(),j.apply(f,[])):c.slideUp(b.view.expandSpeed,f))):j.apply(f,[])}}else j.apply(f,[])},expandCollapseParentNode:function(b,a,c,d,f){a&&(a.parentTId?(i.expandCollapseNode(b,
+a,c,d),a.parentTId&&i.expandCollapseParentNode(b,a.getParentNode(),c,d,f)):i.expandCollapseNode(b,a,c,d,f))},expandCollapseSonNode:function(b,a,c,d,f){var g=h.getRoot(b),e=b.data.key.children,g=a?a[e]:g[e],e=a?!1:d,j=h.getRoot(b).expandTriggerFlag;h.getRoot(b).expandTriggerFlag=!1;if(g)for(var k=0,m=g.length;k<m;k++)g[k]&&i.expandCollapseSonNode(b,g[k],c,e);h.getRoot(b).expandTriggerFlag=j;i.expandCollapseNode(b,a,c,d,f)},makeDOMNodeIcon:function(b,a,c){var d=h.getNodeName(a,c),d=a.view.nameIsHTML?
+d:d.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");b.push("<span id='",c.tId,e.id.ICON,"' title='' treeNode",e.id.ICON," class='",i.makeNodeIcoClass(a,c),"' style='",i.makeNodeIcoStyle(a,c),"'></span><span id='",c.tId,e.id.SPAN,"'>",d,"</span>")},makeDOMNodeLine:function(b,a,c){b.push("<span id='",c.tId,e.id.SWITCH,"' title='' class='",i.makeNodeLineClass(a,c),"' treeNode",e.id.SWITCH,"></span>")},makeDOMNodeMainAfter:function(b){b.push("</li>")},makeDOMNodeMainBefore:function(b,
+a,c){b.push("<li id='",c.tId,"' class='",e.className.LEVEL,c.level,"' tabindex='0' hidefocus='true' treenode>")},makeDOMNodeNameAfter:function(b){b.push("</a>")},makeDOMNodeNameBefore:function(b,a,c){var d=h.getNodeTitle(a,c),f=i.makeNodeUrl(a,c),g=i.makeNodeFontCss(a,c),l=[],k;for(k in g)l.push(k,":",g[k],";");b.push("<a id='",c.tId,e.id.A,"' class='",e.className.LEVEL,c.level,"' treeNode",e.id.A,' onclick="',c.click||"",'" ',f!=null&&f.length>0?"href='"+f+"'":""," target='",i.makeNodeTarget(c),
+"' style='",l.join(""),"'");j.apply(a.view.showTitle,[a.treeId,c],a.view.showTitle)&&d&&b.push("title='",d.replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"'");b.push(">")},makeNodeFontCss:function(b,a){var c=j.apply(b.view.fontCss,[b.treeId,a],b.view.fontCss);return c&&typeof c!="function"?c:{}},makeNodeIcoClass:function(b,a){var c=["ico"];a.isAjaxing||(c[0]=(a.iconSkin?a.iconSkin+"_":"")+c[0],a.isParent?c.push(a.open?e.folder.OPEN:e.folder.CLOSE):c.push(e.folder.DOCU));return e.className.BUTTON+
+" "+c.join("_")},makeNodeIcoStyle:function(b,a){var c=[];if(!a.isAjaxing){var d=a.isParent&&a.iconOpen&&a.iconClose?a.open?a.iconOpen:a.iconClose:a.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;");(b.view.showIcon==!1||!j.apply(b.view.showIcon,[b.treeId,a],!0))&&c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(b,a){var c=[];b.view.showLine?a.level==0&&a.isFirstNode&&a.isLastNode?c.push(e.line.ROOT):a.level==0&&a.isFirstNode?c.push(e.line.ROOTS):a.isLastNode?c.push(e.line.BOTTOM):
+c.push(e.line.CENTER):c.push(e.line.NOLINE);a.isParent?c.push(a.open?e.folder.OPEN:e.folder.CLOSE):c.push(e.folder.DOCU);return i.makeNodeLineClassEx(a)+c.join("_")},makeNodeLineClassEx:function(b){return e.className.BUTTON+" "+e.className.LEVEL+b.level+" "+e.className.SWITCH+" "},makeNodeTarget:function(b){return b.target||"_blank"},makeNodeUrl:function(b,a){var c=b.data.key.url;return a[c]?a[c]:null},makeUlHtml:function(b,a,c,d){c.push("<ul id='",a.tId,e.id.UL,"' class='",e.className.LEVEL,a.level,
+" ",i.makeUlLineClass(b,a),"' style='display:",a.open?"block":"none","'>");c.push(d);c.push("</ul>")},makeUlLineClass:function(b,a){return b.view.showLine&&!a.isLastNode?e.line.LINE:""},removeChildNodes:function(b,a){if(a){var c=b.data.key.children,d=a[c];if(d){for(var f=0,g=d.length;f<g;f++)h.removeNodeCache(b,d[f]);h.removeSelectedNode(b);delete a[c];b.data.keep.parent?k(a,e.id.UL,b).empty():(a.isParent=!1,a.open=!1,c=k(a,e.id.SWITCH,b),d=k(a,e.id.ICON,b),i.replaceSwitchClass(a,c,e.folder.DOCU),
+i.replaceIcoClass(a,d,e.folder.DOCU),k(a,e.id.UL,b).remove())}}},setFirstNode:function(b,a){var c=b.data.key.children;if(a[c].length>0)a[c][0].isFirstNode=!0},setLastNode:function(b,a){var c=b.data.key.children,d=a[c].length;if(d>0)a[c][d-1].isLastNode=!0},removeNode:function(b,a){var c=h.getRoot(b),d=b.data.key.children,f=a.parentTId?a.getParentNode():c;a.isFirstNode=!1;a.isLastNode=!1;a.getPreNode=function(){return null};a.getNextNode=function(){return null};if(h.getNodeCache(b,a.tId)){k(a,b).remove();
+h.removeNodeCache(b,a);h.removeSelectedNode(b,a);for(var g=0,l=f[d].length;g<l;g++)if(f[d][g].tId==a.tId){f[d].splice(g,1);break}i.setFirstNode(b,f);i.setLastNode(b,f);var j,g=f[d].length;if(!b.data.keep.parent&&g==0)f.isParent=!1,f.open=!1,g=k(f,e.id.UL,b),l=k(f,e.id.SWITCH,b),j=k(f,e.id.ICON,b),i.replaceSwitchClass(f,l,e.folder.DOCU),i.replaceIcoClass(f,j,e.folder.DOCU),g.css("display","none");else if(b.view.showLine&&g>0){var n=f[d][g-1],g=k(n,e.id.UL,b),l=k(n,e.id.SWITCH,b);j=k(n,e.id.ICON,b);
+f==c?f[d].length==1?i.replaceSwitchClass(n,l,e.line.ROOT):(c=k(f[d][0],e.id.SWITCH,b),i.replaceSwitchClass(f[d][0],c,e.line.ROOTS),i.replaceSwitchClass(n,l,e.line.BOTTOM)):i.replaceSwitchClass(n,l,e.line.BOTTOM);g.removeClass(e.line.LINE)}}},replaceIcoClass:function(b,a,c){if(a&&!b.isAjaxing&&(b=a.attr("class"),b!=void 0)){b=b.split("_");switch(c){case e.folder.OPEN:case e.folder.CLOSE:case e.folder.DOCU:b[b.length-1]=c}a.attr("class",b.join("_"))}},replaceSwitchClass:function(b,a,c){if(a){var d=
+a.attr("class");if(d!=void 0){d=d.split("_");switch(c){case e.line.ROOT:case e.line.ROOTS:case e.line.CENTER:case e.line.BOTTOM:case e.line.NOLINE:d[0]=i.makeNodeLineClassEx(b)+c;break;case e.folder.OPEN:case e.folder.CLOSE:case e.folder.DOCU:d[1]=c}a.attr("class",d.join("_"));c!==e.folder.DOCU?a.removeAttr("disabled"):a.attr("disabled","disabled")}}},selectNode:function(b,a,c){c||i.cancelPreSelectedNode(b);k(a,e.id.A,b).addClass(e.node.CURSELECTED);h.addSelectedNode(b,a)},setNodeFontCss:function(b,
+a){var c=k(a,e.id.A,b),d=i.makeNodeFontCss(b,a);d&&c.css(d)},setNodeLineIcos:function(b,a){if(a){var c=k(a,e.id.SWITCH,b),d=k(a,e.id.UL,b),f=k(a,e.id.ICON,b),g=i.makeUlLineClass(b,a);g.length==0?d.removeClass(e.line.LINE):d.addClass(g);c.attr("class",i.makeNodeLineClass(b,a));a.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled");f.removeAttr("style");f.attr("style",i.makeNodeIcoStyle(b,a));f.attr("class",i.makeNodeIcoClass(b,a))}},setNodeName:function(b,a){var c=h.getNodeTitle(b,a),d=
+k(a,e.id.SPAN,b);d.empty();b.view.nameIsHTML?d.html(h.getNodeName(b,a)):d.text(h.getNodeName(b,a));j.apply(b.view.showTitle,[b.treeId,a],b.view.showTitle)&&k(a,e.id.A,b).attr("title",!c?"":c)},setNodeTarget:function(b,a){k(a,e.id.A,b).attr("target",i.makeNodeTarget(a))},setNodeUrl:function(b,a){var c=k(a,e.id.A,b),d=i.makeNodeUrl(b,a);d==null||d.length==0?c.removeAttr("href"):c.attr("href",d)},switchNode:function(b,a){a.open||!j.canAsync(b,a)?i.expandCollapseNode(b,a,!a.open):b.async.enable?i.asyncNode(b,
+a)||i.expandCollapseNode(b,a,!a.open):a&&i.expandCollapseNode(b,a,!a.open)}};p.fn.zTree={consts:{className:{BUTTON:"button",LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch"},event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",
+NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_z:{tools:j,view:i,event:m,data:h},getZTreeObj:function(b){return(b=h.getZTreeTools(b))?b:null},destroy:function(b){if(b&&b.length>0)i.destroy(h.getSetting(b));else for(var a in r)i.destroy(r[a])},init:function(b,a,c){var d=j.clone(M);p.extend(!0,d,a);d.treeId=b.attr("id");d.treeObj=b;d.treeObj.empty();r[d.treeId]=d;if(typeof document.body.style.maxHeight==="undefined")d.view.expandSpeed=
+"";h.initRoot(d);b=h.getRoot(d);a=d.data.key.children;c=c?j.clone(j.isArray(c)?c:[c]):[];b[a]=d.data.simpleData.enable?h.transformTozTreeFormat(d,c):c;h.initCache(d);m.unbindTree(d);m.bindTree(d);m.unbindEvent(d);m.bindEvent(d);c={setting:d,addNodes:function(a,b,c){function e(){i.addNodes(d,a,h,c==!0)}if(!b)return null;a||(a=null);if(a&&!a.isParent&&d.data.keep.leaf)return null;var h=j.clone(j.isArray(b)?b:[b]);j.canAsync(d,a)?i.asyncNode(d,a,c,e):e();return h},cancelSelectedNode:function(a){i.cancelPreSelectedNode(d,
+a)},destroy:function(){i.destroy(d)},expandAll:function(a){a=!!a;i.expandCollapseSonNode(d,null,a,!0);return a},expandNode:function(a,b,c,e,n){if(!a||!a.isParent)return null;b!==!0&&b!==!1&&(b=!a.open);if((n=!!n)&&b&&j.apply(d.callback.beforeExpand,[d.treeId,a],!0)==!1)return null;else if(n&&!b&&j.apply(d.callback.beforeCollapse,[d.treeId,a],!0)==!1)return null;b&&a.parentTId&&i.expandCollapseParentNode(d,a.getParentNode(),b,!1);if(b===a.open&&!c)return null;h.getRoot(d).expandTriggerFlag=n;if(!j.canAsync(d,
+a)&&c)i.expandCollapseSonNode(d,a,b,!0,function(){if(e!==!1)try{k(a,d).focus().blur()}catch(b){}});else if(a.open=!b,i.switchNode(this.setting,a),e!==!1)try{k(a,d).focus().blur()}catch(m){}return b},getNodes:function(){return h.getNodes(d)},getNodeByParam:function(a,b,c){return!a?null:h.getNodeByParam(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodeByTId:function(a){return h.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return!a?null:h.getNodesByParam(d,c?c[d.data.key.children]:h.getNodes(d),
+a,b)},getNodesByParamFuzzy:function(a,b,c){return!a?null:h.getNodesByParamFuzzy(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodesByFilter:function(a,b,c,e){b=!!b;return!a||typeof a!="function"?b?null:[]:h.getNodesByFilter(d,c?c[d.data.key.children]:h.getNodes(d),a,b,e)},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():h.getRoot(d),e=0,i=c[b].length;e<i;e++)if(c[b][e]==a)return e;return-1},getSelectedNodes:function(){for(var a=[],b=h.getRoot(d).curSelectedList,
+c=0,e=b.length;c<e;c++)a.push(b[c]);return a},isSelectedNode:function(a){return h.isSelectedNode(d,a)},reAsyncChildNodes:function(a,b,c){if(this.setting.async.enable){var j=!a;j&&(a=h.getRoot(d));if(b=="refresh"){for(var b=this.setting.data.key.children,m=0,p=a[b]?a[b].length:0;m<p;m++)h.removeNodeCache(d,a[b][m]);h.removeSelectedNode(d);a[b]=[];j?this.setting.treeObj.empty():k(a,e.id.UL,d).empty()}i.asyncNode(this.setting,j?null:a,!!c)}},refresh:function(){this.setting.treeObj.empty();var a=h.getRoot(d),
+b=a[d.data.key.children];h.initRoot(d);a[d.data.key.children]=b;h.initCache(d);i.createNodes(d,0,a[d.data.key.children])},removeChildNodes:function(a){if(!a)return null;var b=a[d.data.key.children];i.removeChildNodes(d,a);return b?b:null},removeNode:function(a,b){a&&(b=!!b,b&&j.apply(d.callback.beforeRemove,[d.treeId,a],!0)==!1||(i.removeNode(d,a),b&&this.setting.treeObj.trigger(e.event.REMOVE,[d.treeId,a])))},selectNode:function(a,b){if(a&&j.uCanDo(d)){b=d.view.selectedMulti&&b;if(a.parentTId)i.expandCollapseParentNode(d,
+a.getParentNode(),!0,!1,function(){try{k(a,d).focus().blur()}catch(b){}});else try{k(a,d).focus().blur()}catch(c){}i.selectNode(d,a,b)}},transformTozTreeNodes:function(a){return h.transformTozTreeFormat(d,a)},transformToArray:function(a){return h.transformToArrayFormat(d,a)},updateNode:function(a){a&&k(a,d).get(0)&&j.uCanDo(d)&&(i.setNodeName(d,a),i.setNodeTarget(d,a),i.setNodeUrl(d,a),i.setNodeLineIcos(d,a),i.setNodeFontCss(d,a))}};b.treeTools=c;h.setZTreeTools(d,c);b[a]&&b[a].length>0?i.createNodes(d,
+0,b[a]):d.async.enable&&d.async.url&&d.async.url!==""&&i.asyncNode(d);return c}};var N=p.fn.zTree,k=j.$,e=N.consts})(jQuery);
+
+/*
+ * JQuery zTree excheck v3.5.16
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2014-03-09
+ */
+(function(m){var p,q,r,o={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{STYLE:"checkbox",DEFAULT:"chk",DISABLED:"disable",FALSE:"false",TRUE:"true",FULL:"full",PART:"part",FOCUS:"focus"},radio:{STYLE:"radio",TYPE_ALL:"all",TYPE_LEVEL:"level"}},v={check:{enable:!1,autoCheckTrigger:!1,chkStyle:o.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:o.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}};p=function(c,
+a){if(a.chkDisabled===!0)return!1;var b=f.getSetting(c.data.treeId),d=b.data.key.checked;if(k.apply(b.callback.beforeCheck,[b.treeId,a],!0)==!1)return!0;a[d]=!a[d];e.checkNodeRelation(b,a);d=n(a,j.id.CHECK,b);e.setChkClass(b,d,a);e.repairParentChkClassWithSelf(b,a);b.treeObj.trigger(j.event.CHECK,[c,b.treeId,a]);return!0};q=function(c,a){if(a.chkDisabled===!0)return!1;var b=f.getSetting(c.data.treeId),d=n(a,j.id.CHECK,b);a.check_Focus=!0;e.setChkClass(b,d,a);return!0};r=function(c,a){if(a.chkDisabled===
+!0)return!1;var b=f.getSetting(c.data.treeId),d=n(a,j.id.CHECK,b);a.check_Focus=!1;e.setChkClass(b,d,a);return!0};m.extend(!0,m.fn.zTree.consts,o);m.extend(!0,m.fn.zTree._z,{tools:{},view:{checkNodeRelation:function(c,a){var b,d,h,i=c.data.key.children,l=c.data.key.checked;b=j.radio;if(c.check.chkStyle==b.STYLE){var g=f.getRadioCheckedList(c);if(a[l])if(c.check.radioType==b.TYPE_ALL){for(d=g.length-1;d>=0;d--)b=g[d],b[l]&&b!=a&&(b[l]=!1,g.splice(d,1),e.setChkClass(c,n(b,j.id.CHECK,c),b),b.parentTId!=
+a.parentTId&&e.repairParentChkClassWithSelf(c,b));g.push(a)}else{g=a.parentTId?a.getParentNode():f.getRoot(c);for(d=0,h=g[i].length;d<h;d++)b=g[i][d],b[l]&&b!=a&&(b[l]=!1,e.setChkClass(c,n(b,j.id.CHECK,c),b))}else if(c.check.radioType==b.TYPE_ALL)for(d=0,h=g.length;d<h;d++)if(a==g[d]){g.splice(d,1);break}}else a[l]&&(!a[i]||a[i].length==0||c.check.chkboxType.Y.indexOf("s")>-1)&&e.setSonNodeCheckBox(c,a,!0),!a[l]&&(!a[i]||a[i].length==0||c.check.chkboxType.N.indexOf("s")>-1)&&e.setSonNodeCheckBox(c,
+a,!1),a[l]&&c.check.chkboxType.Y.indexOf("p")>-1&&e.setParentNodeCheckBox(c,a,!0),!a[l]&&c.check.chkboxType.N.indexOf("p")>-1&&e.setParentNodeCheckBox(c,a,!1)},makeChkClass:function(c,a){var b=c.data.key.checked,d=j.checkbox,h=j.radio,i="",i=a.chkDisabled===!0?d.DISABLED:a.halfCheck?d.PART:c.check.chkStyle==h.STYLE?a.check_Child_State<1?d.FULL:d.PART:a[b]?a.check_Child_State===2||a.check_Child_State===-1?d.FULL:d.PART:a.check_Child_State<1?d.FULL:d.PART,b=c.check.chkStyle+"_"+(a[b]?d.TRUE:d.FALSE)+
+"_"+i,b=a.check_Focus&&a.chkDisabled!==!0?b+"_"+d.FOCUS:b;return j.className.BUTTON+" "+d.DEFAULT+" "+b},repairAllChk:function(c,a){if(c.check.enable&&c.check.chkStyle===j.checkbox.STYLE)for(var b=c.data.key.checked,d=c.data.key.children,h=f.getRoot(c),i=0,l=h[d].length;i<l;i++){var g=h[d][i];g.nocheck!==!0&&g.chkDisabled!==!0&&(g[b]=a);e.setSonNodeCheckBox(c,g,a)}},repairChkClass:function(c,a){if(a&&(f.makeChkFlag(c,a),a.nocheck!==!0)){var b=n(a,j.id.CHECK,c);e.setChkClass(c,b,a)}},repairParentChkClass:function(c,
+a){if(a&&a.parentTId){var b=a.getParentNode();e.repairChkClass(c,b);e.repairParentChkClass(c,b)}},repairParentChkClassWithSelf:function(c,a){if(a){var b=c.data.key.children;a[b]&&a[b].length>0?e.repairParentChkClass(c,a[b][0]):e.repairParentChkClass(c,a)}},repairSonChkDisabled:function(c,a,b,d){if(a){var h=c.data.key.children;if(a.chkDisabled!=b)a.chkDisabled=b;e.repairChkClass(c,a);if(a[h]&&d)for(var i=0,l=a[h].length;i<l;i++)e.repairSonChkDisabled(c,a[h][i],b,d)}},repairParentChkDisabled:function(c,
+a,b,d){if(a){if(a.chkDisabled!=b&&d)a.chkDisabled=b;e.repairChkClass(c,a);e.repairParentChkDisabled(c,a.getParentNode(),b,d)}},setChkClass:function(c,a,b){a&&(b.nocheck===!0?a.hide():a.show(),a.removeClass(),a.addClass(e.makeChkClass(c,b)))},setParentNodeCheckBox:function(c,a,b,d){var h=c.data.key.children,i=c.data.key.checked,l=n(a,j.id.CHECK,c);d||(d=a);f.makeChkFlag(c,a);a.nocheck!==!0&&a.chkDisabled!==!0&&(a[i]=b,e.setChkClass(c,l,a),c.check.autoCheckTrigger&&a!=d&&c.treeObj.trigger(j.event.CHECK,
+[null,c.treeId,a]));if(a.parentTId){l=!0;if(!b)for(var h=a.getParentNode()[h],g=0,k=h.length;g<k;g++)if(h[g].nocheck!==!0&&h[g].chkDisabled!==!0&&h[g][i]||(h[g].nocheck===!0||h[g].chkDisabled===!0)&&h[g].check_Child_State>0){l=!1;break}l&&e.setParentNodeCheckBox(c,a.getParentNode(),b,d)}},setSonNodeCheckBox:function(c,a,b,d){if(a){var h=c.data.key.children,i=c.data.key.checked,l=n(a,j.id.CHECK,c);d||(d=a);var g=!1;if(a[h])for(var k=0,m=a[h].length;k<m&&a.chkDisabled!==!0;k++){var o=a[h][k];e.setSonNodeCheckBox(c,
+o,b,d);o.chkDisabled===!0&&(g=!0)}if(a!=f.getRoot(c)&&a.chkDisabled!==!0){g&&a.nocheck!==!0&&f.makeChkFlag(c,a);if(a.nocheck!==!0&&a.chkDisabled!==!0){if(a[i]=b,!g)a.check_Child_State=a[h]&&a[h].length>0?b?2:0:-1}else a.check_Child_State=-1;e.setChkClass(c,l,a);c.check.autoCheckTrigger&&a!=d&&a.nocheck!==!0&&a.chkDisabled!==!0&&c.treeObj.trigger(j.event.CHECK,[null,c.treeId,a])}}}},event:{},data:{getRadioCheckedList:function(c){for(var a=f.getRoot(c).radioCheckedList,b=0,d=a.length;b<d;b++)f.getNodeCache(c,
+a[b].tId)||(a.splice(b,1),b--,d--);return a},getCheckStatus:function(c,a){if(!c.check.enable||a.nocheck||a.chkDisabled)return null;var b=c.data.key.checked;return{checked:a[b],half:a.halfCheck?a.halfCheck:c.check.chkStyle==j.radio.STYLE?a.check_Child_State===2:a[b]?a.check_Child_State>-1&&a.check_Child_State<2:a.check_Child_State>0}},getTreeCheckedNodes:function(c,a,b,d){if(!a)return[];for(var h=c.data.key.children,i=c.data.key.checked,e=b&&c.check.chkStyle==j.radio.STYLE&&c.check.radioType==j.radio.TYPE_ALL,
+d=!d?[]:d,g=0,k=a.length;g<k;g++){if(a[g].nocheck!==!0&&a[g].chkDisabled!==!0&&a[g][i]==b&&(d.push(a[g]),e))break;f.getTreeCheckedNodes(c,a[g][h],b,d);if(e&&d.length>0)break}return d},getTreeChangeCheckedNodes:function(c,a,b){if(!a)return[];for(var d=c.data.key.children,h=c.data.key.checked,b=!b?[]:b,i=0,e=a.length;i<e;i++)a[i].nocheck!==!0&&a[i].chkDisabled!==!0&&a[i][h]!=a[i].checkedOld&&b.push(a[i]),f.getTreeChangeCheckedNodes(c,a[i][d],b);return b},makeChkFlag:function(c,a){if(a){var b=c.data.key.children,
+d=c.data.key.checked,h=-1;if(a[b])for(var i=0,e=a[b].length;i<e;i++){var g=a[b][i],f=-1;if(c.check.chkStyle==j.radio.STYLE)if(f=g.nocheck===!0||g.chkDisabled===!0?g.check_Child_State:g.halfCheck===!0?2:g[d]?2:g.check_Child_State>0?2:0,f==2){h=2;break}else f==0&&(h=0);else if(c.check.chkStyle==j.checkbox.STYLE)if(f=g.nocheck===!0||g.chkDisabled===!0?g.check_Child_State:g.halfCheck===!0?1:g[d]?g.check_Child_State===-1||g.check_Child_State===2?2:1:g.check_Child_State>0?1:0,f===1){h=1;break}else if(f===
+2&&h>-1&&i>0&&f!==h){h=1;break}else if(h===2&&f>-1&&f<2){h=1;break}else f>-1&&(h=f)}a.check_Child_State=h}}}});var m=m.fn.zTree,k=m._z.tools,j=m.consts,e=m._z.view,f=m._z.data,n=k.$;f.exSetting(v);f.addInitBind(function(c){c.treeObj.bind(j.event.CHECK,function(a,b,d,h){a.srcEvent=b;k.apply(c.callback.onCheck,[a,d,h])})});f.addInitUnBind(function(c){c.treeObj.unbind(j.event.CHECK)});f.addInitCache(function(){});f.addInitNode(function(c,a,b,d){if(b){a=c.data.key.checked;typeof b[a]=="string"&&(b[a]=
+k.eqs(b[a],"true"));b[a]=!!b[a];b.checkedOld=b[a];if(typeof b.nocheck=="string")b.nocheck=k.eqs(b.nocheck,"true");b.nocheck=!!b.nocheck||c.check.nocheckInherit&&d&&!!d.nocheck;if(typeof b.chkDisabled=="string")b.chkDisabled=k.eqs(b.chkDisabled,"true");b.chkDisabled=!!b.chkDisabled||c.check.chkDisabledInherit&&d&&!!d.chkDisabled;if(typeof b.halfCheck=="string")b.halfCheck=k.eqs(b.halfCheck,"true");b.halfCheck=!!b.halfCheck;b.check_Child_State=-1;b.check_Focus=!1;b.getCheckStatus=function(){return f.getCheckStatus(c,
+b)};c.check.chkStyle==j.radio.STYLE&&c.check.radioType==j.radio.TYPE_ALL&&b[a]&&f.getRoot(c).radioCheckedList.push(b)}});f.addInitProxy(function(c){var a=c.target,b=f.getSetting(c.data.treeId),d="",h=null,e="",l=null;if(k.eqs(c.type,"mouseover")){if(b.check.enable&&k.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+j.id.CHECK)!==null)d=k.getNodeMainDom(a).id,e="mouseoverCheck"}else if(k.eqs(c.type,"mouseout")){if(b.check.enable&&k.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+j.id.CHECK)!==null)d=
+k.getNodeMainDom(a).id,e="mouseoutCheck"}else if(k.eqs(c.type,"click")&&b.check.enable&&k.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+j.id.CHECK)!==null)d=k.getNodeMainDom(a).id,e="checkNode";if(d.length>0)switch(h=f.getNodeCache(b,d),e){case "checkNode":l=p;break;case "mouseoverCheck":l=q;break;case "mouseoutCheck":l=r}return{stop:e==="checkNode",node:h,nodeEventType:e,nodeEventCallback:l,treeEventType:"",treeEventCallback:null}},!0);f.addInitRoot(function(c){f.getRoot(c).radioCheckedList=[]});
+f.addBeforeA(function(c,a,b){c.check.enable&&(f.makeChkFlag(c,a),b.push("<span ID='",a.tId,j.id.CHECK,"' class='",e.makeChkClass(c,a),"' treeNode",j.id.CHECK,a.nocheck===!0?" style='display:none;'":"","></span>"))});f.addZTreeTools(function(c,a){a.checkNode=function(a,b,c,f){var g=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[g]),f=!!f,(a[g]!==b||c)&&!(f&&k.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0)==!1)&&k.uCanDo(this.setting)&&this.setting.check.enable&&
+a.nocheck!==!0))a[g]=b,b=n(a,j.id.CHECK,this.setting),(c||this.setting.check.chkStyle===j.radio.STYLE)&&e.checkNodeRelation(this.setting,a),e.setChkClass(this.setting,b,a),e.repairParentChkClassWithSelf(this.setting,a),f&&this.setting.treeObj.trigger(j.event.CHECK,[null,this.setting.treeId,a])};a.checkAllNodes=function(a){e.repairAllChk(this.setting,!!a)};a.getCheckedNodes=function(a){var b=this.setting.data.key.children;return f.getTreeCheckedNodes(this.setting,f.getRoot(this.setting)[b],a!==!1)};
+a.getChangeCheckedNodes=function(){var a=this.setting.data.key.children;return f.getTreeChangeCheckedNodes(this.setting,f.getRoot(this.setting)[a])};a.setChkDisabled=function(a,b,c,f){b=!!b;c=!!c;e.repairSonChkDisabled(this.setting,a,b,!!f);e.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var b=a.updateNode;a.updateNode=function(c,f){b&&b.apply(a,arguments);if(c&&this.setting.check.enable&&n(c,this.setting).get(0)&&k.uCanDo(this.setting)){var i=n(c,j.id.CHECK,this.setting);(f==!0||this.setting.check.chkStyle===
+j.radio.STYLE)&&e.checkNodeRelation(this.setting,c);e.setChkClass(this.setting,i,c);e.repairParentChkClassWithSelf(this.setting,c)}}});var s=e.createNodes;e.createNodes=function(c,a,b,d){s&&s.apply(e,arguments);b&&e.repairParentChkClassWithSelf(c,d)};var t=e.removeNode;e.removeNode=function(c,a){var b=a.getParentNode();t&&t.apply(e,arguments);a&&b&&(e.repairChkClass(c,b),e.repairParentChkClass(c,b))};var u=e.appendNodes;e.appendNodes=function(c,a,b,d,h,i){var j="";u&&(j=u.apply(e,arguments));d&&f.makeChkFlag(c,
+d);return j}})(jQuery);
+
+/*
+ * JQuery zTree exedit v3.5.16
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2014-03-09
+ */
+(function(w){var I={event:{DRAG:"ztree_drag",DROP:"ztree_drop",RENAME:"ztree_rename",DRAGMOVE:"ztree_dragmove"},id:{EDIT:"_edit",INPUT:"_input",REMOVE:"_remove"},move:{TYPE_INNER:"inner",TYPE_PREV:"prev",TYPE_NEXT:"next"},node:{CURSELECTED_EDIT:"curSelectedNode_Edit",TMPTARGET_TREE:"tmpTargetzTree",TMPTARGET_NODE:"tmpTargetNode"}},x={onHoverOverNode:function(b,a){var c=m.getSetting(b.data.treeId),d=m.getRoot(c);if(d.curHoverNode!=a)x.onHoverOutNode(b);d.curHoverNode=a;f.addHoverDom(c,a)},onHoverOutNode:function(b){var b=
+m.getSetting(b.data.treeId),a=m.getRoot(b);if(a.curHoverNode&&!m.isSelectedNode(b,a.curHoverNode))f.removeTreeDom(b,a.curHoverNode),a.curHoverNode=null},onMousedownNode:function(b,a){function c(b){if(C.dragFlag==0&&Math.abs(N-b.clientX)<e.edit.drag.minMoveSize&&Math.abs(O-b.clientY)<e.edit.drag.minMoveSize)return!0;var a,c,n,k,i;i=e.data.key.children;M.css("cursor","pointer");if(C.dragFlag==0){if(g.apply(e.callback.beforeDrag,[e.treeId,l],!0)==!1)return r(b),!0;for(a=0,c=l.length;a<c;a++){if(a==0)C.dragNodeShowBefore=
+[];n=l[a];n.isParent&&n.open?(f.expandCollapseNode(e,n,!n.open),C.dragNodeShowBefore[n.tId]=!0):C.dragNodeShowBefore[n.tId]=!1}C.dragFlag=1;t.showHoverDom=!1;g.showIfameMask(e,!0);n=!0;k=-1;if(l.length>1){var j=l[0].parentTId?l[0].getParentNode()[i]:m.getNodes(e);i=[];for(a=0,c=j.length;a<c;a++)if(C.dragNodeShowBefore[j[a].tId]!==void 0&&(n&&k>-1&&k+1!==a&&(n=!1),i.push(j[a]),k=a),l.length===i.length){l=i;break}}n&&(H=l[0].getPreNode(),R=l[l.length-1].getNextNode());D=o("<ul class='zTreeDragUL'></ul>",
+e);for(a=0,c=l.length;a<c;a++)n=l[a],n.editNameFlag=!1,f.selectNode(e,n,a>0),f.removeTreeDom(e,n),a>e.edit.drag.maxShowNodeNum-1||(k=o("<li id='"+n.tId+"_tmp'></li>",e),k.append(o(n,d.id.A,e).clone()),k.css("padding","0"),k.children("#"+n.tId+d.id.A).removeClass(d.node.CURSELECTED),D.append(k),a==e.edit.drag.maxShowNodeNum-1&&(k=o("<li id='"+n.tId+"_moretmp'><a> ... </a></li>",e),D.append(k)));D.attr("id",l[0].tId+d.id.UL+"_tmp");D.addClass(e.treeObj.attr("class"));D.appendTo(M);B=o("<span class='tmpzTreeMove_arrow'></span>",
+e);B.attr("id","zTreeMove_arrow_tmp");B.appendTo(M);e.treeObj.trigger(d.event.DRAG,[b,e.treeId,l])}if(C.dragFlag==1){s&&B.attr("id")==b.target.id&&u&&b.clientX+F.scrollLeft()+2>w("#"+u+d.id.A,s).offset().left?(n=w("#"+u+d.id.A,s),b.target=n.length>0?n.get(0):b.target):s&&(s.removeClass(d.node.TMPTARGET_TREE),u&&w("#"+u+d.id.A,s).removeClass(d.node.TMPTARGET_NODE+"_"+d.move.TYPE_PREV).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_NEXT).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_INNER));
+u=s=null;J=!1;h=e;n=m.getSettings();for(var y in n)if(n[y].treeId&&n[y].edit.enable&&n[y].treeId!=e.treeId&&(b.target.id==n[y].treeId||w(b.target).parents("#"+n[y].treeId).length>0))J=!0,h=n[y];y=F.scrollTop();k=F.scrollLeft();i=h.treeObj.offset();a=h.treeObj.get(0).scrollHeight;n=h.treeObj.get(0).scrollWidth;c=b.clientY+y-i.top;var p=h.treeObj.height()+i.top-b.clientY-y,q=b.clientX+k-i.left,x=h.treeObj.width()+i.left-b.clientX-k;i=c<e.edit.drag.borderMax&&c>e.edit.drag.borderMin;var j=p<e.edit.drag.borderMax&&
+p>e.edit.drag.borderMin,K=q<e.edit.drag.borderMax&&q>e.edit.drag.borderMin,G=x<e.edit.drag.borderMax&&x>e.edit.drag.borderMin,p=c>e.edit.drag.borderMin&&p>e.edit.drag.borderMin&&q>e.edit.drag.borderMin&&x>e.edit.drag.borderMin,q=i&&h.treeObj.scrollTop()<=0,x=j&&h.treeObj.scrollTop()+h.treeObj.height()+10>=a,P=K&&h.treeObj.scrollLeft()<=0,Q=G&&h.treeObj.scrollLeft()+h.treeObj.width()+10>=n;if(b.target&&g.isChildOrSelf(b.target,h.treeId)){for(var E=b.target;E&&E.tagName&&!g.eqs(E.tagName,"li")&&E.id!=
+h.treeId;)E=E.parentNode;var S=!0;for(a=0,c=l.length;a<c;a++)if(n=l[a],E.id===n.tId){S=!1;break}else if(o(n,e).find("#"+E.id).length>0){S=!1;break}if(S&&b.target&&g.isChildOrSelf(b.target,E.id+d.id.A))s=w(E),u=E.id}n=l[0];if(p&&g.isChildOrSelf(b.target,h.treeId)){if(!s&&(b.target.id==h.treeId||q||x||P||Q)&&(J||!J&&n.parentTId))s=h.treeObj;i?h.treeObj.scrollTop(h.treeObj.scrollTop()-10):j&&h.treeObj.scrollTop(h.treeObj.scrollTop()+10);K?h.treeObj.scrollLeft(h.treeObj.scrollLeft()-10):G&&h.treeObj.scrollLeft(h.treeObj.scrollLeft()+
+10);s&&s!=h.treeObj&&s.offset().left<h.treeObj.offset().left&&h.treeObj.scrollLeft(h.treeObj.scrollLeft()+s.offset().left-h.treeObj.offset().left)}D.css({top:b.clientY+y+3+"px",left:b.clientX+k+3+"px"});i=a=0;if(s&&s.attr("id")!=h.treeId){var z=u==null?null:m.getNodeCache(h,u);c=(b.ctrlKey||b.metaKey)&&e.edit.drag.isMove&&e.edit.drag.isCopy||!e.edit.drag.isMove&&e.edit.drag.isCopy;a=!!(H&&u===H.tId);i=!!(R&&u===R.tId);k=n.parentTId&&n.parentTId==u;n=(c||!i)&&g.apply(h.edit.drag.prev,[h.treeId,l,z],
+!!h.edit.drag.prev);a=(c||!a)&&g.apply(h.edit.drag.next,[h.treeId,l,z],!!h.edit.drag.next);G=(c||!k)&&!(h.data.keep.leaf&&!z.isParent)&&g.apply(h.edit.drag.inner,[h.treeId,l,z],!!h.edit.drag.inner);if(!n&&!a&&!G){if(s=null,u="",v=d.move.TYPE_INNER,B.css({display:"none"}),window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null}else{c=w("#"+u+d.id.A,s);i=z.isLastNode?null:w("#"+z.getNextNode().tId+d.id.A,s.next());j=c.offset().top;k=c.offset().left;K=n?G?0.25:a?
+0.5:1:-1;G=a?G?0.75:n?0.5:0:-1;y=(b.clientY+y-j)/c.height();(K==1||y<=K&&y>=-0.2)&&n?(a=1-B.width(),i=j-B.height()/2,v=d.move.TYPE_PREV):(G==0||y>=G&&y<=1.2)&&a?(a=1-B.width(),i=i==null||z.isParent&&z.open?j+c.height()-B.height()/2:i.offset().top-B.height()/2,v=d.move.TYPE_NEXT):(a=5-B.width(),i=j,v=d.move.TYPE_INNER);B.css({display:"block",top:i+"px",left:k+a+"px"});c.addClass(d.node.TMPTARGET_NODE+"_"+v);if(T!=u||U!=v)L=(new Date).getTime();if(z&&z.isParent&&v==d.move.TYPE_INNER&&(y=!0,window.zTreeMoveTimer&&
+window.zTreeMoveTargetNodeTId!==z.tId?(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null):window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId===z.tId&&(y=!1),y))window.zTreeMoveTimer=setTimeout(function(){v==d.move.TYPE_INNER&&z&&z.isParent&&!z.open&&(new Date).getTime()-L>h.edit.drag.autoOpenTime&&g.apply(h.callback.beforeDragOpen,[h.treeId,z],!0)&&(f.switchNode(h,z),h.edit.drag.autoExpandTrigger&&h.treeObj.trigger(d.event.EXPAND,[h.treeId,z]))},h.edit.drag.autoOpenTime+50),
+window.zTreeMoveTargetNodeTId=z.tId}}else if(v=d.move.TYPE_INNER,s&&g.apply(h.edit.drag.inner,[h.treeId,l,null],!!h.edit.drag.inner)?s.addClass(d.node.TMPTARGET_TREE):s=null,B.css({display:"none"}),window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null;T=u;U=v;e.treeObj.trigger(d.event.DRAGMOVE,[b,e.treeId,l])}return!1}function r(b){if(window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null;U=T=null;F.unbind("mousemove",c);
+F.unbind("mouseup",r);F.unbind("selectstart",k);M.css("cursor","auto");s&&(s.removeClass(d.node.TMPTARGET_TREE),u&&w("#"+u+d.id.A,s).removeClass(d.node.TMPTARGET_NODE+"_"+d.move.TYPE_PREV).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_NEXT).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_INNER));g.showIfameMask(e,!1);t.showHoverDom=!0;if(C.dragFlag!=0){C.dragFlag=0;var a,i,j;for(a=0,i=l.length;a<i;a++)j=l[a],j.isParent&&C.dragNodeShowBefore[j.tId]&&!j.open&&(f.expandCollapseNode(e,j,!j.open),
+delete C.dragNodeShowBefore[j.tId]);D&&D.remove();B&&B.remove();var p=(b.ctrlKey||b.metaKey)&&e.edit.drag.isMove&&e.edit.drag.isCopy||!e.edit.drag.isMove&&e.edit.drag.isCopy;!p&&s&&u&&l[0].parentTId&&u==l[0].parentTId&&v==d.move.TYPE_INNER&&(s=null);if(s){var q=u==null?null:m.getNodeCache(h,u);if(g.apply(e.callback.beforeDrop,[h.treeId,l,q,v,p],!0)==!1)f.selectNodes(x,l);else{var A=p?g.clone(l):l;a=function(){if(J){if(!p)for(var a=0,c=l.length;a<c;a++)f.removeNode(e,l[a]);if(v==d.move.TYPE_INNER)f.addNodes(h,
+q,A);else if(f.addNodes(h,q.getParentNode(),A),v==d.move.TYPE_PREV)for(a=0,c=A.length;a<c;a++)f.moveNode(h,q,A[a],v,!1);else for(a=-1,c=A.length-1;a<c;c--)f.moveNode(h,q,A[c],v,!1)}else if(p&&v==d.move.TYPE_INNER)f.addNodes(h,q,A);else if(p&&f.addNodes(h,q.getParentNode(),A),v!=d.move.TYPE_NEXT)for(a=0,c=A.length;a<c;a++)f.moveNode(h,q,A[a],v,!1);else for(a=-1,c=A.length-1;a<c;c--)f.moveNode(h,q,A[c],v,!1);f.selectNodes(h,A);o(A[0],e).focus().blur();e.treeObj.trigger(d.event.DROP,[b,h.treeId,A,q,
+v,p])};v==d.move.TYPE_INNER&&g.canAsync(h,q)?f.asyncNode(h,q,!1,a):a()}}else f.selectNodes(x,l),e.treeObj.trigger(d.event.DROP,[b,e.treeId,l,null,null,null])}}function k(){return!1}var i,j,e=m.getSetting(b.data.treeId),C=m.getRoot(e),t=m.getRoots();if(b.button==2||!e.edit.enable||!e.edit.drag.isCopy&&!e.edit.drag.isMove)return!0;var p=b.target,q=m.getRoot(e).curSelectedList,l=[];if(m.isSelectedNode(e,a))for(i=0,j=q.length;i<j;i++){if(q[i].editNameFlag&&g.eqs(p.tagName,"input")&&p.getAttribute("treeNode"+
+d.id.INPUT)!==null)return!0;l.push(q[i]);if(l[0].parentTId!==q[i].parentTId){l=[a];break}}else l=[a];f.editNodeBlur=!0;f.cancelCurEditNode(e);var F=w(e.treeObj.get(0).ownerDocument),M=w(e.treeObj.get(0).ownerDocument.body),D,B,s,J=!1,h=e,x=e,H,R,T=null,U=null,u=null,v=d.move.TYPE_INNER,N=b.clientX,O=b.clientY,L=(new Date).getTime();g.uCanDo(e)&&F.bind("mousemove",c);F.bind("mouseup",r);F.bind("selectstart",k);b.preventDefault&&b.preventDefault();return!0}};w.extend(!0,w.fn.zTree.consts,I);w.extend(!0,
+w.fn.zTree._z,{tools:{getAbs:function(b){b=b.getBoundingClientRect();return[b.left+(document.body.scrollLeft+document.documentElement.scrollLeft),b.top+(document.body.scrollTop+document.documentElement.scrollTop)]},inputFocus:function(b){b.get(0)&&(b.focus(),g.setCursorPosition(b.get(0),b.val().length))},inputSelect:function(b){b.get(0)&&(b.focus(),b.select())},setCursorPosition:function(b,a){if(b.setSelectionRange)b.focus(),b.setSelectionRange(a,a);else if(b.createTextRange){var c=b.createTextRange();
+c.collapse(!0);c.moveEnd("character",a);c.moveStart("character",a);c.select()}},showIfameMask:function(b,a){for(var c=m.getRoot(b);c.dragMaskList.length>0;)c.dragMaskList[0].remove(),c.dragMaskList.shift();if(a)for(var d=o("iframe",b),f=0,i=d.length;f<i;f++){var j=d.get(f),e=g.getAbs(j),j=o("<div id='zTreeMask_"+f+"' class='zTreeMask' style='top:"+e[1]+"px; left:"+e[0]+"px; width:"+j.offsetWidth+"px; height:"+j.offsetHeight+"px;'></div>",b);j.appendTo(o("body",b));c.dragMaskList.push(j)}}},view:{addEditBtn:function(b,
+a){if(!(a.editNameFlag||o(a,d.id.EDIT,b).length>0)&&g.apply(b.edit.showRenameBtn,[b.treeId,a],b.edit.showRenameBtn)){var c=o(a,d.id.A,b),r="<span class='"+d.className.BUTTON+" edit' id='"+a.tId+d.id.EDIT+"' title='"+g.apply(b.edit.renameTitle,[b.treeId,a],b.edit.renameTitle)+"' treeNode"+d.id.EDIT+" style='display:none;'></span>";c.append(r);o(a,d.id.EDIT,b).bind("click",function(){if(!g.uCanDo(b)||g.apply(b.callback.beforeEditName,[b.treeId,a],!0)==!1)return!1;f.editNode(b,a);return!1}).show()}},
+addRemoveBtn:function(b,a){if(!(a.editNameFlag||o(a,d.id.REMOVE,b).length>0)&&g.apply(b.edit.showRemoveBtn,[b.treeId,a],b.edit.showRemoveBtn)){var c=o(a,d.id.A,b),r="<span class='"+d.className.BUTTON+" remove' id='"+a.tId+d.id.REMOVE+"' title='"+g.apply(b.edit.removeTitle,[b.treeId,a],b.edit.removeTitle)+"' treeNode"+d.id.REMOVE+" style='display:none;'></span>";c.append(r);o(a,d.id.REMOVE,b).bind("click",function(){if(!g.uCanDo(b)||g.apply(b.callback.beforeRemove,[b.treeId,a],!0)==!1)return!1;f.removeNode(b,
+a);b.treeObj.trigger(d.event.REMOVE,[b.treeId,a]);return!1}).bind("mousedown",function(){return!0}).show()}},addHoverDom:function(b,a){if(m.getRoots().showHoverDom)a.isHover=!0,b.edit.enable&&(f.addEditBtn(b,a),f.addRemoveBtn(b,a)),g.apply(b.view.addHoverDom,[b.treeId,a])},cancelCurEditNode:function(b,a,c){var r=m.getRoot(b),k=b.data.key.name,i=r.curEditNode;if(i){var j=r.curEditInput,a=a?a:c?i[k]:j.val();if(g.apply(b.callback.beforeRename,[b.treeId,i,a,c],!0)===!1)return!1;else i[k]=a,b.treeObj.trigger(d.event.RENAME,
+[b.treeId,i,c]);o(i,d.id.A,b).removeClass(d.node.CURSELECTED_EDIT);j.unbind();f.setNodeName(b,i);i.editNameFlag=!1;r.curEditNode=null;r.curEditInput=null;f.selectNode(b,i,!1)}return r.noSelection=!0},editNode:function(b,a){var c=m.getRoot(b);f.editNodeBlur=!1;if(m.isSelectedNode(b,a)&&c.curEditNode==a&&a.editNameFlag)setTimeout(function(){g.inputFocus(c.curEditInput)},0);else{var r=b.data.key.name;a.editNameFlag=!0;f.removeTreeDom(b,a);f.cancelCurEditNode(b);f.selectNode(b,a,!1);o(a,d.id.SPAN,b).html("<input type=text class='rename' id='"+
+a.tId+d.id.INPUT+"' treeNode"+d.id.INPUT+" >");var k=o(a,d.id.INPUT,b);k.attr("value",a[r]);b.edit.editNameSelectAll?g.inputSelect(k):g.inputFocus(k);k.bind("blur",function(){f.editNodeBlur||f.cancelCurEditNode(b)}).bind("keydown",function(a){a.keyCode=="13"?(f.editNodeBlur=!0,f.cancelCurEditNode(b)):a.keyCode=="27"&&f.cancelCurEditNode(b,null,!0)}).bind("click",function(){return!1}).bind("dblclick",function(){return!1});o(a,d.id.A,b).addClass(d.node.CURSELECTED_EDIT);c.curEditInput=k;c.noSelection=
+!1;c.curEditNode=a}},moveNode:function(b,a,c,r,k,i){var j=m.getRoot(b),e=b.data.key.children;if(a!=c&&(!b.data.keep.leaf||!a||a.isParent||r!=d.move.TYPE_INNER)){var g=c.parentTId?c.getParentNode():j,t=a===null||a==j;t&&a===null&&(a=j);if(t)r=d.move.TYPE_INNER;j=a.parentTId?a.getParentNode():j;if(r!=d.move.TYPE_PREV&&r!=d.move.TYPE_NEXT)r=d.move.TYPE_INNER;if(r==d.move.TYPE_INNER)if(t)c.parentTId=null;else{if(!a.isParent)a.isParent=!0,a.open=!!a.open,f.setNodeLineIcos(b,a);c.parentTId=a.tId}var p;
+t?p=t=b.treeObj:(!i&&r==d.move.TYPE_INNER?f.expandCollapseNode(b,a,!0,!1):i||f.expandCollapseNode(b,a.getParentNode(),!0,!1),t=o(a,b),p=o(a,d.id.UL,b),t.get(0)&&!p.get(0)&&(p=[],f.makeUlHtml(b,a,p,""),t.append(p.join(""))),p=o(a,d.id.UL,b));var q=o(c,b);q.get(0)?t.get(0)||q.remove():q=f.appendNodes(b,c.level,[c],null,!1,!0).join("");p.get(0)&&r==d.move.TYPE_INNER?p.append(q):t.get(0)&&r==d.move.TYPE_PREV?t.before(q):t.get(0)&&r==d.move.TYPE_NEXT&&t.after(q);var l=-1,w=0,x=null,t=null,D=c.level;if(c.isFirstNode){if(l=
+0,g[e].length>1)x=g[e][1],x.isFirstNode=!0}else if(c.isLastNode)l=g[e].length-1,x=g[e][l-1],x.isLastNode=!0;else for(p=0,q=g[e].length;p<q;p++)if(g[e][p].tId==c.tId){l=p;break}l>=0&&g[e].splice(l,1);if(r!=d.move.TYPE_INNER)for(p=0,q=j[e].length;p<q;p++)j[e][p].tId==a.tId&&(w=p);if(r==d.move.TYPE_INNER){a[e]||(a[e]=[]);if(a[e].length>0)t=a[e][a[e].length-1],t.isLastNode=!1;a[e].splice(a[e].length,0,c);c.isLastNode=!0;c.isFirstNode=a[e].length==1}else a.isFirstNode&&r==d.move.TYPE_PREV?(j[e].splice(w,
+0,c),t=a,t.isFirstNode=!1,c.parentTId=a.parentTId,c.isFirstNode=!0,c.isLastNode=!1):a.isLastNode&&r==d.move.TYPE_NEXT?(j[e].splice(w+1,0,c),t=a,t.isLastNode=!1,c.parentTId=a.parentTId,c.isFirstNode=!1,c.isLastNode=!0):(r==d.move.TYPE_PREV?j[e].splice(w,0,c):j[e].splice(w+1,0,c),c.parentTId=a.parentTId,c.isFirstNode=!1,c.isLastNode=!1);m.fixPIdKeyValue(b,c);m.setSonNodeLevel(b,c.getParentNode(),c);f.setNodeLineIcos(b,c);f.repairNodeLevelClass(b,c,D);!b.data.keep.parent&&g[e].length<1?(g.isParent=!1,
+g.open=!1,a=o(g,d.id.UL,b),r=o(g,d.id.SWITCH,b),e=o(g,d.id.ICON,b),f.replaceSwitchClass(g,r,d.folder.DOCU),f.replaceIcoClass(g,e,d.folder.DOCU),a.css("display","none")):x&&f.setNodeLineIcos(b,x);t&&f.setNodeLineIcos(b,t);b.check&&b.check.enable&&f.repairChkClass&&(f.repairChkClass(b,g),f.repairParentChkClassWithSelf(b,g),g!=c.parent&&f.repairParentChkClassWithSelf(b,c));i||f.expandCollapseParentNode(b,c.getParentNode(),!0,k)}},removeEditBtn:function(b,a){o(a,d.id.EDIT,b).unbind().remove()},removeRemoveBtn:function(b,
+a){o(a,d.id.REMOVE,b).unbind().remove()},removeTreeDom:function(b,a){a.isHover=!1;f.removeEditBtn(b,a);f.removeRemoveBtn(b,a);g.apply(b.view.removeHoverDom,[b.treeId,a])},repairNodeLevelClass:function(b,a,c){if(c!==a.level){var f=o(a,b),g=o(a,d.id.A,b),b=o(a,d.id.UL,b),c=d.className.LEVEL+c,a=d.className.LEVEL+a.level;f.removeClass(c);f.addClass(a);g.removeClass(c);g.addClass(a);b.removeClass(c);b.addClass(a)}},selectNodes:function(b,a){for(var c=0,d=a.length;c<d;c++)f.selectNode(b,a[c],c>0)}},event:{},
+data:{setSonNodeLevel:function(b,a,c){if(c){var d=b.data.key.children;c.level=a?a.level+1:0;if(c[d])for(var a=0,f=c[d].length;a<f;a++)c[d][a]&&m.setSonNodeLevel(b,c,c[d][a])}}}});var H=w.fn.zTree,g=H._z.tools,d=H.consts,f=H._z.view,m=H._z.data,o=g.$;m.exSetting({edit:{enable:!1,editNameSelectAll:!1,showRemoveBtn:!0,showRenameBtn:!0,removeTitle:"remove",renameTitle:"rename",drag:{autoExpandTrigger:!1,isCopy:!0,isMove:!0,prev:!0,next:!0,inner:!0,minMoveSize:5,borderMax:10,borderMin:-5,maxShowNodeNum:5,
+autoOpenTime:500}},view:{addHoverDom:null,removeHoverDom:null},callback:{beforeDrag:null,beforeDragOpen:null,beforeDrop:null,beforeEditName:null,beforeRename:null,onDrag:null,onDragMove:null,onDrop:null,onRename:null}});m.addInitBind(function(b){var a=b.treeObj,c=d.event;a.bind(c.RENAME,function(a,c,d,f){g.apply(b.callback.onRename,[a,c,d,f])});a.bind(c.DRAG,function(a,c,d,f){g.apply(b.callback.onDrag,[c,d,f])});a.bind(c.DRAGMOVE,function(a,c,d,f){g.apply(b.callback.onDragMove,[c,d,f])});a.bind(c.DROP,
+function(a,c,d,f,e,m,o){g.apply(b.callback.onDrop,[c,d,f,e,m,o])})});m.addInitUnBind(function(b){var b=b.treeObj,a=d.event;b.unbind(a.RENAME);b.unbind(a.DRAG);b.unbind(a.DRAGMOVE);b.unbind(a.DROP)});m.addInitCache(function(){});m.addInitNode(function(b,a,c){if(c)c.isHover=!1,c.editNameFlag=!1});m.addInitProxy(function(b){var a=b.target,c=m.getSetting(b.data.treeId),f=b.relatedTarget,k="",i=null,j="",e=null,o=null;if(g.eqs(b.type,"mouseover")){if(o=g.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+d.id.A}]))k=
+g.getNodeMainDom(o).id,j="hoverOverNode"}else if(g.eqs(b.type,"mouseout"))o=g.getMDom(c,f,[{tagName:"a",attrName:"treeNode"+d.id.A}]),o||(k="remove",j="hoverOutNode");else if(g.eqs(b.type,"mousedown")&&(o=g.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+d.id.A}])))k=g.getNodeMainDom(o).id,j="mousedownNode";if(k.length>0)switch(i=m.getNodeCache(c,k),j){case "mousedownNode":e=x.onMousedownNode;break;case "hoverOverNode":e=x.onHoverOverNode;break;case "hoverOutNode":e=x.onHoverOutNode}return{stop:!1,
+node:i,nodeEventType:j,nodeEventCallback:e,treeEventType:"",treeEventCallback:null}});m.addInitRoot(function(b){var b=m.getRoot(b),a=m.getRoots();b.curEditNode=null;b.curEditInput=null;b.curHoverNode=null;b.dragFlag=0;b.dragNodeShowBefore=[];b.dragMaskList=[];a.showHoverDom=!0});m.addZTreeTools(function(b,a){a.cancelEditName=function(a){m.getRoot(this.setting).curEditNode&&f.cancelCurEditNode(this.setting,a?a:null,!0)};a.copyNode=function(a,b,k,i){if(!b)return null;if(a&&!a.isParent&&this.setting.data.keep.leaf&&
+k===d.move.TYPE_INNER)return null;var j=this,e=g.clone(b);if(!a)a=null,k=d.move.TYPE_INNER;k==d.move.TYPE_INNER?(b=function(){f.addNodes(j.setting,a,[e],i)},g.canAsync(this.setting,a)?f.asyncNode(this.setting,a,i,b):b()):(f.addNodes(this.setting,a.parentNode,[e],i),f.moveNode(this.setting,a,e,k,!1,i));return e};a.editName=function(a){a&&a.tId&&a===m.getNodeCache(this.setting,a.tId)&&(a.parentTId&&f.expandCollapseParentNode(this.setting,a.getParentNode(),!0),f.editNode(this.setting,a))};a.moveNode=
+function(a,b,k,i){function j(){f.moveNode(e.setting,a,b,k,!1,i)}if(!b)return b;if(a&&!a.isParent&&this.setting.data.keep.leaf&&k===d.move.TYPE_INNER)return null;else if(a&&(b.parentTId==a.tId&&k==d.move.TYPE_INNER||o(b,this.setting).find("#"+a.tId).length>0))return null;else a||(a=null);var e=this;g.canAsync(this.setting,a)&&k===d.move.TYPE_INNER?f.asyncNode(this.setting,a,i,j):j();return b};a.setEditable=function(a){this.setting.edit.enable=a;return this.refresh()}});var N=f.cancelPreSelectedNode;
+f.cancelPreSelectedNode=function(b,a){for(var c=m.getRoot(b).curSelectedList,d=0,g=c.length;d<g;d++)if(!a||a===c[d])if(f.removeTreeDom(b,c[d]),a)break;N&&N.apply(f,arguments)};var O=f.createNodes;f.createNodes=function(b,a,c,d){O&&O.apply(f,arguments);c&&f.repairParentChkClassWithSelf&&f.repairParentChkClassWithSelf(b,d)};var V=f.makeNodeUrl;f.makeNodeUrl=function(b,a){return b.edit.enable?null:V.apply(f,arguments)};var L=f.removeNode;f.removeNode=function(b,a){var c=m.getRoot(b);if(c.curEditNode===
+a)c.curEditNode=null;L&&L.apply(f,arguments)};var P=f.selectNode;f.selectNode=function(b,a,c){var d=m.getRoot(b);if(m.isSelectedNode(b,a)&&d.curEditNode==a&&a.editNameFlag)return!1;P&&P.apply(f,arguments);f.addHoverDom(b,a);return!0};var Q=g.uCanDo;g.uCanDo=function(b,a){var c=m.getRoot(b);if(a&&(g.eqs(a.type,"mouseover")||g.eqs(a.type,"mouseout")||g.eqs(a.type,"mousedown")||g.eqs(a.type,"mouseup")))return!0;if(c.curEditNode)f.editNodeBlur=!1,c.curEditInput.focus();return!c.curEditNode&&(Q?Q.apply(f,
+arguments):!0)}})(jQuery);
+
diff --git a/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.core.js b/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.core.js
new file mode 100644
index 0000000..7dd93c6
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.core.js
@@ -0,0 +1,1684 @@
+/*
+ * JQuery zTree core v3.5.16
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2014-03-09
+ */
+(function($){
+ var settings = {}, roots = {}, caches = {},
+ //default consts of core
+ _consts = {
+ className: {
+ BUTTON: "button",
+ LEVEL: "level",
+ ICO_LOADING: "ico_loading",
+ SWITCH: "switch"
+ },
+ event: {
+ NODECREATED: "ztree_nodeCreated",
+ CLICK: "ztree_click",
+ EXPAND: "ztree_expand",
+ COLLAPSE: "ztree_collapse",
+ ASYNC_SUCCESS: "ztree_async_success",
+ ASYNC_ERROR: "ztree_async_error",
+ REMOVE: "ztree_remove"
+ },
+ id: {
+ A: "_a",
+ ICON: "_ico",
+ SPAN: "_span",
+ SWITCH: "_switch",
+ UL: "_ul"
+ },
+ line: {
+ ROOT: "root",
+ ROOTS: "roots",
+ CENTER: "center",
+ BOTTOM: "bottom",
+ NOLINE: "noline",
+ LINE: "line"
+ },
+ folder: {
+ OPEN: "open",
+ CLOSE: "close",
+ DOCU: "docu"
+ },
+ node: {
+ CURSELECTED: "curSelectedNode"
+ }
+ },
+ //default setting of core
+ _setting = {
+ treeId: "",
+ treeObj: null,
+ view: {
+ addDiyDom: null,
+ autoCancelSelected: true,
+ dblClickExpand: true,
+ expandSpeed: "fast",
+ fontCss: {},
+ nameIsHTML: false,
+ selectedMulti: true,
+ showIcon: true,
+ showLine: true,
+ showTitle: true,
+ txtSelectedEnable: false
+ },
+ data: {
+ key: {
+ children: "children",
+ name: "name",
+ title: "",
+ url: "url"
+ },
+ simpleData: {
+ enable: false,
+ idKey: "id",
+ pIdKey: "pId",
+ rootPId: null
+ },
+ keep: {
+ parent: false,
+ leaf: false
+ }
+ },
+ async: {
+ enable: false,
+ contentType: "application/x-www-form-urlencoded",
+ type: "post",
+ dataType: "text",
+ url: "",
+ autoParam: [],
+ otherParam: [],
+ dataFilter: null
+ },
+ callback: {
+ beforeAsync:null,
+ beforeClick:null,
+ beforeDblClick:null,
+ beforeRightClick:null,
+ beforeMouseDown:null,
+ beforeMouseUp:null,
+ beforeExpand:null,
+ beforeCollapse:null,
+ beforeRemove:null,
+
+ onAsyncError:null,
+ onAsyncSuccess:null,
+ onNodeCreated:null,
+ onClick:null,
+ onDblClick:null,
+ onRightClick:null,
+ onMouseDown:null,
+ onMouseUp:null,
+ onExpand:null,
+ onCollapse:null,
+ onRemove:null
+ }
+ },
+ //default root of core
+ //zTree use root to save full data
+ _initRoot = function (setting) {
+ var r = data.getRoot(setting);
+ if (!r) {
+ r = {};
+ data.setRoot(setting, r);
+ }
+ r[setting.data.key.children] = [];
+ r.expandTriggerFlag = false;
+ r.curSelectedList = [];
+ r.noSelection = true;
+ r.createdNodes = [];
+ r.zId = 0;
+ r._ver = (new Date()).getTime();
+ },
+ //default cache of core
+ _initCache = function(setting) {
+ var c = data.getCache(setting);
+ if (!c) {
+ c = {};
+ data.setCache(setting, c);
+ }
+ c.nodes = [];
+ c.doms = [];
+ },
+ //default bindEvent of core
+ _bindEvent = function(setting) {
+ var o = setting.treeObj,
+ c = consts.event;
+ o.bind(c.NODECREATED, function (event, treeId, node) {
+ tools.apply(setting.callback.onNodeCreated, [event, treeId, node]);
+ });
+
+ o.bind(c.CLICK, function (event, srcEvent, treeId, node, clickFlag) {
+ tools.apply(setting.callback.onClick, [srcEvent, treeId, node, clickFlag]);
+ });
+
+ o.bind(c.EXPAND, function (event, treeId, node) {
+ tools.apply(setting.callback.onExpand, [event, treeId, node]);
+ });
+
+ o.bind(c.COLLAPSE, function (event, treeId, node) {
+ tools.apply(setting.callback.onCollapse, [event, treeId, node]);
+ });
+
+ o.bind(c.ASYNC_SUCCESS, function (event, treeId, node, msg) {
+ tools.apply(setting.callback.onAsyncSuccess, [event, treeId, node, msg]);
+ });
+
+ o.bind(c.ASYNC_ERROR, function (event, treeId, node, XMLHttpRequest, textStatus, errorThrown) {
+ tools.apply(setting.callback.onAsyncError, [event, treeId, node, XMLHttpRequest, textStatus, errorThrown]);
+ });
+
+ o.bind(c.REMOVE, function (event, treeId, treeNode) {
+ tools.apply(setting.callback.onRemove, [event, treeId, treeNode]);
+ });
+ },
+ _unbindEvent = function(setting) {
+ var o = setting.treeObj,
+ c = consts.event;
+ o.unbind(c.NODECREATED)
+ .unbind(c.CLICK)
+ .unbind(c.EXPAND)
+ .unbind(c.COLLAPSE)
+ .unbind(c.ASYNC_SUCCESS)
+ .unbind(c.ASYNC_ERROR)
+ .unbind(c.REMOVE);
+ },
+ //default event proxy of core
+ _eventProxy = function(event) {
+ var target = event.target,
+ setting = data.getSetting(event.data.treeId),
+ tId = "", node = null,
+ nodeEventType = "", treeEventType = "",
+ nodeEventCallback = null, treeEventCallback = null,
+ tmp = null;
+
+ if (tools.eqs(event.type, "mousedown")) {
+ treeEventType = "mousedown";
+ } else if (tools.eqs(event.type, "mouseup")) {
+ treeEventType = "mouseup";
+ } else if (tools.eqs(event.type, "contextmenu")) {
+ treeEventType = "contextmenu";
+ } else if (tools.eqs(event.type, "click")) {
+ if (tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.SWITCH) !== null) {
+ tId = tools.getNodeMainDom(target).id;
+ nodeEventType = "switchNode";
+ } else {
+ tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (tmp) {
+ tId = tools.getNodeMainDom(tmp).id;
+ nodeEventType = "clickNode";
+ }
+ }
+ } else if (tools.eqs(event.type, "dblclick")) {
+ treeEventType = "dblclick";
+ tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (tmp) {
+ tId = tools.getNodeMainDom(tmp).id;
+ nodeEventType = "switchNode";
+ }
+ }
+ if (treeEventType.length > 0 && tId.length == 0) {
+ tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (tmp) {tId = tools.getNodeMainDom(tmp).id;}
+ }
+ // event to node
+ if (tId.length>0) {
+ node = data.getNodeCache(setting, tId);
+ switch (nodeEventType) {
+ case "switchNode" :
+ if (!node.isParent) {
+ nodeEventType = "";
+ } else if (tools.eqs(event.type, "click")
+ || (tools.eqs(event.type, "dblclick") && tools.apply(setting.view.dblClickExpand, [setting.treeId, node], setting.view.dblClickExpand))) {
+ nodeEventCallback = handler.onSwitchNode;
+ } else {
+ nodeEventType = "";
+ }
+ break;
+ case "clickNode" :
+ nodeEventCallback = handler.onClickNode;
+ break;
+ }
+ }
+ // event to zTree
+ switch (treeEventType) {
+ case "mousedown" :
+ treeEventCallback = handler.onZTreeMousedown;
+ break;
+ case "mouseup" :
+ treeEventCallback = handler.onZTreeMouseup;
+ break;
+ case "dblclick" :
+ treeEventCallback = handler.onZTreeDblclick;
+ break;
+ case "contextmenu" :
+ treeEventCallback = handler.onZTreeContextmenu;
+ break;
+ }
+ var proxyResult = {
+ stop: false,
+ node: node,
+ nodeEventType: nodeEventType,
+ nodeEventCallback: nodeEventCallback,
+ treeEventType: treeEventType,
+ treeEventCallback: treeEventCallback
+ };
+ return proxyResult
+ },
+ //default init node of core
+ _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
+ if (!n) return;
+ var r = data.getRoot(setting),
+ childKey = setting.data.key.children;
+ n.level = level;
+ n.tId = setting.treeId + "_" + (++r.zId);
+ n.parentTId = parentNode ? parentNode.tId : null;
+ n.open = (typeof n.open == "string") ? tools.eqs(n.open, "true") : !!n.open;
+ if (n[childKey] && n[childKey].length > 0) {
+ n.isParent = true;
+ n.zAsync = true;
+ } else {
+ n.isParent = (typeof n.isParent == "string") ? tools.eqs(n.isParent, "true") : !!n.isParent;
+ n.open = (n.isParent && !setting.async.enable) ? n.open : false;
+ n.zAsync = !n.isParent;
+ }
+ n.isFirstNode = isFirstNode;
+ n.isLastNode = isLastNode;
+ n.getParentNode = function() {return data.getNodeCache(setting, n.parentTId);};
+ n.getPreNode = function() {return data.getPreNode(setting, n);};
+ n.getNextNode = function() {return data.getNextNode(setting, n);};
+ n.isAjaxing = false;
+ data.fixPIdKeyValue(setting, n);
+ },
+ _init = {
+ bind: [_bindEvent],
+ unbind: [_unbindEvent],
+ caches: [_initCache],
+ nodes: [_initNode],
+ proxys: [_eventProxy],
+ roots: [_initRoot],
+ beforeA: [],
+ afterA: [],
+ innerBeforeA: [],
+ innerAfterA: [],
+ zTreeTools: []
+ },
+ //method of operate data
+ data = {
+ addNodeCache: function(setting, node) {
+ data.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = node;
+ },
+ getNodeCacheId: function(tId) {
+ return tId.substring(tId.lastIndexOf("_")+1);
+ },
+ addAfterA: function(afterA) {
+ _init.afterA.push(afterA);
+ },
+ addBeforeA: function(beforeA) {
+ _init.beforeA.push(beforeA);
+ },
+ addInnerAfterA: function(innerAfterA) {
+ _init.innerAfterA.push(innerAfterA);
+ },
+ addInnerBeforeA: function(innerBeforeA) {
+ _init.innerBeforeA.push(innerBeforeA);
+ },
+ addInitBind: function(bindEvent) {
+ _init.bind.push(bindEvent);
+ },
+ addInitUnBind: function(unbindEvent) {
+ _init.unbind.push(unbindEvent);
+ },
+ addInitCache: function(initCache) {
+ _init.caches.push(initCache);
+ },
+ addInitNode: function(initNode) {
+ _init.nodes.push(initNode);
+ },
+ addInitProxy: function(initProxy, isFirst) {
+ if (!!isFirst) {
+ _init.proxys.splice(0,0,initProxy);
+ } else {
+ _init.proxys.push(initProxy);
+ }
+ },
+ addInitRoot: function(initRoot) {
+ _init.roots.push(initRoot);
+ },
+ addNodesData: function(setting, parentNode, nodes) {
+ var childKey = setting.data.key.children;
+ if (!parentNode[childKey]) parentNode[childKey] = [];
+ if (parentNode[childKey].length > 0) {
+ parentNode[childKey][parentNode[childKey].length - 1].isLastNode = false;
+ view.setNodeLineIcos(setting, parentNode[childKey][parentNode[childKey].length - 1]);
+ }
+ parentNode.isParent = true;
+ parentNode[childKey] = parentNode[childKey].concat(nodes);
+ },
+ addSelectedNode: function(setting, node) {
+ var root = data.getRoot(setting);
+ if (!data.isSelectedNode(setting, node)) {
+ root.curSelectedList.push(node);
+ }
+ },
+ addCreatedNode: function(setting, node) {
+ if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) {
+ var root = data.getRoot(setting);
+ root.createdNodes.push(node);
+ }
+ },
+ addZTreeTools: function(zTreeTools) {
+ _init.zTreeTools.push(zTreeTools);
+ },
+ exSetting: function(s) {
+ $.extend(true, _setting, s);
+ },
+ fixPIdKeyValue: function(setting, node) {
+ if (setting.data.simpleData.enable) {
+ node[setting.data.simpleData.pIdKey] = node.parentTId ? node.getParentNode()[setting.data.simpleData.idKey] : setting.data.simpleData.rootPId;
+ }
+ },
+ getAfterA: function(setting, node, array) {
+ for (var i=0, j=_init.afterA.length; i<j; i++) {
+ _init.afterA[i].apply(this, arguments);
+ }
+ },
+ getBeforeA: function(setting, node, array) {
+ for (var i=0, j=_init.beforeA.length; i<j; i++) {
+ _init.beforeA[i].apply(this, arguments);
+ }
+ },
+ getInnerAfterA: function(setting, node, array) {
+ for (var i=0, j=_init.innerAfterA.length; i<j; i++) {
+ _init.innerAfterA[i].apply(this, arguments);
+ }
+ },
+ getInnerBeforeA: function(setting, node, array) {
+ for (var i=0, j=_init.innerBeforeA.length; i<j; i++) {
+ _init.innerBeforeA[i].apply(this, arguments);
+ }
+ },
+ getCache: function(setting) {
+ return caches[setting.treeId];
+ },
+ getNextNode: function(setting, node) {
+ if (!node) return null;
+ var childKey = setting.data.key.children,
+ p = node.parentTId ? node.getParentNode() : data.getRoot(setting);
+ for (var i=0, l=p[childKey].length-1; i<=l; i++) {
+ if (p[childKey][i] === node) {
+ return (i==l ? null : p[childKey][i+1]);
+ }
+ }
+ return null;
+ },
+ getNodeByParam: function(setting, nodes, key, value) {
+ if (!nodes || !key) return null;
+ var childKey = setting.data.key.children;
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ if (nodes[i][key] == value) {
+ return nodes[i];
+ }
+ var tmp = data.getNodeByParam(setting, nodes[i][childKey], key, value);
+ if (tmp) return tmp;
+ }
+ return null;
+ },
+ getNodeCache: function(setting, tId) {
+ if (!tId) return null;
+ var n = caches[setting.treeId].nodes[data.getNodeCacheId(tId)];
+ return n ? n : null;
+ },
+ getNodeName: function(setting, node) {
+ var nameKey = setting.data.key.name;
+ return "" + node[nameKey];
+ },
+ getNodeTitle: function(setting, node) {
+ var t = setting.data.key.title === "" ? setting.data.key.name : setting.data.key.title;
+ return "" + node[t];
+ },
+ getNodes: function(setting) {
+ return data.getRoot(setting)[setting.data.key.children];
+ },
+ getNodesByParam: function(setting, nodes, key, value) {
+ if (!nodes || !key) return [];
+ var childKey = setting.data.key.children,
+ result = [];
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ if (nodes[i][key] == value) {
+ result.push(nodes[i]);
+ }
+ result = result.concat(data.getNodesByParam(setting, nodes[i][childKey], key, value));
+ }
+ return result;
+ },
+ getNodesByParamFuzzy: function(setting, nodes, key, value) {
+ if (!nodes || !key) return [];
+ var childKey = setting.data.key.children,
+ result = [];
+ value = value.toLowerCase();
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ if (typeof nodes[i][key] == "string" && nodes[i][key].toLowerCase().indexOf(value)>-1) {
+ result.push(nodes[i]);
+ }
+ result = result.concat(data.getNodesByParamFuzzy(setting, nodes[i][childKey], key, value));
+ }
+ return result;
+ },
+ getNodesByFilter: function(setting, nodes, filter, isSingle, invokeParam) {
+ if (!nodes) return (isSingle ? null : []);
+ var childKey = setting.data.key.children,
+ result = isSingle ? null : [];
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ if (tools.apply(filter, [nodes[i], invokeParam], false)) {
+ if (isSingle) {return nodes[i];}
+ result.push(nodes[i]);
+ }
+ var tmpResult = data.getNodesByFilter(setting, nodes[i][childKey], filter, isSingle, invokeParam);
+ if (isSingle && !!tmpResult) {return tmpResult;}
+ result = isSingle ? tmpResult : result.concat(tmpResult);
+ }
+ return result;
+ },
+ getPreNode: function(setting, node) {
+ if (!node) return null;
+ var childKey = setting.data.key.children,
+ p = node.parentTId ? node.getParentNode() : data.getRoot(setting);
+ for (var i=0, l=p[childKey].length; i<l; i++) {
+ if (p[childKey][i] === node) {
+ return (i==0 ? null : p[childKey][i-1]);
+ }
+ }
+ return null;
+ },
+ getRoot: function(setting) {
+ return setting ? roots[setting.treeId] : null;
+ },
+ getRoots: function() {
+ return roots;
+ },
+ getSetting: function(treeId) {
+ return settings[treeId];
+ },
+ getSettings: function() {
+ return settings;
+ },
+ getZTreeTools: function(treeId) {
+ var r = this.getRoot(this.getSetting(treeId));
+ return r ? r.treeTools : null;
+ },
+ initCache: function(setting) {
+ for (var i=0, j=_init.caches.length; i<j; i++) {
+ _init.caches[i].apply(this, arguments);
+ }
+ },
+ initNode: function(setting, level, node, parentNode, preNode, nextNode) {
+ for (var i=0, j=_init.nodes.length; i<j; i++) {
+ _init.nodes[i].apply(this, arguments);
+ }
+ },
+ initRoot: function(setting) {
+ for (var i=0, j=_init.roots.length; i<j; i++) {
+ _init.roots[i].apply(this, arguments);
+ }
+ },
+ isSelectedNode: function(setting, node) {
+ var root = data.getRoot(setting);
+ for (var i=0, j=root.curSelectedList.length; i<j; i++) {
+ if(node === root.curSelectedList[i]) return true;
+ }
+ return false;
+ },
+ removeNodeCache: function(setting, node) {
+ var childKey = setting.data.key.children;
+ if (node[childKey]) {
+ for (var i=0, l=node[childKey].length; i<l; i++) {
+ arguments.callee(setting, node[childKey][i]);
+ }
+ }
+ data.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = null;
+ },
+ removeSelectedNode: function(setting, node) {
+ var root = data.getRoot(setting);
+ for (var i=0, j=root.curSelectedList.length; i<j; i++) {
+ if(node === root.curSelectedList[i] || !data.getNodeCache(setting, root.curSelectedList[i].tId)) {
+ root.curSelectedList.splice(i, 1);
+ i--;j--;
+ }
+ }
+ },
+ setCache: function(setting, cache) {
+ caches[setting.treeId] = cache;
+ },
+ setRoot: function(setting, root) {
+ roots[setting.treeId] = root;
+ },
+ setZTreeTools: function(setting, zTreeTools) {
+ for (var i=0, j=_init.zTreeTools.length; i<j; i++) {
+ _init.zTreeTools[i].apply(this, arguments);
+ }
+ },
+ transformToArrayFormat: function (setting, nodes) {
+ if (!nodes) return [];
+ var childKey = setting.data.key.children,
+ r = [];
+ if (tools.isArray(nodes)) {
+ for (var i=0, l=nodes.length; i<l; i++) {
+ r.push(nodes[i]);
+ if (nodes[i][childKey])
+ r = r.concat(data.transformToArrayFormat(setting, nodes[i][childKey]));
+ }
+ } else {
+ r.push(nodes);
+ if (nodes[childKey])
+ r = r.concat(data.transformToArrayFormat(setting, nodes[childKey]));
+ }
+ return r;
+ },
+ transformTozTreeFormat: function(setting, sNodes) {
+ var i,l,
+ key = setting.data.simpleData.idKey,
+ parentKey = setting.data.simpleData.pIdKey,
+ childKey = setting.data.key.children;
+ if (!key || key=="" || !sNodes) return [];
+
+ if (tools.isArray(sNodes)) {
+ var r = [];
+ var tmpMap = [];
+ for (i=0, l=sNodes.length; i<l; i++) {
+ tmpMap[sNodes[i][key]] = sNodes[i];
+ }
+ for (i=0, l=sNodes.length; i<l; i++) {
+ if (tmpMap[sNodes[i][parentKey]] && sNodes[i][key] != sNodes[i][parentKey]) {
+ if (!tmpMap[sNodes[i][parentKey]][childKey])
+ tmpMap[sNodes[i][parentKey]][childKey] = [];
+ tmpMap[sNodes[i][parentKey]][childKey].push(sNodes[i]);
+ } else {
+ r.push(sNodes[i]);
+ }
+ }
+ return r;
+ }else {
+ return [sNodes];
+ }
+ }
+ },
+ //method of event proxy
+ event = {
+ bindEvent: function(setting) {
+ for (var i=0, j=_init.bind.length; i<j; i++) {
+ _init.bind[i].apply(this, arguments);
+ }
+ },
+ unbindEvent: function(setting) {
+ for (var i=0, j=_init.unbind.length; i<j; i++) {
+ _init.unbind[i].apply(this, arguments);
+ }
+ },
+ bindTree: function(setting) {
+ var eventParam = {
+ treeId: setting.treeId
+ },
+ o = setting.treeObj;
+ if (!setting.view.txtSelectedEnable) {
+ // for can't select text
+ o.bind('selectstart', function(e){
+ var node
+ var n = e.originalEvent.srcElement.nodeName.toLowerCase();
+ return (n === "input" || n === "textarea" );
+ }).css({
+ "-moz-user-select":"-moz-none"
+ });
+ }
+ o.bind('click', eventParam, event.proxy);
+ o.bind('dblclick', eventParam, event.proxy);
+ o.bind('mouseover', eventParam, event.proxy);
+ o.bind('mouseout', eventParam, event.proxy);
+ o.bind('mousedown', eventParam, event.proxy);
+ o.bind('mouseup', eventParam, event.proxy);
+ o.bind('contextmenu', eventParam, event.proxy);
+ },
+ unbindTree: function(setting) {
+ var o = setting.treeObj;
+ o.unbind('click', event.proxy)
+ .unbind('dblclick', event.proxy)
+ .unbind('mouseover', event.proxy)
+ .unbind('mouseout', event.proxy)
+ .unbind('mousedown', event.proxy)
+ .unbind('mouseup', event.proxy)
+ .unbind('contextmenu', event.proxy);
+ },
+ doProxy: function(e) {
+ var results = [];
+ for (var i=0, j=_init.proxys.length; i<j; i++) {
+ var proxyResult = _init.proxys[i].apply(this, arguments);
+ results.push(proxyResult);
+ if (proxyResult.stop) {
+ break;
+ }
+ }
+ return results;
+ },
+ proxy: function(e) {
+ var setting = data.getSetting(e.data.treeId);
+ if (!tools.uCanDo(setting, e)) return true;
+ var results = event.doProxy(e),
+ r = true, x = false;
+ for (var i=0, l=results.length; i<l; i++) {
+ var proxyResult = results[i];
+ if (proxyResult.nodeEventCallback) {
+ x = true;
+ r = proxyResult.nodeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r;
+ }
+ if (proxyResult.treeEventCallback) {
+ x = true;
+ r = proxyResult.treeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r;
+ }
+ }
+ return r;
+ }
+ },
+ //method of event handler
+ handler = {
+ onSwitchNode: function (event, node) {
+ var setting = data.getSetting(event.data.treeId);
+ if (node.open) {
+ if (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false) return true;
+ data.getRoot(setting).expandTriggerFlag = true;
+ view.switchNode(setting, node);
+ } else {
+ if (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false) return true;
+ data.getRoot(setting).expandTriggerFlag = true;
+ view.switchNode(setting, node);
+ }
+ return true;
+ },
+ onClickNode: function (event, node) {
+ var setting = data.getSetting(event.data.treeId),
+ clickFlag = ( (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey)) && data.isSelectedNode(setting, node)) ? 0 : (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey) && setting.view.selectedMulti) ? 2 : 1;
+ if (tools.apply(setting.callback.beforeClick, [setting.treeId, node, clickFlag], true) == false) return true;
+ if (clickFlag === 0) {
+ view.cancelPreSelectedNode(setting, node);
+ } else {
+ view.selectNode(setting, node, clickFlag === 2);
+ }
+ setting.treeObj.trigger(consts.event.CLICK, [event, setting.treeId, node, clickFlag]);
+ return true;
+ },
+ onZTreeMousedown: function(event, node) {
+ var setting = data.getSetting(event.data.treeId);
+ if (tools.apply(setting.callback.beforeMouseDown, [setting.treeId, node], true)) {
+ tools.apply(setting.callback.onMouseDown, [event, setting.treeId, node]);
+ }
+ return true;
+ },
+ onZTreeMouseup: function(event, node) {
+ var setting = data.getSetting(event.data.treeId);
+ if (tools.apply(setting.callback.beforeMouseUp, [setting.treeId, node], true)) {
+ tools.apply(setting.callback.onMouseUp, [event, setting.treeId, node]);
+ }
+ return true;
+ },
+ onZTreeDblclick: function(event, node) {
+ var setting = data.getSetting(event.data.treeId);
+ if (tools.apply(setting.callback.beforeDblClick, [setting.treeId, node], true)) {
+ tools.apply(setting.callback.onDblClick, [event, setting.treeId, node]);
+ }
+ return true;
+ },
+ onZTreeContextmenu: function(event, node) {
+ var setting = data.getSetting(event.data.treeId);
+ if (tools.apply(setting.callback.beforeRightClick, [setting.treeId, node], true)) {
+ tools.apply(setting.callback.onRightClick, [event, setting.treeId, node]);
+ }
+ return (typeof setting.callback.onRightClick) != "function";
+ }
+ },
+ //method of tools for zTree
+ tools = {
+ apply: function(fun, param, defaultValue) {
+ if ((typeof fun) == "function") {
+ return fun.apply(zt, param?param:[]);
+ }
+ return defaultValue;
+ },
+ canAsync: function(setting, node) {
+ var childKey = setting.data.key.children;
+ return (setting.async.enable && node && node.isParent && !(node.zAsync || (node[childKey] && node[childKey].length > 0)));
+ },
+ clone: function (obj){
+ if (obj === null) return null;
+ var o = tools.isArray(obj) ? [] : {};
+ for(var i in obj){
+ o[i] = (obj[i] instanceof Date) ? new Date(obj[i].getTime()) : (typeof obj[i] === "object" ? arguments.callee(obj[i]) : obj[i]);
+ }
+ return o;
+ },
+ eqs: function(str1, str2) {
+ return str1.toLowerCase() === str2.toLowerCase();
+ },
+ isArray: function(arr) {
+ return Object.prototype.toString.apply(arr) === "[object Array]";
+ },
+ $: function(node, exp, setting) {
+ if (!!exp && typeof exp != "string") {
+ setting = exp;
+ exp = "";
+ }
+ if (typeof node == "string") {
+ return $(node, setting ? setting.treeObj.get(0).ownerDocument : null);
+ } else {
+ return $("#" + node.tId + exp, setting ? setting.treeObj : null);
+ }
+ },
+ getMDom: function (setting, curDom, targetExpr) {
+ if (!curDom) return null;
+ while (curDom && curDom.id !== setting.treeId) {
+ for (var i=0, l=targetExpr.length; curDom.tagName && i<l; i++) {
+ if (tools.eqs(curDom.tagName, targetExpr[i].tagName) && curDom.getAttribute(targetExpr[i].attrName) !== null) {
+ return curDom;
+ }
+ }
+ curDom = curDom.parentNode;
+ }
+ return null;
+ },
+ getNodeMainDom:function(target) {
+ return ($(target).parent("li").get(0) || $(target).parentsUntil("li").parent().get(0));
+ },
+ isChildOrSelf: function(dom, parentId) {
+ return ( $(dom).closest("#" + parentId).length> 0 );
+ },
+ uCanDo: function(setting, e) {
+ return true;
+ }
+ },
+ //method of operate ztree dom
+ view = {
+ addNodes: function(setting, parentNode, newNodes, isSilent) {
+ if (setting.data.keep.leaf && parentNode && !parentNode.isParent) {
+ return;
+ }
+ if (!tools.isArray(newNodes)) {
+ newNodes = [newNodes];
+ }
+ if (setting.data.simpleData.enable) {
+ newNodes = data.transformTozTreeFormat(setting, newNodes);
+ }
+ if (parentNode) {
+ var target_switchObj = $$(parentNode, consts.id.SWITCH, setting),
+ target_icoObj = $$(parentNode, consts.id.ICON, setting),
+ target_ulObj = $$(parentNode, consts.id.UL, setting);
+
+ if (!parentNode.open) {
+ view.replaceSwitchClass(parentNode, target_switchObj, consts.folder.CLOSE);
+ view.replaceIcoClass(parentNode, target_icoObj, consts.folder.CLOSE);
+ parentNode.open = false;
+ target_ulObj.css({
+ "display": "none"
+ });
+ }
+
+ data.addNodesData(setting, parentNode, newNodes);
+ view.createNodes(setting, parentNode.level + 1, newNodes, parentNode);
+ if (!isSilent) {
+ view.expandCollapseParentNode(setting, parentNode, true);
+ }
+ } else {
+ data.addNodesData(setting, data.getRoot(setting), newNodes);
+ view.createNodes(setting, 0, newNodes, null);
+ }
+ },
+ appendNodes: function(setting, level, nodes, parentNode, initFlag, openFlag) {
+ if (!nodes) return [];
+ var html = [],
+ childKey = setting.data.key.children;
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ var node = nodes[i];
+ if (initFlag) {
+ var tmpPNode = (parentNode) ? parentNode: data.getRoot(setting),
+ tmpPChild = tmpPNode[childKey],
+ isFirstNode = ((tmpPChild.length == nodes.length) && (i == 0)),
+ isLastNode = (i == (nodes.length - 1));
+ data.initNode(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag);
+ data.addNodeCache(setting, node);
+ }
+
+ var childHtml = [];
+ if (node[childKey] && node[childKey].length > 0) {
+ //make child html first, because checkType
+ childHtml = view.appendNodes(setting, level + 1, node[childKey], node, initFlag, openFlag && node.open);
+ }
+ if (openFlag) {
+
+ view.makeDOMNodeMainBefore(html, setting, node);
+ view.makeDOMNodeLine(html, setting, node);
+ data.getBeforeA(setting, node, html);
+ view.makeDOMNodeNameBefore(html, setting, node);
+ data.getInnerBeforeA(setting, node, html);
+ view.makeDOMNodeIcon(html, setting, node);
+ data.getInnerAfterA(setting, node, html);
+ view.makeDOMNodeNameAfter(html, setting, node);
+ data.getAfterA(setting, node, html);
+ if (node.isParent && node.open) {
+ view.makeUlHtml(setting, node, html, childHtml.join(''));
+ }
+ view.makeDOMNodeMainAfter(html, setting, node);
+ data.addCreatedNode(setting, node);
+ }
+ }
+ return html;
+ },
+ appendParentULDom: function(setting, node) {
+ var html = [],
+ nObj = $$(node, setting);
+ if (!nObj.get(0) && !!node.parentTId) {
+ view.appendParentULDom(setting, node.getParentNode());
+ nObj = $$(node, setting);
+ }
+ var ulObj = $$(node, consts.id.UL, setting);
+ if (ulObj.get(0)) {
+ ulObj.remove();
+ }
+ var childKey = setting.data.key.children,
+ childHtml = view.appendNodes(setting, node.level+1, node[childKey], node, false, true);
+ view.makeUlHtml(setting, node, html, childHtml.join(''));
+ nObj.append(html.join(''));
+ },
+ asyncNode: function(setting, node, isSilent, callback) {
+ var i, l;
+ if (node && !node.isParent) {
+ tools.apply(callback);
+ return false;
+ } else if (node && node.isAjaxing) {
+ return false;
+ } else if (tools.apply(setting.callback.beforeAsync, [setting.treeId, node], true) == false) {
+ tools.apply(callback);
+ return false;
+ }
+ if (node) {
+ node.isAjaxing = true;
+ var icoObj = $$(node, consts.id.ICON, setting);
+ icoObj.attr({"style":"", "class":consts.className.BUTTON + " " + consts.className.ICO_LOADING});
+ }
+
+ var tmpParam = {};
+ for (i = 0, l = setting.async.autoParam.length; node && i < l; i++) {
+ var pKey = setting.async.autoParam[i].split("="), spKey = pKey;
+ if (pKey.length>1) {
+ spKey = pKey[1];
+ pKey = pKey[0];
+ }
+ tmpParam[spKey] = node[pKey];
+ }
+ if (tools.isArray(setting.async.otherParam)) {
+ for (i = 0, l = setting.async.otherParam.length; i < l; i += 2) {
+ tmpParam[setting.async.otherParam[i]] = setting.async.otherParam[i + 1];
+ }
+ } else {
+ for (var p in setting.async.otherParam) {
+ tmpParam[p] = setting.async.otherParam[p];
+ }
+ }
+
+ var _tmpV = data.getRoot(setting)._ver;
+ $.ajax({
+ contentType: setting.async.contentType,
+ type: setting.async.type,
+ url: tools.apply(setting.async.url, [setting.treeId, node], setting.async.url),
+ data: tmpParam,
+ dataType: setting.async.dataType,
+ success: function(msg) {
+ if (_tmpV != data.getRoot(setting)._ver) {
+ return;
+ }
+ var newNodes = [];
+ try {
+ if (!msg || msg.length == 0) {
+ newNodes = [];
+ } else if (typeof msg == "string") {
+ newNodes = eval("(" + msg + ")");
+ } else {
+ newNodes = msg;
+ }
+ } catch(err) {
+ newNodes = msg;
+ }
+
+ if (node) {
+ node.isAjaxing = null;
+ node.zAsync = true;
+ }
+ view.setNodeLineIcos(setting, node);
+ if (newNodes && newNodes !== "") {
+ newNodes = tools.apply(setting.async.dataFilter, [setting.treeId, node, newNodes], newNodes);
+ view.addNodes(setting, node, !!newNodes ? tools.clone(newNodes) : [], !!isSilent);
+ } else {
+ view.addNodes(setting, node, [], !!isSilent);
+ }
+ setting.treeObj.trigger(consts.event.ASYNC_SUCCESS, [setting.treeId, node, msg]);
+ tools.apply(callback);
+ },
+ error: function(XMLHttpRequest, textStatus, errorThrown) {
+ if (_tmpV != data.getRoot(setting)._ver) {
+ return;
+ }
+ if (node) node.isAjaxing = null;
+ view.setNodeLineIcos(setting, node);
+ setting.treeObj.trigger(consts.event.ASYNC_ERROR, [setting.treeId, node, XMLHttpRequest, textStatus, errorThrown]);
+ }
+ });
+ return true;
+ },
+ cancelPreSelectedNode: function (setting, node) {
+ var list = data.getRoot(setting).curSelectedList;
+ for (var i=0, j=list.length-1; j>=i; j--) {
+ if (!node || node === list[j]) {
+ $$(list[j], consts.id.A, setting).removeClass(consts.node.CURSELECTED);
+ if (node) {
+ data.removeSelectedNode(setting, node);
+ break;
+ }
+ }
+ }
+ if (!node) data.getRoot(setting).curSelectedList = [];
+ },
+ createNodeCallback: function(setting) {
+ if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) {
+ var root = data.getRoot(setting);
+ while (root.createdNodes.length>0) {
+ var node = root.createdNodes.shift();
+ tools.apply(setting.view.addDiyDom, [setting.treeId, node]);
+ if (!!setting.callback.onNodeCreated) {
+ setting.treeObj.trigger(consts.event.NODECREATED, [setting.treeId, node]);
+ }
+ }
+ }
+ },
+ createNodes: function(setting, level, nodes, parentNode) {
+ if (!nodes || nodes.length == 0) return;
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children,
+ openFlag = !parentNode || parentNode.open || !!$$(parentNode[childKey][0], setting).get(0);
+ root.createdNodes = [];
+ var zTreeHtml = view.appendNodes(setting, level, nodes, parentNode, true, openFlag);
+ if (!parentNode) {
+ setting.treeObj.append(zTreeHtml.join(''));
+ } else {
+ var ulObj = $$(parentNode, consts.id.UL, setting);
+ if (ulObj.get(0)) {
+ ulObj.append(zTreeHtml.join(''));
+ }
+ }
+ view.createNodeCallback(setting);
+ },
+ destroy: function(setting) {
+ if (!setting) return;
+ data.initCache(setting);
+ data.initRoot(setting);
+ event.unbindTree(setting);
+ event.unbindEvent(setting);
+ setting.treeObj.empty();
+ delete settings[setting.treeId];
+ },
+ expandCollapseNode: function(setting, node, expandFlag, animateFlag, callback) {
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children;
+ if (!node) {
+ tools.apply(callback, []);
+ return;
+ }
+ if (root.expandTriggerFlag) {
+ var _callback = callback;
+ callback = function(){
+ if (_callback) _callback();
+ if (node.open) {
+ setting.treeObj.trigger(consts.event.EXPAND, [setting.treeId, node]);
+ } else {
+ setting.treeObj.trigger(consts.event.COLLAPSE, [setting.treeId, node]);
+ }
+ };
+ root.expandTriggerFlag = false;
+ }
+ if (!node.open && node.isParent && ((!$$(node, consts.id.UL, setting).get(0)) || (node[childKey] && node[childKey].length>0 && !$$(node[childKey][0], setting).get(0)))) {
+ view.appendParentULDom(setting, node);
+ view.createNodeCallback(setting);
+ }
+ if (node.open == expandFlag) {
+ tools.apply(callback, []);
+ return;
+ }
+ var ulObj = $$(node, consts.id.UL, setting),
+ switchObj = $$(node, consts.id.SWITCH, setting),
+ icoObj = $$(node, consts.id.ICON, setting);
+
+ if (node.isParent) {
+ node.open = !node.open;
+ if (node.iconOpen && node.iconClose) {
+ icoObj.attr("style", view.makeNodeIcoStyle(setting, node));
+ }
+
+ if (node.open) {
+ view.replaceSwitchClass(node, switchObj, consts.folder.OPEN);
+ view.replaceIcoClass(node, icoObj, consts.folder.OPEN);
+ if (animateFlag == false || setting.view.expandSpeed == "") {
+ ulObj.show();
+ tools.apply(callback, []);
+ } else {
+ if (node[childKey] && node[childKey].length > 0) {
+ ulObj.slideDown(setting.view.expandSpeed, callback);
+ } else {
+ ulObj.show();
+ tools.apply(callback, []);
+ }
+ }
+ } else {
+ view.replaceSwitchClass(node, switchObj, consts.folder.CLOSE);
+ view.replaceIcoClass(node, icoObj, consts.folder.CLOSE);
+ if (animateFlag == false || setting.view.expandSpeed == "" || !(node[childKey] && node[childKey].length > 0)) {
+ ulObj.hide();
+ tools.apply(callback, []);
+ } else {
+ ulObj.slideUp(setting.view.expandSpeed, callback);
+ }
+ }
+ } else {
+ tools.apply(callback, []);
+ }
+ },
+ expandCollapseParentNode: function(setting, node, expandFlag, animateFlag, callback) {
+ if (!node) return;
+ if (!node.parentTId) {
+ view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback);
+ return;
+ } else {
+ view.expandCollapseNode(setting, node, expandFlag, animateFlag);
+ }
+ if (node.parentTId) {
+ view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, animateFlag, callback);
+ }
+ },
+ expandCollapseSonNode: function(setting, node, expandFlag, animateFlag, callback) {
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children,
+ treeNodes = (node) ? node[childKey]: root[childKey],
+ selfAnimateSign = (node) ? false : animateFlag,
+ expandTriggerFlag = data.getRoot(setting).expandTriggerFlag;
+ data.getRoot(setting).expandTriggerFlag = false;
+ if (treeNodes) {
+ for (var i = 0, l = treeNodes.length; i < l; i++) {
+ if (treeNodes[i]) view.expandCollapseSonNode(setting, treeNodes[i], expandFlag, selfAnimateSign);
+ }
+ }
+ data.getRoot(setting).expandTriggerFlag = expandTriggerFlag;
+ view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback );
+ },
+ makeDOMNodeIcon: function(html, setting, node) {
+ var nameStr = data.getNodeName(setting, node),
+ name = setting.view.nameIsHTML ? nameStr : nameStr.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
+ html.push("<span id='", node.tId, consts.id.ICON,
+ "' title='' treeNode", consts.id.ICON," class='", view.makeNodeIcoClass(setting, node),
+ "' style='", view.makeNodeIcoStyle(setting, node), "'></span><span id='", node.tId, consts.id.SPAN,
+ "'>",name,"</span>");
+ },
+ makeDOMNodeLine: function(html, setting, node) {
+ html.push("<span id='", node.tId, consts.id.SWITCH, "' title='' class='", view.makeNodeLineClass(setting, node), "' treeNode", consts.id.SWITCH,"></span>");
+ },
+ makeDOMNodeMainAfter: function(html, setting, node) {
+ html.push("</li>");
+ },
+ makeDOMNodeMainBefore: function(html, setting, node) {
+ html.push("<li id='", node.tId, "' class='", consts.className.LEVEL, node.level,"' tabindex='0' hidefocus='true' treenode>");
+ },
+ makeDOMNodeNameAfter: function(html, setting, node) {
+ html.push("</a>");
+ },
+ makeDOMNodeNameBefore: function(html, setting, node) {
+ var title = data.getNodeTitle(setting, node),
+ url = view.makeNodeUrl(setting, node),
+ fontcss = view.makeNodeFontCss(setting, node),
+ fontStyle = [];
+ for (var f in fontcss) {
+ fontStyle.push(f, ":", fontcss[f], ";");
+ }
+ html.push("<a id='", node.tId, consts.id.A, "' class='", consts.className.LEVEL, node.level,"' treeNode", consts.id.A," onclick=\"", (node.click || ''),
+ "\" ", ((url != null && url.length > 0) ? "href='" + url + "'" : ""), " target='",view.makeNodeTarget(node),"' style='", fontStyle.join(''),
+ "'");
+ if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && title) {html.push("title='", title.replace(/'/g,"&#39;").replace(/</g,'&lt;').replace(/>/g,'&gt;'),"'");}
+ html.push(">");
+ },
+ makeNodeFontCss: function(setting, node) {
+ var fontCss = tools.apply(setting.view.fontCss, [setting.treeId, node], setting.view.fontCss);
+ return (fontCss && ((typeof fontCss) != "function")) ? fontCss : {};
+ },
+ makeNodeIcoClass: function(setting, node) {
+ var icoCss = ["ico"];
+ if (!node.isAjaxing) {
+ icoCss[0] = (node.iconSkin ? node.iconSkin + "_" : "") + icoCss[0];
+ if (node.isParent) {
+ icoCss.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE);
+ } else {
+ icoCss.push(consts.folder.DOCU);
+ }
+ }
+ return consts.className.BUTTON + " " + icoCss.join('_');
+ },
+ makeNodeIcoStyle: function(setting, node) {
+ var icoStyle = [];
+ if (!node.isAjaxing) {
+ var icon = (node.isParent && node.iconOpen && node.iconClose) ? (node.open ? node.iconOpen : node.iconClose) : node.icon;
+ if (icon) icoStyle.push("background:url(", icon, ") 0 0 no-repeat;");
+ if (setting.view.showIcon == false || !tools.apply(setting.view.showIcon, [setting.treeId, node], true)) {
+ icoStyle.push("width:0px;height:0px;");
+ }
+ }
+ return icoStyle.join('');
+ },
+ makeNodeLineClass: function(setting, node) {
+ var lineClass = [];
+ if (setting.view.showLine) {
+ if (node.level == 0 && node.isFirstNode && node.isLastNode) {
+ lineClass.push(consts.line.ROOT);
+ } else if (node.level == 0 && node.isFirstNode) {
+ lineClass.push(consts.line.ROOTS);
+ } else if (node.isLastNode) {
+ lineClass.push(consts.line.BOTTOM);
+ } else {
+ lineClass.push(consts.line.CENTER);
+ }
+ } else {
+ lineClass.push(consts.line.NOLINE);
+ }
+ if (node.isParent) {
+ lineClass.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE);
+ } else {
+ lineClass.push(consts.folder.DOCU);
+ }
+ return view.makeNodeLineClassEx(node) + lineClass.join('_');
+ },
+ makeNodeLineClassEx: function(node) {
+ return consts.className.BUTTON + " " + consts.className.LEVEL + node.level + " " + consts.className.SWITCH + " ";
+ },
+ makeNodeTarget: function(node) {
+ return (node.target || "_blank");
+ },
+ makeNodeUrl: function(setting, node) {
+ var urlKey = setting.data.key.url;
+ return node[urlKey] ? node[urlKey] : null;
+ },
+ makeUlHtml: function(setting, node, html, content) {
+ html.push("<ul id='", node.tId, consts.id.UL, "' class='", consts.className.LEVEL, node.level, " ", view.makeUlLineClass(setting, node), "' style='display:", (node.open ? "block": "none"),"'>");
+ html.push(content);
+ html.push("</ul>");
+ },
+ makeUlLineClass: function(setting, node) {
+ return ((setting.view.showLine && !node.isLastNode) ? consts.line.LINE : "");
+ },
+ removeChildNodes: function(setting, node) {
+ if (!node) return;
+ var childKey = setting.data.key.children,
+ nodes = node[childKey];
+ if (!nodes) return;
+
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ data.removeNodeCache(setting, nodes[i]);
+ }
+ data.removeSelectedNode(setting);
+ delete node[childKey];
+
+ if (!setting.data.keep.parent) {
+ node.isParent = false;
+ node.open = false;
+ var tmp_switchObj = $$(node, consts.id.SWITCH, setting),
+ tmp_icoObj = $$(node, consts.id.ICON, setting);
+ view.replaceSwitchClass(node, tmp_switchObj, consts.folder.DOCU);
+ view.replaceIcoClass(node, tmp_icoObj, consts.folder.DOCU);
+ $$(node, consts.id.UL, setting).remove();
+ } else {
+ $$(node, consts.id.UL, setting).empty();
+ }
+ },
+ setFirstNode: function(setting, parentNode) {
+ var childKey = setting.data.key.children, childLength = parentNode[childKey].length;
+ if ( childLength > 0) {
+ parentNode[childKey][0].isFirstNode = true;
+ }
+ },
+ setLastNode: function(setting, parentNode) {
+ var childKey = setting.data.key.children, childLength = parentNode[childKey].length;
+ if ( childLength > 0) {
+ parentNode[childKey][childLength - 1].isLastNode = true;
+ }
+ },
+ removeNode: function(setting, node) {
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children,
+ parentNode = (node.parentTId) ? node.getParentNode() : root;
+
+ node.isFirstNode = false;
+ node.isLastNode = false;
+ node.getPreNode = function() {return null;};
+ node.getNextNode = function() {return null;};
+
+ if (!data.getNodeCache(setting, node.tId)) {
+ return;
+ }
+
+ $$(node, setting).remove();
+ data.removeNodeCache(setting, node);
+ data.removeSelectedNode(setting, node);
+
+ for (var i = 0, l = parentNode[childKey].length; i < l; i++) {
+ if (parentNode[childKey][i].tId == node.tId) {
+ parentNode[childKey].splice(i, 1);
+ break;
+ }
+ }
+ view.setFirstNode(setting, parentNode);
+ view.setLastNode(setting, parentNode);
+
+ var tmp_ulObj,tmp_switchObj,tmp_icoObj,
+ childLength = parentNode[childKey].length;
+
+ //repair nodes old parent
+ if (!setting.data.keep.parent && childLength == 0) {
+ //old parentNode has no child nodes
+ parentNode.isParent = false;
+ parentNode.open = false;
+ tmp_ulObj = $$(parentNode, consts.id.UL, setting);
+ tmp_switchObj = $$(parentNode, consts.id.SWITCH, setting);
+ tmp_icoObj = $$(parentNode, consts.id.ICON, setting);
+ view.replaceSwitchClass(parentNode, tmp_switchObj, consts.folder.DOCU);
+ view.replaceIcoClass(parentNode, tmp_icoObj, consts.folder.DOCU);
+ tmp_ulObj.css("display", "none");
+
+ } else if (setting.view.showLine && childLength > 0) {
+ //old parentNode has child nodes
+ var newLast = parentNode[childKey][childLength - 1];
+ tmp_ulObj = $$(newLast, consts.id.UL, setting);
+ tmp_switchObj = $$(newLast, consts.id.SWITCH, setting);
+ tmp_icoObj = $$(newLast, consts.id.ICON, setting);
+ if (parentNode == root) {
+ if (parentNode[childKey].length == 1) {
+ //node was root, and ztree has only one root after move node
+ view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.ROOT);
+ } else {
+ var tmp_first_switchObj = $$(parentNode[childKey][0], consts.id.SWITCH, setting);
+ view.replaceSwitchClass(parentNode[childKey][0], tmp_first_switchObj, consts.line.ROOTS);
+ view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM);
+ }
+ } else {
+ view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM);
+ }
+ tmp_ulObj.removeClass(consts.line.LINE);
+ }
+ },
+ replaceIcoClass: function(node, obj, newName) {
+ if (!obj || node.isAjaxing) return;
+ var tmpName = obj.attr("class");
+ if (tmpName == undefined) return;
+ var tmpList = tmpName.split("_");
+ switch (newName) {
+ case consts.folder.OPEN:
+ case consts.folder.CLOSE:
+ case consts.folder.DOCU:
+ tmpList[tmpList.length-1] = newName;
+ break;
+ }
+ obj.attr("class", tmpList.join("_"));
+ },
+ replaceSwitchClass: function(node, obj, newName) {
+ if (!obj) return;
+ var tmpName = obj.attr("class");
+ if (tmpName == undefined) return;
+ var tmpList = tmpName.split("_");
+ switch (newName) {
+ case consts.line.ROOT:
+ case consts.line.ROOTS:
+ case consts.line.CENTER:
+ case consts.line.BOTTOM:
+ case consts.line.NOLINE:
+ tmpList[0] = view.makeNodeLineClassEx(node) + newName;
+ break;
+ case consts.folder.OPEN:
+ case consts.folder.CLOSE:
+ case consts.folder.DOCU:
+ tmpList[1] = newName;
+ break;
+ }
+ obj.attr("class", tmpList.join("_"));
+ if (newName !== consts.folder.DOCU) {
+ obj.removeAttr("disabled");
+ } else {
+ obj.attr("disabled", "disabled");
+ }
+ },
+ selectNode: function(setting, node, addFlag) {
+ if (!addFlag) {
+ view.cancelPreSelectedNode(setting);
+ }
+ $$(node, consts.id.A, setting).addClass(consts.node.CURSELECTED);
+ data.addSelectedNode(setting, node);
+ },
+ setNodeFontCss: function(setting, treeNode) {
+ var aObj = $$(treeNode, consts.id.A, setting),
+ fontCss = view.makeNodeFontCss(setting, treeNode);
+ if (fontCss) {
+ aObj.css(fontCss);
+ }
+ },
+ setNodeLineIcos: function(setting, node) {
+ if (!node) return;
+ var switchObj = $$(node, consts.id.SWITCH, setting),
+ ulObj = $$(node, consts.id.UL, setting),
+ icoObj = $$(node, consts.id.ICON, setting),
+ ulLine = view.makeUlLineClass(setting, node);
+ if (ulLine.length==0) {
+ ulObj.removeClass(consts.line.LINE);
+ } else {
+ ulObj.addClass(ulLine);
+ }
+ switchObj.attr("class", view.makeNodeLineClass(setting, node));
+ if (node.isParent) {
+ switchObj.removeAttr("disabled");
+ } else {
+ switchObj.attr("disabled", "disabled");
+ }
+ icoObj.removeAttr("style");
+ icoObj.attr("style", view.makeNodeIcoStyle(setting, node));
+ icoObj.attr("class", view.makeNodeIcoClass(setting, node));
+ },
+ setNodeName: function(setting, node) {
+ var title = data.getNodeTitle(setting, node),
+ nObj = $$(node, consts.id.SPAN, setting);
+ nObj.empty();
+ if (setting.view.nameIsHTML) {
+ nObj.html(data.getNodeName(setting, node));
+ } else {
+ nObj.text(data.getNodeName(setting, node));
+ }
+ if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle)) {
+ var aObj = $$(node, consts.id.A, setting);
+ aObj.attr("title", !title ? "" : title);
+ }
+ },
+ setNodeTarget: function(setting, node) {
+ var aObj = $$(node, consts.id.A, setting);
+ aObj.attr("target", view.makeNodeTarget(node));
+ },
+ setNodeUrl: function(setting, node) {
+ var aObj = $$(node, consts.id.A, setting),
+ url = view.makeNodeUrl(setting, node);
+ if (url == null || url.length == 0) {
+ aObj.removeAttr("href");
+ } else {
+ aObj.attr("href", url);
+ }
+ },
+ switchNode: function(setting, node) {
+ if (node.open || !tools.canAsync(setting, node)) {
+ view.expandCollapseNode(setting, node, !node.open);
+ } else if (setting.async.enable) {
+ if (!view.asyncNode(setting, node)) {
+ view.expandCollapseNode(setting, node, !node.open);
+ return;
+ }
+ } else if (node) {
+ view.expandCollapseNode(setting, node, !node.open);
+ }
+ }
+ };
+ // zTree defind
+ $.fn.zTree = {
+ consts : _consts,
+ _z : {
+ tools: tools,
+ view: view,
+ event: event,
+ data: data
+ },
+ getZTreeObj: function(treeId) {
+ var o = data.getZTreeTools(treeId);
+ return o ? o : null;
+ },
+ destroy: function(treeId) {
+ if (!!treeId && treeId.length > 0) {
+ view.destroy(data.getSetting(treeId));
+ } else {
+ for(var s in settings) {
+ view.destroy(settings[s]);
+ }
+ }
+ },
+ init: function(obj, zSetting, zNodes) {
+ var setting = tools.clone(_setting);
+ $.extend(true, setting, zSetting);
+ setting.treeId = obj.attr("id");
+ setting.treeObj = obj;
+ setting.treeObj.empty();
+ settings[setting.treeId] = setting;
+ //For some older browser,(e.g., ie6)
+ if(typeof document.body.style.maxHeight === "undefined") {
+ setting.view.expandSpeed = "";
+ }
+ data.initRoot(setting);
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children;
+ zNodes = zNodes ? tools.clone(tools.isArray(zNodes)? zNodes : [zNodes]) : [];
+ if (setting.data.simpleData.enable) {
+ root[childKey] = data.transformTozTreeFormat(setting, zNodes);
+ } else {
+ root[childKey] = zNodes;
+ }
+
+ data.initCache(setting);
+ event.unbindTree(setting);
+ event.bindTree(setting);
+ event.unbindEvent(setting);
+ event.bindEvent(setting);
+
+ var zTreeTools = {
+ setting : setting,
+ addNodes : function(parentNode, newNodes, isSilent) {
+ if (!newNodes) return null;
+ if (!parentNode) parentNode = null;
+ if (parentNode && !parentNode.isParent && setting.data.keep.leaf) return null;
+ var xNewNodes = tools.clone(tools.isArray(newNodes)? newNodes: [newNodes]);
+ function addCallback() {
+ view.addNodes(setting, parentNode, xNewNodes, (isSilent==true));
+ }
+
+ if (tools.canAsync(setting, parentNode)) {
+ view.asyncNode(setting, parentNode, isSilent, addCallback);
+ } else {
+ addCallback();
+ }
+ return xNewNodes;
+ },
+ cancelSelectedNode : function(node) {
+ view.cancelPreSelectedNode(setting, node);
+ },
+ destroy : function() {
+ view.destroy(setting);
+ },
+ expandAll : function(expandFlag) {
+ expandFlag = !!expandFlag;
+ view.expandCollapseSonNode(setting, null, expandFlag, true);
+ return expandFlag;
+ },
+ expandNode : function(node, expandFlag, sonSign, focus, callbackFlag) {
+ if (!node || !node.isParent) return null;
+ if (expandFlag !== true && expandFlag !== false) {
+ expandFlag = !node.open;
+ }
+ callbackFlag = !!callbackFlag;
+
+ if (callbackFlag && expandFlag && (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false)) {
+ return null;
+ } else if (callbackFlag && !expandFlag && (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false)) {
+ return null;
+ }
+ if (expandFlag && node.parentTId) {
+ view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, false);
+ }
+ if (expandFlag === node.open && !sonSign) {
+ return null;
+ }
+
+ data.getRoot(setting).expandTriggerFlag = callbackFlag;
+ if (!tools.canAsync(setting, node) && sonSign) {
+ view.expandCollapseSonNode(setting, node, expandFlag, true, function() {
+ if (focus !== false) {try{$$(node, setting).focus().blur();}catch(e){}}
+ });
+ } else {
+ node.open = !expandFlag;
+ view.switchNode(this.setting, node);
+ if (focus !== false) {try{$$(node, setting).focus().blur();}catch(e){}}
+ }
+ return expandFlag;
+ },
+ getNodes : function() {
+ return data.getNodes(setting);
+ },
+ getNodeByParam : function(key, value, parentNode) {
+ if (!key) return null;
+ return data.getNodeByParam(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value);
+ },
+ getNodeByTId : function(tId) {
+ return data.getNodeCache(setting, tId);
+ },
+ getNodesByParam : function(key, value, parentNode) {
+ if (!key) return null;
+ return data.getNodesByParam(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value);
+ },
+ getNodesByParamFuzzy : function(key, value, parentNode) {
+ if (!key) return null;
+ return data.getNodesByParamFuzzy(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value);
+ },
+ getNodesByFilter: function(filter, isSingle, parentNode, invokeParam) {
+ isSingle = !!isSingle;
+ if (!filter || (typeof filter != "function")) return (isSingle ? null : []);
+ return data.getNodesByFilter(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), filter, isSingle, invokeParam);
+ },
+ getNodeIndex : function(node) {
+ if (!node) return null;
+ var childKey = setting.data.key.children,
+ parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting);
+ for (var i=0, l = parentNode[childKey].length; i < l; i++) {
+ if (parentNode[childKey][i] == node) return i;
+ }
+ return -1;
+ },
+ getSelectedNodes : function() {
+ var r = [], list = data.getRoot(setting).curSelectedList;
+ for (var i=0, l=list.length; i<l; i++) {
+ r.push(list[i]);
+ }
+ return r;
+ },
+ isSelectedNode : function(node) {
+ return data.isSelectedNode(setting, node);
+ },
+ reAsyncChildNodes : function(parentNode, reloadType, isSilent) {
+ if (!this.setting.async.enable) return;
+ var isRoot = !parentNode;
+ if (isRoot) {
+ parentNode = data.getRoot(setting);
+ }
+ if (reloadType=="refresh") {
+ var childKey = this.setting.data.key.children;
+ for (var i = 0, l = parentNode[childKey] ? parentNode[childKey].length : 0; i < l; i++) {
+ data.removeNodeCache(setting, parentNode[childKey][i]);
+ }
+ data.removeSelectedNode(setting);
+ parentNode[childKey] = [];
+ if (isRoot) {
+ this.setting.treeObj.empty();
+ } else {
+ var ulObj = $$(parentNode, consts.id.UL, setting);
+ ulObj.empty();
+ }
+ }
+ view.asyncNode(this.setting, isRoot? null:parentNode, !!isSilent);
+ },
+ refresh : function() {
+ this.setting.treeObj.empty();
+ var root = data.getRoot(setting),
+ nodes = root[setting.data.key.children]
+ data.initRoot(setting);
+ root[setting.data.key.children] = nodes
+ data.initCache(setting);
+ view.createNodes(setting, 0, root[setting.data.key.children]);
+ },
+ removeChildNodes : function(node) {
+ if (!node) return null;
+ var childKey = setting.data.key.children,
+ nodes = node[childKey];
+ view.removeChildNodes(setting, node);
+ return nodes ? nodes : null;
+ },
+ removeNode : function(node, callbackFlag) {
+ if (!node) return;
+ callbackFlag = !!callbackFlag;
+ if (callbackFlag && tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return;
+ view.removeNode(setting, node);
+ if (callbackFlag) {
+ this.setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]);
+ }
+ },
+ selectNode : function(node, addFlag) {
+ if (!node) return;
+ if (tools.uCanDo(setting)) {
+ addFlag = setting.view.selectedMulti && addFlag;
+ if (node.parentTId) {
+ view.expandCollapseParentNode(setting, node.getParentNode(), true, false, function() {
+ try{$$(node, setting).focus().blur();}catch(e){}
+ });
+ } else {
+ try{$$(node, setting).focus().blur();}catch(e){}
+ }
+ view.selectNode(setting, node, addFlag);
+ }
+ },
+ transformTozTreeNodes : function(simpleNodes) {
+ return data.transformTozTreeFormat(setting, simpleNodes);
+ },
+ transformToArray : function(nodes) {
+ return data.transformToArrayFormat(setting, nodes);
+ },
+ updateNode : function(node, checkTypeFlag) {
+ if (!node) return;
+ var nObj = $$(node, setting);
+ if (nObj.get(0) && tools.uCanDo(setting)) {
+ view.setNodeName(setting, node);
+ view.setNodeTarget(setting, node);
+ view.setNodeUrl(setting, node);
+ view.setNodeLineIcos(setting, node);
+ view.setNodeFontCss(setting, node);
+ }
+ }
+ }
+ root.treeTools = zTreeTools;
+ data.setZTreeTools(setting, zTreeTools);
+
+ if (root[childKey] && root[childKey].length > 0) {
+ view.createNodes(setting, 0, root[childKey]);
+ } else if (setting.async.enable && setting.async.url && setting.async.url !== '') {
+ view.asyncNode(setting);
+ }
+ return zTreeTools;
+ }
+ };
+
+ var zt = $.fn.zTree,
+ $$ = tools.$,
+ consts = zt.consts;
+})(jQuery); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.core.min.js b/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.core.min.js
new file mode 100644
index 0000000..705bdb4
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.core.min.js
@@ -0,0 +1,69 @@
+/*
+ * JQuery zTree core v3.5.16
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2014-03-09
+ */
+(function(p){var G,H,I,J,K,L,r={},u={},v={},M={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{children:"children",name:"name",title:"",url:"url"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",url:"",autoParam:[],
+otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},w=[function(b){var a=b.treeObj,c=e.event;a.bind(c.NODECREATED,function(a,c,g){j.apply(b.callback.onNodeCreated,
+[a,c,g])});a.bind(c.CLICK,function(a,c,g,l,h){j.apply(b.callback.onClick,[c,g,l,h])});a.bind(c.EXPAND,function(a,c,g){j.apply(b.callback.onExpand,[a,c,g])});a.bind(c.COLLAPSE,function(a,c,g){j.apply(b.callback.onCollapse,[a,c,g])});a.bind(c.ASYNC_SUCCESS,function(a,c,g,l){j.apply(b.callback.onAsyncSuccess,[a,c,g,l])});a.bind(c.ASYNC_ERROR,function(a,c,g,l,h,e){j.apply(b.callback.onAsyncError,[a,c,g,l,h,e])});a.bind(c.REMOVE,function(a,c,g){j.apply(b.callback.onRemove,[a,c,g])})}],x=[function(b){var a=
+e.event;b.treeObj.unbind(a.NODECREATED).unbind(a.CLICK).unbind(a.EXPAND).unbind(a.COLLAPSE).unbind(a.ASYNC_SUCCESS).unbind(a.ASYNC_ERROR).unbind(a.REMOVE)}],y=[function(b){var a=h.getCache(b);a||(a={},h.setCache(b,a));a.nodes=[];a.doms=[]}],z=[function(b,a,c,d,f,g){if(c){var l=h.getRoot(b),e=b.data.key.children;c.level=a;c.tId=b.treeId+"_"+ ++l.zId;c.parentTId=d?d.tId:null;c.open=typeof c.open=="string"?j.eqs(c.open,"true"):!!c.open;c[e]&&c[e].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent=typeof c.isParent==
+"string"?j.eqs(c.isParent,"true"):!!c.isParent,c.open=c.isParent&&!b.async.enable?c.open:!1,c.zAsync=!c.isParent);c.isFirstNode=f;c.isLastNode=g;c.getParentNode=function(){return h.getNodeCache(b,c.parentTId)};c.getPreNode=function(){return h.getPreNode(b,c)};c.getNextNode=function(){return h.getNextNode(b,c)};c.isAjaxing=!1;h.fixPIdKeyValue(b,c)}}],s=[function(b){var a=b.target,c=h.getSetting(b.data.treeId),d="",f=null,g="",l="",i=null,n=null,k=null;if(j.eqs(b.type,"mousedown"))l="mousedown";else if(j.eqs(b.type,
+"mouseup"))l="mouseup";else if(j.eqs(b.type,"contextmenu"))l="contextmenu";else if(j.eqs(b.type,"click"))if(j.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+e.id.SWITCH)!==null)d=j.getNodeMainDom(a).id,g="switchNode";else{if(k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}]))d=j.getNodeMainDom(k).id,g="clickNode"}else if(j.eqs(b.type,"dblclick")&&(l="dblclick",k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}])))d=j.getNodeMainDom(k).id,g="switchNode";if(l.length>0&&d.length==0&&
+(k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}])))d=j.getNodeMainDom(k).id;if(d.length>0)switch(f=h.getNodeCache(c,d),g){case "switchNode":f.isParent?j.eqs(b.type,"click")||j.eqs(b.type,"dblclick")&&j.apply(c.view.dblClickExpand,[c.treeId,f],c.view.dblClickExpand)?i=G:g="":g="";break;case "clickNode":i=H}switch(l){case "mousedown":n=I;break;case "mouseup":n=J;break;case "dblclick":n=K;break;case "contextmenu":n=L}return{stop:!1,node:f,nodeEventType:g,nodeEventCallback:i,treeEventType:l,
+treeEventCallback:n}}],A=[function(b){var a=h.getRoot(b);a||(a={},h.setRoot(b,a));a[b.data.key.children]=[];a.expandTriggerFlag=!1;a.curSelectedList=[];a.noSelection=!0;a.createdNodes=[];a.zId=0;a._ver=(new Date).getTime()}],B=[],C=[],D=[],E=[],F=[],h={addNodeCache:function(b,a){h.getCache(b).nodes[h.getNodeCacheId(a.tId)]=a},getNodeCacheId:function(b){return b.substring(b.lastIndexOf("_")+1)},addAfterA:function(b){C.push(b)},addBeforeA:function(b){B.push(b)},addInnerAfterA:function(b){E.push(b)},
+addInnerBeforeA:function(b){D.push(b)},addInitBind:function(b){w.push(b)},addInitUnBind:function(b){x.push(b)},addInitCache:function(b){y.push(b)},addInitNode:function(b){z.push(b)},addInitProxy:function(b,a){a?s.splice(0,0,b):s.push(b)},addInitRoot:function(b){A.push(b)},addNodesData:function(b,a,c){var d=b.data.key.children;a[d]||(a[d]=[]);if(a[d].length>0)a[d][a[d].length-1].isLastNode=!1,i.setNodeLineIcos(b,a[d][a[d].length-1]);a.isParent=!0;a[d]=a[d].concat(c)},addSelectedNode:function(b,a){var c=
+h.getRoot(b);h.isSelectedNode(b,a)||c.curSelectedList.push(a)},addCreatedNode:function(b,a){(b.callback.onNodeCreated||b.view.addDiyDom)&&h.getRoot(b).createdNodes.push(a)},addZTreeTools:function(b){F.push(b)},exSetting:function(b){p.extend(!0,M,b)},fixPIdKeyValue:function(b,a){b.data.simpleData.enable&&(a[b.data.simpleData.pIdKey]=a.parentTId?a.getParentNode()[b.data.simpleData.idKey]:b.data.simpleData.rootPId)},getAfterA:function(b,a,c){for(var d=0,f=C.length;d<f;d++)C[d].apply(this,arguments)},
+getBeforeA:function(b,a,c){for(var d=0,f=B.length;d<f;d++)B[d].apply(this,arguments)},getInnerAfterA:function(b,a,c){for(var d=0,f=E.length;d<f;d++)E[d].apply(this,arguments)},getInnerBeforeA:function(b,a,c){for(var d=0,f=D.length;d<f;d++)D[d].apply(this,arguments)},getCache:function(b){return v[b.treeId]},getNextNode:function(b,a){if(!a)return null;for(var c=b.data.key.children,d=a.parentTId?a.getParentNode():h.getRoot(b),f=0,g=d[c].length-1;f<=g;f++)if(d[c][f]===a)return f==g?null:d[c][f+1];return null},
+getNodeByParam:function(b,a,c,d){if(!a||!c)return null;for(var f=b.data.key.children,g=0,l=a.length;g<l;g++){if(a[g][c]==d)return a[g];var e=h.getNodeByParam(b,a[g][f],c,d);if(e)return e}return null},getNodeCache:function(b,a){if(!a)return null;var c=v[b.treeId].nodes[h.getNodeCacheId(a)];return c?c:null},getNodeName:function(b,a){return""+a[b.data.key.name]},getNodeTitle:function(b,a){return""+a[b.data.key.title===""?b.data.key.name:b.data.key.title]},getNodes:function(b){return h.getRoot(b)[b.data.key.children]},
+getNodesByParam:function(b,a,c,d){if(!a||!c)return[];for(var f=b.data.key.children,g=[],l=0,e=a.length;l<e;l++)a[l][c]==d&&g.push(a[l]),g=g.concat(h.getNodesByParam(b,a[l][f],c,d));return g},getNodesByParamFuzzy:function(b,a,c,d){if(!a||!c)return[];for(var f=b.data.key.children,g=[],d=d.toLowerCase(),l=0,e=a.length;l<e;l++)typeof a[l][c]=="string"&&a[l][c].toLowerCase().indexOf(d)>-1&&g.push(a[l]),g=g.concat(h.getNodesByParamFuzzy(b,a[l][f],c,d));return g},getNodesByFilter:function(b,a,c,d,f){if(!a)return d?
+null:[];for(var g=b.data.key.children,e=d?null:[],i=0,n=a.length;i<n;i++){if(j.apply(c,[a[i],f],!1)){if(d)return a[i];e.push(a[i])}var k=h.getNodesByFilter(b,a[i][g],c,d,f);if(d&&k)return k;e=d?k:e.concat(k)}return e},getPreNode:function(b,a){if(!a)return null;for(var c=b.data.key.children,d=a.parentTId?a.getParentNode():h.getRoot(b),f=0,g=d[c].length;f<g;f++)if(d[c][f]===a)return f==0?null:d[c][f-1];return null},getRoot:function(b){return b?u[b.treeId]:null},getRoots:function(){return u},getSetting:function(b){return r[b]},
+getSettings:function(){return r},getZTreeTools:function(b){return(b=this.getRoot(this.getSetting(b)))?b.treeTools:null},initCache:function(b){for(var a=0,c=y.length;a<c;a++)y[a].apply(this,arguments)},initNode:function(b,a,c,d,f,g){for(var e=0,h=z.length;e<h;e++)z[e].apply(this,arguments)},initRoot:function(b){for(var a=0,c=A.length;a<c;a++)A[a].apply(this,arguments)},isSelectedNode:function(b,a){for(var c=h.getRoot(b),d=0,f=c.curSelectedList.length;d<f;d++)if(a===c.curSelectedList[d])return!0;return!1},
+removeNodeCache:function(b,a){var c=b.data.key.children;if(a[c])for(var d=0,f=a[c].length;d<f;d++)arguments.callee(b,a[c][d]);h.getCache(b).nodes[h.getNodeCacheId(a.tId)]=null},removeSelectedNode:function(b,a){for(var c=h.getRoot(b),d=0,f=c.curSelectedList.length;d<f;d++)if(a===c.curSelectedList[d]||!h.getNodeCache(b,c.curSelectedList[d].tId))c.curSelectedList.splice(d,1),d--,f--},setCache:function(b,a){v[b.treeId]=a},setRoot:function(b,a){u[b.treeId]=a},setZTreeTools:function(b,a){for(var c=0,d=
+F.length;c<d;c++)F[c].apply(this,arguments)},transformToArrayFormat:function(b,a){if(!a)return[];var c=b.data.key.children,d=[];if(j.isArray(a))for(var f=0,g=a.length;f<g;f++)d.push(a[f]),a[f][c]&&(d=d.concat(h.transformToArrayFormat(b,a[f][c])));else d.push(a),a[c]&&(d=d.concat(h.transformToArrayFormat(b,a[c])));return d},transformTozTreeFormat:function(b,a){var c,d,f=b.data.simpleData.idKey,g=b.data.simpleData.pIdKey,e=b.data.key.children;if(!f||f==""||!a)return[];if(j.isArray(a)){var h=[],i=[];
+for(c=0,d=a.length;c<d;c++)i[a[c][f]]=a[c];for(c=0,d=a.length;c<d;c++)i[a[c][g]]&&a[c][f]!=a[c][g]?(i[a[c][g]][e]||(i[a[c][g]][e]=[]),i[a[c][g]][e].push(a[c])):h.push(a[c]);return h}else return[a]}},m={bindEvent:function(b){for(var a=0,c=w.length;a<c;a++)w[a].apply(this,arguments)},unbindEvent:function(b){for(var a=0,c=x.length;a<c;a++)x[a].apply(this,arguments)},bindTree:function(b){var a={treeId:b.treeId},c=b.treeObj;b.view.txtSelectedEnable||c.bind("selectstart",function(a){a=a.originalEvent.srcElement.nodeName.toLowerCase();
+return a==="input"||a==="textarea"}).css({"-moz-user-select":"-moz-none"});c.bind("click",a,m.proxy);c.bind("dblclick",a,m.proxy);c.bind("mouseover",a,m.proxy);c.bind("mouseout",a,m.proxy);c.bind("mousedown",a,m.proxy);c.bind("mouseup",a,m.proxy);c.bind("contextmenu",a,m.proxy)},unbindTree:function(b){b.treeObj.unbind("click",m.proxy).unbind("dblclick",m.proxy).unbind("mouseover",m.proxy).unbind("mouseout",m.proxy).unbind("mousedown",m.proxy).unbind("mouseup",m.proxy).unbind("contextmenu",m.proxy)},
+doProxy:function(b){for(var a=[],c=0,d=s.length;c<d;c++){var f=s[c].apply(this,arguments);a.push(f);if(f.stop)break}return a},proxy:function(b){var a=h.getSetting(b.data.treeId);if(!j.uCanDo(a,b))return!0;for(var a=m.doProxy(b),c=!0,d=0,f=a.length;d<f;d++){var g=a[d];g.nodeEventCallback&&(c=g.nodeEventCallback.apply(g,[b,g.node])&&c);g.treeEventCallback&&(c=g.treeEventCallback.apply(g,[b,g.node])&&c)}return c}};G=function(b,a){var c=h.getSetting(b.data.treeId);if(a.open){if(j.apply(c.callback.beforeCollapse,
+[c.treeId,a],!0)==!1)return!0}else if(j.apply(c.callback.beforeExpand,[c.treeId,a],!0)==!1)return!0;h.getRoot(c).expandTriggerFlag=!0;i.switchNode(c,a);return!0};H=function(b,a){var c=h.getSetting(b.data.treeId),d=c.view.autoCancelSelected&&(b.ctrlKey||b.metaKey)&&h.isSelectedNode(c,a)?0:c.view.autoCancelSelected&&(b.ctrlKey||b.metaKey)&&c.view.selectedMulti?2:1;if(j.apply(c.callback.beforeClick,[c.treeId,a,d],!0)==!1)return!0;d===0?i.cancelPreSelectedNode(c,a):i.selectNode(c,a,d===2);c.treeObj.trigger(e.event.CLICK,
+[b,c.treeId,a,d]);return!0};I=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeMouseDown,[c.treeId,a],!0)&&j.apply(c.callback.onMouseDown,[b,c.treeId,a]);return!0};J=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeMouseUp,[c.treeId,a],!0)&&j.apply(c.callback.onMouseUp,[b,c.treeId,a]);return!0};K=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeDblClick,[c.treeId,a],!0)&&j.apply(c.callback.onDblClick,[b,c.treeId,a]);return!0};
+L=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeRightClick,[c.treeId,a],!0)&&j.apply(c.callback.onRightClick,[b,c.treeId,a]);return typeof c.callback.onRightClick!="function"};var j={apply:function(b,a,c){return typeof b=="function"?b.apply(N,a?a:[]):c},canAsync:function(b,a){var c=b.data.key.children;return b.async.enable&&a&&a.isParent&&!(a.zAsync||a[c]&&a[c].length>0)},clone:function(b){if(b===null)return null;var a=j.isArray(b)?[]:{},c;for(c in b)a[c]=b[c]instanceof
+Date?new Date(b[c].getTime()):typeof b[c]==="object"?arguments.callee(b[c]):b[c];return a},eqs:function(b,a){return b.toLowerCase()===a.toLowerCase()},isArray:function(b){return Object.prototype.toString.apply(b)==="[object Array]"},$:function(b,a,c){a&&typeof a!="string"&&(c=a,a="");return typeof b=="string"?p(b,c?c.treeObj.get(0).ownerDocument:null):p("#"+b.tId+a,c?c.treeObj:null)},getMDom:function(b,a,c){if(!a)return null;for(;a&&a.id!==b.treeId;){for(var d=0,f=c.length;a.tagName&&d<f;d++)if(j.eqs(a.tagName,
+c[d].tagName)&&a.getAttribute(c[d].attrName)!==null)return a;a=a.parentNode}return null},getNodeMainDom:function(b){return p(b).parent("li").get(0)||p(b).parentsUntil("li").parent().get(0)},isChildOrSelf:function(b,a){return p(b).closest("#"+a).length>0},uCanDo:function(){return!0}},i={addNodes:function(b,a,c,d){if(!b.data.keep.leaf||!a||a.isParent)if(j.isArray(c)||(c=[c]),b.data.simpleData.enable&&(c=h.transformTozTreeFormat(b,c)),a){var f=k(a,e.id.SWITCH,b),g=k(a,e.id.ICON,b),l=k(a,e.id.UL,b);if(!a.open)i.replaceSwitchClass(a,
+f,e.folder.CLOSE),i.replaceIcoClass(a,g,e.folder.CLOSE),a.open=!1,l.css({display:"none"});h.addNodesData(b,a,c);i.createNodes(b,a.level+1,c,a);d||i.expandCollapseParentNode(b,a,!0)}else h.addNodesData(b,h.getRoot(b),c),i.createNodes(b,0,c,null)},appendNodes:function(b,a,c,d,f,g){if(!c)return[];for(var e=[],j=b.data.key.children,k=0,m=c.length;k<m;k++){var o=c[k];if(f){var t=(d?d:h.getRoot(b))[j].length==c.length&&k==0;h.initNode(b,a,o,d,t,k==c.length-1,g);h.addNodeCache(b,o)}t=[];o[j]&&o[j].length>
+0&&(t=i.appendNodes(b,a+1,o[j],o,f,g&&o.open));g&&(i.makeDOMNodeMainBefore(e,b,o),i.makeDOMNodeLine(e,b,o),h.getBeforeA(b,o,e),i.makeDOMNodeNameBefore(e,b,o),h.getInnerBeforeA(b,o,e),i.makeDOMNodeIcon(e,b,o),h.getInnerAfterA(b,o,e),i.makeDOMNodeNameAfter(e,b,o),h.getAfterA(b,o,e),o.isParent&&o.open&&i.makeUlHtml(b,o,e,t.join("")),i.makeDOMNodeMainAfter(e,b,o),h.addCreatedNode(b,o))}return e},appendParentULDom:function(b,a){var c=[],d=k(a,b);!d.get(0)&&a.parentTId&&(i.appendParentULDom(b,a.getParentNode()),
+d=k(a,b));var f=k(a,e.id.UL,b);f.get(0)&&f.remove();f=i.appendNodes(b,a.level+1,a[b.data.key.children],a,!1,!0);i.makeUlHtml(b,a,c,f.join(""));d.append(c.join(""))},asyncNode:function(b,a,c,d){var f,g;if(a&&!a.isParent)return j.apply(d),!1;else if(a&&a.isAjaxing)return!1;else if(j.apply(b.callback.beforeAsync,[b.treeId,a],!0)==!1)return j.apply(d),!1;if(a)a.isAjaxing=!0,k(a,e.id.ICON,b).attr({style:"","class":e.className.BUTTON+" "+e.className.ICO_LOADING});var l={};for(f=0,g=b.async.autoParam.length;a&&
+f<g;f++){var q=b.async.autoParam[f].split("="),n=q;q.length>1&&(n=q[1],q=q[0]);l[n]=a[q]}if(j.isArray(b.async.otherParam))for(f=0,g=b.async.otherParam.length;f<g;f+=2)l[b.async.otherParam[f]]=b.async.otherParam[f+1];else for(var m in b.async.otherParam)l[m]=b.async.otherParam[m];var o=h.getRoot(b)._ver;p.ajax({contentType:b.async.contentType,type:b.async.type,url:j.apply(b.async.url,[b.treeId,a],b.async.url),data:l,dataType:b.async.dataType,success:function(f){if(o==h.getRoot(b)._ver){var g=[];try{g=
+!f||f.length==0?[]:typeof f=="string"?eval("("+f+")"):f}catch(l){g=f}if(a)a.isAjaxing=null,a.zAsync=!0;i.setNodeLineIcos(b,a);g&&g!==""?(g=j.apply(b.async.dataFilter,[b.treeId,a,g],g),i.addNodes(b,a,g?j.clone(g):[],!!c)):i.addNodes(b,a,[],!!c);b.treeObj.trigger(e.event.ASYNC_SUCCESS,[b.treeId,a,f]);j.apply(d)}},error:function(c,d,f){if(o==h.getRoot(b)._ver){if(a)a.isAjaxing=null;i.setNodeLineIcos(b,a);b.treeObj.trigger(e.event.ASYNC_ERROR,[b.treeId,a,c,d,f])}}});return!0},cancelPreSelectedNode:function(b,
+a){for(var c=h.getRoot(b).curSelectedList,d=c.length-1;d>=0;d--)if(!a||a===c[d])if(k(c[d],e.id.A,b).removeClass(e.node.CURSELECTED),a){h.removeSelectedNode(b,a);break}if(!a)h.getRoot(b).curSelectedList=[]},createNodeCallback:function(b){if(b.callback.onNodeCreated||b.view.addDiyDom)for(var a=h.getRoot(b);a.createdNodes.length>0;){var c=a.createdNodes.shift();j.apply(b.view.addDiyDom,[b.treeId,c]);b.callback.onNodeCreated&&b.treeObj.trigger(e.event.NODECREATED,[b.treeId,c])}},createNodes:function(b,
+a,c,d){if(c&&c.length!=0){var f=h.getRoot(b),g=b.data.key.children,g=!d||d.open||!!k(d[g][0],b).get(0);f.createdNodes=[];a=i.appendNodes(b,a,c,d,!0,g);d?(d=k(d,e.id.UL,b),d.get(0)&&d.append(a.join(""))):b.treeObj.append(a.join(""));i.createNodeCallback(b)}},destroy:function(b){b&&(h.initCache(b),h.initRoot(b),m.unbindTree(b),m.unbindEvent(b),b.treeObj.empty(),delete r[b.treeId])},expandCollapseNode:function(b,a,c,d,f){var g=h.getRoot(b),l=b.data.key.children;if(a){if(g.expandTriggerFlag){var q=f,
+f=function(){q&&q();a.open?b.treeObj.trigger(e.event.EXPAND,[b.treeId,a]):b.treeObj.trigger(e.event.COLLAPSE,[b.treeId,a])};g.expandTriggerFlag=!1}if(!a.open&&a.isParent&&(!k(a,e.id.UL,b).get(0)||a[l]&&a[l].length>0&&!k(a[l][0],b).get(0)))i.appendParentULDom(b,a),i.createNodeCallback(b);if(a.open==c)j.apply(f,[]);else{var c=k(a,e.id.UL,b),g=k(a,e.id.SWITCH,b),n=k(a,e.id.ICON,b);a.isParent?(a.open=!a.open,a.iconOpen&&a.iconClose&&n.attr("style",i.makeNodeIcoStyle(b,a)),a.open?(i.replaceSwitchClass(a,
+g,e.folder.OPEN),i.replaceIcoClass(a,n,e.folder.OPEN),d==!1||b.view.expandSpeed==""?(c.show(),j.apply(f,[])):a[l]&&a[l].length>0?c.slideDown(b.view.expandSpeed,f):(c.show(),j.apply(f,[]))):(i.replaceSwitchClass(a,g,e.folder.CLOSE),i.replaceIcoClass(a,n,e.folder.CLOSE),d==!1||b.view.expandSpeed==""||!(a[l]&&a[l].length>0)?(c.hide(),j.apply(f,[])):c.slideUp(b.view.expandSpeed,f))):j.apply(f,[])}}else j.apply(f,[])},expandCollapseParentNode:function(b,a,c,d,f){a&&(a.parentTId?(i.expandCollapseNode(b,
+a,c,d),a.parentTId&&i.expandCollapseParentNode(b,a.getParentNode(),c,d,f)):i.expandCollapseNode(b,a,c,d,f))},expandCollapseSonNode:function(b,a,c,d,f){var g=h.getRoot(b),e=b.data.key.children,g=a?a[e]:g[e],e=a?!1:d,j=h.getRoot(b).expandTriggerFlag;h.getRoot(b).expandTriggerFlag=!1;if(g)for(var k=0,m=g.length;k<m;k++)g[k]&&i.expandCollapseSonNode(b,g[k],c,e);h.getRoot(b).expandTriggerFlag=j;i.expandCollapseNode(b,a,c,d,f)},makeDOMNodeIcon:function(b,a,c){var d=h.getNodeName(a,c),d=a.view.nameIsHTML?
+d:d.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");b.push("<span id='",c.tId,e.id.ICON,"' title='' treeNode",e.id.ICON," class='",i.makeNodeIcoClass(a,c),"' style='",i.makeNodeIcoStyle(a,c),"'></span><span id='",c.tId,e.id.SPAN,"'>",d,"</span>")},makeDOMNodeLine:function(b,a,c){b.push("<span id='",c.tId,e.id.SWITCH,"' title='' class='",i.makeNodeLineClass(a,c),"' treeNode",e.id.SWITCH,"></span>")},makeDOMNodeMainAfter:function(b){b.push("</li>")},makeDOMNodeMainBefore:function(b,
+a,c){b.push("<li id='",c.tId,"' class='",e.className.LEVEL,c.level,"' tabindex='0' hidefocus='true' treenode>")},makeDOMNodeNameAfter:function(b){b.push("</a>")},makeDOMNodeNameBefore:function(b,a,c){var d=h.getNodeTitle(a,c),f=i.makeNodeUrl(a,c),g=i.makeNodeFontCss(a,c),l=[],k;for(k in g)l.push(k,":",g[k],";");b.push("<a id='",c.tId,e.id.A,"' class='",e.className.LEVEL,c.level,"' treeNode",e.id.A,' onclick="',c.click||"",'" ',f!=null&&f.length>0?"href='"+f+"'":""," target='",i.makeNodeTarget(c),
+"' style='",l.join(""),"'");j.apply(a.view.showTitle,[a.treeId,c],a.view.showTitle)&&d&&b.push("title='",d.replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"'");b.push(">")},makeNodeFontCss:function(b,a){var c=j.apply(b.view.fontCss,[b.treeId,a],b.view.fontCss);return c&&typeof c!="function"?c:{}},makeNodeIcoClass:function(b,a){var c=["ico"];a.isAjaxing||(c[0]=(a.iconSkin?a.iconSkin+"_":"")+c[0],a.isParent?c.push(a.open?e.folder.OPEN:e.folder.CLOSE):c.push(e.folder.DOCU));return e.className.BUTTON+
+" "+c.join("_")},makeNodeIcoStyle:function(b,a){var c=[];if(!a.isAjaxing){var d=a.isParent&&a.iconOpen&&a.iconClose?a.open?a.iconOpen:a.iconClose:a.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;");(b.view.showIcon==!1||!j.apply(b.view.showIcon,[b.treeId,a],!0))&&c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(b,a){var c=[];b.view.showLine?a.level==0&&a.isFirstNode&&a.isLastNode?c.push(e.line.ROOT):a.level==0&&a.isFirstNode?c.push(e.line.ROOTS):a.isLastNode?c.push(e.line.BOTTOM):
+c.push(e.line.CENTER):c.push(e.line.NOLINE);a.isParent?c.push(a.open?e.folder.OPEN:e.folder.CLOSE):c.push(e.folder.DOCU);return i.makeNodeLineClassEx(a)+c.join("_")},makeNodeLineClassEx:function(b){return e.className.BUTTON+" "+e.className.LEVEL+b.level+" "+e.className.SWITCH+" "},makeNodeTarget:function(b){return b.target||"_blank"},makeNodeUrl:function(b,a){var c=b.data.key.url;return a[c]?a[c]:null},makeUlHtml:function(b,a,c,d){c.push("<ul id='",a.tId,e.id.UL,"' class='",e.className.LEVEL,a.level,
+" ",i.makeUlLineClass(b,a),"' style='display:",a.open?"block":"none","'>");c.push(d);c.push("</ul>")},makeUlLineClass:function(b,a){return b.view.showLine&&!a.isLastNode?e.line.LINE:""},removeChildNodes:function(b,a){if(a){var c=b.data.key.children,d=a[c];if(d){for(var f=0,g=d.length;f<g;f++)h.removeNodeCache(b,d[f]);h.removeSelectedNode(b);delete a[c];b.data.keep.parent?k(a,e.id.UL,b).empty():(a.isParent=!1,a.open=!1,c=k(a,e.id.SWITCH,b),d=k(a,e.id.ICON,b),i.replaceSwitchClass(a,c,e.folder.DOCU),
+i.replaceIcoClass(a,d,e.folder.DOCU),k(a,e.id.UL,b).remove())}}},setFirstNode:function(b,a){var c=b.data.key.children;if(a[c].length>0)a[c][0].isFirstNode=!0},setLastNode:function(b,a){var c=b.data.key.children,d=a[c].length;if(d>0)a[c][d-1].isLastNode=!0},removeNode:function(b,a){var c=h.getRoot(b),d=b.data.key.children,f=a.parentTId?a.getParentNode():c;a.isFirstNode=!1;a.isLastNode=!1;a.getPreNode=function(){return null};a.getNextNode=function(){return null};if(h.getNodeCache(b,a.tId)){k(a,b).remove();
+h.removeNodeCache(b,a);h.removeSelectedNode(b,a);for(var g=0,l=f[d].length;g<l;g++)if(f[d][g].tId==a.tId){f[d].splice(g,1);break}i.setFirstNode(b,f);i.setLastNode(b,f);var j,g=f[d].length;if(!b.data.keep.parent&&g==0)f.isParent=!1,f.open=!1,g=k(f,e.id.UL,b),l=k(f,e.id.SWITCH,b),j=k(f,e.id.ICON,b),i.replaceSwitchClass(f,l,e.folder.DOCU),i.replaceIcoClass(f,j,e.folder.DOCU),g.css("display","none");else if(b.view.showLine&&g>0){var n=f[d][g-1],g=k(n,e.id.UL,b),l=k(n,e.id.SWITCH,b);j=k(n,e.id.ICON,b);
+f==c?f[d].length==1?i.replaceSwitchClass(n,l,e.line.ROOT):(c=k(f[d][0],e.id.SWITCH,b),i.replaceSwitchClass(f[d][0],c,e.line.ROOTS),i.replaceSwitchClass(n,l,e.line.BOTTOM)):i.replaceSwitchClass(n,l,e.line.BOTTOM);g.removeClass(e.line.LINE)}}},replaceIcoClass:function(b,a,c){if(a&&!b.isAjaxing&&(b=a.attr("class"),b!=void 0)){b=b.split("_");switch(c){case e.folder.OPEN:case e.folder.CLOSE:case e.folder.DOCU:b[b.length-1]=c}a.attr("class",b.join("_"))}},replaceSwitchClass:function(b,a,c){if(a){var d=
+a.attr("class");if(d!=void 0){d=d.split("_");switch(c){case e.line.ROOT:case e.line.ROOTS:case e.line.CENTER:case e.line.BOTTOM:case e.line.NOLINE:d[0]=i.makeNodeLineClassEx(b)+c;break;case e.folder.OPEN:case e.folder.CLOSE:case e.folder.DOCU:d[1]=c}a.attr("class",d.join("_"));c!==e.folder.DOCU?a.removeAttr("disabled"):a.attr("disabled","disabled")}}},selectNode:function(b,a,c){c||i.cancelPreSelectedNode(b);k(a,e.id.A,b).addClass(e.node.CURSELECTED);h.addSelectedNode(b,a)},setNodeFontCss:function(b,
+a){var c=k(a,e.id.A,b),d=i.makeNodeFontCss(b,a);d&&c.css(d)},setNodeLineIcos:function(b,a){if(a){var c=k(a,e.id.SWITCH,b),d=k(a,e.id.UL,b),f=k(a,e.id.ICON,b),g=i.makeUlLineClass(b,a);g.length==0?d.removeClass(e.line.LINE):d.addClass(g);c.attr("class",i.makeNodeLineClass(b,a));a.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled");f.removeAttr("style");f.attr("style",i.makeNodeIcoStyle(b,a));f.attr("class",i.makeNodeIcoClass(b,a))}},setNodeName:function(b,a){var c=h.getNodeTitle(b,a),d=
+k(a,e.id.SPAN,b);d.empty();b.view.nameIsHTML?d.html(h.getNodeName(b,a)):d.text(h.getNodeName(b,a));j.apply(b.view.showTitle,[b.treeId,a],b.view.showTitle)&&k(a,e.id.A,b).attr("title",!c?"":c)},setNodeTarget:function(b,a){k(a,e.id.A,b).attr("target",i.makeNodeTarget(a))},setNodeUrl:function(b,a){var c=k(a,e.id.A,b),d=i.makeNodeUrl(b,a);d==null||d.length==0?c.removeAttr("href"):c.attr("href",d)},switchNode:function(b,a){a.open||!j.canAsync(b,a)?i.expandCollapseNode(b,a,!a.open):b.async.enable?i.asyncNode(b,
+a)||i.expandCollapseNode(b,a,!a.open):a&&i.expandCollapseNode(b,a,!a.open)}};p.fn.zTree={consts:{className:{BUTTON:"button",LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch"},event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",
+NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_z:{tools:j,view:i,event:m,data:h},getZTreeObj:function(b){return(b=h.getZTreeTools(b))?b:null},destroy:function(b){if(b&&b.length>0)i.destroy(h.getSetting(b));else for(var a in r)i.destroy(r[a])},init:function(b,a,c){var d=j.clone(M);p.extend(!0,d,a);d.treeId=b.attr("id");d.treeObj=b;d.treeObj.empty();r[d.treeId]=d;if(typeof document.body.style.maxHeight==="undefined")d.view.expandSpeed=
+"";h.initRoot(d);b=h.getRoot(d);a=d.data.key.children;c=c?j.clone(j.isArray(c)?c:[c]):[];b[a]=d.data.simpleData.enable?h.transformTozTreeFormat(d,c):c;h.initCache(d);m.unbindTree(d);m.bindTree(d);m.unbindEvent(d);m.bindEvent(d);c={setting:d,addNodes:function(a,b,c){function e(){i.addNodes(d,a,h,c==!0)}if(!b)return null;a||(a=null);if(a&&!a.isParent&&d.data.keep.leaf)return null;var h=j.clone(j.isArray(b)?b:[b]);j.canAsync(d,a)?i.asyncNode(d,a,c,e):e();return h},cancelSelectedNode:function(a){i.cancelPreSelectedNode(d,
+a)},destroy:function(){i.destroy(d)},expandAll:function(a){a=!!a;i.expandCollapseSonNode(d,null,a,!0);return a},expandNode:function(a,b,c,e,n){if(!a||!a.isParent)return null;b!==!0&&b!==!1&&(b=!a.open);if((n=!!n)&&b&&j.apply(d.callback.beforeExpand,[d.treeId,a],!0)==!1)return null;else if(n&&!b&&j.apply(d.callback.beforeCollapse,[d.treeId,a],!0)==!1)return null;b&&a.parentTId&&i.expandCollapseParentNode(d,a.getParentNode(),b,!1);if(b===a.open&&!c)return null;h.getRoot(d).expandTriggerFlag=n;if(!j.canAsync(d,
+a)&&c)i.expandCollapseSonNode(d,a,b,!0,function(){if(e!==!1)try{k(a,d).focus().blur()}catch(b){}});else if(a.open=!b,i.switchNode(this.setting,a),e!==!1)try{k(a,d).focus().blur()}catch(m){}return b},getNodes:function(){return h.getNodes(d)},getNodeByParam:function(a,b,c){return!a?null:h.getNodeByParam(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodeByTId:function(a){return h.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return!a?null:h.getNodesByParam(d,c?c[d.data.key.children]:h.getNodes(d),
+a,b)},getNodesByParamFuzzy:function(a,b,c){return!a?null:h.getNodesByParamFuzzy(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodesByFilter:function(a,b,c,e){b=!!b;return!a||typeof a!="function"?b?null:[]:h.getNodesByFilter(d,c?c[d.data.key.children]:h.getNodes(d),a,b,e)},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():h.getRoot(d),e=0,i=c[b].length;e<i;e++)if(c[b][e]==a)return e;return-1},getSelectedNodes:function(){for(var a=[],b=h.getRoot(d).curSelectedList,
+c=0,e=b.length;c<e;c++)a.push(b[c]);return a},isSelectedNode:function(a){return h.isSelectedNode(d,a)},reAsyncChildNodes:function(a,b,c){if(this.setting.async.enable){var j=!a;j&&(a=h.getRoot(d));if(b=="refresh"){for(var b=this.setting.data.key.children,m=0,p=a[b]?a[b].length:0;m<p;m++)h.removeNodeCache(d,a[b][m]);h.removeSelectedNode(d);a[b]=[];j?this.setting.treeObj.empty():k(a,e.id.UL,d).empty()}i.asyncNode(this.setting,j?null:a,!!c)}},refresh:function(){this.setting.treeObj.empty();var a=h.getRoot(d),
+b=a[d.data.key.children];h.initRoot(d);a[d.data.key.children]=b;h.initCache(d);i.createNodes(d,0,a[d.data.key.children])},removeChildNodes:function(a){if(!a)return null;var b=a[d.data.key.children];i.removeChildNodes(d,a);return b?b:null},removeNode:function(a,b){a&&(b=!!b,b&&j.apply(d.callback.beforeRemove,[d.treeId,a],!0)==!1||(i.removeNode(d,a),b&&this.setting.treeObj.trigger(e.event.REMOVE,[d.treeId,a])))},selectNode:function(a,b){if(a&&j.uCanDo(d)){b=d.view.selectedMulti&&b;if(a.parentTId)i.expandCollapseParentNode(d,
+a.getParentNode(),!0,!1,function(){try{k(a,d).focus().blur()}catch(b){}});else try{k(a,d).focus().blur()}catch(c){}i.selectNode(d,a,b)}},transformTozTreeNodes:function(a){return h.transformTozTreeFormat(d,a)},transformToArray:function(a){return h.transformToArrayFormat(d,a)},updateNode:function(a){a&&k(a,d).get(0)&&j.uCanDo(d)&&(i.setNodeName(d,a),i.setNodeTarget(d,a),i.setNodeUrl(d,a),i.setNodeLineIcos(d,a),i.setNodeFontCss(d,a))}};b.treeTools=c;h.setZTreeTools(d,c);b[a]&&b[a].length>0?i.createNodes(d,
+0,b[a]):d.async.enable&&d.async.url&&d.async.url!==""&&i.asyncNode(d);return c}};var N=p.fn.zTree,k=j.$,e=N.consts})(jQuery);
diff --git a/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.excheck.js b/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.excheck.js
new file mode 100644
index 0000000..1374c52
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.excheck.js
@@ -0,0 +1,629 @@
+/*
+ * JQuery zTree excheck v3.5.16
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2014-03-09
+ */
+(function($){
+ //default consts of excheck
+ var _consts = {
+ event: {
+ CHECK: "ztree_check"
+ },
+ id: {
+ CHECK: "_check"
+ },
+ checkbox: {
+ STYLE: "checkbox",
+ DEFAULT: "chk",
+ DISABLED: "disable",
+ FALSE: "false",
+ TRUE: "true",
+ FULL: "full",
+ PART: "part",
+ FOCUS: "focus"
+ },
+ radio: {
+ STYLE: "radio",
+ TYPE_ALL: "all",
+ TYPE_LEVEL: "level"
+ }
+ },
+ //default setting of excheck
+ _setting = {
+ check: {
+ enable: false,
+ autoCheckTrigger: false,
+ chkStyle: _consts.checkbox.STYLE,
+ nocheckInherit: false,
+ chkDisabledInherit: false,
+ radioType: _consts.radio.TYPE_LEVEL,
+ chkboxType: {
+ "Y": "ps",
+ "N": "ps"
+ }
+ },
+ data: {
+ key: {
+ checked: "checked"
+ }
+ },
+ callback: {
+ beforeCheck:null,
+ onCheck:null
+ }
+ },
+ //default root of excheck
+ _initRoot = function (setting) {
+ var r = data.getRoot(setting);
+ r.radioCheckedList = [];
+ },
+ //default cache of excheck
+ _initCache = function(treeId) {},
+ //default bind event of excheck
+ _bindEvent = function(setting) {
+ var o = setting.treeObj,
+ c = consts.event;
+ o.bind(c.CHECK, function (event, srcEvent, treeId, node) {
+ event.srcEvent = srcEvent;
+ tools.apply(setting.callback.onCheck, [event, treeId, node]);
+ });
+ },
+ _unbindEvent = function(setting) {
+ var o = setting.treeObj,
+ c = consts.event;
+ o.unbind(c.CHECK);
+ },
+ //default event proxy of excheck
+ _eventProxy = function(e) {
+ var target = e.target,
+ setting = data.getSetting(e.data.treeId),
+ tId = "", node = null,
+ nodeEventType = "", treeEventType = "",
+ nodeEventCallback = null, treeEventCallback = null;
+
+ if (tools.eqs(e.type, "mouseover")) {
+ if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
+ tId = tools.getNodeMainDom(target).id;
+ nodeEventType = "mouseoverCheck";
+ }
+ } else if (tools.eqs(e.type, "mouseout")) {
+ if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
+ tId = tools.getNodeMainDom(target).id;
+ nodeEventType = "mouseoutCheck";
+ }
+ } else if (tools.eqs(e.type, "click")) {
+ if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
+ tId = tools.getNodeMainDom(target).id;
+ nodeEventType = "checkNode";
+ }
+ }
+ if (tId.length>0) {
+ node = data.getNodeCache(setting, tId);
+ switch (nodeEventType) {
+ case "checkNode" :
+ nodeEventCallback = _handler.onCheckNode;
+ break;
+ case "mouseoverCheck" :
+ nodeEventCallback = _handler.onMouseoverCheck;
+ break;
+ case "mouseoutCheck" :
+ nodeEventCallback = _handler.onMouseoutCheck;
+ break;
+ }
+ }
+ var proxyResult = {
+ stop: nodeEventType === "checkNode",
+ node: node,
+ nodeEventType: nodeEventType,
+ nodeEventCallback: nodeEventCallback,
+ treeEventType: treeEventType,
+ treeEventCallback: treeEventCallback
+ };
+ return proxyResult
+ },
+ //default init node of excheck
+ _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
+ if (!n) return;
+ var checkedKey = setting.data.key.checked;
+ if (typeof n[checkedKey] == "string") n[checkedKey] = tools.eqs(n[checkedKey], "true");
+ n[checkedKey] = !!n[checkedKey];
+ n.checkedOld = n[checkedKey];
+ if (typeof n.nocheck == "string") n.nocheck = tools.eqs(n.nocheck, "true");
+ n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck);
+ if (typeof n.chkDisabled == "string") n.chkDisabled = tools.eqs(n.chkDisabled, "true");
+ n.chkDisabled = !!n.chkDisabled || (setting.check.chkDisabledInherit && parentNode && !!parentNode.chkDisabled);
+ if (typeof n.halfCheck == "string") n.halfCheck = tools.eqs(n.halfCheck, "true");
+ n.halfCheck = !!n.halfCheck;
+ n.check_Child_State = -1;
+ n.check_Focus = false;
+ n.getCheckStatus = function() {return data.getCheckStatus(setting, n);};
+
+ if (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && n[checkedKey] ) {
+ var r = data.getRoot(setting);
+ r.radioCheckedList.push(n);
+ }
+ },
+ //add dom for check
+ _beforeA = function(setting, node, html) {
+ var checkedKey = setting.data.key.checked;
+ if (setting.check.enable) {
+ data.makeChkFlag(setting, node);
+ html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true?" style='display:none;'":""),"></span>");
+ }
+ },
+ //update zTreeObj, add method of check
+ _zTreeTools = function(setting, zTreeTools) {
+ zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) {
+ var checkedKey = this.setting.data.key.checked;
+ if (node.chkDisabled === true) return;
+ if (checked !== true && checked !== false) {
+ checked = !node[checkedKey];
+ }
+ callbackFlag = !!callbackFlag;
+
+ if (node[checkedKey] === checked && !checkTypeFlag) {
+ return;
+ } else if (callbackFlag && tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) {
+ return;
+ }
+ if (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) {
+ node[checkedKey] = checked;
+ var checkObj = $$(node, consts.id.CHECK, this.setting);
+ if (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);
+ view.setChkClass(this.setting, checkObj, node);
+ view.repairParentChkClassWithSelf(this.setting, node);
+ if (callbackFlag) {
+ this.setting.treeObj.trigger(consts.event.CHECK, [null, this.setting.treeId, node]);
+ }
+ }
+ }
+
+ zTreeTools.checkAllNodes = function(checked) {
+ view.repairAllChk(this.setting, !!checked);
+ }
+
+ zTreeTools.getCheckedNodes = function(checked) {
+ var childKey = this.setting.data.key.children;
+ checked = (checked !== false);
+ return data.getTreeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey], checked);
+ }
+
+ zTreeTools.getChangeCheckedNodes = function() {
+ var childKey = this.setting.data.key.children;
+ return data.getTreeChangeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey]);
+ }
+
+ zTreeTools.setChkDisabled = function(node, disabled, inheritParent, inheritChildren) {
+ disabled = !!disabled;
+ inheritParent = !!inheritParent;
+ inheritChildren = !!inheritChildren;
+ view.repairSonChkDisabled(this.setting, node, disabled, inheritChildren);
+ view.repairParentChkDisabled(this.setting, node.getParentNode(), disabled, inheritParent);
+ }
+
+ var _updateNode = zTreeTools.updateNode;
+ zTreeTools.updateNode = function(node, checkTypeFlag) {
+ if (_updateNode) _updateNode.apply(zTreeTools, arguments);
+ if (!node || !this.setting.check.enable) return;
+ var nObj = $$(node, this.setting);
+ if (nObj.get(0) && tools.uCanDo(this.setting)) {
+ var checkObj = $$(node, consts.id.CHECK, this.setting);
+ if (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);
+ view.setChkClass(this.setting, checkObj, node);
+ view.repairParentChkClassWithSelf(this.setting, node);
+ }
+ }
+ },
+ //method of operate data
+ _data = {
+ getRadioCheckedList: function(setting) {
+ var checkedList = data.getRoot(setting).radioCheckedList;
+ for (var i=0, j=checkedList.length; i<j; i++) {
+ if(!data.getNodeCache(setting, checkedList[i].tId)) {
+ checkedList.splice(i, 1);
+ i--; j--;
+ }
+ }
+ return checkedList;
+ },
+ getCheckStatus: function(setting, node) {
+ if (!setting.check.enable || node.nocheck || node.chkDisabled) return null;
+ var checkedKey = setting.data.key.checked,
+ r = {
+ checked: node[checkedKey],
+ half: node.halfCheck ? node.halfCheck : (setting.check.chkStyle == consts.radio.STYLE ? (node.check_Child_State === 2) : (node[checkedKey] ? (node.check_Child_State > -1 && node.check_Child_State < 2) : (node.check_Child_State > 0)))
+ };
+ return r;
+ },
+ getTreeCheckedNodes: function(setting, nodes, checked, results) {
+ if (!nodes) return [];
+ var childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked,
+ onlyOne = (checked && setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL);
+ results = !results ? [] : results;
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] == checked) {
+ results.push(nodes[i]);
+ if(onlyOne) {
+ break;
+ }
+ }
+ data.getTreeCheckedNodes(setting, nodes[i][childKey], checked, results);
+ if(onlyOne && results.length > 0) {
+ break;
+ }
+ }
+ return results;
+ },
+ getTreeChangeCheckedNodes: function(setting, nodes, results) {
+ if (!nodes) return [];
+ var childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked;
+ results = !results ? [] : results;
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] != nodes[i].checkedOld) {
+ results.push(nodes[i]);
+ }
+ data.getTreeChangeCheckedNodes(setting, nodes[i][childKey], results);
+ }
+ return results;
+ },
+ makeChkFlag: function(setting, node) {
+ if (!node) return;
+ var childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked,
+ chkFlag = -1;
+ if (node[childKey]) {
+ for (var i = 0, l = node[childKey].length; i < l; i++) {
+ var cNode = node[childKey][i];
+ var tmp = -1;
+ if (setting.check.chkStyle == consts.radio.STYLE) {
+ if (cNode.nocheck === true || cNode.chkDisabled === true) {
+ tmp = cNode.check_Child_State;
+ } else if (cNode.halfCheck === true) {
+ tmp = 2;
+ } else if (cNode[checkedKey]) {
+ tmp = 2;
+ } else {
+ tmp = cNode.check_Child_State > 0 ? 2:0;
+ }
+ if (tmp == 2) {
+ chkFlag = 2; break;
+ } else if (tmp == 0){
+ chkFlag = 0;
+ }
+ } else if (setting.check.chkStyle == consts.checkbox.STYLE) {
+ if (cNode.nocheck === true || cNode.chkDisabled === true) {
+ tmp = cNode.check_Child_State;
+ } else if (cNode.halfCheck === true) {
+ tmp = 1;
+ } else if (cNode[checkedKey] ) {
+ tmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1;
+ } else {
+ tmp = (cNode.check_Child_State > 0) ? 1 : 0;
+ }
+ if (tmp === 1) {
+ chkFlag = 1; break;
+ } else if (tmp === 2 && chkFlag > -1 && i > 0 && tmp !== chkFlag) {
+ chkFlag = 1; break;
+ } else if (chkFlag === 2 && tmp > -1 && tmp < 2) {
+ chkFlag = 1; break;
+ } else if (tmp > -1) {
+ chkFlag = tmp;
+ }
+ }
+ }
+ }
+ node.check_Child_State = chkFlag;
+ }
+ },
+ //method of event proxy
+ _event = {
+
+ },
+ //method of event handler
+ _handler = {
+ onCheckNode: function (event, node) {
+ if (node.chkDisabled === true) return false;
+ var setting = data.getSetting(event.data.treeId),
+ checkedKey = setting.data.key.checked;
+ if (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true;
+ node[checkedKey] = !node[checkedKey];
+ view.checkNodeRelation(setting, node);
+ var checkObj = $$(node, consts.id.CHECK, setting);
+ view.setChkClass(setting, checkObj, node);
+ view.repairParentChkClassWithSelf(setting, node);
+ setting.treeObj.trigger(consts.event.CHECK, [event, setting.treeId, node]);
+ return true;
+ },
+ onMouseoverCheck: function(event, node) {
+ if (node.chkDisabled === true) return false;
+ var setting = data.getSetting(event.data.treeId),
+ checkObj = $$(node, consts.id.CHECK, setting);
+ node.check_Focus = true;
+ view.setChkClass(setting, checkObj, node);
+ return true;
+ },
+ onMouseoutCheck: function(event, node) {
+ if (node.chkDisabled === true) return false;
+ var setting = data.getSetting(event.data.treeId),
+ checkObj = $$(node, consts.id.CHECK, setting);
+ node.check_Focus = false;
+ view.setChkClass(setting, checkObj, node);
+ return true;
+ }
+ },
+ //method of tools for zTree
+ _tools = {
+
+ },
+ //method of operate ztree dom
+ _view = {
+ checkNodeRelation: function(setting, node) {
+ var pNode, i, l,
+ childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked,
+ r = consts.radio;
+ if (setting.check.chkStyle == r.STYLE) {
+ var checkedList = data.getRadioCheckedList(setting);
+ if (node[checkedKey]) {
+ if (setting.check.radioType == r.TYPE_ALL) {
+ for (i = checkedList.length-1; i >= 0; i--) {
+ pNode = checkedList[i];
+ if (pNode[checkedKey] && pNode != node) {
+ pNode[checkedKey] = false;
+ checkedList.splice(i, 1);
+
+ view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode);
+ if (pNode.parentTId != node.parentTId) {
+ view.repairParentChkClassWithSelf(setting, pNode);
+ }
+ }
+ }
+ checkedList.push(node);
+ } else {
+ var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting);
+ for (i = 0, l = parentNode[childKey].length; i < l; i++) {
+ pNode = parentNode[childKey][i];
+ if (pNode[checkedKey] && pNode != node) {
+ pNode[checkedKey] = false;
+ view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode);
+ }
+ }
+ }
+ } else if (setting.check.radioType == r.TYPE_ALL) {
+ for (i = 0, l = checkedList.length; i < l; i++) {
+ if (node == checkedList[i]) {
+ checkedList.splice(i, 1);
+ break;
+ }
+ }
+ }
+
+ } else {
+ if (node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.Y.indexOf("s") > -1)) {
+ view.setSonNodeCheckBox(setting, node, true);
+ }
+ if (!node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.N.indexOf("s") > -1)) {
+ view.setSonNodeCheckBox(setting, node, false);
+ }
+ if (node[checkedKey] && setting.check.chkboxType.Y.indexOf("p") > -1) {
+ view.setParentNodeCheckBox(setting, node, true);
+ }
+ if (!node[checkedKey] && setting.check.chkboxType.N.indexOf("p") > -1) {
+ view.setParentNodeCheckBox(setting, node, false);
+ }
+ }
+ },
+ makeChkClass: function(setting, node) {
+ var checkedKey = setting.data.key.checked,
+ c = consts.checkbox, r = consts.radio,
+ fullStyle = "";
+ if (node.chkDisabled === true) {
+ fullStyle = c.DISABLED;
+ } else if (node.halfCheck) {
+ fullStyle = c.PART;
+ } else if (setting.check.chkStyle == r.STYLE) {
+ fullStyle = (node.check_Child_State < 1)? c.FULL:c.PART;
+ } else {
+ fullStyle = node[checkedKey] ? ((node.check_Child_State === 2 || node.check_Child_State === -1) ? c.FULL:c.PART) : ((node.check_Child_State < 1)? c.FULL:c.PART);
+ }
+ var chkName = setting.check.chkStyle + "_" + (node[checkedKey] ? c.TRUE : c.FALSE) + "_" + fullStyle;
+ chkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + "_" + c.FOCUS : chkName;
+ return consts.className.BUTTON + " " + c.DEFAULT + " " + chkName;
+ },
+ repairAllChk: function(setting, checked) {
+ if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) {
+ var checkedKey = setting.data.key.checked,
+ childKey = setting.data.key.children,
+ root = data.getRoot(setting);
+ for (var i = 0, l = root[childKey].length; i<l ; i++) {
+ var node = root[childKey][i];
+ if (node.nocheck !== true && node.chkDisabled !== true) {
+ node[checkedKey] = checked;
+ }
+ view.setSonNodeCheckBox(setting, node, checked);
+ }
+ }
+ },
+ repairChkClass: function(setting, node) {
+ if (!node) return;
+ data.makeChkFlag(setting, node);
+ if (node.nocheck !== true) {
+ var checkObj = $$(node, consts.id.CHECK, setting);
+ view.setChkClass(setting, checkObj, node);
+ }
+ },
+ repairParentChkClass: function(setting, node) {
+ if (!node || !node.parentTId) return;
+ var pNode = node.getParentNode();
+ view.repairChkClass(setting, pNode);
+ view.repairParentChkClass(setting, pNode);
+ },
+ repairParentChkClassWithSelf: function(setting, node) {
+ if (!node) return;
+ var childKey = setting.data.key.children;
+ if (node[childKey] && node[childKey].length > 0) {
+ view.repairParentChkClass(setting, node[childKey][0]);
+ } else {
+ view.repairParentChkClass(setting, node);
+ }
+ },
+ repairSonChkDisabled: function(setting, node, chkDisabled, inherit) {
+ if (!node) return;
+ var childKey = setting.data.key.children;
+ if (node.chkDisabled != chkDisabled) {
+ node.chkDisabled = chkDisabled;
+ }
+ view.repairChkClass(setting, node);
+ if (node[childKey] && inherit) {
+ for (var i = 0, l = node[childKey].length; i < l; i++) {
+ var sNode = node[childKey][i];
+ view.repairSonChkDisabled(setting, sNode, chkDisabled, inherit);
+ }
+ }
+ },
+ repairParentChkDisabled: function(setting, node, chkDisabled, inherit) {
+ if (!node) return;
+ if (node.chkDisabled != chkDisabled && inherit) {
+ node.chkDisabled = chkDisabled;
+ }
+ view.repairChkClass(setting, node);
+ view.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled, inherit);
+ },
+ setChkClass: function(setting, obj, node) {
+ if (!obj) return;
+ if (node.nocheck === true) {
+ obj.hide();
+ } else {
+ obj.show();
+ }
+ obj.removeClass();
+ obj.addClass(view.makeChkClass(setting, node));
+ },
+ setParentNodeCheckBox: function(setting, node, value, srcNode) {
+ var childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked,
+ checkObj = $$(node, consts.id.CHECK, setting);
+ if (!srcNode) srcNode = node;
+ data.makeChkFlag(setting, node);
+ if (node.nocheck !== true && node.chkDisabled !== true) {
+ node[checkedKey] = value;
+ view.setChkClass(setting, checkObj, node);
+ if (setting.check.autoCheckTrigger && node != srcNode) {
+ setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]);
+ }
+ }
+ if (node.parentTId) {
+ var pSign = true;
+ if (!value) {
+ var pNodes = node.getParentNode()[childKey];
+ for (var i = 0, l = pNodes.length; i < l; i++) {
+ if ((pNodes[i].nocheck !== true && pNodes[i].chkDisabled !== true && pNodes[i][checkedKey])
+ || ((pNodes[i].nocheck === true || pNodes[i].chkDisabled === true) && pNodes[i].check_Child_State > 0)) {
+ pSign = false;
+ break;
+ }
+ }
+ }
+ if (pSign) {
+ view.setParentNodeCheckBox(setting, node.getParentNode(), value, srcNode);
+ }
+ }
+ },
+ setSonNodeCheckBox: function(setting, node, value, srcNode) {
+ if (!node) return;
+ var childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked,
+ checkObj = $$(node, consts.id.CHECK, setting);
+ if (!srcNode) srcNode = node;
+
+ var hasDisable = false;
+ if (node[childKey]) {
+ for (var i = 0, l = node[childKey].length; i < l && node.chkDisabled !== true; i++) {
+ var sNode = node[childKey][i];
+ view.setSonNodeCheckBox(setting, sNode, value, srcNode);
+ if (sNode.chkDisabled === true) hasDisable = true;
+ }
+ }
+
+ if (node != data.getRoot(setting) && node.chkDisabled !== true) {
+ if (hasDisable && node.nocheck !== true) {
+ data.makeChkFlag(setting, node);
+ }
+ if (node.nocheck !== true && node.chkDisabled !== true) {
+ node[checkedKey] = value;
+ if (!hasDisable) node.check_Child_State = (node[childKey] && node[childKey].length > 0) ? (value ? 2 : 0) : -1;
+ } else {
+ node.check_Child_State = -1;
+ }
+ view.setChkClass(setting, checkObj, node);
+ if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true && node.chkDisabled !== true) {
+ setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]);
+ }
+ }
+
+ }
+ },
+
+ _z = {
+ tools: _tools,
+ view: _view,
+ event: _event,
+ data: _data
+ };
+ $.extend(true, $.fn.zTree.consts, _consts);
+ $.extend(true, $.fn.zTree._z, _z);
+
+ var zt = $.fn.zTree,
+ tools = zt._z.tools,
+ consts = zt.consts,
+ view = zt._z.view,
+ data = zt._z.data,
+ event = zt._z.event,
+ $$ = tools.$;
+
+ data.exSetting(_setting);
+ data.addInitBind(_bindEvent);
+ data.addInitUnBind(_unbindEvent);
+ data.addInitCache(_initCache);
+ data.addInitNode(_initNode);
+ data.addInitProxy(_eventProxy, true);
+ data.addInitRoot(_initRoot);
+ data.addBeforeA(_beforeA);
+ data.addZTreeTools(_zTreeTools);
+
+ var _createNodes = view.createNodes;
+ view.createNodes = function(setting, level, nodes, parentNode) {
+ if (_createNodes) _createNodes.apply(view, arguments);
+ if (!nodes) return;
+ view.repairParentChkClassWithSelf(setting, parentNode);
+ }
+ var _removeNode = view.removeNode;
+ view.removeNode = function(setting, node) {
+ var parentNode = node.getParentNode();
+ if (_removeNode) _removeNode.apply(view, arguments);
+ if (!node || !parentNode) return;
+ view.repairChkClass(setting, parentNode);
+ view.repairParentChkClass(setting, parentNode);
+ }
+
+ var _appendNodes = view.appendNodes;
+ view.appendNodes = function(setting, level, nodes, parentNode, initFlag, openFlag) {
+ var html = "";
+ if (_appendNodes) {
+ html = _appendNodes.apply(view, arguments);
+ }
+ if (parentNode) {
+ data.makeChkFlag(setting, parentNode);
+ }
+ return html;
+ }
+})(jQuery); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.excheck.min.js b/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.excheck.min.js
new file mode 100644
index 0000000..9c56f46
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.excheck.min.js
@@ -0,0 +1,34 @@
+/*
+ * JQuery zTree excheck v3.5.16
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2014-03-09
+ */
+(function(m){var p,q,r,o={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{STYLE:"checkbox",DEFAULT:"chk",DISABLED:"disable",FALSE:"false",TRUE:"true",FULL:"full",PART:"part",FOCUS:"focus"},radio:{STYLE:"radio",TYPE_ALL:"all",TYPE_LEVEL:"level"}},v={check:{enable:!1,autoCheckTrigger:!1,chkStyle:o.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:o.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}};p=function(c,
+a){if(a.chkDisabled===!0)return!1;var b=f.getSetting(c.data.treeId),d=b.data.key.checked;if(k.apply(b.callback.beforeCheck,[b.treeId,a],!0)==!1)return!0;a[d]=!a[d];e.checkNodeRelation(b,a);d=n(a,j.id.CHECK,b);e.setChkClass(b,d,a);e.repairParentChkClassWithSelf(b,a);b.treeObj.trigger(j.event.CHECK,[c,b.treeId,a]);return!0};q=function(c,a){if(a.chkDisabled===!0)return!1;var b=f.getSetting(c.data.treeId),d=n(a,j.id.CHECK,b);a.check_Focus=!0;e.setChkClass(b,d,a);return!0};r=function(c,a){if(a.chkDisabled===
+!0)return!1;var b=f.getSetting(c.data.treeId),d=n(a,j.id.CHECK,b);a.check_Focus=!1;e.setChkClass(b,d,a);return!0};m.extend(!0,m.fn.zTree.consts,o);m.extend(!0,m.fn.zTree._z,{tools:{},view:{checkNodeRelation:function(c,a){var b,d,h,i=c.data.key.children,l=c.data.key.checked;b=j.radio;if(c.check.chkStyle==b.STYLE){var g=f.getRadioCheckedList(c);if(a[l])if(c.check.radioType==b.TYPE_ALL){for(d=g.length-1;d>=0;d--)b=g[d],b[l]&&b!=a&&(b[l]=!1,g.splice(d,1),e.setChkClass(c,n(b,j.id.CHECK,c),b),b.parentTId!=
+a.parentTId&&e.repairParentChkClassWithSelf(c,b));g.push(a)}else{g=a.parentTId?a.getParentNode():f.getRoot(c);for(d=0,h=g[i].length;d<h;d++)b=g[i][d],b[l]&&b!=a&&(b[l]=!1,e.setChkClass(c,n(b,j.id.CHECK,c),b))}else if(c.check.radioType==b.TYPE_ALL)for(d=0,h=g.length;d<h;d++)if(a==g[d]){g.splice(d,1);break}}else a[l]&&(!a[i]||a[i].length==0||c.check.chkboxType.Y.indexOf("s")>-1)&&e.setSonNodeCheckBox(c,a,!0),!a[l]&&(!a[i]||a[i].length==0||c.check.chkboxType.N.indexOf("s")>-1)&&e.setSonNodeCheckBox(c,
+a,!1),a[l]&&c.check.chkboxType.Y.indexOf("p")>-1&&e.setParentNodeCheckBox(c,a,!0),!a[l]&&c.check.chkboxType.N.indexOf("p")>-1&&e.setParentNodeCheckBox(c,a,!1)},makeChkClass:function(c,a){var b=c.data.key.checked,d=j.checkbox,h=j.radio,i="",i=a.chkDisabled===!0?d.DISABLED:a.halfCheck?d.PART:c.check.chkStyle==h.STYLE?a.check_Child_State<1?d.FULL:d.PART:a[b]?a.check_Child_State===2||a.check_Child_State===-1?d.FULL:d.PART:a.check_Child_State<1?d.FULL:d.PART,b=c.check.chkStyle+"_"+(a[b]?d.TRUE:d.FALSE)+
+"_"+i,b=a.check_Focus&&a.chkDisabled!==!0?b+"_"+d.FOCUS:b;return j.className.BUTTON+" "+d.DEFAULT+" "+b},repairAllChk:function(c,a){if(c.check.enable&&c.check.chkStyle===j.checkbox.STYLE)for(var b=c.data.key.checked,d=c.data.key.children,h=f.getRoot(c),i=0,l=h[d].length;i<l;i++){var g=h[d][i];g.nocheck!==!0&&g.chkDisabled!==!0&&(g[b]=a);e.setSonNodeCheckBox(c,g,a)}},repairChkClass:function(c,a){if(a&&(f.makeChkFlag(c,a),a.nocheck!==!0)){var b=n(a,j.id.CHECK,c);e.setChkClass(c,b,a)}},repairParentChkClass:function(c,
+a){if(a&&a.parentTId){var b=a.getParentNode();e.repairChkClass(c,b);e.repairParentChkClass(c,b)}},repairParentChkClassWithSelf:function(c,a){if(a){var b=c.data.key.children;a[b]&&a[b].length>0?e.repairParentChkClass(c,a[b][0]):e.repairParentChkClass(c,a)}},repairSonChkDisabled:function(c,a,b,d){if(a){var h=c.data.key.children;if(a.chkDisabled!=b)a.chkDisabled=b;e.repairChkClass(c,a);if(a[h]&&d)for(var i=0,l=a[h].length;i<l;i++)e.repairSonChkDisabled(c,a[h][i],b,d)}},repairParentChkDisabled:function(c,
+a,b,d){if(a){if(a.chkDisabled!=b&&d)a.chkDisabled=b;e.repairChkClass(c,a);e.repairParentChkDisabled(c,a.getParentNode(),b,d)}},setChkClass:function(c,a,b){a&&(b.nocheck===!0?a.hide():a.show(),a.removeClass(),a.addClass(e.makeChkClass(c,b)))},setParentNodeCheckBox:function(c,a,b,d){var h=c.data.key.children,i=c.data.key.checked,l=n(a,j.id.CHECK,c);d||(d=a);f.makeChkFlag(c,a);a.nocheck!==!0&&a.chkDisabled!==!0&&(a[i]=b,e.setChkClass(c,l,a),c.check.autoCheckTrigger&&a!=d&&c.treeObj.trigger(j.event.CHECK,
+[null,c.treeId,a]));if(a.parentTId){l=!0;if(!b)for(var h=a.getParentNode()[h],g=0,k=h.length;g<k;g++)if(h[g].nocheck!==!0&&h[g].chkDisabled!==!0&&h[g][i]||(h[g].nocheck===!0||h[g].chkDisabled===!0)&&h[g].check_Child_State>0){l=!1;break}l&&e.setParentNodeCheckBox(c,a.getParentNode(),b,d)}},setSonNodeCheckBox:function(c,a,b,d){if(a){var h=c.data.key.children,i=c.data.key.checked,l=n(a,j.id.CHECK,c);d||(d=a);var g=!1;if(a[h])for(var k=0,m=a[h].length;k<m&&a.chkDisabled!==!0;k++){var o=a[h][k];e.setSonNodeCheckBox(c,
+o,b,d);o.chkDisabled===!0&&(g=!0)}if(a!=f.getRoot(c)&&a.chkDisabled!==!0){g&&a.nocheck!==!0&&f.makeChkFlag(c,a);if(a.nocheck!==!0&&a.chkDisabled!==!0){if(a[i]=b,!g)a.check_Child_State=a[h]&&a[h].length>0?b?2:0:-1}else a.check_Child_State=-1;e.setChkClass(c,l,a);c.check.autoCheckTrigger&&a!=d&&a.nocheck!==!0&&a.chkDisabled!==!0&&c.treeObj.trigger(j.event.CHECK,[null,c.treeId,a])}}}},event:{},data:{getRadioCheckedList:function(c){for(var a=f.getRoot(c).radioCheckedList,b=0,d=a.length;b<d;b++)f.getNodeCache(c,
+a[b].tId)||(a.splice(b,1),b--,d--);return a},getCheckStatus:function(c,a){if(!c.check.enable||a.nocheck||a.chkDisabled)return null;var b=c.data.key.checked;return{checked:a[b],half:a.halfCheck?a.halfCheck:c.check.chkStyle==j.radio.STYLE?a.check_Child_State===2:a[b]?a.check_Child_State>-1&&a.check_Child_State<2:a.check_Child_State>0}},getTreeCheckedNodes:function(c,a,b,d){if(!a)return[];for(var h=c.data.key.children,i=c.data.key.checked,e=b&&c.check.chkStyle==j.radio.STYLE&&c.check.radioType==j.radio.TYPE_ALL,
+d=!d?[]:d,g=0,k=a.length;g<k;g++){if(a[g].nocheck!==!0&&a[g].chkDisabled!==!0&&a[g][i]==b&&(d.push(a[g]),e))break;f.getTreeCheckedNodes(c,a[g][h],b,d);if(e&&d.length>0)break}return d},getTreeChangeCheckedNodes:function(c,a,b){if(!a)return[];for(var d=c.data.key.children,h=c.data.key.checked,b=!b?[]:b,i=0,e=a.length;i<e;i++)a[i].nocheck!==!0&&a[i].chkDisabled!==!0&&a[i][h]!=a[i].checkedOld&&b.push(a[i]),f.getTreeChangeCheckedNodes(c,a[i][d],b);return b},makeChkFlag:function(c,a){if(a){var b=c.data.key.children,
+d=c.data.key.checked,h=-1;if(a[b])for(var i=0,e=a[b].length;i<e;i++){var g=a[b][i],f=-1;if(c.check.chkStyle==j.radio.STYLE)if(f=g.nocheck===!0||g.chkDisabled===!0?g.check_Child_State:g.halfCheck===!0?2:g[d]?2:g.check_Child_State>0?2:0,f==2){h=2;break}else f==0&&(h=0);else if(c.check.chkStyle==j.checkbox.STYLE)if(f=g.nocheck===!0||g.chkDisabled===!0?g.check_Child_State:g.halfCheck===!0?1:g[d]?g.check_Child_State===-1||g.check_Child_State===2?2:1:g.check_Child_State>0?1:0,f===1){h=1;break}else if(f===
+2&&h>-1&&i>0&&f!==h){h=1;break}else if(h===2&&f>-1&&f<2){h=1;break}else f>-1&&(h=f)}a.check_Child_State=h}}}});var m=m.fn.zTree,k=m._z.tools,j=m.consts,e=m._z.view,f=m._z.data,n=k.$;f.exSetting(v);f.addInitBind(function(c){c.treeObj.bind(j.event.CHECK,function(a,b,d,h){a.srcEvent=b;k.apply(c.callback.onCheck,[a,d,h])})});f.addInitUnBind(function(c){c.treeObj.unbind(j.event.CHECK)});f.addInitCache(function(){});f.addInitNode(function(c,a,b,d){if(b){a=c.data.key.checked;typeof b[a]=="string"&&(b[a]=
+k.eqs(b[a],"true"));b[a]=!!b[a];b.checkedOld=b[a];if(typeof b.nocheck=="string")b.nocheck=k.eqs(b.nocheck,"true");b.nocheck=!!b.nocheck||c.check.nocheckInherit&&d&&!!d.nocheck;if(typeof b.chkDisabled=="string")b.chkDisabled=k.eqs(b.chkDisabled,"true");b.chkDisabled=!!b.chkDisabled||c.check.chkDisabledInherit&&d&&!!d.chkDisabled;if(typeof b.halfCheck=="string")b.halfCheck=k.eqs(b.halfCheck,"true");b.halfCheck=!!b.halfCheck;b.check_Child_State=-1;b.check_Focus=!1;b.getCheckStatus=function(){return f.getCheckStatus(c,
+b)};c.check.chkStyle==j.radio.STYLE&&c.check.radioType==j.radio.TYPE_ALL&&b[a]&&f.getRoot(c).radioCheckedList.push(b)}});f.addInitProxy(function(c){var a=c.target,b=f.getSetting(c.data.treeId),d="",h=null,e="",l=null;if(k.eqs(c.type,"mouseover")){if(b.check.enable&&k.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+j.id.CHECK)!==null)d=k.getNodeMainDom(a).id,e="mouseoverCheck"}else if(k.eqs(c.type,"mouseout")){if(b.check.enable&&k.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+j.id.CHECK)!==null)d=
+k.getNodeMainDom(a).id,e="mouseoutCheck"}else if(k.eqs(c.type,"click")&&b.check.enable&&k.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+j.id.CHECK)!==null)d=k.getNodeMainDom(a).id,e="checkNode";if(d.length>0)switch(h=f.getNodeCache(b,d),e){case "checkNode":l=p;break;case "mouseoverCheck":l=q;break;case "mouseoutCheck":l=r}return{stop:e==="checkNode",node:h,nodeEventType:e,nodeEventCallback:l,treeEventType:"",treeEventCallback:null}},!0);f.addInitRoot(function(c){f.getRoot(c).radioCheckedList=[]});
+f.addBeforeA(function(c,a,b){c.check.enable&&(f.makeChkFlag(c,a),b.push("<span ID='",a.tId,j.id.CHECK,"' class='",e.makeChkClass(c,a),"' treeNode",j.id.CHECK,a.nocheck===!0?" style='display:none;'":"","></span>"))});f.addZTreeTools(function(c,a){a.checkNode=function(a,b,c,f){var g=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[g]),f=!!f,(a[g]!==b||c)&&!(f&&k.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0)==!1)&&k.uCanDo(this.setting)&&this.setting.check.enable&&
+a.nocheck!==!0))a[g]=b,b=n(a,j.id.CHECK,this.setting),(c||this.setting.check.chkStyle===j.radio.STYLE)&&e.checkNodeRelation(this.setting,a),e.setChkClass(this.setting,b,a),e.repairParentChkClassWithSelf(this.setting,a),f&&this.setting.treeObj.trigger(j.event.CHECK,[null,this.setting.treeId,a])};a.checkAllNodes=function(a){e.repairAllChk(this.setting,!!a)};a.getCheckedNodes=function(a){var b=this.setting.data.key.children;return f.getTreeCheckedNodes(this.setting,f.getRoot(this.setting)[b],a!==!1)};
+a.getChangeCheckedNodes=function(){var a=this.setting.data.key.children;return f.getTreeChangeCheckedNodes(this.setting,f.getRoot(this.setting)[a])};a.setChkDisabled=function(a,b,c,f){b=!!b;c=!!c;e.repairSonChkDisabled(this.setting,a,b,!!f);e.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var b=a.updateNode;a.updateNode=function(c,f){b&&b.apply(a,arguments);if(c&&this.setting.check.enable&&n(c,this.setting).get(0)&&k.uCanDo(this.setting)){var i=n(c,j.id.CHECK,this.setting);(f==!0||this.setting.check.chkStyle===
+j.radio.STYLE)&&e.checkNodeRelation(this.setting,c);e.setChkClass(this.setting,i,c);e.repairParentChkClassWithSelf(this.setting,c)}}});var s=e.createNodes;e.createNodes=function(c,a,b,d){s&&s.apply(e,arguments);b&&e.repairParentChkClassWithSelf(c,d)};var t=e.removeNode;e.removeNode=function(c,a){var b=a.getParentNode();t&&t.apply(e,arguments);a&&b&&(e.repairChkClass(c,b),e.repairParentChkClass(c,b))};var u=e.appendNodes;e.appendNodes=function(c,a,b,d,h,i){var j="";u&&(j=u.apply(e,arguments));d&&f.makeChkFlag(c,
+d);return j}})(jQuery);
diff --git a/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.exedit.js b/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.exedit.js
new file mode 100644
index 0000000..70a2093
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.exedit.js
@@ -0,0 +1,1191 @@
+/*
+ * JQuery zTree exedit v3.5.16
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2014-03-09
+ */
+(function($){
+ //default consts of exedit
+ var _consts = {
+ event: {
+ DRAG: "ztree_drag",
+ DROP: "ztree_drop",
+ RENAME: "ztree_rename",
+ DRAGMOVE:"ztree_dragmove"
+ },
+ id: {
+ EDIT: "_edit",
+ INPUT: "_input",
+ REMOVE: "_remove"
+ },
+ move: {
+ TYPE_INNER: "inner",
+ TYPE_PREV: "prev",
+ TYPE_NEXT: "next"
+ },
+ node: {
+ CURSELECTED_EDIT: "curSelectedNode_Edit",
+ TMPTARGET_TREE: "tmpTargetzTree",
+ TMPTARGET_NODE: "tmpTargetNode"
+ }
+ },
+ //default setting of exedit
+ _setting = {
+ edit: {
+ enable: false,
+ editNameSelectAll: false,
+ showRemoveBtn: true,
+ showRenameBtn: true,
+ removeTitle: "remove",
+ renameTitle: "rename",
+ drag: {
+ autoExpandTrigger: false,
+ isCopy: true,
+ isMove: true,
+ prev: true,
+ next: true,
+ inner: true,
+ minMoveSize: 5,
+ borderMax: 10,
+ borderMin: -5,
+ maxShowNodeNum: 5,
+ autoOpenTime: 500
+ }
+ },
+ view: {
+ addHoverDom: null,
+ removeHoverDom: null
+ },
+ callback: {
+ beforeDrag:null,
+ beforeDragOpen:null,
+ beforeDrop:null,
+ beforeEditName:null,
+ beforeRename:null,
+ onDrag:null,
+ onDragMove:null,
+ onDrop:null,
+ onRename:null
+ }
+ },
+ //default root of exedit
+ _initRoot = function (setting) {
+ var r = data.getRoot(setting), rs = data.getRoots();
+ r.curEditNode = null;
+ r.curEditInput = null;
+ r.curHoverNode = null;
+ r.dragFlag = 0;
+ r.dragNodeShowBefore = [];
+ r.dragMaskList = new Array();
+ rs.showHoverDom = true;
+ },
+ //default cache of exedit
+ _initCache = function(treeId) {},
+ //default bind event of exedit
+ _bindEvent = function(setting) {
+ var o = setting.treeObj;
+ var c = consts.event;
+ o.bind(c.RENAME, function (event, treeId, treeNode, isCancel) {
+ tools.apply(setting.callback.onRename, [event, treeId, treeNode, isCancel]);
+ });
+
+ o.bind(c.DRAG, function (event, srcEvent, treeId, treeNodes) {
+ tools.apply(setting.callback.onDrag, [srcEvent, treeId, treeNodes]);
+ });
+
+ o.bind(c.DRAGMOVE,function(event, srcEvent, treeId, treeNodes){
+ tools.apply(setting.callback.onDragMove,[srcEvent, treeId, treeNodes]);
+ });
+
+ o.bind(c.DROP, function (event, srcEvent, treeId, treeNodes, targetNode, moveType, isCopy) {
+ tools.apply(setting.callback.onDrop, [srcEvent, treeId, treeNodes, targetNode, moveType, isCopy]);
+ });
+ },
+ _unbindEvent = function(setting) {
+ var o = setting.treeObj;
+ var c = consts.event;
+ o.unbind(c.RENAME);
+ o.unbind(c.DRAG);
+ o.unbind(c.DRAGMOVE);
+ o.unbind(c.DROP);
+ },
+ //default event proxy of exedit
+ _eventProxy = function(e) {
+ var target = e.target,
+ setting = data.getSetting(e.data.treeId),
+ relatedTarget = e.relatedTarget,
+ tId = "", node = null,
+ nodeEventType = "", treeEventType = "",
+ nodeEventCallback = null, treeEventCallback = null,
+ tmp = null;
+
+ if (tools.eqs(e.type, "mouseover")) {
+ tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (tmp) {
+ tId = tools.getNodeMainDom(tmp).id;
+ nodeEventType = "hoverOverNode";
+ }
+ } else if (tools.eqs(e.type, "mouseout")) {
+ tmp = tools.getMDom(setting, relatedTarget, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (!tmp) {
+ tId = "remove";
+ nodeEventType = "hoverOutNode";
+ }
+ } else if (tools.eqs(e.type, "mousedown")) {
+ tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (tmp) {
+ tId = tools.getNodeMainDom(tmp).id;
+ nodeEventType = "mousedownNode";
+ }
+ }
+ if (tId.length>0) {
+ node = data.getNodeCache(setting, tId);
+ switch (nodeEventType) {
+ case "mousedownNode" :
+ nodeEventCallback = _handler.onMousedownNode;
+ break;
+ case "hoverOverNode" :
+ nodeEventCallback = _handler.onHoverOverNode;
+ break;
+ case "hoverOutNode" :
+ nodeEventCallback = _handler.onHoverOutNode;
+ break;
+ }
+ }
+ var proxyResult = {
+ stop: false,
+ node: node,
+ nodeEventType: nodeEventType,
+ nodeEventCallback: nodeEventCallback,
+ treeEventType: treeEventType,
+ treeEventCallback: treeEventCallback
+ };
+ return proxyResult
+ },
+ //default init node of exedit
+ _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
+ if (!n) return;
+ n.isHover = false;
+ n.editNameFlag = false;
+ },
+ //update zTreeObj, add method of edit
+ _zTreeTools = function(setting, zTreeTools) {
+ zTreeTools.cancelEditName = function(newName) {
+ var root = data.getRoot(this.setting);
+ if (!root.curEditNode) return;
+ view.cancelCurEditNode(this.setting, newName?newName:null, true);
+ }
+ zTreeTools.copyNode = function(targetNode, node, moveType, isSilent) {
+ if (!node) return null;
+ if (targetNode && !targetNode.isParent && this.setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) return null;
+ var _this = this,
+ newNode = tools.clone(node);
+ if (!targetNode) {
+ targetNode = null;
+ moveType = consts.move.TYPE_INNER;
+ }
+ if (moveType == consts.move.TYPE_INNER) {
+ function copyCallback() {
+ view.addNodes(_this.setting, targetNode, [newNode], isSilent);
+ }
+
+ if (tools.canAsync(this.setting, targetNode)) {
+ view.asyncNode(this.setting, targetNode, isSilent, copyCallback);
+ } else {
+ copyCallback();
+ }
+ } else {
+ view.addNodes(this.setting, targetNode.parentNode, [newNode], isSilent);
+ view.moveNode(this.setting, targetNode, newNode, moveType, false, isSilent);
+ }
+ return newNode;
+ }
+ zTreeTools.editName = function(node) {
+ if (!node || !node.tId || node !== data.getNodeCache(this.setting, node.tId)) return;
+ if (node.parentTId) view.expandCollapseParentNode(this.setting, node.getParentNode(), true);
+ view.editNode(this.setting, node)
+ }
+ zTreeTools.moveNode = function(targetNode, node, moveType, isSilent) {
+ if (!node) return node;
+ if (targetNode && !targetNode.isParent && this.setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) {
+ return null;
+ } else if (targetNode && ((node.parentTId == targetNode.tId && moveType == consts.move.TYPE_INNER) || $$(node, this.setting).find("#" + targetNode.tId).length > 0)) {
+ return null;
+ } else if (!targetNode) {
+ targetNode = null;
+ }
+ var _this = this;
+ function moveCallback() {
+ view.moveNode(_this.setting, targetNode, node, moveType, false, isSilent);
+ }
+ if (tools.canAsync(this.setting, targetNode) && moveType === consts.move.TYPE_INNER) {
+ view.asyncNode(this.setting, targetNode, isSilent, moveCallback);
+ } else {
+ moveCallback();
+ }
+ return node;
+ }
+ zTreeTools.setEditable = function(editable) {
+ this.setting.edit.enable = editable;
+ return this.refresh();
+ }
+ },
+ //method of operate data
+ _data = {
+ setSonNodeLevel: function(setting, parentNode, node) {
+ if (!node) return;
+ var childKey = setting.data.key.children;
+ node.level = (parentNode)? parentNode.level + 1 : 0;
+ if (!node[childKey]) return;
+ for (var i = 0, l = node[childKey].length; i < l; i++) {
+ if (node[childKey][i]) data.setSonNodeLevel(setting, node, node[childKey][i]);
+ }
+ }
+ },
+ //method of event proxy
+ _event = {
+
+ },
+ //method of event handler
+ _handler = {
+ onHoverOverNode: function(event, node) {
+ var setting = data.getSetting(event.data.treeId),
+ root = data.getRoot(setting);
+ if (root.curHoverNode != node) {
+ _handler.onHoverOutNode(event);
+ }
+ root.curHoverNode = node;
+ view.addHoverDom(setting, node);
+ },
+ onHoverOutNode: function(event, node) {
+ var setting = data.getSetting(event.data.treeId),
+ root = data.getRoot(setting);
+ if (root.curHoverNode && !data.isSelectedNode(setting, root.curHoverNode)) {
+ view.removeTreeDom(setting, root.curHoverNode);
+ root.curHoverNode = null;
+ }
+ },
+ onMousedownNode: function(eventMouseDown, _node) {
+ var i,l,
+ setting = data.getSetting(eventMouseDown.data.treeId),
+ root = data.getRoot(setting), roots = data.getRoots();
+ //right click can't drag & drop
+ if (eventMouseDown.button == 2 || !setting.edit.enable || (!setting.edit.drag.isCopy && !setting.edit.drag.isMove)) return true;
+
+ //input of edit node name can't drag & drop
+ var target = eventMouseDown.target,
+ _nodes = data.getRoot(setting).curSelectedList,
+ nodes = [];
+ if (!data.isSelectedNode(setting, _node)) {
+ nodes = [_node];
+ } else {
+ for (i=0, l=_nodes.length; i<l; i++) {
+ if (_nodes[i].editNameFlag && tools.eqs(target.tagName, "input") && target.getAttribute("treeNode"+consts.id.INPUT) !== null) {
+ return true;
+ }
+ nodes.push(_nodes[i]);
+ if (nodes[0].parentTId !== _nodes[i].parentTId) {
+ nodes = [_node];
+ break;
+ }
+ }
+ }
+
+ view.editNodeBlur = true;
+ view.cancelCurEditNode(setting);
+
+ var doc = $(setting.treeObj.get(0).ownerDocument),
+ body = $(setting.treeObj.get(0).ownerDocument.body), curNode, tmpArrow, tmpTarget,
+ isOtherTree = false,
+ targetSetting = setting,
+ sourceSetting = setting,
+ preNode, nextNode,
+ preTmpTargetNodeId = null,
+ preTmpMoveType = null,
+ tmpTargetNodeId = null,
+ moveType = consts.move.TYPE_INNER,
+ mouseDownX = eventMouseDown.clientX,
+ mouseDownY = eventMouseDown.clientY,
+ startTime = (new Date()).getTime();
+
+ if (tools.uCanDo(setting)) {
+ doc.bind("mousemove", _docMouseMove);
+ }
+ function _docMouseMove(event) {
+ //avoid start drag after click node
+ if (root.dragFlag == 0 && Math.abs(mouseDownX - event.clientX) < setting.edit.drag.minMoveSize
+ && Math.abs(mouseDownY - event.clientY) < setting.edit.drag.minMoveSize) {
+ return true;
+ }
+ var i, l, tmpNode, tmpDom, tmpNodes,
+ childKey = setting.data.key.children;
+ body.css("cursor", "pointer");
+
+ if (root.dragFlag == 0) {
+ if (tools.apply(setting.callback.beforeDrag, [setting.treeId, nodes], true) == false) {
+ _docMouseUp(event);
+ return true;
+ }
+
+ for (i=0, l=nodes.length; i<l; i++) {
+ if (i==0) {
+ root.dragNodeShowBefore = [];
+ }
+ tmpNode = nodes[i];
+ if (tmpNode.isParent && tmpNode.open) {
+ view.expandCollapseNode(setting, tmpNode, !tmpNode.open);
+ root.dragNodeShowBefore[tmpNode.tId] = true;
+ } else {
+ root.dragNodeShowBefore[tmpNode.tId] = false;
+ }
+ }
+
+ root.dragFlag = 1;
+ roots.showHoverDom = false;
+ tools.showIfameMask(setting, true);
+
+ //sort
+ var isOrder = true, lastIndex = -1;
+ if (nodes.length>1) {
+ var pNodes = nodes[0].parentTId ? nodes[0].getParentNode()[childKey] : data.getNodes(setting);
+ tmpNodes = [];
+ for (i=0, l=pNodes.length; i<l; i++) {
+ if (root.dragNodeShowBefore[pNodes[i].tId] !== undefined) {
+ if (isOrder && lastIndex > -1 && (lastIndex+1) !== i) {
+ isOrder = false;
+ }
+ tmpNodes.push(pNodes[i]);
+ lastIndex = i;
+ }
+ if (nodes.length === tmpNodes.length) {
+ nodes = tmpNodes;
+ break;
+ }
+ }
+ }
+ if (isOrder) {
+ preNode = nodes[0].getPreNode();
+ nextNode = nodes[nodes.length-1].getNextNode();
+ }
+
+ //set node in selected
+ curNode = $$("<ul class='zTreeDragUL'></ul>", setting);
+ for (i=0, l=nodes.length; i<l; i++) {
+ tmpNode = nodes[i];
+ tmpNode.editNameFlag = false;
+ view.selectNode(setting, tmpNode, i>0);
+ view.removeTreeDom(setting, tmpNode);
+
+ if (i > setting.edit.drag.maxShowNodeNum-1) {
+ continue;
+ }
+
+ tmpDom = $$("<li id='"+ tmpNode.tId +"_tmp'></li>", setting);
+ tmpDom.append($$(tmpNode, consts.id.A, setting).clone());
+ tmpDom.css("padding", "0");
+ tmpDom.children("#" + tmpNode.tId + consts.id.A).removeClass(consts.node.CURSELECTED);
+ curNode.append(tmpDom);
+ if (i == setting.edit.drag.maxShowNodeNum-1) {
+ tmpDom = $$("<li id='"+ tmpNode.tId +"_moretmp'><a> ... </a></li>", setting);
+ curNode.append(tmpDom);
+ }
+ }
+ curNode.attr("id", nodes[0].tId + consts.id.UL + "_tmp");
+ curNode.addClass(setting.treeObj.attr("class"));
+ curNode.appendTo(body);
+
+ tmpArrow = $$("<span class='tmpzTreeMove_arrow'></span>", setting);
+ tmpArrow.attr("id", "zTreeMove_arrow_tmp");
+ tmpArrow.appendTo(body);
+
+ setting.treeObj.trigger(consts.event.DRAG, [event, setting.treeId, nodes]);
+ }
+
+ if (root.dragFlag == 1) {
+ if (tmpTarget && tmpArrow.attr("id") == event.target.id && tmpTargetNodeId && (event.clientX + doc.scrollLeft()+2) > ($("#" + tmpTargetNodeId + consts.id.A, tmpTarget).offset().left)) {
+ var xT = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget);
+ event.target = (xT.length > 0) ? xT.get(0) : event.target;
+ } else if (tmpTarget) {
+ tmpTarget.removeClass(consts.node.TMPTARGET_TREE);
+ if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV)
+ .removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER);
+ }
+ tmpTarget = null;
+ tmpTargetNodeId = null;
+
+ //judge drag & drop in multi ztree
+ isOtherTree = false;
+ targetSetting = setting;
+ var settings = data.getSettings();
+ for (var s in settings) {
+ if (settings[s].treeId && settings[s].edit.enable && settings[s].treeId != setting.treeId
+ && (event.target.id == settings[s].treeId || $(event.target).parents("#" + settings[s].treeId).length>0)) {
+ isOtherTree = true;
+ targetSetting = settings[s];
+ }
+ }
+
+ var docScrollTop = doc.scrollTop(),
+ docScrollLeft = doc.scrollLeft(),
+ treeOffset = targetSetting.treeObj.offset(),
+ scrollHeight = targetSetting.treeObj.get(0).scrollHeight,
+ scrollWidth = targetSetting.treeObj.get(0).scrollWidth,
+ dTop = (event.clientY + docScrollTop - treeOffset.top),
+ dBottom = (targetSetting.treeObj.height() + treeOffset.top - event.clientY - docScrollTop),
+ dLeft = (event.clientX + docScrollLeft - treeOffset.left),
+ dRight = (targetSetting.treeObj.width() + treeOffset.left - event.clientX - docScrollLeft),
+ isTop = (dTop < setting.edit.drag.borderMax && dTop > setting.edit.drag.borderMin),
+ isBottom = (dBottom < setting.edit.drag.borderMax && dBottom > setting.edit.drag.borderMin),
+ isLeft = (dLeft < setting.edit.drag.borderMax && dLeft > setting.edit.drag.borderMin),
+ isRight = (dRight < setting.edit.drag.borderMax && dRight > setting.edit.drag.borderMin),
+ isTreeInner = dTop > setting.edit.drag.borderMin && dBottom > setting.edit.drag.borderMin && dLeft > setting.edit.drag.borderMin && dRight > setting.edit.drag.borderMin,
+ isTreeTop = (isTop && targetSetting.treeObj.scrollTop() <= 0),
+ isTreeBottom = (isBottom && (targetSetting.treeObj.scrollTop() + targetSetting.treeObj.height()+10) >= scrollHeight),
+ isTreeLeft = (isLeft && targetSetting.treeObj.scrollLeft() <= 0),
+ isTreeRight = (isRight && (targetSetting.treeObj.scrollLeft() + targetSetting.treeObj.width()+10) >= scrollWidth);
+
+ if (event.target && tools.isChildOrSelf(event.target, targetSetting.treeId)) {
+ //get node <li> dom
+ var targetObj = event.target;
+ while (targetObj && targetObj.tagName && !tools.eqs(targetObj.tagName, "li") && targetObj.id != targetSetting.treeId) {
+ targetObj = targetObj.parentNode;
+ }
+
+ var canMove = true;
+ //don't move to self or children of self
+ for (i=0, l=nodes.length; i<l; i++) {
+ tmpNode = nodes[i];
+ if (targetObj.id === tmpNode.tId) {
+ canMove = false;
+ break;
+ } else if ($$(tmpNode, setting).find("#" + targetObj.id).length > 0) {
+ canMove = false;
+ break;
+ }
+ }
+ if (canMove && event.target && tools.isChildOrSelf(event.target, targetObj.id + consts.id.A)) {
+ tmpTarget = $(targetObj);
+ tmpTargetNodeId = targetObj.id;
+ }
+ }
+
+ //the mouse must be in zTree
+ tmpNode = nodes[0];
+ if (isTreeInner && tools.isChildOrSelf(event.target, targetSetting.treeId)) {
+ //judge mouse move in root of ztree
+ if (!tmpTarget && (event.target.id == targetSetting.treeId || isTreeTop || isTreeBottom || isTreeLeft || isTreeRight) && (isOtherTree || (!isOtherTree && tmpNode.parentTId))) {
+ tmpTarget = targetSetting.treeObj;
+ }
+ //auto scroll top
+ if (isTop) {
+ targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop()-10);
+ } else if (isBottom) {
+ targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop()+10);
+ }
+ if (isLeft) {
+ targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()-10);
+ } else if (isRight) {
+ targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()+10);
+ }
+ //auto scroll left
+ if (tmpTarget && tmpTarget != targetSetting.treeObj && tmpTarget.offset().left < targetSetting.treeObj.offset().left) {
+ targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()+ tmpTarget.offset().left - targetSetting.treeObj.offset().left);
+ }
+ }
+
+ curNode.css({
+ "top": (event.clientY + docScrollTop + 3) + "px",
+ "left": (event.clientX + docScrollLeft + 3) + "px"
+ });
+
+ var dX = 0;
+ var dY = 0;
+ if (tmpTarget && tmpTarget.attr("id")!=targetSetting.treeId) {
+ var tmpTargetNode = tmpTargetNodeId == null ? null: data.getNodeCache(targetSetting, tmpTargetNodeId),
+ isCopy = ((event.ctrlKey || event.metaKey) && setting.edit.drag.isMove && setting.edit.drag.isCopy) || (!setting.edit.drag.isMove && setting.edit.drag.isCopy),
+ isPrev = !!(preNode && tmpTargetNodeId === preNode.tId),
+ isNext = !!(nextNode && tmpTargetNodeId === nextNode.tId),
+ isInner = (tmpNode.parentTId && tmpNode.parentTId == tmpTargetNodeId),
+ canPrev = (isCopy || !isNext) && tools.apply(targetSetting.edit.drag.prev, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.prev),
+ canNext = (isCopy || !isPrev) && tools.apply(targetSetting.edit.drag.next, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.next),
+ canInner = (isCopy || !isInner) && !(targetSetting.data.keep.leaf && !tmpTargetNode.isParent) && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.inner);
+ if (!canPrev && !canNext && !canInner) {
+ tmpTarget = null;
+ tmpTargetNodeId = "";
+ moveType = consts.move.TYPE_INNER;
+ tmpArrow.css({
+ "display":"none"
+ });
+ if (window.zTreeMoveTimer) {
+ clearTimeout(window.zTreeMoveTimer);
+ window.zTreeMoveTargetNodeTId = null
+ }
+ } else {
+ var tmpTargetA = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget),
+ tmpNextA = tmpTargetNode.isLastNode ? null : $("#" + tmpTargetNode.getNextNode().tId + consts.id.A, tmpTarget.next()),
+ tmpTop = tmpTargetA.offset().top,
+ tmpLeft = tmpTargetA.offset().left,
+ prevPercent = canPrev ? (canInner ? 0.25 : (canNext ? 0.5 : 1) ) : -1,
+ nextPercent = canNext ? (canInner ? 0.75 : (canPrev ? 0.5 : 0) ) : -1,
+ dY_percent = (event.clientY + docScrollTop - tmpTop)/tmpTargetA.height();
+ if ((prevPercent==1 ||dY_percent<=prevPercent && dY_percent>=-.2) && canPrev) {
+ dX = 1 - tmpArrow.width();
+ dY = tmpTop - tmpArrow.height()/2;
+ moveType = consts.move.TYPE_PREV;
+ } else if ((nextPercent==0 || dY_percent>=nextPercent && dY_percent<=1.2) && canNext) {
+ dX = 1 - tmpArrow.width();
+ dY = (tmpNextA == null || (tmpTargetNode.isParent && tmpTargetNode.open)) ? (tmpTop + tmpTargetA.height() - tmpArrow.height()/2) : (tmpNextA.offset().top - tmpArrow.height()/2);
+ moveType = consts.move.TYPE_NEXT;
+ }else {
+ dX = 5 - tmpArrow.width();
+ dY = tmpTop;
+ moveType = consts.move.TYPE_INNER;
+ }
+ tmpArrow.css({
+ "display":"block",
+ "top": dY + "px",
+ "left": (tmpLeft + dX) + "px"
+ });
+ tmpTargetA.addClass(consts.node.TMPTARGET_NODE + "_" + moveType);
+
+ if (preTmpTargetNodeId != tmpTargetNodeId || preTmpMoveType != moveType) {
+ startTime = (new Date()).getTime();
+ }
+ if (tmpTargetNode && tmpTargetNode.isParent && moveType == consts.move.TYPE_INNER) {
+ var startTimer = true;
+ if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId !== tmpTargetNode.tId) {
+ clearTimeout(window.zTreeMoveTimer);
+ window.zTreeMoveTargetNodeTId = null;
+ }else if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId === tmpTargetNode.tId) {
+ startTimer = false;
+ }
+ if (startTimer) {
+ window.zTreeMoveTimer = setTimeout(function() {
+ if (moveType != consts.move.TYPE_INNER) return;
+ if (tmpTargetNode && tmpTargetNode.isParent && !tmpTargetNode.open && (new Date()).getTime() - startTime > targetSetting.edit.drag.autoOpenTime
+ && tools.apply(targetSetting.callback.beforeDragOpen, [targetSetting.treeId, tmpTargetNode], true)) {
+ view.switchNode(targetSetting, tmpTargetNode);
+ if (targetSetting.edit.drag.autoExpandTrigger) {
+ targetSetting.treeObj.trigger(consts.event.EXPAND, [targetSetting.treeId, tmpTargetNode]);
+ }
+ }
+ }, targetSetting.edit.drag.autoOpenTime+50);
+ window.zTreeMoveTargetNodeTId = tmpTargetNode.tId;
+ }
+ }
+ }
+ } else {
+ moveType = consts.move.TYPE_INNER;
+ if (tmpTarget && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, null], !!targetSetting.edit.drag.inner)) {
+ tmpTarget.addClass(consts.node.TMPTARGET_TREE);
+ } else {
+ tmpTarget = null;
+ }
+ tmpArrow.css({
+ "display":"none"
+ });
+ if (window.zTreeMoveTimer) {
+ clearTimeout(window.zTreeMoveTimer);
+ window.zTreeMoveTargetNodeTId = null;
+ }
+ }
+ preTmpTargetNodeId = tmpTargetNodeId;
+ preTmpMoveType = moveType;
+
+ setting.treeObj.trigger(consts.event.DRAGMOVE, [event, setting.treeId, nodes]);
+ }
+ return false;
+ }
+
+ doc.bind("mouseup", _docMouseUp);
+ function _docMouseUp(event) {
+ if (window.zTreeMoveTimer) {
+ clearTimeout(window.zTreeMoveTimer);
+ window.zTreeMoveTargetNodeTId = null;
+ }
+ preTmpTargetNodeId = null;
+ preTmpMoveType = null;
+ doc.unbind("mousemove", _docMouseMove);
+ doc.unbind("mouseup", _docMouseUp);
+ doc.unbind("selectstart", _docSelect);
+ body.css("cursor", "auto");
+ if (tmpTarget) {
+ tmpTarget.removeClass(consts.node.TMPTARGET_TREE);
+ if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV)
+ .removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER);
+ }
+ tools.showIfameMask(setting, false);
+
+ roots.showHoverDom = true;
+ if (root.dragFlag == 0) return;
+ root.dragFlag = 0;
+
+ var i, l, tmpNode;
+ for (i=0, l=nodes.length; i<l; i++) {
+ tmpNode = nodes[i];
+ if (tmpNode.isParent && root.dragNodeShowBefore[tmpNode.tId] && !tmpNode.open) {
+ view.expandCollapseNode(setting, tmpNode, !tmpNode.open);
+ delete root.dragNodeShowBefore[tmpNode.tId];
+ }
+ }
+
+ if (curNode) curNode.remove();
+ if (tmpArrow) tmpArrow.remove();
+
+ var isCopy = ((event.ctrlKey || event.metaKey) && setting.edit.drag.isMove && setting.edit.drag.isCopy) || (!setting.edit.drag.isMove && setting.edit.drag.isCopy);
+ if (!isCopy && tmpTarget && tmpTargetNodeId && nodes[0].parentTId && tmpTargetNodeId==nodes[0].parentTId && moveType == consts.move.TYPE_INNER) {
+ tmpTarget = null;
+ }
+ if (tmpTarget) {
+ var dragTargetNode = tmpTargetNodeId == null ? null: data.getNodeCache(targetSetting, tmpTargetNodeId);
+ if (tools.apply(setting.callback.beforeDrop, [targetSetting.treeId, nodes, dragTargetNode, moveType, isCopy], true) == false) {
+ view.selectNodes(sourceSetting, nodes);
+ return;
+ }
+ var newNodes = isCopy ? tools.clone(nodes) : nodes;
+
+ function dropCallback() {
+ if (isOtherTree) {
+ if (!isCopy) {
+ for(var i=0, l=nodes.length; i<l; i++) {
+ view.removeNode(setting, nodes[i]);
+ }
+ }
+ if (moveType == consts.move.TYPE_INNER) {
+ view.addNodes(targetSetting, dragTargetNode, newNodes);
+ } else {
+ view.addNodes(targetSetting, dragTargetNode.getParentNode(), newNodes);
+ if (moveType == consts.move.TYPE_PREV) {
+ for (i=0, l=newNodes.length; i<l; i++) {
+ view.moveNode(targetSetting, dragTargetNode, newNodes[i], moveType, false);
+ }
+ } else {
+ for (i=-1, l=newNodes.length-1; i<l; l--) {
+ view.moveNode(targetSetting, dragTargetNode, newNodes[l], moveType, false);
+ }
+ }
+ }
+ } else {
+ if (isCopy && moveType == consts.move.TYPE_INNER) {
+ view.addNodes(targetSetting, dragTargetNode, newNodes);
+ } else {
+ if (isCopy) {
+ view.addNodes(targetSetting, dragTargetNode.getParentNode(), newNodes);
+ }
+ if (moveType != consts.move.TYPE_NEXT) {
+ for (i=0, l=newNodes.length; i<l; i++) {
+ view.moveNode(targetSetting, dragTargetNode, newNodes[i], moveType, false);
+ }
+ } else {
+ for (i=-1, l=newNodes.length-1; i<l; l--) {
+ view.moveNode(targetSetting, dragTargetNode, newNodes[l], moveType, false);
+ }
+ }
+ }
+ }
+ view.selectNodes(targetSetting, newNodes);
+ $$(newNodes[0], setting).focus().blur();
+
+ setting.treeObj.trigger(consts.event.DROP, [event, targetSetting.treeId, newNodes, dragTargetNode, moveType, isCopy]);
+ }
+
+ if (moveType == consts.move.TYPE_INNER && tools.canAsync(targetSetting, dragTargetNode)) {
+ view.asyncNode(targetSetting, dragTargetNode, false, dropCallback);
+ } else {
+ dropCallback();
+ }
+
+ } else {
+ view.selectNodes(sourceSetting, nodes);
+ setting.treeObj.trigger(consts.event.DROP, [event, setting.treeId, nodes, null, null, null]);
+ }
+ }
+
+ doc.bind("selectstart", _docSelect);
+ function _docSelect() {
+ return false;
+ }
+
+ //Avoid FireFox's Bug
+ //If zTree Div CSS set 'overflow', so drag node outside of zTree, and event.target is error.
+ if(eventMouseDown.preventDefault) {
+ eventMouseDown.preventDefault();
+ }
+ return true;
+ }
+ },
+ //method of tools for zTree
+ _tools = {
+ getAbs: function (obj) {
+ var oRect = obj.getBoundingClientRect(),
+ scrollTop = document.body.scrollTop+document.documentElement.scrollTop,
+ scrollLeft = document.body.scrollLeft+document.documentElement.scrollLeft;
+ return [oRect.left+scrollLeft,oRect.top+scrollTop];
+ },
+ inputFocus: function(inputObj) {
+ if (inputObj.get(0)) {
+ inputObj.focus();
+ tools.setCursorPosition(inputObj.get(0), inputObj.val().length);
+ }
+ },
+ inputSelect: function(inputObj) {
+ if (inputObj.get(0)) {
+ inputObj.focus();
+ inputObj.select();
+ }
+ },
+ setCursorPosition: function(obj, pos){
+ if(obj.setSelectionRange) {
+ obj.focus();
+ obj.setSelectionRange(pos,pos);
+ } else if (obj.createTextRange) {
+ var range = obj.createTextRange();
+ range.collapse(true);
+ range.moveEnd('character', pos);
+ range.moveStart('character', pos);
+ range.select();
+ }
+ },
+ showIfameMask: function(setting, showSign) {
+ var root = data.getRoot(setting);
+ //clear full mask
+ while (root.dragMaskList.length > 0) {
+ root.dragMaskList[0].remove();
+ root.dragMaskList.shift();
+ }
+ if (showSign) {
+ //show mask
+ var iframeList = $$("iframe", setting);
+ for (var i = 0, l = iframeList.length; i < l; i++) {
+ var obj = iframeList.get(i),
+ r = tools.getAbs(obj),
+ dragMask = $$("<div id='zTreeMask_" + i + "' class='zTreeMask' style='top:" + r[1] + "px; left:" + r[0] + "px; width:" + obj.offsetWidth + "px; height:" + obj.offsetHeight + "px;'></div>", setting);
+ dragMask.appendTo($$("body", setting));
+ root.dragMaskList.push(dragMask);
+ }
+ }
+ }
+ },
+ //method of operate ztree dom
+ _view = {
+ addEditBtn: function(setting, node) {
+ if (node.editNameFlag || $$(node, consts.id.EDIT, setting).length > 0) {
+ return;
+ }
+ if (!tools.apply(setting.edit.showRenameBtn, [setting.treeId, node], setting.edit.showRenameBtn)) {
+ return;
+ }
+ var aObj = $$(node, consts.id.A, setting),
+ editStr = "<span class='" + consts.className.BUTTON + " edit' id='" + node.tId + consts.id.EDIT + "' title='"+tools.apply(setting.edit.renameTitle, [setting.treeId, node], setting.edit.renameTitle)+"' treeNode"+consts.id.EDIT+" style='display:none;'></span>";
+ aObj.append(editStr);
+
+ $$(node, consts.id.EDIT, setting).bind('click',
+ function() {
+ if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeEditName, [setting.treeId, node], true) == false) return false;
+ view.editNode(setting, node);
+ return false;
+ }
+ ).show();
+ },
+ addRemoveBtn: function(setting, node) {
+ if (node.editNameFlag || $$(node, consts.id.REMOVE, setting).length > 0) {
+ return;
+ }
+ if (!tools.apply(setting.edit.showRemoveBtn, [setting.treeId, node], setting.edit.showRemoveBtn)) {
+ return;
+ }
+ var aObj = $$(node, consts.id.A, setting),
+ removeStr = "<span class='" + consts.className.BUTTON + " remove' id='" + node.tId + consts.id.REMOVE + "' title='"+tools.apply(setting.edit.removeTitle, [setting.treeId, node], setting.edit.removeTitle)+"' treeNode"+consts.id.REMOVE+" style='display:none;'></span>";
+ aObj.append(removeStr);
+
+ $$(node, consts.id.REMOVE, setting).bind('click',
+ function() {
+ if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return false;
+ view.removeNode(setting, node);
+ setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]);
+ return false;
+ }
+ ).bind('mousedown',
+ function(eventMouseDown) {
+ return true;
+ }
+ ).show();
+ },
+ addHoverDom: function(setting, node) {
+ if (data.getRoots().showHoverDom) {
+ node.isHover = true;
+ if (setting.edit.enable) {
+ view.addEditBtn(setting, node);
+ view.addRemoveBtn(setting, node);
+ }
+ tools.apply(setting.view.addHoverDom, [setting.treeId, node]);
+ }
+ },
+ cancelCurEditNode: function (setting, forceName, isCancel) {
+ var root = data.getRoot(setting),
+ nameKey = setting.data.key.name,
+ node = root.curEditNode;
+
+ if (node) {
+ var inputObj = root.curEditInput,
+ newName = forceName ? forceName:(isCancel ? node[nameKey]: inputObj.val());
+ if (tools.apply(setting.callback.beforeRename, [setting.treeId, node, newName, isCancel], true) === false) {
+ return false;
+ } else {
+ node[nameKey] = newName;
+ setting.treeObj.trigger(consts.event.RENAME, [setting.treeId, node, isCancel]);
+ }
+ var aObj = $$(node, consts.id.A, setting);
+ aObj.removeClass(consts.node.CURSELECTED_EDIT);
+ inputObj.unbind();
+ view.setNodeName(setting, node);
+ node.editNameFlag = false;
+ root.curEditNode = null;
+ root.curEditInput = null;
+ view.selectNode(setting, node, false);
+ }
+ root.noSelection = true;
+ return true;
+ },
+ editNode: function(setting, node) {
+ var root = data.getRoot(setting);
+ view.editNodeBlur = false;
+ if (data.isSelectedNode(setting, node) && root.curEditNode == node && node.editNameFlag) {
+ setTimeout(function() {tools.inputFocus(root.curEditInput);}, 0);
+ return;
+ }
+ var nameKey = setting.data.key.name;
+ node.editNameFlag = true;
+ view.removeTreeDom(setting, node);
+ view.cancelCurEditNode(setting);
+ view.selectNode(setting, node, false);
+ $$(node, consts.id.SPAN, setting).html("<input type=text class='rename' id='" + node.tId + consts.id.INPUT + "' treeNode" + consts.id.INPUT + " >");
+ var inputObj = $$(node, consts.id.INPUT, setting);
+ inputObj.attr("value", node[nameKey]);
+ if (setting.edit.editNameSelectAll) {
+ tools.inputSelect(inputObj);
+ } else {
+ tools.inputFocus(inputObj);
+ }
+
+ inputObj.bind('blur', function(event) {
+ if (!view.editNodeBlur) {
+ view.cancelCurEditNode(setting);
+ }
+ }).bind('keydown', function(event) {
+ if (event.keyCode=="13") {
+ view.editNodeBlur = true;
+ view.cancelCurEditNode(setting);
+ } else if (event.keyCode=="27") {
+ view.cancelCurEditNode(setting, null, true);
+ }
+ }).bind('click', function(event) {
+ return false;
+ }).bind('dblclick', function(event) {
+ return false;
+ });
+
+ $$(node, consts.id.A, setting).addClass(consts.node.CURSELECTED_EDIT);
+ root.curEditInput = inputObj;
+ root.noSelection = false;
+ root.curEditNode = node;
+ },
+ moveNode: function(setting, targetNode, node, moveType, animateFlag, isSilent) {
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children;
+ if (targetNode == node) return;
+ if (setting.data.keep.leaf && targetNode && !targetNode.isParent && moveType == consts.move.TYPE_INNER) return;
+ var oldParentNode = (node.parentTId ? node.getParentNode(): root),
+ targetNodeIsRoot = (targetNode === null || targetNode == root);
+ if (targetNodeIsRoot && targetNode === null) targetNode = root;
+ if (targetNodeIsRoot) moveType = consts.move.TYPE_INNER;
+ var targetParentNode = (targetNode.parentTId ? targetNode.getParentNode() : root);
+
+ if (moveType != consts.move.TYPE_PREV && moveType != consts.move.TYPE_NEXT) {
+ moveType = consts.move.TYPE_INNER;
+ }
+
+ if (moveType == consts.move.TYPE_INNER) {
+ if (targetNodeIsRoot) {
+ //parentTId of root node is null
+ node.parentTId = null;
+ } else {
+ if (!targetNode.isParent) {
+ targetNode.isParent = true;
+ targetNode.open = !!targetNode.open;
+ view.setNodeLineIcos(setting, targetNode);
+ }
+ node.parentTId = targetNode.tId;
+ }
+ }
+
+ //move node Dom
+ var targetObj, target_ulObj;
+ if (targetNodeIsRoot) {
+ targetObj = setting.treeObj;
+ target_ulObj = targetObj;
+ } else {
+ if (!isSilent && moveType == consts.move.TYPE_INNER) {
+ view.expandCollapseNode(setting, targetNode, true, false);
+ } else if (!isSilent) {
+ view.expandCollapseNode(setting, targetNode.getParentNode(), true, false);
+ }
+ targetObj = $$(targetNode, setting);
+ target_ulObj = $$(targetNode, consts.id.UL, setting);
+ if (!!targetObj.get(0) && !target_ulObj.get(0)) {
+ var ulstr = [];
+ view.makeUlHtml(setting, targetNode, ulstr, '');
+ targetObj.append(ulstr.join(''));
+ }
+ target_ulObj = $$(targetNode, consts.id.UL, setting);
+ }
+ var nodeDom = $$(node, setting);
+ if (!nodeDom.get(0)) {
+ nodeDom = view.appendNodes(setting, node.level, [node], null, false, true).join('');
+ } else if (!targetObj.get(0)) {
+ nodeDom.remove();
+ }
+ if (target_ulObj.get(0) && moveType == consts.move.TYPE_INNER) {
+ target_ulObj.append(nodeDom);
+ } else if (targetObj.get(0) && moveType == consts.move.TYPE_PREV) {
+ targetObj.before(nodeDom);
+ } else if (targetObj.get(0) && moveType == consts.move.TYPE_NEXT) {
+ targetObj.after(nodeDom);
+ }
+
+ //repair the data after move
+ var i,l,
+ tmpSrcIndex = -1,
+ tmpTargetIndex = 0,
+ oldNeighbor = null,
+ newNeighbor = null,
+ oldLevel = node.level;
+ if (node.isFirstNode) {
+ tmpSrcIndex = 0;
+ if (oldParentNode[childKey].length > 1 ) {
+ oldNeighbor = oldParentNode[childKey][1];
+ oldNeighbor.isFirstNode = true;
+ }
+ } else if (node.isLastNode) {
+ tmpSrcIndex = oldParentNode[childKey].length -1;
+ oldNeighbor = oldParentNode[childKey][tmpSrcIndex - 1];
+ oldNeighbor.isLastNode = true;
+ } else {
+ for (i = 0, l = oldParentNode[childKey].length; i < l; i++) {
+ if (oldParentNode[childKey][i].tId == node.tId) {
+ tmpSrcIndex = i;
+ break;
+ }
+ }
+ }
+ if (tmpSrcIndex >= 0) {
+ oldParentNode[childKey].splice(tmpSrcIndex, 1);
+ }
+ if (moveType != consts.move.TYPE_INNER) {
+ for (i = 0, l = targetParentNode[childKey].length; i < l; i++) {
+ if (targetParentNode[childKey][i].tId == targetNode.tId) tmpTargetIndex = i;
+ }
+ }
+ if (moveType == consts.move.TYPE_INNER) {
+ if (!targetNode[childKey]) targetNode[childKey] = new Array();
+ if (targetNode[childKey].length > 0) {
+ newNeighbor = targetNode[childKey][targetNode[childKey].length - 1];
+ newNeighbor.isLastNode = false;
+ }
+ targetNode[childKey].splice(targetNode[childKey].length, 0, node);
+ node.isLastNode = true;
+ node.isFirstNode = (targetNode[childKey].length == 1);
+ } else if (targetNode.isFirstNode && moveType == consts.move.TYPE_PREV) {
+ targetParentNode[childKey].splice(tmpTargetIndex, 0, node);
+ newNeighbor = targetNode;
+ newNeighbor.isFirstNode = false;
+ node.parentTId = targetNode.parentTId;
+ node.isFirstNode = true;
+ node.isLastNode = false;
+
+ } else if (targetNode.isLastNode && moveType == consts.move.TYPE_NEXT) {
+ targetParentNode[childKey].splice(tmpTargetIndex + 1, 0, node);
+ newNeighbor = targetNode;
+ newNeighbor.isLastNode = false;
+ node.parentTId = targetNode.parentTId;
+ node.isFirstNode = false;
+ node.isLastNode = true;
+
+ } else {
+ if (moveType == consts.move.TYPE_PREV) {
+ targetParentNode[childKey].splice(tmpTargetIndex, 0, node);
+ } else {
+ targetParentNode[childKey].splice(tmpTargetIndex + 1, 0, node);
+ }
+ node.parentTId = targetNode.parentTId;
+ node.isFirstNode = false;
+ node.isLastNode = false;
+ }
+ data.fixPIdKeyValue(setting, node);
+ data.setSonNodeLevel(setting, node.getParentNode(), node);
+
+ //repair node what been moved
+ view.setNodeLineIcos(setting, node);
+ view.repairNodeLevelClass(setting, node, oldLevel)
+
+ //repair node's old parentNode dom
+ if (!setting.data.keep.parent && oldParentNode[childKey].length < 1) {
+ //old parentNode has no child nodes
+ oldParentNode.isParent = false;
+ oldParentNode.open = false;
+ var tmp_ulObj = $$(oldParentNode, consts.id.UL, setting),
+ tmp_switchObj = $$(oldParentNode, consts.id.SWITCH, setting),
+ tmp_icoObj = $$(oldParentNode, consts.id.ICON, setting);
+ view.replaceSwitchClass(oldParentNode, tmp_switchObj, consts.folder.DOCU);
+ view.replaceIcoClass(oldParentNode, tmp_icoObj, consts.folder.DOCU);
+ tmp_ulObj.css("display", "none");
+
+ } else if (oldNeighbor) {
+ //old neigbor node
+ view.setNodeLineIcos(setting, oldNeighbor);
+ }
+
+ //new neigbor node
+ if (newNeighbor) {
+ view.setNodeLineIcos(setting, newNeighbor);
+ }
+
+ //repair checkbox / radio
+ if (!!setting.check && setting.check.enable && view.repairChkClass) {
+ view.repairChkClass(setting, oldParentNode);
+ view.repairParentChkClassWithSelf(setting, oldParentNode);
+ if (oldParentNode != node.parent)
+ view.repairParentChkClassWithSelf(setting, node);
+ }
+
+ //expand parents after move
+ if (!isSilent) {
+ view.expandCollapseParentNode(setting, node.getParentNode(), true, animateFlag);
+ }
+ },
+ removeEditBtn: function(setting, node) {
+ $$(node, consts.id.EDIT, setting).unbind().remove();
+ },
+ removeRemoveBtn: function(setting, node) {
+ $$(node, consts.id.REMOVE, setting).unbind().remove();
+ },
+ removeTreeDom: function(setting, node) {
+ node.isHover = false;
+ view.removeEditBtn(setting, node);
+ view.removeRemoveBtn(setting, node);
+ tools.apply(setting.view.removeHoverDom, [setting.treeId, node]);
+ },
+ repairNodeLevelClass: function(setting, node, oldLevel) {
+ if (oldLevel === node.level) return;
+ var liObj = $$(node, setting),
+ aObj = $$(node, consts.id.A, setting),
+ ulObj = $$(node, consts.id.UL, setting),
+ oldClass = consts.className.LEVEL + oldLevel,
+ newClass = consts.className.LEVEL + node.level;
+ liObj.removeClass(oldClass);
+ liObj.addClass(newClass);
+ aObj.removeClass(oldClass);
+ aObj.addClass(newClass);
+ ulObj.removeClass(oldClass);
+ ulObj.addClass(newClass);
+ },
+ selectNodes : function(setting, nodes) {
+ for (var i=0, l=nodes.length; i<l; i++) {
+ view.selectNode(setting, nodes[i], i>0);
+ }
+ }
+ },
+
+ _z = {
+ tools: _tools,
+ view: _view,
+ event: _event,
+ data: _data
+ };
+ $.extend(true, $.fn.zTree.consts, _consts);
+ $.extend(true, $.fn.zTree._z, _z);
+
+ var zt = $.fn.zTree,
+ tools = zt._z.tools,
+ consts = zt.consts,
+ view = zt._z.view,
+ data = zt._z.data,
+ event = zt._z.event,
+ $$ = tools.$;
+
+ data.exSetting(_setting);
+ data.addInitBind(_bindEvent);
+ data.addInitUnBind(_unbindEvent);
+ data.addInitCache(_initCache);
+ data.addInitNode(_initNode);
+ data.addInitProxy(_eventProxy);
+ data.addInitRoot(_initRoot);
+ data.addZTreeTools(_zTreeTools);
+
+ var _cancelPreSelectedNode = view.cancelPreSelectedNode;
+ view.cancelPreSelectedNode = function (setting, node) {
+ var list = data.getRoot(setting).curSelectedList;
+ for (var i=0, j=list.length; i<j; i++) {
+ if (!node || node === list[i]) {
+ view.removeTreeDom(setting, list[i]);
+ if (node) break;
+ }
+ }
+ if (_cancelPreSelectedNode) _cancelPreSelectedNode.apply(view, arguments);
+ }
+
+ var _createNodes = view.createNodes;
+ view.createNodes = function(setting, level, nodes, parentNode) {
+ if (_createNodes) {
+ _createNodes.apply(view, arguments);
+ }
+ if (!nodes) return;
+ if (view.repairParentChkClassWithSelf) {
+ view.repairParentChkClassWithSelf(setting, parentNode);
+ }
+ }
+
+ var _makeNodeUrl = view.makeNodeUrl;
+ view.makeNodeUrl = function(setting, node) {
+ return setting.edit.enable ? null : (_makeNodeUrl.apply(view, arguments));
+ }
+
+ var _removeNode = view.removeNode;
+ view.removeNode = function(setting, node) {
+ var root = data.getRoot(setting);
+ if (root.curEditNode === node) root.curEditNode = null;
+ if (_removeNode) {
+ _removeNode.apply(view, arguments);
+ }
+ }
+
+ var _selectNode = view.selectNode;
+ view.selectNode = function(setting, node, addFlag) {
+ var root = data.getRoot(setting);
+ if (data.isSelectedNode(setting, node) && root.curEditNode == node && node.editNameFlag) {
+ return false;
+ }
+ if (_selectNode) _selectNode.apply(view, arguments);
+ view.addHoverDom(setting, node);
+ return true;
+ }
+
+ var _uCanDo = tools.uCanDo;
+ tools.uCanDo = function(setting, e) {
+ var root = data.getRoot(setting);
+ if (e && (tools.eqs(e.type, "mouseover") || tools.eqs(e.type, "mouseout") || tools.eqs(e.type, "mousedown") || tools.eqs(e.type, "mouseup"))) {
+ return true;
+ }
+ if (root.curEditNode) {
+ view.editNodeBlur = false;
+ root.curEditInput.focus();
+ }
+ return (!root.curEditNode) && (_uCanDo ? _uCanDo.apply(view, arguments) : true);
+ }
+})(jQuery); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.exedit.min.js b/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.exedit.min.js
new file mode 100644
index 0000000..2e74832
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.exedit.min.js
@@ -0,0 +1,53 @@
+/*
+ * JQuery zTree exedit v3.5.16
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2014-03-09
+ */
+(function(w){var I={event:{DRAG:"ztree_drag",DROP:"ztree_drop",RENAME:"ztree_rename",DRAGMOVE:"ztree_dragmove"},id:{EDIT:"_edit",INPUT:"_input",REMOVE:"_remove"},move:{TYPE_INNER:"inner",TYPE_PREV:"prev",TYPE_NEXT:"next"},node:{CURSELECTED_EDIT:"curSelectedNode_Edit",TMPTARGET_TREE:"tmpTargetzTree",TMPTARGET_NODE:"tmpTargetNode"}},x={onHoverOverNode:function(b,a){var c=m.getSetting(b.data.treeId),d=m.getRoot(c);if(d.curHoverNode!=a)x.onHoverOutNode(b);d.curHoverNode=a;f.addHoverDom(c,a)},onHoverOutNode:function(b){var b=
+m.getSetting(b.data.treeId),a=m.getRoot(b);if(a.curHoverNode&&!m.isSelectedNode(b,a.curHoverNode))f.removeTreeDom(b,a.curHoverNode),a.curHoverNode=null},onMousedownNode:function(b,a){function c(b){if(C.dragFlag==0&&Math.abs(N-b.clientX)<e.edit.drag.minMoveSize&&Math.abs(O-b.clientY)<e.edit.drag.minMoveSize)return!0;var a,c,n,k,i;i=e.data.key.children;M.css("cursor","pointer");if(C.dragFlag==0){if(g.apply(e.callback.beforeDrag,[e.treeId,l],!0)==!1)return r(b),!0;for(a=0,c=l.length;a<c;a++){if(a==0)C.dragNodeShowBefore=
+[];n=l[a];n.isParent&&n.open?(f.expandCollapseNode(e,n,!n.open),C.dragNodeShowBefore[n.tId]=!0):C.dragNodeShowBefore[n.tId]=!1}C.dragFlag=1;t.showHoverDom=!1;g.showIfameMask(e,!0);n=!0;k=-1;if(l.length>1){var j=l[0].parentTId?l[0].getParentNode()[i]:m.getNodes(e);i=[];for(a=0,c=j.length;a<c;a++)if(C.dragNodeShowBefore[j[a].tId]!==void 0&&(n&&k>-1&&k+1!==a&&(n=!1),i.push(j[a]),k=a),l.length===i.length){l=i;break}}n&&(H=l[0].getPreNode(),R=l[l.length-1].getNextNode());D=o("<ul class='zTreeDragUL'></ul>",
+e);for(a=0,c=l.length;a<c;a++)n=l[a],n.editNameFlag=!1,f.selectNode(e,n,a>0),f.removeTreeDom(e,n),a>e.edit.drag.maxShowNodeNum-1||(k=o("<li id='"+n.tId+"_tmp'></li>",e),k.append(o(n,d.id.A,e).clone()),k.css("padding","0"),k.children("#"+n.tId+d.id.A).removeClass(d.node.CURSELECTED),D.append(k),a==e.edit.drag.maxShowNodeNum-1&&(k=o("<li id='"+n.tId+"_moretmp'><a> ... </a></li>",e),D.append(k)));D.attr("id",l[0].tId+d.id.UL+"_tmp");D.addClass(e.treeObj.attr("class"));D.appendTo(M);B=o("<span class='tmpzTreeMove_arrow'></span>",
+e);B.attr("id","zTreeMove_arrow_tmp");B.appendTo(M);e.treeObj.trigger(d.event.DRAG,[b,e.treeId,l])}if(C.dragFlag==1){s&&B.attr("id")==b.target.id&&u&&b.clientX+F.scrollLeft()+2>w("#"+u+d.id.A,s).offset().left?(n=w("#"+u+d.id.A,s),b.target=n.length>0?n.get(0):b.target):s&&(s.removeClass(d.node.TMPTARGET_TREE),u&&w("#"+u+d.id.A,s).removeClass(d.node.TMPTARGET_NODE+"_"+d.move.TYPE_PREV).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_NEXT).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_INNER));
+u=s=null;J=!1;h=e;n=m.getSettings();for(var y in n)if(n[y].treeId&&n[y].edit.enable&&n[y].treeId!=e.treeId&&(b.target.id==n[y].treeId||w(b.target).parents("#"+n[y].treeId).length>0))J=!0,h=n[y];y=F.scrollTop();k=F.scrollLeft();i=h.treeObj.offset();a=h.treeObj.get(0).scrollHeight;n=h.treeObj.get(0).scrollWidth;c=b.clientY+y-i.top;var p=h.treeObj.height()+i.top-b.clientY-y,q=b.clientX+k-i.left,x=h.treeObj.width()+i.left-b.clientX-k;i=c<e.edit.drag.borderMax&&c>e.edit.drag.borderMin;var j=p<e.edit.drag.borderMax&&
+p>e.edit.drag.borderMin,K=q<e.edit.drag.borderMax&&q>e.edit.drag.borderMin,G=x<e.edit.drag.borderMax&&x>e.edit.drag.borderMin,p=c>e.edit.drag.borderMin&&p>e.edit.drag.borderMin&&q>e.edit.drag.borderMin&&x>e.edit.drag.borderMin,q=i&&h.treeObj.scrollTop()<=0,x=j&&h.treeObj.scrollTop()+h.treeObj.height()+10>=a,P=K&&h.treeObj.scrollLeft()<=0,Q=G&&h.treeObj.scrollLeft()+h.treeObj.width()+10>=n;if(b.target&&g.isChildOrSelf(b.target,h.treeId)){for(var E=b.target;E&&E.tagName&&!g.eqs(E.tagName,"li")&&E.id!=
+h.treeId;)E=E.parentNode;var S=!0;for(a=0,c=l.length;a<c;a++)if(n=l[a],E.id===n.tId){S=!1;break}else if(o(n,e).find("#"+E.id).length>0){S=!1;break}if(S&&b.target&&g.isChildOrSelf(b.target,E.id+d.id.A))s=w(E),u=E.id}n=l[0];if(p&&g.isChildOrSelf(b.target,h.treeId)){if(!s&&(b.target.id==h.treeId||q||x||P||Q)&&(J||!J&&n.parentTId))s=h.treeObj;i?h.treeObj.scrollTop(h.treeObj.scrollTop()-10):j&&h.treeObj.scrollTop(h.treeObj.scrollTop()+10);K?h.treeObj.scrollLeft(h.treeObj.scrollLeft()-10):G&&h.treeObj.scrollLeft(h.treeObj.scrollLeft()+
+10);s&&s!=h.treeObj&&s.offset().left<h.treeObj.offset().left&&h.treeObj.scrollLeft(h.treeObj.scrollLeft()+s.offset().left-h.treeObj.offset().left)}D.css({top:b.clientY+y+3+"px",left:b.clientX+k+3+"px"});i=a=0;if(s&&s.attr("id")!=h.treeId){var z=u==null?null:m.getNodeCache(h,u);c=(b.ctrlKey||b.metaKey)&&e.edit.drag.isMove&&e.edit.drag.isCopy||!e.edit.drag.isMove&&e.edit.drag.isCopy;a=!!(H&&u===H.tId);i=!!(R&&u===R.tId);k=n.parentTId&&n.parentTId==u;n=(c||!i)&&g.apply(h.edit.drag.prev,[h.treeId,l,z],
+!!h.edit.drag.prev);a=(c||!a)&&g.apply(h.edit.drag.next,[h.treeId,l,z],!!h.edit.drag.next);G=(c||!k)&&!(h.data.keep.leaf&&!z.isParent)&&g.apply(h.edit.drag.inner,[h.treeId,l,z],!!h.edit.drag.inner);if(!n&&!a&&!G){if(s=null,u="",v=d.move.TYPE_INNER,B.css({display:"none"}),window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null}else{c=w("#"+u+d.id.A,s);i=z.isLastNode?null:w("#"+z.getNextNode().tId+d.id.A,s.next());j=c.offset().top;k=c.offset().left;K=n?G?0.25:a?
+0.5:1:-1;G=a?G?0.75:n?0.5:0:-1;y=(b.clientY+y-j)/c.height();(K==1||y<=K&&y>=-0.2)&&n?(a=1-B.width(),i=j-B.height()/2,v=d.move.TYPE_PREV):(G==0||y>=G&&y<=1.2)&&a?(a=1-B.width(),i=i==null||z.isParent&&z.open?j+c.height()-B.height()/2:i.offset().top-B.height()/2,v=d.move.TYPE_NEXT):(a=5-B.width(),i=j,v=d.move.TYPE_INNER);B.css({display:"block",top:i+"px",left:k+a+"px"});c.addClass(d.node.TMPTARGET_NODE+"_"+v);if(T!=u||U!=v)L=(new Date).getTime();if(z&&z.isParent&&v==d.move.TYPE_INNER&&(y=!0,window.zTreeMoveTimer&&
+window.zTreeMoveTargetNodeTId!==z.tId?(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null):window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId===z.tId&&(y=!1),y))window.zTreeMoveTimer=setTimeout(function(){v==d.move.TYPE_INNER&&z&&z.isParent&&!z.open&&(new Date).getTime()-L>h.edit.drag.autoOpenTime&&g.apply(h.callback.beforeDragOpen,[h.treeId,z],!0)&&(f.switchNode(h,z),h.edit.drag.autoExpandTrigger&&h.treeObj.trigger(d.event.EXPAND,[h.treeId,z]))},h.edit.drag.autoOpenTime+50),
+window.zTreeMoveTargetNodeTId=z.tId}}else if(v=d.move.TYPE_INNER,s&&g.apply(h.edit.drag.inner,[h.treeId,l,null],!!h.edit.drag.inner)?s.addClass(d.node.TMPTARGET_TREE):s=null,B.css({display:"none"}),window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null;T=u;U=v;e.treeObj.trigger(d.event.DRAGMOVE,[b,e.treeId,l])}return!1}function r(b){if(window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null;U=T=null;F.unbind("mousemove",c);
+F.unbind("mouseup",r);F.unbind("selectstart",k);M.css("cursor","auto");s&&(s.removeClass(d.node.TMPTARGET_TREE),u&&w("#"+u+d.id.A,s).removeClass(d.node.TMPTARGET_NODE+"_"+d.move.TYPE_PREV).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_NEXT).removeClass(d.node.TMPTARGET_NODE+"_"+I.move.TYPE_INNER));g.showIfameMask(e,!1);t.showHoverDom=!0;if(C.dragFlag!=0){C.dragFlag=0;var a,i,j;for(a=0,i=l.length;a<i;a++)j=l[a],j.isParent&&C.dragNodeShowBefore[j.tId]&&!j.open&&(f.expandCollapseNode(e,j,!j.open),
+delete C.dragNodeShowBefore[j.tId]);D&&D.remove();B&&B.remove();var p=(b.ctrlKey||b.metaKey)&&e.edit.drag.isMove&&e.edit.drag.isCopy||!e.edit.drag.isMove&&e.edit.drag.isCopy;!p&&s&&u&&l[0].parentTId&&u==l[0].parentTId&&v==d.move.TYPE_INNER&&(s=null);if(s){var q=u==null?null:m.getNodeCache(h,u);if(g.apply(e.callback.beforeDrop,[h.treeId,l,q,v,p],!0)==!1)f.selectNodes(x,l);else{var A=p?g.clone(l):l;a=function(){if(J){if(!p)for(var a=0,c=l.length;a<c;a++)f.removeNode(e,l[a]);if(v==d.move.TYPE_INNER)f.addNodes(h,
+q,A);else if(f.addNodes(h,q.getParentNode(),A),v==d.move.TYPE_PREV)for(a=0,c=A.length;a<c;a++)f.moveNode(h,q,A[a],v,!1);else for(a=-1,c=A.length-1;a<c;c--)f.moveNode(h,q,A[c],v,!1)}else if(p&&v==d.move.TYPE_INNER)f.addNodes(h,q,A);else if(p&&f.addNodes(h,q.getParentNode(),A),v!=d.move.TYPE_NEXT)for(a=0,c=A.length;a<c;a++)f.moveNode(h,q,A[a],v,!1);else for(a=-1,c=A.length-1;a<c;c--)f.moveNode(h,q,A[c],v,!1);f.selectNodes(h,A);o(A[0],e).focus().blur();e.treeObj.trigger(d.event.DROP,[b,h.treeId,A,q,
+v,p])};v==d.move.TYPE_INNER&&g.canAsync(h,q)?f.asyncNode(h,q,!1,a):a()}}else f.selectNodes(x,l),e.treeObj.trigger(d.event.DROP,[b,e.treeId,l,null,null,null])}}function k(){return!1}var i,j,e=m.getSetting(b.data.treeId),C=m.getRoot(e),t=m.getRoots();if(b.button==2||!e.edit.enable||!e.edit.drag.isCopy&&!e.edit.drag.isMove)return!0;var p=b.target,q=m.getRoot(e).curSelectedList,l=[];if(m.isSelectedNode(e,a))for(i=0,j=q.length;i<j;i++){if(q[i].editNameFlag&&g.eqs(p.tagName,"input")&&p.getAttribute("treeNode"+
+d.id.INPUT)!==null)return!0;l.push(q[i]);if(l[0].parentTId!==q[i].parentTId){l=[a];break}}else l=[a];f.editNodeBlur=!0;f.cancelCurEditNode(e);var F=w(e.treeObj.get(0).ownerDocument),M=w(e.treeObj.get(0).ownerDocument.body),D,B,s,J=!1,h=e,x=e,H,R,T=null,U=null,u=null,v=d.move.TYPE_INNER,N=b.clientX,O=b.clientY,L=(new Date).getTime();g.uCanDo(e)&&F.bind("mousemove",c);F.bind("mouseup",r);F.bind("selectstart",k);b.preventDefault&&b.preventDefault();return!0}};w.extend(!0,w.fn.zTree.consts,I);w.extend(!0,
+w.fn.zTree._z,{tools:{getAbs:function(b){b=b.getBoundingClientRect();return[b.left+(document.body.scrollLeft+document.documentElement.scrollLeft),b.top+(document.body.scrollTop+document.documentElement.scrollTop)]},inputFocus:function(b){b.get(0)&&(b.focus(),g.setCursorPosition(b.get(0),b.val().length))},inputSelect:function(b){b.get(0)&&(b.focus(),b.select())},setCursorPosition:function(b,a){if(b.setSelectionRange)b.focus(),b.setSelectionRange(a,a);else if(b.createTextRange){var c=b.createTextRange();
+c.collapse(!0);c.moveEnd("character",a);c.moveStart("character",a);c.select()}},showIfameMask:function(b,a){for(var c=m.getRoot(b);c.dragMaskList.length>0;)c.dragMaskList[0].remove(),c.dragMaskList.shift();if(a)for(var d=o("iframe",b),f=0,i=d.length;f<i;f++){var j=d.get(f),e=g.getAbs(j),j=o("<div id='zTreeMask_"+f+"' class='zTreeMask' style='top:"+e[1]+"px; left:"+e[0]+"px; width:"+j.offsetWidth+"px; height:"+j.offsetHeight+"px;'></div>",b);j.appendTo(o("body",b));c.dragMaskList.push(j)}}},view:{addEditBtn:function(b,
+a){if(!(a.editNameFlag||o(a,d.id.EDIT,b).length>0)&&g.apply(b.edit.showRenameBtn,[b.treeId,a],b.edit.showRenameBtn)){var c=o(a,d.id.A,b),r="<span class='"+d.className.BUTTON+" edit' id='"+a.tId+d.id.EDIT+"' title='"+g.apply(b.edit.renameTitle,[b.treeId,a],b.edit.renameTitle)+"' treeNode"+d.id.EDIT+" style='display:none;'></span>";c.append(r);o(a,d.id.EDIT,b).bind("click",function(){if(!g.uCanDo(b)||g.apply(b.callback.beforeEditName,[b.treeId,a],!0)==!1)return!1;f.editNode(b,a);return!1}).show()}},
+addRemoveBtn:function(b,a){if(!(a.editNameFlag||o(a,d.id.REMOVE,b).length>0)&&g.apply(b.edit.showRemoveBtn,[b.treeId,a],b.edit.showRemoveBtn)){var c=o(a,d.id.A,b),r="<span class='"+d.className.BUTTON+" remove' id='"+a.tId+d.id.REMOVE+"' title='"+g.apply(b.edit.removeTitle,[b.treeId,a],b.edit.removeTitle)+"' treeNode"+d.id.REMOVE+" style='display:none;'></span>";c.append(r);o(a,d.id.REMOVE,b).bind("click",function(){if(!g.uCanDo(b)||g.apply(b.callback.beforeRemove,[b.treeId,a],!0)==!1)return!1;f.removeNode(b,
+a);b.treeObj.trigger(d.event.REMOVE,[b.treeId,a]);return!1}).bind("mousedown",function(){return!0}).show()}},addHoverDom:function(b,a){if(m.getRoots().showHoverDom)a.isHover=!0,b.edit.enable&&(f.addEditBtn(b,a),f.addRemoveBtn(b,a)),g.apply(b.view.addHoverDom,[b.treeId,a])},cancelCurEditNode:function(b,a,c){var r=m.getRoot(b),k=b.data.key.name,i=r.curEditNode;if(i){var j=r.curEditInput,a=a?a:c?i[k]:j.val();if(g.apply(b.callback.beforeRename,[b.treeId,i,a,c],!0)===!1)return!1;else i[k]=a,b.treeObj.trigger(d.event.RENAME,
+[b.treeId,i,c]);o(i,d.id.A,b).removeClass(d.node.CURSELECTED_EDIT);j.unbind();f.setNodeName(b,i);i.editNameFlag=!1;r.curEditNode=null;r.curEditInput=null;f.selectNode(b,i,!1)}return r.noSelection=!0},editNode:function(b,a){var c=m.getRoot(b);f.editNodeBlur=!1;if(m.isSelectedNode(b,a)&&c.curEditNode==a&&a.editNameFlag)setTimeout(function(){g.inputFocus(c.curEditInput)},0);else{var r=b.data.key.name;a.editNameFlag=!0;f.removeTreeDom(b,a);f.cancelCurEditNode(b);f.selectNode(b,a,!1);o(a,d.id.SPAN,b).html("<input type=text class='rename' id='"+
+a.tId+d.id.INPUT+"' treeNode"+d.id.INPUT+" >");var k=o(a,d.id.INPUT,b);k.attr("value",a[r]);b.edit.editNameSelectAll?g.inputSelect(k):g.inputFocus(k);k.bind("blur",function(){f.editNodeBlur||f.cancelCurEditNode(b)}).bind("keydown",function(a){a.keyCode=="13"?(f.editNodeBlur=!0,f.cancelCurEditNode(b)):a.keyCode=="27"&&f.cancelCurEditNode(b,null,!0)}).bind("click",function(){return!1}).bind("dblclick",function(){return!1});o(a,d.id.A,b).addClass(d.node.CURSELECTED_EDIT);c.curEditInput=k;c.noSelection=
+!1;c.curEditNode=a}},moveNode:function(b,a,c,r,k,i){var j=m.getRoot(b),e=b.data.key.children;if(a!=c&&(!b.data.keep.leaf||!a||a.isParent||r!=d.move.TYPE_INNER)){var g=c.parentTId?c.getParentNode():j,t=a===null||a==j;t&&a===null&&(a=j);if(t)r=d.move.TYPE_INNER;j=a.parentTId?a.getParentNode():j;if(r!=d.move.TYPE_PREV&&r!=d.move.TYPE_NEXT)r=d.move.TYPE_INNER;if(r==d.move.TYPE_INNER)if(t)c.parentTId=null;else{if(!a.isParent)a.isParent=!0,a.open=!!a.open,f.setNodeLineIcos(b,a);c.parentTId=a.tId}var p;
+t?p=t=b.treeObj:(!i&&r==d.move.TYPE_INNER?f.expandCollapseNode(b,a,!0,!1):i||f.expandCollapseNode(b,a.getParentNode(),!0,!1),t=o(a,b),p=o(a,d.id.UL,b),t.get(0)&&!p.get(0)&&(p=[],f.makeUlHtml(b,a,p,""),t.append(p.join(""))),p=o(a,d.id.UL,b));var q=o(c,b);q.get(0)?t.get(0)||q.remove():q=f.appendNodes(b,c.level,[c],null,!1,!0).join("");p.get(0)&&r==d.move.TYPE_INNER?p.append(q):t.get(0)&&r==d.move.TYPE_PREV?t.before(q):t.get(0)&&r==d.move.TYPE_NEXT&&t.after(q);var l=-1,w=0,x=null,t=null,D=c.level;if(c.isFirstNode){if(l=
+0,g[e].length>1)x=g[e][1],x.isFirstNode=!0}else if(c.isLastNode)l=g[e].length-1,x=g[e][l-1],x.isLastNode=!0;else for(p=0,q=g[e].length;p<q;p++)if(g[e][p].tId==c.tId){l=p;break}l>=0&&g[e].splice(l,1);if(r!=d.move.TYPE_INNER)for(p=0,q=j[e].length;p<q;p++)j[e][p].tId==a.tId&&(w=p);if(r==d.move.TYPE_INNER){a[e]||(a[e]=[]);if(a[e].length>0)t=a[e][a[e].length-1],t.isLastNode=!1;a[e].splice(a[e].length,0,c);c.isLastNode=!0;c.isFirstNode=a[e].length==1}else a.isFirstNode&&r==d.move.TYPE_PREV?(j[e].splice(w,
+0,c),t=a,t.isFirstNode=!1,c.parentTId=a.parentTId,c.isFirstNode=!0,c.isLastNode=!1):a.isLastNode&&r==d.move.TYPE_NEXT?(j[e].splice(w+1,0,c),t=a,t.isLastNode=!1,c.parentTId=a.parentTId,c.isFirstNode=!1,c.isLastNode=!0):(r==d.move.TYPE_PREV?j[e].splice(w,0,c):j[e].splice(w+1,0,c),c.parentTId=a.parentTId,c.isFirstNode=!1,c.isLastNode=!1);m.fixPIdKeyValue(b,c);m.setSonNodeLevel(b,c.getParentNode(),c);f.setNodeLineIcos(b,c);f.repairNodeLevelClass(b,c,D);!b.data.keep.parent&&g[e].length<1?(g.isParent=!1,
+g.open=!1,a=o(g,d.id.UL,b),r=o(g,d.id.SWITCH,b),e=o(g,d.id.ICON,b),f.replaceSwitchClass(g,r,d.folder.DOCU),f.replaceIcoClass(g,e,d.folder.DOCU),a.css("display","none")):x&&f.setNodeLineIcos(b,x);t&&f.setNodeLineIcos(b,t);b.check&&b.check.enable&&f.repairChkClass&&(f.repairChkClass(b,g),f.repairParentChkClassWithSelf(b,g),g!=c.parent&&f.repairParentChkClassWithSelf(b,c));i||f.expandCollapseParentNode(b,c.getParentNode(),!0,k)}},removeEditBtn:function(b,a){o(a,d.id.EDIT,b).unbind().remove()},removeRemoveBtn:function(b,
+a){o(a,d.id.REMOVE,b).unbind().remove()},removeTreeDom:function(b,a){a.isHover=!1;f.removeEditBtn(b,a);f.removeRemoveBtn(b,a);g.apply(b.view.removeHoverDom,[b.treeId,a])},repairNodeLevelClass:function(b,a,c){if(c!==a.level){var f=o(a,b),g=o(a,d.id.A,b),b=o(a,d.id.UL,b),c=d.className.LEVEL+c,a=d.className.LEVEL+a.level;f.removeClass(c);f.addClass(a);g.removeClass(c);g.addClass(a);b.removeClass(c);b.addClass(a)}},selectNodes:function(b,a){for(var c=0,d=a.length;c<d;c++)f.selectNode(b,a[c],c>0)}},event:{},
+data:{setSonNodeLevel:function(b,a,c){if(c){var d=b.data.key.children;c.level=a?a.level+1:0;if(c[d])for(var a=0,f=c[d].length;a<f;a++)c[d][a]&&m.setSonNodeLevel(b,c,c[d][a])}}}});var H=w.fn.zTree,g=H._z.tools,d=H.consts,f=H._z.view,m=H._z.data,o=g.$;m.exSetting({edit:{enable:!1,editNameSelectAll:!1,showRemoveBtn:!0,showRenameBtn:!0,removeTitle:"remove",renameTitle:"rename",drag:{autoExpandTrigger:!1,isCopy:!0,isMove:!0,prev:!0,next:!0,inner:!0,minMoveSize:5,borderMax:10,borderMin:-5,maxShowNodeNum:5,
+autoOpenTime:500}},view:{addHoverDom:null,removeHoverDom:null},callback:{beforeDrag:null,beforeDragOpen:null,beforeDrop:null,beforeEditName:null,beforeRename:null,onDrag:null,onDragMove:null,onDrop:null,onRename:null}});m.addInitBind(function(b){var a=b.treeObj,c=d.event;a.bind(c.RENAME,function(a,c,d,f){g.apply(b.callback.onRename,[a,c,d,f])});a.bind(c.DRAG,function(a,c,d,f){g.apply(b.callback.onDrag,[c,d,f])});a.bind(c.DRAGMOVE,function(a,c,d,f){g.apply(b.callback.onDragMove,[c,d,f])});a.bind(c.DROP,
+function(a,c,d,f,e,m,o){g.apply(b.callback.onDrop,[c,d,f,e,m,o])})});m.addInitUnBind(function(b){var b=b.treeObj,a=d.event;b.unbind(a.RENAME);b.unbind(a.DRAG);b.unbind(a.DRAGMOVE);b.unbind(a.DROP)});m.addInitCache(function(){});m.addInitNode(function(b,a,c){if(c)c.isHover=!1,c.editNameFlag=!1});m.addInitProxy(function(b){var a=b.target,c=m.getSetting(b.data.treeId),f=b.relatedTarget,k="",i=null,j="",e=null,o=null;if(g.eqs(b.type,"mouseover")){if(o=g.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+d.id.A}]))k=
+g.getNodeMainDom(o).id,j="hoverOverNode"}else if(g.eqs(b.type,"mouseout"))o=g.getMDom(c,f,[{tagName:"a",attrName:"treeNode"+d.id.A}]),o||(k="remove",j="hoverOutNode");else if(g.eqs(b.type,"mousedown")&&(o=g.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+d.id.A}])))k=g.getNodeMainDom(o).id,j="mousedownNode";if(k.length>0)switch(i=m.getNodeCache(c,k),j){case "mousedownNode":e=x.onMousedownNode;break;case "hoverOverNode":e=x.onHoverOverNode;break;case "hoverOutNode":e=x.onHoverOutNode}return{stop:!1,
+node:i,nodeEventType:j,nodeEventCallback:e,treeEventType:"",treeEventCallback:null}});m.addInitRoot(function(b){var b=m.getRoot(b),a=m.getRoots();b.curEditNode=null;b.curEditInput=null;b.curHoverNode=null;b.dragFlag=0;b.dragNodeShowBefore=[];b.dragMaskList=[];a.showHoverDom=!0});m.addZTreeTools(function(b,a){a.cancelEditName=function(a){m.getRoot(this.setting).curEditNode&&f.cancelCurEditNode(this.setting,a?a:null,!0)};a.copyNode=function(a,b,k,i){if(!b)return null;if(a&&!a.isParent&&this.setting.data.keep.leaf&&
+k===d.move.TYPE_INNER)return null;var j=this,e=g.clone(b);if(!a)a=null,k=d.move.TYPE_INNER;k==d.move.TYPE_INNER?(b=function(){f.addNodes(j.setting,a,[e],i)},g.canAsync(this.setting,a)?f.asyncNode(this.setting,a,i,b):b()):(f.addNodes(this.setting,a.parentNode,[e],i),f.moveNode(this.setting,a,e,k,!1,i));return e};a.editName=function(a){a&&a.tId&&a===m.getNodeCache(this.setting,a.tId)&&(a.parentTId&&f.expandCollapseParentNode(this.setting,a.getParentNode(),!0),f.editNode(this.setting,a))};a.moveNode=
+function(a,b,k,i){function j(){f.moveNode(e.setting,a,b,k,!1,i)}if(!b)return b;if(a&&!a.isParent&&this.setting.data.keep.leaf&&k===d.move.TYPE_INNER)return null;else if(a&&(b.parentTId==a.tId&&k==d.move.TYPE_INNER||o(b,this.setting).find("#"+a.tId).length>0))return null;else a||(a=null);var e=this;g.canAsync(this.setting,a)&&k===d.move.TYPE_INNER?f.asyncNode(this.setting,a,i,j):j();return b};a.setEditable=function(a){this.setting.edit.enable=a;return this.refresh()}});var N=f.cancelPreSelectedNode;
+f.cancelPreSelectedNode=function(b,a){for(var c=m.getRoot(b).curSelectedList,d=0,g=c.length;d<g;d++)if(!a||a===c[d])if(f.removeTreeDom(b,c[d]),a)break;N&&N.apply(f,arguments)};var O=f.createNodes;f.createNodes=function(b,a,c,d){O&&O.apply(f,arguments);c&&f.repairParentChkClassWithSelf&&f.repairParentChkClassWithSelf(b,d)};var V=f.makeNodeUrl;f.makeNodeUrl=function(b,a){return b.edit.enable?null:V.apply(f,arguments)};var L=f.removeNode;f.removeNode=function(b,a){var c=m.getRoot(b);if(c.curEditNode===
+a)c.curEditNode=null;L&&L.apply(f,arguments)};var P=f.selectNode;f.selectNode=function(b,a,c){var d=m.getRoot(b);if(m.isSelectedNode(b,a)&&d.curEditNode==a&&a.editNameFlag)return!1;P&&P.apply(f,arguments);f.addHoverDom(b,a);return!0};var Q=g.uCanDo;g.uCanDo=function(b,a){var c=m.getRoot(b);if(a&&(g.eqs(a.type,"mouseover")||g.eqs(a.type,"mouseout")||g.eqs(a.type,"mousedown")||g.eqs(a.type,"mouseup")))return!0;if(c.curEditNode)f.editNodeBlur=!1,c.curEditInput.focus();return!c.curEditNode&&(Q?Q.apply(f,
+arguments):!0)}})(jQuery);
diff --git a/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.exhide.js b/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.exhide.js
new file mode 100644
index 0000000..05a5bfb
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.exhide.js
@@ -0,0 +1,363 @@
+/*
+ * JQuery zTree exHideNodes v3.5.16
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2014-03-09
+ */
+(function($){
+ //default init node of exLib
+ var _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
+ if (typeof n.isHidden == "string") n.isHidden = tools.eqs(n.isHidden, "true");
+ n.isHidden = !!n.isHidden;
+ data.initHideForExCheck(setting, n);
+ },
+ //add dom for check
+ _beforeA = function(setting, node, html) {},
+ //update zTreeObj, add method of exLib
+ _zTreeTools = function(setting, zTreeTools) {
+ zTreeTools.showNodes = function(nodes, options) {
+ view.showNodes(setting, nodes, options);
+ }
+ zTreeTools.showNode = function(node, options) {
+ if (!node) {
+ return;
+ }
+ view.showNodes(setting, [node], options);
+ }
+ zTreeTools.hideNodes = function(nodes, options) {
+ view.hideNodes(setting, nodes, options);
+ }
+ zTreeTools.hideNode = function(node, options) {
+ if (!node) {
+ return;
+ }
+ view.hideNodes(setting, [node], options);
+ }
+
+ var _checkNode = zTreeTools.checkNode;
+ if (_checkNode) {
+ zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) {
+ if (!!node && !!node.isHidden) {
+ return;
+ }
+ _checkNode.apply(zTreeTools, arguments);
+ }
+ }
+ },
+ //method of operate data
+ _data = {
+ initHideForExCheck: function(setting, n) {
+ if (n.isHidden && setting.check && setting.check.enable) {
+ if(typeof n._nocheck == "undefined") {
+ n._nocheck = !!n.nocheck
+ n.nocheck = true;
+ }
+ n.check_Child_State = -1;
+ if (view.repairParentChkClassWithSelf) {
+ view.repairParentChkClassWithSelf(setting, n);
+ }
+ }
+ },
+ initShowForExCheck: function(setting, n) {
+ if (!n.isHidden && setting.check && setting.check.enable) {
+ if(typeof n._nocheck != "undefined") {
+ n.nocheck = n._nocheck;
+ delete n._nocheck;
+ }
+ if (view.setChkClass) {
+ var checkObj = $$(n, consts.id.CHECK, setting);
+ view.setChkClass(setting, checkObj, n);
+ }
+ if (view.repairParentChkClassWithSelf) {
+ view.repairParentChkClassWithSelf(setting, n);
+ }
+ }
+ }
+ },
+ //method of operate ztree dom
+ _view = {
+ clearOldFirstNode: function(setting, node) {
+ var n = node.getNextNode();
+ while(!!n){
+ if (n.isFirstNode) {
+ n.isFirstNode = false;
+ view.setNodeLineIcos(setting, n);
+ break;
+ }
+ if (n.isLastNode) {
+ break;
+ }
+ n = n.getNextNode();
+ }
+ },
+ clearOldLastNode: function(setting, node) {
+ var n = node.getPreNode();
+ while(!!n){
+ if (n.isLastNode) {
+ n.isLastNode = false;
+ view.setNodeLineIcos(setting, n);
+ break;
+ }
+ if (n.isFirstNode) {
+ break;
+ }
+ n = n.getPreNode();
+ }
+ },
+ makeDOMNodeMainBefore: function(html, setting, node) {
+ html.push("<li ", (node.isHidden ? "style='display:none;' " : ""), "id='", node.tId, "' class='", consts.className.LEVEL, node.level,"' tabindex='0' hidefocus='true' treenode>");
+ },
+ showNode: function(setting, node, options) {
+ node.isHidden = false;
+ data.initShowForExCheck(setting, node);
+ $$(node, setting).show();
+ },
+ showNodes: function(setting, nodes, options) {
+ if (!nodes || nodes.length == 0) {
+ return;
+ }
+ var pList = {}, i, j;
+ for (i=0, j=nodes.length; i<j; i++) {
+ var n = nodes[i];
+ if (!pList[n.parentTId]) {
+ var pn = n.getParentNode();
+ pList[n.parentTId] = (pn === null) ? data.getRoot(setting) : n.getParentNode();
+ }
+ view.showNode(setting, n, options);
+ }
+ for (var tId in pList) {
+ var children = pList[tId][setting.data.key.children];
+ view.setFirstNodeForShow(setting, children);
+ view.setLastNodeForShow(setting, children);
+ }
+ },
+ hideNode: function(setting, node, options) {
+ node.isHidden = true;
+ node.isFirstNode = false;
+ node.isLastNode = false;
+ data.initHideForExCheck(setting, node);
+ view.cancelPreSelectedNode(setting, node);
+ $$(node, setting).hide();
+ },
+ hideNodes: function(setting, nodes, options) {
+ if (!nodes || nodes.length == 0) {
+ return;
+ }
+ var pList = {}, i, j;
+ for (i=0, j=nodes.length; i<j; i++) {
+ var n = nodes[i];
+ if ((n.isFirstNode || n.isLastNode) && !pList[n.parentTId]) {
+ var pn = n.getParentNode();
+ pList[n.parentTId] = (pn === null) ? data.getRoot(setting) : n.getParentNode();
+ }
+ view.hideNode(setting, n, options);
+ }
+ for (var tId in pList) {
+ var children = pList[tId][setting.data.key.children];
+ view.setFirstNodeForHide(setting, children);
+ view.setLastNodeForHide(setting, children);
+ }
+ },
+ setFirstNode: function(setting, parentNode) {
+ var childKey = setting.data.key.children, childLength = parentNode[childKey].length;
+ if (childLength > 0 && !parentNode[childKey][0].isHidden) {
+ parentNode[childKey][0].isFirstNode = true;
+ } else if (childLength > 0) {
+ view.setFirstNodeForHide(setting, parentNode[childKey]);
+ }
+ },
+ setLastNode: function(setting, parentNode) {
+ var childKey = setting.data.key.children, childLength = parentNode[childKey].length;
+ if (childLength > 0 && !parentNode[childKey][0].isHidden) {
+ parentNode[childKey][childLength - 1].isLastNode = true;
+ } else if (childLength > 0) {
+ view.setLastNodeForHide(setting, parentNode[childKey]);
+ }
+ },
+ setFirstNodeForHide: function(setting, nodes) {
+ var n,i,j;
+ for (i=0, j=nodes.length; i<j; i++) {
+ n = nodes[i];
+ if (n.isFirstNode) {
+ break;
+ }
+ if (!n.isHidden && !n.isFirstNode) {
+ n.isFirstNode = true;
+ view.setNodeLineIcos(setting, n);
+ break;
+ } else {
+ n = null;
+ }
+ }
+ return n;
+ },
+ setFirstNodeForShow: function(setting, nodes) {
+ var n,i,j, first, old;
+ for(i=0, j=nodes.length; i<j; i++) {
+ n = nodes[i];
+ if (!first && !n.isHidden && n.isFirstNode) {
+ first = n;
+ break;
+ } else if (!first && !n.isHidden && !n.isFirstNode) {
+ n.isFirstNode = true;
+ first = n;
+ view.setNodeLineIcos(setting, n);
+ } else if (first && n.isFirstNode) {
+ n.isFirstNode = false;
+ old = n;
+ view.setNodeLineIcos(setting, n);
+ break;
+ } else {
+ n = null;
+ }
+ }
+ return {"new":first, "old":old};
+ },
+ setLastNodeForHide: function(setting, nodes) {
+ var n,i;
+ for (i=nodes.length-1; i>=0; i--) {
+ n = nodes[i];
+ if (n.isLastNode) {
+ break;
+ }
+ if (!n.isHidden && !n.isLastNode) {
+ n.isLastNode = true;
+ view.setNodeLineIcos(setting, n);
+ break;
+ } else {
+ n = null;
+ }
+ }
+ return n;
+ },
+ setLastNodeForShow: function(setting, nodes) {
+ var n,i,j, last, old;
+ for (i=nodes.length-1; i>=0; i--) {
+ n = nodes[i];
+ if (!last && !n.isHidden && n.isLastNode) {
+ last = n;
+ break;
+ } else if (!last && !n.isHidden && !n.isLastNode) {
+ n.isLastNode = true;
+ last = n;
+ view.setNodeLineIcos(setting, n);
+ } else if (last && n.isLastNode) {
+ n.isLastNode = false;
+ old = n;
+ view.setNodeLineIcos(setting, n);
+ break;
+ } else {
+ n = null;
+ }
+ }
+ return {"new":last, "old":old};
+ }
+ },
+
+ _z = {
+ view: _view,
+ data: _data
+ };
+ $.extend(true, $.fn.zTree._z, _z);
+
+ var zt = $.fn.zTree,
+ tools = zt._z.tools,
+ consts = zt.consts,
+ view = zt._z.view,
+ data = zt._z.data,
+ event = zt._z.event,
+ $$ = tools.$;
+
+ data.addInitNode(_initNode);
+ data.addBeforeA(_beforeA);
+ data.addZTreeTools(_zTreeTools);
+
+// Override method in core
+ var _dInitNode = data.initNode;
+ data.initNode = function(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag) {
+ var tmpPNode = (parentNode) ? parentNode: data.getRoot(setting),
+ children = tmpPNode[setting.data.key.children];
+ data.tmpHideFirstNode = view.setFirstNodeForHide(setting, children);
+ data.tmpHideLastNode = view.setLastNodeForHide(setting, children);
+ view.setNodeLineIcos(setting, data.tmpHideFirstNode);
+ view.setNodeLineIcos(setting, data.tmpHideLastNode);
+ isFirstNode = (data.tmpHideFirstNode === node);
+ isLastNode = (data.tmpHideLastNode === node);
+ if (_dInitNode) _dInitNode.apply(data, arguments);
+ if (isLastNode) {
+ view.clearOldLastNode(setting, node);
+ }
+ };
+
+ var _makeChkFlag = data.makeChkFlag;
+ if (!!_makeChkFlag) {
+ data.makeChkFlag = function(setting, node) {
+ if (!!node && !!node.isHidden) {
+ return;
+ }
+ _makeChkFlag.apply(data, arguments);
+ }
+ }
+
+ var _getTreeCheckedNodes = data.getTreeCheckedNodes;
+ if (!!_getTreeCheckedNodes) {
+ data.getTreeCheckedNodes = function(setting, nodes, checked, results) {
+ if (!!nodes && nodes.length > 0) {
+ var p = nodes[0].getParentNode();
+ if (!!p && !!p.isHidden) {
+ return [];
+ }
+ }
+ return _getTreeCheckedNodes.apply(data, arguments);
+ }
+ }
+
+ var _getTreeChangeCheckedNodes = data.getTreeChangeCheckedNodes;
+ if (!!_getTreeChangeCheckedNodes) {
+ data.getTreeChangeCheckedNodes = function(setting, nodes, results) {
+ if (!!nodes && nodes.length > 0) {
+ var p = nodes[0].getParentNode();
+ if (!!p && !!p.isHidden) {
+ return [];
+ }
+ }
+ return _getTreeChangeCheckedNodes.apply(data, arguments);
+ }
+ }
+
+ var _expandCollapseSonNode = view.expandCollapseSonNode;
+ if (!!_expandCollapseSonNode) {
+ view.expandCollapseSonNode = function(setting, node, expandFlag, animateFlag, callback) {
+ if (!!node && !!node.isHidden) {
+ return;
+ }
+ _expandCollapseSonNode.apply(view, arguments);
+ }
+ }
+
+ var _setSonNodeCheckBox = view.setSonNodeCheckBox;
+ if (!!_setSonNodeCheckBox) {
+ view.setSonNodeCheckBox = function(setting, node, value, srcNode) {
+ if (!!node && !!node.isHidden) {
+ return;
+ }
+ _setSonNodeCheckBox.apply(view, arguments);
+ }
+ }
+
+ var _repairParentChkClassWithSelf = view.repairParentChkClassWithSelf;
+ if (!!_repairParentChkClassWithSelf) {
+ view.repairParentChkClassWithSelf = function(setting, node) {
+ if (!!node && !!node.isHidden) {
+ return;
+ }
+ _repairParentChkClassWithSelf.apply(view, arguments);
+ }
+ }
+})(jQuery); \ No newline at end of file
diff --git a/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.exhide.min.js b/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.exhide.min.js
new file mode 100644
index 0000000..f1dce5b
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/js/jquery.ztree.exhide.min.js
@@ -0,0 +1,22 @@
+/*
+ * JQuery zTree exHideNodes v3.5.16
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2014-03-09
+ */
+(function(i){i.extend(!0,i.fn.zTree._z,{view:{clearOldFirstNode:function(c,a){for(var b=a.getNextNode();b;){if(b.isFirstNode){b.isFirstNode=!1;d.setNodeLineIcos(c,b);break}if(b.isLastNode)break;b=b.getNextNode()}},clearOldLastNode:function(c,a){for(var b=a.getPreNode();b;){if(b.isLastNode){b.isLastNode=!1;d.setNodeLineIcos(c,b);break}if(b.isFirstNode)break;b=b.getPreNode()}},makeDOMNodeMainBefore:function(c,a,b){c.push("<li ",b.isHidden?"style='display:none;' ":"","id='",b.tId,"' class='",l.className.LEVEL,
+b.level,"' tabindex='0' hidefocus='true' treenode>")},showNode:function(c,a){a.isHidden=!1;f.initShowForExCheck(c,a);j(a,c).show()},showNodes:function(c,a,b){if(a&&a.length!=0){var e={},g,k;for(g=0,k=a.length;g<k;g++){var h=a[g];if(!e[h.parentTId]){var i=h.getParentNode();e[h.parentTId]=i===null?f.getRoot(c):h.getParentNode()}d.showNode(c,h,b)}for(var j in e)a=e[j][c.data.key.children],d.setFirstNodeForShow(c,a),d.setLastNodeForShow(c,a)}},hideNode:function(c,a){a.isHidden=!0;a.isFirstNode=!1;a.isLastNode=
+!1;f.initHideForExCheck(c,a);d.cancelPreSelectedNode(c,a);j(a,c).hide()},hideNodes:function(c,a,b){if(a&&a.length!=0){var e={},g,k;for(g=0,k=a.length;g<k;g++){var h=a[g];if((h.isFirstNode||h.isLastNode)&&!e[h.parentTId]){var i=h.getParentNode();e[h.parentTId]=i===null?f.getRoot(c):h.getParentNode()}d.hideNode(c,h,b)}for(var j in e)a=e[j][c.data.key.children],d.setFirstNodeForHide(c,a),d.setLastNodeForHide(c,a)}},setFirstNode:function(c,a){var b=c.data.key.children,e=a[b].length;e>0&&!a[b][0].isHidden?
+a[b][0].isFirstNode=!0:e>0&&d.setFirstNodeForHide(c,a[b])},setLastNode:function(c,a){var b=c.data.key.children,e=a[b].length;e>0&&!a[b][0].isHidden?a[b][e-1].isLastNode=!0:e>0&&d.setLastNodeForHide(c,a[b])},setFirstNodeForHide:function(c,a){var b,e,g;for(e=0,g=a.length;e<g;e++){b=a[e];if(b.isFirstNode)break;if(!b.isHidden&&!b.isFirstNode){b.isFirstNode=!0;d.setNodeLineIcos(c,b);break}else b=null}return b},setFirstNodeForShow:function(c,a){var b,e,g,f,h;for(e=0,g=a.length;e<g;e++)if(b=a[e],!f&&!b.isHidden&&
+b.isFirstNode){f=b;break}else if(!f&&!b.isHidden&&!b.isFirstNode)b.isFirstNode=!0,f=b,d.setNodeLineIcos(c,b);else if(f&&b.isFirstNode){b.isFirstNode=!1;h=b;d.setNodeLineIcos(c,b);break}return{"new":f,old:h}},setLastNodeForHide:function(c,a){var b,e;for(e=a.length-1;e>=0;e--){b=a[e];if(b.isLastNode)break;if(!b.isHidden&&!b.isLastNode){b.isLastNode=!0;d.setNodeLineIcos(c,b);break}else b=null}return b},setLastNodeForShow:function(c,a){var b,e,g,f;for(e=a.length-1;e>=0;e--)if(b=a[e],!g&&!b.isHidden&&
+b.isLastNode){g=b;break}else if(!g&&!b.isHidden&&!b.isLastNode)b.isLastNode=!0,g=b,d.setNodeLineIcos(c,b);else if(g&&b.isLastNode){b.isLastNode=!1;f=b;d.setNodeLineIcos(c,b);break}return{"new":g,old:f}}},data:{initHideForExCheck:function(c,a){if(a.isHidden&&c.check&&c.check.enable){if(typeof a._nocheck=="undefined")a._nocheck=!!a.nocheck,a.nocheck=!0;a.check_Child_State=-1;d.repairParentChkClassWithSelf&&d.repairParentChkClassWithSelf(c,a)}},initShowForExCheck:function(c,a){if(!a.isHidden&&c.check&&
+c.check.enable){if(typeof a._nocheck!="undefined")a.nocheck=a._nocheck,delete a._nocheck;if(d.setChkClass){var b=j(a,l.id.CHECK,c);d.setChkClass(c,b,a)}d.repairParentChkClassWithSelf&&d.repairParentChkClassWithSelf(c,a)}}}});var i=i.fn.zTree,m=i._z.tools,l=i.consts,d=i._z.view,f=i._z.data,j=m.$;f.addInitNode(function(c,a,b){if(typeof b.isHidden=="string")b.isHidden=m.eqs(b.isHidden,"true");b.isHidden=!!b.isHidden;f.initHideForExCheck(c,b)});f.addBeforeA(function(){});f.addZTreeTools(function(c,a){a.showNodes=
+function(a,b){d.showNodes(c,a,b)};a.showNode=function(a,b){a&&d.showNodes(c,[a],b)};a.hideNodes=function(a,b){d.hideNodes(c,a,b)};a.hideNode=function(a,b){a&&d.hideNodes(c,[a],b)};var b=a.checkNode;if(b)a.checkNode=function(c,d,f,h){(!c||!c.isHidden)&&b.apply(a,arguments)}});var n=f.initNode;f.initNode=function(c,a,b,e,g,i,h){var j=(e?e:f.getRoot(c))[c.data.key.children];f.tmpHideFirstNode=d.setFirstNodeForHide(c,j);f.tmpHideLastNode=d.setLastNodeForHide(c,j);d.setNodeLineIcos(c,f.tmpHideFirstNode);
+d.setNodeLineIcos(c,f.tmpHideLastNode);g=f.tmpHideFirstNode===b;i=f.tmpHideLastNode===b;n&&n.apply(f,arguments);i&&d.clearOldLastNode(c,b)};var o=f.makeChkFlag;if(o)f.makeChkFlag=function(c,a){(!a||!a.isHidden)&&o.apply(f,arguments)};var p=f.getTreeCheckedNodes;if(p)f.getTreeCheckedNodes=function(c,a,b,e){if(a&&a.length>0){var d=a[0].getParentNode();if(d&&d.isHidden)return[]}return p.apply(f,arguments)};var q=f.getTreeChangeCheckedNodes;if(q)f.getTreeChangeCheckedNodes=function(c,a,b){if(a&&a.length>
+0){var d=a[0].getParentNode();if(d&&d.isHidden)return[]}return q.apply(f,arguments)};var r=d.expandCollapseSonNode;if(r)d.expandCollapseSonNode=function(c,a,b,e,f){(!a||!a.isHidden)&&r.apply(d,arguments)};var s=d.setSonNodeCheckBox;if(s)d.setSonNodeCheckBox=function(c,a,b,e){(!a||!a.isHidden)&&s.apply(d,arguments)};var t=d.repairParentChkClassWithSelf;if(t)d.repairParentChkClassWithSelf=function(c,a){(!a||!a.isHidden)&&t.apply(d,arguments)}})(jQuery);
diff --git a/common/src/main/webapp/thirdparty/zTree/zTree.v3.jquery.json b/common/src/main/webapp/thirdparty/zTree/zTree.v3.jquery.json
new file mode 100644
index 0000000..ef26b10
--- /dev/null
+++ b/common/src/main/webapp/thirdparty/zTree/zTree.v3.jquery.json
@@ -0,0 +1,35 @@
+{
+ "name": "zTree.v3",
+ "title": "zTree.v3",
+ "description": "jquery tree plugin",
+ "keywords": [
+ "tree",
+ "ui"
+ ],
+ "version": "3.5.16",
+ "author": {
+ "name": "Zhang QiGang",
+ "email":"hunter.z@263.net",
+ "url": "https://github.com/zTree/zTree_v3"
+ },
+ "maintainers": [
+ {
+ "name": "Zhang QiGang",
+ "email":"hunter.z@263.net",
+ "url": "http://www.ztree.me/"
+ }
+ ],
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "http://www.ztree.me/v3/main.php#_license"
+ }
+ ],
+ "bugs": "https://github.com/zTree/zTree_v3/issues",
+ "homepage": "http://www.ztree.me/",
+ "demo": "http://www.ztree.me/v3/demo.php",
+ "docs": "http://www.ztree.me/v3/api.php",
+ "dependencies": {
+ "jquery": ">=1.4.4"
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/api.js b/common/src/main/webapp/usageguide/appserver/api.js
new file mode 100644
index 0000000..6a53d47
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/api.js
@@ -0,0 +1,255 @@
+/*
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*/
+
+var express = require('express');
+var router = express.Router();
+var fs = require('fs');
+var http = require('http');
+var bodyParser = require('body-parser');
+var path=require('path');
+
+
+
+/*var exists = require('file-exists');*/
+
+// ############################################ Sign In code #################################################
+// Routes
+router.post('/signin', function (req, res) {
+ console.log("signin");
+ var obj = {
+ "name": req.body.name,
+ "pswd": req.body.pswd
+ };
+
+ var ObjLst =[] ;
+ var nameExist =0;
+ console.log(obj);
+ ObjLst = JSON.parse(fs.readFileSync('./data/input.json', 'utf8'));
+ for(var index = 0; index < ObjLst.length; index++) {
+ if (ObjLst[index].name === req.body.name && ObjLst[index].pswd === req.body.pswd) {
+ console.log("success");
+ nameExist++;
+ res.statusCode=200;
+ res.statusMessage="Sucessfully loged in";
+ break;
+ }
+ }
+ if (nameExist != 1) {
+ console.log("failed");
+ res.statusCode=404;
+ res.statusMessage="failed to login";
+ }
+ res.send();
+});
+
+// ############################################ Sign Up Code #################################################
+
+router.post('/signup', function (req, res) {
+
+ console.log("in api.js");
+
+ var ObjLst =[] ;
+ var nameNotExist =0;
+ var obj = {
+ "name": req.body.name,
+ "pswd": req.body.pswd,
+ "email": req.body.email
+ };
+ if(fs.existsSync("./data/input.json")) {
+ console.log("File Exist");
+ ObjLst = JSON.parse(fs.readFileSync('./data/input.json', 'utf8'));
+ }
+
+ for(var index = 0; index < ObjLst.length; index++) {
+ if (ObjLst[index].name === req.body.name && ObjLst[index].email === req.body.email) {
+ console.log("success");
+ nameNotExist++;
+ break;
+ }
+ }
+ if (nameNotExist == 0) {
+ ObjLst.push(obj);
+ console.log(ObjLst);
+ fs.writeFile('./data/input.json', JSON.stringify(ObjLst), function(err) {
+ if (err) {
+ return console.error(err);
+ }
+ console.log("Data written successfully!");
+ console.log("Let's read newly written data");
+ res.statusCode=200;
+ res.statusMessage="Sucessfully signed up";
+ });
+ }
+ res.send();
+});
+
+function getDataFrmProvince() {
+ var provinceData =[] ;
+ if(fs.existsSync("./data/provinceData.json")) {
+ console.log("File Exist");
+ provinceData = JSON.parse(fs.readFileSync('./data/provinceData.json', 'utf8'));
+ }
+ return provinceData;
+}
+
+function saveDataToProvince(provinceData) {
+ fs.writeFile('./data/provinceData.json', JSON.stringify(provinceData), function(err) {
+ var statueCode = 0;
+ if (err) {
+ console.error(err);
+ return statueCode = 404;
+ }
+ console.log("Data written successfully!");
+ console.log("Let's read newly written data");
+ return statueCode = 200;
+ });
+}
+
+function getIndexOfIdProvince(id) {
+ var provinceData = getDataFrmProvince();
+ var returnIndx = -1;
+ for (var index = 0; index < provinceData.length; index++) {
+ if(provinceData[index].id == id) {
+ returnIndx = index;
+ break;
+ }
+ }
+ return returnIndx;
+}
+
+function deleteIdFromProvince(idList) {
+ var provinceData = getDataFrmProvince();
+ /*for (var index = 0; index < provinceData.length; index++) {
+ if(provinceData[index].id == id) {
+ console.log("Deleting id : " + index);
+ provinceData.splice(index, 1);
+ break;
+ }
+ }*/
+ for(var i = 0; i < idList.length; i++) {
+ for (var index = 0; index < provinceData.length; index++) {
+ if(provinceData[index].id == idList[i]) {
+ console.log("Deleting id : " + index);
+ provinceData.splice(index, 1);
+ break;
+ }
+ }
+ }
+ return provinceData;
+}
+
+router.get('/getAllProvinceData', function (req, res) {
+ var provinceData = getDataFrmProvince();
+ if(provinceData) {
+ output = '{"provinceData" : ' + JSON.stringify(provinceData) + '}';
+
+ res.setHeader("Content-Type", "application/json");
+ console.log("output : " + JSON.stringify(output));
+ res.end(output);
+ }
+});
+
+
+router.post('/addProvinceData', function(req, res) {
+ var provinceData = getDataFrmProvince();
+ var gen_id = Math.floor(Math.random() * (9999 - 1000 + 1)) + 1000;
+ provinceData.push({
+ "id": gen_id,
+ "province_name": req.body.province_name,
+ "ip": req.body.ip,
+ "port": req.body.port
+ });
+ var statusCode = saveDataToProvince(provinceData);
+ res.statusCode=statusCode;
+
+ if(statusCode == 200) {
+ res.statusMessage="Sucessfully signed up";
+ }
+ else {
+ res.statusMessage="Error";
+ }
+
+ res.statusCode=200;
+ res.statusMessage="Sucessfully signed up";
+ res.send();
+});
+
+router.post('/deleteProvinceData', function (req, res) {
+ //var provinceData = getDataFrmProvince();
+ console.log("IdList: "+ req.body.idList);
+ /*for(var i = req.body.idList.length - 1; i >= 0; i--) {
+ var index = getIndexOfIdProvince(req.body.idList[i]);
+ console.log("Deleting id : " + index);
+ if(index != -1) {
+ provinceData.splice(index, 1);
+ }
+ //deleteIdFromProvince(req.body.idList[i]);
+ };*/
+
+ var provinceData = deleteIdFromProvince(req.body.idList);
+
+ saveDataToProvince(provinceData);
+ res.statusCode=200;
+ res.statusMessage="Sucessfully signed up";
+ res.send();
+});
+
+router.post('/editProvinceData', function (req, res) {
+ var provinceData = getDataFrmProvince();
+ var index = getIndexOfIdProvince(req.body.id);
+ console.log("Editing id : " + index);
+ if(index != -1) {
+ provinceData[index].province_name = req.body.province_name;
+ provinceData[index].ip = req.body.ip;
+ provinceData[index].port = req.body.port;
+ }
+ saveDataToProvince(provinceData);
+
+ res.statusCode=200;
+ res.statusMessage="Sucessfully signed up";
+ res.send();
+
+});
+
+
+///////////////////////////////////////////////// To Read JSON data for all widgets //////////////////////////////////////////
+
+function getDataFrmJSON(wdgtType) {
+ var jsonData =[] ;
+ if(fs.existsSync("./data/"+wdgtType+".json")) {
+ console.log("File Exist");
+ jsonData = JSON.parse(fs.readFileSync('./data/'+wdgtType+'.json', 'utf8'));
+ }
+ return jsonData;
+}
+
+router.post('/getAllJSONData', function (req, res) {
+ var jsonData = getDataFrmJSON(req.body.wdgtType);
+ if(jsonData) {
+ output = '{"data" : ' + JSON.stringify(jsonData) + '}';
+ res.setHeader("Content-Type", "application/json");
+ console.log("output : " + JSON.stringify(output));
+ res.end(output);
+ }
+});
+
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+// Return router
+module.exports = router;
+
diff --git a/common/src/main/webapp/usageguide/appserver/data/accordionData.json b/common/src/main/webapp/usageguide/appserver/data/accordionData.json
new file mode 100644
index 0000000..367cf5f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/data/accordionData.json
@@ -0,0 +1,24 @@
+{
+ "accordion_data": {
+ "items": [
+ {
+ "tabId": "tab1",
+ "header": "Tab1",
+ "isActive": true,
+ "msg": "This is in Collapsible Group 1 and this attribute makes sure that all collapsible elements under the specified parent will be closed when one of the collapsible item is shown."
+ },
+ {
+ "tabId": "tab2",
+ "header": "Tab2",
+ "isActive": false,
+ "msg": "This is in Collapsible Group 2 and this attribute makes sure that all collapsible elements under the specified parent will be closed when one of the collapsible item is shown."
+ },
+ {
+ "tabId": "tab3",
+ "header": "Tab3",
+ "isActive": false,
+ "msg": "This is in Collapsible Group 3 and this attribute makes sure that all collapsible elements under the specified parent will be closed when one of the collapsible item is shown."
+ }
+ ]
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/data/buttonsData.json b/common/src/main/webapp/usageguide/appserver/data/buttonsData.json
new file mode 100644
index 0000000..0176461
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/data/buttonsData.json
@@ -0,0 +1,30 @@
+{
+ "default_btn_data" : {
+ "def_button" : {"title":"Default"},
+ "def_print_button" : {"title":"Print", "type":"btn btn-default", "gType": "glyphicon-print", "iconPosition":"left"},
+ "def_print_button_right" : {"title":"Search", "type":"btn btn-default", "gType": "glyphicon-search", "iconPosition":"right"}
+ },
+
+ "visual_btn_data" : {
+ "vis_pri_btn_data" : {"title":"Primary", "type":"primary"},
+ "vis_sec_btn_data" : {"title":"Secondary", "type":"secondary"},
+ "vis_succ_btn_data" : {"title":"Success", "type":"success"},
+ "vis_inf_btn_data" : {"title":"Info", "type":"info"},
+ "vis_warn_btn_data" : {"title":"Warning", "type":"warning"},
+ "vis_dang_btn_data" : {"title":"Danger", "type":"danger"},
+ "vis_link_btn_data" : {"title":"Link", "type":"link"}
+ },
+
+ "diffSize_btn_data" : {
+ "size_small_btn_data" : {"title": "Small Button", "type": "primary", "size": "btn-sm"},
+ "size_large_btn_data" : {"title": "Large Button", "type": "primary", "size": "btn-lg"},
+ "size_block_btn_data" : {"title": "Large Block Button", "type": "primary", "size": "btn-lg btn-block"}
+ },
+
+ "icon_btn_data" : {
+ "search_icon_btn_data" : {"title": "Search Icon", "type": "btn-default", "gType": "glyphicon-search"},
+ "search_icon_styled_btn_data" : {"title": "Styled Search Icon", "type": "primary", "gType": "glyphicon-search"},
+ "print_icon_btn_data" : {"title": "Print", "type": "primary btn-lg", "gType": "glyphicon-print"}
+ }
+
+}
diff --git a/common/src/main/webapp/usageguide/appserver/data/checkboxData.json b/common/src/main/webapp/usageguide/appserver/data/checkboxData.json
new file mode 100644
index 0000000..cf8e78c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/data/checkboxData.json
@@ -0,0 +1,8 @@
+{
+ "checkbox_default_data" : {"id":1, "label":"Default check box", "type":"default", "checked":true},
+ "checkbox_primary_data" : {"id":2, "label":"Primary check box", "type":"primary", "checked":false},
+ "checkbox_success_data" : {"id":3, "label":"Success check box", "type":"success", "checked":true},
+ "checkbox_danger_data" : {"id":4, "label":"Error check box", "type":"danger", "checked":true},
+ "checkbox_warn_data" : {"id":5, "label":"Warn check box", "type":"warning", "checked":false},
+ "checkbox_info_data" : {"id":6, "label":"Info check box", "type":"info", "checked":true}
+} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/data/dropdownData.json b/common/src/main/webapp/usageguide/appserver/data/dropdownData.json
new file mode 100644
index 0000000..43235d5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/data/dropdownData.json
@@ -0,0 +1,18 @@
+{
+ "dropped_down_data" :{"title":"DropDown","position":"down", "items":[{"itemLabel": "Node JS"},{"itemLabel": "JS"}]},
+ "dropped_up_data" : {"title":"DropUp","position":"up", "items":[{"itemLabel": "PHP"},{"itemLabel": "ASP"}]},
+ "dropHeader_data" :{"title":"DropHeader","position":"down",
+ "items":[{"itemLabel": "Web UI", "isheader":true},
+ {"itemLabel": "HTML", "isheader":false},
+ {"itemLabel": "CSS", "isheader":false},
+ {"itemLabel": "JS", "isheader":false},
+ {"itemLabel": "Programming", "isheader":true},
+ {"itemLabel": "C", "isheader":false},
+ {"itemLabel": "C++", "isheader":false}]
+ },
+ "dropSimple_data" : {"title":"--Please Select--",
+ "items":[
+ {"itemLabel": "Cameras"},{"itemLabel": "Mobile Phones"},{"itemLabel": "Computers"},{"itemLabel": "Monitors"},{"itemLabel": "Tablets"},{"itemLabel": "Others"}
+ ]
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/data/functionalData.json b/common/src/main/webapp/usageguide/appserver/data/functionalData.json
new file mode 100644
index 0000000..35b66f4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/data/functionalData.json
@@ -0,0 +1,6 @@
+{
+ "create_data" : {"title":"Create", "labels":[{"text": "Username", "input_id":"username", "type":"text"},{"text": "Password", "input_id":"username", "type":"password"}], "showClose":"true","closeBtnTxt":"Cancel","msg":"This is Create dialog box", "buttons":[{"text": "Ok"}]},
+ "modify_data" : {"title":"Modify", "labels":[{"text": "Username", "input_id":"username", "type":"text"},{"text": "Password", "input_id":"username", "type":"password"}], "showClose":"true","closeBtnTxt":"Cancel","msg":"This is Modify dialog box", "buttons":[{"text": "Ok"}]},
+ "delete_data" : {"title":"Delete", "showClose":"true","closeBtnTxt":"Cancel","msg":"This is Delete dialog box", "buttons":[{"text": "Ok"}]},
+ "workflow_data" : {"title":"Workflow","showClose":"true","closeBtnTxt":"Cancel","msg":"This is Workflow dialog box", "buttons":[{"text": "Ok"}]}
+}
diff --git a/common/src/main/webapp/usageguide/appserver/data/input.json b/common/src/main/webapp/usageguide/appserver/data/input.json
new file mode 100644
index 0000000..7126e78
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/data/input.json
@@ -0,0 +1 @@
+[{"name":"shahid","pswd":"shahid","email":"shahid@gmail.com"},{"name":"noor","pswd":"noor","email":"noor@lnt.com"}] \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/data/list.json b/common/src/main/webapp/usageguide/appserver/data/list.json
new file mode 100644
index 0000000..505bbcc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/data/list.json
@@ -0,0 +1,76 @@
+[
+ {
+ "id": "113",
+ "title": "Movies",
+ "subMenu": [
+ {
+ "title":"Sci-fi",
+ "subsubMenu":[
+ {"title":"Intersteller"},
+ {"title":"Inception"},
+ {"title":"The Arrival"},
+ {"title":"The Paycheck"}
+ ]
+ },
+ {
+ "title":"Animation",
+ "subsubMenu":[
+ {"title":"Big Hero"},
+ {"title":"Monster University"},
+ {"title":"Frozen"},
+ {"title":"Car"}
+ ]
+ },
+ {
+ "title":"Action",
+ "subsubMenu":[
+ {"title":"Mission Impossible"},
+ {"title":"The Expendables"}
+ ]
+ },
+ {
+ "title":"Horror",
+ "subsubMenu":[
+ {"title":"Evil Dead"},
+ {"title":"Anebelle"}
+ ]
+ },
+ {
+ "title":"Comedy",
+ "subsubMenu":[
+ {"title":"Superbad"},
+ {"title":"Airplane"},
+ {"title":"Clueless"}
+ ]
+ }
+ ]
+ },
+ {
+ "id": "211",
+ "title": "Games",
+ "subMenu": [{"title":"Outdoor Games", "subsubMenu":[{"title":"Cricket"},{"title":"Football"}, {"title":"Volleyball"}, {"title":"Hockey"}]}, {"title":"Indoor Games", "subsubMenu":[{"title":"Carroms"},{"title":"Table Tennis"}]}, {"title":"Puzzles", "subsubMenu":[{"title":"Sudoku"},{"title":"Chess"}]}, {"title":"Card Games", "subsubMenu":[{"title":"UNO"},{"title":"RUMMY"}]}]
+ },
+ {
+ "id": "037",
+ "title": "Animals",
+ "subMenu": [{"title":"Mammals", "subsubMenu":[{"title":"Monkey"},{"title":"Elephant"}]}, {"title":"Birds", "subsubMenu":[{"title":"Parrot"},{"title":"Ostrich"},{"title":"Eagle"}]}, {"title":"Reptiles", "subsubMenu":[{"title":"Snake"},{"title":"Lizard"},{"title":"Cameleon"}]}]
+ },
+ {
+ "id": "127",
+ "title": "Vehicles",
+ "subMenu": [{"title":"Cars", "subsubMenu":[{"title":"Audi"},{"title":"Range Rover"}]}, {"title":"Bikes", "subsubMenu":[{"title":"Apache"},{"title":"Pulsar"},{"title":"FZ"},{"title":"Jupiter"},{"title":"Victor"},{"title":"Avengers"}]}, {"title":"Cycles", "subsubMenu":[{"title":"Hero"},{"title":"Lady Bird"},{"title":"Firefox"}]}]
+ },
+ {
+ "id": "181",
+ "title": "Languages",
+ "subMenu": [{"title":"English"}, {"title":"French"}, {"title":"Chinese"}, {"title":"Hindi"}]
+ },
+ {
+ "id": "210",
+ "title": "Continents",
+ "subMenu": [{"title":"Asia", "subsubMenu":[{"title":"India"},{"title":"China"}]}, {"title":"Africa", "subsubMenu":[{"title":"South Africa"},{"title":"Kenya"},{"title":"Zimbabwe"}]}]
+ }
+]
+
+
+
diff --git a/common/src/main/webapp/usageguide/appserver/data/notificationData.json b/common/src/main/webapp/usageguide/appserver/data/notificationData.json
new file mode 100644
index 0000000..a532151
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/data/notificationData.json
@@ -0,0 +1,42 @@
+{
+ "err_data" : {
+ "title": "Error",
+ "showClose": "true",
+ "closeBtnTxt": "Ok",
+ "icon": "glyphicon glyphicon-exclamation-sign",
+ "iconColor": "icon_error",
+ "msg": "<<Please input your message here>>",
+ "buttons": []
+ },
+ "warn_data" : {
+ "title": "Warning",
+ "showClose": "true",
+ "closeBtnTxt": "Ok",
+ "icon": "glyphicon glyphicon-warning-sign",
+ "iconColor": "icon_warning",
+ "msg": "<<Please input your message here>>",
+ "buttons": []
+ },
+ "info_data" : {
+ "title": "Information",
+ "showClose": "true",
+ "closeBtnTxt": "Ok",
+ "icon": "glyphicon glyphicon-info-sign",
+ "iconColor": "icon_info",
+ "msg": "<<Please input your message here>>",
+ "buttons": []
+ },
+ "confirm_data" : {
+ "title": "Confirmation",
+ "showClose": "true",
+ "closeBtnTxt": "Cancel",
+ "icon": "glyphicon glyphicon-info-sign",
+ "iconColor": "con_confirm",
+ "msg": "<<Please input your message here>>",
+ "buttons": [
+ {
+ "text": "Ok"
+ }
+ ]
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/data/provinceData.json b/common/src/main/webapp/usageguide/appserver/data/provinceData.json
new file mode 100644
index 0000000..8fed9ec
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/data/provinceData.json
@@ -0,0 +1 @@
+[{"id":7560,"province_name":"Data 1","ip":"1.2.3.4","port":1234},{"id":7561,"province_name":"Data 2","ip":"1.2.3.4","port":1234},{"id":7562,"province_name":"Data 3","ip":"1.2.3.4","port":1234}] \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/data/radioData.json b/common/src/main/webapp/usageguide/appserver/data/radioData.json
new file mode 100644
index 0000000..aab9436
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/data/radioData.json
@@ -0,0 +1,14 @@
+{
+ "radio_btn_default_data" : {"id":1, "label":"Default Radio Btn", "type":"default", "checked":false},
+ "radio_btn_primary_data" : {"id":2, "label":"Primary Radio Btn", "type":"primary", "checked":false},
+ "radio_btn_success_data" : {"id":3, "label":"Success Radio Btn", "type":"success", "checked":true},
+ "radio_btn_danger_data" : {"id":4, "label":"Error Radio Btn", "type":"danger", "checked":false},
+ "radio_btn_Warn_data" : {"id":5, "label":"Warn Radio Btn", "type":"warning", "checked":false},
+ "radio_btn_info_data" : {"id":6, "label":"Info Radio Btn", "type":"info", "checked":false}
+}
+
+
+
+
+
+
diff --git a/common/src/main/webapp/usageguide/appserver/data/shortNote.json b/common/src/main/webapp/usageguide/appserver/data/shortNote.json
new file mode 100644
index 0000000..6c182b4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/data/shortNote.json
@@ -0,0 +1,17 @@
+{
+ "treeTip":"Ztree",
+ "accordionTip":"Use the data-parent attribute to make sure that all collapsible elements under the specified parent will be closed when one of the collapsible item is shown.",
+ "tabTip":"Tabs are created with <ul class=nav nav-tabs> Tip: Also mark the current page with <li class=active>",
+ "vtabTip":"Pills can also be displayed vertically. Just add the .nav-stacked class",
+ "tableTip":"The .table class adds basic styling to a table, The .table-hover class adds a hover effect (grey background color) on table rows,The .table-striped class adds zebra-stripes to a table,Loop through all table rows, and hide those who don't match the search query",
+ "buttonTip":"Default Buttons-To achieve the button styles above, Bootstrap has the following classes like .btn-default, Visual Buttons- To achieve the button styles above, Bootstrap has the following classes like .btn-primary .btn-success .btn-info .btn-warning .btn-danger .btn-link,Different Sized Buttons-To achieve the button styles above, Bootstrap has the following classes like .btn-lg .btn-md .btn-sm .btn-xs,Icon Buttons- Bootstrap provides 260 glyphicons from the Glyphicons Halflings set. Glyphicons can be used in text, buttons, toolbars, navigation, forms, etc.",
+ "dropdownTip":"Dropdown- A dropdown menu is a toggleable menu that allows the user to choose one value from a predefined list,The .dropdown class indicates a dropdown menu,To open the dropdown menu, use a button or a link with a class of .dropdown-toggle and the data-toggle=dropdown attribute. The .caret class creates a caret arrow icon (), which indicates that the button is a dropdown. Add the .dropdown-menu class to a <ul> element to actually build the dropdown menu. Dropdown Header-The .dropdown-header class is used to add headers inside the dropdown menu. Dropup Header-If you want the dropdown menu to expand upwards instead of downwards, change the <div> element with class=dropdown to dropup",
+ "radioTip":"Use the type as Radio to use radio buttons",
+ "checkboxTip":"use the following classes funkyradio-default funkyradio-primary funkyradio-success funkyradio-info funkyradio-danger funkyradio-warning",
+ "toolTip":"Tooltip",
+ "listTip":"Listtip",
+ "provinceTip":"It allows you to add,delete records from the server",
+ "notificationTip":"notificationTip",
+ "functionalTip":"functionalTip"
+
+} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/data/tabData.json b/common/src/main/webapp/usageguide/appserver/data/tabData.json
new file mode 100644
index 0000000..e2032e4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/data/tabData.json
@@ -0,0 +1,21 @@
+{
+ "tabData":
+ {
+ "items": [{
+ "tablabel": "Why AngularJS?",
+ "isActive": true,
+ "target": "tab1",
+ "msg": "HTML is great for declaring static documents, but it falters when we try to use it for declaring dynamic views in web-applications. AngularJS lets you extend HTML vocabulary for your application. The resulting environment is extraordinarily expressive, readable, and quick to develop."
+ }, {
+ "tablabel": "Alternatives",
+ "isActive": false,
+ "target": "tab2",
+ "msg": "Other frameworks deal with HTML’s shortcomings by either abstracting away HTML, CSS, and/or JavaScript or by providing an imperative way for manipulating the DOM. Neither of these address the root problem that HTML was not designed for dynamic views."
+ }, {
+ "tablabel": "Extensibility",
+ "isActive": false,
+ "target": "tab3",
+ "msg": "AngularJS is a toolset for building the framework most suited to your application development. It is fully extensible and works well with other libraries. Every feature can be modified or replaced to suit your unique development workflow and feature needs. Read on to find out how."
+ }]
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/data/tableData.json b/common/src/main/webapp/usageguide/appserver/data/tableData.json
new file mode 100644
index 0000000..12c1a8e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/data/tableData.json
@@ -0,0 +1,71 @@
+{
+ "basic_table_data": {
+ "itemHeader": ["First Name", "Last Name", "Age"],
+ "rowitem": [
+ {"values": ["A", "B","1"]},
+ {"values": ["C", "D", "2"]},
+ {"values": ["E", "F", "3"]}
+ ],
+ "striped": false,
+ "border": false,
+ "hover": true,
+ "condensed": false,
+ "filter": false,
+ "action": "",
+ "searchField": ""
+ },
+
+ "str_table_data": {
+ "itemHeader": [
+ "First Name",
+ "Last Name",
+ "Age"
+ ],
+ "rowitem": [
+ {
+ "values": [
+ "A",
+ "B",
+ "1"
+ ]
+ },
+ {
+ "values": [
+ "C",
+ "D",
+ "2"
+ ]
+ },
+ {
+ "values": [
+ "E",
+ "F",
+ "3"
+ ]
+ }
+ ],
+ "striped": true,
+ "border": true,
+ "hover": false,
+ "condensed": true,
+ "filter": false,
+ "action": "",
+ "searchField": ""
+ },
+
+ "cond_table_data": [
+ {
+ "countryName": "China",
+ "language": "Mandrain"
+ },
+ {
+ "countryName": "India",
+ "language": "English"
+ },
+ {
+ "countryName": "USA",
+ "language": "English"
+ }
+ ]
+}
+
diff --git a/common/src/main/webapp/usageguide/appserver/data/textArea.json b/common/src/main/webapp/usageguide/appserver/data/textArea.json
new file mode 100644
index 0000000..eee18f3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/data/textArea.json
@@ -0,0 +1,111 @@
+{
+ "Note" : {
+ "message" : "Hi I am Note",
+ "placement" : "bottom"
+ },
+
+ "Textbox" : {
+ "errmsg" : "The name is required.",
+ "placeholder" : "Text",
+ "modalVar":"textbox",
+ "errtag":"textboxErr",
+ "errfunc":"validatetextbox"
+},
+
+ "Email" : {
+ "errmsg" : "The email is required.",
+ "placeholder" : "Email",
+ "modalVar":"email",
+ "errtag":"emailErr",
+ "errfunc":"validateemail"
+},
+
+"Url" : {
+ "errmsg" : "The url is required.",
+ "placeholder" : "Url",
+ "modalVar":"url",
+ "errtag":"urlErr",
+ "errfunc":"validateurl"
+},
+
+"Password" : {
+ "errmsg" : "The password is required.",
+ "placeholder" : "Password",
+ "modalVar":"password",
+ "errtag":"passwordErr",
+ "errfunc":"validatepassword"
+},
+
+"Number" : {
+ "errmsg" : "The number is required.",
+ "placeholder" : "Number",
+ "modalVar":"number",
+ "errtag":"numericErr",
+ "errfunc":"validatenumeric"
+},
+
+"Datetime" : {
+ "errmsg" : "The datetime is required.",
+ "placeholder" : "Datetime",
+ "modalVar":"datetime",
+ "errtag":"dotErr",
+ "errfunc":"validatedot"
+},
+
+"Date" : {
+ "errmsg" : "The date is required.",
+ "placeholder" : "Date",
+ "modalVar":"date",
+ "errtag":"dateinputErr",
+ "errfunc":"validatedateinput"
+},
+
+"Month" : {
+ "errmsg" : "The month is required.",
+ "placeholder" : "Month",
+ "modalVar":"month",
+ "errtag":"monthinputErr",
+ "errfunc":"validatemonthinput"
+},
+
+"Week" : {
+ "errmsg" : "The week is required.",
+ "placeholder" : "Week",
+ "modalVar":"week",
+ "errtag":"weekinputErr",
+ "errfunc":"validateweek"
+},
+
+"Time" : {
+ "errmsg" : "The time is required.",
+ "placeholder" : "Time",
+ "modalVar":"time",
+ "errtag":"timeinputErr",
+ "errfunc":"validatetime"
+},
+
+"Ipv4" : {
+ "errmsg" : "The Ipv4 is required.",
+ "placeholder" : "Ipv4",
+ "modalVar":"ipv4",
+ "errtag":"ipv4Err",
+ "errfunc":"validateipv4"
+},
+
+"Ipv6" : {
+ "errmsg" : "The Ipv6 is required.",
+ "placeholder" : "Ipv6",
+ "modalVar":"ipv6",
+ "errtag":"ipv6Err",
+ "errfunc":"validateipv6"
+},
+
+"TextArea" : {
+ "errmsg" : "The textarea is required.",
+ "placeholder" : "Textarea",
+ "modalVar":"textarea",
+ "errtag":"ipv6Err",
+ "errfunc":"validateipv6"
+}
+
+}
diff --git a/common/src/main/webapp/usageguide/appserver/data/treeData.json b/common/src/main/webapp/usageguide/appserver/data/treeData.json
new file mode 100644
index 0000000..8263f3e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/data/treeData.json
@@ -0,0 +1,43 @@
+[
+ {
+ "name": "Java and its divisions",
+ "open": true,
+ "children": [
+ { "name": "Java Standard Edition, J2SE" },
+ { "name": "Java Enterprise Edition, J2EE" },
+ { "name": "Java Mobile Edition, J2ME"}
+ ]
+ },
+ {
+ "name": "UI",
+ "open": true,
+ "children": [
+ { "name": "Hyper Text Markup Language, HTML"},
+ { "name": "Cascading Style Sheets, CSS"},
+ { "name": "JavaScript, JS",
+ "children": [
+ { "name": "Bootstrap JS" },
+ { "name": "Mustache JS" },
+ { "name": "Angular JS" }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "Server",
+ "open": true,
+ "children" : [
+ { "name": "Node JS"},
+ { "name": "Express JS"},
+ { "name": "PHP"}
+ ]
+ },
+ {
+ "name": "Java backend",
+ "open": true,
+ "children" : [
+ { "name": "Spring MVC"},
+ { "name": "Hibernate"}
+ ]
+ }
+] \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/data/vtabData.json b/common/src/main/webapp/usageguide/appserver/data/vtabData.json
new file mode 100644
index 0000000..a87e82f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/data/vtabData.json
@@ -0,0 +1,21 @@
+{
+ "vtabData":
+ {
+ "items": [{
+ "tablabel": "Why AngularJS?",
+ "isActive": true,
+ "target": "tab1",
+ "msg": "HTML is great for declaring static documents, but it falters when we try to use it for declaring dynamic views in web-applications. AngularJS lets you extend HTML vocabulary for your application. The resulting environment is extraordinarily expressive, readable, and quick to develop."
+ }, {
+ "tablabel": "Alternatives",
+ "isActive": false,
+ "target": "tab2",
+ "msg": "Other frameworks deal with HTML’s shortcomings by either abstracting away HTML, CSS, and/or JavaScript or by providing an imperative way for manipulating the DOM. Neither of these address the root problem that HTML was not designed for dynamic views."
+ }, {
+ "tablabel": "Extensibility",
+ "isActive": false,
+ "target": "tab3",
+ "msg": "AngularJS is a toolset for building the framework most suited to your application development. It is fully extensible and works well with other libraries. Every feature can be modified or replaced to suit your unique development workflow and feature needs. Read on to find out how."
+ }]
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/License.txt b/common/src/main/webapp/usageguide/appserver/node_modules/License.txt
new file mode 100644
index 0000000..8e698ec
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/License.txt
@@ -0,0 +1,362 @@
+THIS LICENSE FILE CONTAINS THE LICENSE APPLICABLE DEPENDING ON THE TYPE OF CONTRIBUTIONS.
+
+APACHE LICENSE 2 IS APPLICABLE FOR SOURCE CODE, CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL FOR DOCUMENTATION
+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+
+Apache License Version 2.0, January 2004 http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License.
+
+Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License.
+
+Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution.
+
+You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+You must give any other recipients of the Work or Derivative Works a copy of this License; and You must cause any modified files to carry prominent notices stating that You changed the files; and You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions.
+
+Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks.
+
+This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+
+Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability.
+
+In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+
+While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+Attribution 4.0 International
+
+https://creativecommons.org/licenses/by/4.0/legalcode
+
+Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an "as-is" basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
+
+Using Creative Commons Public Licenses
+
+Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
+
+ Considerations for licensors: Our public licenses are
+ intended for use by those authorized to give the public
+ permission to use material in ways otherwise restricted by
+ copyright and certain other rights. Our licenses are
+ irrevocable. Licensors should read and understand the terms
+ and conditions of the license they choose before applying it.
+ Licensors should also secure all rights necessary before
+ applying our licenses so that the public can reuse the
+ material as expected. Licensors should clearly mark any
+ material not subject to the license. This includes other CC-
+ licensed material, or material used under an exception or
+ limitation to copyright. More considerations for licensors:
+ wiki.creativecommons.org/Considerations_for_licensors
+ Considerations for the public: By using one of our public
+ licenses, a licensor grants the public permission to use the
+ licensed material under specified terms and conditions. If
+ the licensor's permission is not necessary for any reason--for
+ example, because of any applicable exception or limitation to
+ copyright--then that use is not regulated by the license. Our
+ licenses grant only permissions under copyright and certain
+ other rights that a licensor has authority to grant. Use of
+ the licensed material may still be restricted for other
+ reasons, including because others have copyright or other
+ rights in the material. A licensor may make special requests,
+ such as asking that all changes be marked or described.
+ Although not required by our licenses, you are encouraged to
+ respect those requests where reasonable. More_considerations
+ for the public:
+ wiki.creativecommons.org/Considerations_for_licensees
+Creative Commons Attribution 4.0 International Public License
+
+By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
+
+
+Section 1 -- Definitions.
+
+ a. Adapted Material means material subject to Copyright and Similar
+ Rights that is derived from or based upon the Licensed Material
+ and in which the Licensed Material is translated, altered,
+ arranged, transformed, or otherwise modified in a manner requiring
+ permission under the Copyright and Similar Rights held by the
+ Licensor. For purposes of this Public License, where the Licensed
+ Material is a musical work, performance, or sound recording,
+ Adapted Material is always produced where the Licensed Material is
+ synched in timed relation with a moving image.
+ b. Adapter's License means the license You apply to Your Copyright
+ and Similar Rights in Your contributions to Adapted Material in
+ accordance with the terms and conditions of this Public License.
+ c. Copyright and Similar Rights means copyright and/or similar rights
+ closely related to copyright including, without limitation,
+ performance, broadcast, sound recording, and Sui Generis Database
+ Rights, without regard to how the rights are labeled or
+ categorized. For purposes of this Public License, the rights
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
+ Rights.
+ d. Effective Technological Measures means those measures that, in the
+ absence of proper authority, may not be circumvented under laws
+ fulfilling obligations under Article 11 of the WIPO Copyright
+ Treaty adopted on December 20, 1996, and/or similar international
+ agreements.
+ e. Exceptions and Limitations means fair use, fair dealing, and/or
+ any other exception or limitation to Copyright and Similar Rights
+ that applies to Your use of the Licensed Material.
+ f. Licensed Material means the artistic or literary work, database,
+ or other material to which the Licensor applied this Public
+ License.
+ g. Licensed Rights means the rights granted to You subject to the
+ terms and conditions of this Public License, which are limited to
+ all Copyright and Similar Rights that apply to Your use of the
+ Licensed Material and that the Licensor has authority to license.
+ h. Licensor means the individual(s) or entity(ies) granting rights
+ under this Public License.
+ i. Share means to provide material to the public by any means or
+ process that requires permission under the Licensed Rights, such
+ as reproduction, public display, public performance, distribution,
+ dissemination, communication, or importation, and to make material
+ available to the public including in ways that members of the
+ public may access the material from a place and at a time
+ individually chosen by them.
+ j. Sui Generis Database Rights means rights other than copyright
+ resulting from Directive 96/9/EC of the European Parliament and of
+ the Council of 11 March 1996 on the legal protection of databases,
+ as amended and/or succeeded, as well as other essentially
+ equivalent rights anywhere in the world.
+ k. You means the individual or entity exercising the Licensed Rights
+ under this Public License. Your has a corresponding meaning.
+
+Section 2 -- Scope.
+
+ a. License grant.
+ 1. Subject to the terms and conditions of this Public License,
+ the Licensor hereby grants You a worldwide, royalty-free,
+ non-sublicensable, non-exclusive, irrevocable license to
+ exercise the Licensed Rights in the Licensed Material to:
+ a. reproduce and Share the Licensed Material, in whole or
+ in part; and
+ b. produce, reproduce, and Share Adapted Material.
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
+ Exceptions and Limitations apply to Your use, this Public
+ License does not apply, and You do not need to comply with
+ its terms and conditions.
+ 3. Term. The term of this Public License is specified in Section
+ 6(a).
+ 4. Media and formats; technical modifications allowed. The
+ Licensor authorizes You to exercise the Licensed Rights in
+ all media and formats whether now known or hereafter created,
+ and to make technical modifications necessary to do so. The
+ Licensor waives and/or agrees not to assert any right or
+ authority to forbid You from making technical modifications
+ necessary to exercise the Licensed Rights, including
+ technical modifications necessary to circumvent Effective
+ Technological Measures. For purposes of this Public License,
+ simply making modifications authorized by this Section 2(a)
+ (4) never produces Adapted Material.
+ 5. Downstream recipients.
+ a. Offer from the Licensor -- Licensed Material. Every
+ recipient of the Licensed Material automatically
+ receives an offer from the Licensor to exercise the
+ Licensed Rights under the terms and conditions of this
+ Public License.
+ b. No downstream restrictions. You may not offer or impose
+ any additional or different terms or conditions on, or
+ apply any Effective Technological Measures to, the
+ Licensed Material if doing so restricts exercise of the
+ Licensed Rights by any recipient of the Licensed
+ Material.
+ 6. No endorsement. Nothing in this Public License constitutes or
+ may be construed as permission to assert or imply that You
+ are, or that Your use of the Licensed Material is, connected
+ with, or sponsored, endorsed, or granted official status by,
+ the Licensor or others designated to receive attribution as
+ provided in Section 3(a)(1)(A)(i).
+ b. Other rights.
+ 1. Moral rights, such as the right of integrity, are not
+ licensed under this Public License, nor are publicity,
+ privacy, and/or other similar personality rights; however, to
+ the extent possible, the Licensor waives and/or agrees not to
+ assert any such rights held by the Licensor to the limited
+ extent necessary to allow You to exercise the Licensed
+ Rights, but not otherwise.
+ 2. Patent and trademark rights are not licensed under this
+ Public License.
+ 3. To the extent possible, the Licensor waives any right to
+ collect royalties from You for the exercise of the Licensed
+ Rights, whether directly or through a collecting society
+ under any voluntary or waivable statutory or compulsory
+ licensing scheme. In all other cases the Licensor expressly
+ reserves any right to collect such royalties.
+
+Section 3 -- License Conditions.
+
+Your exercise of the Licensed Rights is expressly made subject to the following conditions.
+
+ a. Attribution.
+ 1. If You Share the Licensed Material (including in modified
+ form), You must:
+ a. retain the following if it is supplied by the Licensor
+ with the Licensed Material:
+ i. identification of the creator(s) of the Licensed
+ Material and any others designated to receive
+ attribution, in any reasonable manner requested by
+ the Licensor (including by pseudonym if
+ designated);
+ ii. a copyright notice;
+ iii. a notice that refers to this Public License;
+ iv. a notice that refers to the disclaimer of
+ warranties;
+ v. a URI or hyperlink to the Licensed Material to the
+ extent reasonably practicable;
+ b. indicate if You modified the Licensed Material and
+ retain an indication of any previous modifications; and
+ c. indicate the Licensed Material is licensed under this
+ Public License, and include the text of, or the URI or
+ hyperlink to, this Public License.
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
+ reasonable manner based on the medium, means, and context in
+ which You Share the Licensed Material. For example, it may be
+ reasonable to satisfy the conditions by providing a URI or
+ hyperlink to a resource that includes the required
+ information.
+ 3. If requested by the Licensor, You must remove any of the
+ information required by Section 3(a)(1)(A) to the extent
+ reasonably practicable.
+ 4. If You Share Adapted Material You produce, the Adapter's
+ License You apply must not prevent recipients of the Adapted
+ Material from complying with this Public License.
+
+Section 4 -- Sui Generis Database Rights.
+
+Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
+
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
+ to extract, reuse, reproduce, and Share all or a substantial
+ portion of the contents of the database;
+ b. if You include all or a substantial portion of the database
+ contents in a database in which You have Sui Generis Database
+ Rights, then the database in which You have Sui Generis Database
+ Rights (but not its individual contents) is Adapted Material; and
+ c. You must comply with the conditions in Section 3(a) if You Share
+ all or a substantial portion of the contents of the database.
+For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
+
+
+Section 5 -- Disclaimer of Warranties and Limitation of Liability.
+
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
+ c. The disclaimer of warranties and limitation of liability provided
+ above shall be interpreted in a manner that, to the extent
+ possible, most closely approximates an absolute disclaimer and
+ waiver of all liability.
+
+Section 6 -- Term and Termination.
+
+ a. This Public License applies for the term of the Copyright and
+ Similar Rights licensed here. However, if You fail to comply with
+ this Public License, then Your rights under this Public License
+ terminate automatically.
+ b. Where Your right to use the Licensed Material has terminated under
+ Section 6(a), it reinstates:
+ 1. automatically as of the date the violation is cured, provided
+ it is cured within 30 days of Your discovery of the
+ violation; or
+ 2. upon express reinstatement by the Licensor.
+ For the avoidance of doubt, this Section 6(b) does not affect any
+ right the Licensor may have to seek remedies for Your violations
+ of this Public License.
+ c. For the avoidance of doubt, the Licensor may also offer the
+ Licensed Material under separate terms or conditions or stop
+ distributing the Licensed Material at any time; however, doing so
+ will not terminate this Public License.
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
+ License.
+
+Section 7 -- Other Terms and Conditions.
+
+ a. The Licensor shall not be bound by any additional or different
+ terms or conditions communicated by You unless expressly agreed.
+ b. Any arrangements, understandings, or agreements regarding the
+ Licensed Material not stated herein are separate from and
+ independent of the terms and conditions of this Public License.
+
+Section 8 -- Interpretation.
+
+ a. For the avoidance of doubt, this Public License does not, and
+ shall not be interpreted to, reduce, limit, restrict, or impose
+ conditions on any use of the Licensed Material that could lawfully
+ be made without permission under this Public License.
+ b. To the extent possible, if any provision of this Public License is
+ deemed unenforceable, it shall be automatically reformed to the
+ minimum extent necessary to make it enforceable. If the provision
+ cannot be reformed, it shall be severed from this Public License
+ without affecting the enforceability of the remaining terms and
+ conditions.
+ c. No term or condition of this Public License will be waived and no
+ failure to comply consented to unless expressly agreed to by the
+ Licensor.
+ d. Nothing in this Public License constitutes or may be interpreted
+ as a limitation upon, or waiver of, any privileges and immunities
+ that apply to the Licensor or You, including from the legal
+ processes of any jurisdiction or authority.
+Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the "Licensor." The text of the Creative Commons public licenses is dedicated to the public domain under the CC0 Public Domain Dedication. Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
+
+Creative Commons may be contacted at creativecommons.org. \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/HISTORY.md
new file mode 100644
index 0000000..f3ea28c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/HISTORY.md
@@ -0,0 +1,464 @@
+1.15.2 / 2016-06-19
+===================
+
+ * deps: bytes@2.4.0
+ * deps: content-type@~1.0.2
+ - perf: enable strict mode
+ * deps: http-errors@~1.5.0
+ - Use `setprototypeof` module to replace `__proto__` setting
+ - deps: statuses@'>= 1.3.0 < 2'
+ - perf: enable strict mode
+ * deps: qs@6.2.0
+ * deps: raw-body@~2.1.7
+ - deps: bytes@2.4.0
+ - perf: remove double-cleanup on happy path
+ * deps: type-is@~1.6.13
+ - deps: mime-types@~2.1.11
+
+1.15.1 / 2016-05-05
+===================
+
+ * deps: bytes@2.3.0
+ - Drop partial bytes on all parsed units
+ - Fix parsing byte string that looks like hex
+ * deps: raw-body@~2.1.6
+ - deps: bytes@2.3.0
+ * deps: type-is@~1.6.12
+ - deps: mime-types@~2.1.10
+
+1.15.0 / 2016-02-10
+===================
+
+ * deps: http-errors@~1.4.0
+ - Add `HttpError` export, for `err instanceof createError.HttpError`
+ - deps: inherits@2.0.1
+ - deps: statuses@'>= 1.2.1 < 2'
+ * deps: qs@6.1.0
+ * deps: type-is@~1.6.11
+ - deps: mime-types@~2.1.9
+
+1.14.2 / 2015-12-16
+===================
+
+ * deps: bytes@2.2.0
+ * deps: iconv-lite@0.4.13
+ * deps: qs@5.2.0
+ * deps: raw-body@~2.1.5
+ - deps: bytes@2.2.0
+ - deps: iconv-lite@0.4.13
+ * deps: type-is@~1.6.10
+ - deps: mime-types@~2.1.8
+
+1.14.1 / 2015-09-27
+===================
+
+ * Fix issue where invalid charset results in 400 when `verify` used
+ * deps: iconv-lite@0.4.12
+ - Fix CESU-8 decoding in Node.js 4.x
+ * deps: raw-body@~2.1.4
+ - Fix masking critical errors from `iconv-lite`
+ - deps: iconv-lite@0.4.12
+ * deps: type-is@~1.6.9
+ - deps: mime-types@~2.1.7
+
+1.14.0 / 2015-09-16
+===================
+
+ * Fix JSON strict parse error to match syntax errors
+ * Provide static `require` analysis in `urlencoded` parser
+ * deps: depd@~1.1.0
+ - Support web browser loading
+ * deps: qs@5.1.0
+ * deps: raw-body@~2.1.3
+ - Fix sync callback when attaching data listener causes sync read
+ * deps: type-is@~1.6.8
+ - Fix type error when given invalid type to match against
+ - deps: mime-types@~2.1.6
+
+1.13.3 / 2015-07-31
+===================
+
+ * deps: type-is@~1.6.6
+ - deps: mime-types@~2.1.4
+
+1.13.2 / 2015-07-05
+===================
+
+ * deps: iconv-lite@0.4.11
+ * deps: qs@4.0.0
+ - Fix dropping parameters like `hasOwnProperty`
+ - Fix user-visible incompatibilities from 3.1.0
+ - Fix various parsing edge cases
+ * deps: raw-body@~2.1.2
+ - Fix error stack traces to skip `makeError`
+ - deps: iconv-lite@0.4.11
+ * deps: type-is@~1.6.4
+ - deps: mime-types@~2.1.2
+ - perf: enable strict mode
+ - perf: remove argument reassignment
+
+1.13.1 / 2015-06-16
+===================
+
+ * deps: qs@2.4.2
+ - Downgraded from 3.1.0 because of user-visible incompatibilities
+
+1.13.0 / 2015-06-14
+===================
+
+ * Add `statusCode` property on `Error`s, in addition to `status`
+ * Change `type` default to `application/json` for JSON parser
+ * Change `type` default to `application/x-www-form-urlencoded` for urlencoded parser
+ * Provide static `require` analysis
+ * Use the `http-errors` module to generate errors
+ * deps: bytes@2.1.0
+ - Slight optimizations
+ * deps: iconv-lite@0.4.10
+ - The encoding UTF-16 without BOM now defaults to UTF-16LE when detection fails
+ - Leading BOM is now removed when decoding
+ * deps: on-finished@~2.3.0
+ - Add defined behavior for HTTP `CONNECT` requests
+ - Add defined behavior for HTTP `Upgrade` requests
+ - deps: ee-first@1.1.1
+ * deps: qs@3.1.0
+ - Fix dropping parameters like `hasOwnProperty`
+ - Fix various parsing edge cases
+ - Parsed object now has `null` prototype
+ * deps: raw-body@~2.1.1
+ - Use `unpipe` module for unpiping requests
+ - deps: iconv-lite@0.4.10
+ * deps: type-is@~1.6.3
+ - deps: mime-types@~2.1.1
+ - perf: reduce try block size
+ - perf: remove bitwise operations
+ * perf: enable strict mode
+ * perf: remove argument reassignment
+ * perf: remove delete call
+
+1.12.4 / 2015-05-10
+===================
+
+ * deps: debug@~2.2.0
+ * deps: qs@2.4.2
+ - Fix allowing parameters like `constructor`
+ * deps: on-finished@~2.2.1
+ * deps: raw-body@~2.0.1
+ - Fix a false-positive when unpiping in Node.js 0.8
+ - deps: bytes@2.0.1
+ * deps: type-is@~1.6.2
+ - deps: mime-types@~2.0.11
+
+1.12.3 / 2015-04-15
+===================
+
+ * Slight efficiency improvement when not debugging
+ * deps: depd@~1.0.1
+ * deps: iconv-lite@0.4.8
+ - Add encoding alias UNICODE-1-1-UTF-7
+ * deps: raw-body@1.3.4
+ - Fix hanging callback if request aborts during read
+ - deps: iconv-lite@0.4.8
+
+1.12.2 / 2015-03-16
+===================
+
+ * deps: qs@2.4.1
+ - Fix error when parameter `hasOwnProperty` is present
+
+1.12.1 / 2015-03-15
+===================
+
+ * deps: debug@~2.1.3
+ - Fix high intensity foreground color for bold
+ - deps: ms@0.7.0
+ * deps: type-is@~1.6.1
+ - deps: mime-types@~2.0.10
+
+1.12.0 / 2015-02-13
+===================
+
+ * add `debug` messages
+ * accept a function for the `type` option
+ * use `content-type` to parse `Content-Type` headers
+ * deps: iconv-lite@0.4.7
+ - Gracefully support enumerables on `Object.prototype`
+ * deps: raw-body@1.3.3
+ - deps: iconv-lite@0.4.7
+ * deps: type-is@~1.6.0
+ - fix argument reassignment
+ - fix false-positives in `hasBody` `Transfer-Encoding` check
+ - support wildcard for both type and subtype (`*/*`)
+ - deps: mime-types@~2.0.9
+
+1.11.0 / 2015-01-30
+===================
+
+ * make internal `extended: true` depth limit infinity
+ * deps: type-is@~1.5.6
+ - deps: mime-types@~2.0.8
+
+1.10.2 / 2015-01-20
+===================
+
+ * deps: iconv-lite@0.4.6
+ - Fix rare aliases of single-byte encodings
+ * deps: raw-body@1.3.2
+ - deps: iconv-lite@0.4.6
+
+1.10.1 / 2015-01-01
+===================
+
+ * deps: on-finished@~2.2.0
+ * deps: type-is@~1.5.5
+ - deps: mime-types@~2.0.7
+
+1.10.0 / 2014-12-02
+===================
+
+ * make internal `extended: true` array limit dynamic
+
+1.9.3 / 2014-11-21
+==================
+
+ * deps: iconv-lite@0.4.5
+ - Fix Windows-31J and X-SJIS encoding support
+ * deps: qs@2.3.3
+ - Fix `arrayLimit` behavior
+ * deps: raw-body@1.3.1
+ - deps: iconv-lite@0.4.5
+ * deps: type-is@~1.5.3
+ - deps: mime-types@~2.0.3
+
+1.9.2 / 2014-10-27
+==================
+
+ * deps: qs@2.3.2
+ - Fix parsing of mixed objects and values
+
+1.9.1 / 2014-10-22
+==================
+
+ * deps: on-finished@~2.1.1
+ - Fix handling of pipelined requests
+ * deps: qs@2.3.0
+ - Fix parsing of mixed implicit and explicit arrays
+ * deps: type-is@~1.5.2
+ - deps: mime-types@~2.0.2
+
+1.9.0 / 2014-09-24
+==================
+
+ * include the charset in "unsupported charset" error message
+ * include the encoding in "unsupported content encoding" error message
+ * deps: depd@~1.0.0
+
+1.8.4 / 2014-09-23
+==================
+
+ * fix content encoding to be case-insensitive
+
+1.8.3 / 2014-09-19
+==================
+
+ * deps: qs@2.2.4
+ - Fix issue with object keys starting with numbers truncated
+
+1.8.2 / 2014-09-15
+==================
+
+ * deps: depd@0.4.5
+
+1.8.1 / 2014-09-07
+==================
+
+ * deps: media-typer@0.3.0
+ * deps: type-is@~1.5.1
+
+1.8.0 / 2014-09-05
+==================
+
+ * make empty-body-handling consistent between chunked requests
+ - empty `json` produces `{}`
+ - empty `raw` produces `new Buffer(0)`
+ - empty `text` produces `''`
+ - empty `urlencoded` produces `{}`
+ * deps: qs@2.2.3
+ - Fix issue where first empty value in array is discarded
+ * deps: type-is@~1.5.0
+ - fix `hasbody` to be true for `content-length: 0`
+
+1.7.0 / 2014-09-01
+==================
+
+ * add `parameterLimit` option to `urlencoded` parser
+ * change `urlencoded` extended array limit to 100
+ * respond with 413 when over `parameterLimit` in `urlencoded`
+
+1.6.7 / 2014-08-29
+==================
+
+ * deps: qs@2.2.2
+ - Remove unnecessary cloning
+
+1.6.6 / 2014-08-27
+==================
+
+ * deps: qs@2.2.0
+ - Array parsing fix
+ - Performance improvements
+
+1.6.5 / 2014-08-16
+==================
+
+ * deps: on-finished@2.1.0
+
+1.6.4 / 2014-08-14
+==================
+
+ * deps: qs@1.2.2
+
+1.6.3 / 2014-08-10
+==================
+
+ * deps: qs@1.2.1
+
+1.6.2 / 2014-08-07
+==================
+
+ * deps: qs@1.2.0
+ - Fix parsing array of objects
+
+1.6.1 / 2014-08-06
+==================
+
+ * deps: qs@1.1.0
+ - Accept urlencoded square brackets
+ - Accept empty values in implicit array notation
+
+1.6.0 / 2014-08-05
+==================
+
+ * deps: qs@1.0.2
+ - Complete rewrite
+ - Limits array length to 20
+ - Limits object depth to 5
+ - Limits parameters to 1,000
+
+1.5.2 / 2014-07-27
+==================
+
+ * deps: depd@0.4.4
+ - Work-around v8 generating empty stack traces
+
+1.5.1 / 2014-07-26
+==================
+
+ * deps: depd@0.4.3
+ - Fix exception when global `Error.stackTraceLimit` is too low
+
+1.5.0 / 2014-07-20
+==================
+
+ * deps: depd@0.4.2
+ - Add `TRACE_DEPRECATION` environment variable
+ - Remove non-standard grey color from color output
+ - Support `--no-deprecation` argument
+ - Support `--trace-deprecation` argument
+ * deps: iconv-lite@0.4.4
+ - Added encoding UTF-7
+ * deps: raw-body@1.3.0
+ - deps: iconv-lite@0.4.4
+ - Added encoding UTF-7
+ - Fix `Cannot switch to old mode now` error on Node.js 0.10+
+ * deps: type-is@~1.3.2
+
+1.4.3 / 2014-06-19
+==================
+
+ * deps: type-is@1.3.1
+ - fix global variable leak
+
+1.4.2 / 2014-06-19
+==================
+
+ * deps: type-is@1.3.0
+ - improve type parsing
+
+1.4.1 / 2014-06-19
+==================
+
+ * fix urlencoded extended deprecation message
+
+1.4.0 / 2014-06-19
+==================
+
+ * add `text` parser
+ * add `raw` parser
+ * check accepted charset in content-type (accepts utf-8)
+ * check accepted encoding in content-encoding (accepts identity)
+ * deprecate `bodyParser()` middleware; use `.json()` and `.urlencoded()` as needed
+ * deprecate `urlencoded()` without provided `extended` option
+ * lazy-load urlencoded parsers
+ * parsers split into files for reduced mem usage
+ * support gzip and deflate bodies
+ - set `inflate: false` to turn off
+ * deps: raw-body@1.2.2
+ - Support all encodings from `iconv-lite`
+
+1.3.1 / 2014-06-11
+==================
+
+ * deps: type-is@1.2.1
+ - Switch dependency from mime to mime-types@1.0.0
+
+1.3.0 / 2014-05-31
+==================
+
+ * add `extended` option to urlencoded parser
+
+1.2.2 / 2014-05-27
+==================
+
+ * deps: raw-body@1.1.6
+ - assert stream encoding on node.js 0.8
+ - assert stream encoding on node.js < 0.10.6
+ - deps: bytes@1
+
+1.2.1 / 2014-05-26
+==================
+
+ * invoke `next(err)` after request fully read
+ - prevents hung responses and socket hang ups
+
+1.2.0 / 2014-05-11
+==================
+
+ * add `verify` option
+ * deps: type-is@1.2.0
+ - support suffix matching
+
+1.1.2 / 2014-05-11
+==================
+
+ * improve json parser speed
+
+1.1.1 / 2014-05-11
+==================
+
+ * fix repeated limit parsing with every request
+
+1.1.0 / 2014-05-10
+==================
+
+ * add `type` option
+ * deps: pin for safety and consistency
+
+1.0.2 / 2014-04-14
+==================
+
+ * use `type-is` module
+
+1.0.1 / 2014-03-20
+==================
+
+ * lower default limits to 100kb
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/LICENSE
new file mode 100644
index 0000000..386b7b6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/README.md
new file mode 100644
index 0000000..6376536
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/README.md
@@ -0,0 +1,409 @@
+# body-parser
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+[![Gratipay][gratipay-image]][gratipay-url]
+
+Node.js body parsing middleware.
+
+Parse incoming request bodies in a middleware before your handlers, availabe
+under the `req.body` property.
+
+[Learn about the anatomy of an HTTP transaction in Node.js](https://nodejs.org/en/docs/guides/anatomy-of-an-http-transaction/).
+
+_This does not handle multipart bodies_, due to their complex and typically
+large nature. For multipart bodies, you may be interested in the following
+modules:
+
+ * [busboy](https://www.npmjs.org/package/busboy#readme) and
+ [connect-busboy](https://www.npmjs.org/package/connect-busboy#readme)
+ * [multiparty](https://www.npmjs.org/package/multiparty#readme) and
+ [connect-multiparty](https://www.npmjs.org/package/connect-multiparty#readme)
+ * [formidable](https://www.npmjs.org/package/formidable#readme)
+ * [multer](https://www.npmjs.org/package/multer#readme)
+
+This module provides the following parsers:
+
+ * [JSON body parser](#bodyparserjsonoptions)
+ * [Raw body parser](#bodyparserrawoptions)
+ * [Text body parser](#bodyparsertextoptions)
+ * [URL-encoded form body parser](#bodyparserurlencodedoptions)
+
+Other body parsers you might be interested in:
+
+- [body](https://www.npmjs.org/package/body#readme)
+- [co-body](https://www.npmjs.org/package/co-body#readme)
+
+## Installation
+
+```sh
+$ npm install body-parser
+```
+
+## API
+
+```js
+var bodyParser = require('body-parser')
+```
+
+The `bodyParser` object exposes various factories to create middlewares. All
+middlewares will populate the `req.body` property with the parsed body, or an
+empty object (`{}`) if there was no body to parse (or an error was returned).
+
+The various errors returned by this module are described in the
+[errors section](#errors).
+
+### bodyParser.json(options)
+
+Returns middleware that only parses `json`. This parser accepts any Unicode
+encoding of the body and supports automatic inflation of `gzip` and `deflate`
+encodings.
+
+A new `body` object containing the parsed data is populated on the `request`
+object after the middleware (i.e. `req.body`).
+
+#### Options
+
+The `json` function takes an option `options` object that may contain any of
+the following keys:
+
+##### inflate
+
+When set to `true`, then deflated (compressed) bodies will be inflated; when
+`false`, deflated bodies are rejected. Defaults to `true`.
+
+##### limit
+
+Controls the maximum request body size. If this is a number, then the value
+specifies the number of bytes; if it is a string, the value is passed to the
+[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
+to `'100kb'`.
+
+##### reviver
+
+The `reviver` option is passed directly to `JSON.parse` as the second
+argument. You can find more information on this argument
+[in the MDN documentation about JSON.parse](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Example.3A_Using_the_reviver_parameter).
+
+##### strict
+
+When set to `true`, will only accept arrays and objects; when `false` will
+accept anything `JSON.parse` accepts. Defaults to `true`.
+
+##### type
+
+The `type` option is used to determine what media type the middleware will
+parse. This option can be a function or a string. If a string, `type` option
+is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme)
+library and this can be an extension name (like `json`), a mime type (like
+`application/json`), or a mime type with a wildcard (like `*/*` or `*/json`).
+If a function, the `type` option is called as `fn(req)` and the request is
+parsed if it returns a truthy value. Defaults to `application/json`.
+
+##### verify
+
+The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
+where `buf` is a `Buffer` of the raw request body and `encoding` is the
+encoding of the request. The parsing can be aborted by throwing an error.
+
+### bodyParser.raw(options)
+
+Returns middleware that parses all bodies as a `Buffer`. This parser
+supports automatic inflation of `gzip` and `deflate` encodings.
+
+A new `body` object containing the parsed data is populated on the `request`
+object after the middleware (i.e. `req.body`). This will be a `Buffer` object
+of the body.
+
+#### Options
+
+The `raw` function takes an option `options` object that may contain any of
+the following keys:
+
+##### inflate
+
+When set to `true`, then deflated (compressed) bodies will be inflated; when
+`false`, deflated bodies are rejected. Defaults to `true`.
+
+##### limit
+
+Controls the maximum request body size. If this is a number, then the value
+specifies the number of bytes; if it is a string, the value is passed to the
+[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
+to `'100kb'`.
+
+##### type
+
+The `type` option is used to determine what media type the middleware will
+parse. This option can be a function or a string. If a string, `type` option
+is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme)
+library and this can be an extension name (like `bin`), a mime type (like
+`application/octet-stream`), or a mime type with a wildcard (like `*/*` or
+`application/*`). If a function, the `type` option is called as `fn(req)`
+and the request is parsed if it returns a truthy value. Defaults to
+`application/octet-stream`.
+
+##### verify
+
+The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
+where `buf` is a `Buffer` of the raw request body and `encoding` is the
+encoding of the request. The parsing can be aborted by throwing an error.
+
+### bodyParser.text(options)
+
+Returns middleware that parses all bodies as a string. This parser supports
+automatic inflation of `gzip` and `deflate` encodings.
+
+A new `body` string containing the parsed data is populated on the `request`
+object after the middleware (i.e. `req.body`). This will be a string of the
+body.
+
+#### Options
+
+The `text` function takes an option `options` object that may contain any of
+the following keys:
+
+##### defaultCharset
+
+Specify the default character set for the text content if the charset is not
+specified in the `Content-Type` header of the request. Defaults to `utf-8`.
+
+##### inflate
+
+When set to `true`, then deflated (compressed) bodies will be inflated; when
+`false`, deflated bodies are rejected. Defaults to `true`.
+
+##### limit
+
+Controls the maximum request body size. If this is a number, then the value
+specifies the number of bytes; if it is a string, the value is passed to the
+[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
+to `'100kb'`.
+
+##### type
+
+The `type` option is used to determine what media type the middleware will
+parse. This option can be a function or a string. If a string, `type` option
+is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme)
+library and this can be an extension name (like `txt`), a mime type (like
+`text/plain`), or a mime type with a wildcard (like `*/*` or `text/*`).
+If a function, the `type` option is called as `fn(req)` and the request is
+parsed if it returns a truthy value. Defaults to `text/plain`.
+
+##### verify
+
+The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
+where `buf` is a `Buffer` of the raw request body and `encoding` is the
+encoding of the request. The parsing can be aborted by throwing an error.
+
+### bodyParser.urlencoded(options)
+
+Returns middleware that only parses `urlencoded` bodies. This parser accepts
+only UTF-8 encoding of the body and supports automatic inflation of `gzip`
+and `deflate` encodings.
+
+A new `body` object containing the parsed data is populated on the `request`
+object after the middleware (i.e. `req.body`). This object will contain
+key-value pairs, where the value can be a string or array (when `extended` is
+`false`), or any type (when `extended` is `true`).
+
+#### Options
+
+The `urlencoded` function takes an option `options` object that may contain
+any of the following keys:
+
+##### extended
+
+The `extended` option allows to choose between parsing the URL-encoded data
+with the `querystring` library (when `false`) or the `qs` library (when
+`true`). The "extended" syntax allows for rich objects and arrays to be
+encoded into the URL-encoded format, allowing for a JSON-like experience
+with URL-encoded. For more information, please
+[see the qs library](https://www.npmjs.org/package/qs#readme).
+
+Defaults to `true`, but using the default has been deprecated. Please
+research into the difference between `qs` and `querystring` and choose the
+appropriate setting.
+
+##### inflate
+
+When set to `true`, then deflated (compressed) bodies will be inflated; when
+`false`, deflated bodies are rejected. Defaults to `true`.
+
+##### limit
+
+Controls the maximum request body size. If this is a number, then the value
+specifies the number of bytes; if it is a string, the value is passed to the
+[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
+to `'100kb'`.
+
+##### parameterLimit
+
+The `parameterLimit` option controls the maximum number of parameters that
+are allowed in the URL-encoded data. If a request contains more parameters
+than this value, a 413 will be returned to the client. Defaults to `1000`.
+
+##### type
+
+The `type` option is used to determine what media type the middleware will
+parse. This option can be a function or a string. If a string, `type` option
+is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme)
+library and this can be an extension name (like `urlencoded`), a mime type (like
+`application/x-www-form-urlencoded`), or a mime type with a wildcard (like
+`*/x-www-form-urlencoded`). If a function, the `type` option is called as
+`fn(req)` and the request is parsed if it returns a truthy value. Defaults
+to `application/x-www-form-urlencoded`.
+
+##### verify
+
+The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
+where `buf` is a `Buffer` of the raw request body and `encoding` is the
+encoding of the request. The parsing can be aborted by throwing an error.
+
+## Errors
+
+The middlewares provided by this module create errors depending on the error
+condition during parsing. The errors will typically have a `status` property
+that contains the suggested HTTP response code and a `body` property containing
+the read body, if available.
+
+The following are the common errors emitted, though any error can come through
+for various reasons.
+
+### content encoding unsupported
+
+This error will occur when the request had a `Content-Encoding` header that
+contained an encoding but the "inflation" option was set to `false`. The
+`status` property is set to `415`.
+
+### request aborted
+
+This error will occur when the request is aborted by the client before reading
+the body has finished. The `received` property will be set to the number of
+bytes received before the request was aborted and the `expected` property is
+set to the number of expected bytes. The `status` property is set to `400`.
+
+### request entity too large
+
+This error will occur when the request body's size is larger than the "limit"
+option. The `limit` property will be set to the byte limit and the `length`
+property will be set to the request body's length. The `status` property is
+set to `413`.
+
+### request size did not match content length
+
+This error will occur when the request's length did not match the length from
+the `Content-Length` header. This typically occurs when the request is malformed,
+typically when the `Content-Length` header was calculated based on characters
+instead of bytes. The `status` property is set to `400`.
+
+### stream encoding should not be set
+
+This error will occur when something called the `req.setEncoding` method prior
+to this middleware. This module operates directly on bytes only and you cannot
+call `req.setEncoding` when using this module. The `status` property is set to
+`500`.
+
+### unsupported charset "BOGUS"
+
+This error will occur when the request had a charset parameter in the
+`Content-Type` header, but the `iconv-lite` module does not support it OR the
+parser does not support it. The charset is contained in the message as well
+as in the `charset` property. The `status` property is set to `415`.
+
+### unsupported content encoding "bogus"
+
+This error will occur when the request had a `Content-Encoding` header that
+contained an unsupported encoding. The encoding is contained in the message
+as well as in the `encoding` property. The `status` property is set to `415`.
+
+## Examples
+
+### Express/Connect top-level generic
+
+This example demonstrates adding a generic JSON and URL-encoded parser as a
+top-level middleware, which will parse the bodies of all incoming requests.
+This is the simplest setup.
+
+```js
+var express = require('express')
+var bodyParser = require('body-parser')
+
+var app = express()
+
+// parse application/x-www-form-urlencoded
+app.use(bodyParser.urlencoded({ extended: false }))
+
+// parse application/json
+app.use(bodyParser.json())
+
+app.use(function (req, res) {
+ res.setHeader('Content-Type', 'text/plain')
+ res.write('you posted:\n')
+ res.end(JSON.stringify(req.body, null, 2))
+})
+```
+
+### Express route-specific
+
+This example demonstrates adding body parsers specifically to the routes that
+need them. In general, this is the most recommended way to use body-parser with
+Express.
+
+```js
+var express = require('express')
+var bodyParser = require('body-parser')
+
+var app = express()
+
+// create application/json parser
+var jsonParser = bodyParser.json()
+
+// create application/x-www-form-urlencoded parser
+var urlencodedParser = bodyParser.urlencoded({ extended: false })
+
+// POST /login gets urlencoded bodies
+app.post('/login', urlencodedParser, function (req, res) {
+ if (!req.body) return res.sendStatus(400)
+ res.send('welcome, ' + req.body.username)
+})
+
+// POST /api/users gets JSON bodies
+app.post('/api/users', jsonParser, function (req, res) {
+ if (!req.body) return res.sendStatus(400)
+ // create user in req.body
+})
+```
+
+### Change accepted type for parsers
+
+All the parsers accept a `type` option which allows you to change the
+`Content-Type` that the middleware will parse.
+
+```js
+// parse various different custom JSON types as JSON
+app.use(bodyParser.json({ type: 'application/*+json' }))
+
+// parse some custom thing into a Buffer
+app.use(bodyParser.raw({ type: 'application/vnd.custom-type' }))
+
+// parse an HTML body into a string
+app.use(bodyParser.text({ type: 'text/html' }))
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/body-parser.svg
+[npm-url]: https://npmjs.org/package/body-parser
+[travis-image]: https://img.shields.io/travis/expressjs/body-parser/master.svg
+[travis-url]: https://travis-ci.org/expressjs/body-parser
+[coveralls-image]: https://img.shields.io/coveralls/expressjs/body-parser/master.svg
+[coveralls-url]: https://coveralls.io/r/expressjs/body-parser?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/body-parser.svg
+[downloads-url]: https://npmjs.org/package/body-parser
+[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg
+[gratipay-url]: https://www.gratipay.com/dougwilson/
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/index.js
new file mode 100644
index 0000000..93c3a1f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/index.js
@@ -0,0 +1,157 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var deprecate = require('depd')('body-parser')
+
+/**
+ * Cache of loaded parsers.
+ * @private
+ */
+
+var parsers = Object.create(null)
+
+/**
+ * @typedef Parsers
+ * @type {function}
+ * @property {function} json
+ * @property {function} raw
+ * @property {function} text
+ * @property {function} urlencoded
+ */
+
+/**
+ * Module exports.
+ * @type {Parsers}
+ */
+
+exports = module.exports = deprecate.function(bodyParser,
+ 'bodyParser: use individual json/urlencoded middlewares')
+
+/**
+ * JSON parser.
+ * @public
+ */
+
+Object.defineProperty(exports, 'json', {
+ configurable: true,
+ enumerable: true,
+ get: createParserGetter('json')
+})
+
+/**
+ * Raw parser.
+ * @public
+ */
+
+Object.defineProperty(exports, 'raw', {
+ configurable: true,
+ enumerable: true,
+ get: createParserGetter('raw')
+})
+
+/**
+ * Text parser.
+ * @public
+ */
+
+Object.defineProperty(exports, 'text', {
+ configurable: true,
+ enumerable: true,
+ get: createParserGetter('text')
+})
+
+/**
+ * URL-encoded parser.
+ * @public
+ */
+
+Object.defineProperty(exports, 'urlencoded', {
+ configurable: true,
+ enumerable: true,
+ get: createParserGetter('urlencoded')
+})
+
+/**
+ * Create a middleware to parse json and urlencoded bodies.
+ *
+ * @param {object} [options]
+ * @return {function}
+ * @deprecated
+ * @public
+ */
+
+function bodyParser (options) {
+ var opts = {}
+
+ // exclude type option
+ if (options) {
+ for (var prop in options) {
+ if (prop !== 'type') {
+ opts[prop] = options[prop]
+ }
+ }
+ }
+
+ var _urlencoded = exports.urlencoded(opts)
+ var _json = exports.json(opts)
+
+ return function bodyParser (req, res, next) {
+ _json(req, res, function (err) {
+ if (err) return next(err)
+ _urlencoded(req, res, next)
+ })
+ }
+}
+
+/**
+ * Create a getter for loading a parser.
+ * @private
+ */
+
+function createParserGetter (name) {
+ return function get () {
+ return loadParser(name)
+ }
+}
+
+/**
+ * Load a parser module.
+ * @private
+ */
+
+function loadParser (parserName) {
+ var parser = parsers[parserName]
+
+ if (parser !== undefined) {
+ return parser
+ }
+
+ // this uses a switch for static require analysis
+ switch (parserName) {
+ case 'json':
+ parser = require('./lib/types/json')
+ break
+ case 'raw':
+ parser = require('./lib/types/raw')
+ break
+ case 'text':
+ parser = require('./lib/types/text')
+ break
+ case 'urlencoded':
+ parser = require('./lib/types/urlencoded')
+ break
+ }
+
+ // store to prevent invoking require()
+ return (parsers[parserName] = parser)
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/lib/read.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/lib/read.js
new file mode 100644
index 0000000..3c0fe93
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/lib/read.js
@@ -0,0 +1,188 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var createError = require('http-errors')
+var getBody = require('raw-body')
+var iconv = require('iconv-lite')
+var onFinished = require('on-finished')
+var zlib = require('zlib')
+
+/**
+ * Module exports.
+ */
+
+module.exports = read
+
+/**
+ * Read a request into a buffer and parse.
+ *
+ * @param {object} req
+ * @param {object} res
+ * @param {function} next
+ * @param {function} parse
+ * @param {function} debug
+ * @param {object} [options]
+ * @api private
+ */
+
+function read (req, res, next, parse, debug, options) {
+ var length
+ var opts = options || {}
+ var stream
+
+ // flag as parsed
+ req._body = true
+
+ // read options
+ var encoding = opts.encoding !== null
+ ? opts.encoding || 'utf-8'
+ : null
+ var verify = opts.verify
+
+ try {
+ // get the content stream
+ stream = contentstream(req, debug, opts.inflate)
+ length = stream.length
+ stream.length = undefined
+ } catch (err) {
+ return next(err)
+ }
+
+ // set raw-body options
+ opts.length = length
+ opts.encoding = verify
+ ? null
+ : encoding
+
+ // assert charset is supported
+ if (opts.encoding === null && encoding !== null && !iconv.encodingExists(encoding)) {
+ return next(createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', {
+ charset: encoding.toLowerCase()
+ }))
+ }
+
+ // read body
+ debug('read body')
+ getBody(stream, opts, function (err, body) {
+ if (err) {
+ // default to 400
+ setErrorStatus(err, 400)
+
+ // echo back charset
+ if (err.type === 'encoding.unsupported') {
+ err = createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', {
+ charset: encoding.toLowerCase()
+ })
+ }
+
+ // read off entire request
+ stream.resume()
+ onFinished(req, function onfinished () {
+ next(err)
+ })
+ return
+ }
+
+ // verify
+ if (verify) {
+ try {
+ debug('verify body')
+ verify(req, res, body, encoding)
+ } catch (err) {
+ // default to 403
+ setErrorStatus(err, 403)
+ next(err)
+ return
+ }
+ }
+
+ // parse
+ var str
+ try {
+ debug('parse body')
+ str = typeof body !== 'string' && encoding !== null
+ ? iconv.decode(body, encoding)
+ : body
+ req.body = parse(str)
+ } catch (err) {
+ err.body = str === undefined
+ ? body
+ : str
+
+ // default to 400
+ setErrorStatus(err, 400)
+
+ next(err)
+ return
+ }
+
+ next()
+ })
+}
+
+/**
+ * Get the content stream of the request.
+ *
+ * @param {object} req
+ * @param {function} debug
+ * @param {boolean} [inflate=true]
+ * @return {object}
+ * @api private
+ */
+
+function contentstream (req, debug, inflate) {
+ var encoding = (req.headers['content-encoding'] || 'identity').toLowerCase()
+ var length = req.headers['content-length']
+ var stream
+
+ debug('content-encoding "%s"', encoding)
+
+ if (inflate === false && encoding !== 'identity') {
+ throw createError(415, 'content encoding unsupported')
+ }
+
+ switch (encoding) {
+ case 'deflate':
+ stream = zlib.createInflate()
+ debug('inflate body')
+ req.pipe(stream)
+ break
+ case 'gzip':
+ stream = zlib.createGunzip()
+ debug('gunzip body')
+ req.pipe(stream)
+ break
+ case 'identity':
+ stream = req
+ stream.length = length
+ break
+ default:
+ throw createError(415, 'unsupported content encoding "' + encoding + '"', {
+ encoding: encoding
+ })
+ }
+
+ return stream
+}
+
+/**
+ * Set a status on an error object, if ones does not exist
+ * @private
+ */
+
+function setErrorStatus (error, status) {
+ if (!error.status && !error.statusCode) {
+ error.status = status
+ error.statusCode = status
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/lib/types/json.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/lib/types/json.js
new file mode 100644
index 0000000..d0023c7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/lib/types/json.js
@@ -0,0 +1,175 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var bytes = require('bytes')
+var contentType = require('content-type')
+var createError = require('http-errors')
+var debug = require('debug')('body-parser:json')
+var read = require('../read')
+var typeis = require('type-is')
+
+/**
+ * Module exports.
+ */
+
+module.exports = json
+
+/**
+ * RegExp to match the first non-space in a string.
+ *
+ * Allowed whitespace is defined in RFC 7159:
+ *
+ * ws = *(
+ * %x20 / ; Space
+ * %x09 / ; Horizontal tab
+ * %x0A / ; Line feed or New line
+ * %x0D ) ; Carriage return
+ */
+
+var FIRST_CHAR_REGEXP = /^[\x20\x09\x0a\x0d]*(.)/ // eslint-disable-line no-control-regex
+
+/**
+ * Create a middleware to parse JSON bodies.
+ *
+ * @param {object} [options]
+ * @return {function}
+ * @public
+ */
+
+function json (options) {
+ var opts = options || {}
+
+ var limit = typeof opts.limit !== 'number'
+ ? bytes.parse(opts.limit || '100kb')
+ : opts.limit
+ var inflate = opts.inflate !== false
+ var reviver = opts.reviver
+ var strict = opts.strict !== false
+ var type = opts.type || 'application/json'
+ var verify = opts.verify || false
+
+ if (verify !== false && typeof verify !== 'function') {
+ throw new TypeError('option verify must be function')
+ }
+
+ // create the appropriate type checking function
+ var shouldParse = typeof type !== 'function'
+ ? typeChecker(type)
+ : type
+
+ function parse (body) {
+ if (body.length === 0) {
+ // special-case empty json body, as it's a common client-side mistake
+ // TODO: maybe make this configurable or part of "strict" option
+ return {}
+ }
+
+ if (strict) {
+ var first = firstchar(body)
+
+ if (first !== '{' && first !== '[') {
+ debug('strict violation')
+ throw new SyntaxError('Unexpected token ' + first)
+ }
+ }
+
+ debug('parse json')
+ return JSON.parse(body, reviver)
+ }
+
+ return function jsonParser (req, res, next) {
+ if (req._body) {
+ debug('body already parsed')
+ next()
+ return
+ }
+
+ req.body = req.body || {}
+
+ // skip requests without bodies
+ if (!typeis.hasBody(req)) {
+ debug('skip empty body')
+ next()
+ return
+ }
+
+ debug('content-type %j', req.headers['content-type'])
+
+ // determine if request should be parsed
+ if (!shouldParse(req)) {
+ debug('skip parsing')
+ next()
+ return
+ }
+
+ // assert charset per RFC 7159 sec 8.1
+ var charset = getCharset(req) || 'utf-8'
+ if (charset.substr(0, 4) !== 'utf-') {
+ debug('invalid charset')
+ next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', {
+ charset: charset
+ }))
+ return
+ }
+
+ // read
+ read(req, res, next, parse, debug, {
+ encoding: charset,
+ inflate: inflate,
+ limit: limit,
+ verify: verify
+ })
+ }
+}
+
+/**
+ * Get the first non-whitespace character in a string.
+ *
+ * @param {string} str
+ * @return {function}
+ * @api public
+ */
+
+function firstchar (str) {
+ var match = FIRST_CHAR_REGEXP.exec(str)
+ return match ? match[1] : ''
+}
+
+/**
+ * Get the charset of a request.
+ *
+ * @param {object} req
+ * @api private
+ */
+
+function getCharset (req) {
+ try {
+ return contentType.parse(req).parameters.charset.toLowerCase()
+ } catch (e) {
+ return undefined
+ }
+}
+
+/**
+ * Get the simple type checker.
+ *
+ * @param {string} type
+ * @return {function}
+ */
+
+function typeChecker (type) {
+ return function checkType (req) {
+ return Boolean(typeis(req, type))
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/lib/types/raw.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/lib/types/raw.js
new file mode 100644
index 0000000..f5d1b67
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/lib/types/raw.js
@@ -0,0 +1,101 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ */
+
+var bytes = require('bytes')
+var debug = require('debug')('body-parser:raw')
+var read = require('../read')
+var typeis = require('type-is')
+
+/**
+ * Module exports.
+ */
+
+module.exports = raw
+
+/**
+ * Create a middleware to parse raw bodies.
+ *
+ * @param {object} [options]
+ * @return {function}
+ * @api public
+ */
+
+function raw (options) {
+ var opts = options || {}
+
+ var inflate = opts.inflate !== false
+ var limit = typeof opts.limit !== 'number'
+ ? bytes.parse(opts.limit || '100kb')
+ : opts.limit
+ var type = opts.type || 'application/octet-stream'
+ var verify = opts.verify || false
+
+ if (verify !== false && typeof verify !== 'function') {
+ throw new TypeError('option verify must be function')
+ }
+
+ // create the appropriate type checking function
+ var shouldParse = typeof type !== 'function'
+ ? typeChecker(type)
+ : type
+
+ function parse (buf) {
+ return buf
+ }
+
+ return function rawParser (req, res, next) {
+ if (req._body) {
+ debug('body already parsed')
+ next()
+ return
+ }
+
+ req.body = req.body || {}
+
+ // skip requests without bodies
+ if (!typeis.hasBody(req)) {
+ debug('skip empty body')
+ next()
+ return
+ }
+
+ debug('content-type %j', req.headers['content-type'])
+
+ // determine if request should be parsed
+ if (!shouldParse(req)) {
+ debug('skip parsing')
+ next()
+ return
+ }
+
+ // read
+ read(req, res, next, parse, debug, {
+ encoding: null,
+ inflate: inflate,
+ limit: limit,
+ verify: verify
+ })
+ }
+}
+
+/**
+ * Get the simple type checker.
+ *
+ * @param {string} type
+ * @return {function}
+ */
+
+function typeChecker (type) {
+ return function checkType (req) {
+ return Boolean(typeis(req, type))
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/lib/types/text.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/lib/types/text.js
new file mode 100644
index 0000000..8bf2637
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/lib/types/text.js
@@ -0,0 +1,121 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ */
+
+var bytes = require('bytes')
+var contentType = require('content-type')
+var debug = require('debug')('body-parser:text')
+var read = require('../read')
+var typeis = require('type-is')
+
+/**
+ * Module exports.
+ */
+
+module.exports = text
+
+/**
+ * Create a middleware to parse text bodies.
+ *
+ * @param {object} [options]
+ * @return {function}
+ * @api public
+ */
+
+function text (options) {
+ var opts = options || {}
+
+ var defaultCharset = opts.defaultCharset || 'utf-8'
+ var inflate = opts.inflate !== false
+ var limit = typeof opts.limit !== 'number'
+ ? bytes.parse(opts.limit || '100kb')
+ : opts.limit
+ var type = opts.type || 'text/plain'
+ var verify = opts.verify || false
+
+ if (verify !== false && typeof verify !== 'function') {
+ throw new TypeError('option verify must be function')
+ }
+
+ // create the appropriate type checking function
+ var shouldParse = typeof type !== 'function'
+ ? typeChecker(type)
+ : type
+
+ function parse (buf) {
+ return buf
+ }
+
+ return function textParser (req, res, next) {
+ if (req._body) {
+ debug('body already parsed')
+ next()
+ return
+ }
+
+ req.body = req.body || {}
+
+ // skip requests without bodies
+ if (!typeis.hasBody(req)) {
+ debug('skip empty body')
+ next()
+ return
+ }
+
+ debug('content-type %j', req.headers['content-type'])
+
+ // determine if request should be parsed
+ if (!shouldParse(req)) {
+ debug('skip parsing')
+ next()
+ return
+ }
+
+ // get charset
+ var charset = getCharset(req) || defaultCharset
+
+ // read
+ read(req, res, next, parse, debug, {
+ encoding: charset,
+ inflate: inflate,
+ limit: limit,
+ verify: verify
+ })
+ }
+}
+
+/**
+ * Get the charset of a request.
+ *
+ * @param {object} req
+ * @api private
+ */
+
+function getCharset (req) {
+ try {
+ return contentType.parse(req).parameters.charset.toLowerCase()
+ } catch (e) {
+ return undefined
+ }
+}
+
+/**
+ * Get the simple type checker.
+ *
+ * @param {string} type
+ * @return {function}
+ */
+
+function typeChecker (type) {
+ return function checkType (req) {
+ return Boolean(typeis(req, type))
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/lib/types/urlencoded.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/lib/types/urlencoded.js
new file mode 100644
index 0000000..08157ae
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/lib/types/urlencoded.js
@@ -0,0 +1,279 @@
+/*!
+ * body-parser
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var bytes = require('bytes')
+var contentType = require('content-type')
+var createError = require('http-errors')
+var debug = require('debug')('body-parser:urlencoded')
+var deprecate = require('depd')('body-parser')
+var read = require('../read')
+var typeis = require('type-is')
+
+/**
+ * Module exports.
+ */
+
+module.exports = urlencoded
+
+/**
+ * Cache of parser modules.
+ */
+
+var parsers = Object.create(null)
+
+/**
+ * Create a middleware to parse urlencoded bodies.
+ *
+ * @param {object} [options]
+ * @return {function}
+ * @public
+ */
+
+function urlencoded (options) {
+ var opts = options || {}
+
+ // notice because option default will flip in next major
+ if (opts.extended === undefined) {
+ deprecate('undefined extended: provide extended option')
+ }
+
+ var extended = opts.extended !== false
+ var inflate = opts.inflate !== false
+ var limit = typeof opts.limit !== 'number'
+ ? bytes.parse(opts.limit || '100kb')
+ : opts.limit
+ var type = opts.type || 'application/x-www-form-urlencoded'
+ var verify = opts.verify || false
+
+ if (verify !== false && typeof verify !== 'function') {
+ throw new TypeError('option verify must be function')
+ }
+
+ // create the appropriate query parser
+ var queryparse = extended
+ ? extendedparser(opts)
+ : simpleparser(opts)
+
+ // create the appropriate type checking function
+ var shouldParse = typeof type !== 'function'
+ ? typeChecker(type)
+ : type
+
+ function parse (body) {
+ return body.length
+ ? queryparse(body)
+ : {}
+ }
+
+ return function urlencodedParser (req, res, next) {
+ if (req._body) {
+ debug('body already parsed')
+ next()
+ return
+ }
+
+ req.body = req.body || {}
+
+ // skip requests without bodies
+ if (!typeis.hasBody(req)) {
+ debug('skip empty body')
+ next()
+ return
+ }
+
+ debug('content-type %j', req.headers['content-type'])
+
+ // determine if request should be parsed
+ if (!shouldParse(req)) {
+ debug('skip parsing')
+ next()
+ return
+ }
+
+ // assert charset
+ var charset = getCharset(req) || 'utf-8'
+ if (charset !== 'utf-8') {
+ debug('invalid charset')
+ next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', {
+ charset: charset
+ }))
+ return
+ }
+
+ // read
+ read(req, res, next, parse, debug, {
+ debug: debug,
+ encoding: charset,
+ inflate: inflate,
+ limit: limit,
+ verify: verify
+ })
+ }
+}
+
+/**
+ * Get the extended query parser.
+ *
+ * @param {object} options
+ */
+
+function extendedparser (options) {
+ var parameterLimit = options.parameterLimit !== undefined
+ ? options.parameterLimit
+ : 1000
+ var parse = parser('qs')
+
+ if (isNaN(parameterLimit) || parameterLimit < 1) {
+ throw new TypeError('option parameterLimit must be a positive number')
+ }
+
+ if (isFinite(parameterLimit)) {
+ parameterLimit = parameterLimit | 0
+ }
+
+ return function queryparse (body) {
+ var paramCount = parameterCount(body, parameterLimit)
+
+ if (paramCount === undefined) {
+ debug('too many parameters')
+ throw createError(413, 'too many parameters')
+ }
+
+ var arrayLimit = Math.max(100, paramCount)
+
+ debug('parse extended urlencoding')
+ return parse(body, {
+ allowPrototypes: true,
+ arrayLimit: arrayLimit,
+ depth: Infinity,
+ parameterLimit: parameterLimit
+ })
+ }
+}
+
+/**
+ * Get the charset of a request.
+ *
+ * @param {object} req
+ * @api private
+ */
+
+function getCharset (req) {
+ try {
+ return contentType.parse(req).parameters.charset.toLowerCase()
+ } catch (e) {
+ return undefined
+ }
+}
+
+/**
+ * Count the number of parameters, stopping once limit reached
+ *
+ * @param {string} body
+ * @param {number} limit
+ * @api private
+ */
+
+function parameterCount (body, limit) {
+ var count = 0
+ var index = 0
+
+ while ((index = body.indexOf('&', index)) !== -1) {
+ count++
+ index++
+
+ if (count === limit) {
+ return undefined
+ }
+ }
+
+ return count
+}
+
+/**
+ * Get parser for module name dynamically.
+ *
+ * @param {string} name
+ * @return {function}
+ * @api private
+ */
+
+function parser (name) {
+ var mod = parsers[name]
+
+ if (mod !== undefined) {
+ return mod.parse
+ }
+
+ // this uses a switch for static require analysis
+ switch (name) {
+ case 'qs':
+ mod = require('qs')
+ break
+ case 'querystring':
+ mod = require('querystring')
+ break
+ }
+
+ // store to prevent invoking require()
+ parsers[name] = mod
+
+ return mod.parse
+}
+
+/**
+ * Get the simple query parser.
+ *
+ * @param {object} options
+ */
+
+function simpleparser (options) {
+ var parameterLimit = options.parameterLimit !== undefined
+ ? options.parameterLimit
+ : 1000
+ var parse = parser('querystring')
+
+ if (isNaN(parameterLimit) || parameterLimit < 1) {
+ throw new TypeError('option parameterLimit must be a positive number')
+ }
+
+ if (isFinite(parameterLimit)) {
+ parameterLimit = parameterLimit | 0
+ }
+
+ return function queryparse (body) {
+ var paramCount = parameterCount(body, parameterLimit)
+
+ if (paramCount === undefined) {
+ debug('too many parameters')
+ throw createError(413, 'too many parameters')
+ }
+
+ debug('parse urlencoding')
+ return parse(body, undefined, undefined, {maxKeys: parameterLimit})
+ }
+}
+
+/**
+ * Get the simple type checker.
+ *
+ * @param {string} type
+ * @return {function}
+ */
+
+function typeChecker (type) {
+ return function checkType (req) {
+ return Boolean(typeis(req, type))
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/bytes/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/bytes/History.md
new file mode 100644
index 0000000..56932a4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/bytes/History.md
@@ -0,0 +1,70 @@
+2.4.0 / 2016-06-01
+==================
+
+ * Add option "unitSeparator"
+
+2.3.0 / 2016-02-15
+==================
+
+ * Drop partial bytes on all parsed units
+ * Fix non-finite numbers to `.format` to return `null`
+ * Fix parsing byte string that looks like hex
+ * perf: hoist regular expressions
+
+2.2.0 / 2015-11-13
+==================
+
+ * add option "decimalPlaces"
+ * add option "fixedDecimals"
+
+2.1.0 / 2015-05-21
+==================
+
+ * add `.format` export
+ * add `.parse` export
+
+2.0.2 / 2015-05-20
+==================
+
+ * remove map recreation
+ * remove unnecessary object construction
+
+2.0.1 / 2015-05-07
+==================
+
+ * fix browserify require
+ * remove node.extend dependency
+
+2.0.0 / 2015-04-12
+==================
+
+ * add option "case"
+ * add option "thousandsSeparator"
+ * return "null" on invalid parse input
+ * support proper round-trip: bytes(bytes(num)) === num
+ * units no longer case sensitive when parsing
+
+1.0.0 / 2014-05-05
+==================
+
+ * add negative support. fixes #6
+
+0.3.0 / 2014-03-19
+==================
+
+ * added terabyte support
+
+0.2.1 / 2013-04-01
+==================
+
+ * add .component
+
+0.2.0 / 2012-10-28
+==================
+
+ * bytes(200).should.eql('200b')
+
+0.1.0 / 2012-07-04
+==================
+
+ * add bytes to string conversion [yields]
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/bytes/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/bytes/LICENSE
new file mode 100644
index 0000000..63e95a9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/bytes/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2012-2014 TJ Holowaychuk <tj@vision-media.ca>
+Copyright (c) 2015 Jed Watson <jed.watson@me.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/bytes/Readme.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/bytes/Readme.md
new file mode 100644
index 0000000..7465fde
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/bytes/Readme.md
@@ -0,0 +1,114 @@
+# Bytes utility
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Build Status][travis-image]][travis-url]
+
+Utility to parse a string bytes (ex: `1TB`) to bytes (`1099511627776`) and vice-versa.
+
+## Usage
+
+```js
+var bytes = require('bytes');
+```
+
+#### bytes.format(number value, [options]): string|null
+
+Format the given value in bytes into a string. If the value is negative, it is kept as such. If it is a float, it is
+ rounded.
+
+**Arguments**
+
+| Name | Type | Description |
+|---------|--------|--------------------|
+| value | `number` | Value in bytes |
+| options | `Object` | Conversion options |
+
+**Options**
+
+| Property | Type | Description |
+|-------------------|--------|-----------------------------------------------------------------------------------------|
+| decimalPlaces | `number`&#124;`null` | Maximum number of decimal places to include in output. Default value to `2`. |
+| fixedDecimals | `boolean`&#124;`null` | Whether to always display the maximum number of decimal places. Default value to `false` |
+| thousandsSeparator | `string`&#124;`null` | Example of values: `' '`, `','` and `.`... Default value to `' '`. |
+| unitSeparator | `string`&#124;`null` | Separator to use between number and unit. Default value to `''`. |
+
+**Returns**
+
+| Name | Type | Description |
+|---------|-------------|-------------------------|
+| results | `string`&#124;`null` | Return null upon error. String value otherwise. |
+
+**Example**
+
+```js
+bytes(1024);
+// output: '1kB'
+
+bytes(1000);
+// output: '1000B'
+
+bytes(1000, {thousandsSeparator: ' '});
+// output: '1 000B'
+
+bytes(1024 * 1.7, {decimalPlaces: 0});
+// output: '2kB'
+
+bytes(1024, {unitSeparator: ' '});
+// output: '1 kB'
+
+```
+
+#### bytes.parse(string value): number|null
+
+Parse the string value into an integer in bytes. If no unit is given, it is assumed the value is in bytes.
+
+Supported units and abbreviations are as follows and are case-insensitive:
+
+ * "b" for bytes
+ * "kb" for kilobytes
+ * "mb" for megabytes
+ * "gb" for gigabytes
+ * "tb" for terabytes
+
+The units are in powers of two, not ten. This means 1kb = 1024b according to this parser.
+
+**Arguments**
+
+| Name | Type | Description |
+|---------------|--------|--------------------|
+| value | `string` | String to parse. |
+
+**Returns**
+
+| Name | Type | Description |
+|---------|-------------|-------------------------|
+| results | `number`&#124;`null` | Return null upon error. Value in bytes otherwise. |
+
+**Example**
+
+```js
+bytes('1kB');
+// output: 1024
+
+bytes('1024');
+// output: 1024
+```
+
+## Installation
+
+```bash
+npm install bytes --save
+component install visionmedia/bytes.js
+```
+
+## License
+
+[![npm](https://img.shields.io/npm/l/express.svg)](https://github.com/visionmedia/bytes.js/blob/master/LICENSE)
+
+[downloads-image]: https://img.shields.io/npm/dm/bytes.svg
+[downloads-url]: https://npmjs.org/package/bytes
+[npm-image]: https://img.shields.io/npm/v/bytes.svg
+[npm-url]: https://npmjs.org/package/bytes
+[travis-image]: https://img.shields.io/travis/visionmedia/bytes.js/master.svg
+[travis-url]: https://travis-ci.org/visionmedia/bytes.js
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/bytes/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/bytes/index.js
new file mode 100644
index 0000000..aa24231
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/bytes/index.js
@@ -0,0 +1,157 @@
+/*!
+ * bytes
+ * Copyright(c) 2012-2014 TJ Holowaychuk
+ * Copyright(c) 2015 Jed Watson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = bytes;
+module.exports.format = format;
+module.exports.parse = parse;
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g;
+
+var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/;
+
+var map = {
+ b: 1,
+ kb: 1 << 10,
+ mb: 1 << 20,
+ gb: 1 << 30,
+ tb: ((1 << 30) * 1024)
+};
+
+// TODO: use is-finite module?
+var numberIsFinite = Number.isFinite || function (v) { return typeof v === 'number' && isFinite(v); };
+
+var parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb)$/i;
+
+/**
+ * Convert the given value in bytes into a string or parse to string to an integer in bytes.
+ *
+ * @param {string|number} value
+ * @param {{
+ * case: [string],
+ * decimalPlaces: [number]
+ * fixedDecimals: [boolean]
+ * thousandsSeparator: [string]
+ * unitSeparator: [string]
+ * }} [options] bytes options.
+ *
+ * @returns {string|number|null}
+ */
+
+function bytes(value, options) {
+ if (typeof value === 'string') {
+ return parse(value);
+ }
+
+ if (typeof value === 'number') {
+ return format(value, options);
+ }
+
+ return null;
+}
+
+/**
+ * Format the given value in bytes into a string.
+ *
+ * If the value is negative, it is kept as such. If it is a float,
+ * it is rounded.
+ *
+ * @param {number} value
+ * @param {object} [options]
+ * @param {number} [options.decimalPlaces=2]
+ * @param {number} [options.fixedDecimals=false]
+ * @param {string} [options.thousandsSeparator=]
+ * @param {string} [options.unitSeparator=]
+ *
+ * @returns {string|null}
+ * @public
+ */
+
+function format(value, options) {
+ if (!numberIsFinite(value)) {
+ return null;
+ }
+
+ var mag = Math.abs(value);
+ var thousandsSeparator = (options && options.thousandsSeparator) || '';
+ var unitSeparator = (options && options.unitSeparator) || '';
+ var decimalPlaces = (options && options.decimalPlaces !== undefined) ? options.decimalPlaces : 2;
+ var fixedDecimals = Boolean(options && options.fixedDecimals);
+ var unit = 'B';
+
+ if (mag >= map.tb) {
+ unit = 'TB';
+ } else if (mag >= map.gb) {
+ unit = 'GB';
+ } else if (mag >= map.mb) {
+ unit = 'MB';
+ } else if (mag >= map.kb) {
+ unit = 'kB';
+ }
+
+ var val = value / map[unit.toLowerCase()];
+ var str = val.toFixed(decimalPlaces);
+
+ if (!fixedDecimals) {
+ str = str.replace(formatDecimalsRegExp, '$1');
+ }
+
+ if (thousandsSeparator) {
+ str = str.replace(formatThousandsRegExp, thousandsSeparator);
+ }
+
+ return str + unitSeparator + unit;
+}
+
+/**
+ * Parse the string value into an integer in bytes.
+ *
+ * If no unit is given, it is assumed the value is in bytes.
+ *
+ * @param {number|string} val
+ *
+ * @returns {number|null}
+ * @public
+ */
+
+function parse(val) {
+ if (typeof val === 'number' && !isNaN(val)) {
+ return val;
+ }
+
+ if (typeof val !== 'string') {
+ return null;
+ }
+
+ // Test if the string passed is valid
+ var results = parseRegExp.exec(val);
+ var floatValue;
+ var unit = 'b';
+
+ if (!results) {
+ // Nothing could be extracted from the given string
+ floatValue = parseInt(val, 10);
+ unit = 'b'
+ } else {
+ // Retrieve the value and the unit
+ floatValue = parseFloat(results[1]);
+ unit = results[4].toLowerCase();
+ }
+
+ return Math.floor(map[unit] * floatValue);
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/bytes/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/bytes/package.json
new file mode 100644
index 0000000..bb34928
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/bytes/package.json
@@ -0,0 +1,84 @@
+{
+ "name": "bytes",
+ "description": "Utility to parse a string bytes to bytes and vice-versa",
+ "version": "2.4.0",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca",
+ "url": "http://tjholowaychuk.com"
+ },
+ "contributors": [
+ {
+ "name": "Jed Watson",
+ "email": "jed.watson@me.com"
+ },
+ {
+ "name": "Théo FIDRY",
+ "email": "theo.fidry@gmail.com"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "byte",
+ "bytes",
+ "utility",
+ "parse",
+ "parser",
+ "convert",
+ "converter"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/visionmedia/bytes.js"
+ },
+ "component": {
+ "scripts": {
+ "bytes/index.js": "index.js"
+ }
+ },
+ "devDependencies": {
+ "mocha": "1.21.5"
+ },
+ "files": [
+ "History.md",
+ "LICENSE",
+ "Readme.md",
+ "index.js"
+ ],
+ "scripts": {
+ "test": "mocha --check-leaks --reporter spec"
+ },
+ "gitHead": "2a598442bdfa796df8d01a96cc54495cda550e70",
+ "bugs": {
+ "url": "https://github.com/visionmedia/bytes.js/issues"
+ },
+ "homepage": "https://github.com/visionmedia/bytes.js",
+ "_id": "bytes@2.4.0",
+ "_shasum": "7d97196f9d5baf7f6935e25985549edd2a6c2339",
+ "_from": "bytes@2.4.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ }
+ ],
+ "dist": {
+ "shasum": "7d97196f9d5baf7f6935e25985549edd2a6c2339",
+ "tarball": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/bytes-2.4.0.tgz_1464812473023_0.6271433881483972"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/content-type/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/content-type/HISTORY.md
new file mode 100644
index 0000000..01652ff
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/content-type/HISTORY.md
@@ -0,0 +1,14 @@
+1.0.2 / 2016-05-09
+==================
+
+ * perf: enable strict mode
+
+1.0.1 / 2015-02-13
+==================
+
+ * Improve missing `Content-Type` header error message
+
+1.0.0 / 2015-02-01
+==================
+
+ * Initial implementation, derived from `media-typer@0.3.0`
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/content-type/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/content-type/LICENSE
new file mode 100644
index 0000000..34b1a2d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/content-type/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2015 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/content-type/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/content-type/README.md
new file mode 100644
index 0000000..3ed6741
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/content-type/README.md
@@ -0,0 +1,92 @@
+# content-type
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Create and parse HTTP Content-Type header according to RFC 7231
+
+## Installation
+
+```sh
+$ npm install content-type
+```
+
+## API
+
+```js
+var contentType = require('content-type')
+```
+
+### contentType.parse(string)
+
+```js
+var obj = contentType.parse('image/svg+xml; charset=utf-8')
+```
+
+Parse a content type string. This will return an object with the following
+properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`):
+
+ - `type`: The media type (the type and subtype, always lower case).
+ Example: `'image/svg+xml'`
+
+ - `parameters`: An object of the parameters in the media type (name of parameter
+ always lower case). Example: `{charset: 'utf-8'}`
+
+Throws a `TypeError` if the string is missing or invalid.
+
+### contentType.parse(req)
+
+```js
+var obj = contentType.parse(req)
+```
+
+Parse the `content-type` header from the given `req`. Short-cut for
+`contentType.parse(req.headers['content-type'])`.
+
+Throws a `TypeError` if the `Content-Type` header is missing or invalid.
+
+### contentType.parse(res)
+
+```js
+var obj = contentType.parse(res)
+```
+
+Parse the `content-type` header set on the given `res`. Short-cut for
+`contentType.parse(res.getHeader('content-type'))`.
+
+Throws a `TypeError` if the `Content-Type` header is missing or invalid.
+
+### contentType.format(obj)
+
+```js
+var str = contentType.format({type: 'image/svg+xml'})
+```
+
+Format an object into a content type string. This will return a string of the
+content type for the given object with the following properties (examples are
+shown that produce the string `'image/svg+xml; charset=utf-8'`):
+
+ - `type`: The media type (will be lower-cased). Example: `'image/svg+xml'`
+
+ - `parameters`: An object of the parameters in the media type (name of the
+ parameter will be lower-cased). Example: `{charset: 'utf-8'}`
+
+Throws a `TypeError` if the object contains an invalid type or parameter names.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/content-type.svg
+[npm-url]: https://npmjs.org/package/content-type
+[node-version-image]: https://img.shields.io/node/v/content-type.svg
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/content-type/master.svg
+[travis-url]: https://travis-ci.org/jshttp/content-type
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-type/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/content-type
+[downloads-image]: https://img.shields.io/npm/dm/content-type.svg
+[downloads-url]: https://npmjs.org/package/content-type
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/content-type/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/content-type/index.js
new file mode 100644
index 0000000..61ba6b5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/content-type/index.js
@@ -0,0 +1,216 @@
+/*!
+ * content-type
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1
+ *
+ * parameter = token "=" ( token / quoted-string )
+ * token = 1*tchar
+ * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
+ * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
+ * / DIGIT / ALPHA
+ * ; any VCHAR, except delimiters
+ * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
+ * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
+ * obs-text = %x80-FF
+ * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
+ */
+var paramRegExp = /; *([!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+) */g
+var textRegExp = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/
+var tokenRegExp = /^[!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+$/
+
+/**
+ * RegExp to match quoted-pair in RFC 7230 sec 3.2.6
+ *
+ * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
+ * obs-text = %x80-FF
+ */
+var qescRegExp = /\\([\u000b\u0020-\u00ff])/g
+
+/**
+ * RegExp to match chars that must be quoted-pair in RFC 7230 sec 3.2.6
+ */
+var quoteRegExp = /([\\"])/g
+
+/**
+ * RegExp to match type in RFC 6838
+ *
+ * media-type = type "/" subtype
+ * type = token
+ * subtype = token
+ */
+var typeRegExp = /^[!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+\/[!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+$/
+
+/**
+ * Module exports.
+ * @public
+ */
+
+exports.format = format
+exports.parse = parse
+
+/**
+ * Format object to media type.
+ *
+ * @param {object} obj
+ * @return {string}
+ * @public
+ */
+
+function format(obj) {
+ if (!obj || typeof obj !== 'object') {
+ throw new TypeError('argument obj is required')
+ }
+
+ var parameters = obj.parameters
+ var type = obj.type
+
+ if (!type || !typeRegExp.test(type)) {
+ throw new TypeError('invalid type')
+ }
+
+ var string = type
+
+ // append parameters
+ if (parameters && typeof parameters === 'object') {
+ var param
+ var params = Object.keys(parameters).sort()
+
+ for (var i = 0; i < params.length; i++) {
+ param = params[i]
+
+ if (!tokenRegExp.test(param)) {
+ throw new TypeError('invalid parameter name')
+ }
+
+ string += '; ' + param + '=' + qstring(parameters[param])
+ }
+ }
+
+ return string
+}
+
+/**
+ * Parse media type to object.
+ *
+ * @param {string|object} string
+ * @return {Object}
+ * @public
+ */
+
+function parse(string) {
+ if (!string) {
+ throw new TypeError('argument string is required')
+ }
+
+ if (typeof string === 'object') {
+ // support req/res-like objects as argument
+ string = getcontenttype(string)
+
+ if (typeof string !== 'string') {
+ throw new TypeError('content-type header is missing from object');
+ }
+ }
+
+ if (typeof string !== 'string') {
+ throw new TypeError('argument string is required to be a string')
+ }
+
+ var index = string.indexOf(';')
+ var type = index !== -1
+ ? string.substr(0, index).trim()
+ : string.trim()
+
+ if (!typeRegExp.test(type)) {
+ throw new TypeError('invalid media type')
+ }
+
+ var key
+ var match
+ var obj = new ContentType(type.toLowerCase())
+ var value
+
+ paramRegExp.lastIndex = index
+
+ while (match = paramRegExp.exec(string)) {
+ if (match.index !== index) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ index += match[0].length
+ key = match[1].toLowerCase()
+ value = match[2]
+
+ if (value[0] === '"') {
+ // remove quotes and escapes
+ value = value
+ .substr(1, value.length - 2)
+ .replace(qescRegExp, '$1')
+ }
+
+ obj.parameters[key] = value
+ }
+
+ if (index !== -1 && index !== string.length) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ return obj
+}
+
+/**
+ * Get content-type from req/res objects.
+ *
+ * @param {object}
+ * @return {Object}
+ * @private
+ */
+
+function getcontenttype(obj) {
+ if (typeof obj.getHeader === 'function') {
+ // res-like
+ return obj.getHeader('content-type')
+ }
+
+ if (typeof obj.headers === 'object') {
+ // req-like
+ return obj.headers && obj.headers['content-type']
+ }
+}
+
+/**
+ * Quote a string if necessary.
+ *
+ * @param {string} val
+ * @return {string}
+ * @private
+ */
+
+function qstring(val) {
+ var str = String(val)
+
+ // no need to quote tokens
+ if (tokenRegExp.test(str)) {
+ return str
+ }
+
+ if (str.length > 0 && !textRegExp.test(str)) {
+ throw new TypeError('invalid parameter value')
+ }
+
+ return '"' + str.replace(quoteRegExp, '\\$1') + '"'
+}
+
+/**
+ * Class to represent a content type.
+ * @private
+ */
+function ContentType(type) {
+ this.parameters = Object.create(null)
+ this.type = type
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/content-type/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/content-type/package.json
new file mode 100644
index 0000000..9f11091
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/content-type/package.json
@@ -0,0 +1,70 @@
+{
+ "name": "content-type",
+ "description": "Create and parse HTTP Content-Type header",
+ "version": "1.0.2",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "keywords": [
+ "content-type",
+ "http",
+ "req",
+ "res",
+ "rfc7231"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jshttp/content-type.git"
+ },
+ "devDependencies": {
+ "istanbul": "0.4.3",
+ "mocha": "~1.21.5"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "README.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --check-leaks --bail test/",
+ "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"
+ },
+ "gitHead": "8118763adfbbac80cf1254191889330aec8b8be7",
+ "bugs": {
+ "url": "https://github.com/jshttp/content-type/issues"
+ },
+ "homepage": "https://github.com/jshttp/content-type#readme",
+ "_id": "content-type@1.0.2",
+ "_shasum": "b7d113aee7a8dd27bd21133c4dc2529df1721eed",
+ "_from": "content-type@>=1.0.2 <1.1.0",
+ "_npmVersion": "2.15.1",
+ "_nodeVersion": "4.4.3",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "dist": {
+ "shasum": "b7d113aee7a8dd27bd21133c4dc2529df1721eed",
+ "tarball": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/content-type-1.0.2.tgz_1462852785748_0.5491233412176371"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/.jshintrc b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/.jshintrc
new file mode 100644
index 0000000..299877f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/.jshintrc
@@ -0,0 +1,3 @@
+{
+ "laxbreak": true
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/.npmignore
new file mode 100644
index 0000000..7e6163d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/.npmignore
@@ -0,0 +1,6 @@
+support
+test
+examples
+example
+*.sock
+dist
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/History.md
new file mode 100644
index 0000000..854c971
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/History.md
@@ -0,0 +1,195 @@
+
+2.2.0 / 2015-05-09
+==================
+
+ * package: update "ms" to v0.7.1 (#202, @dougwilson)
+ * README: add logging to file example (#193, @DanielOchoa)
+ * README: fixed a typo (#191, @amir-s)
+ * browser: expose `storage` (#190, @stephenmathieson)
+ * Makefile: add a `distclean` target (#189, @stephenmathieson)
+
+2.1.3 / 2015-03-13
+==================
+
+ * Updated stdout/stderr example (#186)
+ * Updated example/stdout.js to match debug current behaviour
+ * Renamed example/stderr.js to stdout.js
+ * Update Readme.md (#184)
+ * replace high intensity foreground color for bold (#182, #183)
+
+2.1.2 / 2015-03-01
+==================
+
+ * dist: recompile
+ * update "ms" to v0.7.0
+ * package: update "browserify" to v9.0.3
+ * component: fix "ms.js" repo location
+ * changed bower package name
+ * updated documentation about using debug in a browser
+ * fix: security error on safari (#167, #168, @yields)
+
+2.1.1 / 2014-12-29
+==================
+
+ * browser: use `typeof` to check for `console` existence
+ * browser: check for `console.log` truthiness (fix IE 8/9)
+ * browser: add support for Chrome apps
+ * Readme: added Windows usage remarks
+ * Add `bower.json` to properly support bower install
+
+2.1.0 / 2014-10-15
+==================
+
+ * node: implement `DEBUG_FD` env variable support
+ * package: update "browserify" to v6.1.0
+ * package: add "license" field to package.json (#135, @panuhorsmalahti)
+
+2.0.0 / 2014-09-01
+==================
+
+ * package: update "browserify" to v5.11.0
+ * node: use stderr rather than stdout for logging (#29, @stephenmathieson)
+
+1.0.4 / 2014-07-15
+==================
+
+ * dist: recompile
+ * example: remove `console.info()` log usage
+ * example: add "Content-Type" UTF-8 header to browser example
+ * browser: place %c marker after the space character
+ * browser: reset the "content" color via `color: inherit`
+ * browser: add colors support for Firefox >= v31
+ * debug: prefer an instance `log()` function over the global one (#119)
+ * Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
+
+1.0.3 / 2014-07-09
+==================
+
+ * Add support for multiple wildcards in namespaces (#122, @seegno)
+ * browser: fix lint
+
+1.0.2 / 2014-06-10
+==================
+
+ * browser: update color palette (#113, @gscottolson)
+ * common: make console logging function configurable (#108, @timoxley)
+ * node: fix %o colors on old node <= 0.8.x
+ * Makefile: find node path using shell/which (#109, @timoxley)
+
+1.0.1 / 2014-06-06
+==================
+
+ * browser: use `removeItem()` to clear localStorage
+ * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
+ * package: add "contributors" section
+ * node: fix comment typo
+ * README: list authors
+
+1.0.0 / 2014-06-04
+==================
+
+ * make ms diff be global, not be scope
+ * debug: ignore empty strings in enable()
+ * node: make DEBUG_COLORS able to disable coloring
+ * *: export the `colors` array
+ * npmignore: don't publish the `dist` dir
+ * Makefile: refactor to use browserify
+ * package: add "browserify" as a dev dependency
+ * Readme: add Web Inspector Colors section
+ * node: reset terminal color for the debug content
+ * node: map "%o" to `util.inspect()`
+ * browser: map "%j" to `JSON.stringify()`
+ * debug: add custom "formatters"
+ * debug: use "ms" module for humanizing the diff
+ * Readme: add "bash" syntax highlighting
+ * browser: add Firebug color support
+ * browser: add colors for WebKit browsers
+ * node: apply log to `console`
+ * rewrite: abstract common logic for Node & browsers
+ * add .jshintrc file
+
+0.8.1 / 2014-04-14
+==================
+
+ * package: re-add the "component" section
+
+0.8.0 / 2014-03-30
+==================
+
+ * add `enable()` method for nodejs. Closes #27
+ * change from stderr to stdout
+ * remove unnecessary index.js file
+
+0.7.4 / 2013-11-13
+==================
+
+ * remove "browserify" key from package.json (fixes something in browserify)
+
+0.7.3 / 2013-10-30
+==================
+
+ * fix: catch localStorage security error when cookies are blocked (Chrome)
+ * add debug(err) support. Closes #46
+ * add .browser prop to package.json. Closes #42
+
+0.7.2 / 2013-02-06
+==================
+
+ * fix package.json
+ * fix: Mobile Safari (private mode) is broken with debug
+ * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript
+
+0.7.1 / 2013-02-05
+==================
+
+ * add repository URL to package.json
+ * add DEBUG_COLORED to force colored output
+ * add browserify support
+ * fix component. Closes #24
+
+0.7.0 / 2012-05-04
+==================
+
+ * Added .component to package.json
+ * Added debug.component.js build
+
+0.6.0 / 2012-03-16
+==================
+
+ * Added support for "-" prefix in DEBUG [Vinay Pulim]
+ * Added `.enabled` flag to the node version [TooTallNate]
+
+0.5.0 / 2012-02-02
+==================
+
+ * Added: humanize diffs. Closes #8
+ * Added `debug.disable()` to the CS variant
+ * Removed padding. Closes #10
+ * Fixed: persist client-side variant again. Closes #9
+
+0.4.0 / 2012-02-01
+==================
+
+ * Added browser variant support for older browsers [TooTallNate]
+ * Added `debug.enable('project:*')` to browser variant [TooTallNate]
+ * Added padding to diff (moved it to the right)
+
+0.3.0 / 2012-01-26
+==================
+
+ * Added millisecond diff when isatty, otherwise UTC string
+
+0.2.0 / 2012-01-22
+==================
+
+ * Added wildcard support
+
+0.1.0 / 2011-12-02
+==================
+
+ * Added: remove colors unless stderr isatty [TooTallNate]
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/Makefile b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/Makefile
new file mode 100644
index 0000000..5cf4a59
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/Makefile
@@ -0,0 +1,36 @@
+
+# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
+THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
+THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
+
+# BIN directory
+BIN := $(THIS_DIR)/node_modules/.bin
+
+# applications
+NODE ?= $(shell which node)
+NPM ?= $(NODE) $(shell which npm)
+BROWSERIFY ?= $(NODE) $(BIN)/browserify
+
+all: dist/debug.js
+
+install: node_modules
+
+clean:
+ @rm -rf dist
+
+dist:
+ @mkdir -p $@
+
+dist/debug.js: node_modules browser.js debug.js dist
+ @$(BROWSERIFY) \
+ --standalone debug \
+ . > $@
+
+distclean: clean
+ @rm -rf node_modules
+
+node_modules: package.json
+ @NODE_ENV= $(NPM) install
+ @touch node_modules
+
+.PHONY: all install clean distclean
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/Readme.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/Readme.md
new file mode 100644
index 0000000..b4f45e3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/Readme.md
@@ -0,0 +1,188 @@
+# debug
+
+ tiny node.js debugging utility modelled after node core's debugging technique.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+ With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility.
+
+Example _app.js_:
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %s', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example _worker.js_:
+
+```js
+var debug = require('debug')('worker');
+
+setInterval(function(){
+ debug('doing some work');
+}, 1000);
+```
+
+ The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:
+
+ ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)
+
+ ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)
+
+#### Windows note
+
+ On Windows the environment variable is set using the `set` command.
+
+ ```cmd
+ set DEBUG=*,-not_this
+ ```
+
+Then, run the program to be debugged as usual.
+
+## Millisecond diff
+
+ When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+ ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)
+
+ When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:
+
+ ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)
+
+## Conventions
+
+ If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".
+
+## Wildcards
+
+ The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+ You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:".
+
+## Browser support
+
+ Debug works in the browser as well, currently persisted by `localStorage`. Consider the situation shown below where you have `worker:a` and `worker:b`, and wish to debug both. Somewhere in the code on your page, include:
+
+```js
+window.myDebug = require("debug");
+```
+
+ ("debug" is a global object in the browser so we give this object a different name.) When your page is open in the browser, type the following in the console:
+
+```js
+myDebug.enable("worker:*")
+```
+
+ Refresh the page. Debug output will continue to be sent to the console until it is disabled by typing `myDebug.disable()` in the console.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+#### Web Inspector Colors
+
+ Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+ option. These are WebKit web inspectors, Firefox ([since version
+ 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+ and the Firebug plugin for Firefox (any version).
+
+ Colored output looks something like:
+
+ ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png)
+
+### stderr vs stdout
+
+You can set an alternative logging method per-namespace by overriding the `log` method on a per-namespace or globally:
+
+Example _stdout.js_:
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+### Save debug output to a file
+
+You can save all debug statements to a file by piping them.
+
+Example:
+
+```bash
+$ DEBUG_FD=3 node your-app.js 3> whatever.log
+```
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/bower.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/bower.json
new file mode 100644
index 0000000..6af573f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/bower.json
@@ -0,0 +1,28 @@
+{
+ "name": "visionmedia-debug",
+ "main": "dist/debug.js",
+ "version": "2.2.0",
+ "homepage": "https://github.com/visionmedia/debug",
+ "authors": [
+ "TJ Holowaychuk <tj@vision-media.ca>"
+ ],
+ "description": "visionmedia-debug",
+ "moduleType": [
+ "amd",
+ "es6",
+ "globals",
+ "node"
+ ],
+ "keywords": [
+ "visionmedia",
+ "debug"
+ ],
+ "license": "MIT",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ]
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/browser.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/browser.js
new file mode 100644
index 0000000..7c76452
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/browser.js
@@ -0,0 +1,168 @@
+
+/**
+ * This is the web browser implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = 'undefined' != typeof chrome
+ && 'undefined' != typeof chrome.storage
+ ? chrome.storage.local
+ : localstorage();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ 'lightseagreen',
+ 'forestgreen',
+ 'goldenrod',
+ 'dodgerblue',
+ 'darkorchid',
+ 'crimson'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+function useColors() {
+ // is webkit? http://stackoverflow.com/a/16459606/376773
+ return ('WebkitAppearance' in document.documentElement.style) ||
+ // is firebug? http://stackoverflow.com/a/398120/376773
+ (window.console && (console.firebug || (console.exception && console.table))) ||
+ // is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31);
+}
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+exports.formatters.j = function(v) {
+ return JSON.stringify(v);
+};
+
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs() {
+ var args = arguments;
+ var useColors = this.useColors;
+
+ args[0] = (useColors ? '%c' : '')
+ + this.namespace
+ + (useColors ? ' %c' : ' ')
+ + args[0]
+ + (useColors ? '%c ' : ' ')
+ + '+' + exports.humanize(this.diff);
+
+ if (!useColors) return args;
+
+ var c = 'color: ' + this.color;
+ args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));
+
+ // the final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ var index = 0;
+ var lastC = 0;
+ args[0].replace(/%[a-z%]/g, function(match) {
+ if ('%%' === match) return;
+ index++;
+ if ('%c' === match) {
+ // we only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+ return args;
+}
+
+/**
+ * Invokes `console.log()` when available.
+ * No-op when `console.log` is not a "function".
+ *
+ * @api public
+ */
+
+function log() {
+ // this hackery is required for IE8/9, where
+ // the `console.log` function doesn't have 'apply'
+ return 'object' === typeof console
+ && console.log
+ && Function.prototype.apply.call(console.log, console, arguments);
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ try {
+ if (null == namespaces) {
+ exports.storage.removeItem('debug');
+ } else {
+ exports.storage.debug = namespaces;
+ }
+ } catch(e) {}
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ var r;
+ try {
+ r = exports.storage.debug;
+ } catch(e) {}
+ return r;
+}
+
+/**
+ * Enable namespaces listed in `localStorage.debug` initially.
+ */
+
+exports.enable(load());
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage(){
+ try {
+ return window.localStorage;
+ } catch (e) {}
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/component.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/component.json
new file mode 100644
index 0000000..ca10637
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/component.json
@@ -0,0 +1,19 @@
+{
+ "name": "debug",
+ "repo": "visionmedia/debug",
+ "description": "small debugging utility",
+ "version": "2.2.0",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "main": "browser.js",
+ "scripts": [
+ "browser.js",
+ "debug.js"
+ ],
+ "dependencies": {
+ "rauchg/ms.js": "0.7.1"
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/debug.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/debug.js
new file mode 100644
index 0000000..7571a86
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/debug.js
@@ -0,0 +1,197 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = debug;
+exports.coerce = coerce;
+exports.disable = disable;
+exports.enable = enable;
+exports.enabled = enabled;
+exports.humanize = require('ms');
+
+/**
+ * The currently active debug mode names, and names to skip.
+ */
+
+exports.names = [];
+exports.skips = [];
+
+/**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lowercased letter, i.e. "n".
+ */
+
+exports.formatters = {};
+
+/**
+ * Previously assigned color.
+ */
+
+var prevColor = 0;
+
+/**
+ * Previous log timestamp.
+ */
+
+var prevTime;
+
+/**
+ * Select a color.
+ *
+ * @return {Number}
+ * @api private
+ */
+
+function selectColor() {
+ return exports.colors[prevColor++ % exports.colors.length];
+}
+
+/**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+
+function debug(namespace) {
+
+ // define the `disabled` version
+ function disabled() {
+ }
+ disabled.enabled = false;
+
+ // define the `enabled` version
+ function enabled() {
+
+ var self = enabled;
+
+ // set `diff` timestamp
+ var curr = +new Date();
+ var ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ // add the `color` if not set
+ if (null == self.useColors) self.useColors = exports.useColors();
+ if (null == self.color && self.useColors) self.color = selectColor();
+
+ var args = Array.prototype.slice.call(arguments);
+
+ args[0] = exports.coerce(args[0]);
+
+ if ('string' !== typeof args[0]) {
+ // anything else let's inspect with %o
+ args = ['%o'].concat(args);
+ }
+
+ // apply any `formatters` transformations
+ var index = 0;
+ args[0] = args[0].replace(/%([a-z%])/g, function(match, format) {
+ // if we encounter an escaped % then don't increase the array index
+ if (match === '%%') return match;
+ index++;
+ var formatter = exports.formatters[format];
+ if ('function' === typeof formatter) {
+ var val = args[index];
+ match = formatter.call(self, val);
+
+ // now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ if ('function' === typeof exports.formatArgs) {
+ args = exports.formatArgs.apply(self, args);
+ }
+ var logFn = enabled.log || exports.log || console.log.bind(console);
+ logFn.apply(self, args);
+ }
+ enabled.enabled = true;
+
+ var fn = exports.enabled(namespace) ? enabled : disabled;
+
+ fn.namespace = namespace;
+
+ return fn;
+}
+
+/**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+
+function enable(namespaces) {
+ exports.save(namespaces);
+
+ var split = (namespaces || '').split(/[\s,]+/);
+ var len = split.length;
+
+ for (var i = 0; i < len; i++) {
+ if (!split[i]) continue; // ignore empty strings
+ namespaces = split[i].replace(/\*/g, '.*?');
+ if (namespaces[0] === '-') {
+ exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+ } else {
+ exports.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+}
+
+/**
+ * Disable debug output.
+ *
+ * @api public
+ */
+
+function disable() {
+ exports.enable('');
+}
+
+/**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+
+function enabled(name) {
+ var i, len;
+ for (i = 0, len = exports.skips.length; i < len; i++) {
+ if (exports.skips[i].test(name)) {
+ return false;
+ }
+ }
+ for (i = 0, len = exports.names.length; i < len; i++) {
+ if (exports.names[i].test(name)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+
+function coerce(val) {
+ if (val instanceof Error) return val.stack || val.message;
+ return val;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node.js
new file mode 100644
index 0000000..1d392a8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node.js
@@ -0,0 +1,209 @@
+
+/**
+ * Module dependencies.
+ */
+
+var tty = require('tty');
+var util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+/**
+ * The file descriptor to write the `debug()` calls to.
+ * Set the `DEBUG_FD` env variable to override with another value. i.e.:
+ *
+ * $ DEBUG_FD=3 node script.js 3>debug.log
+ */
+
+var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
+var stream = 1 === fd ? process.stdout :
+ 2 === fd ? process.stderr :
+ createWritableStdioStream(fd);
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ var debugColors = (process.env.DEBUG_COLORS || '').trim().toLowerCase();
+ if (0 === debugColors.length) {
+ return tty.isatty(fd);
+ } else {
+ return '0' !== debugColors
+ && 'no' !== debugColors
+ && 'false' !== debugColors
+ && 'disabled' !== debugColors;
+ }
+}
+
+/**
+ * Map %o to `util.inspect()`, since Node doesn't do that out of the box.
+ */
+
+var inspect = (4 === util.inspect.length ?
+ // node <= 0.8.x
+ function (v, colors) {
+ return util.inspect(v, void 0, void 0, colors);
+ } :
+ // node > 0.8.x
+ function (v, colors) {
+ return util.inspect(v, { colors: colors });
+ }
+);
+
+exports.formatters.o = function(v) {
+ return inspect(v, this.useColors)
+ .replace(/\s*\n\s*/g, ' ');
+};
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs() {
+ var args = arguments;
+ var useColors = this.useColors;
+ var name = this.namespace;
+
+ if (useColors) {
+ var c = this.color;
+
+ args[0] = ' \u001b[3' + c + ';1m' + name + ' '
+ + '\u001b[0m'
+ + args[0] + '\u001b[3' + c + 'm'
+ + ' +' + exports.humanize(this.diff) + '\u001b[0m';
+ } else {
+ args[0] = new Date().toUTCString()
+ + ' ' + name + ' ' + args[0];
+ }
+ return args;
+}
+
+/**
+ * Invokes `console.error()` with the specified arguments.
+ */
+
+function log() {
+ return stream.write(util.format.apply(this, arguments) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ if (null == namespaces) {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ } else {
+ process.env.DEBUG = namespaces;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Copied from `node/src/node.js`.
+ *
+ * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
+ * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
+ */
+
+function createWritableStdioStream (fd) {
+ var stream;
+ var tty_wrap = process.binding('tty_wrap');
+
+ // Note stream._type is used for test-module-load-list.js
+
+ switch (tty_wrap.guessHandleType(fd)) {
+ case 'TTY':
+ stream = new tty.WriteStream(fd);
+ stream._type = 'tty';
+
+ // Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ case 'FILE':
+ var fs = require('fs');
+ stream = new fs.SyncWriteStream(fd, { autoClose: false });
+ stream._type = 'fs';
+ break;
+
+ case 'PIPE':
+ case 'TCP':
+ var net = require('net');
+ stream = new net.Socket({
+ fd: fd,
+ readable: false,
+ writable: true
+ });
+
+ // FIXME Should probably have an option in net.Socket to create a
+ // stream from an existing fd which is writable only. But for now
+ // we'll just add this hack and set the `readable` member to false.
+ // Test: ./node test/fixtures/echo.js < /etc/passwd
+ stream.readable = false;
+ stream.read = null;
+ stream._type = 'pipe';
+
+ // FIXME Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ default:
+ // Probably an error on in uv_guess_handle()
+ throw new Error('Implement me. Unknown stream file type!');
+ }
+
+ // For supporting legacy API we put the FD here.
+ stream.fd = fd;
+
+ stream._isStdio = true;
+
+ return stream;
+}
+
+/**
+ * Enable namespaces listed in `process.env.DEBUG` initially.
+ */
+
+exports.enable(load());
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/.npmignore
new file mode 100644
index 0000000..d1aa0ce
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/.npmignore
@@ -0,0 +1,5 @@
+node_modules
+test
+History.md
+Makefile
+component.json
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/History.md
new file mode 100644
index 0000000..32fdfc1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/History.md
@@ -0,0 +1,66 @@
+
+0.7.1 / 2015-04-20
+==================
+
+ * prevent extraordinary long inputs (@evilpacket)
+ * Fixed broken readme link
+
+0.7.0 / 2014-11-24
+==================
+
+ * add time abbreviations, updated tests and readme for the new units
+ * fix example in the readme.
+ * add LICENSE file
+
+0.6.2 / 2013-12-05
+==================
+
+ * Adding repository section to package.json to suppress warning from NPM.
+
+0.6.1 / 2013-05-10
+==================
+
+ * fix singularization [visionmedia]
+
+0.6.0 / 2013-03-15
+==================
+
+ * fix minutes
+
+0.5.1 / 2013-02-24
+==================
+
+ * add component namespace
+
+0.5.0 / 2012-11-09
+==================
+
+ * add short formatting as default and .long option
+ * add .license property to component.json
+ * add version to component.json
+
+0.4.0 / 2012-10-22
+==================
+
+ * add rounding to fix crazy decimals
+
+0.3.0 / 2012-09-07
+==================
+
+ * fix `ms(<String>)` [visionmedia]
+
+0.2.0 / 2012-09-03
+==================
+
+ * add component.json [visionmedia]
+ * add days support [visionmedia]
+ * add hours support [visionmedia]
+ * add minutes support [visionmedia]
+ * add seconds support [visionmedia]
+ * add ms string support [visionmedia]
+ * refactor tests to facilitate ms(number) [visionmedia]
+
+0.1.0 / 2012-03-07
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/LICENSE
new file mode 100644
index 0000000..6c07561
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2014 Guillermo Rauch <rauchg@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/README.md
new file mode 100644
index 0000000..9b4fd03
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/README.md
@@ -0,0 +1,35 @@
+# ms.js: miliseconds conversion utility
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('100') // 100
+```
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(ms('10 hours')) // "10h"
+```
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+- Node/Browser compatible. Published as [`ms`](https://www.npmjs.org/package/ms) in [NPM](http://nodejs.org/download).
+- If a number is supplied to `ms`, a string with a unit is returned.
+- If a string that contains the number is supplied, it returns it as
+a number (e.g: it returns `100` for `'100'`).
+- If you pass a string with a number and a valid unit, the number of
+equivalent ms is returned.
+
+## License
+
+MIT
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/index.js
new file mode 100644
index 0000000..4f92771
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/index.js
@@ -0,0 +1,125 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} options
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options){
+ options = options || {};
+ if ('string' == typeof val) return parse(val);
+ return options.long
+ ? long(val)
+ : short(val);
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = '' + str;
+ if (str.length > 10000) return;
+ var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
+ if (!match) return;
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function short(ms) {
+ if (ms >= d) return Math.round(ms / d) + 'd';
+ if (ms >= h) return Math.round(ms / h) + 'h';
+ if (ms >= m) return Math.round(ms / m) + 'm';
+ if (ms >= s) return Math.round(ms / s) + 's';
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function long(ms) {
+ return plural(ms, d, 'day')
+ || plural(ms, h, 'hour')
+ || plural(ms, m, 'minute')
+ || plural(ms, s, 'second')
+ || ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, n, name) {
+ if (ms < n) return;
+ if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name;
+ return Math.ceil(ms / n) + ' ' + name + 's';
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/package.json
new file mode 100644
index 0000000..e36489e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/node_modules/ms/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "ms",
+ "version": "0.7.1",
+ "description": "Tiny ms conversion utility",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/guille/ms.js.git"
+ },
+ "main": "./index",
+ "devDependencies": {
+ "mocha": "*",
+ "expect.js": "*",
+ "serve": "*"
+ },
+ "component": {
+ "scripts": {
+ "ms/index.js": "index.js"
+ }
+ },
+ "gitHead": "713dcf26d9e6fd9dbc95affe7eff9783b7f1b909",
+ "bugs": {
+ "url": "https://github.com/guille/ms.js/issues"
+ },
+ "homepage": "https://github.com/guille/ms.js",
+ "_id": "ms@0.7.1",
+ "scripts": {},
+ "_shasum": "9cd13c03adbff25b65effde7ce864ee952017098",
+ "_from": "ms@0.7.1",
+ "_npmVersion": "2.7.5",
+ "_nodeVersion": "0.12.2",
+ "_npmUser": {
+ "name": "rauchg",
+ "email": "rauchg@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "rauchg",
+ "email": "rauchg@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "9cd13c03adbff25b65effde7ce864ee952017098",
+ "tarball": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/package.json
new file mode 100644
index 0000000..f2148c9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/debug/package.json
@@ -0,0 +1,73 @@
+{
+ "name": "debug",
+ "version": "2.2.0",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/visionmedia/debug.git"
+ },
+ "description": "small debugging utility",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "contributors": [
+ {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "ms": "0.7.1"
+ },
+ "devDependencies": {
+ "browserify": "9.0.3",
+ "mocha": "*"
+ },
+ "main": "./node.js",
+ "browser": "./browser.js",
+ "component": {
+ "scripts": {
+ "debug/index.js": "browser.js",
+ "debug/debug.js": "debug.js"
+ }
+ },
+ "gitHead": "b38458422b5aa8aa6d286b10dfe427e8a67e2b35",
+ "bugs": {
+ "url": "https://github.com/visionmedia/debug/issues"
+ },
+ "homepage": "https://github.com/visionmedia/debug",
+ "_id": "debug@2.2.0",
+ "scripts": {},
+ "_shasum": "f87057e995b1a1f6ae6a4960664137bc56f039da",
+ "_from": "debug@>=2.2.0 <2.3.0",
+ "_npmVersion": "2.7.4",
+ "_nodeVersion": "0.12.2",
+ "_npmUser": {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ }
+ ],
+ "dist": {
+ "shasum": "f87057e995b1a1f6ae6a4960664137bc56f039da",
+ "tarball": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/History.md
new file mode 100644
index 0000000..ace1171
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/History.md
@@ -0,0 +1,84 @@
+1.1.0 / 2015-09-14
+==================
+
+ * Enable strict mode in more places
+ * Support io.js 3.x
+ * Support io.js 2.x
+ * Support web browser loading
+ - Requires bundler like Browserify or webpack
+
+1.0.1 / 2015-04-07
+==================
+
+ * Fix `TypeError`s when under `'use strict'` code
+ * Fix useless type name on auto-generated messages
+ * Support io.js 1.x
+ * Support Node.js 0.12
+
+1.0.0 / 2014-09-17
+==================
+
+ * No changes
+
+0.4.5 / 2014-09-09
+==================
+
+ * Improve call speed to functions using the function wrapper
+ * Support Node.js 0.6
+
+0.4.4 / 2014-07-27
+==================
+
+ * Work-around v8 generating empty stack traces
+
+0.4.3 / 2014-07-26
+==================
+
+ * Fix exception when global `Error.stackTraceLimit` is too low
+
+0.4.2 / 2014-07-19
+==================
+
+ * Correct call site for wrapped functions and properties
+
+0.4.1 / 2014-07-19
+==================
+
+ * Improve automatic message generation for function properties
+
+0.4.0 / 2014-07-19
+==================
+
+ * Add `TRACE_DEPRECATION` environment variable
+ * Remove non-standard grey color from color output
+ * Support `--no-deprecation` argument
+ * Support `--trace-deprecation` argument
+ * Support `deprecate.property(fn, prop, message)`
+
+0.3.0 / 2014-06-16
+==================
+
+ * Add `NO_DEPRECATION` environment variable
+
+0.2.0 / 2014-06-15
+==================
+
+ * Add `deprecate.property(obj, prop, message)`
+ * Remove `supports-color` dependency for node.js 0.8
+
+0.1.0 / 2014-06-15
+==================
+
+ * Add `deprecate.function(fn, message)`
+ * Add `process.on('deprecation', fn)` emitter
+ * Automatically generate message when omitted from `deprecate()`
+
+0.0.1 / 2014-06-15
+==================
+
+ * Fix warning for dynamic calls at singe call site
+
+0.0.0 / 2014-06-15
+==================
+
+ * Initial implementation
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/LICENSE
new file mode 100644
index 0000000..142ede3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014-2015 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/Readme.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/Readme.md
new file mode 100644
index 0000000..09bb979
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/Readme.md
@@ -0,0 +1,281 @@
+# depd
+
+[![NPM Version][npm-version-image]][npm-url]
+[![NPM Downloads][npm-downloads-image]][npm-url]
+[![Node.js Version][node-image]][node-url]
+[![Linux Build][travis-image]][travis-url]
+[![Windows Build][appveyor-image]][appveyor-url]
+[![Coverage Status][coveralls-image]][coveralls-url]
+[![Gratipay][gratipay-image]][gratipay-url]
+
+Deprecate all the things
+
+> With great modules comes great responsibility; mark things deprecated!
+
+## Install
+
+This module is installed directly using `npm`:
+
+```sh
+$ npm install depd
+```
+
+This module can also be bundled with systems like
+[Browserify](http://browserify.org/) or [webpack](https://webpack.github.io/),
+though by default this module will alter it's API to no longer display or
+track deprecations.
+
+## API
+
+```js
+var deprecate = require('depd')('my-module')
+```
+
+This library allows you to display deprecation messages to your users.
+This library goes above and beyond with deprecation warnings by
+introspection of the call stack (but only the bits that it is interested
+in).
+
+Instead of just warning on the first invocation of a deprecated
+function and never again, this module will warn on the first invocation
+of a deprecated function per unique call site, making it ideal to alert
+users of all deprecated uses across the code base, rather than just
+whatever happens to execute first.
+
+The deprecation warnings from this module also include the file and line
+information for the call into the module that the deprecated function was
+in.
+
+**NOTE** this library has a similar interface to the `debug` module, and
+this module uses the calling file to get the boundary for the call stacks,
+so you should always create a new `deprecate` object in each file and not
+within some central file.
+
+### depd(namespace)
+
+Create a new deprecate function that uses the given namespace name in the
+messages and will display the call site prior to the stack entering the
+file this function was called from. It is highly suggested you use the
+name of your module as the namespace.
+
+### deprecate(message)
+
+Call this function from deprecated code to display a deprecation message.
+This message will appear once per unique caller site. Caller site is the
+first call site in the stack in a different file from the caller of this
+function.
+
+If the message is omitted, a message is generated for you based on the site
+of the `deprecate()` call and will display the name of the function called,
+similar to the name displayed in a stack trace.
+
+### deprecate.function(fn, message)
+
+Call this function to wrap a given function in a deprecation message on any
+call to the function. An optional message can be supplied to provide a custom
+message.
+
+### deprecate.property(obj, prop, message)
+
+Call this function to wrap a given property on object in a deprecation message
+on any accessing or setting of the property. An optional message can be supplied
+to provide a custom message.
+
+The method must be called on the object where the property belongs (not
+inherited from the prototype).
+
+If the property is a data descriptor, it will be converted to an accessor
+descriptor in order to display the deprecation message.
+
+### process.on('deprecation', fn)
+
+This module will allow easy capturing of deprecation errors by emitting the
+errors as the type "deprecation" on the global `process`. If there are no
+listeners for this type, the errors are written to STDERR as normal, but if
+there are any listeners, nothing will be written to STDERR and instead only
+emitted. From there, you can write the errors in a different format or to a
+logging source.
+
+The error represents the deprecation and is emitted only once with the same
+rules as writing to STDERR. The error has the following properties:
+
+ - `message` - This is the message given by the library
+ - `name` - This is always `'DeprecationError'`
+ - `namespace` - This is the namespace the deprecation came from
+ - `stack` - This is the stack of the call to the deprecated thing
+
+Example `error.stack` output:
+
+```
+DeprecationError: my-cool-module deprecated oldfunction
+ at Object.<anonymous> ([eval]-wrapper:6:22)
+ at Module._compile (module.js:456:26)
+ at evalScript (node.js:532:25)
+ at startup (node.js:80:7)
+ at node.js:902:3
+```
+
+### process.env.NO_DEPRECATION
+
+As a user of modules that are deprecated, the environment variable `NO_DEPRECATION`
+is provided as a quick solution to silencing deprecation warnings from being
+output. The format of this is similar to that of `DEBUG`:
+
+```sh
+$ NO_DEPRECATION=my-module,othermod node app.js
+```
+
+This will suppress deprecations from being output for "my-module" and "othermod".
+The value is a list of comma-separated namespaces. To suppress every warning
+across all namespaces, use the value `*` for a namespace.
+
+Providing the argument `--no-deprecation` to the `node` executable will suppress
+all deprecations (only available in Node.js 0.8 or higher).
+
+**NOTE** This will not suppress the deperecations given to any "deprecation"
+event listeners, just the output to STDERR.
+
+### process.env.TRACE_DEPRECATION
+
+As a user of modules that are deprecated, the environment variable `TRACE_DEPRECATION`
+is provided as a solution to getting more detailed location information in deprecation
+warnings by including the entire stack trace. The format of this is the same as
+`NO_DEPRECATION`:
+
+```sh
+$ TRACE_DEPRECATION=my-module,othermod node app.js
+```
+
+This will include stack traces for deprecations being output for "my-module" and
+"othermod". The value is a list of comma-separated namespaces. To trace every
+warning across all namespaces, use the value `*` for a namespace.
+
+Providing the argument `--trace-deprecation` to the `node` executable will trace
+all deprecations (only available in Node.js 0.8 or higher).
+
+**NOTE** This will not trace the deperecations silenced by `NO_DEPRECATION`.
+
+## Display
+
+![message](files/message.png)
+
+When a user calls a function in your library that you mark deprecated, they
+will see the following written to STDERR (in the given colors, similar colors
+and layout to the `debug` module):
+
+```
+bright cyan bright yellow
+| | reset cyan
+| | | |
+â–¼ â–¼ â–¼ â–¼
+my-cool-module deprecated oldfunction [eval]-wrapper:6:22
+â–² â–² â–² â–²
+| | | |
+namespace | | location of mycoolmod.oldfunction() call
+ | deprecation message
+ the word "deprecated"
+```
+
+If the user redirects their STDERR to a file or somewhere that does not support
+colors, they see (similar layout to the `debug` module):
+
+```
+Sun, 15 Jun 2014 05:21:37 GMT my-cool-module deprecated oldfunction at [eval]-wrapper:6:22
+â–² â–² â–² â–² â–²
+| | | | |
+timestamp of message namespace | | location of mycoolmod.oldfunction() call
+ | deprecation message
+ the word "deprecated"
+```
+
+## Examples
+
+### Deprecating all calls to a function
+
+This will display a deprecated message about "oldfunction" being deprecated
+from "my-module" on STDERR.
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+// message automatically derived from function name
+// Object.oldfunction
+exports.oldfunction = deprecate.function(function oldfunction() {
+ // all calls to function are deprecated
+})
+
+// specific message
+exports.oldfunction = deprecate.function(function () {
+ // all calls to function are deprecated
+}, 'oldfunction')
+```
+
+### Conditionally deprecating a function call
+
+This will display a deprecated message about "weirdfunction" being deprecated
+from "my-module" on STDERR when called with less than 2 arguments.
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+exports.weirdfunction = function () {
+ if (arguments.length < 2) {
+ // calls with 0 or 1 args are deprecated
+ deprecate('weirdfunction args < 2')
+ }
+}
+```
+
+When calling `deprecate` as a function, the warning is counted per call site
+within your own module, so you can display different deprecations depending
+on different situations and the users will still get all the warnings:
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+exports.weirdfunction = function () {
+ if (arguments.length < 2) {
+ // calls with 0 or 1 args are deprecated
+ deprecate('weirdfunction args < 2')
+ } else if (typeof arguments[0] !== 'string') {
+ // calls with non-string first argument are deprecated
+ deprecate('weirdfunction non-string first arg')
+ }
+}
+```
+
+### Deprecating property access
+
+This will display a deprecated message about "oldprop" being deprecated
+from "my-module" on STDERR when accessed. A deprecation will be displayed
+when setting the value and when getting the value.
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+exports.oldprop = 'something'
+
+// message automatically derives from property name
+deprecate.property(exports, 'oldprop')
+
+// explicit message
+deprecate.property(exports, 'oldprop', 'oldprop >= 0.10')
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-version-image]: https://img.shields.io/npm/v/depd.svg
+[npm-downloads-image]: https://img.shields.io/npm/dm/depd.svg
+[npm-url]: https://npmjs.org/package/depd
+[travis-image]: https://img.shields.io/travis/dougwilson/nodejs-depd/master.svg?label=linux
+[travis-url]: https://travis-ci.org/dougwilson/nodejs-depd
+[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/nodejs-depd/master.svg?label=windows
+[appveyor-url]: https://ci.appveyor.com/project/dougwilson/nodejs-depd
+[coveralls-image]: https://img.shields.io/coveralls/dougwilson/nodejs-depd/master.svg
+[coveralls-url]: https://coveralls.io/r/dougwilson/nodejs-depd?branch=master
+[node-image]: https://img.shields.io/node/v/depd.svg
+[node-url]: http://nodejs.org/download/
+[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg
+[gratipay-url]: https://www.gratipay.com/dougwilson/
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/index.js
new file mode 100644
index 0000000..fddcae8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/index.js
@@ -0,0 +1,521 @@
+/*!
+ * depd
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var callSiteToString = require('./lib/compat').callSiteToString
+var eventListenerCount = require('./lib/compat').eventListenerCount
+var relative = require('path').relative
+
+/**
+ * Module exports.
+ */
+
+module.exports = depd
+
+/**
+ * Get the path to base files on.
+ */
+
+var basePath = process.cwd()
+
+/**
+ * Determine if namespace is contained in the string.
+ */
+
+function containsNamespace(str, namespace) {
+ var val = str.split(/[ ,]+/)
+
+ namespace = String(namespace).toLowerCase()
+
+ for (var i = 0 ; i < val.length; i++) {
+ if (!(str = val[i])) continue;
+
+ // namespace contained
+ if (str === '*' || str.toLowerCase() === namespace) {
+ return true
+ }
+ }
+
+ return false
+}
+
+/**
+ * Convert a data descriptor to accessor descriptor.
+ */
+
+function convertDataDescriptorToAccessor(obj, prop, message) {
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
+ var value = descriptor.value
+
+ descriptor.get = function getter() { return value }
+
+ if (descriptor.writable) {
+ descriptor.set = function setter(val) { return value = val }
+ }
+
+ delete descriptor.value
+ delete descriptor.writable
+
+ Object.defineProperty(obj, prop, descriptor)
+
+ return descriptor
+}
+
+/**
+ * Create arguments string to keep arity.
+ */
+
+function createArgumentsString(arity) {
+ var str = ''
+
+ for (var i = 0; i < arity; i++) {
+ str += ', arg' + i
+ }
+
+ return str.substr(2)
+}
+
+/**
+ * Create stack string from stack.
+ */
+
+function createStackString(stack) {
+ var str = this.name + ': ' + this.namespace
+
+ if (this.message) {
+ str += ' deprecated ' + this.message
+ }
+
+ for (var i = 0; i < stack.length; i++) {
+ str += '\n at ' + callSiteToString(stack[i])
+ }
+
+ return str
+}
+
+/**
+ * Create deprecate for namespace in caller.
+ */
+
+function depd(namespace) {
+ if (!namespace) {
+ throw new TypeError('argument namespace is required')
+ }
+
+ var stack = getStack()
+ var site = callSiteLocation(stack[1])
+ var file = site[0]
+
+ function deprecate(message) {
+ // call to self as log
+ log.call(deprecate, message)
+ }
+
+ deprecate._file = file
+ deprecate._ignored = isignored(namespace)
+ deprecate._namespace = namespace
+ deprecate._traced = istraced(namespace)
+ deprecate._warned = Object.create(null)
+
+ deprecate.function = wrapfunction
+ deprecate.property = wrapproperty
+
+ return deprecate
+}
+
+/**
+ * Determine if namespace is ignored.
+ */
+
+function isignored(namespace) {
+ /* istanbul ignore next: tested in a child processs */
+ if (process.noDeprecation) {
+ // --no-deprecation support
+ return true
+ }
+
+ var str = process.env.NO_DEPRECATION || ''
+
+ // namespace ignored
+ return containsNamespace(str, namespace)
+}
+
+/**
+ * Determine if namespace is traced.
+ */
+
+function istraced(namespace) {
+ /* istanbul ignore next: tested in a child processs */
+ if (process.traceDeprecation) {
+ // --trace-deprecation support
+ return true
+ }
+
+ var str = process.env.TRACE_DEPRECATION || ''
+
+ // namespace traced
+ return containsNamespace(str, namespace)
+}
+
+/**
+ * Display deprecation message.
+ */
+
+function log(message, site) {
+ var haslisteners = eventListenerCount(process, 'deprecation') !== 0
+
+ // abort early if no destination
+ if (!haslisteners && this._ignored) {
+ return
+ }
+
+ var caller
+ var callFile
+ var callSite
+ var i = 0
+ var seen = false
+ var stack = getStack()
+ var file = this._file
+
+ if (site) {
+ // provided site
+ callSite = callSiteLocation(stack[1])
+ callSite.name = site.name
+ file = callSite[0]
+ } else {
+ // get call site
+ i = 2
+ site = callSiteLocation(stack[i])
+ callSite = site
+ }
+
+ // get caller of deprecated thing in relation to file
+ for (; i < stack.length; i++) {
+ caller = callSiteLocation(stack[i])
+ callFile = caller[0]
+
+ if (callFile === file) {
+ seen = true
+ } else if (callFile === this._file) {
+ file = this._file
+ } else if (seen) {
+ break
+ }
+ }
+
+ var key = caller
+ ? site.join(':') + '__' + caller.join(':')
+ : undefined
+
+ if (key !== undefined && key in this._warned) {
+ // already warned
+ return
+ }
+
+ this._warned[key] = true
+
+ // generate automatic message from call site
+ if (!message) {
+ message = callSite === site || !callSite.name
+ ? defaultMessage(site)
+ : defaultMessage(callSite)
+ }
+
+ // emit deprecation if listeners exist
+ if (haslisteners) {
+ var err = DeprecationError(this._namespace, message, stack.slice(i))
+ process.emit('deprecation', err)
+ return
+ }
+
+ // format and write message
+ var format = process.stderr.isTTY
+ ? formatColor
+ : formatPlain
+ var msg = format.call(this, message, caller, stack.slice(i))
+ process.stderr.write(msg + '\n', 'utf8')
+
+ return
+}
+
+/**
+ * Get call site location as array.
+ */
+
+function callSiteLocation(callSite) {
+ var file = callSite.getFileName() || '<anonymous>'
+ var line = callSite.getLineNumber()
+ var colm = callSite.getColumnNumber()
+
+ if (callSite.isEval()) {
+ file = callSite.getEvalOrigin() + ', ' + file
+ }
+
+ var site = [file, line, colm]
+
+ site.callSite = callSite
+ site.name = callSite.getFunctionName()
+
+ return site
+}
+
+/**
+ * Generate a default message from the site.
+ */
+
+function defaultMessage(site) {
+ var callSite = site.callSite
+ var funcName = site.name
+
+ // make useful anonymous name
+ if (!funcName) {
+ funcName = '<anonymous@' + formatLocation(site) + '>'
+ }
+
+ var context = callSite.getThis()
+ var typeName = context && callSite.getTypeName()
+
+ // ignore useless type name
+ if (typeName === 'Object') {
+ typeName = undefined
+ }
+
+ // make useful type name
+ if (typeName === 'Function') {
+ typeName = context.name || typeName
+ }
+
+ return typeName && callSite.getMethodName()
+ ? typeName + '.' + funcName
+ : funcName
+}
+
+/**
+ * Format deprecation message without color.
+ */
+
+function formatPlain(msg, caller, stack) {
+ var timestamp = new Date().toUTCString()
+
+ var formatted = timestamp
+ + ' ' + this._namespace
+ + ' deprecated ' + msg
+
+ // add stack trace
+ if (this._traced) {
+ for (var i = 0; i < stack.length; i++) {
+ formatted += '\n at ' + callSiteToString(stack[i])
+ }
+
+ return formatted
+ }
+
+ if (caller) {
+ formatted += ' at ' + formatLocation(caller)
+ }
+
+ return formatted
+}
+
+/**
+ * Format deprecation message with color.
+ */
+
+function formatColor(msg, caller, stack) {
+ var formatted = '\x1b[36;1m' + this._namespace + '\x1b[22;39m' // bold cyan
+ + ' \x1b[33;1mdeprecated\x1b[22;39m' // bold yellow
+ + ' \x1b[0m' + msg + '\x1b[39m' // reset
+
+ // add stack trace
+ if (this._traced) {
+ for (var i = 0; i < stack.length; i++) {
+ formatted += '\n \x1b[36mat ' + callSiteToString(stack[i]) + '\x1b[39m' // cyan
+ }
+
+ return formatted
+ }
+
+ if (caller) {
+ formatted += ' \x1b[36m' + formatLocation(caller) + '\x1b[39m' // cyan
+ }
+
+ return formatted
+}
+
+/**
+ * Format call site location.
+ */
+
+function formatLocation(callSite) {
+ return relative(basePath, callSite[0])
+ + ':' + callSite[1]
+ + ':' + callSite[2]
+}
+
+/**
+ * Get the stack as array of call sites.
+ */
+
+function getStack() {
+ var limit = Error.stackTraceLimit
+ var obj = {}
+ var prep = Error.prepareStackTrace
+
+ Error.prepareStackTrace = prepareObjectStackTrace
+ Error.stackTraceLimit = Math.max(10, limit)
+
+ // capture the stack
+ Error.captureStackTrace(obj)
+
+ // slice this function off the top
+ var stack = obj.stack.slice(1)
+
+ Error.prepareStackTrace = prep
+ Error.stackTraceLimit = limit
+
+ return stack
+}
+
+/**
+ * Capture call site stack from v8.
+ */
+
+function prepareObjectStackTrace(obj, stack) {
+ return stack
+}
+
+/**
+ * Return a wrapped function in a deprecation message.
+ */
+
+function wrapfunction(fn, message) {
+ if (typeof fn !== 'function') {
+ throw new TypeError('argument fn must be a function')
+ }
+
+ var args = createArgumentsString(fn.length)
+ var deprecate = this
+ var stack = getStack()
+ var site = callSiteLocation(stack[1])
+
+ site.name = fn.name
+
+ var deprecatedfn = eval('(function (' + args + ') {\n'
+ + '"use strict"\n'
+ + 'log.call(deprecate, message, site)\n'
+ + 'return fn.apply(this, arguments)\n'
+ + '})')
+
+ return deprecatedfn
+}
+
+/**
+ * Wrap property in a deprecation message.
+ */
+
+function wrapproperty(obj, prop, message) {
+ if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
+ throw new TypeError('argument obj must be object')
+ }
+
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
+
+ if (!descriptor) {
+ throw new TypeError('must call property on owner object')
+ }
+
+ if (!descriptor.configurable) {
+ throw new TypeError('property must be configurable')
+ }
+
+ var deprecate = this
+ var stack = getStack()
+ var site = callSiteLocation(stack[1])
+
+ // set site name
+ site.name = prop
+
+ // convert data descriptor
+ if ('value' in descriptor) {
+ descriptor = convertDataDescriptorToAccessor(obj, prop, message)
+ }
+
+ var get = descriptor.get
+ var set = descriptor.set
+
+ // wrap getter
+ if (typeof get === 'function') {
+ descriptor.get = function getter() {
+ log.call(deprecate, message, site)
+ return get.apply(this, arguments)
+ }
+ }
+
+ // wrap setter
+ if (typeof set === 'function') {
+ descriptor.set = function setter() {
+ log.call(deprecate, message, site)
+ return set.apply(this, arguments)
+ }
+ }
+
+ Object.defineProperty(obj, prop, descriptor)
+}
+
+/**
+ * Create DeprecationError for deprecation
+ */
+
+function DeprecationError(namespace, message, stack) {
+ var error = new Error()
+ var stackString
+
+ Object.defineProperty(error, 'constructor', {
+ value: DeprecationError
+ })
+
+ Object.defineProperty(error, 'message', {
+ configurable: true,
+ enumerable: false,
+ value: message,
+ writable: true
+ })
+
+ Object.defineProperty(error, 'name', {
+ enumerable: false,
+ configurable: true,
+ value: 'DeprecationError',
+ writable: true
+ })
+
+ Object.defineProperty(error, 'namespace', {
+ configurable: true,
+ enumerable: false,
+ value: namespace,
+ writable: true
+ })
+
+ Object.defineProperty(error, 'stack', {
+ configurable: true,
+ enumerable: false,
+ get: function () {
+ if (stackString !== undefined) {
+ return stackString
+ }
+
+ // prepare stack trace
+ return stackString = createStackString.call(this, stack)
+ },
+ set: function setter(val) {
+ stackString = val
+ }
+ })
+
+ return error
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/lib/browser/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/lib/browser/index.js
new file mode 100644
index 0000000..f464e05
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/lib/browser/index.js
@@ -0,0 +1,79 @@
+/*!
+ * depd
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = depd
+
+/**
+ * Create deprecate for namespace in caller.
+ */
+
+function depd(namespace) {
+ if (!namespace) {
+ throw new TypeError('argument namespace is required')
+ }
+
+ function deprecate(message) {
+ // no-op in browser
+ }
+
+ deprecate._file = undefined
+ deprecate._ignored = true
+ deprecate._namespace = namespace
+ deprecate._traced = false
+ deprecate._warned = Object.create(null)
+
+ deprecate.function = wrapfunction
+ deprecate.property = wrapproperty
+
+ return deprecate
+}
+
+/**
+ * Return a wrapped function in a deprecation message.
+ *
+ * This is a no-op version of the wrapper, which does nothing but call
+ * validation.
+ */
+
+function wrapfunction(fn, message) {
+ if (typeof fn !== 'function') {
+ throw new TypeError('argument fn must be a function')
+ }
+
+ return fn
+}
+
+/**
+ * Wrap property in a deprecation message.
+ *
+ * This is a no-op version of the wrapper, which does nothing but call
+ * validation.
+ */
+
+function wrapproperty(obj, prop, message) {
+ if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
+ throw new TypeError('argument obj must be object')
+ }
+
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
+
+ if (!descriptor) {
+ throw new TypeError('must call property on owner object')
+ }
+
+ if (!descriptor.configurable) {
+ throw new TypeError('property must be configurable')
+ }
+
+ return
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/lib/compat/buffer-concat.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/lib/compat/buffer-concat.js
new file mode 100644
index 0000000..4b73381
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/lib/compat/buffer-concat.js
@@ -0,0 +1,35 @@
+/*!
+ * depd
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ */
+
+module.exports = bufferConcat
+
+/**
+ * Concatenate an array of Buffers.
+ */
+
+function bufferConcat(bufs) {
+ var length = 0
+
+ for (var i = 0, len = bufs.length; i < len; i++) {
+ length += bufs[i].length
+ }
+
+ var buf = new Buffer(length)
+ var pos = 0
+
+ for (var i = 0, len = bufs.length; i < len; i++) {
+ bufs[i].copy(buf, pos)
+ pos += bufs[i].length
+ }
+
+ return buf
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/lib/compat/callsite-tostring.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/lib/compat/callsite-tostring.js
new file mode 100644
index 0000000..9ecef34
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/lib/compat/callsite-tostring.js
@@ -0,0 +1,103 @@
+/*!
+ * depd
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ */
+
+module.exports = callSiteToString
+
+/**
+ * Format a CallSite file location to a string.
+ */
+
+function callSiteFileLocation(callSite) {
+ var fileName
+ var fileLocation = ''
+
+ if (callSite.isNative()) {
+ fileLocation = 'native'
+ } else if (callSite.isEval()) {
+ fileName = callSite.getScriptNameOrSourceURL()
+ if (!fileName) {
+ fileLocation = callSite.getEvalOrigin()
+ }
+ } else {
+ fileName = callSite.getFileName()
+ }
+
+ if (fileName) {
+ fileLocation += fileName
+
+ var lineNumber = callSite.getLineNumber()
+ if (lineNumber != null) {
+ fileLocation += ':' + lineNumber
+
+ var columnNumber = callSite.getColumnNumber()
+ if (columnNumber) {
+ fileLocation += ':' + columnNumber
+ }
+ }
+ }
+
+ return fileLocation || 'unknown source'
+}
+
+/**
+ * Format a CallSite to a string.
+ */
+
+function callSiteToString(callSite) {
+ var addSuffix = true
+ var fileLocation = callSiteFileLocation(callSite)
+ var functionName = callSite.getFunctionName()
+ var isConstructor = callSite.isConstructor()
+ var isMethodCall = !(callSite.isToplevel() || isConstructor)
+ var line = ''
+
+ if (isMethodCall) {
+ var methodName = callSite.getMethodName()
+ var typeName = getConstructorName(callSite)
+
+ if (functionName) {
+ if (typeName && functionName.indexOf(typeName) !== 0) {
+ line += typeName + '.'
+ }
+
+ line += functionName
+
+ if (methodName && functionName.lastIndexOf('.' + methodName) !== functionName.length - methodName.length - 1) {
+ line += ' [as ' + methodName + ']'
+ }
+ } else {
+ line += typeName + '.' + (methodName || '<anonymous>')
+ }
+ } else if (isConstructor) {
+ line += 'new ' + (functionName || '<anonymous>')
+ } else if (functionName) {
+ line += functionName
+ } else {
+ addSuffix = false
+ line += fileLocation
+ }
+
+ if (addSuffix) {
+ line += ' (' + fileLocation + ')'
+ }
+
+ return line
+}
+
+/**
+ * Get constructor name of reviver.
+ */
+
+function getConstructorName(obj) {
+ var receiver = obj.receiver
+ return (receiver.constructor && receiver.constructor.name) || null
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/lib/compat/event-listener-count.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/lib/compat/event-listener-count.js
new file mode 100644
index 0000000..a05fceb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/lib/compat/event-listener-count.js
@@ -0,0 +1,22 @@
+/*!
+ * depd
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = eventListenerCount
+
+/**
+ * Get the count of listeners on an event emitter of a specific type.
+ */
+
+function eventListenerCount(emitter, type) {
+ return emitter.listeners(type).length
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/lib/compat/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/lib/compat/index.js
new file mode 100644
index 0000000..aa3c1de
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/lib/compat/index.js
@@ -0,0 +1,84 @@
+/*!
+ * depd
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var Buffer = require('buffer')
+var EventEmitter = require('events').EventEmitter
+
+/**
+ * Module exports.
+ * @public
+ */
+
+lazyProperty(module.exports, 'bufferConcat', function bufferConcat() {
+ return Buffer.concat || require('./buffer-concat')
+})
+
+lazyProperty(module.exports, 'callSiteToString', function callSiteToString() {
+ var limit = Error.stackTraceLimit
+ var obj = {}
+ var prep = Error.prepareStackTrace
+
+ function prepareObjectStackTrace(obj, stack) {
+ return stack
+ }
+
+ Error.prepareStackTrace = prepareObjectStackTrace
+ Error.stackTraceLimit = 2
+
+ // capture the stack
+ Error.captureStackTrace(obj)
+
+ // slice the stack
+ var stack = obj.stack.slice()
+
+ Error.prepareStackTrace = prep
+ Error.stackTraceLimit = limit
+
+ return stack[0].toString ? toString : require('./callsite-tostring')
+})
+
+lazyProperty(module.exports, 'eventListenerCount', function eventListenerCount() {
+ return EventEmitter.listenerCount || require('./event-listener-count')
+})
+
+/**
+ * Define a lazy property.
+ */
+
+function lazyProperty(obj, prop, getter) {
+ function get() {
+ var val = getter()
+
+ Object.defineProperty(obj, prop, {
+ configurable: true,
+ enumerable: true,
+ value: val
+ })
+
+ return val
+ }
+
+ Object.defineProperty(obj, prop, {
+ configurable: true,
+ enumerable: true,
+ get: get
+ })
+}
+
+/**
+ * Call toString() on the obj
+ */
+
+function toString(obj) {
+ return obj.toString()
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/package.json
new file mode 100644
index 0000000..edfc0b2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/depd/package.json
@@ -0,0 +1,67 @@
+{
+ "name": "depd",
+ "description": "Deprecate all the things",
+ "version": "1.1.0",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "keywords": [
+ "deprecate",
+ "deprecated"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/dougwilson/nodejs-depd.git"
+ },
+ "browser": "lib/browser/index.js",
+ "devDependencies": {
+ "benchmark": "1.0.0",
+ "beautify-benchmark": "0.2.4",
+ "istanbul": "0.3.5",
+ "mocha": "~1.21.5"
+ },
+ "files": [
+ "lib/",
+ "History.md",
+ "LICENSE",
+ "index.js",
+ "Readme.md"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "bench": "node benchmark/index.js",
+ "test": "mocha --reporter spec --bail test/",
+ "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --no-exit test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/"
+ },
+ "gitHead": "78c659de20283e3a6bee92bda455e6daff01686a",
+ "bugs": {
+ "url": "https://github.com/dougwilson/nodejs-depd/issues"
+ },
+ "homepage": "https://github.com/dougwilson/nodejs-depd",
+ "_id": "depd@1.1.0",
+ "_shasum": "e1bd82c6aab6ced965b97b88b17ed3e528ca18c3",
+ "_from": "depd@>=1.1.0 <1.2.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e1bd82c6aab6ced965b97b88b17ed3e528ca18c3",
+ "tarball": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/HISTORY.md
new file mode 100644
index 0000000..a7f080f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/HISTORY.md
@@ -0,0 +1,103 @@
+2016-11-16 / 1.5.1
+==================
+
+ * deps: inherits@2.0.3
+ - Fix issue loading in browser
+ * deps: setprototypeof@1.0.2
+ * deps: statuses@'>= 1.3.1 < 2'
+
+2016-05-18 / 1.5.0
+==================
+
+ * Support new code `421 Misdirected Request`
+ * Use `setprototypeof` module to replace `__proto__` setting
+ * deps: statuses@'>= 1.3.0 < 2'
+ - Add `421 Misdirected Request`
+ - perf: enable strict mode
+ * perf: enable strict mode
+
+2016-01-28 / 1.4.0
+==================
+
+ * Add `HttpError` export, for `err instanceof createError.HttpError`
+ * deps: inherits@2.0.1
+ * deps: statuses@'>= 1.2.1 < 2'
+ - Fix message for status 451
+ - Remove incorrect nginx status code
+
+2015-02-02 / 1.3.1
+==================
+
+ * Fix regression where status can be overwritten in `createError` `props`
+
+2015-02-01 / 1.3.0
+==================
+
+ * Construct errors using defined constructors from `createError`
+ * Fix error names that are not identifiers
+ - `createError["I'mateapot"]` is now `createError.ImATeapot`
+ * Set a meaningful `name` property on constructed errors
+
+2014-12-09 / 1.2.8
+==================
+
+ * Fix stack trace from exported function
+ * Remove `arguments.callee` usage
+
+2014-10-14 / 1.2.7
+==================
+
+ * Remove duplicate line
+
+2014-10-02 / 1.2.6
+==================
+
+ * Fix `expose` to be `true` for `ClientError` constructor
+
+2014-09-28 / 1.2.5
+==================
+
+ * deps: statuses@1
+
+2014-09-21 / 1.2.4
+==================
+
+ * Fix dependency version to work with old `npm`s
+
+2014-09-21 / 1.2.3
+==================
+
+ * deps: statuses@~1.1.0
+
+2014-09-21 / 1.2.2
+==================
+
+ * Fix publish error
+
+2014-09-21 / 1.2.1
+==================
+
+ * Support Node.js 0.6
+ * Use `inherits` instead of `util`
+
+2014-09-09 / 1.2.0
+==================
+
+ * Fix the way inheriting functions
+ * Support `expose` being provided in properties argument
+
+2014-09-08 / 1.1.0
+==================
+
+ * Default status to 500
+ * Support provided `error` to extend
+
+2014-09-08 / 1.0.1
+==================
+
+ * Fix accepting string message
+
+2014-09-08 / 1.0.0
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/LICENSE
new file mode 100644
index 0000000..82af4df
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/LICENSE
@@ -0,0 +1,23 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+Copyright (c) 2016 Douglas Christopher Wilson doug@somethingdoug.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/README.md
new file mode 100644
index 0000000..4143977
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/README.md
@@ -0,0 +1,132 @@
+# http-errors
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Create HTTP errors for Express, Koa, Connect, etc. with ease.
+
+## Install
+
+This is a [Node.js](https://nodejs.org/en/) module available through the
+[npm registry](https://www.npmjs.com/). Installation is done using the
+[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
+
+```bash
+$ npm install http-errors
+```
+
+## Example
+
+```js
+var createError = require('http-errors')
+var express = require('express')
+var app = express()
+
+app.use(function (req, res, next) {
+ if (!req.user) return next(createError(401, 'Please login to view this page.'))
+ next()
+})
+```
+
+## API
+
+This is the current API, currently extracted from Koa and subject to change.
+
+All errors inherit from JavaScript `Error` and the exported `createError.HttpError`.
+
+### Error Properties
+
+- `expose` - can be used to signal if `message` should be sent to the client,
+ defaulting to `false` when `status` >= 500
+- `headers` - can be an object of header names to values to be sent to the
+ client, defaulting to `undefined`. When defined, the key names should all
+ be lower-cased
+- `message`
+- `status` and `statusCode` - the status code of the error, defaulting to `500`
+
+### createError([status], [message], [properties])
+
+<!-- eslint-disable no-undef, no-unused-vars -->
+
+```js
+var err = createError(404, 'This video does not exist!')
+```
+
+- `status: 500` - the status code as a number
+- `message` - the message of the error, defaulting to node's text for that status code.
+- `properties` - custom properties to attach to the object
+
+### new createError\[code || name\](\[msg]\))
+
+<!-- eslint-disable no-undef, no-unused-vars -->
+
+```js
+var err = new createError.NotFound()
+```
+
+- `code` - the status code as a number
+- `name` - the name of the error as a "bumpy case", i.e. `NotFound` or `InternalServerError`.
+
+#### List of all constructors
+
+|Status Code|Constructor Name |
+|-----------|-----------------------------|
+|400 |BadRequest |
+|401 |Unauthorized |
+|402 |PaymentRequired |
+|403 |Forbidden |
+|404 |NotFound |
+|405 |MethodNotAllowed |
+|406 |NotAcceptable |
+|407 |ProxyAuthenticationRequired |
+|408 |RequestTimeout |
+|409 |Conflict |
+|410 |Gone |
+|411 |LengthRequired |
+|412 |PreconditionFailed |
+|413 |PayloadTooLarge |
+|414 |URITooLong |
+|415 |UnsupportedMediaType |
+|416 |RangeNotSatisfiable |
+|417 |ExpectationFailed |
+|418 |ImATeapot |
+|421 |MisdirectedRequest |
+|422 |UnprocessableEntity |
+|423 |Locked |
+|424 |FailedDependency |
+|425 |UnorderedCollection |
+|426 |UpgradeRequired |
+|428 |PreconditionRequired |
+|429 |TooManyRequests |
+|431 |RequestHeaderFieldsTooLarge |
+|451 |UnavailableForLegalReasons |
+|500 |InternalServerError |
+|501 |NotImplemented |
+|502 |BadGateway |
+|503 |ServiceUnavailable |
+|504 |GatewayTimeout |
+|505 |HTTPVersionNotSupported |
+|506 |VariantAlsoNegotiates |
+|507 |InsufficientStorage |
+|508 |LoopDetected |
+|509 |BandwidthLimitExceeded |
+|510 |NotExtended |
+|511 |NetworkAuthenticationRequired|
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/http-errors.svg
+[npm-url]: https://npmjs.org/package/http-errors
+[node-version-image]: https://img.shields.io/node/v/http-errors.svg
+[node-version-url]: https://nodejs.org/en/download/
+[travis-image]: https://img.shields.io/travis/jshttp/http-errors.svg
+[travis-url]: https://travis-ci.org/jshttp/http-errors
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/http-errors.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/http-errors
+[downloads-image]: https://img.shields.io/npm/dm/http-errors.svg
+[downloads-url]: https://npmjs.org/package/http-errors
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/index.js
new file mode 100644
index 0000000..6130db8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/index.js
@@ -0,0 +1,223 @@
+/*!
+ * http-errors
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2016 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var setPrototypeOf = require('setprototypeof')
+var statuses = require('statuses')
+var inherits = require('inherits')
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = createError
+module.exports.HttpError = createHttpErrorConstructor()
+
+// Populate exports for all constructors
+populateConstructorExports(module.exports, statuses.codes, module.exports.HttpError)
+
+/**
+ * Create a new HTTP Error.
+ *
+ * @returns {Error}
+ * @public
+ */
+
+function createError () {
+ // so much arity going on ~_~
+ var err
+ var msg
+ var status = 500
+ var props = {}
+ for (var i = 0; i < arguments.length; i++) {
+ var arg = arguments[i]
+ if (arg instanceof Error) {
+ err = arg
+ status = err.status || err.statusCode || status
+ continue
+ }
+ switch (typeof arg) {
+ case 'string':
+ msg = arg
+ break
+ case 'number':
+ status = arg
+ break
+ case 'object':
+ props = arg
+ break
+ }
+ }
+
+ if (typeof status !== 'number' || !statuses[status]) {
+ status = 500
+ }
+
+ // constructor
+ var HttpError = createError[status]
+
+ if (!err) {
+ // create error
+ err = HttpError
+ ? new HttpError(msg)
+ : new Error(msg || statuses[status])
+ Error.captureStackTrace(err, createError)
+ }
+
+ if (!HttpError || !(err instanceof HttpError)) {
+ // add properties to generic error
+ err.expose = status < 500
+ err.status = err.statusCode = status
+ }
+
+ for (var key in props) {
+ if (key !== 'status' && key !== 'statusCode') {
+ err[key] = props[key]
+ }
+ }
+
+ return err
+}
+
+/**
+ * Create HTTP error abstract base class.
+ * @private
+ */
+
+function createHttpErrorConstructor () {
+ function HttpError () {
+ throw new TypeError('cannot construct abstract class')
+ }
+
+ inherits(HttpError, Error)
+
+ return HttpError
+}
+
+/**
+ * Create a constructor for a client error.
+ * @private
+ */
+
+function createClientErrorConstructor (HttpError, name, code) {
+ var className = name.match(/Error$/) ? name : name + 'Error'
+
+ function ClientError (message) {
+ // create the error object
+ var err = new Error(message != null ? message : statuses[code])
+
+ // capture a stack trace to the construction point
+ Error.captureStackTrace(err, ClientError)
+
+ // adjust the [[Prototype]]
+ setPrototypeOf(err, ClientError.prototype)
+
+ // redefine the error name
+ Object.defineProperty(err, 'name', {
+ enumerable: false,
+ configurable: true,
+ value: className,
+ writable: true
+ })
+
+ return err
+ }
+
+ inherits(ClientError, HttpError)
+
+ ClientError.prototype.status = code
+ ClientError.prototype.statusCode = code
+ ClientError.prototype.expose = true
+
+ return ClientError
+}
+
+/**
+ * Create a constructor for a server error.
+ * @private
+ */
+
+function createServerErrorConstructor (HttpError, name, code) {
+ var className = name.match(/Error$/) ? name : name + 'Error'
+
+ function ServerError (message) {
+ // create the error object
+ var err = new Error(message != null ? message : statuses[code])
+
+ // capture a stack trace to the construction point
+ Error.captureStackTrace(err, ServerError)
+
+ // adjust the [[Prototype]]
+ setPrototypeOf(err, ServerError.prototype)
+
+ // redefine the error name
+ Object.defineProperty(err, 'name', {
+ enumerable: false,
+ configurable: true,
+ value: className,
+ writable: true
+ })
+
+ return err
+ }
+
+ inherits(ServerError, HttpError)
+
+ ServerError.prototype.status = code
+ ServerError.prototype.statusCode = code
+ ServerError.prototype.expose = false
+
+ return ServerError
+}
+
+/**
+ * Populate the exports object with constructors for every error class.
+ * @private
+ */
+
+function populateConstructorExports (exports, codes, HttpError) {
+ codes.forEach(function forEachCode (code) {
+ var CodeError
+ var name = toIdentifier(statuses[code])
+
+ switch (String(code).charAt(0)) {
+ case '4':
+ CodeError = createClientErrorConstructor(HttpError, name, code)
+ break
+ case '5':
+ CodeError = createServerErrorConstructor(HttpError, name, code)
+ break
+ }
+
+ if (CodeError) {
+ // export the constructor
+ exports[code] = CodeError
+ exports[name] = CodeError
+ }
+ })
+
+ // backwards-compatibility
+ exports["I'mateapot"] = exports.ImATeapot
+}
+
+/**
+ * Convert a string of words to a JavaScript identifier.
+ * @private
+ */
+
+function toIdentifier (str) {
+ return str.split(' ').map(function (token) {
+ return token.slice(0, 1).toUpperCase() + token.slice(1)
+ }).join('').replace(/[^ _0-9a-z]/gi, '')
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/inherits/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/inherits/LICENSE
new file mode 100644
index 0000000..dea3013
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/inherits/LICENSE
@@ -0,0 +1,16 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/inherits/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/inherits/README.md
new file mode 100644
index 0000000..b1c5665
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/inherits/README.md
@@ -0,0 +1,42 @@
+Browser-friendly inheritance fully compatible with standard node.js
+[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).
+
+This package exports standard `inherits` from node.js `util` module in
+node environment, but also provides alternative browser-friendly
+implementation through [browser
+field](https://gist.github.com/shtylman/4339901). Alternative
+implementation is a literal copy of standard one located in standalone
+module to avoid requiring of `util`. It also has a shim for old
+browsers with no `Object.create` support.
+
+While keeping you sure you are using standard `inherits`
+implementation in node.js environment, it allows bundlers such as
+[browserify](https://github.com/substack/node-browserify) to not
+include full `util` package to your client code if all you need is
+just `inherits` function. It worth, because browser shim for `util`
+package is large and `inherits` is often the single function you need
+from it.
+
+It's recommended to use this package instead of
+`require('util').inherits` for any code that has chances to be used
+not only in node.js but in browser too.
+
+## usage
+
+```js
+var inherits = require('inherits');
+// then use exactly as the standard one
+```
+
+## note on version ~1.0
+
+Version ~1.0 had completely different motivation and is not compatible
+neither with 2.0 nor with standard node.js `inherits`.
+
+If you are using version ~1.0 and planning to switch to ~2.0, be
+careful:
+
+* new version uses `super_` instead of `super` for referencing
+ superclass
+* new version overwrites current prototype while old one preserves any
+ existing fields on it
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/inherits/inherits.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/inherits/inherits.js
new file mode 100644
index 0000000..3b94763
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/inherits/inherits.js
@@ -0,0 +1,7 @@
+try {
+ var util = require('util');
+ if (typeof util.inherits !== 'function') throw '';
+ module.exports = util.inherits;
+} catch (e) {
+ module.exports = require('./inherits_browser.js');
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/inherits/inherits_browser.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/inherits/inherits_browser.js
new file mode 100644
index 0000000..c1e78a7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/inherits/inherits_browser.js
@@ -0,0 +1,23 @@
+if (typeof Object.create === 'function') {
+ // implementation from standard node.js 'util' module
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ };
+} else {
+ // old school shim for old browsers
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ var TempCtor = function () {}
+ TempCtor.prototype = superCtor.prototype
+ ctor.prototype = new TempCtor()
+ ctor.prototype.constructor = ctor
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/inherits/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/inherits/package.json
new file mode 100644
index 0000000..092ed55
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/inherits/package.json
@@ -0,0 +1,63 @@
+{
+ "name": "inherits",
+ "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
+ "version": "2.0.3",
+ "keywords": [
+ "inheritance",
+ "class",
+ "klass",
+ "oop",
+ "object-oriented",
+ "inherits",
+ "browser",
+ "browserify"
+ ],
+ "main": "./inherits.js",
+ "browser": "./inherits_browser.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/inherits.git"
+ },
+ "license": "ISC",
+ "scripts": {
+ "test": "node test"
+ },
+ "devDependencies": {
+ "tap": "^7.1.0"
+ },
+ "files": [
+ "inherits.js",
+ "inherits_browser.js"
+ ],
+ "gitHead": "e05d0fb27c61a3ec687214f0476386b765364d5f",
+ "bugs": {
+ "url": "https://github.com/isaacs/inherits/issues"
+ },
+ "homepage": "https://github.com/isaacs/inherits#readme",
+ "_id": "inherits@2.0.3",
+ "_shasum": "633c2c83e3da42a502f52466022480f4208261de",
+ "_from": "inherits@2.0.3",
+ "_npmVersion": "3.10.7",
+ "_nodeVersion": "6.5.0",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "dist": {
+ "shasum": "633c2c83e3da42a502f52466022480f4208261de",
+ "tarball": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/setprototypeof/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/setprototypeof/LICENSE
new file mode 100644
index 0000000..61afa2f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/setprototypeof/LICENSE
@@ -0,0 +1,13 @@
+Copyright (c) 2015, Wes Todd
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/setprototypeof/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/setprototypeof/README.md
new file mode 100644
index 0000000..01d7947
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/setprototypeof/README.md
@@ -0,0 +1,21 @@
+# Polyfill for `Object.setPrototypeOf`
+
+A simple cross platform implementation to set the prototype of an instianted object. Supports all modern browsers and at least back to IE8.
+
+## Usage:
+
+```
+$ npm install --save setprototypeof
+```
+
+```javascript
+var setPrototypeOf = require('setprototypeof');
+
+var obj = {};
+setPrototypeOf(obj, {
+ foo: function() {
+ return 'bar';
+ }
+});
+obj.foo(); // bar
+```
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/setprototypeof/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/setprototypeof/index.js
new file mode 100644
index 0000000..b762a7c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/setprototypeof/index.js
@@ -0,0 +1,13 @@
+module.exports = Object.setPrototypeOf || ({__proto__:[]} instanceof Array ? setProtoOf : mixinProperties);
+
+function setProtoOf(obj, proto) {
+ obj.__proto__ = proto;
+ return obj;
+}
+
+function mixinProperties(obj, proto) {
+ for (var prop in proto) {
+ obj[prop] = proto[prop];
+ }
+ return obj;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/setprototypeof/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/setprototypeof/package.json
new file mode 100644
index 0000000..33c91f8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/setprototypeof/package.json
@@ -0,0 +1,53 @@
+{
+ "name": "setprototypeof",
+ "version": "1.0.2",
+ "description": "A small polyfill for Object.setprototypeof",
+ "main": "index.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/wesleytodd/setprototypeof.git"
+ },
+ "keywords": [
+ "polyfill",
+ "object",
+ "setprototypeof"
+ ],
+ "author": {
+ "name": "Wes Todd"
+ },
+ "license": "ISC",
+ "bugs": {
+ "url": "https://github.com/wesleytodd/setprototypeof/issues"
+ },
+ "homepage": "https://github.com/wesleytodd/setprototypeof",
+ "gitHead": "34da239ae7ab69b7b42791d5b928379ce51a0ff2",
+ "_id": "setprototypeof@1.0.2",
+ "_shasum": "81a552141ec104b88e89ce383103ad5c66564d08",
+ "_from": "setprototypeof@1.0.2",
+ "_npmVersion": "3.10.8",
+ "_nodeVersion": "7.0.0",
+ "_npmUser": {
+ "name": "wesleytodd",
+ "email": "wes@wesleytodd.com"
+ },
+ "dist": {
+ "shasum": "81a552141ec104b88e89ce383103ad5c66564d08",
+ "tarball": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.2.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "wesleytodd",
+ "email": "wes@wesleytodd.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/setprototypeof-1.0.2.tgz_1479056139581_0.43114364007487893"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.2.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/HISTORY.md
new file mode 100644
index 0000000..3015a5f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/HISTORY.md
@@ -0,0 +1,55 @@
+1.3.1 / 2016-11-11
+==================
+
+ * Fix return type in JSDoc
+
+1.3.0 / 2016-05-17
+==================
+
+ * Add `421 Misdirected Request`
+ * perf: enable strict mode
+
+1.2.1 / 2015-02-01
+==================
+
+ * Fix message for status 451
+ - `451 Unavailable For Legal Reasons`
+
+1.2.0 / 2014-09-28
+==================
+
+ * Add `208 Already Repored`
+ * Add `226 IM Used`
+ * Add `306 (Unused)`
+ * Add `415 Unable For Legal Reasons`
+ * Add `508 Loop Detected`
+
+1.1.1 / 2014-09-24
+==================
+
+ * Add missing 308 to `codes.json`
+
+1.1.0 / 2014-09-21
+==================
+
+ * Add `codes.json` for universal support
+
+1.0.4 / 2014-08-20
+==================
+
+ * Package cleanup
+
+1.0.3 / 2014-06-08
+==================
+
+ * Add 308 to `.redirect` category
+
+1.0.2 / 2014-03-13
+==================
+
+ * Add `.retry` category
+
+1.0.1 / 2014-03-12
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/LICENSE
new file mode 100644
index 0000000..82af4df
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/LICENSE
@@ -0,0 +1,23 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+Copyright (c) 2016 Douglas Christopher Wilson doug@somethingdoug.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/README.md
new file mode 100644
index 0000000..2bf0756
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/README.md
@@ -0,0 +1,103 @@
+# Statuses
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+HTTP status utility for node.
+
+## API
+
+```js
+var status = require('statuses')
+```
+
+### var code = status(Integer || String)
+
+If `Integer` or `String` is a valid HTTP code or status message, then the appropriate `code` will be returned. Otherwise, an error will be thrown.
+
+```js
+status(403) // => 403
+status('403') // => 403
+status('forbidden') // => 403
+status('Forbidden') // => 403
+status(306) // throws, as it's not supported by node.js
+```
+
+### status.codes
+
+Returns an array of all the status codes as `Integer`s.
+
+### var msg = status[code]
+
+Map of `code` to `status message`. `undefined` for invalid `code`s.
+
+```js
+status[404] // => 'Not Found'
+```
+
+### var code = status[msg]
+
+Map of `status message` to `code`. `msg` can either be title-cased or lower-cased. `undefined` for invalid `status message`s.
+
+```js
+status['not found'] // => 404
+status['Not Found'] // => 404
+```
+
+### status.redirect[code]
+
+Returns `true` if a status code is a valid redirect status.
+
+```js
+status.redirect[200] // => undefined
+status.redirect[301] // => true
+```
+
+### status.empty[code]
+
+Returns `true` if a status code expects an empty body.
+
+```js
+status.empty[200] // => undefined
+status.empty[204] // => true
+status.empty[304] // => true
+```
+
+### status.retry[code]
+
+Returns `true` if you should retry the rest.
+
+```js
+status.retry[501] // => undefined
+status.retry[503] // => true
+```
+
+## Adding Status Codes
+
+The status codes are primarily sourced from http://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv.
+Additionally, custom codes are added from http://en.wikipedia.org/wiki/List_of_HTTP_status_codes.
+These are added manually in the `lib/*.json` files.
+If you would like to add a status code, add it to the appropriate JSON file.
+
+To rebuild `codes.json`, run the following:
+
+```bash
+# update src/iana.json
+npm run fetch
+# build codes.json
+npm run build
+```
+
+[npm-image]: https://img.shields.io/npm/v/statuses.svg
+[npm-url]: https://npmjs.org/package/statuses
+[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg
+[node-version-url]: https://nodejs.org/en/download
+[travis-image]: https://img.shields.io/travis/jshttp/statuses.svg
+[travis-url]: https://travis-ci.org/jshttp/statuses
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/statuses.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/statuses?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/statuses.svg
+[downloads-url]: https://npmjs.org/package/statuses
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/codes.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/codes.json
new file mode 100644
index 0000000..e765123
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/codes.json
@@ -0,0 +1,65 @@
+{
+ "100": "Continue",
+ "101": "Switching Protocols",
+ "102": "Processing",
+ "200": "OK",
+ "201": "Created",
+ "202": "Accepted",
+ "203": "Non-Authoritative Information",
+ "204": "No Content",
+ "205": "Reset Content",
+ "206": "Partial Content",
+ "207": "Multi-Status",
+ "208": "Already Reported",
+ "226": "IM Used",
+ "300": "Multiple Choices",
+ "301": "Moved Permanently",
+ "302": "Found",
+ "303": "See Other",
+ "304": "Not Modified",
+ "305": "Use Proxy",
+ "306": "(Unused)",
+ "307": "Temporary Redirect",
+ "308": "Permanent Redirect",
+ "400": "Bad Request",
+ "401": "Unauthorized",
+ "402": "Payment Required",
+ "403": "Forbidden",
+ "404": "Not Found",
+ "405": "Method Not Allowed",
+ "406": "Not Acceptable",
+ "407": "Proxy Authentication Required",
+ "408": "Request Timeout",
+ "409": "Conflict",
+ "410": "Gone",
+ "411": "Length Required",
+ "412": "Precondition Failed",
+ "413": "Payload Too Large",
+ "414": "URI Too Long",
+ "415": "Unsupported Media Type",
+ "416": "Range Not Satisfiable",
+ "417": "Expectation Failed",
+ "418": "I'm a teapot",
+ "421": "Misdirected Request",
+ "422": "Unprocessable Entity",
+ "423": "Locked",
+ "424": "Failed Dependency",
+ "425": "Unordered Collection",
+ "426": "Upgrade Required",
+ "428": "Precondition Required",
+ "429": "Too Many Requests",
+ "431": "Request Header Fields Too Large",
+ "451": "Unavailable For Legal Reasons",
+ "500": "Internal Server Error",
+ "501": "Not Implemented",
+ "502": "Bad Gateway",
+ "503": "Service Unavailable",
+ "504": "Gateway Timeout",
+ "505": "HTTP Version Not Supported",
+ "506": "Variant Also Negotiates",
+ "507": "Insufficient Storage",
+ "508": "Loop Detected",
+ "509": "Bandwidth Limit Exceeded",
+ "510": "Not Extended",
+ "511": "Network Authentication Required"
+} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/index.js
new file mode 100644
index 0000000..9f955c6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/index.js
@@ -0,0 +1,110 @@
+/*!
+ * statuses
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2016 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var codes = require('./codes.json')
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = status
+
+// array of status codes
+status.codes = populateStatusesMap(status, codes)
+
+// status codes for redirects
+status.redirect = {
+ 300: true,
+ 301: true,
+ 302: true,
+ 303: true,
+ 305: true,
+ 307: true,
+ 308: true
+}
+
+// status codes for empty bodies
+status.empty = {
+ 204: true,
+ 205: true,
+ 304: true
+}
+
+// status codes for when you should retry the request
+status.retry = {
+ 502: true,
+ 503: true,
+ 504: true
+}
+
+/**
+ * Populate the statuses map for given codes.
+ * @private
+ */
+
+function populateStatusesMap (statuses, codes) {
+ var arr = []
+
+ Object.keys(codes).forEach(function forEachCode (code) {
+ var message = codes[code]
+ var status = Number(code)
+
+ // Populate properties
+ statuses[status] = message
+ statuses[message] = status
+ statuses[message.toLowerCase()] = status
+
+ // Add to array
+ arr.push(status)
+ })
+
+ return arr
+}
+
+/**
+ * Get the status code.
+ *
+ * Given a number, this will throw if it is not a known status
+ * code, otherwise the code will be returned. Given a string,
+ * the string will be parsed for a number and return the code
+ * if valid, otherwise will lookup the code assuming this is
+ * the status message.
+ *
+ * @param {string|number} code
+ * @returns {number}
+ * @public
+ */
+
+function status (code) {
+ if (typeof code === 'number') {
+ if (!status[code]) throw new Error('invalid status code: ' + code)
+ return code
+ }
+
+ if (typeof code !== 'string') {
+ throw new TypeError('code must be a number or string')
+ }
+
+ // '403'
+ var n = parseInt(code, 10)
+ if (!isNaN(n)) {
+ if (!status[n]) throw new Error('invalid status code: ' + n)
+ return n
+ }
+
+ n = status[code.toLowerCase()]
+ if (!n) throw new Error('invalid status message: "' + code + '"')
+ return n
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/package.json
new file mode 100644
index 0000000..f608474
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/node_modules/statuses/package.json
@@ -0,0 +1,104 @@
+{
+ "name": "statuses",
+ "description": "HTTP status utility",
+ "version": "1.3.1",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jshttp/statuses.git"
+ },
+ "license": "MIT",
+ "keywords": [
+ "http",
+ "status",
+ "code"
+ ],
+ "files": [
+ "HISTORY.md",
+ "index.js",
+ "codes.json",
+ "LICENSE"
+ ],
+ "devDependencies": {
+ "csv-parse": "1.1.7",
+ "eslint": "3.10.0",
+ "eslint-config-standard": "6.2.1",
+ "eslint-plugin-promise": "3.3.2",
+ "eslint-plugin-standard": "2.0.1",
+ "istanbul": "0.4.5",
+ "mocha": "1.21.5",
+ "stream-to-array": "2.3.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "build": "node scripts/build.js",
+ "fetch": "node scripts/fetch.js",
+ "lint": "eslint .",
+ "test": "mocha --reporter spec --check-leaks --bail test/",
+ "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "update": "npm run fetch && npm run build"
+ },
+ "gitHead": "28a619be77f5b4741e6578a5764c5b06ec6d4aea",
+ "bugs": {
+ "url": "https://github.com/jshttp/statuses/issues"
+ },
+ "homepage": "https://github.com/jshttp/statuses",
+ "_id": "statuses@1.3.1",
+ "_shasum": "faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e",
+ "_from": "statuses@>=1.3.1 <2.0.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "defunctzombie",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "mscdex",
+ "email": "mscdex@mscdex.net"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ }
+ ],
+ "dist": {
+ "shasum": "faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e",
+ "tarball": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/statuses-1.3.1.tgz_1478923281491_0.5574048184789717"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/package.json
new file mode 100644
index 0000000..44c1f98
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/http-errors/package.json
@@ -0,0 +1,96 @@
+{
+ "name": "http-errors",
+ "description": "Create HTTP error objects",
+ "version": "1.5.1",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Alan Plum",
+ "email": "me@pluma.io"
+ },
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jshttp/http-errors.git"
+ },
+ "dependencies": {
+ "inherits": "2.0.3",
+ "setprototypeof": "1.0.2",
+ "statuses": ">= 1.3.1 < 2"
+ },
+ "devDependencies": {
+ "eslint": "3.10.2",
+ "eslint-config-standard": "6.2.1",
+ "eslint-plugin-markdown": "1.0.0-beta.3",
+ "eslint-plugin-promise": "3.3.2",
+ "eslint-plugin-standard": "2.0.1",
+ "istanbul": "0.4.5",
+ "mocha": "1.21.5"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "lint": "eslint --plugin markdown --ext js,md .",
+ "test": "mocha --reporter spec --bail",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"
+ },
+ "keywords": [
+ "http",
+ "error"
+ ],
+ "files": [
+ "index.js",
+ "HISTORY.md",
+ "LICENSE",
+ "README.md"
+ ],
+ "gitHead": "a55db90c7a2c0bafedb4bfa35a85eee5f53a37e9",
+ "bugs": {
+ "url": "https://github.com/jshttp/http-errors/issues"
+ },
+ "homepage": "https://github.com/jshttp/http-errors",
+ "_id": "http-errors@1.5.1",
+ "_shasum": "788c0d2c1de2c81b9e6e8c01843b6b97eb920750",
+ "_from": "http-errors@>=1.5.0 <1.6.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "egeste",
+ "email": "npm@egeste.net"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "788c0d2c1de2c81b9e6e8c01843b6b97eb920750",
+ "tarball": "https://registry.npmjs.org/http-errors/-/http-errors-1.5.1.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-18-east.internal.npmjs.com",
+ "tmp": "tmp/http-errors-1.5.1.tgz_1479361411507_0.47469806275330484"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.5.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/.npmignore
new file mode 100644
index 0000000..5cd2673
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/.npmignore
@@ -0,0 +1,6 @@
+*~
+*sublime-*
+generation
+test
+wiki
+coverage
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/.travis.yml b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/.travis.yml
new file mode 100644
index 0000000..f5343f1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/.travis.yml
@@ -0,0 +1,20 @@
+ sudo: false
+ env:
+ - CXX=g++-4.8
+ language: node_js
+ node_js:
+ - "0.8"
+ - "0.10"
+ - "0.11"
+ - "0.12"
+ - "iojs"
+ - "4.0"
+ addons:
+ apt:
+ sources:
+ - ubuntu-toolchain-r-test
+ packages:
+ - gcc-4.8
+ - g++-4.8
+ before_install:
+ - "test $TRAVIS_NODE_VERSION != '0.8' || npm install -g npm@1.2.8000"
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/Changelog.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/Changelog.md
new file mode 100644
index 0000000..421b1e2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/Changelog.md
@@ -0,0 +1,93 @@
+
+# 0.4.13 / 2015-10-01
+
+ * Fix silly mistake in deprecation notice.
+
+
+# 0.4.12 / 2015-09-26
+
+ * Node v4 support:
+ * Added CESU-8 decoding (#106)
+ * Added deprecation notice for `extendNodeEncodings`
+ * Added Travis tests for Node v4 and io.js latest (#105 by @Mithgol)
+
+
+# 0.4.11 / 2015-07-03
+
+ * Added CESU-8 encoding.
+
+
+# 0.4.10 / 2015-05-26
+
+ * Changed UTF-16 endianness heuristic to take into account any ASCII chars, not
+ just spaces. This should minimize the importance of "default" endianness.
+
+
+# 0.4.9 / 2015-05-24
+
+ * Streamlined BOM handling: strip BOM by default, add BOM when encoding if
+ addBOM: true. Added docs to Readme.
+ * UTF16 now uses UTF16-LE by default.
+ * Fixed minor issue with big5 encoding.
+ * Added io.js testing on Travis; updated node-iconv version to test against.
+ Now we just skip testing SBCS encodings that node-iconv doesn't support.
+ * (internal refactoring) Updated codec interface to use classes.
+ * Use strict mode in all files.
+
+
+# 0.4.8 / 2015-04-14
+
+ * added alias UNICODE-1-1-UTF-7 for UTF-7 encoding (#94)
+
+
+# 0.4.7 / 2015-02-05
+
+ * stop official support of Node.js v0.8. Should still work, but no guarantees.
+ reason: Packages needed for testing are hard to get on Travis CI.
+ * work in environment where Object.prototype is monkey patched with enumerable
+ props (#89).
+
+
+# 0.4.6 / 2015-01-12
+
+ * fix rare aliases of single-byte encodings (thanks @mscdex)
+ * double the timeout for dbcs tests to make them less flaky on travis
+
+
+# 0.4.5 / 2014-11-20
+
+ * fix windows-31j and x-sjis encoding support (@nleush)
+ * minor fix: undefined variable reference when internal error happens
+
+
+# 0.4.4 / 2014-07-16
+
+ * added encodings UTF-7 (RFC2152) and UTF-7-IMAP (RFC3501 Section 5.1.3)
+ * fixed streaming base64 encoding
+
+
+# 0.4.3 / 2014-06-14
+
+ * added encodings UTF-16BE and UTF-16 with BOM
+
+
+# 0.4.2 / 2014-06-12
+
+ * don't throw exception if `extendNodeEncodings()` is called more than once
+
+
+# 0.4.1 / 2014-06-11
+
+ * codepage 808 added
+
+
+# 0.4.0 / 2014-06-10
+
+ * code is rewritten from scratch
+ * all widespread encodings are supported
+ * streaming interface added
+ * browserify compatibility added
+ * (optional) extend core primitive encodings to make usage even simpler
+ * moved from vows to mocha as the testing framework
+
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/LICENSE
new file mode 100644
index 0000000..d518d83
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/LICENSE
@@ -0,0 +1,21 @@
+Copyright (c) 2011 Alexander Shtuchkin
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/README.md
new file mode 100644
index 0000000..160b7cf
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/README.md
@@ -0,0 +1,157 @@
+## Pure JS character encoding conversion [![Build Status](https://travis-ci.org/ashtuchkin/iconv-lite.svg?branch=master)](https://travis-ci.org/ashtuchkin/iconv-lite)
+
+ * Doesn't need native code compilation. Works on Windows and in sandboxed environments like [Cloud9](http://c9.io).
+ * Used in popular projects like [Express.js (body_parser)](https://github.com/expressjs/body-parser),
+ [Grunt](http://gruntjs.com/), [Nodemailer](http://www.nodemailer.com/), [Yeoman](http://yeoman.io/) and others.
+ * Faster than [node-iconv](https://github.com/bnoordhuis/node-iconv) (see below for performance comparison).
+ * Intuitive encode/decode API
+ * Streaming support for Node v0.10+
+ * [Deprecated] Can extend Node.js primitives (buffers, streams) to support all iconv-lite encodings.
+ * In-browser usage via [Browserify](https://github.com/substack/node-browserify) (~180k gzip compressed with Buffer shim included).
+ * License: MIT.
+
+[![NPM Stats](https://nodei.co/npm/iconv-lite.png?downloads=true&downloadRank=true)](https://npmjs.org/packages/iconv-lite/)
+
+## Usage
+### Basic API
+```javascript
+var iconv = require('iconv-lite');
+
+// Convert from an encoded buffer to js string.
+str = iconv.decode(new Buffer([0x68, 0x65, 0x6c, 0x6c, 0x6f]), 'win1251');
+
+// Convert from js string to an encoded buffer.
+buf = iconv.encode("Sample input string", 'win1251');
+
+// Check if encoding is supported
+iconv.encodingExists("us-ascii")
+```
+
+### Streaming API (Node v0.10+)
+```javascript
+
+// Decode stream (from binary stream to js strings)
+http.createServer(function(req, res) {
+ var converterStream = iconv.decodeStream('win1251');
+ req.pipe(converterStream);
+
+ converterStream.on('data', function(str) {
+ console.log(str); // Do something with decoded strings, chunk-by-chunk.
+ });
+});
+
+// Convert encoding streaming example
+fs.createReadStream('file-in-win1251.txt')
+ .pipe(iconv.decodeStream('win1251'))
+ .pipe(iconv.encodeStream('ucs2'))
+ .pipe(fs.createWriteStream('file-in-ucs2.txt'));
+
+// Sugar: all encode/decode streams have .collect(cb) method to accumulate data.
+http.createServer(function(req, res) {
+ req.pipe(iconv.decodeStream('win1251')).collect(function(err, body) {
+ assert(typeof body == 'string');
+ console.log(body); // full request body string
+ });
+});
+```
+
+### [Deprecated] Extend Node.js own encodings
+> NOTE: This doesn't work on latest Node versions. See [details](https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility).
+
+```javascript
+// After this call all Node basic primitives will understand iconv-lite encodings.
+iconv.extendNodeEncodings();
+
+// Examples:
+buf = new Buffer(str, 'win1251');
+buf.write(str, 'gbk');
+str = buf.toString('latin1');
+assert(Buffer.isEncoding('iso-8859-15'));
+Buffer.byteLength(str, 'us-ascii');
+
+http.createServer(function(req, res) {
+ req.setEncoding('big5');
+ req.collect(function(err, body) {
+ console.log(body);
+ });
+});
+
+fs.createReadStream("file.txt", "shift_jis");
+
+// External modules are also supported (if they use Node primitives, which they probably do).
+request = require('request');
+request({
+ url: "http://github.com/",
+ encoding: "cp932"
+});
+
+// To remove extensions
+iconv.undoExtendNodeEncodings();
+```
+
+## Supported encodings
+
+ * All node.js native encodings: utf8, ucs2 / utf16-le, ascii, binary, base64, hex.
+ * Additional unicode encodings: utf16, utf16-be, utf-7, utf-7-imap.
+ * All widespread singlebyte encodings: Windows 125x family, ISO-8859 family,
+ IBM/DOS codepages, Macintosh family, KOI8 family, all others supported by iconv library.
+ Aliases like 'latin1', 'us-ascii' also supported.
+ * All widespread multibyte encodings: CP932, CP936, CP949, CP950, GB2313, GBK, GB18030, Big5, Shift_JIS, EUC-JP.
+
+See [all supported encodings on wiki](https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings).
+
+Most singlebyte encodings are generated automatically from [node-iconv](https://github.com/bnoordhuis/node-iconv). Thank you Ben Noordhuis and libiconv authors!
+
+Multibyte encodings are generated from [Unicode.org mappings](http://www.unicode.org/Public/MAPPINGS/) and [WHATWG Encoding Standard mappings](http://encoding.spec.whatwg.org/). Thank you, respective authors!
+
+
+## Encoding/decoding speed
+
+Comparison with node-iconv module (1000x256kb, on MacBook Pro, Core i5/2.6 GHz, Node v0.12.0).
+Note: your results may vary, so please always check on your hardware.
+
+ operation iconv@2.1.4 iconv-lite@0.4.7
+ ----------------------------------------------------------
+ encode('win1251') ~96 Mb/s ~320 Mb/s
+ decode('win1251') ~95 Mb/s ~246 Mb/s
+
+## BOM handling
+
+ * Decoding: BOM is stripped by default, unless overridden by passing `stripBOM: false` in options
+ (f.ex. `iconv.decode(buf, enc, {stripBOM: false})`).
+ A callback might also be given as a `stripBOM` parameter - it'll be called if BOM character was actually found.
+ * Encoding: No BOM added, unless overridden by `addBOM: true` option.
+
+## UTF-16 Encodings
+
+This library supports UTF-16LE, UTF-16BE and UTF-16 encodings. First two are straightforward, but UTF-16 is trying to be
+smart about endianness in the following ways:
+ * Decoding: uses BOM and 'spaces heuristic' to determine input endianness. Default is UTF-16LE, but can be
+ overridden with `defaultEncoding: 'utf-16be'` option. Strips BOM unless `stripBOM: false`.
+ * Encoding: uses UTF-16LE and writes BOM by default. Use `addBOM: false` to override.
+
+## Other notes
+
+When decoding, be sure to supply a Buffer to decode() method, otherwise [bad things usually happen](https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding).
+Untranslatable characters are set to � or ?. No transliteration is currently supported.
+Node versions 0.10.31 and 0.11.13 are buggy, don't use them (see #65, #77).
+
+## Testing
+
+```bash
+$ git clone git@github.com:ashtuchkin/iconv-lite.git
+$ cd iconv-lite
+$ npm install
+$ npm test
+
+$ # To view performance:
+$ node test/performance.js
+
+$ # To view test coverage:
+$ npm run coverage
+$ open coverage/lcov-report/index.html
+```
+
+## Adoption
+[![NPM](https://nodei.co/npm-dl/iconv-lite.png)](https://nodei.co/npm/iconv-lite/)
+[![Codeship Status for ashtuchkin/iconv-lite](https://www.codeship.io/projects/81670840-fa72-0131-4520-4a01a6c01acc/status)](https://www.codeship.io/projects/29053)
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-codec.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-codec.js
new file mode 100644
index 0000000..366809e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-codec.js
@@ -0,0 +1,554 @@
+"use strict"
+
+// Multibyte codec. In this scheme, a character is represented by 1 or more bytes.
+// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences.
+// To save memory and loading time, we read table files only when requested.
+
+exports._dbcs = DBCSCodec;
+
+var UNASSIGNED = -1,
+ GB18030_CODE = -2,
+ SEQ_START = -10,
+ NODE_START = -1000,
+ UNASSIGNED_NODE = new Array(0x100),
+ DEF_CHAR = -1;
+
+for (var i = 0; i < 0x100; i++)
+ UNASSIGNED_NODE[i] = UNASSIGNED;
+
+
+// Class DBCSCodec reads and initializes mapping tables.
+function DBCSCodec(codecOptions, iconv) {
+ this.encodingName = codecOptions.encodingName;
+ if (!codecOptions)
+ throw new Error("DBCS codec is called without the data.")
+ if (!codecOptions.table)
+ throw new Error("Encoding '" + this.encodingName + "' has no data.");
+
+ // Load tables.
+ var mappingTable = codecOptions.table();
+
+
+ // Decode tables: MBCS -> Unicode.
+
+ // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256.
+ // Trie root is decodeTables[0].
+ // Values: >= 0 -> unicode character code. can be > 0xFFFF
+ // == UNASSIGNED -> unknown/unassigned sequence.
+ // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence.
+ // <= NODE_START -> index of the next node in our trie to process next byte.
+ // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq.
+ this.decodeTables = [];
+ this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node.
+
+ // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here.
+ this.decodeTableSeq = [];
+
+ // Actual mapping tables consist of chunks. Use them to fill up decode tables.
+ for (var i = 0; i < mappingTable.length; i++)
+ this._addDecodeChunk(mappingTable[i]);
+
+ this.defaultCharUnicode = iconv.defaultCharUnicode;
+
+
+ // Encode tables: Unicode -> DBCS.
+
+ // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance.
+ // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null.
+ // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.).
+ // == UNASSIGNED -> no conversion found. Output a default char.
+ // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence.
+ this.encodeTable = [];
+
+ // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of
+ // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key
+ // means end of sequence (needed when one sequence is a strict subsequence of another).
+ // Objects are kept separately from encodeTable to increase performance.
+ this.encodeTableSeq = [];
+
+ // Some chars can be decoded, but need not be encoded.
+ var skipEncodeChars = {};
+ if (codecOptions.encodeSkipVals)
+ for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) {
+ var val = codecOptions.encodeSkipVals[i];
+ if (typeof val === 'number')
+ skipEncodeChars[val] = true;
+ else
+ for (var j = val.from; j <= val.to; j++)
+ skipEncodeChars[j] = true;
+ }
+
+ // Use decode trie to recursively fill out encode tables.
+ this._fillEncodeTable(0, 0, skipEncodeChars);
+
+ // Add more encoding pairs when needed.
+ if (codecOptions.encodeAdd) {
+ for (var uChar in codecOptions.encodeAdd)
+ if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar))
+ this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]);
+ }
+
+ this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)];
+ if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?'];
+ if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0);
+
+
+ // Load & create GB18030 tables when needed.
+ if (typeof codecOptions.gb18030 === 'function') {
+ this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges.
+
+ // Add GB18030 decode tables.
+ var thirdByteNodeIdx = this.decodeTables.length;
+ var thirdByteNode = this.decodeTables[thirdByteNodeIdx] = UNASSIGNED_NODE.slice(0);
+
+ var fourthByteNodeIdx = this.decodeTables.length;
+ var fourthByteNode = this.decodeTables[fourthByteNodeIdx] = UNASSIGNED_NODE.slice(0);
+
+ for (var i = 0x81; i <= 0xFE; i++) {
+ var secondByteNodeIdx = NODE_START - this.decodeTables[0][i];
+ var secondByteNode = this.decodeTables[secondByteNodeIdx];
+ for (var j = 0x30; j <= 0x39; j++)
+ secondByteNode[j] = NODE_START - thirdByteNodeIdx;
+ }
+ for (var i = 0x81; i <= 0xFE; i++)
+ thirdByteNode[i] = NODE_START - fourthByteNodeIdx;
+ for (var i = 0x30; i <= 0x39; i++)
+ fourthByteNode[i] = GB18030_CODE
+ }
+}
+
+DBCSCodec.prototype.encoder = DBCSEncoder;
+DBCSCodec.prototype.decoder = DBCSDecoder;
+
+// Decoder helpers
+DBCSCodec.prototype._getDecodeTrieNode = function(addr) {
+ var bytes = [];
+ for (; addr > 0; addr >>= 8)
+ bytes.push(addr & 0xFF);
+ if (bytes.length == 0)
+ bytes.push(0);
+
+ var node = this.decodeTables[0];
+ for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie.
+ var val = node[bytes[i]];
+
+ if (val == UNASSIGNED) { // Create new node.
+ node[bytes[i]] = NODE_START - this.decodeTables.length;
+ this.decodeTables.push(node = UNASSIGNED_NODE.slice(0));
+ }
+ else if (val <= NODE_START) { // Existing node.
+ node = this.decodeTables[NODE_START - val];
+ }
+ else
+ throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16));
+ }
+ return node;
+}
+
+
+DBCSCodec.prototype._addDecodeChunk = function(chunk) {
+ // First element of chunk is the hex mbcs code where we start.
+ var curAddr = parseInt(chunk[0], 16);
+
+ // Choose the decoding node where we'll write our chars.
+ var writeTable = this._getDecodeTrieNode(curAddr);
+ curAddr = curAddr & 0xFF;
+
+ // Write all other elements of the chunk to the table.
+ for (var k = 1; k < chunk.length; k++) {
+ var part = chunk[k];
+ if (typeof part === "string") { // String, write as-is.
+ for (var l = 0; l < part.length;) {
+ var code = part.charCodeAt(l++);
+ if (0xD800 <= code && code < 0xDC00) { // Decode surrogate
+ var codeTrail = part.charCodeAt(l++);
+ if (0xDC00 <= codeTrail && codeTrail < 0xE000)
+ writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00);
+ else
+ throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]);
+ }
+ else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used)
+ var len = 0xFFF - code + 2;
+ var seq = [];
+ for (var m = 0; m < len; m++)
+ seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq.
+
+ writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length;
+ this.decodeTableSeq.push(seq);
+ }
+ else
+ writeTable[curAddr++] = code; // Basic char
+ }
+ }
+ else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character.
+ var charCode = writeTable[curAddr - 1] + 1;
+ for (var l = 0; l < part; l++)
+ writeTable[curAddr++] = charCode++;
+ }
+ else
+ throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]);
+ }
+ if (curAddr > 0xFF)
+ throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr);
+}
+
+// Encoder helpers
+DBCSCodec.prototype._getEncodeBucket = function(uCode) {
+ var high = uCode >> 8; // This could be > 0xFF because of astral characters.
+ if (this.encodeTable[high] === undefined)
+ this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand.
+ return this.encodeTable[high];
+}
+
+DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) {
+ var bucket = this._getEncodeBucket(uCode);
+ var low = uCode & 0xFF;
+ if (bucket[low] <= SEQ_START)
+ this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it.
+ else if (bucket[low] == UNASSIGNED)
+ bucket[low] = dbcsCode;
+}
+
+DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) {
+
+ // Get the root of character tree according to first character of the sequence.
+ var uCode = seq[0];
+ var bucket = this._getEncodeBucket(uCode);
+ var low = uCode & 0xFF;
+
+ var node;
+ if (bucket[low] <= SEQ_START) {
+ // There's already a sequence with - use it.
+ node = this.encodeTableSeq[SEQ_START-bucket[low]];
+ }
+ else {
+ // There was no sequence object - allocate a new one.
+ node = {};
+ if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence.
+ bucket[low] = SEQ_START - this.encodeTableSeq.length;
+ this.encodeTableSeq.push(node);
+ }
+
+ // Traverse the character tree, allocating new nodes as needed.
+ for (var j = 1; j < seq.length-1; j++) {
+ var oldVal = node[uCode];
+ if (typeof oldVal === 'object')
+ node = oldVal;
+ else {
+ node = node[uCode] = {}
+ if (oldVal !== undefined)
+ node[DEF_CHAR] = oldVal
+ }
+ }
+
+ // Set the leaf to given dbcsCode.
+ uCode = seq[seq.length-1];
+ node[uCode] = dbcsCode;
+}
+
+DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) {
+ var node = this.decodeTables[nodeIdx];
+ for (var i = 0; i < 0x100; i++) {
+ var uCode = node[i];
+ var mbCode = prefix + i;
+ if (skipEncodeChars[mbCode])
+ continue;
+
+ if (uCode >= 0)
+ this._setEncodeChar(uCode, mbCode);
+ else if (uCode <= NODE_START)
+ this._fillEncodeTable(NODE_START - uCode, mbCode << 8, skipEncodeChars);
+ else if (uCode <= SEQ_START)
+ this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode);
+ }
+}
+
+
+
+// == Encoder ==================================================================
+
+function DBCSEncoder(options, codec) {
+ // Encoder state
+ this.leadSurrogate = -1;
+ this.seqObj = undefined;
+
+ // Static data
+ this.encodeTable = codec.encodeTable;
+ this.encodeTableSeq = codec.encodeTableSeq;
+ this.defaultCharSingleByte = codec.defCharSB;
+ this.gb18030 = codec.gb18030;
+}
+
+DBCSEncoder.prototype.write = function(str) {
+ var newBuf = new Buffer(str.length * (this.gb18030 ? 4 : 3)),
+ leadSurrogate = this.leadSurrogate,
+ seqObj = this.seqObj, nextChar = -1,
+ i = 0, j = 0;
+
+ while (true) {
+ // 0. Get next character.
+ if (nextChar === -1) {
+ if (i == str.length) break;
+ var uCode = str.charCodeAt(i++);
+ }
+ else {
+ var uCode = nextChar;
+ nextChar = -1;
+ }
+
+ // 1. Handle surrogates.
+ if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates.
+ if (uCode < 0xDC00) { // We've got lead surrogate.
+ if (leadSurrogate === -1) {
+ leadSurrogate = uCode;
+ continue;
+ } else {
+ leadSurrogate = uCode;
+ // Double lead surrogate found.
+ uCode = UNASSIGNED;
+ }
+ } else { // We've got trail surrogate.
+ if (leadSurrogate !== -1) {
+ uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00);
+ leadSurrogate = -1;
+ } else {
+ // Incomplete surrogate pair - only trail surrogate found.
+ uCode = UNASSIGNED;
+ }
+
+ }
+ }
+ else if (leadSurrogate !== -1) {
+ // Incomplete surrogate pair - only lead surrogate found.
+ nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char.
+ leadSurrogate = -1;
+ }
+
+ // 2. Convert uCode character.
+ var dbcsCode = UNASSIGNED;
+ if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence
+ var resCode = seqObj[uCode];
+ if (typeof resCode === 'object') { // Sequence continues.
+ seqObj = resCode;
+ continue;
+
+ } else if (typeof resCode == 'number') { // Sequence finished. Write it.
+ dbcsCode = resCode;
+
+ } else if (resCode == undefined) { // Current character is not part of the sequence.
+
+ // Try default character for this sequence
+ resCode = seqObj[DEF_CHAR];
+ if (resCode !== undefined) {
+ dbcsCode = resCode; // Found. Write it.
+ nextChar = uCode; // Current character will be written too in the next iteration.
+
+ } else {
+ // TODO: What if we have no default? (resCode == undefined)
+ // Then, we should write first char of the sequence as-is and try the rest recursively.
+ // Didn't do it for now because no encoding has this situation yet.
+ // Currently, just skip the sequence and write current char.
+ }
+ }
+ seqObj = undefined;
+ }
+ else if (uCode >= 0) { // Regular character
+ var subtable = this.encodeTable[uCode >> 8];
+ if (subtable !== undefined)
+ dbcsCode = subtable[uCode & 0xFF];
+
+ if (dbcsCode <= SEQ_START) { // Sequence start
+ seqObj = this.encodeTableSeq[SEQ_START-dbcsCode];
+ continue;
+ }
+
+ if (dbcsCode == UNASSIGNED && this.gb18030) {
+ // Use GB18030 algorithm to find character(s) to write.
+ var idx = findIdx(this.gb18030.uChars, uCode);
+ if (idx != -1) {
+ var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]);
+ newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600;
+ newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260;
+ newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10;
+ newBuf[j++] = 0x30 + dbcsCode;
+ continue;
+ }
+ }
+ }
+
+ // 3. Write dbcsCode character.
+ if (dbcsCode === UNASSIGNED)
+ dbcsCode = this.defaultCharSingleByte;
+
+ if (dbcsCode < 0x100) {
+ newBuf[j++] = dbcsCode;
+ }
+ else if (dbcsCode < 0x10000) {
+ newBuf[j++] = dbcsCode >> 8; // high byte
+ newBuf[j++] = dbcsCode & 0xFF; // low byte
+ }
+ else {
+ newBuf[j++] = dbcsCode >> 16;
+ newBuf[j++] = (dbcsCode >> 8) & 0xFF;
+ newBuf[j++] = dbcsCode & 0xFF;
+ }
+ }
+
+ this.seqObj = seqObj;
+ this.leadSurrogate = leadSurrogate;
+ return newBuf.slice(0, j);
+}
+
+DBCSEncoder.prototype.end = function() {
+ if (this.leadSurrogate === -1 && this.seqObj === undefined)
+ return; // All clean. Most often case.
+
+ var newBuf = new Buffer(10), j = 0;
+
+ if (this.seqObj) { // We're in the sequence.
+ var dbcsCode = this.seqObj[DEF_CHAR];
+ if (dbcsCode !== undefined) { // Write beginning of the sequence.
+ if (dbcsCode < 0x100) {
+ newBuf[j++] = dbcsCode;
+ }
+ else {
+ newBuf[j++] = dbcsCode >> 8; // high byte
+ newBuf[j++] = dbcsCode & 0xFF; // low byte
+ }
+ } else {
+ // See todo above.
+ }
+ this.seqObj = undefined;
+ }
+
+ if (this.leadSurrogate !== -1) {
+ // Incomplete surrogate pair - only lead surrogate found.
+ newBuf[j++] = this.defaultCharSingleByte;
+ this.leadSurrogate = -1;
+ }
+
+ return newBuf.slice(0, j);
+}
+
+// Export for testing
+DBCSEncoder.prototype.findIdx = findIdx;
+
+
+// == Decoder ==================================================================
+
+function DBCSDecoder(options, codec) {
+ // Decoder state
+ this.nodeIdx = 0;
+ this.prevBuf = new Buffer(0);
+
+ // Static data
+ this.decodeTables = codec.decodeTables;
+ this.decodeTableSeq = codec.decodeTableSeq;
+ this.defaultCharUnicode = codec.defaultCharUnicode;
+ this.gb18030 = codec.gb18030;
+}
+
+DBCSDecoder.prototype.write = function(buf) {
+ var newBuf = new Buffer(buf.length*2),
+ nodeIdx = this.nodeIdx,
+ prevBuf = this.prevBuf, prevBufOffset = this.prevBuf.length,
+ seqStart = -this.prevBuf.length, // idx of the start of current parsed sequence.
+ uCode;
+
+ if (prevBufOffset > 0) // Make prev buf overlap a little to make it easier to slice later.
+ prevBuf = Buffer.concat([prevBuf, buf.slice(0, 10)]);
+
+ for (var i = 0, j = 0; i < buf.length; i++) {
+ var curByte = (i >= 0) ? buf[i] : prevBuf[i + prevBufOffset];
+
+ // Lookup in current trie node.
+ var uCode = this.decodeTables[nodeIdx][curByte];
+
+ if (uCode >= 0) {
+ // Normal character, just use it.
+ }
+ else if (uCode === UNASSIGNED) { // Unknown char.
+ // TODO: Callback with seq.
+ //var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset);
+ i = seqStart; // Try to parse again, after skipping first byte of the sequence ('i' will be incremented by 'for' cycle).
+ uCode = this.defaultCharUnicode.charCodeAt(0);
+ }
+ else if (uCode === GB18030_CODE) {
+ var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset);
+ var ptr = (curSeq[0]-0x81)*12600 + (curSeq[1]-0x30)*1260 + (curSeq[2]-0x81)*10 + (curSeq[3]-0x30);
+ var idx = findIdx(this.gb18030.gbChars, ptr);
+ uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx];
+ }
+ else if (uCode <= NODE_START) { // Go to next trie node.
+ nodeIdx = NODE_START - uCode;
+ continue;
+ }
+ else if (uCode <= SEQ_START) { // Output a sequence of chars.
+ var seq = this.decodeTableSeq[SEQ_START - uCode];
+ for (var k = 0; k < seq.length - 1; k++) {
+ uCode = seq[k];
+ newBuf[j++] = uCode & 0xFF;
+ newBuf[j++] = uCode >> 8;
+ }
+ uCode = seq[seq.length-1];
+ }
+ else
+ throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte);
+
+ // Write the character to buffer, handling higher planes using surrogate pair.
+ if (uCode > 0xFFFF) {
+ uCode -= 0x10000;
+ var uCodeLead = 0xD800 + Math.floor(uCode / 0x400);
+ newBuf[j++] = uCodeLead & 0xFF;
+ newBuf[j++] = uCodeLead >> 8;
+
+ uCode = 0xDC00 + uCode % 0x400;
+ }
+ newBuf[j++] = uCode & 0xFF;
+ newBuf[j++] = uCode >> 8;
+
+ // Reset trie node.
+ nodeIdx = 0; seqStart = i+1;
+ }
+
+ this.nodeIdx = nodeIdx;
+ this.prevBuf = (seqStart >= 0) ? buf.slice(seqStart) : prevBuf.slice(seqStart + prevBufOffset);
+ return newBuf.slice(0, j).toString('ucs2');
+}
+
+DBCSDecoder.prototype.end = function() {
+ var ret = '';
+
+ // Try to parse all remaining chars.
+ while (this.prevBuf.length > 0) {
+ // Skip 1 character in the buffer.
+ ret += this.defaultCharUnicode;
+ var buf = this.prevBuf.slice(1);
+
+ // Parse remaining as usual.
+ this.prevBuf = new Buffer(0);
+ this.nodeIdx = 0;
+ if (buf.length > 0)
+ ret += this.write(buf);
+ }
+
+ this.nodeIdx = 0;
+ return ret;
+}
+
+// Binary search for GB18030. Returns largest i such that table[i] <= val.
+function findIdx(table, val) {
+ if (table[0] > val)
+ return -1;
+
+ var l = 0, r = table.length;
+ while (l < r-1) { // always table[l] <= val < table[r]
+ var mid = l + Math.floor((r-l+1)/2);
+ if (table[mid] <= val)
+ l = mid;
+ else
+ r = mid;
+ }
+ return l;
+}
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-data.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-data.js
new file mode 100644
index 0000000..2bf7415
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-data.js
@@ -0,0 +1,170 @@
+"use strict"
+
+// Description of supported double byte encodings and aliases.
+// Tables are not require()-d until they are needed to speed up library load.
+// require()-s are direct to support Browserify.
+
+module.exports = {
+
+ // == Japanese/ShiftJIS ====================================================
+ // All japanese encodings are based on JIS X set of standards:
+ // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF.
+ // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes.
+ // Has several variations in 1978, 1983, 1990 and 1997.
+ // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead.
+ // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233.
+ // 2 planes, first is superset of 0208, second - revised 0212.
+ // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx)
+
+ // Byte encodings are:
+ // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte
+ // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC.
+ // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI.
+ // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes.
+ // 0x00-0x7F - lower part of 0201
+ // 0x8E, 0xA1-0xDF - upper part of 0201
+ // (0xA1-0xFE)x2 - 0208 plane (94x94).
+ // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94).
+ // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon.
+ // Used as-is in ISO2022 family.
+ // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII,
+ // 0201-1976 Roman, 0208-1978, 0208-1983.
+ // * ISO2022-JP-1: Adds esc seq for 0212-1990.
+ // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7.
+ // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2.
+ // * ISO2022-JP-2004: Adds 0213-2004 Plane 1.
+ //
+ // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes.
+ //
+ // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html
+
+
+ 'shiftjis': {
+ type: '_dbcs',
+ table: function() { return require('./tables/shiftjis.json') },
+ encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E},
+ encodeSkipVals: [{from: 0xED40, to: 0xF940}],
+ },
+ 'csshiftjis': 'shiftjis',
+ 'mskanji': 'shiftjis',
+ 'sjis': 'shiftjis',
+ 'windows31j': 'shiftjis',
+ 'xsjis': 'shiftjis',
+ 'windows932': 'shiftjis',
+ '932': 'shiftjis',
+ 'cp932': 'shiftjis',
+
+ 'eucjp': {
+ type: '_dbcs',
+ table: function() { return require('./tables/eucjp.json') },
+ encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E},
+ },
+
+ // TODO: KDDI extension to Shift_JIS
+ // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes.
+ // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars.
+
+ // == Chinese/GBK ==========================================================
+ // http://en.wikipedia.org/wiki/GBK
+
+ // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936
+ 'gb2312': 'cp936',
+ 'gb231280': 'cp936',
+ 'gb23121980': 'cp936',
+ 'csgb2312': 'cp936',
+ 'csiso58gb231280': 'cp936',
+ 'euccn': 'cp936',
+ 'isoir58': 'gbk',
+
+ // Microsoft's CP936 is a subset and approximation of GBK.
+ // TODO: Euro = 0x80 in cp936, but not in GBK (where it's valid but undefined)
+ 'windows936': 'cp936',
+ '936': 'cp936',
+ 'cp936': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp936.json') },
+ },
+
+ // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other.
+ 'gbk': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) },
+ },
+ 'xgbk': 'gbk',
+
+ // GB18030 is an algorithmic extension of GBK.
+ 'gb18030': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) },
+ gb18030: function() { return require('./tables/gb18030-ranges.json') },
+ },
+
+ 'chinese': 'gb18030',
+
+ // TODO: Support GB18030 (~27000 chars + whole unicode mapping, cp54936)
+ // http://icu-project.org/docs/papers/gb18030.html
+ // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml
+ // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0
+
+ // == Korean ===============================================================
+ // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same.
+ 'windows949': 'cp949',
+ '949': 'cp949',
+ 'cp949': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp949.json') },
+ },
+
+ 'cseuckr': 'cp949',
+ 'csksc56011987': 'cp949',
+ 'euckr': 'cp949',
+ 'isoir149': 'cp949',
+ 'korean': 'cp949',
+ 'ksc56011987': 'cp949',
+ 'ksc56011989': 'cp949',
+ 'ksc5601': 'cp949',
+
+
+ // == Big5/Taiwan/Hong Kong ================================================
+ // There are lots of tables for Big5 and cp950. Please see the following links for history:
+ // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html
+ // Variations, in roughly number of defined chars:
+ // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT
+ // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/
+ // * Big5-2003 (Taiwan standard) almost superset of cp950.
+ // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers.
+ // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard.
+ // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years.
+ // Plus, it has 4 combining sequences.
+ // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299
+ // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way.
+ // Implementations are not consistent within browsers; sometimes labeled as just big5.
+ // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied.
+ // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31
+ // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s.
+ // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt
+ // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt
+ //
+ // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder
+ // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong.
+
+ 'windows950': 'cp950',
+ '950': 'cp950',
+ 'cp950': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp950.json') },
+ },
+
+ // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus.
+ 'big5': 'big5hkscs',
+ 'big5hkscs': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp950.json').concat(require('./tables/big5-added.json')) },
+ encodeSkipVals: [0xa2cc],
+ },
+
+ 'cnbig5': 'big5hkscs',
+ 'csbig5': 'big5hkscs',
+ 'xxbig5': 'big5hkscs',
+
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/index.js
new file mode 100644
index 0000000..f7892fa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/index.js
@@ -0,0 +1,22 @@
+"use strict"
+
+// Update this array if you add/rename/remove files in this directory.
+// We support Browserify by skipping automatic module discovery and requiring modules directly.
+var modules = [
+ require("./internal"),
+ require("./utf16"),
+ require("./utf7"),
+ require("./sbcs-codec"),
+ require("./sbcs-data"),
+ require("./sbcs-data-generated"),
+ require("./dbcs-codec"),
+ require("./dbcs-data"),
+];
+
+// Put all encoding/alias/codec definitions to single object and export it.
+for (var i = 0; i < modules.length; i++) {
+ var module = modules[i];
+ for (var enc in module)
+ if (Object.prototype.hasOwnProperty.call(module, enc))
+ exports[enc] = module[enc];
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/internal.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/internal.js
new file mode 100644
index 0000000..a8ae512
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/internal.js
@@ -0,0 +1,187 @@
+"use strict"
+
+// Export Node.js internal encodings.
+
+module.exports = {
+ // Encodings
+ utf8: { type: "_internal", bomAware: true},
+ cesu8: { type: "_internal", bomAware: true},
+ unicode11utf8: "utf8",
+
+ ucs2: { type: "_internal", bomAware: true},
+ utf16le: "ucs2",
+
+ binary: { type: "_internal" },
+ base64: { type: "_internal" },
+ hex: { type: "_internal" },
+
+ // Codec.
+ _internal: InternalCodec,
+};
+
+//------------------------------------------------------------------------------
+
+function InternalCodec(codecOptions, iconv) {
+ this.enc = codecOptions.encodingName;
+ this.bomAware = codecOptions.bomAware;
+
+ if (this.enc === "base64")
+ this.encoder = InternalEncoderBase64;
+ else if (this.enc === "cesu8") {
+ this.enc = "utf8"; // Use utf8 for decoding.
+ this.encoder = InternalEncoderCesu8;
+
+ // Add decoder for versions of Node not supporting CESU-8
+ if (new Buffer("eda080", 'hex').toString().length == 3) {
+ this.decoder = InternalDecoderCesu8;
+ this.defaultCharUnicode = iconv.defaultCharUnicode;
+ }
+ }
+}
+
+InternalCodec.prototype.encoder = InternalEncoder;
+InternalCodec.prototype.decoder = InternalDecoder;
+
+//------------------------------------------------------------------------------
+
+// We use node.js internal decoder. Its signature is the same as ours.
+var StringDecoder = require('string_decoder').StringDecoder;
+
+if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method.
+ StringDecoder.prototype.end = function() {};
+
+
+function InternalDecoder(options, codec) {
+ StringDecoder.call(this, codec.enc);
+}
+
+InternalDecoder.prototype = StringDecoder.prototype;
+
+
+//------------------------------------------------------------------------------
+// Encoder is mostly trivial
+
+function InternalEncoder(options, codec) {
+ this.enc = codec.enc;
+}
+
+InternalEncoder.prototype.write = function(str) {
+ return new Buffer(str, this.enc);
+}
+
+InternalEncoder.prototype.end = function() {
+}
+
+
+//------------------------------------------------------------------------------
+// Except base64 encoder, which must keep its state.
+
+function InternalEncoderBase64(options, codec) {
+ this.prevStr = '';
+}
+
+InternalEncoderBase64.prototype.write = function(str) {
+ str = this.prevStr + str;
+ var completeQuads = str.length - (str.length % 4);
+ this.prevStr = str.slice(completeQuads);
+ str = str.slice(0, completeQuads);
+
+ return new Buffer(str, "base64");
+}
+
+InternalEncoderBase64.prototype.end = function() {
+ return new Buffer(this.prevStr, "base64");
+}
+
+
+//------------------------------------------------------------------------------
+// CESU-8 encoder is also special.
+
+function InternalEncoderCesu8(options, codec) {
+}
+
+InternalEncoderCesu8.prototype.write = function(str) {
+ var buf = new Buffer(str.length * 3), bufIdx = 0;
+ for (var i = 0; i < str.length; i++) {
+ var charCode = str.charCodeAt(i);
+ // Naive implementation, but it works because CESU-8 is especially easy
+ // to convert from UTF-16 (which all JS strings are encoded in).
+ if (charCode < 0x80)
+ buf[bufIdx++] = charCode;
+ else if (charCode < 0x800) {
+ buf[bufIdx++] = 0xC0 + (charCode >>> 6);
+ buf[bufIdx++] = 0x80 + (charCode & 0x3f);
+ }
+ else { // charCode will always be < 0x10000 in javascript.
+ buf[bufIdx++] = 0xE0 + (charCode >>> 12);
+ buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f);
+ buf[bufIdx++] = 0x80 + (charCode & 0x3f);
+ }
+ }
+ return buf.slice(0, bufIdx);
+}
+
+InternalEncoderCesu8.prototype.end = function() {
+}
+
+//------------------------------------------------------------------------------
+// CESU-8 decoder is not implemented in Node v4.0+
+
+function InternalDecoderCesu8(options, codec) {
+ this.acc = 0;
+ this.contBytes = 0;
+ this.accBytes = 0;
+ this.defaultCharUnicode = codec.defaultCharUnicode;
+}
+
+InternalDecoderCesu8.prototype.write = function(buf) {
+ var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes,
+ res = '';
+ for (var i = 0; i < buf.length; i++) {
+ var curByte = buf[i];
+ if ((curByte & 0xC0) !== 0x80) { // Leading byte
+ if (contBytes > 0) { // Previous code is invalid
+ res += this.defaultCharUnicode;
+ contBytes = 0;
+ }
+
+ if (curByte < 0x80) { // Single-byte code
+ res += String.fromCharCode(curByte);
+ } else if (curByte < 0xE0) { // Two-byte code
+ acc = curByte & 0x1F;
+ contBytes = 1; accBytes = 1;
+ } else if (curByte < 0xF0) { // Three-byte code
+ acc = curByte & 0x0F;
+ contBytes = 2; accBytes = 1;
+ } else { // Four or more are not supported for CESU-8.
+ res += this.defaultCharUnicode;
+ }
+ } else { // Continuation byte
+ if (contBytes > 0) { // We're waiting for it.
+ acc = (acc << 6) | (curByte & 0x3f);
+ contBytes--; accBytes++;
+ if (contBytes === 0) {
+ // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80)
+ if (accBytes === 2 && acc < 0x80 && acc > 0)
+ res += this.defaultCharUnicode;
+ else if (accBytes === 3 && acc < 0x800)
+ res += this.defaultCharUnicode;
+ else
+ // Actually add character.
+ res += String.fromCharCode(acc);
+ }
+ } else { // Unexpected continuation byte
+ res += this.defaultCharUnicode;
+ }
+ }
+ }
+ this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes;
+ return res;
+}
+
+InternalDecoderCesu8.prototype.end = function() {
+ var res = 0;
+ if (this.contBytes > 0)
+ res += this.defaultCharUnicode;
+ return res;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-codec.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-codec.js
new file mode 100644
index 0000000..ca00171
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-codec.js
@@ -0,0 +1,72 @@
+"use strict"
+
+// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that
+// correspond to encoded bytes (if 128 - then lower half is ASCII).
+
+exports._sbcs = SBCSCodec;
+function SBCSCodec(codecOptions, iconv) {
+ if (!codecOptions)
+ throw new Error("SBCS codec is called without the data.")
+
+ // Prepare char buffer for decoding.
+ if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256))
+ throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)");
+
+ if (codecOptions.chars.length === 128) {
+ var asciiString = "";
+ for (var i = 0; i < 128; i++)
+ asciiString += String.fromCharCode(i);
+ codecOptions.chars = asciiString + codecOptions.chars;
+ }
+
+ this.decodeBuf = new Buffer(codecOptions.chars, 'ucs2');
+
+ // Encoding buffer.
+ var encodeBuf = new Buffer(65536);
+ encodeBuf.fill(iconv.defaultCharSingleByte.charCodeAt(0));
+
+ for (var i = 0; i < codecOptions.chars.length; i++)
+ encodeBuf[codecOptions.chars.charCodeAt(i)] = i;
+
+ this.encodeBuf = encodeBuf;
+}
+
+SBCSCodec.prototype.encoder = SBCSEncoder;
+SBCSCodec.prototype.decoder = SBCSDecoder;
+
+
+function SBCSEncoder(options, codec) {
+ this.encodeBuf = codec.encodeBuf;
+}
+
+SBCSEncoder.prototype.write = function(str) {
+ var buf = new Buffer(str.length);
+ for (var i = 0; i < str.length; i++)
+ buf[i] = this.encodeBuf[str.charCodeAt(i)];
+
+ return buf;
+}
+
+SBCSEncoder.prototype.end = function() {
+}
+
+
+function SBCSDecoder(options, codec) {
+ this.decodeBuf = codec.decodeBuf;
+}
+
+SBCSDecoder.prototype.write = function(buf) {
+ // Strings are immutable in JS -> we use ucs2 buffer to speed up computations.
+ var decodeBuf = this.decodeBuf;
+ var newBuf = new Buffer(buf.length*2);
+ var idx1 = 0, idx2 = 0;
+ for (var i = 0; i < buf.length; i++) {
+ idx1 = buf[i]*2; idx2 = i*2;
+ newBuf[idx2] = decodeBuf[idx1];
+ newBuf[idx2+1] = decodeBuf[idx1+1];
+ }
+ return newBuf.toString('ucs2');
+}
+
+SBCSDecoder.prototype.end = function() {
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-data-generated.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-data-generated.js
new file mode 100644
index 0000000..2308c91
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-data-generated.js
@@ -0,0 +1,451 @@
+"use strict"
+
+// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script.
+module.exports = {
+ "437": "cp437",
+ "737": "cp737",
+ "775": "cp775",
+ "850": "cp850",
+ "852": "cp852",
+ "855": "cp855",
+ "856": "cp856",
+ "857": "cp857",
+ "858": "cp858",
+ "860": "cp860",
+ "861": "cp861",
+ "862": "cp862",
+ "863": "cp863",
+ "864": "cp864",
+ "865": "cp865",
+ "866": "cp866",
+ "869": "cp869",
+ "874": "windows874",
+ "922": "cp922",
+ "1046": "cp1046",
+ "1124": "cp1124",
+ "1125": "cp1125",
+ "1129": "cp1129",
+ "1133": "cp1133",
+ "1161": "cp1161",
+ "1162": "cp1162",
+ "1163": "cp1163",
+ "1250": "windows1250",
+ "1251": "windows1251",
+ "1252": "windows1252",
+ "1253": "windows1253",
+ "1254": "windows1254",
+ "1255": "windows1255",
+ "1256": "windows1256",
+ "1257": "windows1257",
+ "1258": "windows1258",
+ "28591": "iso88591",
+ "28592": "iso88592",
+ "28593": "iso88593",
+ "28594": "iso88594",
+ "28595": "iso88595",
+ "28596": "iso88596",
+ "28597": "iso88597",
+ "28598": "iso88598",
+ "28599": "iso88599",
+ "28600": "iso885910",
+ "28601": "iso885911",
+ "28603": "iso885913",
+ "28604": "iso885914",
+ "28605": "iso885915",
+ "28606": "iso885916",
+ "windows874": {
+ "type": "_sbcs",
+ "chars": "€����…�����������‘’“â€â€¢â€“—�������� à¸à¸‚ฃคฅฆงจฉชซฌà¸à¸Žà¸à¸à¸‘ฒณดตถทธนบปผà¸à¸žà¸Ÿà¸ à¸¡à¸¢à¸£à¸¤à¸¥à¸¦à¸§à¸¨à¸©à¸ªà¸«à¸¬à¸­à¸®à¸¯à¸°à¸±à¸²à¸³à¸´à¸µà¸¶à¸·à¸¸à¸¹à¸ºï¿½ï¿½ï¿½ï¿½à¸¿à¹€à¹à¹‚ใไๅๆ็่้๊๋์à¹à¹Žà¹à¹à¹‘๒๓๔๕๖๗๘๙๚๛����"
+ },
+ "win874": "windows874",
+ "cp874": "windows874",
+ "windows1250": {
+ "type": "_sbcs",
+ "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“â€â€¢â€“—�™š›śťžź ˇ˘Å¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»ĽËľżŔÃÂĂÄĹĆÇČÉĘËĚÃÃŽÄŽÄŃŇÓÔÅÖ×ŘŮÚŰÜÃŢßŕáâăäĺćçÄéęëěíîÄđńňóôőö÷řůúűüýţ˙"
+ },
+ "win1250": "windows1250",
+ "cp1250": "windows1250",
+ "windows1251": {
+ "type": "_sbcs",
+ "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋÐђ‘’“â€â€¢â€“—�™љ›њќћџ ЎўЈ¤Ò¦§Ð©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрÑтуфхцчшщъыьÑÑŽÑ"
+ },
+ "win1251": "windows1251",
+ "cp1251": "windows1251",
+ "windows1252": {
+ "type": "_sbcs",
+ "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“â€â€¢â€“—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃÃÑÒÓÔÕÖ×ØÙÚÛÜÃÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
+ },
+ "win1252": "windows1252",
+ "cp1252": "windows1252",
+ "windows1253": {
+ "type": "_sbcs",
+ "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“â€â€¢â€“—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎÎÎΑΒΓΔΕΖΗΘΙΚΛΜÎΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπÏςστυφχψωϊϋόÏώ�"
+ },
+ "win1253": "windows1253",
+ "cp1253": "windows1253",
+ "windows1254": {
+ "type": "_sbcs",
+ "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“â€â€¢â€“—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ"
+ },
+ "win1254": "windows1254",
+ "cp1254": "windows1254",
+ "windows1255": {
+ "type": "_sbcs",
+ "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“â€â€¢â€“—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹ�ֻּֽ־ֿ׀×ׂ׃װױײ׳״�������×בגדהוזחטיךכל×מןנסעףפץצקרשת��‎â€ï¿½"
+ },
+ "win1255": "windows1255",
+ "cp1255": "windows1255",
+ "windows1256": {
+ "type": "_sbcs",
+ "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“â€â€¢â€“—ک™ڑ›œ‌â€ÚºÂ ØŒÂ¢Â£Â¤Â¥Â¦Â§Â¨Â©Ú¾Â«Â¬Â­Â®Â¯Â°Â±Â²Â³Â´ÂµÂ¶Â·Â¸Â¹Ø›Â»Â¼Â½Â¾ØŸÛءآأؤإئابةتثجحخدذرزسشصض×طظعغـÙقكàلâمنهوçèéêëىيîïًٌÙَôÙÙ÷ّùْûü‎â€Û’"
+ },
+ "win1256": "windows1256",
+ "cp1256": "windows1256",
+ "windows1257": {
+ "type": "_sbcs",
+ "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“â€â€¢â€“—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲÅŚŪÜŻŽßąįÄćäåęēÄéźėģķīļšńņóÅõö÷ųłśūüżž˙"
+ },
+ "win1257": "windows1257",
+ "cp1257": "windows1257",
+ "windows1258": {
+ "type": "_sbcs",
+ "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“â€â€¢â€“—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÃÂĂÄÅÆÇÈÉÊË̀ÃÃŽÃÄÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêëÌíîïđṇ̃óôơö÷øùúûüư₫ÿ"
+ },
+ "win1258": "windows1258",
+ "cp1258": "windows1258",
+ "iso88591": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃÃÑÒÓÔÕÖ×ØÙÚÛÜÃÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
+ },
+ "cp28591": "iso88591",
+ "iso88592": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ Ą˘Å¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťźËžżŔÃÂĂÄĹĆÇČÉĘËĚÃÃŽÄŽÄŃŇÓÔÅÖ×ŘŮÚŰÜÃŢßŕáâăäĺćçÄéęëěíîÄđńňóôőö÷řůúűüýţ˙"
+ },
+ "cp28592": "iso88592",
+ "iso88593": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�Ż°ħ²³´µĥ·¸ışğĵ½�żÀÃÂ�ÄĊĈÇÈÉÊËÌÃÃŽÃ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ÄùúûüŭÅË™"
+ },
+ "cp28593": "iso88593",
+ "iso88594": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ĄĸŖ¤ĨĻ§¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩļˇ¸šēģŧŊžŋĀÃÂÃÄÅÆĮČÉĘËĖÃÎĪÄŅŌĶÔÕÖ×ØŲÚÛÜŨŪßÄáâãäåæįÄéęëėíîīđņÅķôõö÷øųúûüũū˙"
+ },
+ "cp28594": "iso88594",
+ "iso88595": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ÐЂЃЄЅІЇЈЉЊЋЌ­ЎÐÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрÑтуфхцчшщъыьÑÑŽÑ№ёђѓєѕіїјљњћќ§ўџ"
+ },
+ "cp28595": "iso88595",
+ "iso88596": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـÙقكلمنهوىيًٌÙÙŽÙÙّْ�������������"
+ },
+ "cp28596": "iso88596",
+ "iso88597": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎÎÎΑΒΓΔΕΖΗΘΙΚΛΜÎΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπÏςστυφχψωϊϋόÏώ�"
+ },
+ "cp28597": "iso88597",
+ "iso88598": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗×בגדהוזחטיךכל×מןנסעףפץצקרשת��‎â€ï¿½"
+ },
+ "cp28598": "iso88598",
+ "iso88599": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ"
+ },
+ "cp28599": "iso88599",
+ "iso885910": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ĄĒĢĪĨĶ§ĻÄŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÃÂÃÄÅÆĮČÉĘËĖÃÃŽÃÃŅŌÓÔÕÖŨØŲÚÛÜÃÞßÄáâãäåæįÄéęëėíîïðņÅóôõöũøųúûüýþĸ"
+ },
+ "cp28600": "iso885910",
+ "iso885911": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ à¸à¸‚ฃคฅฆงจฉชซฌà¸à¸Žà¸à¸à¸‘ฒณดตถทธนบปผà¸à¸žà¸Ÿà¸ à¸¡à¸¢à¸£à¸¤à¸¥à¸¦à¸§à¸¨à¸©à¸ªà¸«à¸¬à¸­à¸®à¸¯à¸°à¸±à¸²à¸³à¸´à¸µà¸¶à¸·à¸¸à¸¹à¸ºï¿½ï¿½ï¿½ï¿½à¸¿à¹€à¹à¹‚ใไๅๆ็่้๊๋์à¹à¹Žà¹à¹à¹‘๒๓๔๕๖๗๘๙๚๛����"
+ },
+ "cp28601": "iso885911",
+ "iso885913": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ â€Â¢Â£Â¤â€žÂ¦Â§Ã˜Â©Å–«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲÅŚŪÜŻŽßąįÄćäåęēÄéźėģķīļšńņóÅõö÷ųłśūüżž’"
+ },
+ "cp28603": "iso885913",
+ "iso885914": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀá¹Â¶á¹–áºá¹—ẃṠỳẄẅṡÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃŴÑÒÓÔÕÖṪØÙÚÛÜÃŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ"
+ },
+ "cp28604": "iso885914",
+ "iso885915": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃÃÑÒÓÔÕÖ×ØÙÚÛÜÃÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
+ },
+ "cp28605": "iso885915",
+ "iso885916": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ĄąÅ€„Š§š©Ș«Ź­źŻ°±ČłŽâ€Â¶Â·Å¾Äș»ŒœŸżÀÃÂĂÄĆÆÇÈÉÊËÌÃÃŽÃÄŃÒÓÔÅÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ"
+ },
+ "cp28606": "iso885916",
+ "cp437": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿âŒÂ¬Â½Â¼Â¡Â«Â»â–‘▒▓│┤╡╢╖╕╣║╗â•â•œâ•›â”└┴┬├─┼╞╟╚╔╩╦╠â•â•¬â•§â•¨â•¤â•¥â•™â•˜â•’╓╫╪┘┌█▄▌â–▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√â¿Â²â– Â "
+ },
+ "ibm437": "cp437",
+ "csibm437": "cp437",
+ "cp737": {
+ "type": "_sbcs",
+ "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜÎΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπÏσςτυφχψ░▒▓│┤╡╢╖╕╣║╗â•â•œâ•›â”└┴┬├─┼╞╟╚╔╩╦╠â•â•¬â•§â•¨â•¤â•¥â•™â•˜â•’╓╫╪┘┌█▄▌â–▀ωάέήϊίόÏϋώΆΈΉΊΌΎÎ±≥≤ΪΫ÷≈°∙·√â¿Â²â– Â "
+ },
+ "ibm737": "cp737",
+ "csibm737": "cp737",
+ "cp775": {
+ "type": "_sbcs",
+ "chars": "ĆüéÄäģåćłēŖŗīŹÄÅÉæÆÅöĢ¢ŚśÖÜø£ØפĀĪóŻżźâ€Â¦Â©Â®Â¬Â½Â¼Å«»░▒▓│┤ĄČĘĖ╣║╗â•Ä®Å â”└┴┬├─┼ŲŪ╚╔╩╦╠â•â•¬Å½Ä…Äęėįšųūž┘┌█▄▌â–▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ "
+ },
+ "ibm775": "cp775",
+ "csibm775": "cp775",
+ "cp850": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÃÂÀ©╣║╗â•Â¢Â¥â”└┴┬├─┼ãÃ╚╔╩╦╠â•â•¬Â¤Ã°ÃÊËÈıÃÃŽÃ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýï´­±‗¾¶§÷¸°¨·¹³²■ "
+ },
+ "ibm850": "cp850",
+ "csibm850": "cp850",
+ "cp852": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäůćçłëÅőîŹÄĆÉĹĺôöĽľŚśÖÜŤťÅ×ÄáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÃÂĚŞ╣║╗â•Å»Å¼â”└┴┬├─┼Ăă╚╔╩╦╠â•â•¬Â¤Ä‘ÄĎËÄŇÃÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÃţ´­Ë˛ˇ˘§÷¸°¨˙űŘř■ "
+ },
+ "ibm852": "cp852",
+ "csibm852": "cp852",
+ "cp855": {
+ "type": "_sbcs",
+ "chars": "ђЂѓЃёÐєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџÐюЮъЪаÐбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗â•Ð¹Ð™â”└┴┬├─┼кК╚╔╩╦╠â•â•¬Â¤Ð»Ð›Ð¼ÐœÐ½ÐоОп┘┌█▄ПÑ▀ЯрРÑСтТуУжЖвВьЬ№­ыЫзЗшШÑЭщЩчЧ§■ "
+ },
+ "ibm855": "cp855",
+ "csibm855": "cp855",
+ "cp856": {
+ "type": "_sbcs",
+ "chars": "×בגדהוזחטיךכל×מןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗â•Â¢Â¥â”└┴┬├─┼��╚╔╩╦╠â•â•¬Â¤ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½â”˜â”Œâ–ˆâ–„¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ "
+ },
+ "ibm856": "cp856",
+ "csibm856": "cp856",
+ "cp857": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÃÂÀ©╣║╗â•Â¢Â¥â”└┴┬├─┼ãÃ╚╔╩╦╠â•â•¬Â¤ÂºÂªÃŠÃ‹Ãˆï¿½ÃÃŽÃ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ "
+ },
+ "ibm857": "cp857",
+ "csibm857": "cp857",
+ "cp858": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÃÂÀ©╣║╗â•Â¢Â¥â”└┴┬├─┼ãÃ╚╔╩╦╠â•â•¬Â¤Ã°ÃÊËÈ€ÃÃŽÃ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýï´­±‗¾¶§÷¸°¨·¹³²■ "
+ },
+ "ibm858": "cp858",
+ "csibm858": "cp858",
+ "cp860": {
+ "type": "_sbcs",
+ "chars": "ÇüéâãàÃçêÊèÃÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗â•â•œâ•›â”└┴┬├─┼╞╟╚╔╩╦╠â•â•¬â•§â•¨â•¤â•¥â•™â•˜â•’╓╫╪┘┌█▄▌â–▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√â¿Â²â– Â "
+ },
+ "ibm860": "cp860",
+ "csibm860": "cp860",
+ "cp861": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèÃðÞÄÅÉæÆôöþûÃýÖÜø£Ø₧ƒáíóúÃÃÓÚ¿âŒÂ¬Â½Â¼Â¡Â«Â»â–‘▒▓│┤╡╢╖╕╣║╗â•â•œâ•›â”└┴┬├─┼╞╟╚╔╩╦╠â•â•¬â•§â•¨â•¤â•¥â•™â•˜â•’╓╫╪┘┌█▄▌â–▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√â¿Â²â– Â "
+ },
+ "ibm861": "cp861",
+ "csibm861": "cp861",
+ "cp862": {
+ "type": "_sbcs",
+ "chars": "×בגדהוזחטיךכל×מןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿âŒÂ¬Â½Â¼Â¡Â«Â»â–‘▒▓│┤╡╢╖╕╣║╗â•â•œâ•›â”└┴┬├─┼╞╟╚╔╩╦╠â•â•¬â•§â•¨â•¤â•¥â•™â•˜â•’╓╫╪┘┌█▄▌â–▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√â¿Â²â– Â "
+ },
+ "ibm862": "cp862",
+ "csibm862": "cp862",
+ "cp863": {
+ "type": "_sbcs",
+ "chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÃûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯ÎâŒÂ¬Â½Â¼Â¾Â«Â»â–‘▒▓│┤╡╢╖╕╣║╗â•â•œâ•›â”└┴┬├─┼╞╟╚╔╩╦╠â•â•¬â•§â•¨â•¤â•¥â•™â•˜â•’╓╫╪┘┌█▄▌â–▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√â¿Â²â– Â "
+ },
+ "ibm863": "cp863",
+ "csibm863": "cp863",
+ "cp864": {
+ "type": "_sbcs",
+ "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$Ùª&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴â”┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎïºïº•ïº™ØŒïºïº¡ïº¥Ù Ù¡Ù¢Ù£Ù¤Ù¥Ù¦Ù§Ù¨Ù©ï»‘؛ﺱﺵﺹ؟¢ﺀïºïºƒïº…ﻊﺋïºïº‘ﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿï»ï»…ﻋï»Â¦Â¬Ã·Ã—ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎï»ï»¡ï¹½Ù‘ﻥﻩﻬﻰﻲï»ï»•ï»µï»¶ï»ï»™ï»±â– ï¿½"
+ },
+ "ibm864": "cp864",
+ "csibm864": "cp864",
+ "cp865": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿âŒÂ¬Â½Â¼Â¡Â«Â¤â–‘▒▓│┤╡╢╖╕╣║╗â•â•œâ•›â”└┴┬├─┼╞╟╚╔╩╦╠â•â•¬â•§â•¨â•¤â•¥â•™â•˜â•’╓╫╪┘┌█▄▌â–▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√â¿Â²â– Â "
+ },
+ "ibm865": "cp865",
+ "csibm865": "cp865",
+ "cp866": {
+ "type": "_sbcs",
+ "chars": "ÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗â•â•œâ•›â”└┴┬├─┼╞╟╚╔╩╦╠â•â•¬â•§â•¨â•¤â•¥â•™â•˜â•’╓╫╪┘┌█▄▌â–▀рÑтуфхцчшщъыьÑÑŽÑÐёЄєЇїЎў°∙·√№¤■ "
+ },
+ "ibm866": "cp866",
+ "csibm866": "cp866",
+ "cp869": {
+ "type": "_sbcs",
+ "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Î²³ά£έήίϊÎÏŒÏΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜÎ╣║╗â•ÎžÎŸâ”└┴┬├─┼ΠΡ╚╔╩╦╠â•â•¬Î£Î¤Î¥Î¦Î§Î¨Î©Î±Î²Î³â”˜â”Œâ–ˆâ–„δε▀ζηθικλμνξοπÏσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ "
+ },
+ "ibm869": "cp869",
+ "csibm869": "cp869",
+ "cp922": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÃÂÃÄÅÆÇÈÉÊËÌÃÎÊÑÒÓÔÕÖ×ØÙÚÛÜÃŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ"
+ },
+ "ibm922": "cp922",
+ "csibm922": "cp922",
+ "cp1046": {
+ "type": "_sbcs",
+ "chars": "ﺈ×÷ﹱˆ■│─â”┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎï»ï»ï»¶ï»¸ï»ºï»¼Â ï£ºï£¹ï£¸Â¤ï£»ïº‹ïº‘ﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـÙقكلمنهوىيًٌÙÙŽÙÙّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�"
+ },
+ "ibm1046": "cp1046",
+ "csibm1046": "cp1046",
+ "cp1124": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ÐЂÒЄЅІЇЈЉЊЋЌ­ЎÐÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрÑтуфхцчшщъыьÑÑŽÑ№ёђґєѕіїјљњћќ§ўџ"
+ },
+ "ibm1124": "cp1124",
+ "csibm1124": "cp1124",
+ "cp1125": {
+ "type": "_sbcs",
+ "chars": "ÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗â•â•œâ•›â”└┴┬├─┼╞╟╚╔╩╦╠â•â•¬â•§â•¨â•¤â•¥â•™â•˜â•’╓╫╪┘┌█▄▌â–▀рÑтуфхцчшщъыьÑÑŽÑÐÑ‘ÒґЄєІіЇї·√№¤■ "
+ },
+ "ibm1125": "cp1125",
+ "csibm1125": "cp1125",
+ "cp1129": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÃÂĂÄÅÆÇÈÉÊË̀ÃÃŽÃÄÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêëÌíîïđṇ̃óôơö÷øùúûüư₫ÿ"
+ },
+ "ibm1129": "cp1129",
+ "csibm1129": "cp1129",
+ "cp1133": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ àºàº‚ຄງຈສຊàºàº”ຕຖທນບປຜàºàºžàºŸàº¡àº¢àº£àº¥àº§àº«àº­àº®ï¿½ï¿½ï¿½àº¯àº°àº²àº³àº´àºµàº¶àº·àº¸àº¹àº¼àº±àº»àº½ï¿½ï¿½ï¿½à»€à»à»‚ໃໄ່້໊໋໌à»à»†ï¿½à»œà»â‚­ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½à»à»‘໒໓໔໕໖໗໘໙��¢¬¦�"
+ },
+ "ibm1133": "cp1133",
+ "csibm1133": "cp1133",
+ "cp1161": {
+ "type": "_sbcs",
+ "chars": "��������������������������������่à¸à¸‚ฃคฅฆงจฉชซฌà¸à¸Žà¸à¸à¸‘ฒณดตถทธนบปผà¸à¸žà¸Ÿà¸ à¸¡à¸¢à¸£à¸¤à¸¥à¸¦à¸§à¸¨à¸©à¸ªà¸«à¸¬à¸­à¸®à¸¯à¸°à¸±à¸²à¸³à¸´à¸µà¸¶à¸·à¸¸à¸¹à¸ºà¹‰à¹Šà¹‹â‚¬à¸¿à¹€à¹à¹‚ใไๅๆ็่้๊๋์à¹à¹Žà¹à¹à¹‘๒๓๔๕๖๗๘๙๚๛¢¬¦ "
+ },
+ "ibm1161": "cp1161",
+ "csibm1161": "cp1161",
+ "cp1162": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“â€â€¢â€“—˜™š›œÂžŸ à¸à¸‚ฃคฅฆงจฉชซฌà¸à¸Žà¸à¸à¸‘ฒณดตถทธนบปผà¸à¸žà¸Ÿà¸ à¸¡à¸¢à¸£à¸¤à¸¥à¸¦à¸§à¸¨à¸©à¸ªà¸«à¸¬à¸­à¸®à¸¯à¸°à¸±à¸²à¸³à¸´à¸µà¸¶à¸·à¸¸à¸¹à¸ºï¿½ï¿½ï¿½ï¿½à¸¿à¹€à¹à¹‚ใไๅๆ็่้๊๋์à¹à¹Žà¹à¹à¹‘๒๓๔๕๖๗๘๙๚๛����"
+ },
+ "ibm1162": "cp1162",
+ "csibm1162": "cp1162",
+ "cp1163": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÃÂĂÄÅÆÇÈÉÊË̀ÃÃŽÃÄÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêëÌíîïđṇ̃óôơö÷øùúûüư₫ÿ"
+ },
+ "ibm1163": "cp1163",
+ "csibm1163": "cp1163",
+ "maccroatian": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑âˆÅ¡âˆ«ÂªÂºâ„¦Å¾Ã¸Â¿Â¡Â¬âˆšÆ’≈Ć«Č… ÀÃÕŒœÄ—“â€â€˜â€™Ã·â—Šï¿½Â©â„¤‹›Æ»–·‚„‰ÂćÃÄÈÃÃŽÃÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ"
+ },
+ "maccyrillic": {
+ "type": "_sbcs",
+ "chars": "ÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“â€â€˜â€™Ã·â€žÐŽÑžÐÑŸâ„–ÐÑ‘ÑабвгдежзийклмнопрÑтуфхцчшщъыьÑю¤"
+ },
+ "macgreek": {
+ "type": "_sbcs",
+ "chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάάΟΡ≈Τ«»… ΥΧΆΈœ–―“â€â€˜â€™Ã·Î‰ÎŠÎŒÎŽÎ­Î®Î¯ÏŒÎÏαβψδεφγηιξκλμνοπώÏστθωςχυζϊϋÎΰ�"
+ },
+ "maciceland": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü𢣧•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑âˆÏ€âˆ«ÂªÂºâ„¦Ã¦Ã¸Â¿Â¡Â¬âˆšÆ’≈∆«»… ÀÃÕŒœ–—“â€â€˜â€™Ã·â—ŠÃ¿Å¸â„¤ÃðÞþý·‚„‰ÂÊÃËÈÃÃŽÃÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸Ë˛ˇ"
+ },
+ "macroman": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑âˆÏ€âˆ«ÂªÂºâ„¦Ã¦Ã¸Â¿Â¡Â¬âˆšÆ’≈∆«»… ÀÃÕŒœ–—“â€â€˜â€™Ã·â—ŠÃ¿Å¸â„¤‹›ï¬ï¬‚‡·‚„‰ÂÊÃËÈÃÃŽÃÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸Ë˛ˇ"
+ },
+ "macromania": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑âˆÏ€âˆ«ÂªÂºâ„¦ÄƒÅŸÂ¿Â¡Â¬âˆšÆ’≈∆«»… ÀÃÕŒœ–—“â€â€˜â€™Ã·â—ŠÃ¿Å¸â„¤‹›Ţţ‡·‚„‰ÂÊÃËÈÃÃŽÃÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸Ë˛ˇ"
+ },
+ "macthai": {
+ "type": "_sbcs",
+ "chars": "«»…ï¢ï¢’“â€ï¢™ï¿½â€¢ï¢„ï¢ï¢ï¢“‘’� à¸à¸‚ฃคฅฆงจฉชซฌà¸à¸Žà¸à¸à¸‘ฒณดตถทธนบปผà¸à¸žà¸Ÿà¸ à¸¡à¸¢à¸£à¸¤à¸¥à¸¦à¸§à¸¨à¸©à¸ªà¸«à¸¬à¸­à¸®à¸¯à¸°à¸±à¸²à¸³à¸´à¸µà¸¶à¸·à¸¸à¸¹à¸ºï»¿â€‹â€“—฿เà¹à¹‚ใไๅๆ็่้๊๋์à¹â„¢à¹à¹à¹‘๒๓๔๕๖๗๘๙®©����"
+ },
+ "macturkish": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑âˆÏ€âˆ«ÂªÂºâ„¦Ã¦Ã¸Â¿Â¡Â¬âˆšÆ’≈∆«»… ÀÃÕŒœ–—“â€â€˜â€™Ã·â—ŠÃ¿Å¸ÄžÄŸÄ°Ä±ÅžÅŸâ€¡Â·â€šâ€žâ€°Ã‚ÊÃËÈÃÃŽÃÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸Ë˛ˇ"
+ },
+ "macukraine": {
+ "type": "_sbcs",
+ "chars": "ÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ò£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“â€â€˜â€™Ã·â€žÐŽÑžÐÑŸâ„–ÐÑ‘ÑабвгдежзийклмнопрÑтуфхцчшщъыьÑю¤"
+ },
+ "koi8r": {
+ "type": "_sbcs",
+ "chars": "─│┌â”└┘├┤┬┴┼▀▄█▌â–░▒▓⌠■∙√≈≤≥ ⌡°²·÷â•â•‘╒ё╓╔╕╖╗╘╙╚╛╜â•â•žâ•Ÿâ• â•¡Ð╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопÑÑ€ÑтужвьызшÑщчъЮÐБЦДЕФГХИЙКЛМÐОПЯРСТУЖВЬЫЗШЭЩЧЪ"
+ },
+ "koi8u": {
+ "type": "_sbcs",
+ "chars": "─│┌â”└┘├┤┬┴┼▀▄█▌â–░▒▓⌠■∙√≈≤≥ ⌡°²·÷â•â•‘╒ёє╔ії╗╘╙╚╛ґâ•â•žâ•Ÿâ• â•¡ÐЄ╣ІЇ╦╧╨╩╪Ò╬©юабцдефгхийклмнопÑÑ€ÑтужвьызшÑщчъЮÐБЦДЕФГХИЙКЛМÐОПЯРСТУЖВЬЫЗШЭЩЧЪ"
+ },
+ "koi8ru": {
+ "type": "_sbcs",
+ "chars": "─│┌â”└┘├┤┬┴┼▀▄█▌â–░▒▓⌠■∙√≈≤≥ ⌡°²·÷â•â•‘╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ÐЄ╣ІЇ╦╧╨╩╪ÒЎ©юабцдефгхийклмнопÑÑ€ÑтужвьызшÑщчъЮÐБЦДЕФГХИЙКЛМÐОПЯРСТУЖВЬЫЗШЭЩЧЪ"
+ },
+ "koi8t": {
+ "type": "_sbcs",
+ "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“â€â€¢â€“—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ð�Ӣ¶·�№�»���©юабцдефгхийклмнопÑÑ€ÑтужвьызшÑщчъЮÐБЦДЕФГХИЙКЛМÐОПЯРСТУЖВЬЫЗШЭЩЧЪ"
+ },
+ "armscii8": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ �և։)(»«—.Õ,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհÕձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռÕÕ½ÕŽÕ¾ÕÕ¿ÕÖ€Õ‘ÖՒւՓփՔքՕօՖֆ՚�"
+ },
+ "rk1048": {
+ "type": "_sbcs",
+ "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺÐђ‘’“â€â€¢â€“—�™љ›њқһџ ҰұӘ¤Ө¦§Ð©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрÑтуфхцчшщъыьÑÑŽÑ"
+ },
+ "tcvn": {
+ "type": "_sbcs",
+ "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÃá»´\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÃẠẶẬÈẺẼÉẸỆÌỈĨÃỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯÄăâêôơưđẰ̀̉̃Ị̀àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹá»á»ƒá»…ếệìỉỄẾỒĩíịòỔá»ÃµÃ³á»á»“ổỗốộá»á»Ÿá»¡á»›á»£Ã¹á»–ủũúụừửữứựỳỷỹýỵá»"
+ },
+ "georgianacademy": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“â€â€¢â€“—˜™š›œÂžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿áƒáƒ‘გდევზთიკლმნáƒáƒžáƒŸáƒ áƒ¡áƒ¢áƒ£áƒ¤áƒ¥áƒ¦áƒ§áƒ¨áƒ©áƒªáƒ«áƒ¬áƒ­áƒ®áƒ¯áƒ°áƒ±áƒ²áƒ³áƒ´áƒµáƒ¶Ã§Ã¨Ã©ÃªÃ«Ã¬Ã­Ã®Ã¯Ã°Ã±Ã²Ã³Ã´ÃµÃ¶Ã·Ã¸Ã¹ÃºÃ»Ã¼Ã½Ã¾Ã¿"
+ },
+ "georgianps": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“â€â€¢â€“—˜™š›œÂžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿áƒáƒ‘გდევზჱთიკლმნჲáƒáƒžáƒŸáƒ áƒ¡áƒ¢áƒ³áƒ£áƒ¤áƒ¥áƒ¦áƒ§áƒ¨áƒ©áƒªáƒ«áƒ¬áƒ­áƒ®áƒ´áƒ¯áƒ°áƒµÃ¦Ã§Ã¨Ã©ÃªÃ«Ã¬Ã­Ã®Ã¯Ã°Ã±Ã²Ã³Ã´ÃµÃ¶Ã·Ã¸Ã¹ÃºÃ»Ã¼Ã½Ã¾Ã¿"
+ },
+ "pt154": {
+ "type": "_sbcs",
+ "chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“â€â€¢â€“—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ð©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫÒÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрÑтуфхцчшщъыьÑÑŽÑ"
+ },
+ "viscii": {
+ "type": "_sbcs",
+ "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dá»´\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆá»á»’ỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếá»á»ƒá»…ệốồổỗỠƠộá»á»Ÿá»‹á»°á»¨á»ªá»¬Æ¡á»›Æ¯Ã€ÃÂÃẢĂẳẵÈÉÊẺÌÃĨỳÄứÒÓÔạỷừửÙÚỹỵÃỡưàáâãảăữẫèéêẻìíĩỉđựòóôõá»á»á»¥Ã¹ÃºÅ©á»§Ã½á»£á»®"
+ },
+ "iso646cn": {
+ "type": "_sbcs",
+ "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������"
+ },
+ "iso646jp": {
+ "type": "_sbcs",
+ "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������"
+ },
+ "hproman8": {
+ "type": "_sbcs",
+ "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ÀÂÈÊËÎôˋˆ¨˜ÙÛ₤¯Ãý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÃÃãÃðÃÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�"
+ },
+ "macintosh": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑âˆÏ€âˆ«ÂªÂºâ„¦Ã¦Ã¸Â¿Â¡Â¬âˆšÆ’≈∆«»… ÀÃÕŒœ–—“â€â€˜â€™Ã·â—ŠÃ¿Å¸â„¤‹›ï¬ï¬‚‡·‚„‰ÂÊÃËÈÃÃŽÃÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸Ë˛ˇ"
+ },
+ "ascii": {
+ "type": "_sbcs",
+ "chars": "��������������������������������������������������������������������������������������������������������������������������������"
+ },
+ "tis620": {
+ "type": "_sbcs",
+ "chars": "���������������������������������à¸à¸‚ฃคฅฆงจฉชซฌà¸à¸Žà¸à¸à¸‘ฒณดตถทธนบปผà¸à¸žà¸Ÿà¸ à¸¡à¸¢à¸£à¸¤à¸¥à¸¦à¸§à¸¨à¸©à¸ªà¸«à¸¬à¸­à¸®à¸¯à¸°à¸±à¸²à¸³à¸´à¸µà¸¶à¸·à¸¸à¸¹à¸ºï¿½ï¿½ï¿½ï¿½à¸¿à¹€à¹à¹‚ใไๅๆ็่้๊๋์à¹à¹Žà¹à¹à¹‘๒๓๔๕๖๗๘๙๚๛����"
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-data.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-data.js
new file mode 100644
index 0000000..2058a71
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-data.js
@@ -0,0 +1,169 @@
+"use strict"
+
+// Manually added data to be used by sbcs codec in addition to generated one.
+
+module.exports = {
+ // Not supported by iconv, not sure why.
+ "10029": "maccenteuro",
+ "maccenteuro": {
+ "type": "_sbcs",
+ "chars": "ÄĀÄÉĄÖÜáąČäÄĆć鏟ĎíÄĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňÅÕőŌ–—“â€â€˜â€™Ã·â—ŠÅŔŕŘ‹›řŖŗŠ‚„šŚśÃŤťÃŽžŪÓÔūŮÚůŰűŲųÃýķŻÅżĢˇ"
+ },
+
+ "808": "cp808",
+ "ibm808": "cp808",
+ "cp808": {
+ "type": "_sbcs",
+ "chars": "ÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗â•â•œâ•›â”└┴┬├─┼╞╟╚╔╩╦╠â•â•¬â•§â•¨â•¤â•¥â•™â•˜â•’╓╫╪┘┌█▄▌â–▀рÑтуфхцчшщъыьÑÑŽÑÐёЄєЇїЎў°∙·√№€■ "
+ },
+
+ // Aliases of generated encodings.
+ "ascii8bit": "ascii",
+ "usascii": "ascii",
+ "ansix34": "ascii",
+ "ansix341968": "ascii",
+ "ansix341986": "ascii",
+ "csascii": "ascii",
+ "cp367": "ascii",
+ "ibm367": "ascii",
+ "isoir6": "ascii",
+ "iso646us": "ascii",
+ "iso646irv": "ascii",
+ "us": "ascii",
+
+ "latin1": "iso88591",
+ "latin2": "iso88592",
+ "latin3": "iso88593",
+ "latin4": "iso88594",
+ "latin5": "iso88599",
+ "latin6": "iso885910",
+ "latin7": "iso885913",
+ "latin8": "iso885914",
+ "latin9": "iso885915",
+ "latin10": "iso885916",
+
+ "csisolatin1": "iso88591",
+ "csisolatin2": "iso88592",
+ "csisolatin3": "iso88593",
+ "csisolatin4": "iso88594",
+ "csisolatincyrillic": "iso88595",
+ "csisolatinarabic": "iso88596",
+ "csisolatingreek" : "iso88597",
+ "csisolatinhebrew": "iso88598",
+ "csisolatin5": "iso88599",
+ "csisolatin6": "iso885910",
+
+ "l1": "iso88591",
+ "l2": "iso88592",
+ "l3": "iso88593",
+ "l4": "iso88594",
+ "l5": "iso88599",
+ "l6": "iso885910",
+ "l7": "iso885913",
+ "l8": "iso885914",
+ "l9": "iso885915",
+ "l10": "iso885916",
+
+ "isoir14": "iso646jp",
+ "isoir57": "iso646cn",
+ "isoir100": "iso88591",
+ "isoir101": "iso88592",
+ "isoir109": "iso88593",
+ "isoir110": "iso88594",
+ "isoir144": "iso88595",
+ "isoir127": "iso88596",
+ "isoir126": "iso88597",
+ "isoir138": "iso88598",
+ "isoir148": "iso88599",
+ "isoir157": "iso885910",
+ "isoir166": "tis620",
+ "isoir179": "iso885913",
+ "isoir199": "iso885914",
+ "isoir203": "iso885915",
+ "isoir226": "iso885916",
+
+ "cp819": "iso88591",
+ "ibm819": "iso88591",
+
+ "cyrillic": "iso88595",
+
+ "arabic": "iso88596",
+ "arabic8": "iso88596",
+ "ecma114": "iso88596",
+ "asmo708": "iso88596",
+
+ "greek" : "iso88597",
+ "greek8" : "iso88597",
+ "ecma118" : "iso88597",
+ "elot928" : "iso88597",
+
+ "hebrew": "iso88598",
+ "hebrew8": "iso88598",
+
+ "turkish": "iso88599",
+ "turkish8": "iso88599",
+
+ "thai": "iso885911",
+ "thai8": "iso885911",
+
+ "celtic": "iso885914",
+ "celtic8": "iso885914",
+ "isoceltic": "iso885914",
+
+ "tis6200": "tis620",
+ "tis62025291": "tis620",
+ "tis62025330": "tis620",
+
+ "10000": "macroman",
+ "10006": "macgreek",
+ "10007": "maccyrillic",
+ "10079": "maciceland",
+ "10081": "macturkish",
+
+ "cspc8codepage437": "cp437",
+ "cspc775baltic": "cp775",
+ "cspc850multilingual": "cp850",
+ "cspcp852": "cp852",
+ "cspc862latinhebrew": "cp862",
+ "cpgr": "cp869",
+
+ "msee": "cp1250",
+ "mscyrl": "cp1251",
+ "msansi": "cp1252",
+ "msgreek": "cp1253",
+ "msturk": "cp1254",
+ "mshebr": "cp1255",
+ "msarab": "cp1256",
+ "winbaltrim": "cp1257",
+
+ "cp20866": "koi8r",
+ "20866": "koi8r",
+ "ibm878": "koi8r",
+ "cskoi8r": "koi8r",
+
+ "cp21866": "koi8u",
+ "21866": "koi8u",
+ "ibm1168": "koi8u",
+
+ "strk10482002": "rk1048",
+
+ "tcvn5712": "tcvn",
+ "tcvn57121": "tcvn",
+
+ "gb198880": "iso646cn",
+ "cn": "iso646cn",
+
+ "csiso14jisc6220ro": "iso646jp",
+ "jisc62201969ro": "iso646jp",
+ "jp": "iso646jp",
+
+ "cshproman8": "hproman8",
+ "r8": "hproman8",
+ "roman8": "hproman8",
+ "xroman8": "hproman8",
+ "ibm1051": "hproman8",
+
+ "mac": "macintosh",
+ "csmacintosh": "macintosh",
+};
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/big5-added.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/big5-added.json
new file mode 100644
index 0000000..3c3d3c2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/big5-added.json
@@ -0,0 +1,122 @@
+[
+["8740","ä°ä°²ä˜ƒä–¦ä•¸ð§‰§äµ·ä–³ð§²±ä³¢ð§³…㮕䜶ä„䱇䱀𤊿𣘗ð§’𦺋𧃒䱗ðª‘ä䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡æ™å›»"],
+["8767","綕å¤ð¨®¹ã·´éœ´ð§¯¯å¯›ð¡µžåª¤ã˜¥ð©º°å«‘å®·å³¼æ®è–“ð©¥…ç‘¡ç’㡵𡵓𣚞𦀡㻬"],
+["87a1","𥣞㫵竼龗𤅡ð¨¤ð£‡ªð ªŠð£‰žäŒŠè’„é¾–é¯ä¤°è˜“墖éŠéˆ˜ç§ç¨²æ™ æ¨©è¢ç‘Œç¯…枂稬å‰é†ã“¦ç„𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥è®äš®ð¦ºˆä†ð¥¶™ç®®ð¢’¼é¿ˆð¢“𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿æ‹ç®é¿‹"],
+["8840","㇀",4,"𠄌㇅𠃑ð ƒã‡†ã‡‡ð ƒ‹ð¡¿¨ã‡ˆð ƒŠã‡‰ã‡Šã‡‹ã‡Œð „Žã‡ã‡ŽÄ€ÃÇÀĒÉĚÈŌÓǑÒ࿿Ê̄Ế࿿Ê̌ỀÊÄáǎàɑēéěèīíÇìÅóǒòūúǔùǖǘǚ"],
+["88a1","ǜü࿿ê̄ế࿿ê̌á»ÃªÉ¡âšâ›"],
+["8940","𪎩𡅅"],
+["8943","攊"],
+["8946","丽æ»éµŽé‡Ÿ"],
+["894c","𧜵撑会伨侨兖兴农凤务动医åŽå‘å˜å›¢å£°å¤„备夲头学实実岚庆总斉柾栄桥济炼电纤纬纺织ç»ç»Ÿç¼†ç¼·è‰ºè‹è¯è§†è®¾è¯¢è½¦è½§è½®"],
+["89a1","ç‘ç³¼ç·æ¥†ç«‰åˆ§"],
+["89ab","醌碸酞肼"],
+["89b0","贋胶𠧧"],
+["89b5","肟黇ä³é·‰é¸Œä°¾ð©·¶ð§€Žé¸Šðª„³ã—"],
+["89c1","溚舾甙"],
+["89c5","䤑马éªé¾™ç¦‡ð¨‘¬ð¡·Šð —𢫦两äºäº€äº‡äº¿ä»«ä¼·ã‘Œä¾½ã¹ˆå€ƒå‚ˆã‘½ã’“㒥円夅凛凼刅争剹åŠåŒ§ã—‡åŽ©ã•‘厰㕓å‚å£ã•­ã•²ãšå’“咣咴咹å“哯唘唣唨㖘唿㖥㖿嗗㗅"],
+["8a40","𧶄唥"],
+["8a43","𠱂𠴕𥄫å–𢳆㧬ð è¹†ð¤¶¸ð©“¥ä“𨂾çºð¢°¸ã¨´äŸ•ð¨…𦧲𤷪æ“𠵼𠾴𠳕𡃴æ’蹾𠺖𠰋𠽤𢲩𨉖𤓓"],
+["8a64","𠵆ð©©ð¨ƒ©äŸ´ð¤º§ð¢³‚骲㩧𩗴㿭㔆𥋇𩟔𧣈𢵄鵮頕"],
+["8a76","ä™ð¦‚¥æ’´å“£ð¢µŒð¢¯Šð¡·ã§»ð¡¯"],
+["8aa1","𦛚𦜖𧦠擪ð¥’𠱃蹨𢆡𨭌𠜱"],
+["8aac","䠋𠆩㿺塳ð¢¶"],
+["8ab2","𤗈𠓼𦂗𠽌𠶖啹䂻䎺"],
+["8abb","䪴𢩦ð¡‚膪飵𠶜æ¹ã§¾ð¢µè·€åš¡æ‘¼ã¹ƒ"],
+["8ac9","ðª˜ð ¸‰ð¢«ð¢³‰"],
+["8ace","𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻"],
+["8adf","𧕴𢺋𢈈𪙛ð¨³ð ¹ºð °´ð¦ œç¾“ð¡ƒð¢ ƒð¢¤¹ã—»ð¥‡£ð ºŒð ¾ð ºªã¾“𠼰𠵇ð¡…𠹌"],
+["8af6","𠺫𠮩𠵈𡃀𡄽㿹𢚖æ²ð ¾­"],
+["8b40","ð£´ð§˜¹ð¢¯Žð µ¾ð µ¿ð¢±‘𢱕㨘𠺘𡃇𠼮𪘲ð¦­ð¨³’𨶙𨳊閪哌苄喹"],
+["8b55","𩻃鰦骶ð§žð¢·®ç…€è…­èƒ¬å°œð¦•²è„´ãž—åŸð¨‚½é†¶ð »ºð ¸ð ¹·ð »»ã—𤷫㘉𠳖嚯𢞵𡃉ð ¸ð ¹¸ð¡¸ð¡…ˆð¨ˆ‡ð¡‘•ð ¹¹ð¤¹ð¢¶¤å©”ð¡€ð¡€žð¡ƒµð¡ƒ¶åžœð ¸‘"],
+["8ba1","𧚔ð¨‹ð ¾µð ¹»ð¥…¾ãœƒð ¾¶ð¡†€ð¥‹˜ðªŠ½ð¤§šð¡ ºð¤…·ð¨‰¼å¢™å‰¨ã˜šð¥œ½ç®²å­¨ä €ä¬¬é¼§ä§§é°Ÿé®ð¥­´ð£„½å—»ã—²åš‰ä¸¨å¤‚ð¡¯ð¯¡¸é‘𠂆乛亻㔾尣彑忄㣺扌攵歺氵氺ç¬çˆ«ä¸¬çŠ­ð¤£©ç½’礻糹罓𦉪ã“"],
+["8bde","ð¦‹è€‚肀𦘒𦥑å衤è§ð§¢²è® è´é’…镸长门ð¨¸éŸ¦é¡µé£Žé£žé¥£ð© é±¼é¸Ÿé»„歯龜丷𠂇é˜æˆ·é’¢"],
+["8c40","倻淾𩱳龦㷉è¢ð¤…Žç·å³µä¬ ð¥‡ã•™ð¥´°æ„¢ð¨¨²è¾§é‡¶ç†‘朙玺ð£Šðª„‡ã²‹ð¡¦€ä¬ç£¤ç‚冮ð¨œä€‰æ©£ðªŠºäˆ£è˜ð ©¯ç¨ªð©¥‡ð¨«ªé•ç匤ð¢¾é´ç›™ð¨§£é¾§çŸäº£ä¿°å‚¼ä¸¯ä¼—龨å´ç¶‹å¢’å£ð¡¶¶åº’庙忂𢜒斋"],
+["8ca1","ð£¹æ¤™æ©ƒð£±£æ³¿"],
+["8ca7","爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩è¢é¾ªèº¹é¾«è¿è•Ÿé§ éˆ¡é¾¬ð¨¶¹ð¡¿ä±äŠ¢å¨š"],
+["8cc9","顨æ«ä‰¶åœ½"],
+["8cce","藖𤥻芿ð§„ä²ð¦µ´åµ»ð¦¬•ð¦¾¾é¾­é¾®å®–龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶"],
+["8ce6","峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤ð¦±è«Œä¾´ð ˆ¹å¦¿è…¬é¡–𩣺弻"],
+["8d40","𠮟"],
+["8d42","ð¢‡ð¨¥­ä„‚äš»ð©¹ã¼‡é¾³ðª†µäƒ¸ãŸ–䛷𦱆䅼𨚲ð§¿ä•­ã£”𥒚䕡䔛䶉䱻䵶䗪㿈ð¤¬ã™¡ä“žä’½ä‡­å´¾åµˆåµ–ã·¼ã å¶¤å¶¹ã  ã ¸å¹‚庽弥徃㤈㤔㤿ã¥æƒ—愽峥㦉憷憹æ‡ã¦¸æˆ¬æŠæ‹¥æŒ˜ã§¸åš±"],
+["8da1","㨃æ¢æ»æ‡æ‘šã©‹æ“€å´•å˜¡é¾Ÿãª—斆㪽旿晓㫲暒㬢朖㭂枤栀㭘桊梄㭲㭱㭻椉楃牜楤榟榅㮼槖ã¯æ©¥æ©´æ©±æª‚㯬檙㯲檫檵櫔櫶æ®æ¯æ¯ªæ±µæ²ªã³‹æ´‚洆洦æ¶ã³¯æ¶¤æ¶±æ¸•æ¸˜æ¸©æº†ð¨§€æº»æ»¢æ»šé½¿æ»¨æ»©æ¼¤æ¼´ãµ†ð£½æ¾æ¾¾ãµªãµµç†·å²™ã¶Šç€¬ã¶‘çç”ç¯ç¿ç‚‰ð Œ¥ä㗱𠻘"],
+["8e40","𣻗垾𦻓焾𥟠㙎榢𨯩孴穉𥣡𩓙穥穽𥦬窻窰竂竃燑ð¦’䇊竚ç«ç«ªä‡¯å’²ð¥°ç¬‹ç­•ç¬©ð¥ŒŽð¥³¾ç®¢ç­¯èŽœð¥®´ð¦±¿ç¯è¡ç®’箸𥴠㶭𥱥蒒篺簆簵ð¥³ç±„粃𤢂粦晽𤕸糉糇糦籴糳糵糎"],
+["8ea1","繧ä”𦹄çµð¦»–ç’綉綫焵綳緒ð¤—𦀩緤㴓緵𡟹緥ð¨­ç¸ð¦„¡ð¦…šç¹®çº’䌫鑬縧罀ç½ç½‡ç¤¶ð¦‹é§¡ç¾—ð¦‘羣𡙡ð ¨ä•œð£¦ä”ƒð¨Œºç¿ºð¦’‰è€…耈è€è€¨è€¯ðª‚‡ð¦³ƒè€»è€¼è¡ð¢œ”䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩ð ¬ð¦©’𣵾俹𡓽蓢è¢ð¦¬Šð¤¦§ð£”°ð¡³ð£·¸èŠªæ¤›ð¯¦”䇛"],
+["8f40","è•‹è‹èŒšð ¸–ð¡ž´ã›ð£…½ð£•šè‰»è‹¢èŒ˜ð£º‹ð¦¶£ð¦¬…𦮗𣗎㶿èŒå—¬èŽ…䔋𦶥莬èè“㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞è莑䒠蒓蓤𥲑䉀𥳀䕃蔴嫲𦺙䔧蕳䔖枿蘖"],
+["8fa1","𨘥𨘻è—𧂈蘂𡖂ð§ƒð¯¦²ä•ªè˜¨ã™ˆð¡¢¢å·ð§Žšè™¾è±ðªƒ¸èŸ®ð¢°§èž±èŸšè å™¡è™¬æ¡–ä˜è¡…衆𧗠𣶹𧗤衞袜䙛袴袵æ装ç·ð§œè¦‡è¦Šè¦¦è¦©è¦§è¦¼ð¨¨¥è§§ð§¤¤ð§ª½èªœçž“釾èªð§©™ç«©ð§¬ºð£¾äœ“𧬸煼謌謟ð¥°ð¥•¥è¬¿è­Œè­èª©ð¤©ºè®è®›èª¯ð¡›Ÿä˜•è¡è²›ð§µ”ð§¶ð¯§”㜥𧵓賖𧶘𧶽贒贃ð¡¤è³›çœè´‘𤳉ã»èµ·"],
+["9040","趩𨀂𡀔𤦊㭼𨆼𧄌竧躭躶軃鋔輙輭ð¨¥ð¨’辥錃𪊟ð ©è¾³ä¤ªð¨§žð¨”½ð£¶»å»¸ð£‰¢è¿¹ðª€”𨚼ð¨”𢌥㦀𦻗逷𨔼𧪾é¡ð¨•¬ð¨˜‹é‚¨ð¨œ“郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟é‰é‰¢ð¥–¹éŠ¹ð¨«†ð£²›ð¨¬Œð¥—›"],
+["90a1","𠴱錬é«ð¨«¡ð¨¯«ç‚嫃𨫢𨫥䥥鉄𨯬𨰹𨯿é³é‘›èº¼é–…é–¦é¦é– æ¿¶äŠ¹ð¢™ºð¨›˜ð¡‰¼ð£¸®ä§Ÿæ°œé™»éš–䅬隣𦻕懚隶磵𨫠隽åŒä¦¡ð¦²¸ð ‰´ð¦ð©‚¯ð©ƒ¥ð¤«‘𡤕𣌊霱虂霶ä¨ä”½ä–…𤫩çµå­éœ›éœð©‡•é—孊𩇫éŸé¥åƒð£‚·ð£‚¼éž‰éžŸéž±éž¾éŸ€éŸ’韠𥑬韮çœð©³éŸ¿éŸµð©ð§¥ºä«‘頴頳顋顦㬎𧅵㵑𠘰𤅜"],
+["9140","𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬é¸é¤¹ð¤¨©ä­²ð©¡—𩤅駵騌騻é¨é©˜ð¥œ¥ã›„𩂱𩯕髠髢𩬅髴䰎鬔鬭𨘀倴鬴𦦨㣃ð£½é­é­€ð©´¾å©…𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈"],
+["91a1","鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴éºéº•éºžéº¢ä´´éºªéº¯ð¤¤é»ã­ ã§¥ã´ä¼²ãž¾ð¨°«é¼‚鼈䮖é¤ð¦¶¢é¼—鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸ð¤ˆð¤©‘玞𨯚𡣺禟𨥾𨸶é©é³ð¨©„鋬éŽé‹ð¨¥¬ð¤’¹çˆ—㻫ç²ç©ƒçƒð¤‘³ð¤¸ç…¾ð¡Ÿ¯ç‚£ð¡¢¾ð£–™ã»‡ð¡¢…ð¥¯ð¡Ÿ¸ãœ¢ð¡›»ð¡ ¹ã›¡ð¡´ð¡£‘𥽋㜣𡛀å›ð¤¨¥ð¡¾ð¡Š¨"],
+["9240","ð¡†ð¡’¶è”ƒð£š¦è”ƒè‘•ð¤¦”𧅥𣸱𥕜𣻻ð§’䓴𣛮ð©¦ð¦¼¦æŸ¹ãœ³ã°•ã·§å¡¬ð¡¤¢æ ä—𣜿𤃡𤂋ð¤„𦰡哋嚞𦚱嚒𠿟𠮨ð ¸é†ð¨¬“鎜仸儫㠙ð¤¶äº¼ð ‘¥ð ¿ä½‹ä¾Šð¥™‘婨𠆫ð ‹ã¦™ð ŒŠð ”ãµä¼©ð ‹€ð¨º³ð ‰µè«šð ˆŒäº˜"],
+["92a1","åƒå„侢伃𤨎𣺊佂倮å¬å‚俌俥å˜åƒ¼å…™å…›å…兞湶𣖕𣸹𣺿浲𡢄𣺉冨凃𠗠ä“𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡é®ä™ºç†Œð¤ŽŒð ° ð¤¦¬ð¡ƒ¤æ§‘ð ¸ç‘¹ã»žç’™ç”瑖玘䮎𤪼ð¤‚åã–„çˆð¤ƒ‰å–´ð …å“𠯆åœé‰é›´é¦åŸåžå¿ã˜¾å£‹åª™ð¨©†ð¡›ºð¡¯ð¡œå¨¬å¦¸éŠå©¾å«å¨’𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃"],
+["9340","åªð¨¯—ð “é ç’Œð¡Œƒç„…䥲éˆð¨§»éŽ½ãž å°žå²žå¹žå¹ˆð¡¦–𡥼𣫮å»å­ð¡¤ƒð¡¤„ãœð¡¢ ã›ð¡›¾ã›“脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻孄蘔𧗽衠æ¾ð¢¡ ð¢˜«å¿›ãº¸ð¢–¯ð¢–¾ð©‚ˆð¦½³æ‡€ð €¾ð †ð¢˜›æ†™æ†˜æµð¢²›ð¢´‡ð¤›”ð©…"],
+["93a1","摱𤙥𢭪㨩𢬢ð£‘𩣪𢹸挷𪑛撶挱æ‘𤧣𢵧护𢲡æ»æ•«æ¥²ã¯´ð£‚Žð£Š­ð¤¦‰ð£Š«å”𣋠𡣙ð©¿æ›Žð£Š‰ð£†³ã« ä†ð¥–„𨬢ð¥–𡛼𥕛ð¥¥ç£®ð£„ƒð¡ ªð£ˆ´ã‘¤ð£ˆð£†‚𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢ð£¾ç“ã®–æžð¤˜ªæ¢¶æ žã¯„檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺歗𣿀𣲚鎠鋲𨯪𨫋"],
+["9440","銉𨀞𨧜鑧涥漋𤧬浧𣽿ã¶æ¸„𤀼娽渊塇洤硂焻𤌚𤉶烱ç‰çŠ‡çŠ”ð¤žð¤œ¥å…¹ð¤ª¤ð —«ç‘ºð£»¸ð£™Ÿð¤©Šð¤¤—𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌ç¼éŽ‡ç·ä’Ÿð¦·ªä•‘疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻"],
+["94a1","ã·ð¤©Žã»¿ð¤§…𤣳釺圲é‚𨫣𡡤僟𥈡𥇧ç¸ð£ˆ²çœŽçœç»ð¤š—ð£žã©žð¤£°ç¸ç’›ãº¿ð¤ªºð¤«‡äƒˆð¤ª–𦆮錇ð¥–ç žç¢ç¢ˆç£’ç祙ð§ð¥›£ä„Žç¦›è’–禥樭𣻺稺秴䅮𡛦䄲鈵秱𠵌𤦌𠊙𣶺ð¡®ã–—啫㕰㚪𠇔ð °ç«¢å©™ð¢›µð¥ª¯ð¥ªœå¨ð ‰›ç£°å¨ªð¥¯†ç«¾ä‡¹ç±ç±­äˆ‘𥮳𥺼𥺦ç³ð¤§¹ð¡ž°ç²Žç±¼ç²®æª²ç·œç¸‡ç·“罎𦉡"],
+["9540","𦅜𧭈綗𥺂䉪𦭵𠤖柖ð Žð£—埄ð¦’ð¦¸ð¤¥¢ç¿ç¬§ð  ¬ð¥«©ð¥µƒç¬Œð¥¸Žé§¦è™…驣樜ð£¿ã§¢ð¤§·ð¦–­é¨Ÿð¦– è’€ð§„§ð¦³‘䓪脷ä‚胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧è˜ð§ˆ›åª†ä…¿ð¡¡€å¬«ð¡¢¡å«¤ð¡£˜èš ð¯¦¼ð£¶è ­ð§¢å¨‚"],
+["95a1","衮佅袇袿裦襥è¥ð¥šƒè¥”𧞅𧞄𨯵𨯙𨮜𨧹㺭蒣䛵ä›ãŸ²è¨½è¨œð©‘ˆå½éˆ«ð¤Š„旔焩烄𡡅鵭貟賩𧷜妚矃姰ä®ã›”踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻é„𨩋ä¢ð¨«¼é§ð¨°ð¨°»è“¥è¨«é–™é–§é–—閖𨴴瑅㻂𤣿𤩂ð¤ªã»§ð£ˆ¥éšð¨»§ð¨¹¦ð¨¹¥ã»Œð¤§­ð¤©¸ð£¿®ç’瑫㻼éð©‚°"],
+["9640","桇ä¨ð©‚“𥟟éé¨ð¨¦‰ð¨°¦ð¨¬¯ð¦Ž¾éŠºå¬‘譩䤼ç¹ð¤ˆ›éž›é±é¤¸ð ¼¦å·ð¨¯…𤪲頟𩓚鋶𩗗釥䓀ð¨­ð¤©§ð¨­¤é£œð¨©…㼀鈪䤥è”餻é¥ð§¬†ã·½é¦›ä­¯é¦ªé©œð¨­¥ð¥£ˆæªé¨¡å«¾é¨¯ð©£±ä®ð©¥ˆé¦¼ä®½ä®—é½å¡²ð¡Œ‚堢𤦸"],
+["96a1","𡓨硄𢜟𣶸棅㵽鑘㤧æ…ð¢žð¢¥«æ„‡é±é±“鱻鰵é°é­¿é¯ð©¸­é®Ÿðª‡µðªƒ¾é´¡ä²®ð¤„„鸘䲰鴌𪆴𪃭𪃳𩤯鶥蒽𦸒𦿟𦮂藼䔳𦶤𦺄𦷰è è—®ð¦¸€ð£Ÿ—ð¦¤ç§¢ð£–œð£™€ä¤­ð¤§žãµ¢é›éŠ¾éˆð Š¿ç¢¹é‰·é‘俤㑀é¤ð¥•ç ½ç¡”碶硋ð¡—𣇉ð¤¥ãššä½²æ¿šæ¿™ç€žç€žå”𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉"],
+["9740","愌嫎娋䊼𤒈㜬䭻𨧼鎻鎸𡣖ð ¼è‘²ð¦³€ð¡“𤋺𢰦ð¤å¦”𣶷ð¦ç¶¨ð¦…›ð¦‚¤ð¤¦¹ð¤¦‹ð¨§ºé‹¥ç¢ã»©ç’´ð¨­£ð¡¢Ÿã»¡ð¤ª³æ«˜ç³ç»ã»–𤨾𤪔𡟙𤩦𠎧ð¡¤ð¤§¥ç‘ˆð¤¤–炥𤥶銄ç¦éŸð “¾éŒ±ð¨«Žð¨¨–鎆𨯧𥗕䤵𨪂煫"],
+["97a1","𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂ð¤©ð¡¡’ä”®é㜊𨫀𤦭妰𡢿𡢃𧒄媡㛢𣵛㚰鉟婹ð¨ªð¡¡¢é´ã³ð ª´äª–㦊僴㵩㵌𡎜煵䋻𨈘æ¸ð©ƒ¤ä“«æµ—ð§¹ç§æ²¯ã³–𣿭𣸭渂漌㵯ð µç•‘㚼㓈䚀㻚䡱姄鉮䤾è½ð¨°œð¦¯€å ’埈㛖𡑒烾ð¤¢ð¤©±ð¢¿£ð¡Š°ð¢Ž½æ¢¹æ¥§ð¡Ž˜ð£“¥ð§¯´ð£›Ÿð¨ªƒð£Ÿ–ð£ºð¤²Ÿæ¨šð£š­ð¦²·è¾ä“Ÿä“Ž"],
+["9840","𦴦𦵑𦲂𦿞漗𧄉茽𡜺è­ð¦²€ð§“𡟛妉媂𡞳婡婱𡤅𤇼㜭姯𡜼㛇熎éŽæššð¤Š¥å©®å¨«ð¤Š“樫𣻹𧜶𤑛𤋊ç„𤉙𨧡侰𦴨峂𤓎ð§¹ð¤Ž½æ¨Œð¤‰–𡌄炦焳ð¤©ã¶¥æ³Ÿð¯ ¥ð¤©ç¹¥å§«å´¯ã·³å½œð¤©ð¡ŸŸç¶¤è¦"],
+["98a1","咅𣫺𣌀𠈔å¾ð £•ð ˜™ã¿¥ð¡¾žðªŠ¶ç€ƒð©…›åµ°çŽç³“𨩙ð© ä¿ˆç¿§ç‹çŒð§«´çŒ¸çŒ¹ð¥›¶ççˆãº©ð§¬˜é¬ç‡µð¤£²ç¡è‡¶ã»ŠçœŒã»‘沢国ç™çžçŸã»¢ã»°ã»´ã»ºç““㼎㽓畂畭畲ç–㽼痈痜㿀ç™ã¿—癴㿜発𤽜熈嘣覀塩ä€çƒä€¹æ¡ä…㗛瞘äªä¯å±žçž¾çŸ‹å£²ç ˜ç‚¹ç œä‚¨ç ¹ç¡‡ç¡‘硦葈𥔵礳栃礲䄃"],
+["9940","䄉禑禙辻稆込䅧窑䆲窼艹䇄ç«ç«›ä‡ä¸¡ç­¢ç­¬ç­»ç°’簛䉠䉺类粜䊌粸䊔糭输烀ð ³ç·ç·”ç·ç·½ç¾®ç¾´çŠŸäŽ—耠耥笹耮耱è”㷌垴炠肷胩ä­è„ŒçŒªè„Žè„’ç• è„”ä㬹腖腙腚"],
+["99a1","ä“堺腼膄ä¥è†“ä­è†¥åŸ¯è‡è‡¤è‰”ä’芦艶苊苘苿䒰è—险榊è…烵葤惣蒈䔄蒾蓡蓸è”蔸蕒䔻蕯蕰藠䕷虲蚒蚲蛯际螋䘆䘗袮裿褤襇覑𧥧訩訸誔誴豑賔賲贜䞘塟跃䟭仮踺嗘å”蹱嗵躰䠷軎転軤軭軲辷è¿è¿Šè¿Œé€³é§„䢭飠鈓䤞鈨鉘鉫銱銮銿"],
+["9a40","鋣鋫鋳鋴鋽éƒéŽ„鎭䥅䥑麿é—åŒéé­é¾ä¥ªé‘”鑹锭関䦧间阳䧥枠䨤é€ä¨µéž²éŸ‚噔䫤惨颹䬙飱塄餎餙冴餜餷饂é¥é¥¢ä­°é§…ä®é¨¼é¬çªƒé­©é®é¯é¯±é¯´ä±­é° ã¯ð¡¯‚鵉鰺"],
+["9aa1","黾å™é¶“鶽鷀鷼银辶鹻麬麱麽黆铜黢黱黸竈齄𠂔𠊷𠎠椚铃妬𠓗塀é“㞹𠗕𠘕𠙶𡚺å—煳𠫂ð «ð ®¿å‘ªð¯ »ð ¯‹å’žð ¯»ð °»ð ±“𠱥𠱼惧ð ²å™ºð ²µð ³ð ³­ð µ¯ð ¶²ð ·ˆæ¥•é°¯èž¥ð ¸„𠸎𠻗ð ¾ð ¼­ð ¹³å° ð ¾¼å¸‹ð¡œð¡ð¡¶æœžð¡»ð¡‚ˆð¡‚–㙇𡂿𡃓𡄯𡄻å¤è’­ð¡‹£ð¡µð¡Œ¶è®ð¡•·ð¡˜™ð¡Ÿƒð¡Ÿ‡ä¹¸ç‚»ð¡ ­ð¡¥ª"],
+["9b40","𡨭𡩅𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕ð¢…槩㛈𢉼ð¢—ð¢ºð¢œªð¢¡±ð¢¥è‹½ð¢¥§ð¢¦“𢫕覥𢫨辠𢬎鞸𢬿顇骽𢱌"],
+["9b62","𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳ð£¦ð£ŒŸð£žå¾±æ™ˆæš¿ð§©¹ð£•§ð£—³çˆð¤¦ºçŸ—𣘚𣜖纇ð †å¢µæœŽ"],
+["9ba1","椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚ä£äª¸ð¤„™ð¨ªšð¤‹®ð¤Œð¤€»ð¤Œ´ð¤Ž–𤩅𠗊凒𠘑妟𡺨㮾𣳿ð¤„𤓖垈𤙴㦛𤜯𨗨𩧉ã¢ð¢‡ƒè­žð¨­Žé§–𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆ð ¹è»šð¥€¬åŠåœ¿ç…±ð¥Š™ð¥™ð£½Šð¤ª§å–¼ð¥‘†ð¥‘®ð¦­’釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿ð¥¡å¦ã“»ð£Œæƒžð¥¤ƒä¼ð¨¥ˆð¥ª®ð¥®‰ð¥°†ð¡¶åž¡ç…‘澶𦄂𧰒é–𦆲𤾚譢ð¦‚𦑊"],
+["9c40","嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧ð¯£ä¾»åš¹ð¤”¡ð¦›¼ä¹ªð¤¤´é™–æ¶ð¦²½ã˜˜è¥·ð¦ž™ð¦¡®ð¦‘𦡞營𦣇筂𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦𦨭㙟𦑩𠀡禃𦨴𦭛崬𣔙èð¦®ä›ð¦²¤ç”»è¡¥ð¦¶®å¢¶"],
+["9ca1","㜜ð¢–ð§‹ð§‡ã±”𧊀𧊅éŠð¢…ºð§Š‹éŒ°ð§‹¦ð¤§æ°¹é’Ÿð§‘𠻸蠧裵𢤦𨑳𡞱溸𤨪𡠠㦤㚹å°ç§£ä”¿æš¶ð©²­ð©¢¤è¥ƒð§ŸŒð§¡˜å›–䃟𡘊㦡𣜯𨃨ð¡…熭è¦ð§§ð©†¨å©§ä²·ð§‚¯ð¨¦«ð§§½ð§¨Šð§¬‹ð§µ¦ð¤…ºç­ƒç¥¾ð¨€‰æ¾µðª‹Ÿæ¨ƒð¨Œ˜åŽ¢ð¦¸‡éŽ¿æ ¶é𨅯𨀣𦦵ð¡­ð£ˆ¯ð¨ˆå¶…𨰰𨂃圕頣𨥉嶫𤦈斾槕å’𤪥ð£¾ã°‘朶ð¨‚𨃴𨄮𡾡ð¨…"],
+["9d40","𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺æ¦ð¨¥–砈鉕𨦸ä²ð¨§§äŸð¨§¨ð¨­†ð¨¯”姸𨰉輋𨿅𩃬筑ð©„𩄼㷷𩅞𤫊è¿çŠåš‹ð©“§ð©—©ð©–°ð©–¸ð©œ²ð©£‘𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达å—"],
+["9da1","辺𢒰边𤪓䔉繿潖檱仪㓤𨬬ð§¢ãœºèº€ð¡Ÿµð¨€¤ð¨­¬ð¨®™ð§¨¾ð¦š¯ã·«ð§™•ð£²·ð¥˜µð¥¥–亚ð¥ºð¦‰˜åš¿ð ¹­è¸Žå­­ð£ºˆð¤²žæžæ‹ð¡Ÿ¶ð¡¡»æ”°å˜­ð¥±Šåšð¥Œ‘㷆𩶘䱽嘢嘞罉𥻘奵𣵀è°ä¸œð ¿ªð µ‰ð£šºè„—鵞贘瘻鱅癎瞹é…å²è…ˆè‹·å˜¥è„²è˜è‚½å—ªç¥¢å™ƒå–ð ºã—Žå˜…嗱曱𨋢㘭甴嗰喺咗啲ð ±ð ²–å»ð¥…ˆð ¹¶ð¢±¢"],
+["9e40","𠺢麫絚嗞ð¡µæŠé­å’”è³ç‡¶é…¶æ¼æŽ¹æ¾å•©ð¢­ƒé±²ð¢º³å†šã“Ÿð ¶§å†§å‘唞唓癦踭𦢊疱肶蠄螆裇膶èœð¡ƒä“¬çŒ„𤜆å®èŒ‹ð¦¢“噻𢛴𧴯𤆣𧵳ð¦»ð§Š¶é…°ð¡‡™éˆˆð£³¼ðªš©ð º¬ð »¹ç‰¦ð¡²¢äŽð¤¿‚𧿹𠿫䃺"],
+["9ea1","é±æ”Ÿð¢¶ ä£³ð¤Ÿ ð©µ¼ð ¿¬ð ¸Šæ¢ð§–£ð ¿­"],
+["9ead","ð¦ˆð¡†‡ç†£çºŽéµä¸šä¸„ã•·å¬æ²²å§ãš¬ã§œå½ãš¥ð¤˜˜å¢šð¤­®èˆ­å‘‹åžªð¥ª•ð ¥¹"],
+["9ec5","㩒𢑥ç´ð©º¬ä´‰é¯­ð£³¾ð©¼°ä±›ð¤¾©ð©–žð©¿žè‘œð£¶¶ð§Š²ð¦ž³ð£œ æŒ®ç´¥ð£»·ð£¸¬ã¨ªé€ˆå‹Œã¹´ã™ºä—©ð ’Žç™€å«°ð º¶ç¡ºð§¼®å¢§ä‚¿å™¼é®‹åµ´ç™”ðª´éº…䳡痹㟻愙𣃚ð¤²"],
+["9ef5","å™ð¡Š©åž§ð¤¥£ð©¸†åˆ´ð§‚®ã–­æ±Šéµ¼"],
+["9f40","籖鬹埞ð¡¬å±“æ““ð©“𦌵𧅤蚭𠴨𦴢𤫢𠵱"],
+["9f4f","凾ð¡¼å¶Žéœƒð¡·‘éºéŒç¬Ÿé¬‚峑箣扨挵髿ç¯é¬ªç±¾é¬®ç±‚粆鰕篼鬉鼗鰛𤤾齚啳寃俽麘俲剠㸆勑å§å–妷帒韈鶫轜呩鞴饀鞺匬愰"],
+["9fa1","椬åšé°Šé´‚ä°»é™æ¦€å‚¦ç•†ð¡­é§šå‰³"],
+["9fae","é…™éšé…œ"],
+["9fb2","酑𨺗æ¿ð¦´£æ«Šå˜‘醎畺抅ð ¼ç籰𥰡𣳽"],
+["9fc1","𤤙盖é®ä¸ªð ³”莾衂"],
+["9fc9","届槀僭åºåˆŸå·µä»Žæ°±ð ‡²ä¼¹å’œå“šåŠšè¶‚㗾弌㗳"],
+["9fdb","歒酼龥鮗頮颴骺麨麄煺笔"],
+["9fe7","毺蠘罸"],
+["9feb","嘠𪙊蹷齓"],
+["9ff0","è·”è¹é¸œè¸æŠ‚ð¨½è¸¨è¹µç«“𤩷稾磘泪詧瘇"],
+["a040","𨩚鼦泎蟖痃𪊲硓咢贌狢ç±è¬­çŒ‚瓱賫𤪻蘯徺袠䒷"],
+["a055","𡠻𦸅"],
+["a058","詾𢔛"],
+["a05b","惽癧髗鵄é®é®èŸµ"],
+["a063","è è³·çŒ¬éœ¡é®°ã—–犲䰇籑饊𦅙慙䰄麖慽"],
+["a073","åŸæ…¯æŠ¦æˆ¹æ‹Žã©œæ‡¢åŽªð£µæ¤æ ‚ã—’"],
+["a0a1","嵗𨯂迚𨸹"],
+["a0a6","僙𡵆礆匲阸𠼻ä¥"],
+["a0ae","矾"],
+["a0b0","糂𥼚糚稭è¦è£çµç”…瓲覔舚朌è¢ð§’†è›ç“°è„ƒçœ¤è¦‰ð¦ŸŒç•“𦻑螩蟎臈螌詉貭譃眫瓸蓚㘵榲趦"],
+["a0d4","覩瑨涹èŸð¤€‘瓧㷛煶悤憜㳑煢æ·"],
+["a0e2","罱𨬭ç‰æƒ©ä­¾åˆ ã°˜ð£³‡ð¥»—𧙖𥔱𡥄𡋾𩤃𦷜𧂭å³ð¦†­ð¨¨ð£™·ð ƒ®ð¦¡†ð¤¼Žä•¢å¬Ÿð¦Œé½éº¦ð¦‰«"],
+["a3c0","â€",31,"â¡"],
+["c6a1","â‘ ",9,"â‘´",9,"â…°",9,"丶丿亅亠冂冖冫勹匸å©åŽ¶å¤Šå®€å·›â¼³å¹¿å»´å½å½¡æ”´æ— ç–’癶辵隶¨ˆヽヾã‚ゞ〃ä»ã€…〆〇ー[]✽ã",23],
+["c740","ã™",58,"ァアィイ"],
+["c7a1","ã‚¥",81,"Ð",5,"ÐЖ",4],
+["c840","Л",26,"ёж",25,"⇧↸↹ã‡ð ƒŒä¹šð ‚Šåˆ‚ä’‘"],
+["c8a1","龰冈龱𧘇"],
+["c8cd","¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌âºâº•âºœâºâº¥âº§âºªâº¬âº®âº¶âº¼âº¾â»†â»Šâ»Œâ»â»â»–⻗⻞⻣"],
+["c8f5","ʃÉɛɔɵœøŋʊɪ"],
+["f9fe","ï¿­"],
+["fa40","𠕇鋛𠗟𣿅蕌䊵ç¯å†µã™‰ð¤¥‚𨧤é„𡧛苮𣳈砼æ„拟𤤳𨦪𠊠𦮳𡌅侫𢓭倈𦴩𧪄𣘀𤪱𢔓倩ð ¾å¾¤ð Ž€ð ‡æ»›ð Ÿå½å„㑺儎顬ãƒè–𤦤𠒇兠𣎴兪𠯿𢃼𠋥𢔰𠖎𣈳𡦃宂è½ð –³ð£²™å†²å†¸"],
+["faa1","鴴凉å‡å‡‘㳜凓𤪦决凢å‚凭è椾𣜭彻刋刦刼劵剗劔効勅簕蕂勠è˜ð¦¬“包𨫞啉滙𣾀𠥔𣿬匳å„𠯢泋𡜦栛ç•æŠãºªã£Œð¡›¨ç‡ä’¢å­å´ð¨š«å¾å¿ð¡––𡘓矦厓𨪛厠厫厮玧ð¥²ã½™çŽœåå…汉义埾å™ãª«ð ®å ð£¿«ð¢¶£å¶ð ±·å“ç¹å”«æ™—浛呭𦭓𠵴å•å’咤䞦ð¡œð »ã¶´ð µ"],
+["fb40","𨦼𢚘啇䳭å¯ç—喆喩嘅𡣗𤀺䕒ð¤µæš³ð¡‚´å˜·æ›ð£ŠŠæš¤æš­å™å™ç£±å›±éž‡å¾åœ€å›¯å›­ð¨­¦ã˜£ð¡‰å†ð¤†¥æ±®ç‚‹å‚㚱𦱾埦ð¡–堃𡑔ð¤£å ¦ð¤¯µå¡œå¢ªã•¡å£ å£œð¡ˆ¼å£»å¯¿åƒðª…𤉸é“㖡够梦㛃湙"],
+["fba1","𡘾娤啓𡚒蔅姉𠵎ð¦²ð¦´ªð¡Ÿœå§™ð¡Ÿ»ð¡ž²ð¦¶¦æµ±ð¡ ¨ð¡›•å§¹ð¦¹…媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広å‹å­¶æ–ˆå­¼ð§¨Žä€„ä¡ð ˆ„寕慠𡨴𥧌𠖥寳å®ä´å°…ð¡­„å°“çŽå°”𡲥𦬨屉ä£å²…峩峯嶋𡷹𡸷å´å´˜åµ†ð¡º¤å²ºå·—苼㠭ð¤¤ð¢‰ð¢…³èŠ‡ã ¶ã¯‚帮檊幵幺𤒼𠳓厦亷å»åŽ¨ð¡±å¸‰å»´ð¨’‚"],
+["fc40","廹廻㢠廼栾é›å¼ð ‡ð¯¢”㫞䢮𡌺强𦢈ð¢å½˜ð¢‘±å½£éž½ð¦¹®å½²é€ð¨¨¶å¾§å¶¶ãµŸð¥‰ð¡½ªð§ƒ¸ð¢™¨é‡–𠊞𨨩怱暅𡡷㥣㷇㘹åžð¢ž´ç¥±ã¹€æ‚žæ‚¤æ‚³ð¤¦‚ð¤¦ð§©“璤僡媠慤è¤æ…‚慈𦻒æ†å‡´ð ™–憇宪𣾷"],
+["fca1","𢡟懓ð¨®ð©¥æ‡ã¤²ð¢¦€ð¢£æ€£æ…œæ”žæŽ‹ð „˜æ‹…ð¡°æ‹•ð¢¸æ¬ð¤§Ÿã¨—æ¸æ¸ð¡ŽŽð¡Ÿ¼æ’澊𢸶頔𤂌ð¥œæ“¡æ“¥é‘»ã©¦æºã©—æ•æ¼–𤨨𤨣斅敭敟ð£¾æ–µð¤¥€ä¬·æ—‘䃘𡠩无旣忟ð£€æ˜˜ð£‡·ð£‡¸æ™„𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂æžæ§æ¢ð¤‡ð©ƒ­æŸ—ä“©æ ¢æ¹éˆ¼æ ð£¦ð¦¶ æ¡"],
+["fd40","𣑯槡樋𨫟楳棃ð£—æ¤æ¤€ã´²ã¨ð£˜¼ã®€æž¬æ¥¡ð¨©Šä‹¼æ¤¶æ¦˜ã®¡ð ‰è£å‚槹𣙙𢄪橅𣜃æªã¯³æž±æ«ˆð©†œã°æ¬ð ¤£æƒžæ¬µæ­´ð¢Ÿæºµð£«›ð Žµð¡¥˜ã€å¡ð£­šæ¯¡ð£»¼æ¯œæ°·ð¢’‹ð¤£±ð¦­‘汚舦汹𣶼䓅𣶽𤆤𤤌𤤀"],
+["fda1","𣳉㛥㳫𠴲鮃𣇹𢒑ç¾æ ·ð¦´¥ð¦¶¡ð¦·«æ¶–浜湼漄𤥿𤂅𦹲蔳𦽴凇沜æ¸è®ð¨¬¡æ¸¯ð£¸¯ç‘“𣾂秌æ¹åª‘ð£‹æ¿¸ãœæ¾ð£¸°æ»ºð¡’—𤀽䕕é°æ½„潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀ð¦‡ç‹ç¾ç‚§ç‚烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜ð¤¥ç…é¢ð¤‹ç„¬ð¤‘šð¤¨§ð¤¨¢ç†ºð¨¯¨ç‚½çˆŽ"],
+["fe40","鑂爕夑鑃爤é𥘅爮牀𤥴梽牕牗㹕ð£„æ æ¼½çŠ‚猪猫𤠣𨠫䣭𨠄猨献ç玪𠰺𦨮ç‰ç‘‰ð¤‡¢ð¡›§ð¤¨¤æ˜£ã›…𤦷ð¤¦ð¤§»ç·ç•æ¤ƒð¤¨¦ç¹ð —ƒã»—瑜𢢭瑠𨺲瑇ç¤ç‘¶èŽ¹ç‘¬ãœ°ç‘´é±æ¨¬ç’‚䥓𤪌"],
+["fea1","𤅟𤩹ð¨®å­†ð¨°ƒð¡¢žç“ˆð¡¦ˆç”Žç“©ç”žð¨»™ð¡©‹å¯—𨺬鎅ç•ç•Šç•§ç•®ð¤¾‚㼄𤴓疎ç‘疞疴瘂瘬癑ç™ç™¯ç™¶ð¦µçšè‡¯ãŸ¸ð¦¤‘𦤎皡皥皷盌𦾟葢ð¥‚𥅽𡸜眞眦ç€æ’¯ð¥ˆ ç˜ð£Š¬çž¯ð¨¥¤ð¨¥¨ð¡›çŸ´ç ‰ð¡¶ð¤¨’棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗ç¦ð§¬¹ç¤¼ç¦©æ¸ªð§„¦ãº¨ç§†ð©„秔"]
+]
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp936.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp936.json
new file mode 100644
index 0000000..49ddb9a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp936.json
@@ -0,0 +1,264 @@
+[
+["0","\u0000",127,"€"],
+["8140","丂丄丅丆ä¸ä¸’丗丟丠両丣並丩丮丯丱丳丵丷丼乀ä¹ä¹‚乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"],
+["8180","äºäº–亗亙亜äºäºžäº£äºªäº¯äº°äº±äº´äº¶äº·äº¸äº¹äº¼äº½äº¾ä»ˆä»Œä»ä»ä»’仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜ä¼ä¼¡ä¼£ä¼¨ä¼©ä¼¬ä¼­ä¼®ä¼±ä¼³ä¼µä¼·ä¼¹ä¼»ä¼¾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀ä¾ä¾‚侅來侇侊侌侎ä¾ä¾’侓侕侖侘侙侚侜侞侟価侢"],
+["8240","侤侫侭侰",4,"侶",8,"ä¿€ä¿ä¿‚俆俇俈俉俋俌ä¿ä¿’",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11],
+["8280","個倎å€å€‘倓倕倖倗倛å€å€žå€ å€¢å€£å€¤å€§å€«å€¯",10,"倻倽倿å€åå‚å„å…å†å‰åŠå‹åå",4,"å–å—å˜å™å›å",7,"å¦",5,"å­",8,"å¸å¹åºå¼å½å‚傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"],
+["8340","傽",17,"åƒ",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"],
+["8380","儉儊儌",5,"å„“",13,"å„¢",28,"兂兇兊兌兎å…å…兒兓兗兘兙兛å…",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎å†å†å†‘冓冔冘冚å†å†žå†Ÿå†¡å†£å†¦",4,"冭冮冴冸冹冺冾冿å‡å‡‚凃凅凈凊å‡å‡Žå‡å‡’",5],
+["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌åˆåˆåˆ“刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎å‰å‰’剓剕剗剘"],
+["8480","剙剚剛å‰å‰Ÿå‰ å‰¢å‰£å‰¤å‰¦å‰¨å‰«å‰¬å‰­å‰®å‰°å‰±å‰³",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"å‹€å‹å‹‚勄勅勆勈勊勌å‹å‹Žå‹å‹‘勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽åŒåŒ‚匃匄匇匉匊匋匌匎"],
+["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽å€å‚å„å†å‹åŒååå”å˜å™å›åå¥å¨åªå¬å­å²å¶å¹å»å¼å½å¾åŽ€åŽåŽƒåŽ‡åŽˆåŽŠåŽŽåŽ"],
+["8580","åŽ",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾å€åƒ",4,"åŽååå’å“å•åšåœååžå¡å¢å§å´åºå¾å¿å€å‚å…å‡å‹å”å˜å™åšåœå¢å¤å¥åªå°å³å¶å·åºå½å¿å‘呂呄呅呇呉呌å‘å‘Žå‘å‘‘å‘šå‘",4,"呣呥呧呩",7,"呴呹呺呾呿å’咃咅咇咈咉咊å’咑咓咗咘咜咞咟咠咡"],
+["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜å”唞唟唡唥唦"],
+["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"å•å•žå•Ÿå• å•¢å•£å•¨å•©å•«å•¯",5,"啹啺啽啿喅喆喌å–å–Žå–喒喓喕喖喗喚喛喞喠",6,"å–¨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎å—å—å—•å——",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"],
+["8740","嘆嘇嘊嘋å˜å˜",7,"嘙嘚嘜å˜å˜ å˜¡å˜¢å˜¥å˜¦å˜¨å˜©å˜ªå˜«å˜®å˜¯å˜°å˜³å˜µå˜·å˜¸å˜ºå˜¼å˜½å˜¾å™€",11,"å™",4,"噕噖噚噛å™",4],
+["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"åšåš‘åš’åš”",14,"嚤",10,"åš°",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀åœåœ‚圅圇國",6],
+["8840","園",9,"åœåœžåœ åœ¡åœ¢åœ¤åœ¥åœ¦åœ§åœ«åœ±åœ²åœ´",4,"圼圽圿ååƒå„å…å†åˆå‰å‹å’",4,"å˜å™å¢å£å¥å§å¬å®å°å±å²å´åµå¸å¹åºå½å¾å¿åž€"],
+["8880","åžåž‡åžˆåž‰åžŠåž",4,"åž”",6,"åžœåžåžžåžŸåž¥åž¨åžªåž¬åž¯åž°åž±åž³åžµåž¶åž·åž¹",8,"埄",6,"埌åŸåŸåŸ‘埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿å å ƒå „堅堈堉堊堌堎å å å ’堓堔堖堗堘堚堛堜å å Ÿå ¢å £å ¥",4,"å «",4,"報堲堳場堶",7],
+["8940","å ¾",5,"å¡…",6,"å¡Žå¡å¡å¡’å¡“å¡•å¡–å¡—å¡™",4,"å¡Ÿ",5,"塦",4,"å¡­",16,"塿墂墄墆墇墈墊墋墌"],
+["8980","å¢",4,"墔",4,"墛墜å¢å¢ ",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎å¤å¤‘夒夓夗夘夛å¤å¤žå¤ å¤¡å¤¢å¤£å¤¦å¤¨å¤¬å¤°å¤²å¤³å¤µå¤¶å¤»"],
+["8a40","夽夾夿奀奃奅奆奊奌å¥å¥å¥’奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎å¦å¦å¦‘妔妕妘妚妛妜å¦å¦Ÿå¦ å¦¡å¦¢å¦¦"],
+["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌å§å§Žå§å§•å§–姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋å¨å¨Žå¨å¨å¨’娔娕娖娗娙娚娛å¨å¨žå¨¡å¨¢å¨¤å¨¦å¨§å¨¨å¨ª",6,"娳娵娷",4,"娽娾娿å©",4,"婇婈婋",9,"婖婗婘婙婛",5],
+["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"],
+["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"å«Šå«‹å«",4,"嫓嫕嫗嫙嫚嫛å«å«žå«Ÿå«¢å«¤å«¥å«§å«¨å«ªå«¬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"å­",6],
+["8c40","å­ˆ",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊å®å®Žå®å®‘宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀å¯å¯ƒå¯ˆå¯‰å¯Šå¯‹å¯å¯Žå¯"],
+["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌å°å°Žå°å°’尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌å±å±’屓屔屖屗屘屚屛屜å±å±Ÿå±¢å±¤å±§",6,"å±°å±²",6,"屻屼屽屾岀岃",4,"岉岊岋岎å²å²’岓岕å²",4,"岤",4],
+["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4],
+["8d80","å´å´„å´…å´ˆ",5,"å´",4,"崕崗崘崙崚崜å´å´Ÿ",4,"崥崨崪崫崬崯",4,"å´µ",7,"å´¿",7,"嵈嵉åµ",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"],
+["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"],
+["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋å¸å¸Žå¸’帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀å¹å¹ƒå¹†",5,"å¹",6,"å¹–",4,"幜å¹å¹Ÿå¹ å¹£",14,"幵幷幹幾åºåº‚広庅庈庉庌åºåºŽåº’庘庛åºåº¡åº¢åº£åº¤åº¨",4,"庮",4,"庴庺庻庼庽庿",6],
+["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌å¼å¼Žå¼å¼’弔弖弙弚弜å¼å¼žå¼¡å¼¢å¼£å¼¤"],
+["8f80","弨弫弬弮弰弲",6,"弻弽弾弿å½",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆å¾å¾Žå¾å¾‘従徔徖徚徛å¾å¾žå¾Ÿå¾ å¾¢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"],
+["9040","怈怉怋怌æ€æ€‘怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾æ€æ„",6,"æŒæŽææ‘æ“æ”æ–æ—æ˜æ›æœæžæŸæ æ¡æ¥æ¦æ®æ±æ²æ´æµæ·æ¾æ‚€"],
+["9080","æ‚悂悅悆悇悈悊悋悎æ‚æ‚悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌æ„",4,"愖愗愘愙愛愜æ„愞愡愢愥愨愩愪愬",18,"æ…€",6],
+["9140","慇慉態æ…æ…æ…慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌æ†æ†",4,"憕"],
+["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀æ‡æ‡ƒ",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜æˆæˆžæˆ æˆ£æˆ¦æˆ§æˆ¨æˆ©æˆ«æˆ­æˆ¯æˆ°æˆ±æˆ²æˆµæˆ¶æˆ¸",4,"扂扄扅扆扊"],
+["9240","æ‰æ‰æ‰•æ‰–扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽æŠæŠ‚抃抅抆抇抈抋",5,"抔抙抜æŠæŠžæŠ£æŠ¦æŠ§æŠ©æŠªæŠ­æŠ®æŠ¯æŠ°æŠ²æŠ³æŠ´æŠ¶æŠ·æŠ¸æŠºæŠ¾æ‹€æ‹"],
+["9280","拃拋æ‹æ‹‘æ‹•æ‹æ‹žæ‹ æ‹¡æ‹¤æ‹ªæ‹«æ‹°æ‹²æ‹µæ‹¸æ‹¹æ‹ºæ‹»æŒ€æŒƒæŒ„挅挆挊挋挌æŒæŒæŒæŒ’挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿æ€ææ„æ‡æˆæŠæ‘æ’æ“æ”æ–",7,"æ æ¤æ¥æ¦æ¨æªæ«æ¬æ¯æ°æ²æ³æ´æµæ¸æ¹æ¼æ½æ¾æ¿æŽæŽƒæŽ„掅掆掋æŽæŽ‘掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿æ€"],
+["9340","ææ‚æƒæ…æ‡æˆæŠæ‹æŒæ‘æ“æ”æ•æ—",6,"æŸæ¢æ¤",4,"æ«æ¬æ®æ¯æ°æ±æ³æµæ·æ¹æºæ»æ¼æ¾æƒæ„æ†",4,"ææŽæ‘æ’æ•",5,"ææŸæ¢æ£æ¤"],
+["9380","æ¥æ§æ¨æ©æ«æ®",5,"æµ",4,"æ»æ¼æ¾æ‘€æ‘‚摃摉摋",6,"æ‘“æ‘•æ‘–æ‘—æ‘™",4,"æ‘Ÿ",7,"摨摪摫摬摮",9,"æ‘»",6,"撃撆撈",8,"撓撔撗撘撚撛撜æ’æ’Ÿ",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿æ“擃擄擆",6,"æ“擑擓擔擕擖擙據"],
+["9440","擛擜æ“擟擠擡擣擥擧",24,"æ”",7,"攊",7,"攓",4,"æ”™",8],
+["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋æ•æ•Žæ•æ•’敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊æ–æ–Žæ–斒斔斕斖斘斚æ–斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊æ—æ—旑旓旔旕旘",7,"旡旣旤旪旫"],
+["9540","旲旳旴旵旸旹旻",4,"æ˜æ˜„昅昇昈昉昋æ˜æ˜æ˜‘昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"æ™æ™Žæ™æ™‘晘"],
+["9580","晙晛晜æ™æ™žæ™ æ™¢æ™£æ™¥æ™§æ™©",4,"晱晲晳晵晸晹晻晼晽晿暀æšæšƒæš…暆暈暉暊暋æšæšŽæšæšæš’暓暔暕暘",4,"æšž",8,"æš©",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽æœæœ‚會"],
+["9640","朄朅朆朇朌朎æœæœ‘朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿ææ„æ…æ‡æŠæ‹ææ’æ”æ•æ—",4,"ææ¢æ£æ¤æ¦æ§æ«æ¬æ®æ±æ´æ¶"],
+["9680","æ¸æ¹æºæ»æ½æž€æž‚枃枅枆枈枊枌æžæžŽæžæž‘枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾æ æ ‚栃栄栆æ æ æ ’栔栕栘",4,"æ žæ Ÿæ  æ ¢",6,"æ «",6,"栴栵栶栺栻栿桇桋æ¡æ¡æ¡’æ¡–",5],
+["9740","æ¡œæ¡æ¡žæ¡Ÿæ¡ªæ¡¬",7,"桵桸",8,"梂梄梇",7,"æ¢æ¢‘梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"],
+["9780","梹",6,"æ£æ£ƒ",5,"棊棌棎æ£æ£æ£‘棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌æ¤æ¤‘椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀æ¥æ¥ƒ",16,"楕楖楘楙楛楜楟"],
+["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿æ¦æ¦ƒæ¦…榊榋榌榎",5,"榖榗榙榚æ¦",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"],
+["9880","榾榿槀槂",7,"構æ§æ§æ§‘槒槓槕",5,"槜æ§æ§žæ§¡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"æ©‘",6,"æ©š"],
+["9940","æ©œ",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿æªæª‚檃檅",8,"æªæª’",4,"檘",7,"檡",5],
+["9980","檧檨檪檭",114,"欥欦欨",6],
+["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀æ­æ­‚歄歅歈歊歋æ­",11,"æ­š",7,"歨歩歫",13,"歺歽歾歿殀殅殈"],
+["9a80","殌殎æ®æ®æ®‘殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎æ¯æ¯‘毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"æ°ˆ",4,"æ°Žæ°’æ°—æ°œæ°æ°žæ° æ°£æ°¥æ°«æ°¬æ°­æ°±æ°³æ°¶æ°·æ°¹æ°ºæ°»æ°¼æ°¾æ°¿æ±ƒæ±„汅汈汋",4,"汑汒汓汖汘"],
+["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋æ²æ²Žæ²‘沒沕沖沗沘沚沜æ²æ²žæ² æ²¢æ²¨æ²¬æ²¯æ²°æ²´æ²µæ²¶æ²·æ²ºæ³€æ³æ³‚泃泆泇泈泋æ³æ³Žæ³æ³‘泒泘"],
+["9b80","泙泚泜æ³æ³Ÿæ³¤æ³¦æ³§æ³©æ³¬æ³­æ³²æ³´æ³¹æ³¿æ´€æ´‚洃洅洆洈洉洊æ´æ´æ´æ´‘洓洔洕洖洘洜æ´æ´Ÿ",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌æµæµ•æµ–浗浘浛æµæµŸæµ¡æµ¢æµ¤æµ¥æµ§æµ¨æµ«æµ¬æµ­æµ°æµ±æµ²æµ³æµµæµ¶æµ¹æµºæµ»æµ½",4,"涃涄涆涇涊涋æ¶æ¶æ¶æ¶’涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"æ·æ·‚淃淈淉淊"],
+["9c40","æ·æ·Žæ·æ·æ·’淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋æ¸æ¸’渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"],
+["9c80","渶渷渹渻",7,"æ¹…",7,"æ¹æ¹æ¹‘湒湕湗湙湚湜æ¹æ¹žæ¹ ",10,"湬湭湯",14,"満æºæº‚溄溇溈溊",4,"溑",6,"溙溚溛æºæºžæº æº¡æº£æº¤æº¦æº¨æº©æº«æº¬æº­æº®æº°æº³æºµæº¸æº¹æº¼æº¾æº¿æ»€æ»ƒæ»„滅滆滈滉滊滌æ»æ»Žæ»æ»’滖滘滙滛滜æ»æ»£æ»§æ»ª",5],
+["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"æ¼æ¼‘æ¼’æ¼–",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀æ½æ½‚"],
+["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛æ½æ½Ÿæ½ æ½¡æ½£æ½¤æ½¥æ½§",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋æ¾",12,"æ¾æ¾žæ¾Ÿæ¾ æ¾¢",4,"澨",10,"澴澵澷澸澺",5,"æ¿æ¿ƒ",5,"æ¿Š",6,"æ¿“",10,"濟濢濣濤濥"],
+["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6],
+["9e80","瀫",9,"瀶瀷瀸瀺",17,"ççŽç",13,"çŸ",11,"ç®ç±ç²ç³ç´ç·ç¹çºç»ç½ç‚炂炃炄炆炇炈炋炌ç‚ç‚ç‚炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"],
+["9f40","烜çƒçƒžçƒ çƒ¡çƒ¢çƒ£çƒ¥çƒªçƒ®çƒ°",6,"烸烺烻烼烾",10,"ç„‹",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"],
+["9f80","焵焷",13,"煆煇煈煉煋ç…ç…",12,"ç…ç…Ÿ",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌ç†ç†Žç†ç†‘熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"ç‡",4],
+["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19],
+["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎ç‰ç‰ç‰‘牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎çŠçŠ‘犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌ç‹ç‹‘狓狔狕狖狘狚狛"],
+["a1a1"," ã€ã€‚·ˉˇ¨〃々—~‖…‘’“â€ã€”〕〈",7,"〖〗ã€ã€‘±×÷∶∧∨∑âˆâˆªâˆ©âˆˆâˆ·âˆšâŠ¥âˆ¥âˆ âŒ’⊙∫∮≡≌≈∽âˆâ‰ â‰®â‰¯â‰¤â‰¥âˆžâˆµâˆ´â™‚♀°′″℃$¤¢£‰§№☆★○â—◎◇◆□■△▲※→â†â†‘↓〓"],
+["a2a1","â…°",9],
+["a2b1","â’ˆ",19,"â‘´",19,"â‘ ",9],
+["a2e5","㈠",9],
+["a2f1","â… ",11],
+["a3a1","ï¼ï¼‚#¥%",88,"ï¿£"],
+["a4a1","ã",82],
+["a5a1","ã‚¡",85],
+["a6a1","Α",16,"Σ",6],
+["a6c1","α",16,"σ",6],
+["a6e0","︵︶︹︺︿﹀︽︾ï¹ï¹‚﹃﹄"],
+["a6ee","︻︼︷︸︱"],
+["a6f4","︳︴"],
+["a7a1","Ð",5,"ÐЖ",25],
+["a7d1","а",5,"ёж",25],
+["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿â•",35,"â–",6],
+["a880","â–ˆ",7,"▓▔▕▼▽◢◣◤◥☉⊕〒ã€ã€ž"],
+["a8a1","ÄáǎàēéěèīíÇìÅóǒòūúǔùǖǘǚǜüêɑ"],
+["a8bd","ńň"],
+["a8c0","É¡"],
+["a8c5","ã„…",36],
+["a940","〡",8,"㊣㎎ãŽãŽœãŽãŽžãŽ¡ã„ãŽã‘ã’ã•ï¸°ï¿¢ï¿¤"],
+["a959","℡㈱"],
+["a95c","â€"],
+["a960","ー゛゜ヽヾ〆ã‚ゞ﹉",9,"﹔﹕﹖﹗﹙",8],
+["a980","﹢",4,"﹨﹩﹪﹫"],
+["a996","〇"],
+["a9a4","─",75],
+["aa40","ç‹œç‹ç‹Ÿç‹¢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌çŒçŒçŒçŒ‘猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽ç€",8],
+["aa80","ç‰çŠç‹çŒçŽçç‘ç“ç”ç•ç–ç˜",7,"ç¡",10,"ç®ç°ç±"],
+["ab40","ç²",11,"ç¿",4,"玅玆玈玊玌çŽçŽçŽçŽ’玓玔玕玗玘玙玚玜çŽçŽžçŽ çŽ¡çŽ£",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿ççƒ",4],
+["ab80","ç‹çŒçŽç’",6,"çšç›çœççŸç¡ç¢ç£ç¤ç¦ç¨çªç«ç¬ç®ç¯ç°ç±ç³",4],
+["ac40","ç¸",10,"ç„ç‡çˆç‹çŒççŽç‘",8,"çœ",5,"ç£ç¤ç§ç©ç«ç­ç¯ç±ç²ç·",4,"ç½ç¾ç¿ç‘€ç‘‚",11],
+["ac80","ç‘Ž",6,"瑖瑘ç‘ç‘ ",12,"瑮瑯瑱",4,"瑸瑹瑺"],
+["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌ç’ç’ç’‘",10,"ç’ç’Ÿ",7,"ç’ª",15,"ç’»",12],
+["ad80","瓈",9,"ç““",8,"ç“瓟瓡瓥瓧",6,"瓰瓱瓲"],
+["ae40","瓳瓵瓸",6,"甀ç”甂甃甅",7,"甎ç”甒甔甕甖甗甛ç”甞甠",4,"甦甧甪甮甴甶甹甼甽甿ç•ç•‚畃畄畆畇畉畊ç•ç•ç•‘畒畓畕畖畗畘"],
+["ae80","ç•",7,"畧畨畩畫",6,"畳畵當畷畺",4,"ç–€ç–ç–‚ç–„ç–…ç–‡"],
+["af40","疈疉疊疌ç–ç–Žç–疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀ç—痆痋痌痎ç—ç—痑痓痗痙痚痜ç—痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"],
+["af80","瘈瘉瘋ç˜ç˜Žç˜ç˜‘瘒瘓瘔瘖瘚瘜ç˜ç˜žç˜¡ç˜£ç˜§ç˜¨ç˜¬ç˜®ç˜¯ç˜±ç˜²ç˜¶ç˜·ç˜¹ç˜ºç˜»ç˜½ç™ç™‚癄"],
+["b040","ç™…",6,"癎",5,"癕癗",4,"ç™ç™Ÿç™ ç™¡ç™¢ç™¤",6,"癬癭癮癰",7,"癹発發癿皀çšçšƒçš…皉皊皌çšçšçšçš’皔皕皗皘皚皛"],
+["b080","çšœ",7,"皥",8,"皯皰皳皵",9,"盀ç›ç›ƒå•Šé˜¿åŸƒæŒ¨å“Žå”‰å“€çš‘癌蔼矮艾ç¢çˆ±éš˜éžæ°¨å®‰ä¿ºæŒ‰æš—岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭æŒæ‰’å­å§ç¬†å…«ç–¤å·´æ‹”è·‹é¶æŠŠè€™å霸罢爸白æŸç™¾æ‘†ä½°è´¥æ‹œç¨—æ–‘ç­æ¬æ‰³èˆ¬é¢æ¿ç‰ˆæ‰®æ‹Œä¼´ç“£åŠåŠžç»Šé‚¦å¸®æ¢†æ¦œè†€ç»‘棒磅蚌镑å‚谤苞胞包褒剥"],
+["b140","盄盇盉盋盌盓盕盙盚盜ç›ç›žç› ",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜çœçœžçœ¡çœ£çœ¤çœ¥çœ§çœªçœ«"],
+["b180","眬眮眰",4,"眹眻眽眾眿ç‚ç„ç…ç†çˆ",7,"ç’",7,"çœè–„雹ä¿å ¡é¥±å®æŠ±æŠ¥æš´è±¹é²çˆ†æ¯ç¢‘悲å‘北辈背è´é’¡å€ç‹ˆå¤‡æƒ«ç„™è¢«å¥”苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖å¸åº‡ç—¹é—­æ•å¼Šå¿…辟å£è‡‚é¿é™›éž­è¾¹ç¼–è´¬æ‰ä¾¿å˜åžè¾¨è¾©è¾«é标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"],
+["b240","ççžçŸç ç¤ç§ç©çªç­",11,"çºç»ç¼çžçž‚瞃瞆",5,"çžçžçž“",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4],
+["b280","瞼瞾矀",12,"矎",8,"矘矙矚çŸ",4,"矤病并玻è æ’­æ‹¨é’µæ³¢åšå‹ƒæ铂箔伯帛舶脖膊渤泊驳æ•åœå“ºè¡¥åŸ ä¸å¸ƒæ­¥ç°¿éƒ¨æ€–擦猜è£ææ‰è´¢ç¬è¸©é‡‡å½©èœè”¡é¤å‚蚕残惭惨ç¿è‹èˆ±ä»“沧è—æ“糙槽曹è‰åŽ•ç­–侧册测层蹭æ’å‰èŒ¬èŒ¶æŸ¥ç¢´æ½å¯Ÿå²”差诧拆柴豺æ€æŽºè‰é¦‹è°—缠铲产é˜é¢¤æ˜ŒçŒ–"],
+["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"ç Šç ‹ç Žç ç ç “砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿ç¡ç¡‚硃硄硆硈硉硊硋ç¡ç¡ç¡‘硓硔硘硙硚"],
+["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场å°å¸¸é•¿å¿è‚ åŽ‚敞畅唱倡超抄钞æœå˜²æ½®å·¢åµç‚’车扯撤掣彻澈郴臣辰尘晨忱沉陈è¶è¡¬æ’‘称城橙æˆå‘ˆä¹˜ç¨‹æƒ©æ¾„诚承逞骋秤åƒç—´æŒåŒ™æ± è¿Ÿå¼›é©°è€»é½¿ä¾ˆå°ºèµ¤ç¿…斥炽充冲虫崇宠抽酬畴踌稠æ„筹仇绸瞅丑臭åˆå‡ºæ©±åŽ¨èº‡é”„é›æ»é™¤æ¥š"],
+["b440","碄碅碆碈碊碋ç¢ç¢ç¢’碔碕碖碙ç¢ç¢žç¢ ç¢¢ç¢¤ç¢¦ç¢¨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌ç£ç£Žç£ç£‘磒磓磖磗磘磚",9],
+["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗æ触处æ£å·ç©¿æ¤½ä¼ èˆ¹å–˜ä¸²ç–®çª—幢床闯创å¹ç‚Šæ¶é”¤åž‚春椿醇唇淳纯蠢戳绰疵茨ç£é›Œè¾žæ…ˆç“·è¯æ­¤åˆºèµæ¬¡èªè‘±å›±åŒ†ä»Žä¸›å‡‘粗醋簇促蹿篡窜摧崔催脆ç˜ç²¹æ·¬ç¿ æ‘存寸磋撮æ“措挫错æ­è¾¾ç­”瘩打大呆歹傣戴带殆代贷袋待逮"],
+["b540","ç¤",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"],
+["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌ç¦ç¦Žç¦ç¦‘禒怠耽担丹å•éƒ¸æŽ¸èƒ†æ—¦æ°®ä½†æƒ®æ·¡è¯žå¼¹è›‹å½“挡党è¡æ¡£åˆ€æ£è¹ˆå€’岛祷导到稻悼é“盗德得的蹬ç¯ç™»ç­‰çžªå‡³é‚“堤低滴迪敌笛狄涤翟嫡抵底地蒂第å¸å¼Ÿé€’缔颠掂滇碘点典é›åž«ç”µä½ƒç”¸åº—惦奠淀殿碉å¼é›•å‡‹åˆæŽ‰åŠé’“调跌爹碟è¶è¿­è°å "],
+["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎ç§ç§ç§“秔秖秗秙",5,"秠秡秢秥秨秪"],
+["b680","秬秮秱",6,"秹秺秼秾秿ç¨ç¨„稅稇稈稉稊稌ç¨",4,"稕稖稘稙稛稜ä¸ç›¯å®é’‰é¡¶é¼Žé”­å®šè®¢ä¸¢ä¸œå†¬è‘£æ‡‚动栋侗æ«å†»æ´žå…œæŠ–斗陡豆逗痘都ç£æ¯’犊独读堵ç¹èµŒæœé•€è‚šåº¦æ¸¡å¦’端短锻段断缎堆兑队对墩å¨è¹²æ•¦é¡¿å›¤é’盾é掇哆多夺垛躲朵跺舵å‰æƒ°å •è›¾å³¨é¹…ä¿„é¢è®¹å¨¥æ¶åŽ„扼é鄂饿æ©è€Œå„¿è€³å°”饵洱二"],
+["b740","ç¨ç¨Ÿç¨¡ç¨¢ç¨¤",14,"稴稵稶稸稺稾穀",5,"穇",9,"ç©’",4,"穘",16],
+["b780","ç©©",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎çªçªçª“窔窙窚窛窞窡窢贰å‘罚ç­ä¼ä¹é˜€æ³•ç藩帆番翻樊矾钒ç¹å‡¡çƒ¦å返范贩犯饭泛åŠèŠ³æ–¹è‚ªæˆ¿é˜²å¦¨ä»¿è®¿çººæ”¾è²éžå•¡é£žè‚¥åŒªè¯½å è‚ºåºŸæ²¸è´¹èŠ¬é…šå©æ°›åˆ†çº·åŸç„šæ±¾ç²‰å¥‹ä»½å¿¿æ„¤ç²ªä¸°å°æž«èœ‚峰锋风疯烽逢冯ç¼è®½å¥‰å‡¤ä½›å¦å¤«æ•·è‚¤å­µæ‰¶æ‹‚è¾å¹…氟符ä¼ä¿˜æœ"],
+["b840","窣窤窧窩窪窫窮",4,"窴",10,"ç«€",10,"ç«Œ",9,"竗竘竚竛竜ç«ç«¡ç«¢ç«¤ç«§",5,"竮竰竱竲竳"],
+["b880","ç«´",4,"竻竼竾笀ç¬ç¬‚笅笇笉笌ç¬ç¬Žç¬ç¬’笓笖笗笘笚笜ç¬ç¬Ÿç¬¡ç¬¢ç¬£ç¬§ç¬©ç¬­æµ®æ¶ªç¦è¢±å¼—甫抚辅俯釜斧脯腑府è…赴副覆赋å¤å‚…付阜父腹负富讣附妇缚å’噶嘎该改概钙盖溉干甘æ†æŸ‘ç«¿è‚赶感秆敢赣冈刚钢缸肛纲岗港æ ç¯™çš‹é«˜è†ç¾”糕æžé•ç¨¿å‘Šå“¥æ­Œæ戈鸽胳疙割é©è‘›æ ¼è›¤é˜éš”铬个å„给根跟耕更庚羹"],
+["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊ç­ç­Žç­“筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿ç®ç®‚箃箄箆",6,"箎ç®"],
+["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功æ­é¾šä¾›èº¬å…¬å®«å¼“巩汞拱贡共钩勾沟苟狗垢构购够辜è‡å’•ç®ä¼°æ²½å­¤å§‘鼓å¤è›Šéª¨è°·è‚¡æ•…顾固雇刮瓜å‰å¯¡æŒ‚褂乖æ‹æ€ªæ£ºå…³å®˜å† è§‚管馆ç½æƒ¯çŒè´¯å…‰å¹¿é€›ç‘°è§„圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚æ£é”…郭国果裹过哈"],
+["ba40","篅篈築篊篋ç¯ç¯Žç¯ç¯ç¯’篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊ç°ç°Žç°",5,"簗簘簙"],
+["ba80","ç°š",4,"ç° ",5,"簨簩簫",12,"ç°¹",5,"籂骸孩海氦亥害骇酣憨邯韩å«æ¶µå¯’函喊罕翰撼æ旱憾æ‚焊汗汉夯æ­èˆªå£•åšŽè±ªæ¯«éƒå¥½è€—å·æµ©å‘µå–è·è核禾和何åˆç›’貉阂河涸赫è¤é¹¤è´ºå˜¿é»‘痕很狠æ¨å“¼äº¨æ¨ªè¡¡æ’轰哄烘虹鸿洪å®å¼˜çº¢å–‰ä¾¯çŒ´å¼åŽšå€™åŽå‘¼ä¹Žå¿½ç‘šå£¶è‘«èƒ¡è´ç‹ç³Šæ¹–"],
+["bb40","籃",9,"籎",36,"籵",5,"籾",9],
+["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗åŽçŒ¾æ»‘画划化è¯æ§å¾Šæ€€æ·®å欢环桓还缓æ¢æ‚£å”¤ç—ªè±¢ç„•æ¶£å®¦å¹»è’慌黄磺è—簧皇凰惶煌晃幌æè°Žç°æŒ¥è¾‰å¾½æ¢è›”回æ¯æ‚”æ…§å‰æƒ æ™¦è´¿ç§½ä¼šçƒ©æ±‡è®³è¯²ç»˜è¤æ˜å©šé­‚浑混è±æ´»ä¼™ç«èŽ·æˆ–惑éœè´§ç¥¸å‡»åœ¾åŸºæœºç•¸ç¨½ç§¯ç®•"],
+["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛ç³ç³žç³¡",6,"糩",5,"ç³°",7,"糹糺糼",13,"ç´‹",5],
+["bc80","ç´‘",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉å‰æžæ£˜è¾‘ç±é›†åŠæ€¥ç–¾æ±²å³å«‰çº§æŒ¤å‡ è„Šå·±è“ŸæŠ€å†€å­£ä¼Žç¥­å‰‚悸济寄寂计记既忌际妓继纪嘉枷夹佳家加èšé¢Šè´¾ç”²é’¾å‡ç¨¼ä»·æž¶é©¾å«æ­¼ç›‘åšå°–笺间煎兼肩艰奸缄茧检柬碱硷拣æ¡ç®€ä¿­å‰ªå‡è槛鉴践贱è§é”®ç®­ä»¶"],
+["bd40","紷",54,"絯",7],
+["bd80","絸",32,"å¥èˆ°å‰‘饯æ¸æº…涧建僵姜将浆江疆蒋桨奖讲匠酱é™è•‰æ¤’ç¤ç„¦èƒ¶äº¤éƒŠæµ‡éª„娇嚼æ…铰矫侥脚狡角饺缴绞剿教酵轿较å«çª–æ­æŽ¥çš†ç§¸è¡—阶截劫节桔æ°æ·ç«ç«­æ´ç»“解å§æˆ’藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进é³æ™‹ç¦è¿‘烬浸"],
+["be40","継",12,"綧",6,"綯",42],
+["be80","ç·š",32,"尽劲è†å…¢èŒŽç›æ™¶é²¸äº¬æƒŠç²¾ç²³ç»äº•è­¦æ™¯é¢ˆé™å¢ƒæ•¬é•œå¾„ç—‰é–竟竞净炯窘æªç©¶çº çŽ–韭久ç¸ä¹é…’厩救旧臼舅咎就疚鞠拘狙疽居驹èŠå±€å’€çŸ©ä¸¾æ²®èšæ‹’æ®å·¨å…·è·è¸žé”¯ä¿±å¥æƒ§ç‚¬å‰§æ鹃娟倦眷å·ç»¢æ’…攫抉掘倔爵觉决诀ç»å‡èŒé’§å†›å›å³»"],
+["bf40","ç·»",62],
+["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡éªå–€å’–å¡å’¯å¼€æ©æ¥·å‡¯æ…¨åˆŠå ªå‹˜åŽç çœ‹åº·æ…·ç³ æ‰›æŠ—亢炕考拷烤é å·è‹›æŸ¯æ£µç£•é¢—科壳咳å¯æ¸´å…‹åˆ»å®¢è¯¾è‚¯å•ƒåž¦æ³å‘å­ç©ºæ孔控抠å£æ‰£å¯‡æž¯å“­çªŸè‹¦é…·åº“裤夸垮挎跨胯å—筷侩快宽款匡ç­ç‹‚框矿眶旷况äºç›”岿窥葵奎é­å‚€"],
+["c040","繞",35,"纃",23,"纜çºçºž"],
+["c080","纮纴纻纼绖绤绬绹缊ç¼ç¼žç¼·ç¼¹ç¼»",6,"罃罆",9,"罒罓馈愧溃å¤æ˜†æ†å›°æ‹¬æ‰©å»“阔垃拉喇蜡腊辣啦莱æ¥èµ–è“婪æ æ‹¦ç¯®é˜‘兰澜谰æ½è§ˆæ‡’缆烂滥ç…榔狼廊郎朗浪æžåŠ³ç‰¢è€ä½¬å§¥é…ªçƒ™æ¶å‹’ä¹é›·é•­è•¾ç£Šç´¯å„¡åž’擂肋类泪棱楞冷厘梨çŠé»Žç¯±ç‹¸ç¦»æ¼“ç†æŽé‡Œé²¤ç¤¼èŽ‰è”å栗丽厉励砾历利傈例ä¿"],
+["c140","罖罙罛罜ç½ç½žç½ ç½£",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋ç¾ç¾",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"ç¾±"],
+["c180","ç¾³",4,"羺羻羾翀翂翃翄翆翇翈翉翋ç¿ç¿",4,"ç¿–ç¿—ç¿™",5,"翢翣痢立粒沥隶力璃哩俩è”莲连镰廉怜涟帘敛脸链æ‹ç‚¼ç»ƒç²®å‡‰æ¢ç²±è‰¯ä¸¤è¾†é‡æ™¾äº®è°…æ’©èŠåƒšç–—燎寥辽潦了撂镣廖料列裂烈劣猎ç³æž—磷霖临邻鳞淋凛èµå拎玲è±é›¶é¾„铃伶羚凌çµé™µå²­é¢†å¦ä»¤æºœç‰æ¦´ç¡«é¦ç•™åˆ˜ç˜¤æµæŸ³å…­é¾™è‹å’™ç¬¼çª¿"],
+["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎è€è€‘耓耚耛è€è€žè€Ÿè€¡è€£è€¤è€«",5,"耲耴耹耺耼耾è€èè„è…è‡èˆè‰èŽèèè‘è“è•è–è—"],
+["c280","è™è›",13,"è«",5,"è²",11,"隆垄拢陇楼娄æ‚篓æ¼é™‹èŠ¦å¢é¢…åºç‚‰æŽ³å¤è™é²éº“碌露路赂鹿潞禄录陆戮驴å•é“侣旅履屡缕虑氯律率滤绿峦挛孪滦åµä¹±æŽ ç•¥æŠ¡è½®ä¼¦ä»‘沦纶论è螺罗逻锣箩骡裸è½æ´›éª†ç»œå¦ˆéº»çŽ›ç èš‚马骂嘛å—埋买麦å–迈脉瞒馒蛮满蔓曼慢漫"],
+["c340","è¾è‚肂肅肈肊è‚",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"èƒ",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀è„脃脄脅脇脈脋"],
+["c380","脌脕脗脙脛脜è„è„Ÿ",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆å¯èŒ‚冒帽貌贸么玫枚梅酶霉煤没眉媒é•æ¯ç¾Žæ˜§å¯å¦¹åªšé—¨é—·ä»¬èŒè’™æª¬ç›Ÿé”°çŒ›æ¢¦å­Ÿçœ¯é†šé¡ç³œè¿·è°œå¼¥ç±³ç§˜è§…泌蜜密幂棉眠绵冕å…勉娩缅é¢è‹—æçž„è—秒渺庙妙蔑ç­æ°‘抿皿æ•æ‚¯é—½æ˜ŽèžŸé¸£é“­å命谬摸"],
+["c440","è…€",5,"腇腉è…è…Žè…腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸è†è†ƒ",4,"膉膋膌è†è†Žè†è†’",5,"膙膚膞",4,"膤膥"],
+["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋è‡",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟æŸæ‹‡ç‰¡äº©å§†æ¯å¢“暮幕募慕木目ç¦ç‰§ç©†æ‹¿å“ªå‘钠那娜纳氖乃奶è€å¥ˆå—男难囊挠脑æ¼é—¹æ·–å‘¢é¦å†…嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵æ»å¿µå¨˜é…¿é¸Ÿå°¿æè‚孽啮镊é•æ¶…您柠狞å‡å®"],
+["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎èˆèˆ‘舓舕",5,"èˆèˆ èˆ¤èˆ¥èˆ¦èˆ§èˆ©èˆ®èˆ²èˆºèˆ¼èˆ½èˆ¿"],
+["c580","艀è‰è‰‚艃艅艆艈艊艌è‰è‰Žè‰",7,"艙艛艜è‰è‰žè‰ ",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖è™ç–ŸæŒªæ‡¦ç³¯è¯ºå“¦æ¬§é¸¥æ®´è—•å‘•å¶æ²¤å•ªè¶´çˆ¬å¸•æ€•ç¶æ‹æŽ’牌徘湃派攀潘盘ç£ç›¼ç•”判å›ä¹“庞æ—耪胖抛咆刨炮è¢è·‘泡呸胚培裴赔陪é…佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋é¹æ§ç¢°å¯ç ’霹批披劈çµæ¯—"],
+["c640","艪艫艬艭艱艵艶艷艸艻艼芀èŠèŠƒèŠ…芆芇芉芌èŠèŠ“芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉è‹è‹–苙苚è‹è‹¢è‹§è‹¨è‹©è‹ªè‹¬è‹­è‹®è‹°è‹²è‹³è‹µè‹¶è‹¸"],
+["c680","苺苼",4,"茊茋èŒèŒèŒ’茓茖茘茙èŒ",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻å±è­¬ç¯‡å片骗飘漂瓢票撇瞥拼频贫å“è˜ä¹’åªè‹¹è平凭瓶评å±å¡æ³¼é¢‡å©†ç ´é­„迫粕剖扑铺仆莆葡è©è’²åŸ”朴圃普浦谱æ›ç€‘期欺栖戚妻七凄漆柒æ²å…¶æ£‹å¥‡æ­§ç•¦å´Žè„é½æ——祈ç¥éª‘起岂乞ä¼å¯å¥‘砌器气迄弃汽泣讫æŽ"],
+["c740","茾茿èè‚è„è…èˆèŠ",4,"è“è•",4,"èè¢è°",6,"è¹èºè¾",6,"莇莈莊莋莌èŽèŽèŽèŽ‘莔莕莖莗莙莚èŽèŽŸèŽ¡",6,"莬莭莮"],
+["c780","莯莵莻莾莿è‚èƒè„è†èˆè‰è‹èèŽèè‘è’è“è•è—è™èšè›èžè¢è£è¤è¦è§è¨è«è¬è­æ°æ´½ç‰µæ‰¦é’Žé“…åƒè¿ç­¾ä»Ÿè°¦ä¹¾é»”钱钳å‰æ½œé£æµ…谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭ä¿çªåˆ‡èŒ„且怯窃钦侵亲秦ç´å‹¤èŠ¹æ“’禽å¯æ²é’轻氢倾å¿æ¸…擎晴氰情顷请庆ç¼ç©·ç§‹ä¸˜é‚±çƒæ±‚囚酋泅趋区蛆曲躯屈驱渠"],
+["c840","è®è¯è³",4,"èºè»è¼è¾è¿è€è‚è…è‡èˆè‰èŠèè’",5,"è™èšè›èž",5,"è©",7,"è²",5,"è¹èºè»è¾",7,"葇葈葉"],
+["c880","è‘Š",6,"è‘’",4,"葘è‘葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼å–娶龋趣去圈颧æƒé†›æ³‰å…¨ç—Šæ‹³çŠ¬åˆ¸åŠç¼ºç‚”瘸å´é¹Šæ¦·ç¡®é›€è£™ç¾¤ç„¶ç‡ƒå†‰æŸ“瓤壤攘嚷让饶扰绕惹热壬ä»äººå¿éŸ§ä»»è®¤åˆƒå¦Šçº«æ‰”ä»æ—¥æˆŽèŒ¸è“‰è£èžç†”溶容绒冗æ‰æŸ”肉茹蠕儒孺如辱乳æ±å…¥è¤¥è½¯é˜®è•Šç‘žé”闰润若弱撒洒è¨è…®é³ƒå¡žèµ›ä¸‰å"],
+["c940","葽",4,"蒃蒄蒅蒆蒊è’è’",7,"蒘蒚蒛è’è’žè’Ÿè’ è’¢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎è“蓒蓔蓕蓗"],
+["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀è”蔂伞散桑嗓丧æ”骚扫嫂瑟色涩森僧莎砂æ€åˆ¹æ²™çº±å‚»å•¥ç…žç­›æ™’çŠè‹«æ‰å±±åˆ ç…½è¡«é—ªé™•æ“…赡膳善汕扇缮墒伤商èµæ™Œä¸Šå°šè£³æ¢¢æŽç¨çƒ§èŠå‹ºéŸ¶å°‘哨邵ç»å¥¢èµŠè›‡èˆŒèˆèµ¦æ‘„射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲å‡ç»³"],
+["ca40","蔃",8,"è”蔎è”è”蔒蔔蔕蔖蔘蔙蔛蔜è”蔞蔠蔢",8,"è”­",9,"蔾",4,"蕄蕅蕆蕇蕋",10],
+["ca80","蕗蕘蕚蕛蕜è•è•Ÿ",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀è–çœç››å‰©èƒœåœ£å¸ˆå¤±ç‹®æ–½æ¹¿è¯—尸虱å石拾时什食蚀实识å²çŸ¢ä½¿å±Žé©¶å§‹å¼ç¤ºå£«ä¸–柿事拭誓é€åŠ¿æ˜¯å—œå™¬é€‚仕ä¾é‡Šé¥°æ°å¸‚æƒå®¤è§†è¯•æ”¶æ‰‹é¦–守寿授售å—瘦兽蔬枢梳殊抒输å”舒淑ç–书赎孰熟薯暑曙署蜀é»é¼ å±žæœ¯è¿°æ ‘æŸæˆç«–墅庶数漱"],
+["cb40","薂薃薆薈",6,"è–",10,"è–",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"è—‚",6,"è—Š",4,"è—‘è—’"],
+["cb80","藔藖",5,"è—",6,"藥藦藧藨藪",14,"æ•åˆ·è€æ‘”衰甩帅栓拴霜åŒçˆ½è°æ°´ç¡ç¨Žå®çž¬é¡ºèˆœè¯´ç¡•æœ”çƒæ–¯æ’•å˜¶æ€ç§å¸ä¸æ­»è‚†å¯ºå—£å››ä¼ºä¼¼é¥²å·³æ¾è€¸æ€‚颂é€å®‹è®¼è¯µæœè‰˜æ“žå—½è‹é…¥ä¿—素速粟僳塑溯宿诉肃酸蒜算虽隋éšç»¥é«“碎å²ç©—é‚隧祟孙æŸç¬‹è“‘梭唆缩çç´¢é”所塌他它她塔"],
+["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"],
+["cc80","è™",11,"虒虓處",4,"虛虜è™è™Ÿè™ è™¡è™£",7,"ç­æŒžè¹‹è¸èƒŽè‹”抬å°æ³°é…žå¤ªæ€æ±°å摊贪瘫滩å›æª€ç—°æ½­è°­è°ˆå¦æ¯¯è¢’碳探å¹ç‚­æ±¤å¡˜æªå ‚棠膛å”糖倘躺淌趟烫æŽæ¶›æ»”绦è„桃逃淘陶讨套特藤腾疼誊梯剔踢锑æ题蹄啼体替åšæƒ•æ¶•å‰ƒå±‰å¤©æ·»å¡«ç”°ç”œæ¬èˆ”腆挑æ¡è¿¢çœºè·³è´´é“帖厅å¬çƒƒ"],
+["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"èšž",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"è›è›‚蛃蛅蛈蛌è›è›’蛓蛕蛖蛗蛚蛜"],
+["cd80","è›è› è›¡è›¢è›£è›¥è›¦è›§è›¨è›ªè›«è›¬è›¯è›µè›¶è›·è›ºè›»è›¼è›½è›¿èœèœ„蜅蜆蜋蜌蜎èœèœèœ‘蜔蜖汀廷åœäº­åº­æŒºè‰‡é€šæ¡é…®çž³åŒé“œå½¤ç«¥æ¡¶æ…筒统痛å·æŠ•å¤´é€å‡¸ç§ƒçªå›¾å¾’途涂屠土åå…”æ¹å›¢æŽ¨é¢“腿蜕褪退åžå±¯è‡€æ‹–托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄å¨"],
+["ce40","蜙蜛èœèœŸèœ èœ¤èœ¦èœ§èœ¨èœªèœ«èœ¬èœ­èœ¯èœ°èœ²èœ³èœµèœ¶èœ¸èœ¹èœºèœ¼èœ½è€",6,"èŠè‹èèèè‘è’è”è•è–è˜èš",5,"è¡è¢è¦",7,"è¯è±è²è³èµ"],
+["ce80","è·è¸è¹èºè¿èž€èžèž„螆螇螉螊螌螎",4,"螔螕螖螘",6,"èž ",4,"å·å¾®å±éŸ¦è¿æ¡…围唯惟为æ½ç»´è‹‡èŽå§”伟伪尾纬未蔚味ç•èƒƒå–‚é­ä½æ¸­è°“尉慰å«ç˜Ÿæ¸©èšŠæ–‡é—»çº¹å»ç¨³ç´Šé—®å—¡ç¿ç“®æŒèœ—涡çªæˆ‘æ–¡å§æ¡æ²ƒå·«å‘œé’¨ä¹Œæ±¡è¯¬å±‹æ— èŠœæ¢§å¾å´æ¯‹æ­¦äº”æ‚åˆèˆžä¼ä¾®åžæˆŠé›¾æ™¤ç‰©å‹¿åŠ¡æ‚Ÿè¯¯æ˜”熙æžè¥¿ç¡’矽晰嘻å¸é”¡ç‰º"],
+["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿èŸ",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜èŸèŸžèŸŸèŸ¡èŸ¢èŸ£èŸ¤èŸ¦èŸ§èŸ¨èŸ©èŸ«èŸ¬èŸ­èŸ¯",9],
+["cf80","蟺蟻蟼蟽蟿蠀è è ‚è „",5,"è ‹",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀æ¯å¸Œæ‚‰è†å¤•æƒœç†„烯溪æ±çŠ€æª„袭席习媳喜铣洗系隙æˆç»†çžŽè™¾åŒ£éœžè¾–暇峡侠狭下厦å¤å“掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷é™çº¿ç›¸åŽ¢é•¶é¦™ç®±è¥„湘乡翔祥详想å“享项巷橡åƒå‘象è§ç¡éœ„削哮嚣销消宵淆晓"],
+["d040","è ¤",13,"è ³",5,"蠺蠻蠽蠾蠿è¡è¡‚衃衆",5,"è¡Ž",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"],
+["d080","衻衼袀袃袆袇袉袊袌袎è¢è¢è¢‘袓袔袕袗",4,"è¢",4,"袣袥",5,"å°å­æ ¡è‚–啸笑效楔些歇èŽéž‹å挟æºé‚ªæ–œèƒè°å†™æ¢°å¸èŸ¹æ‡ˆæ³„泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸æ性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须å¾è®¸è“„é…—å™æ—­åºç•œæ¤çµ®å©¿ç»ªç»­è½©å–§å®£æ‚¬æ—‹çŽ„"],
+["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌è£è£è£è£‘裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀è¤è¤ƒ",5],
+["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚é´è–›å­¦ç©´é›ªè¡€å‹‹ç†å¾ªæ—¬è¯¢å¯»é©¯å·¡æ®‰æ±›è®­è®¯é€Šè¿…压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹ç›ä¸¥ç ”蜒岩延言颜阎炎沿奄掩眼è¡æ¼”艳堰燕厌砚é›å”彦焰宴谚验殃央鸯秧æ¨æ‰¬ä½¯ç–¡ç¾Šæ´‹é˜³æ°§ä»°ç—’养样漾邀腰妖瑶"],
+["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"],
+["d280","襽襾覀覂覄覅覇",26,"摇尧é¥çª‘谣姚咬舀è¯è¦è€€æ¤°å™Žè€¶çˆ·é‡Žå†¶ä¹Ÿé¡µæŽ–业å¶æ›³è…‹å¤œæ¶²ä¸€å£¹åŒ»æ–铱ä¾ä¼Šè¡£é¢å¤·é—移仪胰疑沂宜姨å½æ¤…èšå€šå·²ä¹™çŸ£ä»¥è‰ºæŠ‘易邑屹亿役臆逸肄疫亦裔æ„毅忆义益溢诣议谊译异翼翌绎茵è«å› æ®·éŸ³é˜´å§»åŸé“¶æ·«å¯…饮尹引éš"],
+["d340","覢",30,"觃è§è§“觔觕觗觘觙觛è§è§Ÿè§ è§¡è§¢è§¤è§§è§¨è§©è§ªè§¬è§­è§®è§°è§±è§²è§´",6],
+["d380","觻",4,"è¨",5,"計",21,"å°è‹±æ¨±å©´é¹°åº”缨莹è¤è¥è§è‡è¿Žèµ¢ç›ˆå½±é¢–硬映哟拥佣臃痈庸é›è¸Šè›¹å’泳涌永æ¿å‹‡ç”¨å¹½ä¼˜æ‚ å¿§å°¤ç”±é‚®é“€çŠ¹æ²¹æ¸¸é…‰æœ‰å‹å³ä½‘釉诱åˆå¹¼è¿‚淤于盂榆虞愚舆余俞逾鱼愉æ¸æ¸”隅予娱雨与屿禹宇语羽玉域芋éƒåé‡å–»å³ªå¾¡æ„ˆæ¬²ç‹±è‚²èª‰"],
+["d440","訞",31,"訿",8,"詉",21],
+["d480","è©Ÿ",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣è¢åŽŸæ´è¾•å›­å‘˜åœ†çŒ¿æºç¼˜è¿œè‹‘愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨å…è¿è•´é…晕韵孕åŒç ¸æ‚栽哉ç¾å®°è½½å†åœ¨å’±æ”’暂赞赃è„葬é­ç³Ÿå‡¿è—»æž£æ—©æ¾¡èš¤èºå™ªé€ çš‚ç¶ç‡¥è´£æ‹©åˆ™æ³½è´¼æ€Žå¢žæ†Žæ›¾èµ æ‰Žå–³æ¸£æœ­è½§"],
+["d540","èª",7,"誋",7,"誔",46],
+["d580","諃",32,"铡闸眨栅榨咋ä¹ç‚¸è¯ˆæ‘˜æ–‹å®…窄债寨瞻毡詹粘沾ç›æ–©è¾—崭展蘸栈å æˆ˜ç«™æ¹›ç»½æ¨Ÿç« å½°æ¼³å¼ æŽŒæ¶¨æ–丈å¸è´¦ä»—胀瘴障招昭找沼赵照罩兆肇å¬é®æŠ˜å“²è›°è¾™è€…锗蔗这浙ç斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣çå¾ç‹°äº‰æ€”整拯正政"],
+["d640","諤",34,"謈",27],
+["d680","謤謥謧",30,"帧症郑è¯èŠæžæ”¯å±èœ˜çŸ¥è‚¢è„‚æ±ä¹‹ç»‡èŒç›´æ¤æ®–执值侄å€æŒ‡æ­¢è¶¾åªæ—¨çº¸å¿—挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终ç§è‚¿é‡ä»²ä¼—舟周州洲诌粥轴肘帚咒皱宙昼骤ç æ ªè››æœ±çŒªè¯¸è¯›é€ç«¹çƒ›ç…®æ‹„瞩嘱主著柱助蛀贮铸筑"],
+["d740","è­†",31,"è­§",4,"è­­",25],
+["d780","讇",24,"讬讱讻诇è¯è¯ªè°‰è°žä½æ³¨ç¥é©»æŠ“爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘å ç¼€è°†å‡†æ‰æ‹™å“æ¡Œç¢èŒé…Œå•„ç€ç¼æµŠå…¹å’¨èµ„姿滋淄孜紫仔籽滓å­è‡ªæ¸å­—鬃棕踪宗综总纵邹走å¥æ租足å’æ—祖诅阻组钻纂嘴醉最罪尊éµæ˜¨å·¦ä½æŸžåšä½œå座"],
+["d840","è°¸",8,"豂豃豄豅豈豊豋è±",7,"豖豗豘豙豛",5,"è±£",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"],
+["d880","貈貋è²",6,"貕貖貗貙",20,"äºä¸Œå…€ä¸å»¿å…丕亘丞鬲孬噩丨禺丿匕乇夭爻å®æ°å›Ÿèƒ¤é¦—毓ç¾é¼—丶亟é¼ä¹œä¹©äº“芈孛啬å˜ä»„åŽåŽåŽ£åŽ¥åŽ®é¥èµåŒšåµåŒ¦åŒ®åŒ¾èµœå¦å£åˆ‚刈刎刭刳刿剀剌剞剡剜蒯剽劂åŠåŠåŠ“冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚ä½"],
+["d940","è²®",62],
+["d980","è³­",32,"佟佗伲伽佶佴侑侉侃ä¾ä½¾ä½»ä¾ªä½¼ä¾¬ä¾”俦俨俪俅俚俣俜俑俟俸倩åŒä¿³å€¬å€å€®å€­ä¿¾å€œå€Œå€¥å€¨å¾åƒå•åˆåŽå¬å»å‚¥å‚§å‚©å‚ºåƒ–儆僭僬僦僮儇儋ä»æ°½ä½˜ä½¥ä¿Žé¾ æ±†ç±´å…®å·½é»‰é¦˜å†å¤”勹åŒè¨‡åŒå‡«å¤™å…•äº å…–亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"],
+["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"],
+["da80","趢趤",12,"趲趶趷趹趻趽跀è·è·‚跅跇跈跉跊è·è·è·’跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋è¯è¯Žè¯’诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌è°è°‘谒谔谕谖谙谛谘è°è°Ÿè° è°¡è°¥è°§è°ªè°«è°®è°¯è°²è°³è°µè°¶å©åºé˜é˜¢é˜¡é˜±é˜ªé˜½é˜¼é™‚陉陔陟陧陬陲陴隈éšéš—éš°é‚—é‚›é‚邙邬邡邴邳邶邺"],
+["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋è¸è¸Žè¸è¸‘踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"],
+["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰éƒéƒ…邾éƒéƒ„郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆åˆå¥‚劢劬劭劾哿å‹å‹–å‹°åŸç‡®çŸå»´å‡µå‡¼é¬¯åŽ¶å¼ç•šå·¯åŒåž©åž¡å¡¾å¢¼å£…壑圩圬圪圳圹圮圯åœåœ»å‚å©åž…å«åž†å¼å»å¨å­å¶å³åž­åž¤åžŒåž²åŸåž§åž´åž“垠埕埘埚埙埒垸埴埯埸埤åŸ"],
+["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"èºèºŸ",11,"躭躮躰躱躳",6,"躻",7],
+["dc80","軃",10,"è»",21,"å ‹å åŸ½åŸ­å €å žå ™å¡„堠塥塬å¢å¢‰å¢šå¢€é¦¨é¼™æ‡¿è‰¹è‰½è‰¿èŠèŠŠèŠ¨èŠ„芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌è‹èŠ©èŠ´èŠ¡èŠªèŠŸè‹„苎芤苡茉苷苤èŒèŒ‡è‹œè‹´è‹’苘茌苻苓茑茚茆茔茕苠苕茜è‘è›èœèŒˆèŽ’茼茴茱莛èžèŒ¯èè‡èƒèŸè€èŒ—è èŒ­èŒºèŒ³è¦è¥"],
+["dd40","軥",62],
+["dd80","輤",32,"è¨èŒ›è©è¬èªè­è®èŽ°è¸èŽ³èŽ´èŽ èŽªèŽ“莜莅è¼èŽ¶èŽ©è½èŽ¸è»èŽ˜èŽžèŽ¨èŽºèŽ¼èèè¥è˜å ‡è˜è‹èè½è–èœè¸è‘è†è”èŸèèƒè¸è¹èªè…è€è¦è°è¡è‘œè‘‘葚葙葳蒇蒈葺蒉葸è¼è‘†è‘©è‘¶è’Œè’Žè±è‘­è“è“è“蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌ç”蔸蓰蔹蔟蔺"],
+["de40","è½…",32,"轪辀辌辒è¾è¾ è¾¡è¾¢è¾¤è¾¥è¾¦è¾§è¾ªè¾¬è¾­è¾®è¾¯è¾²è¾³è¾´è¾µè¾·è¾¸è¾ºè¾»è¾¼è¾¿è¿€è¿ƒè¿†"],
+["de80","迉",4,"è¿è¿’迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇è–蕹薮薜薅薹薷薰藓è—藜藿蘧蘅蘩蘖蘼廾弈夼å¥è€·å¥•å¥šå¥˜åŒå°¢å°¥å°¬å°´æ‰Œæ‰ªæŠŸæŠ»æ‹Šæ‹šæ‹—拮挢拶挹æ‹æƒæŽ­æ¶æ±æºæŽŽæŽ´æ­æŽ¬æŽŠæ©æŽ®æŽ¼æ²æ¸æ æ¿æ„æžæŽæ‘’æ†æŽ¾æ‘…æ‘æ‹æ›æ æŒæ¦æ¡æ‘žæ’„æ‘­æ’–"],
+["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿é€éƒé…é†éˆ",4,"éŽé”é•é–é™éšéœ",5,"é¤é¦é§é©éªé«é¬é¯",4,"é¶",6,"é¾é‚"],
+["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀æ“擗擤擢攉攥攮弋忒甙弑åŸå±å½å©å¨å»å’å–å†å‘‹å‘’呓呔呖呃å¡å‘—å‘™å£å²å’‚咔呷呱呤咚咛咄呶呦å’å“咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤å“å“哞唛哧唠哽唔哳唢唣å”唑唧唪啧å–喵啉啭å•å••å”¿å•å”¼"],
+["e040","郂郃郆郈郉郋郌éƒéƒ’郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀é„鄃鄅",19,"鄚鄛鄜"],
+["e080","é„鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈å–喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦å—嗄嗯嗥嗲嗳嗌å—嗨嗵嗤辔嘞嘈嘌å˜å˜¤å˜£å—¾å˜€å˜§å˜­å™˜å˜¹å™—嘬å™å™¢å™™å™œå™Œå™”嚆噤噱噫噻噼嚅嚓嚯囔囗å›å›¡å›µå›«å›¹å›¿åœ„圊圉圜å¸å¸™å¸”帑帱帻帼"],
+["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎é†é†“",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"],
+["e180","醼",10,"釈釋é‡é‡’",9,"é‡",8,"帷幄幔幛幞幡岌屺å²å²å²–岈岘岙岑岚岜岵岢岽岬岫岱岣å³å²·å³„峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯åµåµ«åµ‹åµŠåµ©åµ´å¶‚嶙å¶è±³å¶·å·…彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃ç‹ç‹Žç‹ç‹’狨狯狩狲狴狷çŒç‹³çŒƒç‹º"],
+["e240","釦",62],
+["e280","鈥",32,"狻猗猓猡猊猞çŒçŒ•çŒ¢çŒ¹çŒ¥çŒ¬çŒ¸çŒ±ççç—ç ç¬ç¯ç¾èˆ›å¤¥é£§å¤¤å¤‚饣饧",5,"饴饷饽馀馄馇馊é¦é¦é¦‘馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖å¿æ€ƒå¿®æ€„忡忤忾怅怆忪忭忸怙怵怦怛æ€æ€æ€©æ€«æ€Šæ€¿æ€¡æ¸æ¹æ»æºæ‚"],
+["e340","鉆",45,"鉵",16],
+["e380","銆",7,"éŠ",24,"æªæ½æ‚–æ‚šæ‚­æ‚悃悒悌悛惬悻悱æƒæƒ˜æƒ†æƒšæ‚´æ„ æ„¦æ„•æ„£æƒ´æ„€æ„Žæ„«æ…Šæ…µæ†¬æ†”憧憷懔懵å¿éš³é—©é—«é—±é—³é—µé—¶é—¼é—¾é˜ƒé˜„阆阈阊阋阌é˜é˜é˜’阕阖阗阙阚丬爿戕氵汔汜汊沣沅æ²æ²”沌汨汩汴汶沆沩æ³æ³”沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"],
+["e440","銨",5,"銯",24,"鋉",31],
+["e480","é‹©",32,"洹洧洌浃浈洇洄洙洎洫æµæ´®æ´µæ´šæµæµ’浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦æ·æ·™æ¸–涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴æ»æºæ»‚溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉æ¾æ¾Œæ½¸æ½²æ½¼æ½ºæ¿‘"],
+["e540","錊",51,"錿",10],
+["e580","éŠ",31,"é«æ¿‰æ¾§æ¾¹æ¾¶æ¿‚濡濮濞濠濯瀚瀣瀛瀹瀵ççžå®€å®„宕宓宥宸甯骞æ´å¯¤å¯®è¤°å¯°è¹‡è¬‡è¾¶è¿“迕迥迮迤迩迦迳迨逅逄逋逦逑é€é€–逡逵逶逭逯é„é‘é’éé¨é˜é¢é›æš¹é´é½é‚‚邈邃邋å½å½—彖彘尻咫å±å±™å­±å±£å±¦ç¾¼å¼ªå¼©å¼­è‰´å¼¼é¬»å±®å¦å¦ƒå¦å¦©å¦ªå¦£"],
+["e640","é¬",34,"éŽ",27],
+["e680","鎬",29,"é‹éŒé妗姊妫妞妤姒妲妯姗妾娅娆å§å¨ˆå§£å§˜å§¹å¨Œå¨‰å¨²å¨´å¨‘娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀éªéª…骈骊éªéª’骓骖骘骛骜éªéªŸéª éª¢éª£éª¥éª§çºŸçº¡çº£çº¥çº¨çº©"],
+["e740","éŽ",7,"é—",54],
+["e780","éŽ",32,"纭纰纾绀ç»ç»‚绉绋绌ç»ç»”绗绛绠绡绨绫绮绯绱绲ç¼ç»¶ç»ºç»»ç»¾ç¼ç¼‚缃缇缈缋缌ç¼ç¼‘缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟çç‚ç‘玷玳ç€ç‰çˆç¥ç™é¡¼çŠç©ç§çžçŽºç²ççªç‘›ç¦ç¥ç¨ç°ç®ç¬"],
+["e840","é¯",14,"é¿",43,"鑬鑭鑮鑯"],
+["e880","é‘°",20,"钑钖钘铇é“铓铔铚铦铻锜锠ç›çšç‘瑜瑗瑕瑙瑷瑭瑾璜璎璀ç’璇璋璞璨璩ç’璧瓒璺韪韫韬æŒæ“æžæˆæ©æž¥æž‡æªæ³æž˜æž§æµæž¨æžžæž­æž‹æ·æ¼æŸ°æ ‰æŸ˜æ ŠæŸ©æž°æ ŒæŸ™æžµæŸšæž³æŸæ €æŸƒæž¸æŸ¢æ ŽæŸæŸ½æ ²æ ³æ¡ æ¡¡æ¡Žæ¡¢æ¡„桤梃æ æ¡•æ¡¦æ¡æ¡§æ¡€æ ¾æ¡Šæ¡‰æ ©æ¢µæ¢æ¡´æ¡·æ¢“桫棂楮棼椟椠棹"],
+["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42],
+["e980","é–«",32,"椤棰椋æ¤æ¥—棣æ¤æ¥±æ¤¹æ¥ æ¥‚æ¥æ¦„楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱æ§æ§Šæ§Ÿæ¦•æ§ æ¦æ§¿æ¨¯æ§­æ¨—樘橥槲橄樾檠æ©æ©›æ¨µæªŽæ©¹æ¨½æ¨¨æ©˜æ©¼æª‘æªæª©æª—檫猷ç’æ®æ®‚殇殄殒殓æ®æ®šæ®›æ®¡æ®ªè½«è½­è½±è½²è½³è½µè½¶è½¸è½·è½¹è½ºè½¼è½¾è¾è¾‚辄辇辋"],
+["ea40","é—Œ",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾é™é™ƒé™Šé™Žé™é™‘陒陓陖陗"],
+["ea80","陘陙陚陜é™é™žé™ é™£é™¥é™¦é™«é™­",4,"陳陸",12,"隇隉隊è¾è¾Žè¾è¾˜è¾šè»Žæˆ‹æˆ—戛戟戢戡戥戤戬臧瓯瓴瓿ç”甑甓攴旮旯旰昊昙æ²æ˜ƒæ˜•æ˜€ç‚…æ›·æ˜æ˜´æ˜±æ˜¶æ˜µè€†æ™Ÿæ™”æ™æ™æ™–晡晗晷暄暌暧æšæš¾æ››æ›œæ›¦æ›©è´²è´³è´¶è´»è´½èµ€èµ…赆赈赉赇èµèµ•èµ™è§‡è§Šè§‹è§Œè§Žè§è§è§‘牮犟ç‰ç‰¦ç‰¯ç‰¾ç‰¿çŠ„犋çŠçŠçŠ’挈挲掰"],
+["eb40","隌階隑隒隓隕隖隚際éš",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋é›é›‘雓雔雖",9,"雡",6,"雫"],
+["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌éœéœ‘霒霔霕霗",4,"éœéœŸéœ æ¿æ“˜è€„毪毳毽毵毹氅氇氆æ°æ°•æ°˜æ°™æ°šæ°¡æ°©æ°¤æ°ªæ°²æ”µæ••æ•«ç‰ç‰’牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙èƒèƒ—æœèƒèƒ«èƒ±èƒ´èƒ­è„脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧å¡åªµè†ˆè†‚膑滕膣膪臌朦臊膻"],
+["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"é”é•é—é˜éšéœééŸé£é¤é¦é§é¨éª",7],
+["ec80","é²éµé·",4,"é½",7,"鞆",4,"鞌鞎éžéžéž“éž•éž–éž—éž™",4,"è‡è†¦æ¬¤æ¬·æ¬¹æ­ƒæ­†æ­™é£‘飒飓飕飙飚殳彀毂觳æ–齑斓於旆旄旃旌旎旒旖炀炜炖ç‚炻烀炷炫炱烨烊ç„焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹çˆçˆ¨ç¬ç„˜ç…¦ç†¹æˆ¾æˆ½æ‰ƒæ‰ˆæ‰‰ç¤»ç¥€ç¥†ç¥‰ç¥›ç¥œç¥“祚祢祗祠祯祧祺禅禊禚禧禳忑å¿"],
+["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46],
+["ed80","韤韥韨韮",4,"韴韷",23,"怼ææšæ§ææ™æ£æ‚«æ„†æ„æ…憩æ†æ‡‹æ‡‘戆肀è¿æ²“泶淼矶矸砀砉砗砘砑斫砭砜ç ç ¹ç ºç »ç Ÿç ¼ç ¥ç ¬ç £ç ©ç¡Žç¡­ç¡–ç¡—ç ¦ç¡ç¡‡ç¡Œç¡ªç¢›ç¢“碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄çœç›¹çœ‡çœˆçœšçœ¢çœ™çœ­çœ¦çœµçœ¸çç‘ç‡çƒçšç¨"],
+["ee40","é ",62],
+["ee80","é¡Ž",32,"ç¢ç¥ç¿çžç½çž€çžŒçž‘瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹ç¾ç½¾ç›ç›¥è ²é’…钆钇钋钊钌é’é’é’钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"é“铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"],
+["ef40","顯",5,"颋颎颒颕颙颣風",37,"é£é£é£”飖飗飛飜é£é£ ",4],
+["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊é”锎é”é”’",4,"锘锛é”锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎é•é•’镓镔镖镗镘镙镛镞镟é•é•¡é•¢é•¤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"],
+["f040","餈",4,"餎é¤é¤‘",28,"餯",26],
+["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑é»é¦¥ç©°çšˆçšŽçš“皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾é¹é¹‚鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠ç–疬疣疳疴疸痄疱疰痃痂痖ç—痣痨痦痤痫痧瘃痱痼痿ç˜ç˜€ç˜…瘌瘗瘊瘥瘘瘕瘙"],
+["f140","馌馎馚",10,"馦馧馩",47],
+["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳ç™ç™žç™”癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶è¥è¥¦è¥»ç–‹èƒ¥çš²çš´çŸœè€’耔耖耜耠耢耥耦耧耩耨耱耋耵èƒè†èè’è©è±è¦ƒé¡¸é¢€é¢ƒ"],
+["f240","駺",62],
+["f280","騹",32,"颉颌é¢é¢é¢”颚颛颞颟颡颢颥颦è™è™”虬虮虿虺虼虻蚨èšèš‹èš¬èšèš§èš£èšªèš“蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉è›èš´è›©è›±è›²è›­è›³è›èœ“蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊èœèœ‰èœ£èœ»èœžèœ¥èœ®èœšèœ¾èˆèœ´èœ±èœ©èœ·èœ¿èž‚蜢è½è¾è»è è°èŒè®èž‹è“è£è¼è¤è™è¥èž“螯螨蟒"],
+["f340","é©š",17,"驲骃骉éªéªŽéª”骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"é«é«Žé«é«é«’體髕髖髗髙髚髛髜"],
+["f380","é«é«žé« é«¢é«£é«¤é«¥é«§é«¨é«©é«ªé«¬é«®é«°",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅èˆç«ºç«½ç¬ˆç¬ƒç¬„笕笊笫ç¬ç­‡ç¬¸ç¬ªç¬™ç¬®ç¬±ç¬ ç¬¥ç¬¤ç¬³ç¬¾ç¬žç­˜ç­šç­…筵筌ç­ç­ ç­®ç­»ç­¢ç­²ç­±ç®ç®¦ç®§ç®¸ç®¬ç®ç®¨ç®…箪箜箢箫箴篑ç¯ç¯Œç¯ç¯šç¯¥ç¯¦ç¯ªç°Œç¯¾ç¯¼ç°ç°–ç°‹"],
+["f440","鬇鬉",5,"é¬é¬‘鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎é­é­’é­“é­•",5],
+["f480","é­›",32,"簟簪簦簸ç±ç±€è‡¾èˆèˆ‚舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋è‰è‰šè‰Ÿè‰¨è¡¾è¢…袈裘裟襞ç¾ç¾Ÿç¾§ç¾¯ç¾°ç¾²ç±¼æ•‰ç²‘ç²ç²œç²žç²¢ç²²ç²¼ç²½ç³ç³‡ç³Œç³ç³ˆç³…糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊é…é…Žé…é…¤"],
+["f540","é­¼",62],
+["f580","é®»",32,"酢酡酰酩酯酽酾酲酴酹醌醅é†é†é†‘醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎è·è·›è·†è·¬è··è·¸è·£è·¹è·»è·¤è¸‰è·½è¸”è¸è¸Ÿè¸¬è¸®è¸£è¸¯è¸ºè¹€è¸¹è¸µè¸½è¸±è¹‰è¹è¹‚蹑蹒蹊蹰蹶蹼蹯蹴躅èºèº”èºèºœèºžè±¸è²‚貊貅貘貔斛觖觞觚觜"],
+["f640","鯜",62],
+["f680","é°›",32,"觥觫觯訾謦é“雩雳雯霆éœéœˆéœéœŽéœªéœ­éœ°éœ¾é¾€é¾ƒé¾…",5,"龌黾鼋é¼éš¹éš¼éš½é›Žé›’瞿雠銎銮鋈錾éªéŠéŽé¾é‘«é±¿é²‚鲅鲆鲇鲈稣鲋鲎é²é²‘鲒鲔鲕鲚鲛鲞",5,"é²¥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"],
+["f740","é°¼",62],
+["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌é²é²“鲖鲗鲘鲙é²é²ªé²¬é²¯é²¹é²¾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜é³é³Ÿé³¢é¼éž…鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼é«é«€é«…髂髋髌髑魅魃魇魉魈é­é­‘飨é¤é¤®é¥•é¥”髟髡髦髯髫髻髭髹鬈é¬é¬“鬟鬣麽麾縻麂麇麈麋麒é–éºéºŸé»›é»œé»é» é»Ÿé»¢é»©é»§é»¥é»ªé»¯é¼¢é¼¬é¼¯é¼¹é¼·é¼½é¼¾é½„"],
+["f840","é³£",62],
+["f880","é´¢",32],
+["f940","鵃",62],
+["f980","鶂",32],
+["fa40","鶣",62],
+["fa80","é·¢",32],
+["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀é¹é¹é¹’鹓鹔鹖鹙é¹é¹Ÿé¹ é¹¡é¹¢é¹¥é¹®é¹¯é¹²é¹´",9,"麀"],
+["fb80","éºéºƒéº„麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"],
+["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌é»é»’黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6],
+["fc80","鼆",4,"鼌é¼é¼‘鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"],
+["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38],
+["fd80","é½¹",5,"é¾é¾‚é¾",11,"龜é¾é¾žé¾¡",4,"郎凉秊裏隣"],
+["fe40","兀ï¨ï¨Žï¨ï¨‘﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"]
+]
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp949.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp949.json
new file mode 100644
index 0000000..2022a00
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp949.json
@@ -0,0 +1,273 @@
+[
+["0","\u0000",127],
+["8141","갂갃갅갆갋",4,"갘갞갟갡갢갣갥",6,"갮갲갳갴"],
+["8161","갵갶갷갺갻갽갾갿ê±",9,"걌걎",5,"걕"],
+["8181","걖걗걙걚걛ê±",18,"걲걳걵걶걹걻",4,"겂겇겈ê²ê²Žê²ê²‘겒겓겕",6,"겞겢",5,"겫겭겮겱",6,"겺겾겿곀곂곃곅곆곇곉곊곋ê³",7,"곖곘",7,"곢곣곥곦곩곫곭곮곲곴곷",4,"곾곿ê´ê´‚괃괅괇",4,"ê´Žê´ê´’ê´“"],
+["8241","괔괕괖괗괙괚괛ê´ê´žê´Ÿê´¡",7,"괪괫괮",5],
+["8261","괶괷괹괺괻괽",6,"굆굈굊",5,"굑굒굓굕굖굗"],
+["8281","êµ™",7,"굢굤",7,"굮굯굱굲굷굸굹굺굾궀궃",4,"궊궋ê¶ê¶Žê¶ê¶‘",10,"궞",5,"궥",17,"궸",7,"귂귃귅귆귇귉",6,"ê·’ê·”",7,"ê·ê·žê·Ÿê·¡ê·¢ê·£ê·¥",18],
+["8341","귺귻귽귾긂",5,"긊긌긎",5,"긕",7],
+["8361","ê¸",18,"긲긳긵긶긹긻긼"],
+["8381","긽긾긿깂깄깇깈깉깋ê¹ê¹‘깒깓깕깗",4,"깞깢깣깤깦깧깪깫깭깮깯깱",6,"깺깾",5,"꺆",5,"êº",46,"꺿ê»ê»‚껃껅",6,"껎껒",5,"껚껛ê»",8],
+["8441","껦껧껩껪껬껮",5,"껵껶껷껹껺껻껽",8],
+["8461","꼆꼉꼊꼋꼌꼎ê¼ê¼‘",18],
+["8481","꼤",7,"꼮꼯꼱꼳꼵",6,"꼾꽀꽄꽅꽆꽇꽊",5,"꽑",10,"꽞",5,"꽦",18,"꽺",5,"ê¾ê¾‚꾃꾅꾆꾇꾉",6,"꾒꾓꾔꾖",5,"ê¾",26,"꾺꾻꾽꾾"],
+["8541","꾿ê¿",5,"ê¿Šê¿Œê¿",4,"ê¿•",6,"ê¿",4],
+["8561","꿢",5,"꿪",5,"꿲꿳꿵꿶꿷꿹",6,"뀂뀃"],
+["8581","뀅",6,"ë€ë€Žë€ë€‘뀒뀓뀕",6,"뀞",9,"뀩",26,"ë†ë‡ë‰ë‹ëëëë‘ë’ë–ë˜ëšë›ëœëž",29,"ë¾ë¿ë‚낂낃낅",6,"ë‚Žë‚ë‚’",5,"ë‚›ë‚낞낣낤"],
+["8641","낥낦낧낪낰낲낶낷낹낺낻낽",6,"냆냊",5,"냒"],
+["8661","냓냕냖냗냙",6,"냡냢냣냤냦",10],
+["8681","냱",22,"ë„Šë„ë„Žë„넑넔넕넖넗넚넞",4,"넦넧넩넪넫넭",6,"넶넺",5,"녂녃녅녆녇녉",6,"녒녓녖녗녙녚녛ë…ë…žë…Ÿë…¡",22,"녺녻녽녾녿ë†ë†ƒ",4,"놊놌놎ë†ë†ë†‘놕놖놗놙놚놛ë†"],
+["8741","놞",9,"놩",15],
+["8761","놹",18,"ë‡ë‡Žë‡ë‡‘뇒뇓뇕"],
+["8781","뇖",5,"뇞뇠",7,"뇪뇫뇭뇮뇯뇱",7,"뇺뇼뇾",5,"눆눇눉눊ëˆ",6,"눖눘눚",5,"눡",18,"눵",6,"눽",26,"뉙뉚뉛ë‰ë‰žë‰Ÿë‰¡",6,"뉪",4],
+["8841","뉯",4,"뉶",5,"뉽",6,"늆늇늈늊",4],
+["8861","ëŠëŠ’늓늕늖늗늛",4,"늢늤늧늨늩늫늭늮늯늱늲늳늵늶늷"],
+["8881","늸",15,"ë‹Šë‹‹ë‹ë‹Žë‹ë‹‘ë‹“",4,"닚닜닞닟닠닡닣닧닩닪닰닱닲닶닼닽닾댂댃댅댆댇댉",6,"댒댖",5,"ëŒ",54,"ë—ë™ëšëë ë¡ë¢ë£"],
+["8941","ë¦ë¨ëªë¬ë­ë¯ë²ë³ëµë¶ë·ë¹",6,"뎂뎆",5,"ëŽ"],
+["8961","뎎ëŽëŽ‘뎒뎓뎕",10,"뎢",5,"뎩뎪뎫뎭"],
+["8981","뎮",21,"ë†ë‡ë‰ëŠëëë‘ë’ë“ë–ë˜ëšëœëžëŸë¡ë¢ë£ë¥ë¦ë§ë©",18,"ë½",18,"ë‘",6,"ë™ëšë›ëëžëŸë¡",6,"ëªë¬",7,"ëµ",15],
+["8a41","둅",10,"둒둓둕둖둗둙",6,"둢둤둦"],
+["8a61","둧",4,"ë‘­",18,"ë’ë’‚"],
+["8a81","ë’ƒ",4,"ë’‰",19,"ë’ž",5,"뒥뒦뒧뒩뒪뒫뒭",7,"뒶뒸뒺",5,"ë“듂듃듅듆듇듉",6,"듑듒듓듔듖",5,"듞듟듡듢듥듧",4,"듮듰듲",5,"듹",26,"딖딗딙딚ë”"],
+["8b41","딞",5,"딦딫",4,"딲딳딵딶딷딹",6,"땂땆"],
+["8b61","땇땈땉땊땎ë•ë•‘ë•’ë•“ë••",6,"ë•žë•¢",8],
+["8b81","ë•«",52,"떢떣떥떦떧떩떬떭떮떯떲떶",4,"떾떿ë—뗂뗃뗅",6,"ë—Žë—’",5,"ë—™",18,"ë—­",18],
+["8c41","똀",15,"똒똓똕똖똗똙",4],
+["8c61","똞",6,"똦",5,"똭",6,"똵",5],
+["8c81","똻",12,"뙉",26,"뙥뙦뙧뙩",50,"뚞뚟뚡뚢뚣뚥",5,"뚭뚮뚯뚰뚲",16],
+["8d41","뛃",16,"뛕",8],
+["8d61","뛞",17,"뛱뛲뛳뛵뛶뛷뛹뛺"],
+["8d81","ë›»",4,"뜂뜃뜄뜆",33,"뜪뜫뜭뜮뜱",6,"뜺뜼",7,"ë…ë†ë‡ë‰ëŠë‹ë",6,"ë–",9,"ë¡ë¢ë£ë¥ë¦ë§ë©",6,"ë²ë´ë¶",5,"ë¾ë¿ëžëž‚랃랅",6,"랎랓랔랕랚랛ëžëžž"],
+["8e41","랟랡",6,"랪랮",5,"랶랷랹",8],
+["8e61","럂",4,"럈럊",19],
+["8e81","럞",13,"럮럯럱럲럳럵",6,"럾렂",4,"ë Šë ‹ë ë Žë ë ‘",6,"렚렜렞",5,"렦렧렩렪렫렭",6,"렶렺",5,"ë¡ë¡‚롃롅",11,"ë¡’ë¡”",7,"롞롟롡롢롣롥",6,"롮롰롲",5,"롹롺롻롽",7],
+["8f41","뢅",7,"뢎",17],
+["8f61","뢠",7,"뢩",6,"뢱뢲뢳뢵뢶뢷뢹",4],
+["8f81","뢾뢿룂룄룆",5,"ë£ë£Žë£ë£‘룒룓룕",7,"룞룠룢",5,"룪룫룭룮룯룱",6,"룺룼룾",5,"뤅",18,"뤙",6,"뤡",26,"뤾뤿ë¥ë¥‚륃륅",6,"ë¥ë¥Žë¥ë¥’",5],
+["9041","륚륛ë¥ë¥žë¥Ÿë¥¡",6,"륪륬륮",5,"륶륷륹륺륻륽"],
+["9061","륾",5,"릆릈릋릌ë¦",15],
+["9081","릟",12,"릮릯릱릲릳릵",6,"릾맀맂",5,"맊맋ë§ë§“",4,"맚맜맟맠맢맦맧맩맪맫맭",6,"맶맻",4,"먂",5,"먉",11,"먖",33,"먺먻먽먾먿ë©ë©ƒë©„멅멆"],
+["9141","멇멊멌ë©ë©ë©‘멒멖멗멙멚멛ë©",6,"멦멪",5],
+["9161","멲멳멵멶멷멹",9,"몆몈몉몊몋ëª",5],
+["9181","몓",20,"몪몭몮몯몱몳",4,"몺몼몾",5,"뫅뫆뫇뫉",14,"ë«š",33,"뫽뫾뫿ë¬ë¬‚묃묅",7,"묎ë¬ë¬’",5,"묙묚묛ë¬ë¬žë¬Ÿë¬¡",6],
+["9241","묨묪묬",7,"묷묹묺묿",4,"뭆뭈뭊뭋뭌뭎뭑뭒"],
+["9261","뭓뭕뭖뭗뭙",7,"뭢뭤",7,"뭭",4],
+["9281","ë­²",21,"뮉뮊뮋ë®ë®Žë®ë®‘",18,"뮥뮦뮧뮩뮪뮫뮭",6,"뮵뮶뮸",7,"ë¯ë¯‚믃믅믆믇믉",6,"믑믒믔",35,"믺믻믽믾ë°"],
+["9341","ë°ƒ",4,"ë°Šë°Žë°ë°’밓밙밚밠밡밢밣밦밨밪밫밬밮밯밲밳밵"],
+["9361","밶밷밹",6,"뱂뱆뱇뱈뱊뱋뱎ë±ë±‘",8],
+["9381","뱚뱛뱜뱞",37,"벆벇벉벊ë²ë²",4,"벖벘벛",4,"벢벣벥벦벩",6,"벲벶",5,"벾벿ë³ë³‚볃볅",7,"볎볒볓볔볖볗볙볚볛ë³",22,"볷볹볺볻볽"],
+["9441","볾",5,"봆봈봊",5,"봑봒봓봕",8],
+["9461","ë´ž",5,"ë´¥",6,"ë´­",12],
+["9481","ë´º",5,"ëµ",6,"뵊뵋ëµëµŽëµëµ‘",6,"뵚",9,"뵥뵦뵧뵩",22,"붂붃붅붆붋",4,"붒붔붖붗붘붛ë¶",6,"붥",10,"붱",6,"붹",24],
+["9541","뷒뷓뷖뷗뷙뷚뷛ë·",11,"ë·ª",5,"ë·±"],
+["9561","뷲뷳뷵뷶뷷뷹",6,"ë¸ë¸‚븄븆",5,"븎ë¸ë¸‘븒븓"],
+["9581","븕",6,"븞븠",35,"빆빇빉빊빋ë¹ë¹",4,"빖빘빜ë¹ë¹žë¹Ÿë¹¢ë¹£ë¹¥ë¹¦ë¹§ë¹©ë¹«",4,"빲빶",4,"빾빿ëºëº‚뺃뺅",6,"뺎뺒",5,"뺚",13,"뺩",14],
+["9641","뺸",23,"뻒뻓"],
+["9661","뻕뻖뻙",6,"뻡뻢뻦",5,"뻭",8],
+["9681","뻶",10,"뼂",5,"뼊",13,"뼚뼞",33,"뽂뽃뽅뽆뽇뽉",6,"뽒뽓뽔뽖",44],
+["9741","뾃",16,"뾕",8],
+["9761","뾞",17,"뾱",7],
+["9781","ë¾¹",11,"뿆",5,"ë¿Žë¿ë¿‘ë¿’ë¿“ë¿•",6,"ë¿ë¿žë¿ ë¿¢",89,"쀽쀾쀿"],
+["9841","ì€",16,"ì’",5,"ì™ìšì›"],
+["9861","ììžìŸì¡",6,"ìª",15],
+["9881","ìº",21,"ì‚’ì‚“ì‚•ì‚–ì‚—ì‚™",6,"삢삤삦",5,"삮삱삲삷",4,"삾샂샃샄샆샇샊샋ìƒìƒŽìƒìƒ‘",6,"샚샞",5,"샦샧샩샪샫샭",6,"샶샸샺",5,"ì„섂섃섅섆섇섉",6,"섑섒섓섔섖",5,"섡섢섥섨섩섪섫섮"],
+["9941","섲섳섴섵섷섺섻섽섾섿ì…",6,"ì…Šì…Ž",5,"ì…–ì…—"],
+["9961","셙셚셛ì…",6,"셦셪",5,"셱셲셳셵셶셷셹셺셻"],
+["9981","ì…¼",8,"솆",5,"ì†ì†‘솒솓솕솗",4,"솞솠솢솣솤솦솧솪솫솭솮솯솱",11,"솾",5,"쇅쇆쇇쇉쇊쇋ì‡",6,"쇕쇖쇙",6,"쇡쇢쇣쇥쇦쇧쇩",6,"쇲쇴",7,"쇾쇿ìˆìˆ‚숃숅",6,"숎ìˆìˆ’",5,"숚숛ìˆìˆžìˆ¡ìˆ¢ìˆ£"],
+["9a41","숤숥숦숧숪숬숮숰숳숵",16],
+["9a61","쉆쉇쉉",6,"쉒쉓쉕쉖쉗쉙",6,"쉡쉢쉣쉤쉦"],
+["9a81","쉧",4,"쉮쉯쉱쉲쉳쉵",6,"쉾슀슂",5,"슊",5,"슑",6,"슙슚슜슞",5,"슦슧슩슪슫슮",5,"슶슸슺",33,"싞싟싡싢싥",5,"싮싰싲싳싴싵싷싺싽싾싿ìŒ",6,"쌊쌋쌎ìŒ"],
+["9b41","ìŒìŒ‘쌒쌖쌗쌙쌚쌛ìŒ",6,"쌦쌧쌪",8],
+["9b61","쌳",17,"ì†",7],
+["9b81","ìŽ",25,"ìªì«ì­ì®ì¯ì±ì³",4,"ìºì»ì¾",5,"쎅쎆쎇쎉쎊쎋ìŽ",50,"ì",22,"ìš"],
+["9c41","ì›ììžì¡ì£",4,"ìªì«ì¬ì®",5,"ì¶ì·ì¹",5],
+["9c61","ì¿",8,"ì‰",6,"ì‘",9],
+["9c81","ì›",8,"ì¥",6,"ì­ì®ì¯ì±ì²ì³ìµ",6,"ì¾",9,"쑉",26,"쑦쑧쑩쑪쑫쑭",6,"쑶쑷쑸쑺",5,"ì’",18,"ì’•",6,"ì’",12],
+["9d41","쒪",13,"쒹쒺쒻쒽",8],
+["9d61","쓆",25],
+["9d81","ì“ ",8,"쓪",5,"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂",9,"ì”씎ì”씑씒씓씕",6,"ì”",10,"씪씫씭씮씯씱",6,"씺씼씾",5,"앆앇앋ì•ì•ì•‘앒앖앚앛앜앟앢앣앥앦앧앩",6,"앲앶",5,"앾앿ì–얂얃얅얆얈얉얊얋얎ì–ì–’ì–“ì–”"],
+["9e41","얖얙얚얛ì–ì–žì–Ÿì–¡",7,"ì–ª",9,"ì–¶"],
+["9e61","얷얺얿",4,"ì—‹ì—ì—ì—’ì—“ì—•ì—–ì——ì—™",6,"엢엤엦엧"],
+["9e81","엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋ì˜ì˜Žì˜ì˜‘",6,"옚ì˜",6,"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉",6,"ì™’ì™–",5,"왞왟왡",10,"왭왮왰왲",5,"왺왻왽왾왿ìš",6,"욊욌욎",5,"욖욗욙욚욛ìš",6,"욦"],
+["9f41","욨욪",5,"욲욳욵욶욷욻",4,"웂웄웆",5,"웎"],
+["9f61","ì›ì›‘웒웓웕",6,"웞웟웢",5,"웪웫웭웮웯웱웲"],
+["9f81","웳",4,"웺웻웼웾",5,"윆윇윉윊윋ìœ",6,"윖윘윚",5,"윢윣윥윦윧윩",6,"윲윴윶윸윹윺윻윾윿ìì‚ìƒì…",4,"ì‹ìŽìì™ìšì›ììžìŸì¡",6,"ì©ìªì¬",7,"ì¶ì·ì¹ìºì»ì¿ìž€ìžìž‚잆잋잌ìžìžìž’잓잕잙잛",4,"잢잧",4,"잮잯잱잲잳잵잶잷"],
+["a041","잸잹잺잻잾쟂",5,"쟊쟋ìŸìŸìŸ‘",6,"쟙쟚쟛쟜"],
+["a061","쟞",5,"쟥쟦쟧쟩쟪쟫쟭",13],
+["a081","쟻",4,"젂젃젅젆젇젉젋",4,"젒젔젗",4,"젞젟젡젢젣젥",6,"젮젰젲",5,"젹젺젻젽젾젿ì¡",6,"ì¡Šì¡‹ì¡Ž",5,"ì¡•",26,"졲졳졵졶졷졹졻",4,"좂좄좈좉좊좎",5,"좕",7,"좞좠좢좣좤"],
+["a141","좥좦좧좩",18,"좾좿죀ì£"],
+["a161","죂죃죅죆죇죉죊죋ì£",6,"죖죘죚",5,"죢죣죥"],
+["a181","죦",14,"죶",5,"죾죿ì¤ì¤‚줃줇",4,"줎 ã€ã€‚·‥…¨〃­―∥\∼‘’“â€ã€”〕〈",9,"±×÷≠≤≥∞∴°′″℃Å¢£¥♂♀∠⊥⌒∂∇≡≒§※☆★○â—◎◇◆□■△▲▽▼→â†â†‘↓↔〓≪≫√∽âˆâˆµâˆ«âˆ¬âˆˆâˆ‹âŠ†âŠ‡âŠ‚⊃∪∩∧∨¬"],
+["a241","ì¤ì¤’",5,"줙",18],
+["a261","줭",6,"줵",18],
+["a281","쥈",7,"쥒쥓쥕쥖쥗쥙",6,"쥢쥤",7,"쥭쥮쥯⇒⇔∀∃´~ˇ˘Ë˚˙¸˛¡¿Ë∮∑âˆÂ¤â„‰â€°â—◀▷▶♤♠♡♥♧♣⊙◈▣â—◑▒▤▥▨▧▦▩♨â˜â˜Žâ˜œâ˜žÂ¶â€ â€¡â†•â†—↙↖↘♭♩♪♬㉿㈜№ã‡â„¢ã‚ã˜â„¡â‚¬Â®"],
+["a341","쥱쥲쥳쥵",6,"쥽",10,"즊즋ì¦ì¦Žì¦"],
+["a361","즑",6,"즚즜즞",16],
+["a381","즯",16,"짂짃짅짆짉짋",4,"짒짔짗짘짛ï¼",58,"₩]",32,"ï¿£"],
+["a441","짞짟짡짣짥짦짨짩짪짫짮짲",5,"짺짻짽짾짿ì¨ì¨‚쨃쨄"],
+["a461","쨅쨆쨇쨊쨎",5,"쨕쨖쨗쨙",12],
+["a481","쨦쨧쨨쨪",28,"ㄱ",93],
+["a541","쩇",4,"ì©Žì©ì©‘ì©’ì©“ì©•",6,"ì©žì©¢",5,"쩩쩪"],
+["a561","쩫",17,"쩾",5,"쪅쪆"],
+["a581","쪇",16,"쪙",14,"ⅰ",9],
+["a5b0","â… ",9],
+["a5c1","Α",16,"Σ",6],
+["a5e1","α",16,"σ",6],
+["a641","쪨",19,"쪾쪿ì«ì«‚쫃쫅"],
+["a661","쫆",5,"ì«Žì«ì«’쫔쫕쫖쫗쫚",5,"ì«¡",6],
+["a681","쫨쫩쫪쫫쫭",6,"쫵",18,"쬉쬊─│┌â”┘└├┬┤┴┼â”┃â”┓┛┗┣┳┫┻╋┠┯┨┷┿â”┰┥┸╂┒┑┚┙┖┕┎â”┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀â•â•ƒ",7],
+["a741","쬋",4,"쬑쬒쬓쬕쬖쬗쬙",6,"쬢",7],
+["a761","쬪",22,"쭂쭃쭄"],
+["a781","쭅쭆쭇쭊쭋ì­ì­Žì­ì­‘",6,"쭚쭛쭜쭞",5,"ì­¥",7,"㎕㎖㎗ℓ㎘ã„㎣㎤㎥㎦㎙",9,"ãŠãŽãŽŽãŽã㎈㎉ãˆãŽ§ãŽ¨ãŽ°",9,"㎀",4,"㎺",5,"ãŽ",4,"Ωã€ã㎊㎋㎌ã–ã…㎭㎮㎯ã›ãŽ©ãŽªãŽ«ãŽ¬ããã“ãƒã‰ãœã†"],
+["a841","ì­­",10,"ì­º",14],
+["a861","쮉",18,"ì®",6],
+["a881","쮤",19,"쮹",11,"ÆêĦ"],
+["a8a6","IJ"],
+["a8a8","Ä¿ÅØŒºÞŦŊ"],
+["a8b1","㉠",27,"â“",25,"â‘ ",14,"½⅓⅔¼¾⅛⅜â…â…ž"],
+["a941","쯅",14,"쯕",10],
+["a961","쯠쯡쯢쯣쯥쯦쯨쯪",18],
+["a981","쯽",14,"ì°Žì°ì°‘ì°’ì°“ì°•",6,"찞찟찠찣찤æđðħıijĸŀłøœßþŧŋʼn㈀",27,"â’œ",25,"â‘´",14,"¹²³â´â¿â‚₂₃₄"],
+["aa41","찥찦찪찫찭찯찱",6,"찺찿",4,"챆챇챉챊챋ì±ì±Ž"],
+["aa61","ì±",4,"챖챚",5,"챡챢챣챥챧챩",6,"챱챲"],
+["aa81","챳챴챶",29,"ã",82],
+["ab41","첔첕첖첗첚첛ì²ì²žì²Ÿì²¡",6,"첪첮",5,"첶첷첹"],
+["ab61","첺첻첽",6,"쳆쳈쳊",5,"쳑쳒쳓쳕",5],
+["ab81","쳛",8,"쳥",6,"쳭쳮쳯쳱",12,"ァ",85],
+["ac41","쳾쳿촀촂",5,"ì´Šì´‹ì´ì´Žì´ì´‘",6,"촚촜촞촟촠"],
+["ac61","촡촢촣촥촦촧촩촪촫촭",11,"촺",4],
+["ac81","ì´¿",28,"ìµìµžìµŸÐ",5,"ÐЖ",25],
+["acd1","а",5,"ёж",25],
+["ad41","쵡쵢쵣쵥",6,"쵮쵰쵲",5,"쵹",7],
+["ad61","ì¶",6,"춉",10,"춖춗춙춚춛ì¶ì¶žì¶Ÿ"],
+["ad81","춠춡춢춣춦춨춪",5,"춱",18,"췅"],
+["ae41","ì·†",5,"ì·ì·Žì·ì·‘",16],
+["ae61","췢",5,"췩췪췫췭췮췯췱",6,"췺췼췾",4],
+["ae81","츃츅츆츇츉츊츋ì¸",6,"츕츖츗츘츚",5,"츢츣츥츦츧츩츪츫"],
+["af41","츬츭츮츯츲츴츶",19],
+["af61","칊",13,"칚칛ì¹ì¹žì¹¢",5,"칪칬"],
+["af81","칮",5,"칶칷칹칺칻칽",6,"캆캈캊",5,"캒캓캕캖캗캙"],
+["b041","캚",5,"캢캦",5,"캮",12],
+["b061","캻",5,"컂",19],
+["b081","ì»–",13,"컦컧컩컪컭",6,"컶컺",5,"ê°€ê°ê°„갇갈갉갊ê°",7,"ê°™",4,"갠갤갬갭갯갰갱갸갹갼걀걋ê±ê±”걘걜거걱건걷걸걺검ê²ê²ƒê²„겅겆겉겊겋게ê²ê²”겜ê²ê²Ÿê² ê²¡ê²¨ê²©ê²ªê²¬ê²¯ê²°ê²¸ê²¹ê²»ê²¼ê²½ê³ê³„곈곌곕곗고곡곤곧골곪곬곯곰곱곳공곶과곽관괄괆"],
+["b141","켂켃켅켆켇켉",6,"켒켔켖",5,"ì¼ì¼žì¼Ÿì¼¡ì¼¢ì¼£"],
+["b161","켥",6,"켮켲",5,"켹",11],
+["b181","ì½…",14,"콖콗콙콚콛ì½",6,"콦콨콪콫콬괌ê´ê´ê´‘괘괜괠괩괬괭괴괵괸괼굄굅굇굉êµêµ”굘굡굣구국군굳굴굵굶굻굼굽굿ê¶ê¶‚궈궉권ê¶ê¶œê¶ê¶¤ê¶·ê·€ê·ê·„ê·ˆê·ê·‘귓규균귤그극근귿글ê¸ê¸ˆê¸‰ê¸‹ê¸ê¸”기긱긴긷길긺김ê¹ê¹ƒê¹…깆깊까ê¹ê¹Žê¹ê¹”깖깜ê¹ê¹Ÿê¹ ê¹¡ê¹¥ê¹¨ê¹©ê¹¬ê¹°ê¹¸"],
+["b241","콭콮콯콲콳콵콶콷콹",6,"ì¾ì¾‚쾃쾄쾆",5,"ì¾"],
+["b261","쾎",18,"쾢",5,"쾩"],
+["b281","쾪",5,"ì¾±",18,"ì¿…",6,"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌ê»ê»ê»ê»‘께껙껜껨껫껭껴껸껼꼇꼈ê¼ê¼ê¼¬ê¼­ê¼°ê¼²ê¼´ê¼¼ê¼½ê¼¿ê½ê½‚꽃꽈꽉ê½ê½œê½ê½¤ê½¥ê½¹ê¾€ê¾„꾈ê¾ê¾‘꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋ê¿ê¿Žê¿”꿜꿨꿩꿰꿱꿴꿸뀀ë€ë€„뀌ë€ë€”뀜ë€ë€¨ë„ë…ëˆëŠëŒëŽë“ë”ë•ë—ë™"],
+["b341","쿌",19,"쿢쿣쿥쿦쿧쿩"],
+["b361","쿪",5,"쿲쿴쿶",5,"쿽쿾쿿í€í€‚퀃퀅",5],
+["b381","퀋",5,"퀒",5,"퀙",19,"ëë¼ë½ë‚€ë‚„ë‚Œë‚ë‚낑나낙낚난낟날낡낢남납낫",4,"낱낳내낵낸낼냄냅냇냈냉ëƒëƒ‘냔냘냠냥너넉넋넌ë„넒넓넘넙넛넜ë„넣네넥넨넬넴넵넷넸넹녀ë…ë…„ë…ˆë…녑녔녕녘녜녠노녹논놀놂놈놉놋ë†ë†’놓놔놘놜놨뇌ë‡ë‡”뇜ë‡"],
+["b441","퀮",5,"퀶퀷퀹퀺퀻퀽",6,"í†íˆíŠ",5],
+["b461","í‘í’í“í•í–í—í™",6,"í¡",10,"í®í¯"],
+["b481","í±í²í³íµ",6,"í¾í¿í‚€í‚‚",18,"뇟뇨뇩뇬뇰뇹뇻뇽누눅눈눋눌눔눕눗눙눠눴눼뉘뉜뉠뉨뉩뉴뉵뉼늄늅늉ëŠëŠ‘는늘늙늚늠늡늣능늦늪늬늰늴니닉닌ë‹ë‹’님닙닛ë‹ë‹¢ë‹¤ë‹¥ë‹¦ë‹¨ë‹«",4,"닳담답닷",4,"닿대ëŒëŒ„댈ëŒëŒ‘댓댔댕댜ë”ë•ë–ë˜ë›ëœëžëŸë¤ë¥"],
+["b541","킕",14,"킦킧킩킪킫킭",5],
+["b561","킳킶킸킺",5,"탂탃탅탆탇탊",5,"탒탖",4],
+["b581","탛탞탟탡탢탣탥",6,"탮탲",5,"탹",11,"ë§ë©ë«ë®ë°ë±ë´ë¸ëŽ€ëŽëŽƒëŽ„뎅뎌ëŽëŽ”뎠뎡뎨뎬ë„ë…ëˆë‹ëŒëŽëë”ë•ë—ë™ë›ëë ë¤ë¨ë¼ëë˜ëœë ë¨ë©ë«ë´ë‘둑둔둘둠둡둣둥둬뒀뒈ë’뒤뒨뒬뒵뒷뒹듀듄듈ë“ë“•ë“œë“든듣들듦듬듭듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸"],
+["b641","í„…",7,"í„Ž",17],
+["b661","턠",15,"턲턳턵턶턷턹턻턼턽턾"],
+["b681","í„¿í…‚í…†",5,"í…Ží…í…‘í…’í…“í…•",6,"í…ží… í…¢",5,"텩텪텫텭땀ë•ë•ƒë•„ë•…ë•‹ë•Œë•ë•ë•”ë•œë•ë•Ÿë• ë•¡ë– ë–¡ë–¤ë–¨ë–ªë–«ë–°ë–±ë–³ë–´ë–µë–»ë–¼ë–½ë—€ë—„ë—Œë—ë—ë—뗑뗘뗬ë˜ë˜‘똔똘똥똬똴뙈뙤뙨뚜ëšëš ëš¤ëš«ëš¬ëš±ë›”뛰뛴뛸뜀ëœëœ…뜨뜩뜬뜯뜰뜸뜹뜻ë„ëˆëŒë”ë•ë ë¤ë¨ë°ë±ë³ëµë¼ë½ëž€ëž„람ëžëžëžëž‘ëž’ëž–ëž—"],
+["b741","텮",13,"텽",6,"톅톆톇톉톊"],
+["b761","톋",20,"톢톣톥톦톧"],
+["b781","톩",6,"톲톴톶톷톸톹톻톽톾톿í‡",14,"래랙랜랠램랩랫랬랭랴략랸럇량러럭런럴럼럽럿렀ë ë ‡ë ˆë ‰ë Œë ë ˜ë ™ë ›ë ë ¤ë ¥ë ¨ë ¬ë ´ë µë ·ë ¸ë ¹ë¡€ë¡„ë¡‘ë¡“ë¡œë¡ë¡ ë¡¤ë¡¬ë¡­ë¡¯ë¡±ë¡¸ë¡¼ë¢ë¢¨ë¢°ë¢´ë¢¸ë£€ë£ë£ƒë£…료ë£ë£”ë£ë£Ÿë£¡ë£¨ë£©ë£¬ë£°ë£¸ë£¹ë£»ë£½ë¤„뤘뤠뤼뤽륀륄륌ë¥ë¥‘류륙륜률륨륩"],
+["b841","í‡",7,"퇙",17],
+["b861","퇫",8,"퇵퇶퇷퇹",13],
+["b881","툈툊",5,"툑",24,"륫륭르륵른를름릅릇릉릊ë¦ë¦Žë¦¬ë¦­ë¦°ë¦´ë¦¼ë¦½ë¦¿ë§ë§ˆë§‰ë§Œë§Ž",4,"맘맙맛ë§ë§žë§¡ë§£ë§¤ë§¥ë§¨ë§¬ë§´ë§µë§·ë§¸ë§¹ë§ºë¨€ë¨ë¨ˆë¨•ë¨¸ë¨¹ë¨¼ë©€ë©‚멈멉멋ë©ë©Žë©“메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼"],
+["b941","툪툫툮툯툱툲툳툵",6,"툾퉀퉂",5,"퉉퉊퉋퉌"],
+["b961","í‰",14,"í‰",6,"퉥퉦퉧퉨"],
+["b981","퉩",22,"튂튃튅튆튇튉튊튋튌묀묄ë¬ë¬ë¬‘묘묜묠묩묫무묵묶문묻물묽묾뭄뭅뭇뭉ë­ë­ë­ë­”뭘뭡뭣뭬뮈뮌ë®ë®¤ë®¨ë®¬ë®´ë®·ë¯€ë¯„믈ë¯ë¯“미믹민믿밀밂밈밉밋밌ë°ë°ë°‘ë°”",4,"ë°›",4,"밤밥밧방밭배백밴밸뱀ë±ë±ƒë±„뱅뱉뱌ë±ë±ë±ë²„벅번벋벌벎범법벗"],
+["ba41","íŠíŠŽíŠíŠ’튓튔튖",5,"íŠíŠžíŠŸíŠ¡íŠ¢íŠ£íŠ¥",6,"튭"],
+["ba61","튮튯튰튲",5,"튺튻튽튾í‹í‹ƒ",4,"í‹Ší‹Œ",5],
+["ba81","틒틓틕틖틗틙틚틛í‹",6,"틦",9,"틲틳틵틶틷틹틺벙벚베벡벤벧벨벰벱벳벴벵벼벽변별ë³ë³ë³ë³‘볕볘볜보복볶본볼봄봅봇봉ë´ë´”봤봬뵀뵈뵉뵌ëµëµ˜ëµ™ëµ¤ëµ¨ë¶€ë¶ë¶„붇불붉붊ë¶ë¶‘붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브ë¸ë¸ë¸”븜ë¸ë¸Ÿë¹„빅빈빌빎빔빕빗빙빚빛빠빡빤"],
+["bb41","í‹»",4,"팂팄팆",5,"íŒíŒ‘팒팓팕팗",4,"팞팢팣"],
+["bb61","팤팦팧팪팫팭팮팯팱",6,"팺팾",5,"í†í‡íˆí‰"],
+["bb81","íŠ",31,"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌ëºëºëºëº‘뺘뺙뺨ë»ë»‘뻔뻗뻘뻠뻣뻤뻥뻬ë¼ë¼ˆë¼‰ë¼˜ë¼™ë¼›ë¼œë¼ë½€ë½ë½„뽈ë½ë½‘뽕뾔뾰뿅뿌ë¿ë¿ë¿”뿜뿟뿡쀼ì‘ì˜ìœì ì¨ì©ì‚삑삔삘삠삡삣삥사삭삯산삳살삵삶삼삽삿샀ìƒìƒ…새색샌ìƒìƒ˜ìƒ™ìƒ›ìƒœìƒìƒ¤"],
+["bc41","íª",17,"í¾í¿íŽíŽ‚펃펅펆펇"],
+["bc61","펈펉펊펋펎펒",5,"펚펛íŽíŽžíŽŸíŽ¡",6,"펪펬펮"],
+["bc81","펯",4,"펵펶펷펹펺펻펽",6,"í†í‡íŠ",5,"í‘",5,"샥샨샬샴샵샷샹섀섄섈ì„ì„•ì„œ",4,"섣설섦섧섬섭섯섰성섶세섹센셀셈셉셋셌ì…셔셕션셜셤셥셧셨셩셰셴셸솅소ì†ì†Žì†ì†”솖솜ì†ì†Ÿì†¡ì†¥ì†¨ì†©ì†¬ì†°ì†½ì‡„쇈쇌쇔쇗쇘쇠쇤쇨쇰쇱쇳쇼쇽숀숄숌ìˆìˆìˆ‘수숙순숟술숨숩숫숭"],
+["bd41","í—í™",7,"í¢í¤",7,"í®í¯í±í²í³íµí¶í·"],
+["bd61","í¸í¹íºí»í¾í€í‚",5,"í‰",13],
+["bd81","í—",5,"íž",25,"숯숱숲숴쉈ì‰ì‰‘쉔쉘쉠쉥쉬쉭쉰쉴쉼쉽쉿ìŠìŠˆìŠ‰ìŠìŠ˜ìŠ›ìŠìŠ¤ìŠ¥ìŠ¨ìŠ¬ìŠ­ìŠ´ìŠµìŠ·ìŠ¹ì‹œì‹ì‹ ì‹£ì‹¤ì‹«ì‹¬ì‹­ì‹¯ì‹±ì‹¶ì‹¸ì‹¹ì‹»ì‹¼ìŒ€ìŒˆìŒ‰ìŒŒìŒìŒ“쌔쌕쌘쌜쌤쌥쌨쌩ì…ì¨ì©ì¬ì°ì²ì¸ì¹ì¼ì½ìŽ„쎈쎌ì€ì˜ì™ìœìŸì ì¢ì¨ì©ì­ì´ìµì¸ìˆìì¤ì¬ì°"],
+["be41","í¸",7,"í‘푂푃푅",14],
+["be61","í‘”",7,"í‘푞푟푡푢푣푥",7,"푮푰푱푲"],
+["be81","푳",4,"푺푻푽푾í’í’ƒ",4,"풊풌풎",5,"í’•",8,"ì´ì¼ì½ì‘ˆì‘¤ì‘¥ì‘¨ì‘¬ì‘´ì‘µì‘¹ì’€ì’”쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀ì”씌ì”씔씜씨씩씬씰씸씹씻씽아악안앉않알ì•ì•Žì•“암압앗았앙ì•ì•žì• ì•¡ì•¤ì•¨ì•°ì•±ì•³ì•´ì•µì•¼ì•½ì–€ì–„얇얌ì–ì–양얕얗얘얜얠얩어억언얹얻얼얽얾엄",6,"엌엎"],
+["bf41","í’ž",10,"í’ª",14],
+["bf61","í’¹",18,"í“í“Ží“í“‘í“’í““í“•"],
+["bf81","í“–",5,"í“í“ží“ ",7,"퓩퓪퓫퓭퓮퓯퓱",6,"퓹퓺퓼ì—엑엔엘엠엡엣엥여역엮연열엶엷염",5,"옅옆옇예옌ì˜ì˜˜ì˜™ì˜›ì˜œì˜¤ì˜¥ì˜¨ì˜¬ì˜­ì˜®ì˜°ì˜³ì˜´ì˜µì˜·ì˜¹ì˜»ì™€ì™ì™„왈ì™ì™‘왓왔왕왜ì™ì™ ì™¬ì™¯ì™±ì™¸ì™¹ì™¼ìš€ìšˆìš‰ìš‹ìšìš”욕욘욜욤욥욧용우욱운울욹욺움ì›ì›ƒì›…워ì›ì›ì›”웜ì›ì› ì›¡ì›¨"],
+["c041","퓾",5,"픅픆픇픉픊픋í”",6,"픖픘",5],
+["c061","픞",25],
+["c081","픸픹픺픻픾픿í•í•‚핃핅",6,"í•Ží•í•’",5,"í•ší•›í•í•ží•Ÿí•¡í•¢í•£ì›©ì›¬ì›°ì›¸ì›¹ì›½ìœ„윅윈윌윔윕윗윙유육윤율윰윱윳융윷으윽ì€ì„ìŠìŒììì‘",7,"ìœì ì¨ì«ì´ìµì¸ì¼ì½ì¾ìžƒìž„입잇있잉잊잎ìžìž‘잔잖잗잘잚잠잡잣잤장잦재잭잰잴잼잽잿쟀ìŸìŸˆìŸ‰ìŸŒìŸŽìŸìŸ˜ìŸìŸ¤ìŸ¨ìŸ¬ì €ì ì „절젊"],
+["c141","핤핦핧핪핬핮",5,"핶핷핹핺핻핽",6,"햆햊햋"],
+["c161","í–Œí–í–Ží–í–‘",19,"햦햧"],
+["c181","í–¨",31,"ì ì ‘ì “ì •ì –ì œì ì  ì ¤ì ¬ì ­ì ¯ì ±ì ¸ì ¼ì¡€ì¡ˆì¡‰ì¡Œì¡ì¡”조족존졸졺좀ì¢ì¢ƒì¢…좆좇좋좌ì¢ì¢”ì¢ì¢Ÿì¢¡ì¢¨ì¢¼ì¢½ì£„죈죌죔죕죗죙죠죡죤죵주죽준줄줅줆줌ì¤ì¤ì¤‘줘줬줴ì¥ì¥‘쥔쥘쥠쥡쥣쥬쥰쥴쥼즈즉즌ì¦ì¦˜ì¦™ì¦›ì¦ì§€ì§ì§„짇질짊ì§ì§‘짓"],
+["c241","í—Ší—‹í—í—Ží—í—‘í—“",4,"헚헜헞",5,"헦헧헩헪헫헭헮"],
+["c261","헯",4,"헶헸헺",5,"혂혃혅혆혇혉",6,"혒"],
+["c281","혖",5,"í˜í˜ží˜Ÿí˜¡í˜¢í˜£í˜¥",7,"혮",9,"혺혻징짖짙짚짜ì§ì§ ì§¢ì§¤ì§§ì§¬ì§­ì§¯ì§°ì§±ì§¸ì§¹ì§¼ì¨€ì¨ˆì¨‰ì¨‹ì¨Œì¨ì¨”쨘쨩쩌ì©ì©ì©”ì©œì©ì©Ÿì© ì©¡ì©¨ì©½ìª„쪘쪼쪽쫀쫄쫌ì«ì«ì«‘쫓쫘쫙쫠쫬쫴쬈ì¬ì¬”쬘쬠쬡ì­ì­ˆì­‰ì­Œì­ì­˜ì­™ì­ì­¤ì­¸ì­¹ì®œì®¸ì¯”쯤쯧쯩찌ì°ì°ì°”ì°œì°ì°¡ì°¢ì°§ì°¨ì°©ì°¬ì°®ì°°ì°¸ì°¹ì°»"],
+["c341","혽혾혿í™í™‚홃홄홆홇홊홌홎í™í™í™’홓홖홗홙홚홛í™",4],
+["c361","홢",4,"홨홪",5,"홲홳홵",11],
+["c381","íšíš‚횄횆",5,"횎íšíš‘íš’íš“íš•",7,"횞횠횢",5,"횩횪찼창찾채책챈챌챔챕챗챘챙챠챤챦챨챰챵처척천철첨첩첫첬청체첵첸첼쳄쳅쳇쳉ì³ì³”쳤쳬쳰ì´ì´ˆì´‰ì´Œì´ì´˜ì´™ì´›ì´ì´¤ì´¨ì´¬ì´¹ìµœìµ ìµ¤ìµ¬ìµ­ìµ¯ìµ±ìµ¸ì¶ˆì¶”축춘출춤춥춧충춰췄췌ì·ì·¨ì·¬ì·°ì·¸ì·¹ì·»ì·½ì¸„츈츌츔츙츠측츤츨츰츱츳층"],
+["c441","횫횭횮횯횱",7,"횺횼",7,"훆훇훉훊훋"],
+["c461","í›í›Ží›í›í›’훓훕훖훘훚",5,"훡훢훣훥훦훧훩",4],
+["c481","훮훯훱훲훳훴훶",5,"훾훿íœíœ‚휃휅",11,"휒휓휔치칙친칟칠칡침칩칫칭카칵칸칼캄캅캇캉ìºìº‘캔캘캠캡캣캤캥캬캭ì»ì»¤ì»¥ì»¨ì»«ì»¬ì»´ì»µì»·ì»¸ì»¹ì¼€ì¼ì¼„켈ì¼ì¼‘켓켕켜켠켤켬켭켯켰켱켸코콕콘콜콤콥콧콩콰콱콴콸쾀쾅쾌쾡쾨쾰쿄쿠쿡쿤쿨쿰쿱쿳쿵쿼퀀퀄퀑퀘퀭퀴퀵퀸퀼"],
+["c541","휕휖휗휚휛íœíœžíœŸíœ¡",6,"휪휬휮",5,"휶휷휹"],
+["c561","휺휻휽",6,"í…í†íˆíŠ",5,"í’í“í•íš",4],
+["c581","íŸí¢í¤í¦í§í¨íªí«í­í®í¯í±í²í³íµ",6,"í¾í¿íž€íž‚",5,"힊힋í„í…í‡í‰íí”í˜í í¬í­í°í´í¼í½í‚키킥킨킬킴킵킷킹타íƒíƒ„탈탉íƒíƒ‘탓탔탕태íƒíƒ íƒ¤íƒ¬íƒ­íƒ¯íƒ°íƒ±íƒ¸í„터턱턴털턺텀í…텃텄텅테í…í…텔템í…텟텡텨텬텼톄톈토톡톤톨톰톱톳통톺톼퇀퇘퇴퇸툇툉íˆíˆ¬íˆ­íˆ°íˆ´íˆ¼íˆ½íˆ¿í‰í‰ˆí‰œ"],
+["c641","ížížŽížíž‘",6,"힚힜힞",5],
+["c6a1","퉤튀íŠíŠ„튈íŠíŠ‘튕튜튠튤튬튱트특튼튿틀틂틈틉틋틔틘틜틤틥티틱틴틸팀íŒíŒƒíŒ…파íŒíŒŽíŒíŒ”팖팜íŒíŒŸíŒ íŒ¡íŒ¥íŒ¨íŒ©íŒ¬íŒ°íŒ¸íŒ¹íŒ»íŒ¼íŒ½í„í…í¼í½íŽ€íŽ„펌íŽíŽíŽíŽ‘페펙펜펠펨펩펫펭펴편펼í„í…íˆí‰íí˜í¡í£í¬í­í°í´í¼í½í¿í"],
+["c7a1","íˆí푀푄표푠푤푭푯푸푹푼푿풀풂품풉풋í’풔풩퓌í“퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌í•í•í•‘하학한할핥함합핫항해핵핸핼햄햅햇했행í–향허헉헌í—헒험헙헛í—헤헥헨헬헴헵헷헹혀í˜í˜„혈í˜í˜‘혓혔형혜혠"],
+["c8a1","혤혭호혹혼홀홅홈홉홋í™í™‘화확환활홧황홰홱홴횃횅회íšíšíš”íšíšŸíš¡íš¨íš¬íš°íš¹íš»í›„훅훈훌훑훔훗훙훠훤훨훰훵훼훽휀휄휑휘휙휜휠휨휩휫휭휴휵휸휼í„í‡í‰íí‘í”í–í—í˜í™í í¡í£í¥í©í¬í°í´í¼í½ížížˆíž‰ížŒížíž˜íž™íž›íž"],
+["caa1","伽佳å‡åƒ¹åŠ å¯å‘µå“¥å˜‰å«å®¶æš‡æž¶æž·æŸ¯æ­Œç‚痂稼苛茄街袈訶賈è·è»»è¿¦é§•åˆ»å´å„æªæ…¤æ®¼ç脚覺角閣侃刊墾奸姦干幹懇æ€æ†æŸ¬æ¡¿æ¾—癎看磵稈竿簡è‚艮艱諫間乫å–曷渴碣竭葛è¤èŽéž¨å‹˜åŽå ªåµŒæ„Ÿæ†¾æˆ¡æ•¢æŸ‘橄減甘疳監瞰紺邯鑑鑒龕"],
+["cba1","匣岬甲胛鉀閘剛堈姜岡崗康强彊慷江畺疆糠絳綱羌腔舡薑è¥è¬›é‹¼é™é±‡ä»‹ä»·å€‹å‡±å¡æ„·æ„¾æ…¨æ”¹æ§ªæ¼‘疥皆盖箇芥蓋豈鎧開喀客å‘ï¤ç²³ç¾¹é†µå€¨åŽ»å±…巨拒æ®æ“šæ“§æ¸ ç‚¬ç¥›è·è¸žï¤‚é½é‰…鋸乾件å¥å·¾å»ºæ„†æ¥—腱虔蹇éµé¨«ä¹žå‚‘æ°æ¡€å„‰åŠåŠ’檢"],
+["cca1","çž¼éˆé»”劫怯迲åˆæ†©æ­æ“Šæ ¼æª„激膈覡隔堅牽犬甄絹繭肩見譴é£éµ‘抉決潔çµç¼ºè¨£å…¼æ…Šç®è¬™é‰—鎌京俓倞傾儆å‹å‹å¿å°å¢ƒåºšå¾‘慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖警輕逕é¡é ƒé ¸é©šé¯¨ä¿‚啓堺契季屆悸戒桂械"],
+["cda1","棨溪界癸磎稽系繫繼計誡谿階鷄å¤å©å‘Šå‘±å›ºå§‘孤尻庫拷攷故敲暠枯æ§æ²½ç—¼çšç¾ç¨¿ç¾”考股è†è‹¦è‹½è°è—蠱袴誥賈辜錮雇顧高鼓哭斛曲æ¢ç©€è°·éµ å›°å¤å´‘昆梱æ£æ»¾ç¨è¢žé¯¤æ±¨ï¤„骨供公共功孔工ææ­æ‹±æŽ§æ”»ç™ç©ºèš£è²¢éžä¸²å¯¡æˆˆæžœç“œ"],
+["cea1","科è“誇課跨éŽé‹é¡†å»“槨藿郭串冠官寬慣棺款çŒç¯ç“˜ç®¡ç½è…觀貫關館刮æ括适侊光匡壙廣曠洸炚狂ç–ç­èƒ±é‘›å¦æŽ›ç½«ä¹–傀塊壞怪愧æ‹æ§é­å®ç´˜è‚±è½Ÿäº¤åƒ‘咬喬嬌嶠巧攪敎校橋狡皎矯絞翹膠蕎蛟較轎郊餃驕鮫丘久ä¹ä»‡ä¿±å…·å‹¾"],
+["cfa1","å€å£å¥å’Žå˜”åµåž¢å¯‡å¶‡å»æ‡¼æ‹˜æ•‘枸柩構æ­æ¯†æ¯¬æ±‚æºç¸ç‹—玖çƒçž¿çŸ©ç©¶çµ¿è€‰è‡¼èˆ…舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局èŠéž éž«éº´å›çª˜ç¾¤è£™è»éƒ¡å €å±ˆæŽ˜çªŸå®®å¼“穹窮芎躬倦券勸å·åœˆæ‹³æ²æ¬Šæ·ƒçœ·åŽ¥ç—蕨蹶闕机櫃潰詭軌饋句晷歸貴"],
+["d0a1","鬼龜å«åœ­å¥Žæ†æ§»çªç¡…窺竅糾葵è¦èµ³é€µé–¨å‹»å‡ç•‡ç­ èŒéˆžï¤ˆæ©˜å…‹å‰‹åŠ‡æˆŸæ£˜æ¥µéš™åƒ…劤勤懃斤根槿瑾筋芹è«è¦²è¬¹è¿‘饉契今妗擒昑檎ç´ç¦ç¦½èŠ©è¡¾è¡¿è¥Ÿï¤ŠéŒ¦ä¼‹åŠæ€¥æ‰±æ±²ç´šçµ¦äº˜å…¢çŸœè‚¯ä¼ä¼Žå…¶å†€å—œå™¨åœ»åŸºåŸ¼å¤”奇妓寄å²å´Žå·±å¹¾å¿ŒæŠ€æ——æ—£"],
+["d1a1","朞期æžæ£‹æ£„機欺氣汽沂淇玘ç¦çªç’‚璣畸畿ç¢ç£¯ç¥ç¥‡ç¥ˆç¥ºç®•ç´€ç¶ºç¾ˆè€†è€­è‚Œè¨˜è­è±ˆèµ·éŒ¡éŒ¤é£¢é¥‘騎é¨é©¥éº’緊佶å‰æ‹®æ¡”金喫儺喇奈娜懦ï¤æ‹æ‹¿ï¤Ž",5,"那樂",4,"諾酪駱亂卵暖ï¤ç…–爛蘭難鸞ææºå—嵐æžæ¥ æ¹³ï¤¢ç”·ï¤£ï¤¤ï¤¥"],
+["d2a1","ç´ï¤¦ï¤§è¡²å›Šå¨˜ï¤¨",4,"乃來內奈柰è€ï¤®å¥³å¹´æ’šç§Šå¿µæ¬æ‹ˆæ»å¯§å¯—努勞奴弩怒擄櫓爐瑙盧",5,"駑魯",10,"濃籠聾膿農惱牢磊腦賂雷尿壘",7,"嫩訥æ»ç´ï¥’",5,"能菱陵尼泥匿溺多茶"],
+["d3a1","丹亶但單團壇彖斷旦檀段æ¹çŸ­ç«¯ç°žç·žè›‹è¢’鄲é›æ’»æ¾¾çºç–¸é”å•–å憺擔曇淡湛潭澹痰èƒè†½è•è¦ƒè«‡è­šéŒŸæ²“ç•“ç­”è¸éå”堂塘幢戇撞棠當糖螳黨代垈å®å¤§å°å²±å¸¶å¾…戴擡玳臺袋貸隊黛宅德悳倒刀到圖堵塗導屠島嶋度徒悼挑掉æ—桃"],
+["d4a1","棹櫂淘渡滔濤燾盜ç¹ç¦±ç¨»è„覩賭跳蹈逃途é“都é陶韜毒瀆牘犢ç¨ç£ç¦¿ç¯¤çº›è®€å¢©æƒ‡æ•¦æ—½æš¾æ²Œç„žç‡‰è±šé “ä¹­çªä»å†¬å‡å‹•åŒæ†§æ±æ¡æ£Ÿæ´žæ½¼ç–¼çž³ç«¥èƒ´è‘£éŠ…兜斗æœæž“痘竇è³ï¥šè±†é€—頭屯臀芚éé¯éˆå¾—å¶æ©™ç‡ˆç™»ç­‰è—¤è¬„鄧騰喇懶拏癩羅"],
+["d5a1","蘿螺裸é‚樂洛烙çžçµ¡è½ï¥é…ªé§±ï¥žäº‚åµæ¬„欒瀾爛蘭鸞剌辣åµæ“¥æ”¬æ¬–濫籃纜è—襤覽拉臘蠟廊朗浪狼ç…瑯螂郞來å´å¾ èŠå†·æŽ ç•¥äº®å€†å…©å‡‰æ¢æ¨‘粮粱糧良諒輛é‡ä¾¶å„·å‹µå‘‚廬慮戾旅櫚濾礪藜蠣閭驢驪麗黎力曆歷ç€ç¤«è½¢é‚æ†æˆ€æ”£æ¼£"],
+["d6a1","煉璉練è¯è“®è¼¦é€£éŠå†½åˆ—劣洌烈裂廉斂殮濂簾çµä»¤ä¼¶å›¹ï¥Ÿå²ºå¶ºæ€œçŽ²ç¬­ç¾šç¿Žè†é€žéˆ´é›¶éˆé ˜é½¡ä¾‹æ¾§ç¦®é†´éš·å‹žï¥ æ’ˆæ“„櫓潞瀘çˆç›§è€è˜†è™œè·¯è¼…露魯鷺鹵碌祿綠è‰éŒ„鹿麓論壟弄朧瀧ç“ç± è¾å„¡ç€¨ç‰¢ç£Šè³‚賚賴雷了僚寮廖料燎療瞭èŠè“¼"],
+["d7a1","é¼é¬§é¾å£˜å©å±¢æ¨“æ·šæ¼ç˜»ç´¯ç¸·è”žè¤¸é¤é™‹åŠ‰æ—’柳榴æµæºœç€ç‰ç‘ ç•™ç˜¤ç¡«è¬¬é¡žå…­æˆ®é™¸ä¾–倫崙淪綸輪律慄栗率隆勒肋凜凌楞稜綾è±é™µä¿šåˆ©åŽ˜å唎履悧æŽæ¢¨æµ¬çŠç‹¸ç†ç’ƒï¥¢ç—¢ç±¬ç½¹ç¾¸èŽ‰è£è£¡é‡Œé‡é›¢é¯‰åæ½¾ç‡ç’˜è—ºèºªéš£é±—麟林淋ç³è‡¨éœ–ç ¬"],
+["d8a1","立笠粒摩瑪痲碼磨馬魔麻寞幕漠膜莫邈万å娩巒彎慢挽晩曼滿漫ç£çžžè¬è”“蠻輓饅鰻唜抹末沫茉襪éºäº¡å¦„忘忙望網罔芒茫莽輞邙埋妹媒å¯æ˜§æžšæ¢…æ¯ç…¤ç½µè²·è³£é‚魅脈貊陌驀麥孟氓猛盲盟èŒå†ªè¦“å…冕勉棉沔眄眠綿緬é¢éºµæ»…"],
+["d9a1","蔑冥å命明æšæ¤§æºŸçš¿çž‘茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮æŸæ¨¡æ¯æ¯›ç‰Ÿç‰¡ç‘眸矛耗芼茅謀謨貌木æ²ç‰§ç›®ç¦ç©†é¶©æ­¿æ²’夢朦蒙å¯å¢“妙廟æ昴æ³æ¸ºçŒ«ç«—苗錨務巫憮懋戊拇撫无楙武毋無ç·ç•ç¹†èˆžèŒ‚蕪誣貿霧鵡墨默們刎å»å•æ–‡"],
+["daa1","汶紊紋èžèšŠé–€é›¯å‹¿æ²•ç‰©å‘³åªšå°¾åµ‹å½Œå¾®æœªæ¢¶æ¥£æ¸¼æ¹„眉米美薇謎迷é¡é»´å²·æ‚¶æ„憫æ•æ—»æ—¼æ°‘泯玟ç‰ç·¡é–”密蜜è¬å‰åšæ‹æ撲朴樸泊ç€ç’žç®”粕縛膊舶薄迫雹é§ä¼´åŠåå›æ‹Œæ¬æ”€æ–‘槃泮潘ç­ç•”瘢盤盼ç£ç£»ç¤¬çµ†èˆ¬èŸ è¿”頒飯勃拔撥渤潑"],
+["dba1","發跋醱鉢髮魃倣å‚åŠå¦¨å°¨å¹‡å½·æˆ¿æ”¾æ–¹æ—昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防é¾å€ä¿³ï¥£åŸ¹å¾˜æ‹œæŽ’æ¯æ¹ƒç„™ç›ƒèƒŒèƒšè£´è£µè¤™è³ è¼©é…陪伯佰帛æŸæ ¢ç™½ç™¾é­„幡樊煩燔番磻ç¹è•ƒè—©é£œä¼ç­ç½°é–¥å‡¡å¸†æ¢µæ°¾æ±Žæ³›çŠ¯ç¯„范法çºåƒ»åŠˆå£æ“˜æª—璧癖"],
+["dca1","碧蘗闢霹便åžå¼è®Šè¾¨è¾¯é‚Šåˆ¥çž¥é±‰é¼ˆä¸™å€‚兵屛幷昞昺柄棅炳ç”病秉ç«è¼§é¤ é¨ˆä¿å ¡å ±å¯¶æ™®æ­¥æ´‘湺潽ç¤ç”«è©è£œè¤“譜輔ä¼åƒ•åŒåœå®“復æœç¦è…¹èŒ¯è””複覆輹輻馥鰒本乶俸奉å°å³¯å³°æ§æ£’烽熢ç«ç¸«è“¬èœ‚逢鋒鳳ä¸ä»˜ä¿¯å‚…剖副å¦å’埠夫婦"],
+["dda1","孚孵富府復扶敷斧浮溥父符簿缶è…腑膚艀芙莩訃負賦賻赴趺部釜阜附駙鳧北分å©å™´å¢³å¥”奮忿憤扮æ˜æ±¾ç„šç›†ç²‰ç³žç´›èŠ¬è³é›°ï¥§ä½›å¼—彿拂崩朋棚硼繃鵬丕備匕匪å‘妃婢庇悲憊扉批æ–枇榧比毖毗毘沸泌çµç—ºç ’碑秕秘粃緋翡肥"],
+["dea1","脾臂è²èœšè£¨èª¹è­¬è²»é„™éžé£›é¼»åš¬å¬ªå½¬æ–Œæª³æ®¯æµœæ¿±ç€•ç‰çŽ­è²§è³“頻憑氷è˜é¨ä¹äº‹äº›ä»•ä¼ºä¼¼ä½¿ä¿Ÿåƒ¿å²å¸å”†å—£å››å£«å¥¢å¨‘寫寺射巳師徙æ€æ¨æ–œæ–¯æŸ¶æŸ»æ¢­æ­»æ²™æ³—渣瀉ç…砂社祀祠ç§ç¯©ç´—絲肆èˆèŽŽè“‘蛇裟è©è©žè¬è³œèµ¦è¾­é‚ªé£¼é§Ÿéºå‰Šï¥©æœ”索"],
+["dfa1","傘刪山散汕çŠç”£ç–算蒜酸霰乷撒殺煞薩三參æ‰æ£®æ¸—芟蔘衫æ·æ¾éˆ’颯上傷åƒå„Ÿå•†å–ªå˜—孀尙峠常床庠廂想桑橡湘爽牀狀相祥箱翔裳觴詳象賞霜塞璽賽嗇塞穡索色牲生甥省笙墅壻嶼åºåº¶å¾æ•æŠ’æ¿æ•æš‘曙書栖棲犀瑞筮絮緖署"],
+["e0a1","胥舒薯西誓é€é‹¤é»é¼ å¤•å¥­å¸­æƒœæ˜”晳æžæ±æ·…潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽ç瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣é¸éŠ‘é¥é¥é®®å¨å±‘楔泄洩渫舌薛褻設說雪齧剡暹殲纖蟾è´é–ƒé™æ”涉燮葉城姓宬性惺æˆæ˜Ÿæ™ŸçŒ©ç¹ç››çœç­¬"],
+["e1a1","è–è²è…¥èª é†’世勢歲洗稅笹細說貰å¬å˜¯å¡‘宵å°å°‘巢所掃æ”昭梳沼消溯瀟炤燒甦ç–疎瘙笑篠簫素紹蔬蕭蘇訴é€é¡é‚µéŠ·éŸ¶é¨·ä¿—屬æŸæ¶‘粟續謖贖速孫巽æè“€éœé£¡çŽ‡å®‹æ‚šæ¾æ·žè¨Ÿèª¦é€é Œåˆ·ï¥°ç‘碎鎖衰釗修å—嗽囚垂壽嫂守岫峀帥æ„"],
+["e2a1","æˆæ‰‹æŽˆæœæ”¶æ•¸æ¨¹æ®Šæ°´æ´™æ¼±ç‡§ç‹©ç¸ç‡ç’²ç˜¦ç¡ç§€ç©—竪粹ç¶ç¶¬ç¹¡ç¾žè„©èŒ±è’蓚藪袖誰è®è¼¸é‚邃酬銖銹隋隧隨雖需須首髓鬚å”塾夙孰宿淑潚熟ç¡ç’¹è‚…è½å·¡å¾‡å¾ªæ‚旬栒楯橓殉洵淳ç£ç›¾çž¬ç­ç´”脣舜è€è“´è•£è©¢è«„醇錞順馴戌術述鉥崇崧"],
+["e3a1","嵩瑟è†è¨æ¿•æ‹¾ç¿’褶襲丞乘僧å‹å‡æ‰¿æ˜‡ç¹©è …陞ä¾åŒ™å˜¶å§‹åª¤å°¸å±Žå±å¸‚弑æƒæ–½æ˜¯æ™‚枾柴猜矢示翅蒔è“視試詩諡豕豺埴寔å¼æ¯æ‹­æ¤æ®–湜熄篒è•è­˜è»¾é£Ÿé£¾ä¼¸ä¾ä¿¡å‘»å¨ å®¸æ„¼æ–°æ™¨ç‡¼ç”³ç¥žç´³è…Žè‡£èŽ˜è–ªè—Žèœƒè¨Šèº«è¾›ï¥±è¿…失室實悉審尋心æ²"],
+["e4a1","沈深瀋甚芯諶什å拾雙æ°äºžä¿„兒啞娥峨我牙芽莪蛾衙è¨é˜¿é›…餓鴉éµå Šå²³å¶½å¹„惡愕æ¡æ¨‚渥鄂é”é¡Žé°é½·å®‰å²¸æŒ‰æ™æ¡ˆçœ¼é›éžé¡”鮟斡è¬è»‹é–¼å”µå²©å·–庵暗癌è´é—‡å£“押狎鴨仰央æ€æ˜»æ®ƒç§§é´¦åŽ“哀埃崖愛曖涯ç¢è‰¾éš˜é„厄扼掖液縊腋é¡"],
+["e5a1","櫻罌鶯鸚也倻冶夜惹æ¶æ¤°çˆºè€¶ï¥´é‡Žå¼±ï¥µï¥¶ç´„若葯蒻藥èºï¥·ä½¯ï¥¸ï¥¹å£¤å­ƒæ™æšæ”˜æ•­æš˜ï¥ºæ¥Šæ¨£æ´‹ç€ç…¬ç—’ç˜ç¦³ç©°ï¥»ç¾Šï¥¼è¥„諒讓釀陽量養圄御於æ¼ç˜€ç¦¦èªžé¦­é­šé½¬å„„憶抑æªè‡†åƒå °å½¦ç„‰è¨€è«ºå­¼è˜–俺儼嚴奄掩淹嶪業円予余勵呂ï¦å¦‚廬"],
+["e6a1","旅歟æ±ï¦„璵礖礪與艅茹輿è½ï¦†é¤˜ï¦‡ï¦ˆï¦‰äº¦ï¦ŠåŸŸå½¹æ˜“曆歷疫繹譯ï¦é€†é©›åš¥å §å§¸å¨Ÿå®´ï¦Žå»¶ï¦ï¦æ挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉ç¡ç¡¯ï¦•ç­µç·£ï¦–縯聯è¡è»Ÿï¦˜ï¦™ï¦šé‰›ï¦›é³¶ï¦œï¦ï¦žæ‚…涅烈熱裂說閱厭廉念捻染殮炎焰ç°è‰¶è‹’"],
+["e7a1","簾閻髥鹽曄獵ç‡è‘‰ï¦¨ï¦©å¡‹ï¦ªï¦«å¶¸å½±ï¦¬æ˜ æšŽæ¥¹æ¦®æ°¸æ³³æ¸¶æ½æ¿šç€›ç€¯ç…營ç°ï¦­ç‘›ï¦®ç“”盈穎纓羚聆英詠迎鈴éˆï¦²éœ™ï¦³ï¦´ä¹‚倪例刈å¡æ›³æ±­æ¿ŠçŒŠç¿ç©¢èŠ®è—蘂禮裔詣譽豫醴銳隸霓é äº”ä¼ä¿‰å‚²åˆå¾å³å—šå¡¢å¢ºå¥§å¨›å¯¤æ‚Ÿï¦¹æ‡Šæ•–旿晤梧汚澳"],
+["e8a1","çƒç†¬ç’筽蜈誤鰲鼇屋沃ç„玉鈺溫瑥瘟穩縕蘊兀壅æ“瓮甕癰ç¿é‚•é›é¥”渦瓦窩窪臥蛙è¸è¨›å©‰å®Œå®›æ¢¡æ¤€æµ£çŽ©ç“ç¬ç¢—緩翫脘腕莞豌阮頑曰往旺枉汪王倭娃歪矮外嵬å·çŒ¥ç•ï¦ºï¦»åƒ¥å‡¹å ¯å¤­å¦–姚寥寮尿嶢拗æ–撓擾料曜樂橈燎燿瑤ï§"],
+["e9a1","窈窯繇繞耀腰蓼蟯è¦è¬ é™ï§ƒé‚€é¥’慾欲浴縟褥辱俑傭冗勇埇墉容庸慂榕涌湧溶熔瑢用甬è³èŒ¸è“‰è¸ŠéŽ”éžï§„于佑å¶å„ªåˆå‹å³å®‡å¯“尤愚憂旴牛玗瑀盂ç¥ç¦‘禹紆羽芋藕虞迂é‡éƒµé‡ªéš…雨雩勖彧旭昱栯煜稶éƒé Šäº‘暈橒殞æ¾ç†‰è€˜èŠ¸è•“"],
+["eaa1","é‹éš•é›²éŸ»è”šé¬±äºç†Šé›„元原員圓園垣媛嫄寃怨愿æ´æ²…洹湲æºçˆ°çŒ¿ç‘—è‹‘è¢è½…é ï§†é™¢é¡˜é´›æœˆè¶Šé‰žä½å‰åƒžå±åœå§”å¨å°‰æ…°æšæ¸­çˆ²ç‘‹ç·¯èƒƒèŽè‘¦è”¿èŸè¡›è¤˜è¬‚é•éŸ‹é­ä¹³ä¾‘儒兪劉唯喩孺宥幼幽庾悠惟愈愉æ„攸有杻柔柚柳楡楢油洧流游溜"],
+["eba1","濡猶猷琉瑜由ï§ç™’硫ï§ç¶­è‡¾è¸è£•èª˜è«›è«­è¸°è¹‚éŠé€¾éºé…‰é‡‰é®ï§ï§‘堉戮毓肉育陸倫å…奫尹崙淪潤玧胤贇輪鈗é–律慄栗率è¿æˆŽç€œçµ¨èžï§œåž æ©æ…‡æ®·èª¾éŠ€éš±ä¹™åŸæ·«è”­é™°éŸ³é£®æ–泣邑å‡æ‡‰è†ºé·¹ä¾å€šå„€å®œæ„懿擬椅毅疑矣義艤è–蟻衣誼"],
+["eca1","議醫二以伊ï§ï§žå¤·å§¨ï§Ÿå·²å¼›å½›æ€¡ï§ ï§¡ï§¢ï§£çˆ¾ç¥ï§¤ç•°ç—痢移罹而耳肄苡è‘裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人ä»åˆƒå°ï§­å’½å› å§»å¯…引å¿æ¹®ï§®ï§¯çµªèŒµï§°èš“èªï§±é­é·ï§²ï§³ä¸€ä½šä½¾å£¹æ—¥æº¢é€¸éŽ°é¦¹ä»»å£¬å¦Šå§™æ林淋稔臨è賃入å„"],
+["eda1","立笠粒ä»å‰©å­•èŠ¿ä»”刺咨姉姿å­å­—å­œæ£æ…ˆæ»‹ç‚™ç…®çŽ†ç“·ç–µç£ç´«è€…自茨蔗藉諮資雌作勺嚼斫昨ç¼ç‚¸çˆµç¶½èŠé…Œé›€éµ²å­±æ£§æ®˜æ½ºç›žå²‘暫潛箴簪蠶雜丈仗匠場墻壯奬將帳庄張掌暲æ–樟檣欌漿牆狀ç璋章粧腸臟臧莊葬蔣薔è—è£è´“醬長"],
+["eea1","éšœå†å“‰åœ¨å®°æ‰æ栽梓渽滓ç½ç¸¡è£è²¡è¼‰é½‹é½Žçˆ­ç®è«éŒšä½‡ä½Žå„²å’€å§åº•æŠµæµæ¥®æ¨—沮渚狙猪疽箸紵苧è¹è‘—藷詛貯躇這邸雎齟勣åŠå«¡å¯‚摘敵滴狄炙的ç©ç¬›ç±ç¸¾ç¿Ÿè»è¬«è³Šèµ¤è·¡è¹Ÿè¿ªè¿¹é©é‘佃佺傳全典å‰å‰ªå¡¡å¡¼å¥ å°ˆå±•å»›æ‚›æˆ°æ “殿氈澱"],
+["efa1","ç…Žç ç”°ç”¸ç•‘癲筌箋箭篆çºè©®è¼¾è½‰éˆ¿éŠ“錢é«é›»é¡šé¡«é¤žåˆ‡æˆªæŠ˜æµ™ç™¤ç«Šç¯€çµ¶å å²¾åº—漸点粘霑鮎點接摺è¶ä¸äº•äº­åœåµå‘ˆå§ƒå®šå¹€åº­å»·å¾æƒ…挺政整旌晶晸柾楨檉正汀淀淨渟湞瀞炡玎ç½ç”ºç›ç¢‡ç¦Žç¨‹ç©½ç²¾ç¶Žè‰‡è¨‚諪貞鄭酊釘鉦鋌錠霆é–"],
+["f0a1","éœé ‚鼎制劑啼堤å¸å¼Ÿæ‚Œæ梯濟祭第è‡è–ºè£½è«¸è¹„é†é™¤éš›éœ½é¡Œé½Šä¿Žå…†å‡‹åŠ©å˜²å¼”彫措æ“æ—©æ™æ›ºæ›¹æœæ¢æ£—槽漕潮照燥爪璪眺祖祚租稠窕粗糟組繰肇藻蚤詔調趙èºé€ é­é‡£é˜»é›•é³¥æ—簇足éƒå­˜å°Šå’æ‹™çŒå€§å®—從悰慫棕淙ç®ç¨®çµ‚綜縱腫"],
+["f1a1","踪踵é¾é˜ä½å左座挫罪主ä½ä¾åšå§èƒ„呪周嗾å¥å®™å·žå»šæ™æœ±æŸ±æ ªæ³¨æ´²æ¹Šæ¾ç‚·ç ç–‡ç±Œç´‚紬綢舟蛛註誅走躊輳週酎酒鑄é§ç«¹ç²¥ä¿Šå„准埈寯峻晙樽浚準濬焌畯竣蠢逡éµé›‹é§¿èŒä¸­ä»²è¡†é‡å½æ«›æ¥«æ±è‘ºå¢žæ†Žæ›¾æ‹¯çƒç”‘症繒蒸證贈之åª"],
+["f2a1","咫地å€å¿—æŒæŒ‡æ‘¯æ”¯æ—¨æ™ºæžæž³æ­¢æ± æ²šæ¼¬çŸ¥ç ¥ç¥‰ç¥—紙肢脂至èŠèŠ·èœ˜èªŒï§¼è´„趾é²ç›´ç¨™ç¨·ç¹”è·å”‡å—”塵振æ¢æ™‰æ™‹æ¡­æ¦›æ®„津溱ç瑨璡畛疹盡眞瞋秦縉ç¸è‡»è”¯è¢—診賑軫辰進鎭陣陳震侄å±å§ªå«‰å¸™æ¡Žç“†ç–¾ç§©çª’膣蛭質跌迭斟朕什執潗ç·è¼¯"],
+["f3a1","é¶é›†å¾µæ‡²æ¾„且侘借å‰å—Ÿåµ¯å·®æ¬¡æ­¤ç£‹ç®šï§¾è¹‰è»Šé®æ‰æ¾ç€çª„錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽é¤é¥Œåˆ¹å¯Ÿæ“¦æœ­ç´®åƒ­åƒå¡¹æ…˜æ…™æ‡ºæ–¬ç«™è®’讖倉倡創唱娼廠彰愴敞昌昶暢æ§æ»„漲猖瘡窓脹艙è–蒼債埰寀寨彩採砦綵èœè”¡é‡‡é‡µå†ŠæŸµç­–"],
+["f4a1","責凄妻悽處倜刺剔尺慽戚拓擲斥滌瘠脊蹠陟隻仟åƒå–˜å¤©å·æ“…泉淺玔穿舛薦賤è¸é·é‡§é—¡é˜¡éŸ†å‡¸å“²å–†å¾¹æ’¤æ¾ˆç¶´è¼Ÿè½éµåƒ‰å°–沾添甛瞻簽籤詹諂堞妾帖æ·ç‰’ç–Šç«è«œè²¼è¼’廳晴淸è½èè«‹é‘鯖切剃替涕滯締諦逮éžé«”åˆå‰¿å“¨æ†”抄招梢"],
+["f5a1","椒楚樵炒焦ç¡ç¤ç¤Žç§’ç¨è‚–艸苕è‰è•‰è²‚超酢醋醮促囑燭矗蜀觸寸忖æ‘邨å¢å¡šå¯µæ‚¤æ†æ‘ ç¸½è°è”¥éŠƒæ’®å‚¬å´”最墜抽推椎楸樞湫皺秋芻è©è«è¶¨è¿½é„’酋醜éŒéŒ˜éŽšé››é¨¶é°ä¸‘ç•œç¥ç«ºç­‘築縮蓄蹙蹴軸é€æ˜¥æ¤¿ç‘ƒå‡ºæœ®é»œå……忠沖蟲è¡è¡·æ‚´è†µèƒ"],
+["f6a1","è´…å–å¹å˜´å¨¶å°±ç‚Šç¿ èšè„†è‡­è¶£é†‰é©Ÿé·²å´ä»„厠惻測層侈値嗤峙幟æ¥æ¢”治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅飭親七柒漆侵寢枕沈浸ç›ç §é‡é¼èŸ„秤稱快他咤唾墮妥惰打拖朶楕舵陀馱é§å€¬å“å•„å¼ï¨æ‰˜ï¨‚擢晫æŸæ¿æ¿¯ç¢ç¸è¨—"],
+["f7a1","é¸å‘‘嘆å¦å½ˆæ†šæ­Žç˜ç‚­ç¶»èª•å¥ªè„«æŽ¢çœˆè€½è²ªå¡”æ­æ¦»å®•å¸‘湯糖蕩兌å°å¤ªæ€ æ…‹æ®†æ±°æ³°ç¬žèƒŽè‹”跆邰颱宅擇澤撑攄兎å土討慟桶洞痛筒統通堆槌腿褪退頹å¸å¥—妬投é€é¬ªæ…特闖å¡å©†å·´æŠŠæ’­æ“ºæ·æ³¢æ´¾çˆ¬ç¶ç ´ç½·èŠ­è·›é —判å‚æ¿ç‰ˆç“£è²©è¾¦éˆ‘"],
+["f8a1","阪八å­æŒä½©å”„悖敗沛浿牌狽稗覇è²å½­æ¾Žçƒ¹è†¨æ„Žä¾¿åæ‰ç‰‡ç¯‡ç·¨ç¿©é鞭騙貶åªå¹³æž°èè©•å å¬–幣廢弊斃肺蔽閉陛佈包åŒåŒå’†å“ºåœƒå¸ƒæ€–抛抱æ•ï¨†æ³¡æµ¦ç–±ç ²èƒžè„¯è‹žè‘¡è’²è¢è¤’逋鋪飽鮑幅暴æ›ç€‘爆輻俵剽彪慓æ“標漂瓢票表豹飇飄驃"],
+["f9a1","å“稟楓諷豊風馮彼披疲皮被é¿é™‚匹弼必泌çŒç•¢ç–‹ç­†è‹¾é¦ä¹é€¼ä¸‹ä½•åŽ¦å¤å»ˆæ˜°æ²³ç‘•è·è¦è³€é霞鰕壑學è™è¬”鶴寒æ¨æ‚旱汗漢澣瀚罕翰閑閒é™éŸ“割轄函å«å’¸å•£å–Šæª»æ¶µç·˜è‰¦éŠœé™·é¹¹åˆå“ˆç›’蛤閤闔陜亢伉姮嫦巷æ’抗æ­æ¡æ²†æ¸¯ç¼¸è‚›èˆª"],
+["faa1","行降項亥å•å’³åž“奚孩害懈楷海瀣蟹解該諧邂駭骸劾核倖幸æè‡è¡Œäº«å‘åš®ç¦é„•éŸ¿é¤‰é¥—香噓墟虛許憲櫶ç»è»’歇險驗奕爀赫é©ä¿”峴弦懸晛泫炫玄玹ç¾çœ©ç絃絢縣舷衒見賢鉉顯孑穴血é å«Œä¿ å”夾峽挾浹狹脅脇莢é‹é °äº¨å…„刑型"],
+["fba1","形泂滎瀅ç炯熒ç©ç‘©èŠèž¢è¡¡é€ˆé‚¢éŽ£é¦¨å…®å½—惠慧暳蕙蹊醯鞋乎互呼壕壺好岵弧戶扈昊晧毫浩æ·æ¹–滸澔濠濩çç‹ç¥ç‘šç“ çš“祜糊縞胡芦葫蒿虎號è´è­·è±ªéŽ¬é €é¡¥æƒ‘或酷婚æ˜æ··æ¸¾ç¿é­‚忽惚ç¬å“„弘汞泓洪烘紅虹訌鴻化和嬅樺ç«ç•µ"],
+["fca1","ç¦ç¦¾èŠ±è¯è©±è­è²¨é´ï¨‹æ“´æ”«ç¢ºç¢»ç©«ä¸¸å–šå¥å®¦å¹»æ‚£æ›æ­¡æ™¥æ¡“渙煥環紈還驩鰥活滑猾è±é—Šå‡°å¹Œå¾¨æ惶愰慌晃晄榥æ³æ¹Ÿæ»‰æ½¢ç…Œç’œçš‡ç¯ç°§è’è—é‘éšé»ƒåŒ¯å›žå»»å¾Šæ¢æ‚”懷晦會檜淮澮ç°çªç¹ªè†¾èŒ´è›”誨賄劃ç²å®–æ©«é„哮嚆å­æ•ˆæ–…曉梟æ¶æ·†"],
+["fda1","爻肴酵é©ä¾¯å€™åŽšåŽå¼å–‰å—…帿後朽煦ç逅勛勳塤壎焄ç†ç‡»è–°è¨“暈薨喧暄煊è±å‰å–™æ¯å½™å¾½æ®æš‰ç…‡è«±è¼éº¾ä¼‘æºçƒ‹ç•¦è™§æ¤è­Žé·¸å…‡å‡¶åŒˆæ´¶èƒ¸é»‘昕欣炘痕åƒå±¹ç´‡è¨–欠欽歆å¸æ°æ´½ç¿•èˆˆåƒ–凞喜噫å›å§¬å¬‰å¸Œæ†™æ†˜æˆ±æ™žæ›¦ç†™ç†¹ç†ºçŠ§ç¦§ç¨€ç¾²è©°"]
+]
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp950.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp950.json
new file mode 100644
index 0000000..d8bc871
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp950.json
@@ -0,0 +1,177 @@
+[
+["0","\u0000",127],
+["a140"," ,ã€ã€‚.‧;:?ï¼ï¸°â€¦â€¥ï¹ï¹‘﹒·﹔﹕﹖﹗|–︱—︳╴︴ï¹ï¼ˆï¼‰ï¸µï¸¶ï½›ï½ï¸·ï¸¸ã€”〕︹︺ã€ã€‘︻︼《》︽︾〈〉︿﹀「ã€ï¹ï¹‚『ã€ï¹ƒï¹„﹙﹚"],
+["a1a1","﹛﹜ï¹ï¹žâ€˜â€™â€œâ€ã€ã€žâ€µâ€²ï¼ƒï¼†ï¼Šâ€»Â§ã€ƒâ—‹â—△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_Ë﹉﹊ï¹ï¹Žï¹‹ï¹Œï¹Ÿï¹ ï¹¡ï¼‹ï¼Ã—÷±√<>ï¼â‰¦â‰§â‰ âˆžâ‰’≡﹢",4,"~∩∪⊥∠∟⊿ã’ã‘∫∮∵∴♀♂⊕⊙↑↓â†â†’↖↗↙↘∥∣ï¼"],
+["a240","\∕﹨$¥〒¢£%@℃℉﹩﹪﹫ã•ãŽœãŽãŽžãŽãŽ¡ãŽŽãŽã„°兙兛兞å…兡兣嗧瓩糎â–",7,"â–â–Žâ–▌▋▊▉┼┴┬┤├▔─│▕┌â”└┘╭"],
+["a2a1","╮╰╯â•â•žâ•ªâ•¡â—¢â—£â—¥â—¤â•±â•²â•³ï¼",9,"â… ",9,"〡",8,"åå„å…A",25,"ï½",21],
+["a340","wxyzΑ",16,"Σ",6,"α",16,"σ",6,"ㄅ",10],
+["a3a1","ã„",25,"˙ˉˊˇˋ"],
+["a3e1","€"],
+["a440","一乙ä¸ä¸ƒä¹ƒä¹äº†äºŒäººå„¿å…¥å…«å‡ åˆ€åˆåŠ›åŒ•ååœåˆä¸‰ä¸‹ä¸ˆä¸Šä¸«ä¸¸å‡¡ä¹…么也乞于亡兀刃勺åƒå‰å£åœŸå£«å¤•å¤§å¥³å­å­‘孓寸å°å°¢å°¸å±±å·å·¥å·±å·²å·³å·¾å¹²å»¾å¼‹å¼“æ‰"],
+["a4a1","丑ä¸ä¸ä¸­ä¸°ä¸¹ä¹‹å°¹äºˆäº‘井互五亢ä»ä»€ä»ƒä»†ä»‡ä»ä»Šä»‹ä»„å…ƒå…內六兮公冗凶分切刈勻勾勿化匹åˆå‡å…åžåŽ„å‹åŠå壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛æ°æ°´ç«çˆªçˆ¶çˆ»ç‰‡ç‰™ç‰›çŠ¬çŽ‹ä¸™"],
+["a540","世丕且丘主ä¹ä¹ä¹Žä»¥ä»˜ä»”仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北åŒä»ŸåŠå‰å¡å å¯å®åŽ»å¯å¤å³å¬å®å©å¨å¼å¸åµå«å¦åªå²å±å°å¥å­å»å››å›šå¤–"],
+["a5a1","央失奴奶孕它尼巨巧左市布平幼å¼å¼˜å¼—必戊打扔扒扑斥旦朮本未末札正æ¯æ°‘æ°æ°¸æ±æ±€æ°¾çŠ¯çŽ„玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕ä¼ä¼ä¼‘ä¼ä»²ä»¶ä»»ä»°ä»³ä»½ä¼ä¼‹å…‰å…‡å…†å…ˆå…¨"],
+["a640","å…±å†å†°åˆ—刑划刎刖劣匈匡匠å°å±å‰ååŒåŠååå‹å„å‘ååˆåƒåŽå†å’因回å›åœ³åœ°åœ¨åœ­åœ¬åœ¯åœ©å¤™å¤šå¤·å¤¸å¦„奸妃好她如å¦å­—存宇守宅安寺尖屹州帆并年"],
+["a6a1","å¼å¼›å¿™å¿–戎戌æˆæˆæ‰£æ‰›æ‰˜æ”¶æ—©æ—¨æ—¬æ—­æ›²æ›³æœ‰æœ½æœ´æœ±æœµæ¬¡æ­¤æ­»æ°–æ±æ±—汙江池æ±æ±•æ±¡æ±›æ±æ±Žç°ç‰Ÿç‰ç™¾ç«¹ç±³ç³¸ç¼¶ç¾Šç¾½è€è€ƒè€Œè€’耳è¿è‚‰è‚‹è‚Œè‡£è‡ªè‡³è‡¼èˆŒèˆ›èˆŸè‰®è‰²è‰¾è™«è¡€è¡Œè¡£è¥¿é˜¡ä¸²äº¨ä½ä½ä½‡ä½—佞伴佛何估ä½ä½‘伽伺伸佃佔似但佣"],
+["a740","作你伯低伶余ä½ä½ˆä½šå…Œå…‹å…兵冶冷別判利刪刨劫助努劬匣å³åµåå­åžå¾å¦å‘Žå§å‘†å‘ƒå³å‘ˆå‘‚å›å©å‘Šå¹å»å¸å®åµå¶å å¼å‘€å±å«åŸå¬å›ªå›°å›¤å›«åŠå‘å€å"],
+["a7a1","å‡åŽåœ¾åå圻壯夾å¦å¦’妨妞妣妙妖å¦å¦¤å¦“妊妥å­å­œå­šå­›å®Œå®‹å®å°¬å±€å±å°¿å°¾å²å²‘岔岌巫希åºåº‡åºŠå»·å¼„弟彤形彷役忘忌志å¿å¿±å¿«å¿¸å¿ªæˆ’我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更æŸæŽæææ‘æœæ–æžæ‰æ†æ "],
+["a840","æ“æ—æ­¥æ¯æ±‚汞沙æ²æ²ˆæ²‰æ²…沛汪決æ²æ±°æ²Œæ±¨æ²–沒汽沃汲汾汴沆汶æ²æ²”沘沂ç¶ç¼ç½ç¸ç‰¢ç‰¡ç‰ ç‹„狂玖甬甫男甸皂盯矣ç§ç§€ç¦¿ç©¶ç³»ç½•è‚–è‚“è‚肘肛肚育良芒"],
+["a8a1","芋èŠè¦‹è§’言谷豆豕è²èµ¤èµ°è¶³èº«è»Šè¾›è¾°è¿‚迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯ä¾ä¾ä½³ä½¿ä½¬ä¾›ä¾‹ä¾†ä¾ƒä½°ä½µä¾ˆä½©ä½»ä¾–ä½¾ä¾ä¾‘佺兔兒兕兩具其典冽函刻券刷刺到刮制å‰åŠ¾åŠ»å’å”å“å‘å¦å·å¸å¹å–å”å—味呵"],
+["a940","咖呸咕咀呻呷咄咒咆呼å’呱呶和咚呢周咋命咎固垃å·åªå©å¡å¦å¤å¼å¤œå¥‰å¥‡å¥ˆå¥„奔妾妻委妹妮姑姆å§å§å§‹å§“姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居"],
+["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往å¾å½¿å½¼å¿å¿ å¿½å¿µå¿¿æ€æ€”怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押æ‹æ‹™æ‹‡æ‹æŠµæ‹šæŠ±æ‹˜æ‹–拗拆抬拎放斧於旺昔易昌昆昂明昀æ˜æ˜•æ˜Š"],
+["aa40","昇æœæœ‹æ­æž‹æž•æ±æžœæ³æ·æž‡æžæž—æ¯æ°æ¿æž‰æ¾æžæµæžšæž“æ¼æªæ²æ¬£æ­¦æ­§æ­¿æ°“氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油æ³æ²®æ³—泅泱沿治泡泛泊沬泯泜泖泠"],
+["aaa1","炕炎炒炊炙爬爭爸版牧物狀狎狙狗ç‹çŽ©çŽ¨çŽŸçŽ«çŽ¥ç”½ç–疙疚的盂盲直知矽社祀ç¥ç§‰ç§ˆç©ºç©¹ç«ºç³¾ç½”羌羋者肺肥肢肱股肫肩肴肪肯臥臾èˆèŠ³èŠèŠ™èŠ­èŠ½èŠŸèŠ¹èŠ±èŠ¬èŠ¥èŠ¯èŠ¸èŠ£èŠ°èŠ¾èŠ·è™Žè™±åˆè¡¨è»‹è¿Žè¿”近邵邸邱邶采金長門阜陀阿阻附"],
+["ab40","陂隹雨é’éžäºŸäº­äº®ä¿¡ä¾µä¾¯ä¾¿ä¿ ä¿‘ä¿ä¿ä¿ƒä¾¶ä¿˜ä¿Ÿä¿Šä¿—ä¾®ä¿ä¿„係俚俎俞侷兗冒冑冠剎剃削å‰å‰Œå‰‹å‰‡å‹‡å‹‰å‹ƒå‹åŒå—å»åŽšå›å’¬å“€å’¨å“Žå“‰å’¸å’¦å’³å“‡å“‚咽咪å“"],
+["aba1","哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契å¥å¥Žå¥å§œå§˜å§¿å§£å§¨å¨ƒå§¥å§ªå§šå§¦å¨å§»å­©å®£å®¦å®¤å®¢å®¥å°å±Žå±å±å±‹å³™å³’å··å¸å¸¥å¸Ÿå¹½åº åº¦å»ºå¼ˆå¼­å½¥å¾ˆå¾…徊律徇後徉怒æ€æ€ æ€¥æ€Žæ€¨ææ°æ¨æ¢æ†æƒæ¬æ«æªæ¤æ‰æ‹œæŒ–按拼拭æŒæ‹®æ‹½æŒ‡æ‹±æ‹·"],
+["ac40","拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔æŸæŸ¬æž¶æž¯æŸµæŸ©æŸ¯æŸ„柑枴柚查枸æŸæŸžæŸ³æž°æŸ™æŸ¢æŸæŸ’歪殃殆段毒毗氟泉洋洲洪æµæ´¥æ´Œæ´±æ´žæ´—"],
+["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷çŠçŽ»çŽ²çç€çŽ³ç”šç”­ç•ç•Œç•Žç•‹ç–«ç–¤ç–¥ç–¢ç–£ç™¸çš†çš‡çšˆç›ˆç›†ç›ƒç›…çœç›¹ç›¸çœ‰çœ‹ç›¾ç›¼çœ‡çŸœç ‚研砌ç ç¥†ç¥‰ç¥ˆç¥‡ç¦¹ç¦ºç§‘秒秋穿çªç«¿ç«½ç±½ç´‚紅紀紉紇約紆缸美羿耄"],
+["ad40","è€è€è€‘耶胖胥胚胃胄背胡胛胎胞胤èƒè‡´èˆ¢è‹§èŒƒèŒ…苣苛苦茄若茂茉苒苗英èŒè‹œè‹”苑苞苓苟苯茆è™è™¹è™»è™ºè¡è¡«è¦è§”計訂訃貞負赴赳趴è»è»Œè¿°è¿¦è¿¢è¿ªè¿¥"],
+["ada1","迭迫迤迨郊郎éƒéƒƒé…‹é…Šé‡é–‚é™é™‹é™Œé™é¢é©éŸ‹éŸ­éŸ³é é¢¨é£›é£Ÿé¦–香乘亳倌å€å€£ä¿¯å€¦å€¥ä¿¸å€©å€–倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢å‡å‡Œå‡†å‡‹å‰–剜剔剛å‰åŒªå¿åŽŸåŽåŸå“¨å”å”唷哼哥哲唆哺唔哩哭員唉哮哪"],
+["ae40","哦唧唇哽å”圃圄埂埔埋埃堉å¤å¥—奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展å±å³­å³½å³»å³ªå³¨å³°å³¶å´å³´å·®å¸­å¸«åº«åº­åº§å¼±å¾’徑å¾æ™"],
+["aea1","æ£æ¥ææ•æ­æ©æ¯æ‚„æ‚Ÿæ‚šæ‚悔悌悅悖扇拳挈拿æŽæŒ¾æŒ¯æ•æ‚æ†ææ‰æŒºæ挽挪挫挨ææŒæ•ˆæ•‰æ–™æ—旅時晉æ™æ™ƒæ™’晌晅æ™æ›¸æœ”朕朗校核案框桓根桂桔栩梳栗桌桑栽柴æ¡æ¡€æ ¼æ¡ƒæ ªæ¡…æ “æ ˜æ¡æ®Šæ®‰æ®·æ°£æ°§æ°¨æ°¦æ°¤æ³°æµªæ¶•æ¶ˆæ¶‡æµ¦æµ¸æµ·æµ™æ¶“"],
+["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈çƒçˆ¹ç‰¹ç‹¼ç‹¹ç‹½ç‹¸ç‹·çŽ†ç­ç‰ç®ç çªçžç•”ç•ç•œç•šç•™ç–¾ç—…症疲疳疽疼疹痂疸皋皰益ç›ç›Žçœ©çœŸçœ çœ¨çŸ©ç °ç §ç ¸ç ç ´ç ·"],
+["afa1","砥砭砠砟砲祕ç¥ç¥ ç¥Ÿç¥–神ç¥ç¥—祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純ç´ç´•ç´šç´œç´ç´™ç´›ç¼ºç½Ÿç¾”ç¿…ç¿è€†è€˜è€•è€™è€—耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀èˆèˆªèˆ«èˆ¨èˆ¬èŠ»èŒ«è’è”èŠèŒ¸èè‰èŒµèŒ´è茲茹茶茗è€èŒ±èŒ¨èƒ"],
+["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷è¢è¢‚衽衹記è¨è¨Žè¨Œè¨•è¨Šè¨—訓訖è¨è¨‘豈豺豹財貢起躬軒軔è»è¾±é€é€†è¿·é€€è¿ºè¿´é€ƒè¿½é€…迸邕郡éƒéƒ¢é…’é…酌釘é‡é‡—釜釙閃院陣陡"],
+["b0a1","é™›é™é™¤é™˜é™žéš»é£¢é¦¬éª¨é«˜é¬¥é¬²é¬¼ä¹¾åºå½åœå‡åƒåŒåšå‰å¥å¶åŽå•åµå´å·åå€å¯å­å…œå†•å‡°å‰ªå‰¯å‹’務勘動åŒåŒåŒ™åŒ¿å€åŒ¾åƒæ›¼å•†å•ªå•¦å•„啞啡啃啊唱啖å•å••å”¯å•¤å”¸å”®å•œå”¬å•£å”³å•å•—圈國圉域堅堊堆埠埤基堂堵執培夠奢娶å©å©‰å©¦å©ªå©€"],
+["b140","娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜å±å´‡å´†å´Žå´›å´–崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜æ¿æ‚£æ‚‰æ‚ æ‚¨æƒ‹æ‚´æƒ¦æ‚½"],
+["b1a1","情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控æ²æŽ–探接æ·æ§æŽ˜æŽªæ±æŽ©æŽ‰æŽƒæŽ›æ«æŽ¨æŽ„授掙採掬排æŽæŽ€æ»æ©æ¨æºæ•æ•–救教敗啟æ•æ•˜æ••æ•”斜斛斬æ—旋旌旎æ™æ™šæ™¤æ™¨æ™¦æ™žæ›¹å‹—望æ¢æ¢¯æ¢¢æ¢“梵桿桶梱梧梗械梃棄梭梆梅梔æ¢æ¢¨æ¢Ÿæ¢¡æ¢‚欲殺"],
+["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽çŠçŒœçŒ›çŒ–猓猙率ç…çŠçƒç†ç¾ç瓠瓶"],
+["b2a1","瓷甜產略畦畢異ç–痔痕疵痊ç—皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜èŠè†è„¯è„–脣脫脩脰脤舂舵舷舶船莎莞莘è¸èŽ¢èŽ–莽莫莒莊莓莉莠è·è»è¼"],
+["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖è¢è¢‹è¦“è¦è¨ªè¨è¨£è¨¥è¨±è¨­è¨Ÿè¨›è¨¢è±‰è±šè²©è²¬è²«è²¨è²ªè²§èµ§èµ¦è¶¾è¶ºè»›è»Ÿé€™é€é€šé€—連速é€é€é€•é€žé€ é€é€¢é€–逛途"],
+["b3a1","部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢å‚傅備傑傀傖傘傚最凱割剴創剩勞å‹å‹›åšåŽ¥å•»å–€å–§å•¼å–Šå–喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙åœå ¯å ªå ´å ¤å °å ±å ¡å å  å£¹å£ºå¥ "],
+["b440","婷媚婿媒媛媧孳孱寒富寓å¯å°Šå°‹å°±åµŒåµå´´åµ‡å·½å¹…帽幀幃幾廊å»å»‚廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌ææ€æ©æ‰æ†æ"],
+["b4a1","æ’æ£ææ¡æ–æ­æ®æ¶æ´æªæ›æ‘’æšæ¹æ•žæ•¦æ•¢æ•£æ–‘æ–斯普晰晴晶景暑智晾晷曾替期æœæ£ºæ£•æ£ æ£˜æ£—椅棟棵森棧棹棒棲棣棋æ£æ¤æ¤’椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴æ¹æ¸ºæ¸¬æ¹ƒæ¸æ¸¾æ»‹"],
+["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩çºçªç³ç¢ç¥çµç¶ç´ç¯ç›ç¦ç¨ç”¥ç”¦ç•«ç•ªç—¢ç—›ç—£ç—™ç—˜ç—žç— ç™»ç™¼çš–皓皴盜ç短ç¡ç¡¬ç¡¯ç¨ç¨ˆç¨‹ç¨…稀窘"],
+["b5a1","窗窖童竣等策筆ç­ç­’ç­”ç­ç­‹ç­ç­‘粟粥絞çµçµ¨çµ•ç´«çµ®çµ²çµ¡çµ¦çµ¢çµ°çµ³å–„翔翕耋è’肅腕腔腋腑腎脹腆脾腌腓腴舒舜è©èƒè¸èè è…è‹èè¯è±è´è‘—èŠè°èŒèŒè½è²èŠè¸èŽè„èœè‡è”èŸè™›è›Ÿè›™è›­è›”蛛蛤è›è›žè¡—è£è£‚袱覃視註詠評詞証è©"],
+["b640","詔詛è©è©†è¨´è¨ºè¨¶è©–象貂貯貼貳貽è³è²»è³€è²´è²·è²¶è²¿è²¸è¶Šè¶…è¶è·Žè·è·‹è·šè·‘跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥é‡éˆ”鈕鈣鈉鈞éˆéˆéˆ‡éˆ‘é–”é–é–‹é–‘"],
+["b6a1","間閒閎隊階隋陽隅隆éšé™²éš„é›é›…雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃é»é»‘亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧å«å«‰å«Œåª¾åª½åª¼"],
+["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚æ„慈感想愛惹æ„愈慎慌慄æ…愾愴愧æ„愆愷戡戢æ“æ¾æžæªæ­æ½æ¬ææœæ”ææ¶æ–æ—æ†æ•¬æ–Ÿæ–°æš—暉暇暈暖暄暘æšæœƒæ¦”業"],
+["b7a1","楚楷楠楔極椰概楊楨楫楞楓楹榆æ¥æ¥£æ¥›æ­‡æ­²æ¯€æ®¿æ¯“毽溢溯滓溶滂æºæºæ»‡æ»…溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷ç…猿猾瑯瑚瑕瑟瑞ç‘ç¿ç‘™ç‘›ç‘œç•¶ç•¸ç˜€ç—°ç˜ç—²ç—±ç—ºç—¿ç—´ç—³ç›žç›Ÿç›ç«ç¦çžç£"],
+["b840","ç¹çªç¬çœç¥ç¨ç¢çŸ®ç¢Žç¢°ç¢—碘碌碉硼碑碓硿祺祿ç¦è¬ç¦½ç¨œç¨šç¨ ç¨”稟稞窟窠筷節筠筮筧粱粳粵經絹綑ç¶ç¶çµ›ç½®ç½©ç½ªç½²ç¾©ç¾¨ç¾¤è–è˜è‚†è‚„腱腰腸腥腮腳腫"],
+["b8a1","腹腺腦舅艇蒂葷è½è±è‘µè‘¦è‘«è‘‰è‘¬è‘›è¼èµè‘¡è‘£è‘©è‘­è‘†è™žè™œè™Ÿè›¹èœ“蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘è£è£¡è£Šè£•è£’覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"],
+["b940","辟農é‹éŠé“é‚é”逼é•éé‡ééŽéé‘逾é鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉é‰é‰…鈹鈿鉚閘隘隔隕é›é›‹é›‰é›Šé›·é›»é›¹é›¶é–é´é¶é é ‘頓頊頒頌飼飴"],
+["b9a1","飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕åƒåƒ‘僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉å˜å˜Žå—·å˜–嘟嘈å˜å—¶åœ˜åœ–塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察å°å±¢å¶„嶇幛幣幕幗幔廓廖弊彆彰徹慇"],
+["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧æ´æ‘­æ‘»æ•²æ–¡æ——旖暢暨æšæ¦œæ¦¨æ¦•æ§æ¦®æ§“構榛榷榻榫榴æ§æ§æ¦­æ§Œæ¦¦æ§ƒæ¦£æ­‰æ­Œæ°³æ¼³æ¼”滾漓滴漩漾漠漬æ¼æ¼‚æ¼¢"],
+["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬æ¼æ»²æ»Œæ»·ç†”熙煽熊熄熒爾犒犖ç„ç瑤瑣瑪瑰瑭甄疑瘧ç˜ç˜‹ç˜‰ç˜“盡監瞄ç½ç¿ç¡ç£ç¢Ÿç¢§ç¢³ç¢©ç¢£ç¦Žç¦ç¦ç¨®ç¨±çªªçª©ç«­ç«¯ç®¡ç®•ç®‹ç­µç®—ç®ç®”ç®ç®¸ç®‡ç®„粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬"],
+["bb40","ç½°ç¿ ç¿¡ç¿Ÿèžèšè‚‡è…膀è†è†ˆè†Šè…¿è†‚臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓è’蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘è•èœ·èœ©è£³è¤‚裴裹裸製裨褚裯誦誌語誣èªèª¡èª“誤"],
+["bba1","說誥誨誘誑誚誧豪è²è²Œè³“賑賒赫趙趕跼輔輒輕輓辣é é˜éœé£é™éžé¢éé›é„™é„˜é„žé…µé…¸é…·é…´é‰¸éŠ€éŠ…銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需é¼éž…韶頗領颯颱餃餅餌餉é§éª¯éª°é«¦é­é­‚鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"],
+["bc40","劇劈劉åŠåŠŠå‹°åŽ²å˜®å˜»å˜¹å˜²å˜¿å˜´å˜©å™“噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履å¶å¶”幢幟幡廢廚廟å»å»£å» å½ˆå½±å¾·å¾µæ…¶æ…§æ…®æ…慕憂"],
+["bca1","慼慰慫慾憧æ†æ†«æ†Žæ†¬æ†šæ†¤æ†”憮戮摩摯摹撞撲撈æ’撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨æ¨æ¨žæ¨™æ§½æ¨¡æ¨“樊槳樂樅槭樑æ­æ­Žæ®¤æ¯…毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛çŽç—ç‘©ç’‹ç’ƒ"],
+["bd40","瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼ç£ç¨¿ç¨¼ç©€ç¨½ç¨·ç¨»çª¯çª®ç®­ç®±ç¯„箴篆篇ç¯ç® ç¯Œç³Šç· ç·´ç·¯ç·»ç·˜ç·¬ç·ç·¨ç·£ç·šç·žç·©ç¶žç·™ç·²ç·¹ç½µç½·ç¾¯"],
+["bda1","翩耦膛膜è†è† è†šè†˜è”—蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂è´è¶è è¦è¸è¨è™è—èŒè“è¡›è¡è¤è¤‡è¤’褓褕褊誼諒談諄誕請諸課諉諂調誰論è«èª¶èª¹è«›è±Œè±Žè±¬è³ è³žè³¦è³¤è³¬è³­è³¢è³£è³œè³ªè³¡èµ­è¶Ÿè¶£è¸«è¸è¸è¸¢è¸è¸©è¸Ÿè¸¡è¸žèººè¼è¼›è¼Ÿè¼©è¼¦è¼ªè¼œè¼ž"],
+["be40","è¼¥é©é®é¨é­é·é„°é„­é„§é„±é†‡é†‰é†‹é†ƒé‹…銻銷鋪銬鋤é‹éŠ³éŠ¼é‹’鋇鋰銲閭閱霄霆震霉é éžéž‹éžé ¡é «é œé¢³é¤Šé¤“餒餘é§é§é§Ÿé§›é§‘駕駒駙骷髮髯鬧魅魄魷魯鴆鴉"],
+["bea1","鴃麩麾黎墨齒儒儘儔å„儕冀冪å‡åŠ‘劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶å£å¢¾å£‡å£…奮å¬å¬´å­¸å¯°å°Žå½Šæ†²æ†‘憩憊æ‡æ†¶æ†¾æ‡Šæ‡ˆæˆ°æ“…æ“擋撻撼據擄擇擂æ“撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡"],
+["bf40","濃澤æ¿æ¾§æ¾³æ¿€æ¾¹æ¾¶æ¾¦æ¾ æ¾´ç†¾ç‡‰ç‡ç‡’燈燕熹燎燙燜燃燄ç¨ç’œç’£ç’˜ç’Ÿç’žç“¢ç”Œç”瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦ç©ç©Žç©†ç©Œç©‹çªºç¯™ç°‘築篤篛篡篩篦糕糖縊"],
+["bfa1","縑縈縛縣縞ç¸ç¸‰ç¸ç½¹ç¾²ç¿°ç¿±ç¿®è€¨è†³è†©è†¨è‡»èˆˆè‰˜è‰™è•Šè•™è•ˆè•¨è•©è•ƒè•‰è•­è•ªè•žèžƒèžŸèžžèž¢èžè¡¡è¤ªè¤²è¤¥è¤«è¤¡è¦ªè¦¦è«¦è«ºè««è«±è¬€è«œè«§è«®è«¾è¬è¬‚諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦éµé´é¸é²é¼éºé„´é†’錠錶鋸錳錯錢鋼錫錄錚"],
+["c040","éŒéŒ¦éŒ¡éŒ•éŒ®éŒ™é–»éš§éš¨éšªé›•éœŽéœ‘霖éœéœ“éœé›éœé¦éž˜é °é ¸é »é ·é ­é ¹é ¤é¤é¤¨é¤žé¤›é¤¡é¤šé§­é§¢é§±éª¸éª¼é«»é«­é¬¨é®‘鴕鴣鴦鴨鴒鴛默黔é¾é¾œå„ªå„Ÿå„¡å„²å‹µåšŽåš€åšåš…嚇"],
+["c0a1","åšå£•å£“壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗æªæª æ­œæ®®æ¯šæ°ˆæ¿˜æ¿±æ¿Ÿæ¿ æ¿›æ¿¤æ¿«æ¿¯æ¾€æ¿¬æ¿¡æ¿©æ¿•æ¿®æ¿°ç‡§ç‡Ÿç‡®ç‡¦ç‡¥ç‡­ç‡¬ç‡´ç‡ çˆµç‰†ç°ç²ç’©ç’°ç’¦ç’¨ç™†ç™‚癌盪瞳瞪瞰瞬"],
+["c140","瞧瞭矯磷磺磴磯ç¤ç¦§ç¦ªç©—窿簇ç°ç¯¾ç¯·ç°Œç¯ ç³ ç³œç³žç³¢ç³Ÿç³™ç³ç¸®ç¸¾ç¹†ç¸·ç¸²ç¹ƒç¸«ç¸½ç¸±ç¹…ç¹ç¸´ç¸¹ç¹ˆç¸µç¸¿ç¸¯ç½„翳翼è±è²è°è¯è³è‡†è‡ƒè†ºè‡‚臀膿膽臉膾臨舉艱薪"],
+["c1a1","薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠è¬è¬„è¬è±è°¿è±³è³ºè³½è³¼è³¸è³»è¶¨è¹‰è¹‹è¹ˆè¹Šè½„輾轂轅輿é¿é½é‚„é‚邂邀鄹醣醞醜é鎂錨éµéŠé¥é‹éŒ˜é¾é¬é›é°éšé”闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵é¨"],
+["c240","駿鮮鮫鮪鮭鴻鴿麋é»é»žé»œé»é»›é¼¾é½‹å¢åš•åš®å£™å£˜å¬¸å½æ‡£æˆ³æ“´æ“²æ“¾æ”†æ“ºæ“»æ“·æ–·æ›œæœ¦æª³æª¬æ«ƒæª»æª¸æ«‚檮檯歟歸殯瀉瀋濾瀆濺瀑ç€ç‡»ç‡¼ç‡¾ç‡¸ç·çµç’§ç’¿ç”•ç™–癘"],
+["c2a1","癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻è·è¶è‡è‡èˆŠè—è–©è—è—藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫è±è´…蹙蹣蹦蹤蹟蹕軀轉è½é‚‡é‚ƒé‚ˆé†«é†¬é‡éŽ”鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖é—闕離雜雙雛雞霤鞣鞦"],
+["c340","鞭韹é¡é¡é¡Œé¡Žé¡“颺餾餿餽餮馥騎é«é¬ƒé¬†é­é­Žé­é¯Šé¯‰é¯½é¯ˆé¯€éµ‘éµéµ é» é¼•é¼¬å„³åš¥å£žå£Ÿå£¢å¯µé¾å»¬æ‡²æ‡·æ‡¶æ‡µæ”€æ”æ› æ›æ«¥æ«æ«šæ«“瀛瀟瀨瀚ç€ç€•ç€˜çˆ†çˆç‰˜çŠ¢ç¸"],
+["c3a1","çºç’½ç“Šç“£ç–‡ç–†ç™Ÿç™¡çŸ‡ç¤™ç¦±ç©«ç©©ç°¾ç°¿ç°¸ç°½ç°·ç±€ç¹«ç¹­ç¹¹ç¹©ç¹ªç¾…繳羶羹羸臘藩è—藪藕藤藥藷蟻蠅è èŸ¹èŸ¾è¥ è¥Ÿè¥–襞è­è­œè­˜è­‰è­šè­Žè­è­†è­™è´ˆè´Šè¹¼è¹²èº‡è¹¶è¹¬è¹ºè¹´è½”轎辭邊邋醱醮é¡é‘éŸéƒéˆéœéé–é¢éé˜é¤é—é¨é—œéš´é›£éœªéœ§é¡éŸœéŸ»é¡ž"],
+["c440","願顛颼饅饉騖騙é¬é¯¨é¯§é¯–鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲çˆç»ç“癢癥礦礪礬礫竇競籌籃ç±ç³¯ç³°è¾®ç¹½ç¹¼"],
+["c4a1","纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫è´è´èº‰èºèº…躂醴釋é˜éƒé½é—¡éœ°é£„饒饑馨騫騰騷騵鰓é°é¹¹éºµé»¨é¼¯é½Ÿé½£é½¡å„·å„¸å›å›€å›‚夔屬å·æ‡¼æ‡¾æ”攜斕曩櫻欄櫺殲çŒçˆ›çŠ§ç“–瓔癩矓ç±çºçºŒç¾¼è˜—蘭蘚蠣蠢蠡蠟襪襬覽譴"],
+["c540","護譽贓躊èºèº‹è½Ÿè¾¯é†ºé®é³éµéºé¸é²é«é—¢éœ¸éœ¹éœ²éŸ¿é¡§é¡¥é¥—驅驃驀騾é«é­”魑鰭鰥鶯鶴鷂鶸éºé»¯é¼™é½œé½¦é½§å„¼å„»å›ˆå›Šå›‰å­¿å·”巒彎懿攤權歡ç‘ç˜çŽ€ç“¤ç–Šç™®ç™¬"],
+["c5a1","禳籠籟è¾è½è‡Ÿè¥²è¥¯è§¼è®€è´–贗躑躓轡酈鑄鑑鑒霽霾韃éŸé¡«é¥•é©•é©é«’鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬æ¬ç“šç«Šç±¤ç±£ç±¥çº“纖纔臢蘸蘿蠱變é‚é‚鑣鑠鑤é¨é¡¯é¥œé©šé©›é©—髓體髑鱔鱗鱖鷥麟黴囑壩攬çžç™±ç™²çŸ—ç½ç¾ˆè ¶è ¹è¡¢è®“è®’"],
+["c640","讖艷贛釀鑪é‚éˆé„韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖ç£ç±¬ç±®è »è§€èº¡é‡é‘²é‘°é¡±é¥žé«–鬣黌ç¤çŸšè®šé‘·éŸ‰é©¢é©¥çºœè®œèºªé‡…鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"],
+["c940","乂乜凵匚厂万丌乇äºå›—兀屮彳ä¸å†‡ä¸Žä¸®äº“仂仉仈冘勼å¬åŽ¹åœ å¤ƒå¤¬å°å·¿æ—¡æ®³æ¯Œæ°”爿丱丼仨仜仩仡ä»ä»šåˆŒåŒœåŒåœ¢åœ£å¤—夯å®å®„尒尻屴屳帄庀庂忉戉æ‰æ°•"],
+["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈ä¼ä¼‚伅伢伓伄仴伒冱刓刉åˆåŠ¦åŒ¢åŒŸå厊å‡å›¡å›Ÿåœ®åœªåœ´å¤¼å¦€å¥¼å¦…奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔å¿æ‰œæ‰žæ‰¤æ‰¡æ‰¦æ‰¢æ‰™æ‰ æ‰šæ‰¥æ—¯æ—®æœ¾æœ¹æœ¸æœ»æœºæœ¿æœ¼æœ³æ°˜æ±†æ±’汜æ±æ±Šæ±”汋"],
+["ca40","汌ç±ç‰žçŠ´çŠµçŽŽç”ªç™¿ç©µç½‘艸艼芀艽艿è™è¥¾é‚™é‚—邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟ä½ä½˜ä¼­ä¼³ä¼¿ä½¡å†å†¹åˆœåˆžåˆ¡åŠ­åŠ®åŒ‰å£å²åŽŽåŽå°å·åªå‘”å‘…å™åœå¥å˜"],
+["caa1","å½å‘å‘å¨å¤å‘‡å›®å›§å›¥åå…åŒå‰å‹å’夆奀妦妘妠妗妎妢å¦å¦å¦§å¦¡å®Žå®’尨尪å²å²å²ˆå²‹å²‰å²’岊岆岓岕巠帊帎庋庉庌庈åºå¼…å¼å½¸å½¶å¿’å¿‘å¿å¿­å¿¨å¿®å¿³å¿¡å¿¤å¿£å¿ºå¿¯å¿·å¿»æ€€å¿´æˆºæŠƒæŠŒæŠŽæŠæŠ”抇扱扻扺扰æŠæŠˆæ‰·æ‰½æ‰²æ‰´æ”·æ—°æ—´æ—³æ—²æ—µæ…æ‡"],
+["cb40","æ™æ•æŒæˆæææšæ‹æ¯æ°™æ°šæ±¸æ±§æ±«æ²„沋æ²æ±±æ±¯æ±©æ²šæ±­æ²‡æ²•æ²œæ±¦æ±³æ±¥æ±»æ²Žç´çºç‰£çŠ¿çŠ½ç‹ƒç‹†ç‹çŠºç‹…玕玗玓玔玒町甹疔疕çšç¤½è€´è‚•è‚™è‚è‚’è‚œèŠèŠèŠ…芎芑芓"],
+["cba1","芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹ä¾ä½¸ä¾ä¾œä¾”侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿å’咑咂咈呫呺呾呥呬呴呦å’呯呡呠咘呣呧呤囷囹å¯å²å­å«å±å°å¶åž€åµå»å³å´å¢"],
+["cc40","å¨å½å¤Œå¥…妵妺å§å§Žå¦²å§Œå§å¦¶å¦¼å§ƒå§–妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧å²å²¥å²¶å²°å²¦å¸—帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋"],
+["cca1","怴怊怗怳怚怞怬怢æ€æ€æ€®æ€“怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋æ˜æ˜…旽昑æ˜æ›¶æœŠæž…æ¬æžŽæž’æ¶æ»æž˜æž†æž„æ´æžæžŒæºæžŸæž‘枙枃æ½æžæ¸æ¹æž”欥殀歾毞æ°æ²“泬泫泮泙沶泔沭泧沷æ³æ³‚沺泃泆泭泲"],
+["cd40","æ³’æ³æ²´æ²Šæ²æ²€æ³žæ³€æ´°æ³æ³‡æ²°æ³¹æ³æ³©æ³‘炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬çŽç“瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"],
+["cda1","矷祂礿秅穸穻竻籵糽耵è‚肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓è¿è¿–迕迗邲邴邯邳邰阹阽阼阺陃ä¿ä¿…俓侲俉俋ä¿ä¿”俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽å¼åŽ—厖厙厘咺咡咭咥å“"],
+["ce40","哃èŒå’·å’®å“–咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗åžåž›åž”垘åžåž™åž¥åžšåž•å£´å¤å¥“姡姞姮娀姱å§å§ºå§½å§¼å§¶å§¤å§²å§·å§›å§©å§³å§µå§ å§¾å§´å§­å®¨å±Œå³å³˜å³Œå³—峋峛"],
+["cea1","峞峚峉峇峊峖峓峔å³å³ˆå³†å³Žå³Ÿå³¸å·¹å¸¡å¸¢å¸£å¸ å¸¤åº°åº¤åº¢åº›åº£åº¥å¼‡å¼®å½–徆怷怹æ”æ²æžæ…æ“æ‡æ‰æ›æŒæ€æ‚æŸæ€¤æ„æ˜æ¦æ®æ‰‚扃æ‹æŒæŒ‹æ‹µæŒŽæŒƒæ‹«æ‹¹æŒæŒŒæ‹¸æ‹¶æŒ€æŒ“挔拺挕拻拰æ•æ•ƒæ–ªæ–¿æ˜¶æ˜¡æ˜²æ˜µæ˜œæ˜¦æ˜¢æ˜³æ˜«æ˜ºæ˜æ˜´æ˜¹æ˜®æœæœæŸæŸ²æŸˆæžº"],
+["cf40","柜枻柸柘柀枷柅柫柤柟枵æŸæž³æŸ·æŸ¶æŸ®æŸ£æŸ‚枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀æ´æµ‚"],
+["cfa1","æ´æ´˜æ´·æ´ƒæ´æµ€æ´‡æ´ æ´¬æ´ˆæ´¢æ´‰æ´ç‚·ç‚Ÿç‚¾ç‚±ç‚°ç‚¡ç‚´ç‚µç‚©ç‰ç‰‰ç‰Šç‰¬ç‰°ç‰³ç‰®ç‹Šç‹¤ç‹¨ç‹«ç‹Ÿç‹ªç‹¦ç‹£çŽ…çŒç‚çˆç…玹玶玵玴ç«çŽ¿ç‡çŽ¾çƒç†çŽ¸ç‹ç“¬ç“®ç”®ç•‡ç•ˆç–§ç–ªç™¹ç›„眈眃眄眅眊盷盻盺矧矨砆砑砒砅ç ç ç Žç ‰ç ƒç “祊祌祋祅祄秕ç§ç§ç§–秎窀"],
+["d040","穾竑笀ç¬ç±ºç±¸ç±¹ç±¿ç²€ç²ç´ƒç´ˆç´ç½˜ç¾‘ç¾ç¾¾è€‡è€Žè€è€”耷胘胇胠胑胈胂èƒèƒ…胣胙胜胊胕胉èƒèƒ—胦èƒè‡¿èˆ¡èŠ”苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"],
+["d0a1","苤苠苺苳苭虷虴虼虳è¡è¡Žè¡§è¡ªè¡©è§“訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔é™é™‘陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢å‹åŒŽåŽžå”¦å“¢å”—唒哧哳哤唚哿唄唈哫唑唅哱"],
+["d140","唊哻哷哸哠唎唃唋åœåœ‚埌堲埕埒垺埆垽垼垸垶垿埇åŸåž¹åŸå¤Žå¥Šå¨™å¨–娭娮娕å¨å¨—娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧ææšæ§"],
+["d1a1","æ悢悈悀悒æ‚æ‚悃悕悛悗悇悜悎戙扆拲æŒæ–挬æ„æ…挶æƒæ¤æŒ¹æ‹æŠæŒ¼æŒ©æ挴æ˜æ”æ™æŒ­æ‡æŒ³æšæ‘挸æ—æ€æˆæ•Šæ•†æ—†æ—ƒæ—„旂晊晟晇晑朒朓栟栚桉栲栳栻桋æ¡æ –栱栜栵栫栭栯桎桄栴æ æ ’栔栦栨栮æ¡æ ºæ ¥æ  æ¬¬æ¬¯æ¬­æ¬±æ¬´æ­­è‚‚殈毦毤"],
+["d240","毨毣毢毧氥浺浣浤浶æ´æµ¡æ¶’浘浢浭浯涑æ¶æ·¯æµ¿æ¶†æµžæµ§æµ æ¶—浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵æ¶çƒœçƒ“烑çƒçƒ‹ç¼¹çƒ¢çƒ—烒烞烠烔çƒçƒ…烆烇烚烎烡牂牸"],
+["d2a1","牷牶猀狺狴狾狶狳狻çŒç“ç™ç¥ç–玼ç§ç£ç©çœç’ç›ç”ççšç—ç˜ç¨ç“žç“Ÿç“´ç“µç”¡ç•›ç•Ÿç–°ç—疻痄痀疿疶疺皊盉çœçœ›çœçœ“眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛ç¥ç¥œç¥“祒祑秫秬秠秮秭秪秜秞ç§çª†çª‰çª…窋窌窊窇竘ç¬"],
+["d340","笄笓笅ç¬ç¬ˆç¬Šç¬Žç¬‰ç¬’粄粑粊粌粈ç²ç²…ç´žç´ç´‘紎紘紖紓紟紒ç´ç´Œç½œç½¡ç½žç½ ç½ç½›ç¾–羒翃翂翀耖耾耹胺胲胹胵è„胻脀èˆèˆ¯èˆ¥èŒ³èŒ­è„茙è‘茥è–茿è茦茜茢"],
+["d3a1","è‚èŽèŒ›èŒªèŒˆèŒ¼è茖茤茠茷茯茩è‡è…èŒè“茞茬è‹èŒ§èˆè™“虒蚢蚨蚖èšèš‘蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎èšèšèš”衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤é…"],
+["d440","é…Žé…釕釢釚陜陟隼飣髟鬯乿å°åªå¡åžå å“å‹åå²åˆååå›åŠå¢å€•å…åŸå©å«å£å¤å†å€å®å³å—å‘å‡å‰«å‰­å‰¬å‰®å‹–勓匭厜啵啶唼å•å•å”´å”ªå•‘啢唶唵唰啒啅"],
+["d4a1","唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳åŸå ‡åŸ®åŸ£åŸ²åŸ¥åŸ¬åŸ¡å ŽåŸ¼å åŸ§å å ŒåŸ±åŸ©åŸ°å å „奜婠婘婕婧婞娸娵婭å©å©Ÿå©¥å©¬å©“婤婗婃å©å©’婄婛婈媎娾å©å¨¹å©Œå©°å©©å©‡å©‘婖婂婜孲孮å¯å¯€å±™å´žå´‹å´å´šå´ å´Œå´¨å´å´¦å´¥å´"],
+["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊æ‚悆悾悰悺惓惔æƒæƒ¤æƒ™æƒæƒˆæ‚±æƒ›æ‚·æƒŠæ‚¿æƒƒæƒæƒ€æŒ²æ¥æŽŠæŽ‚æ½æŽ½æŽžæŽ­æŽæŽ—掫掎æ¯æŽ‡æŽæ®æŽ¯æµæŽœæ­æŽ®æ¼æŽ¤æŒ»æŽŸ"],
+["d5a1","æ¸æŽ…æŽæŽ‘æŽæ°æ•“æ—晥晡晛晙晜晢朘桹梇æ¢æ¢œæ¡­æ¡®æ¢®æ¢«æ¥–桯梣梬梩桵桴梲æ¢æ¡·æ¢’桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑æ®æ®æ®Žæ®Œæ°ªæ·€æ¶«æ¶´æ¶³æ¹´æ¶¬æ·©æ·¢æ¶·æ·¶æ·”渀淈淠淟淖涾淥淜æ·æ·›æ·´æ·Šæ¶½æ·­æ·°æ¶ºæ·•æ·‚æ·æ·‰"],
+["d640","æ·æ·²æ·“淽淗æ·æ·£æ¶»çƒºç„烷焗烴焌烰焄烳ç„烼烿焆焓焀烸烶焋焂焎牾牻牼牿çŒçŒ—猇猑猘猊猈狿çŒçŒžçŽˆç¶ç¸çµç„çç½ç‡ç€çºç¼ç¿çŒç‹ç´çˆç•¤ç•£ç—Žç—’ç—"],
+["d6a1","痋痌痑ç—çšçš‰ç›“眹眯眭眱眲眴眳眽眥眻眵硈硒硉ç¡ç¡Šç¡Œç ¦ç¡…ç¡ç¥¤ç¥§ç¥©ç¥ªç¥£ç¥«ç¥¡ç¦»ç§ºç§¸ç§¶ç§·çªçª”çªç¬µç­‡ç¬´ç¬¥ç¬°ç¬¢ç¬¤ç¬³ç¬˜ç¬ªç¬ç¬±ç¬«ç¬­ç¬¯ç¬²ç¬¸ç¬šç¬£ç²”粘粖粣紵紽紸紶紺絅紬紩çµçµ‡ç´¾ç´¿çµŠç´»ç´¨ç½£ç¾•ç¾œç¾ç¾›ç¿Šç¿‹ç¿ç¿ç¿‘翇ç¿ç¿‰è€Ÿ"],
+["d740","耞耛è‡èƒèˆè„˜è„¥è„™è„›è„­è„Ÿè„¬è„žè„¡è„•è„§è„脢舑舸舳舺舴舲艴èŽèŽ£èŽ¨èŽèºè³èŽ¤è´èŽèŽèŽ•èŽ™èµèŽ”莩è½èŽƒèŽŒèŽèŽ›èŽªèŽ‹è¾èŽ¥èŽ¯èŽˆèŽ—莰è¿èŽ¦èŽ‡èŽ®è¶èŽšè™™è™–èš¿èš·"],
+["d7a1","蛂è›è›…蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜è±è±½è²¥èµ½èµ»èµ¹è¶¼è·‚趹趿è·è»˜è»žè»è»œè»—軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪"],
+["d840","釫釷釨釮镺閆閈陼陭陫陱陯隿éªé „飥馗傛傕傔傞傋傣傃傌傎å‚å¨å‚œå‚’傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈å–å–µå–喣喒喤啽喌喦啿喕喡喎圌堩堷"],
+["d8a1","堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜åªåª“åªå¯ªå¯å¯‹å¯”寑寊寎尌尰崷嵃嵫åµåµ‹å´¿å´µåµ‘嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄å¹å½˜å¾¦å¾¥å¾«æƒ‰æ‚¹æƒŒæƒ¢æƒŽæƒ„æ„”"],
+["d940","惲愊愖愅惵愓惸惼惾æƒæ„ƒæ„˜æ„æ„惿愄愋扊掔掱掰æŽæ¥æ¨æ¯æƒæ’æ³æŠæ æ¶æ•æ²æµæ‘¡æŸæŽ¾ææœæ„æ˜æ“æ‚æ‡æŒæ‹æˆæ°æ—æ™æ”²æ•§æ•ªæ•¤æ•œæ•¨æ•¥æ–Œæ–æ–žæ–®æ—æ—’"],
+["d9a1","晼晬晻暀晱晹晪晲æœæ¤Œæ£“椄棜椪棬棪棱æ¤æ£–棷棫棤棶椓æ¤æ£³æ£¡æ¤‡æ£Œæ¤ˆæ¥°æ¢´æ¤‘棯棆椔棸æ£æ£½æ£¼æ£¨æ¤‹æ¤Šæ¤—棎棈æ£æ£žæ£¦æ£´æ£‘椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿æ¹æ¹æ¹³æ¸œæ¸³æ¹‹æ¹€æ¹‘渻渃渮湞"],
+["da40","湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌ç®ç¬ç°ç«ç–"],
+["daa1","çšç¡ç­ç±ç¤ç£çç©ç ç²ç“»ç”¯ç•¯ç•¬ç—§ç—šç—¡ç—¦ç—痟痤痗皕皒盚ç†ç‡ç„çç…çŠçŽç‹çŒçŸžçŸ¬ç¡ ç¡¤ç¡¥ç¡œç¡­ç¡±ç¡ªç¡®ç¡°ç¡©ç¡¨ç¡žç¡¢ç¥´ç¥³ç¥²ç¥°ç¨‚稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪çµçµ­çµœçµ«çµ’絔絩絑絟絎缾缿罥"],
+["db40","罦羢羠羡翗è‘èè胾胔腃腊腒è…腇脽è…脺臦臮臷臸臹舄舼舽舿艵茻èè¹è£è€è¨è’è§è¤è¼è¶èè†èˆè«è£èŽ¿èèè¥è˜è¿è¡è‹èŽè–èµè‰è‰èèžè‘è†è‚è³"],
+["dba1","è•èºè‡è‘èªè“èƒè¬è®è„è»è—è¢è›è›è¾è›˜è›¢è›¦è›“蛣蛚蛪è›è›«è›œè›¬è›©è›—蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲è¤è£‰è¦•è¦˜è¦—è§è§šè§›è©Žè©è¨¹è©™è©€è©—詘詄詅詒詈詑詊詌è©è±Ÿè²è²€è²ºè²¾è²°è²¹è²µè¶„趀趉跘跓è·è·‡è·–è·œè·è·•è·™è·ˆè·—跅軯軷軺"],
+["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻é„鄀鄇鄅鄃酡酤酟酢酠éˆéˆŠéˆ¥éˆƒéˆšéˆ¦éˆéˆŒéˆ€éˆ’釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻é–é–Œé–隇陾隈"],
+["dca1","隉隃隀雂雈雃雱雰é¬é°é®é ‡é¢©é£«é³¦é»¹äºƒäº„亶傽傿僆傮僄僊傴僈僂傰åƒå‚ºå‚±åƒ‹åƒ‰å‚¶å‚¸å‡—剺剸剻剼嗃嗛嗌å—å—‹å—Šå—嗀嗔嗄嗩喿嗒å–å—嗕嗢嗖嗈嗲å—嗙嗂圔塓塨塤å¡å¡å¡‰å¡¯å¡•å¡Žå¡å¡™å¡¥å¡›å ½å¡£å¡±å£¼å«‡å«„嫋媺媸媱媵媰媿嫈媻嫆"],
+["dd40","媷嫀嫊媴媶å«åª¹åªå¯–寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰å¹å¹Žå¹Šå¹å¹‹å»…廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯æ…愩慀戠酨戣戥戤æ…æ±æ«ææ’æ‰æ æ¤"],
+["dda1","æ³æ‘ƒæŸæ•æ˜æ¹æ·æ¢æ£æŒæ¦æ°æ¨æ‘æµæ¯æŠæšæ‘€æ¥æ§æ‹æ§æ›æ®æ¡æŽæ•¯æ–’旓暆暌暕æšæš‹æšŠæš™æš”晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘æ¥æ¥´æ¥Œæ¤»æ¥‹æ¤·æ¥œæ¥æ¥‘椲楒椯楻椼歆歅歃歂歈æ­æ®›ï¨æ¯»æ¯¼"],
+["de40","毹毷毸溛滖滈æºæ»€æºŸæº“溔溠溱溹滆滒溽æ»æºžæ»‰æº·æº°æ»æº¦æ»æº²æº¾æ»ƒæ»œæ»˜æº™æº’溎æºæº¤æº¡æº¿æº³æ»æ»Šæº—溮溣煇煔煒煣煠ç…ç…煢煲煸煪煡煂煘煃煋煰煟ç…ç…“"],
+["dea1","ç…„ç…ç…šç‰çŠçŠŒçŠ‘çŠçŠŽçŒ¼ç‚猻猺ç€çŠç‰ç‘„ç‘Šç‘‹ç‘’ç‘‘ç‘—ç‘€ç‘ç‘瑎瑂瑆ç‘瑔瓡瓿瓾瓽ç”畹畷榃痯ç˜ç˜ƒç—·ç—¾ç—¼ç—¹ç—¸ç˜ç—»ç—¶ç—­ç—µç—½çš™çšµç›ç•çŸç ç’ç–çšç©ç§ç”ç™ç­çŸ ç¢‡ç¢šç¢”ç¢ç¢„碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"],
+["df40","稛ç¨çª£çª¢çªžç««ç­¦ç­¤ç­­ç­´ç­©ç­²ç­¥ç­³ç­±ç­°ç­¡ç­¸ç­¶ç­£ç²²ç²´ç²¯ç¶ˆç¶†ç¶€ç¶çµ¿ç¶…絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯"],
+["dfa1","è…„è…¡èˆè‰‰è‰„艀艂艅蓱è¿è‘–葶葹è’è’葥葑葀蒆葧è°è‘葽葚葙葴葳è‘蔇葞è·èºè´è‘ºè‘ƒè‘¸è²è‘…è©è™è‘‹è¯è‘‚è­è‘Ÿè‘°è¹è‘Žè‘Œè‘’葯蓅蒎è»è‘‡è¶è³è‘¨è‘¾è‘„è«è‘ è‘”è‘®è‘蜋蜄蛷蜌蛺蛖蛵è蛸蜎蜉èœè›¶èœèœ…裖裋è£è£Žè£žè£›è£šè£Œè£è¦…覛觟觥觤"],
+["e040","觡觠觢觜触詶誆詿詡訿詷誂誄詵誃èªè©´è©ºè°¼è±‹è±Šè±¥è±¤è±¦è²†è²„貅賌赨赩趑趌趎è¶è¶è¶“趔è¶è¶’跰跠跬跱跮è·è·©è·£è·¢è·§è·²è·«è·´è¼†è»¿è¼è¼€è¼…輇輈輂輋é’逿"],
+["e0a1","é„é‰é€½é„é„é„鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬é‰é‰ é‰§é‰¯éˆ¶é‰¡é‰°éˆ±é‰”鉣é‰é‰²é‰Žé‰“鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵é³é·é¸é²é é é Žé¢¬é£¶é£¹é¦¯é¦²é¦°é¦µéª­éª«é­›é³ªé³­é³§éº€é»½åƒ¦åƒ”僗僨僳僛僪åƒåƒ¤åƒ“僬僰僯僣僠"],
+["e140","凘劀åŠå‹©å‹«åŒ°åŽ¬å˜§å˜•å˜Œå˜’å—¼å˜å˜œå˜å˜“嘂嗺å˜å˜„嗿嗹墉塼å¢å¢˜å¢†å¢å¡¿å¡´å¢‹å¡ºå¢‡å¢‘墎塶墂墈塻墔å¢å£¾å¥«å«œå«®å«¥å«•å«ªå«šå«­å««å«³å«¢å« å«›å«¬å«žå«å«™å«¨å«Ÿå­·å¯ "],
+["e1a1","寣屣嶂嶀嵽嶆嵺å¶åµ·å¶Šå¶‰å¶ˆåµ¾åµ¼å¶åµ¹åµ¿å¹˜å¹™å¹“廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨æ…慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫æ«æ‘æ‘›æ‘摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠æ‘æ‘¿æ¿æ‘¬æ‘«æ‘™æ‘¥æ‘·æ•³æ– æš¡æš æšŸæœ…朄朢榱榶槉"],
+["e240","榠槎榖榰榬榼榑榙榎榧æ¦æ¦©æ¦¾æ¦¯æ¦¿æ§„榽榤槔榹槊榚æ§æ¦³æ¦“榪榡榞槙榗æ¦æ§‚榵榥槆歊æ­æ­‹æ®žæ®Ÿæ® æ¯ƒæ¯„毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊"],
+["e2a1","漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟æ¼æ¼žæ¼ˆæ¼¡ç†‡ç†ç†‰ç†€ç†…熂ç†ç…»ç††ç†ç†—牄牓犗犕犓çƒçç‘çŒç‘¢ç‘³ç‘±ç‘µç‘²ç‘§ç‘®ç”€ç”‚甃畽ç–瘖瘈瘌瘕瘑瘊瘔皸çžç¼çž…çž‚ç®çž€ç¯ç¾çžƒç¢²ç¢ªç¢´ç¢­ç¢¨ç¡¾ç¢«ç¢žç¢¥ç¢ ç¢¬ç¢¢ç¢¤ç¦˜ç¦Šç¦‹ç¦–禕禔禓"],
+["e340","禗禈禒ç¦ç¨«ç©Šç¨°ç¨¯ç¨¨ç¨¦çª¨çª«çª¬ç«®ç®ˆç®œç®Šç®‘ç®ç®–ç®ç®Œç®›ç®Žç®…箘劄箙箤箂粻粿粼粺綧綷緂綣綪ç·ç·€ç·…ç¶ç·Žç·„緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"],
+["e3a1","耤èèœè†‰è††è†ƒè†‡è†è†Œè†‹èˆ•è’—蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴è“è“蒪蒚蒱è“è’蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶è“蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨è«è€èœ®èœžèœ¡èœ™èœ›èƒèœ¬è蜾è†èœ èœ²èœªèœ­èœ¼èœ’蜺蜱蜵è‚蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"],
+["e440","裰裬裫è¦è¦¡è¦Ÿè¦žè§©è§«è§¨èª«èª™èª‹èª’èªèª–谽豨豩賕è³è³—趖踉踂跿è¸è·½è¸Šè¸ƒè¸‡è¸†è¸…跾踀踄è¼è¼‘輎è¼é„£é„œé„ é„¢é„Ÿé„鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪éŠ"],
+["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩éŠéŠ‹éˆ­éšžéš¡é›¿é˜é½éºé¾éžƒéž€éž‚é»éž„éžé¿éŸŽéŸé –颭颮餂餀餇é¦é¦œé§ƒé¦¹é¦»é¦ºé§‚馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵å™å™Šå™‰å™†å™˜"],
+["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫å¢å¢±å¢ å¢£å¢¯å¢¬å¢¥å¢¡å£¿å«¿å«´å«½å«·å«¶å¬ƒå«¸å¬‚嫹å¬å¬‡å¬…å¬å±§å¶™å¶—嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩å¹å¹ å¹œç·³å»›å»žå»¡å½‰å¾²æ†‹æ†ƒæ…¹æ†±æ†°æ†¢æ†‰"],
+["e5a1","憛憓憯憭憟憒憪憡æ†æ…¦æ†³æˆ­æ‘®æ‘°æ’–æ’ æ’…æ’—æ’œæ’撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛æ¨æ§¾æ¨§æ§²æ§®æ¨”槷槧橀樈槦槻æ¨æ§¼æ§«æ¨‰æ¨„樘樥æ¨æ§¶æ¨¦æ¨‡æ§´æ¨–歑殥殣殢殦æ°æ°€æ¯¿æ°‚æ½æ¼¦æ½¾æ¾‡æ¿†æ¾’"],
+["e640","æ¾æ¾‰æ¾Œæ½¢æ½æ¾…潚澖潶潬澂潕潲潒æ½æ½—澔澓æ½æ¼€æ½¡æ½«æ½½æ½§æ¾æ½“澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵ç†ç†¥ç†žç†¤ç†¡ç†ªç†œç†§ç†³çŠ˜çŠšç˜ç’çžçŸç çç›ç¡çšç™"],
+["e6a1","ç¢ç’‡ç’‰ç’Šç’†ç’瑽璅璈瑼瑹甈甇畾瘥瘞瘙ç˜ç˜œç˜£ç˜šç˜¨ç˜›çšœçšçšžçš›çžçžçž‰çžˆç£ç¢»ç£ç£Œç£‘磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨è¤è§è†£è†Ÿ"],
+["e740","膞膕膢膙膗舖è‰è‰“艒è‰è‰Žè‰‘蔤蔻è”蔀蔩蔎蔉è”蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨è”蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢"],
+["e7a1","è–è£è¤è·èŸ¡è³è˜è”è›è’è¡èšè‘èžè­èªèèŽèŸèè¯è¬èºè®èœè¥èè»èµè¢è§è©è¡šè¤…褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬è«è«†èª¸è«“諑諔諕誻諗誾諀諅諘諃誺誽諙谾è±è²è³¥è³Ÿè³™è³¨è³šè³è³§è¶ è¶œè¶¡è¶›è¸ è¸£è¸¥è¸¤è¸®è¸•è¸›è¸–踑踙踦踧"],
+["e840","踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗é³é°é¯é§é«é„¯é„«é„©é„ªé„²é„¦é„®é†…醆醊é†é†‚醄醀é‹é‹ƒé‹„鋀鋙銶é‹é‹±é‹Ÿé‹˜é‹©é‹—é‹é‹Œé‹¯é‹‚鋨鋊鋈鋎鋦é‹é‹•é‹‰é‹ é‹žé‹§é‹‘é‹“"],
+["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂éšéžŠéžŽéžˆéŸéŸé žé é ¦é ©é ¨é  é ›é §é¢²é¤ˆé£ºé¤‘餔餖餗餕駜é§é§é§“駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓é¼é¼å„œå„“儗儚儑凞匴å¡å™°å™ å™®"],
+["e940","噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓å¬å¬–嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼æ†æ†¨æ†–懅憴懆æ‡æ‡Œæ†º"],
+["e9a1","憿憸憌擗擖æ“æ“擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋æ›æš½æš»æšºæ›Œæœ£æ¨´æ©¦æ©‰æ©§æ¨²æ©¨æ¨¾æ©æ©­æ©¶æ©›æ©‘樨橚樻樿æ©æ©ªæ©¤æ©æ©æ©”橯橩橠樼橞橖橕æ©æ©Žæ©†æ­•æ­”歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪æ¿æ¾¿æ¾¸"],
+["ea40","澢濉澫æ¿æ¾¯æ¾²æ¾°ç‡…燂熿熸燖燀ç‡ç‡‹ç‡”燊燇ç‡ç†½ç‡˜ç†¼ç‡†ç‡šç‡›çŠçŠžç©ç¦ç§ç¬ç¥ç«çªç‘¿ç’šç’ ç’”璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚çžçž¡çžœçž›çž¢çž£çž•çž™"],
+["eaa1","çž—ç£ç£©ç£¥ç£ªç£žç££ç£›ç£¡ç£¢ç£­ç£Ÿç£ ç¦¤ç©„穈穇窶窸窵窱窷篞篣篧ç¯ç¯•ç¯¥ç¯šç¯¨ç¯¹ç¯”篪篢篜篫篘篟糒糔糗ç³ç³‘縒縡縗縌縟縠縓縎縜縕縚縢縋ç¸ç¸–ç¸ç¸”縥縤罃罻罼罺羱翯耪耩è¬è†±è†¦è†®è†¹è†µè†«è†°è†¬è†´è†²è†·è†§è‡²è‰•è‰–艗蕖蕅蕫è•è•“蕡蕘"],
+["eb40","蕀蕆蕤è•è•¢è•„蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦è•è•”蕥蕬虣虥虤螛èžèž—螓螒螈èžèž–螘è¹èž‡èž£èž…èžèž‘èžèž„螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠"],
+["eba1","諢諲諴諵è«è¬”諤諟諰諈諞諡諨諿諯諻貑貒è²è³µè³®è³±è³°è³³èµ¬èµ®è¶¥è¶§è¸³è¸¾è¸¸è¹€è¹…踶踼踽è¹è¸°è¸¿èº½è¼¶è¼®è¼µè¼²è¼¹è¼·è¼´é¶é¹é»é‚†éƒºé„³é„µé„¶é†“é†é†‘é†é†éŒ§éŒžéŒˆéŒŸéŒ†éŒéºéŒ¸éŒ¼éŒ›éŒ£éŒ’éŒé†éŒ­éŒŽéŒé‹‹éŒé‹ºéŒ¥éŒ“鋹鋷錴錂錤鋿錩錹錵錪錔錌"],
+["ec40","錋鋾錉錀鋻錖閼é—閾閹閺閶閿閵閽隩雔霋霒éœéž™éž—鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒é®é­ºé®•"],
+["eca1","魽鮈鴥鴗鴠鴞鴔鴩é´é´˜é´¢é´é´™é´Ÿéºˆéº†éº‡éº®éº­é»•é»–黺鼒鼽儦儥儢儤儠儩勴嚓嚌åšåš†åš„嚃噾嚂噿åšå£–壔å£å£’嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨æ–斀斶旚曒æªæª–æªæª¥æª‰æªŸæª›æª¡æªžæª‡æª“檎"],
+["ed40","檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲æ¿æ¿¢æ¿¨ç‡¡ç‡±ç‡¨ç‡²ç‡¤ç‡°ç‡¢ç³ç®ç¯ç’—璲璫ç’璪璭璱璥璯ç”甑甒ç”疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"],
+["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀ç«ç°…ç°ç¯²ç°€ç¯¿ç¯»ç°Žç¯´ç°‹ç¯³ç°‚簉簃ç°ç¯¸ç¯½ç°†ç¯°ç¯±ç°ç°Šç³¨ç¸­ç¸¼ç¹‚縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀è–薧薕薠薋薣蕻薤薚薞"],
+["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆è–è–™è–è–薢薂薈薅蕹蕶薘è–薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾è¥è¥’褷襂覭覯覮觲觳謞"],
+["eea1","謘謖謑謅謋謢è¬è¬’謕謇è¬è¬ˆè¬†è¬œè¬“謚è±è±°è±²è±±è±¯è²•è²”賹赯蹎è¹è¹“è¹è¹Œè¹‡è½ƒè½€é‚…é¾é„¸é†šé†¢é†›é†™é†Ÿé†¡é†é† éŽ¡éŽƒéŽ¯é¤é–é‡é¼é˜éœé¶é‰éé‘é é­éŽéŒéªé¹é—é•é’éé±é·é»é¡éžé£é§éŽ€éŽé™é—‡é—€é—‰é—ƒé—…閷隮隰隬霠霟霘éœéœ™éžšéž¡éžœ"],
+["ef40","éžžéžéŸ•éŸ”韱é¡é¡„顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽é¬é«¼é­ˆé®šé®¨é®žé®›é®¦é®¡é®¥é®¤é®†é®¢é® é®¯é´³éµéµ§é´¶é´®é´¯é´±é´¸é´°"],
+["efa1","鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉éºéº°é»ˆé»šé»»é»¿é¼¤é¼£é¼¢é½”龠儱儭儮嚘嚜嚗嚚åšåš™å¥°å¬¼å±©å±ªå·€å¹­å¹®æ‡˜æ‡Ÿæ‡­æ‡®æ‡±æ‡ªæ‡°æ‡«æ‡–懩擿攄擽擸æ”攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌ç€ç€ç€…瀔瀎濿瀀濻瀦濼濷瀊çˆç‡¿ç‡¹çˆƒç‡½ç¶"],
+["f040","璸瓀璵ç“璾璶璻瓂甔甓癜癤癙ç™ç™“癗癚皦皽盬矂瞺磿礌礓礔礉ç¤ç¤’礑禭禬穟簜簩簙簠簟簭ç°ç°¦ç°¨ç°¢ç°¥ç°°ç¹œç¹ç¹–繣繘繢繟繑繠繗繓羵羳翷翸èµè‡‘臒"],
+["f0a1","è‡è‰Ÿè‰žè–´è—†è—€è—ƒè—‚薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙è èŸ´èŸ¨èŸè¥“襋è¥è¥Œè¥†è¥è¥‘襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧"],
+["f140","蹛蹚蹡è¹è¹©è¹”轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛éŽéŽ‰éŽ§éŽŽéŽªéŽžéŽ¦éŽ•éŽˆéŽ™éŽŸéŽéŽ±éŽ‘鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘é›éœ£éœ¢éœ¥éž¬éž®éž¨éž«éž¤éžª"],
+["f1a1","鞢鞥韗韙韖韘韺é¡é¡‘顒颸é¥é¤¼é¤ºé¨é¨‹é¨‰é¨é¨„騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿é¯é®µé®¸é¯“鮶鯄鮹鮽鵜鵓éµéµŠéµ›éµ‹éµ™éµ–鵌鵗鵒鵔鵟鵘鵚麎麌黟é¼é¼€é¼–鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚å£å£›å¤’嬽嬾嬿巃幰"],
+["f240","徿懻攇æ”æ”攉攌攎斄旞æ—曞櫧櫠櫌櫑櫙櫋櫟櫜æ«æ««æ«æ«æ«žæ­ æ®°æ°Œç€™ç€§ç€ ç€–瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱ç¤ç¤›"],
+["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾è¸è‡—臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘è¥è¥™è¦ˆè¦·è¦¶è§¶è­è­ˆè­Šè­€è­“譖譔譋譕"],
+["f340","譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑è½è½è½“辴酀鄿醰醭éžé‡éé‚éšéé¹é¬éŒé™éŽ©é¦éŠé”é®é£é•é„éŽé€é’é§é•½é—šé—›é›¡éœ©éœ«éœ¬éœ¨éœ¦"],
+["f3a1","鞳鞷鞶éŸéŸžéŸŸé¡œé¡™é¡é¡—颿颽颻颾饈饇饃馦馧騚騕騥é¨é¨¤é¨›é¨¢é¨ é¨§é¨£é¨žé¨œé¨”髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷é¶é¶Šé¶„鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀é½é½é½–齗齘匷嚲"],
+["f440","嚵嚳壣孅巆巇廮廯忀å¿æ‡¹æ”—攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱ç‚瀸瀿瀺瀹ç€ç€»ç€³ç爓爔犨ç½ç¼ç’ºçš«çšªçš¾ç›­çŸŒçŸŽçŸçŸçŸ²ç¤¥ç¤£ç¤§ç¤¨ç¤¤ç¤©"],
+["f4a1","禲穮穬穭竷籉籈籊籇籅糮繻繾çºçº€ç¾ºç¿¿è¹è‡›è‡™èˆ‹è‰¨è‰©è˜¢è—¿è˜è—¾è˜›è˜€è—¶è˜„蘉蘅蘌藽蠙è è ‘蠗蠓蠖襣襦覹觷譠譪è­è­¨è­£è­¥è­§è­­è¶®èº†èºˆèº„轙轖轗轕轘轚é‚é…ƒé…醷醵醲醳é‹é“é»é éé”é¾é•éé¨é™ééµé€é·é‡éŽé–é’éºé‰é¸éŠé¿"],
+["f540","é¼éŒé¶é‘é†é—žé— é—Ÿéœ®éœ¯éž¹éž»éŸ½éŸ¾é¡ é¡¢é¡£é¡Ÿé£é£‚é¥é¥Žé¥™é¥Œé¥‹é¥“騲騴騱騬騪騶騩騮騸騭髇髊髆é¬é¬’鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤é¶é¶’鶘é¶é¶›"],
+["f5a1","鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞é½é½™é¾‘儺儹劘劗囃嚽嚾孈孇巋å·å»±æ‡½æ”›æ¬‚櫼欃櫸欀çƒç„çŠçˆç‰ç…ç†çˆçˆšçˆ™ç¾ç”—癪çŸç¤­ç¤±ç¤¯ç±”籓糲纊纇纈纋纆çºç½ç¾»è€°è‡è˜˜è˜ªè˜¦è˜Ÿè˜£è˜œè˜™è˜§è˜®è˜¡è˜ è˜©è˜žè˜¥"],
+["f640","è ©è è ›è  è ¤è œè «è¡Šè¥­è¥©è¥®è¥«è§ºè­¹è­¸è­…譺譻è´è´”趯躎躌轞轛è½é…†é…„酅醹é¿é»é¶é©é½é¼é°é¹éªé·é¬é‘€é±é—¥é—¤é—£éœµéœºéž¿éŸ¡é¡¤é£‰é£†é£€é¥˜é¥–騹騽驆驄驂é©é¨º"],
+["f6a1","騿é«é¬•é¬—鬘鬖鬺魒鰫é°é°œé°¬é°£é°¨é°©é°¤é°¡é¶·é¶¶é¶¼é·é·‡é·Šé·é¶¾é·…鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳é·é¶²é¹ºéºœé»«é»®é»­é¼›é¼˜é¼šé¼±é½Žé½¥é½¤é¾’亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉æ°ç•ç–ç—ç’爞爟犩ç¿ç“˜ç“•ç“™ç“—癭皭礵禴穰穱籗籜籙籛籚"],
+["f740","糴糱纑ç½ç¾‡è‡žè‰«è˜´è˜µè˜³è˜¬è˜²è˜¶è ¬è ¨è ¦è ªè ¥è¥±è¦¿è¦¾è§»è­¾è®„讂讆讅譿贕躕躔躚躒èºèº–躗轠轢酇鑌é‘é‘Šé‘‹é‘鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌é©é©ˆé©Š"],
+["f7a1","驉驒é©é«é¬™é¬«é¬»é­–魕鱆鱈鰿鱄鰹鰳é±é°¼é°·é°´é°²é°½é°¶é·›é·’é·žé·šé·‹é·é·œé·‘鷟鷩鷙鷘鷖鷵鷕é·éº¶é»°é¼µé¼³é¼²é½‚齫龕龢儽劙壨壧奲å­å·˜è ¯å½æˆæˆƒæˆ„攩攥斖曫欑欒æ¬æ¯Šç›çšçˆ¢çŽ‚çŽçŽƒç™°çŸ”籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾"],
+["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕é‘鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘é±é±Šé±é±‹é±•é±™é±Œé±Žé·»é··é·¯é·£é·«é·¸é·¤é·¶é·¡é·®é·¦é·²é·°é·¢é·¬é·´é·³é·¨é·­é»‚é»é»²é»³é¼†é¼œé¼¸é¼·é¼¶é½ƒé½"],
+["f8a1","齱齰齮齯囓å›å­Žå±­æ”­æ›­æ›®æ¬“çŸç¡çç çˆ£ç“›ç“¥çŸ•ç¤¸ç¦·ç¦¶ç±ªçº—羉艭虃蠸蠷蠵衋讔讕躞躟躠èºé†¾é†½é‡‚鑫鑨鑩雥é†éƒé‡éŸ‡éŸ¥é©žé«•é­™é±£é±§é±¦é±¢é±žé± é¸‚鷾鸇鸃鸆鸅鸀é¸é¸‰é·¿é·½é¸„麠鼞齆齴齵齶囔攮斸欘欙欗欚ç¢çˆ¦çŠªçŸ˜çŸ™ç¤¹ç±©ç±«ç³¶çºš"],
+["f940","纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳é‰é¡²é¥Ÿé±¨é±®é±­é¸‹é¸é¸é¸é¸’鸑麡黵鼉齇齸齻齺齹圞ç¦ç±¯è ¼è¶²èº¦é‡ƒé‘´é‘¸é‘¶é‘µé© é±´é±³é±±é±µé¸”鸓黶鼊"],
+["f9a1","龤ç¨ç¥ç³·è™ªè ¾è ½è ¿è®žè²œèº©è»‰é‹é¡³é¡´é£Œé¥¡é¦«é©¤é©¦é©§é¬¤é¸•é¸—齈戇欞爧虌躨钂钀é’驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺é¸ç©çªéº¤é½¾é½‰é¾˜ç¢éŠ¹è£å¢»æ’粧嫺╔╦╗╠╬╣╚╩â•â•’╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║â•â•­â•®â•°â•¯â–“"]
+]
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/eucjp.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/eucjp.json
new file mode 100644
index 0000000..4fa61ca
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/eucjp.json
@@ -0,0 +1,182 @@
+[
+["0","\u0000",127],
+["8ea1","。",62],
+["a1a1"," ã€ã€‚,.・:;?ï¼ã‚›ã‚œÂ´ï½€Â¨ï¼¾ï¿£ï¼¿ãƒ½ãƒ¾ã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ï½žâˆ¥ï½œâ€¦â€¥â€˜â€™â€œâ€ï¼ˆï¼‰ã€”〕[]{ï½ã€ˆ",9,"+ï¼Â±Ã—÷ï¼â‰ ï¼œï¼žâ‰¦â‰§âˆžâˆ´â™‚♀°′″℃¥$¢£%#&*@§☆★○â—â—Žâ—‡"],
+["a2a1","◆□■△▲▽▼※〒→â†â†‘↓〓"],
+["a2ba","∈∋⊆⊇⊂⊃∪∩"],
+["a2ca","∧∨¬⇒⇔∀∃"],
+["a2dc","∠⊥⌒∂∇≡≒≪≫√∽âˆâˆµâˆ«âˆ¬"],
+["a2f2","ʼn♯♭♪†‡¶"],
+["a2fe","â—¯"],
+["a3b0","ï¼",9],
+["a3c1","A",25],
+["a3e1","ï½",25],
+["a4a1","ã",82],
+["a5a1","ã‚¡",85],
+["a6a1","Α",16,"Σ",6],
+["a6c1","α",16,"σ",6],
+["a7a1","Ð",5,"ÐЖ",25],
+["a7d1","а",5,"ёж",25],
+["a8a1","─│┌â”┘└├┬┤┴┼â”┃â”┓┛┗┣┳┫┻╋┠┯┨┷┿â”┰┥┸╂"],
+["ada1","â‘ ",19,"â… ",9],
+["adc0","ã‰ãŒ”㌢ã㌘㌧㌃㌶ã‘ã—ãŒãŒ¦ãŒ£ãŒ«ãŠãŒ»ãŽœãŽãŽžãŽŽãŽã„㎡"],
+["addf","ã»ã€ã€Ÿâ„–ã℡㊤",4,"㈱㈲㈹ã¾ã½ã¼â‰’≡∫∮∑√⊥∠∟⊿∵∩∪"],
+["b0a1","亜唖娃阿哀愛挨姶逢葵茜ç©æ‚ªæ¡æ¸¥æ—­è‘¦èŠ¦é¯µæ¢“圧斡扱宛å§è™»é£´çµ¢ç¶¾é®Žæˆ–粟袷安庵按暗案闇éžæ以伊ä½ä¾å‰å›²å¤·å§”å¨å°‰æƒŸæ„慰易椅為ç•ç•°ç§»ç¶­ç·¯èƒƒèŽè¡£è¬‚é•éºåŒ»äº•äº¥åŸŸè‚²éƒç£¯ä¸€å£±æº¢é€¸ç¨²èŒ¨èŠ‹é°¯å…å°å’½å“¡å› å§»å¼•é£²æ·«èƒ¤è”­"],
+["b1a1","院陰隠韻å‹å³å®‡çƒç¾½è¿‚雨å¯éµœçªºä¸‘碓臼渦嘘唄æ¬è”šé°»å§¥åŽ©æµ¦ç“œé–噂云é‹é›²è餌å¡å–¶å¬°å½±æ˜ æ›³æ „永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦è¬è¶Šé–²æ¦ŽåŽ­å††åœ’堰奄宴延怨掩æ´æ²¿æ¼”炎焔煙燕猿ç¸è‰¶è‹‘è–—é é‰›é´›å¡©æ–¼æ±šç”¥å‡¹å¤®å¥¥å¾€å¿œ"],
+["b2a1","押旺横欧殴王ç¿è¥–鴬鴎黄岡沖è»å„„屋憶臆桶牡乙俺å¸æ©æ¸©ç©éŸ³ä¸‹åŒ–仮何伽価佳加å¯å˜‰å¤å«å®¶å¯¡ç§‘暇果架歌河ç«ç‚ç¦ç¦¾ç¨¼ç®‡èŠ±è‹›èŒ„è·è¯è“è¦èª²å˜©è²¨è¿¦éŽéœžèšŠä¿„峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔æ¢æ‡æˆ’æ‹æ”¹"],
+["b3a1","é­æ™¦æ¢°æµ·ç°ç•Œçš†çµµèŠ¥èŸ¹é–‹éšŽè²å‡±åŠ¾å¤–咳害崖慨概涯ç¢è“‹è¡—該鎧骸浬馨蛙垣柿蛎鈎劃嚇å„廓拡撹格核殻ç²ç¢ºç©«è¦šè§’赫較郭閣隔é©å­¦å²³æ¥½é¡é¡ŽæŽ›ç¬ æ¨«æ©¿æ¢¶é°æ½Ÿå‰²å–æ°æ‹¬æ´»æ¸‡æ»‘è‘›è¤è½„且鰹å¶æ¤›æ¨ºéž„株兜竃蒲釜鎌噛鴨栢茅è±"],
+["b4a1","粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾æ›æ•¢æŸ‘桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰è‚艦莞観諌貫還鑑間閑関陥韓館舘丸å«å²¸å·ŒçŽ©ç™Œçœ¼å²©ç¿«è´‹é›é ‘顔願ä¼ä¼Žå±å–œå™¨åŸºå¥‡å¬‰å¯„å²å¸Œå¹¾å¿Œæ®æœºæ——既期棋棄"],
+["b5a1","機帰毅気汽畿祈季稀紀徽è¦è¨˜è²´èµ·è»Œè¼é£¢é¨Žé¬¼äº€å½å„€å¦“宜戯技擬欺犠疑祇義蟻誼議掬èŠéž å‰åƒå–«æ¡”橘詰砧æµé»å´å®¢è„šè™é€†ä¸˜ä¹…仇休åŠå¸å®®å¼“急救朽求汲泣ç¸çƒç©¶çª®ç¬ˆç´šç³¾çµ¦æ—§ç‰›åŽ»å±…巨拒拠挙渠虚許è·é‹¸æ¼ç¦¦é­šäº¨äº«äº¬"],
+["b6a1","供侠僑兇競共凶å”匡å¿å«å–¬å¢ƒå³¡å¼·å½Šæ€¯ææ­æŒŸæ•™æ©‹æ³ç‹‚狭矯胸脅興蕎郷é¡éŸ¿é¥—é©šä»°å‡å°­æšæ¥­å±€æ›²æ¥µçŽ‰æ¡ç²åƒ…勤å‡å·¾éŒ¦æ–¤æ¬£æ¬½ç´ç¦ç¦½ç­‹ç·ŠèŠ¹èŒè¡¿è¥Ÿè¬¹è¿‘金åŸéŠ€ä¹å€¶å¥åŒºç‹—玖矩苦躯駆駈駒具愚虞喰空å¶å¯“é‡éš…串櫛釧屑屈"],
+["b7a1","掘窟沓é´è½¡çªªç†Šéšˆç²‚æ —ç¹°æ¡‘é¬å‹²å›è–«è¨“群è»éƒ¡å¦è¢ˆç¥ä¿‚傾刑兄啓圭çªåž‹å¥‘形径æµæ…¶æ…§æ†©æŽ²æºæ•¬æ™¯æ¡‚渓畦稽系経継繋罫茎èŠè›è¨ˆè©£è­¦è»½é šé¶èŠ¸è¿Žé¯¨åŠ‡æˆŸæ’ƒæ¿€éš™æ¡å‚‘欠決潔穴çµè¡€è¨£æœˆä»¶å€¹å€¦å¥å…¼åˆ¸å‰£å–§åœå …嫌建憲懸拳æ²"],
+["b8a1","検権牽犬献研硯絹県肩見謙賢軒é£éµé™ºé¡•é¨“鹸元原厳幻弦減æºçŽ„ç¾çµƒèˆ·è¨€è«ºé™ä¹Žå€‹å¤å‘¼å›ºå§‘孤己庫弧戸故枯湖ç‹ç³Šè¢´è‚¡èƒ¡è°è™Žèª‡è·¨éˆ·é›‡é¡§é¼“五互ä¼åˆå‘‰å¾å¨¯å¾Œå¾¡æ‚Ÿæ¢§æªŽç‘šç¢èªžèª¤è­·é†ä¹žé¯‰äº¤ä½¼ä¾¯å€™å€–光公功効勾厚å£å‘"],
+["b9a1","åŽå–‰å‘垢好孔å­å®å·¥å·§å··å¹¸åºƒåºšåº·å¼˜æ’慌抗拘控攻昂晃更æ­æ ¡æ¢—構江洪浩港æºç”²çš‡ç¡¬ç¨¿ç³ ç´…紘絞綱耕考肯肱腔è†èˆªè’行衡講貢購郊酵鉱砿鋼閤é™é …香高鴻剛劫å·åˆå£•æ‹·æ¿ è±ªè½Ÿéº¹å…‹åˆ»å‘Šå›½ç©€é…·éµ é»’ç„漉腰甑忽惚骨狛込"],
+["baa1","此頃今困å¤å¢¾å©šæ¨æ‡‡æ˜æ˜†æ ¹æ¢±æ··ç—•ç´ºè‰®é­‚些ä½å‰å”†åµ¯å·¦å·®æŸ»æ²™ç‘³ç ‚è©éŽ–裟å座挫債催å†æœ€å“‰å¡žå¦»å®°å½©æ‰æŽ¡æ ½æ­³æ¸ˆç½é‡‡çŠ€ç •ç ¦ç¥­æ–Žç´°èœè£è¼‰éš›å‰¤åœ¨æ罪財冴å‚阪堺榊肴咲崎埼碕鷺作削咋æ¾æ˜¨æœ”柵窄策索錯桜鮭笹匙冊刷"],
+["bba1","察拶撮擦札殺薩雑çšé¯–æŒéŒ†é®«çš¿æ™’三傘å‚山惨撒散桟燦çŠç”£ç®—纂蚕讃賛酸é¤æ–¬æš«æ®‹ä»•ä»”伺使刺å¸å²å—£å››å£«å§‹å§‰å§¿å­å±å¸‚師志æ€æŒ‡æ”¯å­œæ–¯æ–½æ—¨æžæ­¢æ­»æ°ç…祉ç§ç³¸ç´™ç´«è‚¢è„‚至視詞詩試誌諮資賜雌飼歯事似ä¾å…字寺慈æŒæ™‚"],
+["bca1","次滋治爾璽痔ç£ç¤ºè€Œè€³è‡ªè’”辞æ±é¹¿å¼è­˜é´«ç«ºè»¸å®é›«ä¸ƒå±åŸ·å¤±å«‰å®¤æ‚‰æ¹¿æ¼†ç–¾è³ªå®Ÿè”€ç¯ å²æŸ´èŠå±¡è•Šç¸žèˆŽå†™å°„æ¨èµ¦æ–œç…®ç¤¾ç´—者è¬è»Šé®è›‡é‚ªå€Ÿå‹ºå°ºæ“ç¼çˆµé…Œé‡ˆéŒ«è‹¥å¯‚弱惹主å–守手朱殊狩ç ç¨®è…«è¶£é…’首儒å—呪寿授樹綬需囚åŽå‘¨"],
+["bda1","宗就州修æ„拾洲秀秋終ç¹ç¿’臭舟è’衆襲è®è¹´è¼¯é€±é…‹é…¬é›†é†œä»€ä½å……å従戎柔æ±æ¸‹ç£ç¸¦é‡éŠƒå”夙宿淑ç¥ç¸®ç²›å¡¾ç†Ÿå‡ºè¡“述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡éµé†‡é †å‡¦åˆæ‰€æš‘曙渚庶緒署書薯藷諸助å™å¥³åºå¾æ•é‹¤é™¤å‚·å„Ÿ"],
+["bea1","å‹åŒ å‡å¬å“¨å•†å”±å˜—奨妾娼宵将å°å°‘尚庄床廠彰承抄招掌æ·æ˜‡æ˜Œæ˜­æ™¶æ¾æ¢¢æ¨Ÿæ¨µæ²¼æ¶ˆæ¸‰æ¹˜ç„¼ç„¦ç…§ç—‡çœç¡ç¤ç¥¥ç§°ç« ç¬‘粧紹肖è–蒋蕉è¡è£³è¨Ÿè¨¼è©”詳象賞醤鉦é¾é˜éšœéž˜ä¸Šä¸ˆä¸žä¹—冗剰城場壌嬢常情擾æ¡æ–浄状畳穣蒸譲醸錠嘱埴飾"],
+["bfa1","æ‹­æ¤æ®–燭織è·è‰²è§¦é£Ÿè•è¾±å°»ä¼¸ä¿¡ä¾µå”‡å¨ å¯å¯©å¿ƒæ…ŽæŒ¯æ–°æ™‹æ£®æ¦›æµ¸æ·±ç”³ç–¹çœŸç¥žç§¦ç´³è‡£èŠ¯è–ªè¦ªè¨ºèº«è¾›é€²é‡éœ‡äººä»åˆƒå¡µå£¬å°‹ç”šå°½è…Žè¨Šè¿…陣é­ç¬¥è«é ˆé…¢å›³åŽ¨é€—å¹åž‚帥推水炊ç¡ç²‹ç¿ è¡°é‚é…”éŒéŒ˜éšç‘žé«„崇嵩数枢趨雛æ®æ‰æ¤™è…頗雀裾"],
+["c0a1","澄摺寸世瀬ç•æ˜¯å‡„制勢姓å¾æ€§æˆæ”¿æ•´æ˜Ÿæ™´æ£²æ –正清牲生盛精è–声製西誠誓請é€é†’é’é™æ–‰ç¨Žè„†éš»å¸­æƒœæˆšæ–¥æ˜”æžçŸ³ç©ç±ç¸¾è„Šè²¬èµ¤è·¡è¹Ÿç¢©åˆ‡æ‹™æŽ¥æ‘‚折設窃節説雪絶舌è‰ä»™å…ˆåƒå å®£å°‚å°–å·æˆ¦æ‰‡æ’°æ “栴泉浅洗染潜煎煽旋穿箭線"],
+["c1a1","繊羨腺舛船薦詮賎践é¸é·éŠ­éŠ‘閃鮮å‰å–„漸然全禅繕膳糎噌塑岨措曾曽楚狙ç–疎礎祖租粗素組蘇訴阻é¡é¼ åƒ§å‰µåŒå¢å€‰å–ªå£®å¥çˆ½å®‹å±¤åŒæƒ£æƒ³æœæŽƒæŒ¿æŽ»æ“早曹巣æ§æ§½æ¼•ç‡¥äº‰ç—©ç›¸çª“糟ç·ç¶œè¡è‰è˜è‘¬è’¼è—»è£…èµ°é€é­éŽ—霜騒åƒå¢—憎"],
+["c2a1","臓蔵贈造促å´å‰‡å³æ¯æ‰æŸæ¸¬è¶³é€Ÿä¿—属賊æ—続å’袖其æƒå­˜å­«å°Šææ‘éœä»–多太汰詑唾堕妥惰打æŸèˆµæ¥•é™€é§„騨体堆対è€å²±å¸¯å¾…怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代å°å¤§ç¬¬é†é¡Œé·¹æ»ç€§å“啄宅托択拓沢濯ç¢è¨—é¸æ¿è«¾èŒ¸å‡§è›¸åª"],
+["c3a1","å©ä½†é”辰奪脱巽竪辿棚谷狸鱈樽誰丹å˜å˜†å¦æ‹…探旦歎淡湛炭短端箪綻耽胆蛋誕é›å›£å£‡å¼¾æ–­æš–檀段男談値知地弛æ¥æ™ºæ± ç—´ç¨šç½®è‡´èœ˜é…馳築畜竹筑蓄é€ç§©çª’茶嫡ç€ä¸­ä»²å®™å¿ æŠ½æ˜¼æŸ±æ³¨è™«è¡·è¨»é…Žé‹³é§æ¨—瀦猪苧著貯ä¸å…†å‡‹å–‹å¯µ"],
+["c4a1","帖帳åºå¼”張彫徴懲挑暢æœæ½®ç‰’町眺è´è„¹è…¸è¶èª¿è«œè¶…跳銚長頂鳥勅æ—直朕沈ç賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴é”椿潰åªå£·å¬¬ç´¬çˆªåŠé‡£é¶´äº­ä½Žåœåµå‰ƒè²žå‘ˆå ¤å®šå¸åº•åº­å»·å¼Ÿæ‚ŒæŠµæŒºæ梯汀碇禎程締艇訂諦蹄逓"],
+["c5a1","邸鄭釘鼎泥摘擢敵滴的笛é©é‘溺哲徹撤è½è¿­é‰„典填天展店添çºç”œè²¼è»¢é¡›ç‚¹ä¼æ®¿æ¾±ç”°é›»å…Žå堵塗妬屠徒斗æœæ¸¡ç™»èŸè³­é€”都é砥砺努度土奴怒倒党冬å‡åˆ€å”塔塘套宕島嶋悼投æ­æ±æ¡ƒæ¢¼æ£Ÿç›—淘湯涛ç¯ç‡ˆå½“痘祷等答筒糖統到"],
+["c6a1","董蕩藤討謄豆è¸é€ƒé€é™é™¶é ­é¨°é—˜åƒå‹•åŒå ‚導憧撞洞瞳童胴è„é“銅峠鴇匿得徳涜特ç£ç¦¿ç¯¤æ¯’独読栃橡凸çªæ¤´å±Šé³¶è‹«å¯…酉瀞噸屯惇敦沌豚é頓呑曇éˆå¥ˆé‚£å†…ä¹å‡ªè–™è¬Žç˜æºé‹æ¥¢é¦´ç¸„ç•·å—楠軟難æ±äºŒå°¼å¼è¿©åŒ‚賑肉虹廿日乳入"],
+["c7a1","如尿韮任妊å¿èªæ¿¡ç¦°ç¥¢å¯§è‘±çŒ«ç†±å¹´å¿µæ»æ’šç‡ƒç²˜ä¹ƒå»¼ä¹‹åŸœåš¢æ‚©æ¿ƒç´èƒ½è„³è†¿è¾²è¦—蚤巴把播覇æ·æ³¢æ´¾ç¶ç ´å©†ç½µèŠ­é¦¬ä¿³å»ƒæ‹æŽ’æ•—æ¯ç›ƒç‰ŒèƒŒè‚ºè¼©é…å€åŸ¹åª’梅楳煤狽買売賠陪這è¿ç§¤çŸ§è©ä¼¯å‰¥åšæ‹æŸæ³Šç™½ç®”粕舶薄迫æ›æ¼ çˆ†ç¸›èŽ«é§éº¦"],
+["c8a1","函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪ä¼ç½°æŠœç­é–¥é³©å™ºå¡™è›¤éš¼ä¼´åˆ¤åŠåå›å¸†æ¬æ–‘æ¿æ°¾æ±Žç‰ˆçŠ¯ç­ç•”ç¹èˆ¬è—©è²©ç¯„釆煩頒飯挽晩番盤ç£è•ƒè›®åŒªå‘å¦å¦ƒåº‡å½¼æ‚²æ‰‰æ‰¹æŠ«æ–比泌疲皮碑秘緋罷肥被誹費é¿éžé£›æ¨‹ç°¸å‚™å°¾å¾®æž‡æ¯˜çµçœ‰ç¾Ž"],
+["c9a1","鼻柊稗匹疋髭彦è†è±è‚˜å¼¼å¿…畢筆逼桧姫媛ç´ç™¾è¬¬ä¿µå½ªæ¨™æ°·æ¼‚瓢票表評豹廟æ病秒苗錨鋲蒜蛭鰭å“彬斌浜瀕貧賓頻æ•ç“¶ä¸ä»˜åŸ å¤«å©¦å¯Œå†¨å¸ƒåºœæ€–扶敷斧普浮父符è…膚芙譜負賦赴阜附侮撫武舞葡蕪部å°æ¥“風葺蕗ä¼å‰¯å¾©å¹…æœ"],
+["caa1","ç¦è…¹è¤‡è¦†æ·µå¼—払沸ä»ç‰©é®’分å»å™´å¢³æ†¤æ‰®ç„šå¥®ç²‰ç³žç´›é›°æ–‡èžä¸™ä½µå…µå¡€å¹£å¹³å¼ŠæŸ„並蔽閉陛米é åƒ»å£ç™–碧別瞥蔑箆å変片篇編辺返é便勉娩å¼éž­ä¿èˆ—鋪圃æ•æ­©ç”«è£œè¼”穂募墓慕戊暮æ¯ç°¿è©å€£ä¿¸åŒ…呆報奉å®å³°å³¯å´©åº–抱æ§æ”¾æ–¹æœ‹"],
+["cba1","法泡烹砲縫胞芳èŒè“¬èœ‚褒訪豊邦鋒飽鳳鵬ä¹äº¡å‚剖åŠå¦¨å¸½å¿˜å¿™æˆ¿æš´æœ›æŸæ£’冒紡肪膨謀貌貿鉾防å é ¬åŒ—僕åœå¢¨æ’²æœ´ç‰§ç¦ç©†é‡¦å‹ƒæ²¡æ®†å €å¹Œå¥”本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒æ¡äº¦ä¿£åˆæŠ¹æœ«æ²«è¿„侭繭麿万慢満"],
+["cca1","漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙ç²æ°‘眠務夢無牟矛霧鵡椋婿娘冥å命明盟迷銘鳴姪ç‰æ»…å…棉綿緬é¢éººæ‘¸æ¨¡èŒ‚妄孟毛猛盲網耗蒙儲木黙目æ¢å‹¿é¤…尤戻籾貰å•æ‚¶ç´‹é–€åŒä¹Ÿå†¶å¤œçˆºè€¶é‡Žå¼¥çŸ¢åŽ„役約薬訳èºé–柳薮鑓愉愈油癒"],
+["cda1","諭輸唯佑優勇å‹å®¥å¹½æ‚ æ†‚æ–有柚湧涌猶猷由ç¥è£•èª˜éŠé‚‘郵雄èžå¤•äºˆä½™ä¸Žèª‰è¼¿é å‚­å¹¼å¦–容庸æšæºæ“曜楊様洋溶熔用窯羊耀葉蓉è¦è¬¡è¸Šé¥é™½é¤Šæ…¾æŠ‘欲沃浴翌翼淀羅螺裸æ¥èŽ±é ¼é›·æ´›çµ¡è½é…ªä¹±åµåµæ¬„æ¿«è—蘭覧利åå±¥æŽæ¢¨ç†ç’ƒ"],
+["cea1","ç—¢è£è£¡é‡Œé›¢é™¸å¾‹çŽ‡ç«‹è‘ŽæŽ ç•¥åŠ‰æµæºœç‰ç•™ç¡«ç²’隆竜é¾ä¾¶æ…®æ—…虜了亮僚両凌寮料æ¢æ¶¼çŒŸç™‚瞭稜糧良諒é¼é‡é™µé ˜åŠ›ç·‘倫厘林淋ç‡ç³è‡¨è¼ªéš£é±—麟瑠å¡æ¶™ç´¯é¡žä»¤ä¼¶ä¾‹å†·åŠ±å¶ºæ€œçŽ²ç¤¼è‹“鈴隷零霊麗齢暦歴列劣烈裂廉æ‹æ†æ¼£ç…‰ç°¾ç·´è¯"],
+["cfa1","蓮連錬呂魯櫓炉賂路露労å©å»Šå¼„朗楼榔浪æ¼ç‰¢ç‹¼ç¯­è€è¾è‹éƒŽå…­éº“禄肋録論倭和話歪賄脇惑枠鷲亙亘é°è©«è—蕨椀湾碗腕"],
+["d0a1","弌ä¸ä¸•ä¸ªä¸±ä¸¶ä¸¼ä¸¿ä¹‚乖乘亂亅豫亊舒å¼äºŽäºžäºŸäº äº¢äº°äº³äº¶ä»Žä»ä»„仆仂仗仞仭仟价伉佚估佛ä½ä½—佇佶侈ä¾ä¾˜ä½»ä½©ä½°ä¾‘佯來侖儘俔俟俎俘俛俑俚ä¿ä¿¤ä¿¥å€šå€¨å€”倪倥倅伜俶倡倩倬俾俯們倆åƒå‡æœƒå•ååˆåšå–å¬å¸å‚€å‚šå‚…傴傲"],
+["d1a1","僉僊傳僂僖僞僥僭僣僮價僵儉å„儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉å†å†‘冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹å‰å‰„剋剌剞剔剪剴剩剳剿剽åŠåŠ”劒剱劈劑辨"],
+["d2a1","辧劬劭劼劵å‹å‹å‹—勞勣勦飭勠勳勵勸勹匆匈甸åŒåŒåŒåŒ•åŒšåŒ£åŒ¯åŒ±åŒ³åŒ¸å€å†å…丗å‰å凖åžå©å®å¤˜å»å·åŽ‚厖厠厦厥厮厰厶åƒç°’é›™åŸæ›¼ç‡®å®å¨å­åºåå½å‘€å¬å­å¼å®å¶å©åå‘Žå’呵咎呟呱呷呰咒呻咀呶咄å’咆哇咢咸咥咬哄哈咨"],
+["d3a1","咫哂咤咾咼哘哥哦å”唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳å•å–™å–€å’¯å–Šå–Ÿå•»å•¾å–˜å–žå–®å•¼å–ƒå–©å–‡å–¨å—šå—…嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎å™ç‡Ÿå˜´å˜¶å˜²å˜¸å™«å™¤å˜¯å™¬å™ªåš†åš€åšŠåš åš”åšåš¥åš®åš¶åš´å›‚åš¼å›å›ƒå›€å›ˆå›Žå›‘囓囗囮囹圀囿圄圉"],
+["d4a1","圈國åœåœ“團圖嗇圜圦圷圸åŽåœ»å€åå©åŸ€åžˆå¡å¿åž‰åž“垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙å å¡²å ¡å¡¢å¡‹å¡°æ¯€å¡’堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊å¤å¤›æ¢¦å¤¥å¤¬å¤­å¤²å¤¸å¤¾ç«’奕å¥å¥Žå¥šå¥˜å¥¢å¥ å¥§å¥¬å¥©"],
+["d5a1","奸å¦å¦ä½žä¾«å¦£å¦²å§†å§¨å§œå¦å§™å§šå¨¥å¨Ÿå¨‘娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲å«å¬ªå¬¶å¬¾å­ƒå­…孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔å¯å¯¤å¯¦å¯¢å¯žå¯¥å¯«å¯°å¯¶å¯³å°…將專å°å°“尠尢尨尸尹å±å±†å±Žå±“"],
+["d6a1","å±å±å­±å±¬å±®ä¹¢å±¶å±¹å²Œå²‘岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢å¶å¶¬å¶®å¶½å¶å¶·å¶¼å·‰å·å·“巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠å»å»‚廈å»å»"],
+["d7a1","廖廣å»å»šå»›å»¢å»¡å»¨å»©å»¬å»±å»³å»°å»´å»¸å»¾å¼ƒå¼‰å½å½œå¼‹å¼‘弖弩弭弸å½å½ˆå½Œå½Žå¼¯å½‘彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱å¿æ‚³å¿¿æ€¡æ æ€™æ€æ€©æ€Žæ€±æ€›æ€•æ€«æ€¦æ€æ€ºæšææªæ·æŸæŠæ†ææ£æƒæ¤æ‚æ¬æ«æ™æ‚æ‚惧悃悚"],
+["d8a1","悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘æ…愕愆惶惷愀惴惺愃愡惻惱æ„愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟æ…慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹æ‡æ‡¦æ‡£æ‡¶æ‡ºæ‡´æ‡¿æ‡½æ‡¼æ‡¾æˆ€æˆˆæˆ‰æˆæˆŒæˆ”戛"],
+["d9a1","戞戡截戮戰戲戳æ‰æ‰Žæ‰žæ‰£æ‰›æ‰ æ‰¨æ‰¼æŠ‚抉找抒抓抖拔抃抔拗拑抻æ‹æ‹¿æ‹†æ“”拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵æ挾ææœæ掖掎掀掫æ¶æŽ£æŽæŽ‰æŽŸæŽµæ«æ©æŽ¾æ©æ€æ†æ£æ‰æ’æ¶æ„æ–æ´æ†æ“æ¦æ¶æ”æ—æ¨æ摧摯摶摎攪撕撓撥撩撈撼"],
+["daa1","據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕æ•æ•˜æ•žæ•æ•²æ•¸æ–‚斃變斛斟斫斷旃旆æ—旄旌旒旛旙无旡旱æ²æ˜Šæ˜ƒæ—»æ³æ˜µæ˜¶æ˜´æ˜œæ™æ™„晉æ™æ™žæ™æ™¤æ™§æ™¨æ™Ÿæ™¢æ™°æšƒæšˆæšŽæš‰æš„暘æšæ›æš¹æ›‰æš¾æš¼"],
+["dba1","曄暸曖曚曠昿曦曩曰曵曷æœæœ–朞朦朧霸朮朿朶æ朸朷æ†æžæ æ™æ£æ¤æž‰æ°æž©æ¼æªæžŒæž‹æž¦æž¡æž…枷柯枴柬枳柩枸柤柞æŸæŸ¢æŸ®æž¹æŸŽæŸ†æŸ§æªœæ žæ¡†æ ©æ¡€æ¡æ ²æ¡Žæ¢³æ «æ¡™æ¡£æ¡·æ¡¿æ¢Ÿæ¢æ¢­æ¢”æ¢æ¢›æ¢ƒæª®æ¢¹æ¡´æ¢µæ¢ æ¢ºæ¤æ¢æ¡¾æ¤æ£Šæ¤ˆæ£˜æ¤¢æ¤¦æ£¡æ¤Œæ£"],
+["dca1","棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞æ¥æ¦æ¥ªæ¦²æ¦®æ§æ¦¿æ§æ§“榾槎寨槊æ§æ¦»æ§ƒæ¦§æ¨®æ¦‘榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒æ«æ¨£æ¨“橄樌橲樶橸橇橢橙橦橈樸樢æªæªæª æª„檢檣"],
+["dda1","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉æ­æ­™æ­”歛歟歡歸歹歿殀殄殃æ®æ®˜æ®•æ®žæ®¤æ®ªæ®«æ®¯æ®²æ®±æ®³æ®·æ®¼æ¯†æ¯‹æ¯“毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂æ²æ²šæ²æ²›æ±¾æ±¨æ±³æ²’æ²æ³„泱泓沽泗泅æ³æ²®æ²±æ²¾"],
+["dea1","沺泛泯泙泪洟è¡æ´¶æ´«æ´½æ´¸æ´™æ´µæ´³æ´’洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶æ¹æ¸Ÿæ¹ƒæ¸ºæ¹Žæ¸¤æ»¿æ¸æ¸¸æº‚溪溘滉溷滓溽溯滄溲滔滕æºæº¥æ»‚溟æ½æ¼‘çŒæ»¬æ»¸æ»¾æ¼¿æ»²æ¼±æ»¯æ¼²æ»Œ"],
+["dfa1","漾漓滷澆潺潸æ¾æ¾€æ½¯æ½›æ¿³æ½­æ¾‚潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑ç€ç€æ¿¾ç€›ç€šæ½´ç€ç€˜ç€Ÿç€°ç€¾ç€²ç‘ç£ç‚™ç‚’炯烱炬炸炳炮烟烋çƒçƒ™ç„‰çƒ½ç„œç„™ç…¥ç…•ç†ˆç…¦ç…¢ç…Œç…–ç…¬ç†ç‡»ç†„熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼"],
+["e0a1","燹燿çˆçˆçˆ›çˆ¨çˆ­çˆ¬çˆ°çˆ²çˆ»çˆ¼çˆ¿ç‰€ç‰†ç‰‹ç‰˜ç‰´ç‰¾çŠ‚çŠçŠ‡çŠ’犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷å€çŒ—猊猜猖çŒçŒ´çŒ¯çŒ©çŒ¥çŒ¾çŽç默ç—çªç¨ç°ç¸çµç»çºçˆçŽ³çŽçŽ»ç€ç¥ç®çžç’¢ç…瑯ç¥ç¸ç²çºç‘•ç¿ç‘Ÿç‘™ç‘瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊ç“ç“”ç±"],
+["e1a1","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎ç”甕甓甞甦甬甼畄ç•ç•Šç•‰ç•›ç•†ç•šç•©ç•¤ç•§ç•«ç•­ç•¸ç•¶ç–†ç–‡ç•´ç–Šç–‰ç–‚疔疚ç–疥疣痂疳痃疵疽疸疼疱ç—痊痒痙痣痞痾痿痼ç˜ç—°ç—ºç—²ç—³ç˜‹ç˜ç˜‰ç˜Ÿç˜§ç˜ ç˜¡ç˜¢ç˜¤ç˜´ç˜°ç˜»ç™‡ç™ˆç™†ç™œç™˜ç™¡ç™¢ç™¨ç™©ç™ªç™§ç™¬ç™°"],
+["e2a1","癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂ç›ç›–盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸ç‡çšç¨ç«ç›ç¥ç¿ç¾ç¹çžŽçž‹çž‘瞠瞞瞰瞶瞹瞿瞼瞽瞻矇çŸçŸ—矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"],
+["e3a1","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊ç¦ç¦§é½‹ç¦ªç¦®ç¦³ç¦¹ç¦ºç§‰ç§•ç§§ç§¬ç§¡ç§£ç¨ˆç¨ç¨˜ç¨™ç¨ ç¨Ÿç¦€ç¨±ç¨»ç¨¾ç¨·ç©ƒç©—穉穡穢穩é¾ç©°ç©¹ç©½çªˆçª—窕窘窖窩竈窰窶竅竄窿邃竇竊ç«ç«ç«•ç«“站竚ç«ç«¡ç«¢ç«¦ç«­ç«°ç¬‚ç¬ç¬Šç¬†ç¬³ç¬˜ç¬™ç¬žç¬µç¬¨ç¬¶ç­"],
+["e4a1","筺笄ç­ç¬‹ç­Œç­…筵筥筴筧筰筱筬筮ç®ç®˜ç®Ÿç®ç®œç®šç®‹ç®’ç®ç­ç®™ç¯‹ç¯ç¯Œç¯ç®´ç¯†ç¯ç¯©ç°‘簔篦篥籠簀簇簓篳篷簗ç°ç¯¶ç°£ç°§ç°ªç°Ÿç°·ç°«ç°½ç±Œç±ƒç±”ç±ç±€ç±ç±˜ç±Ÿç±¤ç±–籥籬籵粃ç²ç²¤ç²­ç²¢ç²«ç²¡ç²¨ç²³ç²²ç²±ç²®ç²¹ç²½ç³€ç³…糂糘糒糜糢鬻糯糲糴糶糺紆"],
+["e5a1","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮çµçµ£ç¶“綉絛ç¶çµ½ç¶›ç¶ºç¶®ç¶£ç¶µç·‡ç¶½ç¶«ç¸½ç¶¢ç¶¯ç·œç¶¸ç¶Ÿç¶°ç·˜ç·ç·¤ç·žç·»ç·²ç·¡ç¸…縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧ç¹ç¹–繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒çºçº“纔纖纎纛纜缸缺"],
+["e6a1","罅罌ç½ç½Žç½ç½‘罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞ç¾ç¾šç¾£ç¾¯ç¾²ç¾¹ç¾®ç¾¶ç¾¸è­±ç¿…翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻èŠè†è’è˜èšèŸè¢è¨è³è²è°è¶è¹è½è¿è‚„肆肅肛肓肚肭å†è‚¬èƒ›èƒ¥èƒ™èƒèƒ„胚胖脉胯胱脛脩脣脯腋"],
+["e7a1","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉è‡è‡‘臙臘臈臚臟臠臧臺臻臾èˆèˆ‚舅與舊èˆèˆèˆ–舩舫舸舳艀艙艘è‰è‰šè‰Ÿè‰¤è‰¢è‰¨è‰ªè‰«èˆ®è‰±è‰·è‰¸è‰¾èŠèŠ’芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙"],
+["e8a1","茵茴茖茲茱è€èŒ¹èè…茯茫茗茘莅莚莪莟莢莖茣莎莇莊è¼èŽµè³èµèŽ èŽ‰èŽ¨è´è“è«èŽè½èƒè˜è‹èè·è‡è è²èè¢è èŽ½è¸è”†è»è‘­èªè¼è•šè’„葷葫蒭葮蒂葩葆è¬è‘¯è‘¹èµè“Šè‘¢è’¹è’¿è’Ÿè“™è“蒻蓚è“è“蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"],
+["e9a1","è•è˜‚蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾è–藉薺è—è–¹è—è—•è—藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿è™ä¹•è™”號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉èœè›¹èœŠèœ´èœ¿èœ·èœ»èœ¥èœ©èœšè èŸè¸èŒèŽè´è—è¨è®è™"],
+["eaa1","è“è£èªè …螢螟螂螯蟋螽蟀èŸé›–螫蟄螳蟇蟆螻蟯蟲蟠è è èŸ¾èŸ¶èŸ·è ŽèŸ’蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫è¢è¡¾è¢žè¡µè¡½è¢µè¡²è¢‚袗袒袮袙袢è¢è¢¤è¢°è¢¿è¢±è£ƒè£„裔裘裙è£è£¹è¤‚裼裴裨裲褄褌褊褓襃褞褥褪褫è¥è¥„褻褶褸襌è¤è¥ è¥ž"],
+["eba1","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜è§è§§è§´è§¸è¨ƒè¨–è¨è¨Œè¨›è¨è¨¥è¨¶è©è©›è©’詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄è«è«‚諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖è¬è¬—謠謳鞫謦謫謾謨è­è­Œè­è­Žè­‰è­–譛譚譫"],
+["eca1","譟譬譯譴譽讀讌讎讒讓讖讙讚谺è±è°¿è±ˆè±Œè±Žè±è±•è±¢è±¬è±¸è±ºè²‚貉貅貊è²è²Žè²”豼貘æˆè²­è²ªè²½è²²è²³è²®è²¶è³ˆè³è³¤è³£è³šè³½è³ºè³»è´„è´…è´Šè´‡è´è´è´é½Žè´“è³è´”贖赧赭赱赳è¶è¶™è·‚趾趺è·è·šè·–跌跛跋跪跫跟跣跼踈踉跿è¸è¸žè¸è¸Ÿè¹‚踵踰踴蹊"],
+["eda1","蹇蹉蹌è¹è¹ˆè¹™è¹¤è¹ è¸ªè¹£è¹•è¹¶è¹²è¹¼èºèº‡èº…躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡é€é€žé€–逋逧逶逵逹迸"],
+["eea1","ééé‘é’逎é‰é€¾é–é˜éžé¨é¯é¶éš¨é²é‚‚é½é‚邀邊邉é‚邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀é‡é‡‰é‡‹é‡é‡–釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋é‰éŠœéŠ–銓銛鉚é‹éŠ¹éŠ·é‹©éŒé‹ºé„錮"],
+["efa1","錙錢錚錣錺錵錻éœé é¼é®é–鎰鎬鎭鎔鎹é–é—é¨é¥é˜éƒéééˆé¤éšé”é“éƒé‡éé¶é«éµé¡éºé‘鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾é’鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃é—闌闕闔闖關闡闥闢阡阨阮阯陂陌é™é™‹é™·é™œé™ž"],
+["f0a1","é™é™Ÿé™¦é™²é™¬éšéš˜éš•éš—險隧隱隲隰隴隶隸隹雎雋雉é›è¥é›œéœé›•é›¹éœ„霆霈霓霎霑éœéœ–霙霤霪霰霹霽霾é„é†éˆé‚é‰éœé é¤é¦é¨å‹’é«é±é¹éž…é¼éžéºéž†éž‹éžéžéžœéž¨éž¦éž£éž³éž´éŸƒéŸ†éŸˆéŸ‹éŸœéŸ­é½éŸ²ç«ŸéŸ¶éŸµé é Œé ¸é ¤é ¡é ·é ½é¡†é¡é¡‹é¡«é¡¯é¡°"],
+["f1a1","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡é¤é¤žé¤¤é¤ é¤¬é¤®é¤½é¤¾é¥‚饉饅é¥é¥‹é¥‘饒饌饕馗馘馥馭馮馼駟駛é§é§˜é§‘駭駮駱駲駻駸é¨é¨é¨…駢騙騫騷驅驂驀驃騾驕é©é©›é©—驟驢驥驤驩驫驪骭骰骼髀é«é«‘髓體髞髟髢髣髦髯髫髮髴髱髷"],
+["f2a1","髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃é­é­é­Žé­‘魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆é¯é¯‘鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒éµé´¿é´¾éµ†éµˆ"],
+["f3a1","éµéµžéµ¤éµ‘éµéµ™éµ²é¶‰é¶‡é¶«éµ¯éµºé¶šé¶¤é¶©é¶²é·„é·é¶»é¶¸é¶ºé·†é·é·‚鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽éºéºˆéº‹éºŒéº’麕麑éºéº¥éº©éº¸éºªéº­é¡é»Œé»Žé»é»é»”黜點é»é» é»¥é»¨é»¯é»´é»¶é»·é»¹é»»é»¼é»½é¼‡é¼ˆçš·é¼•é¼¡é¼¬é¼¾é½Šé½’齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠"],
+["f4a1","堯槇é™ç‘¤å‡œç†™"],
+["f9a1","纊褜éˆéŠˆè“œä¿‰ç‚»æ˜±æ£ˆé‹¹æ›»å½…丨仡仼伀伃伹佖侒侊侚侔ä¿å€å€¢ä¿¿å€žå†å°å‚傔僴僘兊兤å†å†¾å‡¬åˆ•åŠœåŠ¦å‹€å‹›åŒ€åŒ‡åŒ¤å²åŽ“厲å﨎咜咊咩哿喆å™å¥åž¬åŸˆåŸ‡ï¨ï¨å¢žå¢²å¤‹å¥“奛å¥å¥£å¦¤å¦ºå­–寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹å·å¼¡å¼´å½§å¾·"],
+["faa1","å¿žæ悅悊惞惕愠惲愑愷愰憘戓抦æµæ‘ æ’擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗æ¦æž»æ¡’柀æ æ¡„æ£ï¨“楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬æ·æ·¸æ·²æ·¼æ¸¹æ¹œæ¸§æ¸¼æº¿æ¾ˆæ¾µæ¿µç€…瀇瀨炅炫ç„焄煜煆煇凞ç‡ç‡¾çŠ±"],
+["fba1","犾猤猪ç·çŽ½ç‰ç–ç£ç’ç‡çµç¦çªç©ç®ç‘¢ç’‰ç’Ÿç”畯皂皜皞皛皦益ç†åŠ¯ç ¡ç¡Žç¡¤ç¡ºç¤°ï¨˜ï¨™ï¨šç¦”福禛竑竧靖竫箞ï¨çµˆçµœç¶·ç¶ ç·–繒罇羡羽èŒè¢è¿è‡è¶è‘ˆè’´è•“蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣è»ï¨¤ï¨¥é§éƒžï¨¦é„•é„§é‡š"],
+["fca1","釗釞釭釮釤釥鈆éˆéˆŠéˆºé‰€éˆ¼é‰Žé‰™é‰‘鈹鉧銧鉷鉸鋧鋗鋙é‹ï¨§é‹•é‹ é‹“錥錡鋻﨨錞鋿éŒéŒ‚é°é—鎤é†éžé¸é±é‘…鑈閒隆﨩éšéš¯éœ³éœ»éƒééé‘é•é¡—顥飯飼餧館馞驎髙髜魵魲é®é®±é®»é°€éµ°éµ«ï¨­é¸™é»‘"],
+["fcf1","ⅰ",9,"¬¦'""],
+["8fa2af","˘ˇ¸˙˯˛˚~΄΅"],
+["8fa2c2","¡¦¿"],
+["8fa2eb","ºª©®™¤№"],
+["8fa6e1","ΆΈΉΊΪ"],
+["8fa6e7","Ό"],
+["8fa6e9","ΎΫ"],
+["8fa6ec","Î"],
+["8fa6f1","άέήίϊÎόςÏϋΰώ"],
+["8fa7c2","Ђ",10,"ÐŽÐ"],
+["8fa7f2","ђ",10,"ўџ"],
+["8fa9a1","ÆÄ"],
+["8fa9a4","Ħ"],
+["8fa9a6","IJ"],
+["8fa9a8","ÅÄ¿"],
+["8fa9ab","ŊØŒ"],
+["8fa9af","ŦÞ"],
+["8fa9c1","æđðħıijĸłŀʼnŋøœßŧþ"],
+["8faaa1","ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ"],
+["8faaba","ĜĞĢĠĤÃÃŒÃÃŽÇİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑÅŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴßŶŹŽŻ"],
+["8faba1","áàäâăǎÄąåãćĉÄçċÄéèëêěėēęǵÄÄŸ"],
+["8fabbd","ġĥíìïîÇ"],
+["8fabc5","īįĩĵķĺľļńňņñóòöôǒőÅõŕřŗśÅšşťţúùüûŭǔűūųůũǘǜǚǖŵýÿŷźžż"],
+["8fb0a1","丂丄丅丌丒丟丣两丨丫丮丯丰丵乀ä¹ä¹„乇乑乚乜乣乨乩乴乵乹乿äºäº–亗äºäº¯äº¹ä»ƒä»ä»šä»›ä» ä»¡ä»¢ä»¨ä»¯ä»±ä»³ä»µä»½ä»¾ä»¿ä¼€ä¼‚伃伈伋伌伒伕伖众伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘佟佣佪佬佮佱佷佸佹佺佽佾ä¾ä¾‚侄"],
+["8fb1a1","侅侉侊侌侎ä¾ä¾’侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀ä¿ä¿…俆俈俉俋俌ä¿ä¿ä¿’俜俠俢俰俲俼俽俿倀å€å€„倇倊倌倎å€å€“倗倘倛倜å€å€žå€¢å€§å€®å€°å€²å€³å€µå€åå‚å…å†åŠåŒåŽå‘å’å“å—å™åŸå å¢å£å¦å§åªå­å°å±å€»å‚傃傄傆傊傎å‚å‚"],
+["8fb2a1","傒傓傔傖傛傜傞",4,"傪傯傰傹傺傽僀僃僄僇僌僎åƒåƒ“僔僘僜åƒåƒŸåƒ¢åƒ¤åƒ¦åƒ¨åƒ©åƒ¯åƒ±åƒ¶åƒºåƒ¾å„ƒå„†å„‡å„ˆå„‹å„Œå„儎僲å„儗儙儛儜å„儞儣儧儨儬儭儯儱儳儴儵儸儹兂兊å…兓兕兗兘兟兤兦兾冃冄冋冎冘å†å†¡å†£å†­å†¸å†ºå†¼å†¾å†¿å‡‚"],
+["8fb3a1","凈å‡å‡‘凒凓凕凘凞凢凥凮凲凳凴凷åˆåˆ‚刅划刓刕刖刘刢刨刱刲刵刼剅剉剕剗剘剚剜剟剠剡剦剮剷剸剹劀劂劅劊劌劓劕劖劗劘劚劜劤劥劦劧劯劰劶劷劸劺劻劽勀勄勆勈勌å‹å‹‘勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋"],
+["8fb4a1","匌匑匓匘匛匜匞匟匥匧匨匩匫匬匭匰匲匵匼匽匾å‚åŒå‹å™å›å¡å£å¥å¬å­å²å¹å¾åŽƒåŽ‡åŽˆåŽŽåŽ“厔厙åŽåŽ¡åŽ¤åŽªåŽ«åŽ¯åŽ²åŽ´åŽµåŽ·åŽ¸åŽºåŽ½å€å…åå’å“å•åšååžå å¦å§åµå‚å“åšå¡å§å¨åªå¯å±å´åµå‘ƒå‘„呇å‘å‘呞呢呤呦呧呩呫呭呮呴呿"],
+["8fb5a1","å’咃咅咈咉å’咑咕咖咜咟咡咦咧咩咪咭咮咱咷咹咺咻咿哆哊å“哎哠哪哬哯哶哼哾哿唀å”唅唈唉唌å”唎唕唪唫唲唵唶唻唼唽å•å•‡å•‰å•Šå•å•å•‘啘啚啛啞啠啡啤啦啿å–喂喆喈喎å–喑喒喓喔喗喣喤喭喲喿å—嗃嗆嗉嗋嗌嗎嗑嗒"],
+["8fb6a1","嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊å˜",5,"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀å™å™ƒå™„噆噉噋å™å™å™”噞噠噡噢噣噦噩噭噯噱噲噵嚄嚅嚈嚋嚌嚕嚙嚚åšåšžåšŸåš¦åš§åš¨åš©åš«åš¬åš­åš±åš³åš·åš¾å›…囉囊囋å›å›å›Œå›å›™å›œå›å›Ÿå›¡å›¤",4,"囱囫园"],
+["8fb7a1","囶囷åœåœ‚圇圊圌圑圕圚圛åœåœ åœ¢åœ£åœ¤åœ¥åœ©åœªåœ¬åœ®åœ¯åœ³åœ´åœ½åœ¾åœ¿å…å†åŒåå’å¢å¥å§å¨å«å­",4,"å³å´åµå·å¹åºå»å¼å¾åžåžƒåžŒåž”垗垙垚垜åžåžžåžŸåž¡åž•åž§åž¨åž©åž¬åž¸åž½åŸ‡åŸˆåŸŒåŸåŸ•åŸåŸžåŸ¤åŸ¦åŸ§åŸ©åŸ­åŸ°åŸµåŸ¶åŸ¸åŸ½åŸ¾åŸ¿å ƒå „堈堉埡"],
+["8fb8a1","å Œå å ›å žå Ÿå  å ¦å §å ­å ²å ¹å ¿å¡‰å¡Œå¡å¡å¡å¡•å¡Ÿå¡¡å¡¤å¡§å¡¨å¡¸å¡¼å¡¿å¢€å¢å¢‡å¢ˆå¢‰å¢Šå¢Œå¢å¢å¢å¢”墖å¢å¢ å¢¡å¢¢å¢¦å¢©å¢±å¢²å£„墼壂壈å£å£Žå£å£’壔壖壚å£å£¡å£¢å£©å£³å¤…夆夋夌夒夓夔è™å¤å¤¡å¤£å¤¤å¤¨å¤¯å¤°å¤³å¤µå¤¶å¤¿å¥ƒå¥†å¥’奓奙奛å¥å¥žå¥Ÿå¥¡å¥£å¥«å¥­"],
+["8fb9a1","奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧妭妮妯妰妳妷妺妼å§å§ƒå§„姈姊å§å§’å§å§žå§Ÿå§£å§¤å§§å§®å§¯å§±å§²å§´å§·å¨€å¨„娌å¨å¨Žå¨’娓娞娣娤娧娨娪娭娰婄婅婇婈婌å©å©•å©žå©£å©¥å©§å©­å©·å©ºå©»å©¾åª‹åªåª“媖媙媜媞媟媠媢媧媬媱媲媳媵媸媺媻媿"],
+["8fbaa1","嫄嫆嫈å«å«šå«œå« å«¥å«ªå«®å«µå«¶å«½å¬€å¬å¬ˆå¬—嬴嬙嬛å¬å¬¡å¬¥å¬­å¬¸å­å­‹å­Œå­’孖孞孨孮孯孼孽孾孿å®å®„宆宊宎å®å®‘宓宔宖宨宩宬宭宯宱宲宷宺宼寀å¯å¯å¯å¯–",4,"寠寯寱寴寽尌尗尞尟尣尦尩尫尬尮尰尲尵尶屙屚屜屢屣屧屨屩"],
+["8fbba1","屭屰屴屵屺屻屼屽岇岈岊å²å²’å²å²Ÿå² å²¢å²£å²¦å²ªå²²å²´å²µå²ºå³‰å³‹å³’å³å³—峮峱峲峴å´å´†å´å´’崫崣崤崦崧崱崴崹崽崿嵂嵃嵆嵈嵕嵑嵙嵊嵟嵠嵡嵢嵤嵪嵭嵰嵹嵺嵾嵿å¶å¶ƒå¶ˆå¶Šå¶’嶓嶔嶕嶙嶛嶟嶠嶧嶫嶰嶴嶸嶹巃巇巋å·å·Žå·˜å·™å· å·¤"],
+["8fbca1","巩巸巹帀帇å¸å¸’帔帕帘帟帠帮帨帲帵帾幋å¹å¹‰å¹‘幖幘幛幜幞幨幪",4,"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜å¼å¼¡å¼¢å¼£å¼¤å¼¨å¼«å¼¬å¼®å¼°å¼´å¼¶å¼»å¼½å¼¿å½€å½„彅彇å½å½å½”彘彛彠彣彤彧"],
+["8fbda1","彯彲彴彵彸彺彽彾徉å¾å¾å¾–徜å¾å¾¢å¾§å¾«å¾¤å¾¬å¾¯å¾°å¾±å¾¸å¿„忇忈忉忋å¿",4,"忞忡忢忨忩忪忬忭忮忯忲忳忶忺忼怇怊æ€æ€“怔怗怘怚怟怤怭怳怵æ€æ‡æˆæ‰æŒæ‘æ”æ–æ—ææ¡æ§æ±æ¾æ¿æ‚‚悆悈悊悎悑悓悕悘æ‚悞悢悤悥您悰悱悷"],
+["8fbea1","悻悾惂惄惈惉惊惋惎æƒæƒ”惕惙惛æƒæƒžæƒ¢æƒ¥æƒ²æƒµæƒ¸æƒ¼æƒ½æ„‚愇愊愌æ„",4,"愖愗愙愜愞愢愪愫愰愱愵愶愷愹æ…慅慆慉慞慠慬慲慸慻慼慿憀æ†æ†ƒæ†„憋æ†æ†’憓憗憘憜æ†æ†Ÿæ† æ†¥æ†¨æ†ªæ†­æ†¸æ†¹æ†¼æ‡€æ‡æ‡‚懎æ‡æ‡•æ‡œæ‡æ‡žæ‡Ÿæ‡¡æ‡¢æ‡§æ‡©æ‡¥"],
+["8fbfa1","懬懭懯æˆæˆƒæˆ„戇戓戕戜戠戢戣戧戩戫戹戽扂扃扄扆扌æ‰æ‰‘扒扔扖扚扜扤扭扯扳扺扽æŠæŠŽæŠæŠæŠ¦æŠ¨æŠ³æŠ¶æŠ·æŠºæŠ¾æŠ¿æ‹„拎拕拖拚拪拲拴拼拽挃挄挊挋æŒæŒæŒ“挖挘挩挪挭挵挶挹挼ææ‚æƒæ„æ†æŠæ‹æŽæ’æ“æ”æ˜æ›æ¥æ¦æ¬æ­æ±æ´æµ"],
+["8fc0a1","æ¸æ¼æ½æ¿æŽ‚掄掇掊æŽæŽ”掕掙掚掞掤掦掭掮掯掽ææ…æˆæŽæ‘æ“æ”æ•æœæ æ¥æªæ¬æ²æ³æµæ¸æ¹æ‰æŠææ’æ”æ˜æžæ æ¢æ¤æ¥æ©æªæ¯æ°æµæ½æ¿æ‘‹æ‘摑摒摓摔摚摛摜æ‘摟摠摡摣摭摳摴摻摽撅撇æ’æ’撑撘撙撛æ’撟撡撣撦撨撬撳撽撾撿"],
+["8fc1a1","擄擉擊擋擌擎æ“擑擕擗擤擥擩擪擭擰擵擷擻擿æ”攄攈攉攊æ”攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉æ•æ•’敔敟敠敧敫敺敽æ–æ–…æ–Šæ–’æ–•æ–˜æ–斠斣斦斮斲斳斴斿旂旈旉旎æ—旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉æ˜æ˜‘昒昕昖æ˜"],
+["8fc2a1","昞昡昢昣昤昦昩昪昫昬昮昰昱昳昹昷晀晅晆晊晌晑晎晗晘晙晛晜晠晡曻晪晫晬晾晳晵晿晷晸晹晻暀晼暋暌æšæšæš’暙暚暛暜暟暠暤暭暱暲暵暻暿曀曂曃曈曌曎æ›æ›”曛曟曨曫曬曮曺朅朇朎朓朙朜朠朢朳朾æ…æ‡æˆæŒæ”æ•æ"],
+["8fc3a1","æ¦æ¬æ®æ´æ¶æ»æžæž„枎æžæž‘枓枖枘枙枛枰枱枲枵枻枼枽柹柀柂柃柅柈柉柒柗柙柜柡柦柰柲柶柷桒栔栙æ æ Ÿæ ¨æ §æ ¬æ ­æ ¯æ °æ ±æ ³æ »æ ¿æ¡„桅桊桌桕桗桘桛桫桮",4,"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌æ£"],
+["8fc4a1","æ£æ£‘棓棖棙棜æ£æ£¥æ£¨æ£ªæ£«æ£¬æ£­æ£°æ£±æ£µæ£¶æ£»æ£¼æ£½æ¤†æ¤‰æ¤Šæ¤æ¤‘椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀æ¦æ¦’榖榘榡榥榦榨榫榭榯榷榸榺榼槅槈槑槖槗槢槥槮槯槱槳槵槾樀æ¨æ¨ƒæ¨æ¨‘樕樚æ¨æ¨ æ¨¤æ¨¨æ¨°æ¨²"],
+["8fc5a1","樴樷樻樾樿橅橆橉橊橎æ©æ©‘橒橕橖橛橤橧橪橱橳橾æªæªƒæª†æª‡æª‰æª‹æª‘檛æªæªžæªŸæª¥æª«æª¯æª°æª±æª´æª½æª¾æª¿æ«†æ«‰æ«ˆæ«Œæ«æ«”æ«•æ«–æ«œæ«æ«¤æ«§æ«¬æ«°æ«±æ«²æ«¼æ«½æ¬‚欃欆欇欉æ¬æ¬æ¬‘欗欛欞欤欨欫欬欯欵欶欻欿歆歊æ­æ­’æ­–æ­˜æ­æ­ æ­§æ­«æ­®æ­°æ­µæ­½"],
+["8fc6a1","歾殂殅殗殛殟殠殢殣殨殩殬殭殮殰殸殹殽殾毃毄毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉æ°æ°Žæ°æ°’氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋æ±æ±æ±’汔汙汛汜汫汭汯汴汶汸汹汻沅沆沇沉沔沕沗沘沜沟沰沲沴泂泆æ³æ³æ³æ³‘泒泔泖"],
+["8fc7a1","泚泜泠泧泩泫泬泮泲泴洄洇洊洎æ´æ´‘洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎æ·æ·–æ·›æ·æ·Ÿæ· æ·¢æ·¥æ·©æ·¯æ·°æ·´æ·¶æ·¼æ¸€æ¸„渞渢渧渲渶渹渻渼湄湅湈湉湋æ¹æ¹‘湒湓湔湗湜æ¹æ¹ž"],
+["8fc8a1","湢湣湨湳湻湽æºæº“溙溠溧溭溮溱溳溻溿滀æ»æ»ƒæ»‡æ»ˆæ»Šæ»æ»Žæ»æ»«æ»­æ»®æ»¹æ»»æ»½æ¼„漈漊漌æ¼æ¼–漘漚漛漦漩漪漯漰漳漶漻漼漭æ½æ½‘潒潓潗潙潚æ½æ½žæ½¡æ½¢æ½¨æ½¬æ½½æ½¾æ¾ƒæ¾‡æ¾ˆæ¾‹æ¾Œæ¾æ¾æ¾’澓澔澖澚澟澠澥澦澧澨澮澯澰澵澶澼濅濇濈濊"],
+["8fc9a1","濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇ç€ç€—瀠瀣瀯瀴瀷瀹瀼çƒç„çˆç‰çŠç‹ç”ç•ççžçŽç¤ç¥ç¬ç®çµç¶ç¾ç‚炅炆炔",4,"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃",4,"ç„‹ç„Œç„焞焠焫焭焯焰焱焸ç…煅煆煇煊煋ç…煒煗煚煜煞煠"],
+["8fcaa1","煨煹熀熅熇熌熒熚熛熠熢熯熰熲熳熺熿燀ç‡ç‡„燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚çˆçˆŸçˆ¤çˆ«çˆ¯çˆ´çˆ¸çˆ¹ç‰ç‰‚牃牅牎ç‰ç‰ç‰“牕牖牚牜牞牠牣牨牫牮牯牱牷牸牻牼牿犄犉çŠçŠŽçŠ“犛犨犭犮犱犴犾ç‹ç‹‡ç‹‰ç‹Œç‹•ç‹–狘狟狥狳狴狺狻"],
+["8fcba1","狾猂猄猅猇猋çŒçŒ’猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽çƒççç’ç–ç˜ççžçŸç ç¦ç§ç©ç«ç¬ç®ç¯ç±ç·ç¹ç¼çŽ€çŽçŽƒçŽ…玆玎çŽçŽ“玕玗玘玜玞玟玠玢玥玦玪玫玭玵玷玹玼玽玿ç…ç†ç‰ç‹çŒçç’ç“ç–ç™çç¡ç£ç¦ç§ç©ç´çµç·ç¹çºç»ç½"],
+["8fcca1","ç¿ç€çç„ç‡çŠç‘çšç›ç¤ç¦ç¨",9,"ç¹ç‘€ç‘ƒç‘„瑆瑇瑋ç‘ç‘‘ç‘’ç‘—ç‘瑢瑦瑧瑨瑫瑭瑮瑱瑲璀ç’璅璆璇璉ç’ç’璑璒璘璙璚璜璟璠璡璣璦璨璩璪璫璮璯璱璲璵璹璻璿瓈瓉瓌ç“瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆"],
+["8fcda1","甒甖甗甠甡甤甧甩甪甯甶甹甽甾甿畀畃畇畈畎ç•ç•’畗畞畟畡畯畱畹",5,"ç–ç–…ç–疒疓疕疙疜疢疤疴疺疿痀ç—痄痆痌痎ç—痗痜痟痠痡痤痧痬痮痯痱痹瘀瘂瘃瘄瘇瘈瘊瘌ç˜ç˜’瘓瘕瘖瘙瘛瘜ç˜ç˜žç˜£ç˜¥ç˜¦ç˜©ç˜­ç˜²ç˜³ç˜µç˜¸ç˜¹"],
+["8fcea1","瘺瘼癊癀ç™ç™ƒç™„癅癉癋癕癙癟癤癥癭癮癯癱癴çšçš…皌çšçš•çš›çšœçšçšŸçš çš¢",6,"皪皭皽ç›ç›…盉盋盌盎盔盙盠盦盨盬盰盱盶盹盼眀眆眊眎眒眔眕眗眙眚眜眢眨眭眮眯眴眵眶眹眽眾ç‚ç…ç†çŠççŽçç’ç–ç—çœçžçŸç ç¢"],
+["8fcfa1","ç¤ç§çªç¬ç°ç²ç³ç´çºç½çž€çž„瞌çžçž”瞕瞖瞚瞟瞢瞧瞪瞮瞯瞱瞵瞾矃矉矑矒矕矙矞矟矠矤矦矪矬矰矱矴矸矻砅砆砉ç ç Žç ‘ç ç ¡ç ¢ç £ç ­ç ®ç °ç µç ·ç¡ƒç¡„硇硈硌硎硒硜硞硠硡硣硤硨硪确硺硾碊ç¢ç¢”碘碡ç¢ç¢žç¢Ÿç¢¤ç¢¨ç¢¬ç¢­ç¢°ç¢±ç¢²ç¢³"],
+["8fd0a1","碻碽碿磇磈磉磌磎磒磓磕磖磤磛磟磠磡磦磪磲磳礀磶磷磺磻磿礆礌ç¤ç¤šç¤œç¤žç¤Ÿç¤ ç¤¥ç¤§ç¤©ç¤­ç¤±ç¤´ç¤µç¤»ç¤½ç¤¿ç¥„祅祆祊祋ç¥ç¥‘祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊ç§ç§”秖秚ç§ç§ž"],
+["8fd1a1","秠秢秥秪秫秭秱秸秼稂稃稇稉稊稌稑稕稛稞稡稧稫稭稯稰稴稵稸稹稺穄穅穇穈穌穕穖穙穜ç©ç©Ÿç© ç©¥ç©§ç©ªç©­ç©µç©¸ç©¾çª€çª‚窅窆窊窋çªçª‘窔窞窠窣窬窳窵窹窻窼竆竉竌竎竑竛竨竩竫竬竱竴竻竽竾笇笔笟笣笧笩笪笫笭笮笯笰"],
+["8fd2a1","笱笴笽笿筀ç­ç­‡ç­Žç­•ç­ ç­¤ç­¦ç­©ç­ªç­­ç­¯ç­²ç­³ç­·ç®„箉箎ç®ç®‘箖箛箞箠箥箬箯箰箲箵箶箺箻箼箽篂篅篈篊篔篖篗篙篚篛篨篪篲篴篵篸篹篺篼篾ç°ç°‚簃簄簆簉簋簌簎ç°ç°™ç°›ç° ç°¥ç°¦ç°¨ç°¬ç°±ç°³ç°´ç°¶ç°¹ç°ºç±†ç±Šç±•ç±‘籒籓籙",5],
+["8fd3a1","籡籣籧籩籭籮籰籲籹籼籽粆粇ç²ç²”粞粠粦粰粶粷粺粻粼粿糄糇糈糉ç³ç³ç³“糔糕糗糙糚ç³ç³¦ç³©ç³«ç³µç´ƒç´‡ç´ˆç´‰ç´ç´‘ç´’ç´“ç´–ç´ç´žç´£ç´¦ç´ªç´­ç´±ç´¼ç´½ç´¾çµ€çµçµ‡çµˆçµçµ‘絓絗絙絚絜çµçµ¥çµ§çµªçµ°çµ¸çµºçµ»çµ¿ç¶ç¶‚綃綅綆綈綋綌ç¶ç¶‘綖綗ç¶"],
+["8fd4a1","綞綦綧綪綳綶綷綹緂",4,"ç·Œç·ç·Žç·—緙縀緢緥緦緪緫緭緱緵緶緹緺縈ç¸ç¸‘縕縗縜ç¸ç¸ ç¸§ç¸¨ç¸¬ç¸­ç¸¯ç¸³ç¸¶ç¸¿ç¹„繅繇繎ç¹ç¹’繘繟繡繢繥繫繮繯繳繸繾çºçº†çº‡çºŠçºçº‘纕纘纚çºçºžç¼¼ç¼»ç¼½ç¼¾ç¼¿ç½ƒç½„罇ç½ç½’罓罛罜ç½ç½¡ç½£ç½¤ç½¥ç½¦ç½­"],
+["8fd5a1","罱罽罾罿羀羋ç¾ç¾ç¾ç¾‘羖羗羜羡羢羦羪羭羴羼羿翀翃翈翎ç¿ç¿›ç¿Ÿç¿£ç¿¥ç¿¨ç¿¬ç¿®ç¿¯ç¿²ç¿ºç¿½ç¿¾ç¿¿è€‡è€ˆè€Šè€è€Žè€è€‘耓耔耖è€è€žè€Ÿè€ è€¤è€¦è€¬è€®è€°è€´è€µè€·è€¹è€ºè€¼è€¾è€è„è è¤è¦è­è±èµè‚肈肎肜肞肦肧肫肸肹胈èƒèƒèƒ’胔胕胗胘胠胭胮"],
+["8fd6a1","胰胲胳胶胹胺胾脃脋脖脗脘脜脞脠脤脧脬脰脵脺脼腅腇腊腌腒腗腠腡腧腨腩腭腯腷è†è†è†„膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎è‡è‡•è‡—臛è‡è‡žè‡¡è‡¤è‡«è‡¬è‡°è‡±è‡²è‡µè‡¶è‡¸è‡¹è‡½è‡¿èˆ€èˆƒèˆèˆ“舔舙舚èˆèˆ¡èˆ¢èˆ¨èˆ²èˆ´èˆºè‰ƒè‰„艅艆"],
+["8fd7a1","艋艎è‰è‰‘艖艜艠艣艧艭艴艻艽艿芀èŠèŠƒèŠ„芇芉芊芎芑芔芖芘芚芛芠芡芣芤芧芨芩芪芮芰芲芴芷芺芼芾芿苆è‹è‹•è‹šè‹ è‹¢è‹¤è‹¨è‹ªè‹­è‹¯è‹¶è‹·è‹½è‹¾èŒ€èŒèŒ‡èŒˆèŒŠèŒ‹è”茛èŒèŒžèŒŸèŒ¡èŒ¢èŒ¬èŒ­èŒ®èŒ°èŒ³èŒ·èŒºèŒ¼èŒ½è‚èƒè„è‡èèŽè‘è•è–è—è°è¸"],
+["8fd8a1","è½è¿èŽ€èŽ‚莄莆èŽèŽ’莔莕莘莙莛莜èŽèŽ¦èŽ§èŽ©èŽ¬èŽ¾èŽ¿è€è‡è‰èèè‘è”èè“è¨èªè¶è¸è¹è¼èè†èŠèè‘è•è™èŽ­è¯è¹è‘…葇葈葊è‘è‘葑葒葖葘葙葚葜葠葤葥葧葪葰葳葴葶葸葼葽è’蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌è“è““"],
+["8fd9a1","蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎è”蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆è•",4,"蕖蕙蕜",6,"蕤蕫蕯蕹蕺蕻蕽蕿è–薅薆薉薋薌è–è–“è–˜è–薟薠薢薥薧薴薶薷薸薼薽薾薿藂藇藊藋藎薭藘藚藟藠藦藨藭藳藶藼"],
+["8fdaa1","藿蘀蘄蘅è˜è˜Žè˜è˜‘蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙è™è™ ",4,"虩虬虯虵虶虷虺èšèš‘蚖蚘蚚蚜蚡蚦蚧蚨蚭蚱蚳蚴蚵蚷蚸蚹蚿蛀è›è›ƒè›…蛑蛒蛕蛗蛚蛜蛠蛣蛥蛧蚈蛺蛼蛽蜄蜅蜇蜋蜎èœèœèœ“蜔蜙蜞蜟蜡蜣"],
+["8fdba1","蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾è€èƒè…èè˜èè¡è¤è¥è¯è±è²è»èžƒ",6,"螋螌èžèž“螕螗螘螙螞螠螣螧螬螭螮螱螵螾螿èŸèŸˆèŸ‰èŸŠèŸŽèŸ•èŸ–蟙蟚蟜蟟蟢蟣蟤蟪蟫蟭蟱蟳蟸蟺蟿è è ƒè †è ‰è Šè ‹è è ™è ’蠓蠔蠘蠚蠛蠜蠞蠟蠨蠭蠮蠰蠲蠵"],
+["8fdca1","蠺蠼è¡è¡ƒè¡…衈衉衊衋衎衑衕衖衘衚衜衟衠衤衩衱衹衻袀袘袚袛袜袟袠袨袪袺袽袾裀裊",4,"裑裒裓裛裞裧裯裰裱裵裷è¤è¤†è¤è¤Žè¤è¤•è¤–褘褙褚褜褠褦褧褨褰褱褲褵褹褺褾襀襂襅襆襉è¥è¥’襗襚襛襜襡襢襣襫襮襰襳襵襺"],
+["8fdda1","襻襼襽覉è¦è¦è¦”覕覛覜覟覠覥覰覴覵覶覷覼觔",4,"觥觩觫觭觱觳觶觹觽觿訄訅訇è¨è¨‘訒訔訕訞訠訢訤訦訫訬訯訵訷訽訾詀詃詅詇詉è©è©Žè©“詖詗詘詜è©è©¡è©¥è©§è©µè©¶è©·è©¹è©ºè©»è©¾è©¿èª€èªƒèª†èª‹èªèªèª’誖誗誙誟誧誩誮誯誳"],
+["8fdea1","誶誷誻誾諃諆諈諉諊諑諓諔諕諗è«è«Ÿè«¬è«°è«´è«µè«¶è«¼è«¿è¬…謆謋謑謜謞謟謊謭謰謷謼譂",4,"譈譒譓譔譙è­è­žè­£è­­è­¶è­¸è­¹è­¼è­¾è®è®„讅讋è®è®è®”讕讜讞讟谸谹谽谾豅豇豉豋è±è±‘豓豔豗豘豛è±è±™è±£è±¤è±¦è±¨è±©è±­è±³è±µè±¶è±»è±¾è²†"],
+["8fdfa1","貇貋è²è²’貓貙貛貜貤貹貺賅賆賉賋è³è³–賕賙è³è³¡è³¨è³¬è³¯è³°è³²è³µè³·è³¸è³¾è³¿è´è´ƒè´‰è´’贗贛赥赩赬赮赿趂趄趈è¶è¶è¶‘趕趞趟趠趦趫趬趯趲趵趷趹趻跀跅跆跇跈跊跎跑跔跕跗跙跤跥跧跬跰趼跱跲跴跽è¸è¸„踅踆踋踑踔踖踠踡踢"],
+["8fe0a1","踣踦踧踱踳踶踷踸踹踽蹀è¹è¹‹è¹è¹Žè¹è¹”蹛蹜è¹è¹žè¹¡è¹¢è¹©è¹¬è¹­è¹¯è¹°è¹±è¹¹è¹ºè¹»èº‚躃躉èºèº’躕躚躛èºèºžèº¢èº§èº©èº­èº®èº³èºµèººèº»è»€è»è»ƒè»„軇è»è»‘軔軜軨軮軰軱軷軹軺軭輀輂輇輈è¼è¼è¼–輗輘輞輠輡輣輥輧輨輬輭輮輴輵輶輷輺轀è½"],
+["8fe1a1","轃轇è½è½‘",4,"轘è½è½žè½¥è¾è¾ è¾¡è¾¤è¾¥è¾¦è¾µè¾¶è¾¸è¾¾è¿€è¿è¿†è¿Šè¿‹è¿è¿è¿’迓迕迠迣迤迨迮迱迵迶迻迾适逄逈逌逘逛逨逩逯逪逬逭逳逴逷逿éƒé„éŒé›éé¢é¦é§é¬é°é´é¹é‚…邈邋邌邎é‚邕邗邘邙邛邠邡邢邥邰邲邳邴邶邽郌邾郃"],
+["8fe2a1","郄郅郇郈郕郗郘郙郜éƒéƒŸéƒ¥éƒ’郶郫郯郰郴郾郿鄀鄄鄅鄆鄈é„é„鄔鄖鄗鄘鄚鄜鄞鄠鄥鄢鄣鄧鄩鄮鄯鄱鄴鄶鄷鄹鄺鄼鄽酃酇酈é…酓酗酙酚酛酡酤酧酭酴酹酺酻é†é†ƒé†…醆醊醎醑醓醔醕醘醞醡醦醨醬醭醮醰醱醲醳醶醻醼醽醿"],
+["8fe3a1","釂釃釅釓釔釗釙釚釞釤釥釩釪釬",5,"釷釹釻釽鈀éˆéˆ„鈅鈆鈇鈉鈊鈌éˆéˆ’鈓鈖鈘鈜éˆéˆ£éˆ¤éˆ¥éˆ¦éˆ¨éˆ®éˆ¯éˆ°éˆ³éˆµéˆ¶éˆ¸éˆ¹éˆºéˆ¼éˆ¾é‰€é‰‚鉃鉆鉇鉊é‰é‰Žé‰é‰‘鉘鉙鉜é‰é‰ é‰¡é‰¥é‰§é‰¨é‰©é‰®é‰¯é‰°é‰µ",4,"鉻鉼鉽鉿銈銉銊éŠéŠŽéŠ’銗"],
+["8fe4a1","銙銟銠銤銥銧銨銫銯銲銶銸銺銻銼銽銿",4,"鋅鋆鋇鋈鋋鋌é‹é‹Žé‹é‹“鋕鋗鋘鋙鋜é‹é‹Ÿé‹ é‹¡é‹£é‹¥é‹§é‹¨é‹¬é‹®é‹°é‹¹é‹»é‹¿éŒ€éŒ‚錈éŒéŒ‘錔錕錜éŒéŒžéŒŸéŒ¡éŒ¤éŒ¥éŒ§éŒ©éŒªéŒ³éŒ´éŒ¶éŒ·é‡éˆé‰éé‘é’é•é—é˜éšéžé¤é¥é§é©éªé­é¯é°é±é³é´é¶"],
+["8fe5a1","éºé½é¿éŽ€éŽéŽ‚鎈鎊鎋éŽéŽéŽ’鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩éé„é…é†é‡é‰",4,"é“é™éœéžéŸé¢é¦é§é¹é·é¸éºé»é½éé‚é„éˆé‰ééŽéé•é–é—éŸé®é¯é±é²é³é´é»é¿é½é‘ƒé‘…鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫鑭鑮鑯鑱鑲钄钃镸镹"],
+["8fe6a1","镾閄閈閌é–é–Žé–閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋é—闑闒闓闙闚é—闞闟闠闤闦é˜é˜žé˜¢é˜¤é˜¥é˜¦é˜¬é˜±é˜³é˜·é˜¸é˜¹é˜ºé˜¼é˜½é™é™’陔陖陗陘陡陮陴陻陼陾陿éšéš‚隃隄隉隑隖隚éšéšŸéš¤éš¥éš¦éš©éš®éš¯éš³éšºé›Šé›’嶲雘雚é›é›žé›Ÿé›©é›¯é›±é›ºéœ‚"],
+["8fe7a1","霃霅霉霚霛éœéœ¡éœ¢éœ£éœ¨éœ±éœ³ééƒéŠéŽéé•é—é˜éšé›é£é§éªé®é³é¶é·é¸é»é½é¿éž€éž‰éž•éž–鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿éŸéŸ„韅韇韉韊韌éŸéŸŽéŸéŸ‘韔韗韘韙éŸéŸžéŸ éŸ›éŸ¡éŸ¤éŸ¯éŸ±éŸ´éŸ·éŸ¸éŸºé ‡é Šé ™é é Žé ”頖頜頞頠頣頦"],
+["8fe8a1","頫頮頯頰頲頳頵頥頾顄顇顊顑顒顓顖顗顙顚顢顣顥顦顪顬颫颭颮颰颴颷颸颺颻颿飂飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱",4,"餹餺餻餼饀é¥é¥†é¥‡é¥ˆé¥é¥Žé¥”饘饙饛饜饞饟饠馛é¦é¦Ÿé¦¦é¦°é¦±é¦²é¦µ"],
+["8fe9a1","馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌é¨é¨‘騖騞騠騢騣騤騧騭騮騳騵騶騸驇é©é©„驊驋驌驎驑驔驖é©éªªéª¬éª®éª¯éª²éª´éªµéª¶éª¹éª»éª¾éª¿é«é«ƒé«†é«ˆé«Žé«é«’髕髖髗髛髜髠髤髥髧髩髬髲髳髵髹髺髽髿",4],
+["8feaa1","鬄鬅鬈鬉鬋鬌é¬é¬Žé¬é¬’鬖鬙鬛鬜鬠鬦鬫鬭鬳鬴鬵鬷鬹鬺鬽魈魋魌魕魖魗魛魞魡魣魥魦魨魪",4,"魳魵魷魸魹魿鮀鮄鮅鮆鮇鮉鮊鮋é®é®é®é®”鮚é®é®žé®¦é®§é®©é®¬é®°é®±é®²é®·é®¸é®»é®¼é®¾é®¿é¯é¯‡é¯ˆé¯Žé¯é¯—鯘é¯é¯Ÿé¯¥é¯§é¯ªé¯«é¯¯é¯³é¯·é¯¸"],
+["8feba1","鯹鯺鯽鯿鰀鰂鰋é°é°‘鰖鰘鰙鰚鰜鰞鰢鰣鰦",4,"鰱鰵鰶鰷鰽é±é±ƒé±„鱅鱉鱊鱎é±é±é±“鱔鱖鱘鱛é±é±žé±Ÿé±£é±©é±ªé±œé±«é±¨é±®é±°é±²é±µé±·é±»é³¦é³²é³·é³¹é´‹é´‚鴑鴗鴘鴜é´é´žé´¯é´°é´²é´³é´´é´ºé´¼éµ…鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻"],
+["8feca1","鵼鵾鶃鶄鶆鶊é¶é¶Žé¶’鶓鶕鶖鶗鶘鶡鶪鶬鶮鶱鶵鶹鶼鶿鷃鷇鷉鷊鷔鷕鷖鷗鷚鷞鷟鷠鷥鷧鷩鷫鷮鷰鷳鷴鷾鸊鸂鸇鸎é¸é¸‘鸒鸕鸖鸙鸜é¸é¹ºé¹»é¹¼éº€éº‚麃麄麅麇麎éºéº–麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬黭黮黰黱黲黵"],
+["8feda1","黸黿鼂鼃鼉é¼é¼é¼‘鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿é½é½ƒ",4,"齓齕齖齗齘齚é½é½žé½¨é½©é½­",4,"齳齵齺齽é¾é¾é¾‘龒龔龖龗龞龡龢龣龥"]
+]
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json
new file mode 100644
index 0000000..85c6934
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json
@@ -0,0 +1 @@
+{"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/gbk-added.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/gbk-added.json
new file mode 100644
index 0000000..8abfa9f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/gbk-added.json
@@ -0,0 +1,55 @@
+[
+["a140","",62],
+["a180","î”…",32],
+["a240","",62],
+["a280","î•¥",32],
+["a2ab","î¦",5],
+["a2e3","€î­"],
+["a2ef","î®î¯"],
+["a2fd","î°î±"],
+["a340","î–†",62],
+["a380","",31," "],
+["a440","î—¦",62],
+["a480","",32],
+["a4f4","î²",10],
+["a540","",62],
+["a580","îš…",32],
+["a5f7","î½",7],
+["a640","",62],
+["a680","",32],
+["a6b9","îž…",7],
+["a6d9","îž",6],
+["a6ec",""],
+["a6f3","îž–"],
+["a6f6","îž—",8],
+["a740","",62],
+["a780","î…",32],
+["a7c2","îž ",14],
+["a7f2","",12],
+["a896","îž¼",10],
+["a8bc",""],
+["a8bf","ǹ"],
+["a8c1",""],
+["a8ea","îŸ",20],
+["a958",""],
+["a95b",""],
+["a95d",""],
+["a989","〾⿰",11],
+["a997","",12],
+["a9f0","î ",14],
+["aaa1","",93],
+["aba1","îž",93],
+["aca1","",93],
+["ada1","î„š",93],
+["aea1","î…¸",93],
+["afa1","",93],
+["d7fa","î ",4],
+["f8a1","",93],
+["f9a1","",93],
+["faa1","î‹°",93],
+["fba1","îŽ",93],
+["fca1","",93],
+["fda1","îŠ",93],
+["fe50","âºî –⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘ã§ã§Ÿã©³ã§î «î ¬ã­Žã±®ã³ âº§î ±î ²âºªä–䅟⺮䌷⺳⺶⺷䎱䎬⺻ä䓖䙡䙌"],
+["fe80","䜣䜩ä¼äžâ»Šä¥‡ä¥ºä¥½ä¦‚䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93]
+]
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/shiftjis.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/shiftjis.json
new file mode 100644
index 0000000..5a3a43c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/shiftjis.json
@@ -0,0 +1,125 @@
+[
+["0","\u0000",128],
+["a1","。",62],
+["8140"," ã€ã€‚,.・:;?ï¼ã‚›ã‚œÂ´ï½€Â¨ï¼¾ï¿£ï¼¿ãƒ½ãƒ¾ã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ï½žâˆ¥ï½œâ€¦â€¥â€˜â€™â€œâ€ï¼ˆï¼‰ã€”〕[]{ï½ã€ˆ",9,"+ï¼Â±Ã—"],
+["8180","÷ï¼â‰ ï¼œï¼žâ‰¦â‰§âˆžâˆ´â™‚♀°′″℃¥$¢£%#&*@§☆★○â—◎◇◆□■△▲▽▼※〒→â†â†‘↓〓"],
+["81b8","∈∋⊆⊇⊂⊃∪∩"],
+["81c8","∧∨¬⇒⇔∀∃"],
+["81da","∠⊥⌒∂∇≡≒≪≫√∽âˆâˆµâˆ«âˆ¬"],
+["81f0","ʼn♯♭♪†‡¶"],
+["81fc","â—¯"],
+["824f","ï¼",9],
+["8260","A",25],
+["8281","ï½",25],
+["829f","ã",82],
+["8340","ã‚¡",62],
+["8380","ム",22],
+["839f","Α",16,"Σ",6],
+["83bf","α",16,"σ",6],
+["8440","Ð",5,"ÐЖ",25],
+["8470","а",5,"ёж",7],
+["8480","о",17],
+["849f","─│┌â”┘└├┬┤┴┼â”┃â”┓┛┗┣┳┫┻╋┠┯┨┷┿â”┰┥┸╂"],
+["8740","â‘ ",19,"â… ",9],
+["875f","ã‰ãŒ”㌢ã㌘㌧㌃㌶ã‘ã—ãŒãŒ¦ãŒ£ãŒ«ãŠãŒ»ãŽœãŽãŽžãŽŽãŽã„㎡"],
+["877e","ã»"],
+["8780","ã€ã€Ÿâ„–ã℡㊤",4,"㈱㈲㈹ã¾ã½ã¼â‰’≡∫∮∑√⊥∠∟⊿∵∩∪"],
+["889f","亜唖娃阿哀愛挨姶逢葵茜ç©æ‚ªæ¡æ¸¥æ—­è‘¦èŠ¦é¯µæ¢“圧斡扱宛å§è™»é£´çµ¢ç¶¾é®Žæˆ–粟袷安庵按暗案闇éžæ以伊ä½ä¾å‰å›²å¤·å§”å¨å°‰æƒŸæ„慰易椅為ç•ç•°ç§»ç¶­ç·¯èƒƒèŽè¡£è¬‚é•éºåŒ»äº•äº¥åŸŸè‚²éƒç£¯ä¸€å£±æº¢é€¸ç¨²èŒ¨èŠ‹é°¯å…å°å’½å“¡å› å§»å¼•é£²æ·«èƒ¤è”­"],
+["8940","院陰隠韻å‹å³å®‡çƒç¾½è¿‚雨å¯éµœçªºä¸‘碓臼渦嘘唄æ¬è”šé°»å§¥åŽ©æµ¦ç“œé–噂云é‹é›²è餌å¡å–¶å¬°å½±æ˜ æ›³æ „永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦è¬è¶Šé–²æ¦ŽåŽ­å††"],
+["8980","園堰奄宴延怨掩æ´æ²¿æ¼”炎焔煙燕猿ç¸è‰¶è‹‘è–—é é‰›é´›å¡©æ–¼æ±šç”¥å‡¹å¤®å¥¥å¾€å¿œæŠ¼æ—ºæ¨ªæ¬§æ®´çŽ‹ç¿è¥–鴬鴎黄岡沖è»å„„屋憶臆桶牡乙俺å¸æ©æ¸©ç©éŸ³ä¸‹åŒ–仮何伽価佳加å¯å˜‰å¤å«å®¶å¯¡ç§‘暇果架歌河ç«ç‚ç¦ç¦¾ç¨¼ç®‡èŠ±è‹›èŒ„è·è¯è“è¦èª²å˜©è²¨è¿¦éŽéœžèšŠä¿„峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔æ¢æ‡æˆ’æ‹æ”¹"],
+["8a40","é­æ™¦æ¢°æµ·ç°ç•Œçš†çµµèŠ¥èŸ¹é–‹éšŽè²å‡±åŠ¾å¤–咳害崖慨概涯ç¢è“‹è¡—該鎧骸浬馨蛙垣柿蛎鈎劃嚇å„廓拡撹格核殻ç²ç¢ºç©«è¦šè§’赫較郭閣隔é©å­¦å²³æ¥½é¡é¡ŽæŽ›ç¬ æ¨«"],
+["8a80","橿梶é°æ½Ÿå‰²å–æ°æ‹¬æ´»æ¸‡æ»‘è‘›è¤è½„且鰹å¶æ¤›æ¨ºéž„株兜竃蒲釜鎌噛鴨栢茅è±ç²¥åˆˆè‹…瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾æ›æ•¢æŸ‘桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰è‚艦莞観諌貫還鑑間閑関陥韓館舘丸å«å²¸å·ŒçŽ©ç™Œçœ¼å²©ç¿«è´‹é›é ‘顔願ä¼ä¼Žå±å–œå™¨åŸºå¥‡å¬‰å¯„å²å¸Œå¹¾å¿Œæ®æœºæ——既期棋棄"],
+["8b40","機帰毅気汽畿祈季稀紀徽è¦è¨˜è²´èµ·è»Œè¼é£¢é¨Žé¬¼äº€å½å„€å¦“宜戯技擬欺犠疑祇義蟻誼議掬èŠéž å‰åƒå–«æ¡”橘詰砧æµé»å´å®¢è„šè™é€†ä¸˜ä¹…仇休åŠå¸å®®å¼“急救"],
+["8b80","朽求汲泣ç¸çƒç©¶çª®ç¬ˆç´šç³¾çµ¦æ—§ç‰›åŽ»å±…巨拒拠挙渠虚許è·é‹¸æ¼ç¦¦é­šäº¨äº«äº¬ä¾›ä¾ åƒ‘兇競共凶å”匡å¿å«å–¬å¢ƒå³¡å¼·å½Šæ€¯ææ­æŒŸæ•™æ©‹æ³ç‹‚狭矯胸脅興蕎郷é¡éŸ¿é¥—é©šä»°å‡å°­æšæ¥­å±€æ›²æ¥µçŽ‰æ¡ç²åƒ…勤å‡å·¾éŒ¦æ–¤æ¬£æ¬½ç´ç¦ç¦½ç­‹ç·ŠèŠ¹èŒè¡¿è¥Ÿè¬¹è¿‘金åŸéŠ€ä¹å€¶å¥åŒºç‹—玖矩苦躯駆駈駒具愚虞喰空å¶å¯“é‡éš…串櫛釧屑屈"],
+["8c40","掘窟沓é´è½¡çªªç†Šéšˆç²‚æ —ç¹°æ¡‘é¬å‹²å›è–«è¨“群è»éƒ¡å¦è¢ˆç¥ä¿‚傾刑兄啓圭çªåž‹å¥‘形径æµæ…¶æ…§æ†©æŽ²æºæ•¬æ™¯æ¡‚渓畦稽系経継繋罫茎èŠè›è¨ˆè©£è­¦è»½é šé¶èŠ¸è¿Žé¯¨"],
+["8c80","劇戟撃激隙æ¡å‚‘欠決潔穴çµè¡€è¨£æœˆä»¶å€¹å€¦å¥å…¼åˆ¸å‰£å–§åœå …嫌建憲懸拳æ²æ¤œæ¨©ç‰½çŠ¬çŒ®ç ”硯絹県肩見謙賢軒é£éµé™ºé¡•é¨“鹸元原厳幻弦減æºçŽ„ç¾çµƒèˆ·è¨€è«ºé™ä¹Žå€‹å¤å‘¼å›ºå§‘孤己庫弧戸故枯湖ç‹ç³Šè¢´è‚¡èƒ¡è°è™Žèª‡è·¨éˆ·é›‡é¡§é¼“五互ä¼åˆå‘‰å¾å¨¯å¾Œå¾¡æ‚Ÿæ¢§æªŽç‘šç¢èªžèª¤è­·é†ä¹žé¯‰äº¤ä½¼ä¾¯å€™å€–光公功効勾厚å£å‘"],
+["8d40","åŽå–‰å‘垢好孔å­å®å·¥å·§å··å¹¸åºƒåºšåº·å¼˜æ’慌抗拘控攻昂晃更æ­æ ¡æ¢—構江洪浩港æºç”²çš‡ç¡¬ç¨¿ç³ ç´…紘絞綱耕考肯肱腔è†èˆªè’行衡講貢購郊酵鉱砿鋼閤é™"],
+["8d80","項香高鴻剛劫å·åˆå£•æ‹·æ¿ è±ªè½Ÿéº¹å…‹åˆ»å‘Šå›½ç©€é…·éµ é»’ç„漉腰甑忽惚骨狛込此頃今困å¤å¢¾å©šæ¨æ‡‡æ˜æ˜†æ ¹æ¢±æ··ç—•ç´ºè‰®é­‚些ä½å‰å”†åµ¯å·¦å·®æŸ»æ²™ç‘³ç ‚è©éŽ–裟å座挫債催å†æœ€å“‰å¡žå¦»å®°å½©æ‰æŽ¡æ ½æ­³æ¸ˆç½é‡‡çŠ€ç •ç ¦ç¥­æ–Žç´°èœè£è¼‰éš›å‰¤åœ¨æ罪財冴å‚阪堺榊肴咲崎埼碕鷺作削咋æ¾æ˜¨æœ”柵窄策索錯桜鮭笹匙冊刷"],
+["8e40","察拶撮擦札殺薩雑çšé¯–æŒéŒ†é®«çš¿æ™’三傘å‚山惨撒散桟燦çŠç”£ç®—纂蚕讃賛酸é¤æ–¬æš«æ®‹ä»•ä»”伺使刺å¸å²å—£å››å£«å§‹å§‰å§¿å­å±å¸‚師志æ€æŒ‡æ”¯å­œæ–¯æ–½æ—¨æžæ­¢"],
+["8e80","æ­»æ°ç…祉ç§ç³¸ç´™ç´«è‚¢è„‚至視詞詩試誌諮資賜雌飼歯事似ä¾å…字寺慈æŒæ™‚次滋治爾璽痔ç£ç¤ºè€Œè€³è‡ªè’”辞æ±é¹¿å¼è­˜é´«ç«ºè»¸å®é›«ä¸ƒå±åŸ·å¤±å«‰å®¤æ‚‰æ¹¿æ¼†ç–¾è³ªå®Ÿè”€ç¯ å²æŸ´èŠå±¡è•Šç¸žèˆŽå†™å°„æ¨èµ¦æ–œç…®ç¤¾ç´—者è¬è»Šé®è›‡é‚ªå€Ÿå‹ºå°ºæ“ç¼çˆµé…Œé‡ˆéŒ«è‹¥å¯‚弱惹主å–守手朱殊狩ç ç¨®è…«è¶£é…’首儒å—呪寿授樹綬需囚åŽå‘¨"],
+["8f40","宗就州修æ„拾洲秀秋終ç¹ç¿’臭舟è’衆襲è®è¹´è¼¯é€±é…‹é…¬é›†é†œä»€ä½å……å従戎柔æ±æ¸‹ç£ç¸¦é‡éŠƒå”夙宿淑ç¥ç¸®ç²›å¡¾ç†Ÿå‡ºè¡“述俊峻春瞬竣舜駿准循旬楯殉淳"],
+["8f80","準潤盾純巡éµé†‡é †å‡¦åˆæ‰€æš‘曙渚庶緒署書薯藷諸助å™å¥³åºå¾æ•é‹¤é™¤å‚·å„Ÿå‹åŒ å‡å¬å“¨å•†å”±å˜—奨妾娼宵将å°å°‘尚庄床廠彰承抄招掌æ·æ˜‡æ˜Œæ˜­æ™¶æ¾æ¢¢æ¨Ÿæ¨µæ²¼æ¶ˆæ¸‰æ¹˜ç„¼ç„¦ç…§ç—‡çœç¡ç¤ç¥¥ç§°ç« ç¬‘粧紹肖è–蒋蕉è¡è£³è¨Ÿè¨¼è©”詳象賞醤鉦é¾é˜éšœéž˜ä¸Šä¸ˆä¸žä¹—冗剰城場壌嬢常情擾æ¡æ–浄状畳穣蒸譲醸錠嘱埴飾"],
+["9040","æ‹­æ¤æ®–燭織è·è‰²è§¦é£Ÿè•è¾±å°»ä¼¸ä¿¡ä¾µå”‡å¨ å¯å¯©å¿ƒæ…ŽæŒ¯æ–°æ™‹æ£®æ¦›æµ¸æ·±ç”³ç–¹çœŸç¥žç§¦ç´³è‡£èŠ¯è–ªè¦ªè¨ºèº«è¾›é€²é‡éœ‡äººä»åˆƒå¡µå£¬å°‹ç”šå°½è…Žè¨Šè¿…陣é­ç¬¥è«é ˆé…¢å›³åŽ¨"],
+["9080","逗å¹åž‚帥推水炊ç¡ç²‹ç¿ è¡°é‚é…”éŒéŒ˜éšç‘žé«„崇嵩数枢趨雛æ®æ‰æ¤™è…頗雀裾澄摺寸世瀬ç•æ˜¯å‡„制勢姓å¾æ€§æˆæ”¿æ•´æ˜Ÿæ™´æ£²æ –正清牲生盛精è–声製西誠誓請é€é†’é’é™æ–‰ç¨Žè„†éš»å¸­æƒœæˆšæ–¥æ˜”æžçŸ³ç©ç±ç¸¾è„Šè²¬èµ¤è·¡è¹Ÿç¢©åˆ‡æ‹™æŽ¥æ‘‚折設窃節説雪絶舌è‰ä»™å…ˆåƒå å®£å°‚å°–å·æˆ¦æ‰‡æ’°æ “栴泉浅洗染潜煎煽旋穿箭線"],
+["9140","繊羨腺舛船薦詮賎践é¸é·éŠ­éŠ‘閃鮮å‰å–„漸然全禅繕膳糎噌塑岨措曾曽楚狙ç–疎礎祖租粗素組蘇訴阻é¡é¼ åƒ§å‰µåŒå¢å€‰å–ªå£®å¥çˆ½å®‹å±¤åŒæƒ£æƒ³æœæŽƒæŒ¿æŽ»"],
+["9180","æ“早曹巣æ§æ§½æ¼•ç‡¥äº‰ç—©ç›¸çª“糟ç·ç¶œè¡è‰è˜è‘¬è’¼è—»è£…èµ°é€é­éŽ—霜騒åƒå¢—憎臓蔵贈造促å´å‰‡å³æ¯æ‰æŸæ¸¬è¶³é€Ÿä¿—属賊æ—続å’袖其æƒå­˜å­«å°Šææ‘éœä»–多太汰詑唾堕妥惰打æŸèˆµæ¥•é™€é§„騨体堆対è€å²±å¸¯å¾…怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代å°å¤§ç¬¬é†é¡Œé·¹æ»ç€§å“啄宅托択拓沢濯ç¢è¨—é¸æ¿è«¾èŒ¸å‡§è›¸åª"],
+["9240","å©ä½†é”辰奪脱巽竪辿棚谷狸鱈樽誰丹å˜å˜†å¦æ‹…探旦歎淡湛炭短端箪綻耽胆蛋誕é›å›£å£‡å¼¾æ–­æš–檀段男談値知地弛æ¥æ™ºæ± ç—´ç¨šç½®è‡´èœ˜é…馳築畜竹筑蓄"],
+["9280","é€ç§©çª’茶嫡ç€ä¸­ä»²å®™å¿ æŠ½æ˜¼æŸ±æ³¨è™«è¡·è¨»é…Žé‹³é§æ¨—瀦猪苧著貯ä¸å…†å‡‹å–‹å¯µå¸–帳åºå¼”張彫徴懲挑暢æœæ½®ç‰’町眺è´è„¹è…¸è¶èª¿è«œè¶…跳銚長頂鳥勅æ—直朕沈ç賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴é”椿潰åªå£·å¬¬ç´¬çˆªåŠé‡£é¶´äº­ä½Žåœåµå‰ƒè²žå‘ˆå ¤å®šå¸åº•åº­å»·å¼Ÿæ‚ŒæŠµæŒºæ梯汀碇禎程締艇訂諦蹄逓"],
+["9340","邸鄭釘鼎泥摘擢敵滴的笛é©é‘溺哲徹撤è½è¿­é‰„典填天展店添çºç”œè²¼è»¢é¡›ç‚¹ä¼æ®¿æ¾±ç”°é›»å…Žå堵塗妬屠徒斗æœæ¸¡ç™»èŸè³­é€”都é砥砺努度土奴怒倒党冬"],
+["9380","å‡åˆ€å”塔塘套宕島嶋悼投æ­æ±æ¡ƒæ¢¼æ£Ÿç›—淘湯涛ç¯ç‡ˆå½“痘祷等答筒糖統到董蕩藤討謄豆è¸é€ƒé€é™é™¶é ­é¨°é—˜åƒå‹•åŒå ‚導憧撞洞瞳童胴è„é“銅峠鴇匿得徳涜特ç£ç¦¿ç¯¤æ¯’独読栃橡凸çªæ¤´å±Šé³¶è‹«å¯…酉瀞噸屯惇敦沌豚é頓呑曇éˆå¥ˆé‚£å†…ä¹å‡ªè–™è¬Žç˜æºé‹æ¥¢é¦´ç¸„ç•·å—楠軟難æ±äºŒå°¼å¼è¿©åŒ‚賑肉虹廿日乳入"],
+["9440","如尿韮任妊å¿èªæ¿¡ç¦°ç¥¢å¯§è‘±çŒ«ç†±å¹´å¿µæ»æ’šç‡ƒç²˜ä¹ƒå»¼ä¹‹åŸœåš¢æ‚©æ¿ƒç´èƒ½è„³è†¿è¾²è¦—蚤巴把播覇æ·æ³¢æ´¾ç¶ç ´å©†ç½µèŠ­é¦¬ä¿³å»ƒæ‹æŽ’æ•—æ¯ç›ƒç‰ŒèƒŒè‚ºè¼©é…å€åŸ¹åª’梅"],
+["9480","楳煤狽買売賠陪這è¿ç§¤çŸ§è©ä¼¯å‰¥åšæ‹æŸæ³Šç™½ç®”粕舶薄迫æ›æ¼ çˆ†ç¸›èŽ«é§éº¦å‡½ç®±ç¡²ç®¸è‚‡ç­ˆæ«¨å¹¡è‚Œç•‘畠八鉢溌発醗髪ä¼ç½°æŠœç­é–¥é³©å™ºå¡™è›¤éš¼ä¼´åˆ¤åŠåå›å¸†æ¬æ–‘æ¿æ°¾æ±Žç‰ˆçŠ¯ç­ç•”ç¹èˆ¬è—©è²©ç¯„釆煩頒飯挽晩番盤ç£è•ƒè›®åŒªå‘å¦å¦ƒåº‡å½¼æ‚²æ‰‰æ‰¹æŠ«æ–比泌疲皮碑秘緋罷肥被誹費é¿éžé£›æ¨‹ç°¸å‚™å°¾å¾®æž‡æ¯˜çµçœ‰ç¾Ž"],
+["9540","鼻柊稗匹疋髭彦è†è±è‚˜å¼¼å¿…畢筆逼桧姫媛ç´ç™¾è¬¬ä¿µå½ªæ¨™æ°·æ¼‚瓢票表評豹廟æ病秒苗錨鋲蒜蛭鰭å“彬斌浜瀕貧賓頻æ•ç“¶ä¸ä»˜åŸ å¤«å©¦å¯Œå†¨å¸ƒåºœæ€–扶敷"],
+["9580","斧普浮父符è…膚芙譜負賦赴阜附侮撫武舞葡蕪部å°æ¥“風葺蕗ä¼å‰¯å¾©å¹…æœç¦è…¹è¤‡è¦†æ·µå¼—払沸ä»ç‰©é®’分å»å™´å¢³æ†¤æ‰®ç„šå¥®ç²‰ç³žç´›é›°æ–‡èžä¸™ä½µå…µå¡€å¹£å¹³å¼ŠæŸ„並蔽閉陛米é åƒ»å£ç™–碧別瞥蔑箆å変片篇編辺返é便勉娩å¼éž­ä¿èˆ—鋪圃æ•æ­©ç”«è£œè¼”穂募墓慕戊暮æ¯ç°¿è©å€£ä¿¸åŒ…呆報奉å®å³°å³¯å´©åº–抱æ§æ”¾æ–¹æœ‹"],
+["9640","法泡烹砲縫胞芳èŒè“¬èœ‚褒訪豊邦鋒飽鳳鵬ä¹äº¡å‚剖åŠå¦¨å¸½å¿˜å¿™æˆ¿æš´æœ›æŸæ£’冒紡肪膨謀貌貿鉾防å é ¬åŒ—僕åœå¢¨æ’²æœ´ç‰§ç¦ç©†é‡¦å‹ƒæ²¡æ®†å €å¹Œå¥”本翻凡盆"],
+["9680","摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒æ¡äº¦ä¿£åˆæŠ¹æœ«æ²«è¿„侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙ç²æ°‘眠務夢無牟矛霧鵡椋婿娘冥å命明盟迷銘鳴姪ç‰æ»…å…棉綿緬é¢éººæ‘¸æ¨¡èŒ‚妄孟毛猛盲網耗蒙儲木黙目æ¢å‹¿é¤…尤戻籾貰å•æ‚¶ç´‹é–€åŒä¹Ÿå†¶å¤œçˆºè€¶é‡Žå¼¥çŸ¢åŽ„役約薬訳èºé–柳薮鑓愉愈油癒"],
+["9740","諭輸唯佑優勇å‹å®¥å¹½æ‚ æ†‚æ–有柚湧涌猶猷由ç¥è£•èª˜éŠé‚‘郵雄èžå¤•äºˆä½™ä¸Žèª‰è¼¿é å‚­å¹¼å¦–容庸æšæºæ“曜楊様洋溶熔用窯羊耀葉蓉è¦è¬¡è¸Šé¥é™½é¤Šæ…¾æŠ‘欲"],
+["9780","沃浴翌翼淀羅螺裸æ¥èŽ±é ¼é›·æ´›çµ¡è½é…ªä¹±åµåµæ¬„æ¿«è—蘭覧利åå±¥æŽæ¢¨ç†ç’ƒç—¢è£è£¡é‡Œé›¢é™¸å¾‹çŽ‡ç«‹è‘ŽæŽ ç•¥åŠ‰æµæºœç‰ç•™ç¡«ç²’隆竜é¾ä¾¶æ…®æ—…虜了亮僚両凌寮料æ¢æ¶¼çŒŸç™‚瞭稜糧良諒é¼é‡é™µé ˜åŠ›ç·‘倫厘林淋ç‡ç³è‡¨è¼ªéš£é±—麟瑠å¡æ¶™ç´¯é¡žä»¤ä¼¶ä¾‹å†·åŠ±å¶ºæ€œçŽ²ç¤¼è‹“鈴隷零霊麗齢暦歴列劣烈裂廉æ‹æ†æ¼£ç…‰ç°¾ç·´è¯"],
+["9840","蓮連錬呂魯櫓炉賂路露労å©å»Šå¼„朗楼榔浪æ¼ç‰¢ç‹¼ç¯­è€è¾è‹éƒŽå…­éº“禄肋録論倭和話歪賄脇惑枠鷲亙亘é°è©«è—蕨椀湾碗腕"],
+["989f","弌ä¸ä¸•ä¸ªä¸±ä¸¶ä¸¼ä¸¿ä¹‚乖乘亂亅豫亊舒å¼äºŽäºžäºŸäº äº¢äº°äº³äº¶ä»Žä»ä»„仆仂仗仞仭仟价伉佚估佛ä½ä½—佇佶侈ä¾ä¾˜ä½»ä½©ä½°ä¾‘佯來侖儘俔俟俎俘俛俑俚ä¿ä¿¤ä¿¥å€šå€¨å€”倪倥倅伜俶倡倩倬俾俯們倆åƒå‡æœƒå•ååˆåšå–å¬å¸å‚€å‚šå‚…傴傲"],
+["9940","僉僊傳僂僖僞僥僭僣僮價僵儉å„儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉å†å†‘冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭"],
+["9980","凰凵凾刄刋刔刎刧刪刮刳刹å‰å‰„剋剌剞剔剪剴剩剳剿剽åŠåŠ”劒剱劈劑辨辧劬劭劼劵å‹å‹å‹—勞勣勦飭勠勳勵勸勹匆匈甸åŒåŒåŒåŒ•åŒšåŒ£åŒ¯åŒ±åŒ³åŒ¸å€å†å…丗å‰å凖åžå©å®å¤˜å»å·åŽ‚厖厠厦厥厮厰厶åƒç°’é›™åŸæ›¼ç‡®å®å¨å­åºåå½å‘€å¬å­å¼å®å¶å©åå‘Žå’呵咎呟呱呷呰咒呻咀呶咄å’咆哇咢咸咥咬哄哈咨"],
+["9a40","咫哂咤咾咼哘哥哦å”唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳å•å–™å–€å’¯å–Šå–Ÿå•»å•¾å–˜å–žå–®å•¼å–ƒå–©å–‡å–¨å—šå—…嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎å™ç‡Ÿå˜´å˜¶å˜²å˜¸"],
+["9a80","噫噤嘯噬噪嚆嚀嚊嚠嚔åšåš¥åš®åš¶åš´å›‚åš¼å›å›ƒå›€å›ˆå›Žå›‘囓囗囮囹圀囿圄圉圈國åœåœ“團圖嗇圜圦圷圸åŽåœ»å€åå©åŸ€åžˆå¡å¿åž‰åž“垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙å å¡²å ¡å¡¢å¡‹å¡°æ¯€å¡’堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊å¤å¤›æ¢¦å¤¥å¤¬å¤­å¤²å¤¸å¤¾ç«’奕å¥å¥Žå¥šå¥˜å¥¢å¥ å¥§å¥¬å¥©"],
+["9b40","奸å¦å¦ä½žä¾«å¦£å¦²å§†å§¨å§œå¦å§™å§šå¨¥å¨Ÿå¨‘娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲å«å¬ªå¬¶å¬¾å­ƒå­…孀孑孕孚孛孥孩孰孳孵學斈孺宀"],
+["9b80","它宦宸寃寇寉寔å¯å¯¤å¯¦å¯¢å¯žå¯¥å¯«å¯°å¯¶å¯³å°…將專å°å°“尠尢尨尸尹å±å±†å±Žå±“å±å±å­±å±¬å±®ä¹¢å±¶å±¹å²Œå²‘岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢å¶å¶¬å¶®å¶½å¶å¶·å¶¼å·‰å·å·“巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠å»å»‚廈å»å»"],
+["9c40","廖廣å»å»šå»›å»¢å»¡å»¨å»©å»¬å»±å»³å»°å»´å»¸å»¾å¼ƒå¼‰å½å½œå¼‹å¼‘弖弩弭弸å½å½ˆå½Œå½Žå¼¯å½‘彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱å¿æ‚³å¿¿æ€¡æ "],
+["9c80","怙æ€æ€©æ€Žæ€±æ€›æ€•æ€«æ€¦æ€æ€ºæšææªæ·æŸæŠæ†ææ£æƒæ¤æ‚æ¬æ«æ™æ‚æ‚惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘æ…愕愆惶惷愀惴惺愃愡惻惱æ„愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟æ…慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹æ‡æ‡¦æ‡£æ‡¶æ‡ºæ‡´æ‡¿æ‡½æ‡¼æ‡¾æˆ€æˆˆæˆ‰æˆæˆŒæˆ”戛"],
+["9d40","戞戡截戮戰戲戳æ‰æ‰Žæ‰žæ‰£æ‰›æ‰ æ‰¨æ‰¼æŠ‚抉找抒抓抖拔抃抔拗拑抻æ‹æ‹¿æ‹†æ“”拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵æ挾ææœæ掖掎掀掫æ¶æŽ£æŽæŽ‰æŽŸæŽµæ«"],
+["9d80","æ©æŽ¾æ©æ€æ†æ£æ‰æ’æ¶æ„æ–æ´æ†æ“æ¦æ¶æ”æ—æ¨æ摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕æ•æ•˜æ•žæ•æ•²æ•¸æ–‚斃變斛斟斫斷旃旆æ—旄旌旒旛旙无旡旱æ²æ˜Šæ˜ƒæ—»æ³æ˜µæ˜¶æ˜´æ˜œæ™æ™„晉æ™æ™žæ™æ™¤æ™§æ™¨æ™Ÿæ™¢æ™°æšƒæšˆæšŽæš‰æš„暘æšæ›æš¹æ›‰æš¾æš¼"],
+["9e40","曄暸曖曚曠昿曦曩曰曵曷æœæœ–朞朦朧霸朮朿朶æ朸朷æ†æžæ æ™æ£æ¤æž‰æ°æž©æ¼æªæžŒæž‹æž¦æž¡æž…枷柯枴柬枳柩枸柤柞æŸæŸ¢æŸ®æž¹æŸŽæŸ†æŸ§æªœæ žæ¡†æ ©æ¡€æ¡æ ²æ¡Ž"],
+["9e80","梳栫桙档桷桿梟æ¢æ¢­æ¢”æ¢æ¢›æ¢ƒæª®æ¢¹æ¡´æ¢µæ¢ æ¢ºæ¤æ¢æ¡¾æ¤æ£Šæ¤ˆæ£˜æ¤¢æ¤¦æ£¡æ¤Œæ£æ£”棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞æ¥æ¦æ¥ªæ¦²æ¦®æ§æ¦¿æ§æ§“榾槎寨槊æ§æ¦»æ§ƒæ¦§æ¨®æ¦‘榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒æ«æ¨£æ¨“橄樌橲樶橸橇橢橙橦橈樸樢æªæªæª æª„檢檣"],
+["9f40","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉æ­æ­™æ­”歛歟歡歸歹歿殀殄殃æ®æ®˜æ®•æ®žæ®¤æ®ªæ®«æ®¯æ®²æ®±æ®³æ®·æ®¼æ¯†æ¯‹æ¯“毟毬毫毳毯"],
+["9f80","麾氈氓气氛氤氣汞汕汢汪沂æ²æ²šæ²æ²›æ±¾æ±¨æ±³æ²’æ²æ³„泱泓沽泗泅æ³æ²®æ²±æ²¾æ²ºæ³›æ³¯æ³™æ³ªæ´Ÿè¡æ´¶æ´«æ´½æ´¸æ´™æ´µæ´³æ´’洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶æ¹æ¸Ÿæ¹ƒæ¸ºæ¹Žæ¸¤æ»¿æ¸æ¸¸æº‚溪溘滉溷滓溽溯滄溲滔滕æºæº¥æ»‚溟æ½æ¼‘çŒæ»¬æ»¸æ»¾æ¼¿æ»²æ¼±æ»¯æ¼²æ»Œ"],
+["e040","漾漓滷澆潺潸æ¾æ¾€æ½¯æ½›æ¿³æ½­æ¾‚潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑ç€ç€æ¿¾ç€›ç€šæ½´ç€ç€˜ç€Ÿç€°ç€¾ç€²ç‘ç£ç‚™ç‚’炯烱炬炸炳炮烟烋çƒ"],
+["e080","烙焉烽焜焙煥煕熈煦煢煌煖煬ç†ç‡»ç†„熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿çˆçˆçˆ›çˆ¨çˆ­çˆ¬çˆ°çˆ²çˆ»çˆ¼çˆ¿ç‰€ç‰†ç‰‹ç‰˜ç‰´ç‰¾çŠ‚çŠçŠ‡çŠ’犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷å€çŒ—猊猜猖çŒçŒ´çŒ¯çŒ©çŒ¥çŒ¾çŽç默ç—çªç¨ç°ç¸çµç»çºçˆçŽ³çŽçŽ»ç€ç¥ç®çžç’¢ç…瑯ç¥ç¸ç²çºç‘•ç¿ç‘Ÿç‘™ç‘瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊ç“ç“”ç±"],
+["e140","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎ç”甕甓甞甦甬甼畄ç•ç•Šç•‰ç•›ç•†ç•šç•©ç•¤ç•§ç•«ç•­ç•¸ç•¶ç–†ç–‡ç•´ç–Šç–‰ç–‚疔疚ç–疥疣痂疳痃疵疽疸疼疱ç—痊痒痙痣痞痾痿"],
+["e180","ç—¼ç˜ç—°ç—ºç—²ç—³ç˜‹ç˜ç˜‰ç˜Ÿç˜§ç˜ ç˜¡ç˜¢ç˜¤ç˜´ç˜°ç˜»ç™‡ç™ˆç™†ç™œç™˜ç™¡ç™¢ç™¨ç™©ç™ªç™§ç™¬ç™°ç™²ç™¶ç™¸ç™¼çš€çšƒçšˆçš‹çšŽçš–皓皙皚皰皴皸皹皺盂ç›ç›–盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸ç‡çšç¨ç«ç›ç¥ç¿ç¾ç¹çžŽçž‹çž‘瞠瞞瞰瞶瞹瞿瞼瞽瞻矇çŸçŸ—矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"],
+["e240","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊ç¦ç¦§é½‹ç¦ªç¦®ç¦³ç¦¹ç¦ºç§‰ç§•ç§§ç§¬ç§¡ç§£ç¨ˆç¨ç¨˜ç¨™ç¨ ç¨Ÿç¦€ç¨±ç¨»ç¨¾ç¨·ç©ƒç©—穉穡穢穩é¾ç©°ç©¹ç©½çªˆçª—窕窘窖窩竈窰"],
+["e280","窶竅竄窿邃竇竊ç«ç«ç«•ç«“站竚ç«ç«¡ç«¢ç«¦ç«­ç«°ç¬‚ç¬ç¬Šç¬†ç¬³ç¬˜ç¬™ç¬žç¬µç¬¨ç¬¶ç­ç­ºç¬„ç­ç¬‹ç­Œç­…筵筥筴筧筰筱筬筮ç®ç®˜ç®Ÿç®ç®œç®šç®‹ç®’ç®ç­ç®™ç¯‹ç¯ç¯Œç¯ç®´ç¯†ç¯ç¯©ç°‘簔篦篥籠簀簇簓篳篷簗ç°ç¯¶ç°£ç°§ç°ªç°Ÿç°·ç°«ç°½ç±Œç±ƒç±”ç±ç±€ç±ç±˜ç±Ÿç±¤ç±–籥籬籵粃ç²ç²¤ç²­ç²¢ç²«ç²¡ç²¨ç²³ç²²ç²±ç²®ç²¹ç²½ç³€ç³…糂糘糒糜糢鬻糯糲糴糶糺紆"],
+["e340","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮çµçµ£ç¶“綉絛ç¶çµ½ç¶›ç¶ºç¶®ç¶£ç¶µç·‡ç¶½ç¶«ç¸½ç¶¢ç¶¯ç·œç¶¸ç¶Ÿç¶°ç·˜ç·ç·¤ç·žç·»ç·²ç·¡ç¸…縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷"],
+["e380","縲縺繧ç¹ç¹–繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒çºçº“纔纖纎纛纜缸缺罅罌ç½ç½Žç½ç½‘罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞ç¾ç¾šç¾£ç¾¯ç¾²ç¾¹ç¾®ç¾¶ç¾¸è­±ç¿…翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻èŠè†è’è˜èšèŸè¢è¨è³è²è°è¶è¹è½è¿è‚„肆肅肛肓肚肭å†è‚¬èƒ›èƒ¥èƒ™èƒèƒ„胚胖脉胯胱脛脩脣脯腋"],
+["e440","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉è‡è‡‘臙臘臈臚臟臠臧臺臻臾èˆèˆ‚舅與舊èˆèˆèˆ–舩舫舸舳艀艙艘è‰è‰šè‰Ÿè‰¤"],
+["e480","艢艨艪艫舮艱艷艸艾èŠèŠ’芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱è€èŒ¹èè…茯茫茗茘莅莚莪莟莢莖茣莎莇莊è¼èŽµè³èµèŽ èŽ‰èŽ¨è´è“è«èŽè½èƒè˜è‹èè·è‡è è²èè¢è èŽ½è¸è”†è»è‘­èªè¼è•šè’„葷葫蒭葮蒂葩葆è¬è‘¯è‘¹èµè“Šè‘¢è’¹è’¿è’Ÿè“™è“蒻蓚è“è“蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"],
+["e540","è•è˜‚蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾è–藉薺è—è–¹è—è—•è—藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿è™ä¹•è™”號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬"],
+["e580","蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉èœè›¹èœŠèœ´èœ¿èœ·èœ»èœ¥èœ©èœšè èŸè¸èŒèŽè´è—è¨è®è™è“è£èªè …螢螟螂螯蟋螽蟀èŸé›–螫蟄螳蟇蟆螻蟯蟲蟠è è èŸ¾èŸ¶èŸ·è ŽèŸ’蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫è¢è¡¾è¢žè¡µè¡½è¢µè¡²è¢‚袗袒袮袙袢è¢è¢¤è¢°è¢¿è¢±è£ƒè£„裔裘裙è£è£¹è¤‚裼裴裨裲褄褌褊褓襃褞褥褪褫è¥è¥„褻褶褸襌è¤è¥ è¥ž"],
+["e640","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜è§è§§è§´è§¸è¨ƒè¨–è¨è¨Œè¨›è¨è¨¥è¨¶è©è©›è©’詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄è«è«‚諚諫諳諧"],
+["e680","諤諱謔諠諢諷諞諛謌謇謚諡謖è¬è¬—謠謳鞫謦謫謾謨è­è­Œè­è­Žè­‰è­–譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺è±è°¿è±ˆè±Œè±Žè±è±•è±¢è±¬è±¸è±ºè²‚貉貅貊è²è²Žè²”豼貘æˆè²­è²ªè²½è²²è²³è²®è²¶è³ˆè³è³¤è³£è³šè³½è³ºè³»è´„è´…è´Šè´‡è´è´è´é½Žè´“è³è´”贖赧赭赱赳è¶è¶™è·‚趾趺è·è·šè·–跌跛跋跪跫跟跣跼踈踉跿è¸è¸žè¸è¸Ÿè¹‚踵踰踴蹊"],
+["e740","蹇蹉蹌è¹è¹ˆè¹™è¹¤è¹ è¸ªè¹£è¹•è¹¶è¹²è¹¼èºèº‡èº…躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜"],
+["e780","轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡é€é€žé€–逋逧逶逵逹迸ééé‘é’逎é‰é€¾é–é˜éžé¨é¯é¶éš¨é²é‚‚é½é‚邀邊邉é‚邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀é‡é‡‰é‡‹é‡é‡–釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋é‰éŠœéŠ–銓銛鉚é‹éŠ¹éŠ·é‹©éŒé‹ºé„錮"],
+["e840","錙錢錚錣錺錵錻éœé é¼é®é–鎰鎬鎭鎔鎹é–é—é¨é¥é˜éƒéééˆé¤éšé”é“éƒé‡éé¶é«éµé¡éºé‘鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾é’鑿閂閇閊閔閖閘閙"],
+["e880","閠閨閧閭閼閻閹閾闊濶闃é—闌闕闔闖關闡闥闢阡阨阮阯陂陌é™é™‹é™·é™œé™žé™é™Ÿé™¦é™²é™¬éšéš˜éš•éš—險隧隱隲隰隴隶隸隹雎雋雉é›è¥é›œéœé›•é›¹éœ„霆霈霓霎霑éœéœ–霙霤霪霰霹霽霾é„é†éˆé‚é‰éœé é¤é¦é¨å‹’é«é±é¹éž…é¼éžéºéž†éž‹éžéžéžœéž¨éž¦éž£éž³éž´éŸƒéŸ†éŸˆéŸ‹éŸœéŸ­é½éŸ²ç«ŸéŸ¶éŸµé é Œé ¸é ¤é ¡é ·é ½é¡†é¡é¡‹é¡«é¡¯é¡°"],
+["e940","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡é¤é¤žé¤¤é¤ é¤¬é¤®é¤½é¤¾é¥‚饉饅é¥é¥‹é¥‘饒饌饕馗馘馥馭馮馼駟駛é§é§˜é§‘駭駮駱駲駻駸é¨é¨é¨…駢騙騫騷驅驂驀驃"],
+["e980","騾驕é©é©›é©—驟驢驥驤驩驫驪骭骰骼髀é«é«‘髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃é­é­é­Žé­‘魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆é¯é¯‘鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒éµé´¿é´¾éµ†éµˆ"],
+["ea40","éµéµžéµ¤éµ‘éµéµ™éµ²é¶‰é¶‡é¶«éµ¯éµºé¶šé¶¤é¶©é¶²é·„é·é¶»é¶¸é¶ºé·†é·é·‚鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽éºéºˆéº‹éºŒéº’麕麑éºéº¥éº©éº¸éºªéº­é¡é»Œé»Žé»é»é»”黜點é»é» é»¥é»¨é»¯"],
+["ea80","黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇é™ç‘¤å‡œç†™"],
+["ed40","纊褜éˆéŠˆè“œä¿‰ç‚»æ˜±æ£ˆé‹¹æ›»å½…丨仡仼伀伃伹佖侒侊侚侔ä¿å€å€¢ä¿¿å€žå†å°å‚傔僴僘兊兤å†å†¾å‡¬åˆ•åŠœåŠ¦å‹€å‹›åŒ€åŒ‡åŒ¤å²åŽ“厲å﨎咜咊咩哿喆å™å¥åž¬åŸˆåŸ‡ï¨"],
+["ed80","ï¨å¢žå¢²å¤‹å¥“奛å¥å¥£å¦¤å¦ºå­–寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹å·å¼¡å¼´å½§å¾·å¿žæ悅悊惞惕愠惲愑愷愰憘戓抦æµæ‘ æ’擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗æ¦æž»æ¡’柀æ æ¡„æ£ï¨“楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬æ·æ·¸æ·²æ·¼æ¸¹æ¹œæ¸§æ¸¼æº¿æ¾ˆæ¾µæ¿µç€…瀇瀨炅炫ç„焄煜煆煇凞ç‡ç‡¾çŠ±"],
+["ee40","犾猤猪ç·çŽ½ç‰ç–ç£ç’ç‡çµç¦çªç©ç®ç‘¢ç’‰ç’Ÿç”畯皂皜皞皛皦益ç†åŠ¯ç ¡ç¡Žç¡¤ç¡ºç¤°ï¨˜ï¨™ï¨šç¦”福禛竑竧靖竫箞ï¨çµˆçµœç¶·ç¶ ç·–繒罇羡羽èŒè¢è¿è‡è¶è‘ˆè’´è•“è•™"],
+["ee80","蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣è»ï¨¤ï¨¥é§éƒžï¨¦é„•é„§é‡šé‡—釞釭釮釤釥鈆éˆéˆŠéˆºé‰€éˆ¼é‰Žé‰™é‰‘鈹鉧銧鉷鉸鋧鋗鋙é‹ï¨§é‹•é‹ é‹“錥錡鋻﨨錞鋿éŒéŒ‚é°é—鎤é†éžé¸é±é‘…鑈閒隆﨩éšéš¯éœ³éœ»éƒééé‘é•é¡—顥飯飼餧館馞驎髙髜魵魲é®é®±é®»é°€éµ°éµ«ï¨­é¸™é»‘"],
+["eeef","ⅰ",9,"¬¦'""],
+["f040","",62],
+["f080","",124],
+["f140","",62],
+["f180","",124],
+["f240","î…¸",62],
+["f280","",124],
+["f340","",62],
+["f380","",124],
+["f440","î‹°",62],
+["f480","",124],
+["f540","",62],
+["f580","î«",124],
+["f640","",62],
+["f680","î’§",124],
+["f740","",62],
+["f780","î•£",124],
+["f840","î— ",62],
+["f880","",124],
+["f940",""],
+["fa40","â…°",9,"â… ",9,"¬¦'"㈱№℡∵纊褜éˆéŠˆè“œä¿‰ç‚»æ˜±æ£ˆé‹¹æ›»å½…丨仡仼伀伃伹佖侒侊侚侔ä¿å€å€¢ä¿¿å€žå†å°å‚傔僴僘兊"],
+["fa80","å…¤å†å†¾å‡¬åˆ•åŠœåŠ¦å‹€å‹›åŒ€åŒ‡åŒ¤å²åŽ“厲å﨎咜咊咩哿喆å™å¥åž¬åŸˆåŸ‡ï¨ï¨å¢žå¢²å¤‹å¥“奛å¥å¥£å¦¤å¦ºå­–寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹å·å¼¡å¼´å½§å¾·å¿žæ悅悊惞惕愠惲愑愷愰憘戓抦æµæ‘ æ’擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗æ¦æž»æ¡’柀æ æ¡„æ£ï¨“楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯"],
+["fb40","涖涬æ·æ·¸æ·²æ·¼æ¸¹æ¹œæ¸§æ¸¼æº¿æ¾ˆæ¾µæ¿µç€…瀇瀨炅炫ç„焄煜煆煇凞ç‡ç‡¾çŠ±çŠ¾çŒ¤ï¨–ç·çŽ½ç‰ç–ç£ç’ç‡çµç¦çªç©ç®ç‘¢ç’‰ç’Ÿç”畯皂皜皞皛皦益ç†åŠ¯ç ¡ç¡Žç¡¤ç¡ºç¤°ï¨˜ï¨™"],
+["fb80","祥禔福禛竑竧靖竫箞ï¨çµˆçµœç¶·ç¶ ç·–繒罇羡羽èŒè¢è¿è‡è¶è‘ˆè’´è•“蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣è»ï¨¤ï¨¥é§éƒžï¨¦é„•é„§é‡šé‡—釞釭釮釤釥鈆éˆéˆŠéˆºé‰€éˆ¼é‰Žé‰™é‰‘鈹鉧銧鉷鉸鋧鋗鋙é‹ï¨§é‹•é‹ é‹“錥錡鋻﨨錞鋿éŒéŒ‚é°é—鎤é†éžé¸é±é‘…鑈閒隆﨩éšéš¯éœ³éœ»éƒééé‘é•é¡—顥飯飼餧館馞驎髙"],
+["fc40","髜魵魲é®é®±é®»é°€éµ°éµ«ï¨­é¸™é»‘"]
+]
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/utf16.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/utf16.js
new file mode 100644
index 0000000..399f551
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/utf16.js
@@ -0,0 +1,174 @@
+"use strict"
+
+// == UTF16-BE codec. ==========================================================
+
+exports.utf16be = Utf16BECodec;
+function Utf16BECodec() {
+}
+
+Utf16BECodec.prototype.encoder = Utf16BEEncoder;
+Utf16BECodec.prototype.decoder = Utf16BEDecoder;
+Utf16BECodec.prototype.bomAware = true;
+
+
+// -- Encoding
+
+function Utf16BEEncoder() {
+}
+
+Utf16BEEncoder.prototype.write = function(str) {
+ var buf = new Buffer(str, 'ucs2');
+ for (var i = 0; i < buf.length; i += 2) {
+ var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp;
+ }
+ return buf;
+}
+
+Utf16BEEncoder.prototype.end = function() {
+}
+
+
+// -- Decoding
+
+function Utf16BEDecoder() {
+ this.overflowByte = -1;
+}
+
+Utf16BEDecoder.prototype.write = function(buf) {
+ if (buf.length == 0)
+ return '';
+
+ var buf2 = new Buffer(buf.length + 1),
+ i = 0, j = 0;
+
+ if (this.overflowByte !== -1) {
+ buf2[0] = buf[0];
+ buf2[1] = this.overflowByte;
+ i = 1; j = 2;
+ }
+
+ for (; i < buf.length-1; i += 2, j+= 2) {
+ buf2[j] = buf[i+1];
+ buf2[j+1] = buf[i];
+ }
+
+ this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1;
+
+ return buf2.slice(0, j).toString('ucs2');
+}
+
+Utf16BEDecoder.prototype.end = function() {
+}
+
+
+// == UTF-16 codec =============================================================
+// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic.
+// Defaults to UTF-16LE, as it's prevalent and default in Node.
+// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le
+// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'});
+
+// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false).
+
+exports.utf16 = Utf16Codec;
+function Utf16Codec(codecOptions, iconv) {
+ this.iconv = iconv;
+}
+
+Utf16Codec.prototype.encoder = Utf16Encoder;
+Utf16Codec.prototype.decoder = Utf16Decoder;
+
+
+// -- Encoding (pass-through)
+
+function Utf16Encoder(options, codec) {
+ options = options || {};
+ if (options.addBOM === undefined)
+ options.addBOM = true;
+ this.encoder = codec.iconv.getEncoder('utf-16le', options);
+}
+
+Utf16Encoder.prototype.write = function(str) {
+ return this.encoder.write(str);
+}
+
+Utf16Encoder.prototype.end = function() {
+ return this.encoder.end();
+}
+
+
+// -- Decoding
+
+function Utf16Decoder(options, codec) {
+ this.decoder = null;
+ this.initialBytes = [];
+ this.initialBytesLen = 0;
+
+ this.options = options || {};
+ this.iconv = codec.iconv;
+}
+
+Utf16Decoder.prototype.write = function(buf) {
+ if (!this.decoder) {
+ // Codec is not chosen yet. Accumulate initial bytes.
+ this.initialBytes.push(buf);
+ this.initialBytesLen += buf.length;
+
+ if (this.initialBytesLen < 16) // We need more bytes to use space heuristic (see below)
+ return '';
+
+ // We have enough bytes -> detect endianness.
+ var buf = Buffer.concat(this.initialBytes),
+ encoding = detectEncoding(buf, this.options.defaultEncoding);
+ this.decoder = this.iconv.getDecoder(encoding, this.options);
+ this.initialBytes.length = this.initialBytesLen = 0;
+ }
+
+ return this.decoder.write(buf);
+}
+
+Utf16Decoder.prototype.end = function() {
+ if (!this.decoder) {
+ var buf = Buffer.concat(this.initialBytes),
+ encoding = detectEncoding(buf, this.options.defaultEncoding);
+ this.decoder = this.iconv.getDecoder(encoding, this.options);
+
+ var res = this.decoder.write(buf),
+ trail = this.decoder.end();
+
+ return trail ? (res + trail) : res;
+ }
+ return this.decoder.end();
+}
+
+function detectEncoding(buf, defaultEncoding) {
+ var enc = defaultEncoding || 'utf-16le';
+
+ if (buf.length >= 2) {
+ // Check BOM.
+ if (buf[0] == 0xFE && buf[1] == 0xFF) // UTF-16BE BOM
+ enc = 'utf-16be';
+ else if (buf[0] == 0xFF && buf[1] == 0xFE) // UTF-16LE BOM
+ enc = 'utf-16le';
+ else {
+ // No BOM found. Try to deduce encoding from initial content.
+ // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon.
+ // So, we count ASCII as if it was LE or BE, and decide from that.
+ var asciiCharsLE = 0, asciiCharsBE = 0, // Counts of chars in both positions
+ _len = Math.min(buf.length - (buf.length % 2), 64); // Len is always even.
+
+ for (var i = 0; i < _len; i += 2) {
+ if (buf[i] === 0 && buf[i+1] !== 0) asciiCharsBE++;
+ if (buf[i] !== 0 && buf[i+1] === 0) asciiCharsLE++;
+ }
+
+ if (asciiCharsBE > asciiCharsLE)
+ enc = 'utf-16be';
+ else if (asciiCharsBE < asciiCharsLE)
+ enc = 'utf-16le';
+ }
+ }
+
+ return enc;
+}
+
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/utf7.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/utf7.js
new file mode 100644
index 0000000..bab5099
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/encodings/utf7.js
@@ -0,0 +1,289 @@
+"use strict"
+
+// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152
+// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3
+
+exports.utf7 = Utf7Codec;
+exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7
+function Utf7Codec(codecOptions, iconv) {
+ this.iconv = iconv;
+};
+
+Utf7Codec.prototype.encoder = Utf7Encoder;
+Utf7Codec.prototype.decoder = Utf7Decoder;
+Utf7Codec.prototype.bomAware = true;
+
+
+// -- Encoding
+
+var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g;
+
+function Utf7Encoder(options, codec) {
+ this.iconv = codec.iconv;
+}
+
+Utf7Encoder.prototype.write = function(str) {
+ // Naive implementation.
+ // Non-direct chars are encoded as "+<base64>-"; single "+" char is encoded as "+-".
+ return new Buffer(str.replace(nonDirectChars, function(chunk) {
+ return "+" + (chunk === '+' ? '' :
+ this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, ''))
+ + "-";
+ }.bind(this)));
+}
+
+Utf7Encoder.prototype.end = function() {
+}
+
+
+// -- Decoding
+
+function Utf7Decoder(options, codec) {
+ this.iconv = codec.iconv;
+ this.inBase64 = false;
+ this.base64Accum = '';
+}
+
+var base64Regex = /[A-Za-z0-9\/+]/;
+var base64Chars = [];
+for (var i = 0; i < 256; i++)
+ base64Chars[i] = base64Regex.test(String.fromCharCode(i));
+
+var plusChar = '+'.charCodeAt(0),
+ minusChar = '-'.charCodeAt(0),
+ andChar = '&'.charCodeAt(0);
+
+Utf7Decoder.prototype.write = function(buf) {
+ var res = "", lastI = 0,
+ inBase64 = this.inBase64,
+ base64Accum = this.base64Accum;
+
+ // The decoder is more involved as we must handle chunks in stream.
+
+ for (var i = 0; i < buf.length; i++) {
+ if (!inBase64) { // We're in direct mode.
+ // Write direct chars until '+'
+ if (buf[i] == plusChar) {
+ res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars.
+ lastI = i+1;
+ inBase64 = true;
+ }
+ } else { // We decode base64.
+ if (!base64Chars[buf[i]]) { // Base64 ended.
+ if (i == lastI && buf[i] == minusChar) {// "+-" -> "+"
+ res += "+";
+ } else {
+ var b64str = base64Accum + buf.slice(lastI, i).toString();
+ res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be");
+ }
+
+ if (buf[i] != minusChar) // Minus is absorbed after base64.
+ i--;
+
+ lastI = i+1;
+ inBase64 = false;
+ base64Accum = '';
+ }
+ }
+ }
+
+ if (!inBase64) {
+ res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars.
+ } else {
+ var b64str = base64Accum + buf.slice(lastI).toString();
+
+ var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.
+ base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.
+ b64str = b64str.slice(0, canBeDecoded);
+
+ res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be");
+ }
+
+ this.inBase64 = inBase64;
+ this.base64Accum = base64Accum;
+
+ return res;
+}
+
+Utf7Decoder.prototype.end = function() {
+ var res = "";
+ if (this.inBase64 && this.base64Accum.length > 0)
+ res = this.iconv.decode(new Buffer(this.base64Accum, 'base64'), "utf16-be");
+
+ this.inBase64 = false;
+ this.base64Accum = '';
+ return res;
+}
+
+
+// UTF-7-IMAP codec.
+// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3)
+// Differences:
+// * Base64 part is started by "&" instead of "+"
+// * Direct characters are 0x20-0x7E, except "&" (0x26)
+// * In Base64, "," is used instead of "/"
+// * Base64 must not be used to represent direct characters.
+// * No implicit shift back from Base64 (should always end with '-')
+// * String must end in non-shifted position.
+// * "-&" while in base64 is not allowed.
+
+
+exports.utf7imap = Utf7IMAPCodec;
+function Utf7IMAPCodec(codecOptions, iconv) {
+ this.iconv = iconv;
+};
+
+Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder;
+Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder;
+Utf7IMAPCodec.prototype.bomAware = true;
+
+
+// -- Encoding
+
+function Utf7IMAPEncoder(options, codec) {
+ this.iconv = codec.iconv;
+ this.inBase64 = false;
+ this.base64Accum = new Buffer(6);
+ this.base64AccumIdx = 0;
+}
+
+Utf7IMAPEncoder.prototype.write = function(str) {
+ var inBase64 = this.inBase64,
+ base64Accum = this.base64Accum,
+ base64AccumIdx = this.base64AccumIdx,
+ buf = new Buffer(str.length*5 + 10), bufIdx = 0;
+
+ for (var i = 0; i < str.length; i++) {
+ var uChar = str.charCodeAt(i);
+ if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'.
+ if (inBase64) {
+ if (base64AccumIdx > 0) {
+ bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx);
+ base64AccumIdx = 0;
+ }
+
+ buf[bufIdx++] = minusChar; // Write '-', then go to direct mode.
+ inBase64 = false;
+ }
+
+ if (!inBase64) {
+ buf[bufIdx++] = uChar; // Write direct character
+
+ if (uChar === andChar) // Ampersand -> '&-'
+ buf[bufIdx++] = minusChar;
+ }
+
+ } else { // Non-direct character
+ if (!inBase64) {
+ buf[bufIdx++] = andChar; // Write '&', then go to base64 mode.
+ inBase64 = true;
+ }
+ if (inBase64) {
+ base64Accum[base64AccumIdx++] = uChar >> 8;
+ base64Accum[base64AccumIdx++] = uChar & 0xFF;
+
+ if (base64AccumIdx == base64Accum.length) {
+ bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx);
+ base64AccumIdx = 0;
+ }
+ }
+ }
+ }
+
+ this.inBase64 = inBase64;
+ this.base64AccumIdx = base64AccumIdx;
+
+ return buf.slice(0, bufIdx);
+}
+
+Utf7IMAPEncoder.prototype.end = function() {
+ var buf = new Buffer(10), bufIdx = 0;
+ if (this.inBase64) {
+ if (this.base64AccumIdx > 0) {
+ bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx);
+ this.base64AccumIdx = 0;
+ }
+
+ buf[bufIdx++] = minusChar; // Write '-', then go to direct mode.
+ this.inBase64 = false;
+ }
+
+ return buf.slice(0, bufIdx);
+}
+
+
+// -- Decoding
+
+function Utf7IMAPDecoder(options, codec) {
+ this.iconv = codec.iconv;
+ this.inBase64 = false;
+ this.base64Accum = '';
+}
+
+var base64IMAPChars = base64Chars.slice();
+base64IMAPChars[','.charCodeAt(0)] = true;
+
+Utf7IMAPDecoder.prototype.write = function(buf) {
+ var res = "", lastI = 0,
+ inBase64 = this.inBase64,
+ base64Accum = this.base64Accum;
+
+ // The decoder is more involved as we must handle chunks in stream.
+ // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end).
+
+ for (var i = 0; i < buf.length; i++) {
+ if (!inBase64) { // We're in direct mode.
+ // Write direct chars until '&'
+ if (buf[i] == andChar) {
+ res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars.
+ lastI = i+1;
+ inBase64 = true;
+ }
+ } else { // We decode base64.
+ if (!base64IMAPChars[buf[i]]) { // Base64 ended.
+ if (i == lastI && buf[i] == minusChar) { // "&-" -> "&"
+ res += "&";
+ } else {
+ var b64str = base64Accum + buf.slice(lastI, i).toString().replace(/,/g, '/');
+ res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be");
+ }
+
+ if (buf[i] != minusChar) // Minus may be absorbed after base64.
+ i--;
+
+ lastI = i+1;
+ inBase64 = false;
+ base64Accum = '';
+ }
+ }
+ }
+
+ if (!inBase64) {
+ res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars.
+ } else {
+ var b64str = base64Accum + buf.slice(lastI).toString().replace(/,/g, '/');
+
+ var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.
+ base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.
+ b64str = b64str.slice(0, canBeDecoded);
+
+ res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be");
+ }
+
+ this.inBase64 = inBase64;
+ this.base64Accum = base64Accum;
+
+ return res;
+}
+
+Utf7IMAPDecoder.prototype.end = function() {
+ var res = "";
+ if (this.inBase64 && this.base64Accum.length > 0)
+ res = this.iconv.decode(new Buffer(this.base64Accum, 'base64'), "utf16-be");
+
+ this.inBase64 = false;
+ this.base64Accum = '';
+ return res;
+}
+
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/lib/bom-handling.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/lib/bom-handling.js
new file mode 100644
index 0000000..3f0ed93
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/lib/bom-handling.js
@@ -0,0 +1,52 @@
+"use strict"
+
+var BOMChar = '\uFEFF';
+
+exports.PrependBOM = PrependBOMWrapper
+function PrependBOMWrapper(encoder, options) {
+ this.encoder = encoder;
+ this.addBOM = true;
+}
+
+PrependBOMWrapper.prototype.write = function(str) {
+ if (this.addBOM) {
+ str = BOMChar + str;
+ this.addBOM = false;
+ }
+
+ return this.encoder.write(str);
+}
+
+PrependBOMWrapper.prototype.end = function() {
+ return this.encoder.end();
+}
+
+
+//------------------------------------------------------------------------------
+
+exports.StripBOM = StripBOMWrapper;
+function StripBOMWrapper(decoder, options) {
+ this.decoder = decoder;
+ this.pass = false;
+ this.options = options || {};
+}
+
+StripBOMWrapper.prototype.write = function(buf) {
+ var res = this.decoder.write(buf);
+ if (this.pass || !res)
+ return res;
+
+ if (res[0] === BOMChar) {
+ res = res.slice(1);
+ if (typeof this.options.stripBOM === 'function')
+ this.options.stripBOM();
+ }
+
+ this.pass = true;
+ return res;
+}
+
+StripBOMWrapper.prototype.end = function() {
+ return this.decoder.end();
+}
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/lib/extend-node.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/lib/extend-node.js
new file mode 100644
index 0000000..1d8c953
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/lib/extend-node.js
@@ -0,0 +1,214 @@
+"use strict"
+
+// == Extend Node primitives to use iconv-lite =================================
+
+module.exports = function (iconv) {
+ var original = undefined; // Place to keep original methods.
+
+ // Node authors rewrote Buffer internals to make it compatible with
+ // Uint8Array and we cannot patch key functions since then.
+ iconv.supportsNodeEncodingsExtension = !(new Buffer(0) instanceof Uint8Array);
+
+ iconv.extendNodeEncodings = function extendNodeEncodings() {
+ if (original) return;
+ original = {};
+
+ if (!iconv.supportsNodeEncodingsExtension) {
+ console.error("ACTION NEEDED: require('iconv-lite').extendNodeEncodings() is not supported in your version of Node");
+ console.error("See more info at https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility");
+ return;
+ }
+
+ var nodeNativeEncodings = {
+ 'hex': true, 'utf8': true, 'utf-8': true, 'ascii': true, 'binary': true,
+ 'base64': true, 'ucs2': true, 'ucs-2': true, 'utf16le': true, 'utf-16le': true,
+ };
+
+ Buffer.isNativeEncoding = function(enc) {
+ return enc && nodeNativeEncodings[enc.toLowerCase()];
+ }
+
+ // -- SlowBuffer -----------------------------------------------------------
+ var SlowBuffer = require('buffer').SlowBuffer;
+
+ original.SlowBufferToString = SlowBuffer.prototype.toString;
+ SlowBuffer.prototype.toString = function(encoding, start, end) {
+ encoding = String(encoding || 'utf8').toLowerCase();
+
+ // Use native conversion when possible
+ if (Buffer.isNativeEncoding(encoding))
+ return original.SlowBufferToString.call(this, encoding, start, end);
+
+ // Otherwise, use our decoding method.
+ if (typeof start == 'undefined') start = 0;
+ if (typeof end == 'undefined') end = this.length;
+ return iconv.decode(this.slice(start, end), encoding);
+ }
+
+ original.SlowBufferWrite = SlowBuffer.prototype.write;
+ SlowBuffer.prototype.write = function(string, offset, length, encoding) {
+ // Support both (string, offset, length, encoding)
+ // and the legacy (string, encoding, offset, length)
+ if (isFinite(offset)) {
+ if (!isFinite(length)) {
+ encoding = length;
+ length = undefined;
+ }
+ } else { // legacy
+ var swap = encoding;
+ encoding = offset;
+ offset = length;
+ length = swap;
+ }
+
+ offset = +offset || 0;
+ var remaining = this.length - offset;
+ if (!length) {
+ length = remaining;
+ } else {
+ length = +length;
+ if (length > remaining) {
+ length = remaining;
+ }
+ }
+ encoding = String(encoding || 'utf8').toLowerCase();
+
+ // Use native conversion when possible
+ if (Buffer.isNativeEncoding(encoding))
+ return original.SlowBufferWrite.call(this, string, offset, length, encoding);
+
+ if (string.length > 0 && (length < 0 || offset < 0))
+ throw new RangeError('attempt to write beyond buffer bounds');
+
+ // Otherwise, use our encoding method.
+ var buf = iconv.encode(string, encoding);
+ if (buf.length < length) length = buf.length;
+ buf.copy(this, offset, 0, length);
+ return length;
+ }
+
+ // -- Buffer ---------------------------------------------------------------
+
+ original.BufferIsEncoding = Buffer.isEncoding;
+ Buffer.isEncoding = function(encoding) {
+ return Buffer.isNativeEncoding(encoding) || iconv.encodingExists(encoding);
+ }
+
+ original.BufferByteLength = Buffer.byteLength;
+ Buffer.byteLength = SlowBuffer.byteLength = function(str, encoding) {
+ encoding = String(encoding || 'utf8').toLowerCase();
+
+ // Use native conversion when possible
+ if (Buffer.isNativeEncoding(encoding))
+ return original.BufferByteLength.call(this, str, encoding);
+
+ // Slow, I know, but we don't have a better way yet.
+ return iconv.encode(str, encoding).length;
+ }
+
+ original.BufferToString = Buffer.prototype.toString;
+ Buffer.prototype.toString = function(encoding, start, end) {
+ encoding = String(encoding || 'utf8').toLowerCase();
+
+ // Use native conversion when possible
+ if (Buffer.isNativeEncoding(encoding))
+ return original.BufferToString.call(this, encoding, start, end);
+
+ // Otherwise, use our decoding method.
+ if (typeof start == 'undefined') start = 0;
+ if (typeof end == 'undefined') end = this.length;
+ return iconv.decode(this.slice(start, end), encoding);
+ }
+
+ original.BufferWrite = Buffer.prototype.write;
+ Buffer.prototype.write = function(string, offset, length, encoding) {
+ var _offset = offset, _length = length, _encoding = encoding;
+ // Support both (string, offset, length, encoding)
+ // and the legacy (string, encoding, offset, length)
+ if (isFinite(offset)) {
+ if (!isFinite(length)) {
+ encoding = length;
+ length = undefined;
+ }
+ } else { // legacy
+ var swap = encoding;
+ encoding = offset;
+ offset = length;
+ length = swap;
+ }
+
+ encoding = String(encoding || 'utf8').toLowerCase();
+
+ // Use native conversion when possible
+ if (Buffer.isNativeEncoding(encoding))
+ return original.BufferWrite.call(this, string, _offset, _length, _encoding);
+
+ offset = +offset || 0;
+ var remaining = this.length - offset;
+ if (!length) {
+ length = remaining;
+ } else {
+ length = +length;
+ if (length > remaining) {
+ length = remaining;
+ }
+ }
+
+ if (string.length > 0 && (length < 0 || offset < 0))
+ throw new RangeError('attempt to write beyond buffer bounds');
+
+ // Otherwise, use our encoding method.
+ var buf = iconv.encode(string, encoding);
+ if (buf.length < length) length = buf.length;
+ buf.copy(this, offset, 0, length);
+ return length;
+
+ // TODO: Set _charsWritten.
+ }
+
+
+ // -- Readable -------------------------------------------------------------
+ if (iconv.supportsStreams) {
+ var Readable = require('stream').Readable;
+
+ original.ReadableSetEncoding = Readable.prototype.setEncoding;
+ Readable.prototype.setEncoding = function setEncoding(enc, options) {
+ // Use our own decoder, it has the same interface.
+ // We cannot use original function as it doesn't handle BOM-s.
+ this._readableState.decoder = iconv.getDecoder(enc, options);
+ this._readableState.encoding = enc;
+ }
+
+ Readable.prototype.collect = iconv._collect;
+ }
+ }
+
+ // Remove iconv-lite Node primitive extensions.
+ iconv.undoExtendNodeEncodings = function undoExtendNodeEncodings() {
+ if (!iconv.supportsNodeEncodingsExtension)
+ return;
+ if (!original)
+ throw new Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.")
+
+ delete Buffer.isNativeEncoding;
+
+ var SlowBuffer = require('buffer').SlowBuffer;
+
+ SlowBuffer.prototype.toString = original.SlowBufferToString;
+ SlowBuffer.prototype.write = original.SlowBufferWrite;
+
+ Buffer.isEncoding = original.BufferIsEncoding;
+ Buffer.byteLength = original.BufferByteLength;
+ Buffer.prototype.toString = original.BufferToString;
+ Buffer.prototype.write = original.BufferWrite;
+
+ if (iconv.supportsStreams) {
+ var Readable = require('stream').Readable;
+
+ Readable.prototype.setEncoding = original.ReadableSetEncoding;
+ delete Readable.prototype.collect;
+ }
+
+ original = undefined;
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/lib/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/lib/index.js
new file mode 100644
index 0000000..ac1403c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/lib/index.js
@@ -0,0 +1,141 @@
+"use strict"
+
+var bomHandling = require('./bom-handling'),
+ iconv = module.exports;
+
+// All codecs and aliases are kept here, keyed by encoding name/alias.
+// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`.
+iconv.encodings = null;
+
+// Characters emitted in case of error.
+iconv.defaultCharUnicode = '�';
+iconv.defaultCharSingleByte = '?';
+
+// Public API.
+iconv.encode = function encode(str, encoding, options) {
+ str = "" + (str || ""); // Ensure string.
+
+ var encoder = iconv.getEncoder(encoding, options);
+
+ var res = encoder.write(str);
+ var trail = encoder.end();
+
+ return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res;
+}
+
+iconv.decode = function decode(buf, encoding, options) {
+ if (typeof buf === 'string') {
+ if (!iconv.skipDecodeWarning) {
+ console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding');
+ iconv.skipDecodeWarning = true;
+ }
+
+ buf = new Buffer("" + (buf || ""), "binary"); // Ensure buffer.
+ }
+
+ var decoder = iconv.getDecoder(encoding, options);
+
+ var res = decoder.write(buf);
+ var trail = decoder.end();
+
+ return trail ? (res + trail) : res;
+}
+
+iconv.encodingExists = function encodingExists(enc) {
+ try {
+ iconv.getCodec(enc);
+ return true;
+ } catch (e) {
+ return false;
+ }
+}
+
+// Legacy aliases to convert functions
+iconv.toEncoding = iconv.encode;
+iconv.fromEncoding = iconv.decode;
+
+// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache.
+iconv._codecDataCache = {};
+iconv.getCodec = function getCodec(encoding) {
+ if (!iconv.encodings)
+ iconv.encodings = require("../encodings"); // Lazy load all encoding definitions.
+
+ // Canonicalize encoding name: strip all non-alphanumeric chars and appended year.
+ var enc = (''+encoding).toLowerCase().replace(/[^0-9a-z]|:\d{4}$/g, "");
+
+ // Traverse iconv.encodings to find actual codec.
+ var codecOptions = {};
+ while (true) {
+ var codec = iconv._codecDataCache[enc];
+ if (codec)
+ return codec;
+
+ var codecDef = iconv.encodings[enc];
+
+ switch (typeof codecDef) {
+ case "string": // Direct alias to other encoding.
+ enc = codecDef;
+ break;
+
+ case "object": // Alias with options. Can be layered.
+ for (var key in codecDef)
+ codecOptions[key] = codecDef[key];
+
+ if (!codecOptions.encodingName)
+ codecOptions.encodingName = enc;
+
+ enc = codecDef.type;
+ break;
+
+ case "function": // Codec itself.
+ if (!codecOptions.encodingName)
+ codecOptions.encodingName = enc;
+
+ // The codec function must load all tables and return object with .encoder and .decoder methods.
+ // It'll be called only once (for each different options object).
+ codec = new codecDef(codecOptions, iconv);
+
+ iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later.
+ return codec;
+
+ default:
+ throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')");
+ }
+ }
+}
+
+iconv.getEncoder = function getEncoder(encoding, options) {
+ var codec = iconv.getCodec(encoding),
+ encoder = new codec.encoder(options, codec);
+
+ if (codec.bomAware && options && options.addBOM)
+ encoder = new bomHandling.PrependBOM(encoder, options);
+
+ return encoder;
+}
+
+iconv.getDecoder = function getDecoder(encoding, options) {
+ var codec = iconv.getCodec(encoding),
+ decoder = new codec.decoder(options, codec);
+
+ if (codec.bomAware && !(options && options.stripBOM === false))
+ decoder = new bomHandling.StripBOM(decoder, options);
+
+ return decoder;
+}
+
+
+// Load extensions in Node. All of them are omitted in Browserify build via 'browser' field in package.json.
+var nodeVer = typeof process !== 'undefined' && process.versions && process.versions.node;
+if (nodeVer) {
+
+ // Load streaming support in Node v0.10+
+ var nodeVerArr = nodeVer.split(".").map(Number);
+ if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) {
+ require("./streams")(iconv);
+ }
+
+ // Load Node primitive extensions.
+ require("./extend-node")(iconv);
+}
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/lib/streams.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/lib/streams.js
new file mode 100644
index 0000000..c95b26c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/lib/streams.js
@@ -0,0 +1,120 @@
+"use strict"
+
+var Transform = require("stream").Transform;
+
+
+// == Exports ==================================================================
+module.exports = function(iconv) {
+
+ // Additional Public API.
+ iconv.encodeStream = function encodeStream(encoding, options) {
+ return new IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options);
+ }
+
+ iconv.decodeStream = function decodeStream(encoding, options) {
+ return new IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options);
+ }
+
+ iconv.supportsStreams = true;
+
+
+ // Not published yet.
+ iconv.IconvLiteEncoderStream = IconvLiteEncoderStream;
+ iconv.IconvLiteDecoderStream = IconvLiteDecoderStream;
+ iconv._collect = IconvLiteDecoderStream.prototype.collect;
+};
+
+
+// == Encoder stream =======================================================
+function IconvLiteEncoderStream(conv, options) {
+ this.conv = conv;
+ options = options || {};
+ options.decodeStrings = false; // We accept only strings, so we don't need to decode them.
+ Transform.call(this, options);
+}
+
+IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, {
+ constructor: { value: IconvLiteEncoderStream }
+});
+
+IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) {
+ if (typeof chunk != 'string')
+ return done(new Error("Iconv encoding stream needs strings as its input."));
+ try {
+ var res = this.conv.write(chunk);
+ if (res && res.length) this.push(res);
+ done();
+ }
+ catch (e) {
+ done(e);
+ }
+}
+
+IconvLiteEncoderStream.prototype._flush = function(done) {
+ try {
+ var res = this.conv.end();
+ if (res && res.length) this.push(res);
+ done();
+ }
+ catch (e) {
+ done(e);
+ }
+}
+
+IconvLiteEncoderStream.prototype.collect = function(cb) {
+ var chunks = [];
+ this.on('error', cb);
+ this.on('data', function(chunk) { chunks.push(chunk); });
+ this.on('end', function() {
+ cb(null, Buffer.concat(chunks));
+ });
+ return this;
+}
+
+
+// == Decoder stream =======================================================
+function IconvLiteDecoderStream(conv, options) {
+ this.conv = conv;
+ options = options || {};
+ options.encoding = this.encoding = 'utf8'; // We output strings.
+ Transform.call(this, options);
+}
+
+IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, {
+ constructor: { value: IconvLiteDecoderStream }
+});
+
+IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) {
+ if (!Buffer.isBuffer(chunk))
+ return done(new Error("Iconv decoding stream needs buffers as its input."));
+ try {
+ var res = this.conv.write(chunk);
+ if (res && res.length) this.push(res, this.encoding);
+ done();
+ }
+ catch (e) {
+ done(e);
+ }
+}
+
+IconvLiteDecoderStream.prototype._flush = function(done) {
+ try {
+ var res = this.conv.end();
+ if (res && res.length) this.push(res, this.encoding);
+ done();
+ }
+ catch (e) {
+ done(e);
+ }
+}
+
+IconvLiteDecoderStream.prototype.collect = function(cb) {
+ var res = '';
+ this.on('error', cb);
+ this.on('data', function(chunk) { res += chunk; });
+ this.on('end', function() {
+ cb(null, res);
+ });
+ return this;
+}
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/package.json
new file mode 100644
index 0000000..6e72175
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/iconv-lite/package.json
@@ -0,0 +1,118 @@
+{
+ "name": "iconv-lite",
+ "description": "Convert character encodings in pure javascript.",
+ "version": "0.4.13",
+ "license": "MIT",
+ "keywords": [
+ "iconv",
+ "convert",
+ "charset",
+ "icu"
+ ],
+ "author": {
+ "name": "Alexander Shtuchkin",
+ "email": "ashtuchkin@gmail.com"
+ },
+ "contributors": [
+ {
+ "name": "Jinwu Zhan",
+ "url": "https://github.com/jenkinv"
+ },
+ {
+ "name": "Adamansky Anton",
+ "url": "https://github.com/adamansky"
+ },
+ {
+ "name": "George Stagas",
+ "url": "https://github.com/stagas"
+ },
+ {
+ "name": "Mike D Pilsbury",
+ "url": "https://github.com/pekim"
+ },
+ {
+ "name": "Niggler",
+ "url": "https://github.com/Niggler"
+ },
+ {
+ "name": "wychi",
+ "url": "https://github.com/wychi"
+ },
+ {
+ "name": "David Kuo",
+ "url": "https://github.com/david50407"
+ },
+ {
+ "name": "ChangZhuo Chen",
+ "url": "https://github.com/czchen"
+ },
+ {
+ "name": "Lee Treveil",
+ "url": "https://github.com/leetreveil"
+ },
+ {
+ "name": "Brian White",
+ "url": "https://github.com/mscdex"
+ },
+ {
+ "name": "Mithgol",
+ "url": "https://github.com/Mithgol"
+ },
+ {
+ "name": "Nazar Leush",
+ "url": "https://github.com/nleush"
+ }
+ ],
+ "main": "./lib/index.js",
+ "homepage": "https://github.com/ashtuchkin/iconv-lite",
+ "bugs": {
+ "url": "https://github.com/ashtuchkin/iconv-lite/issues"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/ashtuchkin/iconv-lite.git"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ },
+ "scripts": {
+ "coverage": "istanbul cover _mocha -- --grep .",
+ "coverage-open": "open coverage/lcov-report/index.html",
+ "test": "mocha --reporter spec --grep ."
+ },
+ "browser": {
+ "./extend-node": false,
+ "./streams": false
+ },
+ "devDependencies": {
+ "mocha": "*",
+ "request": "2.47",
+ "unorm": "*",
+ "errto": "*",
+ "async": "*",
+ "istanbul": "*",
+ "iconv": "2.1"
+ },
+ "gitHead": "f5ec51b1e7dd1477a3570824960641eebdc5fbc6",
+ "_id": "iconv-lite@0.4.13",
+ "_shasum": "1f88aba4ab0b1508e8312acc39345f36e992e2f2",
+ "_from": "iconv-lite@0.4.13",
+ "_npmVersion": "2.14.4",
+ "_nodeVersion": "4.1.1",
+ "_npmUser": {
+ "name": "ashtuchkin",
+ "email": "ashtuchkin@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "ashtuchkin",
+ "email": "ashtuchkin@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "1f88aba4ab0b1508e8312acc39345f36e992e2f2",
+ "tarball": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/HISTORY.md
new file mode 100644
index 0000000..98ff0e9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/HISTORY.md
@@ -0,0 +1,88 @@
+2.3.0 / 2015-05-26
+==================
+
+ * Add defined behavior for HTTP `CONNECT` requests
+ * Add defined behavior for HTTP `Upgrade` requests
+ * deps: ee-first@1.1.1
+
+2.2.1 / 2015-04-22
+==================
+
+ * Fix `isFinished(req)` when data buffered
+
+2.2.0 / 2014-12-22
+==================
+
+ * Add message object to callback arguments
+
+2.1.1 / 2014-10-22
+==================
+
+ * Fix handling of pipelined requests
+
+2.1.0 / 2014-08-16
+==================
+
+ * Check if `socket` is detached
+ * Return `undefined` for `isFinished` if state unknown
+
+2.0.0 / 2014-08-16
+==================
+
+ * Add `isFinished` function
+ * Move to `jshttp` organization
+ * Remove support for plain socket argument
+ * Rename to `on-finished`
+ * Support both `req` and `res` as arguments
+ * deps: ee-first@1.0.5
+
+1.2.2 / 2014-06-10
+==================
+
+ * Reduce listeners added to emitters
+ - avoids "event emitter leak" warnings when used multiple times on same request
+
+1.2.1 / 2014-06-08
+==================
+
+ * Fix returned value when already finished
+
+1.2.0 / 2014-06-05
+==================
+
+ * Call callback when called on already-finished socket
+
+1.1.4 / 2014-05-27
+==================
+
+ * Support node.js 0.8
+
+1.1.3 / 2014-04-30
+==================
+
+ * Make sure errors passed as instanceof `Error`
+
+1.1.2 / 2014-04-18
+==================
+
+ * Default the `socket` to passed-in object
+
+1.1.1 / 2014-01-16
+==================
+
+ * Rename module to `finished`
+
+1.1.0 / 2013-12-25
+==================
+
+ * Call callback when called on already-errored socket
+
+1.0.1 / 2013-12-20
+==================
+
+ * Actually pass the error to the callback
+
+1.0.0 / 2013-12-20
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/LICENSE
new file mode 100644
index 0000000..5931fd2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2013 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2014 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/README.md
new file mode 100644
index 0000000..a0e1157
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/README.md
@@ -0,0 +1,154 @@
+# on-finished
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Execute a callback when a HTTP request closes, finishes, or errors.
+
+## Install
+
+```sh
+$ npm install on-finished
+```
+
+## API
+
+```js
+var onFinished = require('on-finished')
+```
+
+### onFinished(res, listener)
+
+Attach a listener to listen for the response to finish. The listener will
+be invoked only once when the response finished. If the response finished
+to an error, the first argument will contain the error. If the response
+has already finished, the listener will be invoked.
+
+Listening to the end of a response would be used to close things associated
+with the response, like open files.
+
+Listener is invoked as `listener(err, res)`.
+
+```js
+onFinished(res, function (err, res) {
+ // clean up open fds, etc.
+ // err contains the error is request error'd
+})
+```
+
+### onFinished(req, listener)
+
+Attach a listener to listen for the request to finish. The listener will
+be invoked only once when the request finished. If the request finished
+to an error, the first argument will contain the error. If the request
+has already finished, the listener will be invoked.
+
+Listening to the end of a request would be used to know when to continue
+after reading the data.
+
+Listener is invoked as `listener(err, req)`.
+
+```js
+var data = ''
+
+req.setEncoding('utf8')
+res.on('data', function (str) {
+ data += str
+})
+
+onFinished(req, function (err, req) {
+ // data is read unless there is err
+})
+```
+
+### onFinished.isFinished(res)
+
+Determine if `res` is already finished. This would be useful to check and
+not even start certain operations if the response has already finished.
+
+### onFinished.isFinished(req)
+
+Determine if `req` is already finished. This would be useful to check and
+not even start certain operations if the request has already finished.
+
+## Special Node.js requests
+
+### HTTP CONNECT method
+
+The meaning of the `CONNECT` method from RFC 7231, section 4.3.6:
+
+> The CONNECT method requests that the recipient establish a tunnel to
+> the destination origin server identified by the request-target and,
+> if successful, thereafter restrict its behavior to blind forwarding
+> of packets, in both directions, until the tunnel is closed. Tunnels
+> are commonly used to create an end-to-end virtual connection, through
+> one or more proxies, which can then be secured using TLS (Transport
+> Layer Security, [RFC5246]).
+
+In Node.js, these request objects come from the `'connect'` event on
+the HTTP server.
+
+When this module is used on a HTTP `CONNECT` request, the request is
+considered "finished" immediately, **due to limitations in the Node.js
+interface**. This means if the `CONNECT` request contains a request entity,
+the request will be considered "finished" even before it has been read.
+
+There is no such thing as a response object to a `CONNECT` request in
+Node.js, so there is no support for for one.
+
+### HTTP Upgrade request
+
+The meaning of the `Upgrade` header from RFC 7230, section 6.1:
+
+> The "Upgrade" header field is intended to provide a simple mechanism
+> for transitioning from HTTP/1.1 to some other protocol on the same
+> connection.
+
+In Node.js, these request objects come from the `'upgrade'` event on
+the HTTP server.
+
+When this module is used on a HTTP request with an `Upgrade` header, the
+request is considered "finished" immediately, **due to limitations in the
+Node.js interface**. This means if the `Upgrade` request contains a request
+entity, the request will be considered "finished" even before it has been
+read.
+
+There is no such thing as a response object to a `Upgrade` request in
+Node.js, so there is no support for for one.
+
+## Example
+
+The following code ensures that file descriptors are always closed
+once the response finishes.
+
+```js
+var destroy = require('destroy')
+var http = require('http')
+var onFinished = require('on-finished')
+
+http.createServer(function onRequest(req, res) {
+ var stream = fs.createReadStream('package.json')
+ stream.pipe(res)
+ onFinished(res, function (err) {
+ destroy(stream)
+ })
+})
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/on-finished.svg
+[npm-url]: https://npmjs.org/package/on-finished
+[node-version-image]: https://img.shields.io/node/v/on-finished.svg
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/on-finished/master.svg
+[travis-url]: https://travis-ci.org/jshttp/on-finished
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/on-finished/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/on-finished?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/on-finished.svg
+[downloads-url]: https://npmjs.org/package/on-finished
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/index.js
new file mode 100644
index 0000000..9abd98f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/index.js
@@ -0,0 +1,196 @@
+/*!
+ * on-finished
+ * Copyright(c) 2013 Jonathan Ong
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = onFinished
+module.exports.isFinished = isFinished
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var first = require('ee-first')
+
+/**
+ * Variables.
+ * @private
+ */
+
+/* istanbul ignore next */
+var defer = typeof setImmediate === 'function'
+ ? setImmediate
+ : function(fn){ process.nextTick(fn.bind.apply(fn, arguments)) }
+
+/**
+ * Invoke callback when the response has finished, useful for
+ * cleaning up resources afterwards.
+ *
+ * @param {object} msg
+ * @param {function} listener
+ * @return {object}
+ * @public
+ */
+
+function onFinished(msg, listener) {
+ if (isFinished(msg) !== false) {
+ defer(listener, null, msg)
+ return msg
+ }
+
+ // attach the listener to the message
+ attachListener(msg, listener)
+
+ return msg
+}
+
+/**
+ * Determine if message is already finished.
+ *
+ * @param {object} msg
+ * @return {boolean}
+ * @public
+ */
+
+function isFinished(msg) {
+ var socket = msg.socket
+
+ if (typeof msg.finished === 'boolean') {
+ // OutgoingMessage
+ return Boolean(msg.finished || (socket && !socket.writable))
+ }
+
+ if (typeof msg.complete === 'boolean') {
+ // IncomingMessage
+ return Boolean(msg.upgrade || !socket || !socket.readable || (msg.complete && !msg.readable))
+ }
+
+ // don't know
+ return undefined
+}
+
+/**
+ * Attach a finished listener to the message.
+ *
+ * @param {object} msg
+ * @param {function} callback
+ * @private
+ */
+
+function attachFinishedListener(msg, callback) {
+ var eeMsg
+ var eeSocket
+ var finished = false
+
+ function onFinish(error) {
+ eeMsg.cancel()
+ eeSocket.cancel()
+
+ finished = true
+ callback(error)
+ }
+
+ // finished on first message event
+ eeMsg = eeSocket = first([[msg, 'end', 'finish']], onFinish)
+
+ function onSocket(socket) {
+ // remove listener
+ msg.removeListener('socket', onSocket)
+
+ if (finished) return
+ if (eeMsg !== eeSocket) return
+
+ // finished on first socket event
+ eeSocket = first([[socket, 'error', 'close']], onFinish)
+ }
+
+ if (msg.socket) {
+ // socket already assigned
+ onSocket(msg.socket)
+ return
+ }
+
+ // wait for socket to be assigned
+ msg.on('socket', onSocket)
+
+ if (msg.socket === undefined) {
+ // node.js 0.8 patch
+ patchAssignSocket(msg, onSocket)
+ }
+}
+
+/**
+ * Attach the listener to the message.
+ *
+ * @param {object} msg
+ * @return {function}
+ * @private
+ */
+
+function attachListener(msg, listener) {
+ var attached = msg.__onFinished
+
+ // create a private single listener with queue
+ if (!attached || !attached.queue) {
+ attached = msg.__onFinished = createListener(msg)
+ attachFinishedListener(msg, attached)
+ }
+
+ attached.queue.push(listener)
+}
+
+/**
+ * Create listener on message.
+ *
+ * @param {object} msg
+ * @return {function}
+ * @private
+ */
+
+function createListener(msg) {
+ function listener(err) {
+ if (msg.__onFinished === listener) msg.__onFinished = null
+ if (!listener.queue) return
+
+ var queue = listener.queue
+ listener.queue = null
+
+ for (var i = 0; i < queue.length; i++) {
+ queue[i](err, msg)
+ }
+ }
+
+ listener.queue = []
+
+ return listener
+}
+
+/**
+ * Patch ServerResponse.prototype.assignSocket for node.js 0.8.
+ *
+ * @param {ServerResponse} res
+ * @param {function} callback
+ * @private
+ */
+
+function patchAssignSocket(res, callback) {
+ var assignSocket = res.assignSocket
+
+ if (typeof assignSocket !== 'function') return
+
+ // res.on('socket', callback) is broken in 0.8
+ res.assignSocket = function _assignSocket(socket) {
+ assignSocket.call(this, socket)
+ callback(socket)
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/LICENSE
new file mode 100644
index 0000000..a7ae8ee
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/README.md
new file mode 100644
index 0000000..cbd2478
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/README.md
@@ -0,0 +1,80 @@
+# EE First
+
+[![NPM version][npm-image]][npm-url]
+[![Build status][travis-image]][travis-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+[![Gittip][gittip-image]][gittip-url]
+
+Get the first event in a set of event emitters and event pairs,
+then clean up after itself.
+
+## Install
+
+```sh
+$ npm install ee-first
+```
+
+## API
+
+```js
+var first = require('ee-first')
+```
+
+### first(arr, listener)
+
+Invoke `listener` on the first event from the list specified in `arr`. `arr` is
+an array of arrays, with each array in the format `[ee, ...event]`. `listener`
+will be called only once, the first time any of the given events are emitted. If
+`error` is one of the listened events, then if that fires first, the `listener`
+will be given the `err` argument.
+
+The `listener` is invoked as `listener(err, ee, event, args)`, where `err` is the
+first argument emitted from an `error` event, if applicable; `ee` is the event
+emitter that fired; `event` is the string event name that fired; and `args` is an
+array of the arguments that were emitted on the event.
+
+```js
+var ee1 = new EventEmitter()
+var ee2 = new EventEmitter()
+
+first([
+ [ee1, 'close', 'end', 'error'],
+ [ee2, 'error']
+], function (err, ee, event, args) {
+ // listener invoked
+})
+```
+
+#### .cancel()
+
+The group of listeners can be cancelled before being invoked and have all the event
+listeners removed from the underlying event emitters.
+
+```js
+var thunk = first([
+ [ee1, 'close', 'end', 'error'],
+ [ee2, 'error']
+], function (err, ee, event, args) {
+ // listener invoked
+})
+
+// cancel and clean up
+thunk.cancel()
+```
+
+[npm-image]: https://img.shields.io/npm/v/ee-first.svg?style=flat-square
+[npm-url]: https://npmjs.org/package/ee-first
+[github-tag]: http://img.shields.io/github/tag/jonathanong/ee-first.svg?style=flat-square
+[github-url]: https://github.com/jonathanong/ee-first/tags
+[travis-image]: https://img.shields.io/travis/jonathanong/ee-first.svg?style=flat-square
+[travis-url]: https://travis-ci.org/jonathanong/ee-first
+[coveralls-image]: https://img.shields.io/coveralls/jonathanong/ee-first.svg?style=flat-square
+[coveralls-url]: https://coveralls.io/r/jonathanong/ee-first?branch=master
+[license-image]: http://img.shields.io/npm/l/ee-first.svg?style=flat-square
+[license-url]: LICENSE.md
+[downloads-image]: http://img.shields.io/npm/dm/ee-first.svg?style=flat-square
+[downloads-url]: https://npmjs.org/package/ee-first
+[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
+[gittip-url]: https://www.gittip.com/jonathanong/
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/index.js
new file mode 100644
index 0000000..501287c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/index.js
@@ -0,0 +1,95 @@
+/*!
+ * ee-first
+ * Copyright(c) 2014 Jonathan Ong
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = first
+
+/**
+ * Get the first event in a set of event emitters and event pairs.
+ *
+ * @param {array} stuff
+ * @param {function} done
+ * @public
+ */
+
+function first(stuff, done) {
+ if (!Array.isArray(stuff))
+ throw new TypeError('arg must be an array of [ee, events...] arrays')
+
+ var cleanups = []
+
+ for (var i = 0; i < stuff.length; i++) {
+ var arr = stuff[i]
+
+ if (!Array.isArray(arr) || arr.length < 2)
+ throw new TypeError('each array member must be [ee, events...]')
+
+ var ee = arr[0]
+
+ for (var j = 1; j < arr.length; j++) {
+ var event = arr[j]
+ var fn = listener(event, callback)
+
+ // listen to the event
+ ee.on(event, fn)
+ // push this listener to the list of cleanups
+ cleanups.push({
+ ee: ee,
+ event: event,
+ fn: fn,
+ })
+ }
+ }
+
+ function callback() {
+ cleanup()
+ done.apply(null, arguments)
+ }
+
+ function cleanup() {
+ var x
+ for (var i = 0; i < cleanups.length; i++) {
+ x = cleanups[i]
+ x.ee.removeListener(x.event, x.fn)
+ }
+ }
+
+ function thunk(fn) {
+ done = fn
+ }
+
+ thunk.cancel = cleanup
+
+ return thunk
+}
+
+/**
+ * Create the event listener.
+ * @private
+ */
+
+function listener(event, done) {
+ return function onevent(arg1) {
+ var args = new Array(arguments.length)
+ var ee = this
+ var err = event === 'error'
+ ? arg1
+ : null
+
+ // copy args to prevent arguments escaping scope
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i]
+ }
+
+ done(err, ee, event, args)
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/package.json
new file mode 100644
index 0000000..c67faf1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/package.json
@@ -0,0 +1,64 @@
+{
+ "name": "ee-first",
+ "description": "return the first event in a set of ee/event pairs",
+ "version": "1.1.1",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jonathanong/ee-first.git"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.9",
+ "mocha": "2.2.5"
+ },
+ "files": [
+ "index.js",
+ "LICENSE"
+ ],
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "512e0ce4cc3643f603708f965a97b61b1a9c0441",
+ "bugs": {
+ "url": "https://github.com/jonathanong/ee-first/issues"
+ },
+ "homepage": "https://github.com/jonathanong/ee-first",
+ "_id": "ee-first@1.1.1",
+ "_shasum": "590c61156b0ae2f4f0255732a158b266bc56b21d",
+ "_from": "ee-first@1.1.1",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "590c61156b0ae2f4f0255732a158b266bc56b21d",
+ "tarball": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/package.json
new file mode 100644
index 0000000..97a5680
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/on-finished/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "on-finished",
+ "description": "Execute a callback when a request closes, finishes, or errors",
+ "version": "2.3.0",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jshttp/on-finished.git"
+ },
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.9",
+ "mocha": "2.2.5"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "34babcb58126a416fcf5205768204f2e12699dda",
+ "bugs": {
+ "url": "https://github.com/jshttp/on-finished/issues"
+ },
+ "homepage": "https://github.com/jshttp/on-finished",
+ "_id": "on-finished@2.3.0",
+ "_shasum": "20f1336481b083cd75337992a16971aa2d906947",
+ "_from": "on-finished@>=2.3.0 <2.4.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "20f1336481b083cd75337992a16971aa2d906947",
+ "tarball": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/.eslintignore b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/.eslintignore
new file mode 100644
index 0000000..1521c8b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/.eslintignore
@@ -0,0 +1 @@
+dist
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/.eslintrc b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/.eslintrc
new file mode 100644
index 0000000..1faac27
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/.eslintrc
@@ -0,0 +1,19 @@
+{
+ "root": true,
+
+ "extends": "@ljharb",
+
+ "rules": {
+ "complexity": [2, 22],
+ "consistent-return": [1],
+ "id-length": [2, { "min": 1, "max": 25, "properties": "never" }],
+ "indent": [2, 4],
+ "max-params": [2, 9],
+ "max-statements": [2, 36],
+ "no-extra-parens": [1],
+ "no-continue": [1],
+ "no-magic-numbers": 0,
+ "no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"],
+ "operator-linebreak": 1
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/.jscs.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/.jscs.json
new file mode 100644
index 0000000..3d099c4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/.jscs.json
@@ -0,0 +1,176 @@
+{
+ "es3": true,
+
+ "additionalRules": [],
+
+ "requireSemicolons": true,
+
+ "disallowMultipleSpaces": true,
+
+ "disallowIdentifierNames": [],
+
+ "requireCurlyBraces": {
+ "allExcept": [],
+ "keywords": ["if", "else", "for", "while", "do", "try", "catch"]
+ },
+
+ "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],
+
+ "disallowSpaceAfterKeywords": [],
+
+ "disallowSpaceBeforeComma": true,
+ "disallowSpaceAfterComma": false,
+ "disallowSpaceBeforeSemicolon": true,
+
+ "disallowNodeTypes": [
+ "DebuggerStatement",
+ "ForInStatement",
+ "LabeledStatement",
+ "SwitchCase",
+ "SwitchStatement",
+ "WithStatement"
+ ],
+
+ "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] },
+
+ "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
+ "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
+ "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
+ "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
+ "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
+
+ "requireSpaceBetweenArguments": true,
+
+ "disallowSpacesInsideParentheses": true,
+
+ "disallowSpacesInsideArrayBrackets": true,
+
+ "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] },
+
+ "disallowSpaceAfterObjectKeys": true,
+
+ "requireCommaBeforeLineBreak": true,
+
+ "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
+ "requireSpaceAfterPrefixUnaryOperators": [],
+
+ "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
+ "requireSpaceBeforePostfixUnaryOperators": [],
+
+ "disallowSpaceBeforeBinaryOperators": [],
+ "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
+
+ "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
+ "disallowSpaceAfterBinaryOperators": [],
+
+ "disallowImplicitTypeConversion": ["binary", "string"],
+
+ "disallowKeywords": ["with", "eval"],
+
+ "requireKeywordsOnNewLine": [],
+ "disallowKeywordsOnNewLine": ["else"],
+
+ "requireLineFeedAtFileEnd": true,
+
+ "disallowTrailingWhitespace": true,
+
+ "disallowTrailingComma": true,
+
+ "excludeFiles": ["node_modules/**", "vendor/**"],
+
+ "disallowMultipleLineStrings": true,
+
+ "requireDotNotation": { "allExcept": ["keywords"] },
+
+ "requireParenthesesAroundIIFE": true,
+
+ "validateLineBreaks": "LF",
+
+ "validateQuoteMarks": {
+ "escape": true,
+ "mark": "'"
+ },
+
+ "disallowOperatorBeforeLineBreak": [],
+
+ "requireSpaceBeforeKeywords": [
+ "do",
+ "for",
+ "if",
+ "else",
+ "switch",
+ "case",
+ "try",
+ "catch",
+ "finally",
+ "while",
+ "with",
+ "return"
+ ],
+
+ "validateAlignedFunctionParameters": {
+ "lineBreakAfterOpeningBraces": true,
+ "lineBreakBeforeClosingBraces": true
+ },
+
+ "requirePaddingNewLinesBeforeExport": true,
+
+ "validateNewlineAfterArrayElements": {
+ "maximum": 1
+ },
+
+ "requirePaddingNewLinesAfterUseStrict": true,
+
+ "disallowArrowFunctions": true,
+
+ "disallowMultiLineTernary": true,
+
+ "validateOrderInObjectKeys": "asc-insensitive",
+
+ "disallowIdenticalDestructuringNames": true,
+
+ "disallowNestedTernaries": { "maxLevel": 1 },
+
+ "requireSpaceAfterComma": { "allExcept": ["trailing"] },
+ "requireAlignedMultilineParams": false,
+
+ "requireSpacesInGenerator": {
+ "afterStar": true
+ },
+
+ "disallowSpacesInGenerator": {
+ "beforeStar": true
+ },
+
+ "disallowVar": false,
+
+ "requireArrayDestructuring": false,
+
+ "requireEnhancedObjectLiterals": false,
+
+ "requireObjectDestructuring": false,
+
+ "requireEarlyReturn": false,
+
+ "requireCapitalizedConstructorsNew": {
+ "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"]
+ },
+
+ "requireImportAlphabetized": false,
+
+ "requireSpaceBeforeObjectValues": true,
+ "requireSpaceBeforeDestructuredValues": true,
+
+ "disallowSpacesInsideTemplateStringPlaceholders": true,
+
+ "disallowArrayDestructuringReturn": false,
+
+ "requireNewlineBeforeSingleStatementsInIf": false,
+
+ "disallowUnusedVariables": true,
+
+ "requireSpacesInsideImportedObjectBraces": true,
+
+ "requireUseStrict": true
+}
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/CHANGELOG.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/CHANGELOG.md
new file mode 100644
index 0000000..e318a05
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/CHANGELOG.md
@@ -0,0 +1,120 @@
+## [**6.2.0**](https://github.com/ljharb/qs/issues?milestone=36&state=closed)
+- [New] pass Buffers to the encoder/decoder directly (#161)
+- [New] add "encoder" and "decoder" options, for custom param encoding/decoding (#160)
+- [Fix] fix compacting of nested sparse arrays (#150)
+
+## [**6.1.0**](https://github.com/ljharb/qs/issues?milestone=35&state=closed)
+- [New] allowDots option for `stringify` (#151)
+- [Fix] "sort" option should work at a depth of 3 or more (#151)
+- [Fix] Restore `dist` directory; will be removed in v7 (#148)
+
+## [**6.0.2**](https://github.com/ljharb/qs/issues?milestone=33&state=closed)
+- Revert ES6 requirement and restore support for node down to v0.8.
+
+## [**6.0.1**](https://github.com/ljharb/qs/issues?milestone=32&state=closed)
+- [**#127**](https://github.com/ljharb/qs/pull/127) Fix engines definition in package.json
+
+## [**6.0.0**](https://github.com/ljharb/qs/issues?milestone=31&state=closed)
+- [**#124**](https://github.com/ljharb/qs/issues/124) Use ES6 and drop support for node < v4
+
+## [**5.2.0**](https://github.com/ljharb/qs/issues?milestone=30&state=closed)
+- [**#64**](https://github.com/ljharb/qs/issues/64) Add option to sort object keys in the query string
+
+## [**5.1.0**](https://github.com/ljharb/qs/issues?milestone=29&state=closed)
+- [**#117**](https://github.com/ljharb/qs/issues/117) make URI encoding stringified results optional
+- [**#106**](https://github.com/ljharb/qs/issues/106) Add flag `skipNulls` to optionally skip null values in stringify
+
+## [**5.0.0**](https://github.com/ljharb/qs/issues?milestone=28&state=closed)
+- [**#114**](https://github.com/ljharb/qs/issues/114) default allowDots to false
+- [**#100**](https://github.com/ljharb/qs/issues/100) include dist to npm
+
+## [**4.0.0**](https://github.com/ljharb/qs/issues?milestone=26&state=closed)
+- [**#98**](https://github.com/ljharb/qs/issues/98) make returning plain objects and allowing prototype overwriting properties optional
+
+## [**3.1.0**](https://github.com/ljharb/qs/issues?milestone=24&state=closed)
+- [**#89**](https://github.com/ljharb/qs/issues/89) Add option to disable "Transform dot notation to bracket notation"
+
+## [**3.0.0**](https://github.com/ljharb/qs/issues?milestone=23&state=closed)
+- [**#80**](https://github.com/ljharb/qs/issues/80) qs.parse silently drops properties
+- [**#77**](https://github.com/ljharb/qs/issues/77) Perf boost
+- [**#60**](https://github.com/ljharb/qs/issues/60) Add explicit option to disable array parsing
+- [**#74**](https://github.com/ljharb/qs/issues/74) Bad parse when turning array into object
+- [**#81**](https://github.com/ljharb/qs/issues/81) Add a `filter` option
+- [**#68**](https://github.com/ljharb/qs/issues/68) Fixed issue with recursion and passing strings into objects.
+- [**#66**](https://github.com/ljharb/qs/issues/66) Add mixed array and object dot notation support Closes: #47
+- [**#76**](https://github.com/ljharb/qs/issues/76) RFC 3986
+- [**#85**](https://github.com/ljharb/qs/issues/85) No equal sign
+- [**#84**](https://github.com/ljharb/qs/issues/84) update license attribute
+
+## [**2.4.1**](https://github.com/ljharb/qs/issues?milestone=20&state=closed)
+- [**#73**](https://github.com/ljharb/qs/issues/73) Property 'hasOwnProperty' of object #<Object> is not a function
+
+## [**2.4.0**](https://github.com/ljharb/qs/issues?milestone=19&state=closed)
+- [**#70**](https://github.com/ljharb/qs/issues/70) Add arrayFormat option
+
+## [**2.3.3**](https://github.com/ljharb/qs/issues?milestone=18&state=closed)
+- [**#59**](https://github.com/ljharb/qs/issues/59) make sure array indexes are >= 0, closes #57
+- [**#58**](https://github.com/ljharb/qs/issues/58) make qs usable for browser loader
+
+## [**2.3.2**](https://github.com/ljharb/qs/issues?milestone=17&state=closed)
+- [**#55**](https://github.com/ljharb/qs/issues/55) allow merging a string into an object
+
+## [**2.3.1**](https://github.com/ljharb/qs/issues?milestone=16&state=closed)
+- [**#52**](https://github.com/ljharb/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError".
+
+## [**2.3.0**](https://github.com/ljharb/qs/issues?milestone=15&state=closed)
+- [**#50**](https://github.com/ljharb/qs/issues/50) add option to omit array indices, closes #46
+
+## [**2.2.5**](https://github.com/ljharb/qs/issues?milestone=14&state=closed)
+- [**#39**](https://github.com/ljharb/qs/issues/39) Is there an alternative to Buffer.isBuffer?
+- [**#49**](https://github.com/ljharb/qs/issues/49) refactor utils.merge, fixes #45
+- [**#41**](https://github.com/ljharb/qs/issues/41) avoid browserifying Buffer, for #39
+
+## [**2.2.4**](https://github.com/ljharb/qs/issues?milestone=13&state=closed)
+- [**#38**](https://github.com/ljharb/qs/issues/38) how to handle object keys beginning with a number
+
+## [**2.2.3**](https://github.com/ljharb/qs/issues?milestone=12&state=closed)
+- [**#37**](https://github.com/ljharb/qs/issues/37) parser discards first empty value in array
+- [**#36**](https://github.com/ljharb/qs/issues/36) Update to lab 4.x
+
+## [**2.2.2**](https://github.com/ljharb/qs/issues?milestone=11&state=closed)
+- [**#33**](https://github.com/ljharb/qs/issues/33) Error when plain object in a value
+- [**#34**](https://github.com/ljharb/qs/issues/34) use Object.prototype.hasOwnProperty.call instead of obj.hasOwnProperty
+- [**#24**](https://github.com/ljharb/qs/issues/24) Changelog? Semver?
+
+## [**2.2.1**](https://github.com/ljharb/qs/issues?milestone=10&state=closed)
+- [**#32**](https://github.com/ljharb/qs/issues/32) account for circular references properly, closes #31
+- [**#31**](https://github.com/ljharb/qs/issues/31) qs.parse stackoverflow on circular objects
+
+## [**2.2.0**](https://github.com/ljharb/qs/issues?milestone=9&state=closed)
+- [**#26**](https://github.com/ljharb/qs/issues/26) Don't use Buffer global if it's not present
+- [**#30**](https://github.com/ljharb/qs/issues/30) Bug when merging non-object values into arrays
+- [**#29**](https://github.com/ljharb/qs/issues/29) Don't call Utils.clone at the top of Utils.merge
+- [**#23**](https://github.com/ljharb/qs/issues/23) Ability to not limit parameters?
+
+## [**2.1.0**](https://github.com/ljharb/qs/issues?milestone=8&state=closed)
+- [**#22**](https://github.com/ljharb/qs/issues/22) Enable using a RegExp as delimiter
+
+## [**2.0.0**](https://github.com/ljharb/qs/issues?milestone=7&state=closed)
+- [**#18**](https://github.com/ljharb/qs/issues/18) Why is there arrayLimit?
+- [**#20**](https://github.com/ljharb/qs/issues/20) Configurable parametersLimit
+- [**#21**](https://github.com/ljharb/qs/issues/21) make all limits optional, for #18, for #20
+
+## [**1.2.2**](https://github.com/ljharb/qs/issues?milestone=6&state=closed)
+- [**#19**](https://github.com/ljharb/qs/issues/19) Don't overwrite null values
+
+## [**1.2.1**](https://github.com/ljharb/qs/issues?milestone=5&state=closed)
+- [**#16**](https://github.com/ljharb/qs/issues/16) ignore non-string delimiters
+- [**#15**](https://github.com/ljharb/qs/issues/15) Close code block
+
+## [**1.2.0**](https://github.com/ljharb/qs/issues?milestone=4&state=closed)
+- [**#12**](https://github.com/ljharb/qs/issues/12) Add optional delim argument
+- [**#13**](https://github.com/ljharb/qs/issues/13) fix #11: flattened keys in array are now correctly parsed
+
+## [**1.1.0**](https://github.com/ljharb/qs/issues?milestone=3&state=closed)
+- [**#7**](https://github.com/ljharb/qs/issues/7) Empty values of a POST array disappear after being submitted
+- [**#9**](https://github.com/ljharb/qs/issues/9) Should not omit equals signs (=) when value is null
+- [**#6**](https://github.com/ljharb/qs/issues/6) Minor grammar fix in README
+
+## [**1.0.2**](https://github.com/ljharb/qs/issues?milestone=2&state=closed)
+- [**#5**](https://github.com/ljharb/qs/issues/5) array holes incorrectly copied into object on large index
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/CONTRIBUTING.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/CONTRIBUTING.md
new file mode 100644
index 0000000..8928361
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/CONTRIBUTING.md
@@ -0,0 +1 @@
+Please view our [hapijs contributing guide](https://github.com/hapijs/hapi/blob/master/CONTRIBUTING.md).
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/LICENSE
new file mode 100644
index 0000000..d456948
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/LICENSE
@@ -0,0 +1,28 @@
+Copyright (c) 2014 Nathan LaFreniere and other contributors.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * The names of any contributors may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ * * *
+
+The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/dist/qs.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/dist/qs.js
new file mode 100644
index 0000000..4cc6f30
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/dist/qs.js
@@ -0,0 +1,487 @@
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Qs = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+'use strict';
+
+var Stringify = require('./stringify');
+var Parse = require('./parse');
+
+module.exports = {
+ stringify: Stringify,
+ parse: Parse
+};
+
+},{"./parse":2,"./stringify":3}],2:[function(require,module,exports){
+'use strict';
+
+var Utils = require('./utils');
+
+var defaults = {
+ delimiter: '&',
+ depth: 5,
+ arrayLimit: 20,
+ parameterLimit: 1000,
+ strictNullHandling: false,
+ plainObjects: false,
+ allowPrototypes: false,
+ allowDots: false,
+ decoder: Utils.decode
+};
+
+var parseValues = function parseValues(str, options) {
+ var obj = {};
+ var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);
+
+ for (var i = 0; i < parts.length; ++i) {
+ var part = parts[i];
+ var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;
+
+ if (pos === -1) {
+ obj[options.decoder(part)] = '';
+
+ if (options.strictNullHandling) {
+ obj[options.decoder(part)] = null;
+ }
+ } else {
+ var key = options.decoder(part.slice(0, pos));
+ var val = options.decoder(part.slice(pos + 1));
+
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
+ obj[key] = [].concat(obj[key]).concat(val);
+ } else {
+ obj[key] = val;
+ }
+ }
+ }
+
+ return obj;
+};
+
+var parseObject = function parseObject(chain, val, options) {
+ if (!chain.length) {
+ return val;
+ }
+
+ var root = chain.shift();
+
+ var obj;
+ if (root === '[]') {
+ obj = [];
+ obj = obj.concat(parseObject(chain, val, options));
+ } else {
+ obj = options.plainObjects ? Object.create(null) : {};
+ var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root;
+ var index = parseInt(cleanRoot, 10);
+ if (
+ !isNaN(index) &&
+ root !== cleanRoot &&
+ String(index) === cleanRoot &&
+ index >= 0 &&
+ (options.parseArrays && index <= options.arrayLimit)
+ ) {
+ obj = [];
+ obj[index] = parseObject(chain, val, options);
+ } else {
+ obj[cleanRoot] = parseObject(chain, val, options);
+ }
+ }
+
+ return obj;
+};
+
+var parseKeys = function parseKeys(givenKey, val, options) {
+ if (!givenKey) {
+ return;
+ }
+
+ // Transform dot notation to bracket notation
+ var key = options.allowDots ? givenKey.replace(/\.([^\.\[]+)/g, '[$1]') : givenKey;
+
+ // The regex chunks
+
+ var parent = /^([^\[\]]*)/;
+ var child = /(\[[^\[\]]*\])/g;
+
+ // Get the parent
+
+ var segment = parent.exec(key);
+
+ // Stash the parent if it exists
+
+ var keys = [];
+ if (segment[1]) {
+ // If we aren't using plain objects, optionally prefix keys
+ // that would overwrite object prototype properties
+ if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1])) {
+ if (!options.allowPrototypes) {
+ return;
+ }
+ }
+
+ keys.push(segment[1]);
+ }
+
+ // Loop through children appending to the array until we hit depth
+
+ var i = 0;
+ while ((segment = child.exec(key)) !== null && i < options.depth) {
+ i += 1;
+ if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1].replace(/\[|\]/g, ''))) {
+ if (!options.allowPrototypes) {
+ continue;
+ }
+ }
+ keys.push(segment[1]);
+ }
+
+ // If there's a remainder, just add whatever is left
+
+ if (segment) {
+ keys.push('[' + key.slice(segment.index) + ']');
+ }
+
+ return parseObject(keys, val, options);
+};
+
+module.exports = function (str, opts) {
+ var options = opts || {};
+
+ if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') {
+ throw new TypeError('Decoder has to be a function.');
+ }
+
+ options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;
+ options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;
+ options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;
+ options.parseArrays = options.parseArrays !== false;
+ options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder;
+ options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots;
+ options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects;
+ options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes;
+ options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit;
+ options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
+
+ if (str === '' || str === null || typeof str === 'undefined') {
+ return options.plainObjects ? Object.create(null) : {};
+ }
+
+ var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
+ var obj = options.plainObjects ? Object.create(null) : {};
+
+ // Iterate over the keys and setup the new object
+
+ var keys = Object.keys(tempObj);
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ var newObj = parseKeys(key, tempObj[key], options);
+ obj = Utils.merge(obj, newObj, options);
+ }
+
+ return Utils.compact(obj);
+};
+
+},{"./utils":4}],3:[function(require,module,exports){
+'use strict';
+
+var Utils = require('./utils');
+
+var arrayPrefixGenerators = {
+ brackets: function brackets(prefix) {
+ return prefix + '[]';
+ },
+ indices: function indices(prefix, key) {
+ return prefix + '[' + key + ']';
+ },
+ repeat: function repeat(prefix) {
+ return prefix;
+ }
+};
+
+var defaults = {
+ delimiter: '&',
+ strictNullHandling: false,
+ skipNulls: false,
+ encode: true,
+ encoder: Utils.encode
+};
+
+var stringify = function stringify(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots) {
+ var obj = object;
+ if (typeof filter === 'function') {
+ obj = filter(prefix, obj);
+ } else if (obj instanceof Date) {
+ obj = obj.toISOString();
+ } else if (obj === null) {
+ if (strictNullHandling) {
+ return encoder ? encoder(prefix) : prefix;
+ }
+
+ obj = '';
+ }
+
+ if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || Utils.isBuffer(obj)) {
+ if (encoder) {
+ return [encoder(prefix) + '=' + encoder(obj)];
+ }
+ return [prefix + '=' + String(obj)];
+ }
+
+ var values = [];
+
+ if (typeof obj === 'undefined') {
+ return values;
+ }
+
+ var objKeys;
+ if (Array.isArray(filter)) {
+ objKeys = filter;
+ } else {
+ var keys = Object.keys(obj);
+ objKeys = sort ? keys.sort(sort) : keys;
+ }
+
+ for (var i = 0; i < objKeys.length; ++i) {
+ var key = objKeys[i];
+
+ if (skipNulls && obj[key] === null) {
+ continue;
+ }
+
+ if (Array.isArray(obj)) {
+ values = values.concat(stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
+ } else {
+ values = values.concat(stringify(obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
+ }
+ }
+
+ return values;
+};
+
+module.exports = function (object, opts) {
+ var obj = object;
+ var options = opts || {};
+ var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter;
+ var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
+ var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls;
+ var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode;
+ var encoder = encode ? (typeof options.encoder === 'function' ? options.encoder : defaults.encoder) : null;
+ var sort = typeof options.sort === 'function' ? options.sort : null;
+ var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots;
+ var objKeys;
+ var filter;
+
+ if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {
+ throw new TypeError('Encoder has to be a function.');
+ }
+
+ if (typeof options.filter === 'function') {
+ filter = options.filter;
+ obj = filter('', obj);
+ } else if (Array.isArray(options.filter)) {
+ objKeys = filter = options.filter;
+ }
+
+ var keys = [];
+
+ if (typeof obj !== 'object' || obj === null) {
+ return '';
+ }
+
+ var arrayFormat;
+ if (options.arrayFormat in arrayPrefixGenerators) {
+ arrayFormat = options.arrayFormat;
+ } else if ('indices' in options) {
+ arrayFormat = options.indices ? 'indices' : 'repeat';
+ } else {
+ arrayFormat = 'indices';
+ }
+
+ var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
+
+ if (!objKeys) {
+ objKeys = Object.keys(obj);
+ }
+
+ if (sort) {
+ objKeys.sort(sort);
+ }
+
+ for (var i = 0; i < objKeys.length; ++i) {
+ var key = objKeys[i];
+
+ if (skipNulls && obj[key] === null) {
+ continue;
+ }
+
+ keys = keys.concat(stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
+ }
+
+ return keys.join(delimiter);
+};
+
+},{"./utils":4}],4:[function(require,module,exports){
+'use strict';
+
+var hexTable = (function () {
+ var array = new Array(256);
+ for (var i = 0; i < 256; ++i) {
+ array[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase();
+ }
+
+ return array;
+}());
+
+exports.arrayToObject = function (source, options) {
+ var obj = options.plainObjects ? Object.create(null) : {};
+ for (var i = 0; i < source.length; ++i) {
+ if (typeof source[i] !== 'undefined') {
+ obj[i] = source[i];
+ }
+ }
+
+ return obj;
+};
+
+exports.merge = function (target, source, options) {
+ if (!source) {
+ return target;
+ }
+
+ if (typeof source !== 'object') {
+ if (Array.isArray(target)) {
+ target.push(source);
+ } else if (typeof target === 'object') {
+ target[source] = true;
+ } else {
+ return [target, source];
+ }
+
+ return target;
+ }
+
+ if (typeof target !== 'object') {
+ return [target].concat(source);
+ }
+
+ var mergeTarget = target;
+ if (Array.isArray(target) && !Array.isArray(source)) {
+ mergeTarget = exports.arrayToObject(target, options);
+ }
+
+ return Object.keys(source).reduce(function (acc, key) {
+ var value = source[key];
+
+ if (Object.prototype.hasOwnProperty.call(acc, key)) {
+ acc[key] = exports.merge(acc[key], value, options);
+ } else {
+ acc[key] = value;
+ }
+ return acc;
+ }, mergeTarget);
+};
+
+exports.decode = function (str) {
+ try {
+ return decodeURIComponent(str.replace(/\+/g, ' '));
+ } catch (e) {
+ return str;
+ }
+};
+
+exports.encode = function (str) {
+ // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
+ // It has been adapted here for stricter adherence to RFC 3986
+ if (str.length === 0) {
+ return str;
+ }
+
+ var string = typeof str === 'string' ? str : String(str);
+
+ var out = '';
+ for (var i = 0; i < string.length; ++i) {
+ var c = string.charCodeAt(i);
+
+ if (
+ c === 0x2D || // -
+ c === 0x2E || // .
+ c === 0x5F || // _
+ c === 0x7E || // ~
+ (c >= 0x30 && c <= 0x39) || // 0-9
+ (c >= 0x41 && c <= 0x5A) || // a-z
+ (c >= 0x61 && c <= 0x7A) // A-Z
+ ) {
+ out += string.charAt(i);
+ continue;
+ }
+
+ if (c < 0x80) {
+ out = out + hexTable[c];
+ continue;
+ }
+
+ if (c < 0x800) {
+ out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
+ continue;
+ }
+
+ if (c < 0xD800 || c >= 0xE000) {
+ out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
+ continue;
+ }
+
+ i += 1;
+ c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
+ out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)];
+ }
+
+ return out;
+};
+
+exports.compact = function (obj, references) {
+ if (typeof obj !== 'object' || obj === null) {
+ return obj;
+ }
+
+ var refs = references || [];
+ var lookup = refs.indexOf(obj);
+ if (lookup !== -1) {
+ return refs[lookup];
+ }
+
+ refs.push(obj);
+
+ if (Array.isArray(obj)) {
+ var compacted = [];
+
+ for (var i = 0; i < obj.length; ++i) {
+ if (obj[i] && typeof obj[i] === 'object') {
+ compacted.push(exports.compact(obj[i], refs));
+ } else if (typeof obj[i] !== 'undefined') {
+ compacted.push(obj[i]);
+ }
+ }
+
+ return compacted;
+ }
+
+ var keys = Object.keys(obj);
+ for (var j = 0; j < keys.length; ++j) {
+ var key = keys[j];
+ obj[key] = exports.compact(obj[key], refs);
+ }
+
+ return obj;
+};
+
+exports.isRegExp = function (obj) {
+ return Object.prototype.toString.call(obj) === '[object RegExp]';
+};
+
+exports.isBuffer = function (obj) {
+ if (obj === null || typeof obj === 'undefined') {
+ return false;
+ }
+
+ return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
+};
+
+},{}]},{},[1])(1)
+}); \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/lib/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/lib/index.js
new file mode 100644
index 0000000..1901959
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/lib/index.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var Stringify = require('./stringify');
+var Parse = require('./parse');
+
+module.exports = {
+ stringify: Stringify,
+ parse: Parse
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/lib/parse.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/lib/parse.js
new file mode 100644
index 0000000..bf70fd8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/lib/parse.js
@@ -0,0 +1,167 @@
+'use strict';
+
+var Utils = require('./utils');
+
+var defaults = {
+ delimiter: '&',
+ depth: 5,
+ arrayLimit: 20,
+ parameterLimit: 1000,
+ strictNullHandling: false,
+ plainObjects: false,
+ allowPrototypes: false,
+ allowDots: false,
+ decoder: Utils.decode
+};
+
+var parseValues = function parseValues(str, options) {
+ var obj = {};
+ var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);
+
+ for (var i = 0; i < parts.length; ++i) {
+ var part = parts[i];
+ var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;
+
+ if (pos === -1) {
+ obj[options.decoder(part)] = '';
+
+ if (options.strictNullHandling) {
+ obj[options.decoder(part)] = null;
+ }
+ } else {
+ var key = options.decoder(part.slice(0, pos));
+ var val = options.decoder(part.slice(pos + 1));
+
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
+ obj[key] = [].concat(obj[key]).concat(val);
+ } else {
+ obj[key] = val;
+ }
+ }
+ }
+
+ return obj;
+};
+
+var parseObject = function parseObject(chain, val, options) {
+ if (!chain.length) {
+ return val;
+ }
+
+ var root = chain.shift();
+
+ var obj;
+ if (root === '[]') {
+ obj = [];
+ obj = obj.concat(parseObject(chain, val, options));
+ } else {
+ obj = options.plainObjects ? Object.create(null) : {};
+ var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root;
+ var index = parseInt(cleanRoot, 10);
+ if (
+ !isNaN(index) &&
+ root !== cleanRoot &&
+ String(index) === cleanRoot &&
+ index >= 0 &&
+ (options.parseArrays && index <= options.arrayLimit)
+ ) {
+ obj = [];
+ obj[index] = parseObject(chain, val, options);
+ } else {
+ obj[cleanRoot] = parseObject(chain, val, options);
+ }
+ }
+
+ return obj;
+};
+
+var parseKeys = function parseKeys(givenKey, val, options) {
+ if (!givenKey) {
+ return;
+ }
+
+ // Transform dot notation to bracket notation
+ var key = options.allowDots ? givenKey.replace(/\.([^\.\[]+)/g, '[$1]') : givenKey;
+
+ // The regex chunks
+
+ var parent = /^([^\[\]]*)/;
+ var child = /(\[[^\[\]]*\])/g;
+
+ // Get the parent
+
+ var segment = parent.exec(key);
+
+ // Stash the parent if it exists
+
+ var keys = [];
+ if (segment[1]) {
+ // If we aren't using plain objects, optionally prefix keys
+ // that would overwrite object prototype properties
+ if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1])) {
+ if (!options.allowPrototypes) {
+ return;
+ }
+ }
+
+ keys.push(segment[1]);
+ }
+
+ // Loop through children appending to the array until we hit depth
+
+ var i = 0;
+ while ((segment = child.exec(key)) !== null && i < options.depth) {
+ i += 1;
+ if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1].replace(/\[|\]/g, ''))) {
+ if (!options.allowPrototypes) {
+ continue;
+ }
+ }
+ keys.push(segment[1]);
+ }
+
+ // If there's a remainder, just add whatever is left
+
+ if (segment) {
+ keys.push('[' + key.slice(segment.index) + ']');
+ }
+
+ return parseObject(keys, val, options);
+};
+
+module.exports = function (str, opts) {
+ var options = opts || {};
+
+ if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') {
+ throw new TypeError('Decoder has to be a function.');
+ }
+
+ options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;
+ options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;
+ options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;
+ options.parseArrays = options.parseArrays !== false;
+ options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder;
+ options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots;
+ options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects;
+ options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes;
+ options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit;
+ options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
+
+ if (str === '' || str === null || typeof str === 'undefined') {
+ return options.plainObjects ? Object.create(null) : {};
+ }
+
+ var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
+ var obj = options.plainObjects ? Object.create(null) : {};
+
+ // Iterate over the keys and setup the new object
+
+ var keys = Object.keys(tempObj);
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ var newObj = parseKeys(key, tempObj[key], options);
+ obj = Utils.merge(obj, newObj, options);
+ }
+
+ return Utils.compact(obj);
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/lib/stringify.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/lib/stringify.js
new file mode 100644
index 0000000..6e1c9a2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/lib/stringify.js
@@ -0,0 +1,137 @@
+'use strict';
+
+var Utils = require('./utils');
+
+var arrayPrefixGenerators = {
+ brackets: function brackets(prefix) {
+ return prefix + '[]';
+ },
+ indices: function indices(prefix, key) {
+ return prefix + '[' + key + ']';
+ },
+ repeat: function repeat(prefix) {
+ return prefix;
+ }
+};
+
+var defaults = {
+ delimiter: '&',
+ strictNullHandling: false,
+ skipNulls: false,
+ encode: true,
+ encoder: Utils.encode
+};
+
+var stringify = function stringify(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots) {
+ var obj = object;
+ if (typeof filter === 'function') {
+ obj = filter(prefix, obj);
+ } else if (obj instanceof Date) {
+ obj = obj.toISOString();
+ } else if (obj === null) {
+ if (strictNullHandling) {
+ return encoder ? encoder(prefix) : prefix;
+ }
+
+ obj = '';
+ }
+
+ if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || Utils.isBuffer(obj)) {
+ if (encoder) {
+ return [encoder(prefix) + '=' + encoder(obj)];
+ }
+ return [prefix + '=' + String(obj)];
+ }
+
+ var values = [];
+
+ if (typeof obj === 'undefined') {
+ return values;
+ }
+
+ var objKeys;
+ if (Array.isArray(filter)) {
+ objKeys = filter;
+ } else {
+ var keys = Object.keys(obj);
+ objKeys = sort ? keys.sort(sort) : keys;
+ }
+
+ for (var i = 0; i < objKeys.length; ++i) {
+ var key = objKeys[i];
+
+ if (skipNulls && obj[key] === null) {
+ continue;
+ }
+
+ if (Array.isArray(obj)) {
+ values = values.concat(stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
+ } else {
+ values = values.concat(stringify(obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
+ }
+ }
+
+ return values;
+};
+
+module.exports = function (object, opts) {
+ var obj = object;
+ var options = opts || {};
+ var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter;
+ var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
+ var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls;
+ var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode;
+ var encoder = encode ? (typeof options.encoder === 'function' ? options.encoder : defaults.encoder) : null;
+ var sort = typeof options.sort === 'function' ? options.sort : null;
+ var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots;
+ var objKeys;
+ var filter;
+
+ if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {
+ throw new TypeError('Encoder has to be a function.');
+ }
+
+ if (typeof options.filter === 'function') {
+ filter = options.filter;
+ obj = filter('', obj);
+ } else if (Array.isArray(options.filter)) {
+ objKeys = filter = options.filter;
+ }
+
+ var keys = [];
+
+ if (typeof obj !== 'object' || obj === null) {
+ return '';
+ }
+
+ var arrayFormat;
+ if (options.arrayFormat in arrayPrefixGenerators) {
+ arrayFormat = options.arrayFormat;
+ } else if ('indices' in options) {
+ arrayFormat = options.indices ? 'indices' : 'repeat';
+ } else {
+ arrayFormat = 'indices';
+ }
+
+ var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
+
+ if (!objKeys) {
+ objKeys = Object.keys(obj);
+ }
+
+ if (sort) {
+ objKeys.sort(sort);
+ }
+
+ for (var i = 0; i < objKeys.length; ++i) {
+ var key = objKeys[i];
+
+ if (skipNulls && obj[key] === null) {
+ continue;
+ }
+
+ keys = keys.concat(stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
+ }
+
+ return keys.join(delimiter);
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/lib/utils.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/lib/utils.js
new file mode 100644
index 0000000..2c5c8ee
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/lib/utils.js
@@ -0,0 +1,164 @@
+'use strict';
+
+var hexTable = (function () {
+ var array = new Array(256);
+ for (var i = 0; i < 256; ++i) {
+ array[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase();
+ }
+
+ return array;
+}());
+
+exports.arrayToObject = function (source, options) {
+ var obj = options.plainObjects ? Object.create(null) : {};
+ for (var i = 0; i < source.length; ++i) {
+ if (typeof source[i] !== 'undefined') {
+ obj[i] = source[i];
+ }
+ }
+
+ return obj;
+};
+
+exports.merge = function (target, source, options) {
+ if (!source) {
+ return target;
+ }
+
+ if (typeof source !== 'object') {
+ if (Array.isArray(target)) {
+ target.push(source);
+ } else if (typeof target === 'object') {
+ target[source] = true;
+ } else {
+ return [target, source];
+ }
+
+ return target;
+ }
+
+ if (typeof target !== 'object') {
+ return [target].concat(source);
+ }
+
+ var mergeTarget = target;
+ if (Array.isArray(target) && !Array.isArray(source)) {
+ mergeTarget = exports.arrayToObject(target, options);
+ }
+
+ return Object.keys(source).reduce(function (acc, key) {
+ var value = source[key];
+
+ if (Object.prototype.hasOwnProperty.call(acc, key)) {
+ acc[key] = exports.merge(acc[key], value, options);
+ } else {
+ acc[key] = value;
+ }
+ return acc;
+ }, mergeTarget);
+};
+
+exports.decode = function (str) {
+ try {
+ return decodeURIComponent(str.replace(/\+/g, ' '));
+ } catch (e) {
+ return str;
+ }
+};
+
+exports.encode = function (str) {
+ // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
+ // It has been adapted here for stricter adherence to RFC 3986
+ if (str.length === 0) {
+ return str;
+ }
+
+ var string = typeof str === 'string' ? str : String(str);
+
+ var out = '';
+ for (var i = 0; i < string.length; ++i) {
+ var c = string.charCodeAt(i);
+
+ if (
+ c === 0x2D || // -
+ c === 0x2E || // .
+ c === 0x5F || // _
+ c === 0x7E || // ~
+ (c >= 0x30 && c <= 0x39) || // 0-9
+ (c >= 0x41 && c <= 0x5A) || // a-z
+ (c >= 0x61 && c <= 0x7A) // A-Z
+ ) {
+ out += string.charAt(i);
+ continue;
+ }
+
+ if (c < 0x80) {
+ out = out + hexTable[c];
+ continue;
+ }
+
+ if (c < 0x800) {
+ out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
+ continue;
+ }
+
+ if (c < 0xD800 || c >= 0xE000) {
+ out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
+ continue;
+ }
+
+ i += 1;
+ c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
+ out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)];
+ }
+
+ return out;
+};
+
+exports.compact = function (obj, references) {
+ if (typeof obj !== 'object' || obj === null) {
+ return obj;
+ }
+
+ var refs = references || [];
+ var lookup = refs.indexOf(obj);
+ if (lookup !== -1) {
+ return refs[lookup];
+ }
+
+ refs.push(obj);
+
+ if (Array.isArray(obj)) {
+ var compacted = [];
+
+ for (var i = 0; i < obj.length; ++i) {
+ if (obj[i] && typeof obj[i] === 'object') {
+ compacted.push(exports.compact(obj[i], refs));
+ } else if (typeof obj[i] !== 'undefined') {
+ compacted.push(obj[i]);
+ }
+ }
+
+ return compacted;
+ }
+
+ var keys = Object.keys(obj);
+ for (var j = 0; j < keys.length; ++j) {
+ var key = keys[j];
+ obj[key] = exports.compact(obj[key], refs);
+ }
+
+ return obj;
+};
+
+exports.isRegExp = function (obj) {
+ return Object.prototype.toString.call(obj) === '[object RegExp]';
+};
+
+exports.isBuffer = function (obj) {
+ if (obj === null || typeof obj === 'undefined') {
+ return false;
+ }
+
+ return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/package.json
new file mode 100644
index 0000000..265c172
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/package.json
@@ -0,0 +1,86 @@
+{
+ "name": "qs",
+ "description": "A querystring parser that supports nesting and arrays, with a depth limit",
+ "homepage": "https://github.com/ljharb/qs",
+ "version": "6.2.0",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/ljharb/qs.git"
+ },
+ "main": "lib/index.js",
+ "contributors": [
+ {
+ "name": "Jordan Harband",
+ "email": "ljharb@gmail.com",
+ "url": "http://ljharb.codes"
+ }
+ ],
+ "keywords": [
+ "querystring",
+ "qs"
+ ],
+ "engines": {
+ "node": ">=0.6"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "browserify": "^13.0.1",
+ "tape": "^4.5.1",
+ "covert": "^1.1.0",
+ "mkdirp": "^0.5.1",
+ "eslint": "^2.9.0",
+ "@ljharb/eslint-config": "^4.0.0",
+ "parallelshell": "^2.0.0",
+ "iconv-lite": "^0.4.13",
+ "evalmd": "^0.0.17"
+ },
+ "scripts": {
+ "pretest": "parallelshell 'npm run --silent readme' 'npm run --silent lint'",
+ "test": "npm run --silent coverage",
+ "tests-only": "node test",
+ "readme": "evalmd README.md",
+ "lint": "eslint lib/*.js text/*.js",
+ "coverage": "covert test",
+ "dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js",
+ "prepublish": "npm run dist"
+ },
+ "license": "BSD-3-Clause",
+ "gitHead": "d67d315b606c6bb809fedcbeebbbdb7f863852aa",
+ "bugs": {
+ "url": "https://github.com/ljharb/qs/issues"
+ },
+ "_id": "qs@6.2.0",
+ "_shasum": "3b7848c03c2dece69a9522b0fae8c4126d745f3b",
+ "_from": "qs@6.2.0",
+ "_npmVersion": "3.8.6",
+ "_nodeVersion": "6.1.0",
+ "_npmUser": {
+ "name": "ljharb",
+ "email": "ljharb@gmail.com"
+ },
+ "dist": {
+ "shasum": "3b7848c03c2dece69a9522b0fae8c4126d745f3b",
+ "tarball": "https://registry.npmjs.org/qs/-/qs-6.2.0.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "hueniverse",
+ "email": "eran@hammer.io"
+ },
+ {
+ "name": "ljharb",
+ "email": "ljharb@gmail.com"
+ },
+ {
+ "name": "nlf",
+ "email": "quitlahok@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/qs-6.2.0.tgz_1462749349998_0.03372702235355973"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/qs/-/qs-6.2.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/test/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/test/index.js
new file mode 100644
index 0000000..b6a7d95
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/test/index.js
@@ -0,0 +1,5 @@
+require('./parse');
+
+require('./stringify');
+
+require('./utils');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/test/parse.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/test/parse.js
new file mode 100644
index 0000000..1b79daf
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/test/parse.js
@@ -0,0 +1,423 @@
+'use strict';
+
+var test = require('tape');
+var qs = require('../');
+var iconv = require('iconv-lite');
+
+test('parse()', function (t) {
+ t.test('parses a simple string', function (st) {
+ st.deepEqual(qs.parse('0=foo'), { '0': 'foo' });
+ st.deepEqual(qs.parse('foo=c++'), { foo: 'c ' });
+ st.deepEqual(qs.parse('a[>=]=23'), { a: { '>=': '23' } });
+ st.deepEqual(qs.parse('a[<=>]==23'), { a: { '<=>': '=23' } });
+ st.deepEqual(qs.parse('a[==]=23'), { a: { '==': '23' } });
+ st.deepEqual(qs.parse('foo', { strictNullHandling: true }), { foo: null });
+ st.deepEqual(qs.parse('foo'), { foo: '' });
+ st.deepEqual(qs.parse('foo='), { foo: '' });
+ st.deepEqual(qs.parse('foo=bar'), { foo: 'bar' });
+ st.deepEqual(qs.parse(' foo = bar = baz '), { ' foo ': ' bar = baz ' });
+ st.deepEqual(qs.parse('foo=bar=baz'), { foo: 'bar=baz' });
+ st.deepEqual(qs.parse('foo=bar&bar=baz'), { foo: 'bar', bar: 'baz' });
+ st.deepEqual(qs.parse('foo2=bar2&baz2='), { foo2: 'bar2', baz2: '' });
+ st.deepEqual(qs.parse('foo=bar&baz', { strictNullHandling: true }), { foo: 'bar', baz: null });
+ st.deepEqual(qs.parse('foo=bar&baz'), { foo: 'bar', baz: '' });
+ st.deepEqual(qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World'), {
+ cht: 'p3',
+ chd: 't:60,40',
+ chs: '250x100',
+ chl: 'Hello|World'
+ });
+ st.end();
+ });
+
+ t.test('allows enabling dot notation', function (st) {
+ st.deepEqual(qs.parse('a.b=c'), { 'a.b': 'c' });
+ st.deepEqual(qs.parse('a.b=c', { allowDots: true }), { a: { b: 'c' } });
+ st.end();
+ });
+
+ t.deepEqual(qs.parse('a[b]=c'), { a: { b: 'c' } }, 'parses a single nested string');
+ t.deepEqual(qs.parse('a[b][c]=d'), { a: { b: { c: 'd' } } }, 'parses a double nested string');
+ t.deepEqual(
+ qs.parse('a[b][c][d][e][f][g][h]=i'),
+ { a: { b: { c: { d: { e: { f: { '[g][h]': 'i' } } } } } } },
+ 'defaults to a depth of 5'
+ );
+
+ t.test('only parses one level when depth = 1', function (st) {
+ st.deepEqual(qs.parse('a[b][c]=d', { depth: 1 }), { a: { b: { '[c]': 'd' } } });
+ st.deepEqual(qs.parse('a[b][c][d]=e', { depth: 1 }), { a: { b: { '[c][d]': 'e' } } });
+ st.end();
+ });
+
+ t.deepEqual(qs.parse('a=b&a=c'), { a: ['b', 'c'] }, 'parses a simple array');
+
+ t.test('parses an explicit array', function (st) {
+ st.deepEqual(qs.parse('a[]=b'), { a: ['b'] });
+ st.deepEqual(qs.parse('a[]=b&a[]=c'), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a[]=b&a[]=c&a[]=d'), { a: ['b', 'c', 'd'] });
+ st.end();
+ });
+
+ t.test('parses a mix of simple and explicit arrays', function (st) {
+ st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a[0]=b&a=c'), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a=b&a[0]=c'), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a[1]=b&a=c'), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a=b&a[1]=c'), { a: ['b', 'c'] });
+ st.end();
+ });
+
+ t.test('parses a nested array', function (st) {
+ st.deepEqual(qs.parse('a[b][]=c&a[b][]=d'), { a: { b: ['c', 'd'] } });
+ st.deepEqual(qs.parse('a[>=]=25'), { a: { '>=': '25' } });
+ st.end();
+ });
+
+ t.test('allows to specify array indices', function (st) {
+ st.deepEqual(qs.parse('a[1]=c&a[0]=b&a[2]=d'), { a: ['b', 'c', 'd'] });
+ st.deepEqual(qs.parse('a[1]=c&a[0]=b'), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a[1]=c'), { a: ['c'] });
+ st.end();
+ });
+
+ t.test('limits specific array indices to 20', function (st) {
+ st.deepEqual(qs.parse('a[20]=a'), { a: ['a'] });
+ st.deepEqual(qs.parse('a[21]=a'), { a: { '21': 'a' } });
+ st.end();
+ });
+
+ t.deepEqual(qs.parse('a[12b]=c'), { a: { '12b': 'c' } }, 'supports keys that begin with a number');
+
+ t.test('supports encoded = signs', function (st) {
+ st.deepEqual(qs.parse('he%3Dllo=th%3Dere'), { 'he=llo': 'th=ere' });
+ st.end();
+ });
+
+ t.test('is ok with url encoded strings', function (st) {
+ st.deepEqual(qs.parse('a[b%20c]=d'), { a: { 'b c': 'd' } });
+ st.deepEqual(qs.parse('a[b]=c%20d'), { a: { b: 'c d' } });
+ st.end();
+ });
+
+ t.test('allows brackets in the value', function (st) {
+ st.deepEqual(qs.parse('pets=["tobi"]'), { pets: '["tobi"]' });
+ st.deepEqual(qs.parse('operators=[">=", "<="]'), { operators: '[">=", "<="]' });
+ st.end();
+ });
+
+ t.test('allows empty values', function (st) {
+ st.deepEqual(qs.parse(''), {});
+ st.deepEqual(qs.parse(null), {});
+ st.deepEqual(qs.parse(undefined), {});
+ st.end();
+ });
+
+ t.test('transforms arrays to objects', function (st) {
+ st.deepEqual(qs.parse('foo[0]=bar&foo[bad]=baz'), { foo: { '0': 'bar', bad: 'baz' } });
+ st.deepEqual(qs.parse('foo[bad]=baz&foo[0]=bar'), { foo: { bad: 'baz', '0': 'bar' } });
+ st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar'), { foo: { bad: 'baz', '0': 'bar' } });
+ st.deepEqual(qs.parse('foo[]=bar&foo[bad]=baz'), { foo: { '0': 'bar', bad: 'baz' } });
+ st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo'), { foo: { bad: 'baz', '0': 'bar', '1': 'foo' } });
+ st.deepEqual(qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb'), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] });
+ st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c'), { a: { '0': 'b', t: 'u', c: true } });
+ st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y'), { a: { '0': 'b', '1': 'c', x: 'y' } });
+ st.end();
+ });
+
+ t.test('transforms arrays to objects (dot notation)', function (st) {
+ st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: 'baz' } });
+ st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad.boo=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: { boo: 'baz' } } });
+ st.deepEqual(qs.parse('foo[0][0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [[{ baz: 'bar' }]], fool: { bad: 'baz' } });
+ st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15'], bar: '2' }] });
+ st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].baz[1]=16&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15', '16'], bar: '2' }] });
+ st.deepEqual(qs.parse('foo.bad=baz&foo[0]=bar', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar' } });
+ st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar' } });
+ st.deepEqual(qs.parse('foo[]=bar&foo.bad=baz', { allowDots: true }), { foo: { '0': 'bar', bad: 'baz' } });
+ st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar&foo[]=foo', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar', '1': 'foo' } });
+ st.deepEqual(qs.parse('foo[0].a=a&foo[0].b=b&foo[1].a=aa&foo[1].b=bb', { allowDots: true }), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] });
+ st.end();
+ });
+
+ t.deepEqual(qs.parse('a[b]=c&a=d'), { a: { b: 'c', d: true } }, 'can add keys to objects');
+
+ t.test('correctly prunes undefined values when converting an array to an object', function (st) {
+ st.deepEqual(qs.parse('a[2]=b&a[99999999]=c'), { a: { '2': 'b', '99999999': 'c' } });
+ st.end();
+ });
+
+ t.test('supports malformed uri characters', function (st) {
+ st.deepEqual(qs.parse('{%:%}', { strictNullHandling: true }), { '{%:%}': null });
+ st.deepEqual(qs.parse('{%:%}='), { '{%:%}': '' });
+ st.deepEqual(qs.parse('foo=%:%}'), { foo: '%:%}' });
+ st.end();
+ });
+
+ t.test('doesn\'t produce empty keys', function (st) {
+ st.deepEqual(qs.parse('_r=1&'), { '_r': '1' });
+ st.end();
+ });
+
+ t.test('cannot access Object prototype', function (st) {
+ qs.parse('constructor[prototype][bad]=bad');
+ qs.parse('bad[constructor][prototype][bad]=bad');
+ st.equal(typeof Object.prototype.bad, 'undefined');
+ st.end();
+ });
+
+ t.test('parses arrays of objects', function (st) {
+ st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] });
+ st.deepEqual(qs.parse('a[0][b]=c'), { a: [{ b: 'c' }] });
+ st.end();
+ });
+
+ t.test('allows for empty strings in arrays', function (st) {
+ st.deepEqual(qs.parse('a[]=b&a[]=&a[]=c'), { a: ['b', '', 'c'] });
+ st.deepEqual(qs.parse('a[0]=b&a[1]&a[2]=c&a[19]=', { strictNullHandling: true }), { a: ['b', null, 'c', ''] });
+ st.deepEqual(qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]', { strictNullHandling: true }), { a: ['b', '', 'c', null] });
+ st.deepEqual(qs.parse('a[]=&a[]=b&a[]=c'), { a: ['', 'b', 'c'] });
+ st.end();
+ });
+
+ t.test('compacts sparse arrays', function (st) {
+ st.deepEqual(qs.parse('a[10]=1&a[2]=2'), { a: ['2', '1'] });
+ st.deepEqual(qs.parse('a[1][b][2][c]=1'), { a: [{ b: [{ c: '1' }] }] });
+ st.deepEqual(qs.parse('a[1][2][3][c]=1'), { a: [[[{ c: '1' }]]] });
+ st.deepEqual(qs.parse('a[1][2][3][c][1]=1'), { a: [[[{ c: ['1'] }]]] });
+ st.end();
+ });
+
+ t.test('parses semi-parsed strings', function (st) {
+ st.deepEqual(qs.parse({ 'a[b]': 'c' }), { a: { b: 'c' } });
+ st.deepEqual(qs.parse({ 'a[b]': 'c', 'a[d]': 'e' }), { a: { b: 'c', d: 'e' } });
+ st.end();
+ });
+
+ t.test('parses buffers correctly', function (st) {
+ var b = new Buffer('test');
+ st.deepEqual(qs.parse({ a: b }), { a: b });
+ st.end();
+ });
+
+ t.test('continues parsing when no parent is found', function (st) {
+ st.deepEqual(qs.parse('[]=&a=b'), { '0': '', a: 'b' });
+ st.deepEqual(qs.parse('[]&a=b', { strictNullHandling: true }), { '0': null, a: 'b' });
+ st.deepEqual(qs.parse('[foo]=bar'), { foo: 'bar' });
+ st.end();
+ });
+
+ t.test('does not error when parsing a very long array', function (st) {
+ var str = 'a[]=a';
+ while (Buffer.byteLength(str) < 128 * 1024) {
+ str = str + '&' + str;
+ }
+
+ st.doesNotThrow(function () { qs.parse(str); });
+
+ st.end();
+ });
+
+ t.test('should not throw when a native prototype has an enumerable property', { parallel: false }, function (st) {
+ Object.prototype.crash = '';
+ Array.prototype.crash = '';
+ st.doesNotThrow(qs.parse.bind(null, 'a=b'));
+ st.deepEqual(qs.parse('a=b'), { a: 'b' });
+ st.doesNotThrow(qs.parse.bind(null, 'a[][b]=c'));
+ st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] });
+ delete Object.prototype.crash;
+ delete Array.prototype.crash;
+ st.end();
+ });
+
+ t.test('parses a string with an alternative string delimiter', function (st) {
+ st.deepEqual(qs.parse('a=b;c=d', { delimiter: ';' }), { a: 'b', c: 'd' });
+ st.end();
+ });
+
+ t.test('parses a string with an alternative RegExp delimiter', function (st) {
+ st.deepEqual(qs.parse('a=b; c=d', { delimiter: /[;,] */ }), { a: 'b', c: 'd' });
+ st.end();
+ });
+
+ t.test('does not use non-splittable objects as delimiters', function (st) {
+ st.deepEqual(qs.parse('a=b&c=d', { delimiter: true }), { a: 'b', c: 'd' });
+ st.end();
+ });
+
+ t.test('allows overriding parameter limit', function (st) {
+ st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: 1 }), { a: 'b' });
+ st.end();
+ });
+
+ t.test('allows setting the parameter limit to Infinity', function (st) {
+ st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: Infinity }), { a: 'b', c: 'd' });
+ st.end();
+ });
+
+ t.test('allows overriding array limit', function (st) {
+ st.deepEqual(qs.parse('a[0]=b', { arrayLimit: -1 }), { a: { '0': 'b' } });
+ st.deepEqual(qs.parse('a[-1]=b', { arrayLimit: -1 }), { a: { '-1': 'b' } });
+ st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 }), { a: { '0': 'b', '1': 'c' } });
+ st.end();
+ });
+
+ t.test('allows disabling array parsing', function (st) {
+ st.deepEqual(qs.parse('a[0]=b&a[1]=c', { parseArrays: false }), { a: { '0': 'b', '1': 'c' } });
+ st.end();
+ });
+
+ t.test('parses an object', function (st) {
+ var input = {
+ 'user[name]': { 'pop[bob]': 3 },
+ 'user[email]': null
+ };
+
+ var expected = {
+ user: {
+ name: { 'pop[bob]': 3 },
+ email: null
+ }
+ };
+
+ var result = qs.parse(input);
+
+ st.deepEqual(result, expected);
+ st.end();
+ });
+
+ t.test('parses an object in dot notation', function (st) {
+ var input = {
+ 'user.name': { 'pop[bob]': 3 },
+ 'user.email.': null
+ };
+
+ var expected = {
+ user: {
+ name: { 'pop[bob]': 3 },
+ email: null
+ }
+ };
+
+ var result = qs.parse(input, { allowDots: true });
+
+ st.deepEqual(result, expected);
+ st.end();
+ });
+
+ t.test('parses an object and not child values', function (st) {
+ var input = {
+ 'user[name]': { 'pop[bob]': { 'test': 3 } },
+ 'user[email]': null
+ };
+
+ var expected = {
+ user: {
+ name: { 'pop[bob]': { 'test': 3 } },
+ email: null
+ }
+ };
+
+ var result = qs.parse(input);
+
+ st.deepEqual(result, expected);
+ st.end();
+ });
+
+ t.test('does not blow up when Buffer global is missing', function (st) {
+ var tempBuffer = global.Buffer;
+ delete global.Buffer;
+ var result = qs.parse('a=b&c=d');
+ global.Buffer = tempBuffer;
+ st.deepEqual(result, { a: 'b', c: 'd' });
+ st.end();
+ });
+
+ t.test('does not crash when parsing circular references', function (st) {
+ var a = {};
+ a.b = a;
+
+ var parsed;
+
+ st.doesNotThrow(function () {
+ parsed = qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a });
+ });
+
+ st.equal('foo' in parsed, true, 'parsed has "foo" property');
+ st.equal('bar' in parsed.foo, true);
+ st.equal('baz' in parsed.foo, true);
+ st.equal(parsed.foo.bar, 'baz');
+ st.deepEqual(parsed.foo.baz, a);
+ st.end();
+ });
+
+ t.test('parses plain objects correctly', function (st) {
+ var a = Object.create(null);
+ a.b = 'c';
+
+ st.deepEqual(qs.parse(a), { b: 'c' });
+ var result = qs.parse({ a: a });
+ st.equal('a' in result, true, 'result has "a" property');
+ st.deepEqual(result.a, a);
+ st.end();
+ });
+
+ t.test('parses dates correctly', function (st) {
+ var now = new Date();
+ st.deepEqual(qs.parse({ a: now }), { a: now });
+ st.end();
+ });
+
+ t.test('parses regular expressions correctly', function (st) {
+ var re = /^test$/;
+ st.deepEqual(qs.parse({ a: re }), { a: re });
+ st.end();
+ });
+
+ t.test('can allow overwriting prototype properties', function (st) {
+ st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }), { a: { hasOwnProperty: 'b' } }, { prototype: false });
+ st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: true }), { hasOwnProperty: 'b' }, { prototype: false });
+ st.end();
+ });
+
+ t.test('can return plain objects', function (st) {
+ var expected = Object.create(null);
+ expected.a = Object.create(null);
+ expected.a.b = 'c';
+ expected.a.hasOwnProperty = 'd';
+ st.deepEqual(qs.parse('a[b]=c&a[hasOwnProperty]=d', { plainObjects: true }), expected);
+ st.deepEqual(qs.parse(null, { plainObjects: true }), Object.create(null));
+ var expectedArray = Object.create(null);
+ expectedArray.a = Object.create(null);
+ expectedArray.a['0'] = 'b';
+ expectedArray.a.c = 'd';
+ st.deepEqual(qs.parse('a[]=b&a[c]=d', { plainObjects: true }), expectedArray);
+ st.end();
+ });
+
+ t.test('can parse with custom encoding', function (st) {
+ st.deepEqual(qs.parse('%8c%a7=%91%e5%8d%e3%95%7b', {
+ decoder: function (str) {
+ var reg = /\%([0-9A-F]{2})/ig;
+ var result = [];
+ var parts;
+ var last = 0;
+ while (parts = reg.exec(str)) {
+ result.push(parseInt(parts[1], 16));
+ last = parts.index + parts[0].length;
+ }
+ return iconv.decode(new Buffer(result), 'shift_jis').toString();
+ }
+ }), { 県: '大阪府' });
+ st.end();
+ });
+
+ t.test('throws error with wrong decoder', function (st) {
+ st.throws(function () {
+ qs.parse({}, {
+ decoder: 'string'
+ });
+ }, new TypeError('Decoder has to be a function.'));
+ st.end();
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/test/stringify.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/test/stringify.js
new file mode 100644
index 0000000..699397e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/test/stringify.js
@@ -0,0 +1,305 @@
+'use strict';
+
+var test = require('tape');
+var qs = require('../');
+var iconv = require('iconv-lite');
+
+test('stringify()', function (t) {
+ t.test('stringifies a querystring object', function (st) {
+ st.equal(qs.stringify({ a: 'b' }), 'a=b');
+ st.equal(qs.stringify({ a: 1 }), 'a=1');
+ st.equal(qs.stringify({ a: 1, b: 2 }), 'a=1&b=2');
+ st.equal(qs.stringify({ a: 'A_Z' }), 'a=A_Z');
+ st.equal(qs.stringify({ a: '€' }), 'a=%E2%82%AC');
+ st.equal(qs.stringify({ a: '' }), 'a=%EE%80%80');
+ st.equal(qs.stringify({ a: '×' }), 'a=%D7%90');
+ st.equal(qs.stringify({ a: 'ð·' }), 'a=%F0%90%90%B7');
+ st.end();
+ });
+
+ t.test('stringifies a nested object', function (st) {
+ st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c');
+ st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }), 'a%5Bb%5D%5Bc%5D%5Bd%5D=e');
+ st.end();
+ });
+
+ t.test('stringifies a nested object with dots notation', function (st) {
+ st.equal(qs.stringify({ a: { b: 'c' } }, { allowDots: true }), 'a.b=c');
+ st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }, { allowDots: true }), 'a.b.c.d=e');
+ st.end();
+ });
+
+ t.test('stringifies an array value', function (st) {
+ st.equal(qs.stringify({ a: ['b', 'c', 'd'] }), 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d');
+ st.end();
+ });
+
+ t.test('omits nulls when asked', function (st) {
+ st.equal(qs.stringify({ a: 'b', c: null }, { skipNulls: true }), 'a=b');
+ st.end();
+ });
+
+
+ t.test('omits nested nulls when asked', function (st) {
+ st.equal(qs.stringify({ a: { b: 'c', d: null } }, { skipNulls: true }), 'a%5Bb%5D=c');
+ st.end();
+ });
+
+ t.test('omits array indices when asked', function (st) {
+ st.equal(qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }), 'a=b&a=c&a=d');
+ st.end();
+ });
+
+ t.test('stringifies a nested array value', function (st) {
+ st.equal(qs.stringify({ a: { b: ['c', 'd'] } }), 'a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d');
+ st.end();
+ });
+
+ t.test('stringifies a nested array value with dots notation', function (st) {
+ st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { allowDots: true, encode: false }), 'a.b[0]=c&a.b[1]=d');
+ st.end();
+ });
+
+ t.test('stringifies an object inside an array', function (st) {
+ st.equal(qs.stringify({ a: [{ b: 'c' }] }), 'a%5B0%5D%5Bb%5D=c');
+ st.equal(qs.stringify({ a: [{ b: { c: [1] } }] }), 'a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1');
+ st.end();
+ });
+
+ t.test('stringifies an array with mixed objects and primitives', function (st) {
+ st.equal(qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false }), 'a[0][b]=1&a[1]=2&a[2]=3');
+ st.end();
+ });
+
+ t.test('stringifies an object inside an array with dots notation', function (st) {
+ st.equal(qs.stringify({ a: [{ b: 'c' }] }, { allowDots: true, encode: false }), 'a[0].b=c');
+ st.equal(qs.stringify({ a: [{ b: { c: [1] } }] }, { allowDots: true, encode: false }), 'a[0].b.c[0]=1');
+ st.end();
+ });
+
+ t.test('does not omit object keys when indices = false', function (st) {
+ st.equal(qs.stringify({ a: [{ b: 'c' }] }, { indices: false }), 'a%5Bb%5D=c');
+ st.end();
+ });
+
+ t.test('uses indices notation for arrays when indices=true', function (st) {
+ st.equal(qs.stringify({ a: ['b', 'c'] }, { indices: true }), 'a%5B0%5D=b&a%5B1%5D=c');
+ st.end();
+ });
+
+ t.test('uses indices notation for arrays when no arrayFormat is specified', function (st) {
+ st.equal(qs.stringify({ a: ['b', 'c'] }), 'a%5B0%5D=b&a%5B1%5D=c');
+ st.end();
+ });
+
+ t.test('uses indices notation for arrays when no arrayFormat=indices', function (st) {
+ st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }), 'a%5B0%5D=b&a%5B1%5D=c');
+ st.end();
+ });
+
+ t.test('uses repeat notation for arrays when no arrayFormat=repeat', function (st) {
+ st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }), 'a=b&a=c');
+ st.end();
+ });
+
+ t.test('uses brackets notation for arrays when no arrayFormat=brackets', function (st) {
+ st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }), 'a%5B%5D=b&a%5B%5D=c');
+ st.end();
+ });
+
+ t.test('stringifies a complicated object', function (st) {
+ st.equal(qs.stringify({ a: { b: 'c', d: 'e' } }), 'a%5Bb%5D=c&a%5Bd%5D=e');
+ st.end();
+ });
+
+ t.test('stringifies an empty value', function (st) {
+ st.equal(qs.stringify({ a: '' }), 'a=');
+ st.equal(qs.stringify({ a: null }, { strictNullHandling: true }), 'a');
+
+ st.equal(qs.stringify({ a: '', b: '' }), 'a=&b=');
+ st.equal(qs.stringify({ a: null, b: '' }, { strictNullHandling: true }), 'a&b=');
+
+ st.equal(qs.stringify({ a: { b: '' } }), 'a%5Bb%5D=');
+ st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: true }), 'a%5Bb%5D');
+ st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: false }), 'a%5Bb%5D=');
+
+ st.end();
+ });
+
+ t.test('stringifies an empty object', function (st) {
+ var obj = Object.create(null);
+ obj.a = 'b';
+ st.equal(qs.stringify(obj), 'a=b');
+ st.end();
+ });
+
+ t.test('returns an empty string for invalid input', function (st) {
+ st.equal(qs.stringify(undefined), '');
+ st.equal(qs.stringify(false), '');
+ st.equal(qs.stringify(null), '');
+ st.equal(qs.stringify(''), '');
+ st.end();
+ });
+
+ t.test('stringifies an object with an empty object as a child', function (st) {
+ var obj = {
+ a: Object.create(null)
+ };
+
+ obj.a.b = 'c';
+ st.equal(qs.stringify(obj), 'a%5Bb%5D=c');
+ st.end();
+ });
+
+ t.test('drops keys with a value of undefined', function (st) {
+ st.equal(qs.stringify({ a: undefined }), '');
+
+ st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: true }), 'a%5Bc%5D');
+ st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: false }), 'a%5Bc%5D=');
+ st.equal(qs.stringify({ a: { b: undefined, c: '' } }), 'a%5Bc%5D=');
+ st.end();
+ });
+
+ t.test('url encodes values', function (st) {
+ st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c');
+ st.end();
+ });
+
+ t.test('stringifies a date', function (st) {
+ var now = new Date();
+ var str = 'a=' + encodeURIComponent(now.toISOString());
+ st.equal(qs.stringify({ a: now }), str);
+ st.end();
+ });
+
+ t.test('stringifies the weird object from qs', function (st) {
+ st.equal(qs.stringify({ 'my weird field': '~q1!2"\'w$5&7/z8)?' }), 'my%20weird%20field=~q1%212%22%27w%245%267%2Fz8%29%3F');
+ st.end();
+ });
+
+ t.test('skips properties that are part of the object prototype', function (st) {
+ Object.prototype.crash = 'test';
+ st.equal(qs.stringify({ a: 'b' }), 'a=b');
+ st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c');
+ delete Object.prototype.crash;
+ st.end();
+ });
+
+ t.test('stringifies boolean values', function (st) {
+ st.equal(qs.stringify({ a: true }), 'a=true');
+ st.equal(qs.stringify({ a: { b: true } }), 'a%5Bb%5D=true');
+ st.equal(qs.stringify({ b: false }), 'b=false');
+ st.equal(qs.stringify({ b: { c: false } }), 'b%5Bc%5D=false');
+ st.end();
+ });
+
+ t.test('stringifies buffer values', function (st) {
+ st.equal(qs.stringify({ a: new Buffer('test') }), 'a=test');
+ st.equal(qs.stringify({ a: { b: new Buffer('test') } }), 'a%5Bb%5D=test');
+ st.end();
+ });
+
+ t.test('stringifies an object using an alternative delimiter', function (st) {
+ st.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d');
+ st.end();
+ });
+
+ t.test('doesn\'t blow up when Buffer global is missing', function (st) {
+ var tempBuffer = global.Buffer;
+ delete global.Buffer;
+ var result = qs.stringify({ a: 'b', c: 'd' });
+ global.Buffer = tempBuffer;
+ st.equal(result, 'a=b&c=d');
+ st.end();
+ });
+
+ t.test('selects properties when filter=array', function (st) {
+ st.equal(qs.stringify({ a: 'b' }, { filter: ['a'] }), 'a=b');
+ st.equal(qs.stringify({ a: 1 }, { filter: [] }), '');
+ st.equal(qs.stringify({ a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, { filter: ['a', 'b', 0, 2] }), 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3');
+ st.end();
+ });
+
+ t.test('supports custom representations when filter=function', function (st) {
+ var calls = 0;
+ var obj = { a: 'b', c: 'd', e: { f: new Date(1257894000000) } };
+ var filterFunc = function (prefix, value) {
+ calls++;
+ if (calls === 1) {
+ st.equal(prefix, '', 'prefix is empty');
+ st.equal(value, obj);
+ } else if (prefix === 'c') {
+ return;
+ } else if (value instanceof Date) {
+ st.equal(prefix, 'e[f]');
+ return value.getTime();
+ }
+ return value;
+ };
+
+ st.equal(qs.stringify(obj, { filter: filterFunc }), 'a=b&e%5Bf%5D=1257894000000');
+ st.equal(calls, 5);
+ st.end();
+ });
+
+ t.test('can disable uri encoding', function (st) {
+ st.equal(qs.stringify({ a: 'b' }, { encode: false }), 'a=b');
+ st.equal(qs.stringify({ a: { b: 'c' } }, { encode: false }), 'a[b]=c');
+ st.equal(qs.stringify({ a: 'b', c: null }, { strictNullHandling: true, encode: false }), 'a=b&c');
+ st.end();
+ });
+
+ t.test('can sort the keys', function (st) {
+ var sort = function (a, b) { return a.localeCompare(b); };
+ st.equal(qs.stringify({ a: 'c', z: 'y', b: 'f' }, { sort: sort }), 'a=c&b=f&z=y');
+ st.equal(qs.stringify({ a: 'c', z: { j: 'a', i: 'b' }, b: 'f' }, { sort: sort }), 'a=c&b=f&z%5Bi%5D=b&z%5Bj%5D=a');
+ st.end();
+ });
+
+ t.test('can sort the keys at depth 3 or more too', function (st) {
+ var sort = function (a, b) { return a.localeCompare(b); };
+ st.equal(qs.stringify({ a: 'a', z: { zj: {zjb: 'zjb', zja: 'zja'}, zi: {zib: 'zib', zia: 'zia'} }, b: 'b' }, { sort: sort, encode: false }), 'a=a&b=b&z[zi][zia]=zia&z[zi][zib]=zib&z[zj][zja]=zja&z[zj][zjb]=zjb');
+ st.equal(qs.stringify({ a: 'a', z: { zj: {zjb: 'zjb', zja: 'zja'}, zi: {zib: 'zib', zia: 'zia'} }, b: 'b' }, { sort: null, encode: false }), 'a=a&z[zj][zjb]=zjb&z[zj][zja]=zja&z[zi][zib]=zib&z[zi][zia]=zia&b=b');
+ st.end();
+ });
+
+ t.test('can stringify with custom encoding', function (st) {
+ st.equal(qs.stringify({ 県: '大阪府', '': ''}, {
+ encoder: function (str) {
+ if (str.length === 0) {
+ return '';
+ }
+ var buf = iconv.encode(str, 'shiftjis');
+ var result = [];
+ for (var i=0; i < buf.length; ++i) {
+ result.push(buf.readUInt8(i).toString(16));
+ }
+ return '%' + result.join('%');
+ }
+ }), '%8c%a7=%91%e5%8d%e3%95%7b&=');
+ st.end();
+ });
+
+ t.test('throws error with wrong encoder', function (st) {
+ st.throws(function () {
+ qs.stringify({}, {
+ encoder: 'string'
+ });
+ }, new TypeError('Encoder has to be a function.'));
+ st.end();
+ });
+
+ t.test('can use custom encoder for a buffer object', {
+ skip: typeof Buffer === 'undefined'
+ }, function (st) {
+ st.equal(qs.stringify({ a: new Buffer([1]) }, {
+ encoder: function (buffer) {
+ if (typeof buffer === 'string') {
+ return buffer;
+ }
+ return String.fromCharCode(buffer.readUInt8(0) + 97);
+ }
+ }), 'a=b');
+ st.end();
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/test/utils.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/test/utils.js
new file mode 100644
index 0000000..4a8d824
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/qs/test/utils.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var test = require('tape');
+var utils = require('../lib/utils');
+
+test('merge()', function (t) {
+ t.deepEqual(utils.merge({ a: 'b' }, { a: 'c' }), { a: ['b', 'c'] }, 'merges two objects with the same key');
+ t.end();
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/HISTORY.md
new file mode 100644
index 0000000..720c860
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/HISTORY.md
@@ -0,0 +1,209 @@
+2.1.7 / 2016-06-19
+==================
+
+ * deps: bytes@2.4.0
+ * perf: remove double-cleanup on happy path
+
+2.1.6 / 2016-03-07
+==================
+
+ * deps: bytes@2.3.0
+ - Drop partial bytes on all parsed units
+ - Fix parsing byte string that looks like hex
+
+2.1.5 / 2015-11-30
+==================
+
+ * deps: bytes@2.2.0
+ * deps: iconv-lite@0.4.13
+
+2.1.4 / 2015-09-27
+==================
+
+ * Fix masking critical errors from `iconv-lite`
+ * deps: iconv-lite@0.4.12
+ - Fix CESU-8 decoding in Node.js 4.x
+
+2.1.3 / 2015-09-12
+==================
+
+ * Fix sync callback when attaching data listener causes sync read
+ - Node.js 0.10 compatibility issue
+
+2.1.2 / 2015-07-05
+==================
+
+ * Fix error stack traces to skip `makeError`
+ * deps: iconv-lite@0.4.11
+ - Add encoding CESU-8
+
+2.1.1 / 2015-06-14
+==================
+
+ * Use `unpipe` module for unpiping requests
+
+2.1.0 / 2015-05-28
+==================
+
+ * deps: iconv-lite@0.4.10
+ - Improved UTF-16 endianness detection
+ - Leading BOM is now removed when decoding
+ - The encoding UTF-16 without BOM now defaults to UTF-16LE when detection fails
+
+2.0.2 / 2015-05-21
+==================
+
+ * deps: bytes@2.1.0
+ - Slight optimizations
+
+2.0.1 / 2015-05-10
+==================
+
+ * Fix a false-positive when unpiping in Node.js 0.8
+
+2.0.0 / 2015-05-08
+==================
+
+ * Return a promise without callback instead of thunk
+ * deps: bytes@2.0.1
+ - units no longer case sensitive when parsing
+
+1.3.4 / 2015-04-15
+==================
+
+ * Fix hanging callback if request aborts during read
+ * deps: iconv-lite@0.4.8
+ - Add encoding alias UNICODE-1-1-UTF-7
+
+1.3.3 / 2015-02-08
+==================
+
+ * deps: iconv-lite@0.4.7
+ - Gracefully support enumerables on `Object.prototype`
+
+1.3.2 / 2015-01-20
+==================
+
+ * deps: iconv-lite@0.4.6
+ - Fix rare aliases of single-byte encodings
+
+1.3.1 / 2014-11-21
+==================
+
+ * deps: iconv-lite@0.4.5
+ - Fix Windows-31J and X-SJIS encoding support
+
+1.3.0 / 2014-07-20
+==================
+
+ * Fully unpipe the stream on error
+ - Fixes `Cannot switch to old mode now` error on Node.js 0.10+
+
+1.2.3 / 2014-07-20
+==================
+
+ * deps: iconv-lite@0.4.4
+ - Added encoding UTF-7
+
+1.2.2 / 2014-06-19
+==================
+
+ * Send invalid encoding error to callback
+
+1.2.1 / 2014-06-15
+==================
+
+ * deps: iconv-lite@0.4.3
+ - Added encodings UTF-16BE and UTF-16 with BOM
+
+1.2.0 / 2014-06-13
+==================
+
+ * Passing string as `options` interpreted as encoding
+ * Support all encodings from `iconv-lite`
+
+1.1.7 / 2014-06-12
+==================
+
+ * use `string_decoder` module from npm
+
+1.1.6 / 2014-05-27
+==================
+
+ * check encoding for old streams1
+ * support node.js < 0.10.6
+
+1.1.5 / 2014-05-14
+==================
+
+ * bump bytes
+
+1.1.4 / 2014-04-19
+==================
+
+ * allow true as an option
+ * bump bytes
+
+1.1.3 / 2014-03-02
+==================
+
+ * fix case when length=null
+
+1.1.2 / 2013-12-01
+==================
+
+ * be less strict on state.encoding check
+
+1.1.1 / 2013-11-27
+==================
+
+ * add engines
+
+1.1.0 / 2013-11-27
+==================
+
+ * add err.statusCode and err.type
+ * allow for encoding option to be true
+ * pause the stream instead of dumping on error
+ * throw if the stream's encoding is set
+
+1.0.1 / 2013-11-19
+==================
+
+ * dont support streams1, throw if dev set encoding
+
+1.0.0 / 2013-11-17
+==================
+
+ * rename `expected` option to `length`
+
+0.2.0 / 2013-11-15
+==================
+
+ * republish
+
+0.1.1 / 2013-11-15
+==================
+
+ * use bytes
+
+0.1.0 / 2013-11-11
+==================
+
+ * generator support
+
+0.0.3 / 2013-10-10
+==================
+
+ * update repo
+
+0.0.2 / 2013-09-14
+==================
+
+ * dump stream on bad headers
+ * listen to events after defining received and buffers
+
+0.0.1 / 2013-09-14
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/LICENSE
new file mode 100644
index 0000000..d695c8f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2013-2014 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/README.md
new file mode 100644
index 0000000..5799c82
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/README.md
@@ -0,0 +1,126 @@
+# raw-body
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build status][travis-image]][travis-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+
+Gets the entire buffer of a stream either as a `Buffer` or a string.
+Validates the stream's length against an expected length and maximum limit.
+Ideal for parsing request bodies.
+
+## API
+
+```js
+var getRawBody = require('raw-body')
+```
+
+### getRawBody(stream, [options], [callback])
+
+**Returns a promise if no callback specified and global `Promise` exists.**
+
+Options:
+
+- `length` - The length of the stream.
+ If the contents of the stream do not add up to this length,
+ an `400` error code is returned.
+- `limit` - The byte limit of the body.
+ If the body ends up being larger than this limit,
+ a `413` error code is returned.
+- `encoding` - The requested encoding.
+ By default, a `Buffer` instance will be returned.
+ Most likely, you want `utf8`.
+ You can use any type of encoding supported by [iconv-lite](https://www.npmjs.org/package/iconv-lite#readme).
+
+You can also pass a string in place of options to just specify the encoding.
+
+`callback(err, res)`:
+
+- `err` - the following attributes will be defined if applicable:
+
+ - `limit` - the limit in bytes
+ - `length` and `expected` - the expected length of the stream
+ - `received` - the received bytes
+ - `encoding` - the invalid encoding
+ - `status` and `statusCode` - the corresponding status code for the error
+ - `type` - either `entity.too.large`, `request.aborted`, `request.size.invalid`, `stream.encoding.set`, or `encoding.unsupported`
+
+- `res` - the result, either as a `String` if an encoding was set or a `Buffer` otherwise.
+
+If an error occurs, the stream will be paused, everything unpiped,
+and you are responsible for correctly disposing the stream.
+For HTTP requests, no handling is required if you send a response.
+For streams that use file descriptors, you should `stream.destroy()` or `stream.close()` to prevent leaks.
+
+## Examples
+
+### Simple Express example
+
+```js
+var getRawBody = require('raw-body')
+var typer = require('media-typer')
+
+app.use(function (req, res, next) {
+ getRawBody(req, {
+ length: req.headers['content-length'],
+ limit: '1mb',
+ encoding: typer.parse(req.headers['content-type']).parameters.charset
+ }, function (err, string) {
+ if (err) return next(err)
+ req.text = string
+ next()
+ })
+})
+```
+
+### Simple Koa example
+
+```js
+app.use(function* (next) {
+ var string = yield getRawBody(this.req, {
+ length: this.length,
+ limit: '1mb',
+ encoding: this.charset
+ })
+})
+```
+
+### Using as a promise
+
+To use this library as a promise, simply omit the `callback` and a promise is
+returned, provided that a global `Promise` is defined.
+
+```js
+var getRawBody = require('raw-body')
+var http = require('http')
+
+var server = http.createServer(function (req, res) {
+ getRawBody(req)
+ .then(function (buf) {
+ res.statusCode = 200
+ res.end(buf.length + ' bytes submitted')
+ })
+ .catch(function (err) {
+ res.statusCode = 500
+ res.end(err.message)
+ })
+})
+
+server.listen(3000)
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/raw-body.svg
+[npm-url]: https://npmjs.org/package/raw-body
+[node-version-image]: https://img.shields.io/node/v/raw-body.svg
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/stream-utils/raw-body/master.svg
+[travis-url]: https://travis-ci.org/stream-utils/raw-body
+[coveralls-image]: https://img.shields.io/coveralls/stream-utils/raw-body/master.svg
+[coveralls-url]: https://coveralls.io/r/stream-utils/raw-body?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/raw-body.svg
+[downloads-url]: https://npmjs.org/package/raw-body
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/index.js
new file mode 100644
index 0000000..57b9c11
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/index.js
@@ -0,0 +1,320 @@
+/*!
+ * raw-body
+ * Copyright(c) 2013-2014 Jonathan Ong
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var bytes = require('bytes')
+var iconv = require('iconv-lite')
+var unpipe = require('unpipe')
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = getRawBody
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var iconvEncodingMessageRegExp = /^Encoding not recognized: /
+
+/**
+ * Get the decoder for a given encoding.
+ *
+ * @param {string} encoding
+ * @private
+ */
+
+function getDecoder (encoding) {
+ if (!encoding) return null
+
+ try {
+ return iconv.getDecoder(encoding)
+ } catch (e) {
+ // error getting decoder
+ if (!iconvEncodingMessageRegExp.test(e.message)) throw e
+
+ // the encoding was not found
+ throw createError(415, 'specified encoding unsupported', 'encoding.unsupported', {
+ encoding: encoding
+ })
+ }
+}
+
+/**
+ * Get the raw body of a stream (typically HTTP).
+ *
+ * @param {object} stream
+ * @param {object|string|function} [options]
+ * @param {function} [callback]
+ * @public
+ */
+
+function getRawBody (stream, options, callback) {
+ var done = callback
+ var opts = options || {}
+
+ if (options === true || typeof options === 'string') {
+ // short cut for encoding
+ opts = {
+ encoding: options
+ }
+ }
+
+ if (typeof options === 'function') {
+ done = options
+ opts = {}
+ }
+
+ // validate callback is a function, if provided
+ if (done !== undefined && typeof done !== 'function') {
+ throw new TypeError('argument callback must be a function')
+ }
+
+ // require the callback without promises
+ if (!done && !global.Promise) {
+ throw new TypeError('argument callback is required')
+ }
+
+ // get encoding
+ var encoding = opts.encoding !== true
+ ? opts.encoding
+ : 'utf-8'
+
+ // convert the limit to an integer
+ var limit = bytes.parse(opts.limit)
+
+ // convert the expected length to an integer
+ var length = opts.length != null && !isNaN(opts.length)
+ ? parseInt(opts.length, 10)
+ : null
+
+ if (done) {
+ // classic callback style
+ return readStream(stream, encoding, length, limit, done)
+ }
+
+ return new Promise(function executor (resolve, reject) {
+ readStream(stream, encoding, length, limit, function onRead (err, buf) {
+ if (err) return reject(err)
+ resolve(buf)
+ })
+ })
+}
+
+/**
+ * Halt a stream.
+ *
+ * @param {Object} stream
+ * @private
+ */
+
+function halt (stream) {
+ // unpipe everything from the stream
+ unpipe(stream)
+
+ // pause stream
+ if (typeof stream.pause === 'function') {
+ stream.pause()
+ }
+}
+
+/**
+ * Make a serializable error object.
+ *
+ * To create serializable errors you must re-set message so
+ * that it is enumerable and you must re configure the type
+ * property so that is writable and enumerable.
+ *
+ * @param {number} status
+ * @param {string} message
+ * @param {string} type
+ * @param {object} props
+ * @private
+ */
+
+function createError (status, message, type, props) {
+ var error = new Error()
+
+ // capture stack trace
+ Error.captureStackTrace(error, createError)
+
+ // set free-form properties
+ for (var prop in props) {
+ error[prop] = props[prop]
+ }
+
+ // set message
+ error.message = message
+
+ // set status
+ error.status = status
+ error.statusCode = status
+
+ // set type
+ Object.defineProperty(error, 'type', {
+ value: type,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ })
+
+ return error
+}
+
+/**
+ * Read the data from the stream.
+ *
+ * @param {object} stream
+ * @param {string} encoding
+ * @param {number} length
+ * @param {number} limit
+ * @param {function} callback
+ * @public
+ */
+
+function readStream (stream, encoding, length, limit, callback) {
+ var complete = false
+ var sync = true
+
+ // check the length and limit options.
+ // note: we intentionally leave the stream paused,
+ // so users should handle the stream themselves.
+ if (limit !== null && length !== null && length > limit) {
+ return done(createError(413, 'request entity too large', 'entity.too.large', {
+ expected: length,
+ length: length,
+ limit: limit
+ }))
+ }
+
+ // streams1: assert request encoding is buffer.
+ // streams2+: assert the stream encoding is buffer.
+ // stream._decoder: streams1
+ // state.encoding: streams2
+ // state.decoder: streams2, specifically < 0.10.6
+ var state = stream._readableState
+ if (stream._decoder || (state && (state.encoding || state.decoder))) {
+ // developer error
+ return done(createError(500, 'stream encoding should not be set', 'stream.encoding.set'))
+ }
+
+ var received = 0
+ var decoder
+
+ try {
+ decoder = getDecoder(encoding)
+ } catch (err) {
+ return done(err)
+ }
+
+ var buffer = decoder
+ ? ''
+ : []
+
+ // attach listeners
+ stream.on('aborted', onAborted)
+ stream.on('close', cleanup)
+ stream.on('data', onData)
+ stream.on('end', onEnd)
+ stream.on('error', onEnd)
+
+ // mark sync section complete
+ sync = false
+
+ function done () {
+ var args = new Array(arguments.length)
+
+ // copy arguments
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i]
+ }
+
+ // mark complete
+ complete = true
+
+ if (sync) {
+ process.nextTick(invokeCallback)
+ } else {
+ invokeCallback()
+ }
+
+ function invokeCallback () {
+ cleanup()
+
+ if (args[0]) {
+ // halt the stream on error
+ halt(stream)
+ }
+
+ callback.apply(null, args)
+ }
+ }
+
+ function onAborted () {
+ if (complete) return
+
+ done(createError(400, 'request aborted', 'request.aborted', {
+ code: 'ECONNABORTED',
+ expected: length,
+ length: length,
+ received: received
+ }))
+ }
+
+ function onData (chunk) {
+ if (complete) return
+
+ received += chunk.length
+ decoder
+ ? buffer += decoder.write(chunk)
+ : buffer.push(chunk)
+
+ if (limit !== null && received > limit) {
+ done(createError(413, 'request entity too large', 'entity.too.large', {
+ limit: limit,
+ received: received
+ }))
+ }
+ }
+
+ function onEnd (err) {
+ if (complete) return
+ if (err) return done(err)
+
+ if (length !== null && received !== length) {
+ done(createError(400, 'request size did not match content length', 'request.size.invalid', {
+ expected: length,
+ length: length,
+ received: received
+ }))
+ } else {
+ var string = decoder
+ ? buffer + (decoder.end() || '')
+ : Buffer.concat(buffer)
+ done(null, string)
+ }
+ }
+
+ function cleanup () {
+ buffer = null
+
+ stream.removeListener('aborted', onAborted)
+ stream.removeListener('data', onData)
+ stream.removeListener('end', onEnd)
+ stream.removeListener('error', onEnd)
+ stream.removeListener('close', cleanup)
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/node_modules/unpipe/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/node_modules/unpipe/HISTORY.md
new file mode 100644
index 0000000..85e0f8d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/node_modules/unpipe/HISTORY.md
@@ -0,0 +1,4 @@
+1.0.0 / 2015-06-14
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/node_modules/unpipe/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/node_modules/unpipe/LICENSE
new file mode 100644
index 0000000..aed0138
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/node_modules/unpipe/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/node_modules/unpipe/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/node_modules/unpipe/README.md
new file mode 100644
index 0000000..e536ad2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/node_modules/unpipe/README.md
@@ -0,0 +1,43 @@
+# unpipe
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-image]][node-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Unpipe a stream from all destinations.
+
+## Installation
+
+```sh
+$ npm install unpipe
+```
+
+## API
+
+```js
+var unpipe = require('unpipe')
+```
+
+### unpipe(stream)
+
+Unpipes all destinations from a given stream. With stream 2+, this is
+equivalent to `stream.unpipe()`. When used with streams 1 style streams
+(typically Node.js 0.8 and below), this module attempts to undo the
+actions done in `stream.pipe(dest)`.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/unpipe.svg
+[npm-url]: https://npmjs.org/package/unpipe
+[node-image]: https://img.shields.io/node/v/unpipe.svg
+[node-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/stream-utils/unpipe.svg
+[travis-url]: https://travis-ci.org/stream-utils/unpipe
+[coveralls-image]: https://img.shields.io/coveralls/stream-utils/unpipe.svg
+[coveralls-url]: https://coveralls.io/r/stream-utils/unpipe?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/unpipe.svg
+[downloads-url]: https://npmjs.org/package/unpipe
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/node_modules/unpipe/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/node_modules/unpipe/index.js
new file mode 100644
index 0000000..15c3d97
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/node_modules/unpipe/index.js
@@ -0,0 +1,69 @@
+/*!
+ * unpipe
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = unpipe
+
+/**
+ * Determine if there are Node.js pipe-like data listeners.
+ * @private
+ */
+
+function hasPipeDataListeners(stream) {
+ var listeners = stream.listeners('data')
+
+ for (var i = 0; i < listeners.length; i++) {
+ if (listeners[i].name === 'ondata') {
+ return true
+ }
+ }
+
+ return false
+}
+
+/**
+ * Unpipe a stream from all destinations.
+ *
+ * @param {object} stream
+ * @public
+ */
+
+function unpipe(stream) {
+ if (!stream) {
+ throw new TypeError('argument stream is required')
+ }
+
+ if (typeof stream.unpipe === 'function') {
+ // new-style
+ stream.unpipe()
+ return
+ }
+
+ // Node.js 0.8 hack
+ if (!hasPipeDataListeners(stream)) {
+ return
+ }
+
+ var listener
+ var listeners = stream.listeners('close')
+
+ for (var i = 0; i < listeners.length; i++) {
+ listener = listeners[i]
+
+ if (listener.name !== 'cleanup' && listener.name !== 'onclose') {
+ continue
+ }
+
+ // invoke the listener
+ listener.call(stream)
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/node_modules/unpipe/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/node_modules/unpipe/package.json
new file mode 100644
index 0000000..ae1b405
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/node_modules/unpipe/package.json
@@ -0,0 +1,59 @@
+{
+ "name": "unpipe",
+ "description": "Unpipe a stream from all destinations",
+ "version": "1.0.0",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/stream-utils/unpipe.git"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.15",
+ "mocha": "2.2.5",
+ "readable-stream": "1.1.13"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "README.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "d2df901c06487430e78dca62b6edb8bb2fc5e99d",
+ "bugs": {
+ "url": "https://github.com/stream-utils/unpipe/issues"
+ },
+ "homepage": "https://github.com/stream-utils/unpipe",
+ "_id": "unpipe@1.0.0",
+ "_shasum": "b2bf4ee8514aae6165b4817829d21b2ef49904ec",
+ "_from": "unpipe@1.0.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "b2bf4ee8514aae6165b4817829d21b2ef49904ec",
+ "tarball": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/package.json
new file mode 100644
index 0000000..06694d7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/raw-body/package.json
@@ -0,0 +1,90 @@
+{
+ "name": "raw-body",
+ "description": "Get and validate the raw body of a readable stream.",
+ "version": "2.1.7",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Raynos",
+ "email": "raynos2@gmail.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/stream-utils/raw-body.git"
+ },
+ "dependencies": {
+ "bytes": "2.4.0",
+ "iconv-lite": "0.4.13",
+ "unpipe": "1.0.0"
+ },
+ "devDependencies": {
+ "bluebird": "3.4.1",
+ "eslint": "2.13.0",
+ "eslint-config-standard": "5.3.1",
+ "eslint-plugin-promise": "1.3.2",
+ "eslint-plugin-standard": "1.3.2",
+ "istanbul": "0.4.3",
+ "mocha": "2.5.3",
+ "readable-stream": "2.1.2",
+ "through2": "2.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "README.md",
+ "index.js"
+ ],
+ "scripts": {
+ "lint": "eslint **/*.js",
+ "test": "mocha --trace-deprecation --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --trace-deprecation --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --trace-deprecation --reporter spec --check-leaks test/"
+ },
+ "gitHead": "9d13a27048cc97958fc14fc12418c6aa76f0b1f9",
+ "bugs": {
+ "url": "https://github.com/stream-utils/raw-body/issues"
+ },
+ "homepage": "https://github.com/stream-utils/raw-body#readme",
+ "_id": "raw-body@2.1.7",
+ "_shasum": "adfeace2e4fb3098058014d08c072dcc59758774",
+ "_from": "raw-body@>=2.1.7 <2.2.0",
+ "_npmVersion": "2.15.1",
+ "_nodeVersion": "4.4.3",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "dist": {
+ "shasum": "adfeace2e4fb3098058014d08c072dcc59758774",
+ "tarball": "https://registry.npmjs.org/raw-body/-/raw-body-2.1.7.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/raw-body-2.1.7.tgz_1466363663010_0.38383363327011466"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.1.7.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/HISTORY.md
new file mode 100644
index 0000000..4f76fb4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/HISTORY.md
@@ -0,0 +1,212 @@
+1.6.14 / 2016-11-18
+===================
+
+ * deps: mime-types@~2.1.13
+ - Add new mime types
+
+1.6.13 / 2016-05-18
+===================
+
+ * deps: mime-types@~2.1.11
+ - Add new mime types
+
+1.6.12 / 2016-02-28
+===================
+
+ * deps: mime-types@~2.1.10
+ - Add new mime types
+ - Fix extension of `application/dash+xml`
+ - Update primary extension for `audio/mp4`
+
+1.6.11 / 2016-01-29
+===================
+
+ * deps: mime-types@~2.1.9
+ - Add new mime types
+
+1.6.10 / 2015-12-01
+===================
+
+ * deps: mime-types@~2.1.8
+ - Add new mime types
+
+1.6.9 / 2015-09-27
+==================
+
+ * deps: mime-types@~2.1.7
+ - Add new mime types
+
+1.6.8 / 2015-09-04
+==================
+
+ * deps: mime-types@~2.1.6
+ - Add new mime types
+
+1.6.7 / 2015-08-20
+==================
+
+ * Fix type error when given invalid type to match against
+ * deps: mime-types@~2.1.5
+ - Add new mime types
+
+1.6.6 / 2015-07-31
+==================
+
+ * deps: mime-types@~2.1.4
+ - Add new mime types
+
+1.6.5 / 2015-07-16
+==================
+
+ * deps: mime-types@~2.1.3
+ - Add new mime types
+
+1.6.4 / 2015-07-01
+==================
+
+ * deps: mime-types@~2.1.2
+ - Add new mime types
+ * perf: enable strict mode
+ * perf: remove argument reassignment
+
+1.6.3 / 2015-06-08
+==================
+
+ * deps: mime-types@~2.1.1
+ - Add new mime types
+ * perf: reduce try block size
+ * perf: remove bitwise operations
+
+1.6.2 / 2015-05-10
+==================
+
+ * deps: mime-types@~2.0.11
+ - Add new mime types
+
+1.6.1 / 2015-03-13
+==================
+
+ * deps: mime-types@~2.0.10
+ - Add new mime types
+
+1.6.0 / 2015-02-12
+==================
+
+ * fix false-positives in `hasBody` `Transfer-Encoding` check
+ * support wildcard for both type and subtype (`*/*`)
+
+1.5.7 / 2015-02-09
+==================
+
+ * fix argument reassignment
+ * deps: mime-types@~2.0.9
+ - Add new mime types
+
+1.5.6 / 2015-01-29
+==================
+
+ * deps: mime-types@~2.0.8
+ - Add new mime types
+
+1.5.5 / 2014-12-30
+==================
+
+ * deps: mime-types@~2.0.7
+ - Add new mime types
+ - Fix missing extensions
+ - Fix various invalid MIME type entries
+ - Remove example template MIME types
+ - deps: mime-db@~1.5.0
+
+1.5.4 / 2014-12-10
+==================
+
+ * deps: mime-types@~2.0.4
+ - Add new mime types
+ - deps: mime-db@~1.3.0
+
+1.5.3 / 2014-11-09
+==================
+
+ * deps: mime-types@~2.0.3
+ - Add new mime types
+ - deps: mime-db@~1.2.0
+
+1.5.2 / 2014-09-28
+==================
+
+ * deps: mime-types@~2.0.2
+ - Add new mime types
+ - deps: mime-db@~1.1.0
+
+1.5.1 / 2014-09-07
+==================
+
+ * Support Node.js 0.6
+ * deps: media-typer@0.3.0
+ * deps: mime-types@~2.0.1
+ - Support Node.js 0.6
+
+1.5.0 / 2014-09-05
+==================
+
+ * fix `hasbody` to be true for `content-length: 0`
+
+1.4.0 / 2014-09-02
+==================
+
+ * update mime-types
+
+1.3.2 / 2014-06-24
+==================
+
+ * use `~` range on mime-types
+
+1.3.1 / 2014-06-19
+==================
+
+ * fix global variable leak
+
+1.3.0 / 2014-06-19
+==================
+
+ * improve type parsing
+
+ - invalid media type never matches
+ - media type not case-sensitive
+ - extra LWS does not affect results
+
+1.2.2 / 2014-06-19
+==================
+
+ * fix behavior on unknown type argument
+
+1.2.1 / 2014-06-03
+==================
+
+ * switch dependency from `mime` to `mime-types@1.0.0`
+
+1.2.0 / 2014-05-11
+==================
+
+ * support suffix matching:
+
+ - `+json` matches `application/vnd+json`
+ - `*/vnd+json` matches `application/vnd+json`
+ - `application/*+json` matches `application/vnd+json`
+
+1.1.0 / 2014-04-12
+==================
+
+ * add non-array values support
+ * expose internal utilities:
+
+ - `.is()`
+ - `.hasBody()`
+ - `.normalize()`
+ - `.match()`
+
+1.0.1 / 2014-03-30
+==================
+
+ * add `multipart` as a shorthand
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/LICENSE
new file mode 100644
index 0000000..386b7b6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/README.md
new file mode 100644
index 0000000..008a7af
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/README.md
@@ -0,0 +1,136 @@
+# type-is
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Infer the content-type of a request.
+
+### Install
+
+```sh
+$ npm install type-is
+```
+
+## API
+
+```js
+var http = require('http')
+var is = require('type-is')
+
+http.createServer(function (req, res) {
+ var istext = is(req, ['text/*'])
+ res.end('you ' + (istext ? 'sent' : 'did not send') + ' me text')
+})
+```
+
+### type = is(request, types)
+
+`request` is the node HTTP request. `types` is an array of types.
+
+```js
+// req.headers.content-type = 'application/json'
+
+is(req, ['json']) // 'json'
+is(req, ['html', 'json']) // 'json'
+is(req, ['application/*']) // 'application/json'
+is(req, ['application/json']) // 'application/json'
+
+is(req, ['html']) // false
+```
+
+### is.hasBody(request)
+
+Returns a Boolean if the given `request` has a body, regardless of the
+`Content-Type` header.
+
+Having a body has no relation to how large the body is (it may be 0 bytes).
+This is similar to how file existence works. If a body does exist, then this
+indicates that there is data to read from the Node.js request stream.
+
+```js
+if (is.hasBody(req)) {
+ // read the body, since there is one
+
+ req.on('data', function (chunk) {
+ // ...
+ })
+}
+```
+
+### type = is.is(mediaType, types)
+
+`mediaType` is the [media type](https://tools.ietf.org/html/rfc6838) string. `types` is an array of types.
+
+```js
+var mediaType = 'application/json'
+
+is.is(mediaType, ['json']) // 'json'
+is.is(mediaType, ['html', 'json']) // 'json'
+is.is(mediaType, ['application/*']) // 'application/json'
+is.is(mediaType, ['application/json']) // 'application/json'
+
+is.is(mediaType, ['html']) // false
+```
+
+### Each type can be:
+
+- An extension name such as `json`. This name will be returned if matched.
+- A mime type such as `application/json`.
+- A mime type with a wildcard such as `*/*` or `*/json` or `application/*`. The full mime type will be returned if matched.
+- A suffix such as `+json`. This can be combined with a wildcard such as `*/vnd+json` or `application/*+json`. The full mime type will be returned if matched.
+
+`false` will be returned if no type matches or the content type is invalid.
+
+`null` will be returned if the request does not have a body.
+
+## Examples
+
+#### Example body parser
+
+```js
+var is = require('type-is');
+
+function bodyParser(req, res, next) {
+ if (!is.hasBody(req)) {
+ return next()
+ }
+
+ switch (is(req, ['urlencoded', 'json', 'multipart'])) {
+ case 'urlencoded':
+ // parse urlencoded body
+ throw new Error('implement urlencoded body parsing')
+ break
+ case 'json':
+ // parse json body
+ throw new Error('implement json body parsing')
+ break
+ case 'multipart':
+ // parse multipart body
+ throw new Error('implement multipart body parsing')
+ break
+ default:
+ // 415 error code
+ res.statusCode = 415
+ res.end()
+ return
+ }
+}
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/type-is.svg
+[npm-url]: https://npmjs.org/package/type-is
+[node-version-image]: https://img.shields.io/node/v/type-is.svg
+[node-version-url]: https://nodejs.org/en/download/
+[travis-image]: https://img.shields.io/travis/jshttp/type-is/master.svg
+[travis-url]: https://travis-ci.org/jshttp/type-is
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/type-is/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/type-is?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/type-is.svg
+[downloads-url]: https://npmjs.org/package/type-is
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/index.js
new file mode 100644
index 0000000..4da7301
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/index.js
@@ -0,0 +1,262 @@
+/*!
+ * type-is
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var typer = require('media-typer')
+var mime = require('mime-types')
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = typeofrequest
+module.exports.is = typeis
+module.exports.hasBody = hasbody
+module.exports.normalize = normalize
+module.exports.match = mimeMatch
+
+/**
+ * Compare a `value` content-type with `types`.
+ * Each `type` can be an extension like `html`,
+ * a special shortcut like `multipart` or `urlencoded`,
+ * or a mime type.
+ *
+ * If no types match, `false` is returned.
+ * Otherwise, the first `type` that matches is returned.
+ *
+ * @param {String} value
+ * @param {Array} types
+ * @public
+ */
+
+function typeis (value, types_) {
+ var i
+ var types = types_
+
+ // remove parameters and normalize
+ var val = tryNormalizeType(value)
+
+ // no type or invalid
+ if (!val) {
+ return false
+ }
+
+ // support flattened arguments
+ if (types && !Array.isArray(types)) {
+ types = new Array(arguments.length - 1)
+ for (i = 0; i < types.length; i++) {
+ types[i] = arguments[i + 1]
+ }
+ }
+
+ // no types, return the content type
+ if (!types || !types.length) {
+ return val
+ }
+
+ var type
+ for (i = 0; i < types.length; i++) {
+ if (mimeMatch(normalize(type = types[i]), val)) {
+ return type[0] === '+' || type.indexOf('*') !== -1
+ ? val
+ : type
+ }
+ }
+
+ // no matches
+ return false
+}
+
+/**
+ * Check if a request has a request body.
+ * A request with a body __must__ either have `transfer-encoding`
+ * or `content-length` headers set.
+ * http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.3
+ *
+ * @param {Object} request
+ * @return {Boolean}
+ * @public
+ */
+
+function hasbody (req) {
+ return req.headers['transfer-encoding'] !== undefined ||
+ !isNaN(req.headers['content-length'])
+}
+
+/**
+ * Check if the incoming request contains the "Content-Type"
+ * header field, and it contains any of the give mime `type`s.
+ * If there is no request body, `null` is returned.
+ * If there is no content type, `false` is returned.
+ * Otherwise, it returns the first `type` that matches.
+ *
+ * Examples:
+ *
+ * // With Content-Type: text/html; charset=utf-8
+ * this.is('html'); // => 'html'
+ * this.is('text/html'); // => 'text/html'
+ * this.is('text/*', 'application/json'); // => 'text/html'
+ *
+ * // When Content-Type is application/json
+ * this.is('json', 'urlencoded'); // => 'json'
+ * this.is('application/json'); // => 'application/json'
+ * this.is('html', 'application/*'); // => 'application/json'
+ *
+ * this.is('html'); // => false
+ *
+ * @param {String|Array} types...
+ * @return {String|false|null}
+ * @public
+ */
+
+function typeofrequest (req, types_) {
+ var types = types_
+
+ // no body
+ if (!hasbody(req)) {
+ return null
+ }
+
+ // support flattened arguments
+ if (arguments.length > 2) {
+ types = new Array(arguments.length - 1)
+ for (var i = 0; i < types.length; i++) {
+ types[i] = arguments[i + 1]
+ }
+ }
+
+ // request content type
+ var value = req.headers['content-type']
+
+ return typeis(value, types)
+}
+
+/**
+ * Normalize a mime type.
+ * If it's a shorthand, expand it to a valid mime type.
+ *
+ * In general, you probably want:
+ *
+ * var type = is(req, ['urlencoded', 'json', 'multipart']);
+ *
+ * Then use the appropriate body parsers.
+ * These three are the most common request body types
+ * and are thus ensured to work.
+ *
+ * @param {String} type
+ * @private
+ */
+
+function normalize (type) {
+ if (typeof type !== 'string') {
+ // invalid type
+ return false
+ }
+
+ switch (type) {
+ case 'urlencoded':
+ return 'application/x-www-form-urlencoded'
+ case 'multipart':
+ return 'multipart/*'
+ }
+
+ if (type[0] === '+') {
+ // "+json" -> "*/*+json" expando
+ return '*/*' + type
+ }
+
+ return type.indexOf('/') === -1
+ ? mime.lookup(type)
+ : type
+}
+
+/**
+ * Check if `expected` mime type
+ * matches `actual` mime type with
+ * wildcard and +suffix support.
+ *
+ * @param {String} expected
+ * @param {String} actual
+ * @return {Boolean}
+ * @private
+ */
+
+function mimeMatch (expected, actual) {
+ // invalid type
+ if (expected === false) {
+ return false
+ }
+
+ // split types
+ var actualParts = actual.split('/')
+ var expectedParts = expected.split('/')
+
+ // invalid format
+ if (actualParts.length !== 2 || expectedParts.length !== 2) {
+ return false
+ }
+
+ // validate type
+ if (expectedParts[0] !== '*' && expectedParts[0] !== actualParts[0]) {
+ return false
+ }
+
+ // validate suffix wildcard
+ if (expectedParts[1].substr(0, 2) === '*+') {
+ return expectedParts[1].length <= actualParts[1].length + 1 &&
+ expectedParts[1].substr(1) === actualParts[1].substr(1 - expectedParts[1].length)
+ }
+
+ // validate subtype
+ if (expectedParts[1] !== '*' && expectedParts[1] !== actualParts[1]) {
+ return false
+ }
+
+ return true
+}
+
+/**
+ * Normalize a type and remove parameters.
+ *
+ * @param {string} value
+ * @return {string}
+ * @private
+ */
+
+function normalizeType (value) {
+ // parse the type
+ var type = typer.parse(value)
+
+ // remove the parameters
+ type.parameters = undefined
+
+ // reformat it
+ return typer.format(type)
+}
+
+/**
+ * Try to normalize a type and remove parameters.
+ *
+ * @param {string} value
+ * @return {string}
+ * @private
+ */
+
+function tryNormalizeType (value) {
+ try {
+ return normalizeType(value)
+ } catch (err) {
+ return null
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/media-typer/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/media-typer/HISTORY.md
new file mode 100644
index 0000000..62c2003
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/media-typer/HISTORY.md
@@ -0,0 +1,22 @@
+0.3.0 / 2014-09-07
+==================
+
+ * Support Node.js 0.6
+ * Throw error when parameter format invalid on parse
+
+0.2.0 / 2014-06-18
+==================
+
+ * Add `typer.format()` to format media types
+
+0.1.0 / 2014-06-17
+==================
+
+ * Accept `req` as argument to `parse`
+ * Accept `res` as argument to `parse`
+ * Parse media type with extra LWS between type and first parameter
+
+0.0.0 / 2014-06-13
+==================
+
+ * Initial implementation
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/media-typer/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/media-typer/LICENSE
new file mode 100644
index 0000000..b7dce6c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/media-typer/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/media-typer/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/media-typer/README.md
new file mode 100644
index 0000000..d8df623
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/media-typer/README.md
@@ -0,0 +1,81 @@
+# media-typer
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Simple RFC 6838 media type parser
+
+## Installation
+
+```sh
+$ npm install media-typer
+```
+
+## API
+
+```js
+var typer = require('media-typer')
+```
+
+### typer.parse(string)
+
+```js
+var obj = typer.parse('image/svg+xml; charset=utf-8')
+```
+
+Parse a media type string. This will return an object with the following
+properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`):
+
+ - `type`: The type of the media type (always lower case). Example: `'image'`
+
+ - `subtype`: The subtype of the media type (always lower case). Example: `'svg'`
+
+ - `suffix`: The suffix of the media type (always lower case). Example: `'xml'`
+
+ - `parameters`: An object of the parameters in the media type (name of parameter always lower case). Example: `{charset: 'utf-8'}`
+
+### typer.parse(req)
+
+```js
+var obj = typer.parse(req)
+```
+
+Parse the `content-type` header from the given `req`. Short-cut for
+`typer.parse(req.headers['content-type'])`.
+
+### typer.parse(res)
+
+```js
+var obj = typer.parse(res)
+```
+
+Parse the `content-type` header set on the given `res`. Short-cut for
+`typer.parse(res.getHeader('content-type'))`.
+
+### typer.format(obj)
+
+```js
+var obj = typer.format({type: 'image', subtype: 'svg', suffix: 'xml'})
+```
+
+Format an object into a media type string. This will return a string of the
+mime type for the given object. For the properties of the object, see the
+documentation for `typer.parse(string)`.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/media-typer.svg?style=flat
+[npm-url]: https://npmjs.org/package/media-typer
+[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/media-typer.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/media-typer
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/media-typer.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/media-typer
+[downloads-image]: https://img.shields.io/npm/dm/media-typer.svg?style=flat
+[downloads-url]: https://npmjs.org/package/media-typer
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/media-typer/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/media-typer/index.js
new file mode 100644
index 0000000..07f7295
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/media-typer/index.js
@@ -0,0 +1,270 @@
+/*!
+ * media-typer
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * RegExp to match *( ";" parameter ) in RFC 2616 sec 3.7
+ *
+ * parameter = token "=" ( token | quoted-string )
+ * token = 1*<any CHAR except CTLs or separators>
+ * separators = "(" | ")" | "<" | ">" | "@"
+ * | "," | ";" | ":" | "\" | <">
+ * | "/" | "[" | "]" | "?" | "="
+ * | "{" | "}" | SP | HT
+ * quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
+ * qdtext = <any TEXT except <">>
+ * quoted-pair = "\" CHAR
+ * CHAR = <any US-ASCII character (octets 0 - 127)>
+ * TEXT = <any OCTET except CTLs, but including LWS>
+ * LWS = [CRLF] 1*( SP | HT )
+ * CRLF = CR LF
+ * CR = <US-ASCII CR, carriage return (13)>
+ * LF = <US-ASCII LF, linefeed (10)>
+ * SP = <US-ASCII SP, space (32)>
+ * SHT = <US-ASCII HT, horizontal-tab (9)>
+ * CTL = <any US-ASCII control character (octets 0 - 31) and DEL (127)>
+ * OCTET = <any 8-bit sequence of data>
+ */
+var paramRegExp = /; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u0020-\u007e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g;
+var textRegExp = /^[\u0020-\u007e\u0080-\u00ff]+$/
+var tokenRegExp = /^[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+$/
+
+/**
+ * RegExp to match quoted-pair in RFC 2616
+ *
+ * quoted-pair = "\" CHAR
+ * CHAR = <any US-ASCII character (octets 0 - 127)>
+ */
+var qescRegExp = /\\([\u0000-\u007f])/g;
+
+/**
+ * RegExp to match chars that must be quoted-pair in RFC 2616
+ */
+var quoteRegExp = /([\\"])/g;
+
+/**
+ * RegExp to match type in RFC 6838
+ *
+ * type-name = restricted-name
+ * subtype-name = restricted-name
+ * restricted-name = restricted-name-first *126restricted-name-chars
+ * restricted-name-first = ALPHA / DIGIT
+ * restricted-name-chars = ALPHA / DIGIT / "!" / "#" /
+ * "$" / "&" / "-" / "^" / "_"
+ * restricted-name-chars =/ "." ; Characters before first dot always
+ * ; specify a facet name
+ * restricted-name-chars =/ "+" ; Characters after last plus always
+ * ; specify a structured syntax suffix
+ * ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
+ * DIGIT = %x30-39 ; 0-9
+ */
+var subtypeNameRegExp = /^[A-Za-z0-9][A-Za-z0-9!#$&^_.-]{0,126}$/
+var typeNameRegExp = /^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/
+var typeRegExp = /^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/;
+
+/**
+ * Module exports.
+ */
+
+exports.format = format
+exports.parse = parse
+
+/**
+ * Format object to media type.
+ *
+ * @param {object} obj
+ * @return {string}
+ * @api public
+ */
+
+function format(obj) {
+ if (!obj || typeof obj !== 'object') {
+ throw new TypeError('argument obj is required')
+ }
+
+ var parameters = obj.parameters
+ var subtype = obj.subtype
+ var suffix = obj.suffix
+ var type = obj.type
+
+ if (!type || !typeNameRegExp.test(type)) {
+ throw new TypeError('invalid type')
+ }
+
+ if (!subtype || !subtypeNameRegExp.test(subtype)) {
+ throw new TypeError('invalid subtype')
+ }
+
+ // format as type/subtype
+ var string = type + '/' + subtype
+
+ // append +suffix
+ if (suffix) {
+ if (!typeNameRegExp.test(suffix)) {
+ throw new TypeError('invalid suffix')
+ }
+
+ string += '+' + suffix
+ }
+
+ // append parameters
+ if (parameters && typeof parameters === 'object') {
+ var param
+ var params = Object.keys(parameters).sort()
+
+ for (var i = 0; i < params.length; i++) {
+ param = params[i]
+
+ if (!tokenRegExp.test(param)) {
+ throw new TypeError('invalid parameter name')
+ }
+
+ string += '; ' + param + '=' + qstring(parameters[param])
+ }
+ }
+
+ return string
+}
+
+/**
+ * Parse media type to object.
+ *
+ * @param {string|object} string
+ * @return {Object}
+ * @api public
+ */
+
+function parse(string) {
+ if (!string) {
+ throw new TypeError('argument string is required')
+ }
+
+ // support req/res-like objects as argument
+ if (typeof string === 'object') {
+ string = getcontenttype(string)
+ }
+
+ if (typeof string !== 'string') {
+ throw new TypeError('argument string is required to be a string')
+ }
+
+ var index = string.indexOf(';')
+ var type = index !== -1
+ ? string.substr(0, index)
+ : string
+
+ var key
+ var match
+ var obj = splitType(type)
+ var params = {}
+ var value
+
+ paramRegExp.lastIndex = index
+
+ while (match = paramRegExp.exec(string)) {
+ if (match.index !== index) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ index += match[0].length
+ key = match[1].toLowerCase()
+ value = match[2]
+
+ if (value[0] === '"') {
+ // remove quotes and escapes
+ value = value
+ .substr(1, value.length - 2)
+ .replace(qescRegExp, '$1')
+ }
+
+ params[key] = value
+ }
+
+ if (index !== -1 && index !== string.length) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ obj.parameters = params
+
+ return obj
+}
+
+/**
+ * Get content-type from req/res objects.
+ *
+ * @param {object}
+ * @return {Object}
+ * @api private
+ */
+
+function getcontenttype(obj) {
+ if (typeof obj.getHeader === 'function') {
+ // res-like
+ return obj.getHeader('content-type')
+ }
+
+ if (typeof obj.headers === 'object') {
+ // req-like
+ return obj.headers && obj.headers['content-type']
+ }
+}
+
+/**
+ * Quote a string if necessary.
+ *
+ * @param {string} val
+ * @return {string}
+ * @api private
+ */
+
+function qstring(val) {
+ var str = String(val)
+
+ // no need to quote tokens
+ if (tokenRegExp.test(str)) {
+ return str
+ }
+
+ if (str.length > 0 && !textRegExp.test(str)) {
+ throw new TypeError('invalid parameter value')
+ }
+
+ return '"' + str.replace(quoteRegExp, '\\$1') + '"'
+}
+
+/**
+ * Simply "type/subtype+siffx" into parts.
+ *
+ * @param {string} string
+ * @return {Object}
+ * @api private
+ */
+
+function splitType(string) {
+ var match = typeRegExp.exec(string.toLowerCase())
+
+ if (!match) {
+ throw new TypeError('invalid media type')
+ }
+
+ var type = match[1]
+ var subtype = match[2]
+ var suffix
+
+ // suffix after last +
+ var index = subtype.lastIndexOf('+')
+ if (index !== -1) {
+ suffix = subtype.substr(index + 1)
+ subtype = subtype.substr(0, index)
+ }
+
+ var obj = {
+ type: type,
+ subtype: subtype,
+ suffix: suffix
+ }
+
+ return obj
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/media-typer/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/media-typer/package.json
new file mode 100644
index 0000000..f6d6712
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/media-typer/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "media-typer",
+ "description": "Simple RFC 6838 media type parser and formatter",
+ "version": "0.3.0",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jshttp/media-typer.git"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.2",
+ "mocha": "~1.21.4",
+ "should": "~4.0.4"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --check-leaks --bail test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "d49d41ffd0bb5a0655fa44a59df2ec0bfc835b16",
+ "bugs": {
+ "url": "https://github.com/jshttp/media-typer/issues"
+ },
+ "homepage": "https://github.com/jshttp/media-typer",
+ "_id": "media-typer@0.3.0",
+ "_shasum": "8710d7af0aa626f8fffa1ce00168545263255748",
+ "_from": "media-typer@0.3.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "8710d7af0aa626f8fffa1ce00168545263255748",
+ "tarball": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/HISTORY.md
new file mode 100644
index 0000000..31b24e0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/HISTORY.md
@@ -0,0 +1,210 @@
+2.1.13 / 2016-11-18
+===================
+
+ * deps: mime-db@~1.25.0
+ - Add new mime types
+
+2.1.12 / 2016-09-18
+===================
+
+ * deps: mime-db@~1.24.0
+ - Add new mime types
+ - Add `audio/mp3`
+
+2.1.11 / 2016-05-01
+===================
+
+ * deps: mime-db@~1.23.0
+ - Add new mime types
+
+2.1.10 / 2016-02-15
+===================
+
+ * deps: mime-db@~1.22.0
+ - Add new mime types
+ - Fix extension of `application/dash+xml`
+ - Update primary extension for `audio/mp4`
+
+2.1.9 / 2016-01-06
+==================
+
+ * deps: mime-db@~1.21.0
+ - Add new mime types
+
+2.1.8 / 2015-11-30
+==================
+
+ * deps: mime-db@~1.20.0
+ - Add new mime types
+
+2.1.7 / 2015-09-20
+==================
+
+ * deps: mime-db@~1.19.0
+ - Add new mime types
+
+2.1.6 / 2015-09-03
+==================
+
+ * deps: mime-db@~1.18.0
+ - Add new mime types
+
+2.1.5 / 2015-08-20
+==================
+
+ * deps: mime-db@~1.17.0
+ - Add new mime types
+
+2.1.4 / 2015-07-30
+==================
+
+ * deps: mime-db@~1.16.0
+ - Add new mime types
+
+2.1.3 / 2015-07-13
+==================
+
+ * deps: mime-db@~1.15.0
+ - Add new mime types
+
+2.1.2 / 2015-06-25
+==================
+
+ * deps: mime-db@~1.14.0
+ - Add new mime types
+
+2.1.1 / 2015-06-08
+==================
+
+ * perf: fix deopt during mapping
+
+2.1.0 / 2015-06-07
+==================
+
+ * Fix incorrectly treating extension-less file name as extension
+ - i.e. `'path/to/json'` will no longer return `application/json`
+ * Fix `.charset(type)` to accept parameters
+ * Fix `.charset(type)` to match case-insensitive
+ * Improve generation of extension to MIME mapping
+ * Refactor internals for readability and no argument reassignment
+ * Prefer `application/*` MIME types from the same source
+ * Prefer any type over `application/octet-stream`
+ * deps: mime-db@~1.13.0
+ - Add nginx as a source
+ - Add new mime types
+
+2.0.14 / 2015-06-06
+===================
+
+ * deps: mime-db@~1.12.0
+ - Add new mime types
+
+2.0.13 / 2015-05-31
+===================
+
+ * deps: mime-db@~1.11.0
+ - Add new mime types
+
+2.0.12 / 2015-05-19
+===================
+
+ * deps: mime-db@~1.10.0
+ - Add new mime types
+
+2.0.11 / 2015-05-05
+===================
+
+ * deps: mime-db@~1.9.1
+ - Add new mime types
+
+2.0.10 / 2015-03-13
+===================
+
+ * deps: mime-db@~1.8.0
+ - Add new mime types
+
+2.0.9 / 2015-02-09
+==================
+
+ * deps: mime-db@~1.7.0
+ - Add new mime types
+ - Community extensions ownership transferred from `node-mime`
+
+2.0.8 / 2015-01-29
+==================
+
+ * deps: mime-db@~1.6.0
+ - Add new mime types
+
+2.0.7 / 2014-12-30
+==================
+
+ * deps: mime-db@~1.5.0
+ - Add new mime types
+ - Fix various invalid MIME type entries
+
+2.0.6 / 2014-12-30
+==================
+
+ * deps: mime-db@~1.4.0
+ - Add new mime types
+ - Fix various invalid MIME type entries
+ - Remove example template MIME types
+
+2.0.5 / 2014-12-29
+==================
+
+ * deps: mime-db@~1.3.1
+ - Fix missing extensions
+
+2.0.4 / 2014-12-10
+==================
+
+ * deps: mime-db@~1.3.0
+ - Add new mime types
+
+2.0.3 / 2014-11-09
+==================
+
+ * deps: mime-db@~1.2.0
+ - Add new mime types
+
+2.0.2 / 2014-09-28
+==================
+
+ * deps: mime-db@~1.1.0
+ - Add new mime types
+ - Add additional compressible
+ - Update charsets
+
+2.0.1 / 2014-09-07
+==================
+
+ * Support Node.js 0.6
+
+2.0.0 / 2014-09-02
+==================
+
+ * Use `mime-db`
+ * Remove `.define()`
+
+1.0.2 / 2014-08-04
+==================
+
+ * Set charset=utf-8 for `text/javascript`
+
+1.0.1 / 2014-06-24
+==================
+
+ * Add `text/jsx` type
+
+1.0.0 / 2014-05-12
+==================
+
+ * Return `false` for unknown types
+ * Set charset=utf-8 for `application/json`
+
+0.1.0 / 2014-05-02
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/LICENSE
new file mode 100644
index 0000000..0616607
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/README.md
new file mode 100644
index 0000000..e77d615
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/README.md
@@ -0,0 +1,103 @@
+# mime-types
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+The ultimate javascript content-type utility.
+
+Similar to [node-mime](https://github.com/broofa/node-mime), except:
+
+- __No fallbacks.__ Instead of naively returning the first available type, `mime-types` simply returns `false`,
+ so do `var type = mime.lookup('unrecognized') || 'application/octet-stream'`.
+- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`.
+- Additional mime types are added such as jade and stylus via [mime-db](https://github.com/jshttp/mime-db)
+- No `.define()` functionality
+
+Otherwise, the API is compatible.
+
+## Install
+
+```sh
+$ npm install mime-types
+```
+
+## Adding Types
+
+All mime types are based on [mime-db](https://github.com/jshttp/mime-db),
+so open a PR there if you'd like to add mime types.
+
+## API
+
+```js
+var mime = require('mime-types')
+```
+
+All functions return `false` if input is invalid or not found.
+
+### mime.lookup(path)
+
+Lookup the content-type associated with a file.
+
+```js
+mime.lookup('json') // 'application/json'
+mime.lookup('.md') // 'text/x-markdown'
+mime.lookup('file.html') // 'text/html'
+mime.lookup('folder/file.js') // 'application/javascript'
+mime.lookup('folder/.htaccess') // false
+
+mime.lookup('cats') // false
+```
+
+### mime.contentType(type)
+
+Create a full content-type header given a content-type or extension.
+
+```js
+mime.contentType('markdown') // 'text/x-markdown; charset=utf-8'
+mime.contentType('file.json') // 'application/json; charset=utf-8'
+
+// from a full path
+mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8'
+```
+
+### mime.extension(type)
+
+Get the default extension for a content-type.
+
+```js
+mime.extension('application/octet-stream') // 'bin'
+```
+
+### mime.charset(type)
+
+Lookup the implied default charset of a content-type.
+
+```js
+mime.charset('text/x-markdown') // 'UTF-8'
+```
+
+### var type = mime.types[extension]
+
+A map of content-types by extension.
+
+### [extensions...] = mime.extensions[type]
+
+A map of extensions by content-type.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/mime-types.svg
+[npm-url]: https://npmjs.org/package/mime-types
+[node-version-image]: https://img.shields.io/node/v/mime-types.svg
+[node-version-url]: https://nodejs.org/en/download/
+[travis-image]: https://img.shields.io/travis/jshttp/mime-types/master.svg
+[travis-url]: https://travis-ci.org/jshttp/mime-types
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-types/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/mime-types
+[downloads-image]: https://img.shields.io/npm/dm/mime-types.svg
+[downloads-url]: https://npmjs.org/package/mime-types
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/index.js
new file mode 100644
index 0000000..9226ca5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/index.js
@@ -0,0 +1,188 @@
+/*!
+ * mime-types
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var db = require('mime-db')
+var extname = require('path').extname
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var extractTypeRegExp = /^\s*([^;\s]*)(?:;|\s|$)/
+var textTypeRegExp = /^text\//i
+
+/**
+ * Module exports.
+ * @public
+ */
+
+exports.charset = charset
+exports.charsets = { lookup: charset }
+exports.contentType = contentType
+exports.extension = extension
+exports.extensions = Object.create(null)
+exports.lookup = lookup
+exports.types = Object.create(null)
+
+// Populate the extensions/types maps
+populateMaps(exports.extensions, exports.types)
+
+/**
+ * Get the default charset for a MIME type.
+ *
+ * @param {string} type
+ * @return {boolean|string}
+ */
+
+function charset (type) {
+ if (!type || typeof type !== 'string') {
+ return false
+ }
+
+ // TODO: use media-typer
+ var match = extractTypeRegExp.exec(type)
+ var mime = match && db[match[1].toLowerCase()]
+
+ if (mime && mime.charset) {
+ return mime.charset
+ }
+
+ // default text/* to utf-8
+ if (match && textTypeRegExp.test(match[1])) {
+ return 'UTF-8'
+ }
+
+ return false
+}
+
+/**
+ * Create a full Content-Type header given a MIME type or extension.
+ *
+ * @param {string} str
+ * @return {boolean|string}
+ */
+
+function contentType (str) {
+ // TODO: should this even be in this module?
+ if (!str || typeof str !== 'string') {
+ return false
+ }
+
+ var mime = str.indexOf('/') === -1
+ ? exports.lookup(str)
+ : str
+
+ if (!mime) {
+ return false
+ }
+
+ // TODO: use content-type or other module
+ if (mime.indexOf('charset') === -1) {
+ var charset = exports.charset(mime)
+ if (charset) mime += '; charset=' + charset.toLowerCase()
+ }
+
+ return mime
+}
+
+/**
+ * Get the default extension for a MIME type.
+ *
+ * @param {string} type
+ * @return {boolean|string}
+ */
+
+function extension (type) {
+ if (!type || typeof type !== 'string') {
+ return false
+ }
+
+ // TODO: use media-typer
+ var match = extractTypeRegExp.exec(type)
+
+ // get extensions
+ var exts = match && exports.extensions[match[1].toLowerCase()]
+
+ if (!exts || !exts.length) {
+ return false
+ }
+
+ return exts[0]
+}
+
+/**
+ * Lookup the MIME type for a file path/extension.
+ *
+ * @param {string} path
+ * @return {boolean|string}
+ */
+
+function lookup (path) {
+ if (!path || typeof path !== 'string') {
+ return false
+ }
+
+ // get the extension ("ext" or ".ext" or full path)
+ var extension = extname('x.' + path)
+ .toLowerCase()
+ .substr(1)
+
+ if (!extension) {
+ return false
+ }
+
+ return exports.types[extension] || false
+}
+
+/**
+ * Populate the extensions and types maps.
+ * @private
+ */
+
+function populateMaps (extensions, types) {
+ // source preference (least -> most)
+ var preference = ['nginx', 'apache', undefined, 'iana']
+
+ Object.keys(db).forEach(function forEachMimeType (type) {
+ var mime = db[type]
+ var exts = mime.extensions
+
+ if (!exts || !exts.length) {
+ return
+ }
+
+ // mime -> extensions
+ extensions[type] = exts
+
+ // extension -> mime
+ for (var i = 0; i < exts.length; i++) {
+ var extension = exts[i]
+
+ if (types[extension]) {
+ var from = preference.indexOf(db[types[extension]].source)
+ var to = preference.indexOf(mime.source)
+
+ if (types[extension] !== 'application/octet-stream' &&
+ from > to || (from === to && types[extension].substr(0, 12) === 'application/')) {
+ // skip the remapping
+ continue
+ }
+ }
+
+ // set the extension -> mime
+ types[extension] = type
+ }
+ })
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/HISTORY.md
new file mode 100644
index 0000000..01fa85c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/HISTORY.md
@@ -0,0 +1,375 @@
+1.25.0 / 2016-11-11
+===================
+
+ * Add `application/dicom+json`
+ * Add `application/dicom+xml`
+ * Add `application/vnd.openstreetmap.data+xml`
+ * Add `application/vnd.tri.onesource`
+ * Add `application/yang-data+json`
+ * Add `application/yang-data+xml`
+
+1.24.0 / 2016-09-18
+===================
+
+ * Add `application/clue_info+xml`
+ * Add `application/geo+json`
+ * Add `application/lgr+xml`
+ * Add `application/vnd.amazon.mobi8-ebook`
+ * Add `application/vnd.chess-pgn`
+ * Add `application/vnd.comicbook+zip`
+ * Add `application/vnd.d2l.coursepackage1p0+zip`
+ * Add `application/vnd.espass-espass+zip`
+ * Add `application/vnd.nearst.inv+json`
+ * Add `application/vnd.oma.lwm2m+json`
+ * Add `application/vnd.oma.lwm2m+tlv`
+ * Add `application/vnd.quarantainenet`
+ * Add `application/vnd.rar`
+ * Add `audio/mp3`
+ * Add `image/dicom-rle`
+ * Add `image/emf`
+ * Add `image/jls`
+ * Add `image/wmf`
+ * Add `model/gltf+json`
+ * Add `text/vnd.ascii-art`
+
+1.23.0 / 2016-05-01
+===================
+
+ * Add `application/efi`
+ * Add `application/vnd.3gpp.sms+xml`
+ * Add `application/vnd.3lightssoftware.imagescal`
+ * Add `application/vnd.coreos.ignition+json`
+ * Add `application/vnd.desmume.movie`
+ * Add `application/vnd.onepager`
+ * Add `application/vnd.vel+json`
+ * Add `text/prs.prop.logic`
+ * Add `video/encaprtp`
+ * Add `video/h265`
+ * Add `video/iso.segment`
+ * Add `video/raptorfec`
+ * Add `video/rtploopback`
+ * Add `video/vnd.radgamettools.bink`
+ * Add `video/vnd.radgamettools.smacker`
+ * Add `video/vp8`
+ * Add extension `.3gpp` to `audio/3gpp`
+
+1.22.0 / 2016-02-15
+===================
+
+ * Add `application/ppsp-tracker+json`
+ * Add `application/problem+json`
+ * Add `application/problem+xml`
+ * Add `application/vnd.hdt`
+ * Add `application/vnd.ms-printschematicket+xml`
+ * Add `model/vnd.rosette.annotated-data-model`
+ * Add `text/slim`
+ * Add extension `.rng` to `application/xml`
+ * Fix extension of `application/dash+xml` to be `.mpd`
+ * Update primary extension to `.m4a` for `audio/mp4`
+
+1.21.0 / 2016-01-06
+===================
+
+ * Add `application/emergencycalldata.comment+xml`
+ * Add `application/emergencycalldata.deviceinfo+xml`
+ * Add `application/emergencycalldata.providerinfo+xml`
+ * Add `application/emergencycalldata.serviceinfo+xml`
+ * Add `application/emergencycalldata.subscriberinfo+xml`
+ * Add `application/vnd.filmit.zfc`
+ * Add `application/vnd.google-apps.document`
+ * Add `application/vnd.google-apps.presentation`
+ * Add `application/vnd.google-apps.spreadsheet`
+ * Add `application/vnd.mapbox-vector-tile`
+ * Add `application/vnd.ms-printdevicecapabilities+xml`
+ * Add `application/vnd.ms-windows.devicepairing`
+ * Add `application/vnd.ms-windows.nwprinting.oob`
+ * Add `application/vnd.tml`
+ * Add `audio/evs`
+
+1.20.0 / 2015-11-10
+===================
+
+ * Add `application/cdni`
+ * Add `application/csvm+json`
+ * Add `application/rfc+xml`
+ * Add `application/vnd.3gpp.access-transfer-events+xml`
+ * Add `application/vnd.3gpp.srvcc-ext+xml`
+ * Add `application/vnd.ms-windows.wsd.oob`
+ * Add `application/vnd.oxli.countgraph`
+ * Add `application/vnd.pagerduty+json`
+ * Add `text/x-suse-ymp`
+
+1.19.0 / 2015-09-17
+===================
+
+ * Add `application/vnd.3gpp-prose-pc3ch+xml`
+ * Add `application/vnd.3gpp.srvcc-info+xml`
+ * Add `application/vnd.apple.pkpass`
+ * Add `application/vnd.drive+json`
+
+1.18.0 / 2015-09-03
+===================
+
+ * Add `application/pkcs12`
+ * Add `application/vnd.3gpp-prose+xml`
+ * Add `application/vnd.3gpp.mid-call+xml`
+ * Add `application/vnd.3gpp.state-and-event-info+xml`
+ * Add `application/vnd.anki`
+ * Add `application/vnd.firemonkeys.cloudcell`
+ * Add `application/vnd.openblox.game+xml`
+ * Add `application/vnd.openblox.game-binary`
+
+1.17.0 / 2015-08-13
+===================
+
+ * Add `application/x-msdos-program`
+ * Add `audio/g711-0`
+ * Add `image/vnd.mozilla.apng`
+ * Add extension `.exe` to `application/x-msdos-program`
+
+1.16.0 / 2015-07-29
+===================
+
+ * Add `application/vnd.uri-map`
+
+1.15.0 / 2015-07-13
+===================
+
+ * Add `application/x-httpd-php`
+
+1.14.0 / 2015-06-25
+===================
+
+ * Add `application/scim+json`
+ * Add `application/vnd.3gpp.ussd+xml`
+ * Add `application/vnd.biopax.rdf+xml`
+ * Add `text/x-processing`
+
+1.13.0 / 2015-06-07
+===================
+
+ * Add nginx as a source
+ * Add `application/x-cocoa`
+ * Add `application/x-java-archive-diff`
+ * Add `application/x-makeself`
+ * Add `application/x-perl`
+ * Add `application/x-pilot`
+ * Add `application/x-redhat-package-manager`
+ * Add `application/x-sea`
+ * Add `audio/x-m4a`
+ * Add `audio/x-realaudio`
+ * Add `image/x-jng`
+ * Add `text/mathml`
+
+1.12.0 / 2015-06-05
+===================
+
+ * Add `application/bdoc`
+ * Add `application/vnd.hyperdrive+json`
+ * Add `application/x-bdoc`
+ * Add extension `.rtf` to `text/rtf`
+
+1.11.0 / 2015-05-31
+===================
+
+ * Add `audio/wav`
+ * Add `audio/wave`
+ * Add extension `.litcoffee` to `text/coffeescript`
+ * Add extension `.sfd-hdstx` to `application/vnd.hydrostatix.sof-data`
+ * Add extension `.n-gage` to `application/vnd.nokia.n-gage.symbian.install`
+
+1.10.0 / 2015-05-19
+===================
+
+ * Add `application/vnd.balsamiq.bmpr`
+ * Add `application/vnd.microsoft.portable-executable`
+ * Add `application/x-ns-proxy-autoconfig`
+
+1.9.1 / 2015-04-19
+==================
+
+ * Remove `.json` extension from `application/manifest+json`
+ - This is causing bugs downstream
+
+1.9.0 / 2015-04-19
+==================
+
+ * Add `application/manifest+json`
+ * Add `application/vnd.micro+json`
+ * Add `image/vnd.zbrush.pcx`
+ * Add `image/x-ms-bmp`
+
+1.8.0 / 2015-03-13
+==================
+
+ * Add `application/vnd.citationstyles.style+xml`
+ * Add `application/vnd.fastcopy-disk-image`
+ * Add `application/vnd.gov.sk.xmldatacontainer+xml`
+ * Add extension `.jsonld` to `application/ld+json`
+
+1.7.0 / 2015-02-08
+==================
+
+ * Add `application/vnd.gerber`
+ * Add `application/vnd.msa-disk-image`
+
+1.6.1 / 2015-02-05
+==================
+
+ * Community extensions ownership transferred from `node-mime`
+
+1.6.0 / 2015-01-29
+==================
+
+ * Add `application/jose`
+ * Add `application/jose+json`
+ * Add `application/json-seq`
+ * Add `application/jwk+json`
+ * Add `application/jwk-set+json`
+ * Add `application/jwt`
+ * Add `application/rdap+json`
+ * Add `application/vnd.gov.sk.e-form+xml`
+ * Add `application/vnd.ims.imsccv1p3`
+
+1.5.0 / 2014-12-30
+==================
+
+ * Add `application/vnd.oracle.resource+json`
+ * Fix various invalid MIME type entries
+ - `application/mbox+xml`
+ - `application/oscp-response`
+ - `application/vwg-multiplexed`
+ - `audio/g721`
+
+1.4.0 / 2014-12-21
+==================
+
+ * Add `application/vnd.ims.imsccv1p2`
+ * Fix various invalid MIME type entries
+ - `application/vnd-acucobol`
+ - `application/vnd-curl`
+ - `application/vnd-dart`
+ - `application/vnd-dxr`
+ - `application/vnd-fdf`
+ - `application/vnd-mif`
+ - `application/vnd-sema`
+ - `application/vnd-wap-wmlc`
+ - `application/vnd.adobe.flash-movie`
+ - `application/vnd.dece-zip`
+ - `application/vnd.dvb_service`
+ - `application/vnd.micrografx-igx`
+ - `application/vnd.sealed-doc`
+ - `application/vnd.sealed-eml`
+ - `application/vnd.sealed-mht`
+ - `application/vnd.sealed-ppt`
+ - `application/vnd.sealed-tiff`
+ - `application/vnd.sealed-xls`
+ - `application/vnd.sealedmedia.softseal-html`
+ - `application/vnd.sealedmedia.softseal-pdf`
+ - `application/vnd.wap-slc`
+ - `application/vnd.wap-wbxml`
+ - `audio/vnd.sealedmedia.softseal-mpeg`
+ - `image/vnd-djvu`
+ - `image/vnd-svf`
+ - `image/vnd-wap-wbmp`
+ - `image/vnd.sealed-png`
+ - `image/vnd.sealedmedia.softseal-gif`
+ - `image/vnd.sealedmedia.softseal-jpg`
+ - `model/vnd-dwf`
+ - `model/vnd.parasolid.transmit-binary`
+ - `model/vnd.parasolid.transmit-text`
+ - `text/vnd-a`
+ - `text/vnd-curl`
+ - `text/vnd.wap-wml`
+ * Remove example template MIME types
+ - `application/example`
+ - `audio/example`
+ - `image/example`
+ - `message/example`
+ - `model/example`
+ - `multipart/example`
+ - `text/example`
+ - `video/example`
+
+1.3.1 / 2014-12-16
+==================
+
+ * Fix missing extensions
+ - `application/json5`
+ - `text/hjson`
+
+1.3.0 / 2014-12-07
+==================
+
+ * Add `application/a2l`
+ * Add `application/aml`
+ * Add `application/atfx`
+ * Add `application/atxml`
+ * Add `application/cdfx+xml`
+ * Add `application/dii`
+ * Add `application/json5`
+ * Add `application/lxf`
+ * Add `application/mf4`
+ * Add `application/vnd.apache.thrift.compact`
+ * Add `application/vnd.apache.thrift.json`
+ * Add `application/vnd.coffeescript`
+ * Add `application/vnd.enphase.envoy`
+ * Add `application/vnd.ims.imsccv1p1`
+ * Add `text/csv-schema`
+ * Add `text/hjson`
+ * Add `text/markdown`
+ * Add `text/yaml`
+
+1.2.0 / 2014-11-09
+==================
+
+ * Add `application/cea`
+ * Add `application/dit`
+ * Add `application/vnd.gov.sk.e-form+zip`
+ * Add `application/vnd.tmd.mediaflex.api+xml`
+ * Type `application/epub+zip` is now IANA-registered
+
+1.1.2 / 2014-10-23
+==================
+
+ * Rebuild database for `application/x-www-form-urlencoded` change
+
+1.1.1 / 2014-10-20
+==================
+
+ * Mark `application/x-www-form-urlencoded` as compressible.
+
+1.1.0 / 2014-09-28
+==================
+
+ * Add `application/font-woff2`
+
+1.0.3 / 2014-09-25
+==================
+
+ * Fix engine requirement in package
+
+1.0.2 / 2014-09-25
+==================
+
+ * Add `application/coap-group+json`
+ * Add `application/dcd`
+ * Add `application/vnd.apache.thrift.binary`
+ * Add `image/vnd.tencent.tap`
+ * Mark all JSON-derived types as compressible
+ * Update `text/vtt` data
+
+1.0.1 / 2014-08-30
+==================
+
+ * Fix extension ordering
+
+1.0.0 / 2014-08-30
+==================
+
+ * Add `application/atf`
+ * Add `application/merge-patch+json`
+ * Add `multipart/x-mixed-replace`
+ * Add `source: 'apache'` metadata
+ * Add `source: 'iana'` metadata
+ * Remove badly-assumed charset data
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/LICENSE
new file mode 100644
index 0000000..a7ae8ee
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md
new file mode 100644
index 0000000..7662440
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md
@@ -0,0 +1,82 @@
+# mime-db
+
+[![NPM Version][npm-version-image]][npm-url]
+[![NPM Downloads][npm-downloads-image]][npm-url]
+[![Node.js Version][node-image]][node-url]
+[![Build Status][travis-image]][travis-url]
+[![Coverage Status][coveralls-image]][coveralls-url]
+
+This is a database of all mime types.
+It consists of a single, public JSON file and does not include any logic,
+allowing it to remain as un-opinionated as possible with an API.
+It aggregates data from the following sources:
+
+- http://www.iana.org/assignments/media-types/media-types.xhtml
+- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
+- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types
+
+## Installation
+
+```bash
+npm install mime-db
+```
+
+### Database Download
+
+If you're crazy enough to use this in the browser, you can just grab the
+JSON file using [RawGit](https://rawgit.com/). It is recommended to replace
+`master` with [a release tag](https://github.com/jshttp/mime-db/tags) as the
+JSON format may change in the future.
+
+```
+https://cdn.rawgit.com/jshttp/mime-db/master/db.json
+```
+
+## Usage
+
+```js
+var db = require('mime-db');
+
+// grab data on .js files
+var data = db['application/javascript'];
+```
+
+## Data Structure
+
+The JSON file is a map lookup for lowercased mime types.
+Each mime type has the following properties:
+
+- `.source` - where the mime type is defined.
+ If not set, it's probably a custom media type.
+ - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types)
+ - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml)
+ - `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types)
+- `.extensions[]` - known extensions associated with this mime type.
+- `.compressible` - whether a file of this type can be gzipped.
+- `.charset` - the default charset associated with this type, if any.
+
+If unknown, every property could be `undefined`.
+
+## Contributing
+
+To edit the database, only make PRs against `src/custom.json` or
+`src/custom-suffix.json`.
+
+To update the build, run `npm run build`.
+
+## Adding Custom Media Types
+
+The best way to get new media types included in this library is to register
+them with the IANA. The community registration procedure is outlined in
+[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types
+registered with the IANA are automatically pulled into this library.
+
+[npm-version-image]: https://img.shields.io/npm/v/mime-db.svg
+[npm-downloads-image]: https://img.shields.io/npm/dm/mime-db.svg
+[npm-url]: https://npmjs.org/package/mime-db
+[travis-image]: https://img.shields.io/travis/jshttp/mime-db/master.svg
+[travis-url]: https://travis-ci.org/jshttp/mime-db
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-db/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master
+[node-image]: https://img.shields.io/node/v/mime-db.svg
+[node-url]: http://nodejs.org/download/
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json
new file mode 100644
index 0000000..94384d3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json
@@ -0,0 +1,6712 @@
+{
+ "application/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "application/3gpdash-qoe-report+xml": {
+ "source": "iana"
+ },
+ "application/3gpp-ims+xml": {
+ "source": "iana"
+ },
+ "application/a2l": {
+ "source": "iana"
+ },
+ "application/activemessage": {
+ "source": "iana"
+ },
+ "application/alto-costmap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-costmapfilter+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-directory+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointcost+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointcostparams+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointprop+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointpropparams+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-error+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-networkmap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-networkmapfilter+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/aml": {
+ "source": "iana"
+ },
+ "application/andrew-inset": {
+ "source": "iana",
+ "extensions": ["ez"]
+ },
+ "application/applefile": {
+ "source": "iana"
+ },
+ "application/applixware": {
+ "source": "apache",
+ "extensions": ["aw"]
+ },
+ "application/atf": {
+ "source": "iana"
+ },
+ "application/atfx": {
+ "source": "iana"
+ },
+ "application/atom+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["atom"]
+ },
+ "application/atomcat+xml": {
+ "source": "iana",
+ "extensions": ["atomcat"]
+ },
+ "application/atomdeleted+xml": {
+ "source": "iana"
+ },
+ "application/atomicmail": {
+ "source": "iana"
+ },
+ "application/atomsvc+xml": {
+ "source": "iana",
+ "extensions": ["atomsvc"]
+ },
+ "application/atxml": {
+ "source": "iana"
+ },
+ "application/auth-policy+xml": {
+ "source": "iana"
+ },
+ "application/bacnet-xdd+zip": {
+ "source": "iana"
+ },
+ "application/batch-smtp": {
+ "source": "iana"
+ },
+ "application/bdoc": {
+ "compressible": false,
+ "extensions": ["bdoc"]
+ },
+ "application/beep+xml": {
+ "source": "iana"
+ },
+ "application/calendar+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/calendar+xml": {
+ "source": "iana"
+ },
+ "application/call-completion": {
+ "source": "iana"
+ },
+ "application/cals-1840": {
+ "source": "iana"
+ },
+ "application/cbor": {
+ "source": "iana"
+ },
+ "application/ccmp+xml": {
+ "source": "iana"
+ },
+ "application/ccxml+xml": {
+ "source": "iana",
+ "extensions": ["ccxml"]
+ },
+ "application/cdfx+xml": {
+ "source": "iana"
+ },
+ "application/cdmi-capability": {
+ "source": "iana",
+ "extensions": ["cdmia"]
+ },
+ "application/cdmi-container": {
+ "source": "iana",
+ "extensions": ["cdmic"]
+ },
+ "application/cdmi-domain": {
+ "source": "iana",
+ "extensions": ["cdmid"]
+ },
+ "application/cdmi-object": {
+ "source": "iana",
+ "extensions": ["cdmio"]
+ },
+ "application/cdmi-queue": {
+ "source": "iana",
+ "extensions": ["cdmiq"]
+ },
+ "application/cdni": {
+ "source": "iana"
+ },
+ "application/cea": {
+ "source": "iana"
+ },
+ "application/cea-2018+xml": {
+ "source": "iana"
+ },
+ "application/cellml+xml": {
+ "source": "iana"
+ },
+ "application/cfw": {
+ "source": "iana"
+ },
+ "application/clue_info+xml": {
+ "source": "iana"
+ },
+ "application/cms": {
+ "source": "iana"
+ },
+ "application/cnrp+xml": {
+ "source": "iana"
+ },
+ "application/coap-group+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/commonground": {
+ "source": "iana"
+ },
+ "application/conference-info+xml": {
+ "source": "iana"
+ },
+ "application/cpl+xml": {
+ "source": "iana"
+ },
+ "application/csrattrs": {
+ "source": "iana"
+ },
+ "application/csta+xml": {
+ "source": "iana"
+ },
+ "application/cstadata+xml": {
+ "source": "iana"
+ },
+ "application/csvm+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/cu-seeme": {
+ "source": "apache",
+ "extensions": ["cu"]
+ },
+ "application/cybercash": {
+ "source": "iana"
+ },
+ "application/dart": {
+ "compressible": true
+ },
+ "application/dash+xml": {
+ "source": "iana",
+ "extensions": ["mpd"]
+ },
+ "application/dashdelta": {
+ "source": "iana"
+ },
+ "application/davmount+xml": {
+ "source": "iana",
+ "extensions": ["davmount"]
+ },
+ "application/dca-rft": {
+ "source": "iana"
+ },
+ "application/dcd": {
+ "source": "iana"
+ },
+ "application/dec-dx": {
+ "source": "iana"
+ },
+ "application/dialog-info+xml": {
+ "source": "iana"
+ },
+ "application/dicom": {
+ "source": "iana"
+ },
+ "application/dicom+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/dicom+xml": {
+ "source": "iana"
+ },
+ "application/dii": {
+ "source": "iana"
+ },
+ "application/dit": {
+ "source": "iana"
+ },
+ "application/dns": {
+ "source": "iana"
+ },
+ "application/docbook+xml": {
+ "source": "apache",
+ "extensions": ["dbk"]
+ },
+ "application/dskpp+xml": {
+ "source": "iana"
+ },
+ "application/dssc+der": {
+ "source": "iana",
+ "extensions": ["dssc"]
+ },
+ "application/dssc+xml": {
+ "source": "iana",
+ "extensions": ["xdssc"]
+ },
+ "application/dvcs": {
+ "source": "iana"
+ },
+ "application/ecmascript": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["ecma"]
+ },
+ "application/edi-consent": {
+ "source": "iana"
+ },
+ "application/edi-x12": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/edifact": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/efi": {
+ "source": "iana"
+ },
+ "application/emergencycalldata.comment+xml": {
+ "source": "iana"
+ },
+ "application/emergencycalldata.deviceinfo+xml": {
+ "source": "iana"
+ },
+ "application/emergencycalldata.providerinfo+xml": {
+ "source": "iana"
+ },
+ "application/emergencycalldata.serviceinfo+xml": {
+ "source": "iana"
+ },
+ "application/emergencycalldata.subscriberinfo+xml": {
+ "source": "iana"
+ },
+ "application/emma+xml": {
+ "source": "iana",
+ "extensions": ["emma"]
+ },
+ "application/emotionml+xml": {
+ "source": "iana"
+ },
+ "application/encaprtp": {
+ "source": "iana"
+ },
+ "application/epp+xml": {
+ "source": "iana"
+ },
+ "application/epub+zip": {
+ "source": "iana",
+ "extensions": ["epub"]
+ },
+ "application/eshop": {
+ "source": "iana"
+ },
+ "application/exi": {
+ "source": "iana",
+ "extensions": ["exi"]
+ },
+ "application/fastinfoset": {
+ "source": "iana"
+ },
+ "application/fastsoap": {
+ "source": "iana"
+ },
+ "application/fdt+xml": {
+ "source": "iana"
+ },
+ "application/fits": {
+ "source": "iana"
+ },
+ "application/font-sfnt": {
+ "source": "iana"
+ },
+ "application/font-tdpfr": {
+ "source": "iana",
+ "extensions": ["pfr"]
+ },
+ "application/font-woff": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["woff"]
+ },
+ "application/font-woff2": {
+ "compressible": false,
+ "extensions": ["woff2"]
+ },
+ "application/framework-attributes+xml": {
+ "source": "iana"
+ },
+ "application/geo+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/gml+xml": {
+ "source": "apache",
+ "extensions": ["gml"]
+ },
+ "application/gpx+xml": {
+ "source": "apache",
+ "extensions": ["gpx"]
+ },
+ "application/gxf": {
+ "source": "apache",
+ "extensions": ["gxf"]
+ },
+ "application/gzip": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/h224": {
+ "source": "iana"
+ },
+ "application/held+xml": {
+ "source": "iana"
+ },
+ "application/http": {
+ "source": "iana"
+ },
+ "application/hyperstudio": {
+ "source": "iana",
+ "extensions": ["stk"]
+ },
+ "application/ibe-key-request+xml": {
+ "source": "iana"
+ },
+ "application/ibe-pkg-reply+xml": {
+ "source": "iana"
+ },
+ "application/ibe-pp-data": {
+ "source": "iana"
+ },
+ "application/iges": {
+ "source": "iana"
+ },
+ "application/im-iscomposing+xml": {
+ "source": "iana"
+ },
+ "application/index": {
+ "source": "iana"
+ },
+ "application/index.cmd": {
+ "source": "iana"
+ },
+ "application/index.obj": {
+ "source": "iana"
+ },
+ "application/index.response": {
+ "source": "iana"
+ },
+ "application/index.vnd": {
+ "source": "iana"
+ },
+ "application/inkml+xml": {
+ "source": "iana",
+ "extensions": ["ink","inkml"]
+ },
+ "application/iotp": {
+ "source": "iana"
+ },
+ "application/ipfix": {
+ "source": "iana",
+ "extensions": ["ipfix"]
+ },
+ "application/ipp": {
+ "source": "iana"
+ },
+ "application/isup": {
+ "source": "iana"
+ },
+ "application/its+xml": {
+ "source": "iana"
+ },
+ "application/java-archive": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["jar","war","ear"]
+ },
+ "application/java-serialized-object": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["ser"]
+ },
+ "application/java-vm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["class"]
+ },
+ "application/javascript": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["js"]
+ },
+ "application/jose": {
+ "source": "iana"
+ },
+ "application/jose+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jrd+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/json": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["json","map"]
+ },
+ "application/json-patch+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/json-seq": {
+ "source": "iana"
+ },
+ "application/json5": {
+ "extensions": ["json5"]
+ },
+ "application/jsonml+json": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["jsonml"]
+ },
+ "application/jwk+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jwk-set+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jwt": {
+ "source": "iana"
+ },
+ "application/kpml-request+xml": {
+ "source": "iana"
+ },
+ "application/kpml-response+xml": {
+ "source": "iana"
+ },
+ "application/ld+json": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["jsonld"]
+ },
+ "application/lgr+xml": {
+ "source": "iana"
+ },
+ "application/link-format": {
+ "source": "iana"
+ },
+ "application/load-control+xml": {
+ "source": "iana"
+ },
+ "application/lost+xml": {
+ "source": "iana",
+ "extensions": ["lostxml"]
+ },
+ "application/lostsync+xml": {
+ "source": "iana"
+ },
+ "application/lxf": {
+ "source": "iana"
+ },
+ "application/mac-binhex40": {
+ "source": "iana",
+ "extensions": ["hqx"]
+ },
+ "application/mac-compactpro": {
+ "source": "apache",
+ "extensions": ["cpt"]
+ },
+ "application/macwriteii": {
+ "source": "iana"
+ },
+ "application/mads+xml": {
+ "source": "iana",
+ "extensions": ["mads"]
+ },
+ "application/manifest+json": {
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["webmanifest"]
+ },
+ "application/marc": {
+ "source": "iana",
+ "extensions": ["mrc"]
+ },
+ "application/marcxml+xml": {
+ "source": "iana",
+ "extensions": ["mrcx"]
+ },
+ "application/mathematica": {
+ "source": "iana",
+ "extensions": ["ma","nb","mb"]
+ },
+ "application/mathml+xml": {
+ "source": "iana",
+ "extensions": ["mathml"]
+ },
+ "application/mathml-content+xml": {
+ "source": "iana"
+ },
+ "application/mathml-presentation+xml": {
+ "source": "iana"
+ },
+ "application/mbms-associated-procedure-description+xml": {
+ "source": "iana"
+ },
+ "application/mbms-deregister+xml": {
+ "source": "iana"
+ },
+ "application/mbms-envelope+xml": {
+ "source": "iana"
+ },
+ "application/mbms-msk+xml": {
+ "source": "iana"
+ },
+ "application/mbms-msk-response+xml": {
+ "source": "iana"
+ },
+ "application/mbms-protection-description+xml": {
+ "source": "iana"
+ },
+ "application/mbms-reception-report+xml": {
+ "source": "iana"
+ },
+ "application/mbms-register+xml": {
+ "source": "iana"
+ },
+ "application/mbms-register-response+xml": {
+ "source": "iana"
+ },
+ "application/mbms-schedule+xml": {
+ "source": "iana"
+ },
+ "application/mbms-user-service-description+xml": {
+ "source": "iana"
+ },
+ "application/mbox": {
+ "source": "iana",
+ "extensions": ["mbox"]
+ },
+ "application/media-policy-dataset+xml": {
+ "source": "iana"
+ },
+ "application/media_control+xml": {
+ "source": "iana"
+ },
+ "application/mediaservercontrol+xml": {
+ "source": "iana",
+ "extensions": ["mscml"]
+ },
+ "application/merge-patch+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/metalink+xml": {
+ "source": "apache",
+ "extensions": ["metalink"]
+ },
+ "application/metalink4+xml": {
+ "source": "iana",
+ "extensions": ["meta4"]
+ },
+ "application/mets+xml": {
+ "source": "iana",
+ "extensions": ["mets"]
+ },
+ "application/mf4": {
+ "source": "iana"
+ },
+ "application/mikey": {
+ "source": "iana"
+ },
+ "application/mods+xml": {
+ "source": "iana",
+ "extensions": ["mods"]
+ },
+ "application/moss-keys": {
+ "source": "iana"
+ },
+ "application/moss-signature": {
+ "source": "iana"
+ },
+ "application/mosskey-data": {
+ "source": "iana"
+ },
+ "application/mosskey-request": {
+ "source": "iana"
+ },
+ "application/mp21": {
+ "source": "iana",
+ "extensions": ["m21","mp21"]
+ },
+ "application/mp4": {
+ "source": "iana",
+ "extensions": ["mp4s","m4p"]
+ },
+ "application/mpeg4-generic": {
+ "source": "iana"
+ },
+ "application/mpeg4-iod": {
+ "source": "iana"
+ },
+ "application/mpeg4-iod-xmt": {
+ "source": "iana"
+ },
+ "application/mrb-consumer+xml": {
+ "source": "iana"
+ },
+ "application/mrb-publish+xml": {
+ "source": "iana"
+ },
+ "application/msc-ivr+xml": {
+ "source": "iana"
+ },
+ "application/msc-mixer+xml": {
+ "source": "iana"
+ },
+ "application/msword": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["doc","dot"]
+ },
+ "application/mxf": {
+ "source": "iana",
+ "extensions": ["mxf"]
+ },
+ "application/nasdata": {
+ "source": "iana"
+ },
+ "application/news-checkgroups": {
+ "source": "iana"
+ },
+ "application/news-groupinfo": {
+ "source": "iana"
+ },
+ "application/news-transmission": {
+ "source": "iana"
+ },
+ "application/nlsml+xml": {
+ "source": "iana"
+ },
+ "application/nss": {
+ "source": "iana"
+ },
+ "application/ocsp-request": {
+ "source": "iana"
+ },
+ "application/ocsp-response": {
+ "source": "iana"
+ },
+ "application/octet-stream": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]
+ },
+ "application/oda": {
+ "source": "iana",
+ "extensions": ["oda"]
+ },
+ "application/odx": {
+ "source": "iana"
+ },
+ "application/oebps-package+xml": {
+ "source": "iana",
+ "extensions": ["opf"]
+ },
+ "application/ogg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ogx"]
+ },
+ "application/omdoc+xml": {
+ "source": "apache",
+ "extensions": ["omdoc"]
+ },
+ "application/onenote": {
+ "source": "apache",
+ "extensions": ["onetoc","onetoc2","onetmp","onepkg"]
+ },
+ "application/oxps": {
+ "source": "iana",
+ "extensions": ["oxps"]
+ },
+ "application/p2p-overlay+xml": {
+ "source": "iana"
+ },
+ "application/parityfec": {
+ "source": "iana"
+ },
+ "application/patch-ops-error+xml": {
+ "source": "iana",
+ "extensions": ["xer"]
+ },
+ "application/pdf": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pdf"]
+ },
+ "application/pdx": {
+ "source": "iana"
+ },
+ "application/pgp-encrypted": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pgp"]
+ },
+ "application/pgp-keys": {
+ "source": "iana"
+ },
+ "application/pgp-signature": {
+ "source": "iana",
+ "extensions": ["asc","sig"]
+ },
+ "application/pics-rules": {
+ "source": "apache",
+ "extensions": ["prf"]
+ },
+ "application/pidf+xml": {
+ "source": "iana"
+ },
+ "application/pidf-diff+xml": {
+ "source": "iana"
+ },
+ "application/pkcs10": {
+ "source": "iana",
+ "extensions": ["p10"]
+ },
+ "application/pkcs12": {
+ "source": "iana"
+ },
+ "application/pkcs7-mime": {
+ "source": "iana",
+ "extensions": ["p7m","p7c"]
+ },
+ "application/pkcs7-signature": {
+ "source": "iana",
+ "extensions": ["p7s"]
+ },
+ "application/pkcs8": {
+ "source": "iana",
+ "extensions": ["p8"]
+ },
+ "application/pkix-attr-cert": {
+ "source": "iana",
+ "extensions": ["ac"]
+ },
+ "application/pkix-cert": {
+ "source": "iana",
+ "extensions": ["cer"]
+ },
+ "application/pkix-crl": {
+ "source": "iana",
+ "extensions": ["crl"]
+ },
+ "application/pkix-pkipath": {
+ "source": "iana",
+ "extensions": ["pkipath"]
+ },
+ "application/pkixcmp": {
+ "source": "iana",
+ "extensions": ["pki"]
+ },
+ "application/pls+xml": {
+ "source": "iana",
+ "extensions": ["pls"]
+ },
+ "application/poc-settings+xml": {
+ "source": "iana"
+ },
+ "application/postscript": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["ai","eps","ps"]
+ },
+ "application/ppsp-tracker+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/problem+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/problem+xml": {
+ "source": "iana"
+ },
+ "application/provenance+xml": {
+ "source": "iana"
+ },
+ "application/prs.alvestrand.titrax-sheet": {
+ "source": "iana"
+ },
+ "application/prs.cww": {
+ "source": "iana",
+ "extensions": ["cww"]
+ },
+ "application/prs.hpub+zip": {
+ "source": "iana"
+ },
+ "application/prs.nprend": {
+ "source": "iana"
+ },
+ "application/prs.plucker": {
+ "source": "iana"
+ },
+ "application/prs.rdf-xml-crypt": {
+ "source": "iana"
+ },
+ "application/prs.xsf+xml": {
+ "source": "iana"
+ },
+ "application/pskc+xml": {
+ "source": "iana",
+ "extensions": ["pskcxml"]
+ },
+ "application/qsig": {
+ "source": "iana"
+ },
+ "application/raptorfec": {
+ "source": "iana"
+ },
+ "application/rdap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/rdf+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rdf"]
+ },
+ "application/reginfo+xml": {
+ "source": "iana",
+ "extensions": ["rif"]
+ },
+ "application/relax-ng-compact-syntax": {
+ "source": "iana",
+ "extensions": ["rnc"]
+ },
+ "application/remote-printing": {
+ "source": "iana"
+ },
+ "application/reputon+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/resource-lists+xml": {
+ "source": "iana",
+ "extensions": ["rl"]
+ },
+ "application/resource-lists-diff+xml": {
+ "source": "iana",
+ "extensions": ["rld"]
+ },
+ "application/rfc+xml": {
+ "source": "iana"
+ },
+ "application/riscos": {
+ "source": "iana"
+ },
+ "application/rlmi+xml": {
+ "source": "iana"
+ },
+ "application/rls-services+xml": {
+ "source": "iana",
+ "extensions": ["rs"]
+ },
+ "application/rpki-ghostbusters": {
+ "source": "iana",
+ "extensions": ["gbr"]
+ },
+ "application/rpki-manifest": {
+ "source": "iana",
+ "extensions": ["mft"]
+ },
+ "application/rpki-roa": {
+ "source": "iana",
+ "extensions": ["roa"]
+ },
+ "application/rpki-updown": {
+ "source": "iana"
+ },
+ "application/rsd+xml": {
+ "source": "apache",
+ "extensions": ["rsd"]
+ },
+ "application/rss+xml": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["rss"]
+ },
+ "application/rtf": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rtf"]
+ },
+ "application/rtploopback": {
+ "source": "iana"
+ },
+ "application/rtx": {
+ "source": "iana"
+ },
+ "application/samlassertion+xml": {
+ "source": "iana"
+ },
+ "application/samlmetadata+xml": {
+ "source": "iana"
+ },
+ "application/sbml+xml": {
+ "source": "iana",
+ "extensions": ["sbml"]
+ },
+ "application/scaip+xml": {
+ "source": "iana"
+ },
+ "application/scim+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/scvp-cv-request": {
+ "source": "iana",
+ "extensions": ["scq"]
+ },
+ "application/scvp-cv-response": {
+ "source": "iana",
+ "extensions": ["scs"]
+ },
+ "application/scvp-vp-request": {
+ "source": "iana",
+ "extensions": ["spq"]
+ },
+ "application/scvp-vp-response": {
+ "source": "iana",
+ "extensions": ["spp"]
+ },
+ "application/sdp": {
+ "source": "iana",
+ "extensions": ["sdp"]
+ },
+ "application/sep+xml": {
+ "source": "iana"
+ },
+ "application/sep-exi": {
+ "source": "iana"
+ },
+ "application/session-info": {
+ "source": "iana"
+ },
+ "application/set-payment": {
+ "source": "iana"
+ },
+ "application/set-payment-initiation": {
+ "source": "iana",
+ "extensions": ["setpay"]
+ },
+ "application/set-registration": {
+ "source": "iana"
+ },
+ "application/set-registration-initiation": {
+ "source": "iana",
+ "extensions": ["setreg"]
+ },
+ "application/sgml": {
+ "source": "iana"
+ },
+ "application/sgml-open-catalog": {
+ "source": "iana"
+ },
+ "application/shf+xml": {
+ "source": "iana",
+ "extensions": ["shf"]
+ },
+ "application/sieve": {
+ "source": "iana"
+ },
+ "application/simple-filter+xml": {
+ "source": "iana"
+ },
+ "application/simple-message-summary": {
+ "source": "iana"
+ },
+ "application/simplesymbolcontainer": {
+ "source": "iana"
+ },
+ "application/slate": {
+ "source": "iana"
+ },
+ "application/smil": {
+ "source": "iana"
+ },
+ "application/smil+xml": {
+ "source": "iana",
+ "extensions": ["smi","smil"]
+ },
+ "application/smpte336m": {
+ "source": "iana"
+ },
+ "application/soap+fastinfoset": {
+ "source": "iana"
+ },
+ "application/soap+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/sparql-query": {
+ "source": "iana",
+ "extensions": ["rq"]
+ },
+ "application/sparql-results+xml": {
+ "source": "iana",
+ "extensions": ["srx"]
+ },
+ "application/spirits-event+xml": {
+ "source": "iana"
+ },
+ "application/sql": {
+ "source": "iana"
+ },
+ "application/srgs": {
+ "source": "iana",
+ "extensions": ["gram"]
+ },
+ "application/srgs+xml": {
+ "source": "iana",
+ "extensions": ["grxml"]
+ },
+ "application/sru+xml": {
+ "source": "iana",
+ "extensions": ["sru"]
+ },
+ "application/ssdl+xml": {
+ "source": "apache",
+ "extensions": ["ssdl"]
+ },
+ "application/ssml+xml": {
+ "source": "iana",
+ "extensions": ["ssml"]
+ },
+ "application/tamp-apex-update": {
+ "source": "iana"
+ },
+ "application/tamp-apex-update-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-community-update": {
+ "source": "iana"
+ },
+ "application/tamp-community-update-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-error": {
+ "source": "iana"
+ },
+ "application/tamp-sequence-adjust": {
+ "source": "iana"
+ },
+ "application/tamp-sequence-adjust-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-status-query": {
+ "source": "iana"
+ },
+ "application/tamp-status-response": {
+ "source": "iana"
+ },
+ "application/tamp-update": {
+ "source": "iana"
+ },
+ "application/tamp-update-confirm": {
+ "source": "iana"
+ },
+ "application/tar": {
+ "compressible": true
+ },
+ "application/tei+xml": {
+ "source": "iana",
+ "extensions": ["tei","teicorpus"]
+ },
+ "application/thraud+xml": {
+ "source": "iana",
+ "extensions": ["tfi"]
+ },
+ "application/timestamp-query": {
+ "source": "iana"
+ },
+ "application/timestamp-reply": {
+ "source": "iana"
+ },
+ "application/timestamped-data": {
+ "source": "iana",
+ "extensions": ["tsd"]
+ },
+ "application/ttml+xml": {
+ "source": "iana"
+ },
+ "application/tve-trigger": {
+ "source": "iana"
+ },
+ "application/ulpfec": {
+ "source": "iana"
+ },
+ "application/urc-grpsheet+xml": {
+ "source": "iana"
+ },
+ "application/urc-ressheet+xml": {
+ "source": "iana"
+ },
+ "application/urc-targetdesc+xml": {
+ "source": "iana"
+ },
+ "application/urc-uisocketdesc+xml": {
+ "source": "iana"
+ },
+ "application/vcard+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vcard+xml": {
+ "source": "iana"
+ },
+ "application/vemmi": {
+ "source": "iana"
+ },
+ "application/vividence.scriptfile": {
+ "source": "apache"
+ },
+ "application/vnd.3gpp-prose+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp-prose-pc3ch+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.access-transfer-events+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.bsf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.mid-call+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.pic-bw-large": {
+ "source": "iana",
+ "extensions": ["plb"]
+ },
+ "application/vnd.3gpp.pic-bw-small": {
+ "source": "iana",
+ "extensions": ["psb"]
+ },
+ "application/vnd.3gpp.pic-bw-var": {
+ "source": "iana",
+ "extensions": ["pvb"]
+ },
+ "application/vnd.3gpp.sms": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.sms+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.srvcc-ext+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.srvcc-info+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.state-and-event-info+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.ussd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp2.bcmcsinfo+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp2.sms": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp2.tcap": {
+ "source": "iana",
+ "extensions": ["tcap"]
+ },
+ "application/vnd.3lightssoftware.imagescal": {
+ "source": "iana"
+ },
+ "application/vnd.3m.post-it-notes": {
+ "source": "iana",
+ "extensions": ["pwn"]
+ },
+ "application/vnd.accpac.simply.aso": {
+ "source": "iana",
+ "extensions": ["aso"]
+ },
+ "application/vnd.accpac.simply.imp": {
+ "source": "iana",
+ "extensions": ["imp"]
+ },
+ "application/vnd.acucobol": {
+ "source": "iana",
+ "extensions": ["acu"]
+ },
+ "application/vnd.acucorp": {
+ "source": "iana",
+ "extensions": ["atc","acutc"]
+ },
+ "application/vnd.adobe.air-application-installer-package+zip": {
+ "source": "apache",
+ "extensions": ["air"]
+ },
+ "application/vnd.adobe.flash.movie": {
+ "source": "iana"
+ },
+ "application/vnd.adobe.formscentral.fcdt": {
+ "source": "iana",
+ "extensions": ["fcdt"]
+ },
+ "application/vnd.adobe.fxp": {
+ "source": "iana",
+ "extensions": ["fxp","fxpl"]
+ },
+ "application/vnd.adobe.partial-upload": {
+ "source": "iana"
+ },
+ "application/vnd.adobe.xdp+xml": {
+ "source": "iana",
+ "extensions": ["xdp"]
+ },
+ "application/vnd.adobe.xfdf": {
+ "source": "iana",
+ "extensions": ["xfdf"]
+ },
+ "application/vnd.aether.imp": {
+ "source": "iana"
+ },
+ "application/vnd.ah-barcode": {
+ "source": "iana"
+ },
+ "application/vnd.ahead.space": {
+ "source": "iana",
+ "extensions": ["ahead"]
+ },
+ "application/vnd.airzip.filesecure.azf": {
+ "source": "iana",
+ "extensions": ["azf"]
+ },
+ "application/vnd.airzip.filesecure.azs": {
+ "source": "iana",
+ "extensions": ["azs"]
+ },
+ "application/vnd.amazon.ebook": {
+ "source": "apache",
+ "extensions": ["azw"]
+ },
+ "application/vnd.amazon.mobi8-ebook": {
+ "source": "iana"
+ },
+ "application/vnd.americandynamics.acc": {
+ "source": "iana",
+ "extensions": ["acc"]
+ },
+ "application/vnd.amiga.ami": {
+ "source": "iana",
+ "extensions": ["ami"]
+ },
+ "application/vnd.amundsen.maze+xml": {
+ "source": "iana"
+ },
+ "application/vnd.android.package-archive": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["apk"]
+ },
+ "application/vnd.anki": {
+ "source": "iana"
+ },
+ "application/vnd.anser-web-certificate-issue-initiation": {
+ "source": "iana",
+ "extensions": ["cii"]
+ },
+ "application/vnd.anser-web-funds-transfer-initiation": {
+ "source": "apache",
+ "extensions": ["fti"]
+ },
+ "application/vnd.antix.game-component": {
+ "source": "iana",
+ "extensions": ["atx"]
+ },
+ "application/vnd.apache.thrift.binary": {
+ "source": "iana"
+ },
+ "application/vnd.apache.thrift.compact": {
+ "source": "iana"
+ },
+ "application/vnd.apache.thrift.json": {
+ "source": "iana"
+ },
+ "application/vnd.api+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.apple.installer+xml": {
+ "source": "iana",
+ "extensions": ["mpkg"]
+ },
+ "application/vnd.apple.mpegurl": {
+ "source": "iana",
+ "extensions": ["m3u8"]
+ },
+ "application/vnd.apple.pkpass": {
+ "compressible": false,
+ "extensions": ["pkpass"]
+ },
+ "application/vnd.arastra.swi": {
+ "source": "iana"
+ },
+ "application/vnd.aristanetworks.swi": {
+ "source": "iana",
+ "extensions": ["swi"]
+ },
+ "application/vnd.artsquare": {
+ "source": "iana"
+ },
+ "application/vnd.astraea-software.iota": {
+ "source": "iana",
+ "extensions": ["iota"]
+ },
+ "application/vnd.audiograph": {
+ "source": "iana",
+ "extensions": ["aep"]
+ },
+ "application/vnd.autopackage": {
+ "source": "iana"
+ },
+ "application/vnd.avistar+xml": {
+ "source": "iana"
+ },
+ "application/vnd.balsamiq.bmml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.balsamiq.bmpr": {
+ "source": "iana"
+ },
+ "application/vnd.bekitzur-stech+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.biopax.rdf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.blueice.multipass": {
+ "source": "iana",
+ "extensions": ["mpm"]
+ },
+ "application/vnd.bluetooth.ep.oob": {
+ "source": "iana"
+ },
+ "application/vnd.bluetooth.le.oob": {
+ "source": "iana"
+ },
+ "application/vnd.bmi": {
+ "source": "iana",
+ "extensions": ["bmi"]
+ },
+ "application/vnd.businessobjects": {
+ "source": "iana",
+ "extensions": ["rep"]
+ },
+ "application/vnd.cab-jscript": {
+ "source": "iana"
+ },
+ "application/vnd.canon-cpdl": {
+ "source": "iana"
+ },
+ "application/vnd.canon-lips": {
+ "source": "iana"
+ },
+ "application/vnd.cendio.thinlinc.clientconf": {
+ "source": "iana"
+ },
+ "application/vnd.century-systems.tcp_stream": {
+ "source": "iana"
+ },
+ "application/vnd.chemdraw+xml": {
+ "source": "iana",
+ "extensions": ["cdxml"]
+ },
+ "application/vnd.chess-pgn": {
+ "source": "iana"
+ },
+ "application/vnd.chipnuts.karaoke-mmd": {
+ "source": "iana",
+ "extensions": ["mmd"]
+ },
+ "application/vnd.cinderella": {
+ "source": "iana",
+ "extensions": ["cdy"]
+ },
+ "application/vnd.cirpack.isdn-ext": {
+ "source": "iana"
+ },
+ "application/vnd.citationstyles.style+xml": {
+ "source": "iana"
+ },
+ "application/vnd.claymore": {
+ "source": "iana",
+ "extensions": ["cla"]
+ },
+ "application/vnd.cloanto.rp9": {
+ "source": "iana",
+ "extensions": ["rp9"]
+ },
+ "application/vnd.clonk.c4group": {
+ "source": "iana",
+ "extensions": ["c4g","c4d","c4f","c4p","c4u"]
+ },
+ "application/vnd.cluetrust.cartomobile-config": {
+ "source": "iana",
+ "extensions": ["c11amc"]
+ },
+ "application/vnd.cluetrust.cartomobile-config-pkg": {
+ "source": "iana",
+ "extensions": ["c11amz"]
+ },
+ "application/vnd.coffeescript": {
+ "source": "iana"
+ },
+ "application/vnd.collection+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.collection.doc+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.collection.next+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.comicbook+zip": {
+ "source": "iana"
+ },
+ "application/vnd.commerce-battelle": {
+ "source": "iana"
+ },
+ "application/vnd.commonspace": {
+ "source": "iana",
+ "extensions": ["csp"]
+ },
+ "application/vnd.contact.cmsg": {
+ "source": "iana",
+ "extensions": ["cdbcmsg"]
+ },
+ "application/vnd.coreos.ignition+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.cosmocaller": {
+ "source": "iana",
+ "extensions": ["cmc"]
+ },
+ "application/vnd.crick.clicker": {
+ "source": "iana",
+ "extensions": ["clkx"]
+ },
+ "application/vnd.crick.clicker.keyboard": {
+ "source": "iana",
+ "extensions": ["clkk"]
+ },
+ "application/vnd.crick.clicker.palette": {
+ "source": "iana",
+ "extensions": ["clkp"]
+ },
+ "application/vnd.crick.clicker.template": {
+ "source": "iana",
+ "extensions": ["clkt"]
+ },
+ "application/vnd.crick.clicker.wordbank": {
+ "source": "iana",
+ "extensions": ["clkw"]
+ },
+ "application/vnd.criticaltools.wbs+xml": {
+ "source": "iana",
+ "extensions": ["wbs"]
+ },
+ "application/vnd.ctc-posml": {
+ "source": "iana",
+ "extensions": ["pml"]
+ },
+ "application/vnd.ctct.ws+xml": {
+ "source": "iana"
+ },
+ "application/vnd.cups-pdf": {
+ "source": "iana"
+ },
+ "application/vnd.cups-postscript": {
+ "source": "iana"
+ },
+ "application/vnd.cups-ppd": {
+ "source": "iana",
+ "extensions": ["ppd"]
+ },
+ "application/vnd.cups-raster": {
+ "source": "iana"
+ },
+ "application/vnd.cups-raw": {
+ "source": "iana"
+ },
+ "application/vnd.curl": {
+ "source": "iana"
+ },
+ "application/vnd.curl.car": {
+ "source": "apache",
+ "extensions": ["car"]
+ },
+ "application/vnd.curl.pcurl": {
+ "source": "apache",
+ "extensions": ["pcurl"]
+ },
+ "application/vnd.cyan.dean.root+xml": {
+ "source": "iana"
+ },
+ "application/vnd.cybank": {
+ "source": "iana"
+ },
+ "application/vnd.d2l.coursepackage1p0+zip": {
+ "source": "iana"
+ },
+ "application/vnd.dart": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["dart"]
+ },
+ "application/vnd.data-vision.rdz": {
+ "source": "iana",
+ "extensions": ["rdz"]
+ },
+ "application/vnd.debian.binary-package": {
+ "source": "iana"
+ },
+ "application/vnd.dece.data": {
+ "source": "iana",
+ "extensions": ["uvf","uvvf","uvd","uvvd"]
+ },
+ "application/vnd.dece.ttml+xml": {
+ "source": "iana",
+ "extensions": ["uvt","uvvt"]
+ },
+ "application/vnd.dece.unspecified": {
+ "source": "iana",
+ "extensions": ["uvx","uvvx"]
+ },
+ "application/vnd.dece.zip": {
+ "source": "iana",
+ "extensions": ["uvz","uvvz"]
+ },
+ "application/vnd.denovo.fcselayout-link": {
+ "source": "iana",
+ "extensions": ["fe_launch"]
+ },
+ "application/vnd.desmume-movie": {
+ "source": "iana"
+ },
+ "application/vnd.desmume.movie": {
+ "source": "apache"
+ },
+ "application/vnd.dir-bi.plate-dl-nosuffix": {
+ "source": "iana"
+ },
+ "application/vnd.dm.delegation+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dna": {
+ "source": "iana",
+ "extensions": ["dna"]
+ },
+ "application/vnd.document+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.dolby.mlp": {
+ "source": "apache",
+ "extensions": ["mlp"]
+ },
+ "application/vnd.dolby.mobile.1": {
+ "source": "iana"
+ },
+ "application/vnd.dolby.mobile.2": {
+ "source": "iana"
+ },
+ "application/vnd.doremir.scorecloud-binary-document": {
+ "source": "iana"
+ },
+ "application/vnd.dpgraph": {
+ "source": "iana",
+ "extensions": ["dpg"]
+ },
+ "application/vnd.dreamfactory": {
+ "source": "iana",
+ "extensions": ["dfac"]
+ },
+ "application/vnd.drive+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ds-keypoint": {
+ "source": "apache",
+ "extensions": ["kpxx"]
+ },
+ "application/vnd.dtg.local": {
+ "source": "iana"
+ },
+ "application/vnd.dtg.local.flash": {
+ "source": "iana"
+ },
+ "application/vnd.dtg.local.html": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ait": {
+ "source": "iana",
+ "extensions": ["ait"]
+ },
+ "application/vnd.dvb.dvbj": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.esgcontainer": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcdftnotifaccess": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgaccess": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgaccess2": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgpdd": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcroaming": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.iptv.alfec-base": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.iptv.alfec-enhancement": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-aggregate-root+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-container+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-generic+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-ia-msglist+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-ia-registration-request+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-ia-registration-response+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-init+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.pfr": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.service": {
+ "source": "iana",
+ "extensions": ["svc"]
+ },
+ "application/vnd.dxr": {
+ "source": "iana"
+ },
+ "application/vnd.dynageo": {
+ "source": "iana",
+ "extensions": ["geo"]
+ },
+ "application/vnd.dzr": {
+ "source": "iana"
+ },
+ "application/vnd.easykaraoke.cdgdownload": {
+ "source": "iana"
+ },
+ "application/vnd.ecdis-update": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.chart": {
+ "source": "iana",
+ "extensions": ["mag"]
+ },
+ "application/vnd.ecowin.filerequest": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.fileupdate": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.series": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.seriesrequest": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.seriesupdate": {
+ "source": "iana"
+ },
+ "application/vnd.emclient.accessrequest+xml": {
+ "source": "iana"
+ },
+ "application/vnd.enliven": {
+ "source": "iana",
+ "extensions": ["nml"]
+ },
+ "application/vnd.enphase.envoy": {
+ "source": "iana"
+ },
+ "application/vnd.eprints.data+xml": {
+ "source": "iana"
+ },
+ "application/vnd.epson.esf": {
+ "source": "iana",
+ "extensions": ["esf"]
+ },
+ "application/vnd.epson.msf": {
+ "source": "iana",
+ "extensions": ["msf"]
+ },
+ "application/vnd.epson.quickanime": {
+ "source": "iana",
+ "extensions": ["qam"]
+ },
+ "application/vnd.epson.salt": {
+ "source": "iana",
+ "extensions": ["slt"]
+ },
+ "application/vnd.epson.ssf": {
+ "source": "iana",
+ "extensions": ["ssf"]
+ },
+ "application/vnd.ericsson.quickcall": {
+ "source": "iana"
+ },
+ "application/vnd.espass-espass+zip": {
+ "source": "iana"
+ },
+ "application/vnd.eszigno3+xml": {
+ "source": "iana",
+ "extensions": ["es3","et3"]
+ },
+ "application/vnd.etsi.aoc+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.asic-e+zip": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.asic-s+zip": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.cug+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvcommand+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvdiscovery+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsad-bc+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsad-cod+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsad-npvr+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvservice+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsync+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvueprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.mcid+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.mheg5": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.overload-control-policy-dataset+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.pstn+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.sci+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.simservs+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.timestamp-token": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.tsl+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.tsl.der": {
+ "source": "iana"
+ },
+ "application/vnd.eudora.data": {
+ "source": "iana"
+ },
+ "application/vnd.ezpix-album": {
+ "source": "iana",
+ "extensions": ["ez2"]
+ },
+ "application/vnd.ezpix-package": {
+ "source": "iana",
+ "extensions": ["ez3"]
+ },
+ "application/vnd.f-secure.mobile": {
+ "source": "iana"
+ },
+ "application/vnd.fastcopy-disk-image": {
+ "source": "iana"
+ },
+ "application/vnd.fdf": {
+ "source": "iana",
+ "extensions": ["fdf"]
+ },
+ "application/vnd.fdsn.mseed": {
+ "source": "iana",
+ "extensions": ["mseed"]
+ },
+ "application/vnd.fdsn.seed": {
+ "source": "iana",
+ "extensions": ["seed","dataless"]
+ },
+ "application/vnd.ffsns": {
+ "source": "iana"
+ },
+ "application/vnd.filmit.zfc": {
+ "source": "iana"
+ },
+ "application/vnd.fints": {
+ "source": "iana"
+ },
+ "application/vnd.firemonkeys.cloudcell": {
+ "source": "iana"
+ },
+ "application/vnd.flographit": {
+ "source": "iana",
+ "extensions": ["gph"]
+ },
+ "application/vnd.fluxtime.clip": {
+ "source": "iana",
+ "extensions": ["ftc"]
+ },
+ "application/vnd.font-fontforge-sfd": {
+ "source": "iana"
+ },
+ "application/vnd.framemaker": {
+ "source": "iana",
+ "extensions": ["fm","frame","maker","book"]
+ },
+ "application/vnd.frogans.fnc": {
+ "source": "iana",
+ "extensions": ["fnc"]
+ },
+ "application/vnd.frogans.ltf": {
+ "source": "iana",
+ "extensions": ["ltf"]
+ },
+ "application/vnd.fsc.weblaunch": {
+ "source": "iana",
+ "extensions": ["fsc"]
+ },
+ "application/vnd.fujitsu.oasys": {
+ "source": "iana",
+ "extensions": ["oas"]
+ },
+ "application/vnd.fujitsu.oasys2": {
+ "source": "iana",
+ "extensions": ["oa2"]
+ },
+ "application/vnd.fujitsu.oasys3": {
+ "source": "iana",
+ "extensions": ["oa3"]
+ },
+ "application/vnd.fujitsu.oasysgp": {
+ "source": "iana",
+ "extensions": ["fg5"]
+ },
+ "application/vnd.fujitsu.oasysprs": {
+ "source": "iana",
+ "extensions": ["bh2"]
+ },
+ "application/vnd.fujixerox.art-ex": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.art4": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.ddd": {
+ "source": "iana",
+ "extensions": ["ddd"]
+ },
+ "application/vnd.fujixerox.docuworks": {
+ "source": "iana",
+ "extensions": ["xdw"]
+ },
+ "application/vnd.fujixerox.docuworks.binder": {
+ "source": "iana",
+ "extensions": ["xbd"]
+ },
+ "application/vnd.fujixerox.docuworks.container": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.hbpl": {
+ "source": "iana"
+ },
+ "application/vnd.fut-misnet": {
+ "source": "iana"
+ },
+ "application/vnd.fuzzysheet": {
+ "source": "iana",
+ "extensions": ["fzs"]
+ },
+ "application/vnd.genomatix.tuxedo": {
+ "source": "iana",
+ "extensions": ["txd"]
+ },
+ "application/vnd.geo+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.geocube+xml": {
+ "source": "iana"
+ },
+ "application/vnd.geogebra.file": {
+ "source": "iana",
+ "extensions": ["ggb"]
+ },
+ "application/vnd.geogebra.tool": {
+ "source": "iana",
+ "extensions": ["ggt"]
+ },
+ "application/vnd.geometry-explorer": {
+ "source": "iana",
+ "extensions": ["gex","gre"]
+ },
+ "application/vnd.geonext": {
+ "source": "iana",
+ "extensions": ["gxt"]
+ },
+ "application/vnd.geoplan": {
+ "source": "iana",
+ "extensions": ["g2w"]
+ },
+ "application/vnd.geospace": {
+ "source": "iana",
+ "extensions": ["g3w"]
+ },
+ "application/vnd.gerber": {
+ "source": "iana"
+ },
+ "application/vnd.globalplatform.card-content-mgt": {
+ "source": "iana"
+ },
+ "application/vnd.globalplatform.card-content-mgt-response": {
+ "source": "iana"
+ },
+ "application/vnd.gmx": {
+ "source": "iana",
+ "extensions": ["gmx"]
+ },
+ "application/vnd.google-apps.document": {
+ "compressible": false,
+ "extensions": ["gdoc"]
+ },
+ "application/vnd.google-apps.presentation": {
+ "compressible": false,
+ "extensions": ["gslides"]
+ },
+ "application/vnd.google-apps.spreadsheet": {
+ "compressible": false,
+ "extensions": ["gsheet"]
+ },
+ "application/vnd.google-earth.kml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["kml"]
+ },
+ "application/vnd.google-earth.kmz": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["kmz"]
+ },
+ "application/vnd.gov.sk.e-form+xml": {
+ "source": "iana"
+ },
+ "application/vnd.gov.sk.e-form+zip": {
+ "source": "iana"
+ },
+ "application/vnd.gov.sk.xmldatacontainer+xml": {
+ "source": "iana"
+ },
+ "application/vnd.grafeq": {
+ "source": "iana",
+ "extensions": ["gqf","gqs"]
+ },
+ "application/vnd.gridmp": {
+ "source": "iana"
+ },
+ "application/vnd.groove-account": {
+ "source": "iana",
+ "extensions": ["gac"]
+ },
+ "application/vnd.groove-help": {
+ "source": "iana",
+ "extensions": ["ghf"]
+ },
+ "application/vnd.groove-identity-message": {
+ "source": "iana",
+ "extensions": ["gim"]
+ },
+ "application/vnd.groove-injector": {
+ "source": "iana",
+ "extensions": ["grv"]
+ },
+ "application/vnd.groove-tool-message": {
+ "source": "iana",
+ "extensions": ["gtm"]
+ },
+ "application/vnd.groove-tool-template": {
+ "source": "iana",
+ "extensions": ["tpl"]
+ },
+ "application/vnd.groove-vcard": {
+ "source": "iana",
+ "extensions": ["vcg"]
+ },
+ "application/vnd.hal+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hal+xml": {
+ "source": "iana",
+ "extensions": ["hal"]
+ },
+ "application/vnd.handheld-entertainment+xml": {
+ "source": "iana",
+ "extensions": ["zmm"]
+ },
+ "application/vnd.hbci": {
+ "source": "iana",
+ "extensions": ["hbci"]
+ },
+ "application/vnd.hcl-bireports": {
+ "source": "iana"
+ },
+ "application/vnd.hdt": {
+ "source": "iana"
+ },
+ "application/vnd.heroku+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hhe.lesson-player": {
+ "source": "iana",
+ "extensions": ["les"]
+ },
+ "application/vnd.hp-hpgl": {
+ "source": "iana",
+ "extensions": ["hpgl"]
+ },
+ "application/vnd.hp-hpid": {
+ "source": "iana",
+ "extensions": ["hpid"]
+ },
+ "application/vnd.hp-hps": {
+ "source": "iana",
+ "extensions": ["hps"]
+ },
+ "application/vnd.hp-jlyt": {
+ "source": "iana",
+ "extensions": ["jlt"]
+ },
+ "application/vnd.hp-pcl": {
+ "source": "iana",
+ "extensions": ["pcl"]
+ },
+ "application/vnd.hp-pclxl": {
+ "source": "iana",
+ "extensions": ["pclxl"]
+ },
+ "application/vnd.httphone": {
+ "source": "iana"
+ },
+ "application/vnd.hydrostatix.sof-data": {
+ "source": "iana",
+ "extensions": ["sfd-hdstx"]
+ },
+ "application/vnd.hyperdrive+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hzn-3d-crossword": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.afplinedata": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.electronic-media": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.minipay": {
+ "source": "iana",
+ "extensions": ["mpy"]
+ },
+ "application/vnd.ibm.modcap": {
+ "source": "iana",
+ "extensions": ["afp","listafp","list3820"]
+ },
+ "application/vnd.ibm.rights-management": {
+ "source": "iana",
+ "extensions": ["irm"]
+ },
+ "application/vnd.ibm.secure-container": {
+ "source": "iana",
+ "extensions": ["sc"]
+ },
+ "application/vnd.iccprofile": {
+ "source": "iana",
+ "extensions": ["icc","icm"]
+ },
+ "application/vnd.ieee.1905": {
+ "source": "iana"
+ },
+ "application/vnd.igloader": {
+ "source": "iana",
+ "extensions": ["igl"]
+ },
+ "application/vnd.immervision-ivp": {
+ "source": "iana",
+ "extensions": ["ivp"]
+ },
+ "application/vnd.immervision-ivu": {
+ "source": "iana",
+ "extensions": ["ivu"]
+ },
+ "application/vnd.ims.imsccv1p1": {
+ "source": "iana"
+ },
+ "application/vnd.ims.imsccv1p2": {
+ "source": "iana"
+ },
+ "application/vnd.ims.imsccv1p3": {
+ "source": "iana"
+ },
+ "application/vnd.ims.lis.v2.result+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolconsumerprofile+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolproxy+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolproxy.id+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolsettings+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolsettings.simple+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.informedcontrol.rms+xml": {
+ "source": "iana"
+ },
+ "application/vnd.informix-visionary": {
+ "source": "iana"
+ },
+ "application/vnd.infotech.project": {
+ "source": "iana"
+ },
+ "application/vnd.infotech.project+xml": {
+ "source": "iana"
+ },
+ "application/vnd.innopath.wamp.notification": {
+ "source": "iana"
+ },
+ "application/vnd.insors.igm": {
+ "source": "iana",
+ "extensions": ["igm"]
+ },
+ "application/vnd.intercon.formnet": {
+ "source": "iana",
+ "extensions": ["xpw","xpx"]
+ },
+ "application/vnd.intergeo": {
+ "source": "iana",
+ "extensions": ["i2g"]
+ },
+ "application/vnd.intertrust.digibox": {
+ "source": "iana"
+ },
+ "application/vnd.intertrust.nncp": {
+ "source": "iana"
+ },
+ "application/vnd.intu.qbo": {
+ "source": "iana",
+ "extensions": ["qbo"]
+ },
+ "application/vnd.intu.qfx": {
+ "source": "iana",
+ "extensions": ["qfx"]
+ },
+ "application/vnd.iptc.g2.catalogitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.conceptitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.knowledgeitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.newsitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.newsmessage+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.packageitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.planningitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ipunplugged.rcprofile": {
+ "source": "iana",
+ "extensions": ["rcprofile"]
+ },
+ "application/vnd.irepository.package+xml": {
+ "source": "iana",
+ "extensions": ["irp"]
+ },
+ "application/vnd.is-xpr": {
+ "source": "iana",
+ "extensions": ["xpr"]
+ },
+ "application/vnd.isac.fcs": {
+ "source": "iana",
+ "extensions": ["fcs"]
+ },
+ "application/vnd.jam": {
+ "source": "iana",
+ "extensions": ["jam"]
+ },
+ "application/vnd.japannet-directory-service": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-jpnstore-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-payment-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-registration": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-registration-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-setstore-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-verification": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-verification-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.jcp.javame.midlet-rms": {
+ "source": "iana",
+ "extensions": ["rms"]
+ },
+ "application/vnd.jisp": {
+ "source": "iana",
+ "extensions": ["jisp"]
+ },
+ "application/vnd.joost.joda-archive": {
+ "source": "iana",
+ "extensions": ["joda"]
+ },
+ "application/vnd.jsk.isdn-ngn": {
+ "source": "iana"
+ },
+ "application/vnd.kahootz": {
+ "source": "iana",
+ "extensions": ["ktz","ktr"]
+ },
+ "application/vnd.kde.karbon": {
+ "source": "iana",
+ "extensions": ["karbon"]
+ },
+ "application/vnd.kde.kchart": {
+ "source": "iana",
+ "extensions": ["chrt"]
+ },
+ "application/vnd.kde.kformula": {
+ "source": "iana",
+ "extensions": ["kfo"]
+ },
+ "application/vnd.kde.kivio": {
+ "source": "iana",
+ "extensions": ["flw"]
+ },
+ "application/vnd.kde.kontour": {
+ "source": "iana",
+ "extensions": ["kon"]
+ },
+ "application/vnd.kde.kpresenter": {
+ "source": "iana",
+ "extensions": ["kpr","kpt"]
+ },
+ "application/vnd.kde.kspread": {
+ "source": "iana",
+ "extensions": ["ksp"]
+ },
+ "application/vnd.kde.kword": {
+ "source": "iana",
+ "extensions": ["kwd","kwt"]
+ },
+ "application/vnd.kenameaapp": {
+ "source": "iana",
+ "extensions": ["htke"]
+ },
+ "application/vnd.kidspiration": {
+ "source": "iana",
+ "extensions": ["kia"]
+ },
+ "application/vnd.kinar": {
+ "source": "iana",
+ "extensions": ["kne","knp"]
+ },
+ "application/vnd.koan": {
+ "source": "iana",
+ "extensions": ["skp","skd","skt","skm"]
+ },
+ "application/vnd.kodak-descriptor": {
+ "source": "iana",
+ "extensions": ["sse"]
+ },
+ "application/vnd.las.las+xml": {
+ "source": "iana",
+ "extensions": ["lasxml"]
+ },
+ "application/vnd.liberty-request+xml": {
+ "source": "iana"
+ },
+ "application/vnd.llamagraphics.life-balance.desktop": {
+ "source": "iana",
+ "extensions": ["lbd"]
+ },
+ "application/vnd.llamagraphics.life-balance.exchange+xml": {
+ "source": "iana",
+ "extensions": ["lbe"]
+ },
+ "application/vnd.lotus-1-2-3": {
+ "source": "iana",
+ "extensions": ["123"]
+ },
+ "application/vnd.lotus-approach": {
+ "source": "iana",
+ "extensions": ["apr"]
+ },
+ "application/vnd.lotus-freelance": {
+ "source": "iana",
+ "extensions": ["pre"]
+ },
+ "application/vnd.lotus-notes": {
+ "source": "iana",
+ "extensions": ["nsf"]
+ },
+ "application/vnd.lotus-organizer": {
+ "source": "iana",
+ "extensions": ["org"]
+ },
+ "application/vnd.lotus-screencam": {
+ "source": "iana",
+ "extensions": ["scm"]
+ },
+ "application/vnd.lotus-wordpro": {
+ "source": "iana",
+ "extensions": ["lwp"]
+ },
+ "application/vnd.macports.portpkg": {
+ "source": "iana",
+ "extensions": ["portpkg"]
+ },
+ "application/vnd.mapbox-vector-tile": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.actiontoken+xml": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.conftoken+xml": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.license+xml": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.mdcf": {
+ "source": "iana"
+ },
+ "application/vnd.mason+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.maxmind.maxmind-db": {
+ "source": "iana"
+ },
+ "application/vnd.mcd": {
+ "source": "iana",
+ "extensions": ["mcd"]
+ },
+ "application/vnd.medcalcdata": {
+ "source": "iana",
+ "extensions": ["mc1"]
+ },
+ "application/vnd.mediastation.cdkey": {
+ "source": "iana",
+ "extensions": ["cdkey"]
+ },
+ "application/vnd.meridian-slingshot": {
+ "source": "iana"
+ },
+ "application/vnd.mfer": {
+ "source": "iana",
+ "extensions": ["mwf"]
+ },
+ "application/vnd.mfmp": {
+ "source": "iana",
+ "extensions": ["mfm"]
+ },
+ "application/vnd.micro+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.micrografx.flo": {
+ "source": "iana",
+ "extensions": ["flo"]
+ },
+ "application/vnd.micrografx.igx": {
+ "source": "iana",
+ "extensions": ["igx"]
+ },
+ "application/vnd.microsoft.portable-executable": {
+ "source": "iana"
+ },
+ "application/vnd.miele+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.mif": {
+ "source": "iana",
+ "extensions": ["mif"]
+ },
+ "application/vnd.minisoft-hp3000-save": {
+ "source": "iana"
+ },
+ "application/vnd.mitsubishi.misty-guard.trustweb": {
+ "source": "iana"
+ },
+ "application/vnd.mobius.daf": {
+ "source": "iana",
+ "extensions": ["daf"]
+ },
+ "application/vnd.mobius.dis": {
+ "source": "iana",
+ "extensions": ["dis"]
+ },
+ "application/vnd.mobius.mbk": {
+ "source": "iana",
+ "extensions": ["mbk"]
+ },
+ "application/vnd.mobius.mqy": {
+ "source": "iana",
+ "extensions": ["mqy"]
+ },
+ "application/vnd.mobius.msl": {
+ "source": "iana",
+ "extensions": ["msl"]
+ },
+ "application/vnd.mobius.plc": {
+ "source": "iana",
+ "extensions": ["plc"]
+ },
+ "application/vnd.mobius.txf": {
+ "source": "iana",
+ "extensions": ["txf"]
+ },
+ "application/vnd.mophun.application": {
+ "source": "iana",
+ "extensions": ["mpn"]
+ },
+ "application/vnd.mophun.certificate": {
+ "source": "iana",
+ "extensions": ["mpc"]
+ },
+ "application/vnd.motorola.flexsuite": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.adsi": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.fis": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.gotap": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.kmr": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.ttc": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.wem": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.iprm": {
+ "source": "iana"
+ },
+ "application/vnd.mozilla.xul+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xul"]
+ },
+ "application/vnd.ms-3mfdocument": {
+ "source": "iana"
+ },
+ "application/vnd.ms-artgalry": {
+ "source": "iana",
+ "extensions": ["cil"]
+ },
+ "application/vnd.ms-asf": {
+ "source": "iana"
+ },
+ "application/vnd.ms-cab-compressed": {
+ "source": "iana",
+ "extensions": ["cab"]
+ },
+ "application/vnd.ms-color.iccprofile": {
+ "source": "apache"
+ },
+ "application/vnd.ms-excel": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xls","xlm","xla","xlc","xlt","xlw"]
+ },
+ "application/vnd.ms-excel.addin.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlam"]
+ },
+ "application/vnd.ms-excel.sheet.binary.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlsb"]
+ },
+ "application/vnd.ms-excel.sheet.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlsm"]
+ },
+ "application/vnd.ms-excel.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xltm"]
+ },
+ "application/vnd.ms-fontobject": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["eot"]
+ },
+ "application/vnd.ms-htmlhelp": {
+ "source": "iana",
+ "extensions": ["chm"]
+ },
+ "application/vnd.ms-ims": {
+ "source": "iana",
+ "extensions": ["ims"]
+ },
+ "application/vnd.ms-lrm": {
+ "source": "iana",
+ "extensions": ["lrm"]
+ },
+ "application/vnd.ms-office.activex+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ms-officetheme": {
+ "source": "iana",
+ "extensions": ["thmx"]
+ },
+ "application/vnd.ms-opentype": {
+ "source": "apache",
+ "compressible": true
+ },
+ "application/vnd.ms-package.obfuscated-opentype": {
+ "source": "apache"
+ },
+ "application/vnd.ms-pki.seccat": {
+ "source": "apache",
+ "extensions": ["cat"]
+ },
+ "application/vnd.ms-pki.stl": {
+ "source": "apache",
+ "extensions": ["stl"]
+ },
+ "application/vnd.ms-playready.initiator+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ms-powerpoint": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ppt","pps","pot"]
+ },
+ "application/vnd.ms-powerpoint.addin.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["ppam"]
+ },
+ "application/vnd.ms-powerpoint.presentation.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["pptm"]
+ },
+ "application/vnd.ms-powerpoint.slide.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["sldm"]
+ },
+ "application/vnd.ms-powerpoint.slideshow.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["ppsm"]
+ },
+ "application/vnd.ms-powerpoint.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["potm"]
+ },
+ "application/vnd.ms-printdevicecapabilities+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ms-printing.printticket+xml": {
+ "source": "apache"
+ },
+ "application/vnd.ms-printschematicket+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ms-project": {
+ "source": "iana",
+ "extensions": ["mpp","mpt"]
+ },
+ "application/vnd.ms-tnef": {
+ "source": "iana"
+ },
+ "application/vnd.ms-windows.devicepairing": {
+ "source": "iana"
+ },
+ "application/vnd.ms-windows.nwprinting.oob": {
+ "source": "iana"
+ },
+ "application/vnd.ms-windows.printerpairing": {
+ "source": "iana"
+ },
+ "application/vnd.ms-windows.wsd.oob": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.lic-chlg-req": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.lic-resp": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.meter-chlg-req": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.meter-resp": {
+ "source": "iana"
+ },
+ "application/vnd.ms-word.document.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["docm"]
+ },
+ "application/vnd.ms-word.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["dotm"]
+ },
+ "application/vnd.ms-works": {
+ "source": "iana",
+ "extensions": ["wps","wks","wcm","wdb"]
+ },
+ "application/vnd.ms-wpl": {
+ "source": "iana",
+ "extensions": ["wpl"]
+ },
+ "application/vnd.ms-xpsdocument": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xps"]
+ },
+ "application/vnd.msa-disk-image": {
+ "source": "iana"
+ },
+ "application/vnd.mseq": {
+ "source": "iana",
+ "extensions": ["mseq"]
+ },
+ "application/vnd.msign": {
+ "source": "iana"
+ },
+ "application/vnd.multiad.creator": {
+ "source": "iana"
+ },
+ "application/vnd.multiad.creator.cif": {
+ "source": "iana"
+ },
+ "application/vnd.music-niff": {
+ "source": "iana"
+ },
+ "application/vnd.musician": {
+ "source": "iana",
+ "extensions": ["mus"]
+ },
+ "application/vnd.muvee.style": {
+ "source": "iana",
+ "extensions": ["msty"]
+ },
+ "application/vnd.mynfc": {
+ "source": "iana",
+ "extensions": ["taglet"]
+ },
+ "application/vnd.ncd.control": {
+ "source": "iana"
+ },
+ "application/vnd.ncd.reference": {
+ "source": "iana"
+ },
+ "application/vnd.nearst.inv+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.nervana": {
+ "source": "iana"
+ },
+ "application/vnd.netfpx": {
+ "source": "iana"
+ },
+ "application/vnd.neurolanguage.nlu": {
+ "source": "iana",
+ "extensions": ["nlu"]
+ },
+ "application/vnd.nintendo.nitro.rom": {
+ "source": "iana"
+ },
+ "application/vnd.nintendo.snes.rom": {
+ "source": "iana"
+ },
+ "application/vnd.nitf": {
+ "source": "iana",
+ "extensions": ["ntf","nitf"]
+ },
+ "application/vnd.noblenet-directory": {
+ "source": "iana",
+ "extensions": ["nnd"]
+ },
+ "application/vnd.noblenet-sealer": {
+ "source": "iana",
+ "extensions": ["nns"]
+ },
+ "application/vnd.noblenet-web": {
+ "source": "iana",
+ "extensions": ["nnw"]
+ },
+ "application/vnd.nokia.catalogs": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.conml+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.conml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.iptv.config+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.isds-radio-presets": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmark+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmark+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmarkcollection+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.n-gage.ac+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.n-gage.data": {
+ "source": "iana",
+ "extensions": ["ngdat"]
+ },
+ "application/vnd.nokia.n-gage.symbian.install": {
+ "source": "iana",
+ "extensions": ["n-gage"]
+ },
+ "application/vnd.nokia.ncd": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.pcd+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.pcd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.radio-preset": {
+ "source": "iana",
+ "extensions": ["rpst"]
+ },
+ "application/vnd.nokia.radio-presets": {
+ "source": "iana",
+ "extensions": ["rpss"]
+ },
+ "application/vnd.novadigm.edm": {
+ "source": "iana",
+ "extensions": ["edm"]
+ },
+ "application/vnd.novadigm.edx": {
+ "source": "iana",
+ "extensions": ["edx"]
+ },
+ "application/vnd.novadigm.ext": {
+ "source": "iana",
+ "extensions": ["ext"]
+ },
+ "application/vnd.ntt-local.content-share": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.file-transfer": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.ogw_remote-access": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.sip-ta_remote": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.sip-ta_tcp_stream": {
+ "source": "iana"
+ },
+ "application/vnd.oasis.opendocument.chart": {
+ "source": "iana",
+ "extensions": ["odc"]
+ },
+ "application/vnd.oasis.opendocument.chart-template": {
+ "source": "iana",
+ "extensions": ["otc"]
+ },
+ "application/vnd.oasis.opendocument.database": {
+ "source": "iana",
+ "extensions": ["odb"]
+ },
+ "application/vnd.oasis.opendocument.formula": {
+ "source": "iana",
+ "extensions": ["odf"]
+ },
+ "application/vnd.oasis.opendocument.formula-template": {
+ "source": "iana",
+ "extensions": ["odft"]
+ },
+ "application/vnd.oasis.opendocument.graphics": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odg"]
+ },
+ "application/vnd.oasis.opendocument.graphics-template": {
+ "source": "iana",
+ "extensions": ["otg"]
+ },
+ "application/vnd.oasis.opendocument.image": {
+ "source": "iana",
+ "extensions": ["odi"]
+ },
+ "application/vnd.oasis.opendocument.image-template": {
+ "source": "iana",
+ "extensions": ["oti"]
+ },
+ "application/vnd.oasis.opendocument.presentation": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odp"]
+ },
+ "application/vnd.oasis.opendocument.presentation-template": {
+ "source": "iana",
+ "extensions": ["otp"]
+ },
+ "application/vnd.oasis.opendocument.spreadsheet": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ods"]
+ },
+ "application/vnd.oasis.opendocument.spreadsheet-template": {
+ "source": "iana",
+ "extensions": ["ots"]
+ },
+ "application/vnd.oasis.opendocument.text": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odt"]
+ },
+ "application/vnd.oasis.opendocument.text-master": {
+ "source": "iana",
+ "extensions": ["odm"]
+ },
+ "application/vnd.oasis.opendocument.text-template": {
+ "source": "iana",
+ "extensions": ["ott"]
+ },
+ "application/vnd.oasis.opendocument.text-web": {
+ "source": "iana",
+ "extensions": ["oth"]
+ },
+ "application/vnd.obn": {
+ "source": "iana"
+ },
+ "application/vnd.oftn.l10n+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oipf.contentaccessdownload+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.contentaccessstreaming+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.cspg-hexbinary": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.dae.svg+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.dae.xhtml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.mippvcontrolmessage+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.pae.gem": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.spdiscovery+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.spdlist+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.ueprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.userprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.olpc-sugar": {
+ "source": "iana",
+ "extensions": ["xo"]
+ },
+ "application/vnd.oma-scws-config": {
+ "source": "iana"
+ },
+ "application/vnd.oma-scws-http-request": {
+ "source": "iana"
+ },
+ "application/vnd.oma-scws-http-response": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.associated-procedure-parameter+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.drm-trigger+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.imd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.ltkm": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.notification+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.provisioningtrigger": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgboot": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgdd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgdu": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.simple-symbol-container": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.smartcard-trigger+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sprov+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.stkm": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-address-book+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-feature-handler+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-pcc+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-subs-invite+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-user-prefs+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dcd": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dcdc": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dd2+xml": {
+ "source": "iana",
+ "extensions": ["dd2"]
+ },
+ "application/vnd.oma.drm.risd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.group-usage-list+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.lwm2m+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.lwm2m+tlv": {
+ "source": "iana"
+ },
+ "application/vnd.oma.pal+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.detailed-progress-report+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.final-report+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.groups+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.invocation-descriptor+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.optimized-progress-report+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.push": {
+ "source": "iana"
+ },
+ "application/vnd.oma.scidm.messages+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.xcap-directory+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omads-email+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omads-file+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omads-folder+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omaloc-supl-init": {
+ "source": "iana"
+ },
+ "application/vnd.onepager": {
+ "source": "iana"
+ },
+ "application/vnd.openblox.game+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openblox.game-binary": {
+ "source": "iana"
+ },
+ "application/vnd.openeye.oeb": {
+ "source": "iana"
+ },
+ "application/vnd.openofficeorg.extension": {
+ "source": "apache",
+ "extensions": ["oxt"]
+ },
+ "application/vnd.openstreetmap.data+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.custom-properties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawing+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.extended-properties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml-template": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pptx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slide": {
+ "source": "iana",
+ "extensions": ["sldx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow": {
+ "source": "iana",
+ "extensions": ["ppsx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.template": {
+ "source": "apache",
+ "extensions": ["potx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml-template": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xlsx"]
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.template": {
+ "source": "apache",
+ "extensions": ["xltx"]
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.theme+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.themeoverride+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.vmldrawing": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml-template": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["docx"]
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template": {
+ "source": "apache",
+ "extensions": ["dotx"]
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-package.core-properties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-package.relationships+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oracle.resource+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.orange.indata": {
+ "source": "iana"
+ },
+ "application/vnd.osa.netdeploy": {
+ "source": "iana"
+ },
+ "application/vnd.osgeo.mapguide.package": {
+ "source": "iana",
+ "extensions": ["mgp"]
+ },
+ "application/vnd.osgi.bundle": {
+ "source": "iana"
+ },
+ "application/vnd.osgi.dp": {
+ "source": "iana",
+ "extensions": ["dp"]
+ },
+ "application/vnd.osgi.subsystem": {
+ "source": "iana",
+ "extensions": ["esa"]
+ },
+ "application/vnd.otps.ct-kip+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oxli.countgraph": {
+ "source": "iana"
+ },
+ "application/vnd.pagerduty+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.palm": {
+ "source": "iana",
+ "extensions": ["pdb","pqa","oprc"]
+ },
+ "application/vnd.panoply": {
+ "source": "iana"
+ },
+ "application/vnd.paos+xml": {
+ "source": "iana"
+ },
+ "application/vnd.paos.xml": {
+ "source": "apache"
+ },
+ "application/vnd.pawaafile": {
+ "source": "iana",
+ "extensions": ["paw"]
+ },
+ "application/vnd.pcos": {
+ "source": "iana"
+ },
+ "application/vnd.pg.format": {
+ "source": "iana",
+ "extensions": ["str"]
+ },
+ "application/vnd.pg.osasli": {
+ "source": "iana",
+ "extensions": ["ei6"]
+ },
+ "application/vnd.piaccess.application-licence": {
+ "source": "iana"
+ },
+ "application/vnd.picsel": {
+ "source": "iana",
+ "extensions": ["efif"]
+ },
+ "application/vnd.pmi.widget": {
+ "source": "iana",
+ "extensions": ["wg"]
+ },
+ "application/vnd.poc.group-advertisement+xml": {
+ "source": "iana"
+ },
+ "application/vnd.pocketlearn": {
+ "source": "iana",
+ "extensions": ["plf"]
+ },
+ "application/vnd.powerbuilder6": {
+ "source": "iana",
+ "extensions": ["pbd"]
+ },
+ "application/vnd.powerbuilder6-s": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder7": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder7-s": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder75": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder75-s": {
+ "source": "iana"
+ },
+ "application/vnd.preminet": {
+ "source": "iana"
+ },
+ "application/vnd.previewsystems.box": {
+ "source": "iana",
+ "extensions": ["box"]
+ },
+ "application/vnd.proteus.magazine": {
+ "source": "iana",
+ "extensions": ["mgz"]
+ },
+ "application/vnd.publishare-delta-tree": {
+ "source": "iana",
+ "extensions": ["qps"]
+ },
+ "application/vnd.pvi.ptid1": {
+ "source": "iana",
+ "extensions": ["ptid"]
+ },
+ "application/vnd.pwg-multiplexed": {
+ "source": "iana"
+ },
+ "application/vnd.pwg-xhtml-print+xml": {
+ "source": "iana"
+ },
+ "application/vnd.qualcomm.brew-app-res": {
+ "source": "iana"
+ },
+ "application/vnd.quarantainenet": {
+ "source": "iana"
+ },
+ "application/vnd.quark.quarkxpress": {
+ "source": "iana",
+ "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"]
+ },
+ "application/vnd.quobject-quoxdocument": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.moml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-conf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-conn+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-dialog+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-stream+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-conf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-base+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-fax-detect+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-group+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-speech+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-transform+xml": {
+ "source": "iana"
+ },
+ "application/vnd.rainstor.data": {
+ "source": "iana"
+ },
+ "application/vnd.rapid": {
+ "source": "iana"
+ },
+ "application/vnd.rar": {
+ "source": "iana"
+ },
+ "application/vnd.realvnc.bed": {
+ "source": "iana",
+ "extensions": ["bed"]
+ },
+ "application/vnd.recordare.musicxml": {
+ "source": "iana",
+ "extensions": ["mxl"]
+ },
+ "application/vnd.recordare.musicxml+xml": {
+ "source": "iana",
+ "extensions": ["musicxml"]
+ },
+ "application/vnd.renlearn.rlprint": {
+ "source": "iana"
+ },
+ "application/vnd.rig.cryptonote": {
+ "source": "iana",
+ "extensions": ["cryptonote"]
+ },
+ "application/vnd.rim.cod": {
+ "source": "apache",
+ "extensions": ["cod"]
+ },
+ "application/vnd.rn-realmedia": {
+ "source": "apache",
+ "extensions": ["rm"]
+ },
+ "application/vnd.rn-realmedia-vbr": {
+ "source": "apache",
+ "extensions": ["rmvb"]
+ },
+ "application/vnd.route66.link66+xml": {
+ "source": "iana",
+ "extensions": ["link66"]
+ },
+ "application/vnd.rs-274x": {
+ "source": "iana"
+ },
+ "application/vnd.ruckus.download": {
+ "source": "iana"
+ },
+ "application/vnd.s3sms": {
+ "source": "iana"
+ },
+ "application/vnd.sailingtracker.track": {
+ "source": "iana",
+ "extensions": ["st"]
+ },
+ "application/vnd.sbm.cid": {
+ "source": "iana"
+ },
+ "application/vnd.sbm.mid2": {
+ "source": "iana"
+ },
+ "application/vnd.scribus": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.3df": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.csf": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.doc": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.eml": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.mht": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.net": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.ppt": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.tiff": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.xls": {
+ "source": "iana"
+ },
+ "application/vnd.sealedmedia.softseal.html": {
+ "source": "iana"
+ },
+ "application/vnd.sealedmedia.softseal.pdf": {
+ "source": "iana"
+ },
+ "application/vnd.seemail": {
+ "source": "iana",
+ "extensions": ["see"]
+ },
+ "application/vnd.sema": {
+ "source": "iana",
+ "extensions": ["sema"]
+ },
+ "application/vnd.semd": {
+ "source": "iana",
+ "extensions": ["semd"]
+ },
+ "application/vnd.semf": {
+ "source": "iana",
+ "extensions": ["semf"]
+ },
+ "application/vnd.shana.informed.formdata": {
+ "source": "iana",
+ "extensions": ["ifm"]
+ },
+ "application/vnd.shana.informed.formtemplate": {
+ "source": "iana",
+ "extensions": ["itp"]
+ },
+ "application/vnd.shana.informed.interchange": {
+ "source": "iana",
+ "extensions": ["iif"]
+ },
+ "application/vnd.shana.informed.package": {
+ "source": "iana",
+ "extensions": ["ipk"]
+ },
+ "application/vnd.simtech-mindmapper": {
+ "source": "iana",
+ "extensions": ["twd","twds"]
+ },
+ "application/vnd.siren+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.smaf": {
+ "source": "iana",
+ "extensions": ["mmf"]
+ },
+ "application/vnd.smart.notebook": {
+ "source": "iana"
+ },
+ "application/vnd.smart.teacher": {
+ "source": "iana",
+ "extensions": ["teacher"]
+ },
+ "application/vnd.software602.filler.form+xml": {
+ "source": "iana"
+ },
+ "application/vnd.software602.filler.form-xml-zip": {
+ "source": "iana"
+ },
+ "application/vnd.solent.sdkm+xml": {
+ "source": "iana",
+ "extensions": ["sdkm","sdkd"]
+ },
+ "application/vnd.spotfire.dxp": {
+ "source": "iana",
+ "extensions": ["dxp"]
+ },
+ "application/vnd.spotfire.sfs": {
+ "source": "iana",
+ "extensions": ["sfs"]
+ },
+ "application/vnd.sss-cod": {
+ "source": "iana"
+ },
+ "application/vnd.sss-dtf": {
+ "source": "iana"
+ },
+ "application/vnd.sss-ntf": {
+ "source": "iana"
+ },
+ "application/vnd.stardivision.calc": {
+ "source": "apache",
+ "extensions": ["sdc"]
+ },
+ "application/vnd.stardivision.draw": {
+ "source": "apache",
+ "extensions": ["sda"]
+ },
+ "application/vnd.stardivision.impress": {
+ "source": "apache",
+ "extensions": ["sdd"]
+ },
+ "application/vnd.stardivision.math": {
+ "source": "apache",
+ "extensions": ["smf"]
+ },
+ "application/vnd.stardivision.writer": {
+ "source": "apache",
+ "extensions": ["sdw","vor"]
+ },
+ "application/vnd.stardivision.writer-global": {
+ "source": "apache",
+ "extensions": ["sgl"]
+ },
+ "application/vnd.stepmania.package": {
+ "source": "iana",
+ "extensions": ["smzip"]
+ },
+ "application/vnd.stepmania.stepchart": {
+ "source": "iana",
+ "extensions": ["sm"]
+ },
+ "application/vnd.street-stream": {
+ "source": "iana"
+ },
+ "application/vnd.sun.wadl+xml": {
+ "source": "iana"
+ },
+ "application/vnd.sun.xml.calc": {
+ "source": "apache",
+ "extensions": ["sxc"]
+ },
+ "application/vnd.sun.xml.calc.template": {
+ "source": "apache",
+ "extensions": ["stc"]
+ },
+ "application/vnd.sun.xml.draw": {
+ "source": "apache",
+ "extensions": ["sxd"]
+ },
+ "application/vnd.sun.xml.draw.template": {
+ "source": "apache",
+ "extensions": ["std"]
+ },
+ "application/vnd.sun.xml.impress": {
+ "source": "apache",
+ "extensions": ["sxi"]
+ },
+ "application/vnd.sun.xml.impress.template": {
+ "source": "apache",
+ "extensions": ["sti"]
+ },
+ "application/vnd.sun.xml.math": {
+ "source": "apache",
+ "extensions": ["sxm"]
+ },
+ "application/vnd.sun.xml.writer": {
+ "source": "apache",
+ "extensions": ["sxw"]
+ },
+ "application/vnd.sun.xml.writer.global": {
+ "source": "apache",
+ "extensions": ["sxg"]
+ },
+ "application/vnd.sun.xml.writer.template": {
+ "source": "apache",
+ "extensions": ["stw"]
+ },
+ "application/vnd.sus-calendar": {
+ "source": "iana",
+ "extensions": ["sus","susp"]
+ },
+ "application/vnd.svd": {
+ "source": "iana",
+ "extensions": ["svd"]
+ },
+ "application/vnd.swiftview-ics": {
+ "source": "iana"
+ },
+ "application/vnd.symbian.install": {
+ "source": "apache",
+ "extensions": ["sis","sisx"]
+ },
+ "application/vnd.syncml+xml": {
+ "source": "iana",
+ "extensions": ["xsm"]
+ },
+ "application/vnd.syncml.dm+wbxml": {
+ "source": "iana",
+ "extensions": ["bdm"]
+ },
+ "application/vnd.syncml.dm+xml": {
+ "source": "iana",
+ "extensions": ["xdm"]
+ },
+ "application/vnd.syncml.dm.notification": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmddf+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmddf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmtnds+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmtnds+xml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.ds.notification": {
+ "source": "iana"
+ },
+ "application/vnd.tao.intent-module-archive": {
+ "source": "iana",
+ "extensions": ["tao"]
+ },
+ "application/vnd.tcpdump.pcap": {
+ "source": "iana",
+ "extensions": ["pcap","cap","dmp"]
+ },
+ "application/vnd.tmd.mediaflex.api+xml": {
+ "source": "iana"
+ },
+ "application/vnd.tml": {
+ "source": "iana"
+ },
+ "application/vnd.tmobile-livetv": {
+ "source": "iana",
+ "extensions": ["tmo"]
+ },
+ "application/vnd.tri.onesource": {
+ "source": "iana"
+ },
+ "application/vnd.trid.tpt": {
+ "source": "iana",
+ "extensions": ["tpt"]
+ },
+ "application/vnd.triscape.mxs": {
+ "source": "iana",
+ "extensions": ["mxs"]
+ },
+ "application/vnd.trueapp": {
+ "source": "iana",
+ "extensions": ["tra"]
+ },
+ "application/vnd.truedoc": {
+ "source": "iana"
+ },
+ "application/vnd.ubisoft.webplayer": {
+ "source": "iana"
+ },
+ "application/vnd.ufdl": {
+ "source": "iana",
+ "extensions": ["ufd","ufdl"]
+ },
+ "application/vnd.uiq.theme": {
+ "source": "iana",
+ "extensions": ["utz"]
+ },
+ "application/vnd.umajin": {
+ "source": "iana",
+ "extensions": ["umj"]
+ },
+ "application/vnd.unity": {
+ "source": "iana",
+ "extensions": ["unityweb"]
+ },
+ "application/vnd.uoml+xml": {
+ "source": "iana",
+ "extensions": ["uoml"]
+ },
+ "application/vnd.uplanet.alert": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.alert-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.bearer-choice": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.bearer-choice-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.cacheop": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.cacheop-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.channel": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.channel-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.list": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.list-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.listcmd": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.listcmd-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.signal": {
+ "source": "iana"
+ },
+ "application/vnd.uri-map": {
+ "source": "iana"
+ },
+ "application/vnd.valve.source.material": {
+ "source": "iana"
+ },
+ "application/vnd.vcx": {
+ "source": "iana",
+ "extensions": ["vcx"]
+ },
+ "application/vnd.vd-study": {
+ "source": "iana"
+ },
+ "application/vnd.vectorworks": {
+ "source": "iana"
+ },
+ "application/vnd.vel+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.verimatrix.vcas": {
+ "source": "iana"
+ },
+ "application/vnd.vidsoft.vidconference": {
+ "source": "iana"
+ },
+ "application/vnd.visio": {
+ "source": "iana",
+ "extensions": ["vsd","vst","vss","vsw"]
+ },
+ "application/vnd.visionary": {
+ "source": "iana",
+ "extensions": ["vis"]
+ },
+ "application/vnd.vividence.scriptfile": {
+ "source": "iana"
+ },
+ "application/vnd.vsf": {
+ "source": "iana",
+ "extensions": ["vsf"]
+ },
+ "application/vnd.wap.sic": {
+ "source": "iana"
+ },
+ "application/vnd.wap.slc": {
+ "source": "iana"
+ },
+ "application/vnd.wap.wbxml": {
+ "source": "iana",
+ "extensions": ["wbxml"]
+ },
+ "application/vnd.wap.wmlc": {
+ "source": "iana",
+ "extensions": ["wmlc"]
+ },
+ "application/vnd.wap.wmlscriptc": {
+ "source": "iana",
+ "extensions": ["wmlsc"]
+ },
+ "application/vnd.webturbo": {
+ "source": "iana",
+ "extensions": ["wtb"]
+ },
+ "application/vnd.wfa.p2p": {
+ "source": "iana"
+ },
+ "application/vnd.wfa.wsc": {
+ "source": "iana"
+ },
+ "application/vnd.windows.devicepairing": {
+ "source": "iana"
+ },
+ "application/vnd.wmc": {
+ "source": "iana"
+ },
+ "application/vnd.wmf.bootstrap": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.mathematica": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.mathematica.package": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.player": {
+ "source": "iana",
+ "extensions": ["nbp"]
+ },
+ "application/vnd.wordperfect": {
+ "source": "iana",
+ "extensions": ["wpd"]
+ },
+ "application/vnd.wqd": {
+ "source": "iana",
+ "extensions": ["wqd"]
+ },
+ "application/vnd.wrq-hp3000-labelled": {
+ "source": "iana"
+ },
+ "application/vnd.wt.stf": {
+ "source": "iana",
+ "extensions": ["stf"]
+ },
+ "application/vnd.wv.csp+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.wv.csp+xml": {
+ "source": "iana"
+ },
+ "application/vnd.wv.ssp+xml": {
+ "source": "iana"
+ },
+ "application/vnd.xacml+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.xara": {
+ "source": "iana",
+ "extensions": ["xar"]
+ },
+ "application/vnd.xfdl": {
+ "source": "iana",
+ "extensions": ["xfdl"]
+ },
+ "application/vnd.xfdl.webform": {
+ "source": "iana"
+ },
+ "application/vnd.xmi+xml": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.cpkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.dpkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.plan": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.ppkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.xlim": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.hv-dic": {
+ "source": "iana",
+ "extensions": ["hvd"]
+ },
+ "application/vnd.yamaha.hv-script": {
+ "source": "iana",
+ "extensions": ["hvs"]
+ },
+ "application/vnd.yamaha.hv-voice": {
+ "source": "iana",
+ "extensions": ["hvp"]
+ },
+ "application/vnd.yamaha.openscoreformat": {
+ "source": "iana",
+ "extensions": ["osf"]
+ },
+ "application/vnd.yamaha.openscoreformat.osfpvg+xml": {
+ "source": "iana",
+ "extensions": ["osfpvg"]
+ },
+ "application/vnd.yamaha.remote-setup": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.smaf-audio": {
+ "source": "iana",
+ "extensions": ["saf"]
+ },
+ "application/vnd.yamaha.smaf-phrase": {
+ "source": "iana",
+ "extensions": ["spf"]
+ },
+ "application/vnd.yamaha.through-ngn": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.tunnel-udpencap": {
+ "source": "iana"
+ },
+ "application/vnd.yaoweme": {
+ "source": "iana"
+ },
+ "application/vnd.yellowriver-custom-menu": {
+ "source": "iana",
+ "extensions": ["cmp"]
+ },
+ "application/vnd.zul": {
+ "source": "iana",
+ "extensions": ["zir","zirz"]
+ },
+ "application/vnd.zzazz.deck+xml": {
+ "source": "iana",
+ "extensions": ["zaz"]
+ },
+ "application/voicexml+xml": {
+ "source": "iana",
+ "extensions": ["vxml"]
+ },
+ "application/vq-rtcpxr": {
+ "source": "iana"
+ },
+ "application/watcherinfo+xml": {
+ "source": "iana"
+ },
+ "application/whoispp-query": {
+ "source": "iana"
+ },
+ "application/whoispp-response": {
+ "source": "iana"
+ },
+ "application/widget": {
+ "source": "iana",
+ "extensions": ["wgt"]
+ },
+ "application/winhlp": {
+ "source": "apache",
+ "extensions": ["hlp"]
+ },
+ "application/wita": {
+ "source": "iana"
+ },
+ "application/wordperfect5.1": {
+ "source": "iana"
+ },
+ "application/wsdl+xml": {
+ "source": "iana",
+ "extensions": ["wsdl"]
+ },
+ "application/wspolicy+xml": {
+ "source": "iana",
+ "extensions": ["wspolicy"]
+ },
+ "application/x-7z-compressed": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["7z"]
+ },
+ "application/x-abiword": {
+ "source": "apache",
+ "extensions": ["abw"]
+ },
+ "application/x-ace-compressed": {
+ "source": "apache",
+ "extensions": ["ace"]
+ },
+ "application/x-amf": {
+ "source": "apache"
+ },
+ "application/x-apple-diskimage": {
+ "source": "apache",
+ "extensions": ["dmg"]
+ },
+ "application/x-authorware-bin": {
+ "source": "apache",
+ "extensions": ["aab","x32","u32","vox"]
+ },
+ "application/x-authorware-map": {
+ "source": "apache",
+ "extensions": ["aam"]
+ },
+ "application/x-authorware-seg": {
+ "source": "apache",
+ "extensions": ["aas"]
+ },
+ "application/x-bcpio": {
+ "source": "apache",
+ "extensions": ["bcpio"]
+ },
+ "application/x-bdoc": {
+ "compressible": false,
+ "extensions": ["bdoc"]
+ },
+ "application/x-bittorrent": {
+ "source": "apache",
+ "extensions": ["torrent"]
+ },
+ "application/x-blorb": {
+ "source": "apache",
+ "extensions": ["blb","blorb"]
+ },
+ "application/x-bzip": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["bz"]
+ },
+ "application/x-bzip2": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["bz2","boz"]
+ },
+ "application/x-cbr": {
+ "source": "apache",
+ "extensions": ["cbr","cba","cbt","cbz","cb7"]
+ },
+ "application/x-cdlink": {
+ "source": "apache",
+ "extensions": ["vcd"]
+ },
+ "application/x-cfs-compressed": {
+ "source": "apache",
+ "extensions": ["cfs"]
+ },
+ "application/x-chat": {
+ "source": "apache",
+ "extensions": ["chat"]
+ },
+ "application/x-chess-pgn": {
+ "source": "apache",
+ "extensions": ["pgn"]
+ },
+ "application/x-chrome-extension": {
+ "extensions": ["crx"]
+ },
+ "application/x-cocoa": {
+ "source": "nginx",
+ "extensions": ["cco"]
+ },
+ "application/x-compress": {
+ "source": "apache"
+ },
+ "application/x-conference": {
+ "source": "apache",
+ "extensions": ["nsc"]
+ },
+ "application/x-cpio": {
+ "source": "apache",
+ "extensions": ["cpio"]
+ },
+ "application/x-csh": {
+ "source": "apache",
+ "extensions": ["csh"]
+ },
+ "application/x-deb": {
+ "compressible": false
+ },
+ "application/x-debian-package": {
+ "source": "apache",
+ "extensions": ["deb","udeb"]
+ },
+ "application/x-dgc-compressed": {
+ "source": "apache",
+ "extensions": ["dgc"]
+ },
+ "application/x-director": {
+ "source": "apache",
+ "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]
+ },
+ "application/x-doom": {
+ "source": "apache",
+ "extensions": ["wad"]
+ },
+ "application/x-dtbncx+xml": {
+ "source": "apache",
+ "extensions": ["ncx"]
+ },
+ "application/x-dtbook+xml": {
+ "source": "apache",
+ "extensions": ["dtb"]
+ },
+ "application/x-dtbresource+xml": {
+ "source": "apache",
+ "extensions": ["res"]
+ },
+ "application/x-dvi": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["dvi"]
+ },
+ "application/x-envoy": {
+ "source": "apache",
+ "extensions": ["evy"]
+ },
+ "application/x-eva": {
+ "source": "apache",
+ "extensions": ["eva"]
+ },
+ "application/x-font-bdf": {
+ "source": "apache",
+ "extensions": ["bdf"]
+ },
+ "application/x-font-dos": {
+ "source": "apache"
+ },
+ "application/x-font-framemaker": {
+ "source": "apache"
+ },
+ "application/x-font-ghostscript": {
+ "source": "apache",
+ "extensions": ["gsf"]
+ },
+ "application/x-font-libgrx": {
+ "source": "apache"
+ },
+ "application/x-font-linux-psf": {
+ "source": "apache",
+ "extensions": ["psf"]
+ },
+ "application/x-font-otf": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["otf"]
+ },
+ "application/x-font-pcf": {
+ "source": "apache",
+ "extensions": ["pcf"]
+ },
+ "application/x-font-snf": {
+ "source": "apache",
+ "extensions": ["snf"]
+ },
+ "application/x-font-speedo": {
+ "source": "apache"
+ },
+ "application/x-font-sunos-news": {
+ "source": "apache"
+ },
+ "application/x-font-ttf": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["ttf","ttc"]
+ },
+ "application/x-font-type1": {
+ "source": "apache",
+ "extensions": ["pfa","pfb","pfm","afm"]
+ },
+ "application/x-font-vfont": {
+ "source": "apache"
+ },
+ "application/x-freearc": {
+ "source": "apache",
+ "extensions": ["arc"]
+ },
+ "application/x-futuresplash": {
+ "source": "apache",
+ "extensions": ["spl"]
+ },
+ "application/x-gca-compressed": {
+ "source": "apache",
+ "extensions": ["gca"]
+ },
+ "application/x-glulx": {
+ "source": "apache",
+ "extensions": ["ulx"]
+ },
+ "application/x-gnumeric": {
+ "source": "apache",
+ "extensions": ["gnumeric"]
+ },
+ "application/x-gramps-xml": {
+ "source": "apache",
+ "extensions": ["gramps"]
+ },
+ "application/x-gtar": {
+ "source": "apache",
+ "extensions": ["gtar"]
+ },
+ "application/x-gzip": {
+ "source": "apache"
+ },
+ "application/x-hdf": {
+ "source": "apache",
+ "extensions": ["hdf"]
+ },
+ "application/x-httpd-php": {
+ "compressible": true,
+ "extensions": ["php"]
+ },
+ "application/x-install-instructions": {
+ "source": "apache",
+ "extensions": ["install"]
+ },
+ "application/x-iso9660-image": {
+ "source": "apache",
+ "extensions": ["iso"]
+ },
+ "application/x-java-archive-diff": {
+ "source": "nginx",
+ "extensions": ["jardiff"]
+ },
+ "application/x-java-jnlp-file": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["jnlp"]
+ },
+ "application/x-javascript": {
+ "compressible": true
+ },
+ "application/x-latex": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["latex"]
+ },
+ "application/x-lua-bytecode": {
+ "extensions": ["luac"]
+ },
+ "application/x-lzh-compressed": {
+ "source": "apache",
+ "extensions": ["lzh","lha"]
+ },
+ "application/x-makeself": {
+ "source": "nginx",
+ "extensions": ["run"]
+ },
+ "application/x-mie": {
+ "source": "apache",
+ "extensions": ["mie"]
+ },
+ "application/x-mobipocket-ebook": {
+ "source": "apache",
+ "extensions": ["prc","mobi"]
+ },
+ "application/x-mpegurl": {
+ "compressible": false
+ },
+ "application/x-ms-application": {
+ "source": "apache",
+ "extensions": ["application"]
+ },
+ "application/x-ms-shortcut": {
+ "source": "apache",
+ "extensions": ["lnk"]
+ },
+ "application/x-ms-wmd": {
+ "source": "apache",
+ "extensions": ["wmd"]
+ },
+ "application/x-ms-wmz": {
+ "source": "apache",
+ "extensions": ["wmz"]
+ },
+ "application/x-ms-xbap": {
+ "source": "apache",
+ "extensions": ["xbap"]
+ },
+ "application/x-msaccess": {
+ "source": "apache",
+ "extensions": ["mdb"]
+ },
+ "application/x-msbinder": {
+ "source": "apache",
+ "extensions": ["obd"]
+ },
+ "application/x-mscardfile": {
+ "source": "apache",
+ "extensions": ["crd"]
+ },
+ "application/x-msclip": {
+ "source": "apache",
+ "extensions": ["clp"]
+ },
+ "application/x-msdos-program": {
+ "extensions": ["exe"]
+ },
+ "application/x-msdownload": {
+ "source": "apache",
+ "extensions": ["exe","dll","com","bat","msi"]
+ },
+ "application/x-msmediaview": {
+ "source": "apache",
+ "extensions": ["mvb","m13","m14"]
+ },
+ "application/x-msmetafile": {
+ "source": "apache",
+ "extensions": ["wmf","wmz","emf","emz"]
+ },
+ "application/x-msmoney": {
+ "source": "apache",
+ "extensions": ["mny"]
+ },
+ "application/x-mspublisher": {
+ "source": "apache",
+ "extensions": ["pub"]
+ },
+ "application/x-msschedule": {
+ "source": "apache",
+ "extensions": ["scd"]
+ },
+ "application/x-msterminal": {
+ "source": "apache",
+ "extensions": ["trm"]
+ },
+ "application/x-mswrite": {
+ "source": "apache",
+ "extensions": ["wri"]
+ },
+ "application/x-netcdf": {
+ "source": "apache",
+ "extensions": ["nc","cdf"]
+ },
+ "application/x-ns-proxy-autoconfig": {
+ "compressible": true,
+ "extensions": ["pac"]
+ },
+ "application/x-nzb": {
+ "source": "apache",
+ "extensions": ["nzb"]
+ },
+ "application/x-perl": {
+ "source": "nginx",
+ "extensions": ["pl","pm"]
+ },
+ "application/x-pilot": {
+ "source": "nginx",
+ "extensions": ["prc","pdb"]
+ },
+ "application/x-pkcs12": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["p12","pfx"]
+ },
+ "application/x-pkcs7-certificates": {
+ "source": "apache",
+ "extensions": ["p7b","spc"]
+ },
+ "application/x-pkcs7-certreqresp": {
+ "source": "apache",
+ "extensions": ["p7r"]
+ },
+ "application/x-rar-compressed": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["rar"]
+ },
+ "application/x-redhat-package-manager": {
+ "source": "nginx",
+ "extensions": ["rpm"]
+ },
+ "application/x-research-info-systems": {
+ "source": "apache",
+ "extensions": ["ris"]
+ },
+ "application/x-sea": {
+ "source": "nginx",
+ "extensions": ["sea"]
+ },
+ "application/x-sh": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["sh"]
+ },
+ "application/x-shar": {
+ "source": "apache",
+ "extensions": ["shar"]
+ },
+ "application/x-shockwave-flash": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["swf"]
+ },
+ "application/x-silverlight-app": {
+ "source": "apache",
+ "extensions": ["xap"]
+ },
+ "application/x-sql": {
+ "source": "apache",
+ "extensions": ["sql"]
+ },
+ "application/x-stuffit": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["sit"]
+ },
+ "application/x-stuffitx": {
+ "source": "apache",
+ "extensions": ["sitx"]
+ },
+ "application/x-subrip": {
+ "source": "apache",
+ "extensions": ["srt"]
+ },
+ "application/x-sv4cpio": {
+ "source": "apache",
+ "extensions": ["sv4cpio"]
+ },
+ "application/x-sv4crc": {
+ "source": "apache",
+ "extensions": ["sv4crc"]
+ },
+ "application/x-t3vm-image": {
+ "source": "apache",
+ "extensions": ["t3"]
+ },
+ "application/x-tads": {
+ "source": "apache",
+ "extensions": ["gam"]
+ },
+ "application/x-tar": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["tar"]
+ },
+ "application/x-tcl": {
+ "source": "apache",
+ "extensions": ["tcl","tk"]
+ },
+ "application/x-tex": {
+ "source": "apache",
+ "extensions": ["tex"]
+ },
+ "application/x-tex-tfm": {
+ "source": "apache",
+ "extensions": ["tfm"]
+ },
+ "application/x-texinfo": {
+ "source": "apache",
+ "extensions": ["texinfo","texi"]
+ },
+ "application/x-tgif": {
+ "source": "apache",
+ "extensions": ["obj"]
+ },
+ "application/x-ustar": {
+ "source": "apache",
+ "extensions": ["ustar"]
+ },
+ "application/x-wais-source": {
+ "source": "apache",
+ "extensions": ["src"]
+ },
+ "application/x-web-app-manifest+json": {
+ "compressible": true,
+ "extensions": ["webapp"]
+ },
+ "application/x-www-form-urlencoded": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/x-x509-ca-cert": {
+ "source": "apache",
+ "extensions": ["der","crt","pem"]
+ },
+ "application/x-xfig": {
+ "source": "apache",
+ "extensions": ["fig"]
+ },
+ "application/x-xliff+xml": {
+ "source": "apache",
+ "extensions": ["xlf"]
+ },
+ "application/x-xpinstall": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["xpi"]
+ },
+ "application/x-xz": {
+ "source": "apache",
+ "extensions": ["xz"]
+ },
+ "application/x-zmachine": {
+ "source": "apache",
+ "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"]
+ },
+ "application/x400-bp": {
+ "source": "iana"
+ },
+ "application/xacml+xml": {
+ "source": "iana"
+ },
+ "application/xaml+xml": {
+ "source": "apache",
+ "extensions": ["xaml"]
+ },
+ "application/xcap-att+xml": {
+ "source": "iana"
+ },
+ "application/xcap-caps+xml": {
+ "source": "iana"
+ },
+ "application/xcap-diff+xml": {
+ "source": "iana",
+ "extensions": ["xdf"]
+ },
+ "application/xcap-el+xml": {
+ "source": "iana"
+ },
+ "application/xcap-error+xml": {
+ "source": "iana"
+ },
+ "application/xcap-ns+xml": {
+ "source": "iana"
+ },
+ "application/xcon-conference-info+xml": {
+ "source": "iana"
+ },
+ "application/xcon-conference-info-diff+xml": {
+ "source": "iana"
+ },
+ "application/xenc+xml": {
+ "source": "iana",
+ "extensions": ["xenc"]
+ },
+ "application/xhtml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xhtml","xht"]
+ },
+ "application/xhtml-voice+xml": {
+ "source": "apache"
+ },
+ "application/xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xml","xsl","xsd","rng"]
+ },
+ "application/xml-dtd": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["dtd"]
+ },
+ "application/xml-external-parsed-entity": {
+ "source": "iana"
+ },
+ "application/xml-patch+xml": {
+ "source": "iana"
+ },
+ "application/xmpp+xml": {
+ "source": "iana"
+ },
+ "application/xop+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xop"]
+ },
+ "application/xproc+xml": {
+ "source": "apache",
+ "extensions": ["xpl"]
+ },
+ "application/xslt+xml": {
+ "source": "iana",
+ "extensions": ["xslt"]
+ },
+ "application/xspf+xml": {
+ "source": "apache",
+ "extensions": ["xspf"]
+ },
+ "application/xv+xml": {
+ "source": "iana",
+ "extensions": ["mxml","xhvml","xvml","xvm"]
+ },
+ "application/yang": {
+ "source": "iana",
+ "extensions": ["yang"]
+ },
+ "application/yang-data+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/yang-data+xml": {
+ "source": "iana"
+ },
+ "application/yin+xml": {
+ "source": "iana",
+ "extensions": ["yin"]
+ },
+ "application/zip": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["zip"]
+ },
+ "application/zlib": {
+ "source": "iana"
+ },
+ "audio/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "audio/32kadpcm": {
+ "source": "iana"
+ },
+ "audio/3gpp": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["3gpp"]
+ },
+ "audio/3gpp2": {
+ "source": "iana"
+ },
+ "audio/ac3": {
+ "source": "iana"
+ },
+ "audio/adpcm": {
+ "source": "apache",
+ "extensions": ["adp"]
+ },
+ "audio/amr": {
+ "source": "iana"
+ },
+ "audio/amr-wb": {
+ "source": "iana"
+ },
+ "audio/amr-wb+": {
+ "source": "iana"
+ },
+ "audio/aptx": {
+ "source": "iana"
+ },
+ "audio/asc": {
+ "source": "iana"
+ },
+ "audio/atrac-advanced-lossless": {
+ "source": "iana"
+ },
+ "audio/atrac-x": {
+ "source": "iana"
+ },
+ "audio/atrac3": {
+ "source": "iana"
+ },
+ "audio/basic": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["au","snd"]
+ },
+ "audio/bv16": {
+ "source": "iana"
+ },
+ "audio/bv32": {
+ "source": "iana"
+ },
+ "audio/clearmode": {
+ "source": "iana"
+ },
+ "audio/cn": {
+ "source": "iana"
+ },
+ "audio/dat12": {
+ "source": "iana"
+ },
+ "audio/dls": {
+ "source": "iana"
+ },
+ "audio/dsr-es201108": {
+ "source": "iana"
+ },
+ "audio/dsr-es202050": {
+ "source": "iana"
+ },
+ "audio/dsr-es202211": {
+ "source": "iana"
+ },
+ "audio/dsr-es202212": {
+ "source": "iana"
+ },
+ "audio/dv": {
+ "source": "iana"
+ },
+ "audio/dvi4": {
+ "source": "iana"
+ },
+ "audio/eac3": {
+ "source": "iana"
+ },
+ "audio/encaprtp": {
+ "source": "iana"
+ },
+ "audio/evrc": {
+ "source": "iana"
+ },
+ "audio/evrc-qcp": {
+ "source": "iana"
+ },
+ "audio/evrc0": {
+ "source": "iana"
+ },
+ "audio/evrc1": {
+ "source": "iana"
+ },
+ "audio/evrcb": {
+ "source": "iana"
+ },
+ "audio/evrcb0": {
+ "source": "iana"
+ },
+ "audio/evrcb1": {
+ "source": "iana"
+ },
+ "audio/evrcnw": {
+ "source": "iana"
+ },
+ "audio/evrcnw0": {
+ "source": "iana"
+ },
+ "audio/evrcnw1": {
+ "source": "iana"
+ },
+ "audio/evrcwb": {
+ "source": "iana"
+ },
+ "audio/evrcwb0": {
+ "source": "iana"
+ },
+ "audio/evrcwb1": {
+ "source": "iana"
+ },
+ "audio/evs": {
+ "source": "iana"
+ },
+ "audio/fwdred": {
+ "source": "iana"
+ },
+ "audio/g711-0": {
+ "source": "iana"
+ },
+ "audio/g719": {
+ "source": "iana"
+ },
+ "audio/g722": {
+ "source": "iana"
+ },
+ "audio/g7221": {
+ "source": "iana"
+ },
+ "audio/g723": {
+ "source": "iana"
+ },
+ "audio/g726-16": {
+ "source": "iana"
+ },
+ "audio/g726-24": {
+ "source": "iana"
+ },
+ "audio/g726-32": {
+ "source": "iana"
+ },
+ "audio/g726-40": {
+ "source": "iana"
+ },
+ "audio/g728": {
+ "source": "iana"
+ },
+ "audio/g729": {
+ "source": "iana"
+ },
+ "audio/g7291": {
+ "source": "iana"
+ },
+ "audio/g729d": {
+ "source": "iana"
+ },
+ "audio/g729e": {
+ "source": "iana"
+ },
+ "audio/gsm": {
+ "source": "iana"
+ },
+ "audio/gsm-efr": {
+ "source": "iana"
+ },
+ "audio/gsm-hr-08": {
+ "source": "iana"
+ },
+ "audio/ilbc": {
+ "source": "iana"
+ },
+ "audio/ip-mr_v2.5": {
+ "source": "iana"
+ },
+ "audio/isac": {
+ "source": "apache"
+ },
+ "audio/l16": {
+ "source": "iana"
+ },
+ "audio/l20": {
+ "source": "iana"
+ },
+ "audio/l24": {
+ "source": "iana",
+ "compressible": false
+ },
+ "audio/l8": {
+ "source": "iana"
+ },
+ "audio/lpc": {
+ "source": "iana"
+ },
+ "audio/midi": {
+ "source": "apache",
+ "extensions": ["mid","midi","kar","rmi"]
+ },
+ "audio/mobile-xmf": {
+ "source": "iana"
+ },
+ "audio/mp3": {
+ "compressible": false,
+ "extensions": ["mp3"]
+ },
+ "audio/mp4": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["m4a","mp4a"]
+ },
+ "audio/mp4a-latm": {
+ "source": "iana"
+ },
+ "audio/mpa": {
+ "source": "iana"
+ },
+ "audio/mpa-robust": {
+ "source": "iana"
+ },
+ "audio/mpeg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"]
+ },
+ "audio/mpeg4-generic": {
+ "source": "iana"
+ },
+ "audio/musepack": {
+ "source": "apache"
+ },
+ "audio/ogg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["oga","ogg","spx"]
+ },
+ "audio/opus": {
+ "source": "iana"
+ },
+ "audio/parityfec": {
+ "source": "iana"
+ },
+ "audio/pcma": {
+ "source": "iana"
+ },
+ "audio/pcma-wb": {
+ "source": "iana"
+ },
+ "audio/pcmu": {
+ "source": "iana"
+ },
+ "audio/pcmu-wb": {
+ "source": "iana"
+ },
+ "audio/prs.sid": {
+ "source": "iana"
+ },
+ "audio/qcelp": {
+ "source": "iana"
+ },
+ "audio/raptorfec": {
+ "source": "iana"
+ },
+ "audio/red": {
+ "source": "iana"
+ },
+ "audio/rtp-enc-aescm128": {
+ "source": "iana"
+ },
+ "audio/rtp-midi": {
+ "source": "iana"
+ },
+ "audio/rtploopback": {
+ "source": "iana"
+ },
+ "audio/rtx": {
+ "source": "iana"
+ },
+ "audio/s3m": {
+ "source": "apache",
+ "extensions": ["s3m"]
+ },
+ "audio/silk": {
+ "source": "apache",
+ "extensions": ["sil"]
+ },
+ "audio/smv": {
+ "source": "iana"
+ },
+ "audio/smv-qcp": {
+ "source": "iana"
+ },
+ "audio/smv0": {
+ "source": "iana"
+ },
+ "audio/sp-midi": {
+ "source": "iana"
+ },
+ "audio/speex": {
+ "source": "iana"
+ },
+ "audio/t140c": {
+ "source": "iana"
+ },
+ "audio/t38": {
+ "source": "iana"
+ },
+ "audio/telephone-event": {
+ "source": "iana"
+ },
+ "audio/tone": {
+ "source": "iana"
+ },
+ "audio/uemclip": {
+ "source": "iana"
+ },
+ "audio/ulpfec": {
+ "source": "iana"
+ },
+ "audio/vdvi": {
+ "source": "iana"
+ },
+ "audio/vmr-wb": {
+ "source": "iana"
+ },
+ "audio/vnd.3gpp.iufp": {
+ "source": "iana"
+ },
+ "audio/vnd.4sb": {
+ "source": "iana"
+ },
+ "audio/vnd.audiokoz": {
+ "source": "iana"
+ },
+ "audio/vnd.celp": {
+ "source": "iana"
+ },
+ "audio/vnd.cisco.nse": {
+ "source": "iana"
+ },
+ "audio/vnd.cmles.radio-events": {
+ "source": "iana"
+ },
+ "audio/vnd.cns.anp1": {
+ "source": "iana"
+ },
+ "audio/vnd.cns.inf1": {
+ "source": "iana"
+ },
+ "audio/vnd.dece.audio": {
+ "source": "iana",
+ "extensions": ["uva","uvva"]
+ },
+ "audio/vnd.digital-winds": {
+ "source": "iana",
+ "extensions": ["eol"]
+ },
+ "audio/vnd.dlna.adts": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.heaac.1": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.heaac.2": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.mlp": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.mps": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2x": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2z": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pulse.1": {
+ "source": "iana"
+ },
+ "audio/vnd.dra": {
+ "source": "iana",
+ "extensions": ["dra"]
+ },
+ "audio/vnd.dts": {
+ "source": "iana",
+ "extensions": ["dts"]
+ },
+ "audio/vnd.dts.hd": {
+ "source": "iana",
+ "extensions": ["dtshd"]
+ },
+ "audio/vnd.dvb.file": {
+ "source": "iana"
+ },
+ "audio/vnd.everad.plj": {
+ "source": "iana"
+ },
+ "audio/vnd.hns.audio": {
+ "source": "iana"
+ },
+ "audio/vnd.lucent.voice": {
+ "source": "iana",
+ "extensions": ["lvp"]
+ },
+ "audio/vnd.ms-playready.media.pya": {
+ "source": "iana",
+ "extensions": ["pya"]
+ },
+ "audio/vnd.nokia.mobile-xmf": {
+ "source": "iana"
+ },
+ "audio/vnd.nortel.vbk": {
+ "source": "iana"
+ },
+ "audio/vnd.nuera.ecelp4800": {
+ "source": "iana",
+ "extensions": ["ecelp4800"]
+ },
+ "audio/vnd.nuera.ecelp7470": {
+ "source": "iana",
+ "extensions": ["ecelp7470"]
+ },
+ "audio/vnd.nuera.ecelp9600": {
+ "source": "iana",
+ "extensions": ["ecelp9600"]
+ },
+ "audio/vnd.octel.sbc": {
+ "source": "iana"
+ },
+ "audio/vnd.qcelp": {
+ "source": "iana"
+ },
+ "audio/vnd.rhetorex.32kadpcm": {
+ "source": "iana"
+ },
+ "audio/vnd.rip": {
+ "source": "iana",
+ "extensions": ["rip"]
+ },
+ "audio/vnd.rn-realaudio": {
+ "compressible": false
+ },
+ "audio/vnd.sealedmedia.softseal.mpeg": {
+ "source": "iana"
+ },
+ "audio/vnd.vmx.cvsd": {
+ "source": "iana"
+ },
+ "audio/vnd.wave": {
+ "compressible": false
+ },
+ "audio/vorbis": {
+ "source": "iana",
+ "compressible": false
+ },
+ "audio/vorbis-config": {
+ "source": "iana"
+ },
+ "audio/wav": {
+ "compressible": false,
+ "extensions": ["wav"]
+ },
+ "audio/wave": {
+ "compressible": false,
+ "extensions": ["wav"]
+ },
+ "audio/webm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["weba"]
+ },
+ "audio/x-aac": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["aac"]
+ },
+ "audio/x-aiff": {
+ "source": "apache",
+ "extensions": ["aif","aiff","aifc"]
+ },
+ "audio/x-caf": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["caf"]
+ },
+ "audio/x-flac": {
+ "source": "apache",
+ "extensions": ["flac"]
+ },
+ "audio/x-m4a": {
+ "source": "nginx",
+ "extensions": ["m4a"]
+ },
+ "audio/x-matroska": {
+ "source": "apache",
+ "extensions": ["mka"]
+ },
+ "audio/x-mpegurl": {
+ "source": "apache",
+ "extensions": ["m3u"]
+ },
+ "audio/x-ms-wax": {
+ "source": "apache",
+ "extensions": ["wax"]
+ },
+ "audio/x-ms-wma": {
+ "source": "apache",
+ "extensions": ["wma"]
+ },
+ "audio/x-pn-realaudio": {
+ "source": "apache",
+ "extensions": ["ram","ra"]
+ },
+ "audio/x-pn-realaudio-plugin": {
+ "source": "apache",
+ "extensions": ["rmp"]
+ },
+ "audio/x-realaudio": {
+ "source": "nginx",
+ "extensions": ["ra"]
+ },
+ "audio/x-tta": {
+ "source": "apache"
+ },
+ "audio/x-wav": {
+ "source": "apache",
+ "extensions": ["wav"]
+ },
+ "audio/xm": {
+ "source": "apache",
+ "extensions": ["xm"]
+ },
+ "chemical/x-cdx": {
+ "source": "apache",
+ "extensions": ["cdx"]
+ },
+ "chemical/x-cif": {
+ "source": "apache",
+ "extensions": ["cif"]
+ },
+ "chemical/x-cmdf": {
+ "source": "apache",
+ "extensions": ["cmdf"]
+ },
+ "chemical/x-cml": {
+ "source": "apache",
+ "extensions": ["cml"]
+ },
+ "chemical/x-csml": {
+ "source": "apache",
+ "extensions": ["csml"]
+ },
+ "chemical/x-pdb": {
+ "source": "apache"
+ },
+ "chemical/x-xyz": {
+ "source": "apache",
+ "extensions": ["xyz"]
+ },
+ "font/opentype": {
+ "compressible": true,
+ "extensions": ["otf"]
+ },
+ "image/bmp": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["bmp"]
+ },
+ "image/cgm": {
+ "source": "iana",
+ "extensions": ["cgm"]
+ },
+ "image/dicom-rle": {
+ "source": "iana"
+ },
+ "image/emf": {
+ "source": "iana"
+ },
+ "image/fits": {
+ "source": "iana"
+ },
+ "image/g3fax": {
+ "source": "iana",
+ "extensions": ["g3"]
+ },
+ "image/gif": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["gif"]
+ },
+ "image/ief": {
+ "source": "iana",
+ "extensions": ["ief"]
+ },
+ "image/jls": {
+ "source": "iana"
+ },
+ "image/jp2": {
+ "source": "iana"
+ },
+ "image/jpeg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["jpeg","jpg","jpe"]
+ },
+ "image/jpm": {
+ "source": "iana"
+ },
+ "image/jpx": {
+ "source": "iana"
+ },
+ "image/ktx": {
+ "source": "iana",
+ "extensions": ["ktx"]
+ },
+ "image/naplps": {
+ "source": "iana"
+ },
+ "image/pjpeg": {
+ "compressible": false
+ },
+ "image/png": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["png"]
+ },
+ "image/prs.btif": {
+ "source": "iana",
+ "extensions": ["btif"]
+ },
+ "image/prs.pti": {
+ "source": "iana"
+ },
+ "image/pwg-raster": {
+ "source": "iana"
+ },
+ "image/sgi": {
+ "source": "apache",
+ "extensions": ["sgi"]
+ },
+ "image/svg+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["svg","svgz"]
+ },
+ "image/t38": {
+ "source": "iana"
+ },
+ "image/tiff": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["tiff","tif"]
+ },
+ "image/tiff-fx": {
+ "source": "iana"
+ },
+ "image/vnd.adobe.photoshop": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["psd"]
+ },
+ "image/vnd.airzip.accelerator.azv": {
+ "source": "iana"
+ },
+ "image/vnd.cns.inf2": {
+ "source": "iana"
+ },
+ "image/vnd.dece.graphic": {
+ "source": "iana",
+ "extensions": ["uvi","uvvi","uvg","uvvg"]
+ },
+ "image/vnd.djvu": {
+ "source": "iana",
+ "extensions": ["djvu","djv"]
+ },
+ "image/vnd.dvb.subtitle": {
+ "source": "iana",
+ "extensions": ["sub"]
+ },
+ "image/vnd.dwg": {
+ "source": "iana",
+ "extensions": ["dwg"]
+ },
+ "image/vnd.dxf": {
+ "source": "iana",
+ "extensions": ["dxf"]
+ },
+ "image/vnd.fastbidsheet": {
+ "source": "iana",
+ "extensions": ["fbs"]
+ },
+ "image/vnd.fpx": {
+ "source": "iana",
+ "extensions": ["fpx"]
+ },
+ "image/vnd.fst": {
+ "source": "iana",
+ "extensions": ["fst"]
+ },
+ "image/vnd.fujixerox.edmics-mmr": {
+ "source": "iana",
+ "extensions": ["mmr"]
+ },
+ "image/vnd.fujixerox.edmics-rlc": {
+ "source": "iana",
+ "extensions": ["rlc"]
+ },
+ "image/vnd.globalgraphics.pgb": {
+ "source": "iana"
+ },
+ "image/vnd.microsoft.icon": {
+ "source": "iana"
+ },
+ "image/vnd.mix": {
+ "source": "iana"
+ },
+ "image/vnd.mozilla.apng": {
+ "source": "iana"
+ },
+ "image/vnd.ms-modi": {
+ "source": "iana",
+ "extensions": ["mdi"]
+ },
+ "image/vnd.ms-photo": {
+ "source": "apache",
+ "extensions": ["wdp"]
+ },
+ "image/vnd.net-fpx": {
+ "source": "iana",
+ "extensions": ["npx"]
+ },
+ "image/vnd.radiance": {
+ "source": "iana"
+ },
+ "image/vnd.sealed.png": {
+ "source": "iana"
+ },
+ "image/vnd.sealedmedia.softseal.gif": {
+ "source": "iana"
+ },
+ "image/vnd.sealedmedia.softseal.jpg": {
+ "source": "iana"
+ },
+ "image/vnd.svf": {
+ "source": "iana"
+ },
+ "image/vnd.tencent.tap": {
+ "source": "iana"
+ },
+ "image/vnd.valve.source.texture": {
+ "source": "iana"
+ },
+ "image/vnd.wap.wbmp": {
+ "source": "iana",
+ "extensions": ["wbmp"]
+ },
+ "image/vnd.xiff": {
+ "source": "iana",
+ "extensions": ["xif"]
+ },
+ "image/vnd.zbrush.pcx": {
+ "source": "iana"
+ },
+ "image/webp": {
+ "source": "apache",
+ "extensions": ["webp"]
+ },
+ "image/wmf": {
+ "source": "iana"
+ },
+ "image/x-3ds": {
+ "source": "apache",
+ "extensions": ["3ds"]
+ },
+ "image/x-cmu-raster": {
+ "source": "apache",
+ "extensions": ["ras"]
+ },
+ "image/x-cmx": {
+ "source": "apache",
+ "extensions": ["cmx"]
+ },
+ "image/x-freehand": {
+ "source": "apache",
+ "extensions": ["fh","fhc","fh4","fh5","fh7"]
+ },
+ "image/x-icon": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["ico"]
+ },
+ "image/x-jng": {
+ "source": "nginx",
+ "extensions": ["jng"]
+ },
+ "image/x-mrsid-image": {
+ "source": "apache",
+ "extensions": ["sid"]
+ },
+ "image/x-ms-bmp": {
+ "source": "nginx",
+ "compressible": true,
+ "extensions": ["bmp"]
+ },
+ "image/x-pcx": {
+ "source": "apache",
+ "extensions": ["pcx"]
+ },
+ "image/x-pict": {
+ "source": "apache",
+ "extensions": ["pic","pct"]
+ },
+ "image/x-portable-anymap": {
+ "source": "apache",
+ "extensions": ["pnm"]
+ },
+ "image/x-portable-bitmap": {
+ "source": "apache",
+ "extensions": ["pbm"]
+ },
+ "image/x-portable-graymap": {
+ "source": "apache",
+ "extensions": ["pgm"]
+ },
+ "image/x-portable-pixmap": {
+ "source": "apache",
+ "extensions": ["ppm"]
+ },
+ "image/x-rgb": {
+ "source": "apache",
+ "extensions": ["rgb"]
+ },
+ "image/x-tga": {
+ "source": "apache",
+ "extensions": ["tga"]
+ },
+ "image/x-xbitmap": {
+ "source": "apache",
+ "extensions": ["xbm"]
+ },
+ "image/x-xcf": {
+ "compressible": false
+ },
+ "image/x-xpixmap": {
+ "source": "apache",
+ "extensions": ["xpm"]
+ },
+ "image/x-xwindowdump": {
+ "source": "apache",
+ "extensions": ["xwd"]
+ },
+ "message/cpim": {
+ "source": "iana"
+ },
+ "message/delivery-status": {
+ "source": "iana"
+ },
+ "message/disposition-notification": {
+ "source": "iana"
+ },
+ "message/external-body": {
+ "source": "iana"
+ },
+ "message/feedback-report": {
+ "source": "iana"
+ },
+ "message/global": {
+ "source": "iana"
+ },
+ "message/global-delivery-status": {
+ "source": "iana"
+ },
+ "message/global-disposition-notification": {
+ "source": "iana"
+ },
+ "message/global-headers": {
+ "source": "iana"
+ },
+ "message/http": {
+ "source": "iana",
+ "compressible": false
+ },
+ "message/imdn+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "message/news": {
+ "source": "iana"
+ },
+ "message/partial": {
+ "source": "iana",
+ "compressible": false
+ },
+ "message/rfc822": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["eml","mime"]
+ },
+ "message/s-http": {
+ "source": "iana"
+ },
+ "message/sip": {
+ "source": "iana"
+ },
+ "message/sipfrag": {
+ "source": "iana"
+ },
+ "message/tracking-status": {
+ "source": "iana"
+ },
+ "message/vnd.si.simp": {
+ "source": "iana"
+ },
+ "message/vnd.wfa.wsc": {
+ "source": "iana"
+ },
+ "model/gltf+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "model/iges": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["igs","iges"]
+ },
+ "model/mesh": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["msh","mesh","silo"]
+ },
+ "model/vnd.collada+xml": {
+ "source": "iana",
+ "extensions": ["dae"]
+ },
+ "model/vnd.dwf": {
+ "source": "iana",
+ "extensions": ["dwf"]
+ },
+ "model/vnd.flatland.3dml": {
+ "source": "iana"
+ },
+ "model/vnd.gdl": {
+ "source": "iana",
+ "extensions": ["gdl"]
+ },
+ "model/vnd.gs-gdl": {
+ "source": "apache"
+ },
+ "model/vnd.gs.gdl": {
+ "source": "iana"
+ },
+ "model/vnd.gtw": {
+ "source": "iana",
+ "extensions": ["gtw"]
+ },
+ "model/vnd.moml+xml": {
+ "source": "iana"
+ },
+ "model/vnd.mts": {
+ "source": "iana",
+ "extensions": ["mts"]
+ },
+ "model/vnd.opengex": {
+ "source": "iana"
+ },
+ "model/vnd.parasolid.transmit.binary": {
+ "source": "iana"
+ },
+ "model/vnd.parasolid.transmit.text": {
+ "source": "iana"
+ },
+ "model/vnd.rosette.annotated-data-model": {
+ "source": "iana"
+ },
+ "model/vnd.valve.source.compiled-map": {
+ "source": "iana"
+ },
+ "model/vnd.vtu": {
+ "source": "iana",
+ "extensions": ["vtu"]
+ },
+ "model/vrml": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["wrl","vrml"]
+ },
+ "model/x3d+binary": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["x3db","x3dbz"]
+ },
+ "model/x3d+fastinfoset": {
+ "source": "iana"
+ },
+ "model/x3d+vrml": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["x3dv","x3dvz"]
+ },
+ "model/x3d+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["x3d","x3dz"]
+ },
+ "model/x3d-vrml": {
+ "source": "iana"
+ },
+ "multipart/alternative": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/appledouble": {
+ "source": "iana"
+ },
+ "multipart/byteranges": {
+ "source": "iana"
+ },
+ "multipart/digest": {
+ "source": "iana"
+ },
+ "multipart/encrypted": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/form-data": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/header-set": {
+ "source": "iana"
+ },
+ "multipart/mixed": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/parallel": {
+ "source": "iana"
+ },
+ "multipart/related": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/report": {
+ "source": "iana"
+ },
+ "multipart/signed": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/voice-message": {
+ "source": "iana"
+ },
+ "multipart/x-mixed-replace": {
+ "source": "iana"
+ },
+ "text/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "text/cache-manifest": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["appcache","manifest"]
+ },
+ "text/calendar": {
+ "source": "iana",
+ "extensions": ["ics","ifb"]
+ },
+ "text/calender": {
+ "compressible": true
+ },
+ "text/cmd": {
+ "compressible": true
+ },
+ "text/coffeescript": {
+ "extensions": ["coffee","litcoffee"]
+ },
+ "text/css": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["css"]
+ },
+ "text/csv": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["csv"]
+ },
+ "text/csv-schema": {
+ "source": "iana"
+ },
+ "text/directory": {
+ "source": "iana"
+ },
+ "text/dns": {
+ "source": "iana"
+ },
+ "text/ecmascript": {
+ "source": "iana"
+ },
+ "text/encaprtp": {
+ "source": "iana"
+ },
+ "text/enriched": {
+ "source": "iana"
+ },
+ "text/fwdred": {
+ "source": "iana"
+ },
+ "text/grammar-ref-list": {
+ "source": "iana"
+ },
+ "text/hjson": {
+ "extensions": ["hjson"]
+ },
+ "text/html": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["html","htm","shtml"]
+ },
+ "text/jade": {
+ "extensions": ["jade"]
+ },
+ "text/javascript": {
+ "source": "iana",
+ "compressible": true
+ },
+ "text/jcr-cnd": {
+ "source": "iana"
+ },
+ "text/jsx": {
+ "compressible": true,
+ "extensions": ["jsx"]
+ },
+ "text/less": {
+ "extensions": ["less"]
+ },
+ "text/markdown": {
+ "source": "iana"
+ },
+ "text/mathml": {
+ "source": "nginx",
+ "extensions": ["mml"]
+ },
+ "text/mizar": {
+ "source": "iana"
+ },
+ "text/n3": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["n3"]
+ },
+ "text/parameters": {
+ "source": "iana"
+ },
+ "text/parityfec": {
+ "source": "iana"
+ },
+ "text/plain": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["txt","text","conf","def","list","log","in","ini"]
+ },
+ "text/provenance-notation": {
+ "source": "iana"
+ },
+ "text/prs.fallenstein.rst": {
+ "source": "iana"
+ },
+ "text/prs.lines.tag": {
+ "source": "iana",
+ "extensions": ["dsc"]
+ },
+ "text/prs.prop.logic": {
+ "source": "iana"
+ },
+ "text/raptorfec": {
+ "source": "iana"
+ },
+ "text/red": {
+ "source": "iana"
+ },
+ "text/rfc822-headers": {
+ "source": "iana"
+ },
+ "text/richtext": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rtx"]
+ },
+ "text/rtf": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rtf"]
+ },
+ "text/rtp-enc-aescm128": {
+ "source": "iana"
+ },
+ "text/rtploopback": {
+ "source": "iana"
+ },
+ "text/rtx": {
+ "source": "iana"
+ },
+ "text/sgml": {
+ "source": "iana",
+ "extensions": ["sgml","sgm"]
+ },
+ "text/slim": {
+ "extensions": ["slim","slm"]
+ },
+ "text/stylus": {
+ "extensions": ["stylus","styl"]
+ },
+ "text/t140": {
+ "source": "iana"
+ },
+ "text/tab-separated-values": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["tsv"]
+ },
+ "text/troff": {
+ "source": "iana",
+ "extensions": ["t","tr","roff","man","me","ms"]
+ },
+ "text/turtle": {
+ "source": "iana",
+ "extensions": ["ttl"]
+ },
+ "text/ulpfec": {
+ "source": "iana"
+ },
+ "text/uri-list": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["uri","uris","urls"]
+ },
+ "text/vcard": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["vcard"]
+ },
+ "text/vnd.a": {
+ "source": "iana"
+ },
+ "text/vnd.abc": {
+ "source": "iana"
+ },
+ "text/vnd.ascii-art": {
+ "source": "iana"
+ },
+ "text/vnd.curl": {
+ "source": "iana",
+ "extensions": ["curl"]
+ },
+ "text/vnd.curl.dcurl": {
+ "source": "apache",
+ "extensions": ["dcurl"]
+ },
+ "text/vnd.curl.mcurl": {
+ "source": "apache",
+ "extensions": ["mcurl"]
+ },
+ "text/vnd.curl.scurl": {
+ "source": "apache",
+ "extensions": ["scurl"]
+ },
+ "text/vnd.debian.copyright": {
+ "source": "iana"
+ },
+ "text/vnd.dmclientscript": {
+ "source": "iana"
+ },
+ "text/vnd.dvb.subtitle": {
+ "source": "iana",
+ "extensions": ["sub"]
+ },
+ "text/vnd.esmertec.theme-descriptor": {
+ "source": "iana"
+ },
+ "text/vnd.fly": {
+ "source": "iana",
+ "extensions": ["fly"]
+ },
+ "text/vnd.fmi.flexstor": {
+ "source": "iana",
+ "extensions": ["flx"]
+ },
+ "text/vnd.graphviz": {
+ "source": "iana",
+ "extensions": ["gv"]
+ },
+ "text/vnd.in3d.3dml": {
+ "source": "iana",
+ "extensions": ["3dml"]
+ },
+ "text/vnd.in3d.spot": {
+ "source": "iana",
+ "extensions": ["spot"]
+ },
+ "text/vnd.iptc.newsml": {
+ "source": "iana"
+ },
+ "text/vnd.iptc.nitf": {
+ "source": "iana"
+ },
+ "text/vnd.latex-z": {
+ "source": "iana"
+ },
+ "text/vnd.motorola.reflex": {
+ "source": "iana"
+ },
+ "text/vnd.ms-mediapackage": {
+ "source": "iana"
+ },
+ "text/vnd.net2phone.commcenter.command": {
+ "source": "iana"
+ },
+ "text/vnd.radisys.msml-basic-layout": {
+ "source": "iana"
+ },
+ "text/vnd.si.uricatalogue": {
+ "source": "iana"
+ },
+ "text/vnd.sun.j2me.app-descriptor": {
+ "source": "iana",
+ "extensions": ["jad"]
+ },
+ "text/vnd.trolltech.linguist": {
+ "source": "iana"
+ },
+ "text/vnd.wap.si": {
+ "source": "iana"
+ },
+ "text/vnd.wap.sl": {
+ "source": "iana"
+ },
+ "text/vnd.wap.wml": {
+ "source": "iana",
+ "extensions": ["wml"]
+ },
+ "text/vnd.wap.wmlscript": {
+ "source": "iana",
+ "extensions": ["wmls"]
+ },
+ "text/vtt": {
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["vtt"]
+ },
+ "text/x-asm": {
+ "source": "apache",
+ "extensions": ["s","asm"]
+ },
+ "text/x-c": {
+ "source": "apache",
+ "extensions": ["c","cc","cxx","cpp","h","hh","dic"]
+ },
+ "text/x-component": {
+ "source": "nginx",
+ "extensions": ["htc"]
+ },
+ "text/x-fortran": {
+ "source": "apache",
+ "extensions": ["f","for","f77","f90"]
+ },
+ "text/x-gwt-rpc": {
+ "compressible": true
+ },
+ "text/x-handlebars-template": {
+ "extensions": ["hbs"]
+ },
+ "text/x-java-source": {
+ "source": "apache",
+ "extensions": ["java"]
+ },
+ "text/x-jquery-tmpl": {
+ "compressible": true
+ },
+ "text/x-lua": {
+ "extensions": ["lua"]
+ },
+ "text/x-markdown": {
+ "compressible": true,
+ "extensions": ["markdown","md","mkd"]
+ },
+ "text/x-nfo": {
+ "source": "apache",
+ "extensions": ["nfo"]
+ },
+ "text/x-opml": {
+ "source": "apache",
+ "extensions": ["opml"]
+ },
+ "text/x-pascal": {
+ "source": "apache",
+ "extensions": ["p","pas"]
+ },
+ "text/x-processing": {
+ "compressible": true,
+ "extensions": ["pde"]
+ },
+ "text/x-sass": {
+ "extensions": ["sass"]
+ },
+ "text/x-scss": {
+ "extensions": ["scss"]
+ },
+ "text/x-setext": {
+ "source": "apache",
+ "extensions": ["etx"]
+ },
+ "text/x-sfv": {
+ "source": "apache",
+ "extensions": ["sfv"]
+ },
+ "text/x-suse-ymp": {
+ "compressible": true,
+ "extensions": ["ymp"]
+ },
+ "text/x-uuencode": {
+ "source": "apache",
+ "extensions": ["uu"]
+ },
+ "text/x-vcalendar": {
+ "source": "apache",
+ "extensions": ["vcs"]
+ },
+ "text/x-vcard": {
+ "source": "apache",
+ "extensions": ["vcf"]
+ },
+ "text/xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xml"]
+ },
+ "text/xml-external-parsed-entity": {
+ "source": "iana"
+ },
+ "text/yaml": {
+ "extensions": ["yaml","yml"]
+ },
+ "video/1d-interleaved-parityfec": {
+ "source": "apache"
+ },
+ "video/3gpp": {
+ "source": "apache",
+ "extensions": ["3gp","3gpp"]
+ },
+ "video/3gpp-tt": {
+ "source": "apache"
+ },
+ "video/3gpp2": {
+ "source": "apache",
+ "extensions": ["3g2"]
+ },
+ "video/bmpeg": {
+ "source": "apache"
+ },
+ "video/bt656": {
+ "source": "apache"
+ },
+ "video/celb": {
+ "source": "apache"
+ },
+ "video/dv": {
+ "source": "apache"
+ },
+ "video/encaprtp": {
+ "source": "apache"
+ },
+ "video/h261": {
+ "source": "apache",
+ "extensions": ["h261"]
+ },
+ "video/h263": {
+ "source": "apache",
+ "extensions": ["h263"]
+ },
+ "video/h263-1998": {
+ "source": "apache"
+ },
+ "video/h263-2000": {
+ "source": "apache"
+ },
+ "video/h264": {
+ "source": "apache",
+ "extensions": ["h264"]
+ },
+ "video/h264-rcdo": {
+ "source": "apache"
+ },
+ "video/h264-svc": {
+ "source": "apache"
+ },
+ "video/h265": {
+ "source": "apache"
+ },
+ "video/iso.segment": {
+ "source": "apache"
+ },
+ "video/jpeg": {
+ "source": "apache",
+ "extensions": ["jpgv"]
+ },
+ "video/jpeg2000": {
+ "source": "apache"
+ },
+ "video/jpm": {
+ "source": "apache",
+ "extensions": ["jpm","jpgm"]
+ },
+ "video/mj2": {
+ "source": "apache",
+ "extensions": ["mj2","mjp2"]
+ },
+ "video/mp1s": {
+ "source": "apache"
+ },
+ "video/mp2p": {
+ "source": "apache"
+ },
+ "video/mp2t": {
+ "source": "apache",
+ "extensions": ["ts"]
+ },
+ "video/mp4": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["mp4","mp4v","mpg4"]
+ },
+ "video/mp4v-es": {
+ "source": "apache"
+ },
+ "video/mpeg": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["mpeg","mpg","mpe","m1v","m2v"]
+ },
+ "video/mpeg4-generic": {
+ "source": "apache"
+ },
+ "video/mpv": {
+ "source": "apache"
+ },
+ "video/nv": {
+ "source": "apache"
+ },
+ "video/ogg": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["ogv"]
+ },
+ "video/parityfec": {
+ "source": "apache"
+ },
+ "video/pointer": {
+ "source": "apache"
+ },
+ "video/quicktime": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["qt","mov"]
+ },
+ "video/raptorfec": {
+ "source": "apache"
+ },
+ "video/raw": {
+ "source": "apache"
+ },
+ "video/rtp-enc-aescm128": {
+ "source": "apache"
+ },
+ "video/rtploopback": {
+ "source": "apache"
+ },
+ "video/rtx": {
+ "source": "apache"
+ },
+ "video/smpte292m": {
+ "source": "apache"
+ },
+ "video/ulpfec": {
+ "source": "apache"
+ },
+ "video/vc1": {
+ "source": "apache"
+ },
+ "video/vnd.cctv": {
+ "source": "apache"
+ },
+ "video/vnd.dece.hd": {
+ "source": "apache",
+ "extensions": ["uvh","uvvh"]
+ },
+ "video/vnd.dece.mobile": {
+ "source": "apache",
+ "extensions": ["uvm","uvvm"]
+ },
+ "video/vnd.dece.mp4": {
+ "source": "apache"
+ },
+ "video/vnd.dece.pd": {
+ "source": "apache",
+ "extensions": ["uvp","uvvp"]
+ },
+ "video/vnd.dece.sd": {
+ "source": "apache",
+ "extensions": ["uvs","uvvs"]
+ },
+ "video/vnd.dece.video": {
+ "source": "apache",
+ "extensions": ["uvv","uvvv"]
+ },
+ "video/vnd.directv.mpeg": {
+ "source": "apache"
+ },
+ "video/vnd.directv.mpeg-tts": {
+ "source": "apache"
+ },
+ "video/vnd.dlna.mpeg-tts": {
+ "source": "apache"
+ },
+ "video/vnd.dvb.file": {
+ "source": "apache",
+ "extensions": ["dvb"]
+ },
+ "video/vnd.fvt": {
+ "source": "apache",
+ "extensions": ["fvt"]
+ },
+ "video/vnd.hns.video": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.1dparityfec-1010": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.1dparityfec-2005": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.2dparityfec-1010": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.2dparityfec-2005": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.ttsavc": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.ttsmpeg2": {
+ "source": "apache"
+ },
+ "video/vnd.motorola.video": {
+ "source": "apache"
+ },
+ "video/vnd.motorola.videop": {
+ "source": "apache"
+ },
+ "video/vnd.mpegurl": {
+ "source": "apache",
+ "extensions": ["mxu","m4u"]
+ },
+ "video/vnd.ms-playready.media.pyv": {
+ "source": "apache",
+ "extensions": ["pyv"]
+ },
+ "video/vnd.nokia.interleaved-multimedia": {
+ "source": "apache"
+ },
+ "video/vnd.nokia.videovoip": {
+ "source": "apache"
+ },
+ "video/vnd.objectvideo": {
+ "source": "apache"
+ },
+ "video/vnd.radgamettools.bink": {
+ "source": "apache"
+ },
+ "video/vnd.radgamettools.smacker": {
+ "source": "apache"
+ },
+ "video/vnd.sealed.mpeg1": {
+ "source": "apache"
+ },
+ "video/vnd.sealed.mpeg4": {
+ "source": "apache"
+ },
+ "video/vnd.sealed.swf": {
+ "source": "apache"
+ },
+ "video/vnd.sealedmedia.softseal.mov": {
+ "source": "apache"
+ },
+ "video/vnd.uvvu.mp4": {
+ "source": "apache",
+ "extensions": ["uvu","uvvu"]
+ },
+ "video/vnd.vivo": {
+ "source": "apache",
+ "extensions": ["viv"]
+ },
+ "video/vp8": {
+ "source": "apache"
+ },
+ "video/webm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["webm"]
+ },
+ "video/x-f4v": {
+ "source": "apache",
+ "extensions": ["f4v"]
+ },
+ "video/x-fli": {
+ "source": "apache",
+ "extensions": ["fli"]
+ },
+ "video/x-flv": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["flv"]
+ },
+ "video/x-m4v": {
+ "source": "apache",
+ "extensions": ["m4v"]
+ },
+ "video/x-matroska": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["mkv","mk3d","mks"]
+ },
+ "video/x-mng": {
+ "source": "apache",
+ "extensions": ["mng"]
+ },
+ "video/x-ms-asf": {
+ "source": "apache",
+ "extensions": ["asf","asx"]
+ },
+ "video/x-ms-vob": {
+ "source": "apache",
+ "extensions": ["vob"]
+ },
+ "video/x-ms-wm": {
+ "source": "apache",
+ "extensions": ["wm"]
+ },
+ "video/x-ms-wmv": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["wmv"]
+ },
+ "video/x-ms-wmx": {
+ "source": "apache",
+ "extensions": ["wmx"]
+ },
+ "video/x-ms-wvx": {
+ "source": "apache",
+ "extensions": ["wvx"]
+ },
+ "video/x-msvideo": {
+ "source": "apache",
+ "extensions": ["avi"]
+ },
+ "video/x-sgi-movie": {
+ "source": "apache",
+ "extensions": ["movie"]
+ },
+ "video/x-smv": {
+ "source": "apache",
+ "extensions": ["smv"]
+ },
+ "x-conference/x-cooltalk": {
+ "source": "apache",
+ "extensions": ["ice"]
+ },
+ "x-shader/x-fragment": {
+ "compressible": true
+ },
+ "x-shader/x-vertex": {
+ "compressible": true
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/index.js
new file mode 100644
index 0000000..551031f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/index.js
@@ -0,0 +1,11 @@
+/*!
+ * mime-db
+ * Copyright(c) 2014 Jonathan Ong
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = require('./db.json')
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json
new file mode 100644
index 0000000..cf23516
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json
@@ -0,0 +1,103 @@
+{
+ "name": "mime-db",
+ "description": "Media Type Database",
+ "version": "1.25.0",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ {
+ "name": "Robert Kieffer",
+ "email": "robert@broofa.com",
+ "url": "http://github.com/broofa"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "mime",
+ "db",
+ "type",
+ "types",
+ "database",
+ "charset",
+ "charsets"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jshttp/mime-db.git"
+ },
+ "devDependencies": {
+ "bluebird": "3.4.6",
+ "co": "4.6.0",
+ "cogent": "1.0.1",
+ "csv-parse": "1.1.7",
+ "eslint": "3.9.1",
+ "eslint-config-standard": "6.2.1",
+ "eslint-plugin-promise": "3.3.0",
+ "eslint-plugin-standard": "2.0.1",
+ "gnode": "0.1.2",
+ "istanbul": "0.4.5",
+ "mocha": "1.21.5",
+ "raw-body": "2.1.7",
+ "stream-to-array": "2.3.0"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "README.md",
+ "db.json",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "build": "node scripts/build",
+ "fetch": "gnode scripts/fetch-apache && gnode scripts/fetch-iana && gnode scripts/fetch-nginx",
+ "lint": "eslint .",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "update": "npm run fetch && npm run build"
+ },
+ "gitHead": "9a2c710e347b4a7f030aae0d15afc0a06d1c8a37",
+ "bugs": {
+ "url": "https://github.com/jshttp/mime-db/issues"
+ },
+ "homepage": "https://github.com/jshttp/mime-db",
+ "_id": "mime-db@1.25.0",
+ "_shasum": "c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392",
+ "_from": "mime-db@>=1.25.0 <1.26.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392",
+ "tarball": "https://registry.npmjs.org/mime-db/-/mime-db-1.25.0.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/mime-db-1.25.0.tgz_1478915345127_0.22604371700435877"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.25.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/package.json
new file mode 100644
index 0000000..fa9642b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/node_modules/mime-types/package.json
@@ -0,0 +1,93 @@
+{
+ "name": "mime-types",
+ "description": "The ultimate javascript content-type utility.",
+ "version": "2.1.13",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jeremiah Senkpiel",
+ "email": "fishrock123@rocketmail.com",
+ "url": "https://searchbeam.jit.su"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "mime",
+ "types"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jshttp/mime-types.git"
+ },
+ "dependencies": {
+ "mime-db": "~1.25.0"
+ },
+ "devDependencies": {
+ "eslint": "3.10.2",
+ "eslint-config-standard": "6.2.1",
+ "eslint-plugin-promise": "3.4.0",
+ "eslint-plugin-standard": "2.0.1",
+ "istanbul": "0.4.5",
+ "mocha": "1.21.5"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "lint": "eslint .",
+ "test": "mocha --reporter spec test/test.js",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot test/test.js"
+ },
+ "gitHead": "83e91a5aea93858bc95ec95a99309592cba0ffe3",
+ "bugs": {
+ "url": "https://github.com/jshttp/mime-types/issues"
+ },
+ "homepage": "https://github.com/jshttp/mime-types",
+ "_id": "mime-types@2.1.13",
+ "_shasum": "e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88",
+ "_from": "mime-types@>=2.1.13 <2.2.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88",
+ "tarball": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.13.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/mime-types-2.1.13.tgz_1479505166253_0.5666956284549087"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.13.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/package.json
new file mode 100644
index 0000000..9c67f42
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/node_modules/type-is/package.json
@@ -0,0 +1,86 @@
+{
+ "name": "type-is",
+ "description": "Infer the content-type of a request.",
+ "version": "1.6.14",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jshttp/type-is.git"
+ },
+ "dependencies": {
+ "media-typer": "0.3.0",
+ "mime-types": "~2.1.13"
+ },
+ "devDependencies": {
+ "eslint": "2.10.2",
+ "eslint-config-standard": "5.3.1",
+ "eslint-plugin-promise": "1.1.0",
+ "eslint-plugin-standard": "1.3.2",
+ "istanbul": "0.4.5",
+ "mocha": "1.21.5"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "scripts": {
+ "lint": "eslint .",
+ "test": "mocha --reporter spec --check-leaks --bail test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "keywords": [
+ "content",
+ "type",
+ "checking"
+ ],
+ "gitHead": "f88151e69d91c5ed42e29dea78f5566403a5a7ad",
+ "bugs": {
+ "url": "https://github.com/jshttp/type-is/issues"
+ },
+ "homepage": "https://github.com/jshttp/type-is",
+ "_id": "type-is@1.6.14",
+ "_shasum": "e219639c17ded1ca0789092dd54a03826b817cb2",
+ "_from": "type-is@>=1.6.13 <1.7.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e219639c17ded1ca0789092dd54a03826b817cb2",
+ "tarball": "https://registry.npmjs.org/type-is/-/type-is-1.6.14.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/type-is-1.6.14.tgz_1479517858770_0.4908413903322071"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.14.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/package.json
new file mode 100644
index 0000000..2d75d95
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/body-parser/package.json
@@ -0,0 +1,88 @@
+{
+ "name": "body-parser",
+ "description": "Node.js body parsing middleware",
+ "version": "1.15.2",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/expressjs/body-parser.git"
+ },
+ "dependencies": {
+ "bytes": "2.4.0",
+ "content-type": "~1.0.2",
+ "debug": "~2.2.0",
+ "depd": "~1.1.0",
+ "http-errors": "~1.5.0",
+ "iconv-lite": "0.4.13",
+ "on-finished": "~2.3.0",
+ "qs": "6.2.0",
+ "raw-body": "~2.1.7",
+ "type-is": "~1.6.13"
+ },
+ "devDependencies": {
+ "eslint": "2.13.0",
+ "eslint-config-standard": "5.3.1",
+ "eslint-plugin-promise": "1.3.2",
+ "eslint-plugin-standard": "1.3.2",
+ "istanbul": "0.4.3",
+ "methods": "1.1.2",
+ "mocha": "2.5.3",
+ "supertest": "1.1.0"
+ },
+ "files": [
+ "lib/",
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "scripts": {
+ "lint": "eslint **/*.js",
+ "test": "mocha --require test/support/env --reporter spec --check-leaks --bail test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --require test/support/env --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --require test/support/env --reporter spec --check-leaks test/"
+ },
+ "gitHead": "3c8218446d919a5e87fa696971fb7f69b10afc1c",
+ "bugs": {
+ "url": "https://github.com/expressjs/body-parser/issues"
+ },
+ "homepage": "https://github.com/expressjs/body-parser#readme",
+ "_id": "body-parser@1.15.2",
+ "_shasum": "d7578cf4f1d11d5f6ea804cef35dc7a7ff6dae67",
+ "_from": "body-parser@latest",
+ "_npmVersion": "2.15.1",
+ "_nodeVersion": "4.4.3",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "dist": {
+ "shasum": "d7578cf4f1d11d5f6ea804cef35dc7a7ff6dae67",
+ "tarball": "https://registry.npmjs.org/body-parser/-/body-parser-1.15.2.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/body-parser-1.15.2.tgz_1466393694089_0.7908455491997302"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.15.2.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/History.md
new file mode 100644
index 0000000..40a5ed7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/History.md
@@ -0,0 +1,3142 @@
+4.14.0 / 2016-06-16
+===================
+
+ * Add `acceptRanges` option to `res.sendFile`/`res.sendfile`
+ * Add `cacheControl` option to `res.sendFile`/`res.sendfile`
+ * Add `options` argument to `req.range`
+ - Includes the `combine` option
+ * Encode URL in `res.location`/`res.redirect` if not already encoded
+ * Fix some redirect handling in `res.sendFile`/`res.sendfile`
+ * Fix Windows absolute path check using forward slashes
+ * Improve error with invalid arguments to `req.get()`
+ * Improve performance for `res.json`/`res.jsonp` in most cases
+ * Improve `Range` header handling in `res.sendFile`/`res.sendfile`
+ * deps: accepts@~1.3.3
+ - Fix including type extensions in parameters in `Accept` parsing
+ - Fix parsing `Accept` parameters with quoted equals
+ - Fix parsing `Accept` parameters with quoted semicolons
+ - Many performance improvments
+ - deps: mime-types@~2.1.11
+ - deps: negotiator@0.6.1
+ * deps: content-type@~1.0.2
+ - perf: enable strict mode
+ * deps: cookie@0.3.1
+ - Add `sameSite` option
+ - Fix cookie `Max-Age` to never be a floating point number
+ - Improve error message when `encode` is not a function
+ - Improve error message when `expires` is not a `Date`
+ - Throw better error for invalid argument to parse
+ - Throw on invalid values provided to `serialize`
+ - perf: enable strict mode
+ - perf: hoist regular expression
+ - perf: use for loop in parse
+ - perf: use string concatination for serialization
+ * deps: finalhandler@0.5.0
+ - Change invalid or non-numeric status code to 500
+ - Overwrite status message to match set status code
+ - Prefer `err.statusCode` if `err.status` is invalid
+ - Set response headers from `err.headers` object
+ - Use `statuses` instead of `http` module for status messages
+ * deps: proxy-addr@~1.1.2
+ - Fix accepting various invalid netmasks
+ - Fix IPv6-mapped IPv4 validation edge cases
+ - IPv4 netmasks must be contingous
+ - IPv6 addresses cannot be used as a netmask
+ - deps: ipaddr.js@1.1.1
+ * deps: qs@6.2.0
+ - Add `decoder` option in `parse` function
+ * deps: range-parser@~1.2.0
+ - Add `combine` option to combine overlapping ranges
+ - Fix incorrectly returning -1 when there is at least one valid range
+ - perf: remove internal function
+ * deps: send@0.14.1
+ - Add `acceptRanges` option
+ - Add `cacheControl` option
+ - Attempt to combine multiple ranges into single range
+ - Correctly inherit from `Stream` class
+ - Fix `Content-Range` header in 416 responses when using `start`/`end` options
+ - Fix `Content-Range` header missing from default 416 responses
+ - Fix redirect error when `path` contains raw non-URL characters
+ - Fix redirect when `path` starts with multiple forward slashes
+ - Ignore non-byte `Range` headers
+ - deps: http-errors@~1.5.0
+ - deps: range-parser@~1.2.0
+ - deps: statuses@~1.3.0
+ - perf: remove argument reassignment
+ * deps: serve-static@~1.11.1
+ - Add `acceptRanges` option
+ - Add `cacheControl` option
+ - Attempt to combine multiple ranges into single range
+ - Fix redirect error when `req.url` contains raw non-URL characters
+ - Ignore non-byte `Range` headers
+ - Use status code 301 for redirects
+ - deps: send@0.14.1
+ * deps: type-is@~1.6.13
+ - Fix type error when given invalid type to match against
+ - deps: mime-types@~2.1.11
+ * deps: vary@~1.1.0
+ - Only accept valid field names in the `field` argument
+ * perf: use strict equality when possible
+
+4.13.4 / 2016-01-21
+===================
+
+ * deps: content-disposition@0.5.1
+ - perf: enable strict mode
+ * deps: cookie@0.1.5
+ - Throw on invalid values provided to `serialize`
+ * deps: depd@~1.1.0
+ - Support web browser loading
+ - perf: enable strict mode
+ * deps: escape-html@~1.0.3
+ - perf: enable strict mode
+ - perf: optimize string replacement
+ - perf: use faster string coercion
+ * deps: finalhandler@0.4.1
+ - deps: escape-html@~1.0.3
+ * deps: merge-descriptors@1.0.1
+ - perf: enable strict mode
+ * deps: methods@~1.1.2
+ - perf: enable strict mode
+ * deps: parseurl@~1.3.1
+ - perf: enable strict mode
+ * deps: proxy-addr@~1.0.10
+ - deps: ipaddr.js@1.0.5
+ - perf: enable strict mode
+ * deps: range-parser@~1.0.3
+ - perf: enable strict mode
+ * deps: send@0.13.1
+ - deps: depd@~1.1.0
+ - deps: destroy@~1.0.4
+ - deps: escape-html@~1.0.3
+ - deps: range-parser@~1.0.3
+ * deps: serve-static@~1.10.2
+ - deps: escape-html@~1.0.3
+ - deps: parseurl@~1.3.0
+ - deps: send@0.13.1
+
+4.13.3 / 2015-08-02
+===================
+
+ * Fix infinite loop condition using `mergeParams: true`
+ * Fix inner numeric indices incorrectly altering parent `req.params`
+
+4.13.2 / 2015-07-31
+===================
+
+ * deps: accepts@~1.2.12
+ - deps: mime-types@~2.1.4
+ * deps: array-flatten@1.1.1
+ - perf: enable strict mode
+ * deps: path-to-regexp@0.1.7
+ - Fix regression with escaped round brackets and matching groups
+ * deps: type-is@~1.6.6
+ - deps: mime-types@~2.1.4
+
+4.13.1 / 2015-07-05
+===================
+
+ * deps: accepts@~1.2.10
+ - deps: mime-types@~2.1.2
+ * deps: qs@4.0.0
+ - Fix dropping parameters like `hasOwnProperty`
+ - Fix various parsing edge cases
+ * deps: type-is@~1.6.4
+ - deps: mime-types@~2.1.2
+ - perf: enable strict mode
+ - perf: remove argument reassignment
+
+4.13.0 / 2015-06-20
+===================
+
+ * Add settings to debug output
+ * Fix `res.format` error when only `default` provided
+ * Fix issue where `next('route')` in `app.param` would incorrectly skip values
+ * Fix hiding platform issues with `decodeURIComponent`
+ - Only `URIError`s are a 400
+ * Fix using `*` before params in routes
+ * Fix using capture groups before params in routes
+ * Simplify `res.cookie` to call `res.append`
+ * Use `array-flatten` module for flattening arrays
+ * deps: accepts@~1.2.9
+ - deps: mime-types@~2.1.1
+ - perf: avoid argument reassignment & argument slice
+ - perf: avoid negotiator recursive construction
+ - perf: enable strict mode
+ - perf: remove unnecessary bitwise operator
+ * deps: cookie@0.1.3
+ - perf: deduce the scope of try-catch deopt
+ - perf: remove argument reassignments
+ * deps: escape-html@1.0.2
+ * deps: etag@~1.7.0
+ - Always include entity length in ETags for hash length extensions
+ - Generate non-Stats ETags using MD5 only (no longer CRC32)
+ - Improve stat performance by removing hashing
+ - Improve support for JXcore
+ - Remove base64 padding in ETags to shorten
+ - Support "fake" stats objects in environments without fs
+ - Use MD5 instead of MD4 in weak ETags over 1KB
+ * deps: finalhandler@0.4.0
+ - Fix a false-positive when unpiping in Node.js 0.8
+ - Support `statusCode` property on `Error` objects
+ - Use `unpipe` module for unpiping requests
+ - deps: escape-html@1.0.2
+ - deps: on-finished@~2.3.0
+ - perf: enable strict mode
+ - perf: remove argument reassignment
+ * deps: fresh@0.3.0
+ - Add weak `ETag` matching support
+ * deps: on-finished@~2.3.0
+ - Add defined behavior for HTTP `CONNECT` requests
+ - Add defined behavior for HTTP `Upgrade` requests
+ - deps: ee-first@1.1.1
+ * deps: path-to-regexp@0.1.6
+ * deps: send@0.13.0
+ - Allow Node.js HTTP server to set `Date` response header
+ - Fix incorrectly removing `Content-Location` on 304 response
+ - Improve the default redirect response headers
+ - Send appropriate headers on default error response
+ - Use `http-errors` for standard emitted errors
+ - Use `statuses` instead of `http` module for status messages
+ - deps: escape-html@1.0.2
+ - deps: etag@~1.7.0
+ - deps: fresh@0.3.0
+ - deps: on-finished@~2.3.0
+ - perf: enable strict mode
+ - perf: remove unnecessary array allocations
+ * deps: serve-static@~1.10.0
+ - Add `fallthrough` option
+ - Fix reading options from options prototype
+ - Improve the default redirect response headers
+ - Malformed URLs now `next()` instead of 400
+ - deps: escape-html@1.0.2
+ - deps: send@0.13.0
+ - perf: enable strict mode
+ - perf: remove argument reassignment
+ * deps: type-is@~1.6.3
+ - deps: mime-types@~2.1.1
+ - perf: reduce try block size
+ - perf: remove bitwise operations
+ * perf: enable strict mode
+ * perf: isolate `app.render` try block
+ * perf: remove argument reassignments in application
+ * perf: remove argument reassignments in request prototype
+ * perf: remove argument reassignments in response prototype
+ * perf: remove argument reassignments in routing
+ * perf: remove argument reassignments in `View`
+ * perf: skip attempting to decode zero length string
+ * perf: use saved reference to `http.STATUS_CODES`
+
+4.12.4 / 2015-05-17
+===================
+
+ * deps: accepts@~1.2.7
+ - deps: mime-types@~2.0.11
+ - deps: negotiator@0.5.3
+ * deps: debug@~2.2.0
+ - deps: ms@0.7.1
+ * deps: depd@~1.0.1
+ * deps: etag@~1.6.0
+ - Improve support for JXcore
+ - Support "fake" stats objects in environments without `fs`
+ * deps: finalhandler@0.3.6
+ - deps: debug@~2.2.0
+ - deps: on-finished@~2.2.1
+ * deps: on-finished@~2.2.1
+ - Fix `isFinished(req)` when data buffered
+ * deps: proxy-addr@~1.0.8
+ - deps: ipaddr.js@1.0.1
+ * deps: qs@2.4.2
+ - Fix allowing parameters like `constructor`
+ * deps: send@0.12.3
+ - deps: debug@~2.2.0
+ - deps: depd@~1.0.1
+ - deps: etag@~1.6.0
+ - deps: ms@0.7.1
+ - deps: on-finished@~2.2.1
+ * deps: serve-static@~1.9.3
+ - deps: send@0.12.3
+ * deps: type-is@~1.6.2
+ - deps: mime-types@~2.0.11
+
+4.12.3 / 2015-03-17
+===================
+
+ * deps: accepts@~1.2.5
+ - deps: mime-types@~2.0.10
+ * deps: debug@~2.1.3
+ - Fix high intensity foreground color for bold
+ - deps: ms@0.7.0
+ * deps: finalhandler@0.3.4
+ - deps: debug@~2.1.3
+ * deps: proxy-addr@~1.0.7
+ - deps: ipaddr.js@0.1.9
+ * deps: qs@2.4.1
+ - Fix error when parameter `hasOwnProperty` is present
+ * deps: send@0.12.2
+ - Throw errors early for invalid `extensions` or `index` options
+ - deps: debug@~2.1.3
+ * deps: serve-static@~1.9.2
+ - deps: send@0.12.2
+ * deps: type-is@~1.6.1
+ - deps: mime-types@~2.0.10
+
+4.12.2 / 2015-03-02
+===================
+
+ * Fix regression where `"Request aborted"` is logged using `res.sendFile`
+
+4.12.1 / 2015-03-01
+===================
+
+ * Fix constructing application with non-configurable prototype properties
+ * Fix `ECONNRESET` errors from `res.sendFile` usage
+ * Fix `req.host` when using "trust proxy" hops count
+ * Fix `req.protocol`/`req.secure` when using "trust proxy" hops count
+ * Fix wrong `code` on aborted connections from `res.sendFile`
+ * deps: merge-descriptors@1.0.0
+
+4.12.0 / 2015-02-23
+===================
+
+ * Fix `"trust proxy"` setting to inherit when app is mounted
+ * Generate `ETag`s for all request responses
+ - No longer restricted to only responses for `GET` and `HEAD` requests
+ * Use `content-type` to parse `Content-Type` headers
+ * deps: accepts@~1.2.4
+ - Fix preference sorting to be stable for long acceptable lists
+ - deps: mime-types@~2.0.9
+ - deps: negotiator@0.5.1
+ * deps: cookie-signature@1.0.6
+ * deps: send@0.12.1
+ - Always read the stat size from the file
+ - Fix mutating passed-in `options`
+ - deps: mime@1.3.4
+ * deps: serve-static@~1.9.1
+ - deps: send@0.12.1
+ * deps: type-is@~1.6.0
+ - fix argument reassignment
+ - fix false-positives in `hasBody` `Transfer-Encoding` check
+ - support wildcard for both type and subtype (`*/*`)
+ - deps: mime-types@~2.0.9
+
+4.11.2 / 2015-02-01
+===================
+
+ * Fix `res.redirect` double-calling `res.end` for `HEAD` requests
+ * deps: accepts@~1.2.3
+ - deps: mime-types@~2.0.8
+ * deps: proxy-addr@~1.0.6
+ - deps: ipaddr.js@0.1.8
+ * deps: type-is@~1.5.6
+ - deps: mime-types@~2.0.8
+
+4.11.1 / 2015-01-20
+===================
+
+ * deps: send@0.11.1
+ - Fix root path disclosure
+ * deps: serve-static@~1.8.1
+ - Fix redirect loop in Node.js 0.11.14
+ - Fix root path disclosure
+ - deps: send@0.11.1
+
+4.11.0 / 2015-01-13
+===================
+
+ * Add `res.append(field, val)` to append headers
+ * Deprecate leading `:` in `name` for `app.param(name, fn)`
+ * Deprecate `req.param()` -- use `req.params`, `req.body`, or `req.query` instead
+ * Deprecate `app.param(fn)`
+ * Fix `OPTIONS` responses to include the `HEAD` method properly
+ * Fix `res.sendFile` not always detecting aborted connection
+ * Match routes iteratively to prevent stack overflows
+ * deps: accepts@~1.2.2
+ - deps: mime-types@~2.0.7
+ - deps: negotiator@0.5.0
+ * deps: send@0.11.0
+ - deps: debug@~2.1.1
+ - deps: etag@~1.5.1
+ - deps: ms@0.7.0
+ - deps: on-finished@~2.2.0
+ * deps: serve-static@~1.8.0
+ - deps: send@0.11.0
+
+4.10.8 / 2015-01-13
+===================
+
+ * Fix crash from error within `OPTIONS` response handler
+ * deps: proxy-addr@~1.0.5
+ - deps: ipaddr.js@0.1.6
+
+4.10.7 / 2015-01-04
+===================
+
+ * Fix `Allow` header for `OPTIONS` to not contain duplicate methods
+ * Fix incorrect "Request aborted" for `res.sendFile` when `HEAD` or 304
+ * deps: debug@~2.1.1
+ * deps: finalhandler@0.3.3
+ - deps: debug@~2.1.1
+ - deps: on-finished@~2.2.0
+ * deps: methods@~1.1.1
+ * deps: on-finished@~2.2.0
+ * deps: serve-static@~1.7.2
+ - Fix potential open redirect when mounted at root
+ * deps: type-is@~1.5.5
+ - deps: mime-types@~2.0.7
+
+4.10.6 / 2014-12-12
+===================
+
+ * Fix exception in `req.fresh`/`req.stale` without response headers
+
+4.10.5 / 2014-12-10
+===================
+
+ * Fix `res.send` double-calling `res.end` for `HEAD` requests
+ * deps: accepts@~1.1.4
+ - deps: mime-types@~2.0.4
+ * deps: type-is@~1.5.4
+ - deps: mime-types@~2.0.4
+
+4.10.4 / 2014-11-24
+===================
+
+ * Fix `res.sendfile` logging standard write errors
+
+4.10.3 / 2014-11-23
+===================
+
+ * Fix `res.sendFile` logging standard write errors
+ * deps: etag@~1.5.1
+ * deps: proxy-addr@~1.0.4
+ - deps: ipaddr.js@0.1.5
+ * deps: qs@2.3.3
+ - Fix `arrayLimit` behavior
+
+4.10.2 / 2014-11-09
+===================
+
+ * Correctly invoke async router callback asynchronously
+ * deps: accepts@~1.1.3
+ - deps: mime-types@~2.0.3
+ * deps: type-is@~1.5.3
+ - deps: mime-types@~2.0.3
+
+4.10.1 / 2014-10-28
+===================
+
+ * Fix handling of URLs containing `://` in the path
+ * deps: qs@2.3.2
+ - Fix parsing of mixed objects and values
+
+4.10.0 / 2014-10-23
+===================
+
+ * Add support for `app.set('views', array)`
+ - Views are looked up in sequence in array of directories
+ * Fix `res.send(status)` to mention `res.sendStatus(status)`
+ * Fix handling of invalid empty URLs
+ * Use `content-disposition` module for `res.attachment`/`res.download`
+ - Sends standards-compliant `Content-Disposition` header
+ - Full Unicode support
+ * Use `path.resolve` in view lookup
+ * deps: debug@~2.1.0
+ - Implement `DEBUG_FD` env variable support
+ * deps: depd@~1.0.0
+ * deps: etag@~1.5.0
+ - Improve string performance
+ - Slightly improve speed for weak ETags over 1KB
+ * deps: finalhandler@0.3.2
+ - Terminate in progress response only on error
+ - Use `on-finished` to determine request status
+ - deps: debug@~2.1.0
+ - deps: on-finished@~2.1.1
+ * deps: on-finished@~2.1.1
+ - Fix handling of pipelined requests
+ * deps: qs@2.3.0
+ - Fix parsing of mixed implicit and explicit arrays
+ * deps: send@0.10.1
+ - deps: debug@~2.1.0
+ - deps: depd@~1.0.0
+ - deps: etag@~1.5.0
+ - deps: on-finished@~2.1.1
+ * deps: serve-static@~1.7.1
+ - deps: send@0.10.1
+
+4.9.8 / 2014-10-17
+==================
+
+ * Fix `res.redirect` body when redirect status specified
+ * deps: accepts@~1.1.2
+ - Fix error when media type has invalid parameter
+ - deps: negotiator@0.4.9
+
+4.9.7 / 2014-10-10
+==================
+
+ * Fix using same param name in array of paths
+
+4.9.6 / 2014-10-08
+==================
+
+ * deps: accepts@~1.1.1
+ - deps: mime-types@~2.0.2
+ - deps: negotiator@0.4.8
+ * deps: serve-static@~1.6.4
+ - Fix redirect loop when index file serving disabled
+ * deps: type-is@~1.5.2
+ - deps: mime-types@~2.0.2
+
+4.9.5 / 2014-09-24
+==================
+
+ * deps: etag@~1.4.0
+ * deps: proxy-addr@~1.0.3
+ - Use `forwarded` npm module
+ * deps: send@0.9.3
+ - deps: etag@~1.4.0
+ * deps: serve-static@~1.6.3
+ - deps: send@0.9.3
+
+4.9.4 / 2014-09-19
+==================
+
+ * deps: qs@2.2.4
+ - Fix issue with object keys starting with numbers truncated
+
+4.9.3 / 2014-09-18
+==================
+
+ * deps: proxy-addr@~1.0.2
+ - Fix a global leak when multiple subnets are trusted
+ - deps: ipaddr.js@0.1.3
+
+4.9.2 / 2014-09-17
+==================
+
+ * Fix regression for empty string `path` in `app.use`
+ * Fix `router.use` to accept array of middleware without path
+ * Improve error message for bad `app.use` arguments
+
+4.9.1 / 2014-09-16
+==================
+
+ * Fix `app.use` to accept array of middleware without path
+ * deps: depd@0.4.5
+ * deps: etag@~1.3.1
+ * deps: send@0.9.2
+ - deps: depd@0.4.5
+ - deps: etag@~1.3.1
+ - deps: range-parser@~1.0.2
+ * deps: serve-static@~1.6.2
+ - deps: send@0.9.2
+
+4.9.0 / 2014-09-08
+==================
+
+ * Add `res.sendStatus`
+ * Invoke callback for sendfile when client aborts
+ - Applies to `res.sendFile`, `res.sendfile`, and `res.download`
+ - `err` will be populated with request aborted error
+ * Support IP address host in `req.subdomains`
+ * Use `etag` to generate `ETag` headers
+ * deps: accepts@~1.1.0
+ - update `mime-types`
+ * deps: cookie-signature@1.0.5
+ * deps: debug@~2.0.0
+ * deps: finalhandler@0.2.0
+ - Set `X-Content-Type-Options: nosniff` header
+ - deps: debug@~2.0.0
+ * deps: fresh@0.2.4
+ * deps: media-typer@0.3.0
+ - Throw error when parameter format invalid on parse
+ * deps: qs@2.2.3
+ - Fix issue where first empty value in array is discarded
+ * deps: range-parser@~1.0.2
+ * deps: send@0.9.1
+ - Add `lastModified` option
+ - Use `etag` to generate `ETag` header
+ - deps: debug@~2.0.0
+ - deps: fresh@0.2.4
+ * deps: serve-static@~1.6.1
+ - Add `lastModified` option
+ - deps: send@0.9.1
+ * deps: type-is@~1.5.1
+ - fix `hasbody` to be true for `content-length: 0`
+ - deps: media-typer@0.3.0
+ - deps: mime-types@~2.0.1
+ * deps: vary@~1.0.0
+ - Accept valid `Vary` header string as `field`
+
+4.8.8 / 2014-09-04
+==================
+
+ * deps: send@0.8.5
+ - Fix a path traversal issue when using `root`
+ - Fix malicious path detection for empty string path
+ * deps: serve-static@~1.5.4
+ - deps: send@0.8.5
+
+4.8.7 / 2014-08-29
+==================
+
+ * deps: qs@2.2.2
+ - Remove unnecessary cloning
+
+4.8.6 / 2014-08-27
+==================
+
+ * deps: qs@2.2.0
+ - Array parsing fix
+ - Performance improvements
+
+4.8.5 / 2014-08-18
+==================
+
+ * deps: send@0.8.3
+ - deps: destroy@1.0.3
+ - deps: on-finished@2.1.0
+ * deps: serve-static@~1.5.3
+ - deps: send@0.8.3
+
+4.8.4 / 2014-08-14
+==================
+
+ * deps: qs@1.2.2
+ * deps: send@0.8.2
+ - Work around `fd` leak in Node.js 0.10 for `fs.ReadStream`
+ * deps: serve-static@~1.5.2
+ - deps: send@0.8.2
+
+4.8.3 / 2014-08-10
+==================
+
+ * deps: parseurl@~1.3.0
+ * deps: qs@1.2.1
+ * deps: serve-static@~1.5.1
+ - Fix parsing of weird `req.originalUrl` values
+ - deps: parseurl@~1.3.0
+ - deps: utils-merge@1.0.0
+
+4.8.2 / 2014-08-07
+==================
+
+ * deps: qs@1.2.0
+ - Fix parsing array of objects
+
+4.8.1 / 2014-08-06
+==================
+
+ * fix incorrect deprecation warnings on `res.download`
+ * deps: qs@1.1.0
+ - Accept urlencoded square brackets
+ - Accept empty values in implicit array notation
+
+4.8.0 / 2014-08-05
+==================
+
+ * add `res.sendFile`
+ - accepts a file system path instead of a URL
+ - requires an absolute path or `root` option specified
+ * deprecate `res.sendfile` -- use `res.sendFile` instead
+ * support mounted app as any argument to `app.use()`
+ * deps: qs@1.0.2
+ - Complete rewrite
+ - Limits array length to 20
+ - Limits object depth to 5
+ - Limits parameters to 1,000
+ * deps: send@0.8.1
+ - Add `extensions` option
+ * deps: serve-static@~1.5.0
+ - Add `extensions` option
+ - deps: send@0.8.1
+
+4.7.4 / 2014-08-04
+==================
+
+ * fix `res.sendfile` regression for serving directory index files
+ * deps: send@0.7.4
+ - Fix incorrect 403 on Windows and Node.js 0.11
+ - Fix serving index files without root dir
+ * deps: serve-static@~1.4.4
+ - deps: send@0.7.4
+
+4.7.3 / 2014-08-04
+==================
+
+ * deps: send@0.7.3
+ - Fix incorrect 403 on Windows and Node.js 0.11
+ * deps: serve-static@~1.4.3
+ - Fix incorrect 403 on Windows and Node.js 0.11
+ - deps: send@0.7.3
+
+4.7.2 / 2014-07-27
+==================
+
+ * deps: depd@0.4.4
+ - Work-around v8 generating empty stack traces
+ * deps: send@0.7.2
+ - deps: depd@0.4.4
+ * deps: serve-static@~1.4.2
+
+4.7.1 / 2014-07-26
+==================
+
+ * deps: depd@0.4.3
+ - Fix exception when global `Error.stackTraceLimit` is too low
+ * deps: send@0.7.1
+ - deps: depd@0.4.3
+ * deps: serve-static@~1.4.1
+
+4.7.0 / 2014-07-25
+==================
+
+ * fix `req.protocol` for proxy-direct connections
+ * configurable query parser with `app.set('query parser', parser)`
+ - `app.set('query parser', 'extended')` parse with "qs" module
+ - `app.set('query parser', 'simple')` parse with "querystring" core module
+ - `app.set('query parser', false)` disable query string parsing
+ - `app.set('query parser', true)` enable simple parsing
+ * deprecate `res.json(status, obj)` -- use `res.status(status).json(obj)` instead
+ * deprecate `res.jsonp(status, obj)` -- use `res.status(status).jsonp(obj)` instead
+ * deprecate `res.send(status, body)` -- use `res.status(status).send(body)` instead
+ * deps: debug@1.0.4
+ * deps: depd@0.4.2
+ - Add `TRACE_DEPRECATION` environment variable
+ - Remove non-standard grey color from color output
+ - Support `--no-deprecation` argument
+ - Support `--trace-deprecation` argument
+ * deps: finalhandler@0.1.0
+ - Respond after request fully read
+ - deps: debug@1.0.4
+ * deps: parseurl@~1.2.0
+ - Cache URLs based on original value
+ - Remove no-longer-needed URL mis-parse work-around
+ - Simplify the "fast-path" `RegExp`
+ * deps: send@0.7.0
+ - Add `dotfiles` option
+ - Cap `maxAge` value to 1 year
+ - deps: debug@1.0.4
+ - deps: depd@0.4.2
+ * deps: serve-static@~1.4.0
+ - deps: parseurl@~1.2.0
+ - deps: send@0.7.0
+ * perf: prevent multiple `Buffer` creation in `res.send`
+
+4.6.1 / 2014-07-12
+==================
+
+ * fix `subapp.mountpath` regression for `app.use(subapp)`
+
+4.6.0 / 2014-07-11
+==================
+
+ * accept multiple callbacks to `app.use()`
+ * add explicit "Rosetta Flash JSONP abuse" protection
+ - previous versions are not vulnerable; this is just explicit protection
+ * catch errors in multiple `req.param(name, fn)` handlers
+ * deprecate `res.redirect(url, status)` -- use `res.redirect(status, url)` instead
+ * fix `res.send(status, num)` to send `num` as json (not error)
+ * remove unnecessary escaping when `res.jsonp` returns JSON response
+ * support non-string `path` in `app.use(path, fn)`
+ - supports array of paths
+ - supports `RegExp`
+ * router: fix optimization on router exit
+ * router: refactor location of `try` blocks
+ * router: speed up standard `app.use(fn)`
+ * deps: debug@1.0.3
+ - Add support for multiple wildcards in namespaces
+ * deps: finalhandler@0.0.3
+ - deps: debug@1.0.3
+ * deps: methods@1.1.0
+ - add `CONNECT`
+ * deps: parseurl@~1.1.3
+ - faster parsing of href-only URLs
+ * deps: path-to-regexp@0.1.3
+ * deps: send@0.6.0
+ - deps: debug@1.0.3
+ * deps: serve-static@~1.3.2
+ - deps: parseurl@~1.1.3
+ - deps: send@0.6.0
+ * perf: fix arguments reassign deopt in some `res` methods
+
+4.5.1 / 2014-07-06
+==================
+
+ * fix routing regression when altering `req.method`
+
+4.5.0 / 2014-07-04
+==================
+
+ * add deprecation message to non-plural `req.accepts*`
+ * add deprecation message to `res.send(body, status)`
+ * add deprecation message to `res.vary()`
+ * add `headers` option to `res.sendfile`
+ - use to set headers on successful file transfer
+ * add `mergeParams` option to `Router`
+ - merges `req.params` from parent routes
+ * add `req.hostname` -- correct name for what `req.host` returns
+ * deprecate things with `depd` module
+ * deprecate `req.host` -- use `req.hostname` instead
+ * fix behavior when handling request without routes
+ * fix handling when `route.all` is only route
+ * invoke `router.param()` only when route matches
+ * restore `req.params` after invoking router
+ * use `finalhandler` for final response handling
+ * use `media-typer` to alter content-type charset
+ * deps: accepts@~1.0.7
+ * deps: send@0.5.0
+ - Accept string for `maxage` (converted by `ms`)
+ - Include link in default redirect response
+ * deps: serve-static@~1.3.0
+ - Accept string for `maxAge` (converted by `ms`)
+ - Add `setHeaders` option
+ - Include HTML link in redirect response
+ - deps: send@0.5.0
+ * deps: type-is@~1.3.2
+
+4.4.5 / 2014-06-26
+==================
+
+ * deps: cookie-signature@1.0.4
+ - fix for timing attacks
+
+4.4.4 / 2014-06-20
+==================
+
+ * fix `res.attachment` Unicode filenames in Safari
+ * fix "trim prefix" debug message in `express:router`
+ * deps: accepts@~1.0.5
+ * deps: buffer-crc32@0.2.3
+
+4.4.3 / 2014-06-11
+==================
+
+ * fix persistence of modified `req.params[name]` from `app.param()`
+ * deps: accepts@1.0.3
+ - deps: negotiator@0.4.6
+ * deps: debug@1.0.2
+ * deps: send@0.4.3
+ - Do not throw un-catchable error on file open race condition
+ - Use `escape-html` for HTML escaping
+ - deps: debug@1.0.2
+ - deps: finished@1.2.2
+ - deps: fresh@0.2.2
+ * deps: serve-static@1.2.3
+ - Do not throw un-catchable error on file open race condition
+ - deps: send@0.4.3
+
+4.4.2 / 2014-06-09
+==================
+
+ * fix catching errors from top-level handlers
+ * use `vary` module for `res.vary`
+ * deps: debug@1.0.1
+ * deps: proxy-addr@1.0.1
+ * deps: send@0.4.2
+ - fix "event emitter leak" warnings
+ - deps: debug@1.0.1
+ - deps: finished@1.2.1
+ * deps: serve-static@1.2.2
+ - fix "event emitter leak" warnings
+ - deps: send@0.4.2
+ * deps: type-is@1.2.1
+
+4.4.1 / 2014-06-02
+==================
+
+ * deps: methods@1.0.1
+ * deps: send@0.4.1
+ - Send `max-age` in `Cache-Control` in correct format
+ * deps: serve-static@1.2.1
+ - use `escape-html` for escaping
+ - deps: send@0.4.1
+
+4.4.0 / 2014-05-30
+==================
+
+ * custom etag control with `app.set('etag', val)`
+ - `app.set('etag', function(body, encoding){ return '"etag"' })` custom etag generation
+ - `app.set('etag', 'weak')` weak tag
+ - `app.set('etag', 'strong')` strong etag
+ - `app.set('etag', false)` turn off
+ - `app.set('etag', true)` standard etag
+ * mark `res.send` ETag as weak and reduce collisions
+ * update accepts to 1.0.2
+ - Fix interpretation when header not in request
+ * update send to 0.4.0
+ - Calculate ETag with md5 for reduced collisions
+ - Ignore stream errors after request ends
+ - deps: debug@0.8.1
+ * update serve-static to 1.2.0
+ - Calculate ETag with md5 for reduced collisions
+ - Ignore stream errors after request ends
+ - deps: send@0.4.0
+
+4.3.2 / 2014-05-28
+==================
+
+ * fix handling of errors from `router.param()` callbacks
+
+4.3.1 / 2014-05-23
+==================
+
+ * revert "fix behavior of multiple `app.VERB` for the same path"
+ - this caused a regression in the order of route execution
+
+4.3.0 / 2014-05-21
+==================
+
+ * add `req.baseUrl` to access the path stripped from `req.url` in routes
+ * fix behavior of multiple `app.VERB` for the same path
+ * fix issue routing requests among sub routers
+ * invoke `router.param()` only when necessary instead of every match
+ * proper proxy trust with `app.set('trust proxy', trust)`
+ - `app.set('trust proxy', 1)` trust first hop
+ - `app.set('trust proxy', 'loopback')` trust loopback addresses
+ - `app.set('trust proxy', '10.0.0.1')` trust single IP
+ - `app.set('trust proxy', '10.0.0.1/16')` trust subnet
+ - `app.set('trust proxy', '10.0.0.1, 10.0.0.2')` trust list
+ - `app.set('trust proxy', false)` turn off
+ - `app.set('trust proxy', true)` trust everything
+ * set proper `charset` in `Content-Type` for `res.send`
+ * update type-is to 1.2.0
+ - support suffix matching
+
+4.2.0 / 2014-05-11
+==================
+
+ * deprecate `app.del()` -- use `app.delete()` instead
+ * deprecate `res.json(obj, status)` -- use `res.json(status, obj)` instead
+ - the edge-case `res.json(status, num)` requires `res.status(status).json(num)`
+ * deprecate `res.jsonp(obj, status)` -- use `res.jsonp(status, obj)` instead
+ - the edge-case `res.jsonp(status, num)` requires `res.status(status).jsonp(num)`
+ * fix `req.next` when inside router instance
+ * include `ETag` header in `HEAD` requests
+ * keep previous `Content-Type` for `res.jsonp`
+ * support PURGE method
+ - add `app.purge`
+ - add `router.purge`
+ - include PURGE in `app.all`
+ * update debug to 0.8.0
+ - add `enable()` method
+ - change from stderr to stdout
+ * update methods to 1.0.0
+ - add PURGE
+
+4.1.2 / 2014-05-08
+==================
+
+ * fix `req.host` for IPv6 literals
+ * fix `res.jsonp` error if callback param is object
+
+4.1.1 / 2014-04-27
+==================
+
+ * fix package.json to reflect supported node version
+
+4.1.0 / 2014-04-24
+==================
+
+ * pass options from `res.sendfile` to `send`
+ * preserve casing of headers in `res.header` and `res.set`
+ * support unicode file names in `res.attachment` and `res.download`
+ * update accepts to 1.0.1
+ - deps: negotiator@0.4.0
+ * update cookie to 0.1.2
+ - Fix for maxAge == 0
+ - made compat with expires field
+ * update send to 0.3.0
+ - Accept API options in options object
+ - Coerce option types
+ - Control whether to generate etags
+ - Default directory access to 403 when index disabled
+ - Fix sending files with dots without root set
+ - Include file path in etag
+ - Make "Can't set headers after they are sent." catchable
+ - Send full entity-body for multi range requests
+ - Set etags to "weak"
+ - Support "If-Range" header
+ - Support multiple index paths
+ - deps: mime@1.2.11
+ * update serve-static to 1.1.0
+ - Accept options directly to `send` module
+ - Resolve relative paths at middleware setup
+ - Use parseurl to parse the URL from request
+ - deps: send@0.3.0
+ * update type-is to 1.1.0
+ - add non-array values support
+ - add `multipart` as a shorthand
+
+4.0.0 / 2014-04-09
+==================
+
+ * remove:
+ - node 0.8 support
+ - connect and connect's patches except for charset handling
+ - express(1) - moved to [express-generator](https://github.com/expressjs/generator)
+ - `express.createServer()` - it has been deprecated for a long time. Use `express()`
+ - `app.configure` - use logic in your own app code
+ - `app.router` - is removed
+ - `req.auth` - use `basic-auth` instead
+ - `req.accepted*` - use `req.accepts*()` instead
+ - `res.location` - relative URL resolution is removed
+ - `res.charset` - include the charset in the content type when using `res.set()`
+ - all bundled middleware except `static`
+ * change:
+ - `app.route` -> `app.mountpath` when mounting an express app in another express app
+ - `json spaces` no longer enabled by default in development
+ - `req.accepts*` -> `req.accepts*s` - i.e. `req.acceptsEncoding` -> `req.acceptsEncodings`
+ - `req.params` is now an object instead of an array
+ - `res.locals` is no longer a function. It is a plain js object. Treat it as such.
+ - `res.headerSent` -> `res.headersSent` to match node.js ServerResponse object
+ * refactor:
+ - `req.accepts*` with [accepts](https://github.com/expressjs/accepts)
+ - `req.is` with [type-is](https://github.com/expressjs/type-is)
+ - [path-to-regexp](https://github.com/component/path-to-regexp)
+ * add:
+ - `app.router()` - returns the app Router instance
+ - `app.route()` - Proxy to the app's `Router#route()` method to create a new route
+ - Router & Route - public API
+
+3.21.2 / 2015-07-31
+===================
+
+ * deps: connect@2.30.2
+ - deps: body-parser@~1.13.3
+ - deps: compression@~1.5.2
+ - deps: errorhandler@~1.4.2
+ - deps: method-override@~2.3.5
+ - deps: serve-index@~1.7.2
+ - deps: type-is@~1.6.6
+ - deps: vhost@~3.0.1
+ * deps: vary@~1.0.1
+ - Fix setting empty header from empty `field`
+ - perf: enable strict mode
+ - perf: remove argument reassignments
+
+3.21.1 / 2015-07-05
+===================
+
+ * deps: basic-auth@~1.0.3
+ * deps: connect@2.30.1
+ - deps: body-parser@~1.13.2
+ - deps: compression@~1.5.1
+ - deps: errorhandler@~1.4.1
+ - deps: morgan@~1.6.1
+ - deps: pause@0.1.0
+ - deps: qs@4.0.0
+ - deps: serve-index@~1.7.1
+ - deps: type-is@~1.6.4
+
+3.21.0 / 2015-06-18
+===================
+
+ * deps: basic-auth@1.0.2
+ - perf: enable strict mode
+ - perf: hoist regular expression
+ - perf: parse with regular expressions
+ - perf: remove argument reassignment
+ * deps: connect@2.30.0
+ - deps: body-parser@~1.13.1
+ - deps: bytes@2.1.0
+ - deps: compression@~1.5.0
+ - deps: cookie@0.1.3
+ - deps: cookie-parser@~1.3.5
+ - deps: csurf@~1.8.3
+ - deps: errorhandler@~1.4.0
+ - deps: express-session@~1.11.3
+ - deps: finalhandler@0.4.0
+ - deps: fresh@0.3.0
+ - deps: morgan@~1.6.0
+ - deps: serve-favicon@~2.3.0
+ - deps: serve-index@~1.7.0
+ - deps: serve-static@~1.10.0
+ - deps: type-is@~1.6.3
+ * deps: cookie@0.1.3
+ - perf: deduce the scope of try-catch deopt
+ - perf: remove argument reassignments
+ * deps: escape-html@1.0.2
+ * deps: etag@~1.7.0
+ - Always include entity length in ETags for hash length extensions
+ - Generate non-Stats ETags using MD5 only (no longer CRC32)
+ - Improve stat performance by removing hashing
+ - Improve support for JXcore
+ - Remove base64 padding in ETags to shorten
+ - Support "fake" stats objects in environments without fs
+ - Use MD5 instead of MD4 in weak ETags over 1KB
+ * deps: fresh@0.3.0
+ - Add weak `ETag` matching support
+ * deps: mkdirp@0.5.1
+ - Work in global strict mode
+ * deps: send@0.13.0
+ - Allow Node.js HTTP server to set `Date` response header
+ - Fix incorrectly removing `Content-Location` on 304 response
+ - Improve the default redirect response headers
+ - Send appropriate headers on default error response
+ - Use `http-errors` for standard emitted errors
+ - Use `statuses` instead of `http` module for status messages
+ - deps: escape-html@1.0.2
+ - deps: etag@~1.7.0
+ - deps: fresh@0.3.0
+ - deps: on-finished@~2.3.0
+ - perf: enable strict mode
+ - perf: remove unnecessary array allocations
+
+3.20.3 / 2015-05-17
+===================
+
+ * deps: connect@2.29.2
+ - deps: body-parser@~1.12.4
+ - deps: compression@~1.4.4
+ - deps: connect-timeout@~1.6.2
+ - deps: debug@~2.2.0
+ - deps: depd@~1.0.1
+ - deps: errorhandler@~1.3.6
+ - deps: finalhandler@0.3.6
+ - deps: method-override@~2.3.3
+ - deps: morgan@~1.5.3
+ - deps: qs@2.4.2
+ - deps: response-time@~2.3.1
+ - deps: serve-favicon@~2.2.1
+ - deps: serve-index@~1.6.4
+ - deps: serve-static@~1.9.3
+ - deps: type-is@~1.6.2
+ * deps: debug@~2.2.0
+ - deps: ms@0.7.1
+ * deps: depd@~1.0.1
+ * deps: proxy-addr@~1.0.8
+ - deps: ipaddr.js@1.0.1
+ * deps: send@0.12.3
+ - deps: debug@~2.2.0
+ - deps: depd@~1.0.1
+ - deps: etag@~1.6.0
+ - deps: ms@0.7.1
+ - deps: on-finished@~2.2.1
+
+3.20.2 / 2015-03-16
+===================
+
+ * deps: connect@2.29.1
+ - deps: body-parser@~1.12.2
+ - deps: compression@~1.4.3
+ - deps: connect-timeout@~1.6.1
+ - deps: debug@~2.1.3
+ - deps: errorhandler@~1.3.5
+ - deps: express-session@~1.10.4
+ - deps: finalhandler@0.3.4
+ - deps: method-override@~2.3.2
+ - deps: morgan@~1.5.2
+ - deps: qs@2.4.1
+ - deps: serve-index@~1.6.3
+ - deps: serve-static@~1.9.2
+ - deps: type-is@~1.6.1
+ * deps: debug@~2.1.3
+ - Fix high intensity foreground color for bold
+ - deps: ms@0.7.0
+ * deps: merge-descriptors@1.0.0
+ * deps: proxy-addr@~1.0.7
+ - deps: ipaddr.js@0.1.9
+ * deps: send@0.12.2
+ - Throw errors early for invalid `extensions` or `index` options
+ - deps: debug@~2.1.3
+
+3.20.1 / 2015-02-28
+===================
+
+ * Fix `req.host` when using "trust proxy" hops count
+ * Fix `req.protocol`/`req.secure` when using "trust proxy" hops count
+
+3.20.0 / 2015-02-18
+===================
+
+ * Fix `"trust proxy"` setting to inherit when app is mounted
+ * Generate `ETag`s for all request responses
+ - No longer restricted to only responses for `GET` and `HEAD` requests
+ * Use `content-type` to parse `Content-Type` headers
+ * deps: connect@2.29.0
+ - Use `content-type` to parse `Content-Type` headers
+ - deps: body-parser@~1.12.0
+ - deps: compression@~1.4.1
+ - deps: connect-timeout@~1.6.0
+ - deps: cookie-parser@~1.3.4
+ - deps: cookie-signature@1.0.6
+ - deps: csurf@~1.7.0
+ - deps: errorhandler@~1.3.4
+ - deps: express-session@~1.10.3
+ - deps: http-errors@~1.3.1
+ - deps: response-time@~2.3.0
+ - deps: serve-index@~1.6.2
+ - deps: serve-static@~1.9.1
+ - deps: type-is@~1.6.0
+ * deps: cookie-signature@1.0.6
+ * deps: send@0.12.1
+ - Always read the stat size from the file
+ - Fix mutating passed-in `options`
+ - deps: mime@1.3.4
+
+3.19.2 / 2015-02-01
+===================
+
+ * deps: connect@2.28.3
+ - deps: compression@~1.3.1
+ - deps: csurf@~1.6.6
+ - deps: errorhandler@~1.3.3
+ - deps: express-session@~1.10.2
+ - deps: serve-index@~1.6.1
+ - deps: type-is@~1.5.6
+ * deps: proxy-addr@~1.0.6
+ - deps: ipaddr.js@0.1.8
+
+3.19.1 / 2015-01-20
+===================
+
+ * deps: connect@2.28.2
+ - deps: body-parser@~1.10.2
+ - deps: serve-static@~1.8.1
+ * deps: send@0.11.1
+ - Fix root path disclosure
+
+3.19.0 / 2015-01-09
+===================
+
+ * Fix `OPTIONS` responses to include the `HEAD` method property
+ * Use `readline` for prompt in `express(1)`
+ * deps: commander@2.6.0
+ * deps: connect@2.28.1
+ - deps: body-parser@~1.10.1
+ - deps: compression@~1.3.0
+ - deps: connect-timeout@~1.5.0
+ - deps: csurf@~1.6.4
+ - deps: debug@~2.1.1
+ - deps: errorhandler@~1.3.2
+ - deps: express-session@~1.10.1
+ - deps: finalhandler@0.3.3
+ - deps: method-override@~2.3.1
+ - deps: morgan@~1.5.1
+ - deps: serve-favicon@~2.2.0
+ - deps: serve-index@~1.6.0
+ - deps: serve-static@~1.8.0
+ - deps: type-is@~1.5.5
+ * deps: debug@~2.1.1
+ * deps: methods@~1.1.1
+ * deps: proxy-addr@~1.0.5
+ - deps: ipaddr.js@0.1.6
+ * deps: send@0.11.0
+ - deps: debug@~2.1.1
+ - deps: etag@~1.5.1
+ - deps: ms@0.7.0
+ - deps: on-finished@~2.2.0
+
+3.18.6 / 2014-12-12
+===================
+
+ * Fix exception in `req.fresh`/`req.stale` without response headers
+
+3.18.5 / 2014-12-11
+===================
+
+ * deps: connect@2.27.6
+ - deps: compression@~1.2.2
+ - deps: express-session@~1.9.3
+ - deps: http-errors@~1.2.8
+ - deps: serve-index@~1.5.3
+ - deps: type-is@~1.5.4
+
+3.18.4 / 2014-11-23
+===================
+
+ * deps: connect@2.27.4
+ - deps: body-parser@~1.9.3
+ - deps: compression@~1.2.1
+ - deps: errorhandler@~1.2.3
+ - deps: express-session@~1.9.2
+ - deps: qs@2.3.3
+ - deps: serve-favicon@~2.1.7
+ - deps: serve-static@~1.5.1
+ - deps: type-is@~1.5.3
+ * deps: etag@~1.5.1
+ * deps: proxy-addr@~1.0.4
+ - deps: ipaddr.js@0.1.5
+
+3.18.3 / 2014-11-09
+===================
+
+ * deps: connect@2.27.3
+ - Correctly invoke async callback asynchronously
+ - deps: csurf@~1.6.3
+
+3.18.2 / 2014-10-28
+===================
+
+ * deps: connect@2.27.2
+ - Fix handling of URLs containing `://` in the path
+ - deps: body-parser@~1.9.2
+ - deps: qs@2.3.2
+
+3.18.1 / 2014-10-22
+===================
+
+ * Fix internal `utils.merge` deprecation warnings
+ * deps: connect@2.27.1
+ - deps: body-parser@~1.9.1
+ - deps: express-session@~1.9.1
+ - deps: finalhandler@0.3.2
+ - deps: morgan@~1.4.1
+ - deps: qs@2.3.0
+ - deps: serve-static@~1.7.1
+ * deps: send@0.10.1
+ - deps: on-finished@~2.1.1
+
+3.18.0 / 2014-10-17
+===================
+
+ * Use `content-disposition` module for `res.attachment`/`res.download`
+ - Sends standards-compliant `Content-Disposition` header
+ - Full Unicode support
+ * Use `etag` module to generate `ETag` headers
+ * deps: connect@2.27.0
+ - Use `http-errors` module for creating errors
+ - Use `utils-merge` module for merging objects
+ - deps: body-parser@~1.9.0
+ - deps: compression@~1.2.0
+ - deps: connect-timeout@~1.4.0
+ - deps: debug@~2.1.0
+ - deps: depd@~1.0.0
+ - deps: express-session@~1.9.0
+ - deps: finalhandler@0.3.1
+ - deps: method-override@~2.3.0
+ - deps: morgan@~1.4.0
+ - deps: response-time@~2.2.0
+ - deps: serve-favicon@~2.1.6
+ - deps: serve-index@~1.5.0
+ - deps: serve-static@~1.7.0
+ * deps: debug@~2.1.0
+ - Implement `DEBUG_FD` env variable support
+ * deps: depd@~1.0.0
+ * deps: send@0.10.0
+ - deps: debug@~2.1.0
+ - deps: depd@~1.0.0
+ - deps: etag@~1.5.0
+
+3.17.8 / 2014-10-15
+===================
+
+ * deps: connect@2.26.6
+ - deps: compression@~1.1.2
+ - deps: csurf@~1.6.2
+ - deps: errorhandler@~1.2.2
+
+3.17.7 / 2014-10-08
+===================
+
+ * deps: connect@2.26.5
+ - Fix accepting non-object arguments to `logger`
+ - deps: serve-static@~1.6.4
+
+3.17.6 / 2014-10-02
+===================
+
+ * deps: connect@2.26.4
+ - deps: morgan@~1.3.2
+ - deps: type-is@~1.5.2
+
+3.17.5 / 2014-09-24
+===================
+
+ * deps: connect@2.26.3
+ - deps: body-parser@~1.8.4
+ - deps: serve-favicon@~2.1.5
+ - deps: serve-static@~1.6.3
+ * deps: proxy-addr@~1.0.3
+ - Use `forwarded` npm module
+ * deps: send@0.9.3
+ - deps: etag@~1.4.0
+
+3.17.4 / 2014-09-19
+===================
+
+ * deps: connect@2.26.2
+ - deps: body-parser@~1.8.3
+ - deps: qs@2.2.4
+
+3.17.3 / 2014-09-18
+===================
+
+ * deps: proxy-addr@~1.0.2
+ - Fix a global leak when multiple subnets are trusted
+ - deps: ipaddr.js@0.1.3
+
+3.17.2 / 2014-09-15
+===================
+
+ * Use `crc` instead of `buffer-crc32` for speed
+ * deps: connect@2.26.1
+ - deps: body-parser@~1.8.2
+ - deps: depd@0.4.5
+ - deps: express-session@~1.8.2
+ - deps: morgan@~1.3.1
+ - deps: serve-favicon@~2.1.3
+ - deps: serve-static@~1.6.2
+ * deps: depd@0.4.5
+ * deps: send@0.9.2
+ - deps: depd@0.4.5
+ - deps: etag@~1.3.1
+ - deps: range-parser@~1.0.2
+
+3.17.1 / 2014-09-08
+===================
+
+ * Fix error in `req.subdomains` on empty host
+
+3.17.0 / 2014-09-08
+===================
+
+ * Support `X-Forwarded-Host` in `req.subdomains`
+ * Support IP address host in `req.subdomains`
+ * deps: connect@2.26.0
+ - deps: body-parser@~1.8.1
+ - deps: compression@~1.1.0
+ - deps: connect-timeout@~1.3.0
+ - deps: cookie-parser@~1.3.3
+ - deps: cookie-signature@1.0.5
+ - deps: csurf@~1.6.1
+ - deps: debug@~2.0.0
+ - deps: errorhandler@~1.2.0
+ - deps: express-session@~1.8.1
+ - deps: finalhandler@0.2.0
+ - deps: fresh@0.2.4
+ - deps: media-typer@0.3.0
+ - deps: method-override@~2.2.0
+ - deps: morgan@~1.3.0
+ - deps: qs@2.2.3
+ - deps: serve-favicon@~2.1.3
+ - deps: serve-index@~1.2.1
+ - deps: serve-static@~1.6.1
+ - deps: type-is@~1.5.1
+ - deps: vhost@~3.0.0
+ * deps: cookie-signature@1.0.5
+ * deps: debug@~2.0.0
+ * deps: fresh@0.2.4
+ * deps: media-typer@0.3.0
+ - Throw error when parameter format invalid on parse
+ * deps: range-parser@~1.0.2
+ * deps: send@0.9.1
+ - Add `lastModified` option
+ - Use `etag` to generate `ETag` header
+ - deps: debug@~2.0.0
+ - deps: fresh@0.2.4
+ * deps: vary@~1.0.0
+ - Accept valid `Vary` header string as `field`
+
+3.16.10 / 2014-09-04
+====================
+
+ * deps: connect@2.25.10
+ - deps: serve-static@~1.5.4
+ * deps: send@0.8.5
+ - Fix a path traversal issue when using `root`
+ - Fix malicious path detection for empty string path
+
+3.16.9 / 2014-08-29
+===================
+
+ * deps: connect@2.25.9
+ - deps: body-parser@~1.6.7
+ - deps: qs@2.2.2
+
+3.16.8 / 2014-08-27
+===================
+
+ * deps: connect@2.25.8
+ - deps: body-parser@~1.6.6
+ - deps: csurf@~1.4.1
+ - deps: qs@2.2.0
+
+3.16.7 / 2014-08-18
+===================
+
+ * deps: connect@2.25.7
+ - deps: body-parser@~1.6.5
+ - deps: express-session@~1.7.6
+ - deps: morgan@~1.2.3
+ - deps: serve-static@~1.5.3
+ * deps: send@0.8.3
+ - deps: destroy@1.0.3
+ - deps: on-finished@2.1.0
+
+3.16.6 / 2014-08-14
+===================
+
+ * deps: connect@2.25.6
+ - deps: body-parser@~1.6.4
+ - deps: qs@1.2.2
+ - deps: serve-static@~1.5.2
+ * deps: send@0.8.2
+ - Work around `fd` leak in Node.js 0.10 for `fs.ReadStream`
+
+3.16.5 / 2014-08-11
+===================
+
+ * deps: connect@2.25.5
+ - Fix backwards compatibility in `logger`
+
+3.16.4 / 2014-08-10
+===================
+
+ * Fix original URL parsing in `res.location`
+ * deps: connect@2.25.4
+ - Fix `query` middleware breaking with argument
+ - deps: body-parser@~1.6.3
+ - deps: compression@~1.0.11
+ - deps: connect-timeout@~1.2.2
+ - deps: express-session@~1.7.5
+ - deps: method-override@~2.1.3
+ - deps: on-headers@~1.0.0
+ - deps: parseurl@~1.3.0
+ - deps: qs@1.2.1
+ - deps: response-time@~2.0.1
+ - deps: serve-index@~1.1.6
+ - deps: serve-static@~1.5.1
+ * deps: parseurl@~1.3.0
+
+3.16.3 / 2014-08-07
+===================
+
+ * deps: connect@2.25.3
+ - deps: multiparty@3.3.2
+
+3.16.2 / 2014-08-07
+===================
+
+ * deps: connect@2.25.2
+ - deps: body-parser@~1.6.2
+ - deps: qs@1.2.0
+
+3.16.1 / 2014-08-06
+===================
+
+ * deps: connect@2.25.1
+ - deps: body-parser@~1.6.1
+ - deps: qs@1.1.0
+
+3.16.0 / 2014-08-05
+===================
+
+ * deps: connect@2.25.0
+ - deps: body-parser@~1.6.0
+ - deps: compression@~1.0.10
+ - deps: csurf@~1.4.0
+ - deps: express-session@~1.7.4
+ - deps: qs@1.0.2
+ - deps: serve-static@~1.5.0
+ * deps: send@0.8.1
+ - Add `extensions` option
+
+3.15.3 / 2014-08-04
+===================
+
+ * fix `res.sendfile` regression for serving directory index files
+ * deps: connect@2.24.3
+ - deps: serve-index@~1.1.5
+ - deps: serve-static@~1.4.4
+ * deps: send@0.7.4
+ - Fix incorrect 403 on Windows and Node.js 0.11
+ - Fix serving index files without root dir
+
+3.15.2 / 2014-07-27
+===================
+
+ * deps: connect@2.24.2
+ - deps: body-parser@~1.5.2
+ - deps: depd@0.4.4
+ - deps: express-session@~1.7.2
+ - deps: morgan@~1.2.2
+ - deps: serve-static@~1.4.2
+ * deps: depd@0.4.4
+ - Work-around v8 generating empty stack traces
+ * deps: send@0.7.2
+ - deps: depd@0.4.4
+
+3.15.1 / 2014-07-26
+===================
+
+ * deps: connect@2.24.1
+ - deps: body-parser@~1.5.1
+ - deps: depd@0.4.3
+ - deps: express-session@~1.7.1
+ - deps: morgan@~1.2.1
+ - deps: serve-index@~1.1.4
+ - deps: serve-static@~1.4.1
+ * deps: depd@0.4.3
+ - Fix exception when global `Error.stackTraceLimit` is too low
+ * deps: send@0.7.1
+ - deps: depd@0.4.3
+
+3.15.0 / 2014-07-22
+===================
+
+ * Fix `req.protocol` for proxy-direct connections
+ * Pass options from `res.sendfile` to `send`
+ * deps: connect@2.24.0
+ - deps: body-parser@~1.5.0
+ - deps: compression@~1.0.9
+ - deps: connect-timeout@~1.2.1
+ - deps: debug@1.0.4
+ - deps: depd@0.4.2
+ - deps: express-session@~1.7.0
+ - deps: finalhandler@0.1.0
+ - deps: method-override@~2.1.2
+ - deps: morgan@~1.2.0
+ - deps: multiparty@3.3.1
+ - deps: parseurl@~1.2.0
+ - deps: serve-static@~1.4.0
+ * deps: debug@1.0.4
+ * deps: depd@0.4.2
+ - Add `TRACE_DEPRECATION` environment variable
+ - Remove non-standard grey color from color output
+ - Support `--no-deprecation` argument
+ - Support `--trace-deprecation` argument
+ * deps: parseurl@~1.2.0
+ - Cache URLs based on original value
+ - Remove no-longer-needed URL mis-parse work-around
+ - Simplify the "fast-path" `RegExp`
+ * deps: send@0.7.0
+ - Add `dotfiles` option
+ - Cap `maxAge` value to 1 year
+ - deps: debug@1.0.4
+ - deps: depd@0.4.2
+
+3.14.0 / 2014-07-11
+===================
+
+ * add explicit "Rosetta Flash JSONP abuse" protection
+ - previous versions are not vulnerable; this is just explicit protection
+ * deprecate `res.redirect(url, status)` -- use `res.redirect(status, url)` instead
+ * fix `res.send(status, num)` to send `num` as json (not error)
+ * remove unnecessary escaping when `res.jsonp` returns JSON response
+ * deps: basic-auth@1.0.0
+ - support empty password
+ - support empty username
+ * deps: connect@2.23.0
+ - deps: debug@1.0.3
+ - deps: express-session@~1.6.4
+ - deps: method-override@~2.1.0
+ - deps: parseurl@~1.1.3
+ - deps: serve-static@~1.3.1
+ * deps: debug@1.0.3
+ - Add support for multiple wildcards in namespaces
+ * deps: methods@1.1.0
+ - add `CONNECT`
+ * deps: parseurl@~1.1.3
+ - faster parsing of href-only URLs
+
+3.13.0 / 2014-07-03
+===================
+
+ * add deprecation message to `app.configure`
+ * add deprecation message to `req.auth`
+ * use `basic-auth` to parse `Authorization` header
+ * deps: connect@2.22.0
+ - deps: csurf@~1.3.0
+ - deps: express-session@~1.6.1
+ - deps: multiparty@3.3.0
+ - deps: serve-static@~1.3.0
+ * deps: send@0.5.0
+ - Accept string for `maxage` (converted by `ms`)
+ - Include link in default redirect response
+
+3.12.1 / 2014-06-26
+===================
+
+ * deps: connect@2.21.1
+ - deps: cookie-parser@1.3.2
+ - deps: cookie-signature@1.0.4
+ - deps: express-session@~1.5.2
+ - deps: type-is@~1.3.2
+ * deps: cookie-signature@1.0.4
+ - fix for timing attacks
+
+3.12.0 / 2014-06-21
+===================
+
+ * use `media-typer` to alter content-type charset
+ * deps: connect@2.21.0
+ - deprecate `connect(middleware)` -- use `app.use(middleware)` instead
+ - deprecate `connect.createServer()` -- use `connect()` instead
+ - fix `res.setHeader()` patch to work with with get -> append -> set pattern
+ - deps: compression@~1.0.8
+ - deps: errorhandler@~1.1.1
+ - deps: express-session@~1.5.0
+ - deps: serve-index@~1.1.3
+
+3.11.0 / 2014-06-19
+===================
+
+ * deprecate things with `depd` module
+ * deps: buffer-crc32@0.2.3
+ * deps: connect@2.20.2
+ - deprecate `verify` option to `json` -- use `body-parser` npm module instead
+ - deprecate `verify` option to `urlencoded` -- use `body-parser` npm module instead
+ - deprecate things with `depd` module
+ - use `finalhandler` for final response handling
+ - use `media-typer` to parse `content-type` for charset
+ - deps: body-parser@1.4.3
+ - deps: connect-timeout@1.1.1
+ - deps: cookie-parser@1.3.1
+ - deps: csurf@1.2.2
+ - deps: errorhandler@1.1.0
+ - deps: express-session@1.4.0
+ - deps: multiparty@3.2.9
+ - deps: serve-index@1.1.2
+ - deps: type-is@1.3.1
+ - deps: vhost@2.0.0
+
+3.10.5 / 2014-06-11
+===================
+
+ * deps: connect@2.19.6
+ - deps: body-parser@1.3.1
+ - deps: compression@1.0.7
+ - deps: debug@1.0.2
+ - deps: serve-index@1.1.1
+ - deps: serve-static@1.2.3
+ * deps: debug@1.0.2
+ * deps: send@0.4.3
+ - Do not throw un-catchable error on file open race condition
+ - Use `escape-html` for HTML escaping
+ - deps: debug@1.0.2
+ - deps: finished@1.2.2
+ - deps: fresh@0.2.2
+
+3.10.4 / 2014-06-09
+===================
+
+ * deps: connect@2.19.5
+ - fix "event emitter leak" warnings
+ - deps: csurf@1.2.1
+ - deps: debug@1.0.1
+ - deps: serve-static@1.2.2
+ - deps: type-is@1.2.1
+ * deps: debug@1.0.1
+ * deps: send@0.4.2
+ - fix "event emitter leak" warnings
+ - deps: finished@1.2.1
+ - deps: debug@1.0.1
+
+3.10.3 / 2014-06-05
+===================
+
+ * use `vary` module for `res.vary`
+ * deps: connect@2.19.4
+ - deps: errorhandler@1.0.2
+ - deps: method-override@2.0.2
+ - deps: serve-favicon@2.0.1
+ * deps: debug@1.0.0
+
+3.10.2 / 2014-06-03
+===================
+
+ * deps: connect@2.19.3
+ - deps: compression@1.0.6
+
+3.10.1 / 2014-06-03
+===================
+
+ * deps: connect@2.19.2
+ - deps: compression@1.0.4
+ * deps: proxy-addr@1.0.1
+
+3.10.0 / 2014-06-02
+===================
+
+ * deps: connect@2.19.1
+ - deprecate `methodOverride()` -- use `method-override` npm module instead
+ - deps: body-parser@1.3.0
+ - deps: method-override@2.0.1
+ - deps: multiparty@3.2.8
+ - deps: response-time@2.0.0
+ - deps: serve-static@1.2.1
+ * deps: methods@1.0.1
+ * deps: send@0.4.1
+ - Send `max-age` in `Cache-Control` in correct format
+
+3.9.0 / 2014-05-30
+==================
+
+ * custom etag control with `app.set('etag', val)`
+ - `app.set('etag', function(body, encoding){ return '"etag"' })` custom etag generation
+ - `app.set('etag', 'weak')` weak tag
+ - `app.set('etag', 'strong')` strong etag
+ - `app.set('etag', false)` turn off
+ - `app.set('etag', true)` standard etag
+ * Include ETag in HEAD requests
+ * mark `res.send` ETag as weak and reduce collisions
+ * update connect to 2.18.0
+ - deps: compression@1.0.3
+ - deps: serve-index@1.1.0
+ - deps: serve-static@1.2.0
+ * update send to 0.4.0
+ - Calculate ETag with md5 for reduced collisions
+ - Ignore stream errors after request ends
+ - deps: debug@0.8.1
+
+3.8.1 / 2014-05-27
+==================
+
+ * update connect to 2.17.3
+ - deps: body-parser@1.2.2
+ - deps: express-session@1.2.1
+ - deps: method-override@1.0.2
+
+3.8.0 / 2014-05-21
+==================
+
+ * keep previous `Content-Type` for `res.jsonp`
+ * set proper `charset` in `Content-Type` for `res.send`
+ * update connect to 2.17.1
+ - fix `res.charset` appending charset when `content-type` has one
+ - deps: express-session@1.2.0
+ - deps: morgan@1.1.1
+ - deps: serve-index@1.0.3
+
+3.7.0 / 2014-05-18
+==================
+
+ * proper proxy trust with `app.set('trust proxy', trust)`
+ - `app.set('trust proxy', 1)` trust first hop
+ - `app.set('trust proxy', 'loopback')` trust loopback addresses
+ - `app.set('trust proxy', '10.0.0.1')` trust single IP
+ - `app.set('trust proxy', '10.0.0.1/16')` trust subnet
+ - `app.set('trust proxy', '10.0.0.1, 10.0.0.2')` trust list
+ - `app.set('trust proxy', false)` turn off
+ - `app.set('trust proxy', true)` trust everything
+ * update connect to 2.16.2
+ - deprecate `res.headerSent` -- use `res.headersSent`
+ - deprecate `res.on("header")` -- use on-headers module instead
+ - fix edge-case in `res.appendHeader` that would append in wrong order
+ - json: use body-parser
+ - urlencoded: use body-parser
+ - dep: bytes@1.0.0
+ - dep: cookie-parser@1.1.0
+ - dep: csurf@1.2.0
+ - dep: express-session@1.1.0
+ - dep: method-override@1.0.1
+
+3.6.0 / 2014-05-09
+==================
+
+ * deprecate `app.del()` -- use `app.delete()` instead
+ * deprecate `res.json(obj, status)` -- use `res.json(status, obj)` instead
+ - the edge-case `res.json(status, num)` requires `res.status(status).json(num)`
+ * deprecate `res.jsonp(obj, status)` -- use `res.jsonp(status, obj)` instead
+ - the edge-case `res.jsonp(status, num)` requires `res.status(status).jsonp(num)`
+ * support PURGE method
+ - add `app.purge`
+ - add `router.purge`
+ - include PURGE in `app.all`
+ * update connect to 2.15.0
+ * Add `res.appendHeader`
+ * Call error stack even when response has been sent
+ * Patch `res.headerSent` to return Boolean
+ * Patch `res.headersSent` for node.js 0.8
+ * Prevent default 404 handler after response sent
+ * dep: compression@1.0.2
+ * dep: connect-timeout@1.1.0
+ * dep: debug@^0.8.0
+ * dep: errorhandler@1.0.1
+ * dep: express-session@1.0.4
+ * dep: morgan@1.0.1
+ * dep: serve-favicon@2.0.0
+ * dep: serve-index@1.0.2
+ * update debug to 0.8.0
+ * add `enable()` method
+ * change from stderr to stdout
+ * update methods to 1.0.0
+ - add PURGE
+ * update mkdirp to 0.5.0
+
+3.5.3 / 2014-05-08
+==================
+
+ * fix `req.host` for IPv6 literals
+ * fix `res.jsonp` error if callback param is object
+
+3.5.2 / 2014-04-24
+==================
+
+ * update connect to 2.14.5
+ * update cookie to 0.1.2
+ * update mkdirp to 0.4.0
+ * update send to 0.3.0
+
+3.5.1 / 2014-03-25
+==================
+
+ * pin less-middleware in generated app
+
+3.5.0 / 2014-03-06
+==================
+
+ * bump deps
+
+3.4.8 / 2014-01-13
+==================
+
+ * prevent incorrect automatic OPTIONS responses #1868 @dpatti
+ * update binary and examples for jade 1.0 #1876 @yossi, #1877 @reqshark, #1892 @matheusazzi
+ * throw 400 in case of malformed paths @rlidwka
+
+3.4.7 / 2013-12-10
+==================
+
+ * update connect
+
+3.4.6 / 2013-12-01
+==================
+
+ * update connect (raw-body)
+
+3.4.5 / 2013-11-27
+==================
+
+ * update connect
+ * res.location: remove leading ./ #1802 @kapouer
+ * res.redirect: fix `res.redirect('toString') #1829 @michaelficarra
+ * res.send: always send ETag when content-length > 0
+ * router: add Router.all() method
+
+3.4.4 / 2013-10-29
+==================
+
+ * update connect
+ * update supertest
+ * update methods
+ * express(1): replace bodyParser() with urlencoded() and json() #1795 @chirag04
+
+3.4.3 / 2013-10-23
+==================
+
+ * update connect
+
+3.4.2 / 2013-10-18
+==================
+
+ * update connect
+ * downgrade commander
+
+3.4.1 / 2013-10-15
+==================
+
+ * update connect
+ * update commander
+ * jsonp: check if callback is a function
+ * router: wrap encodeURIComponent in a try/catch #1735 (@lxe)
+ * res.format: now includes charset @1747 (@sorribas)
+ * res.links: allow multiple calls @1746 (@sorribas)
+
+3.4.0 / 2013-09-07
+==================
+
+ * add res.vary(). Closes #1682
+ * update connect
+
+3.3.8 / 2013-09-02
+==================
+
+ * update connect
+
+3.3.7 / 2013-08-28
+==================
+
+ * update connect
+
+3.3.6 / 2013-08-27
+==================
+
+ * Revert "remove charset from json responses. Closes #1631" (causes issues in some clients)
+ * add: req.accepts take an argument list
+
+3.3.4 / 2013-07-08
+==================
+
+ * update send and connect
+
+3.3.3 / 2013-07-04
+==================
+
+ * update connect
+
+3.3.2 / 2013-07-03
+==================
+
+ * update connect
+ * update send
+ * remove .version export
+
+3.3.1 / 2013-06-27
+==================
+
+ * update connect
+
+3.3.0 / 2013-06-26
+==================
+
+ * update connect
+ * add support for multiple X-Forwarded-Proto values. Closes #1646
+ * change: remove charset from json responses. Closes #1631
+ * change: return actual booleans from req.accept* functions
+ * fix jsonp callback array throw
+
+3.2.6 / 2013-06-02
+==================
+
+ * update connect
+
+3.2.5 / 2013-05-21
+==================
+
+ * update connect
+ * update node-cookie
+ * add: throw a meaningful error when there is no default engine
+ * change generation of ETags with res.send() to GET requests only. Closes #1619
+
+3.2.4 / 2013-05-09
+==================
+
+ * fix `req.subdomains` when no Host is present
+ * fix `req.host` when no Host is present, return undefined
+
+3.2.3 / 2013-05-07
+==================
+
+ * update connect / qs
+
+3.2.2 / 2013-05-03
+==================
+
+ * update qs
+
+3.2.1 / 2013-04-29
+==================
+
+ * add app.VERB() paths array deprecation warning
+ * update connect
+ * update qs and remove all ~ semver crap
+ * fix: accept number as value of Signed Cookie
+
+3.2.0 / 2013-04-15
+==================
+
+ * add "view" constructor setting to override view behaviour
+ * add req.acceptsEncoding(name)
+ * add req.acceptedEncodings
+ * revert cookie signature change causing session race conditions
+ * fix sorting of Accept values of the same quality
+
+3.1.2 / 2013-04-12
+==================
+
+ * add support for custom Accept parameters
+ * update cookie-signature
+
+3.1.1 / 2013-04-01
+==================
+
+ * add X-Forwarded-Host support to `req.host`
+ * fix relative redirects
+ * update mkdirp
+ * update buffer-crc32
+ * remove legacy app.configure() method from app template.
+
+3.1.0 / 2013-01-25
+==================
+
+ * add support for leading "." in "view engine" setting
+ * add array support to `res.set()`
+ * add node 0.8.x to travis.yml
+ * add "subdomain offset" setting for tweaking `req.subdomains`
+ * add `res.location(url)` implementing `res.redirect()`-like setting of Location
+ * use app.get() for x-powered-by setting for inheritance
+ * fix colons in passwords for `req.auth`
+
+3.0.6 / 2013-01-04
+==================
+
+ * add http verb methods to Router
+ * update connect
+ * fix mangling of the `res.cookie()` options object
+ * fix jsonp whitespace escape. Closes #1132
+
+3.0.5 / 2012-12-19
+==================
+
+ * add throwing when a non-function is passed to a route
+ * fix: explicitly remove Transfer-Encoding header from 204 and 304 responses
+ * revert "add 'etag' option"
+
+3.0.4 / 2012-12-05
+==================
+
+ * add 'etag' option to disable `res.send()` Etags
+ * add escaping of urls in text/plain in `res.redirect()`
+ for old browsers interpreting as html
+ * change crc32 module for a more liberal license
+ * update connect
+
+3.0.3 / 2012-11-13
+==================
+
+ * update connect
+ * update cookie module
+ * fix cookie max-age
+
+3.0.2 / 2012-11-08
+==================
+
+ * add OPTIONS to cors example. Closes #1398
+ * fix route chaining regression. Closes #1397
+
+3.0.1 / 2012-11-01
+==================
+
+ * update connect
+
+3.0.0 / 2012-10-23
+==================
+
+ * add `make clean`
+ * add "Basic" check to req.auth
+ * add `req.auth` test coverage
+ * add cb && cb(payload) to `res.jsonp()`. Closes #1374
+ * add backwards compat for `res.redirect()` status. Closes #1336
+ * add support for `res.json()` to retain previously defined Content-Types. Closes #1349
+ * update connect
+ * change `res.redirect()` to utilize a pathname-relative Location again. Closes #1382
+ * remove non-primitive string support for `res.send()`
+ * fix view-locals example. Closes #1370
+ * fix route-separation example
+
+3.0.0rc5 / 2012-09-18
+==================
+
+ * update connect
+ * add redis search example
+ * add static-files example
+ * add "x-powered-by" setting (`app.disable('x-powered-by')`)
+ * add "application/octet-stream" redirect Accept test case. Closes #1317
+
+3.0.0rc4 / 2012-08-30
+==================
+
+ * add `res.jsonp()`. Closes #1307
+ * add "verbose errors" option to error-pages example
+ * add another route example to express(1) so people are not so confused
+ * add redis online user activity tracking example
+ * update connect dep
+ * fix etag quoting. Closes #1310
+ * fix error-pages 404 status
+ * fix jsonp callback char restrictions
+ * remove old OPTIONS default response
+
+3.0.0rc3 / 2012-08-13
+==================
+
+ * update connect dep
+ * fix signed cookies to work with `connect.cookieParser()` ("s:" prefix was missing) [tnydwrds]
+ * fix `res.render()` clobbering of "locals"
+
+3.0.0rc2 / 2012-08-03
+==================
+
+ * add CORS example
+ * update connect dep
+ * deprecate `.createServer()` & remove old stale examples
+ * fix: escape `res.redirect()` link
+ * fix vhost example
+
+3.0.0rc1 / 2012-07-24
+==================
+
+ * add more examples to view-locals
+ * add scheme-relative redirects (`res.redirect("//foo.com")`) support
+ * update cookie dep
+ * update connect dep
+ * update send dep
+ * fix `express(1)` -h flag, use -H for hogan. Closes #1245
+ * fix `res.sendfile()` socket error handling regression
+
+3.0.0beta7 / 2012-07-16
+==================
+
+ * update connect dep for `send()` root normalization regression
+
+3.0.0beta6 / 2012-07-13
+==================
+
+ * add `err.view` property for view errors. Closes #1226
+ * add "jsonp callback name" setting
+ * add support for "/foo/:bar*" non-greedy matches
+ * change `res.sendfile()` to use `send()` module
+ * change `res.send` to use "response-send" module
+ * remove `app.locals.use` and `res.locals.use`, use regular middleware
+
+3.0.0beta5 / 2012-07-03
+==================
+
+ * add "make check" support
+ * add route-map example
+ * add `res.json(obj, status)` support back for BC
+ * add "methods" dep, remove internal methods module
+ * update connect dep
+ * update auth example to utilize cores pbkdf2
+ * updated tests to use "supertest"
+
+3.0.0beta4 / 2012-06-25
+==================
+
+ * Added `req.auth`
+ * Added `req.range(size)`
+ * Added `res.links(obj)`
+ * Added `res.send(body, status)` support back for backwards compat
+ * Added `.default()` support to `res.format()`
+ * Added 2xx / 304 check to `req.fresh`
+ * Revert "Added + support to the router"
+ * Fixed `res.send()` freshness check, respect res.statusCode
+
+3.0.0beta3 / 2012-06-15
+==================
+
+ * Added hogan `--hjs` to express(1) [nullfirm]
+ * Added another example to content-negotiation
+ * Added `fresh` dep
+ * Changed: `res.send()` always checks freshness
+ * Fixed: expose connects mime module. Closes #1165
+
+3.0.0beta2 / 2012-06-06
+==================
+
+ * Added `+` support to the router
+ * Added `req.host`
+ * Changed `req.param()` to check route first
+ * Update connect dep
+
+3.0.0beta1 / 2012-06-01
+==================
+
+ * Added `res.format()` callback to override default 406 behaviour
+ * Fixed `res.redirect()` 406. Closes #1154
+
+3.0.0alpha5 / 2012-05-30
+==================
+
+ * Added `req.ip`
+ * Added `{ signed: true }` option to `res.cookie()`
+ * Removed `res.signedCookie()`
+ * Changed: dont reverse `req.ips`
+ * Fixed "trust proxy" setting check for `req.ips`
+
+3.0.0alpha4 / 2012-05-09
+==================
+
+ * Added: allow `[]` in jsonp callback. Closes #1128
+ * Added `PORT` env var support in generated template. Closes #1118 [benatkin]
+ * Updated: connect 2.2.2
+
+3.0.0alpha3 / 2012-05-04
+==================
+
+ * Added public `app.routes`. Closes #887
+ * Added _view-locals_ example
+ * Added _mvc_ example
+ * Added `res.locals.use()`. Closes #1120
+ * Added conditional-GET support to `res.send()`
+ * Added: coerce `res.set()` values to strings
+ * Changed: moved `static()` in generated apps below router
+ * Changed: `res.send()` only set ETag when not previously set
+ * Changed connect 2.2.1 dep
+ * Changed: `make test` now runs unit / acceptance tests
+ * Fixed req/res proto inheritance
+
+3.0.0alpha2 / 2012-04-26
+==================
+
+ * Added `make benchmark` back
+ * Added `res.send()` support for `String` objects
+ * Added client-side data exposing example
+ * Added `res.header()` and `req.header()` aliases for BC
+ * Added `express.createServer()` for BC
+ * Perf: memoize parsed urls
+ * Perf: connect 2.2.0 dep
+ * Changed: make `expressInit()` middleware self-aware
+ * Fixed: use app.get() for all core settings
+ * Fixed redis session example
+ * Fixed session example. Closes #1105
+ * Fixed generated express dep. Closes #1078
+
+3.0.0alpha1 / 2012-04-15
+==================
+
+ * Added `app.locals.use(callback)`
+ * Added `app.locals` object
+ * Added `app.locals(obj)`
+ * Added `res.locals` object
+ * Added `res.locals(obj)`
+ * Added `res.format()` for content-negotiation
+ * Added `app.engine()`
+ * Added `res.cookie()` JSON cookie support
+ * Added "trust proxy" setting
+ * Added `req.subdomains`
+ * Added `req.protocol`
+ * Added `req.secure`
+ * Added `req.path`
+ * Added `req.ips`
+ * Added `req.fresh`
+ * Added `req.stale`
+ * Added comma-delimited / array support for `req.accepts()`
+ * Added debug instrumentation
+ * Added `res.set(obj)`
+ * Added `res.set(field, value)`
+ * Added `res.get(field)`
+ * Added `app.get(setting)`. Closes #842
+ * Added `req.acceptsLanguage()`
+ * Added `req.acceptsCharset()`
+ * Added `req.accepted`
+ * Added `req.acceptedLanguages`
+ * Added `req.acceptedCharsets`
+ * Added "json replacer" setting
+ * Added "json spaces" setting
+ * Added X-Forwarded-Proto support to `res.redirect()`. Closes #92
+ * Added `--less` support to express(1)
+ * Added `express.response` prototype
+ * Added `express.request` prototype
+ * Added `express.application` prototype
+ * Added `app.path()`
+ * Added `app.render()`
+ * Added `res.type()` to replace `res.contentType()`
+ * Changed: `res.redirect()` to add relative support
+ * Changed: enable "jsonp callback" by default
+ * Changed: renamed "case sensitive routes" to "case sensitive routing"
+ * Rewrite of all tests with mocha
+ * Removed "root" setting
+ * Removed `res.redirect('home')` support
+ * Removed `req.notify()`
+ * Removed `app.register()`
+ * Removed `app.redirect()`
+ * Removed `app.is()`
+ * Removed `app.helpers()`
+ * Removed `app.dynamicHelpers()`
+ * Fixed `res.sendfile()` with non-GET. Closes #723
+ * Fixed express(1) public dir for windows. Closes #866
+
+2.5.9/ 2012-04-02
+==================
+
+ * Added support for PURGE request method [pbuyle]
+ * Fixed `express(1)` generated app `app.address()` before `listening` [mmalecki]
+
+2.5.8 / 2012-02-08
+==================
+
+ * Update mkdirp dep. Closes #991
+
+2.5.7 / 2012-02-06
+==================
+
+ * Fixed `app.all` duplicate DELETE requests [mscdex]
+
+2.5.6 / 2012-01-13
+==================
+
+ * Updated hamljs dev dep. Closes #953
+
+2.5.5 / 2012-01-08
+==================
+
+ * Fixed: set `filename` on cached templates [matthewleon]
+
+2.5.4 / 2012-01-02
+==================
+
+ * Fixed `express(1)` eol on 0.4.x. Closes #947
+
+2.5.3 / 2011-12-30
+==================
+
+ * Fixed `req.is()` when a charset is present
+
+2.5.2 / 2011-12-10
+==================
+
+ * Fixed: express(1) LF -> CRLF for windows
+
+2.5.1 / 2011-11-17
+==================
+
+ * Changed: updated connect to 1.8.x
+ * Removed sass.js support from express(1)
+
+2.5.0 / 2011-10-24
+==================
+
+ * Added ./routes dir for generated app by default
+ * Added npm install reminder to express(1) app gen
+ * Added 0.5.x support
+ * Removed `make test-cov` since it wont work with node 0.5.x
+ * Fixed express(1) public dir for windows. Closes #866
+
+2.4.7 / 2011-10-05
+==================
+
+ * Added mkdirp to express(1). Closes #795
+ * Added simple _json-config_ example
+ * Added shorthand for the parsed request's pathname via `req.path`
+ * Changed connect dep to 1.7.x to fix npm issue...
+ * Fixed `res.redirect()` __HEAD__ support. [reported by xerox]
+ * Fixed `req.flash()`, only escape args
+ * Fixed absolute path checking on windows. Closes #829 [reported by andrewpmckenzie]
+
+2.4.6 / 2011-08-22
+==================
+
+ * Fixed multiple param callback regression. Closes #824 [reported by TroyGoode]
+
+2.4.5 / 2011-08-19
+==================
+
+ * Added support for routes to handle errors. Closes #809
+ * Added `app.routes.all()`. Closes #803
+ * Added "basepath" setting to work in conjunction with reverse proxies etc.
+ * Refactored `Route` to use a single array of callbacks
+ * Added support for multiple callbacks for `app.param()`. Closes #801
+Closes #805
+ * Changed: removed .call(self) for route callbacks
+ * Dependency: `qs >= 0.3.1`
+ * Fixed `res.redirect()` on windows due to `join()` usage. Closes #808
+
+2.4.4 / 2011-08-05
+==================
+
+ * Fixed `res.header()` intention of a set, even when `undefined`
+ * Fixed `*`, value no longer required
+ * Fixed `res.send(204)` support. Closes #771
+
+2.4.3 / 2011-07-14
+==================
+
+ * Added docs for `status` option special-case. Closes #739
+ * Fixed `options.filename`, exposing the view path to template engines
+
+2.4.2. / 2011-07-06
+==================
+
+ * Revert "removed jsonp stripping" for XSS
+
+2.4.1 / 2011-07-06
+==================
+
+ * Added `res.json()` JSONP support. Closes #737
+ * Added _extending-templates_ example. Closes #730
+ * Added "strict routing" setting for trailing slashes
+ * Added support for multiple envs in `app.configure()` calls. Closes #735
+ * Changed: `res.send()` using `res.json()`
+ * Changed: when cookie `path === null` don't default it
+ * Changed; default cookie path to "home" setting. Closes #731
+ * Removed _pids/logs_ creation from express(1)
+
+2.4.0 / 2011-06-28
+==================
+
+ * Added chainable `res.status(code)`
+ * Added `res.json()`, an explicit version of `res.send(obj)`
+ * Added simple web-service example
+
+2.3.12 / 2011-06-22
+==================
+
+ * \#express is now on freenode! come join!
+ * Added `req.get(field, param)`
+ * Added links to Japanese documentation, thanks @hideyukisaito!
+ * Added; the `express(1)` generated app outputs the env
+ * Added `content-negotiation` example
+ * Dependency: connect >= 1.5.1 < 2.0.0
+ * Fixed view layout bug. Closes #720
+ * Fixed; ignore body on 304. Closes #701
+
+2.3.11 / 2011-06-04
+==================
+
+ * Added `npm test`
+ * Removed generation of dummy test file from `express(1)`
+ * Fixed; `express(1)` adds express as a dep
+ * Fixed; prune on `prepublish`
+
+2.3.10 / 2011-05-27
+==================
+
+ * Added `req.route`, exposing the current route
+ * Added _package.json_ generation support to `express(1)`
+ * Fixed call to `app.param()` function for optional params. Closes #682
+
+2.3.9 / 2011-05-25
+==================
+
+ * Fixed bug-ish with `../' in `res.partial()` calls
+
+2.3.8 / 2011-05-24
+==================
+
+ * Fixed `app.options()`
+
+2.3.7 / 2011-05-23
+==================
+
+ * Added route `Collection`, ex: `app.get('/user/:id').remove();`
+ * Added support for `app.param(fn)` to define param logic
+ * Removed `app.param()` support for callback with return value
+ * Removed module.parent check from express(1) generated app. Closes #670
+ * Refactored router. Closes #639
+
+2.3.6 / 2011-05-20
+==================
+
+ * Changed; using devDependencies instead of git submodules
+ * Fixed redis session example
+ * Fixed markdown example
+ * Fixed view caching, should not be enabled in development
+
+2.3.5 / 2011-05-20
+==================
+
+ * Added export `.view` as alias for `.View`
+
+2.3.4 / 2011-05-08
+==================
+
+ * Added `./examples/say`
+ * Fixed `res.sendfile()` bug preventing the transfer of files with spaces
+
+2.3.3 / 2011-05-03
+==================
+
+ * Added "case sensitive routes" option.
+ * Changed; split methods supported per rfc [slaskis]
+ * Fixed route-specific middleware when using the same callback function several times
+
+2.3.2 / 2011-04-27
+==================
+
+ * Fixed view hints
+
+2.3.1 / 2011-04-26
+==================
+
+ * Added `app.match()` as `app.match.all()`
+ * Added `app.lookup()` as `app.lookup.all()`
+ * Added `app.remove()` for `app.remove.all()`
+ * Added `app.remove.VERB()`
+ * Fixed template caching collision issue. Closes #644
+ * Moved router over from connect and started refactor
+
+2.3.0 / 2011-04-25
+==================
+
+ * Added options support to `res.clearCookie()`
+ * Added `res.helpers()` as alias of `res.locals()`
+ * Added; json defaults to UTF-8 with `res.send()`. Closes #632. [Daniel * Dependency `connect >= 1.4.0`
+ * Changed; auto set Content-Type in res.attachement [Aaron Heckmann]
+ * Renamed "cache views" to "view cache". Closes #628
+ * Fixed caching of views when using several apps. Closes #637
+ * Fixed gotcha invoking `app.param()` callbacks once per route middleware.
+Closes #638
+ * Fixed partial lookup precedence. Closes #631
+Shaw]
+
+2.2.2 / 2011-04-12
+==================
+
+ * Added second callback support for `res.download()` connection errors
+ * Fixed `filename` option passing to template engine
+
+2.2.1 / 2011-04-04
+==================
+
+ * Added `layout(path)` helper to change the layout within a view. Closes #610
+ * Fixed `partial()` collection object support.
+ Previously only anything with `.length` would work.
+ When `.length` is present one must still be aware of holes,
+ however now `{ collection: {foo: 'bar'}}` is valid, exposes
+ `keyInCollection` and `keysInCollection`.
+
+ * Performance improved with better view caching
+ * Removed `request` and `response` locals
+ * Changed; errorHandler page title is now `Express` instead of `Connect`
+
+2.2.0 / 2011-03-30
+==================
+
+ * Added `app.lookup.VERB()`, ex `app.lookup.put('/user/:id')`. Closes #606
+ * Added `app.match.VERB()`, ex `app.match.put('/user/12')`. Closes #606
+ * Added `app.VERB(path)` as alias of `app.lookup.VERB()`.
+ * Dependency `connect >= 1.2.0`
+
+2.1.1 / 2011-03-29
+==================
+
+ * Added; expose `err.view` object when failing to locate a view
+ * Fixed `res.partial()` call `next(err)` when no callback is given [reported by aheckmann]
+ * Fixed; `res.send(undefined)` responds with 204 [aheckmann]
+
+2.1.0 / 2011-03-24
+==================
+
+ * Added `<root>/_?<name>` partial lookup support. Closes #447
+ * Added `request`, `response`, and `app` local variables
+ * Added `settings` local variable, containing the app's settings
+ * Added `req.flash()` exception if `req.session` is not available
+ * Added `res.send(bool)` support (json response)
+ * Fixed stylus example for latest version
+ * Fixed; wrap try/catch around `res.render()`
+
+2.0.0 / 2011-03-17
+==================
+
+ * Fixed up index view path alternative.
+ * Changed; `res.locals()` without object returns the locals
+
+2.0.0rc3 / 2011-03-17
+==================
+
+ * Added `res.locals(obj)` to compliment `res.local(key, val)`
+ * Added `res.partial()` callback support
+ * Fixed recursive error reporting issue in `res.render()`
+
+2.0.0rc2 / 2011-03-17
+==================
+
+ * Changed; `partial()` "locals" are now optional
+ * Fixed `SlowBuffer` support. Closes #584 [reported by tyrda01]
+ * Fixed .filename view engine option [reported by drudge]
+ * Fixed blog example
+ * Fixed `{req,res}.app` reference when mounting [Ben Weaver]
+
+2.0.0rc / 2011-03-14
+==================
+
+ * Fixed; expose `HTTPSServer` constructor
+ * Fixed express(1) default test charset. Closes #579 [reported by secoif]
+ * Fixed; default charset to utf-8 instead of utf8 for lame IE [reported by NickP]
+
+2.0.0beta3 / 2011-03-09
+==================
+
+ * Added support for `res.contentType()` literal
+ The original `res.contentType('.json')`,
+ `res.contentType('application/json')`, and `res.contentType('json')`
+ will work now.
+ * Added `res.render()` status option support back
+ * Added charset option for `res.render()`
+ * Added `.charset` support (via connect 1.0.4)
+ * Added view resolution hints when in development and a lookup fails
+ * Added layout lookup support relative to the page view.
+ For example while rendering `./views/user/index.jade` if you create
+ `./views/user/layout.jade` it will be used in favour of the root layout.
+ * Fixed `res.redirect()`. RFC states absolute url [reported by unlink]
+ * Fixed; default `res.send()` string charset to utf8
+ * Removed `Partial` constructor (not currently used)
+
+2.0.0beta2 / 2011-03-07
+==================
+
+ * Added res.render() `.locals` support back to aid in migration process
+ * Fixed flash example
+
+2.0.0beta / 2011-03-03
+==================
+
+ * Added HTTPS support
+ * Added `res.cookie()` maxAge support
+ * Added `req.header()` _Referrer_ / _Referer_ special-case, either works
+ * Added mount support for `res.redirect()`, now respects the mount-point
+ * Added `union()` util, taking place of `merge(clone())` combo
+ * Added stylus support to express(1) generated app
+ * Added secret to session middleware used in examples and generated app
+ * Added `res.local(name, val)` for progressive view locals
+ * Added default param support to `req.param(name, default)`
+ * Added `app.disabled()` and `app.enabled()`
+ * Added `app.register()` support for omitting leading ".", either works
+ * Added `res.partial()`, using the same interface as `partial()` within a view. Closes #539
+ * Added `app.param()` to map route params to async/sync logic
+ * Added; aliased `app.helpers()` as `app.locals()`. Closes #481
+ * Added extname with no leading "." support to `res.contentType()`
+ * Added `cache views` setting, defaulting to enabled in "production" env
+ * Added index file partial resolution, eg: partial('user') may try _views/user/index.jade_.
+ * Added `req.accepts()` support for extensions
+ * Changed; `res.download()` and `res.sendfile()` now utilize Connect's
+ static file server `connect.static.send()`.
+ * Changed; replaced `connect.utils.mime()` with npm _mime_ module
+ * Changed; allow `req.query` to be pre-defined (via middleware or other parent
+ * Changed view partial resolution, now relative to parent view
+ * Changed view engine signature. no longer `engine.render(str, options, callback)`, now `engine.compile(str, options) -> Function`, the returned function accepts `fn(locals)`.
+ * Fixed `req.param()` bug returning Array.prototype methods. Closes #552
+ * Fixed; using `Stream#pipe()` instead of `sys.pump()` in `res.sendfile()`
+ * Fixed; using _qs_ module instead of _querystring_
+ * Fixed; strip unsafe chars from jsonp callbacks
+ * Removed "stream threshold" setting
+
+1.0.8 / 2011-03-01
+==================
+
+ * Allow `req.query` to be pre-defined (via middleware or other parent app)
+ * "connect": ">= 0.5.0 < 1.0.0". Closes #547
+ * Removed the long deprecated __EXPRESS_ENV__ support
+
+1.0.7 / 2011-02-07
+==================
+
+ * Fixed `render()` setting inheritance.
+ Mounted apps would not inherit "view engine"
+
+1.0.6 / 2011-02-07
+==================
+
+ * Fixed `view engine` setting bug when period is in dirname
+
+1.0.5 / 2011-02-05
+==================
+
+ * Added secret to generated app `session()` call
+
+1.0.4 / 2011-02-05
+==================
+
+ * Added `qs` dependency to _package.json_
+ * Fixed namespaced `require()`s for latest connect support
+
+1.0.3 / 2011-01-13
+==================
+
+ * Remove unsafe characters from JSONP callback names [Ryan Grove]
+
+1.0.2 / 2011-01-10
+==================
+
+ * Removed nested require, using `connect.router`
+
+1.0.1 / 2010-12-29
+==================
+
+ * Fixed for middleware stacked via `createServer()`
+ previously the `foo` middleware passed to `createServer(foo)`
+ would not have access to Express methods such as `res.send()`
+ or props like `req.query` etc.
+
+1.0.0 / 2010-11-16
+==================
+
+ * Added; deduce partial object names from the last segment.
+ For example by default `partial('forum/post', postObject)` will
+ give you the _post_ object, providing a meaningful default.
+ * Added http status code string representation to `res.redirect()` body
+ * Added; `res.redirect()` supporting _text/plain_ and _text/html_ via __Accept__.
+ * Added `req.is()` to aid in content negotiation
+ * Added partial local inheritance [suggested by masylum]. Closes #102
+ providing access to parent template locals.
+ * Added _-s, --session[s]_ flag to express(1) to add session related middleware
+ * Added _--template_ flag to express(1) to specify the
+ template engine to use.
+ * Added _--css_ flag to express(1) to specify the
+ stylesheet engine to use (or just plain css by default).
+ * Added `app.all()` support [thanks aheckmann]
+ * Added partial direct object support.
+ You may now `partial('user', user)` providing the "user" local,
+ vs previously `partial('user', { object: user })`.
+ * Added _route-separation_ example since many people question ways
+ to do this with CommonJS modules. Also view the _blog_ example for
+ an alternative.
+ * Performance; caching view path derived partial object names
+ * Fixed partial local inheritance precedence. [reported by Nick Poulden] Closes #454
+ * Fixed jsonp support; _text/javascript_ as per mailinglist discussion
+
+1.0.0rc4 / 2010-10-14
+==================
+
+ * Added _NODE_ENV_ support, _EXPRESS_ENV_ is deprecated and will be removed in 1.0.0
+ * Added route-middleware support (very helpful, see the [docs](http://expressjs.com/guide.html#Route-Middleware))
+ * Added _jsonp callback_ setting to enable/disable jsonp autowrapping [Dav Glass]
+ * Added callback query check on response.send to autowrap JSON objects for simple webservice implementations [Dav Glass]
+ * Added `partial()` support for array-like collections. Closes #434
+ * Added support for swappable querystring parsers
+ * Added session usage docs. Closes #443
+ * Added dynamic helper caching. Closes #439 [suggested by maritz]
+ * Added authentication example
+ * Added basic Range support to `res.sendfile()` (and `res.download()` etc)
+ * Changed; `express(1)` generated app using 2 spaces instead of 4
+ * Default env to "development" again [aheckmann]
+ * Removed _context_ option is no more, use "scope"
+ * Fixed; exposing _./support_ libs to examples so they can run without installs
+ * Fixed mvc example
+
+1.0.0rc3 / 2010-09-20
+==================
+
+ * Added confirmation for `express(1)` app generation. Closes #391
+ * Added extending of flash formatters via `app.flashFormatters`
+ * Added flash formatter support. Closes #411
+ * Added streaming support to `res.sendfile()` using `sys.pump()` when >= "stream threshold"
+ * Added _stream threshold_ setting for `res.sendfile()`
+ * Added `res.send()` __HEAD__ support
+ * Added `res.clearCookie()`
+ * Added `res.cookie()`
+ * Added `res.render()` headers option
+ * Added `res.redirect()` response bodies
+ * Added `res.render()` status option support. Closes #425 [thanks aheckmann]
+ * Fixed `res.sendfile()` responding with 403 on malicious path
+ * Fixed `res.download()` bug; when an error occurs remove _Content-Disposition_
+ * Fixed; mounted apps settings now inherit from parent app [aheckmann]
+ * Fixed; stripping Content-Length / Content-Type when 204
+ * Fixed `res.send()` 204. Closes #419
+ * Fixed multiple _Set-Cookie_ headers via `res.header()`. Closes #402
+ * Fixed bug messing with error handlers when `listenFD()` is called instead of `listen()`. [thanks guillermo]
+
+
+1.0.0rc2 / 2010-08-17
+==================
+
+ * Added `app.register()` for template engine mapping. Closes #390
+ * Added `res.render()` callback support as second argument (no options)
+ * Added callback support to `res.download()`
+ * Added callback support for `res.sendfile()`
+ * Added support for middleware access via `express.middlewareName()` vs `connect.middlewareName()`
+ * Added "partials" setting to docs
+ * Added default expresso tests to `express(1)` generated app. Closes #384
+ * Fixed `res.sendfile()` error handling, defer via `next()`
+ * Fixed `res.render()` callback when a layout is used [thanks guillermo]
+ * Fixed; `make install` creating ~/.node_libraries when not present
+ * Fixed issue preventing error handlers from being defined anywhere. Closes #387
+
+1.0.0rc / 2010-07-28
+==================
+
+ * Added mounted hook. Closes #369
+ * Added connect dependency to _package.json_
+
+ * Removed "reload views" setting and support code
+ development env never caches, production always caches.
+
+ * Removed _param_ in route callbacks, signature is now
+ simply (req, res, next), previously (req, res, params, next).
+ Use _req.params_ for path captures, _req.query_ for GET params.
+
+ * Fixed "home" setting
+ * Fixed middleware/router precedence issue. Closes #366
+ * Fixed; _configure()_ callbacks called immediately. Closes #368
+
+1.0.0beta2 / 2010-07-23
+==================
+
+ * Added more examples
+ * Added; exporting `Server` constructor
+ * Added `Server#helpers()` for view locals
+ * Added `Server#dynamicHelpers()` for dynamic view locals. Closes #349
+ * Added support for absolute view paths
+ * Added; _home_ setting defaults to `Server#route` for mounted apps. Closes #363
+ * Added Guillermo Rauch to the contributor list
+ * Added support for "as" for non-collection partials. Closes #341
+ * Fixed _install.sh_, ensuring _~/.node_libraries_ exists. Closes #362 [thanks jf]
+ * Fixed `res.render()` exceptions, now passed to `next()` when no callback is given [thanks guillermo]
+ * Fixed instanceof `Array` checks, now `Array.isArray()`
+ * Fixed express(1) expansion of public dirs. Closes #348
+ * Fixed middleware precedence. Closes #345
+ * Fixed view watcher, now async [thanks aheckmann]
+
+1.0.0beta / 2010-07-15
+==================
+
+ * Re-write
+ - much faster
+ - much lighter
+ - Check [ExpressJS.com](http://expressjs.com) for migration guide and updated docs
+
+0.14.0 / 2010-06-15
+==================
+
+ * Utilize relative requires
+ * Added Static bufferSize option [aheckmann]
+ * Fixed caching of view and partial subdirectories [aheckmann]
+ * Fixed mime.type() comments now that ".ext" is not supported
+ * Updated haml submodule
+ * Updated class submodule
+ * Removed bin/express
+
+0.13.0 / 2010-06-01
+==================
+
+ * Added node v0.1.97 compatibility
+ * Added support for deleting cookies via Request#cookie('key', null)
+ * Updated haml submodule
+ * Fixed not-found page, now using using charset utf-8
+ * Fixed show-exceptions page, now using using charset utf-8
+ * Fixed view support due to fs.readFile Buffers
+ * Changed; mime.type() no longer accepts ".type" due to node extname() changes
+
+0.12.0 / 2010-05-22
+==================
+
+ * Added node v0.1.96 compatibility
+ * Added view `helpers` export which act as additional local variables
+ * Updated haml submodule
+ * Changed ETag; removed inode, modified time only
+ * Fixed LF to CRLF for setting multiple cookies
+ * Fixed cookie complation; values are now urlencoded
+ * Fixed cookies parsing; accepts quoted values and url escaped cookies
+
+0.11.0 / 2010-05-06
+==================
+
+ * Added support for layouts using different engines
+ - this.render('page.html.haml', { layout: 'super-cool-layout.html.ejs' })
+ - this.render('page.html.haml', { layout: 'foo' }) // assumes 'foo.html.haml'
+ - this.render('page.html.haml', { layout: false }) // no layout
+ * Updated ext submodule
+ * Updated haml submodule
+ * Fixed EJS partial support by passing along the context. Issue #307
+
+0.10.1 / 2010-05-03
+==================
+
+ * Fixed binary uploads.
+
+0.10.0 / 2010-04-30
+==================
+
+ * Added charset support via Request#charset (automatically assigned to 'UTF-8' when respond()'s
+ encoding is set to 'utf8' or 'utf-8'.
+ * Added "encoding" option to Request#render(). Closes #299
+ * Added "dump exceptions" setting, which is enabled by default.
+ * Added simple ejs template engine support
+ * Added error response support for text/plain, application/json. Closes #297
+ * Added callback function param to Request#error()
+ * Added Request#sendHead()
+ * Added Request#stream()
+ * Added support for Request#respond(304, null) for empty response bodies
+ * Added ETag support to Request#sendfile()
+ * Added options to Request#sendfile(), passed to fs.createReadStream()
+ * Added filename arg to Request#download()
+ * Performance enhanced due to pre-reversing plugins so that plugins.reverse() is not called on each request
+ * Performance enhanced by preventing several calls to toLowerCase() in Router#match()
+ * Changed; Request#sendfile() now streams
+ * Changed; Renamed Request#halt() to Request#respond(). Closes #289
+ * Changed; Using sys.inspect() instead of JSON.encode() for error output
+ * Changed; run() returns the http.Server instance. Closes #298
+ * Changed; Defaulting Server#host to null (INADDR_ANY)
+ * Changed; Logger "common" format scale of 0.4f
+ * Removed Logger "request" format
+ * Fixed; Catching ENOENT in view caching, preventing error when "views/partials" is not found
+ * Fixed several issues with http client
+ * Fixed Logger Content-Length output
+ * Fixed bug preventing Opera from retaining the generated session id. Closes #292
+
+0.9.0 / 2010-04-14
+==================
+
+ * Added DSL level error() route support
+ * Added DSL level notFound() route support
+ * Added Request#error()
+ * Added Request#notFound()
+ * Added Request#render() callback function. Closes #258
+ * Added "max upload size" setting
+ * Added "magic" variables to collection partials (\_\_index\_\_, \_\_length\_\_, \_\_isFirst\_\_, \_\_isLast\_\_). Closes #254
+ * Added [haml.js](http://github.com/visionmedia/haml.js) submodule; removed haml-js
+ * Added callback function support to Request#halt() as 3rd/4th arg
+ * Added preprocessing of route param wildcards using param(). Closes #251
+ * Added view partial support (with collections etc)
+ * Fixed bug preventing falsey params (such as ?page=0). Closes #286
+ * Fixed setting of multiple cookies. Closes #199
+ * Changed; view naming convention is now NAME.TYPE.ENGINE (for example page.html.haml)
+ * Changed; session cookie is now httpOnly
+ * Changed; Request is no longer global
+ * Changed; Event is no longer global
+ * Changed; "sys" module is no longer global
+ * Changed; moved Request#download to Static plugin where it belongs
+ * Changed; Request instance created before body parsing. Closes #262
+ * Changed; Pre-caching views in memory when "cache view contents" is enabled. Closes #253
+ * Changed; Pre-caching view partials in memory when "cache view partials" is enabled
+ * Updated support to node --version 0.1.90
+ * Updated dependencies
+ * Removed set("session cookie") in favour of use(Session, { cookie: { ... }})
+ * Removed utils.mixin(); use Object#mergeDeep()
+
+0.8.0 / 2010-03-19
+==================
+
+ * Added coffeescript example app. Closes #242
+ * Changed; cache api now async friendly. Closes #240
+ * Removed deprecated 'express/static' support. Use 'express/plugins/static'
+
+0.7.6 / 2010-03-19
+==================
+
+ * Added Request#isXHR. Closes #229
+ * Added `make install` (for the executable)
+ * Added `express` executable for setting up simple app templates
+ * Added "GET /public/*" to Static plugin, defaulting to <root>/public
+ * Added Static plugin
+ * Fixed; Request#render() only calls cache.get() once
+ * Fixed; Namespacing View caches with "view:"
+ * Fixed; Namespacing Static caches with "static:"
+ * Fixed; Both example apps now use the Static plugin
+ * Fixed set("views"). Closes #239
+ * Fixed missing space for combined log format
+ * Deprecated Request#sendfile() and 'express/static'
+ * Removed Server#running
+
+0.7.5 / 2010-03-16
+==================
+
+ * Added Request#flash() support without args, now returns all flashes
+ * Updated ext submodule
+
+0.7.4 / 2010-03-16
+==================
+
+ * Fixed session reaper
+ * Changed; class.js replacing js-oo Class implementation (quite a bit faster, no browser cruft)
+
+0.7.3 / 2010-03-16
+==================
+
+ * Added package.json
+ * Fixed requiring of haml / sass due to kiwi removal
+
+0.7.2 / 2010-03-16
+==================
+
+ * Fixed GIT submodules (HAH!)
+
+0.7.1 / 2010-03-16
+==================
+
+ * Changed; Express now using submodules again until a PM is adopted
+ * Changed; chat example using millisecond conversions from ext
+
+0.7.0 / 2010-03-15
+==================
+
+ * Added Request#pass() support (finds the next matching route, or the given path)
+ * Added Logger plugin (default "common" format replaces CommonLogger)
+ * Removed Profiler plugin
+ * Removed CommonLogger plugin
+
+0.6.0 / 2010-03-11
+==================
+
+ * Added seed.yml for kiwi package management support
+ * Added HTTP client query string support when method is GET. Closes #205
+
+ * Added support for arbitrary view engines.
+ For example "foo.engine.html" will now require('engine'),
+ the exports from this module are cached after the first require().
+
+ * Added async plugin support
+
+ * Removed usage of RESTful route funcs as http client
+ get() etc, use http.get() and friends
+
+ * Removed custom exceptions
+
+0.5.0 / 2010-03-10
+==================
+
+ * Added ext dependency (library of js extensions)
+ * Removed extname() / basename() utils. Use path module
+ * Removed toArray() util. Use arguments.values
+ * Removed escapeRegexp() util. Use RegExp.escape()
+ * Removed process.mixin() dependency. Use utils.mixin()
+ * Removed Collection
+ * Removed ElementCollection
+ * Shameless self promotion of ebook "Advanced JavaScript" (http://dev-mag.com) ;)
+
+0.4.0 / 2010-02-11
+==================
+
+ * Added flash() example to sample upload app
+ * Added high level restful http client module (express/http)
+ * Changed; RESTful route functions double as HTTP clients. Closes #69
+ * Changed; throwing error when routes are added at runtime
+ * Changed; defaulting render() context to the current Request. Closes #197
+ * Updated haml submodule
+
+0.3.0 / 2010-02-11
+==================
+
+ * Updated haml / sass submodules. Closes #200
+ * Added flash message support. Closes #64
+ * Added accepts() now allows multiple args. fixes #117
+ * Added support for plugins to halt. Closes #189
+ * Added alternate layout support. Closes #119
+ * Removed Route#run(). Closes #188
+ * Fixed broken specs due to use(Cookie) missing
+
+0.2.1 / 2010-02-05
+==================
+
+ * Added "plot" format option for Profiler (for gnuplot processing)
+ * Added request number to Profiler plugin
+ * Fixed binary encoding for multi-part file uploads, was previously defaulting to UTF8
+ * Fixed issue with routes not firing when not files are present. Closes #184
+ * Fixed process.Promise -> events.Promise
+
+0.2.0 / 2010-02-03
+==================
+
+ * Added parseParam() support for name[] etc. (allows for file inputs with "multiple" attr) Closes #180
+ * Added Both Cache and Session option "reapInterval" may be "reapEvery". Closes #174
+ * Added expiration support to cache api with reaper. Closes #133
+ * Added cache Store.Memory#reap()
+ * Added Cache; cache api now uses first class Cache instances
+ * Added abstract session Store. Closes #172
+ * Changed; cache Memory.Store#get() utilizing Collection
+ * Renamed MemoryStore -> Store.Memory
+ * Fixed use() of the same plugin several time will always use latest options. Closes #176
+
+0.1.0 / 2010-02-03
+==================
+
+ * Changed; Hooks (before / after) pass request as arg as well as evaluated in their context
+ * Updated node support to 0.1.27 Closes #169
+ * Updated dirname(__filename) -> __dirname
+ * Updated libxmljs support to v0.2.0
+ * Added session support with memory store / reaping
+ * Added quick uid() helper
+ * Added multi-part upload support
+ * Added Sass.js support / submodule
+ * Added production env caching view contents and static files
+ * Added static file caching. Closes #136
+ * Added cache plugin with memory stores
+ * Added support to StaticFile so that it works with non-textual files.
+ * Removed dirname() helper
+ * Removed several globals (now their modules must be required)
+
+0.0.2 / 2010-01-10
+==================
+
+ * Added view benchmarks; currently haml vs ejs
+ * Added Request#attachment() specs. Closes #116
+ * Added use of node's parseQuery() util. Closes #123
+ * Added `make init` for submodules
+ * Updated Haml
+ * Updated sample chat app to show messages on load
+ * Updated libxmljs parseString -> parseHtmlString
+ * Fixed `make init` to work with older versions of git
+ * Fixed specs can now run independent specs for those who cant build deps. Closes #127
+ * Fixed issues introduced by the node url module changes. Closes 126.
+ * Fixed two assertions failing due to Collection#keys() returning strings
+ * Fixed faulty Collection#toArray() spec due to keys() returning strings
+ * Fixed `make test` now builds libxmljs.node before testing
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/LICENSE
new file mode 100644
index 0000000..aa927e4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/LICENSE
@@ -0,0 +1,24 @@
+(The MIT License)
+
+Copyright (c) 2009-2014 TJ Holowaychuk <tj@vision-media.ca>
+Copyright (c) 2013-2014 Roman Shtylman <shtylman+expressjs@gmail.com>
+Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/Readme.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/Readme.md
new file mode 100644
index 0000000..e9bfaeb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/Readme.md
@@ -0,0 +1,142 @@
+[![Express Logo](https://i.cloudup.com/zfY6lL7eFa-3000x3000.png)](http://expressjs.com/)
+
+ Fast, unopinionated, minimalist web framework for [node](http://nodejs.org).
+
+ [![NPM Version][npm-image]][npm-url]
+ [![NPM Downloads][downloads-image]][downloads-url]
+ [![Linux Build][travis-image]][travis-url]
+ [![Windows Build][appveyor-image]][appveyor-url]
+ [![Test Coverage][coveralls-image]][coveralls-url]
+
+```js
+var express = require('express')
+var app = express()
+
+app.get('/', function (req, res) {
+ res.send('Hello World')
+})
+
+app.listen(3000)
+```
+
+## Installation
+
+```bash
+$ npm install express
+```
+
+## Features
+
+ * Robust routing
+ * Focus on high performance
+ * Super-high test coverage
+ * HTTP helpers (redirection, caching, etc)
+ * View system supporting 14+ template engines
+ * Content negotiation
+ * Executable for generating applications quickly
+
+## Docs & Community
+
+ * [Website and Documentation](http://expressjs.com/) - [[website repo](https://github.com/strongloop/expressjs.com)]
+ * [#express](https://webchat.freenode.net/?channels=express) on freenode IRC
+ * [Github Organization](https://github.com/expressjs) for Official Middleware & Modules
+ * Visit the [Wiki](https://github.com/expressjs/express/wiki)
+ * [Google Group](https://groups.google.com/group/express-js) for discussion
+ * [Gitter](https://gitter.im/expressjs/express) for support and discussion
+ * [РуÑÑкоÑÐ·Ñ‹Ñ‡Ð½Ð°Ñ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ñ](http://jsman.ru/express/)
+
+**PROTIP** Be sure to read [Migrating from 3.x to 4.x](https://github.com/expressjs/express/wiki/Migrating-from-3.x-to-4.x) as well as [New features in 4.x](https://github.com/expressjs/express/wiki/New-features-in-4.x).
+
+###Security Issues
+
+If you discover a security vulnerability in Express, please see [Security Policies and Procedures](Security.md).
+
+## Quick Start
+
+ The quickest way to get started with express is to utilize the executable [`express(1)`](https://github.com/expressjs/generator) to generate an application as shown below:
+
+ Install the executable. The executable's major version will match Express's:
+
+```bash
+$ npm install -g express-generator@4
+```
+
+ Create the app:
+
+```bash
+$ express /tmp/foo && cd /tmp/foo
+```
+
+ Install dependencies:
+
+```bash
+$ npm install
+```
+
+ Start the server:
+
+```bash
+$ npm start
+```
+
+## Philosophy
+
+ The Express philosophy is to provide small, robust tooling for HTTP servers, making
+ it a great solution for single page applications, web sites, hybrids, or public
+ HTTP APIs.
+
+ Express does not force you to use any specific ORM or template engine. With support for over
+ 14 template engines via [Consolidate.js](https://github.com/tj/consolidate.js),
+ you can quickly craft your perfect framework.
+
+## Examples
+
+ To view the examples, clone the Express repo and install the dependencies:
+
+```bash
+$ git clone git://github.com/expressjs/express.git --depth 1
+$ cd express
+$ npm install
+```
+
+ Then run whichever example you want:
+
+```bash
+$ node examples/content-negotiation
+```
+
+## Tests
+
+ To run the test suite, first install the dependencies, then run `npm test`:
+
+```bash
+$ npm install
+$ npm test
+```
+
+## People
+
+The original author of Express is [TJ Holowaychuk](https://github.com/tj) [![TJ's Gratipay][gratipay-image-visionmedia]][gratipay-url-visionmedia]
+
+The current lead maintainer is [Douglas Christopher Wilson](https://github.com/dougwilson) [![Doug's Gratipay][gratipay-image-dougwilson]][gratipay-url-dougwilson]
+
+[List of all contributors](https://github.com/expressjs/express/graphs/contributors)
+
+## License
+
+ [MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/express.svg
+[npm-url]: https://npmjs.org/package/express
+[downloads-image]: https://img.shields.io/npm/dm/express.svg
+[downloads-url]: https://npmjs.org/package/express
+[travis-image]: https://img.shields.io/travis/expressjs/express/master.svg?label=linux
+[travis-url]: https://travis-ci.org/expressjs/express
+[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/express/master.svg?label=windows
+[appveyor-url]: https://ci.appveyor.com/project/dougwilson/express
+[coveralls-image]: https://img.shields.io/coveralls/expressjs/express/master.svg
+[coveralls-url]: https://coveralls.io/r/expressjs/express?branch=master
+[gratipay-image-visionmedia]: https://img.shields.io/gratipay/visionmedia.svg
+[gratipay-url-visionmedia]: https://gratipay.com/visionmedia/
+[gratipay-image-dougwilson]: https://img.shields.io/gratipay/dougwilson.svg
+[gratipay-url-dougwilson]: https://gratipay.com/dougwilson/
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/index.js
new file mode 100644
index 0000000..d219b0c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/index.js
@@ -0,0 +1,11 @@
+/*!
+ * express
+ * Copyright(c) 2009-2013 TJ Holowaychuk
+ * Copyright(c) 2013 Roman Shtylman
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict';
+
+module.exports = require('./lib/express');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/application.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/application.js
new file mode 100644
index 0000000..0ee4def
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/application.js
@@ -0,0 +1,643 @@
+/*!
+ * express
+ * Copyright(c) 2009-2013 TJ Holowaychuk
+ * Copyright(c) 2013 Roman Shtylman
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var finalhandler = require('finalhandler');
+var Router = require('./router');
+var methods = require('methods');
+var middleware = require('./middleware/init');
+var query = require('./middleware/query');
+var debug = require('debug')('express:application');
+var View = require('./view');
+var http = require('http');
+var compileETag = require('./utils').compileETag;
+var compileQueryParser = require('./utils').compileQueryParser;
+var compileTrust = require('./utils').compileTrust;
+var deprecate = require('depd')('express');
+var flatten = require('array-flatten');
+var merge = require('utils-merge');
+var resolve = require('path').resolve;
+var slice = Array.prototype.slice;
+
+/**
+ * Application prototype.
+ */
+
+var app = exports = module.exports = {};
+
+/**
+ * Variable for trust proxy inheritance back-compat
+ * @private
+ */
+
+var trustProxyDefaultSymbol = '@@symbol:trust_proxy_default';
+
+/**
+ * Initialize the server.
+ *
+ * - setup default configuration
+ * - setup default middleware
+ * - setup route reflection methods
+ *
+ * @private
+ */
+
+app.init = function init() {
+ this.cache = {};
+ this.engines = {};
+ this.settings = {};
+
+ this.defaultConfiguration();
+};
+
+/**
+ * Initialize application configuration.
+ * @private
+ */
+
+app.defaultConfiguration = function defaultConfiguration() {
+ var env = process.env.NODE_ENV || 'development';
+
+ // default settings
+ this.enable('x-powered-by');
+ this.set('etag', 'weak');
+ this.set('env', env);
+ this.set('query parser', 'extended');
+ this.set('subdomain offset', 2);
+ this.set('trust proxy', false);
+
+ // trust proxy inherit back-compat
+ Object.defineProperty(this.settings, trustProxyDefaultSymbol, {
+ configurable: true,
+ value: true
+ });
+
+ debug('booting in %s mode', env);
+
+ this.on('mount', function onmount(parent) {
+ // inherit trust proxy
+ if (this.settings[trustProxyDefaultSymbol] === true
+ && typeof parent.settings['trust proxy fn'] === 'function') {
+ delete this.settings['trust proxy'];
+ delete this.settings['trust proxy fn'];
+ }
+
+ // inherit protos
+ this.request.__proto__ = parent.request;
+ this.response.__proto__ = parent.response;
+ this.engines.__proto__ = parent.engines;
+ this.settings.__proto__ = parent.settings;
+ });
+
+ // setup locals
+ this.locals = Object.create(null);
+
+ // top-most app is mounted at /
+ this.mountpath = '/';
+
+ // default locals
+ this.locals.settings = this.settings;
+
+ // default configuration
+ this.set('view', View);
+ this.set('views', resolve('views'));
+ this.set('jsonp callback name', 'callback');
+
+ if (env === 'production') {
+ this.enable('view cache');
+ }
+
+ Object.defineProperty(this, 'router', {
+ get: function() {
+ throw new Error('\'app.router\' is deprecated!\nPlease see the 3.x to 4.x migration guide for details on how to update your app.');
+ }
+ });
+};
+
+/**
+ * lazily adds the base router if it has not yet been added.
+ *
+ * We cannot add the base router in the defaultConfiguration because
+ * it reads app settings which might be set after that has run.
+ *
+ * @private
+ */
+app.lazyrouter = function lazyrouter() {
+ if (!this._router) {
+ this._router = new Router({
+ caseSensitive: this.enabled('case sensitive routing'),
+ strict: this.enabled('strict routing')
+ });
+
+ this._router.use(query(this.get('query parser fn')));
+ this._router.use(middleware.init(this));
+ }
+};
+
+/**
+ * Dispatch a req, res pair into the application. Starts pipeline processing.
+ *
+ * If no callback is provided, then default error handlers will respond
+ * in the event of an error bubbling through the stack.
+ *
+ * @private
+ */
+
+app.handle = function handle(req, res, callback) {
+ var router = this._router;
+
+ // final handler
+ var done = callback || finalhandler(req, res, {
+ env: this.get('env'),
+ onerror: logerror.bind(this)
+ });
+
+ // no routes
+ if (!router) {
+ debug('no routes defined on app');
+ done();
+ return;
+ }
+
+ router.handle(req, res, done);
+};
+
+/**
+ * Proxy `Router#use()` to add middleware to the app router.
+ * See Router#use() documentation for details.
+ *
+ * If the _fn_ parameter is an express app, then it will be
+ * mounted at the _route_ specified.
+ *
+ * @public
+ */
+
+app.use = function use(fn) {
+ var offset = 0;
+ var path = '/';
+
+ // default path to '/'
+ // disambiguate app.use([fn])
+ if (typeof fn !== 'function') {
+ var arg = fn;
+
+ while (Array.isArray(arg) && arg.length !== 0) {
+ arg = arg[0];
+ }
+
+ // first arg is the path
+ if (typeof arg !== 'function') {
+ offset = 1;
+ path = fn;
+ }
+ }
+
+ var fns = flatten(slice.call(arguments, offset));
+
+ if (fns.length === 0) {
+ throw new TypeError('app.use() requires middleware functions');
+ }
+
+ // setup router
+ this.lazyrouter();
+ var router = this._router;
+
+ fns.forEach(function (fn) {
+ // non-express app
+ if (!fn || !fn.handle || !fn.set) {
+ return router.use(path, fn);
+ }
+
+ debug('.use app under %s', path);
+ fn.mountpath = path;
+ fn.parent = this;
+
+ // restore .app property on req and res
+ router.use(path, function mounted_app(req, res, next) {
+ var orig = req.app;
+ fn.handle(req, res, function (err) {
+ req.__proto__ = orig.request;
+ res.__proto__ = orig.response;
+ next(err);
+ });
+ });
+
+ // mounted an app
+ fn.emit('mount', this);
+ }, this);
+
+ return this;
+};
+
+/**
+ * Proxy to the app `Router#route()`
+ * Returns a new `Route` instance for the _path_.
+ *
+ * Routes are isolated middleware stacks for specific paths.
+ * See the Route api docs for details.
+ *
+ * @public
+ */
+
+app.route = function route(path) {
+ this.lazyrouter();
+ return this._router.route(path);
+};
+
+/**
+ * Register the given template engine callback `fn`
+ * as `ext`.
+ *
+ * By default will `require()` the engine based on the
+ * file extension. For example if you try to render
+ * a "foo.jade" file Express will invoke the following internally:
+ *
+ * app.engine('jade', require('jade').__express);
+ *
+ * For engines that do not provide `.__express` out of the box,
+ * or if you wish to "map" a different extension to the template engine
+ * you may use this method. For example mapping the EJS template engine to
+ * ".html" files:
+ *
+ * app.engine('html', require('ejs').renderFile);
+ *
+ * In this case EJS provides a `.renderFile()` method with
+ * the same signature that Express expects: `(path, options, callback)`,
+ * though note that it aliases this method as `ejs.__express` internally
+ * so if you're using ".ejs" extensions you dont need to do anything.
+ *
+ * Some template engines do not follow this convention, the
+ * [Consolidate.js](https://github.com/tj/consolidate.js)
+ * library was created to map all of node's popular template
+ * engines to follow this convention, thus allowing them to
+ * work seamlessly within Express.
+ *
+ * @param {String} ext
+ * @param {Function} fn
+ * @return {app} for chaining
+ * @public
+ */
+
+app.engine = function engine(ext, fn) {
+ if (typeof fn !== 'function') {
+ throw new Error('callback function required');
+ }
+
+ // get file extension
+ var extension = ext[0] !== '.'
+ ? '.' + ext
+ : ext;
+
+ // store engine
+ this.engines[extension] = fn;
+
+ return this;
+};
+
+/**
+ * Proxy to `Router#param()` with one added api feature. The _name_ parameter
+ * can be an array of names.
+ *
+ * See the Router#param() docs for more details.
+ *
+ * @param {String|Array} name
+ * @param {Function} fn
+ * @return {app} for chaining
+ * @public
+ */
+
+app.param = function param(name, fn) {
+ this.lazyrouter();
+
+ if (Array.isArray(name)) {
+ for (var i = 0; i < name.length; i++) {
+ this.param(name[i], fn);
+ }
+
+ return this;
+ }
+
+ this._router.param(name, fn);
+
+ return this;
+};
+
+/**
+ * Assign `setting` to `val`, or return `setting`'s value.
+ *
+ * app.set('foo', 'bar');
+ * app.get('foo');
+ * // => "bar"
+ *
+ * Mounted servers inherit their parent server's settings.
+ *
+ * @param {String} setting
+ * @param {*} [val]
+ * @return {Server} for chaining
+ * @public
+ */
+
+app.set = function set(setting, val) {
+ if (arguments.length === 1) {
+ // app.get(setting)
+ return this.settings[setting];
+ }
+
+ debug('set "%s" to %o', setting, val);
+
+ // set value
+ this.settings[setting] = val;
+
+ // trigger matched settings
+ switch (setting) {
+ case 'etag':
+ this.set('etag fn', compileETag(val));
+ break;
+ case 'query parser':
+ this.set('query parser fn', compileQueryParser(val));
+ break;
+ case 'trust proxy':
+ this.set('trust proxy fn', compileTrust(val));
+
+ // trust proxy inherit back-compat
+ Object.defineProperty(this.settings, trustProxyDefaultSymbol, {
+ configurable: true,
+ value: false
+ });
+
+ break;
+ }
+
+ return this;
+};
+
+/**
+ * Return the app's absolute pathname
+ * based on the parent(s) that have
+ * mounted it.
+ *
+ * For example if the application was
+ * mounted as "/admin", which itself
+ * was mounted as "/blog" then the
+ * return value would be "/blog/admin".
+ *
+ * @return {String}
+ * @private
+ */
+
+app.path = function path() {
+ return this.parent
+ ? this.parent.path() + this.mountpath
+ : '';
+};
+
+/**
+ * Check if `setting` is enabled (truthy).
+ *
+ * app.enabled('foo')
+ * // => false
+ *
+ * app.enable('foo')
+ * app.enabled('foo')
+ * // => true
+ *
+ * @param {String} setting
+ * @return {Boolean}
+ * @public
+ */
+
+app.enabled = function enabled(setting) {
+ return Boolean(this.set(setting));
+};
+
+/**
+ * Check if `setting` is disabled.
+ *
+ * app.disabled('foo')
+ * // => true
+ *
+ * app.enable('foo')
+ * app.disabled('foo')
+ * // => false
+ *
+ * @param {String} setting
+ * @return {Boolean}
+ * @public
+ */
+
+app.disabled = function disabled(setting) {
+ return !this.set(setting);
+};
+
+/**
+ * Enable `setting`.
+ *
+ * @param {String} setting
+ * @return {app} for chaining
+ * @public
+ */
+
+app.enable = function enable(setting) {
+ return this.set(setting, true);
+};
+
+/**
+ * Disable `setting`.
+ *
+ * @param {String} setting
+ * @return {app} for chaining
+ * @public
+ */
+
+app.disable = function disable(setting) {
+ return this.set(setting, false);
+};
+
+/**
+ * Delegate `.VERB(...)` calls to `router.VERB(...)`.
+ */
+
+methods.forEach(function(method){
+ app[method] = function(path){
+ if (method === 'get' && arguments.length === 1) {
+ // app.get(setting)
+ return this.set(path);
+ }
+
+ this.lazyrouter();
+
+ var route = this._router.route(path);
+ route[method].apply(route, slice.call(arguments, 1));
+ return this;
+ };
+});
+
+/**
+ * Special-cased "all" method, applying the given route `path`,
+ * middleware, and callback to _every_ HTTP method.
+ *
+ * @param {String} path
+ * @param {Function} ...
+ * @return {app} for chaining
+ * @public
+ */
+
+app.all = function all(path) {
+ this.lazyrouter();
+
+ var route = this._router.route(path);
+ var args = slice.call(arguments, 1);
+
+ for (var i = 0; i < methods.length; i++) {
+ route[methods[i]].apply(route, args);
+ }
+
+ return this;
+};
+
+// del -> delete alias
+
+app.del = deprecate.function(app.delete, 'app.del: Use app.delete instead');
+
+/**
+ * Render the given view `name` name with `options`
+ * and a callback accepting an error and the
+ * rendered template string.
+ *
+ * Example:
+ *
+ * app.render('email', { name: 'Tobi' }, function(err, html){
+ * // ...
+ * })
+ *
+ * @param {String} name
+ * @param {Object|Function} options or fn
+ * @param {Function} callback
+ * @public
+ */
+
+app.render = function render(name, options, callback) {
+ var cache = this.cache;
+ var done = callback;
+ var engines = this.engines;
+ var opts = options;
+ var renderOptions = {};
+ var view;
+
+ // support callback function as second arg
+ if (typeof options === 'function') {
+ done = options;
+ opts = {};
+ }
+
+ // merge app.locals
+ merge(renderOptions, this.locals);
+
+ // merge options._locals
+ if (opts._locals) {
+ merge(renderOptions, opts._locals);
+ }
+
+ // merge options
+ merge(renderOptions, opts);
+
+ // set .cache unless explicitly provided
+ if (renderOptions.cache == null) {
+ renderOptions.cache = this.enabled('view cache');
+ }
+
+ // primed cache
+ if (renderOptions.cache) {
+ view = cache[name];
+ }
+
+ // view
+ if (!view) {
+ var View = this.get('view');
+
+ view = new View(name, {
+ defaultEngine: this.get('view engine'),
+ root: this.get('views'),
+ engines: engines
+ });
+
+ if (!view.path) {
+ var dirs = Array.isArray(view.root) && view.root.length > 1
+ ? 'directories "' + view.root.slice(0, -1).join('", "') + '" or "' + view.root[view.root.length - 1] + '"'
+ : 'directory "' + view.root + '"'
+ var err = new Error('Failed to lookup view "' + name + '" in views ' + dirs);
+ err.view = view;
+ return done(err);
+ }
+
+ // prime the cache
+ if (renderOptions.cache) {
+ cache[name] = view;
+ }
+ }
+
+ // render
+ tryRender(view, renderOptions, done);
+};
+
+/**
+ * Listen for connections.
+ *
+ * A node `http.Server` is returned, with this
+ * application (which is a `Function`) as its
+ * callback. If you wish to create both an HTTP
+ * and HTTPS server you may do so with the "http"
+ * and "https" modules as shown here:
+ *
+ * var http = require('http')
+ * , https = require('https')
+ * , express = require('express')
+ * , app = express();
+ *
+ * http.createServer(app).listen(80);
+ * https.createServer({ ... }, app).listen(443);
+ *
+ * @return {http.Server}
+ * @public
+ */
+
+app.listen = function listen() {
+ var server = http.createServer(this);
+ return server.listen.apply(server, arguments);
+};
+
+/**
+ * Log error using console.error.
+ *
+ * @param {Error} err
+ * @private
+ */
+
+function logerror(err) {
+ /* istanbul ignore next */
+ if (this.get('env') !== 'test') console.error(err.stack || err.toString());
+}
+
+/**
+ * Try rendering a view.
+ * @private
+ */
+
+function tryRender(view, options, callback) {
+ try {
+ view.render(options, callback);
+ } catch (err) {
+ callback(err);
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/express.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/express.js
new file mode 100644
index 0000000..540c8be
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/express.js
@@ -0,0 +1,103 @@
+/*!
+ * express
+ * Copyright(c) 2009-2013 TJ Holowaychuk
+ * Copyright(c) 2013 Roman Shtylman
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module dependencies.
+ */
+
+var EventEmitter = require('events').EventEmitter;
+var mixin = require('merge-descriptors');
+var proto = require('./application');
+var Route = require('./router/route');
+var Router = require('./router');
+var req = require('./request');
+var res = require('./response');
+
+/**
+ * Expose `createApplication()`.
+ */
+
+exports = module.exports = createApplication;
+
+/**
+ * Create an express application.
+ *
+ * @return {Function}
+ * @api public
+ */
+
+function createApplication() {
+ var app = function(req, res, next) {
+ app.handle(req, res, next);
+ };
+
+ mixin(app, EventEmitter.prototype, false);
+ mixin(app, proto, false);
+
+ app.request = { __proto__: req, app: app };
+ app.response = { __proto__: res, app: app };
+ app.init();
+ return app;
+}
+
+/**
+ * Expose the prototypes.
+ */
+
+exports.application = proto;
+exports.request = req;
+exports.response = res;
+
+/**
+ * Expose constructors.
+ */
+
+exports.Route = Route;
+exports.Router = Router;
+
+/**
+ * Expose middleware
+ */
+
+exports.query = require('./middleware/query');
+exports.static = require('serve-static');
+
+/**
+ * Replace removed middleware with an appropriate error message.
+ */
+
+[
+ 'json',
+ 'urlencoded',
+ 'bodyParser',
+ 'compress',
+ 'cookieSession',
+ 'session',
+ 'logger',
+ 'cookieParser',
+ 'favicon',
+ 'responseTime',
+ 'errorHandler',
+ 'timeout',
+ 'methodOverride',
+ 'vhost',
+ 'csrf',
+ 'directory',
+ 'limit',
+ 'multipart',
+ 'staticCache',
+].forEach(function (name) {
+ Object.defineProperty(exports, name, {
+ get: function () {
+ throw new Error('Most middleware (like ' + name + ') is no longer bundled with Express and must be installed separately. Please see https://github.com/senchalabs/connect#middleware.');
+ },
+ configurable: true
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/middleware/init.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/middleware/init.js
new file mode 100644
index 0000000..f3119ed
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/middleware/init.js
@@ -0,0 +1,36 @@
+/*!
+ * express
+ * Copyright(c) 2009-2013 TJ Holowaychuk
+ * Copyright(c) 2013 Roman Shtylman
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Initialization middleware, exposing the
+ * request and response to each other, as well
+ * as defaulting the X-Powered-By header field.
+ *
+ * @param {Function} app
+ * @return {Function}
+ * @api private
+ */
+
+exports.init = function(app){
+ return function expressInit(req, res, next){
+ if (app.enabled('x-powered-by')) res.setHeader('X-Powered-By', 'Express');
+ req.res = res;
+ res.req = req;
+ req.next = next;
+
+ req.__proto__ = app.request;
+ res.__proto__ = app.response;
+
+ res.locals = res.locals || Object.create(null);
+
+ next();
+ };
+};
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/middleware/query.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/middleware/query.js
new file mode 100644
index 0000000..5f76f84
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/middleware/query.js
@@ -0,0 +1,46 @@
+/*!
+ * express
+ * Copyright(c) 2009-2013 TJ Holowaychuk
+ * Copyright(c) 2013 Roman Shtylman
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module dependencies.
+ */
+
+var parseUrl = require('parseurl');
+var qs = require('qs');
+
+/**
+ * @param {Object} options
+ * @return {Function}
+ * @api public
+ */
+
+module.exports = function query(options) {
+ var opts = Object.create(options || null);
+ var queryparse = qs.parse;
+
+ if (typeof options === 'function') {
+ queryparse = options;
+ opts = undefined;
+ }
+
+ if (opts !== undefined && opts.allowPrototypes === undefined) {
+ // back-compat for qs module
+ opts.allowPrototypes = true;
+ }
+
+ return function query(req, res, next){
+ if (!req.query) {
+ var val = parseUrl(req).query;
+ req.query = queryparse(val, opts);
+ }
+
+ next();
+ };
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/request.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/request.js
new file mode 100644
index 0000000..557d050
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/request.js
@@ -0,0 +1,502 @@
+/*!
+ * express
+ * Copyright(c) 2009-2013 TJ Holowaychuk
+ * Copyright(c) 2013 Roman Shtylman
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var accepts = require('accepts');
+var deprecate = require('depd')('express');
+var isIP = require('net').isIP;
+var typeis = require('type-is');
+var http = require('http');
+var fresh = require('fresh');
+var parseRange = require('range-parser');
+var parse = require('parseurl');
+var proxyaddr = require('proxy-addr');
+
+/**
+ * Request prototype.
+ */
+
+var req = exports = module.exports = {
+ __proto__: http.IncomingMessage.prototype
+};
+
+/**
+ * Return request header.
+ *
+ * The `Referrer` header field is special-cased,
+ * both `Referrer` and `Referer` are interchangeable.
+ *
+ * Examples:
+ *
+ * req.get('Content-Type');
+ * // => "text/plain"
+ *
+ * req.get('content-type');
+ * // => "text/plain"
+ *
+ * req.get('Something');
+ * // => undefined
+ *
+ * Aliased as `req.header()`.
+ *
+ * @param {String} name
+ * @return {String}
+ * @public
+ */
+
+req.get =
+req.header = function header(name) {
+ if (!name) {
+ throw new TypeError('name argument is required to req.get');
+ }
+
+ if (typeof name !== 'string') {
+ throw new TypeError('name must be a string to req.get');
+ }
+
+ var lc = name.toLowerCase();
+
+ switch (lc) {
+ case 'referer':
+ case 'referrer':
+ return this.headers.referrer
+ || this.headers.referer;
+ default:
+ return this.headers[lc];
+ }
+};
+
+/**
+ * To do: update docs.
+ *
+ * Check if the given `type(s)` is acceptable, returning
+ * the best match when true, otherwise `undefined`, in which
+ * case you should respond with 406 "Not Acceptable".
+ *
+ * The `type` value may be a single MIME type string
+ * such as "application/json", an extension name
+ * such as "json", a comma-delimited list such as "json, html, text/plain",
+ * an argument list such as `"json", "html", "text/plain"`,
+ * or an array `["json", "html", "text/plain"]`. When a list
+ * or array is given, the _best_ match, if any is returned.
+ *
+ * Examples:
+ *
+ * // Accept: text/html
+ * req.accepts('html');
+ * // => "html"
+ *
+ * // Accept: text/*, application/json
+ * req.accepts('html');
+ * // => "html"
+ * req.accepts('text/html');
+ * // => "text/html"
+ * req.accepts('json, text');
+ * // => "json"
+ * req.accepts('application/json');
+ * // => "application/json"
+ *
+ * // Accept: text/*, application/json
+ * req.accepts('image/png');
+ * req.accepts('png');
+ * // => undefined
+ *
+ * // Accept: text/*;q=.5, application/json
+ * req.accepts(['html', 'json']);
+ * req.accepts('html', 'json');
+ * req.accepts('html, json');
+ * // => "json"
+ *
+ * @param {String|Array} type(s)
+ * @return {String|Array|Boolean}
+ * @public
+ */
+
+req.accepts = function(){
+ var accept = accepts(this);
+ return accept.types.apply(accept, arguments);
+};
+
+/**
+ * Check if the given `encoding`s are accepted.
+ *
+ * @param {String} ...encoding
+ * @return {String|Array}
+ * @public
+ */
+
+req.acceptsEncodings = function(){
+ var accept = accepts(this);
+ return accept.encodings.apply(accept, arguments);
+};
+
+req.acceptsEncoding = deprecate.function(req.acceptsEncodings,
+ 'req.acceptsEncoding: Use acceptsEncodings instead');
+
+/**
+ * Check if the given `charset`s are acceptable,
+ * otherwise you should respond with 406 "Not Acceptable".
+ *
+ * @param {String} ...charset
+ * @return {String|Array}
+ * @public
+ */
+
+req.acceptsCharsets = function(){
+ var accept = accepts(this);
+ return accept.charsets.apply(accept, arguments);
+};
+
+req.acceptsCharset = deprecate.function(req.acceptsCharsets,
+ 'req.acceptsCharset: Use acceptsCharsets instead');
+
+/**
+ * Check if the given `lang`s are acceptable,
+ * otherwise you should respond with 406 "Not Acceptable".
+ *
+ * @param {String} ...lang
+ * @return {String|Array}
+ * @public
+ */
+
+req.acceptsLanguages = function(){
+ var accept = accepts(this);
+ return accept.languages.apply(accept, arguments);
+};
+
+req.acceptsLanguage = deprecate.function(req.acceptsLanguages,
+ 'req.acceptsLanguage: Use acceptsLanguages instead');
+
+/**
+ * Parse Range header field, capping to the given `size`.
+ *
+ * Unspecified ranges such as "0-" require knowledge of your resource length. In
+ * the case of a byte range this is of course the total number of bytes. If the
+ * Range header field is not given `undefined` is returned, `-1` when unsatisfiable,
+ * and `-2` when syntactically invalid.
+ *
+ * When ranges are returned, the array has a "type" property which is the type of
+ * range that is required (most commonly, "bytes"). Each array element is an object
+ * with a "start" and "end" property for the portion of the range.
+ *
+ * The "combine" option can be set to `true` and overlapping & adjacent ranges
+ * will be combined into a single range.
+ *
+ * NOTE: remember that ranges are inclusive, so for example "Range: users=0-3"
+ * should respond with 4 users when available, not 3.
+ *
+ * @param {number} size
+ * @param {object} [options]
+ * @param {boolean} [options.combine=false]
+ * @return {number|array}
+ * @public
+ */
+
+req.range = function range(size, options) {
+ var range = this.get('Range');
+ if (!range) return;
+ return parseRange(size, range, options);
+};
+
+/**
+ * Return the value of param `name` when present or `defaultValue`.
+ *
+ * - Checks route placeholders, ex: _/user/:id_
+ * - Checks body params, ex: id=12, {"id":12}
+ * - Checks query string params, ex: ?id=12
+ *
+ * To utilize request bodies, `req.body`
+ * should be an object. This can be done by using
+ * the `bodyParser()` middleware.
+ *
+ * @param {String} name
+ * @param {Mixed} [defaultValue]
+ * @return {String}
+ * @public
+ */
+
+req.param = function param(name, defaultValue) {
+ var params = this.params || {};
+ var body = this.body || {};
+ var query = this.query || {};
+
+ var args = arguments.length === 1
+ ? 'name'
+ : 'name, default';
+ deprecate('req.param(' + args + '): Use req.params, req.body, or req.query instead');
+
+ if (null != params[name] && params.hasOwnProperty(name)) return params[name];
+ if (null != body[name]) return body[name];
+ if (null != query[name]) return query[name];
+
+ return defaultValue;
+};
+
+/**
+ * Check if the incoming request contains the "Content-Type"
+ * header field, and it contains the give mime `type`.
+ *
+ * Examples:
+ *
+ * // With Content-Type: text/html; charset=utf-8
+ * req.is('html');
+ * req.is('text/html');
+ * req.is('text/*');
+ * // => true
+ *
+ * // When Content-Type is application/json
+ * req.is('json');
+ * req.is('application/json');
+ * req.is('application/*');
+ * // => true
+ *
+ * req.is('html');
+ * // => false
+ *
+ * @param {String|Array} types...
+ * @return {String|false|null}
+ * @public
+ */
+
+req.is = function is(types) {
+ var arr = types;
+
+ // support flattened arguments
+ if (!Array.isArray(types)) {
+ arr = new Array(arguments.length);
+ for (var i = 0; i < arr.length; i++) {
+ arr[i] = arguments[i];
+ }
+ }
+
+ return typeis(this, arr);
+};
+
+/**
+ * Return the protocol string "http" or "https"
+ * when requested with TLS. When the "trust proxy"
+ * setting trusts the socket address, the
+ * "X-Forwarded-Proto" header field will be trusted
+ * and used if present.
+ *
+ * If you're running behind a reverse proxy that
+ * supplies https for you this may be enabled.
+ *
+ * @return {String}
+ * @public
+ */
+
+defineGetter(req, 'protocol', function protocol(){
+ var proto = this.connection.encrypted
+ ? 'https'
+ : 'http';
+ var trust = this.app.get('trust proxy fn');
+
+ if (!trust(this.connection.remoteAddress, 0)) {
+ return proto;
+ }
+
+ // Note: X-Forwarded-Proto is normally only ever a
+ // single value, but this is to be safe.
+ proto = this.get('X-Forwarded-Proto') || proto;
+ return proto.split(/\s*,\s*/)[0];
+});
+
+/**
+ * Short-hand for:
+ *
+ * req.protocol === 'https'
+ *
+ * @return {Boolean}
+ * @public
+ */
+
+defineGetter(req, 'secure', function secure(){
+ return this.protocol === 'https';
+});
+
+/**
+ * Return the remote address from the trusted proxy.
+ *
+ * The is the remote address on the socket unless
+ * "trust proxy" is set.
+ *
+ * @return {String}
+ * @public
+ */
+
+defineGetter(req, 'ip', function ip(){
+ var trust = this.app.get('trust proxy fn');
+ return proxyaddr(this, trust);
+});
+
+/**
+ * When "trust proxy" is set, trusted proxy addresses + client.
+ *
+ * For example if the value were "client, proxy1, proxy2"
+ * you would receive the array `["client", "proxy1", "proxy2"]`
+ * where "proxy2" is the furthest down-stream and "proxy1" and
+ * "proxy2" were trusted.
+ *
+ * @return {Array}
+ * @public
+ */
+
+defineGetter(req, 'ips', function ips() {
+ var trust = this.app.get('trust proxy fn');
+ var addrs = proxyaddr.all(this, trust);
+ return addrs.slice(1).reverse();
+});
+
+/**
+ * Return subdomains as an array.
+ *
+ * Subdomains are the dot-separated parts of the host before the main domain of
+ * the app. By default, the domain of the app is assumed to be the last two
+ * parts of the host. This can be changed by setting "subdomain offset".
+ *
+ * For example, if the domain is "tobi.ferrets.example.com":
+ * If "subdomain offset" is not set, req.subdomains is `["ferrets", "tobi"]`.
+ * If "subdomain offset" is 3, req.subdomains is `["tobi"]`.
+ *
+ * @return {Array}
+ * @public
+ */
+
+defineGetter(req, 'subdomains', function subdomains() {
+ var hostname = this.hostname;
+
+ if (!hostname) return [];
+
+ var offset = this.app.get('subdomain offset');
+ var subdomains = !isIP(hostname)
+ ? hostname.split('.').reverse()
+ : [hostname];
+
+ return subdomains.slice(offset);
+});
+
+/**
+ * Short-hand for `url.parse(req.url).pathname`.
+ *
+ * @return {String}
+ * @public
+ */
+
+defineGetter(req, 'path', function path() {
+ return parse(this).pathname;
+});
+
+/**
+ * Parse the "Host" header field to a hostname.
+ *
+ * When the "trust proxy" setting trusts the socket
+ * address, the "X-Forwarded-Host" header field will
+ * be trusted.
+ *
+ * @return {String}
+ * @public
+ */
+
+defineGetter(req, 'hostname', function hostname(){
+ var trust = this.app.get('trust proxy fn');
+ var host = this.get('X-Forwarded-Host');
+
+ if (!host || !trust(this.connection.remoteAddress, 0)) {
+ host = this.get('Host');
+ }
+
+ if (!host) return;
+
+ // IPv6 literal support
+ var offset = host[0] === '['
+ ? host.indexOf(']') + 1
+ : 0;
+ var index = host.indexOf(':', offset);
+
+ return index !== -1
+ ? host.substring(0, index)
+ : host;
+});
+
+// TODO: change req.host to return host in next major
+
+defineGetter(req, 'host', deprecate.function(function host(){
+ return this.hostname;
+}, 'req.host: Use req.hostname instead'));
+
+/**
+ * Check if the request is fresh, aka
+ * Last-Modified and/or the ETag
+ * still match.
+ *
+ * @return {Boolean}
+ * @public
+ */
+
+defineGetter(req, 'fresh', function(){
+ var method = this.method;
+ var s = this.res.statusCode;
+
+ // GET or HEAD for weak freshness validation only
+ if ('GET' !== method && 'HEAD' !== method) return false;
+
+ // 2xx or 304 as per rfc2616 14.26
+ if ((s >= 200 && s < 300) || 304 === s) {
+ return fresh(this.headers, (this.res._headers || {}));
+ }
+
+ return false;
+});
+
+/**
+ * Check if the request is stale, aka
+ * "Last-Modified" and / or the "ETag" for the
+ * resource has changed.
+ *
+ * @return {Boolean}
+ * @public
+ */
+
+defineGetter(req, 'stale', function stale(){
+ return !this.fresh;
+});
+
+/**
+ * Check if the request was an _XMLHttpRequest_.
+ *
+ * @return {Boolean}
+ * @public
+ */
+
+defineGetter(req, 'xhr', function xhr(){
+ var val = this.get('X-Requested-With') || '';
+ return val.toLowerCase() === 'xmlhttprequest';
+});
+
+/**
+ * Helper function for creating a getter on an object.
+ *
+ * @param {Object} obj
+ * @param {String} name
+ * @param {Function} getter
+ * @private
+ */
+function defineGetter(obj, name, getter) {
+ Object.defineProperty(obj, name, {
+ configurable: true,
+ enumerable: true,
+ get: getter
+ });
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/response.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/response.js
new file mode 100644
index 0000000..6128f45
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/response.js
@@ -0,0 +1,1065 @@
+/*!
+ * express
+ * Copyright(c) 2009-2013 TJ Holowaychuk
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var contentDisposition = require('content-disposition');
+var deprecate = require('depd')('express');
+var encodeUrl = require('encodeurl');
+var escapeHtml = require('escape-html');
+var http = require('http');
+var isAbsolute = require('./utils').isAbsolute;
+var onFinished = require('on-finished');
+var path = require('path');
+var merge = require('utils-merge');
+var sign = require('cookie-signature').sign;
+var normalizeType = require('./utils').normalizeType;
+var normalizeTypes = require('./utils').normalizeTypes;
+var setCharset = require('./utils').setCharset;
+var statusCodes = http.STATUS_CODES;
+var cookie = require('cookie');
+var send = require('send');
+var extname = path.extname;
+var mime = send.mime;
+var resolve = path.resolve;
+var vary = require('vary');
+
+/**
+ * Response prototype.
+ */
+
+var res = module.exports = {
+ __proto__: http.ServerResponse.prototype
+};
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var charsetRegExp = /;\s*charset\s*=/;
+
+/**
+ * Set status `code`.
+ *
+ * @param {Number} code
+ * @return {ServerResponse}
+ * @public
+ */
+
+res.status = function status(code) {
+ this.statusCode = code;
+ return this;
+};
+
+/**
+ * Set Link header field with the given `links`.
+ *
+ * Examples:
+ *
+ * res.links({
+ * next: 'http://api.example.com/users?page=2',
+ * last: 'http://api.example.com/users?page=5'
+ * });
+ *
+ * @param {Object} links
+ * @return {ServerResponse}
+ * @public
+ */
+
+res.links = function(links){
+ var link = this.get('Link') || '';
+ if (link) link += ', ';
+ return this.set('Link', link + Object.keys(links).map(function(rel){
+ return '<' + links[rel] + '>; rel="' + rel + '"';
+ }).join(', '));
+};
+
+/**
+ * Send a response.
+ *
+ * Examples:
+ *
+ * res.send(new Buffer('wahoo'));
+ * res.send({ some: 'json' });
+ * res.send('<p>some html</p>');
+ *
+ * @param {string|number|boolean|object|Buffer} body
+ * @public
+ */
+
+res.send = function send(body) {
+ var chunk = body;
+ var encoding;
+ var len;
+ var req = this.req;
+ var type;
+
+ // settings
+ var app = this.app;
+
+ // allow status / body
+ if (arguments.length === 2) {
+ // res.send(body, status) backwards compat
+ if (typeof arguments[0] !== 'number' && typeof arguments[1] === 'number') {
+ deprecate('res.send(body, status): Use res.status(status).send(body) instead');
+ this.statusCode = arguments[1];
+ } else {
+ deprecate('res.send(status, body): Use res.status(status).send(body) instead');
+ this.statusCode = arguments[0];
+ chunk = arguments[1];
+ }
+ }
+
+ // disambiguate res.send(status) and res.send(status, num)
+ if (typeof chunk === 'number' && arguments.length === 1) {
+ // res.send(status) will set status message as text string
+ if (!this.get('Content-Type')) {
+ this.type('txt');
+ }
+
+ deprecate('res.send(status): Use res.sendStatus(status) instead');
+ this.statusCode = chunk;
+ chunk = statusCodes[chunk];
+ }
+
+ switch (typeof chunk) {
+ // string defaulting to html
+ case 'string':
+ if (!this.get('Content-Type')) {
+ this.type('html');
+ }
+ break;
+ case 'boolean':
+ case 'number':
+ case 'object':
+ if (chunk === null) {
+ chunk = '';
+ } else if (Buffer.isBuffer(chunk)) {
+ if (!this.get('Content-Type')) {
+ this.type('bin');
+ }
+ } else {
+ return this.json(chunk);
+ }
+ break;
+ }
+
+ // write strings in utf-8
+ if (typeof chunk === 'string') {
+ encoding = 'utf8';
+ type = this.get('Content-Type');
+
+ // reflect this in content-type
+ if (typeof type === 'string') {
+ this.set('Content-Type', setCharset(type, 'utf-8'));
+ }
+ }
+
+ // populate Content-Length
+ if (chunk !== undefined) {
+ if (!Buffer.isBuffer(chunk)) {
+ // convert chunk to Buffer; saves later double conversions
+ chunk = new Buffer(chunk, encoding);
+ encoding = undefined;
+ }
+
+ len = chunk.length;
+ this.set('Content-Length', len);
+ }
+
+ // populate ETag
+ var etag;
+ var generateETag = len !== undefined && app.get('etag fn');
+ if (typeof generateETag === 'function' && !this.get('ETag')) {
+ if ((etag = generateETag(chunk, encoding))) {
+ this.set('ETag', etag);
+ }
+ }
+
+ // freshness
+ if (req.fresh) this.statusCode = 304;
+
+ // strip irrelevant headers
+ if (204 === this.statusCode || 304 === this.statusCode) {
+ this.removeHeader('Content-Type');
+ this.removeHeader('Content-Length');
+ this.removeHeader('Transfer-Encoding');
+ chunk = '';
+ }
+
+ if (req.method === 'HEAD') {
+ // skip body for HEAD
+ this.end();
+ } else {
+ // respond
+ this.end(chunk, encoding);
+ }
+
+ return this;
+};
+
+/**
+ * Send JSON response.
+ *
+ * Examples:
+ *
+ * res.json(null);
+ * res.json({ user: 'tj' });
+ *
+ * @param {string|number|boolean|object} obj
+ * @public
+ */
+
+res.json = function json(obj) {
+ var val = obj;
+
+ // allow status / body
+ if (arguments.length === 2) {
+ // res.json(body, status) backwards compat
+ if (typeof arguments[1] === 'number') {
+ deprecate('res.json(obj, status): Use res.status(status).json(obj) instead');
+ this.statusCode = arguments[1];
+ } else {
+ deprecate('res.json(status, obj): Use res.status(status).json(obj) instead');
+ this.statusCode = arguments[0];
+ val = arguments[1];
+ }
+ }
+
+ // settings
+ var app = this.app;
+ var replacer = app.get('json replacer');
+ var spaces = app.get('json spaces');
+ var body = stringify(val, replacer, spaces);
+
+ // content-type
+ if (!this.get('Content-Type')) {
+ this.set('Content-Type', 'application/json');
+ }
+
+ return this.send(body);
+};
+
+/**
+ * Send JSON response with JSONP callback support.
+ *
+ * Examples:
+ *
+ * res.jsonp(null);
+ * res.jsonp({ user: 'tj' });
+ *
+ * @param {string|number|boolean|object} obj
+ * @public
+ */
+
+res.jsonp = function jsonp(obj) {
+ var val = obj;
+
+ // allow status / body
+ if (arguments.length === 2) {
+ // res.json(body, status) backwards compat
+ if (typeof arguments[1] === 'number') {
+ deprecate('res.jsonp(obj, status): Use res.status(status).json(obj) instead');
+ this.statusCode = arguments[1];
+ } else {
+ deprecate('res.jsonp(status, obj): Use res.status(status).jsonp(obj) instead');
+ this.statusCode = arguments[0];
+ val = arguments[1];
+ }
+ }
+
+ // settings
+ var app = this.app;
+ var replacer = app.get('json replacer');
+ var spaces = app.get('json spaces');
+ var body = stringify(val, replacer, spaces);
+ var callback = this.req.query[app.get('jsonp callback name')];
+
+ // content-type
+ if (!this.get('Content-Type')) {
+ this.set('X-Content-Type-Options', 'nosniff');
+ this.set('Content-Type', 'application/json');
+ }
+
+ // fixup callback
+ if (Array.isArray(callback)) {
+ callback = callback[0];
+ }
+
+ // jsonp
+ if (typeof callback === 'string' && callback.length !== 0) {
+ this.charset = 'utf-8';
+ this.set('X-Content-Type-Options', 'nosniff');
+ this.set('Content-Type', 'text/javascript');
+
+ // restrict callback charset
+ callback = callback.replace(/[^\[\]\w$.]/g, '');
+
+ // replace chars not allowed in JavaScript that are in JSON
+ body = body
+ .replace(/\u2028/g, '\\u2028')
+ .replace(/\u2029/g, '\\u2029');
+
+ // the /**/ is a specific security mitigation for "Rosetta Flash JSONP abuse"
+ // the typeof check is just to reduce client error noise
+ body = '/**/ typeof ' + callback + ' === \'function\' && ' + callback + '(' + body + ');';
+ }
+
+ return this.send(body);
+};
+
+/**
+ * Send given HTTP status code.
+ *
+ * Sets the response status to `statusCode` and the body of the
+ * response to the standard description from node's http.STATUS_CODES
+ * or the statusCode number if no description.
+ *
+ * Examples:
+ *
+ * res.sendStatus(200);
+ *
+ * @param {number} statusCode
+ * @public
+ */
+
+res.sendStatus = function sendStatus(statusCode) {
+ var body = statusCodes[statusCode] || String(statusCode);
+
+ this.statusCode = statusCode;
+ this.type('txt');
+
+ return this.send(body);
+};
+
+/**
+ * Transfer the file at the given `path`.
+ *
+ * Automatically sets the _Content-Type_ response header field.
+ * The callback `callback(err)` is invoked when the transfer is complete
+ * or when an error occurs. Be sure to check `res.sentHeader`
+ * if you wish to attempt responding, as the header and some data
+ * may have already been transferred.
+ *
+ * Options:
+ *
+ * - `maxAge` defaulting to 0 (can be string converted by `ms`)
+ * - `root` root directory for relative filenames
+ * - `headers` object of headers to serve with file
+ * - `dotfiles` serve dotfiles, defaulting to false; can be `"allow"` to send them
+ *
+ * Other options are passed along to `send`.
+ *
+ * Examples:
+ *
+ * The following example illustrates how `res.sendFile()` may
+ * be used as an alternative for the `static()` middleware for
+ * dynamic situations. The code backing `res.sendFile()` is actually
+ * the same code, so HTTP cache support etc is identical.
+ *
+ * app.get('/user/:uid/photos/:file', function(req, res){
+ * var uid = req.params.uid
+ * , file = req.params.file;
+ *
+ * req.user.mayViewFilesFrom(uid, function(yes){
+ * if (yes) {
+ * res.sendFile('/uploads/' + uid + '/' + file);
+ * } else {
+ * res.send(403, 'Sorry! you cant see that.');
+ * }
+ * });
+ * });
+ *
+ * @public
+ */
+
+res.sendFile = function sendFile(path, options, callback) {
+ var done = callback;
+ var req = this.req;
+ var res = this;
+ var next = req.next;
+ var opts = options || {};
+
+ if (!path) {
+ throw new TypeError('path argument is required to res.sendFile');
+ }
+
+ // support function as second arg
+ if (typeof options === 'function') {
+ done = options;
+ opts = {};
+ }
+
+ if (!opts.root && !isAbsolute(path)) {
+ throw new TypeError('path must be absolute or specify root to res.sendFile');
+ }
+
+ // create file stream
+ var pathname = encodeURI(path);
+ var file = send(req, pathname, opts);
+
+ // transfer
+ sendfile(res, file, opts, function (err) {
+ if (done) return done(err);
+ if (err && err.code === 'EISDIR') return next();
+
+ // next() all but write errors
+ if (err && err.code !== 'ECONNABORTED' && err.syscall !== 'write') {
+ next(err);
+ }
+ });
+};
+
+/**
+ * Transfer the file at the given `path`.
+ *
+ * Automatically sets the _Content-Type_ response header field.
+ * The callback `callback(err)` is invoked when the transfer is complete
+ * or when an error occurs. Be sure to check `res.sentHeader`
+ * if you wish to attempt responding, as the header and some data
+ * may have already been transferred.
+ *
+ * Options:
+ *
+ * - `maxAge` defaulting to 0 (can be string converted by `ms`)
+ * - `root` root directory for relative filenames
+ * - `headers` object of headers to serve with file
+ * - `dotfiles` serve dotfiles, defaulting to false; can be `"allow"` to send them
+ *
+ * Other options are passed along to `send`.
+ *
+ * Examples:
+ *
+ * The following example illustrates how `res.sendfile()` may
+ * be used as an alternative for the `static()` middleware for
+ * dynamic situations. The code backing `res.sendfile()` is actually
+ * the same code, so HTTP cache support etc is identical.
+ *
+ * app.get('/user/:uid/photos/:file', function(req, res){
+ * var uid = req.params.uid
+ * , file = req.params.file;
+ *
+ * req.user.mayViewFilesFrom(uid, function(yes){
+ * if (yes) {
+ * res.sendfile('/uploads/' + uid + '/' + file);
+ * } else {
+ * res.send(403, 'Sorry! you cant see that.');
+ * }
+ * });
+ * });
+ *
+ * @public
+ */
+
+res.sendfile = function (path, options, callback) {
+ var done = callback;
+ var req = this.req;
+ var res = this;
+ var next = req.next;
+ var opts = options || {};
+
+ // support function as second arg
+ if (typeof options === 'function') {
+ done = options;
+ opts = {};
+ }
+
+ // create file stream
+ var file = send(req, path, opts);
+
+ // transfer
+ sendfile(res, file, opts, function (err) {
+ if (done) return done(err);
+ if (err && err.code === 'EISDIR') return next();
+
+ // next() all but write errors
+ if (err && err.code !== 'ECONNABORT' && err.syscall !== 'write') {
+ next(err);
+ }
+ });
+};
+
+res.sendfile = deprecate.function(res.sendfile,
+ 'res.sendfile: Use res.sendFile instead');
+
+/**
+ * Transfer the file at the given `path` as an attachment.
+ *
+ * Optionally providing an alternate attachment `filename`,
+ * and optional callback `callback(err)`. The callback is invoked
+ * when the data transfer is complete, or when an error has
+ * ocurred. Be sure to check `res.headersSent` if you plan to respond.
+ *
+ * This method uses `res.sendfile()`.
+ *
+ * @public
+ */
+
+res.download = function download(path, filename, callback) {
+ var done = callback;
+ var name = filename;
+
+ // support function as second arg
+ if (typeof filename === 'function') {
+ done = filename;
+ name = null;
+ }
+
+ // set Content-Disposition when file is sent
+ var headers = {
+ 'Content-Disposition': contentDisposition(name || path)
+ };
+
+ // Resolve the full path for sendFile
+ var fullPath = resolve(path);
+
+ return this.sendFile(fullPath, { headers: headers }, done);
+};
+
+/**
+ * Set _Content-Type_ response header with `type` through `mime.lookup()`
+ * when it does not contain "/", or set the Content-Type to `type` otherwise.
+ *
+ * Examples:
+ *
+ * res.type('.html');
+ * res.type('html');
+ * res.type('json');
+ * res.type('application/json');
+ * res.type('png');
+ *
+ * @param {String} type
+ * @return {ServerResponse} for chaining
+ * @public
+ */
+
+res.contentType =
+res.type = function contentType(type) {
+ var ct = type.indexOf('/') === -1
+ ? mime.lookup(type)
+ : type;
+
+ return this.set('Content-Type', ct);
+};
+
+/**
+ * Respond to the Acceptable formats using an `obj`
+ * of mime-type callbacks.
+ *
+ * This method uses `req.accepted`, an array of
+ * acceptable types ordered by their quality values.
+ * When "Accept" is not present the _first_ callback
+ * is invoked, otherwise the first match is used. When
+ * no match is performed the server responds with
+ * 406 "Not Acceptable".
+ *
+ * Content-Type is set for you, however if you choose
+ * you may alter this within the callback using `res.type()`
+ * or `res.set('Content-Type', ...)`.
+ *
+ * res.format({
+ * 'text/plain': function(){
+ * res.send('hey');
+ * },
+ *
+ * 'text/html': function(){
+ * res.send('<p>hey</p>');
+ * },
+ *
+ * 'appliation/json': function(){
+ * res.send({ message: 'hey' });
+ * }
+ * });
+ *
+ * In addition to canonicalized MIME types you may
+ * also use extnames mapped to these types:
+ *
+ * res.format({
+ * text: function(){
+ * res.send('hey');
+ * },
+ *
+ * html: function(){
+ * res.send('<p>hey</p>');
+ * },
+ *
+ * json: function(){
+ * res.send({ message: 'hey' });
+ * }
+ * });
+ *
+ * By default Express passes an `Error`
+ * with a `.status` of 406 to `next(err)`
+ * if a match is not made. If you provide
+ * a `.default` callback it will be invoked
+ * instead.
+ *
+ * @param {Object} obj
+ * @return {ServerResponse} for chaining
+ * @public
+ */
+
+res.format = function(obj){
+ var req = this.req;
+ var next = req.next;
+
+ var fn = obj.default;
+ if (fn) delete obj.default;
+ var keys = Object.keys(obj);
+
+ var key = keys.length > 0
+ ? req.accepts(keys)
+ : false;
+
+ this.vary("Accept");
+
+ if (key) {
+ this.set('Content-Type', normalizeType(key).value);
+ obj[key](req, this, next);
+ } else if (fn) {
+ fn();
+ } else {
+ var err = new Error('Not Acceptable');
+ err.status = err.statusCode = 406;
+ err.types = normalizeTypes(keys).map(function(o){ return o.value });
+ next(err);
+ }
+
+ return this;
+};
+
+/**
+ * Set _Content-Disposition_ header to _attachment_ with optional `filename`.
+ *
+ * @param {String} filename
+ * @return {ServerResponse}
+ * @public
+ */
+
+res.attachment = function attachment(filename) {
+ if (filename) {
+ this.type(extname(filename));
+ }
+
+ this.set('Content-Disposition', contentDisposition(filename));
+
+ return this;
+};
+
+/**
+ * Append additional header `field` with value `val`.
+ *
+ * Example:
+ *
+ * res.append('Link', ['<http://localhost/>', '<http://localhost:3000/>']);
+ * res.append('Set-Cookie', 'foo=bar; Path=/; HttpOnly');
+ * res.append('Warning', '199 Miscellaneous warning');
+ *
+ * @param {String} field
+ * @param {String|Array} val
+ * @return {ServerResponse} for chaining
+ * @public
+ */
+
+res.append = function append(field, val) {
+ var prev = this.get(field);
+ var value = val;
+
+ if (prev) {
+ // concat the new and prev vals
+ value = Array.isArray(prev) ? prev.concat(val)
+ : Array.isArray(val) ? [prev].concat(val)
+ : [prev, val];
+ }
+
+ return this.set(field, value);
+};
+
+/**
+ * Set header `field` to `val`, or pass
+ * an object of header fields.
+ *
+ * Examples:
+ *
+ * res.set('Foo', ['bar', 'baz']);
+ * res.set('Accept', 'application/json');
+ * res.set({ Accept: 'text/plain', 'X-API-Key': 'tobi' });
+ *
+ * Aliased as `res.header()`.
+ *
+ * @param {String|Object} field
+ * @param {String|Array} val
+ * @return {ServerResponse} for chaining
+ * @public
+ */
+
+res.set =
+res.header = function header(field, val) {
+ if (arguments.length === 2) {
+ var value = Array.isArray(val)
+ ? val.map(String)
+ : String(val);
+
+ // add charset to content-type
+ if (field.toLowerCase() === 'content-type' && !charsetRegExp.test(value)) {
+ var charset = mime.charsets.lookup(value.split(';')[0]);
+ if (charset) value += '; charset=' + charset.toLowerCase();
+ }
+
+ this.setHeader(field, value);
+ } else {
+ for (var key in field) {
+ this.set(key, field[key]);
+ }
+ }
+ return this;
+};
+
+/**
+ * Get value for header `field`.
+ *
+ * @param {String} field
+ * @return {String}
+ * @public
+ */
+
+res.get = function(field){
+ return this.getHeader(field);
+};
+
+/**
+ * Clear cookie `name`.
+ *
+ * @param {String} name
+ * @param {Object} [options]
+ * @return {ServerResponse} for chaining
+ * @public
+ */
+
+res.clearCookie = function clearCookie(name, options) {
+ var opts = merge({ expires: new Date(1), path: '/' }, options);
+
+ return this.cookie(name, '', opts);
+};
+
+/**
+ * Set cookie `name` to `value`, with the given `options`.
+ *
+ * Options:
+ *
+ * - `maxAge` max-age in milliseconds, converted to `expires`
+ * - `signed` sign the cookie
+ * - `path` defaults to "/"
+ *
+ * Examples:
+ *
+ * // "Remember Me" for 15 minutes
+ * res.cookie('rememberme', '1', { expires: new Date(Date.now() + 900000), httpOnly: true });
+ *
+ * // save as above
+ * res.cookie('rememberme', '1', { maxAge: 900000, httpOnly: true })
+ *
+ * @param {String} name
+ * @param {String|Object} value
+ * @param {Options} options
+ * @return {ServerResponse} for chaining
+ * @public
+ */
+
+res.cookie = function (name, value, options) {
+ var opts = merge({}, options);
+ var secret = this.req.secret;
+ var signed = opts.signed;
+
+ if (signed && !secret) {
+ throw new Error('cookieParser("secret") required for signed cookies');
+ }
+
+ var val = typeof value === 'object'
+ ? 'j:' + JSON.stringify(value)
+ : String(value);
+
+ if (signed) {
+ val = 's:' + sign(val, secret);
+ }
+
+ if ('maxAge' in opts) {
+ opts.expires = new Date(Date.now() + opts.maxAge);
+ opts.maxAge /= 1000;
+ }
+
+ if (opts.path == null) {
+ opts.path = '/';
+ }
+
+ this.append('Set-Cookie', cookie.serialize(name, String(val), opts));
+
+ return this;
+};
+
+/**
+ * Set the location header to `url`.
+ *
+ * The given `url` can also be "back", which redirects
+ * to the _Referrer_ or _Referer_ headers or "/".
+ *
+ * Examples:
+ *
+ * res.location('/foo/bar').;
+ * res.location('http://example.com');
+ * res.location('../login');
+ *
+ * @param {String} url
+ * @return {ServerResponse} for chaining
+ * @public
+ */
+
+res.location = function location(url) {
+ var loc = url;
+
+ // "back" is an alias for the referrer
+ if (url === 'back') {
+ loc = this.req.get('Referrer') || '/';
+ }
+
+ // set location
+ return this.set('Location', encodeUrl(loc));
+};
+
+/**
+ * Redirect to the given `url` with optional response `status`
+ * defaulting to 302.
+ *
+ * The resulting `url` is determined by `res.location()`, so
+ * it will play nicely with mounted apps, relative paths,
+ * `"back"` etc.
+ *
+ * Examples:
+ *
+ * res.redirect('/foo/bar');
+ * res.redirect('http://example.com');
+ * res.redirect(301, 'http://example.com');
+ * res.redirect('../login'); // /blog/post/1 -> /blog/login
+ *
+ * @public
+ */
+
+res.redirect = function redirect(url) {
+ var address = url;
+ var body;
+ var status = 302;
+
+ // allow status / url
+ if (arguments.length === 2) {
+ if (typeof arguments[0] === 'number') {
+ status = arguments[0];
+ address = arguments[1];
+ } else {
+ deprecate('res.redirect(url, status): Use res.redirect(status, url) instead');
+ status = arguments[1];
+ }
+ }
+
+ // Set location header
+ address = this.location(address).get('Location');
+
+ // Support text/{plain,html} by default
+ this.format({
+ text: function(){
+ body = statusCodes[status] + '. Redirecting to ' + address;
+ },
+
+ html: function(){
+ var u = escapeHtml(address);
+ body = '<p>' + statusCodes[status] + '. Redirecting to <a href="' + u + '">' + u + '</a></p>';
+ },
+
+ default: function(){
+ body = '';
+ }
+ });
+
+ // Respond
+ this.statusCode = status;
+ this.set('Content-Length', Buffer.byteLength(body));
+
+ if (this.req.method === 'HEAD') {
+ this.end();
+ } else {
+ this.end(body);
+ }
+};
+
+/**
+ * Add `field` to Vary. If already present in the Vary set, then
+ * this call is simply ignored.
+ *
+ * @param {Array|String} field
+ * @return {ServerResponse} for chaining
+ * @public
+ */
+
+res.vary = function(field){
+ // checks for back-compat
+ if (!field || (Array.isArray(field) && !field.length)) {
+ deprecate('res.vary(): Provide a field name');
+ return this;
+ }
+
+ vary(this, field);
+
+ return this;
+};
+
+/**
+ * Render `view` with the given `options` and optional callback `fn`.
+ * When a callback function is given a response will _not_ be made
+ * automatically, otherwise a response of _200_ and _text/html_ is given.
+ *
+ * Options:
+ *
+ * - `cache` boolean hinting to the engine it should cache
+ * - `filename` filename of the view being rendered
+ *
+ * @public
+ */
+
+res.render = function render(view, options, callback) {
+ var app = this.req.app;
+ var done = callback;
+ var opts = options || {};
+ var req = this.req;
+ var self = this;
+
+ // support callback function as second arg
+ if (typeof options === 'function') {
+ done = options;
+ opts = {};
+ }
+
+ // merge res.locals
+ opts._locals = self.locals;
+
+ // default callback to respond
+ done = done || function (err, str) {
+ if (err) return req.next(err);
+ self.send(str);
+ };
+
+ // render
+ app.render(view, opts, done);
+};
+
+// pipe the send file stream
+function sendfile(res, file, options, callback) {
+ var done = false;
+ var streaming;
+
+ // request aborted
+ function onaborted() {
+ if (done) return;
+ done = true;
+
+ var err = new Error('Request aborted');
+ err.code = 'ECONNABORTED';
+ callback(err);
+ }
+
+ // directory
+ function ondirectory() {
+ if (done) return;
+ done = true;
+
+ var err = new Error('EISDIR, read');
+ err.code = 'EISDIR';
+ callback(err);
+ }
+
+ // errors
+ function onerror(err) {
+ if (done) return;
+ done = true;
+ callback(err);
+ }
+
+ // ended
+ function onend() {
+ if (done) return;
+ done = true;
+ callback();
+ }
+
+ // file
+ function onfile() {
+ streaming = false;
+ }
+
+ // finished
+ function onfinish(err) {
+ if (err && err.code === 'ECONNRESET') return onaborted();
+ if (err) return onerror(err);
+ if (done) return;
+
+ setImmediate(function () {
+ if (streaming !== false && !done) {
+ onaborted();
+ return;
+ }
+
+ if (done) return;
+ done = true;
+ callback();
+ });
+ }
+
+ // streaming
+ function onstream() {
+ streaming = true;
+ }
+
+ file.on('directory', ondirectory);
+ file.on('end', onend);
+ file.on('error', onerror);
+ file.on('file', onfile);
+ file.on('stream', onstream);
+ onFinished(res, onfinish);
+
+ if (options.headers) {
+ // set headers on successful transfer
+ file.on('headers', function headers(res) {
+ var obj = options.headers;
+ var keys = Object.keys(obj);
+
+ for (var i = 0; i < keys.length; i++) {
+ var k = keys[i];
+ res.setHeader(k, obj[k]);
+ }
+ });
+ }
+
+ // pipe
+ file.pipe(res);
+}
+
+/**
+ * Stringify JSON, like JSON.stringify, but v8 optimized.
+ * @private
+ */
+
+function stringify(value, replacer, spaces) {
+ // v8 checks arguments.length for optimizing simple call
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4730
+ return replacer || spaces
+ ? JSON.stringify(value, replacer, spaces)
+ : JSON.stringify(value);
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/router/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/router/index.js
new file mode 100644
index 0000000..dac2514
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/router/index.js
@@ -0,0 +1,645 @@
+/*!
+ * express
+ * Copyright(c) 2009-2013 TJ Holowaychuk
+ * Copyright(c) 2013 Roman Shtylman
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var Route = require('./route');
+var Layer = require('./layer');
+var methods = require('methods');
+var mixin = require('utils-merge');
+var debug = require('debug')('express:router');
+var deprecate = require('depd')('express');
+var flatten = require('array-flatten');
+var parseUrl = require('parseurl');
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var objectRegExp = /^\[object (\S+)\]$/;
+var slice = Array.prototype.slice;
+var toString = Object.prototype.toString;
+
+/**
+ * Initialize a new `Router` with the given `options`.
+ *
+ * @param {Object} options
+ * @return {Router} which is an callable function
+ * @public
+ */
+
+var proto = module.exports = function(options) {
+ var opts = options || {};
+
+ function router(req, res, next) {
+ router.handle(req, res, next);
+ }
+
+ // mixin Router class functions
+ router.__proto__ = proto;
+
+ router.params = {};
+ router._params = [];
+ router.caseSensitive = opts.caseSensitive;
+ router.mergeParams = opts.mergeParams;
+ router.strict = opts.strict;
+ router.stack = [];
+
+ return router;
+};
+
+/**
+ * Map the given param placeholder `name`(s) to the given callback.
+ *
+ * Parameter mapping is used to provide pre-conditions to routes
+ * which use normalized placeholders. For example a _:user_id_ parameter
+ * could automatically load a user's information from the database without
+ * any additional code,
+ *
+ * The callback uses the same signature as middleware, the only difference
+ * being that the value of the placeholder is passed, in this case the _id_
+ * of the user. Once the `next()` function is invoked, just like middleware
+ * it will continue on to execute the route, or subsequent parameter functions.
+ *
+ * Just like in middleware, you must either respond to the request or call next
+ * to avoid stalling the request.
+ *
+ * app.param('user_id', function(req, res, next, id){
+ * User.find(id, function(err, user){
+ * if (err) {
+ * return next(err);
+ * } else if (!user) {
+ * return next(new Error('failed to load user'));
+ * }
+ * req.user = user;
+ * next();
+ * });
+ * });
+ *
+ * @param {String} name
+ * @param {Function} fn
+ * @return {app} for chaining
+ * @public
+ */
+
+proto.param = function param(name, fn) {
+ // param logic
+ if (typeof name === 'function') {
+ deprecate('router.param(fn): Refactor to use path params');
+ this._params.push(name);
+ return;
+ }
+
+ // apply param functions
+ var params = this._params;
+ var len = params.length;
+ var ret;
+
+ if (name[0] === ':') {
+ deprecate('router.param(' + JSON.stringify(name) + ', fn): Use router.param(' + JSON.stringify(name.substr(1)) + ', fn) instead');
+ name = name.substr(1);
+ }
+
+ for (var i = 0; i < len; ++i) {
+ if (ret = params[i](name, fn)) {
+ fn = ret;
+ }
+ }
+
+ // ensure we end up with a
+ // middleware function
+ if ('function' !== typeof fn) {
+ throw new Error('invalid param() call for ' + name + ', got ' + fn);
+ }
+
+ (this.params[name] = this.params[name] || []).push(fn);
+ return this;
+};
+
+/**
+ * Dispatch a req, res into the router.
+ * @private
+ */
+
+proto.handle = function handle(req, res, out) {
+ var self = this;
+
+ debug('dispatching %s %s', req.method, req.url);
+
+ var search = 1 + req.url.indexOf('?');
+ var pathlength = search ? search - 1 : req.url.length;
+ var fqdn = req.url[0] !== '/' && 1 + req.url.substr(0, pathlength).indexOf('://');
+ var protohost = fqdn ? req.url.substr(0, req.url.indexOf('/', 2 + fqdn)) : '';
+ var idx = 0;
+ var removed = '';
+ var slashAdded = false;
+ var paramcalled = {};
+
+ // store options for OPTIONS request
+ // only used if OPTIONS request
+ var options = [];
+
+ // middleware and routes
+ var stack = self.stack;
+
+ // manage inter-router variables
+ var parentParams = req.params;
+ var parentUrl = req.baseUrl || '';
+ var done = restore(out, req, 'baseUrl', 'next', 'params');
+
+ // setup next layer
+ req.next = next;
+
+ // for options requests, respond with a default if nothing else responds
+ if (req.method === 'OPTIONS') {
+ done = wrap(done, function(old, err) {
+ if (err || options.length === 0) return old(err);
+ sendOptionsResponse(res, options, old);
+ });
+ }
+
+ // setup basic req values
+ req.baseUrl = parentUrl;
+ req.originalUrl = req.originalUrl || req.url;
+
+ next();
+
+ function next(err) {
+ var layerError = err === 'route'
+ ? null
+ : err;
+
+ // remove added slash
+ if (slashAdded) {
+ req.url = req.url.substr(1);
+ slashAdded = false;
+ }
+
+ // restore altered req.url
+ if (removed.length !== 0) {
+ req.baseUrl = parentUrl;
+ req.url = protohost + removed + req.url.substr(protohost.length);
+ removed = '';
+ }
+
+ // no more matching layers
+ if (idx >= stack.length) {
+ setImmediate(done, layerError);
+ return;
+ }
+
+ // get pathname of request
+ var path = getPathname(req);
+
+ if (path == null) {
+ return done(layerError);
+ }
+
+ // find next matching layer
+ var layer;
+ var match;
+ var route;
+
+ while (match !== true && idx < stack.length) {
+ layer = stack[idx++];
+ match = matchLayer(layer, path);
+ route = layer.route;
+
+ if (typeof match !== 'boolean') {
+ // hold on to layerError
+ layerError = layerError || match;
+ }
+
+ if (match !== true) {
+ continue;
+ }
+
+ if (!route) {
+ // process non-route handlers normally
+ continue;
+ }
+
+ if (layerError) {
+ // routes do not match with a pending error
+ match = false;
+ continue;
+ }
+
+ var method = req.method;
+ var has_method = route._handles_method(method);
+
+ // build up automatic options response
+ if (!has_method && method === 'OPTIONS') {
+ appendMethods(options, route._options());
+ }
+
+ // don't even bother matching route
+ if (!has_method && method !== 'HEAD') {
+ match = false;
+ continue;
+ }
+ }
+
+ // no match
+ if (match !== true) {
+ return done(layerError);
+ }
+
+ // store route for dispatch on change
+ if (route) {
+ req.route = route;
+ }
+
+ // Capture one-time layer values
+ req.params = self.mergeParams
+ ? mergeParams(layer.params, parentParams)
+ : layer.params;
+ var layerPath = layer.path;
+
+ // this should be done for the layer
+ self.process_params(layer, paramcalled, req, res, function (err) {
+ if (err) {
+ return next(layerError || err);
+ }
+
+ if (route) {
+ return layer.handle_request(req, res, next);
+ }
+
+ trim_prefix(layer, layerError, layerPath, path);
+ });
+ }
+
+ function trim_prefix(layer, layerError, layerPath, path) {
+ var c = path[layerPath.length];
+ if (c && '/' !== c && '.' !== c) return next(layerError);
+
+ // Trim off the part of the url that matches the route
+ // middleware (.use stuff) needs to have the path stripped
+ if (layerPath.length !== 0) {
+ debug('trim prefix (%s) from url %s', layerPath, req.url);
+ removed = layerPath;
+ req.url = protohost + req.url.substr(protohost.length + removed.length);
+
+ // Ensure leading slash
+ if (!fqdn && req.url[0] !== '/') {
+ req.url = '/' + req.url;
+ slashAdded = true;
+ }
+
+ // Setup base URL (no trailing slash)
+ req.baseUrl = parentUrl + (removed[removed.length - 1] === '/'
+ ? removed.substring(0, removed.length - 1)
+ : removed);
+ }
+
+ debug('%s %s : %s', layer.name, layerPath, req.originalUrl);
+
+ if (layerError) {
+ layer.handle_error(layerError, req, res, next);
+ } else {
+ layer.handle_request(req, res, next);
+ }
+ }
+};
+
+/**
+ * Process any parameters for the layer.
+ * @private
+ */
+
+proto.process_params = function process_params(layer, called, req, res, done) {
+ var params = this.params;
+
+ // captured parameters from the layer, keys and values
+ var keys = layer.keys;
+
+ // fast track
+ if (!keys || keys.length === 0) {
+ return done();
+ }
+
+ var i = 0;
+ var name;
+ var paramIndex = 0;
+ var key;
+ var paramVal;
+ var paramCallbacks;
+ var paramCalled;
+
+ // process params in order
+ // param callbacks can be async
+ function param(err) {
+ if (err) {
+ return done(err);
+ }
+
+ if (i >= keys.length ) {
+ return done();
+ }
+
+ paramIndex = 0;
+ key = keys[i++];
+
+ if (!key) {
+ return done();
+ }
+
+ name = key.name;
+ paramVal = req.params[name];
+ paramCallbacks = params[name];
+ paramCalled = called[name];
+
+ if (paramVal === undefined || !paramCallbacks) {
+ return param();
+ }
+
+ // param previously called with same value or error occurred
+ if (paramCalled && (paramCalled.match === paramVal
+ || (paramCalled.error && paramCalled.error !== 'route'))) {
+ // restore value
+ req.params[name] = paramCalled.value;
+
+ // next param
+ return param(paramCalled.error);
+ }
+
+ called[name] = paramCalled = {
+ error: null,
+ match: paramVal,
+ value: paramVal
+ };
+
+ paramCallback();
+ }
+
+ // single param callbacks
+ function paramCallback(err) {
+ var fn = paramCallbacks[paramIndex++];
+
+ // store updated value
+ paramCalled.value = req.params[key.name];
+
+ if (err) {
+ // store error
+ paramCalled.error = err;
+ param(err);
+ return;
+ }
+
+ if (!fn) return param();
+
+ try {
+ fn(req, res, paramCallback, paramVal, key.name);
+ } catch (e) {
+ paramCallback(e);
+ }
+ }
+
+ param();
+};
+
+/**
+ * Use the given middleware function, with optional path, defaulting to "/".
+ *
+ * Use (like `.all`) will run for any http METHOD, but it will not add
+ * handlers for those methods so OPTIONS requests will not consider `.use`
+ * functions even if they could respond.
+ *
+ * The other difference is that _route_ path is stripped and not visible
+ * to the handler function. The main effect of this feature is that mounted
+ * handlers can operate without any code changes regardless of the "prefix"
+ * pathname.
+ *
+ * @public
+ */
+
+proto.use = function use(fn) {
+ var offset = 0;
+ var path = '/';
+
+ // default path to '/'
+ // disambiguate router.use([fn])
+ if (typeof fn !== 'function') {
+ var arg = fn;
+
+ while (Array.isArray(arg) && arg.length !== 0) {
+ arg = arg[0];
+ }
+
+ // first arg is the path
+ if (typeof arg !== 'function') {
+ offset = 1;
+ path = fn;
+ }
+ }
+
+ var callbacks = flatten(slice.call(arguments, offset));
+
+ if (callbacks.length === 0) {
+ throw new TypeError('Router.use() requires middleware functions');
+ }
+
+ for (var i = 0; i < callbacks.length; i++) {
+ var fn = callbacks[i];
+
+ if (typeof fn !== 'function') {
+ throw new TypeError('Router.use() requires middleware function but got a ' + gettype(fn));
+ }
+
+ // add the middleware
+ debug('use %s %s', path, fn.name || '<anonymous>');
+
+ var layer = new Layer(path, {
+ sensitive: this.caseSensitive,
+ strict: false,
+ end: false
+ }, fn);
+
+ layer.route = undefined;
+
+ this.stack.push(layer);
+ }
+
+ return this;
+};
+
+/**
+ * Create a new Route for the given path.
+ *
+ * Each route contains a separate middleware stack and VERB handlers.
+ *
+ * See the Route api documentation for details on adding handlers
+ * and middleware to routes.
+ *
+ * @param {String} path
+ * @return {Route}
+ * @public
+ */
+
+proto.route = function route(path) {
+ var route = new Route(path);
+
+ var layer = new Layer(path, {
+ sensitive: this.caseSensitive,
+ strict: this.strict,
+ end: true
+ }, route.dispatch.bind(route));
+
+ layer.route = route;
+
+ this.stack.push(layer);
+ return route;
+};
+
+// create Router#VERB functions
+methods.concat('all').forEach(function(method){
+ proto[method] = function(path){
+ var route = this.route(path)
+ route[method].apply(route, slice.call(arguments, 1));
+ return this;
+ };
+});
+
+// append methods to a list of methods
+function appendMethods(list, addition) {
+ for (var i = 0; i < addition.length; i++) {
+ var method = addition[i];
+ if (list.indexOf(method) === -1) {
+ list.push(method);
+ }
+ }
+}
+
+// get pathname of request
+function getPathname(req) {
+ try {
+ return parseUrl(req).pathname;
+ } catch (err) {
+ return undefined;
+ }
+}
+
+// get type for error message
+function gettype(obj) {
+ var type = typeof obj;
+
+ if (type !== 'object') {
+ return type;
+ }
+
+ // inspect [[Class]] for objects
+ return toString.call(obj)
+ .replace(objectRegExp, '$1');
+}
+
+/**
+ * Match path to a layer.
+ *
+ * @param {Layer} layer
+ * @param {string} path
+ * @private
+ */
+
+function matchLayer(layer, path) {
+ try {
+ return layer.match(path);
+ } catch (err) {
+ return err;
+ }
+}
+
+// merge params with parent params
+function mergeParams(params, parent) {
+ if (typeof parent !== 'object' || !parent) {
+ return params;
+ }
+
+ // make copy of parent for base
+ var obj = mixin({}, parent);
+
+ // simple non-numeric merging
+ if (!(0 in params) || !(0 in parent)) {
+ return mixin(obj, params);
+ }
+
+ var i = 0;
+ var o = 0;
+
+ // determine numeric gaps
+ while (i in params) {
+ i++;
+ }
+
+ while (o in parent) {
+ o++;
+ }
+
+ // offset numeric indices in params before merge
+ for (i--; i >= 0; i--) {
+ params[i + o] = params[i];
+
+ // create holes for the merge when necessary
+ if (i < o) {
+ delete params[i];
+ }
+ }
+
+ return mixin(obj, params);
+}
+
+// restore obj props after function
+function restore(fn, obj) {
+ var props = new Array(arguments.length - 2);
+ var vals = new Array(arguments.length - 2);
+
+ for (var i = 0; i < props.length; i++) {
+ props[i] = arguments[i + 2];
+ vals[i] = obj[props[i]];
+ }
+
+ return function(err){
+ // restore vals
+ for (var i = 0; i < props.length; i++) {
+ obj[props[i]] = vals[i];
+ }
+
+ return fn.apply(this, arguments);
+ };
+}
+
+// send an OPTIONS response
+function sendOptionsResponse(res, options, next) {
+ try {
+ var body = options.join(',');
+ res.set('Allow', body);
+ res.send(body);
+ } catch (err) {
+ next(err);
+ }
+}
+
+// wrap a function
+function wrap(old, fn) {
+ return function proxy() {
+ var args = new Array(arguments.length + 1);
+
+ args[0] = old;
+ for (var i = 0, len = arguments.length; i < len; i++) {
+ args[i + 1] = arguments[i];
+ }
+
+ fn.apply(this, args);
+ };
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/router/layer.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/router/layer.js
new file mode 100644
index 0000000..fe9210c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/router/layer.js
@@ -0,0 +1,176 @@
+/*!
+ * express
+ * Copyright(c) 2009-2013 TJ Holowaychuk
+ * Copyright(c) 2013 Roman Shtylman
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var pathRegexp = require('path-to-regexp');
+var debug = require('debug')('express:router:layer');
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = Layer;
+
+function Layer(path, options, fn) {
+ if (!(this instanceof Layer)) {
+ return new Layer(path, options, fn);
+ }
+
+ debug('new %s', path);
+ var opts = options || {};
+
+ this.handle = fn;
+ this.name = fn.name || '<anonymous>';
+ this.params = undefined;
+ this.path = undefined;
+ this.regexp = pathRegexp(path, this.keys = [], opts);
+
+ if (path === '/' && opts.end === false) {
+ this.regexp.fast_slash = true;
+ }
+}
+
+/**
+ * Handle the error for the layer.
+ *
+ * @param {Error} error
+ * @param {Request} req
+ * @param {Response} res
+ * @param {function} next
+ * @api private
+ */
+
+Layer.prototype.handle_error = function handle_error(error, req, res, next) {
+ var fn = this.handle;
+
+ if (fn.length !== 4) {
+ // not a standard error handler
+ return next(error);
+ }
+
+ try {
+ fn(error, req, res, next);
+ } catch (err) {
+ next(err);
+ }
+};
+
+/**
+ * Handle the request for the layer.
+ *
+ * @param {Request} req
+ * @param {Response} res
+ * @param {function} next
+ * @api private
+ */
+
+Layer.prototype.handle_request = function handle(req, res, next) {
+ var fn = this.handle;
+
+ if (fn.length > 3) {
+ // not a standard request handler
+ return next();
+ }
+
+ try {
+ fn(req, res, next);
+ } catch (err) {
+ next(err);
+ }
+};
+
+/**
+ * Check if this route matches `path`, if so
+ * populate `.params`.
+ *
+ * @param {String} path
+ * @return {Boolean}
+ * @api private
+ */
+
+Layer.prototype.match = function match(path) {
+ if (path == null) {
+ // no path, nothing matches
+ this.params = undefined;
+ this.path = undefined;
+ return false;
+ }
+
+ if (this.regexp.fast_slash) {
+ // fast path non-ending match for / (everything matches)
+ this.params = {};
+ this.path = '';
+ return true;
+ }
+
+ var m = this.regexp.exec(path);
+
+ if (!m) {
+ this.params = undefined;
+ this.path = undefined;
+ return false;
+ }
+
+ // store values
+ this.params = {};
+ this.path = m[0];
+
+ var keys = this.keys;
+ var params = this.params;
+
+ for (var i = 1; i < m.length; i++) {
+ var key = keys[i - 1];
+ var prop = key.name;
+ var val = decode_param(m[i]);
+
+ if (val !== undefined || !(hasOwnProperty.call(params, prop))) {
+ params[prop] = val;
+ }
+ }
+
+ return true;
+};
+
+/**
+ * Decode param value.
+ *
+ * @param {string} val
+ * @return {string}
+ * @private
+ */
+
+function decode_param(val) {
+ if (typeof val !== 'string' || val.length === 0) {
+ return val;
+ }
+
+ try {
+ return decodeURIComponent(val);
+ } catch (err) {
+ if (err instanceof URIError) {
+ err.message = 'Failed to decode param \'' + val + '\'';
+ err.status = err.statusCode = 400;
+ }
+
+ throw err;
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/router/route.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/router/route.js
new file mode 100644
index 0000000..2788d7b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/router/route.js
@@ -0,0 +1,210 @@
+/*!
+ * express
+ * Copyright(c) 2009-2013 TJ Holowaychuk
+ * Copyright(c) 2013 Roman Shtylman
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var debug = require('debug')('express:router:route');
+var flatten = require('array-flatten');
+var Layer = require('./layer');
+var methods = require('methods');
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var slice = Array.prototype.slice;
+var toString = Object.prototype.toString;
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = Route;
+
+/**
+ * Initialize `Route` with the given `path`,
+ *
+ * @param {String} path
+ * @public
+ */
+
+function Route(path) {
+ this.path = path;
+ this.stack = [];
+
+ debug('new %s', path);
+
+ // route handlers for various http methods
+ this.methods = {};
+}
+
+/**
+ * Determine if the route handles a given method.
+ * @private
+ */
+
+Route.prototype._handles_method = function _handles_method(method) {
+ if (this.methods._all) {
+ return true;
+ }
+
+ var name = method.toLowerCase();
+
+ if (name === 'head' && !this.methods['head']) {
+ name = 'get';
+ }
+
+ return Boolean(this.methods[name]);
+};
+
+/**
+ * @return {Array} supported HTTP methods
+ * @private
+ */
+
+Route.prototype._options = function _options() {
+ var methods = Object.keys(this.methods);
+
+ // append automatic head
+ if (this.methods.get && !this.methods.head) {
+ methods.push('head');
+ }
+
+ for (var i = 0; i < methods.length; i++) {
+ // make upper case
+ methods[i] = methods[i].toUpperCase();
+ }
+
+ return methods;
+};
+
+/**
+ * dispatch req, res into this route
+ * @private
+ */
+
+Route.prototype.dispatch = function dispatch(req, res, done) {
+ var idx = 0;
+ var stack = this.stack;
+ if (stack.length === 0) {
+ return done();
+ }
+
+ var method = req.method.toLowerCase();
+ if (method === 'head' && !this.methods['head']) {
+ method = 'get';
+ }
+
+ req.route = this;
+
+ next();
+
+ function next(err) {
+ if (err && err === 'route') {
+ return done();
+ }
+
+ var layer = stack[idx++];
+ if (!layer) {
+ return done(err);
+ }
+
+ if (layer.method && layer.method !== method) {
+ return next(err);
+ }
+
+ if (err) {
+ layer.handle_error(err, req, res, next);
+ } else {
+ layer.handle_request(req, res, next);
+ }
+ }
+};
+
+/**
+ * Add a handler for all HTTP verbs to this route.
+ *
+ * Behaves just like middleware and can respond or call `next`
+ * to continue processing.
+ *
+ * You can use multiple `.all` call to add multiple handlers.
+ *
+ * function check_something(req, res, next){
+ * next();
+ * };
+ *
+ * function validate_user(req, res, next){
+ * next();
+ * };
+ *
+ * route
+ * .all(validate_user)
+ * .all(check_something)
+ * .get(function(req, res, next){
+ * res.send('hello world');
+ * });
+ *
+ * @param {function} handler
+ * @return {Route} for chaining
+ * @api public
+ */
+
+Route.prototype.all = function all() {
+ var handles = flatten(slice.call(arguments));
+
+ for (var i = 0; i < handles.length; i++) {
+ var handle = handles[i];
+
+ if (typeof handle !== 'function') {
+ var type = toString.call(handle);
+ var msg = 'Route.all() requires callback functions but got a ' + type;
+ throw new TypeError(msg);
+ }
+
+ var layer = Layer('/', {}, handle);
+ layer.method = undefined;
+
+ this.methods._all = true;
+ this.stack.push(layer);
+ }
+
+ return this;
+};
+
+methods.forEach(function(method){
+ Route.prototype[method] = function(){
+ var handles = flatten(slice.call(arguments));
+
+ for (var i = 0; i < handles.length; i++) {
+ var handle = handles[i];
+
+ if (typeof handle !== 'function') {
+ var type = toString.call(handle);
+ var msg = 'Route.' + method + '() requires callback functions but got a ' + type;
+ throw new Error(msg);
+ }
+
+ debug('%s %s', method, this.path);
+
+ var layer = Layer('/', {}, handle);
+ layer.method = method;
+
+ this.methods[method] = true;
+ this.stack.push(layer);
+ }
+
+ return this;
+ };
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/utils.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/utils.js
new file mode 100644
index 0000000..f418c58
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/utils.js
@@ -0,0 +1,299 @@
+/*!
+ * express
+ * Copyright(c) 2009-2013 TJ Holowaychuk
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module dependencies.
+ * @api private
+ */
+
+var contentDisposition = require('content-disposition');
+var contentType = require('content-type');
+var deprecate = require('depd')('express');
+var flatten = require('array-flatten');
+var mime = require('send').mime;
+var basename = require('path').basename;
+var etag = require('etag');
+var proxyaddr = require('proxy-addr');
+var qs = require('qs');
+var querystring = require('querystring');
+
+/**
+ * Return strong ETag for `body`.
+ *
+ * @param {String|Buffer} body
+ * @param {String} [encoding]
+ * @return {String}
+ * @api private
+ */
+
+exports.etag = function (body, encoding) {
+ var buf = !Buffer.isBuffer(body)
+ ? new Buffer(body, encoding)
+ : body;
+
+ return etag(buf, {weak: false});
+};
+
+/**
+ * Return weak ETag for `body`.
+ *
+ * @param {String|Buffer} body
+ * @param {String} [encoding]
+ * @return {String}
+ * @api private
+ */
+
+exports.wetag = function wetag(body, encoding){
+ var buf = !Buffer.isBuffer(body)
+ ? new Buffer(body, encoding)
+ : body;
+
+ return etag(buf, {weak: true});
+};
+
+/**
+ * Check if `path` looks absolute.
+ *
+ * @param {String} path
+ * @return {Boolean}
+ * @api private
+ */
+
+exports.isAbsolute = function(path){
+ if ('/' === path[0]) return true;
+ if (':' === path[1] && ('\\' === path[2] || '/' === path[2])) return true; // Windows device path
+ if ('\\\\' === path.substring(0, 2)) return true; // Microsoft Azure absolute path
+};
+
+/**
+ * Flatten the given `arr`.
+ *
+ * @param {Array} arr
+ * @return {Array}
+ * @api private
+ */
+
+exports.flatten = deprecate.function(flatten,
+ 'utils.flatten: use array-flatten npm module instead');
+
+/**
+ * Normalize the given `type`, for example "html" becomes "text/html".
+ *
+ * @param {String} type
+ * @return {Object}
+ * @api private
+ */
+
+exports.normalizeType = function(type){
+ return ~type.indexOf('/')
+ ? acceptParams(type)
+ : { value: mime.lookup(type), params: {} };
+};
+
+/**
+ * Normalize `types`, for example "html" becomes "text/html".
+ *
+ * @param {Array} types
+ * @return {Array}
+ * @api private
+ */
+
+exports.normalizeTypes = function(types){
+ var ret = [];
+
+ for (var i = 0; i < types.length; ++i) {
+ ret.push(exports.normalizeType(types[i]));
+ }
+
+ return ret;
+};
+
+/**
+ * Generate Content-Disposition header appropriate for the filename.
+ * non-ascii filenames are urlencoded and a filename* parameter is added
+ *
+ * @param {String} filename
+ * @return {String}
+ * @api private
+ */
+
+exports.contentDisposition = deprecate.function(contentDisposition,
+ 'utils.contentDisposition: use content-disposition npm module instead');
+
+/**
+ * Parse accept params `str` returning an
+ * object with `.value`, `.quality` and `.params`.
+ * also includes `.originalIndex` for stable sorting
+ *
+ * @param {String} str
+ * @return {Object}
+ * @api private
+ */
+
+function acceptParams(str, index) {
+ var parts = str.split(/ *; */);
+ var ret = { value: parts[0], quality: 1, params: {}, originalIndex: index };
+
+ for (var i = 1; i < parts.length; ++i) {
+ var pms = parts[i].split(/ *= */);
+ if ('q' === pms[0]) {
+ ret.quality = parseFloat(pms[1]);
+ } else {
+ ret.params[pms[0]] = pms[1];
+ }
+ }
+
+ return ret;
+}
+
+/**
+ * Compile "etag" value to function.
+ *
+ * @param {Boolean|String|Function} val
+ * @return {Function}
+ * @api private
+ */
+
+exports.compileETag = function(val) {
+ var fn;
+
+ if (typeof val === 'function') {
+ return val;
+ }
+
+ switch (val) {
+ case true:
+ fn = exports.wetag;
+ break;
+ case false:
+ break;
+ case 'strong':
+ fn = exports.etag;
+ break;
+ case 'weak':
+ fn = exports.wetag;
+ break;
+ default:
+ throw new TypeError('unknown value for etag function: ' + val);
+ }
+
+ return fn;
+}
+
+/**
+ * Compile "query parser" value to function.
+ *
+ * @param {String|Function} val
+ * @return {Function}
+ * @api private
+ */
+
+exports.compileQueryParser = function compileQueryParser(val) {
+ var fn;
+
+ if (typeof val === 'function') {
+ return val;
+ }
+
+ switch (val) {
+ case true:
+ fn = querystring.parse;
+ break;
+ case false:
+ fn = newObject;
+ break;
+ case 'extended':
+ fn = parseExtendedQueryString;
+ break;
+ case 'simple':
+ fn = querystring.parse;
+ break;
+ default:
+ throw new TypeError('unknown value for query parser function: ' + val);
+ }
+
+ return fn;
+}
+
+/**
+ * Compile "proxy trust" value to function.
+ *
+ * @param {Boolean|String|Number|Array|Function} val
+ * @return {Function}
+ * @api private
+ */
+
+exports.compileTrust = function(val) {
+ if (typeof val === 'function') return val;
+
+ if (val === true) {
+ // Support plain true/false
+ return function(){ return true };
+ }
+
+ if (typeof val === 'number') {
+ // Support trusting hop count
+ return function(a, i){ return i < val };
+ }
+
+ if (typeof val === 'string') {
+ // Support comma-separated values
+ val = val.split(/ *, */);
+ }
+
+ return proxyaddr.compile(val || []);
+}
+
+/**
+ * Set the charset in a given Content-Type string.
+ *
+ * @param {String} type
+ * @param {String} charset
+ * @return {String}
+ * @api private
+ */
+
+exports.setCharset = function setCharset(type, charset) {
+ if (!type || !charset) {
+ return type;
+ }
+
+ // parse type
+ var parsed = contentType.parse(type);
+
+ // set charset
+ parsed.parameters.charset = charset;
+
+ // format type
+ return contentType.format(parsed);
+};
+
+/**
+ * Parse an extended query string with qs.
+ *
+ * @return {Object}
+ * @private
+ */
+
+function parseExtendedQueryString(str) {
+ return qs.parse(str, {
+ allowPrototypes: true
+ });
+}
+
+/**
+ * Return new empty object.
+ *
+ * @return {Object}
+ * @api private
+ */
+
+function newObject() {
+ return {};
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/view.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/view.js
new file mode 100644
index 0000000..52415d4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/lib/view.js
@@ -0,0 +1,173 @@
+/*!
+ * express
+ * Copyright(c) 2009-2013 TJ Holowaychuk
+ * Copyright(c) 2013 Roman Shtylman
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var debug = require('debug')('express:view');
+var path = require('path');
+var fs = require('fs');
+var utils = require('./utils');
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var dirname = path.dirname;
+var basename = path.basename;
+var extname = path.extname;
+var join = path.join;
+var resolve = path.resolve;
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = View;
+
+/**
+ * Initialize a new `View` with the given `name`.
+ *
+ * Options:
+ *
+ * - `defaultEngine` the default template engine name
+ * - `engines` template engine require() cache
+ * - `root` root path for view lookup
+ *
+ * @param {string} name
+ * @param {object} options
+ * @public
+ */
+
+function View(name, options) {
+ var opts = options || {};
+
+ this.defaultEngine = opts.defaultEngine;
+ this.ext = extname(name);
+ this.name = name;
+ this.root = opts.root;
+
+ if (!this.ext && !this.defaultEngine) {
+ throw new Error('No default engine was specified and no extension was provided.');
+ }
+
+ var fileName = name;
+
+ if (!this.ext) {
+ // get extension from default engine name
+ this.ext = this.defaultEngine[0] !== '.'
+ ? '.' + this.defaultEngine
+ : this.defaultEngine;
+
+ fileName += this.ext;
+ }
+
+ if (!opts.engines[this.ext]) {
+ // load engine
+ opts.engines[this.ext] = require(this.ext.substr(1)).__express;
+ }
+
+ // store loaded engine
+ this.engine = opts.engines[this.ext];
+
+ // lookup path
+ this.path = this.lookup(fileName);
+}
+
+/**
+ * Lookup view by the given `name`
+ *
+ * @param {string} name
+ * @private
+ */
+
+View.prototype.lookup = function lookup(name) {
+ var path;
+ var roots = [].concat(this.root);
+
+ debug('lookup "%s"', name);
+
+ for (var i = 0; i < roots.length && !path; i++) {
+ var root = roots[i];
+
+ // resolve the path
+ var loc = resolve(root, name);
+ var dir = dirname(loc);
+ var file = basename(loc);
+
+ // resolve the file
+ path = this.resolve(dir, file);
+ }
+
+ return path;
+};
+
+/**
+ * Render with the given options.
+ *
+ * @param {object} options
+ * @param {function} callback
+ * @private
+ */
+
+View.prototype.render = function render(options, callback) {
+ debug('render "%s"', this.path);
+ this.engine(this.path, options, callback);
+};
+
+/**
+ * Resolve the file within the given directory.
+ *
+ * @param {string} dir
+ * @param {string} file
+ * @private
+ */
+
+View.prototype.resolve = function resolve(dir, file) {
+ var ext = this.ext;
+
+ // <path>.<ext>
+ var path = join(dir, file);
+ var stat = tryStat(path);
+
+ if (stat && stat.isFile()) {
+ return path;
+ }
+
+ // <path>/index.<ext>
+ path = join(dir, basename(file, ext), 'index' + ext);
+ stat = tryStat(path);
+
+ if (stat && stat.isFile()) {
+ return path;
+ }
+};
+
+/**
+ * Return a stat, maybe.
+ *
+ * @param {string} path
+ * @return {fs.Stats}
+ * @private
+ */
+
+function tryStat(path) {
+ debug('stat "%s"', path);
+
+ try {
+ return fs.statSync(path);
+ } catch (e) {
+ return undefined;
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/HISTORY.md
new file mode 100644
index 0000000..0477ed7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/HISTORY.md
@@ -0,0 +1,212 @@
+1.3.3 / 2016-05-02
+==================
+
+ * deps: mime-types@~2.1.11
+ - deps: mime-db@~1.23.0
+ * deps: negotiator@0.6.1
+ - perf: improve `Accept` parsing speed
+ - perf: improve `Accept-Charset` parsing speed
+ - perf: improve `Accept-Encoding` parsing speed
+ - perf: improve `Accept-Language` parsing speed
+
+1.3.2 / 2016-03-08
+==================
+
+ * deps: mime-types@~2.1.10
+ - Fix extension of `application/dash+xml`
+ - Update primary extension for `audio/mp4`
+ - deps: mime-db@~1.22.0
+
+1.3.1 / 2016-01-19
+==================
+
+ * deps: mime-types@~2.1.9
+ - deps: mime-db@~1.21.0
+
+1.3.0 / 2015-09-29
+==================
+
+ * deps: mime-types@~2.1.7
+ - deps: mime-db@~1.19.0
+ * deps: negotiator@0.6.0
+ - Fix including type extensions in parameters in `Accept` parsing
+ - Fix parsing `Accept` parameters with quoted equals
+ - Fix parsing `Accept` parameters with quoted semicolons
+ - Lazy-load modules from main entry point
+ - perf: delay type concatenation until needed
+ - perf: enable strict mode
+ - perf: hoist regular expressions
+ - perf: remove closures getting spec properties
+ - perf: remove a closure from media type parsing
+ - perf: remove property delete from media type parsing
+
+1.2.13 / 2015-09-06
+===================
+
+ * deps: mime-types@~2.1.6
+ - deps: mime-db@~1.18.0
+
+1.2.12 / 2015-07-30
+===================
+
+ * deps: mime-types@~2.1.4
+ - deps: mime-db@~1.16.0
+
+1.2.11 / 2015-07-16
+===================
+
+ * deps: mime-types@~2.1.3
+ - deps: mime-db@~1.15.0
+
+1.2.10 / 2015-07-01
+===================
+
+ * deps: mime-types@~2.1.2
+ - deps: mime-db@~1.14.0
+
+1.2.9 / 2015-06-08
+==================
+
+ * deps: mime-types@~2.1.1
+ - perf: fix deopt during mapping
+
+1.2.8 / 2015-06-07
+==================
+
+ * deps: mime-types@~2.1.0
+ - deps: mime-db@~1.13.0
+ * perf: avoid argument reassignment & argument slice
+ * perf: avoid negotiator recursive construction
+ * perf: enable strict mode
+ * perf: remove unnecessary bitwise operator
+
+1.2.7 / 2015-05-10
+==================
+
+ * deps: negotiator@0.5.3
+ - Fix media type parameter matching to be case-insensitive
+
+1.2.6 / 2015-05-07
+==================
+
+ * deps: mime-types@~2.0.11
+ - deps: mime-db@~1.9.1
+ * deps: negotiator@0.5.2
+ - Fix comparing media types with quoted values
+ - Fix splitting media types with quoted commas
+
+1.2.5 / 2015-03-13
+==================
+
+ * deps: mime-types@~2.0.10
+ - deps: mime-db@~1.8.0
+
+1.2.4 / 2015-02-14
+==================
+
+ * Support Node.js 0.6
+ * deps: mime-types@~2.0.9
+ - deps: mime-db@~1.7.0
+ * deps: negotiator@0.5.1
+ - Fix preference sorting to be stable for long acceptable lists
+
+1.2.3 / 2015-01-31
+==================
+
+ * deps: mime-types@~2.0.8
+ - deps: mime-db@~1.6.0
+
+1.2.2 / 2014-12-30
+==================
+
+ * deps: mime-types@~2.0.7
+ - deps: mime-db@~1.5.0
+
+1.2.1 / 2014-12-30
+==================
+
+ * deps: mime-types@~2.0.5
+ - deps: mime-db@~1.3.1
+
+1.2.0 / 2014-12-19
+==================
+
+ * deps: negotiator@0.5.0
+ - Fix list return order when large accepted list
+ - Fix missing identity encoding when q=0 exists
+ - Remove dynamic building of Negotiator class
+
+1.1.4 / 2014-12-10
+==================
+
+ * deps: mime-types@~2.0.4
+ - deps: mime-db@~1.3.0
+
+1.1.3 / 2014-11-09
+==================
+
+ * deps: mime-types@~2.0.3
+ - deps: mime-db@~1.2.0
+
+1.1.2 / 2014-10-14
+==================
+
+ * deps: negotiator@0.4.9
+ - Fix error when media type has invalid parameter
+
+1.1.1 / 2014-09-28
+==================
+
+ * deps: mime-types@~2.0.2
+ - deps: mime-db@~1.1.0
+ * deps: negotiator@0.4.8
+ - Fix all negotiations to be case-insensitive
+ - Stable sort preferences of same quality according to client order
+
+1.1.0 / 2014-09-02
+==================
+
+ * update `mime-types`
+
+1.0.7 / 2014-07-04
+==================
+
+ * Fix wrong type returned from `type` when match after unknown extension
+
+1.0.6 / 2014-06-24
+==================
+
+ * deps: negotiator@0.4.7
+
+1.0.5 / 2014-06-20
+==================
+
+ * fix crash when unknown extension given
+
+1.0.4 / 2014-06-19
+==================
+
+ * use `mime-types`
+
+1.0.3 / 2014-06-11
+==================
+
+ * deps: negotiator@0.4.6
+ - Order by specificity when quality is the same
+
+1.0.2 / 2014-05-29
+==================
+
+ * Fix interpretation when header not in request
+ * deps: pin negotiator@0.4.5
+
+1.0.1 / 2014-01-18
+==================
+
+ * Identity encoding isn't always acceptable
+ * deps: negotiator@~0.4.0
+
+1.0.0 / 2013-12-27
+==================
+
+ * Genesis
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/LICENSE
new file mode 100644
index 0000000..0616607
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/README.md
new file mode 100644
index 0000000..ae36676
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/README.md
@@ -0,0 +1,135 @@
+# accepts
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator). Extracted from [koa](https://www.npmjs.com/package/koa) for general use.
+
+In addition to negotiator, it allows:
+
+- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])` as well as `('text/html', 'application/json')`.
+- Allows type shorthands such as `json`.
+- Returns `false` when no types match
+- Treats non-existent headers as `*`
+
+## Installation
+
+```sh
+npm install accepts
+```
+
+## API
+
+```js
+var accepts = require('accepts')
+```
+
+### accepts(req)
+
+Create a new `Accepts` object for the given `req`.
+
+#### .charset(charsets)
+
+Return the first accepted charset. If nothing in `charsets` is accepted,
+then `false` is returned.
+
+#### .charsets()
+
+Return the charsets that the request accepts, in the order of the client's
+preference (most preferred first).
+
+#### .encoding(encodings)
+
+Return the first accepted encoding. If nothing in `encodings` is accepted,
+then `false` is returned.
+
+#### .encodings()
+
+Return the encodings that the request accepts, in the order of the client's
+preference (most preferred first).
+
+#### .language(languages)
+
+Return the first accepted language. If nothing in `languages` is accepted,
+then `false` is returned.
+
+#### .languages()
+
+Return the languages that the request accepts, in the order of the client's
+preference (most preferred first).
+
+#### .type(types)
+
+Return the first accepted type (and it is returned as the same text as what
+appears in the `types` array). If nothing in `types` is accepted, then `false`
+is returned.
+
+The `types` array can contain full MIME types or file extensions. Any value
+that is not a full MIME types is passed to `require('mime-types').lookup`.
+
+#### .types()
+
+Return the types that the request accepts, in the order of the client's
+preference (most preferred first).
+
+## Examples
+
+### Simple type negotiation
+
+This simple example shows how to use `accepts` to return a different typed
+respond body based on what the client wants to accept. The server lists it's
+preferences in order and will get back the best match between the client and
+server.
+
+```js
+var accepts = require('accepts')
+var http = require('http')
+
+function app(req, res) {
+ var accept = accepts(req)
+
+ // the order of this list is significant; should be server preferred order
+ switch(accept.type(['json', 'html'])) {
+ case 'json':
+ res.setHeader('Content-Type', 'application/json')
+ res.write('{"hello":"world!"}')
+ break
+ case 'html':
+ res.setHeader('Content-Type', 'text/html')
+ res.write('<b>hello, world!</b>')
+ break
+ default:
+ // the fallback is text/plain, so no need to specify it above
+ res.setHeader('Content-Type', 'text/plain')
+ res.write('hello, world!')
+ break
+ }
+
+ res.end()
+}
+
+http.createServer(app).listen(3000)
+```
+
+You can test this out with the cURL program:
+```sh
+curl -I -H'Accept: text/html' http://localhost:3000/
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/accepts.svg
+[npm-url]: https://npmjs.org/package/accepts
+[node-version-image]: https://img.shields.io/node/v/accepts.svg
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/accepts/master.svg
+[travis-url]: https://travis-ci.org/jshttp/accepts
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/accepts/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/accepts
+[downloads-image]: https://img.shields.io/npm/dm/accepts.svg
+[downloads-url]: https://npmjs.org/package/accepts
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/index.js
new file mode 100644
index 0000000..e80192a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/index.js
@@ -0,0 +1,231 @@
+/*!
+ * accepts
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var Negotiator = require('negotiator')
+var mime = require('mime-types')
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = Accepts
+
+/**
+ * Create a new Accepts object for the given req.
+ *
+ * @param {object} req
+ * @public
+ */
+
+function Accepts(req) {
+ if (!(this instanceof Accepts))
+ return new Accepts(req)
+
+ this.headers = req.headers
+ this.negotiator = new Negotiator(req)
+}
+
+/**
+ * Check if the given `type(s)` is acceptable, returning
+ * the best match when true, otherwise `undefined`, in which
+ * case you should respond with 406 "Not Acceptable".
+ *
+ * The `type` value may be a single mime type string
+ * such as "application/json", the extension name
+ * such as "json" or an array `["json", "html", "text/plain"]`. When a list
+ * or array is given the _best_ match, if any is returned.
+ *
+ * Examples:
+ *
+ * // Accept: text/html
+ * this.types('html');
+ * // => "html"
+ *
+ * // Accept: text/*, application/json
+ * this.types('html');
+ * // => "html"
+ * this.types('text/html');
+ * // => "text/html"
+ * this.types('json', 'text');
+ * // => "json"
+ * this.types('application/json');
+ * // => "application/json"
+ *
+ * // Accept: text/*, application/json
+ * this.types('image/png');
+ * this.types('png');
+ * // => undefined
+ *
+ * // Accept: text/*;q=.5, application/json
+ * this.types(['html', 'json']);
+ * this.types('html', 'json');
+ * // => "json"
+ *
+ * @param {String|Array} types...
+ * @return {String|Array|Boolean}
+ * @public
+ */
+
+Accepts.prototype.type =
+Accepts.prototype.types = function (types_) {
+ var types = types_
+
+ // support flattened arguments
+ if (types && !Array.isArray(types)) {
+ types = new Array(arguments.length)
+ for (var i = 0; i < types.length; i++) {
+ types[i] = arguments[i]
+ }
+ }
+
+ // no types, return all requested types
+ if (!types || types.length === 0) {
+ return this.negotiator.mediaTypes()
+ }
+
+ if (!this.headers.accept) return types[0];
+ var mimes = types.map(extToMime);
+ var accepts = this.negotiator.mediaTypes(mimes.filter(validMime));
+ var first = accepts[0];
+ if (!first) return false;
+ return types[mimes.indexOf(first)];
+}
+
+/**
+ * Return accepted encodings or best fit based on `encodings`.
+ *
+ * Given `Accept-Encoding: gzip, deflate`
+ * an array sorted by quality is returned:
+ *
+ * ['gzip', 'deflate']
+ *
+ * @param {String|Array} encodings...
+ * @return {String|Array}
+ * @public
+ */
+
+Accepts.prototype.encoding =
+Accepts.prototype.encodings = function (encodings_) {
+ var encodings = encodings_
+
+ // support flattened arguments
+ if (encodings && !Array.isArray(encodings)) {
+ encodings = new Array(arguments.length)
+ for (var i = 0; i < encodings.length; i++) {
+ encodings[i] = arguments[i]
+ }
+ }
+
+ // no encodings, return all requested encodings
+ if (!encodings || encodings.length === 0) {
+ return this.negotiator.encodings()
+ }
+
+ return this.negotiator.encodings(encodings)[0] || false
+}
+
+/**
+ * Return accepted charsets or best fit based on `charsets`.
+ *
+ * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5`
+ * an array sorted by quality is returned:
+ *
+ * ['utf-8', 'utf-7', 'iso-8859-1']
+ *
+ * @param {String|Array} charsets...
+ * @return {String|Array}
+ * @public
+ */
+
+Accepts.prototype.charset =
+Accepts.prototype.charsets = function (charsets_) {
+ var charsets = charsets_
+
+ // support flattened arguments
+ if (charsets && !Array.isArray(charsets)) {
+ charsets = new Array(arguments.length)
+ for (var i = 0; i < charsets.length; i++) {
+ charsets[i] = arguments[i]
+ }
+ }
+
+ // no charsets, return all requested charsets
+ if (!charsets || charsets.length === 0) {
+ return this.negotiator.charsets()
+ }
+
+ return this.negotiator.charsets(charsets)[0] || false
+}
+
+/**
+ * Return accepted languages or best fit based on `langs`.
+ *
+ * Given `Accept-Language: en;q=0.8, es, pt`
+ * an array sorted by quality is returned:
+ *
+ * ['es', 'pt', 'en']
+ *
+ * @param {String|Array} langs...
+ * @return {Array|String}
+ * @public
+ */
+
+Accepts.prototype.lang =
+Accepts.prototype.langs =
+Accepts.prototype.language =
+Accepts.prototype.languages = function (languages_) {
+ var languages = languages_
+
+ // support flattened arguments
+ if (languages && !Array.isArray(languages)) {
+ languages = new Array(arguments.length)
+ for (var i = 0; i < languages.length; i++) {
+ languages[i] = arguments[i]
+ }
+ }
+
+ // no languages, return all requested languages
+ if (!languages || languages.length === 0) {
+ return this.negotiator.languages()
+ }
+
+ return this.negotiator.languages(languages)[0] || false
+}
+
+/**
+ * Convert extnames to mime.
+ *
+ * @param {String} type
+ * @return {String}
+ * @private
+ */
+
+function extToMime(type) {
+ return type.indexOf('/') === -1
+ ? mime.lookup(type)
+ : type
+}
+
+/**
+ * Check if mime is valid.
+ *
+ * @param {String} type
+ * @return {String}
+ * @private
+ */
+
+function validMime(type) {
+ return typeof type === 'string';
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/HISTORY.md
new file mode 100644
index 0000000..31b24e0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/HISTORY.md
@@ -0,0 +1,210 @@
+2.1.13 / 2016-11-18
+===================
+
+ * deps: mime-db@~1.25.0
+ - Add new mime types
+
+2.1.12 / 2016-09-18
+===================
+
+ * deps: mime-db@~1.24.0
+ - Add new mime types
+ - Add `audio/mp3`
+
+2.1.11 / 2016-05-01
+===================
+
+ * deps: mime-db@~1.23.0
+ - Add new mime types
+
+2.1.10 / 2016-02-15
+===================
+
+ * deps: mime-db@~1.22.0
+ - Add new mime types
+ - Fix extension of `application/dash+xml`
+ - Update primary extension for `audio/mp4`
+
+2.1.9 / 2016-01-06
+==================
+
+ * deps: mime-db@~1.21.0
+ - Add new mime types
+
+2.1.8 / 2015-11-30
+==================
+
+ * deps: mime-db@~1.20.0
+ - Add new mime types
+
+2.1.7 / 2015-09-20
+==================
+
+ * deps: mime-db@~1.19.0
+ - Add new mime types
+
+2.1.6 / 2015-09-03
+==================
+
+ * deps: mime-db@~1.18.0
+ - Add new mime types
+
+2.1.5 / 2015-08-20
+==================
+
+ * deps: mime-db@~1.17.0
+ - Add new mime types
+
+2.1.4 / 2015-07-30
+==================
+
+ * deps: mime-db@~1.16.0
+ - Add new mime types
+
+2.1.3 / 2015-07-13
+==================
+
+ * deps: mime-db@~1.15.0
+ - Add new mime types
+
+2.1.2 / 2015-06-25
+==================
+
+ * deps: mime-db@~1.14.0
+ - Add new mime types
+
+2.1.1 / 2015-06-08
+==================
+
+ * perf: fix deopt during mapping
+
+2.1.0 / 2015-06-07
+==================
+
+ * Fix incorrectly treating extension-less file name as extension
+ - i.e. `'path/to/json'` will no longer return `application/json`
+ * Fix `.charset(type)` to accept parameters
+ * Fix `.charset(type)` to match case-insensitive
+ * Improve generation of extension to MIME mapping
+ * Refactor internals for readability and no argument reassignment
+ * Prefer `application/*` MIME types from the same source
+ * Prefer any type over `application/octet-stream`
+ * deps: mime-db@~1.13.0
+ - Add nginx as a source
+ - Add new mime types
+
+2.0.14 / 2015-06-06
+===================
+
+ * deps: mime-db@~1.12.0
+ - Add new mime types
+
+2.0.13 / 2015-05-31
+===================
+
+ * deps: mime-db@~1.11.0
+ - Add new mime types
+
+2.0.12 / 2015-05-19
+===================
+
+ * deps: mime-db@~1.10.0
+ - Add new mime types
+
+2.0.11 / 2015-05-05
+===================
+
+ * deps: mime-db@~1.9.1
+ - Add new mime types
+
+2.0.10 / 2015-03-13
+===================
+
+ * deps: mime-db@~1.8.0
+ - Add new mime types
+
+2.0.9 / 2015-02-09
+==================
+
+ * deps: mime-db@~1.7.0
+ - Add new mime types
+ - Community extensions ownership transferred from `node-mime`
+
+2.0.8 / 2015-01-29
+==================
+
+ * deps: mime-db@~1.6.0
+ - Add new mime types
+
+2.0.7 / 2014-12-30
+==================
+
+ * deps: mime-db@~1.5.0
+ - Add new mime types
+ - Fix various invalid MIME type entries
+
+2.0.6 / 2014-12-30
+==================
+
+ * deps: mime-db@~1.4.0
+ - Add new mime types
+ - Fix various invalid MIME type entries
+ - Remove example template MIME types
+
+2.0.5 / 2014-12-29
+==================
+
+ * deps: mime-db@~1.3.1
+ - Fix missing extensions
+
+2.0.4 / 2014-12-10
+==================
+
+ * deps: mime-db@~1.3.0
+ - Add new mime types
+
+2.0.3 / 2014-11-09
+==================
+
+ * deps: mime-db@~1.2.0
+ - Add new mime types
+
+2.0.2 / 2014-09-28
+==================
+
+ * deps: mime-db@~1.1.0
+ - Add new mime types
+ - Add additional compressible
+ - Update charsets
+
+2.0.1 / 2014-09-07
+==================
+
+ * Support Node.js 0.6
+
+2.0.0 / 2014-09-02
+==================
+
+ * Use `mime-db`
+ * Remove `.define()`
+
+1.0.2 / 2014-08-04
+==================
+
+ * Set charset=utf-8 for `text/javascript`
+
+1.0.1 / 2014-06-24
+==================
+
+ * Add `text/jsx` type
+
+1.0.0 / 2014-05-12
+==================
+
+ * Return `false` for unknown types
+ * Set charset=utf-8 for `application/json`
+
+0.1.0 / 2014-05-02
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/LICENSE
new file mode 100644
index 0000000..0616607
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/README.md
new file mode 100644
index 0000000..e77d615
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/README.md
@@ -0,0 +1,103 @@
+# mime-types
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+The ultimate javascript content-type utility.
+
+Similar to [node-mime](https://github.com/broofa/node-mime), except:
+
+- __No fallbacks.__ Instead of naively returning the first available type, `mime-types` simply returns `false`,
+ so do `var type = mime.lookup('unrecognized') || 'application/octet-stream'`.
+- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`.
+- Additional mime types are added such as jade and stylus via [mime-db](https://github.com/jshttp/mime-db)
+- No `.define()` functionality
+
+Otherwise, the API is compatible.
+
+## Install
+
+```sh
+$ npm install mime-types
+```
+
+## Adding Types
+
+All mime types are based on [mime-db](https://github.com/jshttp/mime-db),
+so open a PR there if you'd like to add mime types.
+
+## API
+
+```js
+var mime = require('mime-types')
+```
+
+All functions return `false` if input is invalid or not found.
+
+### mime.lookup(path)
+
+Lookup the content-type associated with a file.
+
+```js
+mime.lookup('json') // 'application/json'
+mime.lookup('.md') // 'text/x-markdown'
+mime.lookup('file.html') // 'text/html'
+mime.lookup('folder/file.js') // 'application/javascript'
+mime.lookup('folder/.htaccess') // false
+
+mime.lookup('cats') // false
+```
+
+### mime.contentType(type)
+
+Create a full content-type header given a content-type or extension.
+
+```js
+mime.contentType('markdown') // 'text/x-markdown; charset=utf-8'
+mime.contentType('file.json') // 'application/json; charset=utf-8'
+
+// from a full path
+mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8'
+```
+
+### mime.extension(type)
+
+Get the default extension for a content-type.
+
+```js
+mime.extension('application/octet-stream') // 'bin'
+```
+
+### mime.charset(type)
+
+Lookup the implied default charset of a content-type.
+
+```js
+mime.charset('text/x-markdown') // 'UTF-8'
+```
+
+### var type = mime.types[extension]
+
+A map of content-types by extension.
+
+### [extensions...] = mime.extensions[type]
+
+A map of extensions by content-type.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/mime-types.svg
+[npm-url]: https://npmjs.org/package/mime-types
+[node-version-image]: https://img.shields.io/node/v/mime-types.svg
+[node-version-url]: https://nodejs.org/en/download/
+[travis-image]: https://img.shields.io/travis/jshttp/mime-types/master.svg
+[travis-url]: https://travis-ci.org/jshttp/mime-types
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-types/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/mime-types
+[downloads-image]: https://img.shields.io/npm/dm/mime-types.svg
+[downloads-url]: https://npmjs.org/package/mime-types
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/index.js
new file mode 100644
index 0000000..9226ca5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/index.js
@@ -0,0 +1,188 @@
+/*!
+ * mime-types
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var db = require('mime-db')
+var extname = require('path').extname
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var extractTypeRegExp = /^\s*([^;\s]*)(?:;|\s|$)/
+var textTypeRegExp = /^text\//i
+
+/**
+ * Module exports.
+ * @public
+ */
+
+exports.charset = charset
+exports.charsets = { lookup: charset }
+exports.contentType = contentType
+exports.extension = extension
+exports.extensions = Object.create(null)
+exports.lookup = lookup
+exports.types = Object.create(null)
+
+// Populate the extensions/types maps
+populateMaps(exports.extensions, exports.types)
+
+/**
+ * Get the default charset for a MIME type.
+ *
+ * @param {string} type
+ * @return {boolean|string}
+ */
+
+function charset (type) {
+ if (!type || typeof type !== 'string') {
+ return false
+ }
+
+ // TODO: use media-typer
+ var match = extractTypeRegExp.exec(type)
+ var mime = match && db[match[1].toLowerCase()]
+
+ if (mime && mime.charset) {
+ return mime.charset
+ }
+
+ // default text/* to utf-8
+ if (match && textTypeRegExp.test(match[1])) {
+ return 'UTF-8'
+ }
+
+ return false
+}
+
+/**
+ * Create a full Content-Type header given a MIME type or extension.
+ *
+ * @param {string} str
+ * @return {boolean|string}
+ */
+
+function contentType (str) {
+ // TODO: should this even be in this module?
+ if (!str || typeof str !== 'string') {
+ return false
+ }
+
+ var mime = str.indexOf('/') === -1
+ ? exports.lookup(str)
+ : str
+
+ if (!mime) {
+ return false
+ }
+
+ // TODO: use content-type or other module
+ if (mime.indexOf('charset') === -1) {
+ var charset = exports.charset(mime)
+ if (charset) mime += '; charset=' + charset.toLowerCase()
+ }
+
+ return mime
+}
+
+/**
+ * Get the default extension for a MIME type.
+ *
+ * @param {string} type
+ * @return {boolean|string}
+ */
+
+function extension (type) {
+ if (!type || typeof type !== 'string') {
+ return false
+ }
+
+ // TODO: use media-typer
+ var match = extractTypeRegExp.exec(type)
+
+ // get extensions
+ var exts = match && exports.extensions[match[1].toLowerCase()]
+
+ if (!exts || !exts.length) {
+ return false
+ }
+
+ return exts[0]
+}
+
+/**
+ * Lookup the MIME type for a file path/extension.
+ *
+ * @param {string} path
+ * @return {boolean|string}
+ */
+
+function lookup (path) {
+ if (!path || typeof path !== 'string') {
+ return false
+ }
+
+ // get the extension ("ext" or ".ext" or full path)
+ var extension = extname('x.' + path)
+ .toLowerCase()
+ .substr(1)
+
+ if (!extension) {
+ return false
+ }
+
+ return exports.types[extension] || false
+}
+
+/**
+ * Populate the extensions and types maps.
+ * @private
+ */
+
+function populateMaps (extensions, types) {
+ // source preference (least -> most)
+ var preference = ['nginx', 'apache', undefined, 'iana']
+
+ Object.keys(db).forEach(function forEachMimeType (type) {
+ var mime = db[type]
+ var exts = mime.extensions
+
+ if (!exts || !exts.length) {
+ return
+ }
+
+ // mime -> extensions
+ extensions[type] = exts
+
+ // extension -> mime
+ for (var i = 0; i < exts.length; i++) {
+ var extension = exts[i]
+
+ if (types[extension]) {
+ var from = preference.indexOf(db[types[extension]].source)
+ var to = preference.indexOf(mime.source)
+
+ if (types[extension] !== 'application/octet-stream' &&
+ from > to || (from === to && types[extension].substr(0, 12) === 'application/')) {
+ // skip the remapping
+ continue
+ }
+ }
+
+ // set the extension -> mime
+ types[extension] = type
+ }
+ })
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/HISTORY.md
new file mode 100644
index 0000000..01fa85c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/HISTORY.md
@@ -0,0 +1,375 @@
+1.25.0 / 2016-11-11
+===================
+
+ * Add `application/dicom+json`
+ * Add `application/dicom+xml`
+ * Add `application/vnd.openstreetmap.data+xml`
+ * Add `application/vnd.tri.onesource`
+ * Add `application/yang-data+json`
+ * Add `application/yang-data+xml`
+
+1.24.0 / 2016-09-18
+===================
+
+ * Add `application/clue_info+xml`
+ * Add `application/geo+json`
+ * Add `application/lgr+xml`
+ * Add `application/vnd.amazon.mobi8-ebook`
+ * Add `application/vnd.chess-pgn`
+ * Add `application/vnd.comicbook+zip`
+ * Add `application/vnd.d2l.coursepackage1p0+zip`
+ * Add `application/vnd.espass-espass+zip`
+ * Add `application/vnd.nearst.inv+json`
+ * Add `application/vnd.oma.lwm2m+json`
+ * Add `application/vnd.oma.lwm2m+tlv`
+ * Add `application/vnd.quarantainenet`
+ * Add `application/vnd.rar`
+ * Add `audio/mp3`
+ * Add `image/dicom-rle`
+ * Add `image/emf`
+ * Add `image/jls`
+ * Add `image/wmf`
+ * Add `model/gltf+json`
+ * Add `text/vnd.ascii-art`
+
+1.23.0 / 2016-05-01
+===================
+
+ * Add `application/efi`
+ * Add `application/vnd.3gpp.sms+xml`
+ * Add `application/vnd.3lightssoftware.imagescal`
+ * Add `application/vnd.coreos.ignition+json`
+ * Add `application/vnd.desmume.movie`
+ * Add `application/vnd.onepager`
+ * Add `application/vnd.vel+json`
+ * Add `text/prs.prop.logic`
+ * Add `video/encaprtp`
+ * Add `video/h265`
+ * Add `video/iso.segment`
+ * Add `video/raptorfec`
+ * Add `video/rtploopback`
+ * Add `video/vnd.radgamettools.bink`
+ * Add `video/vnd.radgamettools.smacker`
+ * Add `video/vp8`
+ * Add extension `.3gpp` to `audio/3gpp`
+
+1.22.0 / 2016-02-15
+===================
+
+ * Add `application/ppsp-tracker+json`
+ * Add `application/problem+json`
+ * Add `application/problem+xml`
+ * Add `application/vnd.hdt`
+ * Add `application/vnd.ms-printschematicket+xml`
+ * Add `model/vnd.rosette.annotated-data-model`
+ * Add `text/slim`
+ * Add extension `.rng` to `application/xml`
+ * Fix extension of `application/dash+xml` to be `.mpd`
+ * Update primary extension to `.m4a` for `audio/mp4`
+
+1.21.0 / 2016-01-06
+===================
+
+ * Add `application/emergencycalldata.comment+xml`
+ * Add `application/emergencycalldata.deviceinfo+xml`
+ * Add `application/emergencycalldata.providerinfo+xml`
+ * Add `application/emergencycalldata.serviceinfo+xml`
+ * Add `application/emergencycalldata.subscriberinfo+xml`
+ * Add `application/vnd.filmit.zfc`
+ * Add `application/vnd.google-apps.document`
+ * Add `application/vnd.google-apps.presentation`
+ * Add `application/vnd.google-apps.spreadsheet`
+ * Add `application/vnd.mapbox-vector-tile`
+ * Add `application/vnd.ms-printdevicecapabilities+xml`
+ * Add `application/vnd.ms-windows.devicepairing`
+ * Add `application/vnd.ms-windows.nwprinting.oob`
+ * Add `application/vnd.tml`
+ * Add `audio/evs`
+
+1.20.0 / 2015-11-10
+===================
+
+ * Add `application/cdni`
+ * Add `application/csvm+json`
+ * Add `application/rfc+xml`
+ * Add `application/vnd.3gpp.access-transfer-events+xml`
+ * Add `application/vnd.3gpp.srvcc-ext+xml`
+ * Add `application/vnd.ms-windows.wsd.oob`
+ * Add `application/vnd.oxli.countgraph`
+ * Add `application/vnd.pagerduty+json`
+ * Add `text/x-suse-ymp`
+
+1.19.0 / 2015-09-17
+===================
+
+ * Add `application/vnd.3gpp-prose-pc3ch+xml`
+ * Add `application/vnd.3gpp.srvcc-info+xml`
+ * Add `application/vnd.apple.pkpass`
+ * Add `application/vnd.drive+json`
+
+1.18.0 / 2015-09-03
+===================
+
+ * Add `application/pkcs12`
+ * Add `application/vnd.3gpp-prose+xml`
+ * Add `application/vnd.3gpp.mid-call+xml`
+ * Add `application/vnd.3gpp.state-and-event-info+xml`
+ * Add `application/vnd.anki`
+ * Add `application/vnd.firemonkeys.cloudcell`
+ * Add `application/vnd.openblox.game+xml`
+ * Add `application/vnd.openblox.game-binary`
+
+1.17.0 / 2015-08-13
+===================
+
+ * Add `application/x-msdos-program`
+ * Add `audio/g711-0`
+ * Add `image/vnd.mozilla.apng`
+ * Add extension `.exe` to `application/x-msdos-program`
+
+1.16.0 / 2015-07-29
+===================
+
+ * Add `application/vnd.uri-map`
+
+1.15.0 / 2015-07-13
+===================
+
+ * Add `application/x-httpd-php`
+
+1.14.0 / 2015-06-25
+===================
+
+ * Add `application/scim+json`
+ * Add `application/vnd.3gpp.ussd+xml`
+ * Add `application/vnd.biopax.rdf+xml`
+ * Add `text/x-processing`
+
+1.13.0 / 2015-06-07
+===================
+
+ * Add nginx as a source
+ * Add `application/x-cocoa`
+ * Add `application/x-java-archive-diff`
+ * Add `application/x-makeself`
+ * Add `application/x-perl`
+ * Add `application/x-pilot`
+ * Add `application/x-redhat-package-manager`
+ * Add `application/x-sea`
+ * Add `audio/x-m4a`
+ * Add `audio/x-realaudio`
+ * Add `image/x-jng`
+ * Add `text/mathml`
+
+1.12.0 / 2015-06-05
+===================
+
+ * Add `application/bdoc`
+ * Add `application/vnd.hyperdrive+json`
+ * Add `application/x-bdoc`
+ * Add extension `.rtf` to `text/rtf`
+
+1.11.0 / 2015-05-31
+===================
+
+ * Add `audio/wav`
+ * Add `audio/wave`
+ * Add extension `.litcoffee` to `text/coffeescript`
+ * Add extension `.sfd-hdstx` to `application/vnd.hydrostatix.sof-data`
+ * Add extension `.n-gage` to `application/vnd.nokia.n-gage.symbian.install`
+
+1.10.0 / 2015-05-19
+===================
+
+ * Add `application/vnd.balsamiq.bmpr`
+ * Add `application/vnd.microsoft.portable-executable`
+ * Add `application/x-ns-proxy-autoconfig`
+
+1.9.1 / 2015-04-19
+==================
+
+ * Remove `.json` extension from `application/manifest+json`
+ - This is causing bugs downstream
+
+1.9.0 / 2015-04-19
+==================
+
+ * Add `application/manifest+json`
+ * Add `application/vnd.micro+json`
+ * Add `image/vnd.zbrush.pcx`
+ * Add `image/x-ms-bmp`
+
+1.8.0 / 2015-03-13
+==================
+
+ * Add `application/vnd.citationstyles.style+xml`
+ * Add `application/vnd.fastcopy-disk-image`
+ * Add `application/vnd.gov.sk.xmldatacontainer+xml`
+ * Add extension `.jsonld` to `application/ld+json`
+
+1.7.0 / 2015-02-08
+==================
+
+ * Add `application/vnd.gerber`
+ * Add `application/vnd.msa-disk-image`
+
+1.6.1 / 2015-02-05
+==================
+
+ * Community extensions ownership transferred from `node-mime`
+
+1.6.0 / 2015-01-29
+==================
+
+ * Add `application/jose`
+ * Add `application/jose+json`
+ * Add `application/json-seq`
+ * Add `application/jwk+json`
+ * Add `application/jwk-set+json`
+ * Add `application/jwt`
+ * Add `application/rdap+json`
+ * Add `application/vnd.gov.sk.e-form+xml`
+ * Add `application/vnd.ims.imsccv1p3`
+
+1.5.0 / 2014-12-30
+==================
+
+ * Add `application/vnd.oracle.resource+json`
+ * Fix various invalid MIME type entries
+ - `application/mbox+xml`
+ - `application/oscp-response`
+ - `application/vwg-multiplexed`
+ - `audio/g721`
+
+1.4.0 / 2014-12-21
+==================
+
+ * Add `application/vnd.ims.imsccv1p2`
+ * Fix various invalid MIME type entries
+ - `application/vnd-acucobol`
+ - `application/vnd-curl`
+ - `application/vnd-dart`
+ - `application/vnd-dxr`
+ - `application/vnd-fdf`
+ - `application/vnd-mif`
+ - `application/vnd-sema`
+ - `application/vnd-wap-wmlc`
+ - `application/vnd.adobe.flash-movie`
+ - `application/vnd.dece-zip`
+ - `application/vnd.dvb_service`
+ - `application/vnd.micrografx-igx`
+ - `application/vnd.sealed-doc`
+ - `application/vnd.sealed-eml`
+ - `application/vnd.sealed-mht`
+ - `application/vnd.sealed-ppt`
+ - `application/vnd.sealed-tiff`
+ - `application/vnd.sealed-xls`
+ - `application/vnd.sealedmedia.softseal-html`
+ - `application/vnd.sealedmedia.softseal-pdf`
+ - `application/vnd.wap-slc`
+ - `application/vnd.wap-wbxml`
+ - `audio/vnd.sealedmedia.softseal-mpeg`
+ - `image/vnd-djvu`
+ - `image/vnd-svf`
+ - `image/vnd-wap-wbmp`
+ - `image/vnd.sealed-png`
+ - `image/vnd.sealedmedia.softseal-gif`
+ - `image/vnd.sealedmedia.softseal-jpg`
+ - `model/vnd-dwf`
+ - `model/vnd.parasolid.transmit-binary`
+ - `model/vnd.parasolid.transmit-text`
+ - `text/vnd-a`
+ - `text/vnd-curl`
+ - `text/vnd.wap-wml`
+ * Remove example template MIME types
+ - `application/example`
+ - `audio/example`
+ - `image/example`
+ - `message/example`
+ - `model/example`
+ - `multipart/example`
+ - `text/example`
+ - `video/example`
+
+1.3.1 / 2014-12-16
+==================
+
+ * Fix missing extensions
+ - `application/json5`
+ - `text/hjson`
+
+1.3.0 / 2014-12-07
+==================
+
+ * Add `application/a2l`
+ * Add `application/aml`
+ * Add `application/atfx`
+ * Add `application/atxml`
+ * Add `application/cdfx+xml`
+ * Add `application/dii`
+ * Add `application/json5`
+ * Add `application/lxf`
+ * Add `application/mf4`
+ * Add `application/vnd.apache.thrift.compact`
+ * Add `application/vnd.apache.thrift.json`
+ * Add `application/vnd.coffeescript`
+ * Add `application/vnd.enphase.envoy`
+ * Add `application/vnd.ims.imsccv1p1`
+ * Add `text/csv-schema`
+ * Add `text/hjson`
+ * Add `text/markdown`
+ * Add `text/yaml`
+
+1.2.0 / 2014-11-09
+==================
+
+ * Add `application/cea`
+ * Add `application/dit`
+ * Add `application/vnd.gov.sk.e-form+zip`
+ * Add `application/vnd.tmd.mediaflex.api+xml`
+ * Type `application/epub+zip` is now IANA-registered
+
+1.1.2 / 2014-10-23
+==================
+
+ * Rebuild database for `application/x-www-form-urlencoded` change
+
+1.1.1 / 2014-10-20
+==================
+
+ * Mark `application/x-www-form-urlencoded` as compressible.
+
+1.1.0 / 2014-09-28
+==================
+
+ * Add `application/font-woff2`
+
+1.0.3 / 2014-09-25
+==================
+
+ * Fix engine requirement in package
+
+1.0.2 / 2014-09-25
+==================
+
+ * Add `application/coap-group+json`
+ * Add `application/dcd`
+ * Add `application/vnd.apache.thrift.binary`
+ * Add `image/vnd.tencent.tap`
+ * Mark all JSON-derived types as compressible
+ * Update `text/vtt` data
+
+1.0.1 / 2014-08-30
+==================
+
+ * Fix extension ordering
+
+1.0.0 / 2014-08-30
+==================
+
+ * Add `application/atf`
+ * Add `application/merge-patch+json`
+ * Add `multipart/x-mixed-replace`
+ * Add `source: 'apache'` metadata
+ * Add `source: 'iana'` metadata
+ * Remove badly-assumed charset data
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/LICENSE
new file mode 100644
index 0000000..a7ae8ee
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/README.md
new file mode 100644
index 0000000..7662440
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/README.md
@@ -0,0 +1,82 @@
+# mime-db
+
+[![NPM Version][npm-version-image]][npm-url]
+[![NPM Downloads][npm-downloads-image]][npm-url]
+[![Node.js Version][node-image]][node-url]
+[![Build Status][travis-image]][travis-url]
+[![Coverage Status][coveralls-image]][coveralls-url]
+
+This is a database of all mime types.
+It consists of a single, public JSON file and does not include any logic,
+allowing it to remain as un-opinionated as possible with an API.
+It aggregates data from the following sources:
+
+- http://www.iana.org/assignments/media-types/media-types.xhtml
+- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
+- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types
+
+## Installation
+
+```bash
+npm install mime-db
+```
+
+### Database Download
+
+If you're crazy enough to use this in the browser, you can just grab the
+JSON file using [RawGit](https://rawgit.com/). It is recommended to replace
+`master` with [a release tag](https://github.com/jshttp/mime-db/tags) as the
+JSON format may change in the future.
+
+```
+https://cdn.rawgit.com/jshttp/mime-db/master/db.json
+```
+
+## Usage
+
+```js
+var db = require('mime-db');
+
+// grab data on .js files
+var data = db['application/javascript'];
+```
+
+## Data Structure
+
+The JSON file is a map lookup for lowercased mime types.
+Each mime type has the following properties:
+
+- `.source` - where the mime type is defined.
+ If not set, it's probably a custom media type.
+ - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types)
+ - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml)
+ - `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types)
+- `.extensions[]` - known extensions associated with this mime type.
+- `.compressible` - whether a file of this type can be gzipped.
+- `.charset` - the default charset associated with this type, if any.
+
+If unknown, every property could be `undefined`.
+
+## Contributing
+
+To edit the database, only make PRs against `src/custom.json` or
+`src/custom-suffix.json`.
+
+To update the build, run `npm run build`.
+
+## Adding Custom Media Types
+
+The best way to get new media types included in this library is to register
+them with the IANA. The community registration procedure is outlined in
+[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types
+registered with the IANA are automatically pulled into this library.
+
+[npm-version-image]: https://img.shields.io/npm/v/mime-db.svg
+[npm-downloads-image]: https://img.shields.io/npm/dm/mime-db.svg
+[npm-url]: https://npmjs.org/package/mime-db
+[travis-image]: https://img.shields.io/travis/jshttp/mime-db/master.svg
+[travis-url]: https://travis-ci.org/jshttp/mime-db
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-db/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master
+[node-image]: https://img.shields.io/node/v/mime-db.svg
+[node-url]: http://nodejs.org/download/
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/db.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/db.json
new file mode 100644
index 0000000..94384d3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/db.json
@@ -0,0 +1,6712 @@
+{
+ "application/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "application/3gpdash-qoe-report+xml": {
+ "source": "iana"
+ },
+ "application/3gpp-ims+xml": {
+ "source": "iana"
+ },
+ "application/a2l": {
+ "source": "iana"
+ },
+ "application/activemessage": {
+ "source": "iana"
+ },
+ "application/alto-costmap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-costmapfilter+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-directory+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointcost+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointcostparams+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointprop+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointpropparams+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-error+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-networkmap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-networkmapfilter+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/aml": {
+ "source": "iana"
+ },
+ "application/andrew-inset": {
+ "source": "iana",
+ "extensions": ["ez"]
+ },
+ "application/applefile": {
+ "source": "iana"
+ },
+ "application/applixware": {
+ "source": "apache",
+ "extensions": ["aw"]
+ },
+ "application/atf": {
+ "source": "iana"
+ },
+ "application/atfx": {
+ "source": "iana"
+ },
+ "application/atom+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["atom"]
+ },
+ "application/atomcat+xml": {
+ "source": "iana",
+ "extensions": ["atomcat"]
+ },
+ "application/atomdeleted+xml": {
+ "source": "iana"
+ },
+ "application/atomicmail": {
+ "source": "iana"
+ },
+ "application/atomsvc+xml": {
+ "source": "iana",
+ "extensions": ["atomsvc"]
+ },
+ "application/atxml": {
+ "source": "iana"
+ },
+ "application/auth-policy+xml": {
+ "source": "iana"
+ },
+ "application/bacnet-xdd+zip": {
+ "source": "iana"
+ },
+ "application/batch-smtp": {
+ "source": "iana"
+ },
+ "application/bdoc": {
+ "compressible": false,
+ "extensions": ["bdoc"]
+ },
+ "application/beep+xml": {
+ "source": "iana"
+ },
+ "application/calendar+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/calendar+xml": {
+ "source": "iana"
+ },
+ "application/call-completion": {
+ "source": "iana"
+ },
+ "application/cals-1840": {
+ "source": "iana"
+ },
+ "application/cbor": {
+ "source": "iana"
+ },
+ "application/ccmp+xml": {
+ "source": "iana"
+ },
+ "application/ccxml+xml": {
+ "source": "iana",
+ "extensions": ["ccxml"]
+ },
+ "application/cdfx+xml": {
+ "source": "iana"
+ },
+ "application/cdmi-capability": {
+ "source": "iana",
+ "extensions": ["cdmia"]
+ },
+ "application/cdmi-container": {
+ "source": "iana",
+ "extensions": ["cdmic"]
+ },
+ "application/cdmi-domain": {
+ "source": "iana",
+ "extensions": ["cdmid"]
+ },
+ "application/cdmi-object": {
+ "source": "iana",
+ "extensions": ["cdmio"]
+ },
+ "application/cdmi-queue": {
+ "source": "iana",
+ "extensions": ["cdmiq"]
+ },
+ "application/cdni": {
+ "source": "iana"
+ },
+ "application/cea": {
+ "source": "iana"
+ },
+ "application/cea-2018+xml": {
+ "source": "iana"
+ },
+ "application/cellml+xml": {
+ "source": "iana"
+ },
+ "application/cfw": {
+ "source": "iana"
+ },
+ "application/clue_info+xml": {
+ "source": "iana"
+ },
+ "application/cms": {
+ "source": "iana"
+ },
+ "application/cnrp+xml": {
+ "source": "iana"
+ },
+ "application/coap-group+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/commonground": {
+ "source": "iana"
+ },
+ "application/conference-info+xml": {
+ "source": "iana"
+ },
+ "application/cpl+xml": {
+ "source": "iana"
+ },
+ "application/csrattrs": {
+ "source": "iana"
+ },
+ "application/csta+xml": {
+ "source": "iana"
+ },
+ "application/cstadata+xml": {
+ "source": "iana"
+ },
+ "application/csvm+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/cu-seeme": {
+ "source": "apache",
+ "extensions": ["cu"]
+ },
+ "application/cybercash": {
+ "source": "iana"
+ },
+ "application/dart": {
+ "compressible": true
+ },
+ "application/dash+xml": {
+ "source": "iana",
+ "extensions": ["mpd"]
+ },
+ "application/dashdelta": {
+ "source": "iana"
+ },
+ "application/davmount+xml": {
+ "source": "iana",
+ "extensions": ["davmount"]
+ },
+ "application/dca-rft": {
+ "source": "iana"
+ },
+ "application/dcd": {
+ "source": "iana"
+ },
+ "application/dec-dx": {
+ "source": "iana"
+ },
+ "application/dialog-info+xml": {
+ "source": "iana"
+ },
+ "application/dicom": {
+ "source": "iana"
+ },
+ "application/dicom+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/dicom+xml": {
+ "source": "iana"
+ },
+ "application/dii": {
+ "source": "iana"
+ },
+ "application/dit": {
+ "source": "iana"
+ },
+ "application/dns": {
+ "source": "iana"
+ },
+ "application/docbook+xml": {
+ "source": "apache",
+ "extensions": ["dbk"]
+ },
+ "application/dskpp+xml": {
+ "source": "iana"
+ },
+ "application/dssc+der": {
+ "source": "iana",
+ "extensions": ["dssc"]
+ },
+ "application/dssc+xml": {
+ "source": "iana",
+ "extensions": ["xdssc"]
+ },
+ "application/dvcs": {
+ "source": "iana"
+ },
+ "application/ecmascript": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["ecma"]
+ },
+ "application/edi-consent": {
+ "source": "iana"
+ },
+ "application/edi-x12": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/edifact": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/efi": {
+ "source": "iana"
+ },
+ "application/emergencycalldata.comment+xml": {
+ "source": "iana"
+ },
+ "application/emergencycalldata.deviceinfo+xml": {
+ "source": "iana"
+ },
+ "application/emergencycalldata.providerinfo+xml": {
+ "source": "iana"
+ },
+ "application/emergencycalldata.serviceinfo+xml": {
+ "source": "iana"
+ },
+ "application/emergencycalldata.subscriberinfo+xml": {
+ "source": "iana"
+ },
+ "application/emma+xml": {
+ "source": "iana",
+ "extensions": ["emma"]
+ },
+ "application/emotionml+xml": {
+ "source": "iana"
+ },
+ "application/encaprtp": {
+ "source": "iana"
+ },
+ "application/epp+xml": {
+ "source": "iana"
+ },
+ "application/epub+zip": {
+ "source": "iana",
+ "extensions": ["epub"]
+ },
+ "application/eshop": {
+ "source": "iana"
+ },
+ "application/exi": {
+ "source": "iana",
+ "extensions": ["exi"]
+ },
+ "application/fastinfoset": {
+ "source": "iana"
+ },
+ "application/fastsoap": {
+ "source": "iana"
+ },
+ "application/fdt+xml": {
+ "source": "iana"
+ },
+ "application/fits": {
+ "source": "iana"
+ },
+ "application/font-sfnt": {
+ "source": "iana"
+ },
+ "application/font-tdpfr": {
+ "source": "iana",
+ "extensions": ["pfr"]
+ },
+ "application/font-woff": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["woff"]
+ },
+ "application/font-woff2": {
+ "compressible": false,
+ "extensions": ["woff2"]
+ },
+ "application/framework-attributes+xml": {
+ "source": "iana"
+ },
+ "application/geo+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/gml+xml": {
+ "source": "apache",
+ "extensions": ["gml"]
+ },
+ "application/gpx+xml": {
+ "source": "apache",
+ "extensions": ["gpx"]
+ },
+ "application/gxf": {
+ "source": "apache",
+ "extensions": ["gxf"]
+ },
+ "application/gzip": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/h224": {
+ "source": "iana"
+ },
+ "application/held+xml": {
+ "source": "iana"
+ },
+ "application/http": {
+ "source": "iana"
+ },
+ "application/hyperstudio": {
+ "source": "iana",
+ "extensions": ["stk"]
+ },
+ "application/ibe-key-request+xml": {
+ "source": "iana"
+ },
+ "application/ibe-pkg-reply+xml": {
+ "source": "iana"
+ },
+ "application/ibe-pp-data": {
+ "source": "iana"
+ },
+ "application/iges": {
+ "source": "iana"
+ },
+ "application/im-iscomposing+xml": {
+ "source": "iana"
+ },
+ "application/index": {
+ "source": "iana"
+ },
+ "application/index.cmd": {
+ "source": "iana"
+ },
+ "application/index.obj": {
+ "source": "iana"
+ },
+ "application/index.response": {
+ "source": "iana"
+ },
+ "application/index.vnd": {
+ "source": "iana"
+ },
+ "application/inkml+xml": {
+ "source": "iana",
+ "extensions": ["ink","inkml"]
+ },
+ "application/iotp": {
+ "source": "iana"
+ },
+ "application/ipfix": {
+ "source": "iana",
+ "extensions": ["ipfix"]
+ },
+ "application/ipp": {
+ "source": "iana"
+ },
+ "application/isup": {
+ "source": "iana"
+ },
+ "application/its+xml": {
+ "source": "iana"
+ },
+ "application/java-archive": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["jar","war","ear"]
+ },
+ "application/java-serialized-object": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["ser"]
+ },
+ "application/java-vm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["class"]
+ },
+ "application/javascript": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["js"]
+ },
+ "application/jose": {
+ "source": "iana"
+ },
+ "application/jose+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jrd+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/json": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["json","map"]
+ },
+ "application/json-patch+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/json-seq": {
+ "source": "iana"
+ },
+ "application/json5": {
+ "extensions": ["json5"]
+ },
+ "application/jsonml+json": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["jsonml"]
+ },
+ "application/jwk+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jwk-set+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jwt": {
+ "source": "iana"
+ },
+ "application/kpml-request+xml": {
+ "source": "iana"
+ },
+ "application/kpml-response+xml": {
+ "source": "iana"
+ },
+ "application/ld+json": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["jsonld"]
+ },
+ "application/lgr+xml": {
+ "source": "iana"
+ },
+ "application/link-format": {
+ "source": "iana"
+ },
+ "application/load-control+xml": {
+ "source": "iana"
+ },
+ "application/lost+xml": {
+ "source": "iana",
+ "extensions": ["lostxml"]
+ },
+ "application/lostsync+xml": {
+ "source": "iana"
+ },
+ "application/lxf": {
+ "source": "iana"
+ },
+ "application/mac-binhex40": {
+ "source": "iana",
+ "extensions": ["hqx"]
+ },
+ "application/mac-compactpro": {
+ "source": "apache",
+ "extensions": ["cpt"]
+ },
+ "application/macwriteii": {
+ "source": "iana"
+ },
+ "application/mads+xml": {
+ "source": "iana",
+ "extensions": ["mads"]
+ },
+ "application/manifest+json": {
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["webmanifest"]
+ },
+ "application/marc": {
+ "source": "iana",
+ "extensions": ["mrc"]
+ },
+ "application/marcxml+xml": {
+ "source": "iana",
+ "extensions": ["mrcx"]
+ },
+ "application/mathematica": {
+ "source": "iana",
+ "extensions": ["ma","nb","mb"]
+ },
+ "application/mathml+xml": {
+ "source": "iana",
+ "extensions": ["mathml"]
+ },
+ "application/mathml-content+xml": {
+ "source": "iana"
+ },
+ "application/mathml-presentation+xml": {
+ "source": "iana"
+ },
+ "application/mbms-associated-procedure-description+xml": {
+ "source": "iana"
+ },
+ "application/mbms-deregister+xml": {
+ "source": "iana"
+ },
+ "application/mbms-envelope+xml": {
+ "source": "iana"
+ },
+ "application/mbms-msk+xml": {
+ "source": "iana"
+ },
+ "application/mbms-msk-response+xml": {
+ "source": "iana"
+ },
+ "application/mbms-protection-description+xml": {
+ "source": "iana"
+ },
+ "application/mbms-reception-report+xml": {
+ "source": "iana"
+ },
+ "application/mbms-register+xml": {
+ "source": "iana"
+ },
+ "application/mbms-register-response+xml": {
+ "source": "iana"
+ },
+ "application/mbms-schedule+xml": {
+ "source": "iana"
+ },
+ "application/mbms-user-service-description+xml": {
+ "source": "iana"
+ },
+ "application/mbox": {
+ "source": "iana",
+ "extensions": ["mbox"]
+ },
+ "application/media-policy-dataset+xml": {
+ "source": "iana"
+ },
+ "application/media_control+xml": {
+ "source": "iana"
+ },
+ "application/mediaservercontrol+xml": {
+ "source": "iana",
+ "extensions": ["mscml"]
+ },
+ "application/merge-patch+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/metalink+xml": {
+ "source": "apache",
+ "extensions": ["metalink"]
+ },
+ "application/metalink4+xml": {
+ "source": "iana",
+ "extensions": ["meta4"]
+ },
+ "application/mets+xml": {
+ "source": "iana",
+ "extensions": ["mets"]
+ },
+ "application/mf4": {
+ "source": "iana"
+ },
+ "application/mikey": {
+ "source": "iana"
+ },
+ "application/mods+xml": {
+ "source": "iana",
+ "extensions": ["mods"]
+ },
+ "application/moss-keys": {
+ "source": "iana"
+ },
+ "application/moss-signature": {
+ "source": "iana"
+ },
+ "application/mosskey-data": {
+ "source": "iana"
+ },
+ "application/mosskey-request": {
+ "source": "iana"
+ },
+ "application/mp21": {
+ "source": "iana",
+ "extensions": ["m21","mp21"]
+ },
+ "application/mp4": {
+ "source": "iana",
+ "extensions": ["mp4s","m4p"]
+ },
+ "application/mpeg4-generic": {
+ "source": "iana"
+ },
+ "application/mpeg4-iod": {
+ "source": "iana"
+ },
+ "application/mpeg4-iod-xmt": {
+ "source": "iana"
+ },
+ "application/mrb-consumer+xml": {
+ "source": "iana"
+ },
+ "application/mrb-publish+xml": {
+ "source": "iana"
+ },
+ "application/msc-ivr+xml": {
+ "source": "iana"
+ },
+ "application/msc-mixer+xml": {
+ "source": "iana"
+ },
+ "application/msword": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["doc","dot"]
+ },
+ "application/mxf": {
+ "source": "iana",
+ "extensions": ["mxf"]
+ },
+ "application/nasdata": {
+ "source": "iana"
+ },
+ "application/news-checkgroups": {
+ "source": "iana"
+ },
+ "application/news-groupinfo": {
+ "source": "iana"
+ },
+ "application/news-transmission": {
+ "source": "iana"
+ },
+ "application/nlsml+xml": {
+ "source": "iana"
+ },
+ "application/nss": {
+ "source": "iana"
+ },
+ "application/ocsp-request": {
+ "source": "iana"
+ },
+ "application/ocsp-response": {
+ "source": "iana"
+ },
+ "application/octet-stream": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]
+ },
+ "application/oda": {
+ "source": "iana",
+ "extensions": ["oda"]
+ },
+ "application/odx": {
+ "source": "iana"
+ },
+ "application/oebps-package+xml": {
+ "source": "iana",
+ "extensions": ["opf"]
+ },
+ "application/ogg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ogx"]
+ },
+ "application/omdoc+xml": {
+ "source": "apache",
+ "extensions": ["omdoc"]
+ },
+ "application/onenote": {
+ "source": "apache",
+ "extensions": ["onetoc","onetoc2","onetmp","onepkg"]
+ },
+ "application/oxps": {
+ "source": "iana",
+ "extensions": ["oxps"]
+ },
+ "application/p2p-overlay+xml": {
+ "source": "iana"
+ },
+ "application/parityfec": {
+ "source": "iana"
+ },
+ "application/patch-ops-error+xml": {
+ "source": "iana",
+ "extensions": ["xer"]
+ },
+ "application/pdf": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pdf"]
+ },
+ "application/pdx": {
+ "source": "iana"
+ },
+ "application/pgp-encrypted": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pgp"]
+ },
+ "application/pgp-keys": {
+ "source": "iana"
+ },
+ "application/pgp-signature": {
+ "source": "iana",
+ "extensions": ["asc","sig"]
+ },
+ "application/pics-rules": {
+ "source": "apache",
+ "extensions": ["prf"]
+ },
+ "application/pidf+xml": {
+ "source": "iana"
+ },
+ "application/pidf-diff+xml": {
+ "source": "iana"
+ },
+ "application/pkcs10": {
+ "source": "iana",
+ "extensions": ["p10"]
+ },
+ "application/pkcs12": {
+ "source": "iana"
+ },
+ "application/pkcs7-mime": {
+ "source": "iana",
+ "extensions": ["p7m","p7c"]
+ },
+ "application/pkcs7-signature": {
+ "source": "iana",
+ "extensions": ["p7s"]
+ },
+ "application/pkcs8": {
+ "source": "iana",
+ "extensions": ["p8"]
+ },
+ "application/pkix-attr-cert": {
+ "source": "iana",
+ "extensions": ["ac"]
+ },
+ "application/pkix-cert": {
+ "source": "iana",
+ "extensions": ["cer"]
+ },
+ "application/pkix-crl": {
+ "source": "iana",
+ "extensions": ["crl"]
+ },
+ "application/pkix-pkipath": {
+ "source": "iana",
+ "extensions": ["pkipath"]
+ },
+ "application/pkixcmp": {
+ "source": "iana",
+ "extensions": ["pki"]
+ },
+ "application/pls+xml": {
+ "source": "iana",
+ "extensions": ["pls"]
+ },
+ "application/poc-settings+xml": {
+ "source": "iana"
+ },
+ "application/postscript": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["ai","eps","ps"]
+ },
+ "application/ppsp-tracker+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/problem+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/problem+xml": {
+ "source": "iana"
+ },
+ "application/provenance+xml": {
+ "source": "iana"
+ },
+ "application/prs.alvestrand.titrax-sheet": {
+ "source": "iana"
+ },
+ "application/prs.cww": {
+ "source": "iana",
+ "extensions": ["cww"]
+ },
+ "application/prs.hpub+zip": {
+ "source": "iana"
+ },
+ "application/prs.nprend": {
+ "source": "iana"
+ },
+ "application/prs.plucker": {
+ "source": "iana"
+ },
+ "application/prs.rdf-xml-crypt": {
+ "source": "iana"
+ },
+ "application/prs.xsf+xml": {
+ "source": "iana"
+ },
+ "application/pskc+xml": {
+ "source": "iana",
+ "extensions": ["pskcxml"]
+ },
+ "application/qsig": {
+ "source": "iana"
+ },
+ "application/raptorfec": {
+ "source": "iana"
+ },
+ "application/rdap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/rdf+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rdf"]
+ },
+ "application/reginfo+xml": {
+ "source": "iana",
+ "extensions": ["rif"]
+ },
+ "application/relax-ng-compact-syntax": {
+ "source": "iana",
+ "extensions": ["rnc"]
+ },
+ "application/remote-printing": {
+ "source": "iana"
+ },
+ "application/reputon+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/resource-lists+xml": {
+ "source": "iana",
+ "extensions": ["rl"]
+ },
+ "application/resource-lists-diff+xml": {
+ "source": "iana",
+ "extensions": ["rld"]
+ },
+ "application/rfc+xml": {
+ "source": "iana"
+ },
+ "application/riscos": {
+ "source": "iana"
+ },
+ "application/rlmi+xml": {
+ "source": "iana"
+ },
+ "application/rls-services+xml": {
+ "source": "iana",
+ "extensions": ["rs"]
+ },
+ "application/rpki-ghostbusters": {
+ "source": "iana",
+ "extensions": ["gbr"]
+ },
+ "application/rpki-manifest": {
+ "source": "iana",
+ "extensions": ["mft"]
+ },
+ "application/rpki-roa": {
+ "source": "iana",
+ "extensions": ["roa"]
+ },
+ "application/rpki-updown": {
+ "source": "iana"
+ },
+ "application/rsd+xml": {
+ "source": "apache",
+ "extensions": ["rsd"]
+ },
+ "application/rss+xml": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["rss"]
+ },
+ "application/rtf": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rtf"]
+ },
+ "application/rtploopback": {
+ "source": "iana"
+ },
+ "application/rtx": {
+ "source": "iana"
+ },
+ "application/samlassertion+xml": {
+ "source": "iana"
+ },
+ "application/samlmetadata+xml": {
+ "source": "iana"
+ },
+ "application/sbml+xml": {
+ "source": "iana",
+ "extensions": ["sbml"]
+ },
+ "application/scaip+xml": {
+ "source": "iana"
+ },
+ "application/scim+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/scvp-cv-request": {
+ "source": "iana",
+ "extensions": ["scq"]
+ },
+ "application/scvp-cv-response": {
+ "source": "iana",
+ "extensions": ["scs"]
+ },
+ "application/scvp-vp-request": {
+ "source": "iana",
+ "extensions": ["spq"]
+ },
+ "application/scvp-vp-response": {
+ "source": "iana",
+ "extensions": ["spp"]
+ },
+ "application/sdp": {
+ "source": "iana",
+ "extensions": ["sdp"]
+ },
+ "application/sep+xml": {
+ "source": "iana"
+ },
+ "application/sep-exi": {
+ "source": "iana"
+ },
+ "application/session-info": {
+ "source": "iana"
+ },
+ "application/set-payment": {
+ "source": "iana"
+ },
+ "application/set-payment-initiation": {
+ "source": "iana",
+ "extensions": ["setpay"]
+ },
+ "application/set-registration": {
+ "source": "iana"
+ },
+ "application/set-registration-initiation": {
+ "source": "iana",
+ "extensions": ["setreg"]
+ },
+ "application/sgml": {
+ "source": "iana"
+ },
+ "application/sgml-open-catalog": {
+ "source": "iana"
+ },
+ "application/shf+xml": {
+ "source": "iana",
+ "extensions": ["shf"]
+ },
+ "application/sieve": {
+ "source": "iana"
+ },
+ "application/simple-filter+xml": {
+ "source": "iana"
+ },
+ "application/simple-message-summary": {
+ "source": "iana"
+ },
+ "application/simplesymbolcontainer": {
+ "source": "iana"
+ },
+ "application/slate": {
+ "source": "iana"
+ },
+ "application/smil": {
+ "source": "iana"
+ },
+ "application/smil+xml": {
+ "source": "iana",
+ "extensions": ["smi","smil"]
+ },
+ "application/smpte336m": {
+ "source": "iana"
+ },
+ "application/soap+fastinfoset": {
+ "source": "iana"
+ },
+ "application/soap+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/sparql-query": {
+ "source": "iana",
+ "extensions": ["rq"]
+ },
+ "application/sparql-results+xml": {
+ "source": "iana",
+ "extensions": ["srx"]
+ },
+ "application/spirits-event+xml": {
+ "source": "iana"
+ },
+ "application/sql": {
+ "source": "iana"
+ },
+ "application/srgs": {
+ "source": "iana",
+ "extensions": ["gram"]
+ },
+ "application/srgs+xml": {
+ "source": "iana",
+ "extensions": ["grxml"]
+ },
+ "application/sru+xml": {
+ "source": "iana",
+ "extensions": ["sru"]
+ },
+ "application/ssdl+xml": {
+ "source": "apache",
+ "extensions": ["ssdl"]
+ },
+ "application/ssml+xml": {
+ "source": "iana",
+ "extensions": ["ssml"]
+ },
+ "application/tamp-apex-update": {
+ "source": "iana"
+ },
+ "application/tamp-apex-update-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-community-update": {
+ "source": "iana"
+ },
+ "application/tamp-community-update-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-error": {
+ "source": "iana"
+ },
+ "application/tamp-sequence-adjust": {
+ "source": "iana"
+ },
+ "application/tamp-sequence-adjust-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-status-query": {
+ "source": "iana"
+ },
+ "application/tamp-status-response": {
+ "source": "iana"
+ },
+ "application/tamp-update": {
+ "source": "iana"
+ },
+ "application/tamp-update-confirm": {
+ "source": "iana"
+ },
+ "application/tar": {
+ "compressible": true
+ },
+ "application/tei+xml": {
+ "source": "iana",
+ "extensions": ["tei","teicorpus"]
+ },
+ "application/thraud+xml": {
+ "source": "iana",
+ "extensions": ["tfi"]
+ },
+ "application/timestamp-query": {
+ "source": "iana"
+ },
+ "application/timestamp-reply": {
+ "source": "iana"
+ },
+ "application/timestamped-data": {
+ "source": "iana",
+ "extensions": ["tsd"]
+ },
+ "application/ttml+xml": {
+ "source": "iana"
+ },
+ "application/tve-trigger": {
+ "source": "iana"
+ },
+ "application/ulpfec": {
+ "source": "iana"
+ },
+ "application/urc-grpsheet+xml": {
+ "source": "iana"
+ },
+ "application/urc-ressheet+xml": {
+ "source": "iana"
+ },
+ "application/urc-targetdesc+xml": {
+ "source": "iana"
+ },
+ "application/urc-uisocketdesc+xml": {
+ "source": "iana"
+ },
+ "application/vcard+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vcard+xml": {
+ "source": "iana"
+ },
+ "application/vemmi": {
+ "source": "iana"
+ },
+ "application/vividence.scriptfile": {
+ "source": "apache"
+ },
+ "application/vnd.3gpp-prose+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp-prose-pc3ch+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.access-transfer-events+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.bsf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.mid-call+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.pic-bw-large": {
+ "source": "iana",
+ "extensions": ["plb"]
+ },
+ "application/vnd.3gpp.pic-bw-small": {
+ "source": "iana",
+ "extensions": ["psb"]
+ },
+ "application/vnd.3gpp.pic-bw-var": {
+ "source": "iana",
+ "extensions": ["pvb"]
+ },
+ "application/vnd.3gpp.sms": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.sms+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.srvcc-ext+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.srvcc-info+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.state-and-event-info+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.ussd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp2.bcmcsinfo+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp2.sms": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp2.tcap": {
+ "source": "iana",
+ "extensions": ["tcap"]
+ },
+ "application/vnd.3lightssoftware.imagescal": {
+ "source": "iana"
+ },
+ "application/vnd.3m.post-it-notes": {
+ "source": "iana",
+ "extensions": ["pwn"]
+ },
+ "application/vnd.accpac.simply.aso": {
+ "source": "iana",
+ "extensions": ["aso"]
+ },
+ "application/vnd.accpac.simply.imp": {
+ "source": "iana",
+ "extensions": ["imp"]
+ },
+ "application/vnd.acucobol": {
+ "source": "iana",
+ "extensions": ["acu"]
+ },
+ "application/vnd.acucorp": {
+ "source": "iana",
+ "extensions": ["atc","acutc"]
+ },
+ "application/vnd.adobe.air-application-installer-package+zip": {
+ "source": "apache",
+ "extensions": ["air"]
+ },
+ "application/vnd.adobe.flash.movie": {
+ "source": "iana"
+ },
+ "application/vnd.adobe.formscentral.fcdt": {
+ "source": "iana",
+ "extensions": ["fcdt"]
+ },
+ "application/vnd.adobe.fxp": {
+ "source": "iana",
+ "extensions": ["fxp","fxpl"]
+ },
+ "application/vnd.adobe.partial-upload": {
+ "source": "iana"
+ },
+ "application/vnd.adobe.xdp+xml": {
+ "source": "iana",
+ "extensions": ["xdp"]
+ },
+ "application/vnd.adobe.xfdf": {
+ "source": "iana",
+ "extensions": ["xfdf"]
+ },
+ "application/vnd.aether.imp": {
+ "source": "iana"
+ },
+ "application/vnd.ah-barcode": {
+ "source": "iana"
+ },
+ "application/vnd.ahead.space": {
+ "source": "iana",
+ "extensions": ["ahead"]
+ },
+ "application/vnd.airzip.filesecure.azf": {
+ "source": "iana",
+ "extensions": ["azf"]
+ },
+ "application/vnd.airzip.filesecure.azs": {
+ "source": "iana",
+ "extensions": ["azs"]
+ },
+ "application/vnd.amazon.ebook": {
+ "source": "apache",
+ "extensions": ["azw"]
+ },
+ "application/vnd.amazon.mobi8-ebook": {
+ "source": "iana"
+ },
+ "application/vnd.americandynamics.acc": {
+ "source": "iana",
+ "extensions": ["acc"]
+ },
+ "application/vnd.amiga.ami": {
+ "source": "iana",
+ "extensions": ["ami"]
+ },
+ "application/vnd.amundsen.maze+xml": {
+ "source": "iana"
+ },
+ "application/vnd.android.package-archive": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["apk"]
+ },
+ "application/vnd.anki": {
+ "source": "iana"
+ },
+ "application/vnd.anser-web-certificate-issue-initiation": {
+ "source": "iana",
+ "extensions": ["cii"]
+ },
+ "application/vnd.anser-web-funds-transfer-initiation": {
+ "source": "apache",
+ "extensions": ["fti"]
+ },
+ "application/vnd.antix.game-component": {
+ "source": "iana",
+ "extensions": ["atx"]
+ },
+ "application/vnd.apache.thrift.binary": {
+ "source": "iana"
+ },
+ "application/vnd.apache.thrift.compact": {
+ "source": "iana"
+ },
+ "application/vnd.apache.thrift.json": {
+ "source": "iana"
+ },
+ "application/vnd.api+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.apple.installer+xml": {
+ "source": "iana",
+ "extensions": ["mpkg"]
+ },
+ "application/vnd.apple.mpegurl": {
+ "source": "iana",
+ "extensions": ["m3u8"]
+ },
+ "application/vnd.apple.pkpass": {
+ "compressible": false,
+ "extensions": ["pkpass"]
+ },
+ "application/vnd.arastra.swi": {
+ "source": "iana"
+ },
+ "application/vnd.aristanetworks.swi": {
+ "source": "iana",
+ "extensions": ["swi"]
+ },
+ "application/vnd.artsquare": {
+ "source": "iana"
+ },
+ "application/vnd.astraea-software.iota": {
+ "source": "iana",
+ "extensions": ["iota"]
+ },
+ "application/vnd.audiograph": {
+ "source": "iana",
+ "extensions": ["aep"]
+ },
+ "application/vnd.autopackage": {
+ "source": "iana"
+ },
+ "application/vnd.avistar+xml": {
+ "source": "iana"
+ },
+ "application/vnd.balsamiq.bmml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.balsamiq.bmpr": {
+ "source": "iana"
+ },
+ "application/vnd.bekitzur-stech+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.biopax.rdf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.blueice.multipass": {
+ "source": "iana",
+ "extensions": ["mpm"]
+ },
+ "application/vnd.bluetooth.ep.oob": {
+ "source": "iana"
+ },
+ "application/vnd.bluetooth.le.oob": {
+ "source": "iana"
+ },
+ "application/vnd.bmi": {
+ "source": "iana",
+ "extensions": ["bmi"]
+ },
+ "application/vnd.businessobjects": {
+ "source": "iana",
+ "extensions": ["rep"]
+ },
+ "application/vnd.cab-jscript": {
+ "source": "iana"
+ },
+ "application/vnd.canon-cpdl": {
+ "source": "iana"
+ },
+ "application/vnd.canon-lips": {
+ "source": "iana"
+ },
+ "application/vnd.cendio.thinlinc.clientconf": {
+ "source": "iana"
+ },
+ "application/vnd.century-systems.tcp_stream": {
+ "source": "iana"
+ },
+ "application/vnd.chemdraw+xml": {
+ "source": "iana",
+ "extensions": ["cdxml"]
+ },
+ "application/vnd.chess-pgn": {
+ "source": "iana"
+ },
+ "application/vnd.chipnuts.karaoke-mmd": {
+ "source": "iana",
+ "extensions": ["mmd"]
+ },
+ "application/vnd.cinderella": {
+ "source": "iana",
+ "extensions": ["cdy"]
+ },
+ "application/vnd.cirpack.isdn-ext": {
+ "source": "iana"
+ },
+ "application/vnd.citationstyles.style+xml": {
+ "source": "iana"
+ },
+ "application/vnd.claymore": {
+ "source": "iana",
+ "extensions": ["cla"]
+ },
+ "application/vnd.cloanto.rp9": {
+ "source": "iana",
+ "extensions": ["rp9"]
+ },
+ "application/vnd.clonk.c4group": {
+ "source": "iana",
+ "extensions": ["c4g","c4d","c4f","c4p","c4u"]
+ },
+ "application/vnd.cluetrust.cartomobile-config": {
+ "source": "iana",
+ "extensions": ["c11amc"]
+ },
+ "application/vnd.cluetrust.cartomobile-config-pkg": {
+ "source": "iana",
+ "extensions": ["c11amz"]
+ },
+ "application/vnd.coffeescript": {
+ "source": "iana"
+ },
+ "application/vnd.collection+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.collection.doc+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.collection.next+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.comicbook+zip": {
+ "source": "iana"
+ },
+ "application/vnd.commerce-battelle": {
+ "source": "iana"
+ },
+ "application/vnd.commonspace": {
+ "source": "iana",
+ "extensions": ["csp"]
+ },
+ "application/vnd.contact.cmsg": {
+ "source": "iana",
+ "extensions": ["cdbcmsg"]
+ },
+ "application/vnd.coreos.ignition+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.cosmocaller": {
+ "source": "iana",
+ "extensions": ["cmc"]
+ },
+ "application/vnd.crick.clicker": {
+ "source": "iana",
+ "extensions": ["clkx"]
+ },
+ "application/vnd.crick.clicker.keyboard": {
+ "source": "iana",
+ "extensions": ["clkk"]
+ },
+ "application/vnd.crick.clicker.palette": {
+ "source": "iana",
+ "extensions": ["clkp"]
+ },
+ "application/vnd.crick.clicker.template": {
+ "source": "iana",
+ "extensions": ["clkt"]
+ },
+ "application/vnd.crick.clicker.wordbank": {
+ "source": "iana",
+ "extensions": ["clkw"]
+ },
+ "application/vnd.criticaltools.wbs+xml": {
+ "source": "iana",
+ "extensions": ["wbs"]
+ },
+ "application/vnd.ctc-posml": {
+ "source": "iana",
+ "extensions": ["pml"]
+ },
+ "application/vnd.ctct.ws+xml": {
+ "source": "iana"
+ },
+ "application/vnd.cups-pdf": {
+ "source": "iana"
+ },
+ "application/vnd.cups-postscript": {
+ "source": "iana"
+ },
+ "application/vnd.cups-ppd": {
+ "source": "iana",
+ "extensions": ["ppd"]
+ },
+ "application/vnd.cups-raster": {
+ "source": "iana"
+ },
+ "application/vnd.cups-raw": {
+ "source": "iana"
+ },
+ "application/vnd.curl": {
+ "source": "iana"
+ },
+ "application/vnd.curl.car": {
+ "source": "apache",
+ "extensions": ["car"]
+ },
+ "application/vnd.curl.pcurl": {
+ "source": "apache",
+ "extensions": ["pcurl"]
+ },
+ "application/vnd.cyan.dean.root+xml": {
+ "source": "iana"
+ },
+ "application/vnd.cybank": {
+ "source": "iana"
+ },
+ "application/vnd.d2l.coursepackage1p0+zip": {
+ "source": "iana"
+ },
+ "application/vnd.dart": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["dart"]
+ },
+ "application/vnd.data-vision.rdz": {
+ "source": "iana",
+ "extensions": ["rdz"]
+ },
+ "application/vnd.debian.binary-package": {
+ "source": "iana"
+ },
+ "application/vnd.dece.data": {
+ "source": "iana",
+ "extensions": ["uvf","uvvf","uvd","uvvd"]
+ },
+ "application/vnd.dece.ttml+xml": {
+ "source": "iana",
+ "extensions": ["uvt","uvvt"]
+ },
+ "application/vnd.dece.unspecified": {
+ "source": "iana",
+ "extensions": ["uvx","uvvx"]
+ },
+ "application/vnd.dece.zip": {
+ "source": "iana",
+ "extensions": ["uvz","uvvz"]
+ },
+ "application/vnd.denovo.fcselayout-link": {
+ "source": "iana",
+ "extensions": ["fe_launch"]
+ },
+ "application/vnd.desmume-movie": {
+ "source": "iana"
+ },
+ "application/vnd.desmume.movie": {
+ "source": "apache"
+ },
+ "application/vnd.dir-bi.plate-dl-nosuffix": {
+ "source": "iana"
+ },
+ "application/vnd.dm.delegation+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dna": {
+ "source": "iana",
+ "extensions": ["dna"]
+ },
+ "application/vnd.document+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.dolby.mlp": {
+ "source": "apache",
+ "extensions": ["mlp"]
+ },
+ "application/vnd.dolby.mobile.1": {
+ "source": "iana"
+ },
+ "application/vnd.dolby.mobile.2": {
+ "source": "iana"
+ },
+ "application/vnd.doremir.scorecloud-binary-document": {
+ "source": "iana"
+ },
+ "application/vnd.dpgraph": {
+ "source": "iana",
+ "extensions": ["dpg"]
+ },
+ "application/vnd.dreamfactory": {
+ "source": "iana",
+ "extensions": ["dfac"]
+ },
+ "application/vnd.drive+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ds-keypoint": {
+ "source": "apache",
+ "extensions": ["kpxx"]
+ },
+ "application/vnd.dtg.local": {
+ "source": "iana"
+ },
+ "application/vnd.dtg.local.flash": {
+ "source": "iana"
+ },
+ "application/vnd.dtg.local.html": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ait": {
+ "source": "iana",
+ "extensions": ["ait"]
+ },
+ "application/vnd.dvb.dvbj": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.esgcontainer": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcdftnotifaccess": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgaccess": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgaccess2": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgpdd": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcroaming": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.iptv.alfec-base": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.iptv.alfec-enhancement": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-aggregate-root+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-container+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-generic+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-ia-msglist+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-ia-registration-request+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-ia-registration-response+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-init+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.pfr": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.service": {
+ "source": "iana",
+ "extensions": ["svc"]
+ },
+ "application/vnd.dxr": {
+ "source": "iana"
+ },
+ "application/vnd.dynageo": {
+ "source": "iana",
+ "extensions": ["geo"]
+ },
+ "application/vnd.dzr": {
+ "source": "iana"
+ },
+ "application/vnd.easykaraoke.cdgdownload": {
+ "source": "iana"
+ },
+ "application/vnd.ecdis-update": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.chart": {
+ "source": "iana",
+ "extensions": ["mag"]
+ },
+ "application/vnd.ecowin.filerequest": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.fileupdate": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.series": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.seriesrequest": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.seriesupdate": {
+ "source": "iana"
+ },
+ "application/vnd.emclient.accessrequest+xml": {
+ "source": "iana"
+ },
+ "application/vnd.enliven": {
+ "source": "iana",
+ "extensions": ["nml"]
+ },
+ "application/vnd.enphase.envoy": {
+ "source": "iana"
+ },
+ "application/vnd.eprints.data+xml": {
+ "source": "iana"
+ },
+ "application/vnd.epson.esf": {
+ "source": "iana",
+ "extensions": ["esf"]
+ },
+ "application/vnd.epson.msf": {
+ "source": "iana",
+ "extensions": ["msf"]
+ },
+ "application/vnd.epson.quickanime": {
+ "source": "iana",
+ "extensions": ["qam"]
+ },
+ "application/vnd.epson.salt": {
+ "source": "iana",
+ "extensions": ["slt"]
+ },
+ "application/vnd.epson.ssf": {
+ "source": "iana",
+ "extensions": ["ssf"]
+ },
+ "application/vnd.ericsson.quickcall": {
+ "source": "iana"
+ },
+ "application/vnd.espass-espass+zip": {
+ "source": "iana"
+ },
+ "application/vnd.eszigno3+xml": {
+ "source": "iana",
+ "extensions": ["es3","et3"]
+ },
+ "application/vnd.etsi.aoc+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.asic-e+zip": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.asic-s+zip": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.cug+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvcommand+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvdiscovery+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsad-bc+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsad-cod+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsad-npvr+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvservice+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsync+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvueprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.mcid+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.mheg5": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.overload-control-policy-dataset+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.pstn+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.sci+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.simservs+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.timestamp-token": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.tsl+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.tsl.der": {
+ "source": "iana"
+ },
+ "application/vnd.eudora.data": {
+ "source": "iana"
+ },
+ "application/vnd.ezpix-album": {
+ "source": "iana",
+ "extensions": ["ez2"]
+ },
+ "application/vnd.ezpix-package": {
+ "source": "iana",
+ "extensions": ["ez3"]
+ },
+ "application/vnd.f-secure.mobile": {
+ "source": "iana"
+ },
+ "application/vnd.fastcopy-disk-image": {
+ "source": "iana"
+ },
+ "application/vnd.fdf": {
+ "source": "iana",
+ "extensions": ["fdf"]
+ },
+ "application/vnd.fdsn.mseed": {
+ "source": "iana",
+ "extensions": ["mseed"]
+ },
+ "application/vnd.fdsn.seed": {
+ "source": "iana",
+ "extensions": ["seed","dataless"]
+ },
+ "application/vnd.ffsns": {
+ "source": "iana"
+ },
+ "application/vnd.filmit.zfc": {
+ "source": "iana"
+ },
+ "application/vnd.fints": {
+ "source": "iana"
+ },
+ "application/vnd.firemonkeys.cloudcell": {
+ "source": "iana"
+ },
+ "application/vnd.flographit": {
+ "source": "iana",
+ "extensions": ["gph"]
+ },
+ "application/vnd.fluxtime.clip": {
+ "source": "iana",
+ "extensions": ["ftc"]
+ },
+ "application/vnd.font-fontforge-sfd": {
+ "source": "iana"
+ },
+ "application/vnd.framemaker": {
+ "source": "iana",
+ "extensions": ["fm","frame","maker","book"]
+ },
+ "application/vnd.frogans.fnc": {
+ "source": "iana",
+ "extensions": ["fnc"]
+ },
+ "application/vnd.frogans.ltf": {
+ "source": "iana",
+ "extensions": ["ltf"]
+ },
+ "application/vnd.fsc.weblaunch": {
+ "source": "iana",
+ "extensions": ["fsc"]
+ },
+ "application/vnd.fujitsu.oasys": {
+ "source": "iana",
+ "extensions": ["oas"]
+ },
+ "application/vnd.fujitsu.oasys2": {
+ "source": "iana",
+ "extensions": ["oa2"]
+ },
+ "application/vnd.fujitsu.oasys3": {
+ "source": "iana",
+ "extensions": ["oa3"]
+ },
+ "application/vnd.fujitsu.oasysgp": {
+ "source": "iana",
+ "extensions": ["fg5"]
+ },
+ "application/vnd.fujitsu.oasysprs": {
+ "source": "iana",
+ "extensions": ["bh2"]
+ },
+ "application/vnd.fujixerox.art-ex": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.art4": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.ddd": {
+ "source": "iana",
+ "extensions": ["ddd"]
+ },
+ "application/vnd.fujixerox.docuworks": {
+ "source": "iana",
+ "extensions": ["xdw"]
+ },
+ "application/vnd.fujixerox.docuworks.binder": {
+ "source": "iana",
+ "extensions": ["xbd"]
+ },
+ "application/vnd.fujixerox.docuworks.container": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.hbpl": {
+ "source": "iana"
+ },
+ "application/vnd.fut-misnet": {
+ "source": "iana"
+ },
+ "application/vnd.fuzzysheet": {
+ "source": "iana",
+ "extensions": ["fzs"]
+ },
+ "application/vnd.genomatix.tuxedo": {
+ "source": "iana",
+ "extensions": ["txd"]
+ },
+ "application/vnd.geo+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.geocube+xml": {
+ "source": "iana"
+ },
+ "application/vnd.geogebra.file": {
+ "source": "iana",
+ "extensions": ["ggb"]
+ },
+ "application/vnd.geogebra.tool": {
+ "source": "iana",
+ "extensions": ["ggt"]
+ },
+ "application/vnd.geometry-explorer": {
+ "source": "iana",
+ "extensions": ["gex","gre"]
+ },
+ "application/vnd.geonext": {
+ "source": "iana",
+ "extensions": ["gxt"]
+ },
+ "application/vnd.geoplan": {
+ "source": "iana",
+ "extensions": ["g2w"]
+ },
+ "application/vnd.geospace": {
+ "source": "iana",
+ "extensions": ["g3w"]
+ },
+ "application/vnd.gerber": {
+ "source": "iana"
+ },
+ "application/vnd.globalplatform.card-content-mgt": {
+ "source": "iana"
+ },
+ "application/vnd.globalplatform.card-content-mgt-response": {
+ "source": "iana"
+ },
+ "application/vnd.gmx": {
+ "source": "iana",
+ "extensions": ["gmx"]
+ },
+ "application/vnd.google-apps.document": {
+ "compressible": false,
+ "extensions": ["gdoc"]
+ },
+ "application/vnd.google-apps.presentation": {
+ "compressible": false,
+ "extensions": ["gslides"]
+ },
+ "application/vnd.google-apps.spreadsheet": {
+ "compressible": false,
+ "extensions": ["gsheet"]
+ },
+ "application/vnd.google-earth.kml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["kml"]
+ },
+ "application/vnd.google-earth.kmz": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["kmz"]
+ },
+ "application/vnd.gov.sk.e-form+xml": {
+ "source": "iana"
+ },
+ "application/vnd.gov.sk.e-form+zip": {
+ "source": "iana"
+ },
+ "application/vnd.gov.sk.xmldatacontainer+xml": {
+ "source": "iana"
+ },
+ "application/vnd.grafeq": {
+ "source": "iana",
+ "extensions": ["gqf","gqs"]
+ },
+ "application/vnd.gridmp": {
+ "source": "iana"
+ },
+ "application/vnd.groove-account": {
+ "source": "iana",
+ "extensions": ["gac"]
+ },
+ "application/vnd.groove-help": {
+ "source": "iana",
+ "extensions": ["ghf"]
+ },
+ "application/vnd.groove-identity-message": {
+ "source": "iana",
+ "extensions": ["gim"]
+ },
+ "application/vnd.groove-injector": {
+ "source": "iana",
+ "extensions": ["grv"]
+ },
+ "application/vnd.groove-tool-message": {
+ "source": "iana",
+ "extensions": ["gtm"]
+ },
+ "application/vnd.groove-tool-template": {
+ "source": "iana",
+ "extensions": ["tpl"]
+ },
+ "application/vnd.groove-vcard": {
+ "source": "iana",
+ "extensions": ["vcg"]
+ },
+ "application/vnd.hal+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hal+xml": {
+ "source": "iana",
+ "extensions": ["hal"]
+ },
+ "application/vnd.handheld-entertainment+xml": {
+ "source": "iana",
+ "extensions": ["zmm"]
+ },
+ "application/vnd.hbci": {
+ "source": "iana",
+ "extensions": ["hbci"]
+ },
+ "application/vnd.hcl-bireports": {
+ "source": "iana"
+ },
+ "application/vnd.hdt": {
+ "source": "iana"
+ },
+ "application/vnd.heroku+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hhe.lesson-player": {
+ "source": "iana",
+ "extensions": ["les"]
+ },
+ "application/vnd.hp-hpgl": {
+ "source": "iana",
+ "extensions": ["hpgl"]
+ },
+ "application/vnd.hp-hpid": {
+ "source": "iana",
+ "extensions": ["hpid"]
+ },
+ "application/vnd.hp-hps": {
+ "source": "iana",
+ "extensions": ["hps"]
+ },
+ "application/vnd.hp-jlyt": {
+ "source": "iana",
+ "extensions": ["jlt"]
+ },
+ "application/vnd.hp-pcl": {
+ "source": "iana",
+ "extensions": ["pcl"]
+ },
+ "application/vnd.hp-pclxl": {
+ "source": "iana",
+ "extensions": ["pclxl"]
+ },
+ "application/vnd.httphone": {
+ "source": "iana"
+ },
+ "application/vnd.hydrostatix.sof-data": {
+ "source": "iana",
+ "extensions": ["sfd-hdstx"]
+ },
+ "application/vnd.hyperdrive+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hzn-3d-crossword": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.afplinedata": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.electronic-media": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.minipay": {
+ "source": "iana",
+ "extensions": ["mpy"]
+ },
+ "application/vnd.ibm.modcap": {
+ "source": "iana",
+ "extensions": ["afp","listafp","list3820"]
+ },
+ "application/vnd.ibm.rights-management": {
+ "source": "iana",
+ "extensions": ["irm"]
+ },
+ "application/vnd.ibm.secure-container": {
+ "source": "iana",
+ "extensions": ["sc"]
+ },
+ "application/vnd.iccprofile": {
+ "source": "iana",
+ "extensions": ["icc","icm"]
+ },
+ "application/vnd.ieee.1905": {
+ "source": "iana"
+ },
+ "application/vnd.igloader": {
+ "source": "iana",
+ "extensions": ["igl"]
+ },
+ "application/vnd.immervision-ivp": {
+ "source": "iana",
+ "extensions": ["ivp"]
+ },
+ "application/vnd.immervision-ivu": {
+ "source": "iana",
+ "extensions": ["ivu"]
+ },
+ "application/vnd.ims.imsccv1p1": {
+ "source": "iana"
+ },
+ "application/vnd.ims.imsccv1p2": {
+ "source": "iana"
+ },
+ "application/vnd.ims.imsccv1p3": {
+ "source": "iana"
+ },
+ "application/vnd.ims.lis.v2.result+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolconsumerprofile+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolproxy+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolproxy.id+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolsettings+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolsettings.simple+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.informedcontrol.rms+xml": {
+ "source": "iana"
+ },
+ "application/vnd.informix-visionary": {
+ "source": "iana"
+ },
+ "application/vnd.infotech.project": {
+ "source": "iana"
+ },
+ "application/vnd.infotech.project+xml": {
+ "source": "iana"
+ },
+ "application/vnd.innopath.wamp.notification": {
+ "source": "iana"
+ },
+ "application/vnd.insors.igm": {
+ "source": "iana",
+ "extensions": ["igm"]
+ },
+ "application/vnd.intercon.formnet": {
+ "source": "iana",
+ "extensions": ["xpw","xpx"]
+ },
+ "application/vnd.intergeo": {
+ "source": "iana",
+ "extensions": ["i2g"]
+ },
+ "application/vnd.intertrust.digibox": {
+ "source": "iana"
+ },
+ "application/vnd.intertrust.nncp": {
+ "source": "iana"
+ },
+ "application/vnd.intu.qbo": {
+ "source": "iana",
+ "extensions": ["qbo"]
+ },
+ "application/vnd.intu.qfx": {
+ "source": "iana",
+ "extensions": ["qfx"]
+ },
+ "application/vnd.iptc.g2.catalogitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.conceptitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.knowledgeitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.newsitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.newsmessage+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.packageitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.planningitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ipunplugged.rcprofile": {
+ "source": "iana",
+ "extensions": ["rcprofile"]
+ },
+ "application/vnd.irepository.package+xml": {
+ "source": "iana",
+ "extensions": ["irp"]
+ },
+ "application/vnd.is-xpr": {
+ "source": "iana",
+ "extensions": ["xpr"]
+ },
+ "application/vnd.isac.fcs": {
+ "source": "iana",
+ "extensions": ["fcs"]
+ },
+ "application/vnd.jam": {
+ "source": "iana",
+ "extensions": ["jam"]
+ },
+ "application/vnd.japannet-directory-service": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-jpnstore-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-payment-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-registration": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-registration-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-setstore-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-verification": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-verification-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.jcp.javame.midlet-rms": {
+ "source": "iana",
+ "extensions": ["rms"]
+ },
+ "application/vnd.jisp": {
+ "source": "iana",
+ "extensions": ["jisp"]
+ },
+ "application/vnd.joost.joda-archive": {
+ "source": "iana",
+ "extensions": ["joda"]
+ },
+ "application/vnd.jsk.isdn-ngn": {
+ "source": "iana"
+ },
+ "application/vnd.kahootz": {
+ "source": "iana",
+ "extensions": ["ktz","ktr"]
+ },
+ "application/vnd.kde.karbon": {
+ "source": "iana",
+ "extensions": ["karbon"]
+ },
+ "application/vnd.kde.kchart": {
+ "source": "iana",
+ "extensions": ["chrt"]
+ },
+ "application/vnd.kde.kformula": {
+ "source": "iana",
+ "extensions": ["kfo"]
+ },
+ "application/vnd.kde.kivio": {
+ "source": "iana",
+ "extensions": ["flw"]
+ },
+ "application/vnd.kde.kontour": {
+ "source": "iana",
+ "extensions": ["kon"]
+ },
+ "application/vnd.kde.kpresenter": {
+ "source": "iana",
+ "extensions": ["kpr","kpt"]
+ },
+ "application/vnd.kde.kspread": {
+ "source": "iana",
+ "extensions": ["ksp"]
+ },
+ "application/vnd.kde.kword": {
+ "source": "iana",
+ "extensions": ["kwd","kwt"]
+ },
+ "application/vnd.kenameaapp": {
+ "source": "iana",
+ "extensions": ["htke"]
+ },
+ "application/vnd.kidspiration": {
+ "source": "iana",
+ "extensions": ["kia"]
+ },
+ "application/vnd.kinar": {
+ "source": "iana",
+ "extensions": ["kne","knp"]
+ },
+ "application/vnd.koan": {
+ "source": "iana",
+ "extensions": ["skp","skd","skt","skm"]
+ },
+ "application/vnd.kodak-descriptor": {
+ "source": "iana",
+ "extensions": ["sse"]
+ },
+ "application/vnd.las.las+xml": {
+ "source": "iana",
+ "extensions": ["lasxml"]
+ },
+ "application/vnd.liberty-request+xml": {
+ "source": "iana"
+ },
+ "application/vnd.llamagraphics.life-balance.desktop": {
+ "source": "iana",
+ "extensions": ["lbd"]
+ },
+ "application/vnd.llamagraphics.life-balance.exchange+xml": {
+ "source": "iana",
+ "extensions": ["lbe"]
+ },
+ "application/vnd.lotus-1-2-3": {
+ "source": "iana",
+ "extensions": ["123"]
+ },
+ "application/vnd.lotus-approach": {
+ "source": "iana",
+ "extensions": ["apr"]
+ },
+ "application/vnd.lotus-freelance": {
+ "source": "iana",
+ "extensions": ["pre"]
+ },
+ "application/vnd.lotus-notes": {
+ "source": "iana",
+ "extensions": ["nsf"]
+ },
+ "application/vnd.lotus-organizer": {
+ "source": "iana",
+ "extensions": ["org"]
+ },
+ "application/vnd.lotus-screencam": {
+ "source": "iana",
+ "extensions": ["scm"]
+ },
+ "application/vnd.lotus-wordpro": {
+ "source": "iana",
+ "extensions": ["lwp"]
+ },
+ "application/vnd.macports.portpkg": {
+ "source": "iana",
+ "extensions": ["portpkg"]
+ },
+ "application/vnd.mapbox-vector-tile": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.actiontoken+xml": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.conftoken+xml": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.license+xml": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.mdcf": {
+ "source": "iana"
+ },
+ "application/vnd.mason+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.maxmind.maxmind-db": {
+ "source": "iana"
+ },
+ "application/vnd.mcd": {
+ "source": "iana",
+ "extensions": ["mcd"]
+ },
+ "application/vnd.medcalcdata": {
+ "source": "iana",
+ "extensions": ["mc1"]
+ },
+ "application/vnd.mediastation.cdkey": {
+ "source": "iana",
+ "extensions": ["cdkey"]
+ },
+ "application/vnd.meridian-slingshot": {
+ "source": "iana"
+ },
+ "application/vnd.mfer": {
+ "source": "iana",
+ "extensions": ["mwf"]
+ },
+ "application/vnd.mfmp": {
+ "source": "iana",
+ "extensions": ["mfm"]
+ },
+ "application/vnd.micro+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.micrografx.flo": {
+ "source": "iana",
+ "extensions": ["flo"]
+ },
+ "application/vnd.micrografx.igx": {
+ "source": "iana",
+ "extensions": ["igx"]
+ },
+ "application/vnd.microsoft.portable-executable": {
+ "source": "iana"
+ },
+ "application/vnd.miele+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.mif": {
+ "source": "iana",
+ "extensions": ["mif"]
+ },
+ "application/vnd.minisoft-hp3000-save": {
+ "source": "iana"
+ },
+ "application/vnd.mitsubishi.misty-guard.trustweb": {
+ "source": "iana"
+ },
+ "application/vnd.mobius.daf": {
+ "source": "iana",
+ "extensions": ["daf"]
+ },
+ "application/vnd.mobius.dis": {
+ "source": "iana",
+ "extensions": ["dis"]
+ },
+ "application/vnd.mobius.mbk": {
+ "source": "iana",
+ "extensions": ["mbk"]
+ },
+ "application/vnd.mobius.mqy": {
+ "source": "iana",
+ "extensions": ["mqy"]
+ },
+ "application/vnd.mobius.msl": {
+ "source": "iana",
+ "extensions": ["msl"]
+ },
+ "application/vnd.mobius.plc": {
+ "source": "iana",
+ "extensions": ["plc"]
+ },
+ "application/vnd.mobius.txf": {
+ "source": "iana",
+ "extensions": ["txf"]
+ },
+ "application/vnd.mophun.application": {
+ "source": "iana",
+ "extensions": ["mpn"]
+ },
+ "application/vnd.mophun.certificate": {
+ "source": "iana",
+ "extensions": ["mpc"]
+ },
+ "application/vnd.motorola.flexsuite": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.adsi": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.fis": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.gotap": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.kmr": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.ttc": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.wem": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.iprm": {
+ "source": "iana"
+ },
+ "application/vnd.mozilla.xul+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xul"]
+ },
+ "application/vnd.ms-3mfdocument": {
+ "source": "iana"
+ },
+ "application/vnd.ms-artgalry": {
+ "source": "iana",
+ "extensions": ["cil"]
+ },
+ "application/vnd.ms-asf": {
+ "source": "iana"
+ },
+ "application/vnd.ms-cab-compressed": {
+ "source": "iana",
+ "extensions": ["cab"]
+ },
+ "application/vnd.ms-color.iccprofile": {
+ "source": "apache"
+ },
+ "application/vnd.ms-excel": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xls","xlm","xla","xlc","xlt","xlw"]
+ },
+ "application/vnd.ms-excel.addin.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlam"]
+ },
+ "application/vnd.ms-excel.sheet.binary.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlsb"]
+ },
+ "application/vnd.ms-excel.sheet.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlsm"]
+ },
+ "application/vnd.ms-excel.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xltm"]
+ },
+ "application/vnd.ms-fontobject": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["eot"]
+ },
+ "application/vnd.ms-htmlhelp": {
+ "source": "iana",
+ "extensions": ["chm"]
+ },
+ "application/vnd.ms-ims": {
+ "source": "iana",
+ "extensions": ["ims"]
+ },
+ "application/vnd.ms-lrm": {
+ "source": "iana",
+ "extensions": ["lrm"]
+ },
+ "application/vnd.ms-office.activex+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ms-officetheme": {
+ "source": "iana",
+ "extensions": ["thmx"]
+ },
+ "application/vnd.ms-opentype": {
+ "source": "apache",
+ "compressible": true
+ },
+ "application/vnd.ms-package.obfuscated-opentype": {
+ "source": "apache"
+ },
+ "application/vnd.ms-pki.seccat": {
+ "source": "apache",
+ "extensions": ["cat"]
+ },
+ "application/vnd.ms-pki.stl": {
+ "source": "apache",
+ "extensions": ["stl"]
+ },
+ "application/vnd.ms-playready.initiator+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ms-powerpoint": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ppt","pps","pot"]
+ },
+ "application/vnd.ms-powerpoint.addin.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["ppam"]
+ },
+ "application/vnd.ms-powerpoint.presentation.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["pptm"]
+ },
+ "application/vnd.ms-powerpoint.slide.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["sldm"]
+ },
+ "application/vnd.ms-powerpoint.slideshow.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["ppsm"]
+ },
+ "application/vnd.ms-powerpoint.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["potm"]
+ },
+ "application/vnd.ms-printdevicecapabilities+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ms-printing.printticket+xml": {
+ "source": "apache"
+ },
+ "application/vnd.ms-printschematicket+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ms-project": {
+ "source": "iana",
+ "extensions": ["mpp","mpt"]
+ },
+ "application/vnd.ms-tnef": {
+ "source": "iana"
+ },
+ "application/vnd.ms-windows.devicepairing": {
+ "source": "iana"
+ },
+ "application/vnd.ms-windows.nwprinting.oob": {
+ "source": "iana"
+ },
+ "application/vnd.ms-windows.printerpairing": {
+ "source": "iana"
+ },
+ "application/vnd.ms-windows.wsd.oob": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.lic-chlg-req": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.lic-resp": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.meter-chlg-req": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.meter-resp": {
+ "source": "iana"
+ },
+ "application/vnd.ms-word.document.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["docm"]
+ },
+ "application/vnd.ms-word.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["dotm"]
+ },
+ "application/vnd.ms-works": {
+ "source": "iana",
+ "extensions": ["wps","wks","wcm","wdb"]
+ },
+ "application/vnd.ms-wpl": {
+ "source": "iana",
+ "extensions": ["wpl"]
+ },
+ "application/vnd.ms-xpsdocument": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xps"]
+ },
+ "application/vnd.msa-disk-image": {
+ "source": "iana"
+ },
+ "application/vnd.mseq": {
+ "source": "iana",
+ "extensions": ["mseq"]
+ },
+ "application/vnd.msign": {
+ "source": "iana"
+ },
+ "application/vnd.multiad.creator": {
+ "source": "iana"
+ },
+ "application/vnd.multiad.creator.cif": {
+ "source": "iana"
+ },
+ "application/vnd.music-niff": {
+ "source": "iana"
+ },
+ "application/vnd.musician": {
+ "source": "iana",
+ "extensions": ["mus"]
+ },
+ "application/vnd.muvee.style": {
+ "source": "iana",
+ "extensions": ["msty"]
+ },
+ "application/vnd.mynfc": {
+ "source": "iana",
+ "extensions": ["taglet"]
+ },
+ "application/vnd.ncd.control": {
+ "source": "iana"
+ },
+ "application/vnd.ncd.reference": {
+ "source": "iana"
+ },
+ "application/vnd.nearst.inv+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.nervana": {
+ "source": "iana"
+ },
+ "application/vnd.netfpx": {
+ "source": "iana"
+ },
+ "application/vnd.neurolanguage.nlu": {
+ "source": "iana",
+ "extensions": ["nlu"]
+ },
+ "application/vnd.nintendo.nitro.rom": {
+ "source": "iana"
+ },
+ "application/vnd.nintendo.snes.rom": {
+ "source": "iana"
+ },
+ "application/vnd.nitf": {
+ "source": "iana",
+ "extensions": ["ntf","nitf"]
+ },
+ "application/vnd.noblenet-directory": {
+ "source": "iana",
+ "extensions": ["nnd"]
+ },
+ "application/vnd.noblenet-sealer": {
+ "source": "iana",
+ "extensions": ["nns"]
+ },
+ "application/vnd.noblenet-web": {
+ "source": "iana",
+ "extensions": ["nnw"]
+ },
+ "application/vnd.nokia.catalogs": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.conml+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.conml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.iptv.config+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.isds-radio-presets": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmark+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmark+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmarkcollection+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.n-gage.ac+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.n-gage.data": {
+ "source": "iana",
+ "extensions": ["ngdat"]
+ },
+ "application/vnd.nokia.n-gage.symbian.install": {
+ "source": "iana",
+ "extensions": ["n-gage"]
+ },
+ "application/vnd.nokia.ncd": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.pcd+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.pcd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.radio-preset": {
+ "source": "iana",
+ "extensions": ["rpst"]
+ },
+ "application/vnd.nokia.radio-presets": {
+ "source": "iana",
+ "extensions": ["rpss"]
+ },
+ "application/vnd.novadigm.edm": {
+ "source": "iana",
+ "extensions": ["edm"]
+ },
+ "application/vnd.novadigm.edx": {
+ "source": "iana",
+ "extensions": ["edx"]
+ },
+ "application/vnd.novadigm.ext": {
+ "source": "iana",
+ "extensions": ["ext"]
+ },
+ "application/vnd.ntt-local.content-share": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.file-transfer": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.ogw_remote-access": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.sip-ta_remote": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.sip-ta_tcp_stream": {
+ "source": "iana"
+ },
+ "application/vnd.oasis.opendocument.chart": {
+ "source": "iana",
+ "extensions": ["odc"]
+ },
+ "application/vnd.oasis.opendocument.chart-template": {
+ "source": "iana",
+ "extensions": ["otc"]
+ },
+ "application/vnd.oasis.opendocument.database": {
+ "source": "iana",
+ "extensions": ["odb"]
+ },
+ "application/vnd.oasis.opendocument.formula": {
+ "source": "iana",
+ "extensions": ["odf"]
+ },
+ "application/vnd.oasis.opendocument.formula-template": {
+ "source": "iana",
+ "extensions": ["odft"]
+ },
+ "application/vnd.oasis.opendocument.graphics": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odg"]
+ },
+ "application/vnd.oasis.opendocument.graphics-template": {
+ "source": "iana",
+ "extensions": ["otg"]
+ },
+ "application/vnd.oasis.opendocument.image": {
+ "source": "iana",
+ "extensions": ["odi"]
+ },
+ "application/vnd.oasis.opendocument.image-template": {
+ "source": "iana",
+ "extensions": ["oti"]
+ },
+ "application/vnd.oasis.opendocument.presentation": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odp"]
+ },
+ "application/vnd.oasis.opendocument.presentation-template": {
+ "source": "iana",
+ "extensions": ["otp"]
+ },
+ "application/vnd.oasis.opendocument.spreadsheet": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ods"]
+ },
+ "application/vnd.oasis.opendocument.spreadsheet-template": {
+ "source": "iana",
+ "extensions": ["ots"]
+ },
+ "application/vnd.oasis.opendocument.text": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odt"]
+ },
+ "application/vnd.oasis.opendocument.text-master": {
+ "source": "iana",
+ "extensions": ["odm"]
+ },
+ "application/vnd.oasis.opendocument.text-template": {
+ "source": "iana",
+ "extensions": ["ott"]
+ },
+ "application/vnd.oasis.opendocument.text-web": {
+ "source": "iana",
+ "extensions": ["oth"]
+ },
+ "application/vnd.obn": {
+ "source": "iana"
+ },
+ "application/vnd.oftn.l10n+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oipf.contentaccessdownload+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.contentaccessstreaming+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.cspg-hexbinary": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.dae.svg+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.dae.xhtml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.mippvcontrolmessage+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.pae.gem": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.spdiscovery+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.spdlist+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.ueprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.userprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.olpc-sugar": {
+ "source": "iana",
+ "extensions": ["xo"]
+ },
+ "application/vnd.oma-scws-config": {
+ "source": "iana"
+ },
+ "application/vnd.oma-scws-http-request": {
+ "source": "iana"
+ },
+ "application/vnd.oma-scws-http-response": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.associated-procedure-parameter+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.drm-trigger+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.imd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.ltkm": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.notification+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.provisioningtrigger": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgboot": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgdd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgdu": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.simple-symbol-container": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.smartcard-trigger+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sprov+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.stkm": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-address-book+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-feature-handler+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-pcc+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-subs-invite+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-user-prefs+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dcd": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dcdc": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dd2+xml": {
+ "source": "iana",
+ "extensions": ["dd2"]
+ },
+ "application/vnd.oma.drm.risd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.group-usage-list+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.lwm2m+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.lwm2m+tlv": {
+ "source": "iana"
+ },
+ "application/vnd.oma.pal+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.detailed-progress-report+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.final-report+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.groups+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.invocation-descriptor+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.optimized-progress-report+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.push": {
+ "source": "iana"
+ },
+ "application/vnd.oma.scidm.messages+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.xcap-directory+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omads-email+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omads-file+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omads-folder+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omaloc-supl-init": {
+ "source": "iana"
+ },
+ "application/vnd.onepager": {
+ "source": "iana"
+ },
+ "application/vnd.openblox.game+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openblox.game-binary": {
+ "source": "iana"
+ },
+ "application/vnd.openeye.oeb": {
+ "source": "iana"
+ },
+ "application/vnd.openofficeorg.extension": {
+ "source": "apache",
+ "extensions": ["oxt"]
+ },
+ "application/vnd.openstreetmap.data+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.custom-properties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawing+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.extended-properties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml-template": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pptx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slide": {
+ "source": "iana",
+ "extensions": ["sldx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow": {
+ "source": "iana",
+ "extensions": ["ppsx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.template": {
+ "source": "apache",
+ "extensions": ["potx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml-template": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xlsx"]
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.template": {
+ "source": "apache",
+ "extensions": ["xltx"]
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.theme+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.themeoverride+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.vmldrawing": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml-template": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["docx"]
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template": {
+ "source": "apache",
+ "extensions": ["dotx"]
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-package.core-properties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-package.relationships+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oracle.resource+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.orange.indata": {
+ "source": "iana"
+ },
+ "application/vnd.osa.netdeploy": {
+ "source": "iana"
+ },
+ "application/vnd.osgeo.mapguide.package": {
+ "source": "iana",
+ "extensions": ["mgp"]
+ },
+ "application/vnd.osgi.bundle": {
+ "source": "iana"
+ },
+ "application/vnd.osgi.dp": {
+ "source": "iana",
+ "extensions": ["dp"]
+ },
+ "application/vnd.osgi.subsystem": {
+ "source": "iana",
+ "extensions": ["esa"]
+ },
+ "application/vnd.otps.ct-kip+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oxli.countgraph": {
+ "source": "iana"
+ },
+ "application/vnd.pagerduty+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.palm": {
+ "source": "iana",
+ "extensions": ["pdb","pqa","oprc"]
+ },
+ "application/vnd.panoply": {
+ "source": "iana"
+ },
+ "application/vnd.paos+xml": {
+ "source": "iana"
+ },
+ "application/vnd.paos.xml": {
+ "source": "apache"
+ },
+ "application/vnd.pawaafile": {
+ "source": "iana",
+ "extensions": ["paw"]
+ },
+ "application/vnd.pcos": {
+ "source": "iana"
+ },
+ "application/vnd.pg.format": {
+ "source": "iana",
+ "extensions": ["str"]
+ },
+ "application/vnd.pg.osasli": {
+ "source": "iana",
+ "extensions": ["ei6"]
+ },
+ "application/vnd.piaccess.application-licence": {
+ "source": "iana"
+ },
+ "application/vnd.picsel": {
+ "source": "iana",
+ "extensions": ["efif"]
+ },
+ "application/vnd.pmi.widget": {
+ "source": "iana",
+ "extensions": ["wg"]
+ },
+ "application/vnd.poc.group-advertisement+xml": {
+ "source": "iana"
+ },
+ "application/vnd.pocketlearn": {
+ "source": "iana",
+ "extensions": ["plf"]
+ },
+ "application/vnd.powerbuilder6": {
+ "source": "iana",
+ "extensions": ["pbd"]
+ },
+ "application/vnd.powerbuilder6-s": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder7": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder7-s": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder75": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder75-s": {
+ "source": "iana"
+ },
+ "application/vnd.preminet": {
+ "source": "iana"
+ },
+ "application/vnd.previewsystems.box": {
+ "source": "iana",
+ "extensions": ["box"]
+ },
+ "application/vnd.proteus.magazine": {
+ "source": "iana",
+ "extensions": ["mgz"]
+ },
+ "application/vnd.publishare-delta-tree": {
+ "source": "iana",
+ "extensions": ["qps"]
+ },
+ "application/vnd.pvi.ptid1": {
+ "source": "iana",
+ "extensions": ["ptid"]
+ },
+ "application/vnd.pwg-multiplexed": {
+ "source": "iana"
+ },
+ "application/vnd.pwg-xhtml-print+xml": {
+ "source": "iana"
+ },
+ "application/vnd.qualcomm.brew-app-res": {
+ "source": "iana"
+ },
+ "application/vnd.quarantainenet": {
+ "source": "iana"
+ },
+ "application/vnd.quark.quarkxpress": {
+ "source": "iana",
+ "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"]
+ },
+ "application/vnd.quobject-quoxdocument": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.moml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-conf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-conn+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-dialog+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-stream+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-conf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-base+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-fax-detect+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-group+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-speech+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-transform+xml": {
+ "source": "iana"
+ },
+ "application/vnd.rainstor.data": {
+ "source": "iana"
+ },
+ "application/vnd.rapid": {
+ "source": "iana"
+ },
+ "application/vnd.rar": {
+ "source": "iana"
+ },
+ "application/vnd.realvnc.bed": {
+ "source": "iana",
+ "extensions": ["bed"]
+ },
+ "application/vnd.recordare.musicxml": {
+ "source": "iana",
+ "extensions": ["mxl"]
+ },
+ "application/vnd.recordare.musicxml+xml": {
+ "source": "iana",
+ "extensions": ["musicxml"]
+ },
+ "application/vnd.renlearn.rlprint": {
+ "source": "iana"
+ },
+ "application/vnd.rig.cryptonote": {
+ "source": "iana",
+ "extensions": ["cryptonote"]
+ },
+ "application/vnd.rim.cod": {
+ "source": "apache",
+ "extensions": ["cod"]
+ },
+ "application/vnd.rn-realmedia": {
+ "source": "apache",
+ "extensions": ["rm"]
+ },
+ "application/vnd.rn-realmedia-vbr": {
+ "source": "apache",
+ "extensions": ["rmvb"]
+ },
+ "application/vnd.route66.link66+xml": {
+ "source": "iana",
+ "extensions": ["link66"]
+ },
+ "application/vnd.rs-274x": {
+ "source": "iana"
+ },
+ "application/vnd.ruckus.download": {
+ "source": "iana"
+ },
+ "application/vnd.s3sms": {
+ "source": "iana"
+ },
+ "application/vnd.sailingtracker.track": {
+ "source": "iana",
+ "extensions": ["st"]
+ },
+ "application/vnd.sbm.cid": {
+ "source": "iana"
+ },
+ "application/vnd.sbm.mid2": {
+ "source": "iana"
+ },
+ "application/vnd.scribus": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.3df": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.csf": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.doc": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.eml": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.mht": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.net": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.ppt": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.tiff": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.xls": {
+ "source": "iana"
+ },
+ "application/vnd.sealedmedia.softseal.html": {
+ "source": "iana"
+ },
+ "application/vnd.sealedmedia.softseal.pdf": {
+ "source": "iana"
+ },
+ "application/vnd.seemail": {
+ "source": "iana",
+ "extensions": ["see"]
+ },
+ "application/vnd.sema": {
+ "source": "iana",
+ "extensions": ["sema"]
+ },
+ "application/vnd.semd": {
+ "source": "iana",
+ "extensions": ["semd"]
+ },
+ "application/vnd.semf": {
+ "source": "iana",
+ "extensions": ["semf"]
+ },
+ "application/vnd.shana.informed.formdata": {
+ "source": "iana",
+ "extensions": ["ifm"]
+ },
+ "application/vnd.shana.informed.formtemplate": {
+ "source": "iana",
+ "extensions": ["itp"]
+ },
+ "application/vnd.shana.informed.interchange": {
+ "source": "iana",
+ "extensions": ["iif"]
+ },
+ "application/vnd.shana.informed.package": {
+ "source": "iana",
+ "extensions": ["ipk"]
+ },
+ "application/vnd.simtech-mindmapper": {
+ "source": "iana",
+ "extensions": ["twd","twds"]
+ },
+ "application/vnd.siren+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.smaf": {
+ "source": "iana",
+ "extensions": ["mmf"]
+ },
+ "application/vnd.smart.notebook": {
+ "source": "iana"
+ },
+ "application/vnd.smart.teacher": {
+ "source": "iana",
+ "extensions": ["teacher"]
+ },
+ "application/vnd.software602.filler.form+xml": {
+ "source": "iana"
+ },
+ "application/vnd.software602.filler.form-xml-zip": {
+ "source": "iana"
+ },
+ "application/vnd.solent.sdkm+xml": {
+ "source": "iana",
+ "extensions": ["sdkm","sdkd"]
+ },
+ "application/vnd.spotfire.dxp": {
+ "source": "iana",
+ "extensions": ["dxp"]
+ },
+ "application/vnd.spotfire.sfs": {
+ "source": "iana",
+ "extensions": ["sfs"]
+ },
+ "application/vnd.sss-cod": {
+ "source": "iana"
+ },
+ "application/vnd.sss-dtf": {
+ "source": "iana"
+ },
+ "application/vnd.sss-ntf": {
+ "source": "iana"
+ },
+ "application/vnd.stardivision.calc": {
+ "source": "apache",
+ "extensions": ["sdc"]
+ },
+ "application/vnd.stardivision.draw": {
+ "source": "apache",
+ "extensions": ["sda"]
+ },
+ "application/vnd.stardivision.impress": {
+ "source": "apache",
+ "extensions": ["sdd"]
+ },
+ "application/vnd.stardivision.math": {
+ "source": "apache",
+ "extensions": ["smf"]
+ },
+ "application/vnd.stardivision.writer": {
+ "source": "apache",
+ "extensions": ["sdw","vor"]
+ },
+ "application/vnd.stardivision.writer-global": {
+ "source": "apache",
+ "extensions": ["sgl"]
+ },
+ "application/vnd.stepmania.package": {
+ "source": "iana",
+ "extensions": ["smzip"]
+ },
+ "application/vnd.stepmania.stepchart": {
+ "source": "iana",
+ "extensions": ["sm"]
+ },
+ "application/vnd.street-stream": {
+ "source": "iana"
+ },
+ "application/vnd.sun.wadl+xml": {
+ "source": "iana"
+ },
+ "application/vnd.sun.xml.calc": {
+ "source": "apache",
+ "extensions": ["sxc"]
+ },
+ "application/vnd.sun.xml.calc.template": {
+ "source": "apache",
+ "extensions": ["stc"]
+ },
+ "application/vnd.sun.xml.draw": {
+ "source": "apache",
+ "extensions": ["sxd"]
+ },
+ "application/vnd.sun.xml.draw.template": {
+ "source": "apache",
+ "extensions": ["std"]
+ },
+ "application/vnd.sun.xml.impress": {
+ "source": "apache",
+ "extensions": ["sxi"]
+ },
+ "application/vnd.sun.xml.impress.template": {
+ "source": "apache",
+ "extensions": ["sti"]
+ },
+ "application/vnd.sun.xml.math": {
+ "source": "apache",
+ "extensions": ["sxm"]
+ },
+ "application/vnd.sun.xml.writer": {
+ "source": "apache",
+ "extensions": ["sxw"]
+ },
+ "application/vnd.sun.xml.writer.global": {
+ "source": "apache",
+ "extensions": ["sxg"]
+ },
+ "application/vnd.sun.xml.writer.template": {
+ "source": "apache",
+ "extensions": ["stw"]
+ },
+ "application/vnd.sus-calendar": {
+ "source": "iana",
+ "extensions": ["sus","susp"]
+ },
+ "application/vnd.svd": {
+ "source": "iana",
+ "extensions": ["svd"]
+ },
+ "application/vnd.swiftview-ics": {
+ "source": "iana"
+ },
+ "application/vnd.symbian.install": {
+ "source": "apache",
+ "extensions": ["sis","sisx"]
+ },
+ "application/vnd.syncml+xml": {
+ "source": "iana",
+ "extensions": ["xsm"]
+ },
+ "application/vnd.syncml.dm+wbxml": {
+ "source": "iana",
+ "extensions": ["bdm"]
+ },
+ "application/vnd.syncml.dm+xml": {
+ "source": "iana",
+ "extensions": ["xdm"]
+ },
+ "application/vnd.syncml.dm.notification": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmddf+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmddf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmtnds+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmtnds+xml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.ds.notification": {
+ "source": "iana"
+ },
+ "application/vnd.tao.intent-module-archive": {
+ "source": "iana",
+ "extensions": ["tao"]
+ },
+ "application/vnd.tcpdump.pcap": {
+ "source": "iana",
+ "extensions": ["pcap","cap","dmp"]
+ },
+ "application/vnd.tmd.mediaflex.api+xml": {
+ "source": "iana"
+ },
+ "application/vnd.tml": {
+ "source": "iana"
+ },
+ "application/vnd.tmobile-livetv": {
+ "source": "iana",
+ "extensions": ["tmo"]
+ },
+ "application/vnd.tri.onesource": {
+ "source": "iana"
+ },
+ "application/vnd.trid.tpt": {
+ "source": "iana",
+ "extensions": ["tpt"]
+ },
+ "application/vnd.triscape.mxs": {
+ "source": "iana",
+ "extensions": ["mxs"]
+ },
+ "application/vnd.trueapp": {
+ "source": "iana",
+ "extensions": ["tra"]
+ },
+ "application/vnd.truedoc": {
+ "source": "iana"
+ },
+ "application/vnd.ubisoft.webplayer": {
+ "source": "iana"
+ },
+ "application/vnd.ufdl": {
+ "source": "iana",
+ "extensions": ["ufd","ufdl"]
+ },
+ "application/vnd.uiq.theme": {
+ "source": "iana",
+ "extensions": ["utz"]
+ },
+ "application/vnd.umajin": {
+ "source": "iana",
+ "extensions": ["umj"]
+ },
+ "application/vnd.unity": {
+ "source": "iana",
+ "extensions": ["unityweb"]
+ },
+ "application/vnd.uoml+xml": {
+ "source": "iana",
+ "extensions": ["uoml"]
+ },
+ "application/vnd.uplanet.alert": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.alert-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.bearer-choice": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.bearer-choice-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.cacheop": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.cacheop-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.channel": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.channel-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.list": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.list-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.listcmd": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.listcmd-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.signal": {
+ "source": "iana"
+ },
+ "application/vnd.uri-map": {
+ "source": "iana"
+ },
+ "application/vnd.valve.source.material": {
+ "source": "iana"
+ },
+ "application/vnd.vcx": {
+ "source": "iana",
+ "extensions": ["vcx"]
+ },
+ "application/vnd.vd-study": {
+ "source": "iana"
+ },
+ "application/vnd.vectorworks": {
+ "source": "iana"
+ },
+ "application/vnd.vel+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.verimatrix.vcas": {
+ "source": "iana"
+ },
+ "application/vnd.vidsoft.vidconference": {
+ "source": "iana"
+ },
+ "application/vnd.visio": {
+ "source": "iana",
+ "extensions": ["vsd","vst","vss","vsw"]
+ },
+ "application/vnd.visionary": {
+ "source": "iana",
+ "extensions": ["vis"]
+ },
+ "application/vnd.vividence.scriptfile": {
+ "source": "iana"
+ },
+ "application/vnd.vsf": {
+ "source": "iana",
+ "extensions": ["vsf"]
+ },
+ "application/vnd.wap.sic": {
+ "source": "iana"
+ },
+ "application/vnd.wap.slc": {
+ "source": "iana"
+ },
+ "application/vnd.wap.wbxml": {
+ "source": "iana",
+ "extensions": ["wbxml"]
+ },
+ "application/vnd.wap.wmlc": {
+ "source": "iana",
+ "extensions": ["wmlc"]
+ },
+ "application/vnd.wap.wmlscriptc": {
+ "source": "iana",
+ "extensions": ["wmlsc"]
+ },
+ "application/vnd.webturbo": {
+ "source": "iana",
+ "extensions": ["wtb"]
+ },
+ "application/vnd.wfa.p2p": {
+ "source": "iana"
+ },
+ "application/vnd.wfa.wsc": {
+ "source": "iana"
+ },
+ "application/vnd.windows.devicepairing": {
+ "source": "iana"
+ },
+ "application/vnd.wmc": {
+ "source": "iana"
+ },
+ "application/vnd.wmf.bootstrap": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.mathematica": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.mathematica.package": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.player": {
+ "source": "iana",
+ "extensions": ["nbp"]
+ },
+ "application/vnd.wordperfect": {
+ "source": "iana",
+ "extensions": ["wpd"]
+ },
+ "application/vnd.wqd": {
+ "source": "iana",
+ "extensions": ["wqd"]
+ },
+ "application/vnd.wrq-hp3000-labelled": {
+ "source": "iana"
+ },
+ "application/vnd.wt.stf": {
+ "source": "iana",
+ "extensions": ["stf"]
+ },
+ "application/vnd.wv.csp+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.wv.csp+xml": {
+ "source": "iana"
+ },
+ "application/vnd.wv.ssp+xml": {
+ "source": "iana"
+ },
+ "application/vnd.xacml+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.xara": {
+ "source": "iana",
+ "extensions": ["xar"]
+ },
+ "application/vnd.xfdl": {
+ "source": "iana",
+ "extensions": ["xfdl"]
+ },
+ "application/vnd.xfdl.webform": {
+ "source": "iana"
+ },
+ "application/vnd.xmi+xml": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.cpkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.dpkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.plan": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.ppkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.xlim": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.hv-dic": {
+ "source": "iana",
+ "extensions": ["hvd"]
+ },
+ "application/vnd.yamaha.hv-script": {
+ "source": "iana",
+ "extensions": ["hvs"]
+ },
+ "application/vnd.yamaha.hv-voice": {
+ "source": "iana",
+ "extensions": ["hvp"]
+ },
+ "application/vnd.yamaha.openscoreformat": {
+ "source": "iana",
+ "extensions": ["osf"]
+ },
+ "application/vnd.yamaha.openscoreformat.osfpvg+xml": {
+ "source": "iana",
+ "extensions": ["osfpvg"]
+ },
+ "application/vnd.yamaha.remote-setup": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.smaf-audio": {
+ "source": "iana",
+ "extensions": ["saf"]
+ },
+ "application/vnd.yamaha.smaf-phrase": {
+ "source": "iana",
+ "extensions": ["spf"]
+ },
+ "application/vnd.yamaha.through-ngn": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.tunnel-udpencap": {
+ "source": "iana"
+ },
+ "application/vnd.yaoweme": {
+ "source": "iana"
+ },
+ "application/vnd.yellowriver-custom-menu": {
+ "source": "iana",
+ "extensions": ["cmp"]
+ },
+ "application/vnd.zul": {
+ "source": "iana",
+ "extensions": ["zir","zirz"]
+ },
+ "application/vnd.zzazz.deck+xml": {
+ "source": "iana",
+ "extensions": ["zaz"]
+ },
+ "application/voicexml+xml": {
+ "source": "iana",
+ "extensions": ["vxml"]
+ },
+ "application/vq-rtcpxr": {
+ "source": "iana"
+ },
+ "application/watcherinfo+xml": {
+ "source": "iana"
+ },
+ "application/whoispp-query": {
+ "source": "iana"
+ },
+ "application/whoispp-response": {
+ "source": "iana"
+ },
+ "application/widget": {
+ "source": "iana",
+ "extensions": ["wgt"]
+ },
+ "application/winhlp": {
+ "source": "apache",
+ "extensions": ["hlp"]
+ },
+ "application/wita": {
+ "source": "iana"
+ },
+ "application/wordperfect5.1": {
+ "source": "iana"
+ },
+ "application/wsdl+xml": {
+ "source": "iana",
+ "extensions": ["wsdl"]
+ },
+ "application/wspolicy+xml": {
+ "source": "iana",
+ "extensions": ["wspolicy"]
+ },
+ "application/x-7z-compressed": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["7z"]
+ },
+ "application/x-abiword": {
+ "source": "apache",
+ "extensions": ["abw"]
+ },
+ "application/x-ace-compressed": {
+ "source": "apache",
+ "extensions": ["ace"]
+ },
+ "application/x-amf": {
+ "source": "apache"
+ },
+ "application/x-apple-diskimage": {
+ "source": "apache",
+ "extensions": ["dmg"]
+ },
+ "application/x-authorware-bin": {
+ "source": "apache",
+ "extensions": ["aab","x32","u32","vox"]
+ },
+ "application/x-authorware-map": {
+ "source": "apache",
+ "extensions": ["aam"]
+ },
+ "application/x-authorware-seg": {
+ "source": "apache",
+ "extensions": ["aas"]
+ },
+ "application/x-bcpio": {
+ "source": "apache",
+ "extensions": ["bcpio"]
+ },
+ "application/x-bdoc": {
+ "compressible": false,
+ "extensions": ["bdoc"]
+ },
+ "application/x-bittorrent": {
+ "source": "apache",
+ "extensions": ["torrent"]
+ },
+ "application/x-blorb": {
+ "source": "apache",
+ "extensions": ["blb","blorb"]
+ },
+ "application/x-bzip": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["bz"]
+ },
+ "application/x-bzip2": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["bz2","boz"]
+ },
+ "application/x-cbr": {
+ "source": "apache",
+ "extensions": ["cbr","cba","cbt","cbz","cb7"]
+ },
+ "application/x-cdlink": {
+ "source": "apache",
+ "extensions": ["vcd"]
+ },
+ "application/x-cfs-compressed": {
+ "source": "apache",
+ "extensions": ["cfs"]
+ },
+ "application/x-chat": {
+ "source": "apache",
+ "extensions": ["chat"]
+ },
+ "application/x-chess-pgn": {
+ "source": "apache",
+ "extensions": ["pgn"]
+ },
+ "application/x-chrome-extension": {
+ "extensions": ["crx"]
+ },
+ "application/x-cocoa": {
+ "source": "nginx",
+ "extensions": ["cco"]
+ },
+ "application/x-compress": {
+ "source": "apache"
+ },
+ "application/x-conference": {
+ "source": "apache",
+ "extensions": ["nsc"]
+ },
+ "application/x-cpio": {
+ "source": "apache",
+ "extensions": ["cpio"]
+ },
+ "application/x-csh": {
+ "source": "apache",
+ "extensions": ["csh"]
+ },
+ "application/x-deb": {
+ "compressible": false
+ },
+ "application/x-debian-package": {
+ "source": "apache",
+ "extensions": ["deb","udeb"]
+ },
+ "application/x-dgc-compressed": {
+ "source": "apache",
+ "extensions": ["dgc"]
+ },
+ "application/x-director": {
+ "source": "apache",
+ "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]
+ },
+ "application/x-doom": {
+ "source": "apache",
+ "extensions": ["wad"]
+ },
+ "application/x-dtbncx+xml": {
+ "source": "apache",
+ "extensions": ["ncx"]
+ },
+ "application/x-dtbook+xml": {
+ "source": "apache",
+ "extensions": ["dtb"]
+ },
+ "application/x-dtbresource+xml": {
+ "source": "apache",
+ "extensions": ["res"]
+ },
+ "application/x-dvi": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["dvi"]
+ },
+ "application/x-envoy": {
+ "source": "apache",
+ "extensions": ["evy"]
+ },
+ "application/x-eva": {
+ "source": "apache",
+ "extensions": ["eva"]
+ },
+ "application/x-font-bdf": {
+ "source": "apache",
+ "extensions": ["bdf"]
+ },
+ "application/x-font-dos": {
+ "source": "apache"
+ },
+ "application/x-font-framemaker": {
+ "source": "apache"
+ },
+ "application/x-font-ghostscript": {
+ "source": "apache",
+ "extensions": ["gsf"]
+ },
+ "application/x-font-libgrx": {
+ "source": "apache"
+ },
+ "application/x-font-linux-psf": {
+ "source": "apache",
+ "extensions": ["psf"]
+ },
+ "application/x-font-otf": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["otf"]
+ },
+ "application/x-font-pcf": {
+ "source": "apache",
+ "extensions": ["pcf"]
+ },
+ "application/x-font-snf": {
+ "source": "apache",
+ "extensions": ["snf"]
+ },
+ "application/x-font-speedo": {
+ "source": "apache"
+ },
+ "application/x-font-sunos-news": {
+ "source": "apache"
+ },
+ "application/x-font-ttf": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["ttf","ttc"]
+ },
+ "application/x-font-type1": {
+ "source": "apache",
+ "extensions": ["pfa","pfb","pfm","afm"]
+ },
+ "application/x-font-vfont": {
+ "source": "apache"
+ },
+ "application/x-freearc": {
+ "source": "apache",
+ "extensions": ["arc"]
+ },
+ "application/x-futuresplash": {
+ "source": "apache",
+ "extensions": ["spl"]
+ },
+ "application/x-gca-compressed": {
+ "source": "apache",
+ "extensions": ["gca"]
+ },
+ "application/x-glulx": {
+ "source": "apache",
+ "extensions": ["ulx"]
+ },
+ "application/x-gnumeric": {
+ "source": "apache",
+ "extensions": ["gnumeric"]
+ },
+ "application/x-gramps-xml": {
+ "source": "apache",
+ "extensions": ["gramps"]
+ },
+ "application/x-gtar": {
+ "source": "apache",
+ "extensions": ["gtar"]
+ },
+ "application/x-gzip": {
+ "source": "apache"
+ },
+ "application/x-hdf": {
+ "source": "apache",
+ "extensions": ["hdf"]
+ },
+ "application/x-httpd-php": {
+ "compressible": true,
+ "extensions": ["php"]
+ },
+ "application/x-install-instructions": {
+ "source": "apache",
+ "extensions": ["install"]
+ },
+ "application/x-iso9660-image": {
+ "source": "apache",
+ "extensions": ["iso"]
+ },
+ "application/x-java-archive-diff": {
+ "source": "nginx",
+ "extensions": ["jardiff"]
+ },
+ "application/x-java-jnlp-file": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["jnlp"]
+ },
+ "application/x-javascript": {
+ "compressible": true
+ },
+ "application/x-latex": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["latex"]
+ },
+ "application/x-lua-bytecode": {
+ "extensions": ["luac"]
+ },
+ "application/x-lzh-compressed": {
+ "source": "apache",
+ "extensions": ["lzh","lha"]
+ },
+ "application/x-makeself": {
+ "source": "nginx",
+ "extensions": ["run"]
+ },
+ "application/x-mie": {
+ "source": "apache",
+ "extensions": ["mie"]
+ },
+ "application/x-mobipocket-ebook": {
+ "source": "apache",
+ "extensions": ["prc","mobi"]
+ },
+ "application/x-mpegurl": {
+ "compressible": false
+ },
+ "application/x-ms-application": {
+ "source": "apache",
+ "extensions": ["application"]
+ },
+ "application/x-ms-shortcut": {
+ "source": "apache",
+ "extensions": ["lnk"]
+ },
+ "application/x-ms-wmd": {
+ "source": "apache",
+ "extensions": ["wmd"]
+ },
+ "application/x-ms-wmz": {
+ "source": "apache",
+ "extensions": ["wmz"]
+ },
+ "application/x-ms-xbap": {
+ "source": "apache",
+ "extensions": ["xbap"]
+ },
+ "application/x-msaccess": {
+ "source": "apache",
+ "extensions": ["mdb"]
+ },
+ "application/x-msbinder": {
+ "source": "apache",
+ "extensions": ["obd"]
+ },
+ "application/x-mscardfile": {
+ "source": "apache",
+ "extensions": ["crd"]
+ },
+ "application/x-msclip": {
+ "source": "apache",
+ "extensions": ["clp"]
+ },
+ "application/x-msdos-program": {
+ "extensions": ["exe"]
+ },
+ "application/x-msdownload": {
+ "source": "apache",
+ "extensions": ["exe","dll","com","bat","msi"]
+ },
+ "application/x-msmediaview": {
+ "source": "apache",
+ "extensions": ["mvb","m13","m14"]
+ },
+ "application/x-msmetafile": {
+ "source": "apache",
+ "extensions": ["wmf","wmz","emf","emz"]
+ },
+ "application/x-msmoney": {
+ "source": "apache",
+ "extensions": ["mny"]
+ },
+ "application/x-mspublisher": {
+ "source": "apache",
+ "extensions": ["pub"]
+ },
+ "application/x-msschedule": {
+ "source": "apache",
+ "extensions": ["scd"]
+ },
+ "application/x-msterminal": {
+ "source": "apache",
+ "extensions": ["trm"]
+ },
+ "application/x-mswrite": {
+ "source": "apache",
+ "extensions": ["wri"]
+ },
+ "application/x-netcdf": {
+ "source": "apache",
+ "extensions": ["nc","cdf"]
+ },
+ "application/x-ns-proxy-autoconfig": {
+ "compressible": true,
+ "extensions": ["pac"]
+ },
+ "application/x-nzb": {
+ "source": "apache",
+ "extensions": ["nzb"]
+ },
+ "application/x-perl": {
+ "source": "nginx",
+ "extensions": ["pl","pm"]
+ },
+ "application/x-pilot": {
+ "source": "nginx",
+ "extensions": ["prc","pdb"]
+ },
+ "application/x-pkcs12": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["p12","pfx"]
+ },
+ "application/x-pkcs7-certificates": {
+ "source": "apache",
+ "extensions": ["p7b","spc"]
+ },
+ "application/x-pkcs7-certreqresp": {
+ "source": "apache",
+ "extensions": ["p7r"]
+ },
+ "application/x-rar-compressed": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["rar"]
+ },
+ "application/x-redhat-package-manager": {
+ "source": "nginx",
+ "extensions": ["rpm"]
+ },
+ "application/x-research-info-systems": {
+ "source": "apache",
+ "extensions": ["ris"]
+ },
+ "application/x-sea": {
+ "source": "nginx",
+ "extensions": ["sea"]
+ },
+ "application/x-sh": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["sh"]
+ },
+ "application/x-shar": {
+ "source": "apache",
+ "extensions": ["shar"]
+ },
+ "application/x-shockwave-flash": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["swf"]
+ },
+ "application/x-silverlight-app": {
+ "source": "apache",
+ "extensions": ["xap"]
+ },
+ "application/x-sql": {
+ "source": "apache",
+ "extensions": ["sql"]
+ },
+ "application/x-stuffit": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["sit"]
+ },
+ "application/x-stuffitx": {
+ "source": "apache",
+ "extensions": ["sitx"]
+ },
+ "application/x-subrip": {
+ "source": "apache",
+ "extensions": ["srt"]
+ },
+ "application/x-sv4cpio": {
+ "source": "apache",
+ "extensions": ["sv4cpio"]
+ },
+ "application/x-sv4crc": {
+ "source": "apache",
+ "extensions": ["sv4crc"]
+ },
+ "application/x-t3vm-image": {
+ "source": "apache",
+ "extensions": ["t3"]
+ },
+ "application/x-tads": {
+ "source": "apache",
+ "extensions": ["gam"]
+ },
+ "application/x-tar": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["tar"]
+ },
+ "application/x-tcl": {
+ "source": "apache",
+ "extensions": ["tcl","tk"]
+ },
+ "application/x-tex": {
+ "source": "apache",
+ "extensions": ["tex"]
+ },
+ "application/x-tex-tfm": {
+ "source": "apache",
+ "extensions": ["tfm"]
+ },
+ "application/x-texinfo": {
+ "source": "apache",
+ "extensions": ["texinfo","texi"]
+ },
+ "application/x-tgif": {
+ "source": "apache",
+ "extensions": ["obj"]
+ },
+ "application/x-ustar": {
+ "source": "apache",
+ "extensions": ["ustar"]
+ },
+ "application/x-wais-source": {
+ "source": "apache",
+ "extensions": ["src"]
+ },
+ "application/x-web-app-manifest+json": {
+ "compressible": true,
+ "extensions": ["webapp"]
+ },
+ "application/x-www-form-urlencoded": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/x-x509-ca-cert": {
+ "source": "apache",
+ "extensions": ["der","crt","pem"]
+ },
+ "application/x-xfig": {
+ "source": "apache",
+ "extensions": ["fig"]
+ },
+ "application/x-xliff+xml": {
+ "source": "apache",
+ "extensions": ["xlf"]
+ },
+ "application/x-xpinstall": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["xpi"]
+ },
+ "application/x-xz": {
+ "source": "apache",
+ "extensions": ["xz"]
+ },
+ "application/x-zmachine": {
+ "source": "apache",
+ "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"]
+ },
+ "application/x400-bp": {
+ "source": "iana"
+ },
+ "application/xacml+xml": {
+ "source": "iana"
+ },
+ "application/xaml+xml": {
+ "source": "apache",
+ "extensions": ["xaml"]
+ },
+ "application/xcap-att+xml": {
+ "source": "iana"
+ },
+ "application/xcap-caps+xml": {
+ "source": "iana"
+ },
+ "application/xcap-diff+xml": {
+ "source": "iana",
+ "extensions": ["xdf"]
+ },
+ "application/xcap-el+xml": {
+ "source": "iana"
+ },
+ "application/xcap-error+xml": {
+ "source": "iana"
+ },
+ "application/xcap-ns+xml": {
+ "source": "iana"
+ },
+ "application/xcon-conference-info+xml": {
+ "source": "iana"
+ },
+ "application/xcon-conference-info-diff+xml": {
+ "source": "iana"
+ },
+ "application/xenc+xml": {
+ "source": "iana",
+ "extensions": ["xenc"]
+ },
+ "application/xhtml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xhtml","xht"]
+ },
+ "application/xhtml-voice+xml": {
+ "source": "apache"
+ },
+ "application/xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xml","xsl","xsd","rng"]
+ },
+ "application/xml-dtd": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["dtd"]
+ },
+ "application/xml-external-parsed-entity": {
+ "source": "iana"
+ },
+ "application/xml-patch+xml": {
+ "source": "iana"
+ },
+ "application/xmpp+xml": {
+ "source": "iana"
+ },
+ "application/xop+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xop"]
+ },
+ "application/xproc+xml": {
+ "source": "apache",
+ "extensions": ["xpl"]
+ },
+ "application/xslt+xml": {
+ "source": "iana",
+ "extensions": ["xslt"]
+ },
+ "application/xspf+xml": {
+ "source": "apache",
+ "extensions": ["xspf"]
+ },
+ "application/xv+xml": {
+ "source": "iana",
+ "extensions": ["mxml","xhvml","xvml","xvm"]
+ },
+ "application/yang": {
+ "source": "iana",
+ "extensions": ["yang"]
+ },
+ "application/yang-data+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/yang-data+xml": {
+ "source": "iana"
+ },
+ "application/yin+xml": {
+ "source": "iana",
+ "extensions": ["yin"]
+ },
+ "application/zip": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["zip"]
+ },
+ "application/zlib": {
+ "source": "iana"
+ },
+ "audio/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "audio/32kadpcm": {
+ "source": "iana"
+ },
+ "audio/3gpp": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["3gpp"]
+ },
+ "audio/3gpp2": {
+ "source": "iana"
+ },
+ "audio/ac3": {
+ "source": "iana"
+ },
+ "audio/adpcm": {
+ "source": "apache",
+ "extensions": ["adp"]
+ },
+ "audio/amr": {
+ "source": "iana"
+ },
+ "audio/amr-wb": {
+ "source": "iana"
+ },
+ "audio/amr-wb+": {
+ "source": "iana"
+ },
+ "audio/aptx": {
+ "source": "iana"
+ },
+ "audio/asc": {
+ "source": "iana"
+ },
+ "audio/atrac-advanced-lossless": {
+ "source": "iana"
+ },
+ "audio/atrac-x": {
+ "source": "iana"
+ },
+ "audio/atrac3": {
+ "source": "iana"
+ },
+ "audio/basic": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["au","snd"]
+ },
+ "audio/bv16": {
+ "source": "iana"
+ },
+ "audio/bv32": {
+ "source": "iana"
+ },
+ "audio/clearmode": {
+ "source": "iana"
+ },
+ "audio/cn": {
+ "source": "iana"
+ },
+ "audio/dat12": {
+ "source": "iana"
+ },
+ "audio/dls": {
+ "source": "iana"
+ },
+ "audio/dsr-es201108": {
+ "source": "iana"
+ },
+ "audio/dsr-es202050": {
+ "source": "iana"
+ },
+ "audio/dsr-es202211": {
+ "source": "iana"
+ },
+ "audio/dsr-es202212": {
+ "source": "iana"
+ },
+ "audio/dv": {
+ "source": "iana"
+ },
+ "audio/dvi4": {
+ "source": "iana"
+ },
+ "audio/eac3": {
+ "source": "iana"
+ },
+ "audio/encaprtp": {
+ "source": "iana"
+ },
+ "audio/evrc": {
+ "source": "iana"
+ },
+ "audio/evrc-qcp": {
+ "source": "iana"
+ },
+ "audio/evrc0": {
+ "source": "iana"
+ },
+ "audio/evrc1": {
+ "source": "iana"
+ },
+ "audio/evrcb": {
+ "source": "iana"
+ },
+ "audio/evrcb0": {
+ "source": "iana"
+ },
+ "audio/evrcb1": {
+ "source": "iana"
+ },
+ "audio/evrcnw": {
+ "source": "iana"
+ },
+ "audio/evrcnw0": {
+ "source": "iana"
+ },
+ "audio/evrcnw1": {
+ "source": "iana"
+ },
+ "audio/evrcwb": {
+ "source": "iana"
+ },
+ "audio/evrcwb0": {
+ "source": "iana"
+ },
+ "audio/evrcwb1": {
+ "source": "iana"
+ },
+ "audio/evs": {
+ "source": "iana"
+ },
+ "audio/fwdred": {
+ "source": "iana"
+ },
+ "audio/g711-0": {
+ "source": "iana"
+ },
+ "audio/g719": {
+ "source": "iana"
+ },
+ "audio/g722": {
+ "source": "iana"
+ },
+ "audio/g7221": {
+ "source": "iana"
+ },
+ "audio/g723": {
+ "source": "iana"
+ },
+ "audio/g726-16": {
+ "source": "iana"
+ },
+ "audio/g726-24": {
+ "source": "iana"
+ },
+ "audio/g726-32": {
+ "source": "iana"
+ },
+ "audio/g726-40": {
+ "source": "iana"
+ },
+ "audio/g728": {
+ "source": "iana"
+ },
+ "audio/g729": {
+ "source": "iana"
+ },
+ "audio/g7291": {
+ "source": "iana"
+ },
+ "audio/g729d": {
+ "source": "iana"
+ },
+ "audio/g729e": {
+ "source": "iana"
+ },
+ "audio/gsm": {
+ "source": "iana"
+ },
+ "audio/gsm-efr": {
+ "source": "iana"
+ },
+ "audio/gsm-hr-08": {
+ "source": "iana"
+ },
+ "audio/ilbc": {
+ "source": "iana"
+ },
+ "audio/ip-mr_v2.5": {
+ "source": "iana"
+ },
+ "audio/isac": {
+ "source": "apache"
+ },
+ "audio/l16": {
+ "source": "iana"
+ },
+ "audio/l20": {
+ "source": "iana"
+ },
+ "audio/l24": {
+ "source": "iana",
+ "compressible": false
+ },
+ "audio/l8": {
+ "source": "iana"
+ },
+ "audio/lpc": {
+ "source": "iana"
+ },
+ "audio/midi": {
+ "source": "apache",
+ "extensions": ["mid","midi","kar","rmi"]
+ },
+ "audio/mobile-xmf": {
+ "source": "iana"
+ },
+ "audio/mp3": {
+ "compressible": false,
+ "extensions": ["mp3"]
+ },
+ "audio/mp4": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["m4a","mp4a"]
+ },
+ "audio/mp4a-latm": {
+ "source": "iana"
+ },
+ "audio/mpa": {
+ "source": "iana"
+ },
+ "audio/mpa-robust": {
+ "source": "iana"
+ },
+ "audio/mpeg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"]
+ },
+ "audio/mpeg4-generic": {
+ "source": "iana"
+ },
+ "audio/musepack": {
+ "source": "apache"
+ },
+ "audio/ogg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["oga","ogg","spx"]
+ },
+ "audio/opus": {
+ "source": "iana"
+ },
+ "audio/parityfec": {
+ "source": "iana"
+ },
+ "audio/pcma": {
+ "source": "iana"
+ },
+ "audio/pcma-wb": {
+ "source": "iana"
+ },
+ "audio/pcmu": {
+ "source": "iana"
+ },
+ "audio/pcmu-wb": {
+ "source": "iana"
+ },
+ "audio/prs.sid": {
+ "source": "iana"
+ },
+ "audio/qcelp": {
+ "source": "iana"
+ },
+ "audio/raptorfec": {
+ "source": "iana"
+ },
+ "audio/red": {
+ "source": "iana"
+ },
+ "audio/rtp-enc-aescm128": {
+ "source": "iana"
+ },
+ "audio/rtp-midi": {
+ "source": "iana"
+ },
+ "audio/rtploopback": {
+ "source": "iana"
+ },
+ "audio/rtx": {
+ "source": "iana"
+ },
+ "audio/s3m": {
+ "source": "apache",
+ "extensions": ["s3m"]
+ },
+ "audio/silk": {
+ "source": "apache",
+ "extensions": ["sil"]
+ },
+ "audio/smv": {
+ "source": "iana"
+ },
+ "audio/smv-qcp": {
+ "source": "iana"
+ },
+ "audio/smv0": {
+ "source": "iana"
+ },
+ "audio/sp-midi": {
+ "source": "iana"
+ },
+ "audio/speex": {
+ "source": "iana"
+ },
+ "audio/t140c": {
+ "source": "iana"
+ },
+ "audio/t38": {
+ "source": "iana"
+ },
+ "audio/telephone-event": {
+ "source": "iana"
+ },
+ "audio/tone": {
+ "source": "iana"
+ },
+ "audio/uemclip": {
+ "source": "iana"
+ },
+ "audio/ulpfec": {
+ "source": "iana"
+ },
+ "audio/vdvi": {
+ "source": "iana"
+ },
+ "audio/vmr-wb": {
+ "source": "iana"
+ },
+ "audio/vnd.3gpp.iufp": {
+ "source": "iana"
+ },
+ "audio/vnd.4sb": {
+ "source": "iana"
+ },
+ "audio/vnd.audiokoz": {
+ "source": "iana"
+ },
+ "audio/vnd.celp": {
+ "source": "iana"
+ },
+ "audio/vnd.cisco.nse": {
+ "source": "iana"
+ },
+ "audio/vnd.cmles.radio-events": {
+ "source": "iana"
+ },
+ "audio/vnd.cns.anp1": {
+ "source": "iana"
+ },
+ "audio/vnd.cns.inf1": {
+ "source": "iana"
+ },
+ "audio/vnd.dece.audio": {
+ "source": "iana",
+ "extensions": ["uva","uvva"]
+ },
+ "audio/vnd.digital-winds": {
+ "source": "iana",
+ "extensions": ["eol"]
+ },
+ "audio/vnd.dlna.adts": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.heaac.1": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.heaac.2": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.mlp": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.mps": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2x": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2z": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pulse.1": {
+ "source": "iana"
+ },
+ "audio/vnd.dra": {
+ "source": "iana",
+ "extensions": ["dra"]
+ },
+ "audio/vnd.dts": {
+ "source": "iana",
+ "extensions": ["dts"]
+ },
+ "audio/vnd.dts.hd": {
+ "source": "iana",
+ "extensions": ["dtshd"]
+ },
+ "audio/vnd.dvb.file": {
+ "source": "iana"
+ },
+ "audio/vnd.everad.plj": {
+ "source": "iana"
+ },
+ "audio/vnd.hns.audio": {
+ "source": "iana"
+ },
+ "audio/vnd.lucent.voice": {
+ "source": "iana",
+ "extensions": ["lvp"]
+ },
+ "audio/vnd.ms-playready.media.pya": {
+ "source": "iana",
+ "extensions": ["pya"]
+ },
+ "audio/vnd.nokia.mobile-xmf": {
+ "source": "iana"
+ },
+ "audio/vnd.nortel.vbk": {
+ "source": "iana"
+ },
+ "audio/vnd.nuera.ecelp4800": {
+ "source": "iana",
+ "extensions": ["ecelp4800"]
+ },
+ "audio/vnd.nuera.ecelp7470": {
+ "source": "iana",
+ "extensions": ["ecelp7470"]
+ },
+ "audio/vnd.nuera.ecelp9600": {
+ "source": "iana",
+ "extensions": ["ecelp9600"]
+ },
+ "audio/vnd.octel.sbc": {
+ "source": "iana"
+ },
+ "audio/vnd.qcelp": {
+ "source": "iana"
+ },
+ "audio/vnd.rhetorex.32kadpcm": {
+ "source": "iana"
+ },
+ "audio/vnd.rip": {
+ "source": "iana",
+ "extensions": ["rip"]
+ },
+ "audio/vnd.rn-realaudio": {
+ "compressible": false
+ },
+ "audio/vnd.sealedmedia.softseal.mpeg": {
+ "source": "iana"
+ },
+ "audio/vnd.vmx.cvsd": {
+ "source": "iana"
+ },
+ "audio/vnd.wave": {
+ "compressible": false
+ },
+ "audio/vorbis": {
+ "source": "iana",
+ "compressible": false
+ },
+ "audio/vorbis-config": {
+ "source": "iana"
+ },
+ "audio/wav": {
+ "compressible": false,
+ "extensions": ["wav"]
+ },
+ "audio/wave": {
+ "compressible": false,
+ "extensions": ["wav"]
+ },
+ "audio/webm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["weba"]
+ },
+ "audio/x-aac": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["aac"]
+ },
+ "audio/x-aiff": {
+ "source": "apache",
+ "extensions": ["aif","aiff","aifc"]
+ },
+ "audio/x-caf": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["caf"]
+ },
+ "audio/x-flac": {
+ "source": "apache",
+ "extensions": ["flac"]
+ },
+ "audio/x-m4a": {
+ "source": "nginx",
+ "extensions": ["m4a"]
+ },
+ "audio/x-matroska": {
+ "source": "apache",
+ "extensions": ["mka"]
+ },
+ "audio/x-mpegurl": {
+ "source": "apache",
+ "extensions": ["m3u"]
+ },
+ "audio/x-ms-wax": {
+ "source": "apache",
+ "extensions": ["wax"]
+ },
+ "audio/x-ms-wma": {
+ "source": "apache",
+ "extensions": ["wma"]
+ },
+ "audio/x-pn-realaudio": {
+ "source": "apache",
+ "extensions": ["ram","ra"]
+ },
+ "audio/x-pn-realaudio-plugin": {
+ "source": "apache",
+ "extensions": ["rmp"]
+ },
+ "audio/x-realaudio": {
+ "source": "nginx",
+ "extensions": ["ra"]
+ },
+ "audio/x-tta": {
+ "source": "apache"
+ },
+ "audio/x-wav": {
+ "source": "apache",
+ "extensions": ["wav"]
+ },
+ "audio/xm": {
+ "source": "apache",
+ "extensions": ["xm"]
+ },
+ "chemical/x-cdx": {
+ "source": "apache",
+ "extensions": ["cdx"]
+ },
+ "chemical/x-cif": {
+ "source": "apache",
+ "extensions": ["cif"]
+ },
+ "chemical/x-cmdf": {
+ "source": "apache",
+ "extensions": ["cmdf"]
+ },
+ "chemical/x-cml": {
+ "source": "apache",
+ "extensions": ["cml"]
+ },
+ "chemical/x-csml": {
+ "source": "apache",
+ "extensions": ["csml"]
+ },
+ "chemical/x-pdb": {
+ "source": "apache"
+ },
+ "chemical/x-xyz": {
+ "source": "apache",
+ "extensions": ["xyz"]
+ },
+ "font/opentype": {
+ "compressible": true,
+ "extensions": ["otf"]
+ },
+ "image/bmp": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["bmp"]
+ },
+ "image/cgm": {
+ "source": "iana",
+ "extensions": ["cgm"]
+ },
+ "image/dicom-rle": {
+ "source": "iana"
+ },
+ "image/emf": {
+ "source": "iana"
+ },
+ "image/fits": {
+ "source": "iana"
+ },
+ "image/g3fax": {
+ "source": "iana",
+ "extensions": ["g3"]
+ },
+ "image/gif": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["gif"]
+ },
+ "image/ief": {
+ "source": "iana",
+ "extensions": ["ief"]
+ },
+ "image/jls": {
+ "source": "iana"
+ },
+ "image/jp2": {
+ "source": "iana"
+ },
+ "image/jpeg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["jpeg","jpg","jpe"]
+ },
+ "image/jpm": {
+ "source": "iana"
+ },
+ "image/jpx": {
+ "source": "iana"
+ },
+ "image/ktx": {
+ "source": "iana",
+ "extensions": ["ktx"]
+ },
+ "image/naplps": {
+ "source": "iana"
+ },
+ "image/pjpeg": {
+ "compressible": false
+ },
+ "image/png": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["png"]
+ },
+ "image/prs.btif": {
+ "source": "iana",
+ "extensions": ["btif"]
+ },
+ "image/prs.pti": {
+ "source": "iana"
+ },
+ "image/pwg-raster": {
+ "source": "iana"
+ },
+ "image/sgi": {
+ "source": "apache",
+ "extensions": ["sgi"]
+ },
+ "image/svg+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["svg","svgz"]
+ },
+ "image/t38": {
+ "source": "iana"
+ },
+ "image/tiff": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["tiff","tif"]
+ },
+ "image/tiff-fx": {
+ "source": "iana"
+ },
+ "image/vnd.adobe.photoshop": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["psd"]
+ },
+ "image/vnd.airzip.accelerator.azv": {
+ "source": "iana"
+ },
+ "image/vnd.cns.inf2": {
+ "source": "iana"
+ },
+ "image/vnd.dece.graphic": {
+ "source": "iana",
+ "extensions": ["uvi","uvvi","uvg","uvvg"]
+ },
+ "image/vnd.djvu": {
+ "source": "iana",
+ "extensions": ["djvu","djv"]
+ },
+ "image/vnd.dvb.subtitle": {
+ "source": "iana",
+ "extensions": ["sub"]
+ },
+ "image/vnd.dwg": {
+ "source": "iana",
+ "extensions": ["dwg"]
+ },
+ "image/vnd.dxf": {
+ "source": "iana",
+ "extensions": ["dxf"]
+ },
+ "image/vnd.fastbidsheet": {
+ "source": "iana",
+ "extensions": ["fbs"]
+ },
+ "image/vnd.fpx": {
+ "source": "iana",
+ "extensions": ["fpx"]
+ },
+ "image/vnd.fst": {
+ "source": "iana",
+ "extensions": ["fst"]
+ },
+ "image/vnd.fujixerox.edmics-mmr": {
+ "source": "iana",
+ "extensions": ["mmr"]
+ },
+ "image/vnd.fujixerox.edmics-rlc": {
+ "source": "iana",
+ "extensions": ["rlc"]
+ },
+ "image/vnd.globalgraphics.pgb": {
+ "source": "iana"
+ },
+ "image/vnd.microsoft.icon": {
+ "source": "iana"
+ },
+ "image/vnd.mix": {
+ "source": "iana"
+ },
+ "image/vnd.mozilla.apng": {
+ "source": "iana"
+ },
+ "image/vnd.ms-modi": {
+ "source": "iana",
+ "extensions": ["mdi"]
+ },
+ "image/vnd.ms-photo": {
+ "source": "apache",
+ "extensions": ["wdp"]
+ },
+ "image/vnd.net-fpx": {
+ "source": "iana",
+ "extensions": ["npx"]
+ },
+ "image/vnd.radiance": {
+ "source": "iana"
+ },
+ "image/vnd.sealed.png": {
+ "source": "iana"
+ },
+ "image/vnd.sealedmedia.softseal.gif": {
+ "source": "iana"
+ },
+ "image/vnd.sealedmedia.softseal.jpg": {
+ "source": "iana"
+ },
+ "image/vnd.svf": {
+ "source": "iana"
+ },
+ "image/vnd.tencent.tap": {
+ "source": "iana"
+ },
+ "image/vnd.valve.source.texture": {
+ "source": "iana"
+ },
+ "image/vnd.wap.wbmp": {
+ "source": "iana",
+ "extensions": ["wbmp"]
+ },
+ "image/vnd.xiff": {
+ "source": "iana",
+ "extensions": ["xif"]
+ },
+ "image/vnd.zbrush.pcx": {
+ "source": "iana"
+ },
+ "image/webp": {
+ "source": "apache",
+ "extensions": ["webp"]
+ },
+ "image/wmf": {
+ "source": "iana"
+ },
+ "image/x-3ds": {
+ "source": "apache",
+ "extensions": ["3ds"]
+ },
+ "image/x-cmu-raster": {
+ "source": "apache",
+ "extensions": ["ras"]
+ },
+ "image/x-cmx": {
+ "source": "apache",
+ "extensions": ["cmx"]
+ },
+ "image/x-freehand": {
+ "source": "apache",
+ "extensions": ["fh","fhc","fh4","fh5","fh7"]
+ },
+ "image/x-icon": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["ico"]
+ },
+ "image/x-jng": {
+ "source": "nginx",
+ "extensions": ["jng"]
+ },
+ "image/x-mrsid-image": {
+ "source": "apache",
+ "extensions": ["sid"]
+ },
+ "image/x-ms-bmp": {
+ "source": "nginx",
+ "compressible": true,
+ "extensions": ["bmp"]
+ },
+ "image/x-pcx": {
+ "source": "apache",
+ "extensions": ["pcx"]
+ },
+ "image/x-pict": {
+ "source": "apache",
+ "extensions": ["pic","pct"]
+ },
+ "image/x-portable-anymap": {
+ "source": "apache",
+ "extensions": ["pnm"]
+ },
+ "image/x-portable-bitmap": {
+ "source": "apache",
+ "extensions": ["pbm"]
+ },
+ "image/x-portable-graymap": {
+ "source": "apache",
+ "extensions": ["pgm"]
+ },
+ "image/x-portable-pixmap": {
+ "source": "apache",
+ "extensions": ["ppm"]
+ },
+ "image/x-rgb": {
+ "source": "apache",
+ "extensions": ["rgb"]
+ },
+ "image/x-tga": {
+ "source": "apache",
+ "extensions": ["tga"]
+ },
+ "image/x-xbitmap": {
+ "source": "apache",
+ "extensions": ["xbm"]
+ },
+ "image/x-xcf": {
+ "compressible": false
+ },
+ "image/x-xpixmap": {
+ "source": "apache",
+ "extensions": ["xpm"]
+ },
+ "image/x-xwindowdump": {
+ "source": "apache",
+ "extensions": ["xwd"]
+ },
+ "message/cpim": {
+ "source": "iana"
+ },
+ "message/delivery-status": {
+ "source": "iana"
+ },
+ "message/disposition-notification": {
+ "source": "iana"
+ },
+ "message/external-body": {
+ "source": "iana"
+ },
+ "message/feedback-report": {
+ "source": "iana"
+ },
+ "message/global": {
+ "source": "iana"
+ },
+ "message/global-delivery-status": {
+ "source": "iana"
+ },
+ "message/global-disposition-notification": {
+ "source": "iana"
+ },
+ "message/global-headers": {
+ "source": "iana"
+ },
+ "message/http": {
+ "source": "iana",
+ "compressible": false
+ },
+ "message/imdn+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "message/news": {
+ "source": "iana"
+ },
+ "message/partial": {
+ "source": "iana",
+ "compressible": false
+ },
+ "message/rfc822": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["eml","mime"]
+ },
+ "message/s-http": {
+ "source": "iana"
+ },
+ "message/sip": {
+ "source": "iana"
+ },
+ "message/sipfrag": {
+ "source": "iana"
+ },
+ "message/tracking-status": {
+ "source": "iana"
+ },
+ "message/vnd.si.simp": {
+ "source": "iana"
+ },
+ "message/vnd.wfa.wsc": {
+ "source": "iana"
+ },
+ "model/gltf+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "model/iges": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["igs","iges"]
+ },
+ "model/mesh": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["msh","mesh","silo"]
+ },
+ "model/vnd.collada+xml": {
+ "source": "iana",
+ "extensions": ["dae"]
+ },
+ "model/vnd.dwf": {
+ "source": "iana",
+ "extensions": ["dwf"]
+ },
+ "model/vnd.flatland.3dml": {
+ "source": "iana"
+ },
+ "model/vnd.gdl": {
+ "source": "iana",
+ "extensions": ["gdl"]
+ },
+ "model/vnd.gs-gdl": {
+ "source": "apache"
+ },
+ "model/vnd.gs.gdl": {
+ "source": "iana"
+ },
+ "model/vnd.gtw": {
+ "source": "iana",
+ "extensions": ["gtw"]
+ },
+ "model/vnd.moml+xml": {
+ "source": "iana"
+ },
+ "model/vnd.mts": {
+ "source": "iana",
+ "extensions": ["mts"]
+ },
+ "model/vnd.opengex": {
+ "source": "iana"
+ },
+ "model/vnd.parasolid.transmit.binary": {
+ "source": "iana"
+ },
+ "model/vnd.parasolid.transmit.text": {
+ "source": "iana"
+ },
+ "model/vnd.rosette.annotated-data-model": {
+ "source": "iana"
+ },
+ "model/vnd.valve.source.compiled-map": {
+ "source": "iana"
+ },
+ "model/vnd.vtu": {
+ "source": "iana",
+ "extensions": ["vtu"]
+ },
+ "model/vrml": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["wrl","vrml"]
+ },
+ "model/x3d+binary": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["x3db","x3dbz"]
+ },
+ "model/x3d+fastinfoset": {
+ "source": "iana"
+ },
+ "model/x3d+vrml": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["x3dv","x3dvz"]
+ },
+ "model/x3d+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["x3d","x3dz"]
+ },
+ "model/x3d-vrml": {
+ "source": "iana"
+ },
+ "multipart/alternative": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/appledouble": {
+ "source": "iana"
+ },
+ "multipart/byteranges": {
+ "source": "iana"
+ },
+ "multipart/digest": {
+ "source": "iana"
+ },
+ "multipart/encrypted": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/form-data": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/header-set": {
+ "source": "iana"
+ },
+ "multipart/mixed": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/parallel": {
+ "source": "iana"
+ },
+ "multipart/related": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/report": {
+ "source": "iana"
+ },
+ "multipart/signed": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/voice-message": {
+ "source": "iana"
+ },
+ "multipart/x-mixed-replace": {
+ "source": "iana"
+ },
+ "text/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "text/cache-manifest": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["appcache","manifest"]
+ },
+ "text/calendar": {
+ "source": "iana",
+ "extensions": ["ics","ifb"]
+ },
+ "text/calender": {
+ "compressible": true
+ },
+ "text/cmd": {
+ "compressible": true
+ },
+ "text/coffeescript": {
+ "extensions": ["coffee","litcoffee"]
+ },
+ "text/css": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["css"]
+ },
+ "text/csv": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["csv"]
+ },
+ "text/csv-schema": {
+ "source": "iana"
+ },
+ "text/directory": {
+ "source": "iana"
+ },
+ "text/dns": {
+ "source": "iana"
+ },
+ "text/ecmascript": {
+ "source": "iana"
+ },
+ "text/encaprtp": {
+ "source": "iana"
+ },
+ "text/enriched": {
+ "source": "iana"
+ },
+ "text/fwdred": {
+ "source": "iana"
+ },
+ "text/grammar-ref-list": {
+ "source": "iana"
+ },
+ "text/hjson": {
+ "extensions": ["hjson"]
+ },
+ "text/html": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["html","htm","shtml"]
+ },
+ "text/jade": {
+ "extensions": ["jade"]
+ },
+ "text/javascript": {
+ "source": "iana",
+ "compressible": true
+ },
+ "text/jcr-cnd": {
+ "source": "iana"
+ },
+ "text/jsx": {
+ "compressible": true,
+ "extensions": ["jsx"]
+ },
+ "text/less": {
+ "extensions": ["less"]
+ },
+ "text/markdown": {
+ "source": "iana"
+ },
+ "text/mathml": {
+ "source": "nginx",
+ "extensions": ["mml"]
+ },
+ "text/mizar": {
+ "source": "iana"
+ },
+ "text/n3": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["n3"]
+ },
+ "text/parameters": {
+ "source": "iana"
+ },
+ "text/parityfec": {
+ "source": "iana"
+ },
+ "text/plain": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["txt","text","conf","def","list","log","in","ini"]
+ },
+ "text/provenance-notation": {
+ "source": "iana"
+ },
+ "text/prs.fallenstein.rst": {
+ "source": "iana"
+ },
+ "text/prs.lines.tag": {
+ "source": "iana",
+ "extensions": ["dsc"]
+ },
+ "text/prs.prop.logic": {
+ "source": "iana"
+ },
+ "text/raptorfec": {
+ "source": "iana"
+ },
+ "text/red": {
+ "source": "iana"
+ },
+ "text/rfc822-headers": {
+ "source": "iana"
+ },
+ "text/richtext": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rtx"]
+ },
+ "text/rtf": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rtf"]
+ },
+ "text/rtp-enc-aescm128": {
+ "source": "iana"
+ },
+ "text/rtploopback": {
+ "source": "iana"
+ },
+ "text/rtx": {
+ "source": "iana"
+ },
+ "text/sgml": {
+ "source": "iana",
+ "extensions": ["sgml","sgm"]
+ },
+ "text/slim": {
+ "extensions": ["slim","slm"]
+ },
+ "text/stylus": {
+ "extensions": ["stylus","styl"]
+ },
+ "text/t140": {
+ "source": "iana"
+ },
+ "text/tab-separated-values": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["tsv"]
+ },
+ "text/troff": {
+ "source": "iana",
+ "extensions": ["t","tr","roff","man","me","ms"]
+ },
+ "text/turtle": {
+ "source": "iana",
+ "extensions": ["ttl"]
+ },
+ "text/ulpfec": {
+ "source": "iana"
+ },
+ "text/uri-list": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["uri","uris","urls"]
+ },
+ "text/vcard": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["vcard"]
+ },
+ "text/vnd.a": {
+ "source": "iana"
+ },
+ "text/vnd.abc": {
+ "source": "iana"
+ },
+ "text/vnd.ascii-art": {
+ "source": "iana"
+ },
+ "text/vnd.curl": {
+ "source": "iana",
+ "extensions": ["curl"]
+ },
+ "text/vnd.curl.dcurl": {
+ "source": "apache",
+ "extensions": ["dcurl"]
+ },
+ "text/vnd.curl.mcurl": {
+ "source": "apache",
+ "extensions": ["mcurl"]
+ },
+ "text/vnd.curl.scurl": {
+ "source": "apache",
+ "extensions": ["scurl"]
+ },
+ "text/vnd.debian.copyright": {
+ "source": "iana"
+ },
+ "text/vnd.dmclientscript": {
+ "source": "iana"
+ },
+ "text/vnd.dvb.subtitle": {
+ "source": "iana",
+ "extensions": ["sub"]
+ },
+ "text/vnd.esmertec.theme-descriptor": {
+ "source": "iana"
+ },
+ "text/vnd.fly": {
+ "source": "iana",
+ "extensions": ["fly"]
+ },
+ "text/vnd.fmi.flexstor": {
+ "source": "iana",
+ "extensions": ["flx"]
+ },
+ "text/vnd.graphviz": {
+ "source": "iana",
+ "extensions": ["gv"]
+ },
+ "text/vnd.in3d.3dml": {
+ "source": "iana",
+ "extensions": ["3dml"]
+ },
+ "text/vnd.in3d.spot": {
+ "source": "iana",
+ "extensions": ["spot"]
+ },
+ "text/vnd.iptc.newsml": {
+ "source": "iana"
+ },
+ "text/vnd.iptc.nitf": {
+ "source": "iana"
+ },
+ "text/vnd.latex-z": {
+ "source": "iana"
+ },
+ "text/vnd.motorola.reflex": {
+ "source": "iana"
+ },
+ "text/vnd.ms-mediapackage": {
+ "source": "iana"
+ },
+ "text/vnd.net2phone.commcenter.command": {
+ "source": "iana"
+ },
+ "text/vnd.radisys.msml-basic-layout": {
+ "source": "iana"
+ },
+ "text/vnd.si.uricatalogue": {
+ "source": "iana"
+ },
+ "text/vnd.sun.j2me.app-descriptor": {
+ "source": "iana",
+ "extensions": ["jad"]
+ },
+ "text/vnd.trolltech.linguist": {
+ "source": "iana"
+ },
+ "text/vnd.wap.si": {
+ "source": "iana"
+ },
+ "text/vnd.wap.sl": {
+ "source": "iana"
+ },
+ "text/vnd.wap.wml": {
+ "source": "iana",
+ "extensions": ["wml"]
+ },
+ "text/vnd.wap.wmlscript": {
+ "source": "iana",
+ "extensions": ["wmls"]
+ },
+ "text/vtt": {
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["vtt"]
+ },
+ "text/x-asm": {
+ "source": "apache",
+ "extensions": ["s","asm"]
+ },
+ "text/x-c": {
+ "source": "apache",
+ "extensions": ["c","cc","cxx","cpp","h","hh","dic"]
+ },
+ "text/x-component": {
+ "source": "nginx",
+ "extensions": ["htc"]
+ },
+ "text/x-fortran": {
+ "source": "apache",
+ "extensions": ["f","for","f77","f90"]
+ },
+ "text/x-gwt-rpc": {
+ "compressible": true
+ },
+ "text/x-handlebars-template": {
+ "extensions": ["hbs"]
+ },
+ "text/x-java-source": {
+ "source": "apache",
+ "extensions": ["java"]
+ },
+ "text/x-jquery-tmpl": {
+ "compressible": true
+ },
+ "text/x-lua": {
+ "extensions": ["lua"]
+ },
+ "text/x-markdown": {
+ "compressible": true,
+ "extensions": ["markdown","md","mkd"]
+ },
+ "text/x-nfo": {
+ "source": "apache",
+ "extensions": ["nfo"]
+ },
+ "text/x-opml": {
+ "source": "apache",
+ "extensions": ["opml"]
+ },
+ "text/x-pascal": {
+ "source": "apache",
+ "extensions": ["p","pas"]
+ },
+ "text/x-processing": {
+ "compressible": true,
+ "extensions": ["pde"]
+ },
+ "text/x-sass": {
+ "extensions": ["sass"]
+ },
+ "text/x-scss": {
+ "extensions": ["scss"]
+ },
+ "text/x-setext": {
+ "source": "apache",
+ "extensions": ["etx"]
+ },
+ "text/x-sfv": {
+ "source": "apache",
+ "extensions": ["sfv"]
+ },
+ "text/x-suse-ymp": {
+ "compressible": true,
+ "extensions": ["ymp"]
+ },
+ "text/x-uuencode": {
+ "source": "apache",
+ "extensions": ["uu"]
+ },
+ "text/x-vcalendar": {
+ "source": "apache",
+ "extensions": ["vcs"]
+ },
+ "text/x-vcard": {
+ "source": "apache",
+ "extensions": ["vcf"]
+ },
+ "text/xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xml"]
+ },
+ "text/xml-external-parsed-entity": {
+ "source": "iana"
+ },
+ "text/yaml": {
+ "extensions": ["yaml","yml"]
+ },
+ "video/1d-interleaved-parityfec": {
+ "source": "apache"
+ },
+ "video/3gpp": {
+ "source": "apache",
+ "extensions": ["3gp","3gpp"]
+ },
+ "video/3gpp-tt": {
+ "source": "apache"
+ },
+ "video/3gpp2": {
+ "source": "apache",
+ "extensions": ["3g2"]
+ },
+ "video/bmpeg": {
+ "source": "apache"
+ },
+ "video/bt656": {
+ "source": "apache"
+ },
+ "video/celb": {
+ "source": "apache"
+ },
+ "video/dv": {
+ "source": "apache"
+ },
+ "video/encaprtp": {
+ "source": "apache"
+ },
+ "video/h261": {
+ "source": "apache",
+ "extensions": ["h261"]
+ },
+ "video/h263": {
+ "source": "apache",
+ "extensions": ["h263"]
+ },
+ "video/h263-1998": {
+ "source": "apache"
+ },
+ "video/h263-2000": {
+ "source": "apache"
+ },
+ "video/h264": {
+ "source": "apache",
+ "extensions": ["h264"]
+ },
+ "video/h264-rcdo": {
+ "source": "apache"
+ },
+ "video/h264-svc": {
+ "source": "apache"
+ },
+ "video/h265": {
+ "source": "apache"
+ },
+ "video/iso.segment": {
+ "source": "apache"
+ },
+ "video/jpeg": {
+ "source": "apache",
+ "extensions": ["jpgv"]
+ },
+ "video/jpeg2000": {
+ "source": "apache"
+ },
+ "video/jpm": {
+ "source": "apache",
+ "extensions": ["jpm","jpgm"]
+ },
+ "video/mj2": {
+ "source": "apache",
+ "extensions": ["mj2","mjp2"]
+ },
+ "video/mp1s": {
+ "source": "apache"
+ },
+ "video/mp2p": {
+ "source": "apache"
+ },
+ "video/mp2t": {
+ "source": "apache",
+ "extensions": ["ts"]
+ },
+ "video/mp4": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["mp4","mp4v","mpg4"]
+ },
+ "video/mp4v-es": {
+ "source": "apache"
+ },
+ "video/mpeg": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["mpeg","mpg","mpe","m1v","m2v"]
+ },
+ "video/mpeg4-generic": {
+ "source": "apache"
+ },
+ "video/mpv": {
+ "source": "apache"
+ },
+ "video/nv": {
+ "source": "apache"
+ },
+ "video/ogg": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["ogv"]
+ },
+ "video/parityfec": {
+ "source": "apache"
+ },
+ "video/pointer": {
+ "source": "apache"
+ },
+ "video/quicktime": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["qt","mov"]
+ },
+ "video/raptorfec": {
+ "source": "apache"
+ },
+ "video/raw": {
+ "source": "apache"
+ },
+ "video/rtp-enc-aescm128": {
+ "source": "apache"
+ },
+ "video/rtploopback": {
+ "source": "apache"
+ },
+ "video/rtx": {
+ "source": "apache"
+ },
+ "video/smpte292m": {
+ "source": "apache"
+ },
+ "video/ulpfec": {
+ "source": "apache"
+ },
+ "video/vc1": {
+ "source": "apache"
+ },
+ "video/vnd.cctv": {
+ "source": "apache"
+ },
+ "video/vnd.dece.hd": {
+ "source": "apache",
+ "extensions": ["uvh","uvvh"]
+ },
+ "video/vnd.dece.mobile": {
+ "source": "apache",
+ "extensions": ["uvm","uvvm"]
+ },
+ "video/vnd.dece.mp4": {
+ "source": "apache"
+ },
+ "video/vnd.dece.pd": {
+ "source": "apache",
+ "extensions": ["uvp","uvvp"]
+ },
+ "video/vnd.dece.sd": {
+ "source": "apache",
+ "extensions": ["uvs","uvvs"]
+ },
+ "video/vnd.dece.video": {
+ "source": "apache",
+ "extensions": ["uvv","uvvv"]
+ },
+ "video/vnd.directv.mpeg": {
+ "source": "apache"
+ },
+ "video/vnd.directv.mpeg-tts": {
+ "source": "apache"
+ },
+ "video/vnd.dlna.mpeg-tts": {
+ "source": "apache"
+ },
+ "video/vnd.dvb.file": {
+ "source": "apache",
+ "extensions": ["dvb"]
+ },
+ "video/vnd.fvt": {
+ "source": "apache",
+ "extensions": ["fvt"]
+ },
+ "video/vnd.hns.video": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.1dparityfec-1010": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.1dparityfec-2005": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.2dparityfec-1010": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.2dparityfec-2005": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.ttsavc": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.ttsmpeg2": {
+ "source": "apache"
+ },
+ "video/vnd.motorola.video": {
+ "source": "apache"
+ },
+ "video/vnd.motorola.videop": {
+ "source": "apache"
+ },
+ "video/vnd.mpegurl": {
+ "source": "apache",
+ "extensions": ["mxu","m4u"]
+ },
+ "video/vnd.ms-playready.media.pyv": {
+ "source": "apache",
+ "extensions": ["pyv"]
+ },
+ "video/vnd.nokia.interleaved-multimedia": {
+ "source": "apache"
+ },
+ "video/vnd.nokia.videovoip": {
+ "source": "apache"
+ },
+ "video/vnd.objectvideo": {
+ "source": "apache"
+ },
+ "video/vnd.radgamettools.bink": {
+ "source": "apache"
+ },
+ "video/vnd.radgamettools.smacker": {
+ "source": "apache"
+ },
+ "video/vnd.sealed.mpeg1": {
+ "source": "apache"
+ },
+ "video/vnd.sealed.mpeg4": {
+ "source": "apache"
+ },
+ "video/vnd.sealed.swf": {
+ "source": "apache"
+ },
+ "video/vnd.sealedmedia.softseal.mov": {
+ "source": "apache"
+ },
+ "video/vnd.uvvu.mp4": {
+ "source": "apache",
+ "extensions": ["uvu","uvvu"]
+ },
+ "video/vnd.vivo": {
+ "source": "apache",
+ "extensions": ["viv"]
+ },
+ "video/vp8": {
+ "source": "apache"
+ },
+ "video/webm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["webm"]
+ },
+ "video/x-f4v": {
+ "source": "apache",
+ "extensions": ["f4v"]
+ },
+ "video/x-fli": {
+ "source": "apache",
+ "extensions": ["fli"]
+ },
+ "video/x-flv": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["flv"]
+ },
+ "video/x-m4v": {
+ "source": "apache",
+ "extensions": ["m4v"]
+ },
+ "video/x-matroska": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["mkv","mk3d","mks"]
+ },
+ "video/x-mng": {
+ "source": "apache",
+ "extensions": ["mng"]
+ },
+ "video/x-ms-asf": {
+ "source": "apache",
+ "extensions": ["asf","asx"]
+ },
+ "video/x-ms-vob": {
+ "source": "apache",
+ "extensions": ["vob"]
+ },
+ "video/x-ms-wm": {
+ "source": "apache",
+ "extensions": ["wm"]
+ },
+ "video/x-ms-wmv": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["wmv"]
+ },
+ "video/x-ms-wmx": {
+ "source": "apache",
+ "extensions": ["wmx"]
+ },
+ "video/x-ms-wvx": {
+ "source": "apache",
+ "extensions": ["wvx"]
+ },
+ "video/x-msvideo": {
+ "source": "apache",
+ "extensions": ["avi"]
+ },
+ "video/x-sgi-movie": {
+ "source": "apache",
+ "extensions": ["movie"]
+ },
+ "video/x-smv": {
+ "source": "apache",
+ "extensions": ["smv"]
+ },
+ "x-conference/x-cooltalk": {
+ "source": "apache",
+ "extensions": ["ice"]
+ },
+ "x-shader/x-fragment": {
+ "compressible": true
+ },
+ "x-shader/x-vertex": {
+ "compressible": true
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/index.js
new file mode 100644
index 0000000..551031f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/index.js
@@ -0,0 +1,11 @@
+/*!
+ * mime-db
+ * Copyright(c) 2014 Jonathan Ong
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = require('./db.json')
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/package.json
new file mode 100644
index 0000000..2976996
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/package.json
@@ -0,0 +1,102 @@
+{
+ "name": "mime-db",
+ "description": "Media Type Database",
+ "version": "1.25.0",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ {
+ "name": "Robert Kieffer",
+ "email": "robert@broofa.com",
+ "url": "http://github.com/broofa"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "mime",
+ "db",
+ "type",
+ "types",
+ "database",
+ "charset",
+ "charsets"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/mime-db"
+ },
+ "devDependencies": {
+ "bluebird": "3.4.6",
+ "co": "4.6.0",
+ "cogent": "1.0.1",
+ "csv-parse": "1.1.7",
+ "eslint": "3.9.1",
+ "eslint-config-standard": "6.2.1",
+ "eslint-plugin-promise": "3.3.0",
+ "eslint-plugin-standard": "2.0.1",
+ "gnode": "0.1.2",
+ "istanbul": "0.4.5",
+ "mocha": "1.21.5",
+ "raw-body": "2.1.7",
+ "stream-to-array": "2.3.0"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "README.md",
+ "db.json",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "build": "node scripts/build",
+ "fetch": "gnode scripts/fetch-apache && gnode scripts/fetch-iana && gnode scripts/fetch-nginx",
+ "lint": "eslint .",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "update": "npm run fetch && npm run build"
+ },
+ "gitHead": "9a2c710e347b4a7f030aae0d15afc0a06d1c8a37",
+ "bugs": {
+ "url": "https://github.com/jshttp/mime-db/issues"
+ },
+ "homepage": "https://github.com/jshttp/mime-db",
+ "_id": "mime-db@1.25.0",
+ "_shasum": "c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392",
+ "_from": "mime-db@>=1.25.0 <1.26.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392",
+ "tarball": "https://registry.npmjs.org/mime-db/-/mime-db-1.25.0.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/mime-db-1.25.0.tgz_1478915345127_0.22604371700435877"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.25.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/package.json
new file mode 100644
index 0000000..ab1a195
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/mime-types/package.json
@@ -0,0 +1,92 @@
+{
+ "name": "mime-types",
+ "description": "The ultimate javascript content-type utility.",
+ "version": "2.1.13",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jeremiah Senkpiel",
+ "email": "fishrock123@rocketmail.com",
+ "url": "https://searchbeam.jit.su"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "mime",
+ "types"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/mime-types"
+ },
+ "dependencies": {
+ "mime-db": "~1.25.0"
+ },
+ "devDependencies": {
+ "eslint": "3.10.2",
+ "eslint-config-standard": "6.2.1",
+ "eslint-plugin-promise": "3.4.0",
+ "eslint-plugin-standard": "2.0.1",
+ "istanbul": "0.4.5",
+ "mocha": "1.21.5"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "lint": "eslint .",
+ "test": "mocha --reporter spec test/test.js",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot test/test.js"
+ },
+ "gitHead": "83e91a5aea93858bc95ec95a99309592cba0ffe3",
+ "bugs": {
+ "url": "https://github.com/jshttp/mime-types/issues"
+ },
+ "homepage": "https://github.com/jshttp/mime-types",
+ "_id": "mime-types@2.1.13",
+ "_shasum": "e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88",
+ "_from": "mime-types@>=2.1.13 <2.2.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88",
+ "tarball": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.13.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/mime-types-2.1.13.tgz_1479505166253_0.5666956284549087"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.13.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/HISTORY.md
new file mode 100644
index 0000000..10b6917
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/HISTORY.md
@@ -0,0 +1,98 @@
+0.6.1 / 2016-05-02
+==================
+
+ * perf: improve `Accept` parsing speed
+ * perf: improve `Accept-Charset` parsing speed
+ * perf: improve `Accept-Encoding` parsing speed
+ * perf: improve `Accept-Language` parsing speed
+
+0.6.0 / 2015-09-29
+==================
+
+ * Fix including type extensions in parameters in `Accept` parsing
+ * Fix parsing `Accept` parameters with quoted equals
+ * Fix parsing `Accept` parameters with quoted semicolons
+ * Lazy-load modules from main entry point
+ * perf: delay type concatenation until needed
+ * perf: enable strict mode
+ * perf: hoist regular expressions
+ * perf: remove closures getting spec properties
+ * perf: remove a closure from media type parsing
+ * perf: remove property delete from media type parsing
+
+0.5.3 / 2015-05-10
+==================
+
+ * Fix media type parameter matching to be case-insensitive
+
+0.5.2 / 2015-05-06
+==================
+
+ * Fix comparing media types with quoted values
+ * Fix splitting media types with quoted commas
+
+0.5.1 / 2015-02-14
+==================
+
+ * Fix preference sorting to be stable for long acceptable lists
+
+0.5.0 / 2014-12-18
+==================
+
+ * Fix list return order when large accepted list
+ * Fix missing identity encoding when q=0 exists
+ * Remove dynamic building of Negotiator class
+
+0.4.9 / 2014-10-14
+==================
+
+ * Fix error when media type has invalid parameter
+
+0.4.8 / 2014-09-28
+==================
+
+ * Fix all negotiations to be case-insensitive
+ * Stable sort preferences of same quality according to client order
+ * Support Node.js 0.6
+
+0.4.7 / 2014-06-24
+==================
+
+ * Handle invalid provided languages
+ * Handle invalid provided media types
+
+0.4.6 / 2014-06-11
+==================
+
+ * Order by specificity when quality is the same
+
+0.4.5 / 2014-05-29
+==================
+
+ * Fix regression in empty header handling
+
+0.4.4 / 2014-05-29
+==================
+
+ * Fix behaviors when headers are not present
+
+0.4.3 / 2014-04-16
+==================
+
+ * Handle slashes on media params correctly
+
+0.4.2 / 2014-02-28
+==================
+
+ * Fix media type sorting
+ * Handle media types params strictly
+
+0.4.1 / 2014-01-16
+==================
+
+ * Use most specific matches
+
+0.4.0 / 2014-01-09
+==================
+
+ * Remove preferred prefix from methods
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/LICENSE
new file mode 100644
index 0000000..ea6b9e2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/LICENSE
@@ -0,0 +1,24 @@
+(The MIT License)
+
+Copyright (c) 2012-2014 Federico Romero
+Copyright (c) 2012-2014 Isaac Z. Schlueter
+Copyright (c) 2014-2015 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/README.md
new file mode 100644
index 0000000..04a67ff
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/README.md
@@ -0,0 +1,203 @@
+# negotiator
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+An HTTP content negotiator for Node.js
+
+## Installation
+
+```sh
+$ npm install negotiator
+```
+
+## API
+
+```js
+var Negotiator = require('negotiator')
+```
+
+### Accept Negotiation
+
+```js
+availableMediaTypes = ['text/html', 'text/plain', 'application/json']
+
+// The negotiator constructor receives a request object
+negotiator = new Negotiator(request)
+
+// Let's say Accept header is 'text/html, application/*;q=0.2, image/jpeg;q=0.8'
+
+negotiator.mediaTypes()
+// -> ['text/html', 'image/jpeg', 'application/*']
+
+negotiator.mediaTypes(availableMediaTypes)
+// -> ['text/html', 'application/json']
+
+negotiator.mediaType(availableMediaTypes)
+// -> 'text/html'
+```
+
+You can check a working example at `examples/accept.js`.
+
+#### Methods
+
+##### mediaType()
+
+Returns the most preferred media type from the client.
+
+##### mediaType(availableMediaType)
+
+Returns the most preferred media type from a list of available media types.
+
+##### mediaTypes()
+
+Returns an array of preferred media types ordered by the client preference.
+
+##### mediaTypes(availableMediaTypes)
+
+Returns an array of preferred media types ordered by priority from a list of
+available media types.
+
+### Accept-Language Negotiation
+
+```js
+negotiator = new Negotiator(request)
+
+availableLanguages = ['en', 'es', 'fr']
+
+// Let's say Accept-Language header is 'en;q=0.8, es, pt'
+
+negotiator.languages()
+// -> ['es', 'pt', 'en']
+
+negotiator.languages(availableLanguages)
+// -> ['es', 'en']
+
+language = negotiator.language(availableLanguages)
+// -> 'es'
+```
+
+You can check a working example at `examples/language.js`.
+
+#### Methods
+
+##### language()
+
+Returns the most preferred language from the client.
+
+##### language(availableLanguages)
+
+Returns the most preferred language from a list of available languages.
+
+##### languages()
+
+Returns an array of preferred languages ordered by the client preference.
+
+##### languages(availableLanguages)
+
+Returns an array of preferred languages ordered by priority from a list of
+available languages.
+
+### Accept-Charset Negotiation
+
+```js
+availableCharsets = ['utf-8', 'iso-8859-1', 'iso-8859-5']
+
+negotiator = new Negotiator(request)
+
+// Let's say Accept-Charset header is 'utf-8, iso-8859-1;q=0.8, utf-7;q=0.2'
+
+negotiator.charsets()
+// -> ['utf-8', 'iso-8859-1', 'utf-7']
+
+negotiator.charsets(availableCharsets)
+// -> ['utf-8', 'iso-8859-1']
+
+negotiator.charset(availableCharsets)
+// -> 'utf-8'
+```
+
+You can check a working example at `examples/charset.js`.
+
+#### Methods
+
+##### charset()
+
+Returns the most preferred charset from the client.
+
+##### charset(availableCharsets)
+
+Returns the most preferred charset from a list of available charsets.
+
+##### charsets()
+
+Returns an array of preferred charsets ordered by the client preference.
+
+##### charsets(availableCharsets)
+
+Returns an array of preferred charsets ordered by priority from a list of
+available charsets.
+
+### Accept-Encoding Negotiation
+
+```js
+availableEncodings = ['identity', 'gzip']
+
+negotiator = new Negotiator(request)
+
+// Let's say Accept-Encoding header is 'gzip, compress;q=0.2, identity;q=0.5'
+
+negotiator.encodings()
+// -> ['gzip', 'identity', 'compress']
+
+negotiator.encodings(availableEncodings)
+// -> ['gzip', 'identity']
+
+negotiator.encoding(availableEncodings)
+// -> 'gzip'
+```
+
+You can check a working example at `examples/encoding.js`.
+
+#### Methods
+
+##### encoding()
+
+Returns the most preferred encoding from the client.
+
+##### encoding(availableEncodings)
+
+Returns the most preferred encoding from a list of available encodings.
+
+##### encodings()
+
+Returns an array of preferred encodings ordered by the client preference.
+
+##### encodings(availableEncodings)
+
+Returns an array of preferred encodings ordered by priority from a list of
+available encodings.
+
+## See Also
+
+The [accepts](https://npmjs.org/package/accepts#readme) module builds on
+this module and provides an alternative interface, mime type validation,
+and more.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/negotiator.svg
+[npm-url]: https://npmjs.org/package/negotiator
+[node-version-image]: https://img.shields.io/node/v/negotiator.svg
+[node-version-url]: https://nodejs.org/en/download/
+[travis-image]: https://img.shields.io/travis/jshttp/negotiator/master.svg
+[travis-url]: https://travis-ci.org/jshttp/negotiator
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/negotiator/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/negotiator?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/negotiator.svg
+[downloads-url]: https://npmjs.org/package/negotiator
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/index.js
new file mode 100644
index 0000000..8d4f6a2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/index.js
@@ -0,0 +1,124 @@
+/*!
+ * negotiator
+ * Copyright(c) 2012 Federico Romero
+ * Copyright(c) 2012-2014 Isaac Z. Schlueter
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Cached loaded submodules.
+ * @private
+ */
+
+var modules = Object.create(null);
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = Negotiator;
+module.exports.Negotiator = Negotiator;
+
+/**
+ * Create a Negotiator instance from a request.
+ * @param {object} request
+ * @public
+ */
+
+function Negotiator(request) {
+ if (!(this instanceof Negotiator)) {
+ return new Negotiator(request);
+ }
+
+ this.request = request;
+}
+
+Negotiator.prototype.charset = function charset(available) {
+ var set = this.charsets(available);
+ return set && set[0];
+};
+
+Negotiator.prototype.charsets = function charsets(available) {
+ var preferredCharsets = loadModule('charset').preferredCharsets;
+ return preferredCharsets(this.request.headers['accept-charset'], available);
+};
+
+Negotiator.prototype.encoding = function encoding(available) {
+ var set = this.encodings(available);
+ return set && set[0];
+};
+
+Negotiator.prototype.encodings = function encodings(available) {
+ var preferredEncodings = loadModule('encoding').preferredEncodings;
+ return preferredEncodings(this.request.headers['accept-encoding'], available);
+};
+
+Negotiator.prototype.language = function language(available) {
+ var set = this.languages(available);
+ return set && set[0];
+};
+
+Negotiator.prototype.languages = function languages(available) {
+ var preferredLanguages = loadModule('language').preferredLanguages;
+ return preferredLanguages(this.request.headers['accept-language'], available);
+};
+
+Negotiator.prototype.mediaType = function mediaType(available) {
+ var set = this.mediaTypes(available);
+ return set && set[0];
+};
+
+Negotiator.prototype.mediaTypes = function mediaTypes(available) {
+ var preferredMediaTypes = loadModule('mediaType').preferredMediaTypes;
+ return preferredMediaTypes(this.request.headers.accept, available);
+};
+
+// Backwards compatibility
+Negotiator.prototype.preferredCharset = Negotiator.prototype.charset;
+Negotiator.prototype.preferredCharsets = Negotiator.prototype.charsets;
+Negotiator.prototype.preferredEncoding = Negotiator.prototype.encoding;
+Negotiator.prototype.preferredEncodings = Negotiator.prototype.encodings;
+Negotiator.prototype.preferredLanguage = Negotiator.prototype.language;
+Negotiator.prototype.preferredLanguages = Negotiator.prototype.languages;
+Negotiator.prototype.preferredMediaType = Negotiator.prototype.mediaType;
+Negotiator.prototype.preferredMediaTypes = Negotiator.prototype.mediaTypes;
+
+/**
+ * Load the given module.
+ * @private
+ */
+
+function loadModule(moduleName) {
+ var module = modules[moduleName];
+
+ if (module !== undefined) {
+ return module;
+ }
+
+ // This uses a switch for static require analysis
+ switch (moduleName) {
+ case 'charset':
+ module = require('./lib/charset');
+ break;
+ case 'encoding':
+ module = require('./lib/encoding');
+ break;
+ case 'language':
+ module = require('./lib/language');
+ break;
+ case 'mediaType':
+ module = require('./lib/mediaType');
+ break;
+ default:
+ throw new Error('Cannot find module \'' + moduleName + '\'');
+ }
+
+ // Store to prevent invoking require()
+ modules[moduleName] = module;
+
+ return module;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/charset.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/charset.js
new file mode 100644
index 0000000..ac4217b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/charset.js
@@ -0,0 +1,169 @@
+/**
+ * negotiator
+ * Copyright(c) 2012 Isaac Z. Schlueter
+ * Copyright(c) 2014 Federico Romero
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = preferredCharsets;
+module.exports.preferredCharsets = preferredCharsets;
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var simpleCharsetRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/;
+
+/**
+ * Parse the Accept-Charset header.
+ * @private
+ */
+
+function parseAcceptCharset(accept) {
+ var accepts = accept.split(',');
+
+ for (var i = 0, j = 0; i < accepts.length; i++) {
+ var charset = parseCharset(accepts[i].trim(), i);
+
+ if (charset) {
+ accepts[j++] = charset;
+ }
+ }
+
+ // trim accepts
+ accepts.length = j;
+
+ return accepts;
+}
+
+/**
+ * Parse a charset from the Accept-Charset header.
+ * @private
+ */
+
+function parseCharset(str, i) {
+ var match = simpleCharsetRegExp.exec(str);
+ if (!match) return null;
+
+ var charset = match[1];
+ var q = 1;
+ if (match[2]) {
+ var params = match[2].split(';')
+ for (var i = 0; i < params.length; i ++) {
+ var p = params[i].trim().split('=');
+ if (p[0] === 'q') {
+ q = parseFloat(p[1]);
+ break;
+ }
+ }
+ }
+
+ return {
+ charset: charset,
+ q: q,
+ i: i
+ };
+}
+
+/**
+ * Get the priority of a charset.
+ * @private
+ */
+
+function getCharsetPriority(charset, accepted, index) {
+ var priority = {o: -1, q: 0, s: 0};
+
+ for (var i = 0; i < accepted.length; i++) {
+ var spec = specify(charset, accepted[i], index);
+
+ if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
+ priority = spec;
+ }
+ }
+
+ return priority;
+}
+
+/**
+ * Get the specificity of the charset.
+ * @private
+ */
+
+function specify(charset, spec, index) {
+ var s = 0;
+ if(spec.charset.toLowerCase() === charset.toLowerCase()){
+ s |= 1;
+ } else if (spec.charset !== '*' ) {
+ return null
+ }
+
+ return {
+ i: index,
+ o: spec.i,
+ q: spec.q,
+ s: s
+ }
+}
+
+/**
+ * Get the preferred charsets from an Accept-Charset header.
+ * @public
+ */
+
+function preferredCharsets(accept, provided) {
+ // RFC 2616 sec 14.2: no header = *
+ var accepts = parseAcceptCharset(accept === undefined ? '*' : accept || '');
+
+ if (!provided) {
+ // sorted list of all charsets
+ return accepts
+ .filter(isQuality)
+ .sort(compareSpecs)
+ .map(getFullCharset);
+ }
+
+ var priorities = provided.map(function getPriority(type, index) {
+ return getCharsetPriority(type, accepts, index);
+ });
+
+ // sorted list of accepted charsets
+ return priorities.filter(isQuality).sort(compareSpecs).map(function getCharset(priority) {
+ return provided[priorities.indexOf(priority)];
+ });
+}
+
+/**
+ * Compare two specs.
+ * @private
+ */
+
+function compareSpecs(a, b) {
+ return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
+}
+
+/**
+ * Get full charset string.
+ * @private
+ */
+
+function getFullCharset(spec) {
+ return spec.charset;
+}
+
+/**
+ * Check if a spec has any quality.
+ * @private
+ */
+
+function isQuality(spec) {
+ return spec.q > 0;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/encoding.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/encoding.js
new file mode 100644
index 0000000..70ac3de
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/encoding.js
@@ -0,0 +1,184 @@
+/**
+ * negotiator
+ * Copyright(c) 2012 Isaac Z. Schlueter
+ * Copyright(c) 2014 Federico Romero
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = preferredEncodings;
+module.exports.preferredEncodings = preferredEncodings;
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var simpleEncodingRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/;
+
+/**
+ * Parse the Accept-Encoding header.
+ * @private
+ */
+
+function parseAcceptEncoding(accept) {
+ var accepts = accept.split(',');
+ var hasIdentity = false;
+ var minQuality = 1;
+
+ for (var i = 0, j = 0; i < accepts.length; i++) {
+ var encoding = parseEncoding(accepts[i].trim(), i);
+
+ if (encoding) {
+ accepts[j++] = encoding;
+ hasIdentity = hasIdentity || specify('identity', encoding);
+ minQuality = Math.min(minQuality, encoding.q || 1);
+ }
+ }
+
+ if (!hasIdentity) {
+ /*
+ * If identity doesn't explicitly appear in the accept-encoding header,
+ * it's added to the list of acceptable encoding with the lowest q
+ */
+ accepts[j++] = {
+ encoding: 'identity',
+ q: minQuality,
+ i: i
+ };
+ }
+
+ // trim accepts
+ accepts.length = j;
+
+ return accepts;
+}
+
+/**
+ * Parse an encoding from the Accept-Encoding header.
+ * @private
+ */
+
+function parseEncoding(str, i) {
+ var match = simpleEncodingRegExp.exec(str);
+ if (!match) return null;
+
+ var encoding = match[1];
+ var q = 1;
+ if (match[2]) {
+ var params = match[2].split(';');
+ for (var i = 0; i < params.length; i ++) {
+ var p = params[i].trim().split('=');
+ if (p[0] === 'q') {
+ q = parseFloat(p[1]);
+ break;
+ }
+ }
+ }
+
+ return {
+ encoding: encoding,
+ q: q,
+ i: i
+ };
+}
+
+/**
+ * Get the priority of an encoding.
+ * @private
+ */
+
+function getEncodingPriority(encoding, accepted, index) {
+ var priority = {o: -1, q: 0, s: 0};
+
+ for (var i = 0; i < accepted.length; i++) {
+ var spec = specify(encoding, accepted[i], index);
+
+ if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
+ priority = spec;
+ }
+ }
+
+ return priority;
+}
+
+/**
+ * Get the specificity of the encoding.
+ * @private
+ */
+
+function specify(encoding, spec, index) {
+ var s = 0;
+ if(spec.encoding.toLowerCase() === encoding.toLowerCase()){
+ s |= 1;
+ } else if (spec.encoding !== '*' ) {
+ return null
+ }
+
+ return {
+ i: index,
+ o: spec.i,
+ q: spec.q,
+ s: s
+ }
+};
+
+/**
+ * Get the preferred encodings from an Accept-Encoding header.
+ * @public
+ */
+
+function preferredEncodings(accept, provided) {
+ var accepts = parseAcceptEncoding(accept || '');
+
+ if (!provided) {
+ // sorted list of all encodings
+ return accepts
+ .filter(isQuality)
+ .sort(compareSpecs)
+ .map(getFullEncoding);
+ }
+
+ var priorities = provided.map(function getPriority(type, index) {
+ return getEncodingPriority(type, accepts, index);
+ });
+
+ // sorted list of accepted encodings
+ return priorities.filter(isQuality).sort(compareSpecs).map(function getEncoding(priority) {
+ return provided[priorities.indexOf(priority)];
+ });
+}
+
+/**
+ * Compare two specs.
+ * @private
+ */
+
+function compareSpecs(a, b) {
+ return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
+}
+
+/**
+ * Get full encoding string.
+ * @private
+ */
+
+function getFullEncoding(spec) {
+ return spec.encoding;
+}
+
+/**
+ * Check if a spec has any quality.
+ * @private
+ */
+
+function isQuality(spec) {
+ return spec.q > 0;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/language.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/language.js
new file mode 100644
index 0000000..1bd2d0e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/language.js
@@ -0,0 +1,179 @@
+/**
+ * negotiator
+ * Copyright(c) 2012 Isaac Z. Schlueter
+ * Copyright(c) 2014 Federico Romero
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = preferredLanguages;
+module.exports.preferredLanguages = preferredLanguages;
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var simpleLanguageRegExp = /^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/;
+
+/**
+ * Parse the Accept-Language header.
+ * @private
+ */
+
+function parseAcceptLanguage(accept) {
+ var accepts = accept.split(',');
+
+ for (var i = 0, j = 0; i < accepts.length; i++) {
+ var langauge = parseLanguage(accepts[i].trim(), i);
+
+ if (langauge) {
+ accepts[j++] = langauge;
+ }
+ }
+
+ // trim accepts
+ accepts.length = j;
+
+ return accepts;
+}
+
+/**
+ * Parse a language from the Accept-Language header.
+ * @private
+ */
+
+function parseLanguage(str, i) {
+ var match = simpleLanguageRegExp.exec(str);
+ if (!match) return null;
+
+ var prefix = match[1],
+ suffix = match[2],
+ full = prefix;
+
+ if (suffix) full += "-" + suffix;
+
+ var q = 1;
+ if (match[3]) {
+ var params = match[3].split(';')
+ for (var i = 0; i < params.length; i ++) {
+ var p = params[i].split('=');
+ if (p[0] === 'q') q = parseFloat(p[1]);
+ }
+ }
+
+ return {
+ prefix: prefix,
+ suffix: suffix,
+ q: q,
+ i: i,
+ full: full
+ };
+}
+
+/**
+ * Get the priority of a language.
+ * @private
+ */
+
+function getLanguagePriority(language, accepted, index) {
+ var priority = {o: -1, q: 0, s: 0};
+
+ for (var i = 0; i < accepted.length; i++) {
+ var spec = specify(language, accepted[i], index);
+
+ if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
+ priority = spec;
+ }
+ }
+
+ return priority;
+}
+
+/**
+ * Get the specificity of the language.
+ * @private
+ */
+
+function specify(language, spec, index) {
+ var p = parseLanguage(language)
+ if (!p) return null;
+ var s = 0;
+ if(spec.full.toLowerCase() === p.full.toLowerCase()){
+ s |= 4;
+ } else if (spec.prefix.toLowerCase() === p.full.toLowerCase()) {
+ s |= 2;
+ } else if (spec.full.toLowerCase() === p.prefix.toLowerCase()) {
+ s |= 1;
+ } else if (spec.full !== '*' ) {
+ return null
+ }
+
+ return {
+ i: index,
+ o: spec.i,
+ q: spec.q,
+ s: s
+ }
+};
+
+/**
+ * Get the preferred languages from an Accept-Language header.
+ * @public
+ */
+
+function preferredLanguages(accept, provided) {
+ // RFC 2616 sec 14.4: no header = *
+ var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');
+
+ if (!provided) {
+ // sorted list of all languages
+ return accepts
+ .filter(isQuality)
+ .sort(compareSpecs)
+ .map(getFullLanguage);
+ }
+
+ var priorities = provided.map(function getPriority(type, index) {
+ return getLanguagePriority(type, accepts, index);
+ });
+
+ // sorted list of accepted languages
+ return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {
+ return provided[priorities.indexOf(priority)];
+ });
+}
+
+/**
+ * Compare two specs.
+ * @private
+ */
+
+function compareSpecs(a, b) {
+ return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
+}
+
+/**
+ * Get full language string.
+ * @private
+ */
+
+function getFullLanguage(spec) {
+ return spec.full;
+}
+
+/**
+ * Check if a spec has any quality.
+ * @private
+ */
+
+function isQuality(spec) {
+ return spec.q > 0;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/mediaType.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/mediaType.js
new file mode 100644
index 0000000..67309dd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/mediaType.js
@@ -0,0 +1,294 @@
+/**
+ * negotiator
+ * Copyright(c) 2012 Isaac Z. Schlueter
+ * Copyright(c) 2014 Federico Romero
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = preferredMediaTypes;
+module.exports.preferredMediaTypes = preferredMediaTypes;
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var simpleMediaTypeRegExp = /^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/;
+
+/**
+ * Parse the Accept header.
+ * @private
+ */
+
+function parseAccept(accept) {
+ var accepts = splitMediaTypes(accept);
+
+ for (var i = 0, j = 0; i < accepts.length; i++) {
+ var mediaType = parseMediaType(accepts[i].trim(), i);
+
+ if (mediaType) {
+ accepts[j++] = mediaType;
+ }
+ }
+
+ // trim accepts
+ accepts.length = j;
+
+ return accepts;
+}
+
+/**
+ * Parse a media type from the Accept header.
+ * @private
+ */
+
+function parseMediaType(str, i) {
+ var match = simpleMediaTypeRegExp.exec(str);
+ if (!match) return null;
+
+ var params = Object.create(null);
+ var q = 1;
+ var subtype = match[2];
+ var type = match[1];
+
+ if (match[3]) {
+ var kvps = splitParameters(match[3]).map(splitKeyValuePair);
+
+ for (var j = 0; j < kvps.length; j++) {
+ var pair = kvps[j];
+ var key = pair[0].toLowerCase();
+ var val = pair[1];
+
+ // get the value, unwrapping quotes
+ var value = val && val[0] === '"' && val[val.length - 1] === '"'
+ ? val.substr(1, val.length - 2)
+ : val;
+
+ if (key === 'q') {
+ q = parseFloat(value);
+ break;
+ }
+
+ // store parameter
+ params[key] = value;
+ }
+ }
+
+ return {
+ type: type,
+ subtype: subtype,
+ params: params,
+ q: q,
+ i: i
+ };
+}
+
+/**
+ * Get the priority of a media type.
+ * @private
+ */
+
+function getMediaTypePriority(type, accepted, index) {
+ var priority = {o: -1, q: 0, s: 0};
+
+ for (var i = 0; i < accepted.length; i++) {
+ var spec = specify(type, accepted[i], index);
+
+ if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
+ priority = spec;
+ }
+ }
+
+ return priority;
+}
+
+/**
+ * Get the specificity of the media type.
+ * @private
+ */
+
+function specify(type, spec, index) {
+ var p = parseMediaType(type);
+ var s = 0;
+
+ if (!p) {
+ return null;
+ }
+
+ if(spec.type.toLowerCase() == p.type.toLowerCase()) {
+ s |= 4
+ } else if(spec.type != '*') {
+ return null;
+ }
+
+ if(spec.subtype.toLowerCase() == p.subtype.toLowerCase()) {
+ s |= 2
+ } else if(spec.subtype != '*') {
+ return null;
+ }
+
+ var keys = Object.keys(spec.params);
+ if (keys.length > 0) {
+ if (keys.every(function (k) {
+ return spec.params[k] == '*' || (spec.params[k] || '').toLowerCase() == (p.params[k] || '').toLowerCase();
+ })) {
+ s |= 1
+ } else {
+ return null
+ }
+ }
+
+ return {
+ i: index,
+ o: spec.i,
+ q: spec.q,
+ s: s,
+ }
+}
+
+/**
+ * Get the preferred media types from an Accept header.
+ * @public
+ */
+
+function preferredMediaTypes(accept, provided) {
+ // RFC 2616 sec 14.2: no header = */*
+ var accepts = parseAccept(accept === undefined ? '*/*' : accept || '');
+
+ if (!provided) {
+ // sorted list of all types
+ return accepts
+ .filter(isQuality)
+ .sort(compareSpecs)
+ .map(getFullType);
+ }
+
+ var priorities = provided.map(function getPriority(type, index) {
+ return getMediaTypePriority(type, accepts, index);
+ });
+
+ // sorted list of accepted types
+ return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) {
+ return provided[priorities.indexOf(priority)];
+ });
+}
+
+/**
+ * Compare two specs.
+ * @private
+ */
+
+function compareSpecs(a, b) {
+ return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
+}
+
+/**
+ * Get full type string.
+ * @private
+ */
+
+function getFullType(spec) {
+ return spec.type + '/' + spec.subtype;
+}
+
+/**
+ * Check if a spec has any quality.
+ * @private
+ */
+
+function isQuality(spec) {
+ return spec.q > 0;
+}
+
+/**
+ * Count the number of quotes in a string.
+ * @private
+ */
+
+function quoteCount(string) {
+ var count = 0;
+ var index = 0;
+
+ while ((index = string.indexOf('"', index)) !== -1) {
+ count++;
+ index++;
+ }
+
+ return count;
+}
+
+/**
+ * Split a key value pair.
+ * @private
+ */
+
+function splitKeyValuePair(str) {
+ var index = str.indexOf('=');
+ var key;
+ var val;
+
+ if (index === -1) {
+ key = str;
+ } else {
+ key = str.substr(0, index);
+ val = str.substr(index + 1);
+ }
+
+ return [key, val];
+}
+
+/**
+ * Split an Accept header into media types.
+ * @private
+ */
+
+function splitMediaTypes(accept) {
+ var accepts = accept.split(',');
+
+ for (var i = 1, j = 0; i < accepts.length; i++) {
+ if (quoteCount(accepts[j]) % 2 == 0) {
+ accepts[++j] = accepts[i];
+ } else {
+ accepts[j] += ',' + accepts[i];
+ }
+ }
+
+ // trim accepts
+ accepts.length = j + 1;
+
+ return accepts;
+}
+
+/**
+ * Split a string of parameters.
+ * @private
+ */
+
+function splitParameters(str) {
+ var parameters = str.split(';');
+
+ for (var i = 1, j = 0; i < parameters.length; i++) {
+ if (quoteCount(parameters[j]) % 2 == 0) {
+ parameters[++j] = parameters[i];
+ } else {
+ parameters[j] += ';' + parameters[i];
+ }
+ }
+
+ // trim parameters
+ parameters.length = j + 1;
+
+ for (var i = 0; i < parameters.length; i++) {
+ parameters[i] = parameters[i].trim();
+ }
+
+ return parameters;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/package.json
new file mode 100644
index 0000000..8b73084
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/node_modules/negotiator/package.json
@@ -0,0 +1,90 @@
+{
+ "name": "negotiator",
+ "description": "HTTP content negotiation",
+ "version": "0.6.1",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Federico Romero",
+ "email": "federico.romero@outboxlabs.com"
+ },
+ {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "http",
+ "content negotiation",
+ "accept",
+ "accept-language",
+ "accept-encoding",
+ "accept-charset"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jshttp/negotiator.git"
+ },
+ "devDependencies": {
+ "istanbul": "0.4.3",
+ "mocha": "~1.21.5"
+ },
+ "files": [
+ "lib/",
+ "HISTORY.md",
+ "LICENSE",
+ "index.js",
+ "README.md"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --check-leaks --bail test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "751c381c32707f238143cd65d78520e16f4ef9e5",
+ "bugs": {
+ "url": "https://github.com/jshttp/negotiator/issues"
+ },
+ "homepage": "https://github.com/jshttp/negotiator#readme",
+ "_id": "negotiator@0.6.1",
+ "_shasum": "2b327184e8992101177b28563fb5e7102acd0ca9",
+ "_from": "negotiator@0.6.1",
+ "_npmVersion": "2.15.1",
+ "_nodeVersion": "4.4.3",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "dist": {
+ "shasum": "2b327184e8992101177b28563fb5e7102acd0ca9",
+ "tarball": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "federomero",
+ "email": "federomero@gmail.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/negotiator-0.6.1.tgz_1462250848695_0.027451182017102838"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/package.json
new file mode 100644
index 0000000..6dd6e2f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/accepts/package.json
@@ -0,0 +1,78 @@
+{
+ "name": "accepts",
+ "description": "Higher-level content negotiation",
+ "version": "1.3.3",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jshttp/accepts.git"
+ },
+ "dependencies": {
+ "mime-types": "~2.1.11",
+ "negotiator": "0.6.1"
+ },
+ "devDependencies": {
+ "istanbul": "0.4.3",
+ "mocha": "~1.21.5"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --check-leaks --bail test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "keywords": [
+ "content",
+ "negotiation",
+ "accept",
+ "accepts"
+ ],
+ "gitHead": "3e925b1e65ed7da2798849683d49814680dfa426",
+ "bugs": {
+ "url": "https://github.com/jshttp/accepts/issues"
+ },
+ "homepage": "https://github.com/jshttp/accepts#readme",
+ "_id": "accepts@1.3.3",
+ "_shasum": "c3ca7434938648c3e0d9c1e328dd68b622c284ca",
+ "_from": "accepts@>=1.3.3 <1.4.0",
+ "_npmVersion": "2.15.1",
+ "_nodeVersion": "4.4.3",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "dist": {
+ "shasum": "c3ca7434938648c3e0d9c1e328dd68b622c284ca",
+ "tarball": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/accepts-1.3.3.tgz_1462251932032_0.7092335098423064"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/array-flatten/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/array-flatten/LICENSE
new file mode 100644
index 0000000..983fbe8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/array-flatten/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/array-flatten/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/array-flatten/README.md
new file mode 100644
index 0000000..91fa5b6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/array-flatten/README.md
@@ -0,0 +1,43 @@
+# Array Flatten
+
+[![NPM version][npm-image]][npm-url]
+[![NPM downloads][downloads-image]][downloads-url]
+[![Build status][travis-image]][travis-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+
+> Flatten an array of nested arrays into a single flat array. Accepts an optional depth.
+
+## Installation
+
+```
+npm install array-flatten --save
+```
+
+## Usage
+
+```javascript
+var flatten = require('array-flatten')
+
+flatten([1, [2, [3, [4, [5], 6], 7], 8], 9])
+//=> [1, 2, 3, 4, 5, 6, 7, 8, 9]
+
+flatten([1, [2, [3, [4, [5], 6], 7], 8], 9], 2)
+//=> [1, 2, 3, [4, [5], 6], 7, 8, 9]
+
+(function () {
+ flatten(arguments) //=> [1, 2, 3]
+})(1, [2, 3])
+```
+
+## License
+
+MIT
+
+[npm-image]: https://img.shields.io/npm/v/array-flatten.svg?style=flat
+[npm-url]: https://npmjs.org/package/array-flatten
+[downloads-image]: https://img.shields.io/npm/dm/array-flatten.svg?style=flat
+[downloads-url]: https://npmjs.org/package/array-flatten
+[travis-image]: https://img.shields.io/travis/blakeembrey/array-flatten.svg?style=flat
+[travis-url]: https://travis-ci.org/blakeembrey/array-flatten
+[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/array-flatten.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/blakeembrey/array-flatten?branch=master
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/array-flatten/array-flatten.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/array-flatten/array-flatten.js
new file mode 100644
index 0000000..089117b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/array-flatten/array-flatten.js
@@ -0,0 +1,64 @@
+'use strict'
+
+/**
+ * Expose `arrayFlatten`.
+ */
+module.exports = arrayFlatten
+
+/**
+ * Recursive flatten function with depth.
+ *
+ * @param {Array} array
+ * @param {Array} result
+ * @param {Number} depth
+ * @return {Array}
+ */
+function flattenWithDepth (array, result, depth) {
+ for (var i = 0; i < array.length; i++) {
+ var value = array[i]
+
+ if (depth > 0 && Array.isArray(value)) {
+ flattenWithDepth(value, result, depth - 1)
+ } else {
+ result.push(value)
+ }
+ }
+
+ return result
+}
+
+/**
+ * Recursive flatten function. Omitting depth is slightly faster.
+ *
+ * @param {Array} array
+ * @param {Array} result
+ * @return {Array}
+ */
+function flattenForever (array, result) {
+ for (var i = 0; i < array.length; i++) {
+ var value = array[i]
+
+ if (Array.isArray(value)) {
+ flattenForever(value, result)
+ } else {
+ result.push(value)
+ }
+ }
+
+ return result
+}
+
+/**
+ * Flatten an array, with the ability to define a depth.
+ *
+ * @param {Array} array
+ * @param {Number} depth
+ * @return {Array}
+ */
+function arrayFlatten (array, depth) {
+ if (depth == null) {
+ return flattenForever(array, [])
+ }
+
+ return flattenWithDepth(array, [], depth)
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/array-flatten/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/array-flatten/package.json
new file mode 100644
index 0000000..d36db1f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/array-flatten/package.json
@@ -0,0 +1,61 @@
+{
+ "name": "array-flatten",
+ "version": "1.1.1",
+ "description": "Flatten an array of nested arrays into a single flat array",
+ "main": "array-flatten.js",
+ "files": [
+ "array-flatten.js",
+ "LICENSE"
+ ],
+ "scripts": {
+ "test": "istanbul cover _mocha -- -R spec"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/blakeembrey/array-flatten.git"
+ },
+ "keywords": [
+ "array",
+ "flatten",
+ "arguments",
+ "depth"
+ ],
+ "author": {
+ "name": "Blake Embrey",
+ "email": "hello@blakeembrey.com",
+ "url": "http://blakeembrey.me"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/blakeembrey/array-flatten/issues"
+ },
+ "homepage": "https://github.com/blakeembrey/array-flatten",
+ "devDependencies": {
+ "istanbul": "^0.3.13",
+ "mocha": "^2.2.4",
+ "pre-commit": "^1.0.7",
+ "standard": "^3.7.3"
+ },
+ "gitHead": "1963a9189229d408e1e8f585a00c8be9edbd1803",
+ "_id": "array-flatten@1.1.1",
+ "_shasum": "9a5f699051b1e7073328f2a008968b64ea2955d2",
+ "_from": "array-flatten@1.1.1",
+ "_npmVersion": "2.11.3",
+ "_nodeVersion": "2.3.3",
+ "_npmUser": {
+ "name": "blakeembrey",
+ "email": "hello@blakeembrey.com"
+ },
+ "maintainers": [
+ {
+ "name": "blakeembrey",
+ "email": "hello@blakeembrey.com"
+ }
+ ],
+ "dist": {
+ "shasum": "9a5f699051b1e7073328f2a008968b64ea2955d2",
+ "tarball": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-disposition/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-disposition/HISTORY.md
new file mode 100644
index 0000000..76d494c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-disposition/HISTORY.md
@@ -0,0 +1,45 @@
+0.5.1 / 2016-01-17
+==================
+
+ * perf: enable strict mode
+
+0.5.0 / 2014-10-11
+==================
+
+ * Add `parse` function
+
+0.4.0 / 2014-09-21
+==================
+
+ * Expand non-Unicode `filename` to the full ISO-8859-1 charset
+
+0.3.0 / 2014-09-20
+==================
+
+ * Add `fallback` option
+ * Add `type` option
+
+0.2.0 / 2014-09-19
+==================
+
+ * Reduce ambiguity of file names with hex escape in buggy browsers
+
+0.1.2 / 2014-09-19
+==================
+
+ * Fix periodic invalid Unicode filename header
+
+0.1.1 / 2014-09-19
+==================
+
+ * Fix invalid characters appearing in `filename*` parameter
+
+0.1.0 / 2014-09-18
+==================
+
+ * Make the `filename` argument optional
+
+0.0.0 / 2014-09-18
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-disposition/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-disposition/LICENSE
new file mode 100644
index 0000000..b7dce6c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-disposition/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-disposition/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-disposition/README.md
new file mode 100644
index 0000000..5cebce4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-disposition/README.md
@@ -0,0 +1,141 @@
+# content-disposition
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Create and parse HTTP `Content-Disposition` header
+
+## Installation
+
+```sh
+$ npm install content-disposition
+```
+
+## API
+
+```js
+var contentDisposition = require('content-disposition')
+```
+
+### contentDisposition(filename, options)
+
+Create an attachment `Content-Disposition` header value using the given file name,
+if supplied. The `filename` is optional and if no file name is desired, but you
+want to specify `options`, set `filename` to `undefined`.
+
+```js
+res.setHeader('Content-Disposition', contentDisposition('∫ maths.pdf'))
+```
+
+**note** HTTP headers are of the ISO-8859-1 character set. If you are writing this
+header through a means different from `setHeader` in Node.js, you'll want to specify
+the `'binary'` encoding in Node.js.
+
+#### Options
+
+`contentDisposition` accepts these properties in the options object.
+
+##### fallback
+
+If the `filename` option is outside ISO-8859-1, then the file name is actually
+stored in a supplemental field for clients that support Unicode file names and
+a ISO-8859-1 version of the file name is automatically generated.
+
+This specifies the ISO-8859-1 file name to override the automatic generation or
+disables the generation all together, defaults to `true`.
+
+ - A string will specify the ISO-8859-1 file name to use in place of automatic
+ generation.
+ - `false` will disable including a ISO-8859-1 file name and only include the
+ Unicode version (unless the file name is already ISO-8859-1).
+ - `true` will enable automatic generation if the file name is outside ISO-8859-1.
+
+If the `filename` option is ISO-8859-1 and this option is specified and has a
+different value, then the `filename` option is encoded in the extended field
+and this set as the fallback field, even though they are both ISO-8859-1.
+
+##### type
+
+Specifies the disposition type, defaults to `"attachment"`. This can also be
+`"inline"`, or any other value (all values except inline are treated like
+`attachment`, but can convey additional information if both parties agree to
+it). The type is normalized to lower-case.
+
+### contentDisposition.parse(string)
+
+```js
+var disposition = contentDisposition.parse('attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt');
+```
+
+Parse a `Content-Disposition` header string. This automatically handles extended
+("Unicode") parameters by decoding them and providing them under the standard
+parameter name. This will return an object with the following properties (examples
+are shown for the string `'attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt'`):
+
+ - `type`: The disposition type (always lower case). Example: `'attachment'`
+
+ - `parameters`: An object of the parameters in the disposition (name of parameter
+ always lower case and extended versions replace non-extended versions). Example:
+ `{filename: "€ rates.txt"}`
+
+## Examples
+
+### Send a file for download
+
+```js
+var contentDisposition = require('content-disposition')
+var destroy = require('destroy')
+var http = require('http')
+var onFinished = require('on-finished')
+
+var filePath = '/path/to/public/plans.pdf'
+
+http.createServer(function onRequest(req, res) {
+ // set headers
+ res.setHeader('Content-Type', 'application/pdf')
+ res.setHeader('Content-Disposition', contentDisposition(filePath))
+
+ // send file
+ var stream = fs.createReadStream(filePath)
+ stream.pipe(res)
+ onFinished(res, function (err) {
+ destroy(stream)
+ })
+})
+```
+
+## Testing
+
+```sh
+$ npm test
+```
+
+## References
+
+- [RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1][rfc-2616]
+- [RFC 5987: Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters][rfc-5987]
+- [RFC 6266: Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)][rfc-6266]
+- [Test Cases for HTTP Content-Disposition header field (RFC 6266) and the Encodings defined in RFCs 2047, 2231 and 5987][tc-2231]
+
+[rfc-2616]: https://tools.ietf.org/html/rfc2616
+[rfc-5987]: https://tools.ietf.org/html/rfc5987
+[rfc-6266]: https://tools.ietf.org/html/rfc6266
+[tc-2231]: http://greenbytes.de/tech/tc2231/
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/content-disposition.svg?style=flat
+[npm-url]: https://npmjs.org/package/content-disposition
+[node-version-image]: https://img.shields.io/node/v/content-disposition.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/content-disposition.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/content-disposition
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-disposition.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/content-disposition?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/content-disposition.svg?style=flat
+[downloads-url]: https://npmjs.org/package/content-disposition
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-disposition/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-disposition/index.js
new file mode 100644
index 0000000..4a352dc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-disposition/index.js
@@ -0,0 +1,445 @@
+/*!
+ * content-disposition
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ */
+
+module.exports = contentDisposition
+module.exports.parse = parse
+
+/**
+ * Module dependencies.
+ */
+
+var basename = require('path').basename
+
+/**
+ * RegExp to match non attr-char, *after* encodeURIComponent (i.e. not including "%")
+ */
+
+var encodeUriAttrCharRegExp = /[\x00-\x20"'\(\)*,\/:;<=>?@\[\\\]\{\}\x7f]/g
+
+/**
+ * RegExp to match percent encoding escape.
+ */
+
+var hexEscapeRegExp = /%[0-9A-Fa-f]{2}/
+var hexEscapeReplaceRegExp = /%([0-9A-Fa-f]{2})/g
+
+/**
+ * RegExp to match non-latin1 characters.
+ */
+
+var nonLatin1RegExp = /[^\x20-\x7e\xa0-\xff]/g
+
+/**
+ * RegExp to match quoted-pair in RFC 2616
+ *
+ * quoted-pair = "\" CHAR
+ * CHAR = <any US-ASCII character (octets 0 - 127)>
+ */
+
+var qescRegExp = /\\([\u0000-\u007f])/g;
+
+/**
+ * RegExp to match chars that must be quoted-pair in RFC 2616
+ */
+
+var quoteRegExp = /([\\"])/g
+
+/**
+ * RegExp for various RFC 2616 grammar
+ *
+ * parameter = token "=" ( token | quoted-string )
+ * token = 1*<any CHAR except CTLs or separators>
+ * separators = "(" | ")" | "<" | ">" | "@"
+ * | "," | ";" | ":" | "\" | <">
+ * | "/" | "[" | "]" | "?" | "="
+ * | "{" | "}" | SP | HT
+ * quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
+ * qdtext = <any TEXT except <">>
+ * quoted-pair = "\" CHAR
+ * CHAR = <any US-ASCII character (octets 0 - 127)>
+ * TEXT = <any OCTET except CTLs, but including LWS>
+ * LWS = [CRLF] 1*( SP | HT )
+ * CRLF = CR LF
+ * CR = <US-ASCII CR, carriage return (13)>
+ * LF = <US-ASCII LF, linefeed (10)>
+ * SP = <US-ASCII SP, space (32)>
+ * HT = <US-ASCII HT, horizontal-tab (9)>
+ * CTL = <any US-ASCII control character (octets 0 - 31) and DEL (127)>
+ * OCTET = <any 8-bit sequence of data>
+ */
+
+var paramRegExp = /; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g
+var textRegExp = /^[\x20-\x7e\x80-\xff]+$/
+var tokenRegExp = /^[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+$/
+
+/**
+ * RegExp for various RFC 5987 grammar
+ *
+ * ext-value = charset "'" [ language ] "'" value-chars
+ * charset = "UTF-8" / "ISO-8859-1" / mime-charset
+ * mime-charset = 1*mime-charsetc
+ * mime-charsetc = ALPHA / DIGIT
+ * / "!" / "#" / "$" / "%" / "&"
+ * / "+" / "-" / "^" / "_" / "`"
+ * / "{" / "}" / "~"
+ * language = ( 2*3ALPHA [ extlang ] )
+ * / 4ALPHA
+ * / 5*8ALPHA
+ * extlang = *3( "-" 3ALPHA )
+ * value-chars = *( pct-encoded / attr-char )
+ * pct-encoded = "%" HEXDIG HEXDIG
+ * attr-char = ALPHA / DIGIT
+ * / "!" / "#" / "$" / "&" / "+" / "-" / "."
+ * / "^" / "_" / "`" / "|" / "~"
+ */
+
+var extValueRegExp = /^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+\-\.^_`|~])+)$/
+
+/**
+ * RegExp for various RFC 6266 grammar
+ *
+ * disposition-type = "inline" | "attachment" | disp-ext-type
+ * disp-ext-type = token
+ * disposition-parm = filename-parm | disp-ext-parm
+ * filename-parm = "filename" "=" value
+ * | "filename*" "=" ext-value
+ * disp-ext-parm = token "=" value
+ * | ext-token "=" ext-value
+ * ext-token = <the characters in token, followed by "*">
+ */
+
+var dispositionTypeRegExp = /^([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *(?:$|;)/
+
+/**
+ * Create an attachment Content-Disposition header.
+ *
+ * @param {string} [filename]
+ * @param {object} [options]
+ * @param {string} [options.type=attachment]
+ * @param {string|boolean} [options.fallback=true]
+ * @return {string}
+ * @api public
+ */
+
+function contentDisposition(filename, options) {
+ var opts = options || {}
+
+ // get type
+ var type = opts.type || 'attachment'
+
+ // get parameters
+ var params = createparams(filename, opts.fallback)
+
+ // format into string
+ return format(new ContentDisposition(type, params))
+}
+
+/**
+ * Create parameters object from filename and fallback.
+ *
+ * @param {string} [filename]
+ * @param {string|boolean} [fallback=true]
+ * @return {object}
+ * @api private
+ */
+
+function createparams(filename, fallback) {
+ if (filename === undefined) {
+ return
+ }
+
+ var params = {}
+
+ if (typeof filename !== 'string') {
+ throw new TypeError('filename must be a string')
+ }
+
+ // fallback defaults to true
+ if (fallback === undefined) {
+ fallback = true
+ }
+
+ if (typeof fallback !== 'string' && typeof fallback !== 'boolean') {
+ throw new TypeError('fallback must be a string or boolean')
+ }
+
+ if (typeof fallback === 'string' && nonLatin1RegExp.test(fallback)) {
+ throw new TypeError('fallback must be ISO-8859-1 string')
+ }
+
+ // restrict to file base name
+ var name = basename(filename)
+
+ // determine if name is suitable for quoted string
+ var isQuotedString = textRegExp.test(name)
+
+ // generate fallback name
+ var fallbackName = typeof fallback !== 'string'
+ ? fallback && getlatin1(name)
+ : basename(fallback)
+ var hasFallback = typeof fallbackName === 'string' && fallbackName !== name
+
+ // set extended filename parameter
+ if (hasFallback || !isQuotedString || hexEscapeRegExp.test(name)) {
+ params['filename*'] = name
+ }
+
+ // set filename parameter
+ if (isQuotedString || hasFallback) {
+ params.filename = hasFallback
+ ? fallbackName
+ : name
+ }
+
+ return params
+}
+
+/**
+ * Format object to Content-Disposition header.
+ *
+ * @param {object} obj
+ * @param {string} obj.type
+ * @param {object} [obj.parameters]
+ * @return {string}
+ * @api private
+ */
+
+function format(obj) {
+ var parameters = obj.parameters
+ var type = obj.type
+
+ if (!type || typeof type !== 'string' || !tokenRegExp.test(type)) {
+ throw new TypeError('invalid type')
+ }
+
+ // start with normalized type
+ var string = String(type).toLowerCase()
+
+ // append parameters
+ if (parameters && typeof parameters === 'object') {
+ var param
+ var params = Object.keys(parameters).sort()
+
+ for (var i = 0; i < params.length; i++) {
+ param = params[i]
+
+ var val = param.substr(-1) === '*'
+ ? ustring(parameters[param])
+ : qstring(parameters[param])
+
+ string += '; ' + param + '=' + val
+ }
+ }
+
+ return string
+}
+
+/**
+ * Decode a RFC 6987 field value (gracefully).
+ *
+ * @param {string} str
+ * @return {string}
+ * @api private
+ */
+
+function decodefield(str) {
+ var match = extValueRegExp.exec(str)
+
+ if (!match) {
+ throw new TypeError('invalid extended field value')
+ }
+
+ var charset = match[1].toLowerCase()
+ var encoded = match[2]
+ var value
+
+ // to binary string
+ var binary = encoded.replace(hexEscapeReplaceRegExp, pdecode)
+
+ switch (charset) {
+ case 'iso-8859-1':
+ value = getlatin1(binary)
+ break
+ case 'utf-8':
+ value = new Buffer(binary, 'binary').toString('utf8')
+ break
+ default:
+ throw new TypeError('unsupported charset in extended field')
+ }
+
+ return value
+}
+
+/**
+ * Get ISO-8859-1 version of string.
+ *
+ * @param {string} val
+ * @return {string}
+ * @api private
+ */
+
+function getlatin1(val) {
+ // simple Unicode -> ISO-8859-1 transformation
+ return String(val).replace(nonLatin1RegExp, '?')
+}
+
+/**
+ * Parse Content-Disposition header string.
+ *
+ * @param {string} string
+ * @return {object}
+ * @api private
+ */
+
+function parse(string) {
+ if (!string || typeof string !== 'string') {
+ throw new TypeError('argument string is required')
+ }
+
+ var match = dispositionTypeRegExp.exec(string)
+
+ if (!match) {
+ throw new TypeError('invalid type format')
+ }
+
+ // normalize type
+ var index = match[0].length
+ var type = match[1].toLowerCase()
+
+ var key
+ var names = []
+ var params = {}
+ var value
+
+ // calculate index to start at
+ index = paramRegExp.lastIndex = match[0].substr(-1) === ';'
+ ? index - 1
+ : index
+
+ // match parameters
+ while (match = paramRegExp.exec(string)) {
+ if (match.index !== index) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ index += match[0].length
+ key = match[1].toLowerCase()
+ value = match[2]
+
+ if (names.indexOf(key) !== -1) {
+ throw new TypeError('invalid duplicate parameter')
+ }
+
+ names.push(key)
+
+ if (key.indexOf('*') + 1 === key.length) {
+ // decode extended value
+ key = key.slice(0, -1)
+ value = decodefield(value)
+
+ // overwrite existing value
+ params[key] = value
+ continue
+ }
+
+ if (typeof params[key] === 'string') {
+ continue
+ }
+
+ if (value[0] === '"') {
+ // remove quotes and escapes
+ value = value
+ .substr(1, value.length - 2)
+ .replace(qescRegExp, '$1')
+ }
+
+ params[key] = value
+ }
+
+ if (index !== -1 && index !== string.length) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ return new ContentDisposition(type, params)
+}
+
+/**
+ * Percent decode a single character.
+ *
+ * @param {string} str
+ * @param {string} hex
+ * @return {string}
+ * @api private
+ */
+
+function pdecode(str, hex) {
+ return String.fromCharCode(parseInt(hex, 16))
+}
+
+/**
+ * Percent encode a single character.
+ *
+ * @param {string} char
+ * @return {string}
+ * @api private
+ */
+
+function pencode(char) {
+ var hex = String(char)
+ .charCodeAt(0)
+ .toString(16)
+ .toUpperCase()
+ return hex.length === 1
+ ? '%0' + hex
+ : '%' + hex
+}
+
+/**
+ * Quote a string for HTTP.
+ *
+ * @param {string} val
+ * @return {string}
+ * @api private
+ */
+
+function qstring(val) {
+ var str = String(val)
+
+ return '"' + str.replace(quoteRegExp, '\\$1') + '"'
+}
+
+/**
+ * Encode a Unicode string for HTTP (RFC 5987).
+ *
+ * @param {string} val
+ * @return {string}
+ * @api private
+ */
+
+function ustring(val) {
+ var str = String(val)
+
+ // percent encode as UTF-8
+ var encoded = encodeURIComponent(str)
+ .replace(encodeUriAttrCharRegExp, pencode)
+
+ return 'UTF-8\'\'' + encoded
+}
+
+/**
+ * Class for parsed Content-Disposition header for v8 optimization
+ */
+
+function ContentDisposition(type, parameters) {
+ this.type = type
+ this.parameters = parameters
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-disposition/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-disposition/package.json
new file mode 100644
index 0000000..2987c32
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-disposition/package.json
@@ -0,0 +1,65 @@
+{
+ "name": "content-disposition",
+ "description": "Create and parse Content-Disposition header",
+ "version": "0.5.1",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "content-disposition",
+ "http",
+ "rfc6266",
+ "res"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/content-disposition"
+ },
+ "devDependencies": {
+ "istanbul": "0.4.2",
+ "mocha": "1.21.5"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "README.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "7b391db3af5629d4c698f1de21802940bb9f22a5",
+ "bugs": {
+ "url": "https://github.com/jshttp/content-disposition/issues"
+ },
+ "homepage": "https://github.com/jshttp/content-disposition",
+ "_id": "content-disposition@0.5.1",
+ "_shasum": "87476c6a67c8daa87e32e87616df883ba7fb071b",
+ "_from": "content-disposition@0.5.1",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "87476c6a67c8daa87e32e87616df883ba7fb071b",
+ "tarball": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.1.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-type/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-type/HISTORY.md
new file mode 100644
index 0000000..01652ff
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-type/HISTORY.md
@@ -0,0 +1,14 @@
+1.0.2 / 2016-05-09
+==================
+
+ * perf: enable strict mode
+
+1.0.1 / 2015-02-13
+==================
+
+ * Improve missing `Content-Type` header error message
+
+1.0.0 / 2015-02-01
+==================
+
+ * Initial implementation, derived from `media-typer@0.3.0`
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-type/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-type/LICENSE
new file mode 100644
index 0000000..34b1a2d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-type/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2015 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-type/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-type/README.md
new file mode 100644
index 0000000..3ed6741
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-type/README.md
@@ -0,0 +1,92 @@
+# content-type
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Create and parse HTTP Content-Type header according to RFC 7231
+
+## Installation
+
+```sh
+$ npm install content-type
+```
+
+## API
+
+```js
+var contentType = require('content-type')
+```
+
+### contentType.parse(string)
+
+```js
+var obj = contentType.parse('image/svg+xml; charset=utf-8')
+```
+
+Parse a content type string. This will return an object with the following
+properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`):
+
+ - `type`: The media type (the type and subtype, always lower case).
+ Example: `'image/svg+xml'`
+
+ - `parameters`: An object of the parameters in the media type (name of parameter
+ always lower case). Example: `{charset: 'utf-8'}`
+
+Throws a `TypeError` if the string is missing or invalid.
+
+### contentType.parse(req)
+
+```js
+var obj = contentType.parse(req)
+```
+
+Parse the `content-type` header from the given `req`. Short-cut for
+`contentType.parse(req.headers['content-type'])`.
+
+Throws a `TypeError` if the `Content-Type` header is missing or invalid.
+
+### contentType.parse(res)
+
+```js
+var obj = contentType.parse(res)
+```
+
+Parse the `content-type` header set on the given `res`. Short-cut for
+`contentType.parse(res.getHeader('content-type'))`.
+
+Throws a `TypeError` if the `Content-Type` header is missing or invalid.
+
+### contentType.format(obj)
+
+```js
+var str = contentType.format({type: 'image/svg+xml'})
+```
+
+Format an object into a content type string. This will return a string of the
+content type for the given object with the following properties (examples are
+shown that produce the string `'image/svg+xml; charset=utf-8'`):
+
+ - `type`: The media type (will be lower-cased). Example: `'image/svg+xml'`
+
+ - `parameters`: An object of the parameters in the media type (name of the
+ parameter will be lower-cased). Example: `{charset: 'utf-8'}`
+
+Throws a `TypeError` if the object contains an invalid type or parameter names.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/content-type.svg
+[npm-url]: https://npmjs.org/package/content-type
+[node-version-image]: https://img.shields.io/node/v/content-type.svg
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/content-type/master.svg
+[travis-url]: https://travis-ci.org/jshttp/content-type
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-type/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/content-type
+[downloads-image]: https://img.shields.io/npm/dm/content-type.svg
+[downloads-url]: https://npmjs.org/package/content-type
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-type/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-type/index.js
new file mode 100644
index 0000000..61ba6b5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-type/index.js
@@ -0,0 +1,216 @@
+/*!
+ * content-type
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1
+ *
+ * parameter = token "=" ( token / quoted-string )
+ * token = 1*tchar
+ * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
+ * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
+ * / DIGIT / ALPHA
+ * ; any VCHAR, except delimiters
+ * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
+ * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
+ * obs-text = %x80-FF
+ * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
+ */
+var paramRegExp = /; *([!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+) */g
+var textRegExp = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/
+var tokenRegExp = /^[!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+$/
+
+/**
+ * RegExp to match quoted-pair in RFC 7230 sec 3.2.6
+ *
+ * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
+ * obs-text = %x80-FF
+ */
+var qescRegExp = /\\([\u000b\u0020-\u00ff])/g
+
+/**
+ * RegExp to match chars that must be quoted-pair in RFC 7230 sec 3.2.6
+ */
+var quoteRegExp = /([\\"])/g
+
+/**
+ * RegExp to match type in RFC 6838
+ *
+ * media-type = type "/" subtype
+ * type = token
+ * subtype = token
+ */
+var typeRegExp = /^[!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+\/[!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+$/
+
+/**
+ * Module exports.
+ * @public
+ */
+
+exports.format = format
+exports.parse = parse
+
+/**
+ * Format object to media type.
+ *
+ * @param {object} obj
+ * @return {string}
+ * @public
+ */
+
+function format(obj) {
+ if (!obj || typeof obj !== 'object') {
+ throw new TypeError('argument obj is required')
+ }
+
+ var parameters = obj.parameters
+ var type = obj.type
+
+ if (!type || !typeRegExp.test(type)) {
+ throw new TypeError('invalid type')
+ }
+
+ var string = type
+
+ // append parameters
+ if (parameters && typeof parameters === 'object') {
+ var param
+ var params = Object.keys(parameters).sort()
+
+ for (var i = 0; i < params.length; i++) {
+ param = params[i]
+
+ if (!tokenRegExp.test(param)) {
+ throw new TypeError('invalid parameter name')
+ }
+
+ string += '; ' + param + '=' + qstring(parameters[param])
+ }
+ }
+
+ return string
+}
+
+/**
+ * Parse media type to object.
+ *
+ * @param {string|object} string
+ * @return {Object}
+ * @public
+ */
+
+function parse(string) {
+ if (!string) {
+ throw new TypeError('argument string is required')
+ }
+
+ if (typeof string === 'object') {
+ // support req/res-like objects as argument
+ string = getcontenttype(string)
+
+ if (typeof string !== 'string') {
+ throw new TypeError('content-type header is missing from object');
+ }
+ }
+
+ if (typeof string !== 'string') {
+ throw new TypeError('argument string is required to be a string')
+ }
+
+ var index = string.indexOf(';')
+ var type = index !== -1
+ ? string.substr(0, index).trim()
+ : string.trim()
+
+ if (!typeRegExp.test(type)) {
+ throw new TypeError('invalid media type')
+ }
+
+ var key
+ var match
+ var obj = new ContentType(type.toLowerCase())
+ var value
+
+ paramRegExp.lastIndex = index
+
+ while (match = paramRegExp.exec(string)) {
+ if (match.index !== index) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ index += match[0].length
+ key = match[1].toLowerCase()
+ value = match[2]
+
+ if (value[0] === '"') {
+ // remove quotes and escapes
+ value = value
+ .substr(1, value.length - 2)
+ .replace(qescRegExp, '$1')
+ }
+
+ obj.parameters[key] = value
+ }
+
+ if (index !== -1 && index !== string.length) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ return obj
+}
+
+/**
+ * Get content-type from req/res objects.
+ *
+ * @param {object}
+ * @return {Object}
+ * @private
+ */
+
+function getcontenttype(obj) {
+ if (typeof obj.getHeader === 'function') {
+ // res-like
+ return obj.getHeader('content-type')
+ }
+
+ if (typeof obj.headers === 'object') {
+ // req-like
+ return obj.headers && obj.headers['content-type']
+ }
+}
+
+/**
+ * Quote a string if necessary.
+ *
+ * @param {string} val
+ * @return {string}
+ * @private
+ */
+
+function qstring(val) {
+ var str = String(val)
+
+ // no need to quote tokens
+ if (tokenRegExp.test(str)) {
+ return str
+ }
+
+ if (str.length > 0 && !textRegExp.test(str)) {
+ throw new TypeError('invalid parameter value')
+ }
+
+ return '"' + str.replace(quoteRegExp, '\\$1') + '"'
+}
+
+/**
+ * Class to represent a content type.
+ * @private
+ */
+function ContentType(type) {
+ this.parameters = Object.create(null)
+ this.type = type
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-type/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-type/package.json
new file mode 100644
index 0000000..40e076a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/content-type/package.json
@@ -0,0 +1,69 @@
+{
+ "name": "content-type",
+ "description": "Create and parse HTTP Content-Type header",
+ "version": "1.0.2",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "keywords": [
+ "content-type",
+ "http",
+ "req",
+ "res",
+ "rfc7231"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jshttp/content-type.git"
+ },
+ "devDependencies": {
+ "istanbul": "0.4.3",
+ "mocha": "~1.21.5"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "README.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --check-leaks --bail test/",
+ "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"
+ },
+ "gitHead": "8118763adfbbac80cf1254191889330aec8b8be7",
+ "bugs": {
+ "url": "https://github.com/jshttp/content-type/issues"
+ },
+ "homepage": "https://github.com/jshttp/content-type#readme",
+ "_id": "content-type@1.0.2",
+ "_shasum": "b7d113aee7a8dd27bd21133c4dc2529df1721eed",
+ "_from": "content-type@>=1.0.2 <1.1.0",
+ "_npmVersion": "2.15.1",
+ "_nodeVersion": "4.4.3",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "dist": {
+ "shasum": "b7d113aee7a8dd27bd21133c4dc2529df1721eed",
+ "tarball": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/content-type-1.0.2.tgz_1462852785748_0.5491233412176371"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie-signature/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie-signature/.npmignore
new file mode 100644
index 0000000..f1250e5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie-signature/.npmignore
@@ -0,0 +1,4 @@
+support
+test
+examples
+*.sock
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie-signature/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie-signature/History.md
new file mode 100644
index 0000000..78513cc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie-signature/History.md
@@ -0,0 +1,38 @@
+1.0.6 / 2015-02-03
+==================
+
+* use `npm test` instead of `make test` to run tests
+* clearer assertion messages when checking input
+
+
+1.0.5 / 2014-09-05
+==================
+
+* add license to package.json
+
+1.0.4 / 2014-06-25
+==================
+
+ * corrected avoidance of timing attacks (thanks @tenbits!)
+
+1.0.3 / 2014-01-28
+==================
+
+ * [incorrect] fix for timing attacks
+
+1.0.2 / 2014-01-28
+==================
+
+ * fix missing repository warning
+ * fix typo in test
+
+1.0.1 / 2013-04-15
+==================
+
+ * Revert "Changed underlying HMAC algo. to sha512."
+ * Revert "Fix for timing attacks on MAC verification."
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie-signature/Readme.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie-signature/Readme.md
new file mode 100644
index 0000000..2559e84
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie-signature/Readme.md
@@ -0,0 +1,42 @@
+
+# cookie-signature
+
+ Sign and unsign cookies.
+
+## Example
+
+```js
+var cookie = require('cookie-signature');
+
+var val = cookie.sign('hello', 'tobiiscool');
+val.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI');
+
+var val = cookie.sign('hello', 'tobiiscool');
+cookie.unsign(val, 'tobiiscool').should.equal('hello');
+cookie.unsign(val, 'luna').should.be.false;
+```
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2012 LearnBoost &lt;tj@learnboost.com&gt;
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie-signature/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie-signature/index.js
new file mode 100644
index 0000000..b8c9463
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie-signature/index.js
@@ -0,0 +1,51 @@
+/**
+ * Module dependencies.
+ */
+
+var crypto = require('crypto');
+
+/**
+ * Sign the given `val` with `secret`.
+ *
+ * @param {String} val
+ * @param {String} secret
+ * @return {String}
+ * @api private
+ */
+
+exports.sign = function(val, secret){
+ if ('string' != typeof val) throw new TypeError("Cookie value must be provided as a string.");
+ if ('string' != typeof secret) throw new TypeError("Secret string must be provided.");
+ return val + '.' + crypto
+ .createHmac('sha256', secret)
+ .update(val)
+ .digest('base64')
+ .replace(/\=+$/, '');
+};
+
+/**
+ * Unsign and decode the given `val` with `secret`,
+ * returning `false` if the signature is invalid.
+ *
+ * @param {String} val
+ * @param {String} secret
+ * @return {String|Boolean}
+ * @api private
+ */
+
+exports.unsign = function(val, secret){
+ if ('string' != typeof val) throw new TypeError("Signed cookie string must be provided.");
+ if ('string' != typeof secret) throw new TypeError("Secret string must be provided.");
+ var str = val.slice(0, val.lastIndexOf('.'))
+ , mac = exports.sign(str, secret);
+
+ return sha1(mac) == sha1(val) ? str : false;
+};
+
+/**
+ * Private
+ */
+
+function sha1(str){
+ return crypto.createHash('sha1').update(str).digest('hex');
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie-signature/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie-signature/package.json
new file mode 100644
index 0000000..03ca95b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie-signature/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "cookie-signature",
+ "version": "1.0.6",
+ "description": "Sign and unsign cookies",
+ "keywords": [
+ "cookie",
+ "sign",
+ "unsign"
+ ],
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@learnboost.com"
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/visionmedia/node-cookie-signature.git"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "mocha": "*",
+ "should": "*"
+ },
+ "scripts": {
+ "test": "mocha --require should --reporter spec"
+ },
+ "main": "index",
+ "gitHead": "391b56cf44d88c493491b7e3fc53208cfb976d2a",
+ "bugs": {
+ "url": "https://github.com/visionmedia/node-cookie-signature/issues"
+ },
+ "homepage": "https://github.com/visionmedia/node-cookie-signature",
+ "_id": "cookie-signature@1.0.6",
+ "_shasum": "e303a882b342cc3ee8ca513a79999734dab3ae2c",
+ "_from": "cookie-signature@1.0.6",
+ "_npmVersion": "2.3.0",
+ "_nodeVersion": "0.10.36",
+ "_npmUser": {
+ "name": "natevw",
+ "email": "natevw@yahoo.com"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "natevw",
+ "email": "natevw@yahoo.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e303a882b342cc3ee8ca513a79999734dab3ae2c",
+ "tarball": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie/HISTORY.md
new file mode 100644
index 0000000..5bd6485
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie/HISTORY.md
@@ -0,0 +1,118 @@
+0.3.1 / 2016-05-26
+==================
+
+ * Fix `sameSite: true` to work with draft-7 clients
+ - `true` now sends `SameSite=Strict` instead of `SameSite`
+
+0.3.0 / 2016-05-26
+==================
+
+ * Add `sameSite` option
+ - Replaces `firstPartyOnly` option, never implemented by browsers
+ * Improve error message when `encode` is not a function
+ * Improve error message when `expires` is not a `Date`
+
+0.2.4 / 2016-05-20
+==================
+
+ * perf: enable strict mode
+ * perf: use for loop in parse
+ * perf: use string concatination for serialization
+
+0.2.3 / 2015-10-25
+==================
+
+ * Fix cookie `Max-Age` to never be a floating point number
+
+0.2.2 / 2015-09-17
+==================
+
+ * Fix regression when setting empty cookie value
+ - Ease the new restriction, which is just basic header-level validation
+ * Fix typo in invalid value errors
+
+0.2.1 / 2015-09-17
+==================
+
+ * Throw on invalid values provided to `serialize`
+ - Ensures the resulting string is a valid HTTP header value
+
+0.2.0 / 2015-08-13
+==================
+
+ * Add `firstPartyOnly` option
+ * Throw better error for invalid argument to parse
+ * perf: hoist regular expression
+
+0.1.5 / 2015-09-17
+==================
+
+ * Fix regression when setting empty cookie value
+ - Ease the new restriction, which is just basic header-level validation
+ * Fix typo in invalid value errors
+
+0.1.4 / 2015-09-17
+==================
+
+ * Throw better error for invalid argument to parse
+ * Throw on invalid values provided to `serialize`
+ - Ensures the resulting string is a valid HTTP header value
+
+0.1.3 / 2015-05-19
+==================
+
+ * Reduce the scope of try-catch deopt
+ * Remove argument reassignments
+
+0.1.2 / 2014-04-16
+==================
+
+ * Remove unnecessary files from npm package
+
+0.1.1 / 2014-02-23
+==================
+
+ * Fix bad parse when cookie value contained a comma
+ * Fix support for `maxAge` of `0`
+
+0.1.0 / 2013-05-01
+==================
+
+ * Add `decode` option
+ * Add `encode` option
+
+0.0.6 / 2013-04-08
+==================
+
+ * Ignore cookie parts missing `=`
+
+0.0.5 / 2012-10-29
+==================
+
+ * Return raw cookie value if value unescape errors
+
+0.0.4 / 2012-06-21
+==================
+
+ * Use encode/decodeURIComponent for cookie encoding/decoding
+ - Improve server/client interoperability
+
+0.0.3 / 2012-06-06
+==================
+
+ * Only escape special characters per the cookie RFC
+
+0.0.2 / 2012-06-01
+==================
+
+ * Fix `maxAge` option to not throw error
+
+0.0.1 / 2012-05-28
+==================
+
+ * Add more tests
+
+0.0.0 / 2012-05-28
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie/LICENSE
new file mode 100644
index 0000000..058b6b4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie/LICENSE
@@ -0,0 +1,24 @@
+(The MIT License)
+
+Copyright (c) 2012-2014 Roman Shtylman <shtylman@gmail.com>
+Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie/README.md
new file mode 100644
index 0000000..db0d078
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie/README.md
@@ -0,0 +1,220 @@
+# cookie
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Basic HTTP cookie parser and serializer for HTTP servers.
+
+## Installation
+
+```sh
+$ npm install cookie
+```
+
+## API
+
+```js
+var cookie = require('cookie');
+```
+
+### cookie.parse(str, options)
+
+Parse an HTTP `Cookie` header string and returning an object of all cookie name-value pairs.
+The `str` argument is the string representing a `Cookie` header value and `options` is an
+optional object containing additional parsing options.
+
+```js
+var cookies = cookie.parse('foo=bar; equation=E%3Dmc%5E2');
+// { foo: 'bar', equation: 'E=mc^2' }
+```
+
+#### Options
+
+`cookie.parse` accepts these properties in the options object.
+
+##### decode
+
+Specifies a function that will be used to decode a cookie's value. Since the value of a cookie
+has a limited character set (and must be a simple string), this function can be used to decode
+a previously-encoded cookie value into a JavaScript string or other object.
+
+The default function is the global `decodeURIComponent`, which will decode any URL-encoded
+sequences into their byte representations.
+
+**note** if an error is thrown from this function, the original, non-decoded cookie value will
+be returned as the cookie's value.
+
+### cookie.serialize(name, value, options)
+
+Serialize a cookie name-value pair into a `Set-Cookie` header string. The `name` argument is the
+name for the cookie, the `value` argument is the value to set the cookie to, and the `options`
+argument is an optional object containing additional serialization options.
+
+```js
+var setCookie = cookie.serialize('foo', 'bar');
+// foo=bar
+```
+
+#### Options
+
+`cookie.serialize` accepts these properties in the options object.
+
+##### domain
+
+Specifies the value for the [`Domain` `Set-Cookie` attribute][rfc-6266-5.2.3]. By default, no
+domain is set, and most clients will consider the cookie to apply to only the current domain.
+
+##### encode
+
+Specifies a function that will be used to encode a cookie's value. Since value of a cookie
+has a limited character set (and must be a simple string), this function can be used to encode
+a value into a string suited for a cookie's value.
+
+The default function is the global `ecodeURIComponent`, which will encode a JavaScript string
+into UTF-8 byte sequences and then URL-encode any that fall outside of the cookie range.
+
+##### expires
+
+Specifies the `Date` object to be the value for the [`Expires` `Set-Cookie` attribute][rfc-6266-5.2.1].
+By default, no expiration is set, and most clients will consider this a "non-persistent cookie" and
+will delete it on a condition like exiting a web browser application.
+
+**note** the [cookie storage model specification][rfc-6266-5.3] states that if both `expires` and
+`magAge` are set, then `maxAge` takes precedence, but it is possiblke not all clients by obey this,
+so if both are set, they should point to the same date and time.
+
+##### httpOnly
+
+Specifies the `boolean` value for the [`HttpOnly` `Set-Cookie` attribute][rfc-6266-5.2.6]. When truthy,
+the `HttpOnly` attribute is set, otherwise it is not. By default, the `HttpOnly` attribute is not set.
+
+**note** be careful when setting this to `true`, as compliant clients will not allow client-side
+JavaScript to see the cookie in `document.cookie`.
+
+##### maxAge
+
+Specifies the `number` (in seconds) to be the value for the [`Max-Age` `Set-Cookie` attribute][rfc-6266-5.2.2].
+The given number will be converted to an integer by rounding down. By default, no maximum age is set.
+
+**note** the [cookie storage model specification][rfc-6266-5.3] states that if both `expires` and
+`magAge` are set, then `maxAge` takes precedence, but it is possiblke not all clients by obey this,
+so if both are set, they should point to the same date and time.
+
+##### path
+
+Specifies the value for the [`Path` `Set-Cookie` attribute][rfc-6266-5.2.4]. By default, the path
+is considered the ["default path"][rfc-6266-5.1.4]. By default, no maximum age is set, and most
+clients will consider this a "non-persistent cookie" and will delete it on a condition like exiting
+a web browser application.
+
+##### sameSite
+
+Specifies the `boolean` or `string` to be the value for the [`SameSite` `Set-Cookie` attribute][draft-west-first-party-cookies-07].
+
+ - `true` will set the `SameSite` attribute to `Strict` for strict same site enforcement.
+ - `false` will not set the `SameSite` attribute.
+ - `'lax'` will set the `SameSite` attribute to `Lax` for lax same site enforcement.
+ - `'strict'` will set the `SameSite` attribute to `Strict` for strict same site enforcement.
+
+More information about the different enforcement levels can be found in the specification
+https://tools.ietf.org/html/draft-west-first-party-cookies-07#section-4.1.1
+
+**note** This is an attribute that has not yet been fully standardized, and may change in the future.
+This also means many clients may ignore this attribute until they understand it.
+
+##### secure
+
+Specifies the `boolean` value for the [`Secure` `Set-Cookie` attribute][rfc-6266-5.2.5]. When truthy,
+the `Secure` attribute is set, otherwise it is not. By default, the `Secure` attribute is not set.
+
+**note** be careful when setting this to `true`, as compliant clients will not send the cookie back to
+the server in the future if the browser does not have an HTTPS connection.
+
+## Example
+
+The following example uses this module in conjunction with the Node.js core HTTP server
+to prompt a user for their name and display it back on future visits.
+
+```js
+var cookie = require('cookie');
+var escapeHtml = require('escape-html');
+var http = require('http');
+var url = require('url');
+
+function onRequest(req, res) {
+ // Parse the query string
+ var query = url.parse(req.url, true, true).query;
+
+ if (query && query.name) {
+ // Set a new cookie with the name
+ res.setHeader('Set-Cookie', cookie.serialize('name', String(query.name), {
+ httpOnly: true,
+ maxAge: 60 * 60 * 24 * 7 // 1 week
+ }));
+
+ // Redirect back after setting cookie
+ res.statusCode = 302;
+ res.setHeader('Location', req.headers.referer || '/');
+ res.end();
+ return;
+ }
+
+ // Parse the cookies on the request
+ var cookies = cookie.parse(req.headers.cookie || '');
+
+ // Get the visitor name set in the cookie
+ var name = cookies.name;
+
+ res.setHeader('Content-Type', 'text/html; charset=UTF-8');
+
+ if (name) {
+ res.write('<p>Welcome back, <b>' + escapeHtml(name) + '</b>!</p>');
+ } else {
+ res.write('<p>Hello, new visitor!</p>');
+ }
+
+ res.write('<form method="GET">');
+ res.write('<input placeholder="enter your name" name="name"> <input type="submit" value="Set Name">');
+ res.end('</form');
+}
+
+http.createServer(onRequest).listen(3000);
+```
+
+## Testing
+
+```sh
+$ npm test
+```
+
+## References
+
+- [RFC 6266: HTTP State Management Mechanism][rfc-6266]
+- [Same-site Cookies][draft-west-first-party-cookies-07]
+
+[draft-west-first-party-cookies-07]: https://tools.ietf.org/html/draft-west-first-party-cookies-07
+[rfc-6266]: https://tools.ietf.org/html/rfc6266
+[rfc-6266-5.1.4]: https://tools.ietf.org/html/rfc6266#section-5.1.4
+[rfc-6266-5.2.1]: https://tools.ietf.org/html/rfc6266#section-5.2.1
+[rfc-6266-5.2.2]: https://tools.ietf.org/html/rfc6266#section-5.2.2
+[rfc-6266-5.2.3]: https://tools.ietf.org/html/rfc6266#section-5.2.3
+[rfc-6266-5.2.4]: https://tools.ietf.org/html/rfc6266#section-5.2.4
+[rfc-6266-5.3]: https://tools.ietf.org/html/rfc6266#section-5.3
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/cookie.svg
+[npm-url]: https://npmjs.org/package/cookie
+[node-version-image]: https://img.shields.io/node/v/cookie.svg
+[node-version-url]: https://nodejs.org/en/download
+[travis-image]: https://img.shields.io/travis/jshttp/cookie/master.svg
+[travis-url]: https://travis-ci.org/jshttp/cookie
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/cookie/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/cookie?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/cookie.svg
+[downloads-url]: https://npmjs.org/package/cookie
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie/index.js
new file mode 100644
index 0000000..ab2e467
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie/index.js
@@ -0,0 +1,195 @@
+/*!
+ * cookie
+ * Copyright(c) 2012-2014 Roman Shtylman
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module exports.
+ * @public
+ */
+
+exports.parse = parse;
+exports.serialize = serialize;
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var decode = decodeURIComponent;
+var encode = encodeURIComponent;
+var pairSplitRegExp = /; */;
+
+/**
+ * RegExp to match field-content in RFC 7230 sec 3.2
+ *
+ * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
+ * field-vchar = VCHAR / obs-text
+ * obs-text = %x80-FF
+ */
+
+var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
+
+/**
+ * Parse a cookie header.
+ *
+ * Parse the given cookie header string into an object
+ * The object has the various cookies as keys(names) => values
+ *
+ * @param {string} str
+ * @param {object} [options]
+ * @return {object}
+ * @public
+ */
+
+function parse(str, options) {
+ if (typeof str !== 'string') {
+ throw new TypeError('argument str must be a string');
+ }
+
+ var obj = {}
+ var opt = options || {};
+ var pairs = str.split(pairSplitRegExp);
+ var dec = opt.decode || decode;
+
+ for (var i = 0; i < pairs.length; i++) {
+ var pair = pairs[i];
+ var eq_idx = pair.indexOf('=');
+
+ // skip things that don't look like key=value
+ if (eq_idx < 0) {
+ continue;
+ }
+
+ var key = pair.substr(0, eq_idx).trim()
+ var val = pair.substr(++eq_idx, pair.length).trim();
+
+ // quoted values
+ if ('"' == val[0]) {
+ val = val.slice(1, -1);
+ }
+
+ // only assign once
+ if (undefined == obj[key]) {
+ obj[key] = tryDecode(val, dec);
+ }
+ }
+
+ return obj;
+}
+
+/**
+ * Serialize data into a cookie header.
+ *
+ * Serialize the a name value pair into a cookie string suitable for
+ * http headers. An optional options object specified cookie parameters.
+ *
+ * serialize('foo', 'bar', { httpOnly: true })
+ * => "foo=bar; httpOnly"
+ *
+ * @param {string} name
+ * @param {string} val
+ * @param {object} [options]
+ * @return {string}
+ * @public
+ */
+
+function serialize(name, val, options) {
+ var opt = options || {};
+ var enc = opt.encode || encode;
+
+ if (typeof enc !== 'function') {
+ throw new TypeError('option encode is invalid');
+ }
+
+ if (!fieldContentRegExp.test(name)) {
+ throw new TypeError('argument name is invalid');
+ }
+
+ var value = enc(val);
+
+ if (value && !fieldContentRegExp.test(value)) {
+ throw new TypeError('argument val is invalid');
+ }
+
+ var str = name + '=' + value;
+
+ if (null != opt.maxAge) {
+ var maxAge = opt.maxAge - 0;
+ if (isNaN(maxAge)) throw new Error('maxAge should be a Number');
+ str += '; Max-Age=' + Math.floor(maxAge);
+ }
+
+ if (opt.domain) {
+ if (!fieldContentRegExp.test(opt.domain)) {
+ throw new TypeError('option domain is invalid');
+ }
+
+ str += '; Domain=' + opt.domain;
+ }
+
+ if (opt.path) {
+ if (!fieldContentRegExp.test(opt.path)) {
+ throw new TypeError('option path is invalid');
+ }
+
+ str += '; Path=' + opt.path;
+ }
+
+ if (opt.expires) {
+ if (typeof opt.expires.toUTCString !== 'function') {
+ throw new TypeError('option expires is invalid');
+ }
+
+ str += '; Expires=' + opt.expires.toUTCString();
+ }
+
+ if (opt.httpOnly) {
+ str += '; HttpOnly';
+ }
+
+ if (opt.secure) {
+ str += '; Secure';
+ }
+
+ if (opt.sameSite) {
+ var sameSite = typeof opt.sameSite === 'string'
+ ? opt.sameSite.toLowerCase() : opt.sameSite;
+
+ switch (sameSite) {
+ case true:
+ str += '; SameSite=Strict';
+ break;
+ case 'lax':
+ str += '; SameSite=Lax';
+ break;
+ case 'strict':
+ str += '; SameSite=Strict';
+ break;
+ default:
+ throw new TypeError('option sameSite is invalid');
+ }
+ }
+
+ return str;
+}
+
+/**
+ * Try decoding a string using a decoding function.
+ *
+ * @param {string} str
+ * @param {function} decode
+ * @private
+ */
+
+function tryDecode(str, decode) {
+ try {
+ return decode(str);
+ } catch (e) {
+ return str;
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie/package.json
new file mode 100644
index 0000000..a24d81c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/cookie/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "cookie",
+ "description": "HTTP server cookie parsing and serialization",
+ "version": "0.3.1",
+ "author": {
+ "name": "Roman Shtylman",
+ "email": "shtylman@gmail.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "cookie",
+ "cookies"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/cookie"
+ },
+ "devDependencies": {
+ "istanbul": "0.4.3",
+ "mocha": "1.21.5"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "README.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"
+ },
+ "gitHead": "e3c77d497d66c8b8d4b677b8954c1b192a09f0b3",
+ "bugs": {
+ "url": "https://github.com/jshttp/cookie/issues"
+ },
+ "homepage": "https://github.com/jshttp/cookie",
+ "_id": "cookie@0.3.1",
+ "_shasum": "e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb",
+ "_from": "cookie@0.3.1",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb",
+ "tarball": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/cookie-0.3.1.tgz_1464323556714_0.6435900838114321"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/.jshintrc b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/.jshintrc
new file mode 100644
index 0000000..299877f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/.jshintrc
@@ -0,0 +1,3 @@
+{
+ "laxbreak": true
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/.npmignore
new file mode 100644
index 0000000..7e6163d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/.npmignore
@@ -0,0 +1,6 @@
+support
+test
+examples
+example
+*.sock
+dist
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/History.md
new file mode 100644
index 0000000..854c971
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/History.md
@@ -0,0 +1,195 @@
+
+2.2.0 / 2015-05-09
+==================
+
+ * package: update "ms" to v0.7.1 (#202, @dougwilson)
+ * README: add logging to file example (#193, @DanielOchoa)
+ * README: fixed a typo (#191, @amir-s)
+ * browser: expose `storage` (#190, @stephenmathieson)
+ * Makefile: add a `distclean` target (#189, @stephenmathieson)
+
+2.1.3 / 2015-03-13
+==================
+
+ * Updated stdout/stderr example (#186)
+ * Updated example/stdout.js to match debug current behaviour
+ * Renamed example/stderr.js to stdout.js
+ * Update Readme.md (#184)
+ * replace high intensity foreground color for bold (#182, #183)
+
+2.1.2 / 2015-03-01
+==================
+
+ * dist: recompile
+ * update "ms" to v0.7.0
+ * package: update "browserify" to v9.0.3
+ * component: fix "ms.js" repo location
+ * changed bower package name
+ * updated documentation about using debug in a browser
+ * fix: security error on safari (#167, #168, @yields)
+
+2.1.1 / 2014-12-29
+==================
+
+ * browser: use `typeof` to check for `console` existence
+ * browser: check for `console.log` truthiness (fix IE 8/9)
+ * browser: add support for Chrome apps
+ * Readme: added Windows usage remarks
+ * Add `bower.json` to properly support bower install
+
+2.1.0 / 2014-10-15
+==================
+
+ * node: implement `DEBUG_FD` env variable support
+ * package: update "browserify" to v6.1.0
+ * package: add "license" field to package.json (#135, @panuhorsmalahti)
+
+2.0.0 / 2014-09-01
+==================
+
+ * package: update "browserify" to v5.11.0
+ * node: use stderr rather than stdout for logging (#29, @stephenmathieson)
+
+1.0.4 / 2014-07-15
+==================
+
+ * dist: recompile
+ * example: remove `console.info()` log usage
+ * example: add "Content-Type" UTF-8 header to browser example
+ * browser: place %c marker after the space character
+ * browser: reset the "content" color via `color: inherit`
+ * browser: add colors support for Firefox >= v31
+ * debug: prefer an instance `log()` function over the global one (#119)
+ * Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
+
+1.0.3 / 2014-07-09
+==================
+
+ * Add support for multiple wildcards in namespaces (#122, @seegno)
+ * browser: fix lint
+
+1.0.2 / 2014-06-10
+==================
+
+ * browser: update color palette (#113, @gscottolson)
+ * common: make console logging function configurable (#108, @timoxley)
+ * node: fix %o colors on old node <= 0.8.x
+ * Makefile: find node path using shell/which (#109, @timoxley)
+
+1.0.1 / 2014-06-06
+==================
+
+ * browser: use `removeItem()` to clear localStorage
+ * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
+ * package: add "contributors" section
+ * node: fix comment typo
+ * README: list authors
+
+1.0.0 / 2014-06-04
+==================
+
+ * make ms diff be global, not be scope
+ * debug: ignore empty strings in enable()
+ * node: make DEBUG_COLORS able to disable coloring
+ * *: export the `colors` array
+ * npmignore: don't publish the `dist` dir
+ * Makefile: refactor to use browserify
+ * package: add "browserify" as a dev dependency
+ * Readme: add Web Inspector Colors section
+ * node: reset terminal color for the debug content
+ * node: map "%o" to `util.inspect()`
+ * browser: map "%j" to `JSON.stringify()`
+ * debug: add custom "formatters"
+ * debug: use "ms" module for humanizing the diff
+ * Readme: add "bash" syntax highlighting
+ * browser: add Firebug color support
+ * browser: add colors for WebKit browsers
+ * node: apply log to `console`
+ * rewrite: abstract common logic for Node & browsers
+ * add .jshintrc file
+
+0.8.1 / 2014-04-14
+==================
+
+ * package: re-add the "component" section
+
+0.8.0 / 2014-03-30
+==================
+
+ * add `enable()` method for nodejs. Closes #27
+ * change from stderr to stdout
+ * remove unnecessary index.js file
+
+0.7.4 / 2013-11-13
+==================
+
+ * remove "browserify" key from package.json (fixes something in browserify)
+
+0.7.3 / 2013-10-30
+==================
+
+ * fix: catch localStorage security error when cookies are blocked (Chrome)
+ * add debug(err) support. Closes #46
+ * add .browser prop to package.json. Closes #42
+
+0.7.2 / 2013-02-06
+==================
+
+ * fix package.json
+ * fix: Mobile Safari (private mode) is broken with debug
+ * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript
+
+0.7.1 / 2013-02-05
+==================
+
+ * add repository URL to package.json
+ * add DEBUG_COLORED to force colored output
+ * add browserify support
+ * fix component. Closes #24
+
+0.7.0 / 2012-05-04
+==================
+
+ * Added .component to package.json
+ * Added debug.component.js build
+
+0.6.0 / 2012-03-16
+==================
+
+ * Added support for "-" prefix in DEBUG [Vinay Pulim]
+ * Added `.enabled` flag to the node version [TooTallNate]
+
+0.5.0 / 2012-02-02
+==================
+
+ * Added: humanize diffs. Closes #8
+ * Added `debug.disable()` to the CS variant
+ * Removed padding. Closes #10
+ * Fixed: persist client-side variant again. Closes #9
+
+0.4.0 / 2012-02-01
+==================
+
+ * Added browser variant support for older browsers [TooTallNate]
+ * Added `debug.enable('project:*')` to browser variant [TooTallNate]
+ * Added padding to diff (moved it to the right)
+
+0.3.0 / 2012-01-26
+==================
+
+ * Added millisecond diff when isatty, otherwise UTC string
+
+0.2.0 / 2012-01-22
+==================
+
+ * Added wildcard support
+
+0.1.0 / 2011-12-02
+==================
+
+ * Added: remove colors unless stderr isatty [TooTallNate]
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/Makefile b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/Makefile
new file mode 100644
index 0000000..5cf4a59
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/Makefile
@@ -0,0 +1,36 @@
+
+# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
+THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
+THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
+
+# BIN directory
+BIN := $(THIS_DIR)/node_modules/.bin
+
+# applications
+NODE ?= $(shell which node)
+NPM ?= $(NODE) $(shell which npm)
+BROWSERIFY ?= $(NODE) $(BIN)/browserify
+
+all: dist/debug.js
+
+install: node_modules
+
+clean:
+ @rm -rf dist
+
+dist:
+ @mkdir -p $@
+
+dist/debug.js: node_modules browser.js debug.js dist
+ @$(BROWSERIFY) \
+ --standalone debug \
+ . > $@
+
+distclean: clean
+ @rm -rf node_modules
+
+node_modules: package.json
+ @NODE_ENV= $(NPM) install
+ @touch node_modules
+
+.PHONY: all install clean distclean
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/Readme.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/Readme.md
new file mode 100644
index 0000000..b4f45e3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/Readme.md
@@ -0,0 +1,188 @@
+# debug
+
+ tiny node.js debugging utility modelled after node core's debugging technique.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+ With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility.
+
+Example _app.js_:
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %s', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example _worker.js_:
+
+```js
+var debug = require('debug')('worker');
+
+setInterval(function(){
+ debug('doing some work');
+}, 1000);
+```
+
+ The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:
+
+ ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)
+
+ ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)
+
+#### Windows note
+
+ On Windows the environment variable is set using the `set` command.
+
+ ```cmd
+ set DEBUG=*,-not_this
+ ```
+
+Then, run the program to be debugged as usual.
+
+## Millisecond diff
+
+ When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+ ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)
+
+ When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:
+
+ ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)
+
+## Conventions
+
+ If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".
+
+## Wildcards
+
+ The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+ You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:".
+
+## Browser support
+
+ Debug works in the browser as well, currently persisted by `localStorage`. Consider the situation shown below where you have `worker:a` and `worker:b`, and wish to debug both. Somewhere in the code on your page, include:
+
+```js
+window.myDebug = require("debug");
+```
+
+ ("debug" is a global object in the browser so we give this object a different name.) When your page is open in the browser, type the following in the console:
+
+```js
+myDebug.enable("worker:*")
+```
+
+ Refresh the page. Debug output will continue to be sent to the console until it is disabled by typing `myDebug.disable()` in the console.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+#### Web Inspector Colors
+
+ Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+ option. These are WebKit web inspectors, Firefox ([since version
+ 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+ and the Firebug plugin for Firefox (any version).
+
+ Colored output looks something like:
+
+ ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png)
+
+### stderr vs stdout
+
+You can set an alternative logging method per-namespace by overriding the `log` method on a per-namespace or globally:
+
+Example _stdout.js_:
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+### Save debug output to a file
+
+You can save all debug statements to a file by piping them.
+
+Example:
+
+```bash
+$ DEBUG_FD=3 node your-app.js 3> whatever.log
+```
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/bower.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/bower.json
new file mode 100644
index 0000000..6af573f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/bower.json
@@ -0,0 +1,28 @@
+{
+ "name": "visionmedia-debug",
+ "main": "dist/debug.js",
+ "version": "2.2.0",
+ "homepage": "https://github.com/visionmedia/debug",
+ "authors": [
+ "TJ Holowaychuk <tj@vision-media.ca>"
+ ],
+ "description": "visionmedia-debug",
+ "moduleType": [
+ "amd",
+ "es6",
+ "globals",
+ "node"
+ ],
+ "keywords": [
+ "visionmedia",
+ "debug"
+ ],
+ "license": "MIT",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ]
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/browser.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/browser.js
new file mode 100644
index 0000000..7c76452
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/browser.js
@@ -0,0 +1,168 @@
+
+/**
+ * This is the web browser implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = 'undefined' != typeof chrome
+ && 'undefined' != typeof chrome.storage
+ ? chrome.storage.local
+ : localstorage();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ 'lightseagreen',
+ 'forestgreen',
+ 'goldenrod',
+ 'dodgerblue',
+ 'darkorchid',
+ 'crimson'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+function useColors() {
+ // is webkit? http://stackoverflow.com/a/16459606/376773
+ return ('WebkitAppearance' in document.documentElement.style) ||
+ // is firebug? http://stackoverflow.com/a/398120/376773
+ (window.console && (console.firebug || (console.exception && console.table))) ||
+ // is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31);
+}
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+exports.formatters.j = function(v) {
+ return JSON.stringify(v);
+};
+
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs() {
+ var args = arguments;
+ var useColors = this.useColors;
+
+ args[0] = (useColors ? '%c' : '')
+ + this.namespace
+ + (useColors ? ' %c' : ' ')
+ + args[0]
+ + (useColors ? '%c ' : ' ')
+ + '+' + exports.humanize(this.diff);
+
+ if (!useColors) return args;
+
+ var c = 'color: ' + this.color;
+ args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));
+
+ // the final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ var index = 0;
+ var lastC = 0;
+ args[0].replace(/%[a-z%]/g, function(match) {
+ if ('%%' === match) return;
+ index++;
+ if ('%c' === match) {
+ // we only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+ return args;
+}
+
+/**
+ * Invokes `console.log()` when available.
+ * No-op when `console.log` is not a "function".
+ *
+ * @api public
+ */
+
+function log() {
+ // this hackery is required for IE8/9, where
+ // the `console.log` function doesn't have 'apply'
+ return 'object' === typeof console
+ && console.log
+ && Function.prototype.apply.call(console.log, console, arguments);
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ try {
+ if (null == namespaces) {
+ exports.storage.removeItem('debug');
+ } else {
+ exports.storage.debug = namespaces;
+ }
+ } catch(e) {}
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ var r;
+ try {
+ r = exports.storage.debug;
+ } catch(e) {}
+ return r;
+}
+
+/**
+ * Enable namespaces listed in `localStorage.debug` initially.
+ */
+
+exports.enable(load());
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage(){
+ try {
+ return window.localStorage;
+ } catch (e) {}
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/component.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/component.json
new file mode 100644
index 0000000..ca10637
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/component.json
@@ -0,0 +1,19 @@
+{
+ "name": "debug",
+ "repo": "visionmedia/debug",
+ "description": "small debugging utility",
+ "version": "2.2.0",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "main": "browser.js",
+ "scripts": [
+ "browser.js",
+ "debug.js"
+ ],
+ "dependencies": {
+ "rauchg/ms.js": "0.7.1"
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/debug.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/debug.js
new file mode 100644
index 0000000..7571a86
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/debug.js
@@ -0,0 +1,197 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = debug;
+exports.coerce = coerce;
+exports.disable = disable;
+exports.enable = enable;
+exports.enabled = enabled;
+exports.humanize = require('ms');
+
+/**
+ * The currently active debug mode names, and names to skip.
+ */
+
+exports.names = [];
+exports.skips = [];
+
+/**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lowercased letter, i.e. "n".
+ */
+
+exports.formatters = {};
+
+/**
+ * Previously assigned color.
+ */
+
+var prevColor = 0;
+
+/**
+ * Previous log timestamp.
+ */
+
+var prevTime;
+
+/**
+ * Select a color.
+ *
+ * @return {Number}
+ * @api private
+ */
+
+function selectColor() {
+ return exports.colors[prevColor++ % exports.colors.length];
+}
+
+/**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+
+function debug(namespace) {
+
+ // define the `disabled` version
+ function disabled() {
+ }
+ disabled.enabled = false;
+
+ // define the `enabled` version
+ function enabled() {
+
+ var self = enabled;
+
+ // set `diff` timestamp
+ var curr = +new Date();
+ var ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ // add the `color` if not set
+ if (null == self.useColors) self.useColors = exports.useColors();
+ if (null == self.color && self.useColors) self.color = selectColor();
+
+ var args = Array.prototype.slice.call(arguments);
+
+ args[0] = exports.coerce(args[0]);
+
+ if ('string' !== typeof args[0]) {
+ // anything else let's inspect with %o
+ args = ['%o'].concat(args);
+ }
+
+ // apply any `formatters` transformations
+ var index = 0;
+ args[0] = args[0].replace(/%([a-z%])/g, function(match, format) {
+ // if we encounter an escaped % then don't increase the array index
+ if (match === '%%') return match;
+ index++;
+ var formatter = exports.formatters[format];
+ if ('function' === typeof formatter) {
+ var val = args[index];
+ match = formatter.call(self, val);
+
+ // now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ if ('function' === typeof exports.formatArgs) {
+ args = exports.formatArgs.apply(self, args);
+ }
+ var logFn = enabled.log || exports.log || console.log.bind(console);
+ logFn.apply(self, args);
+ }
+ enabled.enabled = true;
+
+ var fn = exports.enabled(namespace) ? enabled : disabled;
+
+ fn.namespace = namespace;
+
+ return fn;
+}
+
+/**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+
+function enable(namespaces) {
+ exports.save(namespaces);
+
+ var split = (namespaces || '').split(/[\s,]+/);
+ var len = split.length;
+
+ for (var i = 0; i < len; i++) {
+ if (!split[i]) continue; // ignore empty strings
+ namespaces = split[i].replace(/\*/g, '.*?');
+ if (namespaces[0] === '-') {
+ exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+ } else {
+ exports.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+}
+
+/**
+ * Disable debug output.
+ *
+ * @api public
+ */
+
+function disable() {
+ exports.enable('');
+}
+
+/**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+
+function enabled(name) {
+ var i, len;
+ for (i = 0, len = exports.skips.length; i < len; i++) {
+ if (exports.skips[i].test(name)) {
+ return false;
+ }
+ }
+ for (i = 0, len = exports.names.length; i < len; i++) {
+ if (exports.names[i].test(name)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+
+function coerce(val) {
+ if (val instanceof Error) return val.stack || val.message;
+ return val;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node.js
new file mode 100644
index 0000000..1d392a8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node.js
@@ -0,0 +1,209 @@
+
+/**
+ * Module dependencies.
+ */
+
+var tty = require('tty');
+var util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+/**
+ * The file descriptor to write the `debug()` calls to.
+ * Set the `DEBUG_FD` env variable to override with another value. i.e.:
+ *
+ * $ DEBUG_FD=3 node script.js 3>debug.log
+ */
+
+var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
+var stream = 1 === fd ? process.stdout :
+ 2 === fd ? process.stderr :
+ createWritableStdioStream(fd);
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ var debugColors = (process.env.DEBUG_COLORS || '').trim().toLowerCase();
+ if (0 === debugColors.length) {
+ return tty.isatty(fd);
+ } else {
+ return '0' !== debugColors
+ && 'no' !== debugColors
+ && 'false' !== debugColors
+ && 'disabled' !== debugColors;
+ }
+}
+
+/**
+ * Map %o to `util.inspect()`, since Node doesn't do that out of the box.
+ */
+
+var inspect = (4 === util.inspect.length ?
+ // node <= 0.8.x
+ function (v, colors) {
+ return util.inspect(v, void 0, void 0, colors);
+ } :
+ // node > 0.8.x
+ function (v, colors) {
+ return util.inspect(v, { colors: colors });
+ }
+);
+
+exports.formatters.o = function(v) {
+ return inspect(v, this.useColors)
+ .replace(/\s*\n\s*/g, ' ');
+};
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs() {
+ var args = arguments;
+ var useColors = this.useColors;
+ var name = this.namespace;
+
+ if (useColors) {
+ var c = this.color;
+
+ args[0] = ' \u001b[3' + c + ';1m' + name + ' '
+ + '\u001b[0m'
+ + args[0] + '\u001b[3' + c + 'm'
+ + ' +' + exports.humanize(this.diff) + '\u001b[0m';
+ } else {
+ args[0] = new Date().toUTCString()
+ + ' ' + name + ' ' + args[0];
+ }
+ return args;
+}
+
+/**
+ * Invokes `console.error()` with the specified arguments.
+ */
+
+function log() {
+ return stream.write(util.format.apply(this, arguments) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ if (null == namespaces) {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ } else {
+ process.env.DEBUG = namespaces;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Copied from `node/src/node.js`.
+ *
+ * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
+ * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
+ */
+
+function createWritableStdioStream (fd) {
+ var stream;
+ var tty_wrap = process.binding('tty_wrap');
+
+ // Note stream._type is used for test-module-load-list.js
+
+ switch (tty_wrap.guessHandleType(fd)) {
+ case 'TTY':
+ stream = new tty.WriteStream(fd);
+ stream._type = 'tty';
+
+ // Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ case 'FILE':
+ var fs = require('fs');
+ stream = new fs.SyncWriteStream(fd, { autoClose: false });
+ stream._type = 'fs';
+ break;
+
+ case 'PIPE':
+ case 'TCP':
+ var net = require('net');
+ stream = new net.Socket({
+ fd: fd,
+ readable: false,
+ writable: true
+ });
+
+ // FIXME Should probably have an option in net.Socket to create a
+ // stream from an existing fd which is writable only. But for now
+ // we'll just add this hack and set the `readable` member to false.
+ // Test: ./node test/fixtures/echo.js < /etc/passwd
+ stream.readable = false;
+ stream.read = null;
+ stream._type = 'pipe';
+
+ // FIXME Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ default:
+ // Probably an error on in uv_guess_handle()
+ throw new Error('Implement me. Unknown stream file type!');
+ }
+
+ // For supporting legacy API we put the FD here.
+ stream.fd = fd;
+
+ stream._isStdio = true;
+
+ return stream;
+}
+
+/**
+ * Enable namespaces listed in `process.env.DEBUG` initially.
+ */
+
+exports.enable(load());
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/.npmignore
new file mode 100644
index 0000000..d1aa0ce
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/.npmignore
@@ -0,0 +1,5 @@
+node_modules
+test
+History.md
+Makefile
+component.json
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/History.md
new file mode 100644
index 0000000..32fdfc1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/History.md
@@ -0,0 +1,66 @@
+
+0.7.1 / 2015-04-20
+==================
+
+ * prevent extraordinary long inputs (@evilpacket)
+ * Fixed broken readme link
+
+0.7.0 / 2014-11-24
+==================
+
+ * add time abbreviations, updated tests and readme for the new units
+ * fix example in the readme.
+ * add LICENSE file
+
+0.6.2 / 2013-12-05
+==================
+
+ * Adding repository section to package.json to suppress warning from NPM.
+
+0.6.1 / 2013-05-10
+==================
+
+ * fix singularization [visionmedia]
+
+0.6.0 / 2013-03-15
+==================
+
+ * fix minutes
+
+0.5.1 / 2013-02-24
+==================
+
+ * add component namespace
+
+0.5.0 / 2012-11-09
+==================
+
+ * add short formatting as default and .long option
+ * add .license property to component.json
+ * add version to component.json
+
+0.4.0 / 2012-10-22
+==================
+
+ * add rounding to fix crazy decimals
+
+0.3.0 / 2012-09-07
+==================
+
+ * fix `ms(<String>)` [visionmedia]
+
+0.2.0 / 2012-09-03
+==================
+
+ * add component.json [visionmedia]
+ * add days support [visionmedia]
+ * add hours support [visionmedia]
+ * add minutes support [visionmedia]
+ * add seconds support [visionmedia]
+ * add ms string support [visionmedia]
+ * refactor tests to facilitate ms(number) [visionmedia]
+
+0.1.0 / 2012-03-07
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/LICENSE
new file mode 100644
index 0000000..6c07561
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2014 Guillermo Rauch <rauchg@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/README.md
new file mode 100644
index 0000000..9b4fd03
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/README.md
@@ -0,0 +1,35 @@
+# ms.js: miliseconds conversion utility
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('100') // 100
+```
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(ms('10 hours')) // "10h"
+```
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+- Node/Browser compatible. Published as [`ms`](https://www.npmjs.org/package/ms) in [NPM](http://nodejs.org/download).
+- If a number is supplied to `ms`, a string with a unit is returned.
+- If a string that contains the number is supplied, it returns it as
+a number (e.g: it returns `100` for `'100'`).
+- If you pass a string with a number and a valid unit, the number of
+equivalent ms is returned.
+
+## License
+
+MIT
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/index.js
new file mode 100644
index 0000000..4f92771
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/index.js
@@ -0,0 +1,125 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} options
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options){
+ options = options || {};
+ if ('string' == typeof val) return parse(val);
+ return options.long
+ ? long(val)
+ : short(val);
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = '' + str;
+ if (str.length > 10000) return;
+ var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
+ if (!match) return;
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function short(ms) {
+ if (ms >= d) return Math.round(ms / d) + 'd';
+ if (ms >= h) return Math.round(ms / h) + 'h';
+ if (ms >= m) return Math.round(ms / m) + 'm';
+ if (ms >= s) return Math.round(ms / s) + 's';
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function long(ms) {
+ return plural(ms, d, 'day')
+ || plural(ms, h, 'hour')
+ || plural(ms, m, 'minute')
+ || plural(ms, s, 'second')
+ || ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, n, name) {
+ if (ms < n) return;
+ if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name;
+ return Math.ceil(ms / n) + ' ' + name + 's';
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/package.json
new file mode 100644
index 0000000..29c1ba5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/node_modules/ms/package.json
@@ -0,0 +1,47 @@
+{
+ "name": "ms",
+ "version": "0.7.1",
+ "description": "Tiny ms conversion utility",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/guille/ms.js.git"
+ },
+ "main": "./index",
+ "devDependencies": {
+ "mocha": "*",
+ "expect.js": "*",
+ "serve": "*"
+ },
+ "component": {
+ "scripts": {
+ "ms/index.js": "index.js"
+ }
+ },
+ "gitHead": "713dcf26d9e6fd9dbc95affe7eff9783b7f1b909",
+ "bugs": {
+ "url": "https://github.com/guille/ms.js/issues"
+ },
+ "homepage": "https://github.com/guille/ms.js",
+ "_id": "ms@0.7.1",
+ "scripts": {},
+ "_shasum": "9cd13c03adbff25b65effde7ce864ee952017098",
+ "_from": "ms@0.7.1",
+ "_npmVersion": "2.7.5",
+ "_nodeVersion": "0.12.2",
+ "_npmUser": {
+ "name": "rauchg",
+ "email": "rauchg@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "rauchg",
+ "email": "rauchg@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "9cd13c03adbff25b65effde7ce864ee952017098",
+ "tarball": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/package.json
new file mode 100644
index 0000000..9f24f4f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/debug/package.json
@@ -0,0 +1,72 @@
+{
+ "name": "debug",
+ "version": "2.2.0",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/visionmedia/debug.git"
+ },
+ "description": "small debugging utility",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "contributors": [
+ {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "ms": "0.7.1"
+ },
+ "devDependencies": {
+ "browserify": "9.0.3",
+ "mocha": "*"
+ },
+ "main": "./node.js",
+ "browser": "./browser.js",
+ "component": {
+ "scripts": {
+ "debug/index.js": "browser.js",
+ "debug/debug.js": "debug.js"
+ }
+ },
+ "gitHead": "b38458422b5aa8aa6d286b10dfe427e8a67e2b35",
+ "bugs": {
+ "url": "https://github.com/visionmedia/debug/issues"
+ },
+ "homepage": "https://github.com/visionmedia/debug",
+ "_id": "debug@2.2.0",
+ "scripts": {},
+ "_shasum": "f87057e995b1a1f6ae6a4960664137bc56f039da",
+ "_from": "debug@>=2.2.0 <2.3.0",
+ "_npmVersion": "2.7.4",
+ "_nodeVersion": "0.12.2",
+ "_npmUser": {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ }
+ ],
+ "dist": {
+ "shasum": "f87057e995b1a1f6ae6a4960664137bc56f039da",
+ "tarball": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/History.md
new file mode 100644
index 0000000..ace1171
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/History.md
@@ -0,0 +1,84 @@
+1.1.0 / 2015-09-14
+==================
+
+ * Enable strict mode in more places
+ * Support io.js 3.x
+ * Support io.js 2.x
+ * Support web browser loading
+ - Requires bundler like Browserify or webpack
+
+1.0.1 / 2015-04-07
+==================
+
+ * Fix `TypeError`s when under `'use strict'` code
+ * Fix useless type name on auto-generated messages
+ * Support io.js 1.x
+ * Support Node.js 0.12
+
+1.0.0 / 2014-09-17
+==================
+
+ * No changes
+
+0.4.5 / 2014-09-09
+==================
+
+ * Improve call speed to functions using the function wrapper
+ * Support Node.js 0.6
+
+0.4.4 / 2014-07-27
+==================
+
+ * Work-around v8 generating empty stack traces
+
+0.4.3 / 2014-07-26
+==================
+
+ * Fix exception when global `Error.stackTraceLimit` is too low
+
+0.4.2 / 2014-07-19
+==================
+
+ * Correct call site for wrapped functions and properties
+
+0.4.1 / 2014-07-19
+==================
+
+ * Improve automatic message generation for function properties
+
+0.4.0 / 2014-07-19
+==================
+
+ * Add `TRACE_DEPRECATION` environment variable
+ * Remove non-standard grey color from color output
+ * Support `--no-deprecation` argument
+ * Support `--trace-deprecation` argument
+ * Support `deprecate.property(fn, prop, message)`
+
+0.3.0 / 2014-06-16
+==================
+
+ * Add `NO_DEPRECATION` environment variable
+
+0.2.0 / 2014-06-15
+==================
+
+ * Add `deprecate.property(obj, prop, message)`
+ * Remove `supports-color` dependency for node.js 0.8
+
+0.1.0 / 2014-06-15
+==================
+
+ * Add `deprecate.function(fn, message)`
+ * Add `process.on('deprecation', fn)` emitter
+ * Automatically generate message when omitted from `deprecate()`
+
+0.0.1 / 2014-06-15
+==================
+
+ * Fix warning for dynamic calls at singe call site
+
+0.0.0 / 2014-06-15
+==================
+
+ * Initial implementation
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/LICENSE
new file mode 100644
index 0000000..142ede3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014-2015 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/Readme.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/Readme.md
new file mode 100644
index 0000000..09bb979
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/Readme.md
@@ -0,0 +1,281 @@
+# depd
+
+[![NPM Version][npm-version-image]][npm-url]
+[![NPM Downloads][npm-downloads-image]][npm-url]
+[![Node.js Version][node-image]][node-url]
+[![Linux Build][travis-image]][travis-url]
+[![Windows Build][appveyor-image]][appveyor-url]
+[![Coverage Status][coveralls-image]][coveralls-url]
+[![Gratipay][gratipay-image]][gratipay-url]
+
+Deprecate all the things
+
+> With great modules comes great responsibility; mark things deprecated!
+
+## Install
+
+This module is installed directly using `npm`:
+
+```sh
+$ npm install depd
+```
+
+This module can also be bundled with systems like
+[Browserify](http://browserify.org/) or [webpack](https://webpack.github.io/),
+though by default this module will alter it's API to no longer display or
+track deprecations.
+
+## API
+
+```js
+var deprecate = require('depd')('my-module')
+```
+
+This library allows you to display deprecation messages to your users.
+This library goes above and beyond with deprecation warnings by
+introspection of the call stack (but only the bits that it is interested
+in).
+
+Instead of just warning on the first invocation of a deprecated
+function and never again, this module will warn on the first invocation
+of a deprecated function per unique call site, making it ideal to alert
+users of all deprecated uses across the code base, rather than just
+whatever happens to execute first.
+
+The deprecation warnings from this module also include the file and line
+information for the call into the module that the deprecated function was
+in.
+
+**NOTE** this library has a similar interface to the `debug` module, and
+this module uses the calling file to get the boundary for the call stacks,
+so you should always create a new `deprecate` object in each file and not
+within some central file.
+
+### depd(namespace)
+
+Create a new deprecate function that uses the given namespace name in the
+messages and will display the call site prior to the stack entering the
+file this function was called from. It is highly suggested you use the
+name of your module as the namespace.
+
+### deprecate(message)
+
+Call this function from deprecated code to display a deprecation message.
+This message will appear once per unique caller site. Caller site is the
+first call site in the stack in a different file from the caller of this
+function.
+
+If the message is omitted, a message is generated for you based on the site
+of the `deprecate()` call and will display the name of the function called,
+similar to the name displayed in a stack trace.
+
+### deprecate.function(fn, message)
+
+Call this function to wrap a given function in a deprecation message on any
+call to the function. An optional message can be supplied to provide a custom
+message.
+
+### deprecate.property(obj, prop, message)
+
+Call this function to wrap a given property on object in a deprecation message
+on any accessing or setting of the property. An optional message can be supplied
+to provide a custom message.
+
+The method must be called on the object where the property belongs (not
+inherited from the prototype).
+
+If the property is a data descriptor, it will be converted to an accessor
+descriptor in order to display the deprecation message.
+
+### process.on('deprecation', fn)
+
+This module will allow easy capturing of deprecation errors by emitting the
+errors as the type "deprecation" on the global `process`. If there are no
+listeners for this type, the errors are written to STDERR as normal, but if
+there are any listeners, nothing will be written to STDERR and instead only
+emitted. From there, you can write the errors in a different format or to a
+logging source.
+
+The error represents the deprecation and is emitted only once with the same
+rules as writing to STDERR. The error has the following properties:
+
+ - `message` - This is the message given by the library
+ - `name` - This is always `'DeprecationError'`
+ - `namespace` - This is the namespace the deprecation came from
+ - `stack` - This is the stack of the call to the deprecated thing
+
+Example `error.stack` output:
+
+```
+DeprecationError: my-cool-module deprecated oldfunction
+ at Object.<anonymous> ([eval]-wrapper:6:22)
+ at Module._compile (module.js:456:26)
+ at evalScript (node.js:532:25)
+ at startup (node.js:80:7)
+ at node.js:902:3
+```
+
+### process.env.NO_DEPRECATION
+
+As a user of modules that are deprecated, the environment variable `NO_DEPRECATION`
+is provided as a quick solution to silencing deprecation warnings from being
+output. The format of this is similar to that of `DEBUG`:
+
+```sh
+$ NO_DEPRECATION=my-module,othermod node app.js
+```
+
+This will suppress deprecations from being output for "my-module" and "othermod".
+The value is a list of comma-separated namespaces. To suppress every warning
+across all namespaces, use the value `*` for a namespace.
+
+Providing the argument `--no-deprecation` to the `node` executable will suppress
+all deprecations (only available in Node.js 0.8 or higher).
+
+**NOTE** This will not suppress the deperecations given to any "deprecation"
+event listeners, just the output to STDERR.
+
+### process.env.TRACE_DEPRECATION
+
+As a user of modules that are deprecated, the environment variable `TRACE_DEPRECATION`
+is provided as a solution to getting more detailed location information in deprecation
+warnings by including the entire stack trace. The format of this is the same as
+`NO_DEPRECATION`:
+
+```sh
+$ TRACE_DEPRECATION=my-module,othermod node app.js
+```
+
+This will include stack traces for deprecations being output for "my-module" and
+"othermod". The value is a list of comma-separated namespaces. To trace every
+warning across all namespaces, use the value `*` for a namespace.
+
+Providing the argument `--trace-deprecation` to the `node` executable will trace
+all deprecations (only available in Node.js 0.8 or higher).
+
+**NOTE** This will not trace the deperecations silenced by `NO_DEPRECATION`.
+
+## Display
+
+![message](files/message.png)
+
+When a user calls a function in your library that you mark deprecated, they
+will see the following written to STDERR (in the given colors, similar colors
+and layout to the `debug` module):
+
+```
+bright cyan bright yellow
+| | reset cyan
+| | | |
+â–¼ â–¼ â–¼ â–¼
+my-cool-module deprecated oldfunction [eval]-wrapper:6:22
+â–² â–² â–² â–²
+| | | |
+namespace | | location of mycoolmod.oldfunction() call
+ | deprecation message
+ the word "deprecated"
+```
+
+If the user redirects their STDERR to a file or somewhere that does not support
+colors, they see (similar layout to the `debug` module):
+
+```
+Sun, 15 Jun 2014 05:21:37 GMT my-cool-module deprecated oldfunction at [eval]-wrapper:6:22
+â–² â–² â–² â–² â–²
+| | | | |
+timestamp of message namespace | | location of mycoolmod.oldfunction() call
+ | deprecation message
+ the word "deprecated"
+```
+
+## Examples
+
+### Deprecating all calls to a function
+
+This will display a deprecated message about "oldfunction" being deprecated
+from "my-module" on STDERR.
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+// message automatically derived from function name
+// Object.oldfunction
+exports.oldfunction = deprecate.function(function oldfunction() {
+ // all calls to function are deprecated
+})
+
+// specific message
+exports.oldfunction = deprecate.function(function () {
+ // all calls to function are deprecated
+}, 'oldfunction')
+```
+
+### Conditionally deprecating a function call
+
+This will display a deprecated message about "weirdfunction" being deprecated
+from "my-module" on STDERR when called with less than 2 arguments.
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+exports.weirdfunction = function () {
+ if (arguments.length < 2) {
+ // calls with 0 or 1 args are deprecated
+ deprecate('weirdfunction args < 2')
+ }
+}
+```
+
+When calling `deprecate` as a function, the warning is counted per call site
+within your own module, so you can display different deprecations depending
+on different situations and the users will still get all the warnings:
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+exports.weirdfunction = function () {
+ if (arguments.length < 2) {
+ // calls with 0 or 1 args are deprecated
+ deprecate('weirdfunction args < 2')
+ } else if (typeof arguments[0] !== 'string') {
+ // calls with non-string first argument are deprecated
+ deprecate('weirdfunction non-string first arg')
+ }
+}
+```
+
+### Deprecating property access
+
+This will display a deprecated message about "oldprop" being deprecated
+from "my-module" on STDERR when accessed. A deprecation will be displayed
+when setting the value and when getting the value.
+
+```js
+var deprecate = require('depd')('my-cool-module')
+
+exports.oldprop = 'something'
+
+// message automatically derives from property name
+deprecate.property(exports, 'oldprop')
+
+// explicit message
+deprecate.property(exports, 'oldprop', 'oldprop >= 0.10')
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-version-image]: https://img.shields.io/npm/v/depd.svg
+[npm-downloads-image]: https://img.shields.io/npm/dm/depd.svg
+[npm-url]: https://npmjs.org/package/depd
+[travis-image]: https://img.shields.io/travis/dougwilson/nodejs-depd/master.svg?label=linux
+[travis-url]: https://travis-ci.org/dougwilson/nodejs-depd
+[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/nodejs-depd/master.svg?label=windows
+[appveyor-url]: https://ci.appveyor.com/project/dougwilson/nodejs-depd
+[coveralls-image]: https://img.shields.io/coveralls/dougwilson/nodejs-depd/master.svg
+[coveralls-url]: https://coveralls.io/r/dougwilson/nodejs-depd?branch=master
+[node-image]: https://img.shields.io/node/v/depd.svg
+[node-url]: http://nodejs.org/download/
+[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg
+[gratipay-url]: https://www.gratipay.com/dougwilson/
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/index.js
new file mode 100644
index 0000000..fddcae8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/index.js
@@ -0,0 +1,521 @@
+/*!
+ * depd
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var callSiteToString = require('./lib/compat').callSiteToString
+var eventListenerCount = require('./lib/compat').eventListenerCount
+var relative = require('path').relative
+
+/**
+ * Module exports.
+ */
+
+module.exports = depd
+
+/**
+ * Get the path to base files on.
+ */
+
+var basePath = process.cwd()
+
+/**
+ * Determine if namespace is contained in the string.
+ */
+
+function containsNamespace(str, namespace) {
+ var val = str.split(/[ ,]+/)
+
+ namespace = String(namespace).toLowerCase()
+
+ for (var i = 0 ; i < val.length; i++) {
+ if (!(str = val[i])) continue;
+
+ // namespace contained
+ if (str === '*' || str.toLowerCase() === namespace) {
+ return true
+ }
+ }
+
+ return false
+}
+
+/**
+ * Convert a data descriptor to accessor descriptor.
+ */
+
+function convertDataDescriptorToAccessor(obj, prop, message) {
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
+ var value = descriptor.value
+
+ descriptor.get = function getter() { return value }
+
+ if (descriptor.writable) {
+ descriptor.set = function setter(val) { return value = val }
+ }
+
+ delete descriptor.value
+ delete descriptor.writable
+
+ Object.defineProperty(obj, prop, descriptor)
+
+ return descriptor
+}
+
+/**
+ * Create arguments string to keep arity.
+ */
+
+function createArgumentsString(arity) {
+ var str = ''
+
+ for (var i = 0; i < arity; i++) {
+ str += ', arg' + i
+ }
+
+ return str.substr(2)
+}
+
+/**
+ * Create stack string from stack.
+ */
+
+function createStackString(stack) {
+ var str = this.name + ': ' + this.namespace
+
+ if (this.message) {
+ str += ' deprecated ' + this.message
+ }
+
+ for (var i = 0; i < stack.length; i++) {
+ str += '\n at ' + callSiteToString(stack[i])
+ }
+
+ return str
+}
+
+/**
+ * Create deprecate for namespace in caller.
+ */
+
+function depd(namespace) {
+ if (!namespace) {
+ throw new TypeError('argument namespace is required')
+ }
+
+ var stack = getStack()
+ var site = callSiteLocation(stack[1])
+ var file = site[0]
+
+ function deprecate(message) {
+ // call to self as log
+ log.call(deprecate, message)
+ }
+
+ deprecate._file = file
+ deprecate._ignored = isignored(namespace)
+ deprecate._namespace = namespace
+ deprecate._traced = istraced(namespace)
+ deprecate._warned = Object.create(null)
+
+ deprecate.function = wrapfunction
+ deprecate.property = wrapproperty
+
+ return deprecate
+}
+
+/**
+ * Determine if namespace is ignored.
+ */
+
+function isignored(namespace) {
+ /* istanbul ignore next: tested in a child processs */
+ if (process.noDeprecation) {
+ // --no-deprecation support
+ return true
+ }
+
+ var str = process.env.NO_DEPRECATION || ''
+
+ // namespace ignored
+ return containsNamespace(str, namespace)
+}
+
+/**
+ * Determine if namespace is traced.
+ */
+
+function istraced(namespace) {
+ /* istanbul ignore next: tested in a child processs */
+ if (process.traceDeprecation) {
+ // --trace-deprecation support
+ return true
+ }
+
+ var str = process.env.TRACE_DEPRECATION || ''
+
+ // namespace traced
+ return containsNamespace(str, namespace)
+}
+
+/**
+ * Display deprecation message.
+ */
+
+function log(message, site) {
+ var haslisteners = eventListenerCount(process, 'deprecation') !== 0
+
+ // abort early if no destination
+ if (!haslisteners && this._ignored) {
+ return
+ }
+
+ var caller
+ var callFile
+ var callSite
+ var i = 0
+ var seen = false
+ var stack = getStack()
+ var file = this._file
+
+ if (site) {
+ // provided site
+ callSite = callSiteLocation(stack[1])
+ callSite.name = site.name
+ file = callSite[0]
+ } else {
+ // get call site
+ i = 2
+ site = callSiteLocation(stack[i])
+ callSite = site
+ }
+
+ // get caller of deprecated thing in relation to file
+ for (; i < stack.length; i++) {
+ caller = callSiteLocation(stack[i])
+ callFile = caller[0]
+
+ if (callFile === file) {
+ seen = true
+ } else if (callFile === this._file) {
+ file = this._file
+ } else if (seen) {
+ break
+ }
+ }
+
+ var key = caller
+ ? site.join(':') + '__' + caller.join(':')
+ : undefined
+
+ if (key !== undefined && key in this._warned) {
+ // already warned
+ return
+ }
+
+ this._warned[key] = true
+
+ // generate automatic message from call site
+ if (!message) {
+ message = callSite === site || !callSite.name
+ ? defaultMessage(site)
+ : defaultMessage(callSite)
+ }
+
+ // emit deprecation if listeners exist
+ if (haslisteners) {
+ var err = DeprecationError(this._namespace, message, stack.slice(i))
+ process.emit('deprecation', err)
+ return
+ }
+
+ // format and write message
+ var format = process.stderr.isTTY
+ ? formatColor
+ : formatPlain
+ var msg = format.call(this, message, caller, stack.slice(i))
+ process.stderr.write(msg + '\n', 'utf8')
+
+ return
+}
+
+/**
+ * Get call site location as array.
+ */
+
+function callSiteLocation(callSite) {
+ var file = callSite.getFileName() || '<anonymous>'
+ var line = callSite.getLineNumber()
+ var colm = callSite.getColumnNumber()
+
+ if (callSite.isEval()) {
+ file = callSite.getEvalOrigin() + ', ' + file
+ }
+
+ var site = [file, line, colm]
+
+ site.callSite = callSite
+ site.name = callSite.getFunctionName()
+
+ return site
+}
+
+/**
+ * Generate a default message from the site.
+ */
+
+function defaultMessage(site) {
+ var callSite = site.callSite
+ var funcName = site.name
+
+ // make useful anonymous name
+ if (!funcName) {
+ funcName = '<anonymous@' + formatLocation(site) + '>'
+ }
+
+ var context = callSite.getThis()
+ var typeName = context && callSite.getTypeName()
+
+ // ignore useless type name
+ if (typeName === 'Object') {
+ typeName = undefined
+ }
+
+ // make useful type name
+ if (typeName === 'Function') {
+ typeName = context.name || typeName
+ }
+
+ return typeName && callSite.getMethodName()
+ ? typeName + '.' + funcName
+ : funcName
+}
+
+/**
+ * Format deprecation message without color.
+ */
+
+function formatPlain(msg, caller, stack) {
+ var timestamp = new Date().toUTCString()
+
+ var formatted = timestamp
+ + ' ' + this._namespace
+ + ' deprecated ' + msg
+
+ // add stack trace
+ if (this._traced) {
+ for (var i = 0; i < stack.length; i++) {
+ formatted += '\n at ' + callSiteToString(stack[i])
+ }
+
+ return formatted
+ }
+
+ if (caller) {
+ formatted += ' at ' + formatLocation(caller)
+ }
+
+ return formatted
+}
+
+/**
+ * Format deprecation message with color.
+ */
+
+function formatColor(msg, caller, stack) {
+ var formatted = '\x1b[36;1m' + this._namespace + '\x1b[22;39m' // bold cyan
+ + ' \x1b[33;1mdeprecated\x1b[22;39m' // bold yellow
+ + ' \x1b[0m' + msg + '\x1b[39m' // reset
+
+ // add stack trace
+ if (this._traced) {
+ for (var i = 0; i < stack.length; i++) {
+ formatted += '\n \x1b[36mat ' + callSiteToString(stack[i]) + '\x1b[39m' // cyan
+ }
+
+ return formatted
+ }
+
+ if (caller) {
+ formatted += ' \x1b[36m' + formatLocation(caller) + '\x1b[39m' // cyan
+ }
+
+ return formatted
+}
+
+/**
+ * Format call site location.
+ */
+
+function formatLocation(callSite) {
+ return relative(basePath, callSite[0])
+ + ':' + callSite[1]
+ + ':' + callSite[2]
+}
+
+/**
+ * Get the stack as array of call sites.
+ */
+
+function getStack() {
+ var limit = Error.stackTraceLimit
+ var obj = {}
+ var prep = Error.prepareStackTrace
+
+ Error.prepareStackTrace = prepareObjectStackTrace
+ Error.stackTraceLimit = Math.max(10, limit)
+
+ // capture the stack
+ Error.captureStackTrace(obj)
+
+ // slice this function off the top
+ var stack = obj.stack.slice(1)
+
+ Error.prepareStackTrace = prep
+ Error.stackTraceLimit = limit
+
+ return stack
+}
+
+/**
+ * Capture call site stack from v8.
+ */
+
+function prepareObjectStackTrace(obj, stack) {
+ return stack
+}
+
+/**
+ * Return a wrapped function in a deprecation message.
+ */
+
+function wrapfunction(fn, message) {
+ if (typeof fn !== 'function') {
+ throw new TypeError('argument fn must be a function')
+ }
+
+ var args = createArgumentsString(fn.length)
+ var deprecate = this
+ var stack = getStack()
+ var site = callSiteLocation(stack[1])
+
+ site.name = fn.name
+
+ var deprecatedfn = eval('(function (' + args + ') {\n'
+ + '"use strict"\n'
+ + 'log.call(deprecate, message, site)\n'
+ + 'return fn.apply(this, arguments)\n'
+ + '})')
+
+ return deprecatedfn
+}
+
+/**
+ * Wrap property in a deprecation message.
+ */
+
+function wrapproperty(obj, prop, message) {
+ if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
+ throw new TypeError('argument obj must be object')
+ }
+
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
+
+ if (!descriptor) {
+ throw new TypeError('must call property on owner object')
+ }
+
+ if (!descriptor.configurable) {
+ throw new TypeError('property must be configurable')
+ }
+
+ var deprecate = this
+ var stack = getStack()
+ var site = callSiteLocation(stack[1])
+
+ // set site name
+ site.name = prop
+
+ // convert data descriptor
+ if ('value' in descriptor) {
+ descriptor = convertDataDescriptorToAccessor(obj, prop, message)
+ }
+
+ var get = descriptor.get
+ var set = descriptor.set
+
+ // wrap getter
+ if (typeof get === 'function') {
+ descriptor.get = function getter() {
+ log.call(deprecate, message, site)
+ return get.apply(this, arguments)
+ }
+ }
+
+ // wrap setter
+ if (typeof set === 'function') {
+ descriptor.set = function setter() {
+ log.call(deprecate, message, site)
+ return set.apply(this, arguments)
+ }
+ }
+
+ Object.defineProperty(obj, prop, descriptor)
+}
+
+/**
+ * Create DeprecationError for deprecation
+ */
+
+function DeprecationError(namespace, message, stack) {
+ var error = new Error()
+ var stackString
+
+ Object.defineProperty(error, 'constructor', {
+ value: DeprecationError
+ })
+
+ Object.defineProperty(error, 'message', {
+ configurable: true,
+ enumerable: false,
+ value: message,
+ writable: true
+ })
+
+ Object.defineProperty(error, 'name', {
+ enumerable: false,
+ configurable: true,
+ value: 'DeprecationError',
+ writable: true
+ })
+
+ Object.defineProperty(error, 'namespace', {
+ configurable: true,
+ enumerable: false,
+ value: namespace,
+ writable: true
+ })
+
+ Object.defineProperty(error, 'stack', {
+ configurable: true,
+ enumerable: false,
+ get: function () {
+ if (stackString !== undefined) {
+ return stackString
+ }
+
+ // prepare stack trace
+ return stackString = createStackString.call(this, stack)
+ },
+ set: function setter(val) {
+ stackString = val
+ }
+ })
+
+ return error
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/lib/browser/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/lib/browser/index.js
new file mode 100644
index 0000000..f464e05
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/lib/browser/index.js
@@ -0,0 +1,79 @@
+/*!
+ * depd
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = depd
+
+/**
+ * Create deprecate for namespace in caller.
+ */
+
+function depd(namespace) {
+ if (!namespace) {
+ throw new TypeError('argument namespace is required')
+ }
+
+ function deprecate(message) {
+ // no-op in browser
+ }
+
+ deprecate._file = undefined
+ deprecate._ignored = true
+ deprecate._namespace = namespace
+ deprecate._traced = false
+ deprecate._warned = Object.create(null)
+
+ deprecate.function = wrapfunction
+ deprecate.property = wrapproperty
+
+ return deprecate
+}
+
+/**
+ * Return a wrapped function in a deprecation message.
+ *
+ * This is a no-op version of the wrapper, which does nothing but call
+ * validation.
+ */
+
+function wrapfunction(fn, message) {
+ if (typeof fn !== 'function') {
+ throw new TypeError('argument fn must be a function')
+ }
+
+ return fn
+}
+
+/**
+ * Wrap property in a deprecation message.
+ *
+ * This is a no-op version of the wrapper, which does nothing but call
+ * validation.
+ */
+
+function wrapproperty(obj, prop, message) {
+ if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
+ throw new TypeError('argument obj must be object')
+ }
+
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
+
+ if (!descriptor) {
+ throw new TypeError('must call property on owner object')
+ }
+
+ if (!descriptor.configurable) {
+ throw new TypeError('property must be configurable')
+ }
+
+ return
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/lib/compat/buffer-concat.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/lib/compat/buffer-concat.js
new file mode 100644
index 0000000..4b73381
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/lib/compat/buffer-concat.js
@@ -0,0 +1,35 @@
+/*!
+ * depd
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ */
+
+module.exports = bufferConcat
+
+/**
+ * Concatenate an array of Buffers.
+ */
+
+function bufferConcat(bufs) {
+ var length = 0
+
+ for (var i = 0, len = bufs.length; i < len; i++) {
+ length += bufs[i].length
+ }
+
+ var buf = new Buffer(length)
+ var pos = 0
+
+ for (var i = 0, len = bufs.length; i < len; i++) {
+ bufs[i].copy(buf, pos)
+ pos += bufs[i].length
+ }
+
+ return buf
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/lib/compat/callsite-tostring.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/lib/compat/callsite-tostring.js
new file mode 100644
index 0000000..9ecef34
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/lib/compat/callsite-tostring.js
@@ -0,0 +1,103 @@
+/*!
+ * depd
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ */
+
+module.exports = callSiteToString
+
+/**
+ * Format a CallSite file location to a string.
+ */
+
+function callSiteFileLocation(callSite) {
+ var fileName
+ var fileLocation = ''
+
+ if (callSite.isNative()) {
+ fileLocation = 'native'
+ } else if (callSite.isEval()) {
+ fileName = callSite.getScriptNameOrSourceURL()
+ if (!fileName) {
+ fileLocation = callSite.getEvalOrigin()
+ }
+ } else {
+ fileName = callSite.getFileName()
+ }
+
+ if (fileName) {
+ fileLocation += fileName
+
+ var lineNumber = callSite.getLineNumber()
+ if (lineNumber != null) {
+ fileLocation += ':' + lineNumber
+
+ var columnNumber = callSite.getColumnNumber()
+ if (columnNumber) {
+ fileLocation += ':' + columnNumber
+ }
+ }
+ }
+
+ return fileLocation || 'unknown source'
+}
+
+/**
+ * Format a CallSite to a string.
+ */
+
+function callSiteToString(callSite) {
+ var addSuffix = true
+ var fileLocation = callSiteFileLocation(callSite)
+ var functionName = callSite.getFunctionName()
+ var isConstructor = callSite.isConstructor()
+ var isMethodCall = !(callSite.isToplevel() || isConstructor)
+ var line = ''
+
+ if (isMethodCall) {
+ var methodName = callSite.getMethodName()
+ var typeName = getConstructorName(callSite)
+
+ if (functionName) {
+ if (typeName && functionName.indexOf(typeName) !== 0) {
+ line += typeName + '.'
+ }
+
+ line += functionName
+
+ if (methodName && functionName.lastIndexOf('.' + methodName) !== functionName.length - methodName.length - 1) {
+ line += ' [as ' + methodName + ']'
+ }
+ } else {
+ line += typeName + '.' + (methodName || '<anonymous>')
+ }
+ } else if (isConstructor) {
+ line += 'new ' + (functionName || '<anonymous>')
+ } else if (functionName) {
+ line += functionName
+ } else {
+ addSuffix = false
+ line += fileLocation
+ }
+
+ if (addSuffix) {
+ line += ' (' + fileLocation + ')'
+ }
+
+ return line
+}
+
+/**
+ * Get constructor name of reviver.
+ */
+
+function getConstructorName(obj) {
+ var receiver = obj.receiver
+ return (receiver.constructor && receiver.constructor.name) || null
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/lib/compat/event-listener-count.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/lib/compat/event-listener-count.js
new file mode 100644
index 0000000..a05fceb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/lib/compat/event-listener-count.js
@@ -0,0 +1,22 @@
+/*!
+ * depd
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = eventListenerCount
+
+/**
+ * Get the count of listeners on an event emitter of a specific type.
+ */
+
+function eventListenerCount(emitter, type) {
+ return emitter.listeners(type).length
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/lib/compat/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/lib/compat/index.js
new file mode 100644
index 0000000..aa3c1de
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/lib/compat/index.js
@@ -0,0 +1,84 @@
+/*!
+ * depd
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var Buffer = require('buffer')
+var EventEmitter = require('events').EventEmitter
+
+/**
+ * Module exports.
+ * @public
+ */
+
+lazyProperty(module.exports, 'bufferConcat', function bufferConcat() {
+ return Buffer.concat || require('./buffer-concat')
+})
+
+lazyProperty(module.exports, 'callSiteToString', function callSiteToString() {
+ var limit = Error.stackTraceLimit
+ var obj = {}
+ var prep = Error.prepareStackTrace
+
+ function prepareObjectStackTrace(obj, stack) {
+ return stack
+ }
+
+ Error.prepareStackTrace = prepareObjectStackTrace
+ Error.stackTraceLimit = 2
+
+ // capture the stack
+ Error.captureStackTrace(obj)
+
+ // slice the stack
+ var stack = obj.stack.slice()
+
+ Error.prepareStackTrace = prep
+ Error.stackTraceLimit = limit
+
+ return stack[0].toString ? toString : require('./callsite-tostring')
+})
+
+lazyProperty(module.exports, 'eventListenerCount', function eventListenerCount() {
+ return EventEmitter.listenerCount || require('./event-listener-count')
+})
+
+/**
+ * Define a lazy property.
+ */
+
+function lazyProperty(obj, prop, getter) {
+ function get() {
+ var val = getter()
+
+ Object.defineProperty(obj, prop, {
+ configurable: true,
+ enumerable: true,
+ value: val
+ })
+
+ return val
+ }
+
+ Object.defineProperty(obj, prop, {
+ configurable: true,
+ enumerable: true,
+ get: get
+ })
+}
+
+/**
+ * Call toString() on the obj
+ */
+
+function toString(obj) {
+ return obj.toString()
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/package.json
new file mode 100644
index 0000000..2c94417
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/depd/package.json
@@ -0,0 +1,66 @@
+{
+ "name": "depd",
+ "description": "Deprecate all the things",
+ "version": "1.1.0",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "keywords": [
+ "deprecate",
+ "deprecated"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/dougwilson/nodejs-depd"
+ },
+ "browser": "lib/browser/index.js",
+ "devDependencies": {
+ "benchmark": "1.0.0",
+ "beautify-benchmark": "0.2.4",
+ "istanbul": "0.3.5",
+ "mocha": "~1.21.5"
+ },
+ "files": [
+ "lib/",
+ "History.md",
+ "LICENSE",
+ "index.js",
+ "Readme.md"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "bench": "node benchmark/index.js",
+ "test": "mocha --reporter spec --bail test/",
+ "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --no-exit test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/"
+ },
+ "gitHead": "78c659de20283e3a6bee92bda455e6daff01686a",
+ "bugs": {
+ "url": "https://github.com/dougwilson/nodejs-depd/issues"
+ },
+ "homepage": "https://github.com/dougwilson/nodejs-depd",
+ "_id": "depd@1.1.0",
+ "_shasum": "e1bd82c6aab6ced965b97b88b17ed3e528ca18c3",
+ "_from": "depd@>=1.1.0 <1.2.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e1bd82c6aab6ced965b97b88b17ed3e528ca18c3",
+ "tarball": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/encodeurl/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/encodeurl/HISTORY.md
new file mode 100644
index 0000000..06d34a5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/encodeurl/HISTORY.md
@@ -0,0 +1,9 @@
+1.0.1 / 2016-06-09
+==================
+
+ * Fix encoding unpaired surrogates at start/end of string
+
+1.0.0 / 2016-06-08
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/encodeurl/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/encodeurl/LICENSE
new file mode 100644
index 0000000..8812229
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/encodeurl/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2016 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/encodeurl/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/encodeurl/README.md
new file mode 100644
index 0000000..b086133
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/encodeurl/README.md
@@ -0,0 +1,124 @@
+# encodeurl
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Encode a URL to a percent-encoded form, excluding already-encoded sequences
+
+## Installation
+
+```sh
+$ npm install encodeurl
+```
+
+## API
+
+```js
+var encodeUrl = require('encodeurl')
+```
+
+### encodeUrl(url)
+
+Encode a URL to a percent-encoded form, excluding already-encoded sequences.
+
+This function will take an already-encoded URL and encode all the non-URL
+code points (as UTF-8 byte sequences). This function will not encode the
+"%" character unless it is not part of a valid sequence (`%20` will be
+left as-is, but `%foo` will be encoded as `%25foo`).
+
+This encode is meant to be "safe" and does not throw errors. It will try as
+hard as it can to properly encode the given URL, including replacing any raw,
+unpaired surrogate pairs with the Unicode replacement character prior to
+encoding.
+
+This function is _similar_ to the intrinsic function `encodeURI`, except it
+will not encode the `%` character if that is part of a valid sequence, will
+not encode `[` and `]` (for IPv6 hostnames) and will replace raw, unpaired
+surrogate pairs with the Unicode replacement character (instead of throwing).
+
+## Examples
+
+### Encode a URL containing user-controled data
+
+```js
+var encodeUrl = require('encodeurl')
+var escapeHtml = require('escape-html')
+
+http.createServer(function onRequest (req, res) {
+ // get encoded form of inbound url
+ var url = encodeUrl(req.url)
+
+ // create html message
+ var body = '<p>Location ' + escapeHtml(url) + ' not found</p>'
+
+ // send a 404
+ res.statusCode = 404
+ res.setHeader('Content-Type', 'text/html; charset=UTF-8')
+ res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8')))
+ res.end(body, 'utf-8')
+})
+```
+
+### Encode a URL for use in a header field
+
+```js
+var encodeUrl = require('encodeurl')
+var escapeHtml = require('escape-html')
+var url = require('url')
+
+http.createServer(function onRequest (req, res) {
+ // parse inbound url
+ var href = url.parse(req)
+
+ // set new host for redirect
+ href.host = 'localhost'
+ href.protocol = 'https:'
+ href.slashes = true
+
+ // create location header
+ var location = encodeUrl(url.format(href))
+
+ // create html message
+ var body = '<p>Redirecting to new site: ' + escapeHtml(location) + '</p>'
+
+ // send a 301
+ res.statusCode = 301
+ res.setHeader('Content-Type', 'text/html; charset=UTF-8')
+ res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8')))
+ res.setHeader('Location', location)
+ res.end(body, 'utf-8')
+})
+```
+
+## Testing
+
+```sh
+$ npm test
+$ npm run lint
+```
+
+## References
+
+- [RFC 3986: Uniform Resource Identifier (URI): Generic Syntax][rfc-3986]
+- [WHATWG URL Living Standard][whatwg-url]
+
+[rfc-3986]: https://tools.ietf.org/html/rfc3986
+[whatwg-url]: https://url.spec.whatwg.org/
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/encodeurl.svg
+[npm-url]: https://npmjs.org/package/encodeurl
+[node-version-image]: https://img.shields.io/node/v/encodeurl.svg
+[node-version-url]: https://nodejs.org/en/download
+[travis-image]: https://img.shields.io/travis/pillarjs/encodeurl.svg
+[travis-url]: https://travis-ci.org/pillarjs/encodeurl
+[coveralls-image]: https://img.shields.io/coveralls/pillarjs/encodeurl.svg
+[coveralls-url]: https://coveralls.io/r/pillarjs/encodeurl?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/encodeurl.svg
+[downloads-url]: https://npmjs.org/package/encodeurl
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/encodeurl/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/encodeurl/index.js
new file mode 100644
index 0000000..ae77cc9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/encodeurl/index.js
@@ -0,0 +1,60 @@
+/*!
+ * encodeurl
+ * Copyright(c) 2016 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = encodeUrl
+
+/**
+ * RegExp to match non-URL code points, *after* encoding (i.e. not including "%")
+ * and including invalid escape sequences.
+ * @private
+ */
+
+var ENCODE_CHARS_REGEXP = /(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]))+/g
+
+/**
+ * RegExp to match unmatched surrogate pair.
+ * @private
+ */
+
+var UNMATCHED_SURROGATE_PAIR_REGEXP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g
+
+/**
+ * String to replace unmatched surrogate pair with.
+ * @private
+ */
+
+var UNMATCHED_SURROGATE_PAIR_REPLACE = '$1\uFFFD$2'
+
+/**
+ * Encode a URL to a percent-encoded form, excluding already-encoded sequences.
+ *
+ * This function will take an already-encoded URL and encode all the non-URL
+ * code points. This function will not encode the "%" character unless it is
+ * not part of a valid sequence (`%20` will be left as-is, but `%foo` will
+ * be encoded as `%25foo`).
+ *
+ * This encode is meant to be "safe" and does not throw errors. It will try as
+ * hard as it can to properly encode the given URL, including replacing any raw,
+ * unpaired surrogate pairs with the Unicode replacement character prior to
+ * encoding.
+ *
+ * @param {string} url
+ * @return {string}
+ * @public
+ */
+
+function encodeUrl (url) {
+ return String(url)
+ .replace(UNMATCHED_SURROGATE_PAIR_REGEXP, UNMATCHED_SURROGATE_PAIR_REPLACE)
+ .replace(ENCODE_CHARS_REGEXP, encodeURI)
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/encodeurl/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/encodeurl/package.json
new file mode 100644
index 0000000..0ff2381
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/encodeurl/package.json
@@ -0,0 +1,74 @@
+{
+ "name": "encodeurl",
+ "description": "Encode a URL to a percent-encoded form, excluding already-encoded sequences",
+ "version": "1.0.1",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "encode",
+ "encodeurl",
+ "url"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/pillarjs/encodeurl.git"
+ },
+ "devDependencies": {
+ "eslint": "2.11.1",
+ "eslint-config-standard": "5.3.1",
+ "eslint-plugin-promise": "1.3.2",
+ "eslint-plugin-standard": "1.3.2",
+ "istanbul": "0.4.3",
+ "mocha": "2.5.3"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "README.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "scripts": {
+ "lint": "eslint **/*.js",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "39ed0c235fed4cea7d012038fd6bb0480561d226",
+ "bugs": {
+ "url": "https://github.com/pillarjs/encodeurl/issues"
+ },
+ "homepage": "https://github.com/pillarjs/encodeurl#readme",
+ "_id": "encodeurl@1.0.1",
+ "_shasum": "79e3d58655346909fe6f0f45a5de68103b294d20",
+ "_from": "encodeurl@>=1.0.1 <1.1.0",
+ "_npmVersion": "2.15.1",
+ "_nodeVersion": "4.4.3",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "dist": {
+ "shasum": "79e3d58655346909fe6f0f45a5de68103b294d20",
+ "tarball": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/encodeurl-1.0.1.tgz_1465519736251_0.09314409433864057"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/escape-html/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/escape-html/LICENSE
new file mode 100644
index 0000000..2e70de9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/escape-html/LICENSE
@@ -0,0 +1,24 @@
+(The MIT License)
+
+Copyright (c) 2012-2013 TJ Holowaychuk
+Copyright (c) 2015 Andreas Lubbe
+Copyright (c) 2015 Tiancheng "Timothy" Gu
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/escape-html/Readme.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/escape-html/Readme.md
new file mode 100644
index 0000000..653d9ea
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/escape-html/Readme.md
@@ -0,0 +1,43 @@
+
+# escape-html
+
+ Escape string for use in HTML
+
+## Example
+
+```js
+var escape = require('escape-html');
+var html = escape('foo & bar');
+// -> foo &amp; bar
+```
+
+## Benchmark
+
+```
+$ npm run-script bench
+
+> escape-html@1.0.3 bench nodejs-escape-html
+> node benchmark/index.js
+
+
+ http_parser@1.0
+ node@0.10.33
+ v8@3.14.5.9
+ ares@1.9.0-DEV
+ uv@0.10.29
+ zlib@1.2.3
+ modules@11
+ openssl@1.0.1j
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ no special characters x 19,435,271 ops/sec ±0.85% (187 runs sampled)
+ single special character x 6,132,421 ops/sec ±0.67% (194 runs sampled)
+ many special characters x 3,175,826 ops/sec ±0.65% (193 runs sampled)
+```
+
+## License
+
+ MIT \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/escape-html/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/escape-html/index.js
new file mode 100644
index 0000000..bf9e226
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/escape-html/index.js
@@ -0,0 +1,78 @@
+/*!
+ * escape-html
+ * Copyright(c) 2012-2013 TJ Holowaychuk
+ * Copyright(c) 2015 Andreas Lubbe
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var matchHtmlRegExp = /["'&<>]/;
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = escapeHtml;
+
+/**
+ * Escape special characters in the given string of html.
+ *
+ * @param {string} string The string to escape for inserting into HTML
+ * @return {string}
+ * @public
+ */
+
+function escapeHtml(string) {
+ var str = '' + string;
+ var match = matchHtmlRegExp.exec(str);
+
+ if (!match) {
+ return str;
+ }
+
+ var escape;
+ var html = '';
+ var index = 0;
+ var lastIndex = 0;
+
+ for (index = match.index; index < str.length; index++) {
+ switch (str.charCodeAt(index)) {
+ case 34: // "
+ escape = '&quot;';
+ break;
+ case 38: // &
+ escape = '&amp;';
+ break;
+ case 39: // '
+ escape = '&#39;';
+ break;
+ case 60: // <
+ escape = '&lt;';
+ break;
+ case 62: // >
+ escape = '&gt;';
+ break;
+ default:
+ continue;
+ }
+
+ if (lastIndex !== index) {
+ html += str.substring(lastIndex, index);
+ }
+
+ lastIndex = index + 1;
+ html += escape;
+ }
+
+ return lastIndex !== index
+ ? html + str.substring(lastIndex, index)
+ : html;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/escape-html/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/escape-html/package.json
new file mode 100644
index 0000000..d59e3d4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/escape-html/package.json
@@ -0,0 +1,56 @@
+{
+ "name": "escape-html",
+ "description": "Escape string for use in HTML",
+ "version": "1.0.3",
+ "license": "MIT",
+ "keywords": [
+ "escape",
+ "html",
+ "utility"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/component/escape-html"
+ },
+ "devDependencies": {
+ "benchmark": "1.0.0",
+ "beautify-benchmark": "0.2.4"
+ },
+ "files": [
+ "LICENSE",
+ "Readme.md",
+ "index.js"
+ ],
+ "scripts": {
+ "bench": "node benchmark/index.js"
+ },
+ "gitHead": "7ac2ea3977fcac3d4c5be8d2a037812820c65f28",
+ "bugs": {
+ "url": "https://github.com/component/escape-html/issues"
+ },
+ "homepage": "https://github.com/component/escape-html",
+ "_id": "escape-html@1.0.3",
+ "_shasum": "0258eae4d3d0c0974de1c169188ef0051d1d1988",
+ "_from": "escape-html@>=1.0.3 <1.1.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "0258eae4d3d0c0974de1c169188ef0051d1d1988",
+ "tarball": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/etag/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/etag/HISTORY.md
new file mode 100644
index 0000000..bd0f26d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/etag/HISTORY.md
@@ -0,0 +1,71 @@
+1.7.0 / 2015-06-08
+==================
+
+ * Always include entity length in ETags for hash length extensions
+ * Generate non-Stats ETags using MD5 only (no longer CRC32)
+ * Improve stat performance by removing hashing
+ * Remove base64 padding in ETags to shorten
+ * Use MD5 instead of MD4 in weak ETags over 1KB
+
+1.6.0 / 2015-05-10
+==================
+
+ * Improve support for JXcore
+ * Remove requirement of `atime` in the stats object
+ * Support "fake" stats objects in environments without `fs`
+
+1.5.1 / 2014-11-19
+==================
+
+ * deps: crc@3.2.1
+ - Minor fixes
+
+1.5.0 / 2014-10-14
+==================
+
+ * Improve string performance
+ * Slightly improve speed for weak ETags over 1KB
+
+1.4.0 / 2014-09-21
+==================
+
+ * Support "fake" stats objects
+ * Support Node.js 0.6
+
+1.3.1 / 2014-09-14
+==================
+
+ * Use the (new and improved) `crc` for crc32
+
+1.3.0 / 2014-08-29
+==================
+
+ * Default strings to strong ETags
+ * Improve speed for weak ETags over 1KB
+
+1.2.1 / 2014-08-29
+==================
+
+ * Use the (much faster) `buffer-crc32` for crc32
+
+1.2.0 / 2014-08-24
+==================
+
+ * Add support for file stat objects
+
+1.1.0 / 2014-08-24
+==================
+
+ * Add fast-path for empty entity
+ * Add weak ETag generation
+ * Shrink size of generated ETags
+
+1.0.1 / 2014-08-24
+==================
+
+ * Fix behavior of string containing Unicode
+
+1.0.0 / 2014-05-18
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/etag/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/etag/LICENSE
new file mode 100644
index 0000000..142ede3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/etag/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014-2015 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/etag/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/etag/README.md
new file mode 100644
index 0000000..8da9e05
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/etag/README.md
@@ -0,0 +1,165 @@
+# etag
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Create simple ETags
+
+## Installation
+
+```sh
+$ npm install etag
+```
+
+## API
+
+```js
+var etag = require('etag')
+```
+
+### etag(entity, [options])
+
+Generate a strong ETag for the given entity. This should be the complete
+body of the entity. Strings, `Buffer`s, and `fs.Stats` are accepted. By
+default, a strong ETag is generated except for `fs.Stats`, which will
+generate a weak ETag (this can be overwritten by `options.weak`).
+
+```js
+res.setHeader('ETag', etag(body))
+```
+
+#### Options
+
+`etag` accepts these properties in the options object.
+
+##### weak
+
+Specifies if the generated ETag will include the weak validator mark (that
+is, the leading `W/`). The actual entity tag is the same. The default value
+is `false`, unless the `entity` is `fs.Stats`, in which case it is `true`.
+
+## Testing
+
+```sh
+$ npm test
+```
+
+## Benchmark
+
+```bash
+$ npm run-script bench
+
+> etag@1.6.0 bench nodejs-etag
+> node benchmark/index.js
+
+ http_parser@1.0
+ node@0.10.33
+ v8@3.14.5.9
+ ares@1.9.0-DEV
+ uv@0.10.29
+ zlib@1.2.3
+ modules@11
+ openssl@1.0.1j
+
+> node benchmark/body0-100b.js
+
+ 100B body
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+ 4 tests completed.
+
+* buffer - strong x 289,198 ops/sec ±1.09% (190 runs sampled)
+* buffer - weak x 287,838 ops/sec ±0.91% (189 runs sampled)
+* string - strong x 284,586 ops/sec ±1.05% (192 runs sampled)
+* string - weak x 287,439 ops/sec ±0.82% (192 runs sampled)
+
+> node benchmark/body1-1kb.js
+
+ 1KB body
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+ 4 tests completed.
+
+* buffer - strong x 212,423 ops/sec ±0.75% (193 runs sampled)
+* buffer - weak x 211,871 ops/sec ±0.74% (194 runs sampled)
+ string - strong x 205,291 ops/sec ±0.86% (194 runs sampled)
+ string - weak x 208,463 ops/sec ±0.79% (192 runs sampled)
+
+> node benchmark/body2-5kb.js
+
+ 5KB body
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+ 4 tests completed.
+
+* buffer - strong x 92,901 ops/sec ±0.58% (195 runs sampled)
+* buffer - weak x 93,045 ops/sec ±0.65% (192 runs sampled)
+ string - strong x 89,621 ops/sec ±0.68% (194 runs sampled)
+ string - weak x 90,070 ops/sec ±0.70% (196 runs sampled)
+
+> node benchmark/body3-10kb.js
+
+ 10KB body
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+ 4 tests completed.
+
+* buffer - strong x 54,220 ops/sec ±0.85% (192 runs sampled)
+* buffer - weak x 54,069 ops/sec ±0.83% (191 runs sampled)
+ string - strong x 53,078 ops/sec ±0.53% (194 runs sampled)
+ string - weak x 53,849 ops/sec ±0.47% (197 runs sampled)
+
+> node benchmark/body4-100kb.js
+
+ 100KB body
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+ 4 tests completed.
+
+* buffer - strong x 6,673 ops/sec ±0.15% (197 runs sampled)
+* buffer - weak x 6,716 ops/sec ±0.12% (198 runs sampled)
+ string - strong x 6,357 ops/sec ±0.14% (197 runs sampled)
+ string - weak x 6,344 ops/sec ±0.21% (197 runs sampled)
+
+> node benchmark/stats.js
+
+ stats
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+ 4 tests completed.
+
+* real - strong x 1,671,989 ops/sec ±0.13% (197 runs sampled)
+* real - weak x 1,681,297 ops/sec ±0.12% (198 runs sampled)
+ fake - strong x 927,063 ops/sec ±0.14% (198 runs sampled)
+ fake - weak x 914,461 ops/sec ±0.41% (191 runs sampled)
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/etag.svg
+[npm-url]: https://npmjs.org/package/etag
+[node-version-image]: https://img.shields.io/node/v/etag.svg
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/etag/master.svg
+[travis-url]: https://travis-ci.org/jshttp/etag
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/etag/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/etag?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/etag.svg
+[downloads-url]: https://npmjs.org/package/etag
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/etag/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/etag/index.js
new file mode 100644
index 0000000..b582c84
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/etag/index.js
@@ -0,0 +1,132 @@
+/*!
+ * etag
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = etag
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var crypto = require('crypto')
+var Stats = require('fs').Stats
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var base64PadCharRegExp = /=+$/
+var toString = Object.prototype.toString
+
+/**
+ * Generate an entity tag.
+ *
+ * @param {Buffer|string} entity
+ * @return {string}
+ * @private
+ */
+
+function entitytag(entity) {
+ if (entity.length === 0) {
+ // fast-path empty
+ return '"0-1B2M2Y8AsgTpgAmY7PhCfg"'
+ }
+
+ // compute hash of entity
+ var hash = crypto
+ .createHash('md5')
+ .update(entity, 'utf8')
+ .digest('base64')
+ .replace(base64PadCharRegExp, '')
+
+ // compute length of entity
+ var len = typeof entity === 'string'
+ ? Buffer.byteLength(entity, 'utf8')
+ : entity.length
+
+ return '"' + len.toString(16) + '-' + hash + '"'
+}
+
+/**
+ * Create a simple ETag.
+ *
+ * @param {string|Buffer|Stats} entity
+ * @param {object} [options]
+ * @param {boolean} [options.weak]
+ * @return {String}
+ * @public
+ */
+
+function etag(entity, options) {
+ if (entity == null) {
+ throw new TypeError('argument entity is required')
+ }
+
+ // support fs.Stats object
+ var isStats = isstats(entity)
+ var weak = options && typeof options.weak === 'boolean'
+ ? options.weak
+ : isStats
+
+ // validate argument
+ if (!isStats && typeof entity !== 'string' && !Buffer.isBuffer(entity)) {
+ throw new TypeError('argument entity must be string, Buffer, or fs.Stats')
+ }
+
+ // generate entity tag
+ var tag = isStats
+ ? stattag(entity)
+ : entitytag(entity)
+
+ return weak
+ ? 'W/' + tag
+ : tag
+}
+
+/**
+ * Determine if object is a Stats object.
+ *
+ * @param {object} obj
+ * @return {boolean}
+ * @api private
+ */
+
+function isstats(obj) {
+ // genuine fs.Stats
+ if (typeof Stats === 'function' && obj instanceof Stats) {
+ return true
+ }
+
+ // quack quack
+ return obj && typeof obj === 'object'
+ && 'ctime' in obj && toString.call(obj.ctime) === '[object Date]'
+ && 'mtime' in obj && toString.call(obj.mtime) === '[object Date]'
+ && 'ino' in obj && typeof obj.ino === 'number'
+ && 'size' in obj && typeof obj.size === 'number'
+}
+
+/**
+ * Generate a tag for a stat.
+ *
+ * @param {object} stat
+ * @return {string}
+ * @private
+ */
+
+function stattag(stat) {
+ var mtime = stat.mtime.getTime().toString(16)
+ var size = stat.size.toString(16)
+
+ return '"' + size + '-' + mtime + '"'
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/etag/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/etag/package.json
new file mode 100644
index 0000000..1aad7c0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/etag/package.json
@@ -0,0 +1,72 @@
+{
+ "name": "etag",
+ "description": "Create simple ETags",
+ "version": "1.7.0",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "David Björklund",
+ "email": "david.bjorklund@gmail.com"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "etag",
+ "http",
+ "res"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/etag"
+ },
+ "devDependencies": {
+ "benchmark": "1.0.0",
+ "beautify-benchmark": "0.2.4",
+ "istanbul": "0.3.14",
+ "mocha": "~1.21.4",
+ "seedrandom": "2.3.11"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "README.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "bench": "node benchmark/index.js",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "a511f5c8c930fd9546dbd88acb080f96bc788cfc",
+ "bugs": {
+ "url": "https://github.com/jshttp/etag/issues"
+ },
+ "homepage": "https://github.com/jshttp/etag",
+ "_id": "etag@1.7.0",
+ "_shasum": "03d30b5f67dd6e632d2945d30d6652731a34d5d8",
+ "_from": "etag@>=1.7.0 <1.8.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "03d30b5f67dd6e632d2945d30d6652731a34d5d8",
+ "tarball": "https://registry.npmjs.org/etag/-/etag-1.7.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/etag/-/etag-1.7.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/HISTORY.md
new file mode 100644
index 0000000..e7e144c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/HISTORY.md
@@ -0,0 +1,108 @@
+0.5.0 / 2016-06-15
+==================
+
+ * Change invalid or non-numeric status code to 500
+ * Overwrite status message to match set status code
+ * Prefer `err.statusCode` if `err.status` is invalid
+ * Set response headers from `err.headers` object
+ * Use `statuses` instead of `http` module for status messages
+ - Includes all defined status messages
+
+0.4.1 / 2015-12-02
+==================
+
+ * deps: escape-html@~1.0.3
+ - perf: enable strict mode
+ - perf: optimize string replacement
+ - perf: use faster string coercion
+
+0.4.0 / 2015-06-14
+==================
+
+ * Fix a false-positive when unpiping in Node.js 0.8
+ * Support `statusCode` property on `Error` objects
+ * Use `unpipe` module for unpiping requests
+ * deps: escape-html@1.0.2
+ * deps: on-finished@~2.3.0
+ - Add defined behavior for HTTP `CONNECT` requests
+ - Add defined behavior for HTTP `Upgrade` requests
+ - deps: ee-first@1.1.1
+ * perf: enable strict mode
+ * perf: remove argument reassignment
+
+0.3.6 / 2015-05-11
+==================
+
+ * deps: debug@~2.2.0
+ - deps: ms@0.7.1
+
+0.3.5 / 2015-04-22
+==================
+
+ * deps: on-finished@~2.2.1
+ - Fix `isFinished(req)` when data buffered
+
+0.3.4 / 2015-03-15
+==================
+
+ * deps: debug@~2.1.3
+ - Fix high intensity foreground color for bold
+ - deps: ms@0.7.0
+
+0.3.3 / 2015-01-01
+==================
+
+ * deps: debug@~2.1.1
+ * deps: on-finished@~2.2.0
+
+0.3.2 / 2014-10-22
+==================
+
+ * deps: on-finished@~2.1.1
+ - Fix handling of pipelined requests
+
+0.3.1 / 2014-10-16
+==================
+
+ * deps: debug@~2.1.0
+ - Implement `DEBUG_FD` env variable support
+
+0.3.0 / 2014-09-17
+==================
+
+ * Terminate in progress response only on error
+ * Use `on-finished` to determine request status
+
+0.2.0 / 2014-09-03
+==================
+
+ * Set `X-Content-Type-Options: nosniff` header
+ * deps: debug@~2.0.0
+
+0.1.0 / 2014-07-16
+==================
+
+ * Respond after request fully read
+ - prevents hung responses and socket hang ups
+ * deps: debug@1.0.4
+
+0.0.3 / 2014-07-11
+==================
+
+ * deps: debug@1.0.3
+ - Add support for multiple wildcards in namespaces
+
+0.0.2 / 2014-06-19
+==================
+
+ * Handle invalid status codes
+
+0.0.1 / 2014-06-05
+==================
+
+ * deps: debug@1.0.2
+
+0.0.0 / 2014-06-05
+==================
+
+ * Extracted from connect/express
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/LICENSE
new file mode 100644
index 0000000..b60a5ad
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/README.md
new file mode 100644
index 0000000..58bf720
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/README.md
@@ -0,0 +1,142 @@
+# finalhandler
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-image]][node-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Node.js function to invoke as the final step to respond to HTTP request.
+
+## Installation
+
+```sh
+$ npm install finalhandler
+```
+
+## API
+
+```js
+var finalhandler = require('finalhandler')
+```
+
+### finalhandler(req, res, [options])
+
+Returns function to be invoked as the final step for the given `req` and `res`.
+This function is to be invoked as `fn(err)`. If `err` is falsy, the handler will
+write out a 404 response to the `res`. If it is truthy, an error response will
+be written out to the `res`.
+
+When an error is written, the following information is added to the response:
+
+ * The `res.statusCode` is set from `err.status` (or `err.statusCode`). If
+ this value is outside the 4xx or 5xx range, it will be set to 500.
+ * The `res.statusMessage` is set according to the status code.
+ * The body will be the HTML of the status code message if `env` is
+ `'production'`, otherwise will be `err.stack`.
+ * Any headers specified in an `err.headers` object.
+
+The final handler will also unpipe anything from `req` when it is invoked.
+
+#### options.env
+
+By default, the environment is determined by `NODE_ENV` variable, but it can be
+overridden by this option.
+
+#### options.onerror
+
+Provide a function to be called with the `err` when it exists. Can be used for
+writing errors to a central location without excessive function generation. Called
+as `onerror(err, req, res)`.
+
+## Examples
+
+### always 404
+
+```js
+var finalhandler = require('finalhandler')
+var http = require('http')
+
+var server = http.createServer(function (req, res) {
+ var done = finalhandler(req, res)
+ done()
+})
+
+server.listen(3000)
+```
+
+### perform simple action
+
+```js
+var finalhandler = require('finalhandler')
+var fs = require('fs')
+var http = require('http')
+
+var server = http.createServer(function (req, res) {
+ var done = finalhandler(req, res)
+
+ fs.readFile('index.html', function (err, buf) {
+ if (err) return done(err)
+ res.setHeader('Content-Type', 'text/html')
+ res.end(buf)
+ })
+})
+
+server.listen(3000)
+```
+
+### use with middleware-style functions
+
+```js
+var finalhandler = require('finalhandler')
+var http = require('http')
+var serveStatic = require('serve-static')
+
+var serve = serveStatic('public')
+
+var server = http.createServer(function (req, res) {
+ var done = finalhandler(req, res)
+ serve(req, res, done)
+})
+
+server.listen(3000)
+```
+
+### keep log of all errors
+
+```js
+var finalhandler = require('finalhandler')
+var fs = require('fs')
+var http = require('http')
+
+var server = http.createServer(function (req, res) {
+ var done = finalhandler(req, res, {onerror: logerror})
+
+ fs.readFile('index.html', function (err, buf) {
+ if (err) return done(err)
+ res.setHeader('Content-Type', 'text/html')
+ res.end(buf)
+ })
+})
+
+server.listen(3000)
+
+function logerror(err) {
+ console.error(err.stack || err.toString())
+}
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/finalhandler.svg
+[npm-url]: https://npmjs.org/package/finalhandler
+[node-image]: https://img.shields.io/node/v/finalhandler.svg
+[node-url]: https://nodejs.org/en/download
+[travis-image]: https://img.shields.io/travis/pillarjs/finalhandler.svg
+[travis-url]: https://travis-ci.org/pillarjs/finalhandler
+[coveralls-image]: https://img.shields.io/coveralls/pillarjs/finalhandler.svg
+[coveralls-url]: https://coveralls.io/r/pillarjs/finalhandler?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/finalhandler.svg
+[downloads-url]: https://npmjs.org/package/finalhandler
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/index.js
new file mode 100644
index 0000000..884d802
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/index.js
@@ -0,0 +1,189 @@
+/*!
+ * finalhandler
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var debug = require('debug')('finalhandler')
+var escapeHtml = require('escape-html')
+var onFinished = require('on-finished')
+var statuses = require('statuses')
+var unpipe = require('unpipe')
+
+/**
+ * Module variables.
+ * @private
+ */
+
+/* istanbul ignore next */
+var defer = typeof setImmediate === 'function'
+ ? setImmediate
+ : function (fn) { process.nextTick(fn.bind.apply(fn, arguments)) }
+var isFinished = onFinished.isFinished
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = finalhandler
+
+/**
+ * Create a function to handle the final response.
+ *
+ * @param {Request} req
+ * @param {Response} res
+ * @param {Object} [options]
+ * @return {Function}
+ * @public
+ */
+
+function finalhandler (req, res, options) {
+ var opts = options || {}
+
+ // get environment
+ var env = opts.env || process.env.NODE_ENV || 'development'
+
+ // get error callback
+ var onerror = opts.onerror
+
+ return function (err) {
+ var headers = Object.create(null)
+ var status
+
+ // ignore 404 on in-flight response
+ if (!err && res._header) {
+ debug('cannot 404 after headers sent')
+ return
+ }
+
+ // unhandled error
+ if (err) {
+ // respect status code from error
+ status = getErrorStatusCode(err) || res.statusCode
+
+ // default status code to 500 if outside valid range
+ if (typeof status !== 'number' || status < 400 || status > 599) {
+ status = 500
+ }
+
+ // respect err.headers
+ if (err.headers && (err.status === status || err.statusCode === status)) {
+ var keys = Object.keys(err.headers)
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i]
+ headers[key] = err.headers[key]
+ }
+ }
+
+ // production gets a basic error message
+ var msg = env === 'production'
+ ? statuses[status]
+ : err.stack || err.toString()
+ msg = escapeHtml(msg)
+ .replace(/\n/g, '<br>')
+ .replace(/\x20{2}/g, ' &nbsp;') + '\n'
+ } else {
+ status = 404
+ msg = 'Cannot ' + escapeHtml(req.method) + ' ' + escapeHtml(req.originalUrl || req.url) + '\n'
+ }
+
+ debug('default %s', status)
+
+ // schedule onerror callback
+ if (err && onerror) {
+ defer(onerror, err, req, res)
+ }
+
+ // cannot actually respond
+ if (res._header) {
+ debug('cannot %d after headers sent', status)
+ req.socket.destroy()
+ return
+ }
+
+ // send response
+ send(req, res, status, headers, msg)
+ }
+}
+
+/**
+ * Get status code from Error object.
+ *
+ * @param {Error} err
+ * @return {number}
+ * @private
+ */
+
+function getErrorStatusCode (err) {
+ // check err.status
+ if (typeof err.status === 'number' && err.status >= 400 && err.status < 600) {
+ return err.status
+ }
+
+ // check err.statusCode
+ if (typeof err.statusCode === 'number' && err.statusCode >= 400 && err.statusCode < 600) {
+ return err.statusCode
+ }
+
+ return undefined
+}
+
+/**
+ * Send response.
+ *
+ * @param {IncomingMessage} req
+ * @param {OutgoingMessage} res
+ * @param {number} status
+ * @param {object} headers
+ * @param {string} body
+ * @private
+ */
+
+function send (req, res, status, headers, body) {
+ function write () {
+ // response status
+ res.statusCode = status
+ res.statusMessage = statuses[status]
+
+ // response headers
+ var keys = Object.keys(headers)
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i]
+ res.setHeader(key, headers[key])
+ }
+
+ // security header for content sniffing
+ res.setHeader('X-Content-Type-Options', 'nosniff')
+
+ // standard headers
+ res.setHeader('Content-Type', 'text/html; charset=utf-8')
+ res.setHeader('Content-Length', Buffer.byteLength(body, 'utf8'))
+
+ if (req.method === 'HEAD') {
+ res.end()
+ return
+ }
+
+ res.end(body, 'utf8')
+ }
+
+ if (isFinished(req)) {
+ write()
+ return
+ }
+
+ // unpipe everything from the request
+ unpipe(req)
+
+ // flush the request
+ onFinished(req, write)
+ req.resume()
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/HISTORY.md
new file mode 100644
index 0000000..3015a5f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/HISTORY.md
@@ -0,0 +1,55 @@
+1.3.1 / 2016-11-11
+==================
+
+ * Fix return type in JSDoc
+
+1.3.0 / 2016-05-17
+==================
+
+ * Add `421 Misdirected Request`
+ * perf: enable strict mode
+
+1.2.1 / 2015-02-01
+==================
+
+ * Fix message for status 451
+ - `451 Unavailable For Legal Reasons`
+
+1.2.0 / 2014-09-28
+==================
+
+ * Add `208 Already Repored`
+ * Add `226 IM Used`
+ * Add `306 (Unused)`
+ * Add `415 Unable For Legal Reasons`
+ * Add `508 Loop Detected`
+
+1.1.1 / 2014-09-24
+==================
+
+ * Add missing 308 to `codes.json`
+
+1.1.0 / 2014-09-21
+==================
+
+ * Add `codes.json` for universal support
+
+1.0.4 / 2014-08-20
+==================
+
+ * Package cleanup
+
+1.0.3 / 2014-06-08
+==================
+
+ * Add 308 to `.redirect` category
+
+1.0.2 / 2014-03-13
+==================
+
+ * Add `.retry` category
+
+1.0.1 / 2014-03-12
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/LICENSE
new file mode 100644
index 0000000..82af4df
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/LICENSE
@@ -0,0 +1,23 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+Copyright (c) 2016 Douglas Christopher Wilson doug@somethingdoug.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/README.md
new file mode 100644
index 0000000..2bf0756
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/README.md
@@ -0,0 +1,103 @@
+# Statuses
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+HTTP status utility for node.
+
+## API
+
+```js
+var status = require('statuses')
+```
+
+### var code = status(Integer || String)
+
+If `Integer` or `String` is a valid HTTP code or status message, then the appropriate `code` will be returned. Otherwise, an error will be thrown.
+
+```js
+status(403) // => 403
+status('403') // => 403
+status('forbidden') // => 403
+status('Forbidden') // => 403
+status(306) // throws, as it's not supported by node.js
+```
+
+### status.codes
+
+Returns an array of all the status codes as `Integer`s.
+
+### var msg = status[code]
+
+Map of `code` to `status message`. `undefined` for invalid `code`s.
+
+```js
+status[404] // => 'Not Found'
+```
+
+### var code = status[msg]
+
+Map of `status message` to `code`. `msg` can either be title-cased or lower-cased. `undefined` for invalid `status message`s.
+
+```js
+status['not found'] // => 404
+status['Not Found'] // => 404
+```
+
+### status.redirect[code]
+
+Returns `true` if a status code is a valid redirect status.
+
+```js
+status.redirect[200] // => undefined
+status.redirect[301] // => true
+```
+
+### status.empty[code]
+
+Returns `true` if a status code expects an empty body.
+
+```js
+status.empty[200] // => undefined
+status.empty[204] // => true
+status.empty[304] // => true
+```
+
+### status.retry[code]
+
+Returns `true` if you should retry the rest.
+
+```js
+status.retry[501] // => undefined
+status.retry[503] // => true
+```
+
+## Adding Status Codes
+
+The status codes are primarily sourced from http://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv.
+Additionally, custom codes are added from http://en.wikipedia.org/wiki/List_of_HTTP_status_codes.
+These are added manually in the `lib/*.json` files.
+If you would like to add a status code, add it to the appropriate JSON file.
+
+To rebuild `codes.json`, run the following:
+
+```bash
+# update src/iana.json
+npm run fetch
+# build codes.json
+npm run build
+```
+
+[npm-image]: https://img.shields.io/npm/v/statuses.svg
+[npm-url]: https://npmjs.org/package/statuses
+[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg
+[node-version-url]: https://nodejs.org/en/download
+[travis-image]: https://img.shields.io/travis/jshttp/statuses.svg
+[travis-url]: https://travis-ci.org/jshttp/statuses
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/statuses.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/statuses?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/statuses.svg
+[downloads-url]: https://npmjs.org/package/statuses
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/codes.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/codes.json
new file mode 100644
index 0000000..e765123
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/codes.json
@@ -0,0 +1,65 @@
+{
+ "100": "Continue",
+ "101": "Switching Protocols",
+ "102": "Processing",
+ "200": "OK",
+ "201": "Created",
+ "202": "Accepted",
+ "203": "Non-Authoritative Information",
+ "204": "No Content",
+ "205": "Reset Content",
+ "206": "Partial Content",
+ "207": "Multi-Status",
+ "208": "Already Reported",
+ "226": "IM Used",
+ "300": "Multiple Choices",
+ "301": "Moved Permanently",
+ "302": "Found",
+ "303": "See Other",
+ "304": "Not Modified",
+ "305": "Use Proxy",
+ "306": "(Unused)",
+ "307": "Temporary Redirect",
+ "308": "Permanent Redirect",
+ "400": "Bad Request",
+ "401": "Unauthorized",
+ "402": "Payment Required",
+ "403": "Forbidden",
+ "404": "Not Found",
+ "405": "Method Not Allowed",
+ "406": "Not Acceptable",
+ "407": "Proxy Authentication Required",
+ "408": "Request Timeout",
+ "409": "Conflict",
+ "410": "Gone",
+ "411": "Length Required",
+ "412": "Precondition Failed",
+ "413": "Payload Too Large",
+ "414": "URI Too Long",
+ "415": "Unsupported Media Type",
+ "416": "Range Not Satisfiable",
+ "417": "Expectation Failed",
+ "418": "I'm a teapot",
+ "421": "Misdirected Request",
+ "422": "Unprocessable Entity",
+ "423": "Locked",
+ "424": "Failed Dependency",
+ "425": "Unordered Collection",
+ "426": "Upgrade Required",
+ "428": "Precondition Required",
+ "429": "Too Many Requests",
+ "431": "Request Header Fields Too Large",
+ "451": "Unavailable For Legal Reasons",
+ "500": "Internal Server Error",
+ "501": "Not Implemented",
+ "502": "Bad Gateway",
+ "503": "Service Unavailable",
+ "504": "Gateway Timeout",
+ "505": "HTTP Version Not Supported",
+ "506": "Variant Also Negotiates",
+ "507": "Insufficient Storage",
+ "508": "Loop Detected",
+ "509": "Bandwidth Limit Exceeded",
+ "510": "Not Extended",
+ "511": "Network Authentication Required"
+} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/index.js
new file mode 100644
index 0000000..9f955c6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/index.js
@@ -0,0 +1,110 @@
+/*!
+ * statuses
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2016 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var codes = require('./codes.json')
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = status
+
+// array of status codes
+status.codes = populateStatusesMap(status, codes)
+
+// status codes for redirects
+status.redirect = {
+ 300: true,
+ 301: true,
+ 302: true,
+ 303: true,
+ 305: true,
+ 307: true,
+ 308: true
+}
+
+// status codes for empty bodies
+status.empty = {
+ 204: true,
+ 205: true,
+ 304: true
+}
+
+// status codes for when you should retry the request
+status.retry = {
+ 502: true,
+ 503: true,
+ 504: true
+}
+
+/**
+ * Populate the statuses map for given codes.
+ * @private
+ */
+
+function populateStatusesMap (statuses, codes) {
+ var arr = []
+
+ Object.keys(codes).forEach(function forEachCode (code) {
+ var message = codes[code]
+ var status = Number(code)
+
+ // Populate properties
+ statuses[status] = message
+ statuses[message] = status
+ statuses[message.toLowerCase()] = status
+
+ // Add to array
+ arr.push(status)
+ })
+
+ return arr
+}
+
+/**
+ * Get the status code.
+ *
+ * Given a number, this will throw if it is not a known status
+ * code, otherwise the code will be returned. Given a string,
+ * the string will be parsed for a number and return the code
+ * if valid, otherwise will lookup the code assuming this is
+ * the status message.
+ *
+ * @param {string|number} code
+ * @returns {number}
+ * @public
+ */
+
+function status (code) {
+ if (typeof code === 'number') {
+ if (!status[code]) throw new Error('invalid status code: ' + code)
+ return code
+ }
+
+ if (typeof code !== 'string') {
+ throw new TypeError('code must be a number or string')
+ }
+
+ // '403'
+ var n = parseInt(code, 10)
+ if (!isNaN(n)) {
+ if (!status[n]) throw new Error('invalid status code: ' + n)
+ return n
+ }
+
+ n = status[code.toLowerCase()]
+ if (!n) throw new Error('invalid status message: "' + code + '"')
+ return n
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/package.json
new file mode 100644
index 0000000..fa81a52
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/statuses/package.json
@@ -0,0 +1,103 @@
+{
+ "name": "statuses",
+ "description": "HTTP status utility",
+ "version": "1.3.1",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/statuses"
+ },
+ "license": "MIT",
+ "keywords": [
+ "http",
+ "status",
+ "code"
+ ],
+ "files": [
+ "HISTORY.md",
+ "index.js",
+ "codes.json",
+ "LICENSE"
+ ],
+ "devDependencies": {
+ "csv-parse": "1.1.7",
+ "eslint": "3.10.0",
+ "eslint-config-standard": "6.2.1",
+ "eslint-plugin-promise": "3.3.2",
+ "eslint-plugin-standard": "2.0.1",
+ "istanbul": "0.4.5",
+ "mocha": "1.21.5",
+ "stream-to-array": "2.3.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "build": "node scripts/build.js",
+ "fetch": "node scripts/fetch.js",
+ "lint": "eslint .",
+ "test": "mocha --reporter spec --check-leaks --bail test/",
+ "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "update": "npm run fetch && npm run build"
+ },
+ "gitHead": "28a619be77f5b4741e6578a5764c5b06ec6d4aea",
+ "bugs": {
+ "url": "https://github.com/jshttp/statuses/issues"
+ },
+ "homepage": "https://github.com/jshttp/statuses",
+ "_id": "statuses@1.3.1",
+ "_shasum": "faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e",
+ "_from": "statuses@>=1.3.0 <1.4.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "defunctzombie",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "mscdex",
+ "email": "mscdex@mscdex.net"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ }
+ ],
+ "dist": {
+ "shasum": "faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e",
+ "tarball": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/statuses-1.3.1.tgz_1478923281491_0.5574048184789717"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/unpipe/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/unpipe/HISTORY.md
new file mode 100644
index 0000000..85e0f8d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/unpipe/HISTORY.md
@@ -0,0 +1,4 @@
+1.0.0 / 2015-06-14
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/unpipe/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/unpipe/LICENSE
new file mode 100644
index 0000000..aed0138
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/unpipe/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/unpipe/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/unpipe/README.md
new file mode 100644
index 0000000..e536ad2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/unpipe/README.md
@@ -0,0 +1,43 @@
+# unpipe
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-image]][node-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Unpipe a stream from all destinations.
+
+## Installation
+
+```sh
+$ npm install unpipe
+```
+
+## API
+
+```js
+var unpipe = require('unpipe')
+```
+
+### unpipe(stream)
+
+Unpipes all destinations from a given stream. With stream 2+, this is
+equivalent to `stream.unpipe()`. When used with streams 1 style streams
+(typically Node.js 0.8 and below), this module attempts to undo the
+actions done in `stream.pipe(dest)`.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/unpipe.svg
+[npm-url]: https://npmjs.org/package/unpipe
+[node-image]: https://img.shields.io/node/v/unpipe.svg
+[node-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/stream-utils/unpipe.svg
+[travis-url]: https://travis-ci.org/stream-utils/unpipe
+[coveralls-image]: https://img.shields.io/coveralls/stream-utils/unpipe.svg
+[coveralls-url]: https://coveralls.io/r/stream-utils/unpipe?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/unpipe.svg
+[downloads-url]: https://npmjs.org/package/unpipe
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/unpipe/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/unpipe/index.js
new file mode 100644
index 0000000..15c3d97
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/unpipe/index.js
@@ -0,0 +1,69 @@
+/*!
+ * unpipe
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = unpipe
+
+/**
+ * Determine if there are Node.js pipe-like data listeners.
+ * @private
+ */
+
+function hasPipeDataListeners(stream) {
+ var listeners = stream.listeners('data')
+
+ for (var i = 0; i < listeners.length; i++) {
+ if (listeners[i].name === 'ondata') {
+ return true
+ }
+ }
+
+ return false
+}
+
+/**
+ * Unpipe a stream from all destinations.
+ *
+ * @param {object} stream
+ * @public
+ */
+
+function unpipe(stream) {
+ if (!stream) {
+ throw new TypeError('argument stream is required')
+ }
+
+ if (typeof stream.unpipe === 'function') {
+ // new-style
+ stream.unpipe()
+ return
+ }
+
+ // Node.js 0.8 hack
+ if (!hasPipeDataListeners(stream)) {
+ return
+ }
+
+ var listener
+ var listeners = stream.listeners('close')
+
+ for (var i = 0; i < listeners.length; i++) {
+ listener = listeners[i]
+
+ if (listener.name !== 'cleanup' && listener.name !== 'onclose') {
+ continue
+ }
+
+ // invoke the listener
+ listener.call(stream)
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/unpipe/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/unpipe/package.json
new file mode 100644
index 0000000..1dcbe65
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/node_modules/unpipe/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "unpipe",
+ "description": "Unpipe a stream from all destinations",
+ "version": "1.0.0",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/stream-utils/unpipe"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.15",
+ "mocha": "2.2.5",
+ "readable-stream": "1.1.13"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "README.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "d2df901c06487430e78dca62b6edb8bb2fc5e99d",
+ "bugs": {
+ "url": "https://github.com/stream-utils/unpipe/issues"
+ },
+ "homepage": "https://github.com/stream-utils/unpipe",
+ "_id": "unpipe@1.0.0",
+ "_shasum": "b2bf4ee8514aae6165b4817829d21b2ef49904ec",
+ "_from": "unpipe@>=1.0.0 <1.1.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "b2bf4ee8514aae6165b4817829d21b2ef49904ec",
+ "tarball": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/package.json
new file mode 100644
index 0000000..b1bd0ea
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/finalhandler/package.json
@@ -0,0 +1,74 @@
+{
+ "name": "finalhandler",
+ "description": "Node.js final http responder",
+ "version": "0.5.0",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/pillarjs/finalhandler"
+ },
+ "dependencies": {
+ "debug": "~2.2.0",
+ "escape-html": "~1.0.3",
+ "on-finished": "~2.3.0",
+ "statuses": "~1.3.0",
+ "unpipe": "~1.0.0"
+ },
+ "devDependencies": {
+ "eslint": "2.12.0",
+ "eslint-config-standard": "5.3.1",
+ "eslint-plugin-promise": "1.3.2",
+ "eslint-plugin-standard": "1.3.2",
+ "istanbul": "0.4.3",
+ "mocha": "2.5.3",
+ "readable-stream": "2.1.2",
+ "supertest": "1.1.0"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "scripts": {
+ "lint": "eslint **/*.js",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "15cc543eb87dd0e2f29e931d86816a6eb348c573",
+ "bugs": {
+ "url": "https://github.com/pillarjs/finalhandler/issues"
+ },
+ "homepage": "https://github.com/pillarjs/finalhandler",
+ "_id": "finalhandler@0.5.0",
+ "_shasum": "e9508abece9b6dba871a6942a1d7911b91911ac7",
+ "_from": "finalhandler@0.5.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e9508abece9b6dba871a6942a1d7911b91911ac7",
+ "tarball": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.5.0.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/finalhandler-0.5.0.tgz_1466028655505_0.19758180482313037"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.5.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/fresh/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/fresh/HISTORY.md
new file mode 100644
index 0000000..3c95fbb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/fresh/HISTORY.md
@@ -0,0 +1,38 @@
+0.3.0 / 2015-05-12
+==================
+
+ * Add weak `ETag` matching support
+
+0.2.4 / 2014-09-07
+==================
+
+ * Support Node.js 0.6
+
+0.2.3 / 2014-09-07
+==================
+
+ * Move repository to jshttp
+
+0.2.2 / 2014-02-19
+==================
+
+ * Revert "Fix for blank page on Safari reload"
+
+0.2.1 / 2014-01-29
+==================
+
+ * Fix for blank page on Safari reload
+
+0.2.0 / 2013-08-11
+==================
+
+ * Return stale for `Cache-Control: no-cache`
+
+0.1.0 / 2012-06-15
+==================
+ * Add `If-None-Match: *` support
+
+0.0.1 / 2012-06-10
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/fresh/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/fresh/LICENSE
new file mode 100644
index 0000000..f527394
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/fresh/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/fresh/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/fresh/README.md
new file mode 100644
index 0000000..0813e30
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/fresh/README.md
@@ -0,0 +1,58 @@
+# fresh
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+HTTP response freshness testing
+
+## Installation
+
+```
+$ npm install fresh
+```
+
+## API
+
+```js
+var fresh = require('fresh')
+```
+
+### fresh(req, res)
+
+ Check freshness of `req` and `res` headers.
+
+ When the cache is "fresh" __true__ is returned,
+ otherwise __false__ is returned to indicate that
+ the cache is now stale.
+
+## Example
+
+```js
+var req = { 'if-none-match': 'tobi' };
+var res = { 'etag': 'luna' };
+fresh(req, res);
+// => false
+
+var req = { 'if-none-match': 'tobi' };
+var res = { 'etag': 'tobi' };
+fresh(req, res);
+// => true
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/fresh.svg
+[npm-url]: https://npmjs.org/package/fresh
+[node-version-image]: https://img.shields.io/node/v/fresh.svg
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/fresh/master.svg
+[travis-url]: https://travis-ci.org/jshttp/fresh
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/fresh/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/fresh?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/fresh.svg
+[downloads-url]: https://npmjs.org/package/fresh
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/fresh/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/fresh/index.js
new file mode 100644
index 0000000..a900873
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/fresh/index.js
@@ -0,0 +1,57 @@
+
+/**
+ * Expose `fresh()`.
+ */
+
+module.exports = fresh;
+
+/**
+ * Check freshness of `req` and `res` headers.
+ *
+ * When the cache is "fresh" __true__ is returned,
+ * otherwise __false__ is returned to indicate that
+ * the cache is now stale.
+ *
+ * @param {Object} req
+ * @param {Object} res
+ * @return {Boolean}
+ * @api public
+ */
+
+function fresh(req, res) {
+ // defaults
+ var etagMatches = true;
+ var notModified = true;
+
+ // fields
+ var modifiedSince = req['if-modified-since'];
+ var noneMatch = req['if-none-match'];
+ var lastModified = res['last-modified'];
+ var etag = res['etag'];
+ var cc = req['cache-control'];
+
+ // unconditional request
+ if (!modifiedSince && !noneMatch) return false;
+
+ // check for no-cache cache request directive
+ if (cc && cc.indexOf('no-cache') !== -1) return false;
+
+ // parse if-none-match
+ if (noneMatch) noneMatch = noneMatch.split(/ *, */);
+
+ // if-none-match
+ if (noneMatch) {
+ etagMatches = noneMatch.some(function (match) {
+ return match === '*' || match === etag || match === 'W/' + etag;
+ });
+ }
+
+ // if-modified-since
+ if (modifiedSince) {
+ modifiedSince = new Date(modifiedSince);
+ lastModified = new Date(lastModified);
+ notModified = lastModified <= modifiedSince;
+ }
+
+ return !! (etagMatches && notModified);
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/fresh/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/fresh/package.json
new file mode 100644
index 0000000..f0e476b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/fresh/package.json
@@ -0,0 +1,86 @@
+{
+ "name": "fresh",
+ "description": "HTTP response freshness testing",
+ "version": "0.3.0",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca",
+ "url": "http://tjholowaychuk.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "fresh",
+ "http",
+ "conditional",
+ "cache"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/fresh"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.9",
+ "mocha": "1.21.5"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "14616c9748368ca08cd6a955dd88ab659b778634",
+ "bugs": {
+ "url": "https://github.com/jshttp/fresh/issues"
+ },
+ "homepage": "https://github.com/jshttp/fresh",
+ "_id": "fresh@0.3.0",
+ "_shasum": "651f838e22424e7566de161d8358caa199f83d4f",
+ "_from": "fresh@0.3.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "jonathanong",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "651f838e22424e7566de161d8358caa199f83d4f",
+ "tarball": "https://registry.npmjs.org/fresh/-/fresh-0.3.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/fresh/-/fresh-0.3.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/merge-descriptors/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/merge-descriptors/HISTORY.md
new file mode 100644
index 0000000..486771f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/merge-descriptors/HISTORY.md
@@ -0,0 +1,21 @@
+1.0.1 / 2016-01-17
+==================
+
+ * perf: enable strict mode
+
+1.0.0 / 2015-03-01
+==================
+
+ * Add option to only add new descriptors
+ * Add simple argument validation
+ * Add jsdoc to source file
+
+0.0.2 / 2013-12-14
+==================
+
+ * Move repository to `component` organization
+
+0.0.1 / 2013-10-29
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/merge-descriptors/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/merge-descriptors/LICENSE
new file mode 100644
index 0000000..274bfd8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/merge-descriptors/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2013 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/merge-descriptors/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/merge-descriptors/README.md
new file mode 100644
index 0000000..d593c0e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/merge-descriptors/README.md
@@ -0,0 +1,48 @@
+# Merge Descriptors
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Merge objects using descriptors.
+
+```js
+var thing = {
+ get name() {
+ return 'jon'
+ }
+}
+
+var animal = {
+
+}
+
+merge(animal, thing)
+
+animal.name === 'jon'
+```
+
+## API
+
+### merge(destination, source)
+
+Redefines `destination`'s descriptors with `source`'s.
+
+### merge(destination, source, false)
+
+Defines `source`'s descriptors on `destination` if `destination` does not have
+a descriptor by the same name.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/merge-descriptors.svg
+[npm-url]: https://npmjs.org/package/merge-descriptors
+[travis-image]: https://img.shields.io/travis/component/merge-descriptors/master.svg
+[travis-url]: https://travis-ci.org/component/merge-descriptors
+[coveralls-image]: https://img.shields.io/coveralls/component/merge-descriptors/master.svg
+[coveralls-url]: https://coveralls.io/r/component/merge-descriptors?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/merge-descriptors.svg
+[downloads-url]: https://npmjs.org/package/merge-descriptors
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/merge-descriptors/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/merge-descriptors/index.js
new file mode 100644
index 0000000..573b132
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/merge-descriptors/index.js
@@ -0,0 +1,60 @@
+/*!
+ * merge-descriptors
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = merge
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var hasOwnProperty = Object.prototype.hasOwnProperty
+
+/**
+ * Merge the property descriptors of `src` into `dest`
+ *
+ * @param {object} dest Object to add descriptors to
+ * @param {object} src Object to clone descriptors from
+ * @param {boolean} [redefine=true] Redefine `dest` properties with `src` properties
+ * @returns {object} Reference to dest
+ * @public
+ */
+
+function merge(dest, src, redefine) {
+ if (!dest) {
+ throw new TypeError('argument dest is required')
+ }
+
+ if (!src) {
+ throw new TypeError('argument src is required')
+ }
+
+ if (redefine === undefined) {
+ // Default to true
+ redefine = true
+ }
+
+ Object.getOwnPropertyNames(src).forEach(function forEachOwnPropertyName(name) {
+ if (!redefine && hasOwnProperty.call(dest, name)) {
+ // Skip desriptor
+ return
+ }
+
+ // Copy descriptor
+ var descriptor = Object.getOwnPropertyDescriptor(src, name)
+ Object.defineProperty(dest, name, descriptor)
+ })
+
+ return dest
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/merge-descriptors/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/merge-descriptors/package.json
new file mode 100644
index 0000000..b3558d6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/merge-descriptors/package.json
@@ -0,0 +1,137 @@
+{
+ "name": "merge-descriptors",
+ "description": "Merge objects using descriptors",
+ "version": "1.0.1",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Mike Grabowski",
+ "email": "grabbou@gmail.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/component/merge-descriptors"
+ },
+ "devDependencies": {
+ "istanbul": "0.4.1",
+ "mocha": "1.21.5"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "README.md",
+ "index.js"
+ ],
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"
+ },
+ "gitHead": "f26c49c3b423b0b2ac31f6e32a84e1632f2d7ac2",
+ "bugs": {
+ "url": "https://github.com/component/merge-descriptors/issues"
+ },
+ "homepage": "https://github.com/component/merge-descriptors",
+ "_id": "merge-descriptors@1.0.1",
+ "_shasum": "b00aaa556dd8b44568150ec9d1b953f3f90cbb61",
+ "_from": "merge-descriptors@1.0.1",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "anthonyshort",
+ "email": "antshort@gmail.com"
+ },
+ {
+ "name": "clintwood",
+ "email": "clint@anotherway.co.za"
+ },
+ {
+ "name": "dfcreative",
+ "email": "df.creative@gmail.com"
+ },
+ {
+ "name": "dominicbarnes",
+ "email": "dominic@dbarnes.info"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "ianstormtaylor",
+ "email": "ian@ianstormtaylor.com"
+ },
+ {
+ "name": "jonathanong",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "juliangruber",
+ "email": "julian@juliangruber.com"
+ },
+ {
+ "name": "mattmueller",
+ "email": "mattmuelle@gmail.com"
+ },
+ {
+ "name": "queckezz",
+ "email": "fabian.eichenberger@gmail.com"
+ },
+ {
+ "name": "stephenmathieson",
+ "email": "me@stephenmathieson.com"
+ },
+ {
+ "name": "thehydroimpulse",
+ "email": "dnfagnan@gmail.com"
+ },
+ {
+ "name": "timaschew",
+ "email": "timaschew@gmail.com"
+ },
+ {
+ "name": "timoxley",
+ "email": "secoif@gmail.com"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ },
+ {
+ "name": "trevorgerhardt",
+ "email": "trevorgerhardt@gmail.com"
+ },
+ {
+ "name": "yields",
+ "email": "yields@icloud.com"
+ }
+ ],
+ "dist": {
+ "shasum": "b00aaa556dd8b44568150ec9d1b953f3f90cbb61",
+ "tarball": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/methods/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/methods/HISTORY.md
new file mode 100644
index 0000000..c0ecf07
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/methods/HISTORY.md
@@ -0,0 +1,29 @@
+1.1.2 / 2016-01-17
+==================
+
+ * perf: enable strict mode
+
+1.1.1 / 2014-12-30
+==================
+
+ * Improve `browserify` support
+
+1.1.0 / 2014-07-05
+==================
+
+ * Add `CONNECT` method
+
+1.0.1 / 2014-06-02
+==================
+
+ * Fix module to work with harmony transform
+
+1.0.0 / 2014-05-08
+==================
+
+ * Add `PURGE` method
+
+0.1.0 / 2013-10-28
+==================
+
+ * Add `http.METHODS` support
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/methods/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/methods/LICENSE
new file mode 100644
index 0000000..220dc1a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/methods/LICENSE
@@ -0,0 +1,24 @@
+(The MIT License)
+
+Copyright (c) 2013-2014 TJ Holowaychuk <tj@vision-media.ca>
+Copyright (c) 2015-2016 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/methods/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/methods/README.md
new file mode 100644
index 0000000..672a32b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/methods/README.md
@@ -0,0 +1,51 @@
+# Methods
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+HTTP verbs that Node.js core's HTTP parser supports.
+
+This module provides an export that is just like `http.METHODS` from Node.js core,
+with the following differences:
+
+ * All method names are lower-cased.
+ * Contains a fallback list of methods for Node.js versions that do not have a
+ `http.METHODS` export (0.10 and lower).
+ * Provides the fallback list when using tools like `browserify` without pulling
+ in the `http` shim module.
+
+## Install
+
+```bash
+$ npm install methods
+```
+
+## API
+
+```js
+var methods = require('methods')
+```
+
+### methods
+
+This is an array of lower-cased method names that Node.js supports. If Node.js
+provides the `http.METHODS` export, then this is the same array lower-cased,
+otherwise it is a snapshot of the verbs from Node.js 0.10.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/methods.svg?style=flat
+[npm-url]: https://npmjs.org/package/methods
+[node-version-image]: https://img.shields.io/node/v/methods.svg?style=flat
+[node-version-url]: https://nodejs.org/en/download/
+[travis-image]: https://img.shields.io/travis/jshttp/methods.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/methods
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/methods.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/methods?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/methods.svg?style=flat
+[downloads-url]: https://npmjs.org/package/methods
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/methods/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/methods/index.js
new file mode 100644
index 0000000..667a50b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/methods/index.js
@@ -0,0 +1,69 @@
+/*!
+ * methods
+ * Copyright(c) 2013-2014 TJ Holowaychuk
+ * Copyright(c) 2015-2016 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var http = require('http');
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = getCurrentNodeMethods() || getBasicNodeMethods();
+
+/**
+ * Get the current Node.js methods.
+ * @private
+ */
+
+function getCurrentNodeMethods() {
+ return http.METHODS && http.METHODS.map(function lowerCaseMethod(method) {
+ return method.toLowerCase();
+ });
+}
+
+/**
+ * Get the "basic" Node.js methods, a snapshot from Node.js 0.10.
+ * @private
+ */
+
+function getBasicNodeMethods() {
+ return [
+ 'get',
+ 'post',
+ 'put',
+ 'head',
+ 'delete',
+ 'options',
+ 'trace',
+ 'copy',
+ 'lock',
+ 'mkcol',
+ 'move',
+ 'purge',
+ 'propfind',
+ 'proppatch',
+ 'unlock',
+ 'report',
+ 'mkactivity',
+ 'checkout',
+ 'merge',
+ 'm-search',
+ 'notify',
+ 'subscribe',
+ 'unsubscribe',
+ 'patch',
+ 'search',
+ 'connect'
+ ];
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/methods/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/methods/package.json
new file mode 100644
index 0000000..091972f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/methods/package.json
@@ -0,0 +1,87 @@
+{
+ "name": "methods",
+ "description": "HTTP methods that node supports",
+ "version": "1.1.2",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca",
+ "url": "http://tjholowaychuk.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/methods"
+ },
+ "devDependencies": {
+ "istanbul": "0.4.1",
+ "mocha": "1.21.5"
+ },
+ "files": [
+ "index.js",
+ "HISTORY.md",
+ "LICENSE"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "browser": {
+ "http": false
+ },
+ "keywords": [
+ "http",
+ "methods"
+ ],
+ "gitHead": "25d257d913f1b94bd2d73581521ff72c81469140",
+ "bugs": {
+ "url": "https://github.com/jshttp/methods/issues"
+ },
+ "homepage": "https://github.com/jshttp/methods",
+ "_id": "methods@1.1.2",
+ "_shasum": "5529a4d67654134edcc5266656835b0f851afcee",
+ "_from": "methods@>=1.1.2 <1.2.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "jonathanong",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "5529a4d67654134edcc5266656835b0f851afcee",
+ "tarball": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/HISTORY.md
new file mode 100644
index 0000000..98ff0e9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/HISTORY.md
@@ -0,0 +1,88 @@
+2.3.0 / 2015-05-26
+==================
+
+ * Add defined behavior for HTTP `CONNECT` requests
+ * Add defined behavior for HTTP `Upgrade` requests
+ * deps: ee-first@1.1.1
+
+2.2.1 / 2015-04-22
+==================
+
+ * Fix `isFinished(req)` when data buffered
+
+2.2.0 / 2014-12-22
+==================
+
+ * Add message object to callback arguments
+
+2.1.1 / 2014-10-22
+==================
+
+ * Fix handling of pipelined requests
+
+2.1.0 / 2014-08-16
+==================
+
+ * Check if `socket` is detached
+ * Return `undefined` for `isFinished` if state unknown
+
+2.0.0 / 2014-08-16
+==================
+
+ * Add `isFinished` function
+ * Move to `jshttp` organization
+ * Remove support for plain socket argument
+ * Rename to `on-finished`
+ * Support both `req` and `res` as arguments
+ * deps: ee-first@1.0.5
+
+1.2.2 / 2014-06-10
+==================
+
+ * Reduce listeners added to emitters
+ - avoids "event emitter leak" warnings when used multiple times on same request
+
+1.2.1 / 2014-06-08
+==================
+
+ * Fix returned value when already finished
+
+1.2.0 / 2014-06-05
+==================
+
+ * Call callback when called on already-finished socket
+
+1.1.4 / 2014-05-27
+==================
+
+ * Support node.js 0.8
+
+1.1.3 / 2014-04-30
+==================
+
+ * Make sure errors passed as instanceof `Error`
+
+1.1.2 / 2014-04-18
+==================
+
+ * Default the `socket` to passed-in object
+
+1.1.1 / 2014-01-16
+==================
+
+ * Rename module to `finished`
+
+1.1.0 / 2013-12-25
+==================
+
+ * Call callback when called on already-errored socket
+
+1.0.1 / 2013-12-20
+==================
+
+ * Actually pass the error to the callback
+
+1.0.0 / 2013-12-20
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/LICENSE
new file mode 100644
index 0000000..5931fd2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2013 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2014 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/README.md
new file mode 100644
index 0000000..a0e1157
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/README.md
@@ -0,0 +1,154 @@
+# on-finished
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Execute a callback when a HTTP request closes, finishes, or errors.
+
+## Install
+
+```sh
+$ npm install on-finished
+```
+
+## API
+
+```js
+var onFinished = require('on-finished')
+```
+
+### onFinished(res, listener)
+
+Attach a listener to listen for the response to finish. The listener will
+be invoked only once when the response finished. If the response finished
+to an error, the first argument will contain the error. If the response
+has already finished, the listener will be invoked.
+
+Listening to the end of a response would be used to close things associated
+with the response, like open files.
+
+Listener is invoked as `listener(err, res)`.
+
+```js
+onFinished(res, function (err, res) {
+ // clean up open fds, etc.
+ // err contains the error is request error'd
+})
+```
+
+### onFinished(req, listener)
+
+Attach a listener to listen for the request to finish. The listener will
+be invoked only once when the request finished. If the request finished
+to an error, the first argument will contain the error. If the request
+has already finished, the listener will be invoked.
+
+Listening to the end of a request would be used to know when to continue
+after reading the data.
+
+Listener is invoked as `listener(err, req)`.
+
+```js
+var data = ''
+
+req.setEncoding('utf8')
+res.on('data', function (str) {
+ data += str
+})
+
+onFinished(req, function (err, req) {
+ // data is read unless there is err
+})
+```
+
+### onFinished.isFinished(res)
+
+Determine if `res` is already finished. This would be useful to check and
+not even start certain operations if the response has already finished.
+
+### onFinished.isFinished(req)
+
+Determine if `req` is already finished. This would be useful to check and
+not even start certain operations if the request has already finished.
+
+## Special Node.js requests
+
+### HTTP CONNECT method
+
+The meaning of the `CONNECT` method from RFC 7231, section 4.3.6:
+
+> The CONNECT method requests that the recipient establish a tunnel to
+> the destination origin server identified by the request-target and,
+> if successful, thereafter restrict its behavior to blind forwarding
+> of packets, in both directions, until the tunnel is closed. Tunnels
+> are commonly used to create an end-to-end virtual connection, through
+> one or more proxies, which can then be secured using TLS (Transport
+> Layer Security, [RFC5246]).
+
+In Node.js, these request objects come from the `'connect'` event on
+the HTTP server.
+
+When this module is used on a HTTP `CONNECT` request, the request is
+considered "finished" immediately, **due to limitations in the Node.js
+interface**. This means if the `CONNECT` request contains a request entity,
+the request will be considered "finished" even before it has been read.
+
+There is no such thing as a response object to a `CONNECT` request in
+Node.js, so there is no support for for one.
+
+### HTTP Upgrade request
+
+The meaning of the `Upgrade` header from RFC 7230, section 6.1:
+
+> The "Upgrade" header field is intended to provide a simple mechanism
+> for transitioning from HTTP/1.1 to some other protocol on the same
+> connection.
+
+In Node.js, these request objects come from the `'upgrade'` event on
+the HTTP server.
+
+When this module is used on a HTTP request with an `Upgrade` header, the
+request is considered "finished" immediately, **due to limitations in the
+Node.js interface**. This means if the `Upgrade` request contains a request
+entity, the request will be considered "finished" even before it has been
+read.
+
+There is no such thing as a response object to a `Upgrade` request in
+Node.js, so there is no support for for one.
+
+## Example
+
+The following code ensures that file descriptors are always closed
+once the response finishes.
+
+```js
+var destroy = require('destroy')
+var http = require('http')
+var onFinished = require('on-finished')
+
+http.createServer(function onRequest(req, res) {
+ var stream = fs.createReadStream('package.json')
+ stream.pipe(res)
+ onFinished(res, function (err) {
+ destroy(stream)
+ })
+})
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/on-finished.svg
+[npm-url]: https://npmjs.org/package/on-finished
+[node-version-image]: https://img.shields.io/node/v/on-finished.svg
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/on-finished/master.svg
+[travis-url]: https://travis-ci.org/jshttp/on-finished
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/on-finished/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/on-finished?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/on-finished.svg
+[downloads-url]: https://npmjs.org/package/on-finished
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/index.js
new file mode 100644
index 0000000..9abd98f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/index.js
@@ -0,0 +1,196 @@
+/*!
+ * on-finished
+ * Copyright(c) 2013 Jonathan Ong
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = onFinished
+module.exports.isFinished = isFinished
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var first = require('ee-first')
+
+/**
+ * Variables.
+ * @private
+ */
+
+/* istanbul ignore next */
+var defer = typeof setImmediate === 'function'
+ ? setImmediate
+ : function(fn){ process.nextTick(fn.bind.apply(fn, arguments)) }
+
+/**
+ * Invoke callback when the response has finished, useful for
+ * cleaning up resources afterwards.
+ *
+ * @param {object} msg
+ * @param {function} listener
+ * @return {object}
+ * @public
+ */
+
+function onFinished(msg, listener) {
+ if (isFinished(msg) !== false) {
+ defer(listener, null, msg)
+ return msg
+ }
+
+ // attach the listener to the message
+ attachListener(msg, listener)
+
+ return msg
+}
+
+/**
+ * Determine if message is already finished.
+ *
+ * @param {object} msg
+ * @return {boolean}
+ * @public
+ */
+
+function isFinished(msg) {
+ var socket = msg.socket
+
+ if (typeof msg.finished === 'boolean') {
+ // OutgoingMessage
+ return Boolean(msg.finished || (socket && !socket.writable))
+ }
+
+ if (typeof msg.complete === 'boolean') {
+ // IncomingMessage
+ return Boolean(msg.upgrade || !socket || !socket.readable || (msg.complete && !msg.readable))
+ }
+
+ // don't know
+ return undefined
+}
+
+/**
+ * Attach a finished listener to the message.
+ *
+ * @param {object} msg
+ * @param {function} callback
+ * @private
+ */
+
+function attachFinishedListener(msg, callback) {
+ var eeMsg
+ var eeSocket
+ var finished = false
+
+ function onFinish(error) {
+ eeMsg.cancel()
+ eeSocket.cancel()
+
+ finished = true
+ callback(error)
+ }
+
+ // finished on first message event
+ eeMsg = eeSocket = first([[msg, 'end', 'finish']], onFinish)
+
+ function onSocket(socket) {
+ // remove listener
+ msg.removeListener('socket', onSocket)
+
+ if (finished) return
+ if (eeMsg !== eeSocket) return
+
+ // finished on first socket event
+ eeSocket = first([[socket, 'error', 'close']], onFinish)
+ }
+
+ if (msg.socket) {
+ // socket already assigned
+ onSocket(msg.socket)
+ return
+ }
+
+ // wait for socket to be assigned
+ msg.on('socket', onSocket)
+
+ if (msg.socket === undefined) {
+ // node.js 0.8 patch
+ patchAssignSocket(msg, onSocket)
+ }
+}
+
+/**
+ * Attach the listener to the message.
+ *
+ * @param {object} msg
+ * @return {function}
+ * @private
+ */
+
+function attachListener(msg, listener) {
+ var attached = msg.__onFinished
+
+ // create a private single listener with queue
+ if (!attached || !attached.queue) {
+ attached = msg.__onFinished = createListener(msg)
+ attachFinishedListener(msg, attached)
+ }
+
+ attached.queue.push(listener)
+}
+
+/**
+ * Create listener on message.
+ *
+ * @param {object} msg
+ * @return {function}
+ * @private
+ */
+
+function createListener(msg) {
+ function listener(err) {
+ if (msg.__onFinished === listener) msg.__onFinished = null
+ if (!listener.queue) return
+
+ var queue = listener.queue
+ listener.queue = null
+
+ for (var i = 0; i < queue.length; i++) {
+ queue[i](err, msg)
+ }
+ }
+
+ listener.queue = []
+
+ return listener
+}
+
+/**
+ * Patch ServerResponse.prototype.assignSocket for node.js 0.8.
+ *
+ * @param {ServerResponse} res
+ * @param {function} callback
+ * @private
+ */
+
+function patchAssignSocket(res, callback) {
+ var assignSocket = res.assignSocket
+
+ if (typeof assignSocket !== 'function') return
+
+ // res.on('socket', callback) is broken in 0.8
+ res.assignSocket = function _assignSocket(socket) {
+ assignSocket.call(this, socket)
+ callback(socket)
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/node_modules/ee-first/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/node_modules/ee-first/LICENSE
new file mode 100644
index 0000000..a7ae8ee
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/node_modules/ee-first/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/node_modules/ee-first/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/node_modules/ee-first/README.md
new file mode 100644
index 0000000..cbd2478
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/node_modules/ee-first/README.md
@@ -0,0 +1,80 @@
+# EE First
+
+[![NPM version][npm-image]][npm-url]
+[![Build status][travis-image]][travis-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+[![Gittip][gittip-image]][gittip-url]
+
+Get the first event in a set of event emitters and event pairs,
+then clean up after itself.
+
+## Install
+
+```sh
+$ npm install ee-first
+```
+
+## API
+
+```js
+var first = require('ee-first')
+```
+
+### first(arr, listener)
+
+Invoke `listener` on the first event from the list specified in `arr`. `arr` is
+an array of arrays, with each array in the format `[ee, ...event]`. `listener`
+will be called only once, the first time any of the given events are emitted. If
+`error` is one of the listened events, then if that fires first, the `listener`
+will be given the `err` argument.
+
+The `listener` is invoked as `listener(err, ee, event, args)`, where `err` is the
+first argument emitted from an `error` event, if applicable; `ee` is the event
+emitter that fired; `event` is the string event name that fired; and `args` is an
+array of the arguments that were emitted on the event.
+
+```js
+var ee1 = new EventEmitter()
+var ee2 = new EventEmitter()
+
+first([
+ [ee1, 'close', 'end', 'error'],
+ [ee2, 'error']
+], function (err, ee, event, args) {
+ // listener invoked
+})
+```
+
+#### .cancel()
+
+The group of listeners can be cancelled before being invoked and have all the event
+listeners removed from the underlying event emitters.
+
+```js
+var thunk = first([
+ [ee1, 'close', 'end', 'error'],
+ [ee2, 'error']
+], function (err, ee, event, args) {
+ // listener invoked
+})
+
+// cancel and clean up
+thunk.cancel()
+```
+
+[npm-image]: https://img.shields.io/npm/v/ee-first.svg?style=flat-square
+[npm-url]: https://npmjs.org/package/ee-first
+[github-tag]: http://img.shields.io/github/tag/jonathanong/ee-first.svg?style=flat-square
+[github-url]: https://github.com/jonathanong/ee-first/tags
+[travis-image]: https://img.shields.io/travis/jonathanong/ee-first.svg?style=flat-square
+[travis-url]: https://travis-ci.org/jonathanong/ee-first
+[coveralls-image]: https://img.shields.io/coveralls/jonathanong/ee-first.svg?style=flat-square
+[coveralls-url]: https://coveralls.io/r/jonathanong/ee-first?branch=master
+[license-image]: http://img.shields.io/npm/l/ee-first.svg?style=flat-square
+[license-url]: LICENSE.md
+[downloads-image]: http://img.shields.io/npm/dm/ee-first.svg?style=flat-square
+[downloads-url]: https://npmjs.org/package/ee-first
+[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
+[gittip-url]: https://www.gittip.com/jonathanong/
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/node_modules/ee-first/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/node_modules/ee-first/index.js
new file mode 100644
index 0000000..501287c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/node_modules/ee-first/index.js
@@ -0,0 +1,95 @@
+/*!
+ * ee-first
+ * Copyright(c) 2014 Jonathan Ong
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = first
+
+/**
+ * Get the first event in a set of event emitters and event pairs.
+ *
+ * @param {array} stuff
+ * @param {function} done
+ * @public
+ */
+
+function first(stuff, done) {
+ if (!Array.isArray(stuff))
+ throw new TypeError('arg must be an array of [ee, events...] arrays')
+
+ var cleanups = []
+
+ for (var i = 0; i < stuff.length; i++) {
+ var arr = stuff[i]
+
+ if (!Array.isArray(arr) || arr.length < 2)
+ throw new TypeError('each array member must be [ee, events...]')
+
+ var ee = arr[0]
+
+ for (var j = 1; j < arr.length; j++) {
+ var event = arr[j]
+ var fn = listener(event, callback)
+
+ // listen to the event
+ ee.on(event, fn)
+ // push this listener to the list of cleanups
+ cleanups.push({
+ ee: ee,
+ event: event,
+ fn: fn,
+ })
+ }
+ }
+
+ function callback() {
+ cleanup()
+ done.apply(null, arguments)
+ }
+
+ function cleanup() {
+ var x
+ for (var i = 0; i < cleanups.length; i++) {
+ x = cleanups[i]
+ x.ee.removeListener(x.event, x.fn)
+ }
+ }
+
+ function thunk(fn) {
+ done = fn
+ }
+
+ thunk.cancel = cleanup
+
+ return thunk
+}
+
+/**
+ * Create the event listener.
+ * @private
+ */
+
+function listener(event, done) {
+ return function onevent(arg1) {
+ var args = new Array(arguments.length)
+ var ee = this
+ var err = event === 'error'
+ ? arg1
+ : null
+
+ // copy args to prevent arguments escaping scope
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i]
+ }
+
+ done(err, ee, event, args)
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/node_modules/ee-first/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/node_modules/ee-first/package.json
new file mode 100644
index 0000000..35ff70d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/node_modules/ee-first/package.json
@@ -0,0 +1,63 @@
+{
+ "name": "ee-first",
+ "description": "return the first event in a set of ee/event pairs",
+ "version": "1.1.1",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jonathanong/ee-first"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.9",
+ "mocha": "2.2.5"
+ },
+ "files": [
+ "index.js",
+ "LICENSE"
+ ],
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "512e0ce4cc3643f603708f965a97b61b1a9c0441",
+ "bugs": {
+ "url": "https://github.com/jonathanong/ee-first/issues"
+ },
+ "homepage": "https://github.com/jonathanong/ee-first",
+ "_id": "ee-first@1.1.1",
+ "_shasum": "590c61156b0ae2f4f0255732a158b266bc56b21d",
+ "_from": "ee-first@1.1.1",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "590c61156b0ae2f4f0255732a158b266bc56b21d",
+ "tarball": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/package.json
new file mode 100644
index 0000000..b3feb7d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/on-finished/package.json
@@ -0,0 +1,70 @@
+{
+ "name": "on-finished",
+ "description": "Execute a callback when a request closes, finishes, or errors",
+ "version": "2.3.0",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/on-finished"
+ },
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.9",
+ "mocha": "2.2.5"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "34babcb58126a416fcf5205768204f2e12699dda",
+ "bugs": {
+ "url": "https://github.com/jshttp/on-finished/issues"
+ },
+ "homepage": "https://github.com/jshttp/on-finished",
+ "_id": "on-finished@2.3.0",
+ "_shasum": "20f1336481b083cd75337992a16971aa2d906947",
+ "_from": "on-finished@>=2.3.0 <2.4.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "20f1336481b083cd75337992a16971aa2d906947",
+ "tarball": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/parseurl/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/parseurl/HISTORY.md
new file mode 100644
index 0000000..395041e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/parseurl/HISTORY.md
@@ -0,0 +1,47 @@
+1.3.1 / 2016-01-17
+==================
+
+ * perf: enable strict mode
+
+1.3.0 / 2014-08-09
+==================
+
+ * Add `parseurl.original` for parsing `req.originalUrl` with fallback
+ * Return `undefined` if `req.url` is `undefined`
+
+1.2.0 / 2014-07-21
+==================
+
+ * Cache URLs based on original value
+ * Remove no-longer-needed URL mis-parse work-around
+ * Simplify the "fast-path" `RegExp`
+
+1.1.3 / 2014-07-08
+==================
+
+ * Fix typo
+
+1.1.2 / 2014-07-08
+==================
+
+ * Seriously fix Node.js 0.8 compatibility
+
+1.1.1 / 2014-07-08
+==================
+
+ * Fix Node.js 0.8 compatibility
+
+1.1.0 / 2014-07-08
+==================
+
+ * Incorporate URL href-only parse fast-path
+
+1.0.1 / 2014-03-08
+==================
+
+ * Add missing `require`
+
+1.0.0 / 2014-03-08
+==================
+
+ * Genesis from `connect`
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/parseurl/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/parseurl/LICENSE
new file mode 100644
index 0000000..ec7dfe7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/parseurl/LICENSE
@@ -0,0 +1,24 @@
+
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2014 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/parseurl/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/parseurl/README.md
new file mode 100644
index 0000000..f4796eb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/parseurl/README.md
@@ -0,0 +1,120 @@
+# parseurl
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Parse a URL with memoization.
+
+## Install
+
+```bash
+$ npm install parseurl
+```
+
+## API
+
+```js
+var parseurl = require('parseurl')
+```
+
+### parseurl(req)
+
+Parse the URL of the given request object (looks at the `req.url` property)
+and return the result. The result is the same as `url.parse` in Node.js core.
+Calling this function multiple times on the same `req` where `req.url` does
+not change will return a cached parsed object, rather than parsing again.
+
+### parseurl.original(req)
+
+Parse the original URL of the given request object and return the result.
+This works by trying to parse `req.originalUrl` if it is a string, otherwise
+parses `req.url`. The result is the same as `url.parse` in Node.js core.
+Calling this function multiple times on the same `req` where `req.originalUrl`
+does not change will return a cached parsed object, rather than parsing again.
+
+## Benchmark
+
+```bash
+$ npm run-script bench
+
+> parseurl@1.3.1 bench nodejs-parseurl
+> node benchmark/index.js
+
+> node benchmark/fullurl.js
+
+ Parsing URL "http://localhost:8888/foo/bar?user=tj&pet=fluffy"
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 1,290,780 ops/sec ±0.46% (195 runs sampled)
+ nativeurl x 56,401 ops/sec ±0.22% (196 runs sampled)
+ parseurl x 55,231 ops/sec ±0.22% (194 runs sampled)
+
+> node benchmark/pathquery.js
+
+ Parsing URL "/foo/bar?user=tj&pet=fluffy"
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 1,986,668 ops/sec ±0.27% (190 runs sampled)
+ nativeurl x 98,740 ops/sec ±0.21% (195 runs sampled)
+ parseurl x 2,628,171 ops/sec ±0.36% (195 runs sampled)
+
+> node benchmark/samerequest.js
+
+ Parsing URL "/foo/bar?user=tj&pet=fluffy" on same request object
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 2,184,468 ops/sec ±0.40% (194 runs sampled)
+ nativeurl x 99,437 ops/sec ±0.71% (194 runs sampled)
+ parseurl x 10,498,005 ops/sec ±0.61% (186 runs sampled)
+
+> node benchmark/simplepath.js
+
+ Parsing URL "/foo/bar"
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 4,535,825 ops/sec ±0.27% (191 runs sampled)
+ nativeurl x 98,769 ops/sec ±0.54% (191 runs sampled)
+ parseurl x 4,164,865 ops/sec ±0.34% (192 runs sampled)
+
+> node benchmark/slash.js
+
+ Parsing URL "/"
+
+ 1 test completed.
+ 2 tests completed.
+ 3 tests completed.
+
+ fasturl x 4,908,405 ops/sec ±0.42% (191 runs sampled)
+ nativeurl x 100,945 ops/sec ±0.59% (188 runs sampled)
+ parseurl x 4,333,208 ops/sec ±0.27% (194 runs sampled)
+```
+
+## License
+
+ [MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/parseurl.svg
+[npm-url]: https://npmjs.org/package/parseurl
+[node-version-image]: https://img.shields.io/node/v/parseurl.svg
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/pillarjs/parseurl/master.svg
+[travis-url]: https://travis-ci.org/pillarjs/parseurl
+[coveralls-image]: https://img.shields.io/coveralls/pillarjs/parseurl/master.svg
+[coveralls-url]: https://coveralls.io/r/pillarjs/parseurl?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/parseurl.svg
+[downloads-url]: https://npmjs.org/package/parseurl
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/parseurl/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/parseurl/index.js
new file mode 100644
index 0000000..56cc6ec
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/parseurl/index.js
@@ -0,0 +1,138 @@
+/*!
+ * parseurl
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ */
+
+var url = require('url')
+var parse = url.parse
+var Url = url.Url
+
+/**
+ * Pattern for a simple path case.
+ * See: https://github.com/joyent/node/pull/7878
+ */
+
+var simplePathRegExp = /^(\/\/?(?!\/)[^\?#\s]*)(\?[^#\s]*)?$/
+
+/**
+ * Exports.
+ */
+
+module.exports = parseurl
+module.exports.original = originalurl
+
+/**
+ * Parse the `req` url with memoization.
+ *
+ * @param {ServerRequest} req
+ * @return {Object}
+ * @api public
+ */
+
+function parseurl(req) {
+ var url = req.url
+
+ if (url === undefined) {
+ // URL is undefined
+ return undefined
+ }
+
+ var parsed = req._parsedUrl
+
+ if (fresh(url, parsed)) {
+ // Return cached URL parse
+ return parsed
+ }
+
+ // Parse the URL
+ parsed = fastparse(url)
+ parsed._raw = url
+
+ return req._parsedUrl = parsed
+};
+
+/**
+ * Parse the `req` original url with fallback and memoization.
+ *
+ * @param {ServerRequest} req
+ * @return {Object}
+ * @api public
+ */
+
+function originalurl(req) {
+ var url = req.originalUrl
+
+ if (typeof url !== 'string') {
+ // Fallback
+ return parseurl(req)
+ }
+
+ var parsed = req._parsedOriginalUrl
+
+ if (fresh(url, parsed)) {
+ // Return cached URL parse
+ return parsed
+ }
+
+ // Parse the URL
+ parsed = fastparse(url)
+ parsed._raw = url
+
+ return req._parsedOriginalUrl = parsed
+};
+
+/**
+ * Parse the `str` url with fast-path short-cut.
+ *
+ * @param {string} str
+ * @return {Object}
+ * @api private
+ */
+
+function fastparse(str) {
+ // Try fast path regexp
+ // See: https://github.com/joyent/node/pull/7878
+ var simplePath = typeof str === 'string' && simplePathRegExp.exec(str)
+
+ // Construct simple URL
+ if (simplePath) {
+ var pathname = simplePath[1]
+ var search = simplePath[2] || null
+ var url = Url !== undefined
+ ? new Url()
+ : {}
+ url.path = str
+ url.href = str
+ url.pathname = pathname
+ url.search = search
+ url.query = search && search.substr(1)
+
+ return url
+ }
+
+ return parse(str)
+}
+
+/**
+ * Determine if parsed is still fresh for url.
+ *
+ * @param {string} url
+ * @param {object} parsedUrl
+ * @return {boolean}
+ * @api private
+ */
+
+function fresh(url, parsedUrl) {
+ return typeof parsedUrl === 'object'
+ && parsedUrl !== null
+ && (Url === undefined || parsedUrl instanceof Url)
+ && parsedUrl._raw === url
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/parseurl/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/parseurl/package.json
new file mode 100644
index 0000000..da0cfad
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/parseurl/package.json
@@ -0,0 +1,88 @@
+{
+ "name": "parseurl",
+ "description": "parse a url with memoization",
+ "version": "1.3.1",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/pillarjs/parseurl"
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "benchmark": "2.0.0",
+ "beautify-benchmark": "0.2.4",
+ "fast-url-parser": "1.1.3",
+ "istanbul": "0.4.2",
+ "mocha": "~1.21.5"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "README.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "scripts": {
+ "bench": "node benchmark/index.js",
+ "test": "mocha --check-leaks --bail --reporter spec test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec test/"
+ },
+ "gitHead": "6d22d376d75b927ab2b5347ce3a1d6735133dd43",
+ "bugs": {
+ "url": "https://github.com/pillarjs/parseurl/issues"
+ },
+ "homepage": "https://github.com/pillarjs/parseurl",
+ "_id": "parseurl@1.3.1",
+ "_shasum": "c8ab8c9223ba34888aa64a297b28853bec18da56",
+ "_from": "parseurl@>=1.3.1 <1.4.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "mscdex",
+ "email": "mscdex@mscdex.net"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ },
+ {
+ "name": "defunctzombie",
+ "email": "shtylman@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "c8ab8c9223ba34888aa64a297b28853bec18da56",
+ "tarball": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/path-to-regexp/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/path-to-regexp/History.md
new file mode 100644
index 0000000..7f65878
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/path-to-regexp/History.md
@@ -0,0 +1,36 @@
+0.1.7 / 2015-07-28
+==================
+
+ * Fixed regression with escaped round brackets and matching groups.
+
+0.1.6 / 2015-06-19
+==================
+
+ * Replace `index` feature by outputting all parameters, unnamed and named.
+
+0.1.5 / 2015-05-08
+==================
+
+ * Add an index property for position in match result.
+
+0.1.4 / 2015-03-05
+==================
+
+ * Add license information
+
+0.1.3 / 2014-07-06
+==================
+
+ * Better array support
+ * Improved support for trailing slash in non-ending mode
+
+0.1.0 / 2014-03-06
+==================
+
+ * add options.end
+
+0.0.2 / 2013-02-10
+==================
+
+ * Update to match current express
+ * add .license property to component.json
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/path-to-regexp/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/path-to-regexp/LICENSE
new file mode 100644
index 0000000..983fbe8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/path-to-regexp/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/path-to-regexp/Readme.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/path-to-regexp/Readme.md
new file mode 100644
index 0000000..95452a6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/path-to-regexp/Readme.md
@@ -0,0 +1,35 @@
+# Path-to-RegExp
+
+Turn an Express-style path string such as `/user/:name` into a regular expression.
+
+**Note:** This is a legacy branch. You should upgrade to `1.x`.
+
+## Usage
+
+```javascript
+var pathToRegexp = require('path-to-regexp');
+```
+
+### pathToRegexp(path, keys, options)
+
+ - **path** A string in the express format, an array of such strings, or a regular expression
+ - **keys** An array to be populated with the keys present in the url. Once the function completes, this will be an array of strings.
+ - **options**
+ - **options.sensitive** Defaults to false, set this to true to make routes case sensitive
+ - **options.strict** Defaults to false, set this to true to make the trailing slash matter.
+ - **options.end** Defaults to true, set this to false to only match the prefix of the URL.
+
+```javascript
+var keys = [];
+var exp = pathToRegexp('/foo/:bar', keys);
+//keys = ['bar']
+//exp = /^\/foo\/(?:([^\/]+?))\/?$/i
+```
+
+## Live Demo
+
+You can see a live demo of this library in use at [express-route-tester](http://forbeslindesay.github.com/express-route-tester/).
+
+## License
+
+ MIT
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/path-to-regexp/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/path-to-regexp/index.js
new file mode 100644
index 0000000..500d1da
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/path-to-regexp/index.js
@@ -0,0 +1,129 @@
+/**
+ * Expose `pathtoRegexp`.
+ */
+
+module.exports = pathtoRegexp;
+
+/**
+ * Match matching groups in a regular expression.
+ */
+var MATCHING_GROUP_REGEXP = /\((?!\?)/g;
+
+/**
+ * Normalize the given path string,
+ * returning a regular expression.
+ *
+ * An empty array should be passed,
+ * which will contain the placeholder
+ * key names. For example "/user/:id" will
+ * then contain ["id"].
+ *
+ * @param {String|RegExp|Array} path
+ * @param {Array} keys
+ * @param {Object} options
+ * @return {RegExp}
+ * @api private
+ */
+
+function pathtoRegexp(path, keys, options) {
+ options = options || {};
+ keys = keys || [];
+ var strict = options.strict;
+ var end = options.end !== false;
+ var flags = options.sensitive ? '' : 'i';
+ var extraOffset = 0;
+ var keysOffset = keys.length;
+ var i = 0;
+ var name = 0;
+ var m;
+
+ if (path instanceof RegExp) {
+ while (m = MATCHING_GROUP_REGEXP.exec(path.source)) {
+ keys.push({
+ name: name++,
+ optional: false,
+ offset: m.index
+ });
+ }
+
+ return path;
+ }
+
+ if (Array.isArray(path)) {
+ // Map array parts into regexps and return their source. We also pass
+ // the same keys and options instance into every generation to get
+ // consistent matching groups before we join the sources together.
+ path = path.map(function (value) {
+ return pathtoRegexp(value, keys, options).source;
+ });
+
+ return new RegExp('(?:' + path.join('|') + ')', flags);
+ }
+
+ path = ('^' + path + (strict ? '' : path[path.length - 1] === '/' ? '?' : '/?'))
+ .replace(/\/\(/g, '/(?:')
+ .replace(/([\/\.])/g, '\\$1')
+ .replace(/(\\\/)?(\\\.)?:(\w+)(\(.*?\))?(\*)?(\?)?/g, function (match, slash, format, key, capture, star, optional, offset) {
+ slash = slash || '';
+ format = format || '';
+ capture = capture || '([^\\/' + format + ']+?)';
+ optional = optional || '';
+
+ keys.push({
+ name: key,
+ optional: !!optional,
+ offset: offset + extraOffset
+ });
+
+ var result = ''
+ + (optional ? '' : slash)
+ + '(?:'
+ + format + (optional ? slash : '') + capture
+ + (star ? '((?:[\\/' + format + '].+?)?)' : '')
+ + ')'
+ + optional;
+
+ extraOffset += result.length - match.length;
+
+ return result;
+ })
+ .replace(/\*/g, function (star, index) {
+ var len = keys.length
+
+ while (len-- > keysOffset && keys[len].offset > index) {
+ keys[len].offset += 3; // Replacement length minus asterisk length.
+ }
+
+ return '(.*)';
+ });
+
+ // This is a workaround for handling unnamed matching groups.
+ while (m = MATCHING_GROUP_REGEXP.exec(path)) {
+ var escapeCount = 0;
+ var index = m.index;
+
+ while (path.charAt(--index) === '\\') {
+ escapeCount++;
+ }
+
+ // It's possible to escape the bracket.
+ if (escapeCount % 2 === 1) {
+ continue;
+ }
+
+ if (keysOffset + i === keys.length || keys[keysOffset + i].offset > m.index) {
+ keys.splice(keysOffset + i, 0, {
+ name: name++, // Unnamed matching groups must be consistently linear.
+ optional: false,
+ offset: m.index
+ });
+ }
+
+ i++;
+ }
+
+ // If the path is non-ending, match until the end or a slash.
+ path += (end ? '$' : (path[path.length - 1] === '/' ? '' : '(?=\\/|$)'));
+
+ return new RegExp(path, flags);
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/path-to-regexp/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/path-to-regexp/package.json
new file mode 100644
index 0000000..2caf4f9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/path-to-regexp/package.json
@@ -0,0 +1,184 @@
+{
+ "name": "path-to-regexp",
+ "description": "Express style path to RegExp utility",
+ "version": "0.1.7",
+ "files": [
+ "index.js",
+ "LICENSE"
+ ],
+ "scripts": {
+ "test": "istanbul cover _mocha -- -R spec"
+ },
+ "keywords": [
+ "express",
+ "regexp"
+ ],
+ "component": {
+ "scripts": {
+ "path-to-regexp": "index.js"
+ }
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/component/path-to-regexp.git"
+ },
+ "devDependencies": {
+ "mocha": "^1.17.1",
+ "istanbul": "^0.2.6"
+ },
+ "gitHead": "039118d6c3c186d3f176c73935ca887a32a33d93",
+ "bugs": {
+ "url": "https://github.com/component/path-to-regexp/issues"
+ },
+ "homepage": "https://github.com/component/path-to-regexp#readme",
+ "_id": "path-to-regexp@0.1.7",
+ "_shasum": "df604178005f522f15eb4490e7247a1bfaa67f8c",
+ "_from": "path-to-regexp@0.1.7",
+ "_npmVersion": "2.13.2",
+ "_nodeVersion": "2.3.3",
+ "_npmUser": {
+ "name": "blakeembrey",
+ "email": "hello@blakeembrey.com"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "hughsk",
+ "email": "hughskennedy@gmail.com"
+ },
+ {
+ "name": "timaschew",
+ "email": "timaschew@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dominicbarnes",
+ "email": "dominic@dbarnes.info"
+ },
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ },
+ {
+ "name": "rauchg",
+ "email": "rauchg@gmail.com"
+ },
+ {
+ "name": "retrofox",
+ "email": "rdsuarez@gmail.com"
+ },
+ {
+ "name": "coreh",
+ "email": "thecoreh@gmail.com"
+ },
+ {
+ "name": "forbeslindesay",
+ "email": "forbes@lindesay.co.uk"
+ },
+ {
+ "name": "kelonye",
+ "email": "kelonyemitchel@gmail.com"
+ },
+ {
+ "name": "mattmueller",
+ "email": "mattmuelle@gmail.com"
+ },
+ {
+ "name": "yields",
+ "email": "yields@icloud.com"
+ },
+ {
+ "name": "anthonyshort",
+ "email": "antshort@gmail.com"
+ },
+ {
+ "name": "ianstormtaylor",
+ "email": "ian@ianstormtaylor.com"
+ },
+ {
+ "name": "cristiandouce",
+ "email": "cristian@gravityonmars.com"
+ },
+ {
+ "name": "swatinem",
+ "email": "arpad.borsos@googlemail.com"
+ },
+ {
+ "name": "stagas",
+ "email": "gstagas@gmail.com"
+ },
+ {
+ "name": "amasad",
+ "email": "amjad.masad@gmail.com"
+ },
+ {
+ "name": "juliangruber",
+ "email": "julian@juliangruber.com"
+ },
+ {
+ "name": "calvinfo",
+ "email": "calvin@calv.info"
+ },
+ {
+ "name": "blakeembrey",
+ "email": "hello@blakeembrey.com"
+ },
+ {
+ "name": "timoxley",
+ "email": "secoif@gmail.com"
+ },
+ {
+ "name": "jonathanong",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "queckezz",
+ "email": "fabian.eichenberger@gmail.com"
+ },
+ {
+ "name": "nami-doc",
+ "email": "vendethiel@hotmail.fr"
+ },
+ {
+ "name": "clintwood",
+ "email": "clint@anotherway.co.za"
+ },
+ {
+ "name": "thehydroimpulse",
+ "email": "dnfagnan@gmail.com"
+ },
+ {
+ "name": "stephenmathieson",
+ "email": "me@stephenmathieson.com"
+ },
+ {
+ "name": "trevorgerhardt",
+ "email": "trevorgerhardt@gmail.com"
+ },
+ {
+ "name": "dfcreative",
+ "email": "df.creative@gmail.com"
+ },
+ {
+ "name": "defunctzombie",
+ "email": "shtylman@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "df604178005f522f15eb4490e7247a1bfaa67f8c",
+ "tarball": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/HISTORY.md
new file mode 100644
index 0000000..a7389db
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/HISTORY.md
@@ -0,0 +1,99 @@
+1.1.2 / 2016-05-29
+==================
+
+ * deps: ipaddr.js@1.1.1
+ - Fix IPv6-mapped IPv4 validation edge cases
+
+1.1.1 / 2016-05-03
+==================
+
+ * Fix regression matching mixed versions against multiple subnets
+
+1.1.0 / 2016-05-01
+==================
+
+ * Fix accepting various invalid netmasks
+ - IPv4 netmasks must be contingous
+ - IPv6 addresses cannot be used as a netmask
+ * deps: ipaddr.js@1.1.0
+
+1.0.10 / 2015-12-09
+===================
+
+ * deps: ipaddr.js@1.0.5
+ - Fix regression in `isValid` with non-string arguments
+
+1.0.9 / 2015-12-01
+==================
+
+ * deps: ipaddr.js@1.0.4
+ - Fix accepting some invalid IPv6 addresses
+ - Reject CIDRs with negative or overlong masks
+ * perf: enable strict mode
+
+1.0.8 / 2015-05-10
+==================
+
+ * deps: ipaddr.js@1.0.1
+
+1.0.7 / 2015-03-16
+==================
+
+ * deps: ipaddr.js@0.1.9
+ - Fix OOM on certain inputs to `isValid`
+
+1.0.6 / 2015-02-01
+==================
+
+ * deps: ipaddr.js@0.1.8
+
+1.0.5 / 2015-01-08
+==================
+
+ * deps: ipaddr.js@0.1.6
+
+1.0.4 / 2014-11-23
+==================
+
+ * deps: ipaddr.js@0.1.5
+ - Fix edge cases with `isValid`
+
+1.0.3 / 2014-09-21
+==================
+
+ * Use `forwarded` npm module
+
+1.0.2 / 2014-09-18
+==================
+
+ * Fix a global leak when multiple subnets are trusted
+ * Support Node.js 0.6
+ * deps: ipaddr.js@0.1.3
+
+1.0.1 / 2014-06-03
+==================
+
+ * Fix links in npm package
+
+1.0.0 / 2014-05-08
+==================
+
+ * Add `trust` argument to determine proxy trust on
+ * Accepts custom function
+ * Accepts IPv4/IPv6 address(es)
+ * Accepts subnets
+ * Accepts pre-defined names
+ * Add optional `trust` argument to `proxyaddr.all` to
+ stop at first untrusted
+ * Add `proxyaddr.compile` to pre-compile `trust` function
+ to make subsequent calls faster
+
+0.0.1 / 2014-05-04
+==================
+
+ * Fix bad npm publish
+
+0.0.0 / 2014-05-04
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/LICENSE
new file mode 100644
index 0000000..cab251c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014-2016 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/README.md
new file mode 100644
index 0000000..1bffc76
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/README.md
@@ -0,0 +1,136 @@
+# proxy-addr
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Determine address of proxied request
+
+## Install
+
+```sh
+$ npm install proxy-addr
+```
+
+## API
+
+```js
+var proxyaddr = require('proxy-addr')
+```
+
+### proxyaddr(req, trust)
+
+Return the address of the request, using the given `trust` parameter.
+
+The `trust` argument is a function that returns `true` if you trust
+the address, `false` if you don't. The closest untrusted address is
+returned.
+
+```js
+proxyaddr(req, function(addr){ return addr === '127.0.0.1' })
+proxyaddr(req, function(addr, i){ return i < 1 })
+```
+
+The `trust` arugment may also be a single IP address string or an
+array of trusted addresses, as plain IP addresses, CIDR-formatted
+strings, or IP/netmask strings.
+
+```js
+proxyaddr(req, '127.0.0.1')
+proxyaddr(req, ['127.0.0.0/8', '10.0.0.0/8'])
+proxyaddr(req, ['127.0.0.0/255.0.0.0', '192.168.0.0/255.255.0.0'])
+```
+
+This module also supports IPv6. Your IPv6 addresses will be normalized
+automatically (i.e. `fe80::00ed:1` equals `fe80:0:0:0:0:0:ed:1`).
+
+```js
+proxyaddr(req, '::1')
+proxyaddr(req, ['::1/128', 'fe80::/10'])
+```
+
+This module will automatically work with IPv4-mapped IPv6 addresses
+as well to support node.js in IPv6-only mode. This means that you do
+not have to specify both `::ffff:a00:1` and `10.0.0.1`.
+
+As a convenience, this module also takes certain pre-defined names
+in addition to IP addresses, which expand into IP addresses:
+
+```js
+proxyaddr(req, 'loopback')
+proxyaddr(req, ['loopback', 'fc00:ac:1ab5:fff::1/64'])
+```
+
+ * `loopback`: IPv4 and IPv6 loopback addresses (like `::1` and
+ `127.0.0.1`).
+ * `linklocal`: IPv4 and IPv6 link-local addresses (like
+ `fe80::1:1:1:1` and `169.254.0.1`).
+ * `uniquelocal`: IPv4 private addresses and IPv6 unique-local
+ addresses (like `fc00:ac:1ab5:fff::1` and `192.168.0.1`).
+
+When `trust` is specified as a function, it will be called for each
+address to determine if it is a trusted address. The function is
+given two arguments: `addr` and `i`, where `addr` is a string of
+the address to check and `i` is a number that represents the distance
+from the socket address.
+
+### proxyaddr.all(req, [trust])
+
+Return all the addresses of the request, optionally stopping at the
+first untrusted. This array is ordered from closest to furthest
+(i.e. `arr[0] === req.connection.remoteAddress`).
+
+```js
+proxyaddr.all(req)
+```
+
+The optional `trust` argument takes the same arguments as `trust`
+does in `proxyaddr(req, trust)`.
+
+```js
+proxyaddr.all(req, 'loopback')
+```
+
+### proxyaddr.compile(val)
+
+Compiles argument `val` into a `trust` function. This function takes
+the same arguments as `trust` does in `proxyaddr(req, trust)` and
+returns a function suitable for `proxyaddr(req, trust)`.
+
+```js
+var trust = proxyaddr.compile('localhost')
+var addr = proxyaddr(req, trust)
+```
+
+This function is meant to be optimized for use against every request.
+It is recommend to compile a trust function up-front for the trusted
+configuration and pass that to `proxyaddr(req, trust)` for each request.
+
+## Testing
+
+```sh
+$ npm test
+```
+
+## Benchmarks
+
+```sh
+$ npm run-script bench
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/proxy-addr.svg
+[npm-url]: https://npmjs.org/package/proxy-addr
+[node-version-image]: https://img.shields.io/node/v/proxy-addr.svg
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/proxy-addr/master.svg
+[travis-url]: https://travis-ci.org/jshttp/proxy-addr
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/proxy-addr/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/proxy-addr?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/proxy-addr.svg
+[downloads-url]: https://npmjs.org/package/proxy-addr
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/index.js
new file mode 100644
index 0000000..0b3cf0b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/index.js
@@ -0,0 +1,321 @@
+/*!
+ * proxy-addr
+ * Copyright(c) 2014-2016 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ */
+
+module.exports = proxyaddr;
+module.exports.all = alladdrs;
+module.exports.compile = compile;
+
+/**
+ * Module dependencies.
+ */
+
+var forwarded = require('forwarded');
+var ipaddr = require('ipaddr.js');
+
+/**
+ * Variables.
+ */
+
+var digitre = /^[0-9]+$/;
+var isip = ipaddr.isValid;
+var parseip = ipaddr.parse;
+
+/**
+ * Pre-defined IP ranges.
+ */
+
+var ipranges = {
+ linklocal: ['169.254.0.0/16', 'fe80::/10'],
+ loopback: ['127.0.0.1/8', '::1/128'],
+ uniquelocal: ['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16', 'fc00::/7']
+};
+
+/**
+ * Get all addresses in the request, optionally stopping
+ * at the first untrusted.
+ *
+ * @param {Object} request
+ * @param {Function|Array|String} [trust]
+ * @api public
+ */
+
+function alladdrs(req, trust) {
+ // get addresses
+ var addrs = forwarded(req);
+
+ if (!trust) {
+ // Return all addresses
+ return addrs;
+ }
+
+ if (typeof trust !== 'function') {
+ trust = compile(trust);
+ }
+
+ for (var i = 0; i < addrs.length - 1; i++) {
+ if (trust(addrs[i], i)) continue;
+
+ addrs.length = i + 1;
+ }
+
+ return addrs;
+}
+
+/**
+ * Compile argument into trust function.
+ *
+ * @param {Array|String} val
+ * @api private
+ */
+
+function compile(val) {
+ if (!val) {
+ throw new TypeError('argument is required');
+ }
+
+ var trust = typeof val === 'string'
+ ? [val]
+ : val;
+
+ if (!Array.isArray(trust)) {
+ throw new TypeError('unsupported trust argument');
+ }
+
+ for (var i = 0; i < trust.length; i++) {
+ val = trust[i];
+
+ if (!ipranges.hasOwnProperty(val)) {
+ continue;
+ }
+
+ // Splice in pre-defined range
+ val = ipranges[val];
+ trust.splice.apply(trust, [i, 1].concat(val));
+ i += val.length - 1;
+ }
+
+ return compileTrust(compileRangeSubnets(trust));
+}
+
+/**
+ * Compile `arr` elements into range subnets.
+ *
+ * @param {Array} arr
+ * @api private
+ */
+
+function compileRangeSubnets(arr) {
+ var rangeSubnets = new Array(arr.length);
+
+ for (var i = 0; i < arr.length; i++) {
+ rangeSubnets[i] = parseipNotation(arr[i]);
+ }
+
+ return rangeSubnets;
+}
+
+/**
+ * Compile range subnet array into trust function.
+ *
+ * @param {Array} rangeSubnets
+ * @api private
+ */
+
+function compileTrust(rangeSubnets) {
+ // Return optimized function based on length
+ var len = rangeSubnets.length;
+ return len === 0
+ ? trustNone
+ : len === 1
+ ? trustSingle(rangeSubnets[0])
+ : trustMulti(rangeSubnets);
+}
+
+/**
+ * Parse IP notation string into range subnet.
+ *
+ * @param {String} note
+ * @api private
+ */
+
+function parseipNotation(note) {
+ var pos = note.lastIndexOf('/');
+ var str = pos !== -1
+ ? note.substring(0, pos)
+ : note;
+
+ if (!isip(str)) {
+ throw new TypeError('invalid IP address: ' + str);
+ }
+
+ var ip = parseip(str);
+
+ if (pos === -1 && ip.kind() === 'ipv6' && ip.isIPv4MappedAddress()) {
+ // Store as IPv4
+ ip = ip.toIPv4Address();
+ }
+
+ var max = ip.kind() === 'ipv6'
+ ? 128
+ : 32;
+
+ var range = pos !== -1
+ ? note.substring(pos + 1, note.length)
+ : null;
+
+ if (range === null) {
+ range = max;
+ } else if (digitre.test(range)) {
+ range = parseInt(range, 10);
+ } else if (ip.kind() === 'ipv4' && isip(range)) {
+ range = parseNetmask(range);
+ } else {
+ range = null;
+ }
+
+ if (range <= 0 || range > max) {
+ throw new TypeError('invalid range on address: ' + note);
+ }
+
+ return [ip, range];
+}
+
+/**
+ * Parse netmask string into CIDR range.
+ *
+ * @param {String} netmask
+ * @api private
+ */
+
+function parseNetmask(netmask) {
+ var ip = parseip(netmask);
+ var kind = ip.kind();
+
+ return kind === 'ipv4'
+ ? ip.prefixLengthFromSubnetMask()
+ : null;
+}
+
+/**
+ * Determine address of proxied request.
+ *
+ * @param {Object} request
+ * @param {Function|Array|String} trust
+ * @api public
+ */
+
+function proxyaddr(req, trust) {
+ if (!req) {
+ throw new TypeError('req argument is required');
+ }
+
+ if (!trust) {
+ throw new TypeError('trust argument is required');
+ }
+
+ var addrs = alladdrs(req, trust);
+ var addr = addrs[addrs.length - 1];
+
+ return addr;
+}
+
+/**
+ * Static trust function to trust nothing.
+ *
+ * @api private
+ */
+
+function trustNone() {
+ return false;
+}
+
+/**
+ * Compile trust function for multiple subnets.
+ *
+ * @param {Array} subnets
+ * @api private
+ */
+
+function trustMulti(subnets) {
+ return function trust(addr) {
+ if (!isip(addr)) return false;
+
+ var ip = parseip(addr);
+ var ipconv;
+ var kind = ip.kind();
+
+ for (var i = 0; i < subnets.length; i++) {
+ var subnet = subnets[i];
+ var subnetip = subnet[0];
+ var subnetkind = subnetip.kind();
+ var subnetrange = subnet[1];
+ var trusted = ip;
+
+ if (kind !== subnetkind) {
+ if (subnetkind === 'ipv4' && !ip.isIPv4MappedAddress()) {
+ // Incompatible IP addresses
+ continue;
+ }
+
+ if (!ipconv) {
+ // Convert IP to match subnet IP kind
+ ipconv = subnetkind === 'ipv4'
+ ? ip.toIPv4Address()
+ : ip.toIPv4MappedAddress();
+ }
+
+ trusted = ipconv;
+ }
+
+ if (trusted.match(subnetip, subnetrange)) {
+ return true;
+ }
+ }
+
+ return false;
+ };
+}
+
+/**
+ * Compile trust function for single subnet.
+ *
+ * @param {Object} subnet
+ * @api private
+ */
+
+function trustSingle(subnet) {
+ var subnetip = subnet[0];
+ var subnetkind = subnetip.kind();
+ var subnetisipv4 = subnetkind === 'ipv4';
+ var subnetrange = subnet[1];
+
+ return function trust(addr) {
+ if (!isip(addr)) return false;
+
+ var ip = parseip(addr);
+ var kind = ip.kind();
+
+ if (kind !== subnetkind) {
+ if (subnetisipv4 && !ip.isIPv4MappedAddress()) {
+ // Incompatible IP addresses
+ return false;
+ }
+
+ // Convert IP to match subnet IP kind
+ ip = subnetisipv4
+ ? ip.toIPv4Address()
+ : ip.toIPv4MappedAddress();
+ }
+
+ return ip.match(subnetip, subnetrange);
+ };
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/HISTORY.md
new file mode 100644
index 0000000..97fa1d1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/HISTORY.md
@@ -0,0 +1,4 @@
+0.1.0 / 2014-09-21
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/LICENSE
new file mode 100644
index 0000000..b7dce6c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/README.md
new file mode 100644
index 0000000..2b4988f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/README.md
@@ -0,0 +1,53 @@
+# forwarded
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Parse HTTP X-Forwarded-For header
+
+## Installation
+
+```sh
+$ npm install forwarded
+```
+
+## API
+
+```js
+var forwarded = require('forwarded')
+```
+
+### forwarded(req)
+
+```js
+var addresses = forwarded(req)
+```
+
+Parse the `X-Forwarded-For` header from the request. Returns an array
+of the addresses, including the socket address for the `req`. In reverse
+order (i.e. index `0` is the socket address and the last index is the
+furthest address, typically the end-user).
+
+## Testing
+
+```sh
+$ npm test
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/forwarded.svg?style=flat
+[npm-url]: https://npmjs.org/package/forwarded
+[node-version-image]: https://img.shields.io/node/v/forwarded.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/forwarded.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/forwarded
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/forwarded.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/forwarded?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/forwarded.svg?style=flat
+[downloads-url]: https://npmjs.org/package/forwarded
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/index.js
new file mode 100644
index 0000000..2f5c340
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/index.js
@@ -0,0 +1,35 @@
+/*!
+ * forwarded
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = forwarded
+
+/**
+ * Get all addresses in the request, using the `X-Forwarded-For` header.
+ *
+ * @param {Object} req
+ * @api public
+ */
+
+function forwarded(req) {
+ if (!req) {
+ throw new TypeError('argument req is required')
+ }
+
+ // simple header parsing
+ var proxyAddrs = (req.headers['x-forwarded-for'] || '')
+ .split(/ *, */)
+ .filter(Boolean)
+ .reverse()
+ var socketAddr = req.connection.remoteAddress
+ var addrs = [socketAddr].concat(proxyAddrs)
+
+ // return all addresses
+ return addrs
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/package.json
new file mode 100644
index 0000000..336f528
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/package.json
@@ -0,0 +1,64 @@
+{
+ "name": "forwarded",
+ "description": "Parse HTTP X-Forwarded-For header",
+ "version": "0.1.0",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "x-forwarded-for",
+ "http",
+ "req"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/forwarded"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.2",
+ "mocha": "~1.21.4"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "README.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "e9a9faeb3cfaadf40eb57d144fff26bca9b818e8",
+ "bugs": {
+ "url": "https://github.com/jshttp/forwarded/issues"
+ },
+ "homepage": "https://github.com/jshttp/forwarded",
+ "_id": "forwarded@0.1.0",
+ "_shasum": "19ef9874c4ae1c297bcf078fde63a09b66a84363",
+ "_from": "forwarded@>=0.1.0 <0.2.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "19ef9874c4ae1c297bcf078fde63a09b66a84363",
+ "tarball": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/.npmignore
new file mode 100644
index 0000000..7a1537b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/.npmignore
@@ -0,0 +1,2 @@
+.idea
+node_modules
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/.travis.yml b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/.travis.yml
new file mode 100644
index 0000000..aa3d14a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/.travis.yml
@@ -0,0 +1,10 @@
+language: node_js
+
+node_js:
+ - "0.10"
+ - "0.11"
+ - "0.12"
+ - "4.0"
+ - "4.1"
+ - "4.2"
+ - "5"
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/Cakefile b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/Cakefile
new file mode 100644
index 0000000..7fd355a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/Cakefile
@@ -0,0 +1,18 @@
+fs = require 'fs'
+CoffeeScript = require 'coffee-script'
+nodeunit = require 'nodeunit'
+UglifyJS = require 'uglify-js'
+
+task 'build', 'build the JavaScript files from CoffeeScript source', build = (cb) ->
+ source = fs.readFileSync 'src/ipaddr.coffee'
+ fs.writeFileSync 'lib/ipaddr.js', CoffeeScript.compile source.toString()
+
+ invoke 'test'
+ invoke 'compress'
+
+task 'test', 'run the bundled tests', (cb) ->
+ nodeunit.reporters.default.run ['test']
+
+task 'compress', 'uglify the resulting javascript', (cb) ->
+ result = UglifyJS.minify('lib/ipaddr.js')
+ fs.writeFileSync('ipaddr.min.js', result.code)
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/LICENSE
new file mode 100644
index 0000000..3493f0d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/LICENSE
@@ -0,0 +1,19 @@
+Copyright (C) 2011 Peter Zotov <whitequark@whitequark.org>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE. \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/README.md
new file mode 100644
index 0000000..bfcb1c9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/README.md
@@ -0,0 +1,209 @@
+# ipaddr.js — an IPv6 and IPv4 address manipulation library [![Build Status](https://travis-ci.org/whitequark/ipaddr.js.svg)](https://travis-ci.org/whitequark/ipaddr.js)
+
+ipaddr.js is a small (1.9K minified and gzipped) library for manipulating
+IP addresses in JavaScript environments. It runs on both CommonJS runtimes
+(e.g. [nodejs]) and in a web browser.
+
+ipaddr.js allows you to verify and parse string representation of an IP
+address, match it against a CIDR range or range list, determine if it falls
+into some reserved ranges (examples include loopback and private ranges),
+and convert between IPv4 and IPv4-mapped IPv6 addresses.
+
+[nodejs]: http://nodejs.org
+
+## Installation
+
+`npm install ipaddr.js`
+
+or
+
+`bower install ipaddr.js`
+
+## API
+
+ipaddr.js defines one object in the global scope: `ipaddr`. In CommonJS,
+it is exported from the module:
+
+```js
+var ipaddr = require('ipaddr.js');
+```
+
+The API consists of several global methods and two classes: ipaddr.IPv6 and ipaddr.IPv4.
+
+### Global methods
+
+There are three global methods defined: `ipaddr.isValid`, `ipaddr.parse` and
+`ipaddr.process`. All of them receive a string as a single parameter.
+
+The `ipaddr.isValid` method returns `true` if the address is a valid IPv4 or
+IPv6 address, and `false` otherwise. It does not throw any exceptions.
+
+The `ipaddr.parse` method returns an object representing the IP address,
+or throws an `Error` if the passed string is not a valid representation of an
+IP address.
+
+The `ipaddr.process` method works just like the `ipaddr.parse` one, but it
+automatically converts IPv4-mapped IPv6 addresses to their IPv4 couterparts
+before returning. It is useful when you have a Node.js instance listening
+on an IPv6 socket, and the `net.ivp6.bindv6only` sysctl parameter (or its
+equivalent on non-Linux OS) is set to 0. In this case, you can accept IPv4
+connections on your IPv6-only socket, but the remote address will be mangled.
+Use `ipaddr.process` method to automatically demangle it.
+
+### Object representation
+
+Parsing methods return an object which descends from `ipaddr.IPv6` or
+`ipaddr.IPv4`. These objects share some properties, but most of them differ.
+
+#### Shared properties
+
+One can determine the type of address by calling `addr.kind()`. It will return
+either `"ipv6"` or `"ipv4"`.
+
+An address can be converted back to its string representation with `addr.toString()`.
+Note that this method:
+ * does not return the original string used to create the object (in fact, there is
+ no way of getting that string)
+ * returns a compact representation (when it is applicable)
+
+A `match(range, bits)` method can be used to check if the address falls into a
+certain CIDR range.
+Note that an address can be (obviously) matched only against an address of the same type.
+
+For example:
+
+```js
+var addr = ipaddr.parse("2001:db8:1234::1");
+var range = ipaddr.parse("2001:db8::");
+
+addr.match(range, 32); // => true
+```
+
+Alternatively, `match` can also be called as `match([range, bits])`. In this way,
+it can be used together with the `parseCIDR(string)` method, which parses an IP
+address together with a CIDR range.
+
+For example:
+
+```js
+var addr = ipaddr.parse("2001:db8:1234::1");
+
+addr.match(ipaddr.parseCIDR("2001:db8::/32")); // => true
+```
+
+A `range()` method returns one of predefined names for several special ranges defined
+by IP protocols. The exact names (and their respective CIDR ranges) can be looked up
+in the source: [IPv6 ranges] and [IPv4 ranges]. Some common ones include `"unicast"`
+(the default one) and `"reserved"`.
+
+You can match against your own range list by using
+`ipaddr.subnetMatch(address, rangeList, defaultName)` method. It can work with both
+IPv6 and IPv4 addresses, and accepts a name-to-subnet map as the range list. For example:
+
+```js
+var rangeList = {
+ documentationOnly: [ ipaddr.parse('2001:db8::'), 32 ],
+ tunnelProviders: [
+ [ ipaddr.parse('2001:470::'), 32 ], // he.net
+ [ ipaddr.parse('2001:5c0::'), 32 ] // freenet6
+ ]
+};
+ipaddr.subnetMatch(ipaddr.parse('2001:470:8:66::1'), rangeList, 'unknown'); // => "he.net"
+```
+
+The addresses can be converted to their byte representation with `toByteArray()`.
+(Actually, JavaScript mostly does not know about byte buffers. They are emulated with
+arrays of numbers, each in range of 0..255.)
+
+```js
+var bytes = ipaddr.parse('2a00:1450:8007::68').toByteArray(); // ipv6.google.com
+bytes // => [42, 0x00, 0x14, 0x50, 0x80, 0x07, 0x00, <zeroes...>, 0x00, 0x68 ]
+```
+
+The `ipaddr.IPv4` and `ipaddr.IPv6` objects have some methods defined, too. All of them
+have the same interface for both protocols, and are similar to global methods.
+
+`ipaddr.IPvX.isValid(string)` can be used to check if the string is a valid address
+for particular protocol, and `ipaddr.IPvX.parse(string)` is the error-throwing parser.
+
+[IPv6 ranges]: https://github.com/whitequark/ipaddr.js/blob/master/src/ipaddr.coffee#L186
+[IPv4 ranges]: https://github.com/whitequark/ipaddr.js/blob/master/src/ipaddr.coffee#L71
+
+#### IPv6 properties
+
+Sometimes you will want to convert IPv6 not to a compact string representation (with
+the `::` substitution); the `toNormalizedString()` method will return an address where
+all zeroes are explicit.
+
+For example:
+
+```js
+var addr = ipaddr.parse("2001:0db8::0001");
+addr.toString(); // => "2001:db8::1"
+addr.toNormalizedString(); // => "2001:db8:0:0:0:0:0:1"
+```
+
+The `isIPv4MappedAddress()` method will return `true` if this address is an IPv4-mapped
+one, and `toIPv4Address()` will return an IPv4 object address.
+
+To access the underlying binary representation of the address, use `addr.parts`.
+
+```js
+var addr = ipaddr.parse("2001:db8:10::1234:DEAD");
+addr.parts // => [0x2001, 0xdb8, 0x10, 0, 0, 0, 0x1234, 0xdead]
+```
+
+#### IPv4 properties
+
+`toIPv4MappedAddress()` will return a corresponding IPv4-mapped IPv6 address.
+
+To access the underlying representation of the address, use `addr.octets`.
+
+```js
+var addr = ipaddr.parse("192.168.1.1");
+addr.octets // => [192, 168, 1, 1]
+```
+
+`prefixLengthFromSubnetMask()` will return a CIDR prefix length for a valid IPv4 netmask or
+false if the netmask is not valid.
+
+```js
+ipaddr.IPv4.parse('255.255.255.240').prefixLengthFromSubnetMask() == 28
+ipaddr.IPv4.parse('255.192.164.0').prefixLengthFromSubnetMask() == null
+```
+
+#### Conversion
+
+IPv4 and IPv6 can be converted bidirectionally to and from network byte order (MSB) byte arrays.
+
+The `fromByteArray()` method will take an array and create an appropriate IPv4 or IPv6 object
+if the input satisfies the requirements. For IPv4 it has to be an array of four 8-bit values,
+while for IPv6 it has to be an array of sixteen 8-bit values.
+
+For example:
+```js
+var addr = ipaddr.fromByteArray([0x7f, 0, 0, 1]);
+addr.toString(); // => "127.0.0.1"
+```
+
+or
+
+```js
+var addr = ipaddr.fromByteArray([0x20, 1, 0xd, 0xb8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1])
+addr.toString(); // => "2001:db8::1"
+```
+
+Both objects also offer a `toByteArray()` method, which returns an array in network byte order (MSB).
+
+For example:
+```js
+var addr = ipaddr.parse("127.0.0.1");
+addr.toByteArray(); // => [0x7f, 0, 0, 1]
+```
+
+or
+
+```js
+var addr = ipaddr.parse("2001:db8::1");
+addr.toByteArray(); // => [0x20, 1, 0xd, 0xb8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
+```
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/bower.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/bower.json
new file mode 100644
index 0000000..e494f97
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/bower.json
@@ -0,0 +1,29 @@
+{
+ "name": "ipaddr.js",
+ "version": "1.1.1",
+ "homepage": "https://github.com/whitequark/ipaddr.js",
+ "authors": [
+ "whitequark <whitequark@whitequark.org>"
+ ],
+ "description": "IP address manipulation library in JavaScript (CoffeeScript, actually)",
+ "main": "lib/ipaddr.js",
+ "moduleType": [
+ "globals",
+ "node"
+ ],
+ "keywords": [
+ "javscript",
+ "ip",
+ "address",
+ "ipv4",
+ "ipv6"
+ ],
+ "license": "MIT",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ]
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/ipaddr.min.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/ipaddr.min.js
new file mode 100644
index 0000000..ffa32ff
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/ipaddr.min.js
@@ -0,0 +1 @@
+(function(){var r,t,n,e,i,o,a,s;t={},s=this,"undefined"!=typeof module&&null!==module&&module.exports?module.exports=t:s.ipaddr=t,a=function(r,t,n,e){var i,o;if(r.length!==t.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");for(i=0;e>0;){if(o=n-e,0>o&&(o=0),r[i]>>o!==t[i]>>o)return!1;e-=n,i+=1}return!0},t.subnetMatch=function(r,t,n){var e,i,o,a,s;null==n&&(n="unicast");for(e in t)for(i=t[e],!i[0]||i[0]instanceof Array||(i=[i]),a=0,s=i.length;s>a;a++)if(o=i[a],r.match.apply(r,o))return e;return n},t.IPv4=function(){function r(r){var t,n,e;if(4!==r.length)throw new Error("ipaddr: ipv4 octet count should be 4");for(n=0,e=r.length;e>n;n++)if(t=r[n],!(t>=0&&255>=t))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=r}return r.prototype.kind=function(){return"ipv4"},r.prototype.toString=function(){return this.octets.join(".")},r.prototype.toByteArray=function(){return this.octets.slice(0)},r.prototype.match=function(r,t){var n;if(void 0===t&&(n=r,r=n[0],t=n[1]),"ipv4"!==r.kind())throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return a(this.octets,r.octets,8,t)},r.prototype.SpecialRanges={unspecified:[[new r([0,0,0,0]),8]],broadcast:[[new r([255,255,255,255]),32]],multicast:[[new r([224,0,0,0]),4]],linkLocal:[[new r([169,254,0,0]),16]],loopback:[[new r([127,0,0,0]),8]],"private":[[new r([10,0,0,0]),8],[new r([172,16,0,0]),12],[new r([192,168,0,0]),16]],reserved:[[new r([192,0,0,0]),24],[new r([192,0,2,0]),24],[new r([192,88,99,0]),24],[new r([198,51,100,0]),24],[new r([203,0,113,0]),24],[new r([240,0,0,0]),4]]},r.prototype.range=function(){return t.subnetMatch(this,this.SpecialRanges)},r.prototype.toIPv4MappedAddress=function(){return t.IPv6.parse("::ffff:"+this.toString())},r.prototype.prefixLengthFromSubnetMask=function(){var r,t,n,e,i,o,a;for(o={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},r=0,e=!1,t=a=3;a>=0;t=a+=-1){if(n=this.octets[t],!(n in o))return null;if(i=o[n],e&&0!==i)return null;8!==i&&(e=!0),r+=i}return 32-r},r}(),n="(0?\\d+|0x[a-f0-9]+)",e={fourOctet:new RegExp("^"+n+"\\."+n+"\\."+n+"\\."+n+"$","i"),longValue:new RegExp("^"+n+"$","i")},t.IPv4.parser=function(r){var t,n,i,o,a;if(n=function(r){return"0"===r[0]&&"x"!==r[1]?parseInt(r,8):parseInt(r)},t=r.match(e.fourOctet))return function(){var r,e,o,a;for(o=t.slice(1,6),a=[],r=0,e=o.length;e>r;r++)i=o[r],a.push(n(i));return a}();if(t=r.match(e.longValue)){if(a=n(t[1]),a>4294967295||0>a)throw new Error("ipaddr: address outside defined range");return function(){var r,t;for(t=[],o=r=0;24>=r;o=r+=8)t.push(a>>o&255);return t}().reverse()}return null},t.IPv6=function(){function r(r){var t,n,e,i,o,a;if(16===r.length)for(this.parts=[],t=e=0;14>=e;t=e+=2)this.parts.push(r[t]<<8|r[t+1]);else{if(8!==r.length)throw new Error("ipaddr: ipv6 part count should be 8 or 16");this.parts=r}for(a=this.parts,i=0,o=a.length;o>i;i++)if(n=a[i],!(n>=0&&65535>=n))throw new Error("ipaddr: ipv6 part should fit in 16 bits")}return r.prototype.kind=function(){return"ipv6"},r.prototype.toString=function(){var r,t,n,e,i,o,a;for(i=function(){var r,n,e,i;for(e=this.parts,i=[],r=0,n=e.length;n>r;r++)t=e[r],i.push(t.toString(16));return i}.call(this),r=[],n=function(t){return r.push(t)},e=0,o=0,a=i.length;a>o;o++)switch(t=i[o],e){case 0:n("0"===t?"":t),e=1;break;case 1:"0"===t?e=2:n(t);break;case 2:"0"!==t&&(n(""),n(t),e=3);break;case 3:n(t)}return 2===e&&(n(""),n("")),r.join(":")},r.prototype.toByteArray=function(){var r,t,n,e,i;for(r=[],i=this.parts,n=0,e=i.length;e>n;n++)t=i[n],r.push(t>>8),r.push(255&t);return r},r.prototype.toNormalizedString=function(){var r;return function(){var t,n,e,i;for(e=this.parts,i=[],t=0,n=e.length;n>t;t++)r=e[t],i.push(r.toString(16));return i}.call(this).join(":")},r.prototype.match=function(r,t){var n;if(void 0===t&&(n=r,r=n[0],t=n[1]),"ipv6"!==r.kind())throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return a(this.parts,r.parts,16,t)},r.prototype.SpecialRanges={unspecified:[new r([0,0,0,0,0,0,0,0]),128],linkLocal:[new r([65152,0,0,0,0,0,0,0]),10],multicast:[new r([65280,0,0,0,0,0,0,0]),8],loopback:[new r([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new r([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new r([0,0,0,0,0,65535,0,0]),96],rfc6145:[new r([0,0,0,0,65535,0,0,0]),96],rfc6052:[new r([100,65435,0,0,0,0,0,0]),96],"6to4":[new r([8194,0,0,0,0,0,0,0]),16],teredo:[new r([8193,0,0,0,0,0,0,0]),32],reserved:[[new r([8193,3512,0,0,0,0,0,0]),32]]},r.prototype.range=function(){return t.subnetMatch(this,this.SpecialRanges)},r.prototype.isIPv4MappedAddress=function(){return"ipv4Mapped"===this.range()},r.prototype.toIPv4Address=function(){var r,n,e;if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");return e=this.parts.slice(-2),r=e[0],n=e[1],new t.IPv4([r>>8,255&r,n>>8,255&n])},r}(),i="(?:[0-9a-f]+::?)+",o={"native":new RegExp("^(::)?("+i+")?([0-9a-f]+)?(::)?$","i"),transitional:new RegExp("^((?:"+i+")|(?:::)(?:"+i+")?)"+(""+n+"\\."+n+"\\."+n+"\\."+n+"$"),"i")},r=function(r,t){var n,e,i,o,a;if(r.indexOf("::")!==r.lastIndexOf("::"))return null;for(n=0,e=-1;(e=r.indexOf(":",e+1))>=0;)n++;if("::"===r.substr(0,2)&&n--,"::"===r.substr(-2,2)&&n--,n>t)return null;for(a=t-n,o=":";a--;)o+="0:";return r=r.replace("::",o),":"===r[0]&&(r=r.slice(1)),":"===r[r.length-1]&&(r=r.slice(0,-1)),function(){var t,n,e,o;for(e=r.split(":"),o=[],t=0,n=e.length;n>t;t++)i=e[t],o.push(parseInt(i,16));return o}()},t.IPv6.parser=function(t){var n,e,i,a,s,p;if(t.match(o["native"]))return r(t,8);if((n=t.match(o.transitional))&&(a=r(n[1].slice(0,-1),6))){for(i=[parseInt(n[2]),parseInt(n[3]),parseInt(n[4]),parseInt(n[5])],s=0,p=i.length;p>s;s++)if(e=i[s],!(e>=0&&255>=e))return null;return a.push(i[0]<<8|i[1]),a.push(i[2]<<8|i[3]),a}return null},t.IPv4.isIPv4=t.IPv6.isIPv6=function(r){return null!==this.parser(r)},t.IPv4.isValid=function(r){var t;try{return new this(this.parser(r)),!0}catch(n){return t=n,!1}},t.IPv6.isValid=function(r){var t;if("string"==typeof r&&-1===r.indexOf(":"))return!1;try{return new this(this.parser(r)),!0}catch(n){return t=n,!1}},t.IPv4.parse=t.IPv6.parse=function(r){var t;if(t=this.parser(r),null===t)throw new Error("ipaddr: string is not formatted like ip address");return new this(t)},t.IPv4.parseCIDR=function(r){var t,n;if((n=r.match(/^(.+)\/(\d+)$/))&&(t=parseInt(n[2]),t>=0&&32>=t))return[this.parse(n[1]),t];throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},t.IPv6.parseCIDR=function(r){var t,n;if((n=r.match(/^(.+)\/(\d+)$/))&&(t=parseInt(n[2]),t>=0&&128>=t))return[this.parse(n[1]),t];throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},t.isValid=function(r){return t.IPv6.isValid(r)||t.IPv4.isValid(r)},t.parse=function(r){if(t.IPv6.isValid(r))return t.IPv6.parse(r);if(t.IPv4.isValid(r))return t.IPv4.parse(r);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},t.parseCIDR=function(r){var n;try{return t.IPv6.parseCIDR(r)}catch(e){n=e;try{return t.IPv4.parseCIDR(r)}catch(e){throw n=e,new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},t.fromByteArray=function(r){var n;if(n=r.length,4===n)return new t.IPv4(r);if(16===n)return new t.IPv6(r);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},t.process=function(r){var t;return t=this.parse(r),"ipv6"===t.kind()&&t.isIPv4MappedAddress()?t.toIPv4Address():t}}).call(this); \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/lib/ipaddr.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/lib/ipaddr.js
new file mode 100644
index 0000000..36774e7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/lib/ipaddr.js
@@ -0,0 +1,526 @@
+(function() {
+ var expandIPv6, ipaddr, ipv4Part, ipv4Regexes, ipv6Part, ipv6Regexes, matchCIDR, root;
+
+ ipaddr = {};
+
+ root = this;
+
+ if ((typeof module !== "undefined" && module !== null) && module.exports) {
+ module.exports = ipaddr;
+ } else {
+ root['ipaddr'] = ipaddr;
+ }
+
+ matchCIDR = function(first, second, partSize, cidrBits) {
+ var part, shift;
+ if (first.length !== second.length) {
+ throw new Error("ipaddr: cannot match CIDR for objects with different lengths");
+ }
+ part = 0;
+ while (cidrBits > 0) {
+ shift = partSize - cidrBits;
+ if (shift < 0) {
+ shift = 0;
+ }
+ if (first[part] >> shift !== second[part] >> shift) {
+ return false;
+ }
+ cidrBits -= partSize;
+ part += 1;
+ }
+ return true;
+ };
+
+ ipaddr.subnetMatch = function(address, rangeList, defaultName) {
+ var rangeName, rangeSubnets, subnet, _i, _len;
+ if (defaultName == null) {
+ defaultName = 'unicast';
+ }
+ for (rangeName in rangeList) {
+ rangeSubnets = rangeList[rangeName];
+ if (rangeSubnets[0] && !(rangeSubnets[0] instanceof Array)) {
+ rangeSubnets = [rangeSubnets];
+ }
+ for (_i = 0, _len = rangeSubnets.length; _i < _len; _i++) {
+ subnet = rangeSubnets[_i];
+ if (address.match.apply(address, subnet)) {
+ return rangeName;
+ }
+ }
+ }
+ return defaultName;
+ };
+
+ ipaddr.IPv4 = (function() {
+ function IPv4(octets) {
+ var octet, _i, _len;
+ if (octets.length !== 4) {
+ throw new Error("ipaddr: ipv4 octet count should be 4");
+ }
+ for (_i = 0, _len = octets.length; _i < _len; _i++) {
+ octet = octets[_i];
+ if (!((0 <= octet && octet <= 255))) {
+ throw new Error("ipaddr: ipv4 octet should fit in 8 bits");
+ }
+ }
+ this.octets = octets;
+ }
+
+ IPv4.prototype.kind = function() {
+ return 'ipv4';
+ };
+
+ IPv4.prototype.toString = function() {
+ return this.octets.join(".");
+ };
+
+ IPv4.prototype.toByteArray = function() {
+ return this.octets.slice(0);
+ };
+
+ IPv4.prototype.match = function(other, cidrRange) {
+ var _ref;
+ if (cidrRange === void 0) {
+ _ref = other, other = _ref[0], cidrRange = _ref[1];
+ }
+ if (other.kind() !== 'ipv4') {
+ throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");
+ }
+ return matchCIDR(this.octets, other.octets, 8, cidrRange);
+ };
+
+ IPv4.prototype.SpecialRanges = {
+ unspecified: [[new IPv4([0, 0, 0, 0]), 8]],
+ broadcast: [[new IPv4([255, 255, 255, 255]), 32]],
+ multicast: [[new IPv4([224, 0, 0, 0]), 4]],
+ linkLocal: [[new IPv4([169, 254, 0, 0]), 16]],
+ loopback: [[new IPv4([127, 0, 0, 0]), 8]],
+ "private": [[new IPv4([10, 0, 0, 0]), 8], [new IPv4([172, 16, 0, 0]), 12], [new IPv4([192, 168, 0, 0]), 16]],
+ reserved: [[new IPv4([192, 0, 0, 0]), 24], [new IPv4([192, 0, 2, 0]), 24], [new IPv4([192, 88, 99, 0]), 24], [new IPv4([198, 51, 100, 0]), 24], [new IPv4([203, 0, 113, 0]), 24], [new IPv4([240, 0, 0, 0]), 4]]
+ };
+
+ IPv4.prototype.range = function() {
+ return ipaddr.subnetMatch(this, this.SpecialRanges);
+ };
+
+ IPv4.prototype.toIPv4MappedAddress = function() {
+ return ipaddr.IPv6.parse("::ffff:" + (this.toString()));
+ };
+
+ IPv4.prototype.prefixLengthFromSubnetMask = function() {
+ var cidr, i, octet, stop, zeros, zerotable, _i;
+ zerotable = {
+ 0: 8,
+ 128: 7,
+ 192: 6,
+ 224: 5,
+ 240: 4,
+ 248: 3,
+ 252: 2,
+ 254: 1,
+ 255: 0
+ };
+ cidr = 0;
+ stop = false;
+ for (i = _i = 3; _i >= 0; i = _i += -1) {
+ octet = this.octets[i];
+ if (octet in zerotable) {
+ zeros = zerotable[octet];
+ if (stop && zeros !== 0) {
+ return null;
+ }
+ if (zeros !== 8) {
+ stop = true;
+ }
+ cidr += zeros;
+ } else {
+ return null;
+ }
+ }
+ return 32 - cidr;
+ };
+
+ return IPv4;
+
+ })();
+
+ ipv4Part = "(0?\\d+|0x[a-f0-9]+)";
+
+ ipv4Regexes = {
+ fourOctet: new RegExp("^" + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "$", 'i'),
+ longValue: new RegExp("^" + ipv4Part + "$", 'i')
+ };
+
+ ipaddr.IPv4.parser = function(string) {
+ var match, parseIntAuto, part, shift, value;
+ parseIntAuto = function(string) {
+ if (string[0] === "0" && string[1] !== "x") {
+ return parseInt(string, 8);
+ } else {
+ return parseInt(string);
+ }
+ };
+ if (match = string.match(ipv4Regexes.fourOctet)) {
+ return (function() {
+ var _i, _len, _ref, _results;
+ _ref = match.slice(1, 6);
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ part = _ref[_i];
+ _results.push(parseIntAuto(part));
+ }
+ return _results;
+ })();
+ } else if (match = string.match(ipv4Regexes.longValue)) {
+ value = parseIntAuto(match[1]);
+ if (value > 0xffffffff || value < 0) {
+ throw new Error("ipaddr: address outside defined range");
+ }
+ return ((function() {
+ var _i, _results;
+ _results = [];
+ for (shift = _i = 0; _i <= 24; shift = _i += 8) {
+ _results.push((value >> shift) & 0xff);
+ }
+ return _results;
+ })()).reverse();
+ } else {
+ return null;
+ }
+ };
+
+ ipaddr.IPv6 = (function() {
+ function IPv6(parts) {
+ var i, part, _i, _j, _len, _ref;
+ if (parts.length === 16) {
+ this.parts = [];
+ for (i = _i = 0; _i <= 14; i = _i += 2) {
+ this.parts.push((parts[i] << 8) | parts[i + 1]);
+ }
+ } else if (parts.length === 8) {
+ this.parts = parts;
+ } else {
+ throw new Error("ipaddr: ipv6 part count should be 8 or 16");
+ }
+ _ref = this.parts;
+ for (_j = 0, _len = _ref.length; _j < _len; _j++) {
+ part = _ref[_j];
+ if (!((0 <= part && part <= 0xffff))) {
+ throw new Error("ipaddr: ipv6 part should fit in 16 bits");
+ }
+ }
+ }
+
+ IPv6.prototype.kind = function() {
+ return 'ipv6';
+ };
+
+ IPv6.prototype.toString = function() {
+ var compactStringParts, part, pushPart, state, stringParts, _i, _len;
+ stringParts = (function() {
+ var _i, _len, _ref, _results;
+ _ref = this.parts;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ part = _ref[_i];
+ _results.push(part.toString(16));
+ }
+ return _results;
+ }).call(this);
+ compactStringParts = [];
+ pushPart = function(part) {
+ return compactStringParts.push(part);
+ };
+ state = 0;
+ for (_i = 0, _len = stringParts.length; _i < _len; _i++) {
+ part = stringParts[_i];
+ switch (state) {
+ case 0:
+ if (part === '0') {
+ pushPart('');
+ } else {
+ pushPart(part);
+ }
+ state = 1;
+ break;
+ case 1:
+ if (part === '0') {
+ state = 2;
+ } else {
+ pushPart(part);
+ }
+ break;
+ case 2:
+ if (part !== '0') {
+ pushPart('');
+ pushPart(part);
+ state = 3;
+ }
+ break;
+ case 3:
+ pushPart(part);
+ }
+ }
+ if (state === 2) {
+ pushPart('');
+ pushPart('');
+ }
+ return compactStringParts.join(":");
+ };
+
+ IPv6.prototype.toByteArray = function() {
+ var bytes, part, _i, _len, _ref;
+ bytes = [];
+ _ref = this.parts;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ part = _ref[_i];
+ bytes.push(part >> 8);
+ bytes.push(part & 0xff);
+ }
+ return bytes;
+ };
+
+ IPv6.prototype.toNormalizedString = function() {
+ var part;
+ return ((function() {
+ var _i, _len, _ref, _results;
+ _ref = this.parts;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ part = _ref[_i];
+ _results.push(part.toString(16));
+ }
+ return _results;
+ }).call(this)).join(":");
+ };
+
+ IPv6.prototype.match = function(other, cidrRange) {
+ var _ref;
+ if (cidrRange === void 0) {
+ _ref = other, other = _ref[0], cidrRange = _ref[1];
+ }
+ if (other.kind() !== 'ipv6') {
+ throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");
+ }
+ return matchCIDR(this.parts, other.parts, 16, cidrRange);
+ };
+
+ IPv6.prototype.SpecialRanges = {
+ unspecified: [new IPv6([0, 0, 0, 0, 0, 0, 0, 0]), 128],
+ linkLocal: [new IPv6([0xfe80, 0, 0, 0, 0, 0, 0, 0]), 10],
+ multicast: [new IPv6([0xff00, 0, 0, 0, 0, 0, 0, 0]), 8],
+ loopback: [new IPv6([0, 0, 0, 0, 0, 0, 0, 1]), 128],
+ uniqueLocal: [new IPv6([0xfc00, 0, 0, 0, 0, 0, 0, 0]), 7],
+ ipv4Mapped: [new IPv6([0, 0, 0, 0, 0, 0xffff, 0, 0]), 96],
+ rfc6145: [new IPv6([0, 0, 0, 0, 0xffff, 0, 0, 0]), 96],
+ rfc6052: [new IPv6([0x64, 0xff9b, 0, 0, 0, 0, 0, 0]), 96],
+ '6to4': [new IPv6([0x2002, 0, 0, 0, 0, 0, 0, 0]), 16],
+ teredo: [new IPv6([0x2001, 0, 0, 0, 0, 0, 0, 0]), 32],
+ reserved: [[new IPv6([0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]), 32]]
+ };
+
+ IPv6.prototype.range = function() {
+ return ipaddr.subnetMatch(this, this.SpecialRanges);
+ };
+
+ IPv6.prototype.isIPv4MappedAddress = function() {
+ return this.range() === 'ipv4Mapped';
+ };
+
+ IPv6.prototype.toIPv4Address = function() {
+ var high, low, _ref;
+ if (!this.isIPv4MappedAddress()) {
+ throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");
+ }
+ _ref = this.parts.slice(-2), high = _ref[0], low = _ref[1];
+ return new ipaddr.IPv4([high >> 8, high & 0xff, low >> 8, low & 0xff]);
+ };
+
+ return IPv6;
+
+ })();
+
+ ipv6Part = "(?:[0-9a-f]+::?)+";
+
+ ipv6Regexes = {
+ "native": new RegExp("^(::)?(" + ipv6Part + ")?([0-9a-f]+)?(::)?$", 'i'),
+ transitional: new RegExp(("^((?:" + ipv6Part + ")|(?:::)(?:" + ipv6Part + ")?)") + ("" + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "$"), 'i')
+ };
+
+ expandIPv6 = function(string, parts) {
+ var colonCount, lastColon, part, replacement, replacementCount;
+ if (string.indexOf('::') !== string.lastIndexOf('::')) {
+ return null;
+ }
+ colonCount = 0;
+ lastColon = -1;
+ while ((lastColon = string.indexOf(':', lastColon + 1)) >= 0) {
+ colonCount++;
+ }
+ if (string.substr(0, 2) === '::') {
+ colonCount--;
+ }
+ if (string.substr(-2, 2) === '::') {
+ colonCount--;
+ }
+ if (colonCount > parts) {
+ return null;
+ }
+ replacementCount = parts - colonCount;
+ replacement = ':';
+ while (replacementCount--) {
+ replacement += '0:';
+ }
+ string = string.replace('::', replacement);
+ if (string[0] === ':') {
+ string = string.slice(1);
+ }
+ if (string[string.length - 1] === ':') {
+ string = string.slice(0, -1);
+ }
+ return (function() {
+ var _i, _len, _ref, _results;
+ _ref = string.split(":");
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ part = _ref[_i];
+ _results.push(parseInt(part, 16));
+ }
+ return _results;
+ })();
+ };
+
+ ipaddr.IPv6.parser = function(string) {
+ var match, octet, octets, parts, _i, _len;
+ if (string.match(ipv6Regexes['native'])) {
+ return expandIPv6(string, 8);
+ } else if (match = string.match(ipv6Regexes['transitional'])) {
+ parts = expandIPv6(match[1].slice(0, -1), 6);
+ if (parts) {
+ octets = [parseInt(match[2]), parseInt(match[3]), parseInt(match[4]), parseInt(match[5])];
+ for (_i = 0, _len = octets.length; _i < _len; _i++) {
+ octet = octets[_i];
+ if (!((0 <= octet && octet <= 255))) {
+ return null;
+ }
+ }
+ parts.push(octets[0] << 8 | octets[1]);
+ parts.push(octets[2] << 8 | octets[3]);
+ return parts;
+ }
+ }
+ return null;
+ };
+
+ ipaddr.IPv4.isIPv4 = ipaddr.IPv6.isIPv6 = function(string) {
+ return this.parser(string) !== null;
+ };
+
+ ipaddr.IPv4.isValid = function(string) {
+ var e;
+ try {
+ new this(this.parser(string));
+ return true;
+ } catch (_error) {
+ e = _error;
+ return false;
+ }
+ };
+
+ ipaddr.IPv6.isValid = function(string) {
+ var e;
+ if (typeof string === "string" && string.indexOf(":") === -1) {
+ return false;
+ }
+ try {
+ new this(this.parser(string));
+ return true;
+ } catch (_error) {
+ e = _error;
+ return false;
+ }
+ };
+
+ ipaddr.IPv4.parse = ipaddr.IPv6.parse = function(string) {
+ var parts;
+ parts = this.parser(string);
+ if (parts === null) {
+ throw new Error("ipaddr: string is not formatted like ip address");
+ }
+ return new this(parts);
+ };
+
+ ipaddr.IPv4.parseCIDR = function(string) {
+ var maskLength, match;
+ if (match = string.match(/^(.+)\/(\d+)$/)) {
+ maskLength = parseInt(match[2]);
+ if (maskLength >= 0 && maskLength <= 32) {
+ return [this.parse(match[1]), maskLength];
+ }
+ }
+ throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range");
+ };
+
+ ipaddr.IPv6.parseCIDR = function(string) {
+ var maskLength, match;
+ if (match = string.match(/^(.+)\/(\d+)$/)) {
+ maskLength = parseInt(match[2]);
+ if (maskLength >= 0 && maskLength <= 128) {
+ return [this.parse(match[1]), maskLength];
+ }
+ }
+ throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range");
+ };
+
+ ipaddr.isValid = function(string) {
+ return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string);
+ };
+
+ ipaddr.parse = function(string) {
+ if (ipaddr.IPv6.isValid(string)) {
+ return ipaddr.IPv6.parse(string);
+ } else if (ipaddr.IPv4.isValid(string)) {
+ return ipaddr.IPv4.parse(string);
+ } else {
+ throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format");
+ }
+ };
+
+ ipaddr.parseCIDR = function(string) {
+ var e;
+ try {
+ return ipaddr.IPv6.parseCIDR(string);
+ } catch (_error) {
+ e = _error;
+ try {
+ return ipaddr.IPv4.parseCIDR(string);
+ } catch (_error) {
+ e = _error;
+ throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format");
+ }
+ }
+ };
+
+ ipaddr.fromByteArray = function(bytes) {
+ var length;
+ length = bytes.length;
+ if (length === 4) {
+ return new ipaddr.IPv4(bytes);
+ } else if (length === 16) {
+ return new ipaddr.IPv6(bytes);
+ } else {
+ throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address");
+ }
+ };
+
+ ipaddr.process = function(string) {
+ var addr;
+ addr = this.parse(string);
+ if (addr.kind() === 'ipv6' && addr.isIPv4MappedAddress()) {
+ return addr.toIPv4Address();
+ } else {
+ return addr;
+ }
+ };
+
+}).call(this);
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/package.json
new file mode 100644
index 0000000..cf43635
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/package.json
@@ -0,0 +1,62 @@
+{
+ "name": "ipaddr.js",
+ "description": "A library for manipulating IPv4 and IPv6 addresses in JavaScript.",
+ "version": "1.1.1",
+ "author": {
+ "name": "whitequark",
+ "email": "whitequark@whitequark.org"
+ },
+ "directories": {
+ "lib": "./lib"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "coffee-script": "~1.6",
+ "nodeunit": ">=0.8.2 <0.8.7",
+ "uglify-js": "latest"
+ },
+ "scripts": {
+ "test": "cake build test"
+ },
+ "keywords": [
+ "ip",
+ "ipv4",
+ "ipv6"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/whitequark/ipaddr.js"
+ },
+ "main": "./lib/ipaddr",
+ "engines": {
+ "node": ">= 0.10"
+ },
+ "license": "MIT",
+ "gitHead": "dbc7d98bc0d8fff68a894be0c60721566807e2fc",
+ "bugs": {
+ "url": "https://github.com/whitequark/ipaddr.js/issues"
+ },
+ "_id": "ipaddr.js@1.1.1",
+ "_shasum": "c791d95f52b29c1247d5df80ada39b8a73647230",
+ "_from": "ipaddr.js@1.1.1",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "whitequark",
+ "email": "whitequark@whitequark.org"
+ },
+ "maintainers": [
+ {
+ "name": "whitequark",
+ "email": "whitequark@whitequark.org"
+ }
+ ],
+ "dist": {
+ "shasum": "c791d95f52b29c1247d5df80ada39b8a73647230",
+ "tarball": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.1.1.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/ipaddr.js-1.1.1.tgz_1464074293475_0.6683731523808092"
+ },
+ "_resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.1.1.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/src/ipaddr.coffee b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/src/ipaddr.coffee
new file mode 100644
index 0000000..d2abf91
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/src/ipaddr.coffee
@@ -0,0 +1,450 @@
+# Define the main object
+ipaddr = {}
+
+root = this
+
+# Export for both the CommonJS and browser-like environment
+if module? && module.exports
+ module.exports = ipaddr
+else
+ root['ipaddr'] = ipaddr
+
+# A generic CIDR (Classless Inter-Domain Routing) RFC1518 range matcher.
+matchCIDR = (first, second, partSize, cidrBits) ->
+ if first.length != second.length
+ throw new Error "ipaddr: cannot match CIDR for objects with different lengths"
+
+ part = 0
+ while cidrBits > 0
+ shift = partSize - cidrBits
+ shift = 0 if shift < 0
+
+ if first[part] >> shift != second[part] >> shift
+ return false
+
+ cidrBits -= partSize
+ part += 1
+
+ return true
+
+# An utility function to ease named range matching. See examples below.
+ipaddr.subnetMatch = (address, rangeList, defaultName='unicast') ->
+ for rangeName, rangeSubnets of rangeList
+ # ECMA5 Array.isArray isn't available everywhere
+ if rangeSubnets[0] && !(rangeSubnets[0] instanceof Array)
+ rangeSubnets = [ rangeSubnets ]
+
+ for subnet in rangeSubnets
+ return rangeName if address.match.apply(address, subnet)
+
+ return defaultName
+
+# An IPv4 address (RFC791).
+class ipaddr.IPv4
+ # Constructs a new IPv4 address from an array of four octets
+ # in network order (MSB first)
+ # Verifies the input.
+ constructor: (octets) ->
+ if octets.length != 4
+ throw new Error "ipaddr: ipv4 octet count should be 4"
+
+ for octet in octets
+ if !(0 <= octet <= 255)
+ throw new Error "ipaddr: ipv4 octet should fit in 8 bits"
+
+ @octets = octets
+
+ # The 'kind' method exists on both IPv4 and IPv6 classes.
+ kind: ->
+ return 'ipv4'
+
+ # Returns the address in convenient, decimal-dotted format.
+ toString: ->
+ return @octets.join "."
+
+ # Returns an array of byte-sized values in network order (MSB first)
+ toByteArray: ->
+ return @octets.slice(0) # octets.clone
+
+ # Checks if this address matches other one within given CIDR range.
+ match: (other, cidrRange) ->
+ if cidrRange == undefined
+ [other, cidrRange] = other
+
+ if other.kind() != 'ipv4'
+ throw new Error "ipaddr: cannot match ipv4 address with non-ipv4 one"
+
+ return matchCIDR(this.octets, other.octets, 8, cidrRange)
+
+ # Special IPv4 address ranges.
+ SpecialRanges:
+ unspecified: [
+ [ new IPv4([0, 0, 0, 0]), 8 ]
+ ]
+ broadcast: [
+ [ new IPv4([255, 255, 255, 255]), 32 ]
+ ]
+ multicast: [ # RFC3171
+ [ new IPv4([224, 0, 0, 0]), 4 ]
+ ]
+ linkLocal: [ # RFC3927
+ [ new IPv4([169, 254, 0, 0]), 16 ]
+ ]
+ loopback: [ # RFC5735
+ [ new IPv4([127, 0, 0, 0]), 8 ]
+ ]
+ private: [ # RFC1918
+ [ new IPv4([10, 0, 0, 0]), 8 ]
+ [ new IPv4([172, 16, 0, 0]), 12 ]
+ [ new IPv4([192, 168, 0, 0]), 16 ]
+ ]
+ reserved: [ # Reserved and testing-only ranges; RFCs 5735, 5737, 2544, 1700
+ [ new IPv4([192, 0, 0, 0]), 24 ]
+ [ new IPv4([192, 0, 2, 0]), 24 ]
+ [ new IPv4([192, 88, 99, 0]), 24 ]
+ [ new IPv4([198, 51, 100, 0]), 24 ]
+ [ new IPv4([203, 0, 113, 0]), 24 ]
+ [ new IPv4([240, 0, 0, 0]), 4 ]
+ ]
+
+ # Checks if the address corresponds to one of the special ranges.
+ range: ->
+ return ipaddr.subnetMatch(this, @SpecialRanges)
+
+ # Convrets this IPv4 address to an IPv4-mapped IPv6 address.
+ toIPv4MappedAddress: ->
+ return ipaddr.IPv6.parse "::ffff:#{@toString()}"
+
+ # returns a number of leading ones in IPv4 address, making sure that
+ # the rest is a solid sequence of 0's (valid netmask)
+ # returns either the CIDR length or null if mask is not valid
+ prefixLengthFromSubnetMask: ->
+ # number of zeroes in octet
+ zerotable =
+ 0: 8
+ 128: 7
+ 192: 6
+ 224: 5
+ 240: 4
+ 248: 3
+ 252: 2
+ 254: 1
+ 255: 0
+
+ cidr = 0
+ # non-zero encountered stop scanning for zeroes
+ stop = false
+ for i in [3..0] by -1
+ octet = @octets[i]
+ if octet of zerotable
+ zeros = zerotable[octet]
+ if stop and zeros != 0
+ return null
+ unless zeros == 8
+ stop = true
+ cidr += zeros
+ else
+ return null
+ return 32 - cidr
+
+# A list of regular expressions that match arbitrary IPv4 addresses,
+# for which a number of weird notations exist.
+# Note that an address like 0010.0xa5.1.1 is considered legal.
+ipv4Part = "(0?\\d+|0x[a-f0-9]+)"
+ipv4Regexes =
+ fourOctet: new RegExp "^#{ipv4Part}\\.#{ipv4Part}\\.#{ipv4Part}\\.#{ipv4Part}$", 'i'
+ longValue: new RegExp "^#{ipv4Part}$", 'i'
+
+# Classful variants (like a.b, where a is an octet, and b is a 24-bit
+# value representing last three octets; this corresponds to a class C
+# address) are omitted due to classless nature of modern Internet.
+ipaddr.IPv4.parser = (string) ->
+ parseIntAuto = (string) ->
+ if string[0] == "0" && string[1] != "x"
+ parseInt(string, 8)
+ else
+ parseInt(string)
+
+ # parseInt recognizes all that octal & hexadecimal weirdness for us
+ if match = string.match(ipv4Regexes.fourOctet)
+ return (parseIntAuto(part) for part in match[1..5])
+ else if match = string.match(ipv4Regexes.longValue)
+ value = parseIntAuto(match[1])
+ if value > 0xffffffff || value < 0
+ throw new Error "ipaddr: address outside defined range"
+ return ((value >> shift) & 0xff for shift in [0..24] by 8).reverse()
+ else
+ return null
+
+# An IPv6 address (RFC2460)
+class ipaddr.IPv6
+ # Constructs an IPv6 address from an array of eight 16-bit parts
+ # or sixteen 8-bit parts in network order (MSB first).
+ # Throws an error if the input is invalid.
+ constructor: (parts) ->
+ if parts.length == 16
+ @parts = []
+ for i in [0..14] by 2
+ @parts.push((parts[i] << 8) | parts[i + 1])
+ else if parts.length == 8
+ @parts = parts
+ else
+ throw new Error "ipaddr: ipv6 part count should be 8 or 16"
+
+ for part in @parts
+ if !(0 <= part <= 0xffff)
+ throw new Error "ipaddr: ipv6 part should fit in 16 bits"
+
+ # The 'kind' method exists on both IPv4 and IPv6 classes.
+ kind: ->
+ return 'ipv6'
+
+ # Returns the address in compact, human-readable format like
+ # 2001:db8:8:66::1
+ toString: ->
+ stringParts = (part.toString(16) for part in @parts)
+
+ compactStringParts = []
+ pushPart = (part) -> compactStringParts.push part
+
+ state = 0
+ for part in stringParts
+ switch state
+ when 0
+ if part == '0'
+ pushPart('')
+ else
+ pushPart(part)
+
+ state = 1
+ when 1
+ if part == '0'
+ state = 2
+ else
+ pushPart(part)
+ when 2
+ unless part == '0'
+ pushPart('')
+ pushPart(part)
+ state = 3
+ when 3
+ pushPart(part)
+
+ if state == 2
+ pushPart('')
+ pushPart('')
+
+ return compactStringParts.join ":"
+
+ # Returns an array of byte-sized values in network order (MSB first)
+ toByteArray: ->
+ bytes = []
+ for part in @parts
+ bytes.push(part >> 8)
+ bytes.push(part & 0xff)
+
+ return bytes
+
+ # Returns the address in expanded format with all zeroes included, like
+ # 2001:db8:8:66:0:0:0:1
+ toNormalizedString: ->
+ return (part.toString(16) for part in @parts).join ":"
+
+ # Checks if this address matches other one within given CIDR range.
+ match: (other, cidrRange) ->
+ if cidrRange == undefined
+ [other, cidrRange] = other
+
+ if other.kind() != 'ipv6'
+ throw new Error "ipaddr: cannot match ipv6 address with non-ipv6 one"
+
+ return matchCIDR(this.parts, other.parts, 16, cidrRange)
+
+ # Special IPv6 ranges
+ SpecialRanges:
+ unspecified: [ new IPv6([0, 0, 0, 0, 0, 0, 0, 0]), 128 ] # RFC4291, here and after
+ linkLocal: [ new IPv6([0xfe80, 0, 0, 0, 0, 0, 0, 0]), 10 ]
+ multicast: [ new IPv6([0xff00, 0, 0, 0, 0, 0, 0, 0]), 8 ]
+ loopback: [ new IPv6([0, 0, 0, 0, 0, 0, 0, 1]), 128 ]
+ uniqueLocal: [ new IPv6([0xfc00, 0, 0, 0, 0, 0, 0, 0]), 7 ]
+ ipv4Mapped: [ new IPv6([0, 0, 0, 0, 0, 0xffff, 0, 0]), 96 ]
+ rfc6145: [ new IPv6([0, 0, 0, 0, 0xffff, 0, 0, 0]), 96 ] # RFC6145
+ rfc6052: [ new IPv6([0x64, 0xff9b, 0, 0, 0, 0, 0, 0]), 96 ] # RFC6052
+ '6to4': [ new IPv6([0x2002, 0, 0, 0, 0, 0, 0, 0]), 16 ] # RFC3056
+ teredo: [ new IPv6([0x2001, 0, 0, 0, 0, 0, 0, 0]), 32 ] # RFC6052, RFC6146
+ reserved: [
+ [ new IPv6([ 0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]), 32 ] # RFC4291
+ ]
+
+ # Checks if the address corresponds to one of the special ranges.
+ range: ->
+ return ipaddr.subnetMatch(this, @SpecialRanges)
+
+ # Checks if this address is an IPv4-mapped IPv6 address.
+ isIPv4MappedAddress: ->
+ return @range() == 'ipv4Mapped'
+
+ # Converts this address to IPv4 address if it is an IPv4-mapped IPv6 address.
+ # Throws an error otherwise.
+ toIPv4Address: ->
+ unless @isIPv4MappedAddress()
+ throw new Error "ipaddr: trying to convert a generic ipv6 address to ipv4"
+
+ [high, low] = @parts[-2..-1]
+
+ return new ipaddr.IPv4([high >> 8, high & 0xff, low >> 8, low & 0xff])
+
+# IPv6-matching regular expressions.
+# For IPv6, the task is simpler: it is enough to match the colon-delimited
+# hexadecimal IPv6 and a transitional variant with dotted-decimal IPv4 at
+# the end.
+ipv6Part = "(?:[0-9a-f]+::?)+"
+ipv6Regexes =
+ native: new RegExp "^(::)?(#{ipv6Part})?([0-9a-f]+)?(::)?$", 'i'
+ transitional: new RegExp "^((?:#{ipv6Part})|(?:::)(?:#{ipv6Part})?)" +
+ "#{ipv4Part}\\.#{ipv4Part}\\.#{ipv4Part}\\.#{ipv4Part}$", 'i'
+
+# Expand :: in an IPv6 address or address part consisting of `parts` groups.
+expandIPv6 = (string, parts) ->
+ # More than one '::' means invalid adddress
+ if string.indexOf('::') != string.lastIndexOf('::')
+ return null
+
+ # How many parts do we already have?
+ colonCount = 0
+ lastColon = -1
+ while (lastColon = string.indexOf(':', lastColon + 1)) >= 0
+ colonCount++
+
+ # 0::0 is two parts more than ::
+ colonCount-- if string.substr(0, 2) == '::'
+ colonCount-- if string.substr(-2, 2) == '::'
+
+ # The following loop would hang if colonCount > parts
+ if colonCount > parts
+ return null
+
+ # replacement = ':' + '0:' * (parts - colonCount)
+ replacementCount = parts - colonCount
+ replacement = ':'
+ while replacementCount--
+ replacement += '0:'
+
+ # Insert the missing zeroes
+ string = string.replace('::', replacement)
+
+ # Trim any garbage which may be hanging around if :: was at the edge in
+ # the source string
+ string = string[1..-1] if string[0] == ':'
+ string = string[0..-2] if string[string.length-1] == ':'
+
+ return (parseInt(part, 16) for part in string.split(":"))
+
+# Parse an IPv6 address.
+ipaddr.IPv6.parser = (string) ->
+ if string.match(ipv6Regexes['native'])
+ return expandIPv6(string, 8)
+
+ else if match = string.match(ipv6Regexes['transitional'])
+ parts = expandIPv6(match[1][0..-2], 6)
+ if parts
+ octets = [parseInt(match[2]), parseInt(match[3]),
+ parseInt(match[4]), parseInt(match[5])]
+ for octet in octets
+ if !(0 <= octet <= 255)
+ return null
+
+ parts.push(octets[0] << 8 | octets[1])
+ parts.push(octets[2] << 8 | octets[3])
+ return parts
+
+ return null
+
+# Checks if a given string is formatted like IPv4/IPv6 address.
+ipaddr.IPv4.isIPv4 = ipaddr.IPv6.isIPv6 = (string) ->
+ return @parser(string) != null
+
+# Checks if a given string is a valid IPv4/IPv6 address.
+ipaddr.IPv4.isValid = (string) ->
+ try
+ new this(@parser(string))
+ return true
+ catch e
+ return false
+
+ipaddr.IPv6.isValid = (string) ->
+ # Since IPv6.isValid is always called first, this shortcut
+ # provides a substantial performance gain.
+ if typeof string == "string" and string.indexOf(":") == -1
+ return false
+
+ try
+ new this(@parser(string))
+ return true
+ catch e
+ return false
+
+# Tries to parse and validate a string with IPv4/IPv6 address.
+# Throws an error if it fails.
+ipaddr.IPv4.parse = ipaddr.IPv6.parse = (string) ->
+ parts = @parser(string)
+ if parts == null
+ throw new Error "ipaddr: string is not formatted like ip address"
+
+ return new this(parts)
+
+ipaddr.IPv4.parseCIDR = (string) ->
+ if match = string.match(/^(.+)\/(\d+)$/)
+ maskLength = parseInt(match[2])
+ if maskLength >= 0 and maskLength <= 32
+ return [@parse(match[1]), maskLength]
+
+ throw new Error "ipaddr: string is not formatted like an IPv4 CIDR range"
+
+ipaddr.IPv6.parseCIDR = (string) ->
+ if match = string.match(/^(.+)\/(\d+)$/)
+ maskLength = parseInt(match[2])
+ if maskLength >= 0 and maskLength <= 128
+ return [@parse(match[1]), maskLength]
+
+ throw new Error "ipaddr: string is not formatted like an IPv6 CIDR range"
+
+# Checks if the address is valid IP address
+ipaddr.isValid = (string) ->
+ return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string)
+
+# Try to parse an address and throw an error if it is impossible
+ipaddr.parse = (string) ->
+ if ipaddr.IPv6.isValid(string)
+ return ipaddr.IPv6.parse(string)
+ else if ipaddr.IPv4.isValid(string)
+ return ipaddr.IPv4.parse(string)
+ else
+ throw new Error "ipaddr: the address has neither IPv6 nor IPv4 format"
+
+ipaddr.parseCIDR = (string) ->
+ try
+ return ipaddr.IPv6.parseCIDR(string)
+ catch e
+ try
+ return ipaddr.IPv4.parseCIDR(string)
+ catch e
+ throw new Error "ipaddr: the address has neither IPv6 nor IPv4 CIDR format"
+
+# Try to parse an array in network order (MSB first) for IPv4 and IPv6
+ipaddr.fromByteArray = (bytes) ->
+ length = bytes.length
+ if length == 4
+ return new ipaddr.IPv4(bytes)
+ else if length == 16
+ return new ipaddr.IPv6(bytes)
+ else
+ throw new Error "ipaddr: the binary input is neither an IPv6 nor IPv4 address"
+
+# Parse an address and return plain IPv4 address if it is an IPv4-mapped address
+ipaddr.process = (string) ->
+ addr = @parse(string)
+ if addr.kind() == 'ipv6' && addr.isIPv4MappedAddress()
+ return addr.toIPv4Address()
+ else
+ return addr
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/test/ipaddr.test.coffee b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/test/ipaddr.test.coffee
new file mode 100644
index 0000000..5f07526
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/test/ipaddr.test.coffee
@@ -0,0 +1,339 @@
+ipaddr = require '../lib/ipaddr'
+
+module.exports =
+ 'should define main classes': (test) ->
+ test.ok(ipaddr.IPv4?, 'defines IPv4 class')
+ test.ok(ipaddr.IPv6?, 'defines IPv6 class')
+ test.done()
+
+ 'can construct IPv4 from octets': (test) ->
+ test.doesNotThrow ->
+ new ipaddr.IPv4([192, 168, 1, 2])
+ test.done()
+
+ 'refuses to construct invalid IPv4': (test) ->
+ test.throws ->
+ new ipaddr.IPv4([300, 1, 2, 3])
+ test.throws ->
+ new ipaddr.IPv4([8, 8, 8])
+ test.done()
+
+ 'converts IPv4 to string correctly': (test) ->
+ addr = new ipaddr.IPv4([192, 168, 1, 1])
+ test.equal(addr.toString(), '192.168.1.1')
+ test.done()
+
+ 'returns correct kind for IPv4': (test) ->
+ addr = new ipaddr.IPv4([1, 2, 3, 4])
+ test.equal(addr.kind(), 'ipv4')
+ test.done()
+
+ 'allows to access IPv4 octets': (test) ->
+ addr = new ipaddr.IPv4([42, 0, 0, 0])
+ test.equal(addr.octets[0], 42)
+ test.done()
+
+ 'checks IPv4 address format': (test) ->
+ test.equal(ipaddr.IPv4.isIPv4('192.168.007.0xa'), true)
+ test.equal(ipaddr.IPv4.isIPv4('1024.0.0.1'), true)
+ test.equal(ipaddr.IPv4.isIPv4('8.0xa.wtf.6'), false)
+ test.done()
+
+ 'validates IPv4 addresses': (test) ->
+ test.equal(ipaddr.IPv4.isValid('192.168.007.0xa'), true)
+ test.equal(ipaddr.IPv4.isValid('1024.0.0.1'), false)
+ test.equal(ipaddr.IPv4.isValid('8.0xa.wtf.6'), false)
+ test.done()
+
+ 'parses IPv4 in several weird formats': (test) ->
+ test.deepEqual(ipaddr.IPv4.parse('192.168.1.1').octets, [192, 168, 1, 1])
+ test.deepEqual(ipaddr.IPv4.parse('0xc0.168.1.1').octets, [192, 168, 1, 1])
+ test.deepEqual(ipaddr.IPv4.parse('192.0250.1.1').octets, [192, 168, 1, 1])
+ test.deepEqual(ipaddr.IPv4.parse('0xc0a80101').octets, [192, 168, 1, 1])
+ test.deepEqual(ipaddr.IPv4.parse('030052000401').octets, [192, 168, 1, 1])
+ test.deepEqual(ipaddr.IPv4.parse('3232235777').octets, [192, 168, 1, 1])
+ test.done()
+
+ 'barfs at invalid IPv4': (test) ->
+ test.throws ->
+ ipaddr.IPv4.parse('10.0.0.wtf')
+ test.done()
+
+ 'matches IPv4 CIDR correctly': (test) ->
+ addr = new ipaddr.IPv4([10, 5, 0, 1])
+ test.equal(addr.match(ipaddr.IPv4.parse('0.0.0.0'), 0), true)
+ test.equal(addr.match(ipaddr.IPv4.parse('11.0.0.0'), 8), false)
+ test.equal(addr.match(ipaddr.IPv4.parse('10.0.0.0'), 8), true)
+ test.equal(addr.match(ipaddr.IPv4.parse('10.0.0.1'), 8), true)
+ test.equal(addr.match(ipaddr.IPv4.parse('10.0.0.10'), 8), true)
+ test.equal(addr.match(ipaddr.IPv4.parse('10.5.5.0'), 16), true)
+ test.equal(addr.match(ipaddr.IPv4.parse('10.4.5.0'), 16), false)
+ test.equal(addr.match(ipaddr.IPv4.parse('10.4.5.0'), 15), true)
+ test.equal(addr.match(ipaddr.IPv4.parse('10.5.0.2'), 32), false)
+ test.equal(addr.match(addr, 32), true)
+ test.done()
+
+ 'parses IPv4 CIDR correctly': (test) ->
+ addr = new ipaddr.IPv4([10, 5, 0, 1])
+ test.equal(addr.match(ipaddr.IPv4.parseCIDR('0.0.0.0/0')), true)
+ test.equal(addr.match(ipaddr.IPv4.parseCIDR('11.0.0.0/8')), false)
+ test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.0.0.0/8')), true)
+ test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.0.0.1/8')), true)
+ test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.0.0.10/8')), true)
+ test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.5.5.0/16')), true)
+ test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.4.5.0/16')), false)
+ test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.4.5.0/15')), true)
+ test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.5.0.2/32')), false)
+ test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.5.0.1/32')), true)
+ test.throws ->
+ ipaddr.IPv4.parseCIDR('10.5.0.1')
+ test.throws ->
+ ipaddr.IPv4.parseCIDR('0.0.0.0/-1')
+ test.throws ->
+ ipaddr.IPv4.parseCIDR('0.0.0.0/33')
+ test.done()
+
+ 'detects reserved IPv4 networks': (test) ->
+ test.equal(ipaddr.IPv4.parse('0.0.0.0').range(), 'unspecified')
+ test.equal(ipaddr.IPv4.parse('0.1.0.0').range(), 'unspecified')
+ test.equal(ipaddr.IPv4.parse('10.1.0.1').range(), 'private')
+ test.equal(ipaddr.IPv4.parse('192.168.2.1').range(), 'private')
+ test.equal(ipaddr.IPv4.parse('224.100.0.1').range(), 'multicast')
+ test.equal(ipaddr.IPv4.parse('169.254.15.0').range(), 'linkLocal')
+ test.equal(ipaddr.IPv4.parse('127.1.1.1').range(), 'loopback')
+ test.equal(ipaddr.IPv4.parse('255.255.255.255').range(), 'broadcast')
+ test.equal(ipaddr.IPv4.parse('240.1.2.3').range(), 'reserved')
+ test.equal(ipaddr.IPv4.parse('8.8.8.8').range(), 'unicast')
+ test.done()
+
+ 'can construct IPv6 from 16bit parts': (test) ->
+ test.doesNotThrow ->
+ new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1])
+ test.done()
+
+ 'can construct IPv6 from 8bit parts': (test) ->
+ test.doesNotThrow ->
+ new ipaddr.IPv6([0x20, 0x01, 0xd, 0xb8, 0xf5, 0x3a, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1])
+ test.deepEqual(new ipaddr.IPv6([0x20, 0x01, 0xd, 0xb8, 0xf5, 0x3a, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1]))
+ test.done()
+
+ 'refuses to construct invalid IPv6': (test) ->
+ test.throws ->
+ new ipaddr.IPv6([0xfffff, 0, 0, 0, 0, 0, 0, 1])
+ test.throws ->
+ new ipaddr.IPv6([0xfffff, 0, 0, 0, 0, 0, 1])
+ test.throws ->
+ new ipaddr.IPv6([0xffff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1])
+ test.done()
+
+ 'converts IPv6 to string correctly': (test) ->
+ addr = new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1])
+ test.equal(addr.toNormalizedString(), '2001:db8:f53a:0:0:0:0:1')
+ test.equal(addr.toString(), '2001:db8:f53a::1')
+ test.equal(new ipaddr.IPv6([0, 0, 0, 0, 0, 0, 0, 1]).toString(), '::1')
+ test.equal(new ipaddr.IPv6([0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]).toString(), '2001:db8::')
+ test.done()
+
+ 'returns correct kind for IPv6': (test) ->
+ addr = new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1])
+ test.equal(addr.kind(), 'ipv6')
+ test.done()
+
+ 'allows to access IPv6 address parts': (test) ->
+ addr = new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 42, 0, 1])
+ test.equal(addr.parts[5], 42)
+ test.done()
+
+ 'checks IPv6 address format': (test) ->
+ test.equal(ipaddr.IPv6.isIPv6('2001:db8:F53A::1'), true)
+ test.equal(ipaddr.IPv6.isIPv6('200001::1'), true)
+ test.equal(ipaddr.IPv6.isIPv6('::ffff:192.168.1.1'), true)
+ test.equal(ipaddr.IPv6.isIPv6('::ffff:300.168.1.1'), false)
+ test.equal(ipaddr.IPv6.isIPv6('::ffff:300.168.1.1:0'), false)
+ test.equal(ipaddr.IPv6.isIPv6('fe80::wtf'), false)
+ test.done()
+
+ 'validates IPv6 addresses': (test) ->
+ test.equal(ipaddr.IPv6.isValid('2001:db8:F53A::1'), true)
+ test.equal(ipaddr.IPv6.isValid('200001::1'), false)
+ test.equal(ipaddr.IPv6.isValid('::ffff:192.168.1.1'), true)
+ test.equal(ipaddr.IPv6.isValid('::ffff:300.168.1.1'), false)
+ test.equal(ipaddr.IPv6.isValid('::ffff:300.168.1.1:0'), false)
+ test.equal(ipaddr.IPv6.isValid('::ffff:222.1.41.9000'), false)
+ test.equal(ipaddr.IPv6.isValid('2001:db8::F53A::1'), false)
+ test.equal(ipaddr.IPv6.isValid('fe80::wtf'), false)
+ test.equal(ipaddr.IPv6.isValid('2002::2:'), false)
+ test.equal(ipaddr.IPv6.isValid(undefined), false)
+ test.done()
+
+ 'parses IPv6 in different formats': (test) ->
+ test.deepEqual(ipaddr.IPv6.parse('2001:db8:F53A:0:0:0:0:1').parts, [0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1])
+ test.deepEqual(ipaddr.IPv6.parse('fe80::10').parts, [0xfe80, 0, 0, 0, 0, 0, 0, 0x10])
+ test.deepEqual(ipaddr.IPv6.parse('2001:db8:F53A::').parts, [0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 0])
+ test.deepEqual(ipaddr.IPv6.parse('::1').parts, [0, 0, 0, 0, 0, 0, 0, 1])
+ test.deepEqual(ipaddr.IPv6.parse('::').parts, [0, 0, 0, 0, 0, 0, 0, 0])
+ test.done()
+
+ 'barfs at invalid IPv6': (test) ->
+ test.throws ->
+ ipaddr.IPv6.parse('fe80::0::1')
+ test.done()
+
+ 'matches IPv6 CIDR correctly': (test) ->
+ addr = ipaddr.IPv6.parse('2001:db8:f53a::1')
+ test.equal(addr.match(ipaddr.IPv6.parse('::'), 0), true)
+ test.equal(addr.match(ipaddr.IPv6.parse('2001:db8:f53a::1:1'), 64), true)
+ test.equal(addr.match(ipaddr.IPv6.parse('2001:db8:f53b::1:1'), 48), false)
+ test.equal(addr.match(ipaddr.IPv6.parse('2001:db8:f531::1:1'), 44), true)
+ test.equal(addr.match(ipaddr.IPv6.parse('2001:db8:f500::1'), 40), true)
+ test.equal(addr.match(ipaddr.IPv6.parse('2001:db9:f500::1'), 40), false)
+ test.equal(addr.match(addr, 128), true)
+ test.done()
+
+ 'parses IPv6 CIDR correctly': (test) ->
+ addr = ipaddr.IPv6.parse('2001:db8:f53a::1')
+ test.equal(addr.match(ipaddr.IPv6.parseCIDR('::/0')), true)
+ test.equal(addr.match(ipaddr.IPv6.parseCIDR('2001:db8:f53a::1:1/64')), true)
+ test.equal(addr.match(ipaddr.IPv6.parseCIDR('2001:db8:f53b::1:1/48')), false)
+ test.equal(addr.match(ipaddr.IPv6.parseCIDR('2001:db8:f531::1:1/44')), true)
+ test.equal(addr.match(ipaddr.IPv6.parseCIDR('2001:db8:f500::1/40')), true)
+ test.equal(addr.match(ipaddr.IPv6.parseCIDR('2001:db9:f500::1/40')), false)
+ test.equal(addr.match(ipaddr.IPv6.parseCIDR('2001:db8:f53a::1/128')), true)
+ test.throws ->
+ ipaddr.IPv6.parseCIDR('2001:db8:f53a::1')
+ test.throws ->
+ ipaddr.IPv6.parseCIDR('2001:db8:f53a::1/-1')
+ test.throws ->
+ ipaddr.IPv6.parseCIDR('2001:db8:f53a::1/129')
+ test.done()
+
+ 'converts between IPv4-mapped IPv6 addresses and IPv4 addresses': (test) ->
+ addr = ipaddr.IPv4.parse('77.88.21.11')
+ mapped = addr.toIPv4MappedAddress()
+ test.deepEqual(mapped.parts, [0, 0, 0, 0, 0, 0xffff, 0x4d58, 0x150b])
+ test.deepEqual(mapped.toIPv4Address().octets, addr.octets)
+ test.done()
+
+ 'refuses to convert non-IPv4-mapped IPv6 address to IPv4 address': (test) ->
+ test.throws ->
+ ipaddr.IPv6.parse('2001:db8::1').toIPv4Address()
+ test.done()
+
+ 'detects reserved IPv6 networks': (test) ->
+ test.equal(ipaddr.IPv6.parse('::').range(), 'unspecified')
+ test.equal(ipaddr.IPv6.parse('fe80::1234:5678:abcd:0123').range(), 'linkLocal')
+ test.equal(ipaddr.IPv6.parse('ff00::1234').range(), 'multicast')
+ test.equal(ipaddr.IPv6.parse('::1').range(), 'loopback')
+ test.equal(ipaddr.IPv6.parse('fc00::').range(), 'uniqueLocal')
+ test.equal(ipaddr.IPv6.parse('::ffff:192.168.1.10').range(), 'ipv4Mapped')
+ test.equal(ipaddr.IPv6.parse('::ffff:0:192.168.1.10').range(), 'rfc6145')
+ test.equal(ipaddr.IPv6.parse('64:ff9b::1234').range(), 'rfc6052')
+ test.equal(ipaddr.IPv6.parse('2002:1f63:45e8::1').range(), '6to4')
+ test.equal(ipaddr.IPv6.parse('2001::4242').range(), 'teredo')
+ test.equal(ipaddr.IPv6.parse('2001:db8::3210').range(), 'reserved')
+ test.equal(ipaddr.IPv6.parse('2001:470:8:66::1').range(), 'unicast')
+ test.done()
+
+ 'is able to determine IP address type': (test) ->
+ test.equal(ipaddr.parse('8.8.8.8').kind(), 'ipv4')
+ test.equal(ipaddr.parse('2001:db8:3312::1').kind(), 'ipv6')
+ test.done()
+
+ 'throws an error if tried to parse an invalid address': (test) ->
+ test.throws ->
+ ipaddr.parse('::some.nonsense')
+ test.done()
+
+ 'correctly processes IPv4-mapped addresses': (test) ->
+ test.equal(ipaddr.process('8.8.8.8').kind(), 'ipv4')
+ test.equal(ipaddr.process('2001:db8:3312::1').kind(), 'ipv6')
+ test.equal(ipaddr.process('::ffff:192.168.1.1').kind(), 'ipv4')
+ test.done()
+
+ 'correctly converts IPv6 and IPv4 addresses to byte arrays': (test) ->
+ test.deepEqual(ipaddr.parse('1.2.3.4').toByteArray(),
+ [0x1, 0x2, 0x3, 0x4]);
+ # Fuck yeah. The first byte of Google's IPv6 address is 42. 42!
+ test.deepEqual(ipaddr.parse('2a00:1450:8007::68').toByteArray(),
+ [42, 0x00, 0x14, 0x50, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68 ])
+ test.done()
+
+ 'correctly parses 1 as an IPv4 address': (test) ->
+ test.equal(ipaddr.IPv6.isValid('1'), false)
+ test.equal(ipaddr.IPv4.isValid('1'), true)
+ test.deepEqual(new ipaddr.IPv4([0, 0, 0, 1]), ipaddr.parse('1'))
+ test.done()
+
+ 'correctly detects IPv4 and IPv6 CIDR addresses': (test) ->
+ test.deepEqual([ipaddr.IPv6.parse('fc00::'), 64],
+ ipaddr.parseCIDR('fc00::/64'))
+ test.deepEqual([ipaddr.IPv4.parse('1.2.3.4'), 5],
+ ipaddr.parseCIDR('1.2.3.4/5'))
+ test.done()
+
+ 'does not consider a very large or very small number a valid IP address': (test) ->
+ test.equal(ipaddr.isValid('4999999999'), false)
+ test.equal(ipaddr.isValid('-1'), false)
+ test.done()
+
+ 'does not hang on ::8:8:8:8:8:8:8:8:8': (test) ->
+ test.equal(ipaddr.IPv6.isValid('::8:8:8:8:8:8:8:8:8'), false)
+ test.done()
+
+ 'subnetMatch does not fail on empty range': (test) ->
+ ipaddr.subnetMatch(new ipaddr.IPv4([1,2,3,4]), {}, false)
+ ipaddr.subnetMatch(new ipaddr.IPv4([1,2,3,4]), {subnet: []}, false)
+ test.done()
+
+ 'subnetMatch returns default subnet on empty range': (test) ->
+ test.equal(ipaddr.subnetMatch(new ipaddr.IPv4([1,2,3,4]), {}, false), false)
+ test.equal(ipaddr.subnetMatch(new ipaddr.IPv4([1,2,3,4]), {subnet: []}, false), false)
+ test.done()
+
+ 'is able to determine IP address type from byte array input': (test) ->
+ test.equal(ipaddr.fromByteArray([0x7f, 0, 0, 1]).kind(), 'ipv4')
+ test.equal(ipaddr.fromByteArray([0x20, 0x01, 0xd, 0xb8, 0xf5, 0x3a, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]).kind(), 'ipv6')
+ test.throws ->
+ ipaddr.fromByteArray([1])
+ test.done()
+
+ 'prefixLengthFromSubnetMask returns proper CIDR notation for standard IPv4 masks': (test) ->
+ test.equal(ipaddr.IPv4.parse('255.255.255.255').prefixLengthFromSubnetMask(), 32)
+ test.equal(ipaddr.IPv4.parse('255.255.255.254').prefixLengthFromSubnetMask(), 31)
+ test.equal(ipaddr.IPv4.parse('255.255.255.252').prefixLengthFromSubnetMask(), 30)
+ test.equal(ipaddr.IPv4.parse('255.255.255.248').prefixLengthFromSubnetMask(), 29)
+ test.equal(ipaddr.IPv4.parse('255.255.255.240').prefixLengthFromSubnetMask(), 28)
+ test.equal(ipaddr.IPv4.parse('255.255.255.224').prefixLengthFromSubnetMask(), 27)
+ test.equal(ipaddr.IPv4.parse('255.255.255.192').prefixLengthFromSubnetMask(), 26)
+ test.equal(ipaddr.IPv4.parse('255.255.255.128').prefixLengthFromSubnetMask(), 25)
+ test.equal(ipaddr.IPv4.parse('255.255.255.0').prefixLengthFromSubnetMask(), 24)
+ test.equal(ipaddr.IPv4.parse('255.255.254.0').prefixLengthFromSubnetMask(), 23)
+ test.equal(ipaddr.IPv4.parse('255.255.252.0').prefixLengthFromSubnetMask(), 22)
+ test.equal(ipaddr.IPv4.parse('255.255.248.0').prefixLengthFromSubnetMask(), 21)
+ test.equal(ipaddr.IPv4.parse('255.255.240.0').prefixLengthFromSubnetMask(), 20)
+ test.equal(ipaddr.IPv4.parse('255.255.224.0').prefixLengthFromSubnetMask(), 19)
+ test.equal(ipaddr.IPv4.parse('255.255.192.0').prefixLengthFromSubnetMask(), 18)
+ test.equal(ipaddr.IPv4.parse('255.255.128.0').prefixLengthFromSubnetMask(), 17)
+ test.equal(ipaddr.IPv4.parse('255.255.0.0').prefixLengthFromSubnetMask(), 16)
+ test.equal(ipaddr.IPv4.parse('255.254.0.0').prefixLengthFromSubnetMask(), 15)
+ test.equal(ipaddr.IPv4.parse('255.252.0.0').prefixLengthFromSubnetMask(), 14)
+ test.equal(ipaddr.IPv4.parse('255.248.0.0').prefixLengthFromSubnetMask(), 13)
+ test.equal(ipaddr.IPv4.parse('255.240.0.0').prefixLengthFromSubnetMask(), 12)
+ test.equal(ipaddr.IPv4.parse('255.224.0.0').prefixLengthFromSubnetMask(), 11)
+ test.equal(ipaddr.IPv4.parse('255.192.0.0').prefixLengthFromSubnetMask(), 10)
+ test.equal(ipaddr.IPv4.parse('255.128.0.0').prefixLengthFromSubnetMask(), 9)
+ test.equal(ipaddr.IPv4.parse('255.0.0.0').prefixLengthFromSubnetMask(), 8)
+ test.equal(ipaddr.IPv4.parse('254.0.0.0').prefixLengthFromSubnetMask(), 7)
+ test.equal(ipaddr.IPv4.parse('252.0.0.0').prefixLengthFromSubnetMask(), 6)
+ test.equal(ipaddr.IPv4.parse('248.0.0.0').prefixLengthFromSubnetMask(), 5)
+ test.equal(ipaddr.IPv4.parse('240.0.0.0').prefixLengthFromSubnetMask(), 4)
+ test.equal(ipaddr.IPv4.parse('224.0.0.0').prefixLengthFromSubnetMask(), 3)
+ test.equal(ipaddr.IPv4.parse('192.0.0.0').prefixLengthFromSubnetMask(), 2)
+ test.equal(ipaddr.IPv4.parse('128.0.0.0').prefixLengthFromSubnetMask(), 1)
+ test.equal(ipaddr.IPv4.parse('0.0.0.0').prefixLengthFromSubnetMask(), 0)
+ # negative cases
+ test.equal(ipaddr.IPv4.parse('192.168.255.0').prefixLengthFromSubnetMask(), null)
+ test.equal(ipaddr.IPv4.parse('255.0.255.0').prefixLengthFromSubnetMask(), null)
+ test.done()
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/package.json
new file mode 100644
index 0000000..f7dd90b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/proxy-addr/package.json
@@ -0,0 +1,74 @@
+{
+ "name": "proxy-addr",
+ "description": "Determine address of proxied request",
+ "version": "1.1.2",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "keywords": [
+ "ip",
+ "proxy",
+ "x-forwarded-for"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jshttp/proxy-addr.git"
+ },
+ "dependencies": {
+ "forwarded": "~0.1.0",
+ "ipaddr.js": "1.1.1"
+ },
+ "devDependencies": {
+ "benchmark": "2.1.0",
+ "beautify-benchmark": "0.2.4",
+ "istanbul": "0.4.3",
+ "mocha": "~1.21.5"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "README.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "bench": "node benchmark/index.js",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "28c34525632884a6d5e69a9165d7420b3f972d8b",
+ "bugs": {
+ "url": "https://github.com/jshttp/proxy-addr/issues"
+ },
+ "homepage": "https://github.com/jshttp/proxy-addr#readme",
+ "_id": "proxy-addr@1.1.2",
+ "_shasum": "b4cc5f22610d9535824c123aef9d3cf73c40ba37",
+ "_from": "proxy-addr@>=1.1.2 <1.2.0",
+ "_npmVersion": "2.15.1",
+ "_nodeVersion": "4.4.3",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "dist": {
+ "shasum": "b4cc5f22610d9535824c123aef9d3cf73c40ba37",
+ "tarball": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.2.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/proxy-addr-1.1.2.tgz_1464573376704_0.6896329398732632"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.2.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/.eslintignore b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/.eslintignore
new file mode 100644
index 0000000..1521c8b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/.eslintignore
@@ -0,0 +1 @@
+dist
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/.eslintrc b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/.eslintrc
new file mode 100644
index 0000000..1faac27
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/.eslintrc
@@ -0,0 +1,19 @@
+{
+ "root": true,
+
+ "extends": "@ljharb",
+
+ "rules": {
+ "complexity": [2, 22],
+ "consistent-return": [1],
+ "id-length": [2, { "min": 1, "max": 25, "properties": "never" }],
+ "indent": [2, 4],
+ "max-params": [2, 9],
+ "max-statements": [2, 36],
+ "no-extra-parens": [1],
+ "no-continue": [1],
+ "no-magic-numbers": 0,
+ "no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"],
+ "operator-linebreak": 1
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/.jscs.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/.jscs.json
new file mode 100644
index 0000000..3d099c4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/.jscs.json
@@ -0,0 +1,176 @@
+{
+ "es3": true,
+
+ "additionalRules": [],
+
+ "requireSemicolons": true,
+
+ "disallowMultipleSpaces": true,
+
+ "disallowIdentifierNames": [],
+
+ "requireCurlyBraces": {
+ "allExcept": [],
+ "keywords": ["if", "else", "for", "while", "do", "try", "catch"]
+ },
+
+ "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],
+
+ "disallowSpaceAfterKeywords": [],
+
+ "disallowSpaceBeforeComma": true,
+ "disallowSpaceAfterComma": false,
+ "disallowSpaceBeforeSemicolon": true,
+
+ "disallowNodeTypes": [
+ "DebuggerStatement",
+ "ForInStatement",
+ "LabeledStatement",
+ "SwitchCase",
+ "SwitchStatement",
+ "WithStatement"
+ ],
+
+ "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] },
+
+ "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
+ "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
+ "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
+ "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
+ "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
+
+ "requireSpaceBetweenArguments": true,
+
+ "disallowSpacesInsideParentheses": true,
+
+ "disallowSpacesInsideArrayBrackets": true,
+
+ "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] },
+
+ "disallowSpaceAfterObjectKeys": true,
+
+ "requireCommaBeforeLineBreak": true,
+
+ "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
+ "requireSpaceAfterPrefixUnaryOperators": [],
+
+ "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
+ "requireSpaceBeforePostfixUnaryOperators": [],
+
+ "disallowSpaceBeforeBinaryOperators": [],
+ "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
+
+ "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
+ "disallowSpaceAfterBinaryOperators": [],
+
+ "disallowImplicitTypeConversion": ["binary", "string"],
+
+ "disallowKeywords": ["with", "eval"],
+
+ "requireKeywordsOnNewLine": [],
+ "disallowKeywordsOnNewLine": ["else"],
+
+ "requireLineFeedAtFileEnd": true,
+
+ "disallowTrailingWhitespace": true,
+
+ "disallowTrailingComma": true,
+
+ "excludeFiles": ["node_modules/**", "vendor/**"],
+
+ "disallowMultipleLineStrings": true,
+
+ "requireDotNotation": { "allExcept": ["keywords"] },
+
+ "requireParenthesesAroundIIFE": true,
+
+ "validateLineBreaks": "LF",
+
+ "validateQuoteMarks": {
+ "escape": true,
+ "mark": "'"
+ },
+
+ "disallowOperatorBeforeLineBreak": [],
+
+ "requireSpaceBeforeKeywords": [
+ "do",
+ "for",
+ "if",
+ "else",
+ "switch",
+ "case",
+ "try",
+ "catch",
+ "finally",
+ "while",
+ "with",
+ "return"
+ ],
+
+ "validateAlignedFunctionParameters": {
+ "lineBreakAfterOpeningBraces": true,
+ "lineBreakBeforeClosingBraces": true
+ },
+
+ "requirePaddingNewLinesBeforeExport": true,
+
+ "validateNewlineAfterArrayElements": {
+ "maximum": 1
+ },
+
+ "requirePaddingNewLinesAfterUseStrict": true,
+
+ "disallowArrowFunctions": true,
+
+ "disallowMultiLineTernary": true,
+
+ "validateOrderInObjectKeys": "asc-insensitive",
+
+ "disallowIdenticalDestructuringNames": true,
+
+ "disallowNestedTernaries": { "maxLevel": 1 },
+
+ "requireSpaceAfterComma": { "allExcept": ["trailing"] },
+ "requireAlignedMultilineParams": false,
+
+ "requireSpacesInGenerator": {
+ "afterStar": true
+ },
+
+ "disallowSpacesInGenerator": {
+ "beforeStar": true
+ },
+
+ "disallowVar": false,
+
+ "requireArrayDestructuring": false,
+
+ "requireEnhancedObjectLiterals": false,
+
+ "requireObjectDestructuring": false,
+
+ "requireEarlyReturn": false,
+
+ "requireCapitalizedConstructorsNew": {
+ "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"]
+ },
+
+ "requireImportAlphabetized": false,
+
+ "requireSpaceBeforeObjectValues": true,
+ "requireSpaceBeforeDestructuredValues": true,
+
+ "disallowSpacesInsideTemplateStringPlaceholders": true,
+
+ "disallowArrayDestructuringReturn": false,
+
+ "requireNewlineBeforeSingleStatementsInIf": false,
+
+ "disallowUnusedVariables": true,
+
+ "requireSpacesInsideImportedObjectBraces": true,
+
+ "requireUseStrict": true
+}
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/CHANGELOG.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/CHANGELOG.md
new file mode 100644
index 0000000..e318a05
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/CHANGELOG.md
@@ -0,0 +1,120 @@
+## [**6.2.0**](https://github.com/ljharb/qs/issues?milestone=36&state=closed)
+- [New] pass Buffers to the encoder/decoder directly (#161)
+- [New] add "encoder" and "decoder" options, for custom param encoding/decoding (#160)
+- [Fix] fix compacting of nested sparse arrays (#150)
+
+## [**6.1.0**](https://github.com/ljharb/qs/issues?milestone=35&state=closed)
+- [New] allowDots option for `stringify` (#151)
+- [Fix] "sort" option should work at a depth of 3 or more (#151)
+- [Fix] Restore `dist` directory; will be removed in v7 (#148)
+
+## [**6.0.2**](https://github.com/ljharb/qs/issues?milestone=33&state=closed)
+- Revert ES6 requirement and restore support for node down to v0.8.
+
+## [**6.0.1**](https://github.com/ljharb/qs/issues?milestone=32&state=closed)
+- [**#127**](https://github.com/ljharb/qs/pull/127) Fix engines definition in package.json
+
+## [**6.0.0**](https://github.com/ljharb/qs/issues?milestone=31&state=closed)
+- [**#124**](https://github.com/ljharb/qs/issues/124) Use ES6 and drop support for node < v4
+
+## [**5.2.0**](https://github.com/ljharb/qs/issues?milestone=30&state=closed)
+- [**#64**](https://github.com/ljharb/qs/issues/64) Add option to sort object keys in the query string
+
+## [**5.1.0**](https://github.com/ljharb/qs/issues?milestone=29&state=closed)
+- [**#117**](https://github.com/ljharb/qs/issues/117) make URI encoding stringified results optional
+- [**#106**](https://github.com/ljharb/qs/issues/106) Add flag `skipNulls` to optionally skip null values in stringify
+
+## [**5.0.0**](https://github.com/ljharb/qs/issues?milestone=28&state=closed)
+- [**#114**](https://github.com/ljharb/qs/issues/114) default allowDots to false
+- [**#100**](https://github.com/ljharb/qs/issues/100) include dist to npm
+
+## [**4.0.0**](https://github.com/ljharb/qs/issues?milestone=26&state=closed)
+- [**#98**](https://github.com/ljharb/qs/issues/98) make returning plain objects and allowing prototype overwriting properties optional
+
+## [**3.1.0**](https://github.com/ljharb/qs/issues?milestone=24&state=closed)
+- [**#89**](https://github.com/ljharb/qs/issues/89) Add option to disable "Transform dot notation to bracket notation"
+
+## [**3.0.0**](https://github.com/ljharb/qs/issues?milestone=23&state=closed)
+- [**#80**](https://github.com/ljharb/qs/issues/80) qs.parse silently drops properties
+- [**#77**](https://github.com/ljharb/qs/issues/77) Perf boost
+- [**#60**](https://github.com/ljharb/qs/issues/60) Add explicit option to disable array parsing
+- [**#74**](https://github.com/ljharb/qs/issues/74) Bad parse when turning array into object
+- [**#81**](https://github.com/ljharb/qs/issues/81) Add a `filter` option
+- [**#68**](https://github.com/ljharb/qs/issues/68) Fixed issue with recursion and passing strings into objects.
+- [**#66**](https://github.com/ljharb/qs/issues/66) Add mixed array and object dot notation support Closes: #47
+- [**#76**](https://github.com/ljharb/qs/issues/76) RFC 3986
+- [**#85**](https://github.com/ljharb/qs/issues/85) No equal sign
+- [**#84**](https://github.com/ljharb/qs/issues/84) update license attribute
+
+## [**2.4.1**](https://github.com/ljharb/qs/issues?milestone=20&state=closed)
+- [**#73**](https://github.com/ljharb/qs/issues/73) Property 'hasOwnProperty' of object #<Object> is not a function
+
+## [**2.4.0**](https://github.com/ljharb/qs/issues?milestone=19&state=closed)
+- [**#70**](https://github.com/ljharb/qs/issues/70) Add arrayFormat option
+
+## [**2.3.3**](https://github.com/ljharb/qs/issues?milestone=18&state=closed)
+- [**#59**](https://github.com/ljharb/qs/issues/59) make sure array indexes are >= 0, closes #57
+- [**#58**](https://github.com/ljharb/qs/issues/58) make qs usable for browser loader
+
+## [**2.3.2**](https://github.com/ljharb/qs/issues?milestone=17&state=closed)
+- [**#55**](https://github.com/ljharb/qs/issues/55) allow merging a string into an object
+
+## [**2.3.1**](https://github.com/ljharb/qs/issues?milestone=16&state=closed)
+- [**#52**](https://github.com/ljharb/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError".
+
+## [**2.3.0**](https://github.com/ljharb/qs/issues?milestone=15&state=closed)
+- [**#50**](https://github.com/ljharb/qs/issues/50) add option to omit array indices, closes #46
+
+## [**2.2.5**](https://github.com/ljharb/qs/issues?milestone=14&state=closed)
+- [**#39**](https://github.com/ljharb/qs/issues/39) Is there an alternative to Buffer.isBuffer?
+- [**#49**](https://github.com/ljharb/qs/issues/49) refactor utils.merge, fixes #45
+- [**#41**](https://github.com/ljharb/qs/issues/41) avoid browserifying Buffer, for #39
+
+## [**2.2.4**](https://github.com/ljharb/qs/issues?milestone=13&state=closed)
+- [**#38**](https://github.com/ljharb/qs/issues/38) how to handle object keys beginning with a number
+
+## [**2.2.3**](https://github.com/ljharb/qs/issues?milestone=12&state=closed)
+- [**#37**](https://github.com/ljharb/qs/issues/37) parser discards first empty value in array
+- [**#36**](https://github.com/ljharb/qs/issues/36) Update to lab 4.x
+
+## [**2.2.2**](https://github.com/ljharb/qs/issues?milestone=11&state=closed)
+- [**#33**](https://github.com/ljharb/qs/issues/33) Error when plain object in a value
+- [**#34**](https://github.com/ljharb/qs/issues/34) use Object.prototype.hasOwnProperty.call instead of obj.hasOwnProperty
+- [**#24**](https://github.com/ljharb/qs/issues/24) Changelog? Semver?
+
+## [**2.2.1**](https://github.com/ljharb/qs/issues?milestone=10&state=closed)
+- [**#32**](https://github.com/ljharb/qs/issues/32) account for circular references properly, closes #31
+- [**#31**](https://github.com/ljharb/qs/issues/31) qs.parse stackoverflow on circular objects
+
+## [**2.2.0**](https://github.com/ljharb/qs/issues?milestone=9&state=closed)
+- [**#26**](https://github.com/ljharb/qs/issues/26) Don't use Buffer global if it's not present
+- [**#30**](https://github.com/ljharb/qs/issues/30) Bug when merging non-object values into arrays
+- [**#29**](https://github.com/ljharb/qs/issues/29) Don't call Utils.clone at the top of Utils.merge
+- [**#23**](https://github.com/ljharb/qs/issues/23) Ability to not limit parameters?
+
+## [**2.1.0**](https://github.com/ljharb/qs/issues?milestone=8&state=closed)
+- [**#22**](https://github.com/ljharb/qs/issues/22) Enable using a RegExp as delimiter
+
+## [**2.0.0**](https://github.com/ljharb/qs/issues?milestone=7&state=closed)
+- [**#18**](https://github.com/ljharb/qs/issues/18) Why is there arrayLimit?
+- [**#20**](https://github.com/ljharb/qs/issues/20) Configurable parametersLimit
+- [**#21**](https://github.com/ljharb/qs/issues/21) make all limits optional, for #18, for #20
+
+## [**1.2.2**](https://github.com/ljharb/qs/issues?milestone=6&state=closed)
+- [**#19**](https://github.com/ljharb/qs/issues/19) Don't overwrite null values
+
+## [**1.2.1**](https://github.com/ljharb/qs/issues?milestone=5&state=closed)
+- [**#16**](https://github.com/ljharb/qs/issues/16) ignore non-string delimiters
+- [**#15**](https://github.com/ljharb/qs/issues/15) Close code block
+
+## [**1.2.0**](https://github.com/ljharb/qs/issues?milestone=4&state=closed)
+- [**#12**](https://github.com/ljharb/qs/issues/12) Add optional delim argument
+- [**#13**](https://github.com/ljharb/qs/issues/13) fix #11: flattened keys in array are now correctly parsed
+
+## [**1.1.0**](https://github.com/ljharb/qs/issues?milestone=3&state=closed)
+- [**#7**](https://github.com/ljharb/qs/issues/7) Empty values of a POST array disappear after being submitted
+- [**#9**](https://github.com/ljharb/qs/issues/9) Should not omit equals signs (=) when value is null
+- [**#6**](https://github.com/ljharb/qs/issues/6) Minor grammar fix in README
+
+## [**1.0.2**](https://github.com/ljharb/qs/issues?milestone=2&state=closed)
+- [**#5**](https://github.com/ljharb/qs/issues/5) array holes incorrectly copied into object on large index
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/CONTRIBUTING.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/CONTRIBUTING.md
new file mode 100644
index 0000000..8928361
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/CONTRIBUTING.md
@@ -0,0 +1 @@
+Please view our [hapijs contributing guide](https://github.com/hapijs/hapi/blob/master/CONTRIBUTING.md).
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/LICENSE
new file mode 100644
index 0000000..d456948
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/LICENSE
@@ -0,0 +1,28 @@
+Copyright (c) 2014 Nathan LaFreniere and other contributors.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * The names of any contributors may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ * * *
+
+The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/dist/qs.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/dist/qs.js
new file mode 100644
index 0000000..4cc6f30
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/dist/qs.js
@@ -0,0 +1,487 @@
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Qs = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+'use strict';
+
+var Stringify = require('./stringify');
+var Parse = require('./parse');
+
+module.exports = {
+ stringify: Stringify,
+ parse: Parse
+};
+
+},{"./parse":2,"./stringify":3}],2:[function(require,module,exports){
+'use strict';
+
+var Utils = require('./utils');
+
+var defaults = {
+ delimiter: '&',
+ depth: 5,
+ arrayLimit: 20,
+ parameterLimit: 1000,
+ strictNullHandling: false,
+ plainObjects: false,
+ allowPrototypes: false,
+ allowDots: false,
+ decoder: Utils.decode
+};
+
+var parseValues = function parseValues(str, options) {
+ var obj = {};
+ var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);
+
+ for (var i = 0; i < parts.length; ++i) {
+ var part = parts[i];
+ var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;
+
+ if (pos === -1) {
+ obj[options.decoder(part)] = '';
+
+ if (options.strictNullHandling) {
+ obj[options.decoder(part)] = null;
+ }
+ } else {
+ var key = options.decoder(part.slice(0, pos));
+ var val = options.decoder(part.slice(pos + 1));
+
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
+ obj[key] = [].concat(obj[key]).concat(val);
+ } else {
+ obj[key] = val;
+ }
+ }
+ }
+
+ return obj;
+};
+
+var parseObject = function parseObject(chain, val, options) {
+ if (!chain.length) {
+ return val;
+ }
+
+ var root = chain.shift();
+
+ var obj;
+ if (root === '[]') {
+ obj = [];
+ obj = obj.concat(parseObject(chain, val, options));
+ } else {
+ obj = options.plainObjects ? Object.create(null) : {};
+ var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root;
+ var index = parseInt(cleanRoot, 10);
+ if (
+ !isNaN(index) &&
+ root !== cleanRoot &&
+ String(index) === cleanRoot &&
+ index >= 0 &&
+ (options.parseArrays && index <= options.arrayLimit)
+ ) {
+ obj = [];
+ obj[index] = parseObject(chain, val, options);
+ } else {
+ obj[cleanRoot] = parseObject(chain, val, options);
+ }
+ }
+
+ return obj;
+};
+
+var parseKeys = function parseKeys(givenKey, val, options) {
+ if (!givenKey) {
+ return;
+ }
+
+ // Transform dot notation to bracket notation
+ var key = options.allowDots ? givenKey.replace(/\.([^\.\[]+)/g, '[$1]') : givenKey;
+
+ // The regex chunks
+
+ var parent = /^([^\[\]]*)/;
+ var child = /(\[[^\[\]]*\])/g;
+
+ // Get the parent
+
+ var segment = parent.exec(key);
+
+ // Stash the parent if it exists
+
+ var keys = [];
+ if (segment[1]) {
+ // If we aren't using plain objects, optionally prefix keys
+ // that would overwrite object prototype properties
+ if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1])) {
+ if (!options.allowPrototypes) {
+ return;
+ }
+ }
+
+ keys.push(segment[1]);
+ }
+
+ // Loop through children appending to the array until we hit depth
+
+ var i = 0;
+ while ((segment = child.exec(key)) !== null && i < options.depth) {
+ i += 1;
+ if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1].replace(/\[|\]/g, ''))) {
+ if (!options.allowPrototypes) {
+ continue;
+ }
+ }
+ keys.push(segment[1]);
+ }
+
+ // If there's a remainder, just add whatever is left
+
+ if (segment) {
+ keys.push('[' + key.slice(segment.index) + ']');
+ }
+
+ return parseObject(keys, val, options);
+};
+
+module.exports = function (str, opts) {
+ var options = opts || {};
+
+ if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') {
+ throw new TypeError('Decoder has to be a function.');
+ }
+
+ options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;
+ options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;
+ options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;
+ options.parseArrays = options.parseArrays !== false;
+ options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder;
+ options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots;
+ options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects;
+ options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes;
+ options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit;
+ options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
+
+ if (str === '' || str === null || typeof str === 'undefined') {
+ return options.plainObjects ? Object.create(null) : {};
+ }
+
+ var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
+ var obj = options.plainObjects ? Object.create(null) : {};
+
+ // Iterate over the keys and setup the new object
+
+ var keys = Object.keys(tempObj);
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ var newObj = parseKeys(key, tempObj[key], options);
+ obj = Utils.merge(obj, newObj, options);
+ }
+
+ return Utils.compact(obj);
+};
+
+},{"./utils":4}],3:[function(require,module,exports){
+'use strict';
+
+var Utils = require('./utils');
+
+var arrayPrefixGenerators = {
+ brackets: function brackets(prefix) {
+ return prefix + '[]';
+ },
+ indices: function indices(prefix, key) {
+ return prefix + '[' + key + ']';
+ },
+ repeat: function repeat(prefix) {
+ return prefix;
+ }
+};
+
+var defaults = {
+ delimiter: '&',
+ strictNullHandling: false,
+ skipNulls: false,
+ encode: true,
+ encoder: Utils.encode
+};
+
+var stringify = function stringify(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots) {
+ var obj = object;
+ if (typeof filter === 'function') {
+ obj = filter(prefix, obj);
+ } else if (obj instanceof Date) {
+ obj = obj.toISOString();
+ } else if (obj === null) {
+ if (strictNullHandling) {
+ return encoder ? encoder(prefix) : prefix;
+ }
+
+ obj = '';
+ }
+
+ if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || Utils.isBuffer(obj)) {
+ if (encoder) {
+ return [encoder(prefix) + '=' + encoder(obj)];
+ }
+ return [prefix + '=' + String(obj)];
+ }
+
+ var values = [];
+
+ if (typeof obj === 'undefined') {
+ return values;
+ }
+
+ var objKeys;
+ if (Array.isArray(filter)) {
+ objKeys = filter;
+ } else {
+ var keys = Object.keys(obj);
+ objKeys = sort ? keys.sort(sort) : keys;
+ }
+
+ for (var i = 0; i < objKeys.length; ++i) {
+ var key = objKeys[i];
+
+ if (skipNulls && obj[key] === null) {
+ continue;
+ }
+
+ if (Array.isArray(obj)) {
+ values = values.concat(stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
+ } else {
+ values = values.concat(stringify(obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
+ }
+ }
+
+ return values;
+};
+
+module.exports = function (object, opts) {
+ var obj = object;
+ var options = opts || {};
+ var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter;
+ var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
+ var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls;
+ var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode;
+ var encoder = encode ? (typeof options.encoder === 'function' ? options.encoder : defaults.encoder) : null;
+ var sort = typeof options.sort === 'function' ? options.sort : null;
+ var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots;
+ var objKeys;
+ var filter;
+
+ if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {
+ throw new TypeError('Encoder has to be a function.');
+ }
+
+ if (typeof options.filter === 'function') {
+ filter = options.filter;
+ obj = filter('', obj);
+ } else if (Array.isArray(options.filter)) {
+ objKeys = filter = options.filter;
+ }
+
+ var keys = [];
+
+ if (typeof obj !== 'object' || obj === null) {
+ return '';
+ }
+
+ var arrayFormat;
+ if (options.arrayFormat in arrayPrefixGenerators) {
+ arrayFormat = options.arrayFormat;
+ } else if ('indices' in options) {
+ arrayFormat = options.indices ? 'indices' : 'repeat';
+ } else {
+ arrayFormat = 'indices';
+ }
+
+ var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
+
+ if (!objKeys) {
+ objKeys = Object.keys(obj);
+ }
+
+ if (sort) {
+ objKeys.sort(sort);
+ }
+
+ for (var i = 0; i < objKeys.length; ++i) {
+ var key = objKeys[i];
+
+ if (skipNulls && obj[key] === null) {
+ continue;
+ }
+
+ keys = keys.concat(stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
+ }
+
+ return keys.join(delimiter);
+};
+
+},{"./utils":4}],4:[function(require,module,exports){
+'use strict';
+
+var hexTable = (function () {
+ var array = new Array(256);
+ for (var i = 0; i < 256; ++i) {
+ array[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase();
+ }
+
+ return array;
+}());
+
+exports.arrayToObject = function (source, options) {
+ var obj = options.plainObjects ? Object.create(null) : {};
+ for (var i = 0; i < source.length; ++i) {
+ if (typeof source[i] !== 'undefined') {
+ obj[i] = source[i];
+ }
+ }
+
+ return obj;
+};
+
+exports.merge = function (target, source, options) {
+ if (!source) {
+ return target;
+ }
+
+ if (typeof source !== 'object') {
+ if (Array.isArray(target)) {
+ target.push(source);
+ } else if (typeof target === 'object') {
+ target[source] = true;
+ } else {
+ return [target, source];
+ }
+
+ return target;
+ }
+
+ if (typeof target !== 'object') {
+ return [target].concat(source);
+ }
+
+ var mergeTarget = target;
+ if (Array.isArray(target) && !Array.isArray(source)) {
+ mergeTarget = exports.arrayToObject(target, options);
+ }
+
+ return Object.keys(source).reduce(function (acc, key) {
+ var value = source[key];
+
+ if (Object.prototype.hasOwnProperty.call(acc, key)) {
+ acc[key] = exports.merge(acc[key], value, options);
+ } else {
+ acc[key] = value;
+ }
+ return acc;
+ }, mergeTarget);
+};
+
+exports.decode = function (str) {
+ try {
+ return decodeURIComponent(str.replace(/\+/g, ' '));
+ } catch (e) {
+ return str;
+ }
+};
+
+exports.encode = function (str) {
+ // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
+ // It has been adapted here for stricter adherence to RFC 3986
+ if (str.length === 0) {
+ return str;
+ }
+
+ var string = typeof str === 'string' ? str : String(str);
+
+ var out = '';
+ for (var i = 0; i < string.length; ++i) {
+ var c = string.charCodeAt(i);
+
+ if (
+ c === 0x2D || // -
+ c === 0x2E || // .
+ c === 0x5F || // _
+ c === 0x7E || // ~
+ (c >= 0x30 && c <= 0x39) || // 0-9
+ (c >= 0x41 && c <= 0x5A) || // a-z
+ (c >= 0x61 && c <= 0x7A) // A-Z
+ ) {
+ out += string.charAt(i);
+ continue;
+ }
+
+ if (c < 0x80) {
+ out = out + hexTable[c];
+ continue;
+ }
+
+ if (c < 0x800) {
+ out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
+ continue;
+ }
+
+ if (c < 0xD800 || c >= 0xE000) {
+ out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
+ continue;
+ }
+
+ i += 1;
+ c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
+ out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)];
+ }
+
+ return out;
+};
+
+exports.compact = function (obj, references) {
+ if (typeof obj !== 'object' || obj === null) {
+ return obj;
+ }
+
+ var refs = references || [];
+ var lookup = refs.indexOf(obj);
+ if (lookup !== -1) {
+ return refs[lookup];
+ }
+
+ refs.push(obj);
+
+ if (Array.isArray(obj)) {
+ var compacted = [];
+
+ for (var i = 0; i < obj.length; ++i) {
+ if (obj[i] && typeof obj[i] === 'object') {
+ compacted.push(exports.compact(obj[i], refs));
+ } else if (typeof obj[i] !== 'undefined') {
+ compacted.push(obj[i]);
+ }
+ }
+
+ return compacted;
+ }
+
+ var keys = Object.keys(obj);
+ for (var j = 0; j < keys.length; ++j) {
+ var key = keys[j];
+ obj[key] = exports.compact(obj[key], refs);
+ }
+
+ return obj;
+};
+
+exports.isRegExp = function (obj) {
+ return Object.prototype.toString.call(obj) === '[object RegExp]';
+};
+
+exports.isBuffer = function (obj) {
+ if (obj === null || typeof obj === 'undefined') {
+ return false;
+ }
+
+ return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
+};
+
+},{}]},{},[1])(1)
+}); \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/lib/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/lib/index.js
new file mode 100644
index 0000000..1901959
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/lib/index.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var Stringify = require('./stringify');
+var Parse = require('./parse');
+
+module.exports = {
+ stringify: Stringify,
+ parse: Parse
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/lib/parse.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/lib/parse.js
new file mode 100644
index 0000000..bf70fd8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/lib/parse.js
@@ -0,0 +1,167 @@
+'use strict';
+
+var Utils = require('./utils');
+
+var defaults = {
+ delimiter: '&',
+ depth: 5,
+ arrayLimit: 20,
+ parameterLimit: 1000,
+ strictNullHandling: false,
+ plainObjects: false,
+ allowPrototypes: false,
+ allowDots: false,
+ decoder: Utils.decode
+};
+
+var parseValues = function parseValues(str, options) {
+ var obj = {};
+ var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);
+
+ for (var i = 0; i < parts.length; ++i) {
+ var part = parts[i];
+ var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;
+
+ if (pos === -1) {
+ obj[options.decoder(part)] = '';
+
+ if (options.strictNullHandling) {
+ obj[options.decoder(part)] = null;
+ }
+ } else {
+ var key = options.decoder(part.slice(0, pos));
+ var val = options.decoder(part.slice(pos + 1));
+
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
+ obj[key] = [].concat(obj[key]).concat(val);
+ } else {
+ obj[key] = val;
+ }
+ }
+ }
+
+ return obj;
+};
+
+var parseObject = function parseObject(chain, val, options) {
+ if (!chain.length) {
+ return val;
+ }
+
+ var root = chain.shift();
+
+ var obj;
+ if (root === '[]') {
+ obj = [];
+ obj = obj.concat(parseObject(chain, val, options));
+ } else {
+ obj = options.plainObjects ? Object.create(null) : {};
+ var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root;
+ var index = parseInt(cleanRoot, 10);
+ if (
+ !isNaN(index) &&
+ root !== cleanRoot &&
+ String(index) === cleanRoot &&
+ index >= 0 &&
+ (options.parseArrays && index <= options.arrayLimit)
+ ) {
+ obj = [];
+ obj[index] = parseObject(chain, val, options);
+ } else {
+ obj[cleanRoot] = parseObject(chain, val, options);
+ }
+ }
+
+ return obj;
+};
+
+var parseKeys = function parseKeys(givenKey, val, options) {
+ if (!givenKey) {
+ return;
+ }
+
+ // Transform dot notation to bracket notation
+ var key = options.allowDots ? givenKey.replace(/\.([^\.\[]+)/g, '[$1]') : givenKey;
+
+ // The regex chunks
+
+ var parent = /^([^\[\]]*)/;
+ var child = /(\[[^\[\]]*\])/g;
+
+ // Get the parent
+
+ var segment = parent.exec(key);
+
+ // Stash the parent if it exists
+
+ var keys = [];
+ if (segment[1]) {
+ // If we aren't using plain objects, optionally prefix keys
+ // that would overwrite object prototype properties
+ if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1])) {
+ if (!options.allowPrototypes) {
+ return;
+ }
+ }
+
+ keys.push(segment[1]);
+ }
+
+ // Loop through children appending to the array until we hit depth
+
+ var i = 0;
+ while ((segment = child.exec(key)) !== null && i < options.depth) {
+ i += 1;
+ if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1].replace(/\[|\]/g, ''))) {
+ if (!options.allowPrototypes) {
+ continue;
+ }
+ }
+ keys.push(segment[1]);
+ }
+
+ // If there's a remainder, just add whatever is left
+
+ if (segment) {
+ keys.push('[' + key.slice(segment.index) + ']');
+ }
+
+ return parseObject(keys, val, options);
+};
+
+module.exports = function (str, opts) {
+ var options = opts || {};
+
+ if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') {
+ throw new TypeError('Decoder has to be a function.');
+ }
+
+ options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;
+ options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;
+ options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;
+ options.parseArrays = options.parseArrays !== false;
+ options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder;
+ options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots;
+ options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects;
+ options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes;
+ options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit;
+ options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
+
+ if (str === '' || str === null || typeof str === 'undefined') {
+ return options.plainObjects ? Object.create(null) : {};
+ }
+
+ var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
+ var obj = options.plainObjects ? Object.create(null) : {};
+
+ // Iterate over the keys and setup the new object
+
+ var keys = Object.keys(tempObj);
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ var newObj = parseKeys(key, tempObj[key], options);
+ obj = Utils.merge(obj, newObj, options);
+ }
+
+ return Utils.compact(obj);
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/lib/stringify.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/lib/stringify.js
new file mode 100644
index 0000000..6e1c9a2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/lib/stringify.js
@@ -0,0 +1,137 @@
+'use strict';
+
+var Utils = require('./utils');
+
+var arrayPrefixGenerators = {
+ brackets: function brackets(prefix) {
+ return prefix + '[]';
+ },
+ indices: function indices(prefix, key) {
+ return prefix + '[' + key + ']';
+ },
+ repeat: function repeat(prefix) {
+ return prefix;
+ }
+};
+
+var defaults = {
+ delimiter: '&',
+ strictNullHandling: false,
+ skipNulls: false,
+ encode: true,
+ encoder: Utils.encode
+};
+
+var stringify = function stringify(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots) {
+ var obj = object;
+ if (typeof filter === 'function') {
+ obj = filter(prefix, obj);
+ } else if (obj instanceof Date) {
+ obj = obj.toISOString();
+ } else if (obj === null) {
+ if (strictNullHandling) {
+ return encoder ? encoder(prefix) : prefix;
+ }
+
+ obj = '';
+ }
+
+ if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || Utils.isBuffer(obj)) {
+ if (encoder) {
+ return [encoder(prefix) + '=' + encoder(obj)];
+ }
+ return [prefix + '=' + String(obj)];
+ }
+
+ var values = [];
+
+ if (typeof obj === 'undefined') {
+ return values;
+ }
+
+ var objKeys;
+ if (Array.isArray(filter)) {
+ objKeys = filter;
+ } else {
+ var keys = Object.keys(obj);
+ objKeys = sort ? keys.sort(sort) : keys;
+ }
+
+ for (var i = 0; i < objKeys.length; ++i) {
+ var key = objKeys[i];
+
+ if (skipNulls && obj[key] === null) {
+ continue;
+ }
+
+ if (Array.isArray(obj)) {
+ values = values.concat(stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
+ } else {
+ values = values.concat(stringify(obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
+ }
+ }
+
+ return values;
+};
+
+module.exports = function (object, opts) {
+ var obj = object;
+ var options = opts || {};
+ var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter;
+ var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
+ var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls;
+ var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode;
+ var encoder = encode ? (typeof options.encoder === 'function' ? options.encoder : defaults.encoder) : null;
+ var sort = typeof options.sort === 'function' ? options.sort : null;
+ var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots;
+ var objKeys;
+ var filter;
+
+ if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {
+ throw new TypeError('Encoder has to be a function.');
+ }
+
+ if (typeof options.filter === 'function') {
+ filter = options.filter;
+ obj = filter('', obj);
+ } else if (Array.isArray(options.filter)) {
+ objKeys = filter = options.filter;
+ }
+
+ var keys = [];
+
+ if (typeof obj !== 'object' || obj === null) {
+ return '';
+ }
+
+ var arrayFormat;
+ if (options.arrayFormat in arrayPrefixGenerators) {
+ arrayFormat = options.arrayFormat;
+ } else if ('indices' in options) {
+ arrayFormat = options.indices ? 'indices' : 'repeat';
+ } else {
+ arrayFormat = 'indices';
+ }
+
+ var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
+
+ if (!objKeys) {
+ objKeys = Object.keys(obj);
+ }
+
+ if (sort) {
+ objKeys.sort(sort);
+ }
+
+ for (var i = 0; i < objKeys.length; ++i) {
+ var key = objKeys[i];
+
+ if (skipNulls && obj[key] === null) {
+ continue;
+ }
+
+ keys = keys.concat(stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
+ }
+
+ return keys.join(delimiter);
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/lib/utils.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/lib/utils.js
new file mode 100644
index 0000000..2c5c8ee
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/lib/utils.js
@@ -0,0 +1,164 @@
+'use strict';
+
+var hexTable = (function () {
+ var array = new Array(256);
+ for (var i = 0; i < 256; ++i) {
+ array[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase();
+ }
+
+ return array;
+}());
+
+exports.arrayToObject = function (source, options) {
+ var obj = options.plainObjects ? Object.create(null) : {};
+ for (var i = 0; i < source.length; ++i) {
+ if (typeof source[i] !== 'undefined') {
+ obj[i] = source[i];
+ }
+ }
+
+ return obj;
+};
+
+exports.merge = function (target, source, options) {
+ if (!source) {
+ return target;
+ }
+
+ if (typeof source !== 'object') {
+ if (Array.isArray(target)) {
+ target.push(source);
+ } else if (typeof target === 'object') {
+ target[source] = true;
+ } else {
+ return [target, source];
+ }
+
+ return target;
+ }
+
+ if (typeof target !== 'object') {
+ return [target].concat(source);
+ }
+
+ var mergeTarget = target;
+ if (Array.isArray(target) && !Array.isArray(source)) {
+ mergeTarget = exports.arrayToObject(target, options);
+ }
+
+ return Object.keys(source).reduce(function (acc, key) {
+ var value = source[key];
+
+ if (Object.prototype.hasOwnProperty.call(acc, key)) {
+ acc[key] = exports.merge(acc[key], value, options);
+ } else {
+ acc[key] = value;
+ }
+ return acc;
+ }, mergeTarget);
+};
+
+exports.decode = function (str) {
+ try {
+ return decodeURIComponent(str.replace(/\+/g, ' '));
+ } catch (e) {
+ return str;
+ }
+};
+
+exports.encode = function (str) {
+ // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
+ // It has been adapted here for stricter adherence to RFC 3986
+ if (str.length === 0) {
+ return str;
+ }
+
+ var string = typeof str === 'string' ? str : String(str);
+
+ var out = '';
+ for (var i = 0; i < string.length; ++i) {
+ var c = string.charCodeAt(i);
+
+ if (
+ c === 0x2D || // -
+ c === 0x2E || // .
+ c === 0x5F || // _
+ c === 0x7E || // ~
+ (c >= 0x30 && c <= 0x39) || // 0-9
+ (c >= 0x41 && c <= 0x5A) || // a-z
+ (c >= 0x61 && c <= 0x7A) // A-Z
+ ) {
+ out += string.charAt(i);
+ continue;
+ }
+
+ if (c < 0x80) {
+ out = out + hexTable[c];
+ continue;
+ }
+
+ if (c < 0x800) {
+ out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
+ continue;
+ }
+
+ if (c < 0xD800 || c >= 0xE000) {
+ out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
+ continue;
+ }
+
+ i += 1;
+ c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
+ out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)];
+ }
+
+ return out;
+};
+
+exports.compact = function (obj, references) {
+ if (typeof obj !== 'object' || obj === null) {
+ return obj;
+ }
+
+ var refs = references || [];
+ var lookup = refs.indexOf(obj);
+ if (lookup !== -1) {
+ return refs[lookup];
+ }
+
+ refs.push(obj);
+
+ if (Array.isArray(obj)) {
+ var compacted = [];
+
+ for (var i = 0; i < obj.length; ++i) {
+ if (obj[i] && typeof obj[i] === 'object') {
+ compacted.push(exports.compact(obj[i], refs));
+ } else if (typeof obj[i] !== 'undefined') {
+ compacted.push(obj[i]);
+ }
+ }
+
+ return compacted;
+ }
+
+ var keys = Object.keys(obj);
+ for (var j = 0; j < keys.length; ++j) {
+ var key = keys[j];
+ obj[key] = exports.compact(obj[key], refs);
+ }
+
+ return obj;
+};
+
+exports.isRegExp = function (obj) {
+ return Object.prototype.toString.call(obj) === '[object RegExp]';
+};
+
+exports.isBuffer = function (obj) {
+ if (obj === null || typeof obj === 'undefined') {
+ return false;
+ }
+
+ return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/package.json
new file mode 100644
index 0000000..776e1ed
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/package.json
@@ -0,0 +1,85 @@
+{
+ "name": "qs",
+ "description": "A querystring parser that supports nesting and arrays, with a depth limit",
+ "homepage": "https://github.com/ljharb/qs",
+ "version": "6.2.0",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/ljharb/qs.git"
+ },
+ "main": "lib/index.js",
+ "contributors": [
+ {
+ "name": "Jordan Harband",
+ "email": "ljharb@gmail.com",
+ "url": "http://ljharb.codes"
+ }
+ ],
+ "keywords": [
+ "querystring",
+ "qs"
+ ],
+ "engines": {
+ "node": ">=0.6"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "browserify": "^13.0.1",
+ "tape": "^4.5.1",
+ "covert": "^1.1.0",
+ "mkdirp": "^0.5.1",
+ "eslint": "^2.9.0",
+ "@ljharb/eslint-config": "^4.0.0",
+ "parallelshell": "^2.0.0",
+ "iconv-lite": "^0.4.13",
+ "evalmd": "^0.0.17"
+ },
+ "scripts": {
+ "pretest": "parallelshell 'npm run --silent readme' 'npm run --silent lint'",
+ "test": "npm run --silent coverage",
+ "tests-only": "node test",
+ "readme": "evalmd README.md",
+ "lint": "eslint lib/*.js text/*.js",
+ "coverage": "covert test",
+ "dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js",
+ "prepublish": "npm run dist"
+ },
+ "license": "BSD-3-Clause",
+ "gitHead": "d67d315b606c6bb809fedcbeebbbdb7f863852aa",
+ "bugs": {
+ "url": "https://github.com/ljharb/qs/issues"
+ },
+ "_id": "qs@6.2.0",
+ "_shasum": "3b7848c03c2dece69a9522b0fae8c4126d745f3b",
+ "_from": "qs@6.2.0",
+ "_npmVersion": "3.8.6",
+ "_nodeVersion": "6.1.0",
+ "_npmUser": {
+ "name": "ljharb",
+ "email": "ljharb@gmail.com"
+ },
+ "dist": {
+ "shasum": "3b7848c03c2dece69a9522b0fae8c4126d745f3b",
+ "tarball": "https://registry.npmjs.org/qs/-/qs-6.2.0.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "hueniverse",
+ "email": "eran@hammer.io"
+ },
+ {
+ "name": "ljharb",
+ "email": "ljharb@gmail.com"
+ },
+ {
+ "name": "nlf",
+ "email": "quitlahok@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/qs-6.2.0.tgz_1462749349998_0.03372702235355973"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/qs/-/qs-6.2.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/test/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/test/index.js
new file mode 100644
index 0000000..b6a7d95
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/test/index.js
@@ -0,0 +1,5 @@
+require('./parse');
+
+require('./stringify');
+
+require('./utils');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/test/parse.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/test/parse.js
new file mode 100644
index 0000000..1b79daf
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/test/parse.js
@@ -0,0 +1,423 @@
+'use strict';
+
+var test = require('tape');
+var qs = require('../');
+var iconv = require('iconv-lite');
+
+test('parse()', function (t) {
+ t.test('parses a simple string', function (st) {
+ st.deepEqual(qs.parse('0=foo'), { '0': 'foo' });
+ st.deepEqual(qs.parse('foo=c++'), { foo: 'c ' });
+ st.deepEqual(qs.parse('a[>=]=23'), { a: { '>=': '23' } });
+ st.deepEqual(qs.parse('a[<=>]==23'), { a: { '<=>': '=23' } });
+ st.deepEqual(qs.parse('a[==]=23'), { a: { '==': '23' } });
+ st.deepEqual(qs.parse('foo', { strictNullHandling: true }), { foo: null });
+ st.deepEqual(qs.parse('foo'), { foo: '' });
+ st.deepEqual(qs.parse('foo='), { foo: '' });
+ st.deepEqual(qs.parse('foo=bar'), { foo: 'bar' });
+ st.deepEqual(qs.parse(' foo = bar = baz '), { ' foo ': ' bar = baz ' });
+ st.deepEqual(qs.parse('foo=bar=baz'), { foo: 'bar=baz' });
+ st.deepEqual(qs.parse('foo=bar&bar=baz'), { foo: 'bar', bar: 'baz' });
+ st.deepEqual(qs.parse('foo2=bar2&baz2='), { foo2: 'bar2', baz2: '' });
+ st.deepEqual(qs.parse('foo=bar&baz', { strictNullHandling: true }), { foo: 'bar', baz: null });
+ st.deepEqual(qs.parse('foo=bar&baz'), { foo: 'bar', baz: '' });
+ st.deepEqual(qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World'), {
+ cht: 'p3',
+ chd: 't:60,40',
+ chs: '250x100',
+ chl: 'Hello|World'
+ });
+ st.end();
+ });
+
+ t.test('allows enabling dot notation', function (st) {
+ st.deepEqual(qs.parse('a.b=c'), { 'a.b': 'c' });
+ st.deepEqual(qs.parse('a.b=c', { allowDots: true }), { a: { b: 'c' } });
+ st.end();
+ });
+
+ t.deepEqual(qs.parse('a[b]=c'), { a: { b: 'c' } }, 'parses a single nested string');
+ t.deepEqual(qs.parse('a[b][c]=d'), { a: { b: { c: 'd' } } }, 'parses a double nested string');
+ t.deepEqual(
+ qs.parse('a[b][c][d][e][f][g][h]=i'),
+ { a: { b: { c: { d: { e: { f: { '[g][h]': 'i' } } } } } } },
+ 'defaults to a depth of 5'
+ );
+
+ t.test('only parses one level when depth = 1', function (st) {
+ st.deepEqual(qs.parse('a[b][c]=d', { depth: 1 }), { a: { b: { '[c]': 'd' } } });
+ st.deepEqual(qs.parse('a[b][c][d]=e', { depth: 1 }), { a: { b: { '[c][d]': 'e' } } });
+ st.end();
+ });
+
+ t.deepEqual(qs.parse('a=b&a=c'), { a: ['b', 'c'] }, 'parses a simple array');
+
+ t.test('parses an explicit array', function (st) {
+ st.deepEqual(qs.parse('a[]=b'), { a: ['b'] });
+ st.deepEqual(qs.parse('a[]=b&a[]=c'), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a[]=b&a[]=c&a[]=d'), { a: ['b', 'c', 'd'] });
+ st.end();
+ });
+
+ t.test('parses a mix of simple and explicit arrays', function (st) {
+ st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a[0]=b&a=c'), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a=b&a[0]=c'), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a[1]=b&a=c'), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a=b&a[1]=c'), { a: ['b', 'c'] });
+ st.end();
+ });
+
+ t.test('parses a nested array', function (st) {
+ st.deepEqual(qs.parse('a[b][]=c&a[b][]=d'), { a: { b: ['c', 'd'] } });
+ st.deepEqual(qs.parse('a[>=]=25'), { a: { '>=': '25' } });
+ st.end();
+ });
+
+ t.test('allows to specify array indices', function (st) {
+ st.deepEqual(qs.parse('a[1]=c&a[0]=b&a[2]=d'), { a: ['b', 'c', 'd'] });
+ st.deepEqual(qs.parse('a[1]=c&a[0]=b'), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a[1]=c'), { a: ['c'] });
+ st.end();
+ });
+
+ t.test('limits specific array indices to 20', function (st) {
+ st.deepEqual(qs.parse('a[20]=a'), { a: ['a'] });
+ st.deepEqual(qs.parse('a[21]=a'), { a: { '21': 'a' } });
+ st.end();
+ });
+
+ t.deepEqual(qs.parse('a[12b]=c'), { a: { '12b': 'c' } }, 'supports keys that begin with a number');
+
+ t.test('supports encoded = signs', function (st) {
+ st.deepEqual(qs.parse('he%3Dllo=th%3Dere'), { 'he=llo': 'th=ere' });
+ st.end();
+ });
+
+ t.test('is ok with url encoded strings', function (st) {
+ st.deepEqual(qs.parse('a[b%20c]=d'), { a: { 'b c': 'd' } });
+ st.deepEqual(qs.parse('a[b]=c%20d'), { a: { b: 'c d' } });
+ st.end();
+ });
+
+ t.test('allows brackets in the value', function (st) {
+ st.deepEqual(qs.parse('pets=["tobi"]'), { pets: '["tobi"]' });
+ st.deepEqual(qs.parse('operators=[">=", "<="]'), { operators: '[">=", "<="]' });
+ st.end();
+ });
+
+ t.test('allows empty values', function (st) {
+ st.deepEqual(qs.parse(''), {});
+ st.deepEqual(qs.parse(null), {});
+ st.deepEqual(qs.parse(undefined), {});
+ st.end();
+ });
+
+ t.test('transforms arrays to objects', function (st) {
+ st.deepEqual(qs.parse('foo[0]=bar&foo[bad]=baz'), { foo: { '0': 'bar', bad: 'baz' } });
+ st.deepEqual(qs.parse('foo[bad]=baz&foo[0]=bar'), { foo: { bad: 'baz', '0': 'bar' } });
+ st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar'), { foo: { bad: 'baz', '0': 'bar' } });
+ st.deepEqual(qs.parse('foo[]=bar&foo[bad]=baz'), { foo: { '0': 'bar', bad: 'baz' } });
+ st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo'), { foo: { bad: 'baz', '0': 'bar', '1': 'foo' } });
+ st.deepEqual(qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb'), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] });
+ st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c'), { a: { '0': 'b', t: 'u', c: true } });
+ st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y'), { a: { '0': 'b', '1': 'c', x: 'y' } });
+ st.end();
+ });
+
+ t.test('transforms arrays to objects (dot notation)', function (st) {
+ st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: 'baz' } });
+ st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad.boo=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: { boo: 'baz' } } });
+ st.deepEqual(qs.parse('foo[0][0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [[{ baz: 'bar' }]], fool: { bad: 'baz' } });
+ st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15'], bar: '2' }] });
+ st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].baz[1]=16&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15', '16'], bar: '2' }] });
+ st.deepEqual(qs.parse('foo.bad=baz&foo[0]=bar', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar' } });
+ st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar' } });
+ st.deepEqual(qs.parse('foo[]=bar&foo.bad=baz', { allowDots: true }), { foo: { '0': 'bar', bad: 'baz' } });
+ st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar&foo[]=foo', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar', '1': 'foo' } });
+ st.deepEqual(qs.parse('foo[0].a=a&foo[0].b=b&foo[1].a=aa&foo[1].b=bb', { allowDots: true }), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] });
+ st.end();
+ });
+
+ t.deepEqual(qs.parse('a[b]=c&a=d'), { a: { b: 'c', d: true } }, 'can add keys to objects');
+
+ t.test('correctly prunes undefined values when converting an array to an object', function (st) {
+ st.deepEqual(qs.parse('a[2]=b&a[99999999]=c'), { a: { '2': 'b', '99999999': 'c' } });
+ st.end();
+ });
+
+ t.test('supports malformed uri characters', function (st) {
+ st.deepEqual(qs.parse('{%:%}', { strictNullHandling: true }), { '{%:%}': null });
+ st.deepEqual(qs.parse('{%:%}='), { '{%:%}': '' });
+ st.deepEqual(qs.parse('foo=%:%}'), { foo: '%:%}' });
+ st.end();
+ });
+
+ t.test('doesn\'t produce empty keys', function (st) {
+ st.deepEqual(qs.parse('_r=1&'), { '_r': '1' });
+ st.end();
+ });
+
+ t.test('cannot access Object prototype', function (st) {
+ qs.parse('constructor[prototype][bad]=bad');
+ qs.parse('bad[constructor][prototype][bad]=bad');
+ st.equal(typeof Object.prototype.bad, 'undefined');
+ st.end();
+ });
+
+ t.test('parses arrays of objects', function (st) {
+ st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] });
+ st.deepEqual(qs.parse('a[0][b]=c'), { a: [{ b: 'c' }] });
+ st.end();
+ });
+
+ t.test('allows for empty strings in arrays', function (st) {
+ st.deepEqual(qs.parse('a[]=b&a[]=&a[]=c'), { a: ['b', '', 'c'] });
+ st.deepEqual(qs.parse('a[0]=b&a[1]&a[2]=c&a[19]=', { strictNullHandling: true }), { a: ['b', null, 'c', ''] });
+ st.deepEqual(qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]', { strictNullHandling: true }), { a: ['b', '', 'c', null] });
+ st.deepEqual(qs.parse('a[]=&a[]=b&a[]=c'), { a: ['', 'b', 'c'] });
+ st.end();
+ });
+
+ t.test('compacts sparse arrays', function (st) {
+ st.deepEqual(qs.parse('a[10]=1&a[2]=2'), { a: ['2', '1'] });
+ st.deepEqual(qs.parse('a[1][b][2][c]=1'), { a: [{ b: [{ c: '1' }] }] });
+ st.deepEqual(qs.parse('a[1][2][3][c]=1'), { a: [[[{ c: '1' }]]] });
+ st.deepEqual(qs.parse('a[1][2][3][c][1]=1'), { a: [[[{ c: ['1'] }]]] });
+ st.end();
+ });
+
+ t.test('parses semi-parsed strings', function (st) {
+ st.deepEqual(qs.parse({ 'a[b]': 'c' }), { a: { b: 'c' } });
+ st.deepEqual(qs.parse({ 'a[b]': 'c', 'a[d]': 'e' }), { a: { b: 'c', d: 'e' } });
+ st.end();
+ });
+
+ t.test('parses buffers correctly', function (st) {
+ var b = new Buffer('test');
+ st.deepEqual(qs.parse({ a: b }), { a: b });
+ st.end();
+ });
+
+ t.test('continues parsing when no parent is found', function (st) {
+ st.deepEqual(qs.parse('[]=&a=b'), { '0': '', a: 'b' });
+ st.deepEqual(qs.parse('[]&a=b', { strictNullHandling: true }), { '0': null, a: 'b' });
+ st.deepEqual(qs.parse('[foo]=bar'), { foo: 'bar' });
+ st.end();
+ });
+
+ t.test('does not error when parsing a very long array', function (st) {
+ var str = 'a[]=a';
+ while (Buffer.byteLength(str) < 128 * 1024) {
+ str = str + '&' + str;
+ }
+
+ st.doesNotThrow(function () { qs.parse(str); });
+
+ st.end();
+ });
+
+ t.test('should not throw when a native prototype has an enumerable property', { parallel: false }, function (st) {
+ Object.prototype.crash = '';
+ Array.prototype.crash = '';
+ st.doesNotThrow(qs.parse.bind(null, 'a=b'));
+ st.deepEqual(qs.parse('a=b'), { a: 'b' });
+ st.doesNotThrow(qs.parse.bind(null, 'a[][b]=c'));
+ st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] });
+ delete Object.prototype.crash;
+ delete Array.prototype.crash;
+ st.end();
+ });
+
+ t.test('parses a string with an alternative string delimiter', function (st) {
+ st.deepEqual(qs.parse('a=b;c=d', { delimiter: ';' }), { a: 'b', c: 'd' });
+ st.end();
+ });
+
+ t.test('parses a string with an alternative RegExp delimiter', function (st) {
+ st.deepEqual(qs.parse('a=b; c=d', { delimiter: /[;,] */ }), { a: 'b', c: 'd' });
+ st.end();
+ });
+
+ t.test('does not use non-splittable objects as delimiters', function (st) {
+ st.deepEqual(qs.parse('a=b&c=d', { delimiter: true }), { a: 'b', c: 'd' });
+ st.end();
+ });
+
+ t.test('allows overriding parameter limit', function (st) {
+ st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: 1 }), { a: 'b' });
+ st.end();
+ });
+
+ t.test('allows setting the parameter limit to Infinity', function (st) {
+ st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: Infinity }), { a: 'b', c: 'd' });
+ st.end();
+ });
+
+ t.test('allows overriding array limit', function (st) {
+ st.deepEqual(qs.parse('a[0]=b', { arrayLimit: -1 }), { a: { '0': 'b' } });
+ st.deepEqual(qs.parse('a[-1]=b', { arrayLimit: -1 }), { a: { '-1': 'b' } });
+ st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 }), { a: { '0': 'b', '1': 'c' } });
+ st.end();
+ });
+
+ t.test('allows disabling array parsing', function (st) {
+ st.deepEqual(qs.parse('a[0]=b&a[1]=c', { parseArrays: false }), { a: { '0': 'b', '1': 'c' } });
+ st.end();
+ });
+
+ t.test('parses an object', function (st) {
+ var input = {
+ 'user[name]': { 'pop[bob]': 3 },
+ 'user[email]': null
+ };
+
+ var expected = {
+ user: {
+ name: { 'pop[bob]': 3 },
+ email: null
+ }
+ };
+
+ var result = qs.parse(input);
+
+ st.deepEqual(result, expected);
+ st.end();
+ });
+
+ t.test('parses an object in dot notation', function (st) {
+ var input = {
+ 'user.name': { 'pop[bob]': 3 },
+ 'user.email.': null
+ };
+
+ var expected = {
+ user: {
+ name: { 'pop[bob]': 3 },
+ email: null
+ }
+ };
+
+ var result = qs.parse(input, { allowDots: true });
+
+ st.deepEqual(result, expected);
+ st.end();
+ });
+
+ t.test('parses an object and not child values', function (st) {
+ var input = {
+ 'user[name]': { 'pop[bob]': { 'test': 3 } },
+ 'user[email]': null
+ };
+
+ var expected = {
+ user: {
+ name: { 'pop[bob]': { 'test': 3 } },
+ email: null
+ }
+ };
+
+ var result = qs.parse(input);
+
+ st.deepEqual(result, expected);
+ st.end();
+ });
+
+ t.test('does not blow up when Buffer global is missing', function (st) {
+ var tempBuffer = global.Buffer;
+ delete global.Buffer;
+ var result = qs.parse('a=b&c=d');
+ global.Buffer = tempBuffer;
+ st.deepEqual(result, { a: 'b', c: 'd' });
+ st.end();
+ });
+
+ t.test('does not crash when parsing circular references', function (st) {
+ var a = {};
+ a.b = a;
+
+ var parsed;
+
+ st.doesNotThrow(function () {
+ parsed = qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a });
+ });
+
+ st.equal('foo' in parsed, true, 'parsed has "foo" property');
+ st.equal('bar' in parsed.foo, true);
+ st.equal('baz' in parsed.foo, true);
+ st.equal(parsed.foo.bar, 'baz');
+ st.deepEqual(parsed.foo.baz, a);
+ st.end();
+ });
+
+ t.test('parses plain objects correctly', function (st) {
+ var a = Object.create(null);
+ a.b = 'c';
+
+ st.deepEqual(qs.parse(a), { b: 'c' });
+ var result = qs.parse({ a: a });
+ st.equal('a' in result, true, 'result has "a" property');
+ st.deepEqual(result.a, a);
+ st.end();
+ });
+
+ t.test('parses dates correctly', function (st) {
+ var now = new Date();
+ st.deepEqual(qs.parse({ a: now }), { a: now });
+ st.end();
+ });
+
+ t.test('parses regular expressions correctly', function (st) {
+ var re = /^test$/;
+ st.deepEqual(qs.parse({ a: re }), { a: re });
+ st.end();
+ });
+
+ t.test('can allow overwriting prototype properties', function (st) {
+ st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }), { a: { hasOwnProperty: 'b' } }, { prototype: false });
+ st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: true }), { hasOwnProperty: 'b' }, { prototype: false });
+ st.end();
+ });
+
+ t.test('can return plain objects', function (st) {
+ var expected = Object.create(null);
+ expected.a = Object.create(null);
+ expected.a.b = 'c';
+ expected.a.hasOwnProperty = 'd';
+ st.deepEqual(qs.parse('a[b]=c&a[hasOwnProperty]=d', { plainObjects: true }), expected);
+ st.deepEqual(qs.parse(null, { plainObjects: true }), Object.create(null));
+ var expectedArray = Object.create(null);
+ expectedArray.a = Object.create(null);
+ expectedArray.a['0'] = 'b';
+ expectedArray.a.c = 'd';
+ st.deepEqual(qs.parse('a[]=b&a[c]=d', { plainObjects: true }), expectedArray);
+ st.end();
+ });
+
+ t.test('can parse with custom encoding', function (st) {
+ st.deepEqual(qs.parse('%8c%a7=%91%e5%8d%e3%95%7b', {
+ decoder: function (str) {
+ var reg = /\%([0-9A-F]{2})/ig;
+ var result = [];
+ var parts;
+ var last = 0;
+ while (parts = reg.exec(str)) {
+ result.push(parseInt(parts[1], 16));
+ last = parts.index + parts[0].length;
+ }
+ return iconv.decode(new Buffer(result), 'shift_jis').toString();
+ }
+ }), { 県: '大阪府' });
+ st.end();
+ });
+
+ t.test('throws error with wrong decoder', function (st) {
+ st.throws(function () {
+ qs.parse({}, {
+ decoder: 'string'
+ });
+ }, new TypeError('Decoder has to be a function.'));
+ st.end();
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/test/stringify.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/test/stringify.js
new file mode 100644
index 0000000..699397e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/test/stringify.js
@@ -0,0 +1,305 @@
+'use strict';
+
+var test = require('tape');
+var qs = require('../');
+var iconv = require('iconv-lite');
+
+test('stringify()', function (t) {
+ t.test('stringifies a querystring object', function (st) {
+ st.equal(qs.stringify({ a: 'b' }), 'a=b');
+ st.equal(qs.stringify({ a: 1 }), 'a=1');
+ st.equal(qs.stringify({ a: 1, b: 2 }), 'a=1&b=2');
+ st.equal(qs.stringify({ a: 'A_Z' }), 'a=A_Z');
+ st.equal(qs.stringify({ a: '€' }), 'a=%E2%82%AC');
+ st.equal(qs.stringify({ a: '' }), 'a=%EE%80%80');
+ st.equal(qs.stringify({ a: '×' }), 'a=%D7%90');
+ st.equal(qs.stringify({ a: 'ð·' }), 'a=%F0%90%90%B7');
+ st.end();
+ });
+
+ t.test('stringifies a nested object', function (st) {
+ st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c');
+ st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }), 'a%5Bb%5D%5Bc%5D%5Bd%5D=e');
+ st.end();
+ });
+
+ t.test('stringifies a nested object with dots notation', function (st) {
+ st.equal(qs.stringify({ a: { b: 'c' } }, { allowDots: true }), 'a.b=c');
+ st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }, { allowDots: true }), 'a.b.c.d=e');
+ st.end();
+ });
+
+ t.test('stringifies an array value', function (st) {
+ st.equal(qs.stringify({ a: ['b', 'c', 'd'] }), 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d');
+ st.end();
+ });
+
+ t.test('omits nulls when asked', function (st) {
+ st.equal(qs.stringify({ a: 'b', c: null }, { skipNulls: true }), 'a=b');
+ st.end();
+ });
+
+
+ t.test('omits nested nulls when asked', function (st) {
+ st.equal(qs.stringify({ a: { b: 'c', d: null } }, { skipNulls: true }), 'a%5Bb%5D=c');
+ st.end();
+ });
+
+ t.test('omits array indices when asked', function (st) {
+ st.equal(qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }), 'a=b&a=c&a=d');
+ st.end();
+ });
+
+ t.test('stringifies a nested array value', function (st) {
+ st.equal(qs.stringify({ a: { b: ['c', 'd'] } }), 'a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d');
+ st.end();
+ });
+
+ t.test('stringifies a nested array value with dots notation', function (st) {
+ st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { allowDots: true, encode: false }), 'a.b[0]=c&a.b[1]=d');
+ st.end();
+ });
+
+ t.test('stringifies an object inside an array', function (st) {
+ st.equal(qs.stringify({ a: [{ b: 'c' }] }), 'a%5B0%5D%5Bb%5D=c');
+ st.equal(qs.stringify({ a: [{ b: { c: [1] } }] }), 'a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1');
+ st.end();
+ });
+
+ t.test('stringifies an array with mixed objects and primitives', function (st) {
+ st.equal(qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false }), 'a[0][b]=1&a[1]=2&a[2]=3');
+ st.end();
+ });
+
+ t.test('stringifies an object inside an array with dots notation', function (st) {
+ st.equal(qs.stringify({ a: [{ b: 'c' }] }, { allowDots: true, encode: false }), 'a[0].b=c');
+ st.equal(qs.stringify({ a: [{ b: { c: [1] } }] }, { allowDots: true, encode: false }), 'a[0].b.c[0]=1');
+ st.end();
+ });
+
+ t.test('does not omit object keys when indices = false', function (st) {
+ st.equal(qs.stringify({ a: [{ b: 'c' }] }, { indices: false }), 'a%5Bb%5D=c');
+ st.end();
+ });
+
+ t.test('uses indices notation for arrays when indices=true', function (st) {
+ st.equal(qs.stringify({ a: ['b', 'c'] }, { indices: true }), 'a%5B0%5D=b&a%5B1%5D=c');
+ st.end();
+ });
+
+ t.test('uses indices notation for arrays when no arrayFormat is specified', function (st) {
+ st.equal(qs.stringify({ a: ['b', 'c'] }), 'a%5B0%5D=b&a%5B1%5D=c');
+ st.end();
+ });
+
+ t.test('uses indices notation for arrays when no arrayFormat=indices', function (st) {
+ st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }), 'a%5B0%5D=b&a%5B1%5D=c');
+ st.end();
+ });
+
+ t.test('uses repeat notation for arrays when no arrayFormat=repeat', function (st) {
+ st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }), 'a=b&a=c');
+ st.end();
+ });
+
+ t.test('uses brackets notation for arrays when no arrayFormat=brackets', function (st) {
+ st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }), 'a%5B%5D=b&a%5B%5D=c');
+ st.end();
+ });
+
+ t.test('stringifies a complicated object', function (st) {
+ st.equal(qs.stringify({ a: { b: 'c', d: 'e' } }), 'a%5Bb%5D=c&a%5Bd%5D=e');
+ st.end();
+ });
+
+ t.test('stringifies an empty value', function (st) {
+ st.equal(qs.stringify({ a: '' }), 'a=');
+ st.equal(qs.stringify({ a: null }, { strictNullHandling: true }), 'a');
+
+ st.equal(qs.stringify({ a: '', b: '' }), 'a=&b=');
+ st.equal(qs.stringify({ a: null, b: '' }, { strictNullHandling: true }), 'a&b=');
+
+ st.equal(qs.stringify({ a: { b: '' } }), 'a%5Bb%5D=');
+ st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: true }), 'a%5Bb%5D');
+ st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: false }), 'a%5Bb%5D=');
+
+ st.end();
+ });
+
+ t.test('stringifies an empty object', function (st) {
+ var obj = Object.create(null);
+ obj.a = 'b';
+ st.equal(qs.stringify(obj), 'a=b');
+ st.end();
+ });
+
+ t.test('returns an empty string for invalid input', function (st) {
+ st.equal(qs.stringify(undefined), '');
+ st.equal(qs.stringify(false), '');
+ st.equal(qs.stringify(null), '');
+ st.equal(qs.stringify(''), '');
+ st.end();
+ });
+
+ t.test('stringifies an object with an empty object as a child', function (st) {
+ var obj = {
+ a: Object.create(null)
+ };
+
+ obj.a.b = 'c';
+ st.equal(qs.stringify(obj), 'a%5Bb%5D=c');
+ st.end();
+ });
+
+ t.test('drops keys with a value of undefined', function (st) {
+ st.equal(qs.stringify({ a: undefined }), '');
+
+ st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: true }), 'a%5Bc%5D');
+ st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: false }), 'a%5Bc%5D=');
+ st.equal(qs.stringify({ a: { b: undefined, c: '' } }), 'a%5Bc%5D=');
+ st.end();
+ });
+
+ t.test('url encodes values', function (st) {
+ st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c');
+ st.end();
+ });
+
+ t.test('stringifies a date', function (st) {
+ var now = new Date();
+ var str = 'a=' + encodeURIComponent(now.toISOString());
+ st.equal(qs.stringify({ a: now }), str);
+ st.end();
+ });
+
+ t.test('stringifies the weird object from qs', function (st) {
+ st.equal(qs.stringify({ 'my weird field': '~q1!2"\'w$5&7/z8)?' }), 'my%20weird%20field=~q1%212%22%27w%245%267%2Fz8%29%3F');
+ st.end();
+ });
+
+ t.test('skips properties that are part of the object prototype', function (st) {
+ Object.prototype.crash = 'test';
+ st.equal(qs.stringify({ a: 'b' }), 'a=b');
+ st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c');
+ delete Object.prototype.crash;
+ st.end();
+ });
+
+ t.test('stringifies boolean values', function (st) {
+ st.equal(qs.stringify({ a: true }), 'a=true');
+ st.equal(qs.stringify({ a: { b: true } }), 'a%5Bb%5D=true');
+ st.equal(qs.stringify({ b: false }), 'b=false');
+ st.equal(qs.stringify({ b: { c: false } }), 'b%5Bc%5D=false');
+ st.end();
+ });
+
+ t.test('stringifies buffer values', function (st) {
+ st.equal(qs.stringify({ a: new Buffer('test') }), 'a=test');
+ st.equal(qs.stringify({ a: { b: new Buffer('test') } }), 'a%5Bb%5D=test');
+ st.end();
+ });
+
+ t.test('stringifies an object using an alternative delimiter', function (st) {
+ st.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d');
+ st.end();
+ });
+
+ t.test('doesn\'t blow up when Buffer global is missing', function (st) {
+ var tempBuffer = global.Buffer;
+ delete global.Buffer;
+ var result = qs.stringify({ a: 'b', c: 'd' });
+ global.Buffer = tempBuffer;
+ st.equal(result, 'a=b&c=d');
+ st.end();
+ });
+
+ t.test('selects properties when filter=array', function (st) {
+ st.equal(qs.stringify({ a: 'b' }, { filter: ['a'] }), 'a=b');
+ st.equal(qs.stringify({ a: 1 }, { filter: [] }), '');
+ st.equal(qs.stringify({ a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, { filter: ['a', 'b', 0, 2] }), 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3');
+ st.end();
+ });
+
+ t.test('supports custom representations when filter=function', function (st) {
+ var calls = 0;
+ var obj = { a: 'b', c: 'd', e: { f: new Date(1257894000000) } };
+ var filterFunc = function (prefix, value) {
+ calls++;
+ if (calls === 1) {
+ st.equal(prefix, '', 'prefix is empty');
+ st.equal(value, obj);
+ } else if (prefix === 'c') {
+ return;
+ } else if (value instanceof Date) {
+ st.equal(prefix, 'e[f]');
+ return value.getTime();
+ }
+ return value;
+ };
+
+ st.equal(qs.stringify(obj, { filter: filterFunc }), 'a=b&e%5Bf%5D=1257894000000');
+ st.equal(calls, 5);
+ st.end();
+ });
+
+ t.test('can disable uri encoding', function (st) {
+ st.equal(qs.stringify({ a: 'b' }, { encode: false }), 'a=b');
+ st.equal(qs.stringify({ a: { b: 'c' } }, { encode: false }), 'a[b]=c');
+ st.equal(qs.stringify({ a: 'b', c: null }, { strictNullHandling: true, encode: false }), 'a=b&c');
+ st.end();
+ });
+
+ t.test('can sort the keys', function (st) {
+ var sort = function (a, b) { return a.localeCompare(b); };
+ st.equal(qs.stringify({ a: 'c', z: 'y', b: 'f' }, { sort: sort }), 'a=c&b=f&z=y');
+ st.equal(qs.stringify({ a: 'c', z: { j: 'a', i: 'b' }, b: 'f' }, { sort: sort }), 'a=c&b=f&z%5Bi%5D=b&z%5Bj%5D=a');
+ st.end();
+ });
+
+ t.test('can sort the keys at depth 3 or more too', function (st) {
+ var sort = function (a, b) { return a.localeCompare(b); };
+ st.equal(qs.stringify({ a: 'a', z: { zj: {zjb: 'zjb', zja: 'zja'}, zi: {zib: 'zib', zia: 'zia'} }, b: 'b' }, { sort: sort, encode: false }), 'a=a&b=b&z[zi][zia]=zia&z[zi][zib]=zib&z[zj][zja]=zja&z[zj][zjb]=zjb');
+ st.equal(qs.stringify({ a: 'a', z: { zj: {zjb: 'zjb', zja: 'zja'}, zi: {zib: 'zib', zia: 'zia'} }, b: 'b' }, { sort: null, encode: false }), 'a=a&z[zj][zjb]=zjb&z[zj][zja]=zja&z[zi][zib]=zib&z[zi][zia]=zia&b=b');
+ st.end();
+ });
+
+ t.test('can stringify with custom encoding', function (st) {
+ st.equal(qs.stringify({ 県: '大阪府', '': ''}, {
+ encoder: function (str) {
+ if (str.length === 0) {
+ return '';
+ }
+ var buf = iconv.encode(str, 'shiftjis');
+ var result = [];
+ for (var i=0; i < buf.length; ++i) {
+ result.push(buf.readUInt8(i).toString(16));
+ }
+ return '%' + result.join('%');
+ }
+ }), '%8c%a7=%91%e5%8d%e3%95%7b&=');
+ st.end();
+ });
+
+ t.test('throws error with wrong encoder', function (st) {
+ st.throws(function () {
+ qs.stringify({}, {
+ encoder: 'string'
+ });
+ }, new TypeError('Encoder has to be a function.'));
+ st.end();
+ });
+
+ t.test('can use custom encoder for a buffer object', {
+ skip: typeof Buffer === 'undefined'
+ }, function (st) {
+ st.equal(qs.stringify({ a: new Buffer([1]) }, {
+ encoder: function (buffer) {
+ if (typeof buffer === 'string') {
+ return buffer;
+ }
+ return String.fromCharCode(buffer.readUInt8(0) + 97);
+ }
+ }), 'a=b');
+ st.end();
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/test/utils.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/test/utils.js
new file mode 100644
index 0000000..4a8d824
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/qs/test/utils.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var test = require('tape');
+var utils = require('../lib/utils');
+
+test('merge()', function (t) {
+ t.deepEqual(utils.merge({ a: 'b' }, { a: 'c' }), { a: ['b', 'c'] }, 'merges two objects with the same key');
+ t.end();
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/range-parser/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/range-parser/HISTORY.md
new file mode 100644
index 0000000..5e01eef
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/range-parser/HISTORY.md
@@ -0,0 +1,51 @@
+1.2.0 / 2016-06-01
+==================
+
+ * Add `combine` option to combine overlapping ranges
+
+1.1.0 / 2016-05-13
+==================
+
+ * Fix incorrectly returning -1 when there is at least one valid range
+ * perf: remove internal function
+
+1.0.3 / 2015-10-29
+==================
+
+ * perf: enable strict mode
+
+1.0.2 / 2014-09-08
+==================
+
+ * Support Node.js 0.6
+
+1.0.1 / 2014-09-07
+==================
+
+ * Move repository to jshttp
+
+1.0.0 / 2013-12-11
+==================
+
+ * Add repository to package.json
+ * Add MIT license
+
+0.0.4 / 2012-06-17
+==================
+
+ * Change ret -1 for unsatisfiable and -2 when invalid
+
+0.0.3 / 2012-06-17
+==================
+
+ * Fix last-byte-pos default to len - 1
+
+0.0.2 / 2012-06-14
+==================
+
+ * Add `.type`
+
+0.0.1 / 2012-06-11
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/range-parser/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/range-parser/LICENSE
new file mode 100644
index 0000000..3599954
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/range-parser/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2012-2014 TJ Holowaychuk <tj@vision-media.ca>
+Copyright (c) 2015-2016 Douglas Christopher Wilson <doug@somethingdoug.com
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/range-parser/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/range-parser/README.md
new file mode 100644
index 0000000..1b24375
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/range-parser/README.md
@@ -0,0 +1,75 @@
+# range-parser
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Range header field parser.
+
+## Installation
+
+```
+$ npm install range-parser
+```
+
+## API
+
+```js
+var parseRange = require('range-parser')
+```
+
+### parseRange(size, header, options)
+
+Parse the given `header` string where `size` is the maximum size of the resource.
+An array of ranges will be returned or negative numbers indicating an error parsing.
+
+ * `-2` signals a malformed header string
+ * `-1` signals an unsatisfiable range
+
+```js
+// parse header from request
+var range = parseRange(size, req.headers.range)
+
+// the type of the range
+if (range.type === 'bytes') {
+ // the ranges
+ range.forEach(function (r) {
+ // do something with r.start and r.end
+ })
+}
+```
+
+#### Options
+
+These properties are accepted in the options object.
+
+##### combine
+
+Specifies if overlapping & adjacent ranges should be combined, defaults to `false`.
+When `true`, ranges will be combined and returned as if they were specified that
+way in the header.
+
+```js
+parseRange(100, 'bytes=50-55,0-10,5-10,56-60', { combine: true })
+// => [
+// { start: 0, end: 10 },
+// { start: 50, end: 60 }
+// ]
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/range-parser.svg
+[npm-url]: https://npmjs.org/package/range-parser
+[node-version-image]: https://img.shields.io/node/v/range-parser.svg
+[node-version-url]: https://nodejs.org/endownload
+[travis-image]: https://img.shields.io/travis/jshttp/range-parser.svg
+[travis-url]: https://travis-ci.org/jshttp/range-parser
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/range-parser.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/range-parser
+[downloads-image]: https://img.shields.io/npm/dm/range-parser.svg
+[downloads-url]: https://npmjs.org/package/range-parser
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/range-parser/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/range-parser/index.js
new file mode 100644
index 0000000..83b2eb6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/range-parser/index.js
@@ -0,0 +1,158 @@
+/*!
+ * range-parser
+ * Copyright(c) 2012-2014 TJ Holowaychuk
+ * Copyright(c) 2015-2016 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = rangeParser
+
+/**
+ * Parse "Range" header `str` relative to the given file `size`.
+ *
+ * @param {Number} size
+ * @param {String} str
+ * @param {Object} [options]
+ * @return {Array}
+ * @public
+ */
+
+function rangeParser (size, str, options) {
+ var index = str.indexOf('=')
+
+ if (index === -1) {
+ return -2
+ }
+
+ // split the range string
+ var arr = str.slice(index + 1).split(',')
+ var ranges = []
+
+ // add ranges type
+ ranges.type = str.slice(0, index)
+
+ // parse all ranges
+ for (var i = 0; i < arr.length; i++) {
+ var range = arr[i].split('-')
+ var start = parseInt(range[0], 10)
+ var end = parseInt(range[1], 10)
+
+ // -nnn
+ if (isNaN(start)) {
+ start = size - end
+ end = size - 1
+ // nnn-
+ } else if (isNaN(end)) {
+ end = size - 1
+ }
+
+ // limit last-byte-pos to current length
+ if (end > size - 1) {
+ end = size - 1
+ }
+
+ // invalid or unsatisifiable
+ if (isNaN(start) || isNaN(end) || start > end || start < 0) {
+ continue
+ }
+
+ // add range
+ ranges.push({
+ start: start,
+ end: end
+ })
+ }
+
+ if (ranges.length < 1) {
+ // unsatisifiable
+ return -1
+ }
+
+ return options && options.combine
+ ? combineRanges(ranges)
+ : ranges
+}
+
+/**
+ * Combine overlapping & adjacent ranges.
+ * @private
+ */
+
+function combineRanges (ranges) {
+ var ordered = ranges.map(mapWithIndex).sort(sortByRangeStart)
+
+ for (var j = 0, i = 1; i < ordered.length; i++) {
+ var range = ordered[i]
+ var current = ordered[j]
+
+ if (range.start > current.end + 1) {
+ // next range
+ ordered[++j] = range
+ } else if (range.end > current.end) {
+ // extend range
+ current.end = range.end
+ current.index = Math.min(current.index, range.index)
+ }
+ }
+
+ // trim ordered array
+ ordered.length = j + 1
+
+ // generate combined range
+ var combined = ordered.sort(sortByRangeIndex).map(mapWithoutIndex)
+
+ // copy ranges type
+ combined.type = ranges.type
+
+ return combined
+}
+
+/**
+ * Map function to add index value to ranges.
+ * @private
+ */
+
+function mapWithIndex (range, index) {
+ return {
+ start: range.start,
+ end: range.end,
+ index: index
+ }
+}
+
+/**
+ * Map function to remove index value from ranges.
+ * @private
+ */
+
+function mapWithoutIndex (range) {
+ return {
+ start: range.start,
+ end: range.end
+ }
+}
+
+/**
+ * Sort function to sort ranges by index.
+ * @private
+ */
+
+function sortByRangeIndex (a, b) {
+ return a.index - b.index
+}
+
+/**
+ * Sort function to sort ranges by start position.
+ * @private
+ */
+
+function sortByRangeStart (a, b) {
+ return a.start - b.start
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/range-parser/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/range-parser/package.json
new file mode 100644
index 0000000..d7e8dea
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/range-parser/package.json
@@ -0,0 +1,98 @@
+{
+ "name": "range-parser",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca",
+ "url": "http://tjholowaychuk.com"
+ },
+ "description": "Range header field string parser",
+ "version": "1.2.0",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "James Wyatt Cready",
+ "email": "wyatt.cready@lanetix.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "range",
+ "parser",
+ "http"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/range-parser"
+ },
+ "devDependencies": {
+ "eslint": "2.11.1",
+ "eslint-config-standard": "5.3.1",
+ "eslint-plugin-promise": "1.1.0",
+ "eslint-plugin-standard": "1.3.2",
+ "istanbul": "0.4.3",
+ "mocha": "1.21.5"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "lint": "eslint **/*.js",
+ "test": "mocha --reporter spec",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"
+ },
+ "gitHead": "0665aca31639d799dee1d35fb10970799559ec48",
+ "bugs": {
+ "url": "https://github.com/jshttp/range-parser/issues"
+ },
+ "homepage": "https://github.com/jshttp/range-parser",
+ "_id": "range-parser@1.2.0",
+ "_shasum": "f49be6b487894ddc40dcc94a322f611092e00d5e",
+ "_from": "range-parser@>=1.2.0 <1.3.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jonathanong",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ }
+ ],
+ "dist": {
+ "shasum": "f49be6b487894ddc40dcc94a322f611092e00d5e",
+ "tarball": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/range-parser-1.2.0.tgz_1464803293097_0.6830497414339334"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/HISTORY.md
new file mode 100644
index 0000000..f30e345
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/HISTORY.md
@@ -0,0 +1,346 @@
+0.14.1 / 2016-06-09
+===================
+
+ * Fix redirect error when `path` contains raw non-URL characters
+ * Fix redirect when `path` starts with multiple forward slashes
+
+0.14.0 / 2016-06-06
+===================
+
+ * Add `acceptRanges` option
+ * Add `cacheControl` option
+ * Attempt to combine multiple ranges into single range
+ * Correctly inherit from `Stream` class
+ * Fix `Content-Range` header in 416 responses when using `start`/`end` options
+ * Fix `Content-Range` header missing from default 416 responses
+ * Ignore non-byte `Range` headers
+ * deps: http-errors@~1.5.0
+ - Add `HttpError` export, for `err instanceof createError.HttpError`
+ - Support new code `421 Misdirected Request`
+ - Use `setprototypeof` module to replace `__proto__` setting
+ - deps: inherits@2.0.1
+ - deps: statuses@'>= 1.3.0 < 2'
+ - perf: enable strict mode
+ * deps: range-parser@~1.2.0
+ - Fix incorrectly returning -1 when there is at least one valid range
+ - perf: remove internal function
+ * deps: statuses@~1.3.0
+ - Add `421 Misdirected Request`
+ - perf: enable strict mode
+ * perf: remove argument reassignment
+
+0.13.2 / 2016-03-05
+===================
+
+ * Fix invalid `Content-Type` header when `send.mime.default_type` unset
+
+0.13.1 / 2016-01-16
+===================
+
+ * deps: depd@~1.1.0
+ - Support web browser loading
+ - perf: enable strict mode
+ * deps: destroy@~1.0.4
+ - perf: enable strict mode
+ * deps: escape-html@~1.0.3
+ - perf: enable strict mode
+ - perf: optimize string replacement
+ - perf: use faster string coercion
+ * deps: range-parser@~1.0.3
+ - perf: enable strict mode
+
+0.13.0 / 2015-06-16
+===================
+
+ * Allow Node.js HTTP server to set `Date` response header
+ * Fix incorrectly removing `Content-Location` on 304 response
+ * Improve the default redirect response headers
+ * Send appropriate headers on default error response
+ * Use `http-errors` for standard emitted errors
+ * Use `statuses` instead of `http` module for status messages
+ * deps: escape-html@1.0.2
+ * deps: etag@~1.7.0
+ - Improve stat performance by removing hashing
+ * deps: fresh@0.3.0
+ - Add weak `ETag` matching support
+ * deps: on-finished@~2.3.0
+ - Add defined behavior for HTTP `CONNECT` requests
+ - Add defined behavior for HTTP `Upgrade` requests
+ - deps: ee-first@1.1.1
+ * perf: enable strict mode
+ * perf: remove unnecessary array allocations
+
+0.12.3 / 2015-05-13
+===================
+
+ * deps: debug@~2.2.0
+ - deps: ms@0.7.1
+ * deps: depd@~1.0.1
+ * deps: etag@~1.6.0
+ - Improve support for JXcore
+ - Support "fake" stats objects in environments without `fs`
+ * deps: ms@0.7.1
+ - Prevent extraordinarily long inputs
+ * deps: on-finished@~2.2.1
+
+0.12.2 / 2015-03-13
+===================
+
+ * Throw errors early for invalid `extensions` or `index` options
+ * deps: debug@~2.1.3
+ - Fix high intensity foreground color for bold
+ - deps: ms@0.7.0
+
+0.12.1 / 2015-02-17
+===================
+
+ * Fix regression sending zero-length files
+
+0.12.0 / 2015-02-16
+===================
+
+ * Always read the stat size from the file
+ * Fix mutating passed-in `options`
+ * deps: mime@1.3.4
+
+0.11.1 / 2015-01-20
+===================
+
+ * Fix `root` path disclosure
+
+0.11.0 / 2015-01-05
+===================
+
+ * deps: debug@~2.1.1
+ * deps: etag@~1.5.1
+ - deps: crc@3.2.1
+ * deps: ms@0.7.0
+ - Add `milliseconds`
+ - Add `msecs`
+ - Add `secs`
+ - Add `mins`
+ - Add `hrs`
+ - Add `yrs`
+ * deps: on-finished@~2.2.0
+
+0.10.1 / 2014-10-22
+===================
+
+ * deps: on-finished@~2.1.1
+ - Fix handling of pipelined requests
+
+0.10.0 / 2014-10-15
+===================
+
+ * deps: debug@~2.1.0
+ - Implement `DEBUG_FD` env variable support
+ * deps: depd@~1.0.0
+ * deps: etag@~1.5.0
+ - Improve string performance
+ - Slightly improve speed for weak ETags over 1KB
+
+0.9.3 / 2014-09-24
+==================
+
+ * deps: etag@~1.4.0
+ - Support "fake" stats objects
+
+0.9.2 / 2014-09-15
+==================
+
+ * deps: depd@0.4.5
+ * deps: etag@~1.3.1
+ * deps: range-parser@~1.0.2
+
+0.9.1 / 2014-09-07
+==================
+
+ * deps: fresh@0.2.4
+
+0.9.0 / 2014-09-07
+==================
+
+ * Add `lastModified` option
+ * Use `etag` to generate `ETag` header
+ * deps: debug@~2.0.0
+
+0.8.5 / 2014-09-04
+==================
+
+ * Fix malicious path detection for empty string path
+
+0.8.4 / 2014-09-04
+==================
+
+ * Fix a path traversal issue when using `root`
+
+0.8.3 / 2014-08-16
+==================
+
+ * deps: destroy@1.0.3
+ - renamed from dethroy
+ * deps: on-finished@2.1.0
+
+0.8.2 / 2014-08-14
+==================
+
+ * Work around `fd` leak in Node.js 0.10 for `fs.ReadStream`
+ * deps: dethroy@1.0.2
+
+0.8.1 / 2014-08-05
+==================
+
+ * Fix `extensions` behavior when file already has extension
+
+0.8.0 / 2014-08-05
+==================
+
+ * Add `extensions` option
+
+0.7.4 / 2014-08-04
+==================
+
+ * Fix serving index files without root dir
+
+0.7.3 / 2014-07-29
+==================
+
+ * Fix incorrect 403 on Windows and Node.js 0.11
+
+0.7.2 / 2014-07-27
+==================
+
+ * deps: depd@0.4.4
+ - Work-around v8 generating empty stack traces
+
+0.7.1 / 2014-07-26
+==================
+
+ * deps: depd@0.4.3
+ - Fix exception when global `Error.stackTraceLimit` is too low
+
+0.7.0 / 2014-07-20
+==================
+
+ * Deprecate `hidden` option; use `dotfiles` option
+ * Add `dotfiles` option
+ * deps: debug@1.0.4
+ * deps: depd@0.4.2
+ - Add `TRACE_DEPRECATION` environment variable
+ - Remove non-standard grey color from color output
+ - Support `--no-deprecation` argument
+ - Support `--trace-deprecation` argument
+
+0.6.0 / 2014-07-11
+==================
+
+ * Deprecate `from` option; use `root` option
+ * Deprecate `send.etag()` -- use `etag` in `options`
+ * Deprecate `send.hidden()` -- use `hidden` in `options`
+ * Deprecate `send.index()` -- use `index` in `options`
+ * Deprecate `send.maxage()` -- use `maxAge` in `options`
+ * Deprecate `send.root()` -- use `root` in `options`
+ * Cap `maxAge` value to 1 year
+ * deps: debug@1.0.3
+ - Add support for multiple wildcards in namespaces
+
+0.5.0 / 2014-06-28
+==================
+
+ * Accept string for `maxAge` (converted by `ms`)
+ * Add `headers` event
+ * Include link in default redirect response
+ * Use `EventEmitter.listenerCount` to count listeners
+
+0.4.3 / 2014-06-11
+==================
+
+ * Do not throw un-catchable error on file open race condition
+ * Use `escape-html` for HTML escaping
+ * deps: debug@1.0.2
+ - fix some debugging output colors on node.js 0.8
+ * deps: finished@1.2.2
+ * deps: fresh@0.2.2
+
+0.4.2 / 2014-06-09
+==================
+
+ * fix "event emitter leak" warnings
+ * deps: debug@1.0.1
+ * deps: finished@1.2.1
+
+0.4.1 / 2014-06-02
+==================
+
+ * Send `max-age` in `Cache-Control` in correct format
+
+0.4.0 / 2014-05-27
+==================
+
+ * Calculate ETag with md5 for reduced collisions
+ * Fix wrong behavior when index file matches directory
+ * Ignore stream errors after request ends
+ - Goodbye `EBADF, read`
+ * Skip directories in index file search
+ * deps: debug@0.8.1
+
+0.3.0 / 2014-04-24
+==================
+
+ * Fix sending files with dots without root set
+ * Coerce option types
+ * Accept API options in options object
+ * Set etags to "weak"
+ * Include file path in etag
+ * Make "Can't set headers after they are sent." catchable
+ * Send full entity-body for multi range requests
+ * Default directory access to 403 when index disabled
+ * Support multiple index paths
+ * Support "If-Range" header
+ * Control whether to generate etags
+ * deps: mime@1.2.11
+
+0.2.0 / 2014-01-29
+==================
+
+ * update range-parser and fresh
+
+0.1.4 / 2013-08-11
+==================
+
+ * update fresh
+
+0.1.3 / 2013-07-08
+==================
+
+ * Revert "Fix fd leak"
+
+0.1.2 / 2013-07-03
+==================
+
+ * Fix fd leak
+
+0.1.0 / 2012-08-25
+==================
+
+ * add options parameter to send() that is passed to fs.createReadStream() [kanongil]
+
+0.0.4 / 2012-08-16
+==================
+
+ * allow custom "Accept-Ranges" definition
+
+0.0.3 / 2012-07-16
+==================
+
+ * fix normalization of the root directory. Closes #3
+
+0.0.2 / 2012-07-09
+==================
+
+ * add passing of req explicitly for now (YUCK)
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/LICENSE
new file mode 100644
index 0000000..4aa69e8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2012 TJ Holowaychuk
+Copyright (c) 2014-2016 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/README.md
new file mode 100644
index 0000000..4167926
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/README.md
@@ -0,0 +1,247 @@
+# send
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Linux Build][travis-image]][travis-url]
+[![Windows Build][appveyor-image]][appveyor-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+[![Gratipay][gratipay-image]][gratipay-url]
+
+Send is a library for streaming files from the file system as a http response
+supporting partial responses (Ranges), conditional-GET negotiation, high test
+coverage, and granular events which may be leveraged to take appropriate actions
+in your application or framework.
+
+Looking to serve up entire folders mapped to URLs? Try [serve-static](https://www.npmjs.org/package/serve-static).
+
+## Installation
+
+```bash
+$ npm install send
+```
+
+## API
+
+```js
+var send = require('send')
+```
+
+### send(req, path, [options])
+
+Create a new `SendStream` for the given path to send to a `res`. The `req` is
+the Node.js HTTP request and the `path` is a urlencoded path to send (urlencoded,
+not the actual file-system path).
+
+#### Options
+
+##### acceptRanges
+
+Enable or disable accepting ranged requests, defaults to true.
+Disabling this will not send `Accept-Ranges` and ignore the contents
+of the `Range` request header.
+
+##### cacheControl
+
+Enable or disable setting `Cache-Control` response header, defaults to
+true. Disabling this will ignore the `maxAge` option.
+
+##### dotfiles
+
+Set how "dotfiles" are treated when encountered. A dotfile is a file
+or directory that begins with a dot ("."). Note this check is done on
+the path itself without checking if the path actually exists on the
+disk. If `root` is specified, only the dotfiles above the root are
+checked (i.e. the root itself can be within a dotfile when when set
+to "deny").
+
+ - `'allow'` No special treatment for dotfiles.
+ - `'deny'` Send a 403 for any request for a dotfile.
+ - `'ignore'` Pretend like the dotfile does not exist and 404.
+
+The default value is _similar_ to `'ignore'`, with the exception that
+this default will not ignore the files within a directory that begins
+with a dot, for backward-compatibility.
+
+##### end
+
+Byte offset at which the stream ends, defaults to the length of the file
+minus 1. The end is inclusive in the stream, meaning `end: 3` will include
+the 4th byte in the stream.
+
+##### etag
+
+Enable or disable etag generation, defaults to true.
+
+##### extensions
+
+If a given file doesn't exist, try appending one of the given extensions,
+in the given order. By default, this is disabled (set to `false`). An
+example value that will serve extension-less HTML files: `['html', 'htm']`.
+This is skipped if the requested file already has an extension.
+
+##### index
+
+By default send supports "index.html" files, to disable this
+set `false` or to supply a new index pass a string or an array
+in preferred order.
+
+##### lastModified
+
+Enable or disable `Last-Modified` header, defaults to true. Uses the file
+system's last modified value.
+
+##### maxAge
+
+Provide a max-age in milliseconds for http caching, defaults to 0.
+This can also be a string accepted by the
+[ms](https://www.npmjs.org/package/ms#readme) module.
+
+##### root
+
+Serve files relative to `path`.
+
+##### start
+
+Byte offset at which the stream starts, defaults to 0. The start is inclusive,
+meaning `start: 2` will include the 3rd byte in the stream.
+
+#### Events
+
+The `SendStream` is an event emitter and will emit the following events:
+
+ - `error` an error occurred `(err)`
+ - `directory` a directory was requested
+ - `file` a file was requested `(path, stat)`
+ - `headers` the headers are about to be set on a file `(res, path, stat)`
+ - `stream` file streaming has started `(stream)`
+ - `end` streaming has completed
+
+#### .pipe
+
+The `pipe` method is used to pipe the response into the Node.js HTTP response
+object, typically `send(req, path, options).pipe(res)`.
+
+### .mime
+
+The `mime` export is the global instance of of the
+[`mime` npm module](https://www.npmjs.com/package/mime).
+
+This is used to configure the MIME types that are associated with file extensions
+as well as other options for how to resolve the MIME type of a file (like the
+default type to use for an unknown file extension).
+
+## Error-handling
+
+By default when no `error` listeners are present an automatic response will be
+made, otherwise you have full control over the response, aka you may show a 5xx
+page etc.
+
+## Caching
+
+It does _not_ perform internal caching, you should use a reverse proxy cache
+such as Varnish for this, or those fancy things called CDNs. If your
+application is small enough that it would benefit from single-node memory
+caching, it's small enough that it does not need caching at all ;).
+
+## Debugging
+
+To enable `debug()` instrumentation output export __DEBUG__:
+
+```
+$ DEBUG=send node app
+```
+
+## Running tests
+
+```
+$ npm install
+$ npm test
+```
+
+## Examples
+
+### Small example
+
+```js
+var http = require('http')
+var parseUrl = require('parseurl')
+var send = require('send')
+
+var app = http.createServer(function onRequest (req, res) {
+ send(req, parseUrl(req).pathname).pipe(res)
+}).listen(3000)
+```
+
+### Custom file types
+
+```js
+var http = require('http')
+var parseUrl = require('parseurl')
+var send = require('send')
+
+// Default unknown types to text/plain
+send.mime.default_type = 'text/plain'
+
+// Add a custom type
+send.mime.define({
+ 'application/x-my-type': ['x-mt', 'x-mtt']
+})
+
+var app = http.createServer(function onRequest (req, res) {
+ send(req, parseUrl(req).pathname).pipe(res)
+}).listen(3000)
+```
+
+### Serving from a root directory with custom error-handling
+
+```js
+var http = require('http')
+var parseUrl = require('parseurl')
+var send = require('send')
+
+var app = http.createServer(function onRequest (req, res) {
+ // your custom error-handling logic:
+ function error (err) {
+ res.statusCode = err.status || 500
+ res.end(err.message)
+ }
+
+ // your custom headers
+ function headers (res, path, stat) {
+ // serve all files for download
+ res.setHeader('Content-Disposition', 'attachment')
+ }
+
+ // your custom directory handling logic:
+ function redirect () {
+ res.statusCode = 301
+ res.setHeader('Location', req.url + '/')
+ res.end('Redirecting to ' + req.url + '/')
+ }
+
+ // transfer arbitrary files from within
+ // /www/example.com/public/*
+ send(req, parseUrl(req).pathname, {root: '/www/example.com/public'})
+ .on('error', error)
+ .on('directory', redirect)
+ .on('headers', headers)
+ .pipe(res);
+}).listen(3000)
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/send.svg
+[npm-url]: https://npmjs.org/package/send
+[travis-image]: https://img.shields.io/travis/pillarjs/send/master.svg?label=linux
+[travis-url]: https://travis-ci.org/pillarjs/send
+[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/send/master.svg?label=windows
+[appveyor-url]: https://ci.appveyor.com/project/dougwilson/send
+[coveralls-image]: https://img.shields.io/coveralls/pillarjs/send/master.svg
+[coveralls-url]: https://coveralls.io/r/pillarjs/send?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/send.svg
+[downloads-url]: https://npmjs.org/package/send
+[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg
+[gratipay-url]: https://www.gratipay.com/dougwilson/
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/index.js
new file mode 100644
index 0000000..81ec0b3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/index.js
@@ -0,0 +1,948 @@
+/*!
+ * send
+ * Copyright(c) 2012 TJ Holowaychuk
+ * Copyright(c) 2014-2016 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var createError = require('http-errors')
+var debug = require('debug')('send')
+var deprecate = require('depd')('send')
+var destroy = require('destroy')
+var encodeUrl = require('encodeurl')
+var escapeHtml = require('escape-html')
+var etag = require('etag')
+var EventEmitter = require('events').EventEmitter
+var fresh = require('fresh')
+var fs = require('fs')
+var mime = require('mime')
+var ms = require('ms')
+var onFinished = require('on-finished')
+var parseRange = require('range-parser')
+var path = require('path')
+var statuses = require('statuses')
+var Stream = require('stream')
+var util = require('util')
+
+/**
+ * Path function references.
+ * @private
+ */
+
+var extname = path.extname
+var join = path.join
+var normalize = path.normalize
+var resolve = path.resolve
+var sep = path.sep
+
+/**
+ * Regular expression for identifying a bytes Range header.
+ * @private
+ */
+
+var BYTES_RANGE_REGEXP = /^ *bytes=/
+
+/**
+ * Maximum value allowed for the max age.
+ * @private
+ */
+
+var MAX_MAXAGE = 60 * 60 * 24 * 365 * 1000 // 1 year
+
+/**
+ * Regular expression to match a path with a directory up component.
+ * @private
+ */
+
+var UP_PATH_REGEXP = /(?:^|[\\\/])\.\.(?:[\\\/]|$)/
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = send
+module.exports.mime = mime
+
+/**
+ * Shim EventEmitter.listenerCount for node.js < 0.10
+ */
+
+/* istanbul ignore next */
+var listenerCount = EventEmitter.listenerCount ||
+ function (emitter, type) { return emitter.listeners(type).length }
+
+/**
+ * Return a `SendStream` for `req` and `path`.
+ *
+ * @param {object} req
+ * @param {string} path
+ * @param {object} [options]
+ * @return {SendStream}
+ * @public
+ */
+
+function send (req, path, options) {
+ return new SendStream(req, path, options)
+}
+
+/**
+ * Initialize a `SendStream` with the given `path`.
+ *
+ * @param {Request} req
+ * @param {String} path
+ * @param {object} [options]
+ * @private
+ */
+
+function SendStream (req, path, options) {
+ Stream.call(this)
+
+ var opts = options || {}
+
+ this.options = opts
+ this.path = path
+ this.req = req
+
+ this._acceptRanges = opts.acceptRanges !== undefined
+ ? Boolean(opts.acceptRanges)
+ : true
+
+ this._cacheControl = opts.cacheControl !== undefined
+ ? Boolean(opts.cacheControl)
+ : true
+
+ this._etag = opts.etag !== undefined
+ ? Boolean(opts.etag)
+ : true
+
+ this._dotfiles = opts.dotfiles !== undefined
+ ? opts.dotfiles
+ : 'ignore'
+
+ if (this._dotfiles !== 'ignore' && this._dotfiles !== 'allow' && this._dotfiles !== 'deny') {
+ throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"')
+ }
+
+ this._hidden = Boolean(opts.hidden)
+
+ if (opts.hidden !== undefined) {
+ deprecate('hidden: use dotfiles: \'' + (this._hidden ? 'allow' : 'ignore') + '\' instead')
+ }
+
+ // legacy support
+ if (opts.dotfiles === undefined) {
+ this._dotfiles = undefined
+ }
+
+ this._extensions = opts.extensions !== undefined
+ ? normalizeList(opts.extensions, 'extensions option')
+ : []
+
+ this._index = opts.index !== undefined
+ ? normalizeList(opts.index, 'index option')
+ : ['index.html']
+
+ this._lastModified = opts.lastModified !== undefined
+ ? Boolean(opts.lastModified)
+ : true
+
+ this._maxage = opts.maxAge || opts.maxage
+ this._maxage = typeof this._maxage === 'string'
+ ? ms(this._maxage)
+ : Number(this._maxage)
+ this._maxage = !isNaN(this._maxage)
+ ? Math.min(Math.max(0, this._maxage), MAX_MAXAGE)
+ : 0
+
+ this._root = opts.root
+ ? resolve(opts.root)
+ : null
+
+ if (!this._root && opts.from) {
+ this.from(opts.from)
+ }
+}
+
+/**
+ * Inherits from `Stream`.
+ */
+
+util.inherits(SendStream, Stream)
+
+/**
+ * Enable or disable etag generation.
+ *
+ * @param {Boolean} val
+ * @return {SendStream}
+ * @api public
+ */
+
+SendStream.prototype.etag = deprecate.function(function etag (val) {
+ this._etag = Boolean(val)
+ debug('etag %s', this._etag)
+ return this
+}, 'send.etag: pass etag as option')
+
+/**
+ * Enable or disable "hidden" (dot) files.
+ *
+ * @param {Boolean} path
+ * @return {SendStream}
+ * @api public
+ */
+
+SendStream.prototype.hidden = deprecate.function(function hidden (val) {
+ this._hidden = Boolean(val)
+ this._dotfiles = undefined
+ debug('hidden %s', this._hidden)
+ return this
+}, 'send.hidden: use dotfiles option')
+
+/**
+ * Set index `paths`, set to a falsy
+ * value to disable index support.
+ *
+ * @param {String|Boolean|Array} paths
+ * @return {SendStream}
+ * @api public
+ */
+
+SendStream.prototype.index = deprecate.function(function index (paths) {
+ var index = !paths ? [] : normalizeList(paths, 'paths argument')
+ debug('index %o', paths)
+ this._index = index
+ return this
+}, 'send.index: pass index as option')
+
+/**
+ * Set root `path`.
+ *
+ * @param {String} path
+ * @return {SendStream}
+ * @api public
+ */
+
+SendStream.prototype.root = function root (path) {
+ this._root = resolve(String(path))
+ debug('root %s', this._root)
+ return this
+}
+
+SendStream.prototype.from = deprecate.function(SendStream.prototype.root,
+ 'send.from: pass root as option')
+
+SendStream.prototype.root = deprecate.function(SendStream.prototype.root,
+ 'send.root: pass root as option')
+
+/**
+ * Set max-age to `maxAge`.
+ *
+ * @param {Number} maxAge
+ * @return {SendStream}
+ * @api public
+ */
+
+SendStream.prototype.maxage = deprecate.function(function maxage (maxAge) {
+ this._maxage = typeof maxAge === 'string'
+ ? ms(maxAge)
+ : Number(maxAge)
+ this._maxage = !isNaN(this._maxage)
+ ? Math.min(Math.max(0, this._maxage), MAX_MAXAGE)
+ : 0
+ debug('max-age %d', this._maxage)
+ return this
+}, 'send.maxage: pass maxAge as option')
+
+/**
+ * Emit error with `status`.
+ *
+ * @param {number} status
+ * @param {Error} [error]
+ * @private
+ */
+
+SendStream.prototype.error = function error (status, error) {
+ // emit if listeners instead of responding
+ if (listenerCount(this, 'error') !== 0) {
+ return this.emit('error', createError(error, status, {
+ expose: false
+ }))
+ }
+
+ var res = this.res
+ var msg = statuses[status]
+
+ // clear existing headers
+ clearHeaders(res)
+
+ // add error headers
+ if (error && error.headers) {
+ setHeaders(res, error.headers)
+ }
+
+ // send basic response
+ res.statusCode = status
+ res.setHeader('Content-Type', 'text/plain; charset=UTF-8')
+ res.setHeader('Content-Length', Buffer.byteLength(msg))
+ res.setHeader('X-Content-Type-Options', 'nosniff')
+ res.end(msg)
+}
+
+/**
+ * Check if the pathname ends with "/".
+ *
+ * @return {Boolean}
+ * @api private
+ */
+
+SendStream.prototype.hasTrailingSlash = function hasTrailingSlash () {
+ return this.path[this.path.length - 1] === '/'
+}
+
+/**
+ * Check if this is a conditional GET request.
+ *
+ * @return {Boolean}
+ * @api private
+ */
+
+SendStream.prototype.isConditionalGET = function isConditionalGET () {
+ return this.req.headers['if-none-match'] ||
+ this.req.headers['if-modified-since']
+}
+
+/**
+ * Strip content-* header fields.
+ *
+ * @private
+ */
+
+SendStream.prototype.removeContentHeaderFields = function removeContentHeaderFields () {
+ var res = this.res
+ var headers = Object.keys(res._headers || {})
+
+ for (var i = 0; i < headers.length; i++) {
+ var header = headers[i]
+ if (header.substr(0, 8) === 'content-' && header !== 'content-location') {
+ res.removeHeader(header)
+ }
+ }
+}
+
+/**
+ * Respond with 304 not modified.
+ *
+ * @api private
+ */
+
+SendStream.prototype.notModified = function notModified () {
+ var res = this.res
+ debug('not modified')
+ this.removeContentHeaderFields()
+ res.statusCode = 304
+ res.end()
+}
+
+/**
+ * Raise error that headers already sent.
+ *
+ * @api private
+ */
+
+SendStream.prototype.headersAlreadySent = function headersAlreadySent () {
+ var err = new Error('Can\'t set headers after they are sent.')
+ debug('headers already sent')
+ this.error(500, err)
+}
+
+/**
+ * Check if the request is cacheable, aka
+ * responded with 2xx or 304 (see RFC 2616 section 14.2{5,6}).
+ *
+ * @return {Boolean}
+ * @api private
+ */
+
+SendStream.prototype.isCachable = function isCachable () {
+ var statusCode = this.res.statusCode
+ return (statusCode >= 200 && statusCode < 300) ||
+ statusCode === 304
+}
+
+/**
+ * Handle stat() error.
+ *
+ * @param {Error} error
+ * @private
+ */
+
+SendStream.prototype.onStatError = function onStatError (error) {
+ switch (error.code) {
+ case 'ENAMETOOLONG':
+ case 'ENOENT':
+ case 'ENOTDIR':
+ this.error(404, error)
+ break
+ default:
+ this.error(500, error)
+ break
+ }
+}
+
+/**
+ * Check if the cache is fresh.
+ *
+ * @return {Boolean}
+ * @api private
+ */
+
+SendStream.prototype.isFresh = function isFresh () {
+ return fresh(this.req.headers, this.res._headers)
+}
+
+/**
+ * Check if the range is fresh.
+ *
+ * @return {Boolean}
+ * @api private
+ */
+
+SendStream.prototype.isRangeFresh = function isRangeFresh () {
+ var ifRange = this.req.headers['if-range']
+
+ if (!ifRange) {
+ return true
+ }
+
+ return ~ifRange.indexOf('"')
+ ? ~ifRange.indexOf(this.res._headers['etag'])
+ : Date.parse(this.res._headers['last-modified']) <= Date.parse(ifRange)
+}
+
+/**
+ * Redirect to path.
+ *
+ * @param {string} path
+ * @private
+ */
+
+SendStream.prototype.redirect = function redirect (path) {
+ if (listenerCount(this, 'directory') !== 0) {
+ this.emit('directory')
+ return
+ }
+
+ if (this.hasTrailingSlash()) {
+ this.error(403)
+ return
+ }
+
+ var loc = encodeUrl(collapseLeadingSlashes(path + '/'))
+ var msg = 'Redirecting to <a href="' + escapeHtml(loc) + '">' + escapeHtml(loc) + '</a>\n'
+ var res = this.res
+
+ // redirect
+ res.statusCode = 301
+ res.setHeader('Content-Type', 'text/html; charset=UTF-8')
+ res.setHeader('Content-Length', Buffer.byteLength(msg))
+ res.setHeader('X-Content-Type-Options', 'nosniff')
+ res.setHeader('Location', loc)
+ res.end(msg)
+}
+
+/**
+ * Pipe to `res.
+ *
+ * @param {Stream} res
+ * @return {Stream} res
+ * @api public
+ */
+
+SendStream.prototype.pipe = function pipe (res) {
+ // root path
+ var root = this._root
+
+ // references
+ this.res = res
+
+ // decode the path
+ var path = decode(this.path)
+ if (path === -1) {
+ this.error(400)
+ return res
+ }
+
+ // null byte(s)
+ if (~path.indexOf('\0')) {
+ this.error(400)
+ return res
+ }
+
+ var parts
+ if (root !== null) {
+ // malicious path
+ if (UP_PATH_REGEXP.test(normalize('.' + sep + path))) {
+ debug('malicious path "%s"', path)
+ this.error(403)
+ return res
+ }
+
+ // join / normalize from optional root dir
+ path = normalize(join(root, path))
+ root = normalize(root + sep)
+
+ // explode path parts
+ parts = path.substr(root.length).split(sep)
+ } else {
+ // ".." is malicious without "root"
+ if (UP_PATH_REGEXP.test(path)) {
+ debug('malicious path "%s"', path)
+ this.error(403)
+ return res
+ }
+
+ // explode path parts
+ parts = normalize(path).split(sep)
+
+ // resolve the path
+ path = resolve(path)
+ }
+
+ // dotfile handling
+ if (containsDotFile(parts)) {
+ var access = this._dotfiles
+
+ // legacy support
+ if (access === undefined) {
+ access = parts[parts.length - 1][0] === '.'
+ ? (this._hidden ? 'allow' : 'ignore')
+ : 'allow'
+ }
+
+ debug('%s dotfile "%s"', access, path)
+ switch (access) {
+ case 'allow':
+ break
+ case 'deny':
+ this.error(403)
+ return res
+ case 'ignore':
+ default:
+ this.error(404)
+ return res
+ }
+ }
+
+ // index file support
+ if (this._index.length && this.path[this.path.length - 1] === '/') {
+ this.sendIndex(path)
+ return res
+ }
+
+ this.sendFile(path)
+ return res
+}
+
+/**
+ * Transfer `path`.
+ *
+ * @param {String} path
+ * @api public
+ */
+
+SendStream.prototype.send = function send (path, stat) {
+ var len = stat.size
+ var options = this.options
+ var opts = {}
+ var res = this.res
+ var req = this.req
+ var ranges = req.headers.range
+ var offset = options.start || 0
+
+ if (res._header) {
+ // impossible to send now
+ this.headersAlreadySent()
+ return
+ }
+
+ debug('pipe "%s"', path)
+
+ // set header fields
+ this.setHeader(path, stat)
+
+ // set content-type
+ this.type(path)
+
+ // conditional GET support
+ if (this.isConditionalGET() && this.isCachable() && this.isFresh()) {
+ this.notModified()
+ return
+ }
+
+ // adjust len to start/end options
+ len = Math.max(0, len - offset)
+ if (options.end !== undefined) {
+ var bytes = options.end - offset + 1
+ if (len > bytes) len = bytes
+ }
+
+ // Range support
+ if (this._acceptRanges && BYTES_RANGE_REGEXP.test(ranges)) {
+ // parse
+ ranges = parseRange(len, ranges, {
+ combine: true
+ })
+
+ // If-Range support
+ if (!this.isRangeFresh()) {
+ debug('range stale')
+ ranges = -2
+ }
+
+ // unsatisfiable
+ if (ranges === -1) {
+ debug('range unsatisfiable')
+
+ // Content-Range
+ res.setHeader('Content-Range', contentRange('bytes', len))
+
+ // 416 Requested Range Not Satisfiable
+ return this.error(416, {
+ headers: {'Content-Range': res.getHeader('Content-Range')}
+ })
+ }
+
+ // valid (syntactically invalid/multiple ranges are treated as a regular response)
+ if (ranges !== -2 && ranges.length === 1) {
+ debug('range %j', ranges)
+
+ // Content-Range
+ res.statusCode = 206
+ res.setHeader('Content-Range', contentRange('bytes', len, ranges[0]))
+
+ // adjust for requested range
+ offset += ranges[0].start
+ len = ranges[0].end - ranges[0].start + 1
+ }
+ }
+
+ // clone options
+ for (var prop in options) {
+ opts[prop] = options[prop]
+ }
+
+ // set read options
+ opts.start = offset
+ opts.end = Math.max(offset, offset + len - 1)
+
+ // content-length
+ res.setHeader('Content-Length', len)
+
+ // HEAD support
+ if (req.method === 'HEAD') {
+ res.end()
+ return
+ }
+
+ this.stream(path, opts)
+}
+
+/**
+ * Transfer file for `path`.
+ *
+ * @param {String} path
+ * @api private
+ */
+SendStream.prototype.sendFile = function sendFile (path) {
+ var i = 0
+ var self = this
+
+ debug('stat "%s"', path)
+ fs.stat(path, function onstat (err, stat) {
+ if (err && err.code === 'ENOENT' && !extname(path) && path[path.length - 1] !== sep) {
+ // not found, check extensions
+ return next(err)
+ }
+ if (err) return self.onStatError(err)
+ if (stat.isDirectory()) return self.redirect(self.path)
+ self.emit('file', path, stat)
+ self.send(path, stat)
+ })
+
+ function next (err) {
+ if (self._extensions.length <= i) {
+ return err
+ ? self.onStatError(err)
+ : self.error(404)
+ }
+
+ var p = path + '.' + self._extensions[i++]
+
+ debug('stat "%s"', p)
+ fs.stat(p, function (err, stat) {
+ if (err) return next(err)
+ if (stat.isDirectory()) return next()
+ self.emit('file', p, stat)
+ self.send(p, stat)
+ })
+ }
+}
+
+/**
+ * Transfer index for `path`.
+ *
+ * @param {String} path
+ * @api private
+ */
+SendStream.prototype.sendIndex = function sendIndex (path) {
+ var i = -1
+ var self = this
+
+ function next (err) {
+ if (++i >= self._index.length) {
+ if (err) return self.onStatError(err)
+ return self.error(404)
+ }
+
+ var p = join(path, self._index[i])
+
+ debug('stat "%s"', p)
+ fs.stat(p, function (err, stat) {
+ if (err) return next(err)
+ if (stat.isDirectory()) return next()
+ self.emit('file', p, stat)
+ self.send(p, stat)
+ })
+ }
+
+ next()
+}
+
+/**
+ * Stream `path` to the response.
+ *
+ * @param {String} path
+ * @param {Object} options
+ * @api private
+ */
+
+SendStream.prototype.stream = function stream (path, options) {
+ // TODO: this is all lame, refactor meeee
+ var finished = false
+ var self = this
+ var res = this.res
+
+ // pipe
+ var stream = fs.createReadStream(path, options)
+ this.emit('stream', stream)
+ stream.pipe(res)
+
+ // response finished, done with the fd
+ onFinished(res, function onfinished () {
+ finished = true
+ destroy(stream)
+ })
+
+ // error handling code-smell
+ stream.on('error', function onerror (err) {
+ // request already finished
+ if (finished) return
+
+ // clean up stream
+ finished = true
+ destroy(stream)
+
+ // error
+ self.onStatError(err)
+ })
+
+ // end
+ stream.on('end', function onend () {
+ self.emit('end')
+ })
+}
+
+/**
+ * Set content-type based on `path`
+ * if it hasn't been explicitly set.
+ *
+ * @param {String} path
+ * @api private
+ */
+
+SendStream.prototype.type = function type (path) {
+ var res = this.res
+
+ if (res.getHeader('Content-Type')) return
+
+ var type = mime.lookup(path)
+
+ if (!type) {
+ debug('no content-type')
+ return
+ }
+
+ var charset = mime.charsets.lookup(type)
+
+ debug('content-type %s', type)
+ res.setHeader('Content-Type', type + (charset ? '; charset=' + charset : ''))
+}
+
+/**
+ * Set response header fields, most
+ * fields may be pre-defined.
+ *
+ * @param {String} path
+ * @param {Object} stat
+ * @api private
+ */
+
+SendStream.prototype.setHeader = function setHeader (path, stat) {
+ var res = this.res
+
+ this.emit('headers', res, path, stat)
+
+ if (this._acceptRanges && !res.getHeader('Accept-Ranges')) {
+ debug('accept ranges')
+ res.setHeader('Accept-Ranges', 'bytes')
+ }
+
+ if (this._cacheControl && !res.getHeader('Cache-Control')) {
+ var cacheControl = 'public, max-age=' + Math.floor(this._maxage / 1000)
+ debug('cache-control %s', cacheControl)
+ res.setHeader('Cache-Control', cacheControl)
+ }
+
+ if (this._lastModified && !res.getHeader('Last-Modified')) {
+ var modified = stat.mtime.toUTCString()
+ debug('modified %s', modified)
+ res.setHeader('Last-Modified', modified)
+ }
+
+ if (this._etag && !res.getHeader('ETag')) {
+ var val = etag(stat)
+ debug('etag %s', val)
+ res.setHeader('ETag', val)
+ }
+}
+
+/**
+ * Clear all headers from a response.
+ *
+ * @param {object} res
+ * @private
+ */
+
+function clearHeaders (res) {
+ res._headers = {}
+ res._headerNames = {}
+}
+
+/**
+ * Collapse all leading slashes into a single slash
+ *
+ * @param {string} str
+ * @private
+ */
+function collapseLeadingSlashes (str) {
+ for (var i = 0; i < str.length; i++) {
+ if (str[i] !== '/') {
+ break
+ }
+ }
+
+ return i > 1
+ ? '/' + str.substr(i)
+ : str
+}
+
+/**
+ * Determine if path parts contain a dotfile.
+ *
+ * @api private
+ */
+
+function containsDotFile (parts) {
+ for (var i = 0; i < parts.length; i++) {
+ if (parts[i][0] === '.') {
+ return true
+ }
+ }
+
+ return false
+}
+
+/**
+ * Create a Content-Range header.
+ *
+ * @param {string} type
+ * @param {number} size
+ * @param {array} [range]
+ */
+
+function contentRange (type, size, range) {
+ return type + ' ' + (range ? range.start + '-' + range.end : '*') + '/' + size
+}
+
+/**
+ * decodeURIComponent.
+ *
+ * Allows V8 to only deoptimize this fn instead of all
+ * of send().
+ *
+ * @param {String} path
+ * @api private
+ */
+
+function decode (path) {
+ try {
+ return decodeURIComponent(path)
+ } catch (err) {
+ return -1
+ }
+}
+
+/**
+ * Normalize the index option into an array.
+ *
+ * @param {boolean|string|array} val
+ * @param {string} name
+ * @private
+ */
+
+function normalizeList (val, name) {
+ var list = [].concat(val || [])
+
+ for (var i = 0; i < list.length; i++) {
+ if (typeof list[i] !== 'string') {
+ throw new TypeError(name + ' must be array of strings or false')
+ }
+ }
+
+ return list
+}
+
+/**
+ * Set an object of headers on a response.
+ *
+ * @param {object} res
+ * @param {object} headers
+ * @private
+ */
+
+function setHeaders (res, headers) {
+ var keys = Object.keys(headers)
+
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i]
+ res.setHeader(key, headers[key])
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/.bin/mime b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/.bin/mime
new file mode 100644
index 0000000..0dbddf0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/.bin/mime
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../mime/cli.js" "$@"
+ ret=$?
+else
+ node "$basedir/../mime/cli.js" "$@"
+ ret=$?
+fi
+exit $ret
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/.bin/mime.cmd b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/.bin/mime.cmd
new file mode 100644
index 0000000..546cb59
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/.bin/mime.cmd
@@ -0,0 +1,7 @@
+@IF EXIST "%~dp0\node.exe" (
+ "%~dp0\node.exe" "%~dp0\..\mime\cli.js" %*
+) ELSE (
+ @SETLOCAL
+ @SET PATHEXT=%PATHEXT:;.JS;=;%
+ node "%~dp0\..\mime\cli.js" %*
+) \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/destroy/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/destroy/LICENSE
new file mode 100644
index 0000000..a7ae8ee
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/destroy/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/destroy/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/destroy/README.md
new file mode 100644
index 0000000..6474bc3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/destroy/README.md
@@ -0,0 +1,60 @@
+# Destroy
+
+[![NPM version][npm-image]][npm-url]
+[![Build status][travis-image]][travis-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+[![Gittip][gittip-image]][gittip-url]
+
+Destroy a stream.
+
+This module is meant to ensure a stream gets destroyed, handling different APIs
+and Node.js bugs.
+
+## API
+
+```js
+var destroy = require('destroy')
+```
+
+### destroy(stream)
+
+Destroy the given stream. In most cases, this is identical to a simple
+`stream.destroy()` call. The rules are as follows for a given stream:
+
+ 1. If the `stream` is an instance of `ReadStream`, then call `stream.destroy()`
+ and add a listener to the `open` event to call `stream.close()` if it is
+ fired. This is for a Node.js bug that will leak a file descriptor if
+ `.destroy()` is called before `open`.
+ 2. If the `stream` is not an instance of `Stream`, then nothing happens.
+ 3. If the `stream` has a `.destroy()` method, then call it.
+
+The function returns the `stream` passed in as the argument.
+
+## Example
+
+```js
+var destroy = require('destroy')
+
+var fs = require('fs')
+var stream = fs.createReadStream('package.json')
+
+// ... and later
+destroy(stream)
+```
+
+[npm-image]: https://img.shields.io/npm/v/destroy.svg?style=flat-square
+[npm-url]: https://npmjs.org/package/destroy
+[github-tag]: http://img.shields.io/github/tag/stream-utils/destroy.svg?style=flat-square
+[github-url]: https://github.com/stream-utils/destroy/tags
+[travis-image]: https://img.shields.io/travis/stream-utils/destroy.svg?style=flat-square
+[travis-url]: https://travis-ci.org/stream-utils/destroy
+[coveralls-image]: https://img.shields.io/coveralls/stream-utils/destroy.svg?style=flat-square
+[coveralls-url]: https://coveralls.io/r/stream-utils/destroy?branch=master
+[license-image]: http://img.shields.io/npm/l/destroy.svg?style=flat-square
+[license-url]: LICENSE.md
+[downloads-image]: http://img.shields.io/npm/dm/destroy.svg?style=flat-square
+[downloads-url]: https://npmjs.org/package/destroy
+[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
+[gittip-url]: https://www.gittip.com/jonathanong/
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/destroy/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/destroy/index.js
new file mode 100644
index 0000000..6da2d26
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/destroy/index.js
@@ -0,0 +1,75 @@
+/*!
+ * destroy
+ * Copyright(c) 2014 Jonathan Ong
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var ReadStream = require('fs').ReadStream
+var Stream = require('stream')
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = destroy
+
+/**
+ * Destroy a stream.
+ *
+ * @param {object} stream
+ * @public
+ */
+
+function destroy(stream) {
+ if (stream instanceof ReadStream) {
+ return destroyReadStream(stream)
+ }
+
+ if (!(stream instanceof Stream)) {
+ return stream
+ }
+
+ if (typeof stream.destroy === 'function') {
+ stream.destroy()
+ }
+
+ return stream
+}
+
+/**
+ * Destroy a ReadStream.
+ *
+ * @param {object} stream
+ * @private
+ */
+
+function destroyReadStream(stream) {
+ stream.destroy()
+
+ if (typeof stream.close === 'function') {
+ // node.js core bug work-around
+ stream.on('open', onOpenClose)
+ }
+
+ return stream
+}
+
+/**
+ * On open handler to close stream.
+ * @private
+ */
+
+function onOpenClose() {
+ if (typeof this.fd === 'number') {
+ // actually close down the fd
+ this.close()
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/destroy/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/destroy/package.json
new file mode 100644
index 0000000..1457414
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/destroy/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "destroy",
+ "description": "destroy a stream if possible",
+ "version": "1.0.4",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/stream-utils/destroy"
+ },
+ "devDependencies": {
+ "istanbul": "0.4.2",
+ "mocha": "2.3.4"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"
+ },
+ "files": [
+ "index.js",
+ "LICENSE"
+ ],
+ "keywords": [
+ "stream",
+ "streams",
+ "destroy",
+ "cleanup",
+ "leak",
+ "fd"
+ ],
+ "gitHead": "86edea01456f5fa1027f6a47250c34c713cbcc3b",
+ "bugs": {
+ "url": "https://github.com/stream-utils/destroy/issues"
+ },
+ "homepage": "https://github.com/stream-utils/destroy",
+ "_id": "destroy@1.0.4",
+ "_shasum": "978857442c44749e4206613e37946205826abd80",
+ "_from": "destroy@>=1.0.4 <1.1.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "978857442c44749e4206613e37946205826abd80",
+ "tarball": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/HISTORY.md
new file mode 100644
index 0000000..a7f080f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/HISTORY.md
@@ -0,0 +1,103 @@
+2016-11-16 / 1.5.1
+==================
+
+ * deps: inherits@2.0.3
+ - Fix issue loading in browser
+ * deps: setprototypeof@1.0.2
+ * deps: statuses@'>= 1.3.1 < 2'
+
+2016-05-18 / 1.5.0
+==================
+
+ * Support new code `421 Misdirected Request`
+ * Use `setprototypeof` module to replace `__proto__` setting
+ * deps: statuses@'>= 1.3.0 < 2'
+ - Add `421 Misdirected Request`
+ - perf: enable strict mode
+ * perf: enable strict mode
+
+2016-01-28 / 1.4.0
+==================
+
+ * Add `HttpError` export, for `err instanceof createError.HttpError`
+ * deps: inherits@2.0.1
+ * deps: statuses@'>= 1.2.1 < 2'
+ - Fix message for status 451
+ - Remove incorrect nginx status code
+
+2015-02-02 / 1.3.1
+==================
+
+ * Fix regression where status can be overwritten in `createError` `props`
+
+2015-02-01 / 1.3.0
+==================
+
+ * Construct errors using defined constructors from `createError`
+ * Fix error names that are not identifiers
+ - `createError["I'mateapot"]` is now `createError.ImATeapot`
+ * Set a meaningful `name` property on constructed errors
+
+2014-12-09 / 1.2.8
+==================
+
+ * Fix stack trace from exported function
+ * Remove `arguments.callee` usage
+
+2014-10-14 / 1.2.7
+==================
+
+ * Remove duplicate line
+
+2014-10-02 / 1.2.6
+==================
+
+ * Fix `expose` to be `true` for `ClientError` constructor
+
+2014-09-28 / 1.2.5
+==================
+
+ * deps: statuses@1
+
+2014-09-21 / 1.2.4
+==================
+
+ * Fix dependency version to work with old `npm`s
+
+2014-09-21 / 1.2.3
+==================
+
+ * deps: statuses@~1.1.0
+
+2014-09-21 / 1.2.2
+==================
+
+ * Fix publish error
+
+2014-09-21 / 1.2.1
+==================
+
+ * Support Node.js 0.6
+ * Use `inherits` instead of `util`
+
+2014-09-09 / 1.2.0
+==================
+
+ * Fix the way inheriting functions
+ * Support `expose` being provided in properties argument
+
+2014-09-08 / 1.1.0
+==================
+
+ * Default status to 500
+ * Support provided `error` to extend
+
+2014-09-08 / 1.0.1
+==================
+
+ * Fix accepting string message
+
+2014-09-08 / 1.0.0
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/LICENSE
new file mode 100644
index 0000000..82af4df
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/LICENSE
@@ -0,0 +1,23 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+Copyright (c) 2016 Douglas Christopher Wilson doug@somethingdoug.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/README.md
new file mode 100644
index 0000000..4143977
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/README.md
@@ -0,0 +1,132 @@
+# http-errors
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Create HTTP errors for Express, Koa, Connect, etc. with ease.
+
+## Install
+
+This is a [Node.js](https://nodejs.org/en/) module available through the
+[npm registry](https://www.npmjs.com/). Installation is done using the
+[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
+
+```bash
+$ npm install http-errors
+```
+
+## Example
+
+```js
+var createError = require('http-errors')
+var express = require('express')
+var app = express()
+
+app.use(function (req, res, next) {
+ if (!req.user) return next(createError(401, 'Please login to view this page.'))
+ next()
+})
+```
+
+## API
+
+This is the current API, currently extracted from Koa and subject to change.
+
+All errors inherit from JavaScript `Error` and the exported `createError.HttpError`.
+
+### Error Properties
+
+- `expose` - can be used to signal if `message` should be sent to the client,
+ defaulting to `false` when `status` >= 500
+- `headers` - can be an object of header names to values to be sent to the
+ client, defaulting to `undefined`. When defined, the key names should all
+ be lower-cased
+- `message`
+- `status` and `statusCode` - the status code of the error, defaulting to `500`
+
+### createError([status], [message], [properties])
+
+<!-- eslint-disable no-undef, no-unused-vars -->
+
+```js
+var err = createError(404, 'This video does not exist!')
+```
+
+- `status: 500` - the status code as a number
+- `message` - the message of the error, defaulting to node's text for that status code.
+- `properties` - custom properties to attach to the object
+
+### new createError\[code || name\](\[msg]\))
+
+<!-- eslint-disable no-undef, no-unused-vars -->
+
+```js
+var err = new createError.NotFound()
+```
+
+- `code` - the status code as a number
+- `name` - the name of the error as a "bumpy case", i.e. `NotFound` or `InternalServerError`.
+
+#### List of all constructors
+
+|Status Code|Constructor Name |
+|-----------|-----------------------------|
+|400 |BadRequest |
+|401 |Unauthorized |
+|402 |PaymentRequired |
+|403 |Forbidden |
+|404 |NotFound |
+|405 |MethodNotAllowed |
+|406 |NotAcceptable |
+|407 |ProxyAuthenticationRequired |
+|408 |RequestTimeout |
+|409 |Conflict |
+|410 |Gone |
+|411 |LengthRequired |
+|412 |PreconditionFailed |
+|413 |PayloadTooLarge |
+|414 |URITooLong |
+|415 |UnsupportedMediaType |
+|416 |RangeNotSatisfiable |
+|417 |ExpectationFailed |
+|418 |ImATeapot |
+|421 |MisdirectedRequest |
+|422 |UnprocessableEntity |
+|423 |Locked |
+|424 |FailedDependency |
+|425 |UnorderedCollection |
+|426 |UpgradeRequired |
+|428 |PreconditionRequired |
+|429 |TooManyRequests |
+|431 |RequestHeaderFieldsTooLarge |
+|451 |UnavailableForLegalReasons |
+|500 |InternalServerError |
+|501 |NotImplemented |
+|502 |BadGateway |
+|503 |ServiceUnavailable |
+|504 |GatewayTimeout |
+|505 |HTTPVersionNotSupported |
+|506 |VariantAlsoNegotiates |
+|507 |InsufficientStorage |
+|508 |LoopDetected |
+|509 |BandwidthLimitExceeded |
+|510 |NotExtended |
+|511 |NetworkAuthenticationRequired|
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/http-errors.svg
+[npm-url]: https://npmjs.org/package/http-errors
+[node-version-image]: https://img.shields.io/node/v/http-errors.svg
+[node-version-url]: https://nodejs.org/en/download/
+[travis-image]: https://img.shields.io/travis/jshttp/http-errors.svg
+[travis-url]: https://travis-ci.org/jshttp/http-errors
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/http-errors.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/http-errors
+[downloads-image]: https://img.shields.io/npm/dm/http-errors.svg
+[downloads-url]: https://npmjs.org/package/http-errors
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/index.js
new file mode 100644
index 0000000..6130db8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/index.js
@@ -0,0 +1,223 @@
+/*!
+ * http-errors
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2016 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var setPrototypeOf = require('setprototypeof')
+var statuses = require('statuses')
+var inherits = require('inherits')
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = createError
+module.exports.HttpError = createHttpErrorConstructor()
+
+// Populate exports for all constructors
+populateConstructorExports(module.exports, statuses.codes, module.exports.HttpError)
+
+/**
+ * Create a new HTTP Error.
+ *
+ * @returns {Error}
+ * @public
+ */
+
+function createError () {
+ // so much arity going on ~_~
+ var err
+ var msg
+ var status = 500
+ var props = {}
+ for (var i = 0; i < arguments.length; i++) {
+ var arg = arguments[i]
+ if (arg instanceof Error) {
+ err = arg
+ status = err.status || err.statusCode || status
+ continue
+ }
+ switch (typeof arg) {
+ case 'string':
+ msg = arg
+ break
+ case 'number':
+ status = arg
+ break
+ case 'object':
+ props = arg
+ break
+ }
+ }
+
+ if (typeof status !== 'number' || !statuses[status]) {
+ status = 500
+ }
+
+ // constructor
+ var HttpError = createError[status]
+
+ if (!err) {
+ // create error
+ err = HttpError
+ ? new HttpError(msg)
+ : new Error(msg || statuses[status])
+ Error.captureStackTrace(err, createError)
+ }
+
+ if (!HttpError || !(err instanceof HttpError)) {
+ // add properties to generic error
+ err.expose = status < 500
+ err.status = err.statusCode = status
+ }
+
+ for (var key in props) {
+ if (key !== 'status' && key !== 'statusCode') {
+ err[key] = props[key]
+ }
+ }
+
+ return err
+}
+
+/**
+ * Create HTTP error abstract base class.
+ * @private
+ */
+
+function createHttpErrorConstructor () {
+ function HttpError () {
+ throw new TypeError('cannot construct abstract class')
+ }
+
+ inherits(HttpError, Error)
+
+ return HttpError
+}
+
+/**
+ * Create a constructor for a client error.
+ * @private
+ */
+
+function createClientErrorConstructor (HttpError, name, code) {
+ var className = name.match(/Error$/) ? name : name + 'Error'
+
+ function ClientError (message) {
+ // create the error object
+ var err = new Error(message != null ? message : statuses[code])
+
+ // capture a stack trace to the construction point
+ Error.captureStackTrace(err, ClientError)
+
+ // adjust the [[Prototype]]
+ setPrototypeOf(err, ClientError.prototype)
+
+ // redefine the error name
+ Object.defineProperty(err, 'name', {
+ enumerable: false,
+ configurable: true,
+ value: className,
+ writable: true
+ })
+
+ return err
+ }
+
+ inherits(ClientError, HttpError)
+
+ ClientError.prototype.status = code
+ ClientError.prototype.statusCode = code
+ ClientError.prototype.expose = true
+
+ return ClientError
+}
+
+/**
+ * Create a constructor for a server error.
+ * @private
+ */
+
+function createServerErrorConstructor (HttpError, name, code) {
+ var className = name.match(/Error$/) ? name : name + 'Error'
+
+ function ServerError (message) {
+ // create the error object
+ var err = new Error(message != null ? message : statuses[code])
+
+ // capture a stack trace to the construction point
+ Error.captureStackTrace(err, ServerError)
+
+ // adjust the [[Prototype]]
+ setPrototypeOf(err, ServerError.prototype)
+
+ // redefine the error name
+ Object.defineProperty(err, 'name', {
+ enumerable: false,
+ configurable: true,
+ value: className,
+ writable: true
+ })
+
+ return err
+ }
+
+ inherits(ServerError, HttpError)
+
+ ServerError.prototype.status = code
+ ServerError.prototype.statusCode = code
+ ServerError.prototype.expose = false
+
+ return ServerError
+}
+
+/**
+ * Populate the exports object with constructors for every error class.
+ * @private
+ */
+
+function populateConstructorExports (exports, codes, HttpError) {
+ codes.forEach(function forEachCode (code) {
+ var CodeError
+ var name = toIdentifier(statuses[code])
+
+ switch (String(code).charAt(0)) {
+ case '4':
+ CodeError = createClientErrorConstructor(HttpError, name, code)
+ break
+ case '5':
+ CodeError = createServerErrorConstructor(HttpError, name, code)
+ break
+ }
+
+ if (CodeError) {
+ // export the constructor
+ exports[code] = CodeError
+ exports[name] = CodeError
+ }
+ })
+
+ // backwards-compatibility
+ exports["I'mateapot"] = exports.ImATeapot
+}
+
+/**
+ * Convert a string of words to a JavaScript identifier.
+ * @private
+ */
+
+function toIdentifier (str) {
+ return str.split(' ').map(function (token) {
+ return token.slice(0, 1).toUpperCase() + token.slice(1)
+ }).join('').replace(/[^ _0-9a-z]/gi, '')
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/LICENSE
new file mode 100644
index 0000000..dea3013
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/LICENSE
@@ -0,0 +1,16 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/README.md
new file mode 100644
index 0000000..b1c5665
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/README.md
@@ -0,0 +1,42 @@
+Browser-friendly inheritance fully compatible with standard node.js
+[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).
+
+This package exports standard `inherits` from node.js `util` module in
+node environment, but also provides alternative browser-friendly
+implementation through [browser
+field](https://gist.github.com/shtylman/4339901). Alternative
+implementation is a literal copy of standard one located in standalone
+module to avoid requiring of `util`. It also has a shim for old
+browsers with no `Object.create` support.
+
+While keeping you sure you are using standard `inherits`
+implementation in node.js environment, it allows bundlers such as
+[browserify](https://github.com/substack/node-browserify) to not
+include full `util` package to your client code if all you need is
+just `inherits` function. It worth, because browser shim for `util`
+package is large and `inherits` is often the single function you need
+from it.
+
+It's recommended to use this package instead of
+`require('util').inherits` for any code that has chances to be used
+not only in node.js but in browser too.
+
+## usage
+
+```js
+var inherits = require('inherits');
+// then use exactly as the standard one
+```
+
+## note on version ~1.0
+
+Version ~1.0 had completely different motivation and is not compatible
+neither with 2.0 nor with standard node.js `inherits`.
+
+If you are using version ~1.0 and planning to switch to ~2.0, be
+careful:
+
+* new version uses `super_` instead of `super` for referencing
+ superclass
+* new version overwrites current prototype while old one preserves any
+ existing fields on it
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/inherits.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/inherits.js
new file mode 100644
index 0000000..3b94763
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/inherits.js
@@ -0,0 +1,7 @@
+try {
+ var util = require('util');
+ if (typeof util.inherits !== 'function') throw '';
+ module.exports = util.inherits;
+} catch (e) {
+ module.exports = require('./inherits_browser.js');
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/inherits_browser.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/inherits_browser.js
new file mode 100644
index 0000000..c1e78a7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/inherits_browser.js
@@ -0,0 +1,23 @@
+if (typeof Object.create === 'function') {
+ // implementation from standard node.js 'util' module
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ };
+} else {
+ // old school shim for old browsers
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ var TempCtor = function () {}
+ TempCtor.prototype = superCtor.prototype
+ ctor.prototype = new TempCtor()
+ ctor.prototype.constructor = ctor
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/package.json
new file mode 100644
index 0000000..4223969
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/package.json
@@ -0,0 +1,62 @@
+{
+ "name": "inherits",
+ "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
+ "version": "2.0.3",
+ "keywords": [
+ "inheritance",
+ "class",
+ "klass",
+ "oop",
+ "object-oriented",
+ "inherits",
+ "browser",
+ "browserify"
+ ],
+ "main": "./inherits.js",
+ "browser": "./inherits_browser.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/inherits.git"
+ },
+ "license": "ISC",
+ "scripts": {
+ "test": "node test"
+ },
+ "devDependencies": {
+ "tap": "^7.1.0"
+ },
+ "files": [
+ "inherits.js",
+ "inherits_browser.js"
+ ],
+ "gitHead": "e05d0fb27c61a3ec687214f0476386b765364d5f",
+ "bugs": {
+ "url": "https://github.com/isaacs/inherits/issues"
+ },
+ "homepage": "https://github.com/isaacs/inherits#readme",
+ "_id": "inherits@2.0.3",
+ "_shasum": "633c2c83e3da42a502f52466022480f4208261de",
+ "_from": "inherits@2.0.3",
+ "_npmVersion": "3.10.7",
+ "_nodeVersion": "6.5.0",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "dist": {
+ "shasum": "633c2c83e3da42a502f52466022480f4208261de",
+ "tarball": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/setprototypeof/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/setprototypeof/LICENSE
new file mode 100644
index 0000000..61afa2f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/setprototypeof/LICENSE
@@ -0,0 +1,13 @@
+Copyright (c) 2015, Wes Todd
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/setprototypeof/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/setprototypeof/README.md
new file mode 100644
index 0000000..01d7947
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/setprototypeof/README.md
@@ -0,0 +1,21 @@
+# Polyfill for `Object.setPrototypeOf`
+
+A simple cross platform implementation to set the prototype of an instianted object. Supports all modern browsers and at least back to IE8.
+
+## Usage:
+
+```
+$ npm install --save setprototypeof
+```
+
+```javascript
+var setPrototypeOf = require('setprototypeof');
+
+var obj = {};
+setPrototypeOf(obj, {
+ foo: function() {
+ return 'bar';
+ }
+});
+obj.foo(); // bar
+```
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/setprototypeof/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/setprototypeof/index.js
new file mode 100644
index 0000000..b762a7c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/setprototypeof/index.js
@@ -0,0 +1,13 @@
+module.exports = Object.setPrototypeOf || ({__proto__:[]} instanceof Array ? setProtoOf : mixinProperties);
+
+function setProtoOf(obj, proto) {
+ obj.__proto__ = proto;
+ return obj;
+}
+
+function mixinProperties(obj, proto) {
+ for (var prop in proto) {
+ obj[prop] = proto[prop];
+ }
+ return obj;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/setprototypeof/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/setprototypeof/package.json
new file mode 100644
index 0000000..695097b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/node_modules/setprototypeof/package.json
@@ -0,0 +1,52 @@
+{
+ "name": "setprototypeof",
+ "version": "1.0.2",
+ "description": "A small polyfill for Object.setprototypeof",
+ "main": "index.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/wesleytodd/setprototypeof.git"
+ },
+ "keywords": [
+ "polyfill",
+ "object",
+ "setprototypeof"
+ ],
+ "author": {
+ "name": "Wes Todd"
+ },
+ "license": "ISC",
+ "bugs": {
+ "url": "https://github.com/wesleytodd/setprototypeof/issues"
+ },
+ "homepage": "https://github.com/wesleytodd/setprototypeof",
+ "gitHead": "34da239ae7ab69b7b42791d5b928379ce51a0ff2",
+ "_id": "setprototypeof@1.0.2",
+ "_shasum": "81a552141ec104b88e89ce383103ad5c66564d08",
+ "_from": "setprototypeof@1.0.2",
+ "_npmVersion": "3.10.8",
+ "_nodeVersion": "7.0.0",
+ "_npmUser": {
+ "name": "wesleytodd",
+ "email": "wes@wesleytodd.com"
+ },
+ "dist": {
+ "shasum": "81a552141ec104b88e89ce383103ad5c66564d08",
+ "tarball": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.2.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "wesleytodd",
+ "email": "wes@wesleytodd.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/setprototypeof-1.0.2.tgz_1479056139581_0.43114364007487893"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.2.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/package.json
new file mode 100644
index 0000000..b432b2e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/http-errors/package.json
@@ -0,0 +1,95 @@
+{
+ "name": "http-errors",
+ "description": "Create HTTP error objects",
+ "version": "1.5.1",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Alan Plum",
+ "email": "me@pluma.io"
+ },
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/http-errors"
+ },
+ "dependencies": {
+ "inherits": "2.0.3",
+ "setprototypeof": "1.0.2",
+ "statuses": ">= 1.3.1 < 2"
+ },
+ "devDependencies": {
+ "eslint": "3.10.2",
+ "eslint-config-standard": "6.2.1",
+ "eslint-plugin-markdown": "1.0.0-beta.3",
+ "eslint-plugin-promise": "3.3.2",
+ "eslint-plugin-standard": "2.0.1",
+ "istanbul": "0.4.5",
+ "mocha": "1.21.5"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "lint": "eslint --plugin markdown --ext js,md .",
+ "test": "mocha --reporter spec --bail",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"
+ },
+ "keywords": [
+ "http",
+ "error"
+ ],
+ "files": [
+ "index.js",
+ "HISTORY.md",
+ "LICENSE",
+ "README.md"
+ ],
+ "gitHead": "a55db90c7a2c0bafedb4bfa35a85eee5f53a37e9",
+ "bugs": {
+ "url": "https://github.com/jshttp/http-errors/issues"
+ },
+ "homepage": "https://github.com/jshttp/http-errors",
+ "_id": "http-errors@1.5.1",
+ "_shasum": "788c0d2c1de2c81b9e6e8c01843b6b97eb920750",
+ "_from": "http-errors@>=1.5.0 <1.6.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "egeste",
+ "email": "npm@egeste.net"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "788c0d2c1de2c81b9e6e8c01843b6b97eb920750",
+ "tarball": "https://registry.npmjs.org/http-errors/-/http-errors-1.5.1.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-18-east.internal.npmjs.com",
+ "tmp": "tmp/http-errors-1.5.1.tgz_1479361411507_0.47469806275330484"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.5.1.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/.npmignore
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/.npmignore
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/LICENSE
new file mode 100644
index 0000000..451fc45
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2010 Benjamin Thomas, Robert Kieffer
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/README.md
new file mode 100644
index 0000000..506fbe5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/README.md
@@ -0,0 +1,90 @@
+# mime
+
+Comprehensive MIME type mapping API based on mime-db module.
+
+## Install
+
+Install with [npm](http://github.com/isaacs/npm):
+
+ npm install mime
+
+## Contributing / Testing
+
+ npm run test
+
+## Command Line
+
+ mime [path_string]
+
+E.g.
+
+ > mime scripts/jquery.js
+ application/javascript
+
+## API - Queries
+
+### mime.lookup(path)
+Get the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g.
+
+```js
+var mime = require('mime');
+
+mime.lookup('/path/to/file.txt'); // => 'text/plain'
+mime.lookup('file.txt'); // => 'text/plain'
+mime.lookup('.TXT'); // => 'text/plain'
+mime.lookup('htm'); // => 'text/html'
+```
+
+### mime.default_type
+Sets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.)
+
+### mime.extension(type)
+Get the default extension for `type`
+
+```js
+mime.extension('text/html'); // => 'html'
+mime.extension('application/octet-stream'); // => 'bin'
+```
+
+### mime.charsets.lookup()
+
+Map mime-type to charset
+
+```js
+mime.charsets.lookup('text/plain'); // => 'UTF-8'
+```
+
+(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.)
+
+## API - Defining Custom Types
+
+Custom type mappings can be added on a per-project basis via the following APIs.
+
+### mime.define()
+
+Add custom mime/extension mappings
+
+```js
+mime.define({
+ 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'],
+ 'application/x-my-type': ['x-mt', 'x-mtt'],
+ // etc ...
+});
+
+mime.lookup('x-sft'); // => 'text/x-some-format'
+```
+
+The first entry in the extensions array is returned by `mime.extension()`. E.g.
+
+```js
+mime.extension('text/x-some-format'); // => 'x-sf'
+```
+
+### mime.load(filepath)
+
+Load mappings from an Apache ".types" format file
+
+```js
+mime.load('./my_project.types');
+```
+The .types file format is simple - See the `types` dir for examples.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/build/build.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/build/build.js
new file mode 100644
index 0000000..ed5313e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/build/build.js
@@ -0,0 +1,11 @@
+var db = require('mime-db');
+
+var mapByType = {};
+Object.keys(db).forEach(function(key) {
+ var extensions = db[key].extensions;
+ if (extensions) {
+ mapByType[key] = extensions;
+ }
+});
+
+console.log(JSON.stringify(mapByType));
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/build/test.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/build/test.js
new file mode 100644
index 0000000..58b9ba7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/build/test.js
@@ -0,0 +1,57 @@
+/**
+ * Usage: node test.js
+ */
+
+var mime = require('../mime');
+var assert = require('assert');
+var path = require('path');
+
+//
+// Test mime lookups
+//
+
+assert.equal('text/plain', mime.lookup('text.txt')); // normal file
+assert.equal('text/plain', mime.lookup('TEXT.TXT')); // uppercase
+assert.equal('text/plain', mime.lookup('dir/text.txt')); // dir + file
+assert.equal('text/plain', mime.lookup('.text.txt')); // hidden file
+assert.equal('text/plain', mime.lookup('.txt')); // nameless
+assert.equal('text/plain', mime.lookup('txt')); // extension-only
+assert.equal('text/plain', mime.lookup('/txt')); // extension-less ()
+assert.equal('text/plain', mime.lookup('\\txt')); // Windows, extension-less
+assert.equal('application/octet-stream', mime.lookup('text.nope')); // unrecognized
+assert.equal('fallback', mime.lookup('text.fallback', 'fallback')); // alternate default
+
+//
+// Test extensions
+//
+
+assert.equal('txt', mime.extension(mime.types.text));
+assert.equal('html', mime.extension(mime.types.htm));
+assert.equal('bin', mime.extension('application/octet-stream'));
+assert.equal('bin', mime.extension('application/octet-stream '));
+assert.equal('html', mime.extension(' text/html; charset=UTF-8'));
+assert.equal('html', mime.extension('text/html; charset=UTF-8 '));
+assert.equal('html', mime.extension('text/html; charset=UTF-8'));
+assert.equal('html', mime.extension('text/html ; charset=UTF-8'));
+assert.equal('html', mime.extension('text/html;charset=UTF-8'));
+assert.equal('html', mime.extension('text/Html;charset=UTF-8'));
+assert.equal(undefined, mime.extension('unrecognized'));
+
+//
+// Test node.types lookups
+//
+
+assert.equal('application/font-woff', mime.lookup('file.woff'));
+assert.equal('application/octet-stream', mime.lookup('file.buffer'));
+assert.equal('audio/mp4', mime.lookup('file.m4a'));
+assert.equal('font/opentype', mime.lookup('file.otf'));
+
+//
+// Test charsets
+//
+
+assert.equal('UTF-8', mime.charsets.lookup('text/plain'));
+assert.equal(undefined, mime.charsets.lookup(mime.types.js));
+assert.equal('fallback', mime.charsets.lookup('application/octet-stream', 'fallback'));
+
+console.log('\nAll tests passed');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/cli.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/cli.js
new file mode 100644
index 0000000..20b1ffe
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/cli.js
@@ -0,0 +1,8 @@
+#!/usr/bin/env node
+
+var mime = require('./mime.js');
+var file = process.argv[2];
+var type = mime.lookup(file);
+
+process.stdout.write(type + '\n');
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/mime.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/mime.js
new file mode 100644
index 0000000..341b6a5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/mime.js
@@ -0,0 +1,108 @@
+var path = require('path');
+var fs = require('fs');
+
+function Mime() {
+ // Map of extension -> mime type
+ this.types = Object.create(null);
+
+ // Map of mime type -> extension
+ this.extensions = Object.create(null);
+}
+
+/**
+ * Define mimetype -> extension mappings. Each key is a mime-type that maps
+ * to an array of extensions associated with the type. The first extension is
+ * used as the default extension for the type.
+ *
+ * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']});
+ *
+ * @param map (Object) type definitions
+ */
+Mime.prototype.define = function (map) {
+ for (var type in map) {
+ var exts = map[type];
+ for (var i = 0; i < exts.length; i++) {
+ if (process.env.DEBUG_MIME && this.types[exts]) {
+ console.warn(this._loading.replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' +
+ this.types[exts] + ' to ' + type);
+ }
+
+ this.types[exts[i]] = type;
+ }
+
+ // Default extension is the first one we encounter
+ if (!this.extensions[type]) {
+ this.extensions[type] = exts[0];
+ }
+ }
+};
+
+/**
+ * Load an Apache2-style ".types" file
+ *
+ * This may be called multiple times (it's expected). Where files declare
+ * overlapping types/extensions, the last file wins.
+ *
+ * @param file (String) path of file to load.
+ */
+Mime.prototype.load = function(file) {
+ this._loading = file;
+ // Read file and split into lines
+ var map = {},
+ content = fs.readFileSync(file, 'ascii'),
+ lines = content.split(/[\r\n]+/);
+
+ lines.forEach(function(line) {
+ // Clean up whitespace/comments, and split into fields
+ var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/);
+ map[fields.shift()] = fields;
+ });
+
+ this.define(map);
+
+ this._loading = null;
+};
+
+/**
+ * Lookup a mime type based on extension
+ */
+Mime.prototype.lookup = function(path, fallback) {
+ var ext = path.replace(/.*[\.\/\\]/, '').toLowerCase();
+
+ return this.types[ext] || fallback || this.default_type;
+};
+
+/**
+ * Return file extension associated with a mime type
+ */
+Mime.prototype.extension = function(mimeType) {
+ var type = mimeType.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase();
+ return this.extensions[type];
+};
+
+// Default instance
+var mime = new Mime();
+
+// Define built-in types
+mime.define(require('./types.json'));
+
+// Default type
+mime.default_type = mime.lookup('bin');
+
+//
+// Additional API specific to the default instance
+//
+
+mime.Mime = Mime;
+
+/**
+ * Lookup a charset based on mime type.
+ */
+mime.charsets = {
+ lookup: function(mimeType, fallback) {
+ // Assume text types are utf8
+ return (/^text\//).test(mimeType) ? 'UTF-8' : fallback;
+ }
+};
+
+module.exports = mime;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/package.json
new file mode 100644
index 0000000..0679a71
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/package.json
@@ -0,0 +1,72 @@
+{
+ "author": {
+ "name": "Robert Kieffer",
+ "email": "robert@broofa.com",
+ "url": "http://github.com/broofa"
+ },
+ "scripts": {
+ "prepublish": "node build/build.js > types.json",
+ "test": "node build/test.js"
+ },
+ "bin": {
+ "mime": "cli.js"
+ },
+ "contributors": [
+ {
+ "name": "Benjamin Thomas",
+ "email": "benjamin@benjaminthomas.org",
+ "url": "http://github.com/bentomas"
+ }
+ ],
+ "description": "A comprehensive library for mime-type mapping",
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://raw.github.com/broofa/node-mime/master/LICENSE"
+ }
+ ],
+ "dependencies": {},
+ "devDependencies": {
+ "mime-db": "^1.2.0"
+ },
+ "keywords": [
+ "util",
+ "mime"
+ ],
+ "main": "mime.js",
+ "name": "mime",
+ "repository": {
+ "url": "https://github.com/broofa/node-mime",
+ "type": "git"
+ },
+ "version": "1.3.4",
+ "gitHead": "1628f6e0187095009dcef4805c3a49706f137974",
+ "bugs": {
+ "url": "https://github.com/broofa/node-mime/issues"
+ },
+ "homepage": "https://github.com/broofa/node-mime",
+ "_id": "mime@1.3.4",
+ "_shasum": "115f9e3b6b3daf2959983cb38f149a2d40eb5d53",
+ "_from": "mime@1.3.4",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "broofa",
+ "email": "robert@broofa.com"
+ },
+ "maintainers": [
+ {
+ "name": "broofa",
+ "email": "robert@broofa.com"
+ },
+ {
+ "name": "bentomas",
+ "email": "benjamin@benjaminthomas.org"
+ }
+ ],
+ "dist": {
+ "shasum": "115f9e3b6b3daf2959983cb38f149a2d40eb5d53",
+ "tarball": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/types.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/types.json
new file mode 100644
index 0000000..c674b1c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/mime/types.json
@@ -0,0 +1 @@
+{"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mdp"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":["woff"],"application/font-woff2":["woff2"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/prs.cww":["cww"],"application/pskc+xml":["pskcxml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/voicexml+xml":["vxml"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["dmg"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-otf":["otf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-ttf":["ttf","ttc"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["iso"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdownload":["exe","dll","com","bat","msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","wmz","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-nzb":["nzb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-research-info-systems":["ris"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp4":["mp4a","m4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/webm":["weba"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-wav":["wav"],"audio/xm":["xm"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"font/opentype":["otf"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jpeg":["jpeg","jpg","jpe"],"image/ktx":["ktx"],"image/png":["png"],"image/prs.btif":["btif"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/webp":["webp"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-mrsid-image":["sid"],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/rfc822":["eml","mime"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/prs.lines.tag":["dsc"],"text/richtext":["rtx"],"text/sgml":["sgml","sgm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/vtt":["vtt"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["markdown","md","mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-pascal":["p","pas"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/webm":["webm"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/.npmignore
new file mode 100644
index 0000000..d1aa0ce
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/.npmignore
@@ -0,0 +1,5 @@
+node_modules
+test
+History.md
+Makefile
+component.json
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/History.md
new file mode 100644
index 0000000..32fdfc1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/History.md
@@ -0,0 +1,66 @@
+
+0.7.1 / 2015-04-20
+==================
+
+ * prevent extraordinary long inputs (@evilpacket)
+ * Fixed broken readme link
+
+0.7.0 / 2014-11-24
+==================
+
+ * add time abbreviations, updated tests and readme for the new units
+ * fix example in the readme.
+ * add LICENSE file
+
+0.6.2 / 2013-12-05
+==================
+
+ * Adding repository section to package.json to suppress warning from NPM.
+
+0.6.1 / 2013-05-10
+==================
+
+ * fix singularization [visionmedia]
+
+0.6.0 / 2013-03-15
+==================
+
+ * fix minutes
+
+0.5.1 / 2013-02-24
+==================
+
+ * add component namespace
+
+0.5.0 / 2012-11-09
+==================
+
+ * add short formatting as default and .long option
+ * add .license property to component.json
+ * add version to component.json
+
+0.4.0 / 2012-10-22
+==================
+
+ * add rounding to fix crazy decimals
+
+0.3.0 / 2012-09-07
+==================
+
+ * fix `ms(<String>)` [visionmedia]
+
+0.2.0 / 2012-09-03
+==================
+
+ * add component.json [visionmedia]
+ * add days support [visionmedia]
+ * add hours support [visionmedia]
+ * add minutes support [visionmedia]
+ * add seconds support [visionmedia]
+ * add ms string support [visionmedia]
+ * refactor tests to facilitate ms(number) [visionmedia]
+
+0.1.0 / 2012-03-07
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/LICENSE
new file mode 100644
index 0000000..6c07561
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2014 Guillermo Rauch <rauchg@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/README.md
new file mode 100644
index 0000000..9b4fd03
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/README.md
@@ -0,0 +1,35 @@
+# ms.js: miliseconds conversion utility
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('100') // 100
+```
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(ms('10 hours')) // "10h"
+```
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+- Node/Browser compatible. Published as [`ms`](https://www.npmjs.org/package/ms) in [NPM](http://nodejs.org/download).
+- If a number is supplied to `ms`, a string with a unit is returned.
+- If a string that contains the number is supplied, it returns it as
+a number (e.g: it returns `100` for `'100'`).
+- If you pass a string with a number and a valid unit, the number of
+equivalent ms is returned.
+
+## License
+
+MIT
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/index.js
new file mode 100644
index 0000000..4f92771
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/index.js
@@ -0,0 +1,125 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} options
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options){
+ options = options || {};
+ if ('string' == typeof val) return parse(val);
+ return options.long
+ ? long(val)
+ : short(val);
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = '' + str;
+ if (str.length > 10000) return;
+ var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
+ if (!match) return;
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function short(ms) {
+ if (ms >= d) return Math.round(ms / d) + 'd';
+ if (ms >= h) return Math.round(ms / h) + 'h';
+ if (ms >= m) return Math.round(ms / m) + 'm';
+ if (ms >= s) return Math.round(ms / s) + 's';
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function long(ms) {
+ return plural(ms, d, 'day')
+ || plural(ms, h, 'hour')
+ || plural(ms, m, 'minute')
+ || plural(ms, s, 'second')
+ || ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, n, name) {
+ if (ms < n) return;
+ if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name;
+ return Math.ceil(ms / n) + ' ' + name + 's';
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/package.json
new file mode 100644
index 0000000..29c1ba5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/ms/package.json
@@ -0,0 +1,47 @@
+{
+ "name": "ms",
+ "version": "0.7.1",
+ "description": "Tiny ms conversion utility",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/guille/ms.js.git"
+ },
+ "main": "./index",
+ "devDependencies": {
+ "mocha": "*",
+ "expect.js": "*",
+ "serve": "*"
+ },
+ "component": {
+ "scripts": {
+ "ms/index.js": "index.js"
+ }
+ },
+ "gitHead": "713dcf26d9e6fd9dbc95affe7eff9783b7f1b909",
+ "bugs": {
+ "url": "https://github.com/guille/ms.js/issues"
+ },
+ "homepage": "https://github.com/guille/ms.js",
+ "_id": "ms@0.7.1",
+ "scripts": {},
+ "_shasum": "9cd13c03adbff25b65effde7ce864ee952017098",
+ "_from": "ms@0.7.1",
+ "_npmVersion": "2.7.5",
+ "_nodeVersion": "0.12.2",
+ "_npmUser": {
+ "name": "rauchg",
+ "email": "rauchg@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "rauchg",
+ "email": "rauchg@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "9cd13c03adbff25b65effde7ce864ee952017098",
+ "tarball": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/HISTORY.md
new file mode 100644
index 0000000..3015a5f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/HISTORY.md
@@ -0,0 +1,55 @@
+1.3.1 / 2016-11-11
+==================
+
+ * Fix return type in JSDoc
+
+1.3.0 / 2016-05-17
+==================
+
+ * Add `421 Misdirected Request`
+ * perf: enable strict mode
+
+1.2.1 / 2015-02-01
+==================
+
+ * Fix message for status 451
+ - `451 Unavailable For Legal Reasons`
+
+1.2.0 / 2014-09-28
+==================
+
+ * Add `208 Already Repored`
+ * Add `226 IM Used`
+ * Add `306 (Unused)`
+ * Add `415 Unable For Legal Reasons`
+ * Add `508 Loop Detected`
+
+1.1.1 / 2014-09-24
+==================
+
+ * Add missing 308 to `codes.json`
+
+1.1.0 / 2014-09-21
+==================
+
+ * Add `codes.json` for universal support
+
+1.0.4 / 2014-08-20
+==================
+
+ * Package cleanup
+
+1.0.3 / 2014-06-08
+==================
+
+ * Add 308 to `.redirect` category
+
+1.0.2 / 2014-03-13
+==================
+
+ * Add `.retry` category
+
+1.0.1 / 2014-03-12
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/LICENSE
new file mode 100644
index 0000000..82af4df
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/LICENSE
@@ -0,0 +1,23 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+Copyright (c) 2016 Douglas Christopher Wilson doug@somethingdoug.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/README.md
new file mode 100644
index 0000000..2bf0756
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/README.md
@@ -0,0 +1,103 @@
+# Statuses
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+HTTP status utility for node.
+
+## API
+
+```js
+var status = require('statuses')
+```
+
+### var code = status(Integer || String)
+
+If `Integer` or `String` is a valid HTTP code or status message, then the appropriate `code` will be returned. Otherwise, an error will be thrown.
+
+```js
+status(403) // => 403
+status('403') // => 403
+status('forbidden') // => 403
+status('Forbidden') // => 403
+status(306) // throws, as it's not supported by node.js
+```
+
+### status.codes
+
+Returns an array of all the status codes as `Integer`s.
+
+### var msg = status[code]
+
+Map of `code` to `status message`. `undefined` for invalid `code`s.
+
+```js
+status[404] // => 'Not Found'
+```
+
+### var code = status[msg]
+
+Map of `status message` to `code`. `msg` can either be title-cased or lower-cased. `undefined` for invalid `status message`s.
+
+```js
+status['not found'] // => 404
+status['Not Found'] // => 404
+```
+
+### status.redirect[code]
+
+Returns `true` if a status code is a valid redirect status.
+
+```js
+status.redirect[200] // => undefined
+status.redirect[301] // => true
+```
+
+### status.empty[code]
+
+Returns `true` if a status code expects an empty body.
+
+```js
+status.empty[200] // => undefined
+status.empty[204] // => true
+status.empty[304] // => true
+```
+
+### status.retry[code]
+
+Returns `true` if you should retry the rest.
+
+```js
+status.retry[501] // => undefined
+status.retry[503] // => true
+```
+
+## Adding Status Codes
+
+The status codes are primarily sourced from http://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv.
+Additionally, custom codes are added from http://en.wikipedia.org/wiki/List_of_HTTP_status_codes.
+These are added manually in the `lib/*.json` files.
+If you would like to add a status code, add it to the appropriate JSON file.
+
+To rebuild `codes.json`, run the following:
+
+```bash
+# update src/iana.json
+npm run fetch
+# build codes.json
+npm run build
+```
+
+[npm-image]: https://img.shields.io/npm/v/statuses.svg
+[npm-url]: https://npmjs.org/package/statuses
+[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg
+[node-version-url]: https://nodejs.org/en/download
+[travis-image]: https://img.shields.io/travis/jshttp/statuses.svg
+[travis-url]: https://travis-ci.org/jshttp/statuses
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/statuses.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/statuses?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/statuses.svg
+[downloads-url]: https://npmjs.org/package/statuses
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/codes.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/codes.json
new file mode 100644
index 0000000..e765123
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/codes.json
@@ -0,0 +1,65 @@
+{
+ "100": "Continue",
+ "101": "Switching Protocols",
+ "102": "Processing",
+ "200": "OK",
+ "201": "Created",
+ "202": "Accepted",
+ "203": "Non-Authoritative Information",
+ "204": "No Content",
+ "205": "Reset Content",
+ "206": "Partial Content",
+ "207": "Multi-Status",
+ "208": "Already Reported",
+ "226": "IM Used",
+ "300": "Multiple Choices",
+ "301": "Moved Permanently",
+ "302": "Found",
+ "303": "See Other",
+ "304": "Not Modified",
+ "305": "Use Proxy",
+ "306": "(Unused)",
+ "307": "Temporary Redirect",
+ "308": "Permanent Redirect",
+ "400": "Bad Request",
+ "401": "Unauthorized",
+ "402": "Payment Required",
+ "403": "Forbidden",
+ "404": "Not Found",
+ "405": "Method Not Allowed",
+ "406": "Not Acceptable",
+ "407": "Proxy Authentication Required",
+ "408": "Request Timeout",
+ "409": "Conflict",
+ "410": "Gone",
+ "411": "Length Required",
+ "412": "Precondition Failed",
+ "413": "Payload Too Large",
+ "414": "URI Too Long",
+ "415": "Unsupported Media Type",
+ "416": "Range Not Satisfiable",
+ "417": "Expectation Failed",
+ "418": "I'm a teapot",
+ "421": "Misdirected Request",
+ "422": "Unprocessable Entity",
+ "423": "Locked",
+ "424": "Failed Dependency",
+ "425": "Unordered Collection",
+ "426": "Upgrade Required",
+ "428": "Precondition Required",
+ "429": "Too Many Requests",
+ "431": "Request Header Fields Too Large",
+ "451": "Unavailable For Legal Reasons",
+ "500": "Internal Server Error",
+ "501": "Not Implemented",
+ "502": "Bad Gateway",
+ "503": "Service Unavailable",
+ "504": "Gateway Timeout",
+ "505": "HTTP Version Not Supported",
+ "506": "Variant Also Negotiates",
+ "507": "Insufficient Storage",
+ "508": "Loop Detected",
+ "509": "Bandwidth Limit Exceeded",
+ "510": "Not Extended",
+ "511": "Network Authentication Required"
+} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/index.js
new file mode 100644
index 0000000..9f955c6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/index.js
@@ -0,0 +1,110 @@
+/*!
+ * statuses
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2016 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var codes = require('./codes.json')
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = status
+
+// array of status codes
+status.codes = populateStatusesMap(status, codes)
+
+// status codes for redirects
+status.redirect = {
+ 300: true,
+ 301: true,
+ 302: true,
+ 303: true,
+ 305: true,
+ 307: true,
+ 308: true
+}
+
+// status codes for empty bodies
+status.empty = {
+ 204: true,
+ 205: true,
+ 304: true
+}
+
+// status codes for when you should retry the request
+status.retry = {
+ 502: true,
+ 503: true,
+ 504: true
+}
+
+/**
+ * Populate the statuses map for given codes.
+ * @private
+ */
+
+function populateStatusesMap (statuses, codes) {
+ var arr = []
+
+ Object.keys(codes).forEach(function forEachCode (code) {
+ var message = codes[code]
+ var status = Number(code)
+
+ // Populate properties
+ statuses[status] = message
+ statuses[message] = status
+ statuses[message.toLowerCase()] = status
+
+ // Add to array
+ arr.push(status)
+ })
+
+ return arr
+}
+
+/**
+ * Get the status code.
+ *
+ * Given a number, this will throw if it is not a known status
+ * code, otherwise the code will be returned. Given a string,
+ * the string will be parsed for a number and return the code
+ * if valid, otherwise will lookup the code assuming this is
+ * the status message.
+ *
+ * @param {string|number} code
+ * @returns {number}
+ * @public
+ */
+
+function status (code) {
+ if (typeof code === 'number') {
+ if (!status[code]) throw new Error('invalid status code: ' + code)
+ return code
+ }
+
+ if (typeof code !== 'string') {
+ throw new TypeError('code must be a number or string')
+ }
+
+ // '403'
+ var n = parseInt(code, 10)
+ if (!isNaN(n)) {
+ if (!status[n]) throw new Error('invalid status code: ' + n)
+ return n
+ }
+
+ n = status[code.toLowerCase()]
+ if (!n) throw new Error('invalid status message: "' + code + '"')
+ return n
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/package.json
new file mode 100644
index 0000000..fa81a52
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/node_modules/statuses/package.json
@@ -0,0 +1,103 @@
+{
+ "name": "statuses",
+ "description": "HTTP status utility",
+ "version": "1.3.1",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/statuses"
+ },
+ "license": "MIT",
+ "keywords": [
+ "http",
+ "status",
+ "code"
+ ],
+ "files": [
+ "HISTORY.md",
+ "index.js",
+ "codes.json",
+ "LICENSE"
+ ],
+ "devDependencies": {
+ "csv-parse": "1.1.7",
+ "eslint": "3.10.0",
+ "eslint-config-standard": "6.2.1",
+ "eslint-plugin-promise": "3.3.2",
+ "eslint-plugin-standard": "2.0.1",
+ "istanbul": "0.4.5",
+ "mocha": "1.21.5",
+ "stream-to-array": "2.3.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "build": "node scripts/build.js",
+ "fetch": "node scripts/fetch.js",
+ "lint": "eslint .",
+ "test": "mocha --reporter spec --check-leaks --bail test/",
+ "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "update": "npm run fetch && npm run build"
+ },
+ "gitHead": "28a619be77f5b4741e6578a5764c5b06ec6d4aea",
+ "bugs": {
+ "url": "https://github.com/jshttp/statuses/issues"
+ },
+ "homepage": "https://github.com/jshttp/statuses",
+ "_id": "statuses@1.3.1",
+ "_shasum": "faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e",
+ "_from": "statuses@>=1.3.0 <1.4.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "defunctzombie",
+ "email": "shtylman@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "mscdex",
+ "email": "mscdex@mscdex.net"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ }
+ ],
+ "dist": {
+ "shasum": "faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e",
+ "tarball": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/statuses-1.3.1.tgz_1478923281491_0.5574048184789717"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/package.json
new file mode 100644
index 0000000..43ba56b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/send/package.json
@@ -0,0 +1,95 @@
+{
+ "name": "send",
+ "description": "Better streaming static file server with Range and conditional-GET support",
+ "version": "0.14.1",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/pillarjs/send.git"
+ },
+ "keywords": [
+ "static",
+ "file",
+ "server"
+ ],
+ "dependencies": {
+ "debug": "~2.2.0",
+ "depd": "~1.1.0",
+ "destroy": "~1.0.4",
+ "encodeurl": "~1.0.1",
+ "escape-html": "~1.0.3",
+ "etag": "~1.7.0",
+ "fresh": "0.3.0",
+ "http-errors": "~1.5.0",
+ "mime": "1.3.4",
+ "ms": "0.7.1",
+ "on-finished": "~2.3.0",
+ "range-parser": "~1.2.0",
+ "statuses": "~1.3.0"
+ },
+ "devDependencies": {
+ "after": "0.8.1",
+ "eslint": "2.11.1",
+ "eslint-config-standard": "5.3.1",
+ "eslint-plugin-promise": "1.3.1",
+ "eslint-plugin-standard": "1.3.2",
+ "istanbul": "0.4.3",
+ "mocha": "2.5.3",
+ "supertest": "1.1.0"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "README.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "scripts": {
+ "lint": "eslint **/*.js",
+ "test": "mocha --check-leaks --reporter spec --bail",
+ "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot"
+ },
+ "gitHead": "d6dd3b91bbb73ad89f1398fa227b200db9bff037",
+ "bugs": {
+ "url": "https://github.com/pillarjs/send/issues"
+ },
+ "homepage": "https://github.com/pillarjs/send#readme",
+ "_id": "send@0.14.1",
+ "_shasum": "a954984325392f51532a7760760e459598c89f7a",
+ "_from": "send@0.14.1",
+ "_npmVersion": "2.15.1",
+ "_nodeVersion": "4.4.3",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "dist": {
+ "shasum": "a954984325392f51532a7760760e459598c89f7a",
+ "tarball": "https://registry.npmjs.org/send/-/send-0.14.1.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/send-0.14.1.tgz_1465535036412_0.3431496580597013"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/send/-/send-0.14.1.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/serve-static/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/serve-static/HISTORY.md
new file mode 100644
index 0000000..0256dbb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/serve-static/HISTORY.md
@@ -0,0 +1,332 @@
+1.11.1 / 2016-06-10
+===================
+
+ * Fix redirect error when `req.url` contains raw non-URL characters
+ * deps: send@0.14.1
+
+1.11.0 / 2016-06-07
+===================
+
+ * Use status code 301 for redirects
+ * deps: send@0.14.0
+ - Add `acceptRanges` option
+ - Add `cacheControl` option
+ - Attempt to combine multiple ranges into single range
+ - Correctly inherit from `Stream` class
+ - Fix `Content-Range` header in 416 responses when using `start`/`end` options
+ - Fix `Content-Range` header missing from default 416 responses
+ - Ignore non-byte `Range` headers
+ - deps: http-errors@~1.5.0
+ - deps: range-parser@~1.2.0
+ - deps: statuses@~1.3.0
+ - perf: remove argument reassignment
+
+1.10.3 / 2016-05-30
+===================
+
+ * deps: send@0.13.2
+ - Fix invalid `Content-Type` header when `send.mime.default_type` unset
+
+1.10.2 / 2016-01-19
+===================
+
+ * deps: parseurl@~1.3.1
+ - perf: enable strict mode
+
+1.10.1 / 2016-01-16
+===================
+
+ * deps: escape-html@~1.0.3
+ - perf: enable strict mode
+ - perf: optimize string replacement
+ - perf: use faster string coercion
+ * deps: send@0.13.1
+ - deps: depd@~1.1.0
+ - deps: destroy@~1.0.4
+ - deps: escape-html@~1.0.3
+ - deps: range-parser@~1.0.3
+
+1.10.0 / 2015-06-17
+===================
+
+ * Add `fallthrough` option
+ - Allows declaring this middleware is the final destination
+ - Provides better integration with Express patterns
+ * Fix reading options from options prototype
+ * Improve the default redirect response headers
+ * deps: escape-html@1.0.2
+ * deps: send@0.13.0
+ - Allow Node.js HTTP server to set `Date` response header
+ - Fix incorrectly removing `Content-Location` on 304 response
+ - Improve the default redirect response headers
+ - Send appropriate headers on default error response
+ - Use `http-errors` for standard emitted errors
+ - Use `statuses` instead of `http` module for status messages
+ - deps: escape-html@1.0.2
+ - deps: etag@~1.7.0
+ - deps: fresh@0.3.0
+ - deps: on-finished@~2.3.0
+ - perf: enable strict mode
+ - perf: remove unnecessary array allocations
+ * perf: enable strict mode
+ * perf: remove argument reassignment
+
+1.9.3 / 2015-05-14
+==================
+
+ * deps: send@0.12.3
+ - deps: debug@~2.2.0
+ - deps: depd@~1.0.1
+ - deps: etag@~1.6.0
+ - deps: ms@0.7.1
+ - deps: on-finished@~2.2.1
+
+1.9.2 / 2015-03-14
+==================
+
+ * deps: send@0.12.2
+ - Throw errors early for invalid `extensions` or `index` options
+ - deps: debug@~2.1.3
+
+1.9.1 / 2015-02-17
+==================
+
+ * deps: send@0.12.1
+ - Fix regression sending zero-length files
+
+1.9.0 / 2015-02-16
+==================
+
+ * deps: send@0.12.0
+ - Always read the stat size from the file
+ - Fix mutating passed-in `options`
+ - deps: mime@1.3.4
+
+1.8.1 / 2015-01-20
+==================
+
+ * Fix redirect loop in Node.js 0.11.14
+ * deps: send@0.11.1
+ - Fix root path disclosure
+
+1.8.0 / 2015-01-05
+==================
+
+ * deps: send@0.11.0
+ - deps: debug@~2.1.1
+ - deps: etag@~1.5.1
+ - deps: ms@0.7.0
+ - deps: on-finished@~2.2.0
+
+1.7.2 / 2015-01-02
+==================
+
+ * Fix potential open redirect when mounted at root
+
+1.7.1 / 2014-10-22
+==================
+
+ * deps: send@0.10.1
+ - deps: on-finished@~2.1.1
+
+1.7.0 / 2014-10-15
+==================
+
+ * deps: send@0.10.0
+ - deps: debug@~2.1.0
+ - deps: depd@~1.0.0
+ - deps: etag@~1.5.0
+
+1.6.5 / 2015-02-04
+==================
+
+ * Fix potential open redirect when mounted at root
+ - Back-ported from v1.7.2
+
+1.6.4 / 2014-10-08
+==================
+
+ * Fix redirect loop when index file serving disabled
+
+1.6.3 / 2014-09-24
+==================
+
+ * deps: send@0.9.3
+ - deps: etag@~1.4.0
+
+1.6.2 / 2014-09-15
+==================
+
+ * deps: send@0.9.2
+ - deps: depd@0.4.5
+ - deps: etag@~1.3.1
+ - deps: range-parser@~1.0.2
+
+1.6.1 / 2014-09-07
+==================
+
+ * deps: send@0.9.1
+ - deps: fresh@0.2.4
+
+1.6.0 / 2014-09-07
+==================
+
+ * deps: send@0.9.0
+ - Add `lastModified` option
+ - Use `etag` to generate `ETag` header
+ - deps: debug@~2.0.0
+
+1.5.4 / 2014-09-04
+==================
+
+ * deps: send@0.8.5
+ - Fix a path traversal issue when using `root`
+ - Fix malicious path detection for empty string path
+
+1.5.3 / 2014-08-17
+==================
+
+ * deps: send@0.8.3
+
+1.5.2 / 2014-08-14
+==================
+
+ * deps: send@0.8.2
+ - Work around `fd` leak in Node.js 0.10 for `fs.ReadStream`
+
+1.5.1 / 2014-08-09
+==================
+
+ * Fix parsing of weird `req.originalUrl` values
+ * deps: parseurl@~1.3.0
+ * deps: utils-merge@1.0.0
+
+1.5.0 / 2014-08-05
+==================
+
+ * deps: send@0.8.1
+ - Add `extensions` option
+
+1.4.4 / 2014-08-04
+==================
+
+ * deps: send@0.7.4
+ - Fix serving index files without root dir
+
+1.4.3 / 2014-07-29
+==================
+
+ * deps: send@0.7.3
+ - Fix incorrect 403 on Windows and Node.js 0.11
+
+1.4.2 / 2014-07-27
+==================
+
+ * deps: send@0.7.2
+ - deps: depd@0.4.4
+
+1.4.1 / 2014-07-26
+==================
+
+ * deps: send@0.7.1
+ - deps: depd@0.4.3
+
+1.4.0 / 2014-07-21
+==================
+
+ * deps: parseurl@~1.2.0
+ - Cache URLs based on original value
+ - Remove no-longer-needed URL mis-parse work-around
+ - Simplify the "fast-path" `RegExp`
+ * deps: send@0.7.0
+ - Add `dotfiles` option
+ - deps: debug@1.0.4
+ - deps: depd@0.4.2
+
+1.3.2 / 2014-07-11
+==================
+
+ * deps: send@0.6.0
+ - Cap `maxAge` value to 1 year
+ - deps: debug@1.0.3
+
+1.3.1 / 2014-07-09
+==================
+
+ * deps: parseurl@~1.1.3
+ - faster parsing of href-only URLs
+
+1.3.0 / 2014-06-28
+==================
+
+ * Add `setHeaders` option
+ * Include HTML link in redirect response
+ * deps: send@0.5.0
+ - Accept string for `maxAge` (converted by `ms`)
+
+1.2.3 / 2014-06-11
+==================
+
+ * deps: send@0.4.3
+ - Do not throw un-catchable error on file open race condition
+ - Use `escape-html` for HTML escaping
+ - deps: debug@1.0.2
+ - deps: finished@1.2.2
+ - deps: fresh@0.2.2
+
+1.2.2 / 2014-06-09
+==================
+
+ * deps: send@0.4.2
+ - fix "event emitter leak" warnings
+ - deps: debug@1.0.1
+ - deps: finished@1.2.1
+
+1.2.1 / 2014-06-02
+==================
+
+ * use `escape-html` for escaping
+ * deps: send@0.4.1
+ - Send `max-age` in `Cache-Control` in correct format
+
+1.2.0 / 2014-05-29
+==================
+
+ * deps: send@0.4.0
+ - Calculate ETag with md5 for reduced collisions
+ - Fix wrong behavior when index file matches directory
+ - Ignore stream errors after request ends
+ - Skip directories in index file search
+ - deps: debug@0.8.1
+
+1.1.0 / 2014-04-24
+==================
+
+ * Accept options directly to `send` module
+ * deps: send@0.3.0
+
+1.0.4 / 2014-04-07
+==================
+
+ * Resolve relative paths at middleware setup
+ * Use parseurl to parse the URL from request
+
+1.0.3 / 2014-03-20
+==================
+
+ * Do not rely on connect-like environments
+
+1.0.2 / 2014-03-06
+==================
+
+ * deps: send@0.2.0
+
+1.0.1 / 2014-03-05
+==================
+
+ * Add mime export for back-compat
+
+1.0.0 / 2014-03-05
+==================
+
+ * Genesis from `connect`
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/serve-static/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/serve-static/LICENSE
new file mode 100644
index 0000000..cbe62e8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/serve-static/LICENSE
@@ -0,0 +1,25 @@
+(The MIT License)
+
+Copyright (c) 2010 Sencha Inc.
+Copyright (c) 2011 LearnBoost
+Copyright (c) 2011 TJ Holowaychuk
+Copyright (c) 2014-2016 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/serve-static/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/serve-static/README.md
new file mode 100644
index 0000000..3bd75f3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/serve-static/README.md
@@ -0,0 +1,245 @@
+# serve-static
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Linux Build][travis-image]][travis-url]
+[![Windows Build][appveyor-image]][appveyor-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+[![Gratipay][gratipay-image]][gratipay-url]
+
+## Install
+
+```sh
+$ npm install serve-static
+```
+
+## API
+
+```js
+var serveStatic = require('serve-static')
+```
+
+### serveStatic(root, options)
+
+Create a new middleware function to serve files from within a given root
+directory. The file to serve will be determined by combining `req.url`
+with the provided root directory. When a file is not found, instead of
+sending a 404 response, this module will instead call `next()` to move on
+to the next middleware, allowing for stacking and fall-backs.
+
+#### Options
+
+##### acceptRanges
+
+Enable or disable accepting ranged requests, defaults to true.
+Disabling this will not send `Accept-Ranges` and ignore the contents
+of the `Range` request header.
+
+##### cacheControl
+
+Enable or disable setting `Cache-Control` response header, defaults to
+true. Disabling this will ignore the `maxAge` option.
+
+##### dotfiles
+
+ Set how "dotfiles" are treated when encountered. A dotfile is a file
+or directory that begins with a dot ("."). Note this check is done on
+the path itself without checking if the path actually exists on the
+disk. If `root` is specified, only the dotfiles above the root are
+checked (i.e. the root itself can be within a dotfile when set
+to "deny").
+
+ - `'allow'` No special treatment for dotfiles.
+ - `'deny'` Deny a request for a dotfile and 403/`next()`.
+ - `'ignore'` Pretend like the dotfile does not exist and 404/`next()`.
+
+The default value is similar to `'ignore'`, with the exception that this
+default will not ignore the files within a directory that begins with a dot.
+
+##### etag
+
+Enable or disable etag generation, defaults to true.
+
+##### extensions
+
+Set file extension fallbacks. When set, if a file is not found, the given
+extensions will be added to the file name and search for. The first that
+exists will be served. Example: `['html', 'htm']`.
+
+The default value is `false`.
+
+##### fallthrough
+
+Set the middleware to have client errors fall-through as just unhandled
+requests, otherwise forward a client error. The difference is that client
+errors like a bad request or a request to a non-existent file will cause
+this middleware to simply `next()` to your next middleware when this value
+is `true`. When this value is `false`, these errors (even 404s), will invoke
+`next(err)`.
+
+Typically `true` is desired such that multiple physical directories can be
+mapped to the same web address or for routes to fill in non-existent files.
+
+The value `false` can be used if this middleware is mounted at a path that
+is designed to be strictly a single file system directory, which allows for
+short-circuiting 404s for less overhead. This middleware will also reply to
+all methods.
+
+The default value is `true`.
+
+##### index
+
+By default this module will send "index.html" files in response to a request
+on a directory. To disable this set `false` or to supply a new index pass a
+string or an array in preferred order.
+
+##### lastModified
+
+Enable or disable `Last-Modified` header, defaults to true. Uses the file
+system's last modified value.
+
+##### maxAge
+
+Provide a max-age in milliseconds for http caching, defaults to 0. This
+can also be a string accepted by the [ms](https://www.npmjs.org/package/ms#readme)
+module.
+
+##### redirect
+
+Redirect to trailing "/" when the pathname is a dir. Defaults to `true`.
+
+##### setHeaders
+
+Function to set custom headers on response. Alterations to the headers need to
+occur synchronously. The function is called as `fn(res, path, stat)`, where
+the arguments are:
+
+ - `res` the response object
+ - `path` the file path that is being sent
+ - `stat` the stat object of the file that is being sent
+
+## Examples
+
+### Serve files with vanilla node.js http server
+
+```js
+var finalhandler = require('finalhandler')
+var http = require('http')
+var serveStatic = require('serve-static')
+
+// Serve up public/ftp folder
+var serve = serveStatic('public/ftp', {'index': ['index.html', 'index.htm']})
+
+// Create server
+var server = http.createServer(function onRequest (req, res) {
+ serve(req, res, finalhandler(req, res))
+})
+
+// Listen
+server.listen(3000)
+```
+
+### Serve all files as downloads
+
+```js
+var contentDisposition = require('content-disposition')
+var finalhandler = require('finalhandler')
+var http = require('http')
+var serveStatic = require('serve-static')
+
+// Serve up public/ftp folder
+var serve = serveStatic('public/ftp', {
+ 'index': false,
+ 'setHeaders': setHeaders
+})
+
+// Set header to force download
+function setHeaders(res, path) {
+ res.setHeader('Content-Disposition', contentDisposition(path))
+}
+
+// Create server
+var server = http.createServer(function onRequest (req, res) {
+ serve(req, res, finalhandler(req, res))
+})
+
+// Listen
+server.listen(3000)
+```
+
+### Serving using express
+
+#### Simple
+
+This is a simple example of using Express.
+
+```js
+var express = require('express')
+var serveStatic = require('serve-static')
+
+var app = express()
+
+app.use(serveStatic('public/ftp', {'index': ['default.html', 'default.htm']}))
+app.listen(3000)
+```
+
+#### Multiple roots
+
+This example shows a simple way to search through multiple directories.
+Files are look for in `public-optimized/` first, then `public/` second as
+a fallback.
+
+```js
+var express = require('express')
+var serveStatic = require('serve-static')
+
+var app = express()
+
+app.use(serveStatic(__dirname + '/public-optimized'))
+app.use(serveStatic(__dirname + '/public'))
+app.listen(3000)
+```
+
+#### Different settings for paths
+
+This example shows how to set a different max age depending on the served
+file type. In this example, HTML files are not cached, while everything else
+is for 1 day.
+
+```js
+var express = require('express')
+var serveStatic = require('serve-static')
+
+var app = express()
+
+app.use(serveStatic(__dirname + '/public', {
+ maxAge: '1d',
+ setHeaders: setCustomCacheControl
+}))
+
+app.listen(3000)
+
+function setCustomCacheControl (res, path) {
+ if (serveStatic.mime.lookup(path) === 'text/html') {
+ // Custom Cache-Control for HTML files
+ res.setHeader('Cache-Control', 'public, max-age=0')
+ }
+}
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/serve-static.svg
+[npm-url]: https://npmjs.org/package/serve-static
+[travis-image]: https://img.shields.io/travis/expressjs/serve-static/master.svg?label=linux
+[travis-url]: https://travis-ci.org/expressjs/serve-static
+[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/serve-static/master.svg?label=windows
+[appveyor-url]: https://ci.appveyor.com/project/dougwilson/serve-static
+[coveralls-image]: https://img.shields.io/coveralls/expressjs/serve-static/master.svg
+[coveralls-url]: https://coveralls.io/r/expressjs/serve-static
+[downloads-image]: https://img.shields.io/npm/dm/serve-static.svg
+[downloads-url]: https://npmjs.org/package/serve-static
+[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg
+[gratipay-url]: https://gratipay.com/dougwilson/
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/serve-static/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/serve-static/index.js
new file mode 100644
index 0000000..83c5e4f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/serve-static/index.js
@@ -0,0 +1,188 @@
+/*!
+ * serve-static
+ * Copyright(c) 2010 Sencha Inc.
+ * Copyright(c) 2011 TJ Holowaychuk
+ * Copyright(c) 2014-2016 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var encodeUrl = require('encodeurl')
+var escapeHtml = require('escape-html')
+var parseUrl = require('parseurl')
+var resolve = require('path').resolve
+var send = require('send')
+var url = require('url')
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = serveStatic
+module.exports.mime = send.mime
+
+/**
+ * @param {string} root
+ * @param {object} [options]
+ * @return {function}
+ * @public
+ */
+
+function serveStatic (root, options) {
+ if (!root) {
+ throw new TypeError('root path required')
+ }
+
+ if (typeof root !== 'string') {
+ throw new TypeError('root path must be a string')
+ }
+
+ // copy options object
+ var opts = Object.create(options || null)
+
+ // fall-though
+ var fallthrough = opts.fallthrough !== false
+
+ // default redirect
+ var redirect = opts.redirect !== false
+
+ // headers listener
+ var setHeaders = opts.setHeaders
+
+ if (setHeaders && typeof setHeaders !== 'function') {
+ throw new TypeError('option setHeaders must be function')
+ }
+
+ // setup options for send
+ opts.maxage = opts.maxage || opts.maxAge || 0
+ opts.root = resolve(root)
+
+ // construct directory listener
+ var onDirectory = redirect
+ ? createRedirectDirectoryListener()
+ : createNotFoundDirectoryListener()
+
+ return function serveStatic (req, res, next) {
+ if (req.method !== 'GET' && req.method !== 'HEAD') {
+ if (fallthrough) {
+ return next()
+ }
+
+ // method not allowed
+ res.statusCode = 405
+ res.setHeader('Allow', 'GET, HEAD')
+ res.setHeader('Content-Length', '0')
+ res.end()
+ return
+ }
+
+ var forwardError = !fallthrough
+ var originalUrl = parseUrl.original(req)
+ var path = parseUrl(req).pathname
+
+ // make sure redirect occurs at mount
+ if (path === '/' && originalUrl.pathname.substr(-1) !== '/') {
+ path = ''
+ }
+
+ // create send stream
+ var stream = send(req, path, opts)
+
+ // add directory handler
+ stream.on('directory', onDirectory)
+
+ // add headers listener
+ if (setHeaders) {
+ stream.on('headers', setHeaders)
+ }
+
+ // add file listener for fallthrough
+ if (fallthrough) {
+ stream.on('file', function onFile () {
+ // once file is determined, always forward error
+ forwardError = true
+ })
+ }
+
+ // forward errors
+ stream.on('error', function error (err) {
+ if (forwardError || !(err.statusCode < 500)) {
+ next(err)
+ return
+ }
+
+ next()
+ })
+
+ // pipe
+ stream.pipe(res)
+ }
+}
+
+/**
+ * Collapse all leading slashes into a single slash
+ * @private
+ */
+function collapseLeadingSlashes (str) {
+ for (var i = 0; i < str.length; i++) {
+ if (str[i] !== '/') {
+ break
+ }
+ }
+
+ return i > 1
+ ? '/' + str.substr(i)
+ : str
+}
+
+/**
+ * Create a directory listener that just 404s.
+ * @private
+ */
+
+function createNotFoundDirectoryListener () {
+ return function notFound () {
+ this.error(404)
+ }
+}
+
+/**
+ * Create a directory listener that performs a redirect.
+ * @private
+ */
+
+function createRedirectDirectoryListener () {
+ return function redirect () {
+ if (this.hasTrailingSlash()) {
+ this.error(404)
+ return
+ }
+
+ // get original URL
+ var originalUrl = parseUrl.original(this.req)
+
+ // append trailing slash
+ originalUrl.path = null
+ originalUrl.pathname = collapseLeadingSlashes(originalUrl.pathname + '/')
+
+ // reformat the URL
+ var loc = encodeUrl(url.format(originalUrl))
+ var msg = 'Redirecting to <a href="' + escapeHtml(loc) + '">' + escapeHtml(loc) + '</a>\n'
+ var res = this.res
+
+ // send redirect response
+ res.statusCode = 301
+ res.setHeader('Content-Type', 'text/html; charset=UTF-8')
+ res.setHeader('Content-Length', Buffer.byteLength(msg))
+ res.setHeader('X-Content-Type-Options', 'nosniff')
+ res.setHeader('Location', loc)
+ res.end(msg)
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/serve-static/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/serve-static/package.json
new file mode 100644
index 0000000..aa1c2e4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/serve-static/package.json
@@ -0,0 +1,73 @@
+{
+ "name": "serve-static",
+ "description": "Serve static files",
+ "version": "1.11.1",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/expressjs/serve-static.git"
+ },
+ "dependencies": {
+ "encodeurl": "~1.0.1",
+ "escape-html": "~1.0.3",
+ "parseurl": "~1.3.1",
+ "send": "0.14.1"
+ },
+ "devDependencies": {
+ "eslint": "2.11.1",
+ "eslint-config-standard": "5.3.1",
+ "eslint-plugin-promise": "1.3.2",
+ "eslint-plugin-standard": "1.3.2",
+ "istanbul": "0.4.3",
+ "mocha": "2.5.3",
+ "supertest": "1.1.0"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "scripts": {
+ "lint": "eslint **/*.js",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"
+ },
+ "gitHead": "b3a24df138ea2f2c43afcbee0dcce5badf4c78ae",
+ "bugs": {
+ "url": "https://github.com/expressjs/serve-static/issues"
+ },
+ "homepage": "https://github.com/expressjs/serve-static#readme",
+ "_id": "serve-static@1.11.1",
+ "_shasum": "d6cce7693505f733c759de57befc1af76c0f0805",
+ "_from": "serve-static@>=1.11.1 <1.12.0",
+ "_npmVersion": "2.15.1",
+ "_nodeVersion": "4.4.3",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "dist": {
+ "shasum": "d6cce7693505f733c759de57befc1af76c0f0805",
+ "tarball": "https://registry.npmjs.org/serve-static/-/serve-static-1.11.1.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/serve-static-1.11.1.tgz_1465608601758_0.0030737747438251972"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.11.1.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/HISTORY.md
new file mode 100644
index 0000000..4f76fb4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/HISTORY.md
@@ -0,0 +1,212 @@
+1.6.14 / 2016-11-18
+===================
+
+ * deps: mime-types@~2.1.13
+ - Add new mime types
+
+1.6.13 / 2016-05-18
+===================
+
+ * deps: mime-types@~2.1.11
+ - Add new mime types
+
+1.6.12 / 2016-02-28
+===================
+
+ * deps: mime-types@~2.1.10
+ - Add new mime types
+ - Fix extension of `application/dash+xml`
+ - Update primary extension for `audio/mp4`
+
+1.6.11 / 2016-01-29
+===================
+
+ * deps: mime-types@~2.1.9
+ - Add new mime types
+
+1.6.10 / 2015-12-01
+===================
+
+ * deps: mime-types@~2.1.8
+ - Add new mime types
+
+1.6.9 / 2015-09-27
+==================
+
+ * deps: mime-types@~2.1.7
+ - Add new mime types
+
+1.6.8 / 2015-09-04
+==================
+
+ * deps: mime-types@~2.1.6
+ - Add new mime types
+
+1.6.7 / 2015-08-20
+==================
+
+ * Fix type error when given invalid type to match against
+ * deps: mime-types@~2.1.5
+ - Add new mime types
+
+1.6.6 / 2015-07-31
+==================
+
+ * deps: mime-types@~2.1.4
+ - Add new mime types
+
+1.6.5 / 2015-07-16
+==================
+
+ * deps: mime-types@~2.1.3
+ - Add new mime types
+
+1.6.4 / 2015-07-01
+==================
+
+ * deps: mime-types@~2.1.2
+ - Add new mime types
+ * perf: enable strict mode
+ * perf: remove argument reassignment
+
+1.6.3 / 2015-06-08
+==================
+
+ * deps: mime-types@~2.1.1
+ - Add new mime types
+ * perf: reduce try block size
+ * perf: remove bitwise operations
+
+1.6.2 / 2015-05-10
+==================
+
+ * deps: mime-types@~2.0.11
+ - Add new mime types
+
+1.6.1 / 2015-03-13
+==================
+
+ * deps: mime-types@~2.0.10
+ - Add new mime types
+
+1.6.0 / 2015-02-12
+==================
+
+ * fix false-positives in `hasBody` `Transfer-Encoding` check
+ * support wildcard for both type and subtype (`*/*`)
+
+1.5.7 / 2015-02-09
+==================
+
+ * fix argument reassignment
+ * deps: mime-types@~2.0.9
+ - Add new mime types
+
+1.5.6 / 2015-01-29
+==================
+
+ * deps: mime-types@~2.0.8
+ - Add new mime types
+
+1.5.5 / 2014-12-30
+==================
+
+ * deps: mime-types@~2.0.7
+ - Add new mime types
+ - Fix missing extensions
+ - Fix various invalid MIME type entries
+ - Remove example template MIME types
+ - deps: mime-db@~1.5.0
+
+1.5.4 / 2014-12-10
+==================
+
+ * deps: mime-types@~2.0.4
+ - Add new mime types
+ - deps: mime-db@~1.3.0
+
+1.5.3 / 2014-11-09
+==================
+
+ * deps: mime-types@~2.0.3
+ - Add new mime types
+ - deps: mime-db@~1.2.0
+
+1.5.2 / 2014-09-28
+==================
+
+ * deps: mime-types@~2.0.2
+ - Add new mime types
+ - deps: mime-db@~1.1.0
+
+1.5.1 / 2014-09-07
+==================
+
+ * Support Node.js 0.6
+ * deps: media-typer@0.3.0
+ * deps: mime-types@~2.0.1
+ - Support Node.js 0.6
+
+1.5.0 / 2014-09-05
+==================
+
+ * fix `hasbody` to be true for `content-length: 0`
+
+1.4.0 / 2014-09-02
+==================
+
+ * update mime-types
+
+1.3.2 / 2014-06-24
+==================
+
+ * use `~` range on mime-types
+
+1.3.1 / 2014-06-19
+==================
+
+ * fix global variable leak
+
+1.3.0 / 2014-06-19
+==================
+
+ * improve type parsing
+
+ - invalid media type never matches
+ - media type not case-sensitive
+ - extra LWS does not affect results
+
+1.2.2 / 2014-06-19
+==================
+
+ * fix behavior on unknown type argument
+
+1.2.1 / 2014-06-03
+==================
+
+ * switch dependency from `mime` to `mime-types@1.0.0`
+
+1.2.0 / 2014-05-11
+==================
+
+ * support suffix matching:
+
+ - `+json` matches `application/vnd+json`
+ - `*/vnd+json` matches `application/vnd+json`
+ - `application/*+json` matches `application/vnd+json`
+
+1.1.0 / 2014-04-12
+==================
+
+ * add non-array values support
+ * expose internal utilities:
+
+ - `.is()`
+ - `.hasBody()`
+ - `.normalize()`
+ - `.match()`
+
+1.0.1 / 2014-03-30
+==================
+
+ * add `multipart` as a shorthand
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/LICENSE
new file mode 100644
index 0000000..386b7b6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/README.md
new file mode 100644
index 0000000..008a7af
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/README.md
@@ -0,0 +1,136 @@
+# type-is
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Infer the content-type of a request.
+
+### Install
+
+```sh
+$ npm install type-is
+```
+
+## API
+
+```js
+var http = require('http')
+var is = require('type-is')
+
+http.createServer(function (req, res) {
+ var istext = is(req, ['text/*'])
+ res.end('you ' + (istext ? 'sent' : 'did not send') + ' me text')
+})
+```
+
+### type = is(request, types)
+
+`request` is the node HTTP request. `types` is an array of types.
+
+```js
+// req.headers.content-type = 'application/json'
+
+is(req, ['json']) // 'json'
+is(req, ['html', 'json']) // 'json'
+is(req, ['application/*']) // 'application/json'
+is(req, ['application/json']) // 'application/json'
+
+is(req, ['html']) // false
+```
+
+### is.hasBody(request)
+
+Returns a Boolean if the given `request` has a body, regardless of the
+`Content-Type` header.
+
+Having a body has no relation to how large the body is (it may be 0 bytes).
+This is similar to how file existence works. If a body does exist, then this
+indicates that there is data to read from the Node.js request stream.
+
+```js
+if (is.hasBody(req)) {
+ // read the body, since there is one
+
+ req.on('data', function (chunk) {
+ // ...
+ })
+}
+```
+
+### type = is.is(mediaType, types)
+
+`mediaType` is the [media type](https://tools.ietf.org/html/rfc6838) string. `types` is an array of types.
+
+```js
+var mediaType = 'application/json'
+
+is.is(mediaType, ['json']) // 'json'
+is.is(mediaType, ['html', 'json']) // 'json'
+is.is(mediaType, ['application/*']) // 'application/json'
+is.is(mediaType, ['application/json']) // 'application/json'
+
+is.is(mediaType, ['html']) // false
+```
+
+### Each type can be:
+
+- An extension name such as `json`. This name will be returned if matched.
+- A mime type such as `application/json`.
+- A mime type with a wildcard such as `*/*` or `*/json` or `application/*`. The full mime type will be returned if matched.
+- A suffix such as `+json`. This can be combined with a wildcard such as `*/vnd+json` or `application/*+json`. The full mime type will be returned if matched.
+
+`false` will be returned if no type matches or the content type is invalid.
+
+`null` will be returned if the request does not have a body.
+
+## Examples
+
+#### Example body parser
+
+```js
+var is = require('type-is');
+
+function bodyParser(req, res, next) {
+ if (!is.hasBody(req)) {
+ return next()
+ }
+
+ switch (is(req, ['urlencoded', 'json', 'multipart'])) {
+ case 'urlencoded':
+ // parse urlencoded body
+ throw new Error('implement urlencoded body parsing')
+ break
+ case 'json':
+ // parse json body
+ throw new Error('implement json body parsing')
+ break
+ case 'multipart':
+ // parse multipart body
+ throw new Error('implement multipart body parsing')
+ break
+ default:
+ // 415 error code
+ res.statusCode = 415
+ res.end()
+ return
+ }
+}
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/type-is.svg
+[npm-url]: https://npmjs.org/package/type-is
+[node-version-image]: https://img.shields.io/node/v/type-is.svg
+[node-version-url]: https://nodejs.org/en/download/
+[travis-image]: https://img.shields.io/travis/jshttp/type-is/master.svg
+[travis-url]: https://travis-ci.org/jshttp/type-is
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/type-is/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/type-is?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/type-is.svg
+[downloads-url]: https://npmjs.org/package/type-is
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/index.js
new file mode 100644
index 0000000..4da7301
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/index.js
@@ -0,0 +1,262 @@
+/*!
+ * type-is
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var typer = require('media-typer')
+var mime = require('mime-types')
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = typeofrequest
+module.exports.is = typeis
+module.exports.hasBody = hasbody
+module.exports.normalize = normalize
+module.exports.match = mimeMatch
+
+/**
+ * Compare a `value` content-type with `types`.
+ * Each `type` can be an extension like `html`,
+ * a special shortcut like `multipart` or `urlencoded`,
+ * or a mime type.
+ *
+ * If no types match, `false` is returned.
+ * Otherwise, the first `type` that matches is returned.
+ *
+ * @param {String} value
+ * @param {Array} types
+ * @public
+ */
+
+function typeis (value, types_) {
+ var i
+ var types = types_
+
+ // remove parameters and normalize
+ var val = tryNormalizeType(value)
+
+ // no type or invalid
+ if (!val) {
+ return false
+ }
+
+ // support flattened arguments
+ if (types && !Array.isArray(types)) {
+ types = new Array(arguments.length - 1)
+ for (i = 0; i < types.length; i++) {
+ types[i] = arguments[i + 1]
+ }
+ }
+
+ // no types, return the content type
+ if (!types || !types.length) {
+ return val
+ }
+
+ var type
+ for (i = 0; i < types.length; i++) {
+ if (mimeMatch(normalize(type = types[i]), val)) {
+ return type[0] === '+' || type.indexOf('*') !== -1
+ ? val
+ : type
+ }
+ }
+
+ // no matches
+ return false
+}
+
+/**
+ * Check if a request has a request body.
+ * A request with a body __must__ either have `transfer-encoding`
+ * or `content-length` headers set.
+ * http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.3
+ *
+ * @param {Object} request
+ * @return {Boolean}
+ * @public
+ */
+
+function hasbody (req) {
+ return req.headers['transfer-encoding'] !== undefined ||
+ !isNaN(req.headers['content-length'])
+}
+
+/**
+ * Check if the incoming request contains the "Content-Type"
+ * header field, and it contains any of the give mime `type`s.
+ * If there is no request body, `null` is returned.
+ * If there is no content type, `false` is returned.
+ * Otherwise, it returns the first `type` that matches.
+ *
+ * Examples:
+ *
+ * // With Content-Type: text/html; charset=utf-8
+ * this.is('html'); // => 'html'
+ * this.is('text/html'); // => 'text/html'
+ * this.is('text/*', 'application/json'); // => 'text/html'
+ *
+ * // When Content-Type is application/json
+ * this.is('json', 'urlencoded'); // => 'json'
+ * this.is('application/json'); // => 'application/json'
+ * this.is('html', 'application/*'); // => 'application/json'
+ *
+ * this.is('html'); // => false
+ *
+ * @param {String|Array} types...
+ * @return {String|false|null}
+ * @public
+ */
+
+function typeofrequest (req, types_) {
+ var types = types_
+
+ // no body
+ if (!hasbody(req)) {
+ return null
+ }
+
+ // support flattened arguments
+ if (arguments.length > 2) {
+ types = new Array(arguments.length - 1)
+ for (var i = 0; i < types.length; i++) {
+ types[i] = arguments[i + 1]
+ }
+ }
+
+ // request content type
+ var value = req.headers['content-type']
+
+ return typeis(value, types)
+}
+
+/**
+ * Normalize a mime type.
+ * If it's a shorthand, expand it to a valid mime type.
+ *
+ * In general, you probably want:
+ *
+ * var type = is(req, ['urlencoded', 'json', 'multipart']);
+ *
+ * Then use the appropriate body parsers.
+ * These three are the most common request body types
+ * and are thus ensured to work.
+ *
+ * @param {String} type
+ * @private
+ */
+
+function normalize (type) {
+ if (typeof type !== 'string') {
+ // invalid type
+ return false
+ }
+
+ switch (type) {
+ case 'urlencoded':
+ return 'application/x-www-form-urlencoded'
+ case 'multipart':
+ return 'multipart/*'
+ }
+
+ if (type[0] === '+') {
+ // "+json" -> "*/*+json" expando
+ return '*/*' + type
+ }
+
+ return type.indexOf('/') === -1
+ ? mime.lookup(type)
+ : type
+}
+
+/**
+ * Check if `expected` mime type
+ * matches `actual` mime type with
+ * wildcard and +suffix support.
+ *
+ * @param {String} expected
+ * @param {String} actual
+ * @return {Boolean}
+ * @private
+ */
+
+function mimeMatch (expected, actual) {
+ // invalid type
+ if (expected === false) {
+ return false
+ }
+
+ // split types
+ var actualParts = actual.split('/')
+ var expectedParts = expected.split('/')
+
+ // invalid format
+ if (actualParts.length !== 2 || expectedParts.length !== 2) {
+ return false
+ }
+
+ // validate type
+ if (expectedParts[0] !== '*' && expectedParts[0] !== actualParts[0]) {
+ return false
+ }
+
+ // validate suffix wildcard
+ if (expectedParts[1].substr(0, 2) === '*+') {
+ return expectedParts[1].length <= actualParts[1].length + 1 &&
+ expectedParts[1].substr(1) === actualParts[1].substr(1 - expectedParts[1].length)
+ }
+
+ // validate subtype
+ if (expectedParts[1] !== '*' && expectedParts[1] !== actualParts[1]) {
+ return false
+ }
+
+ return true
+}
+
+/**
+ * Normalize a type and remove parameters.
+ *
+ * @param {string} value
+ * @return {string}
+ * @private
+ */
+
+function normalizeType (value) {
+ // parse the type
+ var type = typer.parse(value)
+
+ // remove the parameters
+ type.parameters = undefined
+
+ // reformat it
+ return typer.format(type)
+}
+
+/**
+ * Try to normalize a type and remove parameters.
+ *
+ * @param {string} value
+ * @return {string}
+ * @private
+ */
+
+function tryNormalizeType (value) {
+ try {
+ return normalizeType(value)
+ } catch (err) {
+ return null
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/media-typer/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/media-typer/HISTORY.md
new file mode 100644
index 0000000..62c2003
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/media-typer/HISTORY.md
@@ -0,0 +1,22 @@
+0.3.0 / 2014-09-07
+==================
+
+ * Support Node.js 0.6
+ * Throw error when parameter format invalid on parse
+
+0.2.0 / 2014-06-18
+==================
+
+ * Add `typer.format()` to format media types
+
+0.1.0 / 2014-06-17
+==================
+
+ * Accept `req` as argument to `parse`
+ * Accept `res` as argument to `parse`
+ * Parse media type with extra LWS between type and first parameter
+
+0.0.0 / 2014-06-13
+==================
+
+ * Initial implementation
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/media-typer/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/media-typer/LICENSE
new file mode 100644
index 0000000..b7dce6c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/media-typer/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/media-typer/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/media-typer/README.md
new file mode 100644
index 0000000..d8df623
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/media-typer/README.md
@@ -0,0 +1,81 @@
+# media-typer
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Simple RFC 6838 media type parser
+
+## Installation
+
+```sh
+$ npm install media-typer
+```
+
+## API
+
+```js
+var typer = require('media-typer')
+```
+
+### typer.parse(string)
+
+```js
+var obj = typer.parse('image/svg+xml; charset=utf-8')
+```
+
+Parse a media type string. This will return an object with the following
+properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`):
+
+ - `type`: The type of the media type (always lower case). Example: `'image'`
+
+ - `subtype`: The subtype of the media type (always lower case). Example: `'svg'`
+
+ - `suffix`: The suffix of the media type (always lower case). Example: `'xml'`
+
+ - `parameters`: An object of the parameters in the media type (name of parameter always lower case). Example: `{charset: 'utf-8'}`
+
+### typer.parse(req)
+
+```js
+var obj = typer.parse(req)
+```
+
+Parse the `content-type` header from the given `req`. Short-cut for
+`typer.parse(req.headers['content-type'])`.
+
+### typer.parse(res)
+
+```js
+var obj = typer.parse(res)
+```
+
+Parse the `content-type` header set on the given `res`. Short-cut for
+`typer.parse(res.getHeader('content-type'))`.
+
+### typer.format(obj)
+
+```js
+var obj = typer.format({type: 'image', subtype: 'svg', suffix: 'xml'})
+```
+
+Format an object into a media type string. This will return a string of the
+mime type for the given object. For the properties of the object, see the
+documentation for `typer.parse(string)`.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/media-typer.svg?style=flat
+[npm-url]: https://npmjs.org/package/media-typer
+[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/media-typer.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/media-typer
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/media-typer.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/media-typer
+[downloads-image]: https://img.shields.io/npm/dm/media-typer.svg?style=flat
+[downloads-url]: https://npmjs.org/package/media-typer
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/media-typer/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/media-typer/index.js
new file mode 100644
index 0000000..07f7295
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/media-typer/index.js
@@ -0,0 +1,270 @@
+/*!
+ * media-typer
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * RegExp to match *( ";" parameter ) in RFC 2616 sec 3.7
+ *
+ * parameter = token "=" ( token | quoted-string )
+ * token = 1*<any CHAR except CTLs or separators>
+ * separators = "(" | ")" | "<" | ">" | "@"
+ * | "," | ";" | ":" | "\" | <">
+ * | "/" | "[" | "]" | "?" | "="
+ * | "{" | "}" | SP | HT
+ * quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
+ * qdtext = <any TEXT except <">>
+ * quoted-pair = "\" CHAR
+ * CHAR = <any US-ASCII character (octets 0 - 127)>
+ * TEXT = <any OCTET except CTLs, but including LWS>
+ * LWS = [CRLF] 1*( SP | HT )
+ * CRLF = CR LF
+ * CR = <US-ASCII CR, carriage return (13)>
+ * LF = <US-ASCII LF, linefeed (10)>
+ * SP = <US-ASCII SP, space (32)>
+ * SHT = <US-ASCII HT, horizontal-tab (9)>
+ * CTL = <any US-ASCII control character (octets 0 - 31) and DEL (127)>
+ * OCTET = <any 8-bit sequence of data>
+ */
+var paramRegExp = /; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u0020-\u007e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g;
+var textRegExp = /^[\u0020-\u007e\u0080-\u00ff]+$/
+var tokenRegExp = /^[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+$/
+
+/**
+ * RegExp to match quoted-pair in RFC 2616
+ *
+ * quoted-pair = "\" CHAR
+ * CHAR = <any US-ASCII character (octets 0 - 127)>
+ */
+var qescRegExp = /\\([\u0000-\u007f])/g;
+
+/**
+ * RegExp to match chars that must be quoted-pair in RFC 2616
+ */
+var quoteRegExp = /([\\"])/g;
+
+/**
+ * RegExp to match type in RFC 6838
+ *
+ * type-name = restricted-name
+ * subtype-name = restricted-name
+ * restricted-name = restricted-name-first *126restricted-name-chars
+ * restricted-name-first = ALPHA / DIGIT
+ * restricted-name-chars = ALPHA / DIGIT / "!" / "#" /
+ * "$" / "&" / "-" / "^" / "_"
+ * restricted-name-chars =/ "." ; Characters before first dot always
+ * ; specify a facet name
+ * restricted-name-chars =/ "+" ; Characters after last plus always
+ * ; specify a structured syntax suffix
+ * ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
+ * DIGIT = %x30-39 ; 0-9
+ */
+var subtypeNameRegExp = /^[A-Za-z0-9][A-Za-z0-9!#$&^_.-]{0,126}$/
+var typeNameRegExp = /^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/
+var typeRegExp = /^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/;
+
+/**
+ * Module exports.
+ */
+
+exports.format = format
+exports.parse = parse
+
+/**
+ * Format object to media type.
+ *
+ * @param {object} obj
+ * @return {string}
+ * @api public
+ */
+
+function format(obj) {
+ if (!obj || typeof obj !== 'object') {
+ throw new TypeError('argument obj is required')
+ }
+
+ var parameters = obj.parameters
+ var subtype = obj.subtype
+ var suffix = obj.suffix
+ var type = obj.type
+
+ if (!type || !typeNameRegExp.test(type)) {
+ throw new TypeError('invalid type')
+ }
+
+ if (!subtype || !subtypeNameRegExp.test(subtype)) {
+ throw new TypeError('invalid subtype')
+ }
+
+ // format as type/subtype
+ var string = type + '/' + subtype
+
+ // append +suffix
+ if (suffix) {
+ if (!typeNameRegExp.test(suffix)) {
+ throw new TypeError('invalid suffix')
+ }
+
+ string += '+' + suffix
+ }
+
+ // append parameters
+ if (parameters && typeof parameters === 'object') {
+ var param
+ var params = Object.keys(parameters).sort()
+
+ for (var i = 0; i < params.length; i++) {
+ param = params[i]
+
+ if (!tokenRegExp.test(param)) {
+ throw new TypeError('invalid parameter name')
+ }
+
+ string += '; ' + param + '=' + qstring(parameters[param])
+ }
+ }
+
+ return string
+}
+
+/**
+ * Parse media type to object.
+ *
+ * @param {string|object} string
+ * @return {Object}
+ * @api public
+ */
+
+function parse(string) {
+ if (!string) {
+ throw new TypeError('argument string is required')
+ }
+
+ // support req/res-like objects as argument
+ if (typeof string === 'object') {
+ string = getcontenttype(string)
+ }
+
+ if (typeof string !== 'string') {
+ throw new TypeError('argument string is required to be a string')
+ }
+
+ var index = string.indexOf(';')
+ var type = index !== -1
+ ? string.substr(0, index)
+ : string
+
+ var key
+ var match
+ var obj = splitType(type)
+ var params = {}
+ var value
+
+ paramRegExp.lastIndex = index
+
+ while (match = paramRegExp.exec(string)) {
+ if (match.index !== index) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ index += match[0].length
+ key = match[1].toLowerCase()
+ value = match[2]
+
+ if (value[0] === '"') {
+ // remove quotes and escapes
+ value = value
+ .substr(1, value.length - 2)
+ .replace(qescRegExp, '$1')
+ }
+
+ params[key] = value
+ }
+
+ if (index !== -1 && index !== string.length) {
+ throw new TypeError('invalid parameter format')
+ }
+
+ obj.parameters = params
+
+ return obj
+}
+
+/**
+ * Get content-type from req/res objects.
+ *
+ * @param {object}
+ * @return {Object}
+ * @api private
+ */
+
+function getcontenttype(obj) {
+ if (typeof obj.getHeader === 'function') {
+ // res-like
+ return obj.getHeader('content-type')
+ }
+
+ if (typeof obj.headers === 'object') {
+ // req-like
+ return obj.headers && obj.headers['content-type']
+ }
+}
+
+/**
+ * Quote a string if necessary.
+ *
+ * @param {string} val
+ * @return {string}
+ * @api private
+ */
+
+function qstring(val) {
+ var str = String(val)
+
+ // no need to quote tokens
+ if (tokenRegExp.test(str)) {
+ return str
+ }
+
+ if (str.length > 0 && !textRegExp.test(str)) {
+ throw new TypeError('invalid parameter value')
+ }
+
+ return '"' + str.replace(quoteRegExp, '\\$1') + '"'
+}
+
+/**
+ * Simply "type/subtype+siffx" into parts.
+ *
+ * @param {string} string
+ * @return {Object}
+ * @api private
+ */
+
+function splitType(string) {
+ var match = typeRegExp.exec(string.toLowerCase())
+
+ if (!match) {
+ throw new TypeError('invalid media type')
+ }
+
+ var type = match[1]
+ var subtype = match[2]
+ var suffix
+
+ // suffix after last +
+ var index = subtype.lastIndexOf('+')
+ if (index !== -1) {
+ suffix = subtype.substr(index + 1)
+ subtype = subtype.substr(0, index)
+ }
+
+ var obj = {
+ type: type,
+ subtype: subtype,
+ suffix: suffix
+ }
+
+ return obj
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/media-typer/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/media-typer/package.json
new file mode 100644
index 0000000..e280284
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/media-typer/package.json
@@ -0,0 +1,57 @@
+{
+ "name": "media-typer",
+ "description": "Simple RFC 6838 media type parser and formatter",
+ "version": "0.3.0",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/media-typer"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.2",
+ "mocha": "~1.21.4",
+ "should": "~4.0.4"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --check-leaks --bail test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "d49d41ffd0bb5a0655fa44a59df2ec0bfc835b16",
+ "bugs": {
+ "url": "https://github.com/jshttp/media-typer/issues"
+ },
+ "homepage": "https://github.com/jshttp/media-typer",
+ "_id": "media-typer@0.3.0",
+ "_shasum": "8710d7af0aa626f8fffa1ce00168545263255748",
+ "_from": "media-typer@0.3.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dist": {
+ "shasum": "8710d7af0aa626f8fffa1ce00168545263255748",
+ "tarball": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/HISTORY.md
new file mode 100644
index 0000000..31b24e0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/HISTORY.md
@@ -0,0 +1,210 @@
+2.1.13 / 2016-11-18
+===================
+
+ * deps: mime-db@~1.25.0
+ - Add new mime types
+
+2.1.12 / 2016-09-18
+===================
+
+ * deps: mime-db@~1.24.0
+ - Add new mime types
+ - Add `audio/mp3`
+
+2.1.11 / 2016-05-01
+===================
+
+ * deps: mime-db@~1.23.0
+ - Add new mime types
+
+2.1.10 / 2016-02-15
+===================
+
+ * deps: mime-db@~1.22.0
+ - Add new mime types
+ - Fix extension of `application/dash+xml`
+ - Update primary extension for `audio/mp4`
+
+2.1.9 / 2016-01-06
+==================
+
+ * deps: mime-db@~1.21.0
+ - Add new mime types
+
+2.1.8 / 2015-11-30
+==================
+
+ * deps: mime-db@~1.20.0
+ - Add new mime types
+
+2.1.7 / 2015-09-20
+==================
+
+ * deps: mime-db@~1.19.0
+ - Add new mime types
+
+2.1.6 / 2015-09-03
+==================
+
+ * deps: mime-db@~1.18.0
+ - Add new mime types
+
+2.1.5 / 2015-08-20
+==================
+
+ * deps: mime-db@~1.17.0
+ - Add new mime types
+
+2.1.4 / 2015-07-30
+==================
+
+ * deps: mime-db@~1.16.0
+ - Add new mime types
+
+2.1.3 / 2015-07-13
+==================
+
+ * deps: mime-db@~1.15.0
+ - Add new mime types
+
+2.1.2 / 2015-06-25
+==================
+
+ * deps: mime-db@~1.14.0
+ - Add new mime types
+
+2.1.1 / 2015-06-08
+==================
+
+ * perf: fix deopt during mapping
+
+2.1.0 / 2015-06-07
+==================
+
+ * Fix incorrectly treating extension-less file name as extension
+ - i.e. `'path/to/json'` will no longer return `application/json`
+ * Fix `.charset(type)` to accept parameters
+ * Fix `.charset(type)` to match case-insensitive
+ * Improve generation of extension to MIME mapping
+ * Refactor internals for readability and no argument reassignment
+ * Prefer `application/*` MIME types from the same source
+ * Prefer any type over `application/octet-stream`
+ * deps: mime-db@~1.13.0
+ - Add nginx as a source
+ - Add new mime types
+
+2.0.14 / 2015-06-06
+===================
+
+ * deps: mime-db@~1.12.0
+ - Add new mime types
+
+2.0.13 / 2015-05-31
+===================
+
+ * deps: mime-db@~1.11.0
+ - Add new mime types
+
+2.0.12 / 2015-05-19
+===================
+
+ * deps: mime-db@~1.10.0
+ - Add new mime types
+
+2.0.11 / 2015-05-05
+===================
+
+ * deps: mime-db@~1.9.1
+ - Add new mime types
+
+2.0.10 / 2015-03-13
+===================
+
+ * deps: mime-db@~1.8.0
+ - Add new mime types
+
+2.0.9 / 2015-02-09
+==================
+
+ * deps: mime-db@~1.7.0
+ - Add new mime types
+ - Community extensions ownership transferred from `node-mime`
+
+2.0.8 / 2015-01-29
+==================
+
+ * deps: mime-db@~1.6.0
+ - Add new mime types
+
+2.0.7 / 2014-12-30
+==================
+
+ * deps: mime-db@~1.5.0
+ - Add new mime types
+ - Fix various invalid MIME type entries
+
+2.0.6 / 2014-12-30
+==================
+
+ * deps: mime-db@~1.4.0
+ - Add new mime types
+ - Fix various invalid MIME type entries
+ - Remove example template MIME types
+
+2.0.5 / 2014-12-29
+==================
+
+ * deps: mime-db@~1.3.1
+ - Fix missing extensions
+
+2.0.4 / 2014-12-10
+==================
+
+ * deps: mime-db@~1.3.0
+ - Add new mime types
+
+2.0.3 / 2014-11-09
+==================
+
+ * deps: mime-db@~1.2.0
+ - Add new mime types
+
+2.0.2 / 2014-09-28
+==================
+
+ * deps: mime-db@~1.1.0
+ - Add new mime types
+ - Add additional compressible
+ - Update charsets
+
+2.0.1 / 2014-09-07
+==================
+
+ * Support Node.js 0.6
+
+2.0.0 / 2014-09-02
+==================
+
+ * Use `mime-db`
+ * Remove `.define()`
+
+1.0.2 / 2014-08-04
+==================
+
+ * Set charset=utf-8 for `text/javascript`
+
+1.0.1 / 2014-06-24
+==================
+
+ * Add `text/jsx` type
+
+1.0.0 / 2014-05-12
+==================
+
+ * Return `false` for unknown types
+ * Set charset=utf-8 for `application/json`
+
+0.1.0 / 2014-05-02
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/LICENSE
new file mode 100644
index 0000000..0616607
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/README.md
new file mode 100644
index 0000000..e77d615
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/README.md
@@ -0,0 +1,103 @@
+# mime-types
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+The ultimate javascript content-type utility.
+
+Similar to [node-mime](https://github.com/broofa/node-mime), except:
+
+- __No fallbacks.__ Instead of naively returning the first available type, `mime-types` simply returns `false`,
+ so do `var type = mime.lookup('unrecognized') || 'application/octet-stream'`.
+- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`.
+- Additional mime types are added such as jade and stylus via [mime-db](https://github.com/jshttp/mime-db)
+- No `.define()` functionality
+
+Otherwise, the API is compatible.
+
+## Install
+
+```sh
+$ npm install mime-types
+```
+
+## Adding Types
+
+All mime types are based on [mime-db](https://github.com/jshttp/mime-db),
+so open a PR there if you'd like to add mime types.
+
+## API
+
+```js
+var mime = require('mime-types')
+```
+
+All functions return `false` if input is invalid or not found.
+
+### mime.lookup(path)
+
+Lookup the content-type associated with a file.
+
+```js
+mime.lookup('json') // 'application/json'
+mime.lookup('.md') // 'text/x-markdown'
+mime.lookup('file.html') // 'text/html'
+mime.lookup('folder/file.js') // 'application/javascript'
+mime.lookup('folder/.htaccess') // false
+
+mime.lookup('cats') // false
+```
+
+### mime.contentType(type)
+
+Create a full content-type header given a content-type or extension.
+
+```js
+mime.contentType('markdown') // 'text/x-markdown; charset=utf-8'
+mime.contentType('file.json') // 'application/json; charset=utf-8'
+
+// from a full path
+mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8'
+```
+
+### mime.extension(type)
+
+Get the default extension for a content-type.
+
+```js
+mime.extension('application/octet-stream') // 'bin'
+```
+
+### mime.charset(type)
+
+Lookup the implied default charset of a content-type.
+
+```js
+mime.charset('text/x-markdown') // 'UTF-8'
+```
+
+### var type = mime.types[extension]
+
+A map of content-types by extension.
+
+### [extensions...] = mime.extensions[type]
+
+A map of extensions by content-type.
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/mime-types.svg
+[npm-url]: https://npmjs.org/package/mime-types
+[node-version-image]: https://img.shields.io/node/v/mime-types.svg
+[node-version-url]: https://nodejs.org/en/download/
+[travis-image]: https://img.shields.io/travis/jshttp/mime-types/master.svg
+[travis-url]: https://travis-ci.org/jshttp/mime-types
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-types/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/mime-types
+[downloads-image]: https://img.shields.io/npm/dm/mime-types.svg
+[downloads-url]: https://npmjs.org/package/mime-types
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/index.js
new file mode 100644
index 0000000..9226ca5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/index.js
@@ -0,0 +1,188 @@
+/*!
+ * mime-types
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var db = require('mime-db')
+var extname = require('path').extname
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var extractTypeRegExp = /^\s*([^;\s]*)(?:;|\s|$)/
+var textTypeRegExp = /^text\//i
+
+/**
+ * Module exports.
+ * @public
+ */
+
+exports.charset = charset
+exports.charsets = { lookup: charset }
+exports.contentType = contentType
+exports.extension = extension
+exports.extensions = Object.create(null)
+exports.lookup = lookup
+exports.types = Object.create(null)
+
+// Populate the extensions/types maps
+populateMaps(exports.extensions, exports.types)
+
+/**
+ * Get the default charset for a MIME type.
+ *
+ * @param {string} type
+ * @return {boolean|string}
+ */
+
+function charset (type) {
+ if (!type || typeof type !== 'string') {
+ return false
+ }
+
+ // TODO: use media-typer
+ var match = extractTypeRegExp.exec(type)
+ var mime = match && db[match[1].toLowerCase()]
+
+ if (mime && mime.charset) {
+ return mime.charset
+ }
+
+ // default text/* to utf-8
+ if (match && textTypeRegExp.test(match[1])) {
+ return 'UTF-8'
+ }
+
+ return false
+}
+
+/**
+ * Create a full Content-Type header given a MIME type or extension.
+ *
+ * @param {string} str
+ * @return {boolean|string}
+ */
+
+function contentType (str) {
+ // TODO: should this even be in this module?
+ if (!str || typeof str !== 'string') {
+ return false
+ }
+
+ var mime = str.indexOf('/') === -1
+ ? exports.lookup(str)
+ : str
+
+ if (!mime) {
+ return false
+ }
+
+ // TODO: use content-type or other module
+ if (mime.indexOf('charset') === -1) {
+ var charset = exports.charset(mime)
+ if (charset) mime += '; charset=' + charset.toLowerCase()
+ }
+
+ return mime
+}
+
+/**
+ * Get the default extension for a MIME type.
+ *
+ * @param {string} type
+ * @return {boolean|string}
+ */
+
+function extension (type) {
+ if (!type || typeof type !== 'string') {
+ return false
+ }
+
+ // TODO: use media-typer
+ var match = extractTypeRegExp.exec(type)
+
+ // get extensions
+ var exts = match && exports.extensions[match[1].toLowerCase()]
+
+ if (!exts || !exts.length) {
+ return false
+ }
+
+ return exts[0]
+}
+
+/**
+ * Lookup the MIME type for a file path/extension.
+ *
+ * @param {string} path
+ * @return {boolean|string}
+ */
+
+function lookup (path) {
+ if (!path || typeof path !== 'string') {
+ return false
+ }
+
+ // get the extension ("ext" or ".ext" or full path)
+ var extension = extname('x.' + path)
+ .toLowerCase()
+ .substr(1)
+
+ if (!extension) {
+ return false
+ }
+
+ return exports.types[extension] || false
+}
+
+/**
+ * Populate the extensions and types maps.
+ * @private
+ */
+
+function populateMaps (extensions, types) {
+ // source preference (least -> most)
+ var preference = ['nginx', 'apache', undefined, 'iana']
+
+ Object.keys(db).forEach(function forEachMimeType (type) {
+ var mime = db[type]
+ var exts = mime.extensions
+
+ if (!exts || !exts.length) {
+ return
+ }
+
+ // mime -> extensions
+ extensions[type] = exts
+
+ // extension -> mime
+ for (var i = 0; i < exts.length; i++) {
+ var extension = exts[i]
+
+ if (types[extension]) {
+ var from = preference.indexOf(db[types[extension]].source)
+ var to = preference.indexOf(mime.source)
+
+ if (types[extension] !== 'application/octet-stream' &&
+ from > to || (from === to && types[extension].substr(0, 12) === 'application/')) {
+ // skip the remapping
+ continue
+ }
+ }
+
+ // set the extension -> mime
+ types[extension] = type
+ }
+ })
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/HISTORY.md
new file mode 100644
index 0000000..01fa85c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/HISTORY.md
@@ -0,0 +1,375 @@
+1.25.0 / 2016-11-11
+===================
+
+ * Add `application/dicom+json`
+ * Add `application/dicom+xml`
+ * Add `application/vnd.openstreetmap.data+xml`
+ * Add `application/vnd.tri.onesource`
+ * Add `application/yang-data+json`
+ * Add `application/yang-data+xml`
+
+1.24.0 / 2016-09-18
+===================
+
+ * Add `application/clue_info+xml`
+ * Add `application/geo+json`
+ * Add `application/lgr+xml`
+ * Add `application/vnd.amazon.mobi8-ebook`
+ * Add `application/vnd.chess-pgn`
+ * Add `application/vnd.comicbook+zip`
+ * Add `application/vnd.d2l.coursepackage1p0+zip`
+ * Add `application/vnd.espass-espass+zip`
+ * Add `application/vnd.nearst.inv+json`
+ * Add `application/vnd.oma.lwm2m+json`
+ * Add `application/vnd.oma.lwm2m+tlv`
+ * Add `application/vnd.quarantainenet`
+ * Add `application/vnd.rar`
+ * Add `audio/mp3`
+ * Add `image/dicom-rle`
+ * Add `image/emf`
+ * Add `image/jls`
+ * Add `image/wmf`
+ * Add `model/gltf+json`
+ * Add `text/vnd.ascii-art`
+
+1.23.0 / 2016-05-01
+===================
+
+ * Add `application/efi`
+ * Add `application/vnd.3gpp.sms+xml`
+ * Add `application/vnd.3lightssoftware.imagescal`
+ * Add `application/vnd.coreos.ignition+json`
+ * Add `application/vnd.desmume.movie`
+ * Add `application/vnd.onepager`
+ * Add `application/vnd.vel+json`
+ * Add `text/prs.prop.logic`
+ * Add `video/encaprtp`
+ * Add `video/h265`
+ * Add `video/iso.segment`
+ * Add `video/raptorfec`
+ * Add `video/rtploopback`
+ * Add `video/vnd.radgamettools.bink`
+ * Add `video/vnd.radgamettools.smacker`
+ * Add `video/vp8`
+ * Add extension `.3gpp` to `audio/3gpp`
+
+1.22.0 / 2016-02-15
+===================
+
+ * Add `application/ppsp-tracker+json`
+ * Add `application/problem+json`
+ * Add `application/problem+xml`
+ * Add `application/vnd.hdt`
+ * Add `application/vnd.ms-printschematicket+xml`
+ * Add `model/vnd.rosette.annotated-data-model`
+ * Add `text/slim`
+ * Add extension `.rng` to `application/xml`
+ * Fix extension of `application/dash+xml` to be `.mpd`
+ * Update primary extension to `.m4a` for `audio/mp4`
+
+1.21.0 / 2016-01-06
+===================
+
+ * Add `application/emergencycalldata.comment+xml`
+ * Add `application/emergencycalldata.deviceinfo+xml`
+ * Add `application/emergencycalldata.providerinfo+xml`
+ * Add `application/emergencycalldata.serviceinfo+xml`
+ * Add `application/emergencycalldata.subscriberinfo+xml`
+ * Add `application/vnd.filmit.zfc`
+ * Add `application/vnd.google-apps.document`
+ * Add `application/vnd.google-apps.presentation`
+ * Add `application/vnd.google-apps.spreadsheet`
+ * Add `application/vnd.mapbox-vector-tile`
+ * Add `application/vnd.ms-printdevicecapabilities+xml`
+ * Add `application/vnd.ms-windows.devicepairing`
+ * Add `application/vnd.ms-windows.nwprinting.oob`
+ * Add `application/vnd.tml`
+ * Add `audio/evs`
+
+1.20.0 / 2015-11-10
+===================
+
+ * Add `application/cdni`
+ * Add `application/csvm+json`
+ * Add `application/rfc+xml`
+ * Add `application/vnd.3gpp.access-transfer-events+xml`
+ * Add `application/vnd.3gpp.srvcc-ext+xml`
+ * Add `application/vnd.ms-windows.wsd.oob`
+ * Add `application/vnd.oxli.countgraph`
+ * Add `application/vnd.pagerduty+json`
+ * Add `text/x-suse-ymp`
+
+1.19.0 / 2015-09-17
+===================
+
+ * Add `application/vnd.3gpp-prose-pc3ch+xml`
+ * Add `application/vnd.3gpp.srvcc-info+xml`
+ * Add `application/vnd.apple.pkpass`
+ * Add `application/vnd.drive+json`
+
+1.18.0 / 2015-09-03
+===================
+
+ * Add `application/pkcs12`
+ * Add `application/vnd.3gpp-prose+xml`
+ * Add `application/vnd.3gpp.mid-call+xml`
+ * Add `application/vnd.3gpp.state-and-event-info+xml`
+ * Add `application/vnd.anki`
+ * Add `application/vnd.firemonkeys.cloudcell`
+ * Add `application/vnd.openblox.game+xml`
+ * Add `application/vnd.openblox.game-binary`
+
+1.17.0 / 2015-08-13
+===================
+
+ * Add `application/x-msdos-program`
+ * Add `audio/g711-0`
+ * Add `image/vnd.mozilla.apng`
+ * Add extension `.exe` to `application/x-msdos-program`
+
+1.16.0 / 2015-07-29
+===================
+
+ * Add `application/vnd.uri-map`
+
+1.15.0 / 2015-07-13
+===================
+
+ * Add `application/x-httpd-php`
+
+1.14.0 / 2015-06-25
+===================
+
+ * Add `application/scim+json`
+ * Add `application/vnd.3gpp.ussd+xml`
+ * Add `application/vnd.biopax.rdf+xml`
+ * Add `text/x-processing`
+
+1.13.0 / 2015-06-07
+===================
+
+ * Add nginx as a source
+ * Add `application/x-cocoa`
+ * Add `application/x-java-archive-diff`
+ * Add `application/x-makeself`
+ * Add `application/x-perl`
+ * Add `application/x-pilot`
+ * Add `application/x-redhat-package-manager`
+ * Add `application/x-sea`
+ * Add `audio/x-m4a`
+ * Add `audio/x-realaudio`
+ * Add `image/x-jng`
+ * Add `text/mathml`
+
+1.12.0 / 2015-06-05
+===================
+
+ * Add `application/bdoc`
+ * Add `application/vnd.hyperdrive+json`
+ * Add `application/x-bdoc`
+ * Add extension `.rtf` to `text/rtf`
+
+1.11.0 / 2015-05-31
+===================
+
+ * Add `audio/wav`
+ * Add `audio/wave`
+ * Add extension `.litcoffee` to `text/coffeescript`
+ * Add extension `.sfd-hdstx` to `application/vnd.hydrostatix.sof-data`
+ * Add extension `.n-gage` to `application/vnd.nokia.n-gage.symbian.install`
+
+1.10.0 / 2015-05-19
+===================
+
+ * Add `application/vnd.balsamiq.bmpr`
+ * Add `application/vnd.microsoft.portable-executable`
+ * Add `application/x-ns-proxy-autoconfig`
+
+1.9.1 / 2015-04-19
+==================
+
+ * Remove `.json` extension from `application/manifest+json`
+ - This is causing bugs downstream
+
+1.9.0 / 2015-04-19
+==================
+
+ * Add `application/manifest+json`
+ * Add `application/vnd.micro+json`
+ * Add `image/vnd.zbrush.pcx`
+ * Add `image/x-ms-bmp`
+
+1.8.0 / 2015-03-13
+==================
+
+ * Add `application/vnd.citationstyles.style+xml`
+ * Add `application/vnd.fastcopy-disk-image`
+ * Add `application/vnd.gov.sk.xmldatacontainer+xml`
+ * Add extension `.jsonld` to `application/ld+json`
+
+1.7.0 / 2015-02-08
+==================
+
+ * Add `application/vnd.gerber`
+ * Add `application/vnd.msa-disk-image`
+
+1.6.1 / 2015-02-05
+==================
+
+ * Community extensions ownership transferred from `node-mime`
+
+1.6.0 / 2015-01-29
+==================
+
+ * Add `application/jose`
+ * Add `application/jose+json`
+ * Add `application/json-seq`
+ * Add `application/jwk+json`
+ * Add `application/jwk-set+json`
+ * Add `application/jwt`
+ * Add `application/rdap+json`
+ * Add `application/vnd.gov.sk.e-form+xml`
+ * Add `application/vnd.ims.imsccv1p3`
+
+1.5.0 / 2014-12-30
+==================
+
+ * Add `application/vnd.oracle.resource+json`
+ * Fix various invalid MIME type entries
+ - `application/mbox+xml`
+ - `application/oscp-response`
+ - `application/vwg-multiplexed`
+ - `audio/g721`
+
+1.4.0 / 2014-12-21
+==================
+
+ * Add `application/vnd.ims.imsccv1p2`
+ * Fix various invalid MIME type entries
+ - `application/vnd-acucobol`
+ - `application/vnd-curl`
+ - `application/vnd-dart`
+ - `application/vnd-dxr`
+ - `application/vnd-fdf`
+ - `application/vnd-mif`
+ - `application/vnd-sema`
+ - `application/vnd-wap-wmlc`
+ - `application/vnd.adobe.flash-movie`
+ - `application/vnd.dece-zip`
+ - `application/vnd.dvb_service`
+ - `application/vnd.micrografx-igx`
+ - `application/vnd.sealed-doc`
+ - `application/vnd.sealed-eml`
+ - `application/vnd.sealed-mht`
+ - `application/vnd.sealed-ppt`
+ - `application/vnd.sealed-tiff`
+ - `application/vnd.sealed-xls`
+ - `application/vnd.sealedmedia.softseal-html`
+ - `application/vnd.sealedmedia.softseal-pdf`
+ - `application/vnd.wap-slc`
+ - `application/vnd.wap-wbxml`
+ - `audio/vnd.sealedmedia.softseal-mpeg`
+ - `image/vnd-djvu`
+ - `image/vnd-svf`
+ - `image/vnd-wap-wbmp`
+ - `image/vnd.sealed-png`
+ - `image/vnd.sealedmedia.softseal-gif`
+ - `image/vnd.sealedmedia.softseal-jpg`
+ - `model/vnd-dwf`
+ - `model/vnd.parasolid.transmit-binary`
+ - `model/vnd.parasolid.transmit-text`
+ - `text/vnd-a`
+ - `text/vnd-curl`
+ - `text/vnd.wap-wml`
+ * Remove example template MIME types
+ - `application/example`
+ - `audio/example`
+ - `image/example`
+ - `message/example`
+ - `model/example`
+ - `multipart/example`
+ - `text/example`
+ - `video/example`
+
+1.3.1 / 2014-12-16
+==================
+
+ * Fix missing extensions
+ - `application/json5`
+ - `text/hjson`
+
+1.3.0 / 2014-12-07
+==================
+
+ * Add `application/a2l`
+ * Add `application/aml`
+ * Add `application/atfx`
+ * Add `application/atxml`
+ * Add `application/cdfx+xml`
+ * Add `application/dii`
+ * Add `application/json5`
+ * Add `application/lxf`
+ * Add `application/mf4`
+ * Add `application/vnd.apache.thrift.compact`
+ * Add `application/vnd.apache.thrift.json`
+ * Add `application/vnd.coffeescript`
+ * Add `application/vnd.enphase.envoy`
+ * Add `application/vnd.ims.imsccv1p1`
+ * Add `text/csv-schema`
+ * Add `text/hjson`
+ * Add `text/markdown`
+ * Add `text/yaml`
+
+1.2.0 / 2014-11-09
+==================
+
+ * Add `application/cea`
+ * Add `application/dit`
+ * Add `application/vnd.gov.sk.e-form+zip`
+ * Add `application/vnd.tmd.mediaflex.api+xml`
+ * Type `application/epub+zip` is now IANA-registered
+
+1.1.2 / 2014-10-23
+==================
+
+ * Rebuild database for `application/x-www-form-urlencoded` change
+
+1.1.1 / 2014-10-20
+==================
+
+ * Mark `application/x-www-form-urlencoded` as compressible.
+
+1.1.0 / 2014-09-28
+==================
+
+ * Add `application/font-woff2`
+
+1.0.3 / 2014-09-25
+==================
+
+ * Fix engine requirement in package
+
+1.0.2 / 2014-09-25
+==================
+
+ * Add `application/coap-group+json`
+ * Add `application/dcd`
+ * Add `application/vnd.apache.thrift.binary`
+ * Add `image/vnd.tencent.tap`
+ * Mark all JSON-derived types as compressible
+ * Update `text/vtt` data
+
+1.0.1 / 2014-08-30
+==================
+
+ * Fix extension ordering
+
+1.0.0 / 2014-08-30
+==================
+
+ * Add `application/atf`
+ * Add `application/merge-patch+json`
+ * Add `multipart/x-mixed-replace`
+ * Add `source: 'apache'` metadata
+ * Add `source: 'iana'` metadata
+ * Remove badly-assumed charset data
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/LICENSE
new file mode 100644
index 0000000..a7ae8ee
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md
new file mode 100644
index 0000000..7662440
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md
@@ -0,0 +1,82 @@
+# mime-db
+
+[![NPM Version][npm-version-image]][npm-url]
+[![NPM Downloads][npm-downloads-image]][npm-url]
+[![Node.js Version][node-image]][node-url]
+[![Build Status][travis-image]][travis-url]
+[![Coverage Status][coveralls-image]][coveralls-url]
+
+This is a database of all mime types.
+It consists of a single, public JSON file and does not include any logic,
+allowing it to remain as un-opinionated as possible with an API.
+It aggregates data from the following sources:
+
+- http://www.iana.org/assignments/media-types/media-types.xhtml
+- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
+- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types
+
+## Installation
+
+```bash
+npm install mime-db
+```
+
+### Database Download
+
+If you're crazy enough to use this in the browser, you can just grab the
+JSON file using [RawGit](https://rawgit.com/). It is recommended to replace
+`master` with [a release tag](https://github.com/jshttp/mime-db/tags) as the
+JSON format may change in the future.
+
+```
+https://cdn.rawgit.com/jshttp/mime-db/master/db.json
+```
+
+## Usage
+
+```js
+var db = require('mime-db');
+
+// grab data on .js files
+var data = db['application/javascript'];
+```
+
+## Data Structure
+
+The JSON file is a map lookup for lowercased mime types.
+Each mime type has the following properties:
+
+- `.source` - where the mime type is defined.
+ If not set, it's probably a custom media type.
+ - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types)
+ - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml)
+ - `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types)
+- `.extensions[]` - known extensions associated with this mime type.
+- `.compressible` - whether a file of this type can be gzipped.
+- `.charset` - the default charset associated with this type, if any.
+
+If unknown, every property could be `undefined`.
+
+## Contributing
+
+To edit the database, only make PRs against `src/custom.json` or
+`src/custom-suffix.json`.
+
+To update the build, run `npm run build`.
+
+## Adding Custom Media Types
+
+The best way to get new media types included in this library is to register
+them with the IANA. The community registration procedure is outlined in
+[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types
+registered with the IANA are automatically pulled into this library.
+
+[npm-version-image]: https://img.shields.io/npm/v/mime-db.svg
+[npm-downloads-image]: https://img.shields.io/npm/dm/mime-db.svg
+[npm-url]: https://npmjs.org/package/mime-db
+[travis-image]: https://img.shields.io/travis/jshttp/mime-db/master.svg
+[travis-url]: https://travis-ci.org/jshttp/mime-db
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-db/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master
+[node-image]: https://img.shields.io/node/v/mime-db.svg
+[node-url]: http://nodejs.org/download/
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json
new file mode 100644
index 0000000..94384d3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json
@@ -0,0 +1,6712 @@
+{
+ "application/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "application/3gpdash-qoe-report+xml": {
+ "source": "iana"
+ },
+ "application/3gpp-ims+xml": {
+ "source": "iana"
+ },
+ "application/a2l": {
+ "source": "iana"
+ },
+ "application/activemessage": {
+ "source": "iana"
+ },
+ "application/alto-costmap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-costmapfilter+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-directory+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointcost+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointcostparams+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointprop+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointpropparams+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-error+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-networkmap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-networkmapfilter+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/aml": {
+ "source": "iana"
+ },
+ "application/andrew-inset": {
+ "source": "iana",
+ "extensions": ["ez"]
+ },
+ "application/applefile": {
+ "source": "iana"
+ },
+ "application/applixware": {
+ "source": "apache",
+ "extensions": ["aw"]
+ },
+ "application/atf": {
+ "source": "iana"
+ },
+ "application/atfx": {
+ "source": "iana"
+ },
+ "application/atom+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["atom"]
+ },
+ "application/atomcat+xml": {
+ "source": "iana",
+ "extensions": ["atomcat"]
+ },
+ "application/atomdeleted+xml": {
+ "source": "iana"
+ },
+ "application/atomicmail": {
+ "source": "iana"
+ },
+ "application/atomsvc+xml": {
+ "source": "iana",
+ "extensions": ["atomsvc"]
+ },
+ "application/atxml": {
+ "source": "iana"
+ },
+ "application/auth-policy+xml": {
+ "source": "iana"
+ },
+ "application/bacnet-xdd+zip": {
+ "source": "iana"
+ },
+ "application/batch-smtp": {
+ "source": "iana"
+ },
+ "application/bdoc": {
+ "compressible": false,
+ "extensions": ["bdoc"]
+ },
+ "application/beep+xml": {
+ "source": "iana"
+ },
+ "application/calendar+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/calendar+xml": {
+ "source": "iana"
+ },
+ "application/call-completion": {
+ "source": "iana"
+ },
+ "application/cals-1840": {
+ "source": "iana"
+ },
+ "application/cbor": {
+ "source": "iana"
+ },
+ "application/ccmp+xml": {
+ "source": "iana"
+ },
+ "application/ccxml+xml": {
+ "source": "iana",
+ "extensions": ["ccxml"]
+ },
+ "application/cdfx+xml": {
+ "source": "iana"
+ },
+ "application/cdmi-capability": {
+ "source": "iana",
+ "extensions": ["cdmia"]
+ },
+ "application/cdmi-container": {
+ "source": "iana",
+ "extensions": ["cdmic"]
+ },
+ "application/cdmi-domain": {
+ "source": "iana",
+ "extensions": ["cdmid"]
+ },
+ "application/cdmi-object": {
+ "source": "iana",
+ "extensions": ["cdmio"]
+ },
+ "application/cdmi-queue": {
+ "source": "iana",
+ "extensions": ["cdmiq"]
+ },
+ "application/cdni": {
+ "source": "iana"
+ },
+ "application/cea": {
+ "source": "iana"
+ },
+ "application/cea-2018+xml": {
+ "source": "iana"
+ },
+ "application/cellml+xml": {
+ "source": "iana"
+ },
+ "application/cfw": {
+ "source": "iana"
+ },
+ "application/clue_info+xml": {
+ "source": "iana"
+ },
+ "application/cms": {
+ "source": "iana"
+ },
+ "application/cnrp+xml": {
+ "source": "iana"
+ },
+ "application/coap-group+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/commonground": {
+ "source": "iana"
+ },
+ "application/conference-info+xml": {
+ "source": "iana"
+ },
+ "application/cpl+xml": {
+ "source": "iana"
+ },
+ "application/csrattrs": {
+ "source": "iana"
+ },
+ "application/csta+xml": {
+ "source": "iana"
+ },
+ "application/cstadata+xml": {
+ "source": "iana"
+ },
+ "application/csvm+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/cu-seeme": {
+ "source": "apache",
+ "extensions": ["cu"]
+ },
+ "application/cybercash": {
+ "source": "iana"
+ },
+ "application/dart": {
+ "compressible": true
+ },
+ "application/dash+xml": {
+ "source": "iana",
+ "extensions": ["mpd"]
+ },
+ "application/dashdelta": {
+ "source": "iana"
+ },
+ "application/davmount+xml": {
+ "source": "iana",
+ "extensions": ["davmount"]
+ },
+ "application/dca-rft": {
+ "source": "iana"
+ },
+ "application/dcd": {
+ "source": "iana"
+ },
+ "application/dec-dx": {
+ "source": "iana"
+ },
+ "application/dialog-info+xml": {
+ "source": "iana"
+ },
+ "application/dicom": {
+ "source": "iana"
+ },
+ "application/dicom+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/dicom+xml": {
+ "source": "iana"
+ },
+ "application/dii": {
+ "source": "iana"
+ },
+ "application/dit": {
+ "source": "iana"
+ },
+ "application/dns": {
+ "source": "iana"
+ },
+ "application/docbook+xml": {
+ "source": "apache",
+ "extensions": ["dbk"]
+ },
+ "application/dskpp+xml": {
+ "source": "iana"
+ },
+ "application/dssc+der": {
+ "source": "iana",
+ "extensions": ["dssc"]
+ },
+ "application/dssc+xml": {
+ "source": "iana",
+ "extensions": ["xdssc"]
+ },
+ "application/dvcs": {
+ "source": "iana"
+ },
+ "application/ecmascript": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["ecma"]
+ },
+ "application/edi-consent": {
+ "source": "iana"
+ },
+ "application/edi-x12": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/edifact": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/efi": {
+ "source": "iana"
+ },
+ "application/emergencycalldata.comment+xml": {
+ "source": "iana"
+ },
+ "application/emergencycalldata.deviceinfo+xml": {
+ "source": "iana"
+ },
+ "application/emergencycalldata.providerinfo+xml": {
+ "source": "iana"
+ },
+ "application/emergencycalldata.serviceinfo+xml": {
+ "source": "iana"
+ },
+ "application/emergencycalldata.subscriberinfo+xml": {
+ "source": "iana"
+ },
+ "application/emma+xml": {
+ "source": "iana",
+ "extensions": ["emma"]
+ },
+ "application/emotionml+xml": {
+ "source": "iana"
+ },
+ "application/encaprtp": {
+ "source": "iana"
+ },
+ "application/epp+xml": {
+ "source": "iana"
+ },
+ "application/epub+zip": {
+ "source": "iana",
+ "extensions": ["epub"]
+ },
+ "application/eshop": {
+ "source": "iana"
+ },
+ "application/exi": {
+ "source": "iana",
+ "extensions": ["exi"]
+ },
+ "application/fastinfoset": {
+ "source": "iana"
+ },
+ "application/fastsoap": {
+ "source": "iana"
+ },
+ "application/fdt+xml": {
+ "source": "iana"
+ },
+ "application/fits": {
+ "source": "iana"
+ },
+ "application/font-sfnt": {
+ "source": "iana"
+ },
+ "application/font-tdpfr": {
+ "source": "iana",
+ "extensions": ["pfr"]
+ },
+ "application/font-woff": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["woff"]
+ },
+ "application/font-woff2": {
+ "compressible": false,
+ "extensions": ["woff2"]
+ },
+ "application/framework-attributes+xml": {
+ "source": "iana"
+ },
+ "application/geo+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/gml+xml": {
+ "source": "apache",
+ "extensions": ["gml"]
+ },
+ "application/gpx+xml": {
+ "source": "apache",
+ "extensions": ["gpx"]
+ },
+ "application/gxf": {
+ "source": "apache",
+ "extensions": ["gxf"]
+ },
+ "application/gzip": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/h224": {
+ "source": "iana"
+ },
+ "application/held+xml": {
+ "source": "iana"
+ },
+ "application/http": {
+ "source": "iana"
+ },
+ "application/hyperstudio": {
+ "source": "iana",
+ "extensions": ["stk"]
+ },
+ "application/ibe-key-request+xml": {
+ "source": "iana"
+ },
+ "application/ibe-pkg-reply+xml": {
+ "source": "iana"
+ },
+ "application/ibe-pp-data": {
+ "source": "iana"
+ },
+ "application/iges": {
+ "source": "iana"
+ },
+ "application/im-iscomposing+xml": {
+ "source": "iana"
+ },
+ "application/index": {
+ "source": "iana"
+ },
+ "application/index.cmd": {
+ "source": "iana"
+ },
+ "application/index.obj": {
+ "source": "iana"
+ },
+ "application/index.response": {
+ "source": "iana"
+ },
+ "application/index.vnd": {
+ "source": "iana"
+ },
+ "application/inkml+xml": {
+ "source": "iana",
+ "extensions": ["ink","inkml"]
+ },
+ "application/iotp": {
+ "source": "iana"
+ },
+ "application/ipfix": {
+ "source": "iana",
+ "extensions": ["ipfix"]
+ },
+ "application/ipp": {
+ "source": "iana"
+ },
+ "application/isup": {
+ "source": "iana"
+ },
+ "application/its+xml": {
+ "source": "iana"
+ },
+ "application/java-archive": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["jar","war","ear"]
+ },
+ "application/java-serialized-object": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["ser"]
+ },
+ "application/java-vm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["class"]
+ },
+ "application/javascript": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["js"]
+ },
+ "application/jose": {
+ "source": "iana"
+ },
+ "application/jose+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jrd+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/json": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["json","map"]
+ },
+ "application/json-patch+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/json-seq": {
+ "source": "iana"
+ },
+ "application/json5": {
+ "extensions": ["json5"]
+ },
+ "application/jsonml+json": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["jsonml"]
+ },
+ "application/jwk+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jwk-set+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jwt": {
+ "source": "iana"
+ },
+ "application/kpml-request+xml": {
+ "source": "iana"
+ },
+ "application/kpml-response+xml": {
+ "source": "iana"
+ },
+ "application/ld+json": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["jsonld"]
+ },
+ "application/lgr+xml": {
+ "source": "iana"
+ },
+ "application/link-format": {
+ "source": "iana"
+ },
+ "application/load-control+xml": {
+ "source": "iana"
+ },
+ "application/lost+xml": {
+ "source": "iana",
+ "extensions": ["lostxml"]
+ },
+ "application/lostsync+xml": {
+ "source": "iana"
+ },
+ "application/lxf": {
+ "source": "iana"
+ },
+ "application/mac-binhex40": {
+ "source": "iana",
+ "extensions": ["hqx"]
+ },
+ "application/mac-compactpro": {
+ "source": "apache",
+ "extensions": ["cpt"]
+ },
+ "application/macwriteii": {
+ "source": "iana"
+ },
+ "application/mads+xml": {
+ "source": "iana",
+ "extensions": ["mads"]
+ },
+ "application/manifest+json": {
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["webmanifest"]
+ },
+ "application/marc": {
+ "source": "iana",
+ "extensions": ["mrc"]
+ },
+ "application/marcxml+xml": {
+ "source": "iana",
+ "extensions": ["mrcx"]
+ },
+ "application/mathematica": {
+ "source": "iana",
+ "extensions": ["ma","nb","mb"]
+ },
+ "application/mathml+xml": {
+ "source": "iana",
+ "extensions": ["mathml"]
+ },
+ "application/mathml-content+xml": {
+ "source": "iana"
+ },
+ "application/mathml-presentation+xml": {
+ "source": "iana"
+ },
+ "application/mbms-associated-procedure-description+xml": {
+ "source": "iana"
+ },
+ "application/mbms-deregister+xml": {
+ "source": "iana"
+ },
+ "application/mbms-envelope+xml": {
+ "source": "iana"
+ },
+ "application/mbms-msk+xml": {
+ "source": "iana"
+ },
+ "application/mbms-msk-response+xml": {
+ "source": "iana"
+ },
+ "application/mbms-protection-description+xml": {
+ "source": "iana"
+ },
+ "application/mbms-reception-report+xml": {
+ "source": "iana"
+ },
+ "application/mbms-register+xml": {
+ "source": "iana"
+ },
+ "application/mbms-register-response+xml": {
+ "source": "iana"
+ },
+ "application/mbms-schedule+xml": {
+ "source": "iana"
+ },
+ "application/mbms-user-service-description+xml": {
+ "source": "iana"
+ },
+ "application/mbox": {
+ "source": "iana",
+ "extensions": ["mbox"]
+ },
+ "application/media-policy-dataset+xml": {
+ "source": "iana"
+ },
+ "application/media_control+xml": {
+ "source": "iana"
+ },
+ "application/mediaservercontrol+xml": {
+ "source": "iana",
+ "extensions": ["mscml"]
+ },
+ "application/merge-patch+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/metalink+xml": {
+ "source": "apache",
+ "extensions": ["metalink"]
+ },
+ "application/metalink4+xml": {
+ "source": "iana",
+ "extensions": ["meta4"]
+ },
+ "application/mets+xml": {
+ "source": "iana",
+ "extensions": ["mets"]
+ },
+ "application/mf4": {
+ "source": "iana"
+ },
+ "application/mikey": {
+ "source": "iana"
+ },
+ "application/mods+xml": {
+ "source": "iana",
+ "extensions": ["mods"]
+ },
+ "application/moss-keys": {
+ "source": "iana"
+ },
+ "application/moss-signature": {
+ "source": "iana"
+ },
+ "application/mosskey-data": {
+ "source": "iana"
+ },
+ "application/mosskey-request": {
+ "source": "iana"
+ },
+ "application/mp21": {
+ "source": "iana",
+ "extensions": ["m21","mp21"]
+ },
+ "application/mp4": {
+ "source": "iana",
+ "extensions": ["mp4s","m4p"]
+ },
+ "application/mpeg4-generic": {
+ "source": "iana"
+ },
+ "application/mpeg4-iod": {
+ "source": "iana"
+ },
+ "application/mpeg4-iod-xmt": {
+ "source": "iana"
+ },
+ "application/mrb-consumer+xml": {
+ "source": "iana"
+ },
+ "application/mrb-publish+xml": {
+ "source": "iana"
+ },
+ "application/msc-ivr+xml": {
+ "source": "iana"
+ },
+ "application/msc-mixer+xml": {
+ "source": "iana"
+ },
+ "application/msword": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["doc","dot"]
+ },
+ "application/mxf": {
+ "source": "iana",
+ "extensions": ["mxf"]
+ },
+ "application/nasdata": {
+ "source": "iana"
+ },
+ "application/news-checkgroups": {
+ "source": "iana"
+ },
+ "application/news-groupinfo": {
+ "source": "iana"
+ },
+ "application/news-transmission": {
+ "source": "iana"
+ },
+ "application/nlsml+xml": {
+ "source": "iana"
+ },
+ "application/nss": {
+ "source": "iana"
+ },
+ "application/ocsp-request": {
+ "source": "iana"
+ },
+ "application/ocsp-response": {
+ "source": "iana"
+ },
+ "application/octet-stream": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]
+ },
+ "application/oda": {
+ "source": "iana",
+ "extensions": ["oda"]
+ },
+ "application/odx": {
+ "source": "iana"
+ },
+ "application/oebps-package+xml": {
+ "source": "iana",
+ "extensions": ["opf"]
+ },
+ "application/ogg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ogx"]
+ },
+ "application/omdoc+xml": {
+ "source": "apache",
+ "extensions": ["omdoc"]
+ },
+ "application/onenote": {
+ "source": "apache",
+ "extensions": ["onetoc","onetoc2","onetmp","onepkg"]
+ },
+ "application/oxps": {
+ "source": "iana",
+ "extensions": ["oxps"]
+ },
+ "application/p2p-overlay+xml": {
+ "source": "iana"
+ },
+ "application/parityfec": {
+ "source": "iana"
+ },
+ "application/patch-ops-error+xml": {
+ "source": "iana",
+ "extensions": ["xer"]
+ },
+ "application/pdf": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pdf"]
+ },
+ "application/pdx": {
+ "source": "iana"
+ },
+ "application/pgp-encrypted": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pgp"]
+ },
+ "application/pgp-keys": {
+ "source": "iana"
+ },
+ "application/pgp-signature": {
+ "source": "iana",
+ "extensions": ["asc","sig"]
+ },
+ "application/pics-rules": {
+ "source": "apache",
+ "extensions": ["prf"]
+ },
+ "application/pidf+xml": {
+ "source": "iana"
+ },
+ "application/pidf-diff+xml": {
+ "source": "iana"
+ },
+ "application/pkcs10": {
+ "source": "iana",
+ "extensions": ["p10"]
+ },
+ "application/pkcs12": {
+ "source": "iana"
+ },
+ "application/pkcs7-mime": {
+ "source": "iana",
+ "extensions": ["p7m","p7c"]
+ },
+ "application/pkcs7-signature": {
+ "source": "iana",
+ "extensions": ["p7s"]
+ },
+ "application/pkcs8": {
+ "source": "iana",
+ "extensions": ["p8"]
+ },
+ "application/pkix-attr-cert": {
+ "source": "iana",
+ "extensions": ["ac"]
+ },
+ "application/pkix-cert": {
+ "source": "iana",
+ "extensions": ["cer"]
+ },
+ "application/pkix-crl": {
+ "source": "iana",
+ "extensions": ["crl"]
+ },
+ "application/pkix-pkipath": {
+ "source": "iana",
+ "extensions": ["pkipath"]
+ },
+ "application/pkixcmp": {
+ "source": "iana",
+ "extensions": ["pki"]
+ },
+ "application/pls+xml": {
+ "source": "iana",
+ "extensions": ["pls"]
+ },
+ "application/poc-settings+xml": {
+ "source": "iana"
+ },
+ "application/postscript": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["ai","eps","ps"]
+ },
+ "application/ppsp-tracker+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/problem+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/problem+xml": {
+ "source": "iana"
+ },
+ "application/provenance+xml": {
+ "source": "iana"
+ },
+ "application/prs.alvestrand.titrax-sheet": {
+ "source": "iana"
+ },
+ "application/prs.cww": {
+ "source": "iana",
+ "extensions": ["cww"]
+ },
+ "application/prs.hpub+zip": {
+ "source": "iana"
+ },
+ "application/prs.nprend": {
+ "source": "iana"
+ },
+ "application/prs.plucker": {
+ "source": "iana"
+ },
+ "application/prs.rdf-xml-crypt": {
+ "source": "iana"
+ },
+ "application/prs.xsf+xml": {
+ "source": "iana"
+ },
+ "application/pskc+xml": {
+ "source": "iana",
+ "extensions": ["pskcxml"]
+ },
+ "application/qsig": {
+ "source": "iana"
+ },
+ "application/raptorfec": {
+ "source": "iana"
+ },
+ "application/rdap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/rdf+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rdf"]
+ },
+ "application/reginfo+xml": {
+ "source": "iana",
+ "extensions": ["rif"]
+ },
+ "application/relax-ng-compact-syntax": {
+ "source": "iana",
+ "extensions": ["rnc"]
+ },
+ "application/remote-printing": {
+ "source": "iana"
+ },
+ "application/reputon+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/resource-lists+xml": {
+ "source": "iana",
+ "extensions": ["rl"]
+ },
+ "application/resource-lists-diff+xml": {
+ "source": "iana",
+ "extensions": ["rld"]
+ },
+ "application/rfc+xml": {
+ "source": "iana"
+ },
+ "application/riscos": {
+ "source": "iana"
+ },
+ "application/rlmi+xml": {
+ "source": "iana"
+ },
+ "application/rls-services+xml": {
+ "source": "iana",
+ "extensions": ["rs"]
+ },
+ "application/rpki-ghostbusters": {
+ "source": "iana",
+ "extensions": ["gbr"]
+ },
+ "application/rpki-manifest": {
+ "source": "iana",
+ "extensions": ["mft"]
+ },
+ "application/rpki-roa": {
+ "source": "iana",
+ "extensions": ["roa"]
+ },
+ "application/rpki-updown": {
+ "source": "iana"
+ },
+ "application/rsd+xml": {
+ "source": "apache",
+ "extensions": ["rsd"]
+ },
+ "application/rss+xml": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["rss"]
+ },
+ "application/rtf": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rtf"]
+ },
+ "application/rtploopback": {
+ "source": "iana"
+ },
+ "application/rtx": {
+ "source": "iana"
+ },
+ "application/samlassertion+xml": {
+ "source": "iana"
+ },
+ "application/samlmetadata+xml": {
+ "source": "iana"
+ },
+ "application/sbml+xml": {
+ "source": "iana",
+ "extensions": ["sbml"]
+ },
+ "application/scaip+xml": {
+ "source": "iana"
+ },
+ "application/scim+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/scvp-cv-request": {
+ "source": "iana",
+ "extensions": ["scq"]
+ },
+ "application/scvp-cv-response": {
+ "source": "iana",
+ "extensions": ["scs"]
+ },
+ "application/scvp-vp-request": {
+ "source": "iana",
+ "extensions": ["spq"]
+ },
+ "application/scvp-vp-response": {
+ "source": "iana",
+ "extensions": ["spp"]
+ },
+ "application/sdp": {
+ "source": "iana",
+ "extensions": ["sdp"]
+ },
+ "application/sep+xml": {
+ "source": "iana"
+ },
+ "application/sep-exi": {
+ "source": "iana"
+ },
+ "application/session-info": {
+ "source": "iana"
+ },
+ "application/set-payment": {
+ "source": "iana"
+ },
+ "application/set-payment-initiation": {
+ "source": "iana",
+ "extensions": ["setpay"]
+ },
+ "application/set-registration": {
+ "source": "iana"
+ },
+ "application/set-registration-initiation": {
+ "source": "iana",
+ "extensions": ["setreg"]
+ },
+ "application/sgml": {
+ "source": "iana"
+ },
+ "application/sgml-open-catalog": {
+ "source": "iana"
+ },
+ "application/shf+xml": {
+ "source": "iana",
+ "extensions": ["shf"]
+ },
+ "application/sieve": {
+ "source": "iana"
+ },
+ "application/simple-filter+xml": {
+ "source": "iana"
+ },
+ "application/simple-message-summary": {
+ "source": "iana"
+ },
+ "application/simplesymbolcontainer": {
+ "source": "iana"
+ },
+ "application/slate": {
+ "source": "iana"
+ },
+ "application/smil": {
+ "source": "iana"
+ },
+ "application/smil+xml": {
+ "source": "iana",
+ "extensions": ["smi","smil"]
+ },
+ "application/smpte336m": {
+ "source": "iana"
+ },
+ "application/soap+fastinfoset": {
+ "source": "iana"
+ },
+ "application/soap+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/sparql-query": {
+ "source": "iana",
+ "extensions": ["rq"]
+ },
+ "application/sparql-results+xml": {
+ "source": "iana",
+ "extensions": ["srx"]
+ },
+ "application/spirits-event+xml": {
+ "source": "iana"
+ },
+ "application/sql": {
+ "source": "iana"
+ },
+ "application/srgs": {
+ "source": "iana",
+ "extensions": ["gram"]
+ },
+ "application/srgs+xml": {
+ "source": "iana",
+ "extensions": ["grxml"]
+ },
+ "application/sru+xml": {
+ "source": "iana",
+ "extensions": ["sru"]
+ },
+ "application/ssdl+xml": {
+ "source": "apache",
+ "extensions": ["ssdl"]
+ },
+ "application/ssml+xml": {
+ "source": "iana",
+ "extensions": ["ssml"]
+ },
+ "application/tamp-apex-update": {
+ "source": "iana"
+ },
+ "application/tamp-apex-update-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-community-update": {
+ "source": "iana"
+ },
+ "application/tamp-community-update-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-error": {
+ "source": "iana"
+ },
+ "application/tamp-sequence-adjust": {
+ "source": "iana"
+ },
+ "application/tamp-sequence-adjust-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-status-query": {
+ "source": "iana"
+ },
+ "application/tamp-status-response": {
+ "source": "iana"
+ },
+ "application/tamp-update": {
+ "source": "iana"
+ },
+ "application/tamp-update-confirm": {
+ "source": "iana"
+ },
+ "application/tar": {
+ "compressible": true
+ },
+ "application/tei+xml": {
+ "source": "iana",
+ "extensions": ["tei","teicorpus"]
+ },
+ "application/thraud+xml": {
+ "source": "iana",
+ "extensions": ["tfi"]
+ },
+ "application/timestamp-query": {
+ "source": "iana"
+ },
+ "application/timestamp-reply": {
+ "source": "iana"
+ },
+ "application/timestamped-data": {
+ "source": "iana",
+ "extensions": ["tsd"]
+ },
+ "application/ttml+xml": {
+ "source": "iana"
+ },
+ "application/tve-trigger": {
+ "source": "iana"
+ },
+ "application/ulpfec": {
+ "source": "iana"
+ },
+ "application/urc-grpsheet+xml": {
+ "source": "iana"
+ },
+ "application/urc-ressheet+xml": {
+ "source": "iana"
+ },
+ "application/urc-targetdesc+xml": {
+ "source": "iana"
+ },
+ "application/urc-uisocketdesc+xml": {
+ "source": "iana"
+ },
+ "application/vcard+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vcard+xml": {
+ "source": "iana"
+ },
+ "application/vemmi": {
+ "source": "iana"
+ },
+ "application/vividence.scriptfile": {
+ "source": "apache"
+ },
+ "application/vnd.3gpp-prose+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp-prose-pc3ch+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.access-transfer-events+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.bsf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.mid-call+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.pic-bw-large": {
+ "source": "iana",
+ "extensions": ["plb"]
+ },
+ "application/vnd.3gpp.pic-bw-small": {
+ "source": "iana",
+ "extensions": ["psb"]
+ },
+ "application/vnd.3gpp.pic-bw-var": {
+ "source": "iana",
+ "extensions": ["pvb"]
+ },
+ "application/vnd.3gpp.sms": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.sms+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.srvcc-ext+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.srvcc-info+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.state-and-event-info+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.ussd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp2.bcmcsinfo+xml": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp2.sms": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp2.tcap": {
+ "source": "iana",
+ "extensions": ["tcap"]
+ },
+ "application/vnd.3lightssoftware.imagescal": {
+ "source": "iana"
+ },
+ "application/vnd.3m.post-it-notes": {
+ "source": "iana",
+ "extensions": ["pwn"]
+ },
+ "application/vnd.accpac.simply.aso": {
+ "source": "iana",
+ "extensions": ["aso"]
+ },
+ "application/vnd.accpac.simply.imp": {
+ "source": "iana",
+ "extensions": ["imp"]
+ },
+ "application/vnd.acucobol": {
+ "source": "iana",
+ "extensions": ["acu"]
+ },
+ "application/vnd.acucorp": {
+ "source": "iana",
+ "extensions": ["atc","acutc"]
+ },
+ "application/vnd.adobe.air-application-installer-package+zip": {
+ "source": "apache",
+ "extensions": ["air"]
+ },
+ "application/vnd.adobe.flash.movie": {
+ "source": "iana"
+ },
+ "application/vnd.adobe.formscentral.fcdt": {
+ "source": "iana",
+ "extensions": ["fcdt"]
+ },
+ "application/vnd.adobe.fxp": {
+ "source": "iana",
+ "extensions": ["fxp","fxpl"]
+ },
+ "application/vnd.adobe.partial-upload": {
+ "source": "iana"
+ },
+ "application/vnd.adobe.xdp+xml": {
+ "source": "iana",
+ "extensions": ["xdp"]
+ },
+ "application/vnd.adobe.xfdf": {
+ "source": "iana",
+ "extensions": ["xfdf"]
+ },
+ "application/vnd.aether.imp": {
+ "source": "iana"
+ },
+ "application/vnd.ah-barcode": {
+ "source": "iana"
+ },
+ "application/vnd.ahead.space": {
+ "source": "iana",
+ "extensions": ["ahead"]
+ },
+ "application/vnd.airzip.filesecure.azf": {
+ "source": "iana",
+ "extensions": ["azf"]
+ },
+ "application/vnd.airzip.filesecure.azs": {
+ "source": "iana",
+ "extensions": ["azs"]
+ },
+ "application/vnd.amazon.ebook": {
+ "source": "apache",
+ "extensions": ["azw"]
+ },
+ "application/vnd.amazon.mobi8-ebook": {
+ "source": "iana"
+ },
+ "application/vnd.americandynamics.acc": {
+ "source": "iana",
+ "extensions": ["acc"]
+ },
+ "application/vnd.amiga.ami": {
+ "source": "iana",
+ "extensions": ["ami"]
+ },
+ "application/vnd.amundsen.maze+xml": {
+ "source": "iana"
+ },
+ "application/vnd.android.package-archive": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["apk"]
+ },
+ "application/vnd.anki": {
+ "source": "iana"
+ },
+ "application/vnd.anser-web-certificate-issue-initiation": {
+ "source": "iana",
+ "extensions": ["cii"]
+ },
+ "application/vnd.anser-web-funds-transfer-initiation": {
+ "source": "apache",
+ "extensions": ["fti"]
+ },
+ "application/vnd.antix.game-component": {
+ "source": "iana",
+ "extensions": ["atx"]
+ },
+ "application/vnd.apache.thrift.binary": {
+ "source": "iana"
+ },
+ "application/vnd.apache.thrift.compact": {
+ "source": "iana"
+ },
+ "application/vnd.apache.thrift.json": {
+ "source": "iana"
+ },
+ "application/vnd.api+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.apple.installer+xml": {
+ "source": "iana",
+ "extensions": ["mpkg"]
+ },
+ "application/vnd.apple.mpegurl": {
+ "source": "iana",
+ "extensions": ["m3u8"]
+ },
+ "application/vnd.apple.pkpass": {
+ "compressible": false,
+ "extensions": ["pkpass"]
+ },
+ "application/vnd.arastra.swi": {
+ "source": "iana"
+ },
+ "application/vnd.aristanetworks.swi": {
+ "source": "iana",
+ "extensions": ["swi"]
+ },
+ "application/vnd.artsquare": {
+ "source": "iana"
+ },
+ "application/vnd.astraea-software.iota": {
+ "source": "iana",
+ "extensions": ["iota"]
+ },
+ "application/vnd.audiograph": {
+ "source": "iana",
+ "extensions": ["aep"]
+ },
+ "application/vnd.autopackage": {
+ "source": "iana"
+ },
+ "application/vnd.avistar+xml": {
+ "source": "iana"
+ },
+ "application/vnd.balsamiq.bmml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.balsamiq.bmpr": {
+ "source": "iana"
+ },
+ "application/vnd.bekitzur-stech+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.biopax.rdf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.blueice.multipass": {
+ "source": "iana",
+ "extensions": ["mpm"]
+ },
+ "application/vnd.bluetooth.ep.oob": {
+ "source": "iana"
+ },
+ "application/vnd.bluetooth.le.oob": {
+ "source": "iana"
+ },
+ "application/vnd.bmi": {
+ "source": "iana",
+ "extensions": ["bmi"]
+ },
+ "application/vnd.businessobjects": {
+ "source": "iana",
+ "extensions": ["rep"]
+ },
+ "application/vnd.cab-jscript": {
+ "source": "iana"
+ },
+ "application/vnd.canon-cpdl": {
+ "source": "iana"
+ },
+ "application/vnd.canon-lips": {
+ "source": "iana"
+ },
+ "application/vnd.cendio.thinlinc.clientconf": {
+ "source": "iana"
+ },
+ "application/vnd.century-systems.tcp_stream": {
+ "source": "iana"
+ },
+ "application/vnd.chemdraw+xml": {
+ "source": "iana",
+ "extensions": ["cdxml"]
+ },
+ "application/vnd.chess-pgn": {
+ "source": "iana"
+ },
+ "application/vnd.chipnuts.karaoke-mmd": {
+ "source": "iana",
+ "extensions": ["mmd"]
+ },
+ "application/vnd.cinderella": {
+ "source": "iana",
+ "extensions": ["cdy"]
+ },
+ "application/vnd.cirpack.isdn-ext": {
+ "source": "iana"
+ },
+ "application/vnd.citationstyles.style+xml": {
+ "source": "iana"
+ },
+ "application/vnd.claymore": {
+ "source": "iana",
+ "extensions": ["cla"]
+ },
+ "application/vnd.cloanto.rp9": {
+ "source": "iana",
+ "extensions": ["rp9"]
+ },
+ "application/vnd.clonk.c4group": {
+ "source": "iana",
+ "extensions": ["c4g","c4d","c4f","c4p","c4u"]
+ },
+ "application/vnd.cluetrust.cartomobile-config": {
+ "source": "iana",
+ "extensions": ["c11amc"]
+ },
+ "application/vnd.cluetrust.cartomobile-config-pkg": {
+ "source": "iana",
+ "extensions": ["c11amz"]
+ },
+ "application/vnd.coffeescript": {
+ "source": "iana"
+ },
+ "application/vnd.collection+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.collection.doc+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.collection.next+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.comicbook+zip": {
+ "source": "iana"
+ },
+ "application/vnd.commerce-battelle": {
+ "source": "iana"
+ },
+ "application/vnd.commonspace": {
+ "source": "iana",
+ "extensions": ["csp"]
+ },
+ "application/vnd.contact.cmsg": {
+ "source": "iana",
+ "extensions": ["cdbcmsg"]
+ },
+ "application/vnd.coreos.ignition+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.cosmocaller": {
+ "source": "iana",
+ "extensions": ["cmc"]
+ },
+ "application/vnd.crick.clicker": {
+ "source": "iana",
+ "extensions": ["clkx"]
+ },
+ "application/vnd.crick.clicker.keyboard": {
+ "source": "iana",
+ "extensions": ["clkk"]
+ },
+ "application/vnd.crick.clicker.palette": {
+ "source": "iana",
+ "extensions": ["clkp"]
+ },
+ "application/vnd.crick.clicker.template": {
+ "source": "iana",
+ "extensions": ["clkt"]
+ },
+ "application/vnd.crick.clicker.wordbank": {
+ "source": "iana",
+ "extensions": ["clkw"]
+ },
+ "application/vnd.criticaltools.wbs+xml": {
+ "source": "iana",
+ "extensions": ["wbs"]
+ },
+ "application/vnd.ctc-posml": {
+ "source": "iana",
+ "extensions": ["pml"]
+ },
+ "application/vnd.ctct.ws+xml": {
+ "source": "iana"
+ },
+ "application/vnd.cups-pdf": {
+ "source": "iana"
+ },
+ "application/vnd.cups-postscript": {
+ "source": "iana"
+ },
+ "application/vnd.cups-ppd": {
+ "source": "iana",
+ "extensions": ["ppd"]
+ },
+ "application/vnd.cups-raster": {
+ "source": "iana"
+ },
+ "application/vnd.cups-raw": {
+ "source": "iana"
+ },
+ "application/vnd.curl": {
+ "source": "iana"
+ },
+ "application/vnd.curl.car": {
+ "source": "apache",
+ "extensions": ["car"]
+ },
+ "application/vnd.curl.pcurl": {
+ "source": "apache",
+ "extensions": ["pcurl"]
+ },
+ "application/vnd.cyan.dean.root+xml": {
+ "source": "iana"
+ },
+ "application/vnd.cybank": {
+ "source": "iana"
+ },
+ "application/vnd.d2l.coursepackage1p0+zip": {
+ "source": "iana"
+ },
+ "application/vnd.dart": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["dart"]
+ },
+ "application/vnd.data-vision.rdz": {
+ "source": "iana",
+ "extensions": ["rdz"]
+ },
+ "application/vnd.debian.binary-package": {
+ "source": "iana"
+ },
+ "application/vnd.dece.data": {
+ "source": "iana",
+ "extensions": ["uvf","uvvf","uvd","uvvd"]
+ },
+ "application/vnd.dece.ttml+xml": {
+ "source": "iana",
+ "extensions": ["uvt","uvvt"]
+ },
+ "application/vnd.dece.unspecified": {
+ "source": "iana",
+ "extensions": ["uvx","uvvx"]
+ },
+ "application/vnd.dece.zip": {
+ "source": "iana",
+ "extensions": ["uvz","uvvz"]
+ },
+ "application/vnd.denovo.fcselayout-link": {
+ "source": "iana",
+ "extensions": ["fe_launch"]
+ },
+ "application/vnd.desmume-movie": {
+ "source": "iana"
+ },
+ "application/vnd.desmume.movie": {
+ "source": "apache"
+ },
+ "application/vnd.dir-bi.plate-dl-nosuffix": {
+ "source": "iana"
+ },
+ "application/vnd.dm.delegation+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dna": {
+ "source": "iana",
+ "extensions": ["dna"]
+ },
+ "application/vnd.document+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.dolby.mlp": {
+ "source": "apache",
+ "extensions": ["mlp"]
+ },
+ "application/vnd.dolby.mobile.1": {
+ "source": "iana"
+ },
+ "application/vnd.dolby.mobile.2": {
+ "source": "iana"
+ },
+ "application/vnd.doremir.scorecloud-binary-document": {
+ "source": "iana"
+ },
+ "application/vnd.dpgraph": {
+ "source": "iana",
+ "extensions": ["dpg"]
+ },
+ "application/vnd.dreamfactory": {
+ "source": "iana",
+ "extensions": ["dfac"]
+ },
+ "application/vnd.drive+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ds-keypoint": {
+ "source": "apache",
+ "extensions": ["kpxx"]
+ },
+ "application/vnd.dtg.local": {
+ "source": "iana"
+ },
+ "application/vnd.dtg.local.flash": {
+ "source": "iana"
+ },
+ "application/vnd.dtg.local.html": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ait": {
+ "source": "iana",
+ "extensions": ["ait"]
+ },
+ "application/vnd.dvb.dvbj": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.esgcontainer": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcdftnotifaccess": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgaccess": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgaccess2": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgpdd": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcroaming": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.iptv.alfec-base": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.iptv.alfec-enhancement": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-aggregate-root+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-container+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-generic+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-ia-msglist+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-ia-registration-request+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-ia-registration-response+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-init+xml": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.pfr": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.service": {
+ "source": "iana",
+ "extensions": ["svc"]
+ },
+ "application/vnd.dxr": {
+ "source": "iana"
+ },
+ "application/vnd.dynageo": {
+ "source": "iana",
+ "extensions": ["geo"]
+ },
+ "application/vnd.dzr": {
+ "source": "iana"
+ },
+ "application/vnd.easykaraoke.cdgdownload": {
+ "source": "iana"
+ },
+ "application/vnd.ecdis-update": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.chart": {
+ "source": "iana",
+ "extensions": ["mag"]
+ },
+ "application/vnd.ecowin.filerequest": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.fileupdate": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.series": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.seriesrequest": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.seriesupdate": {
+ "source": "iana"
+ },
+ "application/vnd.emclient.accessrequest+xml": {
+ "source": "iana"
+ },
+ "application/vnd.enliven": {
+ "source": "iana",
+ "extensions": ["nml"]
+ },
+ "application/vnd.enphase.envoy": {
+ "source": "iana"
+ },
+ "application/vnd.eprints.data+xml": {
+ "source": "iana"
+ },
+ "application/vnd.epson.esf": {
+ "source": "iana",
+ "extensions": ["esf"]
+ },
+ "application/vnd.epson.msf": {
+ "source": "iana",
+ "extensions": ["msf"]
+ },
+ "application/vnd.epson.quickanime": {
+ "source": "iana",
+ "extensions": ["qam"]
+ },
+ "application/vnd.epson.salt": {
+ "source": "iana",
+ "extensions": ["slt"]
+ },
+ "application/vnd.epson.ssf": {
+ "source": "iana",
+ "extensions": ["ssf"]
+ },
+ "application/vnd.ericsson.quickcall": {
+ "source": "iana"
+ },
+ "application/vnd.espass-espass+zip": {
+ "source": "iana"
+ },
+ "application/vnd.eszigno3+xml": {
+ "source": "iana",
+ "extensions": ["es3","et3"]
+ },
+ "application/vnd.etsi.aoc+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.asic-e+zip": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.asic-s+zip": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.cug+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvcommand+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvdiscovery+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsad-bc+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsad-cod+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsad-npvr+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvservice+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvsync+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.iptvueprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.mcid+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.mheg5": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.overload-control-policy-dataset+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.pstn+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.sci+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.simservs+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.timestamp-token": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.tsl+xml": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.tsl.der": {
+ "source": "iana"
+ },
+ "application/vnd.eudora.data": {
+ "source": "iana"
+ },
+ "application/vnd.ezpix-album": {
+ "source": "iana",
+ "extensions": ["ez2"]
+ },
+ "application/vnd.ezpix-package": {
+ "source": "iana",
+ "extensions": ["ez3"]
+ },
+ "application/vnd.f-secure.mobile": {
+ "source": "iana"
+ },
+ "application/vnd.fastcopy-disk-image": {
+ "source": "iana"
+ },
+ "application/vnd.fdf": {
+ "source": "iana",
+ "extensions": ["fdf"]
+ },
+ "application/vnd.fdsn.mseed": {
+ "source": "iana",
+ "extensions": ["mseed"]
+ },
+ "application/vnd.fdsn.seed": {
+ "source": "iana",
+ "extensions": ["seed","dataless"]
+ },
+ "application/vnd.ffsns": {
+ "source": "iana"
+ },
+ "application/vnd.filmit.zfc": {
+ "source": "iana"
+ },
+ "application/vnd.fints": {
+ "source": "iana"
+ },
+ "application/vnd.firemonkeys.cloudcell": {
+ "source": "iana"
+ },
+ "application/vnd.flographit": {
+ "source": "iana",
+ "extensions": ["gph"]
+ },
+ "application/vnd.fluxtime.clip": {
+ "source": "iana",
+ "extensions": ["ftc"]
+ },
+ "application/vnd.font-fontforge-sfd": {
+ "source": "iana"
+ },
+ "application/vnd.framemaker": {
+ "source": "iana",
+ "extensions": ["fm","frame","maker","book"]
+ },
+ "application/vnd.frogans.fnc": {
+ "source": "iana",
+ "extensions": ["fnc"]
+ },
+ "application/vnd.frogans.ltf": {
+ "source": "iana",
+ "extensions": ["ltf"]
+ },
+ "application/vnd.fsc.weblaunch": {
+ "source": "iana",
+ "extensions": ["fsc"]
+ },
+ "application/vnd.fujitsu.oasys": {
+ "source": "iana",
+ "extensions": ["oas"]
+ },
+ "application/vnd.fujitsu.oasys2": {
+ "source": "iana",
+ "extensions": ["oa2"]
+ },
+ "application/vnd.fujitsu.oasys3": {
+ "source": "iana",
+ "extensions": ["oa3"]
+ },
+ "application/vnd.fujitsu.oasysgp": {
+ "source": "iana",
+ "extensions": ["fg5"]
+ },
+ "application/vnd.fujitsu.oasysprs": {
+ "source": "iana",
+ "extensions": ["bh2"]
+ },
+ "application/vnd.fujixerox.art-ex": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.art4": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.ddd": {
+ "source": "iana",
+ "extensions": ["ddd"]
+ },
+ "application/vnd.fujixerox.docuworks": {
+ "source": "iana",
+ "extensions": ["xdw"]
+ },
+ "application/vnd.fujixerox.docuworks.binder": {
+ "source": "iana",
+ "extensions": ["xbd"]
+ },
+ "application/vnd.fujixerox.docuworks.container": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.hbpl": {
+ "source": "iana"
+ },
+ "application/vnd.fut-misnet": {
+ "source": "iana"
+ },
+ "application/vnd.fuzzysheet": {
+ "source": "iana",
+ "extensions": ["fzs"]
+ },
+ "application/vnd.genomatix.tuxedo": {
+ "source": "iana",
+ "extensions": ["txd"]
+ },
+ "application/vnd.geo+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.geocube+xml": {
+ "source": "iana"
+ },
+ "application/vnd.geogebra.file": {
+ "source": "iana",
+ "extensions": ["ggb"]
+ },
+ "application/vnd.geogebra.tool": {
+ "source": "iana",
+ "extensions": ["ggt"]
+ },
+ "application/vnd.geometry-explorer": {
+ "source": "iana",
+ "extensions": ["gex","gre"]
+ },
+ "application/vnd.geonext": {
+ "source": "iana",
+ "extensions": ["gxt"]
+ },
+ "application/vnd.geoplan": {
+ "source": "iana",
+ "extensions": ["g2w"]
+ },
+ "application/vnd.geospace": {
+ "source": "iana",
+ "extensions": ["g3w"]
+ },
+ "application/vnd.gerber": {
+ "source": "iana"
+ },
+ "application/vnd.globalplatform.card-content-mgt": {
+ "source": "iana"
+ },
+ "application/vnd.globalplatform.card-content-mgt-response": {
+ "source": "iana"
+ },
+ "application/vnd.gmx": {
+ "source": "iana",
+ "extensions": ["gmx"]
+ },
+ "application/vnd.google-apps.document": {
+ "compressible": false,
+ "extensions": ["gdoc"]
+ },
+ "application/vnd.google-apps.presentation": {
+ "compressible": false,
+ "extensions": ["gslides"]
+ },
+ "application/vnd.google-apps.spreadsheet": {
+ "compressible": false,
+ "extensions": ["gsheet"]
+ },
+ "application/vnd.google-earth.kml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["kml"]
+ },
+ "application/vnd.google-earth.kmz": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["kmz"]
+ },
+ "application/vnd.gov.sk.e-form+xml": {
+ "source": "iana"
+ },
+ "application/vnd.gov.sk.e-form+zip": {
+ "source": "iana"
+ },
+ "application/vnd.gov.sk.xmldatacontainer+xml": {
+ "source": "iana"
+ },
+ "application/vnd.grafeq": {
+ "source": "iana",
+ "extensions": ["gqf","gqs"]
+ },
+ "application/vnd.gridmp": {
+ "source": "iana"
+ },
+ "application/vnd.groove-account": {
+ "source": "iana",
+ "extensions": ["gac"]
+ },
+ "application/vnd.groove-help": {
+ "source": "iana",
+ "extensions": ["ghf"]
+ },
+ "application/vnd.groove-identity-message": {
+ "source": "iana",
+ "extensions": ["gim"]
+ },
+ "application/vnd.groove-injector": {
+ "source": "iana",
+ "extensions": ["grv"]
+ },
+ "application/vnd.groove-tool-message": {
+ "source": "iana",
+ "extensions": ["gtm"]
+ },
+ "application/vnd.groove-tool-template": {
+ "source": "iana",
+ "extensions": ["tpl"]
+ },
+ "application/vnd.groove-vcard": {
+ "source": "iana",
+ "extensions": ["vcg"]
+ },
+ "application/vnd.hal+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hal+xml": {
+ "source": "iana",
+ "extensions": ["hal"]
+ },
+ "application/vnd.handheld-entertainment+xml": {
+ "source": "iana",
+ "extensions": ["zmm"]
+ },
+ "application/vnd.hbci": {
+ "source": "iana",
+ "extensions": ["hbci"]
+ },
+ "application/vnd.hcl-bireports": {
+ "source": "iana"
+ },
+ "application/vnd.hdt": {
+ "source": "iana"
+ },
+ "application/vnd.heroku+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hhe.lesson-player": {
+ "source": "iana",
+ "extensions": ["les"]
+ },
+ "application/vnd.hp-hpgl": {
+ "source": "iana",
+ "extensions": ["hpgl"]
+ },
+ "application/vnd.hp-hpid": {
+ "source": "iana",
+ "extensions": ["hpid"]
+ },
+ "application/vnd.hp-hps": {
+ "source": "iana",
+ "extensions": ["hps"]
+ },
+ "application/vnd.hp-jlyt": {
+ "source": "iana",
+ "extensions": ["jlt"]
+ },
+ "application/vnd.hp-pcl": {
+ "source": "iana",
+ "extensions": ["pcl"]
+ },
+ "application/vnd.hp-pclxl": {
+ "source": "iana",
+ "extensions": ["pclxl"]
+ },
+ "application/vnd.httphone": {
+ "source": "iana"
+ },
+ "application/vnd.hydrostatix.sof-data": {
+ "source": "iana",
+ "extensions": ["sfd-hdstx"]
+ },
+ "application/vnd.hyperdrive+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hzn-3d-crossword": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.afplinedata": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.electronic-media": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.minipay": {
+ "source": "iana",
+ "extensions": ["mpy"]
+ },
+ "application/vnd.ibm.modcap": {
+ "source": "iana",
+ "extensions": ["afp","listafp","list3820"]
+ },
+ "application/vnd.ibm.rights-management": {
+ "source": "iana",
+ "extensions": ["irm"]
+ },
+ "application/vnd.ibm.secure-container": {
+ "source": "iana",
+ "extensions": ["sc"]
+ },
+ "application/vnd.iccprofile": {
+ "source": "iana",
+ "extensions": ["icc","icm"]
+ },
+ "application/vnd.ieee.1905": {
+ "source": "iana"
+ },
+ "application/vnd.igloader": {
+ "source": "iana",
+ "extensions": ["igl"]
+ },
+ "application/vnd.immervision-ivp": {
+ "source": "iana",
+ "extensions": ["ivp"]
+ },
+ "application/vnd.immervision-ivu": {
+ "source": "iana",
+ "extensions": ["ivu"]
+ },
+ "application/vnd.ims.imsccv1p1": {
+ "source": "iana"
+ },
+ "application/vnd.ims.imsccv1p2": {
+ "source": "iana"
+ },
+ "application/vnd.ims.imsccv1p3": {
+ "source": "iana"
+ },
+ "application/vnd.ims.lis.v2.result+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolconsumerprofile+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolproxy+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolproxy.id+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolsettings+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolsettings.simple+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.informedcontrol.rms+xml": {
+ "source": "iana"
+ },
+ "application/vnd.informix-visionary": {
+ "source": "iana"
+ },
+ "application/vnd.infotech.project": {
+ "source": "iana"
+ },
+ "application/vnd.infotech.project+xml": {
+ "source": "iana"
+ },
+ "application/vnd.innopath.wamp.notification": {
+ "source": "iana"
+ },
+ "application/vnd.insors.igm": {
+ "source": "iana",
+ "extensions": ["igm"]
+ },
+ "application/vnd.intercon.formnet": {
+ "source": "iana",
+ "extensions": ["xpw","xpx"]
+ },
+ "application/vnd.intergeo": {
+ "source": "iana",
+ "extensions": ["i2g"]
+ },
+ "application/vnd.intertrust.digibox": {
+ "source": "iana"
+ },
+ "application/vnd.intertrust.nncp": {
+ "source": "iana"
+ },
+ "application/vnd.intu.qbo": {
+ "source": "iana",
+ "extensions": ["qbo"]
+ },
+ "application/vnd.intu.qfx": {
+ "source": "iana",
+ "extensions": ["qfx"]
+ },
+ "application/vnd.iptc.g2.catalogitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.conceptitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.knowledgeitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.newsitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.newsmessage+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.packageitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.iptc.g2.planningitem+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ipunplugged.rcprofile": {
+ "source": "iana",
+ "extensions": ["rcprofile"]
+ },
+ "application/vnd.irepository.package+xml": {
+ "source": "iana",
+ "extensions": ["irp"]
+ },
+ "application/vnd.is-xpr": {
+ "source": "iana",
+ "extensions": ["xpr"]
+ },
+ "application/vnd.isac.fcs": {
+ "source": "iana",
+ "extensions": ["fcs"]
+ },
+ "application/vnd.jam": {
+ "source": "iana",
+ "extensions": ["jam"]
+ },
+ "application/vnd.japannet-directory-service": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-jpnstore-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-payment-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-registration": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-registration-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-setstore-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-verification": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-verification-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.jcp.javame.midlet-rms": {
+ "source": "iana",
+ "extensions": ["rms"]
+ },
+ "application/vnd.jisp": {
+ "source": "iana",
+ "extensions": ["jisp"]
+ },
+ "application/vnd.joost.joda-archive": {
+ "source": "iana",
+ "extensions": ["joda"]
+ },
+ "application/vnd.jsk.isdn-ngn": {
+ "source": "iana"
+ },
+ "application/vnd.kahootz": {
+ "source": "iana",
+ "extensions": ["ktz","ktr"]
+ },
+ "application/vnd.kde.karbon": {
+ "source": "iana",
+ "extensions": ["karbon"]
+ },
+ "application/vnd.kde.kchart": {
+ "source": "iana",
+ "extensions": ["chrt"]
+ },
+ "application/vnd.kde.kformula": {
+ "source": "iana",
+ "extensions": ["kfo"]
+ },
+ "application/vnd.kde.kivio": {
+ "source": "iana",
+ "extensions": ["flw"]
+ },
+ "application/vnd.kde.kontour": {
+ "source": "iana",
+ "extensions": ["kon"]
+ },
+ "application/vnd.kde.kpresenter": {
+ "source": "iana",
+ "extensions": ["kpr","kpt"]
+ },
+ "application/vnd.kde.kspread": {
+ "source": "iana",
+ "extensions": ["ksp"]
+ },
+ "application/vnd.kde.kword": {
+ "source": "iana",
+ "extensions": ["kwd","kwt"]
+ },
+ "application/vnd.kenameaapp": {
+ "source": "iana",
+ "extensions": ["htke"]
+ },
+ "application/vnd.kidspiration": {
+ "source": "iana",
+ "extensions": ["kia"]
+ },
+ "application/vnd.kinar": {
+ "source": "iana",
+ "extensions": ["kne","knp"]
+ },
+ "application/vnd.koan": {
+ "source": "iana",
+ "extensions": ["skp","skd","skt","skm"]
+ },
+ "application/vnd.kodak-descriptor": {
+ "source": "iana",
+ "extensions": ["sse"]
+ },
+ "application/vnd.las.las+xml": {
+ "source": "iana",
+ "extensions": ["lasxml"]
+ },
+ "application/vnd.liberty-request+xml": {
+ "source": "iana"
+ },
+ "application/vnd.llamagraphics.life-balance.desktop": {
+ "source": "iana",
+ "extensions": ["lbd"]
+ },
+ "application/vnd.llamagraphics.life-balance.exchange+xml": {
+ "source": "iana",
+ "extensions": ["lbe"]
+ },
+ "application/vnd.lotus-1-2-3": {
+ "source": "iana",
+ "extensions": ["123"]
+ },
+ "application/vnd.lotus-approach": {
+ "source": "iana",
+ "extensions": ["apr"]
+ },
+ "application/vnd.lotus-freelance": {
+ "source": "iana",
+ "extensions": ["pre"]
+ },
+ "application/vnd.lotus-notes": {
+ "source": "iana",
+ "extensions": ["nsf"]
+ },
+ "application/vnd.lotus-organizer": {
+ "source": "iana",
+ "extensions": ["org"]
+ },
+ "application/vnd.lotus-screencam": {
+ "source": "iana",
+ "extensions": ["scm"]
+ },
+ "application/vnd.lotus-wordpro": {
+ "source": "iana",
+ "extensions": ["lwp"]
+ },
+ "application/vnd.macports.portpkg": {
+ "source": "iana",
+ "extensions": ["portpkg"]
+ },
+ "application/vnd.mapbox-vector-tile": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.actiontoken+xml": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.conftoken+xml": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.license+xml": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.mdcf": {
+ "source": "iana"
+ },
+ "application/vnd.mason+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.maxmind.maxmind-db": {
+ "source": "iana"
+ },
+ "application/vnd.mcd": {
+ "source": "iana",
+ "extensions": ["mcd"]
+ },
+ "application/vnd.medcalcdata": {
+ "source": "iana",
+ "extensions": ["mc1"]
+ },
+ "application/vnd.mediastation.cdkey": {
+ "source": "iana",
+ "extensions": ["cdkey"]
+ },
+ "application/vnd.meridian-slingshot": {
+ "source": "iana"
+ },
+ "application/vnd.mfer": {
+ "source": "iana",
+ "extensions": ["mwf"]
+ },
+ "application/vnd.mfmp": {
+ "source": "iana",
+ "extensions": ["mfm"]
+ },
+ "application/vnd.micro+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.micrografx.flo": {
+ "source": "iana",
+ "extensions": ["flo"]
+ },
+ "application/vnd.micrografx.igx": {
+ "source": "iana",
+ "extensions": ["igx"]
+ },
+ "application/vnd.microsoft.portable-executable": {
+ "source": "iana"
+ },
+ "application/vnd.miele+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.mif": {
+ "source": "iana",
+ "extensions": ["mif"]
+ },
+ "application/vnd.minisoft-hp3000-save": {
+ "source": "iana"
+ },
+ "application/vnd.mitsubishi.misty-guard.trustweb": {
+ "source": "iana"
+ },
+ "application/vnd.mobius.daf": {
+ "source": "iana",
+ "extensions": ["daf"]
+ },
+ "application/vnd.mobius.dis": {
+ "source": "iana",
+ "extensions": ["dis"]
+ },
+ "application/vnd.mobius.mbk": {
+ "source": "iana",
+ "extensions": ["mbk"]
+ },
+ "application/vnd.mobius.mqy": {
+ "source": "iana",
+ "extensions": ["mqy"]
+ },
+ "application/vnd.mobius.msl": {
+ "source": "iana",
+ "extensions": ["msl"]
+ },
+ "application/vnd.mobius.plc": {
+ "source": "iana",
+ "extensions": ["plc"]
+ },
+ "application/vnd.mobius.txf": {
+ "source": "iana",
+ "extensions": ["txf"]
+ },
+ "application/vnd.mophun.application": {
+ "source": "iana",
+ "extensions": ["mpn"]
+ },
+ "application/vnd.mophun.certificate": {
+ "source": "iana",
+ "extensions": ["mpc"]
+ },
+ "application/vnd.motorola.flexsuite": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.adsi": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.fis": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.gotap": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.kmr": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.ttc": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.wem": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.iprm": {
+ "source": "iana"
+ },
+ "application/vnd.mozilla.xul+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xul"]
+ },
+ "application/vnd.ms-3mfdocument": {
+ "source": "iana"
+ },
+ "application/vnd.ms-artgalry": {
+ "source": "iana",
+ "extensions": ["cil"]
+ },
+ "application/vnd.ms-asf": {
+ "source": "iana"
+ },
+ "application/vnd.ms-cab-compressed": {
+ "source": "iana",
+ "extensions": ["cab"]
+ },
+ "application/vnd.ms-color.iccprofile": {
+ "source": "apache"
+ },
+ "application/vnd.ms-excel": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xls","xlm","xla","xlc","xlt","xlw"]
+ },
+ "application/vnd.ms-excel.addin.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlam"]
+ },
+ "application/vnd.ms-excel.sheet.binary.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlsb"]
+ },
+ "application/vnd.ms-excel.sheet.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlsm"]
+ },
+ "application/vnd.ms-excel.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xltm"]
+ },
+ "application/vnd.ms-fontobject": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["eot"]
+ },
+ "application/vnd.ms-htmlhelp": {
+ "source": "iana",
+ "extensions": ["chm"]
+ },
+ "application/vnd.ms-ims": {
+ "source": "iana",
+ "extensions": ["ims"]
+ },
+ "application/vnd.ms-lrm": {
+ "source": "iana",
+ "extensions": ["lrm"]
+ },
+ "application/vnd.ms-office.activex+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ms-officetheme": {
+ "source": "iana",
+ "extensions": ["thmx"]
+ },
+ "application/vnd.ms-opentype": {
+ "source": "apache",
+ "compressible": true
+ },
+ "application/vnd.ms-package.obfuscated-opentype": {
+ "source": "apache"
+ },
+ "application/vnd.ms-pki.seccat": {
+ "source": "apache",
+ "extensions": ["cat"]
+ },
+ "application/vnd.ms-pki.stl": {
+ "source": "apache",
+ "extensions": ["stl"]
+ },
+ "application/vnd.ms-playready.initiator+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ms-powerpoint": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ppt","pps","pot"]
+ },
+ "application/vnd.ms-powerpoint.addin.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["ppam"]
+ },
+ "application/vnd.ms-powerpoint.presentation.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["pptm"]
+ },
+ "application/vnd.ms-powerpoint.slide.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["sldm"]
+ },
+ "application/vnd.ms-powerpoint.slideshow.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["ppsm"]
+ },
+ "application/vnd.ms-powerpoint.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["potm"]
+ },
+ "application/vnd.ms-printdevicecapabilities+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ms-printing.printticket+xml": {
+ "source": "apache"
+ },
+ "application/vnd.ms-printschematicket+xml": {
+ "source": "iana"
+ },
+ "application/vnd.ms-project": {
+ "source": "iana",
+ "extensions": ["mpp","mpt"]
+ },
+ "application/vnd.ms-tnef": {
+ "source": "iana"
+ },
+ "application/vnd.ms-windows.devicepairing": {
+ "source": "iana"
+ },
+ "application/vnd.ms-windows.nwprinting.oob": {
+ "source": "iana"
+ },
+ "application/vnd.ms-windows.printerpairing": {
+ "source": "iana"
+ },
+ "application/vnd.ms-windows.wsd.oob": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.lic-chlg-req": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.lic-resp": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.meter-chlg-req": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.meter-resp": {
+ "source": "iana"
+ },
+ "application/vnd.ms-word.document.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["docm"]
+ },
+ "application/vnd.ms-word.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["dotm"]
+ },
+ "application/vnd.ms-works": {
+ "source": "iana",
+ "extensions": ["wps","wks","wcm","wdb"]
+ },
+ "application/vnd.ms-wpl": {
+ "source": "iana",
+ "extensions": ["wpl"]
+ },
+ "application/vnd.ms-xpsdocument": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xps"]
+ },
+ "application/vnd.msa-disk-image": {
+ "source": "iana"
+ },
+ "application/vnd.mseq": {
+ "source": "iana",
+ "extensions": ["mseq"]
+ },
+ "application/vnd.msign": {
+ "source": "iana"
+ },
+ "application/vnd.multiad.creator": {
+ "source": "iana"
+ },
+ "application/vnd.multiad.creator.cif": {
+ "source": "iana"
+ },
+ "application/vnd.music-niff": {
+ "source": "iana"
+ },
+ "application/vnd.musician": {
+ "source": "iana",
+ "extensions": ["mus"]
+ },
+ "application/vnd.muvee.style": {
+ "source": "iana",
+ "extensions": ["msty"]
+ },
+ "application/vnd.mynfc": {
+ "source": "iana",
+ "extensions": ["taglet"]
+ },
+ "application/vnd.ncd.control": {
+ "source": "iana"
+ },
+ "application/vnd.ncd.reference": {
+ "source": "iana"
+ },
+ "application/vnd.nearst.inv+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.nervana": {
+ "source": "iana"
+ },
+ "application/vnd.netfpx": {
+ "source": "iana"
+ },
+ "application/vnd.neurolanguage.nlu": {
+ "source": "iana",
+ "extensions": ["nlu"]
+ },
+ "application/vnd.nintendo.nitro.rom": {
+ "source": "iana"
+ },
+ "application/vnd.nintendo.snes.rom": {
+ "source": "iana"
+ },
+ "application/vnd.nitf": {
+ "source": "iana",
+ "extensions": ["ntf","nitf"]
+ },
+ "application/vnd.noblenet-directory": {
+ "source": "iana",
+ "extensions": ["nnd"]
+ },
+ "application/vnd.noblenet-sealer": {
+ "source": "iana",
+ "extensions": ["nns"]
+ },
+ "application/vnd.noblenet-web": {
+ "source": "iana",
+ "extensions": ["nnw"]
+ },
+ "application/vnd.nokia.catalogs": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.conml+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.conml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.iptv.config+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.isds-radio-presets": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmark+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmark+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmarkcollection+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.n-gage.ac+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.n-gage.data": {
+ "source": "iana",
+ "extensions": ["ngdat"]
+ },
+ "application/vnd.nokia.n-gage.symbian.install": {
+ "source": "iana",
+ "extensions": ["n-gage"]
+ },
+ "application/vnd.nokia.ncd": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.pcd+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.pcd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.radio-preset": {
+ "source": "iana",
+ "extensions": ["rpst"]
+ },
+ "application/vnd.nokia.radio-presets": {
+ "source": "iana",
+ "extensions": ["rpss"]
+ },
+ "application/vnd.novadigm.edm": {
+ "source": "iana",
+ "extensions": ["edm"]
+ },
+ "application/vnd.novadigm.edx": {
+ "source": "iana",
+ "extensions": ["edx"]
+ },
+ "application/vnd.novadigm.ext": {
+ "source": "iana",
+ "extensions": ["ext"]
+ },
+ "application/vnd.ntt-local.content-share": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.file-transfer": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.ogw_remote-access": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.sip-ta_remote": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.sip-ta_tcp_stream": {
+ "source": "iana"
+ },
+ "application/vnd.oasis.opendocument.chart": {
+ "source": "iana",
+ "extensions": ["odc"]
+ },
+ "application/vnd.oasis.opendocument.chart-template": {
+ "source": "iana",
+ "extensions": ["otc"]
+ },
+ "application/vnd.oasis.opendocument.database": {
+ "source": "iana",
+ "extensions": ["odb"]
+ },
+ "application/vnd.oasis.opendocument.formula": {
+ "source": "iana",
+ "extensions": ["odf"]
+ },
+ "application/vnd.oasis.opendocument.formula-template": {
+ "source": "iana",
+ "extensions": ["odft"]
+ },
+ "application/vnd.oasis.opendocument.graphics": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odg"]
+ },
+ "application/vnd.oasis.opendocument.graphics-template": {
+ "source": "iana",
+ "extensions": ["otg"]
+ },
+ "application/vnd.oasis.opendocument.image": {
+ "source": "iana",
+ "extensions": ["odi"]
+ },
+ "application/vnd.oasis.opendocument.image-template": {
+ "source": "iana",
+ "extensions": ["oti"]
+ },
+ "application/vnd.oasis.opendocument.presentation": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odp"]
+ },
+ "application/vnd.oasis.opendocument.presentation-template": {
+ "source": "iana",
+ "extensions": ["otp"]
+ },
+ "application/vnd.oasis.opendocument.spreadsheet": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ods"]
+ },
+ "application/vnd.oasis.opendocument.spreadsheet-template": {
+ "source": "iana",
+ "extensions": ["ots"]
+ },
+ "application/vnd.oasis.opendocument.text": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odt"]
+ },
+ "application/vnd.oasis.opendocument.text-master": {
+ "source": "iana",
+ "extensions": ["odm"]
+ },
+ "application/vnd.oasis.opendocument.text-template": {
+ "source": "iana",
+ "extensions": ["ott"]
+ },
+ "application/vnd.oasis.opendocument.text-web": {
+ "source": "iana",
+ "extensions": ["oth"]
+ },
+ "application/vnd.obn": {
+ "source": "iana"
+ },
+ "application/vnd.oftn.l10n+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oipf.contentaccessdownload+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.contentaccessstreaming+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.cspg-hexbinary": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.dae.svg+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.dae.xhtml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.mippvcontrolmessage+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.pae.gem": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.spdiscovery+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.spdlist+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.ueprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.userprofile+xml": {
+ "source": "iana"
+ },
+ "application/vnd.olpc-sugar": {
+ "source": "iana",
+ "extensions": ["xo"]
+ },
+ "application/vnd.oma-scws-config": {
+ "source": "iana"
+ },
+ "application/vnd.oma-scws-http-request": {
+ "source": "iana"
+ },
+ "application/vnd.oma-scws-http-response": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.associated-procedure-parameter+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.drm-trigger+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.imd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.ltkm": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.notification+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.provisioningtrigger": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgboot": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgdd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgdu": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.simple-symbol-container": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.smartcard-trigger+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sprov+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.stkm": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-address-book+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-feature-handler+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-pcc+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-subs-invite+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-user-prefs+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dcd": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dcdc": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dd2+xml": {
+ "source": "iana",
+ "extensions": ["dd2"]
+ },
+ "application/vnd.oma.drm.risd+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.group-usage-list+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.lwm2m+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.lwm2m+tlv": {
+ "source": "iana"
+ },
+ "application/vnd.oma.pal+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.detailed-progress-report+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.final-report+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.groups+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.invocation-descriptor+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.poc.optimized-progress-report+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.push": {
+ "source": "iana"
+ },
+ "application/vnd.oma.scidm.messages+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oma.xcap-directory+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omads-email+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omads-file+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omads-folder+xml": {
+ "source": "iana"
+ },
+ "application/vnd.omaloc-supl-init": {
+ "source": "iana"
+ },
+ "application/vnd.onepager": {
+ "source": "iana"
+ },
+ "application/vnd.openblox.game+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openblox.game-binary": {
+ "source": "iana"
+ },
+ "application/vnd.openeye.oeb": {
+ "source": "iana"
+ },
+ "application/vnd.openofficeorg.extension": {
+ "source": "apache",
+ "extensions": ["oxt"]
+ },
+ "application/vnd.openstreetmap.data+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.custom-properties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawing+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.extended-properties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml-template": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pptx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slide": {
+ "source": "iana",
+ "extensions": ["sldx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow": {
+ "source": "iana",
+ "extensions": ["ppsx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.template": {
+ "source": "apache",
+ "extensions": ["potx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml-template": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xlsx"]
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.template": {
+ "source": "apache",
+ "extensions": ["xltx"]
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.theme+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.themeoverride+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.vmldrawing": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml-template": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["docx"]
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template": {
+ "source": "apache",
+ "extensions": ["dotx"]
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-package.core-properties+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-package.relationships+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oracle.resource+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.orange.indata": {
+ "source": "iana"
+ },
+ "application/vnd.osa.netdeploy": {
+ "source": "iana"
+ },
+ "application/vnd.osgeo.mapguide.package": {
+ "source": "iana",
+ "extensions": ["mgp"]
+ },
+ "application/vnd.osgi.bundle": {
+ "source": "iana"
+ },
+ "application/vnd.osgi.dp": {
+ "source": "iana",
+ "extensions": ["dp"]
+ },
+ "application/vnd.osgi.subsystem": {
+ "source": "iana",
+ "extensions": ["esa"]
+ },
+ "application/vnd.otps.ct-kip+xml": {
+ "source": "iana"
+ },
+ "application/vnd.oxli.countgraph": {
+ "source": "iana"
+ },
+ "application/vnd.pagerduty+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.palm": {
+ "source": "iana",
+ "extensions": ["pdb","pqa","oprc"]
+ },
+ "application/vnd.panoply": {
+ "source": "iana"
+ },
+ "application/vnd.paos+xml": {
+ "source": "iana"
+ },
+ "application/vnd.paos.xml": {
+ "source": "apache"
+ },
+ "application/vnd.pawaafile": {
+ "source": "iana",
+ "extensions": ["paw"]
+ },
+ "application/vnd.pcos": {
+ "source": "iana"
+ },
+ "application/vnd.pg.format": {
+ "source": "iana",
+ "extensions": ["str"]
+ },
+ "application/vnd.pg.osasli": {
+ "source": "iana",
+ "extensions": ["ei6"]
+ },
+ "application/vnd.piaccess.application-licence": {
+ "source": "iana"
+ },
+ "application/vnd.picsel": {
+ "source": "iana",
+ "extensions": ["efif"]
+ },
+ "application/vnd.pmi.widget": {
+ "source": "iana",
+ "extensions": ["wg"]
+ },
+ "application/vnd.poc.group-advertisement+xml": {
+ "source": "iana"
+ },
+ "application/vnd.pocketlearn": {
+ "source": "iana",
+ "extensions": ["plf"]
+ },
+ "application/vnd.powerbuilder6": {
+ "source": "iana",
+ "extensions": ["pbd"]
+ },
+ "application/vnd.powerbuilder6-s": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder7": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder7-s": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder75": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder75-s": {
+ "source": "iana"
+ },
+ "application/vnd.preminet": {
+ "source": "iana"
+ },
+ "application/vnd.previewsystems.box": {
+ "source": "iana",
+ "extensions": ["box"]
+ },
+ "application/vnd.proteus.magazine": {
+ "source": "iana",
+ "extensions": ["mgz"]
+ },
+ "application/vnd.publishare-delta-tree": {
+ "source": "iana",
+ "extensions": ["qps"]
+ },
+ "application/vnd.pvi.ptid1": {
+ "source": "iana",
+ "extensions": ["ptid"]
+ },
+ "application/vnd.pwg-multiplexed": {
+ "source": "iana"
+ },
+ "application/vnd.pwg-xhtml-print+xml": {
+ "source": "iana"
+ },
+ "application/vnd.qualcomm.brew-app-res": {
+ "source": "iana"
+ },
+ "application/vnd.quarantainenet": {
+ "source": "iana"
+ },
+ "application/vnd.quark.quarkxpress": {
+ "source": "iana",
+ "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"]
+ },
+ "application/vnd.quobject-quoxdocument": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.moml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-conf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-conn+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-dialog+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-audit-stream+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-conf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-base+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-fax-detect+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-group+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-speech+xml": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.msml-dialog-transform+xml": {
+ "source": "iana"
+ },
+ "application/vnd.rainstor.data": {
+ "source": "iana"
+ },
+ "application/vnd.rapid": {
+ "source": "iana"
+ },
+ "application/vnd.rar": {
+ "source": "iana"
+ },
+ "application/vnd.realvnc.bed": {
+ "source": "iana",
+ "extensions": ["bed"]
+ },
+ "application/vnd.recordare.musicxml": {
+ "source": "iana",
+ "extensions": ["mxl"]
+ },
+ "application/vnd.recordare.musicxml+xml": {
+ "source": "iana",
+ "extensions": ["musicxml"]
+ },
+ "application/vnd.renlearn.rlprint": {
+ "source": "iana"
+ },
+ "application/vnd.rig.cryptonote": {
+ "source": "iana",
+ "extensions": ["cryptonote"]
+ },
+ "application/vnd.rim.cod": {
+ "source": "apache",
+ "extensions": ["cod"]
+ },
+ "application/vnd.rn-realmedia": {
+ "source": "apache",
+ "extensions": ["rm"]
+ },
+ "application/vnd.rn-realmedia-vbr": {
+ "source": "apache",
+ "extensions": ["rmvb"]
+ },
+ "application/vnd.route66.link66+xml": {
+ "source": "iana",
+ "extensions": ["link66"]
+ },
+ "application/vnd.rs-274x": {
+ "source": "iana"
+ },
+ "application/vnd.ruckus.download": {
+ "source": "iana"
+ },
+ "application/vnd.s3sms": {
+ "source": "iana"
+ },
+ "application/vnd.sailingtracker.track": {
+ "source": "iana",
+ "extensions": ["st"]
+ },
+ "application/vnd.sbm.cid": {
+ "source": "iana"
+ },
+ "application/vnd.sbm.mid2": {
+ "source": "iana"
+ },
+ "application/vnd.scribus": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.3df": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.csf": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.doc": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.eml": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.mht": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.net": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.ppt": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.tiff": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.xls": {
+ "source": "iana"
+ },
+ "application/vnd.sealedmedia.softseal.html": {
+ "source": "iana"
+ },
+ "application/vnd.sealedmedia.softseal.pdf": {
+ "source": "iana"
+ },
+ "application/vnd.seemail": {
+ "source": "iana",
+ "extensions": ["see"]
+ },
+ "application/vnd.sema": {
+ "source": "iana",
+ "extensions": ["sema"]
+ },
+ "application/vnd.semd": {
+ "source": "iana",
+ "extensions": ["semd"]
+ },
+ "application/vnd.semf": {
+ "source": "iana",
+ "extensions": ["semf"]
+ },
+ "application/vnd.shana.informed.formdata": {
+ "source": "iana",
+ "extensions": ["ifm"]
+ },
+ "application/vnd.shana.informed.formtemplate": {
+ "source": "iana",
+ "extensions": ["itp"]
+ },
+ "application/vnd.shana.informed.interchange": {
+ "source": "iana",
+ "extensions": ["iif"]
+ },
+ "application/vnd.shana.informed.package": {
+ "source": "iana",
+ "extensions": ["ipk"]
+ },
+ "application/vnd.simtech-mindmapper": {
+ "source": "iana",
+ "extensions": ["twd","twds"]
+ },
+ "application/vnd.siren+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.smaf": {
+ "source": "iana",
+ "extensions": ["mmf"]
+ },
+ "application/vnd.smart.notebook": {
+ "source": "iana"
+ },
+ "application/vnd.smart.teacher": {
+ "source": "iana",
+ "extensions": ["teacher"]
+ },
+ "application/vnd.software602.filler.form+xml": {
+ "source": "iana"
+ },
+ "application/vnd.software602.filler.form-xml-zip": {
+ "source": "iana"
+ },
+ "application/vnd.solent.sdkm+xml": {
+ "source": "iana",
+ "extensions": ["sdkm","sdkd"]
+ },
+ "application/vnd.spotfire.dxp": {
+ "source": "iana",
+ "extensions": ["dxp"]
+ },
+ "application/vnd.spotfire.sfs": {
+ "source": "iana",
+ "extensions": ["sfs"]
+ },
+ "application/vnd.sss-cod": {
+ "source": "iana"
+ },
+ "application/vnd.sss-dtf": {
+ "source": "iana"
+ },
+ "application/vnd.sss-ntf": {
+ "source": "iana"
+ },
+ "application/vnd.stardivision.calc": {
+ "source": "apache",
+ "extensions": ["sdc"]
+ },
+ "application/vnd.stardivision.draw": {
+ "source": "apache",
+ "extensions": ["sda"]
+ },
+ "application/vnd.stardivision.impress": {
+ "source": "apache",
+ "extensions": ["sdd"]
+ },
+ "application/vnd.stardivision.math": {
+ "source": "apache",
+ "extensions": ["smf"]
+ },
+ "application/vnd.stardivision.writer": {
+ "source": "apache",
+ "extensions": ["sdw","vor"]
+ },
+ "application/vnd.stardivision.writer-global": {
+ "source": "apache",
+ "extensions": ["sgl"]
+ },
+ "application/vnd.stepmania.package": {
+ "source": "iana",
+ "extensions": ["smzip"]
+ },
+ "application/vnd.stepmania.stepchart": {
+ "source": "iana",
+ "extensions": ["sm"]
+ },
+ "application/vnd.street-stream": {
+ "source": "iana"
+ },
+ "application/vnd.sun.wadl+xml": {
+ "source": "iana"
+ },
+ "application/vnd.sun.xml.calc": {
+ "source": "apache",
+ "extensions": ["sxc"]
+ },
+ "application/vnd.sun.xml.calc.template": {
+ "source": "apache",
+ "extensions": ["stc"]
+ },
+ "application/vnd.sun.xml.draw": {
+ "source": "apache",
+ "extensions": ["sxd"]
+ },
+ "application/vnd.sun.xml.draw.template": {
+ "source": "apache",
+ "extensions": ["std"]
+ },
+ "application/vnd.sun.xml.impress": {
+ "source": "apache",
+ "extensions": ["sxi"]
+ },
+ "application/vnd.sun.xml.impress.template": {
+ "source": "apache",
+ "extensions": ["sti"]
+ },
+ "application/vnd.sun.xml.math": {
+ "source": "apache",
+ "extensions": ["sxm"]
+ },
+ "application/vnd.sun.xml.writer": {
+ "source": "apache",
+ "extensions": ["sxw"]
+ },
+ "application/vnd.sun.xml.writer.global": {
+ "source": "apache",
+ "extensions": ["sxg"]
+ },
+ "application/vnd.sun.xml.writer.template": {
+ "source": "apache",
+ "extensions": ["stw"]
+ },
+ "application/vnd.sus-calendar": {
+ "source": "iana",
+ "extensions": ["sus","susp"]
+ },
+ "application/vnd.svd": {
+ "source": "iana",
+ "extensions": ["svd"]
+ },
+ "application/vnd.swiftview-ics": {
+ "source": "iana"
+ },
+ "application/vnd.symbian.install": {
+ "source": "apache",
+ "extensions": ["sis","sisx"]
+ },
+ "application/vnd.syncml+xml": {
+ "source": "iana",
+ "extensions": ["xsm"]
+ },
+ "application/vnd.syncml.dm+wbxml": {
+ "source": "iana",
+ "extensions": ["bdm"]
+ },
+ "application/vnd.syncml.dm+xml": {
+ "source": "iana",
+ "extensions": ["xdm"]
+ },
+ "application/vnd.syncml.dm.notification": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmddf+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmddf+xml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmtnds+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmtnds+xml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.ds.notification": {
+ "source": "iana"
+ },
+ "application/vnd.tao.intent-module-archive": {
+ "source": "iana",
+ "extensions": ["tao"]
+ },
+ "application/vnd.tcpdump.pcap": {
+ "source": "iana",
+ "extensions": ["pcap","cap","dmp"]
+ },
+ "application/vnd.tmd.mediaflex.api+xml": {
+ "source": "iana"
+ },
+ "application/vnd.tml": {
+ "source": "iana"
+ },
+ "application/vnd.tmobile-livetv": {
+ "source": "iana",
+ "extensions": ["tmo"]
+ },
+ "application/vnd.tri.onesource": {
+ "source": "iana"
+ },
+ "application/vnd.trid.tpt": {
+ "source": "iana",
+ "extensions": ["tpt"]
+ },
+ "application/vnd.triscape.mxs": {
+ "source": "iana",
+ "extensions": ["mxs"]
+ },
+ "application/vnd.trueapp": {
+ "source": "iana",
+ "extensions": ["tra"]
+ },
+ "application/vnd.truedoc": {
+ "source": "iana"
+ },
+ "application/vnd.ubisoft.webplayer": {
+ "source": "iana"
+ },
+ "application/vnd.ufdl": {
+ "source": "iana",
+ "extensions": ["ufd","ufdl"]
+ },
+ "application/vnd.uiq.theme": {
+ "source": "iana",
+ "extensions": ["utz"]
+ },
+ "application/vnd.umajin": {
+ "source": "iana",
+ "extensions": ["umj"]
+ },
+ "application/vnd.unity": {
+ "source": "iana",
+ "extensions": ["unityweb"]
+ },
+ "application/vnd.uoml+xml": {
+ "source": "iana",
+ "extensions": ["uoml"]
+ },
+ "application/vnd.uplanet.alert": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.alert-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.bearer-choice": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.bearer-choice-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.cacheop": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.cacheop-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.channel": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.channel-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.list": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.list-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.listcmd": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.listcmd-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.signal": {
+ "source": "iana"
+ },
+ "application/vnd.uri-map": {
+ "source": "iana"
+ },
+ "application/vnd.valve.source.material": {
+ "source": "iana"
+ },
+ "application/vnd.vcx": {
+ "source": "iana",
+ "extensions": ["vcx"]
+ },
+ "application/vnd.vd-study": {
+ "source": "iana"
+ },
+ "application/vnd.vectorworks": {
+ "source": "iana"
+ },
+ "application/vnd.vel+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.verimatrix.vcas": {
+ "source": "iana"
+ },
+ "application/vnd.vidsoft.vidconference": {
+ "source": "iana"
+ },
+ "application/vnd.visio": {
+ "source": "iana",
+ "extensions": ["vsd","vst","vss","vsw"]
+ },
+ "application/vnd.visionary": {
+ "source": "iana",
+ "extensions": ["vis"]
+ },
+ "application/vnd.vividence.scriptfile": {
+ "source": "iana"
+ },
+ "application/vnd.vsf": {
+ "source": "iana",
+ "extensions": ["vsf"]
+ },
+ "application/vnd.wap.sic": {
+ "source": "iana"
+ },
+ "application/vnd.wap.slc": {
+ "source": "iana"
+ },
+ "application/vnd.wap.wbxml": {
+ "source": "iana",
+ "extensions": ["wbxml"]
+ },
+ "application/vnd.wap.wmlc": {
+ "source": "iana",
+ "extensions": ["wmlc"]
+ },
+ "application/vnd.wap.wmlscriptc": {
+ "source": "iana",
+ "extensions": ["wmlsc"]
+ },
+ "application/vnd.webturbo": {
+ "source": "iana",
+ "extensions": ["wtb"]
+ },
+ "application/vnd.wfa.p2p": {
+ "source": "iana"
+ },
+ "application/vnd.wfa.wsc": {
+ "source": "iana"
+ },
+ "application/vnd.windows.devicepairing": {
+ "source": "iana"
+ },
+ "application/vnd.wmc": {
+ "source": "iana"
+ },
+ "application/vnd.wmf.bootstrap": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.mathematica": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.mathematica.package": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.player": {
+ "source": "iana",
+ "extensions": ["nbp"]
+ },
+ "application/vnd.wordperfect": {
+ "source": "iana",
+ "extensions": ["wpd"]
+ },
+ "application/vnd.wqd": {
+ "source": "iana",
+ "extensions": ["wqd"]
+ },
+ "application/vnd.wrq-hp3000-labelled": {
+ "source": "iana"
+ },
+ "application/vnd.wt.stf": {
+ "source": "iana",
+ "extensions": ["stf"]
+ },
+ "application/vnd.wv.csp+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.wv.csp+xml": {
+ "source": "iana"
+ },
+ "application/vnd.wv.ssp+xml": {
+ "source": "iana"
+ },
+ "application/vnd.xacml+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.xara": {
+ "source": "iana",
+ "extensions": ["xar"]
+ },
+ "application/vnd.xfdl": {
+ "source": "iana",
+ "extensions": ["xfdl"]
+ },
+ "application/vnd.xfdl.webform": {
+ "source": "iana"
+ },
+ "application/vnd.xmi+xml": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.cpkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.dpkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.plan": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.ppkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.xlim": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.hv-dic": {
+ "source": "iana",
+ "extensions": ["hvd"]
+ },
+ "application/vnd.yamaha.hv-script": {
+ "source": "iana",
+ "extensions": ["hvs"]
+ },
+ "application/vnd.yamaha.hv-voice": {
+ "source": "iana",
+ "extensions": ["hvp"]
+ },
+ "application/vnd.yamaha.openscoreformat": {
+ "source": "iana",
+ "extensions": ["osf"]
+ },
+ "application/vnd.yamaha.openscoreformat.osfpvg+xml": {
+ "source": "iana",
+ "extensions": ["osfpvg"]
+ },
+ "application/vnd.yamaha.remote-setup": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.smaf-audio": {
+ "source": "iana",
+ "extensions": ["saf"]
+ },
+ "application/vnd.yamaha.smaf-phrase": {
+ "source": "iana",
+ "extensions": ["spf"]
+ },
+ "application/vnd.yamaha.through-ngn": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.tunnel-udpencap": {
+ "source": "iana"
+ },
+ "application/vnd.yaoweme": {
+ "source": "iana"
+ },
+ "application/vnd.yellowriver-custom-menu": {
+ "source": "iana",
+ "extensions": ["cmp"]
+ },
+ "application/vnd.zul": {
+ "source": "iana",
+ "extensions": ["zir","zirz"]
+ },
+ "application/vnd.zzazz.deck+xml": {
+ "source": "iana",
+ "extensions": ["zaz"]
+ },
+ "application/voicexml+xml": {
+ "source": "iana",
+ "extensions": ["vxml"]
+ },
+ "application/vq-rtcpxr": {
+ "source": "iana"
+ },
+ "application/watcherinfo+xml": {
+ "source": "iana"
+ },
+ "application/whoispp-query": {
+ "source": "iana"
+ },
+ "application/whoispp-response": {
+ "source": "iana"
+ },
+ "application/widget": {
+ "source": "iana",
+ "extensions": ["wgt"]
+ },
+ "application/winhlp": {
+ "source": "apache",
+ "extensions": ["hlp"]
+ },
+ "application/wita": {
+ "source": "iana"
+ },
+ "application/wordperfect5.1": {
+ "source": "iana"
+ },
+ "application/wsdl+xml": {
+ "source": "iana",
+ "extensions": ["wsdl"]
+ },
+ "application/wspolicy+xml": {
+ "source": "iana",
+ "extensions": ["wspolicy"]
+ },
+ "application/x-7z-compressed": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["7z"]
+ },
+ "application/x-abiword": {
+ "source": "apache",
+ "extensions": ["abw"]
+ },
+ "application/x-ace-compressed": {
+ "source": "apache",
+ "extensions": ["ace"]
+ },
+ "application/x-amf": {
+ "source": "apache"
+ },
+ "application/x-apple-diskimage": {
+ "source": "apache",
+ "extensions": ["dmg"]
+ },
+ "application/x-authorware-bin": {
+ "source": "apache",
+ "extensions": ["aab","x32","u32","vox"]
+ },
+ "application/x-authorware-map": {
+ "source": "apache",
+ "extensions": ["aam"]
+ },
+ "application/x-authorware-seg": {
+ "source": "apache",
+ "extensions": ["aas"]
+ },
+ "application/x-bcpio": {
+ "source": "apache",
+ "extensions": ["bcpio"]
+ },
+ "application/x-bdoc": {
+ "compressible": false,
+ "extensions": ["bdoc"]
+ },
+ "application/x-bittorrent": {
+ "source": "apache",
+ "extensions": ["torrent"]
+ },
+ "application/x-blorb": {
+ "source": "apache",
+ "extensions": ["blb","blorb"]
+ },
+ "application/x-bzip": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["bz"]
+ },
+ "application/x-bzip2": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["bz2","boz"]
+ },
+ "application/x-cbr": {
+ "source": "apache",
+ "extensions": ["cbr","cba","cbt","cbz","cb7"]
+ },
+ "application/x-cdlink": {
+ "source": "apache",
+ "extensions": ["vcd"]
+ },
+ "application/x-cfs-compressed": {
+ "source": "apache",
+ "extensions": ["cfs"]
+ },
+ "application/x-chat": {
+ "source": "apache",
+ "extensions": ["chat"]
+ },
+ "application/x-chess-pgn": {
+ "source": "apache",
+ "extensions": ["pgn"]
+ },
+ "application/x-chrome-extension": {
+ "extensions": ["crx"]
+ },
+ "application/x-cocoa": {
+ "source": "nginx",
+ "extensions": ["cco"]
+ },
+ "application/x-compress": {
+ "source": "apache"
+ },
+ "application/x-conference": {
+ "source": "apache",
+ "extensions": ["nsc"]
+ },
+ "application/x-cpio": {
+ "source": "apache",
+ "extensions": ["cpio"]
+ },
+ "application/x-csh": {
+ "source": "apache",
+ "extensions": ["csh"]
+ },
+ "application/x-deb": {
+ "compressible": false
+ },
+ "application/x-debian-package": {
+ "source": "apache",
+ "extensions": ["deb","udeb"]
+ },
+ "application/x-dgc-compressed": {
+ "source": "apache",
+ "extensions": ["dgc"]
+ },
+ "application/x-director": {
+ "source": "apache",
+ "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]
+ },
+ "application/x-doom": {
+ "source": "apache",
+ "extensions": ["wad"]
+ },
+ "application/x-dtbncx+xml": {
+ "source": "apache",
+ "extensions": ["ncx"]
+ },
+ "application/x-dtbook+xml": {
+ "source": "apache",
+ "extensions": ["dtb"]
+ },
+ "application/x-dtbresource+xml": {
+ "source": "apache",
+ "extensions": ["res"]
+ },
+ "application/x-dvi": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["dvi"]
+ },
+ "application/x-envoy": {
+ "source": "apache",
+ "extensions": ["evy"]
+ },
+ "application/x-eva": {
+ "source": "apache",
+ "extensions": ["eva"]
+ },
+ "application/x-font-bdf": {
+ "source": "apache",
+ "extensions": ["bdf"]
+ },
+ "application/x-font-dos": {
+ "source": "apache"
+ },
+ "application/x-font-framemaker": {
+ "source": "apache"
+ },
+ "application/x-font-ghostscript": {
+ "source": "apache",
+ "extensions": ["gsf"]
+ },
+ "application/x-font-libgrx": {
+ "source": "apache"
+ },
+ "application/x-font-linux-psf": {
+ "source": "apache",
+ "extensions": ["psf"]
+ },
+ "application/x-font-otf": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["otf"]
+ },
+ "application/x-font-pcf": {
+ "source": "apache",
+ "extensions": ["pcf"]
+ },
+ "application/x-font-snf": {
+ "source": "apache",
+ "extensions": ["snf"]
+ },
+ "application/x-font-speedo": {
+ "source": "apache"
+ },
+ "application/x-font-sunos-news": {
+ "source": "apache"
+ },
+ "application/x-font-ttf": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["ttf","ttc"]
+ },
+ "application/x-font-type1": {
+ "source": "apache",
+ "extensions": ["pfa","pfb","pfm","afm"]
+ },
+ "application/x-font-vfont": {
+ "source": "apache"
+ },
+ "application/x-freearc": {
+ "source": "apache",
+ "extensions": ["arc"]
+ },
+ "application/x-futuresplash": {
+ "source": "apache",
+ "extensions": ["spl"]
+ },
+ "application/x-gca-compressed": {
+ "source": "apache",
+ "extensions": ["gca"]
+ },
+ "application/x-glulx": {
+ "source": "apache",
+ "extensions": ["ulx"]
+ },
+ "application/x-gnumeric": {
+ "source": "apache",
+ "extensions": ["gnumeric"]
+ },
+ "application/x-gramps-xml": {
+ "source": "apache",
+ "extensions": ["gramps"]
+ },
+ "application/x-gtar": {
+ "source": "apache",
+ "extensions": ["gtar"]
+ },
+ "application/x-gzip": {
+ "source": "apache"
+ },
+ "application/x-hdf": {
+ "source": "apache",
+ "extensions": ["hdf"]
+ },
+ "application/x-httpd-php": {
+ "compressible": true,
+ "extensions": ["php"]
+ },
+ "application/x-install-instructions": {
+ "source": "apache",
+ "extensions": ["install"]
+ },
+ "application/x-iso9660-image": {
+ "source": "apache",
+ "extensions": ["iso"]
+ },
+ "application/x-java-archive-diff": {
+ "source": "nginx",
+ "extensions": ["jardiff"]
+ },
+ "application/x-java-jnlp-file": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["jnlp"]
+ },
+ "application/x-javascript": {
+ "compressible": true
+ },
+ "application/x-latex": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["latex"]
+ },
+ "application/x-lua-bytecode": {
+ "extensions": ["luac"]
+ },
+ "application/x-lzh-compressed": {
+ "source": "apache",
+ "extensions": ["lzh","lha"]
+ },
+ "application/x-makeself": {
+ "source": "nginx",
+ "extensions": ["run"]
+ },
+ "application/x-mie": {
+ "source": "apache",
+ "extensions": ["mie"]
+ },
+ "application/x-mobipocket-ebook": {
+ "source": "apache",
+ "extensions": ["prc","mobi"]
+ },
+ "application/x-mpegurl": {
+ "compressible": false
+ },
+ "application/x-ms-application": {
+ "source": "apache",
+ "extensions": ["application"]
+ },
+ "application/x-ms-shortcut": {
+ "source": "apache",
+ "extensions": ["lnk"]
+ },
+ "application/x-ms-wmd": {
+ "source": "apache",
+ "extensions": ["wmd"]
+ },
+ "application/x-ms-wmz": {
+ "source": "apache",
+ "extensions": ["wmz"]
+ },
+ "application/x-ms-xbap": {
+ "source": "apache",
+ "extensions": ["xbap"]
+ },
+ "application/x-msaccess": {
+ "source": "apache",
+ "extensions": ["mdb"]
+ },
+ "application/x-msbinder": {
+ "source": "apache",
+ "extensions": ["obd"]
+ },
+ "application/x-mscardfile": {
+ "source": "apache",
+ "extensions": ["crd"]
+ },
+ "application/x-msclip": {
+ "source": "apache",
+ "extensions": ["clp"]
+ },
+ "application/x-msdos-program": {
+ "extensions": ["exe"]
+ },
+ "application/x-msdownload": {
+ "source": "apache",
+ "extensions": ["exe","dll","com","bat","msi"]
+ },
+ "application/x-msmediaview": {
+ "source": "apache",
+ "extensions": ["mvb","m13","m14"]
+ },
+ "application/x-msmetafile": {
+ "source": "apache",
+ "extensions": ["wmf","wmz","emf","emz"]
+ },
+ "application/x-msmoney": {
+ "source": "apache",
+ "extensions": ["mny"]
+ },
+ "application/x-mspublisher": {
+ "source": "apache",
+ "extensions": ["pub"]
+ },
+ "application/x-msschedule": {
+ "source": "apache",
+ "extensions": ["scd"]
+ },
+ "application/x-msterminal": {
+ "source": "apache",
+ "extensions": ["trm"]
+ },
+ "application/x-mswrite": {
+ "source": "apache",
+ "extensions": ["wri"]
+ },
+ "application/x-netcdf": {
+ "source": "apache",
+ "extensions": ["nc","cdf"]
+ },
+ "application/x-ns-proxy-autoconfig": {
+ "compressible": true,
+ "extensions": ["pac"]
+ },
+ "application/x-nzb": {
+ "source": "apache",
+ "extensions": ["nzb"]
+ },
+ "application/x-perl": {
+ "source": "nginx",
+ "extensions": ["pl","pm"]
+ },
+ "application/x-pilot": {
+ "source": "nginx",
+ "extensions": ["prc","pdb"]
+ },
+ "application/x-pkcs12": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["p12","pfx"]
+ },
+ "application/x-pkcs7-certificates": {
+ "source": "apache",
+ "extensions": ["p7b","spc"]
+ },
+ "application/x-pkcs7-certreqresp": {
+ "source": "apache",
+ "extensions": ["p7r"]
+ },
+ "application/x-rar-compressed": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["rar"]
+ },
+ "application/x-redhat-package-manager": {
+ "source": "nginx",
+ "extensions": ["rpm"]
+ },
+ "application/x-research-info-systems": {
+ "source": "apache",
+ "extensions": ["ris"]
+ },
+ "application/x-sea": {
+ "source": "nginx",
+ "extensions": ["sea"]
+ },
+ "application/x-sh": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["sh"]
+ },
+ "application/x-shar": {
+ "source": "apache",
+ "extensions": ["shar"]
+ },
+ "application/x-shockwave-flash": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["swf"]
+ },
+ "application/x-silverlight-app": {
+ "source": "apache",
+ "extensions": ["xap"]
+ },
+ "application/x-sql": {
+ "source": "apache",
+ "extensions": ["sql"]
+ },
+ "application/x-stuffit": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["sit"]
+ },
+ "application/x-stuffitx": {
+ "source": "apache",
+ "extensions": ["sitx"]
+ },
+ "application/x-subrip": {
+ "source": "apache",
+ "extensions": ["srt"]
+ },
+ "application/x-sv4cpio": {
+ "source": "apache",
+ "extensions": ["sv4cpio"]
+ },
+ "application/x-sv4crc": {
+ "source": "apache",
+ "extensions": ["sv4crc"]
+ },
+ "application/x-t3vm-image": {
+ "source": "apache",
+ "extensions": ["t3"]
+ },
+ "application/x-tads": {
+ "source": "apache",
+ "extensions": ["gam"]
+ },
+ "application/x-tar": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["tar"]
+ },
+ "application/x-tcl": {
+ "source": "apache",
+ "extensions": ["tcl","tk"]
+ },
+ "application/x-tex": {
+ "source": "apache",
+ "extensions": ["tex"]
+ },
+ "application/x-tex-tfm": {
+ "source": "apache",
+ "extensions": ["tfm"]
+ },
+ "application/x-texinfo": {
+ "source": "apache",
+ "extensions": ["texinfo","texi"]
+ },
+ "application/x-tgif": {
+ "source": "apache",
+ "extensions": ["obj"]
+ },
+ "application/x-ustar": {
+ "source": "apache",
+ "extensions": ["ustar"]
+ },
+ "application/x-wais-source": {
+ "source": "apache",
+ "extensions": ["src"]
+ },
+ "application/x-web-app-manifest+json": {
+ "compressible": true,
+ "extensions": ["webapp"]
+ },
+ "application/x-www-form-urlencoded": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/x-x509-ca-cert": {
+ "source": "apache",
+ "extensions": ["der","crt","pem"]
+ },
+ "application/x-xfig": {
+ "source": "apache",
+ "extensions": ["fig"]
+ },
+ "application/x-xliff+xml": {
+ "source": "apache",
+ "extensions": ["xlf"]
+ },
+ "application/x-xpinstall": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["xpi"]
+ },
+ "application/x-xz": {
+ "source": "apache",
+ "extensions": ["xz"]
+ },
+ "application/x-zmachine": {
+ "source": "apache",
+ "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"]
+ },
+ "application/x400-bp": {
+ "source": "iana"
+ },
+ "application/xacml+xml": {
+ "source": "iana"
+ },
+ "application/xaml+xml": {
+ "source": "apache",
+ "extensions": ["xaml"]
+ },
+ "application/xcap-att+xml": {
+ "source": "iana"
+ },
+ "application/xcap-caps+xml": {
+ "source": "iana"
+ },
+ "application/xcap-diff+xml": {
+ "source": "iana",
+ "extensions": ["xdf"]
+ },
+ "application/xcap-el+xml": {
+ "source": "iana"
+ },
+ "application/xcap-error+xml": {
+ "source": "iana"
+ },
+ "application/xcap-ns+xml": {
+ "source": "iana"
+ },
+ "application/xcon-conference-info+xml": {
+ "source": "iana"
+ },
+ "application/xcon-conference-info-diff+xml": {
+ "source": "iana"
+ },
+ "application/xenc+xml": {
+ "source": "iana",
+ "extensions": ["xenc"]
+ },
+ "application/xhtml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xhtml","xht"]
+ },
+ "application/xhtml-voice+xml": {
+ "source": "apache"
+ },
+ "application/xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xml","xsl","xsd","rng"]
+ },
+ "application/xml-dtd": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["dtd"]
+ },
+ "application/xml-external-parsed-entity": {
+ "source": "iana"
+ },
+ "application/xml-patch+xml": {
+ "source": "iana"
+ },
+ "application/xmpp+xml": {
+ "source": "iana"
+ },
+ "application/xop+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xop"]
+ },
+ "application/xproc+xml": {
+ "source": "apache",
+ "extensions": ["xpl"]
+ },
+ "application/xslt+xml": {
+ "source": "iana",
+ "extensions": ["xslt"]
+ },
+ "application/xspf+xml": {
+ "source": "apache",
+ "extensions": ["xspf"]
+ },
+ "application/xv+xml": {
+ "source": "iana",
+ "extensions": ["mxml","xhvml","xvml","xvm"]
+ },
+ "application/yang": {
+ "source": "iana",
+ "extensions": ["yang"]
+ },
+ "application/yang-data+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/yang-data+xml": {
+ "source": "iana"
+ },
+ "application/yin+xml": {
+ "source": "iana",
+ "extensions": ["yin"]
+ },
+ "application/zip": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["zip"]
+ },
+ "application/zlib": {
+ "source": "iana"
+ },
+ "audio/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "audio/32kadpcm": {
+ "source": "iana"
+ },
+ "audio/3gpp": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["3gpp"]
+ },
+ "audio/3gpp2": {
+ "source": "iana"
+ },
+ "audio/ac3": {
+ "source": "iana"
+ },
+ "audio/adpcm": {
+ "source": "apache",
+ "extensions": ["adp"]
+ },
+ "audio/amr": {
+ "source": "iana"
+ },
+ "audio/amr-wb": {
+ "source": "iana"
+ },
+ "audio/amr-wb+": {
+ "source": "iana"
+ },
+ "audio/aptx": {
+ "source": "iana"
+ },
+ "audio/asc": {
+ "source": "iana"
+ },
+ "audio/atrac-advanced-lossless": {
+ "source": "iana"
+ },
+ "audio/atrac-x": {
+ "source": "iana"
+ },
+ "audio/atrac3": {
+ "source": "iana"
+ },
+ "audio/basic": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["au","snd"]
+ },
+ "audio/bv16": {
+ "source": "iana"
+ },
+ "audio/bv32": {
+ "source": "iana"
+ },
+ "audio/clearmode": {
+ "source": "iana"
+ },
+ "audio/cn": {
+ "source": "iana"
+ },
+ "audio/dat12": {
+ "source": "iana"
+ },
+ "audio/dls": {
+ "source": "iana"
+ },
+ "audio/dsr-es201108": {
+ "source": "iana"
+ },
+ "audio/dsr-es202050": {
+ "source": "iana"
+ },
+ "audio/dsr-es202211": {
+ "source": "iana"
+ },
+ "audio/dsr-es202212": {
+ "source": "iana"
+ },
+ "audio/dv": {
+ "source": "iana"
+ },
+ "audio/dvi4": {
+ "source": "iana"
+ },
+ "audio/eac3": {
+ "source": "iana"
+ },
+ "audio/encaprtp": {
+ "source": "iana"
+ },
+ "audio/evrc": {
+ "source": "iana"
+ },
+ "audio/evrc-qcp": {
+ "source": "iana"
+ },
+ "audio/evrc0": {
+ "source": "iana"
+ },
+ "audio/evrc1": {
+ "source": "iana"
+ },
+ "audio/evrcb": {
+ "source": "iana"
+ },
+ "audio/evrcb0": {
+ "source": "iana"
+ },
+ "audio/evrcb1": {
+ "source": "iana"
+ },
+ "audio/evrcnw": {
+ "source": "iana"
+ },
+ "audio/evrcnw0": {
+ "source": "iana"
+ },
+ "audio/evrcnw1": {
+ "source": "iana"
+ },
+ "audio/evrcwb": {
+ "source": "iana"
+ },
+ "audio/evrcwb0": {
+ "source": "iana"
+ },
+ "audio/evrcwb1": {
+ "source": "iana"
+ },
+ "audio/evs": {
+ "source": "iana"
+ },
+ "audio/fwdred": {
+ "source": "iana"
+ },
+ "audio/g711-0": {
+ "source": "iana"
+ },
+ "audio/g719": {
+ "source": "iana"
+ },
+ "audio/g722": {
+ "source": "iana"
+ },
+ "audio/g7221": {
+ "source": "iana"
+ },
+ "audio/g723": {
+ "source": "iana"
+ },
+ "audio/g726-16": {
+ "source": "iana"
+ },
+ "audio/g726-24": {
+ "source": "iana"
+ },
+ "audio/g726-32": {
+ "source": "iana"
+ },
+ "audio/g726-40": {
+ "source": "iana"
+ },
+ "audio/g728": {
+ "source": "iana"
+ },
+ "audio/g729": {
+ "source": "iana"
+ },
+ "audio/g7291": {
+ "source": "iana"
+ },
+ "audio/g729d": {
+ "source": "iana"
+ },
+ "audio/g729e": {
+ "source": "iana"
+ },
+ "audio/gsm": {
+ "source": "iana"
+ },
+ "audio/gsm-efr": {
+ "source": "iana"
+ },
+ "audio/gsm-hr-08": {
+ "source": "iana"
+ },
+ "audio/ilbc": {
+ "source": "iana"
+ },
+ "audio/ip-mr_v2.5": {
+ "source": "iana"
+ },
+ "audio/isac": {
+ "source": "apache"
+ },
+ "audio/l16": {
+ "source": "iana"
+ },
+ "audio/l20": {
+ "source": "iana"
+ },
+ "audio/l24": {
+ "source": "iana",
+ "compressible": false
+ },
+ "audio/l8": {
+ "source": "iana"
+ },
+ "audio/lpc": {
+ "source": "iana"
+ },
+ "audio/midi": {
+ "source": "apache",
+ "extensions": ["mid","midi","kar","rmi"]
+ },
+ "audio/mobile-xmf": {
+ "source": "iana"
+ },
+ "audio/mp3": {
+ "compressible": false,
+ "extensions": ["mp3"]
+ },
+ "audio/mp4": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["m4a","mp4a"]
+ },
+ "audio/mp4a-latm": {
+ "source": "iana"
+ },
+ "audio/mpa": {
+ "source": "iana"
+ },
+ "audio/mpa-robust": {
+ "source": "iana"
+ },
+ "audio/mpeg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"]
+ },
+ "audio/mpeg4-generic": {
+ "source": "iana"
+ },
+ "audio/musepack": {
+ "source": "apache"
+ },
+ "audio/ogg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["oga","ogg","spx"]
+ },
+ "audio/opus": {
+ "source": "iana"
+ },
+ "audio/parityfec": {
+ "source": "iana"
+ },
+ "audio/pcma": {
+ "source": "iana"
+ },
+ "audio/pcma-wb": {
+ "source": "iana"
+ },
+ "audio/pcmu": {
+ "source": "iana"
+ },
+ "audio/pcmu-wb": {
+ "source": "iana"
+ },
+ "audio/prs.sid": {
+ "source": "iana"
+ },
+ "audio/qcelp": {
+ "source": "iana"
+ },
+ "audio/raptorfec": {
+ "source": "iana"
+ },
+ "audio/red": {
+ "source": "iana"
+ },
+ "audio/rtp-enc-aescm128": {
+ "source": "iana"
+ },
+ "audio/rtp-midi": {
+ "source": "iana"
+ },
+ "audio/rtploopback": {
+ "source": "iana"
+ },
+ "audio/rtx": {
+ "source": "iana"
+ },
+ "audio/s3m": {
+ "source": "apache",
+ "extensions": ["s3m"]
+ },
+ "audio/silk": {
+ "source": "apache",
+ "extensions": ["sil"]
+ },
+ "audio/smv": {
+ "source": "iana"
+ },
+ "audio/smv-qcp": {
+ "source": "iana"
+ },
+ "audio/smv0": {
+ "source": "iana"
+ },
+ "audio/sp-midi": {
+ "source": "iana"
+ },
+ "audio/speex": {
+ "source": "iana"
+ },
+ "audio/t140c": {
+ "source": "iana"
+ },
+ "audio/t38": {
+ "source": "iana"
+ },
+ "audio/telephone-event": {
+ "source": "iana"
+ },
+ "audio/tone": {
+ "source": "iana"
+ },
+ "audio/uemclip": {
+ "source": "iana"
+ },
+ "audio/ulpfec": {
+ "source": "iana"
+ },
+ "audio/vdvi": {
+ "source": "iana"
+ },
+ "audio/vmr-wb": {
+ "source": "iana"
+ },
+ "audio/vnd.3gpp.iufp": {
+ "source": "iana"
+ },
+ "audio/vnd.4sb": {
+ "source": "iana"
+ },
+ "audio/vnd.audiokoz": {
+ "source": "iana"
+ },
+ "audio/vnd.celp": {
+ "source": "iana"
+ },
+ "audio/vnd.cisco.nse": {
+ "source": "iana"
+ },
+ "audio/vnd.cmles.radio-events": {
+ "source": "iana"
+ },
+ "audio/vnd.cns.anp1": {
+ "source": "iana"
+ },
+ "audio/vnd.cns.inf1": {
+ "source": "iana"
+ },
+ "audio/vnd.dece.audio": {
+ "source": "iana",
+ "extensions": ["uva","uvva"]
+ },
+ "audio/vnd.digital-winds": {
+ "source": "iana",
+ "extensions": ["eol"]
+ },
+ "audio/vnd.dlna.adts": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.heaac.1": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.heaac.2": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.mlp": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.mps": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2x": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2z": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pulse.1": {
+ "source": "iana"
+ },
+ "audio/vnd.dra": {
+ "source": "iana",
+ "extensions": ["dra"]
+ },
+ "audio/vnd.dts": {
+ "source": "iana",
+ "extensions": ["dts"]
+ },
+ "audio/vnd.dts.hd": {
+ "source": "iana",
+ "extensions": ["dtshd"]
+ },
+ "audio/vnd.dvb.file": {
+ "source": "iana"
+ },
+ "audio/vnd.everad.plj": {
+ "source": "iana"
+ },
+ "audio/vnd.hns.audio": {
+ "source": "iana"
+ },
+ "audio/vnd.lucent.voice": {
+ "source": "iana",
+ "extensions": ["lvp"]
+ },
+ "audio/vnd.ms-playready.media.pya": {
+ "source": "iana",
+ "extensions": ["pya"]
+ },
+ "audio/vnd.nokia.mobile-xmf": {
+ "source": "iana"
+ },
+ "audio/vnd.nortel.vbk": {
+ "source": "iana"
+ },
+ "audio/vnd.nuera.ecelp4800": {
+ "source": "iana",
+ "extensions": ["ecelp4800"]
+ },
+ "audio/vnd.nuera.ecelp7470": {
+ "source": "iana",
+ "extensions": ["ecelp7470"]
+ },
+ "audio/vnd.nuera.ecelp9600": {
+ "source": "iana",
+ "extensions": ["ecelp9600"]
+ },
+ "audio/vnd.octel.sbc": {
+ "source": "iana"
+ },
+ "audio/vnd.qcelp": {
+ "source": "iana"
+ },
+ "audio/vnd.rhetorex.32kadpcm": {
+ "source": "iana"
+ },
+ "audio/vnd.rip": {
+ "source": "iana",
+ "extensions": ["rip"]
+ },
+ "audio/vnd.rn-realaudio": {
+ "compressible": false
+ },
+ "audio/vnd.sealedmedia.softseal.mpeg": {
+ "source": "iana"
+ },
+ "audio/vnd.vmx.cvsd": {
+ "source": "iana"
+ },
+ "audio/vnd.wave": {
+ "compressible": false
+ },
+ "audio/vorbis": {
+ "source": "iana",
+ "compressible": false
+ },
+ "audio/vorbis-config": {
+ "source": "iana"
+ },
+ "audio/wav": {
+ "compressible": false,
+ "extensions": ["wav"]
+ },
+ "audio/wave": {
+ "compressible": false,
+ "extensions": ["wav"]
+ },
+ "audio/webm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["weba"]
+ },
+ "audio/x-aac": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["aac"]
+ },
+ "audio/x-aiff": {
+ "source": "apache",
+ "extensions": ["aif","aiff","aifc"]
+ },
+ "audio/x-caf": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["caf"]
+ },
+ "audio/x-flac": {
+ "source": "apache",
+ "extensions": ["flac"]
+ },
+ "audio/x-m4a": {
+ "source": "nginx",
+ "extensions": ["m4a"]
+ },
+ "audio/x-matroska": {
+ "source": "apache",
+ "extensions": ["mka"]
+ },
+ "audio/x-mpegurl": {
+ "source": "apache",
+ "extensions": ["m3u"]
+ },
+ "audio/x-ms-wax": {
+ "source": "apache",
+ "extensions": ["wax"]
+ },
+ "audio/x-ms-wma": {
+ "source": "apache",
+ "extensions": ["wma"]
+ },
+ "audio/x-pn-realaudio": {
+ "source": "apache",
+ "extensions": ["ram","ra"]
+ },
+ "audio/x-pn-realaudio-plugin": {
+ "source": "apache",
+ "extensions": ["rmp"]
+ },
+ "audio/x-realaudio": {
+ "source": "nginx",
+ "extensions": ["ra"]
+ },
+ "audio/x-tta": {
+ "source": "apache"
+ },
+ "audio/x-wav": {
+ "source": "apache",
+ "extensions": ["wav"]
+ },
+ "audio/xm": {
+ "source": "apache",
+ "extensions": ["xm"]
+ },
+ "chemical/x-cdx": {
+ "source": "apache",
+ "extensions": ["cdx"]
+ },
+ "chemical/x-cif": {
+ "source": "apache",
+ "extensions": ["cif"]
+ },
+ "chemical/x-cmdf": {
+ "source": "apache",
+ "extensions": ["cmdf"]
+ },
+ "chemical/x-cml": {
+ "source": "apache",
+ "extensions": ["cml"]
+ },
+ "chemical/x-csml": {
+ "source": "apache",
+ "extensions": ["csml"]
+ },
+ "chemical/x-pdb": {
+ "source": "apache"
+ },
+ "chemical/x-xyz": {
+ "source": "apache",
+ "extensions": ["xyz"]
+ },
+ "font/opentype": {
+ "compressible": true,
+ "extensions": ["otf"]
+ },
+ "image/bmp": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["bmp"]
+ },
+ "image/cgm": {
+ "source": "iana",
+ "extensions": ["cgm"]
+ },
+ "image/dicom-rle": {
+ "source": "iana"
+ },
+ "image/emf": {
+ "source": "iana"
+ },
+ "image/fits": {
+ "source": "iana"
+ },
+ "image/g3fax": {
+ "source": "iana",
+ "extensions": ["g3"]
+ },
+ "image/gif": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["gif"]
+ },
+ "image/ief": {
+ "source": "iana",
+ "extensions": ["ief"]
+ },
+ "image/jls": {
+ "source": "iana"
+ },
+ "image/jp2": {
+ "source": "iana"
+ },
+ "image/jpeg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["jpeg","jpg","jpe"]
+ },
+ "image/jpm": {
+ "source": "iana"
+ },
+ "image/jpx": {
+ "source": "iana"
+ },
+ "image/ktx": {
+ "source": "iana",
+ "extensions": ["ktx"]
+ },
+ "image/naplps": {
+ "source": "iana"
+ },
+ "image/pjpeg": {
+ "compressible": false
+ },
+ "image/png": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["png"]
+ },
+ "image/prs.btif": {
+ "source": "iana",
+ "extensions": ["btif"]
+ },
+ "image/prs.pti": {
+ "source": "iana"
+ },
+ "image/pwg-raster": {
+ "source": "iana"
+ },
+ "image/sgi": {
+ "source": "apache",
+ "extensions": ["sgi"]
+ },
+ "image/svg+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["svg","svgz"]
+ },
+ "image/t38": {
+ "source": "iana"
+ },
+ "image/tiff": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["tiff","tif"]
+ },
+ "image/tiff-fx": {
+ "source": "iana"
+ },
+ "image/vnd.adobe.photoshop": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["psd"]
+ },
+ "image/vnd.airzip.accelerator.azv": {
+ "source": "iana"
+ },
+ "image/vnd.cns.inf2": {
+ "source": "iana"
+ },
+ "image/vnd.dece.graphic": {
+ "source": "iana",
+ "extensions": ["uvi","uvvi","uvg","uvvg"]
+ },
+ "image/vnd.djvu": {
+ "source": "iana",
+ "extensions": ["djvu","djv"]
+ },
+ "image/vnd.dvb.subtitle": {
+ "source": "iana",
+ "extensions": ["sub"]
+ },
+ "image/vnd.dwg": {
+ "source": "iana",
+ "extensions": ["dwg"]
+ },
+ "image/vnd.dxf": {
+ "source": "iana",
+ "extensions": ["dxf"]
+ },
+ "image/vnd.fastbidsheet": {
+ "source": "iana",
+ "extensions": ["fbs"]
+ },
+ "image/vnd.fpx": {
+ "source": "iana",
+ "extensions": ["fpx"]
+ },
+ "image/vnd.fst": {
+ "source": "iana",
+ "extensions": ["fst"]
+ },
+ "image/vnd.fujixerox.edmics-mmr": {
+ "source": "iana",
+ "extensions": ["mmr"]
+ },
+ "image/vnd.fujixerox.edmics-rlc": {
+ "source": "iana",
+ "extensions": ["rlc"]
+ },
+ "image/vnd.globalgraphics.pgb": {
+ "source": "iana"
+ },
+ "image/vnd.microsoft.icon": {
+ "source": "iana"
+ },
+ "image/vnd.mix": {
+ "source": "iana"
+ },
+ "image/vnd.mozilla.apng": {
+ "source": "iana"
+ },
+ "image/vnd.ms-modi": {
+ "source": "iana",
+ "extensions": ["mdi"]
+ },
+ "image/vnd.ms-photo": {
+ "source": "apache",
+ "extensions": ["wdp"]
+ },
+ "image/vnd.net-fpx": {
+ "source": "iana",
+ "extensions": ["npx"]
+ },
+ "image/vnd.radiance": {
+ "source": "iana"
+ },
+ "image/vnd.sealed.png": {
+ "source": "iana"
+ },
+ "image/vnd.sealedmedia.softseal.gif": {
+ "source": "iana"
+ },
+ "image/vnd.sealedmedia.softseal.jpg": {
+ "source": "iana"
+ },
+ "image/vnd.svf": {
+ "source": "iana"
+ },
+ "image/vnd.tencent.tap": {
+ "source": "iana"
+ },
+ "image/vnd.valve.source.texture": {
+ "source": "iana"
+ },
+ "image/vnd.wap.wbmp": {
+ "source": "iana",
+ "extensions": ["wbmp"]
+ },
+ "image/vnd.xiff": {
+ "source": "iana",
+ "extensions": ["xif"]
+ },
+ "image/vnd.zbrush.pcx": {
+ "source": "iana"
+ },
+ "image/webp": {
+ "source": "apache",
+ "extensions": ["webp"]
+ },
+ "image/wmf": {
+ "source": "iana"
+ },
+ "image/x-3ds": {
+ "source": "apache",
+ "extensions": ["3ds"]
+ },
+ "image/x-cmu-raster": {
+ "source": "apache",
+ "extensions": ["ras"]
+ },
+ "image/x-cmx": {
+ "source": "apache",
+ "extensions": ["cmx"]
+ },
+ "image/x-freehand": {
+ "source": "apache",
+ "extensions": ["fh","fhc","fh4","fh5","fh7"]
+ },
+ "image/x-icon": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["ico"]
+ },
+ "image/x-jng": {
+ "source": "nginx",
+ "extensions": ["jng"]
+ },
+ "image/x-mrsid-image": {
+ "source": "apache",
+ "extensions": ["sid"]
+ },
+ "image/x-ms-bmp": {
+ "source": "nginx",
+ "compressible": true,
+ "extensions": ["bmp"]
+ },
+ "image/x-pcx": {
+ "source": "apache",
+ "extensions": ["pcx"]
+ },
+ "image/x-pict": {
+ "source": "apache",
+ "extensions": ["pic","pct"]
+ },
+ "image/x-portable-anymap": {
+ "source": "apache",
+ "extensions": ["pnm"]
+ },
+ "image/x-portable-bitmap": {
+ "source": "apache",
+ "extensions": ["pbm"]
+ },
+ "image/x-portable-graymap": {
+ "source": "apache",
+ "extensions": ["pgm"]
+ },
+ "image/x-portable-pixmap": {
+ "source": "apache",
+ "extensions": ["ppm"]
+ },
+ "image/x-rgb": {
+ "source": "apache",
+ "extensions": ["rgb"]
+ },
+ "image/x-tga": {
+ "source": "apache",
+ "extensions": ["tga"]
+ },
+ "image/x-xbitmap": {
+ "source": "apache",
+ "extensions": ["xbm"]
+ },
+ "image/x-xcf": {
+ "compressible": false
+ },
+ "image/x-xpixmap": {
+ "source": "apache",
+ "extensions": ["xpm"]
+ },
+ "image/x-xwindowdump": {
+ "source": "apache",
+ "extensions": ["xwd"]
+ },
+ "message/cpim": {
+ "source": "iana"
+ },
+ "message/delivery-status": {
+ "source": "iana"
+ },
+ "message/disposition-notification": {
+ "source": "iana"
+ },
+ "message/external-body": {
+ "source": "iana"
+ },
+ "message/feedback-report": {
+ "source": "iana"
+ },
+ "message/global": {
+ "source": "iana"
+ },
+ "message/global-delivery-status": {
+ "source": "iana"
+ },
+ "message/global-disposition-notification": {
+ "source": "iana"
+ },
+ "message/global-headers": {
+ "source": "iana"
+ },
+ "message/http": {
+ "source": "iana",
+ "compressible": false
+ },
+ "message/imdn+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "message/news": {
+ "source": "iana"
+ },
+ "message/partial": {
+ "source": "iana",
+ "compressible": false
+ },
+ "message/rfc822": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["eml","mime"]
+ },
+ "message/s-http": {
+ "source": "iana"
+ },
+ "message/sip": {
+ "source": "iana"
+ },
+ "message/sipfrag": {
+ "source": "iana"
+ },
+ "message/tracking-status": {
+ "source": "iana"
+ },
+ "message/vnd.si.simp": {
+ "source": "iana"
+ },
+ "message/vnd.wfa.wsc": {
+ "source": "iana"
+ },
+ "model/gltf+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "model/iges": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["igs","iges"]
+ },
+ "model/mesh": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["msh","mesh","silo"]
+ },
+ "model/vnd.collada+xml": {
+ "source": "iana",
+ "extensions": ["dae"]
+ },
+ "model/vnd.dwf": {
+ "source": "iana",
+ "extensions": ["dwf"]
+ },
+ "model/vnd.flatland.3dml": {
+ "source": "iana"
+ },
+ "model/vnd.gdl": {
+ "source": "iana",
+ "extensions": ["gdl"]
+ },
+ "model/vnd.gs-gdl": {
+ "source": "apache"
+ },
+ "model/vnd.gs.gdl": {
+ "source": "iana"
+ },
+ "model/vnd.gtw": {
+ "source": "iana",
+ "extensions": ["gtw"]
+ },
+ "model/vnd.moml+xml": {
+ "source": "iana"
+ },
+ "model/vnd.mts": {
+ "source": "iana",
+ "extensions": ["mts"]
+ },
+ "model/vnd.opengex": {
+ "source": "iana"
+ },
+ "model/vnd.parasolid.transmit.binary": {
+ "source": "iana"
+ },
+ "model/vnd.parasolid.transmit.text": {
+ "source": "iana"
+ },
+ "model/vnd.rosette.annotated-data-model": {
+ "source": "iana"
+ },
+ "model/vnd.valve.source.compiled-map": {
+ "source": "iana"
+ },
+ "model/vnd.vtu": {
+ "source": "iana",
+ "extensions": ["vtu"]
+ },
+ "model/vrml": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["wrl","vrml"]
+ },
+ "model/x3d+binary": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["x3db","x3dbz"]
+ },
+ "model/x3d+fastinfoset": {
+ "source": "iana"
+ },
+ "model/x3d+vrml": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["x3dv","x3dvz"]
+ },
+ "model/x3d+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["x3d","x3dz"]
+ },
+ "model/x3d-vrml": {
+ "source": "iana"
+ },
+ "multipart/alternative": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/appledouble": {
+ "source": "iana"
+ },
+ "multipart/byteranges": {
+ "source": "iana"
+ },
+ "multipart/digest": {
+ "source": "iana"
+ },
+ "multipart/encrypted": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/form-data": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/header-set": {
+ "source": "iana"
+ },
+ "multipart/mixed": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/parallel": {
+ "source": "iana"
+ },
+ "multipart/related": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/report": {
+ "source": "iana"
+ },
+ "multipart/signed": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/voice-message": {
+ "source": "iana"
+ },
+ "multipart/x-mixed-replace": {
+ "source": "iana"
+ },
+ "text/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "text/cache-manifest": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["appcache","manifest"]
+ },
+ "text/calendar": {
+ "source": "iana",
+ "extensions": ["ics","ifb"]
+ },
+ "text/calender": {
+ "compressible": true
+ },
+ "text/cmd": {
+ "compressible": true
+ },
+ "text/coffeescript": {
+ "extensions": ["coffee","litcoffee"]
+ },
+ "text/css": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["css"]
+ },
+ "text/csv": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["csv"]
+ },
+ "text/csv-schema": {
+ "source": "iana"
+ },
+ "text/directory": {
+ "source": "iana"
+ },
+ "text/dns": {
+ "source": "iana"
+ },
+ "text/ecmascript": {
+ "source": "iana"
+ },
+ "text/encaprtp": {
+ "source": "iana"
+ },
+ "text/enriched": {
+ "source": "iana"
+ },
+ "text/fwdred": {
+ "source": "iana"
+ },
+ "text/grammar-ref-list": {
+ "source": "iana"
+ },
+ "text/hjson": {
+ "extensions": ["hjson"]
+ },
+ "text/html": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["html","htm","shtml"]
+ },
+ "text/jade": {
+ "extensions": ["jade"]
+ },
+ "text/javascript": {
+ "source": "iana",
+ "compressible": true
+ },
+ "text/jcr-cnd": {
+ "source": "iana"
+ },
+ "text/jsx": {
+ "compressible": true,
+ "extensions": ["jsx"]
+ },
+ "text/less": {
+ "extensions": ["less"]
+ },
+ "text/markdown": {
+ "source": "iana"
+ },
+ "text/mathml": {
+ "source": "nginx",
+ "extensions": ["mml"]
+ },
+ "text/mizar": {
+ "source": "iana"
+ },
+ "text/n3": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["n3"]
+ },
+ "text/parameters": {
+ "source": "iana"
+ },
+ "text/parityfec": {
+ "source": "iana"
+ },
+ "text/plain": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["txt","text","conf","def","list","log","in","ini"]
+ },
+ "text/provenance-notation": {
+ "source": "iana"
+ },
+ "text/prs.fallenstein.rst": {
+ "source": "iana"
+ },
+ "text/prs.lines.tag": {
+ "source": "iana",
+ "extensions": ["dsc"]
+ },
+ "text/prs.prop.logic": {
+ "source": "iana"
+ },
+ "text/raptorfec": {
+ "source": "iana"
+ },
+ "text/red": {
+ "source": "iana"
+ },
+ "text/rfc822-headers": {
+ "source": "iana"
+ },
+ "text/richtext": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rtx"]
+ },
+ "text/rtf": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rtf"]
+ },
+ "text/rtp-enc-aescm128": {
+ "source": "iana"
+ },
+ "text/rtploopback": {
+ "source": "iana"
+ },
+ "text/rtx": {
+ "source": "iana"
+ },
+ "text/sgml": {
+ "source": "iana",
+ "extensions": ["sgml","sgm"]
+ },
+ "text/slim": {
+ "extensions": ["slim","slm"]
+ },
+ "text/stylus": {
+ "extensions": ["stylus","styl"]
+ },
+ "text/t140": {
+ "source": "iana"
+ },
+ "text/tab-separated-values": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["tsv"]
+ },
+ "text/troff": {
+ "source": "iana",
+ "extensions": ["t","tr","roff","man","me","ms"]
+ },
+ "text/turtle": {
+ "source": "iana",
+ "extensions": ["ttl"]
+ },
+ "text/ulpfec": {
+ "source": "iana"
+ },
+ "text/uri-list": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["uri","uris","urls"]
+ },
+ "text/vcard": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["vcard"]
+ },
+ "text/vnd.a": {
+ "source": "iana"
+ },
+ "text/vnd.abc": {
+ "source": "iana"
+ },
+ "text/vnd.ascii-art": {
+ "source": "iana"
+ },
+ "text/vnd.curl": {
+ "source": "iana",
+ "extensions": ["curl"]
+ },
+ "text/vnd.curl.dcurl": {
+ "source": "apache",
+ "extensions": ["dcurl"]
+ },
+ "text/vnd.curl.mcurl": {
+ "source": "apache",
+ "extensions": ["mcurl"]
+ },
+ "text/vnd.curl.scurl": {
+ "source": "apache",
+ "extensions": ["scurl"]
+ },
+ "text/vnd.debian.copyright": {
+ "source": "iana"
+ },
+ "text/vnd.dmclientscript": {
+ "source": "iana"
+ },
+ "text/vnd.dvb.subtitle": {
+ "source": "iana",
+ "extensions": ["sub"]
+ },
+ "text/vnd.esmertec.theme-descriptor": {
+ "source": "iana"
+ },
+ "text/vnd.fly": {
+ "source": "iana",
+ "extensions": ["fly"]
+ },
+ "text/vnd.fmi.flexstor": {
+ "source": "iana",
+ "extensions": ["flx"]
+ },
+ "text/vnd.graphviz": {
+ "source": "iana",
+ "extensions": ["gv"]
+ },
+ "text/vnd.in3d.3dml": {
+ "source": "iana",
+ "extensions": ["3dml"]
+ },
+ "text/vnd.in3d.spot": {
+ "source": "iana",
+ "extensions": ["spot"]
+ },
+ "text/vnd.iptc.newsml": {
+ "source": "iana"
+ },
+ "text/vnd.iptc.nitf": {
+ "source": "iana"
+ },
+ "text/vnd.latex-z": {
+ "source": "iana"
+ },
+ "text/vnd.motorola.reflex": {
+ "source": "iana"
+ },
+ "text/vnd.ms-mediapackage": {
+ "source": "iana"
+ },
+ "text/vnd.net2phone.commcenter.command": {
+ "source": "iana"
+ },
+ "text/vnd.radisys.msml-basic-layout": {
+ "source": "iana"
+ },
+ "text/vnd.si.uricatalogue": {
+ "source": "iana"
+ },
+ "text/vnd.sun.j2me.app-descriptor": {
+ "source": "iana",
+ "extensions": ["jad"]
+ },
+ "text/vnd.trolltech.linguist": {
+ "source": "iana"
+ },
+ "text/vnd.wap.si": {
+ "source": "iana"
+ },
+ "text/vnd.wap.sl": {
+ "source": "iana"
+ },
+ "text/vnd.wap.wml": {
+ "source": "iana",
+ "extensions": ["wml"]
+ },
+ "text/vnd.wap.wmlscript": {
+ "source": "iana",
+ "extensions": ["wmls"]
+ },
+ "text/vtt": {
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["vtt"]
+ },
+ "text/x-asm": {
+ "source": "apache",
+ "extensions": ["s","asm"]
+ },
+ "text/x-c": {
+ "source": "apache",
+ "extensions": ["c","cc","cxx","cpp","h","hh","dic"]
+ },
+ "text/x-component": {
+ "source": "nginx",
+ "extensions": ["htc"]
+ },
+ "text/x-fortran": {
+ "source": "apache",
+ "extensions": ["f","for","f77","f90"]
+ },
+ "text/x-gwt-rpc": {
+ "compressible": true
+ },
+ "text/x-handlebars-template": {
+ "extensions": ["hbs"]
+ },
+ "text/x-java-source": {
+ "source": "apache",
+ "extensions": ["java"]
+ },
+ "text/x-jquery-tmpl": {
+ "compressible": true
+ },
+ "text/x-lua": {
+ "extensions": ["lua"]
+ },
+ "text/x-markdown": {
+ "compressible": true,
+ "extensions": ["markdown","md","mkd"]
+ },
+ "text/x-nfo": {
+ "source": "apache",
+ "extensions": ["nfo"]
+ },
+ "text/x-opml": {
+ "source": "apache",
+ "extensions": ["opml"]
+ },
+ "text/x-pascal": {
+ "source": "apache",
+ "extensions": ["p","pas"]
+ },
+ "text/x-processing": {
+ "compressible": true,
+ "extensions": ["pde"]
+ },
+ "text/x-sass": {
+ "extensions": ["sass"]
+ },
+ "text/x-scss": {
+ "extensions": ["scss"]
+ },
+ "text/x-setext": {
+ "source": "apache",
+ "extensions": ["etx"]
+ },
+ "text/x-sfv": {
+ "source": "apache",
+ "extensions": ["sfv"]
+ },
+ "text/x-suse-ymp": {
+ "compressible": true,
+ "extensions": ["ymp"]
+ },
+ "text/x-uuencode": {
+ "source": "apache",
+ "extensions": ["uu"]
+ },
+ "text/x-vcalendar": {
+ "source": "apache",
+ "extensions": ["vcs"]
+ },
+ "text/x-vcard": {
+ "source": "apache",
+ "extensions": ["vcf"]
+ },
+ "text/xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xml"]
+ },
+ "text/xml-external-parsed-entity": {
+ "source": "iana"
+ },
+ "text/yaml": {
+ "extensions": ["yaml","yml"]
+ },
+ "video/1d-interleaved-parityfec": {
+ "source": "apache"
+ },
+ "video/3gpp": {
+ "source": "apache",
+ "extensions": ["3gp","3gpp"]
+ },
+ "video/3gpp-tt": {
+ "source": "apache"
+ },
+ "video/3gpp2": {
+ "source": "apache",
+ "extensions": ["3g2"]
+ },
+ "video/bmpeg": {
+ "source": "apache"
+ },
+ "video/bt656": {
+ "source": "apache"
+ },
+ "video/celb": {
+ "source": "apache"
+ },
+ "video/dv": {
+ "source": "apache"
+ },
+ "video/encaprtp": {
+ "source": "apache"
+ },
+ "video/h261": {
+ "source": "apache",
+ "extensions": ["h261"]
+ },
+ "video/h263": {
+ "source": "apache",
+ "extensions": ["h263"]
+ },
+ "video/h263-1998": {
+ "source": "apache"
+ },
+ "video/h263-2000": {
+ "source": "apache"
+ },
+ "video/h264": {
+ "source": "apache",
+ "extensions": ["h264"]
+ },
+ "video/h264-rcdo": {
+ "source": "apache"
+ },
+ "video/h264-svc": {
+ "source": "apache"
+ },
+ "video/h265": {
+ "source": "apache"
+ },
+ "video/iso.segment": {
+ "source": "apache"
+ },
+ "video/jpeg": {
+ "source": "apache",
+ "extensions": ["jpgv"]
+ },
+ "video/jpeg2000": {
+ "source": "apache"
+ },
+ "video/jpm": {
+ "source": "apache",
+ "extensions": ["jpm","jpgm"]
+ },
+ "video/mj2": {
+ "source": "apache",
+ "extensions": ["mj2","mjp2"]
+ },
+ "video/mp1s": {
+ "source": "apache"
+ },
+ "video/mp2p": {
+ "source": "apache"
+ },
+ "video/mp2t": {
+ "source": "apache",
+ "extensions": ["ts"]
+ },
+ "video/mp4": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["mp4","mp4v","mpg4"]
+ },
+ "video/mp4v-es": {
+ "source": "apache"
+ },
+ "video/mpeg": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["mpeg","mpg","mpe","m1v","m2v"]
+ },
+ "video/mpeg4-generic": {
+ "source": "apache"
+ },
+ "video/mpv": {
+ "source": "apache"
+ },
+ "video/nv": {
+ "source": "apache"
+ },
+ "video/ogg": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["ogv"]
+ },
+ "video/parityfec": {
+ "source": "apache"
+ },
+ "video/pointer": {
+ "source": "apache"
+ },
+ "video/quicktime": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["qt","mov"]
+ },
+ "video/raptorfec": {
+ "source": "apache"
+ },
+ "video/raw": {
+ "source": "apache"
+ },
+ "video/rtp-enc-aescm128": {
+ "source": "apache"
+ },
+ "video/rtploopback": {
+ "source": "apache"
+ },
+ "video/rtx": {
+ "source": "apache"
+ },
+ "video/smpte292m": {
+ "source": "apache"
+ },
+ "video/ulpfec": {
+ "source": "apache"
+ },
+ "video/vc1": {
+ "source": "apache"
+ },
+ "video/vnd.cctv": {
+ "source": "apache"
+ },
+ "video/vnd.dece.hd": {
+ "source": "apache",
+ "extensions": ["uvh","uvvh"]
+ },
+ "video/vnd.dece.mobile": {
+ "source": "apache",
+ "extensions": ["uvm","uvvm"]
+ },
+ "video/vnd.dece.mp4": {
+ "source": "apache"
+ },
+ "video/vnd.dece.pd": {
+ "source": "apache",
+ "extensions": ["uvp","uvvp"]
+ },
+ "video/vnd.dece.sd": {
+ "source": "apache",
+ "extensions": ["uvs","uvvs"]
+ },
+ "video/vnd.dece.video": {
+ "source": "apache",
+ "extensions": ["uvv","uvvv"]
+ },
+ "video/vnd.directv.mpeg": {
+ "source": "apache"
+ },
+ "video/vnd.directv.mpeg-tts": {
+ "source": "apache"
+ },
+ "video/vnd.dlna.mpeg-tts": {
+ "source": "apache"
+ },
+ "video/vnd.dvb.file": {
+ "source": "apache",
+ "extensions": ["dvb"]
+ },
+ "video/vnd.fvt": {
+ "source": "apache",
+ "extensions": ["fvt"]
+ },
+ "video/vnd.hns.video": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.1dparityfec-1010": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.1dparityfec-2005": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.2dparityfec-1010": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.2dparityfec-2005": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.ttsavc": {
+ "source": "apache"
+ },
+ "video/vnd.iptvforum.ttsmpeg2": {
+ "source": "apache"
+ },
+ "video/vnd.motorola.video": {
+ "source": "apache"
+ },
+ "video/vnd.motorola.videop": {
+ "source": "apache"
+ },
+ "video/vnd.mpegurl": {
+ "source": "apache",
+ "extensions": ["mxu","m4u"]
+ },
+ "video/vnd.ms-playready.media.pyv": {
+ "source": "apache",
+ "extensions": ["pyv"]
+ },
+ "video/vnd.nokia.interleaved-multimedia": {
+ "source": "apache"
+ },
+ "video/vnd.nokia.videovoip": {
+ "source": "apache"
+ },
+ "video/vnd.objectvideo": {
+ "source": "apache"
+ },
+ "video/vnd.radgamettools.bink": {
+ "source": "apache"
+ },
+ "video/vnd.radgamettools.smacker": {
+ "source": "apache"
+ },
+ "video/vnd.sealed.mpeg1": {
+ "source": "apache"
+ },
+ "video/vnd.sealed.mpeg4": {
+ "source": "apache"
+ },
+ "video/vnd.sealed.swf": {
+ "source": "apache"
+ },
+ "video/vnd.sealedmedia.softseal.mov": {
+ "source": "apache"
+ },
+ "video/vnd.uvvu.mp4": {
+ "source": "apache",
+ "extensions": ["uvu","uvvu"]
+ },
+ "video/vnd.vivo": {
+ "source": "apache",
+ "extensions": ["viv"]
+ },
+ "video/vp8": {
+ "source": "apache"
+ },
+ "video/webm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["webm"]
+ },
+ "video/x-f4v": {
+ "source": "apache",
+ "extensions": ["f4v"]
+ },
+ "video/x-fli": {
+ "source": "apache",
+ "extensions": ["fli"]
+ },
+ "video/x-flv": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["flv"]
+ },
+ "video/x-m4v": {
+ "source": "apache",
+ "extensions": ["m4v"]
+ },
+ "video/x-matroska": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["mkv","mk3d","mks"]
+ },
+ "video/x-mng": {
+ "source": "apache",
+ "extensions": ["mng"]
+ },
+ "video/x-ms-asf": {
+ "source": "apache",
+ "extensions": ["asf","asx"]
+ },
+ "video/x-ms-vob": {
+ "source": "apache",
+ "extensions": ["vob"]
+ },
+ "video/x-ms-wm": {
+ "source": "apache",
+ "extensions": ["wm"]
+ },
+ "video/x-ms-wmv": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["wmv"]
+ },
+ "video/x-ms-wmx": {
+ "source": "apache",
+ "extensions": ["wmx"]
+ },
+ "video/x-ms-wvx": {
+ "source": "apache",
+ "extensions": ["wvx"]
+ },
+ "video/x-msvideo": {
+ "source": "apache",
+ "extensions": ["avi"]
+ },
+ "video/x-sgi-movie": {
+ "source": "apache",
+ "extensions": ["movie"]
+ },
+ "video/x-smv": {
+ "source": "apache",
+ "extensions": ["smv"]
+ },
+ "x-conference/x-cooltalk": {
+ "source": "apache",
+ "extensions": ["ice"]
+ },
+ "x-shader/x-fragment": {
+ "compressible": true
+ },
+ "x-shader/x-vertex": {
+ "compressible": true
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/index.js
new file mode 100644
index 0000000..551031f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/index.js
@@ -0,0 +1,11 @@
+/*!
+ * mime-db
+ * Copyright(c) 2014 Jonathan Ong
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = require('./db.json')
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json
new file mode 100644
index 0000000..2976996
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json
@@ -0,0 +1,102 @@
+{
+ "name": "mime-db",
+ "description": "Media Type Database",
+ "version": "1.25.0",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ {
+ "name": "Robert Kieffer",
+ "email": "robert@broofa.com",
+ "url": "http://github.com/broofa"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "mime",
+ "db",
+ "type",
+ "types",
+ "database",
+ "charset",
+ "charsets"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/mime-db"
+ },
+ "devDependencies": {
+ "bluebird": "3.4.6",
+ "co": "4.6.0",
+ "cogent": "1.0.1",
+ "csv-parse": "1.1.7",
+ "eslint": "3.9.1",
+ "eslint-config-standard": "6.2.1",
+ "eslint-plugin-promise": "3.3.0",
+ "eslint-plugin-standard": "2.0.1",
+ "gnode": "0.1.2",
+ "istanbul": "0.4.5",
+ "mocha": "1.21.5",
+ "raw-body": "2.1.7",
+ "stream-to-array": "2.3.0"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "README.md",
+ "db.json",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "build": "node scripts/build",
+ "fetch": "gnode scripts/fetch-apache && gnode scripts/fetch-iana && gnode scripts/fetch-nginx",
+ "lint": "eslint .",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
+ "update": "npm run fetch && npm run build"
+ },
+ "gitHead": "9a2c710e347b4a7f030aae0d15afc0a06d1c8a37",
+ "bugs": {
+ "url": "https://github.com/jshttp/mime-db/issues"
+ },
+ "homepage": "https://github.com/jshttp/mime-db",
+ "_id": "mime-db@1.25.0",
+ "_shasum": "c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392",
+ "_from": "mime-db@>=1.25.0 <1.26.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392",
+ "tarball": "https://registry.npmjs.org/mime-db/-/mime-db-1.25.0.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/mime-db-1.25.0.tgz_1478915345127_0.22604371700435877"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.25.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/package.json
new file mode 100644
index 0000000..ab1a195
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/node_modules/mime-types/package.json
@@ -0,0 +1,92 @@
+{
+ "name": "mime-types",
+ "description": "The ultimate javascript content-type utility.",
+ "version": "2.1.13",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jeremiah Senkpiel",
+ "email": "fishrock123@rocketmail.com",
+ "url": "https://searchbeam.jit.su"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "license": "MIT",
+ "keywords": [
+ "mime",
+ "types"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/mime-types"
+ },
+ "dependencies": {
+ "mime-db": "~1.25.0"
+ },
+ "devDependencies": {
+ "eslint": "3.10.2",
+ "eslint-config-standard": "6.2.1",
+ "eslint-plugin-promise": "3.4.0",
+ "eslint-plugin-standard": "2.0.1",
+ "istanbul": "0.4.5",
+ "mocha": "1.21.5"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "lint": "eslint .",
+ "test": "mocha --reporter spec test/test.js",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot test/test.js"
+ },
+ "gitHead": "83e91a5aea93858bc95ec95a99309592cba0ffe3",
+ "bugs": {
+ "url": "https://github.com/jshttp/mime-types/issues"
+ },
+ "homepage": "https://github.com/jshttp/mime-types",
+ "_id": "mime-types@2.1.13",
+ "_shasum": "e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88",
+ "_from": "mime-types@>=2.1.13 <2.2.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88",
+ "tarball": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.13.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/mime-types-2.1.13.tgz_1479505166253_0.5666956284549087"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.13.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/package.json
new file mode 100644
index 0000000..460e44b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/type-is/package.json
@@ -0,0 +1,85 @@
+{
+ "name": "type-is",
+ "description": "Infer the content-type of a request.",
+ "version": "1.6.14",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/type-is"
+ },
+ "dependencies": {
+ "media-typer": "0.3.0",
+ "mime-types": "~2.1.13"
+ },
+ "devDependencies": {
+ "eslint": "2.10.2",
+ "eslint-config-standard": "5.3.1",
+ "eslint-plugin-promise": "1.1.0",
+ "eslint-plugin-standard": "1.3.2",
+ "istanbul": "0.4.5",
+ "mocha": "1.21.5"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "index.js"
+ ],
+ "scripts": {
+ "lint": "eslint .",
+ "test": "mocha --reporter spec --check-leaks --bail test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "keywords": [
+ "content",
+ "type",
+ "checking"
+ ],
+ "gitHead": "f88151e69d91c5ed42e29dea78f5566403a5a7ad",
+ "bugs": {
+ "url": "https://github.com/jshttp/type-is/issues"
+ },
+ "homepage": "https://github.com/jshttp/type-is",
+ "_id": "type-is@1.6.14",
+ "_shasum": "e219639c17ded1ca0789092dd54a03826b817cb2",
+ "_from": "type-is@>=1.6.13 <1.7.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e219639c17ded1ca0789092dd54a03826b817cb2",
+ "tarball": "https://registry.npmjs.org/type-is/-/type-is-1.6.14.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/type-is-1.6.14.tgz_1479517858770_0.4908413903322071"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.14.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/utils-merge/.travis.yml b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/utils-merge/.travis.yml
new file mode 100644
index 0000000..af92b02
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/utils-merge/.travis.yml
@@ -0,0 +1,6 @@
+language: "node_js"
+node_js:
+ - "0.4"
+ - "0.6"
+ - "0.8"
+ - "0.10"
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/utils-merge/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/utils-merge/LICENSE
new file mode 100644
index 0000000..e33bd10
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/utils-merge/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2013 Jared Hanson
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/utils-merge/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/utils-merge/README.md
new file mode 100644
index 0000000..2f94e9b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/utils-merge/README.md
@@ -0,0 +1,34 @@
+# utils-merge
+
+Merges the properties from a source object into a destination object.
+
+## Install
+
+ $ npm install utils-merge
+
+## Usage
+
+```javascript
+var a = { foo: 'bar' }
+ , b = { bar: 'baz' };
+
+merge(a, b);
+// => { foo: 'bar', bar: 'baz' }
+```
+
+## Tests
+
+ $ npm install
+ $ npm test
+
+[![Build Status](https://secure.travis-ci.org/jaredhanson/utils-merge.png)](http://travis-ci.org/jaredhanson/utils-merge)
+
+## Credits
+
+ - [Jared Hanson](http://github.com/jaredhanson)
+
+## License
+
+[The MIT License](http://opensource.org/licenses/MIT)
+
+Copyright (c) 2013 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/utils-merge/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/utils-merge/index.js
new file mode 100644
index 0000000..4265c69
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/utils-merge/index.js
@@ -0,0 +1,23 @@
+/**
+ * Merge object b with object a.
+ *
+ * var a = { foo: 'bar' }
+ * , b = { bar: 'baz' };
+ *
+ * merge(a, b);
+ * // => { foo: 'bar', bar: 'baz' }
+ *
+ * @param {Object} a
+ * @param {Object} b
+ * @return {Object}
+ * @api public
+ */
+
+exports = module.exports = function(a, b){
+ if (a && b) {
+ for (var key in b) {
+ a[key] = b[key];
+ }
+ }
+ return a;
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/utils-merge/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/utils-merge/package.json
new file mode 100644
index 0000000..402f068
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/utils-merge/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "utils-merge",
+ "version": "1.0.0",
+ "description": "merge() utility function",
+ "keywords": [
+ "util"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/jaredhanson/utils-merge.git"
+ },
+ "bugs": {
+ "url": "http://github.com/jaredhanson/utils-merge/issues"
+ },
+ "author": {
+ "name": "Jared Hanson",
+ "email": "jaredhanson@gmail.com",
+ "url": "http://www.jaredhanson.net/"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "http://www.opensource.org/licenses/MIT"
+ }
+ ],
+ "main": "./index",
+ "dependencies": {},
+ "devDependencies": {
+ "mocha": "1.x.x",
+ "chai": "1.x.x"
+ },
+ "scripts": {
+ "test": "node_modules/.bin/mocha --reporter spec --require test/bootstrap/node test/*.test.js"
+ },
+ "engines": {
+ "node": ">= 0.4.0"
+ },
+ "_id": "utils-merge@1.0.0",
+ "dist": {
+ "shasum": "0294fb922bb9375153541c4f7096231f287c8af8",
+ "tarball": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz"
+ },
+ "_from": "utils-merge@1.0.0",
+ "_npmVersion": "1.2.25",
+ "_npmUser": {
+ "name": "jaredhanson",
+ "email": "jaredhanson@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "jaredhanson",
+ "email": "jaredhanson@gmail.com"
+ }
+ ],
+ "directories": {},
+ "_shasum": "0294fb922bb9375153541c4f7096231f287c8af8",
+ "_resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/vary/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/vary/HISTORY.md
new file mode 100644
index 0000000..ed68118
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/vary/HISTORY.md
@@ -0,0 +1,29 @@
+1.1.0 / 2015-09-29
+==================
+
+ * Only accept valid field names in the `field` argument
+ - Ensures the resulting string is a valid HTTP header value
+
+1.0.1 / 2015-07-08
+==================
+
+ * Fix setting empty header from empty `field`
+ * perf: enable strict mode
+ * perf: remove argument reassignments
+
+1.0.0 / 2014-08-10
+==================
+
+ * Accept valid `Vary` header string as `field`
+ * Add `vary.append` for low-level string manipulation
+ * Move to `jshttp` orgainzation
+
+0.1.0 / 2014-06-05
+==================
+
+ * Support array of fields to set
+
+0.0.0 / 2014-06-04
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/vary/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/vary/LICENSE
new file mode 100644
index 0000000..142ede3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/vary/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2014-2015 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/vary/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/vary/README.md
new file mode 100644
index 0000000..5966542
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/vary/README.md
@@ -0,0 +1,91 @@
+# vary
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Manipulate the HTTP Vary header
+
+## Installation
+
+```sh
+$ npm install vary
+```
+
+## API
+
+```js
+var vary = require('vary')
+```
+
+### vary(res, field)
+
+Adds the given header `field` to the `Vary` response header of `res`.
+This can be a string of a single field, a string of a valid `Vary`
+header, or an array of multiple fields.
+
+This will append the header if not already listed, otherwise leaves
+it listed in the current location.
+
+```js
+// Append "Origin" to the Vary header of the response
+vary(res, 'Origin')
+```
+
+### vary.append(header, field)
+
+Adds the given header `field` to the `Vary` response header string `header`.
+This can be a string of a single field, a string of a valid `Vary` header,
+or an array of multiple fields.
+
+This will append the header if not already listed, otherwise leaves
+it listed in the current location. The new header string is returned.
+
+```js
+// Get header string appending "Origin" to "Accept, User-Agent"
+vary.append('Accept, User-Agent', 'Origin')
+```
+
+## Examples
+
+### Updating the Vary header when content is based on it
+
+```js
+var http = require('http')
+var vary = require('vary')
+
+http.createServer(function onRequest(req, res) {
+ // about to user-agent sniff
+ vary(res, 'User-Agent')
+
+ var ua = req.headers['user-agent'] || ''
+ var isMobile = /mobi|android|touch|mini/i.test(ua)
+
+ // serve site, depending on isMobile
+ res.setHeader('Content-Type', 'text/html')
+ res.end('You are (probably) ' + (isMobile ? '' : 'not ') + 'a mobile user')
+})
+```
+
+## Testing
+
+```sh
+$ npm test
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/vary.svg
+[npm-url]: https://npmjs.org/package/vary
+[node-version-image]: https://img.shields.io/node/v/vary.svg
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/vary/master.svg
+[travis-url]: https://travis-ci.org/jshttp/vary
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/vary/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/vary
+[downloads-image]: https://img.shields.io/npm/dm/vary.svg
+[downloads-url]: https://npmjs.org/package/vary
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/vary/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/vary/index.js
new file mode 100644
index 0000000..21dbaf1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/vary/index.js
@@ -0,0 +1,124 @@
+/*!
+ * vary
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict';
+
+/**
+ * Module exports.
+ */
+
+module.exports = vary;
+module.exports.append = append;
+
+/**
+ * RegExp to match field-name in RFC 7230 sec 3.2
+ *
+ * field-name = token
+ * token = 1*tchar
+ * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
+ * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
+ * / DIGIT / ALPHA
+ * ; any VCHAR, except delimiters
+ */
+
+var fieldNameRegExp = /^[!#$%&'\*\+\-\.\^_`\|~0-9A-Za-z]+$/
+
+/**
+ * Append a field to a vary header.
+ *
+ * @param {String} header
+ * @param {String|Array} field
+ * @return {String}
+ * @api public
+ */
+
+function append(header, field) {
+ if (typeof header !== 'string') {
+ throw new TypeError('header argument is required');
+ }
+
+ if (!field) {
+ throw new TypeError('field argument is required');
+ }
+
+ // get fields array
+ var fields = !Array.isArray(field)
+ ? parse(String(field))
+ : field;
+
+ // assert on invalid field names
+ for (var i = 0; i < fields.length; i++) {
+ if (!fieldNameRegExp.test(fields[i])) {
+ throw new TypeError('field argument contains an invalid header name');
+ }
+ }
+
+ // existing, unspecified vary
+ if (header === '*') {
+ return header;
+ }
+
+ // enumerate current values
+ var val = header;
+ var vals = parse(header.toLowerCase());
+
+ // unspecified vary
+ if (fields.indexOf('*') !== -1 || vals.indexOf('*') !== -1) {
+ return '*';
+ }
+
+ for (var i = 0; i < fields.length; i++) {
+ var fld = fields[i].toLowerCase();
+
+ // append value (case-preserving)
+ if (vals.indexOf(fld) === -1) {
+ vals.push(fld);
+ val = val
+ ? val + ', ' + fields[i]
+ : fields[i];
+ }
+ }
+
+ return val;
+}
+
+/**
+ * Parse a vary header into an array.
+ *
+ * @param {String} header
+ * @return {Array}
+ * @api private
+ */
+
+function parse(header) {
+ return header.trim().split(/ *, */);
+}
+
+/**
+ * Mark that a request is varied on a header field.
+ *
+ * @param {Object} res
+ * @param {String|Array} field
+ * @api public
+ */
+
+function vary(res, field) {
+ if (!res || !res.getHeader || !res.setHeader) {
+ // quack quack
+ throw new TypeError('res argument is required');
+ }
+
+ // get existing header
+ var val = res.getHeader('Vary') || ''
+ var header = Array.isArray(val)
+ ? val.join(', ')
+ : String(val);
+
+ // set new header
+ if ((val = append(header, field))) {
+ res.setHeader('Vary', val);
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/vary/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/vary/package.json
new file mode 100644
index 0000000..705d79f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/node_modules/vary/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "vary",
+ "description": "Manipulate the HTTP Vary header",
+ "version": "1.1.0",
+ "author": {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "license": "MIT",
+ "keywords": [
+ "http",
+ "res",
+ "vary"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jshttp/vary"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.21",
+ "mocha": "2.3.3",
+ "supertest": "1.1.0"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "README.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "gitHead": "13b03e9bf97da9d83bfeac84d84144137d84c257",
+ "bugs": {
+ "url": "https://github.com/jshttp/vary/issues"
+ },
+ "homepage": "https://github.com/jshttp/vary",
+ "_id": "vary@1.1.0",
+ "_shasum": "e1e5affbbd16ae768dd2674394b9ad3022653140",
+ "_from": "vary@>=1.1.0 <1.2.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "fishrock123",
+ "email": "fishrock123@rocketmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "e1e5affbbd16ae768dd2674394b9ad3022653140",
+ "tarball": "https://registry.npmjs.org/vary/-/vary-1.1.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/vary/-/vary-1.1.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/express/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/express/package.json
new file mode 100644
index 0000000..4633a1e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/express/package.json
@@ -0,0 +1,159 @@
+{
+ "name": "express",
+ "description": "Fast, unopinionated, minimalist web framework",
+ "version": "4.14.0",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "contributors": [
+ {
+ "name": "Aaron Heckmann",
+ "email": "aaron.heckmann+github@gmail.com"
+ },
+ {
+ "name": "Ciaran Jessup",
+ "email": "ciaranj@gmail.com"
+ },
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Guillermo Rauch",
+ "email": "rauchg@gmail.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com"
+ },
+ {
+ "name": "Roman Shtylman",
+ "email": "shtylman+expressjs@gmail.com"
+ },
+ {
+ "name": "Young Jae Sim",
+ "email": "hanul@hanul.me"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/expressjs/express"
+ },
+ "homepage": "http://expressjs.com/",
+ "keywords": [
+ "express",
+ "framework",
+ "sinatra",
+ "web",
+ "rest",
+ "restful",
+ "router",
+ "app",
+ "api"
+ ],
+ "dependencies": {
+ "accepts": "~1.3.3",
+ "array-flatten": "1.1.1",
+ "content-disposition": "0.5.1",
+ "content-type": "~1.0.2",
+ "cookie": "0.3.1",
+ "cookie-signature": "1.0.6",
+ "debug": "~2.2.0",
+ "depd": "~1.1.0",
+ "encodeurl": "~1.0.1",
+ "escape-html": "~1.0.3",
+ "etag": "~1.7.0",
+ "finalhandler": "0.5.0",
+ "fresh": "0.3.0",
+ "merge-descriptors": "1.0.1",
+ "methods": "~1.1.2",
+ "on-finished": "~2.3.0",
+ "parseurl": "~1.3.1",
+ "path-to-regexp": "0.1.7",
+ "proxy-addr": "~1.1.2",
+ "qs": "6.2.0",
+ "range-parser": "~1.2.0",
+ "send": "0.14.1",
+ "serve-static": "~1.11.1",
+ "type-is": "~1.6.13",
+ "utils-merge": "1.0.0",
+ "vary": "~1.1.0"
+ },
+ "devDependencies": {
+ "after": "0.8.1",
+ "body-parser": "~1.15.1",
+ "cookie-parser": "~1.4.3",
+ "ejs": "2.4.2",
+ "istanbul": "0.4.3",
+ "marked": "0.3.5",
+ "method-override": "~2.3.6",
+ "mocha": "2.5.3",
+ "morgan": "~1.7.0",
+ "should": "9.0.2",
+ "supertest": "1.2.0",
+ "connect-redis": "~2.4.1",
+ "cookie-session": "~1.2.0",
+ "express-session": "~1.13.0",
+ "jade": "~1.11.0",
+ "multiparty": "~4.1.2",
+ "vhost": "~3.0.2"
+ },
+ "engines": {
+ "node": ">= 0.10.0"
+ },
+ "files": [
+ "LICENSE",
+ "History.md",
+ "Readme.md",
+ "index.js",
+ "lib/"
+ ],
+ "scripts": {
+ "test": "mocha --require test/support/env --reporter spec --bail --check-leaks test/ test/acceptance/",
+ "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --require test/support/env --reporter spec --check-leaks test/ test/acceptance/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --require test/support/env --reporter dot --check-leaks test/ test/acceptance/",
+ "test-tap": "mocha --require test/support/env --reporter tap --check-leaks test/ test/acceptance/"
+ },
+ "gitHead": "9375a9afa9d7baa814b454c7a6818a7471aaef00",
+ "bugs": {
+ "url": "https://github.com/expressjs/express/issues"
+ },
+ "_id": "express@4.14.0",
+ "_shasum": "c1ee3f42cdc891fb3dc650a8922d51ec847d0d66",
+ "_from": "express@latest",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "hacksparrow",
+ "email": "captain@hacksparrow.com"
+ },
+ {
+ "name": "jasnell",
+ "email": "jasnell@gmail.com"
+ },
+ {
+ "name": "mikeal",
+ "email": "mikeal.rogers@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "c1ee3f42cdc891fb3dc650a8922d51ec847d0d66",
+ "tarball": "https://registry.npmjs.org/express/-/express-4.14.0.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/express-4.14.0.tgz_1466095407850_0.17484632693231106"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/express/-/express-4.14.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/.coveralls.yml b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/.coveralls.yml
new file mode 100644
index 0000000..ad1e93c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/.coveralls.yml
@@ -0,0 +1 @@
+repo_token: GZFmqKPy7XEX0uOl9TDZFUoOQ5AHADMkU
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/.eslintrc b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/.eslintrc
new file mode 100644
index 0000000..753e2a5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/.eslintrc
@@ -0,0 +1,15 @@
+{
+ "extends": ["eslint:recommended"],
+ "env": {
+ "node": true,
+ "mocha": true
+ },
+ "ecmaFeatures": {
+ "es6": true,
+ },
+ "plugins": [
+ ],
+ "rules": {
+ "no-console":0
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/HISTORY.md
new file mode 100644
index 0000000..4b45e19
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/HISTORY.md
@@ -0,0 +1,1593 @@
+2.2.16 2016-12-13
+-----------------
+* NODE-899 reversed upsertedId change to bring back old behavior.
+
+2.2.15 2016-12-10
+-----------------
+* Updated mongodb-core to 2.1.2.
+ * Delay topologyMonitoring on successful attemptReconnect as no need to run a full scan immediately.
+ * Emit reconnect event in primary joining when in connected status for a replicaset (Fixes mongoose reconnect issue).
+
+2.2.14 2016-12-08
+-----------------
+* Updated mongodb-core to 2.1.1.
+* NODE-892 Passthrough options.readPreference to mongodb-core ReplSet instance.
+
+2.2.13 2016-12-05
+-----------------
+* Updated mongodb-core to 2.1.0.
+* NODE-889 Fixed issue where legacy killcursor wire protocol messages would not be sent when APM is enabled.
+* Expose parserType as property on topology objects.
+
+2.2.12 2016-11-29
+-----------------
+* Updated mongodb-core to 2.0.14.
+ * Updated bson library to 0.5.7.
+ * Dont leak connection.workItems elments when killCursor is called (Issue #150, https://github.com/mdlavin).
+ * Remove unnecessary errors formatting (Issue #149, https://github.com/akryvomaz).
+ * Only check isConnected against availableConnections (Issue #142).
+ * NODE-838 Provide better error message on failed to connect on first retry for Mongos topology.
+ * Set default servername to host is not passed through for sni.
+ * Made monitoring happen on exclusive connection and using connectionTimeout to handle the wait time before failure (Issue #148).
+ * NODE-859 Make minimum value of maxStalenessSeconds 90 seconds.
+ * NODE-852 Fix Kerberos module deprecations on linux and windows and release new kerberos version.
+ * NODE-850 Update Max Staleness implementation.
+ * NODE-849 username no longer required for MONGODB-X509 auth.
+ * NODE-848 BSON Regex flags must be alphabetically ordered.
+ * NODE-846 Create notice for all third party libraries.
+ * NODE-843 Executing bulk operations overwrites write concern parameter.
+ * NODE-842 Re-sync SDAM and SDAM Monitoring tests from Specs repo.
+ * NODE-840 Resync CRUD spec tests.
+ * Unescapable while(true) loop (Issue #152).
+* NODE-864 close event not emits during network issues using single server topology.
+* Introduced maxStalenessSeconds.
+* NODE-840 Added CRUD specification test cases and fix minor issues with upserts reporting matchedCount > 0.
+* Don't ignore Db-level authSource when using auth method. (https://github.com/donaldguy).
+
+2.2.11 2016-10-21
+-----------------
+* Updated mongodb-core to 2.0.13.
+ - Fire callback when topology was destroyed (Issue #147, https://github.com/vkarpov15).
+ - Refactoring to support pipelining ala 1.4.x branch will retaining the benefits of the growing/shrinking pool (Issue #146).
+ - Fix typo in serverHeartbeatFailed event name (Issue #143, https://github.com/jakesjews).
+ - NODE-798 Driver hangs on count command in replica set with one member (Issue #141, https://github.com/isayme).
+* Updated bson library to 0.5.6.
+ - Included cyclic dependency detection
+* Fix typo in serverHeartbeatFailed event name (Issue #1418, https://github.com/jakesjews).
+* NODE-824, readPreference "nearest" does not work when specified at collection level.
+* NODE-822, GridFSBucketWriteStream end method does not handle optional parameters.
+* NODE-823, GridFSBucketWriteStream end: callback is invoked with invalid parameters.
+* NODE-829, Using Start/End offset option in GridFSBucketReadStream doesn't return the right sized buffer.
+
+2.2.10 2016-09-15
+-----------------
+* Updated mongodb-core to 2.0.12.
+* fix debug logging message not printing server name.
+* fixed application metadata being sent by wrong ismaster.
+* NODE-812 Fixed mongos stall due to proxy monitoring ismaster failure causing reconnect.
+* NODE-818 Replicaset timeouts in initial connect sequence can "no primary found".
+* Updated bson library to 0.5.5.
+* Added DBPointer up conversion to DBRef.
+* MongoDB 3.4-RC Pass **appname** through MongoClient.connect uri or options to allow metadata to be passed.
+* MongoDB 3.4-RC Pass collation options on update, findOne, find, createIndex, aggregate.
+* MongoDB 3.4-RC Allow write concerns to be passed to all supporting server commands.
+* MongoDB 3.4-RC Allow passing of **servername** as SSL options to support SNI.
+
+2.2.9 2016-08-29
+----------------
+* Updated mongodb-core to 2.0.11.
+* NODE-803, Fixed issue in how the latency window is calculated for Mongos topology causing issues for single proxy connections.
+* Avoid timeout in attemptReconnect causing multiple attemptReconnect attempts to happen (Issue #134, https://github.com/dead-horse).
+* Ensure promoteBuffers is propegated in same fashion as promoteValues and promoteLongs.
+* Don't treat ObjectId as object for mapReduce scope (Issue #1397, https://github.com/vkarpov15).
+
+2.2.8 2016-08-23
+----------------
+* Updated mongodb-core to 2.0.10.
+* Added promoteValues flag (default to true) to allow user to specify they only want wrapped BSON values back instead of promotion to native types.
+* Do not close mongos proxy connection on failed ismaster check in ha process (Issue #130).
+
+2.2.7 2016-08-19
+----------------
+* If only a single mongos is provided in the seedlist, fix issue where it would be assigned as single standalone server instead of mongos topology (Issue #130).
+* Updated mongodb-core to 2.0.9.
+* Allow promoteLongs to be passed in through Response.parse method and overrides default set on the connection.
+* NODE-798 Driver hangs on count command in replica set with one member.
+* Allow promoteLongs to be passed in through Response.parse method and overrides default set on the connection.
+* Allow passing in servername for TLS connections for SNI support.
+
+2.2.6 2016-08-16
+----------------
+* Updated mongodb-core to 2.0.8.
+* Allow execution of store operations independent of having both a primary and secondary available (Issue #123).
+* Fixed command execution issue for mongos to ensure buffering of commands when no mongos available.
+* Allow passing in an array of tags to ReadPreference constructor (Issue #1382, https://github.com/vkarpov15)
+* Added hashed connection names and fullResult.
+* Updated bson library to 0.5.3.
+* Enable maxTimeMS in count, distinct, findAndModify.
+
+2.2.5 2016-07-28
+----------------
+* Updated mongodb-core to 2.0.7.
+* Allow primary to be returned when secondaryPreferred is passed (Issue #117, https://github.com/dhendo).
+* Added better warnings when passing in illegal seed list members to a Mongos topology.
+* Minor attemptReconnect bug that would cause multiple attemptReconnect to run in parallel.
+* Fix wrong opType passed to disconnectHandler.add (Issue #121, https://github.com/adrian-gierakowski)
+* Implemented domain backward comp support enabled via domainsEnabled options on Server/ReplSet/Mongos and MongoClient.connect.
+
+2.2.4 2016-07-19
+----------------
+* NPM corrupted upload fix.
+
+2.2.3 2016-07-19
+----------------
+* Updated mongodb-core to 2.0.6.
+* Destroy connection on socket timeout due to newer node versions not closing the socket.
+
+2.2.2 2016-07-15
+----------------
+* Updated mongodb-core to 2.0.5.
+* Minor fixes to handle faster MongoClient connectivity from the driver, allowing single server instances to detect if they are a proxy.
+* Added numberOfConsecutiveTimeouts to pool that will destroy the pool if the number of consecutive timeouts > reconnectTries.
+* Print warning if seedlist servers host name does not match the one provided in it's ismaster.me field for Replicaset members.
+* Fix issue where Replicaset connection would not succeeed if there the replicaset was a single primary server setup.
+
+2.2.1 2016-07-11
+----------------
+* Updated mongodb-core to 2.0.4.
+* handle situation where user is providing seedlist names that do not match host list. fix allows for a single full discovery connection sweep before erroring out.
+* NODE-747 Polyfill for Object.assign for 0.12.x or 0.10.x.
+* NODE-746 Improves replicaset errors for wrong setName.
+
+2.2.0 2016-07-05
+----------------
+* Updated mongodb-core to 2.0.3.
+* Moved all authentication and handling of growing/shrinking of pool connections into actual pool.
+* All authentication methods now handle both auth/reauthenticate and logout events.
+* Introduced logout method to get rid of onAll option for logout command.
+* Updated bson to 0.5.0 that includes Decimal128 support.
+* Fixed logger error serialization issue.
+* Documentation fixes.
+* Implemented Server Selection Specification test suite.
+* Added warning level to logger.
+* Added warning message when sockeTimeout < haInterval for Replset/Mongos.
+* Mongos emits close event on no proxies available or when reconnect attempt fails.
+* Replset emits close event when no servers available or when attemptReconnect fails to reconnect.
+* Don't throw in auth methods but return error in callback.
+
+2.1.21 2016-05-30
+-----------------
+* Updated mongodb-core to 1.3.21.
+* Pool gets stuck if a connection marked for immediateRelease times out (Issue #99, https://github.com/nbrachet).
+* Make authentication process retry up to authenticationRetries at authenticationRetryIntervalMS interval.
+* Made ismaster replicaset calls operate with connectTimeout or monitorSocketTimeout to lower impact of big socketTimeouts on monitoring performance.
+* Make sure connections mark as "immediateRelease" don't linger the inUserConnections list. Otherwise, after that connection times out, getAll() incorrectly returns more connections than are effectively present, causing the pool to not get restarted by reconnectServer. (Issue #99, https://github.com/nbrachet).
+* Make cursor getMore or killCursor correctly trigger pool reconnect to single server if pool has not been destroyed.
+* Make ismaster monitoring for single server connection default to avoid user confusion due to change in behavior.
+
+2.1.20 2016-05-25
+-----------------
+* Refactored MongoClient options handling to simplify the logic, unifying it.
+* NODE-707 Implemented openUploadStreamWithId on GridFS to allow for custom fileIds so users are able to customize shard key and shard distribution.
+* NODE-710 Allow setting driver loggerLevel and logger function from MongoClient options.
+* Updated mongodb-core to 1.3.20.
+* Minor fix for SSL errors on connection attempts, minor fix to reconnect handler for the server.
+* Don't write to socket before having registered the callback for commands, work around for windows issuing error events twice on node.js when socket gets destroyed by firewall.
+* Fix minor issue where connectingServers would not be removed correctly causing single server connections to not auto-reconnect.
+
+2.1.19 2016-05-17
+----------------
+* Handle situation where a server connection in a replicaset sometimes fails to be destroyed properly due to being in the middle of authentication when the destroy method is called on the replicaset causing it to be orphaned and never collected.
+* Ensure replicaset topology destroy is never called by SDAM.
+* Ensure all paths are correctly returned on inspectServer in replset.
+* Updated mongodb-core to 1.3.19 to fix minor connectivity issue on quick open/close of MongoClient connections on auth enabled mongodb Replicasets.
+
+2.1.18 2016-04-27
+-----------------
+* Updated mongodb-core to 1.3.18 to fix Node 6.0 issues.
+
+2.1.17 2016-04-26
+-----------------
+* Updated mongodb-core to 1.3.16 to work around issue with early versions of node 0.10.x due to missing unref method on ClearText streams.
+* INT-1308: Allow listIndexes to inherit readPreference from Collection or DB.
+* Fix timeout issue using new flags #1361.
+* Updated mongodb-core to 1.3.17.
+* Better handling of unique createIndex error.
+* Emit error only if db instance has an error listener.
+* DEFAULT authMechanism; don't throw error if explicitly set by user.
+
+2.1.16 2016-04-06
+-----------------
+* Updated mongodb-core to 1.3.16.
+
+2.1.15 2016-04-06
+-----------------
+* Updated mongodb-core to 1.3.15.
+* Set ssl, sslValidate etc to mongosOptions on url_parser (Issue #1352, https://github.com/rubenstolk).
+- NODE-687 Fixed issue where a server object failed to be destroyed if the replicaset state did not update successfully. This could leave active connections accumulating over time.
+- Fixed some situations where all connections are flushed due to a single connection in the connection pool closing.
+
+2.1.14 2016-03-29
+-----------------
+* Updated mongodb-core to 1.3.13.
+* Handle missing cursor on getMore when going through a mongos proxy by pinning to socket connection and not server.
+
+2.1.13 2016-03-29
+-----------------
+* Updated mongodb-core to 1.3.12.
+
+2.1.12 2016-03-29
+-----------------
+* Updated mongodb-core to 1.3.11.
+* Mongos setting acceptableLatencyMS exposed to control the latency women for mongos selection.
+* Mongos pickProxies fall back to closest mongos if no proxies meet latency window specified.
+* isConnected method for mongos uses same selection code as getServer.
+* Exceptions in cursor getServer trapped and correctly delegated to high level handler.
+
+2.1.11 2016-03-23
+-----------------
+* Updated mongodb-core to 1.3.10.
+* Introducing simplified connections settings.
+
+2.1.10 2016-03-21
+-----------------
+* Updated mongodb-core to 1.3.9.
+* Fixing issue that prevented mapReduce stats from being resolved (Issue #1351, https://github.com/davidgtonge)
+* Forwards SDAM monitoring events from mongodb-core.
+
+2.1.9 2016-03-16
+----------------
+* Updated mongodb-core to 1.3.7 to fix intermittent race condition that causes some users to experience big amounts of socket connections.
+* Makde bson parser in ordered/unordered bulk be directly from mongodb-core to avoid intermittent null error on mongoose.
+
+2.1.8 2016-03-14
+----------------
+* Updated mongodb-core to 1.3.5.
+* NODE-660 TypeError: Cannot read property 'noRelease' of undefined.
+* Harden MessageHandler in server.js to avoid issues where we cannot find a callback for an operation.
+* Ensure RequestId can never be larger than Max Number integer size.
+* NODE-661 typo in url_parser.js resulting in replSetServerOptions is not defined when connecting over ssl.
+* Confusing error with invalid partial index filter (Issue #1341, https://github.com/vkarpov15).
+* NODE-669 Should only error out promise for bulkWrite when error is a driver level error not a write error or write concern error.
+* NODE-662 shallow copy options on methods that are not currently doing it to avoid passed in options mutiation.
+* NODE-663 added lookup helper on aggregation cursor.
+* NODE-585 Result object specified incorrectly for findAndModify?.
+* NODE-666 harden validation for findAndModify CRUD methods.
+
+2.1.7 2016-02-09
+----------------
+* NODE-656 fixed corner case where cursor count command could be left without a connection available.
+* NODE-658 Work around issue that bufferMaxEntries:-1 for js gets interpreted wrongly due to double nature of Javascript numbers.
+* Fix: GridFS always returns the oldest version due to incorrect field name (Issue #1338, https://github.com/mdebruijne).
+* NODE-655 GridFS stream support for cancelling upload streams and download streams (Issue #1339, https://github.com/vkarpov15).
+* NODE-657 insertOne don`t return promise in some cases.
+* Added destroy alias for abort function on GridFSBucketWriteStream.
+
+2.1.6 2016-02-05
+----------------
+* Updated mongodb-core to 1.3.1.
+
+2.1.5 2016-02-04
+----------------
+* Updated mongodb-core to 1.3.0.
+* Added raw support for the command function on topologies.
+* Fixed issue where raw results that fell on batchSize boundaries failed (Issue #72)
+* Copy over all the properties to the callback returned from bindToDomain, (Issue #72)
+* Added connection hash id to be able to reference connection host/name without leaking it outside of driver.
+* NODE-638, Cannot authenticate database user with utf-8 password.
+* Refactored pool to be worker queue based, minimizing the impact a slow query have on throughput as long as # slow queries < # connections in the pool.
+* Pool now grows and shrinks correctly depending on demand not causing a full pool reconnect.
+* Improvements in monitoring of a Replicaset where in certain situations the inquiry process could get exited.
+* Switched to using Array.push instead of concat for use cases of a lot of documents.
+* Fixed issue where re-authentication could loose the credentials if whole Replicaset disconnected at once.
+* Added peer optional dependencies support using require_optional module.
+* Bug is listCollections for collection names that start with db name (Issue #1333, https://github.com/flyingfisher)
+* Emit error before closing stream (Issue #1335, https://github.com/eagleeye)
+
+2.1.4 2016-01-12
+----------------
+* Restricted node engine to >0.10.3 (https://jira.mongodb.org/browse/NODE-635).
+* Multiple database names ignored without a warning (https://jira.mongodb.org/browse/NODE-636, Issue #1324, https://github.com/yousefhamza).
+* Convert custom readPreference objects in collection.js (Issue #1326, https://github.com/Machyne).
+
+2.1.3 2016-01-04
+----------------
+* Updated mongodb-core to 1.2.31.
+* Allow connection to secondary if primaryPreferred or secondaryPreferred (Issue #70, https://github.com/leichter)
+
+2.1.2 2015-12-23
+----------------
+* Updated mongodb-core to 1.2.30.
+* Pool allocates size + 1 connections when using replicasets, reserving additional pool connection for monitoring exclusively.
+* Fixes bug when all replicaset members are down, that would cause it to fail to reconnect using the originally provided seedlist.
+
+2.1.1 2015-12-13
+----------------
+* Surfaced checkServerIdentity options for MongoClient, Server, ReplSet and Mongos to allow for control of the checkServerIdentity method available in Node.s 0.12.x or higher.
+* Added readPreference support to listCollections and listIndexes helpers.
+* Updated mongodb-core to 1.2.28.
+
+2.1.0 2015-12-06
+----------------
+* Implements the connection string specification, https://github.com/mongodb/specifications/blob/master/source/connection-string/connection-string-spec.rst.
+* Implements the new GridFS specification, https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.rst.
+* Full MongoDB 3.2 support.
+* NODE-601 Added maxAwaitTimeMS support for 3.2 getMore to allow for custom timeouts on tailable cursors.
+* Updated mongodb-core to 1.2.26.
+* Return destination in GridStore pipe function.
+* NODE-606 better error handling on destroyed topology for db.js methods.
+* Added isDestroyed method to server, replset and mongos topologies.
+* Upgraded test suite to run using mongodb-topology-manager.
+
+2.0.53 2015-12-23
+-----------------
+* Updated mongodb-core to 1.2.30.
+* Pool allocates size + 1 connections when using replicasets, reserving additional pool connection for monitoring exclusively.
+* Fixes bug when all replicaset members are down, that would cause it to fail to reconnect using the originally provided seedlist.
+
+2.0.52 2015-12-14
+-----------------
+* removed remove from Gridstore.close.
+
+2.0.51 2015-12-13
+-----------------
+* Surfaced checkServerIdentity options for MongoClient, Server, ReplSet and Mongos to allow for control of the checkServerIdentity method available in Node.s 0.12.x or higher.
+* Added readPreference support to listCollections and listIndexes helpers.
+* Updated mongodb-core to 1.2.28.
+
+2.0.50 2015-12-06
+-----------------
+* Updated mongodb-core to 1.2.26.
+
+2.0.49 2015-11-20
+-----------------
+* Updated mongodb-core to 1.2.24 with several fixes.
+ * Fix Automattic/mongoose#3481; flush callbacks on error, (Issue #57, https://github.com/vkarpov15).
+ * $explain query for wire protocol 2.6 and 2.4 does not set number of returned documents to -1 but to 0.
+ * ismaster runs against admin.$cmd instead of system.$cmd.
+ * Fixes to handle getMore command errors for MongoDB 3.2
+ * Allows the process to properly close upon a Db.close() call on the replica set by shutting down the haTimer and closing arbiter connections.
+
+2.0.48 2015-11-07
+-----------------
+* GridFS no longer performs any deletes when writing a brand new file that does not have any previous <db>.fs.chunks or <db>.fs.files documents.
+* Updated mongodb-core to 1.2.21.
+* Hardened the checking for replicaset equality checks.
+* OpReplay flag correctly set on Wire protocol query.
+* Mongos load balancing added, introduced localThresholdMS to control the feature.
+* Kerberos now a peerDependency, making it not install it by default in Node 5.0 or higher.
+
+2.0.47 2015-10-28
+-----------------
+* Updated mongodb-core to 1.2.20.
+* Fixed bug in arbiter connection capping code.
+* NODE-599 correctly handle arrays of server tags in order of priority.
+* Fix for 2.6 wire protocol handler related to readPreference handling.
+* Added maxAwaitTimeMS support for 3.2 getMore to allow for custom timeouts on tailable cursors.
+* Make CoreCursor check for $err before saying that 'next' succeeded (Issue #53, https://github.com/vkarpov15).
+
+2.0.46 2015-10-15
+-----------------
+* Updated mongodb-core to 1.2.19.
+* NODE-578 Order of sort fields is lost for numeric field names.
+* Expose BSON Map (ES6 Map or polyfill).
+* Minor fixes for APM support to pass extended APM test suite.
+
+2.0.45 2015-09-30
+-----------------
+* NODE-566 Fix issue with rewind on capped collections causing cursor state to be reset on connection loss.
+
+2.0.44 2015-09-28
+-----------------
+* Bug fixes for APM upconverting of legacy INSERT/UPDATE/REMOVE wire protocol messages.
+* NODE-562, fixed issue where a Replicaset MongoDB URI with a single seed and replSet name set would cause a single direct connection instead of topology discovery.
+* Updated mongodb-core to 1.2.14.
+* NODE-563 Introduced options.ignoreUndefined for db class and MongoClient db options, made serialize undefined to null default again but allowing for overrides on insert/update/delete operations.
+* Use handleCallback if result is an error for count queries. (Issue #1298, https://github.com/agclever)
+* Rewind cursor to correctly force reconnect on capped collections when first query comes back empty.
+* NODE-571 added code 59 to legacy server errors when SCRAM-SHA-1 mechanism fails.
+* NODE-572 Remove examples that use the second parameter to `find()`.
+
+2.0.43 2015-09-14
+-----------------
+* Propagate timeout event correctly to db instances.
+* Application Monitoring API (APM) implemented.
+* NOT providing replSet name in MongoClient connection URI will force single server connection. Fixes issue where it was impossible to directly connect to a replicaset member server.
+* Updated mongodb-core to 1.2.12.
+* NODE-541 Initial Support "read committed" isolation level where "committed" means confimed by the voting majority of a replica set.
+* GridStore doesn't share readPreference setting from connection string. (Issue #1295, https://github.com/zhangyaoxing)
+* fixed forceServerObjectId calls (Issue #1292, https://github.com/d-mon-)
+* Pass promise library through to DB function (Issue #1294, https://github.com/RovingCodeMonkey)
+
+2.0.42 2015-08-18
+-----------------
+* Added test case to exercise all non-crud methods on mongos topologies, fixed numberOfConnectedServers on mongos topology instance.
+
+2.0.41 2015-08-14
+-----------------
+* Added missing Mongos.prototype.parserType function.
+* Updated mongodb-core to 1.2.10.
+
+2.0.40 2015-07-14
+-----------------
+* Updated mongodb-core to 1.2.9 for 2.4 wire protocol error handler fix.
+* NODE-525 Reset connectionTimeout after it's overwritten by tls.connect.
+* NODE-518 connectTimeoutMS is doubled in 2.0.39.
+* NODE-506 Ensures that errors from bulk unordered and ordered are instanceof Error (Issue #1282, https://github.com/owenallenaz).
+* NODE-526 Unique index not throwing duplicate key error.
+* NODE-528 Ignore undefined fields in Collection.find().
+* NODE-527 The API example for collection.createIndex shows Db.createIndex functionality.
+
+2.0.39 2015-07-14
+-----------------
+* Updated mongodb-core to 1.2.6 for NODE-505.
+
+2.0.38 2015-07-14
+-----------------
+* NODE-505 Query fails to find records that have a 'result' property with an array value.
+
+2.0.37 2015-07-14
+-----------------
+* NODE-504 Collection * Default options when using promiseLibrary.
+* NODE-500 Accidental repeat of hostname in seed list multiplies total connections persistently.
+* Updated mongodb-core to 1.2.5 to fix NODE-492.
+
+2.0.36 2015-07-07
+-----------------
+* Fully promisified allowing the use of ES6 generators and libraries like co. Also allows for BYOP (Bring your own promises).
+* NODE-493 updated mongodb-core to 1.2.4 to ensure we cannot DDOS the mongod or mongos process on large connection pool sizes.
+
+2.0.35 2015-06-17
+-----------------
+* Upgraded to mongodb-core 1.2.2 including removing warnings when C++ bson parser is not available and a fix for SCRAM authentication.
+
+2.0.34 2015-06-17
+-----------------
+* Upgraded to mongodb-core 1.2.1 speeding up serialization and removing the need for the c++ bson extension.
+* NODE-486 fixed issue related to limit and skip when calling toArray in 2.0 driver.
+* NODE-483 throw error if capabilities of topology is queries before topology has performed connection setup.
+* NODE-482 fixed issue where MongoClient.connect would incorrectly identify a replset seed list server as a non replicaset member.
+* NODE-487 fixed issue where killcursor command was not being sent correctly on limit and skip queries.
+
+2.0.33 2015-05-20
+-----------------
+* Bumped mongodb-core to 1.1.32.
+
+2.0.32 2015-05-19
+-----------------
+* NODE-463 db.close immediately executes its callback.
+* Don't only emit server close event once (Issue #1276, https://github.com/vkarpov15).
+* NODE-464 Updated mongodb-core to 1.1.31 that uses a single socket connection to arbiters and hidden servers as well as emitting all event correctly.
+
+2.0.31 2015-05-08
+-----------------
+* NODE-461 Tripping on error "no chunks found for file, possibly corrupt" when there is no error.
+
+2.0.30 2015-05-07
+-----------------
+* NODE-460 fix; don't set authMechanism for user in db.authenticate() to avoid mongoose authentication issue.
+
+2.0.29 2015-05-07
+-----------------
+* NODE-444 Possible memory leak, too many listeners added.
+* NODE-459 Auth failure using Node 0.8.28, MongoDB 3.0.2 & mongodb-node-native 1.4.35.
+* Bumped mongodb-core to 1.1.26.
+
+2.0.28 2015-04-24
+-----------------
+* Bumped mongodb-core to 1.1.25
+* Added Cursor.prototype.setCursorOption to allow for setting node specific cursor options for tailable cursors.
+* NODE-430 Cursor.count() opts argument masked by var opts = {}
+* NODE-406 Implemented Cursor.prototype.map function tapping into MongoClient cursor transforms.
+* NODE-438 replaceOne is not returning the result.ops property as described in the docs.
+* NODE-433 _read, pipe and write all open gridstore automatically if not open.
+* NODE-426 ensure drain event is emitted after write function returns, fixes intermittent issues in writing files to gridstore.
+* NODE-440 GridStoreStream._read() doesn't check GridStore.read() error.
+* Always use readPreference = primary for findAndModify command (ignore passed in read preferences) (Issue #1274, https://github.com/vkarpov15).
+* Minor fix in GridStore.exists for dealing with regular expressions searches.
+
+2.0.27 2015-04-07
+-----------------
+* NODE-410 Correctly handle issue with pause/resume in Node 0.10.x that causes exceptions when using the Node 0.12.0 style streams.
+
+2.0.26 2015-04-07
+-----------------
+* Implements the Common Index specification Standard API at https://github.com/mongodb/specifications/blob/master/source/index-management.rst.
+* NODE-408 Expose GridStore.currentChunk.chunkNumber.
+
+2.0.25 2015-03-26
+-----------------
+* Upgraded mongodb-core to 1.1.21, making the C++ bson code an optional dependency to the bson module.
+
+2.0.24 2015-03-24
+-----------------
+* NODE-395 Socket Not Closing, db.close called before full set finished initalizing leading to server connections in progress not being closed properly.
+* Upgraded mongodb-core to 1.1.20.
+
+2.0.23 2015-03-21
+-----------------
+* NODE-380 Correctly return MongoError from toError method.
+* Fixed issue where addCursorFlag was not correctly setting the flag on the command for mongodb-core.
+* NODE-388 Changed length from method to property on order.js/unordered.js bulk operations.
+* Upgraded mongodb-core to 1.1.19.
+
+2.0.22 2015-03-16
+-----------------
+* NODE-377, fixed issue where tags would correctly be checked on secondary and nearest to filter out eligible server candidates.
+* Upgraded mongodb-core to 1.1.17.
+
+2.0.21 2015-03-06
+-----------------
+* Upgraded mongodb-core to 1.1.16 making sslValidate default to true to force validation on connection unless overriden by the user.
+
+2.0.20 2015-03-04
+-----------------
+* Updated mongodb-core 1.1.15 to relax pickserver method.
+
+2.0.19 2015-03-03
+-----------------
+* NODE-376 Fixes issue * Unordered batch incorrectly tracks batch size when switching batch types (Issue #1261, https://github.com/meirgottlieb)
+* NODE-379 Fixes bug in cursor.count() that causes the result to always be zero for dotted collection names (Issue #1262, https://github.com/vsivsi)
+* Expose MongoError from mongodb-core (Issue #1260, https://github.com/tjconcept)
+
+2.0.18 2015-02-27
+-----------------
+* Bumped mongodb-core 1.1.14 to ensure passives are correctly added as secondaries.
+
+2.0.17 2015-02-27
+-----------------
+* NODE-336 Added length function to ordered and unordered bulk operations to be able know the amount of current operations in bulk.
+* Bumped mongodb-core 1.1.13 to ensure passives are correctly added as secondaries.
+
+2.0.16 2015-02-16
+-----------------
+* listCollection now returns filtered result correctly removing db name for 2.6 or earlier servers.
+* Bumped mongodb-core 1.1.12 to correctly work for node 0.12.0 and io.js.
+* Add ability to get collection name from cursor (Issue #1253, https://github.com/vkarpov15)
+
+2.0.15 2015-02-02
+-----------------
+* Unified behavior of listCollections results so 3.0 and pre 3.0 return same type of results.
+* Bumped mongodb-core to 1.1.11 to support per document tranforms in cursors as well as relaxing the setName requirement.
+* NODE-360 Aggregation cursor and command correctly passing down the maxTimeMS property.
+* Added ~1.0 mongodb-tools module for test running.
+* Remove the required setName for replicaset connections, if not set it will pick the first setName returned.
+
+2.0.14 2015-01-21
+-----------------
+* Fixed some MongoClient.connect options pass through issues and added test coverage.
+* Bumped mongodb-core to 1.1.9 including fixes for io.js
+
+2.0.13 2015-01-09
+-----------------
+* Bumped mongodb-core to 1.1.8.
+* Optimized query path for performance, moving Object.defineProperty outside of constructors.
+
+2.0.12 2014-12-22
+-----------------
+* Minor fixes to listCollections to ensure correct querying of a collection when using a string.
+
+2.0.11 2014-12-19
+-----------------
+* listCollections filters out index namespaces on < 2.8 correctly
+* Bumped mongo-client to 1.1.7
+
+2.0.10 2014-12-18
+-----------------
+* NODE-328 fixed db.open return when no callback available issue and added test.
+* NODE-327 Refactored listCollections to return cursor to support 2.8.
+* NODE-327 Added listIndexes method and refactored internal methods to use the new command helper.
+* NODE-335 Cannot create index for nested objects fixed by relaxing key checking for createIndex helper.
+* Enable setting of connectTimeoutMS (Issue #1235, https://github.com/vkarpov15)
+* Bumped mongo-client to 1.1.6
+
+2.0.9 2014-12-01
+----------------
+* Bumped mongodb-core to 1.1.3 fixing global leaked variables and introducing strict across all classes.
+* All classes are now strict (Issue #1233)
+* NODE-324 Refactored insert/update/remove and all other crud opts to rely on internal methods to avoid any recursion.
+* Fixed recursion issues in debug logging due to JSON.stringify()
+* Documentation fixes (Issue #1232, https://github.com/wsmoak)
+* Fix writeConcern in Db.prototype.ensureIndex (Issue #1231, https://github.com/Qard)
+
+2.0.8 2014-11-28
+----------------
+* NODE-322 Finished up prototype refactoring of Db class.
+* NODE-322 Exposed Cursor in index.js for New Relic.
+
+2.0.7 2014-11-20
+----------------
+* Bumped mongodb-core to 1.1.2 fixing a UTF8 encoding issue for collection names.
+* NODE-318 collection.update error while setting a function with serializeFunctions option.
+* Documentation fixes.
+
+2.0.6 2014-11-14
+----------------
+* Refactored code to be prototype based instead of privileged methods.
+* Bumped mongodb-core to 1.1.1 to take advantage of the prototype based refactorings.
+* Implemented missing aspects of the CRUD specification.
+* Fixed documentation issues.
+* Fixed global leak REFERENCE_BY_ID in gridfs grid_store (Issue #1225, https://github.com/j)
+* Fix LearnBoost/mongoose#2313: don't let user accidentally clobber geoNear params (Issue #1223, https://github.com/vkarpov15)
+
+2.0.5 2014-10-29
+----------------
+* Minor fixes to documentation and generation of documentation.
+* NODE-306 (No results in aggregation cursor when collection name contains a dot), Merged code for cursor and aggregation cursor.
+
+2.0.4 2014-10-23
+----------------
+* Allow for single replicaset seed list with no setName specified (Issue #1220, https://github.com/imaman)
+* Made each rewind on each call allowing for re-using the cursor.
+* Fixed issue where incorrect iterations would happen on each for extensive batchSizes.
+* NODE-301 specifying maxTimeMS on find causes all fields to be omitted from result.
+
+2.0.3 2014-10-14
+----------------
+* NODE-297 Aggregate Broken for case of pipeline with no options.
+
+2.0.2 2014-10-08
+----------------
+* Bumped mongodb-core to 1.0.2.
+* Fixed bson module dependency issue by relying on the mongodb-core one.
+* Use findOne instead of find followed by nextObject (Issue #1216, https://github.com/sergeyksv)
+
+2.0.1 2014-10-07
+----------------
+* Dependency fix
+
+2.0.0 2014-10-07
+----------------
+* First release of 2.0 driver
+
+2.0.0-alpha2 2014-10-02
+-----------------------
+* CRUD API (insertOne, insertMany, updateOne, updateMany, removeOne, removeMany, bulkWrite, findOneAndDelete, findOneAndUpdate, findOneAndReplace)
+* Cluster Management Spec compatible.
+
+2.0.0-alpha1 2014-09-08
+-----------------------
+* Insert method allows only up 1000 pr batch for legacy as well as 2.6 mode
+* Streaming behavior is 0.10.x or higher with backwards compatibility using readable-stream npm package
+* Gridfs stream only available through .stream() method due to overlapping names on Gridstore object and streams in 0.10.x and higher of node
+* remove third result on update and remove and return the whole result document instead (getting rid of the weird 3 result parameters)
+ * Might break some application
+* Returns the actual mongodb-core result instead of just the number of records changed for insert/update/remove
+* MongoClient only has the connect method (no ability instantiate with Server, ReplSet or similar)
+* Removed Grid class
+* GridStore only supports w+ for metadata updates, no appending to file as it's not thread safe and can cause corruption of the data
+ + seek will fail if attempt to use with w or w+
+ + write will fail if attempted with w+ or r
+ + w+ only works for updating metadata on a file
+* Cursor toArray and each resets and re-runs the cursor
+* FindAndModify returns whole result document instead of just value
+* Extend cursor to allow for setting all the options via methods instead of dealing with the current messed up find
+* Removed db.dereference method
+* Removed db.cursorInfo method
+* Removed db.stats method
+* Removed db.collectionNames not needed anymore as it's just a specialized case of listCollections
+* Removed db.collectionInfo removed due to not being compatible with new storage engines in 2.8 as they need to use the listCollections command due to system collections not working for namespaces.
+* Added db.listCollections to replace several methods above
+
+1.4.10 2014-09-04
+-----------------
+* Fixed BSON and Kerberos compilation issues
+* Bumped BSON to ~0.2 always installing latest BSON 0.2.x series
+* Fixed Kerberos and bumped to 0.0.4
+
+1.4.9 2014-08-26
+----------------
+* Check _bsonType for Binary (Issue #1202, https://github.com/mchapman)
+* Remove duplicate Cursor constructor (Issue #1201, https://github.com/KenPowers)
+* Added missing parameter in the documentation (Issue #1199, https://github.com/wpjunior)
+* Documented third parameter on the update callback(Issue #1196, https://github.com/gabmontes)
+* NODE-240 Operations on SSL connection hang on node 0.11.x
+* NODE-235 writeResult is not being passed on when error occurs in insert
+* NODE-229 Allow count to work with query hints
+* NODE-233 collection.save() does not support fullResult
+* NODE-244 Should parseError also emit a `disconnected` event?
+* NODE-246 Cursors are inefficiently constructed and consequently cannot be promisified.
+* NODE-248 Crash with X509 auth
+* NODE-252 Uncaught Exception in Base.__executeAllServerSpecificErrorCallbacks
+* Bumped BSON parser to 0.2.12
+
+
+1.4.8 2014-08-01
+----------------
+* NODE-205 correctly emit authenticate event
+* NODE-210 ensure no undefined connection error when checking server state
+* NODE-212 correctly inherit socketTimeoutMS from replicaset when HA process adds new servers or reconnects to existing ones
+* NODE-220 don't throw error if ensureIndex errors out in Gridstore
+* Updated bson to 0.2.11 to ensure correct toBSON behavior when returning non object in nested classes
+* Fixed test running filters
+* Wrap debug log in a call to format (Issue #1187, https://github.com/andyroyle)
+* False option values should not trigger w:1 (Issue #1186, https://github.com/jsdevel)
+* Fix aggregatestream.close(Issue #1194, https://github.com/jonathanong)
+* Fixed parsing issue for w:0 in url parser when in connection string
+* Modified collection.geoNear to support a geoJSON point or legacy coordinate pair (Issue #1198, https://github.com/mmacmillan)
+
+1.4.7 2014-06-18
+----------------
+* Make callbacks to be executed in right domain when server comes back up (Issue #1184, https://github.com/anton-kotenko)
+* Fix issue where currentOp query against mongos would fail due to mongos passing through $readPreference field to mongod (CS-X)
+
+1.4.6 2014-06-12
+----------------
+* Added better support for MongoClient IP6 parsing (Issue #1181, https://github.com/micovery)
+* Remove options check on index creation (Issue #1179, Issue #1183, https://github.com/jdesboeufs, https://github.com/rubenvereecken)
+* Added missing type check before calling optional callback function (Issue #1180)
+
+1.4.5 2014-05-21
+----------------
+* Added fullResult flag to insert/update/remove which will pass raw result document back. Document contents will vary depending on the server version the driver is talking to. No attempt is made to coerce a joint response.
+* Fix to avoid MongoClient.connect hanging during auth when secondaries building indexes pre 2.6.
+* return the destination stream in GridStore.pipe (Issue #1176, https://github.com/iamdoron)
+
+1.4.4 2014-05-13
+----------------
+* Bumped BSON version to use the NaN 1.0 package, fixed strict comparison issue for ObjectID
+* Removed leaking global variable (Issue #1174, https://github.com/dainis)
+* MongoClient respects connectTimeoutMS for initial discovery process (NODE-185)
+* Fix bug with return messages larger than 16MB but smaller than max BSON Message Size (NODE-184)
+
+1.4.3 2014-05-01
+----------------
+* Clone options for commands to avoid polluting original options passed from Mongoose (Issue #1171, https://github.com/vkarpov15)
+* Made geoNear and geoHaystackSearch only clean out allowed options from command generation (Issue #1167)
+* Fixed typo for allowDiskUse (Issue #1168, https://github.com/joaofranca)
+* A 'mapReduce' function changed 'function' to instance '\<Object\>' of 'Code' class (Issue #1165, https://github.com/exabugs)
+* Made findAndModify set sort only when explicitly set (Issue #1163, https://github.com/sars)
+* Rewriting a gridStore file by id should use a new filename if provided (Issue #1169, https://github.com/vsivsi)
+
+1.4.2 2014-04-15
+----------------
+* Fix for inheritance of readPreferences from MongoClient NODE-168/NODE-169
+* Merged in fix for ping strategy to avoid hitting non-pinged servers (Issue #1161, https://github.com/vaseker)
+* Merged in fix for correct debug output for connection messages (Issue #1158, https://github.com/vaseker)
+* Fixed global variable leak (Issue #1160, https://github.com/vaseker)
+
+1.4.1 2014-04-09
+----------------
+* Correctly emit joined event when primary change
+* Add _id to documents correctly when using bulk operations
+
+1.4.0 2014-04-03
+----------------
+* All node exceptions will no longer be caught if on('error') is defined
+* Added X509 auth support
+* Fix for MongoClient connection timeout issue (NODE-97)
+* Pass through error messages from parseError instead of just text (Issue #1125)
+* Close db connection on error (Issue #1128, https://github.com/benighted)
+* Fixed documentation generation
+* Added aggregation cursor for 2.6 and emulated cursor for pre 2.6 (uses stream2)
+* New Bulk API implementation using write commands for 2.6 and down converts for pre 2.6
+* Insert/Update/Remove using new write commands when available
+* Added support for new roles based API's in 2.6 for addUser/removeUser
+* Added bufferMaxEntries to start failing if the buffer hits the specified number of entries
+* Upgraded BSON parser to version 0.2.7 to work with < 0.11.10 C++ API changes
+* Support for OP_LOG_REPLAY flag (NODE-94)
+* Fixes for SSL HA ping and discovery.
+* Uses createIndexes if available for ensureIndex/createIndex
+* Added parallelCollectionScan method to collection returning CommandCursor instances for cursors
+* Made CommandCursor behave as Readable stream.
+* Only Db honors readPreference settings, removed Server.js legacy readPreference settings due to user confusion.
+* Reconnect event emitted by ReplSet/Mongos/Server after reconnect and before replaying of buffered operations.
+* GridFS buildMongoObject returns error on illegal md5 (NODE-157, https://github.com/iantocristian)
+* Default GridFS chunk size changed to (255 * 1024) bytes to optimize for collections defaulting to power of 2 sizes on 2.6.
+* Refactored commands to all go through command function ensuring consistent command execution.
+* Fixed issues where readPreferences where not correctly passed to mongos.
+* Catch error == null and make err detection more prominent (NODE-130)
+* Allow reads from arbiter for single server connection (NODE-117)
+* Handle error coming back with no documents (NODE-130)
+* Correctly use close parameter in Gridstore.write() (NODE-125)
+* Throw an error on a bulk find with no selector (NODE-129, https://github.com/vkarpov15)
+* Use a shallow copy of options in find() (NODE-124, https://github.com/vkarpov15)
+* Fix statistical strategy (NODE-158, https://github.com/vkarpov15)
+* GridFS off-by-one bug in lastChunkNumber() causes uncaught throw and data loss (Issue #1154, https://github.com/vsivsi)
+* GridStore drops passed `aliases` option, always results in `null` value in GridFS files (Issue #1152, https://github.com/vsivsi)
+* Remove superfluous connect object copying in index.js (Issue #1145, https://github.com/thomseddon)
+* Do not return false when the connection buffer is still empty (Issue #1143, https://github.com/eknkc)
+* Check ReadPreference object on ReplSet.canRead (Issue #1142, https://github.com/eknkc)
+* Fix unpack error on _executeQueryCommand (Issue #1141, https://github.com/eknkc)
+* Close db on failed connect so node can exit (Issue #1128, https://github.com/benighted)
+* Fix global leak with _write_concern (Issue #1126, https://github.com/shanejonas)
+
+1.3.19 2013-08-21
+-----------------
+* Correctly rethrowing errors after change from event emission to callbacks, compatibility with 0.10.X domains without breaking 0.8.X support.
+* Small fix to return the entire findAndModify result as the third parameter (Issue #1068)
+* No removal of "close" event handlers on server reconnect, emits "reconnect" event when reconnection happens. Reconnect Only applies for single server connections as of now as semantics for ReplSet and Mongos is not clear (Issue #1056)
+
+1.3.18 2013-08-10
+-----------------
+* Fixed issue when throwing exceptions in MongoClient.connect/Db.open (Issue #1057)
+* Fixed an issue where _events is not cleaned up correctly causing a slow steady memory leak.
+
+1.3.17 2013-08-07
+-----------------
+* Ignore return commands that have no registered callback
+* Made collection.count not use the db.command function
+* Fix throw exception on ping command (Issue #1055)
+
+1.3.16 2013-08-02
+-----------------
+* Fixes connection issue where lots of connections would happen if a server is in recovery mode during connection (Issue #1050, NODE-50, NODE-51)
+* Bug in unlink mulit filename (Issue #1054)
+
+1.3.15 2013-08-01
+-----------------
+* Memory leak issue due to node Issue #4390 where _events[id] is set to undefined instead of deleted leading to leaks in the Event Emitter over time
+
+1.3.14 2013-08-01
+-----------------
+* Fixed issue with checkKeys where it would error on X.X
+
+1.3.13 2013-07-31
+-----------------
+* Added override for checkKeys on insert/update (Warning will expose you to injection attacks) (Issue #1046)
+* BSON size checking now done pre serialization (Issue #1037)
+* Added isConnected returns false when no connection Pool exists (Issue #1043)
+* Unified command handling to ensure same handling (Issue #1041, #1042)
+* Correctly emit "open" and "fullsetup" across all Db's associated with Mongos, ReplSet or Server (Issue #1040)
+* Correctly handles bug in authentication when attempting to connect to a recovering node in a replicaset.
+* Correctly remove recovering servers from available servers in replicaset. Piggybacks on the ping command.
+* Removed findAndModify chaining to be compliant with behavior in other official drivers and to fix a known mongos issue.
+* Fixed issue with Kerberos authentication on Windows for re-authentication.
+* Fixed Mongos failover behavior to correctly throw out old servers.
+* Ensure stored queries/write ops are executed correctly after connection timeout
+* Added promoteLongs option for to allow for overriding the promotion of Longs to Numbers and return the actual Long.
+
+1.3.12 2013-07-19
+-----------------
+* Fixed issue where timeouts sometimes would behave wrongly (Issue #1032)
+* Fixed bug with callback third parameter on some commands (Issue #1033)
+* Fixed possible issue where killcursor command might leave hanging functions
+* Fixed issue where Mongos was not correctly removing dead servers from the pool of eligable servers
+* Throw error if dbName or collection name contains null character (at command level and at collection level)
+* Updated bson parser to 0.2.1 with security fix and non-promotion of Long values to javascript Numbers (once a long always a long)
+
+1.3.11 2013-07-04
+-----------------
+* Fixed errors on geoNear and geoSearch (Issue #1024, https://github.com/ebensing)
+* Add driver version to export (Issue #1021, https://github.com/aheckmann)
+* Add text to readpreference obedient commands (Issue #1019)
+* Drivers should check the query failure bit even on getmore response (Issue #1018)
+* Map reduce has incorrect expectations of 'inline' value for 'out' option (Issue #1016, https://github.com/rcotter)
+* Support SASL PLAIN authentication (Issue #1009)
+* Ability to use different Service Name on the driver for Kerberos Authentication (Issue #1008)
+* Remove unnecessary octal literal to allow the code to run in strict mode (Issue #1005, https://github.com/jamesallardice)
+* Proper handling of recovering nodes (when they go into recovery and when they return from recovery, Issue #1027)
+
+1.3.10 2013-06-17
+-----------------
+* Guard against possible undefined in server::canCheckoutWriter (Issue #992, https://github.com/willyaranda)
+* Fixed some duplicate test names (Issue #993, https://github.com/kawanet)
+* Introduced write and read concerns for GridFS (Issue #996)
+* Fixed commands not correctly respecting Collection level read preference (Issue #995, #999)
+* Fixed issue with pool size on replicaset connections (Issue #1000)
+* Execute all query commands on master switch (Issue #1002, https://github.com/fogaztuc)
+
+1.3.9 2013-06-05
+----------------
+* Fixed memory leak when findAndModify errors out on w>1 and chained callbacks not properly cleaned up.
+
+1.3.8 2013-05-31
+----------------
+* Fixed issue with socket death on windows where it emits error event instead of close event (Issue #987)
+* Emit authenticate event on db after authenticate method has finished on db instance (Issue #984)
+* Allows creation of MongoClient and do new MongoClient().connect(..). Emits open event when connection correct allowing for apps to react on event.
+
+1.3.7 2013-05-29
+----------------
+* After reconnect, tailable getMores go on inconsistent connections (Issue #981, #982, https://github.com/glasser)
+* Updated Bson to 0.1.9 to fix ARM support (Issue #985)
+
+1.3.6 2013-05-21
+----------------
+* Fixed issue where single server reconnect attempt would throw due to missing options variable (Issue #979)
+* Fixed issue where difference in ismaster server name and seed list caused connections issues, (Issue #976)
+
+1.3.5 2013-05-14
+----------------
+* Fixed issue where HA for replicaset would pick the same broken connection when attempting to ping the replicaset causing the replicaset to never recover.
+
+1.3.4 2013-05-14
+----------------
+* Fixed bug where options not correctly passed in for uri parser (Issue #973, https://github.com/supershabam)
+* Fixed bug when passing a named index hint (Issue #974)
+
+1.3.3 2013-05-09
+----------------
+* Fixed auto-reconnect issue with single server instance.
+
+1.3.2 2013-05-08
+----------------
+* Fixes for an issue where replicaset would be pronounced dead when high priority primary caused double elections.
+
+1.3.1 2013-05-06
+----------------
+* Fix for replicaset consisting of primary/secondary/arbiter with priority applied failing to reconnect properly
+* Applied auth before server instance is set as connected when single server connection
+* Throw error if array of documents passed to save method
+
+1.3.0 2013-04-25
+----------------
+* Whole High availability handling for Replicaset, Server and Mongos connections refactored to ensure better handling of failover cases.
+* Fixed issue where findAndModify would not correctly skip issuing of chained getLastError (Issue #941)
+* Fixed throw error issue on errors with findAndModify during write out operation (Issue #939, https://github.com/autopulated)
+* Gridstore.prototype.writeFile now returns gridstore object correctly (Issue #938)
+* Kerberos support is now an optional module that allows for use of GSSAPI authentication using MongoDB Subscriber edition
+* Fixed issue where cursor.toArray could blow the stack on node 0.10.X (#950)
+
+1.2.14 2013-03-14
+-----------------
+* Refactored test suite to speed up running of replicaset tests
+* Fix of async error handling when error happens in callback (Issue #909, https://github.com/medikoo)
+* Corrected a slaveOk setting issue (Issue #906, #905)
+* Fixed HA issue where ping's would not go to correct server on HA server connection failure.
+* Uses setImmediate if on 0.10 otherwise nextTick for cursor stream
+* Fixed race condition in Cursor stream (NODE-31)
+* Fixed issues related to node 0.10 and process.nextTick now correctly using setImmediate where needed on node 0.10
+* Added support for maxMessageSizeBytes if available (DRIVERS-1)
+* Added support for authSource (2.4) to MongoClient URL and db.authenticate method (DRIVER-69/NODE-34)
+* Fixed issue in GridStore seek and GridStore read to correctly work on multiple seeks (Issue #895)
+
+1.2.13 2013-02-22
+-----------------
+* Allow strategy 'none' for repliaset if no strategy wanted (will default to round robin selection of servers on a set readPreference)
+* Fixed missing MongoErrors on some cursor methods (Issue #882)
+* Correctly returning a null for the db instance on MongoClient.connect when auth fails (Issue #890)
+* Added dropTarget option support for renameCollection/rename (Issue #891, help from https://github.com/jbottigliero)
+* Fixed issue where connection using MongoClient.connect would fail if first server did not exist (Issue #885)
+
+1.2.12 2013-02-13
+-----------------
+* Added limit/skip options to Collection.count (Issue #870)
+* Added applySkipLimit option to Cursor.count (Issue #870)
+* Enabled ping strategy as default for Replicaset if none specified (Issue #876)
+* Should correctly pick nearest server for SECONDARY/SECONDARY_PREFERRED/NEAREST (Issue #878)
+
+1.2.11 2013-01-29
+-----------------
+* Added fixes for handling type 2 binary due to PHP driver (Issue #864)
+* Moved callBackStore to Base class to have single unified store (Issue #866)
+* Ping strategy now reuses sockets unless they are closed by the server to avoid overhead
+
+1.2.10 2013-01-25
+-----------------
+* Merged in SSL support for 2.4 supporting certificate validation and presenting certificates to the server.
+* Only open a new HA socket when previous one dead (Issue #859, #857)
+* Minor fixes
+
+1.2.9 2013-01-15
+----------------
+* Fixed bug in SSL support for MongoClient/Db.connect when discovering servers (Issue #849)
+* Connection string with no db specified should default to admin db (Issue #848)
+* Support port passed as string to Server class (Issue #844)
+* Removed noOpen support for MongoClient/Db.connect as auto discovery of servers for Mongod/Mongos makes it not possible (Issue #842)
+* Included toError wrapper code moved to utils.js file (Issue #839, #840)
+* Rewrote cursor handling to avoid process.nextTick using trampoline instead to avoid stack overflow, speedup about 40%
+
+1.2.8 2013-01-07
+----------------
+* Accept function in a Map Reduce scope object not only a function string (Issue #826, https://github.com/aheckmann)
+* Typo in db.authenticate caused a check (for provided connection) to return false, causing a connection AND onAll=true to be passed into __executeQueryCommand downstream (Issue #831, https://github.com/m4tty)
+* Allow gridfs objects to use non ObjectID ids (Issue #825, https://github.com/nailgun)
+* Removed the double wrap, by not passing an Error object to the wrap function (Issue #832, https://github.com/m4tty)
+* Fix connection leak (gh-827) for HA replicaset health checks (Issue #833, https://github.com/aheckmann)
+* Modified findOne to use nextObject instead of toArray avoiding a nextTick operation (Issue #836)
+* Fixes for cursor stream to avoid multiple getmore issues when one in progress (Issue #818)
+* Fixes .open replaying all backed up commands correctly if called after operations performed, (Issue #829 and #823)
+
+1.2.7 2012-12-23
+----------------
+* Rolled back batches as they hang in certain situations
+* Fixes for NODE-25, keep reading from secondaries when primary goes down
+
+1.2.6 2012-12-21
+----------------
+* domain sockets shouldn't require a port arg (Issue #815, https://github.com/aheckmann)
+* Cannot read property 'info' of null (Issue #809, https://github.com/thesmart)
+* Cursor.each should work in batches (Issue #804, https://github.com/Swatinem)
+* Cursor readPreference bug for non-supported read preferences (Issue #817)
+
+1.2.5 2012-12-12
+----------------
+* Fixed ssl regression, added more test coverage (Issue #800)
+* Added better error reporting to the Db.connect if no valid serverConfig setup found (Issue #798)
+
+1.2.4 2012-12-11
+----------------
+* Fix to ensure authentication is correctly applied across all secondaries when using MongoClient.
+
+1.2.3 2012-12-10
+----------------
+* Fix for new replicaset members correctly authenticating when being added (Issue #791, https://github.com/m4tty)
+* Fixed seek issue in gridstore when using stream (Issue #790)
+
+1.2.2 2012-12-03
+----------------
+* Fix for journal write concern not correctly being passed under some circumstances.
+* Fixed correct behavior and re-auth for servers that get stepped down (Issue #779).
+
+1.2.1 2012-11-30
+----------------
+* Fix for double callback on insert with w:0 specified (Issue #783)
+* Small cleanup of urlparser.
+
+1.2.0 2012-11-27
+----------------
+* Honor connectTimeoutMS option for replicasets (Issue #750, https://github.com/aheckmann)
+* Fix ping strategy regression (Issue #738, https://github.com/aheckmann)
+* Small cleanup of code (Issue #753, https://github.com/sokra/node-mongodb-native)
+* Fixed index declaration using objects/arrays from other contexts (Issue #755, https://github.com/sokra/node-mongodb-native)
+* Intermittent (and rare) null callback exception when using ReplicaSets (Issue #752)
+* Force correct setting of read_secondary based on the read preference (Issue #741)
+* If using read preferences with secondaries queries will not fail if primary is down (Issue #744)
+* noOpen connection for Db.connect removed as not compatible with autodetection of Mongo type
+* Mongos connection with auth not working (Issue #737)
+* Use the connect method directly from the require. require('mongodb')("mongodb://localhost:27017/db")
+* new MongoClient introduced as the point of connecting to MongoDB's instead of the Db
+ * open/close/db/connect methods implemented
+* Implemented common URL connection format using MongoClient.connect allowing for simialar interface across all drivers.
+* Fixed a bug with aggregation helper not properly accepting readPreference
+
+1.1.11 2012-10-10
+-----------------
+* Removed strict mode and introduced normal handling of safe at DB level.
+
+1.1.10 2012-10-08
+-----------------
+* fix Admin.serverStatus (Issue #723, https://github.com/Contra)
+* logging on connection open/close(Issue #721, https://github.com/asiletto)
+* more fixes for windows bson install (Issue #724)
+
+1.1.9 2012-10-05
+----------------
+* Updated bson to 0.1.5 to fix build problem on sunos/windows.
+
+1.1.8 2012-10-01
+----------------
+* Fixed db.eval to correctly handle system.js global javascript functions (Issue #709)
+* Cleanup of non-closing connections (Issue #706)
+* More cleanup of connections under replicaset (Issue #707, https://github.com/elbert3)
+* Set keepalive on as default, override if not needed
+* Cleanup of jsbon install to correctly build without install.js script (https://github.com/shtylman)
+* Added domain socket support new Server("/tmp/mongodb.sock") style
+
+1.1.7 2012-09-10
+----------------
+* Protect against starting PingStrategy being called more than once (Issue #694, https://github.com/aheckmann)
+* Make PingStrategy interval configurable (was 1 second, relaxed to 5) (Issue #693, https://github.com/aheckmann)
+* Made PingStrategy api more consistant, callback to start/stop methods are optional (Issue #693, https://github.com/aheckmann)
+* Proper stopping of strategy on replicaset stop
+* Throw error when gridstore file is not found in read mode (Issue #702, https://github.com/jbrumwell)
+* Cursor stream resume now using nextTick to avoid duplicated records (Issue #696)
+
+1.1.6 2012-09-01
+----------------
+* Fix for readPreference NEAREST for replicasets (Issue #693, https://github.com/aheckmann)
+* Emit end correctly on stream cursor (Issue #692, https://github.com/Raynos)
+
+1.1.5 2012-08-29
+----------------
+* Fix for eval on replicaset Issue #684
+* Use helpful error msg when native parser not compiled (Issue #685, https://github.com/aheckmann)
+* Arbiter connect hotfix (Issue #681, https://github.com/fengmk2)
+* Upgraded bson parser to 0.1.2 using gyp, deprecated support for node 0.4.X
+* Added name parameter to createIndex/ensureIndex to be able to override index names larger than 128 bytes
+* Added exhaust option for find for feature completion (not recommended for normal use)
+* Added tailableRetryInterval to find for tailable cursors to allow to control getMore retry time interval
+* Fixes for read preferences when using MongoS to correctly handle no read preference set when iterating over a cursor (Issue #686)
+
+1.1.4 2012-08-12
+----------------
+* Added Mongos connection type with a fallback list for mongos proxies, supports ha (on by default) and will attempt to reconnect to failed proxies.
+* Documents can now have a toBSON method that lets the user control the serialization behavior for documents being saved.
+* Gridstore instance object now works as a readstream or writestream (thanks to code from Aaron heckmann (https://github.com/aheckmann/gridfs-stream)).
+* Fix gridfs readstream (Issue #607, https://github.com/tedeh).
+* Added disableDriverBSONSizeCheck property to Server.js for people who wish to push the inserts to the limit (Issue #609).
+* Fixed bug where collection.group keyf given as Code is processed as a regular object (Issue #608, https://github.com/rrusso2007).
+* Case mismatch between driver's ObjectID and mongo's ObjectId, allow both (Issue #618).
+* Cleanup map reduce (Issue #614, https://github.com/aheckmann).
+* Add proper error handling to gridfs (Issue #615, https://github.com/aheckmann).
+* Ensure cursor is using same connection for all operations to avoid potential jump of servers when using replicasets.
+* Date identification handled correctly in bson js parser when running in vm context.
+* Documentation updates
+* GridStore filename not set on read (Issue #621)
+* Optimizations on the C++ bson parser to fix a potential memory leak and avoid non-needed calls
+* Added support for awaitdata for tailable cursors (Issue #624)
+* Implementing read preference setting at collection and cursor level
+ * collection.find().setReadPreference(Server.SECONDARY_PREFERRED)
+ * db.collection("some", {readPreference:Server.SECONDARY})
+* Replicaset now returns when the master is discovered on db.open and lets the rest of the connections happen asynchronous.
+ * ReplSet/ReplSetServers emits "fullsetup" when all servers have been connected to
+* Prevent callback from executing more than once in getMore function (Issue #631, https://github.com/shankar0306)
+* Corrupt bson messages now errors out to all callbacks and closes up connections correctly, Issue #634
+* Replica set member status update when primary changes bug (Issue #635, https://github.com/alinsilvian)
+* Fixed auth to work better when multiple connections are involved.
+* Default connection pool size increased to 5 connections.
+* Fixes for the ReadStream class to work properly with 0.8 of Node.js
+* Added explain function support to aggregation helper
+* Added socketTimeoutMS and connectTimeoutMS to socket options for repl_set.js and server.js
+* Fixed addUser to correctly handle changes in 2.2 for getLastError authentication required
+* Added index to gridstore chunks on file_id (Issue #649, https://github.com/jacobbubu)
+* Fixed Always emit db events (Issue #657)
+* Close event not correctly resets DB openCalled variable to allow reconnect
+* Added open event on connection established for replicaset, mongos and server
+* Much faster BSON C++ parser thanks to Lucasfilm Singapore.
+* Refactoring of replicaset connection logic to simplify the code.
+* Add `options.connectArbiter` to decide connect arbiters or not (Issue #675)
+* Minor optimization for findAndModify when not using j,w or fsync for safe
+
+1.0.2 2012-05-15
+----------------
+* Reconnect functionality for replicaset fix for mongodb 2.0.5
+
+1.0.1 2012-05-12
+----------------
+* Passing back getLastError object as 3rd parameter on findAndModify command.
+* Fixed a bunch of performance regressions in objectId and cursor.
+* Fixed issue #600 allowing for single document delete to be passed in remove command.
+
+1.0.0 2012-04-25
+----------------
+* Fixes to handling of failover on server error
+* Only emits error messages if there are error listeners to avoid uncaught events
+* Server.isConnected using the server state variable not the connection pool state
+
+0.9.9.8 2012-04-12
+------------------
+* _id=0 is being turned into an ObjectID (Issue #551)
+* fix for error in GridStore write method (Issue #559)
+* Fix for reading a GridStore from arbitrary, non-chunk aligned offsets, added test (Issue #563, https://github.com/subroutine)
+* Modified limitRequest to allow negative limits to pass through to Mongo, added test (Issue #561)
+* Corrupt GridFS files when chunkSize < fileSize, fixed concurrency issue (Issue #555)
+* Handle dead tailable cursors (Issue #568, https://github.com/aheckmann)
+* Connection pools handles closing themselves down and clearing the state
+* Check bson size of documents against maxBsonSize and throw client error instead of server error, (Issue #553)
+* Returning update status document at the end of the callback for updates, (Issue #569)
+* Refactor use of Arguments object to gain performance (Issue #574, https://github.com/AaronAsAChimp)
+
+0.9.9.7 2012-03-16
+------------------
+* Stats not returned from map reduce with inline results (Issue #542)
+* Re-enable testing of whether or not the callback is called in the multi-chunk seek, fix small GridStore bug (Issue #543, https://github.com/pgebheim)
+* Streaming large files from GridFS causes truncation (Issue #540)
+* Make callback type checks agnostic to V8 context boundaries (Issue #545)
+* Correctly throw error if an attempt is made to execute an insert/update/remove/createIndex/ensureIndex with safe enabled and no callback
+* Db.open throws if the application attemps to call open again without calling close first
+
+0.9.9.6 2012-03-12
+------------------
+* BSON parser is externalized in it's own repository, currently using git master
+* Fixes for Replicaset connectivity issue (Issue #537)
+* Fixed issues with node 0.4.X vs 0.6.X (Issue #534)
+* Removed SimpleEmitter and replaced with standard EventEmitter
+* GridStore.seek fails to change chunks and call callback when in read mode (Issue #532)
+
+0.9.9.5 2012-03-07
+------------------
+* Merged in replSetGetStatus helper to admin class (Issue #515, https://github.com/mojodna)
+* Merged in serverStatus helper to admin class (Issue #516, https://github.com/mojodna)
+* Fixed memory leak in C++ bson parser (Issue #526)
+* Fix empty MongoError "message" property (Issue #530, https://github.com/aheckmann)
+* Cannot save files with the same file name to GridFS (Issue #531)
+
+0.9.9.4 2012-02-26
+------------------
+* bugfix for findAndModify: Error: corrupt bson message < 5 bytes long (Issue #519)
+
+0.9.9.3 2012-02-23
+------------------
+* document: save callback arguments are both undefined, (Issue #518)
+* Native BSON parser install error with npm, (Issue #517)
+
+0.9.9.2 2012-02-17
+------------------
+* Improved detection of Buffers using Buffer.isBuffer instead of instanceof.
+* Added wrap error around db.dropDatabase to catch all errors (Issue #512)
+* Added aggregate helper to collection, only for MongoDB >= 2.1
+
+0.9.9.1 2012-02-15
+------------------
+* Better handling of safe when using some commands such as createIndex, ensureIndex, addUser, removeUser, createCollection.
+* Mapreduce now throws error if out parameter is not specified.
+
+0.9.9 2012-02-13
+----------------
+* Added createFromTime method on ObjectID to allow for queries against _id more easily using the timestamp.
+* Db.close(true) now makes connection unusable as it's been force closed by app.
+* Fixed mapReduce and group functions to correctly send slaveOk on queries.
+* Fixes for find method to correctly work with find(query, fields, callback) (Issue #506).
+* A fix for connection error handling when using the SSL on MongoDB.
+
+0.9.8-7 2012-02-06
+------------------
+* Simplified findOne to use the find command instead of the custom code (Issue #498).
+* BSON JS parser not also checks for _bsonType variable in case BSON object is in weird scope (Issue #495).
+
+0.9.8-6 2012-02-04
+------------------
+* Removed the check for replicaset change code as it will never work with node.js.
+
+0.9.8-5 2012-02-02
+------------------
+* Added geoNear command to Collection.
+* Added geoHaystackSearch command to Collection.
+* Added indexes command to collection to retrieve the indexes on a Collection.
+* Added stats command to collection to retrieve the statistics on a Collection.
+* Added listDatabases command to admin object to allow retrieval of all available dbs.
+* Changed createCreateIndexCommand to work better with options.
+* Fixed dereference method on Db class to correctly dereference Db reference objects.
+* Moved connect object onto Db class(Db.connect) as well as keeping backward compatibility.
+* Removed writeBuffer method from gridstore, write handles switching automatically now.
+* Changed readBuffer to read on Gridstore, Gridstore now only supports Binary Buffers no Strings anymore.
+* Moved Long class to bson directory.
+
+0.9.8-4 2012-01-28
+------------------
+* Added reIndex command to collection and db level.
+* Added support for $returnKey, $maxScan, $min, $max, $showDiskLoc, $comment to cursor and find/findOne methods.
+* Added dropDups and v option to createIndex and ensureIndex.
+* Added isCapped method to Collection.
+* Added indexExists method to Collection.
+* Added findAndRemove method to Collection.
+* Fixed bug for replicaset connection when no active servers in the set.
+* Fixed bug for replicaset connections when errors occur during connection.
+* Merged in patch for BSON Number handling from Lee Salzman, did some small fixes and added test coverage.
+
+0.9.8-3 2012-01-21
+------------------
+* Workaround for issue with Object.defineProperty (Issue #484)
+* ObjectID generation with date does not set rest of fields to zero (Issue #482)
+
+0.9.8-2 2012-01-20
+------------------
+* Fixed a missing this in the ReplSetServers constructor.
+
+0.9.8-1 2012-01-17
+------------------
+* FindAndModify bug fix for duplicate errors (Issue #481)
+
+0.9.8 2012-01-17
+----------------
+* Replicasets now correctly adjusts to live changes in the replicaset configuration on the servers, reconnecting correctly.
+ * Set the interval for checking for changes setting the replicaSetCheckInterval property when creating the ReplSetServers instance or on db.serverConfig.replicaSetCheckInterval. (default 1000 miliseconds)
+* Fixes formattedOrderClause in collection.js to accept a plain hash as a parameter (Issue #469) https://github.com/tedeh
+* Removed duplicate code for formattedOrderClause and moved to utils module
+* Pass in poolSize for ReplSetServers to set default poolSize for new replicaset members
+* Bug fix for BSON JS deserializer. Isolating the eval functions in separate functions to avoid V8 deoptimizations
+* Correct handling of illegal BSON messages during deserialization
+* Fixed Infinite loop when reading GridFs file with no chunks (Issue #471)
+* Correctly update existing user password when using addUser (Issue #470)
+
+0.9.7.3-5 2012-01-04
+--------------------
+* Fix for RegExp serialization for 0.4.X where typeof /regexp/ == 'function' vs in 0.6.X typeof /regexp/ == 'object'
+* Don't allow keepAlive and setNoDelay for 0.4.X as it throws errors
+
+0.9.7.3-4 2012-01-04
+--------------------
+* Chased down potential memory leak on findAndModify, Issue #467 (node.js removeAllListeners leaves the key in the _events object, node.js bug on eventlistener?, leads to extremely slow memory leak on listener object)
+* Sanity checks for GridFS performance with benchmark added
+
+0.9.7.3-3 2012-01-04
+--------------------
+* Bug fixes for performance issues going form 0.9.6.X to 0.9.7.X on linux
+* BSON bug fixes for performance
+
+0.9.7.3-2 2012-01-02
+--------------------
+* Fixed up documentation to reflect the preferred way of instantiating bson types
+* GC bug fix for JS bson parser to avoid stop-and-go GC collection
+
+0.9.7.3-1 2012-01-02
+--------------------
+* Fix to make db.bson_serializer and db.bson_deserializer work as it did previously
+
+0.9.7.3 2011-12-30
+--------------------
+* Moved BSON_BINARY_SUBTYPE_DEFAULT from BSON object to Binary object and removed the BSON_BINARY_ prefixes
+* Removed Native BSON types, C++ parser uses JS types (faster due to cost of crossing the JS-C++ barrier for each call)
+* Added build fix for 0.4.X branch of Node.js where GetOwnPropertyNames is not defined in v8
+* Fix for wire protocol parser for corner situation where the message is larger than the maximum socket buffer in node.js (Issue #464, #461, #447)
+* Connection pool status set to connected on poolReady, isConnected returns false on anything but connected status (Issue #455)
+
+0.9.7.2-5 2011-12-22
+--------------------
+* Brand spanking new Streaming Cursor support Issue #458 (https://github.com/christkv/node-mongodb-native/pull/458) thanks to Mr Aaron Heckmann
+
+0.9.7.2-4 2011-12-21
+--------------------
+* Refactoring of callback code to work around performance regression on linux
+* Fixed group function to correctly use the command mode as default
+
+0.9.7.2-3 2011-12-18
+--------------------
+* Fixed error handling for findAndModify while still working for mongodb 1.8.6 (Issue #450).
+* Allow for force send query to primary, pass option (read:'primary') on find command.
+ * ``find({a:1}, {read:'primary'}).toArray(function(err, items) {});``
+
+0.9.7.2-2 2011-12-16
+--------------------
+* Fixes infinite streamRecords QueryFailure fix when using Mongos (Issue #442)
+
+0.9.7.2-1 2011-12-16
+--------------------
+* ~10% perf improvement for ObjectId#toHexString (Issue #448, https://github.com/aheckmann)
+* Only using process.nextTick on errors emitted on callbacks not on all parsing, reduces number of ticks in the driver
+* Changed parsing off bson messages to use process.nextTick to do bson parsing in batches if the message is over 10K as to yield more time to the event look increasing concurrency on big mongoreply messages with multiple documents
+
+0.9.7.2 2011-12-15
+------------------
+* Added SSL support for future version of mongodb (VERY VERY EXPERIMENTAL)
+ * pass in the ssl:true option to the server or replicaset server config to enable
+ * a bug either in mongodb or node.js does not allow for more than 1 connection pr db instance (poolSize:1).
+* Added getTimestamp() method to objectID that returns a date object
+* Added finalize function to collection.group
+ * function group (keys, condition, initial, reduce, finalize, command, callback)
+* Reaper no longer using setTimeout to handle reaping. Triggering is done in the general flow leading to predictable behavior.
+ * reaperInterval, set interval for reaper (default 10000 miliseconds)
+ * reaperTimeout, set timeout for calls (default 30000 miliseconds)
+ * reaper, enable/disable reaper (default false)
+* Work around for issues with findAndModify during high concurrency load, insure that the behavior is the same across the 1.8.X branch and 2.X branch of MongoDb
+* Reworked multiple db's sharing same connection pool to behave correctly on error, timeout and close
+* EnsureIndex command can be executed without a callback (Issue #438)
+* Eval function no accepts options including nolock (Issue #432)
+ * eval(code, parameters, options, callback) (where options = {nolock:true})
+
+0.9.7.1-4 2011-11-27
+--------------------
+* Replaced install.sh with install.js to install correctly on all supported os's
+
+0.9.7.1-3 2011-11-27
+--------------------
+* Fixes incorrect scope for ensureIndex error wrapping (Issue #419) https://github.com/ritch
+
+0.9.7.1-2 2011-11-27
+--------------------
+* Set statistical selection strategy as default for secondary choice.
+
+0.9.7.1-1 2011-11-27
+--------------------
+* Better handling of single server reconnect (fixes some bugs)
+* Better test coverage of single server failure
+* Correct handling of callbacks on replicaset servers when firewall dropping packets, correct reconnect
+
+0.9.7.1 2011-11-24
+------------------
+* Better handling of dead server for single server instances
+* FindOne and find treats selector == null as {}, Issue #403
+* Possible to pass in a strategy for the replicaset to pick secondary reader node
+ * parameter strategy
+ * ping (default), pings the servers and picks the one with the lowest ping time
+ * statistical, measures each request and pick the one with the lowest mean and std deviation
+* Set replicaset read preference replicaset.setReadPreference()
+ * Server.READ_PRIMARY (use primary server for reads)
+ * Server.READ_SECONDARY (from a secondary server (uses the strategy set))
+ * tags, {object of tags}
+* Added replay of commands issued to a closed connection when the connection is re-established
+* Fix isConnected and close on unopened connections. Issue #409, fix by (https://github.com/sethml)
+* Moved reaper to db.open instead of constructor (Issue #406)
+* Allows passing through of socket connection settings to Server or ReplSetServer under the option socketOptions
+ * timeout = set seconds before connection times out (default 0)
+ * noDelay = Disables the Nagle algorithm (default true)
+ * keepAlive = Set if keepAlive is used (default 0, which means no keepAlive, set higher than 0 for keepAlive)
+ * encoding = ['ascii', 'utf8', or 'base64'] (default null)
+* Fixes for handling of errors during shutdown off a socket connection
+* Correctly applies socket options including timeout
+* Cleanup of test management code to close connections correctly
+* Handle parser errors better, closing down the connection and emitting an error
+* Correctly emit errors from server.js only wrapping errors that are strings
+
+0.9.7 2011-11-10
+----------------
+* Added priority setting to replicaset manager
+* Added correct handling of passive servers in replicaset
+* Reworked socket code for simpler clearer handling
+* Correct handling of connections in test helpers
+* Added control of retries on failure
+ * control with parameters retryMiliSeconds and numberOfRetries when creating a db instance
+* Added reaper that will timeout and cleanup queries that never return
+ * control with parameters reaperInterval and reaperTimeout when creating a db instance
+* Refactored test helper classes for replicaset tests
+* Allows raw (no bson parser mode for insert, update, remove, find and findOne)
+ * control raw mode passing in option raw:true on the commands
+ * will return buffers with the binary bson objects
+* Fixed memory leak in cursor.toArray
+* Fixed bug in command creation for mongodb server with wrong scope of call
+* Added db(dbName) method to db.js to allow for reuse of connections against other databases
+* Serialization of functions in an object is off by default, override with parameter
+ * serializeFunctions [true/false] on db level, collection level or individual insert/update/findAndModify
+* Added Long.fromString to c++ class and fixed minor bug in the code (Test case for $gt operator on 64-bit integers, Issue #394)
+* FindOne and find now share same code execution and will work in the same manner, Issue #399
+* Fix for tailable cursors, Issue #384
+* Fix for Cursor rewind broken, Issue #389
+* Allow Gridstore.exist to query using regexp, Issue #387, fix by (https://github.com/kaij)
+* Updated documentation on https://github.com/christkv/node-mongodb-native
+* Fixed toJSON methods across all objects for BSON, Binary return Base64 Encoded data
+
+0.9.6-22 2011-10-15
+-------------------
+* Fixed bug in js bson parser that could cause wrong object size on serialization, Issue #370
+* Fixed bug in findAndModify that did not throw error on replicaset timeout, Issue #373
+
+0.9.6-21 2011-10-05
+-------------------
+* Reworked reconnect code to work correctly
+* Handling errors in different parts of the code to ensure that it does not lock the connection
+* Consistent error handling for Object.createFromHexString for JS and C++
+
+0.9.6-20 2011-10-04
+-------------------
+* Reworked bson.js parser to get rid off Array.shift() due to it allocating new memory for each call. Speedup varies between 5-15% depending on doc
+* Reworked bson.cc to throw error when trying to serialize js bson types
+* Added MinKey, MaxKey and Double support for JS and C++ parser
+* Reworked socket handling code to emit errors on unparsable messages
+* Added logger option for Db class, lets you pass in a function in the shape
+ {
+ log : function(message, object) {},
+ error : function(errorMessage, errorObject) {},
+ debug : function(debugMessage, object) {},
+ }
+
+ Usage is new Db(new Server(..), {logger: loggerInstance})
+
+0.9.6-19 2011-09-29
+-------------------
+* Fixing compatibility issues between C++ bson parser and js parser
+* Added Symbol support to C++ parser
+* Fixed socket handling bug for seldom misaligned message from mongodb
+* Correctly handles serialization of functions using the C++ bson parser
+
+0.9.6-18 2011-09-22
+-------------------
+* Fixed bug in waitForConnection that would lead to 100% cpu usage, Issue #352
+
+0.9.6-17 2011-09-21
+-------------------
+* Fixed broken exception test causing bamboo to hang
+* Handling correctly command+lastError when both return results as in findAndModify, Issue #351
+
+0.9.6-16 2011-09-14
+-------------------
+* Fixing a bunch of issues with compatibility with MongoDB 2.0.X branch. Some fairly big changes in behavior from 1.8.X to 2.0.X on the server.
+* Error Connection MongoDB V2.0.0 with Auth=true, Issue #348
+
+0.9.6-15 2011-09-09
+-------------------
+* Fixed issue where pools would not be correctly cleaned up after an error, Issue #345
+* Fixed authentication issue with secondary servers in Replicaset, Issue #334
+* Duplicate replica-set servers when omitting port, Issue #341
+* Fixing findAndModify to correctly work with Replicasets ensuring proper error handling, Issue #336
+* Merged in code from (https://github.com/aheckmann) that checks for global variable leaks
+
+0.9.6-14 2011-09-05
+-------------------
+* Minor fixes for error handling in cursor streaming (https://github.com/sethml), Issue #332
+* Minor doc fixes
+* Some more cursor sort tests added, Issue #333
+* Fixes to work with 0.5.X branch
+* Fix Db not removing reconnect listener from serverConfig, (https://github.com/sbrekken), Issue #337
+* Removed node_events.h includes (https://github.com/jannehietamaki), Issue #339
+* Implement correct safe/strict mode for findAndModify.
+
+0.9.6-13 2011-08-24
+-------------------
+* Db names correctly error checked for illegal characters
+
+0.9.6-12 2011-08-24
+-------------------
+* Nasty bug in GridFS if you changed the default chunk size
+* Fixed error handling bug in findOne
+
+0.9.6-11 2011-08-23
+-------------------
+* Timeout option not correctly making it to the cursor, Issue #320, Fix from (https://github.com/year2013)
+* Fixes for memory leaks when using buffers and C++ parser
+* Fixes to make tests pass on 0.5.X
+* Cleanup of bson.js to remove duplicated code paths
+* Fix for errors occurring in ensureIndex, Issue #326
+* Removing require.paths to make tests work with the 0.5.X branch
+
+0.9.6-10 2011-08-11
+-------------------
+* Specific type Double for capped collections (https://github.com/mbostock), Issue #312
+* Decorating Errors with all all object info from Mongo (https://github.com/laurie71), Issue #308
+* Implementing fixes for mongodb 1.9.1 and higher to make tests pass
+* Admin validateCollection now takes an options argument for you to pass in full option
+* Implemented keepGoing parameter for mongodb 1.9.1 or higher, Issue #310
+* Added test for read_secondary count issue, merged in fix from (https://github.com/year2013), Issue #317
+
+0.9.6-9
+-------
+* Bug fix for bson parsing the key '':'' correctly without crashing
+
+0.9.6-8
+-------
+* Changed to using node.js crypto library MD5 digest
+* Connect method support documented mongodb: syntax by (https://github.com/sethml)
+* Support Symbol type for BSON, serializes to it's own type Symbol, Issue #302, #288
+* Code object without scope serializing to correct BSON type
+* Lot's of fixes to avoid double callbacks (https://github.com/aheckmann) Issue #304
+* Long deserializes as Number for values in the range -2^53 to 2^53, Issue #305 (https://github.com/sethml)
+* Fixed C++ parser to reflect JS parser handling of long deserialization
+* Bson small optimizations
+
+0.9.6-7 2011-07-13
+------------------
+* JS Bson deserialization bug #287
+
+0.9.6-6 2011-07-12
+------------------
+* FindAndModify not returning error message as other methods Issue #277
+* Added test coverage for $push, $pushAll and $inc atomic operations
+* Correct Error handling for non 12/24 bit ids on Pure JS ObjectID class Issue #276
+* Fixed terrible deserialization bug in js bson code #285
+* Fix by andrewjstone to avoid throwing errors when this.primary not defined
+
+0.9.6-5 2011-07-06
+------------------
+* Rewritten BSON js parser now faster than the C parser on my core2duo laptop
+* Added option full to indexInformation to get all index info Issue #265
+* Passing in ObjectID for new Gridstore works correctly Issue #272
+
+0.9.6-4 2011-07-01
+------------------
+* Added test and bug fix for insert/update/remove without callback supplied
+
+0.9.6-3 2011-07-01
+------------------
+* Added simple grid class called Grid with put, get, delete methods
+* Fixed writeBuffer/readBuffer methods on GridStore so they work correctly
+* Automatic handling of buffers when using write method on GridStore
+* GridStore now accepts a ObjectID instead of file name for write and read methods
+* GridStore.list accepts id option to return of file ids instead of filenames
+* GridStore close method returns document for the file allowing user to reference _id field
+
+0.9.6-2 2011-06-30
+------------------
+* Fixes for reconnect logic for server object (replays auth correctly)
+* More testcases for auth
+* Fixes in error handling for replicaset
+* Fixed bug with safe parameter that would fail to execute safe when passing w or wtimeout
+* Fixed slaveOk bug for findOne method
+* Implemented auth support for replicaset and test cases
+* Fixed error when not passing in rs_name
+
+0.9.6-1 2011-06-25
+------------------
+* Fixes for test to run properly using c++ bson parser
+* Fixes for dbref in native parser (correctly handles ref without db component)
+* Connection fixes for replicasets to avoid runtime conditions in cygwin (https://github.com/vincentcr)
+* Fixes for timestamp in js bson parser (distinct timestamp type now)
+
+0.9.6 2011-06-21
+----------------
+* Worked around npm version handling bug
+* Race condition fix for cygwin (https://github.com/vincentcr)
+
+0.9.5-1 2011-06-21
+------------------
+* Extracted Timestamp as separate class for bson js parser to avoid instanceof problems
+* Fixed driver strict mode issue
+
+0.9.5 2011-06-20
+----------------
+* Replicaset support (failover and reading from secondary servers)
+* Removed ServerPair and ServerCluster
+* Added connection pool functionality
+* Fixed serious bug in C++ bson parser where bytes > 127 would generate 2 byte sequences
+* Allows for forcing the server to assign ObjectID's using the option {forceServerObjectId: true}
+
+0.6.8
+-----
+* Removed multiple message concept from bson
+* Changed db.open(db) to be db.open(err, db)
+
+0.1 2010-01-30
+--------------
+* Initial release support of driver using native node.js interface
+* Supports gridfs specification
+* Supports admin functionality
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/LICENSE
new file mode 100644
index 0000000..ad410e1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/LICENSE
@@ -0,0 +1,201 @@
+Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright {yyyy} {name of copyright owner}
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License. \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/Makefile b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/Makefile
new file mode 100644
index 0000000..36e1202
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/Makefile
@@ -0,0 +1,11 @@
+NODE = node
+NPM = npm
+JSDOC = jsdoc
+name = all
+
+generate_docs:
+ # cp -R ./HISTORY.md ./docs/content/meta/release-notes.md
+ hugo -s docs/reference -d ../../public
+ $(JSDOC) -c conf.json -t docs/jsdoc-template/ -d ./public/api
+ cp -R ./public/api/scripts ./public/.
+ cp -R ./public/api/styles ./public/.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/README.md
new file mode 100644
index 0000000..73f2785
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/README.md
@@ -0,0 +1,415 @@
+[![NPM](https://nodei.co/npm/mongodb.png?downloads=true&downloadRank=true)](https://nodei.co/npm/mongodb/) [![NPM](https://nodei.co/npm-dl/mongodb.png?months=6&height=3)](https://nodei.co/npm/mongodb/)
+
+[![Build Status](https://secure.travis-ci.org/mongodb/node-mongodb-native.svg?branch=2.1)](http://travis-ci.org/mongodb/node-mongodb-native)
+[![Coverage Status](https://coveralls.io/repos/github/mongodb/node-mongodb-native/badge.svg?branch=2.1)](https://coveralls.io/github/mongodb/node-mongodb-native?branch=2.1)
+[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/mongodb/node-mongodb-native?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+# Description
+
+The official [MongoDB](https://www.mongodb.com/) driver for Node.js. Provides a high-level API on top of [mongodb-core](https://www.npmjs.com/package/mongodb-core) that is meant for end users.
+
+## MongoDB Node.JS Driver
+
+| what | where |
+|---------------|------------------------------------------------|
+| documentation | http://mongodb.github.io/node-mongodb-native/ |
+| api-doc | http://mongodb.github.io/node-mongodb-native/2.2/api/ |
+| source | https://github.com/mongodb/node-mongodb-native |
+| mongodb | http://www.mongodb.org/ |
+
+### Blogs of Engineers involved in the driver
+- Christian Kvalheim [@christkv](https://twitter.com/christkv) <http://christiankvalheim.com>
+
+### Bugs / Feature Requests
+
+Think you’ve found a bug? Want to see a new feature in node-mongodb-native? Please open a
+case in our issue management tool, JIRA:
+
+- Create an account and login <https://jira.mongodb.org>.
+- Navigate to the NODE project <https://jira.mongodb.org/browse/NODE>.
+- Click **Create Issue** - Please provide as much information as possible about the issue type and how to reproduce it.
+
+Bug reports in JIRA for all driver projects (i.e. NODE, PYTHON, CSHARP, JAVA) and the
+Core Server (i.e. SERVER) project are **public**.
+
+### Questions and Bug Reports
+
+ * mailing list: https://groups.google.com/forum/#!forum/node-mongodb-native
+ * jira: http://jira.mongodb.org/
+
+### Change Log
+
+http://jira.mongodb.org/browse/NODE
+
+# Installation
+
+The recommended way to get started using the Node.js 2.0 driver is by using the `NPM` (Node Package Manager) to install the dependency in your project.
+
+## MongoDB Driver
+
+Given that you have created your own project using `npm init` we install the mongodb driver and it's dependencies by executing the following `NPM` command.
+
+```
+npm install mongodb --save
+```
+
+This will download the MongoDB driver and add a dependency entry in your `package.json` file.
+
+## Troubleshooting
+
+The MongoDB driver depends on several other packages. These are.
+
+* mongodb-core
+* bson
+* kerberos
+* node-gyp
+
+The `kerberos` package is a C++ extension that requires a build environment to be installed on your system. You must be able to build node.js itself to be able to compile and install the `kerberos` module. Furthermore the `kerberos` module requires the MIT Kerberos package to correctly compile on UNIX operating systems. Consult your UNIX operation system package manager what libraries to install.
+
+{{% note class="important" %}}
+Windows already contains the SSPI API used for Kerberos authentication. However you will need to install a full compiler tool chain using visual studio C++ to correctly install the kerberos extension.
+{{% /note %}}
+
+### Diagnosing on UNIX
+
+If you don’t have the build essentials it won’t build. In the case of linux you will need gcc and g++, node.js with all the headers and python. The easiest way to figure out what’s missing is by trying to build the kerberos project. You can do this by performing the following steps.
+
+```
+git clone https://github.com/christkv/kerberos.git
+cd kerberos
+npm install
+```
+
+If all the steps complete you have the right toolchain installed. If you get node-gyp not found you need to install it globally by doing.
+
+```
+npm install -g node-gyp
+```
+
+If correctly compiles and runs the tests you are golden. We can now try to install the mongod driver by performing the following command.
+
+```
+cd yourproject
+npm install mongodb --save
+```
+
+If it still fails the next step is to examine the npm log. Rerun the command but in this case in verbose mode.
+
+```
+npm --loglevel verbose install mongodb
+```
+
+This will print out all the steps npm is performing while trying to install the module.
+
+### Diagnosing on Windows
+
+A known compiler tool chain known to work for compiling `kerberos` on windows is the following.
+
+* Visual Studio c++ 2010 (do not use higher versions)
+* Windows 7 64bit SDK
+* Python 2.7 or higher
+
+Open visual studio command prompt. Ensure node.exe is in your path and install node-gyp.
+
+```
+npm install -g node-gyp
+```
+
+Next you will have to build the project manually to test it. Use any tool you use with git and grab the repo.
+
+```
+git clone https://github.com/christkv/kerberos.git
+cd kerberos
+npm install
+node-gyp rebuild
+```
+
+This should rebuild the driver successfully if you have everything set up correctly.
+
+### Other possible issues
+
+Your python installation might be hosed making gyp break. I always recommend that you test your deployment environment first by trying to build node itself on the server in question as this should unearth any issues with broken packages (and there are a lot of broken packages out there).
+
+Another thing is to ensure your user has write permission to wherever the node modules are being installed.
+
+QuickStart
+==========
+The quick start guide will show you how to setup a simple application using node.js and MongoDB. Its scope is only how to set up the driver and perform the simple crud operations. For more in depth coverage we encourage reading the tutorials.
+
+Create the package.json file
+----------------------------
+Let's create a directory where our application will live. In our case we will put this under our projects directory.
+
+```
+mkdir myproject
+cd myproject
+```
+
+Enter the following command and answer the questions to create the initial structure for your new project
+
+```
+npm init
+```
+
+Next we need to edit the generated package.json file to add the dependency for the MongoDB driver. The package.json file below is just an example and your will look different depending on how you answered the questions after entering `npm init`
+
+```
+{
+ "name": "myproject",
+ "version": "1.0.0",
+ "description": "My first project",
+ "main": "index.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/christkv/myfirstproject.git"
+ },
+ "dependencies": {
+ "mongodb": "~2.0"
+ },
+ "author": "Christian Kvalheim",
+ "license": "Apache 2.0",
+ "bugs": {
+ "url": "https://github.com/christkv/myfirstproject/issues"
+ },
+ "homepage": "https://github.com/christkv/myfirstproject"
+}
+```
+
+Save the file and return to the shell or command prompt and use **NPM** to install all the dependencies.
+
+```
+npm install
+```
+
+You should see **NPM** download a lot of files. Once it's done you'll find all the downloaded packages under the **node_modules** directory.
+
+Booting up a MongoDB Server
+---------------------------
+Let's boot up a MongoDB server instance. Download the right MongoDB version from [MongoDB](http://www.mongodb.org), open a new shell or command line and ensure the **mongod** command is in the shell or command line path. Now let's create a database directory (in our case under **/data**).
+
+```
+mongod --dbpath=/data --port 27017
+```
+
+You should see the **mongod** process start up and print some status information.
+
+Connecting to MongoDB
+---------------------
+Let's create a new **app.js** file that we will use to show the basic CRUD operations using the MongoDB driver.
+
+First let's add code to connect to the server and the database **myproject**.
+
+```js
+var MongoClient = require('mongodb').MongoClient
+ , assert = require('assert');
+
+// Connection URL
+var url = 'mongodb://localhost:27017/myproject';
+// Use connect method to connect to the Server
+MongoClient.connect(url, function(err, db) {
+ assert.equal(null, err);
+ console.log("Connected correctly to server");
+
+ db.close();
+});
+```
+
+Given that you booted up the **mongod** process earlier the application should connect successfully and print **Connected correctly to server** to the console.
+
+Let's Add some code to show the different CRUD operations available.
+
+Inserting a Document
+--------------------
+Let's create a function that will insert some documents for us.
+
+```js
+var insertDocuments = function(db, callback) {
+ // Get the documents collection
+ var collection = db.collection('documents');
+ // Insert some documents
+ collection.insertMany([
+ {a : 1}, {a : 2}, {a : 3}
+ ], function(err, result) {
+ assert.equal(err, null);
+ assert.equal(3, result.result.n);
+ assert.equal(3, result.ops.length);
+ console.log("Inserted 3 documents into the document collection");
+ callback(result);
+ });
+}
+```
+
+The insert command will return a results object that contains several fields that might be useful.
+
+* **result** Contains the result document from MongoDB
+* **ops** Contains the documents inserted with added **_id** fields
+* **connection** Contains the connection used to perform the insert
+
+Let's add call the **insertDocuments** command to the **MongoClient.connect** method callback.
+
+```js
+var MongoClient = require('mongodb').MongoClient
+ , assert = require('assert');
+
+// Connection URL
+var url = 'mongodb://localhost:27017/myproject';
+// Use connect method to connect to the Server
+MongoClient.connect(url, function(err, db) {
+ assert.equal(null, err);
+ console.log("Connected correctly to server");
+
+ insertDocuments(db, function() {
+ db.close();
+ });
+});
+```
+
+We can now run the update **app.js** file.
+
+```
+node app.js
+```
+
+You should see the following output after running the **app.js** file.
+
+```
+Connected correctly to server
+Inserted 3 documents into the document collection
+```
+
+Updating a document
+-------------------
+Let's look at how to do a simple document update by adding a new field **b** to the document that has the field **a** set to **2**.
+
+```js
+var updateDocument = function(db, callback) {
+ // Get the documents collection
+ var collection = db.collection('documents');
+ // Update document where a is 2, set b equal to 1
+ collection.updateOne({ a : 2 }
+ , { $set: { b : 1 } }, function(err, result) {
+ assert.equal(err, null);
+ assert.equal(1, result.result.n);
+ console.log("Updated the document with the field a equal to 2");
+ callback(result);
+ });
+}
+```
+
+The method will update the first document where the field **a** is equal to **2** by adding a new field **b** to the document set to **1**. Let's update the callback function from **MongoClient.connect** to include the update method.
+
+```js
+var MongoClient = require('mongodb').MongoClient
+ , assert = require('assert');
+
+// Connection URL
+var url = 'mongodb://localhost:27017/myproject';
+// Use connect method to connect to the Server
+MongoClient.connect(url, function(err, db) {
+ assert.equal(null, err);
+ console.log("Connected correctly to server");
+
+ insertDocuments(db, function() {
+ updateDocument(db, function() {
+ db.close();
+ });
+ });
+});
+```
+
+Delete a document
+-----------------
+Next lets delete the document where the field **a** equals to **3**.
+
+```js
+var deleteDocument = function(db, callback) {
+ // Get the documents collection
+ var collection = db.collection('documents');
+ // Insert some documents
+ collection.deleteOne({ a : 3 }, function(err, result) {
+ assert.equal(err, null);
+ assert.equal(1, result.result.n);
+ console.log("Removed the document with the field a equal to 3");
+ callback(result);
+ });
+}
+```
+
+This will delete the first document where the field **a** equals to **3**. Let's add the method to the **MongoClient
+.connect** callback function.
+
+```js
+var MongoClient = require('mongodb').MongoClient
+ , assert = require('assert');
+
+// Connection URL
+var url = 'mongodb://localhost:27017/myproject';
+// Use connect method to connect to the Server
+MongoClient.connect(url, function(err, db) {
+ assert.equal(null, err);
+ console.log("Connected correctly to server");
+
+ insertDocuments(db, function() {
+ updateDocument(db, function() {
+ deleteDocument(db, function() {
+ db.close();
+ });
+ });
+ });
+});
+```
+
+Finally let's retrieve all the documents using a simple find.
+
+Find All Documents
+------------------
+We will finish up the Quickstart CRUD methods by performing a simple query that returns all the documents matching the query.
+
+```js
+var findDocuments = function(db, callback) {
+ // Get the documents collection
+ var collection = db.collection('documents');
+ // Find some documents
+ collection.find({}).toArray(function(err, docs) {
+ assert.equal(err, null);
+ assert.equal(2, docs.length);
+ console.log("Found the following records");
+ console.dir(docs);
+ callback(docs);
+ });
+}
+```
+
+This query will return all the documents in the **documents** collection. Since we deleted a document the total
+documents returned is **2**. Finally let's add the findDocument method to the **MongoClient.connect** callback.
+
+```js
+var MongoClient = require('mongodb').MongoClient
+ , assert = require('assert');
+
+// Connection URL
+var url = 'mongodb://localhost:27017/myproject';
+// Use connect method to connect to the Server
+MongoClient.connect(url, function(err, db) {
+ assert.equal(null, err);
+ console.log("Connected correctly to server");
+
+ insertDocuments(db, function() {
+ updateDocument(db, function() {
+ deleteDocument(db, function() {
+ findDocuments(db, function() {
+ db.close();
+ });
+ });
+ });
+ });
+});
+```
+
+This concludes the QuickStart of connecting and performing some Basic operations using the MongoDB Node.js driver. For more detailed information you can look at the tutorials covering more specific topics of interest.
+
+## Next Steps
+
+ * [MongoDB Documentation](http://mongodb.org/)
+ * [Read about Schemas](http://learnmongodbthehardway.com/)
+ * [Star us on GitHub](https://github.com/mongodb/node-mongodb-native)
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/THIRD-PARTY-NOTICES b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/THIRD-PARTY-NOTICES
new file mode 100644
index 0000000..c13e5d9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/THIRD-PARTY-NOTICES
@@ -0,0 +1,41 @@
+Mongodb-core uses third-party libraries or other resources that may
+be distributed under licenses different than the Mongodb-core software.
+
+In the event that we accidentally failed to list a required notice,
+please bring it to our attention through any of the ways detailed here:
+
+ mongodb-dev@googlegroups.com
+
+The attached notices are provided for information only.
+
+For any licenses that require disclosure of source, sources are available at
+https://github.com/mongodb/node-mongodb-native.
+
+1) License Notice for nan.h
+---------------------------
+
+The MIT License (MIT)
+=====================
+
+Copyright (c) 2016 NAN contributors
+-----------------------------------
+
+NAN contributors listed at <https://github.com/nodejs/nan#contributors>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to
+do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/boot_auth.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/boot_auth.js
new file mode 100644
index 0000000..95956c7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/boot_auth.js
@@ -0,0 +1,52 @@
+var ReplSetManager = require('mongodb-topology-manager').ReplSet,
+ f = require('util').format;
+
+var rsOptions = {
+ server: {
+ keyFile: __dirname + '/test/functional/data/keyfile.txt',
+ auth: null,
+ replSet: 'rs'
+ },
+ client: {
+ replSet: 'rs'
+ }
+}
+
+// Set up the nodes
+var nodes = [{
+ options: {
+ bind_ip: 'localhost', port: 31000,
+ dbpath: f('%s/../db/31000', __dirname),
+ }
+}, {
+ options: {
+ bind_ip: 'localhost', port: 31001,
+ dbpath: f('%s/../db/31001', __dirname),
+ }
+}, {
+ options: {
+ bind_ip: 'localhost', port: 31002,
+ dbpath: f('%s/../db/31002', __dirname),
+ }
+}]
+
+// Merge in any node start up options
+for(var i = 0; i < nodes.length; i++) {
+ for(var name in rsOptions.server) {
+ nodes[i].options[name] = rsOptions.server[name];
+ }
+}
+
+// Create a manager
+var replicasetManager = new ReplSetManager('mongod', nodes, rsOptions.client);
+// Purge the set
+replicasetManager.purge().then(function() {
+ // Start the server
+ replicasetManager.start().then(function() {
+ process.exit(0);
+ }).catch(function(e) {
+ console.log("====== ")
+ console.dir(e)
+ // // console.dir(e);
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/conf.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/conf.json
new file mode 100644
index 0000000..aba0b7a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/conf.json
@@ -0,0 +1,73 @@
+{
+ "plugins": ["plugins/markdown", "docs/lib/jsdoc/examples_plugin.js"],
+ "source": {
+ "include": [
+ "test/functional/operation_example_tests.js",
+ "test/functional/operation_promises_example_tests.js",
+ "test/functional/operation_generators_example_tests.js",
+ "test/functional/authentication_tests.js",
+ "test/functional/gridfs_stream_tests.js",
+ "lib/admin.js",
+ "lib/collection.js",
+ "lib/cursor.js",
+ "lib/aggregation_cursor.js",
+ "lib/command_cursor.js",
+ "lib/db.js",
+ "lib/mongo_client.js",
+ "lib/mongos.js",
+ "lib/read_preference.js",
+ "lib/replset.js",
+ "lib/server.js",
+ "lib/bulk/common.js",
+ "lib/bulk/ordered.js",
+ "lib/bulk/unordered.js",
+ "lib/gridfs/grid_store.js",
+ "node_modules/mongodb-core/lib/error.js",
+ "lib/gridfs-stream/index.js",
+ "lib/gridfs-stream/download.js",
+ "lib/gridfs-stream/upload.js",
+ "node_modules/mongodb-core/lib/connection/logger.js",
+ "node_modules/bson/lib/bson/binary.js",
+ "node_modules/bson/lib/bson/code.js",
+ "node_modules/bson/lib/bson/db_ref.js",
+ "node_modules/bson/lib/bson/double.js",
+ "node_modules/bson/lib/bson/long.js",
+ "node_modules/bson/lib/bson/objectid.js",
+ "node_modules/bson/lib/bson/symbol.js",
+ "node_modules/bson/lib/bson/timestamp.js",
+ "node_modules/bson/lib/bson/max_key.js",
+ "node_modules/bson/lib/bson/min_key.js"
+ ]
+ },
+ "templates": {
+ "cleverLinks": true,
+ "monospaceLinks": true,
+ "default": {
+ "outputSourceFiles" : true
+ },
+ "applicationName": "Node.js MongoDB Driver API",
+ "disqus": true,
+ "googleAnalytics": "UA-29229787-1",
+ "openGraph": {
+ "title": "",
+ "type": "website",
+ "image": "",
+ "site_name": "",
+ "url": ""
+ },
+ "meta": {
+ "title": "",
+ "description": "",
+ "keyword": ""
+ },
+ "linenums": true
+ },
+ "markdown": {
+ "parser": "gfm",
+ "hardwrap": true,
+ "tags": ["examples"]
+ },
+ "examples": {
+ "indent": 4
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/index.js
new file mode 100644
index 0000000..5808750
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/index.js
@@ -0,0 +1,55 @@
+// Core module
+var core = require('mongodb-core'),
+ Instrumentation = require('./lib/apm');
+
+// Set up the connect function
+var connect = require('./lib/mongo_client').connect;
+
+// Expose error class
+connect.MongoError = core.MongoError;
+
+// Actual driver classes exported
+connect.Admin = require('./lib/admin');
+connect.MongoClient = require('./lib/mongo_client');
+connect.Db = require('./lib/db');
+connect.Collection = require('./lib/collection');
+connect.Server = require('./lib/server');
+connect.ReplSet = require('./lib/replset');
+connect.Mongos = require('./lib/mongos');
+connect.ReadPreference = require('./lib/read_preference');
+connect.GridStore = require('./lib/gridfs/grid_store');
+connect.Chunk = require('./lib/gridfs/chunk');
+connect.Logger = core.Logger;
+connect.Cursor = require('./lib/cursor');
+connect.GridFSBucket = require('./lib/gridfs-stream');
+// Exported to be used in tests not to be used anywhere else
+connect.CoreServer = require('mongodb-core').Server;
+connect.CoreConnection = require('mongodb-core').Connection;
+
+// BSON types exported
+connect.Binary = core.BSON.Binary;
+connect.Code = core.BSON.Code;
+connect.Map = core.BSON.Map;
+connect.DBRef = core.BSON.DBRef;
+connect.Double = core.BSON.Double;
+connect.Int32 = core.BSON.Int32;
+connect.Long = core.BSON.Long;
+connect.MinKey = core.BSON.MinKey;
+connect.MaxKey = core.BSON.MaxKey;
+connect.ObjectID = core.BSON.ObjectID;
+connect.ObjectId = core.BSON.ObjectID;
+connect.Symbol = core.BSON.Symbol;
+connect.Timestamp = core.BSON.Timestamp;
+connect.Decimal128 = core.BSON.Decimal128;
+
+// Add connect method
+connect.connect = connect;
+
+// Set up the instrumentation method
+connect.instrument = function(options, callback) {
+ if(typeof options == 'function') callback = options, options = {};
+ return new Instrumentation(core, options, callback);
+}
+
+// Set our exports to be the connect function
+module.exports = connect;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/insert_bench.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/insert_bench.js
new file mode 100644
index 0000000..5c4d0b9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/insert_bench.js
@@ -0,0 +1,231 @@
+var MongoClient = require('./').MongoClient,
+ assert = require('assert');
+
+// var memwatch = require('memwatch-next');
+// memwatch.on('leak', function(info) {
+// console.log("======== leak")
+// });
+//
+// memwatch.on('stats', function(stats) {
+// console.log("======== stats")
+// console.dir(stats)
+// });
+
+// // Take first snapshot
+// var hd = new memwatch.HeapDiff();
+
+MongoClient.connect('mongodb://localhost:27017/bench', function(err, db) {
+ var docs = [];
+ var total = 1000;
+ var count = total;
+ var measurements = [];
+
+ // Insert a bunch of documents
+ for(var i = 0; i < 100; i++) {
+ docs.push(JSON.parse(data));
+ }
+
+ var col = db.collection('inserts');
+
+ function execute(col, callback) {
+ var start = new Date().getTime();
+
+ col.find({}).limit(100).toArray(function(e, docs) {
+ measurements.push(new Date().getTime() - start);
+ assert.equal(null, e);
+ callback();
+ });
+ }
+
+ console.log("== insert documents")
+ col.insert(docs, function(e, r) {
+ docs = [];
+ assert.equal(null, e);
+
+ console.log("== start bench")
+ for(var i = 0; i < total; i++) {
+ execute(col, function(e) {
+ count = count - 1;
+
+ if(count == 0) {
+ // Calculate total execution time for operations
+ var totalTime = measurements.reduce(function(prev, curr) {
+ return prev + curr;
+ }, 0);
+
+ console.log("===========================================");
+ console.log("total time: " + totalTime)
+
+ // var diff = hd.end();
+ // console.log("===========================================");
+ // console.log(JSON.stringify(diff, null, 2))
+
+ db.close();
+ process.exit(0)
+ }
+ });
+ }
+ });
+});
+
+var data = JSON.stringify({
+ "data": [
+ {
+ "_id": 1,
+ "x": 11
+ },
+ {
+ "_id": 2,
+ "x": 22
+ },
+ {
+ "_id": 3,
+ "x": 33
+ }
+ ],
+ "collection_name": "test",
+ "database_name": "command-monitoring-tests",
+ "tests": [
+ {
+ "description": "A successful mixed bulk write",
+ "operation": {
+ "name": "bulkWrite",
+ "arguments": {
+ "requests": [
+ {
+ "insertOne": {
+ "document": {
+ "_id": 4,
+ "x": 44
+ }
+ }
+ },
+ {
+ "updateOne": {
+ "filter": {
+ "_id": 3
+ },
+ "update": {
+ "set": {
+ "x": 333
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "expectations": [
+ {
+ "command_started_event": {
+ "command": {
+ "insert": "test",
+ "documents": [
+ {
+ "_id": 4,
+ "x": 44
+ }
+ ],
+ "ordered": true
+ },
+ "command_name": "insert",
+ "database_name": "command-monitoring-tests"
+ }
+ },
+ {
+ "command_succeeded_event": {
+ "reply": {
+ "ok": 1.0,
+ "n": 1
+ },
+ "command_name": "insert"
+ }
+ },
+ {
+ "command_started_event": {
+ "command": {
+ "update": "test",
+ "updates": [
+ {
+ "q": {
+ "_id": 3
+ },
+ "u": {
+ "set": {
+ "x": 333
+ }
+ },
+ "upsert": false,
+ "multi": false
+ }
+ ],
+ "ordered": true
+ },
+ "command_name": "update",
+ "database_name": "command-monitoring-tests"
+ }
+ },
+ {
+ "command_succeeded_event": {
+ "reply": {
+ "ok": 1.0,
+ "n": 1
+ },
+ "command_name": "update"
+ }
+ }
+ ]
+ },
+ {
+ "description": "A successful unordered bulk write with an unacknowledged write concern",
+ "operation": {
+ "name": "bulkWrite",
+ "arguments": {
+ "requests": [
+ {
+ "insertOne": {
+ "document": {
+ "_id": 4,
+ "x": 44
+ }
+ }
+ }
+ ],
+ "ordered": false,
+ "writeConcern": {
+ "w": 0
+ }
+ }
+ },
+ "expectations": [
+ {
+ "command_started_event": {
+ "command": {
+ "insert": "test",
+ "documents": [
+ {
+ "_id": 4,
+ "x": 44
+ }
+ ],
+ "ordered": false,
+ "writeConcern": {
+ "w": 0
+ }
+ },
+ "command_name": "insert",
+ "database_name": "command-monitoring-tests"
+ }
+ },
+ {
+ "command_succeeded_event": {
+ "reply": {
+ "ok": 1.0
+ },
+ "command_name": "insert"
+ }
+ }
+ ]
+ }
+ ]
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/admin.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/admin.js
new file mode 100644
index 0000000..1a16bcb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/admin.js
@@ -0,0 +1,576 @@
+"use strict";
+
+var toError = require('./utils').toError,
+ Define = require('./metadata'),
+ shallowClone = require('./utils').shallowClone;
+
+/**
+ * @fileOverview The **Admin** class is an internal class that allows convenient access to
+ * the admin functionality and commands for MongoDB.
+ *
+ * **ADMIN Cannot directly be instantiated**
+ * @example
+ * var MongoClient = require('mongodb').MongoClient,
+ * test = require('assert');
+ * // Connection url
+ * var url = 'mongodb://localhost:27017/test';
+ * // Connect using MongoClient
+ * MongoClient.connect(url, function(err, db) {
+ * // Use the admin database for the operation
+ * var adminDb = db.admin();
+ *
+ * // List all the available databases
+ * adminDb.listDatabases(function(err, dbs) {
+ * test.equal(null, err);
+ * test.ok(dbs.databases.length > 0);
+ * db.close();
+ * });
+ * });
+ */
+
+/**
+ * Create a new Admin instance (INTERNAL TYPE, do not instantiate directly)
+ * @class
+ * @return {Admin} a collection instance.
+ */
+var Admin = function(db, topology, promiseLibrary) {
+ if(!(this instanceof Admin)) return new Admin(db, topology);
+
+ // Internal state
+ this.s = {
+ db: db
+ , topology: topology
+ , promiseLibrary: promiseLibrary
+ }
+}
+
+var define = Admin.define = new Define('Admin', Admin, false);
+
+/**
+ * The callback format for results
+ * @callback Admin~resultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {object} result The result object if the command was executed successfully.
+ */
+
+/**
+ * Execute a command
+ * @method
+ * @param {object} command The command hash
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {number} [options.maxTimeMS=null] Number of milliseconds to wait before aborting the query.
+ * @param {Admin~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.command = function(command, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ options = args.length ? args.shift() : {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return this.s.db.executeDbAdminCommand(command, options, function(err, doc) {
+ return callback != null ? callback(err, doc) : null;
+ });
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.s.db.executeDbAdminCommand(command, options, function(err, doc) {
+ if(err) return reject(err);
+ resolve(doc);
+ });
+ });
+}
+
+define.classMethod('command', {callback: true, promise:true});
+
+/**
+ * Retrieve the server information for the current
+ * instance of the db client
+ *
+ * @param {Admin~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.buildInfo = function(callback) {
+ var self = this;
+ // Execute using callback
+ if(typeof callback == 'function') return this.serverInfo(callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.serverInfo(function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('buildInfo', {callback: true, promise:true});
+
+/**
+ * Retrieve the server information for the current
+ * instance of the db client
+ *
+ * @param {Admin~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.serverInfo = function(callback) {
+ var self = this;
+ // Execute using callback
+ if(typeof callback == 'function') return this.s.db.executeDbAdminCommand({buildinfo:1}, function(err, doc) {
+ if(err != null) return callback(err, null);
+ callback(null, doc);
+ });
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.s.db.executeDbAdminCommand({buildinfo:1}, function(err, doc) {
+ if(err) return reject(err);
+ resolve(doc);
+ });
+ });
+}
+
+define.classMethod('serverInfo', {callback: true, promise:true});
+
+/**
+ * Retrieve this db's server status.
+ *
+ * @param {Admin~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.serverStatus = function(callback) {
+ var self = this;
+
+ // Execute using callback
+ if(typeof callback == 'function') return serverStatus(self, callback)
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ serverStatus(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var serverStatus = function(self, callback) {
+ self.s.db.executeDbAdminCommand({serverStatus: 1}, function(err, doc) {
+ if(err == null && doc.ok === 1) {
+ callback(null, doc);
+ } else {
+ if(err) return callback(err, false);
+ return callback(toError(doc), false);
+ }
+ });
+}
+
+define.classMethod('serverStatus', {callback: true, promise:true});
+
+/**
+ * Retrieve the current profiling Level for MongoDB
+ *
+ * @param {Admin~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.profilingLevel = function(callback) {
+ var self = this;
+
+ // Execute using callback
+ if(typeof callback == 'function') return profilingLevel(self, callback)
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ profilingLevel(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var profilingLevel = function(self, callback) {
+ self.s.db.executeDbAdminCommand({profile:-1}, function(err, doc) {
+ if(err == null && doc.ok === 1) {
+ var was = doc.was;
+ if(was == 0) return callback(null, "off");
+ if(was == 1) return callback(null, "slow_only");
+ if(was == 2) return callback(null, "all");
+ return callback(new Error("Error: illegal profiling level value " + was), null);
+ } else {
+ err != null ? callback(err, null) : callback(new Error("Error with profile command"), null);
+ }
+ });
+}
+
+define.classMethod('profilingLevel', {callback: true, promise:true});
+
+/**
+ * Ping the MongoDB server and retrieve results
+ *
+ * @param {Admin~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.ping = function(options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 0);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+
+ // Execute using callback
+ if(typeof callback == 'function') return this.s.db.executeDbAdminCommand({ping: 1}, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.s.db.executeDbAdminCommand({ping: 1}, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('ping', {callback: true, promise:true});
+
+/**
+ * Authenticate a user against the server.
+ * @method
+ * @param {string} username The username.
+ * @param {string} [password] The password.
+ * @param {Admin~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.authenticate = function(username, password, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = shallowClone(options);
+ options.authdb = 'admin';
+
+ // Execute using callback
+ if(typeof callback == 'function') return this.s.db.authenticate(username, password, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.s.db.authenticate(username, password, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('authenticate', {callback: true, promise:true});
+
+/**
+ * Logout user from server, fire off on all connections and remove all auth info
+ * @method
+ * @param {Admin~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.logout = function(callback) {
+ var self = this;
+ // Execute using callback
+ if(typeof callback == 'function') return this.s.db.logout({dbName: 'admin'}, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.s.db.logout({dbName: 'admin'}, function(err) {
+ if(err) return reject(err);
+ resolve(true);
+ });
+ });
+}
+
+define.classMethod('logout', {callback: true, promise:true});
+
+// Get write concern
+var writeConcern = function(options, db) {
+ options = shallowClone(options);
+
+ // If options already contain write concerns return it
+ if(options.w || options.wtimeout || options.j || options.fsync) {
+ return options;
+ }
+
+ // Set db write concern if available
+ if(db.writeConcern) {
+ if(options.w) options.w = db.writeConcern.w;
+ if(options.wtimeout) options.wtimeout = db.writeConcern.wtimeout;
+ if(options.j) options.j = db.writeConcern.j;
+ if(options.fsync) options.fsync = db.writeConcern.fsync;
+ }
+
+ // Return modified options
+ return options;
+}
+
+/**
+ * Add a user to the database.
+ * @method
+ * @param {string} username The username.
+ * @param {string} password The password.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.fsync=false] Specify a file sync write concern.
+ * @param {object} [options.customData=null] Custom data associated with the user (only Mongodb 2.6 or higher)
+ * @param {object[]} [options.roles=null] Roles associated with the created user (only Mongodb 2.6 or higher)
+ * @param {Admin~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.addUser = function(username, password, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 2);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ options = args.length ? args.shift() : {};
+ options = options || {};
+ // Get the options
+ options = writeConcern(options, self.s.db)
+ // Set the db name to admin
+ options.dbName = 'admin';
+
+ // Execute using callback
+ if(typeof callback == 'function')
+ return self.s.db.addUser(username, password, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.s.db.addUser(username, password, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('addUser', {callback: true, promise:true});
+
+/**
+ * Remove a user from a database
+ * @method
+ * @param {string} username The username.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.fsync=false] Specify a file sync write concern.
+ * @param {Admin~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.removeUser = function(username, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ options = args.length ? args.shift() : {};
+ options = options || {};
+ // Get the options
+ options = writeConcern(options, self.s.db)
+ // Set the db name
+ options.dbName = 'admin';
+
+ // Execute using callback
+ if(typeof callback == 'function')
+ return self.s.db.removeUser(username, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.s.db.removeUser(username, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('removeUser', {callback: true, promise:true});
+
+/**
+ * Set the current profiling level of MongoDB
+ *
+ * @param {string} level The new profiling level (off, slow_only, all).
+ * @param {Admin~resultCallback} [callback] The command result callback.
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.setProfilingLevel = function(level, callback) {
+ var self = this;
+
+ // Execute using callback
+ if(typeof callback == 'function') return setProfilingLevel(self, level, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ setProfilingLevel(self, level, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var setProfilingLevel = function(self, level, callback) {
+ var command = {};
+ var profile = 0;
+
+ if(level == "off") {
+ profile = 0;
+ } else if(level == "slow_only") {
+ profile = 1;
+ } else if(level == "all") {
+ profile = 2;
+ } else {
+ return callback(new Error("Error: illegal profiling level value " + level));
+ }
+
+ // Set up the profile number
+ command['profile'] = profile;
+
+ self.s.db.executeDbAdminCommand(command, function(err, doc) {
+ if(err == null && doc.ok === 1)
+ return callback(null, level);
+ return err != null ? callback(err, null) : callback(new Error("Error with profile command"), null);
+ });
+}
+
+define.classMethod('setProfilingLevel', {callback: true, promise:true});
+
+/**
+ * Retrive the current profiling information for MongoDB
+ *
+ * @param {Admin~resultCallback} [callback] The command result callback.
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.profilingInfo = function(callback) {
+ var self = this;
+
+ // Execute using callback
+ if(typeof callback == 'function') return profilingInfo(self, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ profilingInfo(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var profilingInfo = function(self, callback) {
+ try {
+ self.s.topology.cursor("admin.system.profile", { find: 'system.profile', query: {}}, {}).toArray(callback);
+ } catch (err) {
+ return callback(err, null);
+ }
+}
+
+define.classMethod('profilingLevel', {callback: true, promise:true});
+
+/**
+ * Validate an existing collection
+ *
+ * @param {string} collectionName The name of the collection to validate.
+ * @param {object} [options=null] Optional settings.
+ * @param {Admin~resultCallback} [callback] The command result callback.
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.validateCollection = function(collectionName, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ options = args.length ? args.shift() : {};
+ options = options || {};
+
+ // Execute using callback
+ if(typeof callback == 'function')
+ return validateCollection(self, collectionName, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ validateCollection(self, collectionName, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var validateCollection = function(self, collectionName, options, callback) {
+ var command = {validate: collectionName};
+ var keys = Object.keys(options);
+
+ // Decorate command with extra options
+ for(var i = 0; i < keys.length; i++) {
+ if(options.hasOwnProperty(keys[i])) {
+ command[keys[i]] = options[keys[i]];
+ }
+ }
+
+ self.s.db.command(command, function(err, doc) {
+ if(err != null) return callback(err, null);
+
+ if(doc.ok === 0)
+ return callback(new Error("Error with validate command"), null);
+ if(doc.result != null && doc.result.constructor != String)
+ return callback(new Error("Error with validation data"), null);
+ if(doc.result != null && doc.result.match(/exception|corrupt/) != null)
+ return callback(new Error("Error: invalid collection " + collectionName), null);
+ if(doc.valid != null && !doc.valid)
+ return callback(new Error("Error: invalid collection " + collectionName), null);
+
+ return callback(null, doc);
+ });
+}
+
+define.classMethod('validateCollection', {callback: true, promise:true});
+
+/**
+ * List the available databases
+ *
+ * @param {Admin~resultCallback} [callback] The command result callback.
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.listDatabases = function(callback) {
+ var self = this;
+ // Execute using callback
+ if(typeof callback == 'function') return self.s.db.executeDbAdminCommand({listDatabases:1}, {}, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.s.db.executeDbAdminCommand({listDatabases:1}, {}, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('listDatabases', {callback: true, promise:true});
+
+/**
+ * Get ReplicaSet status
+ *
+ * @param {Admin~resultCallback} [callback] The command result callback.
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.replSetGetStatus = function(callback) {
+ var self = this;
+ // Execute using callback
+ if(typeof callback == 'function') return replSetGetStatus(self, callback);
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ replSetGetStatus(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var replSetGetStatus = function(self, callback) {
+ self.s.db.executeDbAdminCommand({replSetGetStatus:1}, function(err, doc) {
+ if(err == null && doc.ok === 1)
+ return callback(null, doc);
+ if(err) return callback(err, false);
+ callback(toError(doc), false);
+ });
+}
+
+define.classMethod('replSetGetStatus', {callback: true, promise:true});
+
+module.exports = Admin;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/aggregation_cursor.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/aggregation_cursor.js
new file mode 100644
index 0000000..0448cb0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/aggregation_cursor.js
@@ -0,0 +1,429 @@
+"use strict";
+
+var inherits = require('util').inherits
+ , MongoError = require('mongodb-core').MongoError
+ , Readable = require('stream').Readable || require('readable-stream').Readable
+ , Define = require('./metadata')
+ , CoreCursor = require('./cursor');
+
+/**
+ * @fileOverview The **AggregationCursor** class is an internal class that embodies an aggregation cursor on MongoDB
+ * allowing for iteration over the results returned from the underlying query. It supports
+ * one by one document iteration, conversion to an array or can be iterated as a Node 0.10.X
+ * or higher stream
+ *
+ * **AGGREGATIONCURSOR Cannot directly be instantiated**
+ * @example
+ * var MongoClient = require('mongodb').MongoClient,
+ * test = require('assert');
+ * // Connection url
+ * var url = 'mongodb://localhost:27017/test';
+ * // Connect using MongoClient
+ * MongoClient.connect(url, function(err, db) {
+ * // Create a collection we want to drop later
+ * var col = db.collection('createIndexExample1');
+ * // Insert a bunch of documents
+ * col.insert([{a:1, b:1}
+ * , {a:2, b:2}, {a:3, b:3}
+ * , {a:4, b:4}], {w:1}, function(err, result) {
+ * test.equal(null, err);
+ * // Show that duplicate records got dropped
+ * col.aggregation({}, {cursor: {}}).toArray(function(err, items) {
+ * test.equal(null, err);
+ * test.equal(4, items.length);
+ * db.close();
+ * });
+ * });
+ * });
+ */
+
+/**
+ * Namespace provided by the browser.
+ * @external Readable
+ */
+
+/**
+ * Creates a new Aggregation Cursor instance (INTERNAL TYPE, do not instantiate directly)
+ * @class AggregationCursor
+ * @extends external:Readable
+ * @fires AggregationCursor#data
+ * @fires AggregationCursor#end
+ * @fires AggregationCursor#close
+ * @fires AggregationCursor#readable
+ * @return {AggregationCursor} an AggregationCursor instance.
+ */
+var AggregationCursor = function(bson, ns, cmd, options, topology, topologyOptions) {
+ CoreCursor.apply(this, Array.prototype.slice.call(arguments, 0));
+ var state = AggregationCursor.INIT;
+ var streamOptions = {};
+
+ // MaxTimeMS
+ var maxTimeMS = null;
+
+ // Get the promiseLibrary
+ var promiseLibrary = options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // Set up
+ Readable.call(this, {objectMode: true});
+
+ // Internal state
+ this.s = {
+ // MaxTimeMS
+ maxTimeMS: maxTimeMS
+ // State
+ , state: state
+ // Stream options
+ , streamOptions: streamOptions
+ // BSON
+ , bson: bson
+ // Namespae
+ , ns: ns
+ // Command
+ , cmd: cmd
+ // Options
+ , options: options
+ // Topology
+ , topology: topology
+ // Topology Options
+ , topologyOptions: topologyOptions
+ // Promise library
+ , promiseLibrary: promiseLibrary
+ }
+}
+
+/**
+ * AggregationCursor stream data event, fired for each document in the cursor.
+ *
+ * @event AggregationCursor#data
+ * @type {object}
+ */
+
+/**
+ * AggregationCursor stream end event
+ *
+ * @event AggregationCursor#end
+ * @type {null}
+ */
+
+/**
+ * AggregationCursor stream close event
+ *
+ * @event AggregationCursor#close
+ * @type {null}
+ */
+
+/**
+ * AggregationCursor stream readable event
+ *
+ * @event AggregationCursor#readable
+ * @type {null}
+ */
+
+// Inherit from Readable
+inherits(AggregationCursor, Readable);
+
+// Extend the Cursor
+for(var name in CoreCursor.prototype) {
+ AggregationCursor.prototype[name] = CoreCursor.prototype[name];
+}
+
+var define = AggregationCursor.define = new Define('AggregationCursor', AggregationCursor, true);
+
+/**
+ * Set the batch size for the cursor.
+ * @method
+ * @param {number} value The batchSize for the cursor.
+ * @throws {MongoError}
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.batchSize = function(value) {
+ if(this.s.state == AggregationCursor.CLOSED || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true });
+ if(typeof value != 'number') throw MongoError.create({message: "batchSize requires an integer", drvier:true });
+ if(this.s.cmd.cursor) this.s.cmd.cursor.batchSize = value;
+ this.setCursorBatchSize(value);
+ return this;
+}
+
+define.classMethod('batchSize', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a geoNear stage to the aggregation pipeline
+ * @method
+ * @param {object} document The geoNear stage document.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.geoNear = function(document) {
+ this.s.cmd.pipeline.push({$geoNear: document});
+ return this;
+}
+
+define.classMethod('geoNear', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a group stage to the aggregation pipeline
+ * @method
+ * @param {object} document The group stage document.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.group = function(document) {
+ this.s.cmd.pipeline.push({$group: document});
+ return this;
+}
+
+define.classMethod('group', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a limit stage to the aggregation pipeline
+ * @method
+ * @param {number} value The state limit value.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.limit = function(value) {
+ this.s.cmd.pipeline.push({$limit: value});
+ return this;
+}
+
+define.classMethod('limit', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a match stage to the aggregation pipeline
+ * @method
+ * @param {object} document The match stage document.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.match = function(document) {
+ this.s.cmd.pipeline.push({$match: document});
+ return this;
+}
+
+define.classMethod('match', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a maxTimeMS stage to the aggregation pipeline
+ * @method
+ * @param {number} value The state maxTimeMS value.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.maxTimeMS = function(value) {
+ if(this.s.topology.lastIsMaster().minWireVersion > 2) {
+ this.s.cmd.maxTimeMS = value;
+ }
+ return this;
+}
+
+define.classMethod('maxTimeMS', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a out stage to the aggregation pipeline
+ * @method
+ * @param {number} destination The destination name.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.out = function(destination) {
+ this.s.cmd.pipeline.push({$out: destination});
+ return this;
+}
+
+define.classMethod('out', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a project stage to the aggregation pipeline
+ * @method
+ * @param {object} document The project stage document.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.project = function(document) {
+ this.s.cmd.pipeline.push({$project: document});
+ return this;
+}
+
+define.classMethod('project', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a lookup stage to the aggregation pipeline
+ * @method
+ * @param {object} document The lookup stage document.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.lookup = function(document) {
+ this.s.cmd.pipeline.push({$lookup: document});
+ return this;
+}
+
+define.classMethod('lookup', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a redact stage to the aggregation pipeline
+ * @method
+ * @param {object} document The redact stage document.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.redact = function(document) {
+ this.s.cmd.pipeline.push({$redact: document});
+ return this;
+}
+
+define.classMethod('redact', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a skip stage to the aggregation pipeline
+ * @method
+ * @param {number} value The state skip value.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.skip = function(value) {
+ this.s.cmd.pipeline.push({$skip: value});
+ return this;
+}
+
+define.classMethod('skip', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a sort stage to the aggregation pipeline
+ * @method
+ * @param {object} document The sort stage document.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.sort = function(document) {
+ this.s.cmd.pipeline.push({$sort: document});
+ return this;
+}
+
+define.classMethod('sort', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a unwind stage to the aggregation pipeline
+ * @method
+ * @param {number} field The unwind field name.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.unwind = function(field) {
+ this.s.cmd.pipeline.push({$unwind: field});
+ return this;
+}
+
+define.classMethod('unwind', {callback: false, promise:false, returns: [AggregationCursor]});
+
+AggregationCursor.prototype.get = AggregationCursor.prototype.toArray;
+
+// Inherited methods
+define.classMethod('toArray', {callback: true, promise:true});
+define.classMethod('each', {callback: true, promise:false});
+define.classMethod('forEach', {callback: true, promise:false});
+define.classMethod('next', {callback: true, promise:true});
+define.classMethod('close', {callback: true, promise:true});
+define.classMethod('isClosed', {callback: false, promise:false, returns: [Boolean]});
+define.classMethod('rewind', {callback: false, promise:false});
+define.classMethod('bufferedCount', {callback: false, promise:false, returns: [Number]});
+define.classMethod('readBufferedDocuments', {callback: false, promise:false, returns: [Array]});
+
+/**
+ * Get the next available document from the cursor, returns null if no more documents are available.
+ * @function AggregationCursor.prototype.next
+ * @param {AggregationCursor~resultCallback} [callback] The result callback.
+ * @throws {MongoError}
+ * @return {Promise} returns Promise if no callback passed
+ */
+
+/**
+ * The callback format for results
+ * @callback AggregationCursor~toArrayResultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {object[]} documents All the documents the satisfy the cursor.
+ */
+
+/**
+ * Returns an array of documents. The caller is responsible for making sure that there
+ * is enough memory to store the results. Note that the array only contain partial
+ * results when this cursor had been previouly accessed. In that case,
+ * cursor.rewind() can be used to reset the cursor.
+ * @method AggregationCursor.prototype.toArray
+ * @param {AggregationCursor~toArrayResultCallback} [callback] The result callback.
+ * @throws {MongoError}
+ * @return {Promise} returns Promise if no callback passed
+ */
+
+/**
+ * The callback format for results
+ * @callback AggregationCursor~resultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {(object|null)} result The result object if the command was executed successfully.
+ */
+
+/**
+ * Iterates over all the documents for this cursor. As with **{cursor.toArray}**,
+ * not all of the elements will be iterated if this cursor had been previouly accessed.
+ * In that case, **{cursor.rewind}** can be used to reset the cursor. However, unlike
+ * **{cursor.toArray}**, the cursor will only hold a maximum of batch size elements
+ * at any given time if batch size is specified. Otherwise, the caller is responsible
+ * for making sure that the entire result can fit the memory.
+ * @method AggregationCursor.prototype.each
+ * @param {AggregationCursor~resultCallback} callback The result callback.
+ * @throws {MongoError}
+ * @return {null}
+ */
+
+/**
+ * Close the cursor, sending a AggregationCursor command and emitting close.
+ * @method AggregationCursor.prototype.close
+ * @param {AggregationCursor~resultCallback} [callback] The result callback.
+ * @return {Promise} returns Promise if no callback passed
+ */
+
+/**
+ * Is the cursor closed
+ * @method AggregationCursor.prototype.isClosed
+ * @return {boolean}
+ */
+
+/**
+ * Execute the explain for the cursor
+ * @method AggregationCursor.prototype.explain
+ * @param {AggregationCursor~resultCallback} [callback] The result callback.
+ * @return {Promise} returns Promise if no callback passed
+ */
+
+/**
+ * Clone the cursor
+ * @function AggregationCursor.prototype.clone
+ * @return {AggregationCursor}
+ */
+
+/**
+ * Resets the cursor
+ * @function AggregationCursor.prototype.rewind
+ * @return {AggregationCursor}
+ */
+
+/**
+ * The callback format for the forEach iterator method
+ * @callback AggregationCursor~iteratorCallback
+ * @param {Object} doc An emitted document for the iterator
+ */
+
+/**
+ * The callback error format for the forEach iterator method
+ * @callback AggregationCursor~endCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ */
+
+/*
+ * Iterates over all the documents for this cursor using the iterator, callback pattern.
+ * @method AggregationCursor.prototype.forEach
+ * @param {AggregationCursor~iteratorCallback} iterator The iteration callback.
+ * @param {AggregationCursor~endCallback} callback The end callback.
+ * @throws {MongoError}
+ * @return {null}
+ */
+
+AggregationCursor.INIT = 0;
+AggregationCursor.OPEN = 1;
+AggregationCursor.CLOSED = 2;
+
+module.exports = AggregationCursor;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/apm.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/apm.js
new file mode 100644
index 0000000..ad912e2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/apm.js
@@ -0,0 +1,594 @@
+var EventEmitter = require('events').EventEmitter,
+ inherits = require('util').inherits;
+
+// Get prototypes
+var AggregationCursor = require('./aggregation_cursor'),
+ CommandCursor = require('./command_cursor'),
+ OrderedBulkOperation = require('./bulk/ordered').OrderedBulkOperation,
+ UnorderedBulkOperation = require('./bulk/unordered').UnorderedBulkOperation,
+ GridStore = require('./gridfs/grid_store'),
+ Cursor = require('./cursor'),
+ Collection = require('./collection'),
+ Db = require('./db');
+
+var basicOperationIdGenerator = {
+ operationId: 1,
+
+ next: function() {
+ return this.operationId++;
+ }
+}
+
+var basicTimestampGenerator = {
+ current: function() {
+ return new Date().getTime();
+ },
+
+ duration: function(start, end) {
+ return end - start;
+ }
+}
+
+var senstiveCommands = ['authenticate', 'saslStart', 'saslContinue', 'getnonce',
+ 'createUser', 'updateUser', 'copydbgetnonce', 'copydbsaslstart', 'copydb'];
+
+var Instrumentation = function(core, options, callback) {
+ options = options || {};
+
+ // Optional id generators
+ var operationIdGenerator = options.operationIdGenerator || basicOperationIdGenerator;
+ // Optional timestamp generator
+ var timestampGenerator = options.timestampGenerator || basicTimestampGenerator;
+ // Extend with event emitter functionality
+ EventEmitter.call(this);
+
+ // Contains all the instrumentation overloads
+ this.overloads = [];
+
+ // ---------------------------------------------------------
+ //
+ // Instrument prototype
+ //
+ // ---------------------------------------------------------
+
+ var instrumentPrototype = function(callback) {
+ var instrumentations = []
+
+ // Classes to support
+ var classes = [GridStore, OrderedBulkOperation, UnorderedBulkOperation,
+ CommandCursor, AggregationCursor, Cursor, Collection, Db];
+
+ // Add instrumentations to the available list
+ for(var i = 0; i < classes.length; i++) {
+ if(classes[i].define) {
+ instrumentations.push(classes[i].define.generate());
+ }
+ }
+
+ // Return the list of instrumentation points
+ callback(null, instrumentations);
+ }
+
+ // Did the user want to instrument the prototype
+ if(typeof callback == 'function') {
+ instrumentPrototype(callback);
+ }
+
+ // ---------------------------------------------------------
+ //
+ // Server
+ //
+ // ---------------------------------------------------------
+
+ // Reference
+ var self = this;
+ // Names of methods we need to wrap
+ var methods = ['command', 'insert', 'update', 'remove'];
+ // Prototype
+ var proto = core.Server.prototype;
+ // Core server method we are going to wrap
+ methods.forEach(function(x) {
+ var func = proto[x];
+
+ // Add to overloaded methods
+ self.overloads.push({proto: proto, name:x, func:func});
+
+ // The actual prototype
+ proto[x] = function() {
+ var requestId = core.Query.nextRequestId();
+ // Get the aruments
+ var args = Array.prototype.slice.call(arguments, 0);
+ var ns = args[0];
+ var commandObj = args[1];
+ var options = args[2] || {};
+ var keys = Object.keys(commandObj);
+ var commandName = keys[0];
+ var db = ns.split('.')[0];
+
+ // Get the collection
+ var col = ns.split('.');
+ col.shift();
+ col = col.join('.');
+
+ // Do we have a legacy insert/update/remove command
+ if(x == 'insert') { //} && !this.lastIsMaster().maxWireVersion) {
+ commandName = 'insert';
+
+ // Re-write the command
+ commandObj = {
+ insert: col, documents: commandObj
+ }
+
+ if(options.writeConcern && Object.keys(options.writeConcern).length > 0) {
+ commandObj.writeConcern = options.writeConcern;
+ }
+
+ commandObj.ordered = options.ordered != undefined ? options.ordered : true;
+ } else if(x == 'update') { // && !this.lastIsMaster().maxWireVersion) {
+ commandName = 'update';
+
+ // Re-write the command
+ commandObj = {
+ update: col, updates: commandObj
+ }
+
+ if(options.writeConcern && Object.keys(options.writeConcern).length > 0) {
+ commandObj.writeConcern = options.writeConcern;
+ }
+
+ commandObj.ordered = options.ordered != undefined ? options.ordered : true;
+ } else if(x == 'remove') { //&& !this.lastIsMaster().maxWireVersion) {
+ commandName = 'delete';
+
+ // Re-write the command
+ commandObj = {
+ delete: col, deletes: commandObj
+ }
+
+ if(options.writeConcern && Object.keys(options.writeConcern).length > 0) {
+ commandObj.writeConcern = options.writeConcern;
+ }
+
+ commandObj.ordered = options.ordered != undefined ? options.ordered : true;
+ }
+
+ // Get the callback
+ var callback = args.pop();
+ // Set current callback operation id from the current context or create
+ // a new one
+ var ourOpId = callback.operationId || operationIdGenerator.next();
+
+ // Get a connection reference for this server instance
+ var connection = this.s.pool.get()
+
+ // Emit the start event for the command
+ var command = {
+ // Returns the command.
+ command: commandObj,
+ // Returns the database name.
+ databaseName: db,
+ // Returns the command name.
+ commandName: commandName,
+ // Returns the driver generated request id.
+ requestId: requestId,
+ // Returns the driver generated operation id.
+ // This is used to link events together such as bulk write operations. OPTIONAL.
+ operationId: ourOpId,
+ // Returns the connection id for the command. For languages that do not have this,
+ // this MUST return the driver equivalent which MUST include the server address and port.
+ // The name of this field is flexible to match the object that is returned from the driver.
+ connectionId: connection
+ };
+
+ // Filter out any sensitive commands
+ if(senstiveCommands.indexOf(commandName.toLowerCase())) {
+ command.commandObj = {};
+ command.commandObj[commandName] = true;
+ }
+
+ // Emit the started event
+ self.emit('started', command)
+
+ // Start time
+ var startTime = timestampGenerator.current();
+
+ // Push our handler callback
+ args.push(function(err, r) {
+ var endTime = timestampGenerator.current();
+ var command = {
+ duration: timestampGenerator.duration(startTime, endTime),
+ commandName: commandName,
+ requestId: requestId,
+ operationId: ourOpId,
+ connectionId: connection
+ };
+
+ // If we have an error
+ if(err || (r && r.result && r.result.ok == 0)) {
+ command.failure = err || r.result.writeErrors || r.result;
+
+ // Filter out any sensitive commands
+ if(senstiveCommands.indexOf(commandName.toLowerCase())) {
+ command.failure = {};
+ }
+
+ self.emit('failed', command);
+ } else if(commandObj && commandObj.writeConcern
+ && commandObj.writeConcern.w == 0) {
+ // If we have write concern 0
+ command.reply = {ok:1};
+ self.emit('succeeded', command);
+ } else {
+ command.reply = r && r.result ? r.result : r;
+
+ // Filter out any sensitive commands
+ if(senstiveCommands.indexOf(commandName.toLowerCase()) != -1) {
+ command.reply = {};
+ }
+
+ self.emit('succeeded', command);
+ }
+
+ // Return to caller
+ callback(err, r);
+ });
+
+ // Apply the call
+ func.apply(this, args);
+ }
+ });
+
+ // ---------------------------------------------------------
+ //
+ // Bulk Operations
+ //
+ // ---------------------------------------------------------
+
+ // Inject ourselves into the Bulk methods
+ methods = ['execute'];
+ var prototypes = [
+ require('./bulk/ordered').Bulk.prototype,
+ require('./bulk/unordered').Bulk.prototype
+ ]
+
+ prototypes.forEach(function(proto) {
+ // Core server method we are going to wrap
+ methods.forEach(function(x) {
+ var func = proto[x];
+
+ // Add to overloaded methods
+ self.overloads.push({proto: proto, name:x, func:func});
+
+ // The actual prototype
+ proto[x] = function() {
+ // Get the aruments
+ var args = Array.prototype.slice.call(arguments, 0);
+ // Set an operation Id on the bulk object
+ this.operationId = operationIdGenerator.next();
+
+ // Get the callback
+ var callback = args.pop();
+ // If we have a callback use this
+ if(typeof callback == 'function') {
+ args.push(function(err, r) {
+ // Return to caller
+ callback(err, r);
+ });
+
+ // Apply the call
+ func.apply(this, args);
+ } else {
+ return func.apply(this, args);
+ }
+ }
+ });
+ });
+
+ // ---------------------------------------------------------
+ //
+ // Cursor
+ //
+ // ---------------------------------------------------------
+
+ // Inject ourselves into the Cursor methods
+ methods = ['_find', '_getmore', '_killcursor'];
+ prototypes = [
+ require('./cursor').prototype,
+ require('./command_cursor').prototype,
+ require('./aggregation_cursor').prototype
+ ]
+
+ // Command name translation
+ var commandTranslation = {
+ '_find': 'find', '_getmore': 'getMore', '_killcursor': 'killCursors', '_explain': 'explain'
+ }
+
+ prototypes.forEach(function(proto) {
+
+ // Core server method we are going to wrap
+ methods.forEach(function(x) {
+ var func = proto[x];
+
+ // Add to overloaded methods
+ self.overloads.push({proto: proto, name:x, func:func});
+
+ // The actual prototype
+ proto[x] = function() {
+ var cursor = this;
+ var requestId = core.Query.nextRequestId();
+ var ourOpId = operationIdGenerator.next();
+ var parts = this.ns.split('.');
+ var db = parts[0];
+
+ // Get the collection
+ parts.shift();
+ var collection = parts.join('.');
+
+ // Set the command
+ var command = this.query;
+ var cmd = this.s.cmd;
+
+ // If we have a find method, set the operationId on the cursor
+ if(x == '_find') {
+ cursor.operationId = ourOpId;
+ }
+
+ // Do we have a find command rewrite it
+ if(x == '_getmore') {
+ command = {
+ getMore: this.cursorState.cursorId,
+ collection: collection,
+ batchSize: cmd.batchSize
+ }
+
+ if(cmd.maxTimeMS) command.maxTimeMS = cmd.maxTimeMS;
+ } else if(x == '_killcursor') {
+ command = {
+ killCursors: collection,
+ cursors: [this.cursorState.cursorId]
+ }
+ } else if(cmd.find) {
+ command = {
+ find: collection, filter: cmd.query
+ }
+
+ if(cmd.sort) command.sort = cmd.sort;
+ if(cmd.fields) command.projection = cmd.fields;
+ if(cmd.limit && cmd.limit < 0) {
+ command.limit = Math.abs(cmd.limit);
+ command.singleBatch = true;
+ } else if(cmd.limit) {
+ command.limit = Math.abs(cmd.limit);
+ }
+
+ // Options
+ if(cmd.skip) command.skip = cmd.skip;
+ if(cmd.hint) command.hint = cmd.hint;
+ if(cmd.batchSize) command.batchSize = cmd.batchSize;
+ if(typeof cmd.returnKey == 'boolean') command.returnKey = cmd.returnKey;
+ if(cmd.comment) command.comment = cmd.comment;
+ if(cmd.min) command.min = cmd.min;
+ if(cmd.max) command.max = cmd.max;
+ if(cmd.maxScan) command.maxScan = cmd.maxScan;
+ if(cmd.maxTimeMS) command.maxTimeMS = cmd.maxTimeMS;
+
+ // Flags
+ if(typeof cmd.awaitData == 'boolean') command.awaitData = cmd.awaitData;
+ if(typeof cmd.snapshot == 'boolean') command.snapshot = cmd.snapshot;
+ if(typeof cmd.tailable == 'boolean') command.tailable = cmd.tailable;
+ if(typeof cmd.oplogReplay == 'boolean') command.oplogReplay = cmd.oplogReplay;
+ if(typeof cmd.noCursorTimeout == 'boolean') command.noCursorTimeout = cmd.noCursorTimeout;
+ if(typeof cmd.partial == 'boolean') command.partial = cmd.partial;
+ if(typeof cmd.showDiskLoc == 'boolean') command.showRecordId = cmd.showDiskLoc;
+
+ // Read Concern
+ if(cmd.readConcern) command.readConcern = cmd.readConcern;
+
+ // Override method
+ if(cmd.explain) command.explain = cmd.explain;
+ if(cmd.exhaust) command.exhaust = cmd.exhaust;
+
+ // If we have a explain flag
+ if(cmd.explain) {
+ // Create fake explain command
+ command = {
+ explain: command,
+ verbosity: 'allPlansExecution'
+ }
+
+ // Set readConcern on the command if available
+ if(cmd.readConcern) command.readConcern = cmd.readConcern
+
+ // Set up the _explain name for the command
+ x = '_explain';
+ }
+ } else {
+ command = cmd;
+ }
+
+ // Set up the connection
+ var connectionId = null;
+
+ // Set local connection
+ if(this.connection) connectionId = this.connection;
+ if(!connectionId && this.server && this.server.getConnection) connectionId = this.server.getConnection();
+
+ // Get the command Name
+ var commandName = x == '_find' ? Object.keys(command)[0] : commandTranslation[x];
+
+ // Emit the start event for the command
+ command = {
+ // Returns the command.
+ command: command,
+ // Returns the database name.
+ databaseName: db,
+ // Returns the command name.
+ commandName: commandName,
+ // Returns the driver generated request id.
+ requestId: requestId,
+ // Returns the driver generated operation id.
+ // This is used to link events together such as bulk write operations. OPTIONAL.
+ operationId: this.operationId,
+ // Returns the connection id for the command. For languages that do not have this,
+ // this MUST return the driver equivalent which MUST include the server address and port.
+ // The name of this field is flexible to match the object that is returned from the driver.
+ connectionId: connectionId
+ };
+
+ // Get the aruments
+ var args = Array.prototype.slice.call(arguments, 0);
+
+ // Get the callback
+ var callback = args.pop();
+
+ // We do not have a callback but a Promise
+ if(typeof callback == 'function' || command.commandName == 'killCursors') {
+ var startTime = timestampGenerator.current();
+ // Emit the started event
+ self.emit('started', command)
+
+ // Emit succeeded event with killcursor if we have a legacy protocol
+ if(command.commandName == 'killCursors'
+ && this.server.lastIsMaster()
+ && this.server.lastIsMaster().maxWireVersion < 4) {
+ // Emit the succeeded command
+ command = {
+ duration: timestampGenerator.duration(startTime, timestampGenerator.current()),
+ commandName: commandName,
+ requestId: requestId,
+ operationId: cursor.operationId,
+ connectionId: cursor.server.getConnection(),
+ reply: [{ok:1}]
+ };
+
+ // Apply callback to the list of args
+ args.push(callback);
+ // Apply the call
+ func.apply(this, args);
+ // Emit the command
+ return self.emit('succeeded', command)
+ }
+
+ // Add our callback handler
+ args.push(function(err, r) {
+ if(err) {
+ // Command
+ var command = {
+ duration: timestampGenerator.duration(startTime, timestampGenerator.current()),
+ commandName: commandName,
+ requestId: requestId,
+ operationId: ourOpId,
+ connectionId: cursor.server.getConnection(),
+ failure: err };
+
+ // Emit the command
+ self.emit('failed', command)
+ } else {
+ // Do we have a getMore
+ if(commandName.toLowerCase() == 'getmore' && r == null) {
+ r = {
+ cursor: {
+ id: cursor.cursorState.cursorId,
+ ns: cursor.ns,
+ nextBatch: cursor.cursorState.documents
+ }, ok:1
+ }
+ } else if(commandName.toLowerCase() == 'find' && r == null) {
+ r = {
+ cursor: {
+ id: cursor.cursorState.cursorId,
+ ns: cursor.ns,
+ firstBatch: cursor.cursorState.documents
+ }, ok:1
+ }
+ } else if(commandName.toLowerCase() == 'killcursors' && r == null) {
+ r = {
+ cursorsUnknown:[cursor.cursorState.lastCursorId],
+ ok:1
+ }
+ }
+
+ // cursor id is zero, we can issue success command
+ command = {
+ duration: timestampGenerator.duration(startTime, timestampGenerator.current()),
+ commandName: commandName,
+ requestId: requestId,
+ operationId: cursor.operationId,
+ connectionId: cursor.server.getConnection(),
+ reply: r && r.result ? r.result : r
+ };
+
+ // Emit the command
+ self.emit('succeeded', command)
+ }
+
+ // Return
+ if(!callback) return;
+
+ // Return to caller
+ callback(err, r);
+ });
+
+ // Apply the call
+ func.apply(this, args);
+ } else {
+ // Assume promise, push back the missing value
+ args.push(callback);
+ // Get the promise
+ var promise = func.apply(this, args);
+ // Return a new promise
+ return new cursor.s.promiseLibrary(function(resolve, reject) {
+ var startTime = timestampGenerator.current();
+ // Emit the started event
+ self.emit('started', command)
+ // Execute the function
+ promise.then(function() {
+ // cursor id is zero, we can issue success command
+ var command = {
+ duration: timestampGenerator.duration(startTime, timestampGenerator.current()),
+ commandName: commandName,
+ requestId: requestId,
+ operationId: cursor.operationId,
+ connectionId: cursor.server.getConnection(),
+ reply: cursor.cursorState.documents
+ };
+
+ // Emit the command
+ self.emit('succeeded', command)
+ }).catch(function(err) {
+ // Command
+ var command = {
+ duration: timestampGenerator.duration(startTime, timestampGenerator.current()),
+ commandName: commandName,
+ requestId: requestId,
+ operationId: ourOpId,
+ connectionId: cursor.server.getConnection(),
+ failure: err };
+
+ // Emit the command
+ self.emit('failed', command)
+ // reject the promise
+ reject(err);
+ });
+ });
+ }
+ }
+ });
+ });
+}
+
+inherits(Instrumentation, EventEmitter);
+
+Instrumentation.prototype.uninstrument = function() {
+ for(var i = 0; i < this.overloads.length; i++) {
+ var obj = this.overloads[i];
+ obj.proto[obj.name] = obj.func;
+ }
+
+ // Remove all listeners
+ this.removeAllListeners('started');
+ this.removeAllListeners('succeeded');
+ this.removeAllListeners('failed');
+}
+
+module.exports = Instrumentation;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/bulk/common.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/bulk/common.js
new file mode 100644
index 0000000..ce90174
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/bulk/common.js
@@ -0,0 +1,439 @@
+"use strict";
+
+var Long = require('mongodb-core').BSON.Long,
+ Timestamp = require('mongodb-core').BSON.Timestamp;
+
+// Error codes
+var UNKNOWN_ERROR = 8;
+var INVALID_BSON_ERROR = 22;
+var WRITE_CONCERN_ERROR = 64;
+var MULTIPLE_ERROR = 65;
+
+// Insert types
+var INSERT = 1;
+var UPDATE = 2;
+var REMOVE = 3
+
+
+// Get write concern
+var writeConcern = function(target, col, options) {
+ var writeConcern = {};
+
+ // Collection level write concern
+ if(col.writeConcern && col.writeConcern.w != null) writeConcern.w = col.writeConcern.w;
+ if(col.writeConcern && col.writeConcern.j != null) writeConcern.j = col.writeConcern.j;
+ if(col.writeConcern && col.writeConcern.fsync != null) writeConcern.fsync = col.writeConcern.fsync;
+ if(col.writeConcern && col.writeConcern.wtimeout != null) writeConcern.wtimeout = col.writeConcern.wtimeout;
+
+ // Options level write concern
+ if(options && options.w != null) writeConcern.w = options.w;
+ if(options && options.wtimeout != null) writeConcern.wtimeout = options.wtimeout;
+ if(options && options.j != null) writeConcern.j = options.j;
+ if(options && options.fsync != null) writeConcern.fsync = options.fsync;
+
+ // Return write concern
+ return writeConcern;
+}
+
+/**
+ * Helper function to define properties
+ * @ignore
+ */
+var defineReadOnlyProperty = function(self, name, value) {
+ Object.defineProperty(self, name, {
+ enumerable: true
+ , get: function() {
+ return value;
+ }
+ });
+}
+
+/**
+ * Keeps the state of a unordered batch so we can rewrite the results
+ * correctly after command execution
+ * @ignore
+ */
+var Batch = function(batchType, originalZeroIndex) {
+ this.originalZeroIndex = originalZeroIndex;
+ this.currentIndex = 0;
+ this.originalIndexes = [];
+ this.batchType = batchType;
+ this.operations = [];
+ this.size = 0;
+ this.sizeBytes = 0;
+}
+
+/**
+ * Wraps a legacy operation so we can correctly rewrite it's error
+ * @ignore
+ */
+var LegacyOp = function(batchType, operation, index) {
+ this.batchType = batchType;
+ this.index = index;
+ this.operation = operation;
+}
+
+/**
+ * Create a new BulkWriteResult instance (INTERNAL TYPE, do not instantiate directly)
+ *
+ * @class
+ * @property {boolean} ok Did bulk operation correctly execute
+ * @property {number} nInserted number of inserted documents
+ * @property {number} nUpdated number of documents updated logically
+ * @property {number} nUpserted Number of upserted documents
+ * @property {number} nModified Number of documents updated physically on disk
+ * @property {number} nRemoved Number of removed documents
+ * @return {BulkWriteResult} a BulkWriteResult instance
+ */
+var BulkWriteResult = function(bulkResult) {
+ defineReadOnlyProperty(this, "ok", bulkResult.ok);
+ defineReadOnlyProperty(this, "nInserted", bulkResult.nInserted);
+ defineReadOnlyProperty(this, "nUpserted", bulkResult.nUpserted);
+ defineReadOnlyProperty(this, "nMatched", bulkResult.nMatched);
+ defineReadOnlyProperty(this, "nModified", bulkResult.nModified);
+ defineReadOnlyProperty(this, "nRemoved", bulkResult.nRemoved);
+
+ /**
+ * Return an array of inserted ids
+ *
+ * @return {object[]}
+ */
+ this.getInsertedIds = function() {
+ return bulkResult.insertedIds;
+ }
+
+ /**
+ * Return an array of upserted ids
+ *
+ * @return {object[]}
+ */
+ this.getUpsertedIds = function() {
+ return bulkResult.upserted;
+ }
+
+ /**
+ * Return the upserted id at position x
+ *
+ * @param {number} index the number of the upserted id to return, returns undefined if no result for passed in index
+ * @return {object}
+ */
+ this.getUpsertedIdAt = function(index) {
+ return bulkResult.upserted[index];
+ }
+
+ /**
+ * Return raw internal result
+ *
+ * @return {object}
+ */
+ this.getRawResponse = function() {
+ return bulkResult;
+ }
+
+ /**
+ * Returns true if the bulk operation contains a write error
+ *
+ * @return {boolean}
+ */
+ this.hasWriteErrors = function() {
+ return bulkResult.writeErrors.length > 0;
+ }
+
+ /**
+ * Returns the number of write errors off the bulk operation
+ *
+ * @return {number}
+ */
+ this.getWriteErrorCount = function() {
+ return bulkResult.writeErrors.length;
+ }
+
+ /**
+ * Returns a specific write error object
+ *
+ * @return {WriteError}
+ */
+ this.getWriteErrorAt = function(index) {
+ if(index < bulkResult.writeErrors.length) {
+ return bulkResult.writeErrors[index];
+ }
+ return null;
+ }
+
+ /**
+ * Retrieve all write errors
+ *
+ * @return {object[]}
+ */
+ this.getWriteErrors = function() {
+ return bulkResult.writeErrors;
+ }
+
+ /**
+ * Retrieve lastOp if available
+ *
+ * @return {object}
+ */
+ this.getLastOp = function() {
+ return bulkResult.lastOp;
+ }
+
+ /**
+ * Retrieve the write concern error if any
+ *
+ * @return {WriteConcernError}
+ */
+ this.getWriteConcernError = function() {
+ if(bulkResult.writeConcernErrors.length == 0) {
+ return null;
+ } else if(bulkResult.writeConcernErrors.length == 1) {
+ // Return the error
+ return bulkResult.writeConcernErrors[0];
+ } else {
+
+ // Combine the errors
+ var errmsg = "";
+ for(var i = 0; i < bulkResult.writeConcernErrors.length; i++) {
+ var err = bulkResult.writeConcernErrors[i];
+ errmsg = errmsg + err.errmsg;
+
+ // TODO: Something better
+ if(i == 0) errmsg = errmsg + " and ";
+ }
+
+ return new WriteConcernError({ errmsg : errmsg, code : WRITE_CONCERN_ERROR });
+ }
+ }
+
+ this.toJSON = function() {
+ return bulkResult;
+ }
+
+ this.toString = function() {
+ return "BulkWriteResult(" + this.toJSON(bulkResult) + ")";
+ }
+
+ this.isOk = function() {
+ return bulkResult.ok == 1;
+ }
+}
+
+/**
+ * Create a new WriteConcernError instance (INTERNAL TYPE, do not instantiate directly)
+ *
+ * @class
+ * @property {number} code Write concern error code.
+ * @property {string} errmsg Write concern error message.
+ * @return {WriteConcernError} a WriteConcernError instance
+ */
+var WriteConcernError = function(err) {
+ if(!(this instanceof WriteConcernError)) return new WriteConcernError(err);
+
+ // Define properties
+ defineReadOnlyProperty(this, "code", err.code);
+ defineReadOnlyProperty(this, "errmsg", err.errmsg);
+
+ this.toJSON = function() {
+ return {code: err.code, errmsg: err.errmsg};
+ }
+
+ this.toString = function() {
+ return "WriteConcernError(" + err.errmsg + ")";
+ }
+}
+
+/**
+ * Create a new WriteError instance (INTERNAL TYPE, do not instantiate directly)
+ *
+ * @class
+ * @property {number} code Write concern error code.
+ * @property {number} index Write concern error original bulk operation index.
+ * @property {string} errmsg Write concern error message.
+ * @return {WriteConcernError} a WriteConcernError instance
+ */
+var WriteError = function(err) {
+ if(!(this instanceof WriteError)) return new WriteError(err);
+
+ // Define properties
+ defineReadOnlyProperty(this, "code", err.code);
+ defineReadOnlyProperty(this, "index", err.index);
+ defineReadOnlyProperty(this, "errmsg", err.errmsg);
+
+ //
+ // Define access methods
+ this.getOperation = function() {
+ return err.op;
+ }
+
+ this.toJSON = function() {
+ return {code: err.code, index: err.index, errmsg: err.errmsg, op: err.op};
+ }
+
+ this.toString = function() {
+ return "WriteError(" + JSON.stringify(this.toJSON()) + ")";
+ }
+}
+
+/**
+ * Merges results into shared data structure
+ * @ignore
+ */
+var mergeBatchResults = function(ordered, batch, bulkResult, err, result) {
+ // If we have an error set the result to be the err object
+ if(err) {
+ result = err;
+ } else if(result && result.result) {
+ result = result.result;
+ } else if(result == null) {
+ return;
+ }
+
+ // Do we have a top level error stop processing and return
+ if(result.ok == 0 && bulkResult.ok == 1) {
+ bulkResult.ok = 0;
+
+ var writeError = {
+ index: 0
+ , code: result.code || 0
+ , errmsg: result.message
+ , op: batch.operations[0]
+ };
+
+ bulkResult.writeErrors.push(new WriteError(writeError));
+ return;
+ } else if(result.ok == 0 && bulkResult.ok == 0) {
+ return;
+ }
+
+ // Deal with opTime if available
+ if(result.opTime || result.lastOp) {
+ var opTime = result.lastOp || result.opTime;
+ var lastOpTS = null;
+ var lastOpT = null;
+
+ // We have a time stamp
+ if(opTime && opTime._bsontype == 'Timestamp') {
+ if(bulkResult.lastOp == null) {
+ bulkResult.lastOp = opTime;
+ } else if(opTime.greaterThan(bulkResult.lastOp)) {
+ bulkResult.lastOp = opTime;
+ }
+ } else {
+ // Existing TS
+ if(bulkResult.lastOp) {
+ lastOpTS = typeof bulkResult.lastOp.ts == 'number'
+ ? Long.fromNumber(bulkResult.lastOp.ts) : bulkResult.lastOp.ts;
+ lastOpT = typeof bulkResult.lastOp.t == 'number'
+ ? Long.fromNumber(bulkResult.lastOp.t) : bulkResult.lastOp.t;
+ }
+
+ // Current OpTime TS
+ var opTimeTS = typeof opTime.ts == 'number'
+ ? Long.fromNumber(opTime.ts) : opTime.ts;
+ var opTimeT = typeof opTime.t == 'number'
+ ? Long.fromNumber(opTime.t) : opTime.t;
+
+ // Compare the opTime's
+ if(bulkResult.lastOp == null) {
+ bulkResult.lastOp = opTime;
+ } else if(opTimeTS.greaterThan(lastOpTS)) {
+ bulkResult.lastOp = opTime;
+ } else if(opTimeTS.equals(lastOpTS)) {
+ if(opTimeT.greaterThan(lastOpT)) {
+ bulkResult.lastOp = opTime;
+ }
+ }
+ }
+ }
+
+ // If we have an insert Batch type
+ if(batch.batchType == INSERT && result.n) {
+ bulkResult.nInserted = bulkResult.nInserted + result.n;
+ }
+
+ // If we have an insert Batch type
+ if(batch.batchType == REMOVE && result.n) {
+ bulkResult.nRemoved = bulkResult.nRemoved + result.n;
+ }
+
+ var nUpserted = 0;
+
+ // We have an array of upserted values, we need to rewrite the indexes
+ if(Array.isArray(result.upserted)) {
+ nUpserted = result.upserted.length;
+
+ for(var i = 0; i < result.upserted.length; i++) {
+ bulkResult.upserted.push({
+ index: result.upserted[i].index + batch.originalZeroIndex
+ , _id: result.upserted[i]._id
+ });
+ }
+ } else if(result.upserted) {
+
+ nUpserted = 1;
+
+ bulkResult.upserted.push({
+ index: batch.originalZeroIndex
+ , _id: result.upserted
+ });
+ }
+
+ // If we have an update Batch type
+ if(batch.batchType == UPDATE && result.n) {
+ var nModified = result.nModified;
+ bulkResult.nUpserted = bulkResult.nUpserted + nUpserted;
+ bulkResult.nMatched = bulkResult.nMatched + (result.n - nUpserted);
+
+ if(typeof nModified == 'number') {
+ bulkResult.nModified = bulkResult.nModified + nModified;
+ } else {
+ bulkResult.nModified = null;
+ }
+ }
+
+ if(Array.isArray(result.writeErrors)) {
+ for(i = 0; i < result.writeErrors.length; i++) {
+
+ writeError = {
+ index: batch.originalZeroIndex + result.writeErrors[i].index
+ , code: result.writeErrors[i].code
+ , errmsg: result.writeErrors[i].errmsg
+ , op: batch.operations[result.writeErrors[i].index]
+ };
+
+ bulkResult.writeErrors.push(new WriteError(writeError));
+ }
+ }
+
+ if(result.writeConcernError) {
+ bulkResult.writeConcernErrors.push(new WriteConcernError(result.writeConcernError));
+ }
+}
+
+//
+// Clone the options
+var cloneOptions = function(options) {
+ var clone = {};
+ var keys = Object.keys(options);
+ for(var i = 0; i < keys.length; i++) {
+ clone[keys[i]] = options[keys[i]];
+ }
+
+ return clone;
+}
+
+// Exports symbols
+exports.BulkWriteResult = BulkWriteResult;
+exports.WriteError = WriteError;
+exports.Batch = Batch;
+exports.LegacyOp = LegacyOp;
+exports.mergeBatchResults = mergeBatchResults;
+exports.cloneOptions = cloneOptions;
+exports.writeConcern = writeConcern;
+exports.INVALID_BSON_ERROR = INVALID_BSON_ERROR;
+exports.WRITE_CONCERN_ERROR = WRITE_CONCERN_ERROR;
+exports.MULTIPLE_ERROR = MULTIPLE_ERROR;
+exports.UNKNOWN_ERROR = UNKNOWN_ERROR;
+exports.INSERT = INSERT;
+exports.UPDATE = UPDATE;
+exports.REMOVE = REMOVE;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/bulk/ordered.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/bulk/ordered.js
new file mode 100644
index 0000000..42ee10e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/bulk/ordered.js
@@ -0,0 +1,532 @@
+"use strict";
+
+var common = require('./common')
+ , utils = require('../utils')
+ , toError = require('../utils').toError
+ , handleCallback = require('../utils').handleCallback
+ , shallowClone = utils.shallowClone
+ , BulkWriteResult = common.BulkWriteResult
+ , ObjectID = require('mongodb-core').BSON.ObjectID
+ , Define = require('../metadata')
+ , BSON = require('mongodb-core').BSON
+ , Batch = common.Batch
+ , mergeBatchResults = common.mergeBatchResults;
+
+var bson = new BSON([BSON.Binary, BSON.Code, BSON.DBRef, BSON.Decimal128,
+ BSON.Double, BSON.Int32, BSON.Long, BSON.Map, BSON.MaxKey, BSON.MinKey,
+ BSON.ObjectId, BSON.BSONRegExp, BSON.Symbol, BSON.Timestamp]);
+
+/**
+ * Create a FindOperatorsOrdered instance (INTERNAL TYPE, do not instantiate directly)
+ * @class
+ * @return {FindOperatorsOrdered} a FindOperatorsOrdered instance.
+ */
+var FindOperatorsOrdered = function(self) {
+ this.s = self.s;
+}
+
+/**
+ * Add a single update document to the bulk operation
+ *
+ * @method
+ * @param {object} doc update operations
+ * @throws {MongoError}
+ * @return {OrderedBulkOperation}
+ */
+FindOperatorsOrdered.prototype.update = function(updateDocument) {
+ // Perform upsert
+ var upsert = typeof this.s.currentOp.upsert == 'boolean' ? this.s.currentOp.upsert : false;
+
+ // Establish the update command
+ var document = {
+ q: this.s.currentOp.selector
+ , u: updateDocument
+ , multi: true
+ , upsert: upsert
+ }
+
+ // Clear out current Op
+ this.s.currentOp = null;
+ // Add the update document to the list
+ return addToOperationsList(this, common.UPDATE, document);
+}
+
+/**
+ * Add a single update one document to the bulk operation
+ *
+ * @method
+ * @param {object} doc update operations
+ * @throws {MongoError}
+ * @return {OrderedBulkOperation}
+ */
+FindOperatorsOrdered.prototype.updateOne = function(updateDocument) {
+ // Perform upsert
+ var upsert = typeof this.s.currentOp.upsert == 'boolean' ? this.s.currentOp.upsert : false;
+
+ // Establish the update command
+ var document = {
+ q: this.s.currentOp.selector
+ , u: updateDocument
+ , multi: false
+ , upsert: upsert
+ }
+
+ // Clear out current Op
+ this.s.currentOp = null;
+ // Add the update document to the list
+ return addToOperationsList(this, common.UPDATE, document);
+}
+
+/**
+ * Add a replace one operation to the bulk operation
+ *
+ * @method
+ * @param {object} doc the new document to replace the existing one with
+ * @throws {MongoError}
+ * @return {OrderedBulkOperation}
+ */
+FindOperatorsOrdered.prototype.replaceOne = function(updateDocument) {
+ this.updateOne(updateDocument);
+}
+
+/**
+ * Upsert modifier for update bulk operation
+ *
+ * @method
+ * @throws {MongoError}
+ * @return {FindOperatorsOrdered}
+ */
+FindOperatorsOrdered.prototype.upsert = function() {
+ this.s.currentOp.upsert = true;
+ return this;
+}
+
+/**
+ * Add a remove one operation to the bulk operation
+ *
+ * @method
+ * @throws {MongoError}
+ * @return {OrderedBulkOperation}
+ */
+FindOperatorsOrdered.prototype.deleteOne = function() {
+ // Establish the update command
+ var document = {
+ q: this.s.currentOp.selector
+ , limit: 1
+ }
+
+ // Clear out current Op
+ this.s.currentOp = null;
+ // Add the remove document to the list
+ return addToOperationsList(this, common.REMOVE, document);
+}
+
+// Backward compatibility
+FindOperatorsOrdered.prototype.removeOne = FindOperatorsOrdered.prototype.deleteOne;
+
+/**
+ * Add a remove operation to the bulk operation
+ *
+ * @method
+ * @throws {MongoError}
+ * @return {OrderedBulkOperation}
+ */
+FindOperatorsOrdered.prototype.delete = function() {
+ // Establish the update command
+ var document = {
+ q: this.s.currentOp.selector
+ , limit: 0
+ }
+
+ // Clear out current Op
+ this.s.currentOp = null;
+ // Add the remove document to the list
+ return addToOperationsList(this, common.REMOVE, document);
+}
+
+// Backward compatibility
+FindOperatorsOrdered.prototype.remove = FindOperatorsOrdered.prototype.delete;
+
+// Add to internal list of documents
+var addToOperationsList = function(_self, docType, document) {
+ // Get the bsonSize
+ var bsonSize = bson.calculateObjectSize(document, {
+ checkKeys: false,
+ });
+
+ // Throw error if the doc is bigger than the max BSON size
+ if(bsonSize >= _self.s.maxBatchSizeBytes) {
+ throw toError("document is larger than the maximum size " + _self.s.maxBatchSizeBytes);
+ }
+
+ // Create a new batch object if we don't have a current one
+ if(_self.s.currentBatch == null) _self.s.currentBatch = new Batch(docType, _self.s.currentIndex);
+
+ // Check if we need to create a new batch
+ if(((_self.s.currentBatchSize + 1) >= _self.s.maxWriteBatchSize)
+ || ((_self.s.currentBatchSizeBytes + _self.s.currentBatchSizeBytes) >= _self.s.maxBatchSizeBytes)
+ || (_self.s.currentBatch.batchType != docType)) {
+ // Save the batch to the execution stack
+ _self.s.batches.push(_self.s.currentBatch);
+
+ // Create a new batch
+ _self.s.currentBatch = new Batch(docType, _self.s.currentIndex);
+
+ // Reset the current size trackers
+ _self.s.currentBatchSize = 0;
+ _self.s.currentBatchSizeBytes = 0;
+ } else {
+ // Update current batch size
+ _self.s.currentBatchSize = _self.s.currentBatchSize + 1;
+ _self.s.currentBatchSizeBytes = _self.s.currentBatchSizeBytes + bsonSize;
+ }
+
+ if(docType == common.INSERT) {
+ _self.s.bulkResult.insertedIds.push({index: _self.s.currentIndex, _id: document._id});
+ }
+
+ // We have an array of documents
+ if(Array.isArray(document)) {
+ throw toError("operation passed in cannot be an Array");
+ } else {
+ _self.s.currentBatch.originalIndexes.push(_self.s.currentIndex);
+ _self.s.currentBatch.operations.push(document)
+ _self.s.currentBatchSizeBytes = _self.s.currentBatchSizeBytes + bsonSize;
+ _self.s.currentIndex = _self.s.currentIndex + 1;
+ }
+
+ // Return self
+ return _self;
+}
+
+/**
+ * Create a new OrderedBulkOperation instance (INTERNAL TYPE, do not instantiate directly)
+ * @class
+ * @property {number} length Get the number of operations in the bulk.
+ * @return {OrderedBulkOperation} a OrderedBulkOperation instance.
+ */
+function OrderedBulkOperation(topology, collection, options) {
+ options = options == null ? {} : options;
+ // TODO Bring from driver information in isMaster
+ var executed = false;
+
+ // Current item
+ var currentOp = null;
+
+ // Handle to the bson serializer, used to calculate running sizes
+ var bson = topology.bson;
+
+ // Namespace for the operation
+ var namespace = collection.collectionName;
+
+ // Set max byte size
+ var maxBatchSizeBytes = topology.isMasterDoc && topology.isMasterDoc.maxBsonObjectSize
+ ? topology.isMasterDoc.maxBsonObjectSize : (1024*1025*16);
+ var maxWriteBatchSize = topology.isMasterDoc && topology.isMasterDoc.maxWriteBatchSize
+ ? topology.isMasterDoc.maxWriteBatchSize : 1000;
+
+ // Get the write concern
+ var writeConcern = common.writeConcern(shallowClone(options), collection, options);
+
+ // Get the promiseLibrary
+ var promiseLibrary = options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // Final results
+ var bulkResult = {
+ ok: 1
+ , writeErrors: []
+ , writeConcernErrors: []
+ , insertedIds: []
+ , nInserted: 0
+ , nUpserted: 0
+ , nMatched: 0
+ , nModified: 0
+ , nRemoved: 0
+ , upserted: []
+ };
+
+ // Internal state
+ this.s = {
+ // Final result
+ bulkResult: bulkResult
+ // Current batch state
+ , currentBatch: null
+ , currentIndex: 0
+ , currentBatchSize: 0
+ , currentBatchSizeBytes: 0
+ , batches: []
+ // Write concern
+ , writeConcern: writeConcern
+ // Max batch size options
+ , maxBatchSizeBytes: maxBatchSizeBytes
+ , maxWriteBatchSize: maxWriteBatchSize
+ // Namespace
+ , namespace: namespace
+ // BSON
+ , bson: bson
+ // Topology
+ , topology: topology
+ // Options
+ , options: options
+ // Current operation
+ , currentOp: currentOp
+ // Executed
+ , executed: executed
+ // Collection
+ , collection: collection
+ // Promise Library
+ , promiseLibrary: promiseLibrary
+ // Fundamental error
+ , err: null
+ // Bypass validation
+ , bypassDocumentValidation: typeof options.bypassDocumentValidation == 'boolean' ? options.bypassDocumentValidation : false
+ }
+}
+
+var define = OrderedBulkOperation.define = new Define('OrderedBulkOperation', OrderedBulkOperation, false);
+
+OrderedBulkOperation.prototype.raw = function(op) {
+ var key = Object.keys(op)[0];
+
+ // Set up the force server object id
+ var forceServerObjectId = typeof this.s.options.forceServerObjectId == 'boolean'
+ ? this.s.options.forceServerObjectId : this.s.collection.s.db.options.forceServerObjectId;
+
+ // Update operations
+ if((op.updateOne && op.updateOne.q)
+ || (op.updateMany && op.updateMany.q)
+ || (op.replaceOne && op.replaceOne.q)) {
+ op[key].multi = op.updateOne || op.replaceOne ? false : true;
+ return addToOperationsList(this, common.UPDATE, op[key]);
+ }
+
+ // Crud spec update format
+ if(op.updateOne || op.updateMany || op.replaceOne) {
+ var multi = op.updateOne || op.replaceOne ? false : true;
+ var operation = {q: op[key].filter, u: op[key].update || op[key].replacement, multi: multi}
+ operation.upsert = op[key].upsert ? true: false;
+ if(op.collation) operation.collation = op.collation;
+ return addToOperationsList(this, common.UPDATE, operation);
+ }
+
+ // Remove operations
+ if(op.removeOne || op.removeMany || (op.deleteOne && op.deleteOne.q) || op.deleteMany && op.deleteMany.q) {
+ op[key].limit = op.removeOne ? 1 : 0;
+ return addToOperationsList(this, common.REMOVE, op[key]);
+ }
+
+ // Crud spec delete operations, less efficient
+ if(op.deleteOne || op.deleteMany) {
+ var limit = op.deleteOne ? 1 : 0;
+ operation = {q: op[key].filter, limit: limit}
+ if(op.collation) operation.collation = op.collation;
+ return addToOperationsList(this, common.REMOVE, operation);
+ }
+
+ // Insert operations
+ if(op.insertOne && op.insertOne.document == null) {
+ if(forceServerObjectId !== true && op.insertOne._id == null) op.insertOne._id = new ObjectID();
+ return addToOperationsList(this, common.INSERT, op.insertOne);
+ } else if(op.insertOne && op.insertOne.document) {
+ if(forceServerObjectId !== true && op.insertOne.document._id == null) op.insertOne.document._id = new ObjectID();
+ return addToOperationsList(this, common.INSERT, op.insertOne.document);
+ }
+
+ if(op.insertMany) {
+ for(var i = 0; i < op.insertMany.length; i++) {
+ if(forceServerObjectId !== true && op.insertMany[i]._id == null) op.insertMany[i]._id = new ObjectID();
+ addToOperationsList(this, common.INSERT, op.insertMany[i]);
+ }
+
+ return;
+ }
+
+ // No valid type of operation
+ throw toError("bulkWrite only supports insertOne, insertMany, updateOne, updateMany, removeOne, removeMany, deleteOne, deleteMany");
+}
+
+/**
+ * Add a single insert document to the bulk operation
+ *
+ * @param {object} doc the document to insert
+ * @throws {MongoError}
+ * @return {OrderedBulkOperation}
+ */
+OrderedBulkOperation.prototype.insert = function(document) {
+ if(this.s.collection.s.db.options.forceServerObjectId !== true && document._id == null) document._id = new ObjectID();
+ return addToOperationsList(this, common.INSERT, document);
+}
+
+/**
+ * Initiate a find operation for an update/updateOne/remove/removeOne/replaceOne
+ *
+ * @method
+ * @param {object} selector The selector for the bulk operation.
+ * @throws {MongoError}
+ * @return {FindOperatorsOrdered}
+ */
+OrderedBulkOperation.prototype.find = function(selector) {
+ if (!selector) {
+ throw toError("Bulk find operation must specify a selector");
+ }
+
+ // Save a current selector
+ this.s.currentOp = {
+ selector: selector
+ }
+
+ return new FindOperatorsOrdered(this);
+}
+
+Object.defineProperty(OrderedBulkOperation.prototype, 'length', {
+ enumerable: true,
+ get: function() {
+ return this.s.currentIndex;
+ }
+});
+
+//
+// Execute next write command in a chain
+var executeCommands = function(self, callback) {
+ if(self.s.batches.length == 0) {
+ return handleCallback(callback, null, new BulkWriteResult(self.s.bulkResult));
+ }
+
+ // Ordered execution of the command
+ var batch = self.s.batches.shift();
+
+ var resultHandler = function(err, result) {
+ // Error is a driver related error not a bulk op error, terminate
+ if(err && err.driver || err && err.message) {
+ return handleCallback(callback, err);
+ }
+
+ // If we have and error
+ if(err) err.ok = 0;
+ // Merge the results together
+ var mergeResult = mergeBatchResults(true, batch, self.s.bulkResult, err, result);
+ if(mergeResult != null) {
+ return handleCallback(callback, null, new BulkWriteResult(self.s.bulkResult));
+ }
+
+ // If we are ordered and have errors and they are
+ // not all replication errors terminate the operation
+ if(self.s.bulkResult.writeErrors.length > 0) {
+ return handleCallback(callback, toError(self.s.bulkResult.writeErrors[0]), new BulkWriteResult(self.s.bulkResult));
+ }
+
+ // Execute the next command in line
+ executeCommands(self, callback);
+ }
+
+ var finalOptions = {ordered: true}
+ if(self.s.writeConcern != null) {
+ finalOptions.writeConcern = self.s.writeConcern;
+ }
+
+ // Set an operationIf if provided
+ if(self.operationId) {
+ resultHandler.operationId = self.operationId;
+ }
+
+ // Serialize functions
+ if(self.s.options.serializeFunctions) {
+ finalOptions.serializeFunctions = true
+ }
+
+ // Serialize functions
+ if(self.s.options.ignoreUndefined) {
+ finalOptions.ignoreUndefined = true
+ }
+
+ // Is the bypassDocumentValidation options specific
+ if(self.s.bypassDocumentValidation == true) {
+ finalOptions.bypassDocumentValidation = true;
+ }
+
+ try {
+ if(batch.batchType == common.INSERT) {
+ self.s.topology.insert(self.s.collection.namespace, batch.operations, finalOptions, resultHandler);
+ } else if(batch.batchType == common.UPDATE) {
+ self.s.topology.update(self.s.collection.namespace, batch.operations, finalOptions, resultHandler);
+ } else if(batch.batchType == common.REMOVE) {
+ self.s.topology.remove(self.s.collection.namespace, batch.operations, finalOptions, resultHandler);
+ }
+ } catch(err) {
+ // Force top level error
+ err.ok = 0;
+ // Merge top level error and return
+ handleCallback(callback, null, mergeBatchResults(false, batch, self.s.bulkResult, err, null));
+ }
+}
+
+/**
+ * The callback format for results
+ * @callback OrderedBulkOperation~resultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {BulkWriteResult} result The bulk write result.
+ */
+
+/**
+ * Execute the ordered bulk operation
+ *
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.fsync=false] Specify a file sync write concern.
+ * @param {OrderedBulkOperation~resultCallback} [callback] The result callback
+ * @throws {MongoError}
+ * @return {Promise} returns Promise if no callback passed
+ */
+OrderedBulkOperation.prototype.execute = function(_writeConcern, callback) {
+ var self = this;
+ if(this.s.executed) throw new toError("batch cannot be re-executed");
+ if(typeof _writeConcern == 'function') {
+ callback = _writeConcern;
+ } else if(_writeConcern && typeof _writeConcern == 'object') {
+ this.s.writeConcern = _writeConcern;
+ }
+
+ // If we have current batch
+ if(this.s.currentBatch) this.s.batches.push(this.s.currentBatch)
+
+ // If we have no operations in the bulk raise an error
+ if(this.s.batches.length == 0) {
+ throw toError("Invalid Operation, No operations in bulk");
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') {
+ return executeCommands(this, callback);
+ }
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ executeCommands(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('execute', {callback: true, promise:false});
+
+/**
+ * Returns an unordered batch object
+ * @ignore
+ */
+var initializeOrderedBulkOp = function(topology, collection, options) {
+ return new OrderedBulkOperation(topology, collection, options);
+}
+
+initializeOrderedBulkOp.OrderedBulkOperation = OrderedBulkOperation;
+module.exports = initializeOrderedBulkOp;
+module.exports.Bulk = OrderedBulkOperation;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/bulk/unordered.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/bulk/unordered.js
new file mode 100644
index 0000000..d2f16dc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/bulk/unordered.js
@@ -0,0 +1,534 @@
+"use strict";
+
+var common = require('./common')
+ , utils = require('../utils')
+ , toError = require('../utils').toError
+ , handleCallback = require('../utils').handleCallback
+ , shallowClone = utils.shallowClone
+ , BulkWriteResult = common.BulkWriteResult
+ , ObjectID = require('mongodb-core').BSON.ObjectID
+ , BSON = require('mongodb-core').BSON
+ , Define = require('../metadata')
+ , Batch = common.Batch
+ , mergeBatchResults = common.mergeBatchResults;
+
+var bson = new BSON([BSON.Binary, BSON.Code, BSON.DBRef, BSON.Decimal128,
+ BSON.Double, BSON.Int32, BSON.Long, BSON.Map, BSON.MaxKey, BSON.MinKey,
+ BSON.ObjectId, BSON.BSONRegExp, BSON.Symbol, BSON.Timestamp]);
+
+/**
+ * Create a FindOperatorsUnordered instance (INTERNAL TYPE, do not instantiate directly)
+ * @class
+ * @property {number} length Get the number of operations in the bulk.
+ * @return {FindOperatorsUnordered} a FindOperatorsUnordered instance.
+ */
+var FindOperatorsUnordered = function(self) {
+ this.s = self.s;
+}
+
+/**
+ * Add a single update document to the bulk operation
+ *
+ * @method
+ * @param {object} doc update operations
+ * @throws {MongoError}
+ * @return {UnorderedBulkOperation}
+ */
+FindOperatorsUnordered.prototype.update = function(updateDocument) {
+ // Perform upsert
+ var upsert = typeof this.s.currentOp.upsert == 'boolean' ? this.s.currentOp.upsert : false;
+
+ // Establish the update command
+ var document = {
+ q: this.s.currentOp.selector
+ , u: updateDocument
+ , multi: true
+ , upsert: upsert
+ }
+
+ // Clear out current Op
+ this.s.currentOp = null;
+ // Add the update document to the list
+ return addToOperationsList(this, common.UPDATE, document);
+}
+
+/**
+ * Add a single update one document to the bulk operation
+ *
+ * @method
+ * @param {object} doc update operations
+ * @throws {MongoError}
+ * @return {UnorderedBulkOperation}
+ */
+FindOperatorsUnordered.prototype.updateOne = function(updateDocument) {
+ // Perform upsert
+ var upsert = typeof this.s.currentOp.upsert == 'boolean' ? this.s.currentOp.upsert : false;
+
+ // Establish the update command
+ var document = {
+ q: this.s.currentOp.selector
+ , u: updateDocument
+ , multi: false
+ , upsert: upsert
+ }
+
+ // Clear out current Op
+ this.s.currentOp = null;
+ // Add the update document to the list
+ return addToOperationsList(this, common.UPDATE, document);
+}
+
+/**
+ * Add a replace one operation to the bulk operation
+ *
+ * @method
+ * @param {object} doc the new document to replace the existing one with
+ * @throws {MongoError}
+ * @return {UnorderedBulkOperation}
+ */
+FindOperatorsUnordered.prototype.replaceOne = function(updateDocument) {
+ this.updateOne(updateDocument);
+}
+
+/**
+ * Upsert modifier for update bulk operation
+ *
+ * @method
+ * @throws {MongoError}
+ * @return {UnorderedBulkOperation}
+ */
+FindOperatorsUnordered.prototype.upsert = function() {
+ this.s.currentOp.upsert = true;
+ return this;
+}
+
+/**
+ * Add a remove one operation to the bulk operation
+ *
+ * @method
+ * @throws {MongoError}
+ * @return {UnorderedBulkOperation}
+ */
+FindOperatorsUnordered.prototype.removeOne = function() {
+ // Establish the update command
+ var document = {
+ q: this.s.currentOp.selector
+ , limit: 1
+ }
+
+ // Clear out current Op
+ this.s.currentOp = null;
+ // Add the remove document to the list
+ return addToOperationsList(this, common.REMOVE, document);
+}
+
+/**
+ * Add a remove operation to the bulk operation
+ *
+ * @method
+ * @throws {MongoError}
+ * @return {UnorderedBulkOperation}
+ */
+FindOperatorsUnordered.prototype.remove = function() {
+ // Establish the update command
+ var document = {
+ q: this.s.currentOp.selector
+ , limit: 0
+ }
+
+ // Clear out current Op
+ this.s.currentOp = null;
+ // Add the remove document to the list
+ return addToOperationsList(this, common.REMOVE, document);
+}
+
+//
+// Add to the operations list
+//
+var addToOperationsList = function(_self, docType, document) {
+ // Get the bsonSize
+ var bsonSize = bson.calculateObjectSize(document, {
+ checkKeys: false,
+ });
+ // Throw error if the doc is bigger than the max BSON size
+ if(bsonSize >= _self.s.maxBatchSizeBytes) throw toError("document is larger than the maximum size " + _self.s.maxBatchSizeBytes);
+ // Holds the current batch
+ _self.s.currentBatch = null;
+ // Get the right type of batch
+ if(docType == common.INSERT) {
+ _self.s.currentBatch = _self.s.currentInsertBatch;
+ } else if(docType == common.UPDATE) {
+ _self.s.currentBatch = _self.s.currentUpdateBatch;
+ } else if(docType == common.REMOVE) {
+ _self.s.currentBatch = _self.s.currentRemoveBatch;
+ }
+
+ // Create a new batch object if we don't have a current one
+ if(_self.s.currentBatch == null) _self.s.currentBatch = new Batch(docType, _self.s.currentIndex);
+
+ // Check if we need to create a new batch
+ if(((_self.s.currentBatch.size + 1) >= _self.s.maxWriteBatchSize)
+ || ((_self.s.currentBatch.sizeBytes + bsonSize) >= _self.s.maxBatchSizeBytes)
+ || (_self.s.currentBatch.batchType != docType)) {
+ // Save the batch to the execution stack
+ _self.s.batches.push(_self.s.currentBatch);
+
+ // Create a new batch
+ _self.s.currentBatch = new Batch(docType, _self.s.currentIndex);
+ }
+
+ // We have an array of documents
+ if(Array.isArray(document)) {
+ throw toError("operation passed in cannot be an Array");
+ } else {
+ _self.s.currentBatch.operations.push(document);
+ _self.s.currentBatch.originalIndexes.push(_self.s.currentIndex);
+ _self.s.currentIndex = _self.s.currentIndex + 1;
+ }
+
+ // Save back the current Batch to the right type
+ if(docType == common.INSERT) {
+ _self.s.currentInsertBatch = _self.s.currentBatch;
+ _self.s.bulkResult.insertedIds.push({index: _self.s.currentIndex, _id: document._id});
+ } else if(docType == common.UPDATE) {
+ _self.s.currentUpdateBatch = _self.s.currentBatch;
+ } else if(docType == common.REMOVE) {
+ _self.s.currentRemoveBatch = _self.s.currentBatch;
+ }
+
+ // Update current batch size
+ _self.s.currentBatch.size = _self.s.currentBatch.size + 1;
+ _self.s.currentBatch.sizeBytes = _self.s.currentBatch.sizeBytes + bsonSize;
+
+ // Return self
+ return _self;
+}
+
+/**
+ * Create a new UnorderedBulkOperation instance (INTERNAL TYPE, do not instantiate directly)
+ * @class
+ * @property {number} length Get the number of operations in the bulk.
+ * @return {UnorderedBulkOperation} a UnorderedBulkOperation instance.
+ */
+var UnorderedBulkOperation = function(topology, collection, options) {
+ options = options == null ? {} : options;
+
+ // Get the namesspace for the write operations
+ var namespace = collection.collectionName;
+ // Used to mark operation as executed
+ var executed = false;
+
+ // Current item
+ // var currentBatch = null;
+ var currentOp = null;
+
+ // Handle to the bson serializer, used to calculate running sizes
+ var bson = topology.bson;
+
+ // Set max byte size
+ var maxBatchSizeBytes = topology.isMasterDoc && topology.isMasterDoc.maxBsonObjectSize
+ ? topology.isMasterDoc.maxBsonObjectSize : (1024*1025*16);
+ var maxWriteBatchSize = topology.isMasterDoc && topology.isMasterDoc.maxWriteBatchSize
+ ? topology.isMasterDoc.maxWriteBatchSize : 1000;
+
+ // Get the write concern
+ var writeConcern = common.writeConcern(shallowClone(options), collection, options);
+
+ // Get the promiseLibrary
+ var promiseLibrary = options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // Final results
+ var bulkResult = {
+ ok: 1
+ , writeErrors: []
+ , writeConcernErrors: []
+ , insertedIds: []
+ , nInserted: 0
+ , nUpserted: 0
+ , nMatched: 0
+ , nModified: 0
+ , nRemoved: 0
+ , upserted: []
+ };
+
+ // Internal state
+ this.s = {
+ // Final result
+ bulkResult: bulkResult
+ // Current batch state
+ , currentInsertBatch: null
+ , currentUpdateBatch: null
+ , currentRemoveBatch: null
+ , currentBatch: null
+ , currentIndex: 0
+ , batches: []
+ // Write concern
+ , writeConcern: writeConcern
+ // Max batch size options
+ , maxBatchSizeBytes: maxBatchSizeBytes
+ , maxWriteBatchSize: maxWriteBatchSize
+ // Namespace
+ , namespace: namespace
+ // BSON
+ , bson: bson
+ // Topology
+ , topology: topology
+ // Options
+ , options: options
+ // Current operation
+ , currentOp: currentOp
+ // Executed
+ , executed: executed
+ // Collection
+ , collection: collection
+ // Promise Library
+ , promiseLibrary: promiseLibrary
+ // Bypass validation
+ , bypassDocumentValidation: typeof options.bypassDocumentValidation == 'boolean' ? options.bypassDocumentValidation : false
+ }
+}
+
+var define = UnorderedBulkOperation.define = new Define('UnorderedBulkOperation', UnorderedBulkOperation, false);
+
+/**
+ * Add a single insert document to the bulk operation
+ *
+ * @param {object} doc the document to insert
+ * @throws {MongoError}
+ * @return {UnorderedBulkOperation}
+ */
+UnorderedBulkOperation.prototype.insert = function(document) {
+ if(this.s.collection.s.db.options.forceServerObjectId !== true && document._id == null) document._id = new ObjectID();
+ return addToOperationsList(this, common.INSERT, document);
+}
+
+/**
+ * Initiate a find operation for an update/updateOne/remove/removeOne/replaceOne
+ *
+ * @method
+ * @param {object} selector The selector for the bulk operation.
+ * @throws {MongoError}
+ * @return {FindOperatorsUnordered}
+ */
+UnorderedBulkOperation.prototype.find = function(selector) {
+ if (!selector) {
+ throw toError("Bulk find operation must specify a selector");
+ }
+
+ // Save a current selector
+ this.s.currentOp = {
+ selector: selector
+ }
+
+ return new FindOperatorsUnordered(this);
+}
+
+Object.defineProperty(UnorderedBulkOperation.prototype, 'length', {
+ enumerable: true,
+ get: function() {
+ return this.s.currentIndex;
+ }
+});
+
+UnorderedBulkOperation.prototype.raw = function(op) {
+ var key = Object.keys(op)[0];
+
+ // Set up the force server object id
+ var forceServerObjectId = typeof this.s.options.forceServerObjectId == 'boolean'
+ ? this.s.options.forceServerObjectId : this.s.collection.s.db.options.forceServerObjectId;
+
+ // Update operations
+ if((op.updateOne && op.updateOne.q)
+ || (op.updateMany && op.updateMany.q)
+ || (op.replaceOne && op.replaceOne.q)) {
+ op[key].multi = op.updateOne || op.replaceOne ? false : true;
+ return addToOperationsList(this, common.UPDATE, op[key]);
+ }
+
+ // Crud spec update format
+ if(op.updateOne || op.updateMany || op.replaceOne) {
+ var multi = op.updateOne || op.replaceOne ? false : true;
+ var operation = {q: op[key].filter, u: op[key].update || op[key].replacement, multi: multi}
+ if(op[key].upsert) operation.upsert = true;
+ return addToOperationsList(this, common.UPDATE, operation);
+ }
+
+ // Remove operations
+ if(op.removeOne || op.removeMany || (op.deleteOne && op.deleteOne.q) || op.deleteMany && op.deleteMany.q) {
+ op[key].limit = op.removeOne ? 1 : 0;
+ return addToOperationsList(this, common.REMOVE, op[key]);
+ }
+
+ // Crud spec delete operations, less efficient
+ if(op.deleteOne || op.deleteMany) {
+ var limit = op.deleteOne ? 1 : 0;
+ operation = {q: op[key].filter, limit: limit}
+ return addToOperationsList(this, common.REMOVE, operation);
+ }
+
+ // Insert operations
+ if(op.insertOne && op.insertOne.document == null) {
+ if(forceServerObjectId !== true && op.insertOne._id == null) op.insertOne._id = new ObjectID();
+ return addToOperationsList(this, common.INSERT, op.insertOne);
+ } else if(op.insertOne && op.insertOne.document) {
+ if(forceServerObjectId !== true && op.insertOne.document._id == null) op.insertOne.document._id = new ObjectID();
+ return addToOperationsList(this, common.INSERT, op.insertOne.document);
+ }
+
+ if(op.insertMany) {
+ for(var i = 0; i < op.insertMany.length; i++) {
+ if(forceServerObjectId !== true && op.insertMany[i]._id == null) op.insertMany[i]._id = new ObjectID();
+ addToOperationsList(this, common.INSERT, op.insertMany[i]);
+ }
+
+ return;
+ }
+
+ // No valid type of operation
+ throw toError("bulkWrite only supports insertOne, insertMany, updateOne, updateMany, removeOne, removeMany, deleteOne, deleteMany");
+}
+
+//
+// Execute the command
+var executeBatch = function(self, batch, callback) {
+ var finalOptions = {ordered: false}
+ if(self.s.writeConcern != null) {
+ finalOptions.writeConcern = self.s.writeConcern;
+ }
+
+ var resultHandler = function(err, result) {
+ // Error is a driver related error not a bulk op error, terminate
+ if(err && err.driver || err && err.message) {
+ return handleCallback(callback, err);
+ }
+
+ // If we have and error
+ if(err) err.ok = 0;
+ handleCallback(callback, null, mergeBatchResults(false, batch, self.s.bulkResult, err, result));
+ }
+
+ // Set an operationIf if provided
+ if(self.operationId) {
+ resultHandler.operationId = self.operationId;
+ }
+
+ // Serialize functions
+ if(self.s.options.serializeFunctions) {
+ finalOptions.serializeFunctions = true
+ }
+
+ // Is the bypassDocumentValidation options specific
+ if(self.s.bypassDocumentValidation == true) {
+ finalOptions.bypassDocumentValidation = true;
+ }
+
+ try {
+ if(batch.batchType == common.INSERT) {
+ self.s.topology.insert(self.s.collection.namespace, batch.operations, finalOptions, resultHandler);
+ } else if(batch.batchType == common.UPDATE) {
+ self.s.topology.update(self.s.collection.namespace, batch.operations, finalOptions, resultHandler);
+ } else if(batch.batchType == common.REMOVE) {
+ self.s.topology.remove(self.s.collection.namespace, batch.operations, finalOptions, resultHandler);
+ }
+ } catch(err) {
+ // Force top level error
+ err.ok = 0;
+ // Merge top level error and return
+ handleCallback(callback, null, mergeBatchResults(false, batch, self.s.bulkResult, err, null));
+ }
+}
+
+//
+// Execute all the commands
+var executeBatches = function(self, callback) {
+ var numberOfCommandsToExecute = self.s.batches.length;
+ // Execute over all the batches
+ for(var i = 0; i < self.s.batches.length; i++) {
+ executeBatch(self, self.s.batches[i], function(err) {
+ // Driver layer error capture it
+ if(err) error = err;
+ // Count down the number of commands left to execute
+ numberOfCommandsToExecute = numberOfCommandsToExecute - 1;
+
+ // Execute
+ if(numberOfCommandsToExecute == 0) {
+ // Driver level error
+ if(error) return handleCallback(callback, error);
+ // Treat write errors
+ var error = self.s.bulkResult.writeErrors.length > 0 ? toError(self.s.bulkResult.writeErrors[0]) : null;
+ handleCallback(callback, error, new BulkWriteResult(self.s.bulkResult));
+ }
+ });
+ }
+}
+
+/**
+ * The callback format for results
+ * @callback UnorderedBulkOperation~resultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {BulkWriteResult} result The bulk write result.
+ */
+
+/**
+ * Execute the ordered bulk operation
+ *
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.fsync=false] Specify a file sync write concern.
+ * @param {UnorderedBulkOperation~resultCallback} [callback] The result callback
+ * @throws {MongoError}
+ * @return {Promise} returns Promise if no callback passed
+ */
+UnorderedBulkOperation.prototype.execute = function(_writeConcern, callback) {
+ var self = this;
+ if(this.s.executed) throw toError("batch cannot be re-executed");
+ if(typeof _writeConcern == 'function') {
+ callback = _writeConcern;
+ } else if(_writeConcern && typeof _writeConcern == 'object') {
+ this.s.writeConcern = _writeConcern;
+ }
+
+ // If we have current batch
+ if(this.s.currentInsertBatch) this.s.batches.push(this.s.currentInsertBatch);
+ if(this.s.currentUpdateBatch) this.s.batches.push(this.s.currentUpdateBatch);
+ if(this.s.currentRemoveBatch) this.s.batches.push(this.s.currentRemoveBatch);
+
+ // If we have no operations in the bulk raise an error
+ if(this.s.batches.length == 0) {
+ throw toError("Invalid Operation, No operations in bulk");
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return executeBatches(this, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ executeBatches(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('execute', {callback: true, promise:false});
+
+/**
+ * Returns an unordered batch object
+ * @ignore
+ */
+var initializeUnorderedBulkOp = function(topology, collection, options) {
+ return new UnorderedBulkOperation(topology, collection, options);
+}
+
+initializeUnorderedBulkOp.UnorderedBulkOperation = UnorderedBulkOperation;
+module.exports = initializeUnorderedBulkOp;
+module.exports.Bulk = UnorderedBulkOperation;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/collection.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/collection.js
new file mode 100644
index 0000000..994c858
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/collection.js
@@ -0,0 +1,3354 @@
+"use strict";
+
+var checkCollectionName = require('./utils').checkCollectionName
+ , ObjectID = require('mongodb-core').BSON.ObjectID
+ , Long = require('mongodb-core').BSON.Long
+ , Code = require('mongodb-core').BSON.Code
+ , f = require('util').format
+ , AggregationCursor = require('./aggregation_cursor')
+ , MongoError = require('mongodb-core').MongoError
+ , shallowClone = require('./utils').shallowClone
+ , isObject = require('./utils').isObject
+ , toError = require('./utils').toError
+ , normalizeHintField = require('./utils').normalizeHintField
+ , handleCallback = require('./utils').handleCallback
+ , decorateCommand = require('./utils').decorateCommand
+ , formattedOrderClause = require('./utils').formattedOrderClause
+ , ReadPreference = require('./read_preference')
+ , CoreReadPreference = require('mongodb-core').ReadPreference
+ , CommandCursor = require('./command_cursor')
+ , Define = require('./metadata')
+ , Cursor = require('./cursor')
+ , unordered = require('./bulk/unordered')
+ , ordered = require('./bulk/ordered')
+ , assign = require('./utils').assign;
+
+/**
+ * @fileOverview The **Collection** class is an internal class that embodies a MongoDB collection
+ * allowing for insert/update/remove/find and other command operation on that MongoDB collection.
+ *
+ * **COLLECTION Cannot directly be instantiated**
+ * @example
+ * var MongoClient = require('mongodb').MongoClient,
+ * test = require('assert');
+ * // Connection url
+ * var url = 'mongodb://localhost:27017/test';
+ * // Connect using MongoClient
+ * MongoClient.connect(url, function(err, db) {
+ * // Create a collection we want to drop later
+ * var col = db.collection('createIndexExample1');
+ * // Show that duplicate records got dropped
+ * col.find({}).toArray(function(err, items) {
+ * test.equal(null, err);
+ * test.equal(4, items.length);
+ * db.close();
+ * });
+ * });
+ */
+
+/**
+ * Create a new Collection instance (INTERNAL TYPE, do not instantiate directly)
+ * @class
+ * @property {string} collectionName Get the collection name.
+ * @property {string} namespace Get the full collection namespace.
+ * @property {object} writeConcern The current write concern values.
+ * @property {object} readConcern The current read concern values.
+ * @property {object} hint Get current index hint for collection.
+ * @return {Collection} a Collection instance.
+ */
+var Collection = function(db, topology, dbName, name, pkFactory, options) {
+ checkCollectionName(name);
+
+ // Unpack variables
+ var internalHint = null;
+ var slaveOk = options == null || options.slaveOk == null ? db.slaveOk : options.slaveOk;
+ var serializeFunctions = options == null || options.serializeFunctions == null ? db.s.options.serializeFunctions : options.serializeFunctions;
+ var raw = options == null || options.raw == null ? db.s.options.raw : options.raw;
+ var promoteLongs = options == null || options.promoteLongs == null ? db.s.options.promoteLongs : options.promoteLongs;
+ var promoteValues = options == null || options.promoteValues == null ? db.s.options.promoteValues : options.promoteValues;
+ var promoteBuffers = options == null || options.promoteBuffers == null ? db.s.options.promoteBuffers : options.promoteBuffers;
+ var readPreference = null;
+ var collectionHint = null;
+ var namespace = f("%s.%s", dbName, name);
+
+ // Get the promiseLibrary
+ var promiseLibrary = options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // Assign the right collection level readPreference
+ if(options && options.readPreference) {
+ readPreference = options.readPreference;
+ } else if(db.options.readPreference) {
+ readPreference = db.options.readPreference;
+ }
+
+ // Set custom primary key factory if provided
+ pkFactory = pkFactory == null
+ ? ObjectID
+ : pkFactory;
+
+ // Internal state
+ this.s = {
+ // Set custom primary key factory if provided
+ pkFactory: pkFactory
+ // Db
+ , db: db
+ // Topology
+ , topology: topology
+ // dbName
+ , dbName: dbName
+ // Options
+ , options: options
+ // Namespace
+ , namespace: namespace
+ // Read preference
+ , readPreference: readPreference
+ // SlaveOK
+ , slaveOk: slaveOk
+ // Serialize functions
+ , serializeFunctions: serializeFunctions
+ // Raw
+ , raw: raw
+ // promoteLongs
+ , promoteLongs: promoteLongs
+ // promoteValues
+ , promoteValues: promoteValues
+ // promoteBuffers
+ , promoteBuffers: promoteBuffers
+ // internalHint
+ , internalHint: internalHint
+ // collectionHint
+ , collectionHint: collectionHint
+ // Name
+ , name: name
+ // Promise library
+ , promiseLibrary: promiseLibrary
+ // Read Concern
+ , readConcern: options.readConcern
+ }
+}
+
+var define = Collection.define = new Define('Collection', Collection, false);
+
+Object.defineProperty(Collection.prototype, 'collectionName', {
+ enumerable: true, get: function() { return this.s.name; }
+});
+
+Object.defineProperty(Collection.prototype, 'namespace', {
+ enumerable: true, get: function() { return this.s.namespace; }
+});
+
+Object.defineProperty(Collection.prototype, 'readConcern', {
+ enumerable: true, get: function() { return this.s.readConcern || {level: 'local'}; }
+});
+
+Object.defineProperty(Collection.prototype, 'writeConcern', {
+ enumerable:true,
+ get: function() {
+ var ops = {};
+ if(this.s.options.w != null) ops.w = this.s.options.w;
+ if(this.s.options.j != null) ops.j = this.s.options.j;
+ if(this.s.options.fsync != null) ops.fsync = this.s.options.fsync;
+ if(this.s.options.wtimeout != null) ops.wtimeout = this.s.options.wtimeout;
+ return ops;
+ }
+});
+
+/**
+ * @ignore
+ */
+Object.defineProperty(Collection.prototype, "hint", {
+ enumerable: true
+ , get: function () { return this.s.collectionHint; }
+ , set: function (v) { this.s.collectionHint = normalizeHintField(v); }
+});
+
+/**
+ * Creates a cursor for a query that can be used to iterate over results from MongoDB
+ * @method
+ * @param {object} query The cursor query object.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Collection.prototype.find = function() {
+ var options
+ , args = Array.prototype.slice.call(arguments, 0)
+ , has_callback = typeof args[args.length - 1] === 'function'
+ , has_weird_callback = typeof args[0] === 'function'
+ , callback = has_callback ? args.pop() : (has_weird_callback ? args.shift() : null)
+ , len = args.length
+ , selector = len >= 1 ? args[0] : {}
+ , fields = len >= 2 ? args[1] : undefined;
+
+ if(len === 1 && has_weird_callback) {
+ // backwards compat for callback?, options case
+ selector = {};
+ options = args[0];
+ }
+
+ if(len === 2 && fields !== undefined && !Array.isArray(fields)) {
+ var fieldKeys = Object.keys(fields);
+ var is_option = false;
+
+ for(var i = 0; i < fieldKeys.length; i++) {
+ if(testForFields[fieldKeys[i]] != null) {
+ is_option = true;
+ break;
+ }
+ }
+
+ if(is_option) {
+ options = fields;
+ fields = undefined;
+ } else {
+ options = {};
+ }
+ } else if(len === 2 && Array.isArray(fields) && !Array.isArray(fields[0])) {
+ var newFields = {};
+ // Rewrite the array
+ for(i = 0; i < fields.length; i++) {
+ newFields[fields[i]] = 1;
+ }
+ // Set the fields
+ fields = newFields;
+ }
+
+ if(3 === len) {
+ options = args[2];
+ }
+
+ // Ensure selector is not null
+ selector = selector == null ? {} : selector;
+ // Validate correctness off the selector
+ var object = selector;
+ if(Buffer.isBuffer(object)) {
+ var object_size = object[0] | object[1] << 8 | object[2] << 16 | object[3] << 24;
+ if(object_size != object.length) {
+ var error = new Error("query selector raw message size does not match message header size [" + object.length + "] != [" + object_size + "]");
+ error.name = 'MongoError';
+ throw error;
+ }
+ }
+
+ // Validate correctness of the field selector
+ object = fields;
+ if(Buffer.isBuffer(object)) {
+ object_size = object[0] | object[1] << 8 | object[2] << 16 | object[3] << 24;
+ if(object_size != object.length) {
+ error = new Error("query fields raw message size does not match message header size [" + object.length + "] != [" + object_size + "]");
+ error.name = 'MongoError';
+ throw error;
+ }
+ }
+
+ // Check special case where we are using an objectId
+ if(selector != null && selector._bsontype == 'ObjectID') {
+ selector = {_id:selector};
+ }
+
+ // If it's a serialized fields field we need to just let it through
+ // user be warned it better be good
+ if(options && options.fields && !(Buffer.isBuffer(options.fields))) {
+ fields = {};
+
+ if(Array.isArray(options.fields)) {
+ if(!options.fields.length) {
+ fields['_id'] = 1;
+ } else {
+ var l = options.fields.length;
+
+ for (i = 0; i < l; i++) {
+ fields[options.fields[i]] = 1;
+ }
+ }
+ } else {
+ fields = options.fields;
+ }
+ }
+
+ if (!options) options = {};
+
+ var newOptions = {};
+ // Make a shallow copy of options
+ for (var key in options) {
+ newOptions[key] = options[key];
+ }
+
+ // Unpack options
+ newOptions.skip = len > 3 ? args[2] : options.skip ? options.skip : 0;
+ newOptions.limit = len > 3 ? args[3] : options.limit ? options.limit : 0;
+ newOptions.raw = options.raw != null && typeof options.raw === 'boolean' ? options.raw : this.s.raw;
+ newOptions.hint = options.hint != null ? normalizeHintField(options.hint) : this.s.collectionHint;
+ newOptions.timeout = len == 5 ? args[4] : typeof options.timeout === 'undefined' ? undefined : options.timeout;
+ // // If we have overridden slaveOk otherwise use the default db setting
+ newOptions.slaveOk = options.slaveOk != null ? options.slaveOk : this.s.db.slaveOk;
+
+ // Add read preference if needed
+ newOptions = getReadPreference(this, newOptions, this.s.db, this);
+
+ // Set slave ok to true if read preference different from primary
+ if(newOptions.readPreference != null
+ && (newOptions.readPreference != 'primary' || newOptions.readPreference.mode != 'primary')) {
+ newOptions.slaveOk = true;
+ }
+
+ // Ensure the query is an object
+ if(selector != null && typeof selector != 'object') {
+ throw MongoError.create({message: "query selector must be an object", driver:true });
+ }
+
+ // Build the find command
+ var findCommand = {
+ find: this.s.namespace
+ , limit: newOptions.limit
+ , skip: newOptions.skip
+ , query: selector
+ }
+
+ // Ensure we use the right await data option
+ if(typeof newOptions.awaitdata == 'boolean') {
+ newOptions.awaitData = newOptions.awaitdata
+ }
+
+ // Translate to new command option noCursorTimeout
+ if(typeof newOptions.timeout == 'boolean') newOptions.noCursorTimeout = newOptions.timeout;
+
+ // Merge in options to command
+ for(var name in newOptions) {
+ if(newOptions[name] != null) findCommand[name] = newOptions[name];
+ }
+
+ // Format the fields
+ var formatFields = function(fields) {
+ var object = {};
+ if(Array.isArray(fields)) {
+ for(var i = 0; i < fields.length; i++) {
+ if(Array.isArray(fields[i])) {
+ object[fields[i][0]] = fields[i][1];
+ } else {
+ object[fields[i][0]] = 1;
+ }
+ }
+ } else {
+ object = fields;
+ }
+
+ return object;
+ }
+
+ // Special treatment for the fields selector
+ if(fields) findCommand.fields = formatFields(fields);
+
+ // Add db object to the new options
+ newOptions.db = this.s.db;
+
+ // Add the promise library
+ newOptions.promiseLibrary = this.s.promiseLibrary;
+
+ // Set raw if available at collection level
+ if(newOptions.raw == null && typeof this.s.raw == 'boolean') newOptions.raw = this.s.raw;
+ // Set promoteLongs if available at collection level
+ if(newOptions.promoteLongs == null && typeof this.s.promoteLongs == 'boolean') newOptions.promoteLongs = this.s.promoteLongs;
+ if(newOptions.promoteValues == null && typeof this.s.promoteValues == 'boolean') newOptions.promoteValues = this.s.promoteValues;
+ if(newOptions.promoteBuffers == null && typeof this.s.promoteBuffers == 'boolean') newOptions.promoteBuffers = this.s.promoteBuffers;
+
+ // Sort options
+ if(findCommand.sort) {
+ findCommand.sort = formattedOrderClause(findCommand.sort);
+ }
+
+ // Set the readConcern
+ if(this.s.readConcern) {
+ findCommand.readConcern = this.s.readConcern;
+ }
+
+ // Decorate find command with collation options
+ decorateWithCollation(findCommand, this, options);
+
+ // Create the cursor
+ if(typeof callback == 'function') return handleCallback(callback, null, this.s.topology.cursor(this.s.namespace, findCommand, newOptions));
+ return this.s.topology.cursor(this.s.namespace, findCommand, newOptions);
+}
+
+define.classMethod('find', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Inserts a single document into MongoDB. If documents passed in do not contain the **_id** field,
+ * one will be added to each of the documents missing it by the driver, mutating the document. This behavior
+ * can be overridden by setting the **forceServerObjectId** flag.
+ *
+ * @method
+ * @param {object} doc Document to insert.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
+ * @param {boolean} [options.forceServerObjectId=false] Force server to assign _id values instead of driver.
+ * @param {boolean} [options.bypassDocumentValidation=false] Allow driver to bypass schema validation in MongoDB 3.2 or higher.
+ * @param {Collection~insertOneWriteOpCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.insertOne = function(doc, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+ if(Array.isArray(doc) && typeof callback == 'function') {
+ return callback(MongoError.create({message: 'doc parameter must be an object', driver:true }));
+ } else if(Array.isArray(doc)) {
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ reject(MongoError.create({message: 'doc parameter must be an object', driver:true }));
+ });
+ }
+
+ // Add ignoreUndfined
+ if(this.s.options.ignoreUndefined) {
+ options = shallowClone(options);
+ options.ignoreUndefined = this.s.options.ignoreUndefined;
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return insertOne(self, doc, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ insertOne(self, doc, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var insertOne = function(self, doc, options, callback) {
+ insertDocuments(self, [doc], options, function(err, r) {
+ if(callback == null) return;
+ if(err && callback) return callback(err);
+ // Workaround for pre 2.6 servers
+ if(r == null) return callback(null, {result: {ok:1}});
+ // Add values to top level to ensure crud spec compatibility
+ r.insertedCount = r.result.n;
+ r.insertedId = doc._id;
+ if(callback) callback(null, r);
+ });
+}
+
+var mapInserManyResults = function(docs, r) {
+ var ids = r.getInsertedIds();
+ var keys = Object.keys(ids);
+ var finalIds = new Array(keys.length);
+
+ for(var i = 0; i < keys.length; i++) {
+ if(ids[keys[i]]._id) {
+ finalIds[ids[keys[i]].index] = ids[keys[i]]._id;
+ }
+ }
+
+ var finalResult = {
+ result: {ok: 1, n: r.insertedCount},
+ ops: docs,
+ insertedCount: r.insertedCount,
+ insertedIds: finalIds
+ };
+
+ if(r.getLastOp()) {
+ finalResult.result.opTime = r.getLastOp();
+ }
+
+ return finalResult;
+}
+
+define.classMethod('insertOne', {callback: true, promise:true});
+
+/**
+ * Inserts an array of documents into MongoDB. If documents passed in do not contain the **_id** field,
+ * one will be added to each of the documents missing it by the driver, mutating the document. This behavior
+ * can be overridden by setting the **forceServerObjectId** flag.
+ *
+ * @method
+ * @param {object[]} docs Documents to insert.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
+ * @param {boolean} [options.forceServerObjectId=false] Force server to assign _id values instead of driver.
+ * @param {boolean} [options.bypassDocumentValidation=false] Allow driver to bypass schema validation in MongoDB 3.2 or higher.
+ * @param {Collection~insertWriteOpCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.insertMany = function(docs, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {ordered:true};
+ if(!Array.isArray(docs) && typeof callback == 'function') {
+ return callback(MongoError.create({message: 'docs parameter must be an array of documents', driver:true }));
+ } else if(!Array.isArray(docs)) {
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ reject(MongoError.create({message: 'docs parameter must be an array of documents', driver:true }));
+ });
+ }
+
+ // Get the write concern options
+ if(typeof options.checkKeys != 'boolean') {
+ options.checkKeys = true;
+ }
+
+ // If keep going set unordered
+ options['serializeFunctions'] = options['serializeFunctions'] || self.s.serializeFunctions;
+
+ // Set up the force server object id
+ var forceServerObjectId = typeof options.forceServerObjectId == 'boolean'
+ ? options.forceServerObjectId : self.s.db.options.forceServerObjectId;
+
+ // Do we want to force the server to assign the _id key
+ if(forceServerObjectId !== true) {
+ // Add _id if not specified
+ for(var i = 0; i < docs.length; i++) {
+ if(docs[i]._id == null) docs[i]._id = self.s.pkFactory.createPk();
+ }
+ }
+
+ // Generate the bulk write operations
+ var operations = [{
+ insertMany: docs
+ }];
+
+ // Execute using callback
+ if(typeof callback == 'function') return bulkWrite(self, operations, options, function(err, r) {
+ if(err) return callback(err, r);
+ callback(null, mapInserManyResults(docs, r));
+ });
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ bulkWrite(self, operations, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(mapInserManyResults(docs, r));
+ });
+ });
+}
+
+define.classMethod('insertMany', {callback: true, promise:true});
+
+/**
+ * @typedef {Object} Collection~BulkWriteOpResult
+ * @property {number} insertedCount Number of documents inserted.
+ * @property {number} matchedCount Number of documents matched for update.
+ * @property {number} modifiedCount Number of documents modified.
+ * @property {number} deletedCount Number of documents deleted.
+ * @property {number} upsertedCount Number of documents upserted.
+ * @property {object} insertedIds Inserted document generated Id's, hash key is the index of the originating operation
+ * @property {object} upsertedIds Upserted document generated Id's, hash key is the index of the originating operation
+ * @property {object} result The command result object.
+ */
+
+/**
+ * The callback format for inserts
+ * @callback Collection~bulkWriteOpCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Collection~BulkWriteOpResult} result The result object if the command was executed successfully.
+ */
+
+/**
+ * Perform a bulkWrite operation without a fluent API
+ *
+ * Legal operation types are
+ *
+ * { insertOne: { document: { a: 1 } } }
+ *
+ * { updateOne: { filter: {a:2}, update: {$set: {a:2}}, upsert:true } }
+ *
+ * { updateMany: { filter: {a:2}, update: {$set: {a:2}}, upsert:true } }
+ *
+ * { deleteOne: { filter: {c:1} } }
+ *
+ * { deleteMany: { filter: {c:1} } }
+ *
+ * { replaceOne: { filter: {c:3}, replacement: {c:4}, upsert:true}}
+ *
+ * If documents passed in do not contain the **_id** field,
+ * one will be added to each of the documents missing it by the driver, mutating the document. This behavior
+ * can be overridden by setting the **forceServerObjectId** flag.
+ *
+ * @method
+ * @param {object[]} operations Bulk operations to perform.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
+ * @param {boolean} [options.ordered=true] Execute write operation in ordered or unordered fashion.
+ * @param {boolean} [options.bypassDocumentValidation=false] Allow driver to bypass schema validation in MongoDB 3.2 or higher.
+ * @param {Collection~bulkWriteOpCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.bulkWrite = function(operations, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {ordered:true};
+
+ if(!Array.isArray(operations)) {
+ throw MongoError.create({message: "operations must be an array of documents", driver:true });
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return bulkWrite(self, operations, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ bulkWrite(self, operations, options, function(err, r) {
+ if(err && r == null) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var bulkWrite = function(self, operations, options, callback) {
+ // Add ignoreUndfined
+ if(self.s.options.ignoreUndefined) {
+ options = shallowClone(options);
+ options.ignoreUndefined = self.s.options.ignoreUndefined;
+ }
+
+ // Create the bulk operation
+ var bulk = options.ordered == true || options.ordered == null ? self.initializeOrderedBulkOp(options) : self.initializeUnorderedBulkOp(options);
+
+ // Do we have a collation
+ var collation = false;
+
+ // for each op go through and add to the bulk
+ try {
+ for(var i = 0; i < operations.length; i++) {
+ // Get the operation type
+ var key = Object.keys(operations[i])[0];
+ // Check if we have a collation
+ if(operations[i][key].collation) {
+ collation = true;
+ }
+
+ // Pass to the raw bulk
+ bulk.raw(operations[i]);
+ }
+ } catch(err) {
+ return callback(err, null);
+ }
+
+ // Final options for write concern
+ var finalOptions = writeConcern(shallowClone(options), self.s.db, self, options);
+ var writeCon = finalOptions.writeConcern ? finalOptions.writeConcern : {};
+ var capabilities = self.s.topology.capabilities();
+
+ // Did the user pass in a collation, check if our write server supports it
+ if(collation && capabilities && !capabilities.commandsTakeCollation) {
+ return callback(new MongoError(f('server/primary/mongos does not support collation')));
+ }
+
+ // Execute the bulk
+ bulk.execute(writeCon, function(err, r) {
+ // We have connection level error
+ if(!r && err) return callback(err, null);
+ // We have single error
+ if(r && r.hasWriteErrors() && r.getWriteErrorCount() == 1) {
+ return callback(toError(r.getWriteErrorAt(0)), r);
+ }
+
+ r.insertedCount = r.nInserted;
+ r.matchedCount = r.nMatched;
+ r.modifiedCount = r.nModified || 0;
+ r.deletedCount = r.nRemoved;
+ r.upsertedCount = r.getUpsertedIds().length;
+ r.upsertedIds = {};
+ r.insertedIds = {};
+
+ // Update the n
+ r.n = r.insertedCount;
+
+ // Inserted documents
+ var inserted = r.getInsertedIds();
+ // Map inserted ids
+ for(var i = 0; i < inserted.length; i++) {
+ r.insertedIds[inserted[i].index] = inserted[i]._id;
+ }
+
+ // Upserted documents
+ var upserted = r.getUpsertedIds();
+ // Map upserted ids
+ for(i = 0; i < upserted.length; i++) {
+ r.upsertedIds[upserted[i].index] = upserted[i]._id;
+ }
+
+ // Check if we have write errors
+ if(r.hasWriteErrors()) {
+ // Get all the errors
+ var errors = r.getWriteErrors();
+ // Return the MongoError object
+ return callback(toError({
+ message: 'write operation failed', code: errors[0].code, writeErrors: errors
+ }), r);
+ }
+
+ // Check if we have a writeConcern error
+ if(r.getWriteConcernError()) {
+ // Return the MongoError object
+ return callback(toError(r.getWriteConcernError()), r);
+ }
+
+ // Return the results
+ callback(null, r);
+ });
+}
+
+var insertDocuments = function(self, docs, options, callback) {
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+ // Ensure we are operating on an array op docs
+ docs = Array.isArray(docs) ? docs : [docs];
+
+ // Get the write concern options
+ var finalOptions = writeConcern(shallowClone(options), self.s.db, self, options);
+ if(typeof finalOptions.checkKeys != 'boolean') finalOptions.checkKeys = true;
+
+ // If keep going set unordered
+ if(finalOptions.keepGoing == true) finalOptions.ordered = false;
+ finalOptions['serializeFunctions'] = options['serializeFunctions'] || self.s.serializeFunctions;
+
+ // Set up the force server object id
+ var forceServerObjectId = typeof options.forceServerObjectId == 'boolean'
+ ? options.forceServerObjectId : self.s.db.options.forceServerObjectId;
+
+ // Add _id if not specified
+ if(forceServerObjectId !== true){
+ for(var i = 0; i < docs.length; i++) {
+ if(docs[i]._id == null) docs[i]._id = self.s.pkFactory.createPk();
+ }
+ }
+
+ // File inserts
+ self.s.topology.insert(self.s.namespace, docs, finalOptions, function(err, result) {
+ if(callback == null) return;
+ if(err) return handleCallback(callback, err);
+ if(result == null) return handleCallback(callback, null, null);
+ if(result.result.code) return handleCallback(callback, toError(result.result));
+ if(result.result.writeErrors) return handleCallback(callback, toError(result.result.writeErrors[0]));
+ // Add docs to the list
+ result.ops = docs;
+ // Return the results
+ handleCallback(callback, null, result);
+ });
+}
+
+define.classMethod('bulkWrite', {callback: true, promise:true});
+
+/**
+ * @typedef {Object} Collection~WriteOpResult
+ * @property {object[]} ops All the documents inserted using insertOne/insertMany/replaceOne. Documents contain the _id field if forceServerObjectId == false for insertOne/insertMany
+ * @property {object} connection The connection object used for the operation.
+ * @property {object} result The command result object.
+ */
+
+/**
+ * The callback format for inserts
+ * @callback Collection~writeOpCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Collection~WriteOpResult} result The result object if the command was executed successfully.
+ */
+
+/**
+ * @typedef {Object} Collection~insertWriteOpResult
+ * @property {Number} insertedCount The total amount of documents inserted.
+ * @property {object[]} ops All the documents inserted using insertOne/insertMany/replaceOne. Documents contain the _id field if forceServerObjectId == false for insertOne/insertMany
+ * @property {ObjectId[]} insertedIds All the generated _id's for the inserted documents.
+ * @property {object} connection The connection object used for the operation.
+ * @property {object} result The raw command result object returned from MongoDB (content might vary by server version).
+ * @property {Number} result.ok Is 1 if the command executed correctly.
+ * @property {Number} result.n The total count of documents inserted.
+ */
+
+/**
+ * @typedef {Object} Collection~insertOneWriteOpResult
+ * @property {Number} insertedCount The total amount of documents inserted.
+ * @property {object[]} ops All the documents inserted using insertOne/insertMany/replaceOne. Documents contain the _id field if forceServerObjectId == false for insertOne/insertMany
+ * @property {ObjectId} insertedId The driver generated ObjectId for the insert operation.
+ * @property {object} connection The connection object used for the operation.
+ * @property {object} result The raw command result object returned from MongoDB (content might vary by server version).
+ * @property {Number} result.ok Is 1 if the command executed correctly.
+ * @property {Number} result.n The total count of documents inserted.
+ */
+
+/**
+ * The callback format for inserts
+ * @callback Collection~insertWriteOpCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Collection~insertWriteOpResult} result The result object if the command was executed successfully.
+ */
+
+/**
+ * The callback format for inserts
+ * @callback Collection~insertOneWriteOpCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Collection~insertOneWriteOpResult} result The result object if the command was executed successfully.
+ */
+
+/**
+ * Inserts a single document or a an array of documents into MongoDB. If documents passed in do not contain the **_id** field,
+ * one will be added to each of the documents missing it by the driver, mutating the document. This behavior
+ * can be overridden by setting the **forceServerObjectId** flag.
+ *
+ * @method
+ * @param {(object|object[])} docs Documents to insert.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
+ * @param {boolean} [options.forceServerObjectId=false] Force server to assign _id values instead of driver.
+ * @param {boolean} [options.bypassDocumentValidation=false] Allow driver to bypass schema validation in MongoDB 3.2 or higher.
+ * @param {Collection~insertWriteOpCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use insertOne, insertMany or bulkWrite
+ */
+Collection.prototype.insert = function(docs, options, callback) {
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {ordered:false};
+ docs = !Array.isArray(docs) ? [docs] : docs;
+
+ if(options.keepGoing == true) {
+ options.ordered = false;
+ }
+
+ return this.insertMany(docs, options, callback);
+}
+
+define.classMethod('insert', {callback: true, promise:true});
+
+/**
+ * @typedef {Object} Collection~updateWriteOpResult
+ * @property {Object} result The raw result returned from MongoDB, field will vary depending on server version.
+ * @property {Number} result.ok Is 1 if the command executed correctly.
+ * @property {Number} result.n The total count of documents scanned.
+ * @property {Number} result.nModified The total count of documents modified.
+ * @property {Object} connection The connection object used for the operation.
+ * @property {Number} matchedCount The number of documents that matched the filter.
+ * @property {Number} modifiedCount The number of documents that were modified.
+ * @property {Number} upsertedCount The number of documents upserted.
+ * @property {Object} upsertedId The upserted id.
+ * @property {ObjectId} upsertedId._id The upserted _id returned from the server.
+ */
+
+/**
+ * The callback format for inserts
+ * @callback Collection~updateWriteOpCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Collection~updateWriteOpResult} result The result object if the command was executed successfully.
+ */
+
+/**
+ * Update a single document on MongoDB
+ * @method
+ * @param {object} filter The Filter used to select the document to update
+ * @param {object} update The update operations to be applied to the document
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.upsert=false] Update operation is an upsert.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.bypassDocumentValidation=false] Allow driver to bypass schema validation in MongoDB 3.2 or higher.
+ * @param {Collection~updateWriteOpCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.updateOne = function(filter, update, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = shallowClone(options)
+
+ // Add ignoreUndfined
+ if(this.s.options.ignoreUndefined) {
+ options = shallowClone(options);
+ options.ignoreUndefined = this.s.options.ignoreUndefined;
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return updateOne(self, filter, update, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ updateOne(self, filter, update, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var updateOne = function(self, filter, update, options, callback) {
+ // Set single document update
+ options.multi = false;
+ // Execute update
+ updateDocuments(self, filter, update, options, function(err, r) {
+ if(callback == null) return;
+ if(err && callback) return callback(err);
+ if(r == null) return callback(null, {result: {ok:1}});
+ r.modifiedCount = r.result.nModified != null ? r.result.nModified : r.result.n;
+ r.upsertedId = Array.isArray(r.result.upserted) && r.result.upserted.length > 0 ? r.result.upserted[0] : null;
+ r.upsertedCount = Array.isArray(r.result.upserted) && r.result.upserted.length ? r.result.upserted.length : 0;
+ r.matchedCount = Array.isArray(r.result.upserted) && r.result.upserted.length > 0 ? 0 : r.result.n;
+ if(callback) callback(null, r);
+ });
+}
+
+define.classMethod('updateOne', {callback: true, promise:true});
+
+/**
+ * Replace a document on MongoDB
+ * @method
+ * @param {object} filter The Filter used to select the document to update
+ * @param {object} doc The Document that replaces the matching document
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.upsert=false] Update operation is an upsert.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.bypassDocumentValidation=false] Allow driver to bypass schema validation in MongoDB 3.2 or higher.
+ * @param {Collection~updateWriteOpCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.replaceOne = function(filter, doc, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = shallowClone(options)
+
+ // Add ignoreUndfined
+ if(this.s.options.ignoreUndefined) {
+ options = shallowClone(options);
+ options.ignoreUndefined = this.s.options.ignoreUndefined;
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return replaceOne(self, filter, doc, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ replaceOne(self, filter, doc, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var replaceOne = function(self, filter, doc, options, callback) {
+ // Set single document update
+ options.multi = false;
+
+ // Execute update
+ updateDocuments(self, filter, doc, options, function(err, r) {
+ if(callback == null) return;
+ if(err && callback) return callback(err);
+ if(r == null) return callback(null, {result: {ok:1}});
+
+ r.modifiedCount = r.result.nModified != null ? r.result.nModified : r.result.n;
+ r.upsertedId = Array.isArray(r.result.upserted) && r.result.upserted.length > 0 ? r.result.upserted[0] : null;
+ r.upsertedCount = Array.isArray(r.result.upserted) && r.result.upserted.length ? r.result.upserted.length : 0;
+ r.matchedCount = Array.isArray(r.result.upserted) && r.result.upserted.length > 0 ? 0 : r.result.n;
+ r.ops = [doc];
+ if(callback) callback(null, r);
+ });
+}
+
+define.classMethod('replaceOne', {callback: true, promise:true});
+
+/**
+ * Update multiple documents on MongoDB
+ * @method
+ * @param {object} filter The Filter used to select the document to update
+ * @param {object} update The update operations to be applied to the document
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.upsert=false] Update operation is an upsert.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {Collection~updateWriteOpCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.updateMany = function(filter, update, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = shallowClone(options)
+
+ // Add ignoreUndfined
+ if(this.s.options.ignoreUndefined) {
+ options = shallowClone(options);
+ options.ignoreUndefined = this.s.options.ignoreUndefined;
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return updateMany(self, filter, update, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ updateMany(self, filter, update, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var updateMany = function(self, filter, update, options, callback) {
+ // Set single document update
+ options.multi = true;
+ // Execute update
+ updateDocuments(self, filter, update, options, function(err, r) {
+ if(callback == null) return;
+ if(err && callback) return callback(err);
+ if(r == null) return callback(null, {result: {ok:1}});
+ r.modifiedCount = r.result.nModified != null ? r.result.nModified : r.result.n;
+ r.upsertedId = Array.isArray(r.result.upserted) && r.result.upserted.length > 0 ? r.result.upserted[0] : null;
+ r.upsertedCount = Array.isArray(r.result.upserted) && r.result.upserted.length ? r.result.upserted.length : 0;
+ r.matchedCount = Array.isArray(r.result.upserted) && r.result.upserted.length > 0 ? 0 : r.result.n;
+ if(callback) callback(null, r);
+ });
+}
+
+define.classMethod('updateMany', {callback: true, promise:true});
+
+var updateDocuments = function(self, selector, document, options, callback) {
+ if('function' === typeof options) callback = options, options = null;
+ if(options == null) options = {};
+ if(!('function' === typeof callback)) callback = null;
+
+ // If we are not providing a selector or document throw
+ if(selector == null || typeof selector != 'object') return callback(toError("selector must be a valid JavaScript object"));
+ if(document == null || typeof document != 'object') return callback(toError("document must be a valid JavaScript object"));
+
+ // Get the write concern options
+ var finalOptions = writeConcern(shallowClone(options), self.s.db, self, options);
+
+ // Do we return the actual result document
+ // Either use override on the function, or go back to default on either the collection
+ // level or db
+ finalOptions['serializeFunctions'] = options['serializeFunctions'] || self.s.serializeFunctions;
+
+ // Execute the operation
+ var op = {q: selector, u: document};
+ op.upsert = typeof options.upsert == 'boolean' ? options.upsert : false;
+ op.multi = typeof options.multi == 'boolean' ? options.multi : false;
+
+ // Have we specified collation
+ decorateWithCollation(finalOptions, self, options);
+
+ // Update options
+ self.s.topology.update(self.s.namespace, [op], finalOptions, function(err, result) {
+ if(callback == null) return;
+ if(err) return handleCallback(callback, err, null);
+ if(result == null) return handleCallback(callback, null, null);
+ if(result.result.code) return handleCallback(callback, toError(result.result));
+ if(result.result.writeErrors) return handleCallback(callback, toError(result.result.writeErrors[0]));
+ // Return the results
+ handleCallback(callback, null, result);
+ });
+}
+
+/**
+ * Updates documents.
+ * @method
+ * @param {object} selector The selector for the update operation.
+ * @param {object} document The update document.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.upsert=false] Update operation is an upsert.
+ * @param {boolean} [options.multi=false] Update one/all documents with operation.
+ * @param {boolean} [options.bypassDocumentValidation=false] Allow driver to bypass schema validation in MongoDB 3.2 or higher.
+ * @param {object} [options.collation=null] Specify collation (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields).
+ * @param {Collection~writeOpCallback} [callback] The command result callback
+ * @throws {MongoError}
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated use updateOne, updateMany or bulkWrite
+ */
+Collection.prototype.update = function(selector, document, options, callback) {
+ var self = this;
+
+ // Add ignoreUndfined
+ if(this.s.options.ignoreUndefined) {
+ options = shallowClone(options);
+ options.ignoreUndefined = this.s.options.ignoreUndefined;
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return updateDocuments(self, selector, document, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ updateDocuments(self, selector, document, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('update', {callback: true, promise:true});
+
+/**
+ * @typedef {Object} Collection~deleteWriteOpResult
+ * @property {Object} result The raw result returned from MongoDB, field will vary depending on server version.
+ * @property {Number} result.ok Is 1 if the command executed correctly.
+ * @property {Number} result.n The total count of documents deleted.
+ * @property {Object} connection The connection object used for the operation.
+ * @property {Number} deletedCount The number of documents deleted.
+ */
+
+/**
+ * The callback format for inserts
+ * @callback Collection~deleteWriteOpCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Collection~deleteWriteOpResult} result The result object if the command was executed successfully.
+ */
+
+/**
+ * Delete a document on MongoDB
+ * @method
+ * @param {object} filter The Filter used to select the document to remove
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {Collection~deleteWriteOpCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.deleteOne = function(filter, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = shallowClone(options);
+
+ // Add ignoreUndfined
+ if(this.s.options.ignoreUndefined) {
+ options = shallowClone(options);
+ options.ignoreUndefined = this.s.options.ignoreUndefined;
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return deleteOne(self, filter, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ deleteOne(self, filter, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var deleteOne = function(self, filter, options, callback) {
+ options.single = true;
+ removeDocuments(self, filter, options, function(err, r) {
+ if(callback == null) return;
+ if(err && callback) return callback(err);
+ if(r == null) return callback(null, {result: {ok:1}});
+ r.deletedCount = r.result.n;
+ if(callback) callback(null, r);
+ });
+}
+
+define.classMethod('deleteOne', {callback: true, promise:true});
+
+Collection.prototype.removeOne = Collection.prototype.deleteOne;
+
+define.classMethod('removeOne', {callback: true, promise:true});
+
+/**
+ * Delete multiple documents on MongoDB
+ * @method
+ * @param {object} filter The Filter used to select the documents to remove
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {Collection~deleteWriteOpCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.deleteMany = function(filter, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = shallowClone(options);
+
+ // Add ignoreUndfined
+ if(this.s.options.ignoreUndefined) {
+ options = shallowClone(options);
+ options.ignoreUndefined = this.s.options.ignoreUndefined;
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return deleteMany(self, filter, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ deleteMany(self, filter, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var deleteMany = function(self, filter, options, callback) {
+ options.single = false;
+
+ removeDocuments(self, filter, options, function(err, r) {
+ if(callback == null) return;
+ if(err && callback) return callback(err);
+ if(r == null) return callback(null, {result: {ok:1}});
+ r.deletedCount = r.result.n;
+ if(callback) callback(null, r);
+ });
+}
+
+var removeDocuments = function(self, selector, options, callback) {
+ if(typeof options == 'function') {
+ callback = options, options = {};
+ } else if (typeof selector === 'function') {
+ callback = selector;
+ options = {};
+ selector = {};
+ }
+
+ // Create an empty options object if the provided one is null
+ options = options || {};
+
+ // Get the write concern options
+ var finalOptions = writeConcern(shallowClone(options), self.s.db, self, options);
+
+ // If selector is null set empty
+ if(selector == null) selector = {};
+
+ // Build the op
+ var op = {q: selector, limit: 0};
+ if(options.single) op.limit = 1;
+
+ // Have we specified collation
+ decorateWithCollation(finalOptions, self, options);
+
+ // Execute the remove
+ self.s.topology.remove(self.s.namespace, [op], finalOptions, function(err, result) {
+ if(callback == null) return;
+ if(err) return handleCallback(callback, err, null);
+ if(result == null) return handleCallback(callback, null, null);
+ if(result.result.code) return handleCallback(callback, toError(result.result));
+ if(result.result.writeErrors) return handleCallback(callback, toError(result.result.writeErrors[0]));
+ // Return the results
+ handleCallback(callback, null, result);
+ });
+}
+
+define.classMethod('deleteMany', {callback: true, promise:true});
+
+Collection.prototype.removeMany = Collection.prototype.deleteMany;
+
+define.classMethod('removeMany', {callback: true, promise:true});
+
+/**
+ * Remove documents.
+ * @method
+ * @param {object} selector The selector for the update operation.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.single=false] Removes the first document found.
+ * @param {Collection~writeOpCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated use deleteOne, deleteMany or bulkWrite
+ */
+Collection.prototype.remove = function(selector, options, callback) {
+ var self = this;
+
+ // Add ignoreUndfined
+ if(this.s.options.ignoreUndefined) {
+ options = shallowClone(options);
+ options.ignoreUndefined = this.s.options.ignoreUndefined;
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return removeDocuments(self, selector, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ removeDocuments(self, selector, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('remove', {callback: true, promise:true});
+
+/**
+ * Save a document. Simple full document replacement function. Not recommended for efficiency, use atomic
+ * operators and update instead for more efficient operations.
+ * @method
+ * @param {object} doc Document to save
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {Collection~writeOpCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated use insertOne, insertMany, updateOne or updateMany
+ */
+Collection.prototype.save = function(doc, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // Add ignoreUndfined
+ if(this.s.options.ignoreUndefined) {
+ options = shallowClone(options);
+ options.ignoreUndefined = this.s.options.ignoreUndefined;
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return save(self, doc, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ save(self, doc, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var save = function(self, doc, options, callback) {
+ // Get the write concern options
+ var finalOptions = writeConcern(shallowClone(options), self.s.db, self, options);
+ // Establish if we need to perform an insert or update
+ if(doc._id != null) {
+ finalOptions.upsert = true;
+ return updateDocuments(self, {_id: doc._id}, doc, finalOptions, callback);
+ }
+
+ // Insert the document
+ insertDocuments(self, [doc], options, function(err, r) {
+ if(callback == null) return;
+ if(doc == null) return handleCallback(callback, null, null);
+ if(err) return handleCallback(callback, err, null);
+ handleCallback(callback, null, r);
+ });
+}
+
+define.classMethod('save', {callback: true, promise:true});
+
+/**
+ * The callback format for results
+ * @callback Collection~resultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {object} result The result object if the command was executed successfully.
+ */
+
+/**
+ * Fetches the first document that matches the query
+ * @method
+ * @param {object} query Query for find Operation
+ * @param {object} [options=null] Optional settings.
+ * @param {number} [options.limit=0] Sets the limit of documents returned in the query.
+ * @param {(array|object)} [options.sort=null] Set to sort the documents coming back from the query. Array of indexes, [['a', 1]] etc.
+ * @param {object} [options.fields=null] The fields to return in the query. Object of fields to include or exclude (not both), {'a':1}
+ * @param {number} [options.skip=0] Set to skip N documents ahead in your query (useful for pagination).
+ * @param {Object} [options.hint=null] Tell the query to use specific indexes in the query. Object of indexes to use, {'_id':1}
+ * @param {boolean} [options.explain=false] Explain the query instead of returning the data.
+ * @param {boolean} [options.snapshot=false] Snapshot query.
+ * @param {boolean} [options.timeout=false] Specify if the cursor can timeout.
+ * @param {boolean} [options.tailable=false] Specify if the cursor is tailable.
+ * @param {number} [options.batchSize=0] Set the batchSize for the getMoreCommand when iterating over the query results.
+ * @param {boolean} [options.returnKey=false] Only return the index key.
+ * @param {number} [options.maxScan=null] Limit the number of items to scan.
+ * @param {number} [options.min=null] Set index bounds.
+ * @param {number} [options.max=null] Set index bounds.
+ * @param {boolean} [options.showDiskLoc=false] Show disk location of results.
+ * @param {string} [options.comment=null] You can put a $comment field on a query to make looking in the profiler logs simpler.
+ * @param {boolean} [options.raw=false] Return document results as raw BSON buffers.
+ * @param {boolean} [options.promoteLongs=true] Promotes Long values to number if they fit inside the 53 bits resolution.
+ * @param {boolean} [options.promoteValues=true] Promotes BSON values to native types where possible, set to false to only receive wrapper types.
+ * @param {boolean} [options.promoteBuffers=false] Promotes Binary BSON values to native Node Buffers.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {boolean} [options.partial=false] Specify if the cursor should return partial results when querying against a sharded system
+ * @param {number} [options.maxTimeMS=null] Number of miliseconds to wait before aborting the query.
+ * @param {object} [options.collation=null] Specify collation (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields).
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.findOne = function() {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 0);
+ var callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+
+ // Execute using callback
+ if(typeof callback == 'function') return findOne(self, args, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ findOne(self, args, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var findOne = function(self, args, callback) {
+ var cursor = self.find.apply(self, args).limit(-1).batchSize(1);
+ // Return the item
+ cursor.next(function(err, item) {
+ if(err != null) return handleCallback(callback, toError(err), null);
+ handleCallback(callback, null, item);
+ });
+}
+
+define.classMethod('findOne', {callback: true, promise:true});
+
+/**
+ * The callback format for the collection method, must be used if strict is specified
+ * @callback Collection~collectionResultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Collection} collection The collection instance.
+ */
+
+/**
+ * Rename the collection.
+ *
+ * @method
+ * @param {string} newName New name of of the collection.
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.dropTarget=false] Drop the target name collection if it previously exists.
+ * @param {Collection~collectionResultCallback} [callback] The results callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.rename = function(newName, opt, callback) {
+ var self = this;
+ if(typeof opt == 'function') callback = opt, opt = {};
+ opt = assign({}, opt, {readPreference: ReadPreference.PRIMARY});
+
+ // Execute using callback
+ if(typeof callback == 'function') return rename(self, newName, opt, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ rename(self, newName, opt, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var rename = function(self, newName, opt, callback) {
+ // Check the collection name
+ checkCollectionName(newName);
+ // Build the command
+ var renameCollection = f("%s.%s", self.s.dbName, self.s.name);
+ var toCollection = f("%s.%s", self.s.dbName, newName);
+ var dropTarget = typeof opt.dropTarget == 'boolean' ? opt.dropTarget : false;
+ var cmd = {'renameCollection':renameCollection, 'to':toCollection, 'dropTarget':dropTarget};
+
+ // Decorate command with writeConcern if supported
+ decorateWithWriteConcern(cmd, self, opt);
+
+ // Execute against admin
+ self.s.db.admin().command(cmd, opt, function(err, doc) {
+ if(err) return handleCallback(callback, err, null);
+ // We have an error
+ if(doc.errmsg) return handleCallback(callback, toError(doc), null);
+ try {
+ return handleCallback(callback, null, new Collection(self.s.db, self.s.topology, self.s.dbName, newName, self.s.pkFactory, self.s.options));
+ } catch(err) {
+ return handleCallback(callback, toError(err), null);
+ }
+ });
+}
+
+define.classMethod('rename', {callback: true, promise:true});
+
+/**
+ * Drop the collection from the database, removing it permanently. New accesses will create a new collection.
+ *
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {Collection~resultCallback} [callback] The results callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.drop = function(options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return self.s.db.dropCollection(self.s.name, options, callback);
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.s.db.dropCollection(self.s.name, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('drop', {callback: true, promise:true});
+
+/**
+ * Returns the options of the collection.
+ *
+ * @method
+ * @param {Collection~resultCallback} [callback] The results callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.options = function(callback) {
+ var self = this;
+
+ // Execute using callback
+ if(typeof callback == 'function') return options(self, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ options(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var options = function(self, callback) {
+ self.s.db.listCollections({name: self.s.name}).toArray(function(err, collections) {
+ if(err) return handleCallback(callback, err);
+ if(collections.length == 0) {
+ return handleCallback(callback, MongoError.create({message: f("collection %s not found", self.s.namespace), driver:true }));
+ }
+
+ handleCallback(callback, err, collections[0].options || null);
+ });
+}
+
+define.classMethod('options', {callback: true, promise:true});
+
+/**
+ * Returns if the collection is a capped collection
+ *
+ * @method
+ * @param {Collection~resultCallback} [callback] The results callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.isCapped = function(callback) {
+ var self = this;
+
+ // Execute using callback
+ if(typeof callback == 'function') return isCapped(self, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ isCapped(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var isCapped = function(self, callback) {
+ self.options(function(err, document) {
+ if(err) return handleCallback(callback, err);
+ handleCallback(callback, null, document && document.capped);
+ });
+}
+
+define.classMethod('isCapped', {callback: true, promise:true});
+
+/**
+ * Creates an index on the db and collection collection.
+ * @method
+ * @param {(string|object)} fieldOrSpec Defines the index.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.unique=false] Creates an unique index.
+ * @param {boolean} [options.sparse=false] Creates a sparse index.
+ * @param {boolean} [options.background=false] Creates the index in the background, yielding whenever possible.
+ * @param {boolean} [options.dropDups=false] A unique index cannot be created on a key that has pre-existing duplicate values. If you would like to create the index anyway, keeping the first document the database indexes and deleting all subsequent documents that have duplicate value
+ * @param {number} [options.min=null] For geospatial indexes set the lower bound for the co-ordinates.
+ * @param {number} [options.max=null] For geospatial indexes set the high bound for the co-ordinates.
+ * @param {number} [options.v=null] Specify the format version of the indexes.
+ * @param {number} [options.expireAfterSeconds=null] Allows you to expire data on indexes applied to a data (MongoDB 2.2 or higher)
+ * @param {string} [options.name=null] Override the autogenerated index name (useful if the resulting name is larger than 128 bytes)
+ * @param {object} [options.partialFilterExpression=null] Creates a partial index based on the given filter object (MongoDB 3.2 or higher)
+ * @param {object} [options.collation=null] Specify collation (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields).
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.createIndex = function(fieldOrSpec, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ options = args.length ? args.shift() || {} : {};
+ options = typeof callback === 'function' ? options : callback;
+ options = options == null ? {} : options;
+
+ // Execute using callback
+ if(typeof callback == 'function') return createIndex(self, fieldOrSpec, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ createIndex(self, fieldOrSpec, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var createIndex = function(self, fieldOrSpec, options, callback) {
+ self.s.db.createIndex(self.s.name, fieldOrSpec, options, callback);
+}
+
+define.classMethod('createIndex', {callback: true, promise:true});
+
+/**
+ * Creates multiple indexes in the collection, this method is only supported for
+ * MongoDB 2.6 or higher. Earlier version of MongoDB will throw a command not supported
+ * error. Index specifications are defined at http://docs.mongodb.org/manual/reference/command/createIndexes/.
+ * @method
+ * @param {array} indexSpecs An array of index specifications to be created
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.createIndexes = function(indexSpecs, callback) {
+ var self = this;
+
+ // Execute using callback
+ if(typeof callback == 'function') return createIndexes(self, indexSpecs, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ createIndexes(self, indexSpecs, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var createIndexes = function(self, indexSpecs, callback) {
+ var capabilities = self.s.topology.capabilities();
+
+ // Ensure we generate the correct name if the parameter is not set
+ for(var i = 0; i < indexSpecs.length; i++) {
+ if(indexSpecs[i].name == null) {
+ var keys = [];
+
+ // Did the user pass in a collation, check if our write server supports it
+ if(indexSpecs[i].collation && capabilities && !capabilities.commandsTakeCollation) {
+ return callback(new MongoError(f('server/primary/mongos does not support collation')));
+ }
+
+ for(var name in indexSpecs[i].key) {
+ keys.push(f('%s_%s', name, indexSpecs[i].key[name]));
+ }
+
+ // Set the name
+ indexSpecs[i].name = keys.join('_');
+ }
+ }
+
+ // Execute the index
+ self.s.db.command({
+ createIndexes: self.s.name, indexes: indexSpecs
+ }, { readPreference: ReadPreference.PRIMARY }, callback);
+}
+
+define.classMethod('createIndexes', {callback: true, promise:true});
+
+/**
+ * Drops an index from this collection.
+ * @method
+ * @param {string} indexName Name of the index to drop.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.dropIndex = function(indexName, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ options = args.length ? args.shift() || {} : {};
+ // Run only against primary
+ options.readPreference = ReadPreference.PRIMARY;
+
+ // Execute using callback
+ if(typeof callback == 'function') return dropIndex(self, indexName, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ dropIndex(self, indexName, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var dropIndex = function(self, indexName, options, callback) {
+ // Delete index command
+ var cmd = {'dropIndexes':self.s.name, 'index':indexName};
+
+ // Decorate command with writeConcern if supported
+ decorateWithWriteConcern(cmd, self, options);
+
+ // Execute command
+ self.s.db.command(cmd, options, function(err, result) {
+ if(typeof callback != 'function') return;
+ if(err) return handleCallback(callback, err, null);
+ handleCallback(callback, null, result);
+ });
+}
+
+define.classMethod('dropIndex', {callback: true, promise:true});
+
+/**
+ * Drops all indexes from this collection.
+ * @method
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.dropIndexes = function(options, callback) {
+ var self = this;
+
+ // Do we have options
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return dropIndexes(self, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ dropIndexes(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var dropIndexes = function(self, options, callback) {
+ self.dropIndex('*', options, function(err) {
+ if(err) return handleCallback(callback, err, false);
+ handleCallback(callback, null, true);
+ });
+}
+
+define.classMethod('dropIndexes', {callback: true, promise:true});
+
+/**
+ * Drops all indexes from this collection.
+ * @method
+ * @deprecated use dropIndexes
+ * @param {Collection~resultCallback} callback The command result callback
+ * @return {Promise} returns Promise if no [callback] passed
+ */
+Collection.prototype.dropAllIndexes = Collection.prototype.dropIndexes;
+
+define.classMethod('dropAllIndexes', {callback: true, promise:true});
+
+/**
+ * Reindex all indexes on the collection
+ * Warning: reIndex is a blocking operation (indexes are rebuilt in the foreground) and will be slow for large collections.
+ * @method
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.reIndex = function(options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return reIndex(self, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ reIndex(self, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var reIndex = function(self, options, callback) {
+ // Reindex
+ var cmd = {'reIndex':self.s.name};
+
+ // Decorate command with writeConcern if supported
+ decorateWithWriteConcern(cmd, self, options);
+
+ // Execute the command
+ self.s.db.command(cmd, options, function(err, result) {
+ if(callback == null) return;
+ if(err) return handleCallback(callback, err, null);
+ handleCallback(callback, null, result.ok ? true : false);
+ });
+}
+
+define.classMethod('reIndex', {callback: true, promise:true});
+
+/**
+ * Get the list of all indexes information for the collection.
+ *
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {number} [options.batchSize=null] The batchSize for the returned command cursor or if pre 2.8 the systems batch collection
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @return {CommandCursor}
+ */
+Collection.prototype.listIndexes = function(options) {
+ options = options || {};
+ // Clone the options
+ options = shallowClone(options);
+ // Determine the read preference in the options.
+ options = getReadPreference(this, options, this.s.db, this);
+ // Set the CommandCursor constructor
+ options.cursorFactory = CommandCursor;
+ // Set the promiseLibrary
+ options.promiseLibrary = this.s.promiseLibrary;
+
+ if(!this.s.topology.capabilities()) {
+ throw new MongoError('cannot connect to server');
+ }
+
+ // We have a list collections command
+ if(this.s.topology.capabilities().hasListIndexesCommand) {
+ // Cursor options
+ var cursor = options.batchSize ? {batchSize: options.batchSize} : {}
+ // Build the command
+ var command = { listIndexes: this.s.name, cursor: cursor };
+ // Execute the cursor
+ cursor = this.s.topology.cursor(f('%s.$cmd', this.s.dbName), command, options);
+ // Do we have a readPreference, apply it
+ if(options.readPreference) cursor.setReadPreference(options.readPreference);
+ // Return the cursor
+ return cursor;
+ }
+
+ // Get the namespace
+ var ns = f('%s.system.indexes', this.s.dbName);
+ // Get the query
+ cursor = this.s.topology.cursor(ns, {find: ns, query: {ns: this.s.namespace}}, options);
+ // Do we have a readPreference, apply it
+ if(options.readPreference) cursor.setReadPreference(options.readPreference);
+ // Set the passed in batch size if one was provided
+ if(options.batchSize) cursor = cursor.batchSize(options.batchSize);
+ // Return the cursor
+ return cursor;
+};
+
+define.classMethod('listIndexes', {callback: false, promise:false, returns: [CommandCursor]});
+
+/**
+ * Ensures that an index exists, if it does not it creates it
+ * @method
+ * @deprecated use createIndexes instead
+ * @param {(string|object)} fieldOrSpec Defines the index.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.unique=false] Creates an unique index.
+ * @param {boolean} [options.sparse=false] Creates a sparse index.
+ * @param {boolean} [options.background=false] Creates the index in the background, yielding whenever possible.
+ * @param {boolean} [options.dropDups=false] A unique index cannot be created on a key that has pre-existing duplicate values. If you would like to create the index anyway, keeping the first document the database indexes and deleting all subsequent documents that have duplicate value
+ * @param {number} [options.min=null] For geospatial indexes set the lower bound for the co-ordinates.
+ * @param {number} [options.max=null] For geospatial indexes set the high bound for the co-ordinates.
+ * @param {number} [options.v=null] Specify the format version of the indexes.
+ * @param {number} [options.expireAfterSeconds=null] Allows you to expire data on indexes applied to a data (MongoDB 2.2 or higher)
+ * @param {number} [options.name=null] Override the autogenerated index name (useful if the resulting name is larger than 128 bytes)
+ * @param {object} [options.collation=null] Specify collation (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields).
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.ensureIndex = function(fieldOrSpec, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return ensureIndex(self, fieldOrSpec, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ ensureIndex(self, fieldOrSpec, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var ensureIndex = function(self, fieldOrSpec, options, callback) {
+ self.s.db.ensureIndex(self.s.name, fieldOrSpec, options, callback);
+}
+
+define.classMethod('ensureIndex', {callback: true, promise:true});
+
+/**
+ * Checks if one or more indexes exist on the collection, fails on first non-existing index
+ * @method
+ * @param {(string|array)} indexes One or more index names to check.
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.indexExists = function(indexes, callback) {
+ var self = this;
+
+ // Execute using callback
+ if(typeof callback == 'function') return indexExists(self, indexes, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ indexExists(self, indexes, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var indexExists = function(self, indexes, callback) {
+ self.indexInformation(function(err, indexInformation) {
+ // If we have an error return
+ if(err != null) return handleCallback(callback, err, null);
+ // Let's check for the index names
+ if(!Array.isArray(indexes)) return handleCallback(callback, null, indexInformation[indexes] != null);
+ // Check in list of indexes
+ for(var i = 0; i < indexes.length; i++) {
+ if(indexInformation[indexes[i]] == null) {
+ return handleCallback(callback, null, false);
+ }
+ }
+
+ // All keys found return true
+ return handleCallback(callback, null, true);
+ });
+}
+
+define.classMethod('indexExists', {callback: true, promise:true});
+
+/**
+ * Retrieves this collections index info.
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.full=false] Returns the full raw index information.
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.indexInformation = function(options, callback) {
+ var self = this;
+ // Unpack calls
+ var args = Array.prototype.slice.call(arguments, 0);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ options = args.length ? args.shift() || {} : {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return indexInformation(self, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ indexInformation(self, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var indexInformation = function(self, options, callback) {
+ self.s.db.indexInformation(self.s.name, options, callback);
+}
+
+define.classMethod('indexInformation', {callback: true, promise:true});
+
+/**
+ * The callback format for results
+ * @callback Collection~countCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {number} result The count of documents that matched the query.
+ */
+
+/**
+ * Count number of matching documents in the db to a query.
+ * @method
+ * @param {object} query The query for the count.
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.limit=null] The limit of documents to count.
+ * @param {boolean} [options.skip=null] The number of documents to skip for the count.
+ * @param {string} [options.hint=null] An index name hint for the query.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {number} [options.maxTimeMS=null] Number of miliseconds to wait before aborting the query.
+ * @param {Collection~countCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.count = function(query, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 0);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ var queryOption = args.length ? args.shift() || {} : {};
+ var optionsOption = args.length ? args.shift() || {} : {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return count(self, queryOption, optionsOption, callback);
+
+ // Check if query is empty
+ query = query || {};
+ options = options || {};
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ count(self, query, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var count = function(self, query, options, callback) {
+ var skip = options.skip;
+ var limit = options.limit;
+ var hint = options.hint;
+ var maxTimeMS = options.maxTimeMS;
+
+ // Final query
+ var cmd = {
+ 'count': self.s.name, 'query': query
+ };
+
+ // Add limit, skip and maxTimeMS if defined
+ if(typeof skip == 'number') cmd.skip = skip;
+ if(typeof limit == 'number') cmd.limit = limit;
+ if(typeof maxTimeMS == 'number') cmd.maxTimeMS = maxTimeMS;
+ if(hint) options.hint = hint;
+
+ options = shallowClone(options);
+ // Ensure we have the right read preference inheritance
+ options = getReadPreference(self, options, self.s.db, self);
+
+ // Do we have a readConcern specified
+ if(self.s.readConcern) {
+ cmd.readConcern = self.s.readConcern;
+ }
+
+ // Have we specified collation
+ decorateWithCollation(cmd, self, options);
+
+ // Execute command
+ self.s.db.command(cmd, options, function(err, result) {
+ if(err) return handleCallback(callback, err);
+ handleCallback(callback, null, result.n);
+ });
+}
+
+define.classMethod('count', {callback: true, promise:true});
+
+/**
+ * The distinct command returns returns a list of distinct values for the given key across a collection.
+ * @method
+ * @param {string} key Field of the document to find distinct values for.
+ * @param {object} query The query for filtering the set of documents to which we apply the distinct filter.
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {number} [options.maxTimeMS=null] Number of miliseconds to wait before aborting the query.
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.distinct = function(key, query, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ var queryOption = args.length ? args.shift() || {} : {};
+ var optionsOption = args.length ? args.shift() || {} : {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return distinct(self, key, queryOption, optionsOption, callback);
+
+ // Ensure the query and options are set
+ query = query || {};
+ options = options || {};
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ distinct(self, key, query, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var distinct = function(self, key, query, options, callback) {
+ // maxTimeMS option
+ var maxTimeMS = options.maxTimeMS;
+
+ // Distinct command
+ var cmd = {
+ 'distinct': self.s.name, 'key': key, 'query': query
+ };
+
+ options = shallowClone(options);
+ // Ensure we have the right read preference inheritance
+ options = getReadPreference(self, options, self.s.db, self);
+
+ // Add maxTimeMS if defined
+ if(typeof maxTimeMS == 'number')
+ cmd.maxTimeMS = maxTimeMS;
+
+ // Do we have a readConcern specified
+ if(self.s.readConcern) {
+ cmd.readConcern = self.s.readConcern;
+ }
+
+ // Have we specified collation
+ decorateWithCollation(cmd, self, options);
+
+ // Execute the command
+ self.s.db.command(cmd, options, function(err, result) {
+ if(err) return handleCallback(callback, err);
+ handleCallback(callback, null, result.values);
+ });
+}
+
+define.classMethod('distinct', {callback: true, promise:true});
+
+/**
+ * Retrieve all the indexes on the collection.
+ * @method
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.indexes = function(callback) {
+ var self = this;
+ // Execute using callback
+ if(typeof callback == 'function') return indexes(self, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ indexes(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var indexes = function(self, callback) {
+ self.s.db.indexInformation(self.s.name, {full:true}, callback);
+}
+
+define.classMethod('indexes', {callback: true, promise:true});
+
+/**
+ * Get all the collection statistics.
+ *
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {number} [options.scale=null] Divide the returned sizes by scale value.
+ * @param {Collection~resultCallback} [callback] The collection result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.stats = function(options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 0);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ // Fetch all commands
+ options = args.length ? args.shift() || {} : {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return stats(self, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ stats(self, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var stats = function(self, options, callback) {
+ // Build command object
+ var commandObject = {
+ collStats:self.s.name
+ }
+
+ // Check if we have the scale value
+ if(options['scale'] != null) commandObject['scale'] = options['scale'];
+
+ options = shallowClone(options);
+ // Ensure we have the right read preference inheritance
+ options = getReadPreference(self, options, self.s.db, self);
+
+ // Execute the command
+ self.s.db.command(commandObject, options, callback);
+}
+
+define.classMethod('stats', {callback: true, promise:true});
+
+/**
+ * @typedef {Object} Collection~findAndModifyWriteOpResult
+ * @property {object} value Document returned from findAndModify command.
+ * @property {object} lastErrorObject The raw lastErrorObject returned from the command.
+ * @property {Number} ok Is 1 if the command executed correctly.
+ */
+
+/**
+ * The callback format for inserts
+ * @callback Collection~findAndModifyCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Collection~findAndModifyWriteOpResult} result The result object if the command was executed successfully.
+ */
+
+/**
+ * Find a document and delete it in one atomic operation, requires a write lock for the duration of the operation.
+ *
+ * @method
+ * @param {object} filter Document selection filter.
+ * @param {object} [options=null] Optional settings.
+ * @param {object} [options.projection=null] Limits the fields to return for all matching documents.
+ * @param {object} [options.sort=null] Determines which document the operation modifies if the query selects multiple documents.
+ * @param {number} [options.maxTimeMS=null] The maximum amount of time to allow the query to run.
+ * @param {Collection~findAndModifyCallback} [callback] The collection result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.findOneAndDelete = function(filter, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // Basic validation
+ if(filter == null || typeof filter != 'object') throw toError('filter parameter must be an object');
+
+ // Execute using callback
+ if(typeof callback == 'function') return findOneAndDelete(self, filter, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ options = options || {};
+
+ findOneAndDelete(self, filter, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var findOneAndDelete = function(self, filter, options, callback) {
+ // Final options
+ var finalOptions = shallowClone(options);
+ finalOptions['fields'] = options.projection;
+ finalOptions['remove'] = true;
+ // Execute find and Modify
+ self.findAndModify(
+ filter
+ , options.sort
+ , null
+ , finalOptions
+ , callback
+ );
+}
+
+define.classMethod('findOneAndDelete', {callback: true, promise:true});
+
+/**
+ * Find a document and replace it in one atomic operation, requires a write lock for the duration of the operation.
+ *
+ * @method
+ * @param {object} filter Document selection filter.
+ * @param {object} replacement Document replacing the matching document.
+ * @param {object} [options=null] Optional settings.
+ * @param {object} [options.projection=null] Limits the fields to return for all matching documents.
+ * @param {object} [options.sort=null] Determines which document the operation modifies if the query selects multiple documents.
+ * @param {number} [options.maxTimeMS=null] The maximum amount of time to allow the query to run.
+ * @param {boolean} [options.upsert=false] Upsert the document if it does not exist.
+ * @param {boolean} [options.returnOriginal=true] When false, returns the updated document rather than the original. The default is true.
+ * @param {Collection~findAndModifyCallback} [callback] The collection result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.findOneAndReplace = function(filter, replacement, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // Basic validation
+ if(filter == null || typeof filter != 'object') throw toError('filter parameter must be an object');
+ if(replacement == null || typeof replacement != 'object') throw toError('replacement parameter must be an object');
+
+ // Execute using callback
+ if(typeof callback == 'function') return findOneAndReplace(self, filter, replacement, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ options = options || {};
+
+ findOneAndReplace(self, filter, replacement, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var findOneAndReplace = function(self, filter, replacement, options, callback) {
+ // Final options
+ var finalOptions = shallowClone(options);
+ finalOptions['fields'] = options.projection;
+ finalOptions['update'] = true;
+ finalOptions['new'] = typeof options.returnOriginal == 'boolean' ? !options.returnOriginal : false;
+ finalOptions['upsert'] = typeof options.upsert == 'boolean' ? options.upsert : false;
+
+ // Execute findAndModify
+ self.findAndModify(
+ filter
+ , options.sort
+ , replacement
+ , finalOptions
+ , callback
+ );
+}
+
+define.classMethod('findOneAndReplace', {callback: true, promise:true});
+
+/**
+ * Find a document and update it in one atomic operation, requires a write lock for the duration of the operation.
+ *
+ * @method
+ * @param {object} filter Document selection filter.
+ * @param {object} update Update operations to be performed on the document
+ * @param {object} [options=null] Optional settings.
+ * @param {object} [options.projection=null] Limits the fields to return for all matching documents.
+ * @param {object} [options.sort=null] Determines which document the operation modifies if the query selects multiple documents.
+ * @param {number} [options.maxTimeMS=null] The maximum amount of time to allow the query to run.
+ * @param {boolean} [options.upsert=false] Upsert the document if it does not exist.
+ * @param {boolean} [options.returnOriginal=true] When false, returns the updated document rather than the original. The default is true.
+ * @param {Collection~findAndModifyCallback} [callback] The collection result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.findOneAndUpdate = function(filter, update, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // Basic validation
+ if(filter == null || typeof filter != 'object') throw toError('filter parameter must be an object');
+ if(update == null || typeof update != 'object') throw toError('update parameter must be an object');
+
+ // Execute using callback
+ if(typeof callback == 'function') return findOneAndUpdate(self, filter, update, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ options = options || {};
+
+ findOneAndUpdate(self, filter, update, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var findOneAndUpdate = function(self, filter, update, options, callback) {
+ // Final options
+ var finalOptions = shallowClone(options);
+ finalOptions['fields'] = options.projection;
+ finalOptions['update'] = true;
+ finalOptions['new'] = typeof options.returnOriginal == 'boolean' ? !options.returnOriginal : false;
+ finalOptions['upsert'] = typeof options.upsert == 'boolean' ? options.upsert : false;
+
+ // Execute findAndModify
+ self.findAndModify(
+ filter
+ , options.sort
+ , update
+ , finalOptions
+ , callback
+ );
+}
+
+define.classMethod('findOneAndUpdate', {callback: true, promise:true});
+
+/**
+ * Find and update a document.
+ * @method
+ * @param {object} query Query object to locate the object to modify.
+ * @param {array} sort If multiple docs match, choose the first one in the specified sort order as the object to manipulate.
+ * @param {object} doc The fields/vals to be updated.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.remove=false] Set to true to remove the object before returning.
+ * @param {boolean} [options.upsert=false] Perform an upsert operation.
+ * @param {boolean} [options.new=false] Set to true if you want to return the modified object rather than the original. Ignored for remove.
+ * @param {object} [options.fields=null] Object containing the field projection for the result returned from the operation.
+ * @param {Collection~findAndModifyCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated use findOneAndUpdate, findOneAndReplace or findOneAndDelete instead
+ */
+Collection.prototype.findAndModify = function(query, sort, doc, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ sort = args.length ? args.shift() || [] : [];
+ doc = args.length ? args.shift() : null;
+ options = args.length ? args.shift() || {} : {};
+
+ // Clone options
+ options = shallowClone(options);
+ // Force read preference primary
+ options.readPreference = ReadPreference.PRIMARY;
+
+ // Execute using callback
+ if(typeof callback == 'function') return findAndModify(self, query, sort, doc, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ options = options || {};
+
+ findAndModify(self, query, sort, doc, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var findAndModify = function(self, query, sort, doc, options, callback) {
+ // Create findAndModify command object
+ var queryObject = {
+ 'findandmodify': self.s.name
+ , 'query': query
+ };
+
+ sort = formattedOrderClause(sort);
+ if(sort) {
+ queryObject.sort = sort;
+ }
+
+ queryObject.new = options.new ? true : false;
+ queryObject.remove = options.remove ? true : false;
+ queryObject.upsert = options.upsert ? true : false;
+
+ if(options.fields) {
+ queryObject.fields = options.fields;
+ }
+
+ if(doc && !options.remove) {
+ queryObject.update = doc;
+ }
+
+ if(options.maxTimeMS)
+ queryObject.maxTimeMS = options.maxTimeMS;
+
+ // Either use override on the function, or go back to default on either the collection
+ // level or db
+ if(options['serializeFunctions'] != null) {
+ options['serializeFunctions'] = options['serializeFunctions'];
+ } else {
+ options['serializeFunctions'] = self.s.serializeFunctions;
+ }
+
+ // No check on the documents
+ options.checkKeys = false;
+
+ // Get the write concern settings
+ var finalOptions = writeConcern(options, self.s.db, self, options);
+
+ // Decorate the findAndModify command with the write Concern
+ if(finalOptions.writeConcern) {
+ queryObject.writeConcern = finalOptions.writeConcern;
+ }
+
+ // Have we specified bypassDocumentValidation
+ if(typeof finalOptions.bypassDocumentValidation == 'boolean') {
+ queryObject.bypassDocumentValidation = finalOptions.bypassDocumentValidation;
+ }
+
+ // Have we specified collation
+ decorateWithCollation(queryObject, self, options);
+
+ // Execute the command
+ self.s.db.command(queryObject
+ , options, function(err, result) {
+ if(err) return handleCallback(callback, err, null);
+ return handleCallback(callback, null, result);
+ });
+}
+
+define.classMethod('findAndModify', {callback: true, promise:true});
+
+/**
+ * Find and remove a document.
+ * @method
+ * @param {object} query Query object to locate the object to modify.
+ * @param {array} sort If multiple docs match, choose the first one in the specified sort order as the object to manipulate.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated use findOneAndDelete instead
+ */
+Collection.prototype.findAndRemove = function(query, sort, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ sort = args.length ? args.shift() || [] : [];
+ options = args.length ? args.shift() || {} : {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return findAndRemove(self, query, sort, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ findAndRemove(self, query, sort, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var findAndRemove = function(self, query, sort, options, callback) {
+ // Add the remove option
+ options['remove'] = true;
+ // Execute the callback
+ self.findAndModify(query, sort, null, options, callback);
+}
+
+define.classMethod('findAndRemove', {callback: true, promise:true});
+
+function decorateWithWriteConcern(command, self, options) {
+ // Do we support collation 3.4 and higher
+ var capabilities = self.s.topology.capabilities();
+ // Do we support write concerns 3.4 and higher
+ if(capabilities && capabilities.commandsTakeWriteConcern) {
+ // Get the write concern settings
+ var finalOptions = writeConcern(shallowClone(options), self.s.db, self, options);
+ // Add the write concern to the command
+ if(finalOptions.writeConcern) {
+ command.writeConcern = finalOptions.writeConcern;
+ }
+ }
+}
+
+function decorateWithCollation(command, self, options) {
+ // Do we support collation 3.4 and higher
+ var capabilities = self.s.topology.capabilities();
+ // Do we support write concerns 3.4 and higher
+ if(capabilities && capabilities.commandsTakeCollation) {
+ if(options.collation && typeof options.collation == 'object') {
+ command.collation = options.collation;
+ }
+ }
+}
+
+/**
+ * Execute an aggregation framework pipeline against the collection, needs MongoDB >= 2.2
+ * @method
+ * @param {object} pipeline Array containing all the aggregation framework commands for the execution.
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {object} [options.cursor=null] Return the query as cursor, on 2.6 > it returns as a real cursor on pre 2.6 it returns as an emulated cursor.
+ * @param {number} [options.cursor.batchSize=null] The batchSize for the cursor
+ * @param {boolean} [options.explain=false] Explain returns the aggregation execution plan (requires mongodb 2.6 >).
+ * @param {boolean} [options.allowDiskUse=false] allowDiskUse lets the server know if it can use disk to store temporary results for the aggregation (requires mongodb 2.6 >).
+ * @param {number} [options.maxTimeMS=null] maxTimeMS specifies a cumulative time limit in milliseconds for processing operations on the cursor. MongoDB interrupts the operation at the earliest following interrupt point.
+ * @param {boolean} [options.bypassDocumentValidation=false] Allow driver to bypass schema validation in MongoDB 3.2 or higher.
+ * @param {boolean} [options.raw=false] Return document results as raw BSON buffers.
+ * @param {boolean} [options.promoteLongs=true] Promotes Long values to number if they fit inside the 53 bits resolution.
+ * @param {boolean} [options.promoteValues=true] Promotes BSON values to native types where possible, set to false to only receive wrapper types.
+ * @param {boolean} [options.promoteBuffers=false] Promotes Binary BSON values to native Node Buffers.
+ * @param {object} [options.collation=null] Specify collation (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields).
+ * @param {Collection~resultCallback} callback The command result callback
+ * @return {(null|AggregationCursor)}
+ */
+Collection.prototype.aggregate = function(pipeline, options, callback) {
+ var self = this;
+
+ if(Array.isArray(pipeline)) {
+ // Set up callback if one is provided
+ if(typeof options == 'function') {
+ callback = options;
+ options = {};
+ }
+
+ // If we have no options or callback we are doing
+ // a cursor based aggregation
+ if(options == null && callback == null) {
+ options = {};
+ }
+ } else {
+ // Aggregation pipeline passed as arguments on the method
+ var args = Array.prototype.slice.call(arguments, 0);
+ // Get the callback
+ callback = args.pop();
+ // Get the possible options object
+ var opts = args[args.length - 1];
+ // If it contains any of the admissible options pop it of the args
+ options = opts && (opts.readPreference
+ || opts.explain || opts.cursor || opts.out
+ || opts.maxTimeMS || opts.allowDiskUse) ? args.pop() : {};
+ // Left over arguments is the pipeline
+ pipeline = args;
+ }
+
+ // Ignore readConcern option
+ var ignoreReadConcern = false;
+
+ // Build the command
+ var command = { aggregate : this.s.name, pipeline : pipeline};
+
+ // If out was specified
+ if(typeof options.out == 'string') {
+ pipeline.push({$out: options.out});
+ // Ignore read concern
+ ignoreReadConcern = true;
+ } else if(pipeline.length > 0 && pipeline[pipeline.length - 1]['$out']) {
+ ignoreReadConcern = true;
+ }
+
+ // Decorate command with writeConcern if out has been specified
+ if(pipeline.length > 0 && pipeline[pipeline.length - 1]['$out']) {
+ decorateWithWriteConcern(command, self, options);
+ }
+
+ // Have we specified collation
+ decorateWithCollation(command, self, options);
+
+ // If we have bypassDocumentValidation set
+ if(typeof options.bypassDocumentValidation == 'boolean') {
+ command.bypassDocumentValidation = options.bypassDocumentValidation;
+ }
+
+ // Do we have a readConcern specified
+ if(!ignoreReadConcern && this.s.readConcern) {
+ command.readConcern = this.s.readConcern;
+ }
+
+ // If we have allowDiskUse defined
+ if(options.allowDiskUse) command.allowDiskUse = options.allowDiskUse;
+ if(typeof options.maxTimeMS == 'number') command.maxTimeMS = options.maxTimeMS;
+
+ options = shallowClone(options);
+ // Ensure we have the right read preference inheritance
+ options = getReadPreference(this, options, this.s.db, this);
+
+ // If explain has been specified add it
+ if(options.explain) command.explain = options.explain;
+
+ // Validate that cursor options is valid
+ if(options.cursor != null && typeof options.cursor != 'object') {
+ throw toError('cursor options must be an object');
+ }
+
+ // promiseLibrary
+ options.promiseLibrary = this.s.promiseLibrary;
+
+ // Set the AggregationCursor constructor
+ options.cursorFactory = AggregationCursor;
+ if(typeof callback != 'function') {
+ if(!this.s.topology.capabilities()) {
+ throw new MongoError('cannot connect to server');
+ }
+
+ if(this.s.topology.capabilities().hasAggregationCursor) {
+ options.cursor = options.cursor || { batchSize : 1000 };
+ command.cursor = options.cursor;
+ }
+
+ // Allow disk usage command
+ if(typeof options.allowDiskUse == 'boolean') command.allowDiskUse = options.allowDiskUse;
+ if(typeof options.maxTimeMS == 'number') command.maxTimeMS = options.maxTimeMS;
+
+ // Execute the cursor
+ return this.s.topology.cursor(this.s.namespace, command, options);
+ }
+
+ // We do not allow cursor
+ if(options.cursor) {
+ return this.s.topology.cursor(this.s.namespace, command, options);
+ }
+
+ // Execute the command
+ this.s.db.command(command, options, function(err, result) {
+ if(err) {
+ handleCallback(callback, err);
+ } else if(result['err'] || result['errmsg']) {
+ handleCallback(callback, toError(result));
+ } else if(typeof result == 'object' && result['serverPipeline']) {
+ handleCallback(callback, null, result['serverPipeline']);
+ } else if(typeof result == 'object' && result['stages']) {
+ handleCallback(callback, null, result['stages']);
+ } else {
+ handleCallback(callback, null, result.result);
+ }
+ });
+}
+
+define.classMethod('aggregate', {callback: true, promise:false});
+
+/**
+ * The callback format for results
+ * @callback Collection~parallelCollectionScanCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Cursor[]} cursors A list of cursors returned allowing for parallel reading of collection.
+ */
+
+/**
+ * Return N number of parallel cursors for a collection allowing parallel reading of entire collection. There are
+ * no ordering guarantees for returned results.
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {number} [options.batchSize=null] Set the batchSize for the getMoreCommand when iterating over the query results.
+ * @param {number} [options.numCursors=1] The maximum number of parallel command cursors to return (the number of returned cursors will be in the range 1:numCursors)
+ * @param {boolean} [options.raw=false] Return all BSON documents as Raw Buffer documents.
+ * @param {Collection~parallelCollectionScanCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.parallelCollectionScan = function(options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {numCursors: 1};
+ // Set number of cursors to 1
+ options.numCursors = options.numCursors || 1;
+ options.batchSize = options.batchSize || 1000;
+
+ options = shallowClone(options);
+ // Ensure we have the right read preference inheritance
+ options = getReadPreference(this, options, this.s.db, this);
+
+ // Add a promiseLibrary
+ options.promiseLibrary = this.s.promiseLibrary;
+
+ // Execute using callback
+ if(typeof callback == 'function') return parallelCollectionScan(self, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ parallelCollectionScan(self, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var parallelCollectionScan = function(self, options, callback) {
+ // Create command object
+ var commandObject = {
+ parallelCollectionScan: self.s.name
+ , numCursors: options.numCursors
+ }
+
+ // Do we have a readConcern specified
+ if(self.s.readConcern) {
+ commandObject.readConcern = self.s.readConcern;
+ }
+
+ // Store the raw value
+ var raw = options.raw;
+ delete options['raw'];
+
+ // Execute the command
+ self.s.db.command(commandObject, options, function(err, result) {
+ if(err) return handleCallback(callback, err, null);
+ if(result == null) return handleCallback(callback, new Error("no result returned for parallelCollectionScan"), null);
+
+ var cursors = [];
+ // Add the raw back to the option
+ if(raw) options.raw = raw;
+ // Create command cursors for each item
+ for(var i = 0; i < result.cursors.length; i++) {
+ var rawId = result.cursors[i].cursor.id
+ // Convert cursorId to Long if needed
+ var cursorId = typeof rawId == 'number' ? Long.fromNumber(rawId) : rawId;
+ // Add a command cursor
+ cursors.push(self.s.topology.cursor(self.s.namespace, cursorId, options));
+ }
+
+ handleCallback(callback, null, cursors);
+ });
+}
+
+define.classMethod('parallelCollectionScan', {callback: true, promise:true});
+
+/**
+ * Execute the geoNear command to search for items in the collection
+ *
+ * @method
+ * @param {number} x Point to search on the x axis, ensure the indexes are ordered in the same order.
+ * @param {number} y Point to search on the y axis, ensure the indexes are ordered in the same order.
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {number} [options.num=null] Max number of results to return.
+ * @param {number} [options.minDistance=null] Include results starting at minDistance from a point (2.6 or higher)
+ * @param {number} [options.maxDistance=null] Include results up to maxDistance from the point.
+ * @param {number} [options.distanceMultiplier=null] Include a value to multiply the distances with allowing for range conversions.
+ * @param {object} [options.query=null] Filter the results by a query.
+ * @param {boolean} [options.spherical=false] Perform query using a spherical model.
+ * @param {boolean} [options.uniqueDocs=false] The closest location in a document to the center of the search region will always be returned MongoDB > 2.X.
+ * @param {boolean} [options.includeLocs=false] Include the location data fields in the top level of the results MongoDB > 2.X.
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.geoNear = function(x, y, options, callback) {
+ var self = this;
+ var point = typeof(x) == 'object' && x
+ , args = Array.prototype.slice.call(arguments, point?1:2);
+
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ // Fetch all commands
+ options = args.length ? args.shift() || {} : {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return geoNear(self, x, y, point, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ geoNear(self, x, y, point, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var geoNear = function(self, x, y, point, options, callback) {
+ // Build command object
+ var commandObject = {
+ geoNear:self.s.name,
+ near: point || [x, y]
+ }
+
+ options = shallowClone(options);
+ // Ensure we have the right read preference inheritance
+ options = getReadPreference(self, options, self.s.db, self);
+
+ // Exclude readPreference and existing options to prevent user from
+ // shooting themselves in the foot
+ var exclude = {
+ readPreference: true,
+ geoNear: true,
+ near: true
+ };
+
+ // Filter out any excluded objects
+ commandObject = decorateCommand(commandObject, options, exclude);
+
+ // Do we have a readConcern specified
+ if(self.s.readConcern) {
+ commandObject.readConcern = self.s.readConcern;
+ }
+
+ // Have we specified collation
+ decorateWithCollation(commandObject, self, options);
+
+ // Execute the command
+ self.s.db.command(commandObject, options, function (err, res) {
+ if(err) return handleCallback(callback, err);
+ if(res.err || res.errmsg) return handleCallback(callback, toError(res));
+ // should we only be returning res.results here? Not sure if the user
+ // should see the other return information
+ handleCallback(callback, null, res);
+ });
+}
+
+define.classMethod('geoNear', {callback: true, promise:true});
+
+/**
+ * Execute a geo search using a geo haystack index on a collection.
+ *
+ * @method
+ * @param {number} x Point to search on the x axis, ensure the indexes are ordered in the same order.
+ * @param {number} y Point to search on the y axis, ensure the indexes are ordered in the same order.
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {number} [options.maxDistance=null] Include results up to maxDistance from the point.
+ * @param {object} [options.search=null] Filter the results by a query.
+ * @param {number} [options.limit=false] Max number of results to return.
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.geoHaystackSearch = function(x, y, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 2);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ // Fetch all commands
+ options = args.length ? args.shift() || {} : {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return geoHaystackSearch(self, x, y, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ geoHaystackSearch(self, x, y, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var geoHaystackSearch = function(self, x, y, options, callback) {
+ // Build command object
+ var commandObject = {
+ geoSearch: self.s.name,
+ near: [x, y]
+ }
+
+ // Remove read preference from hash if it exists
+ commandObject = decorateCommand(commandObject, options, {readPreference: true});
+
+ options = shallowClone(options);
+ // Ensure we have the right read preference inheritance
+ options = getReadPreference(self, options, self.s.db, self);
+
+ // Do we have a readConcern specified
+ if(self.s.readConcern) {
+ commandObject.readConcern = self.s.readConcern;
+ }
+
+ // Execute the command
+ self.s.db.command(commandObject, options, function (err, res) {
+ if(err) return handleCallback(callback, err);
+ if(res.err || res.errmsg) handleCallback(callback, toError(res));
+ // should we only be returning res.results here? Not sure if the user
+ // should see the other return information
+ handleCallback(callback, null, res);
+ });
+}
+
+define.classMethod('geoHaystackSearch', {callback: true, promise:true});
+
+/**
+ * Group function helper
+ * @ignore
+ */
+// var groupFunction = function () {
+// var c = db[ns].find(condition);
+// var map = new Map();
+// var reduce_function = reduce;
+//
+// while (c.hasNext()) {
+// var obj = c.next();
+// var key = {};
+//
+// for (var i = 0, len = keys.length; i < len; ++i) {
+// var k = keys[i];
+// key[k] = obj[k];
+// }
+//
+// var aggObj = map.get(key);
+//
+// if (aggObj == null) {
+// var newObj = Object.extend({}, key);
+// aggObj = Object.extend(newObj, initial);
+// map.put(key, aggObj);
+// }
+//
+// reduce_function(obj, aggObj);
+// }
+//
+// return { "result": map.values() };
+// }.toString();
+var groupFunction = 'function () {\nvar c = db[ns].find(condition);\nvar map = new Map();\nvar reduce_function = reduce;\n\nwhile (c.hasNext()) {\nvar obj = c.next();\nvar key = {};\n\nfor (var i = 0, len = keys.length; i < len; ++i) {\nvar k = keys[i];\nkey[k] = obj[k];\n}\n\nvar aggObj = map.get(key);\n\nif (aggObj == null) {\nvar newObj = Object.extend({}, key);\naggObj = Object.extend(newObj, initial);\nmap.put(key, aggObj);\n}\n\nreduce_function(obj, aggObj);\n}\n\nreturn { "result": map.values() };\n}';
+
+/**
+ * Run a group command across a collection
+ *
+ * @method
+ * @param {(object|array|function|code)} keys An object, array or function expressing the keys to group by.
+ * @param {object} condition An optional condition that must be true for a row to be considered.
+ * @param {object} initial Initial value of the aggregation counter object.
+ * @param {(function|Code)} reduce The reduce function aggregates (reduces) the objects iterated
+ * @param {(function|Code)} finalize An optional function to be run on each item in the result set just before the item is returned.
+ * @param {boolean} command Specify if you wish to run using the internal group command or using eval, default is true.
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.group = function(keys, condition, initial, reduce, finalize, command, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 3);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ // Fetch all commands
+ reduce = args.length ? args.shift() : null;
+ finalize = args.length ? args.shift() : null;
+ command = args.length ? args.shift() : null;
+ options = args.length ? args.shift() || {} : {};
+
+ // Make sure we are backward compatible
+ if(!(typeof finalize == 'function')) {
+ command = finalize;
+ finalize = null;
+ }
+
+ if (!Array.isArray(keys) && keys instanceof Object && typeof(keys) !== 'function' && !(keys._bsontype == 'Code')) {
+ keys = Object.keys(keys);
+ }
+
+ if(typeof reduce === 'function') {
+ reduce = reduce.toString();
+ }
+
+ if(typeof finalize === 'function') {
+ finalize = finalize.toString();
+ }
+
+ // Set up the command as default
+ command = command == null ? true : command;
+
+ // Execute using callback
+ if(typeof callback == 'function') return group(self, keys, condition, initial, reduce, finalize, command, options, callback);
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ group(self, keys, condition, initial, reduce, finalize, command, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var group = function(self, keys, condition, initial, reduce, finalize, command, options, callback) {
+ // Execute using the command
+ if(command) {
+ var reduceFunction = reduce && reduce._bsontype == 'Code'
+ ? reduce
+ : new Code(reduce);
+
+ var selector = {
+ group: {
+ 'ns': self.s.name
+ , '$reduce': reduceFunction
+ , 'cond': condition
+ , 'initial': initial
+ , 'out': "inline"
+ }
+ };
+
+ // if finalize is defined
+ if(finalize != null) selector.group['finalize'] = finalize;
+ // Set up group selector
+ if ('function' === typeof keys || (keys && keys._bsontype == 'Code')) {
+ selector.group.$keyf = keys && keys._bsontype == 'Code'
+ ? keys
+ : new Code(keys);
+ } else {
+ var hash = {};
+ keys.forEach(function (key) {
+ hash[key] = 1;
+ });
+ selector.group.key = hash;
+ }
+
+ options = shallowClone(options);
+ // Ensure we have the right read preference inheritance
+ options = getReadPreference(self, options, self.s.db, self);
+
+ // Do we have a readConcern specified
+ if(self.s.readConcern) {
+ selector.readConcern = self.s.readConcern;
+ }
+
+ // Have we specified collation
+ decorateWithCollation(selector, self, options);
+
+ // Execute command
+ self.s.db.command(selector, options, function(err, result) {
+ if(err) return handleCallback(callback, err, null);
+ handleCallback(callback, null, result.retval);
+ });
+ } else {
+ // Create execution scope
+ var scope = reduce != null && reduce._bsontype == 'Code'
+ ? reduce.scope
+ : {};
+
+ scope.ns = self.s.name;
+ scope.keys = keys;
+ scope.condition = condition;
+ scope.initial = initial;
+
+ // Pass in the function text to execute within mongodb.
+ var groupfn = groupFunction.replace(/ reduce;/, reduce.toString() + ';');
+
+ self.s.db.eval(new Code(groupfn, scope), function (err, results) {
+ if (err) return handleCallback(callback, err, null);
+ handleCallback(callback, null, results.result || results);
+ });
+ }
+}
+
+define.classMethod('group', {callback: true, promise:true});
+
+/**
+ * Functions that are passed as scope args must
+ * be converted to Code instances.
+ * @ignore
+ */
+function processScope (scope) {
+ if(!isObject(scope) || scope._bsontype == 'ObjectID') {
+ return scope;
+ }
+
+ var keys = Object.keys(scope);
+ var i = keys.length;
+ var key;
+ var new_scope = {};
+
+ while (i--) {
+ key = keys[i];
+ if ('function' == typeof scope[key]) {
+ new_scope[key] = new Code(String(scope[key]));
+ } else {
+ new_scope[key] = processScope(scope[key]);
+ }
+ }
+
+ return new_scope;
+}
+
+/**
+ * Run Map Reduce across a collection. Be aware that the inline option for out will return an array of results not a collection.
+ *
+ * @method
+ * @param {(function|string)} map The mapping function.
+ * @param {(function|string)} reduce The reduce function.
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {object} [options.out=null] Sets the output target for the map reduce job. *{inline:1} | {replace:'collectionName'} | {merge:'collectionName'} | {reduce:'collectionName'}*
+ * @param {object} [options.query=null] Query filter object.
+ * @param {object} [options.sort=null] Sorts the input objects using this key. Useful for optimization, like sorting by the emit key for fewer reduces.
+ * @param {number} [options.limit=null] Number of objects to return from collection.
+ * @param {boolean} [options.keeptemp=false] Keep temporary data.
+ * @param {(function|string)} [options.finalize=null] Finalize function.
+ * @param {object} [options.scope=null] Can pass in variables that can be access from map/reduce/finalize.
+ * @param {boolean} [options.jsMode=false] It is possible to make the execution stay in JS. Provided in MongoDB > 2.0.X.
+ * @param {boolean} [options.verbose=false] Provide statistics on job execution time.
+ * @param {boolean} [options.bypassDocumentValidation=false] Allow driver to bypass schema validation in MongoDB 3.2 or higher.
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @throws {MongoError}
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.mapReduce = function(map, reduce, options, callback) {
+ var self = this;
+ if('function' === typeof options) callback = options, options = {};
+ // Out must allways be defined (make sure we don't break weirdly on pre 1.8+ servers)
+ if(null == options.out) {
+ throw new Error("the out option parameter must be defined, see mongodb docs for possible values");
+ }
+
+ if('function' === typeof map) {
+ map = map.toString();
+ }
+
+ if('function' === typeof reduce) {
+ reduce = reduce.toString();
+ }
+
+ if('function' === typeof options.finalize) {
+ options.finalize = options.finalize.toString();
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return mapReduce(self, map, reduce, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ mapReduce(self, map, reduce, options, function(err, r, r1) {
+ if(err) return reject(err);
+ if(!r1) return resolve(r);
+ resolve({results: r, stats: r1});
+ });
+ });
+}
+
+var mapReduce = function(self, map, reduce, options, callback) {
+ var mapCommandHash = {
+ mapreduce: self.s.name
+ , map: map
+ , reduce: reduce
+ };
+
+ // Add any other options passed in
+ for(var n in options) {
+ if('scope' == n) {
+ mapCommandHash[n] = processScope(options[n]);
+ } else {
+ mapCommandHash[n] = options[n];
+ }
+ }
+
+ options = shallowClone(options);
+ // Ensure we have the right read preference inheritance
+ options = getReadPreference(self, options, self.s.db, self);
+
+ // If we have a read preference and inline is not set as output fail hard
+ if((options.readPreference != false && options.readPreference != 'primary')
+ && options['out'] && (options['out'].inline != 1 && options['out'] != 'inline')) {
+ // Force readPreference to primary
+ options.readPreference = 'primary';
+ // Decorate command with writeConcern if supported
+ decorateWithWriteConcern(mapCommandHash, self, options);
+ } else if(self.s.readConcern) {
+ mapCommandHash.readConcern = self.s.readConcern;
+ }
+
+ // Is bypassDocumentValidation specified
+ if(typeof options.bypassDocumentValidation == 'boolean') {
+ mapCommandHash.bypassDocumentValidation = options.bypassDocumentValidation;
+ }
+
+ // Have we specified collation
+ decorateWithCollation(mapCommandHash, self, options);
+
+ // Execute command
+ self.s.db.command(mapCommandHash, {readPreference:options.readPreference}, function (err, result) {
+ if(err) return handleCallback(callback, err);
+ // Check if we have an error
+ if(1 != result.ok || result.err || result.errmsg) {
+ return handleCallback(callback, toError(result));
+ }
+
+ // Create statistics value
+ var stats = {};
+ if(result.timeMillis) stats['processtime'] = result.timeMillis;
+ if(result.counts) stats['counts'] = result.counts;
+ if(result.timing) stats['timing'] = result.timing;
+
+ // invoked with inline?
+ if(result.results) {
+ // If we wish for no verbosity
+ if(options['verbose'] == null || !options['verbose']) {
+ return handleCallback(callback, null, result.results);
+ }
+
+ return handleCallback(callback, null, result.results, stats);
+ }
+
+ // The returned collection
+ var collection = null;
+
+ // If we have an object it's a different db
+ if(result.result != null && typeof result.result == 'object') {
+ var doc = result.result;
+ collection = self.s.db.db(doc.db).collection(doc.collection);
+ } else {
+ // Create a collection object that wraps the result collection
+ collection = self.s.db.collection(result.result)
+ }
+
+ // If we wish for no verbosity
+ if(options['verbose'] == null || !options['verbose']) {
+ return handleCallback(callback, err, collection);
+ }
+
+ // Return stats as third set of values
+ handleCallback(callback, err, collection, stats);
+ });
+}
+
+define.classMethod('mapReduce', {callback: true, promise:true});
+
+/**
+ * Initiate a Out of order batch write operation. All operations will be buffered into insert/update/remove commands executed out of order.
+ *
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @return {UnorderedBulkOperation}
+ */
+Collection.prototype.initializeUnorderedBulkOp = function(options) {
+ options = options || {};
+ options.promiseLibrary = this.s.promiseLibrary;
+ return unordered(this.s.topology, this, options);
+}
+
+define.classMethod('initializeUnorderedBulkOp', {callback: false, promise:false, returns: [ordered.UnorderedBulkOperation]});
+
+/**
+ * Initiate an In order bulk write operation, operations will be serially executed in the order they are added, creating a new operation for each switch in types.
+ *
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {OrderedBulkOperation} callback The command result callback
+ * @return {null}
+ */
+Collection.prototype.initializeOrderedBulkOp = function(options) {
+ options = options || {};
+ options.promiseLibrary = this.s.promiseLibrary;
+ return ordered(this.s.topology, this, options);
+}
+
+define.classMethod('initializeOrderedBulkOp', {callback: false, promise:false, returns: [ordered.OrderedBulkOperation]});
+
+// Get write concern
+var writeConcern = function(target, db, col, options) {
+ if(options.w != null || options.j != null || options.fsync != null) {
+ var opts = {};
+ if(options.w != null) opts.w = options.w;
+ if(options.wtimeout != null) opts.wtimeout = options.wtimeout;
+ if(options.j != null) opts.j = options.j;
+ if(options.fsync != null) opts.fsync = options.fsync;
+ target.writeConcern = opts;
+ } else if(col.writeConcern.w != null || col.writeConcern.j != null || col.writeConcern.fsync != null) {
+ target.writeConcern = col.writeConcern;
+ } else if(db.writeConcern.w != null || db.writeConcern.j != null || db.writeConcern.fsync != null) {
+ target.writeConcern = db.writeConcern;
+ }
+
+ return target
+}
+
+// Figure out the read preference
+var getReadPreference = function(self, options, db) {
+ var r = null
+ if(options.readPreference) {
+ r = options.readPreference
+ } else if(self.s.readPreference) {
+ r = self.s.readPreference
+ } else if(db.s.readPreference) {
+ r = db.s.readPreference;
+ }
+
+ if(r instanceof ReadPreference) {
+ options.readPreference = new CoreReadPreference(r.mode, r.tags, {maxStalenessSeconds: r.maxStalenessSeconds});
+ } else if(typeof r == 'string') {
+ options.readPreference = new CoreReadPreference(r);
+ } else if(r && !(r instanceof ReadPreference) && typeof r == 'object') {
+ var mode = r.mode || r.preference;
+ if (mode && typeof mode == 'string') {
+ options.readPreference = new CoreReadPreference(mode, r.tags, {maxStalenessSeconds: r.maxStalenessSeconds});
+ }
+ }
+
+ return options;
+}
+
+var testForFields = {
+ limit: 1, sort: 1, fields:1, skip: 1, hint: 1, explain: 1, snapshot: 1, timeout: 1, tailable: 1, tailableRetryInterval: 1
+ , numberOfRetries: 1, awaitdata: 1, awaitData: 1, exhaust: 1, batchSize: 1, returnKey: 1, maxScan: 1, min: 1, max: 1, showDiskLoc: 1
+ , comment: 1, raw: 1, readPreference: 1, partial: 1, read: 1, dbName: 1, oplogReplay: 1, connection: 1, maxTimeMS: 1, transforms: 1
+ , collation: 1
+}
+
+module.exports = Collection;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/command_cursor.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/command_cursor.js
new file mode 100644
index 0000000..7f07f12
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/command_cursor.js
@@ -0,0 +1,311 @@
+"use strict";
+
+var inherits = require('util').inherits
+ , ReadPreference = require('./read_preference')
+ , MongoError = require('mongodb-core').MongoError
+ , Readable = require('stream').Readable || require('readable-stream').Readable
+ , Define = require('./metadata')
+ , CoreCursor = require('./cursor')
+ , CoreReadPreference = require('mongodb-core').ReadPreference;
+
+/**
+ * @fileOverview The **CommandCursor** class is an internal class that embodies a
+ * generalized cursor based on a MongoDB command allowing for iteration over the
+ * results returned. It supports one by one document iteration, conversion to an
+ * array or can be iterated as a Node 0.10.X or higher stream
+ *
+ * **CommandCursor Cannot directly be instantiated**
+ * @example
+ * var MongoClient = require('mongodb').MongoClient,
+ * test = require('assert');
+ * // Connection url
+ * var url = 'mongodb://localhost:27017/test';
+ * // Connect using MongoClient
+ * MongoClient.connect(url, function(err, db) {
+ * // Create a collection we want to drop later
+ * var col = db.collection('listCollectionsExample1');
+ * // Insert a bunch of documents
+ * col.insert([{a:1, b:1}
+ * , {a:2, b:2}, {a:3, b:3}
+ * , {a:4, b:4}], {w:1}, function(err, result) {
+ * test.equal(null, err);
+ *
+ * // List the database collections available
+ * db.listCollections().toArray(function(err, items) {
+ * test.equal(null, err);
+ * db.close();
+ * });
+ * });
+ * });
+ */
+
+/**
+ * Namespace provided by the browser.
+ * @external Readable
+ */
+
+/**
+ * Creates a new Command Cursor instance (INTERNAL TYPE, do not instantiate directly)
+ * @class CommandCursor
+ * @extends external:Readable
+ * @fires CommandCursor#data
+ * @fires CommandCursor#end
+ * @fires CommandCursor#close
+ * @fires CommandCursor#readable
+ * @return {CommandCursor} an CommandCursor instance.
+ */
+var CommandCursor = function(bson, ns, cmd, options, topology, topologyOptions) {
+ CoreCursor.apply(this, Array.prototype.slice.call(arguments, 0));
+ var state = CommandCursor.INIT;
+ var streamOptions = {};
+
+ // MaxTimeMS
+ var maxTimeMS = null;
+
+ // Get the promiseLibrary
+ var promiseLibrary = options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // Set up
+ Readable.call(this, {objectMode: true});
+
+ // Internal state
+ this.s = {
+ // MaxTimeMS
+ maxTimeMS: maxTimeMS
+ // State
+ , state: state
+ // Stream options
+ , streamOptions: streamOptions
+ // BSON
+ , bson: bson
+ // Namespae
+ , ns: ns
+ // Command
+ , cmd: cmd
+ // Options
+ , options: options
+ // Topology
+ , topology: topology
+ // Topology Options
+ , topologyOptions: topologyOptions
+ // Promise library
+ , promiseLibrary: promiseLibrary
+ }
+}
+
+/**
+ * CommandCursor stream data event, fired for each document in the cursor.
+ *
+ * @event CommandCursor#data
+ * @type {object}
+ */
+
+/**
+ * CommandCursor stream end event
+ *
+ * @event CommandCursor#end
+ * @type {null}
+ */
+
+/**
+ * CommandCursor stream close event
+ *
+ * @event CommandCursor#close
+ * @type {null}
+ */
+
+/**
+ * CommandCursor stream readable event
+ *
+ * @event CommandCursor#readable
+ * @type {null}
+ */
+
+// Inherit from Readable
+inherits(CommandCursor, Readable);
+
+// Set the methods to inherit from prototype
+var methodsToInherit = ['_next', 'next', 'each', 'forEach', 'toArray'
+ , 'rewind', 'bufferedCount', 'readBufferedDocuments', 'close', 'isClosed', 'kill'
+ , '_find', '_getmore', '_killcursor', 'isDead', 'explain', 'isNotified', 'isKilled'];
+
+// Only inherit the types we need
+for(var i = 0; i < methodsToInherit.length; i++) {
+ CommandCursor.prototype[methodsToInherit[i]] = CoreCursor.prototype[methodsToInherit[i]];
+}
+
+var define = CommandCursor.define = new Define('CommandCursor', CommandCursor, true);
+
+/**
+ * Set the ReadPreference for the cursor.
+ * @method
+ * @param {(string|ReadPreference)} readPreference The new read preference for the cursor.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+CommandCursor.prototype.setReadPreference = function(r) {
+ if(this.s.state == CommandCursor.CLOSED || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ if(this.s.state != CommandCursor.INIT) throw MongoError.create({message: 'cannot change cursor readPreference after cursor has been accessed', driver:true});
+
+ if(r instanceof ReadPreference) {
+ this.s.options.readPreference = new CoreReadPreference(r.mode, r.tags, {maxStalenessSeconds: r.maxStalenessSeconds});
+ } else if(typeof r == 'string') {
+ this.s.options.readPreference = new CoreReadPreference(r);
+ } else if(r instanceof CoreReadPreference) {
+ this.s.options.readPreference = r;
+ }
+
+ return this;
+}
+
+define.classMethod('setReadPreference', {callback: false, promise:false, returns: [CommandCursor]});
+
+/**
+ * Set the batch size for the cursor.
+ * @method
+ * @param {number} value The batchSize for the cursor.
+ * @throws {MongoError}
+ * @return {CommandCursor}
+ */
+CommandCursor.prototype.batchSize = function(value) {
+ if(this.s.state == CommandCursor.CLOSED || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ if(typeof value != 'number') throw MongoError.create({message: "batchSize requires an integer", driver:true});
+ if(this.s.cmd.cursor) this.s.cmd.cursor.batchSize = value;
+ this.setCursorBatchSize(value);
+ return this;
+}
+
+define.classMethod('batchSize', {callback: false, promise:false, returns: [CommandCursor]});
+
+/**
+ * Add a maxTimeMS stage to the aggregation pipeline
+ * @method
+ * @param {number} value The state maxTimeMS value.
+ * @return {CommandCursor}
+ */
+CommandCursor.prototype.maxTimeMS = function(value) {
+ if(this.s.topology.lastIsMaster().minWireVersion > 2) {
+ this.s.cmd.maxTimeMS = value;
+ }
+ return this;
+}
+
+define.classMethod('maxTimeMS', {callback: false, promise:false, returns: [CommandCursor]});
+
+CommandCursor.prototype.get = CommandCursor.prototype.toArray;
+
+define.classMethod('get', {callback: true, promise:false});
+
+// Inherited methods
+define.classMethod('toArray', {callback: true, promise:true});
+define.classMethod('each', {callback: true, promise:false});
+define.classMethod('forEach', {callback: true, promise:false});
+define.classMethod('next', {callback: true, promise:true});
+define.classMethod('close', {callback: true, promise:true});
+define.classMethod('isClosed', {callback: false, promise:false, returns: [Boolean]});
+define.classMethod('rewind', {callback: false, promise:false});
+define.classMethod('bufferedCount', {callback: false, promise:false, returns: [Number]});
+define.classMethod('readBufferedDocuments', {callback: false, promise:false, returns: [Array]});
+
+/**
+ * Get the next available document from the cursor, returns null if no more documents are available.
+ * @function CommandCursor.prototype.next
+ * @param {CommandCursor~resultCallback} [callback] The result callback.
+ * @throws {MongoError}
+ * @return {Promise} returns Promise if no callback passed
+ */
+
+/**
+ * The callback format for results
+ * @callback CommandCursor~toArrayResultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {object[]} documents All the documents the satisfy the cursor.
+ */
+
+/**
+ * Returns an array of documents. The caller is responsible for making sure that there
+ * is enough memory to store the results. Note that the array only contain partial
+ * results when this cursor had been previouly accessed.
+ * @method CommandCursor.prototype.toArray
+ * @param {CommandCursor~toArrayResultCallback} [callback] The result callback.
+ * @throws {MongoError}
+ * @return {Promise} returns Promise if no callback passed
+ */
+
+/**
+ * The callback format for results
+ * @callback CommandCursor~resultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {(object|null)} result The result object if the command was executed successfully.
+ */
+
+/**
+ * Iterates over all the documents for this cursor. As with **{cursor.toArray}**,
+ * not all of the elements will be iterated if this cursor had been previouly accessed.
+ * In that case, **{cursor.rewind}** can be used to reset the cursor. However, unlike
+ * **{cursor.toArray}**, the cursor will only hold a maximum of batch size elements
+ * at any given time if batch size is specified. Otherwise, the caller is responsible
+ * for making sure that the entire result can fit the memory.
+ * @method CommandCursor.prototype.each
+ * @param {CommandCursor~resultCallback} callback The result callback.
+ * @throws {MongoError}
+ * @return {null}
+ */
+
+/**
+ * Close the cursor, sending a KillCursor command and emitting close.
+ * @method CommandCursor.prototype.close
+ * @param {CommandCursor~resultCallback} [callback] The result callback.
+ * @return {Promise} returns Promise if no callback passed
+ */
+
+/**
+ * Is the cursor closed
+ * @method CommandCursor.prototype.isClosed
+ * @return {boolean}
+ */
+
+/**
+ * Clone the cursor
+ * @function CommandCursor.prototype.clone
+ * @return {CommandCursor}
+ */
+
+/**
+ * Resets the cursor
+ * @function CommandCursor.prototype.rewind
+ * @return {CommandCursor}
+ */
+
+/**
+ * The callback format for the forEach iterator method
+ * @callback CommandCursor~iteratorCallback
+ * @param {Object} doc An emitted document for the iterator
+ */
+
+/**
+ * The callback error format for the forEach iterator method
+ * @callback CommandCursor~endCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ */
+
+/*
+ * Iterates over all the documents for this cursor using the iterator, callback pattern.
+ * @method CommandCursor.prototype.forEach
+ * @param {CommandCursor~iteratorCallback} iterator The iteration callback.
+ * @param {CommandCursor~endCallback} callback The end callback.
+ * @throws {MongoError}
+ * @return {null}
+ */
+
+CommandCursor.INIT = 0;
+CommandCursor.OPEN = 1;
+CommandCursor.CLOSED = 2;
+
+module.exports = CommandCursor;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/cursor.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/cursor.js
new file mode 100644
index 0000000..8dd7edd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/cursor.js
@@ -0,0 +1,1181 @@
+"use strict";
+
+var inherits = require('util').inherits
+ , f = require('util').format
+ , formattedOrderClause = require('./utils').formattedOrderClause
+ , handleCallback = require('./utils').handleCallback
+ , ReadPreference = require('./read_preference')
+ , MongoError = require('mongodb-core').MongoError
+ , Readable = require('stream').Readable || require('readable-stream').Readable
+ , Define = require('./metadata')
+ , CoreCursor = require('mongodb-core').Cursor
+ , Map = require('mongodb-core').BSON.Map
+ , CoreReadPreference = require('mongodb-core').ReadPreference;
+
+/**
+ * @fileOverview The **Cursor** class is an internal class that embodies a cursor on MongoDB
+ * allowing for iteration over the results returned from the underlying query. It supports
+ * one by one document iteration, conversion to an array or can be iterated as a Node 0.10.X
+ * or higher stream
+ *
+ * **CURSORS Cannot directly be instantiated**
+ * @example
+ * var MongoClient = require('mongodb').MongoClient,
+ * test = require('assert');
+ * // Connection url
+ * var url = 'mongodb://localhost:27017/test';
+ * // Connect using MongoClient
+ * MongoClient.connect(url, function(err, db) {
+ * // Create a collection we want to drop later
+ * var col = db.collection('createIndexExample1');
+ * // Insert a bunch of documents
+ * col.insert([{a:1, b:1}
+ * , {a:2, b:2}, {a:3, b:3}
+ * , {a:4, b:4}], {w:1}, function(err, result) {
+ * test.equal(null, err);
+ *
+ * // Show that duplicate records got dropped
+ * col.find({}).toArray(function(err, items) {
+ * test.equal(null, err);
+ * test.equal(4, items.length);
+ * db.close();
+ * });
+ * });
+ * });
+ */
+
+/**
+ * Namespace provided by the mongodb-core and node.js
+ * @external CoreCursor
+ * @external Readable
+ */
+
+// Flags allowed for cursor
+var flags = ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'exhaust', 'partial'];
+var fields = ['numberOfRetries', 'tailableRetryInterval'];
+var push = Array.prototype.push;
+
+/**
+ * Creates a new Cursor instance (INTERNAL TYPE, do not instantiate directly)
+ * @class Cursor
+ * @extends external:CoreCursor
+ * @extends external:Readable
+ * @property {string} sortValue Cursor query sort setting.
+ * @property {boolean} timeout Is Cursor able to time out.
+ * @property {ReadPreference} readPreference Get cursor ReadPreference.
+ * @fires Cursor#data
+ * @fires Cursor#end
+ * @fires Cursor#close
+ * @fires Cursor#readable
+ * @return {Cursor} a Cursor instance.
+ * @example
+ * Cursor cursor options.
+ *
+ * collection.find({}).project({a:1}) // Create a projection of field a
+ * collection.find({}).skip(1).limit(10) // Skip 1 and limit 10
+ * collection.find({}).batchSize(5) // Set batchSize on cursor to 5
+ * collection.find({}).filter({a:1}) // Set query on the cursor
+ * collection.find({}).comment('add a comment') // Add a comment to the query, allowing to correlate queries
+ * collection.find({}).addCursorFlag('tailable', true) // Set cursor as tailable
+ * collection.find({}).addCursorFlag('oplogReplay', true) // Set cursor as oplogReplay
+ * collection.find({}).addCursorFlag('noCursorTimeout', true) // Set cursor as noCursorTimeout
+ * collection.find({}).addCursorFlag('awaitData', true) // Set cursor as awaitData
+ * collection.find({}).addCursorFlag('partial', true) // Set cursor as partial
+ * collection.find({}).addQueryModifier('$orderby', {a:1}) // Set $orderby {a:1}
+ * collection.find({}).max(10) // Set the cursor maxScan
+ * collection.find({}).maxScan(10) // Set the cursor maxScan
+ * collection.find({}).maxTimeMS(1000) // Set the cursor maxTimeMS
+ * collection.find({}).min(100) // Set the cursor min
+ * collection.find({}).returnKey(10) // Set the cursor returnKey
+ * collection.find({}).setReadPreference(ReadPreference.PRIMARY) // Set the cursor readPreference
+ * collection.find({}).showRecordId(true) // Set the cursor showRecordId
+ * collection.find({}).snapshot(true) // Set the cursor snapshot
+ * collection.find({}).sort([['a', 1]]) // Sets the sort order of the cursor query
+ * collection.find({}).hint('a_1') // Set the cursor hint
+ *
+ * All options are chainable, so one can do the following.
+ *
+ * collection.find({}).maxTimeMS(1000).maxScan(100).skip(1).toArray(..)
+ */
+var Cursor = function(bson, ns, cmd, options, topology, topologyOptions) {
+ CoreCursor.apply(this, Array.prototype.slice.call(arguments, 0));
+ var self = this;
+ var state = Cursor.INIT;
+ var streamOptions = {};
+
+ // Tailable cursor options
+ var numberOfRetries = options.numberOfRetries || 5;
+ var tailableRetryInterval = options.tailableRetryInterval || 500;
+ var currentNumberOfRetries = numberOfRetries;
+
+ // Get the promiseLibrary
+ var promiseLibrary = options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // Set up
+ Readable.call(this, {objectMode: true});
+
+ // Internal cursor state
+ this.s = {
+ // Tailable cursor options
+ numberOfRetries: numberOfRetries
+ , tailableRetryInterval: tailableRetryInterval
+ , currentNumberOfRetries: currentNumberOfRetries
+ // State
+ , state: state
+ // Stream options
+ , streamOptions: streamOptions
+ // BSON
+ , bson: bson
+ // Namespace
+ , ns: ns
+ // Command
+ , cmd: cmd
+ // Options
+ , options: options
+ // Topology
+ , topology: topology
+ // Topology options
+ , topologyOptions: topologyOptions
+ // Promise library
+ , promiseLibrary: promiseLibrary
+ // Current doc
+ , currentDoc: null
+ }
+
+ // Translate correctly
+ if(self.s.options.noCursorTimeout == true) {
+ self.addCursorFlag('noCursorTimeout', true);
+ }
+
+ // Set the sort value
+ this.sortValue = self.s.cmd.sort;
+}
+
+/**
+ * Cursor stream data event, fired for each document in the cursor.
+ *
+ * @event Cursor#data
+ * @type {object}
+ */
+
+/**
+ * Cursor stream end event
+ *
+ * @event Cursor#end
+ * @type {null}
+ */
+
+/**
+ * Cursor stream close event
+ *
+ * @event Cursor#close
+ * @type {null}
+ */
+
+/**
+ * Cursor stream readable event
+ *
+ * @event Cursor#readable
+ * @type {null}
+ */
+
+// Inherit from Readable
+inherits(Cursor, Readable);
+
+// Map core cursor _next method so we can apply mapping
+CoreCursor.prototype._next = CoreCursor.prototype.next;
+
+for(var name in CoreCursor.prototype) {
+ Cursor.prototype[name] = CoreCursor.prototype[name];
+}
+
+var define = Cursor.define = new Define('Cursor', Cursor, true);
+
+/**
+ * Check if there is any document still available in the cursor
+ * @method
+ * @param {Cursor~resultCallback} [callback] The result callback.
+ * @throws {MongoError}
+ * @return {Promise} returns Promise if no callback passed
+ */
+Cursor.prototype.hasNext = function(callback) {
+ var self = this;
+
+ // Execute using callback
+ if(typeof callback == 'function') {
+ if(self.s.currentDoc){
+ return callback(null, true);
+ } else {
+ return nextObject(self, function(err, doc) {
+ if(!doc) return callback(null, false);
+ self.s.currentDoc = doc;
+ callback(null, true);
+ });
+ }
+ }
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ if(self.s.currentDoc){
+ resolve(true);
+ } else {
+ nextObject(self, function(err, doc) {
+ if(self.s.state == Cursor.CLOSED || self.isDead()) return resolve(false);
+ if(err) return reject(err);
+ if(!doc) return resolve(false);
+ self.s.currentDoc = doc;
+ resolve(true);
+ });
+ }
+ });
+}
+
+define.classMethod('hasNext', {callback: true, promise:true});
+
+/**
+ * Get the next available document from the cursor, returns null if no more documents are available.
+ * @method
+ * @param {Cursor~resultCallback} [callback] The result callback.
+ * @throws {MongoError}
+ * @return {Promise} returns Promise if no callback passed
+ */
+Cursor.prototype.next = function(callback) {
+ var self = this;
+
+ // Execute using callback
+ if(typeof callback == 'function') {
+ // Return the currentDoc if someone called hasNext first
+ if(self.s.currentDoc) {
+ var doc = self.s.currentDoc;
+ self.s.currentDoc = null;
+ return callback(null, doc);
+ }
+
+ // Return the next object
+ return nextObject(self, callback)
+ }
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ // Return the currentDoc if someone called hasNext first
+ if(self.s.currentDoc) {
+ var doc = self.s.currentDoc;
+ self.s.currentDoc = null;
+ return resolve(doc);
+ }
+
+ nextObject(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('next', {callback: true, promise:true});
+
+/**
+ * Set the cursor query
+ * @method
+ * @param {object} filter The filter object used for the cursor.
+ * @return {Cursor}
+ */
+Cursor.prototype.filter = function(filter) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.query = filter;
+ return this;
+}
+
+define.classMethod('filter', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set the cursor maxScan
+ * @method
+ * @param {object} maxScan Constrains the query to only scan the specified number of documents when fulfilling the query
+ * @return {Cursor}
+ */
+Cursor.prototype.maxScan = function(maxScan) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.maxScan = maxScan;
+ return this;
+}
+
+define.classMethod('maxScan', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set the cursor hint
+ * @method
+ * @param {object} hint If specified, then the query system will only consider plans using the hinted index.
+ * @return {Cursor}
+ */
+Cursor.prototype.hint = function(hint) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.hint = hint;
+ return this;
+}
+
+define.classMethod('hint', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set the cursor min
+ * @method
+ * @param {object} min Specify a $min value to specify the inclusive lower bound for a specific index in order to constrain the results of find(). The $min specifies the lower bound for all keys of a specific index in order.
+ * @return {Cursor}
+ */
+Cursor.prototype.min = function(min) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.min = min;
+ return this;
+}
+
+define.classMethod('min', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set the cursor max
+ * @method
+ * @param {object} max Specify a $max value to specify the exclusive upper bound for a specific index in order to constrain the results of find(). The $max specifies the upper bound for all keys of a specific index in order.
+ * @return {Cursor}
+ */
+Cursor.prototype.max = function(max) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.max = max;
+ return this;
+}
+
+define.classMethod('max', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set the cursor returnKey
+ * @method
+ * @param {object} returnKey Only return the index field or fields for the results of the query. If $returnKey is set to true and the query does not use an index to perform the read operation, the returned documents will not contain any fields. Use one of the following forms:
+ * @return {Cursor}
+ */
+Cursor.prototype.returnKey = function(value) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.returnKey = value;
+ return this;
+}
+
+define.classMethod('returnKey', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set the cursor showRecordId
+ * @method
+ * @param {object} showRecordId The $showDiskLoc option has now been deprecated and replaced with the showRecordId field. $showDiskLoc will still be accepted for OP_QUERY stye find.
+ * @return {Cursor}
+ */
+Cursor.prototype.showRecordId = function(value) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.showDiskLoc = value;
+ return this;
+}
+
+define.classMethod('showRecordId', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set the cursor snapshot
+ * @method
+ * @param {object} snapshot The $snapshot operator prevents the cursor from returning a document more than once because an intervening write operation results in a move of the document.
+ * @return {Cursor}
+ */
+Cursor.prototype.snapshot = function(value) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.snapshot = value;
+ return this;
+}
+
+define.classMethod('snapshot', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set a node.js specific cursor option
+ * @method
+ * @param {string} field The cursor option to set ['numberOfRetries', 'tailableRetryInterval'].
+ * @param {object} value The field value.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.setCursorOption = function(field, value) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ if(fields.indexOf(field) == -1) throw MongoError.create({message: f("option %s not a supported option %s", field, fields), driver:true });
+ this.s[field] = value;
+ if(field == 'numberOfRetries')
+ this.s.currentNumberOfRetries = value;
+ return this;
+}
+
+define.classMethod('setCursorOption', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Add a cursor flag to the cursor
+ * @method
+ * @param {string} flag The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial'].
+ * @param {boolean} value The flag boolean value.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.addCursorFlag = function(flag, value) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ if(flags.indexOf(flag) == -1) throw MongoError.create({message: f("flag %s not a supported flag %s", flag, flags), driver:true });
+ if(typeof value != 'boolean') throw MongoError.create({message: f("flag %s must be a boolean value", flag), driver:true});
+ this.s.cmd[flag] = value;
+ return this;
+}
+
+define.classMethod('addCursorFlag', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Add a query modifier to the cursor query
+ * @method
+ * @param {string} name The query modifier (must start with $, such as $orderby etc)
+ * @param {boolean} value The flag boolean value.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.addQueryModifier = function(name, value) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ if(name[0] != '$') throw MongoError.create({message: f("%s is not a valid query modifier"), driver:true});
+ // Strip of the $
+ var field = name.substr(1);
+ // Set on the command
+ this.s.cmd[field] = value;
+ // Deal with the special case for sort
+ if(field == 'orderby') this.s.cmd.sort = this.s.cmd[field];
+ return this;
+}
+
+define.classMethod('addQueryModifier', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Add a comment to the cursor query allowing for tracking the comment in the log.
+ * @method
+ * @param {string} value The comment attached to this query.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.comment = function(value) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.comment = value;
+ return this;
+}
+
+define.classMethod('comment', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set a maxAwaitTimeMS on a tailing cursor query to allow to customize the timeout value for the option awaitData (Only supported on MongoDB 3.2 or higher, ignored otherwise)
+ * @method
+ * @param {number} value Number of milliseconds to wait before aborting the tailed query.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.maxAwaitTimeMS = function(value) {
+ if(typeof value != 'number') throw MongoError.create({message: "maxAwaitTimeMS must be a number", driver:true});
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.maxAwaitTimeMS = value;
+ return this;
+}
+
+define.classMethod('maxAwaitTimeMS', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set a maxTimeMS on the cursor query, allowing for hard timeout limits on queries (Only supported on MongoDB 2.6 or higher)
+ * @method
+ * @param {number} value Number of milliseconds to wait before aborting the query.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.maxTimeMS = function(value) {
+ if(typeof value != 'number') throw MongoError.create({message: "maxTimeMS must be a number", driver:true});
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.maxTimeMS = value;
+ return this;
+}
+
+define.classMethod('maxTimeMS', {callback: false, promise:false, returns: [Cursor]});
+
+Cursor.prototype.maxTimeMs = Cursor.prototype.maxTimeMS;
+
+define.classMethod('maxTimeMs', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Sets a field projection for the query.
+ * @method
+ * @param {object} value The field projection object.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.project = function(value) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.fields = value;
+ return this;
+}
+
+define.classMethod('project', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Sets the sort order of the cursor query.
+ * @method
+ * @param {(string|array|object)} keyOrList The key or keys set for the sort.
+ * @param {number} [direction] The direction of the sorting (1 or -1).
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.sort = function(keyOrList, direction) {
+ if(this.s.options.tailable) throw MongoError.create({message: "Tailable cursor doesn't support sorting", driver:true});
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ var order = keyOrList;
+
+ // We have an array of arrays, we need to preserve the order of the sort
+ // so we will us a Map
+ if(Array.isArray(order) && Array.isArray(order[0])) {
+ order = new Map(order.map(function(x) {
+ var value = [x[0], null];
+ if(x[1] == 'asc') {
+ value[1] = 1;
+ } else if(x[1] == 'desc') {
+ value[1] = -1;
+ } else if(x[1] == 1 || x[1] == -1) {
+ value[1] = x[1];
+ } else {
+ throw new MongoError("Illegal sort clause, must be of the form [['field1', '(ascending|descending)'], ['field2', '(ascending|descending)']]");
+ }
+
+ return value;
+ }));
+ }
+
+ if(direction != null) {
+ order = [[keyOrList, direction]];
+ }
+
+ this.s.cmd.sort = order;
+ this.sortValue = order;
+ return this;
+}
+
+define.classMethod('sort', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set the batch size for the cursor.
+ * @method
+ * @param {number} value The batchSize for the cursor.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.batchSize = function(value) {
+ if(this.s.options.tailable) throw MongoError.create({message: "Tailable cursor doesn't support batchSize", driver:true});
+ if(this.s.state == Cursor.CLOSED || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ if(typeof value != 'number') throw MongoError.create({message: "batchSize requires an integer", driver:true});
+ this.s.cmd.batchSize = value;
+ this.setCursorBatchSize(value);
+ return this;
+}
+
+define.classMethod('batchSize', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set the collation options for the cursor.
+ * @method
+ * @param {object} value The cursor collation options (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields).
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.collation = function(value) {
+ this.s.cmd.collation = value;
+ return this;
+}
+
+define.classMethod('collation', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set the limit for the cursor.
+ * @method
+ * @param {number} value The limit for the cursor query.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.limit = function(value) {
+ if(this.s.options.tailable) throw MongoError.create({message: "Tailable cursor doesn't support limit", driver:true});
+ if(this.s.state == Cursor.OPEN || this.s.state == Cursor.CLOSED || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ if(typeof value != 'number') throw MongoError.create({message: "limit requires an integer", driver:true});
+ this.s.cmd.limit = value;
+ // this.cursorLimit = value;
+ this.setCursorLimit(value);
+ return this;
+}
+
+define.classMethod('limit', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set the skip for the cursor.
+ * @method
+ * @param {number} value The skip for the cursor query.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.skip = function(value) {
+ if(this.s.options.tailable) throw MongoError.create({message: "Tailable cursor doesn't support skip", driver:true});
+ if(this.s.state == Cursor.OPEN || this.s.state == Cursor.CLOSED || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ if(typeof value != 'number') throw MongoError.create({message: "skip requires an integer", driver:true});
+ this.s.cmd.skip = value;
+ this.setCursorSkip(value);
+ return this;
+}
+
+define.classMethod('skip', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * The callback format for results
+ * @callback Cursor~resultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {(object|null|boolean)} result The result object if the command was executed successfully.
+ */
+
+/**
+ * Clone the cursor
+ * @function external:CoreCursor#clone
+ * @return {Cursor}
+ */
+
+/**
+ * Resets the cursor
+ * @function external:CoreCursor#rewind
+ * @return {null}
+ */
+
+/**
+ * Get the next available document from the cursor, returns null if no more documents are available.
+ * @method
+ * @param {Cursor~resultCallback} [callback] The result callback.
+ * @throws {MongoError}
+ * @deprecated
+ * @return {Promise} returns Promise if no callback passed
+ */
+Cursor.prototype.nextObject = Cursor.prototype.next;
+
+var nextObject = function(self, callback) {
+ if(self.s.state == Cursor.CLOSED || self.isDead && self.isDead()) return handleCallback(callback, MongoError.create({message: "Cursor is closed", driver:true}));
+ if(self.s.state == Cursor.INIT && self.s.cmd.sort) {
+ try {
+ self.s.cmd.sort = formattedOrderClause(self.s.cmd.sort);
+ } catch(err) {
+ return handleCallback(callback, err);
+ }
+ }
+
+ // Get the next object
+ self._next(function(err, doc) {
+ self.s.state = Cursor.OPEN;
+ if(err) return handleCallback(callback, err);
+ handleCallback(callback, null, doc);
+ });
+}
+
+define.classMethod('nextObject', {callback: true, promise:true});
+
+// Trampoline emptying the number of retrieved items
+// without incurring a nextTick operation
+var loop = function(self, callback) {
+ // No more items we are done
+ if(self.bufferedCount() == 0) return;
+ // Get the next document
+ self._next(callback);
+ // Loop
+ return loop;
+}
+
+Cursor.prototype.next = Cursor.prototype.nextObject;
+
+define.classMethod('next', {callback: true, promise:true});
+
+/**
+ * Iterates over all the documents for this cursor. As with **{cursor.toArray}**,
+ * not all of the elements will be iterated if this cursor had been previouly accessed.
+ * In that case, **{cursor.rewind}** can be used to reset the cursor. However, unlike
+ * **{cursor.toArray}**, the cursor will only hold a maximum of batch size elements
+ * at any given time if batch size is specified. Otherwise, the caller is responsible
+ * for making sure that the entire result can fit the memory.
+ * @method
+ * @deprecated
+ * @param {Cursor~resultCallback} callback The result callback.
+ * @throws {MongoError}
+ * @return {null}
+ */
+Cursor.prototype.each = function(callback) {
+ // Rewind cursor state
+ this.rewind();
+ // Set current cursor to INIT
+ this.s.state = Cursor.INIT;
+ // Run the query
+ _each(this, callback);
+};
+
+define.classMethod('each', {callback: true, promise:false});
+
+// Run the each loop
+var _each = function(self, callback) {
+ if(!callback) throw MongoError.create({message: 'callback is mandatory', driver:true});
+ if(self.isNotified()) return;
+ if(self.s.state == Cursor.CLOSED || self.isDead()) {
+ return handleCallback(callback, MongoError.create({message: "Cursor is closed", driver:true}));
+ }
+
+ if(self.s.state == Cursor.INIT) self.s.state = Cursor.OPEN;
+
+ // Define function to avoid global scope escape
+ var fn = null;
+ // Trampoline all the entries
+ if(self.bufferedCount() > 0) {
+ while(fn = loop(self, callback)) fn(self, callback);
+ _each(self, callback);
+ } else {
+ self.next(function(err, item) {
+ if(err) return handleCallback(callback, err);
+ if(item == null) {
+ self.s.state = Cursor.CLOSED;
+ return handleCallback(callback, null, null);
+ }
+
+ if(handleCallback(callback, null, item) == false) return;
+ _each(self, callback);
+ })
+ }
+}
+
+/**
+ * The callback format for the forEach iterator method
+ * @callback Cursor~iteratorCallback
+ * @param {Object} doc An emitted document for the iterator
+ */
+
+/**
+ * The callback error format for the forEach iterator method
+ * @callback Cursor~endCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ */
+
+/**
+ * Iterates over all the documents for this cursor using the iterator, callback pattern.
+ * @method
+ * @param {Cursor~iteratorCallback} iterator The iteration callback.
+ * @param {Cursor~endCallback} callback The end callback.
+ * @throws {MongoError}
+ * @return {null}
+ */
+Cursor.prototype.forEach = function(iterator, callback) {
+ this.each(function(err, doc){
+ if(err) { callback(err); return false; }
+ if(doc != null) { iterator(doc); return true; }
+ if(doc == null && callback) {
+ var internalCallback = callback;
+ callback = null;
+ internalCallback(null);
+ return false;
+ }
+ });
+}
+
+define.classMethod('forEach', {callback: true, promise:false});
+
+/**
+ * Set the ReadPreference for the cursor.
+ * @method
+ * @param {(string|ReadPreference)} readPreference The new read preference for the cursor.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.setReadPreference = function(r) {
+ if(this.s.state != Cursor.INIT) throw MongoError.create({message: 'cannot change cursor readPreference after cursor has been accessed', driver:true});
+ if(r instanceof ReadPreference) {
+ this.s.options.readPreference = new CoreReadPreference(r.mode, r.tags, {maxStalenessSeconds: r.maxStalenessSeconds});
+ } else if(typeof r == 'string'){
+ this.s.options.readPreference = new CoreReadPreference(r);
+ } else if(r instanceof CoreReadPreference) {
+ this.s.options.readPreference = r;
+ }
+
+ return this;
+}
+
+define.classMethod('setReadPreference', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * The callback format for results
+ * @callback Cursor~toArrayResultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {object[]} documents All the documents the satisfy the cursor.
+ */
+
+/**
+ * Returns an array of documents. The caller is responsible for making sure that there
+ * is enough memory to store the results. Note that the array only contain partial
+ * results when this cursor had been previouly accessed. In that case,
+ * cursor.rewind() can be used to reset the cursor.
+ * @method
+ * @param {Cursor~toArrayResultCallback} [callback] The result callback.
+ * @throws {MongoError}
+ * @return {Promise} returns Promise if no callback passed
+ */
+Cursor.prototype.toArray = function(callback) {
+ var self = this;
+ if(self.s.options.tailable) throw MongoError.create({message: 'Tailable cursor cannot be converted to array', driver:true});
+
+ // Execute using callback
+ if(typeof callback == 'function') return toArray(self, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ toArray(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var toArray = function(self, callback) {
+ var items = [];
+
+ // Reset cursor
+ self.rewind();
+ self.s.state = Cursor.INIT;
+
+ // Fetch all the documents
+ var fetchDocs = function() {
+ self._next(function(err, doc) {
+ if(err) return handleCallback(callback, err);
+ if(doc == null) {
+ self.s.state = Cursor.CLOSED;
+ return handleCallback(callback, null, items);
+ }
+
+ // Add doc to items
+ items.push(doc)
+
+ // Get all buffered objects
+ if(self.bufferedCount() > 0) {
+ var docs = self.readBufferedDocuments(self.bufferedCount())
+
+ // Transform the doc if transform method added
+ if(self.s.transforms && typeof self.s.transforms.doc == 'function') {
+ docs = docs.map(self.s.transforms.doc);
+ }
+
+ push.apply(items, docs);
+ }
+
+ // Attempt a fetch
+ fetchDocs();
+ })
+ }
+
+ fetchDocs();
+}
+
+define.classMethod('toArray', {callback: true, promise:true});
+
+/**
+ * The callback format for results
+ * @callback Cursor~countResultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {number} count The count of documents.
+ */
+
+/**
+ * Get the count of documents for this cursor
+ * @method
+ * @param {boolean} [applySkipLimit=true] Should the count command apply limit and skip settings on the cursor or in the passed in options.
+ * @param {object} [options=null] Optional settings.
+ * @param {number} [options.skip=null] The number of documents to skip.
+ * @param {number} [options.limit=null] The maximum amounts to count before aborting.
+ * @param {number} [options.maxTimeMS=null] Number of miliseconds to wait before aborting the query.
+ * @param {string} [options.hint=null] An index name hint for the query.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {Cursor~countResultCallback} [callback] The result callback.
+ * @return {Promise} returns Promise if no callback passed
+ */
+Cursor.prototype.count = function(applySkipLimit, opts, callback) {
+ var self = this;
+ if(self.s.cmd.query == null) throw MongoError.create({message: "count can only be used with find command", driver:true});
+ if(typeof opts == 'function') callback = opts, opts = {};
+ opts = opts || {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return count(self, applySkipLimit, opts, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ count(self, applySkipLimit, opts, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var count = function(self, applySkipLimit, opts, callback) {
+ if(typeof applySkipLimit == 'function') {
+ callback = applySkipLimit;
+ applySkipLimit = true;
+ }
+
+ if(applySkipLimit) {
+ if(typeof self.cursorSkip() == 'number') opts.skip = self.cursorSkip();
+ if(typeof self.cursorLimit() == 'number') opts.limit = self.cursorLimit();
+ }
+
+ // Command
+ var delimiter = self.s.ns.indexOf('.');
+
+ var command = {
+ 'count': self.s.ns.substr(delimiter+1), 'query': self.s.cmd.query
+ }
+
+ if(typeof opts.maxTimeMS == 'number') {
+ command.maxTimeMS = opts.maxTimeMS;
+ } else if(self.s.cmd && typeof self.s.cmd.maxTimeMS == 'number') {
+ command.maxTimeMS = self.s.cmd.maxTimeMS;
+ }
+
+ // Merge in any options
+ if(opts.skip) command.skip = opts.skip;
+ if(opts.limit) command.limit = opts.limit;
+ if(self.s.options.hint) command.hint = self.s.options.hint;
+
+ // Execute the command
+ self.topology.command(f("%s.$cmd", self.s.ns.substr(0, delimiter))
+ , command, function(err, result) {
+ callback(err, result ? result.result.n : null)
+ });
+}
+
+define.classMethod('count', {callback: true, promise:true});
+
+/**
+ * Close the cursor, sending a KillCursor command and emitting close.
+ * @method
+ * @param {Cursor~resultCallback} [callback] The result callback.
+ * @return {Promise} returns Promise if no callback passed
+ */
+Cursor.prototype.close = function(callback) {
+ this.s.state = Cursor.CLOSED;
+ // Kill the cursor
+ this.kill();
+ // Emit the close event for the cursor
+ this.emit('close');
+ // Callback if provided
+ if(typeof callback == 'function') return handleCallback(callback, null, this);
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve) {
+ resolve();
+ });
+}
+
+define.classMethod('close', {callback: true, promise:true});
+
+/**
+ * Map all documents using the provided function
+ * @method
+ * @param {function} [transform] The mapping transformation method.
+ * @return {Cursor}
+ */
+Cursor.prototype.map = function(transform) {
+ this.cursorState.transforms = { doc: transform };
+ return this;
+}
+
+define.classMethod('map', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Is the cursor closed
+ * @method
+ * @return {boolean}
+ */
+Cursor.prototype.isClosed = function() {
+ return this.isDead();
+}
+
+define.classMethod('isClosed', {callback: false, promise:false, returns: [Boolean]});
+
+Cursor.prototype.destroy = function(err) {
+ if(err) this.emit('error', err);
+ this.pause();
+ this.close();
+}
+
+define.classMethod('destroy', {callback: false, promise:false});
+
+/**
+ * Return a modified Readable stream including a possible transform method.
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {function} [options.transform=null] A transformation method applied to each document emitted by the stream.
+ * @return {Cursor}
+ */
+Cursor.prototype.stream = function(options) {
+ this.s.streamOptions = options || {};
+ return this;
+}
+
+define.classMethod('stream', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Execute the explain for the cursor
+ * @method
+ * @param {Cursor~resultCallback} [callback] The result callback.
+ * @return {Promise} returns Promise if no callback passed
+ */
+Cursor.prototype.explain = function(callback) {
+ var self = this;
+ this.s.cmd.explain = true;
+
+ // Do we have a readConcern
+ if(this.s.cmd.readConcern) {
+ delete this.s.cmd['readConcern'];
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return this._next(callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self._next(function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('explain', {callback: true, promise:true});
+
+Cursor.prototype._read = function() {
+ var self = this;
+ if(self.s.state == Cursor.CLOSED || self.isDead()) {
+ return self.push(null);
+ }
+
+ // Get the next item
+ self.nextObject(function(err, result) {
+ if(err) {
+ if(self.listeners('error') && self.listeners('error').length > 0) {
+ self.emit('error', err);
+ }
+ if(!self.isDead()) self.close();
+
+ // Emit end event
+ self.emit('end');
+ return self.emit('finish');
+ }
+
+ // If we provided a transformation method
+ if(typeof self.s.streamOptions.transform == 'function' && result != null) {
+ return self.push(self.s.streamOptions.transform(result));
+ }
+
+ // If we provided a map function
+ if(self.cursorState.transforms && typeof self.cursorState.transforms.doc == 'function' && result != null) {
+ return self.push(self.cursorState.transforms.doc(result));
+ }
+
+ // Return the result
+ self.push(result);
+ });
+}
+
+Object.defineProperty(Cursor.prototype, 'readPreference', {
+ enumerable:true,
+ get: function() {
+ if (!this || !this.s) {
+ return null;
+ }
+
+ return this.s.options.readPreference;
+ }
+});
+
+Object.defineProperty(Cursor.prototype, 'namespace', {
+ enumerable: true,
+ get: function() {
+ if (!this || !this.s) {
+ return null;
+ }
+
+ // TODO: refactor this logic into core
+ var ns = this.s.ns || '';
+ var firstDot = ns.indexOf('.');
+ if (firstDot < 0) {
+ return {
+ database: this.s.ns,
+ collection: ''
+ };
+ }
+ return {
+ database: ns.substr(0, firstDot),
+ collection: ns.substr(firstDot + 1)
+ };
+ }
+});
+
+/**
+ * The read() method pulls some data out of the internal buffer and returns it. If there is no data available, then it will return null.
+ * @function external:Readable#read
+ * @param {number} size Optional argument to specify how much data to read.
+ * @return {(String | Buffer | null)}
+ */
+
+/**
+ * Call this function to cause the stream to return strings of the specified encoding instead of Buffer objects.
+ * @function external:Readable#setEncoding
+ * @param {string} encoding The encoding to use.
+ * @return {null}
+ */
+
+/**
+ * This method will cause the readable stream to resume emitting data events.
+ * @function external:Readable#resume
+ * @return {null}
+ */
+
+/**
+ * This method will cause a stream in flowing-mode to stop emitting data events. Any data that becomes available will remain in the internal buffer.
+ * @function external:Readable#pause
+ * @return {null}
+ */
+
+/**
+ * This method pulls all the data out of a readable stream, and writes it to the supplied destination, automatically managing the flow so that the destination is not overwhelmed by a fast readable stream.
+ * @function external:Readable#pipe
+ * @param {Writable} destination The destination for writing data
+ * @param {object} [options] Pipe options
+ * @return {null}
+ */
+
+/**
+ * This method will remove the hooks set up for a previous pipe() call.
+ * @function external:Readable#unpipe
+ * @param {Writable} [destination] The destination for writing data
+ * @return {null}
+ */
+
+/**
+ * This is useful in certain cases where a stream is being consumed by a parser, which needs to "un-consume" some data that it has optimistically pulled out of the source, so that the stream can be passed on to some other party.
+ * @function external:Readable#unshift
+ * @param {(Buffer|string)} chunk Chunk of data to unshift onto the read queue.
+ * @return {null}
+ */
+
+/**
+ * Versions of Node prior to v0.10 had streams that did not implement the entire Streams API as it is today. (See "Compatibility" below for more information.)
+ * @function external:Readable#wrap
+ * @param {Stream} stream An "old style" readable stream.
+ * @return {null}
+ */
+
+Cursor.INIT = 0;
+Cursor.OPEN = 1;
+Cursor.CLOSED = 2;
+Cursor.GET_MORE = 3;
+
+module.exports = Cursor;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/db.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/db.js
new file mode 100644
index 0000000..c4d30b2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/db.js
@@ -0,0 +1,1881 @@
+"use strict";
+
+var EventEmitter = require('events').EventEmitter
+ , inherits = require('util').inherits
+ , getSingleProperty = require('./utils').getSingleProperty
+ , shallowClone = require('./utils').shallowClone
+ , parseIndexOptions = require('./utils').parseIndexOptions
+ , debugOptions = require('./utils').debugOptions
+ , CommandCursor = require('./command_cursor')
+ , handleCallback = require('./utils').handleCallback
+ , filterOptions = require('./utils').filterOptions
+ , toError = require('./utils').toError
+ , ReadPreference = require('./read_preference')
+ , f = require('util').format
+ , Admin = require('./admin')
+ , Code = require('mongodb-core').BSON.Code
+ , CoreReadPreference = require('mongodb-core').ReadPreference
+ , MongoError = require('mongodb-core').MongoError
+ , ObjectID = require('mongodb-core').ObjectID
+ , Define = require('./metadata')
+ , Logger = require('mongodb-core').Logger
+ , Collection = require('./collection')
+ , crypto = require('crypto')
+ , assign = require('./utils').assign;
+
+var debugFields = ['authSource', 'w', 'wtimeout', 'j', 'native_parser', 'forceServerObjectId'
+ , 'serializeFunctions', 'raw', 'promoteLongs', 'promoteValues', 'promoteBuffers', 'bufferMaxEntries', 'numberOfRetries', 'retryMiliSeconds'
+ , 'readPreference', 'pkFactory', 'parentDb', 'promiseLibrary', 'noListener'];
+
+// Filter out any write concern options
+var illegalCommandFields = ['w', 'wtimeout', 'j', 'fsync', 'autoIndexId'
+ , 'strict', 'serializeFunctions', 'pkFactory', 'raw', 'readPreference'];
+
+/**
+ * @fileOverview The **Db** class is a class that represents a MongoDB Database.
+ *
+ * @example
+ * var MongoClient = require('mongodb').MongoClient,
+ * test = require('assert');
+ * // Connection url
+ * var url = 'mongodb://localhost:27017/test';
+ * // Connect using MongoClient
+ * MongoClient.connect(url, function(err, db) {
+ * // Get an additional db
+ * var testDb = db.db('test');
+ * db.close();
+ * });
+ */
+
+// Allowed parameters
+var legalOptionNames = ['w', 'wtimeout', 'fsync', 'j', 'readPreference', 'readPreferenceTags', 'native_parser'
+ , 'forceServerObjectId', 'pkFactory', 'serializeFunctions', 'raw', 'bufferMaxEntries', 'authSource'
+ , 'ignoreUndefined', 'promoteLongs', 'promiseLibrary', 'readConcern', 'retryMiliSeconds', 'numberOfRetries'
+ , 'parentDb', 'noListener', 'loggerLevel', 'logger', 'promoteBuffers', 'promoteLongs', 'promoteValues'];
+
+/**
+ * Creates a new Db instance
+ * @class
+ * @param {string} databaseName The name of the database this instance represents.
+ * @param {(Server|ReplSet|Mongos)} topology The server topology for the database.
+ * @param {object} [options=null] Optional settings.
+ * @param {string} [options.authSource=null] If the database authentication is dependent on another databaseName.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.forceServerObjectId=false] Force server to assign _id values instead of driver.
+ * @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {boolean} [options.raw=false] Return document results as raw BSON buffers.
+ * @param {boolean} [options.promoteLongs=true] Promotes Long values to number if they fit inside the 53 bits resolution.
+ * @param {boolean} [options.promoteBuffers=false] Promotes Binary BSON values to native Node Buffers.
+ * @param {boolean} [options.promoteValues=true] Promotes BSON values to native types where possible, set to false to only receive wrapper types.
+ * @param {number} [options.bufferMaxEntries=-1] Sets a cap on how many operations the driver will buffer up before giving up on getting a working connection, default is -1 which is unlimited.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {object} [options.pkFactory=null] A primary key factory object for generation of custom _id keys.
+ * @param {object} [options.promiseLibrary=null] A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible
+ * @param {object} [options.readConcern=null] Specify a read concern for the collection. (only MongoDB 3.2 or higher supported)
+ * @param {object} [options.readConcern.level='local'] Specify a read concern level for the collection operations, one of [local|majority]. (only MongoDB 3.2 or higher supported)
+ * @property {(Server|ReplSet|Mongos)} serverConfig Get the current db topology.
+ * @property {number} bufferMaxEntries Current bufferMaxEntries value for the database
+ * @property {string} databaseName The name of the database this instance represents.
+ * @property {object} options The options associated with the db instance.
+ * @property {boolean} native_parser The current value of the parameter native_parser.
+ * @property {boolean} slaveOk The current slaveOk value for the db instance.
+ * @property {object} writeConcern The current write concern values.
+ * @property {object} topology Access the topology object (single server, replicaset or mongos).
+ * @fires Db#close
+ * @fires Db#authenticated
+ * @fires Db#reconnect
+ * @fires Db#error
+ * @fires Db#timeout
+ * @fires Db#parseError
+ * @fires Db#fullsetup
+ * @return {Db} a Db instance.
+ */
+var Db = function(databaseName, topology, options) {
+ options = options || {};
+ if(!(this instanceof Db)) return new Db(databaseName, topology, options);
+ EventEmitter.call(this);
+ var self = this;
+
+ // Get the promiseLibrary
+ var promiseLibrary = options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // Filter the options
+ options = filterOptions(options, legalOptionNames);
+
+ // Ensure we put the promiseLib in the options
+ options.promiseLibrary = promiseLibrary;
+
+ // var self = this; // Internal state of the db object
+ this.s = {
+ // Database name
+ databaseName: databaseName
+ // DbCache
+ , dbCache: {}
+ // Children db's
+ , children: []
+ // Topology
+ , topology: topology
+ // Options
+ , options: options
+ // Logger instance
+ , logger: Logger('Db', options)
+ // Get the bson parser
+ , bson: topology ? topology.bson : null
+ // Authsource if any
+ , authSource: options.authSource
+ // Unpack read preference
+ , readPreference: options.readPreference
+ // Set buffermaxEntries
+ , bufferMaxEntries: typeof options.bufferMaxEntries == 'number' ? options.bufferMaxEntries : -1
+ // Parent db (if chained)
+ , parentDb: options.parentDb || null
+ // Set up the primary key factory or fallback to ObjectID
+ , pkFactory: options.pkFactory || ObjectID
+ // Get native parser
+ , nativeParser: options.nativeParser || options.native_parser
+ // Promise library
+ , promiseLibrary: promiseLibrary
+ // No listener
+ , noListener: typeof options.noListener == 'boolean' ? options.noListener : false
+ // ReadConcern
+ , readConcern: options.readConcern
+ }
+
+ // Ensure we have a valid db name
+ validateDatabaseName(self.s.databaseName);
+
+ // Add a read Only property
+ getSingleProperty(this, 'serverConfig', self.s.topology);
+ getSingleProperty(this, 'bufferMaxEntries', self.s.bufferMaxEntries);
+ getSingleProperty(this, 'databaseName', self.s.databaseName);
+
+ // This is a child db, do not register any listeners
+ if(options.parentDb) return;
+ if(this.s.noListener) return;
+
+ // Add listeners
+ topology.on('error', createListener(self, 'error', self));
+ topology.on('timeout', createListener(self, 'timeout', self));
+ topology.on('close', createListener(self, 'close', self));
+ topology.on('parseError', createListener(self, 'parseError', self));
+ topology.once('open', createListener(self, 'open', self));
+ topology.once('fullsetup', createListener(self, 'fullsetup', self));
+ topology.once('all', createListener(self, 'all', self));
+ topology.on('reconnect', createListener(self, 'reconnect', self));
+}
+
+inherits(Db, EventEmitter);
+
+var define = Db.define = new Define('Db', Db, false);
+
+// Topology
+Object.defineProperty(Db.prototype, 'topology', {
+ enumerable:true,
+ get: function() { return this.s.topology; }
+});
+
+// Options
+Object.defineProperty(Db.prototype, 'options', {
+ enumerable:true,
+ get: function() { return this.s.options; }
+});
+
+// slaveOk specified
+Object.defineProperty(Db.prototype, 'slaveOk', {
+ enumerable:true,
+ get: function() {
+ if(this.s.options.readPreference != null
+ && (this.s.options.readPreference != 'primary' || this.s.options.readPreference.mode != 'primary')) {
+ return true;
+ }
+ return false;
+ }
+});
+
+// get the write Concern
+Object.defineProperty(Db.prototype, 'writeConcern', {
+ enumerable:true,
+ get: function() {
+ var ops = {};
+ if(this.s.options.w != null) ops.w = this.s.options.w;
+ if(this.s.options.j != null) ops.j = this.s.options.j;
+ if(this.s.options.fsync != null) ops.fsync = this.s.options.fsync;
+ if(this.s.options.wtimeout != null) ops.wtimeout = this.s.options.wtimeout;
+ return ops;
+ }
+});
+
+/**
+ * The callback format for the Db.open method
+ * @callback Db~openCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Db} db The Db instance if the open method was successful.
+ */
+
+// Internal method
+var open = function(self, callback) {
+ self.s.topology.connect(self, self.s.options, function(err) {
+ if(callback == null) return;
+ var internalCallback = callback;
+ callback == null;
+
+ if(err) {
+ self.close();
+ return internalCallback(err);
+ }
+
+ internalCallback(null, self);
+ });
+}
+
+/**
+ * Open the database
+ * @method
+ * @param {Db~openCallback} [callback] Callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.open = function(callback) {
+ var self = this;
+ // We provided a callback leg
+ if(typeof callback == 'function') return open(self, callback);
+ // Return promise
+ return new self.s.promiseLibrary(function(resolve, reject) {
+ open(self, function(err, db) {
+ if(err) return reject(err);
+ resolve(db);
+ })
+ });
+}
+
+define.classMethod('open', {callback: true, promise:true});
+
+/**
+ * Converts provided read preference to CoreReadPreference
+ * @param {(ReadPreference|string|object)} readPreference the user provided read preference
+ * @return {CoreReadPreference}
+ */
+var convertReadPreference = function(readPreference) {
+ if(readPreference && typeof readPreference == 'string') {
+ return new CoreReadPreference(readPreference);
+ } else if(readPreference instanceof ReadPreference) {
+ return new CoreReadPreference(readPreference.mode, readPreference.tags, {maxStalenessSeconds: readPreference.maxStalenessSeconds});
+ } else if(readPreference && typeof readPreference == 'object') {
+ var mode = readPreference.mode || readPreference.preference;
+ if (mode && typeof mode == 'string') {
+ readPreference = new CoreReadPreference(mode, readPreference.tags, {maxStalenessSeconds: readPreference.maxStalenessSeconds});
+ }
+ }
+ return readPreference;
+}
+
+/**
+ * The callback format for results
+ * @callback Db~resultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {object} result The result object if the command was executed successfully.
+ */
+
+var executeCommand = function(self, command, options, callback) {
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+ // Get the db name we are executing against
+ var dbName = options.dbName || options.authdb || self.s.databaseName;
+
+ // If we have a readPreference set
+ if(options.readPreference == null && self.s.readPreference) {
+ options.readPreference = self.s.readPreference;
+ }
+
+ // Convert the readPreference if its not a write
+ if(options.readPreference) {
+ options.readPreference = convertReadPreference(options.readPreference);
+ } else {
+ options.readPreference = CoreReadPreference.primary;
+ }
+
+ // Debug information
+ if(self.s.logger.isDebug()) self.s.logger.debug(f('executing command %s against %s with options [%s]'
+ , JSON.stringify(command), f('%s.$cmd', dbName), JSON.stringify(debugOptions(debugFields, options))));
+
+ // Execute command
+ self.s.topology.command(f('%s.$cmd', dbName), command, options, function(err, result) {
+ if(err) return handleCallback(callback, err);
+ if(options.full) return handleCallback(callback, null, result);
+ handleCallback(callback, null, result.result);
+ });
+}
+
+/**
+ * Execute a command
+ * @method
+ * @param {object} command The command hash
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {Db~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.command = function(command, options, callback) {
+ var self = this;
+ // Change the callback
+ if(typeof options == 'function') callback = options, options = {};
+ // Clone the options
+ options = shallowClone(options);
+
+ // Do we have a callback
+ if(typeof callback == 'function') return executeCommand(self, command, options, callback);
+ // Return a promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ executeCommand(self, command, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('command', {callback: true, promise:true});
+
+/**
+ * The callback format for results
+ * @callback Db~noResultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {null} result Is not set to a value
+ */
+
+/**
+ * Close the db and its underlying connections
+ * @method
+ * @param {boolean} force Force close, emitting no events
+ * @param {Db~noResultCallback} [callback] The result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.close = function(force, callback) {
+ if(typeof force == 'function') callback = force, force = false;
+ this.s.topology.close(force);
+ var self = this;
+
+ // Fire close event if any listeners
+ if(this.listeners('close').length > 0) {
+ this.emit('close');
+
+ // If it's the top level db emit close on all children
+ if(this.parentDb == null) {
+ // Fire close on all children
+ for(var i = 0; i < this.s.children.length; i++) {
+ this.s.children[i].emit('close');
+ }
+ }
+
+ // Remove listeners after emit
+ self.removeAllListeners('close');
+ }
+
+ // Close parent db if set
+ if(this.s.parentDb) this.s.parentDb.close();
+ // Callback after next event loop tick
+ if(typeof callback == 'function') return process.nextTick(function() {
+ handleCallback(callback, null);
+ })
+
+ // Return dummy promise
+ return new this.s.promiseLibrary(function(resolve) {
+ resolve();
+ });
+}
+
+define.classMethod('close', {callback: true, promise:true});
+
+/**
+ * Return the Admin db instance
+ * @method
+ * @return {Admin} return the new Admin db instance
+ */
+Db.prototype.admin = function() {
+ return new Admin(this, this.s.topology, this.s.promiseLibrary);
+};
+
+define.classMethod('admin', {callback: false, promise:false, returns: [Admin]});
+
+/**
+ * The callback format for the collection method, must be used if strict is specified
+ * @callback Db~collectionResultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Collection} collection The collection instance.
+ */
+
+/**
+ * Fetch a specific collection (containing the actual collection information). If the application does not use strict mode you can
+ * can use it without a callback in the following way: `var collection = db.collection('mycollection');`
+ *
+ * @method
+ * @param {string} name the collection name we wish to access.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.raw=false] Return document results as raw BSON buffers.
+ * @param {object} [options.pkFactory=null] A primary key factory object for generation of custom _id keys.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
+ * @param {boolean} [options.strict=false] Returns an error if the collection does not exist
+ * @param {object} [options.readConcern=null] Specify a read concern for the collection. (only MongoDB 3.2 or higher supported)
+ * @param {object} [options.readConcern.level='local'] Specify a read concern level for the collection operations, one of [local|majority]. (only MongoDB 3.2 or higher supported)
+ * @param {Db~collectionResultCallback} callback The collection result callback
+ * @return {Collection} return the new Collection instance if not in strict mode
+ */
+Db.prototype.collection = function(name, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+ options = shallowClone(options);
+ // Set the promise library
+ options.promiseLibrary = this.s.promiseLibrary;
+
+ // If we have not set a collection level readConcern set the db level one
+ options.readConcern = options.readConcern || this.s.readConcern;
+
+ // Do we have ignoreUndefined set
+ if(this.s.options.ignoreUndefined) {
+ options.ignoreUndefined = this.s.options.ignoreUndefined;
+ }
+
+ // Execute
+ if(options == null || !options.strict) {
+ try {
+ var collection = new Collection(this, this.s.topology, this.s.databaseName, name, this.s.pkFactory, options);
+ if(callback) callback(null, collection);
+ return collection;
+ } catch(err) {
+ if(callback) return callback(err);
+ throw err;
+ }
+ }
+
+ // Strict mode
+ if(typeof callback != 'function') {
+ throw toError(f("A callback is required in strict mode. While getting collection %s.", name));
+ }
+
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) {
+ return callback(new MongoError('topology was destroyed'));
+ }
+
+ // Strict mode
+ this.listCollections({name:name}).toArray(function(err, collections) {
+ if(err != null) return handleCallback(callback, err, null);
+ if(collections.length == 0) return handleCallback(callback, toError(f("Collection %s does not exist. Currently in strict mode.", name)), null);
+
+ try {
+ return handleCallback(callback, null, new Collection(self, self.s.topology, self.s.databaseName, name, self.s.pkFactory, options));
+ } catch(err) {
+ return handleCallback(callback, err, null);
+ }
+ });
+}
+
+define.classMethod('collection', {callback: true, promise:false, returns: [Collection]});
+
+function decorateWithWriteConcern(command, self, options) {
+ // Do we support write concerns 3.4 and higher
+ if(self.s.topology.capabilities().commandsTakeWriteConcern) {
+ // Get the write concern settings
+ var finalOptions = writeConcern(shallowClone(options), self, options);
+ // Add the write concern to the command
+ if(finalOptions.writeConcern) {
+ command.writeConcern = finalOptions.writeConcern;
+ }
+ }
+}
+
+var createCollection = function(self, name, options, callback) {
+ // Get the write concern options
+ var finalOptions = writeConcern(shallowClone(options), self, options);
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+ // Check if we have the name
+ self.listCollections({name: name})
+ .setReadPreference(ReadPreference.PRIMARY)
+ .toArray(function(err, collections) {
+ if(err != null) return handleCallback(callback, err, null);
+ if(collections.length > 0 && finalOptions.strict) {
+ return handleCallback(callback, MongoError.create({message: f("Collection %s already exists. Currently in strict mode.", name), driver:true}), null);
+ } else if (collections.length > 0) {
+ try { return handleCallback(callback, null, new Collection(self, self.s.topology, self.s.databaseName, name, self.s.pkFactory, options)); }
+ catch(err) { return handleCallback(callback, err); }
+ }
+
+ // Create collection command
+ var cmd = {'create':name};
+
+ // Decorate command with writeConcern if supported
+ decorateWithWriteConcern(cmd, self, options);
+ // Add all optional parameters
+ for(var n in options) {
+ if(options[n] != null
+ && typeof options[n] != 'function' && illegalCommandFields.indexOf(n) == -1) {
+ cmd[n] = options[n];
+ }
+ }
+
+ // Force a primary read Preference
+ finalOptions.readPreference = ReadPreference.PRIMARY;
+
+ // Execute command
+ self.command(cmd, finalOptions, function(err) {
+ if(err) return handleCallback(callback, err);
+ handleCallback(callback, null, new Collection(self, self.s.topology, self.s.databaseName, name, self.s.pkFactory, options));
+ });
+ });
+}
+
+/**
+ * Create a new collection on a server with the specified options. Use this to create capped collections.
+ *
+ * @method
+ * @param {string} name the collection name we wish to access.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.raw=false] Return document results as raw BSON buffers.
+ * @param {object} [options.pkFactory=null] A primary key factory object for generation of custom _id keys.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
+ * @param {boolean} [options.strict=false] Returns an error if the collection does not exist
+ * @param {boolean} [options.capped=false] Create a capped collection.
+ * @param {number} [options.size=null] The size of the capped collection in bytes.
+ * @param {number} [options.max=null] The maximum number of documents in the capped collection.
+ * @param {boolean} [options.autoIndexId=true] Create an index on the _id field of the document, True by default on MongoDB 2.2 or higher off for version < 2.2.
+ * @param {object} [options.collation=null] Specify collation (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields).
+ * @param {Db~collectionResultCallback} [callback] The results callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.createCollection = function(name, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 0);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ name = args.length ? args.shift() : null;
+ options = args.length ? args.shift() || {} : {};
+
+ // Do we have a promisesLibrary
+ options.promiseLibrary = options.promiseLibrary || this.s.promiseLibrary;
+
+ // Check if the callback is in fact a string
+ if(typeof callback == 'string') name = callback;
+
+ // Execute the fallback callback
+ if(typeof callback == 'function') return createCollection(self, name, options, callback);
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ createCollection(self, name, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('createCollection', {callback: true, promise:true});
+
+/**
+ * Get all the db statistics.
+ *
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {number} [options.scale=null] Divide the returned sizes by scale value.
+ * @param {Db~resultCallback} [callback] The collection result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.stats = function(options, callback) {
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+ // Build command object
+ var commandObject = { dbStats:true };
+ // Check if we have the scale value
+ if(options['scale'] != null) commandObject['scale'] = options['scale'];
+
+ // If we have a readPreference set
+ if(options.readPreference == null && this.s.readPreference) {
+ options.readPreference = this.s.readPreference;
+ }
+
+ // Execute the command
+ return this.command(commandObject, options, callback);
+}
+
+define.classMethod('stats', {callback: true, promise:true});
+
+// Transformation methods for cursor results
+var listCollectionsTranforms = function(databaseName) {
+ var matching = f('%s.', databaseName);
+
+ return {
+ doc: function(doc) {
+ var index = doc.name.indexOf(matching);
+ // Remove database name if available
+ if(doc.name && index == 0) {
+ doc.name = doc.name.substr(index + matching.length);
+ }
+
+ return doc;
+ }
+ }
+}
+
+/**
+ * Get the list of all collection information for the specified db.
+ *
+ * @method
+ * @param {object} filter Query to filter collections by
+ * @param {object} [options=null] Optional settings.
+ * @param {number} [options.batchSize=null] The batchSize for the returned command cursor or if pre 2.8 the systems batch collection
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @return {CommandCursor}
+ */
+Db.prototype.listCollections = function(filter, options) {
+ filter = filter || {};
+ options = options || {};
+
+ // Shallow clone the object
+ options = shallowClone(options);
+ // Set the promise library
+ options.promiseLibrary = this.s.promiseLibrary;
+
+ // Ensure valid readPreference
+ if(options.readPreference) {
+ options.readPreference = convertReadPreference(options.readPreference);
+ }
+
+ // We have a list collections command
+ if(this.serverConfig.capabilities().hasListCollectionsCommand) {
+ // Cursor options
+ var cursor = options.batchSize ? {batchSize: options.batchSize} : {}
+ // Build the command
+ var command = { listCollections : true, filter: filter, cursor: cursor };
+ // Set the AggregationCursor constructor
+ options.cursorFactory = CommandCursor;
+ // Create the cursor
+ cursor = this.s.topology.cursor(f('%s.$cmd', this.s.databaseName), command, options);
+ // Do we have a readPreference, apply it
+ if(options.readPreference) {
+ cursor.setReadPreference(options.readPreference);
+ }
+ // Return the cursor
+ return cursor;
+ }
+
+ // We cannot use the listCollectionsCommand
+ if(!this.serverConfig.capabilities().hasListCollectionsCommand) {
+ // If we have legacy mode and have not provided a full db name filter it
+ if(typeof filter.name == 'string' && !(new RegExp('^' + this.databaseName + '\\.').test(filter.name))) {
+ filter = shallowClone(filter);
+ filter.name = f('%s.%s', this.s.databaseName, filter.name);
+ }
+ }
+
+ // No filter, filter by current database
+ if(filter == null) {
+ filter.name = f('/%s/', this.s.databaseName);
+ }
+
+ // Rewrite the filter to use $and to filter out indexes
+ if(filter.name) {
+ filter = {$and: [{name: filter.name}, {name:/^((?!\$).)*$/}]};
+ } else {
+ filter = {name:/^((?!\$).)*$/};
+ }
+
+ // Return options
+ var _options = {transforms: listCollectionsTranforms(this.s.databaseName)}
+ // Get the cursor
+ cursor = this.collection(Db.SYSTEM_NAMESPACE_COLLECTION).find(filter, _options);
+ // Do we have a readPreference, apply it
+ if(options.readPreference) cursor.setReadPreference(options.readPreference);
+ // Set the passed in batch size if one was provided
+ if(options.batchSize) cursor = cursor.batchSize(options.batchSize);
+ // We have a fallback mode using legacy systems collections
+ return cursor;
+};
+
+define.classMethod('listCollections', {callback: false, promise:false, returns: [CommandCursor]});
+
+var evaluate = function(self, code, parameters, options, callback) {
+ var finalCode = code;
+ var finalParameters = [];
+
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+
+ // If not a code object translate to one
+ if(!(finalCode && finalCode._bsontype == 'Code')) finalCode = new Code(finalCode);
+ // Ensure the parameters are correct
+ if(parameters != null && !Array.isArray(parameters) && typeof parameters !== 'function') {
+ finalParameters = [parameters];
+ } else if(parameters != null && Array.isArray(parameters) && typeof parameters !== 'function') {
+ finalParameters = parameters;
+ }
+
+ // Create execution selector
+ var cmd = {'$eval':finalCode, 'args':finalParameters};
+ // Check if the nolock parameter is passed in
+ if(options['nolock']) {
+ cmd['nolock'] = options['nolock'];
+ }
+
+ // Set primary read preference
+ options.readPreference = new CoreReadPreference(ReadPreference.PRIMARY);
+
+ // Execute the command
+ self.command(cmd, options, function(err, result) {
+ if(err) return handleCallback(callback, err, null);
+ if(result && result.ok == 1) return handleCallback(callback, null, result.retval);
+ if(result) return handleCallback(callback, MongoError.create({message: f("eval failed: %s", result.errmsg), driver:true}), null);
+ handleCallback(callback, err, result);
+ });
+}
+
+/**
+ * Evaluate JavaScript on the server
+ *
+ * @method
+ * @param {Code} code JavaScript to execute on server.
+ * @param {(object|array)} parameters The parameters for the call.
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.nolock=false] Tell MongoDB not to block on the evaulation of the javascript.
+ * @param {Db~resultCallback} [callback] The results callback
+ * @deprecated Eval is deprecated on MongoDB 3.2 and forward
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.eval = function(code, parameters, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ parameters = args.length ? args.shift() : parameters;
+ options = args.length ? args.shift() || {} : {};
+
+ // Check if the callback is in fact a string
+ if(typeof callback == 'function') return evaluate(self, code, parameters, options, callback);
+ // Execute the command
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ evaluate(self, code, parameters, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+define.classMethod('eval', {callback: true, promise:true});
+
+/**
+ * Rename a collection.
+ *
+ * @method
+ * @param {string} fromCollection Name of current collection to rename.
+ * @param {string} toCollection New name of of the collection.
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.dropTarget=false] Drop the target name collection if it previously exists.
+ * @param {Db~collectionResultCallback} [callback] The results callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.renameCollection = function(fromCollection, toCollection, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+ // Add return new collection
+ options.new_collection = true;
+
+ // Check if the callback is in fact a string
+ if(typeof callback == 'function') {
+ return this.collection(fromCollection).rename(toCollection, options, callback);
+ }
+
+ // Return a promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.collection(fromCollection).rename(toCollection, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+define.classMethod('renameCollection', {callback: true, promise:true});
+
+/**
+ * Drop a collection from the database, removing it permanently. New accesses will create a new collection.
+ *
+ * @method
+ * @param {string} name Name of collection to drop
+ * @param {Db~resultCallback} [callback] The results callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.dropCollection = function(name, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // Command to execute
+ var cmd = {'drop':name}
+
+ // Decorate with write concern
+ decorateWithWriteConcern(cmd, self, options);
+
+ // options
+ options = assign({}, this.s.options, {readPreference: ReadPreference.PRIMARY});
+
+ // Check if the callback is in fact a string
+ if(typeof callback == 'function') return this.command(cmd, options, function(err, result) {
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+ if(err) return handleCallback(callback, err);
+ if(result.ok) return handleCallback(callback, null, true);
+ handleCallback(callback, null, false);
+ });
+
+ // Clone the options
+ options = shallowClone(self.s.options);
+ // Set readPreference PRIMARY
+ options.readPreference = ReadPreference.PRIMARY;
+
+ // Execute the command
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ // Execute command
+ self.command(cmd, options, function(err, result) {
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return reject(new MongoError('topology was destroyed'));
+ if(err) return reject(err);
+ if(result.ok) return resolve(true);
+ resolve(false);
+ });
+ });
+};
+
+define.classMethod('dropCollection', {callback: true, promise:true});
+
+/**
+ * Drop a database, removing it permanently from the server.
+ *
+ * @method
+ * @param {Db~resultCallback} [callback] The results callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.dropDatabase = function(options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+ // Drop database command
+ var cmd = {'dropDatabase':1};
+
+ // Decorate with write concern
+ decorateWithWriteConcern(cmd, self, options);
+
+ // Ensure primary only
+ options = assign({}, this.s.options, {readPreference: ReadPreference.PRIMARY});
+
+ // Check if the callback is in fact a string
+ if(typeof callback == 'function') return this.command(cmd, options, function(err, result) {
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+ if(callback == null) return;
+ if(err) return handleCallback(callback, err, null);
+ handleCallback(callback, null, result.ok ? true : false);
+ });
+
+ // Execute the command
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ // Execute command
+ self.command(cmd, options, function(err, result) {
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return reject(new MongoError('topology was destroyed'));
+ if(err) return reject(err);
+ if(result.ok) return resolve(true);
+ resolve(false);
+ });
+ });
+}
+
+define.classMethod('dropDatabase', {callback: true, promise:true});
+
+/**
+ * The callback format for the collections method.
+ * @callback Db~collectionsResultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Collection[]} collections An array of all the collections objects for the db instance.
+ */
+var collections = function(self, callback) {
+ // Let's get the collection names
+ self.listCollections().toArray(function(err, documents) {
+ if(err != null) return handleCallback(callback, err, null);
+ // Filter collections removing any illegal ones
+ documents = documents.filter(function(doc) {
+ return doc.name.indexOf('$') == -1;
+ });
+
+ // Return the collection objects
+ handleCallback(callback, null, documents.map(function(d) {
+ return new Collection(self, self.s.topology, self.s.databaseName, d.name.replace(self.s.databaseName + ".", ''), self.s.pkFactory, self.s.options);
+ }));
+ });
+}
+
+/**
+ * Fetch all collections for the current db.
+ *
+ * @method
+ * @param {Db~collectionsResultCallback} [callback] The results callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.collections = function(callback) {
+ var self = this;
+
+ // Return the callback
+ if(typeof callback == 'function') return collections(self, callback);
+ // Return the promise
+ return new self.s.promiseLibrary(function(resolve, reject) {
+ collections(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+define.classMethod('collections', {callback: true, promise:true});
+
+/**
+ * Runs a command on the database as admin.
+ * @method
+ * @param {object} command The command hash
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {Db~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.executeDbAdminCommand = function(selector, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // Return the callback
+ if(typeof callback == 'function') {
+ // Convert read preference
+ if(options.readPreference) {
+ options.readPreference = convertReadPreference(options.readPreference)
+ }
+
+ return self.s.topology.command('admin.$cmd', selector, options, function(err, result) {
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+ if(err) return handleCallback(callback, err);
+ handleCallback(callback, null, result.result);
+ });
+ }
+
+ // Return promise
+ return new self.s.promiseLibrary(function(resolve, reject) {
+ self.s.topology.command('admin.$cmd', selector, options, function(err, result) {
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return reject(new MongoError('topology was destroyed'));
+ if(err) return reject(err);
+ resolve(result.result);
+ });
+ });
+};
+
+define.classMethod('executeDbAdminCommand', {callback: true, promise:true});
+
+/**
+ * Creates an index on the db and collection collection.
+ * @method
+ * @param {string} name Name of the collection to create the index on.
+ * @param {(string|object)} fieldOrSpec Defines the index.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.unique=false] Creates an unique index.
+ * @param {boolean} [options.sparse=false] Creates a sparse index.
+ * @param {boolean} [options.background=false] Creates the index in the background, yielding whenever possible.
+ * @param {boolean} [options.dropDups=false] A unique index cannot be created on a key that has pre-existing duplicate values. If you would like to create the index anyway, keeping the first document the database indexes and deleting all subsequent documents that have duplicate value
+ * @param {number} [options.min=null] For geospatial indexes set the lower bound for the co-ordinates.
+ * @param {number} [options.max=null] For geospatial indexes set the high bound for the co-ordinates.
+ * @param {number} [options.v=null] Specify the format version of the indexes.
+ * @param {number} [options.expireAfterSeconds=null] Allows you to expire data on indexes applied to a data (MongoDB 2.2 or higher)
+ * @param {number} [options.name=null] Override the autogenerated index name (useful if the resulting name is larger than 128 bytes)
+ * @param {object} [options.partialFilterExpression=null] Creates a partial index based on the given filter object (MongoDB 3.2 or higher)
+ * @param {Db~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.createIndex = function(name, fieldOrSpec, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 2);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ options = args.length ? args.shift() || {} : {};
+ options = typeof callback === 'function' ? options : callback;
+ options = options == null ? {} : options;
+ // Shallow clone the options
+ options = shallowClone(options);
+ // Run only against primary
+ options.readPreference = ReadPreference.PRIMARY;
+
+ // If we have a callback fallback
+ if(typeof callback == 'function') return createIndex(self, name, fieldOrSpec, options, callback);
+ // Return a promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ createIndex(self, name, fieldOrSpec, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var createIndex = function(self, name, fieldOrSpec, options, callback) {
+ // Get the write concern options
+ var finalOptions = writeConcern({}, self, options);
+ // Ensure we have a callback
+ if(finalOptions.writeConcern && typeof callback != 'function') {
+ throw MongoError.create({message: "Cannot use a writeConcern without a provided callback", driver:true});
+ }
+
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+
+ // Attempt to run using createIndexes command
+ createIndexUsingCreateIndexes(self, name, fieldOrSpec, options, function(err, result) {
+ if(err == null) return handleCallback(callback, err, result);
+
+ // 67 = 'CannotCreateIndex' (malformed index options)
+ // 85 = 'IndexOptionsConflict' (index already exists with different options)
+ // 11000 = 'DuplicateKey' (couldn't build unique index because of dupes)
+ // These errors mean that the server recognized `createIndex` as a command
+ // and so we don't need to fallback to an insert.
+ if(err.code === 67 || err.code == 11000 || err.code === 85) {
+ return handleCallback(callback, err, result);
+ }
+
+ // Create command
+ var doc = createCreateIndexCommand(self, name, fieldOrSpec, options);
+ // Set no key checking
+ finalOptions.checkKeys = false;
+ // Insert document
+ self.s.topology.insert(f("%s.%s", self.s.databaseName, Db.SYSTEM_INDEX_COLLECTION), doc, finalOptions, function(err, result) {
+ if(callback == null) return;
+ if(err) return handleCallback(callback, err);
+ if(result == null) return handleCallback(callback, null, null);
+ if(result.result.writeErrors) return handleCallback(callback, MongoError.create(result.result.writeErrors[0]), null);
+ handleCallback(callback, null, doc.name);
+ });
+ });
+}
+
+define.classMethod('createIndex', {callback: true, promise:true});
+
+/**
+ * Ensures that an index exists, if it does not it creates it
+ * @method
+ * @deprecated since version 2.0
+ * @param {string} name The index name
+ * @param {(string|object)} fieldOrSpec Defines the index.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.unique=false] Creates an unique index.
+ * @param {boolean} [options.sparse=false] Creates a sparse index.
+ * @param {boolean} [options.background=false] Creates the index in the background, yielding whenever possible.
+ * @param {boolean} [options.dropDups=false] A unique index cannot be created on a key that has pre-existing duplicate values. If you would like to create the index anyway, keeping the first document the database indexes and deleting all subsequent documents that have duplicate value
+ * @param {number} [options.min=null] For geospatial indexes set the lower bound for the co-ordinates.
+ * @param {number} [options.max=null] For geospatial indexes set the high bound for the co-ordinates.
+ * @param {number} [options.v=null] Specify the format version of the indexes.
+ * @param {number} [options.expireAfterSeconds=null] Allows you to expire data on indexes applied to a data (MongoDB 2.2 or higher)
+ * @param {number} [options.name=null] Override the autogenerated index name (useful if the resulting name is larger than 128 bytes)
+ * @param {Db~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.ensureIndex = function(name, fieldOrSpec, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // If we have a callback fallback
+ if(typeof callback == 'function') return ensureIndex(self, name, fieldOrSpec, options, callback);
+
+ // Return a promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ ensureIndex(self, name, fieldOrSpec, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var ensureIndex = function(self, name, fieldOrSpec, options, callback) {
+ // Get the write concern options
+ var finalOptions = writeConcern({}, self, options);
+ // Create command
+ var selector = createCreateIndexCommand(self, name, fieldOrSpec, options);
+ var index_name = selector.name;
+
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+
+ // Check if the index allready exists
+ self.indexInformation(name, finalOptions, function(err, indexInformation) {
+ if(err != null && err.code != 26) return handleCallback(callback, err, null);
+ // If the index does not exist, create it
+ if(indexInformation == null || !indexInformation[index_name]) {
+ self.createIndex(name, fieldOrSpec, options, callback);
+ } else {
+ if(typeof callback === 'function') return handleCallback(callback, null, index_name);
+ }
+ });
+}
+
+define.classMethod('ensureIndex', {callback: true, promise:true});
+
+Db.prototype.addChild = function(db) {
+ if(this.s.parentDb) return this.s.parentDb.addChild(db);
+ this.s.children.push(db);
+}
+
+/**
+ * Create a new Db instance sharing the current socket connections. Be aware that the new db instances are
+ * related in a parent-child relationship to the original instance so that events are correctly emitted on child
+ * db instances. Child db instances are cached so performing db('db1') twice will return the same instance.
+ * You can control these behaviors with the options noListener and returnNonCachedInstance.
+ *
+ * @method
+ * @param {string} name The name of the database we want to use.
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.noListener=false] Do not make the db an event listener to the original connection.
+ * @param {boolean} [options.returnNonCachedInstance=false] Control if you want to return a cached instance or have a new one created
+ * @return {Db}
+ */
+Db.prototype.db = function(dbName, options) {
+ options = options || {};
+
+ // Copy the options and add out internal override of the not shared flag
+ var finalOptions = assign({}, this.options, options);
+
+ // Do we have the db in the cache already
+ if(this.s.dbCache[dbName] && finalOptions.returnNonCachedInstance !== true) {
+ return this.s.dbCache[dbName];
+ }
+
+ // Add current db as parentDb
+ if(finalOptions.noListener == null || finalOptions.noListener == false) {
+ finalOptions.parentDb = this;
+ }
+
+ // Add promiseLibrary
+ finalOptions.promiseLibrary = this.s.promiseLibrary;
+
+ // Return the db object
+ var db = new Db(dbName, this.s.topology, finalOptions)
+
+ // Add as child
+ if(finalOptions.noListener == null || finalOptions.noListener == false) {
+ this.addChild(db);
+ }
+
+ // Add the db to the cache
+ this.s.dbCache[dbName] = db;
+ // Return the database
+ return db;
+};
+
+define.classMethod('db', {callback: false, promise:false, returns: [Db]});
+
+var _executeAuthCreateUserCommand = function(self, username, password, options, callback) {
+ // Special case where there is no password ($external users)
+ if(typeof username == 'string'
+ && password != null && typeof password == 'object') {
+ options = password;
+ password = null;
+ }
+
+ // Unpack all options
+ if(typeof options == 'function') {
+ callback = options;
+ options = {};
+ }
+
+ // Error out if we digestPassword set
+ if(options.digestPassword != null) {
+ throw toError("The digestPassword option is not supported via add_user. Please use db.command('createUser', ...) instead for this option.");
+ }
+
+ // Get additional values
+ var customData = options.customData != null ? options.customData : {};
+ var roles = Array.isArray(options.roles) ? options.roles : [];
+ var maxTimeMS = typeof options.maxTimeMS == 'number' ? options.maxTimeMS : null;
+
+ // If not roles defined print deprecated message
+ if(roles.length == 0) {
+ console.log("Creating a user without roles is deprecated in MongoDB >= 2.6");
+ }
+
+ // Get the error options
+ var commandOptions = {writeCommand:true};
+ if(options['dbName']) commandOptions.dbName = options['dbName'];
+
+ // Add maxTimeMS to options if set
+ if(maxTimeMS != null) commandOptions.maxTimeMS = maxTimeMS;
+
+ // Check the db name and add roles if needed
+ if((self.databaseName.toLowerCase() == 'admin' || options.dbName == 'admin') && !Array.isArray(options.roles)) {
+ roles = ['root']
+ } else if(!Array.isArray(options.roles)) {
+ roles = ['dbOwner']
+ }
+
+ // Build the command to execute
+ var command = {
+ createUser: username
+ , customData: customData
+ , roles: roles
+ , digestPassword:false
+ }
+
+ // Apply write concern to command
+ command = writeConcern(command, self, options);
+
+ // Use node md5 generator
+ var md5 = crypto.createHash('md5');
+ // Generate keys used for authentication
+ md5.update(username + ":mongo:" + password);
+ var userPassword = md5.digest('hex');
+
+ // No password
+ if(typeof password == 'string') {
+ command.pwd = userPassword;
+ }
+
+ // Force write using primary
+ commandOptions.readPreference = ReadPreference.primary;
+
+ // Execute the command
+ self.command(command, commandOptions, function(err, result) {
+ if(err && err.ok == 0 && err.code == undefined) return handleCallback(callback, {code: -5000}, null);
+ if(err) return handleCallback(callback, err, null);
+ handleCallback(callback, !result.ok ? toError(result) : null
+ , result.ok ? [{user: username, pwd: ''}] : null);
+ })
+}
+
+var addUser = function(self, username, password, options, callback) {
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+ // Attempt to execute auth command
+ _executeAuthCreateUserCommand(self, username, password, options, function(err, r) {
+ // We need to perform the backward compatible insert operation
+ if(err && err.code == -5000) {
+ var finalOptions = writeConcern(shallowClone(options), self, options);
+ // Use node md5 generator
+ var md5 = crypto.createHash('md5');
+ // Generate keys used for authentication
+ md5.update(username + ":mongo:" + password);
+ var userPassword = md5.digest('hex');
+
+ // If we have another db set
+ var db = options.dbName ? self.db(options.dbName) : self;
+
+ // Fetch a user collection
+ var collection = db.collection(Db.SYSTEM_USER_COLLECTION);
+
+ // Check if we are inserting the first user
+ collection.count({}, function(err, count) {
+ // We got an error (f.ex not authorized)
+ if(err != null) return handleCallback(callback, err, null);
+ // Check if the user exists and update i
+ collection.find({user: username}, {dbName: options['dbName']}).toArray(function(err) {
+ // We got an error (f.ex not authorized)
+ if(err != null) return handleCallback(callback, err, null);
+ // Add command keys
+ finalOptions.upsert = true;
+
+ // We have a user, let's update the password or upsert if not
+ collection.update({user: username},{$set: {user: username, pwd: userPassword}}, finalOptions, function(err) {
+ if(count == 0 && err) return handleCallback(callback, null, [{user:username, pwd:userPassword}]);
+ if(err) return handleCallback(callback, err, null)
+ handleCallback(callback, null, [{user:username, pwd:userPassword}]);
+ });
+ });
+ });
+
+ return;
+ }
+
+ if(err) return handleCallback(callback, err);
+ handleCallback(callback, err, r);
+ });
+}
+
+/**
+ * Add a user to the database.
+ * @method
+ * @param {string} username The username.
+ * @param {string} password The password.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {object} [options.customData=null] Custom data associated with the user (only Mongodb 2.6 or higher)
+ * @param {object[]} [options.roles=null] Roles associated with the created user (only Mongodb 2.6 or higher)
+ * @param {Db~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.addUser = function(username, password, options, callback) {
+ // Unpack the parameters
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 2);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ options = args.length ? args.shift() || {} : {};
+
+ // If we have a callback fallback
+ if(typeof callback == 'function') return addUser(self, username, password, options, callback);
+
+ // Return a promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ addUser(self, username, password, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+define.classMethod('addUser', {callback: true, promise:true});
+
+var _executeAuthRemoveUserCommand = function(self, username, options, callback) {
+ if(typeof options == 'function') callback = options, options = {};
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+ // Get the error options
+ var commandOptions = {writeCommand:true};
+ if(options['dbName']) commandOptions.dbName = options['dbName'];
+
+ // Get additional values
+ var maxTimeMS = typeof options.maxTimeMS == 'number' ? options.maxTimeMS : null;
+
+ // Add maxTimeMS to options if set
+ if(maxTimeMS != null) commandOptions.maxTimeMS = maxTimeMS;
+
+ // Build the command to execute
+ var command = {
+ dropUser: username
+ }
+
+ // Apply write concern to command
+ command = writeConcern(command, self, options);
+
+ // Force write using primary
+ commandOptions.readPreference = ReadPreference.primary;
+
+ // Execute the command
+ self.command(command, commandOptions, function(err, result) {
+ if(err && !err.ok && err.code == undefined) return handleCallback(callback, {code: -5000});
+ if(err) return handleCallback(callback, err, null);
+ handleCallback(callback, null, result.ok ? true : false);
+ })
+}
+
+var removeUser = function(self, username, options, callback) {
+ // Attempt to execute command
+ _executeAuthRemoveUserCommand(self, username, options, function(err, result) {
+ if(err && err.code == -5000) {
+ var finalOptions = writeConcern(shallowClone(options), self, options);
+ // If we have another db set
+ var db = options.dbName ? self.db(options.dbName) : self;
+
+ // Fetch a user collection
+ var collection = db.collection(Db.SYSTEM_USER_COLLECTION);
+
+ // Locate the user
+ collection.findOne({user: username}, {}, function(err, user) {
+ if(user == null) return handleCallback(callback, err, false);
+ collection.remove({user: username}, finalOptions, function(err) {
+ handleCallback(callback, err, true);
+ });
+ });
+
+ return;
+ }
+
+ if(err) return handleCallback(callback, err);
+ handleCallback(callback, err, result);
+ });
+}
+
+define.classMethod('removeUser', {callback: true, promise:true});
+
+/**
+ * Remove a user from a database
+ * @method
+ * @param {string} username The username.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {Db~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.removeUser = function(username, options, callback) {
+ // Unpack the parameters
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ options = args.length ? args.shift() || {} : {};
+
+ // If we have a callback fallback
+ if(typeof callback == 'function') return removeUser(self, username, options, callback);
+
+ // Return a promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ removeUser(self, username, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var authenticate = function(self, username, password, options, callback) {
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+
+ // the default db to authenticate against is 'self'
+ // if authententicate is called from a retry context, it may be another one, like admin
+ var authdb = options.dbName ? options.dbName : self.databaseName;
+ authdb = self.authSource ? self.authSource : authdb;
+ authdb = options.authdb ? options.authdb : authdb;
+ authdb = options.authSource ? options.authSource : authdb;
+
+ // Callback
+ var _callback = function(err, result) {
+ if(self.listeners('authenticated').length > 0) {
+ self.emit('authenticated', err, result);
+ }
+
+ // Return to caller
+ handleCallback(callback, err, result);
+ }
+
+ // authMechanism
+ var authMechanism = options.authMechanism || '';
+ authMechanism = authMechanism.toUpperCase();
+
+ // If classic auth delegate to auth command
+ if(authMechanism == 'MONGODB-CR') {
+ self.s.topology.auth('mongocr', authdb, username, password, function(err) {
+ if(err) return handleCallback(callback, err, false);
+ _callback(null, true);
+ });
+ } else if(authMechanism == 'PLAIN') {
+ self.s.topology.auth('plain', authdb, username, password, function(err) {
+ if(err) return handleCallback(callback, err, false);
+ _callback(null, true);
+ });
+ } else if(authMechanism == 'MONGODB-X509') {
+ self.s.topology.auth('x509', authdb, username, password, function(err) {
+ if(err) return handleCallback(callback, err, false);
+ _callback(null, true);
+ });
+ } else if(authMechanism == 'SCRAM-SHA-1') {
+ self.s.topology.auth('scram-sha-1', authdb, username, password, function(err) {
+ if(err) return handleCallback(callback, err, false);
+ _callback(null, true);
+ });
+ } else if(authMechanism == 'GSSAPI') {
+ if(process.platform == 'win32') {
+ self.s.topology.auth('sspi', authdb, username, password, options, function(err) {
+ if(err) return handleCallback(callback, err, false);
+ _callback(null, true);
+ });
+ } else {
+ self.s.topology.auth('gssapi', authdb, username, password, options, function(err) {
+ if(err) return handleCallback(callback, err, false);
+ _callback(null, true);
+ });
+ }
+ } else if(authMechanism == 'DEFAULT') {
+ self.s.topology.auth('default', authdb, username, password, function(err) {
+ if(err) return handleCallback(callback, err, false);
+ _callback(null, true);
+ });
+ } else {
+ handleCallback(callback, MongoError.create({message: f("authentication mechanism %s not supported", options.authMechanism), driver:true}));
+ }
+}
+
+/**
+ * Authenticate a user against the server.
+ * @method
+ * @param {string} username The username.
+ * @param {string} [password] The password.
+ * @param {object} [options=null] Optional settings.
+ * @param {string} [options.authMechanism=MONGODB-CR] The authentication mechanism to use, GSSAPI, MONGODB-CR, MONGODB-X509, PLAIN
+ * @param {Db~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.authenticate = function(username, password, options, callback) {
+ if(typeof options == 'function') callback = options, options = {};
+ var self = this;
+ // Shallow copy the options
+ options = shallowClone(options);
+
+ // Set default mechanism
+ if(!options.authMechanism) {
+ options.authMechanism = 'DEFAULT';
+ } else if(options.authMechanism != 'GSSAPI'
+ && options.authMechanism != 'DEFAULT'
+ && options.authMechanism != 'MONGODB-CR'
+ && options.authMechanism != 'MONGODB-X509'
+ && options.authMechanism != 'SCRAM-SHA-1'
+ && options.authMechanism != 'PLAIN') {
+ return handleCallback(callback, MongoError.create({message: "only DEFAULT, GSSAPI, PLAIN, MONGODB-X509, SCRAM-SHA-1 or MONGODB-CR is supported by authMechanism", driver:true}));
+ }
+
+ // If we have a callback fallback
+ if(typeof callback == 'function') return authenticate(self, username, password, options, function(err, r) {
+ // Support failed auth method
+ if(err && err.message && err.message.indexOf('saslStart') != -1) err.code = 59;
+ // Reject error
+ if(err) return callback(err, r);
+ callback(null, r);
+ });
+
+ // Return a promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ authenticate(self, username, password, options, function(err, r) {
+ // Support failed auth method
+ if(err && err.message && err.message.indexOf('saslStart') != -1) err.code = 59;
+ // Reject error
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+define.classMethod('authenticate', {callback: true, promise:true});
+
+/**
+ * Logout user from server, fire off on all connections and remove all auth info
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {string} [options.dbName=null] Logout against different database than current.
+ * @param {Db~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.logout = function(options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // Establish the correct database name
+ var dbName = this.s.authSource ? this.s.authSource : this.s.databaseName;
+ dbName = options.dbName ? options.dbName : dbName;
+
+ // If we have a callback
+ if(typeof callback == 'function') {
+ return self.s.topology.logout(dbName, function(err) {
+ if(err) return callback(err);
+ callback(null, true);
+ });
+ }
+
+ // Return a promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.s.topology.logout(dbName, function(err) {
+ if(err) return reject(err);
+ resolve(true);
+ });
+ });
+}
+
+define.classMethod('logout', {callback: true, promise:true});
+
+/**
+ * Retrieves this collections index info.
+ * @method
+ * @param {string} name The name of the collection.
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.full=false] Returns the full raw index information.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {Db~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.indexInformation = function(name, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // If we have a callback fallback
+ if(typeof callback == 'function') return indexInformation(self, name, options, callback);
+
+ // Return a promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ indexInformation(self, name, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var indexInformation = function(self, name, options, callback) {
+ // If we specified full information
+ var full = options['full'] == null ? false : options['full'];
+
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+
+ // Process all the results from the index command and collection
+ var processResults = function(indexes) {
+ // Contains all the information
+ var info = {};
+ // Process all the indexes
+ for(var i = 0; i < indexes.length; i++) {
+ var index = indexes[i];
+ // Let's unpack the object
+ info[index.name] = [];
+ for(var name in index.key) {
+ info[index.name].push([name, index.key[name]]);
+ }
+ }
+
+ return info;
+ }
+
+ // Get the list of indexes of the specified collection
+ self.collection(name).listIndexes().toArray(function(err, indexes) {
+ if(err) return callback(toError(err));
+ if(!Array.isArray(indexes)) return handleCallback(callback, null, []);
+ if(full) return handleCallback(callback, null, indexes);
+ handleCallback(callback, null, processResults(indexes));
+ });
+}
+
+define.classMethod('indexInformation', {callback: true, promise:true});
+
+var createCreateIndexCommand = function(db, name, fieldOrSpec, options) {
+ var indexParameters = parseIndexOptions(fieldOrSpec);
+ var fieldHash = indexParameters.fieldHash;
+
+ // Generate the index name
+ var indexName = typeof options.name == 'string' ? options.name : indexParameters.name;
+ var selector = {
+ 'ns': db.databaseName + "." + name, 'key': fieldHash, 'name': indexName
+ }
+
+ // Ensure we have a correct finalUnique
+ var finalUnique = options == null || 'object' === typeof options ? false : options;
+ // Set up options
+ options = options == null || typeof options == 'boolean' ? {} : options;
+
+ // Add all the options
+ var keysToOmit = Object.keys(selector);
+ for(var optionName in options) {
+ if(keysToOmit.indexOf(optionName) == -1) {
+ selector[optionName] = options[optionName];
+ }
+ }
+
+ if(selector['unique'] == null) selector['unique'] = finalUnique;
+
+ // Remove any write concern operations
+ var removeKeys = ['w', 'wtimeout', 'j', 'fsync', 'readPreference'];
+ for(var i = 0; i < removeKeys.length; i++) {
+ delete selector[removeKeys[i]];
+ }
+
+ // Return the command creation selector
+ return selector;
+}
+
+var createIndexUsingCreateIndexes = function(self, name, fieldOrSpec, options, callback) {
+ // Build the index
+ var indexParameters = parseIndexOptions(fieldOrSpec);
+ // Generate the index name
+ var indexName = typeof options.name == 'string' ? options.name : indexParameters.name;
+ // Set up the index
+ var indexes = [{ name: indexName, key: indexParameters.fieldHash }];
+ // merge all the options
+ var keysToOmit = Object.keys(indexes[0]);
+ for(var optionName in options) {
+ if(keysToOmit.indexOf(optionName) == -1) {
+ indexes[0][optionName] = options[optionName];
+ }
+
+ // Remove any write concern operations
+ var removeKeys = ['w', 'wtimeout', 'j', 'fsync', 'readPreference'];
+ for(var i = 0; i < removeKeys.length; i++) {
+ delete indexes[0][removeKeys[i]];
+ }
+ }
+
+ // Get capabilities
+ var capabilities = self.s.topology.capabilities();
+
+ // Did the user pass in a collation, check if our write server supports it
+ if(indexes[0].collation && capabilities && !capabilities.commandsTakeCollation) {
+ // Create a new error
+ var error = new MongoError(f('server/primary/mongos does not support collation'));
+ error.code = 67;
+ // Return the error
+ return callback(error);
+ }
+
+ // Create command, apply write concern to command
+ var cmd = writeConcern({createIndexes: name, indexes: indexes}, self, options);
+
+ // Decorate command with writeConcern if supported
+ decorateWithWriteConcern(cmd, self, options);
+
+ // ReadPreference primary
+ options.readPreference = ReadPreference.PRIMARY;
+
+ // Build the command
+ self.command(cmd, options, function(err, result) {
+ if(err) return handleCallback(callback, err, null);
+ if(result.ok == 0) return handleCallback(callback, toError(result), null);
+ // Return the indexName for backward compatibility
+ handleCallback(callback, null, indexName);
+ });
+}
+
+// Validate the database name
+var validateDatabaseName = function(databaseName) {
+ if(typeof databaseName !== 'string') throw MongoError.create({message: "database name must be a string", driver:true});
+ if(databaseName.length === 0) throw MongoError.create({message: "database name cannot be the empty string", driver:true});
+ if(databaseName == '$external') return;
+
+ var invalidChars = [" ", ".", "$", "/", "\\"];
+ for(var i = 0; i < invalidChars.length; i++) {
+ if(databaseName.indexOf(invalidChars[i]) != -1) throw MongoError.create({message: "database names cannot contain the character '" + invalidChars[i] + "'", driver:true});
+ }
+}
+
+// Get write concern
+var writeConcern = function(target, db, options) {
+ if(options.w != null || options.j != null || options.fsync != null) {
+ var opts = {};
+ if(options.w) opts.w = options.w;
+ if(options.wtimeout) opts.wtimeout = options.wtimeout;
+ if(options.j) opts.j = options.j;
+ if(options.fsync) opts.fsync = options.fsync;
+ target.writeConcern = opts;
+ } else if(db.writeConcern.w != null || db.writeConcern.j != null || db.writeConcern.fsync != null) {
+ target.writeConcern = db.writeConcern;
+ }
+
+ return target
+}
+
+// Add listeners to topology
+var createListener = function(self, e, object) {
+ var listener = function(err) {
+ if(object.listeners(e).length > 0) {
+ object.emit(e, err, self);
+
+ // Emit on all associated db's if available
+ for(var i = 0; i < self.s.children.length; i++) {
+ self.s.children[i].emit(e, err, self.s.children[i]);
+ }
+ }
+ }
+ return listener;
+}
+
+
+/**
+ * Unref all sockets
+ * @method
+ */
+Db.prototype.unref = function() {
+ this.s.topology.unref();
+}
+
+/**
+ * Db close event
+ *
+ * Emitted after a socket closed against a single server or mongos proxy.
+ *
+ * @event Db#close
+ * @type {MongoError}
+ */
+
+/**
+ * Db authenticated event
+ *
+ * Emitted after all server members in the topology (single server, replicaset or mongos) have successfully authenticated.
+ *
+ * @event Db#authenticated
+ * @type {object}
+ */
+
+/**
+ * Db reconnect event
+ *
+ * * Server: Emitted when the driver has reconnected and re-authenticated.
+ * * ReplicaSet: N/A
+ * * Mongos: Emitted when the driver reconnects and re-authenticates successfully against a Mongos.
+ *
+ * @event Db#reconnect
+ * @type {object}
+ */
+
+/**
+ * Db error event
+ *
+ * Emitted after an error occurred against a single server or mongos proxy.
+ *
+ * @event Db#error
+ * @type {MongoError}
+ */
+
+/**
+ * Db timeout event
+ *
+ * Emitted after a socket timeout occurred against a single server or mongos proxy.
+ *
+ * @event Db#timeout
+ * @type {MongoError}
+ */
+
+/**
+ * Db parseError event
+ *
+ * The parseError event is emitted if the driver detects illegal or corrupt BSON being received from the server.
+ *
+ * @event Db#parseError
+ * @type {MongoError}
+ */
+
+/**
+ * Db fullsetup event, emitted when all servers in the topology have been connected to at start up time.
+ *
+ * * Server: Emitted when the driver has connected to the single server and has authenticated.
+ * * ReplSet: Emitted after the driver has attempted to connect to all replicaset members.
+ * * Mongos: Emitted after the driver has attempted to connect to all mongos proxies.
+ *
+ * @event Db#fullsetup
+ * @type {Db}
+ */
+
+// Constants
+Db.SYSTEM_NAMESPACE_COLLECTION = "system.namespaces";
+Db.SYSTEM_INDEX_COLLECTION = "system.indexes";
+Db.SYSTEM_PROFILE_COLLECTION = "system.profile";
+Db.SYSTEM_USER_COLLECTION = "system.users";
+Db.SYSTEM_COMMAND_COLLECTION = "$cmd";
+Db.SYSTEM_JS_COLLECTION = "system.js";
+
+module.exports = Db;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/gridfs-stream/download.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/gridfs-stream/download.js
new file mode 100644
index 0000000..7262ffd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/gridfs-stream/download.js
@@ -0,0 +1,398 @@
+var stream = require('stream'),
+ util = require('util');
+
+module.exports = GridFSBucketReadStream;
+
+/**
+ * A readable stream that enables you to read buffers from GridFS.
+ *
+ * Do not instantiate this class directly. Use `openDownloadStream()` instead.
+ *
+ * @class
+ * @param {Collection} chunks Handle for chunks collection
+ * @param {Collection} files Handle for files collection
+ * @param {Object} readPreference The read preference to use
+ * @param {Object} filter The query to use to find the file document
+ * @param {Object} [options=null] Optional settings.
+ * @param {Number} [options.sort=null] Optional sort for the file find query
+ * @param {Number} [options.skip=null] Optional skip for the file find query
+ * @param {Number} [options.start=null] Optional 0-based offset in bytes to start streaming from
+ * @param {Number} [options.end=null] Optional 0-based offset in bytes to stop streaming before
+ * @fires GridFSBucketReadStream#error
+ * @fires GridFSBucketReadStream#file
+ * @return {GridFSBucketReadStream} a GridFSBucketReadStream instance.
+ */
+
+function GridFSBucketReadStream(chunks, files, readPreference, filter, options) {
+ this.s = {
+ bytesRead: 0,
+ chunks: chunks,
+ cursor: null,
+ expected: 0,
+ files: files,
+ filter: filter,
+ init: false,
+ expectedEnd: 0,
+ file: null,
+ options: options,
+ readPreference: readPreference
+ };
+
+ stream.Readable.call(this);
+}
+
+util.inherits(GridFSBucketReadStream, stream.Readable);
+
+/**
+ * An error occurred
+ *
+ * @event GridFSBucketReadStream#error
+ * @type {Error}
+ */
+
+/**
+ * Fires when the stream loaded the file document corresponding to the
+ * provided id.
+ *
+ * @event GridFSBucketReadStream#file
+ * @type {object}
+ */
+
+/**
+ * Emitted when a chunk of data is available to be consumed.
+ *
+ * @event GridFSBucketReadStream#data
+ * @type {object}
+ */
+
+/**
+ * Fired when the stream is exhausted (no more data events).
+ *
+ * @event GridFSBucketReadStream#end
+ * @type {object}
+ */
+
+/**
+ * Fired when the stream is exhausted and the underlying cursor is killed
+ *
+ * @event GridFSBucketReadStream#close
+ * @type {object}
+ */
+
+/**
+ * Reads from the cursor and pushes to the stream.
+ * @method
+ */
+
+GridFSBucketReadStream.prototype._read = function() {
+ var _this = this;
+ if (this.destroyed) {
+ return;
+ }
+
+ waitForFile(_this, function() {
+ doRead(_this);
+ });
+};
+
+/**
+ * Sets the 0-based offset in bytes to start streaming from. Throws
+ * an error if this stream has entered flowing mode
+ * (e.g. if you've already called `on('data')`)
+ * @method
+ * @param {Number} start Offset in bytes to start reading at
+ * @return {GridFSBucketReadStream}
+ */
+
+GridFSBucketReadStream.prototype.start = function(start) {
+ throwIfInitialized(this);
+ this.s.options.start = start;
+ return this;
+};
+
+/**
+ * Sets the 0-based offset in bytes to start streaming from. Throws
+ * an error if this stream has entered flowing mode
+ * (e.g. if you've already called `on('data')`)
+ * @method
+ * @param {Number} end Offset in bytes to stop reading at
+ * @return {GridFSBucketReadStream}
+ */
+
+GridFSBucketReadStream.prototype.end = function(end) {
+ throwIfInitialized(this);
+ this.s.options.end = end;
+ return this;
+};
+
+/**
+ * Marks this stream as aborted (will never push another `data` event)
+ * and kills the underlying cursor. Will emit the 'end' event, and then
+ * the 'close' event once the cursor is successfully killed.
+ *
+ * @method
+ * @param {GridFSBucket~errorCallback} [callback] called when the cursor is successfully closed or an error occurred.
+ * @fires GridFSBucketWriteStream#close
+ * @fires GridFSBucketWriteStream#end
+ */
+
+GridFSBucketReadStream.prototype.abort = function(callback) {
+ var _this = this;
+ this.push(null);
+ this.destroyed = true;
+ if (this.s.cursor) {
+ this.s.cursor.close(function(error) {
+ _this.emit('close');
+ callback && callback(error);
+ });
+ } else {
+ if (!this.s.init) {
+ // If not initialized, fire close event because we will never
+ // get a cursor
+ _this.emit('close');
+ }
+ callback && callback();
+ }
+};
+
+/**
+ * @ignore
+ */
+
+function throwIfInitialized(self) {
+ if (self.s.init) {
+ throw new Error('You cannot change options after the stream has entered' +
+ 'flowing mode!');
+ }
+}
+
+/**
+ * @ignore
+ */
+
+function doRead(_this) {
+ if (_this.destroyed) {
+ return;
+ }
+
+ _this.s.cursor.next(function(error, doc) {
+ if (_this.destroyed) {
+ return;
+ }
+ if (error) {
+ return __handleError(_this, error);
+ }
+ if (!doc) {
+ _this.push(null);
+ return _this.s.cursor.close(function(error) {
+ if (error) {
+ return __handleError(_this, error);
+ }
+ _this.emit('close');
+ });
+ }
+
+ var bytesRemaining = _this.s.file.length - _this.s.bytesRead;
+ var expectedN = _this.s.expected++;
+ var expectedLength = Math.min(_this.s.file.chunkSize,
+ bytesRemaining);
+
+ if (doc.n > expectedN) {
+ var errmsg = 'ChunkIsMissing: Got unexpected n: ' + doc.n +
+ ', expected: ' + expectedN;
+ return __handleError(_this, new Error(errmsg));
+ }
+
+ if (doc.n < expectedN) {
+ errmsg = 'ExtraChunk: Got unexpected n: ' + doc.n +
+ ', expected: ' + expectedN;
+ return __handleError(_this, new Error(errmsg));
+ }
+
+ if (doc.data.length() !== expectedLength) {
+ if (bytesRemaining <= 0) {
+ errmsg = 'ExtraChunk: Got unexpected n: ' + doc.n;
+ return __handleError(_this, new Error(errmsg));
+ }
+
+ errmsg = 'ChunkIsWrongSize: Got unexpected length: ' +
+ doc.data.length() + ', expected: ' + expectedLength;
+ return __handleError(_this, new Error(errmsg));
+ }
+
+ _this.s.bytesRead += doc.data.length();
+
+ if (doc.data.buffer.length === 0) {
+ return _this.push(null);
+ }
+
+ var sliceStart = null;
+ var sliceEnd = null;
+ var buf = doc.data.buffer;
+
+ if (_this.s.bytesToSkip != null) {
+ sliceStart = _this.s.bytesToSkip;
+ _this.s.bytesToSkip = 0;
+ }
+
+ if (expectedN === _this.s.expectedEnd && _this.s.bytesToTrim != null) {
+ sliceEnd = _this.s.bytesToTrim;
+ }
+
+ // If the remaining amount of data left is < chunkSize read the right amount of data
+ if (_this.s.options.end && (
+ (_this.s.options.end - _this.s.bytesToSkip) < doc.data.length()
+ )) {
+ sliceEnd = (_this.s.options.end - _this.s.bytesToSkip);
+ }
+
+ if (sliceStart != null || sliceEnd != null) {
+ buf = buf.slice(sliceStart || 0, sliceEnd || buf.length);
+ }
+
+ _this.push(buf);
+ })
+}
+
+/**
+ * @ignore
+ */
+
+function init(self) {
+ var findOneOptions = {};
+ if (self.s.readPreference) {
+ findOneOptions.readPreference = self.s.readPreference;
+ }
+ if (self.s.options && self.s.options.sort) {
+ findOneOptions.sort = self.s.options.sort;
+ }
+ if (self.s.options && self.s.options.skip) {
+ findOneOptions.skip = self.s.options.skip;
+ }
+
+ self.s.files.findOne(self.s.filter, findOneOptions, function(error, doc) {
+ if (error) {
+ return __handleError(self, error);
+ }
+ if (!doc) {
+ var identifier = self.s.filter._id ?
+ self.s.filter._id.toString() : self.s.filter.filename;
+ var errmsg = 'FileNotFound: file ' + identifier + ' was not found';
+ var err = new Error(errmsg);
+ err.code = 'ENOENT';
+ return __handleError(self, err);
+ }
+
+ // If document is empty, kill the stream immediately and don't
+ // execute any reads
+ if (doc.length <= 0) {
+ self.push(null);
+ return;
+ }
+
+ if (self.destroyed) {
+ // If user destroys the stream before we have a cursor, wait
+ // until the query is done to say we're 'closed' because we can't
+ // cancel a query.
+ self.emit('close');
+ return;
+ }
+
+ self.s.cursor = self.s.chunks.find({ files_id: doc._id }).sort({ n: 1 });
+ if (self.s.readPreference) {
+ self.s.cursor.setReadPreference(self.s.readPreference);
+ }
+
+ self.s.expectedEnd = Math.ceil(doc.length / doc.chunkSize);
+ self.s.file = doc;
+ self.s.bytesToSkip = handleStartOption(self, doc, self.s.cursor,
+ self.s.options);
+ self.s.bytesToTrim = handleEndOption(self, doc, self.s.cursor,
+ self.s.options);
+ self.emit('file', doc);
+ });
+}
+
+/**
+ * @ignore
+ */
+
+function waitForFile(_this, callback) {
+ if (_this.s.file) {
+ return callback();
+ }
+
+ if (!_this.s.init) {
+ init(_this);
+ _this.s.init = true;
+ }
+
+ _this.once('file', function() {
+ callback();
+ })
+}
+
+/**
+ * @ignore
+ */
+
+function handleStartOption(stream, doc, cursor, options) {
+ if (options && options.start != null) {
+ if (options.start > doc.length) {
+ throw new Error('Stream start (' + options.start + ') must not be ' +
+ 'more than the length of the file (' + doc.length +')')
+ }
+ if (options.start < 0) {
+ throw new Error('Stream start (' + options.start + ') must not be ' +
+ 'negative');
+ }
+ if (options.end != null && options.end < options.start) {
+ throw new Error('Stream start (' + options.start + ') must not be ' +
+ 'greater than stream end (' + options.end + ')');
+ }
+
+ cursor.skip(Math.floor(options.start / doc.chunkSize));
+
+ stream.s.bytesRead = Math.floor(options.start / doc.chunkSize) *
+ doc.chunkSize;
+ stream.s.expected = Math.floor(options.start / doc.chunkSize);
+
+ return options.start - stream.s.bytesRead;
+ }
+}
+
+/**
+ * @ignore
+ */
+
+function handleEndOption(stream, doc, cursor, options) {
+ if (options && options.end != null) {
+ if (options.end > doc.length) {
+ throw new Error('Stream end (' + options.end + ') must not be ' +
+ 'more than the length of the file (' + doc.length +')')
+ }
+ if (options.start < 0) {
+ throw new Error('Stream end (' + options.end + ') must not be ' +
+ 'negative');
+ }
+
+ var start = options.start != null ?
+ Math.floor(options.start / doc.chunkSize) :
+ 0;
+
+ cursor.limit(Math.ceil(options.end / doc.chunkSize) - start);
+
+ stream.s.expectedEnd = Math.ceil(options.end / doc.chunkSize);
+
+ return (Math.ceil(options.end / doc.chunkSize) * doc.chunkSize) -
+ options.end;
+ }
+}
+
+/**
+ * @ignore
+ */
+
+function __handleError(_this, error) {
+ _this.emit('error', error);
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/gridfs-stream/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/gridfs-stream/index.js
new file mode 100644
index 0000000..e0e02c0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/gridfs-stream/index.js
@@ -0,0 +1,367 @@
+var Emitter = require('events').EventEmitter;
+var GridFSBucketReadStream = require('./download');
+var GridFSBucketWriteStream = require('./upload');
+var shallowClone = require('../utils').shallowClone;
+var toError = require('../utils').toError;
+var util = require('util');
+
+var DEFAULT_GRIDFS_BUCKET_OPTIONS = {
+ bucketName: 'fs',
+ chunkSizeBytes: 255 * 1024
+};
+
+module.exports = GridFSBucket;
+
+/**
+ * Constructor for a streaming GridFS interface
+ * @class
+ * @param {Db} db A db handle
+ * @param {object} [options=null] Optional settings.
+ * @param {string} [options.bucketName="fs"] The 'files' and 'chunks' collections will be prefixed with the bucket name followed by a dot.
+ * @param {number} [options.chunkSizeBytes=255 * 1024] Number of bytes stored in each chunk. Defaults to 255KB
+ * @param {object} [options.writeConcern=null] Optional write concern to be passed to write operations, for instance `{ w: 1 }`
+ * @param {object} [options.readPreference=null] Optional read preference to be passed to read operations
+ * @fires GridFSBucketWriteStream#index
+ * @return {GridFSBucket}
+ */
+
+function GridFSBucket(db, options) {
+ Emitter.apply(this);
+ this.setMaxListeners(0);
+
+ if (options && typeof options === 'object') {
+ options = shallowClone(options);
+ var keys = Object.keys(DEFAULT_GRIDFS_BUCKET_OPTIONS);
+ for (var i = 0; i < keys.length; ++i) {
+ if (!options[keys[i]]) {
+ options[keys[i]] = DEFAULT_GRIDFS_BUCKET_OPTIONS[keys[i]];
+ }
+ }
+ } else {
+ options = DEFAULT_GRIDFS_BUCKET_OPTIONS;
+ }
+
+ this.s = {
+ db: db,
+ options: options,
+ _chunksCollection: db.collection(options.bucketName + '.chunks'),
+ _filesCollection: db.collection(options.bucketName + '.files'),
+ checkedIndexes: false,
+ calledOpenUploadStream: false,
+ promiseLibrary: db.s.promiseLibrary ||
+ (typeof global.Promise == 'function' ? global.Promise : require('es6-promise').Promise)
+ };
+}
+
+util.inherits(GridFSBucket, Emitter);
+
+/**
+ * When the first call to openUploadStream is made, the upload stream will
+ * check to see if it needs to create the proper indexes on the chunks and
+ * files collections. This event is fired either when 1) it determines that
+ * no index creation is necessary, 2) when it successfully creates the
+ * necessary indexes.
+ *
+ * @event GridFSBucket#index
+ * @type {Error}
+ */
+
+/**
+ * Returns a writable stream (GridFSBucketWriteStream) for writing
+ * buffers to GridFS. The stream's 'id' property contains the resulting
+ * file's id.
+ * @method
+ * @param {string} filename The value of the 'filename' key in the files doc
+ * @param {object} [options=null] Optional settings.
+ * @param {number} [options.chunkSizeBytes=null] Optional overwrite this bucket's chunkSizeBytes for this file
+ * @param {object} [options.metadata=null] Optional object to store in the file document's `metadata` field
+ * @param {string} [options.contentType=null] Optional string to store in the file document's `contentType` field
+ * @param {array} [options.aliases=null] Optional array of strings to store in the file document's `aliases` field
+ * @return {GridFSBucketWriteStream}
+ */
+
+GridFSBucket.prototype.openUploadStream = function(filename, options) {
+ if (options) {
+ options = shallowClone(options);
+ } else {
+ options = {};
+ }
+ if (!options.chunkSizeBytes) {
+ options.chunkSizeBytes = this.s.options.chunkSizeBytes;
+ }
+ return new GridFSBucketWriteStream(this, filename, options);
+};
+
+/**
+ * Returns a writable stream (GridFSBucketWriteStream) for writing
+ * buffers to GridFS for a custom file id. The stream's 'id' property contains the resulting
+ * file's id.
+ * @method
+ * @param {string|number|object} id A custom id used to identify the file
+ * @param {string} filename The value of the 'filename' key in the files doc
+ * @param {object} [options=null] Optional settings.
+ * @param {number} [options.chunkSizeBytes=null] Optional overwrite this bucket's chunkSizeBytes for this file
+ * @param {object} [options.metadata=null] Optional object to store in the file document's `metadata` field
+ * @param {string} [options.contentType=null] Optional string to store in the file document's `contentType` field
+ * @param {array} [options.aliases=null] Optional array of strings to store in the file document's `aliases` field
+ * @return {GridFSBucketWriteStream}
+ */
+
+GridFSBucket.prototype.openUploadStreamWithId = function(id, filename, options) {
+ if (options) {
+ options = shallowClone(options);
+ } else {
+ options = {};
+ }
+
+ if (!options.chunkSizeBytes) {
+ options.chunkSizeBytes = this.s.options.chunkSizeBytes;
+ }
+
+ options.id = id;
+
+ return new GridFSBucketWriteStream(this, filename, options);
+};
+
+/**
+ * Returns a readable stream (GridFSBucketReadStream) for streaming file
+ * data from GridFS.
+ * @method
+ * @param {ObjectId} id The id of the file doc
+ * @param {Object} [options=null] Optional settings.
+ * @param {Number} [options.start=null] Optional 0-based offset in bytes to start streaming from
+ * @param {Number} [options.end=null] Optional 0-based offset in bytes to stop streaming before
+ * @return {GridFSBucketReadStream}
+ */
+
+GridFSBucket.prototype.openDownloadStream = function(id, options) {
+ var filter = { _id: id };
+ options = {
+ start: options && options.start,
+ end: options && options.end
+ };
+
+ return new GridFSBucketReadStream(this.s._chunksCollection,
+ this.s._filesCollection, this.s.options.readPreference, filter, options);
+};
+
+/**
+ * Deletes a file with the given id
+ * @method
+ * @param {ObjectId} id The id of the file doc
+ * @param {GridFSBucket~errorCallback} [callback]
+ */
+
+GridFSBucket.prototype.delete = function(id, callback) {
+ if (typeof callback === 'function') {
+ return _delete(this, id, callback);
+ }
+
+ var _this = this;
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ _delete(_this, id, function(error, res) {
+ if (error) {
+ reject(error);
+ } else {
+ resolve(res);
+ }
+ });
+ });
+};
+
+/**
+ * @ignore
+ */
+
+function _delete(_this, id, callback) {
+ _this.s._filesCollection.deleteOne({ _id: id }, function(error, res) {
+ if (error) {
+ return callback(error);
+ }
+
+ _this.s._chunksCollection.deleteMany({ files_id: id }, function(error) {
+ if (error) {
+ return callback(error);
+ }
+
+ // Delete orphaned chunks before returning FileNotFound
+ if (!res.result.n) {
+ var errmsg = 'FileNotFound: no file with id ' + id + ' found';
+ return callback(new Error(errmsg));
+ }
+
+ callback();
+ });
+ });
+}
+
+/**
+ * Convenience wrapper around find on the files collection
+ * @method
+ * @param {Object} filter
+ * @param {Object} [options=null] Optional settings for cursor
+ * @param {number} [options.batchSize=null] Optional batch size for cursor
+ * @param {number} [options.limit=null] Optional limit for cursor
+ * @param {number} [options.maxTimeMS=null] Optional maxTimeMS for cursor
+ * @param {boolean} [options.noCursorTimeout=null] Optionally set cursor's `noCursorTimeout` flag
+ * @param {number} [options.skip=null] Optional skip for cursor
+ * @param {object} [options.sort=null] Optional sort for cursor
+ * @return {Cursor}
+ */
+
+GridFSBucket.prototype.find = function(filter, options) {
+ filter = filter || {};
+ options = options || {};
+
+ var cursor = this.s._filesCollection.find(filter);
+
+ if (options.batchSize != null) {
+ cursor.batchSize(options.batchSize);
+ }
+ if (options.limit != null) {
+ cursor.limit(options.limit);
+ }
+ if (options.maxTimeMS != null) {
+ cursor.maxTimeMS(options.maxTimeMS);
+ }
+ if (options.noCursorTimeout != null) {
+ cursor.addCursorFlag('noCursorTimeout', options.noCursorTimeout);
+ }
+ if (options.skip != null) {
+ cursor.skip(options.skip);
+ }
+ if (options.sort != null) {
+ cursor.sort(options.sort);
+ }
+
+ return cursor;
+};
+
+/**
+ * Returns a readable stream (GridFSBucketReadStream) for streaming the
+ * file with the given name from GridFS. If there are multiple files with
+ * the same name, this will stream the most recent file with the given name
+ * (as determined by the `uploadDate` field). You can set the `revision`
+ * option to change this behavior.
+ * @method
+ * @param {String} filename The name of the file to stream
+ * @param {Object} [options=null] Optional settings
+ * @param {number} [options.revision=-1] The revision number relative to the oldest file with the given filename. 0 gets you the oldest file, 1 gets you the 2nd oldest, -1 gets you the newest.
+ * @param {Number} [options.start=null] Optional 0-based offset in bytes to start streaming from
+ * @param {Number} [options.end=null] Optional 0-based offset in bytes to stop streaming before
+ * @return {GridFSBucketReadStream}
+ */
+
+GridFSBucket.prototype.openDownloadStreamByName = function(filename, options) {
+ var sort = { uploadDate: -1 };
+ var skip = null;
+ if (options && options.revision != null) {
+ if (options.revision >= 0) {
+ sort = { uploadDate: 1 };
+ skip = options.revision;
+ } else {
+ skip = -options.revision - 1;
+ }
+ }
+
+ var filter = { filename: filename };
+ options = {
+ sort: sort,
+ skip: skip,
+ start: options && options.start,
+ end: options && options.end
+ };
+ return new GridFSBucketReadStream(this.s._chunksCollection,
+ this.s._filesCollection, this.s.options.readPreference, filter, options);
+};
+
+/**
+ * Renames the file with the given _id to the given string
+ * @method
+ * @param {ObjectId} id the id of the file to rename
+ * @param {String} filename new name for the file
+ * @param {GridFSBucket~errorCallback} [callback]
+ */
+
+GridFSBucket.prototype.rename = function(id, filename, callback) {
+ if (typeof callback === 'function') {
+ return _rename(this, id, filename, callback);
+ }
+
+ var _this = this;
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ _rename(_this, id, filename, function(error, res) {
+ if (error) {
+ reject(error);
+ } else {
+ resolve(res);
+ }
+ });
+ });
+};
+
+/**
+ * @ignore
+ */
+
+function _rename(_this, id, filename, callback) {
+ var filter = { _id: id };
+ var update = { $set: { filename: filename } };
+ _this.s._filesCollection.updateOne(filter, update, function(error, res) {
+ if (error) {
+ return callback(error);
+ }
+ if (!res.result.n) {
+ return callback(toError('File with id ' + id + ' not found'));
+ }
+ callback();
+ });
+}
+
+/**
+ * Removes this bucket's files collection, followed by its chunks collection.
+ * @method
+ * @param {GridFSBucket~errorCallback} [callback]
+ */
+
+GridFSBucket.prototype.drop = function(callback) {
+ if (typeof callback === 'function') {
+ return _drop(this, callback);
+ }
+
+ var _this = this;
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ _drop(_this, function(error, res) {
+ if (error) {
+ reject(error);
+ } else {
+ resolve(res);
+ }
+ });
+ });
+};
+
+/**
+ * @ignore
+ */
+
+function _drop(_this, callback) {
+ _this.s._filesCollection.drop(function(error) {
+ if (error) {
+ return callback(error);
+ }
+ _this.s._chunksCollection.drop(function(error) {
+ if (error) {
+ return callback(error);
+ }
+
+ return callback();
+ });
+ });
+}
+
+/**
+ * Callback format for all GridFSBucket methods that can accept a callback.
+ * @callback GridFSBucket~errorCallback
+ * @param {MongoError} error An error instance representing any errors that occurred
+ */
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/gridfs-stream/upload.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/gridfs-stream/upload.js
new file mode 100644
index 0000000..1ce3616
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/gridfs-stream/upload.js
@@ -0,0 +1,520 @@
+var core = require('mongodb-core');
+var crypto = require('crypto');
+var stream = require('stream');
+var util = require('util');
+
+var ERROR_NAMESPACE_NOT_FOUND = 26;
+
+module.exports = GridFSBucketWriteStream;
+
+/**
+ * A writable stream that enables you to write buffers to GridFS.
+ *
+ * Do not instantiate this class directly. Use `openUploadStream()` instead.
+ *
+ * @class
+ * @param {GridFSBucket} bucket Handle for this stream's corresponding bucket
+ * @param {string} filename The value of the 'filename' key in the files doc
+ * @param {object} [options=null] Optional settings.
+ * @param {string|number|object} [options.id=null] Custom file id for the GridFS file.
+ * @param {number} [options.chunkSizeBytes=null] The chunk size to use, in bytes
+ * @param {number} [options.w=null] The write concern
+ * @param {number} [options.wtimeout=null] The write concern timeout
+ * @param {number} [options.j=null] The journal write concern
+ * @fires GridFSBucketWriteStream#error
+ * @fires GridFSBucketWriteStream#finish
+ * @return {GridFSBucketWriteStream} a GridFSBucketWriteStream instance.
+ */
+
+function GridFSBucketWriteStream(bucket, filename, options) {
+ options = options || {};
+ this.bucket = bucket;
+ this.chunks = bucket.s._chunksCollection;
+ this.filename = filename;
+ this.files = bucket.s._filesCollection;
+ this.options = options;
+
+ this.id = options.id ? options.id : core.BSON.ObjectId();
+ this.chunkSizeBytes = this.options.chunkSizeBytes;
+ this.bufToStore = new Buffer(this.chunkSizeBytes);
+ this.length = 0;
+ this.md5 = crypto.createHash('md5');
+ this.n = 0;
+ this.pos = 0;
+ this.state = {
+ streamEnd: false,
+ outstandingRequests: 0,
+ errored: false,
+ aborted: false,
+ promiseLibrary: this.bucket.s.promiseLibrary
+ };
+
+ if (!this.bucket.s.calledOpenUploadStream) {
+ this.bucket.s.calledOpenUploadStream = true;
+
+ var _this = this;
+ checkIndexes(this, function() {
+ _this.bucket.s.checkedIndexes = true;
+ _this.bucket.emit('index');
+ });
+ }
+}
+
+util.inherits(GridFSBucketWriteStream, stream.Writable);
+
+/**
+ * An error occurred
+ *
+ * @event GridFSBucketWriteStream#error
+ * @type {Error}
+ */
+
+/**
+ * `end()` was called and the write stream successfully wrote the file
+ * metadata and all the chunks to MongoDB.
+ *
+ * @event GridFSBucketWriteStream#finish
+ * @type {object}
+ */
+
+/**
+ * Write a buffer to the stream.
+ *
+ * @method
+ * @param {Buffer} chunk Buffer to write
+ * @param {String} encoding Optional encoding for the buffer
+ * @param {Function} callback Function to call when the chunk was added to the buffer, or if the entire chunk was persisted to MongoDB if this chunk caused a flush.
+ * @return {Boolean} False if this write required flushing a chunk to MongoDB. True otherwise.
+ */
+
+GridFSBucketWriteStream.prototype.write = function(chunk, encoding, callback) {
+ var _this = this;
+ return waitForIndexes(this, function() {
+ return doWrite(_this, chunk, encoding, callback);
+ });
+};
+
+/**
+ * Places this write stream into an aborted state (all future writes fail)
+ * and deletes all chunks that have already been written.
+ *
+ * @method
+ * @param {GridFSBucket~errorCallback} callback called when chunks are successfully removed or error occurred
+ * @return {Promise} if no callback specified
+ */
+
+GridFSBucketWriteStream.prototype.abort = function(callback) {
+ if (this.state.streamEnd) {
+ var error = new Error('Cannot abort a stream that has already completed');
+ if (typeof callback == 'function') {
+ return callback(error);
+ }
+ return this.state.promiseLibrary.reject(error);
+ }
+ if (this.state.aborted) {
+ error = new Error('Cannot call abort() on a stream twice');
+ if (typeof callback == 'function') {
+ return callback(error);
+ }
+ return this.state.promiseLibrary.reject(error);
+ }
+ this.state.aborted = true;
+ this.chunks.deleteMany({ files_id: this.id }, function(error) {
+ if(typeof callback == 'function') callback(error);
+ });
+};
+
+/**
+ * Tells the stream that no more data will be coming in. The stream will
+ * persist the remaining data to MongoDB, write the files document, and
+ * then emit a 'finish' event.
+ *
+ * @method
+ * @param {Buffer} chunk Buffer to write
+ * @param {String} encoding Optional encoding for the buffer
+ * @param {Function} callback Function to call when all files and chunks have been persisted to MongoDB
+ */
+
+GridFSBucketWriteStream.prototype.end = function(chunk, encoding, callback) {
+ var _this = this;
+ if(typeof chunk == 'function') {
+ callback = chunk, chunk = null, encoding = null;
+ } else if(typeof encoding == 'function') {
+ callback = encoding, encoding = null;
+ }
+
+ if (checkAborted(this, callback)) {
+ return;
+ }
+ this.state.streamEnd = true;
+
+ if (callback) {
+ this.once('finish', function(result) {
+ callback(null, result);
+ });
+ }
+
+ if (!chunk) {
+ waitForIndexes(this, function() {
+ writeRemnant(_this);
+ });
+ return;
+ }
+
+ this.write(chunk, encoding, function() {
+ writeRemnant(_this);
+ });
+};
+
+/**
+ * @ignore
+ */
+
+function __handleError(_this, error, callback) {
+ if (_this.state.errored) {
+ return;
+ }
+ _this.state.errored = true;
+ if (callback) {
+ return callback(error);
+ }
+ _this.emit('error', error);
+}
+
+/**
+ * @ignore
+ */
+
+function createChunkDoc(filesId, n, data) {
+ return {
+ _id: core.BSON.ObjectId(),
+ files_id: filesId,
+ n: n,
+ data: data
+ };
+}
+
+/**
+ * @ignore
+ */
+
+function checkChunksIndex(_this, callback) {
+ _this.chunks.listIndexes().toArray(function(error, indexes) {
+ if (error) {
+ // Collection doesn't exist so create index
+ if (error.code === ERROR_NAMESPACE_NOT_FOUND) {
+ var index = { files_id: 1, n: 1 };
+ _this.chunks.createIndex(index, { background: false, unique: true }, function(error) {
+ if (error) {
+ return callback(error);
+ }
+
+ callback();
+ });
+ return;
+ }
+ return callback(error);
+ }
+
+ var hasChunksIndex = false;
+ indexes.forEach(function(index) {
+ if (index.key) {
+ var keys = Object.keys(index.key);
+ if (keys.length === 2 && index.key.files_id === 1 &&
+ index.key.n === 1) {
+ hasChunksIndex = true;
+ }
+ }
+ });
+
+ if (hasChunksIndex) {
+ callback();
+ } else {
+ index = { files_id: 1, n: 1 };
+ var indexOptions = getWriteOptions(_this);
+
+ indexOptions.background = false;
+ indexOptions.unique = true;
+
+ _this.chunks.createIndex(index, indexOptions, function(error) {
+ if (error) {
+ return callback(error);
+ }
+
+ callback();
+ });
+ }
+ });
+}
+
+/**
+ * @ignore
+ */
+
+function checkDone(_this, callback) {
+ if (_this.state.streamEnd &&
+ _this.state.outstandingRequests === 0 &&
+ !_this.state.errored) {
+ var filesDoc = createFilesDoc(_this.id, _this.length, _this.chunkSizeBytes,
+ _this.md5.digest('hex'), _this.filename, _this.options.contentType,
+ _this.options.aliases, _this.options.metadata);
+
+ if (checkAborted(_this, callback)) {
+ return false;
+ }
+
+ _this.files.insert(filesDoc, getWriteOptions(_this), function(error) {
+ if (error) {
+ return __handleError(_this, error, callback);
+ }
+ _this.emit('finish', filesDoc);
+ });
+
+ return true;
+ }
+
+ return false;
+}
+
+/**
+ * @ignore
+ */
+
+function checkIndexes(_this, callback) {
+ _this.files.findOne({}, { _id: 1 }, function(error, doc) {
+ if (error) {
+ return callback(error);
+ }
+ if (doc) {
+ return callback();
+ }
+
+ _this.files.listIndexes().toArray(function(error, indexes) {
+ if (error) {
+ // Collection doesn't exist so create index
+ if (error.code === ERROR_NAMESPACE_NOT_FOUND) {
+ var index = { filename: 1, uploadDate: 1 };
+ _this.files.createIndex(index, { background: false }, function(error) {
+ if (error) {
+ return callback(error);
+ }
+
+ checkChunksIndex(_this, callback);
+ });
+ return;
+ }
+ return callback(error);
+ }
+
+ var hasFileIndex = false;
+ indexes.forEach(function(index) {
+ var keys = Object.keys(index.key);
+ if (keys.length === 2 && index.key.filename === 1 &&
+ index.key.uploadDate === 1) {
+ hasFileIndex = true;
+ }
+ });
+
+ if (hasFileIndex) {
+ checkChunksIndex(_this, callback);
+ } else {
+ index = { filename: 1, uploadDate: 1 };
+
+ var indexOptions = getWriteOptions(_this);
+
+ indexOptions.background = false;
+
+ _this.files.createIndex(index, indexOptions, function(error) {
+ if (error) {
+ return callback(error);
+ }
+
+ checkChunksIndex(_this, callback);
+ });
+ }
+ });
+ });
+}
+
+/**
+ * @ignore
+ */
+
+function createFilesDoc(_id, length, chunkSize, md5, filename, contentType,
+ aliases, metadata) {
+ var ret = {
+ _id: _id,
+ length: length,
+ chunkSize: chunkSize,
+ uploadDate: new Date(),
+ md5: md5,
+ filename: filename
+ };
+
+ if (contentType) {
+ ret.contentType = contentType;
+ }
+
+ if (aliases) {
+ ret.aliases = aliases;
+ }
+
+ if (metadata) {
+ ret.metadata = metadata;
+ }
+
+ return ret;
+}
+
+/**
+ * @ignore
+ */
+
+function doWrite(_this, chunk, encoding, callback) {
+ if (checkAborted(_this, callback)) {
+ return false;
+ }
+
+ var inputBuf = (Buffer.isBuffer(chunk)) ?
+ chunk : new Buffer(chunk, encoding);
+
+ _this.length += inputBuf.length;
+
+ // Input is small enough to fit in our buffer
+ if (_this.pos + inputBuf.length < _this.chunkSizeBytes) {
+ inputBuf.copy(_this.bufToStore, _this.pos);
+ _this.pos += inputBuf.length;
+
+ callback && callback();
+
+ // Note that we reverse the typical semantics of write's return value
+ // to be compatible with node's `.pipe()` function.
+ // True means client can keep writing.
+ return true;
+ }
+
+ // Otherwise, buffer is too big for current chunk, so we need to flush
+ // to MongoDB.
+ var inputBufRemaining = inputBuf.length;
+ var spaceRemaining = _this.chunkSizeBytes - _this.pos;
+ var numToCopy = Math.min(spaceRemaining, inputBuf.length);
+ var outstandingRequests = 0;
+ while (inputBufRemaining > 0) {
+ var inputBufPos = inputBuf.length - inputBufRemaining;
+ inputBuf.copy(_this.bufToStore, _this.pos,
+ inputBufPos, inputBufPos + numToCopy);
+ _this.pos += numToCopy;
+ spaceRemaining -= numToCopy;
+ if (spaceRemaining === 0) {
+ _this.md5.update(_this.bufToStore);
+ var doc = createChunkDoc(_this.id, _this.n, _this.bufToStore);
+ ++_this.state.outstandingRequests;
+ ++outstandingRequests;
+
+ if (checkAborted(_this, callback)) {
+ return false;
+ }
+
+ _this.chunks.insert(doc, getWriteOptions(_this), function(error) {
+ if (error) {
+ return __handleError(_this, error);
+ }
+ --_this.state.outstandingRequests;
+ --outstandingRequests;
+ if (!outstandingRequests) {
+ _this.emit('drain', doc);
+ callback && callback();
+ checkDone(_this);
+ }
+ });
+
+ spaceRemaining = _this.chunkSizeBytes;
+ _this.pos = 0;
+ ++_this.n;
+ }
+ inputBufRemaining -= numToCopy;
+ numToCopy = Math.min(spaceRemaining, inputBufRemaining);
+ }
+
+ // Note that we reverse the typical semantics of write's return value
+ // to be compatible with node's `.pipe()` function.
+ // False means the client should wait for the 'drain' event.
+ return false;
+}
+
+/**
+ * @ignore
+ */
+
+function getWriteOptions(_this) {
+ var obj = {};
+ if (_this.options.writeConcern) {
+ obj.w = _this.options.writeConcern.w;
+ obj.wtimeout = _this.options.writeConcern.wtimeout;
+ obj.j = _this.options.writeConcern.j;
+ }
+ return obj;
+}
+
+/**
+ * @ignore
+ */
+
+function waitForIndexes(_this, callback) {
+ if (_this.bucket.s.checkedIndexes) {
+ return callback(false);
+ }
+
+ _this.bucket.once('index', function() {
+ callback(true);
+ });
+
+ return true;
+}
+
+/**
+ * @ignore
+ */
+
+function writeRemnant(_this, callback) {
+ // Buffer is empty, so don't bother to insert
+ if (_this.pos === 0) {
+ return checkDone(_this, callback);
+ }
+
+ ++_this.state.outstandingRequests;
+
+ // Create a new buffer to make sure the buffer isn't bigger than it needs
+ // to be.
+ var remnant = new Buffer(_this.pos);
+ _this.bufToStore.copy(remnant, 0, 0, _this.pos);
+ _this.md5.update(remnant);
+ var doc = createChunkDoc(_this.id, _this.n, remnant);
+
+ // If the stream was aborted, do not write remnant
+ if (checkAborted(_this, callback)) {
+ return false;
+ }
+
+ _this.chunks.insert(doc, getWriteOptions(_this), function(error) {
+ if (error) {
+ return __handleError(_this, error);
+ }
+ --_this.state.outstandingRequests;
+ checkDone(_this);
+ });
+}
+
+/**
+ * @ignore
+ */
+
+function checkAborted(_this, callback) {
+ if (_this.state.aborted) {
+ if(typeof callback == 'function') {
+ callback(new Error('this stream has been aborted'));
+ }
+ return true;
+ }
+ return false;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/gridfs/chunk.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/gridfs/chunk.js
new file mode 100644
index 0000000..9100197
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/gridfs/chunk.js
@@ -0,0 +1,230 @@
+"use strict";
+
+var Binary = require('mongodb-core').BSON.Binary,
+ ObjectID = require('mongodb-core').BSON.ObjectID;
+
+/**
+ * Class for representing a single chunk in GridFS.
+ *
+ * @class
+ *
+ * @param file {GridStore} The {@link GridStore} object holding this chunk.
+ * @param mongoObject {object} The mongo object representation of this chunk.
+ *
+ * @throws Error when the type of data field for {@link mongoObject} is not
+ * supported. Currently supported types for data field are instances of
+ * {@link String}, {@link Array}, {@link Binary} and {@link Binary}
+ * from the bson module
+ *
+ * @see Chunk#buildMongoObject
+ */
+var Chunk = function(file, mongoObject, writeConcern) {
+ if(!(this instanceof Chunk)) return new Chunk(file, mongoObject);
+
+ this.file = file;
+ var mongoObjectFinal = mongoObject == null ? {} : mongoObject;
+ this.writeConcern = writeConcern || {w:1};
+ this.objectId = mongoObjectFinal._id == null ? new ObjectID() : mongoObjectFinal._id;
+ this.chunkNumber = mongoObjectFinal.n == null ? 0 : mongoObjectFinal.n;
+ this.data = new Binary();
+
+ if(typeof mongoObjectFinal.data == "string") {
+ var buffer = new Buffer(mongoObjectFinal.data.length);
+ buffer.write(mongoObjectFinal.data, 0, mongoObjectFinal.data.length, 'binary');
+ this.data = new Binary(buffer);
+ } else if(Array.isArray(mongoObjectFinal.data)) {
+ buffer = new Buffer(mongoObjectFinal.data.length);
+ var data = mongoObjectFinal.data.join('');
+ buffer.write(data, 0, data.length, 'binary');
+ this.data = new Binary(buffer);
+ } else if(mongoObjectFinal.data && mongoObjectFinal.data._bsontype === 'Binary') {
+ this.data = mongoObjectFinal.data;
+ } else if(!Buffer.isBuffer(mongoObjectFinal.data) && !(mongoObjectFinal.data == null)){
+ throw Error("Illegal chunk format");
+ }
+
+ // Update position
+ this.internalPosition = 0;
+};
+
+/**
+ * Writes a data to this object and advance the read/write head.
+ *
+ * @param data {string} the data to write
+ * @param callback {function(*, GridStore)} This will be called after executing
+ * this method. The first parameter will contain null and the second one
+ * will contain a reference to this object.
+ */
+Chunk.prototype.write = function(data, callback) {
+ this.data.write(data, this.internalPosition, data.length, 'binary');
+ this.internalPosition = this.data.length();
+ if(callback != null) return callback(null, this);
+ return this;
+};
+
+/**
+ * Reads data and advances the read/write head.
+ *
+ * @param length {number} The length of data to read.
+ *
+ * @return {string} The data read if the given length will not exceed the end of
+ * the chunk. Returns an empty String otherwise.
+ */
+Chunk.prototype.read = function(length) {
+ // Default to full read if no index defined
+ length = length == null || length == 0 ? this.length() : length;
+
+ if(this.length() - this.internalPosition + 1 >= length) {
+ var data = this.data.read(this.internalPosition, length);
+ this.internalPosition = this.internalPosition + length;
+ return data;
+ } else {
+ return '';
+ }
+};
+
+Chunk.prototype.readSlice = function(length) {
+ if ((this.length() - this.internalPosition) >= length) {
+ var data = null;
+ if (this.data.buffer != null) { //Pure BSON
+ data = this.data.buffer.slice(this.internalPosition, this.internalPosition + length);
+ } else { //Native BSON
+ data = new Buffer(length);
+ length = this.data.readInto(data, this.internalPosition);
+ }
+ this.internalPosition = this.internalPosition + length;
+ return data;
+ } else {
+ return null;
+ }
+};
+
+/**
+ * Checks if the read/write head is at the end.
+ *
+ * @return {boolean} Whether the read/write head has reached the end of this
+ * chunk.
+ */
+Chunk.prototype.eof = function() {
+ return this.internalPosition == this.length() ? true : false;
+};
+
+/**
+ * Reads one character from the data of this chunk and advances the read/write
+ * head.
+ *
+ * @return {string} a single character data read if the the read/write head is
+ * not at the end of the chunk. Returns an empty String otherwise.
+ */
+Chunk.prototype.getc = function() {
+ return this.read(1);
+};
+
+/**
+ * Clears the contents of the data in this chunk and resets the read/write head
+ * to the initial position.
+ */
+Chunk.prototype.rewind = function() {
+ this.internalPosition = 0;
+ this.data = new Binary();
+};
+
+/**
+ * Saves this chunk to the database. Also overwrites existing entries having the
+ * same id as this chunk.
+ *
+ * @param callback {function(*, GridStore)} This will be called after executing
+ * this method. The first parameter will contain null and the second one
+ * will contain a reference to this object.
+ */
+Chunk.prototype.save = function(options, callback) {
+ var self = this;
+ if(typeof options == 'function') {
+ callback = options;
+ options = {};
+ }
+
+ self.file.chunkCollection(function(err, collection) {
+ if(err) return callback(err);
+
+ // Merge the options
+ var writeOptions = { upsert: true };
+ for(var name in options) writeOptions[name] = options[name];
+ for(name in self.writeConcern) writeOptions[name] = self.writeConcern[name];
+
+ if(self.data.length() > 0) {
+ self.buildMongoObject(function(mongoObject) {
+ var options = {forceServerObjectId:true};
+ for(var name in self.writeConcern) {
+ options[name] = self.writeConcern[name];
+ }
+
+ collection.replaceOne({'_id':self.objectId}, mongoObject, writeOptions, function(err) {
+ callback(err, self);
+ });
+ });
+ } else {
+ callback(null, self);
+ }
+ // });
+ });
+};
+
+/**
+ * Creates a mongoDB object representation of this chunk.
+ *
+ * @param callback {function(Object)} This will be called after executing this
+ * method. The object will be passed to the first parameter and will have
+ * the structure:
+ *
+ * <pre><code>
+ * {
+ * '_id' : , // {number} id for this chunk
+ * 'files_id' : , // {number} foreign key to the file collection
+ * 'n' : , // {number} chunk number
+ * 'data' : , // {bson#Binary} the chunk data itself
+ * }
+ * </code></pre>
+ *
+ * @see <a href="http://www.mongodb.org/display/DOCS/GridFS+Specification#GridFSSpecification-{{chunks}}">MongoDB GridFS Chunk Object Structure</a>
+ */
+Chunk.prototype.buildMongoObject = function(callback) {
+ var mongoObject = {
+ 'files_id': this.file.fileId,
+ 'n': this.chunkNumber,
+ 'data': this.data};
+ // If we are saving using a specific ObjectId
+ if(this.objectId != null) mongoObject._id = this.objectId;
+
+ callback(mongoObject);
+};
+
+/**
+ * @return {number} the length of the data
+ */
+Chunk.prototype.length = function() {
+ return this.data.length();
+};
+
+/**
+ * The position of the read/write head
+ * @name position
+ * @lends Chunk#
+ * @field
+ */
+Object.defineProperty(Chunk.prototype, "position", { enumerable: true
+ , get: function () {
+ return this.internalPosition;
+ }
+ , set: function(value) {
+ this.internalPosition = value;
+ }
+});
+
+/**
+ * The default chunk size
+ * @constant
+ */
+Chunk.DEFAULT_CHUNK_SIZE = 1024 * 255;
+
+module.exports = Chunk;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/gridfs/grid_store.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/gridfs/grid_store.js
new file mode 100644
index 0000000..27dd8ce
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/gridfs/grid_store.js
@@ -0,0 +1,1951 @@
+"use strict";
+
+/**
+ * @fileOverview GridFS is a tool for MongoDB to store files to the database.
+ * Because of the restrictions of the object size the database can hold, a
+ * facility to split a file into several chunks is needed. The {@link GridStore}
+ * class offers a simplified api to interact with files while managing the
+ * chunks of split files behind the scenes. More information about GridFS can be
+ * found <a href="http://www.mongodb.org/display/DOCS/GridFS">here</a>.
+ *
+ * @example
+ * var MongoClient = require('mongodb').MongoClient,
+ * GridStore = require('mongodb').GridStore,
+ * ObjectID = require('mongodb').ObjectID,
+ * test = require('assert');
+ *
+ * // Connection url
+ * var url = 'mongodb://localhost:27017/test';
+ * // Connect using MongoClient
+ * MongoClient.connect(url, function(err, db) {
+ * var gridStore = new GridStore(db, null, "w");
+ * gridStore.open(function(err, gridStore) {
+ * gridStore.write("hello world!", function(err, gridStore) {
+ * gridStore.close(function(err, result) {
+ *
+ * // Let's read the file using object Id
+ * GridStore.read(db, result._id, function(err, data) {
+ * test.equal('hello world!', data);
+ * db.close();
+ * test.done();
+ * });
+ * });
+ * });
+ * });
+ * });
+ */
+var Chunk = require('./chunk'),
+ ObjectID = require('mongodb-core').BSON.ObjectID,
+ ReadPreference = require('../read_preference'),
+ Buffer = require('buffer').Buffer,
+ Collection = require('../collection'),
+ fs = require('fs'),
+ f = require('util').format,
+ util = require('util'),
+ Define = require('../metadata'),
+ MongoError = require('mongodb-core').MongoError,
+ inherits = util.inherits,
+ Duplex = require('stream').Duplex || require('readable-stream').Duplex,
+ shallowClone = require('../utils').shallowClone;
+
+var REFERENCE_BY_FILENAME = 0,
+ REFERENCE_BY_ID = 1;
+
+/**
+ * Namespace provided by the mongodb-core and node.js
+ * @external Duplex
+ */
+
+/**
+ * Create a new GridStore instance
+ *
+ * Modes
+ * - **"r"** - read only. This is the default mode.
+ * - **"w"** - write in truncate mode. Existing data will be overwriten.
+ *
+ * @class
+ * @param {Db} db A database instance to interact with.
+ * @param {object} [id] optional unique id for this file
+ * @param {string} [filename] optional filename for this file, no unique constrain on the field
+ * @param {string} mode set the mode for this file.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.fsync=false] Specify a file sync write concern.
+ * @param {string} [options.root=null] Root collection to use. Defaults to **{GridStore.DEFAULT_ROOT_COLLECTION}**.
+ * @param {string} [options.content_type=null] MIME type of the file. Defaults to **{GridStore.DEFAULT_CONTENT_TYPE}**.
+ * @param {number} [options.chunk_size=261120] Size for the chunk. Defaults to **{Chunk.DEFAULT_CHUNK_SIZE}**.
+ * @param {object} [options.metadata=null] Arbitrary data the user wants to store.
+ * @param {object} [options.promiseLibrary=null] A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @property {number} chunkSize Get the gridstore chunk size.
+ * @property {number} md5 The md5 checksum for this file.
+ * @property {number} chunkNumber The current chunk number the gridstore has materialized into memory
+ * @return {GridStore} a GridStore instance.
+ * @deprecated Use GridFSBucket API instead
+ */
+var GridStore = function GridStore(db, id, filename, mode, options) {
+ if(!(this instanceof GridStore)) return new GridStore(db, id, filename, mode, options);
+ this.db = db;
+
+ // Handle options
+ if(typeof options === 'undefined') options = {};
+ // Handle mode
+ if(typeof mode === 'undefined') {
+ mode = filename;
+ filename = undefined;
+ } else if(typeof mode == 'object') {
+ options = mode;
+ mode = filename;
+ filename = undefined;
+ }
+
+ if(id && id._bsontype == 'ObjectID') {
+ this.referenceBy = REFERENCE_BY_ID;
+ this.fileId = id;
+ this.filename = filename;
+ } else if(typeof filename == 'undefined') {
+ this.referenceBy = REFERENCE_BY_FILENAME;
+ this.filename = id;
+ if (mode.indexOf('w') != null) {
+ this.fileId = new ObjectID();
+ }
+ } else {
+ this.referenceBy = REFERENCE_BY_ID;
+ this.fileId = id;
+ this.filename = filename;
+ }
+
+ // Set up the rest
+ this.mode = mode == null ? "r" : mode;
+ this.options = options || {};
+
+ // Opened
+ this.isOpen = false;
+
+ // Set the root if overridden
+ this.root = this.options['root'] == null ? GridStore.DEFAULT_ROOT_COLLECTION : this.options['root'];
+ this.position = 0;
+ this.readPreference = this.options.readPreference || db.options.readPreference || ReadPreference.PRIMARY;
+ this.writeConcern = _getWriteConcern(db, this.options);
+ // Set default chunk size
+ this.internalChunkSize = this.options['chunkSize'] == null ? Chunk.DEFAULT_CHUNK_SIZE : this.options['chunkSize'];
+
+ // Get the promiseLibrary
+ var promiseLibrary = this.options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // Set the promiseLibrary
+ this.promiseLibrary = promiseLibrary;
+
+ Object.defineProperty(this, "chunkSize", { enumerable: true
+ , get: function () {
+ return this.internalChunkSize;
+ }
+ , set: function(value) {
+ if(!(this.mode[0] == "w" && this.position == 0 && this.uploadDate == null)) {
+ this.internalChunkSize = this.internalChunkSize;
+ } else {
+ this.internalChunkSize = value;
+ }
+ }
+ });
+
+ Object.defineProperty(this, "md5", { enumerable: true
+ , get: function () {
+ return this.internalMd5;
+ }
+ });
+
+ Object.defineProperty(this, "chunkNumber", { enumerable: true
+ , get: function () {
+ return this.currentChunk && this.currentChunk.chunkNumber ? this.currentChunk.chunkNumber : null;
+ }
+ });
+}
+
+var define = GridStore.define = new Define('Gridstore', GridStore, true);
+
+/**
+ * The callback format for the Gridstore.open method
+ * @callback GridStore~openCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {GridStore} gridStore The GridStore instance if the open method was successful.
+ */
+
+/**
+ * Opens the file from the database and initialize this object. Also creates a
+ * new one if file does not exist.
+ *
+ * @method
+ * @param {GridStore~openCallback} [callback] this will be called after executing this method
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.open = function(callback) {
+ var self = this;
+ if( this.mode != "w" && this.mode != "w+" && this.mode != "r"){
+ throw MongoError.create({message: "Illegal mode " + this.mode, driver:true});
+ }
+
+ // We provided a callback leg
+ if(typeof callback == 'function') return open(self, callback);
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ open(self, function(err, store) {
+ if(err) return reject(err);
+ resolve(store);
+ })
+ });
+};
+
+var open = function(self, callback) {
+ // Get the write concern
+ var writeConcern = _getWriteConcern(self.db, self.options);
+
+ // If we are writing we need to ensure we have the right indexes for md5's
+ if((self.mode == "w" || self.mode == "w+")) {
+ // Get files collection
+ var collection = self.collection();
+ // Put index on filename
+ collection.ensureIndex([['filename', 1]], writeConcern, function() {
+ // Get chunk collection
+ var chunkCollection = self.chunkCollection();
+ // Make an unique index for compatibility with mongo-cxx-driver:legacy
+ var chunkIndexOptions = shallowClone(writeConcern);
+ chunkIndexOptions.unique = true;
+ // Ensure index on chunk collection
+ chunkCollection.ensureIndex([['files_id', 1], ['n', 1]], chunkIndexOptions, function() {
+ // Open the connection
+ _open(self, writeConcern, function(err, r) {
+ if(err) return callback(err);
+ self.isOpen = true;
+ callback(err, r);
+ });
+ });
+ });
+ } else {
+ // Open the gridstore
+ _open(self, writeConcern, function(err, r) {
+ if(err) return callback(err);
+ self.isOpen = true;
+ callback(err, r);
+ });
+ }
+}
+
+// Push the definition for open
+define.classMethod('open', {callback: true, promise:true});
+
+/**
+ * Verify if the file is at EOF.
+ *
+ * @method
+ * @return {boolean} true if the read/write head is at the end of this file.
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.eof = function() {
+ return this.position == this.length ? true : false;
+}
+
+define.classMethod('eof', {callback: false, promise:false, returns: [Boolean]});
+
+/**
+ * The callback result format.
+ * @callback GridStore~resultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {object} result The result from the callback.
+ */
+
+/**
+ * Retrieves a single character from this file.
+ *
+ * @method
+ * @param {GridStore~resultCallback} [callback] this gets called after this method is executed. Passes null to the first parameter and the character read to the second or null to the second if the read/write head is at the end of the file.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.getc = function(callback) {
+ var self = this;
+ // We provided a callback leg
+ if(typeof callback == 'function') return eof(self, callback);
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ eof(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+}
+
+var eof = function(self, callback) {
+ if(self.eof()) {
+ callback(null, null);
+ } else if(self.currentChunk.eof()) {
+ nthChunk(self, self.currentChunk.chunkNumber + 1, function(err, chunk) {
+ self.currentChunk = chunk;
+ self.position = self.position + 1;
+ callback(err, self.currentChunk.getc());
+ });
+ } else {
+ self.position = self.position + 1;
+ callback(null, self.currentChunk.getc());
+ }
+}
+
+define.classMethod('getc', {callback: true, promise:true});
+
+/**
+ * Writes a string to the file with a newline character appended at the end if
+ * the given string does not have one.
+ *
+ * @method
+ * @param {string} string the string to write.
+ * @param {GridStore~resultCallback} [callback] this will be called after executing this method. The first parameter will contain null and the second one will contain a reference to this object.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.puts = function(string, callback) {
+ var self = this;
+ var finalString = string.match(/\n$/) == null ? string + "\n" : string;
+ // We provided a callback leg
+ if(typeof callback == 'function') return this.write(finalString, callback);
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ self.write(finalString, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+}
+
+define.classMethod('puts', {callback: true, promise:true});
+
+/**
+ * Return a modified Readable stream including a possible transform method.
+ *
+ * @method
+ * @return {GridStoreStream}
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.stream = function() {
+ return new GridStoreStream(this);
+}
+
+define.classMethod('stream', {callback: false, promise:false, returns: [GridStoreStream]});
+
+/**
+ * Writes some data. This method will work properly only if initialized with mode "w" or "w+".
+ *
+ * @method
+ * @param {(string|Buffer)} data the data to write.
+ * @param {boolean} [close] closes this file after writing if set to true.
+ * @param {GridStore~resultCallback} [callback] this will be called after executing this method. The first parameter will contain null and the second one will contain a reference to this object.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.write = function write(data, close, callback) {
+ var self = this;
+ // We provided a callback leg
+ if(typeof callback == 'function') return _writeNormal(this, data, close, callback);
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ _writeNormal(self, data, close, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+}
+
+define.classMethod('write', {callback: true, promise:true});
+
+/**
+ * Handles the destroy part of a stream
+ *
+ * @method
+ * @result {null}
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.destroy = function destroy() {
+ // close and do not emit any more events. queued data is not sent.
+ if(!this.writable) return;
+ this.readable = false;
+ if(this.writable) {
+ this.writable = false;
+ this._q.length = 0;
+ this.emit('close');
+ }
+}
+
+define.classMethod('destroy', {callback: false, promise:false});
+
+/**
+ * Stores a file from the file system to the GridFS database.
+ *
+ * @method
+ * @param {(string|Buffer|FileHandle)} file the file to store.
+ * @param {GridStore~resultCallback} [callback] this will be called after executing this method. The first parameter will contain null and the second one will contain a reference to this object.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.writeFile = function (file, callback) {
+ var self = this;
+ // We provided a callback leg
+ if(typeof callback == 'function') return writeFile(self, file, callback);
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ writeFile(self, file, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+};
+
+var writeFile = function(self, file, callback) {
+ if (typeof file === 'string') {
+ fs.open(file, 'r', function (err, fd) {
+ if(err) return callback(err);
+ self.writeFile(fd, callback);
+ });
+ return;
+ }
+
+ self.open(function (err, self) {
+ if(err) return callback(err, self);
+
+ fs.fstat(file, function (err, stats) {
+ if(err) return callback(err, self);
+
+ var offset = 0;
+ var index = 0;
+
+ // Write a chunk
+ var writeChunk = function() {
+ fs.read(file, self.chunkSize, offset, 'binary', function(err, data, bytesRead) {
+ if(err) return callback(err, self);
+
+ offset = offset + bytesRead;
+
+ // Create a new chunk for the data
+ var chunk = new Chunk(self, {n:index++}, self.writeConcern);
+ chunk.write(data, function(err, chunk) {
+ if(err) return callback(err, self);
+
+ chunk.save({}, function(err) {
+ if(err) return callback(err, self);
+
+ self.position = self.position + data.length;
+
+ // Point to current chunk
+ self.currentChunk = chunk;
+
+ if(offset >= stats.size) {
+ fs.close(file);
+ self.close(function(err) {
+ if(err) return callback(err, self);
+ return callback(null, self);
+ });
+ } else {
+ return process.nextTick(writeChunk);
+ }
+ });
+ });
+ });
+ }
+
+ // Process the first write
+ process.nextTick(writeChunk);
+ });
+ });
+}
+
+define.classMethod('writeFile', {callback: true, promise:true});
+
+/**
+ * Saves this file to the database. This will overwrite the old entry if it
+ * already exists. This will work properly only if mode was initialized to
+ * "w" or "w+".
+ *
+ * @method
+ * @param {GridStore~resultCallback} [callback] this will be called after executing this method. The first parameter will contain null and the second one will contain a reference to this object.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.close = function(callback) {
+ var self = this;
+ // We provided a callback leg
+ if(typeof callback == 'function') return close(self, callback);
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ close(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+};
+
+var close = function(self, callback) {
+ if(self.mode[0] == "w") {
+ // Set up options
+ var options = self.writeConcern;
+
+ if(self.currentChunk != null && self.currentChunk.position > 0) {
+ self.currentChunk.save({}, function(err) {
+ if(err && typeof callback == 'function') return callback(err);
+
+ self.collection(function(err, files) {
+ if(err && typeof callback == 'function') return callback(err);
+
+ // Build the mongo object
+ if(self.uploadDate != null) {
+ buildMongoObject(self, function(err, mongoObject) {
+ if(err) {
+ if(typeof callback == 'function') return callback(err); else throw err;
+ }
+
+ files.save(mongoObject, options, function(err) {
+ if(typeof callback == 'function')
+ callback(err, mongoObject);
+ });
+ });
+ } else {
+ self.uploadDate = new Date();
+ buildMongoObject(self, function(err, mongoObject) {
+ if(err) {
+ if(typeof callback == 'function') return callback(err); else throw err;
+ }
+
+ files.save(mongoObject, options, function(err) {
+ if(typeof callback == 'function')
+ callback(err, mongoObject);
+ });
+ });
+ }
+ });
+ });
+ } else {
+ self.collection(function(err, files) {
+ if(err && typeof callback == 'function') return callback(err);
+
+ self.uploadDate = new Date();
+ buildMongoObject(self, function(err, mongoObject) {
+ if(err) {
+ if(typeof callback == 'function') return callback(err); else throw err;
+ }
+
+ files.save(mongoObject, options, function(err) {
+ if(typeof callback == 'function')
+ callback(err, mongoObject);
+ });
+ });
+ });
+ }
+ } else if(self.mode[0] == "r") {
+ if(typeof callback == 'function')
+ callback(null, null);
+ } else {
+ if(typeof callback == 'function')
+ callback(MongoError.create({message: f("Illegal mode %s", self.mode), driver:true}));
+ }
+}
+
+define.classMethod('close', {callback: true, promise:true});
+
+/**
+ * The collection callback format.
+ * @callback GridStore~collectionCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Collection} collection The collection from the command execution.
+ */
+
+/**
+ * Retrieve this file's chunks collection.
+ *
+ * @method
+ * @param {GridStore~collectionCallback} callback the command callback.
+ * @return {Collection}
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.chunkCollection = function(callback) {
+ if(typeof callback == 'function')
+ return this.db.collection((this.root + ".chunks"), callback);
+ return this.db.collection((this.root + ".chunks"));
+};
+
+define.classMethod('chunkCollection', {callback: true, promise:false, returns: [Collection]});
+
+/**
+ * Deletes all the chunks of this file in the database.
+ *
+ * @method
+ * @param {GridStore~resultCallback} [callback] the command callback.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.unlink = function(callback) {
+ var self = this;
+ // We provided a callback leg
+ if(typeof callback == 'function') return unlink(self, callback);
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ unlink(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+};
+
+var unlink = function(self, callback) {
+ deleteChunks(self, function(err) {
+ if(err!==null) {
+ err.message = "at deleteChunks: " + err.message;
+ return callback(err);
+ }
+
+ self.collection(function(err, collection) {
+ if(err!==null) {
+ err.message = "at collection: " + err.message;
+ return callback(err);
+ }
+
+ collection.remove({'_id':self.fileId}, self.writeConcern, function(err) {
+ callback(err, self);
+ });
+ });
+ });
+}
+
+define.classMethod('unlink', {callback: true, promise:true});
+
+/**
+ * Retrieves the file collection associated with this object.
+ *
+ * @method
+ * @param {GridStore~collectionCallback} callback the command callback.
+ * @return {Collection}
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.collection = function(callback) {
+ if(typeof callback == 'function')
+ this.db.collection(this.root + ".files", callback);
+ return this.db.collection(this.root + ".files");
+};
+
+define.classMethod('collection', {callback: true, promise:false, returns: [Collection]});
+
+/**
+ * The readlines callback format.
+ * @callback GridStore~readlinesCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {string[]} strings The array of strings returned.
+ */
+
+/**
+ * Read the entire file as a list of strings splitting by the provided separator.
+ *
+ * @method
+ * @param {string} [separator] The character to be recognized as the newline separator.
+ * @param {GridStore~readlinesCallback} [callback] the command callback.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.readlines = function(separator, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 0);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ separator = args.length ? args.shift() : "\n";
+ separator = separator || "\n";
+
+ // We provided a callback leg
+ if(typeof callback == 'function') return readlines(self, separator, callback);
+
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ readlines(self, separator, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+};
+
+var readlines = function(self, separator, callback) {
+ self.read(function(err, data) {
+ if(err) return callback(err);
+
+ var items = data.toString().split(separator);
+ items = items.length > 0 ? items.splice(0, items.length - 1) : [];
+ for(var i = 0; i < items.length; i++) {
+ items[i] = items[i] + separator;
+ }
+
+ callback(null, items);
+ });
+}
+
+define.classMethod('readlines', {callback: true, promise:true});
+
+/**
+ * Deletes all the chunks of this file in the database if mode was set to "w" or
+ * "w+" and resets the read/write head to the initial position.
+ *
+ * @method
+ * @param {GridStore~resultCallback} [callback] this will be called after executing this method. The first parameter will contain null and the second one will contain a reference to this object.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.rewind = function(callback) {
+ var self = this;
+ // We provided a callback leg
+ if(typeof callback == 'function') return rewind(self, callback);
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ rewind(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+};
+
+var rewind = function(self, callback) {
+ if(self.currentChunk.chunkNumber != 0) {
+ if(self.mode[0] == "w") {
+ deleteChunks(self, function(err) {
+ if(err) return callback(err);
+ self.currentChunk = new Chunk(self, {'n': 0}, self.writeConcern);
+ self.position = 0;
+ callback(null, self);
+ });
+ } else {
+ self.currentChunk(0, function(err, chunk) {
+ if(err) return callback(err);
+ self.currentChunk = chunk;
+ self.currentChunk.rewind();
+ self.position = 0;
+ callback(null, self);
+ });
+ }
+ } else {
+ self.currentChunk.rewind();
+ self.position = 0;
+ callback(null, self);
+ }
+}
+
+define.classMethod('rewind', {callback: true, promise:true});
+
+/**
+ * The read callback format.
+ * @callback GridStore~readCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Buffer} data The data read from the GridStore object
+ */
+
+/**
+ * Retrieves the contents of this file and advances the read/write head. Works with Buffers only.
+ *
+ * There are 3 signatures for this method:
+ *
+ * (callback)
+ * (length, callback)
+ * (length, buffer, callback)
+ *
+ * @method
+ * @param {number} [length] the number of characters to read. Reads all the characters from the read/write head to the EOF if not specified.
+ * @param {(string|Buffer)} [buffer] a string to hold temporary data. This is used for storing the string data read so far when recursively calling this method.
+ * @param {GridStore~readCallback} [callback] the command callback.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.read = function(length, buffer, callback) {
+ var self = this;
+
+ var args = Array.prototype.slice.call(arguments, 0);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ length = args.length ? args.shift() : null;
+ buffer = args.length ? args.shift() : null;
+ // We provided a callback leg
+ if(typeof callback == 'function') return read(self, length, buffer, callback);
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ read(self, length, buffer, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+}
+
+var read = function(self, length, buffer, callback) {
+ // The data is a c-terminated string and thus the length - 1
+ var finalLength = length == null ? self.length - self.position : length;
+ var finalBuffer = buffer == null ? new Buffer(finalLength) : buffer;
+ // Add a index to buffer to keep track of writing position or apply current index
+ finalBuffer._index = buffer != null && buffer._index != null ? buffer._index : 0;
+
+ if((self.currentChunk.length() - self.currentChunk.position + finalBuffer._index) >= finalLength) {
+ var slice = self.currentChunk.readSlice(finalLength - finalBuffer._index);
+ // Copy content to final buffer
+ slice.copy(finalBuffer, finalBuffer._index);
+ // Update internal position
+ self.position = self.position + finalBuffer.length;
+ // Check if we don't have a file at all
+ if(finalLength == 0 && finalBuffer.length == 0) return callback(MongoError.create({message: "File does not exist", driver:true}), null);
+ // Else return data
+ return callback(null, finalBuffer);
+ }
+
+ // Read the next chunk
+ slice = self.currentChunk.readSlice(self.currentChunk.length() - self.currentChunk.position);
+ // Copy content to final buffer
+ slice.copy(finalBuffer, finalBuffer._index);
+ // Update index position
+ finalBuffer._index += slice.length;
+
+ // Load next chunk and read more
+ nthChunk(self, self.currentChunk.chunkNumber + 1, function(err, chunk) {
+ if(err) return callback(err);
+
+ if(chunk.length() > 0) {
+ self.currentChunk = chunk;
+ self.read(length, finalBuffer, callback);
+ } else {
+ if(finalBuffer._index > 0) {
+ callback(null, finalBuffer)
+ } else {
+ callback(MongoError.create({message: "no chunks found for file, possibly corrupt", driver:true}), null);
+ }
+ }
+ });
+}
+
+define.classMethod('read', {callback: true, promise:true});
+
+/**
+ * The tell callback format.
+ * @callback GridStore~tellCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {number} position The current read position in the GridStore.
+ */
+
+/**
+ * Retrieves the position of the read/write head of this file.
+ *
+ * @method
+ * @param {number} [length] the number of characters to read. Reads all the characters from the read/write head to the EOF if not specified.
+ * @param {(string|Buffer)} [buffer] a string to hold temporary data. This is used for storing the string data read so far when recursively calling this method.
+ * @param {GridStore~tellCallback} [callback] the command callback.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.tell = function(callback) {
+ var self = this;
+ // We provided a callback leg
+ if(typeof callback == 'function') return callback(null, this.position);
+ // Return promise
+ return new self.promiseLibrary(function(resolve) {
+ resolve(self.position);
+ });
+};
+
+define.classMethod('tell', {callback: true, promise:true});
+
+/**
+ * The tell callback format.
+ * @callback GridStore~gridStoreCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {GridStore} gridStore The gridStore.
+ */
+
+/**
+ * Moves the read/write head to a new location.
+ *
+ * There are 3 signatures for this method
+ *
+ * Seek Location Modes
+ * - **GridStore.IO_SEEK_SET**, **(default)** set the position from the start of the file.
+ * - **GridStore.IO_SEEK_CUR**, set the position from the current position in the file.
+ * - **GridStore.IO_SEEK_END**, set the position from the end of the file.
+ *
+ * @method
+ * @param {number} [position] the position to seek to
+ * @param {number} [seekLocation] seek mode. Use one of the Seek Location modes.
+ * @param {GridStore~gridStoreCallback} [callback] the command callback.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.seek = function(position, seekLocation, callback) {
+ var self = this;
+
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ seekLocation = args.length ? args.shift() : null;
+
+ // We provided a callback leg
+ if(typeof callback == 'function') return seek(self, position, seekLocation, callback);
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ seek(self, position, seekLocation, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+}
+
+var seek = function(self, position, seekLocation, callback) {
+ // Seek only supports read mode
+ if(self.mode != 'r') {
+ return callback(MongoError.create({message: "seek is only supported for mode r", driver:true}))
+ }
+
+ var seekLocationFinal = seekLocation == null ? GridStore.IO_SEEK_SET : seekLocation;
+ var finalPosition = position;
+ var targetPosition = 0;
+
+ // Calculate the position
+ if(seekLocationFinal == GridStore.IO_SEEK_CUR) {
+ targetPosition = self.position + finalPosition;
+ } else if(seekLocationFinal == GridStore.IO_SEEK_END) {
+ targetPosition = self.length + finalPosition;
+ } else {
+ targetPosition = finalPosition;
+ }
+
+ // Get the chunk
+ var newChunkNumber = Math.floor(targetPosition/self.chunkSize);
+ var seekChunk = function() {
+ nthChunk(self, newChunkNumber, function(err, chunk) {
+ if(err) return callback(err, null);
+ if(chunk == null) return callback(new Error('no chunk found'));
+
+ // Set the current chunk
+ self.currentChunk = chunk;
+ self.position = targetPosition;
+ self.currentChunk.position = (self.position % self.chunkSize);
+ callback(err, self);
+ });
+ };
+
+ seekChunk();
+}
+
+define.classMethod('seek', {callback: true, promise:true});
+
+/**
+ * @ignore
+ */
+var _open = function(self, options, callback) {
+ var collection = self.collection();
+ // Create the query
+ var query = self.referenceBy == REFERENCE_BY_ID ? {_id:self.fileId} : {filename:self.filename};
+ query = null == self.fileId && self.filename == null ? null : query;
+ options.readPreference = self.readPreference;
+
+ // Fetch the chunks
+ if(query != null) {
+ collection.findOne(query, options, function(err, doc) {
+ if(err) return error(err);
+
+ // Check if the collection for the files exists otherwise prepare the new one
+ if(doc != null) {
+ self.fileId = doc._id;
+ // Prefer a new filename over the existing one if this is a write
+ self.filename = ((self.mode == 'r') || (self.filename == undefined)) ? doc.filename : self.filename;
+ self.contentType = doc.contentType;
+ self.internalChunkSize = doc.chunkSize;
+ self.uploadDate = doc.uploadDate;
+ self.aliases = doc.aliases;
+ self.length = doc.length;
+ self.metadata = doc.metadata;
+ self.internalMd5 = doc.md5;
+ } else if (self.mode != 'r') {
+ self.fileId = self.fileId == null ? new ObjectID() : self.fileId;
+ self.contentType = GridStore.DEFAULT_CONTENT_TYPE;
+ self.internalChunkSize = self.internalChunkSize == null ? Chunk.DEFAULT_CHUNK_SIZE : self.internalChunkSize;
+ self.length = 0;
+ } else {
+ self.length = 0;
+ var txtId = self.fileId._bsontype == "ObjectID" ? self.fileId.toHexString() : self.fileId;
+ return error(MongoError.create({message: f("file with id %s not opened for writing", (self.referenceBy == REFERENCE_BY_ID ? txtId : self.filename)), driver:true}), self);
+ }
+
+ // Process the mode of the object
+ if(self.mode == "r") {
+ nthChunk(self, 0, options, function(err, chunk) {
+ if(err) return error(err);
+ self.currentChunk = chunk;
+ self.position = 0;
+ callback(null, self);
+ });
+ } else if(self.mode == "w" && doc) {
+ // Delete any existing chunks
+ deleteChunks(self, options, function(err) {
+ if(err) return error(err);
+ self.currentChunk = new Chunk(self, {'n':0}, self.writeConcern);
+ self.contentType = self.options['content_type'] == null ? self.contentType : self.options['content_type'];
+ self.internalChunkSize = self.options['chunk_size'] == null ? self.internalChunkSize : self.options['chunk_size'];
+ self.metadata = self.options['metadata'] == null ? self.metadata : self.options['metadata'];
+ self.aliases = self.options['aliases'] == null ? self.aliases : self.options['aliases'];
+ self.position = 0;
+ callback(null, self);
+ });
+ } else if(self.mode == "w") {
+ self.currentChunk = new Chunk(self, {'n':0}, self.writeConcern);
+ self.contentType = self.options['content_type'] == null ? self.contentType : self.options['content_type'];
+ self.internalChunkSize = self.options['chunk_size'] == null ? self.internalChunkSize : self.options['chunk_size'];
+ self.metadata = self.options['metadata'] == null ? self.metadata : self.options['metadata'];
+ self.aliases = self.options['aliases'] == null ? self.aliases : self.options['aliases'];
+ self.position = 0;
+ callback(null, self);
+ } else if(self.mode == "w+") {
+ nthChunk(self, lastChunkNumber(self), options, function(err, chunk) {
+ if(err) return error(err);
+ // Set the current chunk
+ self.currentChunk = chunk == null ? new Chunk(self, {'n':0}, self.writeConcern) : chunk;
+ self.currentChunk.position = self.currentChunk.data.length();
+ self.metadata = self.options['metadata'] == null ? self.metadata : self.options['metadata'];
+ self.aliases = self.options['aliases'] == null ? self.aliases : self.options['aliases'];
+ self.position = self.length;
+ callback(null, self);
+ });
+ }
+ });
+ } else {
+ // Write only mode
+ self.fileId = null == self.fileId ? new ObjectID() : self.fileId;
+ self.contentType = GridStore.DEFAULT_CONTENT_TYPE;
+ self.internalChunkSize = self.internalChunkSize == null ? Chunk.DEFAULT_CHUNK_SIZE : self.internalChunkSize;
+ self.length = 0;
+
+ // No file exists set up write mode
+ if(self.mode == "w") {
+ // Delete any existing chunks
+ deleteChunks(self, options, function(err) {
+ if(err) return error(err);
+ self.currentChunk = new Chunk(self, {'n':0}, self.writeConcern);
+ self.contentType = self.options['content_type'] == null ? self.contentType : self.options['content_type'];
+ self.internalChunkSize = self.options['chunk_size'] == null ? self.internalChunkSize : self.options['chunk_size'];
+ self.metadata = self.options['metadata'] == null ? self.metadata : self.options['metadata'];
+ self.aliases = self.options['aliases'] == null ? self.aliases : self.options['aliases'];
+ self.position = 0;
+ callback(null, self);
+ });
+ } else if(self.mode == "w+") {
+ nthChunk(self, lastChunkNumber(self), options, function(err, chunk) {
+ if(err) return error(err);
+ // Set the current chunk
+ self.currentChunk = chunk == null ? new Chunk(self, {'n':0}, self.writeConcern) : chunk;
+ self.currentChunk.position = self.currentChunk.data.length();
+ self.metadata = self.options['metadata'] == null ? self.metadata : self.options['metadata'];
+ self.aliases = self.options['aliases'] == null ? self.aliases : self.options['aliases'];
+ self.position = self.length;
+ callback(null, self);
+ });
+ }
+ }
+
+ // only pass error to callback once
+ function error (err) {
+ if(error.err) return;
+ callback(error.err = err);
+ }
+};
+
+/**
+ * @ignore
+ */
+var writeBuffer = function(self, buffer, close, callback) {
+ if(typeof close === "function") { callback = close; close = null; }
+ var finalClose = typeof close == 'boolean' ? close : false;
+
+ if(self.mode != "w") {
+ callback(MongoError.create({message: f("file with id %s not opened for writing", (self.referenceBy == REFERENCE_BY_ID ? self.referenceBy : self.filename)), driver:true}), null);
+ } else {
+ if(self.currentChunk.position + buffer.length >= self.chunkSize) {
+ // Write out the current Chunk and then keep writing until we have less data left than a chunkSize left
+ // to a new chunk (recursively)
+ var previousChunkNumber = self.currentChunk.chunkNumber;
+ var leftOverDataSize = self.chunkSize - self.currentChunk.position;
+ var firstChunkData = buffer.slice(0, leftOverDataSize);
+ var leftOverData = buffer.slice(leftOverDataSize);
+ // A list of chunks to write out
+ var chunksToWrite = [self.currentChunk.write(firstChunkData)];
+ // If we have more data left than the chunk size let's keep writing new chunks
+ while(leftOverData.length >= self.chunkSize) {
+ // Create a new chunk and write to it
+ var newChunk = new Chunk(self, {'n': (previousChunkNumber + 1)}, self.writeConcern);
+ firstChunkData = leftOverData.slice(0, self.chunkSize);
+ leftOverData = leftOverData.slice(self.chunkSize);
+ // Update chunk number
+ previousChunkNumber = previousChunkNumber + 1;
+ // Write data
+ newChunk.write(firstChunkData);
+ // Push chunk to save list
+ chunksToWrite.push(newChunk);
+ }
+
+ // Set current chunk with remaining data
+ self.currentChunk = new Chunk(self, {'n': (previousChunkNumber + 1)}, self.writeConcern);
+ // If we have left over data write it
+ if(leftOverData.length > 0) self.currentChunk.write(leftOverData);
+
+ // Update the position for the gridstore
+ self.position = self.position + buffer.length;
+ // Total number of chunks to write
+ var numberOfChunksToWrite = chunksToWrite.length;
+
+ for(var i = 0; i < chunksToWrite.length; i++) {
+ chunksToWrite[i].save({}, function(err) {
+ if(err) return callback(err);
+
+ numberOfChunksToWrite = numberOfChunksToWrite - 1;
+
+ if(numberOfChunksToWrite <= 0) {
+ // We care closing the file before returning
+ if(finalClose) {
+ return self.close(function(err) {
+ callback(err, self);
+ });
+ }
+
+ // Return normally
+ return callback(null, self);
+ }
+ });
+ }
+ } else {
+ // Update the position for the gridstore
+ self.position = self.position + buffer.length;
+ // We have less data than the chunk size just write it and callback
+ self.currentChunk.write(buffer);
+ // We care closing the file before returning
+ if(finalClose) {
+ return self.close(function(err) {
+ callback(err, self);
+ });
+ }
+ // Return normally
+ return callback(null, self);
+ }
+ }
+};
+
+/**
+ * Creates a mongoDB object representation of this object.
+ *
+ * <pre><code>
+ * {
+ * '_id' : , // {number} id for this file
+ * 'filename' : , // {string} name for this file
+ * 'contentType' : , // {string} mime type for this file
+ * 'length' : , // {number} size of this file?
+ * 'chunksize' : , // {number} chunk size used by this file
+ * 'uploadDate' : , // {Date}
+ * 'aliases' : , // {array of string}
+ * 'metadata' : , // {string}
+ * }
+ * </code></pre>
+ *
+ * @ignore
+ */
+var buildMongoObject = function(self, callback) {
+ // Calcuate the length
+ var mongoObject = {
+ '_id': self.fileId,
+ 'filename': self.filename,
+ 'contentType': self.contentType,
+ 'length': self.position ? self.position : 0,
+ 'chunkSize': self.chunkSize,
+ 'uploadDate': self.uploadDate,
+ 'aliases': self.aliases,
+ 'metadata': self.metadata
+ };
+
+ var md5Command = {filemd5:self.fileId, root:self.root};
+ self.db.command(md5Command, function(err, results) {
+ if(err) return callback(err);
+
+ mongoObject.md5 = results.md5;
+ callback(null, mongoObject);
+ });
+};
+
+/**
+ * Gets the nth chunk of this file.
+ * @ignore
+ */
+var nthChunk = function(self, chunkNumber, options, callback) {
+ if(typeof options == 'function') {
+ callback = options;
+ options = {};
+ }
+
+ options = options || self.writeConcern;
+ options.readPreference = self.readPreference;
+ // Get the nth chunk
+ self.chunkCollection().findOne({'files_id':self.fileId, 'n':chunkNumber}, options, function(err, chunk) {
+ if(err) return callback(err);
+
+ var finalChunk = chunk == null ? {} : chunk;
+ callback(null, new Chunk(self, finalChunk, self.writeConcern));
+ });
+};
+
+/**
+ * @ignore
+ */
+var lastChunkNumber = function(self) {
+ return Math.floor((self.length ? self.length - 1 : 0)/self.chunkSize);
+};
+
+/**
+ * Deletes all the chunks of this file in the database.
+ *
+ * @ignore
+ */
+var deleteChunks = function(self, options, callback) {
+ if(typeof options == 'function') {
+ callback = options;
+ options = {};
+ }
+
+ options = options || self.writeConcern;
+
+ if(self.fileId != null) {
+ self.chunkCollection().remove({'files_id':self.fileId}, options, function(err) {
+ if(err) return callback(err, false);
+ callback(null, true);
+ });
+ } else {
+ callback(null, true);
+ }
+};
+
+/**
+* The collection to be used for holding the files and chunks collection.
+*
+* @classconstant DEFAULT_ROOT_COLLECTION
+**/
+GridStore.DEFAULT_ROOT_COLLECTION = 'fs';
+
+/**
+* Default file mime type
+*
+* @classconstant DEFAULT_CONTENT_TYPE
+**/
+GridStore.DEFAULT_CONTENT_TYPE = 'binary/octet-stream';
+
+/**
+* Seek mode where the given length is absolute.
+*
+* @classconstant IO_SEEK_SET
+**/
+GridStore.IO_SEEK_SET = 0;
+
+/**
+* Seek mode where the given length is an offset to the current read/write head.
+*
+* @classconstant IO_SEEK_CUR
+**/
+GridStore.IO_SEEK_CUR = 1;
+
+/**
+* Seek mode where the given length is an offset to the end of the file.
+*
+* @classconstant IO_SEEK_END
+**/
+GridStore.IO_SEEK_END = 2;
+
+/**
+ * Checks if a file exists in the database.
+ *
+ * @method
+ * @static
+ * @param {Db} db the database to query.
+ * @param {string} name The name of the file to look for.
+ * @param {string} [rootCollection] The root collection that holds the files and chunks collection. Defaults to **{GridStore.DEFAULT_ROOT_COLLECTION}**.
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {object} [options.promiseLibrary=null] A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible
+ * @param {GridStore~resultCallback} [callback] result from exists.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.exist = function(db, fileIdObject, rootCollection, options, callback) {
+ var args = Array.prototype.slice.call(arguments, 2);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ rootCollection = args.length ? args.shift() : null;
+ options = args.length ? args.shift() : {};
+ options = options || {};
+
+ // Get the promiseLibrary
+ var promiseLibrary = options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // We provided a callback leg
+ if(typeof callback == 'function') return exists(db, fileIdObject, rootCollection, options, callback);
+ // Return promise
+ return new promiseLibrary(function(resolve, reject) {
+ exists(db, fileIdObject, rootCollection, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+};
+
+var exists = function(db, fileIdObject, rootCollection, options, callback) {
+ // Establish read preference
+ var readPreference = options.readPreference || ReadPreference.PRIMARY;
+ // Fetch collection
+ var rootCollectionFinal = rootCollection != null ? rootCollection : GridStore.DEFAULT_ROOT_COLLECTION;
+ db.collection(rootCollectionFinal + ".files", function(err, collection) {
+ if(err) return callback(err);
+
+ // Build query
+ var query = (typeof fileIdObject == 'string' || Object.prototype.toString.call(fileIdObject) == '[object RegExp]' )
+ ? {'filename':fileIdObject}
+ : {'_id':fileIdObject}; // Attempt to locate file
+
+ // We have a specific query
+ if(fileIdObject != null
+ && typeof fileIdObject == 'object'
+ && Object.prototype.toString.call(fileIdObject) != '[object RegExp]') {
+ query = fileIdObject;
+ }
+
+ // Check if the entry exists
+ collection.findOne(query, {readPreference:readPreference}, function(err, item) {
+ if(err) return callback(err);
+ callback(null, item == null ? false : true);
+ });
+ });
+}
+
+define.staticMethod('exist', {callback: true, promise:true});
+
+/**
+ * Gets the list of files stored in the GridFS.
+ *
+ * @method
+ * @static
+ * @param {Db} db the database to query.
+ * @param {string} [rootCollection] The root collection that holds the files and chunks collection. Defaults to **{GridStore.DEFAULT_ROOT_COLLECTION}**.
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {object} [options.promiseLibrary=null] A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible
+ * @param {GridStore~resultCallback} [callback] result from exists.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.list = function(db, rootCollection, options, callback) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ rootCollection = args.length ? args.shift() : null;
+ options = args.length ? args.shift() : {};
+ options = options || {};
+
+ // Get the promiseLibrary
+ var promiseLibrary = options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // We provided a callback leg
+ if(typeof callback == 'function') return list(db, rootCollection, options, callback);
+ // Return promise
+ return new promiseLibrary(function(resolve, reject) {
+ list(db, rootCollection, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+};
+
+var list = function(db, rootCollection, options, callback) {
+ // Ensure we have correct values
+ if(rootCollection != null && typeof rootCollection == 'object') {
+ options = rootCollection;
+ rootCollection = null;
+ }
+
+ // Establish read preference
+ var readPreference = options.readPreference || ReadPreference.PRIMARY;
+ // Check if we are returning by id not filename
+ var byId = options['id'] != null ? options['id'] : false;
+ // Fetch item
+ var rootCollectionFinal = rootCollection != null ? rootCollection : GridStore.DEFAULT_ROOT_COLLECTION;
+ var items = [];
+ db.collection((rootCollectionFinal + ".files"), function(err, collection) {
+ if(err) return callback(err);
+
+ collection.find({}, {readPreference:readPreference}, function(err, cursor) {
+ if(err) return callback(err);
+
+ cursor.each(function(err, item) {
+ if(item != null) {
+ items.push(byId ? item._id : item.filename);
+ } else {
+ callback(err, items);
+ }
+ });
+ });
+ });
+}
+
+define.staticMethod('list', {callback: true, promise:true});
+
+/**
+ * Reads the contents of a file.
+ *
+ * This method has the following signatures
+ *
+ * (db, name, callback)
+ * (db, name, length, callback)
+ * (db, name, length, offset, callback)
+ * (db, name, length, offset, options, callback)
+ *
+ * @method
+ * @static
+ * @param {Db} db the database to query.
+ * @param {string} name The name of the file.
+ * @param {number} [length] The size of data to read.
+ * @param {number} [offset] The offset from the head of the file of which to start reading from.
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {object} [options.promiseLibrary=null] A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible
+ * @param {GridStore~readCallback} [callback] the command callback.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.read = function(db, name, length, offset, options, callback) {
+ var args = Array.prototype.slice.call(arguments, 2);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ length = args.length ? args.shift() : null;
+ offset = args.length ? args.shift() : null;
+ options = args.length ? args.shift() : null;
+ options = options || {};
+
+ // Get the promiseLibrary
+ var promiseLibrary = options ? options.promiseLibrary : null;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // We provided a callback leg
+ if(typeof callback == 'function') return readStatic(db, name, length, offset, options, callback);
+ // Return promise
+ return new promiseLibrary(function(resolve, reject) {
+ readStatic(db, name, length, offset, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+};
+
+var readStatic = function(db, name, length, offset, options, callback) {
+ new GridStore(db, name, "r", options).open(function(err, gridStore) {
+ if(err) return callback(err);
+ // Make sure we are not reading out of bounds
+ if(offset && offset >= gridStore.length) return callback("offset larger than size of file", null);
+ if(length && length > gridStore.length) return callback("length is larger than the size of the file", null);
+ if(offset && length && (offset + length) > gridStore.length) return callback("offset and length is larger than the size of the file", null);
+
+ if(offset != null) {
+ gridStore.seek(offset, function(err, gridStore) {
+ if(err) return callback(err);
+ gridStore.read(length, callback);
+ });
+ } else {
+ gridStore.read(length, callback);
+ }
+ });
+}
+
+define.staticMethod('read', {callback: true, promise:true});
+
+/**
+ * Read the entire file as a list of strings splitting by the provided separator.
+ *
+ * @method
+ * @static
+ * @param {Db} db the database to query.
+ * @param {(String|object)} name the name of the file.
+ * @param {string} [separator] The character to be recognized as the newline separator.
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {object} [options.promiseLibrary=null] A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible
+ * @param {GridStore~readlinesCallback} [callback] the command callback.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.readlines = function(db, name, separator, options, callback) {
+ var args = Array.prototype.slice.call(arguments, 2);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ separator = args.length ? args.shift() : null;
+ options = args.length ? args.shift() : null;
+ options = options || {};
+
+ // Get the promiseLibrary
+ var promiseLibrary = options ? options.promiseLibrary : null;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // We provided a callback leg
+ if(typeof callback == 'function') return readlinesStatic(db, name, separator, options, callback);
+ // Return promise
+ return new promiseLibrary(function(resolve, reject) {
+ readlinesStatic(db, name, separator, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+};
+
+var readlinesStatic = function(db, name, separator, options, callback) {
+ var finalSeperator = separator == null ? "\n" : separator;
+ new GridStore(db, name, "r", options).open(function(err, gridStore) {
+ if(err) return callback(err);
+ gridStore.readlines(finalSeperator, callback);
+ });
+}
+
+define.staticMethod('readlines', {callback: true, promise:true});
+
+/**
+ * Deletes the chunks and metadata information of a file from GridFS.
+ *
+ * @method
+ * @static
+ * @param {Db} db The database to query.
+ * @param {(string|array)} names The name/names of the files to delete.
+ * @param {object} [options=null] Optional settings.
+ * @param {object} [options.promiseLibrary=null] A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible
+ * @param {GridStore~resultCallback} [callback] the command callback.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.unlink = function(db, names, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 2);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ options = args.length ? args.shift() : {};
+ options = options || {};
+
+ // Get the promiseLibrary
+ var promiseLibrary = options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // We provided a callback leg
+ if(typeof callback == 'function') return unlinkStatic(self, db, names, options, callback);
+
+ // Return promise
+ return new promiseLibrary(function(resolve, reject) {
+ unlinkStatic(self, db, names, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+};
+
+var unlinkStatic = function(self, db, names, options, callback) {
+ // Get the write concern
+ var writeConcern = _getWriteConcern(db, options);
+
+ // List of names
+ if(names.constructor == Array) {
+ var tc = 0;
+ for(var i = 0; i < names.length; i++) {
+ ++tc;
+ GridStore.unlink(db, names[i], options, function() {
+ if(--tc == 0) {
+ callback(null, self);
+ }
+ });
+ }
+ } else {
+ new GridStore(db, names, "w", options).open(function(err, gridStore) {
+ if(err) return callback(err);
+ deleteChunks(gridStore, function(err) {
+ if(err) return callback(err);
+ gridStore.collection(function(err, collection) {
+ if(err) return callback(err);
+ collection.remove({'_id':gridStore.fileId}, writeConcern, function(err) {
+ callback(err, self);
+ });
+ });
+ });
+ });
+ }
+}
+
+define.staticMethod('unlink', {callback: true, promise:true});
+
+/**
+ * @ignore
+ */
+var _writeNormal = function(self, data, close, callback) {
+ // If we have a buffer write it using the writeBuffer method
+ if(Buffer.isBuffer(data)) {
+ return writeBuffer(self, data, close, callback);
+ } else {
+ return writeBuffer(self, new Buffer(data, 'binary'), close, callback);
+ }
+}
+
+/**
+ * @ignore
+ */
+var _setWriteConcernHash = function(options) {
+ var finalOptions = {};
+ if(options.w != null) finalOptions.w = options.w;
+ if(options.journal == true) finalOptions.j = options.journal;
+ if(options.j == true) finalOptions.j = options.j;
+ if(options.fsync == true) finalOptions.fsync = options.fsync;
+ if(options.wtimeout != null) finalOptions.wtimeout = options.wtimeout;
+ return finalOptions;
+}
+
+/**
+ * @ignore
+ */
+var _getWriteConcern = function(self, options) {
+ // Final options
+ var finalOptions = {w:1};
+ options = options || {};
+
+ // Local options verification
+ if(options.w != null || typeof options.j == 'boolean' || typeof options.journal == 'boolean' || typeof options.fsync == 'boolean') {
+ finalOptions = _setWriteConcernHash(options);
+ } else if(options.safe != null && typeof options.safe == 'object') {
+ finalOptions = _setWriteConcernHash(options.safe);
+ } else if(typeof options.safe == "boolean") {
+ finalOptions = {w: (options.safe ? 1 : 0)};
+ } else if(self.options.w != null || typeof self.options.j == 'boolean' || typeof self.options.journal == 'boolean' || typeof self.options.fsync == 'boolean') {
+ finalOptions = _setWriteConcernHash(self.options);
+ } else if(self.safe && (self.safe.w != null || typeof self.safe.j == 'boolean' || typeof self.safe.journal == 'boolean' || typeof self.safe.fsync == 'boolean')) {
+ finalOptions = _setWriteConcernHash(self.safe);
+ } else if(typeof self.safe == "boolean") {
+ finalOptions = {w: (self.safe ? 1 : 0)};
+ }
+
+ // Ensure we don't have an invalid combination of write concerns
+ if(finalOptions.w < 1
+ && (finalOptions.journal == true || finalOptions.j == true || finalOptions.fsync == true)) throw MongoError.create({message: "No acknowledgement using w < 1 cannot be combined with journal:true or fsync:true", driver:true});
+
+ // Return the options
+ return finalOptions;
+}
+
+/**
+ * Create a new GridStoreStream instance (INTERNAL TYPE, do not instantiate directly)
+ *
+ * @class
+ * @extends external:Duplex
+ * @return {GridStoreStream} a GridStoreStream instance.
+ * @deprecated Use GridFSBucket API instead
+ */
+var GridStoreStream = function(gs) {
+ // Initialize the duplex stream
+ Duplex.call(this);
+
+ // Get the gridstore
+ this.gs = gs;
+
+ // End called
+ this.endCalled = false;
+
+ // If we have a seek
+ this.totalBytesToRead = this.gs.length - this.gs.position;
+ this.seekPosition = this.gs.position;
+}
+
+//
+// Inherit duplex
+inherits(GridStoreStream, Duplex);
+
+GridStoreStream.prototype._pipe = GridStoreStream.prototype.pipe;
+
+// Set up override
+GridStoreStream.prototype.pipe = function(destination) {
+ var self = this;
+
+ // Only open gridstore if not already open
+ if(!self.gs.isOpen) {
+ self.gs.open(function(err) {
+ if(err) return self.emit('error', err);
+ self.totalBytesToRead = self.gs.length - self.gs.position;
+ self._pipe.apply(self, [destination]);
+ });
+ } else {
+ self.totalBytesToRead = self.gs.length - self.gs.position;
+ self._pipe.apply(self, [destination]);
+ }
+
+ return destination;
+}
+
+// Called by stream
+GridStoreStream.prototype._read = function() {
+ var self = this;
+
+ var read = function() {
+ // Read data
+ self.gs.read(length, function(err, buffer) {
+ if(err && !self.endCalled) return self.emit('error', err);
+
+ // Stream is closed
+ if(self.endCalled || buffer == null) return self.push(null);
+ // Remove bytes read
+ if(buffer.length <= self.totalBytesToRead) {
+ self.totalBytesToRead = self.totalBytesToRead - buffer.length;
+ self.push(buffer);
+ } else if(buffer.length > self.totalBytesToRead) {
+ self.totalBytesToRead = self.totalBytesToRead - buffer._index;
+ self.push(buffer.slice(0, buffer._index));
+ }
+
+ // Finished reading
+ if(self.totalBytesToRead <= 0) {
+ self.endCalled = true;
+ }
+ });
+ }
+
+ // Set read length
+ var length = self.gs.length < self.gs.chunkSize ? self.gs.length - self.seekPosition : self.gs.chunkSize;
+ if(!self.gs.isOpen) {
+ self.gs.open(function(err) {
+ self.totalBytesToRead = self.gs.length - self.gs.position;
+ if(err) return self.emit('error', err);
+ read();
+ });
+ } else {
+ read();
+ }
+}
+
+GridStoreStream.prototype.destroy = function() {
+ this.pause();
+ this.endCalled = true;
+ this.gs.close();
+ this.emit('end');
+}
+
+GridStoreStream.prototype.write = function(chunk) {
+ var self = this;
+ if(self.endCalled) return self.emit('error', MongoError.create({message: 'attempting to write to stream after end called', driver:true}))
+ // Do we have to open the gridstore
+ if(!self.gs.isOpen) {
+ self.gs.open(function() {
+ self.gs.isOpen = true;
+ self.gs.write(chunk, function() {
+ process.nextTick(function() {
+ self.emit('drain');
+ });
+ });
+ });
+ return false;
+ } else {
+ self.gs.write(chunk, function() {
+ self.emit('drain');
+ });
+ return true;
+ }
+}
+
+GridStoreStream.prototype.end = function(chunk, encoding, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 0);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ chunk = args.length ? args.shift() : null;
+ encoding = args.length ? args.shift() : null;
+ self.endCalled = true;
+
+ if(chunk) {
+ self.gs.write(chunk, function() {
+ self.gs.close(function() {
+ if(typeof callback == 'function') callback();
+ self.emit('end')
+ });
+ });
+ }
+
+ self.gs.close(function() {
+ if(typeof callback == 'function') callback();
+ self.emit('end')
+ });
+}
+
+/**
+ * The read() method pulls some data out of the internal buffer and returns it. If there is no data available, then it will return null.
+ * @function external:Duplex#read
+ * @param {number} size Optional argument to specify how much data to read.
+ * @return {(String | Buffer | null)}
+ */
+
+/**
+ * Call this function to cause the stream to return strings of the specified encoding instead of Buffer objects.
+ * @function external:Duplex#setEncoding
+ * @param {string} encoding The encoding to use.
+ * @return {null}
+ */
+
+/**
+ * This method will cause the readable stream to resume emitting data events.
+ * @function external:Duplex#resume
+ * @return {null}
+ */
+
+/**
+ * This method will cause a stream in flowing-mode to stop emitting data events. Any data that becomes available will remain in the internal buffer.
+ * @function external:Duplex#pause
+ * @return {null}
+ */
+
+/**
+ * This method pulls all the data out of a readable stream, and writes it to the supplied destination, automatically managing the flow so that the destination is not overwhelmed by a fast readable stream.
+ * @function external:Duplex#pipe
+ * @param {Writable} destination The destination for writing data
+ * @param {object} [options] Pipe options
+ * @return {null}
+ */
+
+/**
+ * This method will remove the hooks set up for a previous pipe() call.
+ * @function external:Duplex#unpipe
+ * @param {Writable} [destination] The destination for writing data
+ * @return {null}
+ */
+
+/**
+ * This is useful in certain cases where a stream is being consumed by a parser, which needs to "un-consume" some data that it has optimistically pulled out of the source, so that the stream can be passed on to some other party.
+ * @function external:Duplex#unshift
+ * @param {(Buffer|string)} chunk Chunk of data to unshift onto the read queue.
+ * @return {null}
+ */
+
+/**
+ * Versions of Node prior to v0.10 had streams that did not implement the entire Streams API as it is today. (See "Compatibility" below for more information.)
+ * @function external:Duplex#wrap
+ * @param {Stream} stream An "old style" readable stream.
+ * @return {null}
+ */
+
+/**
+ * This method writes some data to the underlying system, and calls the supplied callback once the data has been fully handled.
+ * @function external:Duplex#write
+ * @param {(string|Buffer)} chunk The data to write
+ * @param {string} encoding The encoding, if chunk is a String
+ * @param {function} callback Callback for when this chunk of data is flushed
+ * @return {boolean}
+ */
+
+/**
+ * Call this method when no more data will be written to the stream. If supplied, the callback is attached as a listener on the finish event.
+ * @function external:Duplex#end
+ * @param {(string|Buffer)} chunk The data to write
+ * @param {string} encoding The encoding, if chunk is a String
+ * @param {function} callback Callback for when this chunk of data is flushed
+ * @return {null}
+ */
+
+/**
+ * GridStoreStream stream data event, fired for each document in the cursor.
+ *
+ * @event GridStoreStream#data
+ * @type {object}
+ */
+
+/**
+ * GridStoreStream stream end event
+ *
+ * @event GridStoreStream#end
+ * @type {null}
+ */
+
+/**
+ * GridStoreStream stream close event
+ *
+ * @event GridStoreStream#close
+ * @type {null}
+ */
+
+/**
+ * GridStoreStream stream readable event
+ *
+ * @event GridStoreStream#readable
+ * @type {null}
+ */
+
+/**
+ * GridStoreStream stream drain event
+ *
+ * @event GridStoreStream#drain
+ * @type {null}
+ */
+
+/**
+ * GridStoreStream stream finish event
+ *
+ * @event GridStoreStream#finish
+ * @type {null}
+ */
+
+/**
+ * GridStoreStream stream pipe event
+ *
+ * @event GridStoreStream#pipe
+ * @type {null}
+ */
+
+/**
+ * GridStoreStream stream unpipe event
+ *
+ * @event GridStoreStream#unpipe
+ * @type {null}
+ */
+
+/**
+ * GridStoreStream stream error event
+ *
+ * @event GridStoreStream#error
+ * @type {null}
+ */
+
+/**
+ * @ignore
+ */
+module.exports = GridStore;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/metadata.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/metadata.js
new file mode 100644
index 0000000..2c6fe94
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/metadata.js
@@ -0,0 +1,64 @@
+var f = require('util').format;
+
+var Define = function(name, object, stream) {
+ this.name = name;
+ this.object = object;
+ this.stream = typeof stream == 'boolean' ? stream : false;
+ this.instrumentations = {};
+}
+
+Define.prototype.classMethod = function(name, options) {
+ var keys = Object.keys(options).sort();
+ var key = generateKey(keys, options);
+
+ // Add a list of instrumentations
+ if(this.instrumentations[key] == null) {
+ this.instrumentations[key] = {
+ methods: [], options: options
+ }
+ }
+
+ // Push to list of method for this instrumentation
+ this.instrumentations[key].methods.push(name);
+}
+
+var generateKey = function(keys, options) {
+ var parts = [];
+ for(var i = 0; i < keys.length; i++) {
+ parts.push(f('%s=%s', keys[i], options[keys[i]]));
+ }
+
+ return parts.join();
+}
+
+Define.prototype.staticMethod = function(name, options) {
+ options.static = true;
+ var keys = Object.keys(options).sort();
+ var key = generateKey(keys, options);
+
+ // Add a list of instrumentations
+ if(this.instrumentations[key] == null) {
+ this.instrumentations[key] = {
+ methods: [], options: options
+ }
+ }
+
+ // Push to list of method for this instrumentation
+ this.instrumentations[key].methods.push(name);
+}
+
+Define.prototype.generate = function() {
+ // Generate the return object
+ var object = {
+ name: this.name, obj: this.object, stream: this.stream,
+ instrumentations: []
+ }
+
+ for(var name in this.instrumentations) {
+ object.instrumentations.push(this.instrumentations[name]);
+ }
+
+ return object;
+}
+
+module.exports = Define;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/mongo_client.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/mongo_client.js
new file mode 100644
index 0000000..55421d9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/mongo_client.js
@@ -0,0 +1,327 @@
+"use strict";
+
+var parse = require('./url_parser')
+ , Server = require('./server')
+ , Mongos = require('./mongos')
+ , ReplSet = require('./replset')
+ , Define = require('./metadata')
+ , ReadPreference = require('./read_preference')
+ , Logger = require('mongodb-core').Logger
+ , MongoError = require('mongodb-core').MongoError
+ , Db = require('./db')
+ , f = require('util').format
+ , shallowClone = require('./utils').shallowClone;
+
+/**
+ * @fileOverview The **MongoClient** class is a class that allows for making Connections to MongoDB.
+ *
+ * @example
+ * var MongoClient = require('mongodb').MongoClient,
+ * test = require('assert');
+ * // Connection url
+ * var url = 'mongodb://localhost:27017/test';
+ * // Connect using MongoClient
+ * MongoClient.connect(url, function(err, db) {
+ * // Get an additional db
+ * db.close();
+ * });
+ */
+
+/**
+ * Creates a new MongoClient instance
+ * @class
+ * @return {MongoClient} a MongoClient instance.
+ */
+function MongoClient() {
+ /**
+ * The callback format for results
+ * @callback MongoClient~connectCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Db} db The connected database.
+ */
+
+ /**
+ * Connect to MongoDB using a url as documented at
+ *
+ * docs.mongodb.org/manual/reference/connection-string/
+ *
+ * Note that for replicasets the replicaSet query parameter is required in the 2.0 driver
+ *
+ * @method
+ * @param {string} url The connection URI string
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.uri_decode_auth=false] Uri decode the user name and password for authentication
+ * @param {object} [options.db=null] A hash of options to set on the db object, see **Db constructor**
+ * @param {object} [options.server=null] A hash of options to set on the server objects, see **Server** constructor**
+ * @param {object} [options.replSet=null] A hash of options to set on the replSet object, see **ReplSet** constructor**
+ * @param {object} [options.mongos=null] A hash of options to set on the mongos object, see **Mongos** constructor**
+ * @param {object} [options.promiseLibrary=null] A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible
+ * @param {MongoClient~connectCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+ this.connect = MongoClient.connect;
+}
+
+var define = MongoClient.define = new Define('MongoClient', MongoClient, false);
+
+/**
+ * Connect to MongoDB using a url as documented at
+ *
+ * docs.mongodb.org/manual/reference/connection-string/
+ *
+ * Note that for replicasets the replicaSet query parameter is required in the 2.0 driver
+ *
+ * @method
+ * @static
+ * @param {string} url The connection URI string
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.uri_decode_auth=false] Uri decode the user name and password for authentication
+ * @param {object} [options.db=null] A hash of options to set on the db object, see **Db constructor**
+ * @param {object} [options.server=null] A hash of options to set on the server objects, see **Server** constructor**
+ * @param {object} [options.replSet=null] A hash of options to set on the replSet object, see **ReplSet** constructor**
+ * @param {object} [options.mongos=null] A hash of options to set on the mongos object, see **Mongos** constructor**
+ * @param {object} [options.promiseLibrary=null] A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible
+ * @param {MongoClient~connectCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+MongoClient.connect = function(url, options, callback) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = typeof args[args.length - 1] == 'function' ? args.pop() : null;
+ options = args.length ? args.shift() : null;
+ options = options || {};
+
+ // Get the promiseLibrary
+ var promiseLibrary = options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // Return a promise
+ if(typeof callback != 'function') {
+ return new promiseLibrary(function(resolve, reject) {
+ connect(url, options, function(err, db) {
+ if(err) return reject(err);
+ resolve(db);
+ });
+ });
+ }
+
+ // Fallback to callback based connect
+ connect(url, options, callback);
+}
+
+define.staticMethod('connect', {callback: true, promise:true});
+
+var mergeOptions = function(target, source, flatten) {
+ for(var name in source) {
+ if(source[name] && typeof source[name] == 'object' && flatten) {
+ target = mergeOptions(target, source[name], flatten);
+ } else {
+ target[name] = source[name];
+ }
+ }
+
+ return target;
+}
+
+var createUnifiedOptions = function(finalOptions, options) {
+ var childOptions = ['mongos', 'server', 'db'
+ , 'replset', 'db_options', 'server_options', 'rs_options', 'mongos_options'];
+ var noMerge = [];
+
+ for(var name in options) {
+ if(noMerge.indexOf(name.toLowerCase()) != -1) {
+ finalOptions[name] = options[name];
+ } else if(childOptions.indexOf(name.toLowerCase()) != -1) {
+ finalOptions = mergeOptions(finalOptions, options[name], false);
+ } else {
+ if(options[name] && typeof options[name] == 'object' && !Buffer.isBuffer(options[name]) && !Array.isArray(options[name])) {
+ finalOptions = mergeOptions(finalOptions, options[name], true);
+ } else {
+ finalOptions[name] = options[name];
+ }
+ }
+ }
+
+ return finalOptions;
+}
+
+function translateOptions(options) {
+ // If we have a readPreference passed in by the db options
+ if(typeof options.readPreference == 'string' || typeof options.read_preference == 'string') {
+ options.readPreference = new ReadPreference(options.readPreference || options.read_preference);
+ }
+
+ // Do we have readPreference tags, add them
+ if(options.readPreference && (options.readPreferenceTags || options.read_preference_tags)) {
+ options.readPreference.tags = options.readPreferenceTags || options.read_preference_tags;
+ }
+
+ // Do we have maxStalenessSeconds
+ if(options.maxStalenessSeconds) {
+ options.readPreference.maxStalenessSeconds = options.maxStalenessSeconds;
+ }
+
+ // Set the socket and connection timeouts
+ if(options.socketTimeoutMS == null) options.socketTimeoutMS = 30000;
+ if(options.connectTimeoutMS == null) options.connectTimeoutMS = 30000;
+
+ // Create server instances
+ return options.servers.map(function(serverObj) {
+ return serverObj.domain_socket ?
+ new Server(serverObj.domain_socket, 27017, options)
+ : new Server(serverObj.host, serverObj.port, options);
+ });
+}
+
+function createReplicaset(options, callback) {
+ // Set default options
+ var servers = translateOptions(options);
+ // Create Db instance
+ new Db(options.dbName, new ReplSet(servers, options), options).open(callback);
+}
+
+function createMongos(options, callback) {
+ // Set default options
+ var servers = translateOptions(options);
+ // Create Db instance
+ new Db(options.dbName, new Mongos(servers, options), options).open(callback);
+}
+
+function createServer(options, callback) {
+ // Set default options
+ var servers = translateOptions(options);
+ // Create Db instance
+ new Db(options.dbName, servers[0], options).open(function(err, db) {
+ if(err) return callback(err);
+ // Check if we are really speaking to a mongos
+ var ismaster = db.serverConfig.lastIsMaster();
+
+ // Do we actually have a mongos
+ if(ismaster && ismaster.msg == 'isdbgrid') {
+ // Destroy the current connection
+ db.close();
+ // Create mongos connection instead
+ return createMongos(options, callback);
+ }
+
+ // Otherwise callback
+ callback(err, db);
+ });
+}
+
+function connectHandler(options, callback) {
+ return function (err, db) {
+ if(err) {
+ return process.nextTick(function() {
+ try {
+ callback(err, null);
+ } catch (err) {
+ if(db) db.close();
+ throw err
+ }
+ });
+ }
+
+ // No authentication just reconnect
+ if(!options.auth) {
+ return process.nextTick(function() {
+ try {
+ callback(err, db);
+ } catch (err) {
+ if(db) db.close();
+ throw err
+ }
+ })
+ }
+
+ // What db to authenticate against
+ var authentication_db = db;
+ if(options.authSource) {
+ authentication_db = db.db(options.authSource);
+ }
+
+ // Authenticate
+ authentication_db.authenticate(options.user, options.password, options, function(err, success){
+ if(success){
+ process.nextTick(function() {
+ try {
+ callback(null, db);
+ } catch (err) {
+ if(db) db.close();
+ throw err
+ }
+ });
+ } else {
+ if(db) db.close();
+ process.nextTick(function() {
+ try {
+ callback(err ? err : new Error('Could not authenticate user ' + options.auth[0]), null);
+ } catch (err) {
+ if(db) db.close();
+ throw err
+ }
+ });
+ }
+ });
+ }
+}
+
+/*
+ * Connect using MongoClient
+ */
+var connect = function(url, options, callback) {
+ options = options || {};
+ options = shallowClone(options);
+
+ // If callback is null throw an exception
+ if(callback == null) {
+ throw new Error("no callback function provided");
+ }
+
+ // Get a logger for MongoClient
+ var logger = Logger('MongoClient', options);
+
+ // Parse the string
+ var object = parse(url, options);
+ var _finalOptions = createUnifiedOptions({}, object);
+ _finalOptions = mergeOptions(_finalOptions, object, false);
+ _finalOptions = createUnifiedOptions(_finalOptions, options);
+
+ // Check if we have connection and socket timeout set
+ if(_finalOptions.socketTimeoutMS == null) _finalOptions.socketTimeoutMS = 30000;
+ if(_finalOptions.connectTimeoutMS == null) _finalOptions.connectTimeoutMS = 30000;
+
+ // Failure modes
+ if(object.servers.length == 0) {
+ throw new Error("connection string must contain at least one seed host");
+ }
+
+ function connectCallback(err, db) {
+ if(err && err.message == 'no mongos proxies found in seed list') {
+ if(logger.isWarn()) {
+ logger.warn(f('seed list contains no mongos proxies, replicaset connections requires the parameter replicaSet to be supplied in the URI or options object, mongodb://server:port/db?replicaSet=name'));
+ }
+
+ // Return a more specific error message for MongoClient.connect
+ return callback(new MongoError('seed list contains no mongos proxies, replicaset connections requires the parameter replicaSet to be supplied in the URI or options object, mongodb://server:port/db?replicaSet=name'));
+ }
+
+ // Return the error and db instance
+ callback(err, db);
+ }
+
+ // Do we have a replicaset then skip discovery and go straight to connectivity
+ if(_finalOptions.replicaSet || _finalOptions.rs_name) {
+ return createReplicaset(_finalOptions, connectHandler(_finalOptions, connectCallback));
+ } else if(object.servers.length > 1) {
+ return createMongos(_finalOptions, connectHandler(_finalOptions, connectCallback));
+ } else {
+ return createServer(_finalOptions, connectHandler(_finalOptions, connectCallback));
+ }
+}
+
+module.exports = MongoClient
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/mongos.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/mongos.js
new file mode 100644
index 0000000..4b83eef
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/mongos.js
@@ -0,0 +1,514 @@
+"use strict";
+
+var EventEmitter = require('events').EventEmitter
+ , inherits = require('util').inherits
+ , f = require('util').format
+ , ServerCapabilities = require('./topology_base').ServerCapabilities
+ , MongoError = require('mongodb-core').MongoError
+ , CMongos = require('mongodb-core').Mongos
+ , Cursor = require('./cursor')
+ , AggregationCursor = require('./aggregation_cursor')
+ , CommandCursor = require('./command_cursor')
+ , Define = require('./metadata')
+ , Server = require('./server')
+ , Store = require('./topology_base').Store
+ , MAX_JS_INT = require('./utils').MAX_JS_INT
+ , translateOptions = require('./utils').translateOptions
+ , filterOptions = require('./utils').filterOptions
+ , mergeOptions = require('./utils').mergeOptions
+ , os = require('os');
+
+// Get package.json variable
+var driverVersion = require(__dirname + '/../package.json').version;
+var nodejsversion = f('Node.js %s, %s', process.version, os.endianness());
+var type = os.type();
+var name = process.platform;
+var architecture = process.arch;
+var release = os.release();
+
+/**
+ * @fileOverview The **Mongos** class is a class that represents a Mongos Proxy topology and is
+ * used to construct connections.
+ *
+ * **Mongos Should not be used, use MongoClient.connect**
+ * @example
+ * var Db = require('mongodb').Db,
+ * Mongos = require('mongodb').Mongos,
+ * Server = require('mongodb').Server,
+ * test = require('assert');
+ * // Connect using Mongos
+ * var server = new Server('localhost', 27017);
+ * var db = new Db('test', new Mongos([server]));
+ * db.open(function(err, db) {
+ * // Get an additional db
+ * db.close();
+ * });
+ */
+
+ // Allowed parameters
+ var legalOptionNames = ['ha', 'haInterval', 'acceptableLatencyMS'
+ , 'poolSize', 'ssl', 'checkServerIdentity', 'sslValidate'
+ , 'sslCA', 'sslCert', 'sslKey', 'sslPass', 'socketOptions', 'bufferMaxEntries'
+ , 'store', 'auto_reconnect', 'autoReconnect', 'emitError'
+ , 'keepAlive', 'noDelay', 'connectTimeoutMS', 'socketTimeoutMS'
+ , 'loggerLevel', 'logger', 'reconnectTries', 'appname', 'domainsEnabled'
+ , 'servername', 'promoteLongs', 'promoteValues', 'promoteBuffers'];
+
+/**
+ * Creates a new Mongos instance
+ * @class
+ * @deprecated
+ * @param {Server[]} servers A seedlist of servers participating in the replicaset.
+ * @param {object} [options=null] Optional settings.
+ * @param {booelan} [options.ha=true] Turn on high availability monitoring.
+ * @param {number} [options.haInterval=5000] Time between each replicaset status check.
+ * @param {number} [options.poolSize=5] Number of connections in the connection pool for each server instance, set to 5 as default for legacy reasons.
+ * @param {number} [options.acceptableLatencyMS=15] Cutoff latency point in MS for MongoS proxy selection
+ * @param {boolean} [options.ssl=false] Use ssl connection (needs to have a mongod server with ssl support)
+ * @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
+ * @param {object} [options.sslValidate=true] Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {array} [options.sslCA=null] Array of valid certificates either as Buffers or Strings (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {(Buffer|string)} [options.sslCert=null] String or buffer containing the certificate we wish to present (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {(Buffer|string)} [options.sslKey=null] String or buffer containing the certificate private key we wish to present (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {(Buffer|string)} [options.sslPass=null] String or buffer containing the certificate password (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {string} [options.servername=null] String containing the server name requested via TLS SNI.
+ * @param {object} [options.socketOptions=null] Socket options
+ * @param {boolean} [options.socketOptions.noDelay=true] TCP Socket NoDelay option.
+ * @param {number} [options.socketOptions.keepAlive=0] TCP KeepAlive on the socket with a X ms delay before start.
+ * @param {number} [options.socketOptions.connectTimeoutMS=0] TCP Connection timeout setting
+ * @param {number} [options.socketOptions.socketTimeoutMS=0] TCP Socket timeout setting
+ * @param {boolean} [options.domainsEnabled=false] Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit.
+ * @fires Mongos#connect
+ * @fires Mongos#ha
+ * @fires Mongos#joined
+ * @fires Mongos#left
+ * @fires Mongos#fullsetup
+ * @fires Mongos#open
+ * @fires Mongos#close
+ * @fires Mongos#error
+ * @fires Mongos#timeout
+ * @fires Mongos#parseError
+ * @property {string} parserType the parser type used (c++ or js).
+ * @return {Mongos} a Mongos instance.
+ */
+var Mongos = function(servers, options) {
+ if(!(this instanceof Mongos)) return new Mongos(servers, options);
+ options = options || {};
+ var self = this;
+
+ // Filter the options
+ options = filterOptions(options, legalOptionNames);
+
+ // Ensure all the instances are Server
+ for(var i = 0; i < servers.length; i++) {
+ if(!(servers[i] instanceof Server)) {
+ throw MongoError.create({message: "all seed list instances must be of the Server type", driver:true});
+ }
+ }
+
+ // Stored options
+ var storeOptions = {
+ force: false
+ , bufferMaxEntries: typeof options.bufferMaxEntries == 'number' ? options.bufferMaxEntries : MAX_JS_INT
+ }
+
+ // Shared global store
+ var store = options.store || new Store(self, storeOptions);
+
+ // Set up event emitter
+ EventEmitter.call(this);
+
+ // Build seed list
+ var seedlist = servers.map(function(x) {
+ return {host: x.host, port: x.port}
+ });
+
+ // Get the reconnect option
+ var reconnect = typeof options.auto_reconnect == 'boolean' ? options.auto_reconnect : true;
+ reconnect = typeof options.autoReconnect == 'boolean' ? options.autoReconnect : reconnect;
+
+ // Clone options
+ var clonedOptions = mergeOptions({}, {
+ disconnectHandler: store,
+ cursorFactory: Cursor,
+ reconnect: reconnect,
+ emitError: typeof options.emitError == 'boolean' ? options.emitError : true,
+ size: typeof options.poolSize == 'number' ? options.poolSize : 5
+ });
+
+ // Translate any SSL options and other connectivity options
+ clonedOptions = translateOptions(clonedOptions, options);
+
+ // Socket options
+ var socketOptions = options.socketOptions && Object.keys(options.socketOptions).length > 0
+ ? options.socketOptions : options;
+
+ // Translate all the options to the mongodb-core ones
+ clonedOptions = translateOptions(clonedOptions, socketOptions);
+ if(typeof clonedOptions.keepAlive == 'number') {
+ clonedOptions.keepAliveInitialDelay = clonedOptions.keepAlive;
+ clonedOptions.keepAlive = clonedOptions.keepAlive > 0;
+ }
+
+ // Build default client information
+ this.clientInfo = {
+ driver: {
+ name: "nodejs",
+ version: driverVersion
+ },
+ os: {
+ type: type,
+ name: name,
+ architecture: architecture,
+ version: release
+ },
+ platform: nodejsversion
+ }
+
+ // Build default client information
+ clonedOptions.clientInfo = this.clientInfo;
+ // Do we have an application specific string
+ if(options.appname) {
+ clonedOptions.clientInfo.application = { name: options.appname };
+ }
+
+ // Create the Mongos
+ var mongos = new CMongos(seedlist, clonedOptions)
+ // Server capabilities
+ var sCapabilities = null;
+
+ // Internal state
+ this.s = {
+ // Create the Mongos
+ mongos: mongos
+ // Server capabilities
+ , sCapabilities: sCapabilities
+ // Debug turned on
+ , debug: clonedOptions.debug
+ // Store option defaults
+ , storeOptions: storeOptions
+ // Cloned options
+ , clonedOptions: clonedOptions
+ // Actual store of callbacks
+ , store: store
+ // Options
+ , options: options
+ }
+}
+
+var define = Mongos.define = new Define('Mongos', Mongos, false);
+
+/**
+ * @ignore
+ */
+inherits(Mongos, EventEmitter);
+
+// Last ismaster
+Object.defineProperty(Mongos.prototype, 'isMasterDoc', {
+ enumerable:true, get: function() { return this.s.mongos.lastIsMaster(); }
+});
+
+Object.defineProperty(Mongos.prototype, 'parserType', {
+ enumerable:true, get: function() {
+ return this.s.mongos.parserType;
+ }
+});
+
+// BSON property
+Object.defineProperty(Mongos.prototype, 'bson', {
+ enumerable: true, get: function() {
+ return this.s.mongos.s.bson;
+ }
+});
+
+Object.defineProperty(Mongos.prototype, 'haInterval', {
+ enumerable:true, get: function() { return this.s.mongos.s.haInterval; }
+});
+
+// Connect
+Mongos.prototype.connect = function(db, _options, callback) {
+ var self = this;
+ if('function' === typeof _options) callback = _options, _options = {};
+ if(_options == null) _options = {};
+ if(!('function' === typeof callback)) callback = null;
+ self.s.options = _options;
+
+ // Update bufferMaxEntries
+ self.s.storeOptions.bufferMaxEntries = db.bufferMaxEntries;
+
+ // Error handler
+ var connectErrorHandler = function() {
+ return function(err) {
+ // Remove all event handlers
+ var events = ['timeout', 'error', 'close'];
+ events.forEach(function(e) {
+ self.removeListener(e, connectErrorHandler);
+ });
+
+ self.s.mongos.removeListener('connect', connectErrorHandler);
+
+ // Try to callback
+ try {
+ callback(err);
+ } catch(err) {
+ process.nextTick(function() { throw err; })
+ }
+ }
+ }
+
+ // Actual handler
+ var errorHandler = function(event) {
+ return function(err) {
+ if(event != 'error') {
+ self.emit(event, err);
+ }
+ }
+ }
+
+ // Error handler
+ var reconnectHandler = function() {
+ self.emit('reconnect');
+ self.s.store.execute();
+ }
+
+ // relay the event
+ var relay = function(event) {
+ return function(t, server) {
+ self.emit(event, t, server);
+ }
+ }
+
+ // Connect handler
+ var connectHandler = function() {
+ // Clear out all the current handlers left over
+ ["timeout", "error", "close", 'serverOpening', 'serverDescriptionChanged', 'serverHeartbeatStarted',
+ 'serverHeartbeatSucceeded', 'serverHeartbeatFailed', 'serverClosed', 'topologyOpening',
+ 'topologyClosed', 'topologyDescriptionChanged'].forEach(function(e) {
+ self.s.mongos.removeAllListeners(e);
+ });
+
+ // Set up listeners
+ self.s.mongos.once('timeout', errorHandler('timeout'));
+ self.s.mongos.once('error', errorHandler('error'));
+ self.s.mongos.once('close', errorHandler('close'));
+
+ // Set up SDAM listeners
+ self.s.mongos.on('serverDescriptionChanged', relay('serverDescriptionChanged'));
+ self.s.mongos.on('serverHeartbeatStarted', relay('serverHeartbeatStarted'));
+ self.s.mongos.on('serverHeartbeatSucceeded', relay('serverHeartbeatSucceeded'));
+ self.s.mongos.on('serverHeartbeatFailed', relay('serverHeartbeatFailed'));
+ self.s.mongos.on('serverOpening', relay('serverOpening'));
+ self.s.mongos.on('serverClosed', relay('serverClosed'));
+ self.s.mongos.on('topologyOpening', relay('topologyOpening'));
+ self.s.mongos.on('topologyClosed', relay('topologyClosed'));
+ self.s.mongos.on('topologyDescriptionChanged', relay('topologyDescriptionChanged'));
+
+ // Set up serverConfig listeners
+ self.s.mongos.on('fullsetup', relay('fullsetup'));
+
+ // Emit open event
+ self.emit('open', null, self);
+
+ // Return correctly
+ try {
+ callback(null, self);
+ } catch(err) {
+ process.nextTick(function() { throw err; })
+ }
+ }
+
+ // Set up listeners
+ self.s.mongos.once('timeout', connectErrorHandler('timeout'));
+ self.s.mongos.once('error', connectErrorHandler('error'));
+ self.s.mongos.once('close', connectErrorHandler('close'));
+ self.s.mongos.once('connect', connectHandler);
+ // Join and leave events
+ self.s.mongos.on('joined', relay('joined'));
+ self.s.mongos.on('left', relay('left'));
+
+ // Reconnect server
+ self.s.mongos.on('reconnect', reconnectHandler);
+
+ // Start connection
+ self.s.mongos.connect(_options);
+}
+
+// Server capabilities
+Mongos.prototype.capabilities = function() {
+ if(this.s.sCapabilities) return this.s.sCapabilities;
+ if(this.s.mongos.lastIsMaster() == null) return null;
+ this.s.sCapabilities = new ServerCapabilities(this.s.mongos.lastIsMaster());
+ return this.s.sCapabilities;
+}
+
+define.classMethod('capabilities', {callback: false, promise:false, returns: [ServerCapabilities]});
+
+// Command
+Mongos.prototype.command = function(ns, cmd, options, callback) {
+ this.s.mongos.command(ns, cmd, options, callback);
+}
+
+define.classMethod('command', {callback: true, promise:false});
+
+// Insert
+Mongos.prototype.insert = function(ns, ops, options, callback) {
+ this.s.mongos.insert(ns, ops, options, function(e, m) {
+ callback(e, m)
+ });
+}
+
+define.classMethod('insert', {callback: true, promise:false});
+
+// Update
+Mongos.prototype.update = function(ns, ops, options, callback) {
+ this.s.mongos.update(ns, ops, options, callback);
+}
+
+define.classMethod('update', {callback: true, promise:false});
+
+// Remove
+Mongos.prototype.remove = function(ns, ops, options, callback) {
+ this.s.mongos.remove(ns, ops, options, callback);
+}
+
+define.classMethod('remove', {callback: true, promise:false});
+
+// Destroyed
+Mongos.prototype.isDestroyed = function() {
+ return this.s.mongos.isDestroyed();
+}
+
+// IsConnected
+Mongos.prototype.isConnected = function() {
+ return this.s.mongos.isConnected();
+}
+
+define.classMethod('isConnected', {callback: false, promise:false, returns: [Boolean]});
+
+// Insert
+Mongos.prototype.cursor = function(ns, cmd, options) {
+ options.disconnectHandler = this.s.store;
+ return this.s.mongos.cursor(ns, cmd, options);
+}
+
+define.classMethod('cursor', {callback: false, promise:false, returns: [Cursor, AggregationCursor, CommandCursor]});
+
+Mongos.prototype.lastIsMaster = function() {
+ return this.s.mongos.lastIsMaster();
+}
+
+Mongos.prototype.close = function(forceClosed) {
+ this.s.mongos.destroy();
+ // We need to wash out all stored processes
+ if(forceClosed == true) {
+ this.s.storeOptions.force = forceClosed;
+ this.s.store.flush();
+ }
+}
+
+define.classMethod('close', {callback: false, promise:false});
+
+Mongos.prototype.auth = function() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ this.s.mongos.auth.apply(this.s.mongos, args);
+}
+
+define.classMethod('auth', {callback: true, promise:false});
+
+Mongos.prototype.logout = function() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ this.s.mongos.logout.apply(this.s.mongos, args);
+}
+
+define.classMethod('logout', {callback: true, promise:false});
+
+/**
+ * All raw connections
+ * @method
+ * @return {array}
+ */
+Mongos.prototype.connections = function() {
+ return this.s.mongos.connections();
+}
+
+define.classMethod('connections', {callback: false, promise:false, returns:[Array]});
+
+/**
+ * A mongos connect event, used to verify that the connection is up and running
+ *
+ * @event Mongos#connect
+ * @type {Mongos}
+ */
+
+/**
+ * The mongos high availability event
+ *
+ * @event Mongos#ha
+ * @type {function}
+ * @param {string} type The stage in the high availability event (start|end)
+ * @param {boolean} data.norepeat This is a repeating high availability process or a single execution only
+ * @param {number} data.id The id for this high availability request
+ * @param {object} data.state An object containing the information about the current replicaset
+ */
+
+/**
+ * A server member left the mongos set
+ *
+ * @event Mongos#left
+ * @type {function}
+ * @param {string} type The type of member that left (primary|secondary|arbiter)
+ * @param {Server} server The server object that left
+ */
+
+/**
+ * A server member joined the mongos set
+ *
+ * @event Mongos#joined
+ * @type {function}
+ * @param {string} type The type of member that joined (primary|secondary|arbiter)
+ * @param {Server} server The server object that joined
+ */
+
+/**
+ * Mongos fullsetup event, emitted when all proxies in the topology have been connected to.
+ *
+ * @event Mongos#fullsetup
+ * @type {Mongos}
+ */
+
+/**
+ * Mongos open event, emitted when mongos can start processing commands.
+ *
+ * @event Mongos#open
+ * @type {Mongos}
+ */
+
+/**
+ * Mongos close event
+ *
+ * @event Mongos#close
+ * @type {object}
+ */
+
+/**
+ * Mongos error event, emitted if there is an error listener.
+ *
+ * @event Mongos#error
+ * @type {MongoError}
+ */
+
+/**
+ * Mongos timeout event
+ *
+ * @event Mongos#timeout
+ * @type {object}
+ */
+
+/**
+ * Mongos parseError event
+ *
+ * @event Mongos#parseError
+ * @type {object}
+ */
+
+module.exports = Mongos;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/read_preference.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/read_preference.js
new file mode 100644
index 0000000..dde9d8a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/read_preference.js
@@ -0,0 +1,131 @@
+"use strict";
+
+/**
+ * @fileOverview The **ReadPreference** class is a class that represents a MongoDB ReadPreference and is
+ * used to construct connections.
+ *
+ * @example
+ * var Db = require('mongodb').Db,
+ * ReplSet = require('mongodb').ReplSet,
+ * Server = require('mongodb').Server,
+ * ReadPreference = require('mongodb').ReadPreference,
+ * test = require('assert');
+ * // Connect using ReplSet
+ * var server = new Server('localhost', 27017);
+ * var db = new Db('test', new ReplSet([server]));
+ * db.open(function(err, db) {
+ * test.equal(null, err);
+ * // Perform a read
+ * var cursor = db.collection('t').find({});
+ * cursor.setReadPreference(ReadPreference.PRIMARY);
+ * cursor.toArray(function(err, docs) {
+ * test.equal(null, err);
+ * db.close();
+ * });
+ * });
+ */
+
+/**
+ * Creates a new ReadPreference instance
+ *
+ * Read Preferences
+ * - **ReadPreference.PRIMARY**, Read from primary only. All operations produce an error (throw an exception where applicable) if primary is unavailable. Cannot be combined with tags (This is the default.).
+ * - **ReadPreference.PRIMARY_PREFERRED**, Read from primary if available, otherwise a secondary.
+ * - **ReadPreference.SECONDARY**, Read from secondary if available, otherwise error.
+ * - **ReadPreference.SECONDARY_PREFERRED**, Read from a secondary if available, otherwise read from the primary.
+ * - **ReadPreference.NEAREST**, All modes read from among the nearest candidates, but unlike other modes, NEAREST will include both the primary and all secondaries in the random selection.
+ *
+ * @class
+ * @param {string} mode The ReadPreference mode as listed above.
+ * @param {array|object} tags An object representing read preference tags.
+ * @param {object} [options] Additional read preference options
+ * @param {number} [options.maxStalenessSeconds] Max Secondary Read Stalleness in Seconds
+ * @return {ReadPreference} a ReadPreference instance.
+ */
+var ReadPreference = function(mode, tags, options) {
+ if(!(this instanceof ReadPreference)) {
+ return new ReadPreference(mode, tags, options);
+ }
+
+ this._type = 'ReadPreference';
+ this.mode = mode;
+ this.tags = tags;
+ this.options = options;
+
+ // If no tags were passed in
+ if(tags && typeof tags == 'object' && !Array.isArray(tags)) {
+ if(tags.maxStalenessSeconds) {
+ this.options = tags;
+ this.tags = null;
+ }
+ }
+
+ // Add the maxStalenessSeconds value to the read Preference
+ if(this.options && this.options.maxStalenessSeconds) {
+ this.maxStalenessSeconds = this.options.maxStalenessSeconds;
+ }
+}
+
+/**
+ * Validate if a mode is legal
+ *
+ * @method
+ * @param {string} mode The string representing the read preference mode.
+ * @return {boolean}
+ */
+ReadPreference.isValid = function(_mode) {
+ return (_mode == ReadPreference.PRIMARY || _mode == ReadPreference.PRIMARY_PREFERRED
+ || _mode == ReadPreference.SECONDARY || _mode == ReadPreference.SECONDARY_PREFERRED
+ || _mode == ReadPreference.NEAREST
+ || _mode == true || _mode == false || _mode == null);
+}
+
+/**
+ * Validate if a mode is legal
+ *
+ * @method
+ * @param {string} mode The string representing the read preference mode.
+ * @return {boolean}
+ */
+ReadPreference.prototype.isValid = function(mode) {
+ var _mode = typeof mode == 'string' ? mode : this.mode;
+ return ReadPreference.isValid(_mode);
+}
+
+/**
+ * @ignore
+ */
+ReadPreference.prototype.toObject = function() {
+ var object = {mode:this.mode};
+
+ if(this.tags != null) {
+ object['tags'] = this.tags;
+ }
+
+ if(this.maxStalenessSeconds) {
+ object['maxStalenessSeconds'] = this.maxStalenessSeconds;
+ }
+
+ return object;
+}
+
+/**
+ * @ignore
+ */
+ReadPreference.prototype.toJSON = function() {
+ return this.toObject();
+}
+
+/**
+ * @ignore
+ */
+ReadPreference.PRIMARY = 'primary';
+ReadPreference.PRIMARY_PREFERRED = 'primaryPreferred';
+ReadPreference.SECONDARY = 'secondary';
+ReadPreference.SECONDARY_PREFERRED = 'secondaryPreferred';
+ReadPreference.NEAREST = 'nearest'
+
+/**
+ * @ignore
+ */
+module.exports = ReadPreference;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/replset.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/replset.js
new file mode 100644
index 0000000..5214b4c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/replset.js
@@ -0,0 +1,568 @@
+"use strict";
+
+var EventEmitter = require('events').EventEmitter
+ , inherits = require('util').inherits
+ , f = require('util').format
+ , Server = require('./server')
+ , Cursor = require('./cursor')
+ , AggregationCursor = require('./aggregation_cursor')
+ , CommandCursor = require('./command_cursor')
+ , ReadPreference = require('./read_preference')
+ , MongoError = require('mongodb-core').MongoError
+ , ServerCapabilities = require('./topology_base').ServerCapabilities
+ , Store = require('./topology_base').Store
+ , Define = require('./metadata')
+ , CReplSet = require('mongodb-core').ReplSet
+ , CoreReadPreference = require('mongodb-core').ReadPreference
+ , MAX_JS_INT = require('./utils').MAX_JS_INT
+ , translateOptions = require('./utils').translateOptions
+ , filterOptions = require('./utils').filterOptions
+ , mergeOptions = require('./utils').mergeOptions
+ , os = require('os');
+/**
+ * @fileOverview The **ReplSet** class is a class that represents a Replicaset topology and is
+ * used to construct connections.
+ *
+ * **ReplSet Should not be used, use MongoClient.connect**
+ * @example
+ * var Db = require('mongodb').Db,
+ * ReplSet = require('mongodb').ReplSet,
+ * Server = require('mongodb').Server,
+ * test = require('assert');
+ * // Connect using ReplSet
+ * var server = new Server('localhost', 27017);
+ * var db = new Db('test', new ReplSet([server]));
+ * db.open(function(err, db) {
+ * // Get an additional db
+ * db.close();
+ * });
+ */
+
+// Allowed parameters
+var legalOptionNames = ['ha', 'haInterval', 'replicaSet', 'rs_name', 'secondaryAcceptableLatencyMS'
+ , 'connectWithNoPrimary', 'poolSize', 'ssl', 'checkServerIdentity', 'sslValidate'
+ , 'sslCA', 'sslCert', 'sslKey', 'sslPass', 'socketOptions', 'bufferMaxEntries'
+ , 'store', 'auto_reconnect', 'autoReconnect', 'emitError'
+ , 'keepAlive', 'noDelay', 'connectTimeoutMS', 'socketTimeoutMS', 'strategy', 'debug'
+ , 'loggerLevel', 'logger', 'reconnectTries', 'appname', 'domainsEnabled'
+ , 'servername', 'promoteLongs', 'promoteValues', 'promoteBuffers'];
+
+// Get package.json variable
+var driverVersion = require(__dirname + '/../package.json').version;
+var nodejsversion = f('Node.js %s, %s', process.version, os.endianness());
+var type = os.type();
+var name = process.platform;
+var architecture = process.arch;
+var release = os.release();
+
+/**
+ * Creates a new ReplSet instance
+ * @class
+ * @deprecated
+ * @param {Server[]} servers A seedlist of servers participating in the replicaset.
+ * @param {object} [options=null] Optional settings.
+ * @param {booelan} [options.ha=true] Turn on high availability monitoring.
+ * @param {number} [options.haInterval=10000] Time between each replicaset status check.
+ * @param {string} [options.replicaSet] The name of the replicaset to connect to.
+ * @param {number} [options.secondaryAcceptableLatencyMS=15] Sets the range of servers to pick when using NEAREST (lowest ping ms + the latency fence, ex: range of 1 to (1 + 15) ms)
+ * @param {boolean} [options.connectWithNoPrimary=false] Sets if the driver should connect even if no primary is available
+ * @param {number} [options.poolSize=5] Number of connections in the connection pool for each server instance, set to 5 as default for legacy reasons.
+ * @param {boolean} [options.ssl=false] Use ssl connection (needs to have a mongod server with ssl support)
+ * @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
+ * @param {object} [options.sslValidate=true] Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {array} [options.sslCA=null] Array of valid certificates either as Buffers or Strings (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {(Buffer|string)} [options.sslCert=null] String or buffer containing the certificate we wish to present (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {(Buffer|string)} [options.sslKey=null] String or buffer containing the certificate private key we wish to present (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {(Buffer|string)} [options.sslPass=null] String or buffer containing the certificate password (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {string} [options.servername=null] String containing the server name requested via TLS SNI.
+ * @param {object} [options.socketOptions=null] Socket options
+ * @param {boolean} [options.socketOptions.noDelay=true] TCP Socket NoDelay option.
+ * @param {number} [options.socketOptions.keepAlive=0] TCP KeepAlive on the socket with a X ms delay before start.
+ * @param {number} [options.socketOptions.connectTimeoutMS=10000] TCP Connection timeout setting
+ * @param {number} [options.socketOptions.socketTimeoutMS=0] TCP Socket timeout setting
+ * @param {boolean} [options.domainsEnabled=false] Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit.
+ * @fires ReplSet#connect
+ * @fires ReplSet#ha
+ * @fires ReplSet#joined
+ * @fires ReplSet#left
+ * @fires ReplSet#fullsetup
+ * @fires ReplSet#open
+ * @fires ReplSet#close
+ * @fires ReplSet#error
+ * @fires ReplSet#timeout
+ * @fires ReplSet#parseError
+ * @property {string} parserType the parser type used (c++ or js).
+ * @return {ReplSet} a ReplSet instance.
+ */
+var ReplSet = function(servers, options) {
+ if(!(this instanceof ReplSet)) return new ReplSet(servers, options);
+ options = options || {};
+ var self = this;
+ // Set up event emitter
+ EventEmitter.call(this);
+
+ // Filter the options
+ options = filterOptions(options, legalOptionNames);
+
+ // Ensure all the instances are Server
+ for(var i = 0; i < servers.length; i++) {
+ if(!(servers[i] instanceof Server)) {
+ throw MongoError.create({message: "all seed list instances must be of the Server type", driver:true});
+ }
+ }
+
+ // Stored options
+ var storeOptions = {
+ force: false
+ , bufferMaxEntries: typeof options.bufferMaxEntries == 'number' ? options.bufferMaxEntries : MAX_JS_INT
+ }
+
+ // Shared global store
+ var store = options.store || new Store(self, storeOptions);
+
+ // Build seed list
+ var seedlist = servers.map(function(x) {
+ return {host: x.host, port: x.port}
+ });
+
+ // Clone options
+ var clonedOptions = mergeOptions({}, {
+ disconnectHandler: store,
+ cursorFactory: Cursor,
+ reconnect: false,
+ emitError: typeof options.emitError == 'boolean' ? options.emitError : true,
+ size: typeof options.poolSize == 'number' ? options.poolSize : 5
+ });
+
+ // Translate any SSL options and other connectivity options
+ clonedOptions = translateOptions(clonedOptions, options);
+
+ // Socket options
+ var socketOptions = options.socketOptions && Object.keys(options.socketOptions).length > 0
+ ? options.socketOptions : options;
+
+ // Translate all the options to the mongodb-core ones
+ clonedOptions = translateOptions(clonedOptions, socketOptions);
+ if(typeof clonedOptions.keepAlive == 'number') {
+ clonedOptions.keepAliveInitialDelay = clonedOptions.keepAlive;
+ clonedOptions.keepAlive = clonedOptions.keepAlive > 0;
+ }
+
+ // Client info
+ this.clientInfo = {
+ driver: {
+ name: "nodejs",
+ version: driverVersion
+ },
+ os: {
+ type: type,
+ name: name,
+ architecture: architecture,
+ version: release
+ },
+ platform: nodejsversion
+ }
+
+ // Build default client information
+ clonedOptions.clientInfo = this.clientInfo;
+ // Do we have an application specific string
+ if(options.appname) {
+ clonedOptions.clientInfo.application = { name: options.appname };
+ }
+
+ // Create the ReplSet
+ var replset = new CReplSet(seedlist, clonedOptions);
+
+ // Listen to reconnect event
+ replset.on('reconnect', function() {
+ self.emit('reconnect');
+ store.execute();
+ });
+
+ // Internal state
+ this.s = {
+ // Replicaset
+ replset: replset
+ // Server capabilities
+ , sCapabilities: null
+ // Debug tag
+ , tag: options.tag
+ // Store options
+ , storeOptions: storeOptions
+ // Cloned options
+ , clonedOptions: clonedOptions
+ // Store
+ , store: store
+ // Options
+ , options: options
+ }
+
+ // Debug
+ if(clonedOptions.debug) {
+ // Last ismaster
+ Object.defineProperty(this, 'replset', {
+ enumerable:true, get: function() { return replset; }
+ });
+ }
+}
+
+/**
+ * @ignore
+ */
+inherits(ReplSet, EventEmitter);
+
+// Last ismaster
+Object.defineProperty(ReplSet.prototype, 'isMasterDoc', {
+ enumerable:true, get: function() { return this.s.replset.lastIsMaster(); }
+});
+
+Object.defineProperty(ReplSet.prototype, 'parserType', {
+ enumerable:true, get: function() {
+ return this.s.replset.parserType;
+ }
+});
+
+// BSON property
+Object.defineProperty(ReplSet.prototype, 'bson', {
+ enumerable: true, get: function() {
+ return this.s.replset.s.bson;
+ }
+});
+
+Object.defineProperty(ReplSet.prototype, 'haInterval', {
+ enumerable:true, get: function() { return this.s.replset.s.haInterval; }
+});
+
+var define = ReplSet.define = new Define('ReplSet', ReplSet, false);
+
+// Ensure the right read Preference object
+var translateReadPreference = function(options) {
+ if(typeof options.readPreference == 'string') {
+ options.readPreference = new CoreReadPreference(options.readPreference);
+ } else if(options.readPreference instanceof ReadPreference) {
+ options.readPreference = new CoreReadPreference(options.readPreference.mode
+ , options.readPreference.tags, {maxStalenessSeconds: options.readPreference.maxStalenessSeconds});
+ }
+
+ return options;
+}
+
+// Connect method
+ReplSet.prototype.connect = function(db, _options, callback) {
+ var self = this;
+ if('function' === typeof _options) callback = _options, _options = {};
+ if(_options == null) _options = {};
+ if(!('function' === typeof callback)) callback = null;
+ self.s.options = _options;
+
+ // Update bufferMaxEntries
+ self.s.storeOptions.bufferMaxEntries = db.bufferMaxEntries;
+
+ // Actual handler
+ var errorHandler = function(event) {
+ return function(err) {
+ if(event != 'error') {
+ self.emit(event, err);
+ }
+ }
+ }
+
+ // Connect handler
+ var connectHandler = function() {
+ // Clear out all the current handlers left over
+ ["timeout", "error", "close", 'serverOpening', 'serverDescriptionChanged', 'serverHeartbeatStarted',
+ 'serverHeartbeatSucceeded', 'serverHeartbeatFailed', 'serverClosed', 'topologyOpening',
+ 'topologyClosed', 'topologyDescriptionChanged'].forEach(function(e) {
+ self.s.replset.removeAllListeners(e);
+ });
+
+ // Set up listeners
+ self.s.replset.once('timeout', errorHandler('timeout'));
+ self.s.replset.once('error', errorHandler('error'));
+ self.s.replset.once('close', errorHandler('close'));
+
+ // relay the event
+ var relay = function(event) {
+ return function(t, server) {
+ self.emit(event, t, server);
+ }
+ }
+
+ // Replset events relay
+ var replsetRelay = function(event) {
+ return function(t, server) {
+ self.emit(event, t, server.lastIsMaster(), server);
+ }
+ }
+
+ // Relay ha
+ var relayHa = function(t, state) {
+ self.emit('ha', t, state);
+
+ if(t == 'start') {
+ self.emit('ha_connect', t, state);
+ } else if(t == 'end') {
+ self.emit('ha_ismaster', t, state);
+ }
+ }
+
+ // Set up serverConfig listeners
+ self.s.replset.on('joined', replsetRelay('joined'));
+ self.s.replset.on('left', relay('left'));
+ self.s.replset.on('ping', relay('ping'));
+ self.s.replset.on('ha', relayHa);
+
+ // Set up SDAM listeners
+ self.s.replset.on('serverDescriptionChanged', relay('serverDescriptionChanged'));
+ self.s.replset.on('serverHeartbeatStarted', relay('serverHeartbeatStarted'));
+ self.s.replset.on('serverHeartbeatSucceeded', relay('serverHeartbeatSucceeded'));
+ self.s.replset.on('serverHeartbeatFailed', relay('serverHeartbeatFailed'));
+ self.s.replset.on('serverOpening', relay('serverOpening'));
+ self.s.replset.on('serverClosed', relay('serverClosed'));
+ self.s.replset.on('topologyOpening', relay('topologyOpening'));
+ self.s.replset.on('topologyClosed', relay('topologyClosed'));
+ self.s.replset.on('topologyDescriptionChanged', relay('topologyDescriptionChanged'));
+
+ self.s.replset.on('fullsetup', function() {
+ self.emit('fullsetup', null, self);
+ });
+
+ self.s.replset.on('all', function() {
+ self.emit('all', null, self);
+ });
+
+ // Emit open event
+ self.emit('open', null, self);
+
+ // Return correctly
+ try {
+ callback(null, self);
+ } catch(err) {
+ process.nextTick(function() { throw err; })
+ }
+ }
+
+ // Error handler
+ var connectErrorHandler = function() {
+ return function(err) {
+ ['timeout', 'error', 'close'].forEach(function(e) {
+ self.s.replset.removeListener(e, connectErrorHandler);
+ });
+
+ self.s.replset.removeListener('connect', connectErrorHandler);
+ // Destroy the replset
+ self.s.replset.destroy();
+
+ // Try to callback
+ try {
+ callback(err);
+ } catch(err) {
+ if(!self.s.replset.isConnected())
+ process.nextTick(function() { throw err; })
+ }
+ }
+ }
+
+ // Set up listeners
+ self.s.replset.once('timeout', connectErrorHandler('timeout'));
+ self.s.replset.once('error', connectErrorHandler('error'));
+ self.s.replset.once('close', connectErrorHandler('close'));
+ self.s.replset.once('connect', connectHandler);
+
+ // Start connection
+ self.s.replset.connect(_options);
+}
+
+// Server capabilities
+ReplSet.prototype.capabilities = function() {
+ if(this.s.sCapabilities) return this.s.sCapabilities;
+ if(this.s.replset.lastIsMaster() == null) return null;
+ this.s.sCapabilities = new ServerCapabilities(this.s.replset.lastIsMaster());
+ return this.s.sCapabilities;
+}
+
+define.classMethod('capabilities', {callback: false, promise:false, returns: [ServerCapabilities]});
+
+// Command
+ReplSet.prototype.command = function(ns, cmd, options, callback) {
+ options = translateReadPreference(options);
+ this.s.replset.command(ns, cmd, options, callback);
+}
+
+define.classMethod('command', {callback: true, promise:false});
+
+// Insert
+ReplSet.prototype.insert = function(ns, ops, options, callback) {
+ this.s.replset.insert(ns, ops, options, callback);
+}
+
+define.classMethod('insert', {callback: true, promise:false});
+
+// Update
+ReplSet.prototype.update = function(ns, ops, options, callback) {
+ this.s.replset.update(ns, ops, options, callback);
+}
+
+define.classMethod('update', {callback: true, promise:false});
+
+// Remove
+ReplSet.prototype.remove = function(ns, ops, options, callback) {
+ this.s.replset.remove(ns, ops, options, callback);
+}
+
+define.classMethod('remove', {callback: true, promise:false});
+
+// Destroyed
+ReplSet.prototype.isDestroyed = function() {
+ return this.s.replset.isDestroyed();
+}
+
+// IsConnected
+ReplSet.prototype.isConnected = function(options) {
+ options = options || {};
+
+ // If we passed in a readPreference, translate to
+ // a CoreReadPreference instance
+ if(options.readPreference) {
+ options.readPreference = translateReadPreference(options.readPreference);
+ }
+
+ return this.s.replset.isConnected(options);
+}
+
+define.classMethod('isConnected', {callback: false, promise:false, returns: [Boolean]});
+
+// Insert
+ReplSet.prototype.cursor = function(ns, cmd, options) {
+ options = translateReadPreference(options);
+ options.disconnectHandler = this.s.store;
+ return this.s.replset.cursor(ns, cmd, options);
+}
+
+define.classMethod('cursor', {callback: false, promise:false, returns: [Cursor, AggregationCursor, CommandCursor]});
+
+ReplSet.prototype.lastIsMaster = function() {
+ return this.s.replset.lastIsMaster();
+}
+
+ReplSet.prototype.close = function(forceClosed) {
+ var self = this;
+ this.s.replset.destroy();
+ // We need to wash out all stored processes
+ if(forceClosed == true) {
+ this.s.storeOptions.force = forceClosed;
+ this.s.store.flush();
+ }
+
+ var events = ['timeout', 'error', 'close', 'joined', 'left'];
+ events.forEach(function(e) {
+ self.removeAllListeners(e);
+ });
+}
+
+define.classMethod('close', {callback: false, promise:false});
+
+ReplSet.prototype.auth = function() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ this.s.replset.auth.apply(this.s.replset, args);
+}
+
+define.classMethod('auth', {callback: true, promise:false});
+
+ReplSet.prototype.logout = function() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ this.s.replset.logout.apply(this.s.replset, args);
+}
+
+define.classMethod('logout', {callback: true, promise:false});
+
+/**
+ * All raw connections
+ * @method
+ * @return {array}
+ */
+ReplSet.prototype.connections = function() {
+ return this.s.replset.connections();
+}
+
+define.classMethod('connections', {callback: false, promise:false, returns:[Array]});
+
+/**
+ * A replset connect event, used to verify that the connection is up and running
+ *
+ * @event ReplSet#connect
+ * @type {ReplSet}
+ */
+
+/**
+ * The replset high availability event
+ *
+ * @event ReplSet#ha
+ * @type {function}
+ * @param {string} type The stage in the high availability event (start|end)
+ * @param {boolean} data.norepeat This is a repeating high availability process or a single execution only
+ * @param {number} data.id The id for this high availability request
+ * @param {object} data.state An object containing the information about the current replicaset
+ */
+
+/**
+ * A server member left the replicaset
+ *
+ * @event ReplSet#left
+ * @type {function}
+ * @param {string} type The type of member that left (primary|secondary|arbiter)
+ * @param {Server} server The server object that left
+ */
+
+/**
+ * A server member joined the replicaset
+ *
+ * @event ReplSet#joined
+ * @type {function}
+ * @param {string} type The type of member that joined (primary|secondary|arbiter)
+ * @param {Server} server The server object that joined
+ */
+
+/**
+ * ReplSet open event, emitted when replicaset can start processing commands.
+ *
+ * @event ReplSet#open
+ * @type {Replset}
+ */
+
+/**
+ * ReplSet fullsetup event, emitted when all servers in the topology have been connected to.
+ *
+ * @event ReplSet#fullsetup
+ * @type {Replset}
+ */
+
+/**
+ * ReplSet close event
+ *
+ * @event ReplSet#close
+ * @type {object}
+ */
+
+/**
+ * ReplSet error event, emitted if there is an error listener.
+ *
+ * @event ReplSet#error
+ * @type {MongoError}
+ */
+
+/**
+ * ReplSet timeout event
+ *
+ * @event ReplSet#timeout
+ * @type {object}
+ */
+
+/**
+ * ReplSet parseError event
+ *
+ * @event ReplSet#parseError
+ * @type {object}
+ */
+
+module.exports = ReplSet;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/server.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/server.js
new file mode 100644
index 0000000..2fc17da
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/server.js
@@ -0,0 +1,511 @@
+"use strict";
+
+var EventEmitter = require('events').EventEmitter
+ , inherits = require('util').inherits
+ , CServer = require('mongodb-core').Server
+ , Cursor = require('./cursor')
+ , AggregationCursor = require('./aggregation_cursor')
+ , CommandCursor = require('./command_cursor')
+ , f = require('util').format
+ , ServerCapabilities = require('./topology_base').ServerCapabilities
+ , Store = require('./topology_base').Store
+ , Define = require('./metadata')
+ , MongoError = require('mongodb-core').MongoError
+ , MAX_JS_INT = require('./utils').MAX_JS_INT
+ , translateOptions = require('./utils').translateOptions
+ , filterOptions = require('./utils').filterOptions
+ , mergeOptions = require('./utils').mergeOptions
+ , os = require('os');
+
+// Get package.json variable
+var driverVersion = require(__dirname + '/../package.json').version;
+var nodejsversion = f('Node.js %s, %s', process.version, os.endianness());
+var type = os.type();
+var name = process.platform;
+var architecture = process.arch;
+var release = os.release();
+
+/**
+ * @fileOverview The **Server** class is a class that represents a single server topology and is
+ * used to construct connections.
+ *
+ * **Server Should not be used, use MongoClient.connect**
+ * @example
+ * var Db = require('mongodb').Db,
+ * Server = require('mongodb').Server,
+ * test = require('assert');
+ * // Connect using single Server
+ * var db = new Db('test', new Server('localhost', 27017););
+ * db.open(function(err, db) {
+ * // Get an additional db
+ * db.close();
+ * });
+ */
+
+ // Allowed parameters
+ var legalOptionNames = ['ha', 'haInterval', 'acceptableLatencyMS'
+ , 'poolSize', 'ssl', 'checkServerIdentity', 'sslValidate'
+ , 'sslCA', 'sslCert', 'sslKey', 'sslPass', 'socketOptions', 'bufferMaxEntries'
+ , 'store', 'auto_reconnect', 'autoReconnect', 'emitError'
+ , 'keepAlive', 'noDelay', 'connectTimeoutMS', 'socketTimeoutMS'
+ , 'loggerLevel', 'logger', 'reconnectTries', 'reconnectInterval', 'monitoring'
+ , 'appname', 'domainsEnabled'
+ , 'servername', 'promoteLongs', 'promoteValues', 'promoteBuffers'];
+
+/**
+ * Creates a new Server instance
+ * @class
+ * @deprecated
+ * @param {string} host The host for the server, can be either an IP4, IP6 or domain socket style host.
+ * @param {number} [port] The server port if IP4.
+ * @param {object} [options=null] Optional settings.
+ * @param {number} [options.poolSize=5] Number of connections in the connection pool for each server instance, set to 5 as default for legacy reasons.
+ * @param {boolean} [options.ssl=false] Use ssl connection (needs to have a mongod server with ssl support)
+ * @param {object} [options.sslValidate=true] Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
+ * @param {array} [options.sslCA=null] Array of valid certificates either as Buffers or Strings (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {(Buffer|string)} [options.sslCert=null] String or buffer containing the certificate we wish to present (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {(Buffer|string)} [options.sslKey=null] String or buffer containing the certificate private key we wish to present (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {(Buffer|string)} [options.sslPass=null] String or buffer containing the certificate password (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {string} [options.servername=null] String containing the server name requested via TLS SNI.
+ * @param {object} [options.socketOptions=null] Socket options
+ * @param {boolean} [options.socketOptions.autoReconnect=true] Reconnect on error.
+ * @param {boolean} [options.socketOptions.noDelay=true] TCP Socket NoDelay option.
+ * @param {number} [options.socketOptions.keepAlive=0] TCP KeepAlive on the socket with a X ms delay before start.
+ * @param {number} [options.socketOptions.connectTimeoutMS=0] TCP Connection timeout setting
+ * @param {number} [options.socketOptions.socketTimeoutMS=0] TCP Socket timeout setting
+ * @param {number} [options.reconnectTries=30] Server attempt to reconnect #times
+ * @param {number} [options.reconnectInterval=1000] Server will wait # milliseconds between retries
+ * @param {number} [options.monitoring=true] Triggers the server instance to call ismaster
+ * @param {number} [options.haInterval=10000] The interval of calling ismaster when monitoring is enabled.
+ * @param {boolean} [options.domainsEnabled=false] Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit.
+ * @fires Server#connect
+ * @fires Server#close
+ * @fires Server#error
+ * @fires Server#timeout
+ * @fires Server#parseError
+ * @fires Server#reconnect
+ * @property {string} parserType the parser type used (c++ or js).
+ * @return {Server} a Server instance.
+ */
+var Server = function(host, port, options) {
+ options = options || {};
+ if(!(this instanceof Server)) return new Server(host, port, options);
+ EventEmitter.call(this);
+ var self = this;
+
+ // Filter the options
+ options = filterOptions(options, legalOptionNames);
+
+ // Stored options
+ var storeOptions = {
+ force: false
+ , bufferMaxEntries: typeof options.bufferMaxEntries == 'number' ? options.bufferMaxEntries : MAX_JS_INT
+ }
+
+ // Shared global store
+ var store = options.store || new Store(self, storeOptions);
+
+ // Detect if we have a socket connection
+ if(host.indexOf('\/') != -1) {
+ if(port != null && typeof port == 'object') {
+ options = port;
+ port = null;
+ }
+ } else if(port == null) {
+ throw MongoError.create({message: 'port must be specified', driver:true});
+ }
+
+ // Get the reconnect option
+ var reconnect = typeof options.auto_reconnect == 'boolean' ? options.auto_reconnect : true;
+ reconnect = typeof options.autoReconnect == 'boolean' ? options.autoReconnect : reconnect;
+
+ // Clone options
+ var clonedOptions = mergeOptions({}, {
+ host: host, port: port, disconnectHandler: store,
+ cursorFactory: Cursor,
+ reconnect: reconnect,
+ emitError: typeof options.emitError == 'boolean' ? options.emitError : true,
+ size: typeof options.poolSize == 'number' ? options.poolSize : 5
+ });
+
+ // Translate any SSL options and other connectivity options
+ clonedOptions = translateOptions(clonedOptions, options);
+
+ // Socket options
+ var socketOptions = options.socketOptions && Object.keys(options.socketOptions).length > 0
+ ? options.socketOptions : options;
+
+ // Translate all the options to the mongodb-core ones
+ clonedOptions = translateOptions(clonedOptions, socketOptions);
+ if(typeof clonedOptions.keepAlive == 'number') {
+ clonedOptions.keepAliveInitialDelay = clonedOptions.keepAlive;
+ clonedOptions.keepAlive = clonedOptions.keepAlive > 0;
+ }
+
+ // Build default client information
+ this.clientInfo = {
+ driver: {
+ name: "nodejs",
+ version: driverVersion
+ },
+ os: {
+ type: type,
+ name: name,
+ architecture: architecture,
+ version: release
+ },
+ platform: nodejsversion
+ }
+
+ // Build default client information
+ clonedOptions.clientInfo = this.clientInfo;
+ // Do we have an application specific string
+ if(options.appname) {
+ clonedOptions.clientInfo.application = { name: options.appname };
+ }
+
+ // Create an instance of a server instance from mongodb-core
+ var server = new CServer(clonedOptions);
+
+ // Define the internal properties
+ this.s = {
+ // Create an instance of a server instance from mongodb-core
+ server: server
+ // Server capabilities
+ , sCapabilities: null
+ // Cloned options
+ , clonedOptions: clonedOptions
+ // Reconnect
+ , reconnect: clonedOptions.reconnect
+ // Emit error
+ , emitError: clonedOptions.emitError
+ // Pool size
+ , poolSize: clonedOptions.size
+ // Store Options
+ , storeOptions: storeOptions
+ // Store
+ , store: store
+ // Host
+ , host: host
+ // Port
+ , port: port
+ // Options
+ , options: options
+ }
+}
+
+inherits(Server, EventEmitter);
+
+var define = Server.define = new Define('Server', Server, false);
+
+// BSON property
+Object.defineProperty(Server.prototype, 'bson', {
+ enumerable: true, get: function() {
+ return this.s.server.s.bson;
+ }
+});
+
+// Last ismaster
+Object.defineProperty(Server.prototype, 'isMasterDoc', {
+ enumerable:true, get: function() {
+ return this.s.server.lastIsMaster();
+ }
+});
+
+Object.defineProperty(Server.prototype, 'parserType', {
+ enumerable:true, get: function() {
+ return this.s.server.parserType;
+ }
+});
+
+// Last ismaster
+Object.defineProperty(Server.prototype, 'poolSize', {
+ enumerable:true, get: function() { return this.s.server.connections().length; }
+});
+
+Object.defineProperty(Server.prototype, 'autoReconnect', {
+ enumerable:true, get: function() { return this.s.reconnect; }
+});
+
+Object.defineProperty(Server.prototype, 'host', {
+ enumerable:true, get: function() { return this.s.host; }
+});
+
+Object.defineProperty(Server.prototype, 'port', {
+ enumerable:true, get: function() { return this.s.port; }
+});
+
+// Connect
+Server.prototype.connect = function(db, _options, callback) {
+ var self = this;
+ if('function' === typeof _options) callback = _options, _options = {};
+ if(_options == null) _options = {};
+ if(!('function' === typeof callback)) callback = null;
+ self.s.options = _options;
+
+ // Update bufferMaxEntries
+ self.s.storeOptions.bufferMaxEntries = db.bufferMaxEntries;
+
+ // Error handler
+ var connectErrorHandler = function() {
+ return function(err) {
+ // Remove all event handlers
+ var events = ['timeout', 'error', 'close'];
+ events.forEach(function(e) {
+ self.s.server.removeListener(e, connectHandlers[e]);
+ });
+
+ self.s.server.removeListener('connect', connectErrorHandler);
+
+ // Try to callback
+ try {
+ callback(err);
+ } catch(err) {
+ process.nextTick(function() { throw err; })
+ }
+ }
+ }
+
+ // Actual handler
+ var errorHandler = function(event) {
+ return function(err) {
+ if(event != 'error') {
+ self.emit(event, err);
+ }
+ }
+ }
+
+ // Error handler
+ var reconnectHandler = function() {
+ self.emit('reconnect', self);
+ self.s.store.execute();
+ }
+
+ // Reconnect failed
+ var reconnectFailedHandler = function(err) {
+ self.emit('reconnectFailed', err);
+ self.s.store.flush(err);
+ }
+
+ // Destroy called on topology, perform cleanup
+ var destroyHandler = function() {
+ self.s.store.flush();
+ }
+
+ // Connect handler
+ var connectHandler = function() {
+ // Clear out all the current handlers left over
+ ["timeout", "error", "close", 'serverOpening', 'serverDescriptionChanged', 'serverHeartbeatStarted',
+ 'serverHeartbeatSucceeded', 'serverHeartbeatFailed', 'serverClosed', 'topologyOpening',
+ 'topologyClosed', 'topologyDescriptionChanged'].forEach(function(e) {
+ self.s.server.removeAllListeners(e);
+ });
+
+ // Set up listeners
+ self.s.server.on('timeout', errorHandler('timeout'));
+ self.s.server.once('error', errorHandler('error'));
+ self.s.server.on('close', errorHandler('close'));
+ // Only called on destroy
+ self.s.server.on('destroy', destroyHandler);
+
+ // relay the event
+ var relay = function(event) {
+ return function(t, server) {
+ self.emit(event, t, server);
+ }
+ }
+
+ // Set up SDAM listeners
+ self.s.server.on('serverDescriptionChanged', relay('serverDescriptionChanged'));
+ self.s.server.on('serverHeartbeatStarted', relay('serverHeartbeatStarted'));
+ self.s.server.on('serverHeartbeatSucceeded', relay('serverHeartbeatSucceeded'));
+ self.s.server.on('serverHeartbeatFailed', relay('serverHeartbeatFailed'));
+ self.s.server.on('serverOpening', relay('serverOpening'));
+ self.s.server.on('serverClosed', relay('serverClosed'));
+ self.s.server.on('topologyOpening', relay('topologyOpening'));
+ self.s.server.on('topologyClosed', relay('topologyClosed'));
+ self.s.server.on('topologyDescriptionChanged', relay('topologyDescriptionChanged'));
+ self.s.server.on('attemptReconnect', relay('attemptReconnect'));
+ self.s.server.on('monitoring', relay('monitoring'));
+
+ // Emit open event
+ self.emit('open', null, self);
+
+ // Return correctly
+ try {
+ callback(null, self);
+ } catch(err) {
+ console.log(err.stack)
+ process.nextTick(function() { throw err; })
+ }
+ }
+
+ // Set up listeners
+ var connectHandlers = {
+ timeout: connectErrorHandler('timeout'),
+ error: connectErrorHandler('error'),
+ close: connectErrorHandler('close')
+ };
+
+ // Add the event handlers
+ self.s.server.once('timeout', connectHandlers.timeout);
+ self.s.server.once('error', connectHandlers.error);
+ self.s.server.once('close', connectHandlers.close);
+ self.s.server.once('connect', connectHandler);
+ // Reconnect server
+ self.s.server.on('reconnect', reconnectHandler);
+ self.s.server.on('reconnectFailed', reconnectFailedHandler);
+
+ // Start connection
+ self.s.server.connect(_options);
+}
+
+// Server capabilities
+Server.prototype.capabilities = function() {
+ if(this.s.sCapabilities) return this.s.sCapabilities;
+ if(this.s.server.lastIsMaster() == null) return null;
+ this.s.sCapabilities = new ServerCapabilities(this.s.server.lastIsMaster());
+ return this.s.sCapabilities;
+}
+
+define.classMethod('capabilities', {callback: false, promise:false, returns: [ServerCapabilities]});
+
+// Command
+Server.prototype.command = function(ns, cmd, options, callback) {
+ this.s.server.command(ns, cmd, options, callback);
+}
+
+define.classMethod('command', {callback: true, promise:false});
+
+// Insert
+Server.prototype.insert = function(ns, ops, options, callback) {
+ this.s.server.insert(ns, ops, options, callback);
+}
+
+define.classMethod('insert', {callback: true, promise:false});
+
+// Update
+Server.prototype.update = function(ns, ops, options, callback) {
+ this.s.server.update(ns, ops, options, callback);
+}
+
+define.classMethod('update', {callback: true, promise:false});
+
+// Remove
+Server.prototype.remove = function(ns, ops, options, callback) {
+ this.s.server.remove(ns, ops, options, callback);
+}
+
+define.classMethod('remove', {callback: true, promise:false});
+
+// IsConnected
+Server.prototype.isConnected = function() {
+ return this.s.server.isConnected();
+}
+
+Server.prototype.isDestroyed = function() {
+ return this.s.server.isDestroyed();
+}
+
+define.classMethod('isConnected', {callback: false, promise:false, returns: [Boolean]});
+
+// Insert
+Server.prototype.cursor = function(ns, cmd, options) {
+ options.disconnectHandler = this.s.store;
+ return this.s.server.cursor(ns, cmd, options);
+}
+
+define.classMethod('cursor', {callback: false, promise:false, returns: [Cursor, AggregationCursor, CommandCursor]});
+
+Server.prototype.lastIsMaster = function() {
+ return this.s.server.lastIsMaster();
+}
+
+/**
+ * Unref all sockets
+ * @method
+ */
+Server.prototype.unref = function() {
+ this.s.server.unref();
+}
+
+Server.prototype.close = function(forceClosed) {
+ this.s.server.destroy();
+ // We need to wash out all stored processes
+ if(forceClosed == true) {
+ this.s.storeOptions.force = forceClosed;
+ this.s.store.flush();
+ }
+}
+
+define.classMethod('close', {callback: false, promise:false});
+
+Server.prototype.auth = function() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ this.s.server.auth.apply(this.s.server, args);
+}
+
+define.classMethod('auth', {callback: true, promise:false});
+
+Server.prototype.logout = function() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ this.s.server.logout.apply(this.s.server, args);
+}
+
+define.classMethod('logout', {callback: true, promise:false});
+
+/**
+ * All raw connections
+ * @method
+ * @return {array}
+ */
+Server.prototype.connections = function() {
+ return this.s.server.connections();
+}
+
+define.classMethod('connections', {callback: false, promise:false, returns:[Array]});
+
+/**
+ * Server connect event
+ *
+ * @event Server#connect
+ * @type {object}
+ */
+
+/**
+ * Server close event
+ *
+ * @event Server#close
+ * @type {object}
+ */
+
+/**
+ * Server reconnect event
+ *
+ * @event Server#reconnect
+ * @type {object}
+ */
+
+/**
+ * Server error event
+ *
+ * @event Server#error
+ * @type {MongoError}
+ */
+
+/**
+ * Server timeout event
+ *
+ * @event Server#timeout
+ * @type {object}
+ */
+
+/**
+ * Server parseError event
+ *
+ * @event Server#parseError
+ * @type {object}
+ */
+
+module.exports = Server;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/topology_base.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/topology_base.js
new file mode 100644
index 0000000..ebfd616
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/topology_base.js
@@ -0,0 +1,191 @@
+"use strict";
+
+var MongoError = require('mongodb-core').MongoError
+ , f = require('util').format;
+
+// The store of ops
+var Store = function(topology, storeOptions) {
+ var self = this;
+ var storedOps = [];
+ storeOptions = storeOptions || {force:false, bufferMaxEntries: -1}
+
+ // Internal state
+ this.s = {
+ storedOps: storedOps
+ , storeOptions: storeOptions
+ , topology: topology
+ }
+
+ Object.defineProperty(this, 'length', {
+ enumerable:true, get: function() { return self.s.storedOps.length; }
+ });
+}
+
+Store.prototype.add = function(opType, ns, ops, options, callback) {
+ if(this.s.storeOptions.force) {
+ return callback(MongoError.create({message: "db closed by application", driver:true}));
+ }
+
+ if(this.s.storeOptions.bufferMaxEntries == 0) {
+ return callback(MongoError.create({message: f("no connection available for operation and number of stored operation > %s", this.s.storeOptions.bufferMaxEntries), driver:true }));
+ }
+
+ if(this.s.storeOptions.bufferMaxEntries > 0 && this.s.storedOps.length > this.s.storeOptions.bufferMaxEntries) {
+ while(this.s.storedOps.length > 0) {
+ var op = this.s.storedOps.shift();
+ op.c(MongoError.create({message: f("no connection available for operation and number of stored operation > %s", this.s.storeOptions.bufferMaxEntries), driver:true }));
+ }
+
+ return;
+ }
+
+ this.s.storedOps.push({t: opType, n: ns, o: ops, op: options, c: callback})
+}
+
+Store.prototype.addObjectAndMethod = function(opType, object, method, params, callback) {
+ if(this.s.storeOptions.force) {
+ return callback(MongoError.create({message: "db closed by application", driver:true }));
+ }
+
+ if(this.s.storeOptions.bufferMaxEntries == 0) {
+ return callback(MongoError.create({message: f("no connection available for operation and number of stored operation > %s", this.s.storeOptions.bufferMaxEntries), driver:true }));
+ }
+
+ if(this.s.storeOptions.bufferMaxEntries > 0 && this.s.storedOps.length > this.s.storeOptions.bufferMaxEntries) {
+ while(this.s.storedOps.length > 0) {
+ var op = this.s.storedOps.shift();
+ op.c(MongoError.create({message: f("no connection available for operation and number of stored operation > %s", this.s.storeOptions.bufferMaxEntries), driver:true }));
+ }
+
+ return;
+ }
+
+ this.s.storedOps.push({t: opType, m: method, o: object, p: params, c: callback})
+}
+
+Store.prototype.flush = function(err) {
+ while(this.s.storedOps.length > 0) {
+ this.s.storedOps.shift().c(err || MongoError.create({message: f("no connection available for operation"), driver:true }));
+ }
+}
+
+var primaryOptions = ['primary', 'primaryPreferred', 'nearest', 'secondaryPreferred'];
+var secondaryOptions = ['secondary', 'secondaryPreferred'];
+
+Store.prototype.execute = function(options) {
+ options = options || {};
+ // Get current ops
+ var ops = this.s.storedOps;
+ // Reset the ops
+ this.s.storedOps = [];
+
+ // Unpack options
+ var executePrimary = typeof options.executePrimary === 'boolean'
+ ? options.executePrimary : true;
+ var executeSecondary = typeof options.executeSecondary === 'boolean'
+ ? options.executeSecondary : true;
+
+ // Execute all the stored ops
+ while(ops.length > 0) {
+ var op = ops.shift();
+
+ if(op.t == 'cursor') {
+ if(executePrimary && executeSecondary) {
+ op.o[op.m].apply(op.o, op.p);
+ } else if(executePrimary && op.o.options
+ && op.o.options.readPreference
+ && primaryOptions.indexOf(op.o.options.readPreference.mode) != -1) {
+ op.o[op.m].apply(op.o, op.p);
+ } else if(!executePrimary && executeSecondary && op.o.options
+ && op.o.options.readPreference
+ && secondaryOptions.indexOf(op.o.options.readPreference.mode) != -1) {
+ op.o[op.m].apply(op.o, op.p);
+ }
+ } else if(op.t == 'auth') {
+ this.s.topology[op.t].apply(this.s.topology, op.o);
+ } else {
+ if(executePrimary && executeSecondary) {
+ this.s.topology[op.t](op.n, op.o, op.op, op.c);
+ } else if(executePrimary && op.op && op.op.readPreference
+ && primaryOptions.indexOf(op.op.readPreference.mode) != -1) {
+ this.s.topology[op.t](op.n, op.o, op.op, op.c);
+ } else if(!executePrimary && executeSecondary && op.op && op.op.readPreference
+ && secondaryOptions.indexOf(op.op.readPreference.mode) != -1) {
+ this.s.topology[op.t](op.n, op.o, op.op, op.c);
+ }
+ }
+ }
+}
+
+Store.prototype.all = function() {
+ return this.s.storedOps;
+}
+
+// Server capabilities
+var ServerCapabilities = function(ismaster) {
+ var setup_get_property = function(object, name, value) {
+ Object.defineProperty(object, name, {
+ enumerable: true
+ , get: function () { return value; }
+ });
+ }
+
+ // Capabilities
+ var aggregationCursor = false;
+ var writeCommands = false;
+ var textSearch = false;
+ var authCommands = false;
+ var listCollections = false;
+ var listIndexes = false;
+ var maxNumberOfDocsInBatch = ismaster.maxWriteBatchSize || 1000;
+ var commandsTakeWriteConcern = false;
+ var commandsTakeCollation = false;
+
+ if(ismaster.minWireVersion >= 0) {
+ textSearch = true;
+ }
+
+ if(ismaster.maxWireVersion >= 1) {
+ aggregationCursor = true;
+ authCommands = true;
+ }
+
+ if(ismaster.maxWireVersion >= 2) {
+ writeCommands = true;
+ }
+
+ if(ismaster.maxWireVersion >= 3) {
+ listCollections = true;
+ listIndexes = true;
+ }
+
+ if(ismaster.maxWireVersion >= 5) {
+ commandsTakeWriteConcern = true;
+ commandsTakeCollation = true;
+ }
+
+ // If no min or max wire version set to 0
+ if(ismaster.minWireVersion == null) {
+ ismaster.minWireVersion = 0;
+ }
+
+ if(ismaster.maxWireVersion == null) {
+ ismaster.maxWireVersion = 0;
+ }
+
+ // Map up read only parameters
+ setup_get_property(this, "hasAggregationCursor", aggregationCursor);
+ setup_get_property(this, "hasWriteCommands", writeCommands);
+ setup_get_property(this, "hasTextSearch", textSearch);
+ setup_get_property(this, "hasAuthCommands", authCommands);
+ setup_get_property(this, "hasListCollectionsCommand", listCollections);
+ setup_get_property(this, "hasListIndexesCommand", listIndexes);
+ setup_get_property(this, "minWireVersion", ismaster.minWireVersion);
+ setup_get_property(this, "maxWireVersion", ismaster.maxWireVersion);
+ setup_get_property(this, "maxNumberOfDocsInBatch", maxNumberOfDocsInBatch);
+ setup_get_property(this, "commandsTakeWriteConcern", commandsTakeWriteConcern);
+ setup_get_property(this, "commandsTakeCollation", commandsTakeCollation);
+}
+
+exports.Store = Store;
+exports.ServerCapabilities = ServerCapabilities;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/url_parser.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/url_parser.js
new file mode 100644
index 0000000..e419bcb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/url_parser.js
@@ -0,0 +1,405 @@
+"use strict";
+
+var ReadPreference = require('./read_preference'),
+ parser = require('url'),
+ f = require('util').format;
+
+module.exports = function(url) {
+ // Variables
+ var connection_part = '';
+ var auth_part = '';
+ var query_string_part = '';
+ var dbName = 'admin';
+
+ // Url parser result
+ var result = parser.parse(url, true);
+
+ if(result.protocol != 'mongodb:') {
+ throw new Error('invalid schema, expected mongodb');
+ }
+
+ if((result.hostname == null || result.hostname == '') && url.indexOf('.sock') == -1) {
+ throw new Error('no hostname or hostnames provided in connection string');
+ }
+
+ if(result.port == '0') {
+ throw new Error('invalid port (zero) with hostname');
+ }
+
+ if(!isNaN(parseInt(result.port, 10)) && parseInt(result.port, 10) > 65535) {
+ throw new Error('invalid port (larger than 65535) with hostname');
+ }
+
+ if(result.path
+ && result.path.length > 0
+ && result.path[0] != '/'
+ && url.indexOf('.sock') == -1) {
+ throw new Error('missing delimiting slash between hosts and options');
+ }
+
+ if(result.query) {
+ for(var name in result.query) {
+ if(name.indexOf('::') != -1) {
+ throw new Error('double colon in host identifier');
+ }
+
+ if(result.query[name] == '') {
+ throw new Error('query parameter ' + name + ' is an incomplete value pair');
+ }
+ }
+ }
+
+ if(result.auth) {
+ var parts = result.auth.split(':');
+ if(url.indexOf(result.auth) != -1 && parts.length > 2) {
+ throw new Error('Username with password containing an unescaped colon');
+ }
+
+ if(url.indexOf(result.auth) != -1 && result.auth.indexOf('@') != -1) {
+ throw new Error('Username containing an unescaped at-sign');
+ }
+ }
+
+ // Remove query
+ var clean = url.split('?').shift();
+
+ // Extract the list of hosts
+ var strings = clean.split(',');
+ var hosts = [];
+
+ for(var i = 0; i < strings.length; i++) {
+ var hostString = strings[i];
+
+ if(hostString.indexOf('mongodb') != -1) {
+ if(hostString.indexOf('@') != -1) {
+ hosts.push(hostString.split('@').pop())
+ } else {
+ hosts.push(hostString.substr('mongodb://'.length));
+ }
+ } else if(hostString.indexOf('/') != -1) {
+ hosts.push(hostString.split('/').shift());
+ } else if(hostString.indexOf('/') == -1) {
+ hosts.push(hostString.trim());
+ }
+ }
+
+ for(i = 0; i < hosts.length; i++) {
+ var r = parser.parse(f('mongodb://%s', hosts[i].trim()));
+ if(r.path && r.path.indexOf(':') != -1) {
+ throw new Error('double colon in host identifier');
+ }
+ }
+
+ // If we have a ? mark cut the query elements off
+ if(url.indexOf("?") != -1) {
+ query_string_part = url.substr(url.indexOf("?") + 1);
+ connection_part = url.substring("mongodb://".length, url.indexOf("?"))
+ } else {
+ connection_part = url.substring("mongodb://".length);
+ }
+
+ // Check if we have auth params
+ if(connection_part.indexOf("@") != -1) {
+ auth_part = connection_part.split("@")[0];
+ connection_part = connection_part.split("@")[1];
+ }
+
+ // Check if the connection string has a db
+ if(connection_part.indexOf(".sock") != -1) {
+ if(connection_part.indexOf(".sock/") != -1) {
+ dbName = connection_part.split(".sock/")[1];
+ // Check if multiple database names provided, or just an illegal trailing backslash
+ if (dbName.indexOf("/") != -1) {
+ if (dbName.split("/").length == 2 && dbName.split("/")[1].length == 0) {
+ throw new Error('Illegal trailing backslash after database name');
+ }
+ throw new Error('More than 1 database name in URL');
+ }
+ connection_part = connection_part.split("/", connection_part.indexOf(".sock") + ".sock".length);
+ }
+ } else if(connection_part.indexOf("/") != -1) {
+ // Check if multiple database names provided, or just an illegal trailing backslash
+ if (connection_part.split("/").length > 2) {
+ if (connection_part.split("/")[2].length == 0) {
+ throw new Error('Illegal trailing backslash after database name');
+ }
+ throw new Error('More than 1 database name in URL');
+ }
+ dbName = connection_part.split("/")[1];
+ connection_part = connection_part.split("/")[0];
+ }
+
+ // Result object
+ var object = {};
+
+ // Pick apart the authentication part of the string
+ var authPart = auth_part || '';
+ var auth = authPart.split(':', 2);
+
+ // Decode the URI components
+ auth[0] = decodeURIComponent(auth[0]);
+ if(auth[1]){
+ auth[1] = decodeURIComponent(auth[1]);
+ }
+
+ // Add auth to final object if we have 2 elements
+ if(auth.length == 2) object.auth = {user: auth[0], password: auth[1]};
+
+ // Variables used for temporary storage
+ var hostPart;
+ var urlOptions;
+ var servers;
+ var serverOptions = {socketOptions: {}};
+ var dbOptions = {read_preference_tags: []};
+ var replSetServersOptions = {socketOptions: {}};
+ var mongosOptions = {socketOptions: {}};
+ // Add server options to final object
+ object.server_options = serverOptions;
+ object.db_options = dbOptions;
+ object.rs_options = replSetServersOptions;
+ object.mongos_options = mongosOptions;
+
+ // Let's check if we are using a domain socket
+ if(url.match(/\.sock/)) {
+ // Split out the socket part
+ var domainSocket = url.substring(
+ url.indexOf("mongodb://") + "mongodb://".length
+ , url.lastIndexOf(".sock") + ".sock".length);
+ // Clean out any auth stuff if any
+ if(domainSocket.indexOf("@") != -1) domainSocket = domainSocket.split("@")[1];
+ servers = [{domain_socket: domainSocket}];
+ } else {
+ // Split up the db
+ hostPart = connection_part;
+ // Deduplicate servers
+ var deduplicatedServers = {};
+
+ // Parse all server results
+ servers = hostPart.split(',').map(function(h) {
+ var _host, _port, ipv6match;
+ //check if it matches [IPv6]:port, where the port number is optional
+ if ((ipv6match = /\[([^\]]+)\](?:\:(.+))?/.exec(h))) {
+ _host = ipv6match[1];
+ _port = parseInt(ipv6match[2], 10) || 27017;
+ } else {
+ //otherwise assume it's IPv4, or plain hostname
+ var hostPort = h.split(':', 2);
+ _host = hostPort[0] || 'localhost';
+ _port = hostPort[1] != null ? parseInt(hostPort[1], 10) : 27017;
+ // Check for localhost?safe=true style case
+ if(_host.indexOf("?") != -1) _host = _host.split(/\?/)[0];
+ }
+
+ // No entry returned for duplicate servr
+ if(deduplicatedServers[_host + "_" + _port]) return null;
+ deduplicatedServers[_host + "_" + _port] = 1;
+
+ // Return the mapped object
+ return {host: _host, port: _port};
+ }).filter(function(x) {
+ return x != null;
+ });
+ }
+
+ // Get the db name
+ object.dbName = dbName || 'admin';
+ // Split up all the options
+ urlOptions = (query_string_part || '').split(/[&;]/);
+ // Ugh, we have to figure out which options go to which constructor manually.
+ urlOptions.forEach(function(opt) {
+ if(!opt) return;
+ var splitOpt = opt.split('='), name = splitOpt[0], value = splitOpt[1];
+ // Options implementations
+ switch(name) {
+ case 'slaveOk':
+ case 'slave_ok':
+ serverOptions.slave_ok = (value == 'true');
+ dbOptions.slaveOk = (value == 'true');
+ break;
+ case 'maxPoolSize':
+ case 'poolSize':
+ serverOptions.poolSize = parseInt(value, 10);
+ replSetServersOptions.poolSize = parseInt(value, 10);
+ break;
+ case 'appname':
+ object.appname = decodeURIComponent(value);
+ break;
+ case 'autoReconnect':
+ case 'auto_reconnect':
+ serverOptions.auto_reconnect = (value == 'true');
+ break;
+ case 'minPoolSize':
+ throw new Error("minPoolSize not supported");
+ case 'maxIdleTimeMS':
+ throw new Error("maxIdleTimeMS not supported");
+ case 'waitQueueMultiple':
+ throw new Error("waitQueueMultiple not supported");
+ case 'waitQueueTimeoutMS':
+ throw new Error("waitQueueTimeoutMS not supported");
+ case 'uuidRepresentation':
+ throw new Error("uuidRepresentation not supported");
+ case 'ssl':
+ if(value == 'prefer') {
+ serverOptions.ssl = value;
+ replSetServersOptions.ssl = value;
+ mongosOptions.ssl = value;
+ break;
+ }
+ serverOptions.ssl = (value == 'true');
+ replSetServersOptions.ssl = (value == 'true');
+ mongosOptions.ssl = (value == 'true');
+ break;
+ case 'sslValidate':
+ serverOptions.sslValidate = (value == 'true');
+ replSetServersOptions.sslValidate = (value == 'true');
+ mongosOptions.sslValidate = (value == 'true');
+ break;
+ case 'replicaSet':
+ case 'rs_name':
+ replSetServersOptions.rs_name = value;
+ break;
+ case 'reconnectWait':
+ replSetServersOptions.reconnectWait = parseInt(value, 10);
+ break;
+ case 'retries':
+ replSetServersOptions.retries = parseInt(value, 10);
+ break;
+ case 'readSecondary':
+ case 'read_secondary':
+ replSetServersOptions.read_secondary = (value == 'true');
+ break;
+ case 'fsync':
+ dbOptions.fsync = (value == 'true');
+ break;
+ case 'journal':
+ dbOptions.j = (value == 'true');
+ break;
+ case 'safe':
+ dbOptions.safe = (value == 'true');
+ break;
+ case 'nativeParser':
+ case 'native_parser':
+ dbOptions.native_parser = (value == 'true');
+ break;
+ case 'readConcernLevel':
+ dbOptions.readConcern = {level: value};
+ break;
+ case 'connectTimeoutMS':
+ serverOptions.socketOptions.connectTimeoutMS = parseInt(value, 10);
+ replSetServersOptions.socketOptions.connectTimeoutMS = parseInt(value, 10);
+ mongosOptions.socketOptions.connectTimeoutMS = parseInt(value, 10);
+ break;
+ case 'socketTimeoutMS':
+ serverOptions.socketOptions.socketTimeoutMS = parseInt(value, 10);
+ replSetServersOptions.socketOptions.socketTimeoutMS = parseInt(value, 10);
+ mongosOptions.socketOptions.socketTimeoutMS = parseInt(value, 10);
+ break;
+ case 'w':
+ dbOptions.w = parseInt(value, 10);
+ if(isNaN(dbOptions.w)) dbOptions.w = value;
+ break;
+ case 'authSource':
+ dbOptions.authSource = value;
+ break;
+ case 'gssapiServiceName':
+ dbOptions.gssapiServiceName = value;
+ break;
+ case 'authMechanism':
+ if(value == 'GSSAPI') {
+ // If no password provided decode only the principal
+ if(object.auth == null) {
+ var urlDecodeAuthPart = decodeURIComponent(authPart);
+ if(urlDecodeAuthPart.indexOf("@") == -1) throw new Error("GSSAPI requires a provided principal");
+ object.auth = {user: urlDecodeAuthPart, password: null};
+ } else {
+ object.auth.user = decodeURIComponent(object.auth.user);
+ }
+ } else if(value == 'MONGODB-X509') {
+ object.auth = {user: decodeURIComponent(authPart)};
+ }
+
+ // Only support GSSAPI or MONGODB-CR for now
+ if(value != 'GSSAPI'
+ && value != 'MONGODB-X509'
+ && value != 'MONGODB-CR'
+ && value != 'DEFAULT'
+ && value != 'SCRAM-SHA-1'
+ && value != 'PLAIN')
+ throw new Error("only DEFAULT, GSSAPI, PLAIN, MONGODB-X509, SCRAM-SHA-1 or MONGODB-CR is supported by authMechanism");
+
+ // Authentication mechanism
+ dbOptions.authMechanism = value;
+ break;
+ case 'authMechanismProperties':
+ // Split up into key, value pairs
+ var values = value.split(',');
+ var o = {};
+ // For each value split into key, value
+ values.forEach(function(x) {
+ var v = x.split(':');
+ o[v[0]] = v[1];
+ });
+
+ // Set all authMechanismProperties
+ dbOptions.authMechanismProperties = o;
+ // Set the service name value
+ if(typeof o.SERVICE_NAME == 'string') dbOptions.gssapiServiceName = o.SERVICE_NAME;
+ if(typeof o.SERVICE_REALM == 'string') dbOptions.gssapiServiceRealm = o.SERVICE_REALM;
+ if(typeof o.CANONICALIZE_HOST_NAME == 'string') dbOptions.gssapiCanonicalizeHostName = o.CANONICALIZE_HOST_NAME == 'true' ? true : false;
+ break;
+ case 'wtimeoutMS':
+ dbOptions.wtimeout = parseInt(value, 10);
+ break;
+ case 'readPreference':
+ if(!ReadPreference.isValid(value)) throw new Error("readPreference must be either primary/primaryPreferred/secondary/secondaryPreferred/nearest");
+ dbOptions.readPreference = value;
+ break;
+ case 'maxStalenessSeconds':
+ dbOptions.maxStalenessSeconds = parseInt(value, 10);
+ break;
+ case 'readPreferenceTags':
+ // Decode the value
+ value = decodeURIComponent(value);
+ // Contains the tag object
+ var tagObject = {};
+ if(value == null || value == '') {
+ dbOptions.read_preference_tags.push(tagObject);
+ break;
+ }
+
+ // Split up the tags
+ var tags = value.split(/\,/);
+ for(var i = 0; i < tags.length; i++) {
+ var parts = tags[i].trim().split(/\:/);
+ tagObject[parts[0]] = parts[1];
+ }
+
+ // Set the preferences tags
+ dbOptions.read_preference_tags.push(tagObject);
+ break;
+ default:
+ break;
+ }
+ });
+
+ // No tags: should be null (not [])
+ if(dbOptions.read_preference_tags.length === 0) {
+ dbOptions.read_preference_tags = null;
+ }
+
+ // Validate if there are an invalid write concern combinations
+ if((dbOptions.w == -1 || dbOptions.w == 0) && (
+ dbOptions.journal == true
+ || dbOptions.fsync == true
+ || dbOptions.safe == true)) throw new Error("w set to -1 or 0 cannot be combined with safe/w/journal/fsync")
+
+ // If no read preference set it to primary
+ if(!dbOptions.readPreference) {
+ dbOptions.readPreference = 'primary';
+ }
+
+ // Add servers to result
+ object.servers = servers;
+ // Returned parsed object
+ return object;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/utils.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/utils.js
new file mode 100644
index 0000000..c4c294c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/lib/utils.js
@@ -0,0 +1,312 @@
+"use strict";
+
+var MongoError = require('mongodb-core').MongoError
+
+var shallowClone = function(obj) {
+ var copy = {};
+ for(var name in obj) copy[name] = obj[name];
+ return copy;
+}
+
+// Set simple property
+var getSingleProperty = function(obj, name, value) {
+ Object.defineProperty(obj, name, {
+ enumerable:true,
+ get: function() {
+ return value
+ }
+ });
+}
+
+var formatSortValue = exports.formatSortValue = function(sortDirection) {
+ var value = ("" + sortDirection).toLowerCase();
+
+ switch (value) {
+ case 'ascending':
+ case 'asc':
+ case '1':
+ return 1;
+ case 'descending':
+ case 'desc':
+ case '-1':
+ return -1;
+ default:
+ throw new Error("Illegal sort clause, must be of the form "
+ + "[['field1', '(ascending|descending)'], "
+ + "['field2', '(ascending|descending)']]");
+ }
+};
+
+var formattedOrderClause = exports.formattedOrderClause = function(sortValue) {
+ var orderBy = {};
+ if(sortValue == null) return null;
+ if (Array.isArray(sortValue)) {
+ if(sortValue.length === 0) {
+ return null;
+ }
+
+ for(var i = 0; i < sortValue.length; i++) {
+ if(sortValue[i].constructor == String) {
+ orderBy[sortValue[i]] = 1;
+ } else {
+ orderBy[sortValue[i][0]] = formatSortValue(sortValue[i][1]);
+ }
+ }
+ } else if(sortValue != null && typeof sortValue == 'object') {
+ orderBy = sortValue;
+ } else if (typeof sortValue == 'string') {
+ orderBy[sortValue] = 1;
+ } else {
+ throw new Error("Illegal sort clause, must be of the form " +
+ "[['field1', '(ascending|descending)'], ['field2', '(ascending|descending)']]");
+ }
+
+ return orderBy;
+};
+
+var checkCollectionName = function checkCollectionName (collectionName) {
+ if('string' !== typeof collectionName) {
+ throw Error("collection name must be a String");
+ }
+
+ if(!collectionName || collectionName.indexOf('..') != -1) {
+ throw Error("collection names cannot be empty");
+ }
+
+ if(collectionName.indexOf('$') != -1 &&
+ collectionName.match(/((^\$cmd)|(oplog\.\$main))/) == null) {
+ throw Error("collection names must not contain '$'");
+ }
+
+ if(collectionName.match(/^\.|\.$/) != null) {
+ throw Error("collection names must not start or end with '.'");
+ }
+
+ // Validate that we are not passing 0x00 in the colletion name
+ if(!!~collectionName.indexOf("\x00")) {
+ throw new Error("collection names cannot contain a null character");
+ }
+};
+
+var handleCallback = function(callback, err, value1, value2) {
+ try {
+ if(callback == null) return;
+ if(callback) {
+ return value2 ? callback(err, value1, value2) : callback(err, value1);
+ }
+ } catch(err) {
+ process.nextTick(function() { throw err; });
+ return false;
+ }
+
+ return true;
+}
+
+/**
+ * Wrap a Mongo error document in an Error instance
+ * @ignore
+ * @api private
+ */
+var toError = function(error) {
+ if (error instanceof Error) return error;
+
+ var msg = error.err || error.errmsg || error.errMessage || error;
+ var e = MongoError.create({message: msg, driver:true});
+
+ // Get all object keys
+ var keys = typeof error == 'object'
+ ? Object.keys(error)
+ : [];
+
+ for(var i = 0; i < keys.length; i++) {
+ try {
+ e[keys[i]] = error[keys[i]];
+ } catch(err) {
+ // continue
+ }
+ }
+
+ return e;
+}
+
+/**
+ * @ignore
+ */
+var normalizeHintField = function normalizeHintField(hint) {
+ var finalHint = null;
+
+ if(typeof hint == 'string') {
+ finalHint = hint;
+ } else if(Array.isArray(hint)) {
+ finalHint = {};
+
+ hint.forEach(function(param) {
+ finalHint[param] = 1;
+ });
+ } else if(hint != null && typeof hint == 'object') {
+ finalHint = {};
+ for (var name in hint) {
+ finalHint[name] = hint[name];
+ }
+ }
+
+ return finalHint;
+};
+
+/**
+ * Create index name based on field spec
+ *
+ * @ignore
+ * @api private
+ */
+var parseIndexOptions = function(fieldOrSpec) {
+ var fieldHash = {};
+ var indexes = [];
+ var keys;
+
+ // Get all the fields accordingly
+ if('string' == typeof fieldOrSpec) {
+ // 'type'
+ indexes.push(fieldOrSpec + '_' + 1);
+ fieldHash[fieldOrSpec] = 1;
+ } else if(Array.isArray(fieldOrSpec)) {
+ fieldOrSpec.forEach(function(f) {
+ if('string' == typeof f) {
+ // [{location:'2d'}, 'type']
+ indexes.push(f + '_' + 1);
+ fieldHash[f] = 1;
+ } else if(Array.isArray(f)) {
+ // [['location', '2d'],['type', 1]]
+ indexes.push(f[0] + '_' + (f[1] || 1));
+ fieldHash[f[0]] = f[1] || 1;
+ } else if(isObject(f)) {
+ // [{location:'2d'}, {type:1}]
+ keys = Object.keys(f);
+ keys.forEach(function(k) {
+ indexes.push(k + '_' + f[k]);
+ fieldHash[k] = f[k];
+ });
+ } else {
+ // undefined (ignore)
+ }
+ });
+ } else if(isObject(fieldOrSpec)) {
+ // {location:'2d', type:1}
+ keys = Object.keys(fieldOrSpec);
+ keys.forEach(function(key) {
+ indexes.push(key + '_' + fieldOrSpec[key]);
+ fieldHash[key] = fieldOrSpec[key];
+ });
+ }
+
+ return {
+ name: indexes.join("_"), keys: keys, fieldHash: fieldHash
+ }
+}
+
+var isObject = exports.isObject = function (arg) {
+ return '[object Object]' == toString.call(arg)
+}
+
+var debugOptions = function(debugFields, options) {
+ var finaloptions = {};
+ debugFields.forEach(function(n) {
+ finaloptions[n] = options[n];
+ });
+
+ return finaloptions;
+}
+
+var decorateCommand = function(command, options, exclude) {
+ for(var name in options) {
+ if(exclude[name] == null) command[name] = options[name];
+ }
+
+ return command;
+}
+
+var mergeOptions = function(target, source) {
+ for(var name in source) {
+ target[name] = source[name];
+ }
+
+ return target;
+}
+
+// Merge options with translation
+var translateOptions = function(target, source) {
+ var translations = {
+ // SSL translation options
+ 'sslCA': 'ca', 'sslValidate': 'rejectUnauthorized', 'sslKey': 'key', 'sslCert': 'cert', 'sslPass': 'passphrase',
+ // SocketTimeout translation options
+ 'socketTimeoutMS': 'socketTimeout', 'connectTimeoutMS': 'connectionTimeout',
+ // Replicaset options
+ 'replicaSet': 'setName', 'rs_name': 'setName', 'secondaryAcceptableLatencyMS': 'acceptableLatency',
+ 'connectWithNoPrimary': 'secondaryOnlyConnectionAllowed',
+ // Mongos options
+ 'acceptableLatencyMS': 'localThresholdMS'
+ }
+
+ for(var name in source) {
+ if(translations[name]) {
+ target[translations[name]] = source[name];
+ } else {
+ target[name] = source[name];
+ }
+ }
+
+ return target;
+}
+
+var filterOptions = function(options, names) {
+ var filterOptions = {};
+
+ for(var name in options) {
+ if(names.indexOf(name) != -1) filterOptions[name] = options[name];
+ }
+
+ // Filtered options
+ return filterOptions;
+}
+
+// Object.assign method or polyfille
+var assign = Object.assign ? Object.assign : function assign(target) {
+ if (target === undefined || target === null) {
+ throw new TypeError('Cannot convert first argument to object');
+ }
+
+ var to = Object(target);
+ for (var i = 1; i < arguments.length; i++) {
+ var nextSource = arguments[i];
+ if (nextSource === undefined || nextSource === null) {
+ continue;
+ }
+
+ var keysArray = Object.keys(Object(nextSource));
+ for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
+ var nextKey = keysArray[nextIndex];
+ var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
+ if (desc !== undefined && desc.enumerable) {
+ to[nextKey] = nextSource[nextKey];
+ }
+ }
+ }
+ return to;
+}
+
+exports.filterOptions = filterOptions;
+exports.mergeOptions = mergeOptions;
+exports.translateOptions = translateOptions;
+exports.shallowClone = shallowClone;
+exports.getSingleProperty = getSingleProperty;
+exports.checkCollectionName = checkCollectionName;
+exports.toError = toError;
+exports.formattedOrderClause = formattedOrderClause;
+exports.parseIndexOptions = parseIndexOptions;
+exports.normalizeHintField = normalizeHintField;
+exports.handleCallback = handleCallback;
+exports.decorateCommand = decorateCommand;
+exports.isObject = isObject;
+exports.debugOptions = debugOptions;
+exports.MAX_JS_INT = 0x20000000000000;
+exports.assign = assign;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/CHANGELOG.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/CHANGELOG.md
new file mode 100644
index 0000000..cc8aa10
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/CHANGELOG.md
@@ -0,0 +1,65 @@
+# Master
+
+# 3.2.0
+
+* improve tamper resistence of Promise.all Promise.race and
+ Promise.prototype.then (note, this isn't complete, but addresses an exception
+ when used \w core-js, follow up work will address entirely)
+* remove spec incompatible then chaining fast-path
+* add eslint
+* update build deps
+
+# 3.1.2
+
+* fix node detection issues with NWJS/electron
+
+# 3.1.0
+
+* improve performance of Promise.all when it encounters a non-promise input object input
+* then/resolve tamper protection
+* reduce AST size of promise constructor, to facilitate more inlining
+* Update README.md with details about PhantomJS requirement for running tests
+* Mangle and compress the minified version
+
+# 3.0.1
+
+* no longer include dist/test in npm releases
+
+# 3.0.0
+
+* use nextTick() instead of setImmediate() to schedule microtasks with node 0.10. Later versions of
+ nodes are not affected as they were already using nextTick(). Note that using nextTick() might
+ trigger a depreciation warning on 0.10 as described at https://github.com/cujojs/when/issues/410.
+ The reason why nextTick() is preferred is that is setImmediate() would schedule a macrotask
+ instead of a microtask and might result in a different scheduling.
+ If needed you can revert to the former behavior as follow:
+
+ var Promise = require('es6-promise').Promise;
+ Promise._setScheduler(setImmediate);
+
+# 2.3.0
+
+* #121: Ability to override the internal asap implementation
+* #120: Use an ascii character for an apostrophe, for source maps
+
+# 2.2.0
+
+* #116: Expose asap() and a way to override the scheduling mechanism on Promise
+* Lock to v0.2.3 of ember-cli
+
+# 2.1.1
+
+* Fix #100 via #105: tell browserify to ignore vertx require
+* Fix #101 via #102: "follow thenable state, not own state"
+
+# 2.1.0
+
+* ? (see the commit log)
+
+# 2.0.0
+
+* re-sync with RSVP. Many large performance improvements and bugfixes.
+
+# 1.0.0
+
+* first subset of RSVP
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/LICENSE
new file mode 100644
index 0000000..954ec59
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/README.md
new file mode 100644
index 0000000..16739ca
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/README.md
@@ -0,0 +1,74 @@
+# ES6-Promise (subset of [rsvp.js](https://github.com/tildeio/rsvp.js))
+
+This is a polyfill of the [ES6 Promise](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-constructor). The implementation is a subset of [rsvp.js](https://github.com/tildeio/rsvp.js) extracted by @jakearchibald, if you're wanting extra features and more debugging options, check out the [full library](https://github.com/tildeio/rsvp.js).
+
+For API details and how to use promises, see the <a href="http://www.html5rocks.com/en/tutorials/es6/promises/">JavaScript Promises HTML5Rocks article</a>.
+
+## Downloads
+
+* [es6-promise](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.js)
+* [es6-promise-min](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.min.js)
+
+## Node.js
+
+To install:
+
+```sh
+npm install es6-promise
+```
+
+To use:
+
+```js
+var Promise = require('es6-promise').Promise;
+```
+
+## Bower
+
+To install:
+
+```sh
+bower install es6-promise --save
+```
+
+
+## Usage in IE<9
+
+`catch` is a reserved word in IE<9, meaning `promise.catch(func)` throws a syntax error. To work around this, you can use a string to access the property as shown in the following example.
+
+However, please remember that such technique is already provided by most common minifiers, making the resulting code safe for old browsers and production:
+
+```js
+promise['catch'](function(err) {
+ // ...
+});
+```
+
+Or use `.then` instead:
+
+```js
+promise.then(undefined, function(err) {
+ // ...
+});
+```
+
+## Auto-polyfill
+
+To polyfill the global environment (either in Node or in the browser via CommonJS) use the following code snippet:
+
+```js
+require('es6-promise').polyfill();
+```
+
+Notice that we don't assign the result of `polyfill()` to any variable. The `polyfill()` method will patch the global environment (in this case to the `Promise` name) when called.
+
+## Building & Testing
+
+You will need to have PhantomJS installed globally in order to run the tests.
+
+`npm install -g phantomjs`
+
+* `npm run build` to build
+* `npm test` to run tests
+* `npm start` to run a build watcher, and webserver to test
+* `npm run test:server` for a testem test runner and watching builder
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/dist/es6-promise.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/dist/es6-promise.js
new file mode 100644
index 0000000..0755e9b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/dist/es6-promise.js
@@ -0,0 +1,959 @@
+/*!
+ * @overview es6-promise - a tiny implementation of Promises/A+.
+ * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
+ * @license Licensed under MIT license
+ * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
+ * @version 3.2.1
+ */
+
+(function() {
+ "use strict";
+ function lib$es6$promise$utils$$objectOrFunction(x) {
+ return typeof x === 'function' || (typeof x === 'object' && x !== null);
+ }
+
+ function lib$es6$promise$utils$$isFunction(x) {
+ return typeof x === 'function';
+ }
+
+ function lib$es6$promise$utils$$isMaybeThenable(x) {
+ return typeof x === 'object' && x !== null;
+ }
+
+ var lib$es6$promise$utils$$_isArray;
+ if (!Array.isArray) {
+ lib$es6$promise$utils$$_isArray = function (x) {
+ return Object.prototype.toString.call(x) === '[object Array]';
+ };
+ } else {
+ lib$es6$promise$utils$$_isArray = Array.isArray;
+ }
+
+ var lib$es6$promise$utils$$isArray = lib$es6$promise$utils$$_isArray;
+ var lib$es6$promise$asap$$len = 0;
+ var lib$es6$promise$asap$$vertxNext;
+ var lib$es6$promise$asap$$customSchedulerFn;
+
+ var lib$es6$promise$asap$$asap = function asap(callback, arg) {
+ lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len] = callback;
+ lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len + 1] = arg;
+ lib$es6$promise$asap$$len += 2;
+ if (lib$es6$promise$asap$$len === 2) {
+ // If len is 2, that means that we need to schedule an async flush.
+ // If additional callbacks are queued before the queue is flushed, they
+ // will be processed by this flush that we are scheduling.
+ if (lib$es6$promise$asap$$customSchedulerFn) {
+ lib$es6$promise$asap$$customSchedulerFn(lib$es6$promise$asap$$flush);
+ } else {
+ lib$es6$promise$asap$$scheduleFlush();
+ }
+ }
+ }
+
+ function lib$es6$promise$asap$$setScheduler(scheduleFn) {
+ lib$es6$promise$asap$$customSchedulerFn = scheduleFn;
+ }
+
+ function lib$es6$promise$asap$$setAsap(asapFn) {
+ lib$es6$promise$asap$$asap = asapFn;
+ }
+
+ var lib$es6$promise$asap$$browserWindow = (typeof window !== 'undefined') ? window : undefined;
+ var lib$es6$promise$asap$$browserGlobal = lib$es6$promise$asap$$browserWindow || {};
+ var lib$es6$promise$asap$$BrowserMutationObserver = lib$es6$promise$asap$$browserGlobal.MutationObserver || lib$es6$promise$asap$$browserGlobal.WebKitMutationObserver;
+ var lib$es6$promise$asap$$isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
+
+ // test for web worker but not in IE10
+ var lib$es6$promise$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' &&
+ typeof importScripts !== 'undefined' &&
+ typeof MessageChannel !== 'undefined';
+
+ // node
+ function lib$es6$promise$asap$$useNextTick() {
+ // node version 0.10.x displays a deprecation warning when nextTick is used recursively
+ // see https://github.com/cujojs/when/issues/410 for details
+ return function() {
+ process.nextTick(lib$es6$promise$asap$$flush);
+ };
+ }
+
+ // vertx
+ function lib$es6$promise$asap$$useVertxTimer() {
+ return function() {
+ lib$es6$promise$asap$$vertxNext(lib$es6$promise$asap$$flush);
+ };
+ }
+
+ function lib$es6$promise$asap$$useMutationObserver() {
+ var iterations = 0;
+ var observer = new lib$es6$promise$asap$$BrowserMutationObserver(lib$es6$promise$asap$$flush);
+ var node = document.createTextNode('');
+ observer.observe(node, { characterData: true });
+
+ return function() {
+ node.data = (iterations = ++iterations % 2);
+ };
+ }
+
+ // web worker
+ function lib$es6$promise$asap$$useMessageChannel() {
+ var channel = new MessageChannel();
+ channel.port1.onmessage = lib$es6$promise$asap$$flush;
+ return function () {
+ channel.port2.postMessage(0);
+ };
+ }
+
+ function lib$es6$promise$asap$$useSetTimeout() {
+ return function() {
+ setTimeout(lib$es6$promise$asap$$flush, 1);
+ };
+ }
+
+ var lib$es6$promise$asap$$queue = new Array(1000);
+ function lib$es6$promise$asap$$flush() {
+ for (var i = 0; i < lib$es6$promise$asap$$len; i+=2) {
+ var callback = lib$es6$promise$asap$$queue[i];
+ var arg = lib$es6$promise$asap$$queue[i+1];
+
+ callback(arg);
+
+ lib$es6$promise$asap$$queue[i] = undefined;
+ lib$es6$promise$asap$$queue[i+1] = undefined;
+ }
+
+ lib$es6$promise$asap$$len = 0;
+ }
+
+ function lib$es6$promise$asap$$attemptVertx() {
+ try {
+ var r = require;
+ var vertx = r('vertx');
+ lib$es6$promise$asap$$vertxNext = vertx.runOnLoop || vertx.runOnContext;
+ return lib$es6$promise$asap$$useVertxTimer();
+ } catch(e) {
+ return lib$es6$promise$asap$$useSetTimeout();
+ }
+ }
+
+ var lib$es6$promise$asap$$scheduleFlush;
+ // Decide what async method to use to triggering processing of queued callbacks:
+ if (lib$es6$promise$asap$$isNode) {
+ lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useNextTick();
+ } else if (lib$es6$promise$asap$$BrowserMutationObserver) {
+ lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useMutationObserver();
+ } else if (lib$es6$promise$asap$$isWorker) {
+ lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useMessageChannel();
+ } else if (lib$es6$promise$asap$$browserWindow === undefined && typeof require === 'function') {
+ lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$attemptVertx();
+ } else {
+ lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useSetTimeout();
+ }
+ function lib$es6$promise$then$$then(onFulfillment, onRejection) {
+ var parent = this;
+
+ var child = new this.constructor(lib$es6$promise$$internal$$noop);
+
+ if (child[lib$es6$promise$$internal$$PROMISE_ID] === undefined) {
+ lib$es6$promise$$internal$$makePromise(child);
+ }
+
+ var state = parent._state;
+
+ if (state) {
+ var callback = arguments[state - 1];
+ lib$es6$promise$asap$$asap(function(){
+ lib$es6$promise$$internal$$invokeCallback(state, child, callback, parent._result);
+ });
+ } else {
+ lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection);
+ }
+
+ return child;
+ }
+ var lib$es6$promise$then$$default = lib$es6$promise$then$$then;
+ function lib$es6$promise$promise$resolve$$resolve(object) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (object && typeof object === 'object' && object.constructor === Constructor) {
+ return object;
+ }
+
+ var promise = new Constructor(lib$es6$promise$$internal$$noop);
+ lib$es6$promise$$internal$$resolve(promise, object);
+ return promise;
+ }
+ var lib$es6$promise$promise$resolve$$default = lib$es6$promise$promise$resolve$$resolve;
+ var lib$es6$promise$$internal$$PROMISE_ID = Math.random().toString(36).substring(16);
+
+ function lib$es6$promise$$internal$$noop() {}
+
+ var lib$es6$promise$$internal$$PENDING = void 0;
+ var lib$es6$promise$$internal$$FULFILLED = 1;
+ var lib$es6$promise$$internal$$REJECTED = 2;
+
+ var lib$es6$promise$$internal$$GET_THEN_ERROR = new lib$es6$promise$$internal$$ErrorObject();
+
+ function lib$es6$promise$$internal$$selfFulfillment() {
+ return new TypeError("You cannot resolve a promise with itself");
+ }
+
+ function lib$es6$promise$$internal$$cannotReturnOwn() {
+ return new TypeError('A promises callback cannot return that same promise.');
+ }
+
+ function lib$es6$promise$$internal$$getThen(promise) {
+ try {
+ return promise.then;
+ } catch(error) {
+ lib$es6$promise$$internal$$GET_THEN_ERROR.error = error;
+ return lib$es6$promise$$internal$$GET_THEN_ERROR;
+ }
+ }
+
+ function lib$es6$promise$$internal$$tryThen(then, value, fulfillmentHandler, rejectionHandler) {
+ try {
+ then.call(value, fulfillmentHandler, rejectionHandler);
+ } catch(e) {
+ return e;
+ }
+ }
+
+ function lib$es6$promise$$internal$$handleForeignThenable(promise, thenable, then) {
+ lib$es6$promise$asap$$asap(function(promise) {
+ var sealed = false;
+ var error = lib$es6$promise$$internal$$tryThen(then, thenable, function(value) {
+ if (sealed) { return; }
+ sealed = true;
+ if (thenable !== value) {
+ lib$es6$promise$$internal$$resolve(promise, value);
+ } else {
+ lib$es6$promise$$internal$$fulfill(promise, value);
+ }
+ }, function(reason) {
+ if (sealed) { return; }
+ sealed = true;
+
+ lib$es6$promise$$internal$$reject(promise, reason);
+ }, 'Settle: ' + (promise._label || ' unknown promise'));
+
+ if (!sealed && error) {
+ sealed = true;
+ lib$es6$promise$$internal$$reject(promise, error);
+ }
+ }, promise);
+ }
+
+ function lib$es6$promise$$internal$$handleOwnThenable(promise, thenable) {
+ if (thenable._state === lib$es6$promise$$internal$$FULFILLED) {
+ lib$es6$promise$$internal$$fulfill(promise, thenable._result);
+ } else if (thenable._state === lib$es6$promise$$internal$$REJECTED) {
+ lib$es6$promise$$internal$$reject(promise, thenable._result);
+ } else {
+ lib$es6$promise$$internal$$subscribe(thenable, undefined, function(value) {
+ lib$es6$promise$$internal$$resolve(promise, value);
+ }, function(reason) {
+ lib$es6$promise$$internal$$reject(promise, reason);
+ });
+ }
+ }
+
+ function lib$es6$promise$$internal$$handleMaybeThenable(promise, maybeThenable, then) {
+ if (maybeThenable.constructor === promise.constructor &&
+ then === lib$es6$promise$then$$default &&
+ constructor.resolve === lib$es6$promise$promise$resolve$$default) {
+ lib$es6$promise$$internal$$handleOwnThenable(promise, maybeThenable);
+ } else {
+ if (then === lib$es6$promise$$internal$$GET_THEN_ERROR) {
+ lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$GET_THEN_ERROR.error);
+ } else if (then === undefined) {
+ lib$es6$promise$$internal$$fulfill(promise, maybeThenable);
+ } else if (lib$es6$promise$utils$$isFunction(then)) {
+ lib$es6$promise$$internal$$handleForeignThenable(promise, maybeThenable, then);
+ } else {
+ lib$es6$promise$$internal$$fulfill(promise, maybeThenable);
+ }
+ }
+ }
+
+ function lib$es6$promise$$internal$$resolve(promise, value) {
+ if (promise === value) {
+ lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$selfFulfillment());
+ } else if (lib$es6$promise$utils$$objectOrFunction(value)) {
+ lib$es6$promise$$internal$$handleMaybeThenable(promise, value, lib$es6$promise$$internal$$getThen(value));
+ } else {
+ lib$es6$promise$$internal$$fulfill(promise, value);
+ }
+ }
+
+ function lib$es6$promise$$internal$$publishRejection(promise) {
+ if (promise._onerror) {
+ promise._onerror(promise._result);
+ }
+
+ lib$es6$promise$$internal$$publish(promise);
+ }
+
+ function lib$es6$promise$$internal$$fulfill(promise, value) {
+ if (promise._state !== lib$es6$promise$$internal$$PENDING) { return; }
+
+ promise._result = value;
+ promise._state = lib$es6$promise$$internal$$FULFILLED;
+
+ if (promise._subscribers.length !== 0) {
+ lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, promise);
+ }
+ }
+
+ function lib$es6$promise$$internal$$reject(promise, reason) {
+ if (promise._state !== lib$es6$promise$$internal$$PENDING) { return; }
+ promise._state = lib$es6$promise$$internal$$REJECTED;
+ promise._result = reason;
+
+ lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publishRejection, promise);
+ }
+
+ function lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection) {
+ var subscribers = parent._subscribers;
+ var length = subscribers.length;
+
+ parent._onerror = null;
+
+ subscribers[length] = child;
+ subscribers[length + lib$es6$promise$$internal$$FULFILLED] = onFulfillment;
+ subscribers[length + lib$es6$promise$$internal$$REJECTED] = onRejection;
+
+ if (length === 0 && parent._state) {
+ lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, parent);
+ }
+ }
+
+ function lib$es6$promise$$internal$$publish(promise) {
+ var subscribers = promise._subscribers;
+ var settled = promise._state;
+
+ if (subscribers.length === 0) { return; }
+
+ var child, callback, detail = promise._result;
+
+ for (var i = 0; i < subscribers.length; i += 3) {
+ child = subscribers[i];
+ callback = subscribers[i + settled];
+
+ if (child) {
+ lib$es6$promise$$internal$$invokeCallback(settled, child, callback, detail);
+ } else {
+ callback(detail);
+ }
+ }
+
+ promise._subscribers.length = 0;
+ }
+
+ function lib$es6$promise$$internal$$ErrorObject() {
+ this.error = null;
+ }
+
+ var lib$es6$promise$$internal$$TRY_CATCH_ERROR = new lib$es6$promise$$internal$$ErrorObject();
+
+ function lib$es6$promise$$internal$$tryCatch(callback, detail) {
+ try {
+ return callback(detail);
+ } catch(e) {
+ lib$es6$promise$$internal$$TRY_CATCH_ERROR.error = e;
+ return lib$es6$promise$$internal$$TRY_CATCH_ERROR;
+ }
+ }
+
+ function lib$es6$promise$$internal$$invokeCallback(settled, promise, callback, detail) {
+ var hasCallback = lib$es6$promise$utils$$isFunction(callback),
+ value, error, succeeded, failed;
+
+ if (hasCallback) {
+ value = lib$es6$promise$$internal$$tryCatch(callback, detail);
+
+ if (value === lib$es6$promise$$internal$$TRY_CATCH_ERROR) {
+ failed = true;
+ error = value.error;
+ value = null;
+ } else {
+ succeeded = true;
+ }
+
+ if (promise === value) {
+ lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$cannotReturnOwn());
+ return;
+ }
+
+ } else {
+ value = detail;
+ succeeded = true;
+ }
+
+ if (promise._state !== lib$es6$promise$$internal$$PENDING) {
+ // noop
+ } else if (hasCallback && succeeded) {
+ lib$es6$promise$$internal$$resolve(promise, value);
+ } else if (failed) {
+ lib$es6$promise$$internal$$reject(promise, error);
+ } else if (settled === lib$es6$promise$$internal$$FULFILLED) {
+ lib$es6$promise$$internal$$fulfill(promise, value);
+ } else if (settled === lib$es6$promise$$internal$$REJECTED) {
+ lib$es6$promise$$internal$$reject(promise, value);
+ }
+ }
+
+ function lib$es6$promise$$internal$$initializePromise(promise, resolver) {
+ try {
+ resolver(function resolvePromise(value){
+ lib$es6$promise$$internal$$resolve(promise, value);
+ }, function rejectPromise(reason) {
+ lib$es6$promise$$internal$$reject(promise, reason);
+ });
+ } catch(e) {
+ lib$es6$promise$$internal$$reject(promise, e);
+ }
+ }
+
+ var lib$es6$promise$$internal$$id = 0;
+ function lib$es6$promise$$internal$$nextId() {
+ return lib$es6$promise$$internal$$id++;
+ }
+
+ function lib$es6$promise$$internal$$makePromise(promise) {
+ promise[lib$es6$promise$$internal$$PROMISE_ID] = lib$es6$promise$$internal$$id++;
+ promise._state = undefined;
+ promise._result = undefined;
+ promise._subscribers = [];
+ }
+
+ function lib$es6$promise$promise$all$$all(entries) {
+ return new lib$es6$promise$enumerator$$default(this, entries).promise;
+ }
+ var lib$es6$promise$promise$all$$default = lib$es6$promise$promise$all$$all;
+ function lib$es6$promise$promise$race$$race(entries) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (!lib$es6$promise$utils$$isArray(entries)) {
+ return new Constructor(function(resolve, reject) {
+ reject(new TypeError('You must pass an array to race.'));
+ });
+ } else {
+ return new Constructor(function(resolve, reject) {
+ var length = entries.length;
+ for (var i = 0; i < length; i++) {
+ Constructor.resolve(entries[i]).then(resolve, reject);
+ }
+ });
+ }
+ }
+ var lib$es6$promise$promise$race$$default = lib$es6$promise$promise$race$$race;
+ function lib$es6$promise$promise$reject$$reject(reason) {
+ /*jshint validthis:true */
+ var Constructor = this;
+ var promise = new Constructor(lib$es6$promise$$internal$$noop);
+ lib$es6$promise$$internal$$reject(promise, reason);
+ return promise;
+ }
+ var lib$es6$promise$promise$reject$$default = lib$es6$promise$promise$reject$$reject;
+
+
+ function lib$es6$promise$promise$$needsResolver() {
+ throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
+ }
+
+ function lib$es6$promise$promise$$needsNew() {
+ throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
+ }
+
+ var lib$es6$promise$promise$$default = lib$es6$promise$promise$$Promise;
+ /**
+ Promise objects represent the eventual result of an asynchronous operation. The
+ primary way of interacting with a promise is through its `then` method, which
+ registers callbacks to receive either a promise's eventual value or the reason
+ why the promise cannot be fulfilled.
+
+ Terminology
+ -----------
+
+ - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
+ - `thenable` is an object or function that defines a `then` method.
+ - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
+ - `exception` is a value that is thrown using the throw statement.
+ - `reason` is a value that indicates why a promise was rejected.
+ - `settled` the final resting state of a promise, fulfilled or rejected.
+
+ A promise can be in one of three states: pending, fulfilled, or rejected.
+
+ Promises that are fulfilled have a fulfillment value and are in the fulfilled
+ state. Promises that are rejected have a rejection reason and are in the
+ rejected state. A fulfillment value is never a thenable.
+
+ Promises can also be said to *resolve* a value. If this value is also a
+ promise, then the original promise's settled state will match the value's
+ settled state. So a promise that *resolves* a promise that rejects will
+ itself reject, and a promise that *resolves* a promise that fulfills will
+ itself fulfill.
+
+
+ Basic Usage:
+ ------------
+
+ ```js
+ var promise = new Promise(function(resolve, reject) {
+ // on success
+ resolve(value);
+
+ // on failure
+ reject(reason);
+ });
+
+ promise.then(function(value) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Advanced Usage:
+ ---------------
+
+ Promises shine when abstracting away asynchronous interactions such as
+ `XMLHttpRequest`s.
+
+ ```js
+ function getJSON(url) {
+ return new Promise(function(resolve, reject){
+ var xhr = new XMLHttpRequest();
+
+ xhr.open('GET', url);
+ xhr.onreadystatechange = handler;
+ xhr.responseType = 'json';
+ xhr.setRequestHeader('Accept', 'application/json');
+ xhr.send();
+
+ function handler() {
+ if (this.readyState === this.DONE) {
+ if (this.status === 200) {
+ resolve(this.response);
+ } else {
+ reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
+ }
+ }
+ };
+ });
+ }
+
+ getJSON('/posts.json').then(function(json) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Unlike callbacks, promises are great composable primitives.
+
+ ```js
+ Promise.all([
+ getJSON('/posts'),
+ getJSON('/comments')
+ ]).then(function(values){
+ values[0] // => postsJSON
+ values[1] // => commentsJSON
+
+ return values;
+ });
+ ```
+
+ @class Promise
+ @param {function} resolver
+ Useful for tooling.
+ @constructor
+ */
+ function lib$es6$promise$promise$$Promise(resolver) {
+ this[lib$es6$promise$$internal$$PROMISE_ID] = lib$es6$promise$$internal$$nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
+
+ if (lib$es6$promise$$internal$$noop !== resolver) {
+ typeof resolver !== 'function' && lib$es6$promise$promise$$needsResolver();
+ this instanceof lib$es6$promise$promise$$Promise ? lib$es6$promise$$internal$$initializePromise(this, resolver) : lib$es6$promise$promise$$needsNew();
+ }
+ }
+
+ lib$es6$promise$promise$$Promise.all = lib$es6$promise$promise$all$$default;
+ lib$es6$promise$promise$$Promise.race = lib$es6$promise$promise$race$$default;
+ lib$es6$promise$promise$$Promise.resolve = lib$es6$promise$promise$resolve$$default;
+ lib$es6$promise$promise$$Promise.reject = lib$es6$promise$promise$reject$$default;
+ lib$es6$promise$promise$$Promise._setScheduler = lib$es6$promise$asap$$setScheduler;
+ lib$es6$promise$promise$$Promise._setAsap = lib$es6$promise$asap$$setAsap;
+ lib$es6$promise$promise$$Promise._asap = lib$es6$promise$asap$$asap;
+
+ lib$es6$promise$promise$$Promise.prototype = {
+ constructor: lib$es6$promise$promise$$Promise,
+
+ /**
+ The primary way of interacting with a promise is through its `then` method,
+ which registers callbacks to receive either a promise's eventual value or the
+ reason why the promise cannot be fulfilled.
+
+ ```js
+ findUser().then(function(user){
+ // user is available
+ }, function(reason){
+ // user is unavailable, and you are given the reason why
+ });
+ ```
+
+ Chaining
+ --------
+
+ The return value of `then` is itself a promise. This second, 'downstream'
+ promise is resolved with the return value of the first promise's fulfillment
+ or rejection handler, or rejected if the handler throws an exception.
+
+ ```js
+ findUser().then(function (user) {
+ return user.name;
+ }, function (reason) {
+ return 'default name';
+ }).then(function (userName) {
+ // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
+ // will be `'default name'`
+ });
+
+ findUser().then(function (user) {
+ throw new Error('Found user, but still unhappy');
+ }, function (reason) {
+ throw new Error('`findUser` rejected and we're unhappy');
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
+ // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
+ });
+ ```
+ If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
+
+ ```js
+ findUser().then(function (user) {
+ throw new PedagogicalException('Upstream error');
+ }).then(function (value) {
+ // never reached
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // The `PedgagocialException` is propagated all the way down to here
+ });
+ ```
+
+ Assimilation
+ ------------
+
+ Sometimes the value you want to propagate to a downstream promise can only be
+ retrieved asynchronously. This can be achieved by returning a promise in the
+ fulfillment or rejection handler. The downstream promise will then be pending
+ until the returned promise is settled. This is called *assimilation*.
+
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // The user's comments are now available
+ });
+ ```
+
+ If the assimliated promise rejects, then the downstream promise will also reject.
+
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // If `findCommentsByAuthor` fulfills, we'll have the value here
+ }, function (reason) {
+ // If `findCommentsByAuthor` rejects, we'll have the reason here
+ });
+ ```
+
+ Simple Example
+ --------------
+
+ Synchronous Example
+
+ ```javascript
+ var result;
+
+ try {
+ result = findResult();
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+
+ Errback Example
+
+ ```js
+ findResult(function(result, err){
+ if (err) {
+ // failure
+ } else {
+ // success
+ }
+ });
+ ```
+
+ Promise Example;
+
+ ```javascript
+ findResult().then(function(result){
+ // success
+ }, function(reason){
+ // failure
+ });
+ ```
+
+ Advanced Example
+ --------------
+
+ Synchronous Example
+
+ ```javascript
+ var author, books;
+
+ try {
+ author = findAuthor();
+ books = findBooksByAuthor(author);
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+
+ Errback Example
+
+ ```js
+
+ function foundBooks(books) {
+
+ }
+
+ function failure(reason) {
+
+ }
+
+ findAuthor(function(author, err){
+ if (err) {
+ failure(err);
+ // failure
+ } else {
+ try {
+ findBoooksByAuthor(author, function(books, err) {
+ if (err) {
+ failure(err);
+ } else {
+ try {
+ foundBooks(books);
+ } catch(reason) {
+ failure(reason);
+ }
+ }
+ });
+ } catch(error) {
+ failure(err);
+ }
+ // success
+ }
+ });
+ ```
+
+ Promise Example;
+
+ ```javascript
+ findAuthor().
+ then(findBooksByAuthor).
+ then(function(books){
+ // found books
+ }).catch(function(reason){
+ // something went wrong
+ });
+ ```
+
+ @method then
+ @param {Function} onFulfilled
+ @param {Function} onRejected
+ Useful for tooling.
+ @return {Promise}
+ */
+ then: lib$es6$promise$then$$default,
+
+ /**
+ `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
+ as the catch block of a try/catch statement.
+
+ ```js
+ function findAuthor(){
+ throw new Error('couldn't find that author');
+ }
+
+ // synchronous
+ try {
+ findAuthor();
+ } catch(reason) {
+ // something went wrong
+ }
+
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
+ 'catch': function(onRejection) {
+ return this.then(null, onRejection);
+ }
+ };
+ var lib$es6$promise$enumerator$$default = lib$es6$promise$enumerator$$Enumerator;
+ function lib$es6$promise$enumerator$$Enumerator(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(lib$es6$promise$$internal$$noop);
+
+ if (!this.promise[lib$es6$promise$$internal$$PROMISE_ID]) {
+ lib$es6$promise$$internal$$makePromise(this.promise);
+ }
+
+ if (lib$es6$promise$utils$$isArray(input)) {
+ this._input = input;
+ this.length = input.length;
+ this._remaining = input.length;
+
+ this._result = new Array(this.length);
+
+ if (this.length === 0) {
+ lib$es6$promise$$internal$$fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate();
+ if (this._remaining === 0) {
+ lib$es6$promise$$internal$$fulfill(this.promise, this._result);
+ }
+ }
+ } else {
+ lib$es6$promise$$internal$$reject(this.promise, lib$es6$promise$enumerator$$validationError());
+ }
+ }
+
+ function lib$es6$promise$enumerator$$validationError() {
+ return new Error('Array Methods must be provided an Array');
+ }
+
+ lib$es6$promise$enumerator$$Enumerator.prototype._enumerate = function() {
+ var length = this.length;
+ var input = this._input;
+
+ for (var i = 0; this._state === lib$es6$promise$$internal$$PENDING && i < length; i++) {
+ this._eachEntry(input[i], i);
+ }
+ };
+
+ lib$es6$promise$enumerator$$Enumerator.prototype._eachEntry = function(entry, i) {
+ var c = this._instanceConstructor;
+ var resolve = c.resolve;
+
+ if (resolve === lib$es6$promise$promise$resolve$$default) {
+ var then = lib$es6$promise$$internal$$getThen(entry);
+
+ if (then === lib$es6$promise$then$$default &&
+ entry._state !== lib$es6$promise$$internal$$PENDING) {
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === lib$es6$promise$promise$$default) {
+ var promise = new c(lib$es6$promise$$internal$$noop);
+ lib$es6$promise$$internal$$handleMaybeThenable(promise, entry, then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(function(resolve) { resolve(entry); }), i);
+ }
+ } else {
+ this._willSettleAt(resolve(entry), i);
+ }
+ };
+
+ lib$es6$promise$enumerator$$Enumerator.prototype._settledAt = function(state, i, value) {
+ var promise = this.promise;
+
+ if (promise._state === lib$es6$promise$$internal$$PENDING) {
+ this._remaining--;
+
+ if (state === lib$es6$promise$$internal$$REJECTED) {
+ lib$es6$promise$$internal$$reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
+ }
+
+ if (this._remaining === 0) {
+ lib$es6$promise$$internal$$fulfill(promise, this._result);
+ }
+ };
+
+ lib$es6$promise$enumerator$$Enumerator.prototype._willSettleAt = function(promise, i) {
+ var enumerator = this;
+
+ lib$es6$promise$$internal$$subscribe(promise, undefined, function(value) {
+ enumerator._settledAt(lib$es6$promise$$internal$$FULFILLED, i, value);
+ }, function(reason) {
+ enumerator._settledAt(lib$es6$promise$$internal$$REJECTED, i, reason);
+ });
+ };
+ function lib$es6$promise$polyfill$$polyfill() {
+ var local;
+
+ if (typeof global !== 'undefined') {
+ local = global;
+ } else if (typeof self !== 'undefined') {
+ local = self;
+ } else {
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
+ }
+ }
+
+ var P = local.Promise;
+
+ if (P && Object.prototype.toString.call(P.resolve()) === '[object Promise]' && !P.cast) {
+ return;
+ }
+
+ local.Promise = lib$es6$promise$promise$$default;
+ }
+ var lib$es6$promise$polyfill$$default = lib$es6$promise$polyfill$$polyfill;
+
+ var lib$es6$promise$umd$$ES6Promise = {
+ 'Promise': lib$es6$promise$promise$$default,
+ 'polyfill': lib$es6$promise$polyfill$$default
+ };
+
+ /* global define:true module:true window: true */
+ if (typeof define === 'function' && define['amd']) {
+ define(function() { return lib$es6$promise$umd$$ES6Promise; });
+ } else if (typeof module !== 'undefined' && module['exports']) {
+ module['exports'] = lib$es6$promise$umd$$ES6Promise;
+ } else if (typeof this !== 'undefined') {
+ this['ES6Promise'] = lib$es6$promise$umd$$ES6Promise;
+ }
+
+ lib$es6$promise$polyfill$$default();
+}).call(this);
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/dist/es6-promise.min.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/dist/es6-promise.min.js
new file mode 100644
index 0000000..13151c2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/dist/es6-promise.min.js
@@ -0,0 +1,9 @@
+/*!
+ * @overview es6-promise - a tiny implementation of Promises/A+.
+ * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
+ * @license Licensed under MIT license
+ * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
+ * @version 3.2.1
+ */
+
+(function(){"use strict";function t(t){return"function"==typeof t||"object"==typeof t&&null!==t}function e(t){return"function"==typeof t}function n(t){G=t}function r(t){Q=t}function o(){return function(){process.nextTick(a)}}function i(){return function(){B(a)}}function s(){var t=0,e=new X(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){t.port2.postMessage(0)}}function c(){return function(){setTimeout(a,1)}}function a(){for(var t=0;J>t;t+=2){var e=tt[t],n=tt[t+1];e(n),tt[t]=void 0,tt[t+1]=void 0}J=0}function f(){try{var t=require,e=t("vertx");return B=e.runOnLoop||e.runOnContext,i()}catch(n){return c()}}function l(t,e){var n=this,r=new this.constructor(p);void 0===r[rt]&&k(r);var o=n._state;if(o){var i=arguments[o-1];Q(function(){x(o,r,i,n._result)})}else E(n,r,t,e);return r}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function _(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function v(t){try{return t.then}catch(e){return ut.error=e,ut}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){Q(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===it?S(t,e._result):e._state===st?j(t,e._result):E(e,void 0,function(e){g(t,e)},function(e){j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===et&&constructor.resolve===nt?b(t,n):r===ut?j(t,ut.error):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,_()):t(n)?w(e,n,v(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===ot&&(t._result=e,t._state=it,0!==t._subscribers.length&&Q(T,t))}function j(t,e){t._state===ot&&(t._state=st,t._result=e,Q(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+it]=n,o[i+st]=r,0===i&&t._state&&Q(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r,o,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?x(n,r,o,i):o(i);t._subscribers.length=0}}function M(){this.error=null}function P(t,e){try{return t(e)}catch(n){return ct.error=n,ct}}function x(t,n,r,o){var i,s,u,c,a=e(r);if(a){if(i=P(r,o),i===ct?(c=!0,s=i.error,i=null):u=!0,n===i)return void j(n,d())}else i=o,u=!0;n._state!==ot||(a&&u?g(n,i):c?j(n,s):t===it?S(n,i):t===st&&j(n,i))}function C(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function O(){return at++}function k(t){t[rt]=at++,t._state=void 0,t._result=void 0,t._subscribers=[]}function Y(t){return new _t(this,t).promise}function q(t){var e=this;return new e(I(t)?function(n,r){for(var o=t.length,i=0;o>i;i++)e.resolve(t[i]).then(n,r)}:function(t,e){e(new TypeError("You must pass an array to race."))})}function F(t){var e=this,n=new e(p);return j(n,t),n}function D(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function K(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function L(t){this[rt]=O(),this._result=this._state=void 0,this._subscribers=[],p!==t&&("function"!=typeof t&&D(),this instanceof L?C(this,t):K())}function N(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[rt]||k(this.promise),I(e)?(this._input=e,this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&S(this.promise,this._result))):j(this.promise,U())}function U(){return new Error("Array Methods must be provided an Array")}function W(){var t;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;(!n||"[object Promise]"!==Object.prototype.toString.call(n.resolve())||n.cast)&&(t.Promise=pt)}var z;z=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var B,G,H,I=z,J=0,Q=function(t,e){tt[J]=t,tt[J+1]=e,J+=2,2===J&&(G?G(a):H())},R="undefined"!=typeof window?window:void 0,V=R||{},X=V.MutationObserver||V.WebKitMutationObserver,Z="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),$="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,tt=new Array(1e3);H=Z?o():X?s():$?u():void 0===R&&"function"==typeof require?f():c();var et=l,nt=h,rt=Math.random().toString(36).substring(16),ot=void 0,it=1,st=2,ut=new M,ct=new M,at=0,ft=Y,lt=q,ht=F,pt=L;L.all=ft,L.race=lt,L.resolve=nt,L.reject=ht,L._setScheduler=n,L._setAsap=r,L._asap=Q,L.prototype={constructor:L,then:et,"catch":function(t){return this.then(null,t)}};var _t=N;N.prototype._enumerate=function(){for(var t=this.length,e=this._input,n=0;this._state===ot&&t>n;n++)this._eachEntry(e[n],n)},N.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===nt){var o=v(t);if(o===et&&t._state!==ot)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===pt){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){e(t)}),e)}else this._willSettleAt(r(t),e)},N.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===ot&&(this._remaining--,t===st?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},N.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){n._settledAt(it,e,t)},function(t){n._settledAt(st,e,t)})};var dt=W,vt={Promise:pt,polyfill:dt};"function"==typeof define&&define.amd?define(function(){return vt}):"undefined"!=typeof module&&module.exports?module.exports=vt:"undefined"!=typeof this&&(this.ES6Promise=vt),dt()}).call(this); \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise.umd.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise.umd.js
new file mode 100644
index 0000000..5984f70
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise.umd.js
@@ -0,0 +1,18 @@
+import Promise from './es6-promise/promise';
+import polyfill from './es6-promise/polyfill';
+
+var ES6Promise = {
+ 'Promise': Promise,
+ 'polyfill': polyfill
+};
+
+/* global define:true module:true window: true */
+if (typeof define === 'function' && define['amd']) {
+ define(function() { return ES6Promise; });
+} else if (typeof module !== 'undefined' && module['exports']) {
+ module['exports'] = ES6Promise;
+} else if (typeof this !== 'undefined') {
+ this['ES6Promise'] = ES6Promise;
+}
+
+polyfill();
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/-internal.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/-internal.js
new file mode 100644
index 0000000..aeebf57
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/-internal.js
@@ -0,0 +1,273 @@
+import {
+ objectOrFunction,
+ isFunction
+} from './utils';
+
+import {
+ asap
+} from './asap';
+
+import originalThen from './then';
+import originalResolve from './promise/resolve';
+
+export var PROMISE_ID = Math.random().toString(36).substring(16);
+
+function noop() {}
+
+var PENDING = void 0;
+var FULFILLED = 1;
+var REJECTED = 2;
+
+var GET_THEN_ERROR = new ErrorObject();
+
+function selfFulfillment() {
+ return new TypeError("You cannot resolve a promise with itself");
+}
+
+function cannotReturnOwn() {
+ return new TypeError('A promises callback cannot return that same promise.');
+}
+
+function getThen(promise) {
+ try {
+ return promise.then;
+ } catch(error) {
+ GET_THEN_ERROR.error = error;
+ return GET_THEN_ERROR;
+ }
+}
+
+function tryThen(then, value, fulfillmentHandler, rejectionHandler) {
+ try {
+ then.call(value, fulfillmentHandler, rejectionHandler);
+ } catch(e) {
+ return e;
+ }
+}
+
+function handleForeignThenable(promise, thenable, then) {
+ asap(function(promise) {
+ var sealed = false;
+ var error = tryThen(then, thenable, function(value) {
+ if (sealed) { return; }
+ sealed = true;
+ if (thenable !== value) {
+ resolve(promise, value);
+ } else {
+ fulfill(promise, value);
+ }
+ }, function(reason) {
+ if (sealed) { return; }
+ sealed = true;
+
+ reject(promise, reason);
+ }, 'Settle: ' + (promise._label || ' unknown promise'));
+
+ if (!sealed && error) {
+ sealed = true;
+ reject(promise, error);
+ }
+ }, promise);
+}
+
+function handleOwnThenable(promise, thenable) {
+ if (thenable._state === FULFILLED) {
+ fulfill(promise, thenable._result);
+ } else if (thenable._state === REJECTED) {
+ reject(promise, thenable._result);
+ } else {
+ subscribe(thenable, undefined, function(value) {
+ resolve(promise, value);
+ }, function(reason) {
+ reject(promise, reason);
+ });
+ }
+}
+
+function handleMaybeThenable(promise, maybeThenable, then) {
+ if (maybeThenable.constructor === promise.constructor &&
+ then === originalThen &&
+ constructor.resolve === originalResolve) {
+ handleOwnThenable(promise, maybeThenable);
+ } else {
+ if (then === GET_THEN_ERROR) {
+ reject(promise, GET_THEN_ERROR.error);
+ } else if (then === undefined) {
+ fulfill(promise, maybeThenable);
+ } else if (isFunction(then)) {
+ handleForeignThenable(promise, maybeThenable, then);
+ } else {
+ fulfill(promise, maybeThenable);
+ }
+ }
+}
+
+function resolve(promise, value) {
+ if (promise === value) {
+ reject(promise, selfFulfillment());
+ } else if (objectOrFunction(value)) {
+ handleMaybeThenable(promise, value, getThen(value));
+ } else {
+ fulfill(promise, value);
+ }
+}
+
+function publishRejection(promise) {
+ if (promise._onerror) {
+ promise._onerror(promise._result);
+ }
+
+ publish(promise);
+}
+
+function fulfill(promise, value) {
+ if (promise._state !== PENDING) { return; }
+
+ promise._result = value;
+ promise._state = FULFILLED;
+
+ if (promise._subscribers.length !== 0) {
+ asap(publish, promise);
+ }
+}
+
+function reject(promise, reason) {
+ if (promise._state !== PENDING) { return; }
+ promise._state = REJECTED;
+ promise._result = reason;
+
+ asap(publishRejection, promise);
+}
+
+function subscribe(parent, child, onFulfillment, onRejection) {
+ var subscribers = parent._subscribers;
+ var length = subscribers.length;
+
+ parent._onerror = null;
+
+ subscribers[length] = child;
+ subscribers[length + FULFILLED] = onFulfillment;
+ subscribers[length + REJECTED] = onRejection;
+
+ if (length === 0 && parent._state) {
+ asap(publish, parent);
+ }
+}
+
+function publish(promise) {
+ var subscribers = promise._subscribers;
+ var settled = promise._state;
+
+ if (subscribers.length === 0) { return; }
+
+ var child, callback, detail = promise._result;
+
+ for (var i = 0; i < subscribers.length; i += 3) {
+ child = subscribers[i];
+ callback = subscribers[i + settled];
+
+ if (child) {
+ invokeCallback(settled, child, callback, detail);
+ } else {
+ callback(detail);
+ }
+ }
+
+ promise._subscribers.length = 0;
+}
+
+function ErrorObject() {
+ this.error = null;
+}
+
+var TRY_CATCH_ERROR = new ErrorObject();
+
+function tryCatch(callback, detail) {
+ try {
+ return callback(detail);
+ } catch(e) {
+ TRY_CATCH_ERROR.error = e;
+ return TRY_CATCH_ERROR;
+ }
+}
+
+function invokeCallback(settled, promise, callback, detail) {
+ var hasCallback = isFunction(callback),
+ value, error, succeeded, failed;
+
+ if (hasCallback) {
+ value = tryCatch(callback, detail);
+
+ if (value === TRY_CATCH_ERROR) {
+ failed = true;
+ error = value.error;
+ value = null;
+ } else {
+ succeeded = true;
+ }
+
+ if (promise === value) {
+ reject(promise, cannotReturnOwn());
+ return;
+ }
+
+ } else {
+ value = detail;
+ succeeded = true;
+ }
+
+ if (promise._state !== PENDING) {
+ // noop
+ } else if (hasCallback && succeeded) {
+ resolve(promise, value);
+ } else if (failed) {
+ reject(promise, error);
+ } else if (settled === FULFILLED) {
+ fulfill(promise, value);
+ } else if (settled === REJECTED) {
+ reject(promise, value);
+ }
+}
+
+function initializePromise(promise, resolver) {
+ try {
+ resolver(function resolvePromise(value){
+ resolve(promise, value);
+ }, function rejectPromise(reason) {
+ reject(promise, reason);
+ });
+ } catch(e) {
+ reject(promise, e);
+ }
+}
+
+var id = 0;
+function nextId() {
+ return id++;
+}
+
+function makePromise(promise) {
+ promise[PROMISE_ID] = id++;
+ promise._state = undefined;
+ promise._result = undefined;
+ promise._subscribers = [];
+}
+
+export {
+ nextId,
+ makePromise,
+ getThen,
+ noop,
+ resolve,
+ reject,
+ fulfill,
+ subscribe,
+ publish,
+ publishRejection,
+ initializePromise,
+ invokeCallback,
+ FULFILLED,
+ REJECTED,
+ PENDING,
+ handleMaybeThenable
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/asap.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/asap.js
new file mode 100644
index 0000000..40f1d25
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/asap.js
@@ -0,0 +1,119 @@
+var len = 0;
+var vertxNext;
+var customSchedulerFn;
+
+export var asap = function asap(callback, arg) {
+ queue[len] = callback;
+ queue[len + 1] = arg;
+ len += 2;
+ if (len === 2) {
+ // If len is 2, that means that we need to schedule an async flush.
+ // If additional callbacks are queued before the queue is flushed, they
+ // will be processed by this flush that we are scheduling.
+ if (customSchedulerFn) {
+ customSchedulerFn(flush);
+ } else {
+ scheduleFlush();
+ }
+ }
+}
+
+export function setScheduler(scheduleFn) {
+ customSchedulerFn = scheduleFn;
+}
+
+export function setAsap(asapFn) {
+ asap = asapFn;
+}
+
+var browserWindow = (typeof window !== 'undefined') ? window : undefined;
+var browserGlobal = browserWindow || {};
+var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
+var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
+
+// test for web worker but not in IE10
+var isWorker = typeof Uint8ClampedArray !== 'undefined' &&
+ typeof importScripts !== 'undefined' &&
+ typeof MessageChannel !== 'undefined';
+
+// node
+function useNextTick() {
+ // node version 0.10.x displays a deprecation warning when nextTick is used recursively
+ // see https://github.com/cujojs/when/issues/410 for details
+ return function() {
+ process.nextTick(flush);
+ };
+}
+
+// vertx
+function useVertxTimer() {
+ return function() {
+ vertxNext(flush);
+ };
+}
+
+function useMutationObserver() {
+ var iterations = 0;
+ var observer = new BrowserMutationObserver(flush);
+ var node = document.createTextNode('');
+ observer.observe(node, { characterData: true });
+
+ return function() {
+ node.data = (iterations = ++iterations % 2);
+ };
+}
+
+// web worker
+function useMessageChannel() {
+ var channel = new MessageChannel();
+ channel.port1.onmessage = flush;
+ return function () {
+ channel.port2.postMessage(0);
+ };
+}
+
+function useSetTimeout() {
+ return function() {
+ setTimeout(flush, 1);
+ };
+}
+
+var queue = new Array(1000);
+function flush() {
+ for (var i = 0; i < len; i+=2) {
+ var callback = queue[i];
+ var arg = queue[i+1];
+
+ callback(arg);
+
+ queue[i] = undefined;
+ queue[i+1] = undefined;
+ }
+
+ len = 0;
+}
+
+function attemptVertx() {
+ try {
+ var r = require;
+ var vertx = r('vertx');
+ vertxNext = vertx.runOnLoop || vertx.runOnContext;
+ return useVertxTimer();
+ } catch(e) {
+ return useSetTimeout();
+ }
+}
+
+var scheduleFlush;
+// Decide what async method to use to triggering processing of queued callbacks:
+if (isNode) {
+ scheduleFlush = useNextTick();
+} else if (BrowserMutationObserver) {
+ scheduleFlush = useMutationObserver();
+} else if (isWorker) {
+ scheduleFlush = useMessageChannel();
+} else if (browserWindow === undefined && typeof require === 'function') {
+ scheduleFlush = attemptVertx();
+} else {
+ scheduleFlush = useSetTimeout();
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/enumerator.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/enumerator.js
new file mode 100644
index 0000000..2a7a28f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/enumerator.js
@@ -0,0 +1,118 @@
+import {
+ isArray,
+ isMaybeThenable
+} from './utils';
+
+import {
+ noop,
+ reject,
+ fulfill,
+ subscribe,
+ FULFILLED,
+ REJECTED,
+ PENDING,
+ getThen,
+ handleMaybeThenable
+} from './-internal';
+
+import then from './then';
+import Promise from './promise';
+import originalResolve from './promise/resolve';
+import originalThen from './then';
+import { makePromise, PROMISE_ID } from './-internal';
+
+export default Enumerator;
+function Enumerator(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
+
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
+
+ if (isArray(input)) {
+ this._input = input;
+ this.length = input.length;
+ this._remaining = input.length;
+
+ this._result = new Array(this.length);
+
+ if (this.length === 0) {
+ fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate();
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
+ }
+ } else {
+ reject(this.promise, validationError());
+ }
+}
+
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+};
+
+Enumerator.prototype._enumerate = function() {
+ var length = this.length;
+ var input = this._input;
+
+ for (var i = 0; this._state === PENDING && i < length; i++) {
+ this._eachEntry(input[i], i);
+ }
+};
+
+Enumerator.prototype._eachEntry = function(entry, i) {
+ var c = this._instanceConstructor;
+ var resolve = c.resolve;
+
+ if (resolve === originalResolve) {
+ var then = getThen(entry);
+
+ if (then === originalThen &&
+ entry._state !== PENDING) {
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise) {
+ var promise = new c(noop);
+ handleMaybeThenable(promise, entry, then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(function(resolve) { resolve(entry); }), i);
+ }
+ } else {
+ this._willSettleAt(resolve(entry), i);
+ }
+};
+
+Enumerator.prototype._settledAt = function(state, i, value) {
+ var promise = this.promise;
+
+ if (promise._state === PENDING) {
+ this._remaining--;
+
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
+ }
+
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+};
+
+Enumerator.prototype._willSettleAt = function(promise, i) {
+ var enumerator = this;
+
+ subscribe(promise, undefined, function(value) {
+ enumerator._settledAt(FULFILLED, i, value);
+ }, function(reason) {
+ enumerator._settledAt(REJECTED, i, reason);
+ });
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/polyfill.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/polyfill.js
new file mode 100644
index 0000000..6696dfc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/polyfill.js
@@ -0,0 +1,26 @@
+/*global self*/
+import Promise from './promise';
+
+export default function polyfill() {
+ var local;
+
+ if (typeof global !== 'undefined') {
+ local = global;
+ } else if (typeof self !== 'undefined') {
+ local = self;
+ } else {
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
+ }
+ }
+
+ var P = local.Promise;
+
+ if (P && Object.prototype.toString.call(P.resolve()) === '[object Promise]' && !P.cast) {
+ return;
+ }
+
+ local.Promise = Promise;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise.js
new file mode 100644
index 0000000..d95951e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise.js
@@ -0,0 +1,384 @@
+import {
+ isFunction
+} from './utils';
+
+import {
+ noop,
+ nextId,
+ PROMISE_ID,
+ initializePromise
+} from './-internal';
+
+import {
+ asap,
+ setAsap,
+ setScheduler
+} from './asap';
+
+import all from './promise/all';
+import race from './promise/race';
+import Resolve from './promise/resolve';
+import Reject from './promise/reject';
+import then from './then';
+
+
+function needsResolver() {
+ throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
+}
+
+function needsNew() {
+ throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
+}
+
+export default Promise;
+/**
+ Promise objects represent the eventual result of an asynchronous operation. The
+ primary way of interacting with a promise is through its `then` method, which
+ registers callbacks to receive either a promise's eventual value or the reason
+ why the promise cannot be fulfilled.
+
+ Terminology
+ -----------
+
+ - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
+ - `thenable` is an object or function that defines a `then` method.
+ - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
+ - `exception` is a value that is thrown using the throw statement.
+ - `reason` is a value that indicates why a promise was rejected.
+ - `settled` the final resting state of a promise, fulfilled or rejected.
+
+ A promise can be in one of three states: pending, fulfilled, or rejected.
+
+ Promises that are fulfilled have a fulfillment value and are in the fulfilled
+ state. Promises that are rejected have a rejection reason and are in the
+ rejected state. A fulfillment value is never a thenable.
+
+ Promises can also be said to *resolve* a value. If this value is also a
+ promise, then the original promise's settled state will match the value's
+ settled state. So a promise that *resolves* a promise that rejects will
+ itself reject, and a promise that *resolves* a promise that fulfills will
+ itself fulfill.
+
+
+ Basic Usage:
+ ------------
+
+ ```js
+ var promise = new Promise(function(resolve, reject) {
+ // on success
+ resolve(value);
+
+ // on failure
+ reject(reason);
+ });
+
+ promise.then(function(value) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Advanced Usage:
+ ---------------
+
+ Promises shine when abstracting away asynchronous interactions such as
+ `XMLHttpRequest`s.
+
+ ```js
+ function getJSON(url) {
+ return new Promise(function(resolve, reject){
+ var xhr = new XMLHttpRequest();
+
+ xhr.open('GET', url);
+ xhr.onreadystatechange = handler;
+ xhr.responseType = 'json';
+ xhr.setRequestHeader('Accept', 'application/json');
+ xhr.send();
+
+ function handler() {
+ if (this.readyState === this.DONE) {
+ if (this.status === 200) {
+ resolve(this.response);
+ } else {
+ reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
+ }
+ }
+ };
+ });
+ }
+
+ getJSON('/posts.json').then(function(json) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Unlike callbacks, promises are great composable primitives.
+
+ ```js
+ Promise.all([
+ getJSON('/posts'),
+ getJSON('/comments')
+ ]).then(function(values){
+ values[0] // => postsJSON
+ values[1] // => commentsJSON
+
+ return values;
+ });
+ ```
+
+ @class Promise
+ @param {function} resolver
+ Useful for tooling.
+ @constructor
+*/
+function Promise(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
+
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+}
+
+Promise.all = all;
+Promise.race = race;
+Promise.resolve = Resolve;
+Promise.reject = Reject;
+Promise._setScheduler = setScheduler;
+Promise._setAsap = setAsap;
+Promise._asap = asap;
+
+Promise.prototype = {
+ constructor: Promise,
+
+/**
+ The primary way of interacting with a promise is through its `then` method,
+ which registers callbacks to receive either a promise's eventual value or the
+ reason why the promise cannot be fulfilled.
+
+ ```js
+ findUser().then(function(user){
+ // user is available
+ }, function(reason){
+ // user is unavailable, and you are given the reason why
+ });
+ ```
+
+ Chaining
+ --------
+
+ The return value of `then` is itself a promise. This second, 'downstream'
+ promise is resolved with the return value of the first promise's fulfillment
+ or rejection handler, or rejected if the handler throws an exception.
+
+ ```js
+ findUser().then(function (user) {
+ return user.name;
+ }, function (reason) {
+ return 'default name';
+ }).then(function (userName) {
+ // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
+ // will be `'default name'`
+ });
+
+ findUser().then(function (user) {
+ throw new Error('Found user, but still unhappy');
+ }, function (reason) {
+ throw new Error('`findUser` rejected and we're unhappy');
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
+ // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
+ });
+ ```
+ If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
+
+ ```js
+ findUser().then(function (user) {
+ throw new PedagogicalException('Upstream error');
+ }).then(function (value) {
+ // never reached
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // The `PedgagocialException` is propagated all the way down to here
+ });
+ ```
+
+ Assimilation
+ ------------
+
+ Sometimes the value you want to propagate to a downstream promise can only be
+ retrieved asynchronously. This can be achieved by returning a promise in the
+ fulfillment or rejection handler. The downstream promise will then be pending
+ until the returned promise is settled. This is called *assimilation*.
+
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // The user's comments are now available
+ });
+ ```
+
+ If the assimliated promise rejects, then the downstream promise will also reject.
+
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // If `findCommentsByAuthor` fulfills, we'll have the value here
+ }, function (reason) {
+ // If `findCommentsByAuthor` rejects, we'll have the reason here
+ });
+ ```
+
+ Simple Example
+ --------------
+
+ Synchronous Example
+
+ ```javascript
+ var result;
+
+ try {
+ result = findResult();
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+
+ Errback Example
+
+ ```js
+ findResult(function(result, err){
+ if (err) {
+ // failure
+ } else {
+ // success
+ }
+ });
+ ```
+
+ Promise Example;
+
+ ```javascript
+ findResult().then(function(result){
+ // success
+ }, function(reason){
+ // failure
+ });
+ ```
+
+ Advanced Example
+ --------------
+
+ Synchronous Example
+
+ ```javascript
+ var author, books;
+
+ try {
+ author = findAuthor();
+ books = findBooksByAuthor(author);
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+
+ Errback Example
+
+ ```js
+
+ function foundBooks(books) {
+
+ }
+
+ function failure(reason) {
+
+ }
+
+ findAuthor(function(author, err){
+ if (err) {
+ failure(err);
+ // failure
+ } else {
+ try {
+ findBoooksByAuthor(author, function(books, err) {
+ if (err) {
+ failure(err);
+ } else {
+ try {
+ foundBooks(books);
+ } catch(reason) {
+ failure(reason);
+ }
+ }
+ });
+ } catch(error) {
+ failure(err);
+ }
+ // success
+ }
+ });
+ ```
+
+ Promise Example;
+
+ ```javascript
+ findAuthor().
+ then(findBooksByAuthor).
+ then(function(books){
+ // found books
+ }).catch(function(reason){
+ // something went wrong
+ });
+ ```
+
+ @method then
+ @param {Function} onFulfilled
+ @param {Function} onRejected
+ Useful for tooling.
+ @return {Promise}
+*/
+ then: then,
+
+/**
+ `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
+ as the catch block of a try/catch statement.
+
+ ```js
+ function findAuthor(){
+ throw new Error('couldn't find that author');
+ }
+
+ // synchronous
+ try {
+ findAuthor();
+ } catch(reason) {
+ // something went wrong
+ }
+
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+*/
+ 'catch': function(onRejection) {
+ return this.then(null, onRejection);
+ }
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/all.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/all.js
new file mode 100644
index 0000000..03033f0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/all.js
@@ -0,0 +1,52 @@
+import Enumerator from '../enumerator';
+
+/**
+ `Promise.all` accepts an array of promises, and returns a new promise which
+ is fulfilled with an array of fulfillment values for the passed promises, or
+ rejected with the reason of the first passed promise to be rejected. It casts all
+ elements of the passed iterable to promises as it runs this algorithm.
+
+ Example:
+
+ ```javascript
+ var promise1 = resolve(1);
+ var promise2 = resolve(2);
+ var promise3 = resolve(3);
+ var promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // The array here would be [ 1, 2, 3 ];
+ });
+ ```
+
+ If any of the `promises` given to `all` are rejected, the first promise
+ that is rejected will be given as an argument to the returned promises's
+ rejection handler. For example:
+
+ Example:
+
+ ```javascript
+ var promise1 = resolve(1);
+ var promise2 = reject(new Error("2"));
+ var promise3 = reject(new Error("3"));
+ var promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // Code here never runs because there are rejected promises!
+ }, function(error) {
+ // error.message === "2"
+ });
+ ```
+
+ @method all
+ @static
+ @param {Array} entries array of promises
+ @param {String} label optional string for labeling the promise.
+ Useful for tooling.
+ @return {Promise} promise that is fulfilled when all `promises` have been
+ fulfilled, or rejected if any of them become rejected.
+ @static
+*/
+export default function all(entries) {
+ return new Enumerator(this, entries).promise;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/race.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/race.js
new file mode 100644
index 0000000..8c922e3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/race.js
@@ -0,0 +1,86 @@
+import {
+ isArray
+} from "../utils";
+
+/**
+ `Promise.race` returns a new promise which is settled in the same way as the
+ first passed promise to settle.
+
+ Example:
+
+ ```javascript
+ var promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ var promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 2');
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // result === 'promise 2' because it was resolved before promise1
+ // was resolved.
+ });
+ ```
+
+ `Promise.race` is deterministic in that only the state of the first
+ settled promise matters. For example, even if other promises given to the
+ `promises` array argument are resolved, but the first settled promise has
+ become rejected before the other promises became fulfilled, the returned
+ promise will become rejected:
+
+ ```javascript
+ var promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ var promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ reject(new Error('promise 2'));
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // Code here never runs
+ }, function(reason){
+ // reason.message === 'promise 2' because promise 2 became rejected before
+ // promise 1 became fulfilled
+ });
+ ```
+
+ An example real-world use case is implementing timeouts:
+
+ ```javascript
+ Promise.race([ajax('foo.json'), timeout(5000)])
+ ```
+
+ @method race
+ @static
+ @param {Array} promises array of promises to observe
+ Useful for tooling.
+ @return {Promise} a promise which settles in the same way as the first passed
+ promise to settle.
+*/
+export default function race(entries) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (!isArray(entries)) {
+ return new Constructor(function(resolve, reject) {
+ reject(new TypeError('You must pass an array to race.'));
+ });
+ } else {
+ return new Constructor(function(resolve, reject) {
+ var length = entries.length;
+ for (var i = 0; i < length; i++) {
+ Constructor.resolve(entries[i]).then(resolve, reject);
+ }
+ });
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/reject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/reject.js
new file mode 100644
index 0000000..63b86cb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/reject.js
@@ -0,0 +1,46 @@
+import {
+ noop,
+ reject as _reject
+} from '../-internal';
+
+/**
+ `Promise.reject` returns a promise rejected with the passed `reason`.
+ It is shorthand for the following:
+
+ ```javascript
+ var promise = new Promise(function(resolve, reject){
+ reject(new Error('WHOOPS'));
+ });
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ var promise = Promise.reject(new Error('WHOOPS'));
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ @method reject
+ @static
+ @param {Any} reason value that the returned promise will be rejected with.
+ Useful for tooling.
+ @return {Promise} a promise rejected with the given `reason`.
+*/
+export default function reject(reason) {
+ /*jshint validthis:true */
+ var Constructor = this;
+ var promise = new Constructor(noop);
+ _reject(promise, reason);
+ return promise;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/resolve.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/resolve.js
new file mode 100644
index 0000000..201a545
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/resolve.js
@@ -0,0 +1,48 @@
+import {
+ noop,
+ resolve as _resolve
+} from '../-internal';
+
+/**
+ `Promise.resolve` returns a promise that will become resolved with the
+ passed `value`. It is shorthand for the following:
+
+ ```javascript
+ var promise = new Promise(function(resolve, reject){
+ resolve(1);
+ });
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ var promise = Promise.resolve(1);
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ @method resolve
+ @static
+ @param {Any} value value that the returned promise will be resolved with
+ Useful for tooling.
+ @return {Promise} a promise that will become fulfilled with the given
+ `value`
+*/
+export default function resolve(object) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (object && typeof object === 'object' && object.constructor === Constructor) {
+ return object;
+ }
+
+ var promise = new Constructor(noop);
+ _resolve(promise, object);
+ return promise;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/then.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/then.js
new file mode 100644
index 0000000..f97e946
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/then.js
@@ -0,0 +1,34 @@
+import {
+ invokeCallback,
+ subscribe,
+ FULFILLED,
+ REJECTED,
+ noop,
+ makePromise,
+ PROMISE_ID
+} from './-internal';
+
+import { asap } from './asap';
+
+export default function then(onFulfillment, onRejection) {
+ var parent = this;
+
+ var child = new this.constructor(noop);
+
+ if (child[PROMISE_ID] === undefined) {
+ makePromise(child);
+ }
+
+ var state = parent._state;
+
+ if (state) {
+ var callback = arguments[state - 1];
+ asap(function(){
+ invokeCallback(state, child, callback, parent._result);
+ });
+ } else {
+ subscribe(parent, child, onFulfillment, onRejection);
+ }
+
+ return child;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/utils.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/utils.js
new file mode 100644
index 0000000..31ec6f9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/utils.js
@@ -0,0 +1,22 @@
+export function objectOrFunction(x) {
+ return typeof x === 'function' || (typeof x === 'object' && x !== null);
+}
+
+export function isFunction(x) {
+ return typeof x === 'function';
+}
+
+export function isMaybeThenable(x) {
+ return typeof x === 'object' && x !== null;
+}
+
+var _isArray;
+if (!Array.isArray) {
+ _isArray = function (x) {
+ return Object.prototype.toString.call(x) === '[object Array]';
+ };
+} else {
+ _isArray = Array.isArray;
+}
+
+export var isArray = _isArray;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/package.json
new file mode 100644
index 0000000..22bef85
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/es6-promise/package.json
@@ -0,0 +1,96 @@
+{
+ "name": "es6-promise",
+ "namespace": "es6-promise",
+ "version": "3.2.1",
+ "description": "A lightweight library that provides tools for organizing asynchronous code",
+ "main": "dist/es6-promise.js",
+ "directories": {
+ "lib": "lib"
+ },
+ "files": [
+ "dist",
+ "lib",
+ "!dist/test"
+ ],
+ "devDependencies": {
+ "babel-eslint": "^6.0.0",
+ "broccoli-es6-module-transpiler": "^0.5.0",
+ "broccoli-jshint": "^2.1.0",
+ "broccoli-merge-trees": "^1.1.1",
+ "broccoli-replace": "^0.12.0",
+ "broccoli-stew": "^1.2.0",
+ "broccoli-uglify-js": "^0.1.3",
+ "broccoli-watchify": "^0.2.0",
+ "ember-cli": "2.5.0",
+ "ember-publisher": "0.0.7",
+ "git-repo-version": "0.0.3",
+ "json3": "^3.3.2",
+ "mocha": "^1.20.1",
+ "promises-aplus-tests-phantom": "^2.1.0-revise",
+ "release-it": "0.0.10"
+ },
+ "scripts": {
+ "build": "ember build",
+ "build:production": "ember build --environment production",
+ "start": "ember s",
+ "test": "ember test",
+ "test:server": "ember test --server",
+ "test:node": "ember build && mocha ./dist/test/browserify",
+ "lint": "jshint lib",
+ "prepublish": "ember build --environment production",
+ "dry-run-release": "ember build --environment production && release-it --dry-run --non-interactive"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/jakearchibald/ES6-Promises.git"
+ },
+ "bugs": {
+ "url": "https://github.com/jakearchibald/ES6-Promises/issues"
+ },
+ "browser": {
+ "vertx": false
+ },
+ "keywords": [
+ "promises",
+ "futures"
+ ],
+ "author": {
+ "name": "Yehuda Katz, Tom Dale, Stefan Penner and contributors",
+ "url": "Conversion to ES6 API by Jake Archibald"
+ },
+ "license": "MIT",
+ "spm": {
+ "main": "dist/es6-promise.js"
+ },
+ "gitHead": "5df472ec56d5b9fbc76589383852008d46055c61",
+ "homepage": "https://github.com/jakearchibald/ES6-Promises#readme",
+ "_id": "es6-promise@3.2.1",
+ "_shasum": "ec56233868032909207170c39448e24449dd1fc4",
+ "_from": "es6-promise@3.2.1",
+ "_npmVersion": "3.8.8",
+ "_nodeVersion": "5.10.1",
+ "_npmUser": {
+ "name": "stefanpenner",
+ "email": "stefan.penner@gmail.com"
+ },
+ "dist": {
+ "shasum": "ec56233868032909207170c39448e24449dd1fc4",
+ "tarball": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.2.1.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "jaffathecake",
+ "email": "jaffathecake@gmail.com"
+ },
+ {
+ "name": "stefanpenner",
+ "email": "stefan.penner@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/es6-promise-3.2.1.tgz_1463027774105_0.6333294357173145"
+ },
+ "_resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.2.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/.coveralls.yml b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/.coveralls.yml
new file mode 100644
index 0000000..a0b4fb6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/.coveralls.yml
@@ -0,0 +1 @@
+repo_token: 47iIZ0B3llo2Wc4dxWRltvgdImqcrVDTi
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/.eslintrc b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/.eslintrc
new file mode 100644
index 0000000..753e2a5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/.eslintrc
@@ -0,0 +1,15 @@
+{
+ "extends": ["eslint:recommended"],
+ "env": {
+ "node": true,
+ "mocha": true
+ },
+ "ecmaFeatures": {
+ "es6": true,
+ },
+ "plugins": [
+ ],
+ "rules": {
+ "no-console":0
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/HISTORY.md
new file mode 100644
index 0000000..e362724
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/HISTORY.md
@@ -0,0 +1,595 @@
+2.1.2 2016-12-10
+----------------
+* Delay topologyMonitoring on successful attemptReconnect as no need to run a full scan immediately.
+* Emit reconnect event in primary joining when in connected status for a replicaset.
+
+2.1.1 2016-12-08
+----------------
+* Updated bson library to 1.0.1.
+* Added optional support for bson-ext 1.0.1.
+
+2.1.0 2016-12-05
+----------------
+* Updated bson library to 1.0.0.
+* Added optional support for bson-ext 1.0.0.
+* Expose property parserType allowing for identification of currently configured parser.
+
+2.0.14 2016-11-29
+-----------------
+* Updated bson library to 0.5.7.
+* Dont leak connection.workItems elments when killCursor is called (Issue #150, https://github.com/mdlavin).
+* Remove unnecessary errors formatting (Issue #149, https://github.com/akryvomaz).
+* Only check isConnected against availableConnections (Issue #142).
+* NODE-838 Provide better error message on failed to connect on first retry for Mongos topology.
+* Set default servername to host is not passed through for sni.
+* Made monitoring happen on exclusive connection and using connectionTimeout to handle the wait time before failure (Issue #148).
+* NODE-859 Make minimum value of maxStalenessSeconds 90 seconds.
+* NODE-852 Fix Kerberos module deprecations on linux and windows and release new kerberos version.
+* NODE-850 Update Max Staleness implementation.
+* NODE-849 username no longer required for MONGODB-X509 auth.
+* NODE-848 BSON Regex flags must be alphabetically ordered.
+* NODE-846 Create notice for all third party libraries.
+* NODE-843 Executing bulk operations overwrites write concern parameter.
+* NODE-842 Re-sync SDAM and SDAM Monitoring tests from Specs repo.
+* NODE-840 Resync CRUD spec tests.
+* Unescapable while(true) loop (Issue #152).
+
+2.0.13 2016-10-21
+-----------------
+* Updated bson library to 0.5.6.
+ - Included cyclic dependency detection
+* Fire callback when topology was destroyed (Issue #147, https://github.com/vkarpov15).
+* Refactoring to support pipelining ala 1.4.x branch will retaining the benefits of the growing/shrinking pool (Issue #146).
+* Fix typo in serverHeartbeatFailed event name (Issue #143, https://github.com/jakesjews).
+* NODE-798 Driver hangs on count command in replica set with one member (Issue #141, https://github.com/isayme).
+
+2.0.12 2016-09-15
+-----------------
+* fix debug logging message not printing server name.
+* fixed application metadata being sent by wrong ismaster.
+* NODE-812 Fixed mongos stall due to proxy monitoring ismaster failure causing reconnect.
+* NODE-818 Replicaset timeouts in initial connect sequence can "no primary found".
+* Updated bson library to 0.5.5.
+* Added DBPointer up conversion to DBRef.
+
+2.0.11 2016-08-29
+-----------------
+* NODE-803, Fixed issue in how the latency window is calculated for Mongos topology causing issues for single proxy connections.
+* Avoid timeout in attemptReconnect causing multiple attemptReconnect attempts to happen (Issue #134, https://github.com/dead-horse).
+* Ensure promoteBuffers is propagated in same fashion as promoteValues and promoteLongs
+
+2.0.10 2016-08-23
+-----------------
+* Added promoteValues flag (default to true) to allow user to specify they only want wrapped BSON values back instead of promotion to native types.
+* Do not close mongos proxy connection on failed ismaster check in ha process (Issue #130).
+
+2.0.9 2016-08-19
+----------------
+* Allow promoteLongs to be passed in through Response.parse method and overrides default set on the connection.
+* NODE-798 Driver hangs on count command in replica set with one member.
+* Allow promoteLongs to be passed in through Response.parse method and overrides default set on the connection.
+* Allow passing in servername for TLS connections for SNI support.
+
+2.0.8 2016-08-16
+----------------
+* Allow execution of store operations indepent of having both a primary and secondary available (Issue #123).
+* Fixed command execution issue for mongos to ensure buffering of commands when no mongos available.
+* Added hashed connection names and fullResult.
+* Updated bson library to 0.5.3.
+* Wrap callback in nextTick to ensure exceptions are thrown correctly.
+
+2.0.7 2016-07-28
+----------------
+* Allow primary to be returned when secondaryPreferred is passed (Issue #117, https://github.com/dhendo).
+* Added better warnings when passing in illegal seed list members to a Mongos topology.
+* Minor attemptReconnect bug that would cause multiple attemptReconnect to run in parallel.
+* Fix wrong opType passed to disconnectHandler.add (Issue #121, https://github.com/adrian-gierakowski)
+* Implemented domain backward comp support enabled via domainsEnabled options on Server/ReplSet/Mongos and MongoClient.connect.
+* Initial max staleness implementation for ReplSet and Mongos for 3.4 support.
+* Added handling of collation for 3.4 support.
+
+2.0.6 2016-07-19
+----------------
+* Destroy connection on socket timeout due to newer node versions not closing the socket.
+
+2.0.5 2016-07-15
+----------------
+* Minor fixes to handle faster MongoClient connectivity from the driver, allowing single server instances to detect if they are a proxy.
+* Added numberOfConsecutiveTimeouts to pool that will destroy the pool if the number of consecutive timeouts > reconnectTries.
+* Print warning if seedlist servers host name does not match the one provided in it's ismaster.me field for Replicaset members.
+* Fix issue where Replicaset connection would not succeeed if there the replicaset was a single primary server setup.
+
+2.0.4 2016-07-11
+-----------------
+* Updated bson to version 0.5.1.
+* handle situation where user is providing seedlist names that do not match host list. fix allows for a single full discovery connection sweep before erroring out.
+* NODE-747 Polyfill for Object.assign for 0.12.x or 0.10.x.
+* NODE-746 Improves replicaset errors for wrong setName.
+
+2.0.3 2016-07-08
+-----------------
+* Implemented Server Selection Specification test suite.
+* Added warning level to logger.
+* Added warning message when sockeTimeout < haInterval for Replset/Mongos.
+
+2.0.2 2016-07-06
+-----------------
+* Mongos emits close event on no proxies available or when reconnect attempt fails.
+* Replset emits close event when no servers available or when attemptReconnect fails to reconnect.
+* Don't throw in auth methods but return error in callback.
+
+2.0.1 2016-07-05
+-----------------
+* Added missing logout method on mongos proxy topology.
+* Fixed logger error serialization issue.
+* Documentation fixes.
+
+2.0.0 2016-07-05
+-----------------
+* Moved all authentication and handling of growing/shrinking of pool connections into actual pool.
+* All authentication methods now handle both auth/reauthenticate and logout events.
+* Introduced logout method to get rid of onAll option for logout command.
+* Updated bson to 0.5.0 that includes Decimal128 support.
+
+1.3.21 2016-05-30
+-----------------
+* Pool gets stuck if a connection marked for immediateRelease times out (Issue #99, https://github.com/nbrachet).
+* Make authentication process retry up to authenticationRetries at authenticationRetryIntervalMS interval.
+* Made ismaster replicaset calls operate with connectTimeout or monitorSocketTimeout to lower impact of big socketTimeouts on monitoring performance.
+* Make sure connections mark as "immediateRelease" don't linger the inUserConnections list. Otherwise, after that connection times out, getAll() incorrectly returns more connections than are effectively present, causing the pool to not get restarted by reconnectServer. (Issue #99, https://github.com/nbrachet).
+* Make cursor getMore or killCursor correctly trigger pool reconnect to single server if pool has not been destroyed.
+* Make ismaster monitoring for single server connection default to avoid user confusion due to change in behavior.
+
+1.3.20 2016-05-25
+-----------------
+* NODE-710 Allow setting driver loggerLevel and logger function from MongoClient options.
+* Minor fix for SSL errors on connection attempts, minor fix to reconnect handler for the server.
+* Don't write to socket before having registered the callback for commands, work around for windows issuing error events twice on node.js when socket gets destroyed by firewall.
+* Fix minor issue where connectingServers would not be removed correctly causing single server connections to not auto-reconnect.
+
+1.3.19 2016-05-17
+-----------------
+- Handle situation where a server connection in a replicaset sometimes fails to be destroyed properly due to being in the middle of authentication when the destroy method is called on the replicaset causing it to be orphaned and never collected.
+- Set keepAlive to false by default to work around bug in node.js for Windows XP and Windows 2003.
+- Ensure replicaset topology destroy is never called by SDAM.
+- Ensure all paths are correctly returned on inspectServer in replset.
+
+1.3.18 2016-04-27
+-----------------
+- Hardened cursor connection handling for getMore and killCursor to ensure mid operation connection kill does not throw null exception.
+- Fixes for Node 6.0 support.
+
+1.3.17 2016-04-26
+-----------------
+- Added improved handling of reconnect when topology is a single server.
+- Added better handling of $query queries passed down for 3.2 or higher.
+- Introduced getServerFrom method to topologies to let cursor grab a new pool for getMore and killCursors commands and not use connection pipelining.
+- NODE-693 Move authentication to be after ismaster call to avoid authenticating against arbiters.
+
+1.3.16 2016-04-07
+-----------------
+- Only call unref on destroy if it exists to ensure proper working destroy method on early node v0.10.x versions.
+
+1.3.15 2016-04-06
+-----------------
+- NODE-687 Fixed issue where a server object failed to be destroyed if the replicaset state did not update successfully. This could leave active connections accumulating over time.
+- Fixed some situations where all connections are flushed due to a single connection in the connection pool closing.
+
+1.3.14 2016-04-01
+-----------------
+- Ensure server inquireServerState exits immediately on server.destroy call.
+- Refactored readPreference handling in 2.4, 2.6 and 3.2 wire protocol handling.
+
+1.3.13 2016-03-30
+-----------------
+- Handle missing cursor on getMore when going through a mongos proxy by pinning to socket connection and not server.
+
+1.3.12 2016-03-29
+-----------------
+- Mongos pickProxies fall back to closest mongos if no proxies meet latency window specified.
+
+1.3.11 2016-03-29
+-----------------
+- isConnected method for mongos uses same selection code as getServer.
+- Exceptions in cursor getServer trapped and correctly delegated to high level handler.
+
+1.3.10 2016-03-22
+-----------------
+- SDAM Monitoring emits diff for Replicasets to simplify detecting the state changes.
+- SDAM Monitoring correctly emits Mongos as serverDescriptionEvent.
+
+1.3.9 2016-03-20
+----------------
+- Removed monitoring exclusive connection, should resolve timeouts and reconnects on idle replicasets where haInteval > socketTimeout.
+
+1.3.8 2016-03-18
+----------------
+- Implements the SDAM monitoring specification.
+- Fix issue where cursor would error out and not be buffered when primary is not connected.
+
+1.3.7 2016-03-16
+----------------
+- Fixed issue with replicasetInquirer where it could stop performing monitoring if there was no servers available.
+
+1.3.6 2016-03-15
+----------------
+- Fixed raise condition where multiple replicasetInquirer operations could be started in parallel creating redundant connections.
+
+1.3.5 2016-03-14
+----------------
+- Handle rogue SSL exceptions (Issue #85, https://github.com/durran).
+
+1.3.4 2016-03-14
+----------------
+- Added unref options on server, replicaset and mongos (Issue #81, https://github.com/allevo)
+- cursorNotFound flag always false (Issue #83, https://github.com/xgfd)
+- refactor of events emission of fullsetup and all events (Issue #84, https://github.com/xizhibei)
+
+1.3.3 2016-03-08
+----------------
+- Added support for promoteLongs option for command function.
+- Return connection if no callback available
+- Emit connect event when server reconnects after initial connection failed (Issue #76, https://github.com/vkarpov15)
+- Introduced optional monitoringSocketTimeout option to allow better control of SDAM monitoring timeouts.
+- Made monitoringSocketTimeout default to 30000 if no connectionTimeout value specified or if set to 0.
+- Fixed issue where tailable cursor would not retry even though cursor was still alive.
+- Disabled exhaust flag support to avoid issues where users could easily write code that would cause memory to run out.
+- Handle the case where the first command result document returns an empty list of documents but a live cursor.
+- Allow passing down off CANONICALIZE_HOST_NAME and SERVICE_REALM options for kerberos.
+
+1.3.2 2016-02-09
+----------------
+- Harden MessageHandler in server.js to avoid issues where we cannot find a callback for an operation.
+- Ensure RequestId can never be larger than Max Number integer size.
+
+1.3.1 2016-02-05
+----------------
+- Removed annoying missing Kerberos error (NODE-654).
+
+1.3.0 2016-02-03
+----------------
+- Added raw support for the command function on topologies.
+- Fixed issue where raw results that fell on batchSize boundaries failed (Issue #72)
+- Copy over all the properties to the callback returned from bindToDomain, (Issue #72)
+- Added connection hash id to be able to reference connection host/name without leaking it outside of driver.
+- NODE-638, Cannot authenticate database user with utf-8 password.
+- Refactored pool to be worker queue based, minimizing the impact a slow query have on throughput as long as # slow queries < # connections in the pool.
+- Pool now grows and shrinks correctly depending on demand not causing a full pool reconnect.
+- Improvements in monitoring of a Replicaset where in certain situations the inquiry process could get exited.
+- Switched to using Array.push instead of concat for use cases of a lot of documents.
+- Fixed issue where re-authentication could loose the credentials if whole Replicaset disconnected at once.
+- Added peer optional dependencies support using require_optional module.
+
+1.2.32 2016-01-12
+-----------------
+- Bumped bson to V0.4.21 to allow using minor optimizations.
+
+1.2.31 2016-01-04
+-----------------
+- Allow connection to secondary if primaryPreferred or secondaryPreferred (Issue #70, https://github.com/leichter)
+
+1.2.30 2015-12-23
+-----------------
+- Pool allocates size + 1 connections when using replicasets, reserving additional pool connection for monitoring exclusively.
+- Fixes bug when all replicaset members are down, that would cause it to fail to reconnect using the originally provided seedlist.
+
+1.2.29 2015-12-17
+-----------------
+- Correctly emit close event when calling destroy on server topology.
+
+1.2.28 2015-12-13
+-----------------
+- Backed out Prevent Maximum call stack exceeded by calling all callbacks on nextTick, (Issue #64, https://github.com/iamruinous) as it breaks node 0.10.x support.
+
+1.2.27 2015-12-13
+-----------------
+- Added [options.checkServerIdentity=true] {boolean|function}. Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function, (Issue #29).
+- Prevent Maximum call stack exceeded by calling all callbacks on nextTick, (Issue #64, https://github.com/iamruinous).
+- State is not defined in mongos, (Issue #63, https://github.com/flyingfisher).
+- Fixed corner case issue on exhaust cursors on pre 3.0.x MongoDB.
+
+1.2.26 2015-11-23
+-----------------
+- Converted test suite to use mongodb-topology-manager.
+- Upgraded bson library to V0.4.20.
+- Minor fixes for 3.2 readPreferences.
+
+1.2.25 2015-11-23
+-----------------
+- Correctly error out when passed a seedlist of non-valid server members.
+
+1.2.24 2015-11-20
+-----------------
+- Fix Automattic/mongoose#3481; flush callbacks on error, (Issue #57, https://github.com/vkarpov15).
+- $explain query for wire protocol 2.6 and 2.4 does not set number of returned documents to -1 but to 0.
+
+1.2.23 2015-11-16
+-----------------
+- ismaster runs against admin.$cmd instead of system.$cmd.
+
+1.2.22 2015-11-16
+-----------------
+- Fixes to handle getMore command errors for MongoDB 3.2
+- Allows the process to properly close upon a Db.close() call on the replica set by shutting down the haTimer and closing arbiter connections.
+
+1.2.21 2015-11-07
+-----------------
+- Hardened the checking for replicaset equality checks.
+- OpReplay flag correctly set on Wire protocol query.
+- Mongos load balancing added, introduced localThresholdMS to control the feature.
+- Kerberos now a peerDependency, making it not install it by default in Node 5.0 or higher.
+
+1.2.20 2015-10-28
+-----------------
+- Fixed bug in arbiter connection capping code.
+- NODE-599 correctly handle arrays of server tags in order of priority.
+- Fix for 2.6 wire protocol handler related to readPreference handling.
+- Added maxAwaitTimeMS support for 3.2 getMore to allow for custom timeouts on tailable cursors.
+- Make CoreCursor check for $err before saying that 'next' succeeded (Issue #53, https://github.com/vkarpov15).
+
+1.2.19 2015-10-15
+-----------------
+- Make batchSize always be > 0 for 3.2 wire protocol to make it work consistently with pre 3.2 servers.
+- Locked to bson 0.4.19.
+
+1.2.18 2015-10-15
+-----------------
+- Minor 3.2 fix for handling readPreferences on sharded commands.
+- Minor fixes to correctly pass APM specification test suite.
+
+1.2.17 2015-10-08
+-----------------
+- Connections to arbiters only maintain a single connection.
+
+1.2.15 2015-10-06
+-----------------
+- Set slaveOk to true for getMore and killCursors commands.
+- Don't swallow callback errors for 2.4 single server (Issue #49, https://github.com/vkarpov15).
+- Apply toString('hex') to each buffer in an array when logging (Issue #48, https://github.com/nbrachet).
+
+1.2.14 2015-09-28
+-----------------
+- NODE-547 only emit error if there are any listeners.
+- Fixed APM issue with issuing readConcern.
+
+1.2.13 2015-09-18
+-----------------
+- Added BSON serializer ignoreUndefined option for insert/update/remove/command/cursor.
+
+1.2.12 2015-09-08
+-----------------
+- NODE-541 Added initial support for readConcern.
+
+1.2.11 2015-08-31
+-----------------
+- NODE-535 If connectWithNoPrimary is true then primary-only connection is not allowed.
+- NODE-534 Passive secondaries are not allowed for secondaryOnlyConnectionAllowed.
+- Fixed filtering bug for logging (Issue 30, https://github.com/christkv/mongodb-core/issues/30).
+
+1.2.10 2015-08-14
+-----------------
+- Added missing Mongos.prototype.parserType function.
+
+1.2.9 2015-08-05
+----------------
+- NODE-525 Reset connectionTimeout after it's overwritten by tls.connect.
+- NODE-518 connectTimeoutMS is doubled in 2.0.39.
+
+1.2.8 2015-07-24
+-----------------
+- Minor fix to handle 2.4.x errors better by correctly return driver layer issues.
+
+1.2.7 2015-07-16
+-----------------
+- Refactoring to allow to tap into find/getmore/killcursor in cursors for APM monitoring in driver.
+
+1.2.6 2015-07-14
+-----------------
+- NODE-505 Query fails to find records that have a 'result' property with an array value.
+
+1.2.5 2015-07-14
+-----------------
+- NODE-492 correctly handle hanging replicaset monitoring connections when server is unavailable due to network partitions or firewalls dropping packets, configureable using the connectionTimeoutMS setting.
+
+1.2.4 2015-07-07
+-----------------
+- NODE-493 staggering the socket connections to avoid overwhelming the mongod process.
+
+1.2.3 2015-06-26
+-----------------
+- Minor bug fixes.
+
+1.2.2 2015-06-22
+-----------------
+- Fix issue with SCRAM authentication causing authentication to return true on failed authentication (Issue 26, https://github.com/cglass17).
+
+1.2.1 2015-06-17
+-----------------
+- Ensure serializeFunctions passed down correctly to wire protocol.
+
+1.2.0 2015-06-17
+-----------------
+- Switching to using the 0.4.x pure JS serializer, removing dependency on C++ parser.
+- Refactoring wire protocol messages to avoid expensive size calculations of documents in favor of writing out an array of buffers to the sockets.
+- NODE-486 fixed issue related to limit and skip when calling toArray in 2.0 driver.
+- NODE-483 throw error if capabilities of topology is queries before topology has performed connection setup.
+- NODE-487 fixed issue where killcursor command was not being sent correctly on limit and skip queries.
+
+1.1.33 2015-05-31
+-----------------
+- NODE-478 Work around authentication race condition in mongos authentication due to multi step authentication methods like SCRAM.
+
+1.1.32 2015-05-20
+-----------------
+- After reconnect, it updates the allowable reconnect retries to the option settings (Issue #23, https://github.com/owenallenaz)
+
+1.1.31 2015-05-19
+-----------------
+- Minor fixes for issues with re-authentication of mongos.
+
+1.1.30 2015-05-18
+-----------------
+- Correctly emit 'all' event when primary + all secondaries have connected.
+
+1.1.29 2015-05-17
+-----------------
+- NODE-464 Only use a single socket against arbiters and hidden servers.
+- Ensure we filter out hidden servers from any server queries.
+
+1.1.28 2015-05-12
+-----------------
+- Fixed buffer compare for electionId for < node 12.0.2
+
+1.1.27 2015-05-12
+-----------------
+- NODE-455 Update SDAM specification support to cover electionId and Mongos load balancing.
+
+1.1.26 2015-05-06
+-----------------
+- NODE-456 Allow mongodb-core to pipeline commands (ex findAndModify+GLE) along the same connection and handle the returned results.
+- Fixes to make mongodb-core work for node 0.8.x when using scram and setImmediate.
+
+1.1.25 2015-04-24
+-----------------
+- Handle lack of callback in crud operations when returning error on application closed.
+
+1.1.24 2015-04-22
+-----------------
+- Error out when topology has been destroyed either by connection retries being exhausted or destroy called on topology.
+
+1.1.23 2015-04-15
+-----------------
+- Standardizing mongoErrors and its API (Issue #14)
+- Creating a new connection is slow because of 100ms setTimeout() (Issue #17, https://github.com/vkarpov15)
+- remove mkdirp and rimraf dependencies (Issue #12)
+- Updated default value of param options.rejectUnauthorized to match documentation (Issue #16)
+- ISSUE: NODE-417 Resolution. Improving behavior of thrown errors (Issue #14, https://github.com/owenallenaz)
+- Fix cursor hanging when next() called on exhausted cursor (Issue #18, https://github.com/vkarpov15)
+
+1.1.22 2015-04-10
+-----------------
+- Minor refactorings in cursor code to make extending the cursor simpler.
+- NODE-417 Resolution. Improving behavior of thrown errors using Error.captureStackTrace.
+
+1.1.21 2015-03-26
+-----------------
+- Updated bson module to 0.3.0 that extracted the c++ parser into bson-ext and made it an optional dependency.
+
+1.1.20 2015-03-24
+-----------------
+- NODE-395 Socket Not Closing, db.close called before full set finished initalizing leading to server connections in progress not being closed properly.
+
+1.1.19 2015-03-21
+-----------------
+- Made kerberos module ~0.0 to allow for quicker releases due to io.js of kerberos module.
+
+1.1.18 2015-03-17
+-----------------
+- Added support for minHeartbeatFrequencyMS on server reconnect according to the SDAM specification.
+
+1.1.17 2015-03-16
+-----------------
+- NODE-377, fixed issue where tags would correctly be checked on secondary and nearest to filter out eligible server candidates.
+
+1.1.16 2015-03-06
+-----------------
+- rejectUnauthorized parameter is set to true for ssl certificates by default instead of false.
+
+1.1.15 2015-03-04
+-----------------
+- Removed check for type in replset pickserver function.
+
+1.1.14 2015-02-26
+-----------------
+- NODE-374 correctly adding passive secondaries to the list of eligable servers for reads
+
+1.1.13 2015-02-24
+-----------------
+- NODE-365 mongoDB native node.js driver infinite reconnect attempts (fixed issue around handling of retry attempts)
+
+1.1.12 2015-02-16
+-----------------
+- Fixed cursor transforms for buffered document reads from cursor.
+
+1.1.11 2015-02-02
+-----------------
+- Remove the required setName for replicaset connections, if not set it will pick the first setName returned.
+
+1.1.10 2015-31-01
+-----------------
+- Added tranforms.doc option to cursor to allow for pr. document transformations.
+
+1.1.9 2015-21-01
+----------------
+- Updated BSON dependency to 0.2.18 to fix issues with io.js and node.
+- Updated Kerberos dependency to 0.0.8 to fix issues with io.js and node.
+- Don't treat findOne() as a command cursor.
+- Refactored out state changes into methods to simplify read the next method.
+
+1.1.8 2015-09-12
+----------------
+- Stripped out Object.defineProperty for performance reasons
+- Applied more performance optimizations.
+- properties cursorBatchSize, cursorSkip, cursorLimit are not methods setCursorBatchSize/cursorBatchSize, setCursorSkip/cursorSkip, setCursorLimit/cursorLimit
+
+1.1.7 2014-18-12
+----------------
+- Use ns variable for getMore commands for command cursors to work properly with cursor version of listCollections and listIndexes.
+
+1.1.6 2014-18-12
+----------------
+- Server manager fixed to support 2.2.X servers for travis test matrix.
+
+1.1.5 2014-17-12
+----------------
+- Fall back to errmsg when creating MongoError for command errors
+
+1.1.4 2014-17-12
+----------------
+- Added transform method support for cursor (initially just for initial query results) to support listCollections/listIndexes in 2.8.
+- Fixed variable leak in scram.
+- Fixed server manager to deal better with killing processes.
+- Bumped bson to 0.2.16.
+
+1.1.3 2014-01-12
+----------------
+- Fixed error handling issue with nonce generation in mongocr.
+- Fixed issues with restarting servers when using ssl.
+- Using strict for all classes.
+- Cleaned up any escaping global variables.
+
+1.1.2 2014-20-11
+----------------
+- Correctly encoding UTF8 collection names on wire protocol messages.
+- Added emitClose parameter to topology destroy methods to allow users to specify that they wish the topology to emit the close event to any listeners.
+
+1.1.1 2014-14-11
+----------------
+- Refactored code to use prototype instead of privileged methods.
+- Fixed issue with auth where a runtime condition could leave replicaset members without proper authentication.
+- Several deopt optimizations for v8 to improve performance and reduce GC pauses.
+
+1.0.5 2014-29-10
+----------------
+- Fixed issue with wrong namespace being created for command cursors.
+
+1.0.4 2014-24-10
+----------------
+- switched from using shift for the cursor due to bad slowdown on big batchSizes as shift causes entire array to be copied on each call.
+
+1.0.3 2014-21-10
+----------------
+- fixed error issuing problem on cursor.next when iterating over a huge dataset with a very small batchSize.
+
+1.0.2 2014-07-10
+----------------
+- fullsetup is now defined as a primary and secondary being available allowing for all read preferences to be satisfied.
+- fixed issue with replset_state logging.
+
+1.0.1 2014-07-10
+----------------
+- Dependency issue solved
+
+1.0.0 2014-07-10
+----------------
+- Initial release of mongodb-core
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/LICENSE
new file mode 100644
index 0000000..ad410e1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/LICENSE
@@ -0,0 +1,201 @@
+Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright {yyyy} {name of copyright owner}
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License. \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/Makefile b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/Makefile
new file mode 100644
index 0000000..36e1202
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/Makefile
@@ -0,0 +1,11 @@
+NODE = node
+NPM = npm
+JSDOC = jsdoc
+name = all
+
+generate_docs:
+ # cp -R ./HISTORY.md ./docs/content/meta/release-notes.md
+ hugo -s docs/reference -d ../../public
+ $(JSDOC) -c conf.json -t docs/jsdoc-template/ -d ./public/api
+ cp -R ./public/api/scripts ./public/.
+ cp -R ./public/api/styles ./public/.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/README.md
new file mode 100644
index 0000000..433dd88
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/README.md
@@ -0,0 +1,228 @@
+[![Build Status](https://secure.travis-ci.org/christkv/mongodb-core.png)](http://travis-ci.org/christkv/mongodb-core)
+[![Coverage Status](https://coveralls.io/repos/github/christkv/mongodb-core/badge.svg?branch=1.3)](https://coveralls.io/github/christkv/mongodb-core?branch=1.3)
+
+# Description
+
+The MongoDB Core driver is the low level part of the 2.0 or higher MongoDB driver and is meant for library developers not end users. It does not contain any abstractions or helpers outside of the basic management of MongoDB topology connections, CRUD operations and authentication.
+
+## MongoDB Node.JS Core Driver
+
+| what | where |
+|---------------|------------------------------------------------|
+| documentation | http://mongodb.github.io/node-mongodb-native/ |
+| apidoc | http://mongodb.github.io/node-mongodb-native/ |
+| source | https://github.com/christkv/mongodb-core |
+| mongodb | http://www.mongodb.org/ |
+
+### Blogs of Engineers involved in the driver
+- Christian Kvalheim [@christkv](https://twitter.com/christkv) <http://christiankvalheim.com>
+
+### Bugs / Feature Requests
+
+Think you’ve found a bug? Want to see a new feature in node-mongodb-native? Please open a
+case in our issue management tool, JIRA:
+
+- Create an account and login <https://jira.mongodb.org>.
+- Navigate to the NODE project <https://jira.mongodb.org/browse/NODE>.
+- Click **Create Issue** - Please provide as much information as possible about the issue type and how to reproduce it.
+
+Bug reports in JIRA for all driver projects (i.e. NODE, PYTHON, CSHARP, JAVA) and the
+Core Server (i.e. SERVER) project are **public**.
+
+### Questions and Bug Reports
+
+ * mailing list: https://groups.google.com/forum/#!forum/node-mongodb-native
+ * jira: http://jira.mongodb.org/
+
+### Change Log
+
+http://jira.mongodb.org/browse/NODE
+
+# QuickStart
+
+The quick start guide will show you how to set up a simple application using Core driver and MongoDB. It scope is only how to set up the driver and perform the simple crud operations. For more inn depth coverage we encourage reading the tutorials.
+
+## Create the package.json file
+
+Let's create a directory where our application will live. In our case we will put this under our projects directory.
+
+```
+mkdir myproject
+cd myproject
+```
+
+Create a **package.json** using your favorite text editor and fill it in.
+
+```json
+{
+ "name": "myproject",
+ "version": "1.0.0",
+ "description": "My first project",
+ "main": "index.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/christkv/myfirstproject.git"
+ },
+ "dependencies": {
+ "mongodb-core": "~1.0"
+ },
+ "author": "Christian Kvalheim",
+ "license": "Apache 2.0",
+ "bugs": {
+ "url": "https://github.com/christkv/myfirstproject/issues"
+ },
+ "homepage": "https://github.com/christkv/myfirstproject"
+}
+```
+
+Save the file and return to the shell or command prompt and use **NPM** to install all the dependencies.
+
+```
+npm install
+```
+
+You should see **NPM** download a lot of files. Once it's done you'll find all the downloaded packages under the **node_modules** directory.
+
+Booting up a MongoDB Server
+---------------------------
+Let's boot up a MongoDB server instance. Download the right MongoDB version from [MongoDB](http://www.mongodb.org), open a new shell or command line and ensure the **mongod** command is in the shell or command line path. Now let's create a database directory (in our case under **/data**).
+
+```
+mongod --dbpath=/data --port 27017
+```
+
+You should see the **mongod** process start up and print some status information.
+
+## Connecting to MongoDB
+
+Let's create a new **app.js** file that we will use to show the basic CRUD operations using the MongoDB driver.
+
+First let's add code to connect to the server. Notice that there is no concept of a database here and we use the topology directly to perform the connection.
+
+```js
+var Server = require('mongodb-core').Server
+ , assert = require('assert');
+
+// Set up server connection
+var server = new Server({
+ host: 'localhost'
+ , port: 27017
+ , reconnect: true
+ , reconnectInterval: 50
+});
+
+// Add event listeners
+server.on('connect', function(_server) {
+ console.log('connected');
+ test.done();
+});
+
+server.on('close', function() {
+ console.log('closed');
+});
+
+server.on('reconnect', function() {
+ console.log('reconnect');
+});
+
+// Start connection
+server.connect();
+```
+
+To connect to a replicaset we would use the `ReplSet` class and for a set of Mongos proxies we use the `Mongos` class. Each topology class offer the same CRUD operations and you operate on the topology directly. Let's look at an example exercising all the different available CRUD operations.
+
+```js
+var Server = require('mongodb-core').Server
+ , assert = require('assert');
+
+// Set up server connection
+var server = new Server({
+ host: 'localhost'
+ , port: 27017
+ , reconnect: true
+ , reconnectInterval: 50
+});
+
+// Add event listeners
+server.on('connect', function(_server) {
+ console.log('connected');
+
+ // Execute the ismaster command
+ _server.command('system.$cmd', {ismaster: true}, function(err, result) {
+
+ // Perform a document insert
+ _server.insert('myproject.inserts1', [{a:1}, {a:2}], {
+ writeConcern: {w:1}, ordered:true
+ }, function(err, results) {
+ assert.equal(null, err);
+ assert.equal(2, results.result.n);
+
+ // Perform a document update
+ _server.update('myproject.inserts1', [{
+ q: {a: 1}, u: {'$set': {b:1}}
+ }], {
+ writeConcern: {w:1}, ordered:true
+ }, function(err, results) {
+ assert.equal(null, err);
+ assert.equal(1, results.result.n);
+
+ // Remove a document
+ _server.remove('myproject.inserts1', [{
+ q: {a: 1}, limit: 1
+ }], {
+ writeConcern: {w:1}, ordered:true
+ }, function(err, results) {
+ assert.equal(null, err);
+ assert.equal(1, results.result.n);
+
+ // Get a document
+ var cursor = _server.cursor('integration_tests.inserts_example4', {
+ find: 'integration_tests.example4'
+ , query: {a:1}
+ });
+
+ // Get the first document
+ cursor.next(function(err, doc) {
+ assert.equal(null, err);
+ assert.equal(2, doc.a);
+
+ // Execute the ismaster command
+ _server.command("system.$cmd"
+ , {ismaster: true}, function(err, result) {
+ assert.equal(null, err)
+ _server.destroy();
+ });
+ });
+ });
+ });
+
+ test.done();
+ });
+});
+
+server.on('close', function() {
+ console.log('closed');
+});
+
+server.on('reconnect', function() {
+ console.log('reconnect');
+});
+
+// Start connection
+server.connect();
+```
+
+The core driver does not contain any helpers or abstractions only the core crud operations. These consist of the following commands.
+
+* `insert`, Insert takes an array of 1 or more documents to be inserted against the topology and allows you to specify a write concern and if you wish to execute the inserts in order or out of order.
+* `update`, Update takes an array of 1 or more update commands to be executed against the server topology and also allows you to specify a write concern and if you wish to execute the updates in order or out of order.
+* `remove`, Remove takes an array of 1 or more remove commands to be executed against the server topology and also allows you to specify a write concern and if you wish to execute the removes in order or out of order.
+* `cursor`, Returns you a cursor for either the 'virtual' `find` command, a command that returns a cursor id or a plain cursor id. Read the cursor tutorial for more inn depth coverage.
+* `command`, Executes a command against MongoDB and returns the result.
+* `auth`, Authenticates the current topology using a supported authentication scheme.
+
+The Core Driver is a building block for library builders and is not meant for usage by end users as it lacks a lot of features the end user might need such as automatic buffering of operations when a primary is changing in a replicaset or the db and collections abstraction.
+
+## Next steps
+
+The next step is to get more in depth information about how the different aspects of the core driver works and how to leverage them to extend the functionality of the cursors. Please view the tutorials for more detailed information.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/TESTING.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/TESTING.md
new file mode 100644
index 0000000..fe03ea0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/TESTING.md
@@ -0,0 +1,18 @@
+Testing setup
+=============
+
+Single Server
+-------------
+mongod --dbpath=./db
+
+Replicaset
+----------
+mongo --nodb
+var x = new ReplSetTest({"useHostName":"false", "nodes" : {node0 : {}, node1 : {}, node2 : {}}})
+x.startSet();
+var config = x.getReplSetConfig()
+x.initiate(config);
+
+Mongos
+------
+var s = new ShardingTest( "auth1", 1 , 0 , 2 , {rs: true, noChunkSize : true}); \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/THIRD-PARTY-NOTICES b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/THIRD-PARTY-NOTICES
new file mode 100644
index 0000000..c13e5d9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/THIRD-PARTY-NOTICES
@@ -0,0 +1,41 @@
+Mongodb-core uses third-party libraries or other resources that may
+be distributed under licenses different than the Mongodb-core software.
+
+In the event that we accidentally failed to list a required notice,
+please bring it to our attention through any of the ways detailed here:
+
+ mongodb-dev@googlegroups.com
+
+The attached notices are provided for information only.
+
+For any licenses that require disclosure of source, sources are available at
+https://github.com/mongodb/node-mongodb-native.
+
+1) License Notice for nan.h
+---------------------------
+
+The MIT License (MIT)
+=====================
+
+Copyright (c) 2016 NAN contributors
+-----------------------------------
+
+NAN contributors listed at <https://github.com/nodejs/nan#contributors>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to
+do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/blocking_test.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/blocking_test.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/blocking_test.js
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/conf.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/conf.json
new file mode 100644
index 0000000..12ce4c7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/conf.json
@@ -0,0 +1,59 @@
+{
+ "plugins": ["plugins/markdown", "docs/lib/jsdoc/examples_plugin.js"],
+ "source": {
+ "include": [
+ "test/tests/functional/operation_example_tests.js",
+ "lib/connection/command_result.js",
+ "lib/topologies/mongos.js",
+ "lib/topologies/read_preference.js",
+ "lib/topologies/replset.js",
+ "lib/topologies/server.js",
+ "lib/topologies/replset_state.js",
+ "lib/connection/logger.js",
+ "lib/connection/connection.js",
+ "lib/cursor.js",
+ "lib/error.js",
+ "node_modules/bson/lib/bson/binary.js",
+ "node_modules/bson/lib/bson/code.js",
+ "node_modules/bson/lib/bson/db_ref.js",
+ "node_modules/bson/lib/bson/double.js",
+ "node_modules/bson/lib/bson/long.js",
+ "node_modules/bson/lib/bson/objectid.js",
+ "node_modules/bson/lib/bson/symbol.js",
+ "node_modules/bson/lib/bson/timestamp.js",
+ "node_modules/bson/lib/bson/max_key.js",
+ "node_modules/bson/lib/bson/min_key.js"
+ ]
+ },
+ "templates": {
+ "cleverLinks": true,
+ "monospaceLinks": true,
+ "default": {
+ "outputSourceFiles" : true
+ },
+ "applicationName": "Node.js MongoDB Driver API",
+ "disqus": true,
+ "googleAnalytics": "UA-29229787-1",
+ "openGraph": {
+ "title": "",
+ "type": "website",
+ "image": "",
+ "site_name": "",
+ "url": ""
+ },
+ "meta": {
+ "title": "",
+ "description": "",
+ "keyword": ""
+ },
+ "linenums": true
+ },
+ "markdown": {
+ "parser": "gfm",
+ "hardwrap": true,
+ "tags": ["examples"]
+ },
+ "examples": {
+ "indent": 4
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/connect_test.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/connect_test.js
new file mode 100644
index 0000000..47ee71e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/connect_test.js
@@ -0,0 +1,72 @@
+var Server = require('./lib/topologies/server');
+
+// Attempt to connect
+var server = new Server({
+ host: 'localhost', port: 27017, socketTimeout: 500
+});
+
+// function executeCursors(_server, cb) {
+// var count = 100;
+//
+// for(var i = 0; i < 100; i++) {
+// // Execute the write
+// var cursor = _server.cursor('test.test', {
+// find: 'test.test'
+// , query: {a:1}
+// }, {readPreference: new ReadPreference('secondary')});
+//
+// // Get the first document
+// cursor.next(function(err, doc) {
+// count = count - 1;
+// if(err) console.dir(err)
+// if(count == 0) return cb();
+// });
+// }
+// }
+
+server.on('connect', function(_server) {
+ // console.log("===== connect")
+ setInterval(function() {
+ _server.insert('test.test', [{a:1}], function(err, r) {
+ console.log("insert")
+ });
+ }, 1000)
+ // console.log("---------------------------------- 0")
+ // // Attempt authentication
+ // _server.auth('scram-sha-1', 'admin', 'root', 'root', function(err, r) {
+ // console.log("---------------------------------- 1")
+ // // console.dir(err)
+ // // console.dir(r)
+ //
+ // _server.insert('test.test', [{a:1}], function(err, r) {
+ // console.log("---------------------------------- 2")
+ // console.dir(err)
+ // if(r)console.dir(r.result)
+ // var name = null;
+ //
+ // _server.on('joined', function(_t, _server) {
+ // if(name == _server.name) {
+ // console.log("=========== joined :: " + _t + " :: " + _server.name)
+ // executeCursors(_server, function() {
+ // });
+ // }
+ // })
+ //
+ // // var s = _server.s.replicaSetState.secondaries[0];
+ // // s.destroy({emitClose:true});
+ // executeCursors(_server, function() {
+ // console.log("============== 0")
+ // // Attempt to force a server reconnect
+ // var s = _server.s.replicaSetState.secondaries[0];
+ // name = s.name;
+ // s.destroy({emitClose:true});
+ // // console.log("============== 1")
+ //
+ // // _server.destroy();
+ // // test.done();
+ // });
+ // });
+ // });
+});
+
+server.connect();
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/index.js
new file mode 100644
index 0000000..6747a4a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/index.js
@@ -0,0 +1,27 @@
+var BSON = require('bson');
+
+try {
+ try { BSON = require('bson-ext'); } catch(err) {
+ BSON = require_optional('bson-ext');
+ }
+} catch(err) {}
+
+module.exports = {
+ MongoError: require('./lib/error')
+ , Connection: require('./lib/connection/connection')
+ , Server: require('./lib/topologies/server')
+ , ReplSet: require('./lib/topologies/replset')
+ , Mongos: require('./lib/topologies/mongos')
+ , Logger: require('./lib/connection/logger')
+ , Cursor: require('./lib/cursor')
+ , ReadPreference: require('./lib/topologies/read_preference')
+ , BSON: BSON
+ // Raw operations
+ , Query: require('./lib/connection/commands').Query
+ // Auth mechanisms
+ , MongoCR: require('./lib/auth/mongocr')
+ , X509: require('./lib/auth/x509')
+ , Plain: require('./lib/auth/plain')
+ , GSSAPI: require('./lib/auth/gssapi')
+ , ScramSHA1: require('./lib/auth/scram')
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/gssapi.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/gssapi.js
new file mode 100644
index 0000000..7fe3026
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/gssapi.js
@@ -0,0 +1,262 @@
+"use strict";
+
+var f = require('util').format
+ , require_optional = require('require_optional')
+ , Query = require('../connection/commands').Query
+ , MongoError = require('../error');
+
+var AuthSession = function(db, username, password, options) {
+ this.db = db;
+ this.username = username;
+ this.password = password;
+ this.options = options;
+}
+
+AuthSession.prototype.equal = function(session) {
+ return session.db == this.db
+ && session.username == this.username
+ && session.password == this.password;
+}
+
+// Kerberos class
+var Kerberos = null;
+var MongoAuthProcess = null;
+
+// Try to grab the Kerberos class
+try {
+ Kerberos = require_optional('kerberos').Kerberos;
+ // Authentication process for Mongo
+ MongoAuthProcess = require_optional('kerberos').processes.MongoAuthProcess;
+} catch(err) {
+}
+
+/**
+ * Creates a new GSSAPI authentication mechanism
+ * @class
+ * @return {GSSAPI} A cursor instance
+ */
+var GSSAPI = function(bson) {
+ this.bson = bson;
+ this.authStore = [];
+}
+
+/**
+ * Authenticate
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {string} db Name of the database
+ * @param {string} username Username
+ * @param {string} password Password
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+GSSAPI.prototype.auth = function(server, connections, db, username, password, options, callback) {
+ var self = this;
+ // We don't have the Kerberos library
+ if(Kerberos == null) return callback(new Error("Kerberos library is not installed"));
+ var gssapiServiceName = options['gssapiServiceName'] || 'mongodb';
+ // Total connections
+ var count = connections.length;
+ if(count == 0) return callback(null, null);
+
+ // Valid connections
+ var numberOfValidConnections = 0;
+ var errorObject = null;
+
+ // For each connection we need to authenticate
+ while(connections.length > 0) {
+ // Execute MongoCR
+ var execute = function(connection) {
+ // Start Auth process for a connection
+ GSSAPIInitialize(self, db, username, password, db, gssapiServiceName, server, connection, options, function(err, r) {
+ // Adjust count
+ count = count - 1;
+
+ // If we have an error
+ if(err) {
+ errorObject = err;
+ } else if(r.result['$err']) {
+ errorObject = r.result;
+ } else if(r.result['errmsg']) {
+ errorObject = r.result;
+ } else {
+ numberOfValidConnections = numberOfValidConnections + 1;
+ }
+
+ // We have authenticated all connections
+ if(count == 0 && numberOfValidConnections > 0) {
+ // Store the auth details
+ addAuthSession(self.authStore, new AuthSession(db, username, password, options));
+ // Return correct authentication
+ callback(null, true);
+ } else if(count == 0) {
+ if(errorObject == null) errorObject = new MongoError(f("failed to authenticate using mongocr"));
+ callback(errorObject, false);
+ }
+ });
+ }
+
+ var _execute = function(_connection) {
+ process.nextTick(function() {
+ execute(_connection);
+ });
+ }
+
+ _execute(connections.shift());
+ }
+}
+
+//
+// Initialize step
+var GSSAPIInitialize = function(self, db, username, password, authdb, gssapiServiceName, server, connection, options, callback) {
+ // Create authenticator
+ var mongo_auth_process = new MongoAuthProcess(connection.host, connection.port, gssapiServiceName, options);
+
+ // Perform initialization
+ mongo_auth_process.init(username, password, function(err) {
+ if(err) return callback(err, false);
+
+ // Perform the first step
+ mongo_auth_process.transition('', function(err, payload) {
+ if(err) return callback(err, false);
+
+ // Call the next db step
+ MongoDBGSSAPIFirstStep(self, mongo_auth_process, payload, db, username, password, authdb, server, connection, callback);
+ });
+ });
+}
+
+//
+// Perform first step against mongodb
+var MongoDBGSSAPIFirstStep = function(self, mongo_auth_process, payload, db, username, password, authdb, server, connection, callback) {
+ // Build the sasl start command
+ var command = {
+ saslStart: 1
+ , mechanism: 'GSSAPI'
+ , payload: payload
+ , autoAuthorize: 1
+ };
+
+ // Write the commmand on the connection
+ server(connection, new Query(self.bson, "$external.$cmd", command, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ if(err) return callback(err, false);
+ var doc = r.result;
+ // Execute mongodb transition
+ mongo_auth_process.transition(r.result.payload, function(err, payload) {
+ if(err) return callback(err, false);
+
+ // MongoDB API Second Step
+ MongoDBGSSAPISecondStep(self, mongo_auth_process, payload, doc, db, username, password, authdb, server, connection, callback);
+ });
+ });
+}
+
+//
+// Perform first step against mongodb
+var MongoDBGSSAPISecondStep = function(self, mongo_auth_process, payload, doc, db, username, password, authdb, server, connection, callback) {
+ // Build Authentication command to send to MongoDB
+ var command = {
+ saslContinue: 1
+ , conversationId: doc.conversationId
+ , payload: payload
+ };
+
+ // Execute the command
+ // Write the commmand on the connection
+ server(connection, new Query(self.bson, "$external.$cmd", command, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ if(err) return callback(err, false);
+ var doc = r.result;
+ // Call next transition for kerberos
+ mongo_auth_process.transition(doc.payload, function(err, payload) {
+ if(err) return callback(err, false);
+
+ // Call the last and third step
+ MongoDBGSSAPIThirdStep(self, mongo_auth_process, payload, doc, db, username, password, authdb, server, connection, callback);
+ });
+ });
+}
+
+var MongoDBGSSAPIThirdStep = function(self, mongo_auth_process, payload, doc, db, username, password, authdb, server, connection, callback) {
+ // Build final command
+ var command = {
+ saslContinue: 1
+ , conversationId: doc.conversationId
+ , payload: payload
+ };
+
+ // Execute the command
+ server(connection, new Query(self.bson, "$external.$cmd", command, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ if(err) return callback(err, false);
+ mongo_auth_process.transition(null, function(err) {
+ if(err) return callback(err, null);
+ callback(null, r);
+ });
+ });
+}
+
+// Add to store only if it does not exist
+var addAuthSession = function(authStore, session) {
+ var found = false;
+
+ for(var i = 0; i < authStore.length; i++) {
+ if(authStore[i].equal(session)) {
+ found = true;
+ break;
+ }
+ }
+
+ if(!found) authStore.push(session);
+}
+
+/**
+ * Remove authStore credentials
+ * @method
+ * @param {string} db Name of database we are removing authStore details about
+ * @return {object}
+ */
+GSSAPI.prototype.logout = function(dbName) {
+ this.authStore = this.authStore.filter(function(x) {
+ return x.db != dbName;
+ });
+}
+
+/**
+ * Re authenticate pool
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+GSSAPI.prototype.reauthenticate = function(server, connections, callback) {
+ var authStore = this.authStore.slice(0);
+ var count = authStore.length;
+ if(count == 0) return callback(null, null);
+ // Iterate over all the auth details stored
+ for(var i = 0; i < authStore.length; i++) {
+ this.auth(server, connections, authStore[i].db, authStore[i].username, authStore[i].password, authStore[i].options, function(err) {
+ count = count - 1;
+ // Done re-authenticating
+ if(count == 0) {
+ callback(err, null);
+ }
+ });
+ }
+}
+
+/**
+ * This is a result from a authentication strategy
+ *
+ * @callback authResultCallback
+ * @param {error} error An error object. Set to null if no error present
+ * @param {boolean} result The result of the authentication process
+ */
+
+module.exports = GSSAPI;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/mongocr.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/mongocr.js
new file mode 100644
index 0000000..14e3c4d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/mongocr.js
@@ -0,0 +1,181 @@
+"use strict";
+
+var f = require('util').format
+ , crypto = require('crypto')
+ , Query = require('../connection/commands').Query
+ , MongoError = require('../error');
+
+var AuthSession = function(db, username, password) {
+ this.db = db;
+ this.username = username;
+ this.password = password;
+}
+
+AuthSession.prototype.equal = function(session) {
+ return session.db == this.db
+ && session.username == this.username
+ && session.password == this.password;
+}
+
+/**
+ * Creates a new MongoCR authentication mechanism
+ * @class
+ * @return {MongoCR} A cursor instance
+ */
+var MongoCR = function(bson) {
+ this.bson = bson;
+ this.authStore = [];
+}
+
+// Add to store only if it does not exist
+var addAuthSession = function(authStore, session) {
+ var found = false;
+
+ for(var i = 0; i < authStore.length; i++) {
+ if(authStore[i].equal(session)) {
+ found = true;
+ break;
+ }
+ }
+
+ if(!found) authStore.push(session);
+}
+
+/**
+ * Authenticate
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {string} db Name of the database
+ * @param {string} username Username
+ * @param {string} password Password
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+MongoCR.prototype.auth = function(server, connections, db, username, password, callback) {
+ var self = this;
+ // Total connections
+ var count = connections.length;
+ if(count == 0) return callback(null, null);
+
+ // Valid connections
+ var numberOfValidConnections = 0;
+ var errorObject = null;
+
+ // For each connection we need to authenticate
+ while(connections.length > 0) {
+ // Execute MongoCR
+ var executeMongoCR = function(connection) {
+ // Write the commmand on the connection
+ server(connection, new Query(self.bson, f("%s.$cmd", db), {
+ getnonce:1
+ }, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ var nonce = null;
+ var key = null;
+
+ // Adjust the number of connections left
+ // Get nonce
+ if(err == null) {
+ nonce = r.result.nonce;
+ // Use node md5 generator
+ var md5 = crypto.createHash('md5');
+ // Generate keys used for authentication
+ md5.update(username + ":mongo:" + password, 'utf8');
+ var hash_password = md5.digest('hex');
+ // Final key
+ md5 = crypto.createHash('md5');
+ md5.update(nonce + username + hash_password, 'utf8');
+ key = md5.digest('hex');
+ }
+
+ // Execute command
+ // Write the commmand on the connection
+ server(connection, new Query(self.bson, f("%s.$cmd", db), {
+ authenticate: 1, user: username, nonce: nonce, key:key
+ }, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ count = count - 1;
+
+ // If we have an error
+ if(err) {
+ errorObject = err;
+ } else if(r.result['$err']) {
+ errorObject = r.result;
+ } else if(r.result['errmsg']) {
+ errorObject = r.result;
+ } else {
+ numberOfValidConnections = numberOfValidConnections + 1;
+ }
+
+ // We have authenticated all connections
+ if(count == 0 && numberOfValidConnections > 0) {
+ // Store the auth details
+ addAuthSession(self.authStore, new AuthSession(db, username, password));
+ // Return correct authentication
+ callback(null, true);
+ } else if(count == 0) {
+ if(errorObject == null) errorObject = new MongoError(f("failed to authenticate using mongocr"));
+ callback(errorObject, false);
+ }
+ });
+ });
+ }
+
+ var _execute = function(_connection) {
+ process.nextTick(function() {
+ executeMongoCR(_connection);
+ });
+ }
+
+ _execute(connections.shift());
+ }
+}
+
+/**
+ * Remove authStore credentials
+ * @method
+ * @param {string} db Name of database we are removing authStore details about
+ * @return {object}
+ */
+MongoCR.prototype.logout = function(dbName) {
+ this.authStore = this.authStore.filter(function(x) {
+ return x.db != dbName;
+ });
+}
+
+/**
+ * Re authenticate pool
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+MongoCR.prototype.reauthenticate = function(server, connections, callback) {
+ var authStore = this.authStore.slice(0);
+ var count = authStore.length;
+ if(count == 0) return callback(null, null);
+ // Iterate over all the auth details stored
+ for(var i = 0; i < authStore.length; i++) {
+ this.auth(server, connections, authStore[i].db, authStore[i].username, authStore[i].password, function(err) {
+ count = count - 1;
+ // Done re-authenticating
+ if(count == 0) {
+ callback(err, null);
+ }
+ });
+ }
+}
+
+/**
+ * This is a result from a authentication strategy
+ *
+ * @callback authResultCallback
+ * @param {error} error An error object. Set to null if no error present
+ * @param {boolean} result The result of the authentication process
+ */
+
+module.exports = MongoCR;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/plain.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/plain.js
new file mode 100644
index 0000000..e3fb1a8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/plain.js
@@ -0,0 +1,170 @@
+"use strict";
+
+var BSON = require('bson');
+
+var f = require('util').format
+ , Binary = BSON.Binary
+ , retrieveBSON = require('../connection/utils').retrieveBSON
+ , Query = require('../connection/commands').Query
+ , MongoError = require('../error');
+
+var BSON = retrieveBSON();
+
+var AuthSession = function(db, username, password) {
+ this.db = db;
+ this.username = username;
+ this.password = password;
+}
+
+AuthSession.prototype.equal = function(session) {
+ return session.db == this.db
+ && session.username == this.username
+ && session.password == this.password;
+}
+
+/**
+ * Creates a new Plain authentication mechanism
+ * @class
+ * @return {Plain} A cursor instance
+ */
+var Plain = function(bson) {
+ this.bson = bson;
+ this.authStore = [];
+}
+
+/**
+ * Authenticate
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {string} db Name of the database
+ * @param {string} username Username
+ * @param {string} password Password
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+Plain.prototype.auth = function(server, connections, db, username, password, callback) {
+ var self = this;
+ // Total connections
+ var count = connections.length;
+ if(count == 0) return callback(null, null);
+
+ // Valid connections
+ var numberOfValidConnections = 0;
+ var errorObject = null;
+
+ // For each connection we need to authenticate
+ while(connections.length > 0) {
+ // Execute MongoCR
+ var execute = function(connection) {
+ // Create payload
+ var payload = new Binary(f("\x00%s\x00%s", username, password));
+
+ // Let's start the sasl process
+ var command = {
+ saslStart: 1
+ , mechanism: 'PLAIN'
+ , payload: payload
+ , autoAuthorize: 1
+ };
+
+ // Let's start the process
+ server(connection, new Query(self.bson, "$external.$cmd", command, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ // Adjust count
+ count = count - 1;
+
+ // If we have an error
+ if(err) {
+ errorObject = err;
+ } else if(r.result['$err']) {
+ errorObject = r.result;
+ } else if(r.result['errmsg']) {
+ errorObject = r.result;
+ } else {
+ numberOfValidConnections = numberOfValidConnections + 1;
+ }
+
+ // We have authenticated all connections
+ if(count == 0 && numberOfValidConnections > 0) {
+ // Store the auth details
+ addAuthSession(self.authStore, new AuthSession(db, username, password));
+ // Return correct authentication
+ callback(null, true);
+ } else if(count == 0) {
+ if(errorObject == null) errorObject = new MongoError(f("failed to authenticate using mongocr"));
+ callback(errorObject, false);
+ }
+ });
+ }
+
+ var _execute = function(_connection) {
+ process.nextTick(function() {
+ execute(_connection);
+ });
+ }
+
+ _execute(connections.shift());
+ }
+}
+
+// Add to store only if it does not exist
+var addAuthSession = function(authStore, session) {
+ var found = false;
+
+ for(var i = 0; i < authStore.length; i++) {
+ if(authStore[i].equal(session)) {
+ found = true;
+ break;
+ }
+ }
+
+ if(!found) authStore.push(session);
+}
+
+/**
+ * Remove authStore credentials
+ * @method
+ * @param {string} db Name of database we are removing authStore details about
+ * @return {object}
+ */
+Plain.prototype.logout = function(dbName) {
+ this.authStore = this.authStore.filter(function(x) {
+ return x.db != dbName;
+ });
+}
+
+/**
+ * Re authenticate pool
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+Plain.prototype.reauthenticate = function(server, connections, callback) {
+ var authStore = this.authStore.slice(0);
+ var count = authStore.length;
+ if(count == 0) return callback(null, null);
+ // Iterate over all the auth details stored
+ for(var i = 0; i < authStore.length; i++) {
+ this.auth(server, connections, authStore[i].db, authStore[i].username, authStore[i].password, function(err) {
+ count = count - 1;
+ // Done re-authenticating
+ if(count == 0) {
+ callback(err, null);
+ }
+ });
+ }
+}
+
+/**
+ * This is a result from a authentication strategy
+ *
+ * @callback authResultCallback
+ * @param {error} error An error object. Set to null if no error present
+ * @param {boolean} result The result of the authentication process
+ */
+
+module.exports = Plain;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/scram.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/scram.js
new file mode 100644
index 0000000..cdc6ebb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/scram.js
@@ -0,0 +1,343 @@
+"use strict";
+
+var f = require('util').format
+ , crypto = require('crypto')
+ , retrieveBSON = require('../connection/utils').retrieveBSON
+ , Query = require('../connection/commands').Query
+ , MongoError = require('../error');
+
+var BSON = retrieveBSON(),
+ Binary = BSON.Binary;
+
+var AuthSession = function(db, username, password) {
+ this.db = db;
+ this.username = username;
+ this.password = password;
+}
+
+AuthSession.prototype.equal = function(session) {
+ return session.db == this.db
+ && session.username == this.username
+ && session.password == this.password;
+}
+
+var id = 0;
+
+/**
+ * Creates a new ScramSHA1 authentication mechanism
+ * @class
+ * @return {ScramSHA1} A cursor instance
+ */
+var ScramSHA1 = function(bson) {
+ this.bson = bson;
+ this.authStore = [];
+ this.id = id++;
+}
+
+var parsePayload = function(payload) {
+ var dict = {};
+ var parts = payload.split(',');
+
+ for(var i = 0; i < parts.length; i++) {
+ var valueParts = parts[i].split('=');
+ dict[valueParts[0]] = valueParts[1];
+ }
+
+ return dict;
+}
+
+var passwordDigest = function(username, password) {
+ if(typeof username != 'string') throw new MongoError("username must be a string");
+ if(typeof password != 'string') throw new MongoError("password must be a string");
+ if(password.length == 0) throw new MongoError("password cannot be empty");
+ // Use node md5 generator
+ var md5 = crypto.createHash('md5');
+ // Generate keys used for authentication
+ md5.update(username + ":mongo:" + password, 'utf8');
+ return md5.digest('hex');
+}
+
+// XOR two buffers
+var xor = function(a, b) {
+ if (!Buffer.isBuffer(a)) a = new Buffer(a)
+ if (!Buffer.isBuffer(b)) b = new Buffer(b)
+ var res = []
+ if (a.length > b.length) {
+ for (var i = 0; i < b.length; i++) {
+ res.push(a[i] ^ b[i])
+ }
+ } else {
+ for (i = 0; i < a.length; i++) {
+ res.push(a[i] ^ b[i])
+ }
+ }
+ return new Buffer(res);
+}
+
+// Create a final digest
+var hi = function(data, salt, iterations) {
+ // Create digest
+ var digest = function(msg) {
+ var hmac = crypto.createHmac('sha1', data);
+ hmac.update(msg);
+ return new Buffer(hmac.digest('base64'), 'base64');
+ }
+
+ // Create variables
+ salt = Buffer.concat([salt, new Buffer('\x00\x00\x00\x01')])
+ var ui = digest(salt);
+ var u1 = ui;
+
+ for(var i = 0; i < iterations - 1; i++) {
+ u1 = digest(u1);
+ ui = xor(ui, u1);
+ }
+
+ return ui;
+}
+
+/**
+ * Authenticate
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {string} db Name of the database
+ * @param {string} username Username
+ * @param {string} password Password
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+ScramSHA1.prototype.auth = function(server, connections, db, username, password, callback) {
+ var self = this;
+ // Total connections
+ var count = connections.length;
+ if(count == 0) return callback(null, null);
+
+ // Valid connections
+ var numberOfValidConnections = 0;
+ var errorObject = null;
+
+ // Execute MongoCR
+ var executeScram = function(connection) {
+ // Clean up the user
+ username = username.replace('=', "=3D").replace(',', '=2C');
+
+ // Create a random nonce
+ var nonce = crypto.randomBytes(24).toString('base64');
+ // var nonce = 'MsQUY9iw0T9fx2MUEz6LZPwGuhVvWAhc'
+ var firstBare = f("n=%s,r=%s", username, nonce);
+
+ // Build command structure
+ var cmd = {
+ saslStart: 1
+ , mechanism: 'SCRAM-SHA-1'
+ , payload: new Binary(f("n,,%s", firstBare))
+ , autoAuthorize: 1
+ }
+
+ // Handle the error
+ var handleError = function(err, r) {
+ if(err) {
+ numberOfValidConnections = numberOfValidConnections - 1;
+ errorObject = err; return false;
+ } else if(r.result['$err']) {
+ errorObject = r.result; return false;
+ } else if(r.result['errmsg']) {
+ errorObject = r.result; return false;
+ } else {
+ numberOfValidConnections = numberOfValidConnections + 1;
+ }
+
+ return true
+ }
+
+ // Finish up
+ var finish = function(_count, _numberOfValidConnections) {
+ if(_count == 0 && _numberOfValidConnections > 0) {
+ // Store the auth details
+ addAuthSession(self.authStore, new AuthSession(db, username, password));
+ // Return correct authentication
+ return callback(null, true);
+ } else if(_count == 0) {
+ if(errorObject == null) errorObject = new MongoError(f("failed to authenticate using scram"));
+ return callback(errorObject, false);
+ }
+ }
+
+ var handleEnd = function(_err, _r) {
+ // Handle any error
+ handleError(_err, _r)
+ // Adjust the number of connections
+ count = count - 1;
+ // Execute the finish
+ finish(count, numberOfValidConnections);
+ }
+
+ // Write the commmand on the connection
+ server(connection, new Query(self.bson, f("%s.$cmd", db), cmd, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ // Do we have an error, handle it
+ if(handleError(err, r) == false) {
+ count = count - 1;
+
+ if(count == 0 && numberOfValidConnections > 0) {
+ // Store the auth details
+ addAuthSession(self.authStore, new AuthSession(db, username, password));
+ // Return correct authentication
+ return callback(null, true);
+ } else if(count == 0) {
+ if(errorObject == null) errorObject = new MongoError(f("failed to authenticate using scram"));
+ return callback(errorObject, false);
+ }
+
+ return;
+ }
+
+ // Get the dictionary
+ var dict = parsePayload(r.result.payload.value())
+
+ // Unpack dictionary
+ var iterations = parseInt(dict.i, 10);
+ var salt = dict.s;
+ var rnonce = dict.r;
+
+ // Set up start of proof
+ var withoutProof = f("c=biws,r=%s", rnonce);
+ var passwordDig = passwordDigest(username, password);
+ var saltedPassword = hi(passwordDig
+ , new Buffer(salt, 'base64')
+ , iterations);
+
+ // Create the client key
+ var hmac = crypto.createHmac('sha1', saltedPassword);
+ hmac.update(new Buffer("Client Key"));
+ var clientKey = new Buffer(hmac.digest('base64'), 'base64');
+
+ // Create the stored key
+ var hash = crypto.createHash('sha1');
+ hash.update(clientKey);
+ var storedKey = new Buffer(hash.digest('base64'), 'base64');
+
+ // Create the authentication message
+ var authMsg = [firstBare, r.result.payload.value().toString('base64'), withoutProof].join(',');
+
+ // Create client signature
+ hmac = crypto.createHmac('sha1', storedKey);
+ hmac.update(new Buffer(authMsg));
+ var clientSig = new Buffer(hmac.digest('base64'), 'base64');
+
+ // Create client proof
+ var clientProof = f("p=%s", new Buffer(xor(clientKey, clientSig)).toString('base64'));
+
+ // Create client final
+ var clientFinal = [withoutProof, clientProof].join(',');
+
+ // Generate server key
+ hmac = crypto.createHmac('sha1', saltedPassword);
+ hmac.update(new Buffer('Server Key'))
+ var serverKey = new Buffer(hmac.digest('base64'), 'base64');
+
+ // Generate server signature
+ hmac = crypto.createHmac('sha1', serverKey);
+ hmac.update(new Buffer(authMsg))
+
+ //
+ // Create continue message
+ var cmd = {
+ saslContinue: 1
+ , conversationId: r.result.conversationId
+ , payload: new Binary(new Buffer(clientFinal))
+ }
+
+ //
+ // Execute sasl continue
+ // Write the commmand on the connection
+ server(connection, new Query(self.bson, f("%s.$cmd", db), cmd, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ if(r && r.result.done == false) {
+ var cmd = {
+ saslContinue: 1
+ , conversationId: r.result.conversationId
+ , payload: new Buffer(0)
+ }
+
+ // Write the commmand on the connection
+ server(connection, new Query(self.bson, f("%s.$cmd", db), cmd, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ handleEnd(err, r);
+ });
+ } else {
+ handleEnd(err, r);
+ }
+ });
+ });
+ }
+
+ var _execute = function(_connection) {
+ process.nextTick(function() {
+ executeScram(_connection);
+ });
+ }
+
+ // For each connection we need to authenticate
+ while(connections.length > 0) {
+ _execute(connections.shift());
+ }
+}
+
+// Add to store only if it does not exist
+var addAuthSession = function(authStore, session) {
+ var found = false;
+
+ for(var i = 0; i < authStore.length; i++) {
+ if(authStore[i].equal(session)) {
+ found = true;
+ break;
+ }
+ }
+
+ if(!found) authStore.push(session);
+}
+
+/**
+ * Remove authStore credentials
+ * @method
+ * @param {string} db Name of database we are removing authStore details about
+ * @return {object}
+ */
+ScramSHA1.prototype.logout = function(dbName) {
+ this.authStore = this.authStore.filter(function(x) {
+ return x.db != dbName;
+ });
+}
+
+/**
+ * Re authenticate pool
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+ScramSHA1.prototype.reauthenticate = function(server, connections, callback) {
+ var authStore = this.authStore.slice(0);
+ var count = authStore.length;
+ // No connections
+ if(count == 0) return callback(null, null);
+ // Iterate over all the auth details stored
+ for(var i = 0; i < authStore.length; i++) {
+ this.auth(server, connections, authStore[i].db, authStore[i].username, authStore[i].password, function(err) {
+ count = count - 1;
+ // Done re-authenticating
+ if(count == 0) {
+ callback(err, null);
+ }
+ });
+ }
+}
+
+
+module.exports = ScramSHA1;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/sspi.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/sspi.js
new file mode 100644
index 0000000..ef4874c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/sspi.js
@@ -0,0 +1,250 @@
+"use strict";
+
+var f = require('util').format
+ , require_optional = require('require_optional')
+ , Query = require('../connection/commands').Query
+ , MongoError = require('../error');
+
+var AuthSession = function(db, username, password, options) {
+ this.db = db;
+ this.username = username;
+ this.password = password;
+ this.options = options;
+}
+
+AuthSession.prototype.equal = function(session) {
+ return session.db == this.db
+ && session.username == this.username
+ && session.password == this.password;
+}
+
+// Kerberos class
+var Kerberos = null;
+var MongoAuthProcess = null;
+
+// Try to grab the Kerberos class
+try {
+ Kerberos = require_optional('kerberos').Kerberos
+ // Authentication process for Mongo
+ MongoAuthProcess = require_optional('kerberos').processes.MongoAuthProcess
+} catch(err) {}
+
+/**
+ * Creates a new SSPI authentication mechanism
+ * @class
+ * @return {SSPI} A cursor instance
+ */
+var SSPI = function(bson) {
+ this.bson = bson;
+ this.authStore = [];
+}
+
+/**
+ * Authenticate
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {string} db Name of the database
+ * @param {string} username Username
+ * @param {string} password Password
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+SSPI.prototype.auth = function(server, connections, db, username, password, options, callback) {
+ var self = this;
+ // We don't have the Kerberos library
+ if(Kerberos == null) return callback(new Error("Kerberos library is not installed"));
+ var gssapiServiceName = options['gssapiServiceName'] || 'mongodb';
+ // Total connections
+ var count = connections.length;
+ if(count == 0) return callback(null, null);
+
+ // Valid connections
+ var numberOfValidConnections = 0;
+ var errorObject = null;
+
+ // For each connection we need to authenticate
+ while(connections.length > 0) {
+ // Execute MongoCR
+ var execute = function(connection) {
+ // Start Auth process for a connection
+ SSIPAuthenticate(self, username, password, gssapiServiceName, server, connection, options, function(err, r) {
+ // Adjust count
+ count = count - 1;
+
+ // If we have an error
+ if(err) {
+ errorObject = err;
+ } else if(r && typeof r == 'object' && r.result['$err']) {
+ errorObject = r.result;
+ } else if(r && typeof r == 'object' && r.result['errmsg']) {
+ errorObject = r.result;
+ } else {
+ numberOfValidConnections = numberOfValidConnections + 1;
+ }
+
+ // We have authenticated all connections
+ if(count == 0 && numberOfValidConnections > 0) {
+ // Store the auth details
+ addAuthSession(self.authStore, new AuthSession(db, username, password, options));
+ // Return correct authentication
+ callback(null, true);
+ } else if(count == 0) {
+ if(errorObject == null) errorObject = new MongoError(f("failed to authenticate using mongocr"));
+ callback(errorObject, false);
+ }
+ });
+ }
+
+ var _execute = function(_connection) {
+ process.nextTick(function() {
+ execute(_connection);
+ });
+ }
+
+ _execute(connections.shift());
+ }
+}
+
+var SSIPAuthenticate = function(self, username, password, gssapiServiceName, server, connection, options, callback) {
+ // Build Authentication command to send to MongoDB
+ var command = {
+ saslStart: 1
+ , mechanism: 'GSSAPI'
+ , payload: ''
+ , autoAuthorize: 1
+ };
+
+ // Create authenticator
+ var mongo_auth_process = new MongoAuthProcess(connection.host, connection.port, gssapiServiceName, options);
+
+ // Execute first sasl step
+ server(connection, new Query(self.bson, "$external.$cmd", command, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ if(err) return callback(err, false);
+ var doc = r.result;
+
+ mongo_auth_process.init(username, password, function(err) {
+ if(err) return callback(err);
+
+ mongo_auth_process.transition(doc.payload, function(err, payload) {
+ if(err) return callback(err);
+
+ // Perform the next step against mongod
+ var command = {
+ saslContinue: 1
+ , conversationId: doc.conversationId
+ , payload: payload
+ };
+
+ // Execute the command
+ server(connection, new Query(self.bson, "$external.$cmd", command, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ if(err) return callback(err, false);
+ var doc = r.result;
+
+ mongo_auth_process.transition(doc.payload, function(err, payload) {
+ if(err) return callback(err);
+
+ // Perform the next step against mongod
+ var command = {
+ saslContinue: 1
+ , conversationId: doc.conversationId
+ , payload: payload
+ };
+
+ // Execute the command
+ server(connection, new Query(self.bson, "$external.$cmd", command, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ if(err) return callback(err, false);
+ var doc = r.result;
+
+ mongo_auth_process.transition(doc.payload, function(err, payload) {
+ // Perform the next step against mongod
+ var command = {
+ saslContinue: 1
+ , conversationId: doc.conversationId
+ , payload: payload
+ };
+
+ // Execute the command
+ server(connection, new Query(self.bson, "$external.$cmd", command, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ if(err) return callback(err, false);
+ var doc = r.result;
+
+ if(doc.done) return callback(null, true);
+ callback(new Error("Authentication failed"), false);
+ });
+ });
+ });
+ });
+ });
+ });
+ });
+ });
+}
+
+// Add to store only if it does not exist
+var addAuthSession = function(authStore, session) {
+ var found = false;
+
+ for(var i = 0; i < authStore.length; i++) {
+ if(authStore[i].equal(session)) {
+ found = true;
+ break;
+ }
+ }
+
+ if(!found) authStore.push(session);
+}
+
+/**
+ * Remove authStore credentials
+ * @method
+ * @param {string} db Name of database we are removing authStore details about
+ * @return {object}
+ */
+SSPI.prototype.logout = function(dbName) {
+ this.authStore = this.authStore.filter(function(x) {
+ return x.db != dbName;
+ });
+}
+
+/**
+ * Re authenticate pool
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+SSPI.prototype.reauthenticate = function(server, connections, callback) {
+ var authStore = this.authStore.slice(0);
+ var count = authStore.length;
+ if(count == 0) return callback(null, null);
+ // Iterate over all the auth details stored
+ for(var i = 0; i < authStore.length; i++) {
+ this.auth(server, connections, authStore[i].db, authStore[i].username, authStore[i].password, authStore[i].options, function(err) {
+ count = count - 1;
+ // Done re-authenticating
+ if(count == 0) {
+ callback(err, null);
+ }
+ });
+ }
+}
+
+/**
+ * This is a result from a authentication strategy
+ *
+ * @callback authResultCallback
+ * @param {error} error An error object. Set to null if no error present
+ * @param {boolean} result The result of the authentication process
+ */
+
+module.exports = SSPI;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/x509.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/x509.js
new file mode 100644
index 0000000..0b75d79
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/auth/x509.js
@@ -0,0 +1,164 @@
+"use strict";
+
+var f = require('util').format
+ , Query = require('../connection/commands').Query
+ , MongoError = require('../error');
+
+var AuthSession = function(db, username, password) {
+ this.db = db;
+ this.username = username;
+ this.password = password;
+}
+
+AuthSession.prototype.equal = function(session) {
+ return session.db == this.db
+ && session.username == this.username
+ && session.password == this.password;
+}
+
+/**
+ * Creates a new X509 authentication mechanism
+ * @class
+ * @return {X509} A cursor instance
+ */
+var X509 = function(bson) {
+ this.bson = bson;
+ this.authStore = [];
+}
+
+/**
+ * Authenticate
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {string} db Name of the database
+ * @param {string} username Username
+ * @param {string} password Password
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+X509.prototype.auth = function(server, connections, db, username, password, callback) {
+ var self = this;
+ // Total connections
+ var count = connections.length;
+ if(count == 0) return callback(null, null);
+
+ // Valid connections
+ var numberOfValidConnections = 0;
+ var errorObject = null;
+
+ // For each connection we need to authenticate
+ while(connections.length > 0) {
+ // Execute MongoCR
+ var execute = function(connection) {
+ // Let's start the sasl process
+ var command = {
+ authenticate: 1
+ , mechanism: 'MONGODB-X509'
+ };
+
+ // Add username if specified
+ if(username) {
+ command.user = username;
+ }
+
+ // Let's start the process
+ server(connection, new Query(self.bson, "$external.$cmd", command, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ // Adjust count
+ count = count - 1;
+
+ // If we have an error
+ if(err) {
+ errorObject = err;
+ } else if(r.result['$err']) {
+ errorObject = r.result;
+ } else if(r.result['errmsg']) {
+ errorObject = r.result;
+ } else {
+ numberOfValidConnections = numberOfValidConnections + 1;
+ }
+
+ // We have authenticated all connections
+ if(count == 0 && numberOfValidConnections > 0) {
+ // Store the auth details
+ addAuthSession(self.authStore, new AuthSession(db, username, password));
+ // Return correct authentication
+ callback(null, true);
+ } else if(count == 0) {
+ if(errorObject == null) errorObject = new MongoError(f("failed to authenticate using mongocr"));
+ callback(errorObject, false);
+ }
+ });
+ }
+
+ var _execute = function(_connection) {
+ process.nextTick(function() {
+ execute(_connection);
+ });
+ }
+
+ _execute(connections.shift());
+ }
+}
+
+// Add to store only if it does not exist
+var addAuthSession = function(authStore, session) {
+ var found = false;
+
+ for(var i = 0; i < authStore.length; i++) {
+ if(authStore[i].equal(session)) {
+ found = true;
+ break;
+ }
+ }
+
+ if(!found) authStore.push(session);
+}
+
+/**
+ * Remove authStore credentials
+ * @method
+ * @param {string} db Name of database we are removing authStore details about
+ * @return {object}
+ */
+X509.prototype.logout = function(dbName) {
+ this.authStore = this.authStore.filter(function(x) {
+ return x.db != dbName;
+ });
+}
+
+/**
+ * Re authenticate pool
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+X509.prototype.reauthenticate = function(server, connections, callback) {
+ var authStore = this.authStore.slice(0);
+ var count = authStore.length;
+ if(count == 0) return callback(null, null);
+ // Iterate over all the auth details stored
+ for(var i = 0; i < authStore.length; i++) {
+ this.auth(server, connections, authStore[i].db, authStore[i].username, authStore[i].password, function(err) {
+ count = count - 1;
+ // Done re-authenticating
+ if(count == 0) {
+ callback(err, null);
+ }
+ });
+ }
+}
+
+/**
+ * This is a result from a authentication strategy
+ *
+ * @callback authResultCallback
+ * @param {error} error An error object. Set to null if no error present
+ * @param {boolean} result The result of the authentication process
+ */
+
+module.exports = X509;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/command_result.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/command_result.js
new file mode 100644
index 0000000..2b15dd7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/command_result.js
@@ -0,0 +1,34 @@
+"use strict";
+
+/**
+ * Creates a new CommandResult instance
+ * @class
+ * @param {object} result CommandResult object
+ * @param {Connection} connection A connection instance associated with this result
+ * @return {CommandResult} A cursor instance
+ */
+var CommandResult = function(result, connection, message) {
+ this.result = result;
+ this.connection = connection;
+ this.message = message;
+}
+
+/**
+ * Convert CommandResult to JSON
+ * @method
+ * @return {object}
+ */
+CommandResult.prototype.toJSON = function() {
+ return this.result;
+}
+
+/**
+ * Convert CommandResult to String representation
+ * @method
+ * @return {string}
+ */
+CommandResult.prototype.toString = function() {
+ return JSON.stringify(this.toJSON());
+}
+
+module.exports = CommandResult;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/commands.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/commands.js
new file mode 100644
index 0000000..85fc193
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/commands.js
@@ -0,0 +1,546 @@
+"use strict";
+
+var retrieveBSON = require('../connection/utils').retrieveBSON;
+var BSON = retrieveBSON();
+var Long = BSON.Long;
+
+// Incrementing request id
+var _requestId = 0;
+
+// Wire command operation ids
+var OP_QUERY = 2004;
+var OP_GETMORE = 2005;
+var OP_KILL_CURSORS = 2007;
+
+// Query flags
+var OPTS_TAILABLE_CURSOR = 2;
+var OPTS_SLAVE = 4;
+var OPTS_OPLOG_REPLAY = 8;
+var OPTS_NO_CURSOR_TIMEOUT = 16;
+var OPTS_AWAIT_DATA = 32;
+var OPTS_EXHAUST = 64;
+var OPTS_PARTIAL = 128;
+
+// Response flags
+var CURSOR_NOT_FOUND = 0;
+var QUERY_FAILURE = 2;
+var SHARD_CONFIG_STALE = 4;
+var AWAIT_CAPABLE = 8;
+
+/**************************************************************
+ * QUERY
+ **************************************************************/
+var Query = function(bson, ns, query, options) {
+ var self = this;
+ // Basic options needed to be passed in
+ if(ns == null) throw new Error("ns must be specified for query");
+ if(query == null) throw new Error("query must be specified for query");
+
+ // Validate that we are not passing 0x00 in the colletion name
+ if(!!~ns.indexOf("\x00")) {
+ throw new Error("namespace cannot contain a null character");
+ }
+
+ // Basic options
+ this.bson = bson;
+ this.ns = ns;
+ this.query = query;
+
+ // Ensure empty options
+ this.options = options || {};
+
+ // Additional options
+ this.numberToSkip = options.numberToSkip || 0;
+ this.numberToReturn = options.numberToReturn || 0;
+ this.returnFieldSelector = options.returnFieldSelector || null;
+ this.requestId = Query.getRequestId();
+
+ // Serialization option
+ this.serializeFunctions = typeof options.serializeFunctions == 'boolean' ? options.serializeFunctions : false;
+ this.ignoreUndefined = typeof options.ignoreUndefined == 'boolean' ? options.ignoreUndefined : false;
+ this.maxBsonSize = options.maxBsonSize || 1024 * 1024 * 16;
+ this.checkKeys = typeof options.checkKeys == 'boolean' ? options.checkKeys : true;
+ this.batchSize = self.numberToReturn;
+
+ // Flags
+ this.tailable = false;
+ this.slaveOk = typeof options.slaveOk == 'boolean'? options.slaveOk : false;
+ this.oplogReplay = false;
+ this.noCursorTimeout = false;
+ this.awaitData = false;
+ this.exhaust = false;
+ this.partial = false;
+}
+
+//
+// Assign a new request Id
+Query.prototype.incRequestId = function() {
+ this.requestId = _requestId++;
+}
+
+//
+// Assign a new request Id
+Query.nextRequestId = function() {
+ return _requestId + 1;
+}
+
+//
+// Uses a single allocated buffer for the process, avoiding multiple memory allocations
+Query.prototype.toBin = function() {
+ var self = this;
+ var buffers = [];
+ var projection = null;
+
+ // Set up the flags
+ var flags = 0;
+ if(this.tailable) {
+ flags |= OPTS_TAILABLE_CURSOR;
+ }
+
+ if(this.slaveOk) {
+ flags |= OPTS_SLAVE;
+ }
+
+ if(this.oplogReplay) {
+ flags |= OPTS_OPLOG_REPLAY;
+ }
+
+ if(this.noCursorTimeout) {
+ flags |= OPTS_NO_CURSOR_TIMEOUT;
+ }
+
+ if(this.awaitData) {
+ flags |= OPTS_AWAIT_DATA;
+ }
+
+ if(this.exhaust) {
+ flags |= OPTS_EXHAUST;
+ }
+
+ if(this.partial) {
+ flags |= OPTS_PARTIAL;
+ }
+
+ // If batchSize is different to self.numberToReturn
+ if(self.batchSize != self.numberToReturn) self.numberToReturn = self.batchSize;
+
+ // Allocate write protocol header buffer
+ var header = new Buffer(
+ 4 * 4 // Header
+ + 4 // Flags
+ + Buffer.byteLength(self.ns) + 1 // namespace
+ + 4 // numberToSkip
+ + 4 // numberToReturn
+ );
+
+ // Add header to buffers
+ buffers.push(header);
+
+ // Serialize the query
+ var query = self.bson.serialize(this.query, {
+ checkKeys: this.checkKeys,
+ serializeFunctions: this.serializeFunctions,
+ ignoreUndefined: this.ignoreUndefined,
+ });
+
+ // Add query document
+ buffers.push(query);
+
+ if(self.returnFieldSelector && Object.keys(self.returnFieldSelector).length > 0) {
+ // Serialize the projection document
+ projection = self.bson.serialize(this.returnFieldSelector, {
+ checkKeys: this.checkKeys,
+ serializeFunctions: this.serializeFunctions,
+ ignoreUndefined: this.ignoreUndefined,
+ });
+ // Add projection document
+ buffers.push(projection);
+ }
+
+ // Total message size
+ var totalLength = header.length + query.length + (projection ? projection.length : 0);
+
+ // Set up the index
+ var index = 4;
+
+ // Write total document length
+ header[3] = (totalLength >> 24) & 0xff;
+ header[2] = (totalLength >> 16) & 0xff;
+ header[1] = (totalLength >> 8) & 0xff;
+ header[0] = (totalLength) & 0xff;
+
+ // Write header information requestId
+ header[index + 3] = (this.requestId >> 24) & 0xff;
+ header[index + 2] = (this.requestId >> 16) & 0xff;
+ header[index + 1] = (this.requestId >> 8) & 0xff;
+ header[index] = (this.requestId) & 0xff;
+ index = index + 4;
+
+ // Write header information responseTo
+ header[index + 3] = (0 >> 24) & 0xff;
+ header[index + 2] = (0 >> 16) & 0xff;
+ header[index + 1] = (0 >> 8) & 0xff;
+ header[index] = (0) & 0xff;
+ index = index + 4;
+
+ // Write header information OP_QUERY
+ header[index + 3] = (OP_QUERY >> 24) & 0xff;
+ header[index + 2] = (OP_QUERY >> 16) & 0xff;
+ header[index + 1] = (OP_QUERY >> 8) & 0xff;
+ header[index] = (OP_QUERY) & 0xff;
+ index = index + 4;
+
+ // Write header information flags
+ header[index + 3] = (flags >> 24) & 0xff;
+ header[index + 2] = (flags >> 16) & 0xff;
+ header[index + 1] = (flags >> 8) & 0xff;
+ header[index] = (flags) & 0xff;
+ index = index + 4;
+
+ // Write collection name
+ index = index + header.write(this.ns, index, 'utf8') + 1;
+ header[index - 1] = 0;
+
+ // Write header information flags numberToSkip
+ header[index + 3] = (this.numberToSkip >> 24) & 0xff;
+ header[index + 2] = (this.numberToSkip >> 16) & 0xff;
+ header[index + 1] = (this.numberToSkip >> 8) & 0xff;
+ header[index] = (this.numberToSkip) & 0xff;
+ index = index + 4;
+
+ // Write header information flags numberToReturn
+ header[index + 3] = (this.numberToReturn >> 24) & 0xff;
+ header[index + 2] = (this.numberToReturn >> 16) & 0xff;
+ header[index + 1] = (this.numberToReturn >> 8) & 0xff;
+ header[index] = (this.numberToReturn) & 0xff;
+ index = index + 4;
+
+ // Return the buffers
+ return buffers;
+}
+
+Query.getRequestId = function() {
+ return ++_requestId;
+}
+
+/**************************************************************
+ * GETMORE
+ **************************************************************/
+var GetMore = function(bson, ns, cursorId, opts) {
+ opts = opts || {};
+ this.numberToReturn = opts.numberToReturn || 0;
+ this.requestId = _requestId++;
+ this.bson = bson;
+ this.ns = ns;
+ this.cursorId = cursorId;
+}
+
+//
+// Uses a single allocated buffer for the process, avoiding multiple memory allocations
+GetMore.prototype.toBin = function() {
+ var length = 4 + Buffer.byteLength(this.ns) + 1 + 4 + 8 + (4 * 4);
+ // Create command buffer
+ var index = 0;
+ // Allocate buffer
+ var _buffer = new Buffer(length);
+
+ // Write header information
+ // index = write32bit(index, _buffer, length);
+ _buffer[index + 3] = (length >> 24) & 0xff;
+ _buffer[index + 2] = (length >> 16) & 0xff;
+ _buffer[index + 1] = (length >> 8) & 0xff;
+ _buffer[index] = (length) & 0xff;
+ index = index + 4;
+
+ // index = write32bit(index, _buffer, requestId);
+ _buffer[index + 3] = (this.requestId >> 24) & 0xff;
+ _buffer[index + 2] = (this.requestId >> 16) & 0xff;
+ _buffer[index + 1] = (this.requestId >> 8) & 0xff;
+ _buffer[index] = (this.requestId) & 0xff;
+ index = index + 4;
+
+ // index = write32bit(index, _buffer, 0);
+ _buffer[index + 3] = (0 >> 24) & 0xff;
+ _buffer[index + 2] = (0 >> 16) & 0xff;
+ _buffer[index + 1] = (0 >> 8) & 0xff;
+ _buffer[index] = (0) & 0xff;
+ index = index + 4;
+
+ // index = write32bit(index, _buffer, OP_GETMORE);
+ _buffer[index + 3] = (OP_GETMORE >> 24) & 0xff;
+ _buffer[index + 2] = (OP_GETMORE >> 16) & 0xff;
+ _buffer[index + 1] = (OP_GETMORE >> 8) & 0xff;
+ _buffer[index] = (OP_GETMORE) & 0xff;
+ index = index + 4;
+
+ // index = write32bit(index, _buffer, 0);
+ _buffer[index + 3] = (0 >> 24) & 0xff;
+ _buffer[index + 2] = (0 >> 16) & 0xff;
+ _buffer[index + 1] = (0 >> 8) & 0xff;
+ _buffer[index] = (0) & 0xff;
+ index = index + 4;
+
+ // Write collection name
+ index = index + _buffer.write(this.ns, index, 'utf8') + 1;
+ _buffer[index - 1] = 0;
+
+ // Write batch size
+ // index = write32bit(index, _buffer, numberToReturn);
+ _buffer[index + 3] = (this.numberToReturn >> 24) & 0xff;
+ _buffer[index + 2] = (this.numberToReturn >> 16) & 0xff;
+ _buffer[index + 1] = (this.numberToReturn >> 8) & 0xff;
+ _buffer[index] = (this.numberToReturn) & 0xff;
+ index = index + 4;
+
+ // Write cursor id
+ // index = write32bit(index, _buffer, cursorId.getLowBits());
+ _buffer[index + 3] = (this.cursorId.getLowBits() >> 24) & 0xff;
+ _buffer[index + 2] = (this.cursorId.getLowBits() >> 16) & 0xff;
+ _buffer[index + 1] = (this.cursorId.getLowBits() >> 8) & 0xff;
+ _buffer[index] = (this.cursorId.getLowBits()) & 0xff;
+ index = index + 4;
+
+ // index = write32bit(index, _buffer, cursorId.getHighBits());
+ _buffer[index + 3] = (this.cursorId.getHighBits() >> 24) & 0xff;
+ _buffer[index + 2] = (this.cursorId.getHighBits() >> 16) & 0xff;
+ _buffer[index + 1] = (this.cursorId.getHighBits() >> 8) & 0xff;
+ _buffer[index] = (this.cursorId.getHighBits()) & 0xff;
+ index = index + 4;
+
+ // Return buffer
+ return _buffer;
+}
+
+/**************************************************************
+ * KILLCURSOR
+ **************************************************************/
+var KillCursor = function(bson, cursorIds) {
+ this.requestId = _requestId++;
+ this.cursorIds = cursorIds;
+}
+
+//
+// Uses a single allocated buffer for the process, avoiding multiple memory allocations
+KillCursor.prototype.toBin = function() {
+ var length = 4 + 4 + (4 * 4) + (this.cursorIds.length * 8);
+
+ // Create command buffer
+ var index = 0;
+ var _buffer = new Buffer(length);
+
+ // Write header information
+ // index = write32bit(index, _buffer, length);
+ _buffer[index + 3] = (length >> 24) & 0xff;
+ _buffer[index + 2] = (length >> 16) & 0xff;
+ _buffer[index + 1] = (length >> 8) & 0xff;
+ _buffer[index] = (length) & 0xff;
+ index = index + 4;
+
+ // index = write32bit(index, _buffer, requestId);
+ _buffer[index + 3] = (this.requestId >> 24) & 0xff;
+ _buffer[index + 2] = (this.requestId >> 16) & 0xff;
+ _buffer[index + 1] = (this.requestId >> 8) & 0xff;
+ _buffer[index] = (this.requestId) & 0xff;
+ index = index + 4;
+
+ // index = write32bit(index, _buffer, 0);
+ _buffer[index + 3] = (0 >> 24) & 0xff;
+ _buffer[index + 2] = (0 >> 16) & 0xff;
+ _buffer[index + 1] = (0 >> 8) & 0xff;
+ _buffer[index] = (0) & 0xff;
+ index = index + 4;
+
+ // index = write32bit(index, _buffer, OP_KILL_CURSORS);
+ _buffer[index + 3] = (OP_KILL_CURSORS >> 24) & 0xff;
+ _buffer[index + 2] = (OP_KILL_CURSORS >> 16) & 0xff;
+ _buffer[index + 1] = (OP_KILL_CURSORS >> 8) & 0xff;
+ _buffer[index] = (OP_KILL_CURSORS) & 0xff;
+ index = index + 4;
+
+ // index = write32bit(index, _buffer, 0);
+ _buffer[index + 3] = (0 >> 24) & 0xff;
+ _buffer[index + 2] = (0 >> 16) & 0xff;
+ _buffer[index + 1] = (0 >> 8) & 0xff;
+ _buffer[index] = (0) & 0xff;
+ index = index + 4;
+
+ // Write batch size
+ // index = write32bit(index, _buffer, this.cursorIds.length);
+ _buffer[index + 3] = (this.cursorIds.length >> 24) & 0xff;
+ _buffer[index + 2] = (this.cursorIds.length >> 16) & 0xff;
+ _buffer[index + 1] = (this.cursorIds.length >> 8) & 0xff;
+ _buffer[index] = (this.cursorIds.length) & 0xff;
+ index = index + 4;
+
+ // Write all the cursor ids into the array
+ for(var i = 0; i < this.cursorIds.length; i++) {
+ // Write cursor id
+ // index = write32bit(index, _buffer, cursorIds[i].getLowBits());
+ _buffer[index + 3] = (this.cursorIds[i].getLowBits() >> 24) & 0xff;
+ _buffer[index + 2] = (this.cursorIds[i].getLowBits() >> 16) & 0xff;
+ _buffer[index + 1] = (this.cursorIds[i].getLowBits() >> 8) & 0xff;
+ _buffer[index] = (this.cursorIds[i].getLowBits()) & 0xff;
+ index = index + 4;
+
+ // index = write32bit(index, _buffer, cursorIds[i].getHighBits());
+ _buffer[index + 3] = (this.cursorIds[i].getHighBits() >> 24) & 0xff;
+ _buffer[index + 2] = (this.cursorIds[i].getHighBits() >> 16) & 0xff;
+ _buffer[index + 1] = (this.cursorIds[i].getHighBits() >> 8) & 0xff;
+ _buffer[index] = (this.cursorIds[i].getHighBits()) & 0xff;
+ index = index + 4;
+ }
+
+ // Return buffer
+ return _buffer;
+}
+
+var Response = function(bson, data, opts) {
+ opts = opts || {promoteLongs: true, promoteValues: true, promoteBuffers: false};
+ this.parsed = false;
+
+ //
+ // Parse Header
+ //
+ this.index = 0;
+ this.raw = data;
+ this.data = data;
+ this.bson = bson;
+ this.opts = opts;
+
+ // Read the message length
+ this.length = data[this.index] | data[this.index + 1] << 8 | data[this.index + 2] << 16 | data[this.index + 3] << 24;
+ this.index = this.index + 4;
+
+ // Fetch the request id for this reply
+ this.requestId = data[this.index] | data[this.index + 1] << 8 | data[this.index + 2] << 16 | data[this.index + 3] << 24;
+ this.index = this.index + 4;
+
+ // Fetch the id of the request that triggered the response
+ this.responseTo = data[this.index] | data[this.index + 1] << 8 | data[this.index + 2] << 16 | data[this.index + 3] << 24;
+ this.index = this.index + 4;
+
+ // Skip op-code field
+ this.index = this.index + 4;
+
+ // Unpack flags
+ this.responseFlags = data[this.index] | data[this.index + 1] << 8 | data[this.index + 2] << 16 | data[this.index + 3] << 24;
+ this.index = this.index + 4;
+
+ // Unpack the cursor
+ var lowBits = data[this.index] | data[this.index + 1] << 8 | data[this.index + 2] << 16 | data[this.index + 3] << 24;
+ this.index = this.index + 4;
+ var highBits = data[this.index] | data[this.index + 1] << 8 | data[this.index + 2] << 16 | data[this.index + 3] << 24;
+ this.index = this.index + 4;
+ // Create long object
+ this.cursorId = new Long(lowBits, highBits);
+
+ // Unpack the starting from
+ this.startingFrom = data[this.index] | data[this.index + 1] << 8 | data[this.index + 2] << 16 | data[this.index + 3] << 24;
+ this.index = this.index + 4;
+
+ // Unpack the number of objects returned
+ this.numberReturned = data[this.index] | data[this.index + 1] << 8 | data[this.index + 2] << 16 | data[this.index + 3] << 24;
+ this.index = this.index + 4;
+
+ // Preallocate document array
+ this.documents = new Array(this.numberReturned);
+
+ // Flag values
+ this.cursorNotFound = (this.responseFlags & CURSOR_NOT_FOUND) != 0;
+ this.queryFailure = (this.responseFlags & QUERY_FAILURE) != 0;
+ this.shardConfigStale = (this.responseFlags & SHARD_CONFIG_STALE) != 0;
+ this.awaitCapable = (this.responseFlags & AWAIT_CAPABLE) != 0;
+ this.promoteLongs = typeof opts.promoteLongs == 'boolean' ? opts.promoteLongs : true;
+ this.promoteValues = typeof opts.promoteValues == 'boolean' ? opts.promoteValues : true;
+ this.promoteBuffers = typeof opts.promoteBuffers == 'boolean' ? opts.promoteBuffers : false;
+}
+
+Response.prototype.isParsed = function() {
+ return this.parsed;
+}
+
+Response.prototype.parse = function(options) {
+ // Don't parse again if not needed
+ if(this.parsed) return;
+ options = options || {};
+
+ // Allow the return of raw documents instead of parsing
+ var raw = options.raw || false;
+ var documentsReturnedIn = options.documentsReturnedIn || null;
+ var promoteLongs = typeof options.promoteLongs == 'boolean'
+ ? options.promoteLongs
+ : this.opts.promoteLongs;
+ var promoteValues = typeof options.promoteValues == 'boolean'
+ ? options.promoteValues
+ : this.opts.promoteValues;
+ var promoteBuffers = typeof options.promoteBuffers == 'boolean'
+ ? options.promoteBuffers
+ : this.opts.promoteBuffers
+ var bsonSize, _options;
+
+ // Set up the options
+ _options = {
+ promoteLongs: promoteLongs,
+ promoteValues: promoteValues,
+ promoteBuffers: promoteBuffers
+ };
+
+ //
+ // Single document and documentsReturnedIn set
+ //
+ if(this.numberReturned == 1 && documentsReturnedIn != null && raw) {
+ // Calculate the bson size
+ bsonSize = this.data[this.index] | this.data[this.index + 1] << 8 | this.data[this.index + 2] << 16 | this.data[this.index + 3] << 24;
+ // Slice out the buffer containing the command result document
+ var document = this.data.slice(this.index, this.index + bsonSize);
+ // Set up field we wish to keep as raw
+ var fieldsAsRaw = {}
+ fieldsAsRaw[documentsReturnedIn] = true;
+ _options.fieldsAsRaw = fieldsAsRaw;
+
+ // Deserialize but keep the array of documents in non-parsed form
+ var doc = this.bson.deserialize(document, _options);
+
+ // Get the documents
+ this.documents = doc.cursor[documentsReturnedIn];
+ this.numberReturned = this.documents.length;
+ // Ensure we have a Long valie cursor id
+ this.cursorId = typeof doc.cursor.id == 'number'
+ ? Long.fromNumber(doc.cursor.id)
+ : doc.cursor.id;
+
+ // Adjust the index
+ this.index = this.index + bsonSize;
+
+ // Set as parsed
+ this.parsed = true
+ return;
+ }
+
+ //
+ // Parse Body
+ //
+ for(var i = 0; i < this.numberReturned; i++) {
+ bsonSize = this.data[this.index] | this.data[this.index + 1] << 8 | this.data[this.index + 2] << 16 | this.data[this.index + 3] << 24;
+
+ // If we have raw results specified slice the return document
+ if(raw) {
+ this.documents[i] = this.data.slice(this.index, this.index + bsonSize);
+ } else {
+ this.documents[i] = this.bson.deserialize(this.data.slice(this.index, this.index + bsonSize), _options);
+ }
+
+ // Adjust the index
+ this.index = this.index + bsonSize;
+ }
+
+ // Set parsed
+ this.parsed = true;
+}
+
+module.exports = {
+ Query: Query
+ , GetMore: GetMore
+ , Response: Response
+ , KillCursor: KillCursor
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js
new file mode 100644
index 0000000..ab42552
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js
@@ -0,0 +1,582 @@
+"use strict";
+
+var inherits = require('util').inherits
+ , EventEmitter = require('events').EventEmitter
+ , net = require('net')
+ , tls = require('tls')
+ , crypto = require('crypto')
+ , f = require('util').format
+ , debugOptions = require('./utils').debugOptions
+ , Response = require('./commands').Response
+ , MongoError = require('../error')
+ , Logger = require('./logger');
+
+var _id = 0;
+var debugFields = ['host', 'port', 'size', 'keepAlive', 'keepAliveInitialDelay', 'noDelay'
+ , 'connectionTimeout', 'socketTimeout', 'singleBufferSerializtion', 'ssl', 'ca', 'cert'
+ , 'rejectUnauthorized', 'promoteLongs', 'promoteValues', 'promoteBuffers', 'checkServerIdentity'];
+var connectionAccounting = false;
+var connections = {};
+
+/**
+ * Creates a new Connection instance
+ * @class
+ * @param {string} options.host The server host
+ * @param {number} options.port The server port
+ * @param {boolean} [options.keepAlive=true] TCP Connection keep alive enabled
+ * @param {number} [options.keepAliveInitialDelay=0] Initial delay before TCP keep alive enabled
+ * @param {boolean} [options.noDelay=true] TCP Connection no delay
+ * @param {number} [options.connectionTimeout=0] TCP Connection timeout setting
+ * @param {number} [options.socketTimeout=0] TCP Socket timeout setting
+ * @param {boolean} [options.singleBufferSerializtion=true] Serialize into single buffer, trade of peak memory for serialization speed
+ * @param {boolean} [options.ssl=false] Use SSL for connection
+ * @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
+ * @param {Buffer} [options.ca] SSL Certificate store binary buffer
+ * @param {Buffer} [options.cert] SSL Certificate binary buffer
+ * @param {Buffer} [options.key] SSL Key file binary buffer
+ * @param {string} [options.passphrase] SSL Certificate pass phrase
+ * @param {boolean} [options.rejectUnauthorized=true] Reject unauthorized server certificates
+ * @param {boolean} [options.promoteLongs=true] Convert Long values from the db into Numbers if they fit into 53 bits
+ * @param {boolean} [options.promoteValues=true] Promotes BSON values to native types where possible, set to false to only receive wrapper types.
+ * @param {boolean} [options.promoteBuffers=false] Promotes Binary BSON values to native Node Buffers.
+ * @fires Connection#connect
+ * @fires Connection#close
+ * @fires Connection#error
+ * @fires Connection#timeout
+ * @fires Connection#parseError
+ * @return {Connection} A cursor instance
+ */
+var Connection = function(messageHandler, options) {
+ // Add event listener
+ EventEmitter.call(this);
+ // Set empty if no options passed
+ this.options = options || {};
+ // Identification information
+ this.id = _id++;
+ // Logger instance
+ this.logger = Logger('Connection', options);
+ // No bson parser passed in
+ if(!options.bson) throw new Error("must pass in valid bson parser");
+ // Get bson parser
+ this.bson = options.bson;
+ // Grouping tag used for debugging purposes
+ this.tag = options.tag;
+ // Message handler
+ this.messageHandler = messageHandler;
+
+ // Max BSON message size
+ this.maxBsonMessageSize = options.maxBsonMessageSize || (1024 * 1024 * 16 * 4);
+ // Debug information
+ if(this.logger.isDebug()) this.logger.debug(f('creating connection %s with options [%s]', this.id, JSON.stringify(debugOptions(debugFields, options))));
+
+ // Default options
+ this.port = options.port || 27017;
+ this.host = options.host || 'localhost';
+ this.keepAlive = typeof options.keepAlive == 'boolean' ? options.keepAlive : true;
+ this.keepAliveInitialDelay = options.keepAliveInitialDelay || 0;
+ this.noDelay = typeof options.noDelay == 'boolean' ? options.noDelay : true;
+ this.connectionTimeout = options.connectionTimeout || 0;
+ this.socketTimeout = options.socketTimeout || 0;
+
+ // If connection was destroyed
+ this.destroyed = false;
+
+ // Check if we have a domain socket
+ this.domainSocket = this.host.indexOf('\/') != -1;
+
+ // Serialize commands using function
+ this.singleBufferSerializtion = typeof options.singleBufferSerializtion == 'boolean' ? options.singleBufferSerializtion : true;
+ this.serializationFunction = this.singleBufferSerializtion ? 'toBinUnified' : 'toBin';
+
+ // SSL options
+ this.ca = options.ca || null;
+ this.cert = options.cert || null;
+ this.key = options.key || null;
+ this.passphrase = options.passphrase || null;
+ this.ssl = typeof options.ssl == 'boolean' ? options.ssl : false;
+ this.rejectUnauthorized = typeof options.rejectUnauthorized == 'boolean' ? options.rejectUnauthorized : true;
+ this.checkServerIdentity = typeof options.checkServerIdentity == 'boolean'
+ || typeof options.checkServerIdentity == 'function' ? options.checkServerIdentity : true;
+
+ // If ssl not enabled
+ if(!this.ssl) this.rejectUnauthorized = false;
+
+ // Response options
+ this.responseOptions = {
+ promoteLongs: typeof options.promoteLongs == 'boolean' ? options.promoteLongs : true,
+ promoteValues: typeof options.promoteValues == 'boolean' ? options.promoteValues : true,
+ promoteBuffers: typeof options.promoteBuffers == 'boolean' ? options.promoteBuffers: false
+ }
+
+ // Flushing
+ this.flushing = false;
+ this.queue = [];
+
+ // Internal state
+ this.connection = null;
+ this.writeStream = null;
+
+ // Create hash method
+ var hash = crypto.createHash('sha1');
+ hash.update(f('%s:%s', this.host, this.port));
+
+ // Create a hash name
+ this.hashedName = hash.digest('hex');
+
+ // All operations in flight on the connection
+ this.workItems = [];
+}
+
+inherits(Connection, EventEmitter);
+
+Connection.prototype.setSocketTimeout = function(value) {
+ if(this.connection) {
+ this.connection.setTimeout(value);
+ }
+}
+
+Connection.prototype.resetSocketTimeout = function() {
+ if(this.connection) {
+ this.connection.setTimeout(this.socketTimeout);
+ }
+}
+
+Connection.enableConnectionAccounting = function() {
+ connectionAccounting = true;
+ connections = {};
+}
+
+Connection.disableConnectionAccounting = function() {
+ connectionAccounting = false;
+}
+
+Connection.connections = function() {
+ return connections;
+}
+
+function deleteConnection(id) {
+ delete connections[id];
+}
+
+function addConnection(id, connection) {
+ connections[id] = connection;
+}
+
+//
+// Connection handlers
+var errorHandler = function(self) {
+ return function(err) {
+ if(connectionAccounting) deleteConnection(self.id);
+ // Debug information
+ if(self.logger.isDebug()) self.logger.debug(f('connection %s for [%s:%s] errored out with [%s]', self.id, self.host, self.port, JSON.stringify(err)));
+ // Emit the error
+ if(self.listeners('error').length > 0) self.emit("error", MongoError.create(err), self);
+ }
+}
+
+var timeoutHandler = function(self) {
+ return function() {
+ if(connectionAccounting) deleteConnection(self.id);
+ // Debug information
+ if(self.logger.isDebug()) self.logger.debug(f('connection %s for [%s:%s] timed out', self.id, self.host, self.port));
+ // Emit timeout error
+ self.emit("timeout"
+ , MongoError.create(f("connection %s to %s:%s timed out", self.id, self.host, self.port))
+ , self);
+ }
+}
+
+var closeHandler = function(self) {
+ return function(hadError) {
+ if(connectionAccounting) deleteConnection(self.id);
+ // Debug information
+ if(self.logger.isDebug()) self.logger.debug(f('connection %s with for [%s:%s] closed', self.id, self.host, self.port));
+
+ // Emit close event
+ if(!hadError) {
+ self.emit("close"
+ , MongoError.create(f("connection %s to %s:%s closed", self.id, self.host, self.port))
+ , self);
+ }
+ }
+}
+
+var dataHandler = function(self) {
+ return function(data) {
+ // Parse until we are done with the data
+ while(data.length > 0) {
+ // If we still have bytes to read on the current message
+ if(self.bytesRead > 0 && self.sizeOfMessage > 0) {
+ // Calculate the amount of remaining bytes
+ var remainingBytesToRead = self.sizeOfMessage - self.bytesRead;
+ // Check if the current chunk contains the rest of the message
+ if(remainingBytesToRead > data.length) {
+ // Copy the new data into the exiting buffer (should have been allocated when we know the message size)
+ data.copy(self.buffer, self.bytesRead);
+ // Adjust the number of bytes read so it point to the correct index in the buffer
+ self.bytesRead = self.bytesRead + data.length;
+
+ // Reset state of buffer
+ data = new Buffer(0);
+ } else {
+ // Copy the missing part of the data into our current buffer
+ data.copy(self.buffer, self.bytesRead, 0, remainingBytesToRead);
+ // Slice the overflow into a new buffer that we will then re-parse
+ data = data.slice(remainingBytesToRead);
+
+ // Emit current complete message
+ try {
+ var emitBuffer = self.buffer;
+ // Reset state of buffer
+ self.buffer = null;
+ self.sizeOfMessage = 0;
+ self.bytesRead = 0;
+ self.stubBuffer = null;
+ // Emit the buffer
+ self.messageHandler(new Response(self.bson, emitBuffer, self.responseOptions), self);
+ } catch(err) {
+ var errorObject = {err:"socketHandler", trace:err, bin:self.buffer, parseState:{
+ sizeOfMessage:self.sizeOfMessage,
+ bytesRead:self.bytesRead,
+ stubBuffer:self.stubBuffer}};
+ // We got a parse Error fire it off then keep going
+ self.emit("parseError", errorObject, self);
+ }
+ }
+ } else {
+ // Stub buffer is kept in case we don't get enough bytes to determine the
+ // size of the message (< 4 bytes)
+ if(self.stubBuffer != null && self.stubBuffer.length > 0) {
+ // If we have enough bytes to determine the message size let's do it
+ if(self.stubBuffer.length + data.length > 4) {
+ // Prepad the data
+ var newData = new Buffer(self.stubBuffer.length + data.length);
+ self.stubBuffer.copy(newData, 0);
+ data.copy(newData, self.stubBuffer.length);
+ // Reassign for parsing
+ data = newData;
+
+ // Reset state of buffer
+ self.buffer = null;
+ self.sizeOfMessage = 0;
+ self.bytesRead = 0;
+ self.stubBuffer = null;
+
+ } else {
+
+ // Add the the bytes to the stub buffer
+ var newStubBuffer = new Buffer(self.stubBuffer.length + data.length);
+ // Copy existing stub buffer
+ self.stubBuffer.copy(newStubBuffer, 0);
+ // Copy missing part of the data
+ data.copy(newStubBuffer, self.stubBuffer.length);
+ // Exit parsing loop
+ data = new Buffer(0);
+ }
+ } else {
+ if(data.length > 4) {
+ // Retrieve the message size
+ // var sizeOfMessage = data.readUInt32LE(0);
+ var sizeOfMessage = data[0] | data[1] << 8 | data[2] << 16 | data[3] << 24;
+ // If we have a negative sizeOfMessage emit error and return
+ if(sizeOfMessage < 0 || sizeOfMessage > self.maxBsonMessageSize) {
+ errorObject = {err:"socketHandler", trace:'', bin:self.buffer, parseState:{
+ sizeOfMessage: sizeOfMessage,
+ bytesRead: self.bytesRead,
+ stubBuffer: self.stubBuffer}};
+ // We got a parse Error fire it off then keep going
+ self.emit("parseError", errorObject, self);
+ return;
+ }
+
+ // Ensure that the size of message is larger than 0 and less than the max allowed
+ if(sizeOfMessage > 4 && sizeOfMessage < self.maxBsonMessageSize && sizeOfMessage > data.length) {
+ self.buffer = new Buffer(sizeOfMessage);
+ // Copy all the data into the buffer
+ data.copy(self.buffer, 0);
+ // Update bytes read
+ self.bytesRead = data.length;
+ // Update sizeOfMessage
+ self.sizeOfMessage = sizeOfMessage;
+ // Ensure stub buffer is null
+ self.stubBuffer = null;
+ // Exit parsing loop
+ data = new Buffer(0);
+
+ } else if(sizeOfMessage > 4 && sizeOfMessage < self.maxBsonMessageSize && sizeOfMessage == data.length) {
+ try {
+ emitBuffer = data;
+ // Reset state of buffer
+ self.buffer = null;
+ self.sizeOfMessage = 0;
+ self.bytesRead = 0;
+ self.stubBuffer = null;
+ // Exit parsing loop
+ data = new Buffer(0);
+ // Emit the message
+ self.messageHandler(new Response(self.bson, emitBuffer, self.responseOptions), self);
+ } catch (err) {
+ self.emit("parseError", err, self);
+ }
+ } else if(sizeOfMessage <= 4 || sizeOfMessage > self.maxBsonMessageSize) {
+ errorObject = {err:"socketHandler", trace:null, bin:data, parseState:{
+ sizeOfMessage:sizeOfMessage,
+ bytesRead:0,
+ buffer:null,
+ stubBuffer:null}};
+ // We got a parse Error fire it off then keep going
+ self.emit("parseError", errorObject, self);
+
+ // Clear out the state of the parser
+ self.buffer = null;
+ self.sizeOfMessage = 0;
+ self.bytesRead = 0;
+ self.stubBuffer = null;
+ // Exit parsing loop
+ data = new Buffer(0);
+ } else {
+ emitBuffer = data.slice(0, sizeOfMessage);
+ // Reset state of buffer
+ self.buffer = null;
+ self.sizeOfMessage = 0;
+ self.bytesRead = 0;
+ self.stubBuffer = null;
+ // Copy rest of message
+ data = data.slice(sizeOfMessage);
+ // Emit the message
+ self.messageHandler(new Response(self.bson, emitBuffer, self.responseOptions), self);
+ }
+ } else {
+ // Create a buffer that contains the space for the non-complete message
+ self.stubBuffer = new Buffer(data.length)
+ // Copy the data to the stub buffer
+ data.copy(self.stubBuffer, 0);
+ // Exit parsing loop
+ data = new Buffer(0);
+ }
+ }
+ }
+ }
+ }
+}
+
+// List of socket level valid ssl options
+var legalSslSocketOptions = ['pfx', 'key', 'passphrase', 'cert', 'ca', 'ciphers'
+ , 'NPNProtocols', 'ALPNProtocols', 'servername'
+ , 'secureProtocol', 'secureContext', 'session'
+ , 'minDHSize'];
+
+function merge(options1, options2) {
+ // Merge in any allowed ssl options
+ for(var name in options2) {
+ if(options2[name] != null && legalSslSocketOptions.indexOf(name) != -1) {
+ options1[name] = options2[name];
+ }
+ }
+}
+
+/**
+ * Connect
+ * @method
+ */
+Connection.prototype.connect = function(_options) {
+ var self = this;
+ _options = _options || {};
+ // Set the connections
+ if(connectionAccounting) addConnection(this.id, this);
+ // Check if we are overriding the promoteLongs
+ if(typeof _options.promoteLongs == 'boolean') {
+ self.responseOptions.promoteLongs = _options.promoteLongs;
+ self.responseOptions.promoteValues = _options.promoteValues;
+ self.responseOptions.promoteBuffers = _options.promoteBuffers;
+ }
+
+ // Create new connection instance
+ self.connection = self.domainSocket
+ ? net.createConnection(self.host)
+ : net.createConnection(self.port, self.host);
+
+ // Set the options for the connection
+ self.connection.setKeepAlive(self.keepAlive, self.keepAliveInitialDelay);
+ self.connection.setTimeout(self.connectionTimeout);
+ self.connection.setNoDelay(self.noDelay);
+
+ // If we have ssl enabled
+ if(self.ssl) {
+ var sslOptions = {
+ socket: self.connection
+ , rejectUnauthorized: self.rejectUnauthorized
+ }
+
+ // Merge in options
+ merge(sslOptions, this.options);
+ merge(sslOptions, _options);
+
+ // Set options for ssl
+ if(self.ca) sslOptions.ca = self.ca;
+ if(self.cert) sslOptions.cert = self.cert;
+ if(self.key) sslOptions.key = self.key;
+ if(self.passphrase) sslOptions.passphrase = self.passphrase;
+
+ // Override checkServerIdentity behavior
+ if(self.checkServerIdentity == false) {
+ // Skip the identiy check by retuning undefined as per node documents
+ // https://nodejs.org/api/tls.html#tls_tls_connect_options_callback
+ sslOptions.checkServerIdentity = function() {
+ return undefined;
+ }
+ } else if(typeof self.checkServerIdentity == 'function') {
+ sslOptions.checkServerIdentity = self.checkServerIdentity;
+ }
+
+ // Set default sni servername to be the same as host
+ if(sslOptions.servername == null) {
+ sslOptions.servername = self.host;
+ }
+
+ // Attempt SSL connection
+ self.connection = tls.connect(self.port, self.host, sslOptions, function() {
+ // Error on auth or skip
+ if(self.connection.authorizationError && self.rejectUnauthorized) {
+ return self.emit("error", self.connection.authorizationError, self, {ssl:true});
+ }
+
+ // Set socket timeout instead of connection timeout
+ self.connection.setTimeout(self.socketTimeout);
+ // We are done emit connect
+ self.emit('connect', self);
+ });
+ self.connection.setTimeout(self.connectionTimeout);
+ } else {
+ self.connection.on('connect', function() {
+ // Set socket timeout instead of connection timeout
+ self.connection.setTimeout(self.socketTimeout);
+ // Emit connect event
+ self.emit('connect', self);
+ });
+ }
+
+ // Add handlers for events
+ self.connection.once('error', errorHandler(self));
+ self.connection.once('timeout', timeoutHandler(self));
+ self.connection.once('close', closeHandler(self));
+ self.connection.on('data', dataHandler(self));
+}
+
+/**
+ * Unref this connection
+ * @method
+ * @return {boolean}
+ */
+Connection.prototype.unref = function() {
+ if (this.connection) this.connection.unref();
+ else {
+ var self = this;
+ this.once('connect', function() {
+ self.connection.unref();
+ });
+ }
+}
+
+/**
+ * Destroy connection
+ * @method
+ */
+Connection.prototype.destroy = function() {
+ // Set the connections
+ if(connectionAccounting) deleteConnection(this.id);
+ if(this.connection) {
+ this.connection.end();
+ this.connection.destroy();
+ }
+
+ this.destroyed = true;
+}
+
+/**
+ * Write to connection
+ * @method
+ * @param {Command} command Command to write out need to implement toBin and toBinUnified
+ */
+Connection.prototype.write = function(buffer) {
+ var i;
+ // Debug Log
+ if(this.logger.isDebug()) {
+ if(!Array.isArray(buffer)) {
+ this.logger.debug(f('writing buffer [%s] to %s:%s', buffer.toString('hex'), this.host, this.port));
+ } else {
+ for(i = 0; i < buffer.length; i++)
+ this.logger.debug(f('writing buffer [%s] to %s:%s', buffer[i].toString('hex'), this.host, this.port));
+ }
+ }
+
+ // Write out the command
+ if(!Array.isArray(buffer)) return this.connection.write(buffer, 'binary');
+ // Iterate over all buffers and write them in order to the socket
+ for(i = 0; i < buffer.length; i++) this.connection.write(buffer[i], 'binary');
+}
+
+/**
+ * Return id of connection as a string
+ * @method
+ * @return {string}
+ */
+Connection.prototype.toString = function() {
+ return "" + this.id;
+}
+
+/**
+ * Return json object of connection
+ * @method
+ * @return {object}
+ */
+Connection.prototype.toJSON = function() {
+ return {id: this.id, host: this.host, port: this.port};
+}
+
+/**
+ * Is the connection connected
+ * @method
+ * @return {boolean}
+ */
+Connection.prototype.isConnected = function() {
+ if(this.destroyed) return false;
+ return !this.connection.destroyed && this.connection.writable;
+}
+
+/**
+ * A server connect event, used to verify that the connection is up and running
+ *
+ * @event Connection#connect
+ * @type {Connection}
+ */
+
+/**
+ * The server connection closed, all pool connections closed
+ *
+ * @event Connection#close
+ * @type {Connection}
+ */
+
+/**
+ * The server connection caused an error, all pool connections closed
+ *
+ * @event Connection#error
+ * @type {Connection}
+ */
+
+/**
+ * The server connection timed out, all pool connections closed
+ *
+ * @event Connection#timeout
+ * @type {Connection}
+ */
+
+/**
+ * The driver experienced an invalid message, all pool connections closed
+ *
+ * @event Connection#parseError
+ * @type {Connection}
+ */
+
+module.exports = Connection;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/logger.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/logger.js
new file mode 100644
index 0000000..b8b1818
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/logger.js
@@ -0,0 +1,228 @@
+"use strict";
+
+var f = require('util').format
+ , MongoError = require('../error');
+
+// Filters for classes
+var classFilters = {};
+var filteredClasses = {};
+var level = null;
+// Save the process id
+var pid = process.pid;
+// current logger
+var currentLogger = null;
+
+/**
+ * Creates a new Logger instance
+ * @class
+ * @param {string} className The Class name associated with the logging instance
+ * @param {object} [options=null] Optional settings.
+ * @param {Function} [options.logger=null] Custom logger function;
+ * @param {string} [options.loggerLevel=error] Override default global log level.
+ * @return {Logger} a Logger instance.
+ */
+var Logger = function(className, options) {
+ if(!(this instanceof Logger)) return new Logger(className, options);
+ options = options || {};
+
+ // Current reference
+ this.className = className;
+
+ // Current logger
+ if(options.logger) {
+ currentLogger = options.logger;
+ } else if(currentLogger == null) {
+ currentLogger = console.log;
+ }
+
+ // Set level of logging, default is error
+ if(options.loggerLevel) {
+ level = options.loggerLevel || 'error';
+ }
+
+ // Add all class names
+ if(filteredClasses[this.className] == null) classFilters[this.className] = true;
+}
+
+/**
+ * Log a message at the debug level
+ * @method
+ * @param {string} message The message to log
+ * @param {object} object additional meta data to log
+ * @return {null}
+ */
+Logger.prototype.debug = function(message, object) {
+ if(this.isDebug()
+ && ((Object.keys(filteredClasses).length > 0 && filteredClasses[this.className])
+ || (Object.keys(filteredClasses).length == 0 && classFilters[this.className]))) {
+ var dateTime = new Date().getTime();
+ var msg = f("[%s-%s:%s] %s %s", 'DEBUG', this.className, pid, dateTime, message);
+ var state = {
+ type: 'debug', message: message, className: this.className, pid: pid, date: dateTime
+ };
+ if(object) state.meta = object;
+ currentLogger(msg, state);
+ }
+}
+
+/**
+ * Log a message at the warn level
+ * @method
+ * @param {string} message The message to log
+ * @param {object} object additional meta data to log
+ * @return {null}
+ */
+Logger.prototype.warn = function(message, object) {
+ if(this.isWarn()
+ && ((Object.keys(filteredClasses).length > 0 && filteredClasses[this.className])
+ || (Object.keys(filteredClasses).length == 0 && classFilters[this.className]))) {
+ var dateTime = new Date().getTime();
+ var msg = f("[%s-%s:%s] %s %s", 'WARN', this.className, pid, dateTime, message);
+ var state = {
+ type: 'warn', message: message, className: this.className, pid: pid, date: dateTime
+ };
+ if(object) state.meta = object;
+ currentLogger(msg, state);
+ }
+},
+
+/**
+ * Log a message at the info level
+ * @method
+ * @param {string} message The message to log
+ * @param {object} object additional meta data to log
+ * @return {null}
+ */
+Logger.prototype.info = function(message, object) {
+ if(this.isInfo()
+ && ((Object.keys(filteredClasses).length > 0 && filteredClasses[this.className])
+ || (Object.keys(filteredClasses).length == 0 && classFilters[this.className]))) {
+ var dateTime = new Date().getTime();
+ var msg = f("[%s-%s:%s] %s %s", 'INFO', this.className, pid, dateTime, message);
+ var state = {
+ type: 'info', message: message, className: this.className, pid: pid, date: dateTime
+ };
+ if(object) state.meta = object;
+ currentLogger(msg, state);
+ }
+},
+
+/**
+ * Log a message at the error level
+ * @method
+ * @param {string} message The message to log
+ * @param {object} object additional meta data to log
+ * @return {null}
+ */
+Logger.prototype.error = function(message, object) {
+ if(this.isError()
+ && ((Object.keys(filteredClasses).length > 0 && filteredClasses[this.className])
+ || (Object.keys(filteredClasses).length == 0 && classFilters[this.className]))) {
+ var dateTime = new Date().getTime();
+ var msg = f("[%s-%s:%s] %s %s", 'ERROR', this.className, pid, dateTime, message);
+ var state = {
+ type: 'error', message: message, className: this.className, pid: pid, date: dateTime
+ };
+ if(object) state.meta = object;
+ currentLogger(msg, state);
+ }
+},
+
+/**
+ * Is the logger set at info level
+ * @method
+ * @return {boolean}
+ */
+Logger.prototype.isInfo = function() {
+ return level == 'info' || level == 'debug';
+},
+
+/**
+ * Is the logger set at error level
+ * @method
+ * @return {boolean}
+ */
+Logger.prototype.isError = function() {
+ return level == 'error' || level == 'info' || level == 'debug';
+},
+
+/**
+ * Is the logger set at error level
+ * @method
+ * @return {boolean}
+ */
+Logger.prototype.isWarn = function() {
+ return level == 'error' || level == 'warn' || level == 'info' || level == 'debug';
+},
+
+/**
+ * Is the logger set at debug level
+ * @method
+ * @return {boolean}
+ */
+Logger.prototype.isDebug = function() {
+ return level == 'debug';
+}
+
+/**
+ * Resets the logger to default settings, error and no filtered classes
+ * @method
+ * @return {null}
+ */
+Logger.reset = function() {
+ level = 'error';
+ filteredClasses = {};
+}
+
+/**
+ * Get the current logger function
+ * @method
+ * @return {function}
+ */
+Logger.currentLogger = function() {
+ return currentLogger;
+}
+
+/**
+ * Set the current logger function
+ * @method
+ * @param {function} logger Logger function.
+ * @return {null}
+ */
+Logger.setCurrentLogger = function(logger) {
+ if(typeof logger != 'function') throw new MongoError("current logger must be a function");
+ currentLogger = logger;
+}
+
+/**
+ * Set what classes to log.
+ * @method
+ * @param {string} type The type of filter (currently only class)
+ * @param {string[]} values The filters to apply
+ * @return {null}
+ */
+Logger.filter = function(type, values) {
+ if(type == 'class' && Array.isArray(values)) {
+ filteredClasses = {};
+
+ values.forEach(function(x) {
+ filteredClasses[x] = true;
+ });
+ }
+}
+
+/**
+ * Set the current log level
+ * @method
+ * @param {string} level Set current log level (debug, info, error)
+ * @return {null}
+ */
+Logger.setLevel = function(_level) {
+ if(_level != 'info' && _level != 'error' && _level != 'debug' && _level != 'warn') {
+ throw new Error(f("%s is an illegal logging level", _level));
+ }
+
+ level = _level;
+}
+
+module.exports = Logger;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js
new file mode 100644
index 0000000..b3c874d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js
@@ -0,0 +1,1237 @@
+"use strict";
+
+var inherits = require('util').inherits,
+ EventEmitter = require('events').EventEmitter,
+ Connection = require('./connection'),
+ MongoError = require('../error'),
+ Logger = require('./logger'),
+ f = require('util').format,
+ Query = require('./commands').Query,
+ CommandResult = require('./command_result'),
+ assign = require('../topologies/shared').assign;
+
+var MongoCR = require('../auth/mongocr')
+ , X509 = require('../auth/x509')
+ , Plain = require('../auth/plain')
+ , GSSAPI = require('../auth/gssapi')
+ , SSPI = require('../auth/sspi')
+ , ScramSHA1 = require('../auth/scram');
+
+var DISCONNECTED = 'disconnected';
+var CONNECTING = 'connecting';
+var CONNECTED = 'connected';
+var DESTROYING = 'destroying';
+var DESTROYED = 'destroyed';
+
+var _id = 0;
+
+/**
+ * Creates a new Pool instance
+ * @class
+ * @param {string} options.host The server host
+ * @param {number} options.port The server port
+ * @param {number} [options.size=1] Max server connection pool size
+ * @param {boolean} [options.reconnect=true] Server will attempt to reconnect on loss of connection
+ * @param {number} [options.reconnectTries=30] Server attempt to reconnect #times
+ * @param {number} [options.reconnectInterval=1000] Server will wait # milliseconds between retries
+ * @param {boolean} [options.keepAlive=true] TCP Connection keep alive enabled
+ * @param {number} [options.keepAliveInitialDelay=0] Initial delay before TCP keep alive enabled
+ * @param {boolean} [options.noDelay=true] TCP Connection no delay
+ * @param {number} [options.connectionTimeout=0] TCP Connection timeout setting
+ * @param {number} [options.socketTimeout=0] TCP Socket timeout setting
+ * @param {number} [options.monitoringSocketTimeout=30000] TCP Socket timeout setting for replicaset monitoring socket
+ * @param {boolean} [options.ssl=false] Use SSL for connection
+ * @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
+ * @param {Buffer} [options.ca] SSL Certificate store binary buffer
+ * @param {Buffer} [options.cert] SSL Certificate binary buffer
+ * @param {Buffer} [options.key] SSL Key file binary buffer
+ * @param {string} [options.passPhrase] SSL Certificate pass phrase
+ * @param {boolean} [options.rejectUnauthorized=false] Reject unauthorized server certificates
+ * @param {boolean} [options.promoteLongs=true] Convert Long values from the db into Numbers if they fit into 53 bits
+ * @param {boolean} [options.promoteValues=true] Promotes BSON values to native types where possible, set to false to only receive wrapper types.
+ * @param {boolean} [options.promoteBuffers=false] Promotes Binary BSON values to native Node Buffers.
+ * @param {boolean} [options.domainsEnabled=false] Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit.
+ * @fires Pool#connect
+ * @fires Pool#close
+ * @fires Pool#error
+ * @fires Pool#timeout
+ * @fires Pool#parseError
+ * @return {Pool} A cursor instance
+ */
+var Pool = function(options) {
+ // Add event listener
+ EventEmitter.call(this);
+ // Add the options
+ this.options = assign({
+ // Host and port settings
+ host: 'localhost',
+ port: 27017,
+ // Pool default max size
+ size: 5,
+ // socket settings
+ connectionTimeout: 30000,
+ socketTimeout: 30000,
+ keepAlive: true,
+ keepAliveInitialDelay: 0,
+ noDelay: true,
+ // SSL Settings
+ ssl: false, checkServerIdentity: true,
+ ca: null, cert: null, key: null, passPhrase: null,
+ rejectUnauthorized: false,
+ promoteLongs: true,
+ promoteValues: true,
+ promoteBuffers: false,
+ // Reconnection options
+ reconnect: true,
+ reconnectInterval: 1000,
+ reconnectTries: 30,
+ // Enable domains
+ domainsEnabled: false
+ }, options);
+
+ // Identification information
+ this.id = _id++;
+ // Current reconnect retries
+ this.retriesLeft = this.options.reconnectTries;
+ this.reconnectId = null;
+ // No bson parser passed in
+ if(!options.bson || (options.bson
+ && (typeof options.bson.serialize != 'function'
+ || typeof options.bson.deserialize != 'function'))) {
+ throw new Error("must pass in valid bson parser");
+ }
+
+ // Logger instance
+ this.logger = Logger('Pool', options);
+ // Pool state
+ this.state = DISCONNECTED;
+ // Connections
+ this.availableConnections = [];
+ this.inUseConnections = [];
+ this.connectingConnections = [];
+ // Currently executing
+ this.executing = false;
+ // Operation work queue
+ this.queue = [];
+
+ // All the authProviders
+ this.authProviders = options.authProviders || {
+ 'mongocr': new MongoCR(options.bson), 'x509': new X509(options.bson)
+ , 'plain': new Plain(options.bson), 'gssapi': new GSSAPI(options.bson)
+ , 'sspi': new SSPI(options.bson), 'scram-sha-1': new ScramSHA1(options.bson)
+ }
+
+ // Are we currently authenticating
+ this.authenticating = false;
+ this.loggingout = false;
+ this.nonAuthenticatedConnections = [];
+ this.authenticatingTimestamp = null;
+ // Number of consecutive timeouts caught
+ this.numberOfConsecutiveTimeouts = 0;
+ // Current pool Index
+ this.connectionIndex = 0;
+}
+
+inherits(Pool, EventEmitter);
+
+Object.defineProperty(Pool.prototype, 'size', {
+ enumerable:true,
+ get: function() { return this.options.size; }
+});
+
+Object.defineProperty(Pool.prototype, 'connectionTimeout', {
+ enumerable:true,
+ get: function() { return this.options.connectionTimeout; }
+});
+
+Object.defineProperty(Pool.prototype, 'socketTimeout', {
+ enumerable:true,
+ get: function() { return this.options.socketTimeout; }
+});
+
+function stateTransition(self, newState) {
+ var legalTransitions = {
+ 'disconnected': [CONNECTING, DESTROYING, DISCONNECTED],
+ 'connecting': [CONNECTING, DESTROYING, CONNECTED, DISCONNECTED],
+ 'connected': [CONNECTED, DISCONNECTED, DESTROYING],
+ 'destroying': [DESTROYING, DESTROYED],
+ 'destroyed': [DESTROYED]
+ }
+
+ // Get current state
+ var legalStates = legalTransitions[self.state];
+ if(legalStates && legalStates.indexOf(newState) != -1) {
+ self.state = newState;
+ } else {
+ self.logger.error(f('Pool with id [%s] failed attempted illegal state transition from [%s] to [%s] only following state allowed [%s]'
+ , self.id, self.state, newState, legalStates));
+ }
+}
+
+function authenticate(pool, auth, connection, cb) {
+ if(auth[0] === undefined) return cb(null);
+ // We need to authenticate the server
+ var mechanism = auth[0];
+ var db = auth[1];
+ // Validate if the mechanism exists
+ if(!pool.authProviders[mechanism]) {
+ throw new MongoError(f('authMechanism %s not supported', mechanism));
+ }
+
+ // Get the provider
+ var provider = pool.authProviders[mechanism];
+
+ // Authenticate using the provided mechanism
+ provider.auth.apply(provider, [write(pool), [connection], db].concat(auth.slice(2)).concat([cb]));
+}
+
+// The write function used by the authentication mechanism (bypasses external)
+function write(self) {
+ return function(connection, command, callback) {
+ // Get the raw buffer
+ // Ensure we stop auth if pool was destroyed
+ if(self.state == DESTROYED || self.state == DESTROYING) {
+ return callback(new MongoError('pool destroyed'));
+ }
+
+ // Set the connection workItem callback
+ connection.workItems.push({
+ cb: callback, command: true, requestId: command.requestId
+ });
+
+ // Write the buffer out to the connection
+ connection.write(command.toBin());
+ };
+}
+
+
+function reauthenticate(pool, connection, cb) {
+ // Authenticate
+ function authenticateAgainstProvider(pool, connection, providers, cb) {
+ // Finished re-authenticating against providers
+ if(providers.length == 0) return cb();
+ // Get the provider name
+ var provider = pool.authProviders[providers.pop()];
+
+ // Auth provider
+ provider.reauthenticate(write(pool), [connection], function(err) {
+ // We got an error return immediately
+ if(err) return cb(err);
+ // Continue authenticating the connection
+ authenticateAgainstProvider(pool, connection, providers, cb);
+ });
+ }
+
+ // Start re-authenticating process
+ authenticateAgainstProvider(pool, connection, Object.keys(pool.authProviders), cb);
+}
+
+function connectionFailureHandler(self, event) {
+ return function(err) {
+ if (this._connectionFailHandled) return;
+ this._connectionFailHandled = true;
+ // Destroy the connection
+ this.destroy();
+
+ // Remove the connection
+ removeConnection(self, this);
+
+ // Flush all work Items on this connection
+ while(this.workItems.length > 0) {
+ var workItem = this.workItems.shift();
+ // if(workItem.cb) workItem.cb(err);
+ if(workItem.cb) workItem.cb(err);
+ }
+
+ // Did we catch a timeout, increment the numberOfConsecutiveTimeouts
+ if(event == 'timeout') {
+ self.numberOfConsecutiveTimeouts = self.numberOfConsecutiveTimeouts + 1;
+
+ // Have we timed out more than reconnectTries in a row ?
+ // Force close the pool as we are trying to connect to tcp sink hole
+ if(self.numberOfConsecutiveTimeouts > self.options.reconnectTries) {
+ self.numberOfConsecutiveTimeouts = 0;
+ // Destroy all connections and pool
+ self.destroy(true);
+ // Emit close event
+ return self.emit('close', self);
+ }
+ }
+
+ // No more socket available propegate the event
+ if(self.socketCount() == 0) {
+ if(self.state != DESTROYED && self.state != DESTROYING) {
+ stateTransition(self, DISCONNECTED);
+ }
+
+ // Do not emit error events, they are always close events
+ // do not trigger the low level error handler in node
+ event = event == 'error' ? 'close' : event;
+ self.emit(event, err);
+ }
+
+ // Start reconnection attempts
+ if(!self.reconnectId && self.options.reconnect) {
+ self.reconnectId = setTimeout(attemptReconnect(self), self.options.reconnectInterval);
+ }
+ };
+}
+
+function attemptReconnect(self) {
+ return function() {
+ self.emit('attemptReconnect', self);
+ if(self.state == DESTROYED || self.state == DESTROYING) return;
+
+ // We are connected do not try again
+ if(self.isConnected()) {
+ self.reconnectId = null;
+ return;
+ }
+
+ // If we have failure schedule a retry
+ function _connectionFailureHandler(self) {
+ return function() {
+ if (this._connectionFailHandled) return;
+ this._connectionFailHandled = true;
+ // Destroy the connection
+ this.destroy();
+ // Count down the number of reconnects
+ self.retriesLeft = self.retriesLeft - 1;
+ // How many retries are left
+ if(self.retriesLeft == 0) {
+ // Destroy the instance
+ self.destroy();
+ // Emit close event
+ self.emit('reconnectFailed'
+ , new MongoError(f('failed to reconnect after %s attempts with interval %s ms', self.options.reconnectTries, self.options.reconnectInterval)));
+ } else {
+ self.reconnectId = setTimeout(attemptReconnect(self), self.options.reconnectInterval);
+ }
+ }
+ }
+
+ // Got a connect handler
+ function _connectHandler(self) {
+ return function() {
+ // Assign
+ var connection = this;
+
+ // Pool destroyed stop the connection
+ if(self.state == DESTROYED || self.state == DESTROYING) {
+ return connection.destroy();
+ }
+
+ // Clear out all handlers
+ handlers.forEach(function(event) {
+ connection.removeAllListeners(event);
+ });
+
+ // Reset reconnect id
+ self.reconnectId = null;
+
+ // Apply pool connection handlers
+ connection.on('error', connectionFailureHandler(self, 'error'));
+ connection.on('close', connectionFailureHandler(self, 'close'));
+ connection.on('timeout', connectionFailureHandler(self, 'timeout'));
+ connection.on('parseError', connectionFailureHandler(self, 'parseError'));
+
+ // Apply any auth to the connection
+ reauthenticate(self, this, function() {
+ // Reset retries
+ self.retriesLeft = self.options.reconnectTries;
+ // Push to available connections
+ self.availableConnections.push(connection);
+ // Emit reconnect event
+ self.emit('reconnect', self);
+ // Trigger execute to start everything up again
+ _execute(self)();
+ });
+ }
+ }
+
+ // Create a connection
+ var connection = new Connection(messageHandler(self), self.options);
+ // Add handlers
+ connection.on('close', _connectionFailureHandler(self, 'close'));
+ connection.on('error', _connectionFailureHandler(self, 'error'));
+ connection.on('timeout', _connectionFailureHandler(self, 'timeout'));
+ connection.on('parseError', _connectionFailureHandler(self, 'parseError'));
+ // On connection
+ connection.on('connect', _connectHandler(self));
+ // Attempt connection
+ connection.connect();
+ }
+}
+
+function moveConnectionBetween(connection, from, to) {
+ var index = from.indexOf(connection);
+ // Move the connection from connecting to available
+ if(index != -1) {
+ from.splice(index, 1);
+ to.push(connection);
+ }
+}
+
+function messageHandler(self) {
+ return function(message, connection) {
+ // workItem to execute
+ var workItem = null;
+
+ // Locate the workItem
+ for(var i = 0; i < connection.workItems.length; i++) {
+ if(connection.workItems[i].requestId == message.responseTo) {
+ // Get the callback
+ workItem = connection.workItems[i];
+ // Remove from list of workItems
+ connection.workItems.splice(i, 1);
+ }
+ }
+
+
+ // Reset timeout counter
+ self.numberOfConsecutiveTimeouts = 0;
+
+ // Reset the connection timeout if we modified it for
+ // this operation
+ if(workItem.socketTimeout) {
+ connection.resetSocketTimeout();
+ }
+
+ // Log if debug enabled
+ if(self.logger.isDebug()) {
+ self.logger.debug(f('message [%s] received from %s:%s'
+ , message.raw.toString('hex'), self.options.host, self.options.port));
+ }
+
+ // Authenticate any straggler connections
+ function authenticateStragglers(self, connection, callback) {
+ // Get any non authenticated connections
+ var connections = self.nonAuthenticatedConnections.slice(0);
+ var nonAuthenticatedConnections = self.nonAuthenticatedConnections;
+ self.nonAuthenticatedConnections = [];
+
+ // Establish if the connection need to be authenticated
+ // Add to authentication list if
+ // 1. we were in an authentication process when the operation was executed
+ // 2. our current authentication timestamp is from the workItem one, meaning an auth has happened
+ if(connection.workItems.length == 1 && (connection.workItems[0].authenticating == true
+ || (typeof connection.workItems[0].authenticatingTimestamp == 'number'
+ && connection.workItems[0].authenticatingTimestamp != self.authenticatingTimestamp))) {
+ // Add connection to the list
+ connections.push(connection);
+ }
+
+ // No connections need to be re-authenticated
+ if(connections.length == 0) {
+ // Release the connection back to the pool
+ moveConnectionBetween(connection, self.inUseConnections, self.availableConnections);
+ // Finish
+ return callback();
+ }
+
+ // Apply re-authentication to all connections before releasing back to pool
+ var connectionCount = connections.length;
+ // Authenticate all connections
+ for(var i = 0; i < connectionCount; i++) {
+ reauthenticate(self, connections[i], function() {
+ connectionCount = connectionCount - 1;
+
+ if(connectionCount == 0) {
+ // Put non authenticated connections in available connections
+ self.availableConnections = self.availableConnections.concat(nonAuthenticatedConnections);
+ // Release the connection back to the pool
+ moveConnectionBetween(connection, self.inUseConnections, self.availableConnections);
+ // Return
+ callback();
+ }
+ });
+ }
+ }
+
+ function handleOperationCallback(self, cb, err, result) {
+ // No domain enabled
+ if(!self.options.domainsEnabled) {
+ return process.nextTick(function() {
+ return cb(err, result);
+ });
+ }
+
+ // Domain enabled just call the callback
+ cb(err, result);
+ }
+
+ authenticateStragglers(self, connection, function() {
+ // Keep executing, ensure current message handler does not stop execution
+ if(!self.executing) {
+ process.nextTick(function() {
+ _execute(self)();
+ });
+ }
+
+ // Time to dispatch the message if we have a callback
+ if(!workItem.immediateRelease) {
+ try {
+ // Parse the message according to the provided options
+ message.parse(workItem);
+ } catch(err) {
+ return handleOperationCallback(self, workItem.cb, MongoError.create(err));
+ }
+
+ // Establish if we have an error
+ if(workItem.command && message.documents[0] && (message.documents[0].ok == 0 || message.documents[0]['$err']
+ || message.documents[0]['errmsg'] || message.documents[0]['code'])) {
+ return handleOperationCallback(self, workItem.cb, MongoError.create(message.documents[0]));
+ }
+
+ // Add the connection details
+ message.hashedName = connection.hashedName;
+
+ // Return the documents
+ handleOperationCallback(self, workItem.cb, null, new CommandResult(workItem.fullResult ? message : message.documents[0], connection, message));
+ }
+ });
+ }
+}
+
+/**
+ * Return the total socket count in the pool.
+ * @method
+ * @return {Number} The number of socket available.
+ */
+Pool.prototype.socketCount = function() {
+ return this.availableConnections.length
+ + this.inUseConnections.length;
+ // + this.connectingConnections.length;
+}
+
+/**
+ * Return all pool connections
+ * @method
+ * @return {Connectio[]} The pool connections
+ */
+Pool.prototype.allConnections = function() {
+ return this.availableConnections
+ .concat(this.inUseConnections)
+ .concat(this.connectingConnections);
+}
+
+/**
+ * Get a pool connection (round-robin)
+ * @method
+ * @return {Connection}
+ */
+Pool.prototype.get = function() {
+ return this.allConnections()[0];
+}
+
+/**
+ * Is the pool connected
+ * @method
+ * @return {boolean}
+ */
+Pool.prototype.isConnected = function() {
+ // We are in a destroyed state
+ if(this.state == DESTROYED || this.state == DESTROYING) {
+ return false;
+ }
+
+ // Get connections
+ var connections = this.availableConnections
+ .concat(this.inUseConnections);
+
+ // Check if we have any connected connections
+ for(var i = 0; i < connections.length; i++) {
+ if(connections[i].isConnected()) return true;
+ }
+
+ // Might be authenticating, but we are still connected
+ if(connections.length == 0 && this.authenticating) {
+ return true
+ }
+
+ // Not connected
+ return false;
+}
+
+/**
+ * Was the pool destroyed
+ * @method
+ * @return {boolean}
+ */
+Pool.prototype.isDestroyed = function() {
+ return this.state == DESTROYED || this.state == DESTROYING;
+}
+
+/**
+ * Is the pool in a disconnected state
+ * @method
+ * @return {boolean}
+ */
+Pool.prototype.isDisconnected = function() {
+ return this.state == DISCONNECTED;
+}
+
+/**
+ * Connect pool
+ * @method
+ */
+Pool.prototype.connect = function() {
+ if(this.state != DISCONNECTED) {
+ throw new MongoError('connection in unlawful state ' + this.state);
+ }
+
+ var self = this;
+ // Transition to connecting state
+ stateTransition(this, CONNECTING);
+ // Create an array of the arguments
+ var args = Array.prototype.slice.call(arguments, 0);
+ // Create a connection
+ var connection = new Connection(messageHandler(self), this.options);
+ // Add to list of connections
+ this.connectingConnections.push(connection);
+ // Add listeners to the connection
+ connection.once('connect', function(connection) {
+ if(self.state == DESTROYED || self.state == DESTROYING) return self.destroy();
+
+ // Apply any store credentials
+ reauthenticate(self, connection, function(err) {
+ if(self.state == DESTROYED || self.state == DESTROYING) return self.destroy();
+
+ // We have an error emit it
+ if(err) {
+ // Destroy the pool
+ self.destroy();
+ // Emit the error
+ return self.emit('error', err);
+ }
+
+ // Authenticate
+ authenticate(self, args, connection, function(err) {
+ if(self.state == DESTROYED || self.state == DESTROYING) return self.destroy();
+
+ // We have an error emit it
+ if(err) {
+ // Destroy the pool
+ self.destroy();
+ // Emit the error
+ return self.emit('error', err);
+ }
+ // Set connected mode
+ stateTransition(self, CONNECTED);
+
+ // Move the active connection
+ moveConnectionBetween(connection, self.connectingConnections, self.availableConnections);
+
+ // Emit the connect event
+ self.emit('connect', self);
+ });
+ });
+ });
+
+ // Add error handlers
+ connection.once('error', connectionFailureHandler(this, 'error'));
+ connection.once('close', connectionFailureHandler(this, 'close'));
+ connection.once('timeout', connectionFailureHandler(this, 'timeout'));
+ connection.once('parseError', connectionFailureHandler(this, 'parseError'));
+
+ try {
+ connection.connect();
+ } catch(err) {
+ // SSL or something threw on connect
+ self.emit('error', err);
+ }
+}
+
+/**
+ * Authenticate using a specified mechanism
+ * @method
+ * @param {string} mechanism The Auth mechanism we are invoking
+ * @param {string} db The db we are invoking the mechanism against
+ * @param {...object} param Parameters for the specific mechanism
+ * @param {authResultCallback} callback A callback function
+ */
+Pool.prototype.auth = function(mechanism) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 0);
+ var callback = args.pop();
+
+ // If we don't have the mechanism fail
+ if(self.authProviders[mechanism] == null && mechanism != 'default') {
+ throw new MongoError(f("auth provider %s does not exist", mechanism));
+ }
+
+ // Signal that we are authenticating a new set of credentials
+ this.authenticating = true;
+ this.authenticatingTimestamp = new Date().getTime();
+
+ // Authenticate all live connections
+ function authenticateLiveConnections(self, args, cb) {
+ // Get the current viable connections
+ var connections = self.availableConnections;
+ // Allow nothing else to use the connections while we authenticate them
+ self.availableConnections = [];
+
+ var connectionsCount = connections.length;
+ var error = null;
+ // No connections available, return
+ if(connectionsCount == 0) return callback(null);
+ // Authenticate the connections
+ for(var i = 0; i < connections.length; i++) {
+ authenticate(self, args, connections[i], function(err) {
+ connectionsCount = connectionsCount - 1;
+
+ // Store the error
+ if(err) error = err;
+
+ // Processed all connections
+ if(connectionsCount == 0) {
+ // Auth finished
+ self.authenticating = false;
+ // Add the connections back to available connections
+ self.availableConnections = self.availableConnections.concat(connections);
+ // We had an error, return it
+ if(error) {
+ // Log the error
+ if(self.logger.isError()) {
+ self.logger.error(f('[%s] failed to authenticate against server %s:%s'
+ , self.id, self.options.host, self.options.port));
+ }
+
+ return cb(error);
+ }
+ cb(null);
+ }
+ });
+ }
+ }
+
+ // Wait for a logout in process to happen
+ function waitForLogout(self, cb) {
+ if(!self.loggingout) return cb();
+ setTimeout(function() {
+ waitForLogout(self, cb);
+ }, 1)
+ }
+
+ // Wait for loggout to finish
+ waitForLogout(self, function() {
+ // Authenticate all live connections
+ authenticateLiveConnections(self, args, function(err) {
+ // Credentials correctly stored in auth provider if successful
+ // Any new connections will now reauthenticate correctly
+ self.authenticating = false;
+ // Return after authentication connections
+ callback(err);
+ });
+ });
+}
+
+/**
+ * Logout all users against a database
+ * @method
+ * @param {string} dbName The database name
+ * @param {authResultCallback} callback A callback function
+ */
+Pool.prototype.logout = function(dbName, callback) {
+ var self = this;
+ if(typeof dbName != 'string') {
+ throw new MongoError('logout method requires a db name as first argument');
+ }
+
+ if(typeof callback != 'function') {
+ throw new MongoError('logout method requires a callback');
+ }
+
+ // Indicate logout in process
+ this.loggingout = true;
+
+ // Get all relevant connections
+ var connections = self.availableConnections.concat(self.inUseConnections);
+ var count = connections.length;
+ // Store any error
+ var error = null;
+
+ // Send logout command over all the connections
+ for(var i = 0; i < connections.length; i++) {
+ write(self)(connections[i], new Query(this.options.bson
+ , f('%s.$cmd', dbName)
+ , {logout:1}, {numberToSkip: 0, numberToReturn: 1}), function(err) {
+ count = count - 1;
+ if(err) error = err;
+
+ if(count == 0) {
+ self.loggingout = false;
+ callback(error);
+ }
+ });
+ }
+}
+
+/**
+ * Unref the pool
+ * @method
+ */
+Pool.prototype.unref = function() {
+ // Get all the known connections
+ var connections = this.availableConnections
+ .concat(this.inUseConnections)
+ .concat(this.connectingConnections);
+ connections.forEach(function(c) {
+ c.unref();
+ });
+}
+
+// Events
+var events = ['error', 'close', 'timeout', 'parseError', 'connect'];
+
+// Destroy the connections
+function destroy(self, connections) {
+ // Destroy all connections
+ connections.forEach(function(c) {
+ // Remove all listeners
+ for(var i = 0; i < events.length; i++) {
+ c.removeAllListeners(events[i]);
+ }
+ // Destroy connection
+ c.destroy();
+ });
+
+ // Zero out all connections
+ self.inUseConnections = [];
+ self.availableConnections = [];
+ self.nonAuthenticatedConnections = [];
+ self.connectingConnections = [];
+
+ // Set state to destroyed
+ stateTransition(self, DESTROYED);
+}
+
+/**
+ * Destroy pool
+ * @method
+ */
+Pool.prototype.destroy = function(force) {
+ var self = this;
+ // Do not try again if the pool is already dead
+ if(this.state == DESTROYED || self.state == DESTROYING) return;
+ // Set state to destroyed
+ stateTransition(this, DESTROYING);
+
+ // Are we force closing
+ if(force) {
+ // Get all the known connections
+ var connections = self.availableConnections
+ .concat(self.inUseConnections)
+ .concat(self.nonAuthenticatedConnections)
+ .concat(self.connectingConnections);
+ return destroy(self, connections);
+ }
+
+ // Wait for the operations to drain before we close the pool
+ function checkStatus() {
+ if(self.queue.length == 0) {
+ // Get all the known connections
+ var connections = self.availableConnections
+ .concat(self.inUseConnections)
+ .concat(self.nonAuthenticatedConnections)
+ .concat(self.connectingConnections);
+
+ // Check if we have any in flight operations
+ for(var i = 0; i < connections.length; i++) {
+ // There is an operation still in flight, reschedule a
+ // check waiting for it to drain
+ if(connections[i].workItems.length > 0) {
+ return setTimeout(checkStatus, 1);
+ }
+ }
+
+ destroy(self, connections);
+ } else {
+ setTimeout(checkStatus, 1);
+ }
+ }
+
+ // Initiate drain of operations
+ checkStatus();
+}
+
+/**
+ * Write a message to MongoDB
+ * @method
+ * @return {Connection}
+ */
+Pool.prototype.write = function(commands, options, cb) {
+ var self = this;
+ // Ensure we have a callback
+ if(typeof options == 'function') {
+ cb = options;
+ }
+
+ // Always have options
+ options = options || {};
+
+ // Pool was destroyed error out
+ if(this.state == DESTROYED || this.state == DESTROYING) {
+ // Callback with an error
+ if(cb) {
+ try {
+ cb(new MongoError('pool destroyed'));
+ } catch(err) {
+ process.nextTick(function() {
+ throw err;
+ });
+ }
+ }
+
+ return;
+ }
+
+ if(this.options.domainsEnabled
+ && process.domain && typeof cb === "function") {
+ // if we have a domain bind to it
+ var oldCb = cb;
+ cb = process.domain.bind(function() {
+ // v8 - argumentsToArray one-liner
+ var args = new Array(arguments.length); for(var i = 0; i < arguments.length; i++) { args[i] = arguments[i]; }
+ // bounce off event loop so domain switch takes place
+ process.nextTick(function() {
+ oldCb.apply(null, args);
+ });
+ });
+ }
+
+ // Do we have an operation
+ var operation = {
+ cb: cb, raw: false, promoteLongs: true, promoteValues: true, promoteBuffers: false, fullResult: false
+ };
+
+ var buffer = null
+
+ if(Array.isArray(commands)) {
+ buffer = [];
+
+ for(var i = 0; i < commands.length; i++) {
+ buffer.push(commands[i].toBin());
+ }
+
+ // Get the requestId
+ operation.requestId = commands[commands.length - 1].requestId;
+ } else {
+ operation.requestId = commands.requestId;
+ buffer = commands.toBin();
+ }
+
+ // Set the buffers
+ operation.buffer = buffer;
+
+ // Set the options for the parsing
+ operation.promoteLongs = typeof options.promoteLongs == 'boolean' ? options.promoteLongs : true;
+ operation.promoteValues = typeof options.promoteValues == 'boolean' ? options.promoteValues : true;
+ operation.promoteBuffers = typeof options.promoteBuffers == 'boolean' ? options.promoteBuffers : false;
+ operation.raw = typeof options.raw == 'boolean' ? options.raw : false;
+ operation.immediateRelease = typeof options.immediateRelease == 'boolean' ? options.immediateRelease : false;
+ operation.documentsReturnedIn = options.documentsReturnedIn;
+ operation.command = typeof options.command == 'boolean' ? options.command : false;
+ operation.fullResult = typeof options.fullResult == 'boolean' ? options.fullResult : false;
+ operation.noResponse = typeof options.noResponse == 'boolean' ? options.noResponse : false;
+ // operation.requestId = options.requestId;
+
+ // Optional per operation socketTimeout
+ operation.socketTimeout = options.socketTimeout;
+ operation.monitoring = options.monitoring;
+ // Custom socket Timeout
+ if(options.socketTimeout) {
+ operation.socketTimeout = options.socketTimeout;
+ }
+
+ // We need to have a callback function unless the message returns no response
+ if(!(typeof cb == 'function') && !options.noResponse) {
+ throw new MongoError('write method must provide a callback');
+ }
+
+ // If we have a monitoring operation schedule as the very first operation
+ // Otherwise add to back of queue
+ if(options.monitoring) {
+ this.queue.unshift(operation);
+ } else {
+ this.queue.push(operation);
+ }
+
+ // Attempt to execute the operation
+ if(!self.executing) {
+ process.nextTick(function() {
+ _execute(self)();
+ });
+ }
+}
+
+// Remove connection method
+function remove(connection, connections) {
+ for(var i = 0; i < connections.length; i++) {
+ if(connections[i] === connection) {
+ connections.splice(i, 1);
+ return true;
+ }
+ }
+}
+
+function removeConnection(self, connection) {
+ if(remove(connection, self.availableConnections)) return;
+ if(remove(connection, self.inUseConnections)) return;
+ if(remove(connection, self.connectingConnections)) return;
+ if(remove(connection, self.nonAuthenticatedConnections)) return;
+}
+
+// All event handlers
+var handlers = ["close", "message", "error", "timeout", "parseError", "connect"];
+
+function _createConnection(self) {
+ var connection = new Connection(messageHandler(self), self.options);
+
+ // Push the connection
+ self.connectingConnections.push(connection);
+
+ // Handle any errors
+ var tempErrorHandler = function(_connection) {
+ return function() {
+ // Destroy the connection
+ _connection.destroy();
+ // Remove the connection from the connectingConnections list
+ removeConnection(self, _connection);
+ // Start reconnection attempts
+ if(!self.reconnectId && self.options.reconnect) {
+ self.reconnectId = setTimeout(attemptReconnect(self), self.options.reconnectInterval);
+ }
+ }
+ }
+
+ // Handle successful connection
+ var tempConnectHandler = function(_connection) {
+ return function() {
+ // Destroyed state return
+ if(self.state == DESTROYED || self.state == DESTROYING) {
+ // Remove the connection from the list
+ removeConnection(self, _connection);
+ return _connection.destroy();
+ }
+
+ // Destroy all event emitters
+ handlers.forEach(function(e) {
+ _connection.removeAllListeners(e);
+ });
+
+ // Add the final handlers
+ _connection.once('close', connectionFailureHandler(self, 'close'));
+ _connection.once('error', connectionFailureHandler(self, 'error'));
+ _connection.once('timeout', connectionFailureHandler(self, 'timeout'));
+ _connection.once('parseError', connectionFailureHandler(self, 'parseError'));
+
+ // Signal
+ reauthenticate(self, _connection, function(err) {
+ if(self.state == DESTROYED || self.state == DESTROYING) {
+ return _connection.destroy();
+ }
+ // Remove the connection from the connectingConnections list
+ removeConnection(self, _connection);
+
+ // Handle error
+ if(err) {
+ return _connection.destroy();
+ }
+
+ // If we are authenticating at the moment
+ // Do not automatially put in available connections
+ // As we need to apply the credentials first
+ if(self.authenticating) {
+ self.nonAuthenticatedConnections.push(_connection);
+ } else {
+ // Push to available
+ self.availableConnections.push(_connection);
+ // Execute any work waiting
+ _execute(self)();
+ }
+ });
+ }
+ }
+
+ // Add all handlers
+ connection.once('close', tempErrorHandler(connection));
+ connection.once('error', tempErrorHandler(connection));
+ connection.once('timeout', tempErrorHandler(connection));
+ connection.once('parseError', tempErrorHandler(connection));
+ connection.once('connect', tempConnectHandler(connection));
+
+ // Start connection
+ connection.connect();
+}
+
+function flushMonitoringOperations(queue) {
+ for(var i = 0; i < queue.length; i++) {
+ if(queue[i].monitoring) {
+ var workItem = queue[i];
+ queue.splice(i, 1);
+ workItem.cb(new MongoError({ message: 'no connection available for monitoring', driver:true }));
+ }
+ }
+}
+
+function _execute(self) {
+ return function() {
+ if(self.state == DESTROYED) return;
+ // Already executing, skip
+ if(self.executing) return;
+ // Set pool as executing
+ self.executing = true;
+
+ // Wait for auth to clear before continuing
+ function waitForAuth(cb) {
+ if(!self.authenticating) return cb();
+ // Wait for a milisecond and try again
+ setTimeout(function() {
+ waitForAuth(cb);
+ }, 1);
+ }
+
+ // Block on any auth in process
+ waitForAuth(function() {
+ // As long as we have available connections
+ while(true) {
+ // Total availble connections
+ var totalConnections = self.availableConnections.length
+ + self.connectingConnections.length
+ + self.inUseConnections.length;
+
+ // No available connections available, flush any monitoring ops
+ if(self.availableConnections.length == 0) {
+ // Flush any monitoring operations
+ flushMonitoringOperations(self.queue);
+ break;
+ }
+
+ // No queue break
+ if(self.queue.length == 0) {
+ break;
+ }
+
+ // Get a connection
+ var connection = self.availableConnections[self.connectionIndex++ % self.availableConnections.length];
+ // Is the connection connected
+ if(connection.isConnected()) {
+ // Get the next work item
+ var workItem = self.queue.shift();
+
+ // Get actual binary commands
+ var buffer = workItem.buffer;
+
+ // Set current status of authentication process
+ workItem.authenticating = self.authenticating;
+ workItem.authenticatingTimestamp = self.authenticatingTimestamp;
+
+ // If we are monitoring take the connection of the availableConnections
+ if (workItem.monitoring) {
+ moveConnectionBetween(connection, self.availableConnections, self.inUseConnections);
+ }
+
+ // Track the executing commands on the mongo server
+ // as long as there is an expected response
+ if (! workItem.noResponse) {
+ connection.workItems.push(workItem);
+ }
+
+ // We have a custom socketTimeout
+ if(!workItem.immediateRelease && typeof workItem.socketTimeout == 'number') {
+ connection.setSocketTimeout(workItem.socketTimeout);
+ }
+
+ // Put operation on the wire
+ if(Array.isArray(buffer)) {
+ for(var i = 0; i < buffer.length; i++) {
+ connection.write(buffer[i])
+ }
+ } else {
+ connection.write(buffer);
+ }
+
+ if(workItem.immediateRelease && self.authenticating) {
+ self.nonAuthenticatedConnections.push(connection);
+ }
+
+ // Have we not reached the max connection size yet
+ if(totalConnections < self.options.size
+ && self.queue.length > 0) {
+ // Create a new connection
+ _createConnection(self);
+ }
+ } else {
+ // Remove the disconnected connection
+ removeConnection(self, connection);
+ // Flush any monitoring operations in the queue, failing fast
+ flushMonitoringOperations(self.queue);
+ }
+ }
+ });
+
+ self.executing = false;
+ }
+}
+
+// Make execution loop available for testing
+Pool._execute = _execute;
+
+/**
+ * A server connect event, used to verify that the connection is up and running
+ *
+ * @event Pool#connect
+ * @type {Pool}
+ */
+
+/**
+ * A server reconnect event, used to verify that pool reconnected.
+ *
+ * @event Pool#reconnect
+ * @type {Pool}
+ */
+
+/**
+ * The server connection closed, all pool connections closed
+ *
+ * @event Pool#close
+ * @type {Pool}
+ */
+
+/**
+ * The server connection caused an error, all pool connections closed
+ *
+ * @event Pool#error
+ * @type {Pool}
+ */
+
+/**
+ * The server connection timed out, all pool connections closed
+ *
+ * @event Pool#timeout
+ * @type {Pool}
+ */
+
+/**
+ * The driver experienced an invalid message, all pool connections closed
+ *
+ * @event Pool#parseError
+ * @type {Pool}
+ */
+
+/**
+ * The driver attempted to reconnect
+ *
+ * @event Pool#attemptReconnect
+ * @type {Pool}
+ */
+
+/**
+ * The driver exhausted all reconnect attempts
+ *
+ * @event Pool#reconnectFailed
+ * @type {Pool}
+ */
+
+module.exports = Pool;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/utils.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/utils.js
new file mode 100644
index 0000000..0a827ed
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/connection/utils.js
@@ -0,0 +1,91 @@
+"use strict";
+
+var f = require('util').format,
+ require_optional = require('require_optional');
+
+// Set property function
+var setProperty = function(obj, prop, flag, values) {
+ Object.defineProperty(obj, prop.name, {
+ enumerable:true,
+ set: function(value) {
+ if(typeof value != 'boolean') throw new Error(f("%s required a boolean", prop.name));
+ // Flip the bit to 1
+ if(value == true) values.flags |= flag;
+ // Flip the bit to 0 if it's set, otherwise ignore
+ if(value == false && (values.flags & flag) == flag) values.flags ^= flag;
+ prop.value = value;
+ }
+ , get: function() { return prop.value; }
+ });
+}
+
+// Set property function
+var getProperty = function(obj, propName, fieldName, values, func) {
+ Object.defineProperty(obj, propName, {
+ enumerable:true,
+ get: function() {
+ // Not parsed yet, parse it
+ if(values[fieldName] == null && obj.isParsed && !obj.isParsed()) {
+ obj.parse();
+ }
+
+ // Do we have a post processing function
+ if(typeof func == 'function') return func(values[fieldName]);
+ // Return raw value
+ return values[fieldName];
+ }
+ });
+}
+
+// Set simple property
+var getSingleProperty = function(obj, name, value) {
+ Object.defineProperty(obj, name, {
+ enumerable:true,
+ get: function() {
+ return value
+ }
+ });
+}
+
+// Shallow copy
+var copy = function(fObj, tObj) {
+ tObj = tObj || {};
+ for(var name in fObj) tObj[name] = fObj[name];
+ return tObj;
+}
+
+var debugOptions = function(debugFields, options) {
+ var finaloptions = {};
+ debugFields.forEach(function(n) {
+ finaloptions[n] = options[n];
+ });
+
+ return finaloptions;
+}
+
+var retrieveBSON = function() {
+ var BSON = require('bson');
+ BSON.native = false;
+
+ try {
+ try {
+ BSON = require('bson-ext');
+ BSON.native = true;
+ } catch(err) {
+ var optionalBSON = require_optional('bson-ext');
+ if(optionalBSON) {
+ optionalBSON.native = true;
+ return optionalBSON;
+ }
+ }
+ } catch(err) {}
+
+ return BSON;
+}
+
+exports.setProperty = setProperty;
+exports.getProperty = getProperty;
+exports.getSingleProperty = getSingleProperty;
+exports.copy = copy;
+exports.debugOptions = debugOptions;
+exports.retrieveBSON = retrieveBSON;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js
new file mode 100644
index 0000000..9d170d9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js
@@ -0,0 +1,696 @@
+"use strict";
+
+var Logger = require('./connection/logger')
+ , retrieveBSON = require('./connection/utils').retrieveBSON
+ , MongoError = require('./error')
+ , f = require('util').format;
+
+var BSON = retrieveBSON(),
+ Long = BSON.Long;
+
+/**
+ * This is a cursor results callback
+ *
+ * @callback resultCallback
+ * @param {error} error An error object. Set to null if no error present
+ * @param {object} document
+ */
+
+/**
+ * @fileOverview The **Cursor** class is an internal class that embodies a cursor on MongoDB
+ * allowing for iteration over the results returned from the underlying query.
+ *
+ * **CURSORS Cannot directly be instantiated**
+ * @example
+ * var Server = require('mongodb-core').Server
+ * , ReadPreference = require('mongodb-core').ReadPreference
+ * , assert = require('assert');
+ *
+ * var server = new Server({host: 'localhost', port: 27017});
+ * // Wait for the connection event
+ * server.on('connect', function(server) {
+ * assert.equal(null, err);
+ *
+ * // Execute the write
+ * var cursor = _server.cursor('integration_tests.inserts_example4', {
+ * find: 'integration_tests.example4'
+ * , query: {a:1}
+ * }, {
+ * readPreference: new ReadPreference('secondary');
+ * });
+ *
+ * // Get the first document
+ * cursor.next(function(err, doc) {
+ * assert.equal(null, err);
+ * server.destroy();
+ * });
+ * });
+ *
+ * // Start connecting
+ * server.connect();
+ */
+
+/**
+ * Creates a new Cursor, not to be used directly
+ * @class
+ * @param {object} bson An instance of the BSON parser
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {{object}|Long} cmd The selector (can be a command or a cursorId)
+ * @param {object} [options=null] Optional settings.
+ * @param {object} [options.batchSize=1000] Batchsize for the operation
+ * @param {array} [options.documents=[]] Initial documents list for cursor
+ * @param {object} [options.transforms=null] Transform methods for the cursor results
+ * @param {function} [options.transforms.query] Transform the value returned from the initial query
+ * @param {function} [options.transforms.doc] Transform each document returned from Cursor.prototype.next
+ * @param {object} topology The server topology instance.
+ * @param {object} topologyOptions The server topology options.
+ * @return {Cursor} A cursor instance
+ * @property {number} cursorBatchSize The current cursorBatchSize for the cursor
+ * @property {number} cursorLimit The current cursorLimit for the cursor
+ * @property {number} cursorSkip The current cursorSkip for the cursor
+ */
+var Cursor = function(bson, ns, cmd, options, topology, topologyOptions) {
+ options = options || {};
+
+ // Cursor pool
+ this.pool = null;
+ // Cursor server
+ this.server = null;
+
+ // Do we have a not connected handler
+ this.disconnectHandler = options.disconnectHandler;
+
+ // Set local values
+ this.bson = bson;
+ this.ns = ns;
+ this.cmd = cmd;
+ this.options = options;
+ this.topology = topology;
+
+ // All internal state
+ this.cursorState = {
+ cursorId: null
+ , cmd: cmd
+ , documents: options.documents || []
+ , cursorIndex: 0
+ , dead: false
+ , killed: false
+ , init: false
+ , notified: false
+ , limit: options.limit || cmd.limit || 0
+ , skip: options.skip || cmd.skip || 0
+ , batchSize: options.batchSize || cmd.batchSize || 1000
+ , currentLimit: 0
+ // Result field name if not a cursor (contains the array of results)
+ , transforms: options.transforms
+ }
+
+ // Add promoteLong to cursor state
+ if(typeof topologyOptions.promoteLongs == 'boolean') {
+ this.cursorState.promoteLongs = topologyOptions.promoteLongs;
+ } else if(typeof options.promoteLongs == 'boolean') {
+ this.cursorState.promoteLongs = options.promoteLongs;
+ }
+
+ // Add promoteValues to cursor state
+ if(typeof topologyOptions.promoteValues == 'boolean') {
+ this.cursorState.promoteValues = topologyOptions.promoteValues;
+ } else if(typeof options.promoteValues == 'boolean') {
+ this.cursorState.promoteValues = options.promoteValues;
+ }
+
+ // Add promoteBuffers to cursor state
+ if(typeof topologyOptions.promoteBuffers == 'boolean') {
+ this.cursorState.promoteBuffers = topologyOptions.promoteBuffers;
+ } else if(typeof options.promoteBuffers == 'boolean') {
+ this.cursorState.promoteBuffers = options.promoteBuffers;
+ }
+
+ // Logger
+ this.logger = Logger('Cursor', topologyOptions);
+
+ //
+ // Did we pass in a cursor id
+ if(typeof cmd == 'number') {
+ this.cursorState.cursorId = Long.fromNumber(cmd);
+ this.cursorState.lastCursorId = this.cursorState.cursorId;
+ } else if(cmd instanceof Long) {
+ this.cursorState.cursorId = cmd;
+ this.cursorState.lastCursorId = cmd;
+ }
+}
+
+Cursor.prototype.setCursorBatchSize = function(value) {
+ this.cursorState.batchSize = value;
+}
+
+Cursor.prototype.cursorBatchSize = function() {
+ return this.cursorState.batchSize;
+}
+
+Cursor.prototype.setCursorLimit = function(value) {
+ this.cursorState.limit = value;
+}
+
+Cursor.prototype.cursorLimit = function() {
+ return this.cursorState.limit;
+}
+
+Cursor.prototype.setCursorSkip = function(value) {
+ this.cursorState.skip = value;
+}
+
+Cursor.prototype.cursorSkip = function() {
+ return this.cursorState.skip;
+}
+
+//
+// Handle callback (including any exceptions thrown)
+var handleCallback = function(callback, err, result) {
+ try {
+ callback(err, result);
+ } catch(err) {
+ process.nextTick(function() {
+ throw err;
+ });
+ }
+}
+
+// Internal methods
+Cursor.prototype._find = function(callback) {
+ var self = this;
+
+ if(self.logger.isDebug()) {
+ self.logger.debug(f('issue initial query [%s] with flags [%s]'
+ , JSON.stringify(self.cmd)
+ , JSON.stringify(self.query)));
+ }
+
+ var queryCallback = function(err, r) {
+ if(err) return callback(err);
+
+ // Get the raw message
+ var result = r.message;
+
+ // Query failure bit set
+ if(result.queryFailure) {
+ return callback(MongoError.create(result.documents[0]), null);
+ }
+
+ // Check if we have a command cursor
+ if(Array.isArray(result.documents) && result.documents.length == 1
+ && (!self.cmd.find || (self.cmd.find && self.cmd.virtual == false))
+ && (result.documents[0].cursor != 'string'
+ || result.documents[0]['$err']
+ || result.documents[0]['errmsg']
+ || Array.isArray(result.documents[0].result))
+ ) {
+
+ // We have a an error document return the error
+ if(result.documents[0]['$err']
+ || result.documents[0]['errmsg']) {
+ return callback(MongoError.create(result.documents[0]), null);
+ }
+
+ // We have a cursor document
+ if(result.documents[0].cursor != null
+ && typeof result.documents[0].cursor != 'string') {
+ var id = result.documents[0].cursor.id;
+ // If we have a namespace change set the new namespace for getmores
+ if(result.documents[0].cursor.ns) {
+ self.ns = result.documents[0].cursor.ns;
+ }
+ // Promote id to long if needed
+ self.cursorState.cursorId = typeof id == 'number' ? Long.fromNumber(id) : id;
+ self.cursorState.lastCursorId = self.cursorState.cursorId;
+ // If we have a firstBatch set it
+ if(Array.isArray(result.documents[0].cursor.firstBatch)) {
+ self.cursorState.documents = result.documents[0].cursor.firstBatch;//.reverse();
+ }
+
+ // Return after processing command cursor
+ return callback(null, null);
+ }
+
+ if(Array.isArray(result.documents[0].result)) {
+ self.cursorState.documents = result.documents[0].result;
+ self.cursorState.cursorId = Long.ZERO;
+ return callback(null, null);
+ }
+ }
+
+ // Otherwise fall back to regular find path
+ self.cursorState.cursorId = result.cursorId;
+ self.cursorState.documents = result.documents;
+ self.cursorState.lastCursorId = result.cursorId;
+
+ // Transform the results with passed in transformation method if provided
+ if(self.cursorState.transforms && typeof self.cursorState.transforms.query == 'function') {
+ self.cursorState.documents = self.cursorState.transforms.query(result);
+ }
+
+ // Return callback
+ callback(null, null);
+ }
+
+ // Options passed to the pool
+ var queryOptions = {};
+
+ // If we have a raw query decorate the function
+ if(self.options.raw || self.cmd.raw) {
+ // queryCallback.raw = self.options.raw || self.cmd.raw;
+ queryOptions.raw = self.options.raw || self.cmd.raw;
+ }
+
+ // Do we have documentsReturnedIn set on the query
+ if(typeof self.query.documentsReturnedIn == 'string') {
+ // queryCallback.documentsReturnedIn = self.query.documentsReturnedIn;
+ queryOptions.documentsReturnedIn = self.query.documentsReturnedIn;
+ }
+
+ // Add promote Long value if defined
+ if(typeof self.cursorState.promoteLongs == 'boolean') {
+ queryOptions.promoteLongs = self.cursorState.promoteLongs;
+ }
+
+ // Add promote values if defined
+ if(typeof self.cursorState.promoteValues == 'boolean') {
+ queryOptions.promoteValues = self.cursorState.promoteValues;
+ }
+
+ // Add promote values if defined
+ if(typeof self.cursorState.promoteBuffers == 'boolean') {
+ queryOptions.promoteBuffers = self.cursorState.promoteBuffers;
+ }
+
+ // Write the initial command out
+ self.server.s.pool.write(self.query, queryOptions, queryCallback);
+}
+
+Cursor.prototype._getmore = function(callback) {
+ if(this.logger.isDebug()) this.logger.debug(f('schedule getMore call for query [%s]', JSON.stringify(this.query)))
+ // Determine if it's a raw query
+ var raw = this.options.raw || this.cmd.raw;
+
+ // Set the current batchSize
+ var batchSize = this.cursorState.batchSize;
+ if(this.cursorState.limit > 0
+ && ((this.cursorState.currentLimit + batchSize) > this.cursorState.limit)) {
+ batchSize = this.cursorState.limit - this.cursorState.currentLimit;
+ }
+
+ // Default pool
+ var pool = this.server.s.pool;
+
+ // We have a wire protocol handler
+ this.server.wireProtocolHandler.getMore(this.bson, this.ns, this.cursorState, batchSize, raw, pool, this.options, callback);
+}
+
+Cursor.prototype._killcursor = function(callback) {
+ // Set cursor to dead
+ this.cursorState.dead = true;
+ this.cursorState.killed = true;
+ // Remove documents
+ this.cursorState.documents = [];
+
+ // If no cursor id just return
+ if(this.cursorState.cursorId == null || this.cursorState.cursorId.isZero() || this.cursorState.init == false) {
+ if(callback) callback(null, null);
+ return;
+ }
+
+ // Default pool
+ var pool = this.server.s.pool;
+ // Execute command
+ this.server.wireProtocolHandler.killCursor(this.bson, this.ns, this.cursorState.cursorId, pool, callback);
+}
+
+/**
+ * Clone the cursor
+ * @method
+ * @return {Cursor}
+ */
+Cursor.prototype.clone = function() {
+ return this.topology.cursor(this.ns, this.cmd, this.options);
+}
+
+/**
+ * Checks if the cursor is dead
+ * @method
+ * @return {boolean} A boolean signifying if the cursor is dead or not
+ */
+Cursor.prototype.isDead = function() {
+ return this.cursorState.dead == true;
+}
+
+/**
+ * Checks if the cursor was killed by the application
+ * @method
+ * @return {boolean} A boolean signifying if the cursor was killed by the application
+ */
+Cursor.prototype.isKilled = function() {
+ return this.cursorState.killed == true;
+}
+
+/**
+ * Checks if the cursor notified it's caller about it's death
+ * @method
+ * @return {boolean} A boolean signifying if the cursor notified the callback
+ */
+Cursor.prototype.isNotified = function() {
+ return this.cursorState.notified == true;
+}
+
+/**
+ * Returns current buffered documents length
+ * @method
+ * @return {number} The number of items in the buffered documents
+ */
+Cursor.prototype.bufferedCount = function() {
+ return this.cursorState.documents.length - this.cursorState.cursorIndex;
+}
+
+/**
+ * Returns current buffered documents
+ * @method
+ * @return {Array} An array of buffered documents
+ */
+Cursor.prototype.readBufferedDocuments = function(number) {
+ var unreadDocumentsLength = this.cursorState.documents.length - this.cursorState.cursorIndex;
+ var length = number < unreadDocumentsLength ? number : unreadDocumentsLength;
+ var elements = this.cursorState.documents.slice(this.cursorState.cursorIndex, this.cursorState.cursorIndex + length);
+
+ // Transform the doc with passed in transformation method if provided
+ if(this.cursorState.transforms && typeof this.cursorState.transforms.doc == 'function') {
+ // Transform all the elements
+ for(var i = 0; i < elements.length; i++) {
+ elements[i] = this.cursorState.transforms.doc(elements[i]);
+ }
+ }
+
+ // Ensure we do not return any more documents than the limit imposed
+ // Just return the number of elements up to the limit
+ if(this.cursorState.limit > 0 && (this.cursorState.currentLimit + elements.length) > this.cursorState.limit) {
+ elements = elements.slice(0, (this.cursorState.limit - this.cursorState.currentLimit));
+ this.kill();
+ }
+
+ // Adjust current limit
+ this.cursorState.currentLimit = this.cursorState.currentLimit + elements.length;
+ this.cursorState.cursorIndex = this.cursorState.cursorIndex + elements.length;
+
+ // Return elements
+ return elements;
+}
+
+/**
+ * Kill the cursor
+ * @method
+ * @param {resultCallback} callback A callback function
+ */
+Cursor.prototype.kill = function(callback) {
+ this._killcursor(callback);
+}
+
+/**
+ * Resets the cursor
+ * @method
+ * @return {null}
+ */
+Cursor.prototype.rewind = function() {
+ if(this.cursorState.init) {
+ if(!this.cursorState.dead) {
+ this.kill();
+ }
+
+ this.cursorState.currentLimit = 0;
+ this.cursorState.init = false;
+ this.cursorState.dead = false;
+ this.cursorState.killed = false;
+ this.cursorState.notified = false;
+ this.cursorState.documents = [];
+ this.cursorState.cursorId = null;
+ this.cursorState.cursorIndex = 0;
+ }
+}
+
+/**
+ * Validate if the pool is dead and return error
+ */
+var isConnectionDead = function(self, callback) {
+ if(self.pool
+ && self.pool.isDestroyed()) {
+ self.cursorState.notified = true;
+ self.cursorState.killed = true;
+ self.cursorState.documents = [];
+ self.cursorState.cursorIndex = 0;
+ callback(MongoError.create(f('connection to host %s:%s was destroyed', self.pool.host, self.pool.port)))
+ return true;
+ }
+
+ return false;
+}
+
+/**
+ * Validate if the cursor is dead but was not explicitly killed by user
+ */
+var isCursorDeadButNotkilled = function(self, callback) {
+ // Cursor is dead but not marked killed, return null
+ if(self.cursorState.dead && !self.cursorState.killed) {
+ self.cursorState.notified = true;
+ self.cursorState.killed = true;
+ self.cursorState.documents = [];
+ self.cursorState.cursorIndex = 0;
+ handleCallback(callback, null, null);
+ return true;
+ }
+
+ return false;
+}
+
+/**
+ * Validate if the cursor is dead and was killed by user
+ */
+var isCursorDeadAndKilled = function(self, callback) {
+ if(self.cursorState.dead && self.cursorState.killed) {
+ handleCallback(callback, MongoError.create('cursor is dead'));
+ return true;
+ }
+
+ return false;
+}
+
+/**
+ * Validate if the cursor was killed by the user
+ */
+var isCursorKilled = function(self, callback) {
+ if(self.cursorState.killed) {
+ self.cursorState.notified = true;
+ self.cursorState.documents = [];
+ self.cursorState.cursorIndex = 0;
+ handleCallback(callback, null, null);
+ return true;
+ }
+
+ return false;
+}
+
+/**
+ * Mark cursor as being dead and notified
+ */
+var setCursorDeadAndNotified = function(self, callback) {
+ self.cursorState.dead = true;
+ self.cursorState.notified = true;
+ self.cursorState.documents = [];
+ self.cursorState.cursorIndex = 0;
+ handleCallback(callback, null, null);
+}
+
+/**
+ * Mark cursor as being notified
+ */
+var setCursorNotified = function(self, callback) {
+ self.cursorState.notified = true;
+ self.cursorState.documents = [];
+ self.cursorState.cursorIndex = 0;
+ handleCallback(callback, null, null);
+}
+
+var nextFunction = function(self, callback) {
+ // We have notified about it
+ if(self.cursorState.notified) {
+ return callback(new Error('cursor is exhausted'));
+ }
+
+ // Cursor is killed return null
+ if(isCursorKilled(self, callback)) return;
+
+ // Cursor is dead but not marked killed, return null
+ if(isCursorDeadButNotkilled(self, callback)) return;
+
+ // We have a dead and killed cursor, attempting to call next should error
+ if(isCursorDeadAndKilled(self, callback)) return;
+
+ // We have just started the cursor
+ if(!self.cursorState.init) {
+ // Topology is not connected, save the call in the provided store to be
+ // Executed at some point when the handler deems it's reconnected
+ if(!self.topology.isConnected(self.options) && self.disconnectHandler != null) {
+ if (self.topology.isDestroyed()) {
+ // Topology was destroyed, so don't try to wait for it to reconnect
+ return callback(new MongoError('Topology was destroyed'));
+ }
+ return self.disconnectHandler.addObjectAndMethod('cursor', self, 'next', [callback], callback);
+ }
+
+ try {
+ self.server = self.topology.getServer(self.options);
+ } catch(err) {
+ // Handle the error and add object to next method call
+ if(self.disconnectHandler != null) {
+ return self.disconnectHandler.addObjectAndMethod('cursor', self, 'next', [callback], callback);
+ }
+
+ // Otherwise return the error
+ return callback(err);
+ }
+
+ // Set as init
+ self.cursorState.init = true;
+
+ // Server does not support server
+ if(self.cmd
+ && self.cmd.collation
+ && self.server.ismaster.maxWireVersion < 5) {
+ return callback(new MongoError(f('server %s does not support collation', self.server.name)));
+ }
+
+ try {
+ self.query = self.server.wireProtocolHandler.command(self.bson, self.ns, self.cmd, self.cursorState, self.topology, self.options);
+ } catch(err) {
+ return callback(err);
+ }
+ }
+
+ // If we don't have a cursorId execute the first query
+ if(self.cursorState.cursorId == null) {
+ // Check if pool is dead and return if not possible to
+ // execute the query against the db
+ if(isConnectionDead(self, callback)) return;
+
+ // Check if topology is destroyed
+ if(self.topology.isDestroyed()) return callback(new MongoError('connection destroyed, not possible to instantiate cursor'));
+
+ // query, cmd, options, cursorState, callback
+ self._find(function(err) {
+ if(err) return handleCallback(callback, err, null);
+
+ if(self.cursorState.documents.length == 0
+ && self.cursorState.cursorId && self.cursorState.cursorId.isZero()
+ && !self.cmd.tailable && !self.cmd.awaitData) {
+ return setCursorNotified(self, callback);
+ }
+
+ nextFunction(self, callback);
+ });
+ } else if(self.cursorState.limit > 0 && self.cursorState.currentLimit >= self.cursorState.limit) {
+ // Ensure we kill the cursor on the server
+ self.kill();
+ // Set cursor in dead and notified state
+ return setCursorDeadAndNotified(self, callback);
+ } else if(self.cursorState.cursorIndex == self.cursorState.documents.length
+ && !Long.ZERO.equals(self.cursorState.cursorId)) {
+ // Ensure an empty cursor state
+ self.cursorState.documents = [];
+ self.cursorState.cursorIndex = 0;
+
+ // Check if topology is destroyed
+ if(self.topology.isDestroyed()) return callback(new MongoError('connection destroyed, not possible to instantiate cursor'));
+
+ // Check if connection is dead and return if not possible to
+ // execute a getmore on this connection
+ if(isConnectionDead(self, callback)) return;
+
+ // Execute the next get more
+ self._getmore(function(err, doc, connection) {
+ if(err) return handleCallback(callback, err);
+
+ // Save the returned connection to ensure all getMore's fire over the same connection
+ self.connection = connection;
+
+ // Tailable cursor getMore result, notify owner about it
+ // No attempt is made here to retry, this is left to the user of the
+ // core module to handle to keep core simple
+ if(self.cursorState.documents.length == 0
+ && self.cmd.tailable && Long.ZERO.equals(self.cursorState.cursorId)) {
+ // No more documents in the tailed cursor
+ return handleCallback(callback, MongoError.create({
+ message: 'No more documents in tailed cursor'
+ , tailable: self.cmd.tailable
+ , awaitData: self.cmd.awaitData
+ }));
+ } else if(self.cursorState.documents.length == 0
+ && self.cmd.tailable && !Long.ZERO.equals(self.cursorState.cursorId)) {
+ return nextFunction(self, callback);
+ }
+
+ if(self.cursorState.limit > 0 && self.cursorState.currentLimit >= self.cursorState.limit) {
+ return setCursorDeadAndNotified(self, callback);
+ }
+
+ nextFunction(self, callback);
+ });
+ } else if(self.cursorState.documents.length == self.cursorState.cursorIndex
+ && self.cmd.tailable && Long.ZERO.equals(self.cursorState.cursorId)) {
+ return handleCallback(callback, MongoError.create({
+ message: 'No more documents in tailed cursor'
+ , tailable: self.cmd.tailable
+ , awaitData: self.cmd.awaitData
+ }));
+ } else if(self.cursorState.documents.length == self.cursorState.cursorIndex
+ && Long.ZERO.equals(self.cursorState.cursorId)) {
+ setCursorDeadAndNotified(self, callback);
+ } else {
+ if(self.cursorState.limit > 0 && self.cursorState.currentLimit >= self.cursorState.limit) {
+ // Ensure we kill the cursor on the server
+ self.kill();
+ // Set cursor in dead and notified state
+ return setCursorDeadAndNotified(self, callback);
+ }
+
+ // Increment the current cursor limit
+ self.cursorState.currentLimit += 1;
+
+ // Get the document
+ var doc = self.cursorState.documents[self.cursorState.cursorIndex++];
+
+ // Doc overflow
+ if(doc.$err) {
+ // Ensure we kill the cursor on the server
+ self.kill();
+ // Set cursor in dead and notified state
+ return setCursorDeadAndNotified(self, function() {
+ handleCallback(callback, new MongoError(doc.$err));
+ });
+ }
+
+ // Transform the doc with passed in transformation method if provided
+ if(self.cursorState.transforms && typeof self.cursorState.transforms.doc == 'function') {
+ doc = self.cursorState.transforms.doc(doc);
+ }
+
+ // Return the document
+ handleCallback(callback, null, doc);
+ }
+}
+
+/**
+ * Retrieve the next document from the cursor
+ * @method
+ * @param {resultCallback} callback A callback function
+ */
+Cursor.prototype.next = function(callback) {
+ nextFunction(this, callback);
+}
+
+module.exports = Cursor;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/error.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/error.js
new file mode 100644
index 0000000..31ede94
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/error.js
@@ -0,0 +1,44 @@
+"use strict";
+
+/**
+ * Creates a new MongoError
+ * @class
+ * @augments Error
+ * @param {string} message The error message
+ * @return {MongoError} A MongoError instance
+ */
+function MongoError(message) {
+ this.name = 'MongoError';
+ this.message = message;
+ Error.captureStackTrace(this, MongoError);
+}
+
+/**
+ * Creates a new MongoError object
+ * @method
+ * @param {object} options The error options
+ * @return {MongoError} A MongoError instance
+ */
+MongoError.create = function(options) {
+ var err = null;
+
+ if(options instanceof Error) {
+ err = new MongoError(options.message);
+ err.stack = options.stack;
+ } else if(typeof options == 'string') {
+ err = new MongoError(options);
+ } else {
+ err = new MongoError(options.message || options.errmsg || options.$err || "n/a");
+ // Other options
+ for(var name in options) {
+ err[name] = options[name];
+ }
+ }
+
+ return err;
+}
+
+// Extend JavaScript error
+MongoError.prototype = new Error;
+
+module.exports = MongoError;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/tools/smoke_plugin.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/tools/smoke_plugin.js
new file mode 100644
index 0000000..dcceda4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/tools/smoke_plugin.js
@@ -0,0 +1,59 @@
+var fs = require('fs');
+
+/* Note: because this plugin uses process.on('uncaughtException'), only one
+ * of these can exist at any given time. This plugin and anything else that
+ * uses process.on('uncaughtException') will conflict. */
+exports.attachToRunner = function(runner, outputFile) {
+ var smokeOutput = { results : [] };
+ var runningTests = {};
+
+ var integraPlugin = {
+ beforeTest: function(test, callback) {
+ test.startTime = Date.now();
+ runningTests[test.name] = test;
+ callback();
+ },
+ afterTest: function(test, callback) {
+ smokeOutput.results.push({
+ status: test.status,
+ start: test.startTime,
+ end: Date.now(),
+ test_file: test.name,
+ exit_code: 0,
+ url: ""
+ });
+ delete runningTests[test.name];
+ callback();
+ },
+ beforeExit: function(obj, callback) {
+ fs.writeFile(outputFile, JSON.stringify(smokeOutput), function() {
+ callback();
+ });
+ }
+ };
+
+ // In case of exception, make sure we write file
+ process.on('uncaughtException', function(err) {
+ // Mark all currently running tests as failed
+ for (var testName in runningTests) {
+ smokeOutput.results.push({
+ status: "fail",
+ start: runningTests[testName].startTime,
+ end: Date.now(),
+ test_file: testName,
+ exit_code: 0,
+ url: ""
+ });
+ }
+
+ // write file
+ fs.writeFileSync(outputFile, JSON.stringify(smokeOutput));
+
+ // Standard NodeJS uncaught exception handler
+ console.error(err.stack);
+ process.exit(1);
+ });
+
+ runner.plugin(integraPlugin);
+ return integraPlugin;
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/mongos.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/mongos.js
new file mode 100644
index 0000000..d0ffcff
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/mongos.js
@@ -0,0 +1,1133 @@
+"use strict"
+
+var inherits = require('util').inherits,
+ f = require('util').format,
+ EventEmitter = require('events').EventEmitter,
+ BasicCursor = require('../cursor'),
+ Logger = require('../connection/logger'),
+ retrieveBSON = require('../connection/utils').retrieveBSON,
+ MongoError = require('../error'),
+ Server = require('./server'),
+ assign = require('./shared').assign,
+ clone = require('./shared').clone,
+ createClientInfo = require('./shared').createClientInfo;
+
+var BSON = retrieveBSON();
+
+/**
+ * @fileOverview The **Mongos** class is a class that represents a Mongos Proxy topology and is
+ * used to construct connections.
+ *
+ * @example
+ * var Mongos = require('mongodb-core').Mongos
+ * , ReadPreference = require('mongodb-core').ReadPreference
+ * , assert = require('assert');
+ *
+ * var server = new Mongos([{host: 'localhost', port: 30000}]);
+ * // Wait for the connection event
+ * server.on('connect', function(server) {
+ * server.destroy();
+ * });
+ *
+ * // Start connecting
+ * server.connect();
+ */
+
+var MongoCR = require('../auth/mongocr')
+ , X509 = require('../auth/x509')
+ , Plain = require('../auth/plain')
+ , GSSAPI = require('../auth/gssapi')
+ , SSPI = require('../auth/sspi')
+ , ScramSHA1 = require('../auth/scram');
+
+//
+// States
+var DISCONNECTED = 'disconnected';
+var CONNECTING = 'connecting';
+var CONNECTED = 'connected';
+var DESTROYED = 'destroyed';
+
+function stateTransition(self, newState) {
+ var legalTransitions = {
+ 'disconnected': [CONNECTING, DESTROYED, DISCONNECTED],
+ 'connecting': [CONNECTING, DESTROYED, CONNECTED, DISCONNECTED],
+ 'connected': [CONNECTED, DISCONNECTED, DESTROYED],
+ 'destroyed': [DESTROYED]
+ }
+
+ // Get current state
+ var legalStates = legalTransitions[self.state];
+ if(legalStates && legalStates.indexOf(newState) != -1) {
+ self.state = newState;
+ } else {
+ self.logger.error(f('Pool with id [%s] failed attempted illegal state transition from [%s] to [%s] only following state allowed [%s]'
+ , self.id, self.state, newState, legalStates));
+ }
+}
+
+//
+// ReplSet instance id
+var id = 1;
+var handlers = ['connect', 'close', 'error', 'timeout', 'parseError'];
+
+/**
+ * Creates a new Mongos instance
+ * @class
+ * @param {array} seedlist A list of seeds for the replicaset
+ * @param {number} [options.haInterval=5000] The High availability period for replicaset inquiry
+ * @param {Cursor} [options.cursorFactory=Cursor] The cursor factory class used for all query cursors
+ * @param {number} [options.size=5] Server connection pool size
+ * @param {boolean} [options.keepAlive=true] TCP Connection keep alive enabled
+ * @param {number} [options.keepAliveInitialDelay=0] Initial delay before TCP keep alive enabled
+ * @param {number} [options.localThresholdMS=15] Cutoff latency point in MS for MongoS proxy selection
+ * @param {boolean} [options.noDelay=true] TCP Connection no delay
+ * @param {number} [options.connectionTimeout=1000] TCP Connection timeout setting
+ * @param {number} [options.socketTimeout=0] TCP Socket timeout setting
+ * @param {boolean} [options.singleBufferSerializtion=true] Serialize into single buffer, trade of peak memory for serialization speed
+ * @param {boolean} [options.ssl=false] Use SSL for connection
+ * @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
+ * @param {Buffer} [options.ca] SSL Certificate store binary buffer
+ * @param {Buffer} [options.cert] SSL Certificate binary buffer
+ * @param {Buffer} [options.key] SSL Key file binary buffer
+ * @param {string} [options.passphrase] SSL Certificate pass phrase
+ * @param {string} [options.servername=null] String containing the server name requested via TLS SNI.
+ * @param {boolean} [options.rejectUnauthorized=true] Reject unauthorized server certificates
+ * @param {boolean} [options.promoteLongs=true] Convert Long values from the db into Numbers if they fit into 53 bits
+ * @param {boolean} [options.promoteValues=true] Promotes BSON values to native types where possible, set to false to only receive wrapper types.
+ * @param {boolean} [options.promoteBuffers=false] Promotes Binary BSON values to native Node Buffers.
+ * @param {boolean} [options.domainsEnabled=false] Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit.
+ * @return {Mongos} A cursor instance
+ * @fires Mongos#connect
+ * @fires Mongos#reconnect
+ * @fires Mongos#joined
+ * @fires Mongos#left
+ * @fires Mongos#failed
+ * @fires Mongos#fullsetup
+ * @fires Mongos#all
+ * @fires Mongos#serverHeartbeatStarted
+ * @fires Mongos#serverHeartbeatSucceeded
+ * @fires Mongos#serverHeartbeatFailed
+ * @fires Mongos#topologyOpening
+ * @fires Mongos#topologyClosed
+ * @fires Mongos#topologyDescriptionChanged
+ * @property {string} type the topology type.
+ * @property {string} parserType the parser type used (c++ or js).
+ */
+var Mongos = function(seedlist, options) {
+ options = options || {};
+
+ // Get replSet Id
+ this.id = id++;
+
+ // Internal state
+ this.s = {
+ options: assign({}, options),
+ // BSON instance
+ bson: options.bson || new BSON([BSON.Binary, BSON.Code, BSON.DBRef, BSON.Decimal128,
+ BSON.Double, BSON.Int32, BSON.Long, BSON.Map, BSON.MaxKey, BSON.MinKey,
+ BSON.ObjectId, BSON.BSONRegExp, BSON.Symbol, BSON.Timestamp]),
+ // Factory overrides
+ Cursor: options.cursorFactory || BasicCursor,
+ // Logger instance
+ logger: Logger('Mongos', options),
+ // Seedlist
+ seedlist: seedlist,
+ // Ha interval
+ haInterval: options.haInterval ? options.haInterval : 10000,
+ // Disconnect handler
+ disconnectHandler: options.disconnectHandler,
+ // Server selection index
+ index: 0,
+ // Connect function options passed in
+ connectOptions: {},
+ // Are we running in debug mode
+ debug: typeof options.debug == 'boolean' ? options.debug : false,
+ // localThresholdMS
+ localThresholdMS: options.localThresholdMS || 15,
+ // Client info
+ clientInfo: createClientInfo(options)
+ }
+
+ // Set the client info
+ this.s.options.clientInfo = createClientInfo(options);
+
+ // Log info warning if the socketTimeout < haInterval as it will cause
+ // a lot of recycled connections to happen.
+ if(this.s.logger.isWarn()
+ && this.s.options.socketTimeout != 0
+ && this.s.options.socketTimeout < this.s.haInterval) {
+ this.s.logger.warn(f('warning socketTimeout %s is less than haInterval %s. This might cause unnecessary server reconnections due to socket timeouts'
+ , this.s.options.socketTimeout, this.s.haInterval));
+ }
+
+ // All the authProviders
+ this.authProviders = options.authProviders || {
+ 'mongocr': new MongoCR(this.s.bson), 'x509': new X509(this.s.bson)
+ , 'plain': new Plain(this.s.bson), 'gssapi': new GSSAPI(this.s.bson)
+ , 'sspi': new SSPI(this.s.bson), 'scram-sha-1': new ScramSHA1(this.s.bson)
+ }
+
+ // Disconnected state
+ this.state = DISCONNECTED;
+
+ // Current proxies we are connecting to
+ this.connectingProxies = [];
+ // Currently connected proxies
+ this.connectedProxies = [];
+ // Disconnected proxies
+ this.disconnectedProxies = [];
+ // Are we authenticating
+ this.authenticating = false;
+ // Index of proxy to run operations against
+ this.index = 0;
+ // High availability timeout id
+ this.haTimeoutId = null;
+ // Last ismaster
+ this.ismaster = null;
+
+ // Add event listener
+ EventEmitter.call(this);
+}
+
+inherits(Mongos, EventEmitter);
+
+Object.defineProperty(Mongos.prototype, 'type', {
+ enumerable:true, get: function() { return 'mongos'; }
+});
+
+Object.defineProperty(Mongos.prototype, 'parserType', {
+ enumerable:true, get: function() {
+ return BSON.native ? "c++" : "js";
+ }
+});
+
+/**
+ * Emit event if it exists
+ * @method
+ */
+function emitSDAMEvent(self, event, description) {
+ if(self.listeners(event).length > 0) {
+ self.emit(event, description);
+ }
+}
+
+/**
+ * Initiate server connect
+ * @method
+ * @param {array} [options.auth=null] Array of auth options to apply on connect
+ */
+Mongos.prototype.connect = function(options) {
+ var self = this;
+ // Add any connect level options to the internal state
+ this.s.connectOptions = options || {};
+ // Set connecting state
+ stateTransition(this, CONNECTING);
+ // Create server instances
+ var servers = this.s.seedlist.map(function(x) {
+ return new Server(assign({}, self.s.options, x, {
+ authProviders: self.authProviders, reconnect:false, monitoring:false, inTopology: true
+ }, {
+ clientInfo: clone(self.s.clientInfo)
+ }));
+ });
+
+ // Emit the topology opening event
+ emitSDAMEvent(this, 'topologyOpening', { topologyId: this.id });
+
+ // Start all server connections
+ connectProxies(self, servers);
+}
+
+function handleEvent(self) {
+ return function() {
+ if(self.state == DESTROYED) return;
+ // Move to list of disconnectedProxies
+ moveServerFrom(self.connectedProxies, self.disconnectedProxies, this);
+ // Emit the left signal
+ self.emit('left', 'mongos', this);
+ }
+}
+
+function handleInitialConnectEvent(self, event) {
+ return function() {
+ // Destroy the instance
+ if(self.state == DESTROYED) {
+ // Move from connectingProxies
+ moveServerFrom(self.connectingProxies, self.disconnectedProxies, this);
+ return this.destroy();
+ }
+
+ // Check the type of server
+ if(event == 'connect') {
+ // Get last known ismaster
+ self.ismaster = this.lastIsMaster();
+
+ // Is this not a proxy, remove t
+ if(self.ismaster.msg == 'isdbgrid') {
+ // Add to the connectd list
+ for(var i = 0; i < self.connectedProxies.length; i++) {
+ if(self.connectedProxies[i].name == this.name) {
+ // Move from connectingProxies
+ moveServerFrom(self.connectingProxies, self.disconnectedProxies, this);
+ this.destroy();
+ return self.emit('failed', this);
+ }
+ }
+
+ // Remove the handlers
+ for(i = 0; i < handlers.length; i++) {
+ this.removeAllListeners(handlers[i]);
+ }
+
+ // Add stable state handlers
+ this.on('error', handleEvent(self, 'error'));
+ this.on('close', handleEvent(self, 'close'));
+ this.on('timeout', handleEvent(self, 'timeout'));
+ this.on('parseError', handleEvent(self, 'parseError'));
+
+ // Move from connecting proxies connected
+ moveServerFrom(self.connectingProxies, self.connectedProxies, this);
+ // Emit the joined event
+ self.emit('joined', 'mongos', this);
+ } else {
+
+ // Print warning if we did not find a mongos proxy
+ if(self.s.logger.isWarn()) {
+ var message = 'expected mongos proxy, but found replicaset member mongod for server %s';
+ // We have a standalone server
+ if(!self.ismaster.hosts) {
+ message = 'expected mongos proxy, but found standalone mongod for server %s';
+ }
+
+ self.s.logger.warn(f(message, this.name));
+ }
+
+ // This is not a mongos proxy, remove it completely
+ removeProxyFrom(self.connectingProxies, this);
+ // Emit the left event
+ self.emit('left', 'server', this);
+ // Emit failed event
+ self.emit('failed', this);
+ }
+ } else {
+ moveServerFrom(self.connectingProxies, self.disconnectedProxies, this);
+ // Emit the left event
+ self.emit('left', 'mongos', this);
+ // Emit failed event
+ self.emit('failed', this);
+ }
+
+ // Trigger topologyMonitor
+ if(self.connectingProxies.length == 0) {
+ // Emit connected if we are connected
+ if(self.connectedProxies.length > 0) {
+ // Set the state to connected
+ stateTransition(self, CONNECTED);
+ // Emit the connect event
+ self.emit('connect', self);
+ self.emit('fullsetup', self);
+ self.emit('all', self);
+ } else if(self.disconnectedProxies.length == 0) {
+ // Print warning if we did not find a mongos proxy
+ if(self.s.logger.isWarn()) {
+ self.s.logger.warn(f('no mongos proxies found in seed list, did you mean to connect to a replicaset'));
+ }
+
+ // Emit the error that no proxies were found
+ return self.emit('error', new MongoError('no mongos proxies found in seed list'));
+ }
+
+ // Topology monitor
+ topologyMonitor(self, {firstConnect:true});
+ }
+ };
+}
+
+function connectProxies(self, servers) {
+ // Update connectingProxies
+ self.connectingProxies = self.connectingProxies.concat(servers);
+
+ // Index used to interleaf the server connects, avoiding
+ // runtime issues on io constrained vm's
+ var timeoutInterval = 0;
+
+ function connect(server, timeoutInterval) {
+ setTimeout(function() {
+ // Add event handlers
+ server.once('close', handleInitialConnectEvent(self, 'close'));
+ server.once('timeout', handleInitialConnectEvent(self, 'timeout'));
+ server.once('parseError', handleInitialConnectEvent(self, 'parseError'));
+ server.once('error', handleInitialConnectEvent(self, 'error'));
+ server.once('connect', handleInitialConnectEvent(self, 'connect'));
+ // SDAM Monitoring events
+ server.on('serverOpening', function(e) { self.emit('serverOpening', e); });
+ server.on('serverDescriptionChanged', function(e) { self.emit('serverDescriptionChanged', e); });
+ server.on('serverClosed', function(e) { self.emit('serverClosed', e); });
+ // Start connection
+ server.connect(self.s.connectOptions);
+ }, timeoutInterval);
+ }
+ // Start all the servers
+ while(servers.length > 0) {
+ connect(servers.shift(), timeoutInterval++);
+ }
+}
+
+function pickProxy(self) {
+ // Get the currently connected Proxies
+ var connectedProxies = self.connectedProxies.slice(0);
+
+ // Set lower bound
+ var lowerBoundLatency = Number.MAX_VALUE;
+
+ // Determine the lower bound for the Proxies
+ for(var i = 0; i < connectedProxies.length; i++) {
+ if(connectedProxies[i].lastIsMasterMS < lowerBoundLatency) {
+ lowerBoundLatency = connectedProxies[i].lastIsMasterMS;
+ }
+ }
+
+ // Filter out the possible servers
+ connectedProxies = connectedProxies.filter(function(server) {
+ if((server.lastIsMasterMS <= (lowerBoundLatency + self.s.localThresholdMS))
+ && server.isConnected()) {
+ return true;
+ }
+ });
+
+ // We have no connectedProxies pick first of the connected ones
+ if(connectedProxies.length == 0) {
+ return self.connectedProxies[0];
+ }
+
+ // Get proxy
+ var proxy = connectedProxies[self.index % connectedProxies.length];
+ // Update the index
+ self.index = (self.index + 1) % connectedProxies.length;
+ // Return the proxy
+ return proxy;
+}
+
+function moveServerFrom(from, to, proxy) {
+ for(var i = 0; i < from.length; i++) {
+ if(from[i].name == proxy.name) {
+ from.splice(i, 1);
+ }
+ }
+
+ for(i = 0; i < to.length; i++) {
+ if(to[i].name == proxy.name) {
+ to.splice(i, 1);
+ }
+ }
+
+ to.push(proxy);
+}
+
+function removeProxyFrom(from, proxy) {
+ for(var i = 0; i < from.length; i++) {
+ if(from[i].name == proxy.name) {
+ from.splice(i, 1);
+ }
+ }
+}
+
+function reconnectProxies(self, proxies, callback) {
+ // Count lefts
+ var count = proxies.length;
+
+ // Handle events
+ var _handleEvent = function(self, event) {
+ return function() {
+ var _self = this;
+ count = count - 1;
+
+ // Destroyed
+ if(self.state == DESTROYED) {
+ moveServerFrom(self.connectingProxies, self.disconnectedProxies, _self);
+ return this.destroy();
+ }
+
+ if(event == 'connect' && !self.authenticating) {
+ // Destroyed
+ if(self.state == DESTROYED) {
+ moveServerFrom(self.connectingProxies, self.disconnectedProxies, _self);
+ return _self.destroy();
+ }
+
+ // Remove the handlers
+ for(var i = 0; i < handlers.length; i++) {
+ _self.removeAllListeners(handlers[i]);
+ }
+
+ // Add stable state handlers
+ _self.on('error', handleEvent(self, 'error'));
+ _self.on('close', handleEvent(self, 'close'));
+ _self.on('timeout', handleEvent(self, 'timeout'));
+ _self.on('parseError', handleEvent(self, 'parseError'));
+
+ // Move to the connected servers
+ moveServerFrom(self.disconnectedProxies, self.connectedProxies, _self);
+ // Emit joined event
+ self.emit('joined', 'mongos', _self);
+ } else if(event == 'connect' && self.authenticating) {
+ // Move from connectingProxies
+ moveServerFrom(self.connectingProxies, self.disconnectedProxies, _self);
+ this.destroy();
+ }
+
+ // Are we done finish up callback
+ if(count == 0) {
+ callback();
+ }
+ }
+ }
+
+ // No new servers
+ if(count == 0) {
+ return callback();
+ }
+
+ // Execute method
+ function execute(_server, i) {
+ setTimeout(function() {
+ // Destroyed
+ if(self.state == DESTROYED) {
+ return;
+ }
+
+ // Create a new server instance
+ var server = new Server(assign({}, self.s.options, {
+ host: _server.name.split(':')[0],
+ port: parseInt(_server.name.split(':')[1], 10)
+ }, {
+ authProviders: self.authProviders, reconnect:false, monitoring: false, inTopology: true
+ }, {
+ clientInfo: clone(self.s.clientInfo)
+ }));
+
+ // Add temp handlers
+ server.once('connect', _handleEvent(self, 'connect'));
+ server.once('close', _handleEvent(self, 'close'));
+ server.once('timeout', _handleEvent(self, 'timeout'));
+ server.once('error', _handleEvent(self, 'error'));
+ server.once('parseError', _handleEvent(self, 'parseError'));
+
+ // SDAM Monitoring events
+ server.on('serverOpening', function(e) { self.emit('serverOpening', e); });
+ server.on('serverDescriptionChanged', function(e) { self.emit('serverDescriptionChanged', e); });
+ server.on('serverClosed', function(e) { self.emit('serverClosed', e); });
+ server.connect(self.s.connectOptions);
+ }, i);
+ }
+
+ // Create new instances
+ for(var i = 0; i < proxies.length; i++) {
+ execute(proxies[i], i);
+ }
+}
+
+function topologyMonitor(self, options) {
+ options = options || {};
+
+ // Set momitoring timeout
+ self.haTimeoutId = setTimeout(function() {
+ if(self.state == DESTROYED) return;
+ // If we have a primary and a disconnect handler, execute
+ // buffered operations
+ if(self.isConnected() && self.s.disconnectHandler) {
+ self.s.disconnectHandler.execute();
+ }
+
+ // Get the connectingServers
+ var proxies = self.connectedProxies.slice(0);
+ // Get the count
+ var count = proxies.length;
+
+ // If the count is zero schedule a new fast
+ function pingServer(_self, _server, cb) {
+ // Measure running time
+ var start = new Date().getTime();
+
+ // Emit the server heartbeat start
+ emitSDAMEvent(self, 'serverHeartbeatStarted', { connectionId: _server.name });
+
+ // Execute ismaster
+ _server.command('admin.$cmd', {
+ ismaster:true
+ }, {
+ monitoring: true,
+ socketTimeout: self.s.options.connectionTimeout || 2000,
+ }, function(err, r) {
+ if(self.state == DESTROYED) {
+ // Move from connectingProxies
+ moveServerFrom(self.connectedProxies, self.disconnectedProxies, _server);
+ _server.destroy();
+ return cb(err, r);
+ }
+
+ // Calculate latency
+ var latencyMS = new Date().getTime() - start;
+
+ // We had an error, remove it from the state
+ if(err) {
+ // Emit the server heartbeat failure
+ emitSDAMEvent(self, 'serverHeartbeatFailed', { durationMS: latencyMS, failure: err, connectionId: _server.name });
+ // Move from connected proxies to disconnected proxies
+ moveServerFrom(self.connectedProxies, self.disconnectedProxies, _server);
+ } else {
+ // Update the server ismaster
+ _server.ismaster = r.result;
+ _server.lastIsMasterMS = latencyMS;
+
+ // Server heart beat event
+ emitSDAMEvent(self, 'serverHeartbeatSucceeded', { durationMS: latencyMS, reply: r.result, connectionId: _server.name });
+ }
+
+ cb(err, r);
+ });
+ }
+
+ // No proxies initiate monitor again
+ if(proxies.length == 0) {
+ // Emit close event if any listeners registered
+ if(self.listeners("close").length > 0 && self.state == CONNECTING) {
+ self.emit('error', new MongoError('no mongos proxy available'));
+ } else {
+ self.emit('close', self);
+ }
+
+ // Attempt to connect to any unknown servers
+ return reconnectProxies(self, self.disconnectedProxies, function() {
+ if(self.state == DESTROYED) return;
+
+ // Are we connected ? emit connect event
+ if(self.state == CONNECTING && options.firstConnect) {
+ self.emit('connect', self);
+ self.emit('fullsetup', self);
+ self.emit('all', self);
+ } else if(self.isConnected()) {
+ self.emit('reconnect', self);
+ } else if(!self.isConnected() && self.listeners("close").length > 0) {
+ self.emit('close', self);
+ }
+
+ // Perform topology monitor
+ topologyMonitor(self);
+ });
+ }
+
+ // Ping all servers
+ for(var i = 0; i < proxies.length; i++) {
+ pingServer(self, proxies[i], function() {
+ count = count - 1;
+
+ if(count == 0) {
+ if(self.state == DESTROYED) return;
+
+ // Attempt to connect to any unknown servers
+ reconnectProxies(self, self.disconnectedProxies, function() {
+ if(self.state == DESTROYED) return;
+ // Perform topology monitor
+ topologyMonitor(self);
+ });
+ }
+ });
+ }
+ }, self.s.haInterval);
+}
+
+/**
+ * Returns the last known ismaster document for this server
+ * @method
+ * @return {object}
+ */
+Mongos.prototype.lastIsMaster = function() {
+ return this.ismaster;
+}
+
+/**
+ * Unref all connections belong to this server
+ * @method
+ */
+Mongos.prototype.unref = function() {
+ // Transition state
+ stateTransition(this, DISCONNECTED);
+ // Get all proxies
+ var proxies = this.connectedProxies.concat(this.connectingProxies);
+ proxies.forEach(function(x) {
+ x.unref();
+ });
+
+ clearTimeout(this.haTimeoutId);
+}
+
+/**
+ * Destroy the server connection
+ * @param {boolean} [options.force=false] Force destroy the pool
+ * @method
+ */
+Mongos.prototype.destroy = function(options) {
+ // Transition state
+ stateTransition(this, DESTROYED);
+ // Get all proxies
+ var proxies = this.connectedProxies.concat(this.connectingProxies);
+ // Clear out any monitoring process
+ if(this.haTimeoutId) clearTimeout(this.haTimeoutId);
+
+ // Destroy all connecting servers
+ proxies.forEach(function(x) {
+ x.destroy(options);
+ });
+
+ // Emit toplogy closing event
+ emitSDAMEvent(this, 'topologyClosed', { topologyId: this.id });
+}
+
+/**
+ * Figure out if the server is connected
+ * @method
+ * @return {boolean}
+ */
+Mongos.prototype.isConnected = function() {
+ return this.connectedProxies.length > 0;
+}
+
+/**
+ * Figure out if the server instance was destroyed by calling destroy
+ * @method
+ * @return {boolean}
+ */
+Mongos.prototype.isDestroyed = function() {
+ return this.state == DESTROYED;
+}
+
+//
+// Operations
+//
+
+// Execute write operation
+var executeWriteOperation = function(self, op, ns, ops, options, callback) {
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ // Ensure we have no options
+ options = options || {};
+ // Pick a server
+ var server = pickProxy(self);
+ // No server found error out
+ if(!server) return callback(new MongoError('no mongos proxy available'));
+ // Execute the command
+ server[op](ns, ops, options, callback);
+}
+
+/**
+ * Insert one or more documents
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {array} ops An array of documents to insert
+ * @param {boolean} [options.ordered=true] Execute in order or out of order
+ * @param {object} [options.writeConcern={}] Write concern for the operation
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+Mongos.prototype.insert = function(ns, ops, options, callback) {
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ if(this.state == DESTROYED) return callback(new MongoError(f('topology was destroyed')));
+
+ // Not connected but we have a disconnecthandler
+ if(!this.isConnected() && this.s.disconnectHandler != null) {
+ return this.s.disconnectHandler.add('insert', ns, ops, options, callback);
+ }
+
+ // No mongos proxy available
+ if(!this.isConnected()) {
+ return callback(new MongoError('no mongos proxy available'));
+ }
+
+ // Execute write operation
+ executeWriteOperation(this, 'insert', ns, ops, options, callback);
+}
+
+/**
+ * Perform one or more update operations
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {array} ops An array of updates
+ * @param {boolean} [options.ordered=true] Execute in order or out of order
+ * @param {object} [options.writeConcern={}] Write concern for the operation
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+Mongos.prototype.update = function(ns, ops, options, callback) {
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ if(this.state == DESTROYED) return callback(new MongoError(f('topology was destroyed')));
+
+ // Not connected but we have a disconnecthandler
+ if(!this.isConnected() && this.s.disconnectHandler != null) {
+ return this.s.disconnectHandler.add('update', ns, ops, options, callback);
+ }
+
+ // No mongos proxy available
+ if(!this.isConnected()) {
+ return callback(new MongoError('no mongos proxy available'));
+ }
+
+ // Execute write operation
+ executeWriteOperation(this, 'update', ns, ops, options, callback);
+}
+
+/**
+ * Perform one or more remove operations
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {array} ops An array of removes
+ * @param {boolean} [options.ordered=true] Execute in order or out of order
+ * @param {object} [options.writeConcern={}] Write concern for the operation
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+Mongos.prototype.remove = function(ns, ops, options, callback) {
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ if(this.state == DESTROYED) return callback(new MongoError(f('topology was destroyed')));
+
+ // Not connected but we have a disconnecthandler
+ if(!this.isConnected() && this.s.disconnectHandler != null) {
+ return this.s.disconnectHandler.add('remove', ns, ops, options, callback);
+ }
+
+ // No mongos proxy available
+ if(!this.isConnected()) {
+ return callback(new MongoError('no mongos proxy available'));
+ }
+
+ // Execute write operation
+ executeWriteOperation(this, 'remove', ns, ops, options, callback);
+}
+
+/**
+ * Execute a command
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {object} cmd The command hash
+ * @param {ReadPreference} [options.readPreference] Specify read preference if command supports it
+ * @param {Connection} [options.connection] Specify connection object to execute command against
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+Mongos.prototype.command = function(ns, cmd, options, callback) {
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ if(this.state == DESTROYED) return callback(new MongoError(f('topology was destroyed')));
+ var self = this;
+
+ // Pick a proxy
+ var server = pickProxy(self);
+
+ // Topology is not connected, save the call in the provided store to be
+ // Executed at some point when the handler deems it's reconnected
+ if((server == null || !server.isConnected()) && this.s.disconnectHandler != null) {
+ return this.s.disconnectHandler.add('command', ns, cmd, options, callback);
+ }
+
+ // No server returned we had an error
+ if(server == null) {
+ return callback(new MongoError('no mongos proxy available'));
+ }
+
+ // Execute the command
+ server.command(ns, cmd, options, callback);
+}
+
+/**
+ * Perform one or more remove operations
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {{object}|{Long}} cmd Can be either a command returning a cursor or a cursorId
+ * @param {object} [options.batchSize=0] Batchsize for the operation
+ * @param {array} [options.documents=[]] Initial documents list for cursor
+ * @param {ReadPreference} [options.readPreference] Specify read preference if command supports it
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+Mongos.prototype.cursor = function(ns, cmd, cursorOptions) {
+ cursorOptions = cursorOptions || {};
+ var FinalCursor = cursorOptions.cursorFactory || this.s.Cursor;
+ return new FinalCursor(this.s.bson, ns, cmd, cursorOptions, this, this.s.options);
+}
+
+/**
+ * Authenticate using a specified mechanism
+ * @method
+ * @param {string} mechanism The Auth mechanism we are invoking
+ * @param {string} db The db we are invoking the mechanism against
+ * @param {...object} param Parameters for the specific mechanism
+ * @param {authResultCallback} callback A callback function
+ */
+Mongos.prototype.auth = function(mechanism, db) {
+ var allArgs = Array.prototype.slice.call(arguments, 0).slice(0);
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 2);
+ var callback = args.pop();
+
+ // If we don't have the mechanism fail
+ if(this.authProviders[mechanism] == null && mechanism != 'default') {
+ return callback(new MongoError(f("auth provider %s does not exist", mechanism)));
+ }
+
+ // Are we already authenticating, throw
+ if(this.authenticating) {
+ return callback(new MongoError('authentication or logout allready in process'));
+ }
+
+ // Topology is not connected, save the call in the provided store to be
+ // Executed at some point when the handler deems it's reconnected
+ if(!self.isConnected() && self.s.disconnectHandler != null) {
+ return self.s.disconnectHandler.add('auth', db, allArgs, {}, callback);
+ }
+
+ // Set to authenticating
+ this.authenticating = true;
+ // All errors
+ var errors = [];
+
+ // Get all the servers
+ var servers = this.connectedProxies.slice(0);
+ // No servers return
+ if(servers.length == 0) {
+ this.authenticating = false;
+ callback(null, true);
+ }
+
+ // Authenticate
+ function auth(server) {
+ // Arguments without a callback
+ var argsWithoutCallback = [mechanism, db].concat(args.slice(0));
+ // Create arguments
+ var finalArguments = argsWithoutCallback.concat([function(err) {
+ count = count - 1;
+ // Save all the errors
+ if(err) errors.push({name: server.name, err: err});
+ // We are done
+ if(count == 0) {
+ // Auth is done
+ self.authenticating = false;
+
+ // Return the auth error
+ if(errors.length) return callback(MongoError.create({
+ message: 'authentication fail', errors: errors
+ }), false);
+
+ // Successfully authenticated session
+ callback(null, self);
+ }
+ }]);
+
+ // Execute the auth only against non arbiter servers
+ if(!server.lastIsMaster().arbiterOnly) {
+ server.auth.apply(server, finalArguments);
+ }
+ }
+
+ // Get total count
+ var count = servers.length;
+ // Authenticate against all servers
+ while(servers.length > 0) {
+ auth(servers.shift());
+ }
+}
+
+/**
+ * Logout from a database
+ * @method
+ * @param {string} db The db we are logging out from
+ * @param {authResultCallback} callback A callback function
+ */
+Mongos.prototype.logout = function(dbName, callback) {
+ var self = this;
+ // Are we authenticating or logging out, throw
+ if(this.authenticating) {
+ throw new MongoError('authentication or logout allready in process');
+ }
+
+ // Ensure no new members are processed while logging out
+ this.authenticating = true;
+
+ // Remove from all auth providers (avoid any reaplication of the auth details)
+ var providers = Object.keys(this.authProviders);
+ for(var i = 0; i < providers.length; i++) {
+ this.authProviders[providers[i]].logout(dbName);
+ }
+
+ // Now logout all the servers
+ var servers = this.connectedProxies.slice(0);
+ var count = servers.length;
+ if(count == 0) return callback();
+ var errors = [];
+
+ function logoutServer(_server, cb) {
+ _server.logout(dbName, function(err) {
+ if(err) errors.push({name: _server.name, err: err});
+ cb();
+ });
+ }
+
+ // Execute logout on all server instances
+ for(i = 0; i < servers.length; i++) {
+ logoutServer(servers[i], function() {
+ count = count - 1;
+
+ if(count == 0) {
+ // Do not block new operations
+ self.authenticating = false;
+ // If we have one or more errors
+ if(errors.length) return callback(MongoError.create({
+ message: f('logout failed against db %s', dbName), errors: errors
+ }), false);
+
+ // No errors
+ callback();
+ }
+ })
+ }
+}
+
+/**
+ * Get server
+ * @method
+ * @param {ReadPreference} [options.readPreference] Specify read preference if command supports it
+ * @return {Server}
+ */
+Mongos.prototype.getServer = function() {
+ var server = pickProxy(this);
+ if(this.s.debug) this.emit('pickedServer', null, server);
+ return server;
+}
+
+/**
+ * All raw connections
+ * @method
+ * @return {Connection[]}
+ */
+Mongos.prototype.connections = function() {
+ var connections = [];
+
+ for(var i = 0; i < this.connectedProxies.length; i++) {
+ connections = connections.concat(this.connectedProxies[i].connections());
+ }
+
+ return connections;
+}
+
+/**
+ * A mongos connect event, used to verify that the connection is up and running
+ *
+ * @event Mongos#connect
+ * @type {Mongos}
+ */
+
+/**
+ * A mongos reconnect event, used to verify that the mongos topology has reconnected
+ *
+ * @event Mongos#reconnect
+ * @type {Mongos}
+ */
+
+/**
+ * A mongos fullsetup event, used to signal that all topology members have been contacted.
+ *
+ * @event Mongos#fullsetup
+ * @type {Mongos}
+ */
+
+/**
+ * A mongos all event, used to signal that all topology members have been contacted.
+ *
+ * @event Mongos#all
+ * @type {Mongos}
+ */
+
+/**
+ * A server member left the mongos list
+ *
+ * @event Mongos#left
+ * @type {Mongos}
+ * @param {string} type The type of member that left (mongos)
+ * @param {Server} server The server object that left
+ */
+
+/**
+ * A server member joined the mongos list
+ *
+ * @event Mongos#joined
+ * @type {Mongos}
+ * @param {string} type The type of member that left (mongos)
+ * @param {Server} server The server object that joined
+ */
+
+/**
+ * A server opening SDAM monitoring event
+ *
+ * @event Mongos#serverOpening
+ * @type {object}
+ */
+
+/**
+ * A server closed SDAM monitoring event
+ *
+ * @event Mongos#serverClosed
+ * @type {object}
+ */
+
+/**
+ * A server description SDAM change monitoring event
+ *
+ * @event Mongos#serverDescriptionChanged
+ * @type {object}
+ */
+
+/**
+ * A topology open SDAM event
+ *
+ * @event Mongos#topologyOpening
+ * @type {object}
+ */
+
+/**
+ * A topology closed SDAM event
+ *
+ * @event Mongos#topologyClosed
+ * @type {object}
+ */
+
+/**
+ * A topology structure SDAM change event
+ *
+ * @event Mongos#topologyDescriptionChanged
+ * @type {object}
+ */
+
+/**
+ * A topology serverHeartbeatStarted SDAM event
+ *
+ * @event Mongos#serverHeartbeatStarted
+ * @type {object}
+ */
+
+/**
+ * A topology serverHeartbeatFailed SDAM event
+ *
+ * @event Mongos#serverHeartbeatFailed
+ * @type {object}
+ */
+
+/**
+ * A topology serverHeartbeatSucceeded SDAM change event
+ *
+ * @event Mongos#serverHeartbeatSucceeded
+ * @type {object}
+ */
+
+module.exports = Mongos;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/read_preference.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/read_preference.js
new file mode 100644
index 0000000..1f10dd9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/read_preference.js
@@ -0,0 +1,118 @@
+"use strict";
+
+var needSlaveOk = ['primaryPreferred', 'secondary', 'secondaryPreferred', 'nearest'];
+
+/**
+ * @fileOverview The **ReadPreference** class is a class that represents a MongoDB ReadPreference and is
+ * used to construct connections.
+ *
+ * @example
+ * var ReplSet = require('mongodb-core').ReplSet
+ * , ReadPreference = require('mongodb-core').ReadPreference
+ * , assert = require('assert');
+ *
+ * var server = new ReplSet([{host: 'localhost', port: 30000}], {setName: 'rs'});
+ * // Wait for the connection event
+ * server.on('connect', function(server) {
+ * var cursor = server.cursor('db.test'
+ * , {find: 'db.test', query: {}}
+ * , {readPreference: new ReadPreference('secondary')});
+ * cursor.next(function(err, doc) {
+ * server.destroy();
+ * });
+ * });
+ *
+ * // Start connecting
+ * server.connect();
+ */
+
+/**
+ * Creates a new Pool instance
+ * @class
+ * @param {string} preference A string describing the preference (primary|primaryPreferred|secondary|secondaryPreferred|nearest)
+ * @param {array} tags The tags object
+ * @param {object} [options] Additional read preference options
+ * @param {number} [options.maxStalenessSeconds] Max Secondary Read Stalleness in Seconds, Minimum value is 90 seconds.
+ * @property {string} preference The preference string (primary|primaryPreferred|secondary|secondaryPreferred|nearest)
+ * @property {array} tags The tags object
+ * @property {object} options Additional read preference options
+ * @property {number} maxStalenessSeconds MaxStalenessSeconds value for the read preference
+ * @return {ReadPreference}
+ */
+var ReadPreference = function(preference, tags, options) {
+ this.preference = preference;
+ this.tags = tags;
+ this.options = options;
+
+ // Add the maxStalenessSeconds value to the read Preference
+ if(this.options && this.options.maxStalenessSeconds != null) {
+ this.options = options;
+ this.maxStalenessSeconds = this.options.maxStalenessSeconds >= 0
+ ? this.options.maxStalenessSeconds : null;
+ } else if(tags && typeof tags == 'object') {
+ this.options = tags, tags = null;
+ }
+}
+
+/**
+ * This needs slaveOk bit set
+ * @method
+ * @return {boolean}
+ */
+ReadPreference.prototype.slaveOk = function() {
+ return needSlaveOk.indexOf(this.preference) != -1;
+}
+
+/**
+ * Are the two read preference equal
+ * @method
+ * @return {boolean}
+ */
+ReadPreference.prototype.equals = function(readPreference) {
+ return readPreference.preference == this.preference;
+}
+
+/**
+ * Return JSON representation
+ * @method
+ * @return {Object}
+ */
+ReadPreference.prototype.toJSON = function() {
+ var readPreference = {mode: this.preference};
+ if(Array.isArray(this.tags)) readPreference.tags = this.tags;
+ if(this.maxStalenessSeconds) readPreference.maxStalenessSeconds = this.maxStalenessSeconds;
+ return readPreference;
+}
+
+/**
+ * Primary read preference
+ * @method
+ * @return {ReadPreference}
+ */
+ReadPreference.primary = new ReadPreference('primary');
+/**
+ * Primary Preferred read preference
+ * @method
+ * @return {ReadPreference}
+ */
+ReadPreference.primaryPreferred = new ReadPreference('primaryPreferred');
+/**
+ * Secondary read preference
+ * @method
+ * @return {ReadPreference}
+ */
+ReadPreference.secondary = new ReadPreference('secondary');
+/**
+ * Secondary Preferred read preference
+ * @method
+ * @return {ReadPreference}
+ */
+ReadPreference.secondaryPreferred = new ReadPreference('secondaryPreferred');
+/**
+ * Nearest read preference
+ * @method
+ * @return {ReadPreference}
+ */
+ReadPreference.nearest = new ReadPreference('nearest');
+
+module.exports = ReadPreference;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/replset.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/replset.js
new file mode 100644
index 0000000..0082da8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/replset.js
@@ -0,0 +1,1403 @@
+"use strict"
+
+var inherits = require('util').inherits,
+ f = require('util').format,
+ EventEmitter = require('events').EventEmitter,
+ ReadPreference = require('./read_preference'),
+ BasicCursor = require('../cursor'),
+ retrieveBSON = require('../connection/utils').retrieveBSON,
+ Logger = require('../connection/logger'),
+ MongoError = require('../error'),
+ Server = require('./server'),
+ ReplSetState = require('./replset_state'),
+ assign = require('./shared').assign,
+ clone = require('./shared').clone,
+ createClientInfo = require('./shared').createClientInfo;
+
+var MongoCR = require('../auth/mongocr')
+ , X509 = require('../auth/x509')
+ , Plain = require('../auth/plain')
+ , GSSAPI = require('../auth/gssapi')
+ , SSPI = require('../auth/sspi')
+ , ScramSHA1 = require('../auth/scram');
+
+var BSON = retrieveBSON();
+
+//
+// States
+var DISCONNECTED = 'disconnected';
+var CONNECTING = 'connecting';
+var CONNECTED = 'connected';
+var DESTROYED = 'destroyed';
+
+function stateTransition(self, newState) {
+ var legalTransitions = {
+ 'disconnected': [CONNECTING, DESTROYED, DISCONNECTED],
+ 'connecting': [CONNECTING, DESTROYED, CONNECTED, DISCONNECTED],
+ 'connected': [CONNECTED, DISCONNECTED, DESTROYED],
+ 'destroyed': [DESTROYED]
+ }
+
+ // Get current state
+ var legalStates = legalTransitions[self.state];
+ if(legalStates && legalStates.indexOf(newState) != -1) {
+ self.state = newState;
+ } else {
+ self.logger.error(f('Pool with id [%s] failed attempted illegal state transition from [%s] to [%s] only following state allowed [%s]'
+ , self.id, self.state, newState, legalStates));
+ }
+}
+
+//
+// ReplSet instance id
+var id = 1;
+var handlers = ['connect', 'close', 'error', 'timeout', 'parseError'];
+
+/**
+ * Creates a new Replset instance
+ * @class
+ * @param {array} seedlist A list of seeds for the replicaset
+ * @param {boolean} options.setName The Replicaset set name
+ * @param {boolean} [options.secondaryOnlyConnectionAllowed=false] Allow connection to a secondary only replicaset
+ * @param {number} [options.haInterval=10000] The High availability period for replicaset inquiry
+ * @param {boolean} [options.emitError=false] Server will emit errors events
+ * @param {Cursor} [options.cursorFactory=Cursor] The cursor factory class used for all query cursors
+ * @param {number} [options.size=5] Server connection pool size
+ * @param {boolean} [options.keepAlive=true] TCP Connection keep alive enabled
+ * @param {number} [options.keepAliveInitialDelay=0] Initial delay before TCP keep alive enabled
+ * @param {boolean} [options.noDelay=true] TCP Connection no delay
+ * @param {number} [options.connectionTimeout=10000] TCP Connection timeout setting
+ * @param {number} [options.socketTimeout=0] TCP Socket timeout setting
+ * @param {boolean} [options.singleBufferSerializtion=true] Serialize into single buffer, trade of peak memory for serialization speed
+ * @param {boolean} [options.ssl=false] Use SSL for connection
+ * @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
+ * @param {Buffer} [options.ca] SSL Certificate store binary buffer
+ * @param {Buffer} [options.cert] SSL Certificate binary buffer
+ * @param {Buffer} [options.key] SSL Key file binary buffer
+ * @param {string} [options.passphrase] SSL Certificate pass phrase
+ * @param {string} [options.servername=null] String containing the server name requested via TLS SNI.
+ * @param {boolean} [options.rejectUnauthorized=true] Reject unauthorized server certificates
+ * @param {boolean} [options.promoteLongs=true] Convert Long values from the db into Numbers if they fit into 53 bits
+ * @param {boolean} [options.promoteValues=true] Promotes BSON values to native types where possible, set to false to only receive wrapper types.
+ * @param {boolean} [options.promoteBuffers=false] Promotes Binary BSON values to native Node Buffers.
+ * @param {number} [options.pingInterval=5000] Ping interval to check the response time to the different servers
+ * @param {number} [options.localThresholdMS=15] Cutoff latency point in MS for MongoS proxy selection
+ * @param {boolean} [options.domainsEnabled=false] Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit.
+ * @return {ReplSet} A cursor instance
+ * @fires ReplSet#connect
+ * @fires ReplSet#ha
+ * @fires ReplSet#joined
+ * @fires ReplSet#left
+ * @fires ReplSet#failed
+ * @fires ReplSet#fullsetup
+ * @fires ReplSet#all
+ * @fires ReplSet#error
+ * @fires ReplSet#serverHeartbeatStarted
+ * @fires ReplSet#serverHeartbeatSucceeded
+ * @fires ReplSet#serverHeartbeatFailed
+ * @fires ReplSet#topologyOpening
+ * @fires ReplSet#topologyClosed
+ * @fires ReplSet#topologyDescriptionChanged
+ * @property {string} type the topology type.
+ * @property {string} parserType the parser type used (c++ or js).
+ */
+var ReplSet = function(seedlist, options) {
+ var self = this;
+ options = options || {};
+
+ // Validate seedlist
+ if(!Array.isArray(seedlist)) throw new MongoError("seedlist must be an array");
+ // Validate list
+ if(seedlist.length == 0) throw new MongoError("seedlist must contain at least one entry");
+ // Validate entries
+ seedlist.forEach(function(e) {
+ if(typeof e.host != 'string' || typeof e.port != 'number')
+ throw new MongoError("seedlist entry must contain a host and port");
+ });
+
+ // Add event listener
+ EventEmitter.call(this);
+
+ // Get replSet Id
+ this.id = id++;
+
+ // Get the localThresholdMS
+ var localThresholdMS = options.localThresholdMS || 15;
+ // Backward compatibility
+ if(options.acceptableLatency) localThresholdMS = options.acceptableLatency;
+
+ // Create a logger
+ var logger = Logger('ReplSet', options);
+
+ // Internal state
+ this.s = {
+ options: assign({}, options),
+ // BSON instance
+ bson: options.bson || new BSON([BSON.Binary, BSON.Code, BSON.DBRef, BSON.Decimal128,
+ BSON.Double, BSON.Int32, BSON.Long, BSON.Map, BSON.MaxKey, BSON.MinKey,
+ BSON.ObjectId, BSON.BSONRegExp, BSON.Symbol, BSON.Timestamp]),
+ // Factory overrides
+ Cursor: options.cursorFactory || BasicCursor,
+ // Logger instance
+ logger: logger,
+ // Seedlist
+ seedlist: seedlist,
+ // Replicaset state
+ replicaSetState: new ReplSetState({
+ id: this.id, setName: options.setName,
+ acceptableLatency: localThresholdMS,
+ heartbeatFrequencyMS: options.haInterval ? options.haInterval : 10000,
+ logger: logger
+ }),
+ // Current servers we are connecting to
+ connectingServers: [],
+ // Ha interval
+ haInterval: options.haInterval ? options.haInterval : 10000,
+ // Minimum heartbeat frequency used if we detect a server close
+ minHeartbeatFrequencyMS: 500,
+ // Disconnect handler
+ disconnectHandler: options.disconnectHandler,
+ // Server selection index
+ index: 0,
+ // Connect function options passed in
+ connectOptions: {},
+ // Are we running in debug mode
+ debug: typeof options.debug == 'boolean' ? options.debug : false,
+ // Client info
+ clientInfo: createClientInfo(options)
+ }
+
+ // Add handler for topology change
+ this.s.replicaSetState.on('topologyDescriptionChanged', function(r) { self.emit('topologyDescriptionChanged', r); });
+
+ // Log info warning if the socketTimeout < haInterval as it will cause
+ // a lot of recycled connections to happen.
+ if(this.s.logger.isWarn()
+ && this.s.options.socketTimeout != 0
+ && this.s.options.socketTimeout < this.s.haInterval) {
+ this.s.logger.warn(f('warning socketTimeout %s is less than haInterval %s. This might cause unnecessary server reconnections due to socket timeouts'
+ , this.s.options.socketTimeout, this.s.haInterval));
+ }
+
+ // All the authProviders
+ this.authProviders = options.authProviders || {
+ 'mongocr': new MongoCR(this.s.bson), 'x509': new X509(this.s.bson)
+ , 'plain': new Plain(this.s.bson), 'gssapi': new GSSAPI(this.s.bson)
+ , 'sspi': new SSPI(this.s.bson), 'scram-sha-1': new ScramSHA1(this.s.bson)
+ }
+
+ // Add forwarding of events from state handler
+ var types = ['joined', 'left'];
+ types.forEach(function(x) {
+ self.s.replicaSetState.on(x, function(t, s) {
+ if(self.state === CONNECTED && x === 'joined' && t == 'primary') {
+ self.emit('reconnect', self);
+ }
+
+ self.emit(x, t, s);
+ });
+ });
+
+ // Connect stat
+ this.initialConnectState = {
+ connect: false, fullsetup: false, all: false
+ }
+
+ // Disconnected state
+ this.state = DISCONNECTED;
+ this.haTimeoutId = null;
+ // Are we authenticating
+ this.authenticating = false;
+ // Last ismaster
+ this.ismaster = null;
+}
+
+inherits(ReplSet, EventEmitter);
+
+Object.defineProperty(ReplSet.prototype, 'type', {
+ enumerable:true, get: function() { return 'replset'; }
+});
+
+Object.defineProperty(ReplSet.prototype, 'parserType', {
+ enumerable:true, get: function() {
+ return BSON.native ? "c++" : "js";
+ }
+});
+
+function attemptReconnect(self) {
+ if(self.runningAttempReconnect) return;
+ // Set as running
+ self.runningAttempReconnect = true;
+ // Wait before execute
+ self.haTimeoutId = setTimeout(function() {
+ if(self.state == DESTROYED) return;
+
+ // Debug log
+ if(self.s.logger.isDebug()) {
+ self.s.logger.debug(f('attemptReconnect for replset with id %s', self.id));
+ }
+
+ // Get all known hosts
+ var keys = Object.keys(self.s.replicaSetState.set);
+ var servers = keys.map(function(x) {
+ return new Server(assign({}, self.s.options, {
+ host: x.split(':')[0], port: parseInt(x.split(':')[1], 10)
+ }, {
+ authProviders: self.authProviders, reconnect:false, monitoring: false, inTopology: true
+ }, {
+ clientInfo: clone(self.s.clientInfo)
+ }));
+ });
+
+ // Create the list of servers
+ self.s.connectingServers = servers.slice(0);
+
+ // Handle all events coming from servers
+ function _handleEvent(self, event) {
+ return function() {
+ // Destroy the instance
+ if(self.state == DESTROYED) {
+ return this.destroy();
+ }
+
+ // Debug log
+ if(self.s.logger.isDebug()) {
+ self.s.logger.debug(f('attemptReconnect for replset with id %s using server %s ended with event %s', self.id, this.name, event));
+ }
+
+ // Check if we are done
+ function done() {
+ // Done with the reconnection attempt
+ if(self.s.connectingServers.length == 0) {
+ if(self.state == DESTROYED) return;
+
+ // If we have a primary and a disconnect handler, execute
+ // buffered operations
+ if(self.s.replicaSetState.hasPrimaryAndSecondary() && self.s.disconnectHandler) {
+ self.s.disconnectHandler.execute();
+ } else if(self.s.replicaSetState.hasPrimary() && self.s.disconnectHandler) {
+ self.s.disconnectHandler.execute({ executePrimary:true });
+ } else if(self.s.replicaSetState.hasSecondary() && self.s.disconnectHandler) {
+ self.s.disconnectHandler.execute({ executeSecondary:true });
+ }
+
+ // Do we have a primary
+ if(self.s.replicaSetState.hasPrimary()) {
+ // Emit reconnect as new primary was discovered
+ self.emit('reconnect', self);
+
+ // Connect any missing servers
+ connectNewServers(self, self.s.replicaSetState.unknownServers, function() {
+ // Debug log
+ if(self.s.logger.isDebug()) {
+ self.s.logger.debug(f('attemptReconnect for replset with id successful resuming topologyMonitor', self.id));
+ }
+
+ // Reset the running
+ self.runningAttempReconnect = false;
+
+ // Go back to normal topology monitoring
+ // Schedule a topology monitoring sweep
+ setTimeout(function() {
+ topologyMonitor(self);
+ }, self.s.haInterval);
+ });
+ } else {
+ if(self.listeners("close").length > 0) {
+ self.emit('close', self);
+ }
+
+ // Reset the running
+ self.runningAttempReconnect = false;
+ // Attempt a new reconnect
+ attemptReconnect(self);
+ }
+ }
+ }
+
+ // Remove the server from our list
+ for(var i = 0; i < self.s.connectingServers.length; i++) {
+ if(self.s.connectingServers[i].equals(this)) {
+ self.s.connectingServers.splice(i, 1);
+ }
+ }
+
+ // Keep reference to server
+ var _self = this;
+
+ // Debug log
+ if(self.s.logger.isDebug()) {
+ self.s.logger.debug(f('attemptReconnect in replset with id %s for', self.id));
+ }
+
+ // Connect and not authenticating
+ if(event == 'connect' && !self.authenticating) {
+ if(self.state == DESTROYED) {
+ return _self.destroy();
+ }
+
+ // Update the replicaset state
+ if(self.s.replicaSetState.update(_self)) {
+ // Primary lastIsMaster store it
+ if(_self.lastIsMaster() && _self.lastIsMaster().ismaster) {
+ self.ismaster = _self.lastIsMaster();
+ }
+
+ // Remove the handlers
+ for(i = 0; i < handlers.length; i++) {
+ _self.removeAllListeners(handlers[i]);
+ }
+
+ // Add stable state handlers
+ _self.on('error', handleEvent(self, 'error'));
+ _self.on('close', handleEvent(self, 'close'));
+ _self.on('timeout', handleEvent(self, 'timeout'));
+ _self.on('parseError', handleEvent(self, 'parseError'));
+ } else {
+ _self.destroy();
+ }
+ } else if(event == 'connect' && self.authenticating) {
+ this.destroy();
+ }
+
+ done();
+ }
+ }
+
+ // Index used to interleaf the server connects, avoiding
+ // runtime issues on io constrained vm's
+ var timeoutInterval = 0;
+
+ function connect(server, timeoutInterval) {
+ setTimeout(function() {
+ server.once('connect', _handleEvent(self, 'connect'));
+ server.once('close', _handleEvent(self, 'close'));
+ server.once('timeout', _handleEvent(self, 'timeout'));
+ server.once('error', _handleEvent(self, 'error'));
+ server.once('parseError', _handleEvent(self, 'parseError'));
+
+ // SDAM Monitoring events
+ server.on('serverOpening', function(e) { self.emit('serverOpening', e); });
+ server.on('serverDescriptionChanged', function(e) { self.emit('serverDescriptionChanged', e); });
+ server.on('serverClosed', function(e) { self.emit('serverClosed', e); });
+
+ server.connect(self.s.connectOptions);
+ }, timeoutInterval);
+ }
+
+ // Connect all servers
+ while(servers.length > 0) {
+ connect(servers.shift(), timeoutInterval++);
+ }
+ }, self.s.minHeartbeatFrequencyMS);
+}
+
+function connectNewServers(self, servers, callback) {
+ // Count lefts
+ var count = servers.length;
+
+ // Handle events
+ var _handleEvent = function(self, event) {
+ return function() {
+ var _self = this;
+ count = count - 1;
+
+ // Destroyed
+ if(self.state == DESTROYED) {
+ return this.destroy();
+ }
+
+ if(event == 'connect' && !self.authenticating) {
+ // Destroyed
+ if(self.state == DESTROYED) {
+ return _self.destroy();
+ }
+
+ var result = self.s.replicaSetState.update(_self);
+ // Update the state with the new server
+ if(result) {
+ // Primary lastIsMaster store it
+ if(_self.lastIsMaster() && _self.lastIsMaster().ismaster) {
+ self.ismaster = _self.lastIsMaster();
+ }
+
+ // Remove the handlers
+ for(var i = 0; i < handlers.length; i++) {
+ _self.removeAllListeners(handlers[i]);
+ }
+
+ // Add stable state handlers
+ _self.on('error', handleEvent(self, 'error'));
+ _self.on('close', handleEvent(self, 'close'));
+ _self.on('timeout', handleEvent(self, 'timeout'));
+ _self.on('parseError', handleEvent(self, 'parseError'));
+ } else {
+ _self.destroy();
+ }
+ } else if(event == 'connect' && self.authenticating) {
+ this.destroy();
+ }
+
+ // Are we done finish up callback
+ if(count == 0) { callback(); }
+ }
+ }
+
+ // No new servers
+ if(count == 0) return callback();
+
+ // Execute method
+ function execute(_server, i) {
+ setTimeout(function() {
+ // Destroyed
+ if(self.state == DESTROYED) {
+ return;
+ }
+
+ // Create a new server instance
+ var server = new Server(assign({}, self.s.options, {
+ host: _server.split(':')[0],
+ port: parseInt(_server.split(':')[1], 10)
+ }, {
+ authProviders: self.authProviders, reconnect:false, monitoring: false, inTopology: true
+ }, {
+ clientInfo: clone(self.s.clientInfo)
+ }));
+
+ // Add temp handlers
+ server.once('connect', _handleEvent(self, 'connect'));
+ server.once('close', _handleEvent(self, 'close'));
+ server.once('timeout', _handleEvent(self, 'timeout'));
+ server.once('error', _handleEvent(self, 'error'));
+ server.once('parseError', _handleEvent(self, 'parseError'));
+
+ // SDAM Monitoring events
+ server.on('serverOpening', function(e) { self.emit('serverOpening', e); });
+ server.on('serverDescriptionChanged', function(e) { self.emit('serverDescriptionChanged', e); });
+ server.on('serverClosed', function(e) { self.emit('serverClosed', e); });
+ server.connect(self.s.connectOptions);
+ }, i);
+ }
+
+ // Create new instances
+ for(var i = 0; i < servers.length; i++) {
+ execute(servers[i], i);
+ }
+}
+
+function topologyMonitor(self, options) {
+ options = options || {};
+
+ // Set momitoring timeout
+ self.haTimeoutId = setTimeout(function() {
+ if(self.state == DESTROYED) return;
+
+ // Is this a on connect topology discovery
+ // Schedule a proper topology monitoring to happen
+ // To ensure any discovered servers do not timeout
+ // while waiting for the initial discovery to happen.
+ if(options.haInterval) {
+ topologyMonitor(self);
+ }
+
+ // If we have a primary and a disconnect handler, execute
+ // buffered operations
+ if(self.s.replicaSetState.hasPrimaryAndSecondary() && self.s.disconnectHandler) {
+ self.s.disconnectHandler.execute();
+ } else if(self.s.replicaSetState.hasPrimary() && self.s.disconnectHandler) {
+ self.s.disconnectHandler.execute({ executePrimary:true });
+ } else if(self.s.replicaSetState.hasSecondary() && self.s.disconnectHandler) {
+ self.s.disconnectHandler.execute({ executeSecondary:true });
+ }
+
+ // Get the connectingServers
+ var connectingServers = self.s.replicaSetState.allServers();
+ // Debug log
+ if(self.s.logger.isDebug()) {
+ self.s.logger.debug(f('topologyMonitor in replset with id %s connected servers [%s]'
+ , self.id
+ , connectingServers.map(function(x) {
+ return x.name;
+ })));
+ }
+ // Get the count
+ var count = connectingServers.length;
+
+ // If we have no servers connected
+ if(count == 0 && !options.haInterval) {
+ if(self.listeners("close").length > 0) {
+ self.emit('close', self);
+ }
+
+ return attemptReconnect(self);
+ }
+
+ // If the count is zero schedule a new fast
+ function pingServer(_self, _server, cb) {
+ // Measure running time
+ var start = new Date().getTime();
+
+ // Emit the server heartbeat start
+ emitSDAMEvent(self, 'serverHeartbeatStarted', { connectionId: _server.name });
+ // Execute ismaster
+ // Set the socketTimeout for a monitoring message to a low number
+ // Ensuring ismaster calls are timed out quickly
+ _server.command('admin.$cmd', {
+ ismaster:true
+ }, {
+ monitoring: true,
+ socketTimeout: self.s.options.connectionTimeout || 2000,
+ }, function(err, r) {
+ if(self.state == DESTROYED) {
+ _server.destroy();
+ return cb(err, r);
+ }
+
+ // Calculate latency
+ var latencyMS = new Date().getTime() - start;
+
+ // Set the last updatedTime
+ var hrTime = process.hrtime();
+ // Calculate the last update time
+ _server.lastUpdateTime = hrTime[0] * 1000 + Math.round(hrTime[1]/1000);
+
+ // We had an error, remove it from the state
+ if(err) {
+ // Emit the server heartbeat failure
+ emitSDAMEvent(self, 'serverHeartbeatFailed', { durationMS: latencyMS, failure: err, connectionId: _server.name });
+ // Remove server from the state
+ _self.s.replicaSetState.remove(_server);
+ } else {
+ // Update the server ismaster
+ _server.ismaster = r.result;
+
+ // Check if we have a lastWriteDate convert it to MS
+ // and store on the server instance for later use
+ if(_server.ismaster.lastWrite && _server.ismaster.lastWrite.lastWriteDate) {
+ _server.lastWriteDate = _server.ismaster.lastWrite.lastWriteDate.getTime();
+ }
+
+ // Do we have a brand new server
+ if(_server.lastIsMasterMS == -1) {
+ _server.lastIsMasterMS = latencyMS;
+ } else if(_server.lastIsMasterMS) {
+ // After the first measurement, average RTT MUST be computed using an
+ // exponentially-weighted moving average formula, with a weighting factor (alpha) of 0.2.
+ // If the prior average is denoted old_rtt, then the new average (new_rtt) is
+ // computed from a new RTT measurement (x) using the following formula:
+ // alpha = 0.2
+ // new_rtt = alpha * x + (1 - alpha) * old_rtt
+ _server.lastIsMasterMS = 0.2 * latencyMS + (1 - 0.2) * _server.lastIsMasterMS;
+ }
+
+ if(_self.s.replicaSetState.update(_server)) {
+ // Primary lastIsMaster store it
+ if(_server.lastIsMaster() && _server.lastIsMaster().ismaster) {
+ self.ismaster = _server.lastIsMaster();
+ }
+ }
+
+ // Server heart beat event
+ emitSDAMEvent(self, 'serverHeartbeatSucceeded', { durationMS: latencyMS, reply: r.result, connectionId: _server.name });
+ }
+
+ // Calculate the stalness for this server
+ self.s.replicaSetState.updateServerMaxStaleness(_server, self.s.haInterval);
+
+ // Callback
+ cb(err, r);
+ });
+ }
+
+ // Connect any missing servers
+ function connectMissingServers() {
+ if(self.state == DESTROYED) return;
+
+ // Attempt to connect to any unknown servers
+ connectNewServers(self, self.s.replicaSetState.unknownServers, function() {
+ if(self.state == DESTROYED) return;
+
+ // Check if we have an options.haInterval (meaning it was triggered from connect)
+ if(options.haInterval) {
+ // Do we have a primary and secondary
+ if(self.state == CONNECTING
+ && self.s.replicaSetState.hasPrimaryAndSecondary()) {
+ // Transition to connected
+ stateTransition(self, CONNECTED);
+ // Update initial state
+ self.initialConnectState.connect = true;
+ self.initialConnectState.fullsetup = true;
+ self.initialConnectState.all = true;
+ // Emit fullsetup and all events
+ process.nextTick(function() {
+ self.emit('connect', self);
+ self.emit('fullsetup', self);
+ self.emit('all', self);
+ });
+ } else if(self.state == CONNECTING
+ && self.s.replicaSetState.hasPrimary()) {
+ // Transition to connected
+ stateTransition(self, CONNECTED);
+ // Update initial state
+ self.initialConnectState.connect = true;
+ // Emit connected sign
+ process.nextTick(function() {
+ self.emit('connect', self);
+ });
+ } else if(self.state == CONNECTING
+ && self.s.replicaSetState.hasSecondary()
+ && self.s.options.secondaryOnlyConnectionAllowed) {
+ // Transition to connected
+ stateTransition(self, CONNECTED);
+ // Update initial state
+ self.initialConnectState.connect = true;
+ // Emit connected sign
+ process.nextTick(function() {
+ self.emit('connect', self);
+ });
+ } else if(self.state == CONNECTING) {
+ self.emit('error', new MongoError('no primary found in replicaset'));
+ // Destroy the topology
+ return self.destroy();
+ } else if(self.state == CONNECTED
+ && self.s.replicaSetState.hasPrimaryAndSecondary()
+ && !self.initialConnectState.fullsetup) {
+ self.initialConnectState.fullsetup = true;
+ // Emit fullsetup and all events
+ process.nextTick(function() {
+ self.emit('fullsetup', self);
+ self.emit('all', self);
+ });
+ }
+ }
+
+ if(!options.haInterval) topologyMonitor(self);
+ });
+ }
+
+ // No connectingServers but unknown servers
+ if(connectingServers.length == 0
+ && self.s.replicaSetState.unknownServers.length > 0 && options.haInterval) {
+ return connectMissingServers();
+ } else if(connectingServers.length == 0 && options.haInterval) {
+ self.destroy();
+ return self.emit('error', new MongoError('no valid replicaset members found'));
+ }
+
+ // Ping all servers
+ for(var i = 0; i < connectingServers.length; i++) {
+ pingServer(self, connectingServers[i], function() {
+ count = count - 1;
+
+ if(count == 0) {
+ connectMissingServers();
+ }
+ });
+ }
+ }, options.haInterval || self.s.haInterval)
+}
+
+function handleEvent(self, event) {
+ return function() {
+ if(self.state == DESTROYED) return;
+ // Debug log
+ if(self.s.logger.isDebug()) {
+ self.s.logger.debug(f('handleEvent %s from server %s in replset with id %s', event, this.name, self.id));
+ }
+
+ self.s.replicaSetState.remove(this);
+ }
+}
+
+function handleInitialConnectEvent(self, event) {
+ return function() {
+ // Debug log
+ if(self.s.logger.isDebug()) {
+ self.s.logger.debug(f('handleInitialConnectEvent %s from server %s in replset with id %s', event, this.name, self.id));
+ }
+
+ // Destroy the instance
+ if(self.state == DESTROYED) {
+ return this.destroy();
+ }
+
+ // Check the type of server
+ if(event == 'connect') {
+ // Update the state
+ var result = self.s.replicaSetState.update(this);
+ if(result == true) {
+ // Primary lastIsMaster store it
+ if(this.lastIsMaster() && this.lastIsMaster().ismaster) {
+ self.ismaster = this.lastIsMaster();
+ }
+
+ // Debug log
+ if(self.s.logger.isDebug()) {
+ self.s.logger.debug(f('handleInitialConnectEvent %s from server %s in replset with id %s has state [%s]', event, this.name, self.id, JSON.stringify(self.s.replicaSetState.set)));
+ }
+
+ // Remove the handlers
+ for(var i = 0; i < handlers.length; i++) {
+ this.removeAllListeners(handlers[i]);
+ }
+
+ // Add stable state handlers
+ this.on('error', handleEvent(self, 'error'));
+ this.on('close', handleEvent(self, 'close'));
+ this.on('timeout', handleEvent(self, 'timeout'));
+ this.on('parseError', handleEvent(self, 'parseError'));
+ } else if(result instanceof MongoError) {
+ this.destroy();
+ self.destroy();
+ return self.emit('error', result);
+ } else {
+ this.destroy();
+ }
+ } else {
+ // Emit failure to connect
+ self.emit('failed', this);
+ // Remove from the state
+ self.s.replicaSetState.remove(this);
+ }
+
+ // Remove from the list from connectingServers
+ for(i = 0; i < self.s.connectingServers.length; i++) {
+ if(self.s.connectingServers[i].equals(this)) {
+ self.s.connectingServers.splice(i, 1);
+ }
+ }
+
+ // Trigger topologyMonitor
+ if(self.s.connectingServers.length == 0) {
+ topologyMonitor(self, {haInterval: 1});
+ }
+ };
+}
+
+function connectServers(self, servers) {
+ // Update connectingServers
+ self.s.connectingServers = self.s.connectingServers.concat(servers);
+
+ // Index used to interleaf the server connects, avoiding
+ // runtime issues on io constrained vm's
+ var timeoutInterval = 0;
+
+ function connect(server, timeoutInterval) {
+ setTimeout(function() {
+ // Add the server to the state
+ if(self.s.replicaSetState.update(server)) {
+ // Primary lastIsMaster store it
+ if(server.lastIsMaster() && server.lastIsMaster().ismaster) {
+ self.ismaster = server.lastIsMaster();
+ }
+ }
+
+ // Add event handlers
+ server.once('close', handleInitialConnectEvent(self, 'close'));
+ server.once('timeout', handleInitialConnectEvent(self, 'timeout'));
+ server.once('parseError', handleInitialConnectEvent(self, 'parseError'));
+ server.once('error', handleInitialConnectEvent(self, 'error'));
+ server.once('connect', handleInitialConnectEvent(self, 'connect'));
+ // SDAM Monitoring events
+ server.on('serverOpening', function(e) { self.emit('serverOpening', e); });
+ server.on('serverDescriptionChanged', function(e) { self.emit('serverDescriptionChanged', e); });
+ server.on('serverClosed', function(e) { self.emit('serverClosed', e); });
+ // Start connection
+ server.connect(self.s.connectOptions);
+ }, timeoutInterval);
+ }
+
+ // Start all the servers
+ while(servers.length > 0) {
+ connect(servers.shift(), timeoutInterval++);
+ }
+}
+
+/**
+ * Emit event if it exists
+ * @method
+ */
+function emitSDAMEvent(self, event, description) {
+ if(self.listeners(event).length > 0) {
+ self.emit(event, description);
+ }
+}
+
+/**
+ * Initiate server connect
+ * @method
+ * @param {array} [options.auth=null] Array of auth options to apply on connect
+ */
+ReplSet.prototype.connect = function(options) {
+ var self = this;
+ // Add any connect level options to the internal state
+ this.s.connectOptions = options || {};
+ // Set connecting state
+ stateTransition(this, CONNECTING);
+ // Create server instances
+ var servers = this.s.seedlist.map(function(x) {
+ return new Server(assign({}, self.s.options, x, {
+ authProviders: self.authProviders, reconnect:false, monitoring:false, inTopology: true
+ }, {
+ clientInfo: clone(self.s.clientInfo)
+ }));
+ });
+
+ // Error out as high availbility interval must be < than socketTimeout
+ if(this.s.options.socketTimeout > 0 && this.s.options.socketTimeout <= this.s.options.haInterval) {
+ return self.emit('error', new MongoError(f("haInterval [%s] MS must be set to less than socketTimeout [%s] MS"
+ , this.s.options.haInterval, this.s.options.socketTimeout)));
+ }
+
+ // Emit the topology opening event
+ emitSDAMEvent(this, 'topologyOpening', { topologyId: this.id });
+ // Start all server connections
+ connectServers(self, servers);
+}
+
+/**
+ * Destroy the server connection
+ * @param {boolean} [options.force=false] Force destroy the pool
+ * @method
+ */
+ReplSet.prototype.destroy = function(options) {
+ options = options || {};
+ // Transition state
+ stateTransition(this, DESTROYED);
+ // Clear out any monitoring process
+ if(this.haTimeoutId) clearTimeout(this.haTimeoutId);
+ // Destroy the replicaset
+ this.s.replicaSetState.destroy(options);
+
+ // Destroy all connecting servers
+ this.s.connectingServers.forEach(function(x) {
+ x.destroy(options);
+ });
+
+ // Emit toplogy closing event
+ emitSDAMEvent(this, 'topologyClosed', { topologyId: this.id });
+}
+
+/**
+ * Unref all connections belong to this server
+ * @method
+ */
+ReplSet.prototype.unref = function() {
+ // Transition state
+ stateTransition(this, DISCONNECTED);
+
+ this.s.replicaSetState.allServers().forEach(function(x) {
+ x.unref();
+ });
+
+ clearTimeout(this.haTimeoutId);
+}
+
+/**
+ * Returns the last known ismaster document for this server
+ * @method
+ * @return {object}
+ */
+ReplSet.prototype.lastIsMaster = function() {
+ return this.s.replicaSetState.primary
+ ? this.s.replicaSetState.primary.lastIsMaster() : this.ismaster;
+}
+
+/**
+ * All raw connections
+ * @method
+ * @return {Connection[]}
+ */
+ReplSet.prototype.connections = function() {
+ var servers = this.s.replicaSetState.allServers();
+ var connections = [];
+ for(var i = 0; i < servers.length; i++) {
+ connections = connections.concat(servers[i].connections());
+ }
+
+ return connections;
+}
+
+/**
+ * Figure out if the server is connected
+ * @method
+ * @param {ReadPreference} [options.readPreference] Specify read preference if command supports it
+ * @return {boolean}
+ */
+ReplSet.prototype.isConnected = function(options) {
+ options = options || {};
+
+ // If we are authenticating signal not connected
+ // To avoid interleaving of operations
+ if(this.authenticating) return false;
+
+ // If we specified a read preference check if we are connected to something
+ // than can satisfy this
+ if(options.readPreference
+ && options.readPreference.equals(ReadPreference.secondary)) {
+ return this.s.replicaSetState.hasSecondary();
+ }
+
+ if(options.readPreference
+ && options.readPreference.equals(ReadPreference.primary)) {
+ return this.s.replicaSetState.hasPrimary();
+ }
+
+ if(options.readPreference
+ && options.readPreference.equals(ReadPreference.primaryPreferred)) {
+ return this.s.replicaSetState.hasSecondary() || this.s.replicaSetState.hasPrimary();
+ }
+
+ if(options.readPreference
+ && options.readPreference.equals(ReadPreference.secondaryPreferred)) {
+ return this.s.replicaSetState.hasSecondary() || this.s.replicaSetState.hasPrimary();
+ }
+
+ if(this.s.secondaryOnlyConnectionAllowed
+ && this.s.replicaSetState.hasSecondary()) {
+ return true;
+ }
+
+ return this.s.replicaSetState.hasPrimary();
+}
+
+/**
+ * Figure out if the replicaset instance was destroyed by calling destroy
+ * @method
+ * @return {boolean}
+ */
+ReplSet.prototype.isDestroyed = function() {
+ return this.state == DESTROYED;
+}
+
+/**
+ * Get server
+ * @method
+ * @param {ReadPreference} [options.readPreference] Specify read preference if command supports it
+ * @return {Server}
+ */
+ReplSet.prototype.getServer = function(options) {
+ // Ensure we have no options
+ options = options || {};
+
+ // Pick the right server baspickServerd on readPreference
+ var server = this.s.replicaSetState.pickServer(options.readPreference);
+ if(this.s.debug) this.emit('pickedServer', options.readPreference, server);
+ return server;
+}
+
+/**
+ * Get all connected servers
+ * @method
+ * @return {Server[]}
+ */
+ReplSet.prototype.getServers = function() {
+ return this.s.replicaSetState.allServers();
+}
+
+//
+// Execute write operation
+var executeWriteOperation = function(self, op, ns, ops, options, callback) {
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ // Ensure we have no options
+ options = options || {};
+
+ // No server returned we had an error
+ if(self.s.replicaSetState.primary == null) {
+ return callback(new MongoError("no primary server found"));
+ }
+
+ // Execute the command
+ self.s.replicaSetState.primary[op](ns, ops, options, callback);
+}
+
+/**
+ * Insert one or more documents
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {array} ops An array of documents to insert
+ * @param {boolean} [options.ordered=true] Execute in order or out of order
+ * @param {object} [options.writeConcern={}] Write concern for the operation
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+ReplSet.prototype.insert = function(ns, ops, options, callback) {
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ if(this.state == DESTROYED) return callback(new MongoError(f('topology was destroyed')));
+
+ // Not connected but we have a disconnecthandler
+ if(!this.s.replicaSetState.hasPrimary() && this.s.disconnectHandler != null) {
+ return this.s.disconnectHandler.add('insert', ns, ops, options, callback);
+ }
+
+ // Execute write operation
+ executeWriteOperation(this, 'insert', ns, ops, options, callback);
+}
+
+/**
+ * Perform one or more update operations
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {array} ops An array of updates
+ * @param {boolean} [options.ordered=true] Execute in order or out of order
+ * @param {object} [options.writeConcern={}] Write concern for the operation
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+ReplSet.prototype.update = function(ns, ops, options, callback) {
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ if(this.state == DESTROYED) return callback(new MongoError(f('topology was destroyed')));
+
+ // Not connected but we have a disconnecthandler
+ if(!this.s.replicaSetState.hasPrimary() && this.s.disconnectHandler != null) {
+ return this.s.disconnectHandler.add('update', ns, ops, options, callback);
+ }
+
+ // Execute write operation
+ executeWriteOperation(this, 'update', ns, ops, options, callback);
+}
+
+/**
+ * Perform one or more remove operations
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {array} ops An array of removes
+ * @param {boolean} [options.ordered=true] Execute in order or out of order
+ * @param {object} [options.writeConcern={}] Write concern for the operation
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+ReplSet.prototype.remove = function(ns, ops, options, callback) {
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ if(this.state == DESTROYED) return callback(new MongoError(f('topology was destroyed')));
+
+ // Not connected but we have a disconnecthandler
+ if(!this.s.replicaSetState.hasPrimary() && this.s.disconnectHandler != null) {
+ return this.s.disconnectHandler.add('remove', ns, ops, options, callback);
+ }
+
+ // Execute write operation
+ executeWriteOperation(this, 'remove', ns, ops, options, callback);
+}
+
+/**
+ * Execute a command
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {object} cmd The command hash
+ * @param {ReadPreference} [options.readPreference] Specify read preference if command supports it
+ * @param {Connection} [options.connection] Specify connection object to execute command against
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+ReplSet.prototype.command = function(ns, cmd, options, callback) {
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ if(this.state == DESTROYED) return callback(new MongoError(f('topology was destroyed')));
+ var self = this;
+
+ // Establish readPreference
+ var readPreference = options.readPreference ? options.readPreference : ReadPreference.primary;
+
+ // If the readPreference is primary and we have no primary, store it
+ if(readPreference.preference == 'primary' && !this.s.replicaSetState.hasPrimary() && this.s.disconnectHandler != null) {
+ return this.s.disconnectHandler.add('command', ns, cmd, options, callback);
+ } else if(readPreference.preference == 'secondary' && !this.s.replicaSetState.hasSecondary() && this.s.disconnectHandler != null) {
+ return this.s.disconnectHandler.add('command', ns, cmd, options, callback);
+ } else if(readPreference.preference != 'primary' && !this.s.replicaSetState.hasSecondary() && !this.s.replicaSetState.hasPrimary() && this.s.disconnectHandler != null) {
+ return this.s.disconnectHandler.add('command', ns, cmd, options, callback);
+ }
+
+ // Pick a server
+ var server = this.s.replicaSetState.pickServer(readPreference);
+ // We received an error, return it
+ if(!(server instanceof Server)) return callback(server);
+ // Emit debug event
+ if(self.s.debug) self.emit('pickedServer', ReadPreference.primary, server);
+
+ // No server returned we had an error
+ if(server == null) {
+ return callback(new MongoError(f("no server found that matches the provided readPreference %s", readPreference)));
+ }
+
+ // Execute the command
+ server.command(ns, cmd, options, callback);
+}
+
+/**
+ * Authenticate using a specified mechanism
+ * @method
+ * @param {string} mechanism The Auth mechanism we are invoking
+ * @param {string} db The db we are invoking the mechanism against
+ * @param {...object} param Parameters for the specific mechanism
+ * @param {authResultCallback} callback A callback function
+ */
+ReplSet.prototype.auth = function(mechanism, db) {
+ var allArgs = Array.prototype.slice.call(arguments, 0).slice(0);
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 2);
+ var callback = args.pop();
+
+ // If we don't have the mechanism fail
+ if(this.authProviders[mechanism] == null && mechanism != 'default') {
+ return callback(new MongoError(f("auth provider %s does not exist", mechanism)));
+ }
+
+ // Are we already authenticating, throw
+ if(this.authenticating) {
+ return callback(new MongoError('authentication or logout allready in process'));
+ }
+
+ // Topology is not connected, save the call in the provided store to be
+ // Executed at some point when the handler deems it's reconnected
+ if(!self.s.replicaSetState.hasPrimary() && self.s.disconnectHandler != null) {
+ return self.s.disconnectHandler.add('auth', db, allArgs, {}, callback);
+ }
+
+ // Set to authenticating
+ this.authenticating = true;
+ // All errors
+ var errors = [];
+
+ // Get all the servers
+ var servers = this.s.replicaSetState.allServers();
+ // No servers return
+ if(servers.length == 0) {
+ this.authenticating = false;
+ callback(null, true);
+ }
+
+ // Authenticate
+ function auth(server) {
+ // Arguments without a callback
+ var argsWithoutCallback = [mechanism, db].concat(args.slice(0));
+ // Create arguments
+ var finalArguments = argsWithoutCallback.concat([function(err) {
+ count = count - 1;
+ // Save all the errors
+ if(err) errors.push({name: server.name, err: err});
+ // We are done
+ if(count == 0) {
+ // Auth is done
+ self.authenticating = false;
+
+ // Return the auth error
+ if(errors.length) return callback(MongoError.create({
+ message: 'authentication fail', errors: errors
+ }), false);
+
+ // Successfully authenticated session
+ callback(null, self);
+ }
+ }]);
+
+ if(!server.lastIsMaster().arbiterOnly) {
+ // Execute the auth only against non arbiter servers
+ server.auth.apply(server, finalArguments);
+ } else {
+ // If we are authenticating against an arbiter just ignore it
+ finalArguments.pop()(null);
+ }
+ }
+
+ // Get total count
+ var count = servers.length;
+ // Authenticate against all servers
+ while(servers.length > 0) {
+ auth(servers.shift());
+ }
+}
+
+/**
+ * Logout from a database
+ * @method
+ * @param {string} db The db we are logging out from
+ * @param {authResultCallback} callback A callback function
+ */
+ReplSet.prototype.logout = function(dbName, callback) {
+ var self = this;
+ // Are we authenticating or logging out, throw
+ if(this.authenticating) {
+ throw new MongoError('authentication or logout allready in process');
+ }
+
+ // Ensure no new members are processed while logging out
+ this.authenticating = true;
+
+ // Remove from all auth providers (avoid any reaplication of the auth details)
+ var providers = Object.keys(this.authProviders);
+ for(var i = 0; i < providers.length; i++) {
+ this.authProviders[providers[i]].logout(dbName);
+ }
+
+ // Now logout all the servers
+ var servers = this.s.replicaSetState.allServers();
+ var count = servers.length;
+ if(count == 0) return callback();
+ var errors = [];
+
+ function logoutServer(_server, cb) {
+ _server.logout(dbName, function(err) {
+ if(err) errors.push({name: _server.name, err: err});
+ cb();
+ });
+ }
+
+ // Execute logout on all server instances
+ for(i = 0; i < servers.length; i++) {
+ logoutServer(servers[i], function() {
+ count = count - 1;
+
+ if(count == 0) {
+ // Do not block new operations
+ self.authenticating = false;
+ // If we have one or more errors
+ if(errors.length) return callback(MongoError.create({
+ message: f('logout failed against db %s', dbName), errors: errors
+ }), false);
+
+ // No errors
+ callback();
+ }
+ })
+ }
+}
+
+/**
+ * Perform one or more remove operations
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {{object}|{Long}} cmd Can be either a command returning a cursor or a cursorId
+ * @param {object} [options.batchSize=0] Batchsize for the operation
+ * @param {array} [options.documents=[]] Initial documents list for cursor
+ * @param {ReadPreference} [options.readPreference] Specify read preference if command supports it
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+ReplSet.prototype.cursor = function(ns, cmd, cursorOptions) {
+ cursorOptions = cursorOptions || {};
+ var FinalCursor = cursorOptions.cursorFactory || this.s.Cursor;
+ return new FinalCursor(this.s.bson, ns, cmd, cursorOptions, this, this.s.options);
+}
+
+/**
+ * A replset connect event, used to verify that the connection is up and running
+ *
+ * @event ReplSet#connect
+ * @type {ReplSet}
+ */
+
+/**
+ * A replset reconnect event, used to verify that the topology reconnected
+ *
+ * @event ReplSet#reconnect
+ * @type {ReplSet}
+ */
+
+/**
+ * A replset fullsetup event, used to signal that all topology members have been contacted.
+ *
+ * @event ReplSet#fullsetup
+ * @type {ReplSet}
+ */
+
+/**
+ * A replset all event, used to signal that all topology members have been contacted.
+ *
+ * @event ReplSet#all
+ * @type {ReplSet}
+ */
+
+/**
+ * A replset failed event, used to signal that initial replset connection failed.
+ *
+ * @event ReplSet#failed
+ * @type {ReplSet}
+ */
+
+/**
+ * A server member left the replicaset
+ *
+ * @event ReplSet#left
+ * @type {function}
+ * @param {string} type The type of member that left (primary|secondary|arbiter)
+ * @param {Server} server The server object that left
+ */
+
+/**
+ * A server member joined the replicaset
+ *
+ * @event ReplSet#joined
+ * @type {function}
+ * @param {string} type The type of member that joined (primary|secondary|arbiter)
+ * @param {Server} server The server object that joined
+ */
+
+/**
+ * A server opening SDAM monitoring event
+ *
+ * @event ReplSet#serverOpening
+ * @type {object}
+ */
+
+/**
+ * A server closed SDAM monitoring event
+ *
+ * @event ReplSet#serverClosed
+ * @type {object}
+ */
+
+/**
+ * A server description SDAM change monitoring event
+ *
+ * @event ReplSet#serverDescriptionChanged
+ * @type {object}
+ */
+
+/**
+ * A topology open SDAM event
+ *
+ * @event ReplSet#topologyOpening
+ * @type {object}
+ */
+
+/**
+ * A topology closed SDAM event
+ *
+ * @event ReplSet#topologyClosed
+ * @type {object}
+ */
+
+/**
+ * A topology structure SDAM change event
+ *
+ * @event ReplSet#topologyDescriptionChanged
+ * @type {object}
+ */
+
+/**
+ * A topology serverHeartbeatStarted SDAM event
+ *
+ * @event ReplSet#serverHeartbeatStarted
+ * @type {object}
+ */
+
+/**
+ * A topology serverHeartbeatFailed SDAM event
+ *
+ * @event ReplSet#serverHeartbeatFailed
+ * @type {object}
+ */
+
+/**
+ * A topology serverHeartbeatSucceeded SDAM change event
+ *
+ * @event ReplSet#serverHeartbeatSucceeded
+ * @type {object}
+ */
+
+module.exports = ReplSet;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/replset_state.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/replset_state.js
new file mode 100644
index 0000000..4fb1d4d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/replset_state.js
@@ -0,0 +1,972 @@
+"use strict"
+
+var inherits = require('util').inherits,
+ f = require('util').format,
+ EventEmitter = require('events').EventEmitter,
+ Logger = require('../connection/logger'),
+ ReadPreference = require('./read_preference'),
+ MongoError = require('../error');
+
+var TopologyType = {
+ 'Single': 'Single', 'ReplicaSetNoPrimary': 'ReplicaSetNoPrimary',
+ 'ReplicaSetWithPrimary': 'ReplicaSetWithPrimary', 'Sharded': 'Sharded',
+ 'Unknown': 'Unknown'
+};
+
+var ServerType = {
+ 'Standalone': 'Standalone', 'Mongos': 'Mongos', 'PossiblePrimary': 'PossiblePrimary',
+ 'RSPrimary': 'RSPrimary', 'RSSecondary': 'RSSecondary', 'RSArbiter': 'RSArbiter',
+ 'RSOther': 'RSOther', 'RSGhost': 'RSGhost', 'Unknown': 'Unknown'
+};
+
+var ReplSetState = function(options) {
+ options = options || {};
+ // Add event listener
+ EventEmitter.call(this);
+ // Topology state
+ this.topologyType = TopologyType.ReplicaSetNoPrimary;
+ this.setName = options.setName;
+
+ // Server set
+ this.set = {};
+
+ // Unpacked options
+ this.id = options.id;
+ this.setName = options.setName;
+
+ // Replicaset logger
+ this.logger = options.logger || Logger('ReplSet', options);
+
+ // Server selection index
+ this.index = 0;
+ // Acceptable latency
+ this.acceptableLatency = options.acceptableLatency || 15;
+
+ // heartbeatFrequencyMS
+ this.heartbeatFrequencyMS = options.heartbeatFrequencyMS || 10000;
+
+ // Server side
+ this.primary = null;
+ this.secondaries = [];
+ this.arbiters = [];
+ this.passives = [];
+ this.ghosts = [];
+ // Current unknown hosts
+ this.unknownServers = [];
+ // In set status
+ this.set = {};
+ // Status
+ this.maxElectionId = null;
+ this.maxSetVersion = 0;
+ // Description of the Replicaset
+ this.replicasetDescription = {
+ "topologyType": "Unknown", "servers": []
+ };
+}
+
+inherits(ReplSetState, EventEmitter);
+
+ReplSetState.prototype.hasPrimaryAndSecondary = function() {
+ return this.primary != null && this.secondaries.length > 0;
+}
+
+ReplSetState.prototype.hasPrimary = function() {
+ return this.primary != null;
+}
+
+ReplSetState.prototype.hasSecondary = function() {
+ return this.secondaries.length > 0;
+}
+
+ReplSetState.prototype.allServers = function(options) {
+ options = options || {};
+ var servers = this.primary ? [this.primary] : [];
+ servers = servers.concat(this.secondaries);
+ if(!options.ignoreArbiters) servers = servers.concat(this.arbiters);
+ servers = servers.concat(this.passives);
+ return servers;
+}
+
+ReplSetState.prototype.destroy = function(options) {
+ // Destroy all sockets
+ if(this.primary) this.primary.destroy(options);
+ this.secondaries.forEach(function(x) { x.destroy(options); });
+ this.arbiters.forEach(function(x) { x.destroy(options); });
+ this.passives.forEach(function(x) { x.destroy(options); });
+ this.ghosts.forEach(function(x) { x.destroy(options); });
+ // Clear out the complete state
+ this.secondaries = [];
+ this.arbiters = [];
+ this.passives = [];
+ this.ghosts = [];
+ this.unknownServers = [];
+ this.set = {};
+}
+
+ReplSetState.prototype.remove = function(server, options) {
+ options = options || {};
+
+ // Only remove if the current server is not connected
+ var servers = this.primary ? [this.primary] : [];
+ servers = servers.concat(this.secondaries);
+ servers = servers.concat(this.arbiters);
+ servers = servers.concat(this.passives);
+
+ // Check if it's active and this is just a failed connection attempt
+ for(var i = 0; i < servers.length; i++) {
+ if(!options.force && servers[i].equals(server) && servers[i].isConnected && servers[i].isConnected()) {
+ return;
+ }
+ }
+
+ // If we have it in the set remove it
+ if(this.set[server.name.toLowerCase()]) {
+ this.set[server.name.toLowerCase()].type = ServerType.Unknown;
+ this.set[server.name.toLowerCase()].electionId = null;
+ this.set[server.name.toLowerCase()].setName = null;
+ this.set[server.name.toLowerCase()].setVersion = null;
+ }
+
+ // Remove type
+ var removeType = null;
+
+ // Remove from any lists
+ if(this.primary && this.primary.equals(server)) {
+ this.primary = null;
+ this.topologyType = TopologyType.ReplicaSetNoPrimary;
+ removeType = 'primary';
+ }
+
+ // Remove from any other server lists
+ removeType = removeFrom(server, this.secondaries) ? 'secondary' : removeType;
+ removeType = removeFrom(server, this.arbiters) ? 'arbiter' : removeType;
+ removeType = removeFrom(server, this.passives) ? 'secondary' : removeType;
+ removeFrom(server, this.ghosts);
+ removeFrom(server, this.unknownServers);
+
+ // Do we have a removeType
+ if(removeType) {
+ this.emit('left', removeType, server);
+ }
+}
+
+ReplSetState.prototype.update = function(server) {
+ var self = this;
+ // Get the current ismaster
+ var ismaster = server.lastIsMaster();
+
+ //
+ // Add any hosts
+ //
+ if(ismaster) {
+ // Join all the possible new hosts
+ var hosts = Array.isArray(ismaster.hosts) ? ismaster.hosts : [];
+ hosts = hosts.concat(Array.isArray(ismaster.arbiters) ? ismaster.arbiters : []);
+ hosts = hosts.concat(Array.isArray(ismaster.passives) ? ismaster.passives : []);
+
+ // Add all hosts as unknownServers
+ for(var i = 0; i < hosts.length; i++) {
+ // Add to the list of unknown server
+ if(this.unknownServers.indexOf(hosts[i]) == -1
+ && (!this.set[hosts[i].toLowerCase()] || this.set[hosts[i].toLowerCase()].type == ServerType.Unknown)) {
+ this.unknownServers.push(hosts[i]);
+ }
+
+ if(!this.set[hosts[i].toLowerCase()]) {
+ this.set[hosts[i].toLowerCase()] = {
+ type: ServerType.Unknown,
+ electionId: null,
+ setName: null,
+ setVersion: null
+ }
+ }
+ }
+ }
+
+ //
+ // Unknown server
+ //
+ if(!ismaster && !inList(ismaster, server, this.unknownServers)) {
+ self.set[server.name.toLowerCase()] = {
+ type: ServerType.Unknown, setVersion: null, electionId: null, setName: null
+ }
+ // Update set information about the server instance
+ self.set[server.name.toLowerCase()].type = ServerType.Unknown;
+ self.set[server.name.toLowerCase()].electionId = ismaster ? ismaster.electionId : ismaster;
+ self.set[server.name.toLowerCase()].setName = ismaster ? ismaster.setName : ismaster;
+ self.set[server.name.toLowerCase()].setVersion = ismaster ? ismaster.setVersion : ismaster;
+
+ if(self.unknownServers.indexOf(server.name) == -1) {
+ self.unknownServers.push(server.name);
+ }
+
+ // Set the topology
+ return false;
+ }
+
+ //
+ // Is this a mongos
+ //
+ if(ismaster && ismaster.msg == 'isdbgrid') {
+ return false;
+ }
+
+ // A RSOther instance
+ if((ismaster.setName && ismaster.hidden)
+ || (ismaster.setName && !ismaster.ismaster && !ismaster.secondary && !ismaster.arbiterOnly && !ismaster.passive)) {
+ self.set[server.name.toLowerCase()] = {
+ type: ServerType.RSOther, setVersion: null,
+ electionId: null, setName: ismaster.setName
+ }
+ // Set the topology
+ this.topologyType = this.primary ? TopologyType.ReplicaSetWithPrimary : TopologyType.ReplicaSetNoPrimary;
+ if(ismaster.setName) this.setName = ismaster.setName;
+ return false;
+ }
+
+ // A RSGhost instance
+ if(ismaster.isreplicaset) {
+ self.set[server.name.toLowerCase()] = {
+ type: ServerType.RSGhost, setVersion: null,
+ electionId: null, setName: null
+ }
+
+ // Set the topology
+ this.topologyType = this.primary ? TopologyType.ReplicaSetWithPrimary : TopologyType.ReplicaSetNoPrimary;
+ if(ismaster.setName) this.setName = ismaster.setName;
+
+ // Set the topology
+ return false;
+ }
+
+ //
+ // Standalone server, destroy and return
+ //
+ if(ismaster && ismaster.ismaster && !ismaster.setName) {
+ this.topologyType = this.primary ? TopologyType.ReplicaSetWithPrimary : TopologyType.Unknown;
+ this.remove(server, {force:true});
+ return false;
+ }
+
+ //
+ // Server in maintanance mode
+ //
+ if(ismaster && !ismaster.ismaster && !ismaster.secondary && !ismaster.arbiterOnly) {
+ this.remove(server, {force:true});
+ return false;
+ }
+
+ //
+ // If the .me field does not match the passed in server
+ //
+ if(ismaster.me && ismaster.me != server.name) {
+ if(this.logger.isWarn()) {
+ this.logger.warn(f('the seedlist server was removed due to its address %s not matching its ismaster.me address %s', server.name, ismaster.me));
+ }
+
+ // Delete from the set
+ delete this.set[server.name.toLowerCase()];
+
+ // Set the type of topology we have
+ if(this.primary && !this.primary.equals(server)) {
+ this.topologyType = TopologyType.ReplicaSetWithPrimary;
+ } else {
+ this.topologyType = TopologyType.ReplicaSetNoPrimary;
+ }
+
+ //
+ // We have a potential primary
+ //
+ if(!this.primary && ismaster.primary) {
+ this.set[ismaster.primary.toLowerCase()] = {
+ type: ServerType.PossiblePrimary,
+ setName: null,
+ electionId: null,
+ setVersion: null,
+ }
+ }
+
+ return false;
+ }
+
+ //
+ // Primary handling
+ //
+ if(!this.primary && ismaster.ismaster && ismaster.setName) {
+ var ismasterElectionId = server.lastIsMaster().electionId;
+ if(this.setName && this.setName != ismaster.setName) {
+ this.topologyType = TopologyType.ReplicaSetNoPrimary;
+ return new MongoError(f('setName from ismaster does not match provided connection setName [%s] != [%s]', ismaster.setName, this.setName));
+ }
+
+ if(!this.maxElectionId && ismasterElectionId) {
+ this.maxElectionId = ismasterElectionId;
+ } else if(this.maxElectionId && ismasterElectionId) {
+ var result = compareObjectIds(this.maxElectionId, ismasterElectionId);
+ // Get the electionIds
+ var ismasterSetVersion = server.lastIsMaster().setVersion;
+
+ // if(result == 1 || result == 0) {
+ if(result == 1) {
+ this.topologyType = TopologyType.ReplicaSetNoPrimary;
+ return false;
+ } else if(result == 0 && ismasterSetVersion) {
+ if(ismasterSetVersion < this.maxSetVersion) {
+ this.topologyType = TopologyType.ReplicaSetNoPrimary;
+ return false;
+ }
+ }
+
+ this.maxSetVersion = ismasterSetVersion;
+ this.maxElectionId = ismasterElectionId;
+ }
+
+ // Hande normalization of server names
+ var normalizedHosts = ismaster.hosts.map(function(x) { return x.toLowerCase() });
+ var locationIndex = normalizedHosts.indexOf(server.name.toLowerCase());
+
+ // Validate that the server exists in the host list
+ if(locationIndex != -1) {
+ self.primary = server;
+ self.set[server.name.toLowerCase()] = {
+ type: ServerType.RSPrimary,
+ setVersion: ismaster.setVersion,
+ electionId: ismaster.electionId,
+ setName: ismaster.setName
+ }
+
+ // Set the topology
+ this.topologyType = TopologyType.ReplicaSetWithPrimary;
+ if(ismaster.setName) this.setName = ismaster.setName;
+ removeFrom(server, self.unknownServers);
+ removeFrom(server, self.secondaries);
+ removeFrom(server, self.passives);
+ self.emit('joined', 'primary', server);
+ } else {
+ this.topologyType = TopologyType.ReplicaSetNoPrimary;
+ }
+
+ emitTopologyDescriptionChanged(self);
+ return true;
+ } else if(ismaster.ismaster && ismaster.setName) {
+ // Get the electionIds
+ var currentElectionId = self.set[self.primary.name.toLowerCase()].electionId;
+ var currentSetVersion = self.set[self.primary.name.toLowerCase()].setVersion;
+ var currentSetName = self.set[self.primary.name.toLowerCase()].setName;
+ ismasterElectionId = server.lastIsMaster().electionId;
+ ismasterSetVersion = server.lastIsMaster().setVersion;
+ var ismasterSetName = server.lastIsMaster().setName;
+
+ // Is it the same server instance
+ if(this.primary.equals(server)
+ && currentSetName == ismasterSetName) {
+ return false;
+ }
+
+ // If we do not have the same rs name
+ if(currentSetName && currentSetName != ismasterSetName) {
+ if(!this.primary.equals(server)) {
+ this.topologyType = TopologyType.ReplicaSetWithPrimary;
+ } else {
+ this.topologyType = TopologyType.ReplicaSetNoPrimary;
+ }
+
+ return false;
+ }
+
+ // Check if we need to replace the server
+ if(currentElectionId && ismasterElectionId) {
+ result = compareObjectIds(currentElectionId, ismasterElectionId);
+
+ if(result == 1) {
+ return false;
+ } else if(result == 0 && (currentSetVersion > ismasterSetVersion)) {
+ return false;
+ }
+ } else if(!currentElectionId && ismasterElectionId
+ && ismasterSetVersion) {
+ if(ismasterSetVersion < this.maxSetVersion) {
+ return false;
+ }
+ }
+
+ if(!this.maxElectionId && ismasterElectionId) {
+ this.maxElectionId = ismasterElectionId;
+ } else if(this.maxElectionId && ismasterElectionId) {
+ result = compareObjectIds(this.maxElectionId, ismasterElectionId);
+
+ if(result == 1) {
+ return false;
+ } else if(result == 0 && currentSetVersion && ismasterSetVersion) {
+ if(ismasterSetVersion < this.maxSetVersion) {
+ return false;
+ }
+ } else {
+ if(ismasterSetVersion < this.maxSetVersion) {
+ return false;
+ }
+ }
+
+ this.maxElectionId = ismasterElectionId;
+ this.maxSetVersion = ismasterSetVersion;
+ } else {
+ this.maxSetVersion = ismasterSetVersion;
+ }
+
+ // Modify the entry to unknown
+ self.set[self.primary.name.toLowerCase()] = {
+ type: ServerType.Unknown, setVersion: null,
+ electionId: null, setName: null
+ }
+
+ // Signal primary left
+ self.emit('left', 'primary', this.primary);
+ // Destroy the instance
+ self.primary.destroy();
+ // Set the new instance
+ self.primary = server;
+ // Set the set information
+ self.set[server.name.toLowerCase()] = {
+ type: ServerType.RSPrimary, setVersion: ismaster.setVersion,
+ electionId: ismaster.electionId, setName: ismaster.setName
+ }
+
+ // Set the topology
+ this.topologyType = TopologyType.ReplicaSetWithPrimary;
+ if(ismaster.setName) this.setName = ismaster.setName;
+ removeFrom(server, self.unknownServers);
+ removeFrom(server, self.secondaries);
+ removeFrom(server, self.passives);
+ self.emit('joined', 'primary', server);
+ emitTopologyDescriptionChanged(self);
+ return true;
+ }
+
+ // A possible instance
+ if(!this.primary && ismaster.primary) {
+ self.set[ismaster.primary.toLowerCase()] = {
+ type: ServerType.PossiblePrimary, setVersion: null,
+ electionId: null, setName: null
+ }
+ }
+
+ //
+ // Secondary handling
+ //
+ if(ismaster.secondary && ismaster.setName
+ && !inList(ismaster, server, this.secondaries)
+ && this.setName && this.setName == ismaster.setName) {
+ addToList(self, ServerType.RSSecondary, ismaster, server, this.secondaries);
+ // Set the topology
+ this.topologyType = this.primary ? TopologyType.ReplicaSetWithPrimary : TopologyType.ReplicaSetNoPrimary;
+ if(ismaster.setName) this.setName = ismaster.setName;
+ removeFrom(server, self.unknownServers);
+
+ // Remove primary
+ if(this.primary && this.primary.name == server.name) {
+ server.destroy();
+ this.primary = null;
+ self.emit('left', 'primary', server);
+ }
+
+ self.emit('joined', 'secondary', server);
+ emitTopologyDescriptionChanged(self);
+ return true;
+ }
+
+ //
+ // Arbiter handling
+ //
+ if(ismaster.arbiterOnly && ismaster.setName
+ && !inList(ismaster, server, this.arbiters)
+ && this.setName && this.setName == ismaster.setName) {
+ addToList(self, ServerType.RSArbiter, ismaster, server, this.arbiters);
+ // Set the topology
+ this.topologyType = this.primary ? TopologyType.ReplicaSetWithPrimary : TopologyType.ReplicaSetNoPrimary;
+ if(ismaster.setName) this.setName = ismaster.setName;
+ removeFrom(server, self.unknownServers);
+ self.emit('joined', 'arbiter', server);
+ emitTopologyDescriptionChanged(self);
+ return true;
+ }
+
+ //
+ // Passive handling
+ //
+ if(ismaster.passive && ismaster.setName
+ && !inList(ismaster, server, this.passives)
+ && this.setName && this.setName == ismaster.setName) {
+ addToList(self, ServerType.RSSecondary, ismaster, server, this.passives);
+ // Set the topology
+ this.topologyType = this.primary ? TopologyType.ReplicaSetWithPrimary : TopologyType.ReplicaSetNoPrimary;
+ if(ismaster.setName) this.setName = ismaster.setName;
+ removeFrom(server, self.unknownServers);
+
+ // Remove primary
+ if(this.primary && this.primary.name == server.name) {
+ server.destroy();
+ this.primary = null;
+ self.emit('left', 'primary', server);
+ }
+
+ self.emit('joined', 'secondary', server);
+ emitTopologyDescriptionChanged(self);
+ return true;
+ }
+
+ //
+ // Remove the primary
+ //
+ if(this.set[server.name.toLowerCase()] && this.set[server.name.toLowerCase()].type == ServerType.RSPrimary) {
+ self.emit('left', 'primary', this.primary);
+ this.primary.destroy();
+ this.primary = null;
+ this.topologyType = TopologyType.ReplicaSetNoPrimary;
+ return false;
+ }
+
+ this.topologyType = this.primary ? TopologyType.ReplicaSetWithPrimary : TopologyType.ReplicaSetNoPrimary;
+ return false;
+}
+
+/**
+ * Recalculate single server max staleness
+ * @method
+ */
+ReplSetState.prototype.updateServerMaxStaleness = function(server, haInterval) {
+ // Locate the max secondary lastwrite
+ var max = 0;
+ // Go over all secondaries
+ for(var i = 0; i < this.secondaries.length; i++) {
+ max = Math.max(max, this.secondaries[i].lastWriteDate);
+ }
+
+ // Perform this servers staleness calculation
+ if(server.ismaster.maxWireVersion >= 5
+ && server.ismaster.secondary
+ && this.hasPrimary()) {
+ server.staleness = (server.lastUpdateTime - server.lastWriteDate)
+ - (this.primary.lastUpdateTime - this.primary.lastWriteDate)
+ + haInterval;
+ } else if(server.ismaster.maxWireVersion >= 5
+ && server.ismaster.secondary){
+ server.staleness = max - server.lastWriteDate + haInterval;
+ }
+}
+
+/**
+ * Recalculate all the stalness values for secodaries
+ * @method
+ */
+ReplSetState.prototype.updateSecondariesMaxStaleness = function(haInterval) {
+ for(var i = 0; i < this.secondaries.length; i++) {
+ this.updateServerMaxStaleness(this.secondaries[i], haInterval);
+ }
+}
+
+/**
+ * Pick a server by the passed in ReadPreference
+ * @method
+ * @param {ReadPreference} readPreference The ReadPreference instance to use
+ */
+ReplSetState.prototype.pickServer = function(readPreference) {
+ // If no read Preference set to primary by default
+ readPreference = readPreference || ReadPreference.primary;
+
+ // maxStalenessSeconds is not allowed with a primary read
+ if(readPreference.preference == 'primary' && readPreference.maxStalenessSeconds != null) {
+ return new MongoError('primary readPreference incompatible with maxStalenessSeconds');
+ }
+
+ // Check if we have any non compatible servers for maxStalenessSeconds
+ var allservers = this.primary ? [this.primary] : [];
+ allservers = allservers.concat(this.secondaries);
+
+ // Does any of the servers not support the right wire protocol version
+ // for maxStalenessSeconds when maxStalenessSeconds specified on readPreference. Then error out
+ if(readPreference.maxStalenessSeconds != null) {
+ for(var i = 0; i < allservers.length; i++) {
+ if(allservers[i].ismaster.maxWireVersion < 5) {
+ return new MongoError('maxStalenessSeconds not supported by at least one of the replicaset members');
+ }
+ }
+ }
+
+ // Do we have the nearest readPreference
+ if(readPreference.preference == 'nearest' && readPreference.maxStalenessSeconds == null) {
+ return pickNearest(this, readPreference);
+ } else if(readPreference.preference == 'nearest' && readPreference.maxStalenessSeconds != null) {
+ return pickNearestMaxStalenessSeconds(this, readPreference);
+ }
+
+ // Get all the secondaries
+ var secondaries = this.secondaries;
+
+ // Check if we can satisfy and of the basic read Preferences
+ if(readPreference.equals(ReadPreference.secondary)
+ && secondaries.length == 0) {
+ return new MongoError("no secondary server available");
+ }
+
+ if(readPreference.equals(ReadPreference.secondaryPreferred)
+ && secondaries.length == 0
+ && this.primary == null) {
+ return new MongoError("no secondary or primary server available");
+ }
+
+ if(readPreference.equals(ReadPreference.primary)
+ && this.primary == null) {
+ return new MongoError("no primary server available");
+ }
+
+ // Secondary preferred or just secondaries
+ if(readPreference.equals(ReadPreference.secondaryPreferred)
+ || readPreference.equals(ReadPreference.secondary)) {
+
+ if(secondaries.length > 0 && readPreference.maxStalenessSeconds == null) {
+ // Pick nearest of any other servers available
+ var server = pickNearest(this, readPreference);
+ // No server in the window return primary
+ if(server) {
+ return server;
+ }
+ } else if(secondaries.length > 0 && readPreference.maxStalenessSeconds != null) {
+ // Pick nearest of any other servers available
+ server = pickNearestMaxStalenessSeconds(this, readPreference);
+ // No server in the window return primary
+ if(server) {
+ return server;
+ }
+ }
+
+ if(readPreference.equals(ReadPreference.secondaryPreferred)){
+ return this.primary;
+ }
+
+ return null;
+ }
+
+ // Primary preferred
+ if(readPreference.equals(ReadPreference.primaryPreferred)) {
+ server = null;
+
+ // We prefer the primary if it's available
+ if(this.primary) {
+ return this.primary;
+ }
+
+ // Pick a secondary
+ if(secondaries.length > 0 && readPreference.maxStalenessSeconds == null) {
+ server = pickNearest(this, readPreference);
+ } else if(secondaries.length > 0 && readPreference.maxStalenessSeconds != null) {
+ server = pickNearestMaxStalenessSeconds(this, readPreference);
+ }
+
+ // Did we find a server
+ if(server) return server;
+ }
+
+ // Return the primary
+ return this.primary;
+}
+
+//
+// Filter serves by tags
+var filterByTags = function(readPreference, servers) {
+ if(readPreference.tags == null) return servers;
+ var filteredServers = [];
+ var tagsArray = Array.isArray(readPreference.tags) ? readPreference.tags : [readPreference.tags];
+
+ // Iterate over the tags
+ for(var j = 0; j < tagsArray.length; j++) {
+ var tags = tagsArray[j];
+
+ // Iterate over all the servers
+ for(var i = 0; i < servers.length; i++) {
+ var serverTag = servers[i].lastIsMaster().tags || {};
+
+ // Did we find the a matching server
+ var found = true;
+ // Check if the server is valid
+ for(var name in tags) {
+ if(serverTag[name] != tags[name]) {
+ found = false;
+ }
+ }
+
+ // Add to candidate list
+ if(found) {
+ filteredServers.push(servers[i]);
+ }
+ }
+ }
+
+ // Returned filtered servers
+ return filteredServers;
+}
+
+function pickNearestMaxStalenessSeconds(self, readPreference) {
+ // Only get primary and secondaries as seeds
+ var servers = [];
+ var heartbeatFrequencyMS = self.heartbeatFrequencyMS;
+
+ // Get the maxStalenessMS
+ var maxStalenessMS = readPreference.maxStalenessSeconds * 1000;
+
+ // Check if the maxStalenessMS > 90 seconds
+ if(maxStalenessMS < 90 * 1000) {
+ return new MongoError('maxStalenessSeconds must be set to at least 90 seconds');
+ }
+
+ // Add primary to list if not a secondary read preference
+ if(self.primary && readPreference.preference != 'secondary') {
+ servers.push(self.primary);
+ }
+
+ // Add all the secondaries
+ for(var i = 0; i < self.secondaries.length; i++) {
+ servers.push(self.secondaries[i]);
+ }
+
+ // Filter by tags
+ servers = filterByTags(readPreference, servers);
+
+ //
+ // Locate lowest time (picked servers are lowest time + acceptable Latency margin)
+ // var lowest = servers.length > 0 ? servers[0].lastIsMasterMS : 0;
+
+ // Filter by latency
+ servers = servers.filter(function(s) {
+ return s.staleness <= maxStalenessMS;
+ });
+
+ // Sort by time
+ servers.sort(function(a, b) {
+ // return a.time > b.time;
+ return a.lastIsMasterMS > b.lastIsMasterMS
+ });
+
+ // No servers, default to primary
+ if(servers.length == 0) {
+ return null
+ }
+
+ // Ensure index does not overflow the number of available servers
+ self.index = self.index % servers.length;
+
+ // Get the server
+ var server = servers[self.index];
+ // Add to the index
+ self.index = self.index + 1;
+ // Return the first server of the sorted and filtered list
+ return server;
+}
+
+function pickNearest(self, readPreference) {
+ // Only get primary and secondaries as seeds
+ var servers = [];
+
+ // Add primary to list if not a secondary read preference
+ if(self.primary && readPreference.preference != 'secondary') {
+ servers.push(self.primary);
+ }
+
+ // Add all the secondaries
+ for(var i = 0; i < self.secondaries.length; i++) {
+ servers.push(self.secondaries[i]);
+ }
+
+ // Filter by tags
+ servers = filterByTags(readPreference, servers);
+
+ // Sort by time
+ servers.sort(function(a, b) {
+ // return a.time > b.time;
+ return a.lastIsMasterMS > b.lastIsMasterMS
+ });
+
+ // Locate lowest time (picked servers are lowest time + acceptable Latency margin)
+ var lowest = servers.length > 0 ? servers[0].lastIsMasterMS : 0;
+
+ // Filter by latency
+ servers = servers.filter(function(s) {
+ return s.lastIsMasterMS <= lowest + self.acceptableLatency;
+ });
+
+ // No servers, default to primary
+ if(servers.length == 0) {
+ return null
+ }
+
+ // Ensure index does not overflow the number of available servers
+ self.index = self.index % servers.length;
+ // Get the server
+ var server = servers[self.index];
+ // Add to the index
+ self.index = self.index + 1;
+ // Return the first server of the sorted and filtered list
+ return server;
+}
+
+function inList(ismaster, server, list) {
+ for(var i = 0; i < list.length; i++) {
+ if(list[i].name == server.name) return true;
+ }
+
+ return false;
+}
+
+function addToList(self, type, ismaster, server, list) {
+ // Update set information about the server instance
+ self.set[server.name.toLowerCase()].type = type;
+ self.set[server.name.toLowerCase()].electionId = ismaster ? ismaster.electionId : ismaster;
+ self.set[server.name.toLowerCase()].setName = ismaster ? ismaster.setName : ismaster;
+ self.set[server.name.toLowerCase()].setVersion = ismaster ? ismaster.setVersion : ismaster;
+ // Add to the list
+ list.push(server);
+}
+
+function compareObjectIds(id1, id2) {
+ var a = new Buffer(id1.toHexString(), 'hex');
+ var b = new Buffer(id2.toHexString(), 'hex');
+
+ if(a === b) {
+ return 0;
+ }
+
+ if(typeof Buffer.compare === 'function') {
+ return Buffer.compare(a, b);
+ }
+
+ var x = a.length;
+ var y = b.length;
+ var len = Math.min(x, y);
+
+ for (var i = 0; i < len; i++) {
+ if (a[i] !== b[i]) {
+ break;
+ }
+ }
+
+ if (i !== len) {
+ x = a[i];
+ y = b[i];
+ }
+
+ return x < y ? -1 : y < x ? 1 : 0;
+}
+
+function removeFrom(server, list) {
+ for(var i = 0; i < list.length; i++) {
+ if(list[i].equals && list[i].equals(server)) {
+ list.splice(i, 1);
+ return true;
+ } else if(typeof list[i] == 'string' && list[i] == server.name) {
+ list.splice(i, 1);
+ return true;
+ }
+ }
+
+ return false;
+}
+
+function emitTopologyDescriptionChanged(self) {
+ if(self.listeners('topologyDescriptionChanged').length > 0) {
+ var topology = 'Unknown';
+ var setName = self.setName;
+
+ if(self.hasPrimaryAndSecondary()) {
+ topology = 'ReplicaSetWithPrimary';
+ } else if(!self.hasPrimary() && self.hasSecondary()) {
+ topology = 'ReplicaSetNoPrimary';
+ }
+
+ // Generate description
+ var description = {
+ topologyType: topology,
+ setName: setName,
+ servers: []
+ }
+
+ // Add the primary to the list
+ if(self.hasPrimary()) {
+ var desc = self.primary.getDescription();
+ desc.type = 'RSPrimary';
+ description.servers.push(desc);
+ }
+
+ // Add all the secondaries
+ description.servers = description.servers.concat(self.secondaries.map(function(x) {
+ var description = x.getDescription();
+ description.type = 'RSSecondary';
+ return description;
+ }));
+
+ // Add all the arbiters
+ description.servers = description.servers.concat(self.arbiters.map(function(x) {
+ var description = x.getDescription();
+ description.type = 'RSArbiter';
+ return description;
+ }));
+
+ // Add all the passives
+ description.servers = description.servers.concat(self.passives.map(function(x) {
+ var description = x.getDescription();
+ description.type = 'RSSecondary';
+ return description;
+ }));
+
+ // Create the result
+ var result = {
+ topologyId: self.id,
+ previousDescription: self.replicasetDescription,
+ newDescription: description,
+ diff: diff(self.replicasetDescription, description)
+ };
+
+ // Emit the topologyDescription change
+ self.emit('topologyDescriptionChanged', result);
+
+ // Set the new description
+ self.replicasetDescription = description;
+ }
+}
+
+function diff(previous, current) {
+ // Difference document
+ var diff = {
+ servers: []
+ }
+
+ // Previous entry
+ if(!previous) {
+ previous = { servers: [] };
+ }
+
+ // Got through all the servers
+ for(var i = 0; i < previous.servers.length; i++) {
+ var prevServer = previous.servers[i];
+
+ // Go through all current servers
+ for(var j = 0; j < current.servers.length; j++) {
+ var currServer = current.servers[j];
+
+ // Matching server
+ if(prevServer.address === currServer.address) {
+ // We had a change in state
+ if(prevServer.type != currServer.type) {
+ diff.servers.push({
+ address: prevServer.address,
+ from: prevServer.type,
+ to: currServer.type
+ });
+ }
+ }
+ }
+ }
+
+ // Return difference
+ return diff;
+}
+
+module.exports = ReplSetState;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js
new file mode 100644
index 0000000..fac82b5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js
@@ -0,0 +1,855 @@
+"use strict"
+
+var inherits = require('util').inherits,
+ require_optional = require('require_optional'),
+ f = require('util').format,
+ EventEmitter = require('events').EventEmitter,
+ ReadPreference = require('./read_preference'),
+ Logger = require('../connection/logger'),
+ debugOptions = require('../connection/utils').debugOptions,
+ retrieveBSON = require('../connection/utils').retrieveBSON,
+ Pool = require('../connection/pool'),
+ Query = require('../connection/commands').Query,
+ MongoError = require('../error'),
+ PreTwoSixWireProtocolSupport = require('../wireprotocol/2_4_support'),
+ TwoSixWireProtocolSupport = require('../wireprotocol/2_6_support'),
+ ThreeTwoWireProtocolSupport = require('../wireprotocol/3_2_support'),
+ BasicCursor = require('../cursor'),
+ sdam = require('./shared'),
+ assign = require('./shared').assign,
+ createClientInfo = require('./shared').createClientInfo;
+
+// Used for filtering out fields for loggin
+var debugFields = ['reconnect', 'reconnectTries', 'reconnectInterval', 'emitError', 'cursorFactory', 'host'
+ , 'port', 'size', 'keepAlive', 'keepAliveInitialDelay', 'noDelay', 'connectionTimeout', 'checkServerIdentity'
+ , 'socketTimeout', 'singleBufferSerializtion', 'ssl', 'ca', 'cert', 'key', 'rejectUnauthorized', 'promoteLongs', 'promoteValues'
+ , 'promoteBuffers', 'servername'];
+
+// Server instance id
+var id = 0;
+var serverAccounting = false;
+var servers = {};
+var BSON = retrieveBSON();
+
+/**
+ * Creates a new Server instance
+ * @class
+ * @param {boolean} [options.reconnect=true] Server will attempt to reconnect on loss of connection
+ * @param {number} [options.reconnectTries=30] Server attempt to reconnect #times
+ * @param {number} [options.reconnectInterval=1000] Server will wait # milliseconds between retries
+ * @param {number} [options.monitoring=true] Enable the server state monitoring (calling ismaster at monitoringInterval)
+ * @param {number} [options.monitoringInterval=5000] The interval of calling ismaster when monitoring is enabled.
+ * @param {Cursor} [options.cursorFactory=Cursor] The cursor factory class used for all query cursors
+ * @param {string} options.host The server host
+ * @param {number} options.port The server port
+ * @param {number} [options.size=5] Server connection pool size
+ * @param {boolean} [options.keepAlive=true] TCP Connection keep alive enabled
+ * @param {number} [options.keepAliveInitialDelay=0] Initial delay before TCP keep alive enabled
+ * @param {boolean} [options.noDelay=true] TCP Connection no delay
+ * @param {number} [options.connectionTimeout=0] TCP Connection timeout setting
+ * @param {number} [options.socketTimeout=0] TCP Socket timeout setting
+ * @param {boolean} [options.ssl=false] Use SSL for connection
+ * @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
+ * @param {Buffer} [options.ca] SSL Certificate store binary buffer
+ * @param {Buffer} [options.cert] SSL Certificate binary buffer
+ * @param {Buffer} [options.key] SSL Key file binary buffer
+ * @param {string} [options.passphrase] SSL Certificate pass phrase
+ * @param {boolean} [options.rejectUnauthorized=true] Reject unauthorized server certificates
+ * @param {string} [options.servername=null] String containing the server name requested via TLS SNI.
+ * @param {boolean} [options.promoteLongs=true] Convert Long values from the db into Numbers if they fit into 53 bits
+ * @param {boolean} [options.promoteValues=true] Promotes BSON values to native types where possible, set to false to only receive wrapper types.
+ * @param {boolean} [options.promoteBuffers=false] Promotes Binary BSON values to native Node Buffers.
+ * @param {string} [options.appname=null] Application name, passed in on ismaster call and logged in mongod server logs. Maximum size 128 bytes.
+ * @param {boolean} [options.domainsEnabled=false] Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit.
+ * @return {Server} A cursor instance
+ * @fires Server#connect
+ * @fires Server#close
+ * @fires Server#error
+ * @fires Server#timeout
+ * @fires Server#parseError
+ * @fires Server#reconnect
+ * @fires Server#reconnectFailed
+ * @fires Server#serverHeartbeatStarted
+ * @fires Server#serverHeartbeatSucceeded
+ * @fires Server#serverHeartbeatFailed
+ * @fires Server#topologyOpening
+ * @fires Server#topologyClosed
+ * @fires Server#topologyDescriptionChanged
+ * @property {string} type the topology type.
+ * @property {string} parserType the parser type used (c++ or js).
+ */
+var Server = function(options) {
+ options = options || {};
+
+ // Add event listener
+ EventEmitter.call(this);
+
+ // Server instance id
+ this.id = id++;
+
+ // Internal state
+ this.s = {
+ // Options
+ options: options,
+ // Logger
+ logger: Logger('Server', options),
+ // Factory overrides
+ Cursor: options.cursorFactory || BasicCursor,
+ // BSON instance
+ bson: options.bson || new BSON([BSON.Binary, BSON.Code, BSON.DBRef, BSON.Decimal128,
+ BSON.Double, BSON.Int32, BSON.Long, BSON.Map, BSON.MaxKey, BSON.MinKey,
+ BSON.ObjectId, BSON.BSONRegExp, BSON.Symbol, BSON.Timestamp]),
+ // Pool
+ pool: null,
+ // Disconnect handler
+ disconnectHandler: options.disconnectHandler,
+ // Monitor thread (keeps the connection alive)
+ monitoring: typeof options.monitoring == 'boolean' ? options.monitoring : true,
+ // Is the server in a topology
+ inTopology: typeof options.inTopology == 'boolean' ? options.inTopology : false,
+ // Monitoring timeout
+ monitoringInterval: typeof options.monitoringInterval == 'number'
+ ? options.monitoringInterval
+ : 5000,
+ // Topology id
+ topologyId: -1
+ }
+
+ // Curent ismaster
+ this.ismaster = null;
+ // Current ping time
+ this.lastIsMasterMS = -1;
+ // The monitoringProcessId
+ this.monitoringProcessId = null;
+ // Initial connection
+ this.initalConnect = true;
+ // Wire protocol handler, default to oldest known protocol handler
+ // this gets changed when the first ismaster is called.
+ this.wireProtocolHandler = new PreTwoSixWireProtocolSupport();
+ // Default type
+ this._type = 'server';
+ // Set the client info
+ this.clientInfo = createClientInfo(options);
+
+ // Max Stalleness values
+ // last time we updated the ismaster state
+ this.lastUpdateTime = 0;
+ // Last write time
+ this.lastWriteDate = 0;
+ // Stalleness
+ this.staleness = 0;
+}
+
+inherits(Server, EventEmitter);
+
+Object.defineProperty(Server.prototype, 'type', {
+ enumerable:true, get: function() { return this._type; }
+});
+
+Object.defineProperty(Server.prototype, 'parserType', {
+ enumerable:true, get: function() {
+ return BSON.native ? "c++" : "js";
+ }
+});
+
+Server.enableServerAccounting = function() {
+ serverAccounting = true;
+ servers = {};
+}
+
+Server.disableServerAccounting = function() {
+ serverAccounting = false;
+}
+
+Server.servers = function() {
+ return servers;
+}
+
+Object.defineProperty(Server.prototype, 'name', {
+ enumerable:true,
+ get: function() { return this.s.options.host + ":" + this.s.options.port; }
+});
+
+function configureWireProtocolHandler(self, ismaster) {
+ // 3.2 wire protocol handler
+ if(ismaster.maxWireVersion >= 4) {
+ return new ThreeTwoWireProtocolSupport(new TwoSixWireProtocolSupport());
+ }
+
+ // 2.6 wire protocol handler
+ if(ismaster.maxWireVersion >= 2) {
+ return new TwoSixWireProtocolSupport();
+ }
+
+ // 2.4 or earlier wire protocol handler
+ return new PreTwoSixWireProtocolSupport();
+}
+
+function disconnectHandler(self, type, ns, cmd, options, callback) {
+ // Topology is not connected, save the call in the provided store to be
+ // Executed at some point when the handler deems it's reconnected
+ if(!self.s.pool.isConnected() && self.s.disconnectHandler != null && !options.monitoring) {
+ self.s.disconnectHandler.add(type, ns, cmd, options, callback);
+ return true;
+ }
+
+ // If we have no connection error
+ if(!self.s.pool.isConnected()) {
+ callback(MongoError.create(f("no connection available to server %s", self.name)));
+ return true;
+ }
+}
+
+function monitoringProcess(self) {
+ return function() {
+ // Pool was destroyed do not continue process
+ if(self.s.pool.isDestroyed()) return;
+ // Emit monitoring Process event
+ self.emit('monitoring', self);
+ // Perform ismaster call
+ // Query options
+ var queryOptions = { numberToSkip: 0, numberToReturn: -1, checkKeys: false, slaveOk: true };
+ // Create a query instance
+ var query = new Query(self.s.bson, 'admin.$cmd', {ismaster:true}, queryOptions);
+ // Get start time
+ var start = new Date().getTime();
+ // Execute the ismaster query
+ self.s.pool.write(query, {
+ socketTimeout: self.s.options.connectionTimeout || 2000,
+ }, function(err, result) {
+ // Set initial lastIsMasterMS
+ self.lastIsMasterMS = new Date().getTime() - start;
+ if(self.s.pool.isDestroyed()) return;
+ // Update the ismaster view if we have a result
+ if(result) {
+ self.ismaster = result.result;
+ }
+ // Re-schedule the monitoring process
+ self.monitoringProcessId = setTimeout(monitoringProcess(self), self.s.monitoringInterval);
+ });
+ }
+}
+
+var eventHandler = function(self, event) {
+ return function(err) {
+ // Log information of received information if in info mode
+ if(self.s.logger.isInfo()) {
+ var object = err instanceof MongoError ? JSON.stringify(err) : {}
+ self.s.logger.info(f('server %s fired event %s out with message %s'
+ , self.name, event, object));
+ }
+
+ // Handle connect event
+ if(event == 'connect') {
+ // Issue an ismaster command at connect
+ // Query options
+ var queryOptions = { numberToSkip: 0, numberToReturn: -1, checkKeys: false, slaveOk: true };
+ // Create a query instance
+ var query = new Query(self.s.bson, 'admin.$cmd', {ismaster:true, client: self.clientInfo}, queryOptions);
+ // Get start time
+ var start = new Date().getTime();
+ // Execute the ismaster query
+ self.s.pool.write(query, {
+ socketTimeout: self.s.options.connectionTimeout || 2000,
+ }, function(err, result) {
+ // Set initial lastIsMasterMS
+ self.lastIsMasterMS = new Date().getTime() - start;
+ if(err) {
+ self.destroy();
+ if(self.listeners('error').length > 0) self.emit('error', err);
+ return;
+ }
+
+ // Ensure no error emitted after initial connect when reconnecting
+ self.initalConnect = false;
+ // Save the ismaster
+ self.ismaster = result.result;
+
+ // It's a proxy change the type so
+ // the wireprotocol will send $readPreference
+ if(self.ismaster.msg == 'isdbgrid') {
+ self._type = 'mongos';
+ }
+ // Add the correct wire protocol handler
+ self.wireProtocolHandler = configureWireProtocolHandler(self, self.ismaster);
+ // Have we defined self monitoring
+ if(self.s.monitoring) {
+ self.monitoringProcessId = setTimeout(monitoringProcess(self), self.s.monitoringInterval);
+ }
+
+ // Emit server description changed if something listening
+ sdam.emitServerDescriptionChanged(self, {
+ address: self.name, arbiters: [], hosts: [], passives: [], type: !self.s.inTopology ? 'Standalone' : sdam.getTopologyType(self)
+ });
+
+ // Emit topology description changed if something listening
+ sdam.emitTopologyDescriptionChanged(self, {
+ topologyType: 'Single', servers: [{address: self.name, arbiters: [], hosts: [], passives: [], type: 'Standalone'}]
+ });
+
+ // Log the ismaster if available
+ if(self.s.logger.isInfo()) {
+ self.s.logger.info(f('server %s connected with ismaster [%s]', self.name, JSON.stringify(self.ismaster)));
+ }
+
+ // Emit connect
+ self.emit('connect', self);
+ });
+ } else if(event == 'error' || event == 'parseError'
+ || event == 'close' || event == 'timeout' || event == 'reconnect'
+ || event == 'attemptReconnect' || 'reconnectFailed') {
+ // Remove server instance from accounting
+ if(serverAccounting && ['close', 'timeout', 'error', 'parseError', 'reconnectFailed'].indexOf(event) != -1) {
+ // Emit toplogy opening event if not in topology
+ if(!self.s.inTopology) {
+ self.emit('topologyOpening', { topologyId: self.id });
+ }
+
+ delete servers[self.id];
+ }
+
+ // Reconnect failed return error
+ if(event == 'reconnectFailed') {
+ self.emit('reconnectFailed', err);
+ // Emit error if any listeners
+ if(self.listeners('error').length > 0) {
+ self.emit('error', err);
+ }
+ // Terminate
+ return;
+ }
+
+ // On first connect fail
+ if(self.s.pool.state == 'disconnected' && self.initalConnect && ['close', 'timeout', 'error', 'parseError'].indexOf(event) != -1) {
+ self.initalConnect = false;
+ return self.emit('error', new MongoError(f('failed to connect to server [%s] on first connect', self.name)));
+ }
+
+ // Reconnect event, emit the server
+ if(event == 'reconnect') {
+ return self.emit(event, self);
+ }
+
+ // Emit the event
+ self.emit(event, err);
+ }
+ }
+}
+
+/**
+ * Initiate server connect
+ * @method
+ * @param {array} [options.auth=null] Array of auth options to apply on connect
+ */
+Server.prototype.connect = function(options) {
+ var self = this;
+ options = options || {};
+
+ // Set the connections
+ if(serverAccounting) servers[this.id] = this;
+
+ // Do not allow connect to be called on anything that's not disconnected
+ if(self.s.pool && !self.s.pool.isDisconnected() && !self.s.pool.isDestroyed()) {
+ throw MongoError.create(f('server instance in invalid state %s', self.s.state));
+ }
+
+ // Create a pool
+ self.s.pool = new Pool(assign(self.s.options, options, {bson: this.s.bson}));
+
+ // Set up listeners
+ self.s.pool.on('close', eventHandler(self, 'close'));
+ self.s.pool.on('error', eventHandler(self, 'error'));
+ self.s.pool.on('timeout', eventHandler(self, 'timeout'));
+ self.s.pool.on('parseError', eventHandler(self, 'parseError'));
+ self.s.pool.on('connect', eventHandler(self, 'connect'));
+ self.s.pool.on('reconnect', eventHandler(self, 'reconnect'));
+ self.s.pool.on('reconnectFailed', eventHandler(self, 'reconnectFailed'));
+
+ // Emit toplogy opening event if not in topology
+ if(!self.s.inTopology) {
+ this.emit('topologyOpening', { topologyId: self.id });
+ }
+
+ // Emit opening server event
+ self.emit('serverOpening', {
+ topologyId: self.s.topologyId != -1 ? self.s.topologyId : self.id,
+ address: self.name
+ });
+
+ // Connect with optional auth settings
+ if(options.auth) {
+ self.s.pool.connect.apply(self.s.pool, options.auth);
+ } else {
+ self.s.pool.connect();
+ }
+}
+
+/**
+ * Get the server description
+ * @method
+ * @return {object}
+*/
+Server.prototype.getDescription = function() {
+ var ismaster = this.ismaster || {};
+ var description = {
+ type: sdam.getTopologyType(this),
+ address: this.name,
+ };
+
+ // Add fields if available
+ if(ismaster.hosts) description.hosts = ismaster.hosts;
+ if(ismaster.arbiters) description.arbiters = ismaster.arbiters;
+ if(ismaster.passives) description.passives = ismaster.passives;
+ if(ismaster.setName) description.setName = ismaster.setName;
+ return description;
+}
+
+/**
+ * Returns the last known ismaster document for this server
+ * @method
+ * @return {object}
+ */
+Server.prototype.lastIsMaster = function() {
+ return this.ismaster;
+}
+
+/**
+ * Unref all connections belong to this server
+ * @method
+ */
+Server.prototype.unref = function() {
+ this.s.pool.unref();
+}
+
+/**
+ * Figure out if the server is connected
+ * @method
+ * @return {boolean}
+ */
+Server.prototype.isConnected = function() {
+ if(!this.s.pool) return false;
+ return this.s.pool.isConnected();
+}
+
+/**
+ * Figure out if the server instance was destroyed by calling destroy
+ * @method
+ * @return {boolean}
+ */
+Server.prototype.isDestroyed = function() {
+ if(!this.s.pool) return false;
+ return this.s.pool.isDestroyed();
+}
+
+function basicWriteValidations(self) {
+ if(!self.s.pool) return MongoError.create('server instance is not connected');
+ if(self.s.pool.isDestroyed()) return MongoError.create('server instance pool was destroyed');
+}
+
+function basicReadValidations(self, options) {
+ basicWriteValidations(self, options);
+
+ if(options.readPreference && !(options.readPreference instanceof ReadPreference)) {
+ throw new Error("readPreference must be an instance of ReadPreference");
+ }
+}
+
+/**
+ * Execute a command
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {object} cmd The command hash
+ * @param {ReadPreference} [options.readPreference] Specify read preference if command supports it
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {Boolean} [options.fullResult=false] Return the full envelope instead of just the result document.
+ * @param {opResultCallback} callback A callback function
+ */
+Server.prototype.command = function(ns, cmd, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ var result = basicReadValidations(self, options);
+ if(result) return callback(result);
+
+ // Debug log
+ if(self.s.logger.isDebug()) self.s.logger.debug(f('executing command [%s] against %s', JSON.stringify({
+ ns: ns, cmd: cmd, options: debugOptions(debugFields, options)
+ }), self.name));
+
+ // If we are not connected or have a disconnectHandler specified
+ if(disconnectHandler(self, 'command', ns, cmd, options, callback)) return;
+
+ // Check if we have collation support
+ if(this.ismaster && this.ismaster.maxWireVersion < 5 && cmd.collation) {
+ return callback(new MongoError(f('server %s does not support collation', this.name)));
+ }
+
+ // Query options
+ var queryOptions = {
+ numberToSkip: 0,
+ numberToReturn: -1,
+ checkKeys: typeof options.checkKeys == 'boolean' ? options.checkKeys: false,
+ serializeFunctions: typeof options.serializeFunctions == 'boolean' ? options.serializeFunctions : false,
+ ignoreUndefined: typeof options.ignoreUndefined == 'boolean' ? options.ignoreUndefined : false
+ };
+
+ // Create a query instance
+ var query = new Query(self.s.bson, ns, cmd, queryOptions);
+ // Set slave OK of the query
+ query.slaveOk = options.readPreference ? options.readPreference.slaveOk() : false;
+
+ // Write options
+ var writeOptions = {
+ raw: typeof options.raw == 'boolean' ? options.raw : false,
+ promoteLongs: typeof options.promoteLongs == 'boolean' ? options.promoteLongs : true,
+ promoteValues: typeof options.promoteValues == 'boolean' ? options.promoteValues : true,
+ promoteBuffers: typeof options.promoteBuffers == 'boolean' ? options.promoteBuffers : false,
+ command: true,
+ monitoring: typeof options.monitoring == 'boolean' ? options.monitoring : false,
+ fullResult: typeof options.fullResult == 'boolean' ? options.fullResult : false,
+ requestId: query.requestId,
+ socketTimeout: typeof options.socketTimeout == 'number' ? options.socketTimeout : null,
+ };
+
+ // Write the operation to the pool
+ self.s.pool.write(query, writeOptions, callback);
+}
+
+/**
+ * Insert one or more documents
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {array} ops An array of documents to insert
+ * @param {boolean} [options.ordered=true] Execute in order or out of order
+ * @param {object} [options.writeConcern={}] Write concern for the operation
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+Server.prototype.insert = function(ns, ops, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ var result = basicWriteValidations(self, options);
+ if(result) return callback(result);
+
+ // If we are not connected or have a disconnectHandler specified
+ if(disconnectHandler(self, 'insert', ns, ops, options, callback)) return;
+
+ // Setup the docs as an array
+ ops = Array.isArray(ops) ? ops : [ops];
+
+ // Execute write
+ return self.wireProtocolHandler.insert(self.s.pool, self.ismaster, ns, self.s.bson, ops, options, callback);
+}
+
+/**
+ * Perform one or more update operations
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {array} ops An array of updates
+ * @param {boolean} [options.ordered=true] Execute in order or out of order
+ * @param {object} [options.writeConcern={}] Write concern for the operation
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+Server.prototype.update = function(ns, ops, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ var result = basicWriteValidations(self, options);
+ if(result) return callback(result);
+
+ // If we are not connected or have a disconnectHandler specified
+ if(disconnectHandler(self, 'update', ns, ops, options, callback)) return;
+
+ // Check if we have collation support
+ if(this.ismaster && this.ismaster.maxWireVersion < 5 && options.collation) {
+ return callback(new MongoError(f('server %s does not support collation', this.name)));
+ }
+
+ // Setup the docs as an array
+ ops = Array.isArray(ops) ? ops : [ops];
+ // Execute write
+ return self.wireProtocolHandler.update(self.s.pool, self.ismaster, ns, self.s.bson, ops, options, callback);
+}
+
+/**
+ * Perform one or more remove operations
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {array} ops An array of removes
+ * @param {boolean} [options.ordered=true] Execute in order or out of order
+ * @param {object} [options.writeConcern={}] Write concern for the operation
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+Server.prototype.remove = function(ns, ops, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ var result = basicWriteValidations(self, options);
+ if(result) return callback(result);
+
+ // If we are not connected or have a disconnectHandler specified
+ if(disconnectHandler(self, 'remove', ns, ops, options, callback)) return;
+
+ // Check if we have collation support
+ if(this.ismaster && this.ismaster.maxWireVersion < 5 && options.collation) {
+ return callback(new MongoError(f('server %s does not support collation', this.name)));
+ }
+
+ // Setup the docs as an array
+ ops = Array.isArray(ops) ? ops : [ops];
+ // Execute write
+ return self.wireProtocolHandler.remove(self.s.pool, self.ismaster, ns, self.s.bson, ops, options, callback);
+}
+
+/**
+ * Get a new cursor
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {{object}|{Long}} cmd Can be either a command returning a cursor or a cursorId
+ * @param {object} [options.batchSize=0] Batchsize for the operation
+ * @param {array} [options.documents=[]] Initial documents list for cursor
+ * @param {ReadPreference} [options.readPreference] Specify read preference if command supports it
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+Server.prototype.cursor = function(ns, cmd, cursorOptions) {
+ var s = this.s;
+ cursorOptions = cursorOptions || {};
+ // Set up final cursor type
+ var FinalCursor = cursorOptions.cursorFactory || s.Cursor;
+ // Return the cursor
+ return new FinalCursor(s.bson, ns, cmd, cursorOptions, this, s.options);
+}
+
+/**
+ * Logout from a database
+ * @method
+ * @param {string} db The db we are logging out from
+ * @param {authResultCallback} callback A callback function
+ */
+Server.prototype.logout = function(dbName, callback) {
+ this.s.pool.logout(dbName, callback);
+}
+
+/**
+ * Authenticate using a specified mechanism
+ * @method
+ * @param {string} mechanism The Auth mechanism we are invoking
+ * @param {string} db The db we are invoking the mechanism against
+ * @param {...object} param Parameters for the specific mechanism
+ * @param {authResultCallback} callback A callback function
+ */
+Server.prototype.auth = function(mechanism, db) {
+ var self = this;
+
+ // If we have the default mechanism we pick mechanism based on the wire
+ // protocol max version. If it's >= 3 then scram-sha1 otherwise mongodb-cr
+ if(mechanism == 'default' && self.ismaster && self.ismaster.maxWireVersion >= 3) {
+ mechanism = 'scram-sha-1';
+ } else if(mechanism == 'default') {
+ mechanism = 'mongocr';
+ }
+
+ // Slice all the arguments off
+ var args = Array.prototype.slice.call(arguments, 0);
+ // Set the mechanism
+ args[0] = mechanism;
+ // Get the callback
+ var callback = args[args.length - 1];
+
+ // If we are not connected or have a disconnectHandler specified
+ if(disconnectHandler(self, 'auth', db, args, {}, callback)) {
+ return;
+ }
+
+ // Do not authenticate if we are an arbiter
+ if(this.lastIsMaster() && this.lastIsMaster().arbiterOnly) {
+ return callback(null, true);
+ }
+
+ // Apply the arguments to the pool
+ self.s.pool.auth.apply(self.s.pool, args);
+}
+
+/**
+ * Compare two server instances
+ * @method
+ * @param {Server} server Server to compare equality against
+ * @return {boolean}
+ */
+Server.prototype.equals = function(server) {
+ if(typeof server == 'string') return this.name == server;
+ if(server.name) return this.name == server.name;
+ return false;
+}
+
+/**
+ * All raw connections
+ * @method
+ * @return {Connection[]}
+ */
+Server.prototype.connections = function() {
+ return this.s.pool.allConnections();
+}
+
+/**
+ * Get server
+ * @method
+ * @return {Server}
+ */
+Server.prototype.getServer = function() {
+ return this;
+}
+
+/**
+ * Get connection
+ * @method
+ * @return {Connection}
+ */
+Server.prototype.getConnection = function() {
+ return this.s.pool.get();
+}
+
+var listeners = ['close', 'error', 'timeout', 'parseError', 'connect'];
+
+/**
+ * Destroy the server connection
+ * @method
+ * @param {boolean} [options.emitClose=false] Emit close event on destroy
+ * @param {boolean} [options.emitDestroy=false] Emit destroy event on destroy
+ * @param {boolean} [options.force=false] Force destroy the pool
+ */
+Server.prototype.destroy = function(options) {
+ options = options || {};
+ var self = this;
+
+ // Set the connections
+ if(serverAccounting) delete servers[this.id];
+
+ // Destroy the monitoring process if any
+ if(this.monitoringProcessId) {
+ clearTimeout(this.monitoringProcessId);
+ }
+
+ // Emit close event
+ if(options.emitClose) {
+ self.emit('close', self);
+ }
+
+ // Emit destroy event
+ if(options.emitDestroy) {
+ self.emit('destroy', self);
+ }
+
+ // Remove all listeners
+ listeners.forEach(function(event) {
+ self.s.pool.removeAllListeners(event);
+ });
+
+ // Emit opening server event
+ if(self.listeners('serverClosed').length > 0) self.emit('serverClosed', {
+ topologyId: self.s.topologyId != -1 ? self.s.topologyId : self.id, address: self.name
+ });
+
+ // Emit toplogy opening event if not in topology
+ if(self.listeners('topologyClosed').length > 0 && !self.s.inTopology) {
+ self.emit('topologyClosed', { topologyId: self.id });
+ }
+
+ if(self.s.logger.isDebug()) {
+ self.s.logger.debug(f('destroy called on server %s', self.name));
+ }
+
+ // Destroy the pool
+ this.s.pool.destroy(options.force);
+}
+
+/**
+ * A server connect event, used to verify that the connection is up and running
+ *
+ * @event Server#connect
+ * @type {Server}
+ */
+
+/**
+ * A server reconnect event, used to verify that the server topology has reconnected
+ *
+ * @event Server#reconnect
+ * @type {Server}
+ */
+
+/**
+ * A server opening SDAM monitoring event
+ *
+ * @event Server#serverOpening
+ * @type {object}
+ */
+
+/**
+ * A server closed SDAM monitoring event
+ *
+ * @event Server#serverClosed
+ * @type {object}
+ */
+
+/**
+ * A server description SDAM change monitoring event
+ *
+ * @event Server#serverDescriptionChanged
+ * @type {object}
+ */
+
+/**
+ * A topology open SDAM event
+ *
+ * @event Server#topologyOpening
+ * @type {object}
+ */
+
+/**
+ * A topology closed SDAM event
+ *
+ * @event Server#topologyClosed
+ * @type {object}
+ */
+
+/**
+ * A topology structure SDAM change event
+ *
+ * @event Server#topologyDescriptionChanged
+ * @type {object}
+ */
+
+/**
+ * Server reconnect failed
+ *
+ * @event Server#reconnectFailed
+ * @type {Error}
+ */
+
+/**
+ * Server connection pool closed
+ *
+ * @event Server#close
+ * @type {object}
+ */
+
+/**
+ * Server connection pool caused an error
+ *
+ * @event Server#error
+ * @type {Error}
+ */
+
+/**
+ * Server destroyed was called
+ *
+ * @event Server#destroy
+ * @type {Server}
+ */
+
+module.exports = Server;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/shared.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/shared.js
new file mode 100644
index 0000000..8cc019c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/shared.js
@@ -0,0 +1,225 @@
+"use strict"
+
+var os = require('os'),
+ f = require('util').format;
+
+/**
+ * Emit event if it exists
+ * @method
+ */
+function emitSDAMEvent(self, event, description) {
+ if(self.listeners(event).length > 0) {
+ self.emit(event, description);
+ }
+}
+
+// Get package.json variable
+var driverVersion = require(__dirname + '/../../package.json').version;
+var nodejsversion = f('Node.js %s, %s', process.version, os.endianness());
+var type = os.type();
+var name = process.platform;
+var architecture = process.arch;
+var release = os.release();
+
+function createClientInfo(options) {
+ // Build default client information
+ var clientInfo = options.clientInfo ? clone(options.clientInfo) : {
+ driver: {
+ name: "nodejs-core",
+ version: driverVersion
+ },
+ os: {
+ type: type,
+ name: name,
+ architecture: architecture,
+ version: release
+ }
+ }
+
+ // Is platform specified
+ if(clientInfo.platform && clientInfo.platform.indexOf('mongodb-core') == -1) {
+ clientInfo.platform = f('%s, mongodb-core: %s', clientInfo.platform, driverVersion);
+ } else if(!clientInfo.platform){
+ clientInfo.platform = nodejsversion;
+ }
+
+ // Do we have an application specific string
+ if(options.appname) {
+ // Cut at 128 bytes
+ var buffer = new Buffer(options.appname);
+ // Return the truncated appname
+ var appname = buffer.length > 128 ? buffer.slice(0, 128).toString('utf8') : options.appname;
+ // Add to the clientInfo
+ clientInfo.application = { name: appname };
+ }
+
+ return clientInfo;
+}
+
+function clone(object) {
+ return JSON.parse(JSON.stringify(object));
+}
+
+var getPreviousDescription = function(self) {
+ if(!self.s.serverDescription) {
+ self.s.serverDescription = {
+ address: self.name,
+ arbiters: [], hosts: [], passives: [], type: 'Unknown'
+ }
+ }
+
+ return self.s.serverDescription;
+}
+
+var emitServerDescriptionChanged = function(self, description) {
+ if(self.listeners('serverDescriptionChanged').length > 0) {
+ // Emit the server description changed events
+ self.emit('serverDescriptionChanged', {
+ topologyId: self.s.topologyId != -1 ? self.s.topologyId : self.id, address: self.name,
+ previousDescription: getPreviousDescription(self),
+ newDescription: description
+ });
+
+ self.s.serverDescription = description;
+ }
+}
+
+var getPreviousTopologyDescription = function(self) {
+ if(!self.s.topologyDescription) {
+ self.s.topologyDescription = {
+ topologyType: 'Unknown',
+ servers: [{
+ address: self.name, arbiters: [], hosts: [], passives: [], type: 'Unknown'
+ }]
+ }
+ }
+
+ return self.s.topologyDescription;
+}
+
+var emitTopologyDescriptionChanged = function(self, description) {
+ if(self.listeners('topologyDescriptionChanged').length > 0) {
+ // Emit the server description changed events
+ self.emit('topologyDescriptionChanged', {
+ topologyId: self.s.topologyId != -1 ? self.s.topologyId : self.id, address: self.name,
+ previousDescription: getPreviousTopologyDescription(self),
+ newDescription: description
+ });
+
+ self.s.serverDescription = description;
+ }
+}
+
+var changedIsMaster = function(self, currentIsmaster, ismaster) {
+ var currentType = getTopologyType(self, currentIsmaster);
+ var newType = getTopologyType(self, ismaster);
+ if(newType != currentType) return true;
+ return false;
+}
+
+var getTopologyType = function(self, ismaster) {
+ if(!ismaster) {
+ ismaster = self.ismaster;
+ }
+
+ if(!ismaster) return 'Unknown';
+ if(ismaster.ismaster && !ismaster.hosts) return 'Standalone';
+ if(ismaster.ismaster && ismaster.msg == 'isdbgrid') return 'Mongos';
+ if(ismaster.ismaster) return 'RSPrimary';
+ if(ismaster.secondary) return 'RSSecondary';
+ if(ismaster.arbiterOnly) return 'RSArbiter';
+ return 'Unknown';
+}
+
+var inquireServerState = function(self) {
+ return function(callback) {
+ if(self.s.state == 'destroyed') return;
+ // Record response time
+ var start = new Date().getTime();
+
+ // emitSDAMEvent
+ emitSDAMEvent(self, 'serverHeartbeatStarted', { connectionId: self.name });
+
+ // Attempt to execute ismaster command
+ self.command('admin.$cmd', { ismaster:true }, { monitoring:true }, function(err, r) {
+ if(!err) {
+ // Legacy event sender
+ self.emit('ismaster', r, self);
+
+ // Calculate latencyMS
+ var latencyMS = new Date().getTime() - start;
+
+ // Server heart beat event
+ emitSDAMEvent(self, 'serverHeartbeatSucceeded', { durationMS: latencyMS, reply: r.result, connectionId: self.name });
+
+ // Did the server change
+ if(changedIsMaster(self, self.s.ismaster, r.result)) {
+ // Emit server description changed if something listening
+ emitServerDescriptionChanged(self, {
+ address: self.name, arbiters: [], hosts: [], passives: [], type: !self.s.inTopology ? 'Standalone' : getTopologyType(self)
+ });
+ }
+
+ // Updat ismaster view
+ self.s.ismaster = r.result;
+
+ // Set server response time
+ self.s.isMasterLatencyMS = latencyMS;
+ } else {
+ emitSDAMEvent(self, 'serverHeartbeatFailed', { durationMS: latencyMS, failure: err, connectionId: self.name });
+ }
+
+ // Peforming an ismaster monitoring callback operation
+ if(typeof callback == 'function') {
+ return callback(err, r);
+ }
+
+ // Perform another sweep
+ self.s.inquireServerStateTimeout = setTimeout(inquireServerState(self), self.s.haInterval);
+ });
+ };
+}
+
+// Object.assign method or polyfille
+var assign = Object.assign ? Object.assign : function assign(target) {
+ if (target === undefined || target === null) {
+ throw new TypeError('Cannot convert first argument to object');
+ }
+
+ var to = Object(target);
+ for (var i = 1; i < arguments.length; i++) {
+ var nextSource = arguments[i];
+ if (nextSource === undefined || nextSource === null) {
+ continue;
+ }
+
+ var keysArray = Object.keys(Object(nextSource));
+ for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
+ var nextKey = keysArray[nextIndex];
+ var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
+ if (desc !== undefined && desc.enumerable) {
+ to[nextKey] = nextSource[nextKey];
+ }
+ }
+ }
+ return to;
+}
+
+//
+// Clone the options
+var cloneOptions = function(options) {
+ var opts = {};
+ for(var name in options) {
+ opts[name] = options[name];
+ }
+ return opts;
+}
+
+module.exports.inquireServerState = inquireServerState
+module.exports.getTopologyType = getTopologyType;
+module.exports.emitServerDescriptionChanged = emitServerDescriptionChanged;
+module.exports.emitTopologyDescriptionChanged = emitTopologyDescriptionChanged;
+module.exports.cloneOptions = cloneOptions;
+module.exports.assign = assign;
+module.exports.createClientInfo = createClientInfo;
+module.exports.clone = clone;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/2_4_support.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/2_4_support.js
new file mode 100644
index 0000000..f59f350
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/2_4_support.js
@@ -0,0 +1,567 @@
+"use strict";
+
+var Insert = require('./commands').Insert
+ , Update = require('./commands').Update
+ , Remove = require('./commands').Remove
+ , copy = require('../connection/utils').copy
+ , retrieveBSON = require('../connection/utils').retrieveBSON
+ , KillCursor = require('../connection/commands').KillCursor
+ , GetMore = require('../connection/commands').GetMore
+ , Query = require('../connection/commands').Query
+ , f = require('util').format
+ , CommandResult = require('../connection/command_result')
+ , MongoError = require('../error')
+ , getReadPreference = require('./shared').getReadPreference;
+
+var BSON = retrieveBSON(),
+ Long = BSON.Long;
+
+// Write concern fields
+var writeConcernFields = ['w', 'wtimeout', 'j', 'fsync'];
+
+var WireProtocol = function() {}
+
+//
+// Needs to support legacy mass insert as well as ordered/unordered legacy
+// emulation
+//
+WireProtocol.prototype.insert = function(pool, ismaster, ns, bson, ops, options, callback) {
+ options = options || {};
+ // Default is ordered execution
+ var ordered = typeof options.ordered == 'boolean' ? options.ordered : true;
+ ops = Array.isArray(ops) ? ops :[ops];
+
+ // If we have more than a 1000 ops fails
+ if(ops.length > 1000) return callback(new MongoError("exceeded maximum write batch size of 1000"));
+
+ // Write concern
+ var writeConcern = options.writeConcern || {w:1};
+
+ // We are unordered
+ if(!ordered || writeConcern.w == 0) {
+ return executeUnordered('insert', Insert, ismaster, ns, bson, pool, ops, options, callback);
+ }
+
+ return executeOrdered('insert', Insert, ismaster, ns, bson, pool, ops, options, callback);
+}
+
+WireProtocol.prototype.update = function(pool, ismaster, ns, bson, ops, options, callback) {
+ options = options || {};
+ // Default is ordered execution
+ var ordered = typeof options.ordered == 'boolean' ? options.ordered : true;
+ ops = Array.isArray(ops) ? ops :[ops];
+
+ // Write concern
+ var writeConcern = options.writeConcern || {w:1};
+
+ // We are unordered
+ if(!ordered || writeConcern.w == 0) {
+ return executeUnordered('update', Update, ismaster, ns, bson, pool, ops, options, callback);
+ }
+
+ return executeOrdered('update', Update, ismaster, ns, bson, pool, ops, options, callback);
+}
+
+WireProtocol.prototype.remove = function(pool, ismaster, ns, bson, ops, options, callback) {
+ options = options || {};
+ // Default is ordered execution
+ var ordered = typeof options.ordered == 'boolean' ? options.ordered : true;
+ ops = Array.isArray(ops) ? ops :[ops];
+
+ // Write concern
+ var writeConcern = options.writeConcern || {w:1};
+
+ // We are unordered
+ if(!ordered || writeConcern.w == 0) {
+ return executeUnordered('remove', Remove, ismaster, ns, bson, pool, ops, options, callback);
+ }
+
+ return executeOrdered('remove', Remove, ismaster, ns, bson, pool, ops, options, callback);
+}
+
+WireProtocol.prototype.killCursor = function(bson, ns, cursorId, pool, callback) {
+ // Create a kill cursor command
+ var killCursor = new KillCursor(bson, [cursorId]);
+ // Execute the kill cursor command
+ if(pool && pool.isConnected()) {
+ pool.write(killCursor, {
+ immediateRelease:true, noResponse: true
+ });
+ }
+
+ // Callback
+ if(typeof callback == 'function') callback(null, null);
+}
+
+WireProtocol.prototype.getMore = function(bson, ns, cursorState, batchSize, raw, connection, options, callback) {
+ // Create getMore command
+ var getMore = new GetMore(bson, ns, cursorState.cursorId, {numberToReturn: batchSize});
+
+ // Query callback
+ var queryCallback = function(err, result) {
+ if(err) return callback(err);
+ // Get the raw message
+ var r = result.message;
+
+ // If we have a timed out query or a cursor that was killed
+ if((r.responseFlags & (1 << 0)) != 0) {
+ return callback(new MongoError("cursor does not exist, was killed or timed out"), null);
+ }
+
+ // Ensure we have a Long valie cursor id
+ var cursorId = typeof r.cursorId == 'number'
+ ? Long.fromNumber(r.cursorId)
+ : r.cursorId;
+
+ // Set all the values
+ cursorState.documents = r.documents;
+ cursorState.cursorId = cursorId;
+
+ // Return
+ callback(null, null, r.connection);
+ }
+
+ // If we have a raw query decorate the function
+ if(raw) {
+ queryCallback.raw = raw;
+ }
+
+ // Check if we need to promote longs
+ if(typeof cursorState.promoteLongs == 'boolean') {
+ queryCallback.promoteLongs = cursorState.promoteLongs;
+ }
+
+ if(typeof cursorState.promoteValues == 'boolean') {
+ queryCallback.promoteValues = cursorState.promoteValues;
+ }
+
+ if(typeof cursorState.promoteBuffers == 'boolean') {
+ queryCallback.promoteBuffers = cursorState.promoteBuffers;
+ }
+
+ // Write out the getMore command
+ connection.write(getMore, queryCallback);
+}
+
+WireProtocol.prototype.command = function(bson, ns, cmd, cursorState, topology, options) {
+ // Establish type of command
+ if(cmd.find) {
+ return setupClassicFind(bson, ns, cmd, cursorState, topology, options)
+ } else if(cursorState.cursorId != null) {
+ return;
+ } else if(cmd) {
+ return setupCommand(bson, ns, cmd, cursorState, topology, options);
+ } else {
+ throw new MongoError(f("command %s does not return a cursor", JSON.stringify(cmd)));
+ }
+}
+
+//
+// Execute a find command
+var setupClassicFind = function(bson, ns, cmd, cursorState, topology, options) {
+ // Ensure we have at least some options
+ options = options || {};
+ // Get the readPreference
+ var readPreference = getReadPreference(cmd, options);
+ // Set the optional batchSize
+ cursorState.batchSize = cmd.batchSize || cursorState.batchSize;
+ var numberToReturn = 0;
+
+ // Unpack the limit and batchSize values
+ if(cursorState.limit == 0) {
+ numberToReturn = cursorState.batchSize;
+ } else if(cursorState.limit < 0 || cursorState.limit < cursorState.batchSize || (cursorState.limit > 0 && cursorState.batchSize == 0)) {
+ numberToReturn = cursorState.limit;
+ } else {
+ numberToReturn = cursorState.batchSize;
+ }
+
+ var numberToSkip = cursorState.skip || 0;
+ // Build actual find command
+ var findCmd = {};
+ // Using special modifier
+ var usesSpecialModifier = false;
+
+ // We have a Mongos topology, check if we need to add a readPreference
+ if(topology.type == 'mongos' && readPreference) {
+ findCmd['$readPreference'] = readPreference.toJSON();
+ usesSpecialModifier = true;
+ }
+
+ // Add special modifiers to the query
+ if(cmd.sort) findCmd['orderby'] = cmd.sort, usesSpecialModifier = true;
+ if(cmd.hint) findCmd['$hint'] = cmd.hint, usesSpecialModifier = true;
+ if(cmd.snapshot) findCmd['$snapshot'] = cmd.snapshot, usesSpecialModifier = true;
+ if(cmd.returnKey) findCmd['$returnKey'] = cmd.returnKey, usesSpecialModifier = true;
+ if(cmd.maxScan) findCmd['$maxScan'] = cmd.maxScan, usesSpecialModifier = true;
+ if(cmd.min) findCmd['$min'] = cmd.min, usesSpecialModifier = true;
+ if(cmd.max) findCmd['$max'] = cmd.max, usesSpecialModifier = true;
+ if(cmd.showDiskLoc) findCmd['$showDiskLoc'] = cmd.showDiskLoc, usesSpecialModifier = true;
+ if(cmd.comment) findCmd['$comment'] = cmd.comment, usesSpecialModifier = true;
+ if(cmd.maxTimeMS) findCmd['$maxTimeMS'] = cmd.maxTimeMS, usesSpecialModifier = true;
+
+ if(cmd.explain) {
+ // nToReturn must be 0 (match all) or negative (match N and close cursor)
+ // nToReturn > 0 will give explain results equivalent to limit(0)
+ numberToReturn = -Math.abs(cmd.limit || 0);
+ usesSpecialModifier = true;
+ findCmd['$explain'] = true;
+ }
+
+ // If we have a special modifier
+ if(usesSpecialModifier) {
+ findCmd['$query'] = cmd.query;
+ } else {
+ findCmd = cmd.query;
+ }
+
+ // Throw on majority readConcern passed in
+ if(cmd.readConcern && cmd.readConcern.level != 'local') {
+ throw new MongoError(f('server find command does not support a readConcern level of %s', cmd.readConcern.level));
+ }
+
+ // Remove readConcern, ensure no failing commands
+ if(cmd.readConcern) {
+ cmd = copy(cmd);
+ delete cmd['readConcern'];
+ }
+
+ // Set up the serialize and ignoreUndefined fields
+ var serializeFunctions = typeof options.serializeFunctions == 'boolean'
+ ? options.serializeFunctions : false;
+ var ignoreUndefined = typeof options.ignoreUndefined == 'boolean'
+ ? options.ignoreUndefined : false;
+
+ // Build Query object
+ var query = new Query(bson, ns, findCmd, {
+ numberToSkip: numberToSkip, numberToReturn: numberToReturn
+ , checkKeys: false, returnFieldSelector: cmd.fields
+ , serializeFunctions: serializeFunctions, ignoreUndefined: ignoreUndefined
+ });
+
+ // Set query flags
+ query.slaveOk = readPreference.slaveOk();
+
+ // Set up the option bits for wire protocol
+ if(typeof cmd.tailable == 'boolean') query.tailable = cmd.tailable;
+ if(typeof cmd.oplogReplay == 'boolean') query.oplogReplay = cmd.oplogReplay;
+ if(typeof cmd.noCursorTimeout == 'boolean') query.noCursorTimeout = cmd.noCursorTimeout;
+ if(typeof cmd.awaitData == 'boolean') query.awaitData = cmd.awaitData;
+ if(typeof cmd.partial == 'boolean') query.partial = cmd.partial;
+ // Return the query
+ return query;
+}
+
+//
+// Set up a command cursor
+var setupCommand = function(bson, ns, cmd, cursorState, topology, options) {
+ // Set empty options object
+ options = options || {}
+ // Get the readPreference
+ var readPreference = getReadPreference(cmd, options);
+ // Final query
+ var finalCmd = {};
+ for(var name in cmd) {
+ finalCmd[name] = cmd[name];
+ }
+
+ // Build command namespace
+ var parts = ns.split(/\./);
+
+ // Throw on majority readConcern passed in
+ if(cmd.readConcern && cmd.readConcern.level != 'local') {
+ throw new MongoError(f('server %s command does not support a readConcern level of %s', JSON.stringify(cmd), cmd.readConcern.level));
+ }
+
+ // Remove readConcern, ensure no failing commands
+ if(cmd.readConcern) delete cmd['readConcern'];
+
+ // Serialize functions
+ var serializeFunctions = typeof options.serializeFunctions == 'boolean'
+ ? options.serializeFunctions : false;
+
+ // Set up the serialize and ignoreUndefined fields
+ var ignoreUndefined = typeof options.ignoreUndefined == 'boolean'
+ ? options.ignoreUndefined : false;
+
+ // We have a Mongos topology, check if we need to add a readPreference
+ if(topology.type == 'mongos'
+ && readPreference
+ && readPreference.preference != 'primary') {
+ finalCmd = {
+ '$query': finalCmd,
+ '$readPreference': readPreference.toJSON()
+ };
+ }
+
+ // Build Query object
+ var query = new Query(bson, f('%s.$cmd', parts.shift()), finalCmd, {
+ numberToSkip: 0, numberToReturn: -1
+ , checkKeys: false, serializeFunctions: serializeFunctions
+ , ignoreUndefined: ignoreUndefined
+ });
+
+ // Set query flags
+ query.slaveOk = readPreference.slaveOk();
+
+ // Return the query
+ return query;
+}
+
+var hasWriteConcern = function(writeConcern) {
+ if(writeConcern.w
+ || writeConcern.wtimeout
+ || writeConcern.j == true
+ || writeConcern.fsync == true
+ || Object.keys(writeConcern).length == 0) {
+ return true;
+ }
+ return false;
+}
+
+var cloneWriteConcern = function(writeConcern) {
+ var wc = {};
+ if(writeConcern.w != null) wc.w = writeConcern.w;
+ if(writeConcern.wtimeout != null) wc.wtimeout = writeConcern.wtimeout;
+ if(writeConcern.j != null) wc.j = writeConcern.j;
+ if(writeConcern.fsync != null) wc.fsync = writeConcern.fsync;
+ return wc;
+}
+
+//
+// Aggregate up all the results
+//
+var aggregateWriteOperationResults = function(opType, ops, results, connection) {
+ var finalResult = { ok: 1, n: 0 }
+ if(opType == 'update') {
+ finalResult.nModified = 0;
+ }
+
+ // Map all the results coming back
+ for(var i = 0; i < results.length; i++) {
+ var result = results[i];
+ var op = ops[i];
+
+ if((result.upserted || (result.updatedExisting == false)) && finalResult.upserted == null) {
+ finalResult.upserted = [];
+ }
+
+ // Push the upserted document to the list of upserted values
+ if(result.upserted) {
+ finalResult.upserted.push({index: i, _id: result.upserted});
+ }
+
+ // We have an upsert where we passed in a _id
+ if(result.updatedExisting == false && result.n == 1 && result.upserted == null) {
+ finalResult.upserted.push({index: i, _id: op.q._id});
+ } else if(result.updatedExisting == true) {
+ finalResult.nModified += result.n;
+ }
+
+ // We have an insert command
+ if(result.ok == 1 && opType == 'insert' && result.err == null) {
+ finalResult.n = finalResult.n + 1;
+ }
+
+ // We have a command error
+ if(result != null && result.ok == 0 || result.err || result.errmsg) {
+ if(result.ok == 0) finalResult.ok = 0;
+ finalResult.code = result.code;
+ finalResult.errmsg = result.errmsg || result.err || result.errMsg;
+
+ // Check if we have a write error
+ if(result.code == 11000
+ || result.code == 11001
+ || result.code == 12582
+ || result.code == 16544
+ || result.code == 16538
+ || result.code == 16542
+ || result.code == 14
+ || result.code == 13511) {
+ if(finalResult.writeErrors == null) finalResult.writeErrors = [];
+ finalResult.writeErrors.push({
+ index: i
+ , code: result.code
+ , errmsg: result.errmsg || result.err || result.errMsg
+ });
+ } else {
+ finalResult.writeConcernError = {
+ code: result.code
+ , errmsg: result.errmsg || result.err || result.errMsg
+ }
+ }
+ } else if(typeof result.n == 'number') {
+ finalResult.n += result.n;
+ } else {
+ finalResult.n += 1;
+ }
+
+ // Result as expected
+ if(result != null && result.lastOp) finalResult.lastOp = result.lastOp;
+ }
+
+ // Return finalResult aggregated results
+ return new CommandResult(finalResult, connection);
+}
+
+//
+// Execute all inserts in an ordered manner
+//
+var executeOrdered = function(opType ,command, ismaster, ns, bson, pool, ops, options, callback) {
+ var _ops = ops.slice(0);
+ // Collect all the getLastErrors
+ var getLastErrors = [];
+ // Execute an operation
+ var executeOp = function(list, _callback) {
+ // No more items in the list
+ if(list.length == 0) {
+ return process.nextTick(function() {
+ _callback(null, aggregateWriteOperationResults(opType, ops, getLastErrors, null));
+ });
+ }
+
+ // Get the first operation
+ var doc = list.shift();
+ // Create an insert command
+ var op = new command(Query.getRequestId(), ismaster, bson, ns, [doc], options);
+ // Write concern
+ var optionWriteConcern = options.writeConcern || {w:1};
+ // Final write concern
+ var writeConcern = cloneWriteConcern(optionWriteConcern);
+
+ // Get the db name
+ var db = ns.split('.').shift();
+
+ try {
+ // Add binary message to list of commands to execute
+ var commands = [op];
+
+ // Add getLastOrdered
+ var getLastErrorCmd = {getlasterror: 1};
+ // Merge all the fields
+ for(var i = 0; i < writeConcernFields.length; i++) {
+ if(writeConcern[writeConcernFields[i]] != null) {
+ getLastErrorCmd[writeConcernFields[i]] = writeConcern[writeConcernFields[i]];
+ }
+ }
+
+ // Create a getLastError command
+ var getLastErrorOp = new Query(bson, f("%s.$cmd", db), getLastErrorCmd, {numberToReturn: -1});
+ // Add getLastError command to list of ops to execute
+ commands.push(getLastErrorOp);
+
+ // getLastError callback
+ var getLastErrorCallback = function(err, result) {
+ if(err) return callback(err);
+ // Get the document
+ var doc = result.result;
+ // Save the getLastError document
+ getLastErrors.push(doc);
+
+ // If we have an error terminate
+ if(doc.ok == 0 || doc.err || doc.errmsg) {
+ return callback(null, aggregateWriteOperationResults(opType, ops, getLastErrors, result.connection));
+ }
+
+ // Execute the next op in the list
+ executeOp(list, callback);
+ }
+
+ // Write both commands out at the same time
+ pool.write(commands, getLastErrorCallback);
+ } catch(err) {
+ // We have a serialization error, rewrite as a write error to have same behavior as modern
+ // write commands
+ getLastErrors.push({ ok: 1, errmsg: typeof err == 'string' ? err : err.message, code: 14 });
+ // Return due to an error
+ process.nextTick(function() {
+ _callback(null, aggregateWriteOperationResults(opType, ops, getLastErrors, null));
+ });
+ }
+ }
+
+ // Execute the operations
+ executeOp(_ops, callback);
+}
+
+var executeUnordered = function(opType, command, ismaster, ns, bson, pool, ops, options, callback) {
+ // Total operations to write
+ var totalOps = ops.length;
+ // Collect all the getLastErrors
+ var getLastErrors = [];
+ // Write concern
+ var optionWriteConcern = options.writeConcern || {w:1};
+ // Final write concern
+ var writeConcern = cloneWriteConcern(optionWriteConcern);
+ // Driver level error
+ var error;
+
+ // Execute all the operations
+ for(var i = 0; i < ops.length; i++) {
+ // Create an insert command
+ var op = new command(Query.getRequestId(), ismaster, bson, ns, [ops[i]], options);
+ // Get db name
+ var db = ns.split('.').shift();
+
+ try {
+ // Add binary message to list of commands to execute
+ var commands = [op];
+
+ // If write concern 0 don't fire getLastError
+ if(hasWriteConcern(writeConcern)) {
+ var getLastErrorCmd = {getlasterror: 1};
+ // Merge all the fields
+ for(var j = 0; j < writeConcernFields.length; j++) {
+ if(writeConcern[writeConcernFields[j]] != null)
+ getLastErrorCmd[writeConcernFields[j]] = writeConcern[writeConcernFields[j]];
+ }
+
+ // Create a getLastError command
+ var getLastErrorOp = new Query(bson, f("%s.$cmd", db), getLastErrorCmd, {numberToReturn: -1});
+ // Add getLastError command to list of ops to execute
+ commands.push(getLastErrorOp);
+
+ // Give the result from getLastError the right index
+ var callbackOp = function(_index) {
+ return function(err, result) {
+ if(err) error = err;
+ // Update the number of operations executed
+ totalOps = totalOps - 1;
+ // Save the getLastError document
+ if(!err) getLastErrors[_index] = result.result;
+ // Check if we are done
+ if(totalOps == 0) {
+ process.nextTick(function() {
+ if(error) return callback(error);
+ callback(null, aggregateWriteOperationResults(opType, ops, getLastErrors, result.connection));
+ });
+ }
+ }
+ }
+
+ // Write both commands out at the same time
+ pool.write(commands, callbackOp(i));
+ } else {
+ pool.write(commands, {immediateRelease:true, noResponse:true});
+ }
+ } catch(err) {
+ // Update the number of operations executed
+ totalOps = totalOps - 1;
+ // We have a serialization error, rewrite as a write error to have same behavior as modern
+ // write commands
+ getLastErrors[i] = { ok: 1, errmsg: typeof err == 'string' ? err : err.message, code: 14 };
+ // Check if we are done
+ if(totalOps == 0) {
+ callback(null, aggregateWriteOperationResults(opType, ops, getLastErrors, null));
+ }
+ }
+ }
+
+ // Empty w:0 return
+ if(writeConcern
+ && writeConcern.w == 0 && callback) {
+ callback(null, new CommandResult({ok:1}, null));
+ }
+}
+
+module.exports = WireProtocol;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/2_6_support.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/2_6_support.js
new file mode 100644
index 0000000..33cc6d0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/2_6_support.js
@@ -0,0 +1,330 @@
+"use strict";
+
+var copy = require('../connection/utils').copy
+ , retrieveBSON = require('../connection/utils').retrieveBSON
+ , KillCursor = require('../connection/commands').KillCursor
+ , GetMore = require('../connection/commands').GetMore
+ , Query = require('../connection/commands').Query
+ , f = require('util').format
+ , MongoError = require('../error')
+ , getReadPreference = require('./shared').getReadPreference;
+
+var BSON = retrieveBSON(),
+ Long = BSON.Long;
+
+var WireProtocol = function() {}
+
+//
+// Execute a write operation
+var executeWrite = function(pool, bson, type, opsField, ns, ops, options, callback) {
+ if(ops.length == 0) throw new MongoError("insert must contain at least one document");
+ if(typeof options == 'function') {
+ callback = options;
+ options = {};
+ options = options || {};
+ }
+
+ // Split the ns up to get db and collection
+ var p = ns.split(".");
+ var d = p.shift();
+ // Options
+ var ordered = typeof options.ordered == 'boolean' ? options.ordered : true;
+ var writeConcern = options.writeConcern;
+
+ // return skeleton
+ var writeCommand = {};
+ writeCommand[type] = p.join('.');
+ writeCommand[opsField] = ops;
+ writeCommand.ordered = ordered;
+
+ // Did we specify a write concern
+ if(writeConcern && Object.keys(writeConcern).length > 0) {
+ writeCommand.writeConcern = writeConcern;
+ }
+
+ // Do we have bypassDocumentValidation set, then enable it on the write command
+ if(typeof options.bypassDocumentValidation == 'boolean') {
+ writeCommand.bypassDocumentValidation = options.bypassDocumentValidation;
+ }
+
+ // Options object
+ var opts = { command: true };
+ var queryOptions = { checkKeys : false, numberToSkip: 0, numberToReturn: 1 };
+ if(type == 'insert') queryOptions.checkKeys = true;
+ // Ensure we support serialization of functions
+ if(options.serializeFunctions) queryOptions.serializeFunctions = options.serializeFunctions;
+ // Do not serialize the undefined fields
+ if(options.ignoreUndefined) queryOptions.ignoreUndefined = options.ignoreUndefined;
+
+ try {
+ // Create write command
+ var cmd = new Query(bson, f("%s.$cmd", d), writeCommand, queryOptions);
+ // Execute command
+ pool.write(cmd, opts, callback);
+ } catch(err) {
+ callback(err);
+ }
+}
+
+//
+// Needs to support legacy mass insert as well as ordered/unordered legacy
+// emulation
+//
+WireProtocol.prototype.insert = function(pool, ismaster, ns, bson, ops, options, callback) {
+ executeWrite(pool, bson, 'insert', 'documents', ns, ops, options, callback);
+}
+
+WireProtocol.prototype.update = function(pool, ismaster, ns, bson, ops, options, callback) {
+ executeWrite(pool, bson, 'update', 'updates', ns, ops, options, callback);
+}
+
+WireProtocol.prototype.remove = function(pool, ismaster, ns, bson, ops, options, callback) {
+ executeWrite(pool, bson, 'delete', 'deletes', ns, ops, options, callback);
+}
+
+WireProtocol.prototype.killCursor = function(bson, ns, cursorId, pool, callback) {
+ // Create a kill cursor command
+ var killCursor = new KillCursor(bson, [cursorId]);
+ // Execute the kill cursor command
+ if(pool && pool.isConnected()) {
+ pool.write(killCursor, {
+ immediateRelease:true, noResponse: true
+ });
+ }
+
+ // Callback
+ if(typeof callback == 'function') callback(null, null);
+}
+
+WireProtocol.prototype.getMore = function(bson, ns, cursorState, batchSize, raw, connection, options, callback) {
+ // Create getMore command
+ var getMore = new GetMore(bson, ns, cursorState.cursorId, {numberToReturn: batchSize});
+
+ // Query callback
+ var queryCallback = function(err, result) {
+ if(err) return callback(err);
+ // Get the raw message
+ var r = result.message;
+
+ // If we have a timed out query or a cursor that was killed
+ if((r.responseFlags & (1 << 0)) != 0) {
+ return callback(new MongoError("cursor does not exist, was killed or timed out"), null);
+ }
+
+ // Ensure we have a Long valie cursor id
+ var cursorId = typeof r.cursorId == 'number'
+ ? Long.fromNumber(r.cursorId)
+ : r.cursorId;
+
+ // Set all the values
+ cursorState.documents = r.documents;
+ cursorState.cursorId = cursorId;
+
+ // Return
+ callback(null, null, r.connection);
+ }
+
+ // If we have a raw query decorate the function
+ if(raw) {
+ queryCallback.raw = raw;
+ }
+
+ // Check if we need to promote longs
+ if(typeof cursorState.promoteLongs == 'boolean') {
+ queryCallback.promoteLongs = cursorState.promoteLongs;
+ }
+
+ if(typeof cursorState.promoteValues == 'boolean') {
+ queryCallback.promoteValues = cursorState.promoteValues;
+ }
+
+ if(typeof cursorState.promoteBuffers == 'boolean') {
+ queryCallback.promoteBuffers = cursorState.promoteBuffers;
+ }
+
+ // Write out the getMore command
+ connection.write(getMore, queryCallback);
+}
+
+WireProtocol.prototype.command = function(bson, ns, cmd, cursorState, topology, options) {
+ // Establish type of command
+ if(cmd.find) {
+ return setupClassicFind(bson, ns, cmd, cursorState, topology, options)
+ } else if(cursorState.cursorId != null) {
+ return;
+ } else if(cmd) {
+ return setupCommand(bson, ns, cmd, cursorState, topology, options);
+ } else {
+ throw new MongoError(f("command %s does not return a cursor", JSON.stringify(cmd)));
+ }
+}
+
+//
+// Execute a find command
+var setupClassicFind = function(bson, ns, cmd, cursorState, topology, options) {
+ // Ensure we have at least some options
+ options = options || {};
+ // Get the readPreference
+ var readPreference = getReadPreference(cmd, options);
+ // Set the optional batchSize
+ cursorState.batchSize = cmd.batchSize || cursorState.batchSize;
+ var numberToReturn = 0;
+
+ // Unpack the limit and batchSize values
+ if(cursorState.limit == 0) {
+ numberToReturn = cursorState.batchSize;
+ } else if(cursorState.limit < 0 || cursorState.limit < cursorState.batchSize || (cursorState.limit > 0 && cursorState.batchSize == 0)) {
+ numberToReturn = cursorState.limit;
+ } else {
+ numberToReturn = cursorState.batchSize;
+ }
+
+ var numberToSkip = cursorState.skip || 0;
+ // Build actual find command
+ var findCmd = {};
+ // Using special modifier
+ var usesSpecialModifier = false;
+
+ // We have a Mongos topology, check if we need to add a readPreference
+ if(topology.type == 'mongos' && readPreference) {
+ findCmd['$readPreference'] = readPreference.toJSON();
+ usesSpecialModifier = true;
+ }
+
+ // Add special modifiers to the query
+ if(cmd.sort) findCmd['orderby'] = cmd.sort, usesSpecialModifier = true;
+ if(cmd.hint) findCmd['$hint'] = cmd.hint, usesSpecialModifier = true;
+ if(cmd.snapshot) findCmd['$snapshot'] = cmd.snapshot, usesSpecialModifier = true;
+ if(cmd.returnKey) findCmd['$returnKey'] = cmd.returnKey, usesSpecialModifier = true;
+ if(cmd.maxScan) findCmd['$maxScan'] = cmd.maxScan, usesSpecialModifier = true;
+ if(cmd.min) findCmd['$min'] = cmd.min, usesSpecialModifier = true;
+ if(cmd.max) findCmd['$max'] = cmd.max, usesSpecialModifier = true;
+ if(cmd.showDiskLoc) findCmd['$showDiskLoc'] = cmd.showDiskLoc, usesSpecialModifier = true;
+ if(cmd.comment) findCmd['$comment'] = cmd.comment, usesSpecialModifier = true;
+ if(cmd.maxTimeMS) findCmd['$maxTimeMS'] = cmd.maxTimeMS, usesSpecialModifier = true;
+
+ if(cmd.explain) {
+ // nToReturn must be 0 (match all) or negative (match N and close cursor)
+ // nToReturn > 0 will give explain results equivalent to limit(0)
+ numberToReturn = -Math.abs(cmd.limit || 0);
+ usesSpecialModifier = true;
+ findCmd['$explain'] = true;
+ }
+
+ // If we have a special modifier
+ if(usesSpecialModifier) {
+ findCmd['$query'] = cmd.query;
+ } else {
+ findCmd = cmd.query;
+ }
+
+ // Throw on majority readConcern passed in
+ if(cmd.readConcern && cmd.readConcern.level != 'local') {
+ throw new MongoError(f('server find command does not support a readConcern level of %s', cmd.readConcern.level));
+ }
+
+ // Remove readConcern, ensure no failing commands
+ if(cmd.readConcern) {
+ cmd = copy(cmd);
+ delete cmd['readConcern'];
+ }
+
+ // Serialize functions
+ var serializeFunctions = typeof options.serializeFunctions == 'boolean'
+ ? options.serializeFunctions : false;
+ var ignoreUndefined = typeof options.ignoreUndefined == 'boolean'
+ ? options.ignoreUndefined : false;
+
+ // Build Query object
+ var query = new Query(bson, ns, findCmd, {
+ numberToSkip: numberToSkip, numberToReturn: numberToReturn
+ , checkKeys: false, returnFieldSelector: cmd.fields
+ , serializeFunctions: serializeFunctions
+ , ignoreUndefined: ignoreUndefined
+ });
+
+ // Set query flags
+ query.slaveOk = readPreference.slaveOk();
+
+ // Set up the option bits for wire protocol
+ if(typeof cmd.tailable == 'boolean') {
+ query.tailable = cmd.tailable;
+ }
+
+ if(typeof cmd.oplogReplay == 'boolean') {
+ query.oplogReplay = cmd.oplogReplay;
+ }
+
+ if(typeof cmd.noCursorTimeout == 'boolean') {
+ query.noCursorTimeout = cmd.noCursorTimeout;
+ }
+
+ if(typeof cmd.awaitData == 'boolean') {
+ query.awaitData = cmd.awaitData;
+ }
+
+ if(typeof cmd.partial == 'boolean') {
+ query.partial = cmd.partial;
+ }
+
+ // Return the query
+ return query;
+}
+
+//
+// Set up a command cursor
+var setupCommand = function(bson, ns, cmd, cursorState, topology, options) {
+ // Set empty options object
+ options = options || {}
+ // Get the readPreference
+ var readPreference = getReadPreference(cmd, options);
+
+ // Final query
+ var finalCmd = {};
+ for(var name in cmd) {
+ finalCmd[name] = cmd[name];
+ }
+
+ // Build command namespace
+ var parts = ns.split(/\./);
+
+ // Serialize functions
+ var serializeFunctions = typeof options.serializeFunctions == 'boolean'
+ ? options.serializeFunctions : false;
+
+ var ignoreUndefined = typeof options.ignoreUndefined == 'boolean'
+ ? options.ignoreUndefined : false;
+
+ // Throw on majority readConcern passed in
+ if(cmd.readConcern && cmd.readConcern.level != 'local') {
+ throw new MongoError(f('server %s command does not support a readConcern level of %s', JSON.stringify(cmd), cmd.readConcern.level));
+ }
+
+ // Remove readConcern, ensure no failing commands
+ if(cmd.readConcern) delete cmd['readConcern'];
+
+ // We have a Mongos topology, check if we need to add a readPreference
+ if(topology.type == 'mongos'
+ && readPreference
+ && readPreference.preference != 'primary') {
+ finalCmd = {
+ '$query': finalCmd,
+ '$readPreference': readPreference.toJSON()
+ };
+ }
+
+ // Build Query object
+ var query = new Query(bson, f('%s.$cmd', parts.shift()), finalCmd, {
+ numberToSkip: 0, numberToReturn: -1
+ , checkKeys: false, serializeFunctions: serializeFunctions
+ , ignoreUndefined: ignoreUndefined
+ });
+
+ // Set query flags
+ query.slaveOk = readPreference.slaveOk();
+
+ // Return the query
+ return query;
+}
+
+module.exports = WireProtocol;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/3_2_support.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/3_2_support.js
new file mode 100644
index 0000000..9f1410e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/3_2_support.js
@@ -0,0 +1,533 @@
+"use strict";
+
+var Query = require('../connection/commands').Query
+ , retrieveBSON = require('../connection/utils').retrieveBSON
+ , f = require('util').format
+ , MongoError = require('../error')
+ , getReadPreference = require('./shared').getReadPreference;
+
+var BSON = retrieveBSON(),
+ Long = BSON.Long;
+
+var WireProtocol = function(legacyWireProtocol) {
+ this.legacyWireProtocol = legacyWireProtocol;
+}
+
+//
+// Execute a write operation
+var executeWrite = function(pool, bson, type, opsField, ns, ops, options, callback) {
+ if(ops.length == 0) throw new MongoError("insert must contain at least one document");
+ if(typeof options == 'function') {
+ callback = options;
+ options = {};
+ options = options || {};
+ }
+
+ // Split the ns up to get db and collection
+ var p = ns.split(".");
+ var d = p.shift();
+ // Options
+ var ordered = typeof options.ordered == 'boolean' ? options.ordered : true;
+ var writeConcern = options.writeConcern;
+
+ // return skeleton
+ var writeCommand = {};
+ writeCommand[type] = p.join('.');
+ writeCommand[opsField] = ops;
+ writeCommand.ordered = ordered;
+
+ // Did we specify a write concern
+ if(writeConcern && Object.keys(writeConcern).length > 0) {
+ writeCommand.writeConcern = writeConcern;
+ }
+
+ // If we have collation passed in
+ if(options.collation) {
+ for(var i = 0; i < writeCommand[opsField].length; i++) {
+ if(!writeCommand[opsField][i].collation) {
+ writeCommand[opsField][i].collation = options.collation;
+ }
+ }
+ }
+
+ // Do we have bypassDocumentValidation set, then enable it on the write command
+ if(typeof options.bypassDocumentValidation == 'boolean') {
+ writeCommand.bypassDocumentValidation = options.bypassDocumentValidation;
+ }
+
+ // Options object
+ var opts = { command: true };
+ var queryOptions = { checkKeys : false, numberToSkip: 0, numberToReturn: 1 };
+ if(type == 'insert') queryOptions.checkKeys = true;
+
+ // Ensure we support serialization of functions
+ if(options.serializeFunctions) queryOptions.serializeFunctions = options.serializeFunctions;
+ // Do not serialize the undefined fields
+ if(options.ignoreUndefined) queryOptions.ignoreUndefined = options.ignoreUndefined;
+
+ try {
+ // Create write command
+ var cmd = new Query(bson, f("%s.$cmd", d), writeCommand, queryOptions);
+ // Execute command
+ pool.write(cmd, opts, callback);
+ } catch(err) {
+ callback(err);
+ }
+}
+
+//
+// Needs to support legacy mass insert as well as ordered/unordered legacy
+// emulation
+//
+WireProtocol.prototype.insert = function(pool, ismaster, ns, bson, ops, options, callback) {
+ executeWrite(pool, bson, 'insert', 'documents', ns, ops, options, callback);
+}
+
+WireProtocol.prototype.update = function(pool, ismaster, ns, bson, ops, options, callback) {
+ executeWrite(pool, bson, 'update', 'updates', ns, ops, options, callback);
+}
+
+WireProtocol.prototype.remove = function(pool, ismaster, ns, bson, ops, options, callback) {
+ executeWrite(pool, bson, 'delete', 'deletes', ns, ops, options, callback);
+}
+
+WireProtocol.prototype.killCursor = function(bson, ns, cursorId, pool, callback) {
+ // Build command namespace
+ var parts = ns.split(/\./);
+ // Command namespace
+ var commandns = f('%s.$cmd', parts.shift());
+ // Create getMore command
+ var killcursorCmd = {
+ killCursors: parts.join('.'),
+ cursors: [cursorId]
+ }
+
+ // Build Query object
+ var query = new Query(bson, commandns, killcursorCmd, {
+ numberToSkip: 0, numberToReturn: -1
+ , checkKeys: false, returnFieldSelector: null
+ });
+
+ // Set query flags
+ query.slaveOk = true;
+
+ // Kill cursor callback
+ var killCursorCallback = function(err, result) {
+ if(err) {
+ if(typeof callback != 'function') return;
+ return callback(err);
+ }
+
+ // Result
+ var r = result.message;
+ // If we have a timed out query or a cursor that was killed
+ if((r.responseFlags & (1 << 0)) != 0) {
+ if(typeof callback != 'function') return;
+ return callback(new MongoError("cursor killed or timed out"), null);
+ }
+
+ if(!Array.isArray(r.documents) || r.documents.length == 0) {
+ if(typeof callback != 'function') return;
+ return callback(new MongoError(f('invalid killCursors result returned for cursor id %s', cursorId)));
+ }
+
+ // Return the result
+ if(typeof callback == 'function') {
+ callback(null, r.documents[0]);
+ }
+ }
+
+ // Execute the kill cursor command
+ if(pool && pool.isConnected()) {
+ pool.write(query, {
+ command: true
+ }, killCursorCallback);
+ }
+}
+
+WireProtocol.prototype.getMore = function(bson, ns, cursorState, batchSize, raw, connection, options, callback) {
+ options = options || {};
+ // Build command namespace
+ var parts = ns.split(/\./);
+ // Command namespace
+ var commandns = f('%s.$cmd', parts.shift());
+
+ // Create getMore command
+ var getMoreCmd = {
+ getMore: cursorState.cursorId,
+ collection: parts.join('.'),
+ batchSize: Math.abs(batchSize)
+ }
+
+ if(cursorState.cmd.tailable
+ && typeof cursorState.cmd.maxAwaitTimeMS == 'number') {
+ getMoreCmd.maxTimeMS = cursorState.cmd.maxAwaitTimeMS;
+ }
+
+ // Build Query object
+ var query = new Query(bson, commandns, getMoreCmd, {
+ numberToSkip: 0, numberToReturn: -1
+ , checkKeys: false, returnFieldSelector: null
+ });
+
+ // Set query flags
+ query.slaveOk = true;
+
+ // Query callback
+ var queryCallback = function(err, result) {
+ if(err) return callback(err);
+ // Get the raw message
+ var r = result.message;
+
+ // If we have a timed out query or a cursor that was killed
+ if((r.responseFlags & (1 << 0)) != 0) {
+ return callback(new MongoError("cursor killed or timed out"), null);
+ }
+
+ // Raw, return all the extracted documents
+ if(raw) {
+ cursorState.documents = r.documents;
+ cursorState.cursorId = r.cursorId;
+ return callback(null, r.documents);
+ }
+
+ // We have an error detected
+ if(r.documents[0].ok == 0) {
+ return callback(MongoError.create(r.documents[0]));
+ }
+
+ // Ensure we have a Long valid cursor id
+ var cursorId = typeof r.documents[0].cursor.id == 'number'
+ ? Long.fromNumber(r.documents[0].cursor.id)
+ : r.documents[0].cursor.id;
+
+ // Set all the values
+ cursorState.documents = r.documents[0].cursor.nextBatch;
+ cursorState.cursorId = cursorId;
+
+ // Return the result
+ callback(null, r.documents[0], r.connection);
+ }
+
+ // Query options
+ var queryOptions = { command: true };
+
+ // If we have a raw query decorate the function
+ if(raw) {
+ queryOptions.raw = raw;
+ }
+
+ // Add the result field needed
+ queryOptions.documentsReturnedIn = 'nextBatch';
+
+ // Check if we need to promote longs
+ if(typeof cursorState.promoteLongs == 'boolean') {
+ queryOptions.promoteLongs = cursorState.promoteLongs;
+ }
+
+ if(typeof cursorState.promoteValues == 'boolean') {
+ queryCallback.promoteValues = cursorState.promoteValues;
+ }
+
+ if(typeof cursorState.promoteBuffers == 'boolean') {
+ queryCallback.promoteBuffers = cursorState.promoteBuffers;
+ }
+
+ // Write out the getMore command
+ connection.write(query, queryOptions, queryCallback);
+}
+
+WireProtocol.prototype.command = function(bson, ns, cmd, cursorState, topology, options) {
+ // Establish type of command
+ if(cmd.find) {
+ // Create the find command
+ var query = executeFindCommand(bson, ns, cmd, cursorState, topology, options)
+ // Mark the cmd as virtual
+ cmd.virtual = false;
+ // Signal the documents are in the firstBatch value
+ query.documentsReturnedIn = 'firstBatch';
+ // Return the query
+ return query;
+ } else if(cursorState.cursorId != null) {
+ return;
+ } else if(cmd) {
+ return setupCommand(bson, ns, cmd, cursorState, topology, options);
+ } else {
+ throw new MongoError(f("command %s does not return a cursor", JSON.stringify(cmd)));
+ }
+}
+
+// // Command
+// {
+// find: ns
+// , query: <object>
+// , limit: <n>
+// , fields: <object>
+// , skip: <n>
+// , hint: <string>
+// , explain: <boolean>
+// , snapshot: <boolean>
+// , batchSize: <n>
+// , returnKey: <boolean>
+// , maxScan: <n>
+// , min: <n>
+// , max: <n>
+// , showDiskLoc: <boolean>
+// , comment: <string>
+// , maxTimeMS: <n>
+// , raw: <boolean>
+// , readPreference: <ReadPreference>
+// , tailable: <boolean>
+// , oplogReplay: <boolean>
+// , noCursorTimeout: <boolean>
+// , awaitdata: <boolean>
+// , exhaust: <boolean>
+// , partial: <boolean>
+// }
+
+// FIND/GETMORE SPEC
+// {
+// “findâ€: <string>,
+// “filterâ€: { ... },
+// “sortâ€: { ... },
+// “projectionâ€: { ... },
+// “hintâ€: { ... },
+// “skipâ€: <int>,
+// “limitâ€: <int>,
+// “batchSizeâ€: <int>,
+// “singleBatchâ€: <bool>,
+// “commentâ€: <string>,
+// “maxScanâ€: <int>,
+// “maxTimeMSâ€: <int>,
+// “maxâ€: { ... },
+// “minâ€: { ... },
+// “returnKeyâ€: <bool>,
+// “showRecordIdâ€: <bool>,
+// “snapshotâ€: <bool>,
+// “tailableâ€: <bool>,
+// “oplogReplayâ€: <bool>,
+// “noCursorTimeoutâ€: <bool>,
+// “awaitDataâ€: <bool>,
+// “partialâ€: <bool>,
+// “$readPreferenceâ€: { ... }
+// }
+
+//
+// Execute a find command
+var executeFindCommand = function(bson, ns, cmd, cursorState, topology, options) {
+ // Ensure we have at least some options
+ options = options || {};
+ // Get the readPreference
+ var readPreference = getReadPreference(cmd, options);
+ // Set the optional batchSize
+ cursorState.batchSize = cmd.batchSize || cursorState.batchSize;
+
+ // Build command namespace
+ var parts = ns.split(/\./);
+ // Command namespace
+ var commandns = f('%s.$cmd', parts.shift());
+
+ // Build actual find command
+ var findCmd = {
+ find: parts.join('.')
+ };
+
+ // I we provided a filter
+ if(cmd.query) {
+ // Check if the user is passing in the $query parameter
+ if(cmd.query['$query']) {
+ findCmd.filter = cmd.query['$query'];
+ } else {
+ findCmd.filter = cmd.query;
+ }
+ }
+
+ // Sort value
+ var sortValue = cmd.sort;
+
+ // Handle issue of sort being an Array
+ if(Array.isArray(sortValue)) {
+ var sortObject = {};
+
+ if(sortValue.length > 0 && !Array.isArray(sortValue[0])) {
+ var sortDirection = sortValue[1];
+ // Translate the sort order text
+ if(sortDirection == 'asc') {
+ sortDirection = 1;
+ } else if(sortDirection == 'desc') {
+ sortDirection = -1;
+ }
+
+ // Set the sort order
+ sortObject[sortValue[0]] = sortDirection;
+ } else {
+ for(var i = 0; i < sortValue.length; i++) {
+ sortDirection = sortValue[i][1];
+ // Translate the sort order text
+ if(sortDirection == 'asc') {
+ sortDirection = 1;
+ } else if(sortDirection == 'desc') {
+ sortDirection = -1;
+ }
+
+ // Set the sort order
+ sortObject[sortValue[i][0]] = sortDirection;
+ }
+ }
+
+ sortValue = sortObject;
+ }
+
+ // Add sort to command
+ if(cmd.sort) findCmd.sort = sortValue;
+ // Add a projection to the command
+ if(cmd.fields) findCmd.projection = cmd.fields;
+ // Add a hint to the command
+ if(cmd.hint) findCmd.hint = cmd.hint;
+ // Add a skip
+ if(cmd.skip) findCmd.skip = cmd.skip;
+ // Add a limit
+ if(cmd.limit) findCmd.limit = cmd.limit;
+ // Add a batchSize
+ if(typeof cmd.batchSize == 'number') findCmd.batchSize = Math.abs(cmd.batchSize);
+
+ // Check if we wish to have a singleBatch
+ if(cmd.limit < 0) {
+ findCmd.limit = Math.abs(cmd.limit);
+ findCmd.singleBatch = true;
+ }
+
+ // If we have comment set
+ if(cmd.comment) findCmd.comment = cmd.comment;
+
+ // If we have maxScan
+ if(cmd.maxScan) findCmd.maxScan = cmd.maxScan;
+
+ // If we have maxTimeMS set
+ if(cmd.maxTimeMS) findCmd.maxTimeMS = cmd.maxTimeMS;
+
+ // If we have min
+ if(cmd.min) findCmd.min = cmd.min;
+
+ // If we have max
+ if(cmd.max) findCmd.max = cmd.max;
+
+ // If we have returnKey set
+ if(cmd.returnKey) findCmd.returnKey = cmd.returnKey;
+
+ // If we have showDiskLoc set
+ if(cmd.showDiskLoc) findCmd.showRecordId = cmd.showDiskLoc;
+
+ // If we have snapshot set
+ if(cmd.snapshot) findCmd.snapshot = cmd.snapshot;
+
+ // If we have tailable set
+ if(cmd.tailable) findCmd.tailable = cmd.tailable;
+
+ // If we have oplogReplay set
+ if(cmd.oplogReplay) findCmd.oplogReplay = cmd.oplogReplay;
+
+ // If we have noCursorTimeout set
+ if(cmd.noCursorTimeout) findCmd.noCursorTimeout = cmd.noCursorTimeout;
+
+ // If we have awaitData set
+ if(cmd.awaitData) findCmd.awaitData = cmd.awaitData;
+ if(cmd.awaitdata) findCmd.awaitData = cmd.awaitdata;
+
+ // If we have partial set
+ if(cmd.partial) findCmd.partial = cmd.partial;
+
+ // If we have collation passed in
+ if(cmd.collation) findCmd.collation = cmd.collation;
+
+ // If we have explain, we need to rewrite the find command
+ // to wrap it in the explain command
+ if(cmd.explain) {
+ findCmd = {
+ explain: findCmd
+ }
+ }
+
+ // Did we provide a readConcern
+ if(cmd.readConcern) findCmd.readConcern = cmd.readConcern;
+
+ // Set up the serialize and ignoreUndefined fields
+ var serializeFunctions = typeof options.serializeFunctions == 'boolean'
+ ? options.serializeFunctions : false;
+ var ignoreUndefined = typeof options.ignoreUndefined == 'boolean'
+ ? options.ignoreUndefined : false;
+
+ // We have a Mongos topology, check if we need to add a readPreference
+ if(topology.type == 'mongos'
+ && readPreference
+ && readPreference.preference != 'primary') {
+ findCmd = {
+ '$query': findCmd,
+ '$readPreference': readPreference.toJSON()
+ };
+ }
+
+ // Build Query object
+ var query = new Query(bson, commandns, findCmd, {
+ numberToSkip: 0, numberToReturn: 1
+ , checkKeys: false, returnFieldSelector: null
+ , serializeFunctions: serializeFunctions, ignoreUndefined: ignoreUndefined
+ });
+
+ // Set query flags
+ query.slaveOk = readPreference.slaveOk();
+
+ // Return the query
+ return query;
+}
+
+//
+// Set up a command cursor
+var setupCommand = function(bson, ns, cmd, cursorState, topology, options) {
+ // Set empty options object
+ options = options || {}
+ // Get the readPreference
+ var readPreference = getReadPreference(cmd, options);
+
+ // Final query
+ var finalCmd = {};
+ for(var name in cmd) {
+ finalCmd[name] = cmd[name];
+ }
+
+ // Build command namespace
+ var parts = ns.split(/\./);
+
+ // Serialize functions
+ var serializeFunctions = typeof options.serializeFunctions == 'boolean'
+ ? options.serializeFunctions : false;
+
+ // Set up the serialize and ignoreUndefined fields
+ var ignoreUndefined = typeof options.ignoreUndefined == 'boolean'
+ ? options.ignoreUndefined : false;
+
+ // We have a Mongos topology, check if we need to add a readPreference
+ if(topology.type == 'mongos'
+ && readPreference
+ && readPreference.preference != 'primary') {
+ finalCmd = {
+ '$query': finalCmd,
+ '$readPreference': readPreference.toJSON()
+ };
+ }
+
+ // Build Query object
+ var query = new Query(bson, f('%s.$cmd', parts.shift()), finalCmd, {
+ numberToSkip: 0, numberToReturn: -1
+ , checkKeys: false, serializeFunctions: serializeFunctions
+ , ignoreUndefined: ignoreUndefined
+ });
+
+ // Set query flags
+ query.slaveOk = readPreference.slaveOk();
+
+ // Return the query
+ return query;
+}
+
+module.exports = WireProtocol;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/commands.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/commands.js
new file mode 100644
index 0000000..1b5d74b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/commands.js
@@ -0,0 +1,357 @@
+"use strict";
+
+var MongoError = require('../error');
+
+// Wire command operation ids
+var OP_UPDATE = 2001;
+var OP_INSERT = 2002;
+var OP_DELETE = 2006;
+
+var Insert = function(requestId, ismaster, bson, ns, documents, options) {
+ // Basic options needed to be passed in
+ if(ns == null) throw new MongoError("ns must be specified for query");
+ if(!Array.isArray(documents) || documents.length == 0) throw new MongoError("documents array must contain at least one document to insert");
+
+ // Validate that we are not passing 0x00 in the colletion name
+ if(!!~ns.indexOf("\x00")) {
+ throw new MongoError("namespace cannot contain a null character");
+ }
+
+ // Set internal
+ this.requestId = requestId;
+ this.bson = bson;
+ this.ns = ns;
+ this.documents = documents;
+ this.ismaster = ismaster;
+
+ // Ensure empty options
+ options = options || {};
+
+ // Unpack options
+ this.serializeFunctions = typeof options.serializeFunctions == 'boolean' ? options.serializeFunctions : false;
+ this.ignoreUndefined = typeof options.ignoreUndefined == 'boolean' ? options.ignoreUndefined : false;
+ this.checkKeys = typeof options.checkKeys == 'boolean' ? options.checkKeys : true;
+ this.continueOnError = typeof options.continueOnError == 'boolean' ? options.continueOnError : false;
+ // Set flags
+ this.flags = this.continueOnError ? 1 : 0;
+}
+
+// To Binary
+Insert.prototype.toBin = function() {
+ // Contains all the buffers to be written
+ var buffers = [];
+
+ // Header buffer
+ var header = new Buffer(
+ 4 * 4 // Header
+ + 4 // Flags
+ + Buffer.byteLength(this.ns) + 1 // namespace
+ );
+
+ // Add header to buffers
+ buffers.push(header);
+
+ // Total length of the message
+ var totalLength = header.length;
+
+ // Serialize all the documents
+ for(var i = 0; i < this.documents.length; i++) {
+ var buffer = this.bson.serialize(this.documents[i], {
+ checkKeys: this.checkKeys,
+ serializeFunctions: this.serializeFunctions,
+ ignoreUndefined: this.ignoreUndefined,
+ });
+
+ // Document is larger than maxBsonObjectSize, terminate serialization
+ if(buffer.length > this.ismaster.maxBsonObjectSize) {
+ throw new MongoError("Document exceeds maximum allowed bson size of " + this.ismaster.maxBsonObjectSize + " bytes");
+ }
+
+ // Add to total length of wire protocol message
+ totalLength = totalLength + buffer.length;
+ // Add to buffer
+ buffers.push(buffer);
+ }
+
+ // Command is larger than maxMessageSizeBytes terminate serialization
+ if(totalLength > this.ismaster.maxMessageSizeBytes) {
+ throw new MongoError("Command exceeds maximum message size of " + this.ismaster.maxMessageSizeBytes + " bytes");
+ }
+
+ // Add all the metadata
+ var index = 0;
+
+ // Write header length
+ header[index + 3] = (totalLength >> 24) & 0xff;
+ header[index + 2] = (totalLength >> 16) & 0xff;
+ header[index + 1] = (totalLength >> 8) & 0xff;
+ header[index] = (totalLength) & 0xff;
+ index = index + 4;
+
+ // Write header requestId
+ header[index + 3] = (this.requestId >> 24) & 0xff;
+ header[index + 2] = (this.requestId >> 16) & 0xff;
+ header[index + 1] = (this.requestId >> 8) & 0xff;
+ header[index] = (this.requestId) & 0xff;
+ index = index + 4;
+
+ // No flags
+ header[index + 3] = (0 >> 24) & 0xff;
+ header[index + 2] = (0 >> 16) & 0xff;
+ header[index + 1] = (0 >> 8) & 0xff;
+ header[index] = (0) & 0xff;
+ index = index + 4;
+
+ // Operation
+ header[index + 3] = (OP_INSERT >> 24) & 0xff;
+ header[index + 2] = (OP_INSERT >> 16) & 0xff;
+ header[index + 1] = (OP_INSERT >> 8) & 0xff;
+ header[index] = (OP_INSERT) & 0xff;
+ index = index + 4;
+
+ // Flags
+ header[index + 3] = (this.flags >> 24) & 0xff;
+ header[index + 2] = (this.flags >> 16) & 0xff;
+ header[index + 1] = (this.flags >> 8) & 0xff;
+ header[index] = (this.flags) & 0xff;
+ index = index + 4;
+
+ // Write collection name
+ index = index + header.write(this.ns, index, 'utf8') + 1;
+ header[index - 1] = 0;
+
+ // Return the buffers
+ return buffers;
+}
+
+var Update = function(requestId, ismaster, bson, ns, update, options) {
+ // Basic options needed to be passed in
+ if(ns == null) throw new MongoError("ns must be specified for query");
+
+ // Ensure empty options
+ options = options || {};
+
+ // Set internal
+ this.requestId = requestId;
+ this.bson = bson;
+ this.ns = ns;
+ this.ismaster = ismaster;
+
+ // Unpack options
+ this.serializeFunctions = typeof options.serializeFunctions == 'boolean' ? options.serializeFunctions : false;
+ this.ignoreUndefined = typeof options.ignoreUndefined == 'boolean' ? options.ignoreUndefined : false;
+ this.checkKeys = typeof options.checkKeys == 'boolean' ? options.checkKeys : false;
+
+ // Unpack the update document
+ this.upsert = typeof update[0].upsert == 'boolean' ? update[0].upsert : false;
+ this.multi = typeof update[0].multi == 'boolean' ? update[0].multi : false;
+ this.q = update[0].q;
+ this.u = update[0].u;
+
+ // Create flag value
+ this.flags = this.upsert ? 1 : 0;
+ this.flags = this.multi ? this.flags | 2 : this.flags;
+}
+
+// To Binary
+Update.prototype.toBin = function() {
+ // Contains all the buffers to be written
+ var buffers = [];
+
+ // Header buffer
+ var header = new Buffer(
+ 4 * 4 // Header
+ + 4 // ZERO
+ + Buffer.byteLength(this.ns) + 1 // namespace
+ + 4 // Flags
+ );
+
+ // Add header to buffers
+ buffers.push(header);
+
+ // Total length of the message
+ var totalLength = header.length;
+
+ // Serialize the selector
+ var selector = this.bson.serialize(this.q, {
+ checkKeys: this.checkKeys,
+ serializeFunctions: this.serializeFunctions,
+ ignoreUndefined: this.ignoreUndefined,
+ });
+ buffers.push(selector);
+ totalLength = totalLength + selector.length;
+
+ // Serialize the update
+ var update = this.bson.serialize(this.u, {
+ checkKeys: this.checkKeys,
+ serializeFunctions: this.serializeFunctions,
+ ignoreUndefined: this.ignoreUndefined,
+ });
+ buffers.push(update);
+ totalLength = totalLength + update.length;
+
+ // Index in header buffer
+ var index = 0;
+
+ // Write header length
+ header[index + 3] = (totalLength >> 24) & 0xff;
+ header[index + 2] = (totalLength >> 16) & 0xff;
+ header[index + 1] = (totalLength >> 8) & 0xff;
+ header[index] = (totalLength) & 0xff;
+ index = index + 4;
+
+ // Write header requestId
+ header[index + 3] = (this.requestId >> 24) & 0xff;
+ header[index + 2] = (this.requestId >> 16) & 0xff;
+ header[index + 1] = (this.requestId >> 8) & 0xff;
+ header[index] = (this.requestId) & 0xff;
+ index = index + 4;
+
+ // No flags
+ header[index + 3] = (0 >> 24) & 0xff;
+ header[index + 2] = (0 >> 16) & 0xff;
+ header[index + 1] = (0 >> 8) & 0xff;
+ header[index] = (0) & 0xff;
+ index = index + 4;
+
+ // Operation
+ header[index + 3] = (OP_UPDATE >> 24) & 0xff;
+ header[index + 2] = (OP_UPDATE >> 16) & 0xff;
+ header[index + 1] = (OP_UPDATE >> 8) & 0xff;
+ header[index] = (OP_UPDATE) & 0xff;
+ index = index + 4;
+
+ // Write ZERO
+ header[index + 3] = (0 >> 24) & 0xff;
+ header[index + 2] = (0 >> 16) & 0xff;
+ header[index + 1] = (0 >> 8) & 0xff;
+ header[index] = (0) & 0xff;
+ index = index + 4;
+
+ // Write collection name
+ index = index + header.write(this.ns, index, 'utf8') + 1;
+ header[index - 1] = 0;
+
+ // Flags
+ header[index + 3] = (this.flags >> 24) & 0xff;
+ header[index + 2] = (this.flags >> 16) & 0xff;
+ header[index + 1] = (this.flags >> 8) & 0xff;
+ header[index] = (this.flags) & 0xff;
+ index = index + 4;
+
+ // Return the buffers
+ return buffers;
+}
+
+var Remove = function(requestId, ismaster, bson, ns, remove, options) {
+ // Basic options needed to be passed in
+ if(ns == null) throw new MongoError("ns must be specified for query");
+
+ // Ensure empty options
+ options = options || {};
+
+ // Set internal
+ this.requestId = requestId;
+ this.bson = bson;
+ this.ns = ns;
+ this.ismaster = ismaster;
+
+ // Unpack options
+ this.serializeFunctions = typeof options.serializeFunctions == 'boolean' ? options.serializeFunctions : false;
+ this.ignoreUndefined = typeof options.ignoreUndefined == 'boolean' ? options.ignoreUndefined : false;
+ this.checkKeys = typeof options.checkKeys == 'boolean' ? options.checkKeys : false;
+
+ // Unpack the update document
+ this.limit = typeof remove[0].limit == 'number' ? remove[0].limit : 1;
+ this.q = remove[0].q;
+
+ // Create flag value
+ this.flags = this.limit == 1 ? 1 : 0;
+}
+
+// To Binary
+Remove.prototype.toBin = function() {
+ // Contains all the buffers to be written
+ var buffers = [];
+
+ // Header buffer
+ var header = new Buffer(
+ 4 * 4 // Header
+ + 4 // ZERO
+ + Buffer.byteLength(this.ns) + 1 // namespace
+ + 4 // Flags
+ );
+
+ // Add header to buffers
+ buffers.push(header);
+
+ // Total length of the message
+ var totalLength = header.length;
+
+ // Serialize the selector
+ var selector = this.bson.serialize(this.q, {
+ checkKeys: this.checkKeys,
+ serializeFunctions: this.serializeFunctions,
+ ignoreUndefined: this.ignoreUndefined,
+ });
+ buffers.push(selector);
+ totalLength = totalLength + selector.length;
+
+ // Index in header buffer
+ var index = 0;
+
+ // Write header length
+ header[index + 3] = (totalLength >> 24) & 0xff;
+ header[index + 2] = (totalLength >> 16) & 0xff;
+ header[index + 1] = (totalLength >> 8) & 0xff;
+ header[index] = (totalLength) & 0xff;
+ index = index + 4;
+
+ // Write header requestId
+ header[index + 3] = (this.requestId >> 24) & 0xff;
+ header[index + 2] = (this.requestId >> 16) & 0xff;
+ header[index + 1] = (this.requestId >> 8) & 0xff;
+ header[index] = (this.requestId) & 0xff;
+ index = index + 4;
+
+ // No flags
+ header[index + 3] = (0 >> 24) & 0xff;
+ header[index + 2] = (0 >> 16) & 0xff;
+ header[index + 1] = (0 >> 8) & 0xff;
+ header[index] = (0) & 0xff;
+ index = index + 4;
+
+ // Operation
+ header[index + 3] = (OP_DELETE >> 24) & 0xff;
+ header[index + 2] = (OP_DELETE >> 16) & 0xff;
+ header[index + 1] = (OP_DELETE >> 8) & 0xff;
+ header[index] = (OP_DELETE) & 0xff;
+ index = index + 4;
+
+ // Write ZERO
+ header[index + 3] = (0 >> 24) & 0xff;
+ header[index + 2] = (0 >> 16) & 0xff;
+ header[index + 1] = (0 >> 8) & 0xff;
+ header[index] = (0) & 0xff;
+ index = index + 4;
+
+ // Write collection name
+ index = index + header.write(this.ns, index, 'utf8') + 1;
+ header[index - 1] = 0;
+
+ // Write ZERO
+ header[index + 3] = (this.flags >> 24) & 0xff;
+ header[index + 2] = (this.flags >> 16) & 0xff;
+ header[index + 1] = (this.flags >> 8) & 0xff;
+ header[index] = (this.flags) & 0xff;
+ index = index + 4;
+
+ // Return the buffers
+ return buffers;
+}
+
+module.exports = {
+ Insert: Insert
+ , Update: Update
+ , Remove: Remove
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/shared.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/shared.js
new file mode 100644
index 0000000..25bd394
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/shared.js
@@ -0,0 +1,27 @@
+"use strict"
+
+var ReadPreference = require('../topologies/read_preference'),
+ MongoError = require('../error');
+
+var getReadPreference = function(cmd, options) {
+ // Default to command version of the readPreference
+ var readPreference = cmd.readPreference || new ReadPreference('primary');
+ // If we have an option readPreference override the command one
+ if(options.readPreference) {
+ readPreference = options.readPreference;
+ }
+
+ if(typeof readPreference == 'string') {
+ readPreference = new ReadPreference(readPreference);
+ }
+
+ if(!(readPreference instanceof ReadPreference)) {
+ throw new MongoError('readPreference must be a ReadPreference instance');
+ }
+
+ return readPreference;
+}
+
+module.exports = {
+ getReadPreference: getReadPreference
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/HISTORY.md
new file mode 100644
index 0000000..1eb8116
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/HISTORY.md
@@ -0,0 +1,191 @@
+1.0.2 2016-12-06
+----------------
+- Minor optimizations for ObjectID to use Buffer.from where available.
+
+1.0.1 2016-12-06
+----------------
+- Reverse behavior for undefined to be serialized as NULL. MongoDB 3.4 does not allow for undefined comparisons.
+
+1.0.0 2016-12-06
+----------------
+- Introduced new BSON API and documentation.
+
+0.5.7 2016-11-18
+-----------------
+- NODE-848 BSON Regex flags must be alphabetically ordered.
+
+0.5.6 2016-10-19
+-----------------
+- NODE-833, Detects cyclic dependencies in documents and throws error if one is found.
+- Fix(deserializer): corrected the check for (size + index) comparison… (Issue #195, https://github.com/JoelParke).
+
+0.5.5 2016-09-15
+-----------------
+- Added DBPointer up conversion to DBRef
+
+0.5.4 2016-08-23
+-----------------
+- Added promoteValues flag (default to true) allowing user to specify if deserialization should be into wrapper classes only.
+
+0.5.3 2016-07-11
+-----------------
+- Throw error if ObjectId is not a string or a buffer.
+
+0.5.2 2016-07-11
+-----------------
+- All values encoded big-endian style for ObjectId.
+
+0.5.1 2016-07-11
+-----------------
+- Fixed encoding/decoding issue in ObjectId timestamp generation.
+- Removed BinaryParser dependency from the serializer/deserializer.
+
+0.5.0 2016-07-05
+-----------------
+- Added Decimal128 type and extended test suite to include entire bson corpus.
+
+0.4.23 2016-04-08
+-----------------
+- Allow for proper detection of ObjectId or objects that look like ObjectId, improving compatibility across third party libraries.
+- Remove one package from dependency due to having been pulled from NPM.
+
+0.4.22 2016-03-04
+-----------------
+- Fix "TypeError: data.copy is not a function" in Electron (Issue #170, https://github.com/kangas).
+- Fixed issue with undefined type on deserializing.
+
+0.4.21 2016-01-12
+-----------------
+- Minor optimizations to avoid non needed object creation.
+
+0.4.20 2015-10-15
+-----------------
+- Added bower file to repository.
+- Fixed browser pid sometimes set greater than 0xFFFF on browsers (Issue #155, https://github.com/rahatarmanahmed)
+
+0.4.19 2015-10-15
+-----------------
+- Remove all support for bson-ext.
+
+0.4.18 2015-10-15
+-----------------
+- ObjectID equality check should return boolean instead of throwing exception for invalid oid string #139
+- add option for deserializing binary into Buffer object #116
+
+0.4.17 2015-10-15
+-----------------
+- Validate regexp string for null bytes and throw if there is one.
+
+0.4.16 2015-10-07
+-----------------
+- Fixed issue with return statement in Map.js.
+
+0.4.15 2015-10-06
+-----------------
+- Exposed Map correctly via index.js file.
+
+0.4.14 2015-10-06
+-----------------
+- Exposed Map correctly via bson.js file.
+
+0.4.13 2015-10-06
+-----------------
+- Added ES6 Map type serialization as well as a polyfill for ES5.
+
+0.4.12 2015-09-18
+-----------------
+- Made ignore undefined an optional parameter.
+
+0.4.11 2015-08-06
+-----------------
+- Minor fix for invalid key checking.
+
+0.4.10 2015-08-06
+-----------------
+- NODE-38 Added new BSONRegExp type to allow direct serialization to MongoDB type.
+- Some performance improvements by in lining code.
+
+0.4.9 2015-08-06
+----------------
+- Undefined fields are omitted from serialization in objects.
+
+0.4.8 2015-07-14
+----------------
+- Fixed size validation to ensure we can deserialize from dumped files.
+
+0.4.7 2015-06-26
+----------------
+- Added ability to instruct deserializer to return raw BSON buffers for named array fields.
+- Minor deserialization optimization by moving inlined function out.
+
+0.4.6 2015-06-17
+----------------
+- Fixed serializeWithBufferAndIndex bug.
+
+0.4.5 2015-06-17
+----------------
+- Removed any references to the shared buffer to avoid non GC collectible bson instances.
+
+0.4.4 2015-06-17
+----------------
+- Fixed rethrowing of error when not RangeError.
+
+0.4.3 2015-06-17
+----------------
+- Start buffer at 64K and double as needed, meaning we keep a low memory profile until needed.
+
+0.4.2 2015-06-16
+----------------
+- More fixes for corrupt Bson
+
+0.4.1 2015-06-16
+----------------
+- More fixes for corrupt Bson
+
+0.4.0 2015-06-16
+----------------
+- New JS serializer serializing into a single buffer then copying out the new buffer. Performance is similar to current C++ parser.
+- Removed bson-ext extension dependency for now.
+
+0.3.2 2015-03-27
+----------------
+- Removed node-gyp from install script in package.json.
+
+0.3.1 2015-03-27
+----------------
+- Return pure js version on native() call if failed to initialize.
+
+0.3.0 2015-03-26
+----------------
+- Pulled out all C++ code into bson-ext and made it an optional dependency.
+
+0.2.21 2015-03-21
+-----------------
+- Updated Nan to 1.7.0 to support io.js and node 0.12.0
+
+0.2.19 2015-02-16
+-----------------
+- Updated Nan to 1.6.2 to support io.js and node 0.12.0
+
+0.2.18 2015-01-20
+-----------------
+- Updated Nan to 1.5.1 to support io.js
+
+0.2.16 2014-12-17
+-----------------
+- Made pid cycle on 0xffff to avoid weird overflows on creation of ObjectID's
+
+0.2.12 2014-08-24
+-----------------
+- Fixes for fortify review of c++ extension
+- toBSON correctly allows returns of non objects
+
+0.2.3 2013-10-01
+----------------
+- Drying of ObjectId code for generation of id (Issue #54, https://github.com/moredip)
+- Fixed issue where corrupt CString's could cause endless loop
+- Support for Node 0.11.X > (Issue #49, https://github.com/kkoopa)
+
+0.1.4 2012-09-25
+----------------
+- Added precompiled c++ native extensions for win32 ia32 and x64
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/LICENSE.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/LICENSE.md
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/LICENSE.md
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/README.md
new file mode 100644
index 0000000..af25c3c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/README.md
@@ -0,0 +1,141 @@
+# BSON parser
+
+If you don't yet know what BSON actually is, read [the spec](http://bsonspec.org).
+
+The browser version of the BSON parser is compiled using webpack and the current
+version is pre-compiled in the browser_build directory. To build a new version perform the following operation.
+
+```
+npm install
+npm run build
+```
+
+A simple example of how to use BSON in the browser:
+
+```html
+<script src="./browser_build/bson.js"></script>
+
+<script>
+ function start() {
+ // Get the Long type
+ var Long = BSON.Long;
+ // Create a bson parser instance
+ var bson = new BSON();
+
+ // Serialize document
+ var doc = { long: Long.fromNumber(100) }
+
+ // Serialize a document
+ var data = bson.serialize(doc)
+ // De serialize it again
+ var doc_2 = bson.deserialize(data)
+ }
+</script>
+```
+
+A simple example of how to use BSON in `node.js`:
+
+```js
+// Get BSON parser class
+var BSON = require('bson')
+// Get the Long type
+var Long = BSON.Long;
+// Create a bson parser instance
+var bson = new BSON();
+
+// Serialize document
+var doc = { long: Long.fromNumber(100) }
+
+// Serialize a document
+var data = bson.serialize(doc)
+console.log('data:', data)
+
+// Deserialize the resulting Buffer
+var doc_2 = bson.deserialize(data)
+console.log('doc_2:', doc_2)
+```
+
+## Installation
+
+`npm install bson`
+
+## API
+
+### BSON types
+
+For all BSON types documentation, please refer to the documentation for the mongodb driver.
+
+https://github.com/mongodb/node-mongodb-native
+
+### BSON serialization and deserialiation
+
+**`new BSON()`** - Creates a new BSON seralizer/deserializer you can use to serialize and deserialize BSON.
+
+#### BSON.serialize
+
+The BSON serialize method takes a javascript object and an optional options object and returns a Node.js Buffer.
+
+ * BSON.serialize(object, options)
+ * @param {Object} object the Javascript object to serialize.
+ * @param {Boolean} [options.checkKeys=false] the serializer will check if keys are valid.
+ * @param {Boolean} [options.serializeFunctions=false] serialize the javascript. functions.
+ * @param {Boolean} [options.ignoreUndefined=true]
+ * @return {Buffer} returns a Buffer instance.
+
+#### BSON.serializeWithBufferAndIndex
+
+The BSON serializeWithBufferAndIndex method takes an object, a target buffer instance and an optional options object and returns the end serialization index in the final buffer.
+
+ * BSON.serializeWithBufferAndIndex(object, buffer, options)
+ * @param {Object} object the Javascript object to serialize.
+ * @param {Buffer} buffer the Buffer you pre-allocated to store the serialized BSON object.
+ * @param {Boolean} [options.checkKeys=false] the serializer will check if keys are valid.
+ * @param {Boolean} [options.serializeFunctions=false] serialize the javascript functions.
+ * @param {Boolean} [options.ignoreUndefined=true] ignore undefined fields.
+ * @param {Number} [options.index=0] the index in the buffer where we wish to start serializing into.
+ * @return {Number} returns the index pointing to the last written byte in the buffer.
+
+#### BSON.calculateObjectSize
+
+The BSON calculateObjectSize method takes a javascript object and an optional options object and returns the size of the BSON object.
+
+ * BSON.calculateObjectSize(object, options)
+ * @param {Object} object the Javascript object to serialize.
+ * @param {Boolean} [options.serializeFunctions=false] serialize the javascript. functions.
+ * @param {Boolean} [options.ignoreUndefined=true]
+ * @return {Buffer} returns a Buffer instance.
+
+#### BSON.deserialize
+
+The BSON deserialize method takes a node.js Buffer and an optional options object and returns a deserialized Javascript object.
+
+ * BSON.deserialize(buffer, options)
+ * @param {Object} [options.evalFunctions=false] evaluate functions in the BSON document scoped to the object deserialized.
+ * @param {Object} [options.cacheFunctions=false] cache evaluated functions for reuse.
+ * @param {Object} [options.cacheFunctionsCrc32=false] use a crc32 code for caching, otherwise use the string of the function.
+ * @param {Object} [options.promoteLongs=true] when deserializing a Long will fit it into a Number if it's smaller than 53 bits
+ * @param {Object} [options.promoteBuffers=false] when deserializing a Binary will return it as a node.js Buffer instance.
+ * @param {Object} [options.promoteValues=false] when deserializing will promote BSON values to their Node.js closest equivalent types.
+ * @param {Object} [options.fieldsAsRaw=null] allow to specify if there what fields we wish to return as unserialized raw buffer.
+ * @param {Object} [options.bsonRegExp=false] return BSON regular expressions as BSONRegExp instances.
+ * @return {Number} returns the next index in the buffer after deserialization **x** numbers of documents.
+
+#### BSON.deserializeStream
+
+The BSON deserializeStream method takes a node.js Buffer, startIndex and allow more control over deserialization of a Buffer containing concatenated BSON documents.
+
+ * BSON.deserializeStream(buffer, startIndex, numberOfDocuments, documents, docStartIndex, options)
+ * @param {Buffer} buffer the buffer containing the serialized set of BSON documents.
+ * @param {Number} startIndex the start index in the data Buffer where the deserialization is to start.
+ * @param {Number} numberOfDocuments number of documents to deserialize.
+ * @param {Array} documents an array where to store the deserialized documents.
+ * @param {Number} docStartIndex the index in the documents array from where to start inserting documents.
+ * @param {Object} [options.evalFunctions=false] evaluate functions in the BSON document scoped to the object deserialized.
+ * @param {Object} [options.cacheFunctions=false] cache evaluated functions for reuse.
+ * @param {Object} [options.cacheFunctionsCrc32=false] use a crc32 code for caching, otherwise use the string of the function.
+ * @param {Object} [options.promoteLongs=true] when deserializing a Long will fit it into a Number if it's smaller than 53 bits
+ * @param {Object} [options.promoteBuffers=false] when deserializing a Binary will return it as a node.js Buffer instance.
+ * @param {Object} [options.promoteValues=false] when deserializing will promote BSON values to their Node.js closest equivalent types.
+ * @param {Object} [options.fieldsAsRaw=null] allow to specify if there what fields we wish to return as unserialized raw buffer.
+ * @param {Object} [options.bsonRegExp=false] return BSON regular expressions as BSONRegExp instances.
+ * @return {Object} returns the deserialized Javascript Object.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/bower.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/bower.json
new file mode 100644
index 0000000..b32140e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/bower.json
@@ -0,0 +1,25 @@
+{
+ "name": "bson",
+ "description": "A bson parser for node.js and the browser",
+ "keywords": [
+ "mongodb",
+ "bson",
+ "parser"
+ ],
+ "author": "Christian Amor Kvalheim <christkv@gmail.com>",
+ "main": "./browser_build/bson.js",
+ "license": "Apache-2.0",
+ "moduleType": [
+ "globals",
+ "node"
+ ],
+ "ignore": [
+ "**/.*",
+ "alternate_parsers",
+ "benchmarks",
+ "bower_components",
+ "node_modules",
+ "test",
+ "tools"
+ ]
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/browser_build/bson.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/browser_build/bson.js
new file mode 100644
index 0000000..6021fca
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/browser_build/bson.js
@@ -0,0 +1,16734 @@
+(function webpackUniversalModuleDefinition(root, factory) {
+ if(typeof exports === 'object' && typeof module === 'object')
+ module.exports = factory();
+ else if(typeof define === 'function' && define.amd)
+ define([], factory);
+ else {
+ var a = factory();
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
+ }
+})(this, function() {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId])
+/******/ return installedModules[moduleId].exports;
+
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ exports: {},
+/******/ id: moduleId,
+/******/ loaded: false
+/******/ };
+
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+
+
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "/";
+
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ function(module, exports, __webpack_require__) {
+
+ __webpack_require__(1);
+ module.exports = __webpack_require__(298);
+
+
+/***/ },
+/* 1 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(global) {"use strict";
+
+ __webpack_require__(2);
+
+ __webpack_require__(293);
+
+ __webpack_require__(295);
+
+ if (global._babelPolyfill) {
+ throw new Error("only one instance of babel-polyfill is allowed");
+ }
+ global._babelPolyfill = true;
+
+ var DEFINE_PROPERTY = "defineProperty";
+ function define(O, key, value) {
+ O[key] || Object[DEFINE_PROPERTY](O, key, {
+ writable: true,
+ configurable: true,
+ value: value
+ });
+ }
+
+ define(String.prototype, "padLeft", "".padStart);
+ define(String.prototype, "padRight", "".padEnd);
+
+ "pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function (key) {
+ [][key] && define(Array, key, Function.call.bind([][key]));
+ });
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ },
+/* 2 */
+/***/ function(module, exports, __webpack_require__) {
+
+ __webpack_require__(3);
+ __webpack_require__(52);
+ __webpack_require__(53);
+ __webpack_require__(54);
+ __webpack_require__(55);
+ __webpack_require__(57);
+ __webpack_require__(60);
+ __webpack_require__(61);
+ __webpack_require__(62);
+ __webpack_require__(63);
+ __webpack_require__(64);
+ __webpack_require__(65);
+ __webpack_require__(66);
+ __webpack_require__(67);
+ __webpack_require__(68);
+ __webpack_require__(70);
+ __webpack_require__(72);
+ __webpack_require__(74);
+ __webpack_require__(76);
+ __webpack_require__(79);
+ __webpack_require__(80);
+ __webpack_require__(81);
+ __webpack_require__(85);
+ __webpack_require__(87);
+ __webpack_require__(89);
+ __webpack_require__(92);
+ __webpack_require__(93);
+ __webpack_require__(94);
+ __webpack_require__(95);
+ __webpack_require__(97);
+ __webpack_require__(98);
+ __webpack_require__(99);
+ __webpack_require__(100);
+ __webpack_require__(101);
+ __webpack_require__(102);
+ __webpack_require__(103);
+ __webpack_require__(105);
+ __webpack_require__(106);
+ __webpack_require__(107);
+ __webpack_require__(109);
+ __webpack_require__(110);
+ __webpack_require__(111);
+ __webpack_require__(113);
+ __webpack_require__(114);
+ __webpack_require__(115);
+ __webpack_require__(116);
+ __webpack_require__(117);
+ __webpack_require__(118);
+ __webpack_require__(119);
+ __webpack_require__(120);
+ __webpack_require__(121);
+ __webpack_require__(122);
+ __webpack_require__(123);
+ __webpack_require__(124);
+ __webpack_require__(125);
+ __webpack_require__(126);
+ __webpack_require__(131);
+ __webpack_require__(132);
+ __webpack_require__(136);
+ __webpack_require__(137);
+ __webpack_require__(138);
+ __webpack_require__(139);
+ __webpack_require__(141);
+ __webpack_require__(142);
+ __webpack_require__(143);
+ __webpack_require__(144);
+ __webpack_require__(145);
+ __webpack_require__(146);
+ __webpack_require__(147);
+ __webpack_require__(148);
+ __webpack_require__(149);
+ __webpack_require__(150);
+ __webpack_require__(151);
+ __webpack_require__(152);
+ __webpack_require__(153);
+ __webpack_require__(154);
+ __webpack_require__(155);
+ __webpack_require__(156);
+ __webpack_require__(157);
+ __webpack_require__(159);
+ __webpack_require__(160);
+ __webpack_require__(166);
+ __webpack_require__(167);
+ __webpack_require__(169);
+ __webpack_require__(170);
+ __webpack_require__(171);
+ __webpack_require__(175);
+ __webpack_require__(176);
+ __webpack_require__(177);
+ __webpack_require__(178);
+ __webpack_require__(179);
+ __webpack_require__(181);
+ __webpack_require__(182);
+ __webpack_require__(183);
+ __webpack_require__(184);
+ __webpack_require__(187);
+ __webpack_require__(189);
+ __webpack_require__(190);
+ __webpack_require__(191);
+ __webpack_require__(193);
+ __webpack_require__(195);
+ __webpack_require__(197);
+ __webpack_require__(198);
+ __webpack_require__(199);
+ __webpack_require__(201);
+ __webpack_require__(202);
+ __webpack_require__(203);
+ __webpack_require__(204);
+ __webpack_require__(211);
+ __webpack_require__(214);
+ __webpack_require__(215);
+ __webpack_require__(217);
+ __webpack_require__(218);
+ __webpack_require__(221);
+ __webpack_require__(222);
+ __webpack_require__(224);
+ __webpack_require__(225);
+ __webpack_require__(226);
+ __webpack_require__(227);
+ __webpack_require__(228);
+ __webpack_require__(229);
+ __webpack_require__(230);
+ __webpack_require__(231);
+ __webpack_require__(232);
+ __webpack_require__(233);
+ __webpack_require__(234);
+ __webpack_require__(235);
+ __webpack_require__(236);
+ __webpack_require__(237);
+ __webpack_require__(238);
+ __webpack_require__(239);
+ __webpack_require__(240);
+ __webpack_require__(241);
+ __webpack_require__(242);
+ __webpack_require__(244);
+ __webpack_require__(245);
+ __webpack_require__(246);
+ __webpack_require__(247);
+ __webpack_require__(248);
+ __webpack_require__(249);
+ __webpack_require__(251);
+ __webpack_require__(252);
+ __webpack_require__(253);
+ __webpack_require__(254);
+ __webpack_require__(255);
+ __webpack_require__(256);
+ __webpack_require__(257);
+ __webpack_require__(258);
+ __webpack_require__(260);
+ __webpack_require__(261);
+ __webpack_require__(263);
+ __webpack_require__(264);
+ __webpack_require__(265);
+ __webpack_require__(266);
+ __webpack_require__(269);
+ __webpack_require__(270);
+ __webpack_require__(271);
+ __webpack_require__(272);
+ __webpack_require__(273);
+ __webpack_require__(274);
+ __webpack_require__(275);
+ __webpack_require__(276);
+ __webpack_require__(278);
+ __webpack_require__(279);
+ __webpack_require__(280);
+ __webpack_require__(281);
+ __webpack_require__(282);
+ __webpack_require__(283);
+ __webpack_require__(284);
+ __webpack_require__(285);
+ __webpack_require__(286);
+ __webpack_require__(287);
+ __webpack_require__(288);
+ __webpack_require__(291);
+ __webpack_require__(292);
+ module.exports = __webpack_require__(9);
+
+/***/ },
+/* 3 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // ECMAScript 6 symbols shim
+ var global = __webpack_require__(4)
+ , has = __webpack_require__(5)
+ , DESCRIPTORS = __webpack_require__(6)
+ , $export = __webpack_require__(8)
+ , redefine = __webpack_require__(18)
+ , META = __webpack_require__(22).KEY
+ , $fails = __webpack_require__(7)
+ , shared = __webpack_require__(23)
+ , setToStringTag = __webpack_require__(24)
+ , uid = __webpack_require__(19)
+ , wks = __webpack_require__(25)
+ , wksExt = __webpack_require__(26)
+ , wksDefine = __webpack_require__(27)
+ , keyOf = __webpack_require__(29)
+ , enumKeys = __webpack_require__(42)
+ , isArray = __webpack_require__(45)
+ , anObject = __webpack_require__(12)
+ , toIObject = __webpack_require__(32)
+ , toPrimitive = __webpack_require__(16)
+ , createDesc = __webpack_require__(17)
+ , _create = __webpack_require__(46)
+ , gOPNExt = __webpack_require__(49)
+ , $GOPD = __webpack_require__(51)
+ , $DP = __webpack_require__(11)
+ , $keys = __webpack_require__(30)
+ , gOPD = $GOPD.f
+ , dP = $DP.f
+ , gOPN = gOPNExt.f
+ , $Symbol = global.Symbol
+ , $JSON = global.JSON
+ , _stringify = $JSON && $JSON.stringify
+ , PROTOTYPE = 'prototype'
+ , HIDDEN = wks('_hidden')
+ , TO_PRIMITIVE = wks('toPrimitive')
+ , isEnum = {}.propertyIsEnumerable
+ , SymbolRegistry = shared('symbol-registry')
+ , AllSymbols = shared('symbols')
+ , OPSymbols = shared('op-symbols')
+ , ObjectProto = Object[PROTOTYPE]
+ , USE_NATIVE = typeof $Symbol == 'function'
+ , QObject = global.QObject;
+ // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
+ var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
+
+ // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
+ var setSymbolDesc = DESCRIPTORS && $fails(function(){
+ return _create(dP({}, 'a', {
+ get: function(){ return dP(this, 'a', {value: 7}).a; }
+ })).a != 7;
+ }) ? function(it, key, D){
+ var protoDesc = gOPD(ObjectProto, key);
+ if(protoDesc)delete ObjectProto[key];
+ dP(it, key, D);
+ if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);
+ } : dP;
+
+ var wrap = function(tag){
+ var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
+ sym._k = tag;
+ return sym;
+ };
+
+ var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){
+ return typeof it == 'symbol';
+ } : function(it){
+ return it instanceof $Symbol;
+ };
+
+ var $defineProperty = function defineProperty(it, key, D){
+ if(it === ObjectProto)$defineProperty(OPSymbols, key, D);
+ anObject(it);
+ key = toPrimitive(key, true);
+ anObject(D);
+ if(has(AllSymbols, key)){
+ if(!D.enumerable){
+ if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));
+ it[HIDDEN][key] = true;
+ } else {
+ if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
+ D = _create(D, {enumerable: createDesc(0, false)});
+ } return setSymbolDesc(it, key, D);
+ } return dP(it, key, D);
+ };
+ var $defineProperties = function defineProperties(it, P){
+ anObject(it);
+ var keys = enumKeys(P = toIObject(P))
+ , i = 0
+ , l = keys.length
+ , key;
+ while(l > i)$defineProperty(it, key = keys[i++], P[key]);
+ return it;
+ };
+ var $create = function create(it, P){
+ return P === undefined ? _create(it) : $defineProperties(_create(it), P);
+ };
+ var $propertyIsEnumerable = function propertyIsEnumerable(key){
+ var E = isEnum.call(this, key = toPrimitive(key, true));
+ if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false;
+ return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
+ };
+ var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
+ it = toIObject(it);
+ key = toPrimitive(key, true);
+ if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return;
+ var D = gOPD(it, key);
+ if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
+ return D;
+ };
+ var $getOwnPropertyNames = function getOwnPropertyNames(it){
+ var names = gOPN(toIObject(it))
+ , result = []
+ , i = 0
+ , key;
+ while(names.length > i){
+ if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);
+ } return result;
+ };
+ var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
+ var IS_OP = it === ObjectProto
+ , names = gOPN(IS_OP ? OPSymbols : toIObject(it))
+ , result = []
+ , i = 0
+ , key;
+ while(names.length > i){
+ if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]);
+ } return result;
+ };
+
+ // 19.4.1.1 Symbol([description])
+ if(!USE_NATIVE){
+ $Symbol = function Symbol(){
+ if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');
+ var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
+ var $set = function(value){
+ if(this === ObjectProto)$set.call(OPSymbols, value);
+ if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
+ setSymbolDesc(this, tag, createDesc(1, value));
+ };
+ if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set});
+ return wrap(tag);
+ };
+ redefine($Symbol[PROTOTYPE], 'toString', function toString(){
+ return this._k;
+ });
+
+ $GOPD.f = $getOwnPropertyDescriptor;
+ $DP.f = $defineProperty;
+ __webpack_require__(50).f = gOPNExt.f = $getOwnPropertyNames;
+ __webpack_require__(44).f = $propertyIsEnumerable;
+ __webpack_require__(43).f = $getOwnPropertySymbols;
+
+ if(DESCRIPTORS && !__webpack_require__(28)){
+ redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
+ }
+
+ wksExt.f = function(name){
+ return wrap(wks(name));
+ }
+ }
+
+ $export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});
+
+ for(var symbols = (
+ // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
+ 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
+ ).split(','), i = 0; symbols.length > i; )wks(symbols[i++]);
+
+ for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]);
+
+ $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
+ // 19.4.2.1 Symbol.for(key)
+ 'for': function(key){
+ return has(SymbolRegistry, key += '')
+ ? SymbolRegistry[key]
+ : SymbolRegistry[key] = $Symbol(key);
+ },
+ // 19.4.2.5 Symbol.keyFor(sym)
+ keyFor: function keyFor(key){
+ if(isSymbol(key))return keyOf(SymbolRegistry, key);
+ throw TypeError(key + ' is not a symbol!');
+ },
+ useSetter: function(){ setter = true; },
+ useSimple: function(){ setter = false; }
+ });
+
+ $export($export.S + $export.F * !USE_NATIVE, 'Object', {
+ // 19.1.2.2 Object.create(O [, Properties])
+ create: $create,
+ // 19.1.2.4 Object.defineProperty(O, P, Attributes)
+ defineProperty: $defineProperty,
+ // 19.1.2.3 Object.defineProperties(O, Properties)
+ defineProperties: $defineProperties,
+ // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
+ getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
+ // 19.1.2.7 Object.getOwnPropertyNames(O)
+ getOwnPropertyNames: $getOwnPropertyNames,
+ // 19.1.2.8 Object.getOwnPropertySymbols(O)
+ getOwnPropertySymbols: $getOwnPropertySymbols
+ });
+
+ // 24.3.2 JSON.stringify(value [, replacer [, space]])
+ $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){
+ var S = $Symbol();
+ // MS Edge converts symbol values to JSON as {}
+ // WebKit converts symbol values to JSON as null
+ // V8 throws on boxed symbols
+ return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
+ })), 'JSON', {
+ stringify: function stringify(it){
+ if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
+ var args = [it]
+ , i = 1
+ , replacer, $replacer;
+ while(arguments.length > i)args.push(arguments[i++]);
+ replacer = args[1];
+ if(typeof replacer == 'function')$replacer = replacer;
+ if($replacer || !isArray(replacer))replacer = function(key, value){
+ if($replacer)value = $replacer.call(this, key, value);
+ if(!isSymbol(value))return value;
+ };
+ args[1] = replacer;
+ return _stringify.apply($JSON, args);
+ }
+ });
+
+ // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
+ $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(10)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
+ // 19.4.3.5 Symbol.prototype[@@toStringTag]
+ setToStringTag($Symbol, 'Symbol');
+ // 20.2.1.9 Math[@@toStringTag]
+ setToStringTag(Math, 'Math', true);
+ // 24.3.3 JSON[@@toStringTag]
+ setToStringTag(global.JSON, 'JSON', true);
+
+/***/ },
+/* 4 */
+/***/ function(module, exports) {
+
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
+ var global = module.exports = typeof window != 'undefined' && window.Math == Math
+ ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
+ if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
+
+/***/ },
+/* 5 */
+/***/ function(module, exports) {
+
+ var hasOwnProperty = {}.hasOwnProperty;
+ module.exports = function(it, key){
+ return hasOwnProperty.call(it, key);
+ };
+
+/***/ },
+/* 6 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // Thank's IE8 for his funny defineProperty
+ module.exports = !__webpack_require__(7)(function(){
+ return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
+ });
+
+/***/ },
+/* 7 */
+/***/ function(module, exports) {
+
+ module.exports = function(exec){
+ try {
+ return !!exec();
+ } catch(e){
+ return true;
+ }
+ };
+
+/***/ },
+/* 8 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var global = __webpack_require__(4)
+ , core = __webpack_require__(9)
+ , hide = __webpack_require__(10)
+ , redefine = __webpack_require__(18)
+ , ctx = __webpack_require__(20)
+ , PROTOTYPE = 'prototype';
+
+ var $export = function(type, name, source){
+ var IS_FORCED = type & $export.F
+ , IS_GLOBAL = type & $export.G
+ , IS_STATIC = type & $export.S
+ , IS_PROTO = type & $export.P
+ , IS_BIND = type & $export.B
+ , target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]
+ , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
+ , expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {})
+ , key, own, out, exp;
+ if(IS_GLOBAL)source = name;
+ for(key in source){
+ // contains in native
+ own = !IS_FORCED && target && target[key] !== undefined;
+ // export native or passed
+ out = (own ? target : source)[key];
+ // bind timers to global for call from export context
+ exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
+ // extend global
+ if(target)redefine(target, key, out, type & $export.U);
+ // export
+ if(exports[key] != out)hide(exports, key, exp);
+ if(IS_PROTO && expProto[key] != out)expProto[key] = out;
+ }
+ };
+ global.core = core;
+ // type bitmap
+ $export.F = 1; // forced
+ $export.G = 2; // global
+ $export.S = 4; // static
+ $export.P = 8; // proto
+ $export.B = 16; // bind
+ $export.W = 32; // wrap
+ $export.U = 64; // safe
+ $export.R = 128; // real proto method for `library`
+ module.exports = $export;
+
+/***/ },
+/* 9 */
+/***/ function(module, exports) {
+
+ var core = module.exports = {version: '2.4.0'};
+ if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
+
+/***/ },
+/* 10 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var dP = __webpack_require__(11)
+ , createDesc = __webpack_require__(17);
+ module.exports = __webpack_require__(6) ? function(object, key, value){
+ return dP.f(object, key, createDesc(1, value));
+ } : function(object, key, value){
+ object[key] = value;
+ return object;
+ };
+
+/***/ },
+/* 11 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var anObject = __webpack_require__(12)
+ , IE8_DOM_DEFINE = __webpack_require__(14)
+ , toPrimitive = __webpack_require__(16)
+ , dP = Object.defineProperty;
+
+ exports.f = __webpack_require__(6) ? Object.defineProperty : function defineProperty(O, P, Attributes){
+ anObject(O);
+ P = toPrimitive(P, true);
+ anObject(Attributes);
+ if(IE8_DOM_DEFINE)try {
+ return dP(O, P, Attributes);
+ } catch(e){ /* empty */ }
+ if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
+ if('value' in Attributes)O[P] = Attributes.value;
+ return O;
+ };
+
+/***/ },
+/* 12 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var isObject = __webpack_require__(13);
+ module.exports = function(it){
+ if(!isObject(it))throw TypeError(it + ' is not an object!');
+ return it;
+ };
+
+/***/ },
+/* 13 */
+/***/ function(module, exports) {
+
+ module.exports = function(it){
+ return typeof it === 'object' ? it !== null : typeof it === 'function';
+ };
+
+/***/ },
+/* 14 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.exports = !__webpack_require__(6) && !__webpack_require__(7)(function(){
+ return Object.defineProperty(__webpack_require__(15)('div'), 'a', {get: function(){ return 7; }}).a != 7;
+ });
+
+/***/ },
+/* 15 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var isObject = __webpack_require__(13)
+ , document = __webpack_require__(4).document
+ // in old IE typeof document.createElement is 'object'
+ , is = isObject(document) && isObject(document.createElement);
+ module.exports = function(it){
+ return is ? document.createElement(it) : {};
+ };
+
+/***/ },
+/* 16 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 7.1.1 ToPrimitive(input [, PreferredType])
+ var isObject = __webpack_require__(13);
+ // instead of the ES6 spec version, we didn't implement @@toPrimitive case
+ // and the second argument - flag - preferred type is a string
+ module.exports = function(it, S){
+ if(!isObject(it))return it;
+ var fn, val;
+ if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
+ if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
+ if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
+ throw TypeError("Can't convert object to primitive value");
+ };
+
+/***/ },
+/* 17 */
+/***/ function(module, exports) {
+
+ module.exports = function(bitmap, value){
+ return {
+ enumerable : !(bitmap & 1),
+ configurable: !(bitmap & 2),
+ writable : !(bitmap & 4),
+ value : value
+ };
+ };
+
+/***/ },
+/* 18 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var global = __webpack_require__(4)
+ , hide = __webpack_require__(10)
+ , has = __webpack_require__(5)
+ , SRC = __webpack_require__(19)('src')
+ , TO_STRING = 'toString'
+ , $toString = Function[TO_STRING]
+ , TPL = ('' + $toString).split(TO_STRING);
+
+ __webpack_require__(9).inspectSource = function(it){
+ return $toString.call(it);
+ };
+
+ (module.exports = function(O, key, val, safe){
+ var isFunction = typeof val == 'function';
+ if(isFunction)has(val, 'name') || hide(val, 'name', key);
+ if(O[key] === val)return;
+ if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
+ if(O === global){
+ O[key] = val;
+ } else {
+ if(!safe){
+ delete O[key];
+ hide(O, key, val);
+ } else {
+ if(O[key])O[key] = val;
+ else hide(O, key, val);
+ }
+ }
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
+ })(Function.prototype, TO_STRING, function toString(){
+ return typeof this == 'function' && this[SRC] || $toString.call(this);
+ });
+
+/***/ },
+/* 19 */
+/***/ function(module, exports) {
+
+ var id = 0
+ , px = Math.random();
+ module.exports = function(key){
+ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
+ };
+
+/***/ },
+/* 20 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // optional / simple context binding
+ var aFunction = __webpack_require__(21);
+ module.exports = function(fn, that, length){
+ aFunction(fn);
+ if(that === undefined)return fn;
+ switch(length){
+ case 1: return function(a){
+ return fn.call(that, a);
+ };
+ case 2: return function(a, b){
+ return fn.call(that, a, b);
+ };
+ case 3: return function(a, b, c){
+ return fn.call(that, a, b, c);
+ };
+ }
+ return function(/* ...args */){
+ return fn.apply(that, arguments);
+ };
+ };
+
+/***/ },
+/* 21 */
+/***/ function(module, exports) {
+
+ module.exports = function(it){
+ if(typeof it != 'function')throw TypeError(it + ' is not a function!');
+ return it;
+ };
+
+/***/ },
+/* 22 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var META = __webpack_require__(19)('meta')
+ , isObject = __webpack_require__(13)
+ , has = __webpack_require__(5)
+ , setDesc = __webpack_require__(11).f
+ , id = 0;
+ var isExtensible = Object.isExtensible || function(){
+ return true;
+ };
+ var FREEZE = !__webpack_require__(7)(function(){
+ return isExtensible(Object.preventExtensions({}));
+ });
+ var setMeta = function(it){
+ setDesc(it, META, {value: {
+ i: 'O' + ++id, // object ID
+ w: {} // weak collections IDs
+ }});
+ };
+ var fastKey = function(it, create){
+ // return primitive with prefix
+ if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
+ if(!has(it, META)){
+ // can't set metadata to uncaught frozen object
+ if(!isExtensible(it))return 'F';
+ // not necessary to add metadata
+ if(!create)return 'E';
+ // add missing metadata
+ setMeta(it);
+ // return object ID
+ } return it[META].i;
+ };
+ var getWeak = function(it, create){
+ if(!has(it, META)){
+ // can't set metadata to uncaught frozen object
+ if(!isExtensible(it))return true;
+ // not necessary to add metadata
+ if(!create)return false;
+ // add missing metadata
+ setMeta(it);
+ // return hash weak collections IDs
+ } return it[META].w;
+ };
+ // add metadata on freeze-family methods calling
+ var onFreeze = function(it){
+ if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);
+ return it;
+ };
+ var meta = module.exports = {
+ KEY: META,
+ NEED: false,
+ fastKey: fastKey,
+ getWeak: getWeak,
+ onFreeze: onFreeze
+ };
+
+/***/ },
+/* 23 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var global = __webpack_require__(4)
+ , SHARED = '__core-js_shared__'
+ , store = global[SHARED] || (global[SHARED] = {});
+ module.exports = function(key){
+ return store[key] || (store[key] = {});
+ };
+
+/***/ },
+/* 24 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var def = __webpack_require__(11).f
+ , has = __webpack_require__(5)
+ , TAG = __webpack_require__(25)('toStringTag');
+
+ module.exports = function(it, tag, stat){
+ if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
+ };
+
+/***/ },
+/* 25 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var store = __webpack_require__(23)('wks')
+ , uid = __webpack_require__(19)
+ , Symbol = __webpack_require__(4).Symbol
+ , USE_SYMBOL = typeof Symbol == 'function';
+
+ var $exports = module.exports = function(name){
+ return store[name] || (store[name] =
+ USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
+ };
+
+ $exports.store = store;
+
+/***/ },
+/* 26 */
+/***/ function(module, exports, __webpack_require__) {
+
+ exports.f = __webpack_require__(25);
+
+/***/ },
+/* 27 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var global = __webpack_require__(4)
+ , core = __webpack_require__(9)
+ , LIBRARY = __webpack_require__(28)
+ , wksExt = __webpack_require__(26)
+ , defineProperty = __webpack_require__(11).f;
+ module.exports = function(name){
+ var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
+ if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)});
+ };
+
+/***/ },
+/* 28 */
+/***/ function(module, exports) {
+
+ module.exports = false;
+
+/***/ },
+/* 29 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var getKeys = __webpack_require__(30)
+ , toIObject = __webpack_require__(32);
+ module.exports = function(object, el){
+ var O = toIObject(object)
+ , keys = getKeys(O)
+ , length = keys.length
+ , index = 0
+ , key;
+ while(length > index)if(O[key = keys[index++]] === el)return key;
+ };
+
+/***/ },
+/* 30 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.14 / 15.2.3.14 Object.keys(O)
+ var $keys = __webpack_require__(31)
+ , enumBugKeys = __webpack_require__(41);
+
+ module.exports = Object.keys || function keys(O){
+ return $keys(O, enumBugKeys);
+ };
+
+/***/ },
+/* 31 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var has = __webpack_require__(5)
+ , toIObject = __webpack_require__(32)
+ , arrayIndexOf = __webpack_require__(36)(false)
+ , IE_PROTO = __webpack_require__(40)('IE_PROTO');
+
+ module.exports = function(object, names){
+ var O = toIObject(object)
+ , i = 0
+ , result = []
+ , key;
+ for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
+ // Don't enum bug & hidden keys
+ while(names.length > i)if(has(O, key = names[i++])){
+ ~arrayIndexOf(result, key) || result.push(key);
+ }
+ return result;
+ };
+
+/***/ },
+/* 32 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // to indexed object, toObject with fallback for non-array-like ES3 strings
+ var IObject = __webpack_require__(33)
+ , defined = __webpack_require__(35);
+ module.exports = function(it){
+ return IObject(defined(it));
+ };
+
+/***/ },
+/* 33 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
+ var cof = __webpack_require__(34);
+ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
+ return cof(it) == 'String' ? it.split('') : Object(it);
+ };
+
+/***/ },
+/* 34 */
+/***/ function(module, exports) {
+
+ var toString = {}.toString;
+
+ module.exports = function(it){
+ return toString.call(it).slice(8, -1);
+ };
+
+/***/ },
+/* 35 */
+/***/ function(module, exports) {
+
+ // 7.2.1 RequireObjectCoercible(argument)
+ module.exports = function(it){
+ if(it == undefined)throw TypeError("Can't call method on " + it);
+ return it;
+ };
+
+/***/ },
+/* 36 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // false -> Array#indexOf
+ // true -> Array#includes
+ var toIObject = __webpack_require__(32)
+ , toLength = __webpack_require__(37)
+ , toIndex = __webpack_require__(39);
+ module.exports = function(IS_INCLUDES){
+ return function($this, el, fromIndex){
+ var O = toIObject($this)
+ , length = toLength(O.length)
+ , index = toIndex(fromIndex, length)
+ , value;
+ // Array#includes uses SameValueZero equality algorithm
+ if(IS_INCLUDES && el != el)while(length > index){
+ value = O[index++];
+ if(value != value)return true;
+ // Array#toIndex ignores holes, Array#includes - not
+ } else for(;length > index; index++)if(IS_INCLUDES || index in O){
+ if(O[index] === el)return IS_INCLUDES || index || 0;
+ } return !IS_INCLUDES && -1;
+ };
+ };
+
+/***/ },
+/* 37 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 7.1.15 ToLength
+ var toInteger = __webpack_require__(38)
+ , min = Math.min;
+ module.exports = function(it){
+ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
+ };
+
+/***/ },
+/* 38 */
+/***/ function(module, exports) {
+
+ // 7.1.4 ToInteger
+ var ceil = Math.ceil
+ , floor = Math.floor;
+ module.exports = function(it){
+ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
+ };
+
+/***/ },
+/* 39 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var toInteger = __webpack_require__(38)
+ , max = Math.max
+ , min = Math.min;
+ module.exports = function(index, length){
+ index = toInteger(index);
+ return index < 0 ? max(index + length, 0) : min(index, length);
+ };
+
+/***/ },
+/* 40 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var shared = __webpack_require__(23)('keys')
+ , uid = __webpack_require__(19);
+ module.exports = function(key){
+ return shared[key] || (shared[key] = uid(key));
+ };
+
+/***/ },
+/* 41 */
+/***/ function(module, exports) {
+
+ // IE 8- don't enum bug keys
+ module.exports = (
+ 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
+ ).split(',');
+
+/***/ },
+/* 42 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // all enumerable object keys, includes symbols
+ var getKeys = __webpack_require__(30)
+ , gOPS = __webpack_require__(43)
+ , pIE = __webpack_require__(44);
+ module.exports = function(it){
+ var result = getKeys(it)
+ , getSymbols = gOPS.f;
+ if(getSymbols){
+ var symbols = getSymbols(it)
+ , isEnum = pIE.f
+ , i = 0
+ , key;
+ while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key);
+ } return result;
+ };
+
+/***/ },
+/* 43 */
+/***/ function(module, exports) {
+
+ exports.f = Object.getOwnPropertySymbols;
+
+/***/ },
+/* 44 */
+/***/ function(module, exports) {
+
+ exports.f = {}.propertyIsEnumerable;
+
+/***/ },
+/* 45 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 7.2.2 IsArray(argument)
+ var cof = __webpack_require__(34);
+ module.exports = Array.isArray || function isArray(arg){
+ return cof(arg) == 'Array';
+ };
+
+/***/ },
+/* 46 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
+ var anObject = __webpack_require__(12)
+ , dPs = __webpack_require__(47)
+ , enumBugKeys = __webpack_require__(41)
+ , IE_PROTO = __webpack_require__(40)('IE_PROTO')
+ , Empty = function(){ /* empty */ }
+ , PROTOTYPE = 'prototype';
+
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
+ var createDict = function(){
+ // Thrash, waste and sodomy: IE GC bug
+ var iframe = __webpack_require__(15)('iframe')
+ , i = enumBugKeys.length
+ , lt = '<'
+ , gt = '>'
+ , iframeDocument;
+ iframe.style.display = 'none';
+ __webpack_require__(48).appendChild(iframe);
+ iframe.src = 'javascript:'; // eslint-disable-line no-script-url
+ // createDict = iframe.contentWindow.Object;
+ // html.removeChild(iframe);
+ iframeDocument = iframe.contentWindow.document;
+ iframeDocument.open();
+ iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
+ iframeDocument.close();
+ createDict = iframeDocument.F;
+ while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];
+ return createDict();
+ };
+
+ module.exports = Object.create || function create(O, Properties){
+ var result;
+ if(O !== null){
+ Empty[PROTOTYPE] = anObject(O);
+ result = new Empty;
+ Empty[PROTOTYPE] = null;
+ // add "__proto__" for Object.getPrototypeOf polyfill
+ result[IE_PROTO] = O;
+ } else result = createDict();
+ return Properties === undefined ? result : dPs(result, Properties);
+ };
+
+
+/***/ },
+/* 47 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var dP = __webpack_require__(11)
+ , anObject = __webpack_require__(12)
+ , getKeys = __webpack_require__(30);
+
+ module.exports = __webpack_require__(6) ? Object.defineProperties : function defineProperties(O, Properties){
+ anObject(O);
+ var keys = getKeys(Properties)
+ , length = keys.length
+ , i = 0
+ , P;
+ while(length > i)dP.f(O, P = keys[i++], Properties[P]);
+ return O;
+ };
+
+/***/ },
+/* 48 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.exports = __webpack_require__(4).document && document.documentElement;
+
+/***/ },
+/* 49 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
+ var toIObject = __webpack_require__(32)
+ , gOPN = __webpack_require__(50).f
+ , toString = {}.toString;
+
+ var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
+ ? Object.getOwnPropertyNames(window) : [];
+
+ var getWindowNames = function(it){
+ try {
+ return gOPN(it);
+ } catch(e){
+ return windowNames.slice();
+ }
+ };
+
+ module.exports.f = function getOwnPropertyNames(it){
+ return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
+ };
+
+
+/***/ },
+/* 50 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
+ var $keys = __webpack_require__(31)
+ , hiddenKeys = __webpack_require__(41).concat('length', 'prototype');
+
+ exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){
+ return $keys(O, hiddenKeys);
+ };
+
+/***/ },
+/* 51 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var pIE = __webpack_require__(44)
+ , createDesc = __webpack_require__(17)
+ , toIObject = __webpack_require__(32)
+ , toPrimitive = __webpack_require__(16)
+ , has = __webpack_require__(5)
+ , IE8_DOM_DEFINE = __webpack_require__(14)
+ , gOPD = Object.getOwnPropertyDescriptor;
+
+ exports.f = __webpack_require__(6) ? gOPD : function getOwnPropertyDescriptor(O, P){
+ O = toIObject(O);
+ P = toPrimitive(P, true);
+ if(IE8_DOM_DEFINE)try {
+ return gOPD(O, P);
+ } catch(e){ /* empty */ }
+ if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);
+ };
+
+/***/ },
+/* 52 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $export = __webpack_require__(8)
+ // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
+ $export($export.S, 'Object', {create: __webpack_require__(46)});
+
+/***/ },
+/* 53 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $export = __webpack_require__(8);
+ // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
+ $export($export.S + $export.F * !__webpack_require__(6), 'Object', {defineProperty: __webpack_require__(11).f});
+
+/***/ },
+/* 54 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $export = __webpack_require__(8);
+ // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
+ $export($export.S + $export.F * !__webpack_require__(6), 'Object', {defineProperties: __webpack_require__(47)});
+
+/***/ },
+/* 55 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
+ var toIObject = __webpack_require__(32)
+ , $getOwnPropertyDescriptor = __webpack_require__(51).f;
+
+ __webpack_require__(56)('getOwnPropertyDescriptor', function(){
+ return function getOwnPropertyDescriptor(it, key){
+ return $getOwnPropertyDescriptor(toIObject(it), key);
+ };
+ });
+
+/***/ },
+/* 56 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // most Object methods by ES6 should accept primitives
+ var $export = __webpack_require__(8)
+ , core = __webpack_require__(9)
+ , fails = __webpack_require__(7);
+ module.exports = function(KEY, exec){
+ var fn = (core.Object || {})[KEY] || Object[KEY]
+ , exp = {};
+ exp[KEY] = exec(fn);
+ $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
+ };
+
+/***/ },
+/* 57 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.9 Object.getPrototypeOf(O)
+ var toObject = __webpack_require__(58)
+ , $getPrototypeOf = __webpack_require__(59);
+
+ __webpack_require__(56)('getPrototypeOf', function(){
+ return function getPrototypeOf(it){
+ return $getPrototypeOf(toObject(it));
+ };
+ });
+
+/***/ },
+/* 58 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 7.1.13 ToObject(argument)
+ var defined = __webpack_require__(35);
+ module.exports = function(it){
+ return Object(defined(it));
+ };
+
+/***/ },
+/* 59 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
+ var has = __webpack_require__(5)
+ , toObject = __webpack_require__(58)
+ , IE_PROTO = __webpack_require__(40)('IE_PROTO')
+ , ObjectProto = Object.prototype;
+
+ module.exports = Object.getPrototypeOf || function(O){
+ O = toObject(O);
+ if(has(O, IE_PROTO))return O[IE_PROTO];
+ if(typeof O.constructor == 'function' && O instanceof O.constructor){
+ return O.constructor.prototype;
+ } return O instanceof Object ? ObjectProto : null;
+ };
+
+/***/ },
+/* 60 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.14 Object.keys(O)
+ var toObject = __webpack_require__(58)
+ , $keys = __webpack_require__(30);
+
+ __webpack_require__(56)('keys', function(){
+ return function keys(it){
+ return $keys(toObject(it));
+ };
+ });
+
+/***/ },
+/* 61 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.7 Object.getOwnPropertyNames(O)
+ __webpack_require__(56)('getOwnPropertyNames', function(){
+ return __webpack_require__(49).f;
+ });
+
+/***/ },
+/* 62 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.5 Object.freeze(O)
+ var isObject = __webpack_require__(13)
+ , meta = __webpack_require__(22).onFreeze;
+
+ __webpack_require__(56)('freeze', function($freeze){
+ return function freeze(it){
+ return $freeze && isObject(it) ? $freeze(meta(it)) : it;
+ };
+ });
+
+/***/ },
+/* 63 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.17 Object.seal(O)
+ var isObject = __webpack_require__(13)
+ , meta = __webpack_require__(22).onFreeze;
+
+ __webpack_require__(56)('seal', function($seal){
+ return function seal(it){
+ return $seal && isObject(it) ? $seal(meta(it)) : it;
+ };
+ });
+
+/***/ },
+/* 64 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.15 Object.preventExtensions(O)
+ var isObject = __webpack_require__(13)
+ , meta = __webpack_require__(22).onFreeze;
+
+ __webpack_require__(56)('preventExtensions', function($preventExtensions){
+ return function preventExtensions(it){
+ return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;
+ };
+ });
+
+/***/ },
+/* 65 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.12 Object.isFrozen(O)
+ var isObject = __webpack_require__(13);
+
+ __webpack_require__(56)('isFrozen', function($isFrozen){
+ return function isFrozen(it){
+ return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
+ };
+ });
+
+/***/ },
+/* 66 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.13 Object.isSealed(O)
+ var isObject = __webpack_require__(13);
+
+ __webpack_require__(56)('isSealed', function($isSealed){
+ return function isSealed(it){
+ return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
+ };
+ });
+
+/***/ },
+/* 67 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.2.11 Object.isExtensible(O)
+ var isObject = __webpack_require__(13);
+
+ __webpack_require__(56)('isExtensible', function($isExtensible){
+ return function isExtensible(it){
+ return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
+ };
+ });
+
+/***/ },
+/* 68 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.3.1 Object.assign(target, source)
+ var $export = __webpack_require__(8);
+
+ $export($export.S + $export.F, 'Object', {assign: __webpack_require__(69)});
+
+/***/ },
+/* 69 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // 19.1.2.1 Object.assign(target, source, ...)
+ var getKeys = __webpack_require__(30)
+ , gOPS = __webpack_require__(43)
+ , pIE = __webpack_require__(44)
+ , toObject = __webpack_require__(58)
+ , IObject = __webpack_require__(33)
+ , $assign = Object.assign;
+
+ // should work with symbols and should have deterministic property order (V8 bug)
+ module.exports = !$assign || __webpack_require__(7)(function(){
+ var A = {}
+ , B = {}
+ , S = Symbol()
+ , K = 'abcdefghijklmnopqrst';
+ A[S] = 7;
+ K.split('').forEach(function(k){ B[k] = k; });
+ return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
+ }) ? function assign(target, source){ // eslint-disable-line no-unused-vars
+ var T = toObject(target)
+ , aLen = arguments.length
+ , index = 1
+ , getSymbols = gOPS.f
+ , isEnum = pIE.f;
+ while(aLen > index){
+ var S = IObject(arguments[index++])
+ , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)
+ , length = keys.length
+ , j = 0
+ , key;
+ while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];
+ } return T;
+ } : $assign;
+
+/***/ },
+/* 70 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.3.10 Object.is(value1, value2)
+ var $export = __webpack_require__(8);
+ $export($export.S, 'Object', {is: __webpack_require__(71)});
+
+/***/ },
+/* 71 */
+/***/ function(module, exports) {
+
+ // 7.2.9 SameValue(x, y)
+ module.exports = Object.is || function is(x, y){
+ return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
+ };
+
+/***/ },
+/* 72 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.1.3.19 Object.setPrototypeOf(O, proto)
+ var $export = __webpack_require__(8);
+ $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(73).set});
+
+/***/ },
+/* 73 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
+ /* eslint-disable no-proto */
+ var isObject = __webpack_require__(13)
+ , anObject = __webpack_require__(12);
+ var check = function(O, proto){
+ anObject(O);
+ if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!");
+ };
+ module.exports = {
+ set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
+ function(test, buggy, set){
+ try {
+ set = __webpack_require__(20)(Function.call, __webpack_require__(51).f(Object.prototype, '__proto__').set, 2);
+ set(test, []);
+ buggy = !(test instanceof Array);
+ } catch(e){ buggy = true; }
+ return function setPrototypeOf(O, proto){
+ check(O, proto);
+ if(buggy)O.__proto__ = proto;
+ else set(O, proto);
+ return O;
+ };
+ }({}, false) : undefined),
+ check: check
+ };
+
+/***/ },
+/* 74 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // 19.1.3.6 Object.prototype.toString()
+ var classof = __webpack_require__(75)
+ , test = {};
+ test[__webpack_require__(25)('toStringTag')] = 'z';
+ if(test + '' != '[object z]'){
+ __webpack_require__(18)(Object.prototype, 'toString', function toString(){
+ return '[object ' + classof(this) + ']';
+ }, true);
+ }
+
+/***/ },
+/* 75 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // getting tag from 19.1.3.6 Object.prototype.toString()
+ var cof = __webpack_require__(34)
+ , TAG = __webpack_require__(25)('toStringTag')
+ // ES3 wrong here
+ , ARG = cof(function(){ return arguments; }()) == 'Arguments';
+
+ // fallback for IE11 Script Access Denied error
+ var tryGet = function(it, key){
+ try {
+ return it[key];
+ } catch(e){ /* empty */ }
+ };
+
+ module.exports = function(it){
+ var O, T, B;
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
+ // @@toStringTag case
+ : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
+ // builtinTag case
+ : ARG ? cof(O)
+ // ES3 arguments fallback
+ : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
+ };
+
+/***/ },
+/* 76 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
+ var $export = __webpack_require__(8);
+
+ $export($export.P, 'Function', {bind: __webpack_require__(77)});
+
+/***/ },
+/* 77 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var aFunction = __webpack_require__(21)
+ , isObject = __webpack_require__(13)
+ , invoke = __webpack_require__(78)
+ , arraySlice = [].slice
+ , factories = {};
+
+ var construct = function(F, len, args){
+ if(!(len in factories)){
+ for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']';
+ factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
+ } return factories[len](F, args);
+ };
+
+ module.exports = Function.bind || function bind(that /*, args... */){
+ var fn = aFunction(this)
+ , partArgs = arraySlice.call(arguments, 1);
+ var bound = function(/* args... */){
+ var args = partArgs.concat(arraySlice.call(arguments));
+ return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
+ };
+ if(isObject(fn.prototype))bound.prototype = fn.prototype;
+ return bound;
+ };
+
+/***/ },
+/* 78 */
+/***/ function(module, exports) {
+
+ // fast apply, http://jsperf.lnkit.com/fast-apply/5
+ module.exports = function(fn, args, that){
+ var un = that === undefined;
+ switch(args.length){
+ case 0: return un ? fn()
+ : fn.call(that);
+ case 1: return un ? fn(args[0])
+ : fn.call(that, args[0]);
+ case 2: return un ? fn(args[0], args[1])
+ : fn.call(that, args[0], args[1]);
+ case 3: return un ? fn(args[0], args[1], args[2])
+ : fn.call(that, args[0], args[1], args[2]);
+ case 4: return un ? fn(args[0], args[1], args[2], args[3])
+ : fn.call(that, args[0], args[1], args[2], args[3]);
+ } return fn.apply(that, args);
+ };
+
+/***/ },
+/* 79 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var dP = __webpack_require__(11).f
+ , createDesc = __webpack_require__(17)
+ , has = __webpack_require__(5)
+ , FProto = Function.prototype
+ , nameRE = /^\s*function ([^ (]*)/
+ , NAME = 'name';
+
+ var isExtensible = Object.isExtensible || function(){
+ return true;
+ };
+
+ // 19.2.4.2 name
+ NAME in FProto || __webpack_require__(6) && dP(FProto, NAME, {
+ configurable: true,
+ get: function(){
+ try {
+ var that = this
+ , name = ('' + that).match(nameRE)[1];
+ has(that, NAME) || !isExtensible(that) || dP(that, NAME, createDesc(5, name));
+ return name;
+ } catch(e){
+ return '';
+ }
+ }
+ });
+
+/***/ },
+/* 80 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var isObject = __webpack_require__(13)
+ , getPrototypeOf = __webpack_require__(59)
+ , HAS_INSTANCE = __webpack_require__(25)('hasInstance')
+ , FunctionProto = Function.prototype;
+ // 19.2.3.6 Function.prototype[@@hasInstance](V)
+ if(!(HAS_INSTANCE in FunctionProto))__webpack_require__(11).f(FunctionProto, HAS_INSTANCE, {value: function(O){
+ if(typeof this != 'function' || !isObject(O))return false;
+ if(!isObject(this.prototype))return O instanceof this;
+ // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
+ while(O = getPrototypeOf(O))if(this.prototype === O)return true;
+ return false;
+ }});
+
+/***/ },
+/* 81 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $export = __webpack_require__(8)
+ , $parseInt = __webpack_require__(82);
+ // 18.2.5 parseInt(string, radix)
+ $export($export.G + $export.F * (parseInt != $parseInt), {parseInt: $parseInt});
+
+/***/ },
+/* 82 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $parseInt = __webpack_require__(4).parseInt
+ , $trim = __webpack_require__(83).trim
+ , ws = __webpack_require__(84)
+ , hex = /^[\-+]?0[xX]/;
+
+ module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix){
+ var string = $trim(String(str), 3);
+ return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
+ } : $parseInt;
+
+/***/ },
+/* 83 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $export = __webpack_require__(8)
+ , defined = __webpack_require__(35)
+ , fails = __webpack_require__(7)
+ , spaces = __webpack_require__(84)
+ , space = '[' + spaces + ']'
+ , non = '\u200b\u0085'
+ , ltrim = RegExp('^' + space + space + '*')
+ , rtrim = RegExp(space + space + '*$');
+
+ var exporter = function(KEY, exec, ALIAS){
+ var exp = {};
+ var FORCE = fails(function(){
+ return !!spaces[KEY]() || non[KEY]() != non;
+ });
+ var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
+ if(ALIAS)exp[ALIAS] = fn;
+ $export($export.P + $export.F * FORCE, 'String', exp);
+ };
+
+ // 1 -> String#trimLeft
+ // 2 -> String#trimRight
+ // 3 -> String#trim
+ var trim = exporter.trim = function(string, TYPE){
+ string = String(defined(string));
+ if(TYPE & 1)string = string.replace(ltrim, '');
+ if(TYPE & 2)string = string.replace(rtrim, '');
+ return string;
+ };
+
+ module.exports = exporter;
+
+/***/ },
+/* 84 */
+/***/ function(module, exports) {
+
+ module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
+ '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
+
+/***/ },
+/* 85 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $export = __webpack_require__(8)
+ , $parseFloat = __webpack_require__(86);
+ // 18.2.4 parseFloat(string)
+ $export($export.G + $export.F * (parseFloat != $parseFloat), {parseFloat: $parseFloat});
+
+/***/ },
+/* 86 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $parseFloat = __webpack_require__(4).parseFloat
+ , $trim = __webpack_require__(83).trim;
+
+ module.exports = 1 / $parseFloat(__webpack_require__(84) + '-0') !== -Infinity ? function parseFloat(str){
+ var string = $trim(String(str), 3)
+ , result = $parseFloat(string);
+ return result === 0 && string.charAt(0) == '-' ? -0 : result;
+ } : $parseFloat;
+
+/***/ },
+/* 87 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var global = __webpack_require__(4)
+ , has = __webpack_require__(5)
+ , cof = __webpack_require__(34)
+ , inheritIfRequired = __webpack_require__(88)
+ , toPrimitive = __webpack_require__(16)
+ , fails = __webpack_require__(7)
+ , gOPN = __webpack_require__(50).f
+ , gOPD = __webpack_require__(51).f
+ , dP = __webpack_require__(11).f
+ , $trim = __webpack_require__(83).trim
+ , NUMBER = 'Number'
+ , $Number = global[NUMBER]
+ , Base = $Number
+ , proto = $Number.prototype
+ // Opera ~12 has broken Object#toString
+ , BROKEN_COF = cof(__webpack_require__(46)(proto)) == NUMBER
+ , TRIM = 'trim' in String.prototype;
+
+ // 7.1.3 ToNumber(argument)
+ var toNumber = function(argument){
+ var it = toPrimitive(argument, false);
+ if(typeof it == 'string' && it.length > 2){
+ it = TRIM ? it.trim() : $trim(it, 3);
+ var first = it.charCodeAt(0)
+ , third, radix, maxCode;
+ if(first === 43 || first === 45){
+ third = it.charCodeAt(2);
+ if(third === 88 || third === 120)return NaN; // Number('+0x1') should be NaN, old V8 fix
+ } else if(first === 48){
+ switch(it.charCodeAt(1)){
+ case 66 : case 98 : radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i
+ case 79 : case 111 : radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i
+ default : return +it;
+ }
+ for(var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++){
+ code = digits.charCodeAt(i);
+ // parseInt parses a string to a first unavailable symbol
+ // but ToNumber should return NaN if a string contains unavailable symbols
+ if(code < 48 || code > maxCode)return NaN;
+ } return parseInt(digits, radix);
+ }
+ } return +it;
+ };
+
+ if(!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')){
+ $Number = function Number(value){
+ var it = arguments.length < 1 ? 0 : value
+ , that = this;
+ return that instanceof $Number
+ // check on 1..constructor(foo) case
+ && (BROKEN_COF ? fails(function(){ proto.valueOf.call(that); }) : cof(that) != NUMBER)
+ ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
+ };
+ for(var keys = __webpack_require__(6) ? gOPN(Base) : (
+ // ES3:
+ 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
+ // ES6 (in case, if modules with ES6 Number statics required before):
+ 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
+ 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
+ ).split(','), j = 0, key; keys.length > j; j++){
+ if(has(Base, key = keys[j]) && !has($Number, key)){
+ dP($Number, key, gOPD(Base, key));
+ }
+ }
+ $Number.prototype = proto;
+ proto.constructor = $Number;
+ __webpack_require__(18)(global, NUMBER, $Number);
+ }
+
+/***/ },
+/* 88 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var isObject = __webpack_require__(13)
+ , setPrototypeOf = __webpack_require__(73).set;
+ module.exports = function(that, target, C){
+ var P, S = target.constructor;
+ if(S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf){
+ setPrototypeOf(that, P);
+ } return that;
+ };
+
+/***/ },
+/* 89 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , toInteger = __webpack_require__(38)
+ , aNumberValue = __webpack_require__(90)
+ , repeat = __webpack_require__(91)
+ , $toFixed = 1..toFixed
+ , floor = Math.floor
+ , data = [0, 0, 0, 0, 0, 0]
+ , ERROR = 'Number.toFixed: incorrect invocation!'
+ , ZERO = '0';
+
+ var multiply = function(n, c){
+ var i = -1
+ , c2 = c;
+ while(++i < 6){
+ c2 += n * data[i];
+ data[i] = c2 % 1e7;
+ c2 = floor(c2 / 1e7);
+ }
+ };
+ var divide = function(n){
+ var i = 6
+ , c = 0;
+ while(--i >= 0){
+ c += data[i];
+ data[i] = floor(c / n);
+ c = (c % n) * 1e7;
+ }
+ };
+ var numToString = function(){
+ var i = 6
+ , s = '';
+ while(--i >= 0){
+ if(s !== '' || i === 0 || data[i] !== 0){
+ var t = String(data[i]);
+ s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;
+ }
+ } return s;
+ };
+ var pow = function(x, n, acc){
+ return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
+ };
+ var log = function(x){
+ var n = 0
+ , x2 = x;
+ while(x2 >= 4096){
+ n += 12;
+ x2 /= 4096;
+ }
+ while(x2 >= 2){
+ n += 1;
+ x2 /= 2;
+ } return n;
+ };
+
+ $export($export.P + $export.F * (!!$toFixed && (
+ 0.00008.toFixed(3) !== '0.000' ||
+ 0.9.toFixed(0) !== '1' ||
+ 1.255.toFixed(2) !== '1.25' ||
+ 1000000000000000128..toFixed(0) !== '1000000000000000128'
+ ) || !__webpack_require__(7)(function(){
+ // V8 ~ Android 4.3-
+ $toFixed.call({});
+ })), 'Number', {
+ toFixed: function toFixed(fractionDigits){
+ var x = aNumberValue(this, ERROR)
+ , f = toInteger(fractionDigits)
+ , s = ''
+ , m = ZERO
+ , e, z, j, k;
+ if(f < 0 || f > 20)throw RangeError(ERROR);
+ if(x != x)return 'NaN';
+ if(x <= -1e21 || x >= 1e21)return String(x);
+ if(x < 0){
+ s = '-';
+ x = -x;
+ }
+ if(x > 1e-21){
+ e = log(x * pow(2, 69, 1)) - 69;
+ z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);
+ z *= 0x10000000000000;
+ e = 52 - e;
+ if(e > 0){
+ multiply(0, z);
+ j = f;
+ while(j >= 7){
+ multiply(1e7, 0);
+ j -= 7;
+ }
+ multiply(pow(10, j, 1), 0);
+ j = e - 1;
+ while(j >= 23){
+ divide(1 << 23);
+ j -= 23;
+ }
+ divide(1 << j);
+ multiply(1, 1);
+ divide(2);
+ m = numToString();
+ } else {
+ multiply(0, z);
+ multiply(1 << -e, 0);
+ m = numToString() + repeat.call(ZERO, f);
+ }
+ }
+ if(f > 0){
+ k = m.length;
+ m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));
+ } else {
+ m = s + m;
+ } return m;
+ }
+ });
+
+/***/ },
+/* 90 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var cof = __webpack_require__(34);
+ module.exports = function(it, msg){
+ if(typeof it != 'number' && cof(it) != 'Number')throw TypeError(msg);
+ return +it;
+ };
+
+/***/ },
+/* 91 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var toInteger = __webpack_require__(38)
+ , defined = __webpack_require__(35);
+
+ module.exports = function repeat(count){
+ var str = String(defined(this))
+ , res = ''
+ , n = toInteger(count);
+ if(n < 0 || n == Infinity)throw RangeError("Count can't be negative");
+ for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str;
+ return res;
+ };
+
+/***/ },
+/* 92 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , $fails = __webpack_require__(7)
+ , aNumberValue = __webpack_require__(90)
+ , $toPrecision = 1..toPrecision;
+
+ $export($export.P + $export.F * ($fails(function(){
+ // IE7-
+ return $toPrecision.call(1, undefined) !== '1';
+ }) || !$fails(function(){
+ // V8 ~ Android 4.3-
+ $toPrecision.call({});
+ })), 'Number', {
+ toPrecision: function toPrecision(precision){
+ var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');
+ return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);
+ }
+ });
+
+/***/ },
+/* 93 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.1.2.1 Number.EPSILON
+ var $export = __webpack_require__(8);
+
+ $export($export.S, 'Number', {EPSILON: Math.pow(2, -52)});
+
+/***/ },
+/* 94 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.1.2.2 Number.isFinite(number)
+ var $export = __webpack_require__(8)
+ , _isFinite = __webpack_require__(4).isFinite;
+
+ $export($export.S, 'Number', {
+ isFinite: function isFinite(it){
+ return typeof it == 'number' && _isFinite(it);
+ }
+ });
+
+/***/ },
+/* 95 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.1.2.3 Number.isInteger(number)
+ var $export = __webpack_require__(8);
+
+ $export($export.S, 'Number', {isInteger: __webpack_require__(96)});
+
+/***/ },
+/* 96 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.1.2.3 Number.isInteger(number)
+ var isObject = __webpack_require__(13)
+ , floor = Math.floor;
+ module.exports = function isInteger(it){
+ return !isObject(it) && isFinite(it) && floor(it) === it;
+ };
+
+/***/ },
+/* 97 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.1.2.4 Number.isNaN(number)
+ var $export = __webpack_require__(8);
+
+ $export($export.S, 'Number', {
+ isNaN: function isNaN(number){
+ return number != number;
+ }
+ });
+
+/***/ },
+/* 98 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.1.2.5 Number.isSafeInteger(number)
+ var $export = __webpack_require__(8)
+ , isInteger = __webpack_require__(96)
+ , abs = Math.abs;
+
+ $export($export.S, 'Number', {
+ isSafeInteger: function isSafeInteger(number){
+ return isInteger(number) && abs(number) <= 0x1fffffffffffff;
+ }
+ });
+
+/***/ },
+/* 99 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.1.2.6 Number.MAX_SAFE_INTEGER
+ var $export = __webpack_require__(8);
+
+ $export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff});
+
+/***/ },
+/* 100 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.1.2.10 Number.MIN_SAFE_INTEGER
+ var $export = __webpack_require__(8);
+
+ $export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff});
+
+/***/ },
+/* 101 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $export = __webpack_require__(8)
+ , $parseFloat = __webpack_require__(86);
+ // 20.1.2.12 Number.parseFloat(string)
+ $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', {parseFloat: $parseFloat});
+
+/***/ },
+/* 102 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $export = __webpack_require__(8)
+ , $parseInt = __webpack_require__(82);
+ // 20.1.2.13 Number.parseInt(string, radix)
+ $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', {parseInt: $parseInt});
+
+/***/ },
+/* 103 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.3 Math.acosh(x)
+ var $export = __webpack_require__(8)
+ , log1p = __webpack_require__(104)
+ , sqrt = Math.sqrt
+ , $acosh = Math.acosh;
+
+ $export($export.S + $export.F * !($acosh
+ // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
+ && Math.floor($acosh(Number.MAX_VALUE)) == 710
+ // Tor Browser bug: Math.acosh(Infinity) -> NaN
+ && $acosh(Infinity) == Infinity
+ ), 'Math', {
+ acosh: function acosh(x){
+ return (x = +x) < 1 ? NaN : x > 94906265.62425156
+ ? Math.log(x) + Math.LN2
+ : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));
+ }
+ });
+
+/***/ },
+/* 104 */
+/***/ function(module, exports) {
+
+ // 20.2.2.20 Math.log1p(x)
+ module.exports = Math.log1p || function log1p(x){
+ return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);
+ };
+
+/***/ },
+/* 105 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.5 Math.asinh(x)
+ var $export = __webpack_require__(8)
+ , $asinh = Math.asinh;
+
+ function asinh(x){
+ return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
+ }
+
+ // Tor Browser bug: Math.asinh(0) -> -0
+ $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', {asinh: asinh});
+
+/***/ },
+/* 106 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.7 Math.atanh(x)
+ var $export = __webpack_require__(8)
+ , $atanh = Math.atanh;
+
+ // Tor Browser bug: Math.atanh(-0) -> 0
+ $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
+ atanh: function atanh(x){
+ return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
+ }
+ });
+
+/***/ },
+/* 107 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.9 Math.cbrt(x)
+ var $export = __webpack_require__(8)
+ , sign = __webpack_require__(108);
+
+ $export($export.S, 'Math', {
+ cbrt: function cbrt(x){
+ return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);
+ }
+ });
+
+/***/ },
+/* 108 */
+/***/ function(module, exports) {
+
+ // 20.2.2.28 Math.sign(x)
+ module.exports = Math.sign || function sign(x){
+ return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
+ };
+
+/***/ },
+/* 109 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.11 Math.clz32(x)
+ var $export = __webpack_require__(8);
+
+ $export($export.S, 'Math', {
+ clz32: function clz32(x){
+ return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;
+ }
+ });
+
+/***/ },
+/* 110 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.12 Math.cosh(x)
+ var $export = __webpack_require__(8)
+ , exp = Math.exp;
+
+ $export($export.S, 'Math', {
+ cosh: function cosh(x){
+ return (exp(x = +x) + exp(-x)) / 2;
+ }
+ });
+
+/***/ },
+/* 111 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.14 Math.expm1(x)
+ var $export = __webpack_require__(8)
+ , $expm1 = __webpack_require__(112);
+
+ $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', {expm1: $expm1});
+
+/***/ },
+/* 112 */
+/***/ function(module, exports) {
+
+ // 20.2.2.14 Math.expm1(x)
+ var $expm1 = Math.expm1;
+ module.exports = (!$expm1
+ // Old FF bug
+ || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
+ // Tor Browser bug
+ || $expm1(-2e-17) != -2e-17
+ ) ? function expm1(x){
+ return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
+ } : $expm1;
+
+/***/ },
+/* 113 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.16 Math.fround(x)
+ var $export = __webpack_require__(8)
+ , sign = __webpack_require__(108)
+ , pow = Math.pow
+ , EPSILON = pow(2, -52)
+ , EPSILON32 = pow(2, -23)
+ , MAX32 = pow(2, 127) * (2 - EPSILON32)
+ , MIN32 = pow(2, -126);
+
+ var roundTiesToEven = function(n){
+ return n + 1 / EPSILON - 1 / EPSILON;
+ };
+
+
+ $export($export.S, 'Math', {
+ fround: function fround(x){
+ var $abs = Math.abs(x)
+ , $sign = sign(x)
+ , a, result;
+ if($abs < MIN32)return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;
+ a = (1 + EPSILON32 / EPSILON) * $abs;
+ result = a - (a - $abs);
+ if(result > MAX32 || result != result)return $sign * Infinity;
+ return $sign * result;
+ }
+ });
+
+/***/ },
+/* 114 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
+ var $export = __webpack_require__(8)
+ , abs = Math.abs;
+
+ $export($export.S, 'Math', {
+ hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars
+ var sum = 0
+ , i = 0
+ , aLen = arguments.length
+ , larg = 0
+ , arg, div;
+ while(i < aLen){
+ arg = abs(arguments[i++]);
+ if(larg < arg){
+ div = larg / arg;
+ sum = sum * div * div + 1;
+ larg = arg;
+ } else if(arg > 0){
+ div = arg / larg;
+ sum += div * div;
+ } else sum += arg;
+ }
+ return larg === Infinity ? Infinity : larg * Math.sqrt(sum);
+ }
+ });
+
+/***/ },
+/* 115 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.18 Math.imul(x, y)
+ var $export = __webpack_require__(8)
+ , $imul = Math.imul;
+
+ // some WebKit versions fails with big numbers, some has wrong arity
+ $export($export.S + $export.F * __webpack_require__(7)(function(){
+ return $imul(0xffffffff, 5) != -5 || $imul.length != 2;
+ }), 'Math', {
+ imul: function imul(x, y){
+ var UINT16 = 0xffff
+ , xn = +x
+ , yn = +y
+ , xl = UINT16 & xn
+ , yl = UINT16 & yn;
+ return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
+ }
+ });
+
+/***/ },
+/* 116 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.21 Math.log10(x)
+ var $export = __webpack_require__(8);
+
+ $export($export.S, 'Math', {
+ log10: function log10(x){
+ return Math.log(x) / Math.LN10;
+ }
+ });
+
+/***/ },
+/* 117 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.20 Math.log1p(x)
+ var $export = __webpack_require__(8);
+
+ $export($export.S, 'Math', {log1p: __webpack_require__(104)});
+
+/***/ },
+/* 118 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.22 Math.log2(x)
+ var $export = __webpack_require__(8);
+
+ $export($export.S, 'Math', {
+ log2: function log2(x){
+ return Math.log(x) / Math.LN2;
+ }
+ });
+
+/***/ },
+/* 119 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.28 Math.sign(x)
+ var $export = __webpack_require__(8);
+
+ $export($export.S, 'Math', {sign: __webpack_require__(108)});
+
+/***/ },
+/* 120 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.30 Math.sinh(x)
+ var $export = __webpack_require__(8)
+ , expm1 = __webpack_require__(112)
+ , exp = Math.exp;
+
+ // V8 near Chromium 38 has a problem with very small numbers
+ $export($export.S + $export.F * __webpack_require__(7)(function(){
+ return !Math.sinh(-2e-17) != -2e-17;
+ }), 'Math', {
+ sinh: function sinh(x){
+ return Math.abs(x = +x) < 1
+ ? (expm1(x) - expm1(-x)) / 2
+ : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);
+ }
+ });
+
+/***/ },
+/* 121 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.33 Math.tanh(x)
+ var $export = __webpack_require__(8)
+ , expm1 = __webpack_require__(112)
+ , exp = Math.exp;
+
+ $export($export.S, 'Math', {
+ tanh: function tanh(x){
+ var a = expm1(x = +x)
+ , b = expm1(-x);
+ return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
+ }
+ });
+
+/***/ },
+/* 122 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.2.2.34 Math.trunc(x)
+ var $export = __webpack_require__(8);
+
+ $export($export.S, 'Math', {
+ trunc: function trunc(it){
+ return (it > 0 ? Math.floor : Math.ceil)(it);
+ }
+ });
+
+/***/ },
+/* 123 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $export = __webpack_require__(8)
+ , toIndex = __webpack_require__(39)
+ , fromCharCode = String.fromCharCode
+ , $fromCodePoint = String.fromCodePoint;
+
+ // length should be 1, old FF problem
+ $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
+ // 21.1.2.2 String.fromCodePoint(...codePoints)
+ fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars
+ var res = []
+ , aLen = arguments.length
+ , i = 0
+ , code;
+ while(aLen > i){
+ code = +arguments[i++];
+ if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point');
+ res.push(code < 0x10000
+ ? fromCharCode(code)
+ : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
+ );
+ } return res.join('');
+ }
+ });
+
+/***/ },
+/* 124 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $export = __webpack_require__(8)
+ , toIObject = __webpack_require__(32)
+ , toLength = __webpack_require__(37);
+
+ $export($export.S, 'String', {
+ // 21.1.2.4 String.raw(callSite, ...substitutions)
+ raw: function raw(callSite){
+ var tpl = toIObject(callSite.raw)
+ , len = toLength(tpl.length)
+ , aLen = arguments.length
+ , res = []
+ , i = 0;
+ while(len > i){
+ res.push(String(tpl[i++]));
+ if(i < aLen)res.push(String(arguments[i]));
+ } return res.join('');
+ }
+ });
+
+/***/ },
+/* 125 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // 21.1.3.25 String.prototype.trim()
+ __webpack_require__(83)('trim', function($trim){
+ return function trim(){
+ return $trim(this, 3);
+ };
+ });
+
+/***/ },
+/* 126 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $at = __webpack_require__(127)(true);
+
+ // 21.1.3.27 String.prototype[@@iterator]()
+ __webpack_require__(128)(String, 'String', function(iterated){
+ this._t = String(iterated); // target
+ this._i = 0; // next index
+ // 21.1.5.2.1 %StringIteratorPrototype%.next()
+ }, function(){
+ var O = this._t
+ , index = this._i
+ , point;
+ if(index >= O.length)return {value: undefined, done: true};
+ point = $at(O, index);
+ this._i += point.length;
+ return {value: point, done: false};
+ });
+
+/***/ },
+/* 127 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var toInteger = __webpack_require__(38)
+ , defined = __webpack_require__(35);
+ // true -> String#at
+ // false -> String#codePointAt
+ module.exports = function(TO_STRING){
+ return function(that, pos){
+ var s = String(defined(that))
+ , i = toInteger(pos)
+ , l = s.length
+ , a, b;
+ if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
+ a = s.charCodeAt(i);
+ return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
+ ? TO_STRING ? s.charAt(i) : a
+ : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
+ };
+ };
+
+/***/ },
+/* 128 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var LIBRARY = __webpack_require__(28)
+ , $export = __webpack_require__(8)
+ , redefine = __webpack_require__(18)
+ , hide = __webpack_require__(10)
+ , has = __webpack_require__(5)
+ , Iterators = __webpack_require__(129)
+ , $iterCreate = __webpack_require__(130)
+ , setToStringTag = __webpack_require__(24)
+ , getPrototypeOf = __webpack_require__(59)
+ , ITERATOR = __webpack_require__(25)('iterator')
+ , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
+ , FF_ITERATOR = '@@iterator'
+ , KEYS = 'keys'
+ , VALUES = 'values';
+
+ var returnThis = function(){ return this; };
+
+ module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
+ $iterCreate(Constructor, NAME, next);
+ var getMethod = function(kind){
+ if(!BUGGY && kind in proto)return proto[kind];
+ switch(kind){
+ case KEYS: return function keys(){ return new Constructor(this, kind); };
+ case VALUES: return function values(){ return new Constructor(this, kind); };
+ } return function entries(){ return new Constructor(this, kind); };
+ };
+ var TAG = NAME + ' Iterator'
+ , DEF_VALUES = DEFAULT == VALUES
+ , VALUES_BUG = false
+ , proto = Base.prototype
+ , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
+ , $default = $native || getMethod(DEFAULT)
+ , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined
+ , $anyNative = NAME == 'Array' ? proto.entries || $native : $native
+ , methods, key, IteratorPrototype;
+ // Fix native
+ if($anyNative){
+ IteratorPrototype = getPrototypeOf($anyNative.call(new Base));
+ if(IteratorPrototype !== Object.prototype){
+ // Set @@toStringTag to native iterators
+ setToStringTag(IteratorPrototype, TAG, true);
+ // fix for some old engines
+ if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
+ }
+ }
+ // fix Array#{values, @@iterator}.name in V8 / FF
+ if(DEF_VALUES && $native && $native.name !== VALUES){
+ VALUES_BUG = true;
+ $default = function values(){ return $native.call(this); };
+ }
+ // Define iterator
+ if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
+ hide(proto, ITERATOR, $default);
+ }
+ // Plug for library
+ Iterators[NAME] = $default;
+ Iterators[TAG] = returnThis;
+ if(DEFAULT){
+ methods = {
+ values: DEF_VALUES ? $default : getMethod(VALUES),
+ keys: IS_SET ? $default : getMethod(KEYS),
+ entries: $entries
+ };
+ if(FORCED)for(key in methods){
+ if(!(key in proto))redefine(proto, key, methods[key]);
+ } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
+ }
+ return methods;
+ };
+
+/***/ },
+/* 129 */
+/***/ function(module, exports) {
+
+ module.exports = {};
+
+/***/ },
+/* 130 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var create = __webpack_require__(46)
+ , descriptor = __webpack_require__(17)
+ , setToStringTag = __webpack_require__(24)
+ , IteratorPrototype = {};
+
+ // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
+ __webpack_require__(10)(IteratorPrototype, __webpack_require__(25)('iterator'), function(){ return this; });
+
+ module.exports = function(Constructor, NAME, next){
+ Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});
+ setToStringTag(Constructor, NAME + ' Iterator');
+ };
+
+/***/ },
+/* 131 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , $at = __webpack_require__(127)(false);
+ $export($export.P, 'String', {
+ // 21.1.3.3 String.prototype.codePointAt(pos)
+ codePointAt: function codePointAt(pos){
+ return $at(this, pos);
+ }
+ });
+
+/***/ },
+/* 132 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , toLength = __webpack_require__(37)
+ , context = __webpack_require__(133)
+ , ENDS_WITH = 'endsWith'
+ , $endsWith = ''[ENDS_WITH];
+
+ $export($export.P + $export.F * __webpack_require__(135)(ENDS_WITH), 'String', {
+ endsWith: function endsWith(searchString /*, endPosition = @length */){
+ var that = context(this, searchString, ENDS_WITH)
+ , endPosition = arguments.length > 1 ? arguments[1] : undefined
+ , len = toLength(that.length)
+ , end = endPosition === undefined ? len : Math.min(toLength(endPosition), len)
+ , search = String(searchString);
+ return $endsWith
+ ? $endsWith.call(that, search, end)
+ : that.slice(end - search.length, end) === search;
+ }
+ });
+
+/***/ },
+/* 133 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // helper for String#{startsWith, endsWith, includes}
+ var isRegExp = __webpack_require__(134)
+ , defined = __webpack_require__(35);
+
+ module.exports = function(that, searchString, NAME){
+ if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!");
+ return String(defined(that));
+ };
+
+/***/ },
+/* 134 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 7.2.8 IsRegExp(argument)
+ var isObject = __webpack_require__(13)
+ , cof = __webpack_require__(34)
+ , MATCH = __webpack_require__(25)('match');
+ module.exports = function(it){
+ var isRegExp;
+ return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
+ };
+
+/***/ },
+/* 135 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var MATCH = __webpack_require__(25)('match');
+ module.exports = function(KEY){
+ var re = /./;
+ try {
+ '/./'[KEY](re);
+ } catch(e){
+ try {
+ re[MATCH] = false;
+ return !'/./'[KEY](re);
+ } catch(f){ /* empty */ }
+ } return true;
+ };
+
+/***/ },
+/* 136 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 21.1.3.7 String.prototype.includes(searchString, position = 0)
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , context = __webpack_require__(133)
+ , INCLUDES = 'includes';
+
+ $export($export.P + $export.F * __webpack_require__(135)(INCLUDES), 'String', {
+ includes: function includes(searchString /*, position = 0 */){
+ return !!~context(this, searchString, INCLUDES)
+ .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
+ }
+ });
+
+/***/ },
+/* 137 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $export = __webpack_require__(8);
+
+ $export($export.P, 'String', {
+ // 21.1.3.13 String.prototype.repeat(count)
+ repeat: __webpack_require__(91)
+ });
+
+/***/ },
+/* 138 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 21.1.3.18 String.prototype.startsWith(searchString [, position ])
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , toLength = __webpack_require__(37)
+ , context = __webpack_require__(133)
+ , STARTS_WITH = 'startsWith'
+ , $startsWith = ''[STARTS_WITH];
+
+ $export($export.P + $export.F * __webpack_require__(135)(STARTS_WITH), 'String', {
+ startsWith: function startsWith(searchString /*, position = 0 */){
+ var that = context(this, searchString, STARTS_WITH)
+ , index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length))
+ , search = String(searchString);
+ return $startsWith
+ ? $startsWith.call(that, search, index)
+ : that.slice(index, index + search.length) === search;
+ }
+ });
+
+/***/ },
+/* 139 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // B.2.3.2 String.prototype.anchor(name)
+ __webpack_require__(140)('anchor', function(createHTML){
+ return function anchor(name){
+ return createHTML(this, 'a', 'name', name);
+ }
+ });
+
+/***/ },
+/* 140 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $export = __webpack_require__(8)
+ , fails = __webpack_require__(7)
+ , defined = __webpack_require__(35)
+ , quot = /"/g;
+ // B.2.3.2.1 CreateHTML(string, tag, attribute, value)
+ var createHTML = function(string, tag, attribute, value) {
+ var S = String(defined(string))
+ , p1 = '<' + tag;
+ if(attribute !== '')p1 += ' ' + attribute + '="' + String(value).replace(quot, '&quot;') + '"';
+ return p1 + '>' + S + '</' + tag + '>';
+ };
+ module.exports = function(NAME, exec){
+ var O = {};
+ O[NAME] = exec(createHTML);
+ $export($export.P + $export.F * fails(function(){
+ var test = ''[NAME]('"');
+ return test !== test.toLowerCase() || test.split('"').length > 3;
+ }), 'String', O);
+ };
+
+/***/ },
+/* 141 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // B.2.3.3 String.prototype.big()
+ __webpack_require__(140)('big', function(createHTML){
+ return function big(){
+ return createHTML(this, 'big', '', '');
+ }
+ });
+
+/***/ },
+/* 142 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // B.2.3.4 String.prototype.blink()
+ __webpack_require__(140)('blink', function(createHTML){
+ return function blink(){
+ return createHTML(this, 'blink', '', '');
+ }
+ });
+
+/***/ },
+/* 143 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // B.2.3.5 String.prototype.bold()
+ __webpack_require__(140)('bold', function(createHTML){
+ return function bold(){
+ return createHTML(this, 'b', '', '');
+ }
+ });
+
+/***/ },
+/* 144 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // B.2.3.6 String.prototype.fixed()
+ __webpack_require__(140)('fixed', function(createHTML){
+ return function fixed(){
+ return createHTML(this, 'tt', '', '');
+ }
+ });
+
+/***/ },
+/* 145 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // B.2.3.7 String.prototype.fontcolor(color)
+ __webpack_require__(140)('fontcolor', function(createHTML){
+ return function fontcolor(color){
+ return createHTML(this, 'font', 'color', color);
+ }
+ });
+
+/***/ },
+/* 146 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // B.2.3.8 String.prototype.fontsize(size)
+ __webpack_require__(140)('fontsize', function(createHTML){
+ return function fontsize(size){
+ return createHTML(this, 'font', 'size', size);
+ }
+ });
+
+/***/ },
+/* 147 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // B.2.3.9 String.prototype.italics()
+ __webpack_require__(140)('italics', function(createHTML){
+ return function italics(){
+ return createHTML(this, 'i', '', '');
+ }
+ });
+
+/***/ },
+/* 148 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // B.2.3.10 String.prototype.link(url)
+ __webpack_require__(140)('link', function(createHTML){
+ return function link(url){
+ return createHTML(this, 'a', 'href', url);
+ }
+ });
+
+/***/ },
+/* 149 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // B.2.3.11 String.prototype.small()
+ __webpack_require__(140)('small', function(createHTML){
+ return function small(){
+ return createHTML(this, 'small', '', '');
+ }
+ });
+
+/***/ },
+/* 150 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // B.2.3.12 String.prototype.strike()
+ __webpack_require__(140)('strike', function(createHTML){
+ return function strike(){
+ return createHTML(this, 'strike', '', '');
+ }
+ });
+
+/***/ },
+/* 151 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // B.2.3.13 String.prototype.sub()
+ __webpack_require__(140)('sub', function(createHTML){
+ return function sub(){
+ return createHTML(this, 'sub', '', '');
+ }
+ });
+
+/***/ },
+/* 152 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // B.2.3.14 String.prototype.sup()
+ __webpack_require__(140)('sup', function(createHTML){
+ return function sup(){
+ return createHTML(this, 'sup', '', '');
+ }
+ });
+
+/***/ },
+/* 153 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 20.3.3.1 / 15.9.4.4 Date.now()
+ var $export = __webpack_require__(8);
+
+ $export($export.S, 'Date', {now: function(){ return new Date().getTime(); }});
+
+/***/ },
+/* 154 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , toObject = __webpack_require__(58)
+ , toPrimitive = __webpack_require__(16);
+
+ $export($export.P + $export.F * __webpack_require__(7)(function(){
+ return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({toISOString: function(){ return 1; }}) !== 1;
+ }), 'Date', {
+ toJSON: function toJSON(key){
+ var O = toObject(this)
+ , pv = toPrimitive(O);
+ return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
+ }
+ });
+
+/***/ },
+/* 155 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
+ var $export = __webpack_require__(8)
+ , fails = __webpack_require__(7)
+ , getTime = Date.prototype.getTime;
+
+ var lz = function(num){
+ return num > 9 ? num : '0' + num;
+ };
+
+ // PhantomJS / old WebKit has a broken implementations
+ $export($export.P + $export.F * (fails(function(){
+ return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z';
+ }) || !fails(function(){
+ new Date(NaN).toISOString();
+ })), 'Date', {
+ toISOString: function toISOString(){
+ if(!isFinite(getTime.call(this)))throw RangeError('Invalid time value');
+ var d = this
+ , y = d.getUTCFullYear()
+ , m = d.getUTCMilliseconds()
+ , s = y < 0 ? '-' : y > 9999 ? '+' : '';
+ return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
+ '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
+ 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
+ ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
+ }
+ });
+
+/***/ },
+/* 156 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var DateProto = Date.prototype
+ , INVALID_DATE = 'Invalid Date'
+ , TO_STRING = 'toString'
+ , $toString = DateProto[TO_STRING]
+ , getTime = DateProto.getTime;
+ if(new Date(NaN) + '' != INVALID_DATE){
+ __webpack_require__(18)(DateProto, TO_STRING, function toString(){
+ var value = getTime.call(this);
+ return value === value ? $toString.call(this) : INVALID_DATE;
+ });
+ }
+
+/***/ },
+/* 157 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var TO_PRIMITIVE = __webpack_require__(25)('toPrimitive')
+ , proto = Date.prototype;
+
+ if(!(TO_PRIMITIVE in proto))__webpack_require__(10)(proto, TO_PRIMITIVE, __webpack_require__(158));
+
+/***/ },
+/* 158 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var anObject = __webpack_require__(12)
+ , toPrimitive = __webpack_require__(16)
+ , NUMBER = 'number';
+
+ module.exports = function(hint){
+ if(hint !== 'string' && hint !== NUMBER && hint !== 'default')throw TypeError('Incorrect hint');
+ return toPrimitive(anObject(this), hint != NUMBER);
+ };
+
+/***/ },
+/* 159 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
+ var $export = __webpack_require__(8);
+
+ $export($export.S, 'Array', {isArray: __webpack_require__(45)});
+
+/***/ },
+/* 160 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var ctx = __webpack_require__(20)
+ , $export = __webpack_require__(8)
+ , toObject = __webpack_require__(58)
+ , call = __webpack_require__(161)
+ , isArrayIter = __webpack_require__(162)
+ , toLength = __webpack_require__(37)
+ , createProperty = __webpack_require__(163)
+ , getIterFn = __webpack_require__(164);
+
+ $export($export.S + $export.F * !__webpack_require__(165)(function(iter){ Array.from(iter); }), 'Array', {
+ // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
+ from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){
+ var O = toObject(arrayLike)
+ , C = typeof this == 'function' ? this : Array
+ , aLen = arguments.length
+ , mapfn = aLen > 1 ? arguments[1] : undefined
+ , mapping = mapfn !== undefined
+ , index = 0
+ , iterFn = getIterFn(O)
+ , length, result, step, iterator;
+ if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
+ // if object isn't iterable or it's array with default iterator - use simple case
+ if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){
+ for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){
+ createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
+ }
+ } else {
+ length = toLength(O.length);
+ for(result = new C(length); length > index; index++){
+ createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
+ }
+ }
+ result.length = index;
+ return result;
+ }
+ });
+
+
+/***/ },
+/* 161 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // call something on iterator step with safe closing on error
+ var anObject = __webpack_require__(12);
+ module.exports = function(iterator, fn, value, entries){
+ try {
+ return entries ? fn(anObject(value)[0], value[1]) : fn(value);
+ // 7.4.6 IteratorClose(iterator, completion)
+ } catch(e){
+ var ret = iterator['return'];
+ if(ret !== undefined)anObject(ret.call(iterator));
+ throw e;
+ }
+ };
+
+/***/ },
+/* 162 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // check on default Array iterator
+ var Iterators = __webpack_require__(129)
+ , ITERATOR = __webpack_require__(25)('iterator')
+ , ArrayProto = Array.prototype;
+
+ module.exports = function(it){
+ return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
+ };
+
+/***/ },
+/* 163 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $defineProperty = __webpack_require__(11)
+ , createDesc = __webpack_require__(17);
+
+ module.exports = function(object, index, value){
+ if(index in object)$defineProperty.f(object, index, createDesc(0, value));
+ else object[index] = value;
+ };
+
+/***/ },
+/* 164 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var classof = __webpack_require__(75)
+ , ITERATOR = __webpack_require__(25)('iterator')
+ , Iterators = __webpack_require__(129);
+ module.exports = __webpack_require__(9).getIteratorMethod = function(it){
+ if(it != undefined)return it[ITERATOR]
+ || it['@@iterator']
+ || Iterators[classof(it)];
+ };
+
+/***/ },
+/* 165 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var ITERATOR = __webpack_require__(25)('iterator')
+ , SAFE_CLOSING = false;
+
+ try {
+ var riter = [7][ITERATOR]();
+ riter['return'] = function(){ SAFE_CLOSING = true; };
+ Array.from(riter, function(){ throw 2; });
+ } catch(e){ /* empty */ }
+
+ module.exports = function(exec, skipClosing){
+ if(!skipClosing && !SAFE_CLOSING)return false;
+ var safe = false;
+ try {
+ var arr = [7]
+ , iter = arr[ITERATOR]();
+ iter.next = function(){ return {done: safe = true}; };
+ arr[ITERATOR] = function(){ return iter; };
+ exec(arr);
+ } catch(e){ /* empty */ }
+ return safe;
+ };
+
+/***/ },
+/* 166 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , createProperty = __webpack_require__(163);
+
+ // WebKit Array.of isn't generic
+ $export($export.S + $export.F * __webpack_require__(7)(function(){
+ function F(){}
+ return !(Array.of.call(F) instanceof F);
+ }), 'Array', {
+ // 22.1.2.3 Array.of( ...items)
+ of: function of(/* ...args */){
+ var index = 0
+ , aLen = arguments.length
+ , result = new (typeof this == 'function' ? this : Array)(aLen);
+ while(aLen > index)createProperty(result, index, arguments[index++]);
+ result.length = aLen;
+ return result;
+ }
+ });
+
+/***/ },
+/* 167 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // 22.1.3.13 Array.prototype.join(separator)
+ var $export = __webpack_require__(8)
+ , toIObject = __webpack_require__(32)
+ , arrayJoin = [].join;
+
+ // fallback for not array-like strings
+ $export($export.P + $export.F * (__webpack_require__(33) != Object || !__webpack_require__(168)(arrayJoin)), 'Array', {
+ join: function join(separator){
+ return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);
+ }
+ });
+
+/***/ },
+/* 168 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var fails = __webpack_require__(7);
+
+ module.exports = function(method, arg){
+ return !!method && fails(function(){
+ arg ? method.call(null, function(){}, 1) : method.call(null);
+ });
+ };
+
+/***/ },
+/* 169 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , html = __webpack_require__(48)
+ , cof = __webpack_require__(34)
+ , toIndex = __webpack_require__(39)
+ , toLength = __webpack_require__(37)
+ , arraySlice = [].slice;
+
+ // fallback for not array-like ES3 strings and DOM objects
+ $export($export.P + $export.F * __webpack_require__(7)(function(){
+ if(html)arraySlice.call(html);
+ }), 'Array', {
+ slice: function slice(begin, end){
+ var len = toLength(this.length)
+ , klass = cof(this);
+ end = end === undefined ? len : end;
+ if(klass == 'Array')return arraySlice.call(this, begin, end);
+ var start = toIndex(begin, len)
+ , upTo = toIndex(end, len)
+ , size = toLength(upTo - start)
+ , cloned = Array(size)
+ , i = 0;
+ for(; i < size; i++)cloned[i] = klass == 'String'
+ ? this.charAt(start + i)
+ : this[start + i];
+ return cloned;
+ }
+ });
+
+/***/ },
+/* 170 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , aFunction = __webpack_require__(21)
+ , toObject = __webpack_require__(58)
+ , fails = __webpack_require__(7)
+ , $sort = [].sort
+ , test = [1, 2, 3];
+
+ $export($export.P + $export.F * (fails(function(){
+ // IE8-
+ test.sort(undefined);
+ }) || !fails(function(){
+ // V8 bug
+ test.sort(null);
+ // Old WebKit
+ }) || !__webpack_require__(168)($sort)), 'Array', {
+ // 22.1.3.25 Array.prototype.sort(comparefn)
+ sort: function sort(comparefn){
+ return comparefn === undefined
+ ? $sort.call(toObject(this))
+ : $sort.call(toObject(this), aFunction(comparefn));
+ }
+ });
+
+/***/ },
+/* 171 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , $forEach = __webpack_require__(172)(0)
+ , STRICT = __webpack_require__(168)([].forEach, true);
+
+ $export($export.P + $export.F * !STRICT, 'Array', {
+ // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
+ forEach: function forEach(callbackfn /* , thisArg */){
+ return $forEach(this, callbackfn, arguments[1]);
+ }
+ });
+
+/***/ },
+/* 172 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 0 -> Array#forEach
+ // 1 -> Array#map
+ // 2 -> Array#filter
+ // 3 -> Array#some
+ // 4 -> Array#every
+ // 5 -> Array#find
+ // 6 -> Array#findIndex
+ var ctx = __webpack_require__(20)
+ , IObject = __webpack_require__(33)
+ , toObject = __webpack_require__(58)
+ , toLength = __webpack_require__(37)
+ , asc = __webpack_require__(173);
+ module.exports = function(TYPE, $create){
+ var IS_MAP = TYPE == 1
+ , IS_FILTER = TYPE == 2
+ , IS_SOME = TYPE == 3
+ , IS_EVERY = TYPE == 4
+ , IS_FIND_INDEX = TYPE == 6
+ , NO_HOLES = TYPE == 5 || IS_FIND_INDEX
+ , create = $create || asc;
+ return function($this, callbackfn, that){
+ var O = toObject($this)
+ , self = IObject(O)
+ , f = ctx(callbackfn, that, 3)
+ , length = toLength(self.length)
+ , index = 0
+ , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined
+ , val, res;
+ for(;length > index; index++)if(NO_HOLES || index in self){
+ val = self[index];
+ res = f(val, index, O);
+ if(TYPE){
+ if(IS_MAP)result[index] = res; // map
+ else if(res)switch(TYPE){
+ case 3: return true; // some
+ case 5: return val; // find
+ case 6: return index; // findIndex
+ case 2: result.push(val); // filter
+ } else if(IS_EVERY)return false; // every
+ }
+ }
+ return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
+ };
+ };
+
+/***/ },
+/* 173 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 9.4.2.3 ArraySpeciesCreate(originalArray, length)
+ var speciesConstructor = __webpack_require__(174);
+
+ module.exports = function(original, length){
+ return new (speciesConstructor(original))(length);
+ };
+
+/***/ },
+/* 174 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var isObject = __webpack_require__(13)
+ , isArray = __webpack_require__(45)
+ , SPECIES = __webpack_require__(25)('species');
+
+ module.exports = function(original){
+ var C;
+ if(isArray(original)){
+ C = original.constructor;
+ // cross-realm fallback
+ if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined;
+ if(isObject(C)){
+ C = C[SPECIES];
+ if(C === null)C = undefined;
+ }
+ } return C === undefined ? Array : C;
+ };
+
+/***/ },
+/* 175 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , $map = __webpack_require__(172)(1);
+
+ $export($export.P + $export.F * !__webpack_require__(168)([].map, true), 'Array', {
+ // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
+ map: function map(callbackfn /* , thisArg */){
+ return $map(this, callbackfn, arguments[1]);
+ }
+ });
+
+/***/ },
+/* 176 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , $filter = __webpack_require__(172)(2);
+
+ $export($export.P + $export.F * !__webpack_require__(168)([].filter, true), 'Array', {
+ // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
+ filter: function filter(callbackfn /* , thisArg */){
+ return $filter(this, callbackfn, arguments[1]);
+ }
+ });
+
+/***/ },
+/* 177 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , $some = __webpack_require__(172)(3);
+
+ $export($export.P + $export.F * !__webpack_require__(168)([].some, true), 'Array', {
+ // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
+ some: function some(callbackfn /* , thisArg */){
+ return $some(this, callbackfn, arguments[1]);
+ }
+ });
+
+/***/ },
+/* 178 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , $every = __webpack_require__(172)(4);
+
+ $export($export.P + $export.F * !__webpack_require__(168)([].every, true), 'Array', {
+ // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
+ every: function every(callbackfn /* , thisArg */){
+ return $every(this, callbackfn, arguments[1]);
+ }
+ });
+
+/***/ },
+/* 179 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , $reduce = __webpack_require__(180);
+
+ $export($export.P + $export.F * !__webpack_require__(168)([].reduce, true), 'Array', {
+ // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
+ reduce: function reduce(callbackfn /* , initialValue */){
+ return $reduce(this, callbackfn, arguments.length, arguments[1], false);
+ }
+ });
+
+/***/ },
+/* 180 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var aFunction = __webpack_require__(21)
+ , toObject = __webpack_require__(58)
+ , IObject = __webpack_require__(33)
+ , toLength = __webpack_require__(37);
+
+ module.exports = function(that, callbackfn, aLen, memo, isRight){
+ aFunction(callbackfn);
+ var O = toObject(that)
+ , self = IObject(O)
+ , length = toLength(O.length)
+ , index = isRight ? length - 1 : 0
+ , i = isRight ? -1 : 1;
+ if(aLen < 2)for(;;){
+ if(index in self){
+ memo = self[index];
+ index += i;
+ break;
+ }
+ index += i;
+ if(isRight ? index < 0 : length <= index){
+ throw TypeError('Reduce of empty array with no initial value');
+ }
+ }
+ for(;isRight ? index >= 0 : length > index; index += i)if(index in self){
+ memo = callbackfn(memo, self[index], index, O);
+ }
+ return memo;
+ };
+
+/***/ },
+/* 181 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , $reduce = __webpack_require__(180);
+
+ $export($export.P + $export.F * !__webpack_require__(168)([].reduceRight, true), 'Array', {
+ // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
+ reduceRight: function reduceRight(callbackfn /* , initialValue */){
+ return $reduce(this, callbackfn, arguments.length, arguments[1], true);
+ }
+ });
+
+/***/ },
+/* 182 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , $indexOf = __webpack_require__(36)(false)
+ , $native = [].indexOf
+ , NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0;
+
+ $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(168)($native)), 'Array', {
+ // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
+ indexOf: function indexOf(searchElement /*, fromIndex = 0 */){
+ return NEGATIVE_ZERO
+ // convert -0 to +0
+ ? $native.apply(this, arguments) || 0
+ : $indexOf(this, searchElement, arguments[1]);
+ }
+ });
+
+/***/ },
+/* 183 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , toIObject = __webpack_require__(32)
+ , toInteger = __webpack_require__(38)
+ , toLength = __webpack_require__(37)
+ , $native = [].lastIndexOf
+ , NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0;
+
+ $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(168)($native)), 'Array', {
+ // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
+ lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */){
+ // convert -0 to +0
+ if(NEGATIVE_ZERO)return $native.apply(this, arguments) || 0;
+ var O = toIObject(this)
+ , length = toLength(O.length)
+ , index = length - 1;
+ if(arguments.length > 1)index = Math.min(index, toInteger(arguments[1]));
+ if(index < 0)index = length + index;
+ for(;index >= 0; index--)if(index in O)if(O[index] === searchElement)return index || 0;
+ return -1;
+ }
+ });
+
+/***/ },
+/* 184 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
+ var $export = __webpack_require__(8);
+
+ $export($export.P, 'Array', {copyWithin: __webpack_require__(185)});
+
+ __webpack_require__(186)('copyWithin');
+
+/***/ },
+/* 185 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
+ 'use strict';
+ var toObject = __webpack_require__(58)
+ , toIndex = __webpack_require__(39)
+ , toLength = __webpack_require__(37);
+
+ module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){
+ var O = toObject(this)
+ , len = toLength(O.length)
+ , to = toIndex(target, len)
+ , from = toIndex(start, len)
+ , end = arguments.length > 2 ? arguments[2] : undefined
+ , count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to)
+ , inc = 1;
+ if(from < to && to < from + count){
+ inc = -1;
+ from += count - 1;
+ to += count - 1;
+ }
+ while(count-- > 0){
+ if(from in O)O[to] = O[from];
+ else delete O[to];
+ to += inc;
+ from += inc;
+ } return O;
+ };
+
+/***/ },
+/* 186 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 22.1.3.31 Array.prototype[@@unscopables]
+ var UNSCOPABLES = __webpack_require__(25)('unscopables')
+ , ArrayProto = Array.prototype;
+ if(ArrayProto[UNSCOPABLES] == undefined)__webpack_require__(10)(ArrayProto, UNSCOPABLES, {});
+ module.exports = function(key){
+ ArrayProto[UNSCOPABLES][key] = true;
+ };
+
+/***/ },
+/* 187 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
+ var $export = __webpack_require__(8);
+
+ $export($export.P, 'Array', {fill: __webpack_require__(188)});
+
+ __webpack_require__(186)('fill');
+
+/***/ },
+/* 188 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
+ 'use strict';
+ var toObject = __webpack_require__(58)
+ , toIndex = __webpack_require__(39)
+ , toLength = __webpack_require__(37);
+ module.exports = function fill(value /*, start = 0, end = @length */){
+ var O = toObject(this)
+ , length = toLength(O.length)
+ , aLen = arguments.length
+ , index = toIndex(aLen > 1 ? arguments[1] : undefined, length)
+ , end = aLen > 2 ? arguments[2] : undefined
+ , endPos = end === undefined ? length : toIndex(end, length);
+ while(endPos > index)O[index++] = value;
+ return O;
+ };
+
+/***/ },
+/* 189 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
+ var $export = __webpack_require__(8)
+ , $find = __webpack_require__(172)(5)
+ , KEY = 'find'
+ , forced = true;
+ // Shouldn't skip holes
+ if(KEY in [])Array(1)[KEY](function(){ forced = false; });
+ $export($export.P + $export.F * forced, 'Array', {
+ find: function find(callbackfn/*, that = undefined */){
+ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+ }
+ });
+ __webpack_require__(186)(KEY);
+
+/***/ },
+/* 190 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
+ var $export = __webpack_require__(8)
+ , $find = __webpack_require__(172)(6)
+ , KEY = 'findIndex'
+ , forced = true;
+ // Shouldn't skip holes
+ if(KEY in [])Array(1)[KEY](function(){ forced = false; });
+ $export($export.P + $export.F * forced, 'Array', {
+ findIndex: function findIndex(callbackfn/*, that = undefined */){
+ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+ }
+ });
+ __webpack_require__(186)(KEY);
+
+/***/ },
+/* 191 */
+/***/ function(module, exports, __webpack_require__) {
+
+ __webpack_require__(192)('Array');
+
+/***/ },
+/* 192 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var global = __webpack_require__(4)
+ , dP = __webpack_require__(11)
+ , DESCRIPTORS = __webpack_require__(6)
+ , SPECIES = __webpack_require__(25)('species');
+
+ module.exports = function(KEY){
+ var C = global[KEY];
+ if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, {
+ configurable: true,
+ get: function(){ return this; }
+ });
+ };
+
+/***/ },
+/* 193 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var addToUnscopables = __webpack_require__(186)
+ , step = __webpack_require__(194)
+ , Iterators = __webpack_require__(129)
+ , toIObject = __webpack_require__(32);
+
+ // 22.1.3.4 Array.prototype.entries()
+ // 22.1.3.13 Array.prototype.keys()
+ // 22.1.3.29 Array.prototype.values()
+ // 22.1.3.30 Array.prototype[@@iterator]()
+ module.exports = __webpack_require__(128)(Array, 'Array', function(iterated, kind){
+ this._t = toIObject(iterated); // target
+ this._i = 0; // next index
+ this._k = kind; // kind
+ // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
+ }, function(){
+ var O = this._t
+ , kind = this._k
+ , index = this._i++;
+ if(!O || index >= O.length){
+ this._t = undefined;
+ return step(1);
+ }
+ if(kind == 'keys' )return step(0, index);
+ if(kind == 'values')return step(0, O[index]);
+ return step(0, [index, O[index]]);
+ }, 'values');
+
+ // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
+ Iterators.Arguments = Iterators.Array;
+
+ addToUnscopables('keys');
+ addToUnscopables('values');
+ addToUnscopables('entries');
+
+/***/ },
+/* 194 */
+/***/ function(module, exports) {
+
+ module.exports = function(done, value){
+ return {value: value, done: !!done};
+ };
+
+/***/ },
+/* 195 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var global = __webpack_require__(4)
+ , inheritIfRequired = __webpack_require__(88)
+ , dP = __webpack_require__(11).f
+ , gOPN = __webpack_require__(50).f
+ , isRegExp = __webpack_require__(134)
+ , $flags = __webpack_require__(196)
+ , $RegExp = global.RegExp
+ , Base = $RegExp
+ , proto = $RegExp.prototype
+ , re1 = /a/g
+ , re2 = /a/g
+ // "new" creates a new object, old webkit buggy here
+ , CORRECT_NEW = new $RegExp(re1) !== re1;
+
+ if(__webpack_require__(6) && (!CORRECT_NEW || __webpack_require__(7)(function(){
+ re2[__webpack_require__(25)('match')] = false;
+ // RegExp constructor can alter flags and IsRegExp works correct with @@match
+ return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';
+ }))){
+ $RegExp = function RegExp(p, f){
+ var tiRE = this instanceof $RegExp
+ , piRE = isRegExp(p)
+ , fiU = f === undefined;
+ return !tiRE && piRE && p.constructor === $RegExp && fiU ? p
+ : inheritIfRequired(CORRECT_NEW
+ ? new Base(piRE && !fiU ? p.source : p, f)
+ : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)
+ , tiRE ? this : proto, $RegExp);
+ };
+ var proxy = function(key){
+ key in $RegExp || dP($RegExp, key, {
+ configurable: true,
+ get: function(){ return Base[key]; },
+ set: function(it){ Base[key] = it; }
+ });
+ };
+ for(var keys = gOPN(Base), i = 0; keys.length > i; )proxy(keys[i++]);
+ proto.constructor = $RegExp;
+ $RegExp.prototype = proto;
+ __webpack_require__(18)(global, 'RegExp', $RegExp);
+ }
+
+ __webpack_require__(192)('RegExp');
+
+/***/ },
+/* 196 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // 21.2.5.3 get RegExp.prototype.flags
+ var anObject = __webpack_require__(12);
+ module.exports = function(){
+ var that = anObject(this)
+ , result = '';
+ if(that.global) result += 'g';
+ if(that.ignoreCase) result += 'i';
+ if(that.multiline) result += 'm';
+ if(that.unicode) result += 'u';
+ if(that.sticky) result += 'y';
+ return result;
+ };
+
+/***/ },
+/* 197 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ __webpack_require__(198);
+ var anObject = __webpack_require__(12)
+ , $flags = __webpack_require__(196)
+ , DESCRIPTORS = __webpack_require__(6)
+ , TO_STRING = 'toString'
+ , $toString = /./[TO_STRING];
+
+ var define = function(fn){
+ __webpack_require__(18)(RegExp.prototype, TO_STRING, fn, true);
+ };
+
+ // 21.2.5.14 RegExp.prototype.toString()
+ if(__webpack_require__(7)(function(){ return $toString.call({source: 'a', flags: 'b'}) != '/a/b'; })){
+ define(function toString(){
+ var R = anObject(this);
+ return '/'.concat(R.source, '/',
+ 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);
+ });
+ // FF44- RegExp#toString has a wrong name
+ } else if($toString.name != TO_STRING){
+ define(function toString(){
+ return $toString.call(this);
+ });
+ }
+
+/***/ },
+/* 198 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 21.2.5.3 get RegExp.prototype.flags()
+ if(__webpack_require__(6) && /./g.flags != 'g')__webpack_require__(11).f(RegExp.prototype, 'flags', {
+ configurable: true,
+ get: __webpack_require__(196)
+ });
+
+/***/ },
+/* 199 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // @@match logic
+ __webpack_require__(200)('match', 1, function(defined, MATCH, $match){
+ // 21.1.3.11 String.prototype.match(regexp)
+ return [function match(regexp){
+ 'use strict';
+ var O = defined(this)
+ , fn = regexp == undefined ? undefined : regexp[MATCH];
+ return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
+ }, $match];
+ });
+
+/***/ },
+/* 200 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var hide = __webpack_require__(10)
+ , redefine = __webpack_require__(18)
+ , fails = __webpack_require__(7)
+ , defined = __webpack_require__(35)
+ , wks = __webpack_require__(25);
+
+ module.exports = function(KEY, length, exec){
+ var SYMBOL = wks(KEY)
+ , fns = exec(defined, SYMBOL, ''[KEY])
+ , strfn = fns[0]
+ , rxfn = fns[1];
+ if(fails(function(){
+ var O = {};
+ O[SYMBOL] = function(){ return 7; };
+ return ''[KEY](O) != 7;
+ })){
+ redefine(String.prototype, KEY, strfn);
+ hide(RegExp.prototype, SYMBOL, length == 2
+ // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
+ // 21.2.5.11 RegExp.prototype[@@split](string, limit)
+ ? function(string, arg){ return rxfn.call(string, this, arg); }
+ // 21.2.5.6 RegExp.prototype[@@match](string)
+ // 21.2.5.9 RegExp.prototype[@@search](string)
+ : function(string){ return rxfn.call(string, this); }
+ );
+ }
+ };
+
+/***/ },
+/* 201 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // @@replace logic
+ __webpack_require__(200)('replace', 2, function(defined, REPLACE, $replace){
+ // 21.1.3.14 String.prototype.replace(searchValue, replaceValue)
+ return [function replace(searchValue, replaceValue){
+ 'use strict';
+ var O = defined(this)
+ , fn = searchValue == undefined ? undefined : searchValue[REPLACE];
+ return fn !== undefined
+ ? fn.call(searchValue, O, replaceValue)
+ : $replace.call(String(O), searchValue, replaceValue);
+ }, $replace];
+ });
+
+/***/ },
+/* 202 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // @@search logic
+ __webpack_require__(200)('search', 1, function(defined, SEARCH, $search){
+ // 21.1.3.15 String.prototype.search(regexp)
+ return [function search(regexp){
+ 'use strict';
+ var O = defined(this)
+ , fn = regexp == undefined ? undefined : regexp[SEARCH];
+ return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
+ }, $search];
+ });
+
+/***/ },
+/* 203 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // @@split logic
+ __webpack_require__(200)('split', 2, function(defined, SPLIT, $split){
+ 'use strict';
+ var isRegExp = __webpack_require__(134)
+ , _split = $split
+ , $push = [].push
+ , $SPLIT = 'split'
+ , LENGTH = 'length'
+ , LAST_INDEX = 'lastIndex';
+ if(
+ 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
+ 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
+ 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||
+ '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||
+ '.'[$SPLIT](/()()/)[LENGTH] > 1 ||
+ ''[$SPLIT](/.?/)[LENGTH]
+ ){
+ var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group
+ // based on es5-shim implementation, need to rework it
+ $split = function(separator, limit){
+ var string = String(this);
+ if(separator === undefined && limit === 0)return [];
+ // If `separator` is not a regex, use native split
+ if(!isRegExp(separator))return _split.call(string, separator, limit);
+ var output = [];
+ var flags = (separator.ignoreCase ? 'i' : '') +
+ (separator.multiline ? 'm' : '') +
+ (separator.unicode ? 'u' : '') +
+ (separator.sticky ? 'y' : '');
+ var lastLastIndex = 0;
+ var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;
+ // Make `global` and avoid `lastIndex` issues by working with a copy
+ var separatorCopy = new RegExp(separator.source, flags + 'g');
+ var separator2, match, lastIndex, lastLength, i;
+ // Doesn't need flags gy, but they don't hurt
+ if(!NPCG)separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags);
+ while(match = separatorCopy.exec(string)){
+ // `separatorCopy.lastIndex` is not reliable cross-browser
+ lastIndex = match.index + match[0][LENGTH];
+ if(lastIndex > lastLastIndex){
+ output.push(string.slice(lastLastIndex, match.index));
+ // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG
+ if(!NPCG && match[LENGTH] > 1)match[0].replace(separator2, function(){
+ for(i = 1; i < arguments[LENGTH] - 2; i++)if(arguments[i] === undefined)match[i] = undefined;
+ });
+ if(match[LENGTH] > 1 && match.index < string[LENGTH])$push.apply(output, match.slice(1));
+ lastLength = match[0][LENGTH];
+ lastLastIndex = lastIndex;
+ if(output[LENGTH] >= splitLimit)break;
+ }
+ if(separatorCopy[LAST_INDEX] === match.index)separatorCopy[LAST_INDEX]++; // Avoid an infinite loop
+ }
+ if(lastLastIndex === string[LENGTH]){
+ if(lastLength || !separatorCopy.test(''))output.push('');
+ } else output.push(string.slice(lastLastIndex));
+ return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;
+ };
+ // Chakra, V8
+ } else if('0'[$SPLIT](undefined, 0)[LENGTH]){
+ $split = function(separator, limit){
+ return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit);
+ };
+ }
+ // 21.1.3.17 String.prototype.split(separator, limit)
+ return [function split(separator, limit){
+ var O = defined(this)
+ , fn = separator == undefined ? undefined : separator[SPLIT];
+ return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);
+ }, $split];
+ });
+
+/***/ },
+/* 204 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var LIBRARY = __webpack_require__(28)
+ , global = __webpack_require__(4)
+ , ctx = __webpack_require__(20)
+ , classof = __webpack_require__(75)
+ , $export = __webpack_require__(8)
+ , isObject = __webpack_require__(13)
+ , aFunction = __webpack_require__(21)
+ , anInstance = __webpack_require__(205)
+ , forOf = __webpack_require__(206)
+ , speciesConstructor = __webpack_require__(207)
+ , task = __webpack_require__(208).set
+ , microtask = __webpack_require__(209)()
+ , PROMISE = 'Promise'
+ , TypeError = global.TypeError
+ , process = global.process
+ , $Promise = global[PROMISE]
+ , process = global.process
+ , isNode = classof(process) == 'process'
+ , empty = function(){ /* empty */ }
+ , Internal, GenericPromiseCapability, Wrapper;
+
+ var USE_NATIVE = !!function(){
+ try {
+ // correct subclassing with @@species support
+ var promise = $Promise.resolve(1)
+ , FakePromise = (promise.constructor = {})[__webpack_require__(25)('species')] = function(exec){ exec(empty, empty); };
+ // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
+ return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;
+ } catch(e){ /* empty */ }
+ }();
+
+ // helpers
+ var sameConstructor = function(a, b){
+ // with library wrapper special case
+ return a === b || a === $Promise && b === Wrapper;
+ };
+ var isThenable = function(it){
+ var then;
+ return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
+ };
+ var newPromiseCapability = function(C){
+ return sameConstructor($Promise, C)
+ ? new PromiseCapability(C)
+ : new GenericPromiseCapability(C);
+ };
+ var PromiseCapability = GenericPromiseCapability = function(C){
+ var resolve, reject;
+ this.promise = new C(function($$resolve, $$reject){
+ if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor');
+ resolve = $$resolve;
+ reject = $$reject;
+ });
+ this.resolve = aFunction(resolve);
+ this.reject = aFunction(reject);
+ };
+ var perform = function(exec){
+ try {
+ exec();
+ } catch(e){
+ return {error: e};
+ }
+ };
+ var notify = function(promise, isReject){
+ if(promise._n)return;
+ promise._n = true;
+ var chain = promise._c;
+ microtask(function(){
+ var value = promise._v
+ , ok = promise._s == 1
+ , i = 0;
+ var run = function(reaction){
+ var handler = ok ? reaction.ok : reaction.fail
+ , resolve = reaction.resolve
+ , reject = reaction.reject
+ , domain = reaction.domain
+ , result, then;
+ try {
+ if(handler){
+ if(!ok){
+ if(promise._h == 2)onHandleUnhandled(promise);
+ promise._h = 1;
+ }
+ if(handler === true)result = value;
+ else {
+ if(domain)domain.enter();
+ result = handler(value);
+ if(domain)domain.exit();
+ }
+ if(result === reaction.promise){
+ reject(TypeError('Promise-chain cycle'));
+ } else if(then = isThenable(result)){
+ then.call(result, resolve, reject);
+ } else resolve(result);
+ } else reject(value);
+ } catch(e){
+ reject(e);
+ }
+ };
+ while(chain.length > i)run(chain[i++]); // variable length - can't use forEach
+ promise._c = [];
+ promise._n = false;
+ if(isReject && !promise._h)onUnhandled(promise);
+ });
+ };
+ var onUnhandled = function(promise){
+ task.call(global, function(){
+ var value = promise._v
+ , abrupt, handler, console;
+ if(isUnhandled(promise)){
+ abrupt = perform(function(){
+ if(isNode){
+ process.emit('unhandledRejection', value, promise);
+ } else if(handler = global.onunhandledrejection){
+ handler({promise: promise, reason: value});
+ } else if((console = global.console) && console.error){
+ console.error('Unhandled promise rejection', value);
+ }
+ });
+ // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
+ promise._h = isNode || isUnhandled(promise) ? 2 : 1;
+ } promise._a = undefined;
+ if(abrupt)throw abrupt.error;
+ });
+ };
+ var isUnhandled = function(promise){
+ if(promise._h == 1)return false;
+ var chain = promise._a || promise._c
+ , i = 0
+ , reaction;
+ while(chain.length > i){
+ reaction = chain[i++];
+ if(reaction.fail || !isUnhandled(reaction.promise))return false;
+ } return true;
+ };
+ var onHandleUnhandled = function(promise){
+ task.call(global, function(){
+ var handler;
+ if(isNode){
+ process.emit('rejectionHandled', promise);
+ } else if(handler = global.onrejectionhandled){
+ handler({promise: promise, reason: promise._v});
+ }
+ });
+ };
+ var $reject = function(value){
+ var promise = this;
+ if(promise._d)return;
+ promise._d = true;
+ promise = promise._w || promise; // unwrap
+ promise._v = value;
+ promise._s = 2;
+ if(!promise._a)promise._a = promise._c.slice();
+ notify(promise, true);
+ };
+ var $resolve = function(value){
+ var promise = this
+ , then;
+ if(promise._d)return;
+ promise._d = true;
+ promise = promise._w || promise; // unwrap
+ try {
+ if(promise === value)throw TypeError("Promise can't be resolved itself");
+ if(then = isThenable(value)){
+ microtask(function(){
+ var wrapper = {_w: promise, _d: false}; // wrap
+ try {
+ then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
+ } catch(e){
+ $reject.call(wrapper, e);
+ }
+ });
+ } else {
+ promise._v = value;
+ promise._s = 1;
+ notify(promise, false);
+ }
+ } catch(e){
+ $reject.call({_w: promise, _d: false}, e); // wrap
+ }
+ };
+
+ // constructor polyfill
+ if(!USE_NATIVE){
+ // 25.4.3.1 Promise(executor)
+ $Promise = function Promise(executor){
+ anInstance(this, $Promise, PROMISE, '_h');
+ aFunction(executor);
+ Internal.call(this);
+ try {
+ executor(ctx($resolve, this, 1), ctx($reject, this, 1));
+ } catch(err){
+ $reject.call(this, err);
+ }
+ };
+ Internal = function Promise(executor){
+ this._c = []; // <- awaiting reactions
+ this._a = undefined; // <- checked in isUnhandled reactions
+ this._s = 0; // <- state
+ this._d = false; // <- done
+ this._v = undefined; // <- value
+ this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
+ this._n = false; // <- notify
+ };
+ Internal.prototype = __webpack_require__(210)($Promise.prototype, {
+ // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
+ then: function then(onFulfilled, onRejected){
+ var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
+ reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
+ reaction.fail = typeof onRejected == 'function' && onRejected;
+ reaction.domain = isNode ? process.domain : undefined;
+ this._c.push(reaction);
+ if(this._a)this._a.push(reaction);
+ if(this._s)notify(this, false);
+ return reaction.promise;
+ },
+ // 25.4.5.1 Promise.prototype.catch(onRejected)
+ 'catch': function(onRejected){
+ return this.then(undefined, onRejected);
+ }
+ });
+ PromiseCapability = function(){
+ var promise = new Internal;
+ this.promise = promise;
+ this.resolve = ctx($resolve, promise, 1);
+ this.reject = ctx($reject, promise, 1);
+ };
+ }
+
+ $export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise});
+ __webpack_require__(24)($Promise, PROMISE);
+ __webpack_require__(192)(PROMISE);
+ Wrapper = __webpack_require__(9)[PROMISE];
+
+ // statics
+ $export($export.S + $export.F * !USE_NATIVE, PROMISE, {
+ // 25.4.4.5 Promise.reject(r)
+ reject: function reject(r){
+ var capability = newPromiseCapability(this)
+ , $$reject = capability.reject;
+ $$reject(r);
+ return capability.promise;
+ }
+ });
+ $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
+ // 25.4.4.6 Promise.resolve(x)
+ resolve: function resolve(x){
+ // instanceof instead of internal slot check because we should fix it without replacement native Promise core
+ if(x instanceof $Promise && sameConstructor(x.constructor, this))return x;
+ var capability = newPromiseCapability(this)
+ , $$resolve = capability.resolve;
+ $$resolve(x);
+ return capability.promise;
+ }
+ });
+ $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(165)(function(iter){
+ $Promise.all(iter)['catch'](empty);
+ })), PROMISE, {
+ // 25.4.4.1 Promise.all(iterable)
+ all: function all(iterable){
+ var C = this
+ , capability = newPromiseCapability(C)
+ , resolve = capability.resolve
+ , reject = capability.reject;
+ var abrupt = perform(function(){
+ var values = []
+ , index = 0
+ , remaining = 1;
+ forOf(iterable, false, function(promise){
+ var $index = index++
+ , alreadyCalled = false;
+ values.push(undefined);
+ remaining++;
+ C.resolve(promise).then(function(value){
+ if(alreadyCalled)return;
+ alreadyCalled = true;
+ values[$index] = value;
+ --remaining || resolve(values);
+ }, reject);
+ });
+ --remaining || resolve(values);
+ });
+ if(abrupt)reject(abrupt.error);
+ return capability.promise;
+ },
+ // 25.4.4.4 Promise.race(iterable)
+ race: function race(iterable){
+ var C = this
+ , capability = newPromiseCapability(C)
+ , reject = capability.reject;
+ var abrupt = perform(function(){
+ forOf(iterable, false, function(promise){
+ C.resolve(promise).then(capability.resolve, reject);
+ });
+ });
+ if(abrupt)reject(abrupt.error);
+ return capability.promise;
+ }
+ });
+
+/***/ },
+/* 205 */
+/***/ function(module, exports) {
+
+ module.exports = function(it, Constructor, name, forbiddenField){
+ if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){
+ throw TypeError(name + ': incorrect invocation!');
+ } return it;
+ };
+
+/***/ },
+/* 206 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var ctx = __webpack_require__(20)
+ , call = __webpack_require__(161)
+ , isArrayIter = __webpack_require__(162)
+ , anObject = __webpack_require__(12)
+ , toLength = __webpack_require__(37)
+ , getIterFn = __webpack_require__(164)
+ , BREAK = {}
+ , RETURN = {};
+ var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){
+ var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable)
+ , f = ctx(fn, that, entries ? 2 : 1)
+ , index = 0
+ , length, step, iterator, result;
+ if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');
+ // fast case for arrays with default iterator
+ if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){
+ result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
+ if(result === BREAK || result === RETURN)return result;
+ } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){
+ result = call(iterator, f, step.value, entries);
+ if(result === BREAK || result === RETURN)return result;
+ }
+ };
+ exports.BREAK = BREAK;
+ exports.RETURN = RETURN;
+
+/***/ },
+/* 207 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 7.3.20 SpeciesConstructor(O, defaultConstructor)
+ var anObject = __webpack_require__(12)
+ , aFunction = __webpack_require__(21)
+ , SPECIES = __webpack_require__(25)('species');
+ module.exports = function(O, D){
+ var C = anObject(O).constructor, S;
+ return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
+ };
+
+/***/ },
+/* 208 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var ctx = __webpack_require__(20)
+ , invoke = __webpack_require__(78)
+ , html = __webpack_require__(48)
+ , cel = __webpack_require__(15)
+ , global = __webpack_require__(4)
+ , process = global.process
+ , setTask = global.setImmediate
+ , clearTask = global.clearImmediate
+ , MessageChannel = global.MessageChannel
+ , counter = 0
+ , queue = {}
+ , ONREADYSTATECHANGE = 'onreadystatechange'
+ , defer, channel, port;
+ var run = function(){
+ var id = +this;
+ if(queue.hasOwnProperty(id)){
+ var fn = queue[id];
+ delete queue[id];
+ fn();
+ }
+ };
+ var listener = function(event){
+ run.call(event.data);
+ };
+ // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
+ if(!setTask || !clearTask){
+ setTask = function setImmediate(fn){
+ var args = [], i = 1;
+ while(arguments.length > i)args.push(arguments[i++]);
+ queue[++counter] = function(){
+ invoke(typeof fn == 'function' ? fn : Function(fn), args);
+ };
+ defer(counter);
+ return counter;
+ };
+ clearTask = function clearImmediate(id){
+ delete queue[id];
+ };
+ // Node.js 0.8-
+ if(__webpack_require__(34)(process) == 'process'){
+ defer = function(id){
+ process.nextTick(ctx(run, id, 1));
+ };
+ // Browsers with MessageChannel, includes WebWorkers
+ } else if(MessageChannel){
+ channel = new MessageChannel;
+ port = channel.port2;
+ channel.port1.onmessage = listener;
+ defer = ctx(port.postMessage, port, 1);
+ // Browsers with postMessage, skip WebWorkers
+ // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
+ } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){
+ defer = function(id){
+ global.postMessage(id + '', '*');
+ };
+ global.addEventListener('message', listener, false);
+ // IE8-
+ } else if(ONREADYSTATECHANGE in cel('script')){
+ defer = function(id){
+ html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){
+ html.removeChild(this);
+ run.call(id);
+ };
+ };
+ // Rest old browsers
+ } else {
+ defer = function(id){
+ setTimeout(ctx(run, id, 1), 0);
+ };
+ }
+ }
+ module.exports = {
+ set: setTask,
+ clear: clearTask
+ };
+
+/***/ },
+/* 209 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var global = __webpack_require__(4)
+ , macrotask = __webpack_require__(208).set
+ , Observer = global.MutationObserver || global.WebKitMutationObserver
+ , process = global.process
+ , Promise = global.Promise
+ , isNode = __webpack_require__(34)(process) == 'process';
+
+ module.exports = function(){
+ var head, last, notify;
+
+ var flush = function(){
+ var parent, fn;
+ if(isNode && (parent = process.domain))parent.exit();
+ while(head){
+ fn = head.fn;
+ head = head.next;
+ try {
+ fn();
+ } catch(e){
+ if(head)notify();
+ else last = undefined;
+ throw e;
+ }
+ } last = undefined;
+ if(parent)parent.enter();
+ };
+
+ // Node.js
+ if(isNode){
+ notify = function(){
+ process.nextTick(flush);
+ };
+ // browsers with MutationObserver
+ } else if(Observer){
+ var toggle = true
+ , node = document.createTextNode('');
+ new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new
+ notify = function(){
+ node.data = toggle = !toggle;
+ };
+ // environments with maybe non-completely correct, but existent Promise
+ } else if(Promise && Promise.resolve){
+ var promise = Promise.resolve();
+ notify = function(){
+ promise.then(flush);
+ };
+ // for other environments - macrotask based on:
+ // - setImmediate
+ // - MessageChannel
+ // - window.postMessag
+ // - onreadystatechange
+ // - setTimeout
+ } else {
+ notify = function(){
+ // strange IE + webpack dev server bug - use .call(global)
+ macrotask.call(global, flush);
+ };
+ }
+
+ return function(fn){
+ var task = {fn: fn, next: undefined};
+ if(last)last.next = task;
+ if(!head){
+ head = task;
+ notify();
+ } last = task;
+ };
+ };
+
+/***/ },
+/* 210 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var redefine = __webpack_require__(18);
+ module.exports = function(target, src, safe){
+ for(var key in src)redefine(target, key, src[key], safe);
+ return target;
+ };
+
+/***/ },
+/* 211 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var strong = __webpack_require__(212);
+
+ // 23.1 Map Objects
+ module.exports = __webpack_require__(213)('Map', function(get){
+ return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
+ }, {
+ // 23.1.3.6 Map.prototype.get(key)
+ get: function get(key){
+ var entry = strong.getEntry(this, key);
+ return entry && entry.v;
+ },
+ // 23.1.3.9 Map.prototype.set(key, value)
+ set: function set(key, value){
+ return strong.def(this, key === 0 ? 0 : key, value);
+ }
+ }, strong, true);
+
+/***/ },
+/* 212 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var dP = __webpack_require__(11).f
+ , create = __webpack_require__(46)
+ , redefineAll = __webpack_require__(210)
+ , ctx = __webpack_require__(20)
+ , anInstance = __webpack_require__(205)
+ , defined = __webpack_require__(35)
+ , forOf = __webpack_require__(206)
+ , $iterDefine = __webpack_require__(128)
+ , step = __webpack_require__(194)
+ , setSpecies = __webpack_require__(192)
+ , DESCRIPTORS = __webpack_require__(6)
+ , fastKey = __webpack_require__(22).fastKey
+ , SIZE = DESCRIPTORS ? '_s' : 'size';
+
+ var getEntry = function(that, key){
+ // fast case
+ var index = fastKey(key), entry;
+ if(index !== 'F')return that._i[index];
+ // frozen object case
+ for(entry = that._f; entry; entry = entry.n){
+ if(entry.k == key)return entry;
+ }
+ };
+
+ module.exports = {
+ getConstructor: function(wrapper, NAME, IS_MAP, ADDER){
+ var C = wrapper(function(that, iterable){
+ anInstance(that, C, NAME, '_i');
+ that._i = create(null); // index
+ that._f = undefined; // first entry
+ that._l = undefined; // last entry
+ that[SIZE] = 0; // size
+ if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
+ });
+ redefineAll(C.prototype, {
+ // 23.1.3.1 Map.prototype.clear()
+ // 23.2.3.2 Set.prototype.clear()
+ clear: function clear(){
+ for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){
+ entry.r = true;
+ if(entry.p)entry.p = entry.p.n = undefined;
+ delete data[entry.i];
+ }
+ that._f = that._l = undefined;
+ that[SIZE] = 0;
+ },
+ // 23.1.3.3 Map.prototype.delete(key)
+ // 23.2.3.4 Set.prototype.delete(value)
+ 'delete': function(key){
+ var that = this
+ , entry = getEntry(that, key);
+ if(entry){
+ var next = entry.n
+ , prev = entry.p;
+ delete that._i[entry.i];
+ entry.r = true;
+ if(prev)prev.n = next;
+ if(next)next.p = prev;
+ if(that._f == entry)that._f = next;
+ if(that._l == entry)that._l = prev;
+ that[SIZE]--;
+ } return !!entry;
+ },
+ // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
+ // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
+ forEach: function forEach(callbackfn /*, that = undefined */){
+ anInstance(this, C, 'forEach');
+ var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3)
+ , entry;
+ while(entry = entry ? entry.n : this._f){
+ f(entry.v, entry.k, this);
+ // revert to the last existing entry
+ while(entry && entry.r)entry = entry.p;
+ }
+ },
+ // 23.1.3.7 Map.prototype.has(key)
+ // 23.2.3.7 Set.prototype.has(value)
+ has: function has(key){
+ return !!getEntry(this, key);
+ }
+ });
+ if(DESCRIPTORS)dP(C.prototype, 'size', {
+ get: function(){
+ return defined(this[SIZE]);
+ }
+ });
+ return C;
+ },
+ def: function(that, key, value){
+ var entry = getEntry(that, key)
+ , prev, index;
+ // change existing entry
+ if(entry){
+ entry.v = value;
+ // create new entry
+ } else {
+ that._l = entry = {
+ i: index = fastKey(key, true), // <- index
+ k: key, // <- key
+ v: value, // <- value
+ p: prev = that._l, // <- previous entry
+ n: undefined, // <- next entry
+ r: false // <- removed
+ };
+ if(!that._f)that._f = entry;
+ if(prev)prev.n = entry;
+ that[SIZE]++;
+ // add to index
+ if(index !== 'F')that._i[index] = entry;
+ } return that;
+ },
+ getEntry: getEntry,
+ setStrong: function(C, NAME, IS_MAP){
+ // add .keys, .values, .entries, [@@iterator]
+ // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
+ $iterDefine(C, NAME, function(iterated, kind){
+ this._t = iterated; // target
+ this._k = kind; // kind
+ this._l = undefined; // previous
+ }, function(){
+ var that = this
+ , kind = that._k
+ , entry = that._l;
+ // revert to the last existing entry
+ while(entry && entry.r)entry = entry.p;
+ // get next entry
+ if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){
+ // or finish the iteration
+ that._t = undefined;
+ return step(1);
+ }
+ // return step by kind
+ if(kind == 'keys' )return step(0, entry.k);
+ if(kind == 'values')return step(0, entry.v);
+ return step(0, [entry.k, entry.v]);
+ }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true);
+
+ // add [@@species], 23.1.2.2, 23.2.2.2
+ setSpecies(NAME);
+ }
+ };
+
+/***/ },
+/* 213 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var global = __webpack_require__(4)
+ , $export = __webpack_require__(8)
+ , redefine = __webpack_require__(18)
+ , redefineAll = __webpack_require__(210)
+ , meta = __webpack_require__(22)
+ , forOf = __webpack_require__(206)
+ , anInstance = __webpack_require__(205)
+ , isObject = __webpack_require__(13)
+ , fails = __webpack_require__(7)
+ , $iterDetect = __webpack_require__(165)
+ , setToStringTag = __webpack_require__(24)
+ , inheritIfRequired = __webpack_require__(88);
+
+ module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){
+ var Base = global[NAME]
+ , C = Base
+ , ADDER = IS_MAP ? 'set' : 'add'
+ , proto = C && C.prototype
+ , O = {};
+ var fixMethod = function(KEY){
+ var fn = proto[KEY];
+ redefine(proto, KEY,
+ KEY == 'delete' ? function(a){
+ return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
+ } : KEY == 'has' ? function has(a){
+ return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
+ } : KEY == 'get' ? function get(a){
+ return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);
+ } : KEY == 'add' ? function add(a){ fn.call(this, a === 0 ? 0 : a); return this; }
+ : function set(a, b){ fn.call(this, a === 0 ? 0 : a, b); return this; }
+ );
+ };
+ if(typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){
+ new C().entries().next();
+ }))){
+ // create collection constructor
+ C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
+ redefineAll(C.prototype, methods);
+ meta.NEED = true;
+ } else {
+ var instance = new C
+ // early implementations not supports chaining
+ , HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance
+ // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
+ , THROWS_ON_PRIMITIVES = fails(function(){ instance.has(1); })
+ // most early implementations doesn't supports iterables, most modern - not close it correctly
+ , ACCEPT_ITERABLES = $iterDetect(function(iter){ new C(iter); }) // eslint-disable-line no-new
+ // for early implementations -0 and +0 not the same
+ , BUGGY_ZERO = !IS_WEAK && fails(function(){
+ // V8 ~ Chromium 42- fails only with 5+ elements
+ var $instance = new C()
+ , index = 5;
+ while(index--)$instance[ADDER](index, index);
+ return !$instance.has(-0);
+ });
+ if(!ACCEPT_ITERABLES){
+ C = wrapper(function(target, iterable){
+ anInstance(target, C, NAME);
+ var that = inheritIfRequired(new Base, target, C);
+ if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
+ return that;
+ });
+ C.prototype = proto;
+ proto.constructor = C;
+ }
+ if(THROWS_ON_PRIMITIVES || BUGGY_ZERO){
+ fixMethod('delete');
+ fixMethod('has');
+ IS_MAP && fixMethod('get');
+ }
+ if(BUGGY_ZERO || HASNT_CHAINING)fixMethod(ADDER);
+ // weak collections should not contains .clear method
+ if(IS_WEAK && proto.clear)delete proto.clear;
+ }
+
+ setToStringTag(C, NAME);
+
+ O[NAME] = C;
+ $export($export.G + $export.W + $export.F * (C != Base), O);
+
+ if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP);
+
+ return C;
+ };
+
+/***/ },
+/* 214 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var strong = __webpack_require__(212);
+
+ // 23.2 Set Objects
+ module.exports = __webpack_require__(213)('Set', function(get){
+ return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
+ }, {
+ // 23.2.3.1 Set.prototype.add(value)
+ add: function add(value){
+ return strong.def(this, value = value === 0 ? 0 : value, value);
+ }
+ }, strong);
+
+/***/ },
+/* 215 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var each = __webpack_require__(172)(0)
+ , redefine = __webpack_require__(18)
+ , meta = __webpack_require__(22)
+ , assign = __webpack_require__(69)
+ , weak = __webpack_require__(216)
+ , isObject = __webpack_require__(13)
+ , getWeak = meta.getWeak
+ , isExtensible = Object.isExtensible
+ , uncaughtFrozenStore = weak.ufstore
+ , tmp = {}
+ , InternalMap;
+
+ var wrapper = function(get){
+ return function WeakMap(){
+ return get(this, arguments.length > 0 ? arguments[0] : undefined);
+ };
+ };
+
+ var methods = {
+ // 23.3.3.3 WeakMap.prototype.get(key)
+ get: function get(key){
+ if(isObject(key)){
+ var data = getWeak(key);
+ if(data === true)return uncaughtFrozenStore(this).get(key);
+ return data ? data[this._i] : undefined;
+ }
+ },
+ // 23.3.3.5 WeakMap.prototype.set(key, value)
+ set: function set(key, value){
+ return weak.def(this, key, value);
+ }
+ };
+
+ // 23.3 WeakMap Objects
+ var $WeakMap = module.exports = __webpack_require__(213)('WeakMap', wrapper, methods, weak, true, true);
+
+ // IE11 WeakMap frozen keys fix
+ if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){
+ InternalMap = weak.getConstructor(wrapper);
+ assign(InternalMap.prototype, methods);
+ meta.NEED = true;
+ each(['delete', 'has', 'get', 'set'], function(key){
+ var proto = $WeakMap.prototype
+ , method = proto[key];
+ redefine(proto, key, function(a, b){
+ // store frozen objects on internal weakmap shim
+ if(isObject(a) && !isExtensible(a)){
+ if(!this._f)this._f = new InternalMap;
+ var result = this._f[key](a, b);
+ return key == 'set' ? this : result;
+ // store all the rest on native weakmap
+ } return method.call(this, a, b);
+ });
+ });
+ }
+
+/***/ },
+/* 216 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var redefineAll = __webpack_require__(210)
+ , getWeak = __webpack_require__(22).getWeak
+ , anObject = __webpack_require__(12)
+ , isObject = __webpack_require__(13)
+ , anInstance = __webpack_require__(205)
+ , forOf = __webpack_require__(206)
+ , createArrayMethod = __webpack_require__(172)
+ , $has = __webpack_require__(5)
+ , arrayFind = createArrayMethod(5)
+ , arrayFindIndex = createArrayMethod(6)
+ , id = 0;
+
+ // fallback for uncaught frozen keys
+ var uncaughtFrozenStore = function(that){
+ return that._l || (that._l = new UncaughtFrozenStore);
+ };
+ var UncaughtFrozenStore = function(){
+ this.a = [];
+ };
+ var findUncaughtFrozen = function(store, key){
+ return arrayFind(store.a, function(it){
+ return it[0] === key;
+ });
+ };
+ UncaughtFrozenStore.prototype = {
+ get: function(key){
+ var entry = findUncaughtFrozen(this, key);
+ if(entry)return entry[1];
+ },
+ has: function(key){
+ return !!findUncaughtFrozen(this, key);
+ },
+ set: function(key, value){
+ var entry = findUncaughtFrozen(this, key);
+ if(entry)entry[1] = value;
+ else this.a.push([key, value]);
+ },
+ 'delete': function(key){
+ var index = arrayFindIndex(this.a, function(it){
+ return it[0] === key;
+ });
+ if(~index)this.a.splice(index, 1);
+ return !!~index;
+ }
+ };
+
+ module.exports = {
+ getConstructor: function(wrapper, NAME, IS_MAP, ADDER){
+ var C = wrapper(function(that, iterable){
+ anInstance(that, C, NAME, '_i');
+ that._i = id++; // collection id
+ that._l = undefined; // leak store for uncaught frozen objects
+ if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
+ });
+ redefineAll(C.prototype, {
+ // 23.3.3.2 WeakMap.prototype.delete(key)
+ // 23.4.3.3 WeakSet.prototype.delete(value)
+ 'delete': function(key){
+ if(!isObject(key))return false;
+ var data = getWeak(key);
+ if(data === true)return uncaughtFrozenStore(this)['delete'](key);
+ return data && $has(data, this._i) && delete data[this._i];
+ },
+ // 23.3.3.4 WeakMap.prototype.has(key)
+ // 23.4.3.4 WeakSet.prototype.has(value)
+ has: function has(key){
+ if(!isObject(key))return false;
+ var data = getWeak(key);
+ if(data === true)return uncaughtFrozenStore(this).has(key);
+ return data && $has(data, this._i);
+ }
+ });
+ return C;
+ },
+ def: function(that, key, value){
+ var data = getWeak(anObject(key), true);
+ if(data === true)uncaughtFrozenStore(that).set(key, value);
+ else data[that._i] = value;
+ return that;
+ },
+ ufstore: uncaughtFrozenStore
+ };
+
+/***/ },
+/* 217 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var weak = __webpack_require__(216);
+
+ // 23.4 WeakSet Objects
+ __webpack_require__(213)('WeakSet', function(get){
+ return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
+ }, {
+ // 23.4.3.1 WeakSet.prototype.add(value)
+ add: function add(value){
+ return weak.def(this, value, true);
+ }
+ }, weak, false, true);
+
+/***/ },
+/* 218 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , $typed = __webpack_require__(219)
+ , buffer = __webpack_require__(220)
+ , anObject = __webpack_require__(12)
+ , toIndex = __webpack_require__(39)
+ , toLength = __webpack_require__(37)
+ , isObject = __webpack_require__(13)
+ , ArrayBuffer = __webpack_require__(4).ArrayBuffer
+ , speciesConstructor = __webpack_require__(207)
+ , $ArrayBuffer = buffer.ArrayBuffer
+ , $DataView = buffer.DataView
+ , $isView = $typed.ABV && ArrayBuffer.isView
+ , $slice = $ArrayBuffer.prototype.slice
+ , VIEW = $typed.VIEW
+ , ARRAY_BUFFER = 'ArrayBuffer';
+
+ $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), {ArrayBuffer: $ArrayBuffer});
+
+ $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {
+ // 24.1.3.1 ArrayBuffer.isView(arg)
+ isView: function isView(it){
+ return $isView && $isView(it) || isObject(it) && VIEW in it;
+ }
+ });
+
+ $export($export.P + $export.U + $export.F * __webpack_require__(7)(function(){
+ return !new $ArrayBuffer(2).slice(1, undefined).byteLength;
+ }), ARRAY_BUFFER, {
+ // 24.1.4.3 ArrayBuffer.prototype.slice(start, end)
+ slice: function slice(start, end){
+ if($slice !== undefined && end === undefined)return $slice.call(anObject(this), start); // FF fix
+ var len = anObject(this).byteLength
+ , first = toIndex(start, len)
+ , final = toIndex(end === undefined ? len : end, len)
+ , result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first))
+ , viewS = new $DataView(this)
+ , viewT = new $DataView(result)
+ , index = 0;
+ while(first < final){
+ viewT.setUint8(index++, viewS.getUint8(first++));
+ } return result;
+ }
+ });
+
+ __webpack_require__(192)(ARRAY_BUFFER);
+
+/***/ },
+/* 219 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var global = __webpack_require__(4)
+ , hide = __webpack_require__(10)
+ , uid = __webpack_require__(19)
+ , TYPED = uid('typed_array')
+ , VIEW = uid('view')
+ , ABV = !!(global.ArrayBuffer && global.DataView)
+ , CONSTR = ABV
+ , i = 0, l = 9, Typed;
+
+ var TypedArrayConstructors = (
+ 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'
+ ).split(',');
+
+ while(i < l){
+ if(Typed = global[TypedArrayConstructors[i++]]){
+ hide(Typed.prototype, TYPED, true);
+ hide(Typed.prototype, VIEW, true);
+ } else CONSTR = false;
+ }
+
+ module.exports = {
+ ABV: ABV,
+ CONSTR: CONSTR,
+ TYPED: TYPED,
+ VIEW: VIEW
+ };
+
+/***/ },
+/* 220 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var global = __webpack_require__(4)
+ , DESCRIPTORS = __webpack_require__(6)
+ , LIBRARY = __webpack_require__(28)
+ , $typed = __webpack_require__(219)
+ , hide = __webpack_require__(10)
+ , redefineAll = __webpack_require__(210)
+ , fails = __webpack_require__(7)
+ , anInstance = __webpack_require__(205)
+ , toInteger = __webpack_require__(38)
+ , toLength = __webpack_require__(37)
+ , gOPN = __webpack_require__(50).f
+ , dP = __webpack_require__(11).f
+ , arrayFill = __webpack_require__(188)
+ , setToStringTag = __webpack_require__(24)
+ , ARRAY_BUFFER = 'ArrayBuffer'
+ , DATA_VIEW = 'DataView'
+ , PROTOTYPE = 'prototype'
+ , WRONG_LENGTH = 'Wrong length!'
+ , WRONG_INDEX = 'Wrong index!'
+ , $ArrayBuffer = global[ARRAY_BUFFER]
+ , $DataView = global[DATA_VIEW]
+ , Math = global.Math
+ , RangeError = global.RangeError
+ , Infinity = global.Infinity
+ , BaseBuffer = $ArrayBuffer
+ , abs = Math.abs
+ , pow = Math.pow
+ , floor = Math.floor
+ , log = Math.log
+ , LN2 = Math.LN2
+ , BUFFER = 'buffer'
+ , BYTE_LENGTH = 'byteLength'
+ , BYTE_OFFSET = 'byteOffset'
+ , $BUFFER = DESCRIPTORS ? '_b' : BUFFER
+ , $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH
+ , $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;
+
+ // IEEE754 conversions based on https://github.com/feross/ieee754
+ var packIEEE754 = function(value, mLen, nBytes){
+ var buffer = Array(nBytes)
+ , eLen = nBytes * 8 - mLen - 1
+ , eMax = (1 << eLen) - 1
+ , eBias = eMax >> 1
+ , rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0
+ , i = 0
+ , s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0
+ , e, m, c;
+ value = abs(value)
+ if(value != value || value === Infinity){
+ m = value != value ? 1 : 0;
+ e = eMax;
+ } else {
+ e = floor(log(value) / LN2);
+ if(value * (c = pow(2, -e)) < 1){
+ e--;
+ c *= 2;
+ }
+ if(e + eBias >= 1){
+ value += rt / c;
+ } else {
+ value += rt * pow(2, 1 - eBias);
+ }
+ if(value * c >= 2){
+ e++;
+ c /= 2;
+ }
+ if(e + eBias >= eMax){
+ m = 0;
+ e = eMax;
+ } else if(e + eBias >= 1){
+ m = (value * c - 1) * pow(2, mLen);
+ e = e + eBias;
+ } else {
+ m = value * pow(2, eBias - 1) * pow(2, mLen);
+ e = 0;
+ }
+ }
+ for(; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);
+ e = e << mLen | m;
+ eLen += mLen;
+ for(; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);
+ buffer[--i] |= s * 128;
+ return buffer;
+ };
+ var unpackIEEE754 = function(buffer, mLen, nBytes){
+ var eLen = nBytes * 8 - mLen - 1
+ , eMax = (1 << eLen) - 1
+ , eBias = eMax >> 1
+ , nBits = eLen - 7
+ , i = nBytes - 1
+ , s = buffer[i--]
+ , e = s & 127
+ , m;
+ s >>= 7;
+ for(; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);
+ m = e & (1 << -nBits) - 1;
+ e >>= -nBits;
+ nBits += mLen;
+ for(; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);
+ if(e === 0){
+ e = 1 - eBias;
+ } else if(e === eMax){
+ return m ? NaN : s ? -Infinity : Infinity;
+ } else {
+ m = m + pow(2, mLen);
+ e = e - eBias;
+ } return (s ? -1 : 1) * m * pow(2, e - mLen);
+ };
+
+ var unpackI32 = function(bytes){
+ return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];
+ };
+ var packI8 = function(it){
+ return [it & 0xff];
+ };
+ var packI16 = function(it){
+ return [it & 0xff, it >> 8 & 0xff];
+ };
+ var packI32 = function(it){
+ return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];
+ };
+ var packF64 = function(it){
+ return packIEEE754(it, 52, 8);
+ };
+ var packF32 = function(it){
+ return packIEEE754(it, 23, 4);
+ };
+
+ var addGetter = function(C, key, internal){
+ dP(C[PROTOTYPE], key, {get: function(){ return this[internal]; }});
+ };
+
+ var get = function(view, bytes, index, isLittleEndian){
+ var numIndex = +index
+ , intIndex = toInteger(numIndex);
+ if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX);
+ var store = view[$BUFFER]._b
+ , start = intIndex + view[$OFFSET]
+ , pack = store.slice(start, start + bytes);
+ return isLittleEndian ? pack : pack.reverse();
+ };
+ var set = function(view, bytes, index, conversion, value, isLittleEndian){
+ var numIndex = +index
+ , intIndex = toInteger(numIndex);
+ if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX);
+ var store = view[$BUFFER]._b
+ , start = intIndex + view[$OFFSET]
+ , pack = conversion(+value);
+ for(var i = 0; i < bytes; i++)store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];
+ };
+
+ var validateArrayBufferArguments = function(that, length){
+ anInstance(that, $ArrayBuffer, ARRAY_BUFFER);
+ var numberLength = +length
+ , byteLength = toLength(numberLength);
+ if(numberLength != byteLength)throw RangeError(WRONG_LENGTH);
+ return byteLength;
+ };
+
+ if(!$typed.ABV){
+ $ArrayBuffer = function ArrayBuffer(length){
+ var byteLength = validateArrayBufferArguments(this, length);
+ this._b = arrayFill.call(Array(byteLength), 0);
+ this[$LENGTH] = byteLength;
+ };
+
+ $DataView = function DataView(buffer, byteOffset, byteLength){
+ anInstance(this, $DataView, DATA_VIEW);
+ anInstance(buffer, $ArrayBuffer, DATA_VIEW);
+ var bufferLength = buffer[$LENGTH]
+ , offset = toInteger(byteOffset);
+ if(offset < 0 || offset > bufferLength)throw RangeError('Wrong offset!');
+ byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
+ if(offset + byteLength > bufferLength)throw RangeError(WRONG_LENGTH);
+ this[$BUFFER] = buffer;
+ this[$OFFSET] = offset;
+ this[$LENGTH] = byteLength;
+ };
+
+ if(DESCRIPTORS){
+ addGetter($ArrayBuffer, BYTE_LENGTH, '_l');
+ addGetter($DataView, BUFFER, '_b');
+ addGetter($DataView, BYTE_LENGTH, '_l');
+ addGetter($DataView, BYTE_OFFSET, '_o');
+ }
+
+ redefineAll($DataView[PROTOTYPE], {
+ getInt8: function getInt8(byteOffset){
+ return get(this, 1, byteOffset)[0] << 24 >> 24;
+ },
+ getUint8: function getUint8(byteOffset){
+ return get(this, 1, byteOffset)[0];
+ },
+ getInt16: function getInt16(byteOffset /*, littleEndian */){
+ var bytes = get(this, 2, byteOffset, arguments[1]);
+ return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
+ },
+ getUint16: function getUint16(byteOffset /*, littleEndian */){
+ var bytes = get(this, 2, byteOffset, arguments[1]);
+ return bytes[1] << 8 | bytes[0];
+ },
+ getInt32: function getInt32(byteOffset /*, littleEndian */){
+ return unpackI32(get(this, 4, byteOffset, arguments[1]));
+ },
+ getUint32: function getUint32(byteOffset /*, littleEndian */){
+ return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;
+ },
+ getFloat32: function getFloat32(byteOffset /*, littleEndian */){
+ return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);
+ },
+ getFloat64: function getFloat64(byteOffset /*, littleEndian */){
+ return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);
+ },
+ setInt8: function setInt8(byteOffset, value){
+ set(this, 1, byteOffset, packI8, value);
+ },
+ setUint8: function setUint8(byteOffset, value){
+ set(this, 1, byteOffset, packI8, value);
+ },
+ setInt16: function setInt16(byteOffset, value /*, littleEndian */){
+ set(this, 2, byteOffset, packI16, value, arguments[2]);
+ },
+ setUint16: function setUint16(byteOffset, value /*, littleEndian */){
+ set(this, 2, byteOffset, packI16, value, arguments[2]);
+ },
+ setInt32: function setInt32(byteOffset, value /*, littleEndian */){
+ set(this, 4, byteOffset, packI32, value, arguments[2]);
+ },
+ setUint32: function setUint32(byteOffset, value /*, littleEndian */){
+ set(this, 4, byteOffset, packI32, value, arguments[2]);
+ },
+ setFloat32: function setFloat32(byteOffset, value /*, littleEndian */){
+ set(this, 4, byteOffset, packF32, value, arguments[2]);
+ },
+ setFloat64: function setFloat64(byteOffset, value /*, littleEndian */){
+ set(this, 8, byteOffset, packF64, value, arguments[2]);
+ }
+ });
+ } else {
+ if(!fails(function(){
+ new $ArrayBuffer; // eslint-disable-line no-new
+ }) || !fails(function(){
+ new $ArrayBuffer(.5); // eslint-disable-line no-new
+ })){
+ $ArrayBuffer = function ArrayBuffer(length){
+ return new BaseBuffer(validateArrayBufferArguments(this, length));
+ };
+ var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];
+ for(var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ){
+ if(!((key = keys[j++]) in $ArrayBuffer))hide($ArrayBuffer, key, BaseBuffer[key]);
+ };
+ if(!LIBRARY)ArrayBufferProto.constructor = $ArrayBuffer;
+ }
+ // iOS Safari 7.x bug
+ var view = new $DataView(new $ArrayBuffer(2))
+ , $setInt8 = $DataView[PROTOTYPE].setInt8;
+ view.setInt8(0, 2147483648);
+ view.setInt8(1, 2147483649);
+ if(view.getInt8(0) || !view.getInt8(1))redefineAll($DataView[PROTOTYPE], {
+ setInt8: function setInt8(byteOffset, value){
+ $setInt8.call(this, byteOffset, value << 24 >> 24);
+ },
+ setUint8: function setUint8(byteOffset, value){
+ $setInt8.call(this, byteOffset, value << 24 >> 24);
+ }
+ }, true);
+ }
+ setToStringTag($ArrayBuffer, ARRAY_BUFFER);
+ setToStringTag($DataView, DATA_VIEW);
+ hide($DataView[PROTOTYPE], $typed.VIEW, true);
+ exports[ARRAY_BUFFER] = $ArrayBuffer;
+ exports[DATA_VIEW] = $DataView;
+
+/***/ },
+/* 221 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $export = __webpack_require__(8);
+ $export($export.G + $export.W + $export.F * !__webpack_require__(219).ABV, {
+ DataView: __webpack_require__(220).DataView
+ });
+
+/***/ },
+/* 222 */
+/***/ function(module, exports, __webpack_require__) {
+
+ __webpack_require__(223)('Int8', 1, function(init){
+ return function Int8Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+ });
+
+/***/ },
+/* 223 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ if(__webpack_require__(6)){
+ var LIBRARY = __webpack_require__(28)
+ , global = __webpack_require__(4)
+ , fails = __webpack_require__(7)
+ , $export = __webpack_require__(8)
+ , $typed = __webpack_require__(219)
+ , $buffer = __webpack_require__(220)
+ , ctx = __webpack_require__(20)
+ , anInstance = __webpack_require__(205)
+ , propertyDesc = __webpack_require__(17)
+ , hide = __webpack_require__(10)
+ , redefineAll = __webpack_require__(210)
+ , toInteger = __webpack_require__(38)
+ , toLength = __webpack_require__(37)
+ , toIndex = __webpack_require__(39)
+ , toPrimitive = __webpack_require__(16)
+ , has = __webpack_require__(5)
+ , same = __webpack_require__(71)
+ , classof = __webpack_require__(75)
+ , isObject = __webpack_require__(13)
+ , toObject = __webpack_require__(58)
+ , isArrayIter = __webpack_require__(162)
+ , create = __webpack_require__(46)
+ , getPrototypeOf = __webpack_require__(59)
+ , gOPN = __webpack_require__(50).f
+ , getIterFn = __webpack_require__(164)
+ , uid = __webpack_require__(19)
+ , wks = __webpack_require__(25)
+ , createArrayMethod = __webpack_require__(172)
+ , createArrayIncludes = __webpack_require__(36)
+ , speciesConstructor = __webpack_require__(207)
+ , ArrayIterators = __webpack_require__(193)
+ , Iterators = __webpack_require__(129)
+ , $iterDetect = __webpack_require__(165)
+ , setSpecies = __webpack_require__(192)
+ , arrayFill = __webpack_require__(188)
+ , arrayCopyWithin = __webpack_require__(185)
+ , $DP = __webpack_require__(11)
+ , $GOPD = __webpack_require__(51)
+ , dP = $DP.f
+ , gOPD = $GOPD.f
+ , RangeError = global.RangeError
+ , TypeError = global.TypeError
+ , Uint8Array = global.Uint8Array
+ , ARRAY_BUFFER = 'ArrayBuffer'
+ , SHARED_BUFFER = 'Shared' + ARRAY_BUFFER
+ , BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'
+ , PROTOTYPE = 'prototype'
+ , ArrayProto = Array[PROTOTYPE]
+ , $ArrayBuffer = $buffer.ArrayBuffer
+ , $DataView = $buffer.DataView
+ , arrayForEach = createArrayMethod(0)
+ , arrayFilter = createArrayMethod(2)
+ , arraySome = createArrayMethod(3)
+ , arrayEvery = createArrayMethod(4)
+ , arrayFind = createArrayMethod(5)
+ , arrayFindIndex = createArrayMethod(6)
+ , arrayIncludes = createArrayIncludes(true)
+ , arrayIndexOf = createArrayIncludes(false)
+ , arrayValues = ArrayIterators.values
+ , arrayKeys = ArrayIterators.keys
+ , arrayEntries = ArrayIterators.entries
+ , arrayLastIndexOf = ArrayProto.lastIndexOf
+ , arrayReduce = ArrayProto.reduce
+ , arrayReduceRight = ArrayProto.reduceRight
+ , arrayJoin = ArrayProto.join
+ , arraySort = ArrayProto.sort
+ , arraySlice = ArrayProto.slice
+ , arrayToString = ArrayProto.toString
+ , arrayToLocaleString = ArrayProto.toLocaleString
+ , ITERATOR = wks('iterator')
+ , TAG = wks('toStringTag')
+ , TYPED_CONSTRUCTOR = uid('typed_constructor')
+ , DEF_CONSTRUCTOR = uid('def_constructor')
+ , ALL_CONSTRUCTORS = $typed.CONSTR
+ , TYPED_ARRAY = $typed.TYPED
+ , VIEW = $typed.VIEW
+ , WRONG_LENGTH = 'Wrong length!';
+
+ var $map = createArrayMethod(1, function(O, length){
+ return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);
+ });
+
+ var LITTLE_ENDIAN = fails(function(){
+ return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;
+ });
+
+ var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function(){
+ new Uint8Array(1).set({});
+ });
+
+ var strictToLength = function(it, SAME){
+ if(it === undefined)throw TypeError(WRONG_LENGTH);
+ var number = +it
+ , length = toLength(it);
+ if(SAME && !same(number, length))throw RangeError(WRONG_LENGTH);
+ return length;
+ };
+
+ var toOffset = function(it, BYTES){
+ var offset = toInteger(it);
+ if(offset < 0 || offset % BYTES)throw RangeError('Wrong offset!');
+ return offset;
+ };
+
+ var validate = function(it){
+ if(isObject(it) && TYPED_ARRAY in it)return it;
+ throw TypeError(it + ' is not a typed array!');
+ };
+
+ var allocate = function(C, length){
+ if(!(isObject(C) && TYPED_CONSTRUCTOR in C)){
+ throw TypeError('It is not a typed array constructor!');
+ } return new C(length);
+ };
+
+ var speciesFromList = function(O, list){
+ return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);
+ };
+
+ var fromList = function(C, list){
+ var index = 0
+ , length = list.length
+ , result = allocate(C, length);
+ while(length > index)result[index] = list[index++];
+ return result;
+ };
+
+ var addGetter = function(it, key, internal){
+ dP(it, key, {get: function(){ return this._d[internal]; }});
+ };
+
+ var $from = function from(source /*, mapfn, thisArg */){
+ var O = toObject(source)
+ , aLen = arguments.length
+ , mapfn = aLen > 1 ? arguments[1] : undefined
+ , mapping = mapfn !== undefined
+ , iterFn = getIterFn(O)
+ , i, length, values, result, step, iterator;
+ if(iterFn != undefined && !isArrayIter(iterFn)){
+ for(iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++){
+ values.push(step.value);
+ } O = values;
+ }
+ if(mapping && aLen > 2)mapfn = ctx(mapfn, arguments[2], 2);
+ for(i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++){
+ result[i] = mapping ? mapfn(O[i], i) : O[i];
+ }
+ return result;
+ };
+
+ var $of = function of(/*...items*/){
+ var index = 0
+ , length = arguments.length
+ , result = allocate(this, length);
+ while(length > index)result[index] = arguments[index++];
+ return result;
+ };
+
+ // iOS Safari 6.x fails here
+ var TO_LOCALE_BUG = !!Uint8Array && fails(function(){ arrayToLocaleString.call(new Uint8Array(1)); });
+
+ var $toLocaleString = function toLocaleString(){
+ return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);
+ };
+
+ var proto = {
+ copyWithin: function copyWithin(target, start /*, end */){
+ return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
+ },
+ every: function every(callbackfn /*, thisArg */){
+ return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ fill: function fill(value /*, start, end */){ // eslint-disable-line no-unused-vars
+ return arrayFill.apply(validate(this), arguments);
+ },
+ filter: function filter(callbackfn /*, thisArg */){
+ return speciesFromList(this, arrayFilter(validate(this), callbackfn,
+ arguments.length > 1 ? arguments[1] : undefined));
+ },
+ find: function find(predicate /*, thisArg */){
+ return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ findIndex: function findIndex(predicate /*, thisArg */){
+ return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ forEach: function forEach(callbackfn /*, thisArg */){
+ arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ indexOf: function indexOf(searchElement /*, fromIndex */){
+ return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ includes: function includes(searchElement /*, fromIndex */){
+ return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ join: function join(separator){ // eslint-disable-line no-unused-vars
+ return arrayJoin.apply(validate(this), arguments);
+ },
+ lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */){ // eslint-disable-line no-unused-vars
+ return arrayLastIndexOf.apply(validate(this), arguments);
+ },
+ map: function map(mapfn /*, thisArg */){
+ return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ reduce: function reduce(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars
+ return arrayReduce.apply(validate(this), arguments);
+ },
+ reduceRight: function reduceRight(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars
+ return arrayReduceRight.apply(validate(this), arguments);
+ },
+ reverse: function reverse(){
+ var that = this
+ , length = validate(that).length
+ , middle = Math.floor(length / 2)
+ , index = 0
+ , value;
+ while(index < middle){
+ value = that[index];
+ that[index++] = that[--length];
+ that[length] = value;
+ } return that;
+ },
+ some: function some(callbackfn /*, thisArg */){
+ return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ sort: function sort(comparefn){
+ return arraySort.call(validate(this), comparefn);
+ },
+ subarray: function subarray(begin, end){
+ var O = validate(this)
+ , length = O.length
+ , $begin = toIndex(begin, length);
+ return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(
+ O.buffer,
+ O.byteOffset + $begin * O.BYTES_PER_ELEMENT,
+ toLength((end === undefined ? length : toIndex(end, length)) - $begin)
+ );
+ }
+ };
+
+ var $slice = function slice(start, end){
+ return speciesFromList(this, arraySlice.call(validate(this), start, end));
+ };
+
+ var $set = function set(arrayLike /*, offset */){
+ validate(this);
+ var offset = toOffset(arguments[1], 1)
+ , length = this.length
+ , src = toObject(arrayLike)
+ , len = toLength(src.length)
+ , index = 0;
+ if(len + offset > length)throw RangeError(WRONG_LENGTH);
+ while(index < len)this[offset + index] = src[index++];
+ };
+
+ var $iterators = {
+ entries: function entries(){
+ return arrayEntries.call(validate(this));
+ },
+ keys: function keys(){
+ return arrayKeys.call(validate(this));
+ },
+ values: function values(){
+ return arrayValues.call(validate(this));
+ }
+ };
+
+ var isTAIndex = function(target, key){
+ return isObject(target)
+ && target[TYPED_ARRAY]
+ && typeof key != 'symbol'
+ && key in target
+ && String(+key) == String(key);
+ };
+ var $getDesc = function getOwnPropertyDescriptor(target, key){
+ return isTAIndex(target, key = toPrimitive(key, true))
+ ? propertyDesc(2, target[key])
+ : gOPD(target, key);
+ };
+ var $setDesc = function defineProperty(target, key, desc){
+ if(isTAIndex(target, key = toPrimitive(key, true))
+ && isObject(desc)
+ && has(desc, 'value')
+ && !has(desc, 'get')
+ && !has(desc, 'set')
+ // TODO: add validation descriptor w/o calling accessors
+ && !desc.configurable
+ && (!has(desc, 'writable') || desc.writable)
+ && (!has(desc, 'enumerable') || desc.enumerable)
+ ){
+ target[key] = desc.value;
+ return target;
+ } else return dP(target, key, desc);
+ };
+
+ if(!ALL_CONSTRUCTORS){
+ $GOPD.f = $getDesc;
+ $DP.f = $setDesc;
+ }
+
+ $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {
+ getOwnPropertyDescriptor: $getDesc,
+ defineProperty: $setDesc
+ });
+
+ if(fails(function(){ arrayToString.call({}); })){
+ arrayToString = arrayToLocaleString = function toString(){
+ return arrayJoin.call(this);
+ }
+ }
+
+ var $TypedArrayPrototype$ = redefineAll({}, proto);
+ redefineAll($TypedArrayPrototype$, $iterators);
+ hide($TypedArrayPrototype$, ITERATOR, $iterators.values);
+ redefineAll($TypedArrayPrototype$, {
+ slice: $slice,
+ set: $set,
+ constructor: function(){ /* noop */ },
+ toString: arrayToString,
+ toLocaleString: $toLocaleString
+ });
+ addGetter($TypedArrayPrototype$, 'buffer', 'b');
+ addGetter($TypedArrayPrototype$, 'byteOffset', 'o');
+ addGetter($TypedArrayPrototype$, 'byteLength', 'l');
+ addGetter($TypedArrayPrototype$, 'length', 'e');
+ dP($TypedArrayPrototype$, TAG, {
+ get: function(){ return this[TYPED_ARRAY]; }
+ });
+
+ module.exports = function(KEY, BYTES, wrapper, CLAMPED){
+ CLAMPED = !!CLAMPED;
+ var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'
+ , ISNT_UINT8 = NAME != 'Uint8Array'
+ , GETTER = 'get' + KEY
+ , SETTER = 'set' + KEY
+ , TypedArray = global[NAME]
+ , Base = TypedArray || {}
+ , TAC = TypedArray && getPrototypeOf(TypedArray)
+ , FORCED = !TypedArray || !$typed.ABV
+ , O = {}
+ , TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];
+ var getter = function(that, index){
+ var data = that._d;
+ return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);
+ };
+ var setter = function(that, index, value){
+ var data = that._d;
+ if(CLAMPED)value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;
+ data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);
+ };
+ var addElement = function(that, index){
+ dP(that, index, {
+ get: function(){
+ return getter(this, index);
+ },
+ set: function(value){
+ return setter(this, index, value);
+ },
+ enumerable: true
+ });
+ };
+ if(FORCED){
+ TypedArray = wrapper(function(that, data, $offset, $length){
+ anInstance(that, TypedArray, NAME, '_d');
+ var index = 0
+ , offset = 0
+ , buffer, byteLength, length, klass;
+ if(!isObject(data)){
+ length = strictToLength(data, true)
+ byteLength = length * BYTES;
+ buffer = new $ArrayBuffer(byteLength);
+ } else if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){
+ buffer = data;
+ offset = toOffset($offset, BYTES);
+ var $len = data.byteLength;
+ if($length === undefined){
+ if($len % BYTES)throw RangeError(WRONG_LENGTH);
+ byteLength = $len - offset;
+ if(byteLength < 0)throw RangeError(WRONG_LENGTH);
+ } else {
+ byteLength = toLength($length) * BYTES;
+ if(byteLength + offset > $len)throw RangeError(WRONG_LENGTH);
+ }
+ length = byteLength / BYTES;
+ } else if(TYPED_ARRAY in data){
+ return fromList(TypedArray, data);
+ } else {
+ return $from.call(TypedArray, data);
+ }
+ hide(that, '_d', {
+ b: buffer,
+ o: offset,
+ l: byteLength,
+ e: length,
+ v: new $DataView(buffer)
+ });
+ while(index < length)addElement(that, index++);
+ });
+ TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);
+ hide(TypedArrayPrototype, 'constructor', TypedArray);
+ } else if(!$iterDetect(function(iter){
+ // V8 works with iterators, but fails in many other cases
+ // https://code.google.com/p/v8/issues/detail?id=4552
+ new TypedArray(null); // eslint-disable-line no-new
+ new TypedArray(iter); // eslint-disable-line no-new
+ }, true)){
+ TypedArray = wrapper(function(that, data, $offset, $length){
+ anInstance(that, TypedArray, NAME);
+ var klass;
+ // `ws` module bug, temporarily remove validation length for Uint8Array
+ // https://github.com/websockets/ws/pull/645
+ if(!isObject(data))return new Base(strictToLength(data, ISNT_UINT8));
+ if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){
+ return $length !== undefined
+ ? new Base(data, toOffset($offset, BYTES), $length)
+ : $offset !== undefined
+ ? new Base(data, toOffset($offset, BYTES))
+ : new Base(data);
+ }
+ if(TYPED_ARRAY in data)return fromList(TypedArray, data);
+ return $from.call(TypedArray, data);
+ });
+ arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function(key){
+ if(!(key in TypedArray))hide(TypedArray, key, Base[key]);
+ });
+ TypedArray[PROTOTYPE] = TypedArrayPrototype;
+ if(!LIBRARY)TypedArrayPrototype.constructor = TypedArray;
+ }
+ var $nativeIterator = TypedArrayPrototype[ITERATOR]
+ , CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined)
+ , $iterator = $iterators.values;
+ hide(TypedArray, TYPED_CONSTRUCTOR, true);
+ hide(TypedArrayPrototype, TYPED_ARRAY, NAME);
+ hide(TypedArrayPrototype, VIEW, true);
+ hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);
+
+ if(CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)){
+ dP(TypedArrayPrototype, TAG, {
+ get: function(){ return NAME; }
+ });
+ }
+
+ O[NAME] = TypedArray;
+
+ $export($export.G + $export.W + $export.F * (TypedArray != Base), O);
+
+ $export($export.S, NAME, {
+ BYTES_PER_ELEMENT: BYTES,
+ from: $from,
+ of: $of
+ });
+
+ if(!(BYTES_PER_ELEMENT in TypedArrayPrototype))hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);
+
+ $export($export.P, NAME, proto);
+
+ setSpecies(NAME);
+
+ $export($export.P + $export.F * FORCED_SET, NAME, {set: $set});
+
+ $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);
+
+ $export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, {toString: arrayToString});
+
+ $export($export.P + $export.F * fails(function(){
+ new TypedArray(1).slice();
+ }), NAME, {slice: $slice});
+
+ $export($export.P + $export.F * (fails(function(){
+ return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString()
+ }) || !fails(function(){
+ TypedArrayPrototype.toLocaleString.call([1, 2]);
+ })), NAME, {toLocaleString: $toLocaleString});
+
+ Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;
+ if(!LIBRARY && !CORRECT_ITER_NAME)hide(TypedArrayPrototype, ITERATOR, $iterator);
+ };
+ } else module.exports = function(){ /* empty */ };
+
+/***/ },
+/* 224 */
+/***/ function(module, exports, __webpack_require__) {
+
+ __webpack_require__(223)('Uint8', 1, function(init){
+ return function Uint8Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+ });
+
+/***/ },
+/* 225 */
+/***/ function(module, exports, __webpack_require__) {
+
+ __webpack_require__(223)('Uint8', 1, function(init){
+ return function Uint8ClampedArray(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+ }, true);
+
+/***/ },
+/* 226 */
+/***/ function(module, exports, __webpack_require__) {
+
+ __webpack_require__(223)('Int16', 2, function(init){
+ return function Int16Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+ });
+
+/***/ },
+/* 227 */
+/***/ function(module, exports, __webpack_require__) {
+
+ __webpack_require__(223)('Uint16', 2, function(init){
+ return function Uint16Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+ });
+
+/***/ },
+/* 228 */
+/***/ function(module, exports, __webpack_require__) {
+
+ __webpack_require__(223)('Int32', 4, function(init){
+ return function Int32Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+ });
+
+/***/ },
+/* 229 */
+/***/ function(module, exports, __webpack_require__) {
+
+ __webpack_require__(223)('Uint32', 4, function(init){
+ return function Uint32Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+ });
+
+/***/ },
+/* 230 */
+/***/ function(module, exports, __webpack_require__) {
+
+ __webpack_require__(223)('Float32', 4, function(init){
+ return function Float32Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+ });
+
+/***/ },
+/* 231 */
+/***/ function(module, exports, __webpack_require__) {
+
+ __webpack_require__(223)('Float64', 8, function(init){
+ return function Float64Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+ });
+
+/***/ },
+/* 232 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
+ var $export = __webpack_require__(8)
+ , aFunction = __webpack_require__(21)
+ , anObject = __webpack_require__(12)
+ , rApply = (__webpack_require__(4).Reflect || {}).apply
+ , fApply = Function.apply;
+ // MS Edge argumentsList argument is optional
+ $export($export.S + $export.F * !__webpack_require__(7)(function(){
+ rApply(function(){});
+ }), 'Reflect', {
+ apply: function apply(target, thisArgument, argumentsList){
+ var T = aFunction(target)
+ , L = anObject(argumentsList);
+ return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);
+ }
+ });
+
+/***/ },
+/* 233 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
+ var $export = __webpack_require__(8)
+ , create = __webpack_require__(46)
+ , aFunction = __webpack_require__(21)
+ , anObject = __webpack_require__(12)
+ , isObject = __webpack_require__(13)
+ , fails = __webpack_require__(7)
+ , bind = __webpack_require__(77)
+ , rConstruct = (__webpack_require__(4).Reflect || {}).construct;
+
+ // MS Edge supports only 2 arguments and argumentsList argument is optional
+ // FF Nightly sets third argument as `new.target`, but does not create `this` from it
+ var NEW_TARGET_BUG = fails(function(){
+ function F(){}
+ return !(rConstruct(function(){}, [], F) instanceof F);
+ });
+ var ARGS_BUG = !fails(function(){
+ rConstruct(function(){});
+ });
+
+ $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
+ construct: function construct(Target, args /*, newTarget*/){
+ aFunction(Target);
+ anObject(args);
+ var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
+ if(ARGS_BUG && !NEW_TARGET_BUG)return rConstruct(Target, args, newTarget);
+ if(Target == newTarget){
+ // w/o altered newTarget, optimization for 0-4 arguments
+ switch(args.length){
+ case 0: return new Target;
+ case 1: return new Target(args[0]);
+ case 2: return new Target(args[0], args[1]);
+ case 3: return new Target(args[0], args[1], args[2]);
+ case 4: return new Target(args[0], args[1], args[2], args[3]);
+ }
+ // w/o altered newTarget, lot of arguments case
+ var $args = [null];
+ $args.push.apply($args, args);
+ return new (bind.apply(Target, $args));
+ }
+ // with altered newTarget, not support built-in constructors
+ var proto = newTarget.prototype
+ , instance = create(isObject(proto) ? proto : Object.prototype)
+ , result = Function.apply.call(Target, instance, args);
+ return isObject(result) ? result : instance;
+ }
+ });
+
+/***/ },
+/* 234 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
+ var dP = __webpack_require__(11)
+ , $export = __webpack_require__(8)
+ , anObject = __webpack_require__(12)
+ , toPrimitive = __webpack_require__(16);
+
+ // MS Edge has broken Reflect.defineProperty - throwing instead of returning false
+ $export($export.S + $export.F * __webpack_require__(7)(function(){
+ Reflect.defineProperty(dP.f({}, 1, {value: 1}), 1, {value: 2});
+ }), 'Reflect', {
+ defineProperty: function defineProperty(target, propertyKey, attributes){
+ anObject(target);
+ propertyKey = toPrimitive(propertyKey, true);
+ anObject(attributes);
+ try {
+ dP.f(target, propertyKey, attributes);
+ return true;
+ } catch(e){
+ return false;
+ }
+ }
+ });
+
+/***/ },
+/* 235 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.4 Reflect.deleteProperty(target, propertyKey)
+ var $export = __webpack_require__(8)
+ , gOPD = __webpack_require__(51).f
+ , anObject = __webpack_require__(12);
+
+ $export($export.S, 'Reflect', {
+ deleteProperty: function deleteProperty(target, propertyKey){
+ var desc = gOPD(anObject(target), propertyKey);
+ return desc && !desc.configurable ? false : delete target[propertyKey];
+ }
+ });
+
+/***/ },
+/* 236 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // 26.1.5 Reflect.enumerate(target)
+ var $export = __webpack_require__(8)
+ , anObject = __webpack_require__(12);
+ var Enumerate = function(iterated){
+ this._t = anObject(iterated); // target
+ this._i = 0; // next index
+ var keys = this._k = [] // keys
+ , key;
+ for(key in iterated)keys.push(key);
+ };
+ __webpack_require__(130)(Enumerate, 'Object', function(){
+ var that = this
+ , keys = that._k
+ , key;
+ do {
+ if(that._i >= keys.length)return {value: undefined, done: true};
+ } while(!((key = keys[that._i++]) in that._t));
+ return {value: key, done: false};
+ });
+
+ $export($export.S, 'Reflect', {
+ enumerate: function enumerate(target){
+ return new Enumerate(target);
+ }
+ });
+
+/***/ },
+/* 237 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.6 Reflect.get(target, propertyKey [, receiver])
+ var gOPD = __webpack_require__(51)
+ , getPrototypeOf = __webpack_require__(59)
+ , has = __webpack_require__(5)
+ , $export = __webpack_require__(8)
+ , isObject = __webpack_require__(13)
+ , anObject = __webpack_require__(12);
+
+ function get(target, propertyKey/*, receiver*/){
+ var receiver = arguments.length < 3 ? target : arguments[2]
+ , desc, proto;
+ if(anObject(target) === receiver)return target[propertyKey];
+ if(desc = gOPD.f(target, propertyKey))return has(desc, 'value')
+ ? desc.value
+ : desc.get !== undefined
+ ? desc.get.call(receiver)
+ : undefined;
+ if(isObject(proto = getPrototypeOf(target)))return get(proto, propertyKey, receiver);
+ }
+
+ $export($export.S, 'Reflect', {get: get});
+
+/***/ },
+/* 238 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
+ var gOPD = __webpack_require__(51)
+ , $export = __webpack_require__(8)
+ , anObject = __webpack_require__(12);
+
+ $export($export.S, 'Reflect', {
+ getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){
+ return gOPD.f(anObject(target), propertyKey);
+ }
+ });
+
+/***/ },
+/* 239 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.8 Reflect.getPrototypeOf(target)
+ var $export = __webpack_require__(8)
+ , getProto = __webpack_require__(59)
+ , anObject = __webpack_require__(12);
+
+ $export($export.S, 'Reflect', {
+ getPrototypeOf: function getPrototypeOf(target){
+ return getProto(anObject(target));
+ }
+ });
+
+/***/ },
+/* 240 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.9 Reflect.has(target, propertyKey)
+ var $export = __webpack_require__(8);
+
+ $export($export.S, 'Reflect', {
+ has: function has(target, propertyKey){
+ return propertyKey in target;
+ }
+ });
+
+/***/ },
+/* 241 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.10 Reflect.isExtensible(target)
+ var $export = __webpack_require__(8)
+ , anObject = __webpack_require__(12)
+ , $isExtensible = Object.isExtensible;
+
+ $export($export.S, 'Reflect', {
+ isExtensible: function isExtensible(target){
+ anObject(target);
+ return $isExtensible ? $isExtensible(target) : true;
+ }
+ });
+
+/***/ },
+/* 242 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.11 Reflect.ownKeys(target)
+ var $export = __webpack_require__(8);
+
+ $export($export.S, 'Reflect', {ownKeys: __webpack_require__(243)});
+
+/***/ },
+/* 243 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // all object keys, includes non-enumerable and symbols
+ var gOPN = __webpack_require__(50)
+ , gOPS = __webpack_require__(43)
+ , anObject = __webpack_require__(12)
+ , Reflect = __webpack_require__(4).Reflect;
+ module.exports = Reflect && Reflect.ownKeys || function ownKeys(it){
+ var keys = gOPN.f(anObject(it))
+ , getSymbols = gOPS.f;
+ return getSymbols ? keys.concat(getSymbols(it)) : keys;
+ };
+
+/***/ },
+/* 244 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.12 Reflect.preventExtensions(target)
+ var $export = __webpack_require__(8)
+ , anObject = __webpack_require__(12)
+ , $preventExtensions = Object.preventExtensions;
+
+ $export($export.S, 'Reflect', {
+ preventExtensions: function preventExtensions(target){
+ anObject(target);
+ try {
+ if($preventExtensions)$preventExtensions(target);
+ return true;
+ } catch(e){
+ return false;
+ }
+ }
+ });
+
+/***/ },
+/* 245 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
+ var dP = __webpack_require__(11)
+ , gOPD = __webpack_require__(51)
+ , getPrototypeOf = __webpack_require__(59)
+ , has = __webpack_require__(5)
+ , $export = __webpack_require__(8)
+ , createDesc = __webpack_require__(17)
+ , anObject = __webpack_require__(12)
+ , isObject = __webpack_require__(13);
+
+ function set(target, propertyKey, V/*, receiver*/){
+ var receiver = arguments.length < 4 ? target : arguments[3]
+ , ownDesc = gOPD.f(anObject(target), propertyKey)
+ , existingDescriptor, proto;
+ if(!ownDesc){
+ if(isObject(proto = getPrototypeOf(target))){
+ return set(proto, propertyKey, V, receiver);
+ }
+ ownDesc = createDesc(0);
+ }
+ if(has(ownDesc, 'value')){
+ if(ownDesc.writable === false || !isObject(receiver))return false;
+ existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0);
+ existingDescriptor.value = V;
+ dP.f(receiver, propertyKey, existingDescriptor);
+ return true;
+ }
+ return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
+ }
+
+ $export($export.S, 'Reflect', {set: set});
+
+/***/ },
+/* 246 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // 26.1.14 Reflect.setPrototypeOf(target, proto)
+ var $export = __webpack_require__(8)
+ , setProto = __webpack_require__(73);
+
+ if(setProto)$export($export.S, 'Reflect', {
+ setPrototypeOf: function setPrototypeOf(target, proto){
+ setProto.check(target, proto);
+ try {
+ setProto.set(target, proto);
+ return true;
+ } catch(e){
+ return false;
+ }
+ }
+ });
+
+/***/ },
+/* 247 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // https://github.com/tc39/Array.prototype.includes
+ var $export = __webpack_require__(8)
+ , $includes = __webpack_require__(36)(true);
+
+ $export($export.P, 'Array', {
+ includes: function includes(el /*, fromIndex = 0 */){
+ return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
+ }
+ });
+
+ __webpack_require__(186)('includes');
+
+/***/ },
+/* 248 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // https://github.com/mathiasbynens/String.prototype.at
+ var $export = __webpack_require__(8)
+ , $at = __webpack_require__(127)(true);
+
+ $export($export.P, 'String', {
+ at: function at(pos){
+ return $at(this, pos);
+ }
+ });
+
+/***/ },
+/* 249 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // https://github.com/tc39/proposal-string-pad-start-end
+ var $export = __webpack_require__(8)
+ , $pad = __webpack_require__(250);
+
+ $export($export.P, 'String', {
+ padStart: function padStart(maxLength /*, fillString = ' ' */){
+ return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
+ }
+ });
+
+/***/ },
+/* 250 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // https://github.com/tc39/proposal-string-pad-start-end
+ var toLength = __webpack_require__(37)
+ , repeat = __webpack_require__(91)
+ , defined = __webpack_require__(35);
+
+ module.exports = function(that, maxLength, fillString, left){
+ var S = String(defined(that))
+ , stringLength = S.length
+ , fillStr = fillString === undefined ? ' ' : String(fillString)
+ , intMaxLength = toLength(maxLength);
+ if(intMaxLength <= stringLength || fillStr == '')return S;
+ var fillLen = intMaxLength - stringLength
+ , stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
+ if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen);
+ return left ? stringFiller + S : S + stringFiller;
+ };
+
+
+/***/ },
+/* 251 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // https://github.com/tc39/proposal-string-pad-start-end
+ var $export = __webpack_require__(8)
+ , $pad = __webpack_require__(250);
+
+ $export($export.P, 'String', {
+ padEnd: function padEnd(maxLength /*, fillString = ' ' */){
+ return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
+ }
+ });
+
+/***/ },
+/* 252 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // https://github.com/sebmarkbage/ecmascript-string-left-right-trim
+ __webpack_require__(83)('trimLeft', function($trim){
+ return function trimLeft(){
+ return $trim(this, 1);
+ };
+ }, 'trimStart');
+
+/***/ },
+/* 253 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // https://github.com/sebmarkbage/ecmascript-string-left-right-trim
+ __webpack_require__(83)('trimRight', function($trim){
+ return function trimRight(){
+ return $trim(this, 2);
+ };
+ }, 'trimEnd');
+
+/***/ },
+/* 254 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // https://tc39.github.io/String.prototype.matchAll/
+ var $export = __webpack_require__(8)
+ , defined = __webpack_require__(35)
+ , toLength = __webpack_require__(37)
+ , isRegExp = __webpack_require__(134)
+ , getFlags = __webpack_require__(196)
+ , RegExpProto = RegExp.prototype;
+
+ var $RegExpStringIterator = function(regexp, string){
+ this._r = regexp;
+ this._s = string;
+ };
+
+ __webpack_require__(130)($RegExpStringIterator, 'RegExp String', function next(){
+ var match = this._r.exec(this._s);
+ return {value: match, done: match === null};
+ });
+
+ $export($export.P, 'String', {
+ matchAll: function matchAll(regexp){
+ defined(this);
+ if(!isRegExp(regexp))throw TypeError(regexp + ' is not a regexp!');
+ var S = String(this)
+ , flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp)
+ , rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags);
+ rx.lastIndex = toLength(regexp.lastIndex);
+ return new $RegExpStringIterator(rx, S);
+ }
+ });
+
+/***/ },
+/* 255 */
+/***/ function(module, exports, __webpack_require__) {
+
+ __webpack_require__(27)('asyncIterator');
+
+/***/ },
+/* 256 */
+/***/ function(module, exports, __webpack_require__) {
+
+ __webpack_require__(27)('observable');
+
+/***/ },
+/* 257 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // https://github.com/tc39/proposal-object-getownpropertydescriptors
+ var $export = __webpack_require__(8)
+ , ownKeys = __webpack_require__(243)
+ , toIObject = __webpack_require__(32)
+ , gOPD = __webpack_require__(51)
+ , createProperty = __webpack_require__(163);
+
+ $export($export.S, 'Object', {
+ getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){
+ var O = toIObject(object)
+ , getDesc = gOPD.f
+ , keys = ownKeys(O)
+ , result = {}
+ , i = 0
+ , key;
+ while(keys.length > i)createProperty(result, key = keys[i++], getDesc(O, key));
+ return result;
+ }
+ });
+
+/***/ },
+/* 258 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // https://github.com/tc39/proposal-object-values-entries
+ var $export = __webpack_require__(8)
+ , $values = __webpack_require__(259)(false);
+
+ $export($export.S, 'Object', {
+ values: function values(it){
+ return $values(it);
+ }
+ });
+
+/***/ },
+/* 259 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var getKeys = __webpack_require__(30)
+ , toIObject = __webpack_require__(32)
+ , isEnum = __webpack_require__(44).f;
+ module.exports = function(isEntries){
+ return function(it){
+ var O = toIObject(it)
+ , keys = getKeys(O)
+ , length = keys.length
+ , i = 0
+ , result = []
+ , key;
+ while(length > i)if(isEnum.call(O, key = keys[i++])){
+ result.push(isEntries ? [key, O[key]] : O[key]);
+ } return result;
+ };
+ };
+
+/***/ },
+/* 260 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // https://github.com/tc39/proposal-object-values-entries
+ var $export = __webpack_require__(8)
+ , $entries = __webpack_require__(259)(true);
+
+ $export($export.S, 'Object', {
+ entries: function entries(it){
+ return $entries(it);
+ }
+ });
+
+/***/ },
+/* 261 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , toObject = __webpack_require__(58)
+ , aFunction = __webpack_require__(21)
+ , $defineProperty = __webpack_require__(11);
+
+ // B.2.2.2 Object.prototype.__defineGetter__(P, getter)
+ __webpack_require__(6) && $export($export.P + __webpack_require__(262), 'Object', {
+ __defineGetter__: function __defineGetter__(P, getter){
+ $defineProperty.f(toObject(this), P, {get: aFunction(getter), enumerable: true, configurable: true});
+ }
+ });
+
+/***/ },
+/* 262 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // Forced replacement prototype accessors methods
+ module.exports = __webpack_require__(28)|| !__webpack_require__(7)(function(){
+ var K = Math.random();
+ // In FF throws only define methods
+ __defineSetter__.call(null, K, function(){ /* empty */});
+ delete __webpack_require__(4)[K];
+ });
+
+/***/ },
+/* 263 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , toObject = __webpack_require__(58)
+ , aFunction = __webpack_require__(21)
+ , $defineProperty = __webpack_require__(11);
+
+ // B.2.2.3 Object.prototype.__defineSetter__(P, setter)
+ __webpack_require__(6) && $export($export.P + __webpack_require__(262), 'Object', {
+ __defineSetter__: function __defineSetter__(P, setter){
+ $defineProperty.f(toObject(this), P, {set: aFunction(setter), enumerable: true, configurable: true});
+ }
+ });
+
+/***/ },
+/* 264 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , toObject = __webpack_require__(58)
+ , toPrimitive = __webpack_require__(16)
+ , getPrototypeOf = __webpack_require__(59)
+ , getOwnPropertyDescriptor = __webpack_require__(51).f;
+
+ // B.2.2.4 Object.prototype.__lookupGetter__(P)
+ __webpack_require__(6) && $export($export.P + __webpack_require__(262), 'Object', {
+ __lookupGetter__: function __lookupGetter__(P){
+ var O = toObject(this)
+ , K = toPrimitive(P, true)
+ , D;
+ do {
+ if(D = getOwnPropertyDescriptor(O, K))return D.get;
+ } while(O = getPrototypeOf(O));
+ }
+ });
+
+/***/ },
+/* 265 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var $export = __webpack_require__(8)
+ , toObject = __webpack_require__(58)
+ , toPrimitive = __webpack_require__(16)
+ , getPrototypeOf = __webpack_require__(59)
+ , getOwnPropertyDescriptor = __webpack_require__(51).f;
+
+ // B.2.2.5 Object.prototype.__lookupSetter__(P)
+ __webpack_require__(6) && $export($export.P + __webpack_require__(262), 'Object', {
+ __lookupSetter__: function __lookupSetter__(P){
+ var O = toObject(this)
+ , K = toPrimitive(P, true)
+ , D;
+ do {
+ if(D = getOwnPropertyDescriptor(O, K))return D.set;
+ } while(O = getPrototypeOf(O));
+ }
+ });
+
+/***/ },
+/* 266 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // https://github.com/DavidBruant/Map-Set.prototype.toJSON
+ var $export = __webpack_require__(8);
+
+ $export($export.P + $export.R, 'Map', {toJSON: __webpack_require__(267)('Map')});
+
+/***/ },
+/* 267 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // https://github.com/DavidBruant/Map-Set.prototype.toJSON
+ var classof = __webpack_require__(75)
+ , from = __webpack_require__(268);
+ module.exports = function(NAME){
+ return function toJSON(){
+ if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic");
+ return from(this);
+ };
+ };
+
+/***/ },
+/* 268 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var forOf = __webpack_require__(206);
+
+ module.exports = function(iter, ITERATOR){
+ var result = [];
+ forOf(iter, false, result.push, result, ITERATOR);
+ return result;
+ };
+
+
+/***/ },
+/* 269 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // https://github.com/DavidBruant/Map-Set.prototype.toJSON
+ var $export = __webpack_require__(8);
+
+ $export($export.P + $export.R, 'Set', {toJSON: __webpack_require__(267)('Set')});
+
+/***/ },
+/* 270 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // https://github.com/ljharb/proposal-global
+ var $export = __webpack_require__(8);
+
+ $export($export.S, 'System', {global: __webpack_require__(4)});
+
+/***/ },
+/* 271 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // https://github.com/ljharb/proposal-is-error
+ var $export = __webpack_require__(8)
+ , cof = __webpack_require__(34);
+
+ $export($export.S, 'Error', {
+ isError: function isError(it){
+ return cof(it) === 'Error';
+ }
+ });
+
+/***/ },
+/* 272 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // https://gist.github.com/BrendanEich/4294d5c212a6d2254703
+ var $export = __webpack_require__(8);
+
+ $export($export.S, 'Math', {
+ iaddh: function iaddh(x0, x1, y0, y1){
+ var $x0 = x0 >>> 0
+ , $x1 = x1 >>> 0
+ , $y0 = y0 >>> 0;
+ return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0;
+ }
+ });
+
+/***/ },
+/* 273 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // https://gist.github.com/BrendanEich/4294d5c212a6d2254703
+ var $export = __webpack_require__(8);
+
+ $export($export.S, 'Math', {
+ isubh: function isubh(x0, x1, y0, y1){
+ var $x0 = x0 >>> 0
+ , $x1 = x1 >>> 0
+ , $y0 = y0 >>> 0;
+ return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0;
+ }
+ });
+
+/***/ },
+/* 274 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // https://gist.github.com/BrendanEich/4294d5c212a6d2254703
+ var $export = __webpack_require__(8);
+
+ $export($export.S, 'Math', {
+ imulh: function imulh(u, v){
+ var UINT16 = 0xffff
+ , $u = +u
+ , $v = +v
+ , u0 = $u & UINT16
+ , v0 = $v & UINT16
+ , u1 = $u >> 16
+ , v1 = $v >> 16
+ , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
+ return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16);
+ }
+ });
+
+/***/ },
+/* 275 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // https://gist.github.com/BrendanEich/4294d5c212a6d2254703
+ var $export = __webpack_require__(8);
+
+ $export($export.S, 'Math', {
+ umulh: function umulh(u, v){
+ var UINT16 = 0xffff
+ , $u = +u
+ , $v = +v
+ , u0 = $u & UINT16
+ , v0 = $v & UINT16
+ , u1 = $u >>> 16
+ , v1 = $v >>> 16
+ , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
+ return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16);
+ }
+ });
+
+/***/ },
+/* 276 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var metadata = __webpack_require__(277)
+ , anObject = __webpack_require__(12)
+ , toMetaKey = metadata.key
+ , ordinaryDefineOwnMetadata = metadata.set;
+
+ metadata.exp({defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey){
+ ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));
+ }});
+
+/***/ },
+/* 277 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var Map = __webpack_require__(211)
+ , $export = __webpack_require__(8)
+ , shared = __webpack_require__(23)('metadata')
+ , store = shared.store || (shared.store = new (__webpack_require__(215)));
+
+ var getOrCreateMetadataMap = function(target, targetKey, create){
+ var targetMetadata = store.get(target);
+ if(!targetMetadata){
+ if(!create)return undefined;
+ store.set(target, targetMetadata = new Map);
+ }
+ var keyMetadata = targetMetadata.get(targetKey);
+ if(!keyMetadata){
+ if(!create)return undefined;
+ targetMetadata.set(targetKey, keyMetadata = new Map);
+ } return keyMetadata;
+ };
+ var ordinaryHasOwnMetadata = function(MetadataKey, O, P){
+ var metadataMap = getOrCreateMetadataMap(O, P, false);
+ return metadataMap === undefined ? false : metadataMap.has(MetadataKey);
+ };
+ var ordinaryGetOwnMetadata = function(MetadataKey, O, P){
+ var metadataMap = getOrCreateMetadataMap(O, P, false);
+ return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey);
+ };
+ var ordinaryDefineOwnMetadata = function(MetadataKey, MetadataValue, O, P){
+ getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);
+ };
+ var ordinaryOwnMetadataKeys = function(target, targetKey){
+ var metadataMap = getOrCreateMetadataMap(target, targetKey, false)
+ , keys = [];
+ if(metadataMap)metadataMap.forEach(function(_, key){ keys.push(key); });
+ return keys;
+ };
+ var toMetaKey = function(it){
+ return it === undefined || typeof it == 'symbol' ? it : String(it);
+ };
+ var exp = function(O){
+ $export($export.S, 'Reflect', O);
+ };
+
+ module.exports = {
+ store: store,
+ map: getOrCreateMetadataMap,
+ has: ordinaryHasOwnMetadata,
+ get: ordinaryGetOwnMetadata,
+ set: ordinaryDefineOwnMetadata,
+ keys: ordinaryOwnMetadataKeys,
+ key: toMetaKey,
+ exp: exp
+ };
+
+/***/ },
+/* 278 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var metadata = __webpack_require__(277)
+ , anObject = __webpack_require__(12)
+ , toMetaKey = metadata.key
+ , getOrCreateMetadataMap = metadata.map
+ , store = metadata.store;
+
+ metadata.exp({deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */){
+ var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2])
+ , metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false);
+ if(metadataMap === undefined || !metadataMap['delete'](metadataKey))return false;
+ if(metadataMap.size)return true;
+ var targetMetadata = store.get(target);
+ targetMetadata['delete'](targetKey);
+ return !!targetMetadata.size || store['delete'](target);
+ }});
+
+/***/ },
+/* 279 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var metadata = __webpack_require__(277)
+ , anObject = __webpack_require__(12)
+ , getPrototypeOf = __webpack_require__(59)
+ , ordinaryHasOwnMetadata = metadata.has
+ , ordinaryGetOwnMetadata = metadata.get
+ , toMetaKey = metadata.key;
+
+ var ordinaryGetMetadata = function(MetadataKey, O, P){
+ var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
+ if(hasOwn)return ordinaryGetOwnMetadata(MetadataKey, O, P);
+ var parent = getPrototypeOf(O);
+ return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined;
+ };
+
+ metadata.exp({getMetadata: function getMetadata(metadataKey, target /*, targetKey */){
+ return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
+ }});
+
+/***/ },
+/* 280 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var Set = __webpack_require__(214)
+ , from = __webpack_require__(268)
+ , metadata = __webpack_require__(277)
+ , anObject = __webpack_require__(12)
+ , getPrototypeOf = __webpack_require__(59)
+ , ordinaryOwnMetadataKeys = metadata.keys
+ , toMetaKey = metadata.key;
+
+ var ordinaryMetadataKeys = function(O, P){
+ var oKeys = ordinaryOwnMetadataKeys(O, P)
+ , parent = getPrototypeOf(O);
+ if(parent === null)return oKeys;
+ var pKeys = ordinaryMetadataKeys(parent, P);
+ return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys;
+ };
+
+ metadata.exp({getMetadataKeys: function getMetadataKeys(target /*, targetKey */){
+ return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
+ }});
+
+/***/ },
+/* 281 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var metadata = __webpack_require__(277)
+ , anObject = __webpack_require__(12)
+ , ordinaryGetOwnMetadata = metadata.get
+ , toMetaKey = metadata.key;
+
+ metadata.exp({getOwnMetadata: function getOwnMetadata(metadataKey, target /*, targetKey */){
+ return ordinaryGetOwnMetadata(metadataKey, anObject(target)
+ , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
+ }});
+
+/***/ },
+/* 282 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var metadata = __webpack_require__(277)
+ , anObject = __webpack_require__(12)
+ , ordinaryOwnMetadataKeys = metadata.keys
+ , toMetaKey = metadata.key;
+
+ metadata.exp({getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */){
+ return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
+ }});
+
+/***/ },
+/* 283 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var metadata = __webpack_require__(277)
+ , anObject = __webpack_require__(12)
+ , getPrototypeOf = __webpack_require__(59)
+ , ordinaryHasOwnMetadata = metadata.has
+ , toMetaKey = metadata.key;
+
+ var ordinaryHasMetadata = function(MetadataKey, O, P){
+ var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
+ if(hasOwn)return true;
+ var parent = getPrototypeOf(O);
+ return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false;
+ };
+
+ metadata.exp({hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */){
+ return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
+ }});
+
+/***/ },
+/* 284 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var metadata = __webpack_require__(277)
+ , anObject = __webpack_require__(12)
+ , ordinaryHasOwnMetadata = metadata.has
+ , toMetaKey = metadata.key;
+
+ metadata.exp({hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, targetKey */){
+ return ordinaryHasOwnMetadata(metadataKey, anObject(target)
+ , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
+ }});
+
+/***/ },
+/* 285 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var metadata = __webpack_require__(277)
+ , anObject = __webpack_require__(12)
+ , aFunction = __webpack_require__(21)
+ , toMetaKey = metadata.key
+ , ordinaryDefineOwnMetadata = metadata.set;
+
+ metadata.exp({metadata: function metadata(metadataKey, metadataValue){
+ return function decorator(target, targetKey){
+ ordinaryDefineOwnMetadata(
+ metadataKey, metadataValue,
+ (targetKey !== undefined ? anObject : aFunction)(target),
+ toMetaKey(targetKey)
+ );
+ };
+ }});
+
+/***/ },
+/* 286 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask
+ var $export = __webpack_require__(8)
+ , microtask = __webpack_require__(209)()
+ , process = __webpack_require__(4).process
+ , isNode = __webpack_require__(34)(process) == 'process';
+
+ $export($export.G, {
+ asap: function asap(fn){
+ var domain = isNode && process.domain;
+ microtask(domain ? domain.bind(fn) : fn);
+ }
+ });
+
+/***/ },
+/* 287 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // https://github.com/zenparsing/es-observable
+ var $export = __webpack_require__(8)
+ , global = __webpack_require__(4)
+ , core = __webpack_require__(9)
+ , microtask = __webpack_require__(209)()
+ , OBSERVABLE = __webpack_require__(25)('observable')
+ , aFunction = __webpack_require__(21)
+ , anObject = __webpack_require__(12)
+ , anInstance = __webpack_require__(205)
+ , redefineAll = __webpack_require__(210)
+ , hide = __webpack_require__(10)
+ , forOf = __webpack_require__(206)
+ , RETURN = forOf.RETURN;
+
+ var getMethod = function(fn){
+ return fn == null ? undefined : aFunction(fn);
+ };
+
+ var cleanupSubscription = function(subscription){
+ var cleanup = subscription._c;
+ if(cleanup){
+ subscription._c = undefined;
+ cleanup();
+ }
+ };
+
+ var subscriptionClosed = function(subscription){
+ return subscription._o === undefined;
+ };
+
+ var closeSubscription = function(subscription){
+ if(!subscriptionClosed(subscription)){
+ subscription._o = undefined;
+ cleanupSubscription(subscription);
+ }
+ };
+
+ var Subscription = function(observer, subscriber){
+ anObject(observer);
+ this._c = undefined;
+ this._o = observer;
+ observer = new SubscriptionObserver(this);
+ try {
+ var cleanup = subscriber(observer)
+ , subscription = cleanup;
+ if(cleanup != null){
+ if(typeof cleanup.unsubscribe === 'function')cleanup = function(){ subscription.unsubscribe(); };
+ else aFunction(cleanup);
+ this._c = cleanup;
+ }
+ } catch(e){
+ observer.error(e);
+ return;
+ } if(subscriptionClosed(this))cleanupSubscription(this);
+ };
+
+ Subscription.prototype = redefineAll({}, {
+ unsubscribe: function unsubscribe(){ closeSubscription(this); }
+ });
+
+ var SubscriptionObserver = function(subscription){
+ this._s = subscription;
+ };
+
+ SubscriptionObserver.prototype = redefineAll({}, {
+ next: function next(value){
+ var subscription = this._s;
+ if(!subscriptionClosed(subscription)){
+ var observer = subscription._o;
+ try {
+ var m = getMethod(observer.next);
+ if(m)return m.call(observer, value);
+ } catch(e){
+ try {
+ closeSubscription(subscription);
+ } finally {
+ throw e;
+ }
+ }
+ }
+ },
+ error: function error(value){
+ var subscription = this._s;
+ if(subscriptionClosed(subscription))throw value;
+ var observer = subscription._o;
+ subscription._o = undefined;
+ try {
+ var m = getMethod(observer.error);
+ if(!m)throw value;
+ value = m.call(observer, value);
+ } catch(e){
+ try {
+ cleanupSubscription(subscription);
+ } finally {
+ throw e;
+ }
+ } cleanupSubscription(subscription);
+ return value;
+ },
+ complete: function complete(value){
+ var subscription = this._s;
+ if(!subscriptionClosed(subscription)){
+ var observer = subscription._o;
+ subscription._o = undefined;
+ try {
+ var m = getMethod(observer.complete);
+ value = m ? m.call(observer, value) : undefined;
+ } catch(e){
+ try {
+ cleanupSubscription(subscription);
+ } finally {
+ throw e;
+ }
+ } cleanupSubscription(subscription);
+ return value;
+ }
+ }
+ });
+
+ var $Observable = function Observable(subscriber){
+ anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber);
+ };
+
+ redefineAll($Observable.prototype, {
+ subscribe: function subscribe(observer){
+ return new Subscription(observer, this._f);
+ },
+ forEach: function forEach(fn){
+ var that = this;
+ return new (core.Promise || global.Promise)(function(resolve, reject){
+ aFunction(fn);
+ var subscription = that.subscribe({
+ next : function(value){
+ try {
+ return fn(value);
+ } catch(e){
+ reject(e);
+ subscription.unsubscribe();
+ }
+ },
+ error: reject,
+ complete: resolve
+ });
+ });
+ }
+ });
+
+ redefineAll($Observable, {
+ from: function from(x){
+ var C = typeof this === 'function' ? this : $Observable;
+ var method = getMethod(anObject(x)[OBSERVABLE]);
+ if(method){
+ var observable = anObject(method.call(x));
+ return observable.constructor === C ? observable : new C(function(observer){
+ return observable.subscribe(observer);
+ });
+ }
+ return new C(function(observer){
+ var done = false;
+ microtask(function(){
+ if(!done){
+ try {
+ if(forOf(x, false, function(it){
+ observer.next(it);
+ if(done)return RETURN;
+ }) === RETURN)return;
+ } catch(e){
+ if(done)throw e;
+ observer.error(e);
+ return;
+ } observer.complete();
+ }
+ });
+ return function(){ done = true; };
+ });
+ },
+ of: function of(){
+ for(var i = 0, l = arguments.length, items = Array(l); i < l;)items[i] = arguments[i++];
+ return new (typeof this === 'function' ? this : $Observable)(function(observer){
+ var done = false;
+ microtask(function(){
+ if(!done){
+ for(var i = 0; i < items.length; ++i){
+ observer.next(items[i]);
+ if(done)return;
+ } observer.complete();
+ }
+ });
+ return function(){ done = true; };
+ });
+ }
+ });
+
+ hide($Observable.prototype, OBSERVABLE, function(){ return this; });
+
+ $export($export.G, {Observable: $Observable});
+
+ __webpack_require__(192)('Observable');
+
+/***/ },
+/* 288 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // ie9- setTimeout & setInterval additional parameters fix
+ var global = __webpack_require__(4)
+ , $export = __webpack_require__(8)
+ , invoke = __webpack_require__(78)
+ , partial = __webpack_require__(289)
+ , navigator = global.navigator
+ , MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check
+ var wrap = function(set){
+ return MSIE ? function(fn, time /*, ...args */){
+ return set(invoke(
+ partial,
+ [].slice.call(arguments, 2),
+ typeof fn == 'function' ? fn : Function(fn)
+ ), time);
+ } : set;
+ };
+ $export($export.G + $export.B + $export.F * MSIE, {
+ setTimeout: wrap(global.setTimeout),
+ setInterval: wrap(global.setInterval)
+ });
+
+/***/ },
+/* 289 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ var path = __webpack_require__(290)
+ , invoke = __webpack_require__(78)
+ , aFunction = __webpack_require__(21);
+ module.exports = function(/* ...pargs */){
+ var fn = aFunction(this)
+ , length = arguments.length
+ , pargs = Array(length)
+ , i = 0
+ , _ = path._
+ , holder = false;
+ while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true;
+ return function(/* ...args */){
+ var that = this
+ , aLen = arguments.length
+ , j = 0, k = 0, args;
+ if(!holder && !aLen)return invoke(fn, pargs, that);
+ args = pargs.slice();
+ if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++];
+ while(aLen > k)args.push(arguments[k++]);
+ return invoke(fn, args, that);
+ };
+ };
+
+/***/ },
+/* 290 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.exports = __webpack_require__(4);
+
+/***/ },
+/* 291 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $export = __webpack_require__(8)
+ , $task = __webpack_require__(208);
+ $export($export.G + $export.B, {
+ setImmediate: $task.set,
+ clearImmediate: $task.clear
+ });
+
+/***/ },
+/* 292 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var $iterators = __webpack_require__(193)
+ , redefine = __webpack_require__(18)
+ , global = __webpack_require__(4)
+ , hide = __webpack_require__(10)
+ , Iterators = __webpack_require__(129)
+ , wks = __webpack_require__(25)
+ , ITERATOR = wks('iterator')
+ , TO_STRING_TAG = wks('toStringTag')
+ , ArrayValues = Iterators.Array;
+
+ for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){
+ var NAME = collections[i]
+ , Collection = global[NAME]
+ , proto = Collection && Collection.prototype
+ , key;
+ if(proto){
+ if(!proto[ITERATOR])hide(proto, ITERATOR, ArrayValues);
+ if(!proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);
+ Iterators[NAME] = ArrayValues;
+ for(key in $iterators)if(!proto[key])redefine(proto, key, $iterators[key], true);
+ }
+ }
+
+/***/ },
+/* 293 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(global, process) {/**
+ * Copyright (c) 2014, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
+ * additional grant of patent rights can be found in the PATENTS file in
+ * the same directory.
+ */
+
+ !(function(global) {
+ "use strict";
+
+ var hasOwn = Object.prototype.hasOwnProperty;
+ var undefined; // More compressible than void 0.
+ var $Symbol = typeof Symbol === "function" ? Symbol : {};
+ var iteratorSymbol = $Symbol.iterator || "@@iterator";
+ var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
+
+ var inModule = typeof module === "object";
+ var runtime = global.regeneratorRuntime;
+ if (runtime) {
+ if (inModule) {
+ // If regeneratorRuntime is defined globally and we're in a module,
+ // make the exports object identical to regeneratorRuntime.
+ module.exports = runtime;
+ }
+ // Don't bother evaluating the rest of this file if the runtime was
+ // already defined globally.
+ return;
+ }
+
+ // Define the runtime globally (as expected by generated code) as either
+ // module.exports (if we're in a module) or a new, empty object.
+ runtime = global.regeneratorRuntime = inModule ? module.exports : {};
+
+ function wrap(innerFn, outerFn, self, tryLocsList) {
+ // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
+ var generator = Object.create(protoGenerator.prototype);
+ var context = new Context(tryLocsList || []);
+
+ // The ._invoke method unifies the implementations of the .next,
+ // .throw, and .return methods.
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
+
+ return generator;
+ }
+ runtime.wrap = wrap;
+
+ // Try/catch helper to minimize deoptimizations. Returns a completion
+ // record like context.tryEntries[i].completion. This interface could
+ // have been (and was previously) designed to take a closure to be
+ // invoked without arguments, but in all the cases we care about we
+ // already have an existing method we want to call, so there's no need
+ // to create a new function object. We can even get away with assuming
+ // the method takes exactly one argument, since that happens to be true
+ // in every case, so we don't have to touch the arguments object. The
+ // only additional allocation required is the completion record, which
+ // has a stable shape and so hopefully should be cheap to allocate.
+ function tryCatch(fn, obj, arg) {
+ try {
+ return { type: "normal", arg: fn.call(obj, arg) };
+ } catch (err) {
+ return { type: "throw", arg: err };
+ }
+ }
+
+ var GenStateSuspendedStart = "suspendedStart";
+ var GenStateSuspendedYield = "suspendedYield";
+ var GenStateExecuting = "executing";
+ var GenStateCompleted = "completed";
+
+ // Returning this object from the innerFn has the same effect as
+ // breaking out of the dispatch switch statement.
+ var ContinueSentinel = {};
+
+ // Dummy constructor functions that we use as the .constructor and
+ // .constructor.prototype properties for functions that return Generator
+ // objects. For full spec compliance, you may wish to configure your
+ // minifier not to mangle the names of these two functions.
+ function Generator() {}
+ function GeneratorFunction() {}
+ function GeneratorFunctionPrototype() {}
+
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype;
+ GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
+ GeneratorFunctionPrototype.constructor = GeneratorFunction;
+ GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction";
+
+ // Helper for defining the .next, .throw, and .return methods of the
+ // Iterator interface in terms of a single ._invoke method.
+ function defineIteratorMethods(prototype) {
+ ["next", "throw", "return"].forEach(function(method) {
+ prototype[method] = function(arg) {
+ return this._invoke(method, arg);
+ };
+ });
+ }
+
+ runtime.isGeneratorFunction = function(genFun) {
+ var ctor = typeof genFun === "function" && genFun.constructor;
+ return ctor
+ ? ctor === GeneratorFunction ||
+ // For the native GeneratorFunction constructor, the best we can
+ // do is to check its .name property.
+ (ctor.displayName || ctor.name) === "GeneratorFunction"
+ : false;
+ };
+
+ runtime.mark = function(genFun) {
+ if (Object.setPrototypeOf) {
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
+ } else {
+ genFun.__proto__ = GeneratorFunctionPrototype;
+ if (!(toStringTagSymbol in genFun)) {
+ genFun[toStringTagSymbol] = "GeneratorFunction";
+ }
+ }
+ genFun.prototype = Object.create(Gp);
+ return genFun;
+ };
+
+ // Within the body of any async function, `await x` is transformed to
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
+ // `value instanceof AwaitArgument` to determine if the yielded value is
+ // meant to be awaited. Some may consider the name of this method too
+ // cutesy, but they are curmudgeons.
+ runtime.awrap = function(arg) {
+ return new AwaitArgument(arg);
+ };
+
+ function AwaitArgument(arg) {
+ this.arg = arg;
+ }
+
+ function AsyncIterator(generator) {
+ function invoke(method, arg, resolve, reject) {
+ var record = tryCatch(generator[method], generator, arg);
+ if (record.type === "throw") {
+ reject(record.arg);
+ } else {
+ var result = record.arg;
+ var value = result.value;
+ if (value instanceof AwaitArgument) {
+ return Promise.resolve(value.arg).then(function(value) {
+ invoke("next", value, resolve, reject);
+ }, function(err) {
+ invoke("throw", err, resolve, reject);
+ });
+ }
+
+ return Promise.resolve(value).then(function(unwrapped) {
+ // When a yielded Promise is resolved, its final value becomes
+ // the .value of the Promise<{value,done}> result for the
+ // current iteration. If the Promise is rejected, however, the
+ // result for this iteration will be rejected with the same
+ // reason. Note that rejections of yielded Promises are not
+ // thrown back into the generator function, as is the case
+ // when an awaited Promise is rejected. This difference in
+ // behavior between yield and await is important, because it
+ // allows the consumer to decide what to do with the yielded
+ // rejection (swallow it and continue, manually .throw it back
+ // into the generator, abandon iteration, whatever). With
+ // await, by contrast, there is no opportunity to examine the
+ // rejection reason outside the generator function, so the
+ // only option is to throw it from the await expression, and
+ // let the generator function handle the exception.
+ result.value = unwrapped;
+ resolve(result);
+ }, reject);
+ }
+ }
+
+ if (typeof process === "object" && process.domain) {
+ invoke = process.domain.bind(invoke);
+ }
+
+ var previousPromise;
+
+ function enqueue(method, arg) {
+ function callInvokeWithMethodAndArg() {
+ return new Promise(function(resolve, reject) {
+ invoke(method, arg, resolve, reject);
+ });
+ }
+
+ return previousPromise =
+ // If enqueue has been called before, then we want to wait until
+ // all previous Promises have been resolved before calling invoke,
+ // so that results are always delivered in the correct order. If
+ // enqueue has not been called before, then it is important to
+ // call invoke immediately, without waiting on a callback to fire,
+ // so that the async generator function has the opportunity to do
+ // any necessary setup in a predictable way. This predictability
+ // is why the Promise constructor synchronously invokes its
+ // executor callback, and why async functions synchronously
+ // execute code before the first await. Since we implement simple
+ // async functions in terms of async generators, it is especially
+ // important to get this right, even though it requires care.
+ previousPromise ? previousPromise.then(
+ callInvokeWithMethodAndArg,
+ // Avoid propagating failures to Promises returned by later
+ // invocations of the iterator.
+ callInvokeWithMethodAndArg
+ ) : callInvokeWithMethodAndArg();
+ }
+
+ // Define the unified helper method that is used to implement .next,
+ // .throw, and .return (see defineIteratorMethods).
+ this._invoke = enqueue;
+ }
+
+ defineIteratorMethods(AsyncIterator.prototype);
+
+ // Note that simple async functions are implemented on top of
+ // AsyncIterator objects; they just return a Promise for the value of
+ // the final result produced by the iterator.
+ runtime.async = function(innerFn, outerFn, self, tryLocsList) {
+ var iter = new AsyncIterator(
+ wrap(innerFn, outerFn, self, tryLocsList)
+ );
+
+ return runtime.isGeneratorFunction(outerFn)
+ ? iter // If outerFn is a generator, return the full iterator.
+ : iter.next().then(function(result) {
+ return result.done ? result.value : iter.next();
+ });
+ };
+
+ function makeInvokeMethod(innerFn, self, context) {
+ var state = GenStateSuspendedStart;
+
+ return function invoke(method, arg) {
+ if (state === GenStateExecuting) {
+ throw new Error("Generator is already running");
+ }
+
+ if (state === GenStateCompleted) {
+ if (method === "throw") {
+ throw arg;
+ }
+
+ // Be forgiving, per 25.3.3.3.3 of the spec:
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
+ return doneResult();
+ }
+
+ while (true) {
+ var delegate = context.delegate;
+ if (delegate) {
+ if (method === "return" ||
+ (method === "throw" && delegate.iterator[method] === undefined)) {
+ // A return or throw (when the delegate iterator has no throw
+ // method) always terminates the yield* loop.
+ context.delegate = null;
+
+ // If the delegate iterator has a return method, give it a
+ // chance to clean up.
+ var returnMethod = delegate.iterator["return"];
+ if (returnMethod) {
+ var record = tryCatch(returnMethod, delegate.iterator, arg);
+ if (record.type === "throw") {
+ // If the return method threw an exception, let that
+ // exception prevail over the original return or throw.
+ method = "throw";
+ arg = record.arg;
+ continue;
+ }
+ }
+
+ if (method === "return") {
+ // Continue with the outer return, now that the delegate
+ // iterator has been terminated.
+ continue;
+ }
+ }
+
+ var record = tryCatch(
+ delegate.iterator[method],
+ delegate.iterator,
+ arg
+ );
+
+ if (record.type === "throw") {
+ context.delegate = null;
+
+ // Like returning generator.throw(uncaught), but without the
+ // overhead of an extra function call.
+ method = "throw";
+ arg = record.arg;
+ continue;
+ }
+
+ // Delegate generator ran and handled its own exceptions so
+ // regardless of what the method was, we continue as if it is
+ // "next" with an undefined arg.
+ method = "next";
+ arg = undefined;
+
+ var info = record.arg;
+ if (info.done) {
+ context[delegate.resultName] = info.value;
+ context.next = delegate.nextLoc;
+ } else {
+ state = GenStateSuspendedYield;
+ return info;
+ }
+
+ context.delegate = null;
+ }
+
+ if (method === "next") {
+ // Setting context._sent for legacy support of Babel's
+ // function.sent implementation.
+ context.sent = context._sent = arg;
+
+ } else if (method === "throw") {
+ if (state === GenStateSuspendedStart) {
+ state = GenStateCompleted;
+ throw arg;
+ }
+
+ if (context.dispatchException(arg)) {
+ // If the dispatched exception was caught by a catch block,
+ // then let that catch block handle the exception normally.
+ method = "next";
+ arg = undefined;
+ }
+
+ } else if (method === "return") {
+ context.abrupt("return", arg);
+ }
+
+ state = GenStateExecuting;
+
+ var record = tryCatch(innerFn, self, context);
+ if (record.type === "normal") {
+ // If an exception is thrown from innerFn, we leave state ===
+ // GenStateExecuting and loop back for another invocation.
+ state = context.done
+ ? GenStateCompleted
+ : GenStateSuspendedYield;
+
+ var info = {
+ value: record.arg,
+ done: context.done
+ };
+
+ if (record.arg === ContinueSentinel) {
+ if (context.delegate && method === "next") {
+ // Deliberately forget the last sent value so that we don't
+ // accidentally pass it on to the delegate.
+ arg = undefined;
+ }
+ } else {
+ return info;
+ }
+
+ } else if (record.type === "throw") {
+ state = GenStateCompleted;
+ // Dispatch the exception by looping back around to the
+ // context.dispatchException(arg) call above.
+ method = "throw";
+ arg = record.arg;
+ }
+ }
+ };
+ }
+
+ // Define Generator.prototype.{next,throw,return} in terms of the
+ // unified ._invoke helper method.
+ defineIteratorMethods(Gp);
+
+ Gp[iteratorSymbol] = function() {
+ return this;
+ };
+
+ Gp[toStringTagSymbol] = "Generator";
+
+ Gp.toString = function() {
+ return "[object Generator]";
+ };
+
+ function pushTryEntry(locs) {
+ var entry = { tryLoc: locs[0] };
+
+ if (1 in locs) {
+ entry.catchLoc = locs[1];
+ }
+
+ if (2 in locs) {
+ entry.finallyLoc = locs[2];
+ entry.afterLoc = locs[3];
+ }
+
+ this.tryEntries.push(entry);
+ }
+
+ function resetTryEntry(entry) {
+ var record = entry.completion || {};
+ record.type = "normal";
+ delete record.arg;
+ entry.completion = record;
+ }
+
+ function Context(tryLocsList) {
+ // The root entry object (effectively a try statement without a catch
+ // or a finally block) gives us a place to store values thrown from
+ // locations where there is no enclosing try statement.
+ this.tryEntries = [{ tryLoc: "root" }];
+ tryLocsList.forEach(pushTryEntry, this);
+ this.reset(true);
+ }
+
+ runtime.keys = function(object) {
+ var keys = [];
+ for (var key in object) {
+ keys.push(key);
+ }
+ keys.reverse();
+
+ // Rather than returning an object with a next method, we keep
+ // things simple and return the next function itself.
+ return function next() {
+ while (keys.length) {
+ var key = keys.pop();
+ if (key in object) {
+ next.value = key;
+ next.done = false;
+ return next;
+ }
+ }
+
+ // To avoid creating an additional object, we just hang the .value
+ // and .done properties off the next function object itself. This
+ // also ensures that the minifier will not anonymize the function.
+ next.done = true;
+ return next;
+ };
+ };
+
+ function values(iterable) {
+ if (iterable) {
+ var iteratorMethod = iterable[iteratorSymbol];
+ if (iteratorMethod) {
+ return iteratorMethod.call(iterable);
+ }
+
+ if (typeof iterable.next === "function") {
+ return iterable;
+ }
+
+ if (!isNaN(iterable.length)) {
+ var i = -1, next = function next() {
+ while (++i < iterable.length) {
+ if (hasOwn.call(iterable, i)) {
+ next.value = iterable[i];
+ next.done = false;
+ return next;
+ }
+ }
+
+ next.value = undefined;
+ next.done = true;
+
+ return next;
+ };
+
+ return next.next = next;
+ }
+ }
+
+ // Return an iterator with no values.
+ return { next: doneResult };
+ }
+ runtime.values = values;
+
+ function doneResult() {
+ return { value: undefined, done: true };
+ }
+
+ Context.prototype = {
+ constructor: Context,
+
+ reset: function(skipTempReset) {
+ this.prev = 0;
+ this.next = 0;
+ // Resetting context._sent for legacy support of Babel's
+ // function.sent implementation.
+ this.sent = this._sent = undefined;
+ this.done = false;
+ this.delegate = null;
+
+ this.tryEntries.forEach(resetTryEntry);
+
+ if (!skipTempReset) {
+ for (var name in this) {
+ // Not sure about the optimal order of these conditions:
+ if (name.charAt(0) === "t" &&
+ hasOwn.call(this, name) &&
+ !isNaN(+name.slice(1))) {
+ this[name] = undefined;
+ }
+ }
+ }
+ },
+
+ stop: function() {
+ this.done = true;
+
+ var rootEntry = this.tryEntries[0];
+ var rootRecord = rootEntry.completion;
+ if (rootRecord.type === "throw") {
+ throw rootRecord.arg;
+ }
+
+ return this.rval;
+ },
+
+ dispatchException: function(exception) {
+ if (this.done) {
+ throw exception;
+ }
+
+ var context = this;
+ function handle(loc, caught) {
+ record.type = "throw";
+ record.arg = exception;
+ context.next = loc;
+ return !!caught;
+ }
+
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ var record = entry.completion;
+
+ if (entry.tryLoc === "root") {
+ // Exception thrown outside of any try block that could handle
+ // it, so set the completion value of the entire function to
+ // throw the exception.
+ return handle("end");
+ }
+
+ if (entry.tryLoc <= this.prev) {
+ var hasCatch = hasOwn.call(entry, "catchLoc");
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
+
+ if (hasCatch && hasFinally) {
+ if (this.prev < entry.catchLoc) {
+ return handle(entry.catchLoc, true);
+ } else if (this.prev < entry.finallyLoc) {
+ return handle(entry.finallyLoc);
+ }
+
+ } else if (hasCatch) {
+ if (this.prev < entry.catchLoc) {
+ return handle(entry.catchLoc, true);
+ }
+
+ } else if (hasFinally) {
+ if (this.prev < entry.finallyLoc) {
+ return handle(entry.finallyLoc);
+ }
+
+ } else {
+ throw new Error("try statement without catch or finally");
+ }
+ }
+ }
+ },
+
+ abrupt: function(type, arg) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.tryLoc <= this.prev &&
+ hasOwn.call(entry, "finallyLoc") &&
+ this.prev < entry.finallyLoc) {
+ var finallyEntry = entry;
+ break;
+ }
+ }
+
+ if (finallyEntry &&
+ (type === "break" ||
+ type === "continue") &&
+ finallyEntry.tryLoc <= arg &&
+ arg <= finallyEntry.finallyLoc) {
+ // Ignore the finally entry if control is not jumping to a
+ // location outside the try/catch block.
+ finallyEntry = null;
+ }
+
+ var record = finallyEntry ? finallyEntry.completion : {};
+ record.type = type;
+ record.arg = arg;
+
+ if (finallyEntry) {
+ this.next = finallyEntry.finallyLoc;
+ } else {
+ this.complete(record);
+ }
+
+ return ContinueSentinel;
+ },
+
+ complete: function(record, afterLoc) {
+ if (record.type === "throw") {
+ throw record.arg;
+ }
+
+ if (record.type === "break" ||
+ record.type === "continue") {
+ this.next = record.arg;
+ } else if (record.type === "return") {
+ this.rval = record.arg;
+ this.next = "end";
+ } else if (record.type === "normal" && afterLoc) {
+ this.next = afterLoc;
+ }
+ },
+
+ finish: function(finallyLoc) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.finallyLoc === finallyLoc) {
+ this.complete(entry.completion, entry.afterLoc);
+ resetTryEntry(entry);
+ return ContinueSentinel;
+ }
+ }
+ },
+
+ "catch": function(tryLoc) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.tryLoc === tryLoc) {
+ var record = entry.completion;
+ if (record.type === "throw") {
+ var thrown = record.arg;
+ resetTryEntry(entry);
+ }
+ return thrown;
+ }
+ }
+
+ // The context.catch method must only be called with a location
+ // argument that corresponds to a known catch block.
+ throw new Error("illegal catch attempt");
+ },
+
+ delegateYield: function(iterable, resultName, nextLoc) {
+ this.delegate = {
+ iterator: values(iterable),
+ resultName: resultName,
+ nextLoc: nextLoc
+ };
+
+ return ContinueSentinel;
+ }
+ };
+ })(
+ // Among the various tricks for obtaining a reference to the global
+ // object, this seems to be the most reliable technique that does not
+ // use indirect eval (which violates Content Security Policy).
+ typeof global === "object" ? global :
+ typeof window === "object" ? window :
+ typeof self === "object" ? self : this
+ );
+
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(294)))
+
+/***/ },
+/* 294 */
+/***/ function(module, exports) {
+
+ // shim for using process in browser
+ var process = module.exports = {};
+
+ // cached from whatever global is present so that test runners that stub it
+ // don't break things. But we need to wrap it in a try catch in case it is
+ // wrapped in strict mode code which doesn't define any globals. It's inside a
+ // function because try/catches deoptimize in certain engines.
+
+ var cachedSetTimeout;
+ var cachedClearTimeout;
+
+ function defaultSetTimout() {
+ throw new Error('setTimeout has not been defined');
+ }
+ function defaultClearTimeout () {
+ throw new Error('clearTimeout has not been defined');
+ }
+ (function () {
+ try {
+ if (typeof setTimeout === 'function') {
+ cachedSetTimeout = setTimeout;
+ } else {
+ cachedSetTimeout = defaultSetTimout;
+ }
+ } catch (e) {
+ cachedSetTimeout = defaultSetTimout;
+ }
+ try {
+ if (typeof clearTimeout === 'function') {
+ cachedClearTimeout = clearTimeout;
+ } else {
+ cachedClearTimeout = defaultClearTimeout;
+ }
+ } catch (e) {
+ cachedClearTimeout = defaultClearTimeout;
+ }
+ } ())
+ function runTimeout(fun) {
+ if (cachedSetTimeout === setTimeout) {
+ //normal enviroments in sane situations
+ return setTimeout(fun, 0);
+ }
+ // if setTimeout wasn't available but was latter defined
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
+ cachedSetTimeout = setTimeout;
+ return setTimeout(fun, 0);
+ }
+ try {
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedSetTimeout(fun, 0);
+ } catch(e){
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedSetTimeout.call(null, fun, 0);
+ } catch(e){
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
+ return cachedSetTimeout.call(this, fun, 0);
+ }
+ }
+
+
+ }
+ function runClearTimeout(marker) {
+ if (cachedClearTimeout === clearTimeout) {
+ //normal enviroments in sane situations
+ return clearTimeout(marker);
+ }
+ // if clearTimeout wasn't available but was latter defined
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
+ cachedClearTimeout = clearTimeout;
+ return clearTimeout(marker);
+ }
+ try {
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedClearTimeout(marker);
+ } catch (e){
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedClearTimeout.call(null, marker);
+ } catch (e){
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
+ return cachedClearTimeout.call(this, marker);
+ }
+ }
+
+
+
+ }
+ var queue = [];
+ var draining = false;
+ var currentQueue;
+ var queueIndex = -1;
+
+ function cleanUpNextTick() {
+ if (!draining || !currentQueue) {
+ return;
+ }
+ draining = false;
+ if (currentQueue.length) {
+ queue = currentQueue.concat(queue);
+ } else {
+ queueIndex = -1;
+ }
+ if (queue.length) {
+ drainQueue();
+ }
+ }
+
+ function drainQueue() {
+ if (draining) {
+ return;
+ }
+ var timeout = runTimeout(cleanUpNextTick);
+ draining = true;
+
+ var len = queue.length;
+ while(len) {
+ currentQueue = queue;
+ queue = [];
+ while (++queueIndex < len) {
+ if (currentQueue) {
+ currentQueue[queueIndex].run();
+ }
+ }
+ queueIndex = -1;
+ len = queue.length;
+ }
+ currentQueue = null;
+ draining = false;
+ runClearTimeout(timeout);
+ }
+
+ process.nextTick = function (fun) {
+ var args = new Array(arguments.length - 1);
+ if (arguments.length > 1) {
+ for (var i = 1; i < arguments.length; i++) {
+ args[i - 1] = arguments[i];
+ }
+ }
+ queue.push(new Item(fun, args));
+ if (queue.length === 1 && !draining) {
+ runTimeout(drainQueue);
+ }
+ };
+
+ // v8 likes predictible objects
+ function Item(fun, array) {
+ this.fun = fun;
+ this.array = array;
+ }
+ Item.prototype.run = function () {
+ this.fun.apply(null, this.array);
+ };
+ process.title = 'browser';
+ process.browser = true;
+ process.env = {};
+ process.argv = [];
+ process.version = ''; // empty string to avoid regexp issues
+ process.versions = {};
+
+ function noop() {}
+
+ process.on = noop;
+ process.addListener = noop;
+ process.once = noop;
+ process.off = noop;
+ process.removeListener = noop;
+ process.removeAllListeners = noop;
+ process.emit = noop;
+
+ process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+ };
+
+ process.cwd = function () { return '/' };
+ process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
+ };
+ process.umask = function() { return 0; };
+
+
+/***/ },
+/* 295 */
+/***/ function(module, exports, __webpack_require__) {
+
+ __webpack_require__(296);
+ module.exports = __webpack_require__(9).RegExp.escape;
+
+/***/ },
+/* 296 */
+/***/ function(module, exports, __webpack_require__) {
+
+ // https://github.com/benjamingr/RexExp.escape
+ var $export = __webpack_require__(8)
+ , $re = __webpack_require__(297)(/[\\^$*+?.()|[\]{}]/g, '\\$&');
+
+ $export($export.S, 'RegExp', {escape: function escape(it){ return $re(it); }});
+
+
+/***/ },
+/* 297 */
+/***/ function(module, exports) {
+
+ module.exports = function(regExp, replace){
+ var replacer = replace === Object(replace) ? function(part){
+ return replace[part];
+ } : replace;
+ return function(it){
+ return String(it).replace(regExp, replacer);
+ };
+ };
+
+/***/ },
+/* 298 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var BSON = __webpack_require__(299),
+ Binary = __webpack_require__(318),
+ Code = __webpack_require__(313),
+ DBRef = __webpack_require__(317),
+ Decimal128 = __webpack_require__(314),
+ Double = __webpack_require__(307),
+ Int32 = __webpack_require__(312),
+ Long = __webpack_require__(306),
+ Map = __webpack_require__(305),
+ MaxKey = __webpack_require__(316),
+ MinKey = __webpack_require__(315),
+ ObjectId = __webpack_require__(309),
+ BSONRegExp = __webpack_require__(310),
+ Symbol = __webpack_require__(311),
+ Timestamp = __webpack_require__(308);
+
+ // BSON MAX VALUES
+ BSON.BSON_INT32_MAX = 0x7FFFFFFF;
+ BSON.BSON_INT32_MIN = -0x80000000;
+
+ BSON.BSON_INT64_MAX = Math.pow(2, 63) - 1;
+ BSON.BSON_INT64_MIN = -Math.pow(2, 63);
+
+ // JS MAX PRECISE VALUES
+ BSON.JS_INT_MAX = 0x20000000000000; // Any integer up to 2^53 can be precisely represented by a double.
+ BSON.JS_INT_MIN = -0x20000000000000; // Any integer down to -2^53 can be precisely represented by a double.
+
+ // Add BSON types to function creation
+ BSON.Binary = Binary;
+ BSON.Code = Code;
+ BSON.DBRef = DBRef;
+ BSON.Decimal128 = Decimal128;
+ BSON.Double = Double;
+ BSON.Int32 = Int32;
+ BSON.Long = Long;
+ BSON.Map = Map;
+ BSON.MaxKey = MaxKey;
+ BSON.MinKey = MinKey;
+ BSON.ObjectId = ObjectId;
+ BSON.ObjectID = ObjectId;
+ BSON.BSONRegExp = BSONRegExp;
+ BSON.Symbol = Symbol;
+ BSON.Timestamp = Timestamp;
+
+ // Return the BSON
+ module.exports = BSON;
+
+/***/ },
+/* 299 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(Buffer) {"use strict";
+
+ var writeIEEE754 = __webpack_require__(304).writeIEEE754,
+ readIEEE754 = __webpack_require__(304).readIEEE754,
+ Map = __webpack_require__(305),
+ Long = __webpack_require__(306),
+ Double = __webpack_require__(307),
+ Timestamp = __webpack_require__(308),
+ ObjectID = __webpack_require__(309),
+ BSONRegExp = __webpack_require__(310),
+ Symbol = __webpack_require__(311),
+ Int32 = __webpack_require__(312),
+ Code = __webpack_require__(313),
+ Decimal128 = __webpack_require__(314),
+ MinKey = __webpack_require__(315),
+ MaxKey = __webpack_require__(316),
+ DBRef = __webpack_require__(317),
+ Binary = __webpack_require__(318);
+
+ // Parts of the parser
+ var deserialize = __webpack_require__(319),
+ serializer = __webpack_require__(323),
+ calculateObjectSize = __webpack_require__(324);
+
+ /**
+ * @ignore
+ * @api private
+ */
+ // Max Size
+ var MAXSIZE = 1024 * 1024 * 17;
+ // Max Document Buffer size
+ var buffer = new Buffer(MAXSIZE);
+
+ var BSON = function () {};
+
+ /**
+ * Serialize a Javascript object.
+ *
+ * @param {Object} object the Javascript object to serialize.
+ * @param {Boolean} [options.checkKeys] the serializer will check if keys are valid.
+ * @param {Boolean} [options.serializeFunctions=false] serialize the javascript functions **(default:false)**.
+ * @param {Boolean} [options.ignoreUndefined=true] ignore undefined fields **(default:true)**.
+ * @return {Buffer} returns the Buffer object containing the serialized object.
+ * @api public
+ */
+ BSON.prototype.serialize = function serialize(object, options) {
+ options = options || {};
+ // Unpack the options
+ var checkKeys = typeof options.checkKeys == 'boolean' ? options.checkKeys : false;
+ var serializeFunctions = typeof options.serializeFunctions == 'boolean' ? options.serializeFunctions : false;
+ var ignoreUndefined = typeof options.ignoreUndefined == 'boolean' ? options.ignoreUndefined : true;
+
+ // console.log("===================================== serialize")
+ // console.log("checkKeys = " + checkKeys)
+ // console.log("serializeFunctions = " + serializeFunctions)
+ // console.log("ignoreUndefined = " + ignoreUndefined)
+
+ // Attempt to serialize
+ var serializationIndex = serializer(buffer, object, checkKeys, 0, 0, serializeFunctions, ignoreUndefined, []);
+ // Create the final buffer
+ var finishedBuffer = new Buffer(serializationIndex);
+ // Copy into the finished buffer
+ buffer.copy(finishedBuffer, 0, 0, finishedBuffer.length);
+ // Return the buffer
+ return finishedBuffer;
+ };
+
+ /**
+ * Serialize a Javascript object using a predefined Buffer and index into the buffer, useful when pre-allocating the space for serialization.
+ *
+ * @param {Object} object the Javascript object to serialize.
+ * @param {Buffer} buffer the Buffer you pre-allocated to store the serialized BSON object.
+ * @param {Boolean} [options.checkKeys] the serializer will check if keys are valid.
+ * @param {Boolean} [options.serializeFunctions=false] serialize the javascript functions **(default:false)**.
+ * @param {Boolean} [options.ignoreUndefined=true] ignore undefined fields **(default:true)**.
+ * @param {Number} [options.index] the index in the buffer where we wish to start serializing into.
+ * @return {Number} returns the index pointing to the last written byte in the buffer.
+ * @api public
+ */
+ BSON.prototype.serializeWithBufferAndIndex = function (object, finalBuffer, options) {
+ options = options || {};
+ // Unpack the options
+ var checkKeys = typeof options.checkKeys == 'boolean' ? options.checkKeys : false;
+ var serializeFunctions = typeof options.serializeFunctions == 'boolean' ? options.serializeFunctions : false;
+ var ignoreUndefined = typeof options.ignoreUndefined == 'boolean' ? options.ignoreUndefined : true;
+ var startIndex = typeof options.index == 'number' ? options.index : 0;
+
+ // console.log("===================================== serializeWithBufferAndIndex")
+ // console.log("checkKeys = " + checkKeys)
+ // console.log("serializeFunctions = " + serializeFunctions)
+ // console.log("ignoreUndefined = " + ignoreUndefined)
+ // console.log("startIndex = " + startIndex)
+
+ // Attempt to serialize
+ var serializationIndex = serializer(buffer, object, checkKeys, startIndex || 0, 0, serializeFunctions, ignoreUndefined);
+ buffer.copy(finalBuffer, startIndex, 0, serializationIndex);
+
+ // Return the index
+ return serializationIndex - 1;
+ };
+
+ /**
+ * Deserialize data as BSON.
+ *
+ * Options
+ * - **evalFunctions** {Boolean, default:false}, evaluate functions in the BSON document scoped to the object deserialized.
+ * - **cacheFunctions** {Boolean, default:false}, cache evaluated functions for reuse.
+ * - **cacheFunctionsCrc32** {Boolean, default:false}, use a crc32 code for caching, otherwise use the string of the function.
+ * - **promoteLongs** {Boolean, default:true}, when deserializing a Long will fit it into a Number if it's smaller than 53 bits
+ *
+ * @param {Buffer} buffer the buffer containing the serialized set of BSON documents.
+ * @param {Object} [options] additional options used for the deserialization.
+ * @param {Boolean} [isArray] ignore used for recursive parsing.
+ * @return {Object} returns the deserialized Javascript Object.
+ * @api public
+ */
+ BSON.prototype.deserialize = function (data, options) {
+ return deserialize(data, options);
+ };
+
+ /**
+ * Calculate the bson size for a passed in Javascript object.
+ *
+ * @param {Object} object the Javascript object to calculate the BSON byte size for.
+ * @param {Boolean} [options.serializeFunctions=false] serialize the javascript functions **(default:false)**.
+ * @param {Boolean} [options.ignoreUndefined=true] ignore undefined fields **(default:true)**.
+ * @return {Number} returns the number of bytes the BSON object will take up.
+ * @api public
+ */
+ BSON.prototype.calculateObjectSize = function (object, options) {
+ options = options || {};
+
+ var serializeFunctions = typeof options.serializeFunctions == 'boolean' ? options.serializeFunctions : false;
+ var ignoreUndefined = typeof options.ignoreUndefined == 'boolean' ? options.ignoreUndefined : true;
+
+ return calculateObjectSize(object, serializeFunctions, ignoreUndefined);
+ };
+
+ /**
+ * Deserialize stream data as BSON documents.
+ *
+ * Options
+ * - **evalFunctions** {Boolean, default:false}, evaluate functions in the BSON document scoped to the object deserialized.
+ * - **cacheFunctions** {Boolean, default:false}, cache evaluated functions for reuse.
+ * - **cacheFunctionsCrc32** {Boolean, default:false}, use a crc32 code for caching, otherwise use the string of the function.
+ * - **promoteLongs** {Boolean, default:true}, when deserializing a Long will fit it into a Number if it's smaller than 53 bits
+ *
+ * @param {Buffer} data the buffer containing the serialized set of BSON documents.
+ * @param {Number} startIndex the start index in the data Buffer where the deserialization is to start.
+ * @param {Number} numberOfDocuments number of documents to deserialize.
+ * @param {Array} documents an array where to store the deserialized documents.
+ * @param {Number} docStartIndex the index in the documents array from where to start inserting documents.
+ * @param {Object} [options] additional options used for the deserialization.
+ * @return {Number} returns the next index in the buffer after deserialization **x** numbers of documents.
+ * @api public
+ */
+ BSON.prototype.deserializeStream = function (data, startIndex, numberOfDocuments, documents, docStartIndex, options) {
+ // if(numberOfDocuments !== documents.length) throw new Error("Number of expected results back is less than the number of documents");
+ options = options != null ? options : {};
+ var index = startIndex;
+ // Loop over all documents
+ for (var i = 0; i < numberOfDocuments; i++) {
+ // Find size of the document
+ var size = data[index] | data[index + 1] << 8 | data[index + 2] << 16 | data[index + 3] << 24;
+ // Update options with index
+ options['index'] = index;
+ // Parse the document at this point
+ documents[docStartIndex + i] = this.deserialize(data, options);
+ // Adjust index by the document size
+ index = index + size;
+ }
+
+ // Return object containing end index of parsing and list of documents
+ return index;
+ };
+
+ /**
+ * @ignore
+ * @api private
+ */
+ // BSON MAX VALUES
+ BSON.BSON_INT32_MAX = 0x7FFFFFFF;
+ BSON.BSON_INT32_MIN = -0x80000000;
+
+ BSON.BSON_INT64_MAX = Math.pow(2, 63) - 1;
+ BSON.BSON_INT64_MIN = -Math.pow(2, 63);
+
+ // JS MAX PRECISE VALUES
+ BSON.JS_INT_MAX = 0x20000000000000; // Any integer up to 2^53 can be precisely represented by a double.
+ BSON.JS_INT_MIN = -0x20000000000000; // Any integer down to -2^53 can be precisely represented by a double.
+
+ // Internal long versions
+ var JS_INT_MAX_LONG = Long.fromNumber(0x20000000000000); // Any integer up to 2^53 can be precisely represented by a double.
+ var JS_INT_MIN_LONG = Long.fromNumber(-0x20000000000000); // Any integer down to -2^53 can be precisely represented by a double.
+
+ /**
+ * Number BSON Type
+ *
+ * @classconstant BSON_DATA_NUMBER
+ **/
+ BSON.BSON_DATA_NUMBER = 1;
+ /**
+ * String BSON Type
+ *
+ * @classconstant BSON_DATA_STRING
+ **/
+ BSON.BSON_DATA_STRING = 2;
+ /**
+ * Object BSON Type
+ *
+ * @classconstant BSON_DATA_OBJECT
+ **/
+ BSON.BSON_DATA_OBJECT = 3;
+ /**
+ * Array BSON Type
+ *
+ * @classconstant BSON_DATA_ARRAY
+ **/
+ BSON.BSON_DATA_ARRAY = 4;
+ /**
+ * Binary BSON Type
+ *
+ * @classconstant BSON_DATA_BINARY
+ **/
+ BSON.BSON_DATA_BINARY = 5;
+ /**
+ * ObjectID BSON Type
+ *
+ * @classconstant BSON_DATA_OID
+ **/
+ BSON.BSON_DATA_OID = 7;
+ /**
+ * Boolean BSON Type
+ *
+ * @classconstant BSON_DATA_BOOLEAN
+ **/
+ BSON.BSON_DATA_BOOLEAN = 8;
+ /**
+ * Date BSON Type
+ *
+ * @classconstant BSON_DATA_DATE
+ **/
+ BSON.BSON_DATA_DATE = 9;
+ /**
+ * null BSON Type
+ *
+ * @classconstant BSON_DATA_NULL
+ **/
+ BSON.BSON_DATA_NULL = 10;
+ /**
+ * RegExp BSON Type
+ *
+ * @classconstant BSON_DATA_REGEXP
+ **/
+ BSON.BSON_DATA_REGEXP = 11;
+ /**
+ * Code BSON Type
+ *
+ * @classconstant BSON_DATA_CODE
+ **/
+ BSON.BSON_DATA_CODE = 13;
+ /**
+ * Symbol BSON Type
+ *
+ * @classconstant BSON_DATA_SYMBOL
+ **/
+ BSON.BSON_DATA_SYMBOL = 14;
+ /**
+ * Code with Scope BSON Type
+ *
+ * @classconstant BSON_DATA_CODE_W_SCOPE
+ **/
+ BSON.BSON_DATA_CODE_W_SCOPE = 15;
+ /**
+ * 32 bit Integer BSON Type
+ *
+ * @classconstant BSON_DATA_INT
+ **/
+ BSON.BSON_DATA_INT = 16;
+ /**
+ * Timestamp BSON Type
+ *
+ * @classconstant BSON_DATA_TIMESTAMP
+ **/
+ BSON.BSON_DATA_TIMESTAMP = 17;
+ /**
+ * Long BSON Type
+ *
+ * @classconstant BSON_DATA_LONG
+ **/
+ BSON.BSON_DATA_LONG = 18;
+ /**
+ * MinKey BSON Type
+ *
+ * @classconstant BSON_DATA_MIN_KEY
+ **/
+ BSON.BSON_DATA_MIN_KEY = 0xff;
+ /**
+ * MaxKey BSON Type
+ *
+ * @classconstant BSON_DATA_MAX_KEY
+ **/
+ BSON.BSON_DATA_MAX_KEY = 0x7f;
+
+ /**
+ * Binary Default Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_DEFAULT
+ **/
+ BSON.BSON_BINARY_SUBTYPE_DEFAULT = 0;
+ /**
+ * Binary Function Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_FUNCTION
+ **/
+ BSON.BSON_BINARY_SUBTYPE_FUNCTION = 1;
+ /**
+ * Binary Byte Array Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_BYTE_ARRAY
+ **/
+ BSON.BSON_BINARY_SUBTYPE_BYTE_ARRAY = 2;
+ /**
+ * Binary UUID Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_UUID
+ **/
+ BSON.BSON_BINARY_SUBTYPE_UUID = 3;
+ /**
+ * Binary MD5 Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_MD5
+ **/
+ BSON.BSON_BINARY_SUBTYPE_MD5 = 4;
+ /**
+ * Binary User Defined Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_USER_DEFINED
+ **/
+ BSON.BSON_BINARY_SUBTYPE_USER_DEFINED = 128;
+
+ // Return BSON
+ module.exports = BSON;
+ module.exports.Code = Code;
+ module.exports.Map = Map;
+ module.exports.Symbol = Symbol;
+ module.exports.BSON = BSON;
+ module.exports.DBRef = DBRef;
+ module.exports.Binary = Binary;
+ module.exports.ObjectID = ObjectID;
+ module.exports.Long = Long;
+ module.exports.Timestamp = Timestamp;
+ module.exports.Double = Double;
+ module.exports.Int32 = Int32;
+ module.exports.MinKey = MinKey;
+ module.exports.MaxKey = MaxKey;
+ module.exports.BSONRegExp = BSONRegExp;
+ module.exports.Decimal128 = Decimal128;
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(300).Buffer))
+
+/***/ },
+/* 300 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(Buffer, global) {/*!
+ * The buffer module from node.js, for the browser.
+ *
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
+ * @license MIT
+ */
+ /* eslint-disable no-proto */
+
+ 'use strict'
+
+ var base64 = __webpack_require__(301)
+ var ieee754 = __webpack_require__(302)
+ var isArray = __webpack_require__(303)
+
+ exports.Buffer = Buffer
+ exports.SlowBuffer = SlowBuffer
+ exports.INSPECT_MAX_BYTES = 50
+
+ /**
+ * If `Buffer.TYPED_ARRAY_SUPPORT`:
+ * === true Use Uint8Array implementation (fastest)
+ * === false Use Object implementation (most compatible, even IE6)
+ *
+ * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
+ * Opera 11.6+, iOS 4.2+.
+ *
+ * Due to various browser bugs, sometimes the Object implementation will be used even
+ * when the browser supports typed arrays.
+ *
+ * Note:
+ *
+ * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
+ * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
+ *
+ * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
+ *
+ * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
+ * incorrect length in some situations.
+
+ * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
+ * get the Object implementation, which is slower but behaves correctly.
+ */
+ Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
+ ? global.TYPED_ARRAY_SUPPORT
+ : typedArraySupport()
+
+ /*
+ * Export kMaxLength after typed array support is determined.
+ */
+ exports.kMaxLength = kMaxLength()
+
+ function typedArraySupport () {
+ try {
+ var arr = new Uint8Array(1)
+ arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
+ return arr.foo() === 42 && // typed array instances can be augmented
+ typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
+ arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
+ } catch (e) {
+ return false
+ }
+ }
+
+ function kMaxLength () {
+ return Buffer.TYPED_ARRAY_SUPPORT
+ ? 0x7fffffff
+ : 0x3fffffff
+ }
+
+ function createBuffer (that, length) {
+ if (kMaxLength() < length) {
+ throw new RangeError('Invalid typed array length')
+ }
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ // Return an augmented `Uint8Array` instance, for best performance
+ that = new Uint8Array(length)
+ that.__proto__ = Buffer.prototype
+ } else {
+ // Fallback: Return an object instance of the Buffer class
+ if (that === null) {
+ that = new Buffer(length)
+ }
+ that.length = length
+ }
+
+ return that
+ }
+
+ /**
+ * The Buffer constructor returns instances of `Uint8Array` that have their
+ * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
+ * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
+ * and the `Uint8Array` methods. Square bracket notation works as expected -- it
+ * returns a single octet.
+ *
+ * The `Uint8Array` prototype remains unmodified.
+ */
+
+ function Buffer (arg, encodingOrOffset, length) {
+ if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
+ return new Buffer(arg, encodingOrOffset, length)
+ }
+
+ // Common case.
+ if (typeof arg === 'number') {
+ if (typeof encodingOrOffset === 'string') {
+ throw new Error(
+ 'If encoding is specified then the first argument must be a string'
+ )
+ }
+ return allocUnsafe(this, arg)
+ }
+ return from(this, arg, encodingOrOffset, length)
+ }
+
+ Buffer.poolSize = 8192 // not used by this implementation
+
+ // TODO: Legacy, not needed anymore. Remove in next major version.
+ Buffer._augment = function (arr) {
+ arr.__proto__ = Buffer.prototype
+ return arr
+ }
+
+ function from (that, value, encodingOrOffset, length) {
+ if (typeof value === 'number') {
+ throw new TypeError('"value" argument must not be a number')
+ }
+
+ if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
+ return fromArrayBuffer(that, value, encodingOrOffset, length)
+ }
+
+ if (typeof value === 'string') {
+ return fromString(that, value, encodingOrOffset)
+ }
+
+ return fromObject(that, value)
+ }
+
+ /**
+ * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
+ * if value is a number.
+ * Buffer.from(str[, encoding])
+ * Buffer.from(array)
+ * Buffer.from(buffer)
+ * Buffer.from(arrayBuffer[, byteOffset[, length]])
+ **/
+ Buffer.from = function (value, encodingOrOffset, length) {
+ return from(null, value, encodingOrOffset, length)
+ }
+
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ Buffer.prototype.__proto__ = Uint8Array.prototype
+ Buffer.__proto__ = Uint8Array
+ if (typeof Symbol !== 'undefined' && Symbol.species &&
+ Buffer[Symbol.species] === Buffer) {
+ // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
+ Object.defineProperty(Buffer, Symbol.species, {
+ value: null,
+ configurable: true
+ })
+ }
+ }
+
+ function assertSize (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('"size" argument must be a number')
+ } else if (size < 0) {
+ throw new RangeError('"size" argument must not be negative')
+ }
+ }
+
+ function alloc (that, size, fill, encoding) {
+ assertSize(size)
+ if (size <= 0) {
+ return createBuffer(that, size)
+ }
+ if (fill !== undefined) {
+ // Only pay attention to encoding if it's a string. This
+ // prevents accidentally sending in a number that would
+ // be interpretted as a start offset.
+ return typeof encoding === 'string'
+ ? createBuffer(that, size).fill(fill, encoding)
+ : createBuffer(that, size).fill(fill)
+ }
+ return createBuffer(that, size)
+ }
+
+ /**
+ * Creates a new filled Buffer instance.
+ * alloc(size[, fill[, encoding]])
+ **/
+ Buffer.alloc = function (size, fill, encoding) {
+ return alloc(null, size, fill, encoding)
+ }
+
+ function allocUnsafe (that, size) {
+ assertSize(size)
+ that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
+ if (!Buffer.TYPED_ARRAY_SUPPORT) {
+ for (var i = 0; i < size; ++i) {
+ that[i] = 0
+ }
+ }
+ return that
+ }
+
+ /**
+ * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
+ * */
+ Buffer.allocUnsafe = function (size) {
+ return allocUnsafe(null, size)
+ }
+ /**
+ * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
+ */
+ Buffer.allocUnsafeSlow = function (size) {
+ return allocUnsafe(null, size)
+ }
+
+ function fromString (that, string, encoding) {
+ if (typeof encoding !== 'string' || encoding === '') {
+ encoding = 'utf8'
+ }
+
+ if (!Buffer.isEncoding(encoding)) {
+ throw new TypeError('"encoding" must be a valid string encoding')
+ }
+
+ var length = byteLength(string, encoding) | 0
+ that = createBuffer(that, length)
+
+ var actual = that.write(string, encoding)
+
+ if (actual !== length) {
+ // Writing a hex string, for example, that contains invalid characters will
+ // cause everything after the first invalid character to be ignored. (e.g.
+ // 'abxxcd' will be treated as 'ab')
+ that = that.slice(0, actual)
+ }
+
+ return that
+ }
+
+ function fromArrayLike (that, array) {
+ var length = array.length < 0 ? 0 : checked(array.length) | 0
+ that = createBuffer(that, length)
+ for (var i = 0; i < length; i += 1) {
+ that[i] = array[i] & 255
+ }
+ return that
+ }
+
+ function fromArrayBuffer (that, array, byteOffset, length) {
+ array.byteLength // this throws if `array` is not a valid ArrayBuffer
+
+ if (byteOffset < 0 || array.byteLength < byteOffset) {
+ throw new RangeError('\'offset\' is out of bounds')
+ }
+
+ if (array.byteLength < byteOffset + (length || 0)) {
+ throw new RangeError('\'length\' is out of bounds')
+ }
+
+ if (byteOffset === undefined && length === undefined) {
+ array = new Uint8Array(array)
+ } else if (length === undefined) {
+ array = new Uint8Array(array, byteOffset)
+ } else {
+ array = new Uint8Array(array, byteOffset, length)
+ }
+
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ // Return an augmented `Uint8Array` instance, for best performance
+ that = array
+ that.__proto__ = Buffer.prototype
+ } else {
+ // Fallback: Return an object instance of the Buffer class
+ that = fromArrayLike(that, array)
+ }
+ return that
+ }
+
+ function fromObject (that, obj) {
+ if (Buffer.isBuffer(obj)) {
+ var len = checked(obj.length) | 0
+ that = createBuffer(that, len)
+
+ if (that.length === 0) {
+ return that
+ }
+
+ obj.copy(that, 0, 0, len)
+ return that
+ }
+
+ if (obj) {
+ if ((typeof ArrayBuffer !== 'undefined' &&
+ obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
+ if (typeof obj.length !== 'number' || isnan(obj.length)) {
+ return createBuffer(that, 0)
+ }
+ return fromArrayLike(that, obj)
+ }
+
+ if (obj.type === 'Buffer' && isArray(obj.data)) {
+ return fromArrayLike(that, obj.data)
+ }
+ }
+
+ throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
+ }
+
+ function checked (length) {
+ // Note: cannot use `length < kMaxLength()` here because that fails when
+ // length is NaN (which is otherwise coerced to zero.)
+ if (length >= kMaxLength()) {
+ throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
+ 'size: 0x' + kMaxLength().toString(16) + ' bytes')
+ }
+ return length | 0
+ }
+
+ function SlowBuffer (length) {
+ if (+length != length) { // eslint-disable-line eqeqeq
+ length = 0
+ }
+ return Buffer.alloc(+length)
+ }
+
+ Buffer.isBuffer = function isBuffer (b) {
+ return !!(b != null && b._isBuffer)
+ }
+
+ Buffer.compare = function compare (a, b) {
+ if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
+ throw new TypeError('Arguments must be Buffers')
+ }
+
+ if (a === b) return 0
+
+ var x = a.length
+ var y = b.length
+
+ for (var i = 0, len = Math.min(x, y); i < len; ++i) {
+ if (a[i] !== b[i]) {
+ x = a[i]
+ y = b[i]
+ break
+ }
+ }
+
+ if (x < y) return -1
+ if (y < x) return 1
+ return 0
+ }
+
+ Buffer.isEncoding = function isEncoding (encoding) {
+ switch (String(encoding).toLowerCase()) {
+ case 'hex':
+ case 'utf8':
+ case 'utf-8':
+ case 'ascii':
+ case 'latin1':
+ case 'binary':
+ case 'base64':
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return true
+ default:
+ return false
+ }
+ }
+
+ Buffer.concat = function concat (list, length) {
+ if (!isArray(list)) {
+ throw new TypeError('"list" argument must be an Array of Buffers')
+ }
+
+ if (list.length === 0) {
+ return Buffer.alloc(0)
+ }
+
+ var i
+ if (length === undefined) {
+ length = 0
+ for (i = 0; i < list.length; ++i) {
+ length += list[i].length
+ }
+ }
+
+ var buffer = Buffer.allocUnsafe(length)
+ var pos = 0
+ for (i = 0; i < list.length; ++i) {
+ var buf = list[i]
+ if (!Buffer.isBuffer(buf)) {
+ throw new TypeError('"list" argument must be an Array of Buffers')
+ }
+ buf.copy(buffer, pos)
+ pos += buf.length
+ }
+ return buffer
+ }
+
+ function byteLength (string, encoding) {
+ if (Buffer.isBuffer(string)) {
+ return string.length
+ }
+ if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
+ (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
+ return string.byteLength
+ }
+ if (typeof string !== 'string') {
+ string = '' + string
+ }
+
+ var len = string.length
+ if (len === 0) return 0
+
+ // Use a for loop to avoid recursion
+ var loweredCase = false
+ for (;;) {
+ switch (encoding) {
+ case 'ascii':
+ case 'latin1':
+ case 'binary':
+ return len
+ case 'utf8':
+ case 'utf-8':
+ case undefined:
+ return utf8ToBytes(string).length
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return len * 2
+ case 'hex':
+ return len >>> 1
+ case 'base64':
+ return base64ToBytes(string).length
+ default:
+ if (loweredCase) return utf8ToBytes(string).length // assume utf8
+ encoding = ('' + encoding).toLowerCase()
+ loweredCase = true
+ }
+ }
+ }
+ Buffer.byteLength = byteLength
+
+ function slowToString (encoding, start, end) {
+ var loweredCase = false
+
+ // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
+ // property of a typed array.
+
+ // This behaves neither like String nor Uint8Array in that we set start/end
+ // to their upper/lower bounds if the value passed is out of range.
+ // undefined is handled specially as per ECMA-262 6th Edition,
+ // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
+ if (start === undefined || start < 0) {
+ start = 0
+ }
+ // Return early if start > this.length. Done here to prevent potential uint32
+ // coercion fail below.
+ if (start > this.length) {
+ return ''
+ }
+
+ if (end === undefined || end > this.length) {
+ end = this.length
+ }
+
+ if (end <= 0) {
+ return ''
+ }
+
+ // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
+ end >>>= 0
+ start >>>= 0
+
+ if (end <= start) {
+ return ''
+ }
+
+ if (!encoding) encoding = 'utf8'
+
+ while (true) {
+ switch (encoding) {
+ case 'hex':
+ return hexSlice(this, start, end)
+
+ case 'utf8':
+ case 'utf-8':
+ return utf8Slice(this, start, end)
+
+ case 'ascii':
+ return asciiSlice(this, start, end)
+
+ case 'latin1':
+ case 'binary':
+ return latin1Slice(this, start, end)
+
+ case 'base64':
+ return base64Slice(this, start, end)
+
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return utf16leSlice(this, start, end)
+
+ default:
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
+ encoding = (encoding + '').toLowerCase()
+ loweredCase = true
+ }
+ }
+ }
+
+ // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
+ // Buffer instances.
+ Buffer.prototype._isBuffer = true
+
+ function swap (b, n, m) {
+ var i = b[n]
+ b[n] = b[m]
+ b[m] = i
+ }
+
+ Buffer.prototype.swap16 = function swap16 () {
+ var len = this.length
+ if (len % 2 !== 0) {
+ throw new RangeError('Buffer size must be a multiple of 16-bits')
+ }
+ for (var i = 0; i < len; i += 2) {
+ swap(this, i, i + 1)
+ }
+ return this
+ }
+
+ Buffer.prototype.swap32 = function swap32 () {
+ var len = this.length
+ if (len % 4 !== 0) {
+ throw new RangeError('Buffer size must be a multiple of 32-bits')
+ }
+ for (var i = 0; i < len; i += 4) {
+ swap(this, i, i + 3)
+ swap(this, i + 1, i + 2)
+ }
+ return this
+ }
+
+ Buffer.prototype.swap64 = function swap64 () {
+ var len = this.length
+ if (len % 8 !== 0) {
+ throw new RangeError('Buffer size must be a multiple of 64-bits')
+ }
+ for (var i = 0; i < len; i += 8) {
+ swap(this, i, i + 7)
+ swap(this, i + 1, i + 6)
+ swap(this, i + 2, i + 5)
+ swap(this, i + 3, i + 4)
+ }
+ return this
+ }
+
+ Buffer.prototype.toString = function toString () {
+ var length = this.length | 0
+ if (length === 0) return ''
+ if (arguments.length === 0) return utf8Slice(this, 0, length)
+ return slowToString.apply(this, arguments)
+ }
+
+ Buffer.prototype.equals = function equals (b) {
+ if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
+ if (this === b) return true
+ return Buffer.compare(this, b) === 0
+ }
+
+ Buffer.prototype.inspect = function inspect () {
+ var str = ''
+ var max = exports.INSPECT_MAX_BYTES
+ if (this.length > 0) {
+ str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
+ if (this.length > max) str += ' ... '
+ }
+ return '<Buffer ' + str + '>'
+ }
+
+ Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
+ if (!Buffer.isBuffer(target)) {
+ throw new TypeError('Argument must be a Buffer')
+ }
+
+ if (start === undefined) {
+ start = 0
+ }
+ if (end === undefined) {
+ end = target ? target.length : 0
+ }
+ if (thisStart === undefined) {
+ thisStart = 0
+ }
+ if (thisEnd === undefined) {
+ thisEnd = this.length
+ }
+
+ if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
+ throw new RangeError('out of range index')
+ }
+
+ if (thisStart >= thisEnd && start >= end) {
+ return 0
+ }
+ if (thisStart >= thisEnd) {
+ return -1
+ }
+ if (start >= end) {
+ return 1
+ }
+
+ start >>>= 0
+ end >>>= 0
+ thisStart >>>= 0
+ thisEnd >>>= 0
+
+ if (this === target) return 0
+
+ var x = thisEnd - thisStart
+ var y = end - start
+ var len = Math.min(x, y)
+
+ var thisCopy = this.slice(thisStart, thisEnd)
+ var targetCopy = target.slice(start, end)
+
+ for (var i = 0; i < len; ++i) {
+ if (thisCopy[i] !== targetCopy[i]) {
+ x = thisCopy[i]
+ y = targetCopy[i]
+ break
+ }
+ }
+
+ if (x < y) return -1
+ if (y < x) return 1
+ return 0
+ }
+
+ // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
+ // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
+ //
+ // Arguments:
+ // - buffer - a Buffer to search
+ // - val - a string, Buffer, or number
+ // - byteOffset - an index into `buffer`; will be clamped to an int32
+ // - encoding - an optional encoding, relevant is val is a string
+ // - dir - true for indexOf, false for lastIndexOf
+ function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
+ // Empty buffer means no match
+ if (buffer.length === 0) return -1
+
+ // Normalize byteOffset
+ if (typeof byteOffset === 'string') {
+ encoding = byteOffset
+ byteOffset = 0
+ } else if (byteOffset > 0x7fffffff) {
+ byteOffset = 0x7fffffff
+ } else if (byteOffset < -0x80000000) {
+ byteOffset = -0x80000000
+ }
+ byteOffset = +byteOffset // Coerce to Number.
+ if (isNaN(byteOffset)) {
+ // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
+ byteOffset = dir ? 0 : (buffer.length - 1)
+ }
+
+ // Normalize byteOffset: negative offsets start from the end of the buffer
+ if (byteOffset < 0) byteOffset = buffer.length + byteOffset
+ if (byteOffset >= buffer.length) {
+ if (dir) return -1
+ else byteOffset = buffer.length - 1
+ } else if (byteOffset < 0) {
+ if (dir) byteOffset = 0
+ else return -1
+ }
+
+ // Normalize val
+ if (typeof val === 'string') {
+ val = Buffer.from(val, encoding)
+ }
+
+ // Finally, search either indexOf (if dir is true) or lastIndexOf
+ if (Buffer.isBuffer(val)) {
+ // Special case: looking for empty string/buffer always fails
+ if (val.length === 0) {
+ return -1
+ }
+ return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
+ } else if (typeof val === 'number') {
+ val = val & 0xFF // Search for a byte value [0-255]
+ if (Buffer.TYPED_ARRAY_SUPPORT &&
+ typeof Uint8Array.prototype.indexOf === 'function') {
+ if (dir) {
+ return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
+ } else {
+ return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
+ }
+ }
+ return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
+ }
+
+ throw new TypeError('val must be string, number or Buffer')
+ }
+
+ function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
+ var indexSize = 1
+ var arrLength = arr.length
+ var valLength = val.length
+
+ if (encoding !== undefined) {
+ encoding = String(encoding).toLowerCase()
+ if (encoding === 'ucs2' || encoding === 'ucs-2' ||
+ encoding === 'utf16le' || encoding === 'utf-16le') {
+ if (arr.length < 2 || val.length < 2) {
+ return -1
+ }
+ indexSize = 2
+ arrLength /= 2
+ valLength /= 2
+ byteOffset /= 2
+ }
+ }
+
+ function read (buf, i) {
+ if (indexSize === 1) {
+ return buf[i]
+ } else {
+ return buf.readUInt16BE(i * indexSize)
+ }
+ }
+
+ var i
+ if (dir) {
+ var foundIndex = -1
+ for (i = byteOffset; i < arrLength; i++) {
+ if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
+ if (foundIndex === -1) foundIndex = i
+ if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
+ } else {
+ if (foundIndex !== -1) i -= i - foundIndex
+ foundIndex = -1
+ }
+ }
+ } else {
+ if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
+ for (i = byteOffset; i >= 0; i--) {
+ var found = true
+ for (var j = 0; j < valLength; j++) {
+ if (read(arr, i + j) !== read(val, j)) {
+ found = false
+ break
+ }
+ }
+ if (found) return i
+ }
+ }
+
+ return -1
+ }
+
+ Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
+ return this.indexOf(val, byteOffset, encoding) !== -1
+ }
+
+ Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
+ }
+
+ Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
+ }
+
+ function hexWrite (buf, string, offset, length) {
+ offset = Number(offset) || 0
+ var remaining = buf.length - offset
+ if (!length) {
+ length = remaining
+ } else {
+ length = Number(length)
+ if (length > remaining) {
+ length = remaining
+ }
+ }
+
+ // must be an even number of digits
+ var strLen = string.length
+ if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
+
+ if (length > strLen / 2) {
+ length = strLen / 2
+ }
+ for (var i = 0; i < length; ++i) {
+ var parsed = parseInt(string.substr(i * 2, 2), 16)
+ if (isNaN(parsed)) return i
+ buf[offset + i] = parsed
+ }
+ return i
+ }
+
+ function utf8Write (buf, string, offset, length) {
+ return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
+ }
+
+ function asciiWrite (buf, string, offset, length) {
+ return blitBuffer(asciiToBytes(string), buf, offset, length)
+ }
+
+ function latin1Write (buf, string, offset, length) {
+ return asciiWrite(buf, string, offset, length)
+ }
+
+ function base64Write (buf, string, offset, length) {
+ return blitBuffer(base64ToBytes(string), buf, offset, length)
+ }
+
+ function ucs2Write (buf, string, offset, length) {
+ return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
+ }
+
+ Buffer.prototype.write = function write (string, offset, length, encoding) {
+ // Buffer#write(string)
+ if (offset === undefined) {
+ encoding = 'utf8'
+ length = this.length
+ offset = 0
+ // Buffer#write(string, encoding)
+ } else if (length === undefined && typeof offset === 'string') {
+ encoding = offset
+ length = this.length
+ offset = 0
+ // Buffer#write(string, offset[, length][, encoding])
+ } else if (isFinite(offset)) {
+ offset = offset | 0
+ if (isFinite(length)) {
+ length = length | 0
+ if (encoding === undefined) encoding = 'utf8'
+ } else {
+ encoding = length
+ length = undefined
+ }
+ // legacy write(string, encoding, offset, length) - remove in v0.13
+ } else {
+ throw new Error(
+ 'Buffer.write(string, encoding, offset[, length]) is no longer supported'
+ )
+ }
+
+ var remaining = this.length - offset
+ if (length === undefined || length > remaining) length = remaining
+
+ if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
+ throw new RangeError('Attempt to write outside buffer bounds')
+ }
+
+ if (!encoding) encoding = 'utf8'
+
+ var loweredCase = false
+ for (;;) {
+ switch (encoding) {
+ case 'hex':
+ return hexWrite(this, string, offset, length)
+
+ case 'utf8':
+ case 'utf-8':
+ return utf8Write(this, string, offset, length)
+
+ case 'ascii':
+ return asciiWrite(this, string, offset, length)
+
+ case 'latin1':
+ case 'binary':
+ return latin1Write(this, string, offset, length)
+
+ case 'base64':
+ // Warning: maxLength not taken into account in base64Write
+ return base64Write(this, string, offset, length)
+
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return ucs2Write(this, string, offset, length)
+
+ default:
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
+ encoding = ('' + encoding).toLowerCase()
+ loweredCase = true
+ }
+ }
+ }
+
+ Buffer.prototype.toJSON = function toJSON () {
+ return {
+ type: 'Buffer',
+ data: Array.prototype.slice.call(this._arr || this, 0)
+ }
+ }
+
+ function base64Slice (buf, start, end) {
+ if (start === 0 && end === buf.length) {
+ return base64.fromByteArray(buf)
+ } else {
+ return base64.fromByteArray(buf.slice(start, end))
+ }
+ }
+
+ function utf8Slice (buf, start, end) {
+ end = Math.min(buf.length, end)
+ var res = []
+
+ var i = start
+ while (i < end) {
+ var firstByte = buf[i]
+ var codePoint = null
+ var bytesPerSequence = (firstByte > 0xEF) ? 4
+ : (firstByte > 0xDF) ? 3
+ : (firstByte > 0xBF) ? 2
+ : 1
+
+ if (i + bytesPerSequence <= end) {
+ var secondByte, thirdByte, fourthByte, tempCodePoint
+
+ switch (bytesPerSequence) {
+ case 1:
+ if (firstByte < 0x80) {
+ codePoint = firstByte
+ }
+ break
+ case 2:
+ secondByte = buf[i + 1]
+ if ((secondByte & 0xC0) === 0x80) {
+ tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
+ if (tempCodePoint > 0x7F) {
+ codePoint = tempCodePoint
+ }
+ }
+ break
+ case 3:
+ secondByte = buf[i + 1]
+ thirdByte = buf[i + 2]
+ if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
+ tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
+ if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
+ codePoint = tempCodePoint
+ }
+ }
+ break
+ case 4:
+ secondByte = buf[i + 1]
+ thirdByte = buf[i + 2]
+ fourthByte = buf[i + 3]
+ if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
+ tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
+ if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
+ codePoint = tempCodePoint
+ }
+ }
+ }
+ }
+
+ if (codePoint === null) {
+ // we did not generate a valid codePoint so insert a
+ // replacement char (U+FFFD) and advance only 1 byte
+ codePoint = 0xFFFD
+ bytesPerSequence = 1
+ } else if (codePoint > 0xFFFF) {
+ // encode to utf16 (surrogate pair dance)
+ codePoint -= 0x10000
+ res.push(codePoint >>> 10 & 0x3FF | 0xD800)
+ codePoint = 0xDC00 | codePoint & 0x3FF
+ }
+
+ res.push(codePoint)
+ i += bytesPerSequence
+ }
+
+ return decodeCodePointsArray(res)
+ }
+
+ // Based on http://stackoverflow.com/a/22747272/680742, the browser with
+ // the lowest limit is Chrome, with 0x10000 args.
+ // We go 1 magnitude less, for safety
+ var MAX_ARGUMENTS_LENGTH = 0x1000
+
+ function decodeCodePointsArray (codePoints) {
+ var len = codePoints.length
+ if (len <= MAX_ARGUMENTS_LENGTH) {
+ return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
+ }
+
+ // Decode in chunks to avoid "call stack size exceeded".
+ var res = ''
+ var i = 0
+ while (i < len) {
+ res += String.fromCharCode.apply(
+ String,
+ codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
+ )
+ }
+ return res
+ }
+
+ function asciiSlice (buf, start, end) {
+ var ret = ''
+ end = Math.min(buf.length, end)
+
+ for (var i = start; i < end; ++i) {
+ ret += String.fromCharCode(buf[i] & 0x7F)
+ }
+ return ret
+ }
+
+ function latin1Slice (buf, start, end) {
+ var ret = ''
+ end = Math.min(buf.length, end)
+
+ for (var i = start; i < end; ++i) {
+ ret += String.fromCharCode(buf[i])
+ }
+ return ret
+ }
+
+ function hexSlice (buf, start, end) {
+ var len = buf.length
+
+ if (!start || start < 0) start = 0
+ if (!end || end < 0 || end > len) end = len
+
+ var out = ''
+ for (var i = start; i < end; ++i) {
+ out += toHex(buf[i])
+ }
+ return out
+ }
+
+ function utf16leSlice (buf, start, end) {
+ var bytes = buf.slice(start, end)
+ var res = ''
+ for (var i = 0; i < bytes.length; i += 2) {
+ res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
+ }
+ return res
+ }
+
+ Buffer.prototype.slice = function slice (start, end) {
+ var len = this.length
+ start = ~~start
+ end = end === undefined ? len : ~~end
+
+ if (start < 0) {
+ start += len
+ if (start < 0) start = 0
+ } else if (start > len) {
+ start = len
+ }
+
+ if (end < 0) {
+ end += len
+ if (end < 0) end = 0
+ } else if (end > len) {
+ end = len
+ }
+
+ if (end < start) end = start
+
+ var newBuf
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ newBuf = this.subarray(start, end)
+ newBuf.__proto__ = Buffer.prototype
+ } else {
+ var sliceLen = end - start
+ newBuf = new Buffer(sliceLen, undefined)
+ for (var i = 0; i < sliceLen; ++i) {
+ newBuf[i] = this[i + start]
+ }
+ }
+
+ return newBuf
+ }
+
+ /*
+ * Need to make sure that buffer isn't trying to write out of bounds.
+ */
+ function checkOffset (offset, ext, length) {
+ if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
+ if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
+ }
+
+ Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+ var val = this[offset]
+ var mul = 1
+ var i = 0
+ while (++i < byteLength && (mul *= 0x100)) {
+ val += this[offset + i] * mul
+ }
+
+ return val
+ }
+
+ Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) {
+ checkOffset(offset, byteLength, this.length)
+ }
+
+ var val = this[offset + --byteLength]
+ var mul = 1
+ while (byteLength > 0 && (mul *= 0x100)) {
+ val += this[offset + --byteLength] * mul
+ }
+
+ return val
+ }
+
+ Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 1, this.length)
+ return this[offset]
+ }
+
+ Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ return this[offset] | (this[offset + 1] << 8)
+ }
+
+ Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ return (this[offset] << 8) | this[offset + 1]
+ }
+
+ Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+
+ return ((this[offset]) |
+ (this[offset + 1] << 8) |
+ (this[offset + 2] << 16)) +
+ (this[offset + 3] * 0x1000000)
+ }
+
+ Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+
+ return (this[offset] * 0x1000000) +
+ ((this[offset + 1] << 16) |
+ (this[offset + 2] << 8) |
+ this[offset + 3])
+ }
+
+ Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+ var val = this[offset]
+ var mul = 1
+ var i = 0
+ while (++i < byteLength && (mul *= 0x100)) {
+ val += this[offset + i] * mul
+ }
+ mul *= 0x80
+
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength)
+
+ return val
+ }
+
+ Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+ var i = byteLength
+ var mul = 1
+ var val = this[offset + --i]
+ while (i > 0 && (mul *= 0x100)) {
+ val += this[offset + --i] * mul
+ }
+ mul *= 0x80
+
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength)
+
+ return val
+ }
+
+ Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 1, this.length)
+ if (!(this[offset] & 0x80)) return (this[offset])
+ return ((0xff - this[offset] + 1) * -1)
+ }
+
+ Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ var val = this[offset] | (this[offset + 1] << 8)
+ return (val & 0x8000) ? val | 0xFFFF0000 : val
+ }
+
+ Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ var val = this[offset + 1] | (this[offset] << 8)
+ return (val & 0x8000) ? val | 0xFFFF0000 : val
+ }
+
+ Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+
+ return (this[offset]) |
+ (this[offset + 1] << 8) |
+ (this[offset + 2] << 16) |
+ (this[offset + 3] << 24)
+ }
+
+ Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+
+ return (this[offset] << 24) |
+ (this[offset + 1] << 16) |
+ (this[offset + 2] << 8) |
+ (this[offset + 3])
+ }
+
+ Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+ return ieee754.read(this, offset, true, 23, 4)
+ }
+
+ Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+ return ieee754.read(this, offset, false, 23, 4)
+ }
+
+ Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 8, this.length)
+ return ieee754.read(this, offset, true, 52, 8)
+ }
+
+ Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 8, this.length)
+ return ieee754.read(this, offset, false, 52, 8)
+ }
+
+ function checkInt (buf, value, offset, ext, max, min) {
+ if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
+ if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
+ if (offset + ext > buf.length) throw new RangeError('Index out of range')
+ }
+
+ Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) {
+ var maxBytes = Math.pow(2, 8 * byteLength) - 1
+ checkInt(this, value, offset, byteLength, maxBytes, 0)
+ }
+
+ var mul = 1
+ var i = 0
+ this[offset] = value & 0xFF
+ while (++i < byteLength && (mul *= 0x100)) {
+ this[offset + i] = (value / mul) & 0xFF
+ }
+
+ return offset + byteLength
+ }
+
+ Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) {
+ var maxBytes = Math.pow(2, 8 * byteLength) - 1
+ checkInt(this, value, offset, byteLength, maxBytes, 0)
+ }
+
+ var i = byteLength - 1
+ var mul = 1
+ this[offset + i] = value & 0xFF
+ while (--i >= 0 && (mul *= 0x100)) {
+ this[offset + i] = (value / mul) & 0xFF
+ }
+
+ return offset + byteLength
+ }
+
+ Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
+ if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
+ this[offset] = (value & 0xff)
+ return offset + 1
+ }
+
+ function objectWriteUInt16 (buf, value, offset, littleEndian) {
+ if (value < 0) value = 0xffff + value + 1
+ for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
+ buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
+ (littleEndian ? i : 1 - i) * 8
+ }
+ }
+
+ Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = (value & 0xff)
+ this[offset + 1] = (value >>> 8)
+ } else {
+ objectWriteUInt16(this, value, offset, true)
+ }
+ return offset + 2
+ }
+
+ Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = (value >>> 8)
+ this[offset + 1] = (value & 0xff)
+ } else {
+ objectWriteUInt16(this, value, offset, false)
+ }
+ return offset + 2
+ }
+
+ function objectWriteUInt32 (buf, value, offset, littleEndian) {
+ if (value < 0) value = 0xffffffff + value + 1
+ for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
+ buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
+ }
+ }
+
+ Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset + 3] = (value >>> 24)
+ this[offset + 2] = (value >>> 16)
+ this[offset + 1] = (value >>> 8)
+ this[offset] = (value & 0xff)
+ } else {
+ objectWriteUInt32(this, value, offset, true)
+ }
+ return offset + 4
+ }
+
+ Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = (value >>> 24)
+ this[offset + 1] = (value >>> 16)
+ this[offset + 2] = (value >>> 8)
+ this[offset + 3] = (value & 0xff)
+ } else {
+ objectWriteUInt32(this, value, offset, false)
+ }
+ return offset + 4
+ }
+
+ Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) {
+ var limit = Math.pow(2, 8 * byteLength - 1)
+
+ checkInt(this, value, offset, byteLength, limit - 1, -limit)
+ }
+
+ var i = 0
+ var mul = 1
+ var sub = 0
+ this[offset] = value & 0xFF
+ while (++i < byteLength && (mul *= 0x100)) {
+ if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
+ sub = 1
+ }
+ this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
+ }
+
+ return offset + byteLength
+ }
+
+ Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) {
+ var limit = Math.pow(2, 8 * byteLength - 1)
+
+ checkInt(this, value, offset, byteLength, limit - 1, -limit)
+ }
+
+ var i = byteLength - 1
+ var mul = 1
+ var sub = 0
+ this[offset + i] = value & 0xFF
+ while (--i >= 0 && (mul *= 0x100)) {
+ if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
+ sub = 1
+ }
+ this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
+ }
+
+ return offset + byteLength
+ }
+
+ Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
+ if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
+ if (value < 0) value = 0xff + value + 1
+ this[offset] = (value & 0xff)
+ return offset + 1
+ }
+
+ Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = (value & 0xff)
+ this[offset + 1] = (value >>> 8)
+ } else {
+ objectWriteUInt16(this, value, offset, true)
+ }
+ return offset + 2
+ }
+
+ Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = (value >>> 8)
+ this[offset + 1] = (value & 0xff)
+ } else {
+ objectWriteUInt16(this, value, offset, false)
+ }
+ return offset + 2
+ }
+
+ Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = (value & 0xff)
+ this[offset + 1] = (value >>> 8)
+ this[offset + 2] = (value >>> 16)
+ this[offset + 3] = (value >>> 24)
+ } else {
+ objectWriteUInt32(this, value, offset, true)
+ }
+ return offset + 4
+ }
+
+ Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
+ if (value < 0) value = 0xffffffff + value + 1
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = (value >>> 24)
+ this[offset + 1] = (value >>> 16)
+ this[offset + 2] = (value >>> 8)
+ this[offset + 3] = (value & 0xff)
+ } else {
+ objectWriteUInt32(this, value, offset, false)
+ }
+ return offset + 4
+ }
+
+ function checkIEEE754 (buf, value, offset, ext, max, min) {
+ if (offset + ext > buf.length) throw new RangeError('Index out of range')
+ if (offset < 0) throw new RangeError('Index out of range')
+ }
+
+ function writeFloat (buf, value, offset, littleEndian, noAssert) {
+ if (!noAssert) {
+ checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
+ }
+ ieee754.write(buf, value, offset, littleEndian, 23, 4)
+ return offset + 4
+ }
+
+ Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
+ return writeFloat(this, value, offset, true, noAssert)
+ }
+
+ Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
+ return writeFloat(this, value, offset, false, noAssert)
+ }
+
+ function writeDouble (buf, value, offset, littleEndian, noAssert) {
+ if (!noAssert) {
+ checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
+ }
+ ieee754.write(buf, value, offset, littleEndian, 52, 8)
+ return offset + 8
+ }
+
+ Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
+ return writeDouble(this, value, offset, true, noAssert)
+ }
+
+ Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
+ return writeDouble(this, value, offset, false, noAssert)
+ }
+
+ // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
+ Buffer.prototype.copy = function copy (target, targetStart, start, end) {
+ if (!start) start = 0
+ if (!end && end !== 0) end = this.length
+ if (targetStart >= target.length) targetStart = target.length
+ if (!targetStart) targetStart = 0
+ if (end > 0 && end < start) end = start
+
+ // Copy 0 bytes; we're done
+ if (end === start) return 0
+ if (target.length === 0 || this.length === 0) return 0
+
+ // Fatal error conditions
+ if (targetStart < 0) {
+ throw new RangeError('targetStart out of bounds')
+ }
+ if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
+ if (end < 0) throw new RangeError('sourceEnd out of bounds')
+
+ // Are we oob?
+ if (end > this.length) end = this.length
+ if (target.length - targetStart < end - start) {
+ end = target.length - targetStart + start
+ }
+
+ var len = end - start
+ var i
+
+ if (this === target && start < targetStart && targetStart < end) {
+ // descending copy from end
+ for (i = len - 1; i >= 0; --i) {
+ target[i + targetStart] = this[i + start]
+ }
+ } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
+ // ascending copy from start
+ for (i = 0; i < len; ++i) {
+ target[i + targetStart] = this[i + start]
+ }
+ } else {
+ Uint8Array.prototype.set.call(
+ target,
+ this.subarray(start, start + len),
+ targetStart
+ )
+ }
+
+ return len
+ }
+
+ // Usage:
+ // buffer.fill(number[, offset[, end]])
+ // buffer.fill(buffer[, offset[, end]])
+ // buffer.fill(string[, offset[, end]][, encoding])
+ Buffer.prototype.fill = function fill (val, start, end, encoding) {
+ // Handle string cases:
+ if (typeof val === 'string') {
+ if (typeof start === 'string') {
+ encoding = start
+ start = 0
+ end = this.length
+ } else if (typeof end === 'string') {
+ encoding = end
+ end = this.length
+ }
+ if (val.length === 1) {
+ var code = val.charCodeAt(0)
+ if (code < 256) {
+ val = code
+ }
+ }
+ if (encoding !== undefined && typeof encoding !== 'string') {
+ throw new TypeError('encoding must be a string')
+ }
+ if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
+ throw new TypeError('Unknown encoding: ' + encoding)
+ }
+ } else if (typeof val === 'number') {
+ val = val & 255
+ }
+
+ // Invalid ranges are not set to a default, so can range check early.
+ if (start < 0 || this.length < start || this.length < end) {
+ throw new RangeError('Out of range index')
+ }
+
+ if (end <= start) {
+ return this
+ }
+
+ start = start >>> 0
+ end = end === undefined ? this.length : end >>> 0
+
+ if (!val) val = 0
+
+ var i
+ if (typeof val === 'number') {
+ for (i = start; i < end; ++i) {
+ this[i] = val
+ }
+ } else {
+ var bytes = Buffer.isBuffer(val)
+ ? val
+ : utf8ToBytes(new Buffer(val, encoding).toString())
+ var len = bytes.length
+ for (i = 0; i < end - start; ++i) {
+ this[i + start] = bytes[i % len]
+ }
+ }
+
+ return this
+ }
+
+ // HELPER FUNCTIONS
+ // ================
+
+ var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
+
+ function base64clean (str) {
+ // Node strips out invalid characters like \n and \t from the string, base64-js does not
+ str = stringtrim(str).replace(INVALID_BASE64_RE, '')
+ // Node converts strings with length < 2 to ''
+ if (str.length < 2) return ''
+ // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
+ while (str.length % 4 !== 0) {
+ str = str + '='
+ }
+ return str
+ }
+
+ function stringtrim (str) {
+ if (str.trim) return str.trim()
+ return str.replace(/^\s+|\s+$/g, '')
+ }
+
+ function toHex (n) {
+ if (n < 16) return '0' + n.toString(16)
+ return n.toString(16)
+ }
+
+ function utf8ToBytes (string, units) {
+ units = units || Infinity
+ var codePoint
+ var length = string.length
+ var leadSurrogate = null
+ var bytes = []
+
+ for (var i = 0; i < length; ++i) {
+ codePoint = string.charCodeAt(i)
+
+ // is surrogate component
+ if (codePoint > 0xD7FF && codePoint < 0xE000) {
+ // last char was a lead
+ if (!leadSurrogate) {
+ // no lead yet
+ if (codePoint > 0xDBFF) {
+ // unexpected trail
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+ continue
+ } else if (i + 1 === length) {
+ // unpaired lead
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+ continue
+ }
+
+ // valid lead
+ leadSurrogate = codePoint
+
+ continue
+ }
+
+ // 2 leads in a row
+ if (codePoint < 0xDC00) {
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+ leadSurrogate = codePoint
+ continue
+ }
+
+ // valid surrogate pair
+ codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
+ } else if (leadSurrogate) {
+ // valid bmp char, but last char was a lead
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+ }
+
+ leadSurrogate = null
+
+ // encode utf8
+ if (codePoint < 0x80) {
+ if ((units -= 1) < 0) break
+ bytes.push(codePoint)
+ } else if (codePoint < 0x800) {
+ if ((units -= 2) < 0) break
+ bytes.push(
+ codePoint >> 0x6 | 0xC0,
+ codePoint & 0x3F | 0x80
+ )
+ } else if (codePoint < 0x10000) {
+ if ((units -= 3) < 0) break
+ bytes.push(
+ codePoint >> 0xC | 0xE0,
+ codePoint >> 0x6 & 0x3F | 0x80,
+ codePoint & 0x3F | 0x80
+ )
+ } else if (codePoint < 0x110000) {
+ if ((units -= 4) < 0) break
+ bytes.push(
+ codePoint >> 0x12 | 0xF0,
+ codePoint >> 0xC & 0x3F | 0x80,
+ codePoint >> 0x6 & 0x3F | 0x80,
+ codePoint & 0x3F | 0x80
+ )
+ } else {
+ throw new Error('Invalid code point')
+ }
+ }
+
+ return bytes
+ }
+
+ function asciiToBytes (str) {
+ var byteArray = []
+ for (var i = 0; i < str.length; ++i) {
+ // Node's code seems to be doing this and not & 0x7F..
+ byteArray.push(str.charCodeAt(i) & 0xFF)
+ }
+ return byteArray
+ }
+
+ function utf16leToBytes (str, units) {
+ var c, hi, lo
+ var byteArray = []
+ for (var i = 0; i < str.length; ++i) {
+ if ((units -= 2) < 0) break
+
+ c = str.charCodeAt(i)
+ hi = c >> 8
+ lo = c % 256
+ byteArray.push(lo)
+ byteArray.push(hi)
+ }
+
+ return byteArray
+ }
+
+ function base64ToBytes (str) {
+ return base64.toByteArray(base64clean(str))
+ }
+
+ function blitBuffer (src, dst, offset, length) {
+ for (var i = 0; i < length; ++i) {
+ if ((i + offset >= dst.length) || (i >= src.length)) break
+ dst[i + offset] = src[i]
+ }
+ return i
+ }
+
+ function isnan (val) {
+ return val !== val // eslint-disable-line no-self-compare
+ }
+
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(300).Buffer, (function() { return this; }())))
+
+/***/ },
+/* 301 */
+/***/ function(module, exports) {
+
+ 'use strict'
+
+ exports.byteLength = byteLength
+ exports.toByteArray = toByteArray
+ exports.fromByteArray = fromByteArray
+
+ var lookup = []
+ var revLookup = []
+ var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
+
+ var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
+ for (var i = 0, len = code.length; i < len; ++i) {
+ lookup[i] = code[i]
+ revLookup[code.charCodeAt(i)] = i
+ }
+
+ revLookup['-'.charCodeAt(0)] = 62
+ revLookup['_'.charCodeAt(0)] = 63
+
+ function placeHoldersCount (b64) {
+ var len = b64.length
+ if (len % 4 > 0) {
+ throw new Error('Invalid string. Length must be a multiple of 4')
+ }
+
+ // the number of equal signs (place holders)
+ // if there are two placeholders, than the two characters before it
+ // represent one byte
+ // if there is only one, then the three characters before it represent 2 bytes
+ // this is just a cheap hack to not do indexOf twice
+ return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0
+ }
+
+ function byteLength (b64) {
+ // base64 is 4/3 + up to two characters of the original data
+ return b64.length * 3 / 4 - placeHoldersCount(b64)
+ }
+
+ function toByteArray (b64) {
+ var i, j, l, tmp, placeHolders, arr
+ var len = b64.length
+ placeHolders = placeHoldersCount(b64)
+
+ arr = new Arr(len * 3 / 4 - placeHolders)
+
+ // if there are placeholders, only get up to the last complete 4 chars
+ l = placeHolders > 0 ? len - 4 : len
+
+ var L = 0
+
+ for (i = 0, j = 0; i < l; i += 4, j += 3) {
+ tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]
+ arr[L++] = (tmp >> 16) & 0xFF
+ arr[L++] = (tmp >> 8) & 0xFF
+ arr[L++] = tmp & 0xFF
+ }
+
+ if (placeHolders === 2) {
+ tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)
+ arr[L++] = tmp & 0xFF
+ } else if (placeHolders === 1) {
+ tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)
+ arr[L++] = (tmp >> 8) & 0xFF
+ arr[L++] = tmp & 0xFF
+ }
+
+ return arr
+ }
+
+ function tripletToBase64 (num) {
+ return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]
+ }
+
+ function encodeChunk (uint8, start, end) {
+ var tmp
+ var output = []
+ for (var i = start; i < end; i += 3) {
+ tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
+ output.push(tripletToBase64(tmp))
+ }
+ return output.join('')
+ }
+
+ function fromByteArray (uint8) {
+ var tmp
+ var len = uint8.length
+ var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
+ var output = ''
+ var parts = []
+ var maxChunkLength = 16383 // must be multiple of 3
+
+ // go through the array every three bytes, we'll deal with trailing stuff later
+ for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
+ parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
+ }
+
+ // pad the end with zeros, but make sure to not forget the extra bytes
+ if (extraBytes === 1) {
+ tmp = uint8[len - 1]
+ output += lookup[tmp >> 2]
+ output += lookup[(tmp << 4) & 0x3F]
+ output += '=='
+ } else if (extraBytes === 2) {
+ tmp = (uint8[len - 2] << 8) + (uint8[len - 1])
+ output += lookup[tmp >> 10]
+ output += lookup[(tmp >> 4) & 0x3F]
+ output += lookup[(tmp << 2) & 0x3F]
+ output += '='
+ }
+
+ parts.push(output)
+
+ return parts.join('')
+ }
+
+
+/***/ },
+/* 302 */
+/***/ function(module, exports) {
+
+ exports.read = function (buffer, offset, isLE, mLen, nBytes) {
+ var e, m
+ var eLen = nBytes * 8 - mLen - 1
+ var eMax = (1 << eLen) - 1
+ var eBias = eMax >> 1
+ var nBits = -7
+ var i = isLE ? (nBytes - 1) : 0
+ var d = isLE ? -1 : 1
+ var s = buffer[offset + i]
+
+ i += d
+
+ e = s & ((1 << (-nBits)) - 1)
+ s >>= (-nBits)
+ nBits += eLen
+ for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
+
+ m = e & ((1 << (-nBits)) - 1)
+ e >>= (-nBits)
+ nBits += mLen
+ for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
+
+ if (e === 0) {
+ e = 1 - eBias
+ } else if (e === eMax) {
+ return m ? NaN : ((s ? -1 : 1) * Infinity)
+ } else {
+ m = m + Math.pow(2, mLen)
+ e = e - eBias
+ }
+ return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
+ }
+
+ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
+ var e, m, c
+ var eLen = nBytes * 8 - mLen - 1
+ var eMax = (1 << eLen) - 1
+ var eBias = eMax >> 1
+ var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
+ var i = isLE ? 0 : (nBytes - 1)
+ var d = isLE ? 1 : -1
+ var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
+
+ value = Math.abs(value)
+
+ if (isNaN(value) || value === Infinity) {
+ m = isNaN(value) ? 1 : 0
+ e = eMax
+ } else {
+ e = Math.floor(Math.log(value) / Math.LN2)
+ if (value * (c = Math.pow(2, -e)) < 1) {
+ e--
+ c *= 2
+ }
+ if (e + eBias >= 1) {
+ value += rt / c
+ } else {
+ value += rt * Math.pow(2, 1 - eBias)
+ }
+ if (value * c >= 2) {
+ e++
+ c /= 2
+ }
+
+ if (e + eBias >= eMax) {
+ m = 0
+ e = eMax
+ } else if (e + eBias >= 1) {
+ m = (value * c - 1) * Math.pow(2, mLen)
+ e = e + eBias
+ } else {
+ m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
+ e = 0
+ }
+ }
+
+ for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
+
+ e = (e << mLen) | m
+ eLen += mLen
+ for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
+
+ buffer[offset + i - d] |= s * 128
+ }
+
+
+/***/ },
+/* 303 */
+/***/ function(module, exports) {
+
+ var toString = {}.toString;
+
+ module.exports = Array.isArray || function (arr) {
+ return toString.call(arr) == '[object Array]';
+ };
+
+
+/***/ },
+/* 304 */
+/***/ function(module, exports) {
+
+ // Copyright (c) 2008, Fair Oaks Labs, Inc.
+ // All rights reserved.
+ //
+ // Redistribution and use in source and binary forms, with or without
+ // modification, are permitted provided that the following conditions are met:
+ //
+ // * Redistributions of source code must retain the above copyright notice,
+ // this list of conditions and the following disclaimer.
+ //
+ // * Redistributions in binary form must reproduce the above copyright notice,
+ // this list of conditions and the following disclaimer in the documentation
+ // and/or other materials provided with the distribution.
+ //
+ // * Neither the name of Fair Oaks Labs, Inc. nor the names of its contributors
+ // may be used to endorse or promote products derived from this software
+ // without specific prior written permission.
+ //
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ // POSSIBILITY OF SUCH DAMAGE.
+ //
+ //
+ // Modifications to writeIEEE754 to support negative zeroes made by Brian White
+
+ var readIEEE754 = function (buffer, offset, endian, mLen, nBytes) {
+ var e,
+ m,
+ bBE = endian === 'big',
+ eLen = nBytes * 8 - mLen - 1,
+ eMax = (1 << eLen) - 1,
+ eBias = eMax >> 1,
+ nBits = -7,
+ i = bBE ? 0 : nBytes - 1,
+ d = bBE ? 1 : -1,
+ s = buffer[offset + i];
+
+ i += d;
+
+ e = s & (1 << -nBits) - 1;
+ s >>= -nBits;
+ nBits += eLen;
+ for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8);
+
+ m = e & (1 << -nBits) - 1;
+ e >>= -nBits;
+ nBits += mLen;
+ for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8);
+
+ if (e === 0) {
+ e = 1 - eBias;
+ } else if (e === eMax) {
+ return m ? NaN : (s ? -1 : 1) * Infinity;
+ } else {
+ m = m + Math.pow(2, mLen);
+ e = e - eBias;
+ }
+ return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
+ };
+
+ var writeIEEE754 = function (buffer, value, offset, endian, mLen, nBytes) {
+ var e,
+ m,
+ c,
+ bBE = endian === 'big',
+ eLen = nBytes * 8 - mLen - 1,
+ eMax = (1 << eLen) - 1,
+ eBias = eMax >> 1,
+ rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0,
+ i = bBE ? nBytes - 1 : 0,
+ d = bBE ? -1 : 1,
+ s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
+
+ value = Math.abs(value);
+
+ if (isNaN(value) || value === Infinity) {
+ m = isNaN(value) ? 1 : 0;
+ e = eMax;
+ } else {
+ e = Math.floor(Math.log(value) / Math.LN2);
+ if (value * (c = Math.pow(2, -e)) < 1) {
+ e--;
+ c *= 2;
+ }
+ if (e + eBias >= 1) {
+ value += rt / c;
+ } else {
+ value += rt * Math.pow(2, 1 - eBias);
+ }
+ if (value * c >= 2) {
+ e++;
+ c /= 2;
+ }
+
+ if (e + eBias >= eMax) {
+ m = 0;
+ e = eMax;
+ } else if (e + eBias >= 1) {
+ m = (value * c - 1) * Math.pow(2, mLen);
+ e = e + eBias;
+ } else {
+ m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
+ e = 0;
+ }
+ }
+
+ for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8);
+
+ e = e << mLen | m;
+ eLen += mLen;
+ for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8);
+
+ buffer[offset + i - d] |= s * 128;
+ };
+
+ exports.readIEEE754 = readIEEE754;
+ exports.writeIEEE754 = writeIEEE754;
+
+/***/ },
+/* 305 */
+/***/ function(module, exports) {
+
+ /* WEBPACK VAR INJECTION */(function(global) {"use strict";
+
+ // We have an ES6 Map available, return the native instance
+
+ if (typeof global.Map !== 'undefined') {
+ module.exports = global.Map;
+ module.exports.Map = global.Map;
+ } else {
+ // We will return a polyfill
+ var Map = function (array) {
+ this._keys = [];
+ this._values = {};
+
+ for (var i = 0; i < array.length; i++) {
+ if (array[i] == null) continue; // skip null and undefined
+ var entry = array[i];
+ var key = entry[0];
+ var value = entry[1];
+ // Add the key to the list of keys in order
+ this._keys.push(key);
+ // Add the key and value to the values dictionary with a point
+ // to the location in the ordered keys list
+ this._values[key] = { v: value, i: this._keys.length - 1 };
+ }
+ };
+
+ Map.prototype.clear = function () {
+ this._keys = [];
+ this._values = {};
+ };
+
+ Map.prototype.delete = function (key) {
+ var value = this._values[key];
+ if (value == null) return false;
+ // Delete entry
+ delete this._values[key];
+ // Remove the key from the ordered keys list
+ this._keys.splice(value.i, 1);
+ return true;
+ };
+
+ Map.prototype.entries = function () {
+ var self = this;
+ var index = 0;
+
+ return {
+ next: function () {
+ var key = self._keys[index++];
+ return {
+ value: key !== undefined ? [key, self._values[key].v] : undefined,
+ done: key !== undefined ? false : true
+ };
+ }
+ };
+ };
+
+ Map.prototype.forEach = function (callback, self) {
+ self = self || this;
+
+ for (var i = 0; i < this._keys.length; i++) {
+ var key = this._keys[i];
+ // Call the forEach callback
+ callback.call(self, this._values[key].v, key, self);
+ }
+ };
+
+ Map.prototype.get = function (key) {
+ return this._values[key] ? this._values[key].v : undefined;
+ };
+
+ Map.prototype.has = function (key) {
+ return this._values[key] != null;
+ };
+
+ Map.prototype.keys = function (key) {
+ var self = this;
+ var index = 0;
+
+ return {
+ next: function () {
+ var key = self._keys[index++];
+ return {
+ value: key !== undefined ? key : undefined,
+ done: key !== undefined ? false : true
+ };
+ }
+ };
+ };
+
+ Map.prototype.set = function (key, value) {
+ if (this._values[key]) {
+ this._values[key].v = value;
+ return this;
+ }
+
+ // Add the key to the list of keys in order
+ this._keys.push(key);
+ // Add the key and value to the values dictionary with a point
+ // to the location in the ordered keys list
+ this._values[key] = { v: value, i: this._keys.length - 1 };
+ return this;
+ };
+
+ Map.prototype.values = function (key, value) {
+ var self = this;
+ var index = 0;
+
+ return {
+ next: function () {
+ var key = self._keys[index++];
+ return {
+ value: key !== undefined ? self._values[key].v : undefined,
+ done: key !== undefined ? false : true
+ };
+ }
+ };
+ };
+
+ // Last ismaster
+ Object.defineProperty(Map.prototype, 'size', {
+ enumerable: true,
+ get: function () {
+ return this._keys.length;
+ }
+ });
+
+ module.exports = Map;
+ module.exports.Map = Map;
+ }
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ },
+/* 306 */
+/***/ function(module, exports) {
+
+ // Licensed under the Apache License, Version 2.0 (the "License");
+ // you may not use this file except in compliance with the License.
+ // You may obtain a copy of the License at
+ //
+ // http://www.apache.org/licenses/LICENSE-2.0
+ //
+ // Unless required by applicable law or agreed to in writing, software
+ // distributed under the License is distributed on an "AS IS" BASIS,
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ // See the License for the specific language governing permissions and
+ // limitations under the License.
+ //
+ // Copyright 2009 Google Inc. All Rights Reserved
+
+ /**
+ * Defines a Long class for representing a 64-bit two's-complement
+ * integer value, which faithfully simulates the behavior of a Java "Long". This
+ * implementation is derived from LongLib in GWT.
+ *
+ * Constructs a 64-bit two's-complement integer, given its low and high 32-bit
+ * values as *signed* integers. See the from* functions below for more
+ * convenient ways of constructing Longs.
+ *
+ * The internal representation of a Long is the two given signed, 32-bit values.
+ * We use 32-bit pieces because these are the size of integers on which
+ * Javascript performs bit-operations. For operations like addition and
+ * multiplication, we split each number into 16-bit pieces, which can easily be
+ * multiplied within Javascript's floating-point representation without overflow
+ * or change in sign.
+ *
+ * In the algorithms below, we frequently reduce the negative case to the
+ * positive case by negating the input(s) and then post-processing the result.
+ * Note that we must ALWAYS check specially whether those values are MIN_VALUE
+ * (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as
+ * a positive number, it overflows back into a negative). Not handling this
+ * case would often result in infinite recursion.
+ *
+ * @class
+ * @param {number} low the low (signed) 32 bits of the Long.
+ * @param {number} high the high (signed) 32 bits of the Long.
+ * @return {Long}
+ */
+ function Long(low, high) {
+ if (!(this instanceof Long)) return new Long(low, high);
+
+ this._bsontype = 'Long';
+ /**
+ * @type {number}
+ * @ignore
+ */
+ this.low_ = low | 0; // force into 32 signed bits.
+
+ /**
+ * @type {number}
+ * @ignore
+ */
+ this.high_ = high | 0; // force into 32 signed bits.
+ };
+
+ /**
+ * Return the int value.
+ *
+ * @method
+ * @return {number} the value, assuming it is a 32-bit integer.
+ */
+ Long.prototype.toInt = function () {
+ return this.low_;
+ };
+
+ /**
+ * Return the Number value.
+ *
+ * @method
+ * @return {number} the closest floating-point representation to this value.
+ */
+ Long.prototype.toNumber = function () {
+ return this.high_ * Long.TWO_PWR_32_DBL_ + this.getLowBitsUnsigned();
+ };
+
+ /**
+ * Return the JSON value.
+ *
+ * @method
+ * @return {string} the JSON representation.
+ */
+ Long.prototype.toJSON = function () {
+ return this.toString();
+ };
+
+ /**
+ * Return the String value.
+ *
+ * @method
+ * @param {number} [opt_radix] the radix in which the text should be written.
+ * @return {string} the textual representation of this value.
+ */
+ Long.prototype.toString = function (opt_radix) {
+ var radix = opt_radix || 10;
+ if (radix < 2 || 36 < radix) {
+ throw Error('radix out of range: ' + radix);
+ }
+
+ if (this.isZero()) {
+ return '0';
+ }
+
+ if (this.isNegative()) {
+ if (this.equals(Long.MIN_VALUE)) {
+ // We need to change the Long value before it can be negated, so we remove
+ // the bottom-most digit in this base and then recurse to do the rest.
+ var radixLong = Long.fromNumber(radix);
+ var div = this.div(radixLong);
+ var rem = div.multiply(radixLong).subtract(this);
+ return div.toString(radix) + rem.toInt().toString(radix);
+ } else {
+ return '-' + this.negate().toString(radix);
+ }
+ }
+
+ // Do several (6) digits each time through the loop, so as to
+ // minimize the calls to the very expensive emulated div.
+ var radixToPower = Long.fromNumber(Math.pow(radix, 6));
+
+ var rem = this;
+ var result = '';
+ while (true) {
+ var remDiv = rem.div(radixToPower);
+ var intval = rem.subtract(remDiv.multiply(radixToPower)).toInt();
+ var digits = intval.toString(radix);
+
+ rem = remDiv;
+ if (rem.isZero()) {
+ return digits + result;
+ } else {
+ while (digits.length < 6) {
+ digits = '0' + digits;
+ }
+ result = '' + digits + result;
+ }
+ }
+ };
+
+ /**
+ * Return the high 32-bits value.
+ *
+ * @method
+ * @return {number} the high 32-bits as a signed value.
+ */
+ Long.prototype.getHighBits = function () {
+ return this.high_;
+ };
+
+ /**
+ * Return the low 32-bits value.
+ *
+ * @method
+ * @return {number} the low 32-bits as a signed value.
+ */
+ Long.prototype.getLowBits = function () {
+ return this.low_;
+ };
+
+ /**
+ * Return the low unsigned 32-bits value.
+ *
+ * @method
+ * @return {number} the low 32-bits as an unsigned value.
+ */
+ Long.prototype.getLowBitsUnsigned = function () {
+ return this.low_ >= 0 ? this.low_ : Long.TWO_PWR_32_DBL_ + this.low_;
+ };
+
+ /**
+ * Returns the number of bits needed to represent the absolute value of this Long.
+ *
+ * @method
+ * @return {number} Returns the number of bits needed to represent the absolute value of this Long.
+ */
+ Long.prototype.getNumBitsAbs = function () {
+ if (this.isNegative()) {
+ if (this.equals(Long.MIN_VALUE)) {
+ return 64;
+ } else {
+ return this.negate().getNumBitsAbs();
+ }
+ } else {
+ var val = this.high_ != 0 ? this.high_ : this.low_;
+ for (var bit = 31; bit > 0; bit--) {
+ if ((val & 1 << bit) != 0) {
+ break;
+ }
+ }
+ return this.high_ != 0 ? bit + 33 : bit + 1;
+ }
+ };
+
+ /**
+ * Return whether this value is zero.
+ *
+ * @method
+ * @return {boolean} whether this value is zero.
+ */
+ Long.prototype.isZero = function () {
+ return this.high_ == 0 && this.low_ == 0;
+ };
+
+ /**
+ * Return whether this value is negative.
+ *
+ * @method
+ * @return {boolean} whether this value is negative.
+ */
+ Long.prototype.isNegative = function () {
+ return this.high_ < 0;
+ };
+
+ /**
+ * Return whether this value is odd.
+ *
+ * @method
+ * @return {boolean} whether this value is odd.
+ */
+ Long.prototype.isOdd = function () {
+ return (this.low_ & 1) == 1;
+ };
+
+ /**
+ * Return whether this Long equals the other
+ *
+ * @method
+ * @param {Long} other Long to compare against.
+ * @return {boolean} whether this Long equals the other
+ */
+ Long.prototype.equals = function (other) {
+ return this.high_ == other.high_ && this.low_ == other.low_;
+ };
+
+ /**
+ * Return whether this Long does not equal the other.
+ *
+ * @method
+ * @param {Long} other Long to compare against.
+ * @return {boolean} whether this Long does not equal the other.
+ */
+ Long.prototype.notEquals = function (other) {
+ return this.high_ != other.high_ || this.low_ != other.low_;
+ };
+
+ /**
+ * Return whether this Long is less than the other.
+ *
+ * @method
+ * @param {Long} other Long to compare against.
+ * @return {boolean} whether this Long is less than the other.
+ */
+ Long.prototype.lessThan = function (other) {
+ return this.compare(other) < 0;
+ };
+
+ /**
+ * Return whether this Long is less than or equal to the other.
+ *
+ * @method
+ * @param {Long} other Long to compare against.
+ * @return {boolean} whether this Long is less than or equal to the other.
+ */
+ Long.prototype.lessThanOrEqual = function (other) {
+ return this.compare(other) <= 0;
+ };
+
+ /**
+ * Return whether this Long is greater than the other.
+ *
+ * @method
+ * @param {Long} other Long to compare against.
+ * @return {boolean} whether this Long is greater than the other.
+ */
+ Long.prototype.greaterThan = function (other) {
+ return this.compare(other) > 0;
+ };
+
+ /**
+ * Return whether this Long is greater than or equal to the other.
+ *
+ * @method
+ * @param {Long} other Long to compare against.
+ * @return {boolean} whether this Long is greater than or equal to the other.
+ */
+ Long.prototype.greaterThanOrEqual = function (other) {
+ return this.compare(other) >= 0;
+ };
+
+ /**
+ * Compares this Long with the given one.
+ *
+ * @method
+ * @param {Long} other Long to compare against.
+ * @return {boolean} 0 if they are the same, 1 if the this is greater, and -1 if the given one is greater.
+ */
+ Long.prototype.compare = function (other) {
+ if (this.equals(other)) {
+ return 0;
+ }
+
+ var thisNeg = this.isNegative();
+ var otherNeg = other.isNegative();
+ if (thisNeg && !otherNeg) {
+ return -1;
+ }
+ if (!thisNeg && otherNeg) {
+ return 1;
+ }
+
+ // at this point, the signs are the same, so subtraction will not overflow
+ if (this.subtract(other).isNegative()) {
+ return -1;
+ } else {
+ return 1;
+ }
+ };
+
+ /**
+ * The negation of this value.
+ *
+ * @method
+ * @return {Long} the negation of this value.
+ */
+ Long.prototype.negate = function () {
+ if (this.equals(Long.MIN_VALUE)) {
+ return Long.MIN_VALUE;
+ } else {
+ return this.not().add(Long.ONE);
+ }
+ };
+
+ /**
+ * Returns the sum of this and the given Long.
+ *
+ * @method
+ * @param {Long} other Long to add to this one.
+ * @return {Long} the sum of this and the given Long.
+ */
+ Long.prototype.add = function (other) {
+ // Divide each number into 4 chunks of 16 bits, and then sum the chunks.
+
+ var a48 = this.high_ >>> 16;
+ var a32 = this.high_ & 0xFFFF;
+ var a16 = this.low_ >>> 16;
+ var a00 = this.low_ & 0xFFFF;
+
+ var b48 = other.high_ >>> 16;
+ var b32 = other.high_ & 0xFFFF;
+ var b16 = other.low_ >>> 16;
+ var b00 = other.low_ & 0xFFFF;
+
+ var c48 = 0,
+ c32 = 0,
+ c16 = 0,
+ c00 = 0;
+ c00 += a00 + b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xFFFF;
+ c16 += a16 + b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c32 += a32 + b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c48 += a48 + b48;
+ c48 &= 0xFFFF;
+ return Long.fromBits(c16 << 16 | c00, c48 << 16 | c32);
+ };
+
+ /**
+ * Returns the difference of this and the given Long.
+ *
+ * @method
+ * @param {Long} other Long to subtract from this.
+ * @return {Long} the difference of this and the given Long.
+ */
+ Long.prototype.subtract = function (other) {
+ return this.add(other.negate());
+ };
+
+ /**
+ * Returns the product of this and the given Long.
+ *
+ * @method
+ * @param {Long} other Long to multiply with this.
+ * @return {Long} the product of this and the other.
+ */
+ Long.prototype.multiply = function (other) {
+ if (this.isZero()) {
+ return Long.ZERO;
+ } else if (other.isZero()) {
+ return Long.ZERO;
+ }
+
+ if (this.equals(Long.MIN_VALUE)) {
+ return other.isOdd() ? Long.MIN_VALUE : Long.ZERO;
+ } else if (other.equals(Long.MIN_VALUE)) {
+ return this.isOdd() ? Long.MIN_VALUE : Long.ZERO;
+ }
+
+ if (this.isNegative()) {
+ if (other.isNegative()) {
+ return this.negate().multiply(other.negate());
+ } else {
+ return this.negate().multiply(other).negate();
+ }
+ } else if (other.isNegative()) {
+ return this.multiply(other.negate()).negate();
+ }
+
+ // If both Longs are small, use float multiplication
+ if (this.lessThan(Long.TWO_PWR_24_) && other.lessThan(Long.TWO_PWR_24_)) {
+ return Long.fromNumber(this.toNumber() * other.toNumber());
+ }
+
+ // Divide each Long into 4 chunks of 16 bits, and then add up 4x4 products.
+ // We can skip products that would overflow.
+
+ var a48 = this.high_ >>> 16;
+ var a32 = this.high_ & 0xFFFF;
+ var a16 = this.low_ >>> 16;
+ var a00 = this.low_ & 0xFFFF;
+
+ var b48 = other.high_ >>> 16;
+ var b32 = other.high_ & 0xFFFF;
+ var b16 = other.low_ >>> 16;
+ var b00 = other.low_ & 0xFFFF;
+
+ var c48 = 0,
+ c32 = 0,
+ c16 = 0,
+ c00 = 0;
+ c00 += a00 * b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xFFFF;
+ c16 += a16 * b00;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c16 += a00 * b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c32 += a32 * b00;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c32 += a16 * b16;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c32 += a00 * b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
+ c48 &= 0xFFFF;
+ return Long.fromBits(c16 << 16 | c00, c48 << 16 | c32);
+ };
+
+ /**
+ * Returns this Long divided by the given one.
+ *
+ * @method
+ * @param {Long} other Long by which to divide.
+ * @return {Long} this Long divided by the given one.
+ */
+ Long.prototype.div = function (other) {
+ if (other.isZero()) {
+ throw Error('division by zero');
+ } else if (this.isZero()) {
+ return Long.ZERO;
+ }
+
+ if (this.equals(Long.MIN_VALUE)) {
+ if (other.equals(Long.ONE) || other.equals(Long.NEG_ONE)) {
+ return Long.MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE
+ } else if (other.equals(Long.MIN_VALUE)) {
+ return Long.ONE;
+ } else {
+ // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.
+ var halfThis = this.shiftRight(1);
+ var approx = halfThis.div(other).shiftLeft(1);
+ if (approx.equals(Long.ZERO)) {
+ return other.isNegative() ? Long.ONE : Long.NEG_ONE;
+ } else {
+ var rem = this.subtract(other.multiply(approx));
+ var result = approx.add(rem.div(other));
+ return result;
+ }
+ }
+ } else if (other.equals(Long.MIN_VALUE)) {
+ return Long.ZERO;
+ }
+
+ if (this.isNegative()) {
+ if (other.isNegative()) {
+ return this.negate().div(other.negate());
+ } else {
+ return this.negate().div(other).negate();
+ }
+ } else if (other.isNegative()) {
+ return this.div(other.negate()).negate();
+ }
+
+ // Repeat the following until the remainder is less than other: find a
+ // floating-point that approximates remainder / other *from below*, add this
+ // into the result, and subtract it from the remainder. It is critical that
+ // the approximate value is less than or equal to the real value so that the
+ // remainder never becomes negative.
+ var res = Long.ZERO;
+ var rem = this;
+ while (rem.greaterThanOrEqual(other)) {
+ // Approximate the result of division. This may be a little greater or
+ // smaller than the actual value.
+ var approx = Math.max(1, Math.floor(rem.toNumber() / other.toNumber()));
+
+ // We will tweak the approximate result by changing it in the 48-th digit or
+ // the smallest non-fractional digit, whichever is larger.
+ var log2 = Math.ceil(Math.log(approx) / Math.LN2);
+ var delta = log2 <= 48 ? 1 : Math.pow(2, log2 - 48);
+
+ // Decrease the approximation until it is smaller than the remainder. Note
+ // that if it is too large, the product overflows and is negative.
+ var approxRes = Long.fromNumber(approx);
+ var approxRem = approxRes.multiply(other);
+ while (approxRem.isNegative() || approxRem.greaterThan(rem)) {
+ approx -= delta;
+ approxRes = Long.fromNumber(approx);
+ approxRem = approxRes.multiply(other);
+ }
+
+ // We know the answer can't be zero... and actually, zero would cause
+ // infinite recursion since we would make no progress.
+ if (approxRes.isZero()) {
+ approxRes = Long.ONE;
+ }
+
+ res = res.add(approxRes);
+ rem = rem.subtract(approxRem);
+ }
+ return res;
+ };
+
+ /**
+ * Returns this Long modulo the given one.
+ *
+ * @method
+ * @param {Long} other Long by which to mod.
+ * @return {Long} this Long modulo the given one.
+ */
+ Long.prototype.modulo = function (other) {
+ return this.subtract(this.div(other).multiply(other));
+ };
+
+ /**
+ * The bitwise-NOT of this value.
+ *
+ * @method
+ * @return {Long} the bitwise-NOT of this value.
+ */
+ Long.prototype.not = function () {
+ return Long.fromBits(~this.low_, ~this.high_);
+ };
+
+ /**
+ * Returns the bitwise-AND of this Long and the given one.
+ *
+ * @method
+ * @param {Long} other the Long with which to AND.
+ * @return {Long} the bitwise-AND of this and the other.
+ */
+ Long.prototype.and = function (other) {
+ return Long.fromBits(this.low_ & other.low_, this.high_ & other.high_);
+ };
+
+ /**
+ * Returns the bitwise-OR of this Long and the given one.
+ *
+ * @method
+ * @param {Long} other the Long with which to OR.
+ * @return {Long} the bitwise-OR of this and the other.
+ */
+ Long.prototype.or = function (other) {
+ return Long.fromBits(this.low_ | other.low_, this.high_ | other.high_);
+ };
+
+ /**
+ * Returns the bitwise-XOR of this Long and the given one.
+ *
+ * @method
+ * @param {Long} other the Long with which to XOR.
+ * @return {Long} the bitwise-XOR of this and the other.
+ */
+ Long.prototype.xor = function (other) {
+ return Long.fromBits(this.low_ ^ other.low_, this.high_ ^ other.high_);
+ };
+
+ /**
+ * Returns this Long with bits shifted to the left by the given amount.
+ *
+ * @method
+ * @param {number} numBits the number of bits by which to shift.
+ * @return {Long} this shifted to the left by the given amount.
+ */
+ Long.prototype.shiftLeft = function (numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var low = this.low_;
+ if (numBits < 32) {
+ var high = this.high_;
+ return Long.fromBits(low << numBits, high << numBits | low >>> 32 - numBits);
+ } else {
+ return Long.fromBits(0, low << numBits - 32);
+ }
+ }
+ };
+
+ /**
+ * Returns this Long with bits shifted to the right by the given amount.
+ *
+ * @method
+ * @param {number} numBits the number of bits by which to shift.
+ * @return {Long} this shifted to the right by the given amount.
+ */
+ Long.prototype.shiftRight = function (numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var high = this.high_;
+ if (numBits < 32) {
+ var low = this.low_;
+ return Long.fromBits(low >>> numBits | high << 32 - numBits, high >> numBits);
+ } else {
+ return Long.fromBits(high >> numBits - 32, high >= 0 ? 0 : -1);
+ }
+ }
+ };
+
+ /**
+ * Returns this Long with bits shifted to the right by the given amount, with the new top bits matching the current sign bit.
+ *
+ * @method
+ * @param {number} numBits the number of bits by which to shift.
+ * @return {Long} this shifted to the right by the given amount, with zeros placed into the new leading bits.
+ */
+ Long.prototype.shiftRightUnsigned = function (numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var high = this.high_;
+ if (numBits < 32) {
+ var low = this.low_;
+ return Long.fromBits(low >>> numBits | high << 32 - numBits, high >>> numBits);
+ } else if (numBits == 32) {
+ return Long.fromBits(high, 0);
+ } else {
+ return Long.fromBits(high >>> numBits - 32, 0);
+ }
+ }
+ };
+
+ /**
+ * Returns a Long representing the given (32-bit) integer value.
+ *
+ * @method
+ * @param {number} value the 32-bit integer in question.
+ * @return {Long} the corresponding Long value.
+ */
+ Long.fromInt = function (value) {
+ if (-128 <= value && value < 128) {
+ var cachedObj = Long.INT_CACHE_[value];
+ if (cachedObj) {
+ return cachedObj;
+ }
+ }
+
+ var obj = new Long(value | 0, value < 0 ? -1 : 0);
+ if (-128 <= value && value < 128) {
+ Long.INT_CACHE_[value] = obj;
+ }
+ return obj;
+ };
+
+ /**
+ * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.
+ *
+ * @method
+ * @param {number} value the number in question.
+ * @return {Long} the corresponding Long value.
+ */
+ Long.fromNumber = function (value) {
+ if (isNaN(value) || !isFinite(value)) {
+ return Long.ZERO;
+ } else if (value <= -Long.TWO_PWR_63_DBL_) {
+ return Long.MIN_VALUE;
+ } else if (value + 1 >= Long.TWO_PWR_63_DBL_) {
+ return Long.MAX_VALUE;
+ } else if (value < 0) {
+ return Long.fromNumber(-value).negate();
+ } else {
+ return new Long(value % Long.TWO_PWR_32_DBL_ | 0, value / Long.TWO_PWR_32_DBL_ | 0);
+ }
+ };
+
+ /**
+ * Returns a Long representing the 64-bit integer that comes by concatenating the given high and low bits. Each is assumed to use 32 bits.
+ *
+ * @method
+ * @param {number} lowBits the low 32-bits.
+ * @param {number} highBits the high 32-bits.
+ * @return {Long} the corresponding Long value.
+ */
+ Long.fromBits = function (lowBits, highBits) {
+ return new Long(lowBits, highBits);
+ };
+
+ /**
+ * Returns a Long representation of the given string, written using the given radix.
+ *
+ * @method
+ * @param {string} str the textual representation of the Long.
+ * @param {number} opt_radix the radix in which the text is written.
+ * @return {Long} the corresponding Long value.
+ */
+ Long.fromString = function (str, opt_radix) {
+ if (str.length == 0) {
+ throw Error('number format error: empty string');
+ }
+
+ var radix = opt_radix || 10;
+ if (radix < 2 || 36 < radix) {
+ throw Error('radix out of range: ' + radix);
+ }
+
+ if (str.charAt(0) == '-') {
+ return Long.fromString(str.substring(1), radix).negate();
+ } else if (str.indexOf('-') >= 0) {
+ throw Error('number format error: interior "-" character: ' + str);
+ }
+
+ // Do several (8) digits each time through the loop, so as to
+ // minimize the calls to the very expensive emulated div.
+ var radixToPower = Long.fromNumber(Math.pow(radix, 8));
+
+ var result = Long.ZERO;
+ for (var i = 0; i < str.length; i += 8) {
+ var size = Math.min(8, str.length - i);
+ var value = parseInt(str.substring(i, i + size), radix);
+ if (size < 8) {
+ var power = Long.fromNumber(Math.pow(radix, size));
+ result = result.multiply(power).add(Long.fromNumber(value));
+ } else {
+ result = result.multiply(radixToPower);
+ result = result.add(Long.fromNumber(value));
+ }
+ }
+ return result;
+ };
+
+ // NOTE: Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the
+ // from* methods on which they depend.
+
+
+ /**
+ * A cache of the Long representations of small integer values.
+ * @type {Object}
+ * @ignore
+ */
+ Long.INT_CACHE_ = {};
+
+ // NOTE: the compiler should inline these constant values below and then remove
+ // these variables, so there should be no runtime penalty for these.
+
+ /**
+ * Number used repeated below in calculations. This must appear before the
+ * first call to any from* function below.
+ * @type {number}
+ * @ignore
+ */
+ Long.TWO_PWR_16_DBL_ = 1 << 16;
+
+ /**
+ * @type {number}
+ * @ignore
+ */
+ Long.TWO_PWR_24_DBL_ = 1 << 24;
+
+ /**
+ * @type {number}
+ * @ignore
+ */
+ Long.TWO_PWR_32_DBL_ = Long.TWO_PWR_16_DBL_ * Long.TWO_PWR_16_DBL_;
+
+ /**
+ * @type {number}
+ * @ignore
+ */
+ Long.TWO_PWR_31_DBL_ = Long.TWO_PWR_32_DBL_ / 2;
+
+ /**
+ * @type {number}
+ * @ignore
+ */
+ Long.TWO_PWR_48_DBL_ = Long.TWO_PWR_32_DBL_ * Long.TWO_PWR_16_DBL_;
+
+ /**
+ * @type {number}
+ * @ignore
+ */
+ Long.TWO_PWR_64_DBL_ = Long.TWO_PWR_32_DBL_ * Long.TWO_PWR_32_DBL_;
+
+ /**
+ * @type {number}
+ * @ignore
+ */
+ Long.TWO_PWR_63_DBL_ = Long.TWO_PWR_64_DBL_ / 2;
+
+ /** @type {Long} */
+ Long.ZERO = Long.fromInt(0);
+
+ /** @type {Long} */
+ Long.ONE = Long.fromInt(1);
+
+ /** @type {Long} */
+ Long.NEG_ONE = Long.fromInt(-1);
+
+ /** @type {Long} */
+ Long.MAX_VALUE = Long.fromBits(0xFFFFFFFF | 0, 0x7FFFFFFF | 0);
+
+ /** @type {Long} */
+ Long.MIN_VALUE = Long.fromBits(0, 0x80000000 | 0);
+
+ /**
+ * @type {Long}
+ * @ignore
+ */
+ Long.TWO_PWR_24_ = Long.fromInt(1 << 24);
+
+ /**
+ * Expose.
+ */
+ module.exports = Long;
+ module.exports.Long = Long;
+
+/***/ },
+/* 307 */
+/***/ function(module, exports) {
+
+ /**
+ * A class representation of the BSON Double type.
+ *
+ * @class
+ * @param {number} value the number we want to represent as a double.
+ * @return {Double}
+ */
+ function Double(value) {
+ if (!(this instanceof Double)) return new Double(value);
+
+ this._bsontype = 'Double';
+ this.value = value;
+ }
+
+ /**
+ * Access the number value.
+ *
+ * @method
+ * @return {number} returns the wrapped double number.
+ */
+ Double.prototype.valueOf = function () {
+ return this.value;
+ };
+
+ /**
+ * @ignore
+ */
+ Double.prototype.toJSON = function () {
+ return this.value;
+ };
+
+ module.exports = Double;
+ module.exports.Double = Double;
+
+/***/ },
+/* 308 */
+/***/ function(module, exports) {
+
+ // Licensed under the Apache License, Version 2.0 (the "License");
+ // you may not use this file except in compliance with the License.
+ // You may obtain a copy of the License at
+ //
+ // http://www.apache.org/licenses/LICENSE-2.0
+ //
+ // Unless required by applicable law or agreed to in writing, software
+ // distributed under the License is distributed on an "AS IS" BASIS,
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ // See the License for the specific language governing permissions and
+ // limitations under the License.
+ //
+ // Copyright 2009 Google Inc. All Rights Reserved
+
+ /**
+ * This type is for INTERNAL use in MongoDB only and should not be used in applications.
+ * The appropriate corresponding type is the JavaScript Date type.
+ *
+ * Defines a Timestamp class for representing a 64-bit two's-complement
+ * integer value, which faithfully simulates the behavior of a Java "Timestamp". This
+ * implementation is derived from TimestampLib in GWT.
+ *
+ * Constructs a 64-bit two's-complement integer, given its low and high 32-bit
+ * values as *signed* integers. See the from* functions below for more
+ * convenient ways of constructing Timestamps.
+ *
+ * The internal representation of a Timestamp is the two given signed, 32-bit values.
+ * We use 32-bit pieces because these are the size of integers on which
+ * Javascript performs bit-operations. For operations like addition and
+ * multiplication, we split each number into 16-bit pieces, which can easily be
+ * multiplied within Javascript's floating-point representation without overflow
+ * or change in sign.
+ *
+ * In the algorithms below, we frequently reduce the negative case to the
+ * positive case by negating the input(s) and then post-processing the result.
+ * Note that we must ALWAYS check specially whether those values are MIN_VALUE
+ * (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as
+ * a positive number, it overflows back into a negative). Not handling this
+ * case would often result in infinite recursion.
+ *
+ * @class
+ * @param {number} low the low (signed) 32 bits of the Timestamp.
+ * @param {number} high the high (signed) 32 bits of the Timestamp.
+ */
+ function Timestamp(low, high) {
+ if (!(this instanceof Timestamp)) return new Timestamp(low, high);
+ this._bsontype = 'Timestamp';
+ /**
+ * @type {number}
+ * @ignore
+ */
+ this.low_ = low | 0; // force into 32 signed bits.
+
+ /**
+ * @type {number}
+ * @ignore
+ */
+ this.high_ = high | 0; // force into 32 signed bits.
+ };
+
+ /**
+ * Return the int value.
+ *
+ * @return {number} the value, assuming it is a 32-bit integer.
+ */
+ Timestamp.prototype.toInt = function () {
+ return this.low_;
+ };
+
+ /**
+ * Return the Number value.
+ *
+ * @method
+ * @return {number} the closest floating-point representation to this value.
+ */
+ Timestamp.prototype.toNumber = function () {
+ return this.high_ * Timestamp.TWO_PWR_32_DBL_ + this.getLowBitsUnsigned();
+ };
+
+ /**
+ * Return the JSON value.
+ *
+ * @method
+ * @return {string} the JSON representation.
+ */
+ Timestamp.prototype.toJSON = function () {
+ return this.toString();
+ };
+
+ /**
+ * Return the String value.
+ *
+ * @method
+ * @param {number} [opt_radix] the radix in which the text should be written.
+ * @return {string} the textual representation of this value.
+ */
+ Timestamp.prototype.toString = function (opt_radix) {
+ var radix = opt_radix || 10;
+ if (radix < 2 || 36 < radix) {
+ throw Error('radix out of range: ' + radix);
+ }
+
+ if (this.isZero()) {
+ return '0';
+ }
+
+ if (this.isNegative()) {
+ if (this.equals(Timestamp.MIN_VALUE)) {
+ // We need to change the Timestamp value before it can be negated, so we remove
+ // the bottom-most digit in this base and then recurse to do the rest.
+ var radixTimestamp = Timestamp.fromNumber(radix);
+ var div = this.div(radixTimestamp);
+ var rem = div.multiply(radixTimestamp).subtract(this);
+ return div.toString(radix) + rem.toInt().toString(radix);
+ } else {
+ return '-' + this.negate().toString(radix);
+ }
+ }
+
+ // Do several (6) digits each time through the loop, so as to
+ // minimize the calls to the very expensive emulated div.
+ var radixToPower = Timestamp.fromNumber(Math.pow(radix, 6));
+
+ var rem = this;
+ var result = '';
+ while (true) {
+ var remDiv = rem.div(radixToPower);
+ var intval = rem.subtract(remDiv.multiply(radixToPower)).toInt();
+ var digits = intval.toString(radix);
+
+ rem = remDiv;
+ if (rem.isZero()) {
+ return digits + result;
+ } else {
+ while (digits.length < 6) {
+ digits = '0' + digits;
+ }
+ result = '' + digits + result;
+ }
+ }
+ };
+
+ /**
+ * Return the high 32-bits value.
+ *
+ * @method
+ * @return {number} the high 32-bits as a signed value.
+ */
+ Timestamp.prototype.getHighBits = function () {
+ return this.high_;
+ };
+
+ /**
+ * Return the low 32-bits value.
+ *
+ * @method
+ * @return {number} the low 32-bits as a signed value.
+ */
+ Timestamp.prototype.getLowBits = function () {
+ return this.low_;
+ };
+
+ /**
+ * Return the low unsigned 32-bits value.
+ *
+ * @method
+ * @return {number} the low 32-bits as an unsigned value.
+ */
+ Timestamp.prototype.getLowBitsUnsigned = function () {
+ return this.low_ >= 0 ? this.low_ : Timestamp.TWO_PWR_32_DBL_ + this.low_;
+ };
+
+ /**
+ * Returns the number of bits needed to represent the absolute value of this Timestamp.
+ *
+ * @method
+ * @return {number} Returns the number of bits needed to represent the absolute value of this Timestamp.
+ */
+ Timestamp.prototype.getNumBitsAbs = function () {
+ if (this.isNegative()) {
+ if (this.equals(Timestamp.MIN_VALUE)) {
+ return 64;
+ } else {
+ return this.negate().getNumBitsAbs();
+ }
+ } else {
+ var val = this.high_ != 0 ? this.high_ : this.low_;
+ for (var bit = 31; bit > 0; bit--) {
+ if ((val & 1 << bit) != 0) {
+ break;
+ }
+ }
+ return this.high_ != 0 ? bit + 33 : bit + 1;
+ }
+ };
+
+ /**
+ * Return whether this value is zero.
+ *
+ * @method
+ * @return {boolean} whether this value is zero.
+ */
+ Timestamp.prototype.isZero = function () {
+ return this.high_ == 0 && this.low_ == 0;
+ };
+
+ /**
+ * Return whether this value is negative.
+ *
+ * @method
+ * @return {boolean} whether this value is negative.
+ */
+ Timestamp.prototype.isNegative = function () {
+ return this.high_ < 0;
+ };
+
+ /**
+ * Return whether this value is odd.
+ *
+ * @method
+ * @return {boolean} whether this value is odd.
+ */
+ Timestamp.prototype.isOdd = function () {
+ return (this.low_ & 1) == 1;
+ };
+
+ /**
+ * Return whether this Timestamp equals the other
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {boolean} whether this Timestamp equals the other
+ */
+ Timestamp.prototype.equals = function (other) {
+ return this.high_ == other.high_ && this.low_ == other.low_;
+ };
+
+ /**
+ * Return whether this Timestamp does not equal the other.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {boolean} whether this Timestamp does not equal the other.
+ */
+ Timestamp.prototype.notEquals = function (other) {
+ return this.high_ != other.high_ || this.low_ != other.low_;
+ };
+
+ /**
+ * Return whether this Timestamp is less than the other.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {boolean} whether this Timestamp is less than the other.
+ */
+ Timestamp.prototype.lessThan = function (other) {
+ return this.compare(other) < 0;
+ };
+
+ /**
+ * Return whether this Timestamp is less than or equal to the other.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {boolean} whether this Timestamp is less than or equal to the other.
+ */
+ Timestamp.prototype.lessThanOrEqual = function (other) {
+ return this.compare(other) <= 0;
+ };
+
+ /**
+ * Return whether this Timestamp is greater than the other.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {boolean} whether this Timestamp is greater than the other.
+ */
+ Timestamp.prototype.greaterThan = function (other) {
+ return this.compare(other) > 0;
+ };
+
+ /**
+ * Return whether this Timestamp is greater than or equal to the other.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {boolean} whether this Timestamp is greater than or equal to the other.
+ */
+ Timestamp.prototype.greaterThanOrEqual = function (other) {
+ return this.compare(other) >= 0;
+ };
+
+ /**
+ * Compares this Timestamp with the given one.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {boolean} 0 if they are the same, 1 if the this is greater, and -1 if the given one is greater.
+ */
+ Timestamp.prototype.compare = function (other) {
+ if (this.equals(other)) {
+ return 0;
+ }
+
+ var thisNeg = this.isNegative();
+ var otherNeg = other.isNegative();
+ if (thisNeg && !otherNeg) {
+ return -1;
+ }
+ if (!thisNeg && otherNeg) {
+ return 1;
+ }
+
+ // at this point, the signs are the same, so subtraction will not overflow
+ if (this.subtract(other).isNegative()) {
+ return -1;
+ } else {
+ return 1;
+ }
+ };
+
+ /**
+ * The negation of this value.
+ *
+ * @method
+ * @return {Timestamp} the negation of this value.
+ */
+ Timestamp.prototype.negate = function () {
+ if (this.equals(Timestamp.MIN_VALUE)) {
+ return Timestamp.MIN_VALUE;
+ } else {
+ return this.not().add(Timestamp.ONE);
+ }
+ };
+
+ /**
+ * Returns the sum of this and the given Timestamp.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to add to this one.
+ * @return {Timestamp} the sum of this and the given Timestamp.
+ */
+ Timestamp.prototype.add = function (other) {
+ // Divide each number into 4 chunks of 16 bits, and then sum the chunks.
+
+ var a48 = this.high_ >>> 16;
+ var a32 = this.high_ & 0xFFFF;
+ var a16 = this.low_ >>> 16;
+ var a00 = this.low_ & 0xFFFF;
+
+ var b48 = other.high_ >>> 16;
+ var b32 = other.high_ & 0xFFFF;
+ var b16 = other.low_ >>> 16;
+ var b00 = other.low_ & 0xFFFF;
+
+ var c48 = 0,
+ c32 = 0,
+ c16 = 0,
+ c00 = 0;
+ c00 += a00 + b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xFFFF;
+ c16 += a16 + b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c32 += a32 + b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c48 += a48 + b48;
+ c48 &= 0xFFFF;
+ return Timestamp.fromBits(c16 << 16 | c00, c48 << 16 | c32);
+ };
+
+ /**
+ * Returns the difference of this and the given Timestamp.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to subtract from this.
+ * @return {Timestamp} the difference of this and the given Timestamp.
+ */
+ Timestamp.prototype.subtract = function (other) {
+ return this.add(other.negate());
+ };
+
+ /**
+ * Returns the product of this and the given Timestamp.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to multiply with this.
+ * @return {Timestamp} the product of this and the other.
+ */
+ Timestamp.prototype.multiply = function (other) {
+ if (this.isZero()) {
+ return Timestamp.ZERO;
+ } else if (other.isZero()) {
+ return Timestamp.ZERO;
+ }
+
+ if (this.equals(Timestamp.MIN_VALUE)) {
+ return other.isOdd() ? Timestamp.MIN_VALUE : Timestamp.ZERO;
+ } else if (other.equals(Timestamp.MIN_VALUE)) {
+ return this.isOdd() ? Timestamp.MIN_VALUE : Timestamp.ZERO;
+ }
+
+ if (this.isNegative()) {
+ if (other.isNegative()) {
+ return this.negate().multiply(other.negate());
+ } else {
+ return this.negate().multiply(other).negate();
+ }
+ } else if (other.isNegative()) {
+ return this.multiply(other.negate()).negate();
+ }
+
+ // If both Timestamps are small, use float multiplication
+ if (this.lessThan(Timestamp.TWO_PWR_24_) && other.lessThan(Timestamp.TWO_PWR_24_)) {
+ return Timestamp.fromNumber(this.toNumber() * other.toNumber());
+ }
+
+ // Divide each Timestamp into 4 chunks of 16 bits, and then add up 4x4 products.
+ // We can skip products that would overflow.
+
+ var a48 = this.high_ >>> 16;
+ var a32 = this.high_ & 0xFFFF;
+ var a16 = this.low_ >>> 16;
+ var a00 = this.low_ & 0xFFFF;
+
+ var b48 = other.high_ >>> 16;
+ var b32 = other.high_ & 0xFFFF;
+ var b16 = other.low_ >>> 16;
+ var b00 = other.low_ & 0xFFFF;
+
+ var c48 = 0,
+ c32 = 0,
+ c16 = 0,
+ c00 = 0;
+ c00 += a00 * b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xFFFF;
+ c16 += a16 * b00;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c16 += a00 * b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c32 += a32 * b00;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c32 += a16 * b16;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c32 += a00 * b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
+ c48 &= 0xFFFF;
+ return Timestamp.fromBits(c16 << 16 | c00, c48 << 16 | c32);
+ };
+
+ /**
+ * Returns this Timestamp divided by the given one.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp by which to divide.
+ * @return {Timestamp} this Timestamp divided by the given one.
+ */
+ Timestamp.prototype.div = function (other) {
+ if (other.isZero()) {
+ throw Error('division by zero');
+ } else if (this.isZero()) {
+ return Timestamp.ZERO;
+ }
+
+ if (this.equals(Timestamp.MIN_VALUE)) {
+ if (other.equals(Timestamp.ONE) || other.equals(Timestamp.NEG_ONE)) {
+ return Timestamp.MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE
+ } else if (other.equals(Timestamp.MIN_VALUE)) {
+ return Timestamp.ONE;
+ } else {
+ // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.
+ var halfThis = this.shiftRight(1);
+ var approx = halfThis.div(other).shiftLeft(1);
+ if (approx.equals(Timestamp.ZERO)) {
+ return other.isNegative() ? Timestamp.ONE : Timestamp.NEG_ONE;
+ } else {
+ var rem = this.subtract(other.multiply(approx));
+ var result = approx.add(rem.div(other));
+ return result;
+ }
+ }
+ } else if (other.equals(Timestamp.MIN_VALUE)) {
+ return Timestamp.ZERO;
+ }
+
+ if (this.isNegative()) {
+ if (other.isNegative()) {
+ return this.negate().div(other.negate());
+ } else {
+ return this.negate().div(other).negate();
+ }
+ } else if (other.isNegative()) {
+ return this.div(other.negate()).negate();
+ }
+
+ // Repeat the following until the remainder is less than other: find a
+ // floating-point that approximates remainder / other *from below*, add this
+ // into the result, and subtract it from the remainder. It is critical that
+ // the approximate value is less than or equal to the real value so that the
+ // remainder never becomes negative.
+ var res = Timestamp.ZERO;
+ var rem = this;
+ while (rem.greaterThanOrEqual(other)) {
+ // Approximate the result of division. This may be a little greater or
+ // smaller than the actual value.
+ var approx = Math.max(1, Math.floor(rem.toNumber() / other.toNumber()));
+
+ // We will tweak the approximate result by changing it in the 48-th digit or
+ // the smallest non-fractional digit, whichever is larger.
+ var log2 = Math.ceil(Math.log(approx) / Math.LN2);
+ var delta = log2 <= 48 ? 1 : Math.pow(2, log2 - 48);
+
+ // Decrease the approximation until it is smaller than the remainder. Note
+ // that if it is too large, the product overflows and is negative.
+ var approxRes = Timestamp.fromNumber(approx);
+ var approxRem = approxRes.multiply(other);
+ while (approxRem.isNegative() || approxRem.greaterThan(rem)) {
+ approx -= delta;
+ approxRes = Timestamp.fromNumber(approx);
+ approxRem = approxRes.multiply(other);
+ }
+
+ // We know the answer can't be zero... and actually, zero would cause
+ // infinite recursion since we would make no progress.
+ if (approxRes.isZero()) {
+ approxRes = Timestamp.ONE;
+ }
+
+ res = res.add(approxRes);
+ rem = rem.subtract(approxRem);
+ }
+ return res;
+ };
+
+ /**
+ * Returns this Timestamp modulo the given one.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp by which to mod.
+ * @return {Timestamp} this Timestamp modulo the given one.
+ */
+ Timestamp.prototype.modulo = function (other) {
+ return this.subtract(this.div(other).multiply(other));
+ };
+
+ /**
+ * The bitwise-NOT of this value.
+ *
+ * @method
+ * @return {Timestamp} the bitwise-NOT of this value.
+ */
+ Timestamp.prototype.not = function () {
+ return Timestamp.fromBits(~this.low_, ~this.high_);
+ };
+
+ /**
+ * Returns the bitwise-AND of this Timestamp and the given one.
+ *
+ * @method
+ * @param {Timestamp} other the Timestamp with which to AND.
+ * @return {Timestamp} the bitwise-AND of this and the other.
+ */
+ Timestamp.prototype.and = function (other) {
+ return Timestamp.fromBits(this.low_ & other.low_, this.high_ & other.high_);
+ };
+
+ /**
+ * Returns the bitwise-OR of this Timestamp and the given one.
+ *
+ * @method
+ * @param {Timestamp} other the Timestamp with which to OR.
+ * @return {Timestamp} the bitwise-OR of this and the other.
+ */
+ Timestamp.prototype.or = function (other) {
+ return Timestamp.fromBits(this.low_ | other.low_, this.high_ | other.high_);
+ };
+
+ /**
+ * Returns the bitwise-XOR of this Timestamp and the given one.
+ *
+ * @method
+ * @param {Timestamp} other the Timestamp with which to XOR.
+ * @return {Timestamp} the bitwise-XOR of this and the other.
+ */
+ Timestamp.prototype.xor = function (other) {
+ return Timestamp.fromBits(this.low_ ^ other.low_, this.high_ ^ other.high_);
+ };
+
+ /**
+ * Returns this Timestamp with bits shifted to the left by the given amount.
+ *
+ * @method
+ * @param {number} numBits the number of bits by which to shift.
+ * @return {Timestamp} this shifted to the left by the given amount.
+ */
+ Timestamp.prototype.shiftLeft = function (numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var low = this.low_;
+ if (numBits < 32) {
+ var high = this.high_;
+ return Timestamp.fromBits(low << numBits, high << numBits | low >>> 32 - numBits);
+ } else {
+ return Timestamp.fromBits(0, low << numBits - 32);
+ }
+ }
+ };
+
+ /**
+ * Returns this Timestamp with bits shifted to the right by the given amount.
+ *
+ * @method
+ * @param {number} numBits the number of bits by which to shift.
+ * @return {Timestamp} this shifted to the right by the given amount.
+ */
+ Timestamp.prototype.shiftRight = function (numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var high = this.high_;
+ if (numBits < 32) {
+ var low = this.low_;
+ return Timestamp.fromBits(low >>> numBits | high << 32 - numBits, high >> numBits);
+ } else {
+ return Timestamp.fromBits(high >> numBits - 32, high >= 0 ? 0 : -1);
+ }
+ }
+ };
+
+ /**
+ * Returns this Timestamp with bits shifted to the right by the given amount, with the new top bits matching the current sign bit.
+ *
+ * @method
+ * @param {number} numBits the number of bits by which to shift.
+ * @return {Timestamp} this shifted to the right by the given amount, with zeros placed into the new leading bits.
+ */
+ Timestamp.prototype.shiftRightUnsigned = function (numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var high = this.high_;
+ if (numBits < 32) {
+ var low = this.low_;
+ return Timestamp.fromBits(low >>> numBits | high << 32 - numBits, high >>> numBits);
+ } else if (numBits == 32) {
+ return Timestamp.fromBits(high, 0);
+ } else {
+ return Timestamp.fromBits(high >>> numBits - 32, 0);
+ }
+ }
+ };
+
+ /**
+ * Returns a Timestamp representing the given (32-bit) integer value.
+ *
+ * @method
+ * @param {number} value the 32-bit integer in question.
+ * @return {Timestamp} the corresponding Timestamp value.
+ */
+ Timestamp.fromInt = function (value) {
+ if (-128 <= value && value < 128) {
+ var cachedObj = Timestamp.INT_CACHE_[value];
+ if (cachedObj) {
+ return cachedObj;
+ }
+ }
+
+ var obj = new Timestamp(value | 0, value < 0 ? -1 : 0);
+ if (-128 <= value && value < 128) {
+ Timestamp.INT_CACHE_[value] = obj;
+ }
+ return obj;
+ };
+
+ /**
+ * Returns a Timestamp representing the given value, provided that it is a finite number. Otherwise, zero is returned.
+ *
+ * @method
+ * @param {number} value the number in question.
+ * @return {Timestamp} the corresponding Timestamp value.
+ */
+ Timestamp.fromNumber = function (value) {
+ if (isNaN(value) || !isFinite(value)) {
+ return Timestamp.ZERO;
+ } else if (value <= -Timestamp.TWO_PWR_63_DBL_) {
+ return Timestamp.MIN_VALUE;
+ } else if (value + 1 >= Timestamp.TWO_PWR_63_DBL_) {
+ return Timestamp.MAX_VALUE;
+ } else if (value < 0) {
+ return Timestamp.fromNumber(-value).negate();
+ } else {
+ return new Timestamp(value % Timestamp.TWO_PWR_32_DBL_ | 0, value / Timestamp.TWO_PWR_32_DBL_ | 0);
+ }
+ };
+
+ /**
+ * Returns a Timestamp representing the 64-bit integer that comes by concatenating the given high and low bits. Each is assumed to use 32 bits.
+ *
+ * @method
+ * @param {number} lowBits the low 32-bits.
+ * @param {number} highBits the high 32-bits.
+ * @return {Timestamp} the corresponding Timestamp value.
+ */
+ Timestamp.fromBits = function (lowBits, highBits) {
+ return new Timestamp(lowBits, highBits);
+ };
+
+ /**
+ * Returns a Timestamp representation of the given string, written using the given radix.
+ *
+ * @method
+ * @param {string} str the textual representation of the Timestamp.
+ * @param {number} opt_radix the radix in which the text is written.
+ * @return {Timestamp} the corresponding Timestamp value.
+ */
+ Timestamp.fromString = function (str, opt_radix) {
+ if (str.length == 0) {
+ throw Error('number format error: empty string');
+ }
+
+ var radix = opt_radix || 10;
+ if (radix < 2 || 36 < radix) {
+ throw Error('radix out of range: ' + radix);
+ }
+
+ if (str.charAt(0) == '-') {
+ return Timestamp.fromString(str.substring(1), radix).negate();
+ } else if (str.indexOf('-') >= 0) {
+ throw Error('number format error: interior "-" character: ' + str);
+ }
+
+ // Do several (8) digits each time through the loop, so as to
+ // minimize the calls to the very expensive emulated div.
+ var radixToPower = Timestamp.fromNumber(Math.pow(radix, 8));
+
+ var result = Timestamp.ZERO;
+ for (var i = 0; i < str.length; i += 8) {
+ var size = Math.min(8, str.length - i);
+ var value = parseInt(str.substring(i, i + size), radix);
+ if (size < 8) {
+ var power = Timestamp.fromNumber(Math.pow(radix, size));
+ result = result.multiply(power).add(Timestamp.fromNumber(value));
+ } else {
+ result = result.multiply(radixToPower);
+ result = result.add(Timestamp.fromNumber(value));
+ }
+ }
+ return result;
+ };
+
+ // NOTE: Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the
+ // from* methods on which they depend.
+
+
+ /**
+ * A cache of the Timestamp representations of small integer values.
+ * @type {Object}
+ * @ignore
+ */
+ Timestamp.INT_CACHE_ = {};
+
+ // NOTE: the compiler should inline these constant values below and then remove
+ // these variables, so there should be no runtime penalty for these.
+
+ /**
+ * Number used repeated below in calculations. This must appear before the
+ * first call to any from* function below.
+ * @type {number}
+ * @ignore
+ */
+ Timestamp.TWO_PWR_16_DBL_ = 1 << 16;
+
+ /**
+ * @type {number}
+ * @ignore
+ */
+ Timestamp.TWO_PWR_24_DBL_ = 1 << 24;
+
+ /**
+ * @type {number}
+ * @ignore
+ */
+ Timestamp.TWO_PWR_32_DBL_ = Timestamp.TWO_PWR_16_DBL_ * Timestamp.TWO_PWR_16_DBL_;
+
+ /**
+ * @type {number}
+ * @ignore
+ */
+ Timestamp.TWO_PWR_31_DBL_ = Timestamp.TWO_PWR_32_DBL_ / 2;
+
+ /**
+ * @type {number}
+ * @ignore
+ */
+ Timestamp.TWO_PWR_48_DBL_ = Timestamp.TWO_PWR_32_DBL_ * Timestamp.TWO_PWR_16_DBL_;
+
+ /**
+ * @type {number}
+ * @ignore
+ */
+ Timestamp.TWO_PWR_64_DBL_ = Timestamp.TWO_PWR_32_DBL_ * Timestamp.TWO_PWR_32_DBL_;
+
+ /**
+ * @type {number}
+ * @ignore
+ */
+ Timestamp.TWO_PWR_63_DBL_ = Timestamp.TWO_PWR_64_DBL_ / 2;
+
+ /** @type {Timestamp} */
+ Timestamp.ZERO = Timestamp.fromInt(0);
+
+ /** @type {Timestamp} */
+ Timestamp.ONE = Timestamp.fromInt(1);
+
+ /** @type {Timestamp} */
+ Timestamp.NEG_ONE = Timestamp.fromInt(-1);
+
+ /** @type {Timestamp} */
+ Timestamp.MAX_VALUE = Timestamp.fromBits(0xFFFFFFFF | 0, 0x7FFFFFFF | 0);
+
+ /** @type {Timestamp} */
+ Timestamp.MIN_VALUE = Timestamp.fromBits(0, 0x80000000 | 0);
+
+ /**
+ * @type {Timestamp}
+ * @ignore
+ */
+ Timestamp.TWO_PWR_24_ = Timestamp.fromInt(1 << 24);
+
+ /**
+ * Expose.
+ */
+ module.exports = Timestamp;
+ module.exports.Timestamp = Timestamp;
+
+/***/ },
+/* 309 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(process, Buffer) {/**
+ * Machine id.
+ *
+ * Create a random 3-byte value (i.e. unique for this
+ * process). Other drivers use a md5 of the machine id here, but
+ * that would mean an asyc call to gethostname, so we don't bother.
+ * @ignore
+ */
+ var MACHINE_ID = parseInt(Math.random() * 0xFFFFFF, 10);
+
+ // Regular expression that checks for hex value
+ var checkForHexRegExp = new RegExp("^[0-9a-fA-F]{24}$");
+
+ /**
+ * Create a new ObjectID instance
+ *
+ * @class
+ * @param {(string|number)} id Can be a 24 byte hex string, 12 byte binary string or a Number.
+ * @property {number} generationTime The generation time of this ObjectId instance
+ * @return {ObjectID} instance of ObjectID.
+ */
+ var ObjectID = function ObjectID(id) {
+ // Duck-typing to support ObjectId from different npm packages
+ if (id instanceof ObjectID) return id;
+ if (!(this instanceof ObjectID)) return new ObjectID(id);
+
+ this._bsontype = 'ObjectID';
+
+ var __id = null;
+ var valid = ObjectID.isValid(id);
+
+ // Throw an error if it's not a valid setup
+ if (!valid && id != null) {
+ throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");
+ } else if (valid && typeof id == 'string' && id.length == 24) {
+ return ObjectID.createFromHexString(id);
+ } else if (id == null || typeof id == 'number') {
+ // convert to 12 byte binary string
+ this.id = this.generate(id);
+ } else if (id != null && id.length === 12) {
+ // assume 12 byte string
+ this.id = id;
+ } else if (id != null && id.toHexString) {
+ // Duck-typing to support ObjectId from different npm packages
+ return id;
+ } else {
+ throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");
+ }
+
+ if (ObjectID.cacheHexString) this.__id = this.toHexString();
+ };
+
+ // Allow usage of ObjectId as well as ObjectID
+ var ObjectId = ObjectID;
+
+ // Precomputed hex table enables speedy hex string conversion
+ var hexTable = [];
+ for (var i = 0; i < 256; i++) {
+ hexTable[i] = (i <= 15 ? '0' : '') + i.toString(16);
+ }
+
+ /**
+ * Return the ObjectID id as a 24 byte hex string representation
+ *
+ * @method
+ * @return {string} return the 24 byte hex string representation.
+ */
+ ObjectID.prototype.toHexString = function () {
+ if (ObjectID.cacheHexString && this.__id) return this.__id;
+
+ var hexString = '';
+ if (!this.id || !this.id.length) {
+ throw new Error('invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is [' + JSON.stringify(this.id) + ']');
+ }
+
+ if (this.id instanceof _Buffer) {
+ hexString = convertToHex(this.id);
+ if (ObjectID.cacheHexString) this.__id = hexString;
+ return hexString;
+ }
+
+ for (var i = 0; i < this.id.length; i++) {
+ hexString += hexTable[this.id.charCodeAt(i)];
+ }
+
+ if (ObjectID.cacheHexString) this.__id = hexString;
+ return hexString;
+ };
+
+ /**
+ * Update the ObjectID index used in generating new ObjectID's on the driver
+ *
+ * @method
+ * @return {number} returns next index value.
+ * @ignore
+ */
+ ObjectID.prototype.get_inc = function () {
+ return ObjectID.index = (ObjectID.index + 1) % 0xFFFFFF;
+ };
+
+ /**
+ * Update the ObjectID index used in generating new ObjectID's on the driver
+ *
+ * @method
+ * @return {number} returns next index value.
+ * @ignore
+ */
+ ObjectID.prototype.getInc = function () {
+ return this.get_inc();
+ };
+
+ /**
+ * Generate a 12 byte id buffer used in ObjectID's
+ *
+ * @method
+ * @param {number} [time] optional parameter allowing to pass in a second based timestamp.
+ * @return {Buffer} return the 12 byte id buffer string.
+ */
+ ObjectID.prototype.generate = function (time) {
+ if ('number' != typeof time) {
+ time = ~~(Date.now() / 1000);
+ }
+
+ // Use pid
+ var pid = (typeof process === 'undefined' ? Math.floor(Math.random() * 100000) : process.pid) % 0xFFFF;
+ var inc = this.get_inc();
+ // Buffer used
+ var buffer = new Buffer(12);
+ // Encode time
+ buffer[3] = time & 0xff;
+ buffer[2] = time >> 8 & 0xff;
+ buffer[1] = time >> 16 & 0xff;
+ buffer[0] = time >> 24 & 0xff;
+ // Encode machine
+ buffer[6] = MACHINE_ID & 0xff;
+ buffer[5] = MACHINE_ID >> 8 & 0xff;
+ buffer[4] = MACHINE_ID >> 16 & 0xff;
+ // Encode pid
+ buffer[8] = pid & 0xff;
+ buffer[7] = pid >> 8 & 0xff;
+ // Encode index
+ buffer[11] = inc & 0xff;
+ buffer[10] = inc >> 8 & 0xff;
+ buffer[9] = inc >> 16 & 0xff;
+ // Return the buffer
+ return buffer;
+ };
+
+ /**
+ * Converts the id into a 24 byte hex string for printing
+ *
+ * @return {String} return the 24 byte hex string representation.
+ * @ignore
+ */
+ ObjectID.prototype.toString = function () {
+ return this.toHexString();
+ };
+
+ /**
+ * Converts to a string representation of this Id.
+ *
+ * @return {String} return the 24 byte hex string representation.
+ * @ignore
+ */
+ ObjectID.prototype.inspect = ObjectID.prototype.toString;
+
+ /**
+ * Converts to its JSON representation.
+ *
+ * @return {String} return the 24 byte hex string representation.
+ * @ignore
+ */
+ ObjectID.prototype.toJSON = function () {
+ return this.toHexString();
+ };
+
+ /**
+ * Compares the equality of this ObjectID with `otherID`.
+ *
+ * @method
+ * @param {object} otherID ObjectID instance to compare against.
+ * @return {boolean} the result of comparing two ObjectID's
+ */
+ ObjectID.prototype.equals = function equals(otherId) {
+ var id;
+
+ if (otherId instanceof ObjectID) {
+ return this.toString() == otherId.toString();
+ } else if (typeof otherId == 'string' && ObjectID.isValid(otherId) && otherId.length == 12 && this.id instanceof _Buffer) {
+ return otherId === this.id.toString('binary');
+ } else if (typeof otherId == 'string' && ObjectID.isValid(otherId) && otherId.length == 24) {
+ return otherId.toLowerCase() === this.toHexString();
+ } else if (typeof otherId == 'string' && ObjectID.isValid(otherId) && otherId.length == 12) {
+ return otherId === this.id;
+ } else if (otherId != null && (otherId instanceof ObjectID || otherId.toHexString)) {
+ return otherId.toHexString() === this.toHexString();
+ } else {
+ return false;
+ }
+ };
+
+ /**
+ * Returns the generation date (accurate up to the second) that this ID was generated.
+ *
+ * @method
+ * @return {date} the generation date
+ */
+ ObjectID.prototype.getTimestamp = function () {
+ var timestamp = new Date();
+ var time = this.id[3] | this.id[2] << 8 | this.id[1] << 16 | this.id[0] << 24;
+ timestamp.setTime(Math.floor(time) * 1000);
+ return timestamp;
+ };
+
+ /**
+ * @ignore
+ */
+ ObjectID.index = ~~(Math.random() * 0xFFFFFF);
+
+ /**
+ * @ignore
+ */
+ ObjectID.createPk = function createPk() {
+ return new ObjectID();
+ };
+
+ /**
+ * Creates an ObjectID from a second based number, with the rest of the ObjectID zeroed out. Used for comparisons or sorting the ObjectID.
+ *
+ * @method
+ * @param {number} time an integer number representing a number of seconds.
+ * @return {ObjectID} return the created ObjectID
+ */
+ ObjectID.createFromTime = function createFromTime(time) {
+ var buffer = new Buffer([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
+ // Encode time into first 4 bytes
+ buffer[3] = time & 0xff;
+ buffer[2] = time >> 8 & 0xff;
+ buffer[1] = time >> 16 & 0xff;
+ buffer[0] = time >> 24 & 0xff;
+ // Return the new objectId
+ return new ObjectID(buffer);
+ };
+
+ // Lookup tables
+ var encodeLookup = '0123456789abcdef'.split('');
+ var decodeLookup = [];
+ var i = 0;
+ while (i < 10) decodeLookup[0x30 + i] = i++;
+ while (i < 16) decodeLookup[0x41 - 10 + i] = decodeLookup[0x61 - 10 + i] = i++;
+
+ var _Buffer = Buffer;
+ var convertToHex = function (bytes) {
+ return bytes.toString('hex');
+ };
+
+ /**
+ * Creates an ObjectID from a hex string representation of an ObjectID.
+ *
+ * @method
+ * @param {string} hexString create a ObjectID from a passed in 24 byte hexstring.
+ * @return {ObjectID} return the created ObjectID
+ */
+ ObjectID.createFromHexString = function createFromHexString(string) {
+ // Throw an error if it's not a valid setup
+ if (typeof string === 'undefined' || string != null && string.length != 24) throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");
+
+ var length = string.length;
+
+ if (length > 12 * 2) {
+ throw new Error('Id cannot be longer than 12 bytes');
+ }
+
+ // Calculate lengths
+ var sizeof = length >> 1;
+ var array = new _Buffer(sizeof);
+ var n = 0;
+ var i = 0;
+
+ while (i < length) {
+ array[n++] = decodeLookup[string.charCodeAt(i++)] << 4 | decodeLookup[string.charCodeAt(i++)];
+ }
+
+ return new ObjectID(array);
+ };
+
+ /**
+ * Checks if a value is a valid bson ObjectId
+ *
+ * @method
+ * @return {boolean} return true if the value is a valid bson ObjectId, return false otherwise.
+ */
+ ObjectID.isValid = function isValid(id) {
+ if (id == null) return false;
+
+ if (typeof id == 'number') {
+ return true;
+ }
+
+ if (typeof id == 'string') {
+ return id.length == 12 || id.length == 24 && checkForHexRegExp.test(id);
+ }
+
+ if (id instanceof ObjectID) {
+ return true;
+ }
+
+ if (id instanceof _Buffer) {
+ return true;
+ }
+
+ // Duck-Typing detection of ObjectId like objects
+ if (id.toHexString) {
+ return id.id.length == 12 || id.id.length == 24 && checkForHexRegExp.test(id.id);
+ }
+
+ return false;
+ };
+
+ /**
+ * @ignore
+ */
+ Object.defineProperty(ObjectID.prototype, "generationTime", {
+ enumerable: true,
+ get: function () {
+ return this.id[3] | this.id[2] << 8 | this.id[1] << 16 | this.id[0] << 24;
+ },
+ set: function (value) {
+ // Encode time into first 4 bytes
+ this.id[3] = value & 0xff;
+ this.id[2] = value >> 8 & 0xff;
+ this.id[1] = value >> 16 & 0xff;
+ this.id[0] = value >> 24 & 0xff;
+ }
+ });
+
+ /**
+ * Expose.
+ */
+ module.exports = ObjectID;
+ module.exports.ObjectID = ObjectID;
+ module.exports.ObjectId = ObjectID;
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(294), __webpack_require__(300).Buffer))
+
+/***/ },
+/* 310 */
+/***/ function(module, exports) {
+
+ /**
+ * A class representation of the BSON RegExp type.
+ *
+ * @class
+ * @return {BSONRegExp} A MinKey instance
+ */
+ function BSONRegExp(pattern, options) {
+ if (!(this instanceof BSONRegExp)) return new BSONRegExp();
+
+ // Execute
+ this._bsontype = 'BSONRegExp';
+ this.pattern = pattern || '';
+ this.options = options || '';
+
+ // Validate options
+ for (var i = 0; i < this.options.length; i++) {
+ if (!(this.options[i] == 'i' || this.options[i] == 'm' || this.options[i] == 'x' || this.options[i] == 'l' || this.options[i] == 's' || this.options[i] == 'u')) {
+ throw new Error('the regular expression options [' + this.options[i] + "] is not supported");
+ }
+ }
+ }
+
+ module.exports = BSONRegExp;
+ module.exports.BSONRegExp = BSONRegExp;
+
+/***/ },
+/* 311 */
+/***/ function(module, exports) {
+
+ /**
+ * A class representation of the BSON Symbol type.
+ *
+ * @class
+ * @deprecated
+ * @param {string} value the string representing the symbol.
+ * @return {Symbol}
+ */
+ function Symbol(value) {
+ if (!(this instanceof Symbol)) return new Symbol(value);
+ this._bsontype = 'Symbol';
+ this.value = value;
+ }
+
+ /**
+ * Access the wrapped string value.
+ *
+ * @method
+ * @return {String} returns the wrapped string.
+ */
+ Symbol.prototype.valueOf = function () {
+ return this.value;
+ };
+
+ /**
+ * @ignore
+ */
+ Symbol.prototype.toString = function () {
+ return this.value;
+ };
+
+ /**
+ * @ignore
+ */
+ Symbol.prototype.inspect = function () {
+ return this.value;
+ };
+
+ /**
+ * @ignore
+ */
+ Symbol.prototype.toJSON = function () {
+ return this.value;
+ };
+
+ module.exports = Symbol;
+ module.exports.Symbol = Symbol;
+
+/***/ },
+/* 312 */
+/***/ function(module, exports) {
+
+ var Int32 = function (value) {
+ if (!(this instanceof Int32)) return new Int32(value);
+
+ this._bsontype = 'Int32';
+ this.value = value;
+ };
+
+ /**
+ * Access the number value.
+ *
+ * @method
+ * @return {number} returns the wrapped int32 number.
+ */
+ Int32.prototype.valueOf = function () {
+ return this.value;
+ };
+
+ /**
+ * @ignore
+ */
+ Int32.prototype.toJSON = function () {
+ return this.value;
+ };
+
+ module.exports = Int32;
+ module.exports.Int32 = Int32;
+
+/***/ },
+/* 313 */
+/***/ function(module, exports) {
+
+ /**
+ * A class representation of the BSON Code type.
+ *
+ * @class
+ * @param {(string|function)} code a string or function.
+ * @param {Object} [scope] an optional scope for the function.
+ * @return {Code}
+ */
+ var Code = function Code(code, scope) {
+ if (!(this instanceof Code)) return new Code(code, scope);
+ this._bsontype = 'Code';
+ this.code = code;
+ this.scope = scope;
+ };
+
+ /**
+ * @ignore
+ */
+ Code.prototype.toJSON = function () {
+ return { scope: this.scope, code: this.code };
+ };
+
+ module.exports = Code;
+ module.exports.Code = Code;
+
+/***/ },
+/* 314 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(Buffer) {"use strict";
+
+ var Long = __webpack_require__(306);
+
+ var PARSE_STRING_REGEXP = /^(\+|\-)?(\d+|(\d*\.\d*))?(E|e)?([\-\+])?(\d+)?$/;
+ var PARSE_INF_REGEXP = /^(\+|\-)?(Infinity|inf)$/i;
+ var PARSE_NAN_REGEXP = /^(\+|\-)?NaN$/i;
+
+ var EXPONENT_MAX = 6111;
+ var EXPONENT_MIN = -6176;
+ var EXPONENT_BIAS = 6176;
+ var MAX_DIGITS = 34;
+
+ // Nan value bits as 32 bit values (due to lack of longs)
+ var NAN_BUFFER = [0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00].reverse();
+ // Infinity value bits 32 bit values (due to lack of longs)
+ var INF_NEGATIVE_BUFFER = [0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00].reverse();
+ var INF_POSITIVE_BUFFER = [0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00].reverse();
+
+ var EXPONENT_REGEX = /^([\-\+])?(\d+)?$/;
+
+ // Detect if the value is a digit
+ var isDigit = function (value) {
+ return !isNaN(parseInt(value, 10));
+ };
+
+ // Divide two uint128 values
+ var divideu128 = function (value) {
+ var DIVISOR = Long.fromNumber(1000 * 1000 * 1000);
+ var _rem = Long.fromNumber(0);
+ var i = 0;
+
+ if (!value.parts[0] && !value.parts[1] && !value.parts[2] && !value.parts[3]) {
+ return { quotient: value, rem: _rem };
+ }
+
+ for (var i = 0; i <= 3; i++) {
+ // Adjust remainder to match value of next dividend
+ _rem = _rem.shiftLeft(32);
+ // Add the divided to _rem
+ _rem = _rem.add(new Long(value.parts[i], 0));
+ value.parts[i] = _rem.div(DIVISOR).low_;
+ _rem = _rem.modulo(DIVISOR);
+ }
+
+ return { quotient: value, rem: _rem };
+ };
+
+ // Multiply two Long values and return the 128 bit value
+ var multiply64x2 = function (left, right) {
+ if (!left && !right) {
+ return { high: Long.fromNumber(0), low: Long.fromNumber(0) };
+ }
+
+ var leftHigh = left.shiftRightUnsigned(32);
+ var leftLow = new Long(left.getLowBits(), 0);
+ var rightHigh = right.shiftRightUnsigned(32);
+ var rightLow = new Long(right.getLowBits(), 0);
+
+ var productHigh = leftHigh.multiply(rightHigh);
+ var productMid = leftHigh.multiply(rightLow);
+ var productMid2 = leftLow.multiply(rightHigh);
+ var productLow = leftLow.multiply(rightLow);
+
+ productHigh = productHigh.add(productMid.shiftRightUnsigned(32));
+ productMid = new Long(productMid.getLowBits(), 0).add(productMid2).add(productLow.shiftRightUnsigned(32));
+
+ productHigh = productHigh.add(productMid.shiftRightUnsigned(32));
+ productLow = productMid.shiftLeft(32).add(new Long(productLow.getLowBits(), 0));
+
+ // Return the 128 bit result
+ return { high: productHigh, low: productLow };
+ };
+
+ var lessThan = function (left, right) {
+ // Make values unsigned
+ var uhleft = left.high_ >>> 0;
+ var uhright = right.high_ >>> 0;
+
+ // Compare high bits first
+ if (uhleft < uhright) {
+ return true;
+ } else if (uhleft == uhright) {
+ var ulleft = left.low_ >>> 0;
+ var ulright = right.low_ >>> 0;
+ if (ulleft < ulright) return true;
+ }
+
+ return false;
+ };
+
+ var longtoHex = function (value) {
+ var buffer = new Buffer(8);
+ var index = 0;
+ // Encode the low 64 bits of the decimal
+ // Encode low bits
+ buffer[index++] = value.low_ & 0xff;
+ buffer[index++] = value.low_ >> 8 & 0xff;
+ buffer[index++] = value.low_ >> 16 & 0xff;
+ buffer[index++] = value.low_ >> 24 & 0xff;
+ // Encode high bits
+ buffer[index++] = value.high_ & 0xff;
+ buffer[index++] = value.high_ >> 8 & 0xff;
+ buffer[index++] = value.high_ >> 16 & 0xff;
+ buffer[index++] = value.high_ >> 24 & 0xff;
+ return buffer.reverse().toString('hex');
+ };
+
+ var int32toHex = function (value) {
+ var buffer = new Buffer(4);
+ var index = 0;
+ // Encode the low 64 bits of the decimal
+ // Encode low bits
+ buffer[index++] = value & 0xff;
+ buffer[index++] = value >> 8 & 0xff;
+ buffer[index++] = value >> 16 & 0xff;
+ buffer[index++] = value >> 24 & 0xff;
+ return buffer.reverse().toString('hex');
+ };
+
+ var Decimal128 = function (bytes) {
+ this._bsontype = 'Decimal128';
+ this.bytes = bytes;
+ };
+
+ Decimal128.fromString = function (string) {
+ // Parse state tracking
+ var isNegative = false;
+ var sawRadix = false;
+ var foundNonZero = false;
+
+ // Total number of significant digits (no leading or trailing zero)
+ var significantDigits = 0;
+ // Total number of significand digits read
+ var nDigitsRead = 0;
+ // Total number of digits (no leading zeros)
+ var nDigits = 0;
+ // The number of the digits after radix
+ var radixPosition = 0;
+ // The index of the first non-zero in *str*
+ var firstNonZero = 0;
+
+ // Digits Array
+ var digits = [0];
+ // The number of digits in digits
+ var nDigitsStored = 0;
+ // Insertion pointer for digits
+ var digitsInsert = 0;
+ // The index of the first non-zero digit
+ var firstDigit = 0;
+ // The index of the last digit
+ var lastDigit = 0;
+
+ // Exponent
+ var exponent = 0;
+ // loop index over array
+ var i = 0;
+ // The high 17 digits of the significand
+ var significandHigh = [0, 0];
+ // The low 17 digits of the significand
+ var significandLow = [0, 0];
+ // The biased exponent
+ var biasedExponent = 0;
+
+ // Read index
+ var index = 0;
+
+ // Trim the string
+ string = string.trim();
+
+ // Results
+ var stringMatch = string.match(PARSE_STRING_REGEXP);
+ var infMatch = string.match(PARSE_INF_REGEXP);
+ var nanMatch = string.match(PARSE_NAN_REGEXP);
+
+ // Validate the string
+ if (!stringMatch && !infMatch && !nanMatch || string.length == 0) {
+ throw new Error("" + string + " not a valid Decimal128 string");
+ }
+
+ // Check if we have an illegal exponent format
+ if (stringMatch && stringMatch[4] && stringMatch[2] === undefined) {
+ throw new Error("" + string + " not a valid Decimal128 string");
+ }
+
+ // Get the negative or positive sign
+ if (string[index] == '+' || string[index] == '-') {
+ isNegative = string[index++] == '-';
+ }
+
+ // Check if user passed Infinity or NaN
+ if (!isDigit(string[index]) && string[index] != '.') {
+ if (string[index] == 'i' || string[index] == 'I') {
+ return new Decimal128(new Buffer(isNegative ? INF_NEGATIVE_BUFFER : INF_POSITIVE_BUFFER));
+ } else if (string[index] == 'N') {
+ return new Decimal128(new Buffer(NAN_BUFFER));
+ }
+ }
+
+ // Read all the digits
+ while (isDigit(string[index]) || string[index] == '.') {
+ if (string[index] == '.') {
+ if (sawRadix) {
+ return new Decimal128(new Buffer(NAN_BUFFER));
+ }
+
+ sawRadix = true;
+ index = index + 1;
+ continue;
+ }
+
+ if (nDigitsStored < 34) {
+ if (string[index] != '0' || foundNonZero) {
+ if (!foundNonZero) {
+ firstNonZero = nDigitsRead;
+ }
+
+ foundNonZero = true;
+
+ // Only store 34 digits
+ digits[digitsInsert++] = parseInt(string[index], 10);
+ nDigitsStored = nDigitsStored + 1;
+ }
+ }
+
+ if (foundNonZero) {
+ nDigits = nDigits + 1;
+ }
+
+ if (sawRadix) {
+ radixPosition = radixPosition + 1;
+ }
+
+ nDigitsRead = nDigitsRead + 1;
+ index = index + 1;
+ }
+
+ if (sawRadix && !nDigitsRead) {
+ throw new Error("" + string + " not a valid Decimal128 string");
+ }
+
+ // Read exponent if exists
+ if (string[index] == 'e' || string[index] == 'E') {
+ // Read exponent digits
+ var match = string.substr(++index).match(EXPONENT_REGEX);
+
+ // No digits read
+ if (!match || !match[2]) {
+ return new Decimal128(new Buffer(NAN_BUFFER));
+ }
+
+ // Get exponent
+ exponent = parseInt(match[0], 10);
+
+ // Adjust the index
+ index = index + match[0].length;
+ }
+
+ // Return not a number
+ if (string[index]) {
+ return new Decimal128(new Buffer(NAN_BUFFER));
+ }
+
+ // Done reading input
+ // Find first non-zero digit in digits
+ firstDigit = 0;
+
+ if (!nDigitsStored) {
+ firstDigit = 0;
+ lastDigit = 0;
+ digits[0] = 0;
+ nDigits = 1;
+ nDigitsStored = 1;
+ significantDigits = 0;
+ } else {
+ lastDigit = nDigitsStored - 1;
+ significantDigits = nDigits;
+
+ if (exponent != 0 && significantDigits != 1) {
+ while (string[firstNonZero + significantDigits - 1] == '0') {
+ significantDigits = significantDigits - 1;
+ }
+ }
+ }
+
+ // Normalization of exponent
+ // Correct exponent based on radix position, and shift significand as needed
+ // to represent user input
+
+ // Overflow prevention
+ if (exponent <= radixPosition && radixPosition - exponent > 1 << 14) {
+ exponent = EXPONENT_MIN;
+ } else {
+ exponent = exponent - radixPosition;
+ }
+
+ // Attempt to normalize the exponent
+ while (exponent > EXPONENT_MAX) {
+ // Shift exponent to significand and decrease
+ lastDigit = lastDigit + 1;
+
+ if (lastDigit - firstDigit > MAX_DIGITS) {
+ // Check if we have a zero then just hard clamp, otherwise fail
+ var digitsString = digits.join('');
+ if (digitsString.match(/^0+$/)) {
+ exponent = EXPONENT_MAX;
+ break;
+ } else {
+ return new Decimal128(new Buffer(isNegative ? INF_NEGATIVE_BUFFER : INF_POSITIVE_BUFFER));
+ }
+ }
+
+ exponent = exponent - 1;
+ }
+
+ while (exponent < EXPONENT_MIN || nDigitsStored < nDigits) {
+ // Shift last digit
+ if (lastDigit == 0) {
+ exponent = EXPONENT_MIN;
+ significantDigits = 0;
+ break;
+ }
+
+ if (nDigitsStored < nDigits) {
+ // adjust to match digits not stored
+ nDigits = nDigits - 1;
+ } else {
+ // adjust to round
+ lastDigit = lastDigit - 1;
+ }
+
+ if (exponent < EXPONENT_MAX) {
+ exponent = exponent + 1;
+ } else {
+ // Check if we have a zero then just hard clamp, otherwise fail
+ var digitsString = digits.join('');
+ if (digitsString.match(/^0+$/)) {
+ exponent = EXPONENT_MAX;
+ break;
+ } else {
+ return new Decimal128(new Buffer(isNegative ? INF_NEGATIVE_BUFFER : INF_POSITIVE_BUFFER));
+ }
+ }
+ }
+
+ // Round
+ // We've normalized the exponent, but might still need to round.
+ if (lastDigit - firstDigit + 1 < significantDigits && string[significantDigits] != '0') {
+ var endOfString = nDigitsRead;
+
+ // If we have seen a radix point, 'string' is 1 longer than we have
+ // documented with ndigits_read, so inc the position of the first nonzero
+ // digit and the position that digits are read to.
+ if (sawRadix && exponent == EXPONENT_MIN) {
+ firstNonZero = firstNonZero + 1;
+ endOfString = endOfString + 1;
+ }
+
+ var roundDigit = parseInt(string[firstNonZero + lastDigit + 1], 10);
+ var roundBit = 0;
+
+ if (roundDigit >= 5) {
+ roundBit = 1;
+
+ if (roundDigit == 5) {
+ roundBit = digits[lastDigit] % 2 == 1;
+
+ for (var i = firstNonZero + lastDigit + 2; i < endOfString; i++) {
+ if (parseInt(string[i], 10)) {
+ roundBit = 1;
+ break;
+ }
+ }
+ }
+ }
+
+ if (roundBit) {
+ var dIdx = lastDigit;
+
+ for (; dIdx >= 0; dIdx--) {
+ if (++digits[dIdx] > 9) {
+ digits[dIdx] = 0;
+
+ // overflowed most significant digit
+ if (dIdx == 0) {
+ if (exponent < EXPONENT_MAX) {
+ exponent = exponent + 1;
+ digits[dIdx] = 1;
+ } else {
+ return new Decimal128(new Buffer(isNegative ? INF_NEGATIVE_BUFFER : INF_POSITIVE_BUFFER));
+ }
+ }
+ } else {
+ break;
+ }
+ }
+ }
+ }
+
+ // Encode significand
+ // The high 17 digits of the significand
+ significandHigh = Long.fromNumber(0);
+ // The low 17 digits of the significand
+ significandLow = Long.fromNumber(0);
+
+ // read a zero
+ if (significantDigits == 0) {
+ significandHigh = Long.fromNumber(0);
+ significandLow = Long.fromNumber(0);
+ } else if (lastDigit - firstDigit < 17) {
+ var dIdx = firstDigit;
+ significandLow = Long.fromNumber(digits[dIdx++]);
+ significandHigh = new Long(0, 0);
+
+ for (; dIdx <= lastDigit; dIdx++) {
+ significandLow = significandLow.multiply(Long.fromNumber(10));
+ significandLow = significandLow.add(Long.fromNumber(digits[dIdx]));
+ }
+ } else {
+ var dIdx = firstDigit;
+ significandHigh = Long.fromNumber(digits[dIdx++]);
+
+ for (; dIdx <= lastDigit - 17; dIdx++) {
+ significandHigh = significandHigh.multiply(Long.fromNumber(10));
+ significandHigh = significandHigh.add(Long.fromNumber(digits[dIdx]));
+ }
+
+ significandLow = Long.fromNumber(digits[dIdx++]);
+
+ for (; dIdx <= lastDigit; dIdx++) {
+ significandLow = significandLow.multiply(Long.fromNumber(10));
+ significandLow = significandLow.add(Long.fromNumber(digits[dIdx]));
+ }
+ }
+
+ var significand = multiply64x2(significandHigh, Long.fromString("100000000000000000"));
+
+ significand.low = significand.low.add(significandLow);
+
+ if (lessThan(significand.low, significandLow)) {
+ significand.high = significand.high.add(Long.fromNumber(1));
+ }
+
+ // Biased exponent
+ var biasedExponent = exponent + EXPONENT_BIAS;
+ var dec = { low: Long.fromNumber(0), high: Long.fromNumber(0) };
+
+ // Encode combination, exponent, and significand.
+ if (significand.high.shiftRightUnsigned(49).and(Long.fromNumber(1)).equals(Long.fromNumber)) {
+ // Encode '11' into bits 1 to 3
+ dec.high = dec.high.or(Long.fromNumber(0x3).shiftLeft(61));
+ dec.high = dec.high.or(Long.fromNumber(biasedExponent).and(Long.fromNumber(0x3fff).shiftLeft(47)));
+ dec.high = dec.high.or(significand.high.and(Long.fromNumber(0x7fffffffffff)));
+ } else {
+ dec.high = dec.high.or(Long.fromNumber(biasedExponent & 0x3fff).shiftLeft(49));
+ dec.high = dec.high.or(significand.high.and(Long.fromNumber(0x1ffffffffffff)));
+ }
+
+ dec.low = significand.low;
+
+ // Encode sign
+ if (isNegative) {
+ dec.high = dec.high.or(Long.fromString('9223372036854775808'));
+ }
+
+ // Encode into a buffer
+ var buffer = new Buffer(16);
+ var index = 0;
+
+ // Encode the low 64 bits of the decimal
+ // Encode low bits
+ buffer[index++] = dec.low.low_ & 0xff;
+ buffer[index++] = dec.low.low_ >> 8 & 0xff;
+ buffer[index++] = dec.low.low_ >> 16 & 0xff;
+ buffer[index++] = dec.low.low_ >> 24 & 0xff;
+ // Encode high bits
+ buffer[index++] = dec.low.high_ & 0xff;
+ buffer[index++] = dec.low.high_ >> 8 & 0xff;
+ buffer[index++] = dec.low.high_ >> 16 & 0xff;
+ buffer[index++] = dec.low.high_ >> 24 & 0xff;
+
+ // Encode the high 64 bits of the decimal
+ // Encode low bits
+ buffer[index++] = dec.high.low_ & 0xff;
+ buffer[index++] = dec.high.low_ >> 8 & 0xff;
+ buffer[index++] = dec.high.low_ >> 16 & 0xff;
+ buffer[index++] = dec.high.low_ >> 24 & 0xff;
+ // Encode high bits
+ buffer[index++] = dec.high.high_ & 0xff;
+ buffer[index++] = dec.high.high_ >> 8 & 0xff;
+ buffer[index++] = dec.high.high_ >> 16 & 0xff;
+ buffer[index++] = dec.high.high_ >> 24 & 0xff;
+
+ // Return the new Decimal128
+ return new Decimal128(buffer);
+ };
+
+ // Extract least significant 5 bits
+ var COMBINATION_MASK = 0x1f;
+ // Extract least significant 14 bits
+ var EXPONENT_MASK = 0x3fff;
+ // Value of combination field for Inf
+ var COMBINATION_INFINITY = 30;
+ // Value of combination field for NaN
+ var COMBINATION_NAN = 31;
+ // Value of combination field for NaN
+ var COMBINATION_SNAN = 32;
+ // decimal128 exponent bias
+ var EXPONENT_BIAS = 6176;
+
+ Decimal128.prototype.toString = function () {
+ // Note: bits in this routine are referred to starting at 0,
+ // from the sign bit, towards the coefficient.
+
+ // bits 0 - 31
+ var high;
+ // bits 32 - 63
+ var midh;
+ // bits 64 - 95
+ var midl;
+ // bits 96 - 127
+ var low;
+ // bits 1 - 5
+ var combination;
+ // decoded biased exponent (14 bits)
+ var biased_exponent;
+ // the number of significand digits
+ var significand_digits = 0;
+ // the base-10 digits in the significand
+ var significand = new Array(36);
+ for (var i = 0; i < significand.length; i++) significand[i] = 0;
+ // read pointer into significand
+ var index = 0;
+
+ // unbiased exponent
+ var exponent;
+ // the exponent if scientific notation is used
+ var scientific_exponent;
+
+ // true if the number is zero
+ var is_zero = false;
+
+ // the most signifcant significand bits (50-46)
+ var significand_msb;
+ // temporary storage for significand decoding
+ var significand128 = { parts: new Array(4) };
+ // indexing variables
+ var i;
+ var j, k;
+
+ // Output string
+ var string = [];
+
+ // Unpack index
+ var index = 0;
+
+ // Buffer reference
+ var buffer = this.bytes;
+
+ // Unpack the low 64bits into a long
+ low = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ midl = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+
+ // Unpack the high 64bits into a long
+ midh = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ high = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+
+ // Unpack index
+ var index = 0;
+
+ // Create the state of the decimal
+ var dec = {
+ low: new Long(low, midl),
+ high: new Long(midh, high) };
+
+ if (dec.high.lessThan(Long.ZERO)) {
+ string.push('-');
+ }
+
+ // Decode combination field and exponent
+ combination = high >> 26 & COMBINATION_MASK;
+
+ if (combination >> 3 == 3) {
+ // Check for 'special' values
+ if (combination == COMBINATION_INFINITY) {
+ return string.join('') + "Infinity";
+ } else if (combination == COMBINATION_NAN) {
+ return "NaN";
+ } else {
+ biased_exponent = high >> 15 & EXPONENT_MASK;
+ significand_msb = 0x08 + (high >> 14 & 0x01);
+ }
+ } else {
+ significand_msb = high >> 14 & 0x07;
+ biased_exponent = high >> 17 & EXPONENT_MASK;
+ }
+
+ exponent = biased_exponent - EXPONENT_BIAS;
+
+ // Create string of significand digits
+
+ // Convert the 114-bit binary number represented by
+ // (significand_high, significand_low) to at most 34 decimal
+ // digits through modulo and division.
+ significand128.parts[0] = (high & 0x3fff) + ((significand_msb & 0xf) << 14);
+ significand128.parts[1] = midh;
+ significand128.parts[2] = midl;
+ significand128.parts[3] = low;
+
+ if (significand128.parts[0] == 0 && significand128.parts[1] == 0 && significand128.parts[2] == 0 && significand128.parts[3] == 0) {
+ is_zero = true;
+ } else {
+ for (var k = 3; k >= 0; k--) {
+ var least_digits = 0;
+ // Peform the divide
+ var result = divideu128(significand128);
+ significand128 = result.quotient;
+ least_digits = result.rem.low_;
+
+ // We now have the 9 least significant digits (in base 2).
+ // Convert and output to string.
+ if (!least_digits) continue;
+
+ for (var j = 8; j >= 0; j--) {
+ // significand[k * 9 + j] = Math.round(least_digits % 10);
+ significand[k * 9 + j] = least_digits % 10;
+ // least_digits = Math.round(least_digits / 10);
+ least_digits = Math.floor(least_digits / 10);
+ }
+ }
+ }
+
+ // Output format options:
+ // Scientific - [-]d.dddE(+/-)dd or [-]dE(+/-)dd
+ // Regular - ddd.ddd
+
+ if (is_zero) {
+ significand_digits = 1;
+ significand[index] = 0;
+ } else {
+ significand_digits = 36;
+ var i = 0;
+
+ while (!significand[index]) {
+ i++;
+ significand_digits = significand_digits - 1;
+ index = index + 1;
+ }
+ }
+
+ scientific_exponent = significand_digits - 1 + exponent;
+
+ // The scientific exponent checks are dictated by the string conversion
+ // specification and are somewhat arbitrary cutoffs.
+ //
+ // We must check exponent > 0, because if this is the case, the number
+ // has trailing zeros. However, we *cannot* output these trailing zeros,
+ // because doing so would change the precision of the value, and would
+ // change stored data if the string converted number is round tripped.
+
+ if (scientific_exponent >= 34 || scientific_exponent <= -7 || exponent > 0) {
+ // Scientific format
+ string.push(significand[index++]);
+ significand_digits = significand_digits - 1;
+
+ if (significand_digits) {
+ string.push('.');
+ }
+
+ for (var i = 0; i < significand_digits; i++) {
+ string.push(significand[index++]);
+ }
+
+ // Exponent
+ string.push('E');
+ if (scientific_exponent > 0) {
+ string.push('+' + scientific_exponent);
+ } else {
+ string.push(scientific_exponent);
+ }
+ } else {
+ // Regular format with no decimal place
+ if (exponent >= 0) {
+ for (var i = 0; i < significand_digits; i++) {
+ string.push(significand[index++]);
+ }
+ } else {
+ var radix_position = significand_digits + exponent;
+
+ // non-zero digits before radix
+ if (radix_position > 0) {
+ for (var i = 0; i < radix_position; i++) {
+ string.push(significand[index++]);
+ }
+ } else {
+ string.push('0');
+ }
+
+ string.push('.');
+ // add leading zeros after radix
+ while (radix_position++ < 0) {
+ string.push('0');
+ }
+
+ for (var i = 0; i < significand_digits - Math.max(radix_position - 1, 0); i++) {
+ string.push(significand[index++]);
+ }
+ }
+ }
+
+ return string.join('');
+ };
+
+ Decimal128.prototype.toJSON = function () {
+ return { "$numberDecimal": this.toString() };
+ };
+
+ module.exports = Decimal128;
+ module.exports.Decimal128 = Decimal128;
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(300).Buffer))
+
+/***/ },
+/* 315 */
+/***/ function(module, exports) {
+
+ /**
+ * A class representation of the BSON MinKey type.
+ *
+ * @class
+ * @return {MinKey} A MinKey instance
+ */
+ function MinKey() {
+ if (!(this instanceof MinKey)) return new MinKey();
+
+ this._bsontype = 'MinKey';
+ }
+
+ module.exports = MinKey;
+ module.exports.MinKey = MinKey;
+
+/***/ },
+/* 316 */
+/***/ function(module, exports) {
+
+ /**
+ * A class representation of the BSON MaxKey type.
+ *
+ * @class
+ * @return {MaxKey} A MaxKey instance
+ */
+ function MaxKey() {
+ if (!(this instanceof MaxKey)) return new MaxKey();
+
+ this._bsontype = 'MaxKey';
+ }
+
+ module.exports = MaxKey;
+ module.exports.MaxKey = MaxKey;
+
+/***/ },
+/* 317 */
+/***/ function(module, exports) {
+
+ /**
+ * A class representation of the BSON DBRef type.
+ *
+ * @class
+ * @param {string} namespace the collection name.
+ * @param {ObjectID} oid the reference ObjectID.
+ * @param {string} [db] optional db name, if omitted the reference is local to the current db.
+ * @return {DBRef}
+ */
+ function DBRef(namespace, oid, db) {
+ if (!(this instanceof DBRef)) return new DBRef(namespace, oid, db);
+
+ this._bsontype = 'DBRef';
+ this.namespace = namespace;
+ this.oid = oid;
+ this.db = db;
+ };
+
+ /**
+ * @ignore
+ * @api private
+ */
+ DBRef.prototype.toJSON = function () {
+ return {
+ '$ref': this.namespace,
+ '$id': this.oid,
+ '$db': this.db == null ? '' : this.db
+ };
+ };
+
+ module.exports = DBRef;
+ module.exports.DBRef = DBRef;
+
+/***/ },
+/* 318 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(global) {/**
+ * Module dependencies.
+ * @ignore
+ */
+
+ // Test if we're in Node via presence of "global" not absence of "window"
+ // to support hybrid environments like Electron
+ if (typeof global !== 'undefined') {
+ var Buffer = __webpack_require__(300).Buffer; // TODO just use global Buffer
+ }
+
+ /**
+ * A class representation of the BSON Binary type.
+ *
+ * Sub types
+ * - **BSON.BSON_BINARY_SUBTYPE_DEFAULT**, default BSON type.
+ * - **BSON.BSON_BINARY_SUBTYPE_FUNCTION**, BSON function type.
+ * - **BSON.BSON_BINARY_SUBTYPE_BYTE_ARRAY**, BSON byte array type.
+ * - **BSON.BSON_BINARY_SUBTYPE_UUID**, BSON uuid type.
+ * - **BSON.BSON_BINARY_SUBTYPE_MD5**, BSON md5 type.
+ * - **BSON.BSON_BINARY_SUBTYPE_USER_DEFINED**, BSON user defined type.
+ *
+ * @class
+ * @param {Buffer} buffer a buffer object containing the binary data.
+ * @param {Number} [subType] the option binary type.
+ * @return {Binary}
+ */
+ function Binary(buffer, subType) {
+ if (!(this instanceof Binary)) return new Binary(buffer, subType);
+
+ this._bsontype = 'Binary';
+
+ if (buffer instanceof Number) {
+ this.sub_type = buffer;
+ this.position = 0;
+ } else {
+ this.sub_type = subType == null ? BSON_BINARY_SUBTYPE_DEFAULT : subType;
+ this.position = 0;
+ }
+
+ if (buffer != null && !(buffer instanceof Number)) {
+ // Only accept Buffer, Uint8Array or Arrays
+ if (typeof buffer == 'string') {
+ // Different ways of writing the length of the string for the different types
+ if (typeof Buffer != 'undefined') {
+ this.buffer = new Buffer(buffer);
+ } else if (typeof Uint8Array != 'undefined' || Object.prototype.toString.call(buffer) == '[object Array]') {
+ this.buffer = writeStringToArray(buffer);
+ } else {
+ throw new Error("only String, Buffer, Uint8Array or Array accepted");
+ }
+ } else {
+ this.buffer = buffer;
+ }
+ this.position = buffer.length;
+ } else {
+ if (typeof Buffer != 'undefined') {
+ this.buffer = new Buffer(Binary.BUFFER_SIZE);
+ } else if (typeof Uint8Array != 'undefined') {
+ this.buffer = new Uint8Array(new ArrayBuffer(Binary.BUFFER_SIZE));
+ } else {
+ this.buffer = new Array(Binary.BUFFER_SIZE);
+ }
+ // Set position to start of buffer
+ this.position = 0;
+ }
+ };
+
+ /**
+ * Updates this binary with byte_value.
+ *
+ * @method
+ * @param {string} byte_value a single byte we wish to write.
+ */
+ Binary.prototype.put = function put(byte_value) {
+ // If it's a string and a has more than one character throw an error
+ if (byte_value['length'] != null && typeof byte_value != 'number' && byte_value.length != 1) throw new Error("only accepts single character String, Uint8Array or Array");
+ if (typeof byte_value != 'number' && byte_value < 0 || byte_value > 255) throw new Error("only accepts number in a valid unsigned byte range 0-255");
+
+ // Decode the byte value once
+ var decoded_byte = null;
+ if (typeof byte_value == 'string') {
+ decoded_byte = byte_value.charCodeAt(0);
+ } else if (byte_value['length'] != null) {
+ decoded_byte = byte_value[0];
+ } else {
+ decoded_byte = byte_value;
+ }
+
+ if (this.buffer.length > this.position) {
+ this.buffer[this.position++] = decoded_byte;
+ } else {
+ if (typeof Buffer != 'undefined' && Buffer.isBuffer(this.buffer)) {
+ // Create additional overflow buffer
+ var buffer = new Buffer(Binary.BUFFER_SIZE + this.buffer.length);
+ // Combine the two buffers together
+ this.buffer.copy(buffer, 0, 0, this.buffer.length);
+ this.buffer = buffer;
+ this.buffer[this.position++] = decoded_byte;
+ } else {
+ var buffer = null;
+ // Create a new buffer (typed or normal array)
+ if (Object.prototype.toString.call(this.buffer) == '[object Uint8Array]') {
+ buffer = new Uint8Array(new ArrayBuffer(Binary.BUFFER_SIZE + this.buffer.length));
+ } else {
+ buffer = new Array(Binary.BUFFER_SIZE + this.buffer.length);
+ }
+
+ // We need to copy all the content to the new array
+ for (var i = 0; i < this.buffer.length; i++) {
+ buffer[i] = this.buffer[i];
+ }
+
+ // Reassign the buffer
+ this.buffer = buffer;
+ // Write the byte
+ this.buffer[this.position++] = decoded_byte;
+ }
+ }
+ };
+
+ /**
+ * Writes a buffer or string to the binary.
+ *
+ * @method
+ * @param {(Buffer|string)} string a string or buffer to be written to the Binary BSON object.
+ * @param {number} offset specify the binary of where to write the content.
+ * @return {null}
+ */
+ Binary.prototype.write = function write(string, offset) {
+ offset = typeof offset == 'number' ? offset : this.position;
+
+ // If the buffer is to small let's extend the buffer
+ if (this.buffer.length < offset + string.length) {
+ var buffer = null;
+ // If we are in node.js
+ if (typeof Buffer != 'undefined' && Buffer.isBuffer(this.buffer)) {
+ buffer = new Buffer(this.buffer.length + string.length);
+ this.buffer.copy(buffer, 0, 0, this.buffer.length);
+ } else if (Object.prototype.toString.call(this.buffer) == '[object Uint8Array]') {
+ // Create a new buffer
+ buffer = new Uint8Array(new ArrayBuffer(this.buffer.length + string.length));
+ // Copy the content
+ for (var i = 0; i < this.position; i++) {
+ buffer[i] = this.buffer[i];
+ }
+ }
+
+ // Assign the new buffer
+ this.buffer = buffer;
+ }
+
+ if (typeof Buffer != 'undefined' && Buffer.isBuffer(string) && Buffer.isBuffer(this.buffer)) {
+ string.copy(this.buffer, offset, 0, string.length);
+ this.position = offset + string.length > this.position ? offset + string.length : this.position;
+ // offset = string.length
+ } else if (typeof Buffer != 'undefined' && typeof string == 'string' && Buffer.isBuffer(this.buffer)) {
+ this.buffer.write(string, offset, 'binary');
+ this.position = offset + string.length > this.position ? offset + string.length : this.position;
+ // offset = string.length;
+ } else if (Object.prototype.toString.call(string) == '[object Uint8Array]' || Object.prototype.toString.call(string) == '[object Array]' && typeof string != 'string') {
+ for (var i = 0; i < string.length; i++) {
+ this.buffer[offset++] = string[i];
+ }
+
+ this.position = offset > this.position ? offset : this.position;
+ } else if (typeof string == 'string') {
+ for (var i = 0; i < string.length; i++) {
+ this.buffer[offset++] = string.charCodeAt(i);
+ }
+
+ this.position = offset > this.position ? offset : this.position;
+ }
+ };
+
+ /**
+ * Reads **length** bytes starting at **position**.
+ *
+ * @method
+ * @param {number} position read from the given position in the Binary.
+ * @param {number} length the number of bytes to read.
+ * @return {Buffer}
+ */
+ Binary.prototype.read = function read(position, length) {
+ length = length && length > 0 ? length : this.position;
+
+ // Let's return the data based on the type we have
+ if (this.buffer['slice']) {
+ return this.buffer.slice(position, position + length);
+ } else {
+ // Create a buffer to keep the result
+ var buffer = typeof Uint8Array != 'undefined' ? new Uint8Array(new ArrayBuffer(length)) : new Array(length);
+ for (var i = 0; i < length; i++) {
+ buffer[i] = this.buffer[position++];
+ }
+ }
+ // Return the buffer
+ return buffer;
+ };
+
+ /**
+ * Returns the value of this binary as a string.
+ *
+ * @method
+ * @return {string}
+ */
+ Binary.prototype.value = function value(asRaw) {
+ asRaw = asRaw == null ? false : asRaw;
+
+ // Optimize to serialize for the situation where the data == size of buffer
+ if (asRaw && typeof Buffer != 'undefined' && Buffer.isBuffer(this.buffer) && this.buffer.length == this.position) return this.buffer;
+
+ // If it's a node.js buffer object
+ if (typeof Buffer != 'undefined' && Buffer.isBuffer(this.buffer)) {
+ return asRaw ? this.buffer.slice(0, this.position) : this.buffer.toString('binary', 0, this.position);
+ } else {
+ if (asRaw) {
+ // we support the slice command use it
+ if (this.buffer['slice'] != null) {
+ return this.buffer.slice(0, this.position);
+ } else {
+ // Create a new buffer to copy content to
+ var newBuffer = Object.prototype.toString.call(this.buffer) == '[object Uint8Array]' ? new Uint8Array(new ArrayBuffer(this.position)) : new Array(this.position);
+ // Copy content
+ for (var i = 0; i < this.position; i++) {
+ newBuffer[i] = this.buffer[i];
+ }
+ // Return the buffer
+ return newBuffer;
+ }
+ } else {
+ return convertArraytoUtf8BinaryString(this.buffer, 0, this.position);
+ }
+ }
+ };
+
+ /**
+ * Length.
+ *
+ * @method
+ * @return {number} the length of the binary.
+ */
+ Binary.prototype.length = function length() {
+ return this.position;
+ };
+
+ /**
+ * @ignore
+ */
+ Binary.prototype.toJSON = function () {
+ return this.buffer != null ? this.buffer.toString('base64') : '';
+ };
+
+ /**
+ * @ignore
+ */
+ Binary.prototype.toString = function (format) {
+ return this.buffer != null ? this.buffer.slice(0, this.position).toString(format) : '';
+ };
+
+ /**
+ * Binary default subtype
+ * @ignore
+ */
+ var BSON_BINARY_SUBTYPE_DEFAULT = 0;
+
+ /**
+ * @ignore
+ */
+ var writeStringToArray = function (data) {
+ // Create a buffer
+ var buffer = typeof Uint8Array != 'undefined' ? new Uint8Array(new ArrayBuffer(data.length)) : new Array(data.length);
+ // Write the content to the buffer
+ for (var i = 0; i < data.length; i++) {
+ buffer[i] = data.charCodeAt(i);
+ }
+ // Write the string to the buffer
+ return buffer;
+ };
+
+ /**
+ * Convert Array ot Uint8Array to Binary String
+ *
+ * @ignore
+ */
+ var convertArraytoUtf8BinaryString = function (byteArray, startIndex, endIndex) {
+ var result = "";
+ for (var i = startIndex; i < endIndex; i++) {
+ result = result + String.fromCharCode(byteArray[i]);
+ }
+ return result;
+ };
+
+ Binary.BUFFER_SIZE = 256;
+
+ /**
+ * Default BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+ Binary.SUBTYPE_DEFAULT = 0;
+ /**
+ * Function BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+ Binary.SUBTYPE_FUNCTION = 1;
+ /**
+ * Byte Array BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+ Binary.SUBTYPE_BYTE_ARRAY = 2;
+ /**
+ * OLD UUID BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+ Binary.SUBTYPE_UUID_OLD = 3;
+ /**
+ * UUID BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+ Binary.SUBTYPE_UUID = 4;
+ /**
+ * MD5 BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+ Binary.SUBTYPE_MD5 = 5;
+ /**
+ * User BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+ Binary.SUBTYPE_USER_DEFINED = 128;
+
+ /**
+ * Expose.
+ */
+ module.exports = Binary;
+ module.exports.Binary = Binary;
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ },
+/* 319 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(Buffer) {"use strict";
+
+ var readIEEE754 = __webpack_require__(304).readIEEE754,
+ f = __webpack_require__(320).format,
+ Long = __webpack_require__(306).Long,
+ Double = __webpack_require__(307).Double,
+ Timestamp = __webpack_require__(308).Timestamp,
+ ObjectID = __webpack_require__(309).ObjectID,
+ Symbol = __webpack_require__(311).Symbol,
+ Code = __webpack_require__(313).Code,
+ MinKey = __webpack_require__(315).MinKey,
+ MaxKey = __webpack_require__(316).MaxKey,
+ Decimal128 = __webpack_require__(314),
+ Int32 = __webpack_require__(312),
+ DBRef = __webpack_require__(317).DBRef,
+ BSONRegExp = __webpack_require__(310).BSONRegExp,
+ Binary = __webpack_require__(318).Binary;
+
+ var deserialize = function (buffer, options, isArray) {
+ options = options == null ? {} : options;
+ var index = options && options.index ? options.index : 0;
+ // Read the document size
+ var size = buffer[index] | buffer[index + 1] << 8 | buffer[index + 2] << 16 | buffer[index + 3] << 24;
+
+ // Ensure buffer is valid size
+ if (size < 5 || buffer.length < size || size + index > buffer.length) {
+ throw new Error("corrupt bson message");
+ }
+
+ // Illegal end value
+ if (buffer[index + size - 1] != 0) {
+ throw new Error("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");
+ }
+
+ // Start deserializtion
+ return deserializeObject(buffer, index, options, isArray);
+ };
+
+ var deserializeObject = function (buffer, index, options, isArray) {
+ var evalFunctions = options['evalFunctions'] == null ? false : options['evalFunctions'];
+ var cacheFunctions = options['cacheFunctions'] == null ? false : options['cacheFunctions'];
+ var cacheFunctionsCrc32 = options['cacheFunctionsCrc32'] == null ? false : options['cacheFunctionsCrc32'];
+ var fieldsAsRaw = options['fieldsAsRaw'] == null ? null : options['fieldsAsRaw'];
+
+ // Return raw bson buffer instead of parsing it
+ var raw = options['raw'] == null ? false : options['raw'];
+
+ // Return BSONRegExp objects instead of native regular expressions
+ var bsonRegExp = typeof options['bsonRegExp'] == 'boolean' ? options['bsonRegExp'] : false;
+
+ // Controls the promotion of values vs wrapper classes
+ var promoteBuffers = options['promoteBuffers'] == null ? false : options['promoteBuffers'];
+ var promoteLongs = options['promoteLongs'] == null ? true : options['promoteLongs'];
+ var promoteValues = options['promoteValues'] == null ? true : options['promoteValues'];
+
+ // Set the start index
+ var startIndex = index;
+
+ // Validate that we have at least 4 bytes of buffer
+ if (buffer.length < 5) throw new Error("corrupt bson message < 5 bytes long");
+
+ // Read the document size
+ var size = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+
+ // Ensure buffer is valid size
+ if (size < 5 || size > buffer.length) throw new Error("corrupt bson message");
+
+ // Create holding object
+ var object = isArray ? [] : {};
+ // Used for arrays to skip having to perform utf8 decoding
+ var arrayIndex = 0;
+
+ // While we have more left data left keep parsing
+ while (true) {
+ // Read the type
+ var elementType = buffer[index++];
+ // If we get a zero it's the last byte, exit
+ if (elementType == 0) {
+ break;
+ }
+
+ // Get the start search index
+ var i = index;
+ // Locate the end of the c string
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+
+ // If are at the end of the buffer there is a problem with the document
+ if (i >= buffer.length) throw new Error("Bad BSON Document: illegal CString");
+ var name = isArray ? arrayIndex++ : buffer.toString('utf8', index, i);
+
+ index = i + 1;
+
+ if (elementType == BSON.BSON_DATA_STRING) {
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ if (stringSize <= 0 || stringSize > buffer.length - index || buffer[index + stringSize - 1] != 0) throw new Error("bad string length in bson");
+ object[name] = buffer.toString('utf8', index, index + stringSize - 1);
+ index = index + stringSize;
+ } else if (elementType == BSON.BSON_DATA_OID) {
+ var oid = new Buffer(12);
+ buffer.copy(oid, 0, index, index + 12);
+ object[name] = new ObjectID(oid);
+ index = index + 12;
+ } else if (elementType == BSON.BSON_DATA_INT && promoteValues == false) {
+ object[name] = new Int32(buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24);
+ } else if (elementType == BSON.BSON_DATA_INT) {
+ object[name] = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ } else if (elementType == BSON.BSON_DATA_NUMBER && promoteValues == false) {
+ object[name] = new Double(buffer.readDoubleLE(index));
+ index = index + 8;
+ } else if (elementType == BSON.BSON_DATA_NUMBER) {
+ object[name] = buffer.readDoubleLE(index);
+ index = index + 8;
+ } else if (elementType == BSON.BSON_DATA_DATE) {
+ var lowBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var highBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ object[name] = new Date(new Long(lowBits, highBits).toNumber());
+ } else if (elementType == BSON.BSON_DATA_BOOLEAN) {
+ if (buffer[index] != 0 && buffer[index] != 1) throw new Error('illegal boolean type value');
+ object[name] = buffer[index++] == 1;
+ } else if (elementType == BSON.BSON_DATA_OBJECT) {
+ var _index = index;
+ var objectSize = buffer[index] | buffer[index + 1] << 8 | buffer[index + 2] << 16 | buffer[index + 3] << 24;
+ if (objectSize <= 0 || objectSize > buffer.length - index) throw new Error("bad embedded document length in bson");
+
+ // We have a raw value
+ if (raw) {
+ object[name] = buffer.slice(index, index + objectSize);
+ } else {
+ object[name] = deserializeObject(buffer, _index, options, false);
+ }
+
+ index = index + objectSize;
+ } else if (elementType == BSON.BSON_DATA_ARRAY) {
+ var _index = index;
+ var objectSize = buffer[index] | buffer[index + 1] << 8 | buffer[index + 2] << 16 | buffer[index + 3] << 24;
+ var arrayOptions = options;
+
+ // Stop index
+ var stopIndex = index + objectSize;
+
+ // All elements of array to be returned as raw bson
+ if (fieldsAsRaw && fieldsAsRaw[name]) {
+ arrayOptions = {};
+ for (var n in options) arrayOptions[n] = options[n];
+ arrayOptions['raw'] = true;
+ }
+
+ object[name] = deserializeObject(buffer, _index, arrayOptions, true);
+ index = index + objectSize;
+
+ if (buffer[index - 1] != 0) throw new Error('invalid array terminator byte');
+ if (index != stopIndex) throw new Error('corrupted array bson');
+ } else if (elementType == BSON.BSON_DATA_UNDEFINED) {
+ object[name] = undefined;
+ } else if (elementType == BSON.BSON_DATA_NULL) {
+ object[name] = null;
+ } else if (elementType == BSON.BSON_DATA_LONG) {
+ // Unpack the low and high bits
+ var lowBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var highBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var long = new Long(lowBits, highBits);
+ // Promote the long if possible
+ if (promoteLongs && promoteValues == true) {
+ object[name] = long.lessThanOrEqual(JS_INT_MAX_LONG) && long.greaterThanOrEqual(JS_INT_MIN_LONG) ? long.toNumber() : long;
+ } else {
+ object[name] = long;
+ }
+ } else if (elementType == BSON.BSON_DATA_DECIMAL128) {
+ // Buffer to contain the decimal bytes
+ var bytes = new Buffer(16);
+ // Copy the next 16 bytes into the bytes buffer
+ buffer.copy(bytes, 0, index, index + 16);
+ // Update index
+ index = index + 16;
+ // Assign the new Decimal128 value
+ var decimal128 = new Decimal128(bytes);
+ // If we have an alternative mapper use that
+ object[name] = decimal128.toObject ? decimal128.toObject() : decimal128;
+ } else if (elementType == BSON.BSON_DATA_BINARY) {
+ var binarySize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var totalBinarySize = binarySize;
+ var subType = buffer[index++];
+
+ // Did we have a negative binary size, throw
+ if (binarySize < 0) throw new Error('Negative binary type element size found');
+
+ // Is the length longer than the document
+ if (binarySize > buffer.length) throw new Error('Binary type size larger than document size');
+
+ // Decode as raw Buffer object if options specifies it
+ if (buffer['slice'] != null) {
+ // If we have subtype 2 skip the 4 bytes for the size
+ if (subType == Binary.SUBTYPE_BYTE_ARRAY) {
+ binarySize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ if (binarySize < 0) throw new Error('Negative binary type element size found for subtype 0x02');
+ if (binarySize > totalBinarySize - 4) throw new Error('Binary type with subtype 0x02 contains to long binary size');
+ if (binarySize < totalBinarySize - 4) throw new Error('Binary type with subtype 0x02 contains to short binary size');
+ }
+
+ if (promoteBuffers && promoteValues) {
+ object[name] = buffer.slice(index, index + binarySize);
+ } else {
+ object[name] = new Binary(buffer.slice(index, index + binarySize), subType);
+ }
+ } else {
+ var _buffer = typeof Uint8Array != 'undefined' ? new Uint8Array(new ArrayBuffer(binarySize)) : new Array(binarySize);
+ // If we have subtype 2 skip the 4 bytes for the size
+ if (subType == Binary.SUBTYPE_BYTE_ARRAY) {
+ binarySize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ if (binarySize < 0) throw new Error('Negative binary type element size found for subtype 0x02');
+ if (binarySize > totalBinarySize - 4) throw new Error('Binary type with subtype 0x02 contains to long binary size');
+ if (binarySize < totalBinarySize - 4) throw new Error('Binary type with subtype 0x02 contains to short binary size');
+ }
+
+ // Copy the data
+ for (var i = 0; i < binarySize; i++) {
+ _buffer[i] = buffer[index + i];
+ }
+
+ if (promoteBuffers && promoteValues) {
+ object[name] = _buffer;
+ } else {
+ object[name] = new Binary(_buffer, subType);
+ }
+ }
+
+ // Update the index
+ index = index + binarySize;
+ } else if (elementType == BSON.BSON_DATA_REGEXP && bsonRegExp == false) {
+ // Get the start search index
+ var i = index;
+ // Locate the end of the c string
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ // If are at the end of the buffer there is a problem with the document
+ if (i >= buffer.length) throw new Error("Bad BSON Document: illegal CString");
+ // Return the C string
+ var source = buffer.toString('utf8', index, i);
+ // Create the regexp
+ index = i + 1;
+
+ // Get the start search index
+ var i = index;
+ // Locate the end of the c string
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ // If are at the end of the buffer there is a problem with the document
+ if (i >= buffer.length) throw new Error("Bad BSON Document: illegal CString");
+ // Return the C string
+ var regExpOptions = buffer.toString('utf8', index, i);
+ index = i + 1;
+
+ // For each option add the corresponding one for javascript
+ var optionsArray = new Array(regExpOptions.length);
+
+ // Parse options
+ for (var i = 0; i < regExpOptions.length; i++) {
+ switch (regExpOptions[i]) {
+ case 'm':
+ optionsArray[i] = 'm';
+ break;
+ case 's':
+ optionsArray[i] = 'g';
+ break;
+ case 'i':
+ optionsArray[i] = 'i';
+ break;
+ }
+ }
+
+ object[name] = new RegExp(source, optionsArray.join(''));
+ } else if (elementType == BSON.BSON_DATA_REGEXP && bsonRegExp == true) {
+ // Get the start search index
+ var i = index;
+ // Locate the end of the c string
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ // If are at the end of the buffer there is a problem with the document
+ if (i >= buffer.length) throw new Error("Bad BSON Document: illegal CString");
+ // Return the C string
+ var source = buffer.toString('utf8', index, i);
+ index = i + 1;
+
+ // Get the start search index
+ var i = index;
+ // Locate the end of the c string
+ while (buffer[i] !== 0x00 && i < buffer.length) {
+ i++;
+ }
+ // If are at the end of the buffer there is a problem with the document
+ if (i >= buffer.length) throw new Error("Bad BSON Document: illegal CString");
+ // Return the C string
+ var regExpOptions = buffer.toString('utf8', index, i);
+ index = i + 1;
+
+ // Set the object
+ object[name] = new BSONRegExp(source, regExpOptions);
+ } else if (elementType == BSON.BSON_DATA_SYMBOL) {
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ if (stringSize <= 0 || stringSize > buffer.length - index || buffer[index + stringSize - 1] != 0) throw new Error("bad string length in bson");
+ object[name] = new Symbol(buffer.toString('utf8', index, index + stringSize - 1));
+ index = index + stringSize;
+ } else if (elementType == BSON.BSON_DATA_TIMESTAMP) {
+ var lowBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var highBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ object[name] = new Timestamp(lowBits, highBits);
+ } else if (elementType == BSON.BSON_DATA_MIN_KEY) {
+ object[name] = new MinKey();
+ } else if (elementType == BSON.BSON_DATA_MAX_KEY) {
+ object[name] = new MaxKey();
+ } else if (elementType == BSON.BSON_DATA_CODE) {
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ if (stringSize <= 0 || stringSize > buffer.length - index || buffer[index + stringSize - 1] != 0) throw new Error("bad string length in bson");
+ var functionString = buffer.toString('utf8', index, index + stringSize - 1);
+
+ // If we are evaluating the functions
+ if (evalFunctions) {
+ var value = null;
+ // If we have cache enabled let's look for the md5 of the function in the cache
+ if (cacheFunctions) {
+ var hash = cacheFunctionsCrc32 ? crc32(functionString) : functionString;
+ // Got to do this to avoid V8 deoptimizing the call due to finding eval
+ object[name] = isolateEvalWithHash(functionCache, hash, functionString, object);
+ } else {
+ object[name] = isolateEval(functionString);
+ }
+ } else {
+ object[name] = new Code(functionString);
+ }
+
+ // Update parse index position
+ index = index + stringSize;
+ } else if (elementType == BSON.BSON_DATA_CODE_W_SCOPE) {
+ var totalSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+
+ // Element cannot be shorter than totalSize + stringSize + documentSize + terminator
+ if (totalSize < 4 + 4 + 4 + 1) {
+ throw new Error("code_w_scope total size shorter minimum expected length");
+ }
+
+ // Get the code string size
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ // Check if we have a valid string
+ if (stringSize <= 0 || stringSize > buffer.length - index || buffer[index + stringSize - 1] != 0) throw new Error("bad string length in bson");
+
+ // Javascript function
+ var functionString = buffer.toString('utf8', index, index + stringSize - 1);
+ // Update parse index position
+ index = index + stringSize;
+ // Parse the element
+ var _index = index;
+ // Decode the size of the object document
+ var objectSize = buffer[index] | buffer[index + 1] << 8 | buffer[index + 2] << 16 | buffer[index + 3] << 24;
+ // Decode the scope object
+ var scopeObject = deserializeObject(buffer, _index, options, false);
+ // Adjust the index
+ index = index + objectSize;
+
+ // Check if field length is to short
+ if (totalSize < 4 + 4 + objectSize + stringSize) {
+ throw new Error('code_w_scope total size is to short, truncating scope');
+ }
+
+ // Check if totalSize field is to long
+ if (totalSize > 4 + 4 + objectSize + stringSize) {
+ throw new Error('code_w_scope total size is to long, clips outer document');
+ }
+
+ // If we are evaluating the functions
+ if (evalFunctions) {
+ // Contains the value we are going to set
+ var value = null;
+ // If we have cache enabled let's look for the md5 of the function in the cache
+ if (cacheFunctions) {
+ var hash = cacheFunctionsCrc32 ? crc32(functionString) : functionString;
+ // Got to do this to avoid V8 deoptimizing the call due to finding eval
+ object[name] = isolateEvalWithHash(functionCache, hash, functionString, object);
+ } else {
+ object[name] = isolateEval(functionString);
+ }
+
+ object[name].scope = scopeObject;
+ } else {
+ object[name] = new Code(functionString, scopeObject);
+ }
+ } else if (elementType == BSON.BSON_DATA_DBPOINTER) {
+ // Get the code string size
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ // Check if we have a valid string
+ if (stringSize <= 0 || stringSize > buffer.length - index || buffer[index + stringSize - 1] != 0) throw new Error("bad string length in bson");
+ // Namespace
+ var namespace = buffer.toString('utf8', index, index + stringSize - 1);
+ // Update parse index position
+ index = index + stringSize;
+
+ // Read the oid
+ var oidBuffer = new Buffer(12);
+ buffer.copy(oidBuffer, 0, index, index + 12);
+ var oid = new ObjectID(oidBuffer);
+
+ // Update the index
+ index = index + 12;
+
+ // Split the namespace
+ var parts = namespace.split('.');
+ var db = parts.shift();
+ var collection = parts.join('.');
+ // Upgrade to DBRef type
+ object[name] = new DBRef(collection, oid, db);
+ } else {
+ throw new Error("Detected unknown BSON type " + elementType.toString(16) + " for fieldname \"" + name + "\", are you using the latest BSON parser");
+ }
+ }
+
+ // Check if the deserialization was against a valid array/object
+ if (size != index - startIndex) {
+ if (isArray) throw new Error('corrupt array bson');
+ throw new Error('corrupt object bson');
+ }
+
+ // Check if we have a db ref object
+ if (object['$id'] != null) object = new DBRef(object['$ref'], object['$id'], object['$db']);
+ return object;
+ };
+
+ /**
+ * Ensure eval is isolated.
+ *
+ * @ignore
+ * @api private
+ */
+ var isolateEvalWithHash = function (functionCache, hash, functionString, object) {
+ // Contains the value we are going to set
+ var value = null;
+
+ // Check for cache hit, eval if missing and return cached function
+ if (functionCache[hash] == null) {
+ eval("value = " + functionString);
+ functionCache[hash] = value;
+ }
+ // Set the object
+ return functionCache[hash].bind(object);
+ };
+
+ /**
+ * Ensure eval is isolated.
+ *
+ * @ignore
+ * @api private
+ */
+ var isolateEval = function (functionString) {
+ // Contains the value we are going to set
+ var value = null;
+ // Eval the function
+ eval("value = " + functionString);
+ return value;
+ };
+
+ var BSON = {};
+
+ /**
+ * Contains the function cache if we have that enable to allow for avoiding the eval step on each deserialization, comparison is by md5
+ *
+ * @ignore
+ * @api private
+ */
+ var functionCache = BSON.functionCache = {};
+
+ /**
+ * Number BSON Type
+ *
+ * @classconstant BSON_DATA_NUMBER
+ **/
+ BSON.BSON_DATA_NUMBER = 1;
+ /**
+ * String BSON Type
+ *
+ * @classconstant BSON_DATA_STRING
+ **/
+ BSON.BSON_DATA_STRING = 2;
+ /**
+ * Object BSON Type
+ *
+ * @classconstant BSON_DATA_OBJECT
+ **/
+ BSON.BSON_DATA_OBJECT = 3;
+ /**
+ * Array BSON Type
+ *
+ * @classconstant BSON_DATA_ARRAY
+ **/
+ BSON.BSON_DATA_ARRAY = 4;
+ /**
+ * Binary BSON Type
+ *
+ * @classconstant BSON_DATA_BINARY
+ **/
+ BSON.BSON_DATA_BINARY = 5;
+ /**
+ * Binary BSON Type
+ *
+ * @classconstant BSON_DATA_UNDEFINED
+ **/
+ BSON.BSON_DATA_UNDEFINED = 6;
+ /**
+ * ObjectID BSON Type
+ *
+ * @classconstant BSON_DATA_OID
+ **/
+ BSON.BSON_DATA_OID = 7;
+ /**
+ * Boolean BSON Type
+ *
+ * @classconstant BSON_DATA_BOOLEAN
+ **/
+ BSON.BSON_DATA_BOOLEAN = 8;
+ /**
+ * Date BSON Type
+ *
+ * @classconstant BSON_DATA_DATE
+ **/
+ BSON.BSON_DATA_DATE = 9;
+ /**
+ * null BSON Type
+ *
+ * @classconstant BSON_DATA_NULL
+ **/
+ BSON.BSON_DATA_NULL = 10;
+ /**
+ * RegExp BSON Type
+ *
+ * @classconstant BSON_DATA_REGEXP
+ **/
+ BSON.BSON_DATA_REGEXP = 11;
+ /**
+ * Code BSON Type
+ *
+ * @classconstant BSON_DATA_DBPOINTER
+ **/
+ BSON.BSON_DATA_DBPOINTER = 12;
+ /**
+ * Code BSON Type
+ *
+ * @classconstant BSON_DATA_CODE
+ **/
+ BSON.BSON_DATA_CODE = 13;
+ /**
+ * Symbol BSON Type
+ *
+ * @classconstant BSON_DATA_SYMBOL
+ **/
+ BSON.BSON_DATA_SYMBOL = 14;
+ /**
+ * Code with Scope BSON Type
+ *
+ * @classconstant BSON_DATA_CODE_W_SCOPE
+ **/
+ BSON.BSON_DATA_CODE_W_SCOPE = 15;
+ /**
+ * 32 bit Integer BSON Type
+ *
+ * @classconstant BSON_DATA_INT
+ **/
+ BSON.BSON_DATA_INT = 16;
+ /**
+ * Timestamp BSON Type
+ *
+ * @classconstant BSON_DATA_TIMESTAMP
+ **/
+ BSON.BSON_DATA_TIMESTAMP = 17;
+ /**
+ * Long BSON Type
+ *
+ * @classconstant BSON_DATA_LONG
+ **/
+ BSON.BSON_DATA_LONG = 18;
+ /**
+ * Long BSON Type
+ *
+ * @classconstant BSON_DATA_DECIMAL128
+ **/
+ BSON.BSON_DATA_DECIMAL128 = 19;
+ /**
+ * MinKey BSON Type
+ *
+ * @classconstant BSON_DATA_MIN_KEY
+ **/
+ BSON.BSON_DATA_MIN_KEY = 0xff;
+ /**
+ * MaxKey BSON Type
+ *
+ * @classconstant BSON_DATA_MAX_KEY
+ **/
+ BSON.BSON_DATA_MAX_KEY = 0x7f;
+
+ /**
+ * Binary Default Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_DEFAULT
+ **/
+ BSON.BSON_BINARY_SUBTYPE_DEFAULT = 0;
+ /**
+ * Binary Function Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_FUNCTION
+ **/
+ BSON.BSON_BINARY_SUBTYPE_FUNCTION = 1;
+ /**
+ * Binary Byte Array Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_BYTE_ARRAY
+ **/
+ BSON.BSON_BINARY_SUBTYPE_BYTE_ARRAY = 2;
+ /**
+ * Binary UUID Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_UUID
+ **/
+ BSON.BSON_BINARY_SUBTYPE_UUID = 3;
+ /**
+ * Binary MD5 Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_MD5
+ **/
+ BSON.BSON_BINARY_SUBTYPE_MD5 = 4;
+ /**
+ * Binary User Defined Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_USER_DEFINED
+ **/
+ BSON.BSON_BINARY_SUBTYPE_USER_DEFINED = 128;
+
+ // BSON MAX VALUES
+ BSON.BSON_INT32_MAX = 0x7FFFFFFF;
+ BSON.BSON_INT32_MIN = -0x80000000;
+
+ BSON.BSON_INT64_MAX = Math.pow(2, 63) - 1;
+ BSON.BSON_INT64_MIN = -Math.pow(2, 63);
+
+ // JS MAX PRECISE VALUES
+ BSON.JS_INT_MAX = 0x20000000000000; // Any integer up to 2^53 can be precisely represented by a double.
+ BSON.JS_INT_MIN = -0x20000000000000; // Any integer down to -2^53 can be precisely represented by a double.
+
+ // Internal long versions
+ var JS_INT_MAX_LONG = Long.fromNumber(0x20000000000000); // Any integer up to 2^53 can be precisely represented by a double.
+ var JS_INT_MIN_LONG = Long.fromNumber(-0x20000000000000); // Any integer down to -2^53 can be precisely represented by a double.
+
+ module.exports = deserialize;
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(300).Buffer))
+
+/***/ },
+/* 320 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.
+ //
+ // Permission is hereby granted, free of charge, to any person obtaining a
+ // copy of this software and associated documentation files (the
+ // "Software"), to deal in the Software without restriction, including
+ // without limitation the rights to use, copy, modify, merge, publish,
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
+ // persons to whom the Software is furnished to do so, subject to the
+ // following conditions:
+ //
+ // The above copyright notice and this permission notice shall be included
+ // in all copies or substantial portions of the Software.
+ //
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ var formatRegExp = /%[sdj%]/g;
+ exports.format = function(f) {
+ if (!isString(f)) {
+ var objects = [];
+ for (var i = 0; i < arguments.length; i++) {
+ objects.push(inspect(arguments[i]));
+ }
+ return objects.join(' ');
+ }
+
+ var i = 1;
+ var args = arguments;
+ var len = args.length;
+ var str = String(f).replace(formatRegExp, function(x) {
+ if (x === '%%') return '%';
+ if (i >= len) return x;
+ switch (x) {
+ case '%s': return String(args[i++]);
+ case '%d': return Number(args[i++]);
+ case '%j':
+ try {
+ return JSON.stringify(args[i++]);
+ } catch (_) {
+ return '[Circular]';
+ }
+ default:
+ return x;
+ }
+ });
+ for (var x = args[i]; i < len; x = args[++i]) {
+ if (isNull(x) || !isObject(x)) {
+ str += ' ' + x;
+ } else {
+ str += ' ' + inspect(x);
+ }
+ }
+ return str;
+ };
+
+
+ // Mark that a method should not be used.
+ // Returns a modified function which warns once by default.
+ // If --no-deprecation is set, then it is a no-op.
+ exports.deprecate = function(fn, msg) {
+ // Allow for deprecating things in the process of starting up.
+ if (isUndefined(global.process)) {
+ return function() {
+ return exports.deprecate(fn, msg).apply(this, arguments);
+ };
+ }
+
+ if (process.noDeprecation === true) {
+ return fn;
+ }
+
+ var warned = false;
+ function deprecated() {
+ if (!warned) {
+ if (process.throwDeprecation) {
+ throw new Error(msg);
+ } else if (process.traceDeprecation) {
+ console.trace(msg);
+ } else {
+ console.error(msg);
+ }
+ warned = true;
+ }
+ return fn.apply(this, arguments);
+ }
+
+ return deprecated;
+ };
+
+
+ var debugs = {};
+ var debugEnviron;
+ exports.debuglog = function(set) {
+ if (isUndefined(debugEnviron))
+ debugEnviron = process.env.NODE_DEBUG || '';
+ set = set.toUpperCase();
+ if (!debugs[set]) {
+ if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
+ var pid = process.pid;
+ debugs[set] = function() {
+ var msg = exports.format.apply(exports, arguments);
+ console.error('%s %d: %s', set, pid, msg);
+ };
+ } else {
+ debugs[set] = function() {};
+ }
+ }
+ return debugs[set];
+ };
+
+
+ /**
+ * Echos the value of a value. Trys to print the value out
+ * in the best way possible given the different types.
+ *
+ * @param {Object} obj The object to print out.
+ * @param {Object} opts Optional options object that alters the output.
+ */
+ /* legacy: obj, showHidden, depth, colors*/
+ function inspect(obj, opts) {
+ // default options
+ var ctx = {
+ seen: [],
+ stylize: stylizeNoColor
+ };
+ // legacy...
+ if (arguments.length >= 3) ctx.depth = arguments[2];
+ if (arguments.length >= 4) ctx.colors = arguments[3];
+ if (isBoolean(opts)) {
+ // legacy...
+ ctx.showHidden = opts;
+ } else if (opts) {
+ // got an "options" object
+ exports._extend(ctx, opts);
+ }
+ // set default options
+ if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
+ if (isUndefined(ctx.depth)) ctx.depth = 2;
+ if (isUndefined(ctx.colors)) ctx.colors = false;
+ if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
+ if (ctx.colors) ctx.stylize = stylizeWithColor;
+ return formatValue(ctx, obj, ctx.depth);
+ }
+ exports.inspect = inspect;
+
+
+ // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
+ inspect.colors = {
+ 'bold' : [1, 22],
+ 'italic' : [3, 23],
+ 'underline' : [4, 24],
+ 'inverse' : [7, 27],
+ 'white' : [37, 39],
+ 'grey' : [90, 39],
+ 'black' : [30, 39],
+ 'blue' : [34, 39],
+ 'cyan' : [36, 39],
+ 'green' : [32, 39],
+ 'magenta' : [35, 39],
+ 'red' : [31, 39],
+ 'yellow' : [33, 39]
+ };
+
+ // Don't use 'blue' not visible on cmd.exe
+ inspect.styles = {
+ 'special': 'cyan',
+ 'number': 'yellow',
+ 'boolean': 'yellow',
+ 'undefined': 'grey',
+ 'null': 'bold',
+ 'string': 'green',
+ 'date': 'magenta',
+ // "name": intentionally not styling
+ 'regexp': 'red'
+ };
+
+
+ function stylizeWithColor(str, styleType) {
+ var style = inspect.styles[styleType];
+
+ if (style) {
+ return '\u001b[' + inspect.colors[style][0] + 'm' + str +
+ '\u001b[' + inspect.colors[style][1] + 'm';
+ } else {
+ return str;
+ }
+ }
+
+
+ function stylizeNoColor(str, styleType) {
+ return str;
+ }
+
+
+ function arrayToHash(array) {
+ var hash = {};
+
+ array.forEach(function(val, idx) {
+ hash[val] = true;
+ });
+
+ return hash;
+ }
+
+
+ function formatValue(ctx, value, recurseTimes) {
+ // Provide a hook for user-specified inspect functions.
+ // Check that value is an object with an inspect function on it
+ if (ctx.customInspect &&
+ value &&
+ isFunction(value.inspect) &&
+ // Filter out the util module, it's inspect function is special
+ value.inspect !== exports.inspect &&
+ // Also filter out any prototype objects using the circular check.
+ !(value.constructor && value.constructor.prototype === value)) {
+ var ret = value.inspect(recurseTimes, ctx);
+ if (!isString(ret)) {
+ ret = formatValue(ctx, ret, recurseTimes);
+ }
+ return ret;
+ }
+
+ // Primitive types cannot have properties
+ var primitive = formatPrimitive(ctx, value);
+ if (primitive) {
+ return primitive;
+ }
+
+ // Look up the keys of the object.
+ var keys = Object.keys(value);
+ var visibleKeys = arrayToHash(keys);
+
+ if (ctx.showHidden) {
+ keys = Object.getOwnPropertyNames(value);
+ }
+
+ // IE doesn't make error fields non-enumerable
+ // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
+ if (isError(value)
+ && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
+ return formatError(value);
+ }
+
+ // Some type of object without properties can be shortcutted.
+ if (keys.length === 0) {
+ if (isFunction(value)) {
+ var name = value.name ? ': ' + value.name : '';
+ return ctx.stylize('[Function' + name + ']', 'special');
+ }
+ if (isRegExp(value)) {
+ return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+ }
+ if (isDate(value)) {
+ return ctx.stylize(Date.prototype.toString.call(value), 'date');
+ }
+ if (isError(value)) {
+ return formatError(value);
+ }
+ }
+
+ var base = '', array = false, braces = ['{', '}'];
+
+ // Make Array say that they are Array
+ if (isArray(value)) {
+ array = true;
+ braces = ['[', ']'];
+ }
+
+ // Make functions say that they are functions
+ if (isFunction(value)) {
+ var n = value.name ? ': ' + value.name : '';
+ base = ' [Function' + n + ']';
+ }
+
+ // Make RegExps say that they are RegExps
+ if (isRegExp(value)) {
+ base = ' ' + RegExp.prototype.toString.call(value);
+ }
+
+ // Make dates with properties first say the date
+ if (isDate(value)) {
+ base = ' ' + Date.prototype.toUTCString.call(value);
+ }
+
+ // Make error with message first say the error
+ if (isError(value)) {
+ base = ' ' + formatError(value);
+ }
+
+ if (keys.length === 0 && (!array || value.length == 0)) {
+ return braces[0] + base + braces[1];
+ }
+
+ if (recurseTimes < 0) {
+ if (isRegExp(value)) {
+ return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+ } else {
+ return ctx.stylize('[Object]', 'special');
+ }
+ }
+
+ ctx.seen.push(value);
+
+ var output;
+ if (array) {
+ output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
+ } else {
+ output = keys.map(function(key) {
+ return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
+ });
+ }
+
+ ctx.seen.pop();
+
+ return reduceToSingleString(output, base, braces);
+ }
+
+
+ function formatPrimitive(ctx, value) {
+ if (isUndefined(value))
+ return ctx.stylize('undefined', 'undefined');
+ if (isString(value)) {
+ var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
+ .replace(/'/g, "\\'")
+ .replace(/\\"/g, '"') + '\'';
+ return ctx.stylize(simple, 'string');
+ }
+ if (isNumber(value))
+ return ctx.stylize('' + value, 'number');
+ if (isBoolean(value))
+ return ctx.stylize('' + value, 'boolean');
+ // For some reason typeof null is "object", so special case here.
+ if (isNull(value))
+ return ctx.stylize('null', 'null');
+ }
+
+
+ function formatError(value) {
+ return '[' + Error.prototype.toString.call(value) + ']';
+ }
+
+
+ function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
+ var output = [];
+ for (var i = 0, l = value.length; i < l; ++i) {
+ if (hasOwnProperty(value, String(i))) {
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
+ String(i), true));
+ } else {
+ output.push('');
+ }
+ }
+ keys.forEach(function(key) {
+ if (!key.match(/^\d+$/)) {
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
+ key, true));
+ }
+ });
+ return output;
+ }
+
+
+ function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
+ var name, str, desc;
+ desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
+ if (desc.get) {
+ if (desc.set) {
+ str = ctx.stylize('[Getter/Setter]', 'special');
+ } else {
+ str = ctx.stylize('[Getter]', 'special');
+ }
+ } else {
+ if (desc.set) {
+ str = ctx.stylize('[Setter]', 'special');
+ }
+ }
+ if (!hasOwnProperty(visibleKeys, key)) {
+ name = '[' + key + ']';
+ }
+ if (!str) {
+ if (ctx.seen.indexOf(desc.value) < 0) {
+ if (isNull(recurseTimes)) {
+ str = formatValue(ctx, desc.value, null);
+ } else {
+ str = formatValue(ctx, desc.value, recurseTimes - 1);
+ }
+ if (str.indexOf('\n') > -1) {
+ if (array) {
+ str = str.split('\n').map(function(line) {
+ return ' ' + line;
+ }).join('\n').substr(2);
+ } else {
+ str = '\n' + str.split('\n').map(function(line) {
+ return ' ' + line;
+ }).join('\n');
+ }
+ }
+ } else {
+ str = ctx.stylize('[Circular]', 'special');
+ }
+ }
+ if (isUndefined(name)) {
+ if (array && key.match(/^\d+$/)) {
+ return str;
+ }
+ name = JSON.stringify('' + key);
+ if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
+ name = name.substr(1, name.length - 2);
+ name = ctx.stylize(name, 'name');
+ } else {
+ name = name.replace(/'/g, "\\'")
+ .replace(/\\"/g, '"')
+ .replace(/(^"|"$)/g, "'");
+ name = ctx.stylize(name, 'string');
+ }
+ }
+
+ return name + ': ' + str;
+ }
+
+
+ function reduceToSingleString(output, base, braces) {
+ var numLinesEst = 0;
+ var length = output.reduce(function(prev, cur) {
+ numLinesEst++;
+ if (cur.indexOf('\n') >= 0) numLinesEst++;
+ return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
+ }, 0);
+
+ if (length > 60) {
+ return braces[0] +
+ (base === '' ? '' : base + '\n ') +
+ ' ' +
+ output.join(',\n ') +
+ ' ' +
+ braces[1];
+ }
+
+ return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
+ }
+
+
+ // NOTE: These type checking functions intentionally don't use `instanceof`
+ // because it is fragile and can be easily faked with `Object.create()`.
+ function isArray(ar) {
+ return Array.isArray(ar);
+ }
+ exports.isArray = isArray;
+
+ function isBoolean(arg) {
+ return typeof arg === 'boolean';
+ }
+ exports.isBoolean = isBoolean;
+
+ function isNull(arg) {
+ return arg === null;
+ }
+ exports.isNull = isNull;
+
+ function isNullOrUndefined(arg) {
+ return arg == null;
+ }
+ exports.isNullOrUndefined = isNullOrUndefined;
+
+ function isNumber(arg) {
+ return typeof arg === 'number';
+ }
+ exports.isNumber = isNumber;
+
+ function isString(arg) {
+ return typeof arg === 'string';
+ }
+ exports.isString = isString;
+
+ function isSymbol(arg) {
+ return typeof arg === 'symbol';
+ }
+ exports.isSymbol = isSymbol;
+
+ function isUndefined(arg) {
+ return arg === void 0;
+ }
+ exports.isUndefined = isUndefined;
+
+ function isRegExp(re) {
+ return isObject(re) && objectToString(re) === '[object RegExp]';
+ }
+ exports.isRegExp = isRegExp;
+
+ function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+ }
+ exports.isObject = isObject;
+
+ function isDate(d) {
+ return isObject(d) && objectToString(d) === '[object Date]';
+ }
+ exports.isDate = isDate;
+
+ function isError(e) {
+ return isObject(e) &&
+ (objectToString(e) === '[object Error]' || e instanceof Error);
+ }
+ exports.isError = isError;
+
+ function isFunction(arg) {
+ return typeof arg === 'function';
+ }
+ exports.isFunction = isFunction;
+
+ function isPrimitive(arg) {
+ return arg === null ||
+ typeof arg === 'boolean' ||
+ typeof arg === 'number' ||
+ typeof arg === 'string' ||
+ typeof arg === 'symbol' || // ES6 symbol
+ typeof arg === 'undefined';
+ }
+ exports.isPrimitive = isPrimitive;
+
+ exports.isBuffer = __webpack_require__(321);
+
+ function objectToString(o) {
+ return Object.prototype.toString.call(o);
+ }
+
+
+ function pad(n) {
+ return n < 10 ? '0' + n.toString(10) : n.toString(10);
+ }
+
+
+ var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
+ 'Oct', 'Nov', 'Dec'];
+
+ // 26 Feb 16:19:34
+ function timestamp() {
+ var d = new Date();
+ var time = [pad(d.getHours()),
+ pad(d.getMinutes()),
+ pad(d.getSeconds())].join(':');
+ return [d.getDate(), months[d.getMonth()], time].join(' ');
+ }
+
+
+ // log is just a thin wrapper to console.log that prepends a timestamp
+ exports.log = function() {
+ console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
+ };
+
+
+ /**
+ * Inherit the prototype methods from one constructor into another.
+ *
+ * The Function.prototype.inherits from lang.js rewritten as a standalone
+ * function (not on Function.prototype). NOTE: If this file is to be loaded
+ * during bootstrapping this function needs to be rewritten using some native
+ * functions as prototype setup using normal JavaScript does not work as
+ * expected during bootstrapping (see mirror.js in r114903).
+ *
+ * @param {function} ctor Constructor function which needs to inherit the
+ * prototype.
+ * @param {function} superCtor Constructor function to inherit prototype from.
+ */
+ exports.inherits = __webpack_require__(322);
+
+ exports._extend = function(origin, add) {
+ // Don't do anything if add isn't an object
+ if (!add || !isObject(add)) return origin;
+
+ var keys = Object.keys(add);
+ var i = keys.length;
+ while (i--) {
+ origin[keys[i]] = add[keys[i]];
+ }
+ return origin;
+ };
+
+ function hasOwnProperty(obj, prop) {
+ return Object.prototype.hasOwnProperty.call(obj, prop);
+ }
+
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(294)))
+
+/***/ },
+/* 321 */
+/***/ function(module, exports) {
+
+ module.exports = function isBuffer(arg) {
+ return arg && typeof arg === 'object'
+ && typeof arg.copy === 'function'
+ && typeof arg.fill === 'function'
+ && typeof arg.readUInt8 === 'function';
+ }
+
+/***/ },
+/* 322 */
+/***/ function(module, exports) {
+
+ if (typeof Object.create === 'function') {
+ // implementation from standard node.js 'util' module
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ };
+ } else {
+ // old school shim for old browsers
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ var TempCtor = function () {}
+ TempCtor.prototype = superCtor.prototype
+ ctor.prototype = new TempCtor()
+ ctor.prototype.constructor = ctor
+ }
+ }
+
+
+/***/ },
+/* 323 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(Buffer) {"use strict";
+
+ var writeIEEE754 = __webpack_require__(304).writeIEEE754,
+ readIEEE754 = __webpack_require__(304).readIEEE754,
+ Long = __webpack_require__(306).Long,
+ Map = __webpack_require__(305),
+ Double = __webpack_require__(307).Double,
+ Timestamp = __webpack_require__(308).Timestamp,
+ ObjectID = __webpack_require__(309).ObjectID,
+ Symbol = __webpack_require__(311).Symbol,
+ Code = __webpack_require__(313).Code,
+ BSONRegExp = __webpack_require__(310).BSONRegExp,
+ Int32 = __webpack_require__(312).Int32,
+ MinKey = __webpack_require__(315).MinKey,
+ MaxKey = __webpack_require__(316).MaxKey,
+ Decimal128 = __webpack_require__(314),
+ DBRef = __webpack_require__(317).DBRef,
+ Binary = __webpack_require__(318).Binary;
+
+ try {
+ var _Buffer = Uint8Array;
+ } catch (e) {
+ var _Buffer = Buffer;
+ }
+
+ var regexp = /\x00/;
+
+ // To ensure that 0.4 of node works correctly
+ var isDate = function isDate(d) {
+ return typeof d === 'object' && Object.prototype.toString.call(d) === '[object Date]';
+ };
+
+ var isRegExp = function isRegExp(d) {
+ return Object.prototype.toString.call(d) === '[object RegExp]';
+ };
+
+ var serializeString = function (buffer, key, value, index, isArray) {
+ // Encode String type
+ buffer[index++] = BSON.BSON_DATA_STRING;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Write the string
+ var size = buffer.write(value, index + 4, 'utf8');
+ // Write the size of the string to buffer
+ buffer[index + 3] = size + 1 >> 24 & 0xff;
+ buffer[index + 2] = size + 1 >> 16 & 0xff;
+ buffer[index + 1] = size + 1 >> 8 & 0xff;
+ buffer[index] = size + 1 & 0xff;
+ // Update index
+ index = index + 4 + size;
+ // Write zero
+ buffer[index++] = 0;
+ return index;
+ };
+
+ var serializeNumber = function (buffer, key, value, index, isArray) {
+ // We have an integer value
+ if (Math.floor(value) === value && value >= BSON.JS_INT_MIN && value <= BSON.JS_INT_MAX) {
+ // If the value fits in 32 bits encode as int, if it fits in a double
+ // encode it as a double, otherwise long
+ if (value >= BSON.BSON_INT32_MIN && value <= BSON.BSON_INT32_MAX) {
+ // Set int type 32 bits or less
+ buffer[index++] = BSON.BSON_DATA_INT;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write the int value
+ buffer[index++] = value & 0xff;
+ buffer[index++] = value >> 8 & 0xff;
+ buffer[index++] = value >> 16 & 0xff;
+ buffer[index++] = value >> 24 & 0xff;
+ } else if (value >= BSON.JS_INT_MIN && value <= BSON.JS_INT_MAX) {
+ // Encode as double
+ buffer[index++] = BSON.BSON_DATA_NUMBER;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write float
+ writeIEEE754(buffer, value, index, 'little', 52, 8);
+ // Ajust index
+ index = index + 8;
+ } else {
+ // Set long type
+ buffer[index++] = BSON.BSON_DATA_LONG;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ var longVal = Long.fromNumber(value);
+ var lowBits = longVal.getLowBits();
+ var highBits = longVal.getHighBits();
+ // Encode low bits
+ buffer[index++] = lowBits & 0xff;
+ buffer[index++] = lowBits >> 8 & 0xff;
+ buffer[index++] = lowBits >> 16 & 0xff;
+ buffer[index++] = lowBits >> 24 & 0xff;
+ // Encode high bits
+ buffer[index++] = highBits & 0xff;
+ buffer[index++] = highBits >> 8 & 0xff;
+ buffer[index++] = highBits >> 16 & 0xff;
+ buffer[index++] = highBits >> 24 & 0xff;
+ }
+ } else {
+ // Encode as double
+ buffer[index++] = BSON.BSON_DATA_NUMBER;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write float
+ writeIEEE754(buffer, value, index, 'little', 52, 8);
+ // Ajust index
+ index = index + 8;
+ }
+
+ return index;
+ };
+
+ var serializeUndefined = function (buffer, key, value, index, isArray) {
+ // Set long type
+ buffer[index++] = BSON.BSON_DATA_UNDEFINED;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ return index;
+ };
+
+ var serializeNull = function (buffer, key, value, index, isArray) {
+ // Set long type
+ buffer[index++] = BSON.BSON_DATA_NULL;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ return index;
+ };
+
+ var serializeBoolean = function (buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_BOOLEAN;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Encode the boolean value
+ buffer[index++] = value ? 1 : 0;
+ return index;
+ };
+
+ var serializeDate = function (buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_DATE;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+
+ // Write the date
+ var dateInMilis = Long.fromNumber(value.getTime());
+ var lowBits = dateInMilis.getLowBits();
+ var highBits = dateInMilis.getHighBits();
+ // Encode low bits
+ buffer[index++] = lowBits & 0xff;
+ buffer[index++] = lowBits >> 8 & 0xff;
+ buffer[index++] = lowBits >> 16 & 0xff;
+ buffer[index++] = lowBits >> 24 & 0xff;
+ // Encode high bits
+ buffer[index++] = highBits & 0xff;
+ buffer[index++] = highBits >> 8 & 0xff;
+ buffer[index++] = highBits >> 16 & 0xff;
+ buffer[index++] = highBits >> 24 & 0xff;
+ return index;
+ };
+
+ var serializeRegExp = function (buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_REGEXP;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ if (value.source && value.source.match(regexp) != null) {
+ throw Error("value " + value.source + " must not contain null bytes");
+ }
+ // Adjust the index
+ index = index + buffer.write(value.source, index, 'utf8');
+ // Write zero
+ buffer[index++] = 0x00;
+ // Write the parameters
+ if (value.global) buffer[index++] = 0x73; // s
+ if (value.ignoreCase) buffer[index++] = 0x69; // i
+ if (value.multiline) buffer[index++] = 0x6d; // m
+ // Add ending zero
+ buffer[index++] = 0x00;
+ return index;
+ };
+
+ var serializeBSONRegExp = function (buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_REGEXP;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+
+ // Check the pattern for 0 bytes
+ if (value.pattern.match(regexp) != null) {
+ // The BSON spec doesn't allow keys with null bytes because keys are
+ // null-terminated.
+ throw Error("pattern " + value.pattern + " must not contain null bytes");
+ }
+
+ // Adjust the index
+ index = index + buffer.write(value.pattern, index, 'utf8');
+ // Write zero
+ buffer[index++] = 0x00;
+ // Write the options
+ index = index + buffer.write(value.options.split('').sort().join(''), index, 'utf8');
+ // Add ending zero
+ buffer[index++] = 0x00;
+ return index;
+ };
+
+ var serializeMinMax = function (buffer, key, value, index, isArray) {
+ // Write the type of either min or max key
+ if (value === null) {
+ buffer[index++] = BSON.BSON_DATA_NULL;
+ } else if (value instanceof MinKey) {
+ buffer[index++] = BSON.BSON_DATA_MIN_KEY;
+ } else {
+ buffer[index++] = BSON.BSON_DATA_MAX_KEY;
+ }
+
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ return index;
+ };
+
+ var serializeObjectId = function (buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_OID;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+
+ // Write the objectId into the shared buffer
+ if (typeof value.id == 'string') {
+ buffer.write(value.id, index, 'binary');
+ } else if (value.id && value.id.copy) {
+ value.id.copy(buffer, index, 0, 12);
+ } else {
+ throw new Error('object [' + JSON.stringify(value) + "] is not a valid ObjectId");
+ }
+
+ // Ajust index
+ return index + 12;
+ };
+
+ var serializeBuffer = function (buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_BINARY;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Get size of the buffer (current write point)
+ var size = value.length;
+ // Write the size of the string to buffer
+ buffer[index++] = size & 0xff;
+ buffer[index++] = size >> 8 & 0xff;
+ buffer[index++] = size >> 16 & 0xff;
+ buffer[index++] = size >> 24 & 0xff;
+ // Write the default subtype
+ buffer[index++] = BSON.BSON_BINARY_SUBTYPE_DEFAULT;
+ // Copy the content form the binary field to the buffer
+ value.copy(buffer, index, 0, size);
+ // Adjust the index
+ index = index + size;
+ return index;
+ };
+
+ var serializeObject = function (buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, isArray, path) {
+ for (var i = 0; i < path.length; i++) {
+ if (path[i] === value) throw new Error('cyclic dependency detected');
+ }
+
+ // Push value to stack
+ path.push(value);
+ // Write the type
+ buffer[index++] = Array.isArray(value) ? BSON.BSON_DATA_ARRAY : BSON.BSON_DATA_OBJECT;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ var endIndex = serializeInto(buffer, value, checkKeys, index, depth + 1, serializeFunctions, ignoreUndefined, path);
+ // Pop stack
+ path.pop();
+ // Write size
+ var size = endIndex - index;
+ return endIndex;
+ };
+
+ var serializeDecimal128 = function (buffer, key, value, index, isArray) {
+ buffer[index++] = BSON.BSON_DATA_DECIMAL128;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write the data from the value
+ value.bytes.copy(buffer, index, 0, 16);
+ return index + 16;
+ };
+
+ var serializeLong = function (buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = value._bsontype == 'Long' ? BSON.BSON_DATA_LONG : BSON.BSON_DATA_TIMESTAMP;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write the date
+ var lowBits = value.getLowBits();
+ var highBits = value.getHighBits();
+ // Encode low bits
+ buffer[index++] = lowBits & 0xff;
+ buffer[index++] = lowBits >> 8 & 0xff;
+ buffer[index++] = lowBits >> 16 & 0xff;
+ buffer[index++] = lowBits >> 24 & 0xff;
+ // Encode high bits
+ buffer[index++] = highBits & 0xff;
+ buffer[index++] = highBits >> 8 & 0xff;
+ buffer[index++] = highBits >> 16 & 0xff;
+ buffer[index++] = highBits >> 24 & 0xff;
+ return index;
+ };
+
+ var serializeInt32 = function (buffer, key, value, index, isArray) {
+ // Set int type 32 bits or less
+ buffer[index++] = BSON.BSON_DATA_INT;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write the int value
+ buffer[index++] = value & 0xff;
+ buffer[index++] = value >> 8 & 0xff;
+ buffer[index++] = value >> 16 & 0xff;
+ buffer[index++] = value >> 24 & 0xff;
+ return index;
+ };
+
+ var serializeDouble = function (buffer, key, value, index, isArray) {
+ // Encode as double
+ buffer[index++] = BSON.BSON_DATA_NUMBER;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write float
+ writeIEEE754(buffer, value, index, 'little', 52, 8);
+ // Ajust index
+ index = index + 8;
+ return index;
+ };
+
+ var serializeFunction = function (buffer, key, value, index, checkKeys, depth, isArray) {
+ buffer[index++] = BSON.BSON_DATA_CODE;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Function string
+ var functionString = value.toString();
+ // Write the string
+ var size = buffer.write(functionString, index + 4, 'utf8') + 1;
+ // Write the size of the string to buffer
+ buffer[index] = size & 0xff;
+ buffer[index + 1] = size >> 8 & 0xff;
+ buffer[index + 2] = size >> 16 & 0xff;
+ buffer[index + 3] = size >> 24 & 0xff;
+ // Update index
+ index = index + 4 + size - 1;
+ // Write zero
+ buffer[index++] = 0;
+ return index;
+ };
+
+ var serializeCode = function (buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, isArray) {
+ if (value.scope && typeof value.scope == 'object') {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_CODE_W_SCOPE;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+
+ // Starting index
+ var startIndex = index;
+
+ // Serialize the function
+ // Get the function string
+ var functionString = typeof value.code == 'string' ? value.code : value.code.toString();
+ // Index adjustment
+ index = index + 4;
+ // Write string into buffer
+ var codeSize = buffer.write(functionString, index + 4, 'utf8') + 1;
+ // Write the size of the string to buffer
+ buffer[index] = codeSize & 0xff;
+ buffer[index + 1] = codeSize >> 8 & 0xff;
+ buffer[index + 2] = codeSize >> 16 & 0xff;
+ buffer[index + 3] = codeSize >> 24 & 0xff;
+ // Write end 0
+ buffer[index + 4 + codeSize - 1] = 0;
+ // Write the
+ index = index + codeSize + 4;
+
+ //
+ // Serialize the scope value
+ var endIndex = serializeInto(buffer, value.scope, checkKeys, index, depth + 1, serializeFunctions, ignoreUndefined);
+ index = endIndex - 1;
+
+ // Writ the total
+ var totalSize = endIndex - startIndex;
+
+ // Write the total size of the object
+ buffer[startIndex++] = totalSize & 0xff;
+ buffer[startIndex++] = totalSize >> 8 & 0xff;
+ buffer[startIndex++] = totalSize >> 16 & 0xff;
+ buffer[startIndex++] = totalSize >> 24 & 0xff;
+ // Write trailing zero
+ buffer[index++] = 0;
+ } else {
+ buffer[index++] = BSON.BSON_DATA_CODE;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Function string
+ var functionString = value.code.toString();
+ // Write the string
+ var size = buffer.write(functionString, index + 4, 'utf8') + 1;
+ // Write the size of the string to buffer
+ buffer[index] = size & 0xff;
+ buffer[index + 1] = size >> 8 & 0xff;
+ buffer[index + 2] = size >> 16 & 0xff;
+ buffer[index + 3] = size >> 24 & 0xff;
+ // Update index
+ index = index + 4 + size - 1;
+ // Write zero
+ buffer[index++] = 0;
+ }
+
+ return index;
+ };
+
+ var serializeBinary = function (buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_BINARY;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Extract the buffer
+ var data = value.value(true);
+ // Calculate size
+ var size = value.position;
+ // Add the deprecated 02 type 4 bytes of size to total
+ if (value.sub_type == Binary.SUBTYPE_BYTE_ARRAY) size = size + 4;
+ // Write the size of the string to buffer
+ buffer[index++] = size & 0xff;
+ buffer[index++] = size >> 8 & 0xff;
+ buffer[index++] = size >> 16 & 0xff;
+ buffer[index++] = size >> 24 & 0xff;
+ // Write the subtype to the buffer
+ buffer[index++] = value.sub_type;
+
+ // If we have binary type 2 the 4 first bytes are the size
+ if (value.sub_type == Binary.SUBTYPE_BYTE_ARRAY) {
+ size = size - 4;
+ buffer[index++] = size & 0xff;
+ buffer[index++] = size >> 8 & 0xff;
+ buffer[index++] = size >> 16 & 0xff;
+ buffer[index++] = size >> 24 & 0xff;
+ }
+
+ // Write the data to the object
+ data.copy(buffer, index, 0, value.position);
+ // Adjust the index
+ index = index + value.position;
+ return index;
+ };
+
+ var serializeSymbol = function (buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_SYMBOL;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write the string
+ var size = buffer.write(value.value, index + 4, 'utf8') + 1;
+ // Write the size of the string to buffer
+ buffer[index] = size & 0xff;
+ buffer[index + 1] = size >> 8 & 0xff;
+ buffer[index + 2] = size >> 16 & 0xff;
+ buffer[index + 3] = size >> 24 & 0xff;
+ // Update index
+ index = index + 4 + size - 1;
+ // Write zero
+ buffer[index++] = 0x00;
+ return index;
+ };
+
+ var serializeDBRef = function (buffer, key, value, index, depth, serializeFunctions, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_OBJECT;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+
+ var startIndex = index;
+ var endIndex;
+
+ // Serialize object
+ if (null != value.db) {
+ endIndex = serializeInto(buffer, {
+ '$ref': value.namespace,
+ '$id': value.oid,
+ '$db': value.db
+ }, false, index, depth + 1, serializeFunctions);
+ } else {
+ endIndex = serializeInto(buffer, {
+ '$ref': value.namespace,
+ '$id': value.oid
+ }, false, index, depth + 1, serializeFunctions);
+ }
+
+ // Calculate object size
+ var size = endIndex - startIndex;
+ // Write the size
+ buffer[startIndex++] = size & 0xff;
+ buffer[startIndex++] = size >> 8 & 0xff;
+ buffer[startIndex++] = size >> 16 & 0xff;
+ buffer[startIndex++] = size >> 24 & 0xff;
+ // Set index
+ return endIndex;
+ };
+
+ var serializeInto = function serializeInto(buffer, object, checkKeys, startingIndex, depth, serializeFunctions, ignoreUndefined, path) {
+ startingIndex = startingIndex || 0;
+ path = path || [];
+
+ // Push the object to the path
+ path.push(object);
+
+ // Start place to serialize into
+ var index = startingIndex + 4;
+ var self = this;
+
+ // Special case isArray
+ if (Array.isArray(object)) {
+ // Get object keys
+ for (var i = 0; i < object.length; i++) {
+ var key = "" + i;
+ var value = object[i];
+
+ // Is there an override value
+ if (value && value.toBSON) {
+ if (typeof value.toBSON != 'function') throw new Error("toBSON is not a function");
+ value = value.toBSON();
+ }
+
+ var type = typeof value;
+ if (type == 'string') {
+ index = serializeString(buffer, key, value, index, true);
+ } else if (type == 'number') {
+ index = serializeNumber(buffer, key, value, index, true);
+ } else if (type == 'boolean') {
+ index = serializeBoolean(buffer, key, value, index, true);
+ } else if (value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index, true);
+ } else if (value === undefined) {
+ index = serializeNull(buffer, key, value, index, true);
+ } else if (value === null) {
+ index = serializeNull(buffer, key, value, index, true);
+ } else if (value['_bsontype'] == 'ObjectID') {
+ index = serializeObjectId(buffer, key, value, index, true);
+ } else if (Buffer.isBuffer(value)) {
+ index = serializeBuffer(buffer, key, value, index, true);
+ } else if (value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index, true);
+ } else if (type == 'object' && value['_bsontype'] == null) {
+ index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, true, path);
+ } else if (type == 'object' && value['_bsontype'] == 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index, true);
+ } else if (value['_bsontype'] == 'Long' || value['_bsontype'] == 'Timestamp') {
+ index = serializeLong(buffer, key, value, index, true);
+ } else if (value['_bsontype'] == 'Double') {
+ index = serializeDouble(buffer, key, value, index, true);
+ } else if (typeof value == 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index, checkKeys, depth, serializeFunctions, true);
+ } else if (value['_bsontype'] == 'Code') {
+ index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, true);
+ } else if (value['_bsontype'] == 'Binary') {
+ index = serializeBinary(buffer, key, value, index, true);
+ } else if (value['_bsontype'] == 'Symbol') {
+ index = serializeSymbol(buffer, key, value, index, true);
+ } else if (value['_bsontype'] == 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions, true);
+ } else if (value['_bsontype'] == 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index, true);
+ } else if (value['_bsontype'] == 'Int32') {
+ index = serializeInt32(buffer, key, value, index, true);
+ } else if (value['_bsontype'] == 'MinKey' || value['_bsontype'] == 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index, true);
+ }
+ }
+ } else if (object instanceof Map) {
+ var iterator = object.entries();
+ var done = false;
+
+ while (!done) {
+ // Unpack the next entry
+ var entry = iterator.next();
+ done = entry.done;
+ // Are we done, then skip and terminate
+ if (done) continue;
+
+ // Get the entry values
+ var key = entry.value[0];
+ var value = entry.value[1];
+
+ // Check the type of the value
+ var type = typeof value;
+
+ // Check the key and throw error if it's illegal
+ if (key != '$db' && key != '$ref' && key != '$id') {
+ if (key.match(regexp) != null) {
+ // The BSON spec doesn't allow keys with null bytes because keys are
+ // null-terminated.
+ throw Error("key " + key + " must not contain null bytes");
+ }
+
+ if (checkKeys) {
+ if ('$' == key[0]) {
+ throw Error("key " + key + " must not start with '$'");
+ } else if (!!~key.indexOf('.')) {
+ throw Error("key " + key + " must not contain '.'");
+ }
+ }
+ }
+
+ if (type == 'string') {
+ index = serializeString(buffer, key, value, index);
+ } else if (type == 'number') {
+ index = serializeNumber(buffer, key, value, index);
+ } else if (type == 'boolean') {
+ index = serializeBoolean(buffer, key, value, index);
+ } else if (value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index);
+ } else if (value === undefined && ignoreUndefined == true) {} else if (value === undefined) {
+ index = serializeUndefined(buffer, key, value, index);
+ } else if (value === null) {
+ index = serializeNull(buffer, key, value, index);
+ } else if (value['_bsontype'] == 'ObjectID') {
+ index = serializeObjectId(buffer, key, value, index);
+ } else if (Buffer.isBuffer(value)) {
+ index = serializeBuffer(buffer, key, value, index);
+ } else if (value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index);
+ } else if (type == 'object' && value['_bsontype'] == null) {
+ index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, false, path);
+ } else if (type == 'object' && value['_bsontype'] == 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index);
+ } else if (value['_bsontype'] == 'Long' || value['_bsontype'] == 'Timestamp') {
+ index = serializeLong(buffer, key, value, index);
+ } else if (value['_bsontype'] == 'Double') {
+ index = serializeDouble(buffer, key, value, index);
+ } else if (value['_bsontype'] == 'Code') {
+ index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined);
+ } else if (typeof value == 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index, checkKeys, depth, serializeFunctions);
+ } else if (value['_bsontype'] == 'Binary') {
+ index = serializeBinary(buffer, key, value, index);
+ } else if (value['_bsontype'] == 'Symbol') {
+ index = serializeSymbol(buffer, key, value, index);
+ } else if (value['_bsontype'] == 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions);
+ } else if (value['_bsontype'] == 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index);
+ } else if (value['_bsontype'] == 'Int32') {
+ index = serializeInt32(buffer, key, value, index);
+ } else if (value['_bsontype'] == 'MinKey' || value['_bsontype'] == 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index);
+ }
+ }
+ } else {
+ // Did we provide a custom serialization method
+ if (object.toBSON) {
+ if (typeof object.toBSON != 'function') throw new Error("toBSON is not a function");
+ object = object.toBSON();
+ if (object != null && typeof object != 'object') throw new Error("toBSON function did not return an object");
+ }
+
+ // Iterate over all the keys
+ for (var key in object) {
+ var value = object[key];
+ // Is there an override value
+ if (value && value.toBSON) {
+ if (typeof value.toBSON != 'function') throw new Error("toBSON is not a function");
+ value = value.toBSON();
+ }
+
+ // Check the type of the value
+ var type = typeof value;
+
+ // Check the key and throw error if it's illegal
+ if (key != '$db' && key != '$ref' && key != '$id') {
+ if (key.match(regexp) != null) {
+ // The BSON spec doesn't allow keys with null bytes because keys are
+ // null-terminated.
+ throw Error("key " + key + " must not contain null bytes");
+ }
+
+ if (checkKeys) {
+ if ('$' == key[0]) {
+ throw Error("key " + key + " must not start with '$'");
+ } else if (!!~key.indexOf('.')) {
+ throw Error("key " + key + " must not contain '.'");
+ }
+ }
+ }
+
+ if (type == 'string') {
+ index = serializeString(buffer, key, value, index);
+ } else if (type == 'number') {
+ index = serializeNumber(buffer, key, value, index);
+ } else if (type == 'boolean') {
+ index = serializeBoolean(buffer, key, value, index);
+ } else if (value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index);
+ } else if (value === undefined && ignoreUndefined == true) {} else if (value === undefined) {
+ index = serializeUndefined(buffer, key, value, index);
+ } else if (value === null) {
+ index = serializeNull(buffer, key, value, index);
+ } else if (value['_bsontype'] == 'ObjectID') {
+ index = serializeObjectId(buffer, key, value, index);
+ } else if (Buffer.isBuffer(value)) {
+ index = serializeBuffer(buffer, key, value, index);
+ } else if (value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index);
+ } else if (type == 'object' && value['_bsontype'] == null) {
+ index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, false, path);
+ } else if (type == 'object' && value['_bsontype'] == 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index);
+ } else if (value['_bsontype'] == 'Long' || value['_bsontype'] == 'Timestamp') {
+ index = serializeLong(buffer, key, value, index);
+ } else if (value['_bsontype'] == 'Double') {
+ index = serializeDouble(buffer, key, value, index);
+ } else if (value['_bsontype'] == 'Code') {
+ index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined);
+ } else if (typeof value == 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index, checkKeys, depth, serializeFunctions);
+ } else if (value['_bsontype'] == 'Binary') {
+ index = serializeBinary(buffer, key, value, index);
+ } else if (value['_bsontype'] == 'Symbol') {
+ index = serializeSymbol(buffer, key, value, index);
+ } else if (value['_bsontype'] == 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions);
+ } else if (value['_bsontype'] == 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index);
+ } else if (value['_bsontype'] == 'Int32') {
+ index = serializeInt32(buffer, key, value, index);
+ } else if (value['_bsontype'] == 'MinKey' || value['_bsontype'] == 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index);
+ }
+ }
+ }
+
+ // Remove the path
+ path.pop();
+
+ // Final padding byte for object
+ buffer[index++] = 0x00;
+
+ // Final size
+ var size = index - startingIndex;
+ // Write the size of the object
+ buffer[startingIndex++] = size & 0xff;
+ buffer[startingIndex++] = size >> 8 & 0xff;
+ buffer[startingIndex++] = size >> 16 & 0xff;
+ buffer[startingIndex++] = size >> 24 & 0xff;
+ return index;
+ };
+
+ var BSON = {};
+
+ /**
+ * Contains the function cache if we have that enable to allow for avoiding the eval step on each deserialization, comparison is by md5
+ *
+ * @ignore
+ * @api private
+ */
+ var functionCache = BSON.functionCache = {};
+
+ /**
+ * Number BSON Type
+ *
+ * @classconstant BSON_DATA_NUMBER
+ **/
+ BSON.BSON_DATA_NUMBER = 1;
+ /**
+ * String BSON Type
+ *
+ * @classconstant BSON_DATA_STRING
+ **/
+ BSON.BSON_DATA_STRING = 2;
+ /**
+ * Object BSON Type
+ *
+ * @classconstant BSON_DATA_OBJECT
+ **/
+ BSON.BSON_DATA_OBJECT = 3;
+ /**
+ * Array BSON Type
+ *
+ * @classconstant BSON_DATA_ARRAY
+ **/
+ BSON.BSON_DATA_ARRAY = 4;
+ /**
+ * Binary BSON Type
+ *
+ * @classconstant BSON_DATA_BINARY
+ **/
+ BSON.BSON_DATA_BINARY = 5;
+ /**
+ * ObjectID BSON Type, deprecated
+ *
+ * @classconstant BSON_DATA_UNDEFINED
+ **/
+ BSON.BSON_DATA_UNDEFINED = 6;
+ /**
+ * ObjectID BSON Type
+ *
+ * @classconstant BSON_DATA_OID
+ **/
+ BSON.BSON_DATA_OID = 7;
+ /**
+ * Boolean BSON Type
+ *
+ * @classconstant BSON_DATA_BOOLEAN
+ **/
+ BSON.BSON_DATA_BOOLEAN = 8;
+ /**
+ * Date BSON Type
+ *
+ * @classconstant BSON_DATA_DATE
+ **/
+ BSON.BSON_DATA_DATE = 9;
+ /**
+ * null BSON Type
+ *
+ * @classconstant BSON_DATA_NULL
+ **/
+ BSON.BSON_DATA_NULL = 10;
+ /**
+ * RegExp BSON Type
+ *
+ * @classconstant BSON_DATA_REGEXP
+ **/
+ BSON.BSON_DATA_REGEXP = 11;
+ /**
+ * Code BSON Type
+ *
+ * @classconstant BSON_DATA_CODE
+ **/
+ BSON.BSON_DATA_CODE = 13;
+ /**
+ * Symbol BSON Type
+ *
+ * @classconstant BSON_DATA_SYMBOL
+ **/
+ BSON.BSON_DATA_SYMBOL = 14;
+ /**
+ * Code with Scope BSON Type
+ *
+ * @classconstant BSON_DATA_CODE_W_SCOPE
+ **/
+ BSON.BSON_DATA_CODE_W_SCOPE = 15;
+ /**
+ * 32 bit Integer BSON Type
+ *
+ * @classconstant BSON_DATA_INT
+ **/
+ BSON.BSON_DATA_INT = 16;
+ /**
+ * Timestamp BSON Type
+ *
+ * @classconstant BSON_DATA_TIMESTAMP
+ **/
+ BSON.BSON_DATA_TIMESTAMP = 17;
+ /**
+ * Long BSON Type
+ *
+ * @classconstant BSON_DATA_LONG
+ **/
+ BSON.BSON_DATA_LONG = 18;
+ /**
+ * Long BSON Type
+ *
+ * @classconstant BSON_DATA_DECIMAL128
+ **/
+ BSON.BSON_DATA_DECIMAL128 = 19;
+ /**
+ * MinKey BSON Type
+ *
+ * @classconstant BSON_DATA_MIN_KEY
+ **/
+ BSON.BSON_DATA_MIN_KEY = 0xff;
+ /**
+ * MaxKey BSON Type
+ *
+ * @classconstant BSON_DATA_MAX_KEY
+ **/
+ BSON.BSON_DATA_MAX_KEY = 0x7f;
+ /**
+ * Binary Default Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_DEFAULT
+ **/
+ BSON.BSON_BINARY_SUBTYPE_DEFAULT = 0;
+ /**
+ * Binary Function Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_FUNCTION
+ **/
+ BSON.BSON_BINARY_SUBTYPE_FUNCTION = 1;
+ /**
+ * Binary Byte Array Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_BYTE_ARRAY
+ **/
+ BSON.BSON_BINARY_SUBTYPE_BYTE_ARRAY = 2;
+ /**
+ * Binary UUID Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_UUID
+ **/
+ BSON.BSON_BINARY_SUBTYPE_UUID = 3;
+ /**
+ * Binary MD5 Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_MD5
+ **/
+ BSON.BSON_BINARY_SUBTYPE_MD5 = 4;
+ /**
+ * Binary User Defined Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_USER_DEFINED
+ **/
+ BSON.BSON_BINARY_SUBTYPE_USER_DEFINED = 128;
+
+ // BSON MAX VALUES
+ BSON.BSON_INT32_MAX = 0x7FFFFFFF;
+ BSON.BSON_INT32_MIN = -0x80000000;
+
+ BSON.BSON_INT64_MAX = Math.pow(2, 63) - 1;
+ BSON.BSON_INT64_MIN = -Math.pow(2, 63);
+
+ // JS MAX PRECISE VALUES
+ BSON.JS_INT_MAX = 0x20000000000000; // Any integer up to 2^53 can be precisely represented by a double.
+ BSON.JS_INT_MIN = -0x20000000000000; // Any integer down to -2^53 can be precisely represented by a double.
+
+ // Internal long versions
+ var JS_INT_MAX_LONG = Long.fromNumber(0x20000000000000); // Any integer up to 2^53 can be precisely represented by a double.
+ var JS_INT_MIN_LONG = Long.fromNumber(-0x20000000000000); // Any integer down to -2^53 can be precisely represented by a double.
+
+ module.exports = serializeInto;
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(300).Buffer))
+
+/***/ },
+/* 324 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(Buffer) {"use strict";
+
+ var writeIEEE754 = __webpack_require__(304).writeIEEE754,
+ readIEEE754 = __webpack_require__(304).readIEEE754,
+ Long = __webpack_require__(306).Long,
+ Double = __webpack_require__(307).Double,
+ Timestamp = __webpack_require__(308).Timestamp,
+ ObjectID = __webpack_require__(309).ObjectID,
+ Symbol = __webpack_require__(311).Symbol,
+ BSONRegExp = __webpack_require__(310).BSONRegExp,
+ Code = __webpack_require__(313).Code,
+ Decimal128 = __webpack_require__(314),
+ MinKey = __webpack_require__(315).MinKey,
+ MaxKey = __webpack_require__(316).MaxKey,
+ DBRef = __webpack_require__(317).DBRef,
+ Binary = __webpack_require__(318).Binary;
+
+ // To ensure that 0.4 of node works correctly
+ var isDate = function isDate(d) {
+ return typeof d === 'object' && Object.prototype.toString.call(d) === '[object Date]';
+ };
+
+ var calculateObjectSize = function calculateObjectSize(object, serializeFunctions, ignoreUndefined) {
+ var totalLength = 4 + 1;
+
+ if (Array.isArray(object)) {
+ for (var i = 0; i < object.length; i++) {
+ totalLength += calculateElement(i.toString(), object[i], serializeFunctions, true, ignoreUndefined);
+ }
+ } else {
+ // If we have toBSON defined, override the current object
+ if (object.toBSON) {
+ object = object.toBSON();
+ }
+
+ // Calculate size
+ for (var key in object) {
+ totalLength += calculateElement(key, object[key], serializeFunctions, false, ignoreUndefined);
+ }
+ }
+
+ return totalLength;
+ };
+
+ /**
+ * @ignore
+ * @api private
+ */
+ function calculateElement(name, value, serializeFunctions, isArray, ignoreUndefined) {
+ // If we have toBSON defined, override the current object
+ if (value && value.toBSON) {
+ value = value.toBSON();
+ }
+
+ switch (typeof value) {
+ case 'string':
+ return 1 + Buffer.byteLength(name, 'utf8') + 1 + 4 + Buffer.byteLength(value, 'utf8') + 1;
+ case 'number':
+ if (Math.floor(value) === value && value >= BSON.JS_INT_MIN && value <= BSON.JS_INT_MAX) {
+ if (value >= BSON.BSON_INT32_MIN && value <= BSON.BSON_INT32_MAX) {
+ // 32 bit
+ return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + (4 + 1);
+ } else {
+ return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + (8 + 1);
+ }
+ } else {
+ // 64 bit
+ return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + (8 + 1);
+ }
+ case 'undefined':
+ if (isArray || !ignoreUndefined) return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + 1;
+ return 0;
+ case 'boolean':
+ return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + (1 + 1);
+ case 'object':
+ if (value == null || value instanceof MinKey || value instanceof MaxKey || value['_bsontype'] == 'MinKey' || value['_bsontype'] == 'MaxKey') {
+ return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + 1;
+ } else if (value instanceof ObjectID || value['_bsontype'] == 'ObjectID') {
+ return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + (12 + 1);
+ } else if (value instanceof Date || isDate(value)) {
+ return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + (8 + 1);
+ } else if (typeof Buffer !== 'undefined' && Buffer.isBuffer(value)) {
+ return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + (1 + 4 + 1) + value.length;
+ } else if (value instanceof Long || value instanceof Double || value instanceof Timestamp || value['_bsontype'] == 'Long' || value['_bsontype'] == 'Double' || value['_bsontype'] == 'Timestamp') {
+ return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + (8 + 1);
+ } else if (value instanceof Decimal128 || value['_bsontype'] == 'Decimal128') {
+ return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + (16 + 1);
+ } else if (value instanceof Code || value['_bsontype'] == 'Code') {
+ // Calculate size depending on the availability of a scope
+ if (value.scope != null && Object.keys(value.scope).length > 0) {
+ return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + 1 + 4 + 4 + Buffer.byteLength(value.code.toString(), 'utf8') + 1 + calculateObjectSize(value.scope, serializeFunctions, ignoreUndefined);
+ } else {
+ return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + 1 + 4 + Buffer.byteLength(value.code.toString(), 'utf8') + 1;
+ }
+ } else if (value instanceof Binary || value['_bsontype'] == 'Binary') {
+ // Check what kind of subtype we have
+ if (value.sub_type == Binary.SUBTYPE_BYTE_ARRAY) {
+ return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + (value.position + 1 + 4 + 1 + 4);
+ } else {
+ return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + (value.position + 1 + 4 + 1);
+ }
+ } else if (value instanceof Symbol || value['_bsontype'] == 'Symbol') {
+ return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + Buffer.byteLength(value.value, 'utf8') + 4 + 1 + 1;
+ } else if (value instanceof DBRef || value['_bsontype'] == 'DBRef') {
+ // Set up correct object for serialization
+ var ordered_values = {
+ '$ref': value.namespace,
+ '$id': value.oid
+ };
+
+ // Add db reference if it exists
+ if (null != value.db) {
+ ordered_values['$db'] = value.db;
+ }
+
+ return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + 1 + calculateObjectSize(ordered_values, serializeFunctions, ignoreUndefined);
+ } else if (value instanceof RegExp || Object.prototype.toString.call(value) === '[object RegExp]') {
+ return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + 1 + Buffer.byteLength(value.source, 'utf8') + 1 + (value.global ? 1 : 0) + (value.ignoreCase ? 1 : 0) + (value.multiline ? 1 : 0) + 1;
+ } else if (value instanceof BSONRegExp || value['_bsontype'] == 'BSONRegExp') {
+ return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + 1 + Buffer.byteLength(value.pattern, 'utf8') + 1 + Buffer.byteLength(value.options, 'utf8') + 1;
+ } else {
+ return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + calculateObjectSize(value, serializeFunctions, ignoreUndefined) + 1;
+ }
+ case 'function':
+ // WTF for 0.4.X where typeof /someregexp/ === 'function'
+ if (value instanceof RegExp || Object.prototype.toString.call(value) === '[object RegExp]' || String.call(value) == '[object RegExp]') {
+ return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + 1 + Buffer.byteLength(value.source, 'utf8') + 1 + (value.global ? 1 : 0) + (value.ignoreCase ? 1 : 0) + (value.multiline ? 1 : 0) + 1;
+ } else {
+ if (serializeFunctions && value.scope != null && Object.keys(value.scope).length > 0) {
+ return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + 1 + 4 + 4 + Buffer.byteLength(value.toString(), 'utf8') + 1 + calculateObjectSize(value.scope, serializeFunctions, ignoreUndefined);
+ } else if (serializeFunctions) {
+ return (name != null ? Buffer.byteLength(name, 'utf8') + 1 : 0) + 1 + 4 + Buffer.byteLength(value.toString(), 'utf8') + 1;
+ }
+ }
+ }
+
+ return 0;
+ }
+
+ var BSON = {};
+
+ // BSON MAX VALUES
+ BSON.BSON_INT32_MAX = 0x7FFFFFFF;
+ BSON.BSON_INT32_MIN = -0x80000000;
+
+ // JS MAX PRECISE VALUES
+ BSON.JS_INT_MAX = 0x20000000000000; // Any integer up to 2^53 can be precisely represented by a double.
+ BSON.JS_INT_MIN = -0x20000000000000; // Any integer down to -2^53 can be precisely represented by a double.
+
+ module.exports = calculateObjectSize;
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(300).Buffer))
+
+/***/ }
+/******/ ])
+});
+; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/browser_build/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/browser_build/package.json
new file mode 100644
index 0000000..980db7f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/browser_build/package.json
@@ -0,0 +1,8 @@
+{ "name" : "bson"
+, "description" : "A bson parser for node.js and the browser"
+, "main": "../"
+, "directories" : { "lib" : "../lib/bson" }
+, "engines" : { "node" : ">=0.6.0" }
+, "licenses" : [ { "type" : "Apache License, Version 2.0"
+ , "url" : "http://www.apache.org/licenses/LICENSE-2.0" } ]
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/index.js
new file mode 100644
index 0000000..caed12b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/index.js
@@ -0,0 +1,46 @@
+var BSON = require('./lib/bson/bson'),
+ Binary = require('./lib/bson/binary'),
+ Code = require('./lib/bson/code'),
+ DBRef = require('./lib/bson/db_ref'),
+ Decimal128 = require('./lib/bson/decimal128'),
+ Double = require('./lib/bson/double'),
+ Int32 = require('./lib/bson/int_32'),
+ Long = require('./lib/bson/long'),
+ Map = require('./lib/bson/map'),
+ MaxKey = require('./lib/bson/max_key'),
+ MinKey = require('./lib/bson/min_key'),
+ ObjectId = require('./lib/bson/objectid'),
+ BSONRegExp = require('./lib/bson/regexp'),
+ Symbol = require('./lib/bson/symbol'),
+ Timestamp = require('./lib/bson/timestamp');
+
+// BSON MAX VALUES
+BSON.BSON_INT32_MAX = 0x7FFFFFFF;
+BSON.BSON_INT32_MIN = -0x80000000;
+
+BSON.BSON_INT64_MAX = Math.pow(2, 63) - 1;
+BSON.BSON_INT64_MIN = -Math.pow(2, 63);
+
+// JS MAX PRECISE VALUES
+BSON.JS_INT_MAX = 0x20000000000000; // Any integer up to 2^53 can be precisely represented by a double.
+BSON.JS_INT_MIN = -0x20000000000000; // Any integer down to -2^53 can be precisely represented by a double.
+
+// Add BSON types to function creation
+BSON.Binary = Binary;
+BSON.Code = Code;
+BSON.DBRef = DBRef;
+BSON.Decimal128 = Decimal128;
+BSON.Double = Double;
+BSON.Int32 = Int32;
+BSON.Long = Long;
+BSON.Map = Map;
+BSON.MaxKey = MaxKey;
+BSON.MinKey = MinKey;
+BSON.ObjectId = ObjectId;
+BSON.ObjectID = ObjectId;
+BSON.BSONRegExp = BSONRegExp;
+BSON.Symbol = Symbol;
+BSON.Timestamp = Timestamp;
+
+// Return the BSON
+module.exports = BSON;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/binary.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/binary.js
new file mode 100644
index 0000000..793b56f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/binary.js
@@ -0,0 +1,347 @@
+/**
+ * Module dependencies.
+ * @ignore
+ */
+
+// Test if we're in Node via presence of "global" not absence of "window"
+// to support hybrid environments like Electron
+if(typeof global !== 'undefined') {
+ var Buffer = require('buffer').Buffer; // TODO just use global Buffer
+}
+
+/**
+ * A class representation of the BSON Binary type.
+ *
+ * Sub types
+ * - **BSON.BSON_BINARY_SUBTYPE_DEFAULT**, default BSON type.
+ * - **BSON.BSON_BINARY_SUBTYPE_FUNCTION**, BSON function type.
+ * - **BSON.BSON_BINARY_SUBTYPE_BYTE_ARRAY**, BSON byte array type.
+ * - **BSON.BSON_BINARY_SUBTYPE_UUID**, BSON uuid type.
+ * - **BSON.BSON_BINARY_SUBTYPE_MD5**, BSON md5 type.
+ * - **BSON.BSON_BINARY_SUBTYPE_USER_DEFINED**, BSON user defined type.
+ *
+ * @class
+ * @param {Buffer} buffer a buffer object containing the binary data.
+ * @param {Number} [subType] the option binary type.
+ * @return {Binary}
+ */
+function Binary(buffer, subType) {
+ if(!(this instanceof Binary)) return new Binary(buffer, subType);
+
+ this._bsontype = 'Binary';
+
+ if(buffer instanceof Number) {
+ this.sub_type = buffer;
+ this.position = 0;
+ } else {
+ this.sub_type = subType == null ? BSON_BINARY_SUBTYPE_DEFAULT : subType;
+ this.position = 0;
+ }
+
+ if(buffer != null && !(buffer instanceof Number)) {
+ // Only accept Buffer, Uint8Array or Arrays
+ if(typeof buffer == 'string') {
+ // Different ways of writing the length of the string for the different types
+ if(typeof Buffer != 'undefined') {
+ this.buffer = new Buffer(buffer);
+ } else if(typeof Uint8Array != 'undefined' || (Object.prototype.toString.call(buffer) == '[object Array]')) {
+ this.buffer = writeStringToArray(buffer);
+ } else {
+ throw new Error("only String, Buffer, Uint8Array or Array accepted");
+ }
+ } else {
+ this.buffer = buffer;
+ }
+ this.position = buffer.length;
+ } else {
+ if(typeof Buffer != 'undefined') {
+ this.buffer = new Buffer(Binary.BUFFER_SIZE);
+ } else if(typeof Uint8Array != 'undefined'){
+ this.buffer = new Uint8Array(new ArrayBuffer(Binary.BUFFER_SIZE));
+ } else {
+ this.buffer = new Array(Binary.BUFFER_SIZE);
+ }
+ // Set position to start of buffer
+ this.position = 0;
+ }
+};
+
+/**
+ * Updates this binary with byte_value.
+ *
+ * @method
+ * @param {string} byte_value a single byte we wish to write.
+ */
+Binary.prototype.put = function put(byte_value) {
+ // If it's a string and a has more than one character throw an error
+ if(byte_value['length'] != null && typeof byte_value != 'number' && byte_value.length != 1) throw new Error("only accepts single character String, Uint8Array or Array");
+ if(typeof byte_value != 'number' && byte_value < 0 || byte_value > 255) throw new Error("only accepts number in a valid unsigned byte range 0-255");
+
+ // Decode the byte value once
+ var decoded_byte = null;
+ if(typeof byte_value == 'string') {
+ decoded_byte = byte_value.charCodeAt(0);
+ } else if(byte_value['length'] != null) {
+ decoded_byte = byte_value[0];
+ } else {
+ decoded_byte = byte_value;
+ }
+
+ if(this.buffer.length > this.position) {
+ this.buffer[this.position++] = decoded_byte;
+ } else {
+ if(typeof Buffer != 'undefined' && Buffer.isBuffer(this.buffer)) {
+ // Create additional overflow buffer
+ var buffer = new Buffer(Binary.BUFFER_SIZE + this.buffer.length);
+ // Combine the two buffers together
+ this.buffer.copy(buffer, 0, 0, this.buffer.length);
+ this.buffer = buffer;
+ this.buffer[this.position++] = decoded_byte;
+ } else {
+ var buffer = null;
+ // Create a new buffer (typed or normal array)
+ if(Object.prototype.toString.call(this.buffer) == '[object Uint8Array]') {
+ buffer = new Uint8Array(new ArrayBuffer(Binary.BUFFER_SIZE + this.buffer.length));
+ } else {
+ buffer = new Array(Binary.BUFFER_SIZE + this.buffer.length);
+ }
+
+ // We need to copy all the content to the new array
+ for(var i = 0; i < this.buffer.length; i++) {
+ buffer[i] = this.buffer[i];
+ }
+
+ // Reassign the buffer
+ this.buffer = buffer;
+ // Write the byte
+ this.buffer[this.position++] = decoded_byte;
+ }
+ }
+};
+
+/**
+ * Writes a buffer or string to the binary.
+ *
+ * @method
+ * @param {(Buffer|string)} string a string or buffer to be written to the Binary BSON object.
+ * @param {number} offset specify the binary of where to write the content.
+ * @return {null}
+ */
+Binary.prototype.write = function write(string, offset) {
+ offset = typeof offset == 'number' ? offset : this.position;
+
+ // If the buffer is to small let's extend the buffer
+ if(this.buffer.length < offset + string.length) {
+ var buffer = null;
+ // If we are in node.js
+ if(typeof Buffer != 'undefined' && Buffer.isBuffer(this.buffer)) {
+ buffer = new Buffer(this.buffer.length + string.length);
+ this.buffer.copy(buffer, 0, 0, this.buffer.length);
+ } else if(Object.prototype.toString.call(this.buffer) == '[object Uint8Array]') {
+ // Create a new buffer
+ buffer = new Uint8Array(new ArrayBuffer(this.buffer.length + string.length))
+ // Copy the content
+ for(var i = 0; i < this.position; i++) {
+ buffer[i] = this.buffer[i];
+ }
+ }
+
+ // Assign the new buffer
+ this.buffer = buffer;
+ }
+
+ if(typeof Buffer != 'undefined' && Buffer.isBuffer(string) && Buffer.isBuffer(this.buffer)) {
+ string.copy(this.buffer, offset, 0, string.length);
+ this.position = (offset + string.length) > this.position ? (offset + string.length) : this.position;
+ // offset = string.length
+ } else if(typeof Buffer != 'undefined' && typeof string == 'string' && Buffer.isBuffer(this.buffer)) {
+ this.buffer.write(string, offset, 'binary');
+ this.position = (offset + string.length) > this.position ? (offset + string.length) : this.position;
+ // offset = string.length;
+ } else if(Object.prototype.toString.call(string) == '[object Uint8Array]'
+ || Object.prototype.toString.call(string) == '[object Array]' && typeof string != 'string') {
+ for(var i = 0; i < string.length; i++) {
+ this.buffer[offset++] = string[i];
+ }
+
+ this.position = offset > this.position ? offset : this.position;
+ } else if(typeof string == 'string') {
+ for(var i = 0; i < string.length; i++) {
+ this.buffer[offset++] = string.charCodeAt(i);
+ }
+
+ this.position = offset > this.position ? offset : this.position;
+ }
+};
+
+/**
+ * Reads **length** bytes starting at **position**.
+ *
+ * @method
+ * @param {number} position read from the given position in the Binary.
+ * @param {number} length the number of bytes to read.
+ * @return {Buffer}
+ */
+Binary.prototype.read = function read(position, length) {
+ length = length && length > 0
+ ? length
+ : this.position;
+
+ // Let's return the data based on the type we have
+ if(this.buffer['slice']) {
+ return this.buffer.slice(position, position + length);
+ } else {
+ // Create a buffer to keep the result
+ var buffer = typeof Uint8Array != 'undefined' ? new Uint8Array(new ArrayBuffer(length)) : new Array(length);
+ for(var i = 0; i < length; i++) {
+ buffer[i] = this.buffer[position++];
+ }
+ }
+ // Return the buffer
+ return buffer;
+};
+
+/**
+ * Returns the value of this binary as a string.
+ *
+ * @method
+ * @return {string}
+ */
+Binary.prototype.value = function value(asRaw) {
+ asRaw = asRaw == null ? false : asRaw;
+
+ // Optimize to serialize for the situation where the data == size of buffer
+ if(asRaw && typeof Buffer != 'undefined' && Buffer.isBuffer(this.buffer) && this.buffer.length == this.position)
+ return this.buffer;
+
+ // If it's a node.js buffer object
+ if(typeof Buffer != 'undefined' && Buffer.isBuffer(this.buffer)) {
+ return asRaw ? this.buffer.slice(0, this.position) : this.buffer.toString('binary', 0, this.position);
+ } else {
+ if(asRaw) {
+ // we support the slice command use it
+ if(this.buffer['slice'] != null) {
+ return this.buffer.slice(0, this.position);
+ } else {
+ // Create a new buffer to copy content to
+ var newBuffer = Object.prototype.toString.call(this.buffer) == '[object Uint8Array]' ? new Uint8Array(new ArrayBuffer(this.position)) : new Array(this.position);
+ // Copy content
+ for(var i = 0; i < this.position; i++) {
+ newBuffer[i] = this.buffer[i];
+ }
+ // Return the buffer
+ return newBuffer;
+ }
+ } else {
+ return convertArraytoUtf8BinaryString(this.buffer, 0, this.position);
+ }
+ }
+};
+
+/**
+ * Length.
+ *
+ * @method
+ * @return {number} the length of the binary.
+ */
+Binary.prototype.length = function length() {
+ return this.position;
+};
+
+/**
+ * @ignore
+ */
+Binary.prototype.toJSON = function() {
+ return this.buffer != null ? this.buffer.toString('base64') : '';
+}
+
+/**
+ * @ignore
+ */
+Binary.prototype.toString = function(format) {
+ return this.buffer != null ? this.buffer.slice(0, this.position).toString(format) : '';
+}
+
+/**
+ * Binary default subtype
+ * @ignore
+ */
+var BSON_BINARY_SUBTYPE_DEFAULT = 0;
+
+/**
+ * @ignore
+ */
+var writeStringToArray = function(data) {
+ // Create a buffer
+ var buffer = typeof Uint8Array != 'undefined' ? new Uint8Array(new ArrayBuffer(data.length)) : new Array(data.length);
+ // Write the content to the buffer
+ for(var i = 0; i < data.length; i++) {
+ buffer[i] = data.charCodeAt(i);
+ }
+ // Write the string to the buffer
+ return buffer;
+}
+
+/**
+ * Convert Array ot Uint8Array to Binary String
+ *
+ * @ignore
+ */
+var convertArraytoUtf8BinaryString = function(byteArray, startIndex, endIndex) {
+ var result = "";
+ for(var i = startIndex; i < endIndex; i++) {
+ result = result + String.fromCharCode(byteArray[i]);
+ }
+ return result;
+};
+
+Binary.BUFFER_SIZE = 256;
+
+/**
+ * Default BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+Binary.SUBTYPE_DEFAULT = 0;
+/**
+ * Function BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+Binary.SUBTYPE_FUNCTION = 1;
+/**
+ * Byte Array BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+Binary.SUBTYPE_BYTE_ARRAY = 2;
+/**
+ * OLD UUID BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+Binary.SUBTYPE_UUID_OLD = 3;
+/**
+ * UUID BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+Binary.SUBTYPE_UUID = 4;
+/**
+ * MD5 BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+Binary.SUBTYPE_MD5 = 5;
+/**
+ * User BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+Binary.SUBTYPE_USER_DEFINED = 128;
+
+/**
+ * Expose.
+ */
+module.exports = Binary;
+module.exports.Binary = Binary;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/bson.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/bson.js
new file mode 100644
index 0000000..b98887e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/bson.js
@@ -0,0 +1,358 @@
+"use strict"
+
+var writeIEEE754 = require('./float_parser').writeIEEE754,
+ readIEEE754 = require('./float_parser').readIEEE754,
+ Map = require('./map'),
+ Long = require('./long'),
+ Double = require('./double'),
+ Timestamp = require('./timestamp'),
+ ObjectID = require('./objectid'),
+ BSONRegExp = require('./regexp'),
+ Symbol = require('./symbol'),
+ Int32 = require('./int_32'),
+ Code = require('./code'),
+ Decimal128 = require('./decimal128'),
+ MinKey = require('./min_key'),
+ MaxKey = require('./max_key'),
+ DBRef = require('./db_ref'),
+ Binary = require('./binary');
+
+// Parts of the parser
+var deserialize = require('./parser/deserializer'),
+ serializer = require('./parser/serializer'),
+ calculateObjectSize = require('./parser/calculate_size');
+
+/**
+ * @ignore
+ * @api private
+ */
+// Max Size
+var MAXSIZE = (1024*1024*17);
+// Max Document Buffer size
+var buffer = new Buffer(MAXSIZE);
+
+var BSON = function() {
+}
+
+/**
+ * Serialize a Javascript object.
+ *
+ * @param {Object} object the Javascript object to serialize.
+ * @param {Boolean} [options.checkKeys] the serializer will check if keys are valid.
+ * @param {Boolean} [options.serializeFunctions=false] serialize the javascript functions **(default:false)**.
+ * @param {Boolean} [options.ignoreUndefined=true] ignore undefined fields **(default:true)**.
+ * @return {Buffer} returns the Buffer object containing the serialized object.
+ * @api public
+ */
+BSON.prototype.serialize = function serialize(object, options) {
+ options = options || {};
+ // Unpack the options
+ var checkKeys = typeof options.checkKeys == 'boolean'
+ ? options.checkKeys : false;
+ var serializeFunctions = typeof options.serializeFunctions == 'boolean'
+ ? options.serializeFunctions : false;
+ var ignoreUndefined = typeof options.ignoreUndefined == 'boolean'
+ ? options.ignoreUndefined : true;
+
+ // Attempt to serialize
+ var serializationIndex = serializer(buffer, object, checkKeys, 0, 0, serializeFunctions, ignoreUndefined, []);
+ // Create the final buffer
+ var finishedBuffer = new Buffer(serializationIndex);
+ // Copy into the finished buffer
+ buffer.copy(finishedBuffer, 0, 0, finishedBuffer.length);
+ // Return the buffer
+ return finishedBuffer;
+}
+
+/**
+ * Serialize a Javascript object using a predefined Buffer and index into the buffer, useful when pre-allocating the space for serialization.
+ *
+ * @param {Object} object the Javascript object to serialize.
+ * @param {Buffer} buffer the Buffer you pre-allocated to store the serialized BSON object.
+ * @param {Boolean} [options.checkKeys] the serializer will check if keys are valid.
+ * @param {Boolean} [options.serializeFunctions=false] serialize the javascript functions **(default:false)**.
+ * @param {Boolean} [options.ignoreUndefined=true] ignore undefined fields **(default:true)**.
+ * @param {Number} [options.index] the index in the buffer where we wish to start serializing into.
+ * @return {Number} returns the index pointing to the last written byte in the buffer.
+ * @api public
+ */
+BSON.prototype.serializeWithBufferAndIndex = function(object, finalBuffer, options) {
+ options = options || {};
+ // Unpack the options
+ var checkKeys = typeof options.checkKeys == 'boolean'
+ ? options.checkKeys : false;
+ var serializeFunctions = typeof options.serializeFunctions == 'boolean'
+ ? options.serializeFunctions : false;
+ var ignoreUndefined = typeof options.ignoreUndefined == 'boolean'
+ ? options.ignoreUndefined : true;
+ var startIndex = typeof options.index == 'number'
+ ? options.index : 0;
+
+ // Attempt to serialize
+ var serializationIndex = serializer(buffer, object, checkKeys, startIndex || 0, 0, serializeFunctions, ignoreUndefined);
+ buffer.copy(finalBuffer, startIndex, 0, serializationIndex);
+
+ // Return the index
+ return serializationIndex - 1;
+}
+
+/**
+ * Deserialize data as BSON.
+ *
+ * @param {Buffer} buffer the buffer containing the serialized set of BSON documents.
+ * @param {Object} [options.evalFunctions=false] evaluate functions in the BSON document scoped to the object deserialized.
+ * @param {Object} [options.cacheFunctions=false] cache evaluated functions for reuse.
+ * @param {Object} [options.cacheFunctionsCrc32=false] use a crc32 code for caching, otherwise use the string of the function.
+ * @param {Object} [options.promoteLongs=true] when deserializing a Long will fit it into a Number if it's smaller than 53 bits
+ * @param {Object} [options.promoteBuffers=false] when deserializing a Binary will return it as a node.js Buffer instance.
+ * @param {Object} [options.promoteValues=false] when deserializing will promote BSON values to their Node.js closest equivalent types.
+ * @param {Object} [options.fieldsAsRaw=null] allow to specify if there what fields we wish to return as unserialized raw buffer.
+ * @param {Object} [options.bsonRegExp=false] return BSON regular expressions as BSONRegExp instances.
+ * @return {Object} returns the deserialized Javascript Object.
+ * @api public
+ */
+BSON.prototype.deserialize = function(buffer, options) {
+ return deserialize(buffer, options);
+}
+
+/**
+ * Calculate the bson size for a passed in Javascript object.
+ *
+ * @param {Object} object the Javascript object to calculate the BSON byte size for.
+ * @param {Boolean} [options.serializeFunctions=false] serialize the javascript functions **(default:false)**.
+ * @param {Boolean} [options.ignoreUndefined=true] ignore undefined fields **(default:true)**.
+ * @return {Number} returns the number of bytes the BSON object will take up.
+ * @api public
+ */
+BSON.prototype.calculateObjectSize = function(object, options) {
+ options = options || {};
+
+ var serializeFunctions = typeof options.serializeFunctions == 'boolean'
+ ? options.serializeFunctions : false;
+ var ignoreUndefined = typeof options.ignoreUndefined == 'boolean'
+ ? options.ignoreUndefined : true;
+
+ return calculateObjectSize(object, serializeFunctions, ignoreUndefined);
+}
+
+/**
+ * Deserialize stream data as BSON documents.
+ *
+ * @param {Buffer} data the buffer containing the serialized set of BSON documents.
+ * @param {Number} startIndex the start index in the data Buffer where the deserialization is to start.
+ * @param {Number} numberOfDocuments number of documents to deserialize.
+ * @param {Array} documents an array where to store the deserialized documents.
+ * @param {Number} docStartIndex the index in the documents array from where to start inserting documents.
+ * @param {Object} [options] additional options used for the deserialization.
+ * @param {Object} [options.evalFunctions=false] evaluate functions in the BSON document scoped to the object deserialized.
+ * @param {Object} [options.cacheFunctions=false] cache evaluated functions for reuse.
+ * @param {Object} [options.cacheFunctionsCrc32=false] use a crc32 code for caching, otherwise use the string of the function.
+ * @param {Object} [options.promoteLongs=true] when deserializing a Long will fit it into a Number if it's smaller than 53 bits
+ * @param {Object} [options.promoteBuffers=false] when deserializing a Binary will return it as a node.js Buffer instance.
+ * @param {Object} [options.promoteValues=false] when deserializing will promote BSON values to their Node.js closest equivalent types.
+ * @param {Object} [options.fieldsAsRaw=null] allow to specify if there what fields we wish to return as unserialized raw buffer.
+ * @param {Object} [options.bsonRegExp=false] return BSON regular expressions as BSONRegExp instances.
+ * @return {Number} returns the next index in the buffer after deserialization **x** numbers of documents.
+ * @api public
+ */
+BSON.prototype.deserializeStream = function(data, startIndex, numberOfDocuments, documents, docStartIndex, options) {
+ options = options != null ? options : {};
+ var index = startIndex;
+ // Loop over all documents
+ for(var i = 0; i < numberOfDocuments; i++) {
+ // Find size of the document
+ var size = data[index] | data[index + 1] << 8 | data[index + 2] << 16 | data[index + 3] << 24;
+ // Update options with index
+ options['index'] = index;
+ // Parse the document at this point
+ documents[docStartIndex + i] = this.deserialize(data, options);
+ // Adjust index by the document size
+ index = index + size;
+ }
+
+ // Return object containing end index of parsing and list of documents
+ return index;
+}
+
+/**
+ * @ignore
+ * @api private
+ */
+// BSON MAX VALUES
+BSON.BSON_INT32_MAX = 0x7FFFFFFF;
+BSON.BSON_INT32_MIN = -0x80000000;
+
+BSON.BSON_INT64_MAX = Math.pow(2, 63) - 1;
+BSON.BSON_INT64_MIN = -Math.pow(2, 63);
+
+// JS MAX PRECISE VALUES
+BSON.JS_INT_MAX = 0x20000000000000; // Any integer up to 2^53 can be precisely represented by a double.
+BSON.JS_INT_MIN = -0x20000000000000; // Any integer down to -2^53 can be precisely represented by a double.
+
+// Internal long versions
+var JS_INT_MAX_LONG = Long.fromNumber(0x20000000000000); // Any integer up to 2^53 can be precisely represented by a double.
+var JS_INT_MIN_LONG = Long.fromNumber(-0x20000000000000); // Any integer down to -2^53 can be precisely represented by a double.
+
+/**
+ * Number BSON Type
+ *
+ * @classconstant BSON_DATA_NUMBER
+ **/
+BSON.BSON_DATA_NUMBER = 1;
+/**
+ * String BSON Type
+ *
+ * @classconstant BSON_DATA_STRING
+ **/
+BSON.BSON_DATA_STRING = 2;
+/**
+ * Object BSON Type
+ *
+ * @classconstant BSON_DATA_OBJECT
+ **/
+BSON.BSON_DATA_OBJECT = 3;
+/**
+ * Array BSON Type
+ *
+ * @classconstant BSON_DATA_ARRAY
+ **/
+BSON.BSON_DATA_ARRAY = 4;
+/**
+ * Binary BSON Type
+ *
+ * @classconstant BSON_DATA_BINARY
+ **/
+BSON.BSON_DATA_BINARY = 5;
+/**
+ * ObjectID BSON Type
+ *
+ * @classconstant BSON_DATA_OID
+ **/
+BSON.BSON_DATA_OID = 7;
+/**
+ * Boolean BSON Type
+ *
+ * @classconstant BSON_DATA_BOOLEAN
+ **/
+BSON.BSON_DATA_BOOLEAN = 8;
+/**
+ * Date BSON Type
+ *
+ * @classconstant BSON_DATA_DATE
+ **/
+BSON.BSON_DATA_DATE = 9;
+/**
+ * null BSON Type
+ *
+ * @classconstant BSON_DATA_NULL
+ **/
+BSON.BSON_DATA_NULL = 10;
+/**
+ * RegExp BSON Type
+ *
+ * @classconstant BSON_DATA_REGEXP
+ **/
+BSON.BSON_DATA_REGEXP = 11;
+/**
+ * Code BSON Type
+ *
+ * @classconstant BSON_DATA_CODE
+ **/
+BSON.BSON_DATA_CODE = 13;
+/**
+ * Symbol BSON Type
+ *
+ * @classconstant BSON_DATA_SYMBOL
+ **/
+BSON.BSON_DATA_SYMBOL = 14;
+/**
+ * Code with Scope BSON Type
+ *
+ * @classconstant BSON_DATA_CODE_W_SCOPE
+ **/
+BSON.BSON_DATA_CODE_W_SCOPE = 15;
+/**
+ * 32 bit Integer BSON Type
+ *
+ * @classconstant BSON_DATA_INT
+ **/
+BSON.BSON_DATA_INT = 16;
+/**
+ * Timestamp BSON Type
+ *
+ * @classconstant BSON_DATA_TIMESTAMP
+ **/
+BSON.BSON_DATA_TIMESTAMP = 17;
+/**
+ * Long BSON Type
+ *
+ * @classconstant BSON_DATA_LONG
+ **/
+BSON.BSON_DATA_LONG = 18;
+/**
+ * MinKey BSON Type
+ *
+ * @classconstant BSON_DATA_MIN_KEY
+ **/
+BSON.BSON_DATA_MIN_KEY = 0xff;
+/**
+ * MaxKey BSON Type
+ *
+ * @classconstant BSON_DATA_MAX_KEY
+ **/
+BSON.BSON_DATA_MAX_KEY = 0x7f;
+
+/**
+ * Binary Default Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_DEFAULT
+ **/
+BSON.BSON_BINARY_SUBTYPE_DEFAULT = 0;
+/**
+ * Binary Function Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_FUNCTION
+ **/
+BSON.BSON_BINARY_SUBTYPE_FUNCTION = 1;
+/**
+ * Binary Byte Array Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_BYTE_ARRAY
+ **/
+BSON.BSON_BINARY_SUBTYPE_BYTE_ARRAY = 2;
+/**
+ * Binary UUID Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_UUID
+ **/
+BSON.BSON_BINARY_SUBTYPE_UUID = 3;
+/**
+ * Binary MD5 Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_MD5
+ **/
+BSON.BSON_BINARY_SUBTYPE_MD5 = 4;
+/**
+ * Binary User Defined Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_USER_DEFINED
+ **/
+BSON.BSON_BINARY_SUBTYPE_USER_DEFINED = 128;
+
+// Return BSON
+module.exports = BSON;
+module.exports.Code = Code;
+module.exports.Map = Map;
+module.exports.Symbol = Symbol;
+module.exports.BSON = BSON;
+module.exports.DBRef = DBRef;
+module.exports.Binary = Binary;
+module.exports.ObjectID = ObjectID;
+module.exports.Long = Long;
+module.exports.Timestamp = Timestamp;
+module.exports.Double = Double;
+module.exports.Int32 = Int32;
+module.exports.MinKey = MinKey;
+module.exports.MaxKey = MaxKey;
+module.exports.BSONRegExp = BSONRegExp;
+module.exports.Decimal128 = Decimal128;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/code.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/code.js
new file mode 100644
index 0000000..bc80ce5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/code.js
@@ -0,0 +1,24 @@
+/**
+ * A class representation of the BSON Code type.
+ *
+ * @class
+ * @param {(string|function)} code a string or function.
+ * @param {Object} [scope] an optional scope for the function.
+ * @return {Code}
+ */
+var Code = function Code(code, scope) {
+ if(!(this instanceof Code)) return new Code(code, scope);
+ this._bsontype = 'Code';
+ this.code = code;
+ this.scope = scope;
+};
+
+/**
+ * @ignore
+ */
+Code.prototype.toJSON = function() {
+ return {scope:this.scope, code:this.code};
+}
+
+module.exports = Code;
+module.exports.Code = Code;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/db_ref.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/db_ref.js
new file mode 100644
index 0000000..06789a6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/db_ref.js
@@ -0,0 +1,32 @@
+/**
+ * A class representation of the BSON DBRef type.
+ *
+ * @class
+ * @param {string} namespace the collection name.
+ * @param {ObjectID} oid the reference ObjectID.
+ * @param {string} [db] optional db name, if omitted the reference is local to the current db.
+ * @return {DBRef}
+ */
+function DBRef(namespace, oid, db) {
+ if(!(this instanceof DBRef)) return new DBRef(namespace, oid, db);
+
+ this._bsontype = 'DBRef';
+ this.namespace = namespace;
+ this.oid = oid;
+ this.db = db;
+};
+
+/**
+ * @ignore
+ * @api private
+ */
+DBRef.prototype.toJSON = function() {
+ return {
+ '$ref':this.namespace,
+ '$id':this.oid,
+ '$db':this.db == null ? '' : this.db
+ };
+}
+
+module.exports = DBRef;
+module.exports.DBRef = DBRef; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/decimal128.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/decimal128.js
new file mode 100644
index 0000000..23ae082
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/decimal128.js
@@ -0,0 +1,728 @@
+"use strict"
+
+var Long = require('./long');
+
+var PARSE_STRING_REGEXP = /^(\+|\-)?(\d+|(\d*\.\d*))?(E|e)?([\-\+])?(\d+)?$/;
+var PARSE_INF_REGEXP = /^(\+|\-)?(Infinity|inf)$/i;
+var PARSE_NAN_REGEXP = /^(\+|\-)?NaN$/i;
+
+var EXPONENT_MAX = 6111;
+var EXPONENT_MIN = -6176;
+var EXPONENT_BIAS = 6176;
+var MAX_DIGITS = 34;
+
+// Nan value bits as 32 bit values (due to lack of longs)
+var NAN_BUFFER = [0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00].reverse();
+// Infinity value bits 32 bit values (due to lack of longs)
+var INF_NEGATIVE_BUFFER = [0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00].reverse();
+var INF_POSITIVE_BUFFER = [0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00].reverse();
+
+var EXPONENT_REGEX = /^([\-\+])?(\d+)?$/;
+
+
+// Detect if the value is a digit
+var isDigit = function(value) {
+ return !isNaN(parseInt(value, 10));
+}
+
+// Divide two uint128 values
+var divideu128 = function(value) {
+ var DIVISOR = Long.fromNumber(1000 * 1000 * 1000);
+ var _rem = Long.fromNumber(0);
+ var i = 0;
+
+ if(!value.parts[0] && !value.parts[1] &&
+ !value.parts[2] && !value.parts[3]) {
+ return { quotient: value, rem: _rem };
+ }
+
+ for(var i = 0; i <= 3; i++) {
+ // Adjust remainder to match value of next dividend
+ _rem = _rem.shiftLeft(32);
+ // Add the divided to _rem
+ _rem = _rem.add(new Long(value.parts[i], 0));
+ value.parts[i] = _rem.div(DIVISOR).low_;
+ _rem = _rem.modulo(DIVISOR);
+ }
+
+ return { quotient: value, rem: _rem };
+}
+
+// Multiply two Long values and return the 128 bit value
+var multiply64x2 = function(left, right) {
+ if(!left && !right) {
+ return {high: Long.fromNumber(0), low: Long.fromNumber(0)};
+ }
+
+ var leftHigh = left.shiftRightUnsigned(32);
+ var leftLow = new Long(left.getLowBits(), 0);
+ var rightHigh = right.shiftRightUnsigned(32);
+ var rightLow = new Long(right.getLowBits(), 0);
+
+ var productHigh = leftHigh.multiply(rightHigh);
+ var productMid = leftHigh.multiply(rightLow);
+ var productMid2 = leftLow.multiply(rightHigh);
+ var productLow = leftLow.multiply(rightLow);
+
+ productHigh = productHigh.add(productMid.shiftRightUnsigned(32));
+ productMid = new Long(productMid.getLowBits(), 0)
+ .add(productMid2)
+ .add(productLow.shiftRightUnsigned(32));
+
+ productHigh = productHigh.add(productMid.shiftRightUnsigned(32));
+ productLow = productMid.shiftLeft(32).add(new Long(productLow.getLowBits(), 0));
+
+ // Return the 128 bit result
+ return {high: productHigh, low: productLow};
+}
+
+var lessThan = function(left, right) {
+ // Make values unsigned
+ var uhleft = left.high_ >>> 0;
+ var uhright = right.high_ >>> 0;
+
+ // Compare high bits first
+ if(uhleft < uhright) {
+ return true
+ } else if(uhleft == uhright) {
+ var ulleft = left.low_ >>> 0;
+ var ulright = right.low_ >>> 0;
+ if(ulleft < ulright) return true;
+ }
+
+ return false;
+}
+
+var longtoHex = function(value) {
+ var buffer = new Buffer(8);
+ var index = 0;
+ // Encode the low 64 bits of the decimal
+ // Encode low bits
+ buffer[index++] = value.low_ & 0xff;
+ buffer[index++] = (value.low_ >> 8) & 0xff;
+ buffer[index++] = (value.low_ >> 16) & 0xff;
+ buffer[index++] = (value.low_ >> 24) & 0xff;
+ // Encode high bits
+ buffer[index++] = value.high_ & 0xff;
+ buffer[index++] = (value.high_ >> 8) & 0xff;
+ buffer[index++] = (value.high_ >> 16) & 0xff;
+ buffer[index++] = (value.high_ >> 24) & 0xff;
+ return buffer.reverse().toString('hex');
+}
+
+var int32toHex = function(value) {
+ var buffer = new Buffer(4);
+ var index = 0;
+ // Encode the low 64 bits of the decimal
+ // Encode low bits
+ buffer[index++] = value & 0xff;
+ buffer[index++] = (value >> 8) & 0xff;
+ buffer[index++] = (value >> 16) & 0xff;
+ buffer[index++] = (value >> 24) & 0xff;
+ return buffer.reverse().toString('hex');
+}
+
+var Decimal128 = function(bytes) {
+ this._bsontype = 'Decimal128';
+ this.bytes = bytes;
+}
+
+Decimal128.fromString = function(string) {
+ // Parse state tracking
+ var isNegative = false;
+ var sawRadix = false;
+ var foundNonZero = false;
+
+ // Total number of significant digits (no leading or trailing zero)
+ var significantDigits = 0;
+ // Total number of significand digits read
+ var nDigitsRead = 0;
+ // Total number of digits (no leading zeros)
+ var nDigits = 0;
+ // The number of the digits after radix
+ var radixPosition = 0;
+ // The index of the first non-zero in *str*
+ var firstNonZero = 0;
+
+ // Digits Array
+ var digits = [0];
+ // The number of digits in digits
+ var nDigitsStored = 0;
+ // Insertion pointer for digits
+ var digitsInsert = 0;
+ // The index of the first non-zero digit
+ var firstDigit = 0;
+ // The index of the last digit
+ var lastDigit = 0;
+
+ // Exponent
+ var exponent = 0;
+ // loop index over array
+ var i = 0;
+ // The high 17 digits of the significand
+ var significandHigh = [0, 0];
+ // The low 17 digits of the significand
+ var significandLow = [0, 0];
+ // The biased exponent
+ var biasedExponent = 0;
+
+ // Read index
+ var index = 0;
+
+ // Trim the string
+ string = string.trim();
+
+ // Results
+ var stringMatch = string.match(PARSE_STRING_REGEXP);
+ var infMatch = string.match(PARSE_INF_REGEXP);
+ var nanMatch = string.match(PARSE_NAN_REGEXP);
+
+ // Validate the string
+ if(!stringMatch
+ && ! infMatch
+ && ! nanMatch || string.length == 0) {
+ throw new Error("" + string + " not a valid Decimal128 string");
+ }
+
+ // Check if we have an illegal exponent format
+ if(stringMatch && stringMatch[4] && stringMatch[2] === undefined) {
+ throw new Error("" + string + " not a valid Decimal128 string");
+ }
+
+ // Get the negative or positive sign
+ if(string[index] == '+' || string[index] == '-') {
+ isNegative = string[index++] == '-';
+ }
+
+ // Check if user passed Infinity or NaN
+ if(!isDigit(string[index]) && string[index] != '.') {
+ if(string[index] == 'i' || string[index] == 'I') {
+ return new Decimal128(new Buffer(isNegative ? INF_NEGATIVE_BUFFER : INF_POSITIVE_BUFFER));
+ } else if(string[index] == 'N') {
+ return new Decimal128(new Buffer(NAN_BUFFER));
+ }
+ }
+
+ // Read all the digits
+ while(isDigit(string[index]) || string[index] == '.') {
+ if(string[index] == '.') {
+ if(sawRadix) {
+ return new Decimal128(new Buffer(NAN_BUFFER));
+ }
+
+ sawRadix = true;
+ index = index + 1;
+ continue;
+ }
+
+ if(nDigitsStored < 34) {
+ if(string[index] != '0' || foundNonZero) {
+ if(!foundNonZero) {
+ firstNonZero = nDigitsRead;
+ }
+
+ foundNonZero = true;
+
+ // Only store 34 digits
+ digits[digitsInsert++] = parseInt(string[index], 10);
+ nDigitsStored = nDigitsStored + 1;
+ }
+ }
+
+ if(foundNonZero) {
+ nDigits = nDigits + 1;
+ }
+
+ if(sawRadix) {
+ radixPosition = radixPosition + 1;
+ }
+
+ nDigitsRead = nDigitsRead + 1;
+ index = index + 1;
+ }
+
+ if(sawRadix && !nDigitsRead) {
+ throw new Error("" + string + " not a valid Decimal128 string");
+ }
+
+ // Read exponent if exists
+ if(string[index] == 'e' || string[index] == 'E') {
+ // Read exponent digits
+ var match = string.substr(++index).match(EXPONENT_REGEX);
+
+ // No digits read
+ if(!match || !match[2]) {
+ return new Decimal128(new Buffer(NAN_BUFFER));
+ }
+
+ // Get exponent
+ exponent = parseInt(match[0], 10);
+
+ // Adjust the index
+ index = index + match[0].length;
+ }
+
+ // Return not a number
+ if(string[index]) {
+ return new Decimal128(new Buffer(NAN_BUFFER));
+ }
+
+ // Done reading input
+ // Find first non-zero digit in digits
+ firstDigit = 0;
+
+ if(!nDigitsStored) {
+ firstDigit = 0;
+ lastDigit = 0;
+ digits[0] = 0;
+ nDigits = 1;
+ nDigitsStored = 1;
+ significantDigits = 0;
+ } else {
+ lastDigit = nDigitsStored - 1;
+ significantDigits = nDigits;
+
+ if(exponent != 0 && significantDigits != 1) {
+ while(string[firstNonZero + significantDigits - 1] == '0') {
+ significantDigits = significantDigits - 1;
+ }
+ }
+ }
+
+ // Normalization of exponent
+ // Correct exponent based on radix position, and shift significand as needed
+ // to represent user input
+
+ // Overflow prevention
+ if(exponent <= radixPosition && radixPosition - exponent > (1 << 14)) {
+ exponent = EXPONENT_MIN;
+ } else {
+ exponent = exponent - radixPosition;
+ }
+
+ // Attempt to normalize the exponent
+ while(exponent > EXPONENT_MAX) {
+ // Shift exponent to significand and decrease
+ lastDigit = lastDigit + 1;
+
+ if(lastDigit - firstDigit > MAX_DIGITS) {
+ // Check if we have a zero then just hard clamp, otherwise fail
+ var digitsString = digits.join('');
+ if(digitsString.match(/^0+$/)) {
+ exponent = EXPONENT_MAX;
+ break;
+ } else {
+ return new Decimal128(new Buffer(isNegative ? INF_NEGATIVE_BUFFER : INF_POSITIVE_BUFFER));
+ }
+ }
+
+ exponent = exponent - 1;
+ }
+
+ while(exponent < EXPONENT_MIN || nDigitsStored < nDigits) {
+ // Shift last digit
+ if(lastDigit == 0) {
+ exponent = EXPONENT_MIN;
+ significantDigits = 0;
+ break;
+ }
+
+ if(nDigitsStored < nDigits) {
+ // adjust to match digits not stored
+ nDigits = nDigits - 1;
+ } else {
+ // adjust to round
+ lastDigit = lastDigit - 1;
+ }
+
+ if(exponent < EXPONENT_MAX) {
+ exponent = exponent + 1;
+ } else {
+ // Check if we have a zero then just hard clamp, otherwise fail
+ var digitsString = digits.join('');
+ if(digitsString.match(/^0+$/)) {
+ exponent = EXPONENT_MAX;
+ break;
+ } else {
+ return new Decimal128(new Buffer(isNegative ? INF_NEGATIVE_BUFFER : INF_POSITIVE_BUFFER))
+ }
+ }
+ }
+
+
+ // Round
+ // We've normalized the exponent, but might still need to round.
+ if((lastDigit - firstDigit + 1 < significantDigits) && string[significantDigits] != '0') {
+ var endOfString = nDigitsRead;
+
+ // If we have seen a radix point, 'string' is 1 longer than we have
+ // documented with ndigits_read, so inc the position of the first nonzero
+ // digit and the position that digits are read to.
+ if(sawRadix && exponent == EXPONENT_MIN) {
+ firstNonZero = firstNonZero + 1;
+ endOfString = endOfString + 1;
+ }
+
+ var roundDigit = parseInt(string[firstNonZero + lastDigit + 1], 10);
+ var roundBit = 0;
+
+ if(roundDigit >= 5) {
+ roundBit = 1;
+
+ if(roundDigit == 5) {
+ roundBit = digits[lastDigit] % 2 == 1;
+
+ for(var i = firstNonZero + lastDigit + 2; i < endOfString; i++) {
+ if(parseInt(string[i], 10)) {
+ roundBit = 1;
+ break;
+ }
+ }
+ }
+ }
+
+ if(roundBit) {
+ var dIdx = lastDigit;
+
+ for(; dIdx >= 0; dIdx--) {
+ if(++digits[dIdx] > 9) {
+ digits[dIdx] = 0;
+
+ // overflowed most significant digit
+ if(dIdx == 0) {
+ if(exponent < EXPONENT_MAX) {
+ exponent = exponent + 1;
+ digits[dIdx] = 1;
+ } else {
+ return new Decimal128(new Buffer(isNegative ? INF_NEGATIVE_BUFFER : INF_POSITIVE_BUFFER))
+ }
+ }
+ } else {
+ break;
+ }
+ }
+ }
+ }
+
+ // Encode significand
+ // The high 17 digits of the significand
+ significandHigh = Long.fromNumber(0);
+ // The low 17 digits of the significand
+ significandLow = Long.fromNumber(0);
+
+ // read a zero
+ if(significantDigits == 0) {
+ significandHigh = Long.fromNumber(0);
+ significandLow = Long.fromNumber(0);
+ } else if(lastDigit - firstDigit < 17) {
+ var dIdx = firstDigit;
+ significandLow = Long.fromNumber(digits[dIdx++]);
+ significandHigh = new Long(0, 0);
+
+ for(; dIdx <= lastDigit; dIdx++) {
+ significandLow = significandLow.multiply(Long.fromNumber(10));
+ significandLow = significandLow.add(Long.fromNumber(digits[dIdx]));
+ }
+ } else {
+ var dIdx = firstDigit;
+ significandHigh = Long.fromNumber(digits[dIdx++]);
+
+ for(; dIdx <= lastDigit - 17; dIdx++) {
+ significandHigh = significandHigh.multiply(Long.fromNumber(10));
+ significandHigh = significandHigh.add(Long.fromNumber(digits[dIdx]));
+ }
+
+ significandLow = Long.fromNumber(digits[dIdx++]);
+
+ for(; dIdx <= lastDigit; dIdx++) {
+ significandLow = significandLow.multiply(Long.fromNumber(10));
+ significandLow = significandLow.add(Long.fromNumber(digits[dIdx]));
+ }
+ }
+
+ var significand = multiply64x2(significandHigh, Long.fromString("100000000000000000"));
+
+ significand.low = significand.low.add(significandLow);
+
+ if(lessThan(significand.low, significandLow)) {
+ significand.high = significand.high.add(Long.fromNumber(1));
+ }
+
+ // Biased exponent
+ var biasedExponent = (exponent + EXPONENT_BIAS);
+ var dec = { low: Long.fromNumber(0), high: Long.fromNumber(0) };
+
+ // Encode combination, exponent, and significand.
+ if(significand.high.shiftRightUnsigned(49).and(Long.fromNumber(1)).equals(Long.fromNumber)) {
+ // Encode '11' into bits 1 to 3
+ dec.high = dec.high.or(Long.fromNumber(0x3).shiftLeft(61));
+ dec.high = dec.high.or(Long.fromNumber(biasedExponent).and(Long.fromNumber(0x3fff).shiftLeft(47)));
+ dec.high = dec.high.or(significand.high.and(Long.fromNumber(0x7fffffffffff)));
+ } else {
+ dec.high = dec.high.or(Long.fromNumber(biasedExponent & 0x3fff).shiftLeft(49));
+ dec.high = dec.high.or(significand.high.and(Long.fromNumber(0x1ffffffffffff)));
+ }
+
+ dec.low = significand.low;
+
+ // Encode sign
+ if(isNegative) {
+ dec.high = dec.high.or(Long.fromString('9223372036854775808'));
+ }
+
+ // Encode into a buffer
+ var buffer = new Buffer(16);
+ var index = 0;
+
+ // Encode the low 64 bits of the decimal
+ // Encode low bits
+ buffer[index++] = dec.low.low_ & 0xff;
+ buffer[index++] = (dec.low.low_ >> 8) & 0xff;
+ buffer[index++] = (dec.low.low_ >> 16) & 0xff;
+ buffer[index++] = (dec.low.low_ >> 24) & 0xff;
+ // Encode high bits
+ buffer[index++] = dec.low.high_ & 0xff;
+ buffer[index++] = (dec.low.high_ >> 8) & 0xff;
+ buffer[index++] = (dec.low.high_ >> 16) & 0xff;
+ buffer[index++] = (dec.low.high_ >> 24) & 0xff;
+
+ // Encode the high 64 bits of the decimal
+ // Encode low bits
+ buffer[index++] = dec.high.low_ & 0xff;
+ buffer[index++] = (dec.high.low_ >> 8) & 0xff;
+ buffer[index++] = (dec.high.low_ >> 16) & 0xff;
+ buffer[index++] = (dec.high.low_ >> 24) & 0xff;
+ // Encode high bits
+ buffer[index++] = dec.high.high_ & 0xff;
+ buffer[index++] = (dec.high.high_ >> 8) & 0xff;
+ buffer[index++] = (dec.high.high_ >> 16) & 0xff;
+ buffer[index++] = (dec.high.high_ >> 24) & 0xff;
+
+ // Return the new Decimal128
+ return new Decimal128(buffer);
+}
+
+// Extract least significant 5 bits
+var COMBINATION_MASK = 0x1f;
+// Extract least significant 14 bits
+var EXPONENT_MASK = 0x3fff;
+// Value of combination field for Inf
+var COMBINATION_INFINITY = 30;
+// Value of combination field for NaN
+var COMBINATION_NAN = 31;
+// Value of combination field for NaN
+var COMBINATION_SNAN = 32;
+// decimal128 exponent bias
+var EXPONENT_BIAS = 6176;
+
+Decimal128.prototype.toString = function() {
+ // Note: bits in this routine are referred to starting at 0,
+ // from the sign bit, towards the coefficient.
+
+ // bits 0 - 31
+ var high;
+ // bits 32 - 63
+ var midh;
+ // bits 64 - 95
+ var midl;
+ // bits 96 - 127
+ var low;
+ // bits 1 - 5
+ var combination;
+ // decoded biased exponent (14 bits)
+ var biased_exponent;
+ // the number of significand digits
+ var significand_digits = 0;
+ // the base-10 digits in the significand
+ var significand = new Array(36);
+ for(var i = 0; i < significand.length; i++) significand[i] = 0;
+ // read pointer into significand
+ var index = 0;
+
+ // unbiased exponent
+ var exponent;
+ // the exponent if scientific notation is used
+ var scientific_exponent;
+
+ // true if the number is zero
+ var is_zero = false;
+
+ // the most signifcant significand bits (50-46)
+ var significand_msb;
+ // temporary storage for significand decoding
+ var significand128 = {parts: new Array(4)};
+ // indexing variables
+ var i;
+ var j, k;
+
+ // Output string
+ var string = [];
+
+ // Unpack index
+ var index = 0;
+
+ // Buffer reference
+ var buffer = this.bytes;
+
+ // Unpack the low 64bits into a long
+ low = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ midl = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+
+ // Unpack the high 64bits into a long
+ midh = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ high = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+
+ // Unpack index
+ var index = 0;
+
+ // Create the state of the decimal
+ var dec = {
+ low: new Long(low, midl),
+ high: new Long(midh, high) };
+
+ if(dec.high.lessThan(Long.ZERO)) {
+ string.push('-');
+ }
+
+ // Decode combination field and exponent
+ combination = (high >> 26) & COMBINATION_MASK;
+
+ if((combination >> 3) == 3) {
+ // Check for 'special' values
+ if(combination == COMBINATION_INFINITY) {
+ return string.join('') + "Infinity";
+ } else if(combination == COMBINATION_NAN) {
+ return "NaN";
+ } else {
+ biased_exponent = (high >> 15) & EXPONENT_MASK;
+ significand_msb = 0x08 + ((high >> 14) & 0x01);
+ }
+ } else {
+ significand_msb = (high >> 14) & 0x07;
+ biased_exponent = (high >> 17) & EXPONENT_MASK;
+ }
+
+ exponent = biased_exponent - EXPONENT_BIAS;
+
+ // Create string of significand digits
+
+ // Convert the 114-bit binary number represented by
+ // (significand_high, significand_low) to at most 34 decimal
+ // digits through modulo and division.
+ significand128.parts[0] = (high & 0x3fff) + ((significand_msb & 0xf) << 14);
+ significand128.parts[1] = midh;
+ significand128.parts[2] = midl;
+ significand128.parts[3] = low;
+
+ if(significand128.parts[0] == 0 && significand128.parts[1] == 0
+ && significand128.parts[2] == 0 && significand128.parts[3] == 0) {
+ is_zero = true;
+ } else {
+ for(var k = 3; k >= 0; k--) {
+ var least_digits = 0;
+ // Peform the divide
+ var result = divideu128(significand128);
+ significand128 = result.quotient;
+ least_digits = result.rem.low_;
+
+ // We now have the 9 least significant digits (in base 2).
+ // Convert and output to string.
+ if(!least_digits) continue;
+
+ for(var j = 8; j >= 0; j--) {
+ // significand[k * 9 + j] = Math.round(least_digits % 10);
+ significand[k * 9 + j] = least_digits % 10;
+ // least_digits = Math.round(least_digits / 10);
+ least_digits = Math.floor(least_digits / 10);
+ }
+ }
+ }
+
+ // Output format options:
+ // Scientific - [-]d.dddE(+/-)dd or [-]dE(+/-)dd
+ // Regular - ddd.ddd
+
+ if(is_zero) {
+ significand_digits = 1;
+ significand[index] = 0;
+ } else {
+ significand_digits = 36;
+ var i = 0;
+
+ while(!significand[index]) {
+ i++;
+ significand_digits = significand_digits - 1;
+ index = index + 1;
+ }
+ }
+
+ scientific_exponent = significand_digits - 1 + exponent;
+
+ // The scientific exponent checks are dictated by the string conversion
+ // specification and are somewhat arbitrary cutoffs.
+ //
+ // We must check exponent > 0, because if this is the case, the number
+ // has trailing zeros. However, we *cannot* output these trailing zeros,
+ // because doing so would change the precision of the value, and would
+ // change stored data if the string converted number is round tripped.
+
+ if(scientific_exponent >= 34 || scientific_exponent <= -7 ||
+ exponent > 0) {
+ // Scientific format
+ string.push(significand[index++]);
+ significand_digits = significand_digits - 1;
+
+ if(significand_digits) {
+ string.push('.');
+ }
+
+ for(var i = 0; i < significand_digits; i++) {
+ string.push(significand[index++]);
+ }
+
+ // Exponent
+ string.push('E');
+ if(scientific_exponent > 0) {
+ string.push('+' + scientific_exponent);
+ } else {
+ string.push(scientific_exponent);
+ }
+ } else {
+ // Regular format with no decimal place
+ if(exponent >= 0) {
+ for(var i = 0; i < significand_digits; i++) {
+ string.push(significand[index++]);
+ }
+ } else {
+ var radix_position = significand_digits + exponent;
+
+ // non-zero digits before radix
+ if(radix_position > 0) {
+ for(var i = 0; i < radix_position; i++) {
+ string.push(significand[index++]);
+ }
+ } else {
+ string.push('0');
+ }
+
+ string.push('.');
+ // add leading zeros after radix
+ while(radix_position++ < 0) {
+ string.push('0');
+ }
+
+ for(var i = 0; i < significand_digits - Math.max(radix_position - 1, 0); i++) {
+ string.push(significand[index++]);
+ }
+ }
+ }
+
+ return string.join('');
+}
+
+Decimal128.prototype.toJSON = function() {
+ return { "$numberDecimal": this.toString() };
+}
+
+module.exports = Decimal128;
+module.exports.Decimal128 = Decimal128;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/double.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/double.js
new file mode 100644
index 0000000..82c5bd6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/double.js
@@ -0,0 +1,33 @@
+/**
+ * A class representation of the BSON Double type.
+ *
+ * @class
+ * @param {number} value the number we want to represent as a double.
+ * @return {Double}
+ */
+function Double(value) {
+ if(!(this instanceof Double)) return new Double(value);
+
+ this._bsontype = 'Double';
+ this.value = value;
+}
+
+/**
+ * Access the number value.
+ *
+ * @method
+ * @return {number} returns the wrapped double number.
+ */
+Double.prototype.valueOf = function() {
+ return this.value;
+};
+
+/**
+ * @ignore
+ */
+Double.prototype.toJSON = function() {
+ return this.value;
+}
+
+module.exports = Double;
+module.exports.Double = Double;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/float_parser.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/float_parser.js
new file mode 100644
index 0000000..6fca392
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/float_parser.js
@@ -0,0 +1,121 @@
+// Copyright (c) 2008, Fair Oaks Labs, Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+//
+// * Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// * Neither the name of Fair Oaks Labs, Inc. nor the names of its contributors
+// may be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+//
+// Modifications to writeIEEE754 to support negative zeroes made by Brian White
+
+var readIEEE754 = function(buffer, offset, endian, mLen, nBytes) {
+ var e, m,
+ bBE = (endian === 'big'),
+ eLen = nBytes * 8 - mLen - 1,
+ eMax = (1 << eLen) - 1,
+ eBias = eMax >> 1,
+ nBits = -7,
+ i = bBE ? 0 : (nBytes - 1),
+ d = bBE ? 1 : -1,
+ s = buffer[offset + i];
+
+ i += d;
+
+ e = s & ((1 << (-nBits)) - 1);
+ s >>= (-nBits);
+ nBits += eLen;
+ for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8);
+
+ m = e & ((1 << (-nBits)) - 1);
+ e >>= (-nBits);
+ nBits += mLen;
+ for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8);
+
+ if (e === 0) {
+ e = 1 - eBias;
+ } else if (e === eMax) {
+ return m ? NaN : ((s ? -1 : 1) * Infinity);
+ } else {
+ m = m + Math.pow(2, mLen);
+ e = e - eBias;
+ }
+ return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
+};
+
+var writeIEEE754 = function(buffer, value, offset, endian, mLen, nBytes) {
+ var e, m, c,
+ bBE = (endian === 'big'),
+ eLen = nBytes * 8 - mLen - 1,
+ eMax = (1 << eLen) - 1,
+ eBias = eMax >> 1,
+ rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0),
+ i = bBE ? (nBytes-1) : 0,
+ d = bBE ? -1 : 1,
+ s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;
+
+ value = Math.abs(value);
+
+ if (isNaN(value) || value === Infinity) {
+ m = isNaN(value) ? 1 : 0;
+ e = eMax;
+ } else {
+ e = Math.floor(Math.log(value) / Math.LN2);
+ if (value * (c = Math.pow(2, -e)) < 1) {
+ e--;
+ c *= 2;
+ }
+ if (e+eBias >= 1) {
+ value += rt / c;
+ } else {
+ value += rt * Math.pow(2, 1 - eBias);
+ }
+ if (value * c >= 2) {
+ e++;
+ c /= 2;
+ }
+
+ if (e + eBias >= eMax) {
+ m = 0;
+ e = eMax;
+ } else if (e + eBias >= 1) {
+ m = (value * c - 1) * Math.pow(2, mLen);
+ e = e + eBias;
+ } else {
+ m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
+ e = 0;
+ }
+ }
+
+ for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8);
+
+ e = (e << mLen) | m;
+ eLen += mLen;
+ for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8);
+
+ buffer[offset + i - d] |= s * 128;
+};
+
+exports.readIEEE754 = readIEEE754;
+exports.writeIEEE754 = writeIEEE754; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/int_32.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/int_32.js
new file mode 100644
index 0000000..6c729f6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/int_32.js
@@ -0,0 +1,26 @@
+var Int32 = function(value) {
+ if(!(this instanceof Int32)) return new Int32(value);
+
+ this._bsontype = 'Int32';
+ this.value = value;
+}
+
+/**
+ * Access the number value.
+ *
+ * @method
+ * @return {number} returns the wrapped int32 number.
+ */
+Int32.prototype.valueOf = function() {
+ return this.value;
+};
+
+/**
+ * @ignore
+ */
+Int32.prototype.toJSON = function() {
+ return this.value;
+}
+
+module.exports = Int32;
+module.exports.Int32 = Int32;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/long.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/long.js
new file mode 100644
index 0000000..6f18885
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/long.js
@@ -0,0 +1,856 @@
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Copyright 2009 Google Inc. All Rights Reserved
+
+/**
+ * Defines a Long class for representing a 64-bit two's-complement
+ * integer value, which faithfully simulates the behavior of a Java "Long". This
+ * implementation is derived from LongLib in GWT.
+ *
+ * Constructs a 64-bit two's-complement integer, given its low and high 32-bit
+ * values as *signed* integers. See the from* functions below for more
+ * convenient ways of constructing Longs.
+ *
+ * The internal representation of a Long is the two given signed, 32-bit values.
+ * We use 32-bit pieces because these are the size of integers on which
+ * Javascript performs bit-operations. For operations like addition and
+ * multiplication, we split each number into 16-bit pieces, which can easily be
+ * multiplied within Javascript's floating-point representation without overflow
+ * or change in sign.
+ *
+ * In the algorithms below, we frequently reduce the negative case to the
+ * positive case by negating the input(s) and then post-processing the result.
+ * Note that we must ALWAYS check specially whether those values are MIN_VALUE
+ * (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as
+ * a positive number, it overflows back into a negative). Not handling this
+ * case would often result in infinite recursion.
+ *
+ * @class
+ * @param {number} low the low (signed) 32 bits of the Long.
+ * @param {number} high the high (signed) 32 bits of the Long.
+ * @return {Long}
+ */
+function Long(low, high) {
+ if(!(this instanceof Long)) return new Long(low, high);
+
+ this._bsontype = 'Long';
+ /**
+ * @type {number}
+ * @ignore
+ */
+ this.low_ = low | 0; // force into 32 signed bits.
+
+ /**
+ * @type {number}
+ * @ignore
+ */
+ this.high_ = high | 0; // force into 32 signed bits.
+};
+
+/**
+ * Return the int value.
+ *
+ * @method
+ * @return {number} the value, assuming it is a 32-bit integer.
+ */
+Long.prototype.toInt = function() {
+ return this.low_;
+};
+
+/**
+ * Return the Number value.
+ *
+ * @method
+ * @return {number} the closest floating-point representation to this value.
+ */
+Long.prototype.toNumber = function() {
+ return this.high_ * Long.TWO_PWR_32_DBL_ +
+ this.getLowBitsUnsigned();
+};
+
+/**
+ * Return the JSON value.
+ *
+ * @method
+ * @return {string} the JSON representation.
+ */
+Long.prototype.toJSON = function() {
+ return this.toString();
+}
+
+/**
+ * Return the String value.
+ *
+ * @method
+ * @param {number} [opt_radix] the radix in which the text should be written.
+ * @return {string} the textual representation of this value.
+ */
+Long.prototype.toString = function(opt_radix) {
+ var radix = opt_radix || 10;
+ if (radix < 2 || 36 < radix) {
+ throw Error('radix out of range: ' + radix);
+ }
+
+ if (this.isZero()) {
+ return '0';
+ }
+
+ if (this.isNegative()) {
+ if (this.equals(Long.MIN_VALUE)) {
+ // We need to change the Long value before it can be negated, so we remove
+ // the bottom-most digit in this base and then recurse to do the rest.
+ var radixLong = Long.fromNumber(radix);
+ var div = this.div(radixLong);
+ var rem = div.multiply(radixLong).subtract(this);
+ return div.toString(radix) + rem.toInt().toString(radix);
+ } else {
+ return '-' + this.negate().toString(radix);
+ }
+ }
+
+ // Do several (6) digits each time through the loop, so as to
+ // minimize the calls to the very expensive emulated div.
+ var radixToPower = Long.fromNumber(Math.pow(radix, 6));
+
+ var rem = this;
+ var result = '';
+ while (true) {
+ var remDiv = rem.div(radixToPower);
+ var intval = rem.subtract(remDiv.multiply(radixToPower)).toInt();
+ var digits = intval.toString(radix);
+
+ rem = remDiv;
+ if (rem.isZero()) {
+ return digits + result;
+ } else {
+ while (digits.length < 6) {
+ digits = '0' + digits;
+ }
+ result = '' + digits + result;
+ }
+ }
+};
+
+/**
+ * Return the high 32-bits value.
+ *
+ * @method
+ * @return {number} the high 32-bits as a signed value.
+ */
+Long.prototype.getHighBits = function() {
+ return this.high_;
+};
+
+/**
+ * Return the low 32-bits value.
+ *
+ * @method
+ * @return {number} the low 32-bits as a signed value.
+ */
+Long.prototype.getLowBits = function() {
+ return this.low_;
+};
+
+/**
+ * Return the low unsigned 32-bits value.
+ *
+ * @method
+ * @return {number} the low 32-bits as an unsigned value.
+ */
+Long.prototype.getLowBitsUnsigned = function() {
+ return (this.low_ >= 0) ?
+ this.low_ : Long.TWO_PWR_32_DBL_ + this.low_;
+};
+
+/**
+ * Returns the number of bits needed to represent the absolute value of this Long.
+ *
+ * @method
+ * @return {number} Returns the number of bits needed to represent the absolute value of this Long.
+ */
+Long.prototype.getNumBitsAbs = function() {
+ if (this.isNegative()) {
+ if (this.equals(Long.MIN_VALUE)) {
+ return 64;
+ } else {
+ return this.negate().getNumBitsAbs();
+ }
+ } else {
+ var val = this.high_ != 0 ? this.high_ : this.low_;
+ for (var bit = 31; bit > 0; bit--) {
+ if ((val & (1 << bit)) != 0) {
+ break;
+ }
+ }
+ return this.high_ != 0 ? bit + 33 : bit + 1;
+ }
+};
+
+/**
+ * Return whether this value is zero.
+ *
+ * @method
+ * @return {boolean} whether this value is zero.
+ */
+Long.prototype.isZero = function() {
+ return this.high_ == 0 && this.low_ == 0;
+};
+
+/**
+ * Return whether this value is negative.
+ *
+ * @method
+ * @return {boolean} whether this value is negative.
+ */
+Long.prototype.isNegative = function() {
+ return this.high_ < 0;
+};
+
+/**
+ * Return whether this value is odd.
+ *
+ * @method
+ * @return {boolean} whether this value is odd.
+ */
+Long.prototype.isOdd = function() {
+ return (this.low_ & 1) == 1;
+};
+
+/**
+ * Return whether this Long equals the other
+ *
+ * @method
+ * @param {Long} other Long to compare against.
+ * @return {boolean} whether this Long equals the other
+ */
+Long.prototype.equals = function(other) {
+ return (this.high_ == other.high_) && (this.low_ == other.low_);
+};
+
+/**
+ * Return whether this Long does not equal the other.
+ *
+ * @method
+ * @param {Long} other Long to compare against.
+ * @return {boolean} whether this Long does not equal the other.
+ */
+Long.prototype.notEquals = function(other) {
+ return (this.high_ != other.high_) || (this.low_ != other.low_);
+};
+
+/**
+ * Return whether this Long is less than the other.
+ *
+ * @method
+ * @param {Long} other Long to compare against.
+ * @return {boolean} whether this Long is less than the other.
+ */
+Long.prototype.lessThan = function(other) {
+ return this.compare(other) < 0;
+};
+
+/**
+ * Return whether this Long is less than or equal to the other.
+ *
+ * @method
+ * @param {Long} other Long to compare against.
+ * @return {boolean} whether this Long is less than or equal to the other.
+ */
+Long.prototype.lessThanOrEqual = function(other) {
+ return this.compare(other) <= 0;
+};
+
+/**
+ * Return whether this Long is greater than the other.
+ *
+ * @method
+ * @param {Long} other Long to compare against.
+ * @return {boolean} whether this Long is greater than the other.
+ */
+Long.prototype.greaterThan = function(other) {
+ return this.compare(other) > 0;
+};
+
+/**
+ * Return whether this Long is greater than or equal to the other.
+ *
+ * @method
+ * @param {Long} other Long to compare against.
+ * @return {boolean} whether this Long is greater than or equal to the other.
+ */
+Long.prototype.greaterThanOrEqual = function(other) {
+ return this.compare(other) >= 0;
+};
+
+/**
+ * Compares this Long with the given one.
+ *
+ * @method
+ * @param {Long} other Long to compare against.
+ * @return {boolean} 0 if they are the same, 1 if the this is greater, and -1 if the given one is greater.
+ */
+Long.prototype.compare = function(other) {
+ if (this.equals(other)) {
+ return 0;
+ }
+
+ var thisNeg = this.isNegative();
+ var otherNeg = other.isNegative();
+ if (thisNeg && !otherNeg) {
+ return -1;
+ }
+ if (!thisNeg && otherNeg) {
+ return 1;
+ }
+
+ // at this point, the signs are the same, so subtraction will not overflow
+ if (this.subtract(other).isNegative()) {
+ return -1;
+ } else {
+ return 1;
+ }
+};
+
+/**
+ * The negation of this value.
+ *
+ * @method
+ * @return {Long} the negation of this value.
+ */
+Long.prototype.negate = function() {
+ if (this.equals(Long.MIN_VALUE)) {
+ return Long.MIN_VALUE;
+ } else {
+ return this.not().add(Long.ONE);
+ }
+};
+
+/**
+ * Returns the sum of this and the given Long.
+ *
+ * @method
+ * @param {Long} other Long to add to this one.
+ * @return {Long} the sum of this and the given Long.
+ */
+Long.prototype.add = function(other) {
+ // Divide each number into 4 chunks of 16 bits, and then sum the chunks.
+
+ var a48 = this.high_ >>> 16;
+ var a32 = this.high_ & 0xFFFF;
+ var a16 = this.low_ >>> 16;
+ var a00 = this.low_ & 0xFFFF;
+
+ var b48 = other.high_ >>> 16;
+ var b32 = other.high_ & 0xFFFF;
+ var b16 = other.low_ >>> 16;
+ var b00 = other.low_ & 0xFFFF;
+
+ var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
+ c00 += a00 + b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xFFFF;
+ c16 += a16 + b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c32 += a32 + b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c48 += a48 + b48;
+ c48 &= 0xFFFF;
+ return Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32);
+};
+
+/**
+ * Returns the difference of this and the given Long.
+ *
+ * @method
+ * @param {Long} other Long to subtract from this.
+ * @return {Long} the difference of this and the given Long.
+ */
+Long.prototype.subtract = function(other) {
+ return this.add(other.negate());
+};
+
+/**
+ * Returns the product of this and the given Long.
+ *
+ * @method
+ * @param {Long} other Long to multiply with this.
+ * @return {Long} the product of this and the other.
+ */
+Long.prototype.multiply = function(other) {
+ if (this.isZero()) {
+ return Long.ZERO;
+ } else if (other.isZero()) {
+ return Long.ZERO;
+ }
+
+ if (this.equals(Long.MIN_VALUE)) {
+ return other.isOdd() ? Long.MIN_VALUE : Long.ZERO;
+ } else if (other.equals(Long.MIN_VALUE)) {
+ return this.isOdd() ? Long.MIN_VALUE : Long.ZERO;
+ }
+
+ if (this.isNegative()) {
+ if (other.isNegative()) {
+ return this.negate().multiply(other.negate());
+ } else {
+ return this.negate().multiply(other).negate();
+ }
+ } else if (other.isNegative()) {
+ return this.multiply(other.negate()).negate();
+ }
+
+ // If both Longs are small, use float multiplication
+ if (this.lessThan(Long.TWO_PWR_24_) &&
+ other.lessThan(Long.TWO_PWR_24_)) {
+ return Long.fromNumber(this.toNumber() * other.toNumber());
+ }
+
+ // Divide each Long into 4 chunks of 16 bits, and then add up 4x4 products.
+ // We can skip products that would overflow.
+
+ var a48 = this.high_ >>> 16;
+ var a32 = this.high_ & 0xFFFF;
+ var a16 = this.low_ >>> 16;
+ var a00 = this.low_ & 0xFFFF;
+
+ var b48 = other.high_ >>> 16;
+ var b32 = other.high_ & 0xFFFF;
+ var b16 = other.low_ >>> 16;
+ var b00 = other.low_ & 0xFFFF;
+
+ var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
+ c00 += a00 * b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xFFFF;
+ c16 += a16 * b00;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c16 += a00 * b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c32 += a32 * b00;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c32 += a16 * b16;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c32 += a00 * b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
+ c48 &= 0xFFFF;
+ return Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32);
+};
+
+/**
+ * Returns this Long divided by the given one.
+ *
+ * @method
+ * @param {Long} other Long by which to divide.
+ * @return {Long} this Long divided by the given one.
+ */
+Long.prototype.div = function(other) {
+ if (other.isZero()) {
+ throw Error('division by zero');
+ } else if (this.isZero()) {
+ return Long.ZERO;
+ }
+
+ if (this.equals(Long.MIN_VALUE)) {
+ if (other.equals(Long.ONE) ||
+ other.equals(Long.NEG_ONE)) {
+ return Long.MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE
+ } else if (other.equals(Long.MIN_VALUE)) {
+ return Long.ONE;
+ } else {
+ // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.
+ var halfThis = this.shiftRight(1);
+ var approx = halfThis.div(other).shiftLeft(1);
+ if (approx.equals(Long.ZERO)) {
+ return other.isNegative() ? Long.ONE : Long.NEG_ONE;
+ } else {
+ var rem = this.subtract(other.multiply(approx));
+ var result = approx.add(rem.div(other));
+ return result;
+ }
+ }
+ } else if (other.equals(Long.MIN_VALUE)) {
+ return Long.ZERO;
+ }
+
+ if (this.isNegative()) {
+ if (other.isNegative()) {
+ return this.negate().div(other.negate());
+ } else {
+ return this.negate().div(other).negate();
+ }
+ } else if (other.isNegative()) {
+ return this.div(other.negate()).negate();
+ }
+
+ // Repeat the following until the remainder is less than other: find a
+ // floating-point that approximates remainder / other *from below*, add this
+ // into the result, and subtract it from the remainder. It is critical that
+ // the approximate value is less than or equal to the real value so that the
+ // remainder never becomes negative.
+ var res = Long.ZERO;
+ var rem = this;
+ while (rem.greaterThanOrEqual(other)) {
+ // Approximate the result of division. This may be a little greater or
+ // smaller than the actual value.
+ var approx = Math.max(1, Math.floor(rem.toNumber() / other.toNumber()));
+
+ // We will tweak the approximate result by changing it in the 48-th digit or
+ // the smallest non-fractional digit, whichever is larger.
+ var log2 = Math.ceil(Math.log(approx) / Math.LN2);
+ var delta = (log2 <= 48) ? 1 : Math.pow(2, log2 - 48);
+
+ // Decrease the approximation until it is smaller than the remainder. Note
+ // that if it is too large, the product overflows and is negative.
+ var approxRes = Long.fromNumber(approx);
+ var approxRem = approxRes.multiply(other);
+ while (approxRem.isNegative() || approxRem.greaterThan(rem)) {
+ approx -= delta;
+ approxRes = Long.fromNumber(approx);
+ approxRem = approxRes.multiply(other);
+ }
+
+ // We know the answer can't be zero... and actually, zero would cause
+ // infinite recursion since we would make no progress.
+ if (approxRes.isZero()) {
+ approxRes = Long.ONE;
+ }
+
+ res = res.add(approxRes);
+ rem = rem.subtract(approxRem);
+ }
+ return res;
+};
+
+/**
+ * Returns this Long modulo the given one.
+ *
+ * @method
+ * @param {Long} other Long by which to mod.
+ * @return {Long} this Long modulo the given one.
+ */
+Long.prototype.modulo = function(other) {
+ return this.subtract(this.div(other).multiply(other));
+};
+
+/**
+ * The bitwise-NOT of this value.
+ *
+ * @method
+ * @return {Long} the bitwise-NOT of this value.
+ */
+Long.prototype.not = function() {
+ return Long.fromBits(~this.low_, ~this.high_);
+};
+
+/**
+ * Returns the bitwise-AND of this Long and the given one.
+ *
+ * @method
+ * @param {Long} other the Long with which to AND.
+ * @return {Long} the bitwise-AND of this and the other.
+ */
+Long.prototype.and = function(other) {
+ return Long.fromBits(this.low_ & other.low_, this.high_ & other.high_);
+};
+
+/**
+ * Returns the bitwise-OR of this Long and the given one.
+ *
+ * @method
+ * @param {Long} other the Long with which to OR.
+ * @return {Long} the bitwise-OR of this and the other.
+ */
+Long.prototype.or = function(other) {
+ return Long.fromBits(this.low_ | other.low_, this.high_ | other.high_);
+};
+
+/**
+ * Returns the bitwise-XOR of this Long and the given one.
+ *
+ * @method
+ * @param {Long} other the Long with which to XOR.
+ * @return {Long} the bitwise-XOR of this and the other.
+ */
+Long.prototype.xor = function(other) {
+ return Long.fromBits(this.low_ ^ other.low_, this.high_ ^ other.high_);
+};
+
+/**
+ * Returns this Long with bits shifted to the left by the given amount.
+ *
+ * @method
+ * @param {number} numBits the number of bits by which to shift.
+ * @return {Long} this shifted to the left by the given amount.
+ */
+Long.prototype.shiftLeft = function(numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var low = this.low_;
+ if (numBits < 32) {
+ var high = this.high_;
+ return Long.fromBits(
+ low << numBits,
+ (high << numBits) | (low >>> (32 - numBits)));
+ } else {
+ return Long.fromBits(0, low << (numBits - 32));
+ }
+ }
+};
+
+/**
+ * Returns this Long with bits shifted to the right by the given amount.
+ *
+ * @method
+ * @param {number} numBits the number of bits by which to shift.
+ * @return {Long} this shifted to the right by the given amount.
+ */
+Long.prototype.shiftRight = function(numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var high = this.high_;
+ if (numBits < 32) {
+ var low = this.low_;
+ return Long.fromBits(
+ (low >>> numBits) | (high << (32 - numBits)),
+ high >> numBits);
+ } else {
+ return Long.fromBits(
+ high >> (numBits - 32),
+ high >= 0 ? 0 : -1);
+ }
+ }
+};
+
+/**
+ * Returns this Long with bits shifted to the right by the given amount, with the new top bits matching the current sign bit.
+ *
+ * @method
+ * @param {number} numBits the number of bits by which to shift.
+ * @return {Long} this shifted to the right by the given amount, with zeros placed into the new leading bits.
+ */
+Long.prototype.shiftRightUnsigned = function(numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var high = this.high_;
+ if (numBits < 32) {
+ var low = this.low_;
+ return Long.fromBits(
+ (low >>> numBits) | (high << (32 - numBits)),
+ high >>> numBits);
+ } else if (numBits == 32) {
+ return Long.fromBits(high, 0);
+ } else {
+ return Long.fromBits(high >>> (numBits - 32), 0);
+ }
+ }
+};
+
+/**
+ * Returns a Long representing the given (32-bit) integer value.
+ *
+ * @method
+ * @param {number} value the 32-bit integer in question.
+ * @return {Long} the corresponding Long value.
+ */
+Long.fromInt = function(value) {
+ if (-128 <= value && value < 128) {
+ var cachedObj = Long.INT_CACHE_[value];
+ if (cachedObj) {
+ return cachedObj;
+ }
+ }
+
+ var obj = new Long(value | 0, value < 0 ? -1 : 0);
+ if (-128 <= value && value < 128) {
+ Long.INT_CACHE_[value] = obj;
+ }
+ return obj;
+};
+
+/**
+ * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.
+ *
+ * @method
+ * @param {number} value the number in question.
+ * @return {Long} the corresponding Long value.
+ */
+Long.fromNumber = function(value) {
+ if (isNaN(value) || !isFinite(value)) {
+ return Long.ZERO;
+ } else if (value <= -Long.TWO_PWR_63_DBL_) {
+ return Long.MIN_VALUE;
+ } else if (value + 1 >= Long.TWO_PWR_63_DBL_) {
+ return Long.MAX_VALUE;
+ } else if (value < 0) {
+ return Long.fromNumber(-value).negate();
+ } else {
+ return new Long(
+ (value % Long.TWO_PWR_32_DBL_) | 0,
+ (value / Long.TWO_PWR_32_DBL_) | 0);
+ }
+};
+
+/**
+ * Returns a Long representing the 64-bit integer that comes by concatenating the given high and low bits. Each is assumed to use 32 bits.
+ *
+ * @method
+ * @param {number} lowBits the low 32-bits.
+ * @param {number} highBits the high 32-bits.
+ * @return {Long} the corresponding Long value.
+ */
+Long.fromBits = function(lowBits, highBits) {
+ return new Long(lowBits, highBits);
+};
+
+/**
+ * Returns a Long representation of the given string, written using the given radix.
+ *
+ * @method
+ * @param {string} str the textual representation of the Long.
+ * @param {number} opt_radix the radix in which the text is written.
+ * @return {Long} the corresponding Long value.
+ */
+Long.fromString = function(str, opt_radix) {
+ if (str.length == 0) {
+ throw Error('number format error: empty string');
+ }
+
+ var radix = opt_radix || 10;
+ if (radix < 2 || 36 < radix) {
+ throw Error('radix out of range: ' + radix);
+ }
+
+ if (str.charAt(0) == '-') {
+ return Long.fromString(str.substring(1), radix).negate();
+ } else if (str.indexOf('-') >= 0) {
+ throw Error('number format error: interior "-" character: ' + str);
+ }
+
+ // Do several (8) digits each time through the loop, so as to
+ // minimize the calls to the very expensive emulated div.
+ var radixToPower = Long.fromNumber(Math.pow(radix, 8));
+
+ var result = Long.ZERO;
+ for (var i = 0; i < str.length; i += 8) {
+ var size = Math.min(8, str.length - i);
+ var value = parseInt(str.substring(i, i + size), radix);
+ if (size < 8) {
+ var power = Long.fromNumber(Math.pow(radix, size));
+ result = result.multiply(power).add(Long.fromNumber(value));
+ } else {
+ result = result.multiply(radixToPower);
+ result = result.add(Long.fromNumber(value));
+ }
+ }
+ return result;
+};
+
+// NOTE: Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the
+// from* methods on which they depend.
+
+
+/**
+ * A cache of the Long representations of small integer values.
+ * @type {Object}
+ * @ignore
+ */
+Long.INT_CACHE_ = {};
+
+// NOTE: the compiler should inline these constant values below and then remove
+// these variables, so there should be no runtime penalty for these.
+
+/**
+ * Number used repeated below in calculations. This must appear before the
+ * first call to any from* function below.
+ * @type {number}
+ * @ignore
+ */
+Long.TWO_PWR_16_DBL_ = 1 << 16;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Long.TWO_PWR_24_DBL_ = 1 << 24;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Long.TWO_PWR_32_DBL_ = Long.TWO_PWR_16_DBL_ * Long.TWO_PWR_16_DBL_;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Long.TWO_PWR_31_DBL_ = Long.TWO_PWR_32_DBL_ / 2;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Long.TWO_PWR_48_DBL_ = Long.TWO_PWR_32_DBL_ * Long.TWO_PWR_16_DBL_;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Long.TWO_PWR_64_DBL_ = Long.TWO_PWR_32_DBL_ * Long.TWO_PWR_32_DBL_;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Long.TWO_PWR_63_DBL_ = Long.TWO_PWR_64_DBL_ / 2;
+
+/** @type {Long} */
+Long.ZERO = Long.fromInt(0);
+
+/** @type {Long} */
+Long.ONE = Long.fromInt(1);
+
+/** @type {Long} */
+Long.NEG_ONE = Long.fromInt(-1);
+
+/** @type {Long} */
+Long.MAX_VALUE =
+ Long.fromBits(0xFFFFFFFF | 0, 0x7FFFFFFF | 0);
+
+/** @type {Long} */
+Long.MIN_VALUE = Long.fromBits(0, 0x80000000 | 0);
+
+/**
+ * @type {Long}
+ * @ignore
+ */
+Long.TWO_PWR_24_ = Long.fromInt(1 << 24);
+
+/**
+ * Expose.
+ */
+module.exports = Long;
+module.exports.Long = Long; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/map.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/map.js
new file mode 100644
index 0000000..f53c8c1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/map.js
@@ -0,0 +1,126 @@
+"use strict"
+
+// We have an ES6 Map available, return the native instance
+if(typeof global.Map !== 'undefined') {
+ module.exports = global.Map;
+ module.exports.Map = global.Map;
+} else {
+ // We will return a polyfill
+ var Map = function(array) {
+ this._keys = [];
+ this._values = {};
+
+ for(var i = 0; i < array.length; i++) {
+ if(array[i] == null) continue; // skip null and undefined
+ var entry = array[i];
+ var key = entry[0];
+ var value = entry[1];
+ // Add the key to the list of keys in order
+ this._keys.push(key);
+ // Add the key and value to the values dictionary with a point
+ // to the location in the ordered keys list
+ this._values[key] = {v: value, i: this._keys.length - 1};
+ }
+ }
+
+ Map.prototype.clear = function() {
+ this._keys = [];
+ this._values = {};
+ }
+
+ Map.prototype.delete = function(key) {
+ var value = this._values[key];
+ if(value == null) return false;
+ // Delete entry
+ delete this._values[key];
+ // Remove the key from the ordered keys list
+ this._keys.splice(value.i, 1);
+ return true;
+ }
+
+ Map.prototype.entries = function() {
+ var self = this;
+ var index = 0;
+
+ return {
+ next: function() {
+ var key = self._keys[index++];
+ return {
+ value: key !== undefined ? [key, self._values[key].v] : undefined,
+ done: key !== undefined ? false : true
+ }
+ }
+ };
+ }
+
+ Map.prototype.forEach = function(callback, self) {
+ self = self || this;
+
+ for(var i = 0; i < this._keys.length; i++) {
+ var key = this._keys[i];
+ // Call the forEach callback
+ callback.call(self, this._values[key].v, key, self);
+ }
+ }
+
+ Map.prototype.get = function(key) {
+ return this._values[key] ? this._values[key].v : undefined;
+ }
+
+ Map.prototype.has = function(key) {
+ return this._values[key] != null;
+ }
+
+ Map.prototype.keys = function(key) {
+ var self = this;
+ var index = 0;
+
+ return {
+ next: function() {
+ var key = self._keys[index++];
+ return {
+ value: key !== undefined ? key : undefined,
+ done: key !== undefined ? false : true
+ }
+ }
+ };
+ }
+
+ Map.prototype.set = function(key, value) {
+ if(this._values[key]) {
+ this._values[key].v = value;
+ return this;
+ }
+
+ // Add the key to the list of keys in order
+ this._keys.push(key);
+ // Add the key and value to the values dictionary with a point
+ // to the location in the ordered keys list
+ this._values[key] = {v: value, i: this._keys.length - 1};
+ return this;
+ }
+
+ Map.prototype.values = function(key, value) {
+ var self = this;
+ var index = 0;
+
+ return {
+ next: function() {
+ var key = self._keys[index++];
+ return {
+ value: key !== undefined ? self._values[key].v : undefined,
+ done: key !== undefined ? false : true
+ }
+ }
+ };
+ }
+
+ // Last ismaster
+ Object.defineProperty(Map.prototype, 'size', {
+ enumerable:true,
+ get: function() { return this._keys.length; }
+ });
+
+ module.exports = Map;
+ module.exports.Map = Map;
+} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/max_key.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/max_key.js
new file mode 100644
index 0000000..03ee9cd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/max_key.js
@@ -0,0 +1,14 @@
+/**
+ * A class representation of the BSON MaxKey type.
+ *
+ * @class
+ * @return {MaxKey} A MaxKey instance
+ */
+function MaxKey() {
+ if(!(this instanceof MaxKey)) return new MaxKey();
+
+ this._bsontype = 'MaxKey';
+}
+
+module.exports = MaxKey;
+module.exports.MaxKey = MaxKey; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/min_key.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/min_key.js
new file mode 100644
index 0000000..5e120fb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/min_key.js
@@ -0,0 +1,14 @@
+/**
+ * A class representation of the BSON MinKey type.
+ *
+ * @class
+ * @return {MinKey} A MinKey instance
+ */
+function MinKey() {
+ if(!(this instanceof MinKey)) return new MinKey();
+
+ this._bsontype = 'MinKey';
+}
+
+module.exports = MinKey;
+module.exports.MinKey = MinKey; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/objectid.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/objectid.js
new file mode 100644
index 0000000..71bb1c9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/objectid.js
@@ -0,0 +1,362 @@
+/**
+ * Machine id.
+ *
+ * Create a random 3-byte value (i.e. unique for this
+ * process). Other drivers use a md5 of the machine id here, but
+ * that would mean an asyc call to gethostname, so we don't bother.
+ * @ignore
+ */
+var MACHINE_ID = parseInt(Math.random() * 0xFFFFFF, 10);
+
+// Regular expression that checks for hex value
+var checkForHexRegExp = new RegExp("^[0-9a-fA-F]{24}$");
+var hasBufferType = false;
+
+// Check if buffer exists
+try {
+ if(Buffer && Buffer.from) hasBufferType = true;
+} catch(err) {};
+
+/**
+* Create a new ObjectID instance
+*
+* @class
+* @param {(string|number)} id Can be a 24 byte hex string, 12 byte binary string or a Number.
+* @property {number} generationTime The generation time of this ObjectId instance
+* @return {ObjectID} instance of ObjectID.
+*/
+var ObjectID = function ObjectID(id) {
+ // Duck-typing to support ObjectId from different npm packages
+ if(id instanceof ObjectID) return id;
+ if(!(this instanceof ObjectID)) return new ObjectID(id);
+
+ this._bsontype = 'ObjectID';
+
+ // The most common usecase (blank id, new objectId instance)
+ if(id == null || typeof id == 'number') {
+ // Generate a new id
+ this.id = this.generate(id);
+ // If we are caching the hex string
+ if(ObjectID.cacheHexString) this.__id = this.toString('hex');
+ // Return the object
+ return;
+ }
+
+ // Check if the passed in id is valid
+ var valid = ObjectID.isValid(id);
+
+ // Throw an error if it's not a valid setup
+ if(!valid && id != null){
+ throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");
+ } else if(valid && typeof id == 'string' && id.length == 24 && hasBufferType) {
+ return new ObjectID(Buffer.from(id, 'hex'));
+ } else if(valid && typeof id == 'string' && id.length == 24) {
+ return ObjectID.createFromHexString(id);
+ } else if(id != null && id.length === 12) {
+ // assume 12 byte string
+ this.id = id;
+ } else if(id != null && id.toHexString) {
+ // Duck-typing to support ObjectId from different npm packages
+ return id;
+ } else {
+ throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");
+ }
+
+ if(ObjectID.cacheHexString) this.__id = this.toString('hex');
+};
+
+// Allow usage of ObjectId as well as ObjectID
+var ObjectId = ObjectID;
+
+// Precomputed hex table enables speedy hex string conversion
+var hexTable = [];
+for (var i = 0; i < 256; i++) {
+ hexTable[i] = (i <= 15 ? '0' : '') + i.toString(16);
+}
+
+/**
+* Return the ObjectID id as a 24 byte hex string representation
+*
+* @method
+* @return {string} return the 24 byte hex string representation.
+*/
+ObjectID.prototype.toHexString = function() {
+ if(ObjectID.cacheHexString && this.__id) return this.__id;
+
+ var hexString = '';
+ if(!this.id || !this.id.length) {
+ throw new Error('invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is [' + JSON.stringify(this.id) + ']');
+ }
+
+ if(this.id instanceof _Buffer) {
+ hexString = convertToHex(this.id);
+ if(ObjectID.cacheHexString) this.__id = hexString;
+ return hexString;
+ }
+
+ for (var i = 0; i < this.id.length; i++) {
+ hexString += hexTable[this.id.charCodeAt(i)];
+ }
+
+ if(ObjectID.cacheHexString) this.__id = hexString;
+ return hexString;
+};
+
+/**
+* Update the ObjectID index used in generating new ObjectID's on the driver
+*
+* @method
+* @return {number} returns next index value.
+* @ignore
+*/
+ObjectID.prototype.get_inc = function() {
+ return ObjectID.index = (ObjectID.index + 1) % 0xFFFFFF;
+};
+
+/**
+* Update the ObjectID index used in generating new ObjectID's on the driver
+*
+* @method
+* @return {number} returns next index value.
+* @ignore
+*/
+ObjectID.prototype.getInc = function() {
+ return this.get_inc();
+};
+
+/**
+* Generate a 12 byte id buffer used in ObjectID's
+*
+* @method
+* @param {number} [time] optional parameter allowing to pass in a second based timestamp.
+* @return {Buffer} return the 12 byte id buffer string.
+*/
+ObjectID.prototype.generate = function(time) {
+ if ('number' != typeof time) {
+ time = ~~(Date.now()/1000);
+ }
+
+ // Use pid
+ var pid = (typeof process === 'undefined' ? Math.floor(Math.random() * 100000) : process.pid) % 0xFFFF;
+ var inc = this.get_inc();
+ // Buffer used
+ var buffer = new Buffer(12);
+ // Encode time
+ buffer[3] = time & 0xff;
+ buffer[2] = (time >> 8) & 0xff;
+ buffer[1] = (time >> 16) & 0xff;
+ buffer[0] = (time >> 24) & 0xff;
+ // Encode machine
+ buffer[6] = MACHINE_ID & 0xff;
+ buffer[5] = (MACHINE_ID >> 8) & 0xff;
+ buffer[4] = (MACHINE_ID >> 16) & 0xff;
+ // Encode pid
+ buffer[8] = pid & 0xff;
+ buffer[7] = (pid >> 8) & 0xff;
+ // Encode index
+ buffer[11] = inc & 0xff;
+ buffer[10] = (inc >> 8) & 0xff;
+ buffer[9] = (inc >> 16) & 0xff;
+ // Return the buffer
+ return buffer;
+};
+
+/**
+* Converts the id into a 24 byte hex string for printing
+*
+* @param {String} format The Buffer toString format parameter.
+* @return {String} return the 24 byte hex string representation.
+* @ignore
+*/
+ObjectID.prototype.toString = function(format) {
+ // Is the id a buffer then use the buffer toString method to return the format
+ if(this.id && this.id.copy) {
+ return this.id.toString(format || 'hex');
+ }
+
+ // if(this.buffer )
+ return this.toHexString();
+};
+
+/**
+* Converts to a string representation of this Id.
+*
+* @return {String} return the 24 byte hex string representation.
+* @ignore
+*/
+ObjectID.prototype.inspect = ObjectID.prototype.toString;
+
+/**
+* Converts to its JSON representation.
+*
+* @return {String} return the 24 byte hex string representation.
+* @ignore
+*/
+ObjectID.prototype.toJSON = function() {
+ return this.toHexString();
+};
+
+/**
+* Compares the equality of this ObjectID with `otherID`.
+*
+* @method
+* @param {object} otherID ObjectID instance to compare against.
+* @return {boolean} the result of comparing two ObjectID's
+*/
+ObjectID.prototype.equals = function equals (otherId) {
+ var id;
+
+ if(otherId instanceof ObjectID) {
+ return this.toString() == otherId.toString();
+ } else if(typeof otherId == 'string' && ObjectID.isValid(otherId) && otherId.length == 12 && this.id instanceof _Buffer) {
+ return otherId === this.id.toString('binary');
+ } else if(typeof otherId == 'string' && ObjectID.isValid(otherId) && otherId.length == 24) {
+ return otherId.toLowerCase() === this.toHexString();
+ } else if(typeof otherId == 'string' && ObjectID.isValid(otherId) && otherId.length == 12) {
+ return otherId === this.id;
+ } else if(otherId != null && (otherId instanceof ObjectID || otherId.toHexString)) {
+ return otherId.toHexString() === this.toHexString();
+ } else {
+ return false;
+ }
+}
+
+/**
+* Returns the generation date (accurate up to the second) that this ID was generated.
+*
+* @method
+* @return {date} the generation date
+*/
+ObjectID.prototype.getTimestamp = function() {
+ var timestamp = new Date();
+ var time = this.id[3] | this.id[2] << 8 | this.id[1] << 16 | this.id[0] << 24;
+ timestamp.setTime(Math.floor(time) * 1000);
+ return timestamp;
+}
+
+/**
+* @ignore
+*/
+ObjectID.index = ~~(Math.random() * 0xFFFFFF);
+
+/**
+* @ignore
+*/
+ObjectID.createPk = function createPk () {
+ return new ObjectID();
+};
+
+/**
+* Creates an ObjectID from a second based number, with the rest of the ObjectID zeroed out. Used for comparisons or sorting the ObjectID.
+*
+* @method
+* @param {number} time an integer number representing a number of seconds.
+* @return {ObjectID} return the created ObjectID
+*/
+ObjectID.createFromTime = function createFromTime (time) {
+ var buffer = new Buffer([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
+ // Encode time into first 4 bytes
+ buffer[3] = time & 0xff;
+ buffer[2] = (time >> 8) & 0xff;
+ buffer[1] = (time >> 16) & 0xff;
+ buffer[0] = (time >> 24) & 0xff;
+ // Return the new objectId
+ return new ObjectID(buffer);
+};
+
+// Lookup tables
+var encodeLookup = '0123456789abcdef'.split('')
+var decodeLookup = []
+var i = 0
+while (i < 10) decodeLookup[0x30 + i] = i++
+while (i < 16) decodeLookup[0x41 - 10 + i] = decodeLookup[0x61 - 10 + i] = i++
+
+var _Buffer = Buffer;
+var convertToHex = function(bytes) {
+ return bytes.toString('hex');
+}
+
+/**
+* Creates an ObjectID from a hex string representation of an ObjectID.
+*
+* @method
+* @param {string} hexString create a ObjectID from a passed in 24 byte hexstring.
+* @return {ObjectID} return the created ObjectID
+*/
+ObjectID.createFromHexString = function createFromHexString (string) {
+ // Throw an error if it's not a valid setup
+ if(typeof string === 'undefined' || string != null && string.length != 24) {
+ throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");
+ }
+
+ // Use Buffer.from method if available
+ if(hasBufferType) return new ObjectID(Buffer.from(string, 'hex'));
+
+ // Calculate lengths
+ var array = new _Buffer(12);
+ var n = 0;
+ var i = 0;
+
+ while (i < 24) {
+ array[n++] = decodeLookup[string.charCodeAt(i++)] << 4 | decodeLookup[string.charCodeAt(i++)]
+ }
+
+ return new ObjectID(array);
+};
+
+/**
+* Checks if a value is a valid bson ObjectId
+*
+* @method
+* @return {boolean} return true if the value is a valid bson ObjectId, return false otherwise.
+*/
+ObjectID.isValid = function isValid(id) {
+ if(id == null) return false;
+
+ if(typeof id == 'number') {
+ return true;
+ }
+
+ if(typeof id == 'string') {
+ return id.length == 12 || (id.length == 24 && checkForHexRegExp.test(id));
+ }
+
+ if(id instanceof ObjectID) {
+ return true;
+ }
+
+ if(id instanceof _Buffer) {
+ return true;
+ }
+
+ // Duck-Typing detection of ObjectId like objects
+ if(id.toHexString) {
+ return id.id.length == 12 || (id.id.length == 24 && checkForHexRegExp.test(id.id));
+ }
+
+ return false;
+};
+
+/**
+* @ignore
+*/
+Object.defineProperty(ObjectID.prototype, "generationTime", {
+ enumerable: true
+ , get: function () {
+ return this.id[3] | this.id[2] << 8 | this.id[1] << 16 | this.id[0] << 24;
+ }
+ , set: function (value) {
+ // Encode time into first 4 bytes
+ this.id[3] = value & 0xff;
+ this.id[2] = (value >> 8) & 0xff;
+ this.id[1] = (value >> 16) & 0xff;
+ this.id[0] = (value >> 24) & 0xff;
+ }
+});
+
+/**
+ * Expose.
+ */
+module.exports = ObjectID;
+module.exports.ObjectID = ObjectID;
+module.exports.ObjectId = ObjectID;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/parser/calculate_size.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/parser/calculate_size.js
new file mode 100644
index 0000000..53d338f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/parser/calculate_size.js
@@ -0,0 +1,152 @@
+"use strict"
+
+var writeIEEE754 = require('../float_parser').writeIEEE754
+ , readIEEE754 = require('../float_parser').readIEEE754
+ , Long = require('../long').Long
+ , Double = require('../double').Double
+ , Timestamp = require('../timestamp').Timestamp
+ , ObjectID = require('../objectid').ObjectID
+ , Symbol = require('../symbol').Symbol
+ , BSONRegExp = require('../regexp').BSONRegExp
+ , Code = require('../code').Code
+ , Decimal128 = require('../decimal128')
+ , MinKey = require('../min_key').MinKey
+ , MaxKey = require('../max_key').MaxKey
+ , DBRef = require('../db_ref').DBRef
+ , Binary = require('../binary').Binary;
+
+// To ensure that 0.4 of node works correctly
+var isDate = function isDate(d) {
+ return typeof d === 'object' && Object.prototype.toString.call(d) === '[object Date]';
+}
+
+var calculateObjectSize = function calculateObjectSize(object, serializeFunctions, ignoreUndefined) {
+ var totalLength = (4 + 1);
+
+ if(Array.isArray(object)) {
+ for(var i = 0; i < object.length; i++) {
+ totalLength += calculateElement(i.toString(), object[i], serializeFunctions, true, ignoreUndefined)
+ }
+ } else {
+ // If we have toBSON defined, override the current object
+ if(object.toBSON) {
+ object = object.toBSON();
+ }
+
+ // Calculate size
+ for(var key in object) {
+ totalLength += calculateElement(key, object[key], serializeFunctions, false, ignoreUndefined)
+ }
+ }
+
+ return totalLength;
+}
+
+/**
+ * @ignore
+ * @api private
+ */
+function calculateElement(name, value, serializeFunctions, isArray, ignoreUndefined) {
+ // If we have toBSON defined, override the current object
+ if(value && value.toBSON){
+ value = value.toBSON();
+ }
+
+ switch(typeof value) {
+ case 'string':
+ return 1 + Buffer.byteLength(name, 'utf8') + 1 + 4 + Buffer.byteLength(value, 'utf8') + 1;
+ case 'number':
+ if(Math.floor(value) === value && value >= BSON.JS_INT_MIN && value <= BSON.JS_INT_MAX) {
+ if(value >= BSON.BSON_INT32_MIN && value <= BSON.BSON_INT32_MAX) { // 32 bit
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (4 + 1);
+ } else {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (8 + 1);
+ }
+ } else { // 64 bit
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (8 + 1);
+ }
+ case 'undefined':
+ if(isArray || !ignoreUndefined) return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (1);
+ return 0;
+ case 'boolean':
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (1 + 1);
+ case 'object':
+ if(value == null || value instanceof MinKey || value instanceof MaxKey || value['_bsontype'] == 'MinKey' || value['_bsontype'] == 'MaxKey') {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (1);
+ } else if(value instanceof ObjectID || value['_bsontype'] == 'ObjectID') {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (12 + 1);
+ } else if(value instanceof Date || isDate(value)) {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (8 + 1);
+ } else if(typeof Buffer !== 'undefined' && Buffer.isBuffer(value)) {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (1 + 4 + 1) + value.length;
+ } else if(value instanceof Long || value instanceof Double || value instanceof Timestamp
+ || value['_bsontype'] == 'Long' || value['_bsontype'] == 'Double' || value['_bsontype'] == 'Timestamp') {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (8 + 1);
+ } else if(value instanceof Decimal128 || value['_bsontype'] == 'Decimal128') {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (16 + 1);
+ } else if(value instanceof Code || value['_bsontype'] == 'Code') {
+ // Calculate size depending on the availability of a scope
+ if(value.scope != null && Object.keys(value.scope).length > 0) {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + 1 + 4 + 4 + Buffer.byteLength(value.code.toString(), 'utf8') + 1 + calculateObjectSize(value.scope, serializeFunctions, ignoreUndefined);
+ } else {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + 1 + 4 + Buffer.byteLength(value.code.toString(), 'utf8') + 1;
+ }
+ } else if(value instanceof Binary || value['_bsontype'] == 'Binary') {
+ // Check what kind of subtype we have
+ if(value.sub_type == Binary.SUBTYPE_BYTE_ARRAY) {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (value.position + 1 + 4 + 1 + 4);
+ } else {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (value.position + 1 + 4 + 1);
+ }
+ } else if(value instanceof Symbol || value['_bsontype'] == 'Symbol') {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + Buffer.byteLength(value.value, 'utf8') + 4 + 1 + 1;
+ } else if(value instanceof DBRef || value['_bsontype'] == 'DBRef') {
+ // Set up correct object for serialization
+ var ordered_values = {
+ '$ref': value.namespace
+ , '$id' : value.oid
+ };
+
+ // Add db reference if it exists
+ if(null != value.db) {
+ ordered_values['$db'] = value.db;
+ }
+
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + 1 + calculateObjectSize(ordered_values, serializeFunctions, ignoreUndefined);
+ } else if(value instanceof RegExp || Object.prototype.toString.call(value) === '[object RegExp]') {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + 1 + Buffer.byteLength(value.source, 'utf8') + 1
+ + (value.global ? 1 : 0) + (value.ignoreCase ? 1 : 0) + (value.multiline ? 1 : 0) + 1
+ } else if(value instanceof BSONRegExp || value['_bsontype'] == 'BSONRegExp') {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + 1 + Buffer.byteLength(value.pattern, 'utf8') + 1
+ + Buffer.byteLength(value.options, 'utf8') + 1
+ } else {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + calculateObjectSize(value, serializeFunctions, ignoreUndefined) + 1;
+ }
+ case 'function':
+ // WTF for 0.4.X where typeof /someregexp/ === 'function'
+ if(value instanceof RegExp || Object.prototype.toString.call(value) === '[object RegExp]' || String.call(value) == '[object RegExp]') {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + 1 + Buffer.byteLength(value.source, 'utf8') + 1
+ + (value.global ? 1 : 0) + (value.ignoreCase ? 1 : 0) + (value.multiline ? 1 : 0) + 1
+ } else {
+ if(serializeFunctions && value.scope != null && Object.keys(value.scope).length > 0) {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + 1 + 4 + 4 + Buffer.byteLength(value.toString(), 'utf8') + 1 + calculateObjectSize(value.scope, serializeFunctions, ignoreUndefined);
+ } else if(serializeFunctions) {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + 1 + 4 + Buffer.byteLength(value.toString(), 'utf8') + 1;
+ }
+ }
+ }
+
+ return 0;
+}
+
+var BSON = {};
+
+// BSON MAX VALUES
+BSON.BSON_INT32_MAX = 0x7FFFFFFF;
+BSON.BSON_INT32_MIN = -0x80000000;
+
+// JS MAX PRECISE VALUES
+BSON.JS_INT_MAX = 0x20000000000000; // Any integer up to 2^53 can be precisely represented by a double.
+BSON.JS_INT_MIN = -0x20000000000000; // Any integer down to -2^53 can be precisely represented by a double.
+
+module.exports = calculateObjectSize;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/parser/deserializer.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/parser/deserializer.js
new file mode 100644
index 0000000..35818a3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/parser/deserializer.js
@@ -0,0 +1,653 @@
+"use strict"
+
+var readIEEE754 = require('../float_parser').readIEEE754,
+ f = require('util').format,
+ Long = require('../long').Long,
+ Double = require('../double').Double,
+ Timestamp = require('../timestamp').Timestamp,
+ ObjectID = require('../objectid').ObjectID,
+ Symbol = require('../symbol').Symbol,
+ Code = require('../code').Code,
+ MinKey = require('../min_key').MinKey,
+ MaxKey = require('../max_key').MaxKey,
+ Decimal128 = require('../decimal128'),
+ Int32 = require('../int_32'),
+ DBRef = require('../db_ref').DBRef,
+ BSONRegExp = require('../regexp').BSONRegExp,
+ Binary = require('../binary').Binary;
+
+var deserialize = function(buffer, options, isArray) {
+ options = options == null ? {} : options;
+ var index = options && options.index ? options.index : 0;
+ // Read the document size
+ var size = buffer[index] | buffer[index+1] << 8 | buffer[index+2] << 16 | buffer[index+3] << 24;
+
+ // Ensure buffer is valid size
+ if(size < 5 || buffer.length < size || (size + index) > buffer.length) {
+ throw new Error("corrupt bson message");
+ }
+
+ // Illegal end value
+ if(buffer[index + size - 1] != 0) {
+ throw new Error("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");
+ }
+
+ // Start deserializtion
+ return deserializeObject(buffer, index, options, isArray);
+}
+
+var deserializeObject = function(buffer, index, options, isArray) {
+ var evalFunctions = options['evalFunctions'] == null ? false : options['evalFunctions'];
+ var cacheFunctions = options['cacheFunctions'] == null ? false : options['cacheFunctions'];
+ var cacheFunctionsCrc32 = options['cacheFunctionsCrc32'] == null ? false : options['cacheFunctionsCrc32'];
+ var fieldsAsRaw = options['fieldsAsRaw'] == null ? null : options['fieldsAsRaw'];
+
+ // Return raw bson buffer instead of parsing it
+ var raw = options['raw'] == null ? false : options['raw'];
+
+ // Return BSONRegExp objects instead of native regular expressions
+ var bsonRegExp = typeof options['bsonRegExp'] == 'boolean' ? options['bsonRegExp'] : false;
+
+ // Controls the promotion of values vs wrapper classes
+ var promoteBuffers = options['promoteBuffers'] == null ? false : options['promoteBuffers'];
+ var promoteLongs = options['promoteLongs'] == null ? true : options['promoteLongs'];
+ var promoteValues = options['promoteValues'] == null ? true : options['promoteValues'];
+
+ // Set the start index
+ var startIndex = index;
+
+ // Validate that we have at least 4 bytes of buffer
+ if(buffer.length < 5) throw new Error("corrupt bson message < 5 bytes long");
+
+ // Read the document size
+ var size = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+
+ // Ensure buffer is valid size
+ if(size < 5 || size > buffer.length) throw new Error("corrupt bson message");
+
+ // Create holding object
+ var object = isArray ? [] : {};
+ // Used for arrays to skip having to perform utf8 decoding
+ var arrayIndex = 0;
+
+ // While we have more left data left keep parsing
+ while(true) {
+ // Read the type
+ var elementType = buffer[index++];
+ // If we get a zero it's the last byte, exit
+ if(elementType == 0) {
+ break;
+ }
+
+ // Get the start search index
+ var i = index;
+ // Locate the end of the c string
+ while(buffer[i] !== 0x00 && i < buffer.length) {
+ i++
+ }
+
+ // If are at the end of the buffer there is a problem with the document
+ if(i >= buffer.length) throw new Error("Bad BSON Document: illegal CString")
+ var name = isArray ? arrayIndex++ : buffer.toString('utf8', index, i);
+
+ index = i + 1;
+
+ if(elementType == BSON.BSON_DATA_STRING) {
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ if(stringSize <= 0 || stringSize > (buffer.length - index) || buffer[index + stringSize - 1] != 0) throw new Error("bad string length in bson");
+ object[name] = buffer.toString('utf8', index, index + stringSize - 1);
+ index = index + stringSize;
+ } else if(elementType == BSON.BSON_DATA_OID) {
+ var oid = new Buffer(12);
+ buffer.copy(oid, 0, index, index + 12);
+ object[name] = new ObjectID(oid);
+ index = index + 12;
+ } else if(elementType == BSON.BSON_DATA_INT && promoteValues == false) {
+ object[name] = new Int32(buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24);
+ } else if(elementType == BSON.BSON_DATA_INT) {
+ object[name] = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ } else if(elementType == BSON.BSON_DATA_NUMBER && promoteValues == false) {
+ object[name] = new Double(buffer.readDoubleLE(index));
+ index = index + 8;
+ } else if(elementType == BSON.BSON_DATA_NUMBER) {
+ object[name] = buffer.readDoubleLE(index);
+ index = index + 8;
+ } else if(elementType == BSON.BSON_DATA_DATE) {
+ var lowBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var highBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ object[name] = new Date(new Long(lowBits, highBits).toNumber());
+ } else if(elementType == BSON.BSON_DATA_BOOLEAN) {
+ if(buffer[index] != 0 && buffer[index] != 1) throw new Error('illegal boolean type value');
+ object[name] = buffer[index++] == 1;
+ } else if(elementType == BSON.BSON_DATA_OBJECT) {
+ var _index = index;
+ var objectSize = buffer[index] | buffer[index + 1] << 8 | buffer[index + 2] << 16 | buffer[index + 3] << 24;
+ if(objectSize <= 0 || objectSize > (buffer.length - index)) throw new Error("bad embedded document length in bson");
+
+ // We have a raw value
+ if(raw) {
+ object[name] = buffer.slice(index, index + objectSize);
+ } else {
+ object[name] = deserializeObject(buffer, _index, options, false);
+ }
+
+ index = index + objectSize;
+ } else if(elementType == BSON.BSON_DATA_ARRAY) {
+ var _index = index;
+ var objectSize = buffer[index] | buffer[index + 1] << 8 | buffer[index + 2] << 16 | buffer[index + 3] << 24;
+ var arrayOptions = options;
+
+ // Stop index
+ var stopIndex = index + objectSize;
+
+ // All elements of array to be returned as raw bson
+ if(fieldsAsRaw && fieldsAsRaw[name]) {
+ arrayOptions = {};
+ for(var n in options) arrayOptions[n] = options[n];
+ arrayOptions['raw'] = true;
+ }
+
+ object[name] = deserializeObject(buffer, _index, arrayOptions, true);
+ index = index + objectSize;
+
+ if(buffer[index - 1] != 0) throw new Error('invalid array terminator byte');
+ if(index != stopIndex) throw new Error('corrupted array bson');
+ } else if(elementType == BSON.BSON_DATA_UNDEFINED) {
+ object[name] = undefined;
+ } else if(elementType == BSON.BSON_DATA_NULL) {
+ object[name] = null;
+ } else if(elementType == BSON.BSON_DATA_LONG) {
+ // Unpack the low and high bits
+ var lowBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var highBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var long = new Long(lowBits, highBits);
+ // Promote the long if possible
+ if(promoteLongs && promoteValues == true) {
+ object[name] = long.lessThanOrEqual(JS_INT_MAX_LONG) && long.greaterThanOrEqual(JS_INT_MIN_LONG) ? long.toNumber() : long;
+ } else {
+ object[name] = long;
+ }
+ } else if(elementType == BSON.BSON_DATA_DECIMAL128) {
+ // Buffer to contain the decimal bytes
+ var bytes = new Buffer(16);
+ // Copy the next 16 bytes into the bytes buffer
+ buffer.copy(bytes, 0, index, index + 16);
+ // Update index
+ index = index + 16;
+ // Assign the new Decimal128 value
+ var decimal128 = new Decimal128(bytes);
+ // If we have an alternative mapper use that
+ object[name] = decimal128.toObject ? decimal128.toObject() : decimal128;
+ } else if(elementType == BSON.BSON_DATA_BINARY) {
+ var binarySize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var totalBinarySize = binarySize;
+ var subType = buffer[index++];
+
+ // Did we have a negative binary size, throw
+ if(binarySize < 0) throw new Error('Negative binary type element size found');
+
+ // Is the length longer than the document
+ if(binarySize > buffer.length) throw new Error('Binary type size larger than document size');
+
+ // Decode as raw Buffer object if options specifies it
+ if(buffer['slice'] != null) {
+ // If we have subtype 2 skip the 4 bytes for the size
+ if(subType == Binary.SUBTYPE_BYTE_ARRAY) {
+ binarySize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ if(binarySize < 0) throw new Error('Negative binary type element size found for subtype 0x02');
+ if(binarySize > (totalBinarySize - 4)) throw new Error('Binary type with subtype 0x02 contains to long binary size');
+ if(binarySize < (totalBinarySize - 4)) throw new Error('Binary type with subtype 0x02 contains to short binary size');
+ }
+
+ if(promoteBuffers && promoteValues) {
+ object[name] = buffer.slice(index, index + binarySize);
+ } else {
+ object[name] = new Binary(buffer.slice(index, index + binarySize), subType);
+ }
+ } else {
+ var _buffer = typeof Uint8Array != 'undefined' ? new Uint8Array(new ArrayBuffer(binarySize)) : new Array(binarySize);
+ // If we have subtype 2 skip the 4 bytes for the size
+ if(subType == Binary.SUBTYPE_BYTE_ARRAY) {
+ binarySize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ if(binarySize < 0) throw new Error('Negative binary type element size found for subtype 0x02');
+ if(binarySize > (totalBinarySize - 4)) throw new Error('Binary type with subtype 0x02 contains to long binary size');
+ if(binarySize < (totalBinarySize - 4)) throw new Error('Binary type with subtype 0x02 contains to short binary size');
+ }
+
+ // Copy the data
+ for(var i = 0; i < binarySize; i++) {
+ _buffer[i] = buffer[index + i];
+ }
+
+ if(promoteBuffers && promoteValues) {
+ object[name] = _buffer;
+ } else {
+ object[name] = new Binary(_buffer, subType);
+ }
+ }
+
+ // Update the index
+ index = index + binarySize;
+ } else if(elementType == BSON.BSON_DATA_REGEXP && bsonRegExp == false) {
+ // Get the start search index
+ var i = index;
+ // Locate the end of the c string
+ while(buffer[i] !== 0x00 && i < buffer.length) {
+ i++
+ }
+ // If are at the end of the buffer there is a problem with the document
+ if(i >= buffer.length) throw new Error("Bad BSON Document: illegal CString")
+ // Return the C string
+ var source = buffer.toString('utf8', index, i);
+ // Create the regexp
+ index = i + 1;
+
+ // Get the start search index
+ var i = index;
+ // Locate the end of the c string
+ while(buffer[i] !== 0x00 && i < buffer.length) {
+ i++
+ }
+ // If are at the end of the buffer there is a problem with the document
+ if(i >= buffer.length) throw new Error("Bad BSON Document: illegal CString")
+ // Return the C string
+ var regExpOptions = buffer.toString('utf8', index, i);
+ index = i + 1;
+
+ // For each option add the corresponding one for javascript
+ var optionsArray = new Array(regExpOptions.length);
+
+ // Parse options
+ for(var i = 0; i < regExpOptions.length; i++) {
+ switch(regExpOptions[i]) {
+ case 'm':
+ optionsArray[i] = 'm';
+ break;
+ case 's':
+ optionsArray[i] = 'g';
+ break;
+ case 'i':
+ optionsArray[i] = 'i';
+ break;
+ }
+ }
+
+ object[name] = new RegExp(source, optionsArray.join(''));
+ } else if(elementType == BSON.BSON_DATA_REGEXP && bsonRegExp == true) {
+ // Get the start search index
+ var i = index;
+ // Locate the end of the c string
+ while(buffer[i] !== 0x00 && i < buffer.length) {
+ i++
+ }
+ // If are at the end of the buffer there is a problem with the document
+ if(i >= buffer.length) throw new Error("Bad BSON Document: illegal CString")
+ // Return the C string
+ var source = buffer.toString('utf8', index, i);
+ index = i + 1;
+
+ // Get the start search index
+ var i = index;
+ // Locate the end of the c string
+ while(buffer[i] !== 0x00 && i < buffer.length) {
+ i++
+ }
+ // If are at the end of the buffer there is a problem with the document
+ if(i >= buffer.length) throw new Error("Bad BSON Document: illegal CString")
+ // Return the C string
+ var regExpOptions = buffer.toString('utf8', index, i);
+ index = i + 1;
+
+ // Set the object
+ object[name] = new BSONRegExp(source, regExpOptions);
+ } else if(elementType == BSON.BSON_DATA_SYMBOL) {
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ if(stringSize <= 0 || stringSize > (buffer.length - index) || buffer[index + stringSize - 1] != 0) throw new Error("bad string length in bson");
+ object[name] = new Symbol(buffer.toString('utf8', index, index + stringSize - 1));
+ index = index + stringSize;
+ } else if(elementType == BSON.BSON_DATA_TIMESTAMP) {
+ var lowBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var highBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ object[name] = new Timestamp(lowBits, highBits);
+ } else if(elementType == BSON.BSON_DATA_MIN_KEY) {
+ object[name] = new MinKey();
+ } else if(elementType == BSON.BSON_DATA_MAX_KEY) {
+ object[name] = new MaxKey();
+ } else if(elementType == BSON.BSON_DATA_CODE) {
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ if(stringSize <= 0 || stringSize > (buffer.length - index) || buffer[index + stringSize - 1] != 0) throw new Error("bad string length in bson");
+ var functionString = buffer.toString('utf8', index, index + stringSize - 1);
+
+ // If we are evaluating the functions
+ if(evalFunctions) {
+ var value = null;
+ // If we have cache enabled let's look for the md5 of the function in the cache
+ if(cacheFunctions) {
+ var hash = cacheFunctionsCrc32 ? crc32(functionString) : functionString;
+ // Got to do this to avoid V8 deoptimizing the call due to finding eval
+ object[name] = isolateEvalWithHash(functionCache, hash, functionString, object);
+ } else {
+ object[name] = isolateEval(functionString);
+ }
+ } else {
+ object[name] = new Code(functionString);
+ }
+
+ // Update parse index position
+ index = index + stringSize;
+ } else if(elementType == BSON.BSON_DATA_CODE_W_SCOPE) {
+ var totalSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+
+ // Element cannot be shorter than totalSize + stringSize + documentSize + terminator
+ if(totalSize < (4 + 4 + 4 + 1)) {
+ throw new Error("code_w_scope total size shorter minimum expected length");
+ }
+
+ // Get the code string size
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ // Check if we have a valid string
+ if(stringSize <= 0 || stringSize > (buffer.length - index) || buffer[index + stringSize - 1] != 0) throw new Error("bad string length in bson");
+
+ // Javascript function
+ var functionString = buffer.toString('utf8', index, index + stringSize - 1);
+ // Update parse index position
+ index = index + stringSize;
+ // Parse the element
+ var _index = index;
+ // Decode the size of the object document
+ var objectSize = buffer[index] | buffer[index + 1] << 8 | buffer[index + 2] << 16 | buffer[index + 3] << 24;
+ // Decode the scope object
+ var scopeObject = deserializeObject(buffer, _index, options, false);
+ // Adjust the index
+ index = index + objectSize;
+
+ // Check if field length is to short
+ if(totalSize < (4 + 4 + objectSize + stringSize)) {
+ throw new Error('code_w_scope total size is to short, truncating scope');
+ }
+
+ // Check if totalSize field is to long
+ if(totalSize > (4 + 4 + objectSize + stringSize)) {
+ throw new Error('code_w_scope total size is to long, clips outer document');
+ }
+
+ // If we are evaluating the functions
+ if(evalFunctions) {
+ // Contains the value we are going to set
+ var value = null;
+ // If we have cache enabled let's look for the md5 of the function in the cache
+ if(cacheFunctions) {
+ var hash = cacheFunctionsCrc32 ? crc32(functionString) : functionString;
+ // Got to do this to avoid V8 deoptimizing the call due to finding eval
+ object[name] = isolateEvalWithHash(functionCache, hash, functionString, object);
+ } else {
+ object[name] = isolateEval(functionString);
+ }
+
+ object[name].scope = scopeObject;
+ } else {
+ object[name] = new Code(functionString, scopeObject);
+ }
+ } else if(elementType == BSON.BSON_DATA_DBPOINTER) {
+ // Get the code string size
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ // Check if we have a valid string
+ if(stringSize <= 0 || stringSize > (buffer.length - index) || buffer[index + stringSize - 1] != 0) throw new Error("bad string length in bson");
+ // Namespace
+ var namespace = buffer.toString('utf8', index, index + stringSize - 1);
+ // Update parse index position
+ index = index + stringSize;
+
+ // Read the oid
+ var oidBuffer = new Buffer(12);
+ buffer.copy(oidBuffer, 0, index, index + 12);
+ var oid = new ObjectID(oidBuffer);
+
+ // Update the index
+ index = index + 12;
+
+ // Split the namespace
+ var parts = namespace.split('.');
+ var db = parts.shift();
+ var collection = parts.join('.');
+ // Upgrade to DBRef type
+ object[name] = new DBRef(collection, oid, db);
+ } else {
+ throw new Error("Detected unknown BSON type " + elementType.toString(16) + " for fieldname \"" + name + "\", are you using the latest BSON parser");
+ }
+ }
+
+ // Check if the deserialization was against a valid array/object
+ if(size != (index - startIndex)) {
+ if(isArray) throw new Error('corrupt array bson');
+ throw new Error('corrupt object bson');
+ }
+
+ // Check if we have a db ref object
+ if(object['$id'] != null) object = new DBRef(object['$ref'], object['$id'], object['$db']);
+ return object;
+}
+
+/**
+ * Ensure eval is isolated.
+ *
+ * @ignore
+ * @api private
+ */
+var isolateEvalWithHash = function(functionCache, hash, functionString, object) {
+ // Contains the value we are going to set
+ var value = null;
+
+ // Check for cache hit, eval if missing and return cached function
+ if(functionCache[hash] == null) {
+ eval("value = " + functionString);
+ functionCache[hash] = value;
+ }
+ // Set the object
+ return functionCache[hash].bind(object);
+}
+
+/**
+ * Ensure eval is isolated.
+ *
+ * @ignore
+ * @api private
+ */
+var isolateEval = function(functionString) {
+ // Contains the value we are going to set
+ var value = null;
+ // Eval the function
+ eval("value = " + functionString);
+ return value;
+}
+
+var BSON = {};
+
+/**
+ * Contains the function cache if we have that enable to allow for avoiding the eval step on each deserialization, comparison is by md5
+ *
+ * @ignore
+ * @api private
+ */
+var functionCache = BSON.functionCache = {};
+
+/**
+ * Number BSON Type
+ *
+ * @classconstant BSON_DATA_NUMBER
+ **/
+BSON.BSON_DATA_NUMBER = 1;
+/**
+ * String BSON Type
+ *
+ * @classconstant BSON_DATA_STRING
+ **/
+BSON.BSON_DATA_STRING = 2;
+/**
+ * Object BSON Type
+ *
+ * @classconstant BSON_DATA_OBJECT
+ **/
+BSON.BSON_DATA_OBJECT = 3;
+/**
+ * Array BSON Type
+ *
+ * @classconstant BSON_DATA_ARRAY
+ **/
+BSON.BSON_DATA_ARRAY = 4;
+/**
+ * Binary BSON Type
+ *
+ * @classconstant BSON_DATA_BINARY
+ **/
+BSON.BSON_DATA_BINARY = 5;
+/**
+ * Binary BSON Type
+ *
+ * @classconstant BSON_DATA_UNDEFINED
+ **/
+BSON.BSON_DATA_UNDEFINED = 6;
+/**
+ * ObjectID BSON Type
+ *
+ * @classconstant BSON_DATA_OID
+ **/
+BSON.BSON_DATA_OID = 7;
+/**
+ * Boolean BSON Type
+ *
+ * @classconstant BSON_DATA_BOOLEAN
+ **/
+BSON.BSON_DATA_BOOLEAN = 8;
+/**
+ * Date BSON Type
+ *
+ * @classconstant BSON_DATA_DATE
+ **/
+BSON.BSON_DATA_DATE = 9;
+/**
+ * null BSON Type
+ *
+ * @classconstant BSON_DATA_NULL
+ **/
+BSON.BSON_DATA_NULL = 10;
+/**
+ * RegExp BSON Type
+ *
+ * @classconstant BSON_DATA_REGEXP
+ **/
+BSON.BSON_DATA_REGEXP = 11;
+/**
+ * Code BSON Type
+ *
+ * @classconstant BSON_DATA_DBPOINTER
+ **/
+BSON.BSON_DATA_DBPOINTER = 12;
+/**
+ * Code BSON Type
+ *
+ * @classconstant BSON_DATA_CODE
+ **/
+BSON.BSON_DATA_CODE = 13;
+/**
+ * Symbol BSON Type
+ *
+ * @classconstant BSON_DATA_SYMBOL
+ **/
+BSON.BSON_DATA_SYMBOL = 14;
+/**
+ * Code with Scope BSON Type
+ *
+ * @classconstant BSON_DATA_CODE_W_SCOPE
+ **/
+BSON.BSON_DATA_CODE_W_SCOPE = 15;
+/**
+ * 32 bit Integer BSON Type
+ *
+ * @classconstant BSON_DATA_INT
+ **/
+BSON.BSON_DATA_INT = 16;
+/**
+ * Timestamp BSON Type
+ *
+ * @classconstant BSON_DATA_TIMESTAMP
+ **/
+BSON.BSON_DATA_TIMESTAMP = 17;
+/**
+ * Long BSON Type
+ *
+ * @classconstant BSON_DATA_LONG
+ **/
+BSON.BSON_DATA_LONG = 18;
+/**
+ * Long BSON Type
+ *
+ * @classconstant BSON_DATA_DECIMAL128
+ **/
+BSON.BSON_DATA_DECIMAL128 = 19;
+/**
+ * MinKey BSON Type
+ *
+ * @classconstant BSON_DATA_MIN_KEY
+ **/
+BSON.BSON_DATA_MIN_KEY = 0xff;
+/**
+ * MaxKey BSON Type
+ *
+ * @classconstant BSON_DATA_MAX_KEY
+ **/
+BSON.BSON_DATA_MAX_KEY = 0x7f;
+
+/**
+ * Binary Default Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_DEFAULT
+ **/
+BSON.BSON_BINARY_SUBTYPE_DEFAULT = 0;
+/**
+ * Binary Function Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_FUNCTION
+ **/
+BSON.BSON_BINARY_SUBTYPE_FUNCTION = 1;
+/**
+ * Binary Byte Array Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_BYTE_ARRAY
+ **/
+BSON.BSON_BINARY_SUBTYPE_BYTE_ARRAY = 2;
+/**
+ * Binary UUID Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_UUID
+ **/
+BSON.BSON_BINARY_SUBTYPE_UUID = 3;
+/**
+ * Binary MD5 Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_MD5
+ **/
+BSON.BSON_BINARY_SUBTYPE_MD5 = 4;
+/**
+ * Binary User Defined Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_USER_DEFINED
+ **/
+BSON.BSON_BINARY_SUBTYPE_USER_DEFINED = 128;
+
+// BSON MAX VALUES
+BSON.BSON_INT32_MAX = 0x7FFFFFFF;
+BSON.BSON_INT32_MIN = -0x80000000;
+
+BSON.BSON_INT64_MAX = Math.pow(2, 63) - 1;
+BSON.BSON_INT64_MIN = -Math.pow(2, 63);
+
+// JS MAX PRECISE VALUES
+BSON.JS_INT_MAX = 0x20000000000000; // Any integer up to 2^53 can be precisely represented by a double.
+BSON.JS_INT_MIN = -0x20000000000000; // Any integer down to -2^53 can be precisely represented by a double.
+
+// Internal long versions
+var JS_INT_MAX_LONG = Long.fromNumber(0x20000000000000); // Any integer up to 2^53 can be precisely represented by a double.
+var JS_INT_MIN_LONG = Long.fromNumber(-0x20000000000000); // Any integer down to -2^53 can be precisely represented by a double.
+
+module.exports = deserialize
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/parser/serializer.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/parser/serializer.js
new file mode 100644
index 0000000..4fdb0cf
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/parser/serializer.js
@@ -0,0 +1,1001 @@
+"use strict"
+
+var writeIEEE754 = require('../float_parser').writeIEEE754,
+ readIEEE754 = require('../float_parser').readIEEE754,
+ Long = require('../long').Long,
+ Map = require('../map'),
+ Double = require('../double').Double,
+ Timestamp = require('../timestamp').Timestamp,
+ ObjectID = require('../objectid').ObjectID,
+ Symbol = require('../symbol').Symbol,
+ Code = require('../code').Code,
+ BSONRegExp = require('../regexp').BSONRegExp,
+ Int32 = require('../int_32').Int32,
+ MinKey = require('../min_key').MinKey,
+ MaxKey = require('../max_key').MaxKey,
+ Decimal128 = require('../decimal128'),
+ DBRef = require('../db_ref').DBRef,
+ Binary = require('../binary').Binary;
+
+try {
+ var _Buffer = Uint8Array;
+} catch(e) {
+ var _Buffer = Buffer;
+}
+
+var regexp = /\x00/
+
+// To ensure that 0.4 of node works correctly
+var isDate = function isDate(d) {
+ return typeof d === 'object' && Object.prototype.toString.call(d) === '[object Date]';
+}
+
+var isRegExp = function isRegExp(d) {
+ return Object.prototype.toString.call(d) === '[object RegExp]';
+}
+
+var serializeString = function(buffer, key, value, index, isArray) {
+ // Encode String type
+ buffer[index++] = BSON.BSON_DATA_STRING;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Write the string
+ var size = buffer.write(value, index + 4, 'utf8');
+ // Write the size of the string to buffer
+ buffer[index + 3] = (size + 1 >> 24) & 0xff;
+ buffer[index + 2] = (size + 1 >> 16) & 0xff;
+ buffer[index + 1] = (size + 1 >> 8) & 0xff;
+ buffer[index] = size + 1 & 0xff;
+ // Update index
+ index = index + 4 + size;
+ // Write zero
+ buffer[index++] = 0;
+ return index;
+}
+
+var serializeNumber = function(buffer, key, value, index, isArray) {
+ // We have an integer value
+ if(Math.floor(value) === value && value >= BSON.JS_INT_MIN && value <= BSON.JS_INT_MAX) {
+ // If the value fits in 32 bits encode as int, if it fits in a double
+ // encode it as a double, otherwise long
+ if(value >= BSON.BSON_INT32_MIN && value <= BSON.BSON_INT32_MAX) {
+ // Set int type 32 bits or less
+ buffer[index++] = BSON.BSON_DATA_INT;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write the int value
+ buffer[index++] = value & 0xff;
+ buffer[index++] = (value >> 8) & 0xff;
+ buffer[index++] = (value >> 16) & 0xff;
+ buffer[index++] = (value >> 24) & 0xff;
+ } else if(value >= BSON.JS_INT_MIN && value <= BSON.JS_INT_MAX) {
+ // Encode as double
+ buffer[index++] = BSON.BSON_DATA_NUMBER;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write float
+ writeIEEE754(buffer, value, index, 'little', 52, 8);
+ // Ajust index
+ index = index + 8;
+ } else {
+ // Set long type
+ buffer[index++] = BSON.BSON_DATA_LONG;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ var longVal = Long.fromNumber(value);
+ var lowBits = longVal.getLowBits();
+ var highBits = longVal.getHighBits();
+ // Encode low bits
+ buffer[index++] = lowBits & 0xff;
+ buffer[index++] = (lowBits >> 8) & 0xff;
+ buffer[index++] = (lowBits >> 16) & 0xff;
+ buffer[index++] = (lowBits >> 24) & 0xff;
+ // Encode high bits
+ buffer[index++] = highBits & 0xff;
+ buffer[index++] = (highBits >> 8) & 0xff;
+ buffer[index++] = (highBits >> 16) & 0xff;
+ buffer[index++] = (highBits >> 24) & 0xff;
+ }
+ } else {
+ // Encode as double
+ buffer[index++] = BSON.BSON_DATA_NUMBER;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write float
+ writeIEEE754(buffer, value, index, 'little', 52, 8);
+ // Ajust index
+ index = index + 8;
+ }
+
+ return index;
+}
+
+var serializeNull = function(buffer, key, value, index, isArray) {
+ // Set long type
+ buffer[index++] = BSON.BSON_DATA_NULL;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ return index;
+}
+
+var serializeBoolean = function(buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_BOOLEAN;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Encode the boolean value
+ buffer[index++] = value ? 1 : 0;
+ return index;
+}
+
+var serializeDate = function(buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_DATE;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+
+ // Write the date
+ var dateInMilis = Long.fromNumber(value.getTime());
+ var lowBits = dateInMilis.getLowBits();
+ var highBits = dateInMilis.getHighBits();
+ // Encode low bits
+ buffer[index++] = lowBits & 0xff;
+ buffer[index++] = (lowBits >> 8) & 0xff;
+ buffer[index++] = (lowBits >> 16) & 0xff;
+ buffer[index++] = (lowBits >> 24) & 0xff;
+ // Encode high bits
+ buffer[index++] = highBits & 0xff;
+ buffer[index++] = (highBits >> 8) & 0xff;
+ buffer[index++] = (highBits >> 16) & 0xff;
+ buffer[index++] = (highBits >> 24) & 0xff;
+ return index;
+}
+
+var serializeRegExp = function(buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_REGEXP;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ if (value.source && value.source.match(regexp) != null) {
+ throw Error("value " + value.source + " must not contain null bytes");
+ }
+ // Adjust the index
+ index = index + buffer.write(value.source, index, 'utf8');
+ // Write zero
+ buffer[index++] = 0x00;
+ // Write the parameters
+ if(value.global) buffer[index++] = 0x73; // s
+ if(value.ignoreCase) buffer[index++] = 0x69; // i
+ if(value.multiline) buffer[index++] = 0x6d; // m
+ // Add ending zero
+ buffer[index++] = 0x00;
+ return index;
+}
+
+var serializeBSONRegExp = function(buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_REGEXP;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+
+ // Check the pattern for 0 bytes
+ if (value.pattern.match(regexp) != null) {
+ // The BSON spec doesn't allow keys with null bytes because keys are
+ // null-terminated.
+ throw Error("pattern " + value.pattern + " must not contain null bytes");
+ }
+
+ // Adjust the index
+ index = index + buffer.write(value.pattern, index, 'utf8');
+ // Write zero
+ buffer[index++] = 0x00;
+ // Write the options
+ index = index + buffer.write(value.options.split('').sort().join(''), index, 'utf8');
+ // Add ending zero
+ buffer[index++] = 0x00;
+ return index;
+}
+
+var serializeMinMax = function(buffer, key, value, index, isArray) {
+ // Write the type of either min or max key
+ if(value === null) {
+ buffer[index++] = BSON.BSON_DATA_NULL;
+ } else if(value instanceof MinKey) {
+ buffer[index++] = BSON.BSON_DATA_MIN_KEY;
+ } else {
+ buffer[index++] = BSON.BSON_DATA_MAX_KEY;
+ }
+
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ return index;
+}
+
+var serializeObjectId = function(buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_OID;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+
+ // Write the objectId into the shared buffer
+ if(typeof value.id == 'string') {
+ buffer.write(value.id, index, 'binary')
+ } else if(value.id && value.id.copy){
+ value.id.copy(buffer, index, 0, 12);
+ } else {
+ throw new Error('object [' + JSON.stringify(value) + "] is not a valid ObjectId");
+ }
+
+ // Ajust index
+ return index + 12;
+}
+
+var serializeBuffer = function(buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_BINARY;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Get size of the buffer (current write point)
+ var size = value.length;
+ // Write the size of the string to buffer
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ // Write the default subtype
+ buffer[index++] = BSON.BSON_BINARY_SUBTYPE_DEFAULT;
+ // Copy the content form the binary field to the buffer
+ value.copy(buffer, index, 0, size);
+ // Adjust the index
+ index = index + size;
+ return index;
+}
+
+var serializeObject = function(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, isArray, path) {
+ for(var i = 0; i < path.length; i++) {
+ if(path[i] === value) throw new Error('cyclic dependency detected');
+ }
+
+ // Push value to stack
+ path.push(value);
+ // Write the type
+ buffer[index++] = Array.isArray(value) ? BSON.BSON_DATA_ARRAY : BSON.BSON_DATA_OBJECT;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ var endIndex = serializeInto(buffer, value, checkKeys, index, depth + 1, serializeFunctions, ignoreUndefined, path);
+ // Pop stack
+ path.pop();
+ // Write size
+ var size = endIndex - index;
+ return endIndex;
+}
+
+var serializeDecimal128 = function(buffer, key, value, index, isArray) {
+ buffer[index++] = BSON.BSON_DATA_DECIMAL128;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write the data from the value
+ value.bytes.copy(buffer, index, 0, 16);
+ return index + 16;
+}
+
+var serializeLong = function(buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = value._bsontype == 'Long' ? BSON.BSON_DATA_LONG : BSON.BSON_DATA_TIMESTAMP;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write the date
+ var lowBits = value.getLowBits();
+ var highBits = value.getHighBits();
+ // Encode low bits
+ buffer[index++] = lowBits & 0xff;
+ buffer[index++] = (lowBits >> 8) & 0xff;
+ buffer[index++] = (lowBits >> 16) & 0xff;
+ buffer[index++] = (lowBits >> 24) & 0xff;
+ // Encode high bits
+ buffer[index++] = highBits & 0xff;
+ buffer[index++] = (highBits >> 8) & 0xff;
+ buffer[index++] = (highBits >> 16) & 0xff;
+ buffer[index++] = (highBits >> 24) & 0xff;
+ return index;
+}
+
+var serializeInt32 = function(buffer, key, value, index, isArray) {
+ // Set int type 32 bits or less
+ buffer[index++] = BSON.BSON_DATA_INT;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write the int value
+ buffer[index++] = value & 0xff;
+ buffer[index++] = (value >> 8) & 0xff;
+ buffer[index++] = (value >> 16) & 0xff;
+ buffer[index++] = (value >> 24) & 0xff;
+ return index;
+}
+
+var serializeDouble = function(buffer, key, value, index, isArray) {
+ // Encode as double
+ buffer[index++] = BSON.BSON_DATA_NUMBER;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write float
+ writeIEEE754(buffer, value, index, 'little', 52, 8);
+ // Ajust index
+ index = index + 8;
+ return index;
+}
+
+var serializeFunction = function(buffer, key, value, index, checkKeys, depth, isArray) {
+ buffer[index++] = BSON.BSON_DATA_CODE;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Function string
+ var functionString = value.toString();
+ // Write the string
+ var size = buffer.write(functionString, index + 4, 'utf8') + 1;
+ // Write the size of the string to buffer
+ buffer[index] = size & 0xff;
+ buffer[index + 1] = (size >> 8) & 0xff;
+ buffer[index + 2] = (size >> 16) & 0xff;
+ buffer[index + 3] = (size >> 24) & 0xff;
+ // Update index
+ index = index + 4 + size - 1;
+ // Write zero
+ buffer[index++] = 0;
+ return index;
+}
+
+var serializeCode = function(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, isArray) {
+ if(value.scope && typeof value.scope == 'object') {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_CODE_W_SCOPE;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+
+ // Starting index
+ var startIndex = index;
+
+ // Serialize the function
+ // Get the function string
+ var functionString = typeof value.code == 'string' ? value.code : value.code.toString();
+ // Index adjustment
+ index = index + 4;
+ // Write string into buffer
+ var codeSize = buffer.write(functionString, index + 4, 'utf8') + 1;
+ // Write the size of the string to buffer
+ buffer[index] = codeSize & 0xff;
+ buffer[index + 1] = (codeSize >> 8) & 0xff;
+ buffer[index + 2] = (codeSize >> 16) & 0xff;
+ buffer[index + 3] = (codeSize >> 24) & 0xff;
+ // Write end 0
+ buffer[index + 4 + codeSize - 1] = 0;
+ // Write the
+ index = index + codeSize + 4;
+
+ //
+ // Serialize the scope value
+ var endIndex = serializeInto(buffer, value.scope, checkKeys, index, depth + 1, serializeFunctions, ignoreUndefined)
+ index = endIndex - 1;
+
+ // Writ the total
+ var totalSize = endIndex - startIndex;
+
+ // Write the total size of the object
+ buffer[startIndex++] = totalSize & 0xff;
+ buffer[startIndex++] = (totalSize >> 8) & 0xff;
+ buffer[startIndex++] = (totalSize >> 16) & 0xff;
+ buffer[startIndex++] = (totalSize >> 24) & 0xff;
+ // Write trailing zero
+ buffer[index++] = 0;
+ } else {
+ buffer[index++] = BSON.BSON_DATA_CODE;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Function string
+ var functionString = value.code.toString();
+ // Write the string
+ var size = buffer.write(functionString, index + 4, 'utf8') + 1;
+ // Write the size of the string to buffer
+ buffer[index] = size & 0xff;
+ buffer[index + 1] = (size >> 8) & 0xff;
+ buffer[index + 2] = (size >> 16) & 0xff;
+ buffer[index + 3] = (size >> 24) & 0xff;
+ // Update index
+ index = index + 4 + size - 1;
+ // Write zero
+ buffer[index++] = 0;
+ }
+
+ return index;
+}
+
+var serializeBinary = function(buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_BINARY;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Extract the buffer
+ var data = value.value(true);
+ // Calculate size
+ var size = value.position;
+ // Add the deprecated 02 type 4 bytes of size to total
+ if(value.sub_type == Binary.SUBTYPE_BYTE_ARRAY) size = size + 4;
+ // Write the size of the string to buffer
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ // Write the subtype to the buffer
+ buffer[index++] = value.sub_type;
+
+ // If we have binary type 2 the 4 first bytes are the size
+ if(value.sub_type == Binary.SUBTYPE_BYTE_ARRAY) {
+ size = size - 4;
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ }
+
+ // Write the data to the object
+ data.copy(buffer, index, 0, value.position);
+ // Adjust the index
+ index = index + value.position;
+ return index;
+}
+
+var serializeSymbol = function(buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_SYMBOL;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write the string
+ var size = buffer.write(value.value, index + 4, 'utf8') + 1;
+ // Write the size of the string to buffer
+ buffer[index] = size & 0xff;
+ buffer[index + 1] = (size >> 8) & 0xff;
+ buffer[index + 2] = (size >> 16) & 0xff;
+ buffer[index + 3] = (size >> 24) & 0xff;
+ // Update index
+ index = index + 4 + size - 1;
+ // Write zero
+ buffer[index++] = 0x00;
+ return index;
+}
+
+var serializeDBRef = function(buffer, key, value, index, depth, serializeFunctions, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_OBJECT;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+
+ var startIndex = index;
+ var endIndex;
+
+ // Serialize object
+ if(null != value.db) {
+ endIndex = serializeInto(buffer, {
+ '$ref': value.namespace
+ , '$id' : value.oid
+ , '$db' : value.db
+ }, false, index, depth + 1, serializeFunctions);
+ } else {
+ endIndex = serializeInto(buffer, {
+ '$ref': value.namespace
+ , '$id' : value.oid
+ }, false, index, depth + 1, serializeFunctions);
+ }
+
+ // Calculate object size
+ var size = endIndex - startIndex;
+ // Write the size
+ buffer[startIndex++] = size & 0xff;
+ buffer[startIndex++] = (size >> 8) & 0xff;
+ buffer[startIndex++] = (size >> 16) & 0xff;
+ buffer[startIndex++] = (size >> 24) & 0xff;
+ // Set index
+ return endIndex;
+}
+
+var serializeInto = function serializeInto(buffer, object, checkKeys, startingIndex, depth, serializeFunctions, ignoreUndefined, path) {
+ startingIndex = startingIndex || 0;
+ path = path || [];
+
+ // Push the object to the path
+ path.push(object);
+
+ // Start place to serialize into
+ var index = startingIndex + 4;
+ var self = this;
+
+ // Special case isArray
+ if(Array.isArray(object)) {
+ // Get object keys
+ for(var i = 0; i < object.length; i++) {
+ var key = "" + i;
+ var value = object[i];
+
+ // Is there an override value
+ if(value && value.toBSON) {
+ if(typeof value.toBSON != 'function') throw new Error("toBSON is not a function");
+ value = value.toBSON();
+ }
+
+ var type = typeof value;
+ if(type == 'string') {
+ index = serializeString(buffer, key, value, index, true);
+ } else if(type == 'number') {
+ index = serializeNumber(buffer, key, value, index, true);
+ } else if(type == 'boolean') {
+ index = serializeBoolean(buffer, key, value, index, true);
+ } else if(value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index, true);
+ } else if(value === undefined) {
+ index = serializeNull(buffer, key, value, index, true);
+ } else if(value === null) {
+ index = serializeNull(buffer, key, value, index, true);
+ } else if(value['_bsontype'] == 'ObjectID') {
+ index = serializeObjectId(buffer, key, value, index, true);
+ } else if(Buffer.isBuffer(value)) {
+ index = serializeBuffer(buffer, key, value, index, true);
+ } else if(value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index, true);
+ } else if(type == 'object' && value['_bsontype'] == null) {
+ index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, true, path);
+ } else if(type == 'object' && value['_bsontype'] == 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index, true);
+ } else if(value['_bsontype'] == 'Long' || value['_bsontype'] == 'Timestamp') {
+ index = serializeLong(buffer, key, value, index, true);
+ } else if(value['_bsontype'] == 'Double') {
+ index = serializeDouble(buffer, key, value, index, true);
+ } else if(typeof value == 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index, checkKeys, depth, serializeFunctions, true);
+ } else if(value['_bsontype'] == 'Code') {
+ index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, true);
+ } else if(value['_bsontype'] == 'Binary') {
+ index = serializeBinary(buffer, key, value, index, true);
+ } else if(value['_bsontype'] == 'Symbol') {
+ index = serializeSymbol(buffer, key, value, index, true);
+ } else if(value['_bsontype'] == 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions, true);
+ } else if(value['_bsontype'] == 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index, true);
+ } else if(value['_bsontype'] == 'Int32') {
+ index = serializeInt32(buffer, key, value, index, true);
+ } else if(value['_bsontype'] == 'MinKey' || value['_bsontype'] == 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index, true);
+ }
+ }
+ } else if(object instanceof Map) {
+ var iterator = object.entries();
+ var done = false;
+
+ while(!done) {
+ // Unpack the next entry
+ var entry = iterator.next();
+ done = entry.done;
+ // Are we done, then skip and terminate
+ if(done) continue;
+
+ // Get the entry values
+ var key = entry.value[0];
+ var value = entry.value[1];
+
+ // Check the type of the value
+ var type = typeof value;
+
+ // Check the key and throw error if it's illegal
+ if(key != '$db' && key != '$ref' && key != '$id') {
+ if (key.match(regexp) != null) {
+ // The BSON spec doesn't allow keys with null bytes because keys are
+ // null-terminated.
+ throw Error("key " + key + " must not contain null bytes");
+ }
+
+ if (checkKeys) {
+ if('$' == key[0]) {
+ throw Error("key " + key + " must not start with '$'");
+ } else if (!!~key.indexOf('.')) {
+ throw Error("key " + key + " must not contain '.'");
+ }
+ }
+ }
+
+ if(type == 'string') {
+ index = serializeString(buffer, key, value, index);
+ } else if(type == 'number') {
+ index = serializeNumber(buffer, key, value, index);
+ } else if(type == 'boolean') {
+ index = serializeBoolean(buffer, key, value, index);
+ } else if(value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index);
+ } else if(value === undefined && ignoreUndefined == true) {
+ } else if(value === null || value === undefined) {
+ index = serializeNull(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'ObjectID') {
+ index = serializeObjectId(buffer, key, value, index);
+ } else if(Buffer.isBuffer(value)) {
+ index = serializeBuffer(buffer, key, value, index);
+ } else if(value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index);
+ } else if(type == 'object' && value['_bsontype'] == null) {
+ index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, false, path);
+ } else if(type == 'object' && value['_bsontype'] == 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'Long' || value['_bsontype'] == 'Timestamp') {
+ index = serializeLong(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'Double') {
+ index = serializeDouble(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'Code') {
+ index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined);
+ } else if(typeof value == 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index, checkKeys, depth, serializeFunctions);
+ } else if(value['_bsontype'] == 'Binary') {
+ index = serializeBinary(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'Symbol') {
+ index = serializeSymbol(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions);
+ } else if(value['_bsontype'] == 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'Int32') {
+ index = serializeInt32(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'MinKey' || value['_bsontype'] == 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index);
+ }
+ }
+ } else {
+ // Did we provide a custom serialization method
+ if(object.toBSON) {
+ if(typeof object.toBSON != 'function') throw new Error("toBSON is not a function");
+ object = object.toBSON();
+ if(object != null && typeof object != 'object') throw new Error("toBSON function did not return an object");
+ }
+
+ // Iterate over all the keys
+ for(var key in object) {
+ var value = object[key];
+ // Is there an override value
+ if(value && value.toBSON) {
+ if(typeof value.toBSON != 'function') throw new Error("toBSON is not a function");
+ value = value.toBSON();
+ }
+
+ // Check the type of the value
+ var type = typeof value;
+
+ // Check the key and throw error if it's illegal
+ if(key != '$db' && key != '$ref' && key != '$id') {
+ if (key.match(regexp) != null) {
+ // The BSON spec doesn't allow keys with null bytes because keys are
+ // null-terminated.
+ throw Error("key " + key + " must not contain null bytes");
+ }
+
+ if (checkKeys) {
+ if('$' == key[0]) {
+ throw Error("key " + key + " must not start with '$'");
+ } else if (!!~key.indexOf('.')) {
+ throw Error("key " + key + " must not contain '.'");
+ }
+ }
+ }
+
+ if(type == 'string') {
+ index = serializeString(buffer, key, value, index);
+ } else if(type == 'number') {
+ index = serializeNumber(buffer, key, value, index);
+ } else if(type == 'boolean') {
+ index = serializeBoolean(buffer, key, value, index);
+ } else if(value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index);
+ } else if(value === undefined && ignoreUndefined == true) {
+ } else if(value === null || value === undefined) {
+ index = serializeNull(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'ObjectID') {
+ index = serializeObjectId(buffer, key, value, index);
+ } else if(Buffer.isBuffer(value)) {
+ index = serializeBuffer(buffer, key, value, index);
+ } else if(value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index);
+ } else if(type == 'object' && value['_bsontype'] == null) {
+ index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, false, path);
+ } else if(type == 'object' && value['_bsontype'] == 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'Long' || value['_bsontype'] == 'Timestamp') {
+ index = serializeLong(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'Double') {
+ index = serializeDouble(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'Code') {
+ index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined);
+ } else if(typeof value == 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index, checkKeys, depth, serializeFunctions);
+ } else if(value['_bsontype'] == 'Binary') {
+ index = serializeBinary(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'Symbol') {
+ index = serializeSymbol(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions);
+ } else if(value['_bsontype'] == 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'Int32') {
+ index = serializeInt32(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'MinKey' || value['_bsontype'] == 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index);
+ }
+ }
+ }
+
+ // Remove the path
+ path.pop();
+
+ // Final padding byte for object
+ buffer[index++] = 0x00;
+
+ // Final size
+ var size = index - startingIndex;
+ // Write the size of the object
+ buffer[startingIndex++] = size & 0xff;
+ buffer[startingIndex++] = (size >> 8) & 0xff;
+ buffer[startingIndex++] = (size >> 16) & 0xff;
+ buffer[startingIndex++] = (size >> 24) & 0xff;
+ return index;
+}
+
+var BSON = {};
+
+/**
+ * Contains the function cache if we have that enable to allow for avoiding the eval step on each deserialization, comparison is by md5
+ *
+ * @ignore
+ * @api private
+ */
+var functionCache = BSON.functionCache = {};
+
+/**
+ * Number BSON Type
+ *
+ * @classconstant BSON_DATA_NUMBER
+ **/
+BSON.BSON_DATA_NUMBER = 1;
+/**
+ * String BSON Type
+ *
+ * @classconstant BSON_DATA_STRING
+ **/
+BSON.BSON_DATA_STRING = 2;
+/**
+ * Object BSON Type
+ *
+ * @classconstant BSON_DATA_OBJECT
+ **/
+BSON.BSON_DATA_OBJECT = 3;
+/**
+ * Array BSON Type
+ *
+ * @classconstant BSON_DATA_ARRAY
+ **/
+BSON.BSON_DATA_ARRAY = 4;
+/**
+ * Binary BSON Type
+ *
+ * @classconstant BSON_DATA_BINARY
+ **/
+BSON.BSON_DATA_BINARY = 5;
+/**
+ * ObjectID BSON Type, deprecated
+ *
+ * @classconstant BSON_DATA_UNDEFINED
+ **/
+BSON.BSON_DATA_UNDEFINED = 6;
+/**
+ * ObjectID BSON Type
+ *
+ * @classconstant BSON_DATA_OID
+ **/
+BSON.BSON_DATA_OID = 7;
+/**
+ * Boolean BSON Type
+ *
+ * @classconstant BSON_DATA_BOOLEAN
+ **/
+BSON.BSON_DATA_BOOLEAN = 8;
+/**
+ * Date BSON Type
+ *
+ * @classconstant BSON_DATA_DATE
+ **/
+BSON.BSON_DATA_DATE = 9;
+/**
+ * null BSON Type
+ *
+ * @classconstant BSON_DATA_NULL
+ **/
+BSON.BSON_DATA_NULL = 10;
+/**
+ * RegExp BSON Type
+ *
+ * @classconstant BSON_DATA_REGEXP
+ **/
+BSON.BSON_DATA_REGEXP = 11;
+/**
+ * Code BSON Type
+ *
+ * @classconstant BSON_DATA_CODE
+ **/
+BSON.BSON_DATA_CODE = 13;
+/**
+ * Symbol BSON Type
+ *
+ * @classconstant BSON_DATA_SYMBOL
+ **/
+BSON.BSON_DATA_SYMBOL = 14;
+/**
+ * Code with Scope BSON Type
+ *
+ * @classconstant BSON_DATA_CODE_W_SCOPE
+ **/
+BSON.BSON_DATA_CODE_W_SCOPE = 15;
+/**
+ * 32 bit Integer BSON Type
+ *
+ * @classconstant BSON_DATA_INT
+ **/
+BSON.BSON_DATA_INT = 16;
+/**
+ * Timestamp BSON Type
+ *
+ * @classconstant BSON_DATA_TIMESTAMP
+ **/
+BSON.BSON_DATA_TIMESTAMP = 17;
+/**
+ * Long BSON Type
+ *
+ * @classconstant BSON_DATA_LONG
+ **/
+BSON.BSON_DATA_LONG = 18;
+/**
+ * Long BSON Type
+ *
+ * @classconstant BSON_DATA_DECIMAL128
+ **/
+BSON.BSON_DATA_DECIMAL128 = 19;
+/**
+ * MinKey BSON Type
+ *
+ * @classconstant BSON_DATA_MIN_KEY
+ **/
+BSON.BSON_DATA_MIN_KEY = 0xff;
+/**
+ * MaxKey BSON Type
+ *
+ * @classconstant BSON_DATA_MAX_KEY
+ **/
+BSON.BSON_DATA_MAX_KEY = 0x7f;
+/**
+ * Binary Default Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_DEFAULT
+ **/
+BSON.BSON_BINARY_SUBTYPE_DEFAULT = 0;
+/**
+ * Binary Function Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_FUNCTION
+ **/
+BSON.BSON_BINARY_SUBTYPE_FUNCTION = 1;
+/**
+ * Binary Byte Array Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_BYTE_ARRAY
+ **/
+BSON.BSON_BINARY_SUBTYPE_BYTE_ARRAY = 2;
+/**
+ * Binary UUID Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_UUID
+ **/
+BSON.BSON_BINARY_SUBTYPE_UUID = 3;
+/**
+ * Binary MD5 Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_MD5
+ **/
+BSON.BSON_BINARY_SUBTYPE_MD5 = 4;
+/**
+ * Binary User Defined Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_USER_DEFINED
+ **/
+BSON.BSON_BINARY_SUBTYPE_USER_DEFINED = 128;
+
+// BSON MAX VALUES
+BSON.BSON_INT32_MAX = 0x7FFFFFFF;
+BSON.BSON_INT32_MIN = -0x80000000;
+
+BSON.BSON_INT64_MAX = Math.pow(2, 63) - 1;
+BSON.BSON_INT64_MIN = -Math.pow(2, 63);
+
+// JS MAX PRECISE VALUES
+BSON.JS_INT_MAX = 0x20000000000000; // Any integer up to 2^53 can be precisely represented by a double.
+BSON.JS_INT_MIN = -0x20000000000000; // Any integer down to -2^53 can be precisely represented by a double.
+
+// Internal long versions
+var JS_INT_MAX_LONG = Long.fromNumber(0x20000000000000); // Any integer up to 2^53 can be precisely represented by a double.
+var JS_INT_MIN_LONG = Long.fromNumber(-0x20000000000000); // Any integer down to -2^53 can be precisely represented by a double.
+
+module.exports = serializeInto;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/regexp.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/regexp.js
new file mode 100644
index 0000000..9dd0066
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/regexp.js
@@ -0,0 +1,30 @@
+/**
+ * A class representation of the BSON RegExp type.
+ *
+ * @class
+ * @return {BSONRegExp} A MinKey instance
+ */
+function BSONRegExp(pattern, options) {
+ if(!(this instanceof BSONRegExp)) return new BSONRegExp();
+
+ // Execute
+ this._bsontype = 'BSONRegExp';
+ this.pattern = pattern || '';
+ this.options = options || '';
+
+ // Validate options
+ for(var i = 0; i < this.options.length; i++) {
+ if(!(this.options[i] == 'i'
+ || this.options[i] == 'm'
+ || this.options[i] == 'x'
+ || this.options[i] == 'l'
+ || this.options[i] == 's'
+ || this.options[i] == 'u'
+ )) {
+ throw new Error('the regular expression options [' + this.options[i] + "] is not supported");
+ }
+ }
+}
+
+module.exports = BSONRegExp;
+module.exports.BSONRegExp = BSONRegExp;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/symbol.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/symbol.js
new file mode 100644
index 0000000..7681a4d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/symbol.js
@@ -0,0 +1,47 @@
+/**
+ * A class representation of the BSON Symbol type.
+ *
+ * @class
+ * @deprecated
+ * @param {string} value the string representing the symbol.
+ * @return {Symbol}
+ */
+function Symbol(value) {
+ if(!(this instanceof Symbol)) return new Symbol(value);
+ this._bsontype = 'Symbol';
+ this.value = value;
+}
+
+/**
+ * Access the wrapped string value.
+ *
+ * @method
+ * @return {String} returns the wrapped string.
+ */
+Symbol.prototype.valueOf = function() {
+ return this.value;
+};
+
+/**
+ * @ignore
+ */
+Symbol.prototype.toString = function() {
+ return this.value;
+}
+
+/**
+ * @ignore
+ */
+Symbol.prototype.inspect = function() {
+ return this.value;
+}
+
+/**
+ * @ignore
+ */
+Symbol.prototype.toJSON = function() {
+ return this.value;
+}
+
+module.exports = Symbol;
+module.exports.Symbol = Symbol; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/timestamp.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/timestamp.js
new file mode 100644
index 0000000..7718caf
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/timestamp.js
@@ -0,0 +1,856 @@
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Copyright 2009 Google Inc. All Rights Reserved
+
+/**
+ * This type is for INTERNAL use in MongoDB only and should not be used in applications.
+ * The appropriate corresponding type is the JavaScript Date type.
+ *
+ * Defines a Timestamp class for representing a 64-bit two's-complement
+ * integer value, which faithfully simulates the behavior of a Java "Timestamp". This
+ * implementation is derived from TimestampLib in GWT.
+ *
+ * Constructs a 64-bit two's-complement integer, given its low and high 32-bit
+ * values as *signed* integers. See the from* functions below for more
+ * convenient ways of constructing Timestamps.
+ *
+ * The internal representation of a Timestamp is the two given signed, 32-bit values.
+ * We use 32-bit pieces because these are the size of integers on which
+ * Javascript performs bit-operations. For operations like addition and
+ * multiplication, we split each number into 16-bit pieces, which can easily be
+ * multiplied within Javascript's floating-point representation without overflow
+ * or change in sign.
+ *
+ * In the algorithms below, we frequently reduce the negative case to the
+ * positive case by negating the input(s) and then post-processing the result.
+ * Note that we must ALWAYS check specially whether those values are MIN_VALUE
+ * (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as
+ * a positive number, it overflows back into a negative). Not handling this
+ * case would often result in infinite recursion.
+ *
+ * @class
+ * @param {number} low the low (signed) 32 bits of the Timestamp.
+ * @param {number} high the high (signed) 32 bits of the Timestamp.
+ */
+function Timestamp(low, high) {
+ if(!(this instanceof Timestamp)) return new Timestamp(low, high);
+ this._bsontype = 'Timestamp';
+ /**
+ * @type {number}
+ * @ignore
+ */
+ this.low_ = low | 0; // force into 32 signed bits.
+
+ /**
+ * @type {number}
+ * @ignore
+ */
+ this.high_ = high | 0; // force into 32 signed bits.
+};
+
+/**
+ * Return the int value.
+ *
+ * @return {number} the value, assuming it is a 32-bit integer.
+ */
+Timestamp.prototype.toInt = function() {
+ return this.low_;
+};
+
+/**
+ * Return the Number value.
+ *
+ * @method
+ * @return {number} the closest floating-point representation to this value.
+ */
+Timestamp.prototype.toNumber = function() {
+ return this.high_ * Timestamp.TWO_PWR_32_DBL_ +
+ this.getLowBitsUnsigned();
+};
+
+/**
+ * Return the JSON value.
+ *
+ * @method
+ * @return {string} the JSON representation.
+ */
+Timestamp.prototype.toJSON = function() {
+ return this.toString();
+}
+
+/**
+ * Return the String value.
+ *
+ * @method
+ * @param {number} [opt_radix] the radix in which the text should be written.
+ * @return {string} the textual representation of this value.
+ */
+Timestamp.prototype.toString = function(opt_radix) {
+ var radix = opt_radix || 10;
+ if (radix < 2 || 36 < radix) {
+ throw Error('radix out of range: ' + radix);
+ }
+
+ if (this.isZero()) {
+ return '0';
+ }
+
+ if (this.isNegative()) {
+ if (this.equals(Timestamp.MIN_VALUE)) {
+ // We need to change the Timestamp value before it can be negated, so we remove
+ // the bottom-most digit in this base and then recurse to do the rest.
+ var radixTimestamp = Timestamp.fromNumber(radix);
+ var div = this.div(radixTimestamp);
+ var rem = div.multiply(radixTimestamp).subtract(this);
+ return div.toString(radix) + rem.toInt().toString(radix);
+ } else {
+ return '-' + this.negate().toString(radix);
+ }
+ }
+
+ // Do several (6) digits each time through the loop, so as to
+ // minimize the calls to the very expensive emulated div.
+ var radixToPower = Timestamp.fromNumber(Math.pow(radix, 6));
+
+ var rem = this;
+ var result = '';
+ while (true) {
+ var remDiv = rem.div(radixToPower);
+ var intval = rem.subtract(remDiv.multiply(radixToPower)).toInt();
+ var digits = intval.toString(radix);
+
+ rem = remDiv;
+ if (rem.isZero()) {
+ return digits + result;
+ } else {
+ while (digits.length < 6) {
+ digits = '0' + digits;
+ }
+ result = '' + digits + result;
+ }
+ }
+};
+
+/**
+ * Return the high 32-bits value.
+ *
+ * @method
+ * @return {number} the high 32-bits as a signed value.
+ */
+Timestamp.prototype.getHighBits = function() {
+ return this.high_;
+};
+
+/**
+ * Return the low 32-bits value.
+ *
+ * @method
+ * @return {number} the low 32-bits as a signed value.
+ */
+Timestamp.prototype.getLowBits = function() {
+ return this.low_;
+};
+
+/**
+ * Return the low unsigned 32-bits value.
+ *
+ * @method
+ * @return {number} the low 32-bits as an unsigned value.
+ */
+Timestamp.prototype.getLowBitsUnsigned = function() {
+ return (this.low_ >= 0) ?
+ this.low_ : Timestamp.TWO_PWR_32_DBL_ + this.low_;
+};
+
+/**
+ * Returns the number of bits needed to represent the absolute value of this Timestamp.
+ *
+ * @method
+ * @return {number} Returns the number of bits needed to represent the absolute value of this Timestamp.
+ */
+Timestamp.prototype.getNumBitsAbs = function() {
+ if (this.isNegative()) {
+ if (this.equals(Timestamp.MIN_VALUE)) {
+ return 64;
+ } else {
+ return this.negate().getNumBitsAbs();
+ }
+ } else {
+ var val = this.high_ != 0 ? this.high_ : this.low_;
+ for (var bit = 31; bit > 0; bit--) {
+ if ((val & (1 << bit)) != 0) {
+ break;
+ }
+ }
+ return this.high_ != 0 ? bit + 33 : bit + 1;
+ }
+};
+
+/**
+ * Return whether this value is zero.
+ *
+ * @method
+ * @return {boolean} whether this value is zero.
+ */
+Timestamp.prototype.isZero = function() {
+ return this.high_ == 0 && this.low_ == 0;
+};
+
+/**
+ * Return whether this value is negative.
+ *
+ * @method
+ * @return {boolean} whether this value is negative.
+ */
+Timestamp.prototype.isNegative = function() {
+ return this.high_ < 0;
+};
+
+/**
+ * Return whether this value is odd.
+ *
+ * @method
+ * @return {boolean} whether this value is odd.
+ */
+Timestamp.prototype.isOdd = function() {
+ return (this.low_ & 1) == 1;
+};
+
+/**
+ * Return whether this Timestamp equals the other
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {boolean} whether this Timestamp equals the other
+ */
+Timestamp.prototype.equals = function(other) {
+ return (this.high_ == other.high_) && (this.low_ == other.low_);
+};
+
+/**
+ * Return whether this Timestamp does not equal the other.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {boolean} whether this Timestamp does not equal the other.
+ */
+Timestamp.prototype.notEquals = function(other) {
+ return (this.high_ != other.high_) || (this.low_ != other.low_);
+};
+
+/**
+ * Return whether this Timestamp is less than the other.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {boolean} whether this Timestamp is less than the other.
+ */
+Timestamp.prototype.lessThan = function(other) {
+ return this.compare(other) < 0;
+};
+
+/**
+ * Return whether this Timestamp is less than or equal to the other.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {boolean} whether this Timestamp is less than or equal to the other.
+ */
+Timestamp.prototype.lessThanOrEqual = function(other) {
+ return this.compare(other) <= 0;
+};
+
+/**
+ * Return whether this Timestamp is greater than the other.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {boolean} whether this Timestamp is greater than the other.
+ */
+Timestamp.prototype.greaterThan = function(other) {
+ return this.compare(other) > 0;
+};
+
+/**
+ * Return whether this Timestamp is greater than or equal to the other.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {boolean} whether this Timestamp is greater than or equal to the other.
+ */
+Timestamp.prototype.greaterThanOrEqual = function(other) {
+ return this.compare(other) >= 0;
+};
+
+/**
+ * Compares this Timestamp with the given one.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {boolean} 0 if they are the same, 1 if the this is greater, and -1 if the given one is greater.
+ */
+Timestamp.prototype.compare = function(other) {
+ if (this.equals(other)) {
+ return 0;
+ }
+
+ var thisNeg = this.isNegative();
+ var otherNeg = other.isNegative();
+ if (thisNeg && !otherNeg) {
+ return -1;
+ }
+ if (!thisNeg && otherNeg) {
+ return 1;
+ }
+
+ // at this point, the signs are the same, so subtraction will not overflow
+ if (this.subtract(other).isNegative()) {
+ return -1;
+ } else {
+ return 1;
+ }
+};
+
+/**
+ * The negation of this value.
+ *
+ * @method
+ * @return {Timestamp} the negation of this value.
+ */
+Timestamp.prototype.negate = function() {
+ if (this.equals(Timestamp.MIN_VALUE)) {
+ return Timestamp.MIN_VALUE;
+ } else {
+ return this.not().add(Timestamp.ONE);
+ }
+};
+
+/**
+ * Returns the sum of this and the given Timestamp.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to add to this one.
+ * @return {Timestamp} the sum of this and the given Timestamp.
+ */
+Timestamp.prototype.add = function(other) {
+ // Divide each number into 4 chunks of 16 bits, and then sum the chunks.
+
+ var a48 = this.high_ >>> 16;
+ var a32 = this.high_ & 0xFFFF;
+ var a16 = this.low_ >>> 16;
+ var a00 = this.low_ & 0xFFFF;
+
+ var b48 = other.high_ >>> 16;
+ var b32 = other.high_ & 0xFFFF;
+ var b16 = other.low_ >>> 16;
+ var b00 = other.low_ & 0xFFFF;
+
+ var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
+ c00 += a00 + b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xFFFF;
+ c16 += a16 + b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c32 += a32 + b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c48 += a48 + b48;
+ c48 &= 0xFFFF;
+ return Timestamp.fromBits((c16 << 16) | c00, (c48 << 16) | c32);
+};
+
+/**
+ * Returns the difference of this and the given Timestamp.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to subtract from this.
+ * @return {Timestamp} the difference of this and the given Timestamp.
+ */
+Timestamp.prototype.subtract = function(other) {
+ return this.add(other.negate());
+};
+
+/**
+ * Returns the product of this and the given Timestamp.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to multiply with this.
+ * @return {Timestamp} the product of this and the other.
+ */
+Timestamp.prototype.multiply = function(other) {
+ if (this.isZero()) {
+ return Timestamp.ZERO;
+ } else if (other.isZero()) {
+ return Timestamp.ZERO;
+ }
+
+ if (this.equals(Timestamp.MIN_VALUE)) {
+ return other.isOdd() ? Timestamp.MIN_VALUE : Timestamp.ZERO;
+ } else if (other.equals(Timestamp.MIN_VALUE)) {
+ return this.isOdd() ? Timestamp.MIN_VALUE : Timestamp.ZERO;
+ }
+
+ if (this.isNegative()) {
+ if (other.isNegative()) {
+ return this.negate().multiply(other.negate());
+ } else {
+ return this.negate().multiply(other).negate();
+ }
+ } else if (other.isNegative()) {
+ return this.multiply(other.negate()).negate();
+ }
+
+ // If both Timestamps are small, use float multiplication
+ if (this.lessThan(Timestamp.TWO_PWR_24_) &&
+ other.lessThan(Timestamp.TWO_PWR_24_)) {
+ return Timestamp.fromNumber(this.toNumber() * other.toNumber());
+ }
+
+ // Divide each Timestamp into 4 chunks of 16 bits, and then add up 4x4 products.
+ // We can skip products that would overflow.
+
+ var a48 = this.high_ >>> 16;
+ var a32 = this.high_ & 0xFFFF;
+ var a16 = this.low_ >>> 16;
+ var a00 = this.low_ & 0xFFFF;
+
+ var b48 = other.high_ >>> 16;
+ var b32 = other.high_ & 0xFFFF;
+ var b16 = other.low_ >>> 16;
+ var b00 = other.low_ & 0xFFFF;
+
+ var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
+ c00 += a00 * b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xFFFF;
+ c16 += a16 * b00;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c16 += a00 * b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c32 += a32 * b00;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c32 += a16 * b16;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c32 += a00 * b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
+ c48 &= 0xFFFF;
+ return Timestamp.fromBits((c16 << 16) | c00, (c48 << 16) | c32);
+};
+
+/**
+ * Returns this Timestamp divided by the given one.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp by which to divide.
+ * @return {Timestamp} this Timestamp divided by the given one.
+ */
+Timestamp.prototype.div = function(other) {
+ if (other.isZero()) {
+ throw Error('division by zero');
+ } else if (this.isZero()) {
+ return Timestamp.ZERO;
+ }
+
+ if (this.equals(Timestamp.MIN_VALUE)) {
+ if (other.equals(Timestamp.ONE) ||
+ other.equals(Timestamp.NEG_ONE)) {
+ return Timestamp.MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE
+ } else if (other.equals(Timestamp.MIN_VALUE)) {
+ return Timestamp.ONE;
+ } else {
+ // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.
+ var halfThis = this.shiftRight(1);
+ var approx = halfThis.div(other).shiftLeft(1);
+ if (approx.equals(Timestamp.ZERO)) {
+ return other.isNegative() ? Timestamp.ONE : Timestamp.NEG_ONE;
+ } else {
+ var rem = this.subtract(other.multiply(approx));
+ var result = approx.add(rem.div(other));
+ return result;
+ }
+ }
+ } else if (other.equals(Timestamp.MIN_VALUE)) {
+ return Timestamp.ZERO;
+ }
+
+ if (this.isNegative()) {
+ if (other.isNegative()) {
+ return this.negate().div(other.negate());
+ } else {
+ return this.negate().div(other).negate();
+ }
+ } else if (other.isNegative()) {
+ return this.div(other.negate()).negate();
+ }
+
+ // Repeat the following until the remainder is less than other: find a
+ // floating-point that approximates remainder / other *from below*, add this
+ // into the result, and subtract it from the remainder. It is critical that
+ // the approximate value is less than or equal to the real value so that the
+ // remainder never becomes negative.
+ var res = Timestamp.ZERO;
+ var rem = this;
+ while (rem.greaterThanOrEqual(other)) {
+ // Approximate the result of division. This may be a little greater or
+ // smaller than the actual value.
+ var approx = Math.max(1, Math.floor(rem.toNumber() / other.toNumber()));
+
+ // We will tweak the approximate result by changing it in the 48-th digit or
+ // the smallest non-fractional digit, whichever is larger.
+ var log2 = Math.ceil(Math.log(approx) / Math.LN2);
+ var delta = (log2 <= 48) ? 1 : Math.pow(2, log2 - 48);
+
+ // Decrease the approximation until it is smaller than the remainder. Note
+ // that if it is too large, the product overflows and is negative.
+ var approxRes = Timestamp.fromNumber(approx);
+ var approxRem = approxRes.multiply(other);
+ while (approxRem.isNegative() || approxRem.greaterThan(rem)) {
+ approx -= delta;
+ approxRes = Timestamp.fromNumber(approx);
+ approxRem = approxRes.multiply(other);
+ }
+
+ // We know the answer can't be zero... and actually, zero would cause
+ // infinite recursion since we would make no progress.
+ if (approxRes.isZero()) {
+ approxRes = Timestamp.ONE;
+ }
+
+ res = res.add(approxRes);
+ rem = rem.subtract(approxRem);
+ }
+ return res;
+};
+
+/**
+ * Returns this Timestamp modulo the given one.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp by which to mod.
+ * @return {Timestamp} this Timestamp modulo the given one.
+ */
+Timestamp.prototype.modulo = function(other) {
+ return this.subtract(this.div(other).multiply(other));
+};
+
+/**
+ * The bitwise-NOT of this value.
+ *
+ * @method
+ * @return {Timestamp} the bitwise-NOT of this value.
+ */
+Timestamp.prototype.not = function() {
+ return Timestamp.fromBits(~this.low_, ~this.high_);
+};
+
+/**
+ * Returns the bitwise-AND of this Timestamp and the given one.
+ *
+ * @method
+ * @param {Timestamp} other the Timestamp with which to AND.
+ * @return {Timestamp} the bitwise-AND of this and the other.
+ */
+Timestamp.prototype.and = function(other) {
+ return Timestamp.fromBits(this.low_ & other.low_, this.high_ & other.high_);
+};
+
+/**
+ * Returns the bitwise-OR of this Timestamp and the given one.
+ *
+ * @method
+ * @param {Timestamp} other the Timestamp with which to OR.
+ * @return {Timestamp} the bitwise-OR of this and the other.
+ */
+Timestamp.prototype.or = function(other) {
+ return Timestamp.fromBits(this.low_ | other.low_, this.high_ | other.high_);
+};
+
+/**
+ * Returns the bitwise-XOR of this Timestamp and the given one.
+ *
+ * @method
+ * @param {Timestamp} other the Timestamp with which to XOR.
+ * @return {Timestamp} the bitwise-XOR of this and the other.
+ */
+Timestamp.prototype.xor = function(other) {
+ return Timestamp.fromBits(this.low_ ^ other.low_, this.high_ ^ other.high_);
+};
+
+/**
+ * Returns this Timestamp with bits shifted to the left by the given amount.
+ *
+ * @method
+ * @param {number} numBits the number of bits by which to shift.
+ * @return {Timestamp} this shifted to the left by the given amount.
+ */
+Timestamp.prototype.shiftLeft = function(numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var low = this.low_;
+ if (numBits < 32) {
+ var high = this.high_;
+ return Timestamp.fromBits(
+ low << numBits,
+ (high << numBits) | (low >>> (32 - numBits)));
+ } else {
+ return Timestamp.fromBits(0, low << (numBits - 32));
+ }
+ }
+};
+
+/**
+ * Returns this Timestamp with bits shifted to the right by the given amount.
+ *
+ * @method
+ * @param {number} numBits the number of bits by which to shift.
+ * @return {Timestamp} this shifted to the right by the given amount.
+ */
+Timestamp.prototype.shiftRight = function(numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var high = this.high_;
+ if (numBits < 32) {
+ var low = this.low_;
+ return Timestamp.fromBits(
+ (low >>> numBits) | (high << (32 - numBits)),
+ high >> numBits);
+ } else {
+ return Timestamp.fromBits(
+ high >> (numBits - 32),
+ high >= 0 ? 0 : -1);
+ }
+ }
+};
+
+/**
+ * Returns this Timestamp with bits shifted to the right by the given amount, with the new top bits matching the current sign bit.
+ *
+ * @method
+ * @param {number} numBits the number of bits by which to shift.
+ * @return {Timestamp} this shifted to the right by the given amount, with zeros placed into the new leading bits.
+ */
+Timestamp.prototype.shiftRightUnsigned = function(numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var high = this.high_;
+ if (numBits < 32) {
+ var low = this.low_;
+ return Timestamp.fromBits(
+ (low >>> numBits) | (high << (32 - numBits)),
+ high >>> numBits);
+ } else if (numBits == 32) {
+ return Timestamp.fromBits(high, 0);
+ } else {
+ return Timestamp.fromBits(high >>> (numBits - 32), 0);
+ }
+ }
+};
+
+/**
+ * Returns a Timestamp representing the given (32-bit) integer value.
+ *
+ * @method
+ * @param {number} value the 32-bit integer in question.
+ * @return {Timestamp} the corresponding Timestamp value.
+ */
+Timestamp.fromInt = function(value) {
+ if (-128 <= value && value < 128) {
+ var cachedObj = Timestamp.INT_CACHE_[value];
+ if (cachedObj) {
+ return cachedObj;
+ }
+ }
+
+ var obj = new Timestamp(value | 0, value < 0 ? -1 : 0);
+ if (-128 <= value && value < 128) {
+ Timestamp.INT_CACHE_[value] = obj;
+ }
+ return obj;
+};
+
+/**
+ * Returns a Timestamp representing the given value, provided that it is a finite number. Otherwise, zero is returned.
+ *
+ * @method
+ * @param {number} value the number in question.
+ * @return {Timestamp} the corresponding Timestamp value.
+ */
+Timestamp.fromNumber = function(value) {
+ if (isNaN(value) || !isFinite(value)) {
+ return Timestamp.ZERO;
+ } else if (value <= -Timestamp.TWO_PWR_63_DBL_) {
+ return Timestamp.MIN_VALUE;
+ } else if (value + 1 >= Timestamp.TWO_PWR_63_DBL_) {
+ return Timestamp.MAX_VALUE;
+ } else if (value < 0) {
+ return Timestamp.fromNumber(-value).negate();
+ } else {
+ return new Timestamp(
+ (value % Timestamp.TWO_PWR_32_DBL_) | 0,
+ (value / Timestamp.TWO_PWR_32_DBL_) | 0);
+ }
+};
+
+/**
+ * Returns a Timestamp representing the 64-bit integer that comes by concatenating the given high and low bits. Each is assumed to use 32 bits.
+ *
+ * @method
+ * @param {number} lowBits the low 32-bits.
+ * @param {number} highBits the high 32-bits.
+ * @return {Timestamp} the corresponding Timestamp value.
+ */
+Timestamp.fromBits = function(lowBits, highBits) {
+ return new Timestamp(lowBits, highBits);
+};
+
+/**
+ * Returns a Timestamp representation of the given string, written using the given radix.
+ *
+ * @method
+ * @param {string} str the textual representation of the Timestamp.
+ * @param {number} opt_radix the radix in which the text is written.
+ * @return {Timestamp} the corresponding Timestamp value.
+ */
+Timestamp.fromString = function(str, opt_radix) {
+ if (str.length == 0) {
+ throw Error('number format error: empty string');
+ }
+
+ var radix = opt_radix || 10;
+ if (radix < 2 || 36 < radix) {
+ throw Error('radix out of range: ' + radix);
+ }
+
+ if (str.charAt(0) == '-') {
+ return Timestamp.fromString(str.substring(1), radix).negate();
+ } else if (str.indexOf('-') >= 0) {
+ throw Error('number format error: interior "-" character: ' + str);
+ }
+
+ // Do several (8) digits each time through the loop, so as to
+ // minimize the calls to the very expensive emulated div.
+ var radixToPower = Timestamp.fromNumber(Math.pow(radix, 8));
+
+ var result = Timestamp.ZERO;
+ for (var i = 0; i < str.length; i += 8) {
+ var size = Math.min(8, str.length - i);
+ var value = parseInt(str.substring(i, i + size), radix);
+ if (size < 8) {
+ var power = Timestamp.fromNumber(Math.pow(radix, size));
+ result = result.multiply(power).add(Timestamp.fromNumber(value));
+ } else {
+ result = result.multiply(radixToPower);
+ result = result.add(Timestamp.fromNumber(value));
+ }
+ }
+ return result;
+};
+
+// NOTE: Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the
+// from* methods on which they depend.
+
+
+/**
+ * A cache of the Timestamp representations of small integer values.
+ * @type {Object}
+ * @ignore
+ */
+Timestamp.INT_CACHE_ = {};
+
+// NOTE: the compiler should inline these constant values below and then remove
+// these variables, so there should be no runtime penalty for these.
+
+/**
+ * Number used repeated below in calculations. This must appear before the
+ * first call to any from* function below.
+ * @type {number}
+ * @ignore
+ */
+Timestamp.TWO_PWR_16_DBL_ = 1 << 16;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Timestamp.TWO_PWR_24_DBL_ = 1 << 24;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Timestamp.TWO_PWR_32_DBL_ = Timestamp.TWO_PWR_16_DBL_ * Timestamp.TWO_PWR_16_DBL_;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Timestamp.TWO_PWR_31_DBL_ = Timestamp.TWO_PWR_32_DBL_ / 2;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Timestamp.TWO_PWR_48_DBL_ = Timestamp.TWO_PWR_32_DBL_ * Timestamp.TWO_PWR_16_DBL_;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Timestamp.TWO_PWR_64_DBL_ = Timestamp.TWO_PWR_32_DBL_ * Timestamp.TWO_PWR_32_DBL_;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Timestamp.TWO_PWR_63_DBL_ = Timestamp.TWO_PWR_64_DBL_ / 2;
+
+/** @type {Timestamp} */
+Timestamp.ZERO = Timestamp.fromInt(0);
+
+/** @type {Timestamp} */
+Timestamp.ONE = Timestamp.fromInt(1);
+
+/** @type {Timestamp} */
+Timestamp.NEG_ONE = Timestamp.fromInt(-1);
+
+/** @type {Timestamp} */
+Timestamp.MAX_VALUE =
+ Timestamp.fromBits(0xFFFFFFFF | 0, 0x7FFFFFFF | 0);
+
+/** @type {Timestamp} */
+Timestamp.MIN_VALUE = Timestamp.fromBits(0, 0x80000000 | 0);
+
+/**
+ * @type {Timestamp}
+ * @ignore
+ */
+Timestamp.TWO_PWR_24_ = Timestamp.fromInt(1 << 24);
+
+/**
+ * Expose.
+ */
+module.exports = Timestamp;
+module.exports.Timestamp = Timestamp; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/package.json
new file mode 100644
index 0000000..3b4945f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/package.json
@@ -0,0 +1,87 @@
+{
+ "name": "bson",
+ "description": "A bson parser for node.js and the browser",
+ "keywords": [
+ "mongodb",
+ "bson",
+ "parser"
+ ],
+ "files": [
+ "lib",
+ "index.js",
+ "browser_build",
+ "bower.json"
+ ],
+ "version": "1.0.2",
+ "author": {
+ "name": "Christian Amor Kvalheim",
+ "email": "christkv@gmail.com"
+ },
+ "contributors": [],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mongodb/js-bson.git"
+ },
+ "bugs": {
+ "url": "https://github.com/mongodb/js-bson/issues"
+ },
+ "devDependencies": {
+ "benchmark": "1.0.0",
+ "colors": "1.1.0",
+ "nodeunit": "0.9.0",
+ "babel-core": "^6.14.0",
+ "babel-loader": "^6.2.5",
+ "babel-polyfill": "^6.13.0",
+ "babel-preset-es2015": "^6.14.0",
+ "babel-preset-stage-0": "^6.5.0",
+ "babel-register": "^6.14.0",
+ "webpack": "^1.13.2",
+ "webpack-polyfills-plugin": "0.0.9"
+ },
+ "config": {
+ "native": false
+ },
+ "main": "./index",
+ "directories": {
+ "lib": "./lib/bson"
+ },
+ "engines": {
+ "node": ">=0.6.19"
+ },
+ "scripts": {
+ "test": "nodeunit ./test/node",
+ "build": "webpack --config ./webpack.dist.config.js"
+ },
+ "browser": "lib/bson/bson.js",
+ "license": "Apache-2.0",
+ "gitHead": "e2fb5d9adfd1525b80814c203759a9598df99c94",
+ "homepage": "https://github.com/mongodb/js-bson#readme",
+ "_id": "bson@1.0.2",
+ "_shasum": "7e8a8066379f4faa2e4795dbe7ee2d595b3c4ae1",
+ "_from": "bson@>=1.0.1 <1.1.0",
+ "_npmVersion": "3.10.8",
+ "_nodeVersion": "6.9.1",
+ "_npmUser": {
+ "name": "christkv",
+ "email": "christkv@gmail.com"
+ },
+ "dist": {
+ "shasum": "7e8a8066379f4faa2e4795dbe7ee2d595b3c4ae1",
+ "tarball": "https://registry.npmjs.org/bson/-/bson-1.0.2.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "octave",
+ "email": "chinsay@gmail.com"
+ },
+ {
+ "name": "christkv",
+ "email": "christkv@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-18-east.internal.npmjs.com",
+ "tmp": "tmp/bson-1.0.2.tgz_1483371724203_0.9188052278477699"
+ },
+ "_resolved": "https://registry.npmjs.org/bson/-/bson-1.0.2.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/.npmignore
new file mode 100644
index 0000000..e920c16
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/.npmignore
@@ -0,0 +1,33 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+
+# Runtime data
+pids
+*.pid
+*.seed
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+
+# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (http://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directory
+node_modules
+
+# Optional npm cache directory
+.npm
+
+# Optional REPL history
+.node_repl_history
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/.travis.yml b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/.travis.yml
new file mode 100644
index 0000000..38de5c6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.12"
+ - "4.2.1"
+sudo: false
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/LICENSE
new file mode 100644
index 0000000..8dada3e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright {yyyy} {name of copyright owner}
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/README.md
new file mode 100644
index 0000000..c0323f0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/README.md
@@ -0,0 +1,2 @@
+# require_optional
+Work around the problem that we do not have a optionalPeerDependencies concept in node.js making it a hassle to optionally include native modules
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/index.js
new file mode 100644
index 0000000..9754581
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/index.js
@@ -0,0 +1,109 @@
+var path = require('path'),
+ fs = require('fs'),
+ f = require('util').format,
+ resolveFrom = require('resolve-from'),
+ semver = require('semver');
+
+var exists = fs.existsSync || path.existsSync;
+
+var find_package_json = function(location) {
+ var found = false;
+
+ while(!found) {
+ if (exists(location + '/package.json')) {
+ found = location;
+ } else if (location !== '/') {
+ location = path.dirname(location);
+ } else {
+ return false;
+ }
+ }
+
+ return location;
+}
+
+var require_optional = function(name, options) {
+ options = options || {};
+ options.strict = typeof options.strict == 'boolean' ? options.strict : true;
+
+ // Current location
+ var location = __dirname;
+ // Check if we have a parent
+ if(module.parent) {
+ location = module.parent.filename;
+ }
+
+ // Locate this module's package.json file
+ var location = find_package_json(location);
+ if(!location) {
+ throw new Error('package.json can not be located');
+ }
+
+ // Read the package.json file
+ var object = JSON.parse(fs.readFileSync(f('%s/package.json', location)));
+ // Is the name defined by interal file references
+ var parts = name.split(/\//);
+
+ // Optional dependencies exist
+ if(!object.peerOptionalDependencies) {
+ throw new Error(f('no optional dependency [%s] defined in peerOptionalDependencies in package.json', parts[0]));
+ } else if(object.peerOptionalDependencies && !object.peerOptionalDependencies[parts[0]]) {
+ throw new Error(f('no optional dependency [%s] defined in peerOptionalDependencies in package.json', parts[0]));
+ }
+
+ // Unpack the expected version
+ var expectedVersions = object.peerOptionalDependencies[parts[0]];
+ // The resolved package
+ var moduleEntry = undefined;
+ // Module file
+ var moduleEntryFile = name;
+
+ try {
+ // Validate if it's possible to read the module
+ moduleEntry = require(moduleEntryFile);
+ } catch(err) {
+ // Attempt to resolve in top level package
+ try {
+ // Get the module entry file
+ moduleEntryFile = resolveFrom(process.cwd(), name);
+ if(moduleEntryFile == null) return undefined;
+ // Attempt to resolve the module
+ moduleEntry = require(moduleEntryFile);
+ } catch(err) {
+ if(err.code === 'MODULE_NOT_FOUND') return undefined;
+ }
+ }
+
+ // Resolve the location of the module's package.json file
+ var location = find_package_json(require.resolve(moduleEntryFile));
+ if(!location) {
+ throw new Error('package.json can not be located');
+ }
+
+ // Read the module file
+ var dependentOnModule = JSON.parse(fs.readFileSync(f('%s/package.json', location)));
+ // Get the version
+ var version = dependentOnModule.version;
+ // Validate if the found module satisfies the version id
+ if(semver.satisfies(version, expectedVersions) == false
+ && options.strict) {
+ var error = new Error(f('optional dependency [%s] found but version [%s] did not satisfy constraint [%s]', parts[0], version, expectedVersions));
+ error.code = 'OPTIONAL_MODULE_NOT_FOUND';
+ throw error;
+ }
+
+ // Satifies the module requirement
+ return moduleEntry;
+}
+
+require_optional.exists = function(name) {
+ try {
+ var m = require_optional(name);
+ if(m === undefined) return false;
+ return true;
+ } catch(err) {
+ return false;
+ }
+}
+
+module.exports = require_optional;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/.bin/semver b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/.bin/semver
new file mode 100644
index 0000000..d592e69
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/.bin/semver
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../semver/bin/semver" "$@"
+ ret=$?
+else
+ node "$basedir/../semver/bin/semver" "$@"
+ ret=$?
+fi
+exit $ret
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/.bin/semver.cmd b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/.bin/semver.cmd
new file mode 100644
index 0000000..eabc737
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/.bin/semver.cmd
@@ -0,0 +1,7 @@
+@IF EXIST "%~dp0\node.exe" (
+ "%~dp0\node.exe" "%~dp0\..\semver\bin\semver" %*
+) ELSE (
+ @SETLOCAL
+ @SET PATHEXT=%PATHEXT:;.JS;=;%
+ node "%~dp0\..\semver\bin\semver" %*
+) \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/index.js
new file mode 100644
index 0000000..434159f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/index.js
@@ -0,0 +1,23 @@
+'use strict';
+var path = require('path');
+var Module = require('module');
+
+module.exports = function (fromDir, moduleId) {
+ if (typeof fromDir !== 'string' || typeof moduleId !== 'string') {
+ throw new TypeError('Expected `fromDir` and `moduleId` to be a string');
+ }
+
+ fromDir = path.resolve(fromDir);
+
+ var fromFile = path.join(fromDir, 'noop.js');
+
+ try {
+ return Module._resolveFilename(moduleId, {
+ id: fromFile,
+ filename: fromFile,
+ paths: Module._nodeModulePaths(fromDir)
+ });
+ } catch (err) {
+ return null;
+ }
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/license b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/package.json
new file mode 100644
index 0000000..080176e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/package.json
@@ -0,0 +1,64 @@
+{
+ "name": "resolve-from",
+ "version": "2.0.0",
+ "description": "Resolve the path of a module like require.resolve() but from a given path",
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/resolve-from.git"
+ },
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "require",
+ "resolve",
+ "path",
+ "module",
+ "from",
+ "like",
+ "path"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "gitHead": "583e0f8df06e1bc4d1c96d8d4f2484c745f522c3",
+ "bugs": {
+ "url": "https://github.com/sindresorhus/resolve-from/issues"
+ },
+ "homepage": "https://github.com/sindresorhus/resolve-from",
+ "_id": "resolve-from@2.0.0",
+ "_shasum": "9480ab20e94ffa1d9e80a804c7ea147611966b57",
+ "_from": "resolve-from@>=2.0.0 <3.0.0",
+ "_npmVersion": "2.14.7",
+ "_nodeVersion": "4.2.1",
+ "_npmUser": {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ },
+ "dist": {
+ "shasum": "9480ab20e94ffa1d9e80a804c7ea147611966b57",
+ "tarball": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ }
+ ],
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/readme.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/readme.md
new file mode 100644
index 0000000..bb4ca91
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/readme.md
@@ -0,0 +1,58 @@
+# resolve-from [![Build Status](https://travis-ci.org/sindresorhus/resolve-from.svg?branch=master)](https://travis-ci.org/sindresorhus/resolve-from)
+
+> Resolve the path of a module like [`require.resolve()`](http://nodejs.org/api/globals.html#globals_require_resolve) but from a given path
+
+Unlike `require.resolve()` it returns `null` instead of throwing when the module can't be found.
+
+
+## Install
+
+```
+$ npm install --save resolve-from
+```
+
+
+## Usage
+
+```js
+const resolveFrom = require('resolve-from');
+
+// there's a file at `./foo/bar.js`
+
+resolveFrom('foo', './bar');
+//=> '/Users/sindresorhus/dev/test/foo/bar.js'
+```
+
+
+## API
+
+### resolveFrom(fromDir, moduleId)
+
+#### fromDir
+
+Type: `string`
+
+Directory to resolve from.
+
+#### moduleId
+
+Type: `string`
+
+What you would use in `require()`.
+
+
+## Tip
+
+Create a partial using a bound function if you want to require from the same `fromDir` multiple times:
+
+```js
+const resolveFromFoo = resolveFrom.bind(null, 'foo');
+
+resolveFromFoo('./bar');
+resolveFromFoo('./baz');
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/README.md
new file mode 100644
index 0000000..cbd9565
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/README.md
@@ -0,0 +1,350 @@
+semver(1) -- The semantic versioner for npm
+===========================================
+
+## Usage
+
+ $ npm install semver
+ $ node
+ var semver = require('semver')
+
+ semver.valid('1.2.3') // '1.2.3'
+ semver.valid('a.b.c') // null
+ semver.clean(' =v1.2.3 ') // '1.2.3'
+ semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
+ semver.gt('1.2.3', '9.8.7') // false
+ semver.lt('1.2.3', '9.8.7') // true
+
+As a command-line utility:
+
+ $ semver -h
+
+ SemVer 5.1.0
+
+ A JavaScript implementation of the http://semver.org/ specification
+ Copyright Isaac Z. Schlueter
+
+ Usage: semver [options] <version> [<version> [...]]
+ Prints valid versions sorted by SemVer precedence
+
+ Options:
+ -r --range <range>
+ Print versions that match the specified range.
+
+ -i --increment [<level>]
+ Increment a version by the specified level. Level can
+ be one of: major, minor, patch, premajor, preminor,
+ prepatch, or prerelease. Default level is 'patch'.
+ Only one version may be specified.
+
+ --preid <identifier>
+ Identifier to be used to prefix premajor, preminor,
+ prepatch or prerelease version increments.
+
+ -l --loose
+ Interpret versions and ranges loosely
+
+ Program exits successfully if any valid version satisfies
+ all supplied ranges, and prints all satisfying versions.
+
+ If no satisfying versions are found, then exits failure.
+
+ Versions are printed in ascending order, so supplying
+ multiple versions to the utility will just sort them.
+
+## Versions
+
+A "version" is described by the `v2.0.0` specification found at
+<http://semver.org/>.
+
+A leading `"="` or `"v"` character is stripped off and ignored.
+
+## Ranges
+
+A `version range` is a set of `comparators` which specify versions
+that satisfy the range.
+
+A `comparator` is composed of an `operator` and a `version`. The set
+of primitive `operators` is:
+
+* `<` Less than
+* `<=` Less than or equal to
+* `>` Greater than
+* `>=` Greater than or equal to
+* `=` Equal. If no operator is specified, then equality is assumed,
+ so this operator is optional, but MAY be included.
+
+For example, the comparator `>=1.2.7` would match the versions
+`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
+or `1.1.0`.
+
+Comparators can be joined by whitespace to form a `comparator set`,
+which is satisfied by the **intersection** of all of the comparators
+it includes.
+
+A range is composed of one or more comparator sets, joined by `||`. A
+version matches a range if and only if every comparator in at least
+one of the `||`-separated comparator sets is satisfied by the version.
+
+For example, the range `>=1.2.7 <1.3.0` would match the versions
+`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
+or `1.1.0`.
+
+The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
+`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
+
+### Prerelease Tags
+
+If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
+it will only be allowed to satisfy comparator sets if at least one
+comparator with the same `[major, minor, patch]` tuple also has a
+prerelease tag.
+
+For example, the range `>1.2.3-alpha.3` would be allowed to match the
+version `1.2.3-alpha.7`, but it would *not* be satisfied by
+`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
+than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
+range only accepts prerelease tags on the `1.2.3` version. The
+version `3.4.5` *would* satisfy the range, because it does not have a
+prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
+
+The purpose for this behavior is twofold. First, prerelease versions
+frequently are updated very quickly, and contain many breaking changes
+that are (by the author's design) not yet fit for public consumption.
+Therefore, by default, they are excluded from range matching
+semantics.
+
+Second, a user who has opted into using a prerelease version has
+clearly indicated the intent to use *that specific* set of
+alpha/beta/rc versions. By including a prerelease tag in the range,
+the user is indicating that they are aware of the risk. However, it
+is still not appropriate to assume that they have opted into taking a
+similar risk on the *next* set of prerelease versions.
+
+#### Prerelease Identifiers
+
+The method `.inc` takes an additional `identifier` string argument that
+will append the value of the string as a prerelease identifier:
+
+```javascript
+> semver.inc('1.2.3', 'prerelease', 'beta')
+'1.2.4-beta.0'
+```
+
+command-line example:
+
+```shell
+$ semver 1.2.3 -i prerelease --preid beta
+1.2.4-beta.0
+```
+
+Which then can be used to increment further:
+
+```shell
+$ semver 1.2.4-beta.0 -i prerelease
+1.2.4-beta.1
+```
+
+### Advanced Range Syntax
+
+Advanced range syntax desugars to primitive comparators in
+deterministic ways.
+
+Advanced ranges may be combined in the same way as primitive
+comparators using white space or `||`.
+
+#### Hyphen Ranges `X.Y.Z - A.B.C`
+
+Specifies an inclusive set.
+
+* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
+
+If a partial version is provided as the first version in the inclusive
+range, then the missing pieces are replaced with zeroes.
+
+* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
+
+If a partial version is provided as the second version in the
+inclusive range, then all versions that start with the supplied parts
+of the tuple are accepted, but nothing that would be greater than the
+provided tuple parts.
+
+* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
+* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
+
+#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
+
+Any of `X`, `x`, or `*` may be used to "stand in" for one of the
+numeric values in the `[major, minor, patch]` tuple.
+
+* `*` := `>=0.0.0` (Any version satisfies)
+* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
+* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
+
+A partial version range is treated as an X-Range, so the special
+character is in fact optional.
+
+* `""` (empty string) := `*` := `>=0.0.0`
+* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
+* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
+
+#### Tilde Ranges `~1.2.3` `~1.2` `~1`
+
+Allows patch-level changes if a minor version is specified on the
+comparator. Allows minor-level changes if not.
+
+* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
+* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
+* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
+* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
+* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
+* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
+* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+
+#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
+
+Allows changes that do not modify the left-most non-zero digit in the
+`[major, minor, patch]` tuple. In other words, this allows patch and
+minor updates for versions `1.0.0` and above, patch updates for
+versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
+
+Many authors treat a `0.x` version as if the `x` were the major
+"breaking-change" indicator.
+
+Caret ranges are ideal when an author may make breaking changes
+between `0.2.4` and `0.3.0` releases, which is a common practice.
+However, it presumes that there will *not* be breaking changes between
+`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
+additive (but non-breaking), according to commonly observed practices.
+
+* `^1.2.3` := `>=1.2.3 <2.0.0`
+* `^0.2.3` := `>=0.2.3 <0.3.0`
+* `^0.0.3` := `>=0.0.3 <0.0.4`
+* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
+ `0.0.3` version *only* will be allowed, if they are greater than or
+ equal to `beta`. So, `0.0.3-pr.2` would be allowed.
+
+When parsing caret ranges, a missing `patch` value desugars to the
+number `0`, but will allow flexibility within that value, even if the
+major and minor versions are both `0`.
+
+* `^1.2.x` := `>=1.2.0 <2.0.0`
+* `^0.0.x` := `>=0.0.0 <0.1.0`
+* `^0.0` := `>=0.0.0 <0.1.0`
+
+A missing `minor` and `patch` values will desugar to zero, but also
+allow flexibility within those values, even if the major version is
+zero.
+
+* `^1.x` := `>=1.0.0 <2.0.0`
+* `^0.x` := `>=0.0.0 <1.0.0`
+
+### Range Grammar
+
+Putting all this together, here is a Backus-Naur grammar for ranges,
+for the benefit of parser authors:
+
+```bnf
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
+```
+
+## Functions
+
+All methods and classes take a final `loose` boolean argument that, if
+true, will be more forgiving about not-quite-valid semver strings.
+The resulting output will always be 100% strict, of course.
+
+Strict-mode Comparators and Ranges will be strict about the SemVer
+strings that they parse.
+
+* `valid(v)`: Return the parsed version, or null if it's not valid.
+* `inc(v, release)`: Return the version incremented by the release
+ type (`major`, `premajor`, `minor`, `preminor`, `patch`,
+ `prepatch`, or `prerelease`), or null if it's not valid
+ * `premajor` in one call will bump the version up to the next major
+ version and down to a prerelease of that major version.
+ `preminor`, and `prepatch` work the same way.
+ * If called from a non-prerelease version, the `prerelease` will work the
+ same as `prepatch`. It increments the patch version, then makes a
+ prerelease. If the input version is already a prerelease it simply
+ increments it.
+* `prerelease(v)`: Returns an array of prerelease components, or null
+ if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
+* `major(v)`: Return the major version number.
+* `minor(v)`: Return the minor version number.
+* `patch(v)`: Return the patch version number.
+
+### Comparison
+
+* `gt(v1, v2)`: `v1 > v2`
+* `gte(v1, v2)`: `v1 >= v2`
+* `lt(v1, v2)`: `v1 < v2`
+* `lte(v1, v2)`: `v1 <= v2`
+* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
+ even if they're not the exact same string. You already know how to
+ compare strings.
+* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
+* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
+ the corresponding function above. `"==="` and `"!=="` do simple
+ string comparison, but are included for completeness. Throws if an
+ invalid comparison string is provided.
+* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
+ `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
+* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
+ in descending order when passed to `Array.sort()`.
+* `diff(v1, v2)`: Returns difference between two versions by the release type
+ (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
+ or null if the versions are the same.
+
+
+### Ranges
+
+* `validRange(range)`: Return the valid range or null if it's not valid
+* `satisfies(version, range)`: Return true if the version satisfies the
+ range.
+* `maxSatisfying(versions, range)`: Return the highest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `minSatisfying(versions, range)`: Return the lowest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `gtr(version, range)`: Return `true` if version is greater than all the
+ versions possible in the range.
+* `ltr(version, range)`: Return `true` if version is less than all the
+ versions possible in the range.
+* `outside(version, range, hilo)`: Return true if the version is outside
+ the bounds of the range in either the high or low direction. The
+ `hilo` argument must be either the string `'>'` or `'<'`. (This is
+ the function called by `gtr` and `ltr`.)
+
+Note that, since ranges may be non-contiguous, a version might not be
+greater than a range, less than a range, *or* satisfy a range! For
+example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
+until `2.0.0`, so the version `1.2.10` would not be greater than the
+range (because `2.0.1` satisfies, which is higher), nor less than the
+range (since `1.2.8` satisfies, which is lower), and it also does not
+satisfy the range.
+
+If you want to know if a version satisfies or does not satisfy a
+range, use the `satisfies(version, range)` function.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/bin/semver b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/bin/semver
new file mode 100644
index 0000000..c5f2e85
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/bin/semver
@@ -0,0 +1,133 @@
+#!/usr/bin/env node
+// Standalone semver comparison program.
+// Exits successfully and prints matching version(s) if
+// any supplied version is valid and passes all tests.
+
+var argv = process.argv.slice(2)
+ , versions = []
+ , range = []
+ , gt = []
+ , lt = []
+ , eq = []
+ , inc = null
+ , version = require("../package.json").version
+ , loose = false
+ , identifier = undefined
+ , semver = require("../semver")
+ , reverse = false
+
+main()
+
+function main () {
+ if (!argv.length) return help()
+ while (argv.length) {
+ var a = argv.shift()
+ var i = a.indexOf('=')
+ if (i !== -1) {
+ a = a.slice(0, i)
+ argv.unshift(a.slice(i + 1))
+ }
+ switch (a) {
+ case "-rv": case "-rev": case "--rev": case "--reverse":
+ reverse = true
+ break
+ case "-l": case "--loose":
+ loose = true
+ break
+ case "-v": case "--version":
+ versions.push(argv.shift())
+ break
+ case "-i": case "--inc": case "--increment":
+ switch (argv[0]) {
+ case "major": case "minor": case "patch": case "prerelease":
+ case "premajor": case "preminor": case "prepatch":
+ inc = argv.shift()
+ break
+ default:
+ inc = "patch"
+ break
+ }
+ break
+ case "--preid":
+ identifier = argv.shift()
+ break
+ case "-r": case "--range":
+ range.push(argv.shift())
+ break
+ case "-h": case "--help": case "-?":
+ return help()
+ default:
+ versions.push(a)
+ break
+ }
+ }
+
+ versions = versions.filter(function (v) {
+ return semver.valid(v, loose)
+ })
+ if (!versions.length) return fail()
+ if (inc && (versions.length !== 1 || range.length))
+ return failInc()
+
+ for (var i = 0, l = range.length; i < l ; i ++) {
+ versions = versions.filter(function (v) {
+ return semver.satisfies(v, range[i], loose)
+ })
+ if (!versions.length) return fail()
+ }
+ return success(versions)
+}
+
+function failInc () {
+ console.error("--inc can only be used on a single version with no range")
+ fail()
+}
+
+function fail () { process.exit(1) }
+
+function success () {
+ var compare = reverse ? "rcompare" : "compare"
+ versions.sort(function (a, b) {
+ return semver[compare](a, b, loose)
+ }).map(function (v) {
+ return semver.clean(v, loose)
+ }).map(function (v) {
+ return inc ? semver.inc(v, inc, loose, identifier) : v
+ }).forEach(function (v,i,_) { console.log(v) })
+}
+
+function help () {
+ console.log(["SemVer " + version
+ ,""
+ ,"A JavaScript implementation of the http://semver.org/ specification"
+ ,"Copyright Isaac Z. Schlueter"
+ ,""
+ ,"Usage: semver [options] <version> [<version> [...]]"
+ ,"Prints valid versions sorted by SemVer precedence"
+ ,""
+ ,"Options:"
+ ,"-r --range <range>"
+ ," Print versions that match the specified range."
+ ,""
+ ,"-i --increment [<level>]"
+ ," Increment a version by the specified level. Level can"
+ ," be one of: major, minor, patch, premajor, preminor,"
+ ," prepatch, or prerelease. Default level is 'patch'."
+ ," Only one version may be specified."
+ ,""
+ ,"--preid <identifier>"
+ ," Identifier to be used to prefix premajor, preminor,"
+ ," prepatch or prerelease version increments."
+ ,""
+ ,"-l --loose"
+ ," Interpret versions and ranges loosely"
+ ,""
+ ,"Program exits successfully if any valid version satisfies"
+ ,"all supplied ranges, and prints all satisfying versions."
+ ,""
+ ,"If no satisfying versions are found, then exits failure."
+ ,""
+ ,"Versions are printed in ascending order, so supplying"
+ ,"multiple versions to the utility will just sort them."
+ ].join("\n"))
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/package.json
new file mode 100644
index 0000000..d99bbf6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/package.json
@@ -0,0 +1,60 @@
+{
+ "name": "semver",
+ "version": "5.3.0",
+ "description": "The semantic version parser used by npm.",
+ "main": "semver.js",
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "devDependencies": {
+ "tap": "^2.0.0"
+ },
+ "license": "ISC",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/node-semver.git"
+ },
+ "bin": {
+ "semver": "./bin/semver"
+ },
+ "files": [
+ "bin",
+ "range.bnf",
+ "semver.js"
+ ],
+ "gitHead": "d21444a0658224b152ce54965d02dbe0856afb84",
+ "bugs": {
+ "url": "https://github.com/npm/node-semver/issues"
+ },
+ "homepage": "https://github.com/npm/node-semver#readme",
+ "_id": "semver@5.3.0",
+ "_shasum": "9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f",
+ "_from": "semver@>=5.1.0 <6.0.0",
+ "_npmVersion": "3.10.6",
+ "_nodeVersion": "4.4.4",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "dist": {
+ "shasum": "9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f",
+ "tarball": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "isaacs@npmjs.com"
+ },
+ {
+ "name": "othiym23",
+ "email": "ogd@aoaioxxysz.net"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/semver-5.3.0.tgz_1468515166602_0.9155273644719273"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/range.bnf b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/range.bnf
new file mode 100644
index 0000000..25ebd5c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/range.bnf
@@ -0,0 +1,16 @@
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/semver.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/semver.js
new file mode 100644
index 0000000..5f1a3c5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/semver.js
@@ -0,0 +1,1203 @@
+exports = module.exports = SemVer;
+
+// The debug function is excluded entirely from the minified version.
+/* nomin */ var debug;
+/* nomin */ if (typeof process === 'object' &&
+ /* nomin */ process.env &&
+ /* nomin */ process.env.NODE_DEBUG &&
+ /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG))
+ /* nomin */ debug = function() {
+ /* nomin */ var args = Array.prototype.slice.call(arguments, 0);
+ /* nomin */ args.unshift('SEMVER');
+ /* nomin */ console.log.apply(console, args);
+ /* nomin */ };
+/* nomin */ else
+ /* nomin */ debug = function() {};
+
+// Note: this is the semver.org version of the spec that it implements
+// Not necessarily the package version of this code.
+exports.SEMVER_SPEC_VERSION = '2.0.0';
+
+var MAX_LENGTH = 256;
+var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
+
+// The actual regexps go on exports.re
+var re = exports.re = [];
+var src = exports.src = [];
+var R = 0;
+
+// The following Regular Expressions can be used for tokenizing,
+// validating, and parsing SemVer version strings.
+
+// ## Numeric Identifier
+// A single `0`, or a non-zero digit followed by zero or more digits.
+
+var NUMERICIDENTIFIER = R++;
+src[NUMERICIDENTIFIER] = '0|[1-9]\\d*';
+var NUMERICIDENTIFIERLOOSE = R++;
+src[NUMERICIDENTIFIERLOOSE] = '[0-9]+';
+
+
+// ## Non-numeric Identifier
+// Zero or more digits, followed by a letter or hyphen, and then zero or
+// more letters, digits, or hyphens.
+
+var NONNUMERICIDENTIFIER = R++;
+src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
+
+
+// ## Main Version
+// Three dot-separated numeric identifiers.
+
+var MAINVERSION = R++;
+src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')';
+
+var MAINVERSIONLOOSE = R++;
+src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')';
+
+// ## Pre-release Version Identifier
+// A numeric identifier, or a non-numeric identifier.
+
+var PRERELEASEIDENTIFIER = R++;
+src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')';
+
+var PRERELEASEIDENTIFIERLOOSE = R++;
+src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')';
+
+
+// ## Pre-release Version
+// Hyphen, followed by one or more dot-separated pre-release version
+// identifiers.
+
+var PRERELEASE = R++;
+src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))';
+
+var PRERELEASELOOSE = R++;
+src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))';
+
+// ## Build Metadata Identifier
+// Any combination of digits, letters, or hyphens.
+
+var BUILDIDENTIFIER = R++;
+src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
+
+// ## Build Metadata
+// Plus sign, followed by one or more period-separated build metadata
+// identifiers.
+
+var BUILD = R++;
+src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
+ '(?:\\.' + src[BUILDIDENTIFIER] + ')*))';
+
+
+// ## Full Version String
+// A main version, followed optionally by a pre-release version and
+// build metadata.
+
+// Note that the only major, minor, patch, and pre-release sections of
+// the version string are capturing groups. The build metadata is not a
+// capturing group, because it should not ever be used in version
+// comparison.
+
+var FULL = R++;
+var FULLPLAIN = 'v?' + src[MAINVERSION] +
+ src[PRERELEASE] + '?' +
+ src[BUILD] + '?';
+
+src[FULL] = '^' + FULLPLAIN + '$';
+
+// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
+// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
+// common in the npm registry.
+var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
+ src[PRERELEASELOOSE] + '?' +
+ src[BUILD] + '?';
+
+var LOOSE = R++;
+src[LOOSE] = '^' + LOOSEPLAIN + '$';
+
+var GTLT = R++;
+src[GTLT] = '((?:<|>)?=?)';
+
+// Something like "2.*" or "1.2.x".
+// Note that "x.x" is a valid xRange identifer, meaning "any version"
+// Only the first item is strictly required.
+var XRANGEIDENTIFIERLOOSE = R++;
+src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
+var XRANGEIDENTIFIER = R++;
+src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*';
+
+var XRANGEPLAIN = R++;
+src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:' + src[PRERELEASE] + ')?' +
+ src[BUILD] + '?' +
+ ')?)?';
+
+var XRANGEPLAINLOOSE = R++;
+src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:' + src[PRERELEASELOOSE] + ')?' +
+ src[BUILD] + '?' +
+ ')?)?';
+
+var XRANGE = R++;
+src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$';
+var XRANGELOOSE = R++;
+src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$';
+
+// Tilde ranges.
+// Meaning is "reasonably at or greater than"
+var LONETILDE = R++;
+src[LONETILDE] = '(?:~>?)';
+
+var TILDETRIM = R++;
+src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+';
+re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g');
+var tildeTrimReplace = '$1~';
+
+var TILDE = R++;
+src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';
+var TILDELOOSE = R++;
+src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$';
+
+// Caret ranges.
+// Meaning is "at least and backwards compatible with"
+var LONECARET = R++;
+src[LONECARET] = '(?:\\^)';
+
+var CARETTRIM = R++;
+src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+';
+re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g');
+var caretTrimReplace = '$1^';
+
+var CARET = R++;
+src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$';
+var CARETLOOSE = R++;
+src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$';
+
+// A simple gt/lt/eq thing, or just "" to indicate "any version"
+var COMPARATORLOOSE = R++;
+src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$';
+var COMPARATOR = R++;
+src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$';
+
+
+// An expression to strip any whitespace between the gtlt and the thing
+// it modifies, so that `> 1.2.3` ==> `>1.2.3`
+var COMPARATORTRIM = R++;
+src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
+ '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')';
+
+// this one has to use the /g flag
+re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');
+var comparatorTrimReplace = '$1$2$3';
+
+
+// Something like `1.2.3 - 1.2.4`
+// Note that these all use the loose form, because they'll be
+// checked against either the strict or loose comparator form
+// later.
+var HYPHENRANGE = R++;
+src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAIN] + ')' +
+ '\\s*$';
+
+var HYPHENRANGELOOSE = R++;
+src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s*$';
+
+// Star ranges basically just allow anything at all.
+var STAR = R++;
+src[STAR] = '(<|>)?=?\\s*\\*';
+
+// Compile to actual regexp objects.
+// All are flag-free, unless they were created above with a flag.
+for (var i = 0; i < R; i++) {
+ debug(i, src[i]);
+ if (!re[i])
+ re[i] = new RegExp(src[i]);
+}
+
+exports.parse = parse;
+function parse(version, loose) {
+ if (version instanceof SemVer)
+ return version;
+
+ if (typeof version !== 'string')
+ return null;
+
+ if (version.length > MAX_LENGTH)
+ return null;
+
+ var r = loose ? re[LOOSE] : re[FULL];
+ if (!r.test(version))
+ return null;
+
+ try {
+ return new SemVer(version, loose);
+ } catch (er) {
+ return null;
+ }
+}
+
+exports.valid = valid;
+function valid(version, loose) {
+ var v = parse(version, loose);
+ return v ? v.version : null;
+}
+
+
+exports.clean = clean;
+function clean(version, loose) {
+ var s = parse(version.trim().replace(/^[=v]+/, ''), loose);
+ return s ? s.version : null;
+}
+
+exports.SemVer = SemVer;
+
+function SemVer(version, loose) {
+ if (version instanceof SemVer) {
+ if (version.loose === loose)
+ return version;
+ else
+ version = version.version;
+ } else if (typeof version !== 'string') {
+ throw new TypeError('Invalid Version: ' + version);
+ }
+
+ if (version.length > MAX_LENGTH)
+ throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
+
+ if (!(this instanceof SemVer))
+ return new SemVer(version, loose);
+
+ debug('SemVer', version, loose);
+ this.loose = loose;
+ var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);
+
+ if (!m)
+ throw new TypeError('Invalid Version: ' + version);
+
+ this.raw = version;
+
+ // these are actually numbers
+ this.major = +m[1];
+ this.minor = +m[2];
+ this.patch = +m[3];
+
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0)
+ throw new TypeError('Invalid major version')
+
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)
+ throw new TypeError('Invalid minor version')
+
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)
+ throw new TypeError('Invalid patch version')
+
+ // numberify any prerelease numeric ids
+ if (!m[4])
+ this.prerelease = [];
+ else
+ this.prerelease = m[4].split('.').map(function(id) {
+ if (/^[0-9]+$/.test(id)) {
+ var num = +id;
+ if (num >= 0 && num < MAX_SAFE_INTEGER)
+ return num;
+ }
+ return id;
+ });
+
+ this.build = m[5] ? m[5].split('.') : [];
+ this.format();
+}
+
+SemVer.prototype.format = function() {
+ this.version = this.major + '.' + this.minor + '.' + this.patch;
+ if (this.prerelease.length)
+ this.version += '-' + this.prerelease.join('.');
+ return this.version;
+};
+
+SemVer.prototype.toString = function() {
+ return this.version;
+};
+
+SemVer.prototype.compare = function(other) {
+ debug('SemVer.compare', this.version, this.loose, other);
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ return this.compareMain(other) || this.comparePre(other);
+};
+
+SemVer.prototype.compareMain = function(other) {
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ return compareIdentifiers(this.major, other.major) ||
+ compareIdentifiers(this.minor, other.minor) ||
+ compareIdentifiers(this.patch, other.patch);
+};
+
+SemVer.prototype.comparePre = function(other) {
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ // NOT having a prerelease is > having one
+ if (this.prerelease.length && !other.prerelease.length)
+ return -1;
+ else if (!this.prerelease.length && other.prerelease.length)
+ return 1;
+ else if (!this.prerelease.length && !other.prerelease.length)
+ return 0;
+
+ var i = 0;
+ do {
+ var a = this.prerelease[i];
+ var b = other.prerelease[i];
+ debug('prerelease compare', i, a, b);
+ if (a === undefined && b === undefined)
+ return 0;
+ else if (b === undefined)
+ return 1;
+ else if (a === undefined)
+ return -1;
+ else if (a === b)
+ continue;
+ else
+ return compareIdentifiers(a, b);
+ } while (++i);
+};
+
+// preminor will bump the version up to the next minor release, and immediately
+// down to pre-release. premajor and prepatch work the same way.
+SemVer.prototype.inc = function(release, identifier) {
+ switch (release) {
+ case 'premajor':
+ this.prerelease.length = 0;
+ this.patch = 0;
+ this.minor = 0;
+ this.major++;
+ this.inc('pre', identifier);
+ break;
+ case 'preminor':
+ this.prerelease.length = 0;
+ this.patch = 0;
+ this.minor++;
+ this.inc('pre', identifier);
+ break;
+ case 'prepatch':
+ // If this is already a prerelease, it will bump to the next version
+ // drop any prereleases that might already exist, since they are not
+ // relevant at this point.
+ this.prerelease.length = 0;
+ this.inc('patch', identifier);
+ this.inc('pre', identifier);
+ break;
+ // If the input is a non-prerelease version, this acts the same as
+ // prepatch.
+ case 'prerelease':
+ if (this.prerelease.length === 0)
+ this.inc('patch', identifier);
+ this.inc('pre', identifier);
+ break;
+
+ case 'major':
+ // If this is a pre-major version, bump up to the same major version.
+ // Otherwise increment major.
+ // 1.0.0-5 bumps to 1.0.0
+ // 1.1.0 bumps to 2.0.0
+ if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0)
+ this.major++;
+ this.minor = 0;
+ this.patch = 0;
+ this.prerelease = [];
+ break;
+ case 'minor':
+ // If this is a pre-minor version, bump up to the same minor version.
+ // Otherwise increment minor.
+ // 1.2.0-5 bumps to 1.2.0
+ // 1.2.1 bumps to 1.3.0
+ if (this.patch !== 0 || this.prerelease.length === 0)
+ this.minor++;
+ this.patch = 0;
+ this.prerelease = [];
+ break;
+ case 'patch':
+ // If this is not a pre-release version, it will increment the patch.
+ // If it is a pre-release it will bump up to the same patch version.
+ // 1.2.0-5 patches to 1.2.0
+ // 1.2.0 patches to 1.2.1
+ if (this.prerelease.length === 0)
+ this.patch++;
+ this.prerelease = [];
+ break;
+ // This probably shouldn't be used publicly.
+ // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
+ case 'pre':
+ if (this.prerelease.length === 0)
+ this.prerelease = [0];
+ else {
+ var i = this.prerelease.length;
+ while (--i >= 0) {
+ if (typeof this.prerelease[i] === 'number') {
+ this.prerelease[i]++;
+ i = -2;
+ }
+ }
+ if (i === -1) // didn't increment anything
+ this.prerelease.push(0);
+ }
+ if (identifier) {
+ // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
+ // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
+ if (this.prerelease[0] === identifier) {
+ if (isNaN(this.prerelease[1]))
+ this.prerelease = [identifier, 0];
+ } else
+ this.prerelease = [identifier, 0];
+ }
+ break;
+
+ default:
+ throw new Error('invalid increment argument: ' + release);
+ }
+ this.format();
+ this.raw = this.version;
+ return this;
+};
+
+exports.inc = inc;
+function inc(version, release, loose, identifier) {
+ if (typeof(loose) === 'string') {
+ identifier = loose;
+ loose = undefined;
+ }
+
+ try {
+ return new SemVer(version, loose).inc(release, identifier).version;
+ } catch (er) {
+ return null;
+ }
+}
+
+exports.diff = diff;
+function diff(version1, version2) {
+ if (eq(version1, version2)) {
+ return null;
+ } else {
+ var v1 = parse(version1);
+ var v2 = parse(version2);
+ if (v1.prerelease.length || v2.prerelease.length) {
+ for (var key in v1) {
+ if (key === 'major' || key === 'minor' || key === 'patch') {
+ if (v1[key] !== v2[key]) {
+ return 'pre'+key;
+ }
+ }
+ }
+ return 'prerelease';
+ }
+ for (var key in v1) {
+ if (key === 'major' || key === 'minor' || key === 'patch') {
+ if (v1[key] !== v2[key]) {
+ return key;
+ }
+ }
+ }
+ }
+}
+
+exports.compareIdentifiers = compareIdentifiers;
+
+var numeric = /^[0-9]+$/;
+function compareIdentifiers(a, b) {
+ var anum = numeric.test(a);
+ var bnum = numeric.test(b);
+
+ if (anum && bnum) {
+ a = +a;
+ b = +b;
+ }
+
+ return (anum && !bnum) ? -1 :
+ (bnum && !anum) ? 1 :
+ a < b ? -1 :
+ a > b ? 1 :
+ 0;
+}
+
+exports.rcompareIdentifiers = rcompareIdentifiers;
+function rcompareIdentifiers(a, b) {
+ return compareIdentifiers(b, a);
+}
+
+exports.major = major;
+function major(a, loose) {
+ return new SemVer(a, loose).major;
+}
+
+exports.minor = minor;
+function minor(a, loose) {
+ return new SemVer(a, loose).minor;
+}
+
+exports.patch = patch;
+function patch(a, loose) {
+ return new SemVer(a, loose).patch;
+}
+
+exports.compare = compare;
+function compare(a, b, loose) {
+ return new SemVer(a, loose).compare(b);
+}
+
+exports.compareLoose = compareLoose;
+function compareLoose(a, b) {
+ return compare(a, b, true);
+}
+
+exports.rcompare = rcompare;
+function rcompare(a, b, loose) {
+ return compare(b, a, loose);
+}
+
+exports.sort = sort;
+function sort(list, loose) {
+ return list.sort(function(a, b) {
+ return exports.compare(a, b, loose);
+ });
+}
+
+exports.rsort = rsort;
+function rsort(list, loose) {
+ return list.sort(function(a, b) {
+ return exports.rcompare(a, b, loose);
+ });
+}
+
+exports.gt = gt;
+function gt(a, b, loose) {
+ return compare(a, b, loose) > 0;
+}
+
+exports.lt = lt;
+function lt(a, b, loose) {
+ return compare(a, b, loose) < 0;
+}
+
+exports.eq = eq;
+function eq(a, b, loose) {
+ return compare(a, b, loose) === 0;
+}
+
+exports.neq = neq;
+function neq(a, b, loose) {
+ return compare(a, b, loose) !== 0;
+}
+
+exports.gte = gte;
+function gte(a, b, loose) {
+ return compare(a, b, loose) >= 0;
+}
+
+exports.lte = lte;
+function lte(a, b, loose) {
+ return compare(a, b, loose) <= 0;
+}
+
+exports.cmp = cmp;
+function cmp(a, op, b, loose) {
+ var ret;
+ switch (op) {
+ case '===':
+ if (typeof a === 'object') a = a.version;
+ if (typeof b === 'object') b = b.version;
+ ret = a === b;
+ break;
+ case '!==':
+ if (typeof a === 'object') a = a.version;
+ if (typeof b === 'object') b = b.version;
+ ret = a !== b;
+ break;
+ case '': case '=': case '==': ret = eq(a, b, loose); break;
+ case '!=': ret = neq(a, b, loose); break;
+ case '>': ret = gt(a, b, loose); break;
+ case '>=': ret = gte(a, b, loose); break;
+ case '<': ret = lt(a, b, loose); break;
+ case '<=': ret = lte(a, b, loose); break;
+ default: throw new TypeError('Invalid operator: ' + op);
+ }
+ return ret;
+}
+
+exports.Comparator = Comparator;
+function Comparator(comp, loose) {
+ if (comp instanceof Comparator) {
+ if (comp.loose === loose)
+ return comp;
+ else
+ comp = comp.value;
+ }
+
+ if (!(this instanceof Comparator))
+ return new Comparator(comp, loose);
+
+ debug('comparator', comp, loose);
+ this.loose = loose;
+ this.parse(comp);
+
+ if (this.semver === ANY)
+ this.value = '';
+ else
+ this.value = this.operator + this.semver.version;
+
+ debug('comp', this);
+}
+
+var ANY = {};
+Comparator.prototype.parse = function(comp) {
+ var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
+ var m = comp.match(r);
+
+ if (!m)
+ throw new TypeError('Invalid comparator: ' + comp);
+
+ this.operator = m[1];
+ if (this.operator === '=')
+ this.operator = '';
+
+ // if it literally is just '>' or '' then allow anything.
+ if (!m[2])
+ this.semver = ANY;
+ else
+ this.semver = new SemVer(m[2], this.loose);
+};
+
+Comparator.prototype.toString = function() {
+ return this.value;
+};
+
+Comparator.prototype.test = function(version) {
+ debug('Comparator.test', version, this.loose);
+
+ if (this.semver === ANY)
+ return true;
+
+ if (typeof version === 'string')
+ version = new SemVer(version, this.loose);
+
+ return cmp(version, this.operator, this.semver, this.loose);
+};
+
+
+exports.Range = Range;
+function Range(range, loose) {
+ if ((range instanceof Range) && range.loose === loose)
+ return range;
+
+ if (!(this instanceof Range))
+ return new Range(range, loose);
+
+ this.loose = loose;
+
+ // First, split based on boolean or ||
+ this.raw = range;
+ this.set = range.split(/\s*\|\|\s*/).map(function(range) {
+ return this.parseRange(range.trim());
+ }, this).filter(function(c) {
+ // throw out any that are not relevant for whatever reason
+ return c.length;
+ });
+
+ if (!this.set.length) {
+ throw new TypeError('Invalid SemVer Range: ' + range);
+ }
+
+ this.format();
+}
+
+Range.prototype.format = function() {
+ this.range = this.set.map(function(comps) {
+ return comps.join(' ').trim();
+ }).join('||').trim();
+ return this.range;
+};
+
+Range.prototype.toString = function() {
+ return this.range;
+};
+
+Range.prototype.parseRange = function(range) {
+ var loose = this.loose;
+ range = range.trim();
+ debug('range', range, loose);
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
+ var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
+ range = range.replace(hr, hyphenReplace);
+ debug('hyphen replace', range);
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
+ range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);
+ debug('comparator trim', range, re[COMPARATORTRIM]);
+
+ // `~ 1.2.3` => `~1.2.3`
+ range = range.replace(re[TILDETRIM], tildeTrimReplace);
+
+ // `^ 1.2.3` => `^1.2.3`
+ range = range.replace(re[CARETTRIM], caretTrimReplace);
+
+ // normalize spaces
+ range = range.split(/\s+/).join(' ');
+
+ // At this point, the range is completely trimmed and
+ // ready to be split into comparators.
+
+ var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
+ var set = range.split(' ').map(function(comp) {
+ return parseComparator(comp, loose);
+ }).join(' ').split(/\s+/);
+ if (this.loose) {
+ // in loose mode, throw out any that are not valid comparators
+ set = set.filter(function(comp) {
+ return !!comp.match(compRe);
+ });
+ }
+ set = set.map(function(comp) {
+ return new Comparator(comp, loose);
+ });
+
+ return set;
+};
+
+// Mostly just for testing and legacy API reasons
+exports.toComparators = toComparators;
+function toComparators(range, loose) {
+ return new Range(range, loose).set.map(function(comp) {
+ return comp.map(function(c) {
+ return c.value;
+ }).join(' ').trim().split(' ');
+ });
+}
+
+// comprised of xranges, tildes, stars, and gtlt's at this point.
+// already replaced the hyphen ranges
+// turn into a set of JUST comparators.
+function parseComparator(comp, loose) {
+ debug('comp', comp);
+ comp = replaceCarets(comp, loose);
+ debug('caret', comp);
+ comp = replaceTildes(comp, loose);
+ debug('tildes', comp);
+ comp = replaceXRanges(comp, loose);
+ debug('xrange', comp);
+ comp = replaceStars(comp, loose);
+ debug('stars', comp);
+ return comp;
+}
+
+function isX(id) {
+ return !id || id.toLowerCase() === 'x' || id === '*';
+}
+
+// ~, ~> --> * (any, kinda silly)
+// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
+// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
+// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
+// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
+// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
+function replaceTildes(comp, loose) {
+ return comp.trim().split(/\s+/).map(function(comp) {
+ return replaceTilde(comp, loose);
+ }).join(' ');
+}
+
+function replaceTilde(comp, loose) {
+ var r = loose ? re[TILDELOOSE] : re[TILDE];
+ return comp.replace(r, function(_, M, m, p, pr) {
+ debug('tilde', comp, _, M, m, p, pr);
+ var ret;
+
+ if (isX(M))
+ ret = '';
+ else if (isX(m))
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
+ else if (isX(p))
+ // ~1.2 == >=1.2.0 <1.3.0
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
+ else if (pr) {
+ debug('replaceTilde pr', pr);
+ if (pr.charAt(0) !== '-')
+ pr = '-' + pr;
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + M + '.' + (+m + 1) + '.0';
+ } else
+ // ~1.2.3 == >=1.2.3 <1.3.0
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + (+m + 1) + '.0';
+
+ debug('tilde return', ret);
+ return ret;
+ });
+}
+
+// ^ --> * (any, kinda silly)
+// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
+// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
+// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
+// ^1.2.3 --> >=1.2.3 <2.0.0
+// ^1.2.0 --> >=1.2.0 <2.0.0
+function replaceCarets(comp, loose) {
+ return comp.trim().split(/\s+/).map(function(comp) {
+ return replaceCaret(comp, loose);
+ }).join(' ');
+}
+
+function replaceCaret(comp, loose) {
+ debug('caret', comp, loose);
+ var r = loose ? re[CARETLOOSE] : re[CARET];
+ return comp.replace(r, function(_, M, m, p, pr) {
+ debug('caret', comp, _, M, m, p, pr);
+ var ret;
+
+ if (isX(M))
+ ret = '';
+ else if (isX(m))
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
+ else if (isX(p)) {
+ if (M === '0')
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
+ else
+ ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
+ } else if (pr) {
+ debug('replaceCaret pr', pr);
+ if (pr.charAt(0) !== '-')
+ pr = '-' + pr;
+ if (M === '0') {
+ if (m === '0')
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + M + '.' + m + '.' + (+p + 1);
+ else
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + M + '.' + (+m + 1) + '.0';
+ } else
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + (+M + 1) + '.0.0';
+ } else {
+ debug('no pr');
+ if (M === '0') {
+ if (m === '0')
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + m + '.' + (+p + 1);
+ else
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + (+m + 1) + '.0';
+ } else
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + (+M + 1) + '.0.0';
+ }
+
+ debug('caret return', ret);
+ return ret;
+ });
+}
+
+function replaceXRanges(comp, loose) {
+ debug('replaceXRanges', comp, loose);
+ return comp.split(/\s+/).map(function(comp) {
+ return replaceXRange(comp, loose);
+ }).join(' ');
+}
+
+function replaceXRange(comp, loose) {
+ comp = comp.trim();
+ var r = loose ? re[XRANGELOOSE] : re[XRANGE];
+ return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
+ debug('xRange', comp, ret, gtlt, M, m, p, pr);
+ var xM = isX(M);
+ var xm = xM || isX(m);
+ var xp = xm || isX(p);
+ var anyX = xp;
+
+ if (gtlt === '=' && anyX)
+ gtlt = '';
+
+ if (xM) {
+ if (gtlt === '>' || gtlt === '<') {
+ // nothing is allowed
+ ret = '<0.0.0';
+ } else {
+ // nothing is forbidden
+ ret = '*';
+ }
+ } else if (gtlt && anyX) {
+ // replace X with 0
+ if (xm)
+ m = 0;
+ if (xp)
+ p = 0;
+
+ if (gtlt === '>') {
+ // >1 => >=2.0.0
+ // >1.2 => >=1.3.0
+ // >1.2.3 => >= 1.2.4
+ gtlt = '>=';
+ if (xm) {
+ M = +M + 1;
+ m = 0;
+ p = 0;
+ } else if (xp) {
+ m = +m + 1;
+ p = 0;
+ }
+ } else if (gtlt === '<=') {
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
+ gtlt = '<';
+ if (xm)
+ M = +M + 1;
+ else
+ m = +m + 1;
+ }
+
+ ret = gtlt + M + '.' + m + '.' + p;
+ } else if (xm) {
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
+ } else if (xp) {
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
+ }
+
+ debug('xRange return', ret);
+
+ return ret;
+ });
+}
+
+// Because * is AND-ed with everything else in the comparator,
+// and '' means "any version", just remove the *s entirely.
+function replaceStars(comp, loose) {
+ debug('replaceStars', comp, loose);
+ // Looseness is ignored here. star is always as loose as it gets!
+ return comp.trim().replace(re[STAR], '');
+}
+
+// This function is passed to string.replace(re[HYPHENRANGE])
+// M, m, patch, prerelease, build
+// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
+// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
+// 1.2 - 3.4 => >=1.2.0 <3.5.0
+function hyphenReplace($0,
+ from, fM, fm, fp, fpr, fb,
+ to, tM, tm, tp, tpr, tb) {
+
+ if (isX(fM))
+ from = '';
+ else if (isX(fm))
+ from = '>=' + fM + '.0.0';
+ else if (isX(fp))
+ from = '>=' + fM + '.' + fm + '.0';
+ else
+ from = '>=' + from;
+
+ if (isX(tM))
+ to = '';
+ else if (isX(tm))
+ to = '<' + (+tM + 1) + '.0.0';
+ else if (isX(tp))
+ to = '<' + tM + '.' + (+tm + 1) + '.0';
+ else if (tpr)
+ to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
+ else
+ to = '<=' + to;
+
+ return (from + ' ' + to).trim();
+}
+
+
+// if ANY of the sets match ALL of its comparators, then pass
+Range.prototype.test = function(version) {
+ if (!version)
+ return false;
+
+ if (typeof version === 'string')
+ version = new SemVer(version, this.loose);
+
+ for (var i = 0; i < this.set.length; i++) {
+ if (testSet(this.set[i], version))
+ return true;
+ }
+ return false;
+};
+
+function testSet(set, version) {
+ for (var i = 0; i < set.length; i++) {
+ if (!set[i].test(version))
+ return false;
+ }
+
+ if (version.prerelease.length) {
+ // Find the set of versions that are allowed to have prereleases
+ // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
+ // That should allow `1.2.3-pr.2` to pass.
+ // However, `1.2.4-alpha.notready` should NOT be allowed,
+ // even though it's within the range set by the comparators.
+ for (var i = 0; i < set.length; i++) {
+ debug(set[i].semver);
+ if (set[i].semver === ANY)
+ continue;
+
+ if (set[i].semver.prerelease.length > 0) {
+ var allowed = set[i].semver;
+ if (allowed.major === version.major &&
+ allowed.minor === version.minor &&
+ allowed.patch === version.patch)
+ return true;
+ }
+ }
+
+ // Version has a -pre, but it's not one of the ones we like.
+ return false;
+ }
+
+ return true;
+}
+
+exports.satisfies = satisfies;
+function satisfies(version, range, loose) {
+ try {
+ range = new Range(range, loose);
+ } catch (er) {
+ return false;
+ }
+ return range.test(version);
+}
+
+exports.maxSatisfying = maxSatisfying;
+function maxSatisfying(versions, range, loose) {
+ return versions.filter(function(version) {
+ return satisfies(version, range, loose);
+ }).sort(function(a, b) {
+ return rcompare(a, b, loose);
+ })[0] || null;
+}
+
+exports.minSatisfying = minSatisfying;
+function minSatisfying(versions, range, loose) {
+ return versions.filter(function(version) {
+ return satisfies(version, range, loose);
+ }).sort(function(a, b) {
+ return compare(a, b, loose);
+ })[0] || null;
+}
+
+exports.validRange = validRange;
+function validRange(range, loose) {
+ try {
+ // Return '*' instead of '' so that truthiness works.
+ // This will throw if it's invalid anyway
+ return new Range(range, loose).range || '*';
+ } catch (er) {
+ return null;
+ }
+}
+
+// Determine if version is less than all the versions possible in the range
+exports.ltr = ltr;
+function ltr(version, range, loose) {
+ return outside(version, range, '<', loose);
+}
+
+// Determine if version is greater than all the versions possible in the range.
+exports.gtr = gtr;
+function gtr(version, range, loose) {
+ return outside(version, range, '>', loose);
+}
+
+exports.outside = outside;
+function outside(version, range, hilo, loose) {
+ version = new SemVer(version, loose);
+ range = new Range(range, loose);
+
+ var gtfn, ltefn, ltfn, comp, ecomp;
+ switch (hilo) {
+ case '>':
+ gtfn = gt;
+ ltefn = lte;
+ ltfn = lt;
+ comp = '>';
+ ecomp = '>=';
+ break;
+ case '<':
+ gtfn = lt;
+ ltefn = gte;
+ ltfn = gt;
+ comp = '<';
+ ecomp = '<=';
+ break;
+ default:
+ throw new TypeError('Must provide a hilo val of "<" or ">"');
+ }
+
+ // If it satisifes the range it is not outside
+ if (satisfies(version, range, loose)) {
+ return false;
+ }
+
+ // From now on, variable terms are as if we're in "gtr" mode.
+ // but note that everything is flipped for the "ltr" function.
+
+ for (var i = 0; i < range.set.length; ++i) {
+ var comparators = range.set[i];
+
+ var high = null;
+ var low = null;
+
+ comparators.forEach(function(comparator) {
+ if (comparator.semver === ANY) {
+ comparator = new Comparator('>=0.0.0')
+ }
+ high = high || comparator;
+ low = low || comparator;
+ if (gtfn(comparator.semver, high.semver, loose)) {
+ high = comparator;
+ } else if (ltfn(comparator.semver, low.semver, loose)) {
+ low = comparator;
+ }
+ });
+
+ // If the edge version comparator has a operator then our version
+ // isn't outside it
+ if (high.operator === comp || high.operator === ecomp) {
+ return false;
+ }
+
+ // If the lowest version comparator has an operator and our version
+ // is less than it then it isn't higher than the range
+ if ((!low.operator || low.operator === comp) &&
+ ltefn(version, low.semver)) {
+ return false;
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+exports.prerelease = prerelease;
+function prerelease(version, loose) {
+ var parsed = parse(version, loose);
+ return (parsed && parsed.prerelease.length) ? parsed.prerelease : null;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/package.json
new file mode 100644
index 0000000..3718c61
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/package.json
@@ -0,0 +1,69 @@
+{
+ "name": "require_optional",
+ "version": "1.0.0",
+ "description": "Allows you declare optionalPeerDependencies that can be satisfied by the top level module but ignored if they are not.",
+ "main": "index.js",
+ "scripts": {
+ "test": "mocha"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/christkv/require_optional.git"
+ },
+ "keywords": [
+ "optional",
+ "require",
+ "optionalPeerDependencies"
+ ],
+ "author": {
+ "name": "Christian Kvalheim Amor"
+ },
+ "license": "Apache-2.0",
+ "bugs": {
+ "url": "https://github.com/christkv/require_optional/issues"
+ },
+ "homepage": "https://github.com/christkv/require_optional",
+ "dependencies": {
+ "semver": "^5.1.0",
+ "resolve-from": "^2.0.0"
+ },
+ "devDependencies": {
+ "bson": "0.4.21",
+ "co": "4.6.0",
+ "es6-promise": "^3.0.2",
+ "mocha": "^2.4.5"
+ },
+ "peerOptionalDependencies": {
+ "co": ">=5.6.0",
+ "es6-promise": "^3.0.2",
+ "es6-promise2": "^4.0.2",
+ "bson": "0.4.21"
+ },
+ "gitHead": "8eac964c8e31166a8fb483d0d56025b185cee03f",
+ "_id": "require_optional@1.0.0",
+ "_shasum": "52a86137a849728eb60a55533617f8f914f59abf",
+ "_from": "require_optional@>=1.0.0 <1.1.0",
+ "_npmVersion": "2.14.12",
+ "_nodeVersion": "4.2.4",
+ "_npmUser": {
+ "name": "christkv",
+ "email": "christkv@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "christkv",
+ "email": "christkv@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "52a86137a849728eb60a55533617f8f914f59abf",
+ "tarball": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.0.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-5-east.internal.npmjs.com",
+ "tmp": "tmp/require_optional-1.0.0.tgz_1454503936164_0.7571216486394405"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/test/require_optional_tests.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/test/require_optional_tests.js
new file mode 100644
index 0000000..181d834
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/test/require_optional_tests.js
@@ -0,0 +1,42 @@
+var assert = require('assert'),
+ require_optional = require('../');
+
+describe('Require Optional', function() {
+ describe('top level require', function() {
+ it('should correctly require co library', function() {
+ var promise = require_optional('es6-promise');
+ assert.ok(promise);
+ });
+
+ it('should fail to require es6-promise library', function() {
+ try {
+ require_optional('co');
+ } catch(e) {
+ assert.equal('OPTIONAL_MODULE_NOT_FOUND', e.code);
+ return;
+ }
+
+ assert.ok(false);
+ });
+
+ it('should ignore optional library not defined', function() {
+ assert.equal(undefined, require_optional('es6-promise2'));
+ });
+ });
+
+ describe('internal module file require', function() {
+ it('should correctly require co library', function() {
+ var Long = require_optional('bson/lib/bson/long.js');
+ assert.ok(Long);
+ });
+ });
+
+ describe('top level resolve', function() {
+ it('should correctly use exists method', function() {
+ assert.equal(false, require_optional.exists('co'));
+ assert.equal(true, require_optional.exists('es6-promise'));
+ assert.equal(true, require_optional.exists('bson/lib/bson/long.js'));
+ assert.equal(false, require_optional.exists('es6-promise2'));
+ });
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/package.json
new file mode 100644
index 0000000..2e97054
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/package.json
@@ -0,0 +1,77 @@
+{
+ "name": "mongodb-core",
+ "version": "2.1.2",
+ "description": "Core MongoDB driver functionality, no bells and whistles and meant for integration not end applications",
+ "main": "index.js",
+ "scripts": {
+ "test": "node test/runner.js -t functional",
+ "coverage": "nyc node test/runner.js -t functional -l && node_modules/.bin/nyc report --reporter=text-lcov | node_modules/.bin/coveralls",
+ "lint": "eslint lib"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/christkv/mongodb-core.git"
+ },
+ "keywords": [
+ "mongodb",
+ "core"
+ ],
+ "dependencies": {
+ "bson": "~1.0.1",
+ "require_optional": "~1.0.0"
+ },
+ "devDependencies": {
+ "co": "^4.5.4",
+ "coveralls": "^2.11.6",
+ "es6-promise": "^3.0.2",
+ "gleak": "0.5.0",
+ "integra": "0.1.8",
+ "jsdoc": "3.3.0-alpha8",
+ "mkdirp": "0.5.0",
+ "mongodb-topology-manager": "1.0.6",
+ "mongodb-version-manager": "github:christkv/mongodb-version-manager#master",
+ "nyc": "^5.5.0",
+ "optimist": "latest",
+ "rimraf": "2.2.6",
+ "semver": "4.1.0"
+ },
+ "peerOptionalDependencies": {
+ "kerberos": "~0.0",
+ "bson-ext": "1.0.1"
+ },
+ "author": {
+ "name": "Christian Kvalheim"
+ },
+ "license": "Apache-2.0",
+ "bugs": {
+ "url": "https://github.com/christkv/mongodb-core/issues"
+ },
+ "homepage": "https://github.com/christkv/mongodb-core",
+ "gitHead": "6783e5ac19a0374dfe0e8becf77ac95ed0ab3b97",
+ "_id": "mongodb-core@2.1.2",
+ "_shasum": "a11db773d34819cbeb97751241827137ab535aab",
+ "_from": "mongodb-core@2.1.2",
+ "_npmVersion": "3.10.8",
+ "_nodeVersion": "6.9.1",
+ "_npmUser": {
+ "name": "christkv",
+ "email": "christkv@gmail.com"
+ },
+ "dist": {
+ "shasum": "a11db773d34819cbeb97751241827137ab535aab",
+ "tarball": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-2.1.2.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "christkv",
+ "email": "christkv@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/mongodb-core-2.1.2.tgz_1481385289831_0.8470144462771714"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-2.1.2.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/simple_2_document_limit_toArray.dat b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/simple_2_document_limit_toArray.dat
new file mode 100644
index 0000000..25ccf0b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/simple_2_document_limit_toArray.dat
@@ -0,0 +1,11000 @@
+1 2
+2 1
+3 0
+4 0
+5 1
+6 0
+7 0
+8 0
+9 0
+10 1
+11 0
+12 0
+13 0
+14 1
+15 0
+16 0
+17 0
+18 1
+19 0
+20 0
+21 0
+22 1
+23 0
+24 0
+25 0
+26 0
+27 1
+28 0
+29 0
+30 0
+31 1
+32 0
+33 0
+34 0
+35 0
+36 0
+37 1
+38 0
+39 0
+40 0
+41 0
+42 0
+43 1
+44 0
+45 0
+46 0
+47 0
+48 0
+49 0
+50 0
+51 0
+52 0
+53 0
+54 0
+55 0
+56 0
+57 0
+58 0
+59 1
+60 0
+61 2
+62 0
+63 0
+64 1
+65 0
+66 0
+67 0
+68 1
+69 0
+70 0
+71 0
+72 0
+73 1
+74 0
+75 0
+76 0
+77 0
+78 0
+79 1
+80 0
+81 0
+82 0
+83 0
+84 0
+85 0
+86 1
+87 0
+88 0
+89 0
+90 0
+91 0
+92 0
+93 1
+94 0
+95 0
+96 0
+97 0
+98 0
+99 0
+100 0
+101 1
+102 0
+103 0
+104 0
+105 0
+106 0
+107 0
+108 1
+109 0
+110 0
+111 0
+112 0
+113 0
+114 0
+115 1
+116 0
+117 0
+118 0
+119 1
+120 0
+121 0
+122 0
+123 0
+124 0
+125 0
+126 1
+127 0
+128 1
+129 0
+130 0
+131 0
+132 1
+133 1
+134 0
+135 0
+136 0
+137 1
+138 0
+139 0
+140 0
+141 0
+142 0
+143 0
+144 1
+145 0
+146 0
+147 0
+148 0
+149 0
+150 0
+151 0
+152 0
+153 1
+154 0
+155 0
+156 0
+157 0
+158 0
+159 0
+160 0
+161 0
+162 0
+163 0
+164 0
+165 0
+166 0
+167 0
+168 0
+169 0
+170 1
+171 0
+172 0
+173 0
+174 0
+175 0
+176 0
+177 0
+178 1
+179 0
+180 0
+181 0
+182 0
+183 0
+184 0
+185 0
+186 1
+187 0
+188 0
+189 0
+190 0
+191 0
+192 1
+193 0
+194 0
+195 0
+196 1
+197 0
+198 0
+199 0
+200 1
+201 0
+202 0
+203 0
+204 0
+205 0
+206 0
+207 1
+208 0
+209 0
+210 0
+211 0
+212 0
+213 0
+214 0
+215 1
+216 0
+217 0
+218 0
+219 0
+220 0
+221 0
+222 0
+223 1
+224 0
+225 0
+226 0
+227 0
+228 0
+229 0
+230 1
+231 0
+232 0
+233 0
+234 0
+235 0
+236 0
+237 1
+238 0
+239 0
+240 0
+241 0
+242 0
+243 0
+244 0
+245 1
+246 0
+247 0
+248 0
+249 0
+250 0
+251 0
+252 0
+253 0
+254 1
+255 0
+256 0
+257 0
+258 0
+259 1
+260 0
+261 0
+262 0
+263 0
+264 0
+265 1
+266 0
+267 0
+268 0
+269 0
+270 0
+271 0
+272 1
+273 0
+274 0
+275 0
+276 0
+277 0
+278 0
+279 0
+280 0
+281 1
+282 0
+283 1
+284 0
+285 0
+286 1
+287 0
+288 0
+289 0
+290 0
+291 1
+292 0
+293 0
+294 0
+295 0
+296 1
+297 0
+298 0
+299 0
+300 0
+301 0
+302 0
+303 1
+304 0
+305 0
+306 0
+307 0
+308 0
+309 1
+310 0
+311 0
+312 0
+313 0
+314 0
+315 0
+316 1
+317 0
+318 0
+319 0
+320 0
+321 0
+322 0
+323 0
+324 0
+325 1
+326 0
+327 0
+328 0
+329 0
+330 0
+331 0
+332 0
+333 0
+334 1
+335 0
+336 0
+337 0
+338 0
+339 0
+340 0
+341 0
+342 0
+343 1
+344 0
+345 0
+346 0
+347 0
+348 0
+349 0
+350 0
+351 0
+352 1
+353 0
+354 0
+355 0
+356 0
+357 0
+358 0
+359 0
+360 0
+361 1
+362 0
+363 0
+364 0
+365 0
+366 0
+367 0
+368 0
+369 1
+370 0
+371 0
+372 0
+373 0
+374 0
+375 0
+376 0
+377 1
+378 0
+379 0
+380 0
+381 0
+382 0
+383 0
+384 0
+385 1
+386 0
+387 0
+388 0
+389 0
+390 1
+391 0
+392 0
+393 0
+394 0
+395 0
+396 0
+397 0
+398 0
+399 0
+400 0
+401 0
+402 1
+403 0
+404 0
+405 0
+406 0
+407 0
+408 0
+409 0
+410 1
+411 0
+412 0
+413 0
+414 0
+415 0
+416 0
+417 0
+418 0
+419 1
+420 0
+421 0
+422 0
+423 0
+424 0
+425 0
+426 0
+427 1
+428 0
+429 0
+430 0
+431 0
+432 0
+433 0
+434 0
+435 1
+436 0
+437 0
+438 0
+439 0
+440 0
+441 0
+442 0
+443 1
+444 0
+445 0
+446 0
+447 0
+448 0
+449 0
+450 1
+451 0
+452 0
+453 0
+454 0
+455 0
+456 1
+457 0
+458 0
+459 0
+460 0
+461 0
+462 0
+463 0
+464 1
+465 0
+466 0
+467 0
+468 0
+469 0
+470 0
+471 0
+472 0
+473 1
+474 0
+475 0
+476 0
+477 0
+478 0
+479 0
+480 0
+481 1
+482 0
+483 0
+484 0
+485 0
+486 0
+487 0
+488 0
+489 0
+490 1
+491 0
+492 0
+493 0
+494 0
+495 0
+496 0
+497 0
+498 0
+499 0
+500 0
+501 0
+502 0
+503 0
+504 1
+505 0
+506 0
+507 0
+508 0
+509 0
+510 0
+511 0
+512 1
+513 0
+514 0
+515 0
+516 0
+517 0
+518 0
+519 4
+520 0
+521 1
+522 0
+523 0
+524 0
+525 1
+526 0
+527 0
+528 0
+529 0
+530 1
+531 0
+532 0
+533 0
+534 1
+535 0
+536 0
+537 0
+538 0
+539 1
+540 0
+541 0
+542 0
+543 0
+544 0
+545 1
+546 0
+547 0
+548 0
+549 0
+550 0
+551 1
+552 0
+553 0
+554 0
+555 0
+556 0
+557 0
+558 0
+559 1
+560 0
+561 0
+562 0
+563 0
+564 0
+565 0
+566 0
+567 1
+568 0
+569 0
+570 0
+571 0
+572 0
+573 0
+574 0
+575 0
+576 1
+577 0
+578 0
+579 0
+580 0
+581 0
+582 0
+583 0
+584 0
+585 0
+586 0
+587 0
+588 0
+589 0
+590 0
+591 0
+592 0
+593 1
+594 0
+595 0
+596 0
+597 0
+598 0
+599 0
+600 0
+601 0
+602 1
+603 0
+604 0
+605 0
+606 0
+607 0
+608 0
+609 0
+610 0
+611 1
+612 0
+613 0
+614 0
+615 0
+616 0
+617 0
+618 0
+619 0
+620 1
+621 0
+622 0
+623 0
+624 0
+625 0
+626 0
+627 0
+628 0
+629 1
+630 0
+631 0
+632 0
+633 0
+634 0
+635 0
+636 0
+637 0
+638 0
+639 1
+640 0
+641 0
+642 0
+643 0
+644 0
+645 0
+646 1
+647 0
+648 0
+649 0
+650 0
+651 0
+652 1
+653 1
+654 0
+655 0
+656 1
+657 0
+658 1
+659 0
+660 0
+661 0
+662 0
+663 0
+664 1
+665 0
+666 0
+667 0
+668 0
+669 0
+670 0
+671 0
+672 0
+673 0
+674 0
+675 0
+676 0
+677 1
+678 0
+679 0
+680 0
+681 0
+682 0
+683 0
+684 0
+685 0
+686 1
+687 0
+688 0
+689 0
+690 0
+691 0
+692 0
+693 0
+694 0
+695 1
+696 0
+697 0
+698 0
+699 0
+700 0
+701 0
+702 0
+703 1
+704 0
+705 0
+706 0
+707 0
+708 0
+709 0
+710 0
+711 0
+712 1
+713 0
+714 0
+715 0
+716 0
+717 0
+718 0
+719 0
+720 1
+721 0
+722 0
+723 0
+724 0
+725 0
+726 0
+727 0
+728 1
+729 0
+730 0
+731 0
+732 0
+733 0
+734 0
+735 0
+736 0
+737 1
+738 0
+739 0
+740 0
+741 0
+742 0
+743 0
+744 0
+745 1
+746 0
+747 0
+748 0
+749 0
+750 0
+751 0
+752 0
+753 1
+754 0
+755 0
+756 0
+757 0
+758 0
+759 0
+760 0
+761 1
+762 0
+763 0
+764 0
+765 0
+766 0
+767 0
+768 1
+769 0
+770 0
+771 0
+772 0
+773 0
+774 0
+775 0
+776 0
+777 1
+778 0
+779 0
+780 0
+781 0
+782 0
+783 0
+784 0
+785 0
+786 1
+787 0
+788 0
+789 0
+790 0
+791 0
+792 1
+793 0
+794 0
+795 0
+796 0
+797 0
+798 0
+799 0
+800 0
+801 1
+802 0
+803 0
+804 0
+805 0
+806 0
+807 0
+808 0
+809 0
+810 0
+811 0
+812 0
+813 0
+814 0
+815 0
+816 0
+817 0
+818 0
+819 0
+820 1
+821 0
+822 0
+823 0
+824 0
+825 0
+826 0
+827 0
+828 0
+829 1
+830 0
+831 0
+832 0
+833 0
+834 0
+835 0
+836 0
+837 1
+838 0
+839 0
+840 0
+841 0
+842 0
+843 0
+844 0
+845 0
+846 1
+847 0
+848 0
+849 0
+850 0
+851 0
+852 0
+853 0
+854 0
+855 2
+856 0
+857 0
+858 0
+859 0
+860 0
+861 0
+862 1
+863 0
+864 0
+865 0
+866 0
+867 0
+868 0
+869 0
+870 0
+871 1
+872 0
+873 0
+874 0
+875 0
+876 0
+877 0
+878 1
+879 0
+880 0
+881 0
+882 0
+883 0
+884 0
+885 0
+886 0
+887 0
+888 0
+889 0
+890 0
+891 0
+892 0
+893 0
+894 0
+895 0
+896 1
+897 0
+898 0
+899 0
+900 0
+901 0
+902 0
+903 0
+904 0
+905 0
+906 1
+907 0
+908 0
+909 0
+910 0
+911 0
+912 0
+913 0
+914 0
+915 1
+916 0
+917 0
+918 0
+919 0
+920 0
+921 0
+922 1
+923 0
+924 0
+925 0
+926 0
+927 0
+928 0
+929 0
+930 1
+931 0
+932 0
+933 0
+934 0
+935 0
+936 0
+937 0
+938 0
+939 1
+940 0
+941 0
+942 0
+943 0
+944 0
+945 0
+946 0
+947 0
+948 0
+949 1
+950 0
+951 0
+952 0
+953 0
+954 0
+955 0
+956 0
+957 0
+958 1
+959 0
+960 0
+961 0
+962 0
+963 0
+964 0
+965 0
+966 0
+967 0
+968 1
+969 0
+970 0
+971 0
+972 0
+973 0
+974 0
+975 0
+976 0
+977 0
+978 1
+979 0
+980 0
+981 0
+982 0
+983 0
+984 0
+985 0
+986 0
+987 0
+988 1
+989 0
+990 0
+991 0
+992 0
+993 0
+994 0
+995 0
+996 0
+997 1
+998 0
+999 0
+1000 0
+1001 0
+1002 0
+1003 0
+1004 0
+1005 1
+1006 0
+1007 0
+1008 0
+1009 0
+1010 0
+1011 0
+1012 1
+1013 0
+1014 0
+1015 0
+1016 0
+1017 0
+1018 0
+1019 0
+1020 0
+1021 0
+1022 0
+1023 0
+1024 0
+1025 0
+1026 0
+1027 0
+1028 0
+1029 0
+1030 0
+1031 1
+1032 0
+1033 0
+1034 0
+1035 0
+1036 0
+1037 0
+1038 0
+1039 0
+1040 0
+1041 0
+1042 1
+1043 0
+1044 0
+1045 0
+1046 0
+1047 0
+1048 0
+1049 0
+1050 1
+1051 0
+1052 0
+1053 0
+1054 0
+1055 0
+1056 0
+1057 1
+1058 0
+1059 0
+1060 0
+1061 0
+1062 0
+1063 0
+1064 0
+1065 0
+1066 0
+1067 1
+1068 0
+1069 0
+1070 0
+1071 0
+1072 0
+1073 0
+1074 0
+1075 0
+1076 0
+1077 1
+1078 0
+1079 0
+1080 0
+1081 0
+1082 0
+1083 0
+1084 0
+1085 0
+1086 0
+1087 1
+1088 0
+1089 0
+1090 0
+1091 0
+1092 0
+1093 0
+1094 1
+1095 0
+1096 0
+1097 0
+1098 0
+1099 0
+1100 0
+1101 0
+1102 1
+1103 0
+1104 0
+1105 0
+1106 0
+1107 0
+1108 0
+1109 0
+1110 0
+1111 1
+1112 0
+1113 0
+1114 0
+1115 0
+1116 0
+1117 0
+1118 0
+1119 0
+1120 1
+1121 0
+1122 0
+1123 0
+1124 0
+1125 0
+1126 0
+1127 0
+1128 0
+1129 0
+1130 1
+1131 0
+1132 0
+1133 0
+1134 0
+1135 0
+1136 0
+1137 0
+1138 0
+1139 0
+1140 1
+1141 0
+1142 0
+1143 0
+1144 0
+1145 0
+1146 0
+1147 0
+1148 0
+1149 0
+1150 0
+1151 1
+1152 0
+1153 0
+1154 0
+1155 0
+1156 0
+1157 0
+1158 0
+1159 0
+1160 1
+1161 0
+1162 0
+1163 0
+1164 0
+1165 0
+1166 0
+1167 1
+1168 0
+1169 0
+1170 0
+1171 0
+1172 0
+1173 0
+1174 0
+1175 0
+1176 1
+1177 0
+1178 0
+1179 0
+1180 0
+1181 0
+1182 1
+1183 0
+1184 0
+1185 0
+1186 0
+1187 0
+1188 0
+1189 0
+1190 1
+1191 0
+1192 0
+1193 0
+1194 0
+1195 0
+1196 0
+1197 0
+1198 1
+1199 0
+1200 0
+1201 0
+1202 0
+1203 0
+1204 0
+1205 0
+1206 1
+1207 0
+1208 0
+1209 0
+1210 0
+1211 0
+1212 0
+1213 0
+1214 0
+1215 0
+1216 1
+1217 0
+1218 0
+1219 0
+1220 0
+1221 0
+1222 0
+1223 0
+1224 0
+1225 0
+1226 1
+1227 0
+1228 0
+1229 0
+1230 0
+1231 0
+1232 0
+1233 0
+1234 0
+1235 0
+1236 0
+1237 0
+1238 0
+1239 1
+1240 0
+1241 0
+1242 0
+1243 0
+1244 0
+1245 0
+1246 0
+1247 0
+1248 1
+1249 0
+1250 0
+1251 0
+1252 0
+1253 0
+1254 0
+1255 0
+1256 0
+1257 1
+1258 0
+1259 0
+1260 0
+1261 0
+1262 0
+1263 0
+1264 0
+1265 0
+1266 1
+1267 0
+1268 0
+1269 0
+1270 0
+1271 0
+1272 0
+1273 0
+1274 0
+1275 1
+1276 0
+1277 0
+1278 0
+1279 0
+1280 0
+1281 0
+1282 0
+1283 0
+1284 0
+1285 0
+1286 0
+1287 0
+1288 0
+1289 0
+1290 0
+1291 0
+1292 0
+1293 1
+1294 0
+1295 0
+1296 0
+1297 0
+1298 0
+1299 0
+1300 0
+1301 0
+1302 0
+1303 0
+1304 0
+1305 0
+1306 0
+1307 0
+1308 0
+1309 0
+1310 1
+1311 0
+1312 0
+1313 0
+1314 0
+1315 0
+1316 0
+1317 0
+1318 1
+1319 0
+1320 0
+1321 0
+1322 0
+1323 0
+1324 0
+1325 0
+1326 0
+1327 1
+1328 0
+1329 0
+1330 0
+1331 0
+1332 0
+1333 0
+1334 0
+1335 0
+1336 1
+1337 0
+1338 0
+1339 0
+1340 0
+1341 0
+1342 0
+1343 0
+1344 0
+1345 0
+1346 1
+1347 0
+1348 0
+1349 0
+1350 0
+1351 0
+1352 0
+1353 0
+1354 0
+1355 0
+1356 1
+1357 0
+1358 0
+1359 0
+1360 0
+1361 0
+1362 0
+1363 0
+1364 0
+1365 1
+1366 0
+1367 0
+1368 0
+1369 0
+1370 0
+1371 0
+1372 0
+1373 1
+1374 0
+1375 0
+1376 0
+1377 0
+1378 0
+1379 0
+1380 0
+1381 0
+1382 0
+1383 1
+1384 0
+1385 0
+1386 0
+1387 0
+1388 0
+1389 0
+1390 0
+1391 0
+1392 1
+1393 0
+1394 0
+1395 0
+1396 0
+1397 0
+1398 0
+1399 0
+1400 1
+1401 0
+1402 0
+1403 0
+1404 0
+1405 0
+1406 0
+1407 0
+1408 0
+1409 0
+1410 1
+1411 0
+1412 0
+1413 0
+1414 0
+1415 0
+1416 0
+1417 0
+1418 0
+1419 0
+1420 1
+1421 0
+1422 0
+1423 0
+1424 0
+1425 0
+1426 0
+1427 0
+1428 0
+1429 0
+1430 0
+1431 1
+1432 0
+1433 0
+1434 0
+1435 0
+1436 0
+1437 0
+1438 0
+1439 0
+1440 0
+1441 1
+1442 0
+1443 0
+1444 0
+1445 0
+1446 0
+1447 2
+1448 0
+1449 0
+1450 0
+1451 0
+1452 0
+1453 0
+1454 0
+1455 1
+1456 0
+1457 0
+1458 0
+1459 0
+1460 0
+1461 0
+1462 0
+1463 0
+1464 0
+1465 1
+1466 0
+1467 0
+1468 0
+1469 0
+1470 0
+1471 0
+1472 0
+1473 0
+1474 0
+1475 1
+1476 0
+1477 0
+1478 0
+1479 0
+1480 0
+1481 0
+1482 0
+1483 0
+1484 0
+1485 1
+1486 0
+1487 0
+1488 0
+1489 0
+1490 0
+1491 0
+1492 0
+1493 0
+1494 1
+1495 0
+1496 0
+1497 0
+1498 0
+1499 0
+1500 0
+1501 0
+1502 0
+1503 1
+1504 0
+1505 0
+1506 0
+1507 0
+1508 0
+1509 0
+1510 0
+1511 0
+1512 0
+1513 0
+1514 0
+1515 0
+1516 0
+1517 0
+1518 0
+1519 0
+1520 1
+1521 0
+1522 0
+1523 0
+1524 0
+1525 0
+1526 0
+1527 0
+1528 0
+1529 1
+1530 0
+1531 0
+1532 0
+1533 0
+1534 0
+1535 0
+1536 0
+1537 0
+1538 0
+1539 1
+1540 0
+1541 0
+1542 0
+1543 0
+1544 0
+1545 0
+1546 0
+1547 0
+1548 1
+1549 0
+1550 0
+1551 0
+1552 0
+1553 0
+1554 0
+1555 0
+1556 0
+1557 1
+1558 0
+1559 0
+1560 0
+1561 0
+1562 0
+1563 0
+1564 0
+1565 0
+1566 0
+1567 1
+1568 0
+1569 0
+1570 0
+1571 0
+1572 0
+1573 0
+1574 0
+1575 1
+1576 0
+1577 0
+1578 0
+1579 0
+1580 0
+1581 0
+1582 0
+1583 0
+1584 1
+1585 0
+1586 0
+1587 0
+1588 0
+1589 0
+1590 0
+1591 0
+1592 0
+1593 1
+1594 0
+1595 0
+1596 0
+1597 0
+1598 0
+1599 0
+1600 0
+1601 0
+1602 1
+1603 0
+1604 0
+1605 0
+1606 0
+1607 0
+1608 0
+1609 0
+1610 0
+1611 1
+1612 0
+1613 0
+1614 0
+1615 0
+1616 0
+1617 0
+1618 0
+1619 0
+1620 0
+1621 1
+1622 0
+1623 0
+1624 0
+1625 0
+1626 0
+1627 0
+1628 0
+1629 0
+1630 0
+1631 1
+1632 0
+1633 0
+1634 0
+1635 0
+1636 0
+1637 0
+1638 0
+1639 0
+1640 1
+1641 0
+1642 0
+1643 0
+1644 0
+1645 0
+1646 0
+1647 0
+1648 0
+1649 0
+1650 1
+1651 0
+1652 0
+1653 0
+1654 0
+1655 0
+1656 0
+1657 0
+1658 0
+1659 0
+1660 1
+1661 0
+1662 0
+1663 0
+1664 0
+1665 0
+1666 0
+1667 0
+1668 0
+1669 0
+1670 1
+1671 0
+1672 0
+1673 0
+1674 0
+1675 0
+1676 0
+1677 0
+1678 0
+1679 0
+1680 1
+1681 0
+1682 0
+1683 0
+1684 0
+1685 0
+1686 0
+1687 0
+1688 0
+1689 0
+1690 1
+1691 0
+1692 0
+1693 0
+1694 0
+1695 0
+1696 0
+1697 0
+1698 0
+1699 0
+1700 0
+1701 1
+1702 0
+1703 0
+1704 0
+1705 0
+1706 0
+1707 0
+1708 1
+1709 0
+1710 0
+1711 0
+1712 0
+1713 0
+1714 0
+1715 0
+1716 1
+1717 0
+1718 0
+1719 0
+1720 0
+1721 0
+1722 0
+1723 0
+1724 0
+1725 0
+1726 0
+1727 0
+1728 0
+1729 0
+1730 0
+1731 0
+1732 0
+1733 0
+1734 1
+1735 0
+1736 0
+1737 0
+1738 0
+1739 0
+1740 0
+1741 0
+1742 0
+1743 1
+1744 0
+1745 0
+1746 0
+1747 0
+1748 0
+1749 0
+1750 0
+1751 0
+1752 0
+1753 1
+1754 0
+1755 0
+1756 0
+1757 0
+1758 0
+1759 0
+1760 0
+1761 0
+1762 0
+1763 1
+1764 0
+1765 0
+1766 0
+1767 0
+1768 0
+1769 0
+1770 0
+1771 0
+1772 0
+1773 1
+1774 0
+1775 0
+1776 0
+1777 0
+1778 0
+1779 0
+1780 0
+1781 0
+1782 0
+1783 1
+1784 0
+1785 0
+1786 0
+1787 0
+1788 0
+1789 0
+1790 0
+1791 0
+1792 0
+1793 1
+1794 0
+1795 0
+1796 0
+1797 0
+1798 0
+1799 0
+1800 0
+1801 0
+1802 0
+1803 1
+1804 0
+1805 0
+1806 0
+1807 0
+1808 0
+1809 0
+1810 0
+1811 0
+1812 0
+1813 1
+1814 0
+1815 0
+1816 0
+1817 0
+1818 0
+1819 0
+1820 0
+1821 0
+1822 1
+1823 0
+1824 0
+1825 0
+1826 0
+1827 0
+1828 0
+1829 1
+1830 0
+1831 0
+1832 0
+1833 0
+1834 0
+1835 0
+1836 0
+1837 0
+1838 0
+1839 1
+1840 0
+1841 0
+1842 0
+1843 0
+1844 0
+1845 0
+1846 0
+1847 0
+1848 0
+1849 1
+1850 0
+1851 0
+1852 0
+1853 0
+1854 0
+1855 0
+1856 0
+1857 0
+1858 0
+1859 1
+1860 0
+1861 0
+1862 0
+1863 0
+1864 0
+1865 0
+1866 0
+1867 0
+1868 0
+1869 1
+1870 0
+1871 0
+1872 0
+1873 0
+1874 0
+1875 0
+1876 0
+1877 0
+1878 0
+1879 1
+1880 0
+1881 0
+1882 0
+1883 0
+1884 0
+1885 0
+1886 0
+1887 0
+1888 0
+1889 1
+1890 0
+1891 0
+1892 0
+1893 0
+1894 0
+1895 0
+1896 0
+1897 0
+1898 0
+1899 0
+1900 0
+1901 0
+1902 0
+1903 0
+1904 0
+1905 0
+1906 0
+1907 0
+1908 0
+1909 0
+1910 1
+1911 0
+1912 0
+1913 0
+1914 0
+1915 0
+1916 0
+1917 0
+1918 0
+1919 0
+1920 0
+1921 0
+1922 0
+1923 0
+1924 0
+1925 0
+1926 0
+1927 0
+1928 0
+1929 0
+1930 1
+1931 0
+1932 0
+1933 0
+1934 0
+1935 0
+1936 0
+1937 0
+1938 0
+1939 1
+1940 0
+1941 0
+1942 0
+1943 0
+1944 0
+1945 0
+1946 0
+1947 0
+1948 0
+1949 1
+1950 0
+1951 0
+1952 0
+1953 0
+1954 0
+1955 0
+1956 0
+1957 0
+1958 1
+1959 0
+1960 0
+1961 0
+1962 0
+1963 0
+1964 0
+1965 0
+1966 0
+1967 0
+1968 1
+1969 0
+1970 0
+1971 0
+1972 0
+1973 0
+1974 0
+1975 0
+1976 0
+1977 0
+1978 1
+1979 0
+1980 0
+1981 0
+1982 0
+1983 0
+1984 0
+1985 0
+1986 0
+1987 0
+1988 1
+1989 0
+1990 0
+1991 0
+1992 0
+1993 0
+1994 0
+1995 0
+1996 1
+1997 0
+1998 0
+1999 0
+2000 0
+2001 0
+2002 0
+2003 0
+2004 1
+2005 0
+2006 0
+2007 0
+2008 0
+2009 0
+2010 0
+2011 0
+2012 0
+2013 0
+2014 1
+2015 0
+2016 0
+2017 0
+2018 0
+2019 0
+2020 0
+2021 0
+2022 0
+2023 0
+2024 1
+2025 0
+2026 0
+2027 0
+2028 0
+2029 0
+2030 0
+2031 0
+2032 0
+2033 1
+2034 0
+2035 0
+2036 0
+2037 0
+2038 0
+2039 0
+2040 0
+2041 2
+2042 0
+2043 0
+2044 0
+2045 0
+2046 0
+2047 0
+2048 0
+2049 1
+2050 0
+2051 0
+2052 0
+2053 0
+2054 0
+2055 0
+2056 0
+2057 0
+2058 0
+2059 0
+2060 0
+2061 0
+2062 0
+2063 0
+2064 0
+2065 0
+2066 0
+2067 1
+2068 0
+2069 0
+2070 0
+2071 0
+2072 0
+2073 0
+2074 0
+2075 0
+2076 1
+2077 0
+2078 0
+2079 0
+2080 0
+2081 0
+2082 0
+2083 0
+2084 0
+2085 0
+2086 1
+2087 0
+2088 0
+2089 0
+2090 0
+2091 0
+2092 0
+2093 0
+2094 0
+2095 0
+2096 1
+2097 0
+2098 0
+2099 0
+2100 0
+2101 0
+2102 0
+2103 0
+2104 0
+2105 1
+2106 0
+2107 0
+2108 0
+2109 0
+2110 0
+2111 0
+2112 0
+2113 0
+2114 0
+2115 0
+2116 1
+2117 0
+2118 0
+2119 0
+2120 0
+2121 0
+2122 0
+2123 0
+2124 0
+2125 1
+2126 0
+2127 0
+2128 0
+2129 0
+2130 0
+2131 0
+2132 0
+2133 1
+2134 0
+2135 0
+2136 0
+2137 0
+2138 0
+2139 0
+2140 0
+2141 1
+2142 0
+2143 0
+2144 0
+2145 0
+2146 0
+2147 0
+2148 0
+2149 0
+2150 1
+2151 0
+2152 0
+2153 0
+2154 0
+2155 0
+2156 0
+2157 0
+2158 0
+2159 1
+2160 0
+2161 0
+2162 0
+2163 0
+2164 0
+2165 0
+2166 0
+2167 0
+2168 0
+2169 1
+2170 0
+2171 0
+2172 0
+2173 0
+2174 0
+2175 0
+2176 0
+2177 1
+2178 0
+2179 0
+2180 0
+2181 0
+2182 0
+2183 0
+2184 0
+2185 0
+2186 0
+2187 1
+2188 0
+2189 0
+2190 0
+2191 0
+2192 0
+2193 0
+2194 0
+2195 0
+2196 1
+2197 0
+2198 0
+2199 0
+2200 0
+2201 0
+2202 0
+2203 0
+2204 1
+2205 0
+2206 0
+2207 0
+2208 0
+2209 0
+2210 0
+2211 0
+2212 0
+2213 0
+2214 1
+2215 0
+2216 0
+2217 0
+2218 0
+2219 0
+2220 0
+2221 0
+2222 0
+2223 0
+2224 1
+2225 0
+2226 0
+2227 0
+2228 0
+2229 0
+2230 0
+2231 0
+2232 0
+2233 1
+2234 0
+2235 0
+2236 0
+2237 0
+2238 0
+2239 0
+2240 0
+2241 0
+2242 1
+2243 0
+2244 0
+2245 0
+2246 0
+2247 0
+2248 0
+2249 0
+2250 1
+2251 0
+2252 0
+2253 0
+2254 0
+2255 0
+2256 0
+2257 0
+2258 0
+2259 0
+2260 1
+2261 0
+2262 0
+2263 0
+2264 0
+2265 0
+2266 0
+2267 0
+2268 0
+2269 0
+2270 1
+2271 0
+2272 0
+2273 0
+2274 0
+2275 0
+2276 0
+2277 0
+2278 0
+2279 0
+2280 1
+2281 0
+2282 0
+2283 0
+2284 0
+2285 0
+2286 0
+2287 0
+2288 0
+2289 0
+2290 1
+2291 0
+2292 0
+2293 0
+2294 0
+2295 0
+2296 0
+2297 0
+2298 1
+2299 0
+2300 0
+2301 0
+2302 0
+2303 0
+2304 0
+2305 0
+2306 1
+2307 0
+2308 0
+2309 0
+2310 0
+2311 0
+2312 0
+2313 0
+2314 0
+2315 1
+2316 0
+2317 0
+2318 0
+2319 0
+2320 0
+2321 0
+2322 0
+2323 0
+2324 0
+2325 1
+2326 0
+2327 0
+2328 0
+2329 0
+2330 0
+2331 0
+2332 0
+2333 0
+2334 0
+2335 1
+2336 0
+2337 0
+2338 0
+2339 0
+2340 0
+2341 0
+2342 0
+2343 0
+2344 0
+2345 1
+2346 0
+2347 0
+2348 0
+2349 0
+2350 0
+2351 0
+2352 0
+2353 1
+2354 0
+2355 0
+2356 0
+2357 0
+2358 0
+2359 0
+2360 0
+2361 1
+2362 0
+2363 0
+2364 0
+2365 0
+2366 0
+2367 0
+2368 0
+2369 0
+2370 0
+2371 1
+2372 0
+2373 0
+2374 0
+2375 0
+2376 0
+2377 0
+2378 0
+2379 0
+2380 0
+2381 1
+2382 0
+2383 0
+2384 0
+2385 0
+2386 0
+2387 0
+2388 0
+2389 0
+2390 1
+2391 0
+2392 0
+2393 0
+2394 0
+2395 0
+2396 0
+2397 0
+2398 0
+2399 0
+2400 0
+2401 0
+2402 0
+2403 0
+2404 0
+2405 0
+2406 0
+2407 0
+2408 0
+2409 0
+2410 0
+2411 1
+2412 0
+2413 0
+2414 0
+2415 0
+2416 0
+2417 0
+2418 0
+2419 0
+2420 0
+2421 1
+2422 0
+2423 0
+2424 0
+2425 0
+2426 0
+2427 0
+2428 0
+2429 0
+2430 0
+2431 0
+2432 0
+2433 0
+2434 0
+2435 0
+2436 0
+2437 0
+2438 0
+2439 0
+2440 1
+2441 0
+2442 0
+2443 0
+2444 0
+2445 0
+2446 0
+2447 0
+2448 0
+2449 0
+2450 0
+2451 1
+2452 0
+2453 0
+2454 0
+2455 0
+2456 0
+2457 0
+2458 0
+2459 0
+2460 0
+2461 1
+2462 0
+2463 0
+2464 0
+2465 0
+2466 0
+2467 0
+2468 0
+2469 1
+2470 0
+2471 0
+2472 0
+2473 0
+2474 0
+2475 0
+2476 0
+2477 1
+2478 0
+2479 0
+2480 0
+2481 0
+2482 0
+2483 0
+2484 0
+2485 0
+2486 1
+2487 0
+2488 0
+2489 0
+2490 0
+2491 0
+2492 0
+2493 0
+2494 0
+2495 0
+2496 1
+2497 0
+2498 0
+2499 0
+2500 0
+2501 0
+2502 0
+2503 0
+2504 0
+2505 0
+2506 1
+2507 0
+2508 0
+2509 0
+2510 0
+2511 0
+2512 0
+2513 0
+2514 0
+2515 0
+2516 1
+2517 0
+2518 0
+2519 0
+2520 0
+2521 0
+2522 0
+2523 0
+2524 0
+2525 0
+2526 0
+2527 1
+2528 0
+2529 0
+2530 0
+2531 0
+2532 0
+2533 0
+2534 0
+2535 0
+2536 0
+2537 1
+2538 0
+2539 0
+2540 0
+2541 0
+2542 0
+2543 0
+2544 0
+2545 0
+2546 0
+2547 0
+2548 0
+2549 0
+2550 0
+2551 0
+2552 0
+2553 0
+2554 0
+2555 0
+2556 0
+2557 1
+2558 0
+2559 0
+2560 0
+2561 0
+2562 0
+2563 0
+2564 0
+2565 0
+2566 1
+2567 0
+2568 0
+2569 0
+2570 0
+2571 0
+2572 0
+2573 0
+2574 0
+2575 1
+2576 0
+2577 0
+2578 0
+2579 0
+2580 0
+2581 0
+2582 0
+2583 0
+2584 1
+2585 0
+2586 0
+2587 0
+2588 0
+2589 0
+2590 0
+2591 0
+2592 0
+2593 0
+2594 0
+2595 1
+2596 0
+2597 0
+2598 0
+2599 0
+2600 0
+2601 0
+2602 0
+2603 0
+2604 0
+2605 1
+2606 0
+2607 0
+2608 0
+2609 0
+2610 0
+2611 0
+2612 0
+2613 0
+2614 0
+2615 0
+2616 0
+2617 0
+2618 0
+2619 0
+2620 0
+2621 0
+2622 0
+2623 0
+2624 0
+2625 1
+2626 0
+2627 0
+2628 0
+2629 0
+2630 0
+2631 0
+2632 0
+2633 0
+2634 0
+2635 1
+2636 0
+2637 0
+2638 0
+2639 1
+2640 0
+2641 0
+2642 0
+2643 1
+2644 0
+2645 0
+2646 0
+2647 0
+2648 0
+2649 0
+2650 0
+2651 0
+2652 0
+2653 1
+2654 0
+2655 0
+2656 0
+2657 0
+2658 0
+2659 0
+2660 0
+2661 0
+2662 0
+2663 1
+2664 0
+2665 0
+2666 0
+2667 0
+2668 0
+2669 0
+2670 0
+2671 1
+2672 0
+2673 0
+2674 0
+2675 0
+2676 0
+2677 0
+2678 0
+2679 1
+2680 0
+2681 0
+2682 0
+2683 0
+2684 0
+2685 0
+2686 0
+2687 0
+2688 0
+2689 1
+2690 0
+2691 0
+2692 0
+2693 0
+2694 0
+2695 0
+2696 0
+2697 0
+2698 0
+2699 1
+2700 0
+2701 0
+2702 0
+2703 0
+2704 0
+2705 0
+2706 0
+2707 0
+2708 0
+2709 1
+2710 0
+2711 0
+2712 0
+2713 0
+2714 0
+2715 0
+2716 1
+2717 0
+2718 0
+2719 0
+2720 0
+2721 0
+2722 0
+2723 0
+2724 1
+2725 0
+2726 0
+2727 0
+2728 0
+2729 0
+2730 0
+2731 0
+2732 0
+2733 0
+2734 1
+2735 0
+2736 0
+2737 0
+2738 0
+2739 0
+2740 0
+2741 0
+2742 0
+2743 0
+2744 1
+2745 0
+2746 0
+2747 0
+2748 0
+2749 0
+2750 0
+2751 0
+2752 0
+2753 1
+2754 0
+2755 0
+2756 0
+2757 0
+2758 0
+2759 0
+2760 0
+2761 0
+2762 0
+2763 1
+2764 0
+2765 0
+2766 0
+2767 0
+2768 0
+2769 0
+2770 0
+2771 0
+2772 0
+2773 1
+2774 0
+2775 0
+2776 0
+2777 0
+2778 0
+2779 0
+2780 0
+2781 0
+2782 0
+2783 1
+2784 0
+2785 0
+2786 0
+2787 0
+2788 0
+2789 0
+2790 0
+2791 0
+2792 1
+2793 0
+2794 0
+2795 0
+2796 0
+2797 0
+2798 0
+2799 0
+2800 0
+2801 0
+2802 0
+2803 0
+2804 0
+2805 0
+2806 0
+2807 0
+2808 0
+2809 0
+2810 0
+2811 0
+2812 0
+2813 0
+2814 0
+2815 0
+2816 0
+2817 0
+2818 0
+2819 0
+2820 0
+2821 1
+2822 0
+2823 0
+2824 0
+2825 0
+2826 0
+2827 0
+2828 0
+2829 0
+2830 0
+2831 1
+2832 0
+2833 0
+2834 0
+2835 0
+2836 0
+2837 0
+2838 0
+2839 0
+2840 0
+2841 1
+2842 0
+2843 0
+2844 0
+2845 0
+2846 0
+2847 0
+2848 0
+2849 0
+2850 0
+2851 1
+2852 0
+2853 0
+2854 0
+2855 0
+2856 0
+2857 0
+2858 0
+2859 0
+2860 0
+2861 1
+2862 0
+2863 0
+2864 0
+2865 0
+2866 0
+2867 0
+2868 0
+2869 0
+2870 0
+2871 1
+2872 0
+2873 0
+2874 0
+2875 0
+2876 0
+2877 0
+2878 0
+2879 0
+2880 1
+2881 0
+2882 0
+2883 0
+2884 0
+2885 0
+2886 0
+2887 0
+2888 1
+2889 0
+2890 0
+2891 0
+2892 0
+2893 0
+2894 0
+2895 0
+2896 0
+2897 1
+2898 0
+2899 0
+2900 0
+2901 0
+2902 0
+2903 0
+2904 0
+2905 0
+2906 1
+2907 0
+2908 0
+2909 0
+2910 0
+2911 0
+2912 0
+2913 0
+2914 1
+2915 0
+2916 0
+2917 0
+2918 0
+2919 0
+2920 0
+2921 0
+2922 1
+2923 0
+2924 0
+2925 0
+2926 0
+2927 0
+2928 0
+2929 0
+2930 0
+2931 0
+2932 0
+2933 0
+2934 0
+2935 0
+2936 0
+2937 0
+2938 1
+2939 0
+2940 0
+2941 0
+2942 0
+2943 0
+2944 0
+2945 0
+2946 0
+2947 0
+2948 0
+2949 1
+2950 0
+2951 0
+2952 0
+2953 0
+2954 0
+2955 0
+2956 0
+2957 0
+2958 0
+2959 1
+2960 0
+2961 0
+2962 0
+2963 0
+2964 0
+2965 0
+2966 0
+2967 0
+2968 1
+2969 0
+2970 0
+2971 0
+2972 0
+2973 0
+2974 0
+2975 0
+2976 0
+2977 1
+2978 0
+2979 0
+2980 0
+2981 0
+2982 0
+2983 0
+2984 0
+2985 0
+2986 0
+2987 1
+2988 0
+2989 0
+2990 0
+2991 0
+2992 0
+2993 0
+2994 0
+2995 0
+2996 0
+2997 1
+2998 0
+2999 0
+3000 0
+3001 0
+3002 0
+3003 0
+3004 0
+3005 0
+3006 0
+3007 0
+3008 0
+3009 0
+3010 0
+3011 0
+3012 0
+3013 0
+3014 0
+3015 1
+3016 0
+3017 0
+3018 0
+3019 0
+3020 0
+3021 0
+3022 0
+3023 0
+3024 0
+3025 1
+3026 0
+3027 0
+3028 0
+3029 0
+3030 0
+3031 0
+3032 0
+3033 0
+3034 1
+3035 0
+3036 0
+3037 0
+3038 0
+3039 0
+3040 0
+3041 0
+3042 1
+3043 0
+3044 0
+3045 0
+3046 0
+3047 0
+3048 0
+3049 0
+3050 0
+3051 0
+3052 1
+3053 0
+3054 0
+3055 0
+3056 0
+3057 0
+3058 0
+3059 0
+3060 0
+3061 0
+3062 1
+3063 0
+3064 0
+3065 0
+3066 0
+3067 0
+3068 0
+3069 0
+3070 0
+3071 0
+3072 1
+3073 0
+3074 0
+3075 0
+3076 0
+3077 0
+3078 0
+3079 0
+3080 0
+3081 0
+3082 1
+3083 0
+3084 0
+3085 0
+3086 0
+3087 0
+3088 0
+3089 0
+3090 0
+3091 0
+3092 1
+3093 0
+3094 0
+3095 0
+3096 0
+3097 0
+3098 0
+3099 0
+3100 0
+3101 0
+3102 1
+3103 0
+3104 0
+3105 0
+3106 0
+3107 0
+3108 0
+3109 0
+3110 0
+3111 0
+3112 1
+3113 0
+3114 0
+3115 0
+3116 0
+3117 0
+3118 0
+3119 0
+3120 1
+3121 0
+3122 0
+3123 0
+3124 0
+3125 0
+3126 0
+3127 0
+3128 0
+3129 1
+3130 0
+3131 0
+3132 0
+3133 0
+3134 0
+3135 0
+3136 0
+3137 0
+3138 0
+3139 1
+3140 0
+3141 0
+3142 0
+3143 0
+3144 0
+3145 0
+3146 0
+3147 0
+3148 0
+3149 1
+3150 0
+3151 0
+3152 0
+3153 0
+3154 0
+3155 0
+3156 0
+3157 1
+3158 0
+3159 0
+3160 0
+3161 0
+3162 0
+3163 0
+3164 0
+3165 1
+3166 0
+3167 0
+3168 0
+3169 0
+3170 0
+3171 0
+3172 0
+3173 0
+3174 0
+3175 1
+3176 0
+3177 0
+3178 0
+3179 0
+3180 0
+3181 0
+3182 0
+3183 0
+3184 0
+3185 1
+3186 0
+3187 0
+3188 0
+3189 0
+3190 0
+3191 0
+3192 0
+3193 0
+3194 0
+3195 0
+3196 1
+3197 0
+3198 0
+3199 0
+3200 0
+3201 0
+3202 0
+3203 0
+3204 0
+3205 0
+3206 0
+3207 1
+3208 0
+3209 0
+3210 0
+3211 0
+3212 0
+3213 0
+3214 0
+3215 1
+3216 0
+3217 0
+3218 0
+3219 0
+3220 0
+3221 0
+3222 0
+3223 1
+3224 0
+3225 0
+3226 0
+3227 0
+3228 0
+3229 0
+3230 0
+3231 0
+3232 1
+3233 0
+3234 1
+3235 0
+3236 0
+3237 0
+3238 0
+3239 1
+3240 0
+3241 0
+3242 0
+3243 0
+3244 0
+3245 0
+3246 0
+3247 0
+3248 1
+3249 0
+3250 0
+3251 0
+3252 0
+3253 0
+3254 0
+3255 0
+3256 0
+3257 0
+3258 1
+3259 0
+3260 0
+3261 0
+3262 0
+3263 0
+3264 0
+3265 0
+3266 0
+3267 0
+3268 0
+3269 1
+3270 0
+3271 0
+3272 0
+3273 0
+3274 0
+3275 0
+3276 0
+3277 0
+3278 1
+3279 0
+3280 0
+3281 0
+3282 0
+3283 0
+3284 0
+3285 0
+3286 0
+3287 1
+3288 0
+3289 0
+3290 0
+3291 0
+3292 0
+3293 0
+3294 0
+3295 0
+3296 0
+3297 1
+3298 0
+3299 0
+3300 0
+3301 0
+3302 0
+3303 0
+3304 0
+3305 0
+3306 0
+3307 1
+3308 0
+3309 0
+3310 0
+3311 0
+3312 0
+3313 0
+3314 0
+3315 0
+3316 0
+3317 1
+3318 0
+3319 0
+3320 0
+3321 0
+3322 0
+3323 0
+3324 0
+3325 1
+3326 0
+3327 0
+3328 0
+3329 0
+3330 0
+3331 0
+3332 0
+3333 0
+3334 0
+3335 1
+3336 0
+3337 0
+3338 0
+3339 0
+3340 0
+3341 0
+3342 0
+3343 0
+3344 1
+3345 0
+3346 0
+3347 0
+3348 0
+3349 0
+3350 0
+3351 0
+3352 0
+3353 0
+3354 1
+3355 0
+3356 0
+3357 0
+3358 0
+3359 0
+3360 0
+3361 0
+3362 0
+3363 0
+3364 0
+3365 1
+3366 0
+3367 0
+3368 0
+3369 0
+3370 0
+3371 0
+3372 0
+3373 0
+3374 0
+3375 1
+3376 0
+3377 0
+3378 0
+3379 0
+3380 0
+3381 0
+3382 0
+3383 0
+3384 0
+3385 0
+3386 1
+3387 0
+3388 0
+3389 0
+3390 0
+3391 0
+3392 0
+3393 0
+3394 0
+3395 0
+3396 0
+3397 1
+3398 0
+3399 0
+3400 0
+3401 0
+3402 0
+3403 0
+3404 0
+3405 0
+3406 0
+3407 1
+3408 0
+3409 0
+3410 0
+3411 0
+3412 0
+3413 0
+3414 0
+3415 0
+3416 0
+3417 1
+3418 0
+3419 0
+3420 0
+3421 0
+3422 0
+3423 0
+3424 0
+3425 0
+3426 0
+3427 0
+3428 1
+3429 0
+3430 0
+3431 0
+3432 0
+3433 0
+3434 0
+3435 0
+3436 0
+3437 1
+3438 0
+3439 0
+3440 0
+3441 0
+3442 0
+3443 0
+3444 0
+3445 1
+3446 0
+3447 0
+3448 0
+3449 0
+3450 0
+3451 0
+3452 0
+3453 0
+3454 1
+3455 0
+3456 0
+3457 0
+3458 0
+3459 0
+3460 0
+3461 0
+3462 0
+3463 0
+3464 1
+3465 0
+3466 0
+3467 0
+3468 0
+3469 0
+3470 0
+3471 0
+3472 0
+3473 0
+3474 1
+3475 0
+3476 0
+3477 0
+3478 0
+3479 0
+3480 0
+3481 0
+3482 0
+3483 0
+3484 1
+3485 0
+3486 0
+3487 0
+3488 0
+3489 0
+3490 0
+3491 0
+3492 0
+3493 0
+3494 1
+3495 0
+3496 0
+3497 0
+3498 0
+3499 0
+3500 0
+3501 0
+3502 0
+3503 0
+3504 1
+3505 0
+3506 0
+3507 0
+3508 0
+3509 0
+3510 0
+3511 0
+3512 0
+3513 0
+3514 1
+3515 0
+3516 0
+3517 0
+3518 0
+3519 0
+3520 0
+3521 0
+3522 0
+3523 0
+3524 1
+3525 0
+3526 0
+3527 0
+3528 0
+3529 0
+3530 0
+3531 0
+3532 0
+3533 1
+3534 0
+3535 0
+3536 0
+3537 0
+3538 0
+3539 0
+3540 0
+3541 0
+3542 0
+3543 0
+3544 0
+3545 0
+3546 0
+3547 0
+3548 0
+3549 0
+3550 0
+3551 1
+3552 0
+3553 0
+3554 0
+3555 0
+3556 0
+3557 0
+3558 0
+3559 0
+3560 0
+3561 1
+3562 0
+3563 0
+3564 0
+3565 0
+3566 0
+3567 0
+3568 0
+3569 0
+3570 1
+3571 0
+3572 0
+3573 0
+3574 0
+3575 0
+3576 0
+3577 0
+3578 0
+3579 0
+3580 1
+3581 0
+3582 0
+3583 0
+3584 0
+3585 0
+3586 0
+3587 0
+3588 0
+3589 0
+3590 1
+3591 0
+3592 0
+3593 0
+3594 0
+3595 0
+3596 0
+3597 0
+3598 0
+3599 1
+3600 0
+3601 0
+3602 0
+3603 0
+3604 0
+3605 0
+3606 0
+3607 0
+3608 0
+3609 1
+3610 0
+3611 0
+3612 0
+3613 0
+3614 0
+3615 0
+3616 0
+3617 0
+3618 0
+3619 0
+3620 1
+3621 0
+3622 0
+3623 0
+3624 0
+3625 0
+3626 0
+3627 0
+3628 0
+3629 0
+3630 1
+3631 0
+3632 0
+3633 0
+3634 0
+3635 0
+3636 0
+3637 0
+3638 0
+3639 1
+3640 0
+3641 0
+3642 0
+3643 0
+3644 0
+3645 1
+3646 0
+3647 0
+3648 0
+3649 0
+3650 0
+3651 1
+3652 0
+3653 0
+3654 0
+3655 0
+3656 0
+3657 0
+3658 1
+3659 0
+3660 0
+3661 0
+3662 0
+3663 0
+3664 0
+3665 0
+3666 1
+3667 0
+3668 0
+3669 0
+3670 0
+3671 0
+3672 0
+3673 0
+3674 0
+3675 0
+3676 1
+3677 0
+3678 0
+3679 0
+3680 0
+3681 0
+3682 0
+3683 0
+3684 0
+3685 1
+3686 0
+3687 0
+3688 0
+3689 0
+3690 0
+3691 0
+3692 0
+3693 0
+3694 0
+3695 1
+3696 0
+3697 0
+3698 0
+3699 0
+3700 0
+3701 0
+3702 0
+3703 0
+3704 0
+3705 0
+3706 1
+3707 0
+3708 0
+3709 0
+3710 0
+3711 0
+3712 0
+3713 0
+3714 0
+3715 0
+3716 1
+3717 0
+3718 0
+3719 0
+3720 0
+3721 0
+3722 0
+3723 0
+3724 0
+3725 0
+3726 0
+3727 0
+3728 0
+3729 0
+3730 0
+3731 0
+3732 0
+3733 0
+3734 0
+3735 0
+3736 1
+3737 0
+3738 0
+3739 0
+3740 0
+3741 0
+3742 0
+3743 0
+3744 0
+3745 0
+3746 1
+3747 0
+3748 0
+3749 0
+3750 0
+3751 0
+3752 0
+3753 0
+3754 0
+3755 0
+3756 1
+3757 0
+3758 0
+3759 0
+3760 0
+3761 0
+3762 0
+3763 1
+3764 0
+3765 0
+3766 0
+3767 0
+3768 0
+3769 0
+3770 0
+3771 1
+3772 0
+3773 0
+3774 0
+3775 0
+3776 0
+3777 0
+3778 1
+3779 0
+3780 0
+3781 0
+3782 0
+3783 0
+3784 0
+3785 0
+3786 0
+3787 0
+3788 0
+3789 0
+3790 0
+3791 0
+3792 0
+3793 0
+3794 0
+3795 0
+3796 0
+3797 1
+3798 0
+3799 0
+3800 0
+3801 0
+3802 0
+3803 0
+3804 0
+3805 0
+3806 1
+3807 0
+3808 0
+3809 0
+3810 0
+3811 0
+3812 0
+3813 0
+3814 0
+3815 0
+3816 0
+3817 1
+3818 0
+3819 0
+3820 0
+3821 0
+3822 0
+3823 0
+3824 0
+3825 0
+3826 0
+3827 1
+3828 0
+3829 1
+3830 0
+3831 0
+3832 0
+3833 0
+3834 1
+3835 0
+3836 0
+3837 0
+3838 0
+3839 0
+3840 0
+3841 0
+3842 0
+3843 0
+3844 0
+3845 1
+3846 0
+3847 0
+3848 0
+3849 0
+3850 0
+3851 0
+3852 0
+3853 0
+3854 0
+3855 1
+3856 0
+3857 0
+3858 0
+3859 0
+3860 0
+3861 0
+3862 0
+3863 1
+3864 0
+3865 0
+3866 0
+3867 0
+3868 0
+3869 0
+3870 0
+3871 0
+3872 0
+3873 1
+3874 0
+3875 0
+3876 0
+3877 0
+3878 0
+3879 0
+3880 0
+3881 0
+3882 0
+3883 1
+3884 0
+3885 0
+3886 0
+3887 0
+3888 0
+3889 0
+3890 0
+3891 0
+3892 0
+3893 0
+3894 1
+3895 0
+3896 0
+3897 0
+3898 0
+3899 0
+3900 0
+3901 0
+3902 0
+3903 0
+3904 0
+3905 1
+3906 0
+3907 0
+3908 0
+3909 0
+3910 0
+3911 0
+3912 0
+3913 0
+3914 1
+3915 0
+3916 0
+3917 0
+3918 0
+3919 0
+3920 0
+3921 0
+3922 0
+3923 0
+3924 0
+3925 1
+3926 0
+3927 0
+3928 0
+3929 0
+3930 0
+3931 0
+3932 0
+3933 0
+3934 1
+3935 0
+3936 0
+3937 0
+3938 0
+3939 0
+3940 0
+3941 0
+3942 0
+3943 0
+3944 0
+3945 1
+3946 0
+3947 0
+3948 0
+3949 0
+3950 0
+3951 0
+3952 0
+3953 0
+3954 0
+3955 1
+3956 0
+3957 0
+3958 0
+3959 0
+3960 0
+3961 0
+3962 0
+3963 0
+3964 0
+3965 0
+3966 1
+3967 0
+3968 0
+3969 0
+3970 0
+3971 0
+3972 0
+3973 0
+3974 0
+3975 1
+3976 0
+3977 0
+3978 0
+3979 0
+3980 0
+3981 0
+3982 0
+3983 0
+3984 1
+3985 0
+3986 0
+3987 0
+3988 0
+3989 0
+3990 0
+3991 0
+3992 0
+3993 0
+3994 1
+3995 0
+3996 0
+3997 0
+3998 0
+3999 0
+4000 0
+4001 0
+4002 0
+4003 0
+4004 0
+4005 0
+4006 0
+4007 0
+4008 0
+4009 0
+4010 0
+4011 0
+4012 0
+4013 0
+4014 1
+4015 0
+4016 0
+4017 0
+4018 0
+4019 0
+4020 0
+4021 0
+4022 0
+4023 0
+4024 1
+4025 0
+4026 0
+4027 0
+4028 0
+4029 0
+4030 0
+4031 0
+4032 0
+4033 0
+4034 0
+4035 1
+4036 0
+4037 0
+4038 0
+4039 0
+4040 0
+4041 0
+4042 0
+4043 0
+4044 0
+4045 1
+4046 0
+4047 0
+4048 0
+4049 0
+4050 0
+4051 0
+4052 0
+4053 0
+4054 0
+4055 0
+4056 1
+4057 0
+4058 0
+4059 0
+4060 0
+4061 0
+4062 0
+4063 0
+4064 0
+4065 0
+4066 1
+4067 0
+4068 0
+4069 0
+4070 0
+4071 0
+4072 0
+4073 0
+4074 1
+4075 0
+4076 0
+4077 0
+4078 0
+4079 0
+4080 0
+4081 0
+4082 0
+4083 0
+4084 1
+4085 0
+4086 0
+4087 0
+4088 0
+4089 0
+4090 0
+4091 0
+4092 0
+4093 1
+4094 0
+4095 0
+4096 0
+4097 0
+4098 0
+4099 0
+4100 0
+4101 0
+4102 1
+4103 0
+4104 0
+4105 0
+4106 0
+4107 0
+4108 0
+4109 0
+4110 0
+4111 0
+4112 1
+4113 0
+4114 0
+4115 0
+4116 0
+4117 0
+4118 0
+4119 0
+4120 0
+4121 0
+4122 1
+4123 0
+4124 0
+4125 0
+4126 0
+4127 0
+4128 0
+4129 0
+4130 0
+4131 0
+4132 0
+4133 1
+4134 0
+4135 0
+4136 0
+4137 0
+4138 0
+4139 0
+4140 0
+4141 0
+4142 0
+4143 0
+4144 1
+4145 0
+4146 0
+4147 0
+4148 0
+4149 0
+4150 0
+4151 0
+4152 0
+4153 0
+4154 1
+4155 0
+4156 0
+4157 0
+4158 0
+4159 0
+4160 0
+4161 0
+4162 0
+4163 0
+4164 0
+4165 1
+4166 0
+4167 0
+4168 0
+4169 0
+4170 0
+4171 0
+4172 0
+4173 0
+4174 0
+4175 0
+4176 1
+4177 0
+4178 0
+4179 0
+4180 0
+4181 0
+4182 0
+4183 0
+4184 0
+4185 1
+4186 0
+4187 0
+4188 0
+4189 0
+4190 0
+4191 0
+4192 0
+4193 0
+4194 0
+4195 1
+4196 0
+4197 0
+4198 0
+4199 0
+4200 0
+4201 0
+4202 0
+4203 0
+4204 0
+4205 0
+4206 0
+4207 0
+4208 0
+4209 0
+4210 0
+4211 0
+4212 1
+4213 0
+4214 0
+4215 0
+4216 0
+4217 0
+4218 0
+4219 0
+4220 0
+4221 1
+4222 0
+4223 0
+4224 0
+4225 0
+4226 0
+4227 0
+4228 0
+4229 0
+4230 1
+4231 0
+4232 0
+4233 0
+4234 0
+4235 0
+4236 0
+4237 0
+4238 0
+4239 1
+4240 0
+4241 0
+4242 0
+4243 0
+4244 0
+4245 0
+4246 0
+4247 0
+4248 0
+4249 1
+4250 0
+4251 0
+4252 0
+4253 0
+4254 0
+4255 0
+4256 0
+4257 0
+4258 1
+4259 0
+4260 0
+4261 0
+4262 0
+4263 0
+4264 0
+4265 0
+4266 0
+4267 0
+4268 1
+4269 0
+4270 0
+4271 0
+4272 0
+4273 0
+4274 0
+4275 0
+4276 0
+4277 0
+4278 1
+4279 0
+4280 0
+4281 0
+4282 0
+4283 0
+4284 0
+4285 0
+4286 0
+4287 0
+4288 0
+4289 1
+4290 0
+4291 0
+4292 0
+4293 0
+4294 0
+4295 0
+4296 0
+4297 0
+4298 0
+4299 1
+4300 0
+4301 0
+4302 0
+4303 0
+4304 0
+4305 0
+4306 0
+4307 0
+4308 0
+4309 1
+4310 0
+4311 0
+4312 0
+4313 0
+4314 0
+4315 0
+4316 0
+4317 0
+4318 1
+4319 0
+4320 0
+4321 0
+4322 0
+4323 0
+4324 0
+4325 0
+4326 0
+4327 1
+4328 0
+4329 0
+4330 0
+4331 0
+4332 0
+4333 0
+4334 0
+4335 0
+4336 0
+4337 1
+4338 0
+4339 0
+4340 0
+4341 0
+4342 0
+4343 0
+4344 0
+4345 0
+4346 0
+4347 1
+4348 0
+4349 0
+4350 0
+4351 0
+4352 0
+4353 0
+4354 0
+4355 1
+4356 0
+4357 0
+4358 0
+4359 0
+4360 0
+4361 0
+4362 0
+4363 0
+4364 0
+4365 0
+4366 0
+4367 0
+4368 0
+4369 0
+4370 0
+4371 0
+4372 0
+4373 0
+4374 1
+4375 0
+4376 0
+4377 0
+4378 0
+4379 0
+4380 0
+4381 0
+4382 0
+4383 0
+4384 1
+4385 0
+4386 0
+4387 0
+4388 0
+4389 0
+4390 0
+4391 0
+4392 0
+4393 1
+4394 0
+4395 0
+4396 0
+4397 0
+4398 0
+4399 0
+4400 0
+4401 0
+4402 0
+4403 1
+4404 0
+4405 0
+4406 0
+4407 0
+4408 0
+4409 0
+4410 0
+4411 0
+4412 1
+4413 0
+4414 0
+4415 0
+4416 0
+4417 0
+4418 0
+4419 0
+4420 0
+4421 0
+4422 0
+4423 1
+4424 0
+4425 0
+4426 0
+4427 0
+4428 0
+4429 0
+4430 2
+4431 0
+4432 0
+4433 0
+4434 0
+4435 0
+4436 0
+4437 1
+4438 0
+4439 0
+4440 0
+4441 0
+4442 0
+4443 0
+4444 0
+4445 1
+4446 0
+4447 0
+4448 0
+4449 0
+4450 0
+4451 0
+4452 0
+4453 0
+4454 1
+4455 0
+4456 0
+4457 0
+4458 0
+4459 0
+4460 0
+4461 0
+4462 1
+4463 0
+4464 0
+4465 0
+4466 0
+4467 0
+4468 0
+4469 0
+4470 0
+4471 1
+4472 0
+4473 0
+4474 0
+4475 0
+4476 0
+4477 0
+4478 0
+4479 0
+4480 1
+4481 0
+4482 0
+4483 0
+4484 0
+4485 0
+4486 0
+4487 0
+4488 1
+4489 0
+4490 0
+4491 0
+4492 0
+4493 0
+4494 0
+4495 0
+4496 0
+4497 1
+4498 0
+4499 0
+4500 0
+4501 0
+4502 0
+4503 0
+4504 0
+4505 1
+4506 0
+4507 0
+4508 0
+4509 0
+4510 0
+4511 0
+4512 0
+4513 1
+4514 0
+4515 0
+4516 0
+4517 0
+4518 0
+4519 0
+4520 1
+4521 0
+4522 0
+4523 0
+4524 0
+4525 0
+4526 0
+4527 0
+4528 0
+4529 1
+4530 0
+4531 0
+4532 0
+4533 0
+4534 0
+4535 0
+4536 0
+4537 0
+4538 1
+4539 0
+4540 0
+4541 0
+4542 0
+4543 0
+4544 0
+4545 0
+4546 1
+4547 0
+4548 0
+4549 0
+4550 0
+4551 0
+4552 1
+4553 0
+4554 0
+4555 0
+4556 0
+4557 0
+4558 0
+4559 1
+4560 0
+4561 0
+4562 0
+4563 0
+4564 0
+4565 0
+4566 0
+4567 1
+4568 0
+4569 0
+4570 0
+4571 0
+4572 0
+4573 0
+4574 0
+4575 1
+4576 0
+4577 0
+4578 0
+4579 0
+4580 0
+4581 0
+4582 0
+4583 1
+4584 0
+4585 0
+4586 0
+4587 0
+4588 0
+4589 0
+4590 0
+4591 1
+4592 0
+4593 0
+4594 0
+4595 0
+4596 0
+4597 0
+4598 0
+4599 0
+4600 1
+4601 0
+4602 0
+4603 0
+4604 0
+4605 0
+4606 0
+4607 1
+4608 0
+4609 0
+4610 0
+4611 0
+4612 0
+4613 0
+4614 0
+4615 0
+4616 1
+4617 0
+4618 0
+4619 0
+4620 0
+4621 0
+4622 0
+4623 0
+4624 0
+4625 1
+4626 0
+4627 0
+4628 0
+4629 0
+4630 0
+4631 0
+4632 0
+4633 0
+4634 1
+4635 0
+4636 0
+4637 0
+4638 0
+4639 0
+4640 0
+4641 0
+4642 0
+4643 0
+4644 0
+4645 0
+4646 0
+4647 0
+4648 0
+4649 0
+4650 0
+4651 0
+4652 1
+4653 0
+4654 0
+4655 0
+4656 0
+4657 0
+4658 0
+4659 0
+4660 0
+4661 1
+4662 0
+4663 0
+4664 0
+4665 1
+4666 0
+4667 0
+4668 0
+4669 0
+4670 0
+4671 0
+4672 1
+4673 0
+4674 0
+4675 0
+4676 0
+4677 0
+4678 1
+4679 0
+4680 0
+4681 0
+4682 0
+4683 0
+4684 0
+4685 0
+4686 1
+4687 0
+4688 0
+4689 0
+4690 0
+4691 0
+4692 0
+4693 0
+4694 1
+4695 0
+4696 0
+4697 0
+4698 0
+4699 0
+4700 0
+4701 0
+4702 1
+4703 0
+4704 0
+4705 0
+4706 0
+4707 0
+4708 0
+4709 1
+4710 0
+4711 0
+4712 0
+4713 0
+4714 0
+4715 0
+4716 0
+4717 1
+4718 0
+4719 0
+4720 0
+4721 0
+4722 0
+4723 0
+4724 0
+4725 1
+4726 0
+4727 0
+4728 0
+4729 0
+4730 0
+4731 0
+4732 0
+4733 0
+4734 1
+4735 0
+4736 0
+4737 0
+4738 0
+4739 0
+4740 0
+4741 0
+4742 0
+4743 0
+4744 1
+4745 0
+4746 0
+4747 0
+4748 0
+4749 0
+4750 0
+4751 0
+4752 1
+4753 0
+4754 0
+4755 0
+4756 0
+4757 0
+4758 0
+4759 0
+4760 1
+4761 0
+4762 0
+4763 0
+4764 0
+4765 0
+4766 0
+4767 0
+4768 0
+4769 1
+4770 0
+4771 0
+4772 0
+4773 0
+4774 0
+4775 0
+4776 0
+4777 0
+4778 1
+4779 0
+4780 0
+4781 0
+4782 0
+4783 0
+4784 0
+4785 0
+4786 1
+4787 0
+4788 0
+4789 0
+4790 0
+4791 0
+4792 0
+4793 0
+4794 0
+4795 0
+4796 1
+4797 0
+4798 0
+4799 0
+4800 0
+4801 0
+4802 0
+4803 0
+4804 1
+4805 0
+4806 0
+4807 0
+4808 0
+4809 0
+4810 0
+4811 0
+4812 0
+4813 1
+4814 0
+4815 0
+4816 0
+4817 0
+4818 0
+4819 0
+4820 0
+4821 0
+4822 1
+4823 0
+4824 0
+4825 0
+4826 0
+4827 0
+4828 0
+4829 0
+4830 0
+4831 1
+4832 0
+4833 0
+4834 0
+4835 0
+4836 0
+4837 0
+4838 0
+4839 0
+4840 0
+4841 0
+4842 0
+4843 0
+4844 0
+4845 0
+4846 0
+4847 0
+4848 0
+4849 0
+4850 0
+4851 0
+4852 0
+4853 0
+4854 0
+4855 0
+4856 0
+4857 0
+4858 0
+4859 0
+4860 0
+4861 0
+4862 0
+4863 0
+4864 0
+4865 1
+4866 0
+4867 0
+4868 0
+4869 0
+4870 0
+4871 0
+4872 1
+4873 0
+4874 0
+4875 0
+4876 0
+4877 0
+4878 0
+4879 0
+4880 1
+4881 0
+4882 0
+4883 0
+4884 0
+4885 0
+4886 0
+4887 0
+4888 0
+4889 0
+4890 1
+4891 0
+4892 0
+4893 0
+4894 0
+4895 0
+4896 0
+4897 0
+4898 1
+4899 0
+4900 0
+4901 0
+4902 0
+4903 0
+4904 0
+4905 1
+4906 0
+4907 0
+4908 0
+4909 0
+4910 0
+4911 0
+4912 0
+4913 1
+4914 0
+4915 0
+4916 0
+4917 0
+4918 0
+4919 0
+4920 0
+4921 0
+4922 0
+4923 1
+4924 0
+4925 0
+4926 0
+4927 0
+4928 0
+4929 0
+4930 0
+4931 0
+4932 0
+4933 1
+4934 0
+4935 0
+4936 0
+4937 0
+4938 0
+4939 0
+4940 0
+4941 0
+4942 0
+4943 0
+4944 0
+4945 0
+4946 0
+4947 0
+4948 1
+4949 0
+4950 0
+4951 0
+4952 0
+4953 0
+4954 0
+4955 0
+4956 1
+4957 0
+4958 0
+4959 0
+4960 0
+4961 0
+4962 0
+4963 0
+4964 1
+4965 0
+4966 0
+4967 0
+4968 0
+4969 0
+4970 0
+4971 0
+4972 1
+4973 0
+4974 0
+4975 0
+4976 0
+4977 0
+4978 0
+4979 1
+4980 0
+4981 0
+4982 0
+4983 0
+4984 0
+4985 0
+4986 0
+4987 1
+4988 0
+4989 0
+4990 0
+4991 0
+4992 0
+4993 0
+4994 1
+4995 0
+4996 0
+4997 0
+4998 0
+4999 0
+5000 0
+5001 0
+5002 0
+5003 1
+5004 0
+5005 0
+5006 0
+5007 0
+5008 0
+5009 0
+5010 0
+5011 0
+5012 1
+5013 0
+5014 0
+5015 0
+5016 0
+5017 0
+5018 0
+5019 0
+5020 1
+5021 0
+5022 0
+5023 0
+5024 0
+5025 0
+5026 0
+5027 0
+5028 0
+5029 1
+5030 0
+5031 0
+5032 0
+5033 0
+5034 0
+5035 0
+5036 0
+5037 1
+5038 0
+5039 0
+5040 0
+5041 0
+5042 0
+5043 0
+5044 0
+5045 1
+5046 0
+5047 0
+5048 0
+5049 0
+5050 0
+5051 0
+5052 0
+5053 1
+5054 0
+5055 0
+5056 0
+5057 0
+5058 0
+5059 0
+5060 0
+5061 0
+5062 1
+5063 0
+5064 0
+5065 0
+5066 0
+5067 0
+5068 0
+5069 0
+5070 0
+5071 0
+5072 0
+5073 0
+5074 0
+5075 0
+5076 0
+5077 0
+5078 0
+5079 1
+5080 0
+5081 0
+5082 0
+5083 0
+5084 0
+5085 0
+5086 1
+5087 0
+5088 0
+5089 0
+5090 0
+5091 0
+5092 0
+5093 0
+5094 1
+5095 0
+5096 0
+5097 0
+5098 0
+5099 0
+5100 0
+5101 0
+5102 0
+5103 1
+5104 0
+5105 0
+5106 0
+5107 0
+5108 0
+5109 0
+5110 1
+5111 0
+5112 0
+5113 0
+5114 0
+5115 0
+5116 0
+5117 0
+5118 1
+5119 0
+5120 0
+5121 0
+5122 0
+5123 0
+5124 0
+5125 0
+5126 0
+5127 1
+5128 0
+5129 0
+5130 0
+5131 0
+5132 0
+5133 0
+5134 1
+5135 0
+5136 0
+5137 0
+5138 0
+5139 0
+5140 0
+5141 1
+5142 0
+5143 0
+5144 0
+5145 0
+5146 0
+5147 0
+5148 0
+5149 1
+5150 0
+5151 0
+5152 0
+5153 0
+5154 0
+5155 0
+5156 0
+5157 0
+5158 1
+5159 0
+5160 0
+5161 0
+5162 0
+5163 0
+5164 0
+5165 0
+5166 0
+5167 1
+5168 0
+5169 0
+5170 0
+5171 0
+5172 0
+5173 0
+5174 0
+5175 1
+5176 0
+5177 0
+5178 0
+5179 0
+5180 0
+5181 0
+5182 1
+5183 0
+5184 0
+5185 0
+5186 0
+5187 0
+5188 0
+5189 0
+5190 1
+5191 0
+5192 0
+5193 0
+5194 0
+5195 0
+5196 0
+5197 0
+5198 0
+5199 1
+5200 0
+5201 0
+5202 0
+5203 0
+5204 0
+5205 0
+5206 0
+5207 0
+5208 1
+5209 0
+5210 0
+5211 0
+5212 0
+5213 0
+5214 0
+5215 0
+5216 0
+5217 0
+5218 1
+5219 0
+5220 0
+5221 0
+5222 0
+5223 0
+5224 0
+5225 0
+5226 1
+5227 0
+5228 0
+5229 0
+5230 0
+5231 0
+5232 0
+5233 0
+5234 1
+5235 0
+5236 0
+5237 0
+5238 0
+5239 0
+5240 0
+5241 0
+5242 1
+5243 0
+5244 0
+5245 0
+5246 0
+5247 0
+5248 0
+5249 0
+5250 0
+5251 1
+5252 0
+5253 0
+5254 0
+5255 0
+5256 0
+5257 0
+5258 0
+5259 0
+5260 0
+5261 0
+5262 0
+5263 0
+5264 0
+5265 0
+5266 0
+5267 0
+5268 1
+5269 0
+5270 0
+5271 0
+5272 0
+5273 0
+5274 0
+5275 0
+5276 1
+5277 0
+5278 0
+5279 0
+5280 0
+5281 0
+5282 0
+5283 1
+5284 0
+5285 0
+5286 0
+5287 0
+5288 0
+5289 0
+5290 0
+5291 0
+5292 0
+5293 1
+5294 0
+5295 0
+5296 0
+5297 0
+5298 0
+5299 0
+5300 0
+5301 1
+5302 0
+5303 0
+5304 0
+5305 0
+5306 0
+5307 0
+5308 0
+5309 0
+5310 1
+5311 0
+5312 0
+5313 0
+5314 0
+5315 0
+5316 0
+5317 0
+5318 1
+5319 0
+5320 0
+5321 0
+5322 0
+5323 0
+5324 0
+5325 1
+5326 0
+5327 0
+5328 0
+5329 0
+5330 0
+5331 0
+5332 0
+5333 0
+5334 0
+5335 0
+5336 0
+5337 0
+5338 0
+5339 0
+5340 0
+5341 0
+5342 1
+5343 0
+5344 0
+5345 0
+5346 0
+5347 0
+5348 0
+5349 1
+5350 0
+5351 0
+5352 0
+5353 0
+5354 0
+5355 0
+5356 0
+5357 0
+5358 1
+5359 0
+5360 0
+5361 0
+5362 0
+5363 0
+5364 0
+5365 0
+5366 1
+5367 0
+5368 0
+5369 0
+5370 0
+5371 0
+5372 0
+5373 1
+5374 0
+5375 0
+5376 0
+5377 0
+5378 0
+5379 0
+5380 0
+5381 1
+5382 0
+5383 0
+5384 0
+5385 0
+5386 0
+5387 0
+5388 0
+5389 0
+5390 1
+5391 0
+5392 0
+5393 0
+5394 0
+5395 0
+5396 0
+5397 0
+5398 1
+5399 0
+5400 0
+5401 0
+5402 0
+5403 0
+5404 0
+5405 0
+5406 1
+5407 0
+5408 0
+5409 0
+5410 0
+5411 0
+5412 0
+5413 0
+5414 1
+5415 0
+5416 0
+5417 0
+5418 0
+5419 0
+5420 0
+5421 0
+5422 1
+5423 0
+5424 0
+5425 0
+5426 0
+5427 0
+5428 0
+5429 0
+5430 0
+5431 0
+5432 0
+5433 0
+5434 0
+5435 0
+5436 0
+5437 0
+5438 1
+5439 0
+5440 0
+5441 0
+5442 0
+5443 0
+5444 0
+5445 0
+5446 0
+5447 1
+5448 0
+5449 0
+5450 0
+5451 0
+5452 0
+5453 0
+5454 0
+5455 0
+5456 1
+5457 0
+5458 0
+5459 0
+5460 0
+5461 0
+5462 0
+5463 0
+5464 1
+5465 0
+5466 0
+5467 0
+5468 0
+5469 0
+5470 0
+5471 0
+5472 1
+5473 0
+5474 0
+5475 0
+5476 0
+5477 0
+5478 0
+5479 0
+5480 0
+5481 1
+5482 0
+5483 0
+5484 0
+5485 0
+5486 0
+5487 0
+5488 0
+5489 1
+5490 0
+5491 0
+5492 0
+5493 0
+5494 0
+5495 0
+5496 0
+5497 0
+5498 1
+5499 0
+5500 0
+5501 0
+5502 0
+5503 0
+5504 0
+5505 0
+5506 1
+5507 0
+5508 0
+5509 0
+5510 0
+5511 0
+5512 0
+5513 0
+5514 1
+5515 0
+5516 0
+5517 0
+5518 0
+5519 0
+5520 0
+5521 0
+5522 0
+5523 1
+5524 0
+5525 0
+5526 0
+5527 0
+5528 0
+5529 0
+5530 0
+5531 1
+5532 0
+5533 0
+5534 0
+5535 0
+5536 0
+5537 0
+5538 0
+5539 0
+5540 1
+5541 0
+5542 0
+5543 0
+5544 0
+5545 0
+5546 0
+5547 0
+5548 0
+5549 1
+5550 0
+5551 0
+5552 0
+5553 0
+5554 0
+5555 0
+5556 0
+5557 0
+5558 0
+5559 0
+5560 0
+5561 0
+5562 0
+5563 0
+5564 0
+5565 1
+5566 0
+5567 0
+5568 0
+5569 0
+5570 0
+5571 1
+5572 0
+5573 0
+5574 0
+5575 0
+5576 0
+5577 0
+5578 0
+5579 1
+5580 0
+5581 0
+5582 0
+5583 0
+5584 0
+5585 0
+5586 0
+5587 0
+5588 1
+5589 0
+5590 0
+5591 0
+5592 0
+5593 0
+5594 0
+5595 0
+5596 1
+5597 0
+5598 0
+5599 0
+5600 0
+5601 0
+5602 0
+5603 0
+5604 0
+5605 0
+5606 1
+5607 0
+5608 0
+5609 0
+5610 0
+5611 0
+5612 0
+5613 0
+5614 1
+5615 0
+5616 0
+5617 0
+5618 0
+5619 0
+5620 0
+5621 0
+5622 1
+5623 0
+5624 0
+5625 0
+5626 0
+5627 0
+5628 0
+5629 0
+5630 0
+5631 0
+5632 0
+5633 0
+5634 0
+5635 0
+5636 0
+5637 0
+5638 1
+5639 0
+5640 0
+5641 0
+5642 0
+5643 0
+5644 0
+5645 0
+5646 0
+5647 1
+5648 0
+5649 0
+5650 0
+5651 0
+5652 0
+5653 0
+5654 1
+5655 0
+5656 0
+5657 0
+5658 0
+5659 0
+5660 0
+5661 0
+5662 1
+5663 0
+5664 0
+5665 0
+5666 0
+5667 0
+5668 0
+5669 0
+5670 1
+5671 0
+5672 0
+5673 0
+5674 0
+5675 0
+5676 0
+5677 0
+5678 0
+5679 1
+5680 2
+5681 1
+5682 0
+5683 0
+5684 0
+5685 0
+5686 0
+5687 1
+5688 0
+5689 0
+5690 0
+5691 0
+5692 1
+5693 0
+5694 0
+5695 0
+5696 0
+5697 1
+5698 0
+5699 0
+5700 0
+5701 0
+5702 0
+5703 0
+5704 0
+5705 1
+5706 0
+5707 0
+5708 0
+5709 0
+5710 0
+5711 1
+5712 0
+5713 0
+5714 0
+5715 0
+5716 0
+5717 0
+5718 0
+5719 0
+5720 0
+5721 0
+5722 0
+5723 0
+5724 0
+5725 0
+5726 1
+5727 0
+5728 0
+5729 0
+5730 0
+5731 0
+5732 0
+5733 0
+5734 1
+5735 0
+5736 0
+5737 0
+5738 0
+5739 0
+5740 0
+5741 0
+5742 1
+5743 0
+5744 0
+5745 0
+5746 0
+5747 0
+5748 0
+5749 0
+5750 0
+5751 1
+5752 0
+5753 0
+5754 0
+5755 0
+5756 0
+5757 0
+5758 0
+5759 1
+5760 0
+5761 0
+5762 0
+5763 0
+5764 0
+5765 0
+5766 1
+5767 0
+5768 0
+5769 0
+5770 0
+5771 0
+5772 0
+5773 0
+5774 1
+5775 0
+5776 0
+5777 0
+5778 0
+5779 0
+5780 0
+5781 0
+5782 1
+5783 0
+5784 0
+5785 0
+5786 0
+5787 0
+5788 0
+5789 0
+5790 0
+5791 1
+5792 0
+5793 0
+5794 0
+5795 0
+5796 0
+5797 0
+5798 0
+5799 0
+5800 1
+5801 0
+5802 0
+5803 0
+5804 0
+5805 0
+5806 0
+5807 0
+5808 0
+5809 1
+5810 0
+5811 0
+5812 0
+5813 0
+5814 0
+5815 0
+5816 1
+5817 0
+5818 0
+5819 0
+5820 0
+5821 0
+5822 0
+5823 0
+5824 0
+5825 1
+5826 0
+5827 0
+5828 0
+5829 0
+5830 0
+5831 0
+5832 0
+5833 0
+5834 1
+5835 0
+5836 0
+5837 0
+5838 0
+5839 0
+5840 0
+5841 0
+5842 1
+5843 0
+5844 0
+5845 0
+5846 0
+5847 0
+5848 0
+5849 0
+5850 1
+5851 0
+5852 0
+5853 0
+5854 0
+5855 0
+5856 0
+5857 0
+5858 1
+5859 0
+5860 0
+5861 0
+5862 0
+5863 0
+5864 0
+5865 0
+5866 0
+5867 1
+5868 0
+5869 0
+5870 0
+5871 0
+5872 0
+5873 0
+5874 0
+5875 1
+5876 0
+5877 0
+5878 0
+5879 0
+5880 0
+5881 0
+5882 0
+5883 0
+5884 1
+5885 0
+5886 0
+5887 0
+5888 0
+5889 0
+5890 0
+5891 1
+5892 0
+5893 0
+5894 0
+5895 0
+5896 0
+5897 0
+5898 0
+5899 0
+5900 1
+5901 0
+5902 0
+5903 0
+5904 0
+5905 0
+5906 0
+5907 0
+5908 0
+5909 1
+5910 0
+5911 0
+5912 0
+5913 0
+5914 0
+5915 0
+5916 0
+5917 1
+5918 0
+5919 0
+5920 0
+5921 0
+5922 0
+5923 0
+5924 0
+5925 0
+5926 1
+5927 0
+5928 0
+5929 0
+5930 0
+5931 0
+5932 0
+5933 0
+5934 1
+5935 0
+5936 0
+5937 0
+5938 0
+5939 0
+5940 0
+5941 0
+5942 0
+5943 0
+5944 1
+5945 0
+5946 0
+5947 0
+5948 0
+5949 0
+5950 0
+5951 0
+5952 0
+5953 0
+5954 0
+5955 0
+5956 0
+5957 0
+5958 0
+5959 0
+5960 0
+5961 0
+5962 0
+5963 0
+5964 0
+5965 0
+5966 0
+5967 0
+5968 0
+5969 0
+5970 1
+5971 0
+5972 0
+5973 0
+5974 0
+5975 0
+5976 0
+5977 0
+5978 1
+5979 0
+5980 0
+5981 0
+5982 0
+5983 0
+5984 0
+5985 0
+5986 0
+5987 1
+5988 0
+5989 0
+5990 0
+5991 0
+5992 0
+5993 0
+5994 0
+5995 0
+5996 1
+5997 0
+5998 0
+5999 0
+6000 0
+6001 0
+6002 0
+6003 0
+6004 0
+6005 0
+6006 1
+6007 0
+6008 0
+6009 0
+6010 0
+6011 0
+6012 0
+6013 0
+6014 1
+6015 0
+6016 0
+6017 0
+6018 0
+6019 0
+6020 0
+6021 0
+6022 0
+6023 1
+6024 0
+6025 0
+6026 0
+6027 0
+6028 0
+6029 0
+6030 0
+6031 1
+6032 0
+6033 0
+6034 0
+6035 0
+6036 0
+6037 0
+6038 1
+6039 0
+6040 0
+6041 0
+6042 0
+6043 0
+6044 0
+6045 0
+6046 0
+6047 0
+6048 1
+6049 0
+6050 0
+6051 0
+6052 0
+6053 0
+6054 0
+6055 1
+6056 0
+6057 0
+6058 0
+6059 0
+6060 0
+6061 1
+6062 0
+6063 0
+6064 0
+6065 0
+6066 0
+6067 0
+6068 1
+6069 0
+6070 0
+6071 0
+6072 0
+6073 0
+6074 0
+6075 0
+6076 1
+6077 0
+6078 0
+6079 0
+6080 0
+6081 0
+6082 0
+6083 0
+6084 0
+6085 1
+6086 0
+6087 0
+6088 0
+6089 0
+6090 0
+6091 0
+6092 0
+6093 0
+6094 0
+6095 1
+6096 0
+6097 0
+6098 0
+6099 0
+6100 0
+6101 0
+6102 0
+6103 0
+6104 1
+6105 0
+6106 0
+6107 0
+6108 0
+6109 0
+6110 0
+6111 0
+6112 1
+6113 0
+6114 0
+6115 0
+6116 0
+6117 0
+6118 0
+6119 0
+6120 0
+6121 0
+6122 0
+6123 0
+6124 0
+6125 1
+6126 0
+6127 0
+6128 0
+6129 0
+6130 0
+6131 0
+6132 0
+6133 0
+6134 0
+6135 0
+6136 0
+6137 0
+6138 0
+6139 0
+6140 0
+6141 0
+6142 1
+6143 0
+6144 0
+6145 0
+6146 0
+6147 0
+6148 0
+6149 0
+6150 1
+6151 0
+6152 0
+6153 0
+6154 0
+6155 0
+6156 0
+6157 0
+6158 0
+6159 1
+6160 0
+6161 0
+6162 0
+6163 0
+6164 0
+6165 0
+6166 0
+6167 1
+6168 0
+6169 0
+6170 0
+6171 0
+6172 0
+6173 0
+6174 0
+6175 1
+6176 0
+6177 0
+6178 0
+6179 0
+6180 0
+6181 0
+6182 0
+6183 1
+6184 0
+6185 0
+6186 0
+6187 0
+6188 0
+6189 0
+6190 0
+6191 0
+6192 1
+6193 0
+6194 0
+6195 0
+6196 0
+6197 0
+6198 0
+6199 0
+6200 0
+6201 1
+6202 0
+6203 0
+6204 0
+6205 0
+6206 0
+6207 0
+6208 0
+6209 0
+6210 1
+6211 0
+6212 0
+6213 0
+6214 0
+6215 0
+6216 0
+6217 1
+6218 0
+6219 0
+6220 0
+6221 0
+6222 0
+6223 0
+6224 0
+6225 1
+6226 0
+6227 0
+6228 0
+6229 0
+6230 0
+6231 0
+6232 0
+6233 0
+6234 1
+6235 0
+6236 0
+6237 0
+6238 0
+6239 0
+6240 0
+6241 1
+6242 0
+6243 0
+6244 0
+6245 0
+6246 0
+6247 0
+6248 0
+6249 0
+6250 1
+6251 0
+6252 0
+6253 0
+6254 0
+6255 0
+6256 0
+6257 0
+6258 1
+6259 0
+6260 0
+6261 0
+6262 0
+6263 0
+6264 0
+6265 0
+6266 0
+6267 0
+6268 1
+6269 0
+6270 0
+6271 0
+6272 0
+6273 0
+6274 0
+6275 0
+6276 0
+6277 1
+6278 0
+6279 0
+6280 0
+6281 0
+6282 0
+6283 0
+6284 0
+6285 1
+6286 0
+6287 0
+6288 0
+6289 0
+6290 0
+6291 0
+6292 1
+6293 0
+6294 0
+6295 0
+6296 0
+6297 0
+6298 0
+6299 1
+6300 0
+6301 0
+6302 0
+6303 0
+6304 0
+6305 0
+6306 0
+6307 1
+6308 0
+6309 0
+6310 0
+6311 0
+6312 0
+6313 0
+6314 0
+6315 1
+6316 0
+6317 0
+6318 0
+6319 0
+6320 0
+6321 0
+6322 0
+6323 0
+6324 1
+6325 0
+6326 0
+6327 0
+6328 0
+6329 0
+6330 0
+6331 0
+6332 1
+6333 0
+6334 0
+6335 0
+6336 0
+6337 0
+6338 0
+6339 0
+6340 0
+6341 1
+6342 0
+6343 0
+6344 0
+6345 0
+6346 0
+6347 0
+6348 0
+6349 0
+6350 1
+6351 0
+6352 0
+6353 0
+6354 0
+6355 0
+6356 0
+6357 0
+6358 1
+6359 0
+6360 0
+6361 0
+6362 0
+6363 0
+6364 0
+6365 0
+6366 1
+6367 0
+6368 0
+6369 0
+6370 0
+6371 0
+6372 0
+6373 0
+6374 0
+6375 1
+6376 0
+6377 0
+6378 0
+6379 0
+6380 0
+6381 0
+6382 0
+6383 1
+6384 0
+6385 0
+6386 0
+6387 0
+6388 0
+6389 0
+6390 0
+6391 4
+6392 0
+6393 1
+6394 0
+6395 0
+6396 0
+6397 1
+6398 0
+6399 0
+6400 0
+6401 0
+6402 1
+6403 0
+6404 0
+6405 0
+6406 0
+6407 1
+6408 0
+6409 0
+6410 0
+6411 0
+6412 1
+6413 0
+6414 0
+6415 0
+6416 0
+6417 0
+6418 1
+6419 0
+6420 0
+6421 0
+6422 0
+6423 0
+6424 0
+6425 1
+6426 0
+6427 0
+6428 0
+6429 0
+6430 0
+6431 0
+6432 0
+6433 0
+6434 1
+6435 0
+6436 0
+6437 0
+6438 0
+6439 0
+6440 0
+6441 0
+6442 0
+6443 1
+6444 0
+6445 0
+6446 0
+6447 0
+6448 0
+6449 0
+6450 0
+6451 0
+6452 1
+6453 0
+6454 0
+6455 0
+6456 0
+6457 0
+6458 0
+6459 0
+6460 0
+6461 0
+6462 0
+6463 1
+6464 0
+6465 0
+6466 0
+6467 0
+6468 0
+6469 0
+6470 0
+6471 0
+6472 1
+6473 0
+6474 0
+6475 0
+6476 0
+6477 0
+6478 0
+6479 0
+6480 0
+6481 0
+6482 1
+6483 0
+6484 0
+6485 0
+6486 0
+6487 0
+6488 0
+6489 0
+6490 0
+6491 0
+6492 1
+6493 0
+6494 0
+6495 0
+6496 0
+6497 0
+6498 0
+6499 0
+6500 0
+6501 0
+6502 0
+6503 0
+6504 0
+6505 0
+6506 0
+6507 0
+6508 0
+6509 0
+6510 0
+6511 0
+6512 1
+6513 0
+6514 0
+6515 0
+6516 0
+6517 0
+6518 0
+6519 0
+6520 0
+6521 1
+6522 0
+6523 0
+6524 0
+6525 0
+6526 0
+6527 0
+6528 0
+6529 0
+6530 0
+6531 1
+6532 0
+6533 0
+6534 0
+6535 0
+6536 0
+6537 0
+6538 0
+6539 0
+6540 1
+6541 0
+6542 0
+6543 0
+6544 0
+6545 0
+6546 0
+6547 0
+6548 0
+6549 0
+6550 1
+6551 0
+6552 0
+6553 0
+6554 0
+6555 0
+6556 0
+6557 0
+6558 0
+6559 0
+6560 1
+6561 0
+6562 0
+6563 0
+6564 0
+6565 0
+6566 0
+6567 0
+6568 0
+6569 1
+6570 0
+6571 0
+6572 0
+6573 0
+6574 0
+6575 0
+6576 0
+6577 1
+6578 0
+6579 0
+6580 0
+6581 0
+6582 0
+6583 0
+6584 0
+6585 0
+6586 1
+6587 0
+6588 0
+6589 0
+6590 0
+6591 0
+6592 0
+6593 0
+6594 0
+6595 1
+6596 0
+6597 0
+6598 0
+6599 0
+6600 0
+6601 0
+6602 0
+6603 0
+6604 1
+6605 0
+6606 0
+6607 0
+6608 0
+6609 0
+6610 0
+6611 0
+6612 0
+6613 1
+6614 0
+6615 0
+6616 0
+6617 0
+6618 0
+6619 0
+6620 0
+6621 0
+6622 1
+6623 0
+6624 0
+6625 0
+6626 0
+6627 0
+6628 0
+6629 0
+6630 0
+6631 1
+6632 0
+6633 0
+6634 0
+6635 0
+6636 0
+6637 0
+6638 0
+6639 0
+6640 1
+6641 0
+6642 0
+6643 0
+6644 0
+6645 0
+6646 0
+6647 0
+6648 0
+6649 0
+6650 1
+6651 0
+6652 0
+6653 0
+6654 0
+6655 0
+6656 0
+6657 0
+6658 0
+6659 0
+6660 1
+6661 0
+6662 0
+6663 0
+6664 0
+6665 0
+6666 0
+6667 0
+6668 0
+6669 1
+6670 0
+6671 0
+6672 0
+6673 0
+6674 0
+6675 0
+6676 0
+6677 0
+6678 0
+6679 1
+6680 0
+6681 0
+6682 0
+6683 0
+6684 0
+6685 0
+6686 0
+6687 0
+6688 1
+6689 0
+6690 0
+6691 0
+6692 0
+6693 0
+6694 0
+6695 0
+6696 0
+6697 0
+6698 1
+6699 0
+6700 0
+6701 0
+6702 0
+6703 0
+6704 0
+6705 0
+6706 1
+6707 0
+6708 0
+6709 0
+6710 0
+6711 0
+6712 0
+6713 0
+6714 0
+6715 0
+6716 1
+6717 0
+6718 0
+6719 0
+6720 0
+6721 0
+6722 0
+6723 0
+6724 0
+6725 0
+6726 1
+6727 0
+6728 0
+6729 0
+6730 0
+6731 0
+6732 0
+6733 0
+6734 0
+6735 0
+6736 0
+6737 1
+6738 0
+6739 0
+6740 0
+6741 0
+6742 0
+6743 0
+6744 0
+6745 0
+6746 1
+6747 0
+6748 0
+6749 0
+6750 0
+6751 0
+6752 0
+6753 0
+6754 0
+6755 0
+6756 1
+6757 0
+6758 0
+6759 0
+6760 0
+6761 0
+6762 0
+6763 0
+6764 0
+6765 0
+6766 1
+6767 0
+6768 0
+6769 0
+6770 0
+6771 0
+6772 0
+6773 0
+6774 0
+6775 1
+6776 0
+6777 0
+6778 0
+6779 0
+6780 0
+6781 0
+6782 0
+6783 0
+6784 1
+6785 0
+6786 0
+6787 0
+6788 0
+6789 0
+6790 0
+6791 0
+6792 0
+6793 0
+6794 1
+6795 0
+6796 0
+6797 0
+6798 0
+6799 0
+6800 0
+6801 0
+6802 0
+6803 1
+6804 0
+6805 0
+6806 0
+6807 0
+6808 0
+6809 0
+6810 0
+6811 0
+6812 0
+6813 1
+6814 0
+6815 0
+6816 0
+6817 0
+6818 0
+6819 0
+6820 0
+6821 0
+6822 0
+6823 0
+6824 1
+6825 0
+6826 0
+6827 0
+6828 0
+6829 0
+6830 0
+6831 0
+6832 1
+6833 0
+6834 0
+6835 0
+6836 0
+6837 0
+6838 0
+6839 0
+6840 0
+6841 0
+6842 1
+6843 0
+6844 0
+6845 0
+6846 0
+6847 0
+6848 0
+6849 0
+6850 0
+6851 1
+6852 0
+6853 0
+6854 0
+6855 0
+6856 0
+6857 0
+6858 0
+6859 0
+6860 0
+6861 0
+6862 1
+6863 0
+6864 0
+6865 0
+6866 0
+6867 0
+6868 0
+6869 0
+6870 0
+6871 1
+6872 0
+6873 0
+6874 0
+6875 0
+6876 0
+6877 0
+6878 0
+6879 1
+6880 0
+6881 0
+6882 0
+6883 0
+6884 0
+6885 0
+6886 1
+6887 0
+6888 0
+6889 0
+6890 0
+6891 0
+6892 0
+6893 0
+6894 0
+6895 1
+6896 0
+6897 0
+6898 0
+6899 0
+6900 0
+6901 0
+6902 0
+6903 0
+6904 0
+6905 0
+6906 0
+6907 0
+6908 0
+6909 0
+6910 0
+6911 0
+6912 0
+6913 0
+6914 1
+6915 0
+6916 0
+6917 0
+6918 0
+6919 0
+6920 0
+6921 0
+6922 0
+6923 1
+6924 0
+6925 0
+6926 0
+6927 0
+6928 0
+6929 0
+6930 0
+6931 0
+6932 0
+6933 0
+6934 1
+6935 0
+6936 0
+6937 0
+6938 0
+6939 0
+6940 0
+6941 0
+6942 0
+6943 0
+6944 1
+6945 0
+6946 0
+6947 0
+6948 0
+6949 0
+6950 0
+6951 0
+6952 0
+6953 0
+6954 1
+6955 0
+6956 0
+6957 0
+6958 0
+6959 0
+6960 0
+6961 0
+6962 0
+6963 0
+6964 1
+6965 0
+6966 0
+6967 0
+6968 0
+6969 0
+6970 0
+6971 0
+6972 0
+6973 0
+6974 1
+6975 0
+6976 0
+6977 0
+6978 0
+6979 0
+6980 0
+6981 0
+6982 0
+6983 1
+6984 0
+6985 0
+6986 0
+6987 0
+6988 0
+6989 0
+6990 0
+6991 0
+6992 1
+6993 0
+6994 0
+6995 0
+6996 0
+6997 0
+6998 0
+6999 0
+7000 0
+7001 1
+7002 0
+7003 0
+7004 0
+7005 0
+7006 0
+7007 0
+7008 0
+7009 0
+7010 1
+7011 0
+7012 0
+7013 0
+7014 0
+7015 0
+7016 0
+7017 0
+7018 0
+7019 0
+7020 1
+7021 0
+7022 0
+7023 0
+7024 0
+7025 0
+7026 0
+7027 0
+7028 0
+7029 0
+7030 1
+7031 0
+7032 0
+7033 0
+7034 0
+7035 0
+7036 0
+7037 0
+7038 0
+7039 1
+7040 0
+7041 0
+7042 0
+7043 0
+7044 0
+7045 0
+7046 0
+7047 0
+7048 1
+7049 0
+7050 0
+7051 0
+7052 0
+7053 0
+7054 0
+7055 0
+7056 0
+7057 0
+7058 0
+7059 1
+7060 0
+7061 0
+7062 0
+7063 0
+7064 0
+7065 0
+7066 0
+7067 0
+7068 0
+7069 1
+7070 0
+7071 0
+7072 0
+7073 0
+7074 0
+7075 0
+7076 0
+7077 0
+7078 0
+7079 1
+7080 0
+7081 0
+7082 0
+7083 0
+7084 0
+7085 0
+7086 0
+7087 1
+7088 0
+7089 0
+7090 0
+7091 0
+7092 0
+7093 0
+7094 0
+7095 0
+7096 0
+7097 1
+7098 0
+7099 0
+7100 0
+7101 0
+7102 0
+7103 0
+7104 0
+7105 1
+7106 0
+7107 0
+7108 0
+7109 0
+7110 0
+7111 0
+7112 0
+7113 0
+7114 1
+7115 0
+7116 0
+7117 0
+7118 0
+7119 0
+7120 0
+7121 0
+7122 0
+7123 0
+7124 1
+7125 0
+7126 0
+7127 0
+7128 0
+7129 0
+7130 0
+7131 0
+7132 0
+7133 0
+7134 1
+7135 0
+7136 0
+7137 0
+7138 0
+7139 0
+7140 0
+7141 0
+7142 0
+7143 1
+7144 0
+7145 0
+7146 0
+7147 0
+7148 0
+7149 0
+7150 0
+7151 0
+7152 1
+7153 0
+7154 0
+7155 0
+7156 0
+7157 0
+7158 0
+7159 0
+7160 0
+7161 0
+7162 1
+7163 0
+7164 0
+7165 0
+7166 0
+7167 0
+7168 0
+7169 0
+7170 0
+7171 0
+7172 1
+7173 0
+7174 0
+7175 0
+7176 0
+7177 0
+7178 0
+7179 0
+7180 0
+7181 0
+7182 1
+7183 0
+7184 0
+7185 0
+7186 0
+7187 0
+7188 0
+7189 0
+7190 0
+7191 0
+7192 0
+7193 1
+7194 0
+7195 0
+7196 0
+7197 0
+7198 0
+7199 0
+7200 0
+7201 0
+7202 0
+7203 1
+7204 0
+7205 0
+7206 0
+7207 0
+7208 0
+7209 0
+7210 0
+7211 0
+7212 0
+7213 0
+7214 0
+7215 0
+7216 0
+7217 0
+7218 0
+7219 0
+7220 0
+7221 0
+7222 1
+7223 0
+7224 0
+7225 0
+7226 0
+7227 0
+7228 0
+7229 0
+7230 0
+7231 0
+7232 1
+7233 0
+7234 0
+7235 0
+7236 0
+7237 0
+7238 0
+7239 0
+7240 0
+7241 0
+7242 0
+7243 1
+7244 0
+7245 0
+7246 0
+7247 0
+7248 0
+7249 0
+7250 0
+7251 0
+7252 0
+7253 1
+7254 0
+7255 0
+7256 0
+7257 0
+7258 0
+7259 0
+7260 0
+7261 0
+7262 0
+7263 0
+7264 1
+7265 0
+7266 0
+7267 0
+7268 0
+7269 0
+7270 0
+7271 0
+7272 0
+7273 0
+7274 1
+7275 0
+7276 0
+7277 0
+7278 0
+7279 0
+7280 0
+7281 0
+7282 0
+7283 0
+7284 0
+7285 1
+7286 0
+7287 0
+7288 0
+7289 0
+7290 0
+7291 0
+7292 0
+7293 0
+7294 0
+7295 0
+7296 0
+7297 0
+7298 0
+7299 0
+7300 0
+7301 0
+7302 0
+7303 0
+7304 1
+7305 0
+7306 0
+7307 0
+7308 0
+7309 0
+7310 0
+7311 0
+7312 0
+7313 0
+7314 0
+7315 1
+7316 0
+7317 0
+7318 0
+7319 0
+7320 0
+7321 0
+7322 0
+7323 0
+7324 1
+7325 0
+7326 0
+7327 0
+7328 0
+7329 0
+7330 0
+7331 0
+7332 0
+7333 1
+7334 0
+7335 0
+7336 0
+7337 0
+7338 0
+7339 0
+7340 0
+7341 0
+7342 1
+7343 0
+7344 0
+7345 0
+7346 0
+7347 0
+7348 0
+7349 0
+7350 0
+7351 0
+7352 1
+7353 0
+7354 0
+7355 0
+7356 0
+7357 0
+7358 0
+7359 0
+7360 0
+7361 0
+7362 0
+7363 1
+7364 0
+7365 0
+7366 0
+7367 0
+7368 0
+7369 0
+7370 0
+7371 0
+7372 1
+7373 0
+7374 0
+7375 0
+7376 0
+7377 0
+7378 0
+7379 0
+7380 0
+7381 0
+7382 1
+7383 0
+7384 0
+7385 0
+7386 0
+7387 0
+7388 0
+7389 0
+7390 0
+7391 1
+7392 0
+7393 0
+7394 0
+7395 0
+7396 0
+7397 0
+7398 0
+7399 0
+7400 0
+7401 1
+7402 0
+7403 0
+7404 0
+7405 0
+7406 0
+7407 0
+7408 0
+7409 0
+7410 0
+7411 0
+7412 1
+7413 0
+7414 0
+7415 0
+7416 0
+7417 0
+7418 0
+7419 0
+7420 0
+7421 0
+7422 1
+7423 0
+7424 0
+7425 0
+7426 0
+7427 0
+7428 0
+7429 0
+7430 0
+7431 0
+7432 1
+7433 0
+7434 0
+7435 0
+7436 0
+7437 0
+7438 0
+7439 0
+7440 0
+7441 1
+7442 0
+7443 0
+7444 0
+7445 0
+7446 0
+7447 0
+7448 0
+7449 1
+7450 0
+7451 0
+7452 0
+7453 0
+7454 0
+7455 0
+7456 0
+7457 0
+7458 0
+7459 0
+7460 1
+7461 0
+7462 0
+7463 0
+7464 0
+7465 0
+7466 0
+7467 0
+7468 0
+7469 1
+7470 0
+7471 0
+7472 0
+7473 0
+7474 0
+7475 0
+7476 0
+7477 0
+7478 1
+7479 0
+7480 0
+7481 0
+7482 0
+7483 0
+7484 0
+7485 0
+7486 0
+7487 1
+7488 0
+7489 0
+7490 0
+7491 0
+7492 0
+7493 0
+7494 0
+7495 0
+7496 0
+7497 1
+7498 0
+7499 0
+7500 0
+7501 0
+7502 0
+7503 0
+7504 0
+7505 0
+7506 0
+7507 0
+7508 1
+7509 0
+7510 0
+7511 0
+7512 0
+7513 0
+7514 0
+7515 0
+7516 0
+7517 0
+7518 1
+7519 0
+7520 0
+7521 0
+7522 0
+7523 0
+7524 0
+7525 0
+7526 0
+7527 0
+7528 0
+7529 0
+7530 0
+7531 0
+7532 0
+7533 0
+7534 0
+7535 0
+7536 0
+7537 0
+7538 0
+7539 1
+7540 0
+7541 0
+7542 0
+7543 0
+7544 0
+7545 0
+7546 0
+7547 0
+7548 0
+7549 2
+7550 0
+7551 0
+7552 0
+7553 0
+7554 0
+7555 0
+7556 0
+7557 1
+7558 0
+7559 0
+7560 0
+7561 0
+7562 0
+7563 0
+7564 0
+7565 0
+7566 0
+7567 0
+7568 1
+7569 0
+7570 0
+7571 0
+7572 0
+7573 0
+7574 0
+7575 0
+7576 0
+7577 0
+7578 0
+7579 0
+7580 0
+7581 0
+7582 0
+7583 0
+7584 0
+7585 0
+7586 0
+7587 0
+7588 1
+7589 0
+7590 0
+7591 0
+7592 0
+7593 0
+7594 0
+7595 0
+7596 0
+7597 0
+7598 0
+7599 1
+7600 0
+7601 0
+7602 0
+7603 0
+7604 0
+7605 0
+7606 0
+7607 0
+7608 0
+7609 0
+7610 1
+7611 0
+7612 0
+7613 0
+7614 0
+7615 0
+7616 0
+7617 0
+7618 0
+7619 0
+7620 0
+7621 1
+7622 0
+7623 0
+7624 0
+7625 0
+7626 0
+7627 1
+7628 0
+7629 0
+7630 0
+7631 0
+7632 0
+7633 0
+7634 1
+7635 0
+7636 0
+7637 0
+7638 0
+7639 0
+7640 0
+7641 1
+7642 0
+7643 0
+7644 0
+7645 0
+7646 0
+7647 0
+7648 0
+7649 1
+7650 0
+7651 0
+7652 0
+7653 0
+7654 0
+7655 0
+7656 0
+7657 0
+7658 0
+7659 0
+7660 1
+7661 0
+7662 0
+7663 0
+7664 0
+7665 0
+7666 0
+7667 0
+7668 0
+7669 0
+7670 1
+7671 0
+7672 0
+7673 0
+7674 0
+7675 0
+7676 0
+7677 0
+7678 0
+7679 0
+7680 0
+7681 1
+7682 0
+7683 0
+7684 0
+7685 0
+7686 0
+7687 0
+7688 0
+7689 0
+7690 0
+7691 1
+7692 0
+7693 0
+7694 0
+7695 0
+7696 0
+7697 0
+7698 0
+7699 0
+7700 0
+7701 0
+7702 1
+7703 0
+7704 0
+7705 0
+7706 0
+7707 0
+7708 0
+7709 0
+7710 0
+7711 0
+7712 1
+7713 0
+7714 0
+7715 0
+7716 0
+7717 0
+7718 0
+7719 0
+7720 0
+7721 0
+7722 1
+7723 0
+7724 0
+7725 0
+7726 0
+7727 0
+7728 0
+7729 0
+7730 0
+7731 0
+7732 1
+7733 0
+7734 0
+7735 0
+7736 0
+7737 0
+7738 0
+7739 0
+7740 0
+7741 0
+7742 1
+7743 0
+7744 0
+7745 0
+7746 0
+7747 0
+7748 0
+7749 0
+7750 0
+7751 0
+7752 1
+7753 0
+7754 0
+7755 0
+7756 0
+7757 0
+7758 0
+7759 0
+7760 0
+7761 1
+7762 0
+7763 0
+7764 0
+7765 0
+7766 0
+7767 0
+7768 0
+7769 0
+7770 1
+7771 0
+7772 0
+7773 0
+7774 0
+7775 0
+7776 0
+7777 0
+7778 0
+7779 1
+7780 0
+7781 0
+7782 0
+7783 0
+7784 0
+7785 0
+7786 0
+7787 0
+7788 0
+7789 1
+7790 0
+7791 0
+7792 0
+7793 0
+7794 0
+7795 0
+7796 0
+7797 0
+7798 0
+7799 1
+7800 0
+7801 0
+7802 0
+7803 0
+7804 0
+7805 0
+7806 0
+7807 0
+7808 0
+7809 0
+7810 1
+7811 0
+7812 0
+7813 0
+7814 0
+7815 0
+7816 0
+7817 0
+7818 0
+7819 1
+7820 0
+7821 0
+7822 0
+7823 0
+7824 0
+7825 0
+7826 0
+7827 0
+7828 1
+7829 0
+7830 0
+7831 0
+7832 0
+7833 0
+7834 0
+7835 0
+7836 0
+7837 0
+7838 0
+7839 1
+7840 0
+7841 0
+7842 0
+7843 0
+7844 0
+7845 0
+7846 0
+7847 0
+7848 0
+7849 1
+7850 0
+7851 0
+7852 0
+7853 0
+7854 0
+7855 0
+7856 0
+7857 0
+7858 1
+7859 0
+7860 0
+7861 0
+7862 0
+7863 0
+7864 0
+7865 0
+7866 0
+7867 0
+7868 1
+7869 0
+7870 0
+7871 0
+7872 0
+7873 0
+7874 0
+7875 0
+7876 0
+7877 0
+7878 0
+7879 0
+7880 0
+7881 0
+7882 0
+7883 0
+7884 0
+7885 0
+7886 0
+7887 1
+7888 0
+7889 0
+7890 0
+7891 0
+7892 0
+7893 0
+7894 0
+7895 0
+7896 0
+7897 0
+7898 1
+7899 0
+7900 0
+7901 0
+7902 0
+7903 0
+7904 0
+7905 0
+7906 0
+7907 0
+7908 1
+7909 0
+7910 0
+7911 0
+7912 0
+7913 0
+7914 0
+7915 0
+7916 0
+7917 0
+7918 1
+7919 0
+7920 0
+7921 0
+7922 0
+7923 0
+7924 0
+7925 0
+7926 0
+7927 0
+7928 1
+7929 0
+7930 0
+7931 0
+7932 0
+7933 0
+7934 0
+7935 0
+7936 0
+7937 0
+7938 1
+7939 0
+7940 0
+7941 0
+7942 0
+7943 0
+7944 0
+7945 0
+7946 0
+7947 0
+7948 1
+7949 0
+7950 0
+7951 0
+7952 0
+7953 0
+7954 0
+7955 0
+7956 0
+7957 0
+7958 1
+7959 0
+7960 0
+7961 0
+7962 0
+7963 0
+7964 0
+7965 0
+7966 0
+7967 0
+7968 1
+7969 0
+7970 0
+7971 0
+7972 0
+7973 0
+7974 0
+7975 0
+7976 0
+7977 0
+7978 1
+7979 0
+7980 0
+7981 0
+7982 0
+7983 0
+7984 0
+7985 1
+7986 0
+7987 0
+7988 0
+7989 0
+7990 0
+7991 0
+7992 0
+7993 0
+7994 0
+7995 1
+7996 0
+7997 0
+7998 0
+7999 0
+8000 0
+8001 0
+8002 0
+8003 0
+8004 0
+8005 0
+8006 1
+8007 0
+8008 0
+8009 0
+8010 0
+8011 0
+8012 0
+8013 0
+8014 0
+8015 1
+8016 0
+8017 0
+8018 0
+8019 0
+8020 0
+8021 0
+8022 0
+8023 0
+8024 0
+8025 1
+8026 0
+8027 0
+8028 0
+8029 0
+8030 0
+8031 0
+8032 0
+8033 0
+8034 0
+8035 0
+8036 1
+8037 0
+8038 0
+8039 0
+8040 0
+8041 0
+8042 0
+8043 0
+8044 0
+8045 0
+8046 1
+8047 0
+8048 0
+8049 0
+8050 0
+8051 0
+8052 0
+8053 0
+8054 0
+8055 0
+8056 0
+8057 1
+8058 0
+8059 0
+8060 0
+8061 0
+8062 0
+8063 0
+8064 0
+8065 0
+8066 0
+8067 1
+8068 0
+8069 0
+8070 0
+8071 0
+8072 0
+8073 0
+8074 0
+8075 0
+8076 0
+8077 0
+8078 1
+8079 0
+8080 0
+8081 0
+8082 0
+8083 0
+8084 0
+8085 0
+8086 0
+8087 0
+8088 1
+8089 0
+8090 0
+8091 0
+8092 0
+8093 0
+8094 0
+8095 0
+8096 0
+8097 0
+8098 1
+8099 0
+8100 0
+8101 0
+8102 0
+8103 0
+8104 0
+8105 1
+8106 0
+8107 0
+8108 0
+8109 0
+8110 0
+8111 0
+8112 0
+8113 0
+8114 0
+8115 1
+8116 0
+8117 0
+8118 0
+8119 0
+8120 0
+8121 0
+8122 0
+8123 0
+8124 0
+8125 1
+8126 0
+8127 0
+8128 0
+8129 0
+8130 0
+8131 0
+8132 0
+8133 0
+8134 1
+8135 0
+8136 0
+8137 0
+8138 0
+8139 0
+8140 0
+8141 0
+8142 0
+8143 0
+8144 0
+8145 1
+8146 0
+8147 0
+8148 0
+8149 0
+8150 0
+8151 0
+8152 0
+8153 0
+8154 0
+8155 0
+8156 1
+8157 0
+8158 0
+8159 0
+8160 0
+8161 0
+8162 0
+8163 0
+8164 0
+8165 0
+8166 1
+8167 0
+8168 0
+8169 0
+8170 0
+8171 0
+8172 0
+8173 0
+8174 0
+8175 0
+8176 1
+8177 0
+8178 0
+8179 0
+8180 0
+8181 0
+8182 0
+8183 0
+8184 0
+8185 0
+8186 1
+8187 0
+8188 0
+8189 0
+8190 0
+8191 0
+8192 0
+8193 0
+8194 0
+8195 0
+8196 0
+8197 1
+8198 0
+8199 0
+8200 0
+8201 0
+8202 0
+8203 0
+8204 0
+8205 0
+8206 0
+8207 1
+8208 0
+8209 0
+8210 0
+8211 0
+8212 0
+8213 0
+8214 0
+8215 0
+8216 1
+8217 0
+8218 0
+8219 0
+8220 0
+8221 0
+8222 0
+8223 0
+8224 0
+8225 1
+8226 0
+8227 0
+8228 0
+8229 0
+8230 0
+8231 0
+8232 0
+8233 0
+8234 0
+8235 1
+8236 0
+8237 0
+8238 0
+8239 0
+8240 0
+8241 0
+8242 0
+8243 0
+8244 1
+8245 0
+8246 0
+8247 0
+8248 0
+8249 0
+8250 0
+8251 0
+8252 0
+8253 0
+8254 1
+8255 0
+8256 0
+8257 0
+8258 0
+8259 0
+8260 0
+8261 0
+8262 0
+8263 0
+8264 0
+8265 1
+8266 0
+8267 0
+8268 0
+8269 0
+8270 0
+8271 0
+8272 0
+8273 0
+8274 0
+8275 1
+8276 0
+8277 0
+8278 0
+8279 0
+8280 0
+8281 0
+8282 0
+8283 0
+8284 0
+8285 0
+8286 1
+8287 0
+8288 0
+8289 0
+8290 0
+8291 0
+8292 0
+8293 0
+8294 0
+8295 0
+8296 1
+8297 0
+8298 0
+8299 0
+8300 0
+8301 0
+8302 0
+8303 0
+8304 1
+8305 0
+8306 0
+8307 0
+8308 0
+8309 0
+8310 0
+8311 0
+8312 0
+8313 0
+8314 1
+8315 0
+8316 0
+8317 0
+8318 0
+8319 0
+8320 0
+8321 0
+8322 0
+8323 0
+8324 1
+8325 0
+8326 0
+8327 0
+8328 0
+8329 0
+8330 0
+8331 0
+8332 0
+8333 0
+8334 0
+8335 0
+8336 0
+8337 0
+8338 0
+8339 0
+8340 0
+8341 0
+8342 1
+8343 0
+8344 0
+8345 0
+8346 0
+8347 0
+8348 0
+8349 0
+8350 0
+8351 1
+8352 0
+8353 0
+8354 0
+8355 0
+8356 0
+8357 0
+8358 0
+8359 0
+8360 0
+8361 1
+8362 0
+8363 0
+8364 0
+8365 0
+8366 0
+8367 0
+8368 0
+8369 0
+8370 0
+8371 1
+8372 0
+8373 0
+8374 0
+8375 0
+8376 0
+8377 0
+8378 0
+8379 0
+8380 1
+8381 0
+8382 0
+8383 0
+8384 0
+8385 0
+8386 0
+8387 0
+8388 0
+8389 1
+8390 0
+8391 0
+8392 0
+8393 0
+8394 0
+8395 0
+8396 0
+8397 0
+8398 0
+8399 1
+8400 0
+8401 0
+8402 0
+8403 0
+8404 0
+8405 0
+8406 0
+8407 0
+8408 0
+8409 1
+8410 0
+8411 0
+8412 0
+8413 0
+8414 0
+8415 0
+8416 0
+8417 0
+8418 0
+8419 1
+8420 0
+8421 0
+8422 0
+8423 0
+8424 0
+8425 0
+8426 0
+8427 0
+8428 0
+8429 0
+8430 1
+8431 0
+8432 0
+8433 0
+8434 0
+8435 0
+8436 0
+8437 0
+8438 1
+8439 0
+8440 0
+8441 0
+8442 0
+8443 0
+8444 0
+8445 0
+8446 0
+8447 1
+8448 0
+8449 0
+8450 0
+8451 0
+8452 0
+8453 0
+8454 0
+8455 0
+8456 0
+8457 1
+8458 0
+8459 0
+8460 0
+8461 0
+8462 0
+8463 0
+8464 0
+8465 0
+8466 0
+8467 1
+8468 0
+8469 0
+8470 0
+8471 0
+8472 0
+8473 0
+8474 0
+8475 0
+8476 0
+8477 1
+8478 0
+8479 0
+8480 0
+8481 0
+8482 0
+8483 0
+8484 0
+8485 0
+8486 1
+8487 0
+8488 0
+8489 0
+8490 0
+8491 0
+8492 0
+8493 0
+8494 0
+8495 0
+8496 0
+8497 0
+8498 0
+8499 0
+8500 0
+8501 0
+8502 0
+8503 0
+8504 0
+8505 0
+8506 1
+8507 0
+8508 0
+8509 0
+8510 0
+8511 0
+8512 0
+8513 0
+8514 0
+8515 0
+8516 0
+8517 0
+8518 0
+8519 0
+8520 0
+8521 0
+8522 0
+8523 1
+8524 0
+8525 0
+8526 0
+8527 0
+8528 0
+8529 0
+8530 0
+8531 0
+8532 1
+8533 0
+8534 0
+8535 0
+8536 0
+8537 0
+8538 0
+8539 0
+8540 0
+8541 1
+8542 0
+8543 0
+8544 0
+8545 0
+8546 0
+8547 0
+8548 0
+8549 1
+8550 0
+8551 0
+8552 0
+8553 0
+8554 0
+8555 0
+8556 0
+8557 0
+8558 0
+8559 1
+8560 0
+8561 0
+8562 0
+8563 0
+8564 0
+8565 0
+8566 0
+8567 0
+8568 1
+8569 0
+8570 0
+8571 0
+8572 0
+8573 0
+8574 0
+8575 0
+8576 0
+8577 1
+8578 0
+8579 0
+8580 0
+8581 0
+8582 0
+8583 0
+8584 0
+8585 0
+8586 1
+8587 0
+8588 0
+8589 0
+8590 0
+8591 0
+8592 0
+8593 0
+8594 0
+8595 0
+8596 1
+8597 0
+8598 0
+8599 0
+8600 0
+8601 0
+8602 0
+8603 0
+8604 0
+8605 0
+8606 1
+8607 0
+8608 0
+8609 0
+8610 0
+8611 0
+8612 0
+8613 0
+8614 0
+8615 0
+8616 1
+8617 0
+8618 0
+8619 0
+8620 0
+8621 0
+8622 0
+8623 0
+8624 0
+8625 1
+8626 0
+8627 0
+8628 0
+8629 0
+8630 0
+8631 0
+8632 0
+8633 1
+8634 0
+8635 0
+8636 0
+8637 0
+8638 0
+8639 0
+8640 0
+8641 0
+8642 0
+8643 1
+8644 0
+8645 0
+8646 0
+8647 0
+8648 0
+8649 0
+8650 0
+8651 1
+8652 0
+8653 0
+8654 0
+8655 0
+8656 0
+8657 0
+8658 0
+8659 0
+8660 1
+8661 0
+8662 0
+8663 0
+8664 0
+8665 0
+8666 0
+8667 0
+8668 0
+8669 1
+8670 0
+8671 0
+8672 0
+8673 0
+8674 0
+8675 0
+8676 0
+8677 1
+8678 0
+8679 0
+8680 0
+8681 0
+8682 0
+8683 0
+8684 0
+8685 0
+8686 1
+8687 0
+8688 0
+8689 0
+8690 0
+8691 0
+8692 0
+8693 0
+8694 0
+8695 0
+8696 1
+8697 0
+8698 0
+8699 0
+8700 0
+8701 0
+8702 0
+8703 0
+8704 0
+8705 1
+8706 0
+8707 0
+8708 0
+8709 0
+8710 0
+8711 0
+8712 0
+8713 0
+8714 0
+8715 1
+8716 0
+8717 0
+8718 0
+8719 0
+8720 0
+8721 0
+8722 0
+8723 0
+8724 0
+8725 1
+8726 0
+8727 0
+8728 0
+8729 0
+8730 0
+8731 0
+8732 0
+8733 0
+8734 0
+8735 1
+8736 0
+8737 0
+8738 0
+8739 0
+8740 0
+8741 0
+8742 0
+8743 0
+8744 0
+8745 1
+8746 0
+8747 0
+8748 0
+8749 0
+8750 0
+8751 0
+8752 0
+8753 0
+8754 0
+8755 1
+8756 0
+8757 0
+8758 0
+8759 0
+8760 0
+8761 0
+8762 0
+8763 1
+8764 0
+8765 0
+8766 0
+8767 0
+8768 0
+8769 0
+8770 1
+8771 0
+8772 0
+8773 0
+8774 0
+8775 0
+8776 0
+8777 0
+8778 0
+8779 0
+8780 1
+8781 0
+8782 0
+8783 0
+8784 0
+8785 0
+8786 0
+8787 0
+8788 0
+8789 1
+8790 0
+8791 0
+8792 0
+8793 0
+8794 0
+8795 0
+8796 0
+8797 0
+8798 1
+8799 0
+8800 0
+8801 0
+8802 0
+8803 0
+8804 0
+8805 0
+8806 0
+8807 3
+8808 0
+8809 0
+8810 1
+8811 0
+8812 0
+8813 0
+8814 0
+8815 1
+8816 0
+8817 0
+8818 0
+8819 0
+8820 1
+8821 0
+8822 0
+8823 0
+8824 1
+8825 0
+8826 0
+8827 0
+8828 0
+8829 0
+8830 1
+8831 0
+8832 0
+8833 0
+8834 0
+8835 0
+8836 0
+8837 1
+8838 0
+8839 0
+8840 0
+8841 0
+8842 0
+8843 0
+8844 0
+8845 1
+8846 0
+8847 0
+8848 0
+8849 0
+8850 0
+8851 0
+8852 0
+8853 0
+8854 0
+8855 1
+8856 0
+8857 0
+8858 0
+8859 0
+8860 0
+8861 0
+8862 0
+8863 0
+8864 0
+8865 1
+8866 0
+8867 0
+8868 0
+8869 0
+8870 0
+8871 0
+8872 1
+8873 0
+8874 0
+8875 0
+8876 0
+8877 0
+8878 0
+8879 0
+8880 1
+8881 0
+8882 0
+8883 0
+8884 0
+8885 0
+8886 0
+8887 0
+8888 1
+8889 0
+8890 0
+8891 0
+8892 0
+8893 0
+8894 0
+8895 0
+8896 0
+8897 0
+8898 0
+8899 0
+8900 0
+8901 0
+8902 0
+8903 0
+8904 0
+8905 1
+8906 0
+8907 0
+8908 0
+8909 0
+8910 0
+8911 0
+8912 1
+8913 0
+8914 0
+8915 0
+8916 0
+8917 0
+8918 0
+8919 0
+8920 1
+8921 0
+8922 0
+8923 0
+8924 0
+8925 0
+8926 0
+8927 0
+8928 0
+8929 1
+8930 0
+8931 0
+8932 0
+8933 0
+8934 0
+8935 0
+8936 0
+8937 0
+8938 0
+8939 1
+8940 0
+8941 0
+8942 0
+8943 0
+8944 0
+8945 0
+8946 0
+8947 0
+8948 0
+8949 1
+8950 0
+8951 0
+8952 0
+8953 0
+8954 0
+8955 0
+8956 0
+8957 0
+8958 0
+8959 1
+8960 0
+8961 0
+8962 0
+8963 0
+8964 0
+8965 0
+8966 0
+8967 0
+8968 0
+8969 1
+8970 0
+8971 0
+8972 0
+8973 0
+8974 0
+8975 0
+8976 0
+8977 0
+8978 1
+8979 0
+8980 0
+8981 0
+8982 0
+8983 0
+8984 0
+8985 0
+8986 0
+8987 1
+8988 0
+8989 0
+8990 0
+8991 0
+8992 0
+8993 0
+8994 0
+8995 0
+8996 0
+8997 1
+8998 0
+8999 0
+9000 0
+9001 0
+9002 0
+9003 0
+9004 0
+9005 0
+9006 1
+9007 0
+9008 0
+9009 0
+9010 0
+9011 0
+9012 0
+9013 0
+9014 1
+9015 0
+9016 0
+9017 0
+9018 0
+9019 0
+9020 0
+9021 0
+9022 1
+9023 0
+9024 0
+9025 0
+9026 0
+9027 0
+9028 0
+9029 0
+9030 1
+9031 0
+9032 0
+9033 0
+9034 0
+9035 0
+9036 0
+9037 0
+9038 1
+9039 0
+9040 0
+9041 0
+9042 0
+9043 0
+9044 0
+9045 0
+9046 0
+9047 1
+9048 0
+9049 0
+9050 0
+9051 0
+9052 0
+9053 0
+9054 0
+9055 1
+9056 0
+9057 0
+9058 0
+9059 0
+9060 0
+9061 0
+9062 0
+9063 1
+9064 0
+9065 0
+9066 0
+9067 0
+9068 0
+9069 0
+9070 0
+9071 0
+9072 0
+9073 1
+9074 0
+9075 0
+9076 0
+9077 0
+9078 0
+9079 0
+9080 0
+9081 0
+9082 0
+9083 0
+9084 0
+9085 0
+9086 0
+9087 0
+9088 0
+9089 0
+9090 0
+9091 0
+9092 1
+9093 0
+9094 0
+9095 0
+9096 0
+9097 0
+9098 0
+9099 0
+9100 1
+9101 0
+9102 0
+9103 0
+9104 0
+9105 0
+9106 0
+9107 0
+9108 1
+9109 0
+9110 0
+9111 0
+9112 0
+9113 0
+9114 0
+9115 0
+9116 0
+9117 1
+9118 0
+9119 0
+9120 0
+9121 0
+9122 0
+9123 0
+9124 0
+9125 0
+9126 1
+9127 0
+9128 0
+9129 0
+9130 0
+9131 0
+9132 0
+9133 0
+9134 0
+9135 1
+9136 0
+9137 0
+9138 0
+9139 0
+9140 0
+9141 0
+9142 0
+9143 1
+9144 0
+9145 0
+9146 0
+9147 0
+9148 0
+9149 0
+9150 0
+9151 0
+9152 1
+9153 0
+9154 0
+9155 0
+9156 0
+9157 0
+9158 0
+9159 0
+9160 0
+9161 1
+9162 0
+9163 0
+9164 0
+9165 0
+9166 0
+9167 0
+9168 0
+9169 1
+9170 0
+9171 0
+9172 0
+9173 0
+9174 0
+9175 0
+9176 0
+9177 0
+9178 1
+9179 0
+9180 0
+9181 0
+9182 0
+9183 0
+9184 0
+9185 0
+9186 0
+9187 0
+9188 1
+9189 0
+9190 0
+9191 0
+9192 0
+9193 0
+9194 0
+9195 0
+9196 0
+9197 1
+9198 0
+9199 0
+9200 0
+9201 0
+9202 0
+9203 0
+9204 0
+9205 0
+9206 0
+9207 0
+9208 0
+9209 0
+9210 0
+9211 0
+9212 0
+9213 0
+9214 0
+9215 0
+9216 0
+9217 0
+9218 0
+9219 0
+9220 0
+9221 1
+9222 0
+9223 0
+9224 0
+9225 0
+9226 0
+9227 0
+9228 1
+9229 0
+9230 0
+9231 0
+9232 0
+9233 0
+9234 0
+9235 0
+9236 0
+9237 1
+9238 0
+9239 0
+9240 0
+9241 0
+9242 0
+9243 0
+9244 0
+9245 0
+9246 1
+9247 0
+9248 0
+9249 0
+9250 0
+9251 0
+9252 0
+9253 0
+9254 0
+9255 1
+9256 0
+9257 0
+9258 0
+9259 0
+9260 0
+9261 1
+9262 0
+9263 0
+9264 0
+9265 0
+9266 0
+9267 0
+9268 0
+9269 0
+9270 0
+9271 0
+9272 0
+9273 0
+9274 0
+9275 0
+9276 1
+9277 0
+9278 0
+9279 0
+9280 0
+9281 0
+9282 0
+9283 0
+9284 0
+9285 0
+9286 0
+9287 0
+9288 0
+9289 0
+9290 1
+9291 0
+9292 0
+9293 0
+9294 0
+9295 0
+9296 0
+9297 0
+9298 0
+9299 0
+9300 1
+9301 0
+9302 0
+9303 0
+9304 0
+9305 0
+9306 0
+9307 0
+9308 1
+9309 0
+9310 0
+9311 0
+9312 0
+9313 0
+9314 0
+9315 0
+9316 1
+9317 0
+9318 0
+9319 0
+9320 0
+9321 0
+9322 0
+9323 1
+9324 0
+9325 0
+9326 0
+9327 0
+9328 0
+9329 0
+9330 0
+9331 1
+9332 0
+9333 0
+9334 0
+9335 0
+9336 0
+9337 0
+9338 1
+9339 0
+9340 0
+9341 0
+9342 0
+9343 0
+9344 0
+9345 1
+9346 0
+9347 0
+9348 0
+9349 0
+9350 0
+9351 0
+9352 0
+9353 0
+9354 0
+9355 1
+9356 0
+9357 0
+9358 0
+9359 0
+9360 0
+9361 0
+9362 0
+9363 1
+9364 0
+9365 0
+9366 0
+9367 0
+9368 0
+9369 0
+9370 1
+9371 0
+9372 0
+9373 0
+9374 0
+9375 0
+9376 0
+9377 0
+9378 1
+9379 0
+9380 0
+9381 0
+9382 0
+9383 0
+9384 0
+9385 0
+9386 0
+9387 0
+9388 0
+9389 0
+9390 0
+9391 0
+9392 0
+9393 0
+9394 0
+9395 1
+9396 0
+9397 0
+9398 0
+9399 0
+9400 0
+9401 0
+9402 0
+9403 1
+9404 0
+9405 0
+9406 0
+9407 0
+9408 0
+9409 0
+9410 0
+9411 0
+9412 1
+9413 0
+9414 0
+9415 0
+9416 0
+9417 0
+9418 0
+9419 0
+9420 1
+9421 0
+9422 0
+9423 0
+9424 0
+9425 0
+9426 0
+9427 0
+9428 0
+9429 1
+9430 0
+9431 0
+9432 0
+9433 0
+9434 0
+9435 0
+9436 0
+9437 0
+9438 0
+9439 1
+9440 0
+9441 0
+9442 0
+9443 0
+9444 0
+9445 0
+9446 0
+9447 0
+9448 0
+9449 1
+9450 0
+9451 0
+9452 0
+9453 0
+9454 0
+9455 0
+9456 0
+9457 1
+9458 0
+9459 0
+9460 0
+9461 0
+9462 0
+9463 0
+9464 1
+9465 0
+9466 0
+9467 0
+9468 0
+9469 0
+9470 0
+9471 0
+9472 0
+9473 1
+9474 0
+9475 0
+9476 0
+9477 0
+9478 0
+9479 0
+9480 0
+9481 1
+9482 0
+9483 0
+9484 0
+9485 0
+9486 0
+9487 0
+9488 1
+9489 0
+9490 0
+9491 0
+9492 0
+9493 0
+9494 0
+9495 0
+9496 0
+9497 1
+9498 0
+9499 0
+9500 0
+9501 0
+9502 0
+9503 0
+9504 0
+9505 0
+9506 0
+9507 0
+9508 0
+9509 0
+9510 0
+9511 0
+9512 0
+9513 0
+9514 1
+9515 0
+9516 0
+9517 0
+9518 0
+9519 0
+9520 0
+9521 0
+9522 1
+9523 0
+9524 0
+9525 0
+9526 0
+9527 0
+9528 0
+9529 0
+9530 1
+9531 0
+9532 0
+9533 0
+9534 0
+9535 0
+9536 0
+9537 0
+9538 1
+9539 0
+9540 0
+9541 0
+9542 0
+9543 0
+9544 0
+9545 0
+9546 0
+9547 1
+9548 0
+9549 0
+9550 0
+9551 0
+9552 0
+9553 0
+9554 0
+9555 1
+9556 0
+9557 0
+9558 0
+9559 0
+9560 0
+9561 0
+9562 0
+9563 1
+9564 0
+9565 0
+9566 0
+9567 0
+9568 0
+9569 0
+9570 0
+9571 0
+9572 1
+9573 0
+9574 0
+9575 0
+9576 0
+9577 0
+9578 0
+9579 0
+9580 1
+9581 0
+9582 0
+9583 0
+9584 0
+9585 0
+9586 0
+9587 0
+9588 0
+9589 1
+9590 0
+9591 0
+9592 0
+9593 0
+9594 0
+9595 0
+9596 0
+9597 0
+9598 0
+9599 0
+9600 0
+9601 0
+9602 0
+9603 0
+9604 0
+9605 0
+9606 0
+9607 0
+9608 1
+9609 0
+9610 0
+9611 0
+9612 0
+9613 0
+9614 0
+9615 1
+9616 0
+9617 0
+9618 0
+9619 0
+9620 0
+9621 0
+9622 1
+9623 0
+9624 0
+9625 0
+9626 0
+9627 0
+9628 0
+9629 0
+9630 1
+9631 0
+9632 0
+9633 0
+9634 0
+9635 0
+9636 0
+9637 0
+9638 0
+9639 1
+9640 0
+9641 0
+9642 0
+9643 0
+9644 0
+9645 0
+9646 0
+9647 0
+9648 1
+9649 0
+9650 0
+9651 0
+9652 0
+9653 0
+9654 0
+9655 0
+9656 1
+9657 0
+9658 0
+9659 0
+9660 0
+9661 0
+9662 0
+9663 1
+9664 0
+9665 0
+9666 0
+9667 0
+9668 0
+9669 0
+9670 0
+9671 0
+9672 0
+9673 1
+9674 0
+9675 0
+9676 0
+9677 0
+9678 0
+9679 0
+9680 0
+9681 1
+9682 0
+9683 0
+9684 0
+9685 0
+9686 0
+9687 0
+9688 0
+9689 1
+9690 0
+9691 0
+9692 0
+9693 0
+9694 0
+9695 0
+9696 1
+9697 0
+9698 0
+9699 0
+9700 0
+9701 0
+9702 0
+9703 0
+9704 1
+9705 0
+9706 0
+9707 0
+9708 0
+9709 0
+9710 0
+9711 0
+9712 1
+9713 0
+9714 0
+9715 0
+9716 0
+9717 0
+9718 0
+9719 0
+9720 0
+9721 0
+9722 1
+9723 0
+9724 0
+9725 0
+9726 0
+9727 0
+9728 0
+9729 0
+9730 0
+9731 1
+9732 0
+9733 0
+9734 0
+9735 0
+9736 0
+9737 0
+9738 0
+9739 0
+9740 1
+9741 0
+9742 0
+9743 0
+9744 0
+9745 0
+9746 0
+9747 0
+9748 0
+9749 1
+9750 0
+9751 0
+9752 0
+9753 0
+9754 0
+9755 0
+9756 1
+9757 0
+9758 0
+9759 0
+9760 0
+9761 0
+9762 0
+9763 0
+9764 0
+9765 0
+9766 0
+9767 0
+9768 0
+9769 0
+9770 0
+9771 0
+9772 0
+9773 1
+9774 0
+9775 0
+9776 0
+9777 0
+9778 0
+9779 0
+9780 1
+9781 0
+9782 0
+9783 0
+9784 0
+9785 0
+9786 0
+9787 0
+9788 1
+9789 0
+9790 0
+9791 0
+9792 0
+9793 0
+9794 0
+9795 0
+9796 0
+9797 0
+9798 0
+9799 0
+9800 0
+9801 0
+9802 0
+9803 1
+9804 0
+9805 0
+9806 0
+9807 0
+9808 0
+9809 0
+9810 0
+9811 0
+9812 1
+9813 0
+9814 0
+9815 0
+9816 0
+9817 0
+9818 0
+9819 0
+9820 1
+9821 0
+9822 0
+9823 0
+9824 0
+9825 0
+9826 0
+9827 0
+9828 0
+9829 1
+9830 0
+9831 0
+9832 0
+9833 0
+9834 0
+9835 0
+9836 0
+9837 0
+9838 1
+9839 0
+9840 0
+9841 0
+9842 0
+9843 0
+9844 0
+9845 0
+9846 0
+9847 0
+9848 1
+9849 0
+9850 0
+9851 0
+9852 0
+9853 0
+9854 4
+9855 0
+9856 0
+9857 1
+9858 0
+9859 0
+9860 0
+9861 0
+9862 1
+9863 0
+9864 0
+9865 0
+9866 0
+9867 0
+9868 1
+9869 0
+9870 0
+9871 0
+9872 0
+9873 1
+9874 0
+9875 0
+9876 0
+9877 0
+9878 1
+9879 0
+9880 0
+9881 0
+9882 0
+9883 0
+9884 0
+9885 0
+9886 1
+9887 0
+9888 0
+9889 0
+9890 0
+9891 0
+9892 0
+9893 0
+9894 0
+9895 1
+9896 0
+9897 0
+9898 0
+9899 0
+9900 0
+9901 0
+9902 0
+9903 0
+9904 1
+9905 0
+9906 0
+9907 0
+9908 0
+9909 0
+9910 0
+9911 0
+9912 0
+9913 0
+9914 0
+9915 0
+9916 0
+9917 0
+9918 0
+9919 0
+9920 0
+9921 0
+9922 0
+9923 0
+9924 1
+9925 0
+9926 0
+9927 0
+9928 0
+9929 0
+9930 0
+9931 0
+9932 0
+9933 0
+9934 1
+9935 0
+9936 0
+9937 0
+9938 0
+9939 0
+9940 0
+9941 0
+9942 0
+9943 0
+9944 1
+9945 0
+9946 0
+9947 0
+9948 0
+9949 0
+9950 0
+9951 0
+9952 0
+9953 0
+9954 1
+9955 0
+9956 0
+9957 0
+9958 0
+9959 0
+9960 0
+9961 0
+9962 0
+9963 1
+9964 0
+9965 0
+9966 0
+9967 0
+9968 0
+9969 0
+9970 0
+9971 0
+9972 1
+9973 0
+9974 0
+9975 0
+9976 0
+9977 0
+9978 0
+9979 0
+9980 0
+9981 0
+9982 0
+9983 1
+9984 0
+9985 0
+9986 0
+9987 0
+9988 0
+9989 0
+9990 0
+9991 0
+9992 0
+9993 1
+9994 0
+9995 0
+9996 0
+9997 0
+9998 0
+9999 0
+10000 0
+10001 0
+10002 0
+10003 0
+10004 1
+10005 0
+10006 0
+10007 0
+10008 0
+10009 0
+10010 0
+10011 0
+10012 0
+10013 1
+10014 0
+10015 0
+10016 0
+10017 0
+10018 0
+10019 0
+10020 0
+10021 0
+10022 0
+10023 1
+10024 0
+10025 0
+10026 0
+10027 0
+10028 0
+10029 0
+10030 0
+10031 1
+10032 0
+10033 0
+10034 0
+10035 0
+10036 0
+10037 0
+10038 0
+10039 0
+10040 0
+10041 1
+10042 0
+10043 0
+10044 0
+10045 0
+10046 0
+10047 0
+10048 0
+10049 0
+10050 0
+10051 1
+10052 0
+10053 0
+10054 0
+10055 0
+10056 0
+10057 0
+10058 0
+10059 0
+10060 1
+10061 0
+10062 0
+10063 0
+10064 0
+10065 0
+10066 0
+10067 0
+10068 0
+10069 1
+10070 0
+10071 0
+10072 0
+10073 0
+10074 0
+10075 0
+10076 0
+10077 0
+10078 1
+10079 0
+10080 0
+10081 0
+10082 0
+10083 0
+10084 0
+10085 0
+10086 0
+10087 1
+10088 0
+10089 0
+10090 0
+10091 0
+10092 0
+10093 0
+10094 0
+10095 0
+10096 0
+10097 1
+10098 0
+10099 0
+10100 0
+10101 0
+10102 0
+10103 0
+10104 0
+10105 0
+10106 0
+10107 0
+10108 1
+10109 0
+10110 0
+10111 0
+10112 0
+10113 0
+10114 0
+10115 0
+10116 0
+10117 0
+10118 1
+10119 0
+10120 0
+10121 0
+10122 0
+10123 0
+10124 0
+10125 0
+10126 0
+10127 1
+10128 0
+10129 0
+10130 0
+10131 0
+10132 0
+10133 0
+10134 0
+10135 0
+10136 0
+10137 1
+10138 0
+10139 0
+10140 0
+10141 0
+10142 0
+10143 0
+10144 0
+10145 0
+10146 0
+10147 1
+10148 0
+10149 0
+10150 0
+10151 0
+10152 0
+10153 0
+10154 0
+10155 0
+10156 0
+10157 1
+10158 0
+10159 0
+10160 0
+10161 0
+10162 0
+10163 0
+10164 0
+10165 0
+10166 0
+10167 1
+10168 0
+10169 0
+10170 0
+10171 0
+10172 0
+10173 0
+10174 0
+10175 0
+10176 1
+10177 0
+10178 0
+10179 0
+10180 0
+10181 0
+10182 0
+10183 0
+10184 0
+10185 1
+10186 0
+10187 0
+10188 0
+10189 0
+10190 0
+10191 0
+10192 0
+10193 1
+10194 0
+10195 0
+10196 0
+10197 0
+10198 0
+10199 0
+10200 0
+10201 1
+10202 0
+10203 0
+10204 0
+10205 0
+10206 0
+10207 0
+10208 0
+10209 0
+10210 0
+10211 1
+10212 0
+10213 0
+10214 0
+10215 0
+10216 0
+10217 0
+10218 0
+10219 0
+10220 1
+10221 0
+10222 0
+10223 0
+10224 0
+10225 0
+10226 0
+10227 0
+10228 0
+10229 0
+10230 1
+10231 0
+10232 0
+10233 0
+10234 0
+10235 0
+10236 0
+10237 0
+10238 0
+10239 0
+10240 1
+10241 0
+10242 0
+10243 0
+10244 0
+10245 0
+10246 0
+10247 0
+10248 0
+10249 0
+10250 1
+10251 0
+10252 0
+10253 0
+10254 0
+10255 0
+10256 0
+10257 0
+10258 0
+10259 0
+10260 1
+10261 0
+10262 0
+10263 0
+10264 1
+10265 0
+10266 0
+10267 0
+10268 0
+10269 0
+10270 1
+10271 0
+10272 0
+10273 0
+10274 0
+10275 0
+10276 0
+10277 0
+10278 1
+10279 0
+10280 0
+10281 0
+10282 0
+10283 0
+10284 0
+10285 0
+10286 1
+10287 0
+10288 0
+10289 0
+10290 0
+10291 0
+10292 0
+10293 0
+10294 0
+10295 0
+10296 1
+10297 0
+10298 0
+10299 0
+10300 0
+10301 0
+10302 0
+10303 0
+10304 0
+10305 1
+10306 0
+10307 0
+10308 0
+10309 0
+10310 0
+10311 0
+10312 0
+10313 0
+10314 1
+10315 0
+10316 0
+10317 0
+10318 0
+10319 0
+10320 0
+10321 0
+10322 0
+10323 1
+10324 0
+10325 0
+10326 0
+10327 0
+10328 0
+10329 0
+10330 0
+10331 0
+10332 0
+10333 1
+10334 0
+10335 0
+10336 0
+10337 0
+10338 0
+10339 0
+10340 0
+10341 0
+10342 0
+10343 0
+10344 0
+10345 0
+10346 0
+10347 0
+10348 0
+10349 0
+10350 0
+10351 1
+10352 0
+10353 0
+10354 0
+10355 0
+10356 0
+10357 0
+10358 0
+10359 0
+10360 1
+10361 0
+10362 0
+10363 0
+10364 0
+10365 0
+10366 0
+10367 0
+10368 0
+10369 0
+10370 1
+10371 0
+10372 0
+10373 0
+10374 0
+10375 0
+10376 0
+10377 0
+10378 0
+10379 0
+10380 1
+10381 0
+10382 0
+10383 0
+10384 0
+10385 0
+10386 0
+10387 1
+10388 0
+10389 0
+10390 0
+10391 0
+10392 0
+10393 0
+10394 0
+10395 1
+10396 0
+10397 0
+10398 0
+10399 0
+10400 0
+10401 0
+10402 0
+10403 0
+10404 1
+10405 0
+10406 0
+10407 0
+10408 0
+10409 0
+10410 0
+10411 0
+10412 0
+10413 0
+10414 1
+10415 0
+10416 0
+10417 0
+10418 0
+10419 0
+10420 0
+10421 0
+10422 0
+10423 1
+10424 0
+10425 0
+10426 0
+10427 0
+10428 0
+10429 0
+10430 0
+10431 0
+10432 0
+10433 1
+10434 0
+10435 0
+10436 0
+10437 0
+10438 0
+10439 0
+10440 0
+10441 0
+10442 0
+10443 1
+10444 0
+10445 0
+10446 0
+10447 0
+10448 0
+10449 0
+10450 0
+10451 0
+10452 1
+10453 0
+10454 0
+10455 0
+10456 0
+10457 0
+10458 0
+10459 0
+10460 1
+10461 0
+10462 0
+10463 0
+10464 0
+10465 0
+10466 0
+10467 0
+10468 0
+10469 1
+10470 0
+10471 0
+10472 0
+10473 0
+10474 0
+10475 0
+10476 0
+10477 0
+10478 0
+10479 1
+10480 0
+10481 0
+10482 0
+10483 0
+10484 0
+10485 0
+10486 0
+10487 0
+10488 0
+10489 1
+10490 0
+10491 0
+10492 0
+10493 0
+10494 0
+10495 0
+10496 0
+10497 0
+10498 1
+10499 0
+10500 0
+10501 0
+10502 0
+10503 0
+10504 0
+10505 0
+10506 1
+10507 0
+10508 0
+10509 0
+10510 0
+10511 0
+10512 0
+10513 0
+10514 0
+10515 0
+10516 0
+10517 1
+10518 0
+10519 0
+10520 0
+10521 0
+10522 0
+10523 0
+10524 0
+10525 0
+10526 0
+10527 1
+10528 0
+10529 0
+10530 0
+10531 0
+10532 0
+10533 0
+10534 0
+10535 0
+10536 1
+10537 0
+10538 0
+10539 0
+10540 0
+10541 0
+10542 0
+10543 0
+10544 0
+10545 1
+10546 0
+10547 0
+10548 0
+10549 0
+10550 0
+10551 0
+10552 0
+10553 0
+10554 0
+10555 1
+10556 0
+10557 0
+10558 0
+10559 0
+10560 0
+10561 0
+10562 0
+10563 0
+10564 0
+10565 0
+10566 1
+10567 0
+10568 0
+10569 0
+10570 0
+10571 0
+10572 0
+10573 0
+10574 0
+10575 0
+10576 0
+10577 0
+10578 0
+10579 0
+10580 0
+10581 0
+10582 0
+10583 0
+10584 0
+10585 0
+10586 0
+10587 1
+10588 0
+10589 0
+10590 0
+10591 0
+10592 0
+10593 0
+10594 0
+10595 0
+10596 0
+10597 0
+10598 1
+10599 0
+10600 0
+10601 0
+10602 0
+10603 0
+10604 0
+10605 0
+10606 0
+10607 0
+10608 0
+10609 1
+10610 0
+10611 0
+10612 0
+10613 0
+10614 0
+10615 0
+10616 0
+10617 1
+10618 0
+10619 0
+10620 0
+10621 0
+10622 0
+10623 0
+10624 0
+10625 1
+10626 0
+10627 0
+10628 0
+10629 0
+10630 0
+10631 0
+10632 0
+10633 0
+10634 1
+10635 0
+10636 0
+10637 0
+10638 0
+10639 0
+10640 0
+10641 0
+10642 0
+10643 0
+10644 1
+10645 0
+10646 0
+10647 0
+10648 0
+10649 0
+10650 0
+10651 0
+10652 0
+10653 1
+10654 0
+10655 0
+10656 0
+10657 0
+10658 0
+10659 0
+10660 0
+10661 1
+10662 0
+10663 0
+10664 0
+10665 0
+10666 0
+10667 0
+10668 0
+10669 0
+10670 0
+10671 1
+10672 0
+10673 0
+10674 0
+10675 0
+10676 0
+10677 0
+10678 0
+10679 0
+10680 0
+10681 1
+10682 0
+10683 0
+10684 0
+10685 0
+10686 0
+10687 0
+10688 0
+10689 0
+10690 0
+10691 0
+10692 0
+10693 0
+10694 0
+10695 0
+10696 0
+10697 0
+10698 0
+10699 0
+10700 0
+10701 1
+10702 0
+10703 0
+10704 0
+10705 0
+10706 0
+10707 0
+10708 0
+10709 0
+10710 0
+10711 1
+10712 0
+10713 0
+10714 0
+10715 0
+10716 0
+10717 0
+10718 0
+10719 0
+10720 0
+10721 1
+10722 0
+10723 0
+10724 0
+10725 0
+10726 0
+10727 0
+10728 0
+10729 0
+10730 1
+10731 0
+10732 0
+10733 0
+10734 0
+10735 0
+10736 0
+10737 0
+10738 0
+10739 0
+10740 1
+10741 0
+10742 0
+10743 0
+10744 0
+10745 0
+10746 0
+10747 0
+10748 0
+10749 1
+10750 0
+10751 0
+10752 0
+10753 0
+10754 0
+10755 0
+10756 0
+10757 0
+10758 0
+10759 1
+10760 0
+10761 0
+10762 0
+10763 0
+10764 0
+10765 0
+10766 0
+10767 0
+10768 0
+10769 0
+10770 1
+10771 0
+10772 0
+10773 0
+10774 0
+10775 0
+10776 0
+10777 0
+10778 0
+10779 0
+10780 1
+10781 0
+10782 0
+10783 0
+10784 0
+10785 0
+10786 0
+10787 0
+10788 0
+10789 0
+10790 1
+10791 0
+10792 0
+10793 0
+10794 0
+10795 0
+10796 0
+10797 0
+10798 0
+10799 0
+10800 1
+10801 0
+10802 0
+10803 0
+10804 0
+10805 0
+10806 0
+10807 0
+10808 0
+10809 0
+10810 0
+10811 0
+10812 0
+10813 0
+10814 0
+10815 0
+10816 0
+10817 0
+10818 0
+10819 0
+10820 1
+10821 0
+10822 0
+10823 0
+10824 0
+10825 0
+10826 0
+10827 0
+10828 0
+10829 0
+10830 0
+10831 1
+10832 0
+10833 0
+10834 0
+10835 0
+10836 0
+10837 0
+10838 0
+10839 0
+10840 1
+10841 0
+10842 0
+10843 0
+10844 0
+10845 0
+10846 0
+10847 0
+10848 0
+10849 0
+10850 0
+10851 0
+10852 0
+10853 0
+10854 0
+10855 0
+10856 0
+10857 0
+10858 0
+10859 0
+10860 1
+10861 0
+10862 0
+10863 0
+10864 0
+10865 0
+10866 0
+10867 0
+10868 0
+10869 1
+10870 0
+10871 0
+10872 0
+10873 0
+10874 0
+10875 0
+10876 0
+10877 0
+10878 0
+10879 0
+10880 1
+10881 0
+10882 0
+10883 0
+10884 0
+10885 0
+10886 0
+10887 0
+10888 0
+10889 0
+10890 1
+10891 0
+10892 0
+10893 0
+10894 0
+10895 0
+10896 0
+10897 0
+10898 0
+10899 0
+10900 1
+10901 0
+10902 0
+10903 0
+10904 0
+10905 0
+10906 0
+10907 0
+10908 0
+10909 0
+10910 0
+10911 1
+10912 0
+10913 0
+10914 0
+10915 0
+10916 0
+10917 0
+10918 0
+10919 0
+10920 0
+10921 1
+10922 0
+10923 0
+10924 0
+10925 0
+10926 0
+10927 0
+10928 0
+10929 0
+10930 0
+10931 1
+10932 0
+10933 0
+10934 0
+10935 0
+10936 0
+10937 0
+10938 0
+10939 0
+10940 1
+10941 0
+10942 0
+10943 0
+10944 0
+10945 0
+10946 0
+10947 0
+10948 0
+10949 1
+10950 0
+10951 0
+10952 0
+10953 0
+10954 0
+10955 0
+10956 0
+10957 0
+10958 1
+10959 0
+10960 0
+10961 0
+10962 0
+10963 0
+10964 0
+10965 0
+10966 0
+10967 0
+10968 1
+10969 0
+10970 0
+10971 0
+10972 0
+10973 0
+10974 0
+10975 0
+10976 0
+10977 0
+10978 1
+10979 0
+10980 0
+10981 0
+10982 0
+10983 0
+10984 0
+10985 0
+10986 0
+10987 0
+10988 0
+10989 1
+10990 0
+10991 0
+10992 0
+10993 0
+10994 0
+10995 0
+10996 0
+10997 0
+10998 0
+10999 0
+11000 1 \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/test.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/test.js
new file mode 100644
index 0000000..8864284
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/test.js
@@ -0,0 +1,71 @@
+var ReplSet = require('./lib2/topologies/replset'),
+ ReadPreference = require('./lib2/topologies/read_preference');
+
+// Attempt to connect
+var server = new ReplSet([{
+ host: 'localhost', port: 31000
+}, {
+ host: 'localhost', port: 31001
+}], {
+ setName: 'rs'
+});
+
+function executeCursors(_server, cb) {
+ var count = 100;
+
+ for(var i = 0; i < 100; i++) {
+ // Execute the write
+ var cursor = _server.cursor('test.test', {
+ find: 'test.test'
+ , query: {a:1}
+ }, {readPreference: new ReadPreference('secondary')});
+
+ // Get the first document
+ cursor.next(function(err, doc) {
+ count = count - 1;
+ if(err) console.dir(err)
+ if(count == 0) return cb();
+ });
+ }
+}
+
+server.on('connect', function(_server) {
+ console.log("---------------------------------- 0")
+ // Attempt authentication
+ _server.auth('scram-sha-1', 'admin', 'root', 'root', function(err, r) {
+ console.log("---------------------------------- 1")
+ // console.dir(err)
+ // console.dir(r)
+
+ _server.insert('test.test', [{a:1}], function(err, r) {
+ console.log("---------------------------------- 2")
+ console.dir(err)
+ if(r)console.dir(r.result)
+ var name = null;
+
+ _server.on('joined', function(_t, _server) {
+ if(name == _server.name) {
+ console.log("=========== joined :: " + _t + " :: " + _server.name)
+ executeCursors(_server, function() {
+ });
+ }
+ })
+
+ // var s = _server.s.replicaSetState.secondaries[0];
+ // s.destroy({emitClose:true});
+ executeCursors(_server, function() {
+ console.log("============== 0")
+ // Attempt to force a server reconnect
+ var s = _server.s.replicaSetState.secondaries[0];
+ name = s.name;
+ s.destroy({emitClose:true});
+ // console.log("============== 1")
+
+ // _server.destroy();
+ // test.done();
+ });
+ });
+ });
+});
+
+server.connect();
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/test1.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/test1.js
new file mode 100644
index 0000000..6e05ebd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/test1.js
@@ -0,0 +1,72 @@
+var Server = require('./lib/topologies/server');
+
+// Attempt to connect
+var server = new Server({
+ host: 'localhost', port: 27017, socketTimeout: 500
+});
+
+// function executeCursors(_server, cb) {
+// var count = 100;
+//
+// for(var i = 0; i < 100; i++) {
+// // Execute the write
+// var cursor = _server.cursor('test.test', {
+// find: 'test.test'
+// , query: {a:1}
+// }, {readPreference: new ReadPreference('secondary')});
+//
+// // Get the first document
+// cursor.next(function(err, doc) {
+// count = count - 1;
+// if(err) console.dir(err)
+// if(count == 0) return cb();
+// });
+// }
+// }
+
+server.on('connect', function(_server) {
+
+ setInterval(function() {
+ _server.insert('test.test', [{a:1}], function(err, r) {
+ console.log("insert")
+ });
+ }, 1000)
+ // console.log("---------------------------------- 0")
+ // // Attempt authentication
+ // _server.auth('scram-sha-1', 'admin', 'root', 'root', function(err, r) {
+ // console.log("---------------------------------- 1")
+ // // console.dir(err)
+ // // console.dir(r)
+ //
+ // _server.insert('test.test', [{a:1}], function(err, r) {
+ // console.log("---------------------------------- 2")
+ // console.dir(err)
+ // if(r)console.dir(r.result)
+ // var name = null;
+ //
+ // _server.on('joined', function(_t, _server) {
+ // if(name == _server.name) {
+ // console.log("=========== joined :: " + _t + " :: " + _server.name)
+ // executeCursors(_server, function() {
+ // });
+ // }
+ // })
+ //
+ // // var s = _server.s.replicaSetState.secondaries[0];
+ // // s.destroy({emitClose:true});
+ // executeCursors(_server, function() {
+ // console.log("============== 0")
+ // // Attempt to force a server reconnect
+ // var s = _server.s.replicaSetState.secondaries[0];
+ // name = s.name;
+ // s.destroy({emitClose:true});
+ // // console.log("============== 1")
+ //
+ // // _server.destroy();
+ // // test.done();
+ // });
+ // });
+ // });
+});
+
+server.connect();
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/test_bug.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/test_bug.js
new file mode 100644
index 0000000..6606328
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/test_bug.js
@@ -0,0 +1,22 @@
+var ReplSet = require('./').ReplSet;
+var replSet = new ReplSet([
+ { host: '10.211.55.6', port: 31000 },
+ { host: '10.211.55.12', port: 31001 },
+ { host: '10.211.55.13', port: 31002 }
+], {
+ connectionTimeout: 10000,
+});
+
+replSet.on('connect', function(_server) {
+ setInterval(function() {
+ _server.command('system.$cmd', { ping: 1 }, function(err, result) {
+ if (err) {
+ console.error(err);
+ } else {
+ console.log(result.result);
+ }
+ });
+ }, 1000);
+});
+
+replSet.connect()
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/yarn.lock b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/yarn.lock
new file mode 100644
index 0000000..136a027
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/mongodb-core/yarn.lock
@@ -0,0 +1,2485 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+abbrev@1, abbrev@1.0.x:
+ version "1.0.9"
+ resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135"
+
+align-text@^0.1.1, align-text@^0.1.3:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
+ dependencies:
+ kind-of "^3.0.2"
+ longest "^1.0.1"
+ repeat-string "^1.5.2"
+
+amdefine@>=0.0.4:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
+
+ampersand-events@^2.0.1:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/ampersand-events/-/ampersand-events-2.0.2.tgz#f402bc2e18305fabd995dbdcd3b7057bbdd7d347"
+ dependencies:
+ ampersand-version "^1.0.2"
+ lodash "^4.6.1"
+
+ampersand-state@^5.0.1:
+ version "5.0.2"
+ resolved "https://registry.yarnpkg.com/ampersand-state/-/ampersand-state-5.0.2.tgz#16830def866c644ecd21da8c8ba8717aa2b8d23c"
+ dependencies:
+ ampersand-events "^2.0.1"
+ ampersand-version "^1.0.0"
+ array-next "~0.0.1"
+ key-tree-store "^1.3.0"
+ lodash "^4.11.1"
+
+ampersand-version@^1.0.0, ampersand-version@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/ampersand-version/-/ampersand-version-1.0.2.tgz#ff8f3d4ceac4d32ccd83f6bd6697397f7b59e2c0"
+ dependencies:
+ find-root "^0.1.1"
+ through2 "^0.6.3"
+
+ansi-regex@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.0.0.tgz#c5061b6e0ef8a81775e50f5d66151bf6bf371107"
+
+ansi-styles@^2.2.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
+
+ansi@^0.3.0, ansi@~0.3.0:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/ansi/-/ansi-0.3.1.tgz#0c42d4fb17160d5a9af1e484bace1c66922c1b21"
+
+append-transform@^0.2.0:
+ version "0.2.2"
+ resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.2.2.tgz#c41f3763e910cfe79646092667e6471809938c85"
+
+are-we-there-yet@~1.0.0:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.0.6.tgz#a2d28c93102aa6cc96245a26cb954de06ec53f0c"
+ dependencies:
+ delegates "^1.0.0"
+ readable-stream "^2.0.0 || ^1.1.13"
+
+argparse@^1.0.7:
+ version "1.0.9"
+ resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86"
+ dependencies:
+ sprintf-js "~1.0.2"
+
+arr-diff@^1.0.1:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-1.1.0.tgz#687c32758163588fef7de7b36fabe495eb1a399a"
+ dependencies:
+ arr-flatten "^1.0.1"
+ array-slice "^0.2.3"
+
+arr-flatten@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.1.tgz#e5ffe54d45e19f32f216e91eb99c8ce892bb604b"
+
+array-find-index@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1"
+
+array-next@~0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/array-next/-/array-next-0.0.1.tgz#e5e4660a4c27fda8151ff7764275d00900062be1"
+
+array-slice@^0.2.3:
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-0.2.3.tgz#dd3cfb80ed7973a75117cdac69b0b99ec86186f5"
+
+arrify@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
+
+asn1@~0.2.3:
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86"
+
+assert-plus@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234"
+
+assert-plus@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
+
+async@^1.4.0, async@^1.5.0, async@~1.5.0, async@1.x:
+ version "1.5.2"
+ resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
+
+async@~0.1.22:
+ version "0.1.22"
+ resolved "https://registry.yarnpkg.com/async/-/async-0.1.22.tgz#0fc1aaa088a0e3ef0ebe2d8831bab0dcf8845061"
+
+async@~0.2.6:
+ version "0.2.10"
+ resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1"
+
+asynckit@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
+
+aws-sign2@~0.6.0:
+ version "0.6.0"
+ resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f"
+
+aws4@^1.2.1:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755"
+
+babel-code-frame@^6.16.0:
+ version "6.16.0"
+ resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.16.0.tgz#f90e60da0862909d3ce098733b5d3987c97cb8de"
+ dependencies:
+ chalk "^1.1.0"
+ esutils "^2.0.2"
+ js-tokens "^2.0.0"
+
+babel-core@^6.18.0, babel-core@^6.2.1:
+ version "6.18.2"
+ resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.18.2.tgz#d8bb14dd6986fa4f3566a26ceda3964fa0e04e5b"
+ dependencies:
+ babel-code-frame "^6.16.0"
+ babel-generator "^6.18.0"
+ babel-helpers "^6.16.0"
+ babel-messages "^6.8.0"
+ babel-register "^6.18.0"
+ babel-runtime "^6.9.1"
+ babel-template "^6.16.0"
+ babel-traverse "^6.18.0"
+ babel-types "^6.18.0"
+ babylon "^6.11.0"
+ convert-source-map "^1.1.0"
+ debug "^2.1.1"
+ json5 "^0.5.0"
+ lodash "^4.2.0"
+ minimatch "^3.0.2"
+ path-is-absolute "^1.0.0"
+ private "^0.1.6"
+ slash "^1.0.0"
+ source-map "^0.5.0"
+
+babel-generator@^6.18.0:
+ version "6.19.0"
+ resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.19.0.tgz#9b2f244204777a3d6810ec127c673c87b349fac5"
+ dependencies:
+ babel-messages "^6.8.0"
+ babel-runtime "^6.9.0"
+ babel-types "^6.19.0"
+ detect-indent "^4.0.0"
+ jsesc "^1.3.0"
+ lodash "^4.2.0"
+ source-map "^0.5.0"
+
+babel-helpers@^6.16.0:
+ version "6.16.0"
+ resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.16.0.tgz#1095ec10d99279460553e67eb3eee9973d3867e3"
+ dependencies:
+ babel-runtime "^6.0.0"
+ babel-template "^6.16.0"
+
+babel-messages@^6.8.0:
+ version "6.8.0"
+ resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.8.0.tgz#bf504736ca967e6d65ef0adb5a2a5f947c8e0eb9"
+ dependencies:
+ babel-runtime "^6.0.0"
+
+babel-polyfill@^6.2.0:
+ version "6.16.0"
+ resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.16.0.tgz#2d45021df87e26a374b6d4d1a9c65964d17f2422"
+ dependencies:
+ babel-runtime "^6.9.1"
+ core-js "^2.4.0"
+ regenerator-runtime "^0.9.5"
+
+babel-register@^6.18.0:
+ version "6.18.0"
+ resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.18.0.tgz#892e2e03865078dd90ad2c715111ec4449b32a68"
+ dependencies:
+ babel-core "^6.18.0"
+ babel-runtime "^6.11.6"
+ core-js "^2.4.0"
+ home-or-tmp "^2.0.0"
+ lodash "^4.2.0"
+ mkdirp "^0.5.1"
+ source-map-support "^0.4.2"
+
+babel-runtime@^6.0.0, babel-runtime@^6.11.6, babel-runtime@^6.9.0, babel-runtime@^6.9.1:
+ version "6.18.0"
+ resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.18.0.tgz#0f4177ffd98492ef13b9f823e9994a02584c9078"
+ dependencies:
+ core-js "^2.4.0"
+ regenerator-runtime "^0.9.5"
+
+babel-template@^6.16.0:
+ version "6.16.0"
+ resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.16.0.tgz#e149dd1a9f03a35f817ddbc4d0481988e7ebc8ca"
+ dependencies:
+ babel-runtime "^6.9.0"
+ babel-traverse "^6.16.0"
+ babel-types "^6.16.0"
+ babylon "^6.11.0"
+ lodash "^4.2.0"
+
+babel-traverse@^6.16.0, babel-traverse@^6.18.0:
+ version "6.19.0"
+ resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.19.0.tgz#68363fb821e26247d52a519a84b2ceab8df4f55a"
+ dependencies:
+ babel-code-frame "^6.16.0"
+ babel-messages "^6.8.0"
+ babel-runtime "^6.9.0"
+ babel-types "^6.19.0"
+ babylon "^6.11.0"
+ debug "^2.2.0"
+ globals "^9.0.0"
+ invariant "^2.2.0"
+ lodash "^4.2.0"
+
+babel-types@^6.16.0, babel-types@^6.18.0, babel-types@^6.19.0:
+ version "6.19.0"
+ resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.19.0.tgz#8db2972dbed01f1192a8b602ba1e1e4c516240b9"
+ dependencies:
+ babel-runtime "^6.9.1"
+ esutils "^2.0.2"
+ lodash "^4.2.0"
+ to-fast-properties "^1.0.1"
+
+babylon@^6.11.0:
+ version "6.14.1"
+ resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.14.1.tgz#956275fab72753ad9b3435d7afe58f8bf0a29815"
+
+balanced-match@^0.4.1:
+ version "0.4.2"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
+
+bcrypt-pbkdf@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4"
+ dependencies:
+ tweetnacl "^0.14.3"
+
+"binary@>= 0.3.0 < 1":
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/binary/-/binary-0.3.0.tgz#9f60553bc5ce8c3386f3b553cff47462adecaa79"
+ dependencies:
+ buffers "~0.1.1"
+ chainsaw "~0.1.0"
+
+bl@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/bl/-/bl-1.1.2.tgz#fdca871a99713aa00d19e3bbba41c44787a65398"
+ dependencies:
+ readable-stream "~2.0.5"
+
+block-stream@*:
+ version "0.0.9"
+ resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a"
+ dependencies:
+ inherits "~2.0.0"
+
+boolbase@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
+
+boom@2.x.x:
+ version "2.10.1"
+ resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f"
+ dependencies:
+ hoek "2.x.x"
+
+brace-expansion@^1.0.0:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9"
+ dependencies:
+ balanced-match "^0.4.1"
+ concat-map "0.0.1"
+
+braces@^1.8.0:
+ version "1.8.5"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7"
+ dependencies:
+ expand-range "^1.8.1"
+ preserve "^0.2.0"
+ repeat-element "^1.1.2"
+
+bson@~0.4.23:
+ version "0.4.23"
+ resolved "https://registry.yarnpkg.com/bson/-/bson-0.4.23.tgz#e65a2e3c7507ffade4109bc7575a76e50f8da915"
+
+bson@~0.5.7, bson@mongodb/js-bson#1.0-branch:
+ version "0.5.7"
+ resolved "https://codeload.github.com/mongodb/js-bson/tar.gz/99156a22772f35dbfa18db3f8b34ba48ccbb4e20"
+
+buffer-shims@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51"
+
+buffers@~0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/buffers/-/buffers-0.1.1.tgz#b24579c3bed4d6d396aeee6d9a8ae7f5482ab7bb"
+
+builtin-modules@^1.0.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
+
+caching-transform@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/caching-transform/-/caching-transform-1.0.1.tgz#6dbdb2f20f8d8fbce79f3e94e9d1742dcdf5c0a1"
+ dependencies:
+ md5-hex "^1.2.0"
+ mkdirp "^0.5.1"
+ write-file-atomic "^1.1.4"
+
+camelcase-keys@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7"
+ dependencies:
+ camelcase "^2.0.0"
+ map-obj "^1.0.0"
+
+camelcase@^1.0.2:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
+
+camelcase@^2.0.0, camelcase@^2.0.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f"
+
+caseless@~0.11.0:
+ version "0.11.0"
+ resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7"
+
+catharsis@~0.8.2:
+ version "0.8.8"
+ resolved "https://registry.yarnpkg.com/catharsis/-/catharsis-0.8.8.tgz#693479f43aac549d806bd73e924cd0d944951a06"
+ dependencies:
+ underscore-contrib "~0.3.0"
+
+center-align@^0.1.1:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad"
+ dependencies:
+ align-text "^0.1.3"
+ lazy-cache "^1.0.3"
+
+chainsaw@~0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/chainsaw/-/chainsaw-0.1.0.tgz#5eab50b28afe58074d0d58291388828b5e5fbc98"
+ dependencies:
+ traverse ">=0.3.0 <0.4"
+
+chalk@^1.1.0, chalk@^1.1.1:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
+ dependencies:
+ ansi-styles "^2.2.1"
+ escape-string-regexp "^1.0.2"
+ has-ansi "^2.0.0"
+ strip-ansi "^3.0.0"
+ supports-color "^2.0.0"
+
+cheerio@^0.19.0:
+ version "0.19.0"
+ resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.19.0.tgz#772e7015f2ee29965096d71ea4175b75ab354925"
+ dependencies:
+ css-select "~1.0.0"
+ dom-serializer "~0.1.0"
+ entities "~1.1.1"
+ htmlparser2 "~3.8.1"
+ lodash "^3.2.0"
+
+cliui@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
+ dependencies:
+ center-align "^0.1.1"
+ right-align "^0.1.1"
+ wordwrap "0.0.2"
+
+cliui@^3.0.3:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d"
+ dependencies:
+ string-width "^1.0.1"
+ strip-ansi "^3.0.1"
+ wrap-ansi "^2.0.0"
+
+co@^4.5.4, co@^4.6.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
+
+code-point-at@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
+
+combined-stream@^1.0.5, combined-stream@~1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009"
+ dependencies:
+ delayed-stream "~1.0.0"
+
+commander@^2.9.0:
+ version "2.9.0"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4"
+ dependencies:
+ graceful-readlink ">= 1.0.0"
+
+commondir@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
+
+concat-map@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
+
+convert-source-map@^1.1.0, convert-source-map@^1.1.2:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.3.0.tgz#e9f3e9c6e2728efc2676696a70eb382f73106a67"
+
+core-js@^2.4.0:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e"
+
+core-util-is@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
+
+coveralls@^2.11.6:
+ version "2.11.15"
+ resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-2.11.15.tgz#37d3474369d66c14f33fa73a9d25cee6e099fca0"
+ dependencies:
+ js-yaml "3.6.1"
+ lcov-parse "0.0.10"
+ log-driver "1.2.5"
+ minimist "1.2.0"
+ request "2.75.0"
+
+cross-spawn@^4:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41"
+ dependencies:
+ lru-cache "^4.0.1"
+ which "^1.2.9"
+
+cryptiles@2.x.x:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8"
+ dependencies:
+ boom "2.x.x"
+
+css-select@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.0.0.tgz#b1121ca51848dd264e2244d058cee254deeb44b0"
+ dependencies:
+ boolbase "~1.0.0"
+ css-what "1.0"
+ domutils "1.4"
+ nth-check "~1.0.0"
+
+css-what@1.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/css-what/-/css-what-1.0.0.tgz#d7cc2df45180666f99d2b14462639469e00f736c"
+
+currently-unhandled@^0.4.1:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea"
+ dependencies:
+ array-find-index "^1.0.1"
+
+dashdash@^1.12.0:
+ version "1.14.1"
+ resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
+ dependencies:
+ assert-plus "^1.0.0"
+
+debug@^2.1.1, debug@^2.1.3, debug@^2.2.0:
+ version "2.3.3"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-2.3.3.tgz#40c453e67e6e13c901ddec317af8986cda9eff8c"
+ dependencies:
+ ms "0.7.2"
+
+debug@~2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da"
+ dependencies:
+ ms "0.7.1"
+
+decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
+
+deep-is@~0.1.3:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
+
+delayed-stream@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
+
+delegates@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
+
+detect-indent@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208"
+ dependencies:
+ repeating "^2.0.0"
+
+docopt@~0.6.2:
+ version "0.6.2"
+ resolved "https://registry.yarnpkg.com/docopt/-/docopt-0.6.2.tgz#b28e9e2220da5ec49f7ea5bb24a47787405eeb11"
+
+dom-serializer@~0.1.0, dom-serializer@0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82"
+ dependencies:
+ domelementtype "~1.1.1"
+ entities "~1.1.1"
+
+domelementtype@~1.1.1:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b"
+
+domelementtype@1:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2"
+
+domhandler@2.3:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.3.0.tgz#2de59a0822d5027fabff6f032c2b25a2a8abe738"
+ dependencies:
+ domelementtype "1"
+
+domutils@1.4:
+ version "1.4.3"
+ resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.4.3.tgz#0865513796c6b306031850e175516baf80b72a6f"
+ dependencies:
+ domelementtype "1"
+
+domutils@1.5:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf"
+ dependencies:
+ dom-serializer "0"
+ domelementtype "1"
+
+downcache@0.0.8:
+ version "0.0.8"
+ resolved "https://registry.yarnpkg.com/downcache/-/downcache-0.0.8.tgz#332320dde5806ea55d2e6d2ea674990bda4e8b75"
+ dependencies:
+ extend "2.0.x"
+ graceful-fs "2.0.3"
+ limiter "1.0.x"
+ mkdirp "~0.3.5"
+ npmlog "1.0.0"
+ request "^2.34.0"
+
+ecc-jsbn@~0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505"
+ dependencies:
+ jsbn "~0.1.0"
+
+entities@~1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0"
+
+entities@1.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/entities/-/entities-1.0.0.tgz#b2987aa3821347fcde642b24fdfc9e4fb712bf26"
+
+error-ex@^1.2.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.0.tgz#e67b43f3e82c96ea3a584ffee0b9fc3325d802d9"
+ dependencies:
+ is-arrayish "^0.2.1"
+
+es6-promise@^3.0.2:
+ version "3.3.1"
+ resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613"
+
+es6-promise@3.2.1:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.2.1.tgz#ec56233868032909207170c39448e24449dd1fc4"
+
+escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
+
+escodegen@1.1.x:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.1.0.tgz#c663923f6e20aad48d0c0fa49f31c6d4f49360cf"
+ dependencies:
+ esprima "~1.0.4"
+ estraverse "~1.5.0"
+ esutils "~1.0.0"
+ optionalDependencies:
+ source-map "~0.1.30"
+
+escodegen@1.8.x:
+ version "1.8.1"
+ resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018"
+ dependencies:
+ esprima "^2.7.1"
+ estraverse "^1.9.1"
+ esutils "^2.0.2"
+ optionator "^0.8.1"
+ optionalDependencies:
+ source-map "~0.2.0"
+
+esprima@^2.6.0, esprima@^2.7.1, esprima@2.7.x:
+ version "2.7.3"
+ resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"
+
+esprima@~1.0.4, esprima@1.0.x:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.0.4.tgz#9f557e08fc3b4d26ece9dd34f8fbf476b62585ad"
+
+"esprima@https://github.com/ariya/esprima/tarball/49a2eccb243f29bd653b11e9419241a9d726af7c":
+ version "1.1.0-dev-harmony"
+ resolved "https://github.com/ariya/esprima/tarball/49a2eccb243f29bd653b11e9419241a9d726af7c#a03eaca83ec1125aa3d4acddd2636b4dd707db67"
+
+estraverse@^1.9.1:
+ version "1.9.3"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44"
+
+estraverse@~1.5.0:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.5.1.tgz#867a3e8e58a9f84618afb6c2ddbcd916b7cbaf71"
+
+esutils@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
+
+esutils@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/esutils/-/esutils-1.0.0.tgz#8151d358e20c8acc7fb745e7472c0025fe496570"
+
+expand-brackets@^0.1.1:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
+ dependencies:
+ is-posix-bracket "^0.1.0"
+
+expand-range@^1.8.1:
+ version "1.8.2"
+ resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337"
+ dependencies:
+ fill-range "^2.1.0"
+
+extend@~3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4"
+
+extend@2.0.x:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/extend/-/extend-2.0.1.tgz#1ee8010689e7395ff9448241c98652bc759a8260"
+
+extsprintf@1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550"
+
+fast-levenshtein@~2.0.4:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.5.tgz#bd33145744519ab1c36c3ee9f31f08e9079b67f2"
+
+figures@^1.4.0:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e"
+ dependencies:
+ escape-string-regexp "^1.0.5"
+ object-assign "^4.1.0"
+
+filename-regex@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775"
+
+fill-range@^2.1.0:
+ version "2.2.3"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723"
+ dependencies:
+ is-number "^2.1.0"
+ isobject "^2.0.0"
+ randomatic "^1.1.3"
+ repeat-element "^1.1.2"
+ repeat-string "^1.5.2"
+
+find-cache-dir@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9"
+ dependencies:
+ commondir "^1.0.1"
+ mkdirp "^0.5.1"
+ pkg-dir "^1.0.0"
+
+find-root@^0.1.1:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/find-root/-/find-root-0.1.2.tgz#98d2267cff1916ccaf2743b3a0eea81d79d7dcd1"
+
+find-up@^1.0.0:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
+ dependencies:
+ path-exists "^2.0.0"
+ pinkie-promise "^2.0.0"
+
+for-in@^0.1.5:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.6.tgz#c9f96e89bfad18a545af5ec3ed352a1d9e5b4dc8"
+
+for-own@^0.1.1:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.4.tgz#0149b41a39088c7515f51ebe1c1386d45f935072"
+ dependencies:
+ for-in "^0.1.5"
+
+foreground-child@^1.3.3, foreground-child@^1.3.5:
+ version "1.5.3"
+ resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-1.5.3.tgz#94dd6aba671389867de8e57e99f1c2ecfb15c01a"
+ dependencies:
+ cross-spawn "^4"
+ signal-exit "^3.0.0"
+
+forever-agent@~0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
+
+form-data@~2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.0.0.tgz#6f0aebadcc5da16c13e1ecc11137d85f9b883b25"
+ dependencies:
+ asynckit "^0.4.0"
+ combined-stream "^1.0.5"
+ mime-types "^2.1.11"
+
+form-data@~2.1.1:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4"
+ dependencies:
+ asynckit "^0.4.0"
+ combined-stream "^1.0.5"
+ mime-types "^2.1.12"
+
+fs-extra@^0.22.1:
+ version "0.22.1"
+ resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.22.1.tgz#5fd6f8049dc976ca19eb2355d658173cabcce056"
+ dependencies:
+ graceful-fs "^4.1.2"
+ jsonfile "^2.1.0"
+ rimraf "^2.2.8"
+
+fs-extra@~0.30.0:
+ version "0.30.0"
+ resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0"
+ dependencies:
+ graceful-fs "^4.1.2"
+ jsonfile "^2.1.0"
+ klaw "^1.0.0"
+ path-is-absolute "^1.0.0"
+ rimraf "^2.2.8"
+
+fs.realpath@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
+
+fstream@^1.0.2:
+ version "1.0.10"
+ resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.10.tgz#604e8a92fe26ffd9f6fae30399d4984e1ab22822"
+ dependencies:
+ graceful-fs "^4.1.2"
+ inherits "~2.0.0"
+ mkdirp ">=0.5 0"
+ rimraf "2"
+
+"fstream@>= 0.1.30 < 1":
+ version "0.1.31"
+ resolved "https://registry.yarnpkg.com/fstream/-/fstream-0.1.31.tgz#7337f058fbbbbefa8c9f561a28cab0849202c988"
+ dependencies:
+ graceful-fs "~3.0.2"
+ inherits "~2.0.0"
+ mkdirp "0.5"
+ rimraf "2"
+
+gauge@~1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/gauge/-/gauge-1.0.2.tgz#53e25965dfaf1c85be3a2a0633306a24a67dc2f9"
+ dependencies:
+ ansi "^0.3.0"
+ has-unicode "^1.0.0"
+
+generate-function@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74"
+
+generate-object-property@^1.1.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0"
+ dependencies:
+ is-property "^1.0.0"
+
+get-mongodb-version@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/get-mongodb-version/-/get-mongodb-version-0.0.1.tgz#bc8aa433ba2fdd57fa33312dcf89f06f3a908caa"
+ dependencies:
+ debug "^2.2.0"
+ lodash.startswith "^3.0.1"
+ minimist "^1.1.1"
+ mongodb "^2.0.39"
+ which "^1.1.1"
+
+get-stdin@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"
+
+getpass@^0.1.1:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6"
+ dependencies:
+ assert-plus "^1.0.0"
+
+gleak@0.5.0:
+ version "0.5.0"
+ resolved "https://registry.yarnpkg.com/gleak/-/gleak-0.5.0.tgz#9cd7694be50d6dbeb842021ed8160814c51faddf"
+
+glob-base@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"
+ dependencies:
+ glob-parent "^2.0.0"
+ is-glob "^2.0.0"
+
+glob-parent@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28"
+ dependencies:
+ is-glob "^2.0.0"
+
+glob@^5.0.15:
+ version "5.0.15"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
+ dependencies:
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "2 || 3"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+glob@^6.0.2:
+ version "6.0.4"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22"
+ dependencies:
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "2 || 3"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+glob@^7.0.5:
+ version "7.1.1"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.2"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+globals@^9.0.0:
+ version "9.14.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-9.14.0.tgz#8859936af0038741263053b39d0e76ca241e4034"
+
+graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9:
+ version "4.1.11"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
+
+graceful-fs@~3.0.2:
+ version "3.0.11"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-3.0.11.tgz#7613c778a1afea62f25c630a086d7f3acbbdd818"
+ dependencies:
+ natives "^1.1.0"
+
+graceful-fs@2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-2.0.3.tgz#7cd2cdb228a4a3f36e95efa6cc142de7d1a136d0"
+
+"graceful-readlink@>= 1.0.0":
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
+
+handlebars@^4.0.1:
+ version "4.0.6"
+ resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.6.tgz#2ce4484850537f9c97a8026d5399b935c4ed4ed7"
+ dependencies:
+ async "^1.4.0"
+ optimist "^0.6.1"
+ source-map "^0.4.4"
+ optionalDependencies:
+ uglify-js "^2.6"
+
+handlebars@2.0.0-alpha.1:
+ version v2.0.0-alpha.1
+ resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-2.0.0-alpha.1.tgz#c4d149068c713de0afa7f45bbb88a2ca73715afd"
+ dependencies:
+ optimist "~0.3"
+ optionalDependencies:
+ uglify-js "~2.3"
+
+har-validator@~2.0.6:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d"
+ dependencies:
+ chalk "^1.1.1"
+ commander "^2.9.0"
+ is-my-json-valid "^2.12.4"
+ pinkie-promise "^2.0.0"
+
+has-ansi@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
+ dependencies:
+ ansi-regex "^2.0.0"
+
+has-flag@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
+
+has-unicode@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-1.0.1.tgz#c46fceea053eb8ec789bffbba25fca52dfdcf38e"
+
+hawk@~3.1.3:
+ version "3.1.3"
+ resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4"
+ dependencies:
+ boom "2.x.x"
+ cryptiles "2.x.x"
+ hoek "2.x.x"
+ sntp "1.x.x"
+
+hoek@2.x.x:
+ version "2.16.3"
+ resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed"
+
+home-or-tmp@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8"
+ dependencies:
+ os-homedir "^1.0.0"
+ os-tmpdir "^1.0.1"
+
+hosted-git-info@^2.1.4:
+ version "2.1.5"
+ resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.1.5.tgz#0ba81d90da2e25ab34a332e6ec77936e1598118b"
+
+htmlparser2@~3.8.1:
+ version "3.8.3"
+ resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.8.3.tgz#996c28b191516a8be86501a7d79757e5c70c1068"
+ dependencies:
+ domelementtype "1"
+ domhandler "2.3"
+ domutils "1.5"
+ entities "1.0"
+ readable-stream "1.1"
+
+http-signature@~1.1.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf"
+ dependencies:
+ assert-plus "^0.2.0"
+ jsprim "^1.2.2"
+ sshpk "^1.7.0"
+
+imurmurhash@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
+
+indent-string@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80"
+ dependencies:
+ repeating "^2.0.0"
+
+inflight@^1.0.4:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
+ dependencies:
+ once "^1.3.0"
+ wrappy "1"
+
+inherits@~2.0.0, inherits@~2.0.1, inherits@2:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
+
+integra@0.1.8:
+ version "0.1.8"
+ resolved "https://registry.yarnpkg.com/integra/-/integra-0.1.8.tgz#8d5b8019f87ea3704e6c97da2c912e14ec3bece7"
+ dependencies:
+ escodegen "1.1.x"
+ esprima "1.0.x"
+ handlebars "2.0.0-alpha.1"
+ mkdirp latest
+ rimraf "2.2.6"
+
+invariant@^2.2.0:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360"
+ dependencies:
+ loose-envify "^1.0.0"
+
+invert-kv@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6"
+
+is-arrayish@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
+
+is-buffer@^1.0.2:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.4.tgz#cfc86ccd5dc5a52fa80489111c6920c457e2d98b"
+
+is-builtin-module@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe"
+ dependencies:
+ builtin-modules "^1.0.0"
+
+is-dotfile@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d"
+
+is-equal-shallow@^0.1.3:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534"
+ dependencies:
+ is-primitive "^2.0.0"
+
+is-extglob@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
+
+is-finite@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa"
+ dependencies:
+ number-is-nan "^1.0.0"
+
+is-fullwidth-code-point@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb"
+ dependencies:
+ number-is-nan "^1.0.0"
+
+is-glob@^1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-1.1.3.tgz#b4c64b8303d39114492a460d364ccfb0d3c0a045"
+
+is-glob@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
+ dependencies:
+ is-extglob "^1.0.0"
+
+is-my-json-valid@^2.12.4:
+ version "2.15.0"
+ resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b"
+ dependencies:
+ generate-function "^2.0.0"
+ generate-object-property "^1.1.0"
+ jsonpointer "^4.0.0"
+ xtend "^4.0.0"
+
+is-number@^2.0.2, is-number@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
+ dependencies:
+ kind-of "^3.0.2"
+
+is-posix-bracket@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
+
+is-primitive@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575"
+
+is-property@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84"
+
+is-typedarray@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
+
+is-utf8@^0.2.0:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
+
+isarray@~1.0.0, isarray@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
+
+isarray@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
+
+isexe@^1.1.1:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0"
+
+isobject@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-0.2.0.tgz#a3432192f39b910b5f02cc989487836ec70aa85e"
+
+isobject@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
+ dependencies:
+ isarray "1.0.0"
+
+isstream@~0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
+
+istanbul@^0.4.1:
+ version "0.4.5"
+ resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b"
+ dependencies:
+ abbrev "1.0.x"
+ async "1.x"
+ escodegen "1.8.x"
+ esprima "2.7.x"
+ glob "^5.0.15"
+ handlebars "^4.0.1"
+ js-yaml "3.x"
+ mkdirp "0.5.x"
+ nopt "3.x"
+ once "1.x"
+ resolve "1.1.x"
+ supports-color "^3.1.0"
+ which "^1.1.1"
+ wordwrap "^1.0.0"
+
+jodid25519@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967"
+ dependencies:
+ jsbn "~0.1.0"
+
+js-tokens@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-2.0.0.tgz#79903f5563ee778cc1162e6dcf1a0027c97f9cb5"
+
+js-yaml@3.6.1:
+ version "3.6.1"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30"
+ dependencies:
+ argparse "^1.0.7"
+ esprima "^2.6.0"
+
+js-yaml@3.x:
+ version "3.7.0"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80"
+ dependencies:
+ argparse "^1.0.7"
+ esprima "^2.6.0"
+
+js2xmlparser@~0.1.0:
+ version "0.1.9"
+ resolved "https://registry.yarnpkg.com/js2xmlparser/-/js2xmlparser-0.1.9.tgz#2c516788e09460637f9a403dfed7b925f71d239e"
+
+jsbn@~0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd"
+
+jsdoc@3.3.0-alpha8:
+ version "3.3.0-alpha8"
+ resolved "https://registry.yarnpkg.com/jsdoc/-/jsdoc-3.3.0-alpha8.tgz#d7960708ec99f5390dca78ba8da9677188a17363"
+ dependencies:
+ async "~0.1.22"
+ catharsis "~0.8.2"
+ esprima "https://github.com/ariya/esprima/tarball/49a2eccb243f29bd653b11e9419241a9d726af7c"
+ js2xmlparser "~0.1.0"
+ marked "~0.3.1"
+ requizzle "~0.1.1"
+ strip-json-comments "~0.1.3"
+ taffydb "https://github.com/hegemonic/taffydb/tarball/master"
+ underscore "~1.6.0"
+ wrench "~1.3.9"
+
+jsesc@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b"
+
+json-schema@0.2.3:
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
+
+json-stringify-safe@~5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
+
+json5@^0.5.0:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821"
+
+jsonfile@^2.1.0:
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8"
+ optionalDependencies:
+ graceful-fs "^4.1.6"
+
+jsonpointer@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.0.tgz#6661e161d2fc445f19f98430231343722e1fcbd5"
+
+jsprim@^1.2.2:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.3.1.tgz#2a7256f70412a29ee3670aaca625994c4dcff252"
+ dependencies:
+ extsprintf "1.0.2"
+ json-schema "0.2.3"
+ verror "1.3.6"
+
+kerberos@0.0.17:
+ version "0.0.17"
+ resolved "https://registry.yarnpkg.com/kerberos/-/kerberos-0.0.17.tgz#29a67c0b127bfa52bdd3b53b7b8c8659a9a084f8"
+ dependencies:
+ nan "~2.0"
+
+key-tree-store@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/key-tree-store/-/key-tree-store-1.3.0.tgz#5ea29afc2529a425938437d6955b714ce6a9791f"
+
+kind-of@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-1.1.0.tgz#140a3d2d41a36d2efcfa9377b62c24f8495a5c44"
+
+kind-of@^3.0.2:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.0.4.tgz#7b8ecf18a4e17f8269d73b501c9f232c96887a74"
+ dependencies:
+ is-buffer "^1.0.2"
+
+klaw@^1.0.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439"
+ optionalDependencies:
+ graceful-fs "^4.1.9"
+
+lazy-cache@^1.0.3:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"
+
+lcid@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835"
+ dependencies:
+ invert-kv "^1.0.0"
+
+lcov-parse@0.0.10:
+ version "0.0.10"
+ resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3"
+
+levn@~0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
+ dependencies:
+ prelude-ls "~1.1.2"
+ type-check "~0.3.2"
+
+limiter@1.0.x:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/limiter/-/limiter-1.0.5.tgz#9630b2a0d3bad63203f96e3d96f32f83d442dfc8"
+
+load-json-file@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
+ dependencies:
+ graceful-fs "^4.1.2"
+ parse-json "^2.2.0"
+ pify "^2.0.0"
+ pinkie-promise "^2.0.0"
+ strip-bom "^2.0.0"
+
+lodash._baseassign@^3.0.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e"
+ dependencies:
+ lodash._basecopy "^3.0.0"
+ lodash.keys "^3.0.0"
+
+lodash._basecopy@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36"
+
+lodash._bindcallback@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
+
+lodash._createassigner@^3.0.0:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz#838a5bae2fdaca63ac22dee8e19fa4e6d6970b11"
+ dependencies:
+ lodash._bindcallback "^3.0.0"
+ lodash._isiterateecall "^3.0.0"
+ lodash.restparam "^3.0.0"
+
+lodash._getnative@^3.0.0:
+ version "3.9.1"
+ resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
+
+lodash._isiterateecall@^3.0.0:
+ version "3.0.9"
+ resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c"
+
+lodash._root@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692"
+
+lodash.assign@^3.0.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-3.2.0.tgz#3ce9f0234b4b2223e296b8fa0ac1fee8ebca64fa"
+ dependencies:
+ lodash._baseassign "^3.0.0"
+ lodash._createassigner "^3.0.0"
+ lodash.keys "^3.0.0"
+
+lodash.defaults@^3.1.2:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-3.1.2.tgz#c7308b18dbf8bc9372d701a73493c61192bd2e2c"
+ dependencies:
+ lodash.assign "^3.0.0"
+ lodash.restparam "^3.0.0"
+
+lodash.defaults@^4.0.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c"
+
+lodash.difference@^4.1.1:
+ version "4.5.0"
+ resolved "https://registry.yarnpkg.com/lodash.difference/-/lodash.difference-4.5.0.tgz#9ccb4e505d486b91651345772885a2df27fd017c"
+
+lodash.isarguments@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a"
+
+lodash.isarray@^3.0.0:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55"
+
+lodash.keys@^3.0.0:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a"
+ dependencies:
+ lodash._getnative "^3.0.0"
+ lodash.isarguments "^3.0.0"
+ lodash.isarray "^3.0.0"
+
+lodash.restparam@^3.0.0:
+ version "3.6.1"
+ resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
+
+lodash.startswith@^3.0.1:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/lodash.startswith/-/lodash.startswith-3.2.0.tgz#fc2e1ed2c6df8c777117632e87fe4a9181d483fb"
+ dependencies:
+ lodash._root "^3.0.0"
+
+lodash@^3.2.0:
+ version "3.10.1"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"
+
+lodash@^4.11.1, lodash@^4.2.0, lodash@^4.6.1:
+ version "4.17.2"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42"
+
+log-driver@1.2.5:
+ version "1.2.5"
+ resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056"
+
+longest@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
+
+loose-envify@^1.0.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.0.tgz#6b26248c42f6d4fa4b0d8542f78edfcde35642a8"
+ dependencies:
+ js-tokens "^2.0.0"
+
+loud-rejection@^1.0.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f"
+ dependencies:
+ currently-unhandled "^0.4.1"
+ signal-exit "^3.0.0"
+
+lru-cache@^4.0.1:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e"
+ dependencies:
+ pseudomap "^1.0.1"
+ yallist "^2.0.0"
+
+map-obj@^1.0.0, map-obj@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d"
+
+marked@~0.3.1:
+ version "0.3.6"
+ resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.6.tgz#b2c6c618fccece4ef86c4fc6cb8a7cbf5aeda8d7"
+
+"match-stream@>= 0.0.2 < 1":
+ version "0.0.2"
+ resolved "https://registry.yarnpkg.com/match-stream/-/match-stream-0.0.2.tgz#99eb050093b34dffade421b9ac0b410a9cfa17cf"
+ dependencies:
+ buffers "~0.1.1"
+ readable-stream "~1.0.0"
+
+md5-hex@^1.2.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-1.3.0.tgz#d2c4afe983c4370662179b8cad145219135046c4"
+ dependencies:
+ md5-o-matic "^0.1.1"
+
+md5-o-matic@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/md5-o-matic/-/md5-o-matic-0.1.1.tgz#822bccd65e117c514fab176b25945d54100a03c3"
+
+meow@^3.1.0:
+ version "3.7.0"
+ resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb"
+ dependencies:
+ camelcase-keys "^2.0.0"
+ decamelize "^1.1.2"
+ loud-rejection "^1.0.0"
+ map-obj "^1.0.1"
+ minimist "^1.1.3"
+ normalize-package-data "^2.3.4"
+ object-assign "^4.0.1"
+ read-pkg-up "^1.0.1"
+ redent "^1.0.0"
+ trim-newlines "^1.0.0"
+
+micromatch@~2.1.6:
+ version "2.1.6"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.1.6.tgz#51a65a9dcbfb92113292a071e04da35a81e9050e"
+ dependencies:
+ arr-diff "^1.0.1"
+ braces "^1.8.0"
+ debug "^2.1.3"
+ expand-brackets "^0.1.1"
+ filename-regex "^2.0.0"
+ is-glob "^1.1.3"
+ kind-of "^1.1.0"
+ object.omit "^0.2.1"
+ parse-glob "^3.0.0"
+ regex-cache "^0.4.0"
+
+mime-db@~1.25.0:
+ version "1.25.0"
+ resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.25.0.tgz#c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392"
+
+mime-types@^2.1.11, mime-types@^2.1.12, mime-types@~2.1.7:
+ version "2.1.13"
+ resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.13.tgz#e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88"
+ dependencies:
+ mime-db "~1.25.0"
+
+minimatch@^3.0.2, "minimatch@2 || 3":
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774"
+ dependencies:
+ brace-expansion "^1.0.0"
+
+minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
+
+minimist@~0.0.1:
+ version "0.0.10"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"
+
+minimist@0.0.8:
+ version "0.0.8"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
+
+mkdirp@^0.5.0, mkdirp@^0.5.1, "mkdirp@>=0.5 0", mkdirp@0.5, mkdirp@0.5.x, mkdirp@latest:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
+ dependencies:
+ minimist "0.0.8"
+
+mkdirp@~0.3.5:
+ version "0.3.5"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.5.tgz#de3e5f8961c88c787ee1368df849ac4413eca8d7"
+
+mkdirp@0.5.0:
+ version "0.5.0"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.0.tgz#1d73076a6df986cd9344e15e71fcc05a4c9abf12"
+ dependencies:
+ minimist "0.0.8"
+
+mongodb-core@^1.2.24:
+ version "1.3.21"
+ resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-1.3.21.tgz#fe129e7bee2b3b26c1409de02ab60d03f6291cca"
+ dependencies:
+ bson "~0.4.23"
+ require_optional "~1.0.0"
+
+mongodb-core@2.0.14:
+ version "2.0.14"
+ resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-2.0.14.tgz#4e8743b87343d169a7622535edbd47dcacd790be"
+ dependencies:
+ bson "~0.5.6"
+ require_optional "~1.0.0"
+
+mongodb-download-url@^0.1.10:
+ version "0.1.10"
+ resolved "https://registry.yarnpkg.com/mongodb-download-url/-/mongodb-download-url-0.1.10.tgz#a7047eec95001de9f4df39f7e4030dc87eb3f806"
+ dependencies:
+ async "^1.5.0"
+ debug "^2.2.0"
+ lodash.defaults "^4.0.0"
+ minimist "^1.2.0"
+ mongodb-version-list "^0.0.3"
+ request "^2.65.0"
+ semver "^5.0.3"
+
+mongodb-topology-manager@1.0.6:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/mongodb-topology-manager/-/mongodb-topology-manager-1.0.6.tgz#ac02c3bbe247ca41bd9a30a757b4394c0372c57f"
+ dependencies:
+ babel-core "^6.2.1"
+ babel-polyfill "^6.2.0"
+ co "^4.6.0"
+ es6-promise "^3.0.2"
+ kerberos "0.0.17"
+ mkdirp "^0.5.1"
+ mongodb-core "^1.2.24"
+ rimraf "^2.4.3"
+
+mongodb-version-list@^0.0.3, mongodb-version-list@0.0.3:
+ version "0.0.3"
+ resolved "https://registry.yarnpkg.com/mongodb-version-list/-/mongodb-version-list-0.0.3.tgz#bbb261861f041fcfc5bc72b5fe2681788bd52cef"
+ dependencies:
+ cheerio "^0.19.0"
+ debug "^2.2.0"
+ downcache "0.0.8"
+ fs-extra "^0.22.1"
+ minimist "^1.1.1"
+ semver "^5.0.1"
+
+mongodb-version-manager@christkv/mongodb-version-manager#master:
+ version "1.0.7"
+ resolved "https://codeload.github.com/christkv/mongodb-version-manager/tar.gz/3ea7c20925d6a0b3a9243d341d3c69abf95e66b6"
+ dependencies:
+ ampersand-state "^5.0.1"
+ async "~1.5.0"
+ chalk "^1.1.1"
+ debug "~2.2.0"
+ docopt "~0.6.2"
+ figures "^1.4.0"
+ fs-extra "~0.30.0"
+ get-mongodb-version "0.0.1"
+ lodash.defaults "^3.1.2"
+ lodash.difference "^4.1.1"
+ mongodb-download-url "^0.1.10"
+ mongodb-version-list "0.0.3"
+ nugget "^2.0.0"
+ semver "~5.1.0"
+ tar "~2.2.1"
+ tildify "~1.2.0"
+ untildify "~2.1.0"
+ unzip "^0.1.11"
+
+mongodb@^2.0.39:
+ version "2.2.12"
+ resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-2.2.12.tgz#2a86f10228f911e9d6fefdbd7d922188d7b730f9"
+ dependencies:
+ es6-promise "3.2.1"
+ mongodb-core "2.0.14"
+ readable-stream "2.1.5"
+
+ms@0.7.1:
+ version "0.7.1"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098"
+
+ms@0.7.2:
+ version "0.7.2"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765"
+
+nan@~2.0:
+ version "2.0.9"
+ resolved "https://registry.yarnpkg.com/nan/-/nan-2.0.9.tgz#d02a770f46778842cceb94e17cab31ffc7234a05"
+
+natives@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.0.tgz#e9ff841418a6b2ec7a495e939984f78f163e6e31"
+
+node-uuid@~1.4.7:
+ version "1.4.7"
+ resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.7.tgz#6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f"
+
+nopt@3.x:
+ version "3.0.6"
+ resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9"
+ dependencies:
+ abbrev "1"
+
+normalize-package-data@^2.3.2, normalize-package-data@^2.3.4:
+ version "2.3.5"
+ resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.5.tgz#8d924f142960e1777e7ffe170543631cc7cb02df"
+ dependencies:
+ hosted-git-info "^2.1.4"
+ is-builtin-module "^1.0.0"
+ semver "2 || 3 || 4 || 5"
+ validate-npm-package-license "^3.0.1"
+
+npmlog@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-1.0.0.tgz#ed2f290b60316887c39e0da9f09f8d13847cef0f"
+ dependencies:
+ ansi "~0.3.0"
+ are-we-there-yet "~1.0.0"
+ gauge "~1.0.2"
+
+nth-check@~1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.1.tgz#9929acdf628fc2c41098deab82ac580cf149aae4"
+ dependencies:
+ boolbase "~1.0.0"
+
+nugget@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/nugget/-/nugget-2.0.1.tgz#201095a487e1ad36081b3432fa3cada4f8d071b0"
+ dependencies:
+ debug "^2.1.3"
+ minimist "^1.1.0"
+ pretty-bytes "^1.0.2"
+ progress-stream "^1.1.0"
+ request "^2.45.0"
+ single-line-log "^1.1.2"
+ throttleit "0.0.2"
+
+number-is-nan@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
+
+nyc@^5.5.0:
+ version "5.6.0"
+ resolved "https://registry.yarnpkg.com/nyc/-/nyc-5.6.0.tgz#0eb394d16f3ef9ff1b440fd93b1a7ab530092754"
+ dependencies:
+ append-transform "^0.2.0"
+ arrify "^1.0.1"
+ caching-transform "^1.0.0"
+ convert-source-map "^1.1.2"
+ find-cache-dir "^0.1.1"
+ foreground-child "^1.3.5"
+ glob "^6.0.2"
+ istanbul "^0.4.1"
+ md5-hex "^1.2.0"
+ micromatch "~2.1.6"
+ mkdirp "^0.5.0"
+ pkg-up "^1.0.0"
+ read-pkg "^1.1.0"
+ resolve-from "^2.0.0"
+ rimraf "^2.5.0"
+ signal-exit "^2.1.1"
+ source-map "^0.5.3"
+ spawn-wrap "^1.1.1"
+ strip-bom "^2.0.0"
+ yargs "^3.15.0"
+
+oauth-sign@~0.8.1:
+ version "0.8.2"
+ resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43"
+
+object-assign@^4.0.1, object-assign@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0"
+
+object-keys@~0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336"
+
+object.omit@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-0.2.1.tgz#ca9af6631df6883fe61bae74df82a4fbc9df2e92"
+ dependencies:
+ for-own "^0.1.1"
+ isobject "^0.2.0"
+
+once@^1.3.0, once@1.x:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
+ dependencies:
+ wrappy "1"
+
+optimist@^0.6.1, optimist@latest:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686"
+ dependencies:
+ minimist "~0.0.1"
+ wordwrap "~0.0.2"
+
+optimist@~0.3, optimist@~0.3.5:
+ version "0.3.7"
+ resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.3.7.tgz#c90941ad59e4273328923074d2cf2e7cbc6ec0d9"
+ dependencies:
+ wordwrap "~0.0.2"
+
+optionator@^0.8.1:
+ version "0.8.2"
+ resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64"
+ dependencies:
+ deep-is "~0.1.3"
+ fast-levenshtein "~2.0.4"
+ levn "~0.3.0"
+ prelude-ls "~1.1.2"
+ type-check "~0.3.2"
+ wordwrap "~1.0.0"
+
+os-homedir@^1.0.0, os-homedir@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
+
+os-locale@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9"
+ dependencies:
+ lcid "^1.0.0"
+
+os-tmpdir@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
+
+"over@>= 0.0.5 < 1":
+ version "0.0.5"
+ resolved "https://registry.yarnpkg.com/over/-/over-0.0.5.tgz#f29852e70fd7e25f360e013a8ec44c82aedb5708"
+
+parse-glob@^3.0.0:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
+ dependencies:
+ glob-base "^0.3.0"
+ is-dotfile "^1.0.0"
+ is-extglob "^1.0.0"
+ is-glob "^2.0.0"
+
+parse-json@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9"
+ dependencies:
+ error-ex "^1.2.0"
+
+path-exists@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b"
+ dependencies:
+ pinkie-promise "^2.0.0"
+
+path-is-absolute@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
+
+path-type@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441"
+ dependencies:
+ graceful-fs "^4.1.2"
+ pify "^2.0.0"
+ pinkie-promise "^2.0.0"
+
+pify@^2.0.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
+
+pinkie-promise@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
+ dependencies:
+ pinkie "^2.0.0"
+
+pinkie@^2.0.0:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
+
+pkg-dir@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4"
+ dependencies:
+ find-up "^1.0.0"
+
+pkg-up@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-1.0.0.tgz#3e08fb461525c4421624a33b9f7e6d0af5b05a26"
+ dependencies:
+ find-up "^1.0.0"
+
+prelude-ls@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
+
+preserve@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
+
+pretty-bytes@^1.0.2:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-1.0.4.tgz#0a22e8210609ad35542f8c8d5d2159aff0751c84"
+ dependencies:
+ get-stdin "^4.0.1"
+ meow "^3.1.0"
+
+private@^0.1.6:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/private/-/private-0.1.6.tgz#55c6a976d0f9bafb9924851350fe47b9b5fbb7c1"
+
+process-nextick-args@~1.0.6:
+ version "1.0.7"
+ resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
+
+progress-stream@^1.1.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/progress-stream/-/progress-stream-1.2.0.tgz#2cd3cfea33ba3a89c9c121ec3347abe9ab125f77"
+ dependencies:
+ speedometer "~0.1.2"
+ through2 "~0.2.3"
+
+pseudomap@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
+
+"pullstream@>= 0.4.1 < 1":
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/pullstream/-/pullstream-0.4.1.tgz#d6fb3bf5aed697e831150eb1002c25a3f8ae1314"
+ dependencies:
+ over ">= 0.0.5 < 1"
+ readable-stream "~1.0.31"
+ setimmediate ">= 1.0.2 < 2"
+ slice-stream ">= 1.0.0 < 2"
+
+punycode@^1.4.1:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
+
+qs@~6.2.0:
+ version "6.2.1"
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.2.1.tgz#ce03c5ff0935bc1d9d69a9f14cbd18e568d67625"
+
+qs@~6.3.0:
+ version "6.3.0"
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442"
+
+randomatic@^1.1.3:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb"
+ dependencies:
+ is-number "^2.0.2"
+ kind-of "^3.0.2"
+
+read-pkg-up@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
+ dependencies:
+ find-up "^1.0.0"
+ read-pkg "^1.0.0"
+
+read-pkg@^1.0.0, read-pkg@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28"
+ dependencies:
+ load-json-file "^1.0.0"
+ normalize-package-data "^2.3.2"
+ path-type "^1.0.0"
+
+"readable-stream@^2.0.0 || ^1.1.13":
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e"
+ dependencies:
+ buffer-shims "^1.0.0"
+ core-util-is "~1.0.0"
+ inherits "~2.0.1"
+ isarray "~1.0.0"
+ process-nextick-args "~1.0.6"
+ string_decoder "~0.10.x"
+ util-deprecate "~1.0.1"
+
+"readable-stream@>=1.0.33-1 <1.1.0-0", readable-stream@~1.0.0, readable-stream@~1.0.31:
+ version "1.0.34"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c"
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.1"
+ isarray "0.0.1"
+ string_decoder "~0.10.x"
+
+readable-stream@~1.1.9:
+ version "1.1.14"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.1"
+ isarray "0.0.1"
+ string_decoder "~0.10.x"
+
+readable-stream@~2.0.5:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e"
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.1"
+ isarray "~1.0.0"
+ process-nextick-args "~1.0.6"
+ string_decoder "~0.10.x"
+ util-deprecate "~1.0.1"
+
+readable-stream@1.1:
+ version "1.1.13"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.13.tgz#f6eef764f514c89e2b9e23146a75ba106756d23e"
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.1"
+ isarray "0.0.1"
+ string_decoder "~0.10.x"
+
+readable-stream@2.1.5:
+ version "2.1.5"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0"
+ dependencies:
+ buffer-shims "^1.0.0"
+ core-util-is "~1.0.0"
+ inherits "~2.0.1"
+ isarray "~1.0.0"
+ process-nextick-args "~1.0.6"
+ string_decoder "~0.10.x"
+ util-deprecate "~1.0.1"
+
+redent@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde"
+ dependencies:
+ indent-string "^2.1.0"
+ strip-indent "^1.0.1"
+
+regenerator-runtime@^0.9.5:
+ version "0.9.6"
+ resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.9.6.tgz#d33eb95d0d2001a4be39659707c51b0cb71ce029"
+
+regex-cache@^0.4.0:
+ version "0.4.3"
+ resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145"
+ dependencies:
+ is-equal-shallow "^0.1.3"
+ is-primitive "^2.0.0"
+
+repeat-element@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a"
+
+repeat-string@^1.5.2:
+ version "1.6.1"
+ resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
+
+repeating@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda"
+ dependencies:
+ is-finite "^1.0.0"
+
+request@^2.34.0, request@^2.45.0, request@^2.65.0:
+ version "2.79.0"
+ resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de"
+ dependencies:
+ aws-sign2 "~0.6.0"
+ aws4 "^1.2.1"
+ caseless "~0.11.0"
+ combined-stream "~1.0.5"
+ extend "~3.0.0"
+ forever-agent "~0.6.1"
+ form-data "~2.1.1"
+ har-validator "~2.0.6"
+ hawk "~3.1.3"
+ http-signature "~1.1.0"
+ is-typedarray "~1.0.0"
+ isstream "~0.1.2"
+ json-stringify-safe "~5.0.1"
+ mime-types "~2.1.7"
+ oauth-sign "~0.8.1"
+ qs "~6.3.0"
+ stringstream "~0.0.4"
+ tough-cookie "~2.3.0"
+ tunnel-agent "~0.4.1"
+ uuid "^3.0.0"
+
+request@2.75.0:
+ version "2.75.0"
+ resolved "https://registry.yarnpkg.com/request/-/request-2.75.0.tgz#d2b8268a286da13eaa5d01adf5d18cc90f657d93"
+ dependencies:
+ aws-sign2 "~0.6.0"
+ aws4 "^1.2.1"
+ bl "~1.1.2"
+ caseless "~0.11.0"
+ combined-stream "~1.0.5"
+ extend "~3.0.0"
+ forever-agent "~0.6.1"
+ form-data "~2.0.0"
+ har-validator "~2.0.6"
+ hawk "~3.1.3"
+ http-signature "~1.1.0"
+ is-typedarray "~1.0.0"
+ isstream "~0.1.2"
+ json-stringify-safe "~5.0.1"
+ mime-types "~2.1.7"
+ node-uuid "~1.4.7"
+ oauth-sign "~0.8.1"
+ qs "~6.2.0"
+ stringstream "~0.0.4"
+ tough-cookie "~2.3.0"
+ tunnel-agent "~0.4.1"
+
+require_optional@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/require_optional/-/require_optional-1.0.0.tgz#52a86137a849728eb60a55533617f8f914f59abf"
+ dependencies:
+ resolve-from "^2.0.0"
+ semver "^5.1.0"
+
+requizzle@~0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/requizzle/-/requizzle-0.1.1.tgz#bad811e66c59251fe97e084295c33bcdbcf8e0ba"
+ dependencies:
+ underscore "~1.6.0"
+
+resolve-from@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57"
+
+resolve@1.1.x:
+ version "1.1.7"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
+
+right-align@^0.1.1:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
+ dependencies:
+ align-text "^0.1.1"
+
+rimraf@^2.2.8, rimraf@^2.3.3, rimraf@^2.4.3, rimraf@^2.5.0, rimraf@2:
+ version "2.5.4"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04"
+ dependencies:
+ glob "^7.0.5"
+
+rimraf@2.2.6:
+ version "2.2.6"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.6.tgz#c59597569b14d956ad29cacc42bdddf5f0ea4f4c"
+
+semver@^5.0.1, semver@^5.0.3, semver@^5.1.0, "semver@2 || 3 || 4 || 5":
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
+
+semver@~5.1.0:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-5.1.1.tgz#a3292a373e6f3e0798da0b20641b9a9c5bc47e19"
+
+semver@4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-4.1.0.tgz#bc80a9ff68532814362cc3cfda3c7b75ed9c321c"
+
+"setimmediate@>= 1.0.1 < 2", "setimmediate@>= 1.0.2 < 2":
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
+
+signal-exit@^2.0.0, signal-exit@^2.1.1:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-2.1.2.tgz#375879b1f92ebc3b334480d038dc546a6d558564"
+
+signal-exit@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.1.tgz#5a4c884992b63a7acd9badb7894c3ee9cfccad81"
+
+single-line-log@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/single-line-log/-/single-line-log-1.1.2.tgz#c2f83f273a3e1a16edb0995661da0ed5ef033364"
+ dependencies:
+ string-width "^1.0.1"
+
+slash@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
+
+"slice-stream@>= 1.0.0 < 2":
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/slice-stream/-/slice-stream-1.0.0.tgz#5b33bd66f013b1a7f86460b03d463dec39ad3ea0"
+ dependencies:
+ readable-stream "~1.0.31"
+
+slide@^1.1.5:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707"
+
+sntp@1.x.x:
+ version "1.0.9"
+ resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198"
+ dependencies:
+ hoek "2.x.x"
+
+source-map-support@^0.4.2:
+ version "0.4.6"
+ resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.6.tgz#32552aa64b458392a85eab3b0b5ee61527167aeb"
+ dependencies:
+ source-map "^0.5.3"
+
+source-map@^0.4.4:
+ version "0.4.4"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
+ dependencies:
+ amdefine ">=0.0.4"
+
+source-map@^0.5.0, source-map@^0.5.3, source-map@~0.5.1:
+ version "0.5.6"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412"
+
+source-map@~0.1.30, source-map@~0.1.7:
+ version "0.1.43"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346"
+ dependencies:
+ amdefine ">=0.0.4"
+
+source-map@~0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d"
+ dependencies:
+ amdefine ">=0.0.4"
+
+spawn-wrap@^1.1.1:
+ version "1.2.4"
+ resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.2.4.tgz#920eb211a769c093eebfbd5b0e7a5d2e68ab2e40"
+ dependencies:
+ foreground-child "^1.3.3"
+ mkdirp "^0.5.0"
+ os-homedir "^1.0.1"
+ rimraf "^2.3.3"
+ signal-exit "^2.0.0"
+ which "^1.2.4"
+
+spdx-correct@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40"
+ dependencies:
+ spdx-license-ids "^1.0.2"
+
+spdx-expression-parse@~1.0.0:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c"
+
+spdx-license-ids@^1.0.2:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57"
+
+speedometer@~0.1.2:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/speedometer/-/speedometer-0.1.4.tgz#9876dbd2a169d3115402d48e6ea6329c8816a50d"
+
+sprintf-js@~1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
+
+sshpk@^1.7.0:
+ version "1.10.1"
+ resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.1.tgz#30e1a5d329244974a1af61511339d595af6638b0"
+ dependencies:
+ asn1 "~0.2.3"
+ assert-plus "^1.0.0"
+ dashdash "^1.12.0"
+ getpass "^0.1.1"
+ optionalDependencies:
+ bcrypt-pbkdf "^1.0.0"
+ ecc-jsbn "~0.1.1"
+ jodid25519 "^1.0.0"
+ jsbn "~0.1.0"
+ tweetnacl "~0.14.0"
+
+string_decoder@~0.10.x:
+ version "0.10.31"
+ resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
+
+string-width@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
+ dependencies:
+ code-point-at "^1.0.0"
+ is-fullwidth-code-point "^1.0.0"
+ strip-ansi "^3.0.0"
+
+stringstream@~0.0.4:
+ version "0.0.5"
+ resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878"
+
+strip-ansi@^3.0.0, strip-ansi@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
+ dependencies:
+ ansi-regex "^2.0.0"
+
+strip-bom@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e"
+ dependencies:
+ is-utf8 "^0.2.0"
+
+strip-indent@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2"
+ dependencies:
+ get-stdin "^4.0.1"
+
+strip-json-comments@~0.1.3:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-0.1.3.tgz#164c64e370a8a3cc00c9e01b539e569823f0ee54"
+
+supports-color@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
+
+supports-color@^3.1.0:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5"
+ dependencies:
+ has-flag "^1.0.0"
+
+"taffydb@https://github.com/hegemonic/taffydb/tarball/master":
+ version "2.6.2"
+ resolved "https://github.com/hegemonic/taffydb/tarball/master#a4ee71882143901531fc170f6d22af053565a0c5"
+
+tar@~2.2.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1"
+ dependencies:
+ block-stream "*"
+ fstream "^1.0.2"
+ inherits "2"
+
+throttleit@0.0.2:
+ version "0.0.2"
+ resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-0.0.2.tgz#cfedf88e60c00dd9697b61fdd2a8343a9b680eaf"
+
+through2@^0.6.3:
+ version "0.6.5"
+ resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48"
+ dependencies:
+ readable-stream ">=1.0.33-1 <1.1.0-0"
+ xtend ">=4.0.0 <4.1.0-0"
+
+through2@~0.2.3:
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/through2/-/through2-0.2.3.tgz#eb3284da4ea311b6cc8ace3653748a52abf25a3f"
+ dependencies:
+ readable-stream "~1.1.9"
+ xtend "~2.1.1"
+
+tildify@~1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/tildify/-/tildify-1.2.0.tgz#dcec03f55dca9b7aa3e5b04f21817eb56e63588a"
+ dependencies:
+ os-homedir "^1.0.0"
+
+to-fast-properties@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320"
+
+tough-cookie@~2.3.0:
+ version "2.3.2"
+ resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a"
+ dependencies:
+ punycode "^1.4.1"
+
+"traverse@>=0.3.0 <0.4":
+ version "0.3.9"
+ resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.3.9.tgz#717b8f220cc0bb7b44e40514c22b2e8bbc70d8b9"
+
+trim-newlines@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613"
+
+tunnel-agent@~0.4.1:
+ version "0.4.3"
+ resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb"
+
+tweetnacl@^0.14.3, tweetnacl@~0.14.0:
+ version "0.14.3"
+ resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.3.tgz#3da382f670f25ded78d7b3d1792119bca0b7132d"
+
+type-check@~0.3.2:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72"
+ dependencies:
+ prelude-ls "~1.1.2"
+
+uglify-js@^2.6:
+ version "2.7.5"
+ resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.5.tgz#4612c0c7baaee2ba7c487de4904ae122079f2ca8"
+ dependencies:
+ async "~0.2.6"
+ source-map "~0.5.1"
+ uglify-to-browserify "~1.0.0"
+ yargs "~3.10.0"
+
+uglify-js@~2.3:
+ version "2.3.6"
+ resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.3.6.tgz#fa0984770b428b7a9b2a8058f46355d14fef211a"
+ dependencies:
+ async "~0.2.6"
+ optimist "~0.3.5"
+ source-map "~0.1.7"
+
+uglify-to-browserify@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
+
+underscore-contrib@~0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/underscore-contrib/-/underscore-contrib-0.3.0.tgz#665b66c24783f8fa2b18c9f8cbb0e2c7d48c26c7"
+ dependencies:
+ underscore "1.6.0"
+
+underscore@~1.6.0, underscore@1.6.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.6.0.tgz#8b38b10cacdef63337b8b24e4ff86d45aea529a8"
+
+untildify@~2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/untildify/-/untildify-2.1.0.tgz#17eb2807987f76952e9c0485fc311d06a826a2e0"
+ dependencies:
+ os-homedir "^1.0.0"
+
+unzip@^0.1.11:
+ version "0.1.11"
+ resolved "https://registry.yarnpkg.com/unzip/-/unzip-0.1.11.tgz#89749c63b058d7d90d619f86b98aa1535d3b97f0"
+ dependencies:
+ binary ">= 0.3.0 < 1"
+ fstream ">= 0.1.30 < 1"
+ match-stream ">= 0.0.2 < 1"
+ pullstream ">= 0.4.1 < 1"
+ readable-stream "~1.0.31"
+ setimmediate ">= 1.0.1 < 2"
+
+util-deprecate@~1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
+
+uuid@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1"
+
+validate-npm-package-license@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc"
+ dependencies:
+ spdx-correct "~1.0.0"
+ spdx-expression-parse "~1.0.0"
+
+verror@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c"
+ dependencies:
+ extsprintf "1.0.2"
+
+which@^1.1.1, which@^1.2.4, which@^1.2.9:
+ version "1.2.12"
+ resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192"
+ dependencies:
+ isexe "^1.1.1"
+
+window-size@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876"
+
+window-size@0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
+
+wordwrap@^1.0.0, wordwrap@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
+
+wordwrap@~0.0.2:
+ version "0.0.3"
+ resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
+
+wordwrap@0.0.2:
+ version "0.0.2"
+ resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
+
+wrap-ansi@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"
+ dependencies:
+ string-width "^1.0.1"
+ strip-ansi "^3.0.1"
+
+wrappy@1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
+
+wrench@~1.3.9:
+ version "1.3.9"
+ resolved "https://registry.yarnpkg.com/wrench/-/wrench-1.3.9.tgz#6f13ec35145317eb292ca5f6531391b244111411"
+
+write-file-atomic@^1.1.4:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-1.2.0.tgz#14c66d4e4cb3ca0565c28cf3b7a6f3e4d5938fab"
+ dependencies:
+ graceful-fs "^4.1.2"
+ imurmurhash "^0.1.4"
+ slide "^1.1.5"
+
+xtend@^4.0.0, "xtend@>=4.0.0 <4.1.0-0":
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
+
+xtend@~2.1.1:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b"
+ dependencies:
+ object-keys "~0.4.0"
+
+y18n@^3.2.0:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
+
+yallist@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.0.0.tgz#306c543835f09ee1a4cb23b7bce9ab341c91cdd4"
+
+yargs@^3.15.0:
+ version "3.32.0"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.32.0.tgz#03088e9ebf9e756b69751611d2a5ef591482c995"
+ dependencies:
+ camelcase "^2.0.1"
+ cliui "^3.0.3"
+ decamelize "^1.1.1"
+ os-locale "^1.4.0"
+ string-width "^1.0.1"
+ window-size "^0.1.4"
+ y18n "^3.2.0"
+
+yargs@~3.10.0:
+ version "3.10.0"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
+ dependencies:
+ camelcase "^1.0.2"
+ cliui "^2.1.0"
+ decamelize "^1.0.0"
+ window-size "0.1.0"
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/.npmignore
new file mode 100644
index 0000000..265ff73
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/.npmignore
@@ -0,0 +1,8 @@
+build/
+test/
+examples/
+fs.js
+zlib.js
+.zuul.yml
+.nyc_output
+coverage
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/.travis.yml b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/.travis.yml
new file mode 100644
index 0000000..84504c9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/.travis.yml
@@ -0,0 +1,49 @@
+sudo: false
+language: node_js
+before_install:
+ - npm install -g npm@2
+ - npm install -g npm
+notifications:
+ email: false
+matrix:
+ fast_finish: true
+ include:
+ - node_js: '0.8'
+ env: TASK=test
+ - node_js: '0.10'
+ env: TASK=test
+ - node_js: '0.11'
+ env: TASK=test
+ - node_js: '0.12'
+ env: TASK=test
+ - node_js: 1
+ env: TASK=test
+ - node_js: 2
+ env: TASK=test
+ - node_js: 3
+ env: TASK=test
+ - node_js: 4
+ env: TASK=test
+ - node_js: 5
+ env: TASK=test
+ - node_js: 6
+ env: TASK=test
+ - node_js: 5
+ env: TASK=browser BROWSER_NAME=android BROWSER_VERSION="4.0..latest"
+ - node_js: 5
+ env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest"
+ - node_js: 5
+ env: TASK=browser BROWSER_NAME=opera BROWSER_VERSION="11..latest"
+ - node_js: 5
+ env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="-3..latest"
+ - node_js: 5
+ env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="-3..latest"
+ - node_js: 5
+ env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest"
+ - node_js: 5
+ env: TASK=browser BROWSER_NAME=microsoftedge BROWSER_VERSION=latest
+script: "npm run $TASK"
+env:
+ global:
+ - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc=
+ - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI=
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/LICENSE
new file mode 100644
index 0000000..e3d4e69
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/LICENSE
@@ -0,0 +1,18 @@
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/README.md
new file mode 100644
index 0000000..9fb4fea
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/README.md
@@ -0,0 +1,36 @@
+# readable-stream
+
+***Node-core v6.3.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
+
+
+[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
+[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)
+
+
+[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream)
+
+```bash
+npm install --save readable-stream
+```
+
+***Node-core streams for userland***
+
+This package is a mirror of the Streams2 and Streams3 implementations in
+Node-core, including [documentation](doc/stream.md).
+
+If you want to guarantee a stable streams base, regardless of what version of
+Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
+
+As of version 2.0.0 **readable-stream** uses semantic versioning.
+
+# Streams WG Team Members
+
+* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) &lt;christopher.s.dickinson@gmail.com&gt;
+ - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B
+* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) &lt;calvin.metcalf@gmail.com&gt;
+ - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
+* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) &lt;rod@vagg.org&gt;
+ - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D
+* **Sam Newman** ([@sonewman](https://github.com/sonewman)) &lt;newmansam@outlook.com&gt;
+* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) &lt;mathiasbuus@gmail.com&gt;
+* **Domenic Denicola** ([@domenic](https://github.com/domenic)) &lt;d@domenic.me&gt;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/doc/stream.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/doc/stream.md
new file mode 100644
index 0000000..fc269c8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/doc/stream.md
@@ -0,0 +1,2015 @@
+# Stream
+
+ Stability: 2 - Stable
+
+A stream is an abstract interface for working with streaming data in Node.js.
+The `stream` module provides a base API that makes it easy to build objects
+that implement the stream interface.
+
+There are many stream objects provided by Node.js. For instance, a
+[request to an HTTP server][http-incoming-message] and [`process.stdout`][]
+are both stream instances.
+
+Streams can be readable, writable, or both. All streams are instances of
+[`EventEmitter`][].
+
+The `stream` module can be accessed using:
+
+```js
+const stream = require('stream');
+```
+
+While it is important for all Node.js users to understand how streams works,
+the `stream` module itself is most useful for developer's that are creating new
+types of stream instances. Developer's who are primarily *consuming* stream
+objects will rarely (if ever) have need to use the `stream` module directly.
+
+## Organization of this document
+
+This document is divided into two primary sections and third section for
+additional notes. The first section explains the elements of the stream API that
+are required to *use* streams within an application. The second section explains
+the elements of the API that are required to *implement* new types of streams.
+
+## Types of Streams
+
+There are four fundamental stream types within Node.js:
+
+* [Readable][] - streams from which data can be read (for example
+ [`fs.createReadStream()`][]).
+* [Writable][] - streams to which data can be written (for example
+ [`fs.createWriteStream()`][]).
+* [Duplex][] - streams that are both Readable and Writable (for example
+ [`net.Socket`][]).
+* [Transform][] - Duplex streams that can modify or transform the data as it
+ is written and read (for example [`zlib.createDeflate()`][]).
+
+### Object Mode
+
+All streams created by Node.js APIs operate exclusively on strings and `Buffer`
+objects. It is possible, however, for stream implementations to work with other
+types of JavaScript values (with the exception of `null` which serves a special
+purpose within streams). Such streams are considered to operate in "object
+mode".
+
+Stream instances are switched into object mode using the `objectMode` option
+when the stream is created. Attempting to switch an existing stream into
+object mode is not safe.
+
+### Buffering
+
+<!--type=misc-->
+
+Both [Writable][] and [Readable][] streams will store data in an internal
+buffer that can be retrieved using `writable._writableState.getBuffer()` or
+`readable._readableState.buffer`, respectively.
+
+The amount of data potentially buffered depends on the `highWaterMark` option
+passed into the streams constructor. For normal streams, the `highWaterMark`
+option specifies a total number of bytes. For streams operating in object mode,
+the `highWaterMark` specifies a total number of objects.
+
+Data is buffered in Readable streams when the implementation calls
+[`stream.push(chunk)`][stream-push]. If the consumer of the Stream does not
+call [`stream.read()`][stream-read], the data will sit in the internal
+queue until it is consumed.
+
+Once the total size of the internal read buffer reaches the threshold specified
+by `highWaterMark`, the stream will temporarily stop reading data from the
+underlying resource until the data currently buffered can be consumed (that is,
+the stream will stop calling the internal `readable._read()` method that is
+used to fill the read buffer).
+
+Data is buffered in Writable streams when the
+[`writable.write(chunk)`][stream-write] method is called repeatedly. While the
+total size of the internal write buffer is below the threshold set by
+`highWaterMark`, calls to `writable.write()` will return `true`. Once the
+the size of the internal buffer reaches or exceeds the `highWaterMark`, `false`
+will be returned.
+
+A key goal of the `stream` API, and in particular the [`stream.pipe()`] method,
+is to limit the buffering of data to acceptable levels such that sources and
+destinations of differing speeds will not overwhelm the available memory.
+
+Because [Duplex][] and [Transform][] streams are both Readable and Writable,
+each maintain *two* separate internal buffers used for reading and writing,
+allowing each side to operate independently of the other while maintaining an
+appropriate and efficient flow of data. For example, [`net.Socket`][] instances
+are [Duplex][] streams whose Readable side allows consumption of data received
+*from* the socket and whose Writable side allows writing data *to* the socket.
+Because data may be written to the socket at a faster or slower rate than data
+is received, it is important each side operate (and buffer) independently of
+the other.
+
+## API for Stream Consumers
+
+<!--type=misc-->
+
+Almost all Node.js applications, no matter how simple, use streams in some
+manner. The following is an example of using streams in a Node.js application
+that implements an HTTP server:
+
+```js
+const http = require('http');
+
+const server = http.createServer( (req, res) => {
+ // req is an http.IncomingMessage, which is a Readable Stream
+ // res is an http.ServerResponse, which is a Writable Stream
+
+ let body = '';
+ // Get the data as utf8 strings.
+ // If an encoding is not set, Buffer objects will be received.
+ req.setEncoding('utf8');
+
+ // Readable streams emit 'data' events once a listener is added
+ req.on('data', (chunk) => {
+ body += chunk;
+ });
+
+ // the end event indicates that the entire body has been received
+ req.on('end', () => {
+ try {
+ const data = JSON.parse(body);
+ } catch (er) {
+ // uh oh! bad json!
+ res.statusCode = 400;
+ return res.end(`error: ${er.message}`);
+ }
+
+ // write back something interesting to the user:
+ res.write(typeof data);
+ res.end();
+ });
+});
+
+server.listen(1337);
+
+// $ curl localhost:1337 -d '{}'
+// object
+// $ curl localhost:1337 -d '"foo"'
+// string
+// $ curl localhost:1337 -d 'not json'
+// error: Unexpected token o
+```
+
+[Writable][] streams (such as `res` in the example) expose methods such as
+`write()` and `end()` that are used to write data onto the stream.
+
+[Readable][] streams use the [`EventEmitter`][] API for notifying application
+code when data is available to be read off the stream. That available data can
+be read from the stream in multiple ways.
+
+Both [Writable][] and [Readable][] streams use the [`EventEmitter`][] API in
+various ways to communicate the current state of the stream.
+
+[Duplex][] and [Transform][] streams are both [Writable][] and [Readable][].
+
+Applications that are either writing data to or consuming data from a stream
+are not required to implement the stream interfaces directly and will generally
+have no reason to call `require('stream')`.
+
+Developers wishing to implement new types of streams should refer to the
+section [API for Stream Implementers][].
+
+### Writable Streams
+
+Writable streams are an abstraction for a *destination* to which data is
+written.
+
+Examples of [Writable][] streams include:
+
+* [HTTP requests, on the client][]
+* [HTTP responses, on the server][]
+* [fs write streams][]
+* [zlib streams][zlib]
+* [crypto streams][crypto]
+* [TCP sockets][]
+* [child process stdin][]
+* [`process.stdout`][], [`process.stderr`][]
+
+*Note*: Some of these examples are actually [Duplex][] streams that implement
+the [Writable][] interface.
+
+All [Writable][] streams implement the interface defined by the
+`stream.Writable` class.
+
+While specific instances of [Writable][] streams may differ in various ways,
+all Writable streams follow the same fundamental usage pattern as illustrated
+in the example below:
+
+```js
+const myStream = getWritableStreamSomehow();
+myStream.write('some data');
+myStream.write('some more data');
+myStream.end('done writing data');
+```
+
+#### Class: stream.Writable
+<!-- YAML
+added: v0.9.4
+-->
+
+<!--type=class-->
+
+##### Event: 'close'
+<!-- YAML
+added: v0.9.4
+-->
+
+The `'close'` event is emitted when the stream and any of its underlying
+resources (a file descriptor, for example) have been closed. The event indicates
+that no more events will be emitted, and no further computation will occur.
+
+Not all Writable streams will emit the `'close'` event.
+
+##### Event: 'drain'
+<!-- YAML
+added: v0.9.4
+-->
+
+If a call to [`stream.write(chunk)`][stream-write] returns `false`, the
+`'drain'` event will be emitted when it is appropriate to resume writing data
+to the stream.
+
+```js
+// Write the data to the supplied writable stream one million times.
+// Be attentive to back-pressure.
+function writeOneMillionTimes(writer, data, encoding, callback) {
+ let i = 1000000;
+ write();
+ function write() {
+ var ok = true;
+ do {
+ i--;
+ if (i === 0) {
+ // last time!
+ writer.write(data, encoding, callback);
+ } else {
+ // see if we should continue, or wait
+ // don't pass the callback, because we're not done yet.
+ ok = writer.write(data, encoding);
+ }
+ } while (i > 0 && ok);
+ if (i > 0) {
+ // had to stop early!
+ // write some more once it drains
+ writer.once('drain', write);
+ }
+ }
+}
+```
+
+##### Event: 'error'
+<!-- YAML
+added: v0.9.4
+-->
+
+* {Error}
+
+The `'error'` event is emitted if an error occurred while writing or piping
+data. The listener callback is passed a single `Error` argument when called.
+
+*Note*: The stream is not closed when the `'error'` event is emitted.
+
+##### Event: 'finish'
+<!-- YAML
+added: v0.9.4
+-->
+
+The `'finish'` event is emitted after the [`stream.end()`][stream-end] method
+has been called, and all data has been flushed to the underlying system.
+
+```js
+const writer = getWritableStreamSomehow();
+for (var i = 0; i < 100; i ++) {
+ writer.write('hello, #${i}!\n');
+}
+writer.end('This is the end\n');
+writer.on('finish', () => {
+ console.error('All writes are now complete.');
+});
+```
+
+##### Event: 'pipe'
+<!-- YAML
+added: v0.9.4
+-->
+
+* `src` {stream.Readable} source stream that is piping to this writable
+
+The `'pipe'` event is emitted when the [`stream.pipe()`][] method is called on
+a readable stream, adding this writable to its set of destinations.
+
+```js
+const writer = getWritableStreamSomehow();
+const reader = getReadableStreamSomehow();
+writer.on('pipe', (src) => {
+ console.error('something is piping into the writer');
+ assert.equal(src, reader);
+});
+reader.pipe(writer);
+```
+
+##### Event: 'unpipe'
+<!-- YAML
+added: v0.9.4
+-->
+
+* `src` {[Readable][] Stream} The source stream that
+ [unpiped][`stream.unpipe()`] this writable
+
+The `'unpipe'` event is emitted when the [`stream.unpipe()`][] method is called
+on a [Readable][] stream, removing this [Writable][] from its set of
+destinations.
+
+```js
+const writer = getWritableStreamSomehow();
+const reader = getReadableStreamSomehow();
+writer.on('unpipe', (src) => {
+ console.error('Something has stopped piping into the writer.');
+ assert.equal(src, reader);
+});
+reader.pipe(writer);
+reader.unpipe(writer);
+```
+
+##### writable.cork()
+<!-- YAML
+added: v0.11.2
+-->
+
+The `writable.cork()` method forces all written data to be buffered in memory.
+The buffered data will be flushed when either the [`stream.uncork()`][] or
+[`stream.end()`][stream-end] methods are called.
+
+The primary intent of `writable.cork()` is to avoid a situation where writing
+many small chunks of data to a stream do not cause an backup in the internal
+buffer that would have an adverse impact on performance. In such situations,
+implementations that implement the `writable._writev()` method can perform
+buffered writes in a more optimized manner.
+
+##### writable.end([chunk][, encoding][, callback])
+<!-- YAML
+added: v0.9.4
+-->
+
+* `chunk` {String|Buffer|any} Optional data to write. For streams not operating
+ in object mode, `chunk` must be a string or a `Buffer`. For object mode
+ streams, `chunk` may be any JavaScript value other than `null`.
+* `encoding` {String} The encoding, if `chunk` is a String
+* `callback` {Function} Optional callback for when the stream is finished
+
+Calling the `writable.end()` method signals that no more data will be written
+to the [Writable][]. The optional `chunk` and `encoding` arguments allow one
+final additional chunk of data to be written immediately before closing the
+stream. If provided, the optional `callback` function is attached as a listener
+for the [`'finish'`][] event.
+
+Calling the [`stream.write()`][stream-write] method after calling
+[`stream.end()`][stream-end] will raise an error.
+
+```js
+// write 'hello, ' and then end with 'world!'
+const file = fs.createWriteStream('example.txt');
+file.write('hello, ');
+file.end('world!');
+// writing more now is not allowed!
+```
+
+##### writable.setDefaultEncoding(encoding)
+<!-- YAML
+added: v0.11.15
+-->
+
+* `encoding` {String} The new default encoding
+* Return: `this`
+
+The `writable.setDefaultEncoding()` method sets the default `encoding` for a
+[Writable][] stream.
+
+##### writable.uncork()
+<!-- YAML
+added: v0.11.2
+-->
+
+The `writable.uncork()` method flushes all data buffered since
+[`stream.cork()`][] was called.
+
+When using `writable.cork()` and `writable.uncork()` to manage the buffering
+of writes to a stream, it is recommended that calls to `writable.uncork()` be
+deferred using `process.nextTick()`. Doing so allows batching of all
+`writable.write()` calls that occur within a given Node.js event loop phase.
+
+```js
+stream.cork();
+stream.write('some ');
+stream.write('data ');
+process.nextTick(() => stream.uncork());
+```
+
+If the `writable.cork()` method is called multiple times on a stream, the same
+number of calls to `writable.uncork()` must be called to flush the buffered
+data.
+
+```
+stream.cork();
+stream.write('some ');
+stream.cork();
+stream.write('data ');
+process.nextTick(() => {
+ stream.uncork();
+ // The data will not be flushed until uncork() is called a second time.
+ stream.uncork();
+});
+```
+
+##### writable.write(chunk[, encoding][, callback])
+<!-- YAML
+added: v0.9.4
+-->
+
+* `chunk` {String|Buffer} The data to write
+* `encoding` {String} The encoding, if `chunk` is a String
+* `callback` {Function} Callback for when this chunk of data is flushed
+* Returns: {Boolean} `false` if the stream wishes for the calling code to
+ wait for the `'drain'` event to be emitted before continuing to write
+ additional data; otherwise `true`.
+
+The `writable.write()` method writes some data to the stream, and calls the
+supplied `callback` once the data has been fully handled. If an error
+occurs, the `callback` *may or may not* be called with the error as its
+first argument. To reliably detect write errors, add a listener for the
+`'error'` event.
+
+The return value indicates whether the written `chunk` was buffered internally
+and the buffer has exceeded the `highWaterMark` configured when the stream was
+created. If `false` is returned, further attempts to write data to the stream
+should be paused until the `'drain'` event is emitted.
+
+A Writable stream in object mode will always ignore the `encoding` argument.
+
+### Readable Streams
+
+Readable streams are an abstraction for a *source* from which data is
+consumed.
+
+Examples of Readable streams include:
+
+* [HTTP responses, on the client][http-incoming-message]
+* [HTTP requests, on the server][http-incoming-message]
+* [fs read streams][]
+* [zlib streams][zlib]
+* [crypto streams][crypto]
+* [TCP sockets][]
+* [child process stdout and stderr][]
+* [`process.stdin`][]
+
+All [Readable][] streams implement the interface defined by the
+`stream.Readable` class.
+
+#### Two Modes
+
+Readable streams effectively operate in one of two modes: flowing and paused.
+
+When in flowing mode, data is read from the underlying system automatically
+and provided to an application as quickly as possible using events via the
+[`EventEmitter`][] interface.
+
+In paused mode, the [`stream.read()`][stream-read] method must be called
+explicitly to read chunks of data from the stream.
+
+All [Readable][] streams begin in paused mode but can be switched to flowing
+mode in one of the following ways:
+
+* Adding a [`'data'`][] event handler.
+* Calling the [`stream.resume()`][stream-resume] method.
+* Calling the [`stream.pipe()`][] method to send the data to a [Writable][].
+
+The Readable can switch back to paused mode using one of the following:
+
+* If there are no pipe destinations, by calling the
+ [`stream.pause()`][stream-pause] method.
+* If there are pipe destinations, by removing any [`'data'`][] event
+ handlers, and removing all pipe destinations by calling the
+ [`stream.unpipe()`][] method.
+
+The important concept to remember is that a Readable will not generate data
+until a mechanism for either consuming or ignoring that data is provided. If
+the consuming mechanism is disabled or taken away, the Readable will *attempt*
+to stop generating the data.
+
+*Note*: For backwards compatibility reasons, removing [`'data'`][] event
+handlers will **not** automatically pause the stream. Also, if there are piped
+destinations, then calling [`stream.pause()`][stream-pause] will not guarantee
+that the stream will *remain* paused once those destinations drain and ask for
+more data.
+
+*Note*: If a [Readable][] is switched into flowing mode and there are no
+consumers available handle the data, that data will be lost. This can occur,
+for instance, when the `readable.resume()` method is called without a listener
+attached to the `'data'` event, or when a `'data'` event handler is removed
+from the stream.
+
+#### Three States
+
+The "two modes" of operation for a Readable stream are a simplified abstraction
+for the more complicated internal state management that is happening within the
+Readable stream implementation.
+
+Specifically, at any given point in time, every Readable is in one of three
+possible states:
+
+* `readable._readableState.flowing = null`
+* `readable._readableState.flowing = false`
+* `readable._readableState.flowing = true`
+
+When `readable._readableState.flowing` is `null`, no mechanism for consuming the
+streams data is provided so the stream will not generate its data.
+
+Attaching a listener for the `'data'` event, calling the `readable.pipe()`
+method, or calling the `readable.resume()` method will switch
+`readable._readableState.flowing` to `true`, causing the Readable to begin
+actively emitting events as data is generated.
+
+Calling `readable.pause()`, `readable.unpipe()`, or receiving "back pressure"
+will cause the `readable._readableState.flowing` to be set as `false`,
+temporarily halting the flowing of events but *not* halting the generation of
+data.
+
+While `readable._readableState.flowing` is `false`, data may be accumulating
+within the streams internal buffer.
+
+#### Choose One
+
+The Readable stream API evolved across multiple Node.js versions and provides
+multiple methods of consuming stream data. In general, developers should choose
+*one* of the methods of consuming data and *should never* use multiple methods
+to consume data from a single stream.
+
+Use of the `readable.pipe()` method is recommended for most users as it has been
+implemented to provide the easiest way of consuming stream data. Developers that
+require more fine-grained control over the transfer and generation of data can
+use the [`EventEmitter`][] and `readable.pause()`/`readable.resume()` APIs.
+
+#### Class: stream.Readable
+<!-- YAML
+added: v0.9.4
+-->
+
+<!--type=class-->
+
+##### Event: 'close'
+<!-- YAML
+added: v0.9.4
+-->
+
+The `'close'` event is emitted when the stream and any of its underlying
+resources (a file descriptor, for example) have been closed. The event indicates
+that no more events will be emitted, and no further computation will occur.
+
+Not all [Readable][] streams will emit the `'close'` event.
+
+##### Event: 'data'
+<!-- YAML
+added: v0.9.4
+-->
+
+* `chunk` {Buffer|String|any} The chunk of data. For streams that are not
+ operating in object mode, the chunk will be either a string or `Buffer`.
+ For streams that are in object mode, the chunk can be any JavaScript value
+ other than `null`.
+
+The `'data'` event is emitted whenever the stream is relinquishing ownership of
+a chunk of data to a consumer. This may occur whenever the stream is switched
+in flowing mode by calling `readable.pipe()`, `readable.resume()`, or by
+attaching a listener callback to the `'data'` event. The `'data'` event will
+also be emitted whenever the `readable.read()` method is called and a chunk of
+data is available to be returned.
+
+Attaching a `'data'` event listener to a stream that has not been explicitly
+paused will switch the stream into flowing mode. Data will then be passed as
+soon as it is available.
+
+The listener callback will be passed the chunk of data as a string if a default
+encoding has been specified for the stream using the
+`readable.setEncoding()` method; otherwise the data will be passed as a
+`Buffer`.
+
+```js
+const readable = getReadableStreamSomehow();
+readable.on('data', (chunk) => {
+ console.log(`Received ${chunk.length} bytes of data.`);
+});
+```
+
+##### Event: 'end'
+<!-- YAML
+added: v0.9.4
+-->
+
+The `'end'` event is emitted when there is no more data to be consumed from
+the stream.
+
+*Note*: The `'end'` event **will not be emitted** unless the data is
+completely consumed. This can be accomplished by switching the stream into
+flowing mode, or by calling [`stream.read()`][stream-read] repeatedly until
+all data has been consumed.
+
+```js
+const readable = getReadableStreamSomehow();
+readable.on('data', (chunk) => {
+ console.log(`Received ${chunk.length} bytes of data.`);
+});
+readable.on('end', () => {
+ console.log('There will be no more data.');
+});
+```
+
+##### Event: 'error'
+<!-- YAML
+added: v0.9.4
+-->
+
+* {Error}
+
+The `'error'` event may be emitted by a Readable implementation at any time.
+Typically, this may occur if the underlying stream in unable to generate data
+due to an underlying internal failure, or when a stream implementation attempts
+to push an invalid chunk of data.
+
+The listener callback will be passed a single `Error` object.
+
+##### Event: 'readable'
+<!-- YAML
+added: v0.9.4
+-->
+
+The `'readable'` event is emitted when there is data available to be read from
+the stream. In some cases, attaching a listener for the `'readable'` event will
+cause some amount of data to be read into an internal buffer.
+
+```javascript
+const readable = getReadableStreamSomehow();
+readable.on('readable', () => {
+ // there is some data to read now
+});
+```
+The `'readable'` event will also be emitted once the end of the stream data
+has been reached but before the `'end'` event is emitted.
+
+Effectively, the `'readable'` event indicates that the stream has new
+information: either new data is available or the end of the stream has been
+reached. In the former case, [`stream.read()`][stream-read] will return the
+available data. In the latter case, [`stream.read()`][stream-read] will return
+`null`. For instance, in the following example, `foo.txt` is an empty file:
+
+```js
+const fs = require('fs');
+const rr = fs.createReadStream('foo.txt');
+rr.on('readable', () => {
+ console.log('readable:', rr.read());
+});
+rr.on('end', () => {
+ console.log('end');
+});
+```
+
+The output of running this script is:
+
+```
+$ node test.js
+readable: null
+end
+```
+
+*Note*: In general, the `readable.pipe()` and `'data'` event mechanisms are
+preferred over the use of the `'readable'` event.
+
+##### readable.isPaused()
+<!--
+added: v0.11.14
+-->
+
+* Return: {Boolean}
+
+The `readable.isPaused()` method returns the current operating state of the
+Readable. This is used primarily by the mechanism that underlies the
+`readable.pipe()` method. In most typical cases, there will be no reason to
+use this method directly.
+
+```js
+const readable = new stream.Readable
+
+readable.isPaused() // === false
+readable.pause()
+readable.isPaused() // === true
+readable.resume()
+readable.isPaused() // === false
+```
+
+##### readable.pause()
+<!-- YAML
+added: v0.9.4
+-->
+
+* Return: `this`
+
+The `readable.pause()` method will cause a stream in flowing mode to stop
+emitting [`'data'`][] events, switching out of flowing mode. Any data that
+becomes available will remain in the internal buffer.
+
+```js
+const readable = getReadableStreamSomehow();
+readable.on('data', (chunk) => {
+ console.log(`Received ${chunk.length} bytes of data.`);
+ readable.pause();
+ console.log('There will be no additional data for 1 second.');
+ setTimeout(() => {
+ console.log('Now data will start flowing again.');
+ readable.resume();
+ }, 1000);
+});
+```
+
+##### readable.pipe(destination[, options])
+<!-- YAML
+added: v0.9.4
+-->
+
+* `destination` {stream.Writable} The destination for writing data
+* `options` {Object} Pipe options
+ * `end` {Boolean} End the writer when the reader ends. Defaults to `true`.
+
+The `readable.pipe()` method attaches a [Writable][] stream to the `readable`,
+causing it to switch automatically into flowing mode and push all of its data
+to the attached [Writable][]. The flow of data will be automatically managed so
+that the destination Writable stream is not overwhelmed by a faster Readable
+stream.
+
+The following example pipes all of the data from the `readable` into a file
+named `file.txt`:
+
+```js
+const readable = getReadableStreamSomehow();
+const writable = fs.createWriteStream('file.txt');
+// All the data from readable goes into 'file.txt'
+readable.pipe(writable);
+```
+It is possible to attach multiple Writable streams to a single Readable stream.
+
+The `readable.pipe()` method returns a reference to the *destination* stream
+making it possible to set up chains of piped streams:
+
+```js
+const r = fs.createReadStream('file.txt');
+const z = zlib.createGzip();
+const w = fs.createWriteStream('file.txt.gz');
+r.pipe(z).pipe(w);
+```
+
+By default, [`stream.end()`][stream-end] is called on the destination Writable
+stream when the source Readable stream emits [`'end'`][], so that the
+destination is no longer writable. To disable this default behavior, the `end`
+option can be passed as `false`, causing the destination stream to remain open,
+as illustrated in the following example:
+
+```js
+reader.pipe(writer, { end: false });
+reader.on('end', () => {
+ writer.end('Goodbye\n');
+});
+```
+
+One important caveat is that if the Readable stream emits an error during
+processing, the Writable destination *is not closed* automatically. If an
+error occurs, it will be necessary to *manually* close each stream in order
+to prevent memory leaks.
+
+*Note*: The [`process.stderr`][] and [`process.stdout`][] Writable streams are
+never closed until the Node.js process exits, regardless of the specified
+options.
+
+##### readable.read([size])
+<!-- YAML
+added: v0.9.4
+-->
+
+* `size` {Number} Optional argument to specify how much data to read.
+* Return {String|Buffer|Null}
+
+The `readable.read()` method pulls some data out of the internal buffer and
+returns it. If no data available to be read, `null` is returned. By default,
+the data will be returned as a `Buffer` object unless an encoding has been
+specified using the `readable.setEncoding()` method or the stream is operating
+in object mode.
+
+The optional `size` argument specifies a specific number of bytes to read. If
+`size` bytes are not available to be read, `null` will be returned *unless*
+the stream has ended, in which case all of the data remaining in the internal
+buffer will be returned (*even if it exceeds `size` bytes*).
+
+If the `size` argument is not specified, all of the data contained in the
+internal buffer will be returned.
+
+The `readable.read()` method should only be called on Readable streams operating
+in paused mode. In flowing mode, `readable.read()` is called automatically until
+the internal buffer is fully drained.
+
+```js
+const readable = getReadableStreamSomehow();
+readable.on('readable', () => {
+ var chunk;
+ while (null !== (chunk = readable.read())) {
+ console.log(`Received ${chunk.length} bytes of data.`);
+ }
+});
+```
+
+In general, it is recommended that developers avoid the use of the `'readable'`
+event and the `readable.read()` method in favor of using either
+`readable.pipe()` or the `'data'` event.
+
+A Readable stream in object mode will always return a single item from
+a call to [`readable.read(size)`][stream-read], regardless of the value of the
+`size` argument.
+
+*Note:* If the `readable.read()` method returns a chunk of data, a `'data'`
+event will also be emitted.
+
+*Note*: Calling [`stream.read([size])`][stream-read] after the [`'end'`][]
+event has been emitted will return `null`. No runtime error will be raised.
+
+##### readable.resume()
+<!-- YAML
+added: v0.9.4
+-->
+
+* Return: `this`
+
+The `readable.resume()` method causes an explicitly paused Readable stream to
+resume emitting [`'data'`][] events, switching the stream into flowing mode.
+
+The `readable.resume()` method can be used to fully consume the data from a
+stream without actually processing any of that data as illustrated in the
+following example:
+
+```js
+getReadableStreamSomehow()
+ .resume()
+ .on('end', () => {
+ console.log('Reached the end, but did not read anything.');
+ });
+```
+
+##### readable.setEncoding(encoding)
+<!-- YAML
+added: v0.9.4
+-->
+
+* `encoding` {String} The encoding to use.
+* Return: `this`
+
+The `readable.setEncoding()` method sets the default character encoding for
+data read from the Readable stream.
+
+Setting an encoding causes the stream data
+to be returned as string of the specified encoding rather than as `Buffer`
+objects. For instance, calling `readable.setEncoding('utf8')` will cause the
+output data will be interpreted as UTF-8 data, and passed as strings. Calling
+`readable.setEncoding('hex')` will cause the data to be encoded in hexadecimal
+string format.
+
+The Readable stream will properly handle multi-byte characters delivered through
+the stream that would otherwise become improperly decoded if simply pulled from
+the stream as `Buffer` objects.
+
+Encoding can be disabled by calling `readable.setEncoding(null)`. This approach
+is useful when working with binary data or with large multi-byte strings spread
+out over multiple chunks.
+
+```js
+const readable = getReadableStreamSomehow();
+readable.setEncoding('utf8');
+readable.on('data', (chunk) => {
+ assert.equal(typeof chunk, 'string');
+ console.log('got %d characters of string data', chunk.length);
+});
+```
+
+##### readable.unpipe([destination])
+<!-- YAML
+added: v0.9.4
+-->
+
+* `destination` {stream.Writable} Optional specific stream to unpipe
+
+The `readable.unpipe()` method detaches a Writable stream previously attached
+using the [`stream.pipe()`][] method.
+
+If the `destination` is not specified, then *all* pipes are detached.
+
+If the `destination` is specified, but no pipe is set up for it, then
+the method does nothing.
+
+```js
+const readable = getReadableStreamSomehow();
+const writable = fs.createWriteStream('file.txt');
+// All the data from readable goes into 'file.txt',
+// but only for the first second
+readable.pipe(writable);
+setTimeout(() => {
+ console.log('Stop writing to file.txt');
+ readable.unpipe(writable);
+ console.log('Manually close the file stream');
+ writable.end();
+}, 1000);
+```
+
+##### readable.unshift(chunk)
+<!-- YAML
+added: v0.9.11
+-->
+
+* `chunk` {Buffer|String} Chunk of data to unshift onto the read queue
+
+The `readable.unshift()` method pushes a chunk of data back into the internal
+buffer. This is useful in certain situations where a stream is being consumed by
+code that needs to "un-consume" some amount of data that it has optimistically
+pulled out of the source, so that the data can be passed on to some other party.
+
+*Note*: The `stream.unshift(chunk)` method cannot be called after the
+[`'end'`][] event has been emitted or a runtime error will be thrown.
+
+Developers using `stream.unshift()` often should consider switching to
+use of a [Transform][] stream instead. See the [API for Stream Implementers][]
+section for more information.
+
+```js
+// Pull off a header delimited by \n\n
+// use unshift() if we get too much
+// Call the callback with (error, header, stream)
+const StringDecoder = require('string_decoder').StringDecoder;
+function parseHeader(stream, callback) {
+ stream.on('error', callback);
+ stream.on('readable', onReadable);
+ const decoder = new StringDecoder('utf8');
+ var header = '';
+ function onReadable() {
+ var chunk;
+ while (null !== (chunk = stream.read())) {
+ var str = decoder.write(chunk);
+ if (str.match(/\n\n/)) {
+ // found the header boundary
+ var split = str.split(/\n\n/);
+ header += split.shift();
+ const remaining = split.join('\n\n');
+ const buf = Buffer.from(remaining, 'utf8');
+ if (buf.length)
+ stream.unshift(buf);
+ stream.removeListener('error', callback);
+ stream.removeListener('readable', onReadable);
+ // now the body of the message can be read from the stream.
+ callback(null, header, stream);
+ } else {
+ // still reading the header.
+ header += str;
+ }
+ }
+ }
+}
+```
+
+*Note*: Unlike [`stream.push(chunk)`][stream-push], `stream.unshift(chunk)`
+will not end the reading process by resetting the internal reading state of the
+stream. This can cause unexpected results if `readable.unshift()` is called
+during a read (i.e. from within a [`stream._read()`][stream-_read]
+implementation on a custom stream). Following the call to `readable.unshift()`
+with an immediate [`stream.push('')`][stream-push] will reset the reading state
+appropriately, however it is best to simply avoid calling `readable.unshift()`
+while in the process of performing a read.
+
+##### readable.wrap(stream)
+<!-- YAML
+added: v0.9.4
+-->
+
+* `stream` {Stream} An "old style" readable stream
+
+Versions of Node.js prior to v0.10 had streams that did not implement the
+entire `stream` module API as it is currently defined. (See [Compatibility][]
+for more information.)
+
+When using an older Node.js library that emits [`'data'`][] events and has a
+[`stream.pause()`][stream-pause] method that is advisory only, the
+`readable.wrap()` method can be used to create a [Readable][] stream that uses
+the old stream as its data source.
+
+It will rarely be necessary to use `readable.wrap()` but the method has been
+provided as a convenience for interacting with older Node.js applications and
+libraries.
+
+For example:
+
+```js
+const OldReader = require('./old-api-module.js').OldReader;
+const Readable = require('stream').Readable;
+const oreader = new OldReader;
+const myReader = new Readable().wrap(oreader);
+
+myReader.on('readable', () => {
+ myReader.read(); // etc.
+});
+```
+
+### Duplex and Transform Streams
+
+#### Class: stream.Duplex
+<!-- YAML
+added: v0.9.4
+-->
+
+<!--type=class-->
+
+Duplex streams are streams that implement both the [Readable][] and
+[Writable][] interfaces.
+
+Examples of Duplex streams include:
+
+* [TCP sockets][]
+* [zlib streams][zlib]
+* [crypto streams][crypto]
+
+#### Class: stream.Transform
+<!-- YAML
+added: v0.9.4
+-->
+
+<!--type=class-->
+
+Transform streams are [Duplex][] streams where the output is in some way
+related to the input. Like all [Duplex][] streams, Transform streams
+implement both the [Readable][] and [Writable][] interfaces.
+
+Examples of Transform streams include:
+
+* [zlib streams][zlib]
+* [crypto streams][crypto]
+
+
+## API for Stream Implementers
+
+<!--type=misc-->
+
+The `stream` module API has been designed to make it possible to easily
+implement streams using JavaScript's prototypical inheritance model.
+
+First, a stream developer would declare a new JavaScript class that extends one
+of the four basic stream classes (`stream.Writable`, `stream.Readable`,
+`stream.Duplex`, or `stream.Transform`), making sure the call the appropriate
+parent class constructor:
+
+```js
+const Writable = require('stream').Writable;
+
+class MyWritable extends Writable {
+ constructor(options) {
+ super(options);
+ }
+}
+```
+
+The new stream class must then implement one or more specific methods, depending
+on the type of stream being created, as detailed in the chart below:
+
+<table>
+ <thead>
+ <tr>
+ <th>
+ <p>Use-case</p>
+ </th>
+ <th>
+ <p>Class</p>
+ </th>
+ <th>
+ <p>Method(s) to implement</p>
+ </th>
+ </tr>
+ </thead>
+ <tr>
+ <td>
+ <p>Reading only</p>
+ </td>
+ <td>
+ <p>[Readable](#stream_class_stream_readable)</p>
+ </td>
+ <td>
+ <p><code>[_read][stream-_read]</code></p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>Writing only</p>
+ </td>
+ <td>
+ <p>[Writable](#stream_class_stream_writable)</p>
+ </td>
+ <td>
+ <p><code>[_write][stream-_write]</code>, <code>[_writev][stream-_writev]</code></p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>Reading and writing</p>
+ </td>
+ <td>
+ <p>[Duplex](#stream_class_stream_duplex)</p>
+ </td>
+ <td>
+ <p><code>[_read][stream-_read]</code>, <code>[_write][stream-_write]</code>, <code>[_writev][stream-_writev]</code></p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>Operate on written data, then read the result</p>
+ </td>
+ <td>
+ <p>[Transform](#stream_class_stream_transform)</p>
+ </td>
+ <td>
+ <p><code>[_transform][stream-_transform]</code>, <code>[_flush][stream-_flush]</code></p>
+ </td>
+ </tr>
+</table>
+
+*Note*: The implementation code for a stream should *never* call the "public"
+methods of a stream that are intended for use by consumers (as described in
+the [API for Stream Consumers][] section). Doing so may lead to adverse
+side effects in application code consuming the stream.
+
+### Simplified Construction
+
+For many simple cases, it is possible to construct a stream without relying on
+inheritance. This can be accomplished by directly creating instances of the
+`stream.Writable`, `stream.Readable`, `stream.Duplex` or `stream.Transform`
+objects and passing appropriate methods as constructor options.
+
+For example:
+
+```js
+const Writable = require('stream').Writable;
+
+const myWritable = new Writable({
+ write(chunk, encoding, callback) {
+ // ...
+ }
+});
+```
+
+### Implementing a Writable Stream
+
+The `stream.Writable` class is extended to implement a [Writable][] stream.
+
+Custom Writable streams *must* call the `new stream.Writable([options])`
+constructor and implement the `writable._write()` method. The
+`writable._writev()` method *may* also be implemented.
+
+#### Constructor: new stream.Writable([options])
+
+* `options` {Object}
+ * `highWaterMark` {Number} Buffer level when
+ [`stream.write()`][stream-write] starts returning `false`. Defaults to
+ `16384` (16kb), or `16` for `objectMode` streams.
+ * `decodeStrings` {Boolean} Whether or not to decode strings into
+ Buffers before passing them to [`stream._write()`][stream-_write].
+ Defaults to `true`
+ * `objectMode` {Boolean} Whether or not the
+ [`stream.write(anyObj)`][stream-write] is a valid operation. When set,
+ it becomes possible to write JavaScript values other than string or
+ `Buffer` if supported by the stream implementation. Defaults to `false`
+ * `write` {Function} Implementation for the
+ [`stream._write()`][stream-_write] method.
+ * `writev` {Function} Implementation for the
+ [`stream._writev()`][stream-_writev] method.
+
+For example:
+
+```js
+const Writable = require('stream').Writable;
+
+class MyWritable extends Writable {
+ constructor(options) {
+ // Calls the stream.Writable() constructor
+ super(options);
+ }
+}
+```
+
+Or, when using pre-ES6 style constructors:
+
+```js
+const Writable = require('stream').Writable;
+const util = require('util');
+
+function MyWritable(options) {
+ if (!(this instanceof MyWritable))
+ return new MyWritable(options);
+ Writable.call(this, options);
+}
+util.inherits(MyWritable, Writable);
+```
+
+Or, using the Simplified Constructor approach:
+
+```js
+const Writable = require('stream').Writable;
+
+const myWritable = new Writable({
+ write(chunk, encoding, callback) {
+ // ...
+ },
+ writev(chunks, callback) {
+ // ...
+ }
+});
+```
+
+#### writable.\_write(chunk, encoding, callback)
+
+* `chunk` {Buffer|String} The chunk to be written. Will **always**
+ be a buffer unless the `decodeStrings` option was set to `false`.
+* `encoding` {String} If the chunk is a string, then `encoding` is the
+ character encoding of that string. If chunk is a `Buffer`, or if the
+ stream is operating in object mode, `encoding` may be ignored.
+* `callback` {Function} Call this function (optionally with an error
+ argument) when processing is complete for the supplied chunk.
+
+All Writable stream implementations must provide a
+[`writable._write()`][stream-_write] method to send data to the underlying
+resource.
+
+*Note*: [Transform][] streams provide their own implementation of the
+[`writable._write()`][stream-_write].
+
+*Note*: **This function MUST NOT be called by application code directly.** It
+should be implemented by child classes, and called only by the internal Writable
+class methods only.
+
+The `callback` method must be called to signal either that the write completed
+successfully or failed with an error. The first argument passed to the
+`callback` must be the `Error` object if the call failed or `null` if the
+write succeeded.
+
+It is important to note that all calls to `writable.write()` that occur between
+the time `writable._write()` is called and the `callback` is called will cause
+the written data to be buffered. Once the `callback` is invoked, the stream will
+emit a `'drain'` event. If a stream implementation is capable of processing
+multiple chunks of data at once, the `writable._writev()` method should be
+implemented.
+
+If the `decodeStrings` property is set in the constructor options, then
+`chunk` may be a string rather than a Buffer, and `encoding` will
+indicate the character encoding of the string. This is to support
+implementations that have an optimized handling for certain string
+data encodings. If the `decodeStrings` property is explicitly set to `false`,
+the `encoding` argument can be safely ignored, and `chunk` will always be a
+`Buffer`.
+
+The `writable._write()` method is prefixed with an underscore because it is
+internal to the class that defines it, and should never be called directly by
+user programs.
+
+#### writable.\_writev(chunks, callback)
+
+* `chunks` {Array} The chunks to be written. Each chunk has following
+ format: `{ chunk: ..., encoding: ... }`.
+* `callback` {Function} A callback function (optionally with an error
+ argument) to be invoked when processing is complete for the supplied chunks.
+
+*Note*: **This function MUST NOT be called by application code directly.** It
+should be implemented by child classes, and called only by the internal Writable
+class methods only.
+
+The `writable._writev()` method may be implemented in addition to
+`writable._write()` in stream implementations that are capable of processing
+multiple chunks of data at once. If implemented, the method will be called with
+all chunks of data currently buffered in the write queue.
+
+The `writable._writev()` method is prefixed with an underscore because it is
+internal to the class that defines it, and should never be called directly by
+user programs.
+
+#### Errors While Writing
+
+It is recommended that errors occurring during the processing of the
+`writable._write()` and `writable._writev()` methods are reported by invoking
+the callback and passing the error as the first argument. This will cause an
+`'error'` event to be emitted by the Writable. Throwing an Error from within
+`writable._write()` can result in expected and inconsistent behavior depending
+on how the stream is being used. Using the callback ensures consistent and
+predictable handling of errors.
+
+```js
+const Writable = require('stream').Writable;
+
+const myWritable = new Writable({
+ write(chunk, encoding, callback) {
+ if (chunk.toString().indexOf('a') >= 0) {
+ callback(new Error('chunk is invalid'));
+ } else {
+ callback();
+ }
+ }
+});
+```
+
+#### An Example Writable Stream
+
+The following illustrates a rather simplistic (and somewhat pointless) custom
+Writable stream implementation. While this specific Writable stream instance
+is not of any real particular usefulness, the example illustrates each of the
+required elements of a custom [Writable][] stream instance:
+
+```js
+const Writable = require('stream').Writable;
+
+class MyWritable extends Writable {
+ constructor(options) {
+ super(options);
+ }
+
+ _write(chunk, encoding, callback) {
+ if (chunk.toString().indexOf('a') >= 0) {
+ callback(new Error('chunk is invalid'));
+ } else {
+ callback();
+ }
+ }
+}
+```
+
+### Implementing a Readable Stream
+
+The `stream.Readable` class is extended to implement a [Readable][] stream.
+
+Custom Readable streams *must* call the `new stream.Readable([options])`
+constructor and implement the `readable._read()` method.
+
+#### new stream.Readable([options])
+
+* `options` {Object}
+ * `highWaterMark` {Number} The maximum number of bytes to store in
+ the internal buffer before ceasing to read from the underlying
+ resource. Defaults to `16384` (16kb), or `16` for `objectMode` streams
+ * `encoding` {String} If specified, then buffers will be decoded to
+ strings using the specified encoding. Defaults to `null`
+ * `objectMode` {Boolean} Whether this stream should behave
+ as a stream of objects. Meaning that [`stream.read(n)`][stream-read] returns
+ a single value instead of a Buffer of size n. Defaults to `false`
+ * `read` {Function} Implementation for the [`stream._read()`][stream-_read]
+ method.
+
+For example:
+
+```js
+const Readable = require('stream').Readable;
+
+class MyReadable extends Readable {
+ constructor(options) {
+ // Calls the stream.Readable(options) constructor
+ super(options);
+ }
+}
+```
+
+Or, when using pre-ES6 style constructors:
+
+```js
+const Readable = require('stream').Readable;
+const util = require('util');
+
+function MyReadable(options) {
+ if (!(this instanceof MyReadable))
+ return new MyReadable(options);
+ Readable.call(this, options);
+}
+util.inherits(MyReadable, Readable);
+```
+
+Or, using the Simplified Constructor approach:
+
+```js
+const Readable = require('stream').Readable;
+
+const myReadable = new Readable({
+ read(size) {
+ // ...
+ }
+});
+```
+
+#### readable.\_read(size)
+
+* `size` {Number} Number of bytes to read asynchronously
+
+*Note*: **This function MUST NOT be called by application code directly.** It
+should be implemented by child classes, and called only by the internal Readable
+class methods only.
+
+All Readable stream implementations must provide an implementation of the
+`readable._read()` method to fetch data from the underlying resource.
+
+When `readable._read()` is called, if data is available from the resource, the
+implementation should begin pushing that data into the read queue using the
+[`this.push(dataChunk)`][stream-push] method. `_read()` should continue reading
+from the resource and pushing data until `readable.push()` returns `false`. Only
+when `_read()` is called again after it has stopped should it resume pushing
+additional data onto the queue.
+
+*Note*: Once the `readable._read()` method has been called, it will not be
+called again until the [`readable.push()`][stream-push] method is called.
+
+The `size` argument is advisory. For implementations where a "read" is a
+single operation that returns data can use the `size` argument to determine how
+much data to fetch. Other implementations may ignore this argument and simply
+provide data whenever it becomes available. There is no need to "wait" until
+`size` bytes are available before calling [`stream.push(chunk)`][stream-push].
+
+The `readable._read()` method is prefixed with an underscore because it is
+internal to the class that defines it, and should never be called directly by
+user programs.
+
+#### readable.push(chunk[, encoding])
+
+* `chunk` {Buffer|Null|String} Chunk of data to push into the read queue
+* `encoding` {String} Encoding of String chunks. Must be a valid
+ Buffer encoding, such as `'utf8'` or `'ascii'`
+* Returns {Boolean} `true` if additional chunks of data may continued to be
+ pushed; `false` otherwise.
+
+When `chunk` is a `Buffer` or `string`, the `chunk` of data will be added to the
+internal queue for users of the stream to consume. Passing `chunk` as `null`
+signals the end of the stream (EOF), after which no more data can be written.
+
+When the Readable is operating in paused mode, the data added with
+`readable.push()` can be read out by calling the
+[`readable.read()`][stream-read] method when the [`'readable'`][] event is
+emitted.
+
+When the Readable is operating in flowing mode, the data added with
+`readable.push()` will be delivered by emitting a `'data'` event.
+
+The `readable.push()` method is designed to be as flexible as possible. For
+example, when wrapping a lower-level source that provides some form of
+pause/resume mechanism, and a data callback, the low-level source can be wrapped
+by the custom Readable instance as illustrated in the following example:
+
+```js
+// source is an object with readStop() and readStart() methods,
+// and an `ondata` member that gets called when it has data, and
+// an `onend` member that gets called when the data is over.
+
+class SourceWrapper extends Readable {
+ constructor(options) {
+ super(options);
+
+ this._source = getLowlevelSourceObject();
+
+ // Every time there's data, push it into the internal buffer.
+ this._source.ondata = (chunk) => {
+ // if push() returns false, then stop reading from source
+ if (!this.push(chunk))
+ this._source.readStop();
+ };
+
+ // When the source ends, push the EOF-signaling `null` chunk
+ this._source.onend = () => {
+ this.push(null);
+ };
+ }
+ // _read will be called when the stream wants to pull more data in
+ // the advisory size argument is ignored in this case.
+ _read(size) {
+ this._source.readStart();
+ }
+}
+```
+*Note*: The `readable.push()` method is intended be called only by Readable
+Implementers, and only from within the `readable._read()` method.
+
+#### Errors While Reading
+
+It is recommended that errors occurring during the processing of the
+`readable._read()` method are emitted using the `'error'` event rather than
+being thrown. Throwing an Error from within `readable._read()` can result in
+expected and inconsistent behavior depending on whether the stream is operating
+in flowing or paused mode. Using the `'error'` event ensures consistent and
+predictable handling of errors.
+
+```js
+const Readable = require('stream').Readable;
+
+const myReadable = new Readable({
+ read(size) {
+ if (checkSomeErrorCondition()) {
+ process.nextTick(() => this.emit('error', err));
+ return;
+ }
+ // do some work
+ }
+});
+```
+
+#### An Example Counting Stream
+
+<!--type=example-->
+
+The following is a basic example of a Readable stream that emits the numerals
+from 1 to 1,000,000 in ascending order, and then ends.
+
+```js
+const Readable = require('stream').Readable;
+
+class Counter extends Readable {
+ constructor(opt) {
+ super(opt);
+ this._max = 1000000;
+ this._index = 1;
+ }
+
+ _read() {
+ var i = this._index++;
+ if (i > this._max)
+ this.push(null);
+ else {
+ var str = '' + i;
+ var buf = Buffer.from(str, 'ascii');
+ this.push(buf);
+ }
+ }
+}
+```
+
+### Implementing a Duplex Stream
+
+A [Duplex][] stream is one that implements both [Readable][] and [Writable][],
+such as a TCP socket connection.
+
+Because Javascript does not have support for multiple inheritance, the
+`stream.Duplex` class is extended to implement a [Duplex][] stream (as opposed
+to extending the `stream.Readable` *and* `stream.Writable` classes).
+
+*Note*: The `stream.Duplex` class prototypically inherits from `stream.Readable`
+and parasitically from `stream.Writable`.
+
+Custom Duplex streams *must* call the `new stream.Duplex([options])`
+constructor and implement *both* the `readable._read()` and
+`writable._write()` methods.
+
+#### new stream.Duplex(options)
+
+* `options` {Object} Passed to both Writable and Readable
+ constructors. Also has the following fields:
+ * `allowHalfOpen` {Boolean} Defaults to `true`. If set to `false`, then
+ the stream will automatically end the readable side when the
+ writable side ends and vice versa.
+ * `readableObjectMode` {Boolean} Defaults to `false`. Sets `objectMode`
+ for readable side of the stream. Has no effect if `objectMode`
+ is `true`.
+ * `writableObjectMode` {Boolean} Defaults to `false`. Sets `objectMode`
+ for writable side of the stream. Has no effect if `objectMode`
+ is `true`.
+
+For example:
+
+```js
+const Duplex = require('stream').Duplex;
+
+class MyDuplex extends Duplex {
+ constructor(options) {
+ super(options);
+ }
+}
+```
+
+Or, when using pre-ES6 style constructors:
+
+```js
+const Duplex = require('stream').Duplex;
+const util = require('util');
+
+function MyDuplex(options) {
+ if (!(this instanceof MyDuplex))
+ return new MyDuplex(options);
+ Duplex.call(this, options);
+}
+util.inherits(MyDuplex, Duplex);
+```
+
+Or, using the Simplified Constructor approach:
+
+```js
+const Duplex = require('stream').Duplex;
+
+const myDuplex = new Duplex({
+ read(size) {
+ // ...
+ },
+ write(chunk, encoding, callback) {
+ // ...
+ }
+});
+```
+
+#### An Example Duplex Stream
+
+The following illustrates a simple example of a Duplex stream that wraps a
+hypothetical lower-level source object to which data can be written, and
+from which data can be read, albeit using an API that is not compatible with
+Node.js streams.
+The following illustrates a simple example of a Duplex stream that buffers
+incoming written data via the [Writable][] interface that is read back out
+via the [Readable][] interface.
+
+```js
+const Duplex = require('stream').Duplex;
+const kSource = Symbol('source');
+
+class MyDuplex extends Duplex {
+ constructor(source, options) {
+ super(options);
+ this[kSource] = source;
+ }
+
+ _write(chunk, encoding, callback) {
+ // The underlying source only deals with strings
+ if (Buffer.isBuffer(chunk))
+ chunk = chunk.toString(encoding);
+ this[kSource].writeSomeData(chunk, encoding);
+ callback();
+ }
+
+ _read(size) {
+ this[kSource].fetchSomeData(size, (data, encoding) => {
+ this.push(Buffer.from(data, encoding));
+ });
+ }
+}
+```
+
+The most important aspect of a Duplex stream is that the Readable and Writable
+sides operate independently of one another despite co-existing within a single
+object instance.
+
+#### Object Mode Duplex Streams
+
+For Duplex streams, `objectMode` can be set exclusively for either the Readable
+or Writable side using the `readableObjectMode` and `writableObjectMode` options
+respectively.
+
+In the following example, for instance, a new Transform stream (which is a
+type of [Duplex][] stream) is created that has an object mode Writable side
+that accepts JavaScript numbers that are converted to hexidecimal strings on
+the Readable side.
+
+```js
+const Transform = require('stream').Transform;
+
+// All Transform streams are also Duplex Streams
+const myTransform = new Transform({
+ writableObjectMode: true,
+
+ transform(chunk, encoding, callback) {
+ // Coerce the chunk to a number if necessary
+ chunk |= 0;
+
+ // Transform the chunk into something else.
+ const data = chunk.toString(16);
+
+ // Push the data onto the readable queue.
+ callback(null, '0'.repeat(data.length % 2) + data);
+ }
+});
+
+myTransform.setEncoding('ascii');
+myTransform.on('data', (chunk) => console.log(chunk));
+
+myTransform.write(1);
+ // Prints: 01
+myTransform.write(10);
+ // Prints: 0a
+myTransform.write(100);
+ // Prints: 64
+```
+
+### Implementing a Transform Stream
+
+A [Transform][] stream is a [Duplex][] stream where the output is computed
+in some way from the input. Examples include [zlib][] streams or [crypto][]
+streams that compress, encrypt, or decrypt data.
+
+*Note*: There is no requirement that the output be the same size as the input,
+the same number of chunks, or arrive at the same time. For example, a
+Hash stream will only ever have a single chunk of output which is
+provided when the input is ended. A `zlib` stream will produce output
+that is either much smaller or much larger than its input.
+
+The `stream.Transform` class is extended to implement a [Transform][] stream.
+
+The `stream.Transform` class prototypically inherits from `stream.Duplex` and
+implements its own versions of the `writable._write()` and `readable._read()`
+methods. Custom Transform implementations *must* implement the
+[`transform._transform()`][stream-_transform] method and *may* also implement
+the [`transform._flush()`][stream-_flush] method.
+
+*Note*: Care must be taken when using Transform streams in that data written
+to the stream can cause the Writable side of the stream to become paused if
+the output on the Readable side is not consumed.
+
+#### new stream.Transform([options])
+
+* `options` {Object} Passed to both Writable and Readable
+ constructors. Also has the following fields:
+ * `transform` {Function} Implementation for the
+ [`stream._transform()`][stream-_transform] method.
+ * `flush` {Function} Implementation for the [`stream._flush()`][stream-_flush]
+ method.
+
+For example:
+
+```js
+const Transform = require('stream').Transform;
+
+class MyTransform extends Transform {
+ constructor(options) {
+ super(options);
+ }
+}
+```
+
+Or, when using pre-ES6 style constructors:
+
+```js
+const Transform = require('stream').Transform;
+const util = require('util');
+
+function MyTransform(options) {
+ if (!(this instanceof MyTransform))
+ return new MyTransform(options);
+ Transform.call(this, options);
+}
+util.inherits(MyTransform, Transform);
+```
+
+Or, using the Simplified Constructor approach:
+
+```js
+const Transform = require('stream').Transform;
+
+const myTransform = new Transform({
+ transform(chunk, encoding, callback) {
+ // ...
+ }
+});
+```
+
+#### Events: 'finish' and 'end'
+
+The [`'finish'`][] and [`'end'`][] events are from the `stream.Writable`
+and `stream.Readable` classes, respectively. The `'finish'` event is emitted
+after [`stream.end()`][stream-end] is called and all chunks have been processed
+by [`stream._transform()`][stream-_transform]. The `'end'` event is emitted
+after all data has been output, which occurs after the callback in
+[`transform._flush()`][stream-_flush] has been called.
+
+#### transform.\_flush(callback)
+
+* `callback` {Function} A callback function (optionally with an error
+ argument) to be called when remaining data has been flushed.
+
+*Note*: **This function MUST NOT be called by application code directly.** It
+should be implemented by child classes, and called only by the internal Readable
+class methods only.
+
+In some cases, a transform operation may need to emit an additional bit of
+data at the end of the stream. For example, a `zlib` compression stream will
+store an amount of internal state used to optimally compress the output. When
+the stream ends, however, that additional data needs to be flushed so that the
+compressed data will be complete.
+
+Custom [Transform][] implementations *may* implement the `transform._flush()`
+method. This will be called when there is no more written data to be consumed,
+but before the [`'end'`][] event is emitted signaling the end of the
+[Readable][] stream.
+
+Within the `transform._flush()` implementation, the `readable.push()` method
+may be called zero or more times, as appropriate. The `callback` function must
+be called when the flush operation is complete.
+
+The `transform._flush()` method is prefixed with an underscore because it is
+internal to the class that defines it, and should never be called directly by
+user programs.
+
+#### transform.\_transform(chunk, encoding, callback)
+
+* `chunk` {Buffer|String} The chunk to be transformed. Will **always**
+ be a buffer unless the `decodeStrings` option was set to `false`.
+* `encoding` {String} If the chunk is a string, then this is the
+ encoding type. If chunk is a buffer, then this is the special
+ value - 'buffer', ignore it in this case.
+* `callback` {Function} A callback function (optionally with an error
+ argument and data) to be called after the supplied `chunk` has been
+ processed.
+
+*Note*: **This function MUST NOT be called by application code directly.** It
+should be implemented by child classes, and called only by the internal Readable
+class methods only.
+
+All Transform stream implementations must provide a `_transform()`
+method to accept input and produce output. The `transform._transform()`
+implementation handles the bytes being written, computes an output, then passes
+that output off to the readable portion using the `readable.push()` method.
+
+The `transform.push()` method may be called zero or more times to generate
+output from a single input chunk, depending on how much is to be output
+as a result of the chunk.
+
+It is possible that no output is generated from any given chunk of input data.
+
+The `callback` function must be called only when the current chunk is completely
+consumed. The first argument passed to the `callback` must be an `Error` object
+if an error occurred while processing the input or `null` otherwise. If a second
+argument is passed to the `callback`, it will be forwarded on to the
+`readable.push()` method. In other words the following are equivalent:
+
+```js
+transform.prototype._transform = function (data, encoding, callback) {
+ this.push(data);
+ callback();
+};
+
+transform.prototype._transform = function (data, encoding, callback) {
+ callback(null, data);
+};
+```
+
+The `transform._transform()` method is prefixed with an underscore because it
+is internal to the class that defines it, and should never be called directly by
+user programs.
+
+#### Class: stream.PassThrough
+
+The `stream.PassThrough` class is a trivial implementation of a [Transform][]
+stream that simply passes the input bytes across to the output. Its purpose is
+primarily for examples and testing, but there are some use cases where
+`stream.PassThrough` is useful as a building block for novel sorts of streams.
+
+## Additional Notes
+
+<!--type=misc-->
+
+### Compatibility with Older Node.js Versions
+
+<!--type=misc-->
+
+In versions of Node.js prior to v0.10, the Readable stream interface was
+simpler, but also less powerful and less useful.
+
+* Rather than waiting for calls the [`stream.read()`][stream-read] method,
+ [`'data'`][] events would begin emitting immediately. Applications that
+ would need to perform some amount of work to decide how to handle data
+ were required to store read data into buffers so the data would not be lost.
+* The [`stream.pause()`][stream-pause] method was advisory, rather than
+ guaranteed. This meant that it was still necessary to be prepared to receive
+ [`'data'`][] events *even when the stream was in a paused state*.
+
+In Node.js v0.10, the [Readable][] class was added. For backwards compatibility
+with older Node.js programs, Readable streams switch into "flowing mode" when a
+[`'data'`][] event handler is added, or when the
+[`stream.resume()`][stream-resume] method is called. The effect is that, even
+when not using the new [`stream.read()`][stream-read] method and
+[`'readable'`][] event, it is no longer necessary to worry about losing
+[`'data'`][] chunks.
+
+While most applications will continue to function normally, this introduces an
+edge case in the following conditions:
+
+* No [`'data'`][] event listener is added.
+* The [`stream.resume()`][stream-resume] method is never called.
+* The stream is not piped to any writable destination.
+
+For example, consider the following code:
+
+```js
+// WARNING! BROKEN!
+net.createServer((socket) => {
+
+ // we add an 'end' method, but never consume the data
+ socket.on('end', () => {
+ // It will never get here.
+ socket.end('The message was received but was not processed.\n');
+ });
+
+}).listen(1337);
+```
+
+In versions of Node.js prior to v0.10, the incoming message data would be
+simply discarded. However, in Node.js v0.10 and beyond, the socket remains
+paused forever.
+
+The workaround in this situation is to call the
+[`stream.resume()`][stream-resume] method to begin the flow of data:
+
+```js
+// Workaround
+net.createServer((socket) => {
+
+ socket.on('end', () => {
+ socket.end('The message was received but was not processed.\n');
+ });
+
+ // start the flow of data, discarding it.
+ socket.resume();
+
+}).listen(1337);
+```
+
+In addition to new Readable streams switching into flowing mode,
+pre-v0.10 style streams can be wrapped in a Readable class using the
+[`readable.wrap()`][`stream.wrap()`] method.
+
+
+### `readable.read(0)`
+
+There are some cases where it is necessary to trigger a refresh of the
+underlying readable stream mechanisms, without actually consuming any
+data. In such cases, it is possible to call `readable.read(0)`, which will
+always return `null`.
+
+If the internal read buffer is below the `highWaterMark`, and the
+stream is not currently reading, then calling `stream.read(0)` will trigger
+a low-level [`stream._read()`][stream-_read] call.
+
+While most applications will almost never need to do this, there are
+situations within Node.js where this is done, particularly in the
+Readable stream class internals.
+
+### `readable.push('')`
+
+Use of `readable.push('')` is not recommended.
+
+Pushing a zero-byte string or `Buffer` to a stream that is not in object mode
+has an interesting side effect. Because it *is* a call to
+[`readable.push()`][stream-push], the call will end the reading process.
+However, because the argument is an empty string, no data is added to the
+readable buffer so there is nothing for a user to consume.
+
+[`'data'`]: #stream_event_data
+[`'drain'`]: #stream_event_drain
+[`'end'`]: #stream_event_end
+[`'finish'`]: #stream_event_finish
+[`'readable'`]: #stream_event_readable
+[`buf.toString(encoding)`]: https://nodejs.org/docs/v6.3.1/api/buffer.html#buffer_buf_tostring_encoding_start_end
+[`EventEmitter`]: https://nodejs.org/docs/v6.3.1/api/events.html#events_class_eventemitter
+[`process.stderr`]: https://nodejs.org/docs/v6.3.1/api/process.html#process_process_stderr
+[`process.stdin`]: https://nodejs.org/docs/v6.3.1/api/process.html#process_process_stdin
+[`process.stdout`]: https://nodejs.org/docs/v6.3.1/api/process.html#process_process_stdout
+[`stream.cork()`]: #stream_writable_cork
+[`stream.pipe()`]: #stream_readable_pipe_destination_options
+[`stream.uncork()`]: #stream_writable_uncork
+[`stream.unpipe()`]: #stream_readable_unpipe_destination
+[`stream.wrap()`]: #stream_readable_wrap_stream
+[`tls.CryptoStream`]: https://nodejs.org/docs/v6.3.1/api/tls.html#tls_class_cryptostream
+[API for Stream Consumers]: #stream_api_for_stream_consumers
+[API for Stream Implementers]: #stream_api_for_stream_implementers
+[child process stdin]: https://nodejs.org/docs/v6.3.1/api/child_process.html#child_process_child_stdin
+[child process stdout and stderr]: https://nodejs.org/docs/v6.3.1/api/child_process.html#child_process_child_stdout
+[Compatibility]: #stream_compatibility_with_older_node_js_versions
+[crypto]: crypto.html
+[Duplex]: #stream_class_stream_duplex
+[fs read streams]: https://nodejs.org/docs/v6.3.1/api/fs.html#fs_class_fs_readstream
+[fs write streams]: https://nodejs.org/docs/v6.3.1/api/fs.html#fs_class_fs_writestream
+[`fs.createReadStream()`]: https://nodejs.org/docs/v6.3.1/api/fs.html#fs_fs_createreadstream_path_options
+[`fs.createWriteStream()`]: https://nodejs.org/docs/v6.3.1/api/fs.html#fs_fs_createwritestream_path_options
+[`net.Socket`]: https://nodejs.org/docs/v6.3.1/api/net.html#net_class_net_socket
+[`zlib.createDeflate()`]: https://nodejs.org/docs/v6.3.1/api/zlib.html#zlib_zlib_createdeflate_options
+[HTTP requests, on the client]: https://nodejs.org/docs/v6.3.1/api/http.html#http_class_http_clientrequest
+[HTTP responses, on the server]: https://nodejs.org/docs/v6.3.1/api/http.html#http_class_http_serverresponse
+[http-incoming-message]: https://nodejs.org/docs/v6.3.1/api/http.html#http_class_http_incomingmessage
+[Object mode]: #stream_object_mode
+[Readable]: #stream_class_stream_readable
+[SimpleProtocol v2]: #stream_example_simpleprotocol_parser_v2
+[stream-_flush]: #stream_transform_flush_callback
+[stream-_read]: #stream_readable_read_size_1
+[stream-_transform]: #stream_transform_transform_chunk_encoding_callback
+[stream-_write]: #stream_writable_write_chunk_encoding_callback_1
+[stream-_writev]: #stream_writable_writev_chunks_callback
+[stream-end]: #stream_writable_end_chunk_encoding_callback
+[stream-pause]: #stream_readable_pause
+[stream-push]: #stream_readable_push_chunk_encoding
+[stream-read]: #stream_readable_read_size
+[stream-resume]: #stream_readable_resume
+[stream-write]: #stream_writable_write_chunk_encoding_callback
+[TCP sockets]: https://nodejs.org/docs/v6.3.1/api/net.html#net_class_net_socket
+[Transform]: #stream_class_stream_transform
+[Writable]: #stream_class_stream_writable
+[zlib]: zlib.html
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
new file mode 100644
index 0000000..83275f1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
@@ -0,0 +1,60 @@
+# streams WG Meeting 2015-01-30
+
+## Links
+
+* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg
+* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106
+* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/
+
+## Agenda
+
+Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting.
+
+* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105)
+* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101)
+* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102)
+* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99)
+
+## Minutes
+
+### adopt a charter
+
+* group: +1's all around
+
+### What versioning scheme should be adopted?
+* group: +1’s 3.0.0
+* domenic+group: pulling in patches from other sources where appropriate
+* mikeal: version independently, suggesting versions for io.js
+* mikeal+domenic: work with TC to notify in advance of changes
+simpler stream creation
+
+### streamline creation of streams
+* sam: streamline creation of streams
+* domenic: nice simple solution posted
+ but, we lose the opportunity to change the model
+ may not be backwards incompatible (double check keys)
+
+ **action item:** domenic will check
+
+### remove implicit flowing of streams on(‘data’)
+* add isFlowing / isPaused
+* mikeal: worrying that we’re documenting polyfill methods – confuses users
+* domenic: more reflective API is probably good, with warning labels for users
+* new section for mad scientists (reflective stream access)
+* calvin: name the “third stateâ€
+* mikeal: maybe borrow the name from whatwg?
+* domenic: we’re missing the “third stateâ€
+* consensus: kind of difficult to name the third state
+* mikeal: figure out differences in states / compat
+* mathias: always flow on data – eliminates third state
+ * explore what it breaks
+
+**action items:**
+* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream)
+* ask rod/build for infrastructure
+* **chris**: explore the “flow on data†approach
+* add isPaused/isFlowing
+* add new docs section
+* move isPaused to that section
+
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/duplex.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/duplex.js
new file mode 100644
index 0000000..ca807af
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/duplex.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_duplex.js")
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/_stream_duplex.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/_stream_duplex.js
new file mode 100644
index 0000000..736693b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/_stream_duplex.js
@@ -0,0 +1,75 @@
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+
+'use strict';
+
+/*<replacement>*/
+
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) {
+ keys.push(key);
+ }return keys;
+};
+/*</replacement>*/
+
+module.exports = Duplex;
+
+/*<replacement>*/
+var processNextTick = require('process-nextick-args');
+/*</replacement>*/
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var Readable = require('./_stream_readable');
+var Writable = require('./_stream_writable');
+
+util.inherits(Duplex, Readable);
+
+var keys = objectKeys(Writable.prototype);
+for (var v = 0; v < keys.length; v++) {
+ var method = keys[v];
+ if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
+}
+
+function Duplex(options) {
+ if (!(this instanceof Duplex)) return new Duplex(options);
+
+ Readable.call(this, options);
+ Writable.call(this, options);
+
+ if (options && options.readable === false) this.readable = false;
+
+ if (options && options.writable === false) this.writable = false;
+
+ this.allowHalfOpen = true;
+ if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
+
+ this.once('end', onend);
+}
+
+// the no-half-open enforcer
+function onend() {
+ // if we allow half-open state, or if the writable side ended,
+ // then we're ok.
+ if (this.allowHalfOpen || this._writableState.ended) return;
+
+ // no more data can be written.
+ // But allow more writes to happen in this tick.
+ processNextTick(onEndNT, this);
+}
+
+function onEndNT(self) {
+ self.end();
+}
+
+function forEach(xs, f) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ f(xs[i], i);
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/_stream_passthrough.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/_stream_passthrough.js
new file mode 100644
index 0000000..d06f71f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/_stream_passthrough.js
@@ -0,0 +1,26 @@
+// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+
+'use strict';
+
+module.exports = PassThrough;
+
+var Transform = require('./_stream_transform');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(PassThrough, Transform);
+
+function PassThrough(options) {
+ if (!(this instanceof PassThrough)) return new PassThrough(options);
+
+ Transform.call(this, options);
+}
+
+PassThrough.prototype._transform = function (chunk, encoding, cb) {
+ cb(null, chunk);
+}; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/_stream_readable.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/_stream_readable.js
new file mode 100644
index 0000000..208cc65
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/_stream_readable.js
@@ -0,0 +1,937 @@
+'use strict';
+
+module.exports = Readable;
+
+/*<replacement>*/
+var processNextTick = require('process-nextick-args');
+/*</replacement>*/
+
+/*<replacement>*/
+var isArray = require('isarray');
+/*</replacement>*/
+
+Readable.ReadableState = ReadableState;
+
+/*<replacement>*/
+var EE = require('events').EventEmitter;
+
+var EElistenerCount = function (emitter, type) {
+ return emitter.listeners(type).length;
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream;
+(function () {
+ try {
+ Stream = require('st' + 'ream');
+ } catch (_) {} finally {
+ if (!Stream) Stream = require('events').EventEmitter;
+ }
+})();
+/*</replacement>*/
+
+var Buffer = require('buffer').Buffer;
+/*<replacement>*/
+var bufferShim = require('buffer-shims');
+/*</replacement>*/
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var debugUtil = require('util');
+var debug = void 0;
+if (debugUtil && debugUtil.debuglog) {
+ debug = debugUtil.debuglog('stream');
+} else {
+ debug = function () {};
+}
+/*</replacement>*/
+
+var BufferList = require('./internal/streams/BufferList');
+var StringDecoder;
+
+util.inherits(Readable, Stream);
+
+function prependListener(emitter, event, fn) {
+ if (typeof emitter.prependListener === 'function') {
+ return emitter.prependListener(event, fn);
+ } else {
+ // This is a hack to make sure that our error handler is attached before any
+ // userland ones. NEVER DO THIS. This is here only because this code needs
+ // to continue to work with older versions of Node.js that do not include
+ // the prependListener() method. The goal is to eventually remove this hack.
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+ }
+}
+
+var Duplex;
+function ReadableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+ this.objectMode = !!options.objectMode;
+
+ if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
+
+ // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+ var hwm = options.highWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+ this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = ~ ~this.highWaterMark;
+
+ // A linked list is used to store data chunks instead of an array because the
+ // linked list can remove elements from the beginning faster than
+ // array.shift()
+ this.buffer = new BufferList();
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = null;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+ this.resumeScheduled = false;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // when piping, we only care about 'readable' events that happen
+ // after read()ing all the bytes and not getting any pushback.
+ this.ranOut = false;
+
+ // the number of writers that are awaiting a drain event in .pipe()s
+ this.awaitDrain = 0;
+
+ // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
+
+ this.decoder = null;
+ this.encoding = null;
+ if (options.encoding) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
+ }
+}
+
+var Duplex;
+function Readable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ if (!(this instanceof Readable)) return new Readable(options);
+
+ this._readableState = new ReadableState(options, this);
+
+ // legacy
+ this.readable = true;
+
+ if (options && typeof options.read === 'function') this._read = options.read;
+
+ Stream.call(this);
+}
+
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function (chunk, encoding) {
+ var state = this._readableState;
+
+ if (!state.objectMode && typeof chunk === 'string') {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = bufferShim.from(chunk, encoding);
+ encoding = '';
+ }
+ }
+
+ return readableAddChunk(this, state, chunk, encoding, false);
+};
+
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function (chunk) {
+ var state = this._readableState;
+ return readableAddChunk(this, state, chunk, '', true);
+};
+
+Readable.prototype.isPaused = function () {
+ return this._readableState.flowing === false;
+};
+
+function readableAddChunk(stream, state, chunk, encoding, addToFront) {
+ var er = chunkInvalid(state, chunk);
+ if (er) {
+ stream.emit('error', er);
+ } else if (chunk === null) {
+ state.reading = false;
+ onEofChunk(stream, state);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (state.ended && !addToFront) {
+ var e = new Error('stream.push() after EOF');
+ stream.emit('error', e);
+ } else if (state.endEmitted && addToFront) {
+ var _e = new Error('stream.unshift() after end event');
+ stream.emit('error', _e);
+ } else {
+ var skipAdd;
+ if (state.decoder && !addToFront && !encoding) {
+ chunk = state.decoder.write(chunk);
+ skipAdd = !state.objectMode && chunk.length === 0;
+ }
+
+ if (!addToFront) state.reading = false;
+
+ // Don't add to the buffer if we've decoded to an empty string chunk and
+ // we're not in object mode
+ if (!skipAdd) {
+ // if we want the data now, just emit it.
+ if (state.flowing && state.length === 0 && !state.sync) {
+ stream.emit('data', chunk);
+ stream.read(0);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
+
+ if (state.needReadable) emitReadable(stream);
+ }
+ }
+
+ maybeReadMore(stream, state);
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
+
+ return needMoreData(state);
+}
+
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes. This is to work around cases where hwm=0,
+// such as the repl. Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+ return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
+}
+
+// backwards compatibility.
+Readable.prototype.setEncoding = function (enc) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
+ return this;
+};
+
+// Don't raise the hwm > 8MB
+var MAX_HWM = 0x800000;
+function computeNewHighWaterMark(n) {
+ if (n >= MAX_HWM) {
+ n = MAX_HWM;
+ } else {
+ // Get the next highest power of 2 to prevent increasing hwm excessively in
+ // tiny amounts
+ n--;
+ n |= n >>> 1;
+ n |= n >>> 2;
+ n |= n >>> 4;
+ n |= n >>> 8;
+ n |= n >>> 16;
+ n++;
+ }
+ return n;
+}
+
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function howMuchToRead(n, state) {
+ if (n <= 0 || state.length === 0 && state.ended) return 0;
+ if (state.objectMode) return 1;
+ if (n !== n) {
+ // Only flow one buffer at a time
+ if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
+ }
+ // If we're asking for more than the current hwm, then raise the hwm.
+ if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
+ if (n <= state.length) return n;
+ // Don't have enough
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ }
+ return state.length;
+}
+
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function (n) {
+ debug('read', n);
+ n = parseInt(n, 10);
+ var state = this._readableState;
+ var nOrig = n;
+
+ if (n !== 0) state.emittedReadable = false;
+
+ // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+ if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
+ return null;
+ }
+
+ n = howMuchToRead(n, state);
+
+ // if we've ended, and we're now clear, then finish it up.
+ if (n === 0 && state.ended) {
+ if (state.length === 0) endReadable(this);
+ return null;
+ }
+
+ // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
+
+ // if we need a readable event, then we need to do some reading.
+ var doRead = state.needReadable;
+ debug('need readable', doRead);
+
+ // if we currently have less than the highWaterMark, then also read some
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
+ doRead = true;
+ debug('length less than watermark', doRead);
+ }
+
+ // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+ if (state.ended || state.reading) {
+ doRead = false;
+ debug('reading or ended', doRead);
+ } else if (doRead) {
+ debug('do read');
+ state.reading = true;
+ state.sync = true;
+ // if the length is currently zero, then we *need* a readable event.
+ if (state.length === 0) state.needReadable = true;
+ // call internal read method
+ this._read(state.highWaterMark);
+ state.sync = false;
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (!state.reading) n = howMuchToRead(nOrig, state);
+ }
+
+ var ret;
+ if (n > 0) ret = fromList(n, state);else ret = null;
+
+ if (ret === null) {
+ state.needReadable = true;
+ n = 0;
+ } else {
+ state.length -= n;
+ }
+
+ if (state.length === 0) {
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (!state.ended) state.needReadable = true;
+
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended) endReadable(this);
+ }
+
+ if (ret !== null) this.emit('data', ret);
+
+ return ret;
+};
+
+function chunkInvalid(state, chunk) {
+ var er = null;
+ if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ return er;
+}
+
+function onEofChunk(stream, state) {
+ if (state.ended) return;
+ if (state.decoder) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? 1 : chunk.length;
+ }
+ }
+ state.ended = true;
+
+ // emit 'readable' now to make sure it gets picked up.
+ emitReadable(stream);
+}
+
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+ var state = stream._readableState;
+ state.needReadable = false;
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);
+ }
+}
+
+function emitReadable_(stream) {
+ debug('emit readable');
+ stream.emit('readable');
+ flow(stream);
+}
+
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ processNextTick(maybeReadMore_, stream, state);
+ }
+}
+
+function maybeReadMore_(stream, state) {
+ var len = state.length;
+ while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length)
+ // didn't get any data, stop spinning.
+ break;else len = state.length;
+ }
+ state.readingMore = false;
+}
+
+// abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = function (n) {
+ this.emit('error', new Error('not implemented'));
+};
+
+Readable.prototype.pipe = function (dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
+
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+ default:
+ state.pipes.push(dest);
+ break;
+ }
+ state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
+
+ var endFn = doEnd ? onend : cleanup;
+ if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn);
+
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable) {
+ debug('onunpipe');
+ if (readable === src) {
+ cleanup();
+ }
+ }
+
+ function onend() {
+ debug('onend');
+ dest.end();
+ }
+
+ // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+
+ var cleanedUp = false;
+ function cleanup() {
+ debug('cleanup');
+ // cleanup event handlers once the pipe is broken
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', cleanup);
+ src.removeListener('data', ondata);
+
+ cleanedUp = true;
+
+ // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+ if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
+ }
+
+ // If the user pushes more data while we're writing to dest then we'll end up
+ // in ondata again. However, we only want to increase awaitDrain once because
+ // dest will only emit one 'drain' event for the multiple writes.
+ // => Introduce a guard on increasing awaitDrain.
+ var increasedAwaitDrain = false;
+ src.on('data', ondata);
+ function ondata(chunk) {
+ debug('ondata');
+ increasedAwaitDrain = false;
+ var ret = dest.write(chunk);
+ if (false === ret && !increasedAwaitDrain) {
+ // If the user unpiped during `dest.write()`, it is possible
+ // to get stuck in a permanently paused state if that write
+ // also returned false.
+ // => Check whether `dest` is still a piping destination.
+ if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
+ debug('false write response, pause', src._readableState.awaitDrain);
+ src._readableState.awaitDrain++;
+ increasedAwaitDrain = true;
+ }
+ src.pause();
+ }
+ }
+
+ // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+ function onerror(er) {
+ debug('onerror', er);
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
+ }
+
+ // Make sure our error handler is attached before userland ones.
+ prependListener(dest, 'error', onerror);
+
+ // Both close and finish should trigger unpipe, but only once.
+ function onclose() {
+ dest.removeListener('finish', onfinish);
+ unpipe();
+ }
+ dest.once('close', onclose);
+ function onfinish() {
+ debug('onfinish');
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+ dest.once('finish', onfinish);
+
+ function unpipe() {
+ debug('unpipe');
+ src.unpipe(dest);
+ }
+
+ // tell the dest that it's being piped to
+ dest.emit('pipe', src);
+
+ // start the flow if it hasn't been started already.
+ if (!state.flowing) {
+ debug('pipe resume');
+ src.resume();
+ }
+
+ return dest;
+};
+
+function pipeOnDrain(src) {
+ return function () {
+ var state = src._readableState;
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain) state.awaitDrain--;
+ if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
+ state.flowing = true;
+ flow(src);
+ }
+ };
+}
+
+Readable.prototype.unpipe = function (dest) {
+ var state = this._readableState;
+
+ // if we're not piping anywhere, then do nothing.
+ if (state.pipesCount === 0) return this;
+
+ // just one destination. most common case.
+ if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ if (dest && dest !== state.pipes) return this;
+
+ if (!dest) dest = state.pipes;
+
+ // got a match.
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+ if (dest) dest.emit('unpipe', this);
+ return this;
+ }
+
+ // slow case. multiple pipe destinations.
+
+ if (!dest) {
+ // remove all.
+ var dests = state.pipes;
+ var len = state.pipesCount;
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+
+ for (var _i = 0; _i < len; _i++) {
+ dests[_i].emit('unpipe', this);
+ }return this;
+ }
+
+ // try to find the right one.
+ var i = indexOf(state.pipes, dest);
+ if (i === -1) return this;
+
+ state.pipes.splice(i, 1);
+ state.pipesCount -= 1;
+ if (state.pipesCount === 1) state.pipes = state.pipes[0];
+
+ dest.emit('unpipe', this);
+
+ return this;
+};
+
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function (ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
+
+ if (ev === 'data') {
+ // Start flowing on next tick if stream isn't explicitly paused
+ if (this._readableState.flowing !== false) this.resume();
+ } else if (ev === 'readable') {
+ var state = this._readableState;
+ if (!state.endEmitted && !state.readableListening) {
+ state.readableListening = state.needReadable = true;
+ state.emittedReadable = false;
+ if (!state.reading) {
+ processNextTick(nReadingNextTick, this);
+ } else if (state.length) {
+ emitReadable(this, state);
+ }
+ }
+ }
+
+ return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
+
+function nReadingNextTick(self) {
+ debug('readable nexttick read 0');
+ self.read(0);
+}
+
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function () {
+ var state = this._readableState;
+ if (!state.flowing) {
+ debug('resume');
+ state.flowing = true;
+ resume(this, state);
+ }
+ return this;
+};
+
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ processNextTick(resume_, stream, state);
+ }
+}
+
+function resume_(stream, state) {
+ if (!state.reading) {
+ debug('resume read 0');
+ stream.read(0);
+ }
+
+ state.resumeScheduled = false;
+ state.awaitDrain = 0;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing && !state.reading) stream.read(0);
+}
+
+Readable.prototype.pause = function () {
+ debug('call pause flowing=%j', this._readableState.flowing);
+ if (false !== this._readableState.flowing) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+ return this;
+};
+
+function flow(stream) {
+ var state = stream._readableState;
+ debug('flow', state.flowing);
+ while (state.flowing && stream.read() !== null) {}
+}
+
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function (stream) {
+ var state = this._readableState;
+ var paused = false;
+
+ var self = this;
+ stream.on('end', function () {
+ debug('wrapped end');
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) self.push(chunk);
+ }
+
+ self.push(null);
+ });
+
+ stream.on('data', function (chunk) {
+ debug('wrapped data');
+ if (state.decoder) chunk = state.decoder.write(chunk);
+
+ // don't skip over falsy values in objectMode
+ if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
+
+ var ret = self.push(chunk);
+ if (!ret) {
+ paused = true;
+ stream.pause();
+ }
+ });
+
+ // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+ for (var i in stream) {
+ if (this[i] === undefined && typeof stream[i] === 'function') {
+ this[i] = function (method) {
+ return function () {
+ return stream[method].apply(stream, arguments);
+ };
+ }(i);
+ }
+ }
+
+ // proxy certain important events.
+ var events = ['error', 'close', 'destroy', 'pause', 'resume'];
+ forEach(events, function (ev) {
+ stream.on(ev, self.emit.bind(self, ev));
+ });
+
+ // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+ self._read = function (n) {
+ debug('wrapped _read', n);
+ if (paused) {
+ paused = false;
+ stream.resume();
+ }
+ };
+
+ return self;
+};
+
+// exposed for testing purposes only.
+Readable._fromList = fromList;
+
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromList(n, state) {
+ // nothing buffered
+ if (state.length === 0) return null;
+
+ var ret;
+ if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
+ // read it all, truncate the list
+ if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
+ state.buffer.clear();
+ } else {
+ // read part of list
+ ret = fromListPartial(n, state.buffer, state.decoder);
+ }
+
+ return ret;
+}
+
+// Extracts only enough buffered data to satisfy the amount requested.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromListPartial(n, list, hasStrings) {
+ var ret;
+ if (n < list.head.data.length) {
+ // slice is the same for buffers and strings
+ ret = list.head.data.slice(0, n);
+ list.head.data = list.head.data.slice(n);
+ } else if (n === list.head.data.length) {
+ // first chunk is a perfect match
+ ret = list.shift();
+ } else {
+ // result spans more than one buffer
+ ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
+ }
+ return ret;
+}
+
+// Copies a specified amount of characters from the list of buffered data
+// chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBufferString(n, list) {
+ var p = list.head;
+ var c = 1;
+ var ret = p.data;
+ n -= ret.length;
+ while (p = p.next) {
+ var str = p.data;
+ var nb = n > str.length ? str.length : n;
+ if (nb === str.length) ret += str;else ret += str.slice(0, n);
+ n -= nb;
+ if (n === 0) {
+ if (nb === str.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = str.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+// Copies a specified amount of bytes from the list of buffered data chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBuffer(n, list) {
+ var ret = bufferShim.allocUnsafe(n);
+ var p = list.head;
+ var c = 1;
+ p.data.copy(ret);
+ n -= p.data.length;
+ while (p = p.next) {
+ var buf = p.data;
+ var nb = n > buf.length ? buf.length : n;
+ buf.copy(ret, ret.length - n, 0, nb);
+ n -= nb;
+ if (n === 0) {
+ if (nb === buf.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = buf.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+function endReadable(stream) {
+ var state = stream._readableState;
+
+ // If we get here before consuming all the bytes, then that is a
+ // bug in node. Should never happen.
+ if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
+
+ if (!state.endEmitted) {
+ state.ended = true;
+ processNextTick(endReadableNT, state, stream);
+ }
+}
+
+function endReadableNT(state, stream) {
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
+}
+
+function forEach(xs, f) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ f(xs[i], i);
+ }
+}
+
+function indexOf(xs, x) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) return i;
+ }
+ return -1;
+} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/_stream_transform.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/_stream_transform.js
new file mode 100644
index 0000000..dbc996e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/_stream_transform.js
@@ -0,0 +1,180 @@
+// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+
+'use strict';
+
+module.exports = Transform;
+
+var Duplex = require('./_stream_duplex');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(Transform, Duplex);
+
+function TransformState(stream) {
+ this.afterTransform = function (er, data) {
+ return afterTransform(stream, er, data);
+ };
+
+ this.needTransform = false;
+ this.transforming = false;
+ this.writecb = null;
+ this.writechunk = null;
+ this.writeencoding = null;
+}
+
+function afterTransform(stream, er, data) {
+ var ts = stream._transformState;
+ ts.transforming = false;
+
+ var cb = ts.writecb;
+
+ if (!cb) return stream.emit('error', new Error('no writecb in Transform class'));
+
+ ts.writechunk = null;
+ ts.writecb = null;
+
+ if (data !== null && data !== undefined) stream.push(data);
+
+ cb(er);
+
+ var rs = stream._readableState;
+ rs.reading = false;
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
+ stream._read(rs.highWaterMark);
+ }
+}
+
+function Transform(options) {
+ if (!(this instanceof Transform)) return new Transform(options);
+
+ Duplex.call(this, options);
+
+ this._transformState = new TransformState(this);
+
+ // when the writable side finishes, then flush out anything remaining.
+ var stream = this;
+
+ // start out asking for a readable event once data is transformed.
+ this._readableState.needReadable = true;
+
+ // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+ this._readableState.sync = false;
+
+ if (options) {
+ if (typeof options.transform === 'function') this._transform = options.transform;
+
+ if (typeof options.flush === 'function') this._flush = options.flush;
+ }
+
+ this.once('prefinish', function () {
+ if (typeof this._flush === 'function') this._flush(function (er) {
+ done(stream, er);
+ });else done(stream);
+ });
+}
+
+Transform.prototype.push = function (chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
+};
+
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = function (chunk, encoding, cb) {
+ throw new Error('Not implemented');
+};
+
+Transform.prototype._write = function (chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+ if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
+ }
+};
+
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function (n) {
+ var ts = this._transformState;
+
+ if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
+ ts.transforming = true;
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
+
+function done(stream, er) {
+ if (er) return stream.emit('error', er);
+
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+ var ws = stream._writableState;
+ var ts = stream._transformState;
+
+ if (ws.length) throw new Error('Calling transform done when ws.length != 0');
+
+ if (ts.transforming) throw new Error('Calling transform done when still transforming');
+
+ return stream.push(null);
+} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/_stream_writable.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/_stream_writable.js
new file mode 100644
index 0000000..ed5efcb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/_stream_writable.js
@@ -0,0 +1,526 @@
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, encoding, cb), and it'll handle all
+// the drain event emission and buffering.
+
+'use strict';
+
+module.exports = Writable;
+
+/*<replacement>*/
+var processNextTick = require('process-nextick-args');
+/*</replacement>*/
+
+/*<replacement>*/
+var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick;
+/*</replacement>*/
+
+Writable.WritableState = WritableState;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var internalUtil = {
+ deprecate: require('util-deprecate')
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream;
+(function () {
+ try {
+ Stream = require('st' + 'ream');
+ } catch (_) {} finally {
+ if (!Stream) Stream = require('events').EventEmitter;
+ }
+})();
+/*</replacement>*/
+
+var Buffer = require('buffer').Buffer;
+/*<replacement>*/
+var bufferShim = require('buffer-shims');
+/*</replacement>*/
+
+util.inherits(Writable, Stream);
+
+function nop() {}
+
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+ this.next = null;
+}
+
+var Duplex;
+function WritableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // object stream flag to indicate whether or not this stream
+ // contains buffers or objects.
+ this.objectMode = !!options.objectMode;
+
+ if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
+
+ // the point at which write() starts returning false
+ // Note: 0 is a valid value, means that we always return false if
+ // the entire buffer is not flushed immediately on write()
+ var hwm = options.highWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+ this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = ~ ~this.highWaterMark;
+
+ this.needDrain = false;
+ // at the start of calling end()
+ this.ending = false;
+ // when end() has been called, and returned
+ this.ended = false;
+ // when 'finish' is emitted
+ this.finished = false;
+
+ // should we decode strings into buffers before passing to _write?
+ // this is here so that some node-core streams can optimize string
+ // handling at a lower level.
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // not an actual buffer we keep track of, but a measurement
+ // of how much we're waiting to get pushed to some underlying
+ // socket or file.
+ this.length = 0;
+
+ // a flag to see when we're in the middle of a write.
+ this.writing = false;
+
+ // when true all writes will be buffered until .uncork() call
+ this.corked = 0;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // a flag to know if we're processing previously buffered items, which
+ // may call the _write() callback in the same tick, so that we don't
+ // end up in an overlapped onwrite situation.
+ this.bufferProcessing = false;
+
+ // the callback that's passed to _write(chunk,cb)
+ this.onwrite = function (er) {
+ onwrite(stream, er);
+ };
+
+ // the callback that the user supplies to write(chunk,encoding,cb)
+ this.writecb = null;
+
+ // the amount that is being written when _write is called.
+ this.writelen = 0;
+
+ this.bufferedRequest = null;
+ this.lastBufferedRequest = null;
+
+ // number of pending user-supplied write callbacks
+ // this must be 0 before 'finish' can be emitted
+ this.pendingcb = 0;
+
+ // emit prefinish if the only thing we're waiting for is _write cbs
+ // This is relevant for synchronous Transform streams
+ this.prefinished = false;
+
+ // True if the error was already emitted and should not be thrown again
+ this.errorEmitted = false;
+
+ // count buffered requests
+ this.bufferedRequestCount = 0;
+
+ // allocate the first CorkedRequest, there is always
+ // one allocated and free to use, and we maintain at most two
+ this.corkedRequestsFree = new CorkedRequest(this);
+}
+
+WritableState.prototype.getBuffer = function writableStateGetBuffer() {
+ var current = this.bufferedRequest;
+ var out = [];
+ while (current) {
+ out.push(current);
+ current = current.next;
+ }
+ return out;
+};
+
+(function () {
+ try {
+ Object.defineProperty(WritableState.prototype, 'buffer', {
+ get: internalUtil.deprecate(function () {
+ return this.getBuffer();
+ }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.')
+ });
+ } catch (_) {}
+})();
+
+var Duplex;
+function Writable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ // Writable ctor is applied to Duplexes, though they're not
+ // instanceof Writable, they're instanceof Readable.
+ if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options);
+
+ this._writableState = new WritableState(options, this);
+
+ // legacy.
+ this.writable = true;
+
+ if (options) {
+ if (typeof options.write === 'function') this._write = options.write;
+
+ if (typeof options.writev === 'function') this._writev = options.writev;
+ }
+
+ Stream.call(this);
+}
+
+// Otherwise people can pipe Writable streams, which is just wrong.
+Writable.prototype.pipe = function () {
+ this.emit('error', new Error('Cannot pipe, not readable'));
+};
+
+function writeAfterEnd(stream, cb) {
+ var er = new Error('write after end');
+ // TODO: defer error events consistently everywhere, not just the cb
+ stream.emit('error', er);
+ processNextTick(cb, er);
+}
+
+// If we get something that is not a buffer, string, null, or undefined,
+// and we're not in objectMode, then that's an error.
+// Otherwise stream chunks are all considered to be of length=1, and the
+// watermarks determine how many objects to keep in the buffer, rather than
+// how many bytes or characters.
+function validChunk(stream, state, chunk, cb) {
+ var valid = true;
+ var er = false;
+ // Always throw error if a null is written
+ // if we are not in object mode then throw
+ // if it is not a buffer, string, or undefined.
+ if (chunk === null) {
+ er = new TypeError('May not write null values to stream');
+ } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ if (er) {
+ stream.emit('error', er);
+ processNextTick(cb, er);
+ valid = false;
+ }
+ return valid;
+}
+
+Writable.prototype.write = function (chunk, encoding, cb) {
+ var state = this._writableState;
+ var ret = false;
+
+ if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
+
+ if (typeof cb !== 'function') cb = nop;
+
+ if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) {
+ state.pendingcb++;
+ ret = writeOrBuffer(this, state, chunk, encoding, cb);
+ }
+
+ return ret;
+};
+
+Writable.prototype.cork = function () {
+ var state = this._writableState;
+
+ state.corked++;
+};
+
+Writable.prototype.uncork = function () {
+ var state = this._writableState;
+
+ if (state.corked) {
+ state.corked--;
+
+ if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
+ }
+};
+
+Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
+ // node::ParseEncoding() requires lower case.
+ if (typeof encoding === 'string') encoding = encoding.toLowerCase();
+ if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
+ this._writableState.defaultEncoding = encoding;
+ return this;
+};
+
+function decodeChunk(state, chunk, encoding) {
+ if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
+ chunk = bufferShim.from(chunk, encoding);
+ }
+ return chunk;
+}
+
+// if we're already writing something, then just put this
+// in the queue, and wait our turn. Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+function writeOrBuffer(stream, state, chunk, encoding, cb) {
+ chunk = decodeChunk(state, chunk, encoding);
+
+ if (Buffer.isBuffer(chunk)) encoding = 'buffer';
+ var len = state.objectMode ? 1 : chunk.length;
+
+ state.length += len;
+
+ var ret = state.length < state.highWaterMark;
+ // we must ensure that previous needDrain will not be reset to false.
+ if (!ret) state.needDrain = true;
+
+ if (state.writing || state.corked) {
+ var last = state.lastBufferedRequest;
+ state.lastBufferedRequest = new WriteReq(chunk, encoding, cb);
+ if (last) {
+ last.next = state.lastBufferedRequest;
+ } else {
+ state.bufferedRequest = state.lastBufferedRequest;
+ }
+ state.bufferedRequestCount += 1;
+ } else {
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ }
+
+ return ret;
+}
+
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+ state.writelen = len;
+ state.writecb = cb;
+ state.writing = true;
+ state.sync = true;
+ if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
+ state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+ --state.pendingcb;
+ if (sync) processNextTick(cb, er);else cb(er);
+
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+}
+
+function onwriteStateUpdate(state) {
+ state.writing = false;
+ state.writecb = null;
+ state.length -= state.writelen;
+ state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+ var state = stream._writableState;
+ var sync = state.sync;
+ var cb = state.writecb;
+
+ onwriteStateUpdate(state);
+
+ if (er) onwriteError(stream, state, sync, er, cb);else {
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(state);
+
+ if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
+ clearBuffer(stream, state);
+ }
+
+ if (sync) {
+ /*<replacement>*/
+ asyncWrite(afterWrite, stream, state, finished, cb);
+ /*</replacement>*/
+ } else {
+ afterWrite(stream, state, finished, cb);
+ }
+ }
+}
+
+function afterWrite(stream, state, finished, cb) {
+ if (!finished) onwriteDrain(stream, state);
+ state.pendingcb--;
+ cb();
+ finishMaybe(stream, state);
+}
+
+// Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+function onwriteDrain(stream, state) {
+ if (state.length === 0 && state.needDrain) {
+ state.needDrain = false;
+ stream.emit('drain');
+ }
+}
+
+// if there's something in the buffer waiting, then process it
+function clearBuffer(stream, state) {
+ state.bufferProcessing = true;
+ var entry = state.bufferedRequest;
+
+ if (stream._writev && entry && entry.next) {
+ // Fast case, write everything using _writev()
+ var l = state.bufferedRequestCount;
+ var buffer = new Array(l);
+ var holder = state.corkedRequestsFree;
+ holder.entry = entry;
+
+ var count = 0;
+ while (entry) {
+ buffer[count] = entry;
+ entry = entry.next;
+ count += 1;
+ }
+
+ doWrite(stream, state, true, state.length, buffer, '', holder.finish);
+
+ // doWrite is almost always async, defer these to save a bit of time
+ // as the hot path ends with doWrite
+ state.pendingcb++;
+ state.lastBufferedRequest = null;
+ if (holder.next) {
+ state.corkedRequestsFree = holder.next;
+ holder.next = null;
+ } else {
+ state.corkedRequestsFree = new CorkedRequest(state);
+ }
+ } else {
+ // Slow case, write chunks one-by-one
+ while (entry) {
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ entry = entry.next;
+ // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+ if (state.writing) {
+ break;
+ }
+ }
+
+ if (entry === null) state.lastBufferedRequest = null;
+ }
+
+ state.bufferedRequestCount = 0;
+ state.bufferedRequest = entry;
+ state.bufferProcessing = false;
+}
+
+Writable.prototype._write = function (chunk, encoding, cb) {
+ cb(new Error('not implemented'));
+};
+
+Writable.prototype._writev = null;
+
+Writable.prototype.end = function (chunk, encoding, cb) {
+ var state = this._writableState;
+
+ if (typeof chunk === 'function') {
+ cb = chunk;
+ chunk = null;
+ encoding = null;
+ } else if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
+
+ // .end() fully uncorks
+ if (state.corked) {
+ state.corked = 1;
+ this.uncork();
+ }
+
+ // ignore unnecessary end() calls.
+ if (!state.ending && !state.finished) endWritable(this, state, cb);
+};
+
+function needFinish(state) {
+ return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
+}
+
+function prefinish(stream, state) {
+ if (!state.prefinished) {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+}
+
+function finishMaybe(stream, state) {
+ var need = needFinish(state);
+ if (need) {
+ if (state.pendingcb === 0) {
+ prefinish(stream, state);
+ state.finished = true;
+ stream.emit('finish');
+ } else {
+ prefinish(stream, state);
+ }
+ }
+ return need;
+}
+
+function endWritable(stream, state, cb) {
+ state.ending = true;
+ finishMaybe(stream, state);
+ if (cb) {
+ if (state.finished) processNextTick(cb);else stream.once('finish', cb);
+ }
+ state.ended = true;
+ stream.writable = false;
+}
+
+// It seems a linked list but it is not
+// there will be only 2 of these for each stream
+function CorkedRequest(state) {
+ var _this = this;
+
+ this.next = null;
+ this.entry = null;
+
+ this.finish = function (err) {
+ var entry = _this.entry;
+ _this.entry = null;
+ while (entry) {
+ var cb = entry.callback;
+ state.pendingcb--;
+ cb(err);
+ entry = entry.next;
+ }
+ if (state.corkedRequestsFree) {
+ state.corkedRequestsFree.next = _this;
+ } else {
+ state.corkedRequestsFree = _this;
+ }
+ };
+} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/internal/streams/BufferList.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/internal/streams/BufferList.js
new file mode 100644
index 0000000..e4bfcf0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/lib/internal/streams/BufferList.js
@@ -0,0 +1,64 @@
+'use strict';
+
+var Buffer = require('buffer').Buffer;
+/*<replacement>*/
+var bufferShim = require('buffer-shims');
+/*</replacement>*/
+
+module.exports = BufferList;
+
+function BufferList() {
+ this.head = null;
+ this.tail = null;
+ this.length = 0;
+}
+
+BufferList.prototype.push = function (v) {
+ var entry = { data: v, next: null };
+ if (this.length > 0) this.tail.next = entry;else this.head = entry;
+ this.tail = entry;
+ ++this.length;
+};
+
+BufferList.prototype.unshift = function (v) {
+ var entry = { data: v, next: this.head };
+ if (this.length === 0) this.tail = entry;
+ this.head = entry;
+ ++this.length;
+};
+
+BufferList.prototype.shift = function () {
+ if (this.length === 0) return;
+ var ret = this.head.data;
+ if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
+ --this.length;
+ return ret;
+};
+
+BufferList.prototype.clear = function () {
+ this.head = this.tail = null;
+ this.length = 0;
+};
+
+BufferList.prototype.join = function (s) {
+ if (this.length === 0) return '';
+ var p = this.head;
+ var ret = '' + p.data;
+ while (p = p.next) {
+ ret += s + p.data;
+ }return ret;
+};
+
+BufferList.prototype.concat = function (n) {
+ if (this.length === 0) return bufferShim.alloc(0);
+ if (this.length === 1) return this.head.data;
+ var ret = bufferShim.allocUnsafe(n >>> 0);
+ var p = this.head;
+ var i = 0;
+ while (p) {
+ p.data.copy(ret, i);
+ i += p.data.length;
+ p = p.next;
+ }
+ return ret;
+}; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/index.js
new file mode 100644
index 0000000..1cab4c0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/index.js
@@ -0,0 +1,108 @@
+'use strict';
+
+var buffer = require('buffer');
+var Buffer = buffer.Buffer;
+var SlowBuffer = buffer.SlowBuffer;
+var MAX_LEN = buffer.kMaxLength || 2147483647;
+exports.alloc = function alloc(size, fill, encoding) {
+ if (typeof Buffer.alloc === 'function') {
+ return Buffer.alloc(size, fill, encoding);
+ }
+ if (typeof encoding === 'number') {
+ throw new TypeError('encoding must not be number');
+ }
+ if (typeof size !== 'number') {
+ throw new TypeError('size must be a number');
+ }
+ if (size > MAX_LEN) {
+ throw new RangeError('size is too large');
+ }
+ var enc = encoding;
+ var _fill = fill;
+ if (_fill === undefined) {
+ enc = undefined;
+ _fill = 0;
+ }
+ var buf = new Buffer(size);
+ if (typeof _fill === 'string') {
+ var fillBuf = new Buffer(_fill, enc);
+ var flen = fillBuf.length;
+ var i = -1;
+ while (++i < size) {
+ buf[i] = fillBuf[i % flen];
+ }
+ } else {
+ buf.fill(_fill);
+ }
+ return buf;
+}
+exports.allocUnsafe = function allocUnsafe(size) {
+ if (typeof Buffer.allocUnsafe === 'function') {
+ return Buffer.allocUnsafe(size);
+ }
+ if (typeof size !== 'number') {
+ throw new TypeError('size must be a number');
+ }
+ if (size > MAX_LEN) {
+ throw new RangeError('size is too large');
+ }
+ return new Buffer(size);
+}
+exports.from = function from(value, encodingOrOffset, length) {
+ if (typeof Buffer.from === 'function' && (!global.Uint8Array || Uint8Array.from !== Buffer.from)) {
+ return Buffer.from(value, encodingOrOffset, length);
+ }
+ if (typeof value === 'number') {
+ throw new TypeError('"value" argument must not be a number');
+ }
+ if (typeof value === 'string') {
+ return new Buffer(value, encodingOrOffset);
+ }
+ if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
+ var offset = encodingOrOffset;
+ if (arguments.length === 1) {
+ return new Buffer(value);
+ }
+ if (typeof offset === 'undefined') {
+ offset = 0;
+ }
+ var len = length;
+ if (typeof len === 'undefined') {
+ len = value.byteLength - offset;
+ }
+ if (offset >= value.byteLength) {
+ throw new RangeError('\'offset\' is out of bounds');
+ }
+ if (len > value.byteLength - offset) {
+ throw new RangeError('\'length\' is out of bounds');
+ }
+ return new Buffer(value.slice(offset, offset + len));
+ }
+ if (Buffer.isBuffer(value)) {
+ var out = new Buffer(value.length);
+ value.copy(out, 0, 0, value.length);
+ return out;
+ }
+ if (value) {
+ if (Array.isArray(value) || (typeof ArrayBuffer !== 'undefined' && value.buffer instanceof ArrayBuffer) || 'length' in value) {
+ return new Buffer(value);
+ }
+ if (value.type === 'Buffer' && Array.isArray(value.data)) {
+ return new Buffer(value.data);
+ }
+ }
+
+ throw new TypeError('First argument must be a string, Buffer, ' + 'ArrayBuffer, Array, or array-like object.');
+}
+exports.allocUnsafeSlow = function allocUnsafeSlow(size) {
+ if (typeof Buffer.allocUnsafeSlow === 'function') {
+ return Buffer.allocUnsafeSlow(size);
+ }
+ if (typeof size !== 'number') {
+ throw new TypeError('size must be a number');
+ }
+ if (size >= MAX_LEN) {
+ throw new RangeError('size is too large');
+ }
+ return new SlowBuffer(size);
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/license.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/license.md
new file mode 100644
index 0000000..01cfaef
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/license.md
@@ -0,0 +1,19 @@
+# Copyright (c) 2016 Calvin Metcalf
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.**
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/package.json
new file mode 100644
index 0000000..fe079c9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/package.json
@@ -0,0 +1,51 @@
+{
+ "name": "buffer-shims",
+ "version": "1.0.0",
+ "description": "some shims for node buffers",
+ "main": "index.js",
+ "scripts": {
+ "test": "tape test/*.js"
+ },
+ "files": [
+ "index.js"
+ ],
+ "license": "MIT",
+ "devDependencies": {
+ "tape": "^4.5.1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/calvinmetcalf/buffer-shims.git"
+ },
+ "gitHead": "ea89b3857ab5b8203957922a84e9a48cf4c47e0a",
+ "bugs": {
+ "url": "https://github.com/calvinmetcalf/buffer-shims/issues"
+ },
+ "_id": "buffer-shims@1.0.0",
+ "_shasum": "9978ce317388c649ad8793028c3477ef044a8b51",
+ "_from": "buffer-shims@>=1.0.0 <2.0.0",
+ "_npmVersion": "3.8.6",
+ "_nodeVersion": "5.11.0",
+ "_npmUser": {
+ "name": "cwmma",
+ "email": "calvin.metcalf@gmail.com"
+ },
+ "dist": {
+ "shasum": "9978ce317388c649ad8793028c3477ef044a8b51",
+ "tarball": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "cwmma",
+ "email": "calvin.metcalf@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/buffer-shims-1.0.0.tgz_1462560889323_0.8640750856138766"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz",
+ "readme": "ERROR: No README data found!",
+ "homepage": "https://github.com/calvinmetcalf/buffer-shims#readme"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/readme.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/readme.md
new file mode 100644
index 0000000..7ea6475
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/readme.md
@@ -0,0 +1,21 @@
+buffer-shims
+===
+
+functions to make sure the new buffer methods work in older browsers.
+
+```js
+var bufferShim = require('buffer-shims');
+bufferShim.from('foo');
+bufferShim.alloc(9, 'cafeface', 'hex');
+bufferShim.allocUnsafe(15);
+bufferShim.allocUnsafeSlow(21);
+```
+
+should just use the original in newer nodes and on older nodes uses fallbacks.
+
+Known Issues
+===
+- this does not patch the buffer object, only the constructor stuff
+- it's actually a polyfill
+
+![](https://i.imgur.com/zxII3jJ.gif)
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/LICENSE
new file mode 100644
index 0000000..d8d7f94
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/LICENSE
@@ -0,0 +1,19 @@
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/README.md
new file mode 100644
index 0000000..5a76b41
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/README.md
@@ -0,0 +1,3 @@
+# core-util-is
+
+The `util.is*` functions introduced in Node v0.12.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/float.patch b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/float.patch
new file mode 100644
index 0000000..a06d5c0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/float.patch
@@ -0,0 +1,604 @@
+diff --git a/lib/util.js b/lib/util.js
+index a03e874..9074e8e 100644
+--- a/lib/util.js
++++ b/lib/util.js
+@@ -19,430 +19,6 @@
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+-var formatRegExp = /%[sdj%]/g;
+-exports.format = function(f) {
+- if (!isString(f)) {
+- var objects = [];
+- for (var i = 0; i < arguments.length; i++) {
+- objects.push(inspect(arguments[i]));
+- }
+- return objects.join(' ');
+- }
+-
+- var i = 1;
+- var args = arguments;
+- var len = args.length;
+- var str = String(f).replace(formatRegExp, function(x) {
+- if (x === '%%') return '%';
+- if (i >= len) return x;
+- switch (x) {
+- case '%s': return String(args[i++]);
+- case '%d': return Number(args[i++]);
+- case '%j':
+- try {
+- return JSON.stringify(args[i++]);
+- } catch (_) {
+- return '[Circular]';
+- }
+- default:
+- return x;
+- }
+- });
+- for (var x = args[i]; i < len; x = args[++i]) {
+- if (isNull(x) || !isObject(x)) {
+- str += ' ' + x;
+- } else {
+- str += ' ' + inspect(x);
+- }
+- }
+- return str;
+-};
+-
+-
+-// Mark that a method should not be used.
+-// Returns a modified function which warns once by default.
+-// If --no-deprecation is set, then it is a no-op.
+-exports.deprecate = function(fn, msg) {
+- // Allow for deprecating things in the process of starting up.
+- if (isUndefined(global.process)) {
+- return function() {
+- return exports.deprecate(fn, msg).apply(this, arguments);
+- };
+- }
+-
+- if (process.noDeprecation === true) {
+- return fn;
+- }
+-
+- var warned = false;
+- function deprecated() {
+- if (!warned) {
+- if (process.throwDeprecation) {
+- throw new Error(msg);
+- } else if (process.traceDeprecation) {
+- console.trace(msg);
+- } else {
+- console.error(msg);
+- }
+- warned = true;
+- }
+- return fn.apply(this, arguments);
+- }
+-
+- return deprecated;
+-};
+-
+-
+-var debugs = {};
+-var debugEnviron;
+-exports.debuglog = function(set) {
+- if (isUndefined(debugEnviron))
+- debugEnviron = process.env.NODE_DEBUG || '';
+- set = set.toUpperCase();
+- if (!debugs[set]) {
+- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
+- var pid = process.pid;
+- debugs[set] = function() {
+- var msg = exports.format.apply(exports, arguments);
+- console.error('%s %d: %s', set, pid, msg);
+- };
+- } else {
+- debugs[set] = function() {};
+- }
+- }
+- return debugs[set];
+-};
+-
+-
+-/**
+- * Echos the value of a value. Trys to print the value out
+- * in the best way possible given the different types.
+- *
+- * @param {Object} obj The object to print out.
+- * @param {Object} opts Optional options object that alters the output.
+- */
+-/* legacy: obj, showHidden, depth, colors*/
+-function inspect(obj, opts) {
+- // default options
+- var ctx = {
+- seen: [],
+- stylize: stylizeNoColor
+- };
+- // legacy...
+- if (arguments.length >= 3) ctx.depth = arguments[2];
+- if (arguments.length >= 4) ctx.colors = arguments[3];
+- if (isBoolean(opts)) {
+- // legacy...
+- ctx.showHidden = opts;
+- } else if (opts) {
+- // got an "options" object
+- exports._extend(ctx, opts);
+- }
+- // set default options
+- if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
+- if (isUndefined(ctx.depth)) ctx.depth = 2;
+- if (isUndefined(ctx.colors)) ctx.colors = false;
+- if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
+- if (ctx.colors) ctx.stylize = stylizeWithColor;
+- return formatValue(ctx, obj, ctx.depth);
+-}
+-exports.inspect = inspect;
+-
+-
+-// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
+-inspect.colors = {
+- 'bold' : [1, 22],
+- 'italic' : [3, 23],
+- 'underline' : [4, 24],
+- 'inverse' : [7, 27],
+- 'white' : [37, 39],
+- 'grey' : [90, 39],
+- 'black' : [30, 39],
+- 'blue' : [34, 39],
+- 'cyan' : [36, 39],
+- 'green' : [32, 39],
+- 'magenta' : [35, 39],
+- 'red' : [31, 39],
+- 'yellow' : [33, 39]
+-};
+-
+-// Don't use 'blue' not visible on cmd.exe
+-inspect.styles = {
+- 'special': 'cyan',
+- 'number': 'yellow',
+- 'boolean': 'yellow',
+- 'undefined': 'grey',
+- 'null': 'bold',
+- 'string': 'green',
+- 'date': 'magenta',
+- // "name": intentionally not styling
+- 'regexp': 'red'
+-};
+-
+-
+-function stylizeWithColor(str, styleType) {
+- var style = inspect.styles[styleType];
+-
+- if (style) {
+- return '\u001b[' + inspect.colors[style][0] + 'm' + str +
+- '\u001b[' + inspect.colors[style][1] + 'm';
+- } else {
+- return str;
+- }
+-}
+-
+-
+-function stylizeNoColor(str, styleType) {
+- return str;
+-}
+-
+-
+-function arrayToHash(array) {
+- var hash = {};
+-
+- array.forEach(function(val, idx) {
+- hash[val] = true;
+- });
+-
+- return hash;
+-}
+-
+-
+-function formatValue(ctx, value, recurseTimes) {
+- // Provide a hook for user-specified inspect functions.
+- // Check that value is an object with an inspect function on it
+- if (ctx.customInspect &&
+- value &&
+- isFunction(value.inspect) &&
+- // Filter out the util module, it's inspect function is special
+- value.inspect !== exports.inspect &&
+- // Also filter out any prototype objects using the circular check.
+- !(value.constructor && value.constructor.prototype === value)) {
+- var ret = value.inspect(recurseTimes, ctx);
+- if (!isString(ret)) {
+- ret = formatValue(ctx, ret, recurseTimes);
+- }
+- return ret;
+- }
+-
+- // Primitive types cannot have properties
+- var primitive = formatPrimitive(ctx, value);
+- if (primitive) {
+- return primitive;
+- }
+-
+- // Look up the keys of the object.
+- var keys = Object.keys(value);
+- var visibleKeys = arrayToHash(keys);
+-
+- if (ctx.showHidden) {
+- keys = Object.getOwnPropertyNames(value);
+- }
+-
+- // Some type of object without properties can be shortcutted.
+- if (keys.length === 0) {
+- if (isFunction(value)) {
+- var name = value.name ? ': ' + value.name : '';
+- return ctx.stylize('[Function' + name + ']', 'special');
+- }
+- if (isRegExp(value)) {
+- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+- }
+- if (isDate(value)) {
+- return ctx.stylize(Date.prototype.toString.call(value), 'date');
+- }
+- if (isError(value)) {
+- return formatError(value);
+- }
+- }
+-
+- var base = '', array = false, braces = ['{', '}'];
+-
+- // Make Array say that they are Array
+- if (isArray(value)) {
+- array = true;
+- braces = ['[', ']'];
+- }
+-
+- // Make functions say that they are functions
+- if (isFunction(value)) {
+- var n = value.name ? ': ' + value.name : '';
+- base = ' [Function' + n + ']';
+- }
+-
+- // Make RegExps say that they are RegExps
+- if (isRegExp(value)) {
+- base = ' ' + RegExp.prototype.toString.call(value);
+- }
+-
+- // Make dates with properties first say the date
+- if (isDate(value)) {
+- base = ' ' + Date.prototype.toUTCString.call(value);
+- }
+-
+- // Make error with message first say the error
+- if (isError(value)) {
+- base = ' ' + formatError(value);
+- }
+-
+- if (keys.length === 0 && (!array || value.length == 0)) {
+- return braces[0] + base + braces[1];
+- }
+-
+- if (recurseTimes < 0) {
+- if (isRegExp(value)) {
+- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+- } else {
+- return ctx.stylize('[Object]', 'special');
+- }
+- }
+-
+- ctx.seen.push(value);
+-
+- var output;
+- if (array) {
+- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
+- } else {
+- output = keys.map(function(key) {
+- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
+- });
+- }
+-
+- ctx.seen.pop();
+-
+- return reduceToSingleString(output, base, braces);
+-}
+-
+-
+-function formatPrimitive(ctx, value) {
+- if (isUndefined(value))
+- return ctx.stylize('undefined', 'undefined');
+- if (isString(value)) {
+- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
+- .replace(/'/g, "\\'")
+- .replace(/\\"/g, '"') + '\'';
+- return ctx.stylize(simple, 'string');
+- }
+- if (isNumber(value)) {
+- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0,
+- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 .
+- if (value === 0 && 1 / value < 0)
+- return ctx.stylize('-0', 'number');
+- return ctx.stylize('' + value, 'number');
+- }
+- if (isBoolean(value))
+- return ctx.stylize('' + value, 'boolean');
+- // For some reason typeof null is "object", so special case here.
+- if (isNull(value))
+- return ctx.stylize('null', 'null');
+-}
+-
+-
+-function formatError(value) {
+- return '[' + Error.prototype.toString.call(value) + ']';
+-}
+-
+-
+-function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
+- var output = [];
+- for (var i = 0, l = value.length; i < l; ++i) {
+- if (hasOwnProperty(value, String(i))) {
+- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
+- String(i), true));
+- } else {
+- output.push('');
+- }
+- }
+- keys.forEach(function(key) {
+- if (!key.match(/^\d+$/)) {
+- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
+- key, true));
+- }
+- });
+- return output;
+-}
+-
+-
+-function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
+- var name, str, desc;
+- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
+- if (desc.get) {
+- if (desc.set) {
+- str = ctx.stylize('[Getter/Setter]', 'special');
+- } else {
+- str = ctx.stylize('[Getter]', 'special');
+- }
+- } else {
+- if (desc.set) {
+- str = ctx.stylize('[Setter]', 'special');
+- }
+- }
+- if (!hasOwnProperty(visibleKeys, key)) {
+- name = '[' + key + ']';
+- }
+- if (!str) {
+- if (ctx.seen.indexOf(desc.value) < 0) {
+- if (isNull(recurseTimes)) {
+- str = formatValue(ctx, desc.value, null);
+- } else {
+- str = formatValue(ctx, desc.value, recurseTimes - 1);
+- }
+- if (str.indexOf('\n') > -1) {
+- if (array) {
+- str = str.split('\n').map(function(line) {
+- return ' ' + line;
+- }).join('\n').substr(2);
+- } else {
+- str = '\n' + str.split('\n').map(function(line) {
+- return ' ' + line;
+- }).join('\n');
+- }
+- }
+- } else {
+- str = ctx.stylize('[Circular]', 'special');
+- }
+- }
+- if (isUndefined(name)) {
+- if (array && key.match(/^\d+$/)) {
+- return str;
+- }
+- name = JSON.stringify('' + key);
+- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
+- name = name.substr(1, name.length - 2);
+- name = ctx.stylize(name, 'name');
+- } else {
+- name = name.replace(/'/g, "\\'")
+- .replace(/\\"/g, '"')
+- .replace(/(^"|"$)/g, "'");
+- name = ctx.stylize(name, 'string');
+- }
+- }
+-
+- return name + ': ' + str;
+-}
+-
+-
+-function reduceToSingleString(output, base, braces) {
+- var numLinesEst = 0;
+- var length = output.reduce(function(prev, cur) {
+- numLinesEst++;
+- if (cur.indexOf('\n') >= 0) numLinesEst++;
+- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
+- }, 0);
+-
+- if (length > 60) {
+- return braces[0] +
+- (base === '' ? '' : base + '\n ') +
+- ' ' +
+- output.join(',\n ') +
+- ' ' +
+- braces[1];
+- }
+-
+- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
+-}
+-
+-
+ // NOTE: These type checking functions intentionally don't use `instanceof`
+ // because it is fragile and can be easily faked with `Object.create()`.
+ function isArray(ar) {
+@@ -522,166 +98,10 @@ function isPrimitive(arg) {
+ exports.isPrimitive = isPrimitive;
+
+ function isBuffer(arg) {
+- return arg instanceof Buffer;
++ return Buffer.isBuffer(arg);
+ }
+ exports.isBuffer = isBuffer;
+
+ function objectToString(o) {
+ return Object.prototype.toString.call(o);
+-}
+-
+-
+-function pad(n) {
+- return n < 10 ? '0' + n.toString(10) : n.toString(10);
+-}
+-
+-
+-var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
+- 'Oct', 'Nov', 'Dec'];
+-
+-// 26 Feb 16:19:34
+-function timestamp() {
+- var d = new Date();
+- var time = [pad(d.getHours()),
+- pad(d.getMinutes()),
+- pad(d.getSeconds())].join(':');
+- return [d.getDate(), months[d.getMonth()], time].join(' ');
+-}
+-
+-
+-// log is just a thin wrapper to console.log that prepends a timestamp
+-exports.log = function() {
+- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
+-};
+-
+-
+-/**
+- * Inherit the prototype methods from one constructor into another.
+- *
+- * The Function.prototype.inherits from lang.js rewritten as a standalone
+- * function (not on Function.prototype). NOTE: If this file is to be loaded
+- * during bootstrapping this function needs to be rewritten using some native
+- * functions as prototype setup using normal JavaScript does not work as
+- * expected during bootstrapping (see mirror.js in r114903).
+- *
+- * @param {function} ctor Constructor function which needs to inherit the
+- * prototype.
+- * @param {function} superCtor Constructor function to inherit prototype from.
+- */
+-exports.inherits = function(ctor, superCtor) {
+- ctor.super_ = superCtor;
+- ctor.prototype = Object.create(superCtor.prototype, {
+- constructor: {
+- value: ctor,
+- enumerable: false,
+- writable: true,
+- configurable: true
+- }
+- });
+-};
+-
+-exports._extend = function(origin, add) {
+- // Don't do anything if add isn't an object
+- if (!add || !isObject(add)) return origin;
+-
+- var keys = Object.keys(add);
+- var i = keys.length;
+- while (i--) {
+- origin[keys[i]] = add[keys[i]];
+- }
+- return origin;
+-};
+-
+-function hasOwnProperty(obj, prop) {
+- return Object.prototype.hasOwnProperty.call(obj, prop);
+-}
+-
+-
+-// Deprecated old stuff.
+-
+-exports.p = exports.deprecate(function() {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- console.error(exports.inspect(arguments[i]));
+- }
+-}, 'util.p: Use console.error() instead');
+-
+-
+-exports.exec = exports.deprecate(function() {
+- return require('child_process').exec.apply(this, arguments);
+-}, 'util.exec is now called `child_process.exec`.');
+-
+-
+-exports.print = exports.deprecate(function() {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- process.stdout.write(String(arguments[i]));
+- }
+-}, 'util.print: Use console.log instead');
+-
+-
+-exports.puts = exports.deprecate(function() {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- process.stdout.write(arguments[i] + '\n');
+- }
+-}, 'util.puts: Use console.log instead');
+-
+-
+-exports.debug = exports.deprecate(function(x) {
+- process.stderr.write('DEBUG: ' + x + '\n');
+-}, 'util.debug: Use console.error instead');
+-
+-
+-exports.error = exports.deprecate(function(x) {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- process.stderr.write(arguments[i] + '\n');
+- }
+-}, 'util.error: Use console.error instead');
+-
+-
+-exports.pump = exports.deprecate(function(readStream, writeStream, callback) {
+- var callbackCalled = false;
+-
+- function call(a, b, c) {
+- if (callback && !callbackCalled) {
+- callback(a, b, c);
+- callbackCalled = true;
+- }
+- }
+-
+- readStream.addListener('data', function(chunk) {
+- if (writeStream.write(chunk) === false) readStream.pause();
+- });
+-
+- writeStream.addListener('drain', function() {
+- readStream.resume();
+- });
+-
+- readStream.addListener('end', function() {
+- writeStream.end();
+- });
+-
+- readStream.addListener('close', function() {
+- call();
+- });
+-
+- readStream.addListener('error', function(err) {
+- writeStream.end();
+- call(err);
+- });
+-
+- writeStream.addListener('error', function(err) {
+- readStream.destroy();
+- call(err);
+- });
+-}, 'util.pump(): Use readableStream.pipe() instead');
+-
+-
+-var uv;
+-exports._errnoException = function(err, syscall) {
+- if (isUndefined(uv)) uv = process.binding('uv');
+- var errname = uv.errname(err);
+- var e = new Error(syscall + ' ' + errname);
+- e.code = errname;
+- e.errno = errname;
+- e.syscall = syscall;
+- return e;
+-};
++} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/lib/util.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/lib/util.js
new file mode 100644
index 0000000..ff4c851
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/lib/util.js
@@ -0,0 +1,107 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// NOTE: These type checking functions intentionally don't use `instanceof`
+// because it is fragile and can be easily faked with `Object.create()`.
+
+function isArray(arg) {
+ if (Array.isArray) {
+ return Array.isArray(arg);
+ }
+ return objectToString(arg) === '[object Array]';
+}
+exports.isArray = isArray;
+
+function isBoolean(arg) {
+ return typeof arg === 'boolean';
+}
+exports.isBoolean = isBoolean;
+
+function isNull(arg) {
+ return arg === null;
+}
+exports.isNull = isNull;
+
+function isNullOrUndefined(arg) {
+ return arg == null;
+}
+exports.isNullOrUndefined = isNullOrUndefined;
+
+function isNumber(arg) {
+ return typeof arg === 'number';
+}
+exports.isNumber = isNumber;
+
+function isString(arg) {
+ return typeof arg === 'string';
+}
+exports.isString = isString;
+
+function isSymbol(arg) {
+ return typeof arg === 'symbol';
+}
+exports.isSymbol = isSymbol;
+
+function isUndefined(arg) {
+ return arg === void 0;
+}
+exports.isUndefined = isUndefined;
+
+function isRegExp(re) {
+ return objectToString(re) === '[object RegExp]';
+}
+exports.isRegExp = isRegExp;
+
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+}
+exports.isObject = isObject;
+
+function isDate(d) {
+ return objectToString(d) === '[object Date]';
+}
+exports.isDate = isDate;
+
+function isError(e) {
+ return (objectToString(e) === '[object Error]' || e instanceof Error);
+}
+exports.isError = isError;
+
+function isFunction(arg) {
+ return typeof arg === 'function';
+}
+exports.isFunction = isFunction;
+
+function isPrimitive(arg) {
+ return arg === null ||
+ typeof arg === 'boolean' ||
+ typeof arg === 'number' ||
+ typeof arg === 'string' ||
+ typeof arg === 'symbol' || // ES6 symbol
+ typeof arg === 'undefined';
+}
+exports.isPrimitive = isPrimitive;
+
+exports.isBuffer = Buffer.isBuffer;
+
+function objectToString(o) {
+ return Object.prototype.toString.call(o);
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/package.json
new file mode 100644
index 0000000..19fb859
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/package.json
@@ -0,0 +1,60 @@
+{
+ "name": "core-util-is",
+ "version": "1.0.2",
+ "description": "The `util.is*` functions introduced in Node v0.12.",
+ "main": "lib/util.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/core-util-is.git"
+ },
+ "keywords": [
+ "util",
+ "isBuffer",
+ "isArray",
+ "isNumber",
+ "isString",
+ "isRegExp",
+ "isThis",
+ "isThat",
+ "polyfill"
+ ],
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/isaacs/core-util-is/issues"
+ },
+ "scripts": {
+ "test": "tap test.js"
+ },
+ "devDependencies": {
+ "tap": "^2.3.0"
+ },
+ "gitHead": "a177da234df5638b363ddc15fa324619a38577c8",
+ "homepage": "https://github.com/isaacs/core-util-is#readme",
+ "_id": "core-util-is@1.0.2",
+ "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7",
+ "_from": "core-util-is@>=1.0.0 <1.1.0",
+ "_npmVersion": "3.3.2",
+ "_nodeVersion": "4.0.0",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "dist": {
+ "shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7",
+ "tarball": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/test.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/test.js
new file mode 100644
index 0000000..1a490c6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/test.js
@@ -0,0 +1,68 @@
+var assert = require('tap');
+
+var t = require('./lib/util');
+
+assert.equal(t.isArray([]), true);
+assert.equal(t.isArray({}), false);
+
+assert.equal(t.isBoolean(null), false);
+assert.equal(t.isBoolean(true), true);
+assert.equal(t.isBoolean(false), true);
+
+assert.equal(t.isNull(null), true);
+assert.equal(t.isNull(undefined), false);
+assert.equal(t.isNull(false), false);
+assert.equal(t.isNull(), false);
+
+assert.equal(t.isNullOrUndefined(null), true);
+assert.equal(t.isNullOrUndefined(undefined), true);
+assert.equal(t.isNullOrUndefined(false), false);
+assert.equal(t.isNullOrUndefined(), true);
+
+assert.equal(t.isNumber(null), false);
+assert.equal(t.isNumber('1'), false);
+assert.equal(t.isNumber(1), true);
+
+assert.equal(t.isString(null), false);
+assert.equal(t.isString('1'), true);
+assert.equal(t.isString(1), false);
+
+assert.equal(t.isSymbol(null), false);
+assert.equal(t.isSymbol('1'), false);
+assert.equal(t.isSymbol(1), false);
+assert.equal(t.isSymbol(Symbol()), true);
+
+assert.equal(t.isUndefined(null), false);
+assert.equal(t.isUndefined(undefined), true);
+assert.equal(t.isUndefined(false), false);
+assert.equal(t.isUndefined(), true);
+
+assert.equal(t.isRegExp(null), false);
+assert.equal(t.isRegExp('1'), false);
+assert.equal(t.isRegExp(new RegExp()), true);
+
+assert.equal(t.isObject({}), true);
+assert.equal(t.isObject([]), true);
+assert.equal(t.isObject(new RegExp()), true);
+assert.equal(t.isObject(new Date()), true);
+
+assert.equal(t.isDate(null), false);
+assert.equal(t.isDate('1'), false);
+assert.equal(t.isDate(new Date()), true);
+
+assert.equal(t.isError(null), false);
+assert.equal(t.isError({ err: true }), false);
+assert.equal(t.isError(new Error()), true);
+
+assert.equal(t.isFunction(null), false);
+assert.equal(t.isFunction({ }), false);
+assert.equal(t.isFunction(function() {}), true);
+
+assert.equal(t.isPrimitive(null), true);
+assert.equal(t.isPrimitive(''), true);
+assert.equal(t.isPrimitive(0), true);
+assert.equal(t.isPrimitive(new Date()), false);
+
+assert.equal(t.isBuffer(null), false);
+assert.equal(t.isBuffer({}), false);
+assert.equal(t.isBuffer(new Buffer(0)), true);
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/LICENSE
new file mode 100644
index 0000000..dea3013
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/LICENSE
@@ -0,0 +1,16 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/README.md
new file mode 100644
index 0000000..b1c5665
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/README.md
@@ -0,0 +1,42 @@
+Browser-friendly inheritance fully compatible with standard node.js
+[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).
+
+This package exports standard `inherits` from node.js `util` module in
+node environment, but also provides alternative browser-friendly
+implementation through [browser
+field](https://gist.github.com/shtylman/4339901). Alternative
+implementation is a literal copy of standard one located in standalone
+module to avoid requiring of `util`. It also has a shim for old
+browsers with no `Object.create` support.
+
+While keeping you sure you are using standard `inherits`
+implementation in node.js environment, it allows bundlers such as
+[browserify](https://github.com/substack/node-browserify) to not
+include full `util` package to your client code if all you need is
+just `inherits` function. It worth, because browser shim for `util`
+package is large and `inherits` is often the single function you need
+from it.
+
+It's recommended to use this package instead of
+`require('util').inherits` for any code that has chances to be used
+not only in node.js but in browser too.
+
+## usage
+
+```js
+var inherits = require('inherits');
+// then use exactly as the standard one
+```
+
+## note on version ~1.0
+
+Version ~1.0 had completely different motivation and is not compatible
+neither with 2.0 nor with standard node.js `inherits`.
+
+If you are using version ~1.0 and planning to switch to ~2.0, be
+careful:
+
+* new version uses `super_` instead of `super` for referencing
+ superclass
+* new version overwrites current prototype while old one preserves any
+ existing fields on it
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/inherits.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/inherits.js
new file mode 100644
index 0000000..3b94763
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/inherits.js
@@ -0,0 +1,7 @@
+try {
+ var util = require('util');
+ if (typeof util.inherits !== 'function') throw '';
+ module.exports = util.inherits;
+} catch (e) {
+ module.exports = require('./inherits_browser.js');
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/inherits_browser.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/inherits_browser.js
new file mode 100644
index 0000000..c1e78a7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/inherits_browser.js
@@ -0,0 +1,23 @@
+if (typeof Object.create === 'function') {
+ // implementation from standard node.js 'util' module
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ };
+} else {
+ // old school shim for old browsers
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ var TempCtor = function () {}
+ TempCtor.prototype = superCtor.prototype
+ ctor.prototype = new TempCtor()
+ ctor.prototype.constructor = ctor
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/package.json
new file mode 100644
index 0000000..9146e75
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/package.json
@@ -0,0 +1,63 @@
+{
+ "name": "inherits",
+ "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
+ "version": "2.0.3",
+ "keywords": [
+ "inheritance",
+ "class",
+ "klass",
+ "oop",
+ "object-oriented",
+ "inherits",
+ "browser",
+ "browserify"
+ ],
+ "main": "./inherits.js",
+ "browser": "./inherits_browser.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/inherits.git"
+ },
+ "license": "ISC",
+ "scripts": {
+ "test": "node test"
+ },
+ "devDependencies": {
+ "tap": "^7.1.0"
+ },
+ "files": [
+ "inherits.js",
+ "inherits_browser.js"
+ ],
+ "gitHead": "e05d0fb27c61a3ec687214f0476386b765364d5f",
+ "bugs": {
+ "url": "https://github.com/isaacs/inherits/issues"
+ },
+ "homepage": "https://github.com/isaacs/inherits#readme",
+ "_id": "inherits@2.0.3",
+ "_shasum": "633c2c83e3da42a502f52466022480f4208261de",
+ "_from": "inherits@>=2.0.1 <2.1.0",
+ "_npmVersion": "3.10.7",
+ "_nodeVersion": "6.5.0",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "dist": {
+ "shasum": "633c2c83e3da42a502f52466022480f4208261de",
+ "tarball": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/.npmignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/.travis.yml b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/.travis.yml
new file mode 100644
index 0000000..cc4dba2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/Makefile b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/Makefile
new file mode 100644
index 0000000..787d56e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/Makefile
@@ -0,0 +1,6 @@
+
+test:
+ @node_modules/.bin/tape test.js
+
+.PHONY: test
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/README.md
new file mode 100644
index 0000000..16d2c59
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/README.md
@@ -0,0 +1,60 @@
+
+# isarray
+
+`Array#isArray` for older browsers.
+
+[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray)
+[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray)
+
+[![browser support](https://ci.testling.com/juliangruber/isarray.png)
+](https://ci.testling.com/juliangruber/isarray)
+
+## Usage
+
+```js
+var isArray = require('isarray');
+
+console.log(isArray([])); // => true
+console.log(isArray({})); // => false
+```
+
+## Installation
+
+With [npm](http://npmjs.org) do
+
+```bash
+$ npm install isarray
+```
+
+Then bundle for the browser with
+[browserify](https://github.com/substack/browserify).
+
+With [component](http://component.io) do
+
+```bash
+$ component install juliangruber/isarray
+```
+
+## License
+
+(MIT)
+
+Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/component.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/component.json
new file mode 100644
index 0000000..9e31b68
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/component.json
@@ -0,0 +1,19 @@
+{
+ "name" : "isarray",
+ "description" : "Array#isArray for older browsers",
+ "version" : "0.0.1",
+ "repository" : "juliangruber/isarray",
+ "homepage": "https://github.com/juliangruber/isarray",
+ "main" : "index.js",
+ "scripts" : [
+ "index.js"
+ ],
+ "dependencies" : {},
+ "keywords": ["browser","isarray","array"],
+ "author": {
+ "name": "Julian Gruber",
+ "email": "mail@juliangruber.com",
+ "url": "http://juliangruber.com"
+ },
+ "license": "MIT"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/index.js
new file mode 100644
index 0000000..a57f634
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/index.js
@@ -0,0 +1,5 @@
+var toString = {}.toString;
+
+module.exports = Array.isArray || function (arr) {
+ return toString.call(arr) == '[object Array]';
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/package.json
new file mode 100644
index 0000000..e86d232
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "isarray",
+ "description": "Array#isArray for older browsers",
+ "version": "1.0.0",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/juliangruber/isarray.git"
+ },
+ "homepage": "https://github.com/juliangruber/isarray",
+ "main": "index.js",
+ "dependencies": {},
+ "devDependencies": {
+ "tape": "~2.13.4"
+ },
+ "keywords": [
+ "browser",
+ "isarray",
+ "array"
+ ],
+ "author": {
+ "name": "Julian Gruber",
+ "email": "mail@juliangruber.com",
+ "url": "http://juliangruber.com"
+ },
+ "license": "MIT",
+ "testling": {
+ "files": "test.js",
+ "browsers": [
+ "ie/8..latest",
+ "firefox/17..latest",
+ "firefox/nightly",
+ "chrome/22..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2..latest"
+ ]
+ },
+ "scripts": {
+ "test": "tape test.js"
+ },
+ "gitHead": "2a23a281f369e9ae06394c0fb4d2381355a6ba33",
+ "bugs": {
+ "url": "https://github.com/juliangruber/isarray/issues"
+ },
+ "_id": "isarray@1.0.0",
+ "_shasum": "bb935d48582cba168c06834957a54a3e07124f11",
+ "_from": "isarray@>=1.0.0 <1.1.0",
+ "_npmVersion": "3.3.12",
+ "_nodeVersion": "5.1.0",
+ "_npmUser": {
+ "name": "juliangruber",
+ "email": "julian@juliangruber.com"
+ },
+ "dist": {
+ "shasum": "bb935d48582cba168c06834957a54a3e07124f11",
+ "tarball": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "juliangruber",
+ "email": "julian@juliangruber.com"
+ }
+ ],
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/test.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/test.js
new file mode 100644
index 0000000..e0c3444
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/test.js
@@ -0,0 +1,20 @@
+var isArray = require('./');
+var test = require('tape');
+
+test('is array', function(t){
+ t.ok(isArray([]));
+ t.notOk(isArray({}));
+ t.notOk(isArray(null));
+ t.notOk(isArray(false));
+
+ var obj = {};
+ obj[0] = true;
+ t.notOk(isArray(obj));
+
+ var arr = [];
+ arr.foo = 'bar';
+ t.ok(isArray(arr));
+
+ t.end();
+});
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml
new file mode 100644
index 0000000..36201b1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml
@@ -0,0 +1,12 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
+ - "0.11"
+ - "0.12"
+ - "1.7.1"
+ - 1
+ - 2
+ - 3
+ - 4
+ - 5
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/index.js
new file mode 100644
index 0000000..a4f40f8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/index.js
@@ -0,0 +1,43 @@
+'use strict';
+
+if (!process.version ||
+ process.version.indexOf('v0.') === 0 ||
+ process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
+ module.exports = nextTick;
+} else {
+ module.exports = process.nextTick;
+}
+
+function nextTick(fn, arg1, arg2, arg3) {
+ if (typeof fn !== 'function') {
+ throw new TypeError('"callback" argument must be a function');
+ }
+ var len = arguments.length;
+ var args, i;
+ switch (len) {
+ case 0:
+ case 1:
+ return process.nextTick(fn);
+ case 2:
+ return process.nextTick(function afterTickOne() {
+ fn.call(null, arg1);
+ });
+ case 3:
+ return process.nextTick(function afterTickTwo() {
+ fn.call(null, arg1, arg2);
+ });
+ case 4:
+ return process.nextTick(function afterTickThree() {
+ fn.call(null, arg1, arg2, arg3);
+ });
+ default:
+ args = new Array(len - 1);
+ i = 0;
+ while (i < args.length) {
+ args[i++] = arguments[i];
+ }
+ return process.nextTick(function afterTick() {
+ fn.apply(null, args);
+ });
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/license.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/license.md
new file mode 100644
index 0000000..c67e353
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/license.md
@@ -0,0 +1,19 @@
+# Copyright (c) 2015 Calvin Metcalf
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.**
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/package.json
new file mode 100644
index 0000000..211b098
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/package.json
@@ -0,0 +1,49 @@
+{
+ "name": "process-nextick-args",
+ "version": "1.0.7",
+ "description": "process.nextTick but always with args",
+ "main": "index.js",
+ "scripts": {
+ "test": "node test.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/calvinmetcalf/process-nextick-args.git"
+ },
+ "author": "",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/calvinmetcalf/process-nextick-args/issues"
+ },
+ "homepage": "https://github.com/calvinmetcalf/process-nextick-args",
+ "devDependencies": {
+ "tap": "~0.2.6"
+ },
+ "gitHead": "5c00899ab01dd32f93ad4b5743da33da91404f39",
+ "_id": "process-nextick-args@1.0.7",
+ "_shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3",
+ "_from": "process-nextick-args@>=1.0.6 <1.1.0",
+ "_npmVersion": "3.8.6",
+ "_nodeVersion": "5.11.0",
+ "_npmUser": {
+ "name": "cwmma",
+ "email": "calvin.metcalf@gmail.com"
+ },
+ "dist": {
+ "shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3",
+ "tarball": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "cwmma",
+ "email": "calvin.metcalf@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/process-nextick-args-1.0.7.tgz_1462394251778_0.36989671061746776"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/readme.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/readme.md
new file mode 100644
index 0000000..78e7cfa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/readme.md
@@ -0,0 +1,18 @@
+process-nextick-args
+=====
+
+[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args)
+
+```bash
+npm install --save process-nextick-args
+```
+
+Always be able to pass arguments to process.nextTick, no matter the platform
+
+```js
+var nextTick = require('process-nextick-args');
+
+nextTick(function (a, b, c) {
+ console.log(a, b, c);
+}, 'step', 3, 'profit');
+```
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/test.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/test.js
new file mode 100644
index 0000000..ef15721
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/test.js
@@ -0,0 +1,24 @@
+var test = require("tap").test;
+var nextTick = require('./');
+
+test('should work', function (t) {
+ t.plan(5);
+ nextTick(function (a) {
+ t.ok(a);
+ nextTick(function (thing) {
+ t.equals(thing, 7);
+ }, 7);
+ }, true);
+ nextTick(function (a, b, c) {
+ t.equals(a, 'step');
+ t.equals(b, 3);
+ t.equals(c, 'profit');
+ }, 'step', 3, 'profit');
+});
+
+test('correct number of arguments', function (t) {
+ t.plan(1);
+ nextTick(function () {
+ t.equals(2, arguments.length, 'correct number');
+ }, 1, 2);
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/.npmignore
new file mode 100644
index 0000000..206320c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/.npmignore
@@ -0,0 +1,2 @@
+build
+test
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/LICENSE
new file mode 100644
index 0000000..6de584a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/LICENSE
@@ -0,0 +1,20 @@
+Copyright Joyent, Inc. and other Node contributors.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to permit
+persons to whom the Software is furnished to do so, subject to the
+following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/README.md
new file mode 100644
index 0000000..4d2aa00
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/README.md
@@ -0,0 +1,7 @@
+**string_decoder.js** (`require('string_decoder')`) from Node.js core
+
+Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details.
+
+Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.**
+
+The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/index.js
new file mode 100644
index 0000000..b00e54f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/index.js
@@ -0,0 +1,221 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+var Buffer = require('buffer').Buffer;
+
+var isBufferEncoding = Buffer.isEncoding
+ || function(encoding) {
+ switch (encoding && encoding.toLowerCase()) {
+ case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;
+ default: return false;
+ }
+ }
+
+
+function assertEncoding(encoding) {
+ if (encoding && !isBufferEncoding(encoding)) {
+ throw new Error('Unknown encoding: ' + encoding);
+ }
+}
+
+// StringDecoder provides an interface for efficiently splitting a series of
+// buffers into a series of JS strings without breaking apart multi-byte
+// characters. CESU-8 is handled as part of the UTF-8 encoding.
+//
+// @TODO Handling all encodings inside a single object makes it very difficult
+// to reason about this code, so it should be split up in the future.
+// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code
+// points as used by CESU-8.
+var StringDecoder = exports.StringDecoder = function(encoding) {
+ this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');
+ assertEncoding(encoding);
+ switch (this.encoding) {
+ case 'utf8':
+ // CESU-8 represents each of Surrogate Pair by 3-bytes
+ this.surrogateSize = 3;
+ break;
+ case 'ucs2':
+ case 'utf16le':
+ // UTF-16 represents each of Surrogate Pair by 2-bytes
+ this.surrogateSize = 2;
+ this.detectIncompleteChar = utf16DetectIncompleteChar;
+ break;
+ case 'base64':
+ // Base-64 stores 3 bytes in 4 chars, and pads the remainder.
+ this.surrogateSize = 3;
+ this.detectIncompleteChar = base64DetectIncompleteChar;
+ break;
+ default:
+ this.write = passThroughWrite;
+ return;
+ }
+
+ // Enough space to store all bytes of a single character. UTF-8 needs 4
+ // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).
+ this.charBuffer = new Buffer(6);
+ // Number of bytes received for the current incomplete multi-byte character.
+ this.charReceived = 0;
+ // Number of bytes expected for the current incomplete multi-byte character.
+ this.charLength = 0;
+};
+
+
+// write decodes the given buffer and returns it as JS string that is
+// guaranteed to not contain any partial multi-byte characters. Any partial
+// character found at the end of the buffer is buffered up, and will be
+// returned when calling write again with the remaining bytes.
+//
+// Note: Converting a Buffer containing an orphan surrogate to a String
+// currently works, but converting a String to a Buffer (via `new Buffer`, or
+// Buffer#write) will replace incomplete surrogates with the unicode
+// replacement character. See https://codereview.chromium.org/121173009/ .
+StringDecoder.prototype.write = function(buffer) {
+ var charStr = '';
+ // if our last write ended with an incomplete multibyte character
+ while (this.charLength) {
+ // determine how many remaining bytes this buffer has to offer for this char
+ var available = (buffer.length >= this.charLength - this.charReceived) ?
+ this.charLength - this.charReceived :
+ buffer.length;
+
+ // add the new bytes to the char buffer
+ buffer.copy(this.charBuffer, this.charReceived, 0, available);
+ this.charReceived += available;
+
+ if (this.charReceived < this.charLength) {
+ // still not enough chars in this buffer? wait for more ...
+ return '';
+ }
+
+ // remove bytes belonging to the current character from the buffer
+ buffer = buffer.slice(available, buffer.length);
+
+ // get the character that was split
+ charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);
+
+ // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
+ var charCode = charStr.charCodeAt(charStr.length - 1);
+ if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+ this.charLength += this.surrogateSize;
+ charStr = '';
+ continue;
+ }
+ this.charReceived = this.charLength = 0;
+
+ // if there are no more bytes in this buffer, just emit our char
+ if (buffer.length === 0) {
+ return charStr;
+ }
+ break;
+ }
+
+ // determine and set charLength / charReceived
+ this.detectIncompleteChar(buffer);
+
+ var end = buffer.length;
+ if (this.charLength) {
+ // buffer the incomplete character bytes we got
+ buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);
+ end -= this.charReceived;
+ }
+
+ charStr += buffer.toString(this.encoding, 0, end);
+
+ var end = charStr.length - 1;
+ var charCode = charStr.charCodeAt(end);
+ // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
+ if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+ var size = this.surrogateSize;
+ this.charLength += size;
+ this.charReceived += size;
+ this.charBuffer.copy(this.charBuffer, size, 0, size);
+ buffer.copy(this.charBuffer, 0, 0, size);
+ return charStr.substring(0, end);
+ }
+
+ // or just emit the charStr
+ return charStr;
+};
+
+// detectIncompleteChar determines if there is an incomplete UTF-8 character at
+// the end of the given buffer. If so, it sets this.charLength to the byte
+// length that character, and sets this.charReceived to the number of bytes
+// that are available for this character.
+StringDecoder.prototype.detectIncompleteChar = function(buffer) {
+ // determine how many bytes we have to check at the end of this buffer
+ var i = (buffer.length >= 3) ? 3 : buffer.length;
+
+ // Figure out if one of the last i bytes of our buffer announces an
+ // incomplete char.
+ for (; i > 0; i--) {
+ var c = buffer[buffer.length - i];
+
+ // See http://en.wikipedia.org/wiki/UTF-8#Description
+
+ // 110XXXXX
+ if (i == 1 && c >> 5 == 0x06) {
+ this.charLength = 2;
+ break;
+ }
+
+ // 1110XXXX
+ if (i <= 2 && c >> 4 == 0x0E) {
+ this.charLength = 3;
+ break;
+ }
+
+ // 11110XXX
+ if (i <= 3 && c >> 3 == 0x1E) {
+ this.charLength = 4;
+ break;
+ }
+ }
+ this.charReceived = i;
+};
+
+StringDecoder.prototype.end = function(buffer) {
+ var res = '';
+ if (buffer && buffer.length)
+ res = this.write(buffer);
+
+ if (this.charReceived) {
+ var cr = this.charReceived;
+ var buf = this.charBuffer;
+ var enc = this.encoding;
+ res += buf.slice(0, cr).toString(enc);
+ }
+
+ return res;
+};
+
+function passThroughWrite(buffer) {
+ return buffer.toString(this.encoding);
+}
+
+function utf16DetectIncompleteChar(buffer) {
+ this.charReceived = buffer.length % 2;
+ this.charLength = this.charReceived ? 2 : 0;
+}
+
+function base64DetectIncompleteChar(buffer) {
+ this.charReceived = buffer.length % 3;
+ this.charLength = this.charReceived ? 3 : 0;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/package.json
new file mode 100644
index 0000000..8e8b77d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/package.json
@@ -0,0 +1,54 @@
+{
+ "name": "string_decoder",
+ "version": "0.10.31",
+ "description": "The string_decoder module from Node core",
+ "main": "index.js",
+ "dependencies": {},
+ "devDependencies": {
+ "tap": "~0.4.8"
+ },
+ "scripts": {
+ "test": "tap test/simple/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/rvagg/string_decoder.git"
+ },
+ "homepage": "https://github.com/rvagg/string_decoder",
+ "keywords": [
+ "string",
+ "decoder",
+ "browser",
+ "browserify"
+ ],
+ "license": "MIT",
+ "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0",
+ "bugs": {
+ "url": "https://github.com/rvagg/string_decoder/issues"
+ },
+ "_id": "string_decoder@0.10.31",
+ "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94",
+ "_from": "string_decoder@>=0.10.0 <0.11.0",
+ "_npmVersion": "1.4.23",
+ "_npmUser": {
+ "name": "rvagg",
+ "email": "rod@vagg.org"
+ },
+ "maintainers": [
+ {
+ "name": "substack",
+ "email": "mail@substack.net"
+ },
+ {
+ "name": "rvagg",
+ "email": "rod@vagg.org"
+ }
+ ],
+ "dist": {
+ "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94",
+ "tarball": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/History.md
new file mode 100644
index 0000000..acc8675
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/History.md
@@ -0,0 +1,16 @@
+
+1.0.2 / 2015-10-07
+==================
+
+ * use try/catch when checking `localStorage` (#3, @kumavis)
+
+1.0.1 / 2014-11-25
+==================
+
+ * browser: use `console.warn()` for deprecation calls
+ * browser: more jsdocs
+
+1.0.0 / 2014-04-30
+==================
+
+ * initial commit
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/LICENSE
new file mode 100644
index 0000000..6a60e8c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/LICENSE
@@ -0,0 +1,24 @@
+(The MIT License)
+
+Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/README.md
new file mode 100644
index 0000000..75622fa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/README.md
@@ -0,0 +1,53 @@
+util-deprecate
+==============
+### The Node.js `util.deprecate()` function with browser support
+
+In Node.js, this module simply re-exports the `util.deprecate()` function.
+
+In the web browser (i.e. via browserify), a browser-specific implementation
+of the `util.deprecate()` function is used.
+
+
+## API
+
+A `deprecate()` function is the only thing exposed by this module.
+
+``` javascript
+// setup:
+exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead');
+
+
+// users see:
+foo();
+// foo() is deprecated, use bar() instead
+foo();
+foo();
+```
+
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/browser.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/browser.js
new file mode 100644
index 0000000..549ae2f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/browser.js
@@ -0,0 +1,67 @@
+
+/**
+ * Module exports.
+ */
+
+module.exports = deprecate;
+
+/**
+ * Mark that a method should not be used.
+ * Returns a modified function which warns once by default.
+ *
+ * If `localStorage.noDeprecation = true` is set, then it is a no-op.
+ *
+ * If `localStorage.throwDeprecation = true` is set, then deprecated functions
+ * will throw an Error when invoked.
+ *
+ * If `localStorage.traceDeprecation = true` is set, then deprecated functions
+ * will invoke `console.trace()` instead of `console.error()`.
+ *
+ * @param {Function} fn - the function to deprecate
+ * @param {String} msg - the string to print to the console when `fn` is invoked
+ * @returns {Function} a new "deprecated" version of `fn`
+ * @api public
+ */
+
+function deprecate (fn, msg) {
+ if (config('noDeprecation')) {
+ return fn;
+ }
+
+ var warned = false;
+ function deprecated() {
+ if (!warned) {
+ if (config('throwDeprecation')) {
+ throw new Error(msg);
+ } else if (config('traceDeprecation')) {
+ console.trace(msg);
+ } else {
+ console.warn(msg);
+ }
+ warned = true;
+ }
+ return fn.apply(this, arguments);
+ }
+
+ return deprecated;
+}
+
+/**
+ * Checks `localStorage` for boolean values for the given `name`.
+ *
+ * @param {String} name
+ * @returns {Boolean}
+ * @api private
+ */
+
+function config (name) {
+ // accessing global.localStorage can trigger a DOMException in sandboxed iframes
+ try {
+ if (!global.localStorage) return false;
+ } catch (_) {
+ return false;
+ }
+ var val = global.localStorage[name];
+ if (null == val) return false;
+ return String(val).toLowerCase() === 'true';
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/node.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/node.js
new file mode 100644
index 0000000..5e6fcff
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/node.js
@@ -0,0 +1,6 @@
+
+/**
+ * For Node.js, simply re-export the core `util.deprecate` function.
+ */
+
+module.exports = require('util').deprecate;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/package.json
new file mode 100644
index 0000000..a018135
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/package.json
@@ -0,0 +1,54 @@
+{
+ "name": "util-deprecate",
+ "version": "1.0.2",
+ "description": "The Node.js `util.deprecate()` function with browser support",
+ "main": "node.js",
+ "browser": "browser.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/TooTallNate/util-deprecate.git"
+ },
+ "keywords": [
+ "util",
+ "deprecate",
+ "browserify",
+ "browser",
+ "node"
+ ],
+ "author": {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io/"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/TooTallNate/util-deprecate/issues"
+ },
+ "homepage": "https://github.com/TooTallNate/util-deprecate",
+ "gitHead": "475fb6857cd23fafff20c1be846c1350abf8e6d4",
+ "_id": "util-deprecate@1.0.2",
+ "_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf",
+ "_from": "util-deprecate@>=1.0.1 <1.1.0",
+ "_npmVersion": "2.14.4",
+ "_nodeVersion": "4.1.2",
+ "_npmUser": {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ },
+ "maintainers": [
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ }
+ ],
+ "dist": {
+ "shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf",
+ "tarball": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/package.json
new file mode 100644
index 0000000..8987548
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/package.json
@@ -0,0 +1,92 @@
+{
+ "name": "readable-stream",
+ "version": "2.1.5",
+ "description": "Streams3, a user-land copy of the stream library from Node.js",
+ "main": "readable.js",
+ "dependencies": {
+ "buffer-shims": "^1.0.0",
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.1",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~1.0.6",
+ "string_decoder": "~0.10.x",
+ "util-deprecate": "~1.0.1"
+ },
+ "devDependencies": {
+ "assert": "~1.4.0",
+ "babel-polyfill": "^6.9.1",
+ "nyc": "^6.4.0",
+ "tap": "~0.7.1",
+ "tape": "~4.5.1",
+ "zuul": "~3.10.0"
+ },
+ "scripts": {
+ "test": "tap test/parallel/*.js test/ours/*.js",
+ "browser": "npm run write-zuul && zuul --browser-retries 2 -- test/browser.js",
+ "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml",
+ "local": "zuul --local 3000 --no-coverage -- test/browser.js",
+ "cover": "nyc npm test",
+ "report": "nyc report --reporter=lcov"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/readable-stream.git"
+ },
+ "keywords": [
+ "readable",
+ "stream",
+ "pipe"
+ ],
+ "browser": {
+ "util": false
+ },
+ "nyc": {
+ "include": [
+ "lib/**.js"
+ ]
+ },
+ "license": "MIT",
+ "gitHead": "758c8b3845af855fde736b6a7f58a15fba00d1e7",
+ "bugs": {
+ "url": "https://github.com/nodejs/readable-stream/issues"
+ },
+ "_id": "readable-stream@2.1.5",
+ "_shasum": "66fa8b720e1438b364681f2ad1a63c618448c9d0",
+ "_from": "readable-stream@2.1.5",
+ "_npmVersion": "3.8.6",
+ "_nodeVersion": "5.12.0",
+ "_npmUser": {
+ "name": "cwmma",
+ "email": "calvin.metcalf@gmail.com"
+ },
+ "dist": {
+ "shasum": "66fa8b720e1438b364681f2ad1a63c618448c9d0",
+ "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "isaacs@npmjs.com"
+ },
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ },
+ {
+ "name": "rvagg",
+ "email": "rod@vagg.org"
+ },
+ {
+ "name": "cwmma",
+ "email": "calvin.metcalf@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/readable-stream-2.1.5.tgz_1471463532993_0.15824943827465177"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz",
+ "readme": "ERROR: No README data found!",
+ "homepage": "https://github.com/nodejs/readable-stream#readme"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/passthrough.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/passthrough.js
new file mode 100644
index 0000000..27e8d8a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/passthrough.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_passthrough.js")
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/readable.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/readable.js
new file mode 100644
index 0000000..be2688a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/readable.js
@@ -0,0 +1,16 @@
+var Stream = (function (){
+ try {
+ return require('st' + 'ream'); // hack to fix a circular dependency issue when used with browserify
+ } catch(_){}
+}());
+exports = module.exports = require('./lib/_stream_readable.js');
+exports.Stream = Stream || exports;
+exports.Readable = exports;
+exports.Writable = require('./lib/_stream_writable.js');
+exports.Duplex = require('./lib/_stream_duplex.js');
+exports.Transform = require('./lib/_stream_transform.js');
+exports.PassThrough = require('./lib/_stream_passthrough.js');
+
+if (!process.browser && process.env.READABLE_STREAM === 'disable' && Stream) {
+ module.exports = Stream;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/transform.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/transform.js
new file mode 100644
index 0000000..5d482f0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/transform.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_transform.js")
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/writable.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/writable.js
new file mode 100644
index 0000000..e1e9efd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/node_modules/readable-stream/writable.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_writable.js")
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/package.json
new file mode 100644
index 0000000..0531da6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/package.json
@@ -0,0 +1,92 @@
+{
+ "name": "mongodb",
+ "version": "2.2.16",
+ "description": "The official MongoDB driver for Node.js",
+ "main": "index.js",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/mongodb/node-mongodb-native.git"
+ },
+ "keywords": [
+ "mongodb",
+ "driver",
+ "official"
+ ],
+ "dependencies": {
+ "es6-promise": "3.2.1",
+ "mongodb-core": "2.1.2",
+ "readable-stream": "2.1.5"
+ },
+ "devDependencies": {
+ "JSONStream": "^1.0.7",
+ "betterbenchmarks": "^0.1.0",
+ "bluebird": "3.4.6",
+ "bson": "1.0.0",
+ "cli-table": "^0.3.1",
+ "co": "4.6.0",
+ "colors": "^1.1.2",
+ "coveralls": "^2.11.6",
+ "eslint": "^3.8.1",
+ "event-stream": "^3.3.2",
+ "gleak": "0.5.0",
+ "integra": "0.1.8",
+ "jsdoc": "3.4.0",
+ "ldjson-stream": "^1.2.1",
+ "mongodb-extended-json": "1.7.1",
+ "mongodb-topology-manager": "1.0.x",
+ "mongodb-version-manager": "github:christkv/mongodb-version-manager#master",
+ "nyc": "^8.1.0",
+ "optimist": "0.6.1",
+ "rimraf": "2.5.4",
+ "semver": "5.3.0",
+ "worker-farm": "^1.3.1"
+ },
+ "author": {
+ "name": "Christian Kvalheim"
+ },
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=0.10.3"
+ },
+ "bugs": {
+ "url": "https://github.com/mongodb/node-mongodb-native/issues"
+ },
+ "scripts": {
+ "test": "node test/runner.js -t functional -l",
+ "coverage": "nyc node test/runner.js -t functional && node_modules/.bin/nyc report --reporter=text-lcov | node_modules/.bin/coveralls",
+ "lint": "eslint lib"
+ },
+ "nyc": {
+ "include": [
+ "lib/**/*.js"
+ ]
+ },
+ "homepage": "https://github.com/mongodb/node-mongodb-native",
+ "gitHead": "28da548dc2a1729a23e07418134dea88bf1e1c68",
+ "_id": "mongodb@2.2.16",
+ "_shasum": "e32ba91cf9e29f371fb38ba0c4a71c3b1f5fae77",
+ "_from": "mongodb@latest",
+ "_npmVersion": "3.10.8",
+ "_nodeVersion": "6.9.1",
+ "_npmUser": {
+ "name": "christkv",
+ "email": "christkv@gmail.com"
+ },
+ "dist": {
+ "shasum": "e32ba91cf9e29f371fb38ba0c4a71c3b1f5fae77",
+ "tarball": "https://registry.npmjs.org/mongodb/-/mongodb-2.2.16.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "christkv",
+ "email": "christkv@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-18-east.internal.npmjs.com",
+ "tmp": "tmp/mongodb-2.2.16.tgz_1481656381868_0.36485050874762237"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mongodb/-/mongodb-2.2.16.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/yarn.lock b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/yarn.lock
new file mode 100644
index 0000000..d9f5a70
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongodb/yarn.lock
@@ -0,0 +1,3184 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+acorn-jsx@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b"
+ dependencies:
+ acorn "^3.0.4"
+
+acorn@^3.0.4:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a"
+
+acorn@^4.0.1:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.3.tgz#1a3e850b428e73ba6b09d1cc527f5aaad4d03ef1"
+
+ajv-keywords@^1.0.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.1.1.tgz#02550bc605a3e576041565628af972e06c549d50"
+
+ajv@^4.7.0:
+ version "4.9.0"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.9.0.tgz#5a358085747b134eb567d6d15e015f1d7802f45c"
+ dependencies:
+ co "^4.6.0"
+ json-stable-stringify "^1.0.1"
+
+align-text@^0.1.1, align-text@^0.1.3:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
+ dependencies:
+ kind-of "^3.0.2"
+ longest "^1.0.1"
+ repeat-string "^1.5.2"
+
+amdefine@>=0.0.4:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
+
+ampersand-events@^2.0.1:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/ampersand-events/-/ampersand-events-2.0.2.tgz#f402bc2e18305fabd995dbdcd3b7057bbdd7d347"
+ dependencies:
+ ampersand-version "^1.0.2"
+ lodash "^4.6.1"
+
+ampersand-state@^5.0.1:
+ version "5.0.2"
+ resolved "https://registry.yarnpkg.com/ampersand-state/-/ampersand-state-5.0.2.tgz#16830def866c644ecd21da8c8ba8717aa2b8d23c"
+ dependencies:
+ ampersand-events "^2.0.1"
+ ampersand-version "^1.0.0"
+ array-next "~0.0.1"
+ key-tree-store "^1.3.0"
+ lodash "^4.11.1"
+
+ampersand-version@^1.0.0, ampersand-version@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/ampersand-version/-/ampersand-version-1.0.2.tgz#ff8f3d4ceac4d32ccd83f6bd6697397f7b59e2c0"
+ dependencies:
+ find-root "^0.1.1"
+ through2 "^0.6.3"
+
+ansi-escapes@^1.1.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e"
+
+ansi-regex@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.0.0.tgz#c5061b6e0ef8a81775e50f5d66151bf6bf371107"
+
+ansi-styles@^2.2.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
+
+ansi@^0.3.0, ansi@~0.3.0:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/ansi/-/ansi-0.3.1.tgz#0c42d4fb17160d5a9af1e484bace1c66922c1b21"
+
+append-transform@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.3.0.tgz#d6933ce4a85f09445d9ccc4cc119051b7381a813"
+
+archy@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40"
+
+are-we-there-yet@~1.0.0:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.0.6.tgz#a2d28c93102aa6cc96245a26cb954de06ec53f0c"
+ dependencies:
+ delegates "^1.0.0"
+ readable-stream "^2.0.0 || ^1.1.13"
+
+argparse@^1.0.7:
+ version "1.0.9"
+ resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86"
+ dependencies:
+ sprintf-js "~1.0.2"
+
+arr-diff@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
+ dependencies:
+ arr-flatten "^1.0.1"
+
+arr-flatten@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.1.tgz#e5ffe54d45e19f32f216e91eb99c8ce892bb604b"
+
+array-find-index@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1"
+
+array-next@~0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/array-next/-/array-next-0.0.1.tgz#e5e4660a4c27fda8151ff7764275d00900062be1"
+
+array-union@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
+ dependencies:
+ array-uniq "^1.0.1"
+
+array-uniq@^1.0.1:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
+
+array-unique@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53"
+
+arrify@^1.0.0, arrify@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
+
+asn1@~0.2.3:
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86"
+
+assert-plus@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234"
+
+assert-plus@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
+
+async@^1.4.0, async@^1.4.2, async@^1.5.0, async@~1.5.0:
+ version "1.5.2"
+ resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
+
+async@~0.2.6:
+ version "0.2.10"
+ resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1"
+
+async@~1.4.0:
+ version "1.4.2"
+ resolved "https://registry.yarnpkg.com/async/-/async-1.4.2.tgz#6c9edcb11ced4f0dd2f2d40db0d49a109c088aab"
+
+asynckit@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
+
+aws-sign2@~0.6.0:
+ version "0.6.0"
+ resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f"
+
+aws4@^1.2.1:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755"
+
+babel-code-frame@^6.16.0:
+ version "6.16.0"
+ resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.16.0.tgz#f90e60da0862909d3ce098733b5d3987c97cb8de"
+ dependencies:
+ chalk "^1.1.0"
+ esutils "^2.0.2"
+ js-tokens "^2.0.0"
+
+babel-core@^6.10.4, babel-core@^6.18.0, babel-core@^6.2.1:
+ version "6.18.2"
+ resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.18.2.tgz#d8bb14dd6986fa4f3566a26ceda3964fa0e04e5b"
+ dependencies:
+ babel-code-frame "^6.16.0"
+ babel-generator "^6.18.0"
+ babel-helpers "^6.16.0"
+ babel-messages "^6.8.0"
+ babel-register "^6.18.0"
+ babel-runtime "^6.9.1"
+ babel-template "^6.16.0"
+ babel-traverse "^6.18.0"
+ babel-types "^6.18.0"
+ babylon "^6.11.0"
+ convert-source-map "^1.1.0"
+ debug "^2.1.1"
+ json5 "^0.5.0"
+ lodash "^4.2.0"
+ minimatch "^3.0.2"
+ path-is-absolute "^1.0.0"
+ private "^0.1.6"
+ slash "^1.0.0"
+ source-map "^0.5.0"
+
+babel-generator@^6.18.0:
+ version "6.19.0"
+ resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.19.0.tgz#9b2f244204777a3d6810ec127c673c87b349fac5"
+ dependencies:
+ babel-messages "^6.8.0"
+ babel-runtime "^6.9.0"
+ babel-types "^6.19.0"
+ detect-indent "^4.0.0"
+ jsesc "^1.3.0"
+ lodash "^4.2.0"
+ source-map "^0.5.0"
+
+babel-helpers@^6.16.0:
+ version "6.16.0"
+ resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.16.0.tgz#1095ec10d99279460553e67eb3eee9973d3867e3"
+ dependencies:
+ babel-runtime "^6.0.0"
+ babel-template "^6.16.0"
+
+babel-messages@^6.8.0:
+ version "6.8.0"
+ resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.8.0.tgz#bf504736ca967e6d65ef0adb5a2a5f947c8e0eb9"
+ dependencies:
+ babel-runtime "^6.0.0"
+
+babel-polyfill@^6.2.0, babel-polyfill@^6.9.1:
+ version "6.16.0"
+ resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.16.0.tgz#2d45021df87e26a374b6d4d1a9c65964d17f2422"
+ dependencies:
+ babel-runtime "^6.9.1"
+ core-js "^2.4.0"
+ regenerator-runtime "^0.9.5"
+
+babel-register@^6.18.0:
+ version "6.18.0"
+ resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.18.0.tgz#892e2e03865078dd90ad2c715111ec4449b32a68"
+ dependencies:
+ babel-core "^6.18.0"
+ babel-runtime "^6.11.6"
+ core-js "^2.4.0"
+ home-or-tmp "^2.0.0"
+ lodash "^4.2.0"
+ mkdirp "^0.5.1"
+ source-map-support "^0.4.2"
+
+babel-runtime@^6.0.0, babel-runtime@^6.11.6, babel-runtime@^6.9.0, babel-runtime@^6.9.1:
+ version "6.18.0"
+ resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.18.0.tgz#0f4177ffd98492ef13b9f823e9994a02584c9078"
+ dependencies:
+ core-js "^2.4.0"
+ regenerator-runtime "^0.9.5"
+
+babel-template@^6.16.0:
+ version "6.16.0"
+ resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.16.0.tgz#e149dd1a9f03a35f817ddbc4d0481988e7ebc8ca"
+ dependencies:
+ babel-runtime "^6.9.0"
+ babel-traverse "^6.16.0"
+ babel-types "^6.16.0"
+ babylon "^6.11.0"
+ lodash "^4.2.0"
+
+babel-traverse@^6.16.0, babel-traverse@^6.18.0:
+ version "6.19.0"
+ resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.19.0.tgz#68363fb821e26247d52a519a84b2ceab8df4f55a"
+ dependencies:
+ babel-code-frame "^6.16.0"
+ babel-messages "^6.8.0"
+ babel-runtime "^6.9.0"
+ babel-types "^6.19.0"
+ babylon "^6.11.0"
+ debug "^2.2.0"
+ globals "^9.0.0"
+ invariant "^2.2.0"
+ lodash "^4.2.0"
+
+babel-types@^6.16.0, babel-types@^6.18.0, babel-types@^6.19.0:
+ version "6.19.0"
+ resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.19.0.tgz#8db2972dbed01f1192a8b602ba1e1e4c516240b9"
+ dependencies:
+ babel-runtime "^6.9.1"
+ esutils "^2.0.2"
+ lodash "^4.2.0"
+ to-fast-properties "^1.0.1"
+
+babylon@^6.11.0, babylon@^6.13.0:
+ version "6.14.1"
+ resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.14.1.tgz#956275fab72753ad9b3435d7afe58f8bf0a29815"
+
+balanced-match@^0.4.1:
+ version "0.4.2"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
+
+bcrypt-pbkdf@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4"
+ dependencies:
+ tweetnacl "^0.14.3"
+
+betterbenchmarks@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/betterbenchmarks/-/betterbenchmarks-0.1.0.tgz#c07ac937e215d3d7a91a460eefb039b7c9002e43"
+ dependencies:
+ babel-core "^6.2.1"
+ babel-polyfill "^6.2.0"
+ cli-table "^0.3.1"
+ co "^4.6.0"
+ colors "^1.1.2"
+ fast-stats "0.0.3"
+ table "^3.7.4"
+
+"binary@>= 0.3.0 < 1":
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/binary/-/binary-0.3.0.tgz#9f60553bc5ce8c3386f3b553cff47462adecaa79"
+ dependencies:
+ buffers "~0.1.1"
+ chainsaw "~0.1.0"
+
+bl@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/bl/-/bl-1.1.2.tgz#fdca871a99713aa00d19e3bbba41c44787a65398"
+ dependencies:
+ readable-stream "~2.0.5"
+
+block-stream@*:
+ version "0.0.9"
+ resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a"
+ dependencies:
+ inherits "~2.0.0"
+
+bluebird@^3.4.1, bluebird@3.4.6:
+ version "3.4.6"
+ resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.6.tgz#01da8d821d87813d158967e743d5fe6c62cf8c0f"
+
+bluebird@~2.9.34:
+ version "2.9.34"
+ resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-2.9.34.tgz#2f7b4ec80216328a9fddebdf69c8d4942feff7d8"
+
+boolbase@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
+
+boom@2.x.x:
+ version "2.10.1"
+ resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f"
+ dependencies:
+ hoek "2.x.x"
+
+brace-expansion@^1.0.0:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9"
+ dependencies:
+ balanced-match "^0.4.1"
+ concat-map "0.0.1"
+
+braces@^1.8.2:
+ version "1.8.5"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7"
+ dependencies:
+ expand-range "^1.8.1"
+ preserve "^0.2.0"
+ repeat-element "^1.1.2"
+
+bson@^0.5.2, bson@~0.5.6:
+ version "0.5.7"
+ resolved "https://registry.yarnpkg.com/bson/-/bson-0.5.7.tgz#0d11fe0936c1fee029e11f7063f5d0ab2422ea3e"
+
+bson@~0.4.23:
+ version "0.4.23"
+ resolved "https://registry.yarnpkg.com/bson/-/bson-0.4.23.tgz#e65a2e3c7507ffade4109bc7575a76e50f8da915"
+
+bson@~1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/bson/-/bson-1.0.1.tgz#3a5addb0f2ff88bc3436e708e4bdb8637602d72d"
+
+bson@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/bson/-/bson-1.0.0.tgz#4d95affb53990c863b8fc9f5ba1fa8f478e7ebab"
+
+buffer-shims@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51"
+
+buffers@~0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/buffers/-/buffers-0.1.1.tgz#b24579c3bed4d6d396aeee6d9a8ae7f5482ab7bb"
+
+builtin-modules@^1.0.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
+
+caching-transform@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/caching-transform/-/caching-transform-1.0.1.tgz#6dbdb2f20f8d8fbce79f3e94e9d1742dcdf5c0a1"
+ dependencies:
+ md5-hex "^1.2.0"
+ mkdirp "^0.5.1"
+ write-file-atomic "^1.1.4"
+
+caller-path@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f"
+ dependencies:
+ callsites "^0.2.0"
+
+callsites@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca"
+
+camelcase-keys@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7"
+ dependencies:
+ camelcase "^2.0.0"
+ map-obj "^1.0.0"
+
+camelcase@^1.0.2:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
+
+camelcase@^2.0.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f"
+
+camelcase@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a"
+
+caseless@~0.11.0:
+ version "0.11.0"
+ resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7"
+
+catharsis@~0.8.7:
+ version "0.8.8"
+ resolved "https://registry.yarnpkg.com/catharsis/-/catharsis-0.8.8.tgz#693479f43aac549d806bd73e924cd0d944951a06"
+ dependencies:
+ underscore-contrib "~0.3.0"
+
+center-align@^0.1.1:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad"
+ dependencies:
+ align-text "^0.1.3"
+ lazy-cache "^1.0.3"
+
+chainsaw@~0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/chainsaw/-/chainsaw-0.1.0.tgz#5eab50b28afe58074d0d58291388828b5e5fbc98"
+ dependencies:
+ traverse ">=0.3.0 <0.4"
+
+chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
+ dependencies:
+ ansi-styles "^2.2.1"
+ escape-string-regexp "^1.0.2"
+ has-ansi "^2.0.0"
+ strip-ansi "^3.0.0"
+ supports-color "^2.0.0"
+
+cheerio@^0.19.0:
+ version "0.19.0"
+ resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.19.0.tgz#772e7015f2ee29965096d71ea4175b75ab354925"
+ dependencies:
+ css-select "~1.0.0"
+ dom-serializer "~0.1.0"
+ entities "~1.1.1"
+ htmlparser2 "~3.8.1"
+ lodash "^3.2.0"
+
+circular-json@^0.3.0:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d"
+
+cli-cursor@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987"
+ dependencies:
+ restore-cursor "^1.0.1"
+
+cli-table@^0.3.1:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23"
+ dependencies:
+ colors "1.0.3"
+
+cli-width@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a"
+
+cliui@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
+ dependencies:
+ center-align "^0.1.1"
+ right-align "^0.1.1"
+ wordwrap "0.0.2"
+
+cliui@^3.2.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d"
+ dependencies:
+ string-width "^1.0.1"
+ strip-ansi "^3.0.1"
+ wrap-ansi "^2.0.0"
+
+co@^4.6.0, co@4.6.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
+
+code-point-at@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
+
+colors@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63"
+
+colors@1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b"
+
+combined-stream@^1.0.5, combined-stream@~1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009"
+ dependencies:
+ delayed-stream "~1.0.0"
+
+commander@^2.9.0:
+ version "2.9.0"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4"
+ dependencies:
+ graceful-readlink ">= 1.0.0"
+
+commondir@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
+
+concat-map@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
+
+concat-stream@^1.4.6:
+ version "1.5.2"
+ resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266"
+ dependencies:
+ inherits "~2.0.1"
+ readable-stream "~2.0.0"
+ typedarray "~0.0.5"
+
+convert-source-map@^1.1.0, convert-source-map@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.3.0.tgz#e9f3e9c6e2728efc2676696a70eb382f73106a67"
+
+core-js@^2.4.0:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e"
+
+core-util-is@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
+
+coveralls@^2.11.6:
+ version "2.11.15"
+ resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-2.11.15.tgz#37d3474369d66c14f33fa73a9d25cee6e099fca0"
+ dependencies:
+ js-yaml "3.6.1"
+ lcov-parse "0.0.10"
+ log-driver "1.2.5"
+ minimist "1.2.0"
+ request "2.75.0"
+
+cross-spawn@^4:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41"
+ dependencies:
+ lru-cache "^4.0.1"
+ which "^1.2.9"
+
+cryptiles@2.x.x:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8"
+ dependencies:
+ boom "2.x.x"
+
+css-select@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.0.0.tgz#b1121ca51848dd264e2244d058cee254deeb44b0"
+ dependencies:
+ boolbase "~1.0.0"
+ css-what "1.0"
+ domutils "1.4"
+ nth-check "~1.0.0"
+
+css-what@1.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/css-what/-/css-what-1.0.0.tgz#d7cc2df45180666f99d2b14462639469e00f736c"
+
+currently-unhandled@^0.4.1:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea"
+ dependencies:
+ array-find-index "^1.0.1"
+
+d@^0.1.1, d@~0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/d/-/d-0.1.1.tgz#da184c535d18d8ee7ba2aa229b914009fae11309"
+ dependencies:
+ es5-ext "~0.10.2"
+
+dashdash@^1.12.0:
+ version "1.14.0"
+ resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.0.tgz#29e486c5418bf0f356034a993d51686a33e84141"
+ dependencies:
+ assert-plus "^1.0.0"
+
+debug@^2.1.1, debug@^2.1.3, debug@^2.2.0:
+ version "2.3.2"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-2.3.2.tgz#94cb466ef7d6d2c7e5245cdd6e4104f2d0d70d30"
+ dependencies:
+ ms "0.7.2"
+
+debug@~2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da"
+ dependencies:
+ ms "0.7.1"
+
+decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
+
+deep-is@~0.1.3:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
+
+default-require-extensions@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8"
+ dependencies:
+ strip-bom "^2.0.0"
+
+del@^2.0.2:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8"
+ dependencies:
+ globby "^5.0.0"
+ is-path-cwd "^1.0.0"
+ is-path-in-cwd "^1.0.0"
+ object-assign "^4.0.1"
+ pify "^2.0.0"
+ pinkie-promise "^2.0.0"
+ rimraf "^2.2.8"
+
+delayed-stream@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
+
+delegates@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
+
+detect-indent@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208"
+ dependencies:
+ repeating "^2.0.0"
+
+docopt@~0.6.2:
+ version "0.6.2"
+ resolved "https://registry.yarnpkg.com/docopt/-/docopt-0.6.2.tgz#b28e9e2220da5ec49f7ea5bb24a47787405eeb11"
+
+doctrine@^1.2.2:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa"
+ dependencies:
+ esutils "^2.0.2"
+ isarray "^1.0.0"
+
+dom-serializer@~0.1.0, dom-serializer@0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82"
+ dependencies:
+ domelementtype "~1.1.1"
+ entities "~1.1.1"
+
+domelementtype@~1.1.1:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b"
+
+domelementtype@1:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2"
+
+domhandler@2.3:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.3.0.tgz#2de59a0822d5027fabff6f032c2b25a2a8abe738"
+ dependencies:
+ domelementtype "1"
+
+domutils@1.4:
+ version "1.4.3"
+ resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.4.3.tgz#0865513796c6b306031850e175516baf80b72a6f"
+ dependencies:
+ domelementtype "1"
+
+domutils@1.5:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf"
+ dependencies:
+ dom-serializer "0"
+ domelementtype "1"
+
+downcache@0.0.8:
+ version "0.0.8"
+ resolved "https://registry.yarnpkg.com/downcache/-/downcache-0.0.8.tgz#332320dde5806ea55d2e6d2ea674990bda4e8b75"
+ dependencies:
+ extend "2.0.x"
+ graceful-fs "2.0.3"
+ limiter "1.0.x"
+ mkdirp "~0.3.5"
+ npmlog "1.0.0"
+ request "^2.34.0"
+
+duplexer@~0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1"
+
+ecc-jsbn@~0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505"
+ dependencies:
+ jsbn "~0.1.0"
+
+entities@~1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0"
+
+entities@1.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/entities/-/entities-1.0.0.tgz#b2987aa3821347fcde642b24fdfc9e4fb712bf26"
+
+"errno@>=0.1.1 <0.2.0-0":
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d"
+ dependencies:
+ prr "~0.0.0"
+
+error-ex@^1.2.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.0.tgz#e67b43f3e82c96ea3a584ffee0b9fc3325d802d9"
+ dependencies:
+ is-arrayish "^0.2.1"
+
+es5-ext@^0.10.7, es5-ext@^0.10.8, es5-ext@~0.10.11, es5-ext@~0.10.2, es5-ext@~0.10.7:
+ version "0.10.12"
+ resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.12.tgz#aa84641d4db76b62abba5e45fd805ecbab140047"
+ dependencies:
+ es6-iterator "2"
+ es6-symbol "~3.1"
+
+es6-iterator@2:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.0.tgz#bd968567d61635e33c0b80727613c9cb4b096bac"
+ dependencies:
+ d "^0.1.1"
+ es5-ext "^0.10.7"
+ es6-symbol "3"
+
+es6-map@^0.1.3:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.4.tgz#a34b147be224773a4d7da8072794cefa3632b897"
+ dependencies:
+ d "~0.1.1"
+ es5-ext "~0.10.11"
+ es6-iterator "2"
+ es6-set "~0.1.3"
+ es6-symbol "~3.1.0"
+ event-emitter "~0.3.4"
+
+es6-promise@^3.2.1:
+ version "3.3.1"
+ resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613"
+
+es6-promise@3.2.1:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.2.1.tgz#ec56233868032909207170c39448e24449dd1fc4"
+
+es6-set@~0.1.3:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.4.tgz#9516b6761c2964b92ff479456233a247dc707ce8"
+ dependencies:
+ d "~0.1.1"
+ es5-ext "~0.10.11"
+ es6-iterator "2"
+ es6-symbol "3"
+ event-emitter "~0.3.4"
+
+es6-symbol@~3.1, es6-symbol@~3.1.0, es6-symbol@3:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.0.tgz#94481c655e7a7cad82eba832d97d5433496d7ffa"
+ dependencies:
+ d "~0.1.1"
+ es5-ext "~0.10.11"
+
+es6-weak-map@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.1.tgz#0d2bbd8827eb5fb4ba8f97fbfea50d43db21ea81"
+ dependencies:
+ d "^0.1.1"
+ es5-ext "^0.10.8"
+ es6-iterator "2"
+ es6-symbol "3"
+
+escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5, escape-string-regexp@~1.0.3:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
+
+escodegen@1.1.x:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.1.0.tgz#c663923f6e20aad48d0c0fa49f31c6d4f49360cf"
+ dependencies:
+ esprima "~1.0.4"
+ estraverse "~1.5.0"
+ esutils "~1.0.0"
+ optionalDependencies:
+ source-map "~0.1.30"
+
+escope@^3.6.0:
+ version "3.6.0"
+ resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3"
+ dependencies:
+ es6-map "^0.1.3"
+ es6-weak-map "^2.0.1"
+ esrecurse "^4.1.0"
+ estraverse "^4.1.1"
+
+eslint@^3.8.1:
+ version "3.10.2"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.10.2.tgz#c9a10e8bf6e9d65651204778c503341f1eac3ce7"
+ dependencies:
+ babel-code-frame "^6.16.0"
+ chalk "^1.1.3"
+ concat-stream "^1.4.6"
+ debug "^2.1.1"
+ doctrine "^1.2.2"
+ escope "^3.6.0"
+ espree "^3.3.1"
+ estraverse "^4.2.0"
+ esutils "^2.0.2"
+ file-entry-cache "^2.0.0"
+ glob "^7.0.3"
+ globals "^9.2.0"
+ ignore "^3.2.0"
+ imurmurhash "^0.1.4"
+ inquirer "^0.12.0"
+ is-my-json-valid "^2.10.0"
+ is-resolvable "^1.0.0"
+ js-yaml "^3.5.1"
+ json-stable-stringify "^1.0.0"
+ levn "^0.3.0"
+ lodash "^4.0.0"
+ mkdirp "^0.5.0"
+ natural-compare "^1.4.0"
+ optionator "^0.8.2"
+ path-is-inside "^1.0.1"
+ pluralize "^1.2.1"
+ progress "^1.1.8"
+ require-uncached "^1.0.2"
+ shelljs "^0.7.5"
+ strip-bom "^3.0.0"
+ strip-json-comments "~1.0.1"
+ table "^3.7.8"
+ text-table "~0.2.0"
+ user-home "^2.0.0"
+
+espree@^3.3.1:
+ version "3.3.2"
+ resolved "https://registry.yarnpkg.com/espree/-/espree-3.3.2.tgz#dbf3fadeb4ecb4d4778303e50103b3d36c88b89c"
+ dependencies:
+ acorn "^4.0.1"
+ acorn-jsx "^3.0.0"
+
+espree@~2.2.3:
+ version "2.2.5"
+ resolved "https://registry.yarnpkg.com/espree/-/espree-2.2.5.tgz#df691b9310889402aeb29cc066708c56690b854b"
+
+esprima@^2.6.0:
+ version "2.7.3"
+ resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"
+
+esprima@~1.0.4, esprima@1.0.x:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.0.4.tgz#9f557e08fc3b4d26ece9dd34f8fbf476b62585ad"
+
+esrecurse@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220"
+ dependencies:
+ estraverse "~4.1.0"
+ object-assign "^4.0.1"
+
+estraverse@^4.1.1, estraverse@^4.2.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13"
+
+estraverse@~1.5.0:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.5.1.tgz#867a3e8e58a9f84618afb6c2ddbcd916b7cbaf71"
+
+estraverse@~4.1.0:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2"
+
+esutils@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
+
+esutils@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/esutils/-/esutils-1.0.0.tgz#8151d358e20c8acc7fb745e7472c0025fe496570"
+
+event-emitter@~0.3.4:
+ version "0.3.4"
+ resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.4.tgz#8d63ddfb4cfe1fae3b32ca265c4c720222080bb5"
+ dependencies:
+ d "~0.1.1"
+ es5-ext "~0.10.7"
+
+event-stream@^3.3.1, event-stream@^3.3.2:
+ version "3.3.4"
+ resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571"
+ dependencies:
+ duplexer "~0.1.1"
+ from "~0"
+ map-stream "~0.1.0"
+ pause-stream "0.0.11"
+ split "0.3"
+ stream-combiner "~0.0.4"
+ through "~2.3.1"
+
+exit-hook@^1.0.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8"
+
+expand-brackets@^0.1.4:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
+ dependencies:
+ is-posix-bracket "^0.1.0"
+
+expand-range@^1.8.1:
+ version "1.8.2"
+ resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337"
+ dependencies:
+ fill-range "^2.1.0"
+
+extend@~3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4"
+
+extend@2.0.x:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/extend/-/extend-2.0.1.tgz#1ee8010689e7395ff9448241c98652bc759a8260"
+
+extglob@^0.3.1:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1"
+ dependencies:
+ is-extglob "^1.0.0"
+
+extsprintf@1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550"
+
+fast-levenshtein@~2.0.4:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.5.tgz#bd33145744519ab1c36c3ee9f31f08e9079b67f2"
+
+fast-stats@0.0.3:
+ version "0.0.3"
+ resolved "https://registry.yarnpkg.com/fast-stats/-/fast-stats-0.0.3.tgz#650af963c3ff85c496a3610f20d40cd4c164594d"
+
+figures@^1.3.5, figures@^1.4.0:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e"
+ dependencies:
+ escape-string-regexp "^1.0.5"
+ object-assign "^4.1.0"
+
+file-entry-cache@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361"
+ dependencies:
+ flat-cache "^1.2.1"
+ object-assign "^4.0.1"
+
+filename-regex@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775"
+
+fill-range@^2.1.0:
+ version "2.2.3"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723"
+ dependencies:
+ is-number "^2.1.0"
+ isobject "^2.0.0"
+ randomatic "^1.1.3"
+ repeat-element "^1.1.2"
+ repeat-string "^1.5.2"
+
+find-cache-dir@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9"
+ dependencies:
+ commondir "^1.0.1"
+ mkdirp "^0.5.1"
+ pkg-dir "^1.0.0"
+
+find-root@^0.1.1:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/find-root/-/find-root-0.1.2.tgz#98d2267cff1916ccaf2743b3a0eea81d79d7dcd1"
+
+find-up@^1.0.0, find-up@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
+ dependencies:
+ path-exists "^2.0.0"
+ pinkie-promise "^2.0.0"
+
+flat-cache@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.1.tgz#6c837d6225a7de5659323740b36d5361f71691ff"
+ dependencies:
+ circular-json "^0.3.0"
+ del "^2.0.2"
+ graceful-fs "^4.1.2"
+ write "^0.2.1"
+
+for-in@^0.1.5:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.6.tgz#c9f96e89bfad18a545af5ec3ed352a1d9e5b4dc8"
+
+for-own@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.4.tgz#0149b41a39088c7515f51ebe1c1386d45f935072"
+ dependencies:
+ for-in "^0.1.5"
+
+foreground-child@^1.3.3, foreground-child@^1.5.3:
+ version "1.5.3"
+ resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-1.5.3.tgz#94dd6aba671389867de8e57e99f1c2ecfb15c01a"
+ dependencies:
+ cross-spawn "^4"
+ signal-exit "^3.0.0"
+
+forever-agent@~0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
+
+form-data@~2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.0.0.tgz#6f0aebadcc5da16c13e1ecc11137d85f9b883b25"
+ dependencies:
+ asynckit "^0.4.0"
+ combined-stream "^1.0.5"
+ mime-types "^2.1.11"
+
+form-data@~2.1.1:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4"
+ dependencies:
+ asynckit "^0.4.0"
+ combined-stream "^1.0.5"
+ mime-types "^2.1.12"
+
+from@~0:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/from/-/from-0.1.3.tgz#ef63ac2062ac32acf7862e0d40b44b896f22f3bc"
+
+fs-extra@^0.22.1:
+ version "0.22.1"
+ resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.22.1.tgz#5fd6f8049dc976ca19eb2355d658173cabcce056"
+ dependencies:
+ graceful-fs "^4.1.2"
+ jsonfile "^2.1.0"
+ rimraf "^2.2.8"
+
+fs-extra@~0.30.0:
+ version "0.30.0"
+ resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0"
+ dependencies:
+ graceful-fs "^4.1.2"
+ jsonfile "^2.1.0"
+ klaw "^1.0.0"
+ path-is-absolute "^1.0.0"
+ rimraf "^2.2.8"
+
+fs.realpath@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
+
+fstream@^1.0.2:
+ version "1.0.10"
+ resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.10.tgz#604e8a92fe26ffd9f6fae30399d4984e1ab22822"
+ dependencies:
+ graceful-fs "^4.1.2"
+ inherits "~2.0.0"
+ mkdirp ">=0.5 0"
+ rimraf "2"
+
+"fstream@>= 0.1.30 < 1":
+ version "0.1.31"
+ resolved "https://registry.yarnpkg.com/fstream/-/fstream-0.1.31.tgz#7337f058fbbbbefa8c9f561a28cab0849202c988"
+ dependencies:
+ graceful-fs "~3.0.2"
+ inherits "~2.0.0"
+ mkdirp "0.5"
+ rimraf "2"
+
+gauge@~1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/gauge/-/gauge-1.0.2.tgz#53e25965dfaf1c85be3a2a0633306a24a67dc2f9"
+ dependencies:
+ ansi "^0.3.0"
+ has-unicode "^1.0.0"
+
+generate-function@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74"
+
+generate-object-property@^1.1.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0"
+ dependencies:
+ is-property "^1.0.0"
+
+get-caller-file@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5"
+
+get-mongodb-version@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/get-mongodb-version/-/get-mongodb-version-0.0.1.tgz#bc8aa433ba2fdd57fa33312dcf89f06f3a908caa"
+ dependencies:
+ debug "^2.2.0"
+ lodash.startswith "^3.0.1"
+ minimist "^1.1.1"
+ mongodb "^2.0.39"
+ which "^1.1.1"
+
+get-stdin@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"
+
+getpass@^0.1.1:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6"
+ dependencies:
+ assert-plus "^1.0.0"
+
+gleak@0.5.0:
+ version "0.5.0"
+ resolved "https://registry.yarnpkg.com/gleak/-/gleak-0.5.0.tgz#9cd7694be50d6dbeb842021ed8160814c51faddf"
+
+glob-base@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"
+ dependencies:
+ glob-parent "^2.0.0"
+ is-glob "^2.0.0"
+
+glob-parent@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28"
+ dependencies:
+ is-glob "^2.0.0"
+
+glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6:
+ version "7.1.1"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.2"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+globals@^9.0.0, globals@^9.2.0:
+ version "9.13.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-9.13.0.tgz#d97706b61600d8dbe94708c367d3fdcf48470b8f"
+
+globby@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d"
+ dependencies:
+ array-union "^1.0.1"
+ arrify "^1.0.0"
+ glob "^7.0.3"
+ object-assign "^4.0.1"
+ pify "^2.0.0"
+ pinkie-promise "^2.0.0"
+
+graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9:
+ version "4.1.10"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.10.tgz#f2d720c22092f743228775c75e3612632501f131"
+
+graceful-fs@~3.0.2:
+ version "3.0.11"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-3.0.11.tgz#7613c778a1afea62f25c630a086d7f3acbbdd818"
+ dependencies:
+ natives "^1.1.0"
+
+graceful-fs@2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-2.0.3.tgz#7cd2cdb228a4a3f36e95efa6cc142de7d1a136d0"
+
+"graceful-readlink@>= 1.0.0":
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
+
+handlebars@^4.0.3:
+ version "4.0.6"
+ resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.6.tgz#2ce4484850537f9c97a8026d5399b935c4ed4ed7"
+ dependencies:
+ async "^1.4.0"
+ optimist "^0.6.1"
+ source-map "^0.4.4"
+ optionalDependencies:
+ uglify-js "^2.6"
+
+handlebars@2.0.0-alpha.1:
+ version v2.0.0-alpha.1
+ resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-2.0.0-alpha.1.tgz#c4d149068c713de0afa7f45bbb88a2ca73715afd"
+ dependencies:
+ optimist "~0.3"
+ optionalDependencies:
+ uglify-js "~2.3"
+
+har-validator@~2.0.6:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d"
+ dependencies:
+ chalk "^1.1.1"
+ commander "^2.9.0"
+ is-my-json-valid "^2.12.4"
+ pinkie-promise "^2.0.0"
+
+has-ansi@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
+ dependencies:
+ ansi-regex "^2.0.0"
+
+has-flag@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
+
+has-unicode@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-1.0.1.tgz#c46fceea053eb8ec789bffbba25fca52dfdcf38e"
+
+hawk@~3.1.3:
+ version "3.1.3"
+ resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4"
+ dependencies:
+ boom "2.x.x"
+ cryptiles "2.x.x"
+ hoek "2.x.x"
+ sntp "1.x.x"
+
+hoek@2.x.x:
+ version "2.16.3"
+ resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed"
+
+home-or-tmp@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8"
+ dependencies:
+ os-homedir "^1.0.0"
+ os-tmpdir "^1.0.1"
+
+hosted-git-info@^2.1.4:
+ version "2.1.5"
+ resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.1.5.tgz#0ba81d90da2e25ab34a332e6ec77936e1598118b"
+
+htmlparser2@~3.8.1:
+ version "3.8.3"
+ resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.8.3.tgz#996c28b191516a8be86501a7d79757e5c70c1068"
+ dependencies:
+ domelementtype "1"
+ domhandler "2.3"
+ domutils "1.5"
+ entities "1.0"
+ readable-stream "1.1"
+
+http-signature@~1.1.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf"
+ dependencies:
+ assert-plus "^0.2.0"
+ jsprim "^1.2.2"
+ sshpk "^1.7.0"
+
+ignore@^3.2.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.0.tgz#8d88f03c3002a0ac52114db25d2c673b0bf1e435"
+
+imurmurhash@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
+
+indent-string@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80"
+ dependencies:
+ repeating "^2.0.0"
+
+inflight@^1.0.4:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
+ dependencies:
+ once "^1.3.0"
+ wrappy "1"
+
+inherits@~2.0.0, inherits@~2.0.1, inherits@2:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
+
+inquirer@^0.12.0:
+ version "0.12.0"
+ resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e"
+ dependencies:
+ ansi-escapes "^1.1.0"
+ ansi-regex "^2.0.0"
+ chalk "^1.0.0"
+ cli-cursor "^1.0.1"
+ cli-width "^2.0.0"
+ figures "^1.3.5"
+ lodash "^4.3.0"
+ readline2 "^1.0.1"
+ run-async "^0.1.0"
+ rx-lite "^3.1.2"
+ string-width "^1.0.1"
+ strip-ansi "^3.0.0"
+ through "^2.3.6"
+
+integra@0.1.8:
+ version "0.1.8"
+ resolved "https://registry.yarnpkg.com/integra/-/integra-0.1.8.tgz#8d5b8019f87ea3704e6c97da2c912e14ec3bece7"
+ dependencies:
+ escodegen "1.1.x"
+ esprima "1.0.x"
+ handlebars "2.0.0-alpha.1"
+ mkdirp latest
+ rimraf "2.2.6"
+
+interpret@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c"
+
+invariant@^2.2.0:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360"
+ dependencies:
+ loose-envify "^1.0.0"
+
+invert-kv@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6"
+
+is-arrayish@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
+
+is-buffer@^1.0.2:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.4.tgz#cfc86ccd5dc5a52fa80489111c6920c457e2d98b"
+
+is-builtin-module@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe"
+ dependencies:
+ builtin-modules "^1.0.0"
+
+is-dotfile@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d"
+
+is-equal-shallow@^0.1.3:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534"
+ dependencies:
+ is-primitive "^2.0.0"
+
+is-extendable@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
+
+is-extglob@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
+
+is-finite@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa"
+ dependencies:
+ number-is-nan "^1.0.0"
+
+is-fullwidth-code-point@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb"
+ dependencies:
+ number-is-nan "^1.0.0"
+
+is-fullwidth-code-point@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
+
+is-glob@^2.0.0, is-glob@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
+ dependencies:
+ is-extglob "^1.0.0"
+
+is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4:
+ version "2.15.0"
+ resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b"
+ dependencies:
+ generate-function "^2.0.0"
+ generate-object-property "^1.1.0"
+ jsonpointer "^4.0.0"
+ xtend "^4.0.0"
+
+is-number@^2.0.2, is-number@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
+ dependencies:
+ kind-of "^3.0.2"
+
+is-path-cwd@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d"
+
+is-path-in-cwd@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc"
+ dependencies:
+ is-path-inside "^1.0.0"
+
+is-path-inside@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f"
+ dependencies:
+ path-is-inside "^1.0.1"
+
+is-posix-bracket@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
+
+is-primitive@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575"
+
+is-property@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84"
+
+is-resolvable@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62"
+ dependencies:
+ tryit "^1.0.1"
+
+is-typedarray@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
+
+is-utf8@^0.2.0:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
+
+isarray@^1.0.0, isarray@~1.0.0, isarray@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
+
+isarray@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
+
+isexe@^1.1.1:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0"
+
+isobject@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
+ dependencies:
+ isarray "1.0.0"
+
+isstream@~0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
+
+istanbul-lib-coverage@^1.0.0, istanbul-lib-coverage@^1.0.0-alpha, istanbul-lib-coverage@^1.0.0-alpha.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.0.0.tgz#c3f9b6d226da12424064cce87fce0fb57fdfa7a2"
+
+istanbul-lib-hook@^1.0.0-alpha.4:
+ version "1.0.0-alpha.4"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.0.0-alpha.4.tgz#8c5bb9f6fbd8526e0ae6cf639af28266906b938f"
+ dependencies:
+ append-transform "^0.3.0"
+
+istanbul-lib-instrument@^1.2.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.3.0.tgz#19f0a973397454989b98330333063a5b56df0e58"
+ dependencies:
+ babel-generator "^6.18.0"
+ babel-template "^6.16.0"
+ babel-traverse "^6.18.0"
+ babel-types "^6.18.0"
+ babylon "^6.13.0"
+ istanbul-lib-coverage "^1.0.0"
+ semver "^5.3.0"
+
+istanbul-lib-report@^1.0.0-alpha.3:
+ version "1.0.0-alpha.3"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.0.0-alpha.3.tgz#32d5f6ec7f33ca3a602209e278b2e6ff143498af"
+ dependencies:
+ async "^1.4.2"
+ istanbul-lib-coverage "^1.0.0-alpha"
+ mkdirp "^0.5.1"
+ path-parse "^1.0.5"
+ rimraf "^2.4.3"
+ supports-color "^3.1.2"
+
+istanbul-lib-source-maps@^1.0.2:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.1.0.tgz#9d429218f35b823560ea300a96ff0c3bbdab785f"
+ dependencies:
+ istanbul-lib-coverage "^1.0.0-alpha.0"
+ mkdirp "^0.5.1"
+ rimraf "^2.4.4"
+ source-map "^0.5.3"
+
+istanbul-reports@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.0.0.tgz#24b4eb2b1d29d50f103b369bd422f6e640aa0777"
+ dependencies:
+ handlebars "^4.0.3"
+
+jodid25519@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967"
+ dependencies:
+ jsbn "~0.1.0"
+
+js-tokens@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-2.0.0.tgz#79903f5563ee778cc1162e6dcf1a0027c97f9cb5"
+
+js-yaml@^3.5.1:
+ version "3.7.0"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80"
+ dependencies:
+ argparse "^1.0.7"
+ esprima "^2.6.0"
+
+js-yaml@3.6.1:
+ version "3.6.1"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30"
+ dependencies:
+ argparse "^1.0.7"
+ esprima "^2.6.0"
+
+js2xmlparser@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/js2xmlparser/-/js2xmlparser-1.0.0.tgz#5a170f2e8d6476ce45405e04823242513782fe30"
+
+jsbn@~0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd"
+
+jsdoc@3.4.0:
+ version "3.4.0"
+ resolved "https://registry.yarnpkg.com/jsdoc/-/jsdoc-3.4.0.tgz#341cdb06e44a113d9541efd212c95a488064e9ee"
+ dependencies:
+ async "~1.4.0"
+ bluebird "~2.9.34"
+ catharsis "~0.8.7"
+ escape-string-regexp "~1.0.3"
+ espree "~2.2.3"
+ js2xmlparser "~1.0.0"
+ marked "~0.3.4"
+ requizzle "~0.2.0"
+ strip-json-comments "~1.0.2"
+ taffydb "https://github.com/hegemonic/taffydb/tarball/7d100bcee0e997ee4977e273cdce60bd8933050e"
+ underscore "~1.8.3"
+ wrench "~1.5.8"
+
+jsesc@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b"
+
+json-schema@0.2.3:
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
+
+json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af"
+ dependencies:
+ jsonify "~0.0.0"
+
+json-stringify-safe@~5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
+
+json5@^0.5.0:
+ version "0.5.0"
+ resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.0.tgz#9b20715b026cbe3778fd769edccd822d8332a5b2"
+
+jsonfile@^2.1.0:
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8"
+ optionalDependencies:
+ graceful-fs "^4.1.6"
+
+jsonify@~0.0.0:
+ version "0.0.0"
+ resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
+
+jsonparse@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.2.0.tgz#5c0c5685107160e72fe7489bddea0b44c2bc67bd"
+
+jsonpointer@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.0.tgz#6661e161d2fc445f19f98430231343722e1fcbd5"
+
+JSONStream@^1.0.7, JSONStream@^1.1.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.2.1.tgz#32aa5790e799481083b49b4b7fa94e23bae69bf9"
+ dependencies:
+ jsonparse "^1.2.0"
+ through ">=2.2.7 <3"
+
+jsprim@^1.2.2:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.3.1.tgz#2a7256f70412a29ee3670aaca625994c4dcff252"
+ dependencies:
+ extsprintf "1.0.2"
+ json-schema "0.2.3"
+ verror "1.3.6"
+
+kerberos@0.0.17:
+ version "0.0.17"
+ resolved "https://registry.yarnpkg.com/kerberos/-/kerberos-0.0.17.tgz#29a67c0b127bfa52bdd3b53b7b8c8659a9a084f8"
+ dependencies:
+ nan "~2.0"
+
+key-tree-store@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/key-tree-store/-/key-tree-store-1.3.0.tgz#5ea29afc2529a425938437d6955b714ce6a9791f"
+
+kind-of@^3.0.2:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.0.4.tgz#7b8ecf18a4e17f8269d73b501c9f232c96887a74"
+ dependencies:
+ is-buffer "^1.0.2"
+
+klaw@^1.0.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439"
+ optionalDependencies:
+ graceful-fs "^4.1.9"
+
+lazy-cache@^1.0.3:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"
+
+lcid@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835"
+ dependencies:
+ invert-kv "^1.0.0"
+
+lcov-parse@0.0.10:
+ version "0.0.10"
+ resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3"
+
+ldjson-stream@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/ldjson-stream/-/ldjson-stream-1.2.1.tgz#91beceda5ac4ed2b17e649fb777e7abfa0189c2b"
+ dependencies:
+ split2 "^0.2.1"
+ through2 "^0.6.1"
+
+levn@^0.3.0, levn@~0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
+ dependencies:
+ prelude-ls "~1.1.2"
+ type-check "~0.3.2"
+
+limiter@1.0.x:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/limiter/-/limiter-1.0.5.tgz#9630b2a0d3bad63203f96e3d96f32f83d442dfc8"
+
+load-json-file@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
+ dependencies:
+ graceful-fs "^4.1.2"
+ parse-json "^2.2.0"
+ pify "^2.0.0"
+ pinkie-promise "^2.0.0"
+ strip-bom "^2.0.0"
+
+lodash._arrayeach@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz#bab156b2a90d3f1bbd5c653403349e5e5933ef9e"
+
+lodash._baseassign@^3.0.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e"
+ dependencies:
+ lodash._basecopy "^3.0.0"
+ lodash.keys "^3.0.0"
+
+lodash._basecallback@^3.0.0:
+ version "3.3.1"
+ resolved "https://registry.yarnpkg.com/lodash._basecallback/-/lodash._basecallback-3.3.1.tgz#b7b2bb43dc2160424a21ccf26c57e443772a8e27"
+ dependencies:
+ lodash._baseisequal "^3.0.0"
+ lodash._bindcallback "^3.0.0"
+ lodash.isarray "^3.0.0"
+ lodash.pairs "^3.0.0"
+
+lodash._basecopy@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36"
+
+lodash._basecreate@^3.0.0:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821"
+
+lodash._basefor@^3.0.0:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/lodash._basefor/-/lodash._basefor-3.0.3.tgz#7550b4e9218ef09fad24343b612021c79b4c20c2"
+
+lodash._baseisequal@^3.0.0:
+ version "3.0.7"
+ resolved "https://registry.yarnpkg.com/lodash._baseisequal/-/lodash._baseisequal-3.0.7.tgz#d8025f76339d29342767dcc887ce5cb95a5b51f1"
+ dependencies:
+ lodash.isarray "^3.0.0"
+ lodash.istypedarray "^3.0.0"
+ lodash.keys "^3.0.0"
+
+lodash._bindcallback@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
+
+lodash._createassigner@^3.0.0:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz#838a5bae2fdaca63ac22dee8e19fa4e6d6970b11"
+ dependencies:
+ lodash._bindcallback "^3.0.0"
+ lodash._isiterateecall "^3.0.0"
+ lodash.restparam "^3.0.0"
+
+lodash._getnative@^3.0.0:
+ version "3.9.1"
+ resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
+
+lodash._isiterateecall@^3.0.0:
+ version "3.0.9"
+ resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c"
+
+lodash._root@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692"
+
+lodash.assign@^3.0.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-3.2.0.tgz#3ce9f0234b4b2223e296b8fa0ac1fee8ebca64fa"
+ dependencies:
+ lodash._baseassign "^3.0.0"
+ lodash._createassigner "^3.0.0"
+ lodash.keys "^3.0.0"
+
+lodash.defaults@^3.1.2:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-3.1.2.tgz#c7308b18dbf8bc9372d701a73493c61192bd2e2c"
+ dependencies:
+ lodash.assign "^3.0.0"
+ lodash.restparam "^3.0.0"
+
+lodash.defaults@^4.0.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c"
+
+lodash.difference@^4.1.1:
+ version "4.5.0"
+ resolved "https://registry.yarnpkg.com/lodash.difference/-/lodash.difference-4.5.0.tgz#9ccb4e505d486b91651345772885a2df27fd017c"
+
+lodash.isarguments@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a"
+
+lodash.isarray@^3.0.0:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55"
+
+lodash.isfunction@^3.0.0, lodash.isfunction@^3.0.6:
+ version "3.0.8"
+ resolved "https://registry.yarnpkg.com/lodash.isfunction/-/lodash.isfunction-3.0.8.tgz#4db709fc81bc4a8fd7127a458a5346c5cdce2c6b"
+
+lodash.istypedarray@^3.0.0:
+ version "3.0.6"
+ resolved "https://registry.yarnpkg.com/lodash.istypedarray/-/lodash.istypedarray-3.0.6.tgz#c9a477498607501d8e8494d283b87c39281cef62"
+
+lodash.keys@^3.0.0:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a"
+ dependencies:
+ lodash._getnative "^3.0.0"
+ lodash.isarguments "^3.0.0"
+ lodash.isarray "^3.0.0"
+
+lodash.pairs@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/lodash.pairs/-/lodash.pairs-3.0.1.tgz#bbe08d5786eeeaa09a15c91ebf0dcb7d2be326a9"
+ dependencies:
+ lodash.keys "^3.0.0"
+
+lodash.restparam@^3.0.0:
+ version "3.6.1"
+ resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
+
+lodash.startswith@^3.0.1:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/lodash.startswith/-/lodash.startswith-3.2.0.tgz#fc2e1ed2c6df8c777117632e87fe4a9181d483fb"
+ dependencies:
+ lodash._root "^3.0.0"
+
+lodash.transform@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/lodash.transform/-/lodash.transform-3.0.4.tgz#8ebe53fbae15857ade36eca67fc559b78bb3ebe9"
+ dependencies:
+ lodash._arrayeach "^3.0.0"
+ lodash._basecallback "^3.0.0"
+ lodash._basecreate "^3.0.0"
+ lodash._basefor "^3.0.0"
+ lodash.isarray "^3.0.0"
+ lodash.isfunction "^3.0.0"
+ lodash.istypedarray "^3.0.0"
+ lodash.keys "^3.0.0"
+
+lodash@^3.2.0:
+ version "3.10.1"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"
+
+lodash@^4.0.0, lodash@^4.11.1, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.6.1:
+ version "4.17.2"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42"
+
+log-driver@1.2.5:
+ version "1.2.5"
+ resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056"
+
+longest@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
+
+loose-envify@^1.0.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.0.tgz#6b26248c42f6d4fa4b0d8542f78edfcde35642a8"
+ dependencies:
+ js-tokens "^2.0.0"
+
+loud-rejection@^1.0.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f"
+ dependencies:
+ currently-unhandled "^0.4.1"
+ signal-exit "^3.0.0"
+
+lru-cache@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.1.tgz#1343955edaf2e37d9b9e7ee7241e27c4b9fb72be"
+ dependencies:
+ pseudomap "^1.0.1"
+ yallist "^2.0.0"
+
+map-obj@^1.0.0, map-obj@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d"
+
+map-stream@~0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194"
+
+marked@~0.3.4:
+ version "0.3.6"
+ resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.6.tgz#b2c6c618fccece4ef86c4fc6cb8a7cbf5aeda8d7"
+
+"match-stream@>= 0.0.2 < 1":
+ version "0.0.2"
+ resolved "https://registry.yarnpkg.com/match-stream/-/match-stream-0.0.2.tgz#99eb050093b34dffade421b9ac0b410a9cfa17cf"
+ dependencies:
+ buffers "~0.1.1"
+ readable-stream "~1.0.0"
+
+md5-hex@^1.2.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-1.3.0.tgz#d2c4afe983c4370662179b8cad145219135046c4"
+ dependencies:
+ md5-o-matic "^0.1.1"
+
+md5-o-matic@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/md5-o-matic/-/md5-o-matic-0.1.1.tgz#822bccd65e117c514fab176b25945d54100a03c3"
+
+meow@^3.1.0:
+ version "3.7.0"
+ resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb"
+ dependencies:
+ camelcase-keys "^2.0.0"
+ decamelize "^1.1.2"
+ loud-rejection "^1.0.0"
+ map-obj "^1.0.1"
+ minimist "^1.1.3"
+ normalize-package-data "^2.3.4"
+ object-assign "^4.0.1"
+ read-pkg-up "^1.0.1"
+ redent "^1.0.0"
+ trim-newlines "^1.0.0"
+
+micromatch@^2.3.11:
+ version "2.3.11"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565"
+ dependencies:
+ arr-diff "^2.0.0"
+ array-unique "^0.2.1"
+ braces "^1.8.2"
+ expand-brackets "^0.1.4"
+ extglob "^0.3.1"
+ filename-regex "^2.0.0"
+ is-extglob "^1.0.0"
+ is-glob "^2.0.1"
+ kind-of "^3.0.2"
+ normalize-path "^2.0.1"
+ object.omit "^2.0.0"
+ parse-glob "^3.0.4"
+ regex-cache "^0.4.2"
+
+mime-db@~1.24.0:
+ version "1.24.0"
+ resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.24.0.tgz#e2d13f939f0016c6e4e9ad25a8652f126c467f0c"
+
+mime-types@^2.1.11, mime-types@^2.1.12, mime-types@~2.1.7:
+ version "2.1.12"
+ resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.12.tgz#152ba256777020dd4663f54c2e7bc26381e71729"
+ dependencies:
+ mime-db "~1.24.0"
+
+minimatch@^3.0.2:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774"
+ dependencies:
+ brace-expansion "^1.0.0"
+
+minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
+
+minimist@~0.0.1:
+ version "0.0.10"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"
+
+minimist@0.0.8:
+ version "0.0.8"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
+
+mkdirp@^0.5.0, mkdirp@^0.5.1, "mkdirp@>=0.5 0", mkdirp@0.5, mkdirp@latest:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
+ dependencies:
+ minimist "0.0.8"
+
+mkdirp@~0.3.5:
+ version "0.3.5"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.5.tgz#de3e5f8961c88c787ee1368df849ac4413eca8d7"
+
+moment@^2.10.6:
+ version "2.16.0"
+ resolved "https://registry.yarnpkg.com/moment/-/moment-2.16.0.tgz#f38f2c97c9889b0ee18fc6cc392e1e443ad2da8e"
+
+mongodb-core@^1.2.24:
+ version "1.3.21"
+ resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-1.3.21.tgz#fe129e7bee2b3b26c1409de02ab60d03f6291cca"
+ dependencies:
+ bson "~0.4.23"
+ require_optional "~1.0.0"
+
+mongodb-core@2.0.13:
+ version "2.0.13"
+ resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-2.0.13.tgz#f9394b588dce0e579482e53d74dbc7d7a9d4519c"
+ dependencies:
+ bson "~0.5.6"
+ require_optional "~1.0.0"
+
+mongodb-core@christkv/mongodb-core#2.0:
+ version "2.1.1"
+ resolved "https://codeload.github.com/christkv/mongodb-core/tar.gz/c3565e81a4a26ec04c56be49336bdc413748d097"
+ dependencies:
+ bson "~1.0.1"
+ require_optional "~1.0.0"
+
+mongodb-download-url@^0.1.10:
+ version "0.1.10"
+ resolved "https://registry.yarnpkg.com/mongodb-download-url/-/mongodb-download-url-0.1.10.tgz#a7047eec95001de9f4df39f7e4030dc87eb3f806"
+ dependencies:
+ async "^1.5.0"
+ debug "^2.2.0"
+ lodash.defaults "^4.0.0"
+ minimist "^1.2.0"
+ mongodb-version-list "^0.0.3"
+ request "^2.65.0"
+ semver "^5.0.3"
+
+mongodb-extended-json@1.7.1:
+ version "1.7.1"
+ resolved "https://registry.yarnpkg.com/mongodb-extended-json/-/mongodb-extended-json-1.7.1.tgz#457ec1fe3582eb1c70c4c12a979d831c01344812"
+ dependencies:
+ async "^1.4.2"
+ bson "^0.5.2"
+ event-stream "^3.3.1"
+ JSONStream "^1.1.1"
+ lodash.isfunction "^3.0.6"
+ lodash.transform "^3.0.4"
+ moment "^2.10.6"
+ raf "^3.1.0"
+
+mongodb-topology-manager@1.0.x:
+ version "1.0.10"
+ resolved "https://registry.yarnpkg.com/mongodb-topology-manager/-/mongodb-topology-manager-1.0.10.tgz#587a563508a1c44f58977bc6aced1172502a1aea"
+ dependencies:
+ babel-core "^6.10.4"
+ babel-polyfill "^6.9.1"
+ bluebird "^3.4.1"
+ co "^4.6.0"
+ es6-promise "^3.2.1"
+ kerberos "0.0.17"
+ mkdirp "^0.5.1"
+ mongodb-core "^1.2.24"
+ rimraf "^2.4.3"
+
+mongodb-version-list@^0.0.3, mongodb-version-list@0.0.3:
+ version "0.0.3"
+ resolved "https://registry.yarnpkg.com/mongodb-version-list/-/mongodb-version-list-0.0.3.tgz#bbb261861f041fcfc5bc72b5fe2681788bd52cef"
+ dependencies:
+ cheerio "^0.19.0"
+ debug "^2.2.0"
+ downcache "0.0.8"
+ fs-extra "^0.22.1"
+ minimist "^1.1.1"
+ semver "^5.0.1"
+
+mongodb-version-manager@christkv/mongodb-version-manager#master:
+ version "1.0.7"
+ resolved "https://codeload.github.com/christkv/mongodb-version-manager/tar.gz/3ea7c20925d6a0b3a9243d341d3c69abf95e66b6"
+ dependencies:
+ ampersand-state "^5.0.1"
+ async "~1.5.0"
+ chalk "^1.1.1"
+ debug "~2.2.0"
+ docopt "~0.6.2"
+ figures "^1.4.0"
+ fs-extra "~0.30.0"
+ get-mongodb-version "0.0.1"
+ lodash.defaults "^3.1.2"
+ lodash.difference "^4.1.1"
+ mongodb-download-url "^0.1.10"
+ mongodb-version-list "0.0.3"
+ nugget "^2.0.0"
+ semver "~5.1.0"
+ tar "~2.2.1"
+ tildify "~1.2.0"
+ untildify "~2.1.0"
+ unzip "^0.1.11"
+
+mongodb@^2.0.39:
+ version "2.2.11"
+ resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-2.2.11.tgz#a828b036fe6a437a35e723af5f81781c4976306c"
+ dependencies:
+ es6-promise "3.2.1"
+ mongodb-core "2.0.13"
+ readable-stream "2.1.5"
+
+ms@0.7.1:
+ version "0.7.1"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098"
+
+ms@0.7.2:
+ version "0.7.2"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765"
+
+mute-stream@0.0.5:
+ version "0.0.5"
+ resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0"
+
+nan@~2.0:
+ version "2.0.9"
+ resolved "https://registry.yarnpkg.com/nan/-/nan-2.0.9.tgz#d02a770f46778842cceb94e17cab31ffc7234a05"
+
+natives@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.0.tgz#e9ff841418a6b2ec7a495e939984f78f163e6e31"
+
+natural-compare@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
+
+node-uuid@~1.4.7:
+ version "1.4.7"
+ resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.7.tgz#6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f"
+
+normalize-package-data@^2.3.2, normalize-package-data@^2.3.4:
+ version "2.3.5"
+ resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.5.tgz#8d924f142960e1777e7ffe170543631cc7cb02df"
+ dependencies:
+ hosted-git-info "^2.1.4"
+ is-builtin-module "^1.0.0"
+ semver "2 || 3 || 4 || 5"
+ validate-npm-package-license "^3.0.1"
+
+normalize-path@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a"
+
+npmlog@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-1.0.0.tgz#ed2f290b60316887c39e0da9f09f8d13847cef0f"
+ dependencies:
+ ansi "~0.3.0"
+ are-we-there-yet "~1.0.0"
+ gauge "~1.0.2"
+
+nth-check@~1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.1.tgz#9929acdf628fc2c41098deab82ac580cf149aae4"
+ dependencies:
+ boolbase "~1.0.0"
+
+nugget@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/nugget/-/nugget-2.0.1.tgz#201095a487e1ad36081b3432fa3cada4f8d071b0"
+ dependencies:
+ debug "^2.1.3"
+ minimist "^1.1.0"
+ pretty-bytes "^1.0.2"
+ progress-stream "^1.1.0"
+ request "^2.45.0"
+ single-line-log "^1.1.2"
+ throttleit "0.0.2"
+
+number-is-nan@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
+
+nyc@^8.1.0:
+ version "8.4.0"
+ resolved "https://registry.yarnpkg.com/nyc/-/nyc-8.4.0.tgz#660371c807caef0427fb9b0948f74180624ea6e4"
+ dependencies:
+ archy "^1.0.0"
+ arrify "^1.0.1"
+ caching-transform "^1.0.0"
+ convert-source-map "^1.3.0"
+ default-require-extensions "^1.0.0"
+ find-cache-dir "^0.1.1"
+ find-up "^1.1.2"
+ foreground-child "^1.5.3"
+ glob "^7.0.6"
+ istanbul-lib-coverage "^1.0.0"
+ istanbul-lib-hook "^1.0.0-alpha.4"
+ istanbul-lib-instrument "^1.2.0"
+ istanbul-lib-report "^1.0.0-alpha.3"
+ istanbul-lib-source-maps "^1.0.2"
+ istanbul-reports "^1.0.0"
+ md5-hex "^1.2.0"
+ micromatch "^2.3.11"
+ mkdirp "^0.5.0"
+ resolve-from "^2.0.0"
+ rimraf "^2.5.4"
+ signal-exit "^3.0.1"
+ spawn-wrap "^1.2.4"
+ test-exclude "^2.1.3"
+ yargs "^6.0.0"
+ yargs-parser "^4.0.2"
+
+oauth-sign@~0.8.1:
+ version "0.8.2"
+ resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43"
+
+object-assign@^4.0.1, object-assign@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0"
+
+object-keys@~0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336"
+
+object.omit@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa"
+ dependencies:
+ for-own "^0.1.4"
+ is-extendable "^0.1.1"
+
+once@^1.3.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
+ dependencies:
+ wrappy "1"
+
+onetime@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789"
+
+optimist@^0.6.1, optimist@0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686"
+ dependencies:
+ minimist "~0.0.1"
+ wordwrap "~0.0.2"
+
+optimist@~0.3, optimist@~0.3.5:
+ version "0.3.7"
+ resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.3.7.tgz#c90941ad59e4273328923074d2cf2e7cbc6ec0d9"
+ dependencies:
+ wordwrap "~0.0.2"
+
+optionator@^0.8.2:
+ version "0.8.2"
+ resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64"
+ dependencies:
+ deep-is "~0.1.3"
+ fast-levenshtein "~2.0.4"
+ levn "~0.3.0"
+ prelude-ls "~1.1.2"
+ type-check "~0.3.2"
+ wordwrap "~1.0.0"
+
+os-homedir@^1.0.0, os-homedir@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
+
+os-locale@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9"
+ dependencies:
+ lcid "^1.0.0"
+
+os-tmpdir@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
+
+"over@>= 0.0.5 < 1":
+ version "0.0.5"
+ resolved "https://registry.yarnpkg.com/over/-/over-0.0.5.tgz#f29852e70fd7e25f360e013a8ec44c82aedb5708"
+
+parse-glob@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
+ dependencies:
+ glob-base "^0.3.0"
+ is-dotfile "^1.0.0"
+ is-extglob "^1.0.0"
+ is-glob "^2.0.0"
+
+parse-json@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9"
+ dependencies:
+ error-ex "^1.2.0"
+
+path-exists@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b"
+ dependencies:
+ pinkie-promise "^2.0.0"
+
+path-is-absolute@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
+
+path-is-inside@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53"
+
+path-parse@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
+
+path-type@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441"
+ dependencies:
+ graceful-fs "^4.1.2"
+ pify "^2.0.0"
+ pinkie-promise "^2.0.0"
+
+pause-stream@0.0.11:
+ version "0.0.11"
+ resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445"
+ dependencies:
+ through "~2.3"
+
+performance-now@~0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5"
+
+pify@^2.0.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
+
+pinkie-promise@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
+ dependencies:
+ pinkie "^2.0.0"
+
+pinkie@^2.0.0:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
+
+pkg-dir@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4"
+ dependencies:
+ find-up "^1.0.0"
+
+pluralize@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45"
+
+prelude-ls@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
+
+preserve@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
+
+pretty-bytes@^1.0.2:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-1.0.4.tgz#0a22e8210609ad35542f8c8d5d2159aff0751c84"
+ dependencies:
+ get-stdin "^4.0.1"
+ meow "^3.1.0"
+
+private@^0.1.6:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/private/-/private-0.1.6.tgz#55c6a976d0f9bafb9924851350fe47b9b5fbb7c1"
+
+process-nextick-args@~1.0.6:
+ version "1.0.7"
+ resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
+
+progress-stream@^1.1.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/progress-stream/-/progress-stream-1.2.0.tgz#2cd3cfea33ba3a89c9c121ec3347abe9ab125f77"
+ dependencies:
+ speedometer "~0.1.2"
+ through2 "~0.2.3"
+
+progress@^1.1.8:
+ version "1.1.8"
+ resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be"
+
+prr@~0.0.0:
+ version "0.0.0"
+ resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a"
+
+pseudomap@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
+
+"pullstream@>= 0.4.1 < 1":
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/pullstream/-/pullstream-0.4.1.tgz#d6fb3bf5aed697e831150eb1002c25a3f8ae1314"
+ dependencies:
+ over ">= 0.0.5 < 1"
+ readable-stream "~1.0.31"
+ setimmediate ">= 1.0.2 < 2"
+ slice-stream ">= 1.0.0 < 2"
+
+punycode@^1.4.1:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
+
+qs@~6.2.0:
+ version "6.2.1"
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.2.1.tgz#ce03c5ff0935bc1d9d69a9f14cbd18e568d67625"
+
+qs@~6.3.0:
+ version "6.3.0"
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442"
+
+raf@^3.1.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/raf/-/raf-3.3.0.tgz#93845eeffc773f8129039f677f80a36044eee2c3"
+ dependencies:
+ performance-now "~0.2.0"
+
+randomatic@^1.1.3:
+ version "1.1.5"
+ resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.5.tgz#5e9ef5f2d573c67bd2b8124ae90b5156e457840b"
+ dependencies:
+ is-number "^2.0.2"
+ kind-of "^3.0.2"
+
+read-pkg-up@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
+ dependencies:
+ find-up "^1.0.0"
+ read-pkg "^1.0.0"
+
+read-pkg@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28"
+ dependencies:
+ load-json-file "^1.0.0"
+ normalize-package-data "^2.3.2"
+ path-type "^1.0.0"
+
+"readable-stream@^2.0.0 || ^1.1.13":
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e"
+ dependencies:
+ buffer-shims "^1.0.0"
+ core-util-is "~1.0.0"
+ inherits "~2.0.1"
+ isarray "~1.0.0"
+ process-nextick-args "~1.0.6"
+ string_decoder "~0.10.x"
+ util-deprecate "~1.0.1"
+
+"readable-stream@>=1.0.33-1 <1.1.0-0", readable-stream@~1.0.0, readable-stream@~1.0.31:
+ version "1.0.34"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c"
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.1"
+ isarray "0.0.1"
+ string_decoder "~0.10.x"
+
+readable-stream@~1.1.9:
+ version "1.1.14"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.1"
+ isarray "0.0.1"
+ string_decoder "~0.10.x"
+
+readable-stream@~2.0.0, readable-stream@~2.0.5:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e"
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.1"
+ isarray "~1.0.0"
+ process-nextick-args "~1.0.6"
+ string_decoder "~0.10.x"
+ util-deprecate "~1.0.1"
+
+readable-stream@1.1:
+ version "1.1.13"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.13.tgz#f6eef764f514c89e2b9e23146a75ba106756d23e"
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.1"
+ isarray "0.0.1"
+ string_decoder "~0.10.x"
+
+readable-stream@2.1.5:
+ version "2.1.5"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0"
+ dependencies:
+ buffer-shims "^1.0.0"
+ core-util-is "~1.0.0"
+ inherits "~2.0.1"
+ isarray "~1.0.0"
+ process-nextick-args "~1.0.6"
+ string_decoder "~0.10.x"
+ util-deprecate "~1.0.1"
+
+readline2@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35"
+ dependencies:
+ code-point-at "^1.0.0"
+ is-fullwidth-code-point "^1.0.0"
+ mute-stream "0.0.5"
+
+rechoir@^0.6.2:
+ version "0.6.2"
+ resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
+ dependencies:
+ resolve "^1.1.6"
+
+redent@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde"
+ dependencies:
+ indent-string "^2.1.0"
+ strip-indent "^1.0.1"
+
+regenerator-runtime@^0.9.5:
+ version "0.9.6"
+ resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.9.6.tgz#d33eb95d0d2001a4be39659707c51b0cb71ce029"
+
+regex-cache@^0.4.2:
+ version "0.4.3"
+ resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145"
+ dependencies:
+ is-equal-shallow "^0.1.3"
+ is-primitive "^2.0.0"
+
+repeat-element@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a"
+
+repeat-string@^1.5.2:
+ version "1.6.1"
+ resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
+
+repeating@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda"
+ dependencies:
+ is-finite "^1.0.0"
+
+request@^2.34.0, request@^2.45.0, request@^2.65.0:
+ version "2.78.0"
+ resolved "https://registry.yarnpkg.com/request/-/request-2.78.0.tgz#e1c8dec346e1c81923b24acdb337f11decabe9cc"
+ dependencies:
+ aws-sign2 "~0.6.0"
+ aws4 "^1.2.1"
+ caseless "~0.11.0"
+ combined-stream "~1.0.5"
+ extend "~3.0.0"
+ forever-agent "~0.6.1"
+ form-data "~2.1.1"
+ har-validator "~2.0.6"
+ hawk "~3.1.3"
+ http-signature "~1.1.0"
+ is-typedarray "~1.0.0"
+ isstream "~0.1.2"
+ json-stringify-safe "~5.0.1"
+ mime-types "~2.1.7"
+ node-uuid "~1.4.7"
+ oauth-sign "~0.8.1"
+ qs "~6.3.0"
+ stringstream "~0.0.4"
+ tough-cookie "~2.3.0"
+ tunnel-agent "~0.4.1"
+
+request@2.75.0:
+ version "2.75.0"
+ resolved "https://registry.yarnpkg.com/request/-/request-2.75.0.tgz#d2b8268a286da13eaa5d01adf5d18cc90f657d93"
+ dependencies:
+ aws-sign2 "~0.6.0"
+ aws4 "^1.2.1"
+ bl "~1.1.2"
+ caseless "~0.11.0"
+ combined-stream "~1.0.5"
+ extend "~3.0.0"
+ forever-agent "~0.6.1"
+ form-data "~2.0.0"
+ har-validator "~2.0.6"
+ hawk "~3.1.3"
+ http-signature "~1.1.0"
+ is-typedarray "~1.0.0"
+ isstream "~0.1.2"
+ json-stringify-safe "~5.0.1"
+ mime-types "~2.1.7"
+ node-uuid "~1.4.7"
+ oauth-sign "~0.8.1"
+ qs "~6.2.0"
+ stringstream "~0.0.4"
+ tough-cookie "~2.3.0"
+ tunnel-agent "~0.4.1"
+
+require_optional@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/require_optional/-/require_optional-1.0.0.tgz#52a86137a849728eb60a55533617f8f914f59abf"
+ dependencies:
+ resolve-from "^2.0.0"
+ semver "^5.1.0"
+
+require-directory@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
+
+require-main-filename@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1"
+
+require-uncached@^1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3"
+ dependencies:
+ caller-path "^0.1.0"
+ resolve-from "^1.0.0"
+
+requizzle@~0.2.0:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/requizzle/-/requizzle-0.2.1.tgz#6943c3530c4d9a7e46f1cddd51c158fc670cdbde"
+ dependencies:
+ underscore "~1.6.0"
+
+resolve-from@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226"
+
+resolve-from@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57"
+
+resolve@^1.1.6:
+ version "1.1.7"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
+
+restore-cursor@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541"
+ dependencies:
+ exit-hook "^1.0.0"
+ onetime "^1.0.0"
+
+right-align@^0.1.1:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
+ dependencies:
+ align-text "^0.1.1"
+
+rimraf@^2.2.8, rimraf@^2.3.3, rimraf@^2.4.3, rimraf@^2.4.4, rimraf@^2.5.4, rimraf@2, rimraf@2.5.4:
+ version "2.5.4"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04"
+ dependencies:
+ glob "^7.0.5"
+
+rimraf@2.2.6:
+ version "2.2.6"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.6.tgz#c59597569b14d956ad29cacc42bdddf5f0ea4f4c"
+
+run-async@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389"
+ dependencies:
+ once "^1.3.0"
+
+rx-lite@^3.1.2:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102"
+
+semver@^5.0.1, semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, "semver@2 || 3 || 4 || 5", semver@5.3.0:
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
+
+semver@~5.1.0:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-5.1.1.tgz#a3292a373e6f3e0798da0b20641b9a9c5bc47e19"
+
+set-blocking@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
+
+"setimmediate@>= 1.0.1 < 2", "setimmediate@>= 1.0.2 < 2":
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
+
+shelljs@^0.7.5:
+ version "0.7.5"
+ resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.5.tgz#2eef7a50a21e1ccf37da00df767ec69e30ad0675"
+ dependencies:
+ glob "^7.0.0"
+ interpret "^1.0.0"
+ rechoir "^0.6.2"
+
+signal-exit@^2.0.0:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-2.1.2.tgz#375879b1f92ebc3b334480d038dc546a6d558564"
+
+signal-exit@^3.0.0, signal-exit@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.1.tgz#5a4c884992b63a7acd9badb7894c3ee9cfccad81"
+
+single-line-log@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/single-line-log/-/single-line-log-1.1.2.tgz#c2f83f273a3e1a16edb0995661da0ed5ef033364"
+ dependencies:
+ string-width "^1.0.1"
+
+slash@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
+
+slice-ansi@0.0.4:
+ version "0.0.4"
+ resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35"
+
+"slice-stream@>= 1.0.0 < 2":
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/slice-stream/-/slice-stream-1.0.0.tgz#5b33bd66f013b1a7f86460b03d463dec39ad3ea0"
+ dependencies:
+ readable-stream "~1.0.31"
+
+slide@^1.1.5:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707"
+
+sntp@1.x.x:
+ version "1.0.9"
+ resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198"
+ dependencies:
+ hoek "2.x.x"
+
+source-map-support@^0.4.2:
+ version "0.4.6"
+ resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.6.tgz#32552aa64b458392a85eab3b0b5ee61527167aeb"
+ dependencies:
+ source-map "^0.5.3"
+
+source-map@^0.4.4:
+ version "0.4.4"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
+ dependencies:
+ amdefine ">=0.0.4"
+
+source-map@^0.5.0, source-map@^0.5.3, source-map@~0.5.1:
+ version "0.5.6"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412"
+
+source-map@~0.1.30, source-map@~0.1.7:
+ version "0.1.43"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346"
+ dependencies:
+ amdefine ">=0.0.4"
+
+spawn-wrap@^1.2.4:
+ version "1.2.4"
+ resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.2.4.tgz#920eb211a769c093eebfbd5b0e7a5d2e68ab2e40"
+ dependencies:
+ foreground-child "^1.3.3"
+ mkdirp "^0.5.0"
+ os-homedir "^1.0.1"
+ rimraf "^2.3.3"
+ signal-exit "^2.0.0"
+ which "^1.2.4"
+
+spdx-correct@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40"
+ dependencies:
+ spdx-license-ids "^1.0.2"
+
+spdx-expression-parse@~1.0.0:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c"
+
+spdx-license-ids@^1.0.2:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57"
+
+speedometer@~0.1.2:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/speedometer/-/speedometer-0.1.4.tgz#9876dbd2a169d3115402d48e6ea6329c8816a50d"
+
+split@0.3:
+ version "0.3.3"
+ resolved "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f"
+ dependencies:
+ through "2"
+
+split2@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/split2/-/split2-0.2.1.tgz#02ddac9adc03ec0bb78c1282ec079ca6e85ae900"
+ dependencies:
+ through2 "~0.6.1"
+
+sprintf-js@~1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
+
+sshpk@^1.7.0:
+ version "1.10.1"
+ resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.1.tgz#30e1a5d329244974a1af61511339d595af6638b0"
+ dependencies:
+ asn1 "~0.2.3"
+ assert-plus "^1.0.0"
+ dashdash "^1.12.0"
+ getpass "^0.1.1"
+ optionalDependencies:
+ bcrypt-pbkdf "^1.0.0"
+ ecc-jsbn "~0.1.1"
+ jodid25519 "^1.0.0"
+ jsbn "~0.1.0"
+ tweetnacl "~0.14.0"
+
+stream-combiner@~0.0.4:
+ version "0.0.4"
+ resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14"
+ dependencies:
+ duplexer "~0.1.1"
+
+string_decoder@~0.10.x:
+ version "0.10.31"
+ resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
+
+string-width@^1.0.1, string-width@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
+ dependencies:
+ code-point-at "^1.0.0"
+ is-fullwidth-code-point "^1.0.0"
+ strip-ansi "^3.0.0"
+
+string-width@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e"
+ dependencies:
+ is-fullwidth-code-point "^2.0.0"
+ strip-ansi "^3.0.0"
+
+stringstream@~0.0.4:
+ version "0.0.5"
+ resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878"
+
+strip-ansi@^3.0.0, strip-ansi@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
+ dependencies:
+ ansi-regex "^2.0.0"
+
+strip-bom@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e"
+ dependencies:
+ is-utf8 "^0.2.0"
+
+strip-bom@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
+
+strip-indent@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2"
+ dependencies:
+ get-stdin "^4.0.1"
+
+strip-json-comments@~1.0.1, strip-json-comments@~1.0.2:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91"
+
+supports-color@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
+
+supports-color@^3.1.2:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5"
+ dependencies:
+ has-flag "^1.0.0"
+
+table@^3.7.4, table@^3.7.8:
+ version "3.8.3"
+ resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f"
+ dependencies:
+ ajv "^4.7.0"
+ ajv-keywords "^1.0.0"
+ chalk "^1.1.1"
+ lodash "^4.0.0"
+ slice-ansi "0.0.4"
+ string-width "^2.0.0"
+
+"taffydb@https://github.com/hegemonic/taffydb/tarball/7d100bcee0e997ee4977e273cdce60bd8933050e":
+ version "2.6.2"
+ resolved "https://github.com/hegemonic/taffydb/tarball/7d100bcee0e997ee4977e273cdce60bd8933050e#3c549d2f5712d7d1d109ad6bb1a4084f1b7add4e"
+
+tar@~2.2.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1"
+ dependencies:
+ block-stream "*"
+ fstream "^1.0.2"
+ inherits "2"
+
+test-exclude@^2.1.3:
+ version "2.1.3"
+ resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-2.1.3.tgz#a8d8968e1da83266f9864f2852c55e220f06434a"
+ dependencies:
+ arrify "^1.0.1"
+ micromatch "^2.3.11"
+ object-assign "^4.1.0"
+ read-pkg-up "^1.0.1"
+ require-main-filename "^1.0.1"
+
+text-table@~0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
+
+throttleit@0.0.2:
+ version "0.0.2"
+ resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-0.0.2.tgz#cfedf88e60c00dd9697b61fdd2a8343a9b680eaf"
+
+through@^2.3.6, "through@>=2.2.7 <3", through@~2.3, through@~2.3.1, through@2:
+ version "2.3.8"
+ resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
+
+through2@^0.6.1, through2@^0.6.3, through2@~0.6.1:
+ version "0.6.5"
+ resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48"
+ dependencies:
+ readable-stream ">=1.0.33-1 <1.1.0-0"
+ xtend ">=4.0.0 <4.1.0-0"
+
+through2@~0.2.3:
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/through2/-/through2-0.2.3.tgz#eb3284da4ea311b6cc8ace3653748a52abf25a3f"
+ dependencies:
+ readable-stream "~1.1.9"
+ xtend "~2.1.1"
+
+tildify@~1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/tildify/-/tildify-1.2.0.tgz#dcec03f55dca9b7aa3e5b04f21817eb56e63588a"
+ dependencies:
+ os-homedir "^1.0.0"
+
+to-fast-properties@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320"
+
+tough-cookie@~2.3.0:
+ version "2.3.2"
+ resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a"
+ dependencies:
+ punycode "^1.4.1"
+
+"traverse@>=0.3.0 <0.4":
+ version "0.3.9"
+ resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.3.9.tgz#717b8f220cc0bb7b44e40514c22b2e8bbc70d8b9"
+
+trim-newlines@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613"
+
+tryit@^1.0.1:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb"
+
+tunnel-agent@~0.4.1:
+ version "0.4.3"
+ resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb"
+
+tweetnacl@^0.14.3, tweetnacl@~0.14.0:
+ version "0.14.3"
+ resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.3.tgz#3da382f670f25ded78d7b3d1792119bca0b7132d"
+
+type-check@~0.3.2:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72"
+ dependencies:
+ prelude-ls "~1.1.2"
+
+typedarray@~0.0.5:
+ version "0.0.6"
+ resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
+
+uglify-js@^2.6:
+ version "2.7.4"
+ resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.4.tgz#a295a0de12b6a650c031c40deb0dc40b14568bd2"
+ dependencies:
+ async "~0.2.6"
+ source-map "~0.5.1"
+ uglify-to-browserify "~1.0.0"
+ yargs "~3.10.0"
+
+uglify-js@~2.3:
+ version "2.3.6"
+ resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.3.6.tgz#fa0984770b428b7a9b2a8058f46355d14fef211a"
+ dependencies:
+ async "~0.2.6"
+ optimist "~0.3.5"
+ source-map "~0.1.7"
+
+uglify-to-browserify@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
+
+underscore-contrib@~0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/underscore-contrib/-/underscore-contrib-0.3.0.tgz#665b66c24783f8fa2b18c9f8cbb0e2c7d48c26c7"
+ dependencies:
+ underscore "1.6.0"
+
+underscore@~1.6.0, underscore@1.6.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.6.0.tgz#8b38b10cacdef63337b8b24e4ff86d45aea529a8"
+
+underscore@~1.8.3:
+ version "1.8.3"
+ resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022"
+
+untildify@~2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/untildify/-/untildify-2.1.0.tgz#17eb2807987f76952e9c0485fc311d06a826a2e0"
+ dependencies:
+ os-homedir "^1.0.0"
+
+unzip@^0.1.11:
+ version "0.1.11"
+ resolved "https://registry.yarnpkg.com/unzip/-/unzip-0.1.11.tgz#89749c63b058d7d90d619f86b98aa1535d3b97f0"
+ dependencies:
+ binary ">= 0.3.0 < 1"
+ fstream ">= 0.1.30 < 1"
+ match-stream ">= 0.0.2 < 1"
+ pullstream ">= 0.4.1 < 1"
+ readable-stream "~1.0.31"
+ setimmediate ">= 1.0.1 < 2"
+
+user-home@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f"
+ dependencies:
+ os-homedir "^1.0.0"
+
+util-deprecate@~1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
+
+validate-npm-package-license@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc"
+ dependencies:
+ spdx-correct "~1.0.0"
+ spdx-expression-parse "~1.0.0"
+
+verror@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c"
+ dependencies:
+ extsprintf "1.0.2"
+
+which-module@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f"
+
+which@^1.1.1, which@^1.2.4, which@^1.2.9:
+ version "1.2.12"
+ resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192"
+ dependencies:
+ isexe "^1.1.1"
+
+window-size@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075"
+
+window-size@0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
+
+wordwrap@~0.0.2:
+ version "0.0.3"
+ resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
+
+wordwrap@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
+
+wordwrap@0.0.2:
+ version "0.0.2"
+ resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
+
+worker-farm@^1.3.1:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.3.1.tgz#4333112bb49b17aa050b87895ca6b2cacf40e5ff"
+ dependencies:
+ errno ">=0.1.1 <0.2.0-0"
+ xtend ">=4.0.0 <4.1.0-0"
+
+wrap-ansi@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.0.0.tgz#7d30f8f873f9a5bbc3a64dabc8d177e071ae426f"
+ dependencies:
+ string-width "^1.0.1"
+
+wrappy@1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
+
+wrench@~1.5.8:
+ version "1.5.9"
+ resolved "https://registry.yarnpkg.com/wrench/-/wrench-1.5.9.tgz#411691c63a9b2531b1700267279bdeca23b2142a"
+
+write-file-atomic@^1.1.4:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-1.2.0.tgz#14c66d4e4cb3ca0565c28cf3b7a6f3e4d5938fab"
+ dependencies:
+ graceful-fs "^4.1.2"
+ imurmurhash "^0.1.4"
+ slide "^1.1.5"
+
+write@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757"
+ dependencies:
+ mkdirp "^0.5.1"
+
+xtend@^4.0.0, "xtend@>=4.0.0 <4.1.0-0":
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
+
+xtend@~2.1.1:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b"
+ dependencies:
+ object-keys "~0.4.0"
+
+y18n@^3.2.1:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
+
+yallist@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.0.0.tgz#306c543835f09ee1a4cb23b7bce9ab341c91cdd4"
+
+yargs-parser@^4.0.2, yargs-parser@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.1.0.tgz#313df030f20124124aeae8fbab2da53ec28c56d7"
+ dependencies:
+ camelcase "^3.0.0"
+
+yargs@^6.0.0:
+ version "6.4.0"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.4.0.tgz#816e1a866d5598ccf34e5596ddce22d92da490d4"
+ dependencies:
+ camelcase "^3.0.0"
+ cliui "^3.2.0"
+ decamelize "^1.1.1"
+ get-caller-file "^1.0.1"
+ os-locale "^1.4.0"
+ read-pkg-up "^1.0.1"
+ require-directory "^2.1.1"
+ require-main-filename "^1.0.1"
+ set-blocking "^2.0.0"
+ string-width "^1.0.2"
+ which-module "^1.0.0"
+ window-size "^0.2.0"
+ y18n "^3.2.1"
+ yargs-parser "^4.1.0"
+
+yargs@~3.10.0:
+ version "3.10.0"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
+ dependencies:
+ camelcase "^1.0.2"
+ cliui "^2.1.0"
+ decamelize "^1.0.0"
+ window-size "0.1.0"
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/.eslintignore b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/.eslintignore
new file mode 100644
index 0000000..235bdcd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/.eslintignore
@@ -0,0 +1,3 @@
+docs/
+bin/
+test/triage/
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/.eslintrc.yml b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/.eslintrc.yml
new file mode 100644
index 0000000..013d2ec
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/.eslintrc.yml
@@ -0,0 +1,31 @@
+extends: 'eslint:recommended'
+
+env:
+ node: true
+ mocha: true
+
+rules:
+ comma-style: error
+ consistent-this:
+ - error
+ - _this
+ indent:
+ - error
+ - 2
+ - SwitchCase: 1
+ VariableDeclarator: 2
+ keyword-spacing: error
+ no-console: off
+ no-multi-spaces: error
+ no-spaced-func: error
+ no-trailing-spaces: error
+ quotes:
+ - error
+ - single
+ semi: error
+ space-before-blocks: error
+ space-before-function-paren:
+ - error
+ - never
+ space-infix-ops: error
+ space-unary-ops: error
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/.npmignore
new file mode 100644
index 0000000..377d63f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/.npmignore
@@ -0,0 +1,16 @@
+lib-cov
+**.swp
+*.sw*
+*.orig
+.DS_Store
+node_modules/
+benchmarks/
+docs/
+test/
+Makefile
+CNAME
+index.html
+index.jade
+bin/
+karma.*.js
+format_deps.js
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/.travis.yml b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/.travis.yml
new file mode 100644
index 0000000..23b799d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/.travis.yml
@@ -0,0 +1,15 @@
+language: node_js
+sudo: false
+node_js:
+ - "7"
+ - "6"
+ - "5"
+ - "4"
+ - "0.12"
+ - "0.10"
+ - "iojs"
+before_script:
+ - wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.11.tgz
+ - tar -zxvf mongodb-linux-x86_64-2.6.11.tgz
+ - mkdir -p ./data/db
+ - ./mongodb-linux-x86_64-2.6.11/bin/mongod --fork --nopreallocj --dbpath ./data/db --syslog --port 27017
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/CONTRIBUTING.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/CONTRIBUTING.md
new file mode 100644
index 0000000..904aeef
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/CONTRIBUTING.md
@@ -0,0 +1,56 @@
+## Contributing to Mongoose
+
+If you have a question about Mongoose (not a bug report) please post it to either [StackOverflow](http://stackoverflow.com/questions/tagged/mongoose), or on [Gitter](https://gitter.im/Automattic/mongoose?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+
+### Reporting bugs
+
+- Before opening a new issue, look for existing [issues](https://github.com/Automattic/mongoose/issues) to avoid duplication. If the issue does not yet exist, [create one](https://github.com/Automattic/mongoose/issues/new).
+ - Please post any relevant code samples, preferably a standalone script that
+ reproduces your issue. Do **not** describe your issue in prose, show your
+ code.
+ - If the bug involves an error, please post the stack trace.
+ - Please post the version of mongoose and mongodb that you're using.
+ - Please write bug reports in JavaScript (ES5 or ES2015), not coffeescript, typescript, etc.
+
+### Requesting new features
+
+- Before opening a new issue, look for existing [issues](https://github.com/learnboost/mongoose/issues) to avoid duplication. If the issue does not yet exist, [create one](https://github.com/learnboost/mongoose/issues/new).
+- Please describe a use case for it
+- it would be ideal to include test cases as well
+
+### Fixing bugs / Adding features
+
+- Before starting to write code, look for existing [issues](https://github.com/learnboost/mongoose/issues). That way you avoid working on something that might not be of interest or that has been addressed already in a different branch. You can create a new issue [here](https://github.com/learnboost/mongoose/issues/new).
+ - _The source of this project is written in javascript, not coffeescript, therefore your bug reports should be written in javascript_.
+- Fork the [repo](https://github.com/Automattic/mongoose) _or_ for small documentation changes, navigate to the source on github and click the [Edit](https://github.com/blog/844-forking-with-the-edit-button) button.
+- Follow the general coding style of the rest of the project:
+ - 2 space tabs
+ - no trailing whitespace
+ - inline documentation for new methods, class members, etc.
+ - 1 space between conditionals, no space before function parenthesis
+ - `if (..) {`
+ - `for (..) {`
+ - `while (..) {`
+ - `function(err) {`
+- Write tests and make sure they pass (tests are in the [test](https://github.com/Automattic/mongoose/tree/master/test) directory).
+
+### Running the tests
+- Open a terminal and navigate to the root of the project
+- execute `npm install` to install the necessary dependencies
+- start a mongodb instance on port 27017 if one isn't running already. `mongod --dbpath <path to store data> --port 27017`
+- execute `npm test` to run the tests (we're using [mocha](http://mochajs.org/))
+ - or to execute a single test `npm test -- -g 'some regexp that matches the test description'`
+ - any mocha flags can be specified with `-- <mocha flags here>`
+ - For example, you can use `npm test -- -R spec` to use the spec reporter, rather than the dot reporter (by default, the test output looks like a bunch of dots)
+
+### Documentation
+
+To contribute to the [API documentation](http://mongoosejs.com/docs/api.html) just make your changes to the inline documentation of the appropriate [source code](https://github.com/Automattic/mongoose/tree/master/lib) in the master branch and submit a [pull request](https://help.github.com/articles/using-pull-requests/). You might also use the github [Edit](https://github.com/blog/844-forking-with-the-edit-button) button.
+
+To contribute to the [guide](http://mongoosejs.com/docs/guide.html) or [quick start](http://mongoosejs.com/docs/index.html) docs, make your changes to the appropriate `.jade` files in the [docs](https://github.com/Automattic/mongoose/tree/master/docs) directory of the master branch and submit a pull request. Again, the [Edit](https://github.com/blog/844-forking-with-the-edit-button) button might work for you here.
+
+If you'd like to preview your documentation changes, first commit your changes to your local master branch, then execute `make docs` from the project root, which switches to the gh-pages branch, merges from the master branch and builds all the static pages for you. Now execute `node static.js` from the project root which will launch a local webserver where you can browse the documentation site locally. If all looks good, submit a [pull request](https://help.github.com/articles/using-pull-requests/) to the master branch with your changes.
+
+### Plugins website
+
+The [plugins](http://plugins.mongoosejs.io/) site is also an [open source project](https://github.com/vkarpov15/mongooseplugins) that you can get involved with. Feel free to fork and improve it as well!
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/History.md
new file mode 100644
index 0000000..98cce2e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/History.md
@@ -0,0 +1,3328 @@
+4.7.1 / 2016-11-30
+==================
+ * fix(schema): throw error if you use prototype as a schema path #4746
+ * fix(schema): throw helpful error if you define a virtual with the same path as a real path #4744
+ * fix(connection): make createConnection not throw rejected promises #4742
+ * fix(populate): allow specifiying options in model schema #4741
+ * fix(document): handle selected nested elements with defaults #4739
+ * fix(query): add model to cast error if possible #4729
+ * fix(query): handle timestamps with overwrite #4054
+
+4.7.0 / 2016-11-23
+==================
+ * docs: clean up schematypes #4732 [kidlj](https://github.com/kidlj)
+ * perf: only get stack when necessary with VersionError #4726 [Sebmaster](https://github.com/Sebmaster)
+ * fix(query): ensure correct casting when setting array element #4724
+ * fix(connection): ensure db name gets set when you pass 4 params #4721
+ * fix: prevent TypeError in node v7 #4719 #4706
+ * feat(document): support .set() on virtual subpaths #4716
+ * feat(populate): support populate virtuals on nested schemas #4715
+ * feat(querycursor): support transform option and .map() #4714 #4705 [cblanc](https://github.com/cblanc)
+ * fix(document): dont set defaults on not-selected nested paths #4707
+ * fix(populate): don't throw if empty string passed to populate #4702
+ * feat(model): add `loadClass()` function for importing schema from ES6 class #4668 [rockmacaca](https://github.com/rockmacaca)
+
+4.6.8 / 2016-11-14
+==================
+ * fix(querycursor): clear stack when iterating onto next doc #4697
+ * fix: handle null keys in validation error #4693 #4689 [arciisine](https://github.com/arciisine)
+ * fix(populate): handle pre init middleware correctly with populate virtuals #4683
+ * fix(connection): ensure consistent return value for open and openSet #4659
+ * fix(schema): handle falsy defaults for arrays #4620
+
+4.6.7 / 2016-11-10
+==================
+ * fix(document): only invalidate in subdoc if using update validators #4681
+ * fix(document): don't create subdocs when excluded in projection #4669
+ * fix(document): ensure single embedded schema validator runs with correct context #4663
+ * fix(document): make sure to depopulate top level for sharding #4658
+ * fix(connection): throw more helpful error when .model() called incorrectly #4652
+ * fix(populate): throw more descriptive error when trying to populate a virtual that doesn't have proper options #4602
+ * fix(document): ensure subtype gets set properly when saving with a buffer id #4506
+ * fix(query): handle setDefaultsOnInsert with defaults on doc arrays #4456
+ * fix(drivers): make debug output better by calling toBSON() #4356
+
+4.6.6 / 2016-11-03
+==================
+ * chore: upgrade deps #4674 [TrejGun](https://github.com/TrejGun)
+ * chore: run tests on node v7 #4673 [TrejGun](https://github.com/TrejGun)
+ * perf: make setDefaultsOnInsert more efficient if upsert is off #4672 [CamHenlin](https://github.com/CamHenlin)
+ * fix(populate): ensure document array is returned #4656
+ * fix(query): cast doc arrays with positionals correctly for update #4655
+ * fix(document): ensure single nested doc validators run with correct context #4654
+ * fix: handle reconnect failed error in new version of driver #4653 [loris](https://github.com/loris)
+ * fix(populate): if setting a populated doc, take its id #4632
+ * fix(populate): handle populated virtuals in init #4618
+
+4.6.5 / 2016-10-23
+==================
+ * docs: fix grammar issues #4642 #4640 #4639 [silvermanj7](https://github.com/silvermanj7)
+ * fix(populate): filter out nonexistant values for dynref #4637
+ * fix(query): handle $type as a schematype operator #4632
+ * fix(schema): better handling for uppercase: false and lowercase: false #4622
+ * fix(query): don't run transforms on updateForExec() #4621
+ * fix(query): handle id = 0 in findById #4610
+ * fix(query): handle buffers in mergeClone #4609
+ * fix(document): handle undefined with conditional validator for validateSync #4607
+ * fix: upgrade to mongodb driver 2.2.11 #4581
+ * docs(schematypes): clarify schema.path() #4518
+ * fix(query): ensure path is defined before checking in timestamps #4514
+ * fix(model): set version key in upsert #4505
+ * fix(document): never depopulate top-level doc #3057
+ * refactor: ensure sync for setting non-capped collections #2690
+
+4.6.4 / 2016-10-16
+==================
+ * fix(query): cast $not correctly #4616 #4592 [prssn](https://github.com/prssn)
+ * fix: address issue with caching global plugins #4608 #4601 [TrejGun](https://github.com/TrejGun)
+ * fix(model): make sure to depopulate in insertMany #4590
+ * fix(model): buffer autoIndex if bufferCommands disabled #4589
+ * fix(populate): copy ids array before modifying #4585
+ * feat(schema): add retainKeyOrder prop #4542
+ * fix(document): return isModified true for children of direct modified paths #4528
+ * fix(connection): add dropDatabase() helper #4490
+ * fix(model): add usePushEach option for schemas #4455
+ * docs(connections): add some warnings about buffering #4413
+ * fix: add ability to set promise implementation in browser #4395
+
+4.6.3 / 2016-10-05
+==================
+ * fix(document): ensure single nested docs get initialized correctly when setting nested paths #4578
+ * fix: turn off transforms when writing nested docs to db #4574
+ * fix(document): don't set single nested subdocs to null when removing parent doc #4566
+ * fix(model): ensure versionKey gets set in insertMany #4561
+ * fix(schema): handle typeKey in arrays #4548
+ * feat(schema): set $implicitlyCreated on schema if created by interpretAsType #4443
+
+4.6.2 / 2016-09-30
+==================
+ * chore: upgrade to async 2.0.1 internally #4579 [billouboq](https://github.com/billouboq)
+ * fix(types): ensure nested single doc schema errors reach update validators #4557 #4519
+ * fix(connection): handle rs names with leading numbers (muri 1.1.1) #4556
+ * fix(model): don't throw if method name conflicts with Object.prototype prop #4551
+ * docs: fix broken link #4544 [VFedyk](https://github.com/VFedyk)
+ * fix: allow overwriting model on mongoose singleton #4541 [Nainterceptor](https://github.com/Nainterceptor)
+ * fix(document): don't use init: true when building doc defaults #4540
+ * fix(connection): use replSet option if replset not specified #4535
+ * fix(query): cast $not objects #4495
+
+4.6.1 / 2016-09-20
+==================
+ * fix(query): improve handling of $not with $elemMatch #4531 #3719 [timbowhite](https://github.com/timbowhite)
+ * fix: upgrade mongodb -> 2.2.10 #4517
+ * chore: fix webpack build issue #4512 [saiichihashimoto](https://github.com/saiichihashimoto)
+ * fix(query): emit error on next tick when exec callback errors #4500
+ * test: improve test case #4496 [isayme](https://github.com/isayme)
+ * fix(schema): use same check for array types and top-level types #4493
+ * style: fix indentation in docs #4489 [dhurlburtusa](https://github.com/dhurlburtusa)
+ * fix(schema): expose original object passed to constructor #4486
+ * fix(query): handle findOneAndUpdate with array of arrays #4484 #4470 [fedotov](https://github.com/fedotov)
+ * feat(document): add $ignore to make a path ignored #4480
+ * fix(query): properly handle setting single embedded in update #4475 #4466 #4465
+ * fix(updateValidators): handle single nested schema subpaths correctly #4479
+ * fix(model): throw handy error when method name conflicts with property name #4475
+ * fix(schema): handle .set() with array field #4472
+ * fix(query): check nested path when avoiding double-validating Mixed #4441
+ * fix(schema): handle calling path.trim() with no args correctly #4042
+
+4.6.0 / 2016-09-02
+==================
+ * docs(document): clarify the findById and findByIdAndUpdate examples #4471 [mdcanham](https://github.com/mdcanham)
+ * docs(schematypes): add details re: options #4452
+ * docs(middleware): add docs for insertMany hooks #4451
+ * fix(schema): create new array when copying from existing object to preserve change tracking #4449
+ * docs: fix typo in index.jade #4448
+ * fix(query): allow array for populate options #4446
+ * fix(model): create should not cause unhandle reject promise #4439
+ * fix: upgrade to mongodb driver 2.2.9 #4363 #4341 #4311 (see [comments here](https://github.com/mongodb/js-bson/commit/aa0b54597a0af28cce3530d2144af708e4b66bf0#commitcomment-18850498) if you use node 0.10)
+
+4.5.10 / 2016-08-23
+===================
+ * docs: fix typo on documents.jade #4444 [Gabri3l](https://github.com/Gabri3l)
+ * chore: upgrade mocha to 3.0.2 #4437 [TrejGun](https://github.com/TrejGun)
+ * fix: subdocuments causing error with parent timestamp on update #4434 [dyang108](https://github.com/dyang108)
+ * fix(query): don't crash if timestamps on and update doesn't have a path #4425 #4424 #4418
+ * fix(query): ensure single nested subdoc is hydrated when running update validators #4420
+ * fix(query): cast non-$geometry operators for $geoWithin #4419
+ * docs: update contributor count #4415 [AdamZaczek](https://github.com/AdamZaczek)
+ * docs: add more clarification re: the index event #4410
+ * fix(document): only skip modifying subdoc path if parent is direct modified #4405
+ * fix(schema): throw cast error if provided date invalid #4404
+ * feat(error): use util.inspect() so CastError never prints "[object Object]" #4398
+ * fix(model): dont error if the discriminator key is unchanged #4387
+ * fix(query): don't throw unhandled rejection with bluebird when using cbs #4379
+
+4.5.9 / 2016-08-14
+==================
+ * docs: add mixed schema doc for Object literal #4400 [Kikobeats](https://github.com/Kikobeats)
+ * fix(query): cast $geoWithin and convert mongoose objects to POJOs before casting #4392
+ * fix(schematype): dont cast defaults without parent doc #4390
+ * fix(query): disallow passing empty string to findOne() #4378
+ * fix(document): set single nested doc isNew correctly #4369
+ * fix(types): checks field name correctly with nested arrays and populate #4365
+ * fix(drivers): make debug output copy-pastable into mongodb shell #4352
+ * fix(services): run update validators on nested paths #4332
+ * fix(model): handle typeKey with discriminators #4339
+ * fix(query): apply timestamps to child schemas when explicitly specified in update #4049
+ * fix(schema): set prefix as nested path with add() #1730
+
+4.5.8 / 2016-08-01
+==================
+ * fix(model): make changing the discriminator key cause a cast error #4374
+ * fix(query): pass projection fields to cursor #4371 #4342 [Corei13](https://github.com/Corei13)
+ * fix(document): support multiple paths for isModified #4370 [adambuczynski](https://github.com/adambuczynski)
+ * fix(querycursor): always cast fields before returning cursor #4355
+ * fix(query): support projection as alias for fields in findOneAndUpdate #4315
+ * fix(schema): treat index false + unique false as no index #4304
+ * fix(types): dont mark single nested subpath as modified if whole doc already modified #4224
+
+4.5.7 / 2016-07-25
+==================
+ * fix(document): ensure no unhandled rejections if callback specified for save #4364
+
+4.5.6 / 2016-07-23
+==================
+ * fix(schema): don't overwrite createdAt if it isn't selected #4351 [tusbar](https://github.com/tusbar)
+ * docs(api): fix link to populate() and add a new one from depopulate() #4345 [Delapouite](https://github.com/Delapouite)
+ * fix(types): ownerDocument() works properly with single nested docs #4344 [vichle](https://github.com/vichle)
+ * fix(populate): dont use findOne when justOne option set #4329
+ * fix(document): dont trigger .then() deprecated warning when calling doc.remove() #4291
+ * docs(connection): add promiseLibrary option #4280
+ * fix(plugins): apply global plugins to subschemas #4271
+ * fix(model): ensure `ensureIndex()` never calls back in the same tick #4246
+ * docs(schema): improve post hook docs on schema #4238
+
+4.5.5 / 2016-07-18
+==================
+ * fix(document): handle setting root to empty obj if minimize false #4337
+ * fix: downgrade to mongodb 2.1.18 #4335 #4334 #4328 #4323
+ * perf(types): remove defineProperty usage in documentarray #4333
+ * fix(query): correctly pass model in .toConstructor() #4318
+ * fix(services): avoid double-validating mixed types with update validators #4305
+ * docs(middleware): add docs describing error handling middleware #4229
+ * fix(types): throw correct error when invalidating doc array #3602
+
+4.5.4 / 2016-07-11
+==================
+ * fix(types): fix removing embedded documents #4309 [RoCat](https://github.com/RoCat)
+ * docs: various docs improvements #4302 #4294 [simonxca](https://github.com/simonxca)
+ * fix: upgrade mongodb -> 2.1.21 #4295 #4202 [RoCat](https://github.com/RoCat)
+ * fix(populate): convert single result to array for virtual populate because of lean #4288
+ * fix(populate): handle empty results for populate virtuals properly #4285 #4284
+ * fix(query): dont cast $inc to number if type is long #4283
+ * fix(types): allow setting single nested doc to null #4281
+ * fix(populate): handle deeply nested virtual populate #4278
+ * fix(document): allow setting empty obj if strict mode is false #4274
+ * fix(aggregate): allow passing obj to .unwind() #4239
+ * docs(document): add return statements to transform examples #1963
+
+4.5.3 / 2016-06-30
+==================
+ * fix(query): pass correct options to QueryCursor #4277 #4266
+ * fix(querycursor): handle lean option correctly #4276 [gchudnov](https://github.com/gchudnov)
+ * fix(document): fix error handling when no error occurred #4275
+ * fix(error): use strict mode for version error #4272
+ * docs(populate): fix crashing compilation for populate.jade #4267
+ * fix(populate): support `justOne` option for populate virtuals #4263
+ * fix(populate): ensure model param gets used for populate virtuals #4261 #4243
+ * fix(querycursor): add ability to properly close the cursor #4258
+ * docs(model): correct link to Document #4250
+ * docs(populate): correct path for refPath populate #4240
+ * fix(document): support validator.isEmail as validator #4064
+
+4.5.2 / 2016-06-24
+==================
+ * fix(connection): add checks for collection presence for `onOpen` and `onClose` #4259 [nodkz](https://github.com/nodkz)
+ * fix(cast): allow strings for $type operator #4256
+ * fix(querycursor): support lean() #4255 [pyramation](https://github.com/pyramation)
+ * fix(aggregate): allow setting noCursorTimeout option #4241
+ * fix(document): handle undefined for Array.pull #4222 [Sebmaster](https://github.com/Sebmaster)
+ * fix(connection): ensure promise.catch() catches initial connection error #4135
+ * fix(document): show additional context for VersionError #2633
+
+4.5.1 / 2016-06-18
+==================
+ * fix(model): ensure wrapped insertMany() returns a promise #4237
+ * fix(populate): dont overwrite populateVirtuals when populating multiple paths #4234
+ * docs(model): clarify relationship between create() and save() #4233
+ * fix(types): handle option param in subdoc remove() #4231 [tdebarochez](https://github.com/tdebarochez)
+ * fix(document): dedupe modified paths #4226 #4223 [adambuczynski](https://github.com/adambuczynski)
+ * fix(model): don't modify user-provided options object #4221
+ * fix(document): handle setting nested path to empty object #4218 #4182
+ * fix(document): clean subpaths when removing single nested #4216
+ * fix(document): don't force transform on subdocs with inspect #4213
+ * fix(error): allow setting .messages object #4207
+
+4.5.0 / 2016-06-13
+==================
+ * feat(query): added Query.prototype.catch() #4215 #4173 [adambuczynski](https://github.com/adambuczynski)
+ * feat(query): add Query.prototype.cursor() as a .stream() alternative #4117 #3637 #1907
+ * feat(document): add markUnmodified() function #4092 [vincentcr](https://github.com/vincentcr)
+ * feat(aggregate): convert aggregate object to a thenable #3995 #3946 [megagon](https://github.com/megagon)
+ * perf(types): remove defineProperties call for array (**Note:** Because of this, a mongoose array will no longer `assert.deepEqual()` a plain old JS array) #3886
+ * feat(model): add hooks for insertMany() #3846
+ * feat(schema): add support for custom query methods #3740 #2372
+ * feat(drivers): emit error on 'serverClosed' because that means that reconnect failed #3615
+ * feat(model): emit error event when callback throws exception #3499
+ * feat(model): inherit options from discriminator base schema #3414 #1818
+ * feat(populate): expose mongoose-populate-virtuals inspired populate API #2562
+ * feat(document): trigger remove hooks on subdocs when removing parent #2348
+ * feat(schema): add support for express-style error handling middleware #2284
+ * fix(model): disallow setting discriminator key #2041
+ * feat(schema): add support for nested arrays #1361
+
+4.4.20 / 2016-06-05
+===================
+ * docs: clarify command buffering when using driver directly #4195
+ * fix(promise): correct broken mpromise .catch() #4189
+ * fix(document): clean modified subpaths when set path to empty obj #4182
+ * fix(query): support minDistance with query casting and `.near()` #4179
+ * fix(model): remove unnecessary .save() promise #4177
+ * fix(schema): cast all valid ObjectId strings to object ids #3365
+ * docs: remove unclear "unsafe" term in query docs #3282
+
+4.4.19 / 2016-05-21
+===================
+ * fix(model): handle insertMany if timestamps not set #4171
+
+4.4.18 / 2016-05-21
+===================
+ * docs: add missing period #4170 [gitname](https://github.com/gitname)
+ * docs: change build badge to svg #4158 [a0viedo](https://github.com/a0viedo)
+ * fix(model): update timestamps when setting `createdAt` #4155
+ * fix(utils): make sure to require in document properly #4152
+ * fix(model): throw overwrite error when discriminator name conflicts #4148
+
+4.4.17 / 2016-05-13
+===================
+ * docs: remove repetition in QueryStream docs #4147 [hugoabonizio](https://github.com/hugoabonizio)
+ * fix(document): dont double-validate doc array elements #4145
+ * fix(document): call required function with correct scope #4142 [JedWatson](https://github.com/JedWatson)
+
+4.4.16 / 2016-05-09
+===================
+ * refactor(document): use function reference #4133 [dciccale](https://github.com/dciccale)
+ * docs(querystream): clarify `destroy()` and close event #4126 [AnthonyCC](https://github.com/AnthonyCC)
+ * test: make before hook fail fast if it can't connect #4121
+ * docs: add description of CastError constructor params #4120
+ * fix(schematype): ensure single embedded defaults have $parent #4115
+ * fix(document): mark nested paths for validation #4111
+ * fix(schema): make sure element is always a subdoc in doc array validation #3816
+
+4.4.15 / 2016-05-06
+===================
+ * fix(schema): support overwriting array default #4109
+ * fix(populate): assign values when resolving each populate #4104
+ * fix(aggregate): dont send async option to server #4101
+ * fix(model): ensure isNew set to false after insertMany #4099
+ * fix(connection): emit on error if listeners and no callback #4098
+ * fix(document): treat required fn that returns false as required: false #4094
+
+4.4.14 / 2016-04-27
+===================
+ * fix: upgrade mongodb -> 2.1.18 #4102
+ * feat(connection): allow setting mongos as a uri query param #4093 #4035 [burtonjc](https://github.com/burtonjc)
+ * fix(populate): make sure to use correct assignment order for each model #4073
+ * fix(schema): add complete set of geospatial operators for single embedded subdocs #4014
+
+3.8.40 / 2016-04-24
+===================
+ * upgraded; mquery -> 1.10.0 #3989
+
+4.4.13 / 2016-04-21
+===================
+ * docs: add docs favicons #4082 [robertjustjones](https://github.com/robertjustjones)
+ * docs(model): correct Model.remove() return value #4075 [Jokero](https://github.com/Jokero)
+ * fix(query): add $geoWithin query casting for single embedded docs #4044
+ * fix(schema): handle setting trim option to falsy #4042
+ * fix(query): handle setDefaultsOnInsert with empty update #3835
+
+4.4.12 / 2016-04-08
+===================
+ * docs(query): document context option for update and findOneAndUpdate #4055
+ * docs(query): correct link to $geoWithin docs #4050
+ * fix(project): upgrade to mongodb driver 2.1.16 #4048 [schmalliso](https://github.com/schmalliso)
+ * docs(validation): fix validation docs #4028
+ * fix(types): improve .id() check for document arrays #4011
+ * fix(query): remove premature return when using $rename #3171
+ * docs(connection): clarify relationship between models and connections #2157
+
+4.4.11 / 2016-04-03
+===================
+ * fix: upgrade to mongodb driver 2.1.14 #4036 #4030 #3945
+ * fix(connection): allow connecting with { mongos: true } to handle query params #4032 [burtonjc](https://github.com/burtonjc)
+ * docs(connection): add autoIndex example #4026 [tilleps](https://github.com/tilleps)
+ * fix(query): handle passRawResult option when zero results #4023
+ * fix(populate): clone options before modifying #4022
+ * docs: add missing whitespace #4019 [chenxsan](https://github.com/chenxsan)
+ * chore: upgrade to ESLint 2.4.0 #4015 [ChristianMurphy](https://github.com/ChristianMurphy)
+ * fix(types): single nested subdocs get ids by default #4008
+ * chore(project): add dependency status badge #4007 [Maheshkumar-Kakade](http://github.com/Maheshkumar-Kakade)
+ * fix: make sure timestamps don't trigger unnecessary updates #4005 #3991 [tommarien](https://github.com/tommarien)
+ * fix(document): inspect inherits schema options #4001
+ * fix(populate): don't mark populated path as modified if setting to object w/ same id #3992
+ * fix(document): support kind argument to invalidate #3965
+
+4.4.10 / 2016-03-24
+===================
+ * fix(document): copy isNew when copying a document #3982
+ * fix(document): don't override defaults with undefined keys #3981
+ * fix(populate): merge multiple deep populate options for the same path #3974
+
+4.4.9 / 2016-03-22
+==================
+ * fix: upgrade mongodb -> 2.1.10 re https://jira.mongodb.org/browse/NODE-679 #4010
+ * docs: add syntax highlighting for acquit examples #3975
+
+4.4.8 / 2016-03-18
+==================
+ * docs(aggregate): clarify promises #3990 [megagon](https://github.com/megagon)
+ * fix: upgrade mquery -> 1.10 #3988 [matskiv](https://github.com/matskiv)
+ * feat(connection): 'all' event for repl sets #3986 [xizhibei](https://github.com/xizhibei)
+ * docs(types): clarify Array.pull #3985 [seriousManual](https://github.com/seriousManual)
+ * feat(query): support array syntax for .sort() via mquery 1.9 #3980
+ * fix(populate): support > 3 level nested populate #3973
+ * fix: MongooseThenable exposes connection correctly #3972
+ * docs(connection): add note about reconnectTries and reconnectInterval #3969
+ * feat(document): invalidate returns the new validationError #3964
+ * fix(query): .eq() as shorthand for .equals #3953 [Fonger](https://github.com/Fonger)
+ * docs(connection): clarify connection string vs passed options #3941
+ * docs(query): select option for findOneAndUpdate #3933
+ * fix(error): ValidationError.properties no longer enumerable #3925
+ * docs(validation): clarify how required validators work with nested schemas #3915
+ * fix: upgrade mongodb driver -> 2.1.8 to make partial index errors more sane #3864
+
+4.4.7 / 2016-03-11
+==================
+ * fix(query): stop infinite recursion caused by merging a mongoose buffer #3961
+ * fix(populate): handle deep populate array -> array #3954
+ * fix(schema): allow setting timestamps with .set() #3952 #3951 #3907 [Fonger](https://github.com/Fonger)
+ * fix: MongooseThenable doesn't overwrite constructors #3940
+ * fix(schema): don't cast boolean to date #3935
+ * fix(drivers): support sslValidate in connection string #3929
+ * fix(types): correct markModified() for single nested subdocs #3910
+ * fix(drivers): catch and report any errors that occur in driver methods #3906
+ * fix(populate): get subpopulate model correctly when array under nested #3904
+ * fix(document): allow fields named 'pre' and 'post' #3902
+ * docs(query): clarify runValidators and setDefaultsOnInsert options #3892
+ * docs(validation): show how to use custom required messages in schema #2616
+
+4.4.6 / 2016-03-02
+==================
+ * fix: upgrade mongodb driver to 2.1.7 #3938
+ * docs: fix plugins link #3917 #3909 [fbertone](https://github.com/fbertone)
+ * fix(query): sort+select with count works #3914
+ * fix(query): improve mergeUpdate's ability to handle nested docs #3890
+
+4.4.5 / 2016-02-24
+==================
+ * fix(query): ability to select a length field (upgrade to mquery 1.7.0) #3903
+ * fix: include nested CastError as reason for array CastError #3897 [kotarou3](https://github.com/kotarou3)
+ * fix(schema): check for doc existence before taking fields #3889
+ * feat(schema): useNestedStrict option to take nested strict mode for update #3883
+ * docs(validation): clarify relationship between required and checkRequired #3822
+ * docs(populate): dynamic reference docs #3809
+ * docs: expand dropdown when clicking on file name #3807
+ * docs: plugins.mongoosejs.io is up #3127
+ * fix(schema): ability to add a virtual with same name as removed path #2398
+
+4.4.4 / 2016-02-17
+==================
+ * fix(schema): handle field selection when casting single nested subdocs #3880
+ * fix(populate): populating using base model with multiple child models in result #3878
+ * fix: ability to properly use return value of `mongoose.connect()` #3874
+ * fix(populate): dont hydrate populated subdoc if lean option set #3873
+ * fix(connection): dont re-auth if already connected with useDb #3871
+ * docs: cover how to set underlying driver's promise lib #3869
+ * fix(document): handle conflicting names in validation errors with subdocs #3867
+ * fix(populate): set undefined instead of null consistently when populate couldn't find results #3859
+ * docs: link to `execPopulate()` in `doc.populate()` docs #3836
+ * docs(plugin): link to the `mongoose.plugin()` function #3732
+
+4.4.3 / 2016-02-09
+==================
+ * fix: upgrade to mongodb 2.1.6 to remove kerberos log output #3861 #3860 [cartuchogl](https://github.com/cartuchogl)
+ * fix: require('mongoose') is no longer a pseudo-promise #3856
+ * fix(query): update casting for single nested docs #3820
+ * fix(populate): deep populating multiple paths with same options #3808
+ * docs(middleware): clarify save/validate hook order #1149
+
+4.4.2 / 2016-02-05
+==================
+ * fix(aggregate): handle calling .cursor() with no options #3855
+ * fix: upgrade mongodb driver to 2.1.5 for GridFS memory leak fix #3854
+ * docs: fix schematype.html conflict #3853 #3850 #3843
+ * fix(model): bluebird unhandled rejection with ensureIndexes() on init #3837
+ * docs: autoIndex option for createConnection #3805
+
+4.4.1 / 2016-02-03
+==================
+ * fix: linting broke some cases where we use `== null` as shorthand #3852
+ * docs: fix up schematype.html conflict #3848 #3843 [mynameiscoffey](https://github.com/mynameiscoffey)
+ * fix: backwards breaking change with `.connect()` return value #3847
+ * docs: downgrade dox and highlight.js to fix docs build #3845
+ * docs: clean up typo #3842 [Flash-](https://github.com/Flash-)
+ * fix(document): storeShard handles undefined values #3841
+ * chore: more linting #3838 [TrejGun](https://github.com/TrejGun)
+ * fix(schema): handle `text: true` as a way to declare a text index #3824
+
+4.4.0 / 2016-02-02
+==================
+ * docs: fix expireAfterSeconds index option name #3831 [Flash-](https://github.com/Flash-)
+ * chore: run lint after test #3829 [ChristianMurphy](https://github.com/ChristianMurphy)
+ * chore: use power-assert instead of assert #3828 [TrejGun](https://github.com/TrejGun)
+ * chore: stricter lint #3827 [TrejGun](https://github.com/TrejGun)
+ * feat(types): casting moment to date #3813 [TrejGun](https://github.com/TrejGun)
+ * chore: comma-last lint for test folder #3810 [ChristianMurphy](https://github.com/ChristianMurphy)
+ * fix: upgrade async mpath, mpromise, muri, and sliced #3801 [TrejGun](https://github.com/TrejGun)
+ * fix(query): geo queries now return proper ES2015 promises #3800 [TrejGun](https://github.com/TrejGun)
+ * perf(types): use `Object.defineProperties()` for array #3799 [TrejGun](https://github.com/TrejGun)
+ * fix(model): mapReduce, ensureIndexes, remove, and save properly return ES2015 promises #3795 #3628 #3595 [TrejGun](https://github.com/TrejGun)
+ * docs: fixed dates in History.md #3791 [Jokero](https://github.com/Jokero)
+ * feat: connect, open, openSet, and disconnect return ES2015 promises #3790 #3622 [TrejGun](https://github.com/TrejGun)
+ * feat: custom type for int32 via mongoose-int32 npm package #3652 #3102
+ * feat: basic custom schema type API #995
+ * feat(model): `insertMany()` for more performant bulk inserts #723
+
+4.3.7 / 2016-01-23
+==================
+ * docs: grammar fix in timestamps docs #3786 [zclancy](https://github.com/zclancy)
+ * fix(document): setting nested populated docs #3783 [slamuu](https://github.com/slamuu)
+ * fix(document): don't call post save hooks twice for pushed docs #3780
+ * fix(model): handle `_id=0` correctly #3776
+ * docs(middleware): async post hooks #3770
+ * docs: remove confusing sentence #3765 [marcusmellis89](https://github.com/marcusmellis89)
+
+3.8.39 / 2016-01-15
+===================
+ * fixed; casting a number to a buffer #3764
+ * fixed; enumerating virtual property with nested objects #3743 [kusold](https://github.com/kusold)
+
+4.3.6 / 2016-01-15
+==================
+ * fix(types): casting a number to a buffer #3764
+ * fix: add "listener" to reserved keywords #3759
+ * chore: upgrade uglify #3757 [ChristianMurphy](https://github.com/ChristianMurphy)
+ * fix: broken execPopulate() in 4.3.5 #3755 #3753
+ * fix: ability to remove() a single embedded doc #3754
+ * style: comma-last in test folder #3751 [ChristianMurphy](https://github.com/ChristianMurphy)
+ * docs: clarify versionKey option #3747
+ * fix: improve colorization for arrays #3744 [TrejGun](https://github.com/TrejGun)
+ * fix: webpack build #3713
+
+4.3.5 / 2016-01-09
+==================
+ * fix(query): throw when 4th parameter to update not a function #3741 [kasselTrankos](https://github.com/kasselTrankos)
+ * fix(document): separate error type for setting an object to a primitive #3735
+ * fix(populate): Model.populate returns ES6 promise #3734
+ * fix(drivers): re-register event handlers after manual reconnect #3729
+ * docs: broken links #3727
+ * fix(validation): update validators run array validation #3724
+ * docs: clarify the need to use markModified with in-place date ops #3722
+ * fix(document): mark correct path as populated when manually populating array #3721
+ * fix(aggregate): support for array pipeline argument to append #3718 [dbkup](https://github.com/dbkup)
+ * docs: clarify `.connect()` callback #3705
+ * fix(schema): properly validate nested single nested docs #3702
+ * fix(types): handle setting documentarray of wrong type #3701
+ * docs: broken links #3700
+ * fix(drivers): debug output properly displays '0' #3689
+
+3.8.38 / 2016-01-07
+===================
+ * fixed; aggregate.append an array #3730 [dbkup](https://github.com/dbkup)
+
+4.3.4 / 2015-12-23
+==================
+ * fix: upgrade mongodb driver to 2.1.2 for repl set error #3712 [sansmischevia](https://github.com/sansmischevia)
+ * docs: validation docs typo #3709 [ivanmaeder](https://github.com/ivanmaeder)
+ * style: remove unused variables #3708 [ChristianMurphy](https://github.com/ChristianMurphy)
+ * fix(schema): duck-typing for schemas #3703 [mgcrea](https://github.com/mgcrea)
+ * docs: connection sample code issue #3697
+ * fix(schema): duck-typing for schemas #3693 [mgcrea](https://github.com/mgcrea)
+ * docs: clarify id schema option #3638
+
+4.3.3 / 2015-12-18
+==================
+ * fix(connection): properly support 'replSet' as well as 'replset' #3688 [taxilian](https://github.com/taxilian)
+ * fix(document): single nested doc pre hooks called before nested doc array #3687 [aliatsis](https://github.com/aliatsis)
+
+4.3.2 / 2015-12-17
+==================
+ * fix(document): .set() into single nested schemas #3686
+ * fix(connection): support 'replSet' as well as 'replset' option #3685
+ * fix(document): bluebird unhandled rejection when validating doc arrays #3681
+ * fix(document): hooks for doc arrays in single nested schemas #3680
+ * fix(document): post hooks for single nested schemas #3679
+ * fix: remove unused npm module #3674 [sybarite](https://github.com/sybarite)
+ * fix(model): don't swallow exceptions in nested doc save callback #3671
+ * docs: update keepAlive info #3667 [ChrisZieba](https://github.com/ChrisZieba)
+ * fix(document): strict 'throw' throws a specific mongoose error #3662
+ * fix: flakey test #3332
+ * fix(query): more robust check for RegExp #2969
+
+4.3.1 / 2015-12-11
+==================
+ * feat(aggregate): `.sample()` helper #3665
+ * fix(query): bitwise query operators with buffers #3663
+ * docs(migration): clarify `new` option and findByIdAndUpdate #3661
+
+4.3.0 / 2015-12-09
+==================
+ * feat(query): support for mongodb 3.2 bitwise query operators #3660
+ * style: use comma-last style consistently #3657 [ChristianMurphy](https://github.com/ChristianMurphy)
+ * feat: upgrade mongodb driver to 2.1.0 for full MongoDB 3.2 support #3656
+ * feat(aggregate): `.lookup()` helper #3532
+
+4.2.10 / 2015-12-08
+===================
+ * fixed; upgraded marked #3653 [ChristianMurphy](https://github.com/ChristianMurphy)
+ * docs; cross-db populate #3648
+ * docs; update mocha URL #3646 [ojhaujjwal](https://github.com/ojhaujjwal)
+ * fixed; call close callback asynchronously #3645
+ * docs; virtuals.html issue #3644 [Psarna94](https://github.com/Psarna94)
+ * fixed; single embedded doc casting on init #3642
+ * docs; validation docs improvements #3640
+
+4.2.9 / 2015-12-02
+==================
+ * docs; defaults docs #3625
+ * fix; nested numeric keys causing an embedded document crash #3623
+ * fix; apply path getters before virtual getters #3618
+ * fix; casting for arrays in single nested schemas #3616
+
+4.2.8 / 2015-11-25
+==================
+ * docs; clean up README links #3612 [ReadmeCritic](https://github.com/ReadmeCritic)
+ * fix; ESLint improvements #3605 [ChristianMurphy](https://github.com/ChristianMurphy)
+ * fix; assigning single nested subdocs #3601
+ * docs; describe custom logging functions in `mongoose.set()` docs #3557
+
+4.2.7 / 2015-11-20
+==================
+ * fixed; readPreference connection string option #3600
+ * fixed; pulling from manually populated arrays #3598 #3579
+ * docs; FAQ about OverwriteModelError #3597 [stcruy](https://github.com/stcruy)
+ * fixed; setting single embedded schemas to null #3596
+ * fixed; indexes for single embedded schemas #3594
+ * docs; clarify projection for `findOne()` #3593 [gunar](https://github.com/gunar)
+ * fixed; .ownerDocument() method on single embedded schemas #3589
+ * fixed; properly throw casterror for query on single embedded schema #3580
+ * upgraded; mongodb driver -> 2.0.49 for reconnect issue fix #3481
+
+4.2.6 / 2015-11-16
+==================
+ * fixed; ability to manually populate an array #3575
+ * docs; clarify `isAsync` parameter to hooks #3573
+ * fixed; use captureStackTrace if possible instead #3571
+ * fixed; crash with buffer and update validators #3565 [johnpeb](https://github.com/johnpeb)
+ * fixed; update casting with operators overwrite: true #3564
+ * fixed; validation with single embedded docs #3562
+ * fixed; inline docs inherit parents $type key #3560
+ * docs; bad grammar in populate docs #3559 [amaurymedeiros](https://github.com/amaurymedeiros)
+ * fixed; properly handle populate option for find() #2321
+
+3.8.37 / 2015-11-16
+===================
+ * fixed; use retainKeyOrder for cloning update op #3572
+
+4.2.5 / 2015-11-09
+==================
+ * fixed; handle setting fields in pre update hooks with exec #3549
+ * upgraded; ESLint #3547 [ChristianMurphy](https://github.com/ChristianMurphy)
+ * fixed; bluebird unhandled rejections with cast errors and .exec #3543
+ * fixed; min/max validators handling undefined #3539
+ * fixed; standalone mongos connections #3537
+ * fixed; call `.toObject()` when setting a single nested doc #3535
+ * fixed; single nested docs now have methods #3534
+ * fixed; single nested docs with .create() #3533 #3521 [tusbar](https://github.com/tusbar)
+ * docs; deep populate docs #3528
+ * fixed; deep populate schema ref handling #3507
+ * upgraded; mongodb driver -> 2.0.48 for sort overflow issue #3493
+ * docs; clarify default ids for discriminators #3482
+ * fixed; properly support .update(doc) #3221
+
+4.2.4 / 2015-11-02
+==================
+ * fixed; upgraded `ms` package for security vulnerability #3524 [fhemberger](https://github.com/fhemberger)
+ * fixed; ESlint rules #3517 [ChristianMurphy](https://github.com/ChristianMurphy)
+ * docs; typo in aggregation docs #3513 [rafakato](https://github.com/rafakato)
+ * fixed; add `dontThrowCastError` option to .update() for promises #3512
+ * fixed; don't double-cast buffers in node 4.x #3510 #3496
+ * fixed; population with single embedded schemas #3501
+ * fixed; pre('set') hooks work properly #3479
+ * docs; promises guide #3441
+
+4.2.3 / 2015-10-26
+==================
+ * docs; remove unreferenced function in middleware.jade #3506
+ * fixed; handling auth with no username/password #3500 #3498 #3484 [mleanos](https://github.com/mleanos)
+ * fixed; more ESlint rules #3491 [ChristianMurphy](https://github.com/ChristianMurphy)
+ * fixed; swallowing exceptions in save callback #3478
+ * docs; fixed broken links in subdocs guide #3477
+ * fixed; casting booleans to numbers #3475
+ * fixed; report CastError for subdoc arrays in findOneAndUpdate #3468
+ * fixed; geoNear returns ES6 promise #3458
+
+4.2.2 / 2015-10-22
+==================
+ * fixed; go back to old pluralization code #3490
+
+4.2.1 / 2015-10-22
+==================
+ * fixed; pluralization issues #3492 [ChristianMurphy](https://github.com/ChristianMurphy)
+
+4.2.0 / 2015-10-22
+==================
+ * added; support for skipVersioning for document arrays #3467 [chazmo03](https://github.com/chazmo03)
+ * added; ability to customize schema 'type' key #3459 #3245
+ * fixed; writeConcern for index builds #3455
+ * added; emit event when individual index build starts #3440 [objectiveSee](https://github.com/objectiveSee)
+ * added; 'context' option for update validators #3430
+ * refactor; pluralization now in separate pluralize-mongoose npm module #3415 [ChristianMurphy](https://github.com/ChristianMurphy)
+ * added; customizable error validation messages #3406 [geronime](https://github.com/geronime)
+ * added; support for passing 'minimize' option to update #3381
+ * added; ability to customize debug logging format #3261
+ * added; baseModelName property for discriminator models #3202
+ * added; 'emitIndexErrors' option #3174
+ * added; 'async' option for aggregation cursor to support buffering #3160
+ * added; ability to skip validation for individual save() calls #2981
+ * added; single embedded schema support #2689 #585
+ * added; depopulate function #2509
+
+4.1.12 / 2015-10-19
+===================
+ * docs; use readPreference instead of slaveOk for Query.setOptions docs #3471 [buunguyen](https://github.com/buunguyen)
+ * fixed; more helpful error when regexp contains null bytes #3456
+ * fixed; x509 auth issue #3454 [NoxHarmonium](https://github.com/NoxHarmonium)
+
+3.8.36 / 2015-10-18
+===================
+ * fixed; Make array props non-enumerable #3461 [boblauer](https://github.com/boblauer)
+
+4.1.11 / 2015-10-12
+===================
+ * fixed; update timestamps for update() if they're enabled #3450 [isayme](https://github.com/isayme)
+ * fixed; unit test error on node 0.10 #3449 [isayme](https://github.com/isayme)
+ * docs; timestamp option docs #3448 [isayme](https://github.com/isayme)
+ * docs; fix unexpected indent #3443 [isayme](https://github.com/isayme)
+ * fixed; use ES6 promises for Model.prototype.remove() #3442
+ * fixed; don't use unused 'safe' option for index builds #3439
+ * fixed; elemMatch casting bug #3437 #3435 [DefinitelyCarter](https://github.com/DefinitelyCarter)
+ * docs; schema.index docs #3434
+ * fixed; exceptions in save() callback getting swallowed on mongodb 2.4 #3371
+
+4.1.10 / 2015-10-05
+===================
+ * docs; improve virtuals docs to explain virtuals schema option #3433 [zoyaH](https://github.com/zoyaH)
+ * docs; MongoDB server version compatibility guide #3427
+ * docs; clarify that findById and findByIdAndUpdate fire hooks #3422
+ * docs; clean up Model.save() docs #3420
+ * fixed; properly handle projection with just id #3407 #3412
+ * fixed; infinite loop when database document is corrupted #3405
+ * docs; clarify remove middleware #3388
+
+4.1.9 / 2015-09-28
+==================
+ * docs; minlength and maxlength string validation docs #3368 #3413 [cosmosgenius](https://github.com/cosmosgenius)
+ * fixed; linting for infix operators #3397 [ChristianMurphy](https://github.com/ChristianMurphy)
+ * fixed; proper casting for $all #3394
+ * fixed; unhandled rejection warnings with .create() #3391
+ * docs; clarify update validators on paths that aren't explicitly set #3386
+ * docs; custom validator examples #2778
+
+4.1.8 / 2015-09-21
+==================
+ * docs; fixed typo in example #3390 [kmctown](https://github.com/kmctown)
+ * fixed; error in toObject() #3387 [guumaster](https://github.com/guumaster)
+ * fixed; handling for casting null dates #3383 [alexmingoia](https://github.com/alexmingoia)
+ * fixed; passing composite ids to `findByIdAndUpdate` #3380
+ * fixed; linting #3376 #3375 [ChristianMurphy](https://github.com/ChristianMurphy)
+ * fixed; added NodeJS v4 to Travis #3374 [ChristianMurphy](https://github.com/ChristianMurphy)
+ * fixed; casting $elemMatch inside of $not #3373 [gaguirre](https://github.com/gaguirre)
+ * fixed; handle case where $slice is 0 #3369
+ * fixed; avoid running getters if path is populated #3357
+ * fixed; cast documents to objects when setting to a nested path #3346
+
+4.1.7 / 2015-09-14
+==================
+ * docs; typos in SchemaType documentation #3367 [jasson15](https://github.com/jasson15)
+ * fixed; MONGOOSE_DRIVER_PATH env variable again #3360
+ * docs; added validateSync docs #3353
+ * fixed; set findOne op synchronously in query #3344
+ * fixed; handling for `.pull()` on a documentarray without an id #3341
+ * fixed; use natural order for cloning update conditions #3338
+ * fixed; issue with strict mode casting for mixed type updates #3337
+
+4.1.6 / 2015-09-08
+==================
+ * fixed; MONGOOSE_DRIVER_PATH env variable #3345 [g13013](https://github.com/g13013)
+ * docs; global autoIndex option #3335 [albertorestifo](https://github.com/albertorestifo)
+ * docs; model documentation typos #3330
+ * fixed; report reason for CastError #3320
+ * fixed; .populate() no longer returns true after re-assigning #3308
+ * fixed; discriminators with aggregation geoNear #3304
+ * docs; discriminator docs #2743
+
+4.1.5 / 2015-09-01
+==================
+ * fixed; document.remove() removing all docs #3326 #3325
+ * fixed; connect() checks for rs_name in options #3299
+ * docs; examples for schema.set() #3288
+ * fixed; checkKeys issue with bluebird #3286 [gregthegeek](https://github.com/gregthegeek)
+
+4.1.4 / 2015-08-31
+==================
+ * fixed; ability to set strict: false for update #3305
+ * fixed; .create() properly uses ES6 promises #3297
+ * fixed; pre hooks on nested subdocs #3291 #3284 [aliatsis](https://github.com/aliatsis)
+ * docs; remove unclear text in .remove() docs #3282
+ * fixed; pre hooks called twice for 3rd-level nested doc #3281
+ * fixed; nested transforms #3279
+ * upgraded; mquery -> 1.6.3 #3278 #3272
+ * fixed; don't swallow callback errors by default #3273 #3222
+ * fixed; properly get nested paths from nested schemas #3265
+ * fixed; remove() with id undefined deleting all docs #3260 [thanpolas](https://github.com/thanpolas)
+ * fixed; handling for non-numeric projections #3256
+ * fixed; findById with id undefined returning first doc #3255
+ * fixed; use retainKeyOrder for update #3215
+ * added; passRawResult option to findOneAndUpdate for backwards compat #3173
+
+4.1.3 / 2015-08-16
+==================
+ * fixed; getUpdate() in pre update hooks #3520 [gregthegeek](https://github.com/gregthegeek)
+ * fixed; handleArray() ensures arg is an array #3238 [jloveridge](https://github.com/jloveridge)
+ * fixed; refresh required path cache when recreating docs #3199
+ * fixed; $ operator on unwind aggregation helper #3197
+ * fixed; findOneAndUpdate() properly returns raw result as third arg to callback #3173
+ * fixed; querystream with dynamic refs #3108
+
+3.8.35 / 2015-08-14
+===================
+ * fixed; handling for minimize on nested objects #2930
+ * fixed; don't crash when schema.path.options undefined #1824
+
+4.1.2 / 2015-08-10
+==================
+ * fixed; better handling for Jade templates #3241 [kbadk](https://github.com/kbadk)
+ * added; ESlint trailing spaces #3234 [ChristianMurphy](https://github.com/ChristianMurphy)
+ * added; ESlint #3191 [ChristianMurphy](https://github.com/ChristianMurphy)
+ * fixed; properly emit event on disconnect #3183
+ * fixed; copy options properly using Query.toConstructor() #3176
+ * fixed; setMaxListeners() issue in browser build #3170
+ * fixed; node driver -> 2.0.40 to not store undefined keys as null #3169
+ * fixed; update validators handle positional operator #3167
+ * fixed; handle $all + $elemMatch query casting #3163
+ * fixed; post save hooks don't swallow extra args #3155
+ * docs; spelling mistake in index.jade #3154
+ * fixed; don't crash when toObject() has no fields #3130
+ * fixed; apply toObject() recursively for find and update queries #3086 [naoina](https://github.com/naoina)
+
+4.1.1 / 2015-08-03
+==================
+ * fixed; aggregate exec() crash with no callback #3212 #3198 [jpgarcia](https://github.com/jpgarcia)
+ * fixed; pre init hooks now properly synchronous #3207 [burtonjc](https://github.com/burtonjc)
+ * fixed; updateValidators doesn't flatten dates #3206 #3194 [victorkohl](https://github.com/victorkohl)
+ * fixed; default fields don't make document dirty between saves #3205 [burtonjc](https://github.com/burtonjc)
+ * fixed; save passes 0 as numAffected rather than undefined when no change #3195 [burtonjc](https://github.com/burtonjc)
+ * fixed; better handling for positional operator in update #3185
+ * fixed; use Travis containers #3181 [ChristianMurphy](https://github.com/ChristianMurphy)
+ * fixed; leaked variable #3180 [ChristianMurphy](https://github.com/ChristianMurphy)
+
+4.1.0 / 2015-07-24
+==================
+ * added; `schema.queue()` now public #3193
+ * added; raw result as third parameter to findOneAndX callback #3173
+ * added; ability to run validateSync() on only certain fields #3153
+ * added; subPopulate #3103 [timbur](https://github.com/timbur)
+ * added; $isDefault function on documents #3077
+ * added; additional properties for built-in validator messages #3063 [KLicheR](https://github.com/KLicheR)
+ * added; getQuery() and getUpdate() functions for Query #3013
+ * added; export DocumentProvider #2996
+ * added; ability to remove path from schema #2993 [JohnnyEstilles](https://github.com/JohnnyEstilles)
+ * added; .explain() helper for aggregate #2714
+ * added; ability to specify which ES6-compatible promises library mongoose uses #2688
+ * added; export Aggregate #1910
+
+4.0.8 / 2015-07-20
+==================
+ * fixed; assignment with document arrays #3178 [rosston](https://github.com/rosston)
+ * docs; remove duplicate paragraph #3164 [rhmeeuwisse](https://github.com/rhmeeuwisse)
+ * docs; improve findOneAndXYZ parameter descriptions #3159 [rhmeeuwisse](https://github.com/rhmeeuwisse)
+ * docs; add findOneAndRemove to list of supported middleware #3158
+ * docs; clarify ensureIndex #3156
+ * fixed; refuse to save/remove document without id #3118
+ * fixed; hooks next() no longer accidentally returns promise #3104
+ * fixed; strict mode for findOneAndUpdate #2947
+ * added; .min.js.gz file for browser component #2806
+
+3.8.34 / 2015-07-20
+===================
+ * fixed; allow using $rename #3171
+ * fixed; no longer modifies update arguments #3008
+
+4.0.7 / 2015-07-11
+==================
+ * fixed; documentarray id method when using object id #3157 [siboulet](https://github.com/siboulet)
+ * docs; improve findById docs #3147
+ * fixed; update validators handle null properly #3136 [odeke-em](https://github.com/odeke-em)
+ * docs; jsdoc syntax errors #3128 [rhmeeuwisse](https://github.com/rhmeeuwisse)
+ * docs; fix typo #3126 [rhmeeuwisse](https://github.com/rhmeeuwisse)
+ * docs; proper formatting in queries.jade #3121 [rhmeeuwisse](https://github.com/rhmeeuwisse)
+ * docs; correct example for string maxlength validator #3111 [rhmeeuwisse](https://github.com/rhmeeuwisse)
+ * fixed; setDefaultsOnInsert with arrays #3107
+ * docs; LearnBoost -> Automattic in package.json #3099
+ * docs; pre update hook example #3094 [danpe](https://github.com/danpe)
+ * docs; clarify query middleware example #3051
+ * fixed; ValidationErrors in strict mode #3046
+ * fixed; set findOneAndUpdate properties before hooks run #3024
+
+3.8.33 / 2015-07-10
+===================
+ * upgraded; node driver -> 1.4.38
+ * fixed; dont crash when `match` validator undefined
+
+4.0.6 / 2015-06-21
+==================
+ * upgraded; node driver -> 2.0.34 #3087
+ * fixed; apply setters on addToSet, etc #3067 [victorkohl](https://github.com/victorkohl)
+ * fixed; missing semicolons #3065 [sokolikp](https://github.com/sokolikp)
+ * fixed; proper handling for async doc hooks #3062 [gregthegeek](https://github.com/gregthegeek)
+ * fixed; dont set failed populate field to null if other docs are successfully populated #3055 [eloytoro](https://github.com/eloytoro)
+ * fixed; setDefaultsOnInsert with document arrays #3034 [taxilian](https://github.com/taxilian)
+ * fixed; setters fired on array items #3032
+ * fixed; stop validateSync() on first error #3025 [victorkohl](https://github.com/victorkohl)
+ * docs; improve query docs #3016
+ * fixed; always exclude _id when its deselected #3010
+ * fixed; enum validator kind property #3009
+ * fixed; mquery collection names #3005
+ * docs; clarify mongos option #3000
+ * docs; clarify that query builder has a .then() #2995
+ * fixed; race condition in dynamic ref #2992
+
+3.8.31 / 2015-06-20
+===================
+ * fixed; properly handle text search with discriminators and $meta #2166
+
+4.0.5 / 2015-06-05
+==================
+ * fixed; ObjectIds and buffers when mongodb driver is a sibling dependency #3050 #3048 #3040 #3031 #3020 #2988 #2951
+ * fixed; warn user when 'increment' is used in schema #3039
+ * fixed; setDefaultsOnInsert with array in schema #3035
+ * fixed; dont use default Object toString to cast to string #3030
+ * added; npm badge #3020 [odeke-em](https://github.com/odeke-em)
+ * fixed; proper handling for calling .set() with a subdoc #2782
+ * fixed; dont throw cast error when using $rename on non-string path #1845
+
+3.8.30 / 2015-06-05
+===================
+ * fixed; enable users to set all options with tailable() #2883
+
+4.0.4 / 2015-05-28
+==================
+ * docs; findAndModify new parameter correct default value #3012 [JonForest](https://github.com/JonForest)
+ * docs; clarify pluralization rules #2999 [anonmily](https://github.com/anonmily)
+ * fix; discriminators with schema methods #2978
+ * fix; make `isModified` a schema reserved keyword #2975
+ * fix; properly fire setters when initializing path with object #2943
+ * fix; can use `setDefaultsOnInsert` without specifying `runValidators` #2938
+ * fix; always set validation errors `kind` property #2885
+ * upgraded; node driver -> 2.0.33 #2865
+
+3.8.29 / 2015-05-27
+===================
+ * fixed; Handle JSON.stringify properly for nested docs #2990
+
+4.0.3 / 2015-05-13
+==================
+ * upgraded; mquery -> 1.5.1 #2983
+ * docs; clarify context for query middleware #2974
+ * docs; fix missing type -> kind rename in History.md #2961
+ * fixed; broken ReadPreference include on Heroku #2957
+ * docs; correct form for cursor aggregate option #2955
+ * fixed; sync post hooks now properly called after function #2949 #2925
+ * fixed; fix sub-doc validate() function #2929
+ * upgraded; node driver -> 2.0.30 #2926
+ * docs; retainKeyOrder for save() #2924
+ * docs; fix broken class names #2913
+ * fixed; error when using node-clone on a doc #2909
+ * fixed; no more hard references to bson #2908 #2906
+ * fixed; dont overwrite array values #2907 [naoina](https://github.com/naoina)
+ * fixed; use readPreference=primary for findOneAndUpdate #2899 #2823
+ * docs; clarify that update validators only run on $set and $unset #2889
+ * fixed; set kind consistently for built-in validators #2885
+ * docs; single field populated documents #2884
+ * fixed; nested objects are now enumerable #2880 [toblerpwn](https://github.com/toblerpwn)
+ * fixed; properly populate field when ref, lean, stream used together #2841
+ * docs; fixed migration guide jade error #2807
+
+3.8.28 / 2015-05-12
+===================
+ * fixed; proper handling for toJSON options #2910
+ * fixed; dont attach virtuals to embedded docs in update() #2046
+
+4.0.2 / 2015-04-23
+==================
+ * fixed; error thrown when calling .validate() on subdoc not in an array #2902
+ * fixed; rename define() to play nice with webpack #2900 [jspears](https://github.com/jspears)
+ * fixed; pre validate called twice with discriminators #2892
+ * fixed; .inspect() on mongoose.Types #2875
+ * docs; correct callback params for Model.update #2872
+ * fixed; setDefaultsOnInsert now works when runValidators not specified #2870
+ * fixed; Document now wraps EventEmitter.addListener #2867
+ * fixed; call non-hook functions in schema queue #2856
+ * fixed; statics can be mocked out for tests #2848 [ninelb](https://github.com/ninelb)
+ * upgraded; mquery 1.4.0 for bluebird bug fix #2846
+ * fixed; required validators run first #2843
+ * docs; improved docs for new option to findAndMody #2838
+ * docs; populate example now uses correct field #2837 [swilliams](https://github.com/swilliams)
+ * fixed; pre validate changes causing VersionError #2835
+ * fixed; get path from correct place when setting CastError #2832
+ * docs; improve docs for Model.update() function signature #2827 [irnc](https://github.com/irnc)
+ * fixed; populating discriminators #2825 [chetverikov](https://github.com/chetverikov)
+ * fixed; discriminators with nested schemas #2821
+ * fixed; CastErrors with embedded docs #2819
+ * fixed; post save hook context #2816
+ * docs; 3.8.x -> 4.x migration guide #2807
+ * fixed; proper _distinct copying for query #2765 [cdelauder](https://github.com/cdelauder)
+
+3.8.27 / 2015-04-22
+===================
+ * fixed; dont duplicate db calls on Q.ninvoke() #2864
+ * fixed; Model.find arguments naming in docs #2828
+ * fixed; Support ipv6 in connection strings #2298
+
+3.8.26 / 2015-04-07
+===================
+ * fixed; TypeError when setting date to undefined #2833
+ * fixed; handle CastError properly in distinct() with no callback #2786
+ * fixed; broken links in queries docs #2779
+ * fixed; dont mark buffer as modified when setting type initially #2738
+ * fixed; dont crash when using slice with populate #1934
+
+4.0.1 / 2015-03-28
+==================
+ * fixed; properly handle empty cast doc in update() with promises #2796
+ * fixed; unstable warning #2794
+ * fixed; findAndModify docs now show new option is false by default #2793
+
+4.0.0 / 2015-03-25
+==================
+ * fixed; on-the-fly schema docs typo #2783 [artiifix](https://github.com/artiifix)
+ * fixed; cast error validation handling #2775 #2766 #2678
+ * fixed; discriminators with populate() #2773 #2719 [chetverikov](https://github.com/chetverikov)
+ * fixed; increment now a reserved path #2709
+ * fixed; avoid sending duplicate object ids in populate() #2683
+ * upgraded; mongodb to 2.0.24 to properly emit reconnect event multiple times #2656
+
+4.0.0-rc4 / 2015-03-14
+======================
+ * fixed; toObject virtuals schema option handled properly #2751
+ * fixed; update validators work on document arrays #2733
+ * fixed; check for cast errors on $set #2729
+ * fixed; instance field set for all schema types #2727 [csdco](https://github.com/csdco)
+ * fixed; dont run other validators if required fails #2725
+ * fixed; custom getters execute on ref paths #2610
+ * fixed; save defaults if they were set when doc was loaded from db #2558
+ * fixed; pre validate now runs before pre save #2462
+ * fixed; no longer throws errors with --use_strict #2281
+
+3.8.25 / 2015-03-13
+===================
+ * fixed; debug output reverses order of aggregation keys #2759
+ * fixed; $eq is a valid query selector in 3.0 #2752
+ * fixed; upgraded node driver to 1.4.32 for handling non-numeric poolSize #2682
+ * fixed; update() with overwrite sets _id for nested docs #2658
+ * fixed; casting for operators in $elemMatch #2199
+
+4.0.0-rc3 / 2015-02-28
+======================
+ * fixed; update() pre hooks run before validators #2706
+ * fixed; setters not called on arrays of refs #2698 [brandom](https://github.com/brandom)
+ * fixed; use node driver 2.0.18 for nodejs 0.12 support #2685
+ * fixed; comments reference file that no longer exists #2681
+ * fixed; populated() returns _id of manually populated doc #2678
+ * added; ability to exclude version key in toObject() #2675
+ * fixed; dont allow setting nested path to a string #2592
+ * fixed; can cast objects with _id field to ObjectIds #2581
+ * fixed; on-the-fly schema getters #2360
+ * added; strict option for findOneAndUpdate() #1967
+
+3.8.24 / 2015-02-25
+===================
+ * fixed; properly apply child schema transforms #2691
+ * fixed; make copy of findOneAndUpdate options before modifying #2687
+ * fixed; apply defaults when parent path is selected #2670 #2629
+ * fixed; properly get ref property for nested paths #2665
+ * fixed; node driver makes copy of authenticate options before modifying them #2619
+ * fixed; dont block process exit when auth fails #2599
+ * fixed; remove redundant clone in update() #2537
+
+4.0.0-rc2 / 2015-02-10
+======================
+ * added; io.js to travis build
+ * removed; browser build dependencies not installed by default
+ * added; dynamic refpaths #2640 [chetverikov](https://github.com/chetverikov)
+ * fixed; dont call child schema transforms on parent #2639 [chetverikov](https://github.com/chetverikov)
+ * fixed; get rid of remove option if new is set in findAndModify #2598
+ * fixed; aggregate all document array validation errors #2589
+ * fixed; custom setters called when setting value to undefined #1892
+
+3.8.23 / 2015-02-06
+===================
+ * fixed; unset opts.remove when upsert is true #2519
+ * fixed; array saved as object when path is object in array #2442
+ * fixed; inline transforms #2440
+ * fixed; check for callback in count() #2204
+ * fixed; documentation for selecting fields #1534
+
+4.0.0-rc1 / 2015-02-01
+======================
+ * fixed; use driver 2.0.14
+ * changed; use transform: true by default #2245
+
+4.0.0-rc0 / 2015-01-31
+===================
+ * fixed; wrong order for distinct() params #2628
+ * fixed; handling no query argument to remove() #2627
+ * fixed; createModel and discriminators #2623 [ashaffer](https://github.com/ashaffer)
+ * added; pre('count') middleware #2621
+ * fixed; double validation calls on document arrays #2618
+ * added; validate() catches cast errors #2611
+ * fixed; respect replicaSet parameter in connection string #2609
+ * added; can explicitly exclude paths from versioning #2576 [csabapalfi](https://github.com/csabapalfi)
+ * upgraded; driver to 2.0.15 #2552
+ * fixed; save() handles errors more gracefully in ES6 #2371
+ * fixed; undefined is now a valid argument to findOneAndUpdate #2272
+ * changed; `new` option to findAndModify ops is false by default #2262
+
+3.8.22 / 2015-01-24
+===================
+ * upgraded; node-mongodb-native to 1.4.28 #2587 [Climax777](https://github.com/Climax777)
+ * added; additional documentation for validators #2449
+ * fixed; stack overflow when creating massive arrays #2423
+ * fixed; undefined is a valid id for queries #2411
+ * fixed; properly create nested schema index when same schema used twice #2322
+ * added; link to plugin generator in docs #2085 [huei90](https://github.com/huei90)
+ * fixed; optional arguments documentation for findOne() #1971 [nachinius](https://github.com/nachinius)
+
+3.9.7 / 2014-12-19
+===================
+ * added; proper cursors for aggregate #2539 [changyy](https://github.com/changyy)
+ * added; min/max built-in validators for dates #2531 [bshamblen](https://github.com/bshamblen)
+ * fixed; save and validate are now reserved keywords #2380
+ * added; basic documentation for browser component #2256
+ * added; find and findOne hooks (query middleware) #2138
+ * fixed; throw a DivergentArrayError when saving positional operator queries #2031
+ * added; ability to use options as a document property #1416
+ * fixed; document no longer inherits from event emitter and so domain and _events are no longer reserved #1351
+ * removed; setProfiling #1349
+
+3.8.21 / 2014-12-18
+===================
+ * fixed; syntax in index.jade #2517 [elderbas](https://github.com/elderbas)
+ * fixed; writable statics #2510 #2528
+ * fixed; overwrite and explicit $set casting #2515
+
+3.9.6 / 2014-12-05
+===================
+ * added; correctly run validators on each element of array when entire array is modified #661 #1227
+ * added; castErrors in validation #1013 [jondavidjohn](https://github.com/jondavidjohn)
+ * added; specify text indexes in schema fields #1401 [sr527](https://github.com/sr527)
+ * added; ability to set field with validators to undefined #1594 [alabid](https://github.com/alabid)
+ * added; .create() returns an array when passed an array #1746 [alabid](https://github.com/alabid)
+ * added; test suite and docs for use with co and yield #2177 #2474
+ * fixed; subdocument toObject() transforms #2447 [chmanie](https://github.com/chmanie)
+ * fixed; Model.create() with save errors #2484
+ * added; pass options to .save() and .remove() #2494 [jondavidjohn](https://github.com/jondavidjohn)
+
+3.8.20 / 2014-12-01
+===================
+ * fixed; recursive readPref #2490 [kjvalencik](https://github.com/kjvalencik)
+ * fixed; make sure to copy parameters to update() before modifying #2406 [alabid](https://github.com/alabid)
+ * fixed; unclear documentation about query callbacks #2319
+ * fixed; setting a schema-less field to an empty object #2314 [alabid](https://github.com/alabid)
+ * fixed; registering statics and methods for discriminators #2167 [alabid](https://github.com/alabid)
+
+3.9.5 / 2014-11-10
+===================
+ * added; ability to disable autoIndex on a per-connection basis #1875 [sr527](https://github.com/sr527)
+ * fixed; `geoNear()` no longer enforces legacy coordinate pairs - supports GeoJSON #1987 [alabid](https://github.com/alabid)
+ * fixed; browser component works when minified with mangled variable names #2302
+ * fixed; `doc.errors` now cleared before `validate()` called #2302
+ * added; `execPopulate()` function to make `doc.populate()` compatible with promises #2317
+ * fixed; `count()` no longer throws an error when used with `sort()` #2374
+ * fixed; `save()` no longer recursively calls `save()` on populated fields #2418
+
+3.8.19 / 2014-11-09
+===================
+ * fixed; make sure to not override subdoc _ids on find #2276 [alabid](https://github.com/alabid)
+ * fixed; exception when comparing two documents when one lacks _id #2333 [slawo](https://github.com/slawo)
+ * fixed; getters for properties with non-strict schemas #2439 [alabid](https://github.com/alabid)
+ * fixed; inconsistent URI format in docs #2414 [sr527](https://github.com/sr527)
+
+3.9.4 / 2014-10-25
+==================
+ * fixed; statics no longer can be overwritten #2343 [nkcmr](https://github.com/chetverikov)
+ * added; ability to set single populated paths to documents #1530
+ * added; setDefaultsOnInsert and runValidator options for findOneAndUpdate() #860
+
+3.8.18 / 2014-10-22
+==================
+ * fixed; Dont use all toObject options in save #2340 [chetverikov](https://github.com/chetverikov)
+
+3.9.3 / 2014-10-01
+=================
+ * added; support for virtuals that return objects #2294
+ * added; ability to manually hydrate POJOs into mongoose objects #2292
+ * added; setDefaultsOnInsert and runValidator options for update() #860
+
+3.8.17 / 2014-09-29
+==================
+ * fixed; use schema options retainKeyOrder in save() #2274
+ * fixed; fix skip in populate when limit is set #2252
+ * fixed; fix stack overflow when passing MongooseArray to findAndModify #2214
+ * fixed; optimize .length usage in populate #2289
+
+3.9.2 / 2014-09-08
+==================
+ * added; test coverage for browser component #2255
+ * added; in-order execution of validators #2243
+ * added; custom fields for validators #2132
+ * removed; exception thrown when find() used with count() #1950
+
+3.8.16 / 2014-09-08
+==================
+ * fixed; properly remove modified array paths if array has been overwritten #1638
+ * fixed; key check errors #1884
+ * fixed; make sure populate on an array always returns a Mongoose array #2214
+ * fixed; SSL connections with node 0.11 #2234
+ * fixed; return sensible strings for promise errors #2239
+
+3.9.1 / 2014-08-17
+==================
+ * added; alpha version of browser-side schema validation #2254
+ * added; support passing a function to schemas `required` field #2247
+ * added; support for setting updatedAt and createdAt timestamps #2227
+ * added; document.validate() returns a promise #2131
+
+3.8.15 / 2014-08-17
+==================
+ * fixed; Replica set connection string example in docs #2246
+ * fixed; bubble up parseError event #2229
+ * fixed; removed buggy populate cache #2176
+ * fixed; dont $inc versionKey if its being $set #1933
+ * fixed; cast $or and $and in $pull #1932
+ * fixed; properly cast to schema in stream() #1862
+ * fixed; memory leak in nested objects #1565 #2211 [devongovett](https://github.com/devongovett)
+
+3.8.14 / 2014-07-26
+==================
+ * fixed; stringifying MongooseArray shows nested arrays #2002
+ * fixed; use populated doc schema in toObject and toJSON by default #2035
+ * fixed; dont crash on arrays containing null #2140
+ * fixed; model.update w/ upsert has same return values on .exec and promise #2143
+ * fixed; better handling for populate limit with multiple documents #2151
+ * fixed; dont prevent users from adding weights to text index #2183
+ * fixed; helper for aggregation cursor #2187
+ * updated; node-mongodb-native to 1.4.7
+
+3.8.13 / 2014-07-15
+==================
+ * fixed; memory leak with isNew events #2159
+ * fixed; docs for overwrite option for update() #2144
+ * fixed; storeShard() handles dates properly #2127
+ * fixed; sub-doc changes not getting persisted to db after save #2082
+ * fixed; populate with _id: 0 actually removes _id instead of setting to undefined #2123
+ * fixed; save versionKey on findOneAndUpdate w/ upsert #2122
+ * fixed; fix typo in 2.8 docs #2120 [shakirullahi](https://github.com/shakirullahi)
+ * fixed; support maxTimeMs #2102 [yuukinajima](https://github.com/yuukinajima)
+ * fixed; support $currentDate #2019
+ * fixed; $addToSet handles objects without _ids properly #1973
+ * fixed; dont crash on invalid nearSphere query #1874
+
+3.8.12 / 2014-05-30
+==================
+ * fixed; single-server reconnect event fires #1672
+ * fixed; sub-docs not saved when pushed into populated array #1794
+ * fixed; .set() sometimes converts embedded docs to pojos #1954 [archangel-irk](https://github.com/archangel-irk)
+ * fixed; sub-doc changes not getting persisted to db after save #2082
+ * fixed; custom getter might cause mongoose to mistakenly think a path is dirty #2100 [pgherveou](https://github.com/pgherveou)
+ * fixed; chainable helper for allowDiskUse option in aggregation #2114
+
+3.9.0 (unstable) / 2014-05-22
+==================
+ * changed; added `domain` to reserved keywords #1338 #2052 [antoinepairet](https://github.com/antoinepairet)
+ * added; asynchronous post hooks #1977 #2081 [chopachom](https://github.com/chopachom) [JasonGhent](https://github.com/JasonGhent)
+ * added; using model for population, cross-db populate [mihai-chiorean](https://github.com/mihai-chiorean)
+ * added; can define a type for schema validators
+ * added; `doc.remove()` returns a promise #1619 [refack](https://github.com/refack)
+ * added; internal promises for hooks, pre-save hooks run in parallel #1732 [refack](https://github.com/refack)
+ * fixed; geoSearch hanging when no results returned #1846 [ghartnett](https://github.com/ghartnett)
+ * fixed; do not set .type property on ValidationError, use .kind instead #1323
+
+3.8.11 / 2014-05-22
+==================
+ * updated; node-mongodb-native to 1.4.5
+ * reverted; #2052, fixes #2097
+
+3.8.10 / 2014-05-20
+==================
+
+ * updated; node-mongodb-native to 1.4.4
+ * fixed; _.isEqual false negatives bug in js-bson #2070
+ * fixed; missing check for schema.options #2014
+ * fixed; missing support for $position #2024
+ * fixed; options object corruption #2049
+ * fixed; improvements to virtuals docs #2055
+ * fixed; added `domain` to reserved keywords #2052 #1338
+
+3.8.9 / 2014-05-08
+==================
+
+ * updated; mquery to 0.7.0
+ * updated; node-mongodb-native to 1.4.3
+ * fixed; $near failing against MongoDB 2.6
+ * fixed; relying on .options() to determine if collection exists
+ * fixed; $out aggregate helper
+ * fixed; all test failures against MongoDB 2.6.1, with caveat #2065
+
+3.8.8 / 2014-02-22
+==================
+
+ * fixed; saving Buffers #1914
+ * updated; expose connection states for user-land #1926 [yorkie](https://github.com/yorkie)
+ * updated; mquery to 0.5.3
+ * updated; added get / set to reserved path list #1903 [tstrimple](https://github.com/tstrimple)
+ * docs; README code highlighting, syntax fixes #1930 [IonicaBizau](https://github.com/IonicaBizau)
+ * docs; fixes link in the doc at #1925 [kapeels](https://github.com/kapeels)
+ * docs; add a missed word 'hook' for the description of the post-hook api #1924 [ipoval](https://github.com/ipoval)
+
+3.8.7 / 2014-02-09
+==================
+
+ * fixed; sending safe/read options in Query#exec #1895
+ * fixed; findOneAnd..() with sort #1887
+
+3.8.6 / 2014-01-30
+==================
+
+ * fixed; setting readPreferences #1895
+
+3.8.5 / 2014-01-23
+==================
+
+ * fixed; ssl setting when using URI #1882
+ * fixed; findByIdAndUpdate now respects the overwrite option #1809 [owenallenaz](https://github.com/owenallenaz)
+
+3.8.4 / 2014-01-07
+==================
+
+ * updated; mongodb driver to 1.3.23
+ * updated; mquery to 0.4.1
+ * updated; mpromise to 0.4.3
+ * fixed; discriminators now work when selecting fields #1820 [daemon1981](https://github.com/daemon1981)
+ * fixed; geoSearch with no results timeout #1846 [ghartnett](https://github.com/ghartnett)
+ * fixed; infitite recursion in ValidationError #1834 [chetverikov](https://github.com/chetverikov)
+
+3.8.3 / 2013-12-17
+==================
+
+ * fixed; setting empty array with model.update #1838
+ * docs; fix url
+
+3.8.2 / 2013-12-14
+==================
+
+ * fixed; enum validation of multiple values #1778 [heroicyang](https://github.com/heroicyang)
+ * fixed; global var leak #1803
+ * fixed; post remove now fires on subdocs #1810
+ * fixed; no longer set default empty array for geospatial-indexed fields #1668 [shirish87](https://github.com/shirish87)
+ * fixed; model.stream() not hydrating discriminators correctly #1792 [j](https://github.com/j)
+ * docs: Stablility -> Stability [nikmartin](https://github.com/nikmartin)
+ * tests; improve shard error handling
+
+3.8.1 / 2013-11-19
+==================
+
+ * fixed; mishandling of Dates with minimize/getters #1764
+ * fixed; Normalize bugs.email, so `npm` will shut up #1769 [refack](https://github.com/refack)
+ * docs; Improve the grammar where "lets us" was used #1777 [alexyoung](https://github.com/alexyoung)
+ * docs; Fix some grammatical issues in the documentation #1777 [alexyoung](https://github.com/alexyoung)
+ * docs; fix Query api exposure
+ * docs; fix return description
+ * docs; Added Notes on findAndUpdate() #1750 [sstadelman](https://github.com/sstadelman)
+ * docs; Update version number in README #1762 [Fodi69](https://github.com/Fodi69)
+
+3.8.0 / 2013-10-31
+==================
+
+ * updated; warn when using an unstable version
+ * updated; error message returned in doc.save() #1595
+ * updated; mongodb driver to 1.3.19 (fix error swallowing behavior)
+ * updated; mquery to 0.3.2
+ * updated; mocha to 1.12.0
+ * updated; mpromise 0.3.0
+ * updated; sliced 0.0.5
+ * removed; mongoose.Error.DocumentError (never used)
+ * removed; namedscope (undocumented and broken) #679 #642 #455 #379
+ * changed; no longer offically supporting node 0.6.x
+ * changed; query.within getter is now a method -> query.within()
+ * changed; query.intersects getter is now a method -> query.intersects()
+ * added; custom error msgs for built-in validators #747
+ * added; discriminator support #1647 #1003 [j](https://github.com/j)
+ * added; support disabled collection name pluralization #1350 #1707 [refack](https://github.com/refack)
+ * added; support for GeoJSON to Query#near [ebensing](https://github.com/ebensing)
+ * added; stand-alone base query support - query.toConstructor() [ebensing](https://github.com/ebensing)
+ * added; promise support to geoSearch #1614 [ebensing](https://github.com/ebensing)
+ * added; promise support for geoNear #1614 [ebensing](https://github.com/ebensing)
+ * added; connection.useDb() #1124 [ebensing](https://github.com/ebensing)
+ * added; promise support to model.mapReduce()
+ * added; promise support to model.ensureIndexes()
+ * added; promise support to model.populate()
+ * added; benchmarks [ebensing](https://github.com/ebensing)
+ * added; publicly exposed connection states #1585
+ * added; $geoWithin support #1529 $1455 [ebensing](https://github.com/ebensing)
+ * added; query method chain validation
+ * added; model.update `overwrite` option
+ * added; model.geoNear() support #1563 [ebensing](https://github.com/ebensing)
+ * added; model.geoSearch() support #1560 [ebensing](https://github.com/ebensing)
+ * added; MongooseBuffer#subtype()
+ * added; model.create() now returns a promise #1340
+ * added; support for `awaitdata` query option
+ * added; pass the doc to doc.remove() callback #1419 [JoeWagner](https://github.com/JoeWagner)
+ * added; aggregation query builder #1404 [njoyard](https://github.com/njoyard)
+ * fixed; document.toObject when using `minimize` and `getters` options #1607 [JedWatson](https://github.com/JedWatson)
+ * fixed; Mixed types can now be required #1722 [Reggino](https://github.com/Reggino)
+ * fixed; do not pluralize model names not ending with letters #1703 [refack](https://github.com/refack)
+ * fixed; repopulating modified populated paths #1697
+ * fixed; doc.equals() when _id option is set to false #1687
+ * fixed; strict mode warnings #1686
+ * fixed; $near GeoJSON casting #1683
+ * fixed; nearSphere GeoJSON query builder
+ * fixed; population field selection w/ strings #1669
+ * fixed; setters not firing on null values #1445 [ebensing](https://github.com/ebensing)
+ * fixed; handle another versioning edge case #1520
+ * fixed; excluding subdocument fields #1280 [ebensing](https://github.com/ebensing)
+ * fixed; allow array properties to be set to null with findOneAndUpdate [aheuermann](https://github.com/aheuermann)
+ * fixed; subdocuments now use own toJSON opts #1376 [ebensing](https://github.com/ebensing)
+ * fixed; model#geoNear fulfills promise when results empty #1658 [ebensing](https://github.com/ebensing)
+ * fixed; utils.merge no longer overrides props and methods #1655 [j](https://github.com/j)
+ * fixed; subdocuments now use their own transform #1412 [ebensing](https://github.com/ebensing)
+ * fixed; model.remove() removes only what is necessary #1649
+ * fixed; update() now only runs with cb or explicit true #1644
+ * fixed; casting ref docs on creation #1606 [ebensing](https://github.com/ebensing)
+ * fixed; model.update "overwrite" option works as documented
+ * fixed; query#remove() works as documented
+ * fixed; "limit" correctly applies to individual items on population #1490 [ebensing](https://github.com/ebensing)
+ * fixed; issue with positional operator on ref docs #1572 [ebensing](https://github.com/ebensing)
+ * fixed; benchmarks to actually output valid json
+ * deprecated; promise#addBack (use promise#onResolve)
+ * deprecated; promise#complete (use promise#fulfill)
+ * deprecated; promise#addCallback (use promise#onFulFill)
+ * deprecated; promise#addErrback (use promise#onReject)
+ * deprecated; query.nearSphere() (use query.near)
+ * deprecated; query.center() (use query.circle)
+ * deprecated; query.centerSphere() (use query.circle)
+ * deprecated; query#slaveOk (use query#read)
+ * docs; custom validator messages
+ * docs; 10gen -> MongoDB
+ * docs; add Date method caveats #1598
+ * docs; more validation details
+ * docs; state which branch is stable/unstable
+ * docs; mention that middleware does not run on Models
+ * docs; promise.fulfill()
+ * docs; fix readme spelling #1483 [yorchopolis](https://github.com/yorchopolis)
+ * docs; fixed up the README and examples [ebensing](https://github.com/ebensing)
+ * website; add "show code" for properties
+ * website; move "show code" links down
+ * website; update guide
+ * website; add unstable docs
+ * website; many improvements
+ * website; fix copyright #1439
+ * website; server.js -> static.js #1546 [nikmartin](https://github.com/nikmartin)
+ * tests; refactor 1703
+ * tests; add test generator
+ * tests; validate formatMessage() throws
+ * tests; add script for continuously running tests
+ * tests; fixed versioning tests
+ * tests; race conditions in tests
+ * tests; added for nested and/or queries
+ * tests; close some test connections
+ * tests; validate db contents
+ * tests; remove .only
+ * tests; close some test connections
+ * tests; validate db contents
+ * tests; remove .only
+ * tests; replace deprecated method names
+ * tests; convert id to string
+ * tests; fix sharding tests for MongoDB 2.4.5
+ * tests; now 4-5 seconds faster
+ * tests; fix race condition
+ * make; suppress warning msg in test
+ * benchmarks; updated for pull requests
+ * examples; improved and expanded [ebensing](https://github.com/ebensing)
+
+3.7.4 (unstable) / 2013-10-01
+=============================
+
+ * updated; mquery to 0.3.2
+ * removed; mongoose.Error.DocumentError (never used)
+ * added; custom error msgs for built-in validators #747
+ * added; discriminator support #1647 #1003 [j](https://github.com/j)
+ * added; support disabled collection name pluralization #1350 #1707 [refack](https://github.com/refack)
+ * fixed; do not pluralize model names not ending with letters #1703 [refack](https://github.com/refack)
+ * fixed; repopulating modified populated paths #1697
+ * fixed; doc.equals() when _id option is set to false #1687
+ * fixed; strict mode warnings #1686
+ * fixed; $near GeoJSON casting #1683
+ * fixed; nearSphere GeoJSON query builder
+ * fixed; population field selection w/ strings #1669
+ * docs; custom validator messages
+ * docs; 10gen -> MongoDB
+ * docs; add Date method caveats #1598
+ * docs; more validation details
+ * website; add "show code" for properties
+ * website; move "show code" links down
+ * tests; refactor 1703
+ * tests; add test generator
+ * tests; validate formatMessage() throws
+
+3.7.3 (unstable) / 2013-08-22
+=============================
+
+ * updated; warn when using an unstable version
+ * updated; mquery to 0.3.1
+ * updated; mocha to 1.12.0
+ * updated; mongodb driver to 1.3.19 (fix error swallowing behavior)
+ * changed; no longer offically supporting node 0.6.x
+ * added; support for GeoJSON to Query#near [ebensing](https://github.com/ebensing)
+ * added; stand-alone base query support - query.toConstructor() [ebensing](https://github.com/ebensing)
+ * added; promise support to geoSearch #1614 [ebensing](https://github.com/ebensing)
+ * added; promise support for geoNear #1614 [ebensing](https://github.com/ebensing)
+ * fixed; setters not firing on null values #1445 [ebensing](https://github.com/ebensing)
+ * fixed; handle another versioning edge case #1520
+ * fixed; excluding subdocument fields #1280 [ebensing](https://github.com/ebensing)
+ * fixed; allow array properties to be set to null with findOneAndUpdate [aheuermann](https://github.com/aheuermann)
+ * fixed; subdocuments now use own toJSON opts #1376 [ebensing](https://github.com/ebensing)
+ * fixed; model#geoNear fulfills promise when results empty #1658 [ebensing](https://github.com/ebensing)
+ * fixed; utils.merge no longer overrides props and methods #1655 [j](https://github.com/j)
+ * fixed; subdocuments now use their own transform #1412 [ebensing](https://github.com/ebensing)
+ * make; suppress warning msg in test
+ * docs; state which branch is stable/unstable
+ * docs; mention that middleware does not run on Models
+ * tests; add script for continuously running tests
+ * tests; fixed versioning tests
+ * benchmarks; updated for pull requests
+
+3.7.2 (unstable) / 2013-08-15
+==================
+
+ * fixed; model.remove() removes only what is necessary #1649
+ * fixed; update() now only runs with cb or explicit true #1644
+ * tests; race conditions in tests
+ * website; update guide
+
+3.7.1 (unstable) / 2013-08-13
+=============================
+
+ * updated; driver to 1.3.18 (fixes memory leak)
+ * added; connection.useDb() #1124 [ebensing](https://github.com/ebensing)
+ * added; promise support to model.mapReduce()
+ * added; promise support to model.ensureIndexes()
+ * added; promise support to model.populate()
+ * fixed; casting ref docs on creation #1606 [ebensing](https://github.com/ebensing)
+ * fixed; model.update "overwrite" option works as documented
+ * fixed; query#remove() works as documented
+ * fixed; "limit" correctly applies to individual items on population #1490 [ebensing](https://github.com/ebensing)
+ * fixed; issue with positional operator on ref docs #1572 [ebensing](https://github.com/ebensing)
+ * fixed; benchmarks to actually output valid json
+ * tests; added for nested and/or queries
+ * tests; close some test connections
+ * tests; validate db contents
+ * tests; remove .only
+ * tests; close some test connections
+ * tests; validate db contents
+ * tests; remove .only
+ * tests; replace deprecated method names
+ * tests; convert id to string
+ * docs; promise.fulfill()
+
+3.7.0 (unstable) / 2013-08-05
+===================
+
+ * changed; query.within getter is now a method -> query.within()
+ * changed; query.intersects getter is now a method -> query.intersects()
+ * deprecated; promise#addBack (use promise#onResolve)
+ * deprecated; promise#complete (use promise#fulfill)
+ * deprecated; promise#addCallback (use promise#onFulFill)
+ * deprecated; promise#addErrback (use promise#onReject)
+ * deprecated; query.nearSphere() (use query.near)
+ * deprecated; query.center() (use query.circle)
+ * deprecated; query.centerSphere() (use query.circle)
+ * deprecated; query#slaveOk (use query#read)
+ * removed; namedscope (undocumented and broken) #679 #642 #455 #379
+ * added; benchmarks [ebensing](https://github.com/ebensing)
+ * added; publicly exposed connection states #1585
+ * added; $geoWithin support #1529 $1455 [ebensing](https://github.com/ebensing)
+ * added; query method chain validation
+ * added; model.update `overwrite` option
+ * added; model.geoNear() support #1563 [ebensing](https://github.com/ebensing)
+ * added; model.geoSearch() support #1560 [ebensing](https://github.com/ebensing)
+ * added; MongooseBuffer#subtype()
+ * added; model.create() now returns a promise #1340
+ * added; support for `awaitdata` query option
+ * added; pass the doc to doc.remove() callback #1419 [JoeWagner](https://github.com/JoeWagner)
+ * added; aggregation query builder #1404 [njoyard](https://github.com/njoyard)
+ * updated; integrate mquery #1562 [ebensing](https://github.com/ebensing)
+ * updated; error msg in doc.save() #1595
+ * updated; bump driver to 1.3.15
+ * updated; mpromise 0.3.0
+ * updated; sliced 0.0.5
+ * tests; fix sharding tests for MongoDB 2.4.5
+ * tests; now 4-5 seconds faster
+ * tests; fix race condition
+ * docs; fix readme spelling #1483 [yorchopolis](https://github.com/yorchopolis)
+ * docs; fixed up the README and examples [ebensing](https://github.com/ebensing)
+ * website; add unstable docs
+ * website; many improvements
+ * website; fix copyright #1439
+ * website; server.js -> static.js #1546 [nikmartin](https://github.com/nikmartin)
+ * examples; improved and expanded [ebensing](https://github.com/ebensing)
+
+3.6.20 (stable) / 2013-09-23
+===================
+
+ * fixed; repopulating modified populated paths #1697
+ * fixed; doc.equals w/ _id false #1687
+ * fixed; strict mode warning #1686
+ * docs; near/nearSphere
+
+3.6.19 (stable) / 2013-09-04
+==================
+
+ * fixed; population field selection w/ strings #1669
+ * docs; Date method caveats #1598
+
+3.6.18 (stable) / 2013-08-22
+===================
+
+ * updated; warn when using an unstable version of mongoose
+ * updated; mocha to 1.12.0
+ * updated; mongodb driver to 1.3.19 (fix error swallowing behavior)
+ * fixed; setters not firing on null values #1445 [ebensing](https://github.com/ebensing)
+ * fixed; properly exclude subdocument fields #1280 [ebensing](https://github.com/ebensing)
+ * fixed; cast error in findAndModify #1643 [aheuermann](https://github.com/aheuermann)
+ * website; update guide
+ * website; added documentation for safe:false and versioning interaction
+ * docs; mention that middleware dont run on Models
+ * docs; fix indexes link
+ * make; suppress warning msg in test
+ * tests; moar
+
+3.6.17 / 2013-08-13
+===================
+
+ * updated; driver to 1.3.18 (fixes memory leak)
+ * fixed; casting ref docs on creation #1606
+ * docs; query options
+
+3.6.16 / 2013-08-08
+===================
+
+ * added; publicly expose connection states #1585
+ * fixed; limit applies to individual items on population #1490 [ebensing](https://github.com/ebensing)
+ * fixed; positional operator casting in updates #1572 [ebensing](https://github.com/ebensing)
+ * updated; MongoDB driver to 1.3.17
+ * updated; sliced to 0.0.5
+ * website; tweak homepage
+ * tests; fixed + added
+ * docs; fix some examples
+ * docs; multi-mongos support details
+ * docs; auto open browser after starting static server
+
+3.6.15 / 2013-07-16
+==================
+
+ * added; mongos failover support #1037
+ * updated; make schematype return vals return self #1580
+ * docs; add note to model.update #571
+ * docs; document third param to document.save callback #1536
+ * tests; tweek mongos test timeout
+
+3.6.14 / 2013-07-05
+===================
+
+ * updated; driver to 1.3.11
+ * fixed; issue with findOneAndUpdate not returning null on upserts #1533 [ebensing](https://github.com/ebensing)
+ * fixed; missing return statement in SchemaArray#$geoIntersects() #1498 [bsrykt](https://github.com/bsrykt)
+ * fixed; wrong isSelected() behavior #1521 [kyano](https://github.com/kyano)
+ * docs; note about toObject behavior during save()
+ * docs; add callbacks details #1547 [nikmartin](https://github.com/nikmartin)
+
+3.6.13 / 2013-06-27
+===================
+
+ * fixed; calling model.distinct without conditions #1541
+ * fixed; regression in Query#count() #1542
+ * now working on 3.6.13
+
+3.6.12 / 2013-06-25
+===================
+
+ * updated; driver to 1.3.10
+ * updated; clearer capped collection error message #1509 [bitmage](https://github.com/bitmage)
+ * fixed; MongooseBuffer subtype loss during casting #1517 [zedgu](https://github.com/zedgu)
+ * fixed; docArray#id when doc.id is disabled #1492
+ * fixed; docArray#id now supports matches on populated arrays #1492 [pgherveou](https://github.com/pgherveou)
+ * website; fix example
+ * website; improve _id disabling example
+ * website; fix typo #1494 [dejj](https://github.com/dejj)
+ * docs; added a 'Requesting new features' section #1504 [shovon](https://github.com/shovon)
+ * docs; improve subtypes description
+ * docs; clarify _id disabling
+ * docs: display by alphabetical order the methods list #1508 [nicolasleger](https://github.com/nicolasleger)
+ * tests; refactor isSelected checks
+ * tests; remove pointless test
+ * tests; fixed timeouts
+
+3.6.11 / 2013-05-15
+===================
+
+ * updated; driver to 1.3.5
+ * fixed; compat w/ Object.create(null) #1484 #1485
+ * fixed; cloning objects w/ missing constructors
+ * fixed; prevent multiple min number validators #1481 [nrako](https://github.com/nrako)
+ * docs; add doc.increment() example
+ * docs; add $size example
+ * docs; add "distinct" example
+
+3.6.10 / 2013-05-09
+==================
+
+ * update driver to 1.3.3
+ * fixed; increment() works without other changes #1475
+ * website; fix links to posterous
+ * docs; fix link #1472
+
+3.6.9 / 2013-05-02
+==================
+
+ * fixed; depopulation of mixed documents #1471
+ * fixed; use of $options in array #1462
+ * tests; fix race condition
+ * docs; fix default example
+
+3.6.8 / 2013-04-25
+==================
+
+ * updated; driver to 1.3.0
+ * fixed; connection.model should retain options #1458 [vedmalex](https://github.com/vedmalex)
+ * tests; 4-5 seconds faster
+
+3.6.7 / 2013-04-19
+==================
+
+ * fixed; population regression in 3.6.6 #1444
+
+3.6.6 / 2013-04-18
+==================
+
+ * fixed; saving populated new documents #1442
+ * fixed; population regession in 3.6.5 #1441
+ * website; fix copyright #1439
+
+3.6.5 / 2013-04-15
+==================
+
+ * fixed; strict:throw edge case using .set(path, val)
+ * fixed; schema.pathType() on some numbericAlpha paths
+ * fixed; numbericAlpha path versioning
+ * fixed; setting nested mixed paths #1418
+ * fixed; setting nested objects with null prop #1326
+ * fixed; regression in v3.6 population performance #1426 [vedmalex](https://github.com/vedmalex)
+ * fixed; read pref typos #1422 [kyano](https://github.com/kyano)
+ * docs; fix method example
+ * website; update faq
+ * website; add more deep links
+ * website; update poolSize docs
+ * website; add 3.6 release notes
+ * website; note about keepAlive
+
+3.6.4 / 2013-04-03
+==================
+
+ * fixed; +field conflict with $slice #1370
+ * fixed; nested deselection conflict #1333
+ * fixed; RangeError in ValidationError.toString() #1296
+ * fixed; do not save user defined transforms #1415
+ * tests; fix race condition
+
+3.6.3 / 2013-04-02
+==================
+
+ * fixed; setting subdocuments deeply nested fields #1394
+ * fixed; regression: populated streams #1411
+ * docs; mention hooks/validation with findAndModify
+ * docs; mention auth
+ * docs; add more links
+ * examples; add document methods example
+ * website; display "see" links for properties
+ * website; clean up homepage
+
+3.6.2 / 2013-03-29
+==================
+
+ * fixed; corrupted sub-doc array #1408
+ * fixed; document#update returns a Query #1397
+ * docs; readpref strategy
+
+3.6.1 / 2013-03-27
+==================
+
+ * added; populate support to findAndModify varients #1395
+ * added; text index type to schematypes
+ * expose allowed index types as Schema.indexTypes
+ * fixed; use of `setMaxListeners` as path
+ * fixed; regression in node 0.6 on docs with > 10 arrays
+ * fixed; do not alter schema arguments #1364
+ * fixed; subdoc#ownerDocument() #1385
+ * website; change search id
+ * website; add search from google [jackdbernier](https://github.com/jackdbernier)
+ * website; fix link
+ * website; add 3.5.x docs release
+ * website; fix link
+ * docs; fix geometry
+ * docs; hide internal constructor
+ * docs; aggregation does not cast arguments #1399
+ * docs; querystream options
+ * examples; added for population
+
+3.6.0 / 2013-03-18
+==================
+
+ * changed; cast 'true'/'false' to boolean #1282 [mgrach](https://github.com/mgrach)
+ * changed; Buffer arrays can now contain nulls
+ * added; QueryStream transform option
+ * added; support for authSource driver option
+ * added; {mongoose,db}.modelNames()
+ * added; $push w/ $slice,$sort support (MongoDB 2.4)
+ * added; hashed index type (MongoDB 2.4)
+ * added; support for mongodb 2.4 geojson (MongoDB 2.4)
+ * added; value at time of validation error
+ * added; support for object literal schemas
+ * added; bufferCommands schema option
+ * added; allow auth option in connections #1360 [geoah](https://github.com/geoah)
+ * added; performance improvements to populate() [263ece9](https://github.com/LearnBoost/mongoose/commit/263ece9)
+ * added; allow adding uncasted docs to populated arrays and properties #570
+ * added; doc#populated(path) stores original populated _ids
+ * added; lean population #1260
+ * added; query.populate() now accepts an options object
+ * added; document#populate(opts, callback)
+ * added; Model.populate(docs, opts, callback)
+ * added; support for rich nested path population
+ * added; doc.array.remove(value) subdoc with _id value support #1278
+ * added; optionally allow non-strict sets and updates
+ * added; promises/A+ comformancy with [mpromise](https://github.com/aheckmann/mpromise)
+ * added; promise#then
+ * added; promise#end
+ * fixed; use of `model` as doc property
+ * fixed; lean population #1382
+ * fixed; empty object mixed defaults #1380
+ * fixed; populate w/ deselected _id using string syntax
+ * fixed; attempted save of divergent populated arrays #1334 related
+ * fixed; better error msg when attempting toObject as property name
+ * fixed; non population buffer casting from doc
+ * fixed; setting populated paths #570
+ * fixed; casting when added docs to populated arrays #570
+ * fixed; prohibit updating arrays selected with $elemMatch #1334
+ * fixed; pull / set subdoc combination #1303
+ * fixed; multiple bg index creation #1365
+ * fixed; manual reconnection to single mongod
+ * fixed; Constructor / version exposure #1124
+ * fixed; CastError race condition
+ * fixed; no longer swallowing misuse of subdoc#invalidate()
+ * fixed; utils.clone retains RegExp opts
+ * fixed; population of non-schema property
+ * fixed; allow updating versionKey #1265
+ * fixed; add EventEmitter props to reserved paths #1338
+ * fixed; can now deselect populated doc _ids #1331
+ * fixed; properly pass subtype to Binary in MongooseBuffer
+ * fixed; casting _id from document with non-ObjectId _id
+ * fixed; specifying schema type edge case { path: [{type: "String" }] }
+ * fixed; typo in schemdate #1329 [jplock](https://github.com/jplock)
+ * updated; driver to 1.2.14
+ * updated; muri to 0.3.1
+ * updated; mpromise to 0.2.1
+ * updated; mocha 1.8.1
+ * updated; mpath to 0.1.1
+ * deprecated; pluralization will die in 4.x
+ * refactor; rename private methods to something unusable as doc properties
+ * refactor MongooseArray#remove
+ * refactor; move expires index to SchemaDate #1328
+ * refactor; internal document properties #1171 #1184
+ * tests; added
+ * docs; indexes
+ * docs; validation
+ * docs; populate
+ * docs; populate
+ * docs; add note about stream compatibility with node 0.8
+ * docs; fix for private names
+ * docs; Buffer -> mongodb.Binary #1363
+ * docs; auth options
+ * docs; improved
+ * website; update FAQ
+ * website; add more api links
+ * website; add 3.5.x docs to prior releases
+ * website; Change mongoose-types to an active repo [jackdbernier](https://github.com/jackdbernier)
+ * website; compat with node 0.10
+ * website; add news section
+ * website; use T for generic type
+ * benchmark; make adjustable
+
+3.6.0rc1 / 2013-03-12
+======================
+
+ * refactor; rename private methods to something unusable as doc properties
+ * added; {mongoose,db}.modelNames()
+ * added; $push w/ $slice,$sort support (MongoDB 2.4)
+ * added; hashed index type (MongoDB 2.4)
+ * added; support for mongodb 2.4 geojson (MongoDB 2.4)
+ * added; value at time of validation error
+ * added; support for object literal schemas
+ * added; bufferCommands schema option
+ * added; allow auth option in connections #1360 [geoah](https://github.com/geoah)
+ * fixed; lean population #1382
+ * fixed; empty object mixed defaults #1380
+ * fixed; populate w/ deselected _id using string syntax
+ * fixed; attempted save of divergent populated arrays #1334 related
+ * fixed; better error msg when attempting toObject as property name
+ * fixed; non population buffer casting from doc
+ * fixed; setting populated paths #570
+ * fixed; casting when added docs to populated arrays #570
+ * fixed; prohibit updating arrays selected with $elemMatch #1334
+ * fixed; pull / set subdoc combination #1303
+ * fixed; multiple bg index creation #1365
+ * fixed; manual reconnection to single mongod
+ * fixed; Constructor / version exposure #1124
+ * fixed; CastError race condition
+ * fixed; no longer swallowing misuse of subdoc#invalidate()
+ * fixed; utils.clone retains RegExp opts
+ * fixed; population of non-schema property
+ * fixed; allow updating versionKey #1265
+ * fixed; add EventEmitter props to reserved paths #1338
+ * fixed; can now deselect populated doc _ids #1331
+ * updated; muri to 0.3.1
+ * updated; driver to 1.2.12
+ * updated; mpromise to 0.2.1
+ * deprecated; pluralization will die in 4.x
+ * docs; Buffer -> mongodb.Binary #1363
+ * docs; auth options
+ * docs; improved
+ * website; add news section
+ * benchmark; make adjustable
+
+3.6.0rc0 / 2013-02-03
+======================
+
+ * changed; cast 'true'/'false' to boolean #1282 [mgrach](https://github.com/mgrach)
+ * changed; Buffer arrays can now contain nulls
+ * fixed; properly pass subtype to Binary in MongooseBuffer
+ * fixed; casting _id from document with non-ObjectId _id
+ * fixed; specifying schema type edge case { path: [{type: "String" }] }
+ * fixed; typo in schemdate #1329 [jplock](https://github.com/jplock)
+ * refactor; move expires index to SchemaDate #1328
+ * refactor; internal document properties #1171 #1184
+ * added; performance improvements to populate() [263ece9](https://github.com/LearnBoost/mongoose/commit/263ece9)
+ * added; allow adding uncasted docs to populated arrays and properties #570
+ * added; doc#populated(path) stores original populated _ids
+ * added; lean population #1260
+ * added; query.populate() now accepts an options object
+ * added; document#populate(opts, callback)
+ * added; Model.populate(docs, opts, callback)
+ * added; support for rich nested path population
+ * added; doc.array.remove(value) subdoc with _id value support #1278
+ * added; optionally allow non-strict sets and updates
+ * added; promises/A+ comformancy with [mpromise](https://github.com/aheckmann/mpromise)
+ * added; promise#then
+ * added; promise#end
+ * updated; mocha 1.8.1
+ * updated; muri to 0.3.0
+ * updated; mpath to 0.1.1
+ * updated; docs
+
+3.5.16 / 2013-08-13
+===================
+
+ * updated; driver to 1.3.18
+
+3.5.15 / 2013-07-26
+==================
+
+ * updated; sliced to 0.0.5
+ * updated; driver to 1.3.12
+ * fixed; regression in Query#count() due to driver change
+ * tests; fixed timeouts
+ * tests; handle differing test uris
+
+3.5.14 / 2013-05-15
+===================
+
+ * updated; driver to 1.3.5
+ * fixed; compat w/ Object.create(null) #1484 #1485
+ * fixed; cloning objects missing constructors
+ * fixed; prevent multiple min number validators #1481 [nrako](https://github.com/nrako)
+
+3.5.13 / 2013-05-09
+==================
+
+ * update driver to 1.3.3
+ * fixed; use of $options in array #1462
+
+3.5.12 / 2013-04-25
+===================
+
+ * updated; driver to 1.3.0
+ * fixed; connection.model should retain options #1458 [vedmalex](https://github.com/vedmalex)
+ * fixed; read pref typos #1422 [kyano](https://github.com/kyano)
+
+3.5.11 / 2013-04-03
+==================
+
+ * fixed; +field conflict with $slice #1370
+ * fixed; RangeError in ValidationError.toString() #1296
+ * fixed; nested deselection conflict #1333
+ * remove time from Makefile
+
+3.5.10 / 2013-04-02
+==================
+
+ * fixed; setting subdocuments deeply nested fields #1394
+ * fixed; do not alter schema arguments #1364
+
+3.5.9 / 2013-03-15
+==================
+
+ * updated; driver to 1.2.14
+ * added; support for authSource driver option (mongodb 2.4)
+ * added; QueryStream transform option (node 0.10 helper)
+ * fixed; backport for saving required populated buffers
+ * fixed; pull / set subdoc combination #1303
+ * fixed; multiple bg index creation #1365
+ * test; added for saveable required populated buffers
+ * test; added for #1365
+ * test; add authSource test
+
+3.5.8 / 2013-03-12
+==================
+
+ * added; auth option in connection [geoah](https://github.com/geoah)
+ * fixed; CastError race condition
+ * docs; add note about stream compatibility with node 0.8
+
+3.5.7 / 2013-02-22
+==================
+
+ * updated; driver to 1.2.13
+ * updated; muri to 0.3.1 #1347
+ * fixed; utils.clone retains RegExp opts #1355
+ * fixed; deepEquals RegExp support
+ * tests; fix a connection test
+ * website; clean up docs [afshinm](https://github.com/afshinm)
+ * website; update homepage
+ * website; migragtion: emphasize impact of strict docs #1264
+
+3.5.6 / 2013-02-14
+==================
+
+ * updated; driver to 1.2.12
+ * fixed; properly pass Binary subtype
+ * fixed; add EventEmitter props to reserved paths #1338
+ * fixed; use correct node engine version
+ * fixed; display empty docs as {} in log output #953 follow up
+ * improved; "bad $within $box argument" error message
+ * populate; add unscientific benchmark
+ * website; add stack overflow to help section
+ * website; use better code font #1336 [risseraka](https://github.com/risseraka)
+ * website; clarify where help is available
+ * website; fix source code links #1272 [floatingLomas](https://github.com/floatingLomas)
+ * docs; be specific about _id schema option #1103
+ * docs; add ensureIndex error handling example
+ * docs; README
+ * docs; CONTRIBUTING.md
+
+3.5.5 / 2013-01-29
+==================
+
+ * updated; driver to 1.2.11
+ * removed; old node < 0.6x shims
+ * fixed; documents with Buffer _ids equality
+ * fixed; MongooseBuffer properly casts numbers
+ * fixed; reopening closed connection on alt host/port #1287
+ * docs; fixed typo in Readme #1298 [rened](https://github.com/rened)
+ * docs; fixed typo in migration docs [Prinzhorn](https://github.com/Prinzhorn)
+ * docs; fixed incorrect annotation in SchemaNumber#min [bilalq](https://github.com/bilalq)
+ * docs; updated
+
+3.5.4 / 2013-01-07
+==================
+
+ * changed; "_pres" & "_posts" are now reserved pathnames #1261
+ * updated; driver to 1.2.8
+ * fixed; exception when reopening a replica set. #1263 [ethankan](https://github.com/ethankan)
+ * website; updated
+
+3.5.3 / 2012-12-26
+==================
+
+ * added; support for geo object notation #1257
+ * fixed; $within query casting with arrays
+ * fixed; unix domain socket support #1254
+ * updated; driver to 1.2.7
+ * updated; muri to 0.0.5
+
+3.5.2 / 2012-12-17
+==================
+
+ * fixed; using auth with replica sets #1253
+
+3.5.1 / 2012-12-12
+==================
+
+ * fixed; regression when using subdoc with `path` as pathname #1245 [daeq](https://github.com/daeq)
+ * fixed; safer db option checks
+ * updated; driver to 1.2.5
+ * website; add more examples
+ * website; clean up old docs
+ * website; fix prev release urls
+ * docs; clarify streaming with HTTP responses
+
+3.5.0 / 2012-12-10
+==================
+
+ * added; paths to CastErrors #1239
+ * added; support for mongodb connection string spec #1187
+ * added; post validate event
+ * added; Schema#get (to retrieve schema options)
+ * added; VersionError #1071
+ * added; npmignore [hidekiy](https://github.com/hidekiy)
+ * update; driver to 1.2.3
+ * fixed; stackoverflow in setter #1234
+ * fixed; utils.isObject()
+ * fixed; do not clobber user specified driver writeConcern #1227
+ * fixed; always pass current document to post hooks
+ * fixed; throw error when user attempts to overwrite a model
+ * fixed; connection.model only caches on connection #1209
+ * fixed; respect conn.model() creation when matching global model exists #1209
+ * fixed; passing model name + collection name now always honors collection name
+ * fixed; setting virtual field to an empty object #1154
+ * fixed; subclassed MongooseErrors exposure, now available in mongoose.Error.xxxx
+ * fixed; model.remove() ignoring callback when executed twice [daeq](https://github.com/daeq) #1210
+ * docs; add collection option to schema api docs #1222
+ * docs; NOTE about db safe options
+ * docs; add post hooks docs
+ * docs; connection string options
+ * docs; middleware is not executed with Model.remove #1241
+ * docs; {g,s}etter introspection #777
+ * docs; update validation docs
+ * docs; add link to plugins page
+ * docs; clarify error returned by unique indexes #1225
+ * docs; more detail about disabling autoIndex behavior
+ * docs; add homepage section to package (npm docs mongoose)
+ * docs; more detail around collection name pluralization #1193
+ * website; add .important css
+ * website; update models page
+ * website; update getting started
+ * website; update quick start
+
+3.4.0 / 2012-11-10
+==================
+
+ * added; support for generic toJSON/toObject transforms #1160 #1020 #1197
+ * added; doc.set() merge support #1148 [NuORDER](https://github.com/NuORDER)
+ * added; query#add support #1188 [aleclofabbro](https://github.com/aleclofabbro)
+ * changed; adding invalid nested paths to non-objects throws 4216f14
+ * changed; fixed; stop invalid function cloning (internal fix)
+ * fixed; add query $and casting support #1180 [anotheri](https://github.com/anotheri)
+ * fixed; overwriting of query arguments #1176
+ * docs; fix expires examples
+ * docs; transforms
+ * docs; schema `collection` option docs [hermanjunge](https://github.com/hermanjunge)
+ * website; updated
+ * tests; added
+
+3.3.1 / 2012-10-11
+==================
+
+ * fixed; allow goose.connect(uris, dbname, opts) #1144
+ * docs; persist API private checked state across page loads
+
+3.3.0 / 2012-10-10
+==================
+
+ * fixed; passing options as 2nd arg to connect() #1144
+ * fixed; race condition after no-op save #1139
+ * fixed; schema field selection application in findAndModify #1150
+ * fixed; directly setting arrays #1126
+ * updated; driver to 1.1.11
+ * updated; collection pluralization rules [mrickard](https://github.com/mrickard)
+ * tests; added
+ * docs; updated
+
+3.2.2 / 2012-10-08
+==================
+
+ * updated; driver to 1.1.10 #1143
+ * updated; use sliced 0.0.3
+ * fixed; do not recast embedded docs unnecessarily
+ * fixed; expires schema option helper #1132
+ * fixed; built in string setters #1131
+ * fixed; debug output for Dates/ObjectId properties #1129
+ * docs; fixed Javascript syntax error in example [olalonde](https://github.com/olalonde)
+ * docs; fix toJSON example #1137
+ * docs; add ensureIndex production notes
+ * docs; fix spelling
+ * docs; add blogposts about v3
+ * website; updated
+ * removed; undocumented inGroupsOf util
+ * tests; added
+
+3.2.1 / 2012-09-28
+==================
+
+ * fixed; remove query batchSize option default of 1000 https://github.com/learnboost/mongoose/commit/3edaa8651
+ * docs; updated
+ * website; updated
+
+3.2.0 / 2012-09-27
+==================
+
+ * added; direct array index assignment with casting support `doc.array.set(index, value)`
+ * fixed; QueryStream#resume within same tick as pause() #1116
+ * fixed; default value validatation #1109
+ * fixed; array splice() not casting #1123
+ * fixed; default array construction edge case #1108
+ * fixed; query casting for inequalities in arrays #1101 [dpatti](https://github.com/dpatti)
+ * tests; added
+ * website; more documentation
+ * website; fixed layout issue #1111 [SlashmanX](https://github.com/SlashmanX)
+ * website; refactored [guille](https://github.com/guille)
+
+3.1.2 / 2012-09-10
+==================
+
+ * added; ReadPreferrence schema option #1097
+ * updated; driver to 1.1.7
+ * updated; default query batchSize to 1000
+ * fixed; we now cast the mapReduce query option #1095
+ * fixed; $elemMatch+$in with field selection #1091
+ * fixed; properly cast $elemMatch+$in conditions #1100
+ * fixed; default field application of subdocs #1027
+ * fixed; querystream prematurely dying #1092
+ * fixed; querystream never resumes when paused at getMore boundries #1092
+ * fixed; querystream occasionally emits data events after destroy #1092
+ * fixed; remove unnecessary ObjectId creation in querystream
+ * fixed; allow ne(boolean) again #1093
+ * docs; add populate/field selection syntax notes
+ * docs; add toObject/toJSON options detail
+ * docs; `read` schema option
+
+3.1.1 / 2012-08-31
+==================
+
+ * updated; driver to 1.1.6
+
+3.1.0 / 2012-08-29
+==================
+
+ * changed; fixed; directly setting nested objects now overwrites entire object (previously incorrectly merged them)
+ * added; read pref support (mongodb 2.2) 205a709c
+ * added; aggregate support (mongodb 2.2) f3a5bd3d
+ * added; virtual {g,s}etter introspection (#1070)
+ * updated; docs [brettz9](https://github.com/brettz9)
+ * updated; driver to 1.1.5
+ * fixed; retain virtual setter return values (#1069)
+
+3.0.3 / 2012-08-23
+==================
+
+ * fixed; use of nested paths beginning w/ numbers #1062
+ * fixed; query population edge case #1053 #1055 [jfremy](https://github.com/jfremy)
+ * fixed; simultaneous top and sub level array modifications #1073
+ * added; id and _id schema option aliases + tests
+ * improve debug formatting to allow copy/paste logged queries into mongo shell [eknkc](https://github.com/eknkc)
+ * docs
+
+3.0.2 / 2012-08-17
+==================
+
+ * added; missing support for v3 sort/select syntax to findAndModify helpers (#1058)
+ * fixed; replset fullsetup event emission
+ * fixed; reconnected event for replsets
+ * fixed; server reconnection setting discovery
+ * fixed; compat with non-schema path props using positional notation (#1048)
+ * fixed; setter/casting order (#665)
+ * docs; updated
+
+3.0.1 / 2012-08-11
+==================
+
+ * fixed; throw Error on bad validators (1044)
+ * fixed; typo in EmbeddedDocument#parentArray [lackac]
+ * fixed; repair mongoose.SchemaTypes alias
+ * updated; docs
+
+3.0.0 / 2012-08-07
+==================
+
+ * removed; old subdocument#commit method
+ * fixed; setting arrays of matching docs [6924cbc2]
+ * fixed; doc!remove event now emits in save order as save for consistency
+ * fixed; pre-save hooks no longer fire on subdocuments when validation fails
+ * added; subdoc#parent() and subdoc#parentArray() to access subdocument parent objects
+ * added; query#lean() helper
+
+3.0.0rc0 / 2012-08-01
+=====================
+
+ * fixed; allow subdoc literal declarations containing "type" pathname (#993)
+ * fixed; unsetting a default array (#758)
+ * fixed; boolean $in queries (#998)
+ * fixed; allow use of `options` as a pathname (#529)
+ * fixed; `model` is again a permitted schema path name
+ * fixed; field selection option on subdocs (#1022)
+ * fixed; handle another edge case with subdoc saving (#975)
+ * added; emit save err on model if listening
+ * added; MongoDB TTL collection support (#1006)
+ * added; $center options support
+ * added; $nearSphere and $polygon support
+ * updated; driver version to 1.1.2
+
+3.0.0alpha2 / 2012-07-18
+=========================
+
+ * changed; index errors are now emitted on their model and passed to an optional callback (#984)
+ * fixed; specifying index along with sparse/unique option no longer overwrites (#1004)
+ * fixed; never swallow connection errors (#618)
+ * fixed; creating object from model with emded object no longer overwrites defaults [achurkin] (#859)
+ * fixed; stop needless validation of unchanged/unselected fields (#891)
+ * fixed; document#equals behavior of objectids (#974)
+ * fixed; honor the minimize schema option (#978)
+ * fixed; provide helpful error msgs when reserved schema path is used (#928)
+ * fixed; callback to conn#disconnect is optional (#875)
+ * fixed; handle missing protocols in connection urls (#987)
+ * fixed; validate args to query#where (#969)
+ * fixed; saving modified/removed subdocs (#975)
+ * fixed; update with $pull from Mixed array (#735)
+ * fixed; error with null shard key value
+ * fixed; allow unsetting enums (#967)
+ * added; support for manual index creation (#984)
+ * added; support for disabled auto-indexing (#984)
+ * added; support for preserving MongooseArray#sort changes (#752)
+ * added; emit state change events on connection
+ * added; support for specifying BSON subtype in MongooseBuffer#toObject [jcrugzz]
+ * added; support for disabled versioning (#977)
+ * added; implicit "new" support for models and Schemas
+
+3.0.0alpha1 / 2012-06-15
+=========================
+
+ * removed; doc#commit (use doc#markModified)
+ * removed; doc.modified getter (#950)
+ * removed; mongoose{connectSet,createSetConnection}. use connect,createConnection instead
+ * removed; query alias methods 1149804c
+ * removed; MongooseNumber
+ * changed; now creating indexes in background by default
+ * changed; strict mode now enabled by default (#952)
+ * changed; doc#modifiedPaths is now a method (#950)
+ * changed; getters no longer cast (#820); casting happens during set
+ * fixed; no need to pass updateArg to findOneAndUpdate (#931)
+ * fixed: utils.merge bug when merging nested non-objects. [treygriffith]
+ * fixed; strict:throw should produce errors in findAndModify (#963)
+ * fixed; findAndUpdate no longer overwrites document (#962)
+ * fixed; setting default DocumentArrays (#953)
+ * fixed; selection of _id with schema deselection (#954)
+ * fixed; ensure promise#error emits instanceof Error
+ * fixed; CursorStream: No stack overflow on any size result (#929)
+ * fixed; doc#remove now passes safe options
+ * fixed; invalid use of $set during $pop
+ * fixed; array#{$pop,$shift} mirror MongoDB behavior
+ * fixed; no longer test non-required vals in string match (#934)
+ * fixed; edge case with doc#inspect
+ * fixed; setter order (#665)
+ * fixed; setting invalid paths in strict mode (#916)
+ * fixed; handle docs without id in DocumentArray#id method (#897)
+ * fixed; do not save virtuals during model.update (#894)
+ * fixed; sub doc toObject virtuals application (#889)
+ * fixed; MongooseArray#pull of ObjectId (#881)
+ * fixed; handle passing db name with any repl set string
+ * fixed; default application of selected fields (#870)
+ * fixed; subdoc paths reported in validation errors (#725)
+ * fixed; incorrect reported num of affected docs in update ops (#862)
+ * fixed; connection assignment in Model#model (#853)
+ * fixed; stringifying arrays of docs (#852)
+ * fixed; modifying subdoc and parent array works (#842)
+ * fixed; passing undefined to next hook (#785)
+ * fixed; Query#{update,remove}() works without callbacks (#788)
+ * fixed; set/updating nested objects by parent pathname (#843)
+ * fixed; allow null in number arrays (#840)
+ * fixed; isNew on sub doc after insertion error (#837)
+ * fixed; if an insert fails, set isNew back to false [boutell]
+ * fixed; isSelected when only _id is selected (#730)
+ * fixed; setting an unset default value (#742)
+ * fixed; query#sort error messaging (#671)
+ * fixed; support for passing $options with $regex
+ * added; array of object literal notation in schema creates DocumentArrays
+ * added; gt,gte,lt,lte query support for arrays (#902)
+ * added; capped collection support (#938)
+ * added; document versioning support
+ * added; inclusion of deselected schema path (#786)
+ * added; non-atomic array#pop
+ * added; EmbeddedDocument constructor is now exposed in DocArray#create 7cf8beec
+ * added; mapReduce support (#678)
+ * added; support for a configurable minimize option #to{Object,JSON}(option) (#848)
+ * added; support for strict: `throws` [regality]
+ * added; support for named schema types (#795)
+ * added; to{Object,JSON} schema options (#805)
+ * added; findByIdAnd{Update,Remove}()
+ * added; findOneAnd{Update,Remove}()
+ * added; query.setOptions()
+ * added; instance.update() (#794)
+ * added; support specifying model in populate() [DanielBaulig]
+ * added; `lean` query option [gitfy]
+ * added; multi-atomic support to MongooseArray#nonAtomicPush
+ * added; support for $set + other $atomic ops on single array
+ * added; tests
+ * updated; driver to 1.0.2
+ * updated; query.sort() syntax to mirror query.select()
+ * updated; clearer cast error msg for array numbers
+ * updated; docs
+ * updated; doc.clone 3x faster (#950)
+ * updated; only create _id if necessary (#950)
+
+2.7.3 / 2012-08-01
+==================
+
+ * fixed; boolean $in queries (#998)
+ * fixed field selection option on subdocs (#1022)
+
+2.7.2 / 2012-07-18
+==================
+
+ * fixed; callback to conn#disconnect is optional (#875)
+ * fixed; handle missing protocols in connection urls (#987)
+ * fixed; saving modified/removed subdocs (#975)
+ * updated; tests
+
+2.7.1 / 2012-06-26
+===================
+
+ * fixed; sharding: when a document holds a null as a value of the shard key
+ * fixed; update() using $pull on an array of Mixed (gh-735)
+ * deprecated; MongooseNumber#{inc, increment, decrement} methods
+ * tests; now using mocha
+
+2.7.0 / 2012-06-14
+===================
+
+ * added; deprecation warnings to methods being removed in 3.x
+
+2.6.8 / 2012-06-14
+===================
+
+ * fixed; edge case when using 'options' as a path name (#961)
+
+2.6.7 / 2012-06-08
+===================
+
+ * fixed; ensure promise#error always emits instanceof Error
+ * fixed; selection of _id w/ another excluded path (#954)
+ * fixed; setting default DocumentArrays (#953)
+
+2.6.6 / 2012-06-06
+===================
+
+ * fixed; stack overflow in query stream with large result sets (#929)
+ * added; $gt, $gte, $lt, $lte support to arrays (#902)
+ * fixed; pass option `safe` along to doc#remove() calls
+
+2.6.5 / 2012-05-24
+===================
+
+ * fixed; do not save virtuals in Model.update (#894)
+ * added; missing $ prefixed query aliases (going away in 3.x) (#884) [timoxley]
+ * fixed; setting invalid paths in strict mode (#916)
+ * fixed; resetting isNew after insert failure (#837) [boutell]
+
+2.6.4 / 2012-05-15
+===================
+
+ * updated; backport string regex $options to 2.x
+ * updated; use driver 1.0.2 (performance improvements) (#914)
+ * fixed; calling MongooseDocumentArray#id when the doc has no _id (#897)
+
+2.6.3 / 2012-05-03
+===================
+
+ * fixed; repl-set connectivity issues during failover on MongoDB 2.0.1
+ * updated; driver to 1.0.0
+ * fixed; virtuals application of subdocs when using toObject({ virtuals: true }) (#889)
+ * fixed; MongooseArray#pull of ObjectId correctly updates the array itself (#881)
+
+2.6.2 / 2012-04-30
+===================
+
+ * fixed; default field application of selected fields (#870)
+
+2.6.1 / 2012-04-30
+===================
+
+ * fixed; connection assignment in mongoose#model (#853, #877)
+ * fixed; incorrect reported num of affected docs in update ops (#862)
+
+2.6.0 / 2012-04-19
+===================
+
+ * updated; hooks.js to 0.2.1
+ * fixed; issue with passing undefined to a hook callback. thanks to [chrisleishman] for reporting.
+ * fixed; updating/setting nested objects in strict schemas (#843) as reported by [kof]
+ * fixed; Query#{update,remove}() work without callbacks again (#788)
+ * fixed; modifying subdoc along with parent array $atomic op (#842)
+
+2.5.14 / 2012-04-13
+===================
+
+ * fixed; setting an unset default value (#742)
+ * fixed; doc.isSelected(otherpath) when only _id is selected (#730)
+ * updated; docs
+
+2.5.13 / 2012-03-22
+===================
+
+ * fixed; failing validation of unselected required paths (#730,#713)
+ * fixed; emitting connection error when only one listener (#759)
+ * fixed; MongooseArray#splice was not returning values (#784) [chrisleishman]
+
+2.5.12 / 2012-03-21
+===================
+
+ * fixed; honor the `safe` option in all ensureIndex calls
+ * updated; node-mongodb-native driver to 0.9.9-7
+
+2.5.11 / 2012-03-15
+===================
+
+ * added; introspection for getters/setters (#745)
+ * updated; node-mongodb-driver to 0.9.9-5
+ * added; tailable method to Query (#769) [holic]
+ * fixed; Number min/max validation of null (#764) [btamas]
+ * added; more flexible user/password connection options (#738) [KarneAsada]
+
+2.5.10 / 2012-03-06
+===================
+
+ * updated; node-mongodb-native driver to 0.9.9-4
+ * added; Query#comment()
+ * fixed; allow unsetting arrays
+ * fixed; hooking the set method of subdocuments (#746)
+ * fixed; edge case in hooks
+ * fixed; allow $id and $ref in queries (fixes compatibility with mongoose-dbref) (#749) [richtera]
+ * added; default path selection to SchemaTypes
+
+2.5.9 / 2012-02-22
+===================
+
+ * fixed; properly cast nested atomic update operators for sub-documents
+
+2.5.8 / 2012-02-21
+===================
+
+ * added; post 'remove' middleware includes model that was removed (#729) [timoxley]
+
+2.5.7 / 2012-02-09
+===================
+
+ * fixed; RegExp validators on node >= v0.6.x
+
+2.5.6 / 2012-02-09
+===================
+
+ * fixed; emit errors returned from db.collection() on the connection (were being swallowed)
+ * added; can add multiple validators in your schema at once (#718) [diogogmt]
+ * fixed; strict embedded documents (#717)
+ * updated; docs [niemyjski]
+ * added; pass number of affected docs back in model.update/save
+
+2.5.5 / 2012-02-03
+===================
+
+ * fixed; RangeError: maximum call stack exceed error when removing docs with Number _id (#714)
+
+2.5.4 / 2012-02-03
+===================
+
+ * fixed; RangeError: maximum call stack exceed error (#714)
+
+2.5.3 / 2012-02-02
+===================
+
+ * added; doc#isSelected(path)
+ * added; query#equals()
+ * added; beta sharding support
+ * added; more descript error msgs (#700) [obeleh]
+ * added; document.modifiedPaths (#709) [ljharb]
+ * fixed; only functions can be added as getters/setters (#707,704) [ljharb]
+
+2.5.2 / 2012-01-30
+===================
+
+ * fixed; rollback -native driver to 0.9.7-3-5 (was causing timeouts and other replica set weirdness)
+ * deprecated; MongooseNumber (will be moved to a separate repo for 3.x)
+ * added; init event is emitted on schemas
+
+2.5.1 / 2012-01-27
+===================
+
+ * fixed; honor strict schemas in Model.update (#699)
+
+2.5.0 / 2012-01-26
+===================
+
+ * added; doc.toJSON calls toJSON on embedded docs when exists [jerem]
+ * added; populate support for refs of type Buffer (#686) [jerem]
+ * added; $all support for ObjectIds and Dates (#690)
+ * fixed; virtual setter calling on instantiation when strict: true (#682) [hunterloftis]
+ * fixed; doc construction triggering getters (#685)
+ * fixed; MongooseBuffer check in deepEquals (#688)
+ * fixed; range error when using Number _ids with `instance.save()` (#691)
+ * fixed; isNew on embedded docs edge case (#680)
+ * updated; driver to 0.9.8-3
+ * updated; expose `model()` method within static methods
+
+2.4.10 / 2012-01-10
+===================
+
+ * added; optional getter application in .toObject()/.toJSON() (#412)
+ * fixed; nested $operators in $all queries (#670)
+ * added; $nor support (#674)
+ * fixed; bug when adding nested schema (#662) [paulwe]
+
+2.4.9 / 2012-01-04
+===================
+
+ * updated; driver to 0.9.7-3-5 to fix Linux performance degradation on some boxes
+
+2.4.8 / 2011-12-22
+===================
+
+ * updated; bump -native to 0.9.7.2-5
+ * fixed; compatibility with date.js (#646) [chrisleishman]
+ * changed; undocumented schema "lax" option to "strict"
+ * fixed; default value population for strict schemas
+ * updated; the nextTick helper for small performance gain. 1bee2a2
+
+2.4.7 / 2011-12-16
+===================
+
+ * fixed; bug in 2.4.6 with path setting
+ * updated; bump -native to 0.9.7.2-1
+ * added; strict schema option [nw]
+
+2.4.6 / 2011-12-16
+===================
+
+ * fixed; conflicting mods on update bug [sirlantis]
+ * improved; doc.id getter performance
+
+2.4.5 / 2011-12-14
+===================
+
+ * fixed; bad MongooseArray behavior in 2.4.2 - 2.4.4
+
+2.4.4 / 2011-12-14
+===================
+
+ * fixed; MongooseArray#doAtomics throwing after sliced
+
+2.4.3 / 2011-12-14
+===================
+
+ * updated; system.profile schema for MongoDB 2x
+
+2.4.2 / 2011-12-12
+===================
+
+ * fixed; partially populating multiple children of subdocs (#639) [kenpratt]
+ * fixed; allow Update of numbers to null (#640) [jerem]
+
+2.4.1 / 2011-12-02
+===================
+
+ * added; options support for populate() queries
+ * updated; -native driver to 0.9.7-1.4
+
+2.4.0 / 2011-11-29
+===================
+
+ * added; QueryStreams (#614)
+ * added; debug print mode for development
+ * added; $within support to Array queries (#586) [ggoodale]
+ * added; $centerSphere query support
+ * fixed; $within support
+ * added; $unset is now used when setting a path to undefined (#519)
+ * added; query#batchSize support
+ * updated; docs
+ * updated; -native driver to 0.9.7-1.3 (provides Windows support)
+
+2.3.13 / 2011-11-15
+===================
+
+ * fixed; required validation for Refs (#612) [ded]
+ * added; $nearSphere support for Arrays (#610)
+
+2.3.12 / 2011-11-09
+===================
+
+ * fixed; regression, objects passed to Model.update should not be changed (#605)
+ * fixed; regression, empty Model.update should not be executed
+
+2.3.11 / 2011-11-08
+===================
+
+ * fixed; using $elemMatch on arrays of Mixed types (#591)
+ * fixed; allow using $regex when querying Arrays (#599)
+ * fixed; calling Model.update with no atomic keys (#602)
+
+2.3.10 / 2011-11-05
+===================
+
+ * fixed; model.update casting for nested paths works (#542)
+
+2.3.9 / 2011-11-04
+==================
+
+ * fixed; deepEquals check for MongooseArray returned false
+ * fixed; reset modified flags of embedded docs after save [gitfy]
+ * fixed; setting embedded doc with identical values no longer marks modified [gitfy]
+ * updated; -native driver to 0.9.6.23 [mlazarov]
+ * fixed; Model.update casting (#542, #545, #479)
+ * fixed; populated refs no longer fail required validators (#577)
+ * fixed; populating refs of objects with custom ids works
+ * fixed; $pop & $unset work with Model.update (#574)
+ * added; more helpful debugging message for Schema#add (#578)
+ * fixed; accessing .id when no _id exists now returns null (#590)
+
+2.3.8 / 2011-10-26
+==================
+
+ * added; callback to query#findOne is now optional (#581)
+
+2.3.7 / 2011-10-24
+==================
+
+ * fixed; wrapped save/remove callbacks in nextTick to mitigate -native swallowing thrown errors
+
+2.3.6 / 2011-10-21
+==================
+
+ * fixed; exclusion of embedded doc _id from query results (#541)
+
+2.3.5 / 2011-10-19
+==================
+
+ * fixed; calling queries without passing a callback works (#569)
+ * fixed; populate() works with String and Number _ids too (#568)
+
+2.3.4 / 2011-10-18
+==================
+
+ * added; Model.create now accepts an array as a first arg
+ * fixed; calling toObject on a DocumentArray with nulls no longer throws
+ * fixed; calling inspect on a DocumentArray with nulls no longer throws
+ * added; MongooseArray#unshift support
+ * fixed; save hooks now fire on embedded documents [gitfy] (#456)
+ * updated; -native driver to 0.9.6-22
+ * fixed; correctly pass $addToSet op instead of $push
+ * fixed; $addToSet properly detects dates
+ * fixed; $addToSet with multiple items works
+ * updated; better node 0.6 Buffer support
+
+2.3.3 / 2011-10-12
+==================
+
+ * fixed; population conditions in multi-query settings [vedmalex] (#563)
+ * fixed; now compatible with Node v0.5.x
+
+2.3.2 / 2011-10-11
+==================
+
+ * fixed; population of null subdoc properties no longer hangs (#561)
+
+2.3.1 / 2011-10-10
+==================
+
+ * added; support for Query filters to populate() [eneko]
+ * fixed; querying with number no longer crashes mongodb (#555) [jlbyrey]
+ * updated; version of -native driver to 0.9.6-21
+ * fixed; prevent query callbacks that throw errors from corrupting -native connection state
+
+2.3.0 / 2011-10-04
+==================
+
+ * fixed; nulls as default values for Boolean now works as expected
+ * updated; version of -native driver to 0.9.6-20
+
+2.2.4 / 2011-10-03
+==================
+
+ * fixed; populate() works when returned array contains undefined/nulls
+
+2.2.3 / 2011-09-29
+==================
+
+ * updated; version of -native driver to 0.9.6-19
+
+2.2.2 / 2011-09-28
+==================
+
+ * added; $regex support to String [davidandrewcope]
+ * added; support for other contexts like repl etc (#535)
+ * fixed; clear modified state properly after saving
+ * added; $addToSet support to Array
+
+2.2.1 / 2011-09-22
+==================
+
+ * more descript error when casting undefined to string
+ * updated; version of -native driver to 0.9.6-18
+
+2.2.0 / 2011-09-22
+==================
+
+ * fixed; maxListeners warning on schemas with many arrays (#530)
+ * changed; return / apply defaults based on fields selected in query (#423)
+ * fixed; correctly detect Mixed types within schema arrays (#532)
+
+2.1.4 / 2011-09-20
+==================
+
+ * fixed; new private methods that stomped on users code
+ * changed; finished removing old "compat" support which did nothing
+
+2.1.3 / 2011-09-16
+==================
+
+ * updated; version of -native driver to 0.9.6-15
+ * added; emit `error` on connection when open fails [edwardhotchkiss]
+ * added; index support to Buffers (thanks justmoon for helping track this down)
+ * fixed; passing collection name via schema in conn.model() now works (thanks vedmalex for reporting)
+
+2.1.2 / 2011-09-07
+==================
+
+ * fixed; Query#find with no args no longer throws
+
+2.1.1 / 2011-09-07
+==================
+
+ * added; support Model.count(fn)
+ * fixed; compatibility with node >=0.4.0 < 0.4.3
+ * added; pass model.options.safe through with .save() so w:2, wtimeout:5000 options work [andrewjstone]
+ * added; support for $type queries
+ * added; support for Query#or
+ * added; more tests
+ * optimized populate queries
+
+2.1.0 / 2011-09-01
+==================
+
+ * changed; document#validate is a public method
+ * fixed; setting number to same value no longer marks modified (#476) [gitfy]
+ * fixed; Buffers shouldn't have default vals
+ * added; allow specifying collection name in schema (#470) [ixti]
+ * fixed; reset modified paths and atomics after saved (#459)
+ * fixed; set isNew on embedded docs to false after save
+ * fixed; use self to ensure proper scope of options in doOpenSet (#483) [andrewjstone]
+
+2.0.4 / 2011-08-29
+==================
+
+ * Fixed; Only send the depopulated ObjectId instead of the entire doc on save (DBRefs)
+ * Fixed; Properly cast nested array values in Model.update (the data was stored in Mongo incorrectly but recast on document fetch was "fixing" it)
+
+2.0.3 / 2011-08-28
+==================
+
+ * Fixed; manipulating a populated array no longer causes infinite loop in BSON serializer during save (#477)
+ * Fixed; populating an empty array no longer hangs foreeeeeeeever (#481)
+
+2.0.2 / 2011-08-25
+==================
+
+ * Fixed; Maintain query option key order (fixes 'bad hint' error from compound query hints)
+
+2.0.1 / 2011-08-25
+==================
+
+ * Fixed; do not over-write the doc when no valide props exist in Model.update (#473)
+
+2.0.0 / 2011-08-24
+===================
+
+ * Added; support for Buffers [justmoon]
+ * Changed; improved error handling [maelstrom]
+ * Removed: unused utils.erase
+ * Fixed; support for passing other context object into Schemas (#234) [Sija]
+ * Fixed; getters are no longer circular refs to themselves (#366)
+ * Removed; unused compat.js
+ * Fixed; getter/setter scopes are set properly
+ * Changed; made several private properties more obvious by prefixing _
+ * Added; DBRef support [guille]
+ * Changed; removed support for multiple collection names per model
+ * Fixed; no longer applying setters when document returned from db
+ * Changed; default auto_reconnect to true
+ * Changed; Query#bind no longer clones the query
+ * Fixed; Model.update now accepts $pull, $inc and friends (#404)
+ * Added; virtual type option support [nw]
+
+1.8.4 / 2011-08-21
+===================
+
+ * Fixed; validation bug when instantiated with non-schema properties (#464) [jmreidy]
+
+1.8.3 / 2011-08-19
+===================
+
+ * Fixed; regression in connection#open [jshaw86]
+
+1.8.2 / 2011-08-17
+===================
+
+ * fixed; reset connection.readyState after failure [tomseago]
+ * fixed; can now query positionally for non-embedded docs (arrays of numbers/strings etc)
+ * fixed; embedded document query casting
+ * added; support for passing options to node-mongo-native db, server, and replsetserver [tomseago]
+
+1.8.1 / 2011-08-10
+===================
+
+ * fixed; ObjectIds were always marked modified
+ * fixed; can now query using document instances
+ * fixed; can now query/update using documents with subdocs
+
+1.8.0 / 2011-08-04
+===================
+
+ * fixed; can now use $all with String and Number
+ * fixed; can query subdoc array with $ne: null
+ * fixed; instance.subdocs#id now works with custom _ids
+ * fixed; do not apply setters when doc returned from db (change in bad behavior)
+
+1.7.4 / 2011-07-25
+===================
+
+ * fixed; sparse now a valid seperate schema option
+ * fixed; now catching cast errors in queries
+ * fixed; calling new Schema with object created in vm.runInNewContext now works (#384) [Sija]
+ * fixed; String enum was disallowing null
+ * fixed; Find by nested document _id now works (#389)
+
+1.7.3 / 2011-07-16
+===================
+
+ * fixed; MongooseArray#indexOf now works with ObjectIds
+ * fixed; validation scope now set properly (#418)
+ * fixed; added missing colors dependency (#398)
+
+1.7.2 / 2011-07-13
+===================
+
+ * changed; node-mongodb-native driver to v0.9.6.7
+
+1.7.1 / 2011-07-12
+===================
+
+ * changed; roll back node-mongodb-native driver to v0.9.6.4
+
+1.7.0 / 2011-07-12
+===================
+
+ * fixed; collection name misspelling [mathrawka]
+ * fixed; 2nd param is required for ReplSetServers [kevinmarvin]
+ * fixed; MongooseArray behaves properly with Object.keys
+ * changed; node-mongodb-native driver to v0.9.6.6
+ * fixed/changed; Mongodb segfault when passed invalid ObjectId (#407)
+ - This means invalid data passed to the ObjectId constructor will now error
+
+1.6.0 / 2011-07-07
+===================
+
+ * changed; .save() errors are now emitted on the instances db instead of the instance 9782463fc
+ * fixed; errors occurring when creating indexes now properly emit on db
+ * added; $maxDistance support to MongooseArrays
+ * fixed; RegExps now work with $all
+ * changed; node-mongodb-native driver to v0.9.6.4
+ * fixed; model names are now accessible via .modelName
+ * added; Query#slaveOk support
+
+1.5.0 / 2011-06-27
+===================
+
+ * changed; saving without a callback no longer ignores the error (@bnoguchi)
+ * changed; hook-js version bump to 0.1.9
+ * changed; node-mongodb-native version bumped to 0.9.6.1 - When .remove() doesn't
+ return an error, null is no longer passed.
+ * fixed; two memory leaks (@justmoon)
+ * added; sparse index support
+ * added; more ObjectId conditionals (gt, lt, gte, lte) (@phillyqueso)
+ * added; options are now passed in model#remote (@JerryLuke)
+
+1.4.0 / 2011-06-10
+===================
+
+ * bumped hooks-js dependency (fixes issue passing null as first arg to next())
+ * fixed; document#inspect now works properly with nested docs
+ * fixed; 'set' now works as a schema attribute (GH-365)
+ * fixed; _id is now set properly within pre-init hooks (GH-289)
+ * added; Query#distinct / Model#distinct support (GH-155)
+ * fixed; embedded docs now can use instance methods (GH-249)
+ * fixed; can now overwrite strings conflicting with schema type
+
+1.3.7 / 2011-06-03
+===================
+
+ * added MongooseArray#splice support
+ * fixed; 'path' is now a valid Schema pathname
+ * improved hooks (utilizing https://github.com/bnoguchi/hooks-js)
+ * fixed; MongooseArray#$shift now works (never did)
+ * fixed; Document.modified no longer throws
+ * fixed; modifying subdoc property sets modified paths for subdoc and parent doc
+ * fixed; marking subdoc path as modified properly persists the value to the db
+ * fixed; RexExps can again be saved ( #357 )
+
+1.3.6 / 2011-05-18
+===================
+
+ * fixed; corrected casting for queries against array types
+ * added; Document#set now accepts Document instances
+
+1.3.5 / 2011-05-17
+===================
+
+ * fixed; $ne queries work properly with single vals
+ * added; #inspect() methods to improve console.log output
+
+1.3.4 / 2011-05-17
+===================
+
+ * fixed; find by Date works as expected (#336)
+ * added; geospatial 2d index support
+ * added; support for $near (#309)
+ * updated; node-mongodb-native driver
+ * fixed; updating numbers work (#342)
+ * added; better error msg when try to remove an embedded doc without an _id (#307)
+ * added; support for 'on-the-fly' schemas (#227)
+ * changed; virtual id getters can now be skipped
+ * fixed; .index() called on subdoc schema now works as expected
+ * fixed; db.setProfile() now buffers until the db is open (#340)
+
+1.3.3 / 2011-04-27
+===================
+
+ * fixed; corrected query casting on nested mixed types
+
+1.3.2 / 2011-04-27
+===================
+
+ * fixed; query hints now retain key order
+
+1.3.1 / 2011-04-27
+===================
+
+ * fixed; setting a property on an embedded array no longer overwrites entire array (GH-310)
+ * fixed; setting nested properties works when sibling prop is named "type"
+ * fixed; isModified is now much finer grained when .set() is used (GH-323)
+ * fixed; mongoose.model() and connection.model() now return the Model (GH-308, GH-305)
+ * fixed; can now use $gt, $lt, $gte, $lte with String schema types (GH-317)
+ * fixed; .lowercase() -> .toLowerCase() in pluralize()
+ * fixed; updating an embedded document by index works (GH-334)
+ * changed; .save() now passes the instance to the callback (GH-294, GH-264)
+ * added; can now query system.profile and system.indexes collections
+ * added; db.model('system.profile') is now included as a default Schema
+ * added; db.setProfiling(level, ms, callback)
+ * added; Query#hint() support
+ * added; more tests
+ * updated node-mongodb-native to 0.9.3
+
+1.3.0 / 2011-04-19
+===================
+
+ * changed; save() callbacks now fire only once on failed validation
+ * changed; Errors returned from save() callbacks now instances of ValidationError
+ * fixed; MongooseArray#indexOf now works properly
+
+1.2.0 / 2011-04-11
+===================
+
+ * changed; MongooseNumber now casts empty string to null
+
+1.1.25 / 2011-04-08
+===================
+
+ * fixed; post init now fires at proper time
+
+1.1.24 / 2011-04-03
+===================
+
+ * fixed; pushing an array onto an Array works on existing docs
+
+1.1.23 / 2011-04-01
+===================
+
+ * Added Model#model
+
+1.1.22 / 2011-03-31
+===================
+
+ * Fixed; $in queries on mixed types now work
+
+1.1.21 / 2011-03-31
+===================
+
+ * Fixed; setting object root to null/undefined works
+
+1.1.20 / 2011-03-31
+===================
+
+ * Fixed; setting multiple props on null field works
+
+1.1.19 / 2011-03-31
+===================
+
+ * Fixed; no longer using $set on paths to an unexisting fields
+
+1.1.18 / 2011-03-30
+===================
+
+ * Fixed; non-mixed type object setters work after initd from null
+
+1.1.17 / 2011-03-30
+===================
+
+ * Fixed; nested object property access works when root initd with null value
+
+1.1.16 / 2011-03-28
+===================
+
+ * Fixed; empty arrays are now saved
+
+1.1.15 / 2011-03-28
+===================
+
+ * Fixed; `null` and `undefined` are set atomically.
+
+1.1.14 / 2011-03-28
+===================
+
+ * Changed; more forgiving date casting, accepting '' as null.
+
+1.1.13 / 2011-03-26
+===================
+
+ * Fixed setting values as `undefined`.
+
+1.1.12 / 2011-03-26
+===================
+
+ * Fixed; nested objects now convert to JSON properly
+ * Fixed; setting nested objects directly now works
+ * Update node-mongodb-native
+
+1.1.11 / 2011-03-25
+===================
+
+ * Fixed for use of `type` as a key.
+
+1.1.10 / 2011-03-23
+===================
+
+ * Changed; Make sure to only ensure indexes while connected
+
+1.1.9 / 2011-03-2
+==================
+
+ * Fixed; Mixed can now default to empty arrays
+ * Fixed; keys by the name 'type' are now valid
+ * Fixed; null values retrieved from the database are hydrated as null values.
+ * Fixed repeated atomic operations when saving a same document twice.
+
+1.1.8 / 2011-03-23
+==================
+
+ * Fixed 'id' overriding. [bnoguchi]
+
+1.1.7 / 2011-03-22
+==================
+
+ * Fixed RegExp query casting when querying against an Array of Strings [bnoguchi]
+ * Fixed getters/setters for nested virtualsl. [bnoguchi]
+
+1.1.6 / 2011-03-22
+==================
+
+ * Only doValidate when path exists in Schema [aheckmann]
+ * Allow function defaults for Array types [aheckmann]
+ * Fix validation hang [aheckmann]
+ * Fix setting of isRequired of SchemaType [aheckmann]
+ * Fix SchemaType#required(false) filter [aheckmann]
+ * More backwards compatibility [aheckmann]
+ * More tests [aheckmann]
+
+1.1.5 / 2011-03-14
+==================
+
+ * Added support for `uri, db, fn` and `uri, fn` signatures for replica sets.
+ * Improved/extended replica set tests.
+
+1.1.4 / 2011-03-09
+==================
+
+ * Fixed; running an empty Query doesn't throw. [aheckmann]
+ * Changed; Promise#addBack returns promise. [aheckmann]
+ * Added streaming cursor support. [aheckmann]
+ * Changed; Query#update defaults to use$SetOnSave now. [brian]
+ * Added more docs.
+
+1.1.3 / 2011-03-04
+==================
+
+ * Added Promise#resolve [aheckmann]
+ * Fixed backward compatibility with nulls [aheckmann]
+ * Changed; Query#{run,exec} return promises [aheckmann]
+
+1.1.2 / 2011-03-03
+==================
+
+ * Restored Query#exec and added notion of default operation [brian]
+ * Fixed ValidatorError messages [brian]
+
+1.1.1 / 2011-03-01
+==================
+
+ * Added SchemaType String `lowercase`, `uppercase`, `trim`.
+ * Public exports (`Model`, `Document`) and tests.
+ * Added ObjectId casting support for `Document`s.
+
+1.1.0 / 2011-02-25
+==================
+
+ * Added support for replica sets.
+
+1.0.16 / 2011-02-18
+===================
+
+ * Added $nin as another whitelisted $conditional for SchemaArray [brian]
+ * Changed #with to #where [brian]
+ * Added ability to use $in conditional with Array types [brian]
+
+1.0.15 / 2011-02-18
+===================
+
+ * Added `id` virtual getter for documents to easily access the hexString of
+ the `_id`.
+
+1.0.14 / 2011-02-17
+===================
+
+ * Fix for arrays within subdocuments [brian]
+
+1.0.13 / 2011-02-16
+===================
+
+ * Fixed embedded documents saving.
+
+1.0.12 / 2011-02-14
+===================
+
+ * Minor refactorings [brian]
+
+1.0.11 / 2011-02-14
+===================
+
+ * Query refactor and $ne, $slice, $or, $size, $elemMatch, $nin, $exists support [brian]
+ * Named scopes sugar [brian]
+
+1.0.10 / 2011-02-11
+===================
+
+ * Updated node-mongodb-native driver [thanks John Allen]
+
+1.0.9 / 2011-02-09
+==================
+
+ * Fixed single member arrays as defaults [brian]
+
+1.0.8 / 2011-02-09
+==================
+
+ * Fixed for collection-level buffering of commands [gitfy]
+ * Fixed `Document#toJSON` [dalejefferson]
+ * Fixed `Connection` authentication [robrighter]
+ * Fixed clash of accessors in getters/setters [eirikurn]
+ * Improved `Model#save` promise handling
+
+1.0.7 / 2011-02-05
+==================
+
+ * Fixed memory leak warnings for test suite on 0.3
+ * Fixed querying documents that have an array that contain at least one
+ specified member. [brian]
+ * Fixed default value for Array types (fixes GH-210). [brian]
+ * Fixed example code.
+
+1.0.6 / 2011-02-03
+==================
+
+ * Fixed `post` middleware
+ * Fixed; it's now possible to instantiate a model even when one of the paths maps
+ to an undefined value [brian]
+
+1.0.5 / 2011-02-02
+==================
+
+ * Fixed; combo $push and $pushAll auto-converts into a $pushAll [brian]
+ * Fixed; combo $pull and $pullAll auto-converts to a single $pullAll [brian]
+ * Fixed; $pullAll now removes said members from array before save (so it acts just
+ like pushAll) [brian]
+ * Fixed; multiple $pulls and $pushes become a single $pullAll and $pushAll.
+ Moreover, $pull now modifies the array before save to reflect the immediate
+ change [brian]
+ * Added tests for nested shortcut getters [brian]
+ * Added tests that show that Schemas with nested Arrays don't apply defaults
+ [brian]
+
+1.0.4 / 2011-02-02
+==================
+
+ * Added MongooseNumber#toString
+ * Added MongooseNumber unit tests
+
+1.0.3 / 2011-02-02
+==================
+
+ * Make sure safe mode works with Model#save
+ * Changed Schema options: safe mode is now the default
+ * Updated node-mongodb-native to HEAD
+
+1.0.2 / 2011-02-02
+==================
+
+ * Added a Model.create shortcut for creating documents. [brian]
+ * Fixed; we can now instantiate models with hashes that map to at least one
+ null value. [brian]
+ * Fixed Schema with more than 2 nested levels. [brian]
+
+1.0.1 / 2011-02-02
+==================
+
+ * Improved `MongooseNumber`, works almost like the native except for `typeof`
+ not being `'number'`.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/README.md
new file mode 100644
index 0000000..22a778a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/README.md
@@ -0,0 +1,322 @@
+# Mongoose
+
+Mongoose is a [MongoDB](https://www.mongodb.org/) object modeling tool designed to work in an asynchronous environment.
+
+[![Slack Status](http://slack.mongoosejs.io/badge.svg)](http://slack.mongoosejs.io)
+[![Build Status](https://api.travis-ci.org/Automattic/mongoose.svg?branch=master)](https://travis-ci.org/Automattic/mongoose)
+[![NPM version](https://badge.fury.io/js/mongoose.svg)](http://badge.fury.io/js/mongoose)
+[![Dependency Status](https://gemnasium.com/Automattic/mongoose.svg)](https://gemnasium.com/Automattic/mongoose)
+[![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/vkarpov?utm_source=github&utm_medium=button&utm_term=vkarpov&utm_campaign=github)
+
+## Documentation
+
+[mongoosejs.com](http://mongoosejs.com/)
+
+## Support
+
+ - [Stack Overflow](http://stackoverflow.com/questions/tagged/mongoose)
+ - [Bug Reports](https://github.com/Automattic/mongoose/issues/)
+ - [Mongoose Slack Channel](http://slack.mongoosejs.io/)
+ - [Help Forum](http://groups.google.com/group/mongoose-orm)
+ - [MongoDB Support](https://docs.mongodb.org/manual/support/)
+
+## Plugins
+
+Check out the [plugins search site](http://plugins.mongoosejs.io/) to see hundreds of related modules from the community.
+
+Build your own Mongoose plugin through [generator-mongoose-plugin](https://github.com/huei90/generator-mongoose-plugin).
+
+## Contributors
+
+View all 200+ [contributors](https://github.com/Automattic/mongoose/graphs/contributors). Stand up and be counted as a [contributor](https://github.com/Automattic/mongoose/blob/master/CONTRIBUTING.md) too!
+
+## Live Examples
+<a href="http://code.runnable.com/mongoose" target="_blank"><img src="http://i.imgur.com/4yNYDLI.png"></a>
+
+## Installation
+
+First install [node.js](http://nodejs.org/) and [mongodb](https://www.mongodb.org/downloads). Then:
+
+```sh
+$ npm install mongoose
+```
+
+## Stability
+
+The current stable branch is [master](https://github.com/Automattic/mongoose/tree/master). The [3.8.x](https://github.com/Automattic/mongoose/tree/3.8.x) branch contains legacy support for the 3.x release series, which is no longer under active development as of September 2015. The [3.8.x docs](http://mongoosejs.com/docs/3.8.x/) are still available.
+
+## Overview
+
+### Connecting to MongoDB
+
+First, we need to define a connection. If your app uses only one database, you should use `mongoose.connect`. If you need to create additional connections, use `mongoose.createConnection`.
+
+Both `connect` and `createConnection` take a `mongodb://` URI, or the parameters `host, database, port, options`.
+
+```js
+var mongoose = require('mongoose');
+
+mongoose.connect('mongodb://localhost/my_database');
+```
+
+Once connected, the `open` event is fired on the `Connection` instance. If you're using `mongoose.connect`, the `Connection` is `mongoose.connection`. Otherwise, `mongoose.createConnection` return value is a `Connection`.
+
+**Note:** _If the local connection fails then try using 127.0.0.1 instead of localhost. Sometimes issues may arise when the local hostname has been changed._
+
+**Important!** Mongoose buffers all the commands until it's connected to the database. This means that you don't have to wait until it connects to MongoDB in order to define models, run queries, etc.
+
+### Defining a Model
+
+Models are defined through the `Schema` interface.
+
+```js
+var Schema = mongoose.Schema,
+ ObjectId = Schema.ObjectId;
+
+var BlogPost = new Schema({
+ author : ObjectId,
+ title : String,
+ body : String,
+ date : Date
+});
+```
+
+Aside from defining the structure of your documents and the types of data you're storing, a Schema handles the definition of:
+
+* [Validators](http://mongoosejs.com/docs/validation.html) (async and sync)
+* [Defaults](http://mongoosejs.com/docs/api.html#schematype_SchemaType-default)
+* [Getters](http://mongoosejs.com/docs/api.html#schematype_SchemaType-get)
+* [Setters](http://mongoosejs.com/docs/api.html#schematype_SchemaType-set)
+* [Indexes](http://mongoosejs.com/docs/guide.html#indexes)
+* [Middleware](http://mongoosejs.com/docs/middleware.html)
+* [Methods](http://mongoosejs.com/docs/guide.html#methods) definition
+* [Statics](http://mongoosejs.com/docs/guide.html#statics) definition
+* [Plugins](http://mongoosejs.com/docs/plugins.html)
+* [pseudo-JOINs](http://mongoosejs.com/docs/populate.html)
+
+The following example shows some of these features:
+
+```js
+var Comment = new Schema({
+ name: { type: String, default: 'hahaha' },
+ age: { type: Number, min: 18, index: true },
+ bio: { type: String, match: /[a-z]/ },
+ date: { type: Date, default: Date.now },
+ buff: Buffer
+});
+
+// a setter
+Comment.path('name').set(function (v) {
+ return capitalize(v);
+});
+
+// middleware
+Comment.pre('save', function (next) {
+ notify(this.get('email'));
+ next();
+});
+```
+
+Take a look at the example in `examples/schema.js` for an end-to-end example of a typical setup.
+
+### Accessing a Model
+
+Once we define a model through `mongoose.model('ModelName', mySchema)`, we can access it through the same function
+
+```js
+var myModel = mongoose.model('ModelName');
+```
+
+Or just do it all at once
+
+```js
+var MyModel = mongoose.model('ModelName', mySchema);
+```
+
+The first argument is the _singular_ name of the collection your model is for. **Mongoose automatically looks for the _plural_ version of your model name.** For example, if you use
+
+```js
+var MyModel = mongoose.model('Ticket', mySchema);
+```
+
+Then Mongoose will create the model for your __tickets__ collection, not your __ticket__ collection.
+
+Once we have our model, we can then instantiate it, and save it:
+
+```js
+var instance = new MyModel();
+instance.my.key = 'hello';
+instance.save(function (err) {
+ //
+});
+```
+
+Or we can find documents from the same collection
+
+```js
+MyModel.find({}, function (err, docs) {
+ // docs.forEach
+});
+```
+
+You can also `findOne`, `findById`, `update`, etc. For more details check out [the docs](http://mongoosejs.com/docs/queries.html).
+
+**Important!** If you opened a separate connection using `mongoose.createConnection()` but attempt to access the model through `mongoose.model('ModelName')` it will not work as expected since it is not hooked up to an active db connection. In this case access your model through the connection you created:
+
+```js
+var conn = mongoose.createConnection('your connection string'),
+ MyModel = conn.model('ModelName', schema),
+ m = new MyModel;
+m.save(); // works
+```
+
+vs
+
+```js
+var conn = mongoose.createConnection('your connection string'),
+ MyModel = mongoose.model('ModelName', schema),
+ m = new MyModel;
+m.save(); // does not work b/c the default connection object was never connected
+```
+
+### Embedded Documents
+
+In the first example snippet, we defined a key in the Schema that looks like:
+
+```
+comments: [Comment]
+```
+
+Where `Comment` is a `Schema` we created. This means that creating embedded documents is as simple as:
+
+```js
+// retrieve my model
+var BlogPost = mongoose.model('BlogPost');
+
+// create a blog post
+var post = new BlogPost();
+
+// create a comment
+post.comments.push({ title: 'My comment' });
+
+post.save(function (err) {
+ if (!err) console.log('Success!');
+});
+```
+
+The same goes for removing them:
+
+```js
+BlogPost.findById(myId, function (err, post) {
+ if (!err) {
+ post.comments[0].remove();
+ post.save(function (err) {
+ // do something
+ });
+ }
+});
+```
+
+Embedded documents enjoy all the same features as your models. Defaults, validators, middleware. Whenever an error occurs, it's bubbled to the `save()` error callback, so error handling is a snap!
+
+
+### Middleware
+
+See the [docs](http://mongoosejs.com/docs/middleware.html) page.
+
+#### Intercepting and mutating method arguments
+
+You can intercept method arguments via middleware.
+
+For example, this would allow you to broadcast changes about your Documents every time someone `set`s a path in your Document to a new value:
+
+```js
+schema.pre('set', function (next, path, val, typel) {
+ // `this` is the current Document
+ this.emit('set', path, val);
+
+ // Pass control to the next pre
+ next();
+});
+```
+
+Moreover, you can mutate the incoming `method` arguments so that subsequent middleware see different values for those arguments. To do so, just pass the new values to `next`:
+
+```js
+.pre(method, function firstPre (next, methodArg1, methodArg2) {
+ // Mutate methodArg1
+ next("altered-" + methodArg1.toString(), methodArg2);
+});
+
+// pre declaration is chainable
+.pre(method, function secondPre (next, methodArg1, methodArg2) {
+ console.log(methodArg1);
+ // => 'altered-originalValOfMethodArg1'
+
+ console.log(methodArg2);
+ // => 'originalValOfMethodArg2'
+
+ // Passing no arguments to `next` automatically passes along the current argument values
+ // i.e., the following `next()` is equivalent to `next(methodArg1, methodArg2)`
+ // and also equivalent to, with the example method arg
+ // values, `next('altered-originalValOfMethodArg1', 'originalValOfMethodArg2')`
+ next();
+});
+```
+
+#### Schema gotcha
+
+`type`, when used in a schema has special meaning within Mongoose. If your schema requires using `type` as a nested property you must use object notation:
+
+```js
+new Schema({
+ broken: { type: Boolean },
+ asset: {
+ name: String,
+ type: String // uh oh, it broke. asset will be interpreted as String
+ }
+});
+
+new Schema({
+ works: { type: Boolean },
+ asset: {
+ name: String,
+ type: { type: String } // works. asset is an object with a type property
+ }
+});
+```
+
+### Driver Access
+
+Mongoose is built on top of the [official MongoDB Node.js driver](https://github.com/mongodb/node-mongodb-native). Each mongoose model keeps a reference to a [native MongoDB driver collection](http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html). The collection object can be accessed using `YourModel.collection`. However, using the collection object directly bypasses all mongoose features, including hooks, validation, etc. The one
+notable exception that `YourModel.collection` still buffers
+commands. As such, `YourModel.collection.find()` will **not**
+return a cursor.
+
+## API Docs
+
+Find the API docs [here](http://mongoosejs.com/docs/api.html), generated using [dox](https://github.com/tj/dox)
+and [acquit](https://github.com/vkarpov15/acquit).
+
+## License
+
+Copyright (c) 2010 LearnBoost &lt;dev@learnboost.com&gt;
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/README.md
new file mode 100644
index 0000000..cb32898
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/README.md
@@ -0,0 +1,41 @@
+This directory contains runnable sample mongoose programs.
+
+To run:
+
+ - first install [Node.js](http://nodejs.org/)
+ - from the root of the project, execute `npm install -d`
+ - in the example directory, run `npm install -d`
+ - from the command line, execute: `node example.js`, replacing "example.js" with the name of a program.
+
+
+Goal is to show:
+
+- ~~global schemas~~
+- ~~GeoJSON schemas / use (with crs)~~
+- text search (once MongoDB removes the "Experimental/beta" label)
+- ~~lean queries~~
+- ~~statics~~
+- methods and statics on subdocs
+- custom types
+- ~~querybuilder~~
+- ~~promises~~
+- accessing driver collection, db
+- ~~connecting to replica sets~~
+- connecting to sharded clusters
+- enabling a fail fast mode
+- on the fly schemas
+- storing files
+- ~~map reduce~~
+- ~~aggregation~~
+- advanced hooks
+- using $elemMatch to return a subset of an array
+- query casting
+- upserts
+- pagination
+- express + mongoose session handling
+- ~~group by (use aggregation)~~
+- authentication
+- schema migration techniques
+- converting documents to plain objects (show transforms)
+- how to $unset
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/aggregate/aggregate.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/aggregate/aggregate.js
new file mode 100644
index 0000000..793c8cb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/aggregate/aggregate.js
@@ -0,0 +1,103 @@
+
+// import async to make control flow simplier
+var async = require('async');
+
+// import the rest of the normal stuff
+var mongoose = require('../../lib');
+
+require('./person.js')();
+
+var Person = mongoose.model('Person');
+
+// define some dummy data
+var data = [
+ {
+ name: 'bill',
+ age: 25,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 25)),
+ gender: 'Male',
+ likes: ['movies', 'games', 'dogs']
+ },
+ {
+ name: 'mary',
+ age: 30,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 30)),
+ gender: 'Female',
+ likes: ['movies', 'birds', 'cats']
+ },
+ {
+ name: 'bob',
+ age: 21,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 21)),
+ gender: 'Male',
+ likes: ['tv', 'games', 'rabbits']
+ },
+ {
+ name: 'lilly',
+ age: 26,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 26)),
+ gender: 'Female',
+ likes: ['books', 'cats', 'dogs']
+ },
+ {
+ name: 'alucard',
+ age: 1000,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 1000)),
+ gender: 'Male',
+ likes: ['glasses', 'wine', 'the night']
+ }
+];
+
+
+mongoose.connect('mongodb://localhost/persons', function(err) {
+ if (err) throw err;
+
+ // create all of the dummy people
+ async.each(data, function(item, cb) {
+ Person.create(item, cb);
+ }, function(err) {
+ if (err) {
+ // handle error
+ }
+
+ // run an aggregate query that will get all of the people who like a given
+ // item. To see the full documentation on ways to use the aggregate
+ // framework, see http://docs.mongodb.org/manual/core/aggregation/
+ Person.aggregate(
+ // select the fields we want to deal with
+ {$project: {name: 1, likes: 1}},
+ // unwind 'likes', which will create a document for each like
+ {$unwind: '$likes'},
+ // group everything by the like and then add each name with that like to
+ // the set for the like
+ {$group: {
+ _id: {likes: '$likes'},
+ likers: {$addToSet: '$name'}
+ }},
+ function(err, result) {
+ if (err) throw err;
+ console.log(result);
+ /* [
+ { _id: { likes: 'the night' }, likers: [ 'alucard' ] },
+ { _id: { likes: 'wine' }, likers: [ 'alucard' ] },
+ { _id: { likes: 'books' }, likers: [ 'lilly' ] },
+ { _id: { likes: 'glasses' }, likers: [ 'alucard' ] },
+ { _id: { likes: 'birds' }, likers: [ 'mary' ] },
+ { _id: { likes: 'rabbits' }, likers: [ 'bob' ] },
+ { _id: { likes: 'cats' }, likers: [ 'lilly', 'mary' ] },
+ { _id: { likes: 'dogs' }, likers: [ 'lilly', 'bill' ] },
+ { _id: { likes: 'tv' }, likers: [ 'bob' ] },
+ { _id: { likes: 'games' }, likers: [ 'bob', 'bill' ] },
+ { _id: { likes: 'movies' }, likers: [ 'mary', 'bill' ] }
+ ] */
+
+ cleanup();
+ });
+ });
+});
+
+function cleanup() {
+ Person.remove(function() {
+ mongoose.disconnect();
+ });
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/aggregate/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/aggregate/package.json
new file mode 100644
index 0000000..53ed2e1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/aggregate/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "aggregate-example",
+ "private": "true",
+ "version": "0.0.0",
+ "description": "deps for aggregate example",
+ "main": "aggregate.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "dependencies": { "async": "*" },
+ "repository": "",
+ "author": "",
+ "license": "BSD"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/aggregate/person.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/aggregate/person.js
new file mode 100644
index 0000000..607bb07
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/aggregate/person.js
@@ -0,0 +1,17 @@
+
+// import the necessary modules
+var mongoose = require('../../lib');
+var Schema = mongoose.Schema;
+
+// create an export function to encapsulate the model creation
+module.exports = function() {
+ // define schema
+ var PersonSchema = new Schema({
+ name: String,
+ age: Number,
+ birthday: Date,
+ gender: String,
+ likes: [String]
+ });
+ mongoose.model('Person', PersonSchema);
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/doc-methods.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/doc-methods.js
new file mode 100644
index 0000000..1f648b9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/doc-methods.js
@@ -0,0 +1,77 @@
+
+var mongoose = require('mongoose');
+var Schema = mongoose.Schema;
+
+console.log('Running mongoose version %s', mongoose.version);
+
+/**
+ * Schema
+ */
+
+var CharacterSchema = Schema({
+ name: {
+ type: String,
+ required: true
+ },
+ health: {
+ type: Number,
+ min: 0,
+ max: 100
+ }
+});
+
+/**
+ * Methods
+ */
+
+CharacterSchema.methods.attack = function() {
+ console.log('%s is attacking', this.name);
+};
+
+/**
+ * Character model
+ */
+
+var Character = mongoose.model('Character', CharacterSchema);
+
+/**
+ * Connect to the database on localhost with
+ * the default port (27017)
+ */
+
+var dbname = 'mongoose-example-doc-methods-' + ((Math.random() * 10000) | 0);
+var uri = 'mongodb://localhost/' + dbname;
+
+console.log('connecting to %s', uri);
+
+mongoose.connect(uri, function(err) {
+ // if we failed to connect, abort
+ if (err) throw err;
+
+ // we connected ok
+ example();
+});
+
+/**
+ * Use case
+ */
+
+function example() {
+ Character.create({name: 'Link', health: 100}, function(err, link) {
+ if (err) return done(err);
+ console.log('found', link);
+ link.attack(); // 'Link is attacking'
+ done();
+ });
+}
+
+/**
+ * Clean up
+ */
+
+function done(err) {
+ if (err) console.error(err);
+ mongoose.connection.db.dropDatabase(function() {
+ mongoose.disconnect();
+ });
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/README.md
new file mode 100644
index 0000000..7ba07b8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/README.md
@@ -0,0 +1 @@
+Mongoose + Express examples
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/connection-sharing/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/connection-sharing/README.md
new file mode 100644
index 0000000..fc709a3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/connection-sharing/README.md
@@ -0,0 +1,6 @@
+
+To run:
+
+- Execute `npm install` from this directory
+- Execute `node app.js`
+- Navigate to `localhost:8000`
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/connection-sharing/app.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/connection-sharing/app.js
new file mode 100644
index 0000000..8fb2fee
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/connection-sharing/app.js
@@ -0,0 +1,17 @@
+
+var express = require('express');
+var mongoose = require('../../../lib');
+
+var uri = 'mongodb://localhost/mongoose-shared-connection';
+global.db = mongoose.createConnection(uri);
+
+var routes = require('./routes');
+
+var app = express();
+app.get('/', routes.home);
+app.get('/insert', routes.insert);
+app.get('/name', routes.modelName);
+
+app.listen(8000, function() {
+ console.log('listening on http://localhost:8000');
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/connection-sharing/modelA.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/connection-sharing/modelA.js
new file mode 100644
index 0000000..78f9ff6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/connection-sharing/modelA.js
@@ -0,0 +1,5 @@
+var Schema = require('../../../lib').Schema;
+var mySchema = Schema({name: String});
+
+/* global db */
+module.exports = db.model('MyModel', mySchema);
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/connection-sharing/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/connection-sharing/package.json
new file mode 100644
index 0000000..e326165
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/connection-sharing/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "connection-sharing",
+ "private": "true",
+ "version": "0.0.0",
+ "description": "ERROR: No README.md file found!",
+ "main": "app.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "dependencies": { "express": "3.1.1" },
+ "repository": "",
+ "author": "",
+ "license": "BSD"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/connection-sharing/routes.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/connection-sharing/routes.js
new file mode 100644
index 0000000..35e4f8f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/express/connection-sharing/routes.js
@@ -0,0 +1,20 @@
+
+var model = require('./modelA');
+
+exports.home = function(req, res, next) {
+ model.find(function(err, docs) {
+ if (err) return next(err);
+ res.send(docs);
+ });
+};
+
+exports.modelName = function(req, res) {
+ res.send('my model name is ' + model.modelName);
+};
+
+exports.insert = function(req, res, next) {
+ model.create({name: 'inserting ' + Date.now()}, function(err, doc) {
+ if (err) return next(err);
+ res.send(doc);
+ });
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/geospatial/geoJSONSchema.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/geospatial/geoJSONSchema.js
new file mode 100644
index 0000000..f950dea
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/geospatial/geoJSONSchema.js
@@ -0,0 +1,22 @@
+
+// import the necessary modules
+var mongoose = require('../../lib');
+var Schema = mongoose.Schema;
+
+// create an export function to encapsulate the model creation
+module.exports = function() {
+ // define schema
+ // NOTE : This object must conform *precisely* to the geoJSON specification
+ // you cannot embed a geoJSON doc inside a model or anything like that- IT
+ // MUST BE VANILLA
+ var LocationObject = new Schema({
+ loc: {
+ type: {type: String},
+ coordinates: []
+ }
+ });
+ // define the index
+ LocationObject.index({loc: '2dsphere'});
+
+ mongoose.model('Location', LocationObject);
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/geospatial/geoJSONexample.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/geospatial/geoJSONexample.js
new file mode 100644
index 0000000..8e5dd2b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/geospatial/geoJSONexample.js
@@ -0,0 +1,56 @@
+// import async to make control flow simplier
+var async = require('async');
+
+// import the rest of the normal stuff
+var mongoose = require('../../lib');
+
+require('./geoJSONSchema.js')();
+
+var Location = mongoose.model('Location');
+
+// define some dummy data
+// note: the type can be Point, LineString, or Polygon
+var data = [
+ {loc: {type: 'Point', coordinates: [-20.0, 5.0]}},
+ {loc: {type: 'Point', coordinates: [6.0, 10.0]}},
+ {loc: {type: 'Point', coordinates: [34.0, -50.0]}},
+ {loc: {type: 'Point', coordinates: [-100.0, 70.0]}},
+ {loc: {type: 'Point', coordinates: [38.0, 38.0]}}
+];
+
+
+mongoose.connect('mongodb://localhost/locations', function(err) {
+ if (err) {
+ throw err;
+ }
+
+ Location.on('index', function(err) {
+ if (err) {
+ throw err;
+ }
+ // create all of the dummy locations
+ async.each(data, function(item, cb) {
+ Location.create(item, cb);
+ }, function(err) {
+ if (err) {
+ throw err;
+ }
+ // create the location we want to search for
+ var coords = {type: 'Point', coordinates: [-5, 5]};
+ // search for it
+ Location.find({loc: {$near: coords}}).limit(1).exec(function(err, res) {
+ if (err) {
+ throw err;
+ }
+ console.log('Closest to %s is %s', JSON.stringify(coords), res);
+ cleanup();
+ });
+ });
+ });
+});
+
+function cleanup() {
+ Location.remove(function() {
+ mongoose.disconnect();
+ });
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/geospatial/geospatial.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/geospatial/geospatial.js
new file mode 100644
index 0000000..3ff8c0b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/geospatial/geospatial.js
@@ -0,0 +1,100 @@
+// import async to make control flow simplier
+var async = require('async');
+
+// import the rest of the normal stuff
+var mongoose = require('../../lib');
+
+require('./person.js')();
+
+var Person = mongoose.model('Person');
+
+// define some dummy data
+var data = [
+ {
+ name: 'bill',
+ age: 25,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 25)),
+ gender: 'Male',
+ likes: ['movies', 'games', 'dogs'],
+ loc: [0, 0]
+ },
+ {
+ name: 'mary',
+ age: 30,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 30)),
+ gender: 'Female',
+ likes: ['movies', 'birds', 'cats'],
+ loc: [1, 1]
+ },
+ {
+ name: 'bob',
+ age: 21,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 21)),
+ gender: 'Male',
+ likes: ['tv', 'games', 'rabbits'],
+ loc: [3, 3]
+ },
+ {
+ name: 'lilly',
+ age: 26,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 26)),
+ gender: 'Female',
+ likes: ['books', 'cats', 'dogs'],
+ loc: [6, 6]
+ },
+ {
+ name: 'alucard',
+ age: 1000,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 1000)),
+ gender: 'Male',
+ likes: ['glasses', 'wine', 'the night'],
+ loc: [10, 10]
+ }
+];
+
+
+mongoose.connect('mongodb://localhost/persons', function(err) {
+ if (err) {
+ throw err;
+ }
+
+ // create all of the dummy people
+ async.each(data, function(item, cb) {
+ Person.create(item, cb);
+ }, function(err) {
+ if (err) {
+ // handler error
+ }
+
+ // let's find the closest person to bob
+ Person.find({name: 'bob'}, function(err, res) {
+ if (err) {
+ throw err;
+ }
+
+ res[0].findClosest(function(err, closest) {
+ if (err) {
+ throw err;
+ }
+
+ console.log('%s is closest to %s', res[0].name, closest);
+
+
+ // we can also just query straight off of the model. For more
+ // information about geospatial queries and indexes, see
+ // http://docs.mongodb.org/manual/applications/geospatial-indexes/
+ var coords = [7, 7];
+ Person.find({loc: {$nearSphere: coords}}).limit(1).exec(function(err, res) {
+ console.log('Closest to %s is %s', coords, res);
+ cleanup();
+ });
+ });
+ });
+ });
+});
+
+function cleanup() {
+ Person.remove(function() {
+ mongoose.disconnect();
+ });
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/geospatial/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/geospatial/package.json
new file mode 100644
index 0000000..75c2a0e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/geospatial/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "geospatial-example",
+ "private": "true",
+ "version": "0.0.0",
+ "description": "deps for geospatial example",
+ "main": "geospatial.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "dependencies": { "async": "*" },
+ "repository": "",
+ "author": "",
+ "license": "BSD"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/geospatial/person.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/geospatial/person.js
new file mode 100644
index 0000000..e816637
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/geospatial/person.js
@@ -0,0 +1,27 @@
+// import the necessary modules
+var mongoose = require('../../lib');
+var Schema = mongoose.Schema;
+
+// create an export function to encapsulate the model creation
+module.exports = function() {
+ // define schema
+ var PersonSchema = new Schema({
+ name: String,
+ age: Number,
+ birthday: Date,
+ gender: String,
+ likes: [String],
+ // define the geospatial field
+ loc: {type: [Number], index: '2d'}
+ });
+
+ // define a method to find the closest person
+ PersonSchema.methods.findClosest = function(cb) {
+ return this.model('Person').find({
+ loc: {$nearSphere: this.loc},
+ name: {$ne: this.name}
+ }).limit(1).exec(cb);
+ };
+
+ mongoose.model('Person', PersonSchema);
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/globalschemas/gs_example.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/globalschemas/gs_example.js
new file mode 100644
index 0000000..af9ff11
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/globalschemas/gs_example.js
@@ -0,0 +1,47 @@
+var mongoose = require('../../lib');
+
+
+// import the global schema, this can be done in any file that needs the model
+require('./person.js')();
+
+// grab the person model object
+var Person = mongoose.model('Person');
+
+// connect to a server to do a quick write / read example
+
+mongoose.connect('mongodb://localhost/persons', function(err) {
+ if (err) {
+ throw err;
+ }
+
+ Person.create({
+ name: 'bill',
+ age: 25,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 25))
+ }, function(err, bill) {
+ if (err) {
+ throw err;
+ }
+ console.log('People added to db: %s', bill.toString());
+ Person.find({}, function(err, people) {
+ if (err) {
+ throw err;
+ }
+
+ people.forEach(function(person) {
+ console.log('People in the db: %s', person.toString());
+ });
+
+ // make sure to clean things up after we're done
+ setTimeout(function() {
+ cleanup();
+ }, 2000);
+ });
+ });
+});
+
+function cleanup() {
+ Person.remove(function() {
+ mongoose.disconnect();
+ });
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/globalschemas/person.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/globalschemas/person.js
new file mode 100644
index 0000000..39ae725
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/globalschemas/person.js
@@ -0,0 +1,14 @@
+// import the necessary modules
+var mongoose = require('../../lib');
+var Schema = mongoose.Schema;
+
+// create an export function to encapsulate the model creation
+module.exports = function() {
+ // define schema
+ var PersonSchema = new Schema({
+ name: String,
+ age: Number,
+ birthday: Date
+ });
+ mongoose.model('Person', PersonSchema);
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/lean/lean.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/lean/lean.js
new file mode 100644
index 0000000..763367f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/lean/lean.js
@@ -0,0 +1,84 @@
+
+// import async to make control flow simplier
+var async = require('async');
+
+// import the rest of the normal stuff
+var mongoose = require('../../lib');
+
+require('./person.js')();
+
+var Person = mongoose.model('Person');
+
+// define some dummy data
+var data = [
+ {
+ name: 'bill',
+ age: 25,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 25)),
+ gender: 'Male',
+ likes: ['movies', 'games', 'dogs']
+ },
+ {
+ name: 'mary',
+ age: 30,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 30)),
+ gender: 'Female',
+ likes: ['movies', 'birds', 'cats']
+ },
+ {
+ name: 'bob',
+ age: 21,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 21)),
+ gender: 'Male',
+ likes: ['tv', 'games', 'rabbits']
+ },
+ {
+ name: 'lilly',
+ age: 26,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 26)),
+ gender: 'Female',
+ likes: ['books', 'cats', 'dogs']
+ },
+ {
+ name: 'alucard',
+ age: 1000,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 1000)),
+ gender: 'Male',
+ likes: ['glasses', 'wine', 'the night']
+ }
+];
+
+
+mongoose.connect('mongodb://localhost/persons', function(err) {
+ if (err) throw err;
+
+ // create all of the dummy people
+ async.each(data, function(item, cb) {
+ Person.create(item, cb);
+ }, function(err) {
+ if (err) {
+ // handle error
+ }
+
+ // lean queries return just plain javascript objects, not
+ // MongooseDocuments. This makes them good for high performance read
+ // situations
+
+ // when using .lean() the default is true, but you can explicitly set the
+ // value by passing in a boolean value. IE. .lean(false)
+ var q = Person.find({age: {$lt: 1000}}).sort('age').limit(2).lean();
+ q.exec(function(err, results) {
+ if (err) throw err;
+ console.log('Are the results MongooseDocuments?: %s', results[0] instanceof mongoose.Document);
+
+ console.log(results);
+ cleanup();
+ });
+ });
+});
+
+function cleanup() {
+ Person.remove(function() {
+ mongoose.disconnect();
+ });
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/lean/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/lean/package.json
new file mode 100644
index 0000000..6ee511d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/lean/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "lean-example",
+ "private": "true",
+ "version": "0.0.0",
+ "description": "deps for lean example",
+ "main": "lean.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "dependencies": { "async": "*" },
+ "repository": "",
+ "author": "",
+ "license": "BSD"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/lean/person.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/lean/person.js
new file mode 100644
index 0000000..b0bd2ed
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/lean/person.js
@@ -0,0 +1,16 @@
+// import the necessary modules
+var mongoose = require('../../lib');
+var Schema = mongoose.Schema;
+
+// create an export function to encapsulate the model creation
+module.exports = function() {
+ // define schema
+ var PersonSchema = new Schema({
+ name: String,
+ age: Number,
+ birthday: Date,
+ gender: String,
+ likes: [String]
+ });
+ mongoose.model('Person', PersonSchema);
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/mapreduce/mapreduce.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/mapreduce/mapreduce.js
new file mode 100644
index 0000000..6d67fbf
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/mapreduce/mapreduce.js
@@ -0,0 +1,100 @@
+// import async to make control flow simplier
+var async = require('async');
+
+// import the rest of the normal stuff
+var mongoose = require('../../lib');
+
+require('./person.js')();
+
+var Person = mongoose.model('Person');
+
+// define some dummy data
+var data = [
+ {
+ name: 'bill',
+ age: 25,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 25)),
+ gender: 'Male'
+ },
+ {
+ name: 'mary',
+ age: 30,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 30)),
+ gender: 'Female'
+ },
+ {
+ name: 'bob',
+ age: 21,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 21)),
+ gender: 'Male'
+ },
+ {
+ name: 'lilly',
+ age: 26,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 26)),
+ gender: 'Female'
+ },
+ {
+ name: 'alucard',
+ age: 1000,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 1000)),
+ gender: 'Male'
+ }
+];
+
+
+mongoose.connect('mongodb://localhost/persons', function(err) {
+ if (err) throw err;
+
+ // create all of the dummy people
+ async.each(data, function(item, cb) {
+ Person.create(item, cb);
+ }, function(err) {
+ if (err) {
+ // handle error
+ }
+
+ // alright, simple map reduce example. We will find the total ages of each
+ // gender
+
+ // create the options object
+ var o = {};
+
+ o.map = function() {
+ // in this function, 'this' refers to the current document being
+ // processed. Return the (gender, age) tuple using
+ /* global emit */
+ emit(this.gender, this.age);
+ };
+
+ // the reduce function receives the array of ages that are grouped by the
+ // id, which in this case is the gender
+ o.reduce = function(id, ages) {
+ return Array.sum(ages);
+ };
+
+ // other options that can be specified
+
+ // o.query = { age : { $lt : 1000 }}; // the query object
+ // o.limit = 3; // max number of documents
+ // o.keeptemp = true; // default is false, specifies whether to keep temp data
+ // o.finalize = someFunc; // function called after reduce
+ // o.scope = {}; // the scope variable exposed to map/reduce/finalize
+ // o.jsMode = true; // default is false, force execution to stay in JS
+ o.verbose = true; // default is false, provide stats on the job
+ // o.out = {}; // objects to specify where output goes, by default is
+ // returned, but can also be stored in a new collection
+ // see: http://mongoosejs.com/docs/api.html#model_Model.mapReduce
+ Person.mapReduce(o, function(err, results, stats) {
+ console.log('map reduce took %d ms', stats.processtime);
+ console.log(results);
+ cleanup();
+ });
+ });
+});
+
+function cleanup() {
+ Person.remove(function() {
+ mongoose.disconnect();
+ });
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/mapreduce/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/mapreduce/package.json
new file mode 100644
index 0000000..4240068
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/mapreduce/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "map-reduce-example",
+ "private": "true",
+ "version": "0.0.0",
+ "description": "deps for map reduce example",
+ "main": "mapreduce.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "dependencies": { "async": "*" },
+ "repository": "",
+ "author": "",
+ "license": "BSD"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/mapreduce/person.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/mapreduce/person.js
new file mode 100644
index 0000000..9e2f084
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/mapreduce/person.js
@@ -0,0 +1,16 @@
+
+// import the necessary modules
+var mongoose = require('../../lib');
+var Schema = mongoose.Schema;
+
+// create an export function to encapsulate the model creation
+module.exports = function() {
+ // define schema
+ var PersonSchema = new Schema({
+ name: String,
+ age: Number,
+ birthday: Date,
+ gender: String
+ });
+ mongoose.model('Person', PersonSchema);
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-across-three-collections.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-across-three-collections.js
new file mode 100644
index 0000000..fe6de72
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-across-three-collections.js
@@ -0,0 +1,134 @@
+
+var assert = require('assert');
+var mongoose = require('../../lib');
+var Schema = mongoose.Schema;
+var ObjectId = mongoose.Types.ObjectId;
+
+/**
+ * Connect to the db
+ */
+
+var dbname = 'testing_populateAdInfinitum_' + require('../../lib/utils').random();
+mongoose.connect('localhost', dbname);
+mongoose.connection.on('error', function() {
+ console.error('connection error', arguments);
+});
+
+/**
+ * Schemas
+ */
+
+var user = new Schema({
+ name: String,
+ friends: [{
+ type: Schema.ObjectId,
+ ref: 'User'
+ }]
+});
+var User = mongoose.model('User', user);
+
+var blogpost = Schema({
+ title: String,
+ tags: [String],
+ author: {
+ type: Schema.ObjectId,
+ ref: 'User'
+ }
+});
+var BlogPost = mongoose.model('BlogPost', blogpost);
+
+/**
+ * example
+ */
+
+mongoose.connection.on('open', function() {
+ /**
+ * Generate data
+ */
+
+ var userIds = [new ObjectId, new ObjectId, new ObjectId, new ObjectId];
+ var users = [];
+
+ users.push({
+ _id: userIds[0],
+ name: 'mary',
+ friends: [userIds[1], userIds[2], userIds[3]]
+ });
+ users.push({
+ _id: userIds[1],
+ name: 'bob',
+ friends: [userIds[0], userIds[2], userIds[3]]
+ });
+ users.push({
+ _id: userIds[2],
+ name: 'joe',
+ friends: [userIds[0], userIds[1], userIds[3]]
+ });
+ users.push({
+ _id: userIds[3],
+ name: 'sally',
+ friends: [userIds[0], userIds[1], userIds[2]]
+ });
+
+ User.create(users, function(err) {
+ assert.ifError(err);
+
+ var blogposts = [];
+ blogposts.push({
+ title: 'blog 1',
+ tags: ['fun', 'cool'],
+ author: userIds[3]
+ });
+ blogposts.push({
+ title: 'blog 2',
+ tags: ['cool'],
+ author: userIds[1]
+ });
+ blogposts.push({
+ title: 'blog 3',
+ tags: ['fun', 'odd'],
+ author: userIds[2]
+ });
+
+ BlogPost.create(blogposts, function(err) {
+ assert.ifError(err);
+
+ /**
+ * Population
+ */
+
+ BlogPost
+ .find({tags: 'fun'})
+ .lean()
+ .populate('author')
+ .exec(function(err, docs) {
+ assert.ifError(err);
+
+ /**
+ * Populate the populated documents
+ */
+
+ var opts = {
+ path: 'author.friends',
+ select: 'name',
+ options: {limit: 2}
+ };
+
+ BlogPost.populate(docs, opts, function(err, docs) {
+ assert.ifError(err);
+ console.log('populated');
+ var s = require('util').inspect(docs, {depth: null, colors: true});
+ console.log(s);
+ done();
+ });
+ });
+ });
+ });
+});
+
+function done(err) {
+ if (err) console.error(err.stack);
+ mongoose.connection.db.dropDatabase(function() {
+ mongoose.connection.close();
+ });
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-basic.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-basic.js
new file mode 100644
index 0000000..252cc53
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-basic.js
@@ -0,0 +1,103 @@
+
+var mongoose = require('../../lib');
+var Schema = mongoose.Schema;
+
+console.log('Running mongoose version %s', mongoose.version);
+
+/**
+ * Console schema
+ */
+
+var consoleSchema = Schema({
+ name: String,
+ manufacturer: String,
+ released: Date
+});
+var Console = mongoose.model('Console', consoleSchema);
+
+/**
+ * Game schema
+ */
+
+var gameSchema = Schema({
+ name: String,
+ developer: String,
+ released: Date,
+ consoles: [{
+ type: Schema.Types.ObjectId,
+ ref: 'Console'
+ }]
+});
+var Game = mongoose.model('Game', gameSchema);
+
+/**
+ * Connect to the console database on localhost with
+ * the default port (27017)
+ */
+
+mongoose.connect('mongodb://localhost/console', function(err) {
+ // if we failed to connect, abort
+ if (err) throw err;
+
+ // we connected ok
+ createData();
+});
+
+/**
+ * Data generation
+ */
+
+function createData() {
+ Console.create(
+ {
+ name: 'Nintendo 64',
+ manufacturer: 'Nintendo',
+ released: 'September 29, 1996'
+ },
+ function(err, nintendo64) {
+ if (err) return done(err);
+
+ Game.create({
+ name: 'Legend of Zelda: Ocarina of Time',
+ developer: 'Nintendo',
+ released: new Date('November 21, 1998'),
+ consoles: [nintendo64]
+ },
+ function(err) {
+ if (err) return done(err);
+ example();
+ });
+ }
+ );
+}
+
+/**
+ * Population
+ */
+
+function example() {
+ Game
+ .findOne({name: /^Legend of Zelda/})
+ .populate('consoles')
+ .exec(function(err, ocinara) {
+ if (err) return done(err);
+
+ console.log(
+ '"%s" was released for the %s on %s',
+ ocinara.name,
+ ocinara.consoles[0].name,
+ ocinara.released.toLocaleDateString()
+ );
+
+ done();
+ });
+}
+
+function done(err) {
+ if (err) console.error(err);
+ Console.remove(function() {
+ Game.remove(function() {
+ mongoose.disconnect();
+ });
+ });
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-of-existing-doc.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-of-existing-doc.js
new file mode 100644
index 0000000..c7eadfe
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-of-existing-doc.js
@@ -0,0 +1,109 @@
+
+var mongoose = require('../../lib');
+var Schema = mongoose.Schema;
+
+console.log('Running mongoose version %s', mongoose.version);
+
+/**
+ * Console schema
+ */
+
+var consoleSchema = Schema({
+ name: String,
+ manufacturer: String,
+ released: Date
+});
+var Console = mongoose.model('Console', consoleSchema);
+
+/**
+ * Game schema
+ */
+
+var gameSchema = Schema({
+ name: String,
+ developer: String,
+ released: Date,
+ consoles: [{
+ type: Schema.Types.ObjectId,
+ ref: 'Console'
+ }]
+});
+var Game = mongoose.model('Game', gameSchema);
+
+/**
+ * Connect to the console database on localhost with
+ * the default port (27017)
+ */
+
+mongoose.connect('mongodb://localhost/console', function(err) {
+ // if we failed to connect, abort
+ if (err) throw err;
+
+ // we connected ok
+ createData();
+});
+
+/**
+ * Data generation
+ */
+
+function createData() {
+ Console.create(
+ {
+ name: 'Nintendo 64',
+ manufacturer: 'Nintendo',
+ released: 'September 29, 1996'
+ },
+ function(err, nintendo64) {
+ if (err) return done(err);
+
+ Game.create({
+ name: 'Legend of Zelda: Ocarina of Time',
+ developer: 'Nintendo',
+ released: new Date('November 21, 1998'),
+ consoles: [nintendo64]
+ },
+ function(err) {
+ if (err) return done(err);
+ example();
+ });
+ }
+ );
+}
+
+/**
+ * Population
+ */
+
+function example() {
+ Game
+ .findOne({name: /^Legend of Zelda/})
+ .exec(function(err, ocinara) {
+ if (err) return done(err);
+
+ console.log('"%s" console _id: %s', ocinara.name, ocinara.consoles[0]);
+
+ // population of existing document
+ ocinara.populate('consoles', function(err) {
+ if (err) return done(err);
+
+ console.log(
+ '"%s" was released for the %s on %s',
+ ocinara.name,
+ ocinara.consoles[0].name,
+ ocinara.released.toLocaleDateString()
+ );
+
+ done();
+ });
+ });
+}
+
+function done(err) {
+ if (err) console.error(err);
+ Console.remove(function() {
+ Game.remove(function() {
+ mongoose.disconnect();
+ });
+ });
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-of-multiple-existing-docs.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-of-multiple-existing-docs.js
new file mode 100644
index 0000000..61b4e85
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-of-multiple-existing-docs.js
@@ -0,0 +1,124 @@
+
+var mongoose = require('../../lib');
+var Schema = mongoose.Schema;
+
+console.log('Running mongoose version %s', mongoose.version);
+
+/**
+ * Console schema
+ */
+
+var consoleSchema = Schema({
+ name: String,
+ manufacturer: String,
+ released: Date
+});
+var Console = mongoose.model('Console', consoleSchema);
+
+/**
+ * Game schema
+ */
+
+var gameSchema = Schema({
+ name: String,
+ developer: String,
+ released: Date,
+ consoles: [{
+ type: Schema.Types.ObjectId,
+ ref: 'Console'
+ }]
+});
+var Game = mongoose.model('Game', gameSchema);
+
+/**
+ * Connect to the console database on localhost with
+ * the default port (27017)
+ */
+
+mongoose.connect('mongodb://localhost/console', function(err) {
+ // if we failed to connect, abort
+ if (err) throw err;
+
+ // we connected ok
+ createData();
+});
+
+/**
+ * Data generation
+ */
+
+function createData() {
+ Console.create(
+ {
+ name: 'Nintendo 64',
+ manufacturer: 'Nintendo',
+ released: 'September 29, 1996'
+ },
+ {
+ name: 'Super Nintendo',
+ manufacturer: 'Nintendo',
+ released: 'August 23, 1991'
+ },
+ function(err, nintendo64, superNintendo) {
+ if (err) return done(err);
+
+ Game.create(
+ {
+ name: 'Legend of Zelda: Ocarina of Time',
+ developer: 'Nintendo',
+ released: new Date('November 21, 1998'),
+ consoles: [nintendo64]
+ },
+ {
+ name: 'Mario Kart',
+ developer: 'Nintendo',
+ released: 'September 1, 1992',
+ consoles: [superNintendo]
+ },
+ function(err) {
+ if (err) return done(err);
+ example();
+ }
+ );
+ }
+ );
+}
+
+/**
+ * Population
+ */
+
+function example() {
+ Game
+ .find({})
+ .exec(function(err, games) {
+ if (err) return done(err);
+
+ console.log('found %d games', games.length);
+
+ var options = {path: 'consoles', select: 'name released -_id'};
+ Game.populate(games, options, function(err, games) {
+ if (err) return done(err);
+
+ games.forEach(function(game) {
+ console.log(
+ '"%s" was released for the %s on %s',
+ game.name,
+ game.consoles[0].name,
+ game.released.toLocaleDateString()
+ );
+ });
+
+ done();
+ });
+ });
+}
+
+function done(err) {
+ if (err) console.error(err);
+ Console.remove(function() {
+ Game.remove(function() {
+ mongoose.disconnect();
+ });
+ });
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-options.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-options.js
new file mode 100644
index 0000000..59cfd1e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-options.js
@@ -0,0 +1,138 @@
+
+var mongoose = require('../../lib');
+var Schema = mongoose.Schema;
+
+console.log('Running mongoose version %s', mongoose.version);
+
+/**
+ * Console schema
+ */
+
+var consoleSchema = Schema({
+ name: String,
+ manufacturer: String,
+ released: Date
+});
+var Console = mongoose.model('Console', consoleSchema);
+
+/**
+ * Game schema
+ */
+
+var gameSchema = Schema({
+ name: String,
+ developer: String,
+ released: Date,
+ consoles: [{
+ type: Schema.Types.ObjectId,
+ ref: 'Console'
+ }]
+});
+var Game = mongoose.model('Game', gameSchema);
+
+/**
+ * Connect to the console database on localhost with
+ * the default port (27017)
+ */
+
+mongoose.connect('mongodb://localhost/console', function(err) {
+ // if we failed to connect, abort
+ if (err) throw err;
+
+ // we connected ok
+ createData();
+});
+
+/**
+ * Data generation
+ */
+
+function createData() {
+ Console.create(
+ {
+ name: 'Nintendo 64',
+ manufacturer: 'Nintendo',
+ released: 'September 29, 1996'
+ },
+ {
+ name: 'Super Nintendo',
+ manufacturer: 'Nintendo',
+ released: 'August 23, 1991'
+ },
+ {
+ name: 'XBOX 360',
+ manufacturer: 'Microsoft',
+ released: 'November 22, 2005'
+ },
+ function(err, nintendo64, superNintendo, xbox360) {
+ if (err) return done(err);
+
+ Game.create(
+ {
+ name: 'Legend of Zelda: Ocarina of Time',
+ developer: 'Nintendo',
+ released: new Date('November 21, 1998'),
+ consoles: [nintendo64]
+ },
+ {
+ name: 'Mario Kart',
+ developer: 'Nintendo',
+ released: 'September 1, 1992',
+ consoles: [superNintendo]
+ },
+ {
+ name: 'Perfect Dark Zero',
+ developer: 'Rare',
+ released: 'November 17, 2005',
+ consoles: [xbox360]
+ },
+ function(err) {
+ if (err) return done(err);
+ example();
+ }
+ );
+ }
+ );
+}
+
+/**
+ * Population
+ */
+
+function example() {
+ Game
+ .find({})
+ .populate({
+ path: 'consoles',
+ match: {manufacturer: 'Nintendo'},
+ select: 'name',
+ options: {comment: 'population'}
+ })
+ .exec(function(err, games) {
+ if (err) return done(err);
+
+ games.forEach(function(game) {
+ console.log(
+ '"%s" was released for the %s on %s',
+ game.name,
+ game.consoles.length ? game.consoles[0].name : '??',
+ game.released.toLocaleDateString()
+ );
+ });
+
+ return done();
+ });
+}
+
+/**
+ * Clean up
+ */
+
+function done(err) {
+ if (err) console.error(err);
+ Console.remove(function() {
+ Game.remove(function() {
+ mongoose.disconnect();
+ });
+ });
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-plain-objects.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-plain-objects.js
new file mode 100644
index 0000000..ba849dc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/population/population-plain-objects.js
@@ -0,0 +1,106 @@
+
+var mongoose = require('../../lib');
+var Schema = mongoose.Schema;
+
+console.log('Running mongoose version %s', mongoose.version);
+
+/**
+ * Console schema
+ */
+
+var consoleSchema = Schema({
+ name: String,
+ manufacturer: String,
+ released: Date
+});
+var Console = mongoose.model('Console', consoleSchema);
+
+/**
+ * Game schema
+ */
+
+var gameSchema = Schema({
+ name: String,
+ developer: String,
+ released: Date,
+ consoles: [{
+ type: Schema.Types.ObjectId,
+ ref: 'Console'
+ }]
+});
+var Game = mongoose.model('Game', gameSchema);
+
+/**
+ * Connect to the console database on localhost with
+ * the default port (27017)
+ */
+
+mongoose.connect('mongodb://localhost/console', function(err) {
+ // if we failed to connect, abort
+ if (err) throw err;
+
+ // we connected ok
+ createData();
+});
+
+/**
+ * Data generation
+ */
+
+function createData() {
+ Console.create(
+ {
+ name: 'Nintendo 64',
+ manufacturer: 'Nintendo',
+ released: 'September 29, 1996'
+ },
+ function(err, nintendo64) {
+ if (err) return done(err);
+
+ Game.create(
+ {
+ name: 'Legend of Zelda: Ocarina of Time',
+ developer: 'Nintendo',
+ released: new Date('November 21, 1998'),
+ consoles: [nintendo64]
+ },
+ function(err) {
+ if (err) return done(err);
+ example();
+ }
+ );
+ }
+ );
+}
+
+/**
+ * Population
+ */
+
+function example() {
+ Game
+ .findOne({name: /^Legend of Zelda/})
+ .populate('consoles')
+ .lean() // just return plain objects, not documents wrapped by mongoose
+ .exec(function(err, ocinara) {
+ if (err) return done(err);
+
+ console.log(
+ '"%s" was released for the %s on %s',
+ ocinara.name,
+ ocinara.consoles[0].name,
+ ocinara.released.toLocaleDateString()
+ );
+
+ done();
+ });
+}
+
+function done(err) {
+ if (err) console.error(err);
+ Console.remove(function() {
+ Game.remove(function() {
+ mongoose.disconnect();
+ });
+ });
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/promises/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/promises/package.json
new file mode 100644
index 0000000..1983250
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/promises/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "promise-example",
+ "private": "true",
+ "version": "0.0.0",
+ "description": "deps for promise example",
+ "main": "promise.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "dependencies": { "async": "*" },
+ "repository": "",
+ "author": "",
+ "license": "BSD"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/promises/person.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/promises/person.js
new file mode 100644
index 0000000..40e2bf1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/promises/person.js
@@ -0,0 +1,15 @@
+
+// import the necessary modules
+var mongoose = require('../../lib');
+var Schema = mongoose.Schema;
+
+// create an export function to encapsulate the model creation
+module.exports = function() {
+ // define schema
+ var PersonSchema = new Schema({
+ name: String,
+ age: Number,
+ birthday: Date
+ });
+ mongoose.model('Person', PersonSchema);
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/promises/promise.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/promises/promise.js
new file mode 100644
index 0000000..3f17206
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/promises/promise.js
@@ -0,0 +1,94 @@
+// import async to make control flow simplier
+var async = require('async');
+
+// import the rest of the normal stuff
+var mongoose = require('../../lib');
+
+require('./person.js')();
+
+var Person = mongoose.model('Person');
+
+// define some dummy data
+var data = [
+ {
+ name: 'bill',
+ age: 25,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 25))
+ },
+ {
+ name: 'mary',
+ age: 30,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 30))
+ },
+ {
+ name: 'bob',
+ age: 21,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 21))
+ },
+ {
+ name: 'lilly',
+ age: 26,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 26))
+ },
+ {
+ name: 'alucard',
+ age: 1000,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 1000))
+ }
+];
+
+
+mongoose.connect('mongodb://localhost/persons', function(err) {
+ if (err) {
+ throw err;
+ }
+
+ // create all of the dummy people
+ async.each(data, function(item, cb) {
+ Person.create(item, cb);
+ }, function(err) {
+ if (err) {
+ // handle error
+ }
+
+ // create a promise (get one from the query builder)
+ var prom = Person.find({age: {$lt: 1000}}).exec();
+
+ // add a callback on the promise. This will be called on both error and
+ // complete
+ prom.addBack(function() {
+ console.log('completed');
+ });
+
+ // add a callback that is only called on complete (success) events
+ prom.addCallback(function() {
+ console.log('Successful Completion!');
+ });
+
+ // add a callback that is only called on err (rejected) events
+ prom.addErrback(function() {
+ console.log('Fail Boat');
+ });
+
+ // you can chain things just like in the promise/A+ spec
+ // note: each then() is returning a new promise, so the above methods
+ // that we defined will all fire after the initial promise is fulfilled
+ prom.then(function(people) {
+ // just getting the stuff for the next query
+ var ids = people.map(function(p) {
+ return p._id;
+ });
+
+ // return the next promise
+ return Person.find({_id: {$nin: ids}}).exec();
+ }).then(function(oldest) {
+ console.log('Oldest person is: %s', oldest);
+ }).then(cleanup);
+ });
+});
+
+function cleanup() {
+ Person.remove(function() {
+ mongoose.disconnect();
+ });
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/querybuilder/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/querybuilder/package.json
new file mode 100644
index 0000000..1a3450a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/querybuilder/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "query-builder-example",
+ "private": "true",
+ "version": "0.0.0",
+ "description": "deps for query builder example",
+ "main": "querybuilder.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "dependencies": { "async": "*" },
+ "repository": "",
+ "author": "",
+ "license": "BSD"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/querybuilder/person.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/querybuilder/person.js
new file mode 100644
index 0000000..40e2bf1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/querybuilder/person.js
@@ -0,0 +1,15 @@
+
+// import the necessary modules
+var mongoose = require('../../lib');
+var Schema = mongoose.Schema;
+
+// create an export function to encapsulate the model creation
+module.exports = function() {
+ // define schema
+ var PersonSchema = new Schema({
+ name: String,
+ age: Number,
+ birthday: Date
+ });
+ mongoose.model('Person', PersonSchema);
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/querybuilder/querybuilder.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/querybuilder/querybuilder.js
new file mode 100644
index 0000000..6f8645b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/querybuilder/querybuilder.js
@@ -0,0 +1,79 @@
+
+// import async to make control flow simplier
+var async = require('async');
+
+// import the rest of the normal stuff
+var mongoose = require('../../lib');
+
+require('./person.js')();
+
+var Person = mongoose.model('Person');
+
+// define some dummy data
+var data = [
+ {
+ name: 'bill',
+ age: 25,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 25))
+ },
+ {
+ name: 'mary',
+ age: 30,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 30))
+ },
+ {
+ name: 'bob',
+ age: 21,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 21))
+ },
+ {
+ name: 'lilly',
+ age: 26,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 26))
+ },
+ {
+ name: 'alucard',
+ age: 1000,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 1000))
+ }
+];
+
+
+mongoose.connect('mongodb://localhost/persons', function(err) {
+ if (err) throw err;
+
+ // create all of the dummy people
+ async.each(data, function(item, cb) {
+ Person.create(item, cb);
+ }, function(err) {
+ if (err) throw err;
+
+ // when querying data, instead of providing a callback, you can instead
+ // leave that off and get a query object returned
+ var query = Person.find({age: {$lt: 1000}});
+
+ // this allows you to continue applying modifiers to it
+ query.sort('birthday');
+ query.select('name');
+
+ // you can chain them together as well
+ // a full list of methods can be found:
+ // http://mongoosejs.com/docs/api.html#query-js
+ query.where('age').gt(21);
+
+ // finally, when ready to execute the query, call the exec() function
+ query.exec(function(err, results) {
+ if (err) throw err;
+
+ console.log(results);
+
+ cleanup();
+ });
+ });
+});
+
+function cleanup() {
+ Person.remove(function() {
+ mongoose.disconnect();
+ });
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/replicasets/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/replicasets/package.json
new file mode 100644
index 0000000..927dfd2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/replicasets/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "replica-set-example",
+ "private": "true",
+ "version": "0.0.0",
+ "description": "deps for replica set example",
+ "main": "querybuilder.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "dependencies": { "async": "*" },
+ "repository": "",
+ "author": "",
+ "license": "BSD"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/replicasets/person.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/replicasets/person.js
new file mode 100644
index 0000000..40e2bf1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/replicasets/person.js
@@ -0,0 +1,15 @@
+
+// import the necessary modules
+var mongoose = require('../../lib');
+var Schema = mongoose.Schema;
+
+// create an export function to encapsulate the model creation
+module.exports = function() {
+ // define schema
+ var PersonSchema = new Schema({
+ name: String,
+ age: Number,
+ birthday: Date
+ });
+ mongoose.model('Person', PersonSchema);
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/replicasets/replica-sets.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/replicasets/replica-sets.js
new file mode 100644
index 0000000..9ebac1b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/replicasets/replica-sets.js
@@ -0,0 +1,71 @@
+
+// import async to make control flow simplier
+var async = require('async');
+
+// import the rest of the normal stuff
+var mongoose = require('../../lib');
+
+require('./person.js')();
+
+var Person = mongoose.model('Person');
+
+// define some dummy data
+var data = [
+ {
+ name: 'bill',
+ age: 25,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 25))
+ },
+ {
+ name: 'mary',
+ age: 30,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 30))
+ },
+ {
+ name: 'bob',
+ age: 21,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 21))
+ },
+ {
+ name: 'lilly',
+ age: 26,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 26))
+ },
+ {
+ name: 'alucard',
+ age: 1000,
+ birthday: new Date().setFullYear((new Date().getFullYear() - 1000))
+ }
+];
+
+
+// to connect to a replica set, pass in the comma delimited uri and optionally
+// any connection options such as the rs_name.
+var opts = {
+ replSet: {rs_name: 'rs0'}
+};
+mongoose.connect('mongodb://localhost:27018/persons,localhost:27019,localhost:27020', opts, function(err) {
+ if (err) throw err;
+
+ // create all of the dummy people
+ async.each(data, function(item, cb) {
+ Person.create(item, cb);
+ }, function(err) {
+ if (err) {
+ // handle error
+ }
+
+ // create and delete some data
+ var prom = Person.find({age: {$lt: 1000}}).exec();
+
+ prom.then(function(people) {
+ console.log('young people: %s', people);
+ }).then(cleanup);
+ });
+});
+
+function cleanup() {
+ Person.remove(function() {
+ mongoose.disconnect();
+ });
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/schema/schema.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/schema/schema.js
new file mode 100644
index 0000000..5bc99ae
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/schema/schema.js
@@ -0,0 +1,119 @@
+/**
+ * Module dependencies.
+ */
+
+var mongoose = require('../../lib'),
+ Schema = mongoose.Schema;
+
+/**
+ * Schema definition
+ */
+
+// recursive embedded-document schema
+
+var Comment = new Schema();
+
+Comment.add({
+ title: {
+ type: String,
+ index: true
+ },
+ date: Date,
+ body: String,
+ comments: [Comment]
+});
+
+var BlogPost = new Schema({
+ title: {
+ type: String,
+ index: true
+ },
+ slug: {
+ type: String,
+ lowercase: true,
+ trim: true
+ },
+ date: Date,
+ buf: Buffer,
+ comments: [Comment],
+ creator: Schema.ObjectId
+});
+
+var Person = new Schema({
+ name: {
+ first: String,
+ last: String
+ },
+ email: {
+ type: String,
+ required: true,
+ index: {
+ unique: true,
+ sparse: true
+ }
+ },
+ alive: Boolean
+});
+
+/**
+ * Accessing a specific schema type by key
+ */
+
+BlogPost.path('date')
+.default(function() {
+ return new Date();
+})
+.set(function(v) {
+ return v === 'now' ? new Date() : v;
+});
+
+/**
+ * Pre hook.
+ */
+
+BlogPost.pre('save', function(next, done) {
+ /* global emailAuthor */
+ emailAuthor(done); // some async function
+ next();
+});
+
+/**
+ * Methods
+ */
+
+BlogPost.methods.findCreator = function(callback) {
+ return this.db.model('Person').findById(this.creator, callback);
+};
+
+BlogPost.statics.findByTitle = function(title, callback) {
+ return this.find({title: title}, callback);
+};
+
+BlogPost.methods.expressiveQuery = function(creator, date, callback) {
+ return this.find('creator', creator).where('date').gte(date).run(callback);
+};
+
+/**
+ * Plugins
+ */
+
+function slugGenerator(options) {
+ options = options || {};
+ var key = options.key || 'title';
+
+ return function slugGenerator(schema) {
+ schema.path(key).set(function(v) {
+ this.slug = v.toLowerCase().replace(/[^a-z0-9]/g, '').replace(/-+/g, '');
+ return v;
+ });
+ };
+}
+
+BlogPost.plugin(slugGenerator());
+
+/**
+ * Define model.
+ */
+
+mongoose.model('BlogPost', BlogPost);
+mongoose.model('Person', Person);
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/schema/storing-schemas-as-json/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/schema/storing-schemas-as-json/index.js
new file mode 100644
index 0000000..284b478
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/schema/storing-schemas-as-json/index.js
@@ -0,0 +1,27 @@
+
+// modules
+var mongoose = require('../../../lib');
+var Schema = mongoose.Schema;
+
+// parse json
+var raw = require('./schema.json');
+
+// create a schema
+var timeSignatureSchema = Schema(raw);
+
+// compile the model
+var TimeSignature = mongoose.model('TimeSignatures', timeSignatureSchema);
+
+// create a TimeSignature document
+var threeFour = new TimeSignature({
+ count: 3,
+ unit: 4,
+ description: '3/4',
+ additive: false,
+ created: new Date,
+ links: ['http://en.wikipedia.org/wiki/Time_signature'],
+ user_id: '518d31a0ef32bbfa853a9814'
+});
+
+// print its description
+console.log(threeFour);
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/schema/storing-schemas-as-json/schema.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/schema/storing-schemas-as-json/schema.json
new file mode 100644
index 0000000..5afc626
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/schema/storing-schemas-as-json/schema.json
@@ -0,0 +1,9 @@
+{
+ "count": "number",
+ "unit": "number",
+ "description": "string",
+ "links": ["string"],
+ "created": "date",
+ "additive": "boolean",
+ "user_id": "ObjectId"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/statics/person.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/statics/person.js
new file mode 100644
index 0000000..a93b8c6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/statics/person.js
@@ -0,0 +1,20 @@
+// import the necessary modules
+var mongoose = require('../../lib');
+var Schema = mongoose.Schema;
+
+// create an export function to encapsulate the model creation
+module.exports = function() {
+ // define schema
+ var PersonSchema = new Schema({
+ name: String,
+ age: Number,
+ birthday: Date
+ });
+
+ // define a static
+ PersonSchema.statics.findPersonByName = function(name, cb) {
+ this.find({name: new RegExp(name, 'i')}, cb);
+ };
+
+ mongoose.model('Person', PersonSchema);
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/statics/statics.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/statics/statics.js
new file mode 100644
index 0000000..610b2aa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/examples/statics/statics.js
@@ -0,0 +1,41 @@
+var mongoose = require('../../lib');
+
+
+// import the schema
+require('./person.js')();
+
+// grab the person model object
+var Person = mongoose.model('Person');
+
+// connect to a server to do a quick write / read example
+
+mongoose.connect('mongodb://localhost/persons', function(err) {
+ if (err) {
+ throw err;
+ }
+
+ Person.create({name: 'bill', age: 25, birthday: new Date().setFullYear((new Date().getFullYear() - 25))},
+ function(err, bill) {
+ if (err) {
+ throw err;
+ }
+ console.log('People added to db: %s', bill.toString());
+
+ // using the static
+ Person.findPersonByName('bill', function(err, result) {
+ if (err) {
+ throw err;
+ }
+
+ console.log(result);
+ cleanup();
+ });
+ }
+ );
+});
+
+function cleanup() {
+ Person.remove(function() {
+ mongoose.disconnect();
+ });
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/index.js
new file mode 100644
index 0000000..e7e6278
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/index.js
@@ -0,0 +1,7 @@
+
+/**
+ * Export lib/mongoose
+ *
+ */
+
+module.exports = require('./lib/');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/ES6Promise.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/ES6Promise.js
new file mode 100644
index 0000000..13371ac
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/ES6Promise.js
@@ -0,0 +1,26 @@
+/**
+ * ES6 Promise wrapper constructor.
+ *
+ * Promises are returned from executed queries. Example:
+ *
+ * var query = Candy.find({ bar: true });
+ * var promise = query.exec();
+ *
+ * DEPRECATED. Mongoose 5.0 will use native promises by default (or bluebird,
+ * if native promises are not present) but still
+ * support plugging in your own ES6-compatible promises library. Mongoose 5.0
+ * will **not** support mpromise.
+ *
+ * @param {Function} fn a function which will be called when the promise is resolved that accepts `fn(err, ...){}` as signature
+ * @api public
+ */
+
+function ES6Promise() {
+ throw new Error('Can\'t use ES6 promise with mpromise style constructor');
+}
+
+ES6Promise.use = function(Promise) {
+ ES6Promise.ES6 = Promise;
+};
+
+module.exports = ES6Promise;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/aggregate.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/aggregate.js
new file mode 100644
index 0000000..bb24e88
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/aggregate.js
@@ -0,0 +1,685 @@
+/*!
+ * Module dependencies
+ */
+
+var util = require('util');
+var utils = require('./utils');
+var PromiseProvider = require('./promise_provider');
+var Query = require('./query');
+var read = Query.prototype.read;
+
+/**
+ * Aggregate constructor used for building aggregation pipelines.
+ *
+ * ####Example:
+ *
+ * new Aggregate();
+ * new Aggregate({ $project: { a: 1, b: 1 } });
+ * new Aggregate({ $project: { a: 1, b: 1 } }, { $skip: 5 });
+ * new Aggregate([{ $project: { a: 1, b: 1 } }, { $skip: 5 }]);
+ *
+ * Returned when calling Model.aggregate().
+ *
+ * ####Example:
+ *
+ * Model
+ * .aggregate({ $match: { age: { $gte: 21 }}})
+ * .unwind('tags')
+ * .exec(callback)
+ *
+ * ####Note:
+ *
+ * - The documents returned are plain javascript objects, not mongoose documents (since any shape of document can be returned).
+ * - Requires MongoDB >= 2.1
+ * - Mongoose does **not** cast pipeline stages. `new Aggregate({ $match: { _id: '00000000000000000000000a' } });` will not work unless `_id` is a string in the database. Use `new Aggregate({ $match: { _id: mongoose.Types.ObjectId('00000000000000000000000a') } });` instead.
+ *
+ * @see MongoDB http://docs.mongodb.org/manual/applications/aggregation/
+ * @see driver http://mongodb.github.com/node-mongodb-native/api-generated/collection.html#aggregate
+ * @param {Object|Array} [ops] aggregation operator(s) or operator array
+ * @api public
+ */
+
+function Aggregate() {
+ this._pipeline = [];
+ this._model = undefined;
+ this.options = undefined;
+
+ if (arguments.length === 1 && util.isArray(arguments[0])) {
+ this.append.apply(this, arguments[0]);
+ } else {
+ this.append.apply(this, arguments);
+ }
+}
+
+/**
+ * Binds this aggregate to a model.
+ *
+ * @param {Model} model the model to which the aggregate is to be bound
+ * @return {Aggregate}
+ * @api public
+ */
+
+Aggregate.prototype.model = function(model) {
+ this._model = model;
+ return this;
+};
+
+/**
+ * Appends new operators to this aggregate pipeline
+ *
+ * ####Examples:
+ *
+ * aggregate.append({ $project: { field: 1 }}, { $limit: 2 });
+ *
+ * // or pass an array
+ * var pipeline = [{ $match: { daw: 'Logic Audio X' }} ];
+ * aggregate.append(pipeline);
+ *
+ * @param {Object} ops operator(s) to append
+ * @return {Aggregate}
+ * @api public
+ */
+
+Aggregate.prototype.append = function() {
+ var args = (arguments.length === 1 && util.isArray(arguments[0]))
+ ? arguments[0]
+ : utils.args(arguments);
+
+ if (!args.every(isOperator)) {
+ throw new Error('Arguments must be aggregate pipeline operators');
+ }
+
+ this._pipeline = this._pipeline.concat(args);
+
+ return this;
+};
+
+/**
+ * Appends a new $project operator to this aggregate pipeline.
+ *
+ * Mongoose query [selection syntax](#query_Query-select) is also supported.
+ *
+ * ####Examples:
+ *
+ * // include a, include b, exclude _id
+ * aggregate.project("a b -_id");
+ *
+ * // or you may use object notation, useful when
+ * // you have keys already prefixed with a "-"
+ * aggregate.project({a: 1, b: 1, _id: 0});
+ *
+ * // reshaping documents
+ * aggregate.project({
+ * newField: '$b.nested'
+ * , plusTen: { $add: ['$val', 10]}
+ * , sub: {
+ * name: '$a'
+ * }
+ * })
+ *
+ * // etc
+ * aggregate.project({ salary_k: { $divide: [ "$salary", 1000 ] } });
+ *
+ * @param {Object|String} arg field specification
+ * @see projection http://docs.mongodb.org/manual/reference/aggregation/project/
+ * @return {Aggregate}
+ * @api public
+ */
+
+Aggregate.prototype.project = function(arg) {
+ var fields = {};
+
+ if (typeof arg === 'object' && !util.isArray(arg)) {
+ Object.keys(arg).forEach(function(field) {
+ fields[field] = arg[field];
+ });
+ } else if (arguments.length === 1 && typeof arg === 'string') {
+ arg.split(/\s+/).forEach(function(field) {
+ if (!field) {
+ return;
+ }
+ var include = field[0] === '-' ? 0 : 1;
+ if (include === 0) {
+ field = field.substring(1);
+ }
+ fields[field] = include;
+ });
+ } else {
+ throw new Error('Invalid project() argument. Must be string or object');
+ }
+
+ return this.append({$project: fields});
+};
+
+/**
+ * Appends a new custom $group operator to this aggregate pipeline.
+ *
+ * ####Examples:
+ *
+ * aggregate.group({ _id: "$department" });
+ *
+ * @see $group http://docs.mongodb.org/manual/reference/aggregation/group/
+ * @method group
+ * @memberOf Aggregate
+ * @param {Object} arg $group operator contents
+ * @return {Aggregate}
+ * @api public
+ */
+
+/**
+ * Appends a new custom $match operator to this aggregate pipeline.
+ *
+ * ####Examples:
+ *
+ * aggregate.match({ department: { $in: [ "sales", "engineering" } } });
+ *
+ * @see $match http://docs.mongodb.org/manual/reference/aggregation/match/
+ * @method match
+ * @memberOf Aggregate
+ * @param {Object} arg $match operator contents
+ * @return {Aggregate}
+ * @api public
+ */
+
+/**
+ * Appends a new $skip operator to this aggregate pipeline.
+ *
+ * ####Examples:
+ *
+ * aggregate.skip(10);
+ *
+ * @see $skip http://docs.mongodb.org/manual/reference/aggregation/skip/
+ * @method skip
+ * @memberOf Aggregate
+ * @param {Number} num number of records to skip before next stage
+ * @return {Aggregate}
+ * @api public
+ */
+
+/**
+ * Appends a new $limit operator to this aggregate pipeline.
+ *
+ * ####Examples:
+ *
+ * aggregate.limit(10);
+ *
+ * @see $limit http://docs.mongodb.org/manual/reference/aggregation/limit/
+ * @method limit
+ * @memberOf Aggregate
+ * @param {Number} num maximum number of records to pass to the next stage
+ * @return {Aggregate}
+ * @api public
+ */
+
+/**
+ * Appends a new $geoNear operator to this aggregate pipeline.
+ *
+ * ####NOTE:
+ *
+ * **MUST** be used as the first operator in the pipeline.
+ *
+ * ####Examples:
+ *
+ * aggregate.near({
+ * near: [40.724, -73.997],
+ * distanceField: "dist.calculated", // required
+ * maxDistance: 0.008,
+ * query: { type: "public" },
+ * includeLocs: "dist.location",
+ * uniqueDocs: true,
+ * num: 5
+ * });
+ *
+ * @see $geoNear http://docs.mongodb.org/manual/reference/aggregation/geoNear/
+ * @method near
+ * @memberOf Aggregate
+ * @param {Object} parameters
+ * @return {Aggregate}
+ * @api public
+ */
+
+Aggregate.prototype.near = function(arg) {
+ var op = {};
+ op.$geoNear = arg;
+ return this.append(op);
+};
+
+/*!
+ * define methods
+ */
+
+'group match skip limit out'.split(' ').forEach(function($operator) {
+ Aggregate.prototype[$operator] = function(arg) {
+ var op = {};
+ op['$' + $operator] = arg;
+ return this.append(op);
+ };
+});
+
+/**
+ * Appends new custom $unwind operator(s) to this aggregate pipeline.
+ *
+ * Note that the `$unwind` operator requires the path name to start with '$'.
+ * Mongoose will prepend '$' if the specified field doesn't start '$'.
+ *
+ * ####Examples:
+ *
+ * aggregate.unwind("tags");
+ * aggregate.unwind("a", "b", "c");
+ *
+ * @see $unwind http://docs.mongodb.org/manual/reference/aggregation/unwind/
+ * @param {String} fields the field(s) to unwind
+ * @return {Aggregate}
+ * @api public
+ */
+
+Aggregate.prototype.unwind = function() {
+ var args = utils.args(arguments);
+
+ var res = [];
+ for (var i = 0; i < args.length; ++i) {
+ var arg = args[i];
+ if (arg && typeof arg === 'object') {
+ res.push({ $unwind: arg });
+ } else if (typeof arg === 'string') {
+ res.push({
+ $unwind: (arg && arg.charAt(0) === '$') ? arg : '$' + arg
+ });
+ } else {
+ throw new Error('Invalid arg "' + arg + '" to unwind(), ' +
+ 'must be string or object');
+ }
+ }
+
+ return this.append.apply(this, res);
+};
+
+/**
+ * Appends new custom $lookup operator(s) to this aggregate pipeline.
+ *
+ * ####Examples:
+ *
+ * aggregate.lookup({ from: 'users', localField: 'userId', foreignField: '_id', as: 'users' });
+ *
+ * @see $lookup https://docs.mongodb.org/manual/reference/operator/aggregation/lookup/#pipe._S_lookup
+ * @param {Object} options to $lookup as described in the above link
+ * @return {Aggregate}
+ * @api public
+ */
+
+Aggregate.prototype.lookup = function(options) {
+ return this.append({$lookup: options});
+};
+
+/**
+ * Appends new custom $sample operator(s) to this aggregate pipeline.
+ *
+ * ####Examples:
+ *
+ * aggregate.sample(3); // Add a pipeline that picks 3 random documents
+ *
+ * @see $sample https://docs.mongodb.org/manual/reference/operator/aggregation/sample/#pipe._S_sample
+ * @param {Number} size number of random documents to pick
+ * @return {Aggregate}
+ * @api public
+ */
+
+Aggregate.prototype.sample = function(size) {
+ return this.append({$sample: {size: size}});
+};
+
+/**
+ * Appends a new $sort operator to this aggregate pipeline.
+ *
+ * If an object is passed, values allowed are `asc`, `desc`, `ascending`, `descending`, `1`, and `-1`.
+ *
+ * If a string is passed, it must be a space delimited list of path names. The sort order of each path is ascending unless the path name is prefixed with `-` which will be treated as descending.
+ *
+ * ####Examples:
+ *
+ * // these are equivalent
+ * aggregate.sort({ field: 'asc', test: -1 });
+ * aggregate.sort('field -test');
+ *
+ * @see $sort http://docs.mongodb.org/manual/reference/aggregation/sort/
+ * @param {Object|String} arg
+ * @return {Aggregate} this
+ * @api public
+ */
+
+Aggregate.prototype.sort = function(arg) {
+ // TODO refactor to reuse the query builder logic
+
+ var sort = {};
+
+ if (arg.constructor.name === 'Object') {
+ var desc = ['desc', 'descending', -1];
+ Object.keys(arg).forEach(function(field) {
+ sort[field] = desc.indexOf(arg[field]) === -1 ? 1 : -1;
+ });
+ } else if (arguments.length === 1 && typeof arg === 'string') {
+ arg.split(/\s+/).forEach(function(field) {
+ if (!field) {
+ return;
+ }
+ var ascend = field[0] === '-' ? -1 : 1;
+ if (ascend === -1) {
+ field = field.substring(1);
+ }
+ sort[field] = ascend;
+ });
+ } else {
+ throw new TypeError('Invalid sort() argument. Must be a string or object.');
+ }
+
+ return this.append({$sort: sort});
+};
+
+/**
+ * Sets the readPreference option for the aggregation query.
+ *
+ * ####Example:
+ *
+ * Model.aggregate(..).read('primaryPreferred').exec(callback)
+ *
+ * @param {String} pref one of the listed preference options or their aliases
+ * @param {Array} [tags] optional tags for this query
+ * @see mongodb http://docs.mongodb.org/manual/applications/replication/#read-preference
+ * @see driver http://mongodb.github.com/node-mongodb-native/driver-articles/anintroductionto1_1and2_2.html#read-preferences
+ */
+
+Aggregate.prototype.read = function(pref, tags) {
+ if (!this.options) {
+ this.options = {};
+ }
+ read.call(this, pref, tags);
+ return this;
+};
+
+/**
+ * Execute the aggregation with explain
+ *
+ * ####Example:
+ *
+ * Model.aggregate(..).explain(callback)
+ *
+ * @param {Function} callback
+ * @return {Promise}
+ */
+
+Aggregate.prototype.explain = function(callback) {
+ var _this = this;
+ var Promise = PromiseProvider.get();
+ return new Promise.ES6(function(resolve, reject) {
+ if (!_this._pipeline.length) {
+ var err = new Error('Aggregate has empty pipeline');
+ if (callback) {
+ callback(err);
+ }
+ reject(err);
+ return;
+ }
+
+ prepareDiscriminatorPipeline(_this);
+
+ _this._model
+ .collection
+ .aggregate(_this._pipeline, _this.options || {})
+ .explain(function(error, result) {
+ if (error) {
+ if (callback) {
+ callback(error);
+ }
+ reject(error);
+ return;
+ }
+
+ if (callback) {
+ callback(null, result);
+ }
+ resolve(result);
+ });
+ });
+};
+
+/**
+ * Sets the allowDiskUse option for the aggregation query (ignored for < 2.6.0)
+ *
+ * ####Example:
+ *
+ * Model.aggregate(..).allowDiskUse(true).exec(callback)
+ *
+ * @param {Boolean} value Should tell server it can use hard drive to store data during aggregation.
+ * @param {Array} [tags] optional tags for this query
+ * @see mongodb http://docs.mongodb.org/manual/reference/command/aggregate/
+ */
+
+Aggregate.prototype.allowDiskUse = function(value) {
+ if (!this.options) {
+ this.options = {};
+ }
+ this.options.allowDiskUse = value;
+ return this;
+};
+
+/**
+ * Sets the cursor option option for the aggregation query (ignored for < 2.6.0).
+ * Note the different syntax below: .exec() returns a cursor object, and no callback
+ * is necessary.
+ *
+ * ####Example:
+ *
+ * var cursor = Model.aggregate(..).cursor({ batchSize: 1000 }).exec();
+ * cursor.each(function(error, doc) {
+ * // use doc
+ * });
+ *
+ * @param {Object} options set the cursor batch size
+ * @see mongodb http://mongodb.github.io/node-mongodb-native/2.0/api/AggregationCursor.html
+ */
+
+Aggregate.prototype.cursor = function(options) {
+ if (!this.options) {
+ this.options = {};
+ }
+ this.options.cursor = options || {};
+ return this;
+};
+
+/**
+ * Adds a [cursor flag](http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#addCursorFlag)
+ *
+ * ####Example:
+ *
+ * var cursor = Model.aggregate(..).cursor({ batchSize: 1000 }).exec();
+ * cursor.each(function(error, doc) {
+ * // use doc
+ * });
+ *
+ * @param {String} flag
+ * @param {Boolean} value
+ * @see mongodb http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#addCursorFlag
+ */
+
+Aggregate.prototype.addCursorFlag = function(flag, value) {
+ if (!this.options) {
+ this.options = {};
+ }
+ this.options[flag] = value;
+ return this;
+};
+
+/**
+ * Executes the aggregate pipeline on the currently bound Model.
+ *
+ * ####Example:
+ *
+ * aggregate.exec(callback);
+ *
+ * // Because a promise is returned, the `callback` is optional.
+ * var promise = aggregate.exec();
+ * promise.then(..);
+ *
+ * @see Promise #promise_Promise
+ * @param {Function} [callback]
+ * @return {Promise}
+ * @api public
+ */
+
+Aggregate.prototype.exec = function(callback) {
+ if (!this._model) {
+ throw new Error('Aggregate not bound to any Model');
+ }
+ var _this = this;
+ var Promise = PromiseProvider.get();
+ var options = utils.clone(this.options);
+
+ if (options && options.cursor) {
+ if (options.cursor.async) {
+ delete options.cursor.async;
+ return new Promise.ES6(function(resolve) {
+ if (!_this._model.collection.buffer) {
+ process.nextTick(function() {
+ var cursor = _this._model.collection.
+ aggregate(_this._pipeline, options || {});
+ resolve(cursor);
+ callback && callback(null, cursor);
+ });
+ return;
+ }
+ _this._model.collection.emitter.once('queue', function() {
+ var cursor = _this._model.collection.
+ aggregate(_this._pipeline, options || {});
+ resolve(cursor);
+ callback && callback(null, cursor);
+ });
+ });
+ }
+ return this._model.collection.
+ aggregate(this._pipeline, this.options || {});
+ }
+
+ return new Promise.ES6(function(resolve, reject) {
+ if (!_this._pipeline.length) {
+ var err = new Error('Aggregate has empty pipeline');
+ if (callback) {
+ callback(err);
+ }
+ reject(err);
+ return;
+ }
+
+ prepareDiscriminatorPipeline(_this);
+
+ _this._model
+ .collection
+ .aggregate(_this._pipeline, _this.options || {}, function(error, result) {
+ if (error) {
+ if (callback) {
+ callback(error);
+ }
+ reject(error);
+ return;
+ }
+
+ if (callback) {
+ callback(null, result);
+ }
+ resolve(result);
+ });
+ });
+};
+
+/**
+ * Provides promise for aggregate.
+ *
+ * ####Example:
+ *
+ * Model.aggregate(..).then(successCallback, errorCallback);
+ *
+ * @see Promise #promise_Promise
+ * @param {Function} [resolve] successCallback
+ * @param {Function} [reject] errorCallback
+ * @return {Promise}
+ */
+Aggregate.prototype.then = function(resolve, reject) {
+ var _this = this;
+ var Promise = PromiseProvider.get();
+ var promise = new Promise.ES6(function(success, error) {
+ _this.exec(function(err, val) {
+ if (err) error(err);
+ else success(val);
+ });
+ });
+ return promise.then(resolve, reject);
+};
+
+/*!
+ * Helpers
+ */
+
+/**
+ * Checks whether an object is likely a pipeline operator
+ *
+ * @param {Object} obj object to check
+ * @return {Boolean}
+ * @api private
+ */
+
+function isOperator(obj) {
+ var k;
+
+ if (typeof obj !== 'object') {
+ return false;
+ }
+
+ k = Object.keys(obj);
+
+ return k.length === 1 && k
+ .some(function(key) {
+ return key[0] === '$';
+ });
+}
+
+/*!
+ * Adds the appropriate `$match` pipeline step to the top of an aggregate's
+ * pipeline, should it's model is a non-root discriminator type. This is
+ * analogous to the `prepareDiscriminatorCriteria` function in `lib/query.js`.
+ *
+ * @param {Aggregate} aggregate Aggregate to prepare
+ */
+
+function prepareDiscriminatorPipeline(aggregate) {
+ var schema = aggregate._model.schema,
+ discriminatorMapping = schema && schema.discriminatorMapping;
+
+ if (discriminatorMapping && !discriminatorMapping.isRoot) {
+ var originalPipeline = aggregate._pipeline,
+ discriminatorKey = discriminatorMapping.key,
+ discriminatorValue = discriminatorMapping.value;
+
+ // If the first pipeline stage is a match and it doesn't specify a `__t`
+ // key, add the discriminator key to it. This allows for potential
+ // aggregation query optimizations not to be disturbed by this feature.
+ if (originalPipeline[0] && originalPipeline[0].$match && !originalPipeline[0].$match[discriminatorKey]) {
+ originalPipeline[0].$match[discriminatorKey] = discriminatorValue;
+ // `originalPipeline` is a ref, so there's no need for
+ // aggregate._pipeline = originalPipeline
+ } else if (originalPipeline[0] && originalPipeline[0].$geoNear) {
+ originalPipeline[0].$geoNear.query =
+ originalPipeline[0].$geoNear.query || {};
+ originalPipeline[0].$geoNear.query[discriminatorKey] = discriminatorValue;
+ } else {
+ var match = {};
+ match[discriminatorKey] = discriminatorValue;
+ aggregate._pipeline = [{$match: match}].concat(originalPipeline);
+ }
+ }
+}
+
+
+/*!
+ * Exports
+ */
+
+module.exports = Aggregate;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/browser.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/browser.js
new file mode 100644
index 0000000..a787539
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/browser.js
@@ -0,0 +1,126 @@
+/* eslint-env browser */
+
+var PromiseProvider = require('./promise_provider');
+
+/**
+ * The Mongoose [Promise](#promise_Promise) constructor.
+ *
+ * @method Promise
+ * @api public
+ */
+
+Object.defineProperty(exports, 'Promise', {
+ get: function() {
+ return PromiseProvider.get();
+ },
+ set: function(lib) {
+ PromiseProvider.set(lib);
+ }
+});
+
+/**
+ * Storage layer for mongoose promises
+ *
+ * @method PromiseProvider
+ * @api public
+ */
+
+exports.PromiseProvider = PromiseProvider;
+
+/**
+ * The [MongooseError](#error_MongooseError) constructor.
+ *
+ * @method Error
+ * @api public
+ */
+
+exports.Error = require('./error');
+
+/**
+ * The Mongoose [Schema](#schema_Schema) constructor
+ *
+ * ####Example:
+ *
+ * var mongoose = require('mongoose');
+ * var Schema = mongoose.Schema;
+ * var CatSchema = new Schema(..);
+ *
+ * @method Schema
+ * @api public
+ */
+
+exports.Schema = require('./schema');
+
+/**
+ * The various Mongoose Types.
+ *
+ * ####Example:
+ *
+ * var mongoose = require('mongoose');
+ * var array = mongoose.Types.Array;
+ *
+ * ####Types:
+ *
+ * - [ObjectId](#types-objectid-js)
+ * - [Buffer](#types-buffer-js)
+ * - [SubDocument](#types-embedded-js)
+ * - [Array](#types-array-js)
+ * - [DocumentArray](#types-documentarray-js)
+ *
+ * Using this exposed access to the `ObjectId` type, we can construct ids on demand.
+ *
+ * var ObjectId = mongoose.Types.ObjectId;
+ * var id1 = new ObjectId;
+ *
+ * @property Types
+ * @api public
+ */
+exports.Types = require('./types');
+
+/**
+ * The Mongoose [VirtualType](#virtualtype_VirtualType) constructor
+ *
+ * @method VirtualType
+ * @api public
+ */
+exports.VirtualType = require('./virtualtype');
+
+/**
+ * The various Mongoose SchemaTypes.
+ *
+ * ####Note:
+ *
+ * _Alias of mongoose.Schema.Types for backwards compatibility._
+ *
+ * @property SchemaTypes
+ * @see Schema.SchemaTypes #schema_Schema.Types
+ * @api public
+ */
+
+exports.SchemaType = require('./schematype.js');
+
+/**
+ * Internal utils
+ *
+ * @property utils
+ * @api private
+ */
+
+exports.utils = require('./utils.js');
+
+/**
+ * The Mongoose browser [Document](#document-js) constructor.
+ *
+ * @method Document
+ * @api public
+ */
+exports.Document = require('./document_provider.js')();
+
+/*!
+ * Module exports.
+ */
+
+if (typeof window !== 'undefined') {
+ window.mongoose = module.exports;
+ window.Buffer = Buffer;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/browserDocument.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/browserDocument.js
new file mode 100644
index 0000000..6c87d19
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/browserDocument.js
@@ -0,0 +1,103 @@
+/*!
+ * Module dependencies.
+ */
+
+var NodeJSDocument = require('./document'),
+ EventEmitter = require('events').EventEmitter,
+ MongooseError = require('./error'),
+ Schema = require('./schema'),
+ ObjectId = require('./types/objectid'),
+ utils = require('./utils'),
+ ValidationError = MongooseError.ValidationError,
+ InternalCache = require('./internal');
+
+/**
+ * Document constructor.
+ *
+ * @param {Object} obj the values to set
+ * @param {Object} [fields] optional object containing the fields which were selected in the query returning this document and any populated paths data
+ * @param {Boolean} [skipId] bool, should we auto create an ObjectId _id
+ * @inherits NodeJS EventEmitter http://nodejs.org/api/events.html#events_class_events_eventemitter
+ * @event `init`: Emitted on a document after it has was retrieved from the db and fully hydrated by Mongoose.
+ * @event `save`: Emitted when the document is successfully saved
+ * @api private
+ */
+
+function Document(obj, schema, fields, skipId, skipInit) {
+ if (!(this instanceof Document)) {
+ return new Document(obj, schema, fields, skipId, skipInit);
+ }
+
+
+ if (utils.isObject(schema) && !schema.instanceOfSchema) {
+ schema = new Schema(schema);
+ }
+
+ // When creating EmbeddedDocument, it already has the schema and he doesn't need the _id
+ schema = this.schema || schema;
+
+ // Generate ObjectId if it is missing, but it requires a scheme
+ if (!this.schema && schema.options._id) {
+ obj = obj || {};
+
+ if (obj._id === undefined) {
+ obj._id = new ObjectId();
+ }
+ }
+
+ if (!schema) {
+ throw new MongooseError.MissingSchemaError();
+ }
+
+ this.$__setSchema(schema);
+
+ this.$__ = new InternalCache;
+ this.$__.emitter = new EventEmitter();
+ this.isNew = true;
+ this.errors = undefined;
+
+ // var schema = this.schema;
+
+ if (typeof fields === 'boolean') {
+ this.$__.strictMode = fields;
+ fields = undefined;
+ } else {
+ this.$__.strictMode = this.schema.options && this.schema.options.strict;
+ this.$__.selected = fields;
+ }
+
+ var required = this.schema.requiredPaths();
+ for (var i = 0; i < required.length; ++i) {
+ this.$__.activePaths.require(required[i]);
+ }
+
+ this.$__.emitter.setMaxListeners(0);
+ this._doc = this.$__buildDoc(obj, fields, skipId);
+
+ if (!skipInit && obj) {
+ this.init(obj);
+ }
+
+ this.$__registerHooksFromSchema();
+
+ // apply methods
+ for (var m in schema.methods) {
+ this[m] = schema.methods[m];
+ }
+ // apply statics
+ for (var s in schema.statics) {
+ this[s] = schema.statics[s];
+ }
+}
+
+/*!
+ * Inherit from the NodeJS document
+ */
+Document.prototype = Object.create(NodeJSDocument.prototype);
+Document.prototype.constructor = Document;
+
+/*!
+ * Module exports.
+ */
+Document.ValidationError = ValidationError;
+module.exports = exports = Document;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/cast.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/cast.js
new file mode 100644
index 0000000..6a07196
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/cast.js
@@ -0,0 +1,248 @@
+/*!
+ * Module dependencies.
+ */
+
+var utils = require('./utils');
+var Types = require('./schema/index');
+
+var ALLOWED_GEOWITHIN_GEOJSON_TYPES = ['Polygon', 'MultiPolygon'];
+
+/**
+ * Handles internal casting for queries
+ *
+ * @param {Schema} schema
+ * @param {Object} obj Object to cast
+ * @api private
+ */
+module.exports = function cast(schema, obj) {
+ var paths = Object.keys(obj),
+ i = paths.length,
+ _keys,
+ any$conditionals,
+ schematype,
+ nested,
+ path,
+ type,
+ val;
+
+ while (i--) {
+ path = paths[i];
+ val = obj[path];
+
+ if (path === '$or' || path === '$nor' || path === '$and') {
+ var k = val.length;
+
+ while (k--) {
+ val[k] = cast(schema, val[k]);
+ }
+ } else if (path === '$where') {
+ type = typeof val;
+
+ if (type !== 'string' && type !== 'function') {
+ throw new Error('Must have a string or function for $where');
+ }
+
+ if (type === 'function') {
+ obj[path] = val.toString();
+ }
+
+ continue;
+ } else if (path === '$elemMatch') {
+ val = cast(schema, val);
+ } else {
+ if (!schema) {
+ // no casting for Mixed types
+ continue;
+ }
+
+ schematype = schema.path(path);
+
+ if (!schematype) {
+ // Handle potential embedded array queries
+ var split = path.split('.'),
+ j = split.length,
+ pathFirstHalf,
+ pathLastHalf,
+ remainingConds;
+
+ // Find the part of the var path that is a path of the Schema
+ while (j--) {
+ pathFirstHalf = split.slice(0, j).join('.');
+ schematype = schema.path(pathFirstHalf);
+ if (schematype) {
+ break;
+ }
+ }
+
+ // If a substring of the input path resolves to an actual real path...
+ if (schematype) {
+ // Apply the casting; similar code for $elemMatch in schema/array.js
+ if (schematype.caster && schematype.caster.schema) {
+ remainingConds = {};
+ pathLastHalf = split.slice(j).join('.');
+ remainingConds[pathLastHalf] = val;
+ obj[path] = cast(schematype.caster.schema, remainingConds)[pathLastHalf];
+ } else {
+ obj[path] = val;
+ }
+ continue;
+ }
+
+ if (utils.isObject(val)) {
+ // handle geo schemas that use object notation
+ // { loc: { long: Number, lat: Number }
+
+ var geo = '';
+ if (val.$near) {
+ geo = '$near';
+ } else if (val.$nearSphere) {
+ geo = '$nearSphere';
+ } else if (val.$within) {
+ geo = '$within';
+ } else if (val.$geoIntersects) {
+ geo = '$geoIntersects';
+ } else if (val.$geoWithin) {
+ geo = '$geoWithin';
+ }
+
+ if (!geo) {
+ continue;
+ }
+
+ var numbertype = new Types.Number('__QueryCasting__');
+ var value = val[geo];
+
+ if (val.$maxDistance != null) {
+ val.$maxDistance = numbertype.castForQuery(val.$maxDistance);
+ }
+ if (val.$minDistance != null) {
+ val.$minDistance = numbertype.castForQuery(val.$minDistance);
+ }
+
+ if (geo === '$within') {
+ var withinType = value.$center
+ || value.$centerSphere
+ || value.$box
+ || value.$polygon;
+
+ if (!withinType) {
+ throw new Error('Bad $within paramater: ' + JSON.stringify(val));
+ }
+
+ value = withinType;
+ } else if (geo === '$near' &&
+ typeof value.type === 'string' && Array.isArray(value.coordinates)) {
+ // geojson; cast the coordinates
+ value = value.coordinates;
+ } else if ((geo === '$near' || geo === '$nearSphere' || geo === '$geoIntersects') &&
+ value.$geometry && typeof value.$geometry.type === 'string' &&
+ Array.isArray(value.$geometry.coordinates)) {
+ if (value.$maxDistance != null) {
+ value.$maxDistance = numbertype.castForQuery(value.$maxDistance);
+ }
+ if (value.$minDistance != null) {
+ value.$minDistance = numbertype.castForQuery(value.$minDistance);
+ }
+ if (utils.isMongooseObject(value.$geometry)) {
+ value.$geometry = value.$geometry.toObject({ transform: false });
+ }
+ value = value.$geometry.coordinates;
+ } else if (geo === '$geoWithin') {
+ if (value.$geometry) {
+ if (utils.isMongooseObject(value.$geometry)) {
+ value.$geometry = value.$geometry.toObject({ virtuals: false });
+ }
+ var geoWithinType = value.$geometry.type;
+ if (ALLOWED_GEOWITHIN_GEOJSON_TYPES.indexOf(geoWithinType) === -1) {
+ throw new Error('Invalid geoJSON type for $geoWithin "' +
+ geoWithinType + '", must be "Polygon" or "MultiPolygon"');
+ }
+ value = value.$geometry.coordinates;
+ } else {
+ value = value.$box || value.$polygon || value.$center ||
+ value.$centerSphere;
+ if (utils.isMongooseObject(value)) {
+ value = value.toObject({ virtuals: false });
+ }
+ }
+ }
+
+ _cast(value, numbertype);
+ }
+ } else if (val === null || val === undefined) {
+ obj[path] = null;
+ continue;
+ } else if (val.constructor.name === 'Object') {
+ any$conditionals = Object.keys(val).some(function(k) {
+ return k.charAt(0) === '$' && k !== '$id' && k !== '$ref';
+ });
+
+ if (!any$conditionals) {
+ obj[path] = schematype.castForQuery(val);
+ } else {
+ var ks = Object.keys(val),
+ $cond;
+
+ k = ks.length;
+
+ while (k--) {
+ $cond = ks[k];
+ nested = val[$cond];
+
+ if ($cond === '$exists') {
+ if (typeof nested !== 'boolean') {
+ throw new Error('$exists parameter must be Boolean');
+ }
+ continue;
+ }
+
+ if ($cond === '$not') {
+ if (nested && schematype && !schematype.caster) {
+ _keys = Object.keys(nested);
+ if (_keys.length && _keys[0].charAt(0) === '$') {
+ for (var key in nested) {
+ nested[key] = schematype.castForQuery(key, nested[key]);
+ }
+ } else {
+ val[$cond] = schematype.castForQuery($cond, nested);
+ }
+ continue;
+ }
+ cast(schematype.caster ? schematype.caster.schema : schema, nested);
+ } else {
+ val[$cond] = schematype.castForQuery($cond, nested);
+ }
+ }
+ }
+ } else {
+ obj[path] = schematype.castForQuery(val);
+ }
+ }
+ }
+
+ return obj;
+};
+
+function _cast(val, numbertype) {
+ if (Array.isArray(val)) {
+ val.forEach(function(item, i) {
+ if (Array.isArray(item) || utils.isObject(item)) {
+ return _cast(item, numbertype);
+ }
+ val[i] = numbertype.castForQuery(item);
+ });
+ } else {
+ var nearKeys = Object.keys(val);
+ var nearLen = nearKeys.length;
+ while (nearLen--) {
+ var nkey = nearKeys[nearLen];
+ var item = val[nkey];
+ if (Array.isArray(item) || utils.isObject(item)) {
+ _cast(item, numbertype);
+ val[nkey] = item;
+ } else {
+ val[nkey] = numbertype.castForQuery(item);
+ }
+ }
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/collection.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/collection.js
new file mode 100644
index 0000000..e550ec2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/collection.js
@@ -0,0 +1,210 @@
+/*!
+ * Module dependencies.
+ */
+
+var EventEmitter = require('events').EventEmitter;
+var STATES = require('./connectionstate');
+
+/**
+ * Abstract Collection constructor
+ *
+ * This is the base class that drivers inherit from and implement.
+ *
+ * @param {String} name name of the collection
+ * @param {Connection} conn A MongooseConnection instance
+ * @param {Object} opts optional collection options
+ * @api public
+ */
+
+function Collection(name, conn, opts) {
+ if (opts === void 0) {
+ opts = {};
+ }
+ if (opts.capped === void 0) {
+ opts.capped = {};
+ }
+
+ opts.bufferCommands = undefined === opts.bufferCommands
+ ? true
+ : opts.bufferCommands;
+
+ if (typeof opts.capped === 'number') {
+ opts.capped = {size: opts.capped};
+ }
+
+ this.opts = opts;
+ this.name = name;
+ this.collectionName = name;
+ this.conn = conn;
+ this.queue = [];
+ this.buffer = this.opts.bufferCommands;
+ this.emitter = new EventEmitter();
+
+ if (STATES.connected === this.conn.readyState) {
+ this.onOpen();
+ }
+}
+
+/**
+ * The collection name
+ *
+ * @api public
+ * @property name
+ */
+
+Collection.prototype.name;
+
+/**
+ * The collection name
+ *
+ * @api public
+ * @property collectionName
+ */
+
+Collection.prototype.collectionName;
+
+/**
+ * The Connection instance
+ *
+ * @api public
+ * @property conn
+ */
+
+Collection.prototype.conn;
+
+/**
+ * Called when the database connects
+ *
+ * @api private
+ */
+
+Collection.prototype.onOpen = function() {
+ this.buffer = false;
+ this.doQueue();
+};
+
+/**
+ * Called when the database disconnects
+ *
+ * @api private
+ */
+
+Collection.prototype.onClose = function() {
+ if (this.opts.bufferCommands) {
+ this.buffer = true;
+ }
+};
+
+/**
+ * Queues a method for later execution when its
+ * database connection opens.
+ *
+ * @param {String} name name of the method to queue
+ * @param {Array} args arguments to pass to the method when executed
+ * @api private
+ */
+
+Collection.prototype.addQueue = function(name, args) {
+ this.queue.push([name, args]);
+ return this;
+};
+
+/**
+ * Executes all queued methods and clears the queue.
+ *
+ * @api private
+ */
+
+Collection.prototype.doQueue = function() {
+ for (var i = 0, l = this.queue.length; i < l; i++) {
+ if (typeof this.queue[i][0] === 'function') {
+ this.queue[i][0].apply(this, this.queue[i][1]);
+ } else {
+ this[this.queue[i][0]].apply(this, this.queue[i][1]);
+ }
+ }
+ this.queue = [];
+ var _this = this;
+ process.nextTick(function() {
+ _this.emitter.emit('queue');
+ });
+ return this;
+};
+
+/**
+ * Abstract method that drivers must implement.
+ */
+
+Collection.prototype.ensureIndex = function() {
+ throw new Error('Collection#ensureIndex unimplemented by driver');
+};
+
+/**
+ * Abstract method that drivers must implement.
+ */
+
+Collection.prototype.findAndModify = function() {
+ throw new Error('Collection#findAndModify unimplemented by driver');
+};
+
+/**
+ * Abstract method that drivers must implement.
+ */
+
+Collection.prototype.findOne = function() {
+ throw new Error('Collection#findOne unimplemented by driver');
+};
+
+/**
+ * Abstract method that drivers must implement.
+ */
+
+Collection.prototype.find = function() {
+ throw new Error('Collection#find unimplemented by driver');
+};
+
+/**
+ * Abstract method that drivers must implement.
+ */
+
+Collection.prototype.insert = function() {
+ throw new Error('Collection#insert unimplemented by driver');
+};
+
+/**
+ * Abstract method that drivers must implement.
+ */
+
+Collection.prototype.save = function() {
+ throw new Error('Collection#save unimplemented by driver');
+};
+
+/**
+ * Abstract method that drivers must implement.
+ */
+
+Collection.prototype.update = function() {
+ throw new Error('Collection#update unimplemented by driver');
+};
+
+/**
+ * Abstract method that drivers must implement.
+ */
+
+Collection.prototype.getIndexes = function() {
+ throw new Error('Collection#getIndexes unimplemented by driver');
+};
+
+/**
+ * Abstract method that drivers must implement.
+ */
+
+Collection.prototype.mapReduce = function() {
+ throw new Error('Collection#mapReduce unimplemented by driver');
+};
+
+/*!
+ * Module exports.
+ */
+
+module.exports = Collection;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/connection.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/connection.js
new file mode 100644
index 0000000..69c470a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/connection.js
@@ -0,0 +1,854 @@
+/*!
+ * Module dependencies.
+ */
+
+var utils = require('./utils');
+var EventEmitter = require('events').EventEmitter;
+var driver = global.MONGOOSE_DRIVER_PATH || './drivers/node-mongodb-native';
+var Schema = require('./schema');
+var Collection = require(driver + '/collection');
+var STATES = require('./connectionstate');
+var MongooseError = require('./error');
+var muri = require('muri');
+var PromiseProvider = require('./promise_provider');
+
+/*!
+ * Protocol prefix regexp.
+ *
+ * @api private
+ */
+
+var rgxProtocol = /^(?:.)+:\/\//;
+
+/*!
+ * A list of authentication mechanisms that don't require a password for authentication.
+ * This is used by the authMechanismDoesNotRequirePassword method.
+ *
+ * @api private
+ */
+var authMechanismsWhichDontRequirePassword = [
+ 'MONGODB-X509'
+];
+
+/**
+ * Connection constructor
+ *
+ * For practical reasons, a Connection equals a Db.
+ *
+ * @param {Mongoose} base a mongoose instance
+ * @inherits NodeJS EventEmitter http://nodejs.org/api/events.html#events_class_events_eventemitter
+ * @event `connecting`: Emitted when `connection.{open,openSet}()` is executed on this connection.
+ * @event `connected`: Emitted when this connection successfully connects to the db. May be emitted _multiple_ times in `reconnected` scenarios.
+ * @event `open`: Emitted after we `connected` and `onOpen` is executed on all of this connections models.
+ * @event `disconnecting`: Emitted when `connection.close()` was executed.
+ * @event `disconnected`: Emitted after getting disconnected from the db.
+ * @event `close`: Emitted after we `disconnected` and `onClose` executed on all of this connections models.
+ * @event `reconnected`: Emitted after we `connected` and subsequently `disconnected`, followed by successfully another successfull connection.
+ * @event `error`: Emitted when an error occurs on this connection.
+ * @event `fullsetup`: Emitted in a replica-set scenario, when primary and at least one seconaries specified in the connection string are connected.
+ * @event `all`: Emitted in a replica-set scenario, when all nodes specified in the connection string are connected.
+ * @api public
+ */
+
+function Connection(base) {
+ this.base = base;
+ this.collections = {};
+ this.models = {};
+ this.config = {autoIndex: true};
+ this.replica = false;
+ this.hosts = null;
+ this.host = null;
+ this.port = null;
+ this.user = null;
+ this.pass = null;
+ this.name = null;
+ this.options = null;
+ this.otherDbs = [];
+ this._readyState = STATES.disconnected;
+ this._closeCalled = false;
+ this._hasOpened = false;
+}
+
+/*!
+ * Inherit from EventEmitter
+ */
+
+Connection.prototype.__proto__ = EventEmitter.prototype;
+
+/**
+ * Connection ready state
+ *
+ * - 0 = disconnected
+ * - 1 = connected
+ * - 2 = connecting
+ * - 3 = disconnecting
+ *
+ * Each state change emits its associated event name.
+ *
+ * ####Example
+ *
+ * conn.on('connected', callback);
+ * conn.on('disconnected', callback);
+ *
+ * @property readyState
+ * @api public
+ */
+
+Object.defineProperty(Connection.prototype, 'readyState', {
+ get: function() {
+ return this._readyState;
+ },
+ set: function(val) {
+ if (!(val in STATES)) {
+ throw new Error('Invalid connection state: ' + val);
+ }
+
+ if (this._readyState !== val) {
+ this._readyState = val;
+ // loop over the otherDbs on this connection and change their state
+ for (var i = 0; i < this.otherDbs.length; i++) {
+ this.otherDbs[i].readyState = val;
+ }
+
+ if (STATES.connected === val) {
+ this._hasOpened = true;
+ }
+
+ this.emit(STATES[val]);
+ }
+ }
+});
+
+/**
+ * A hash of the collections associated with this connection
+ *
+ * @property collections
+ */
+
+Connection.prototype.collections;
+
+/**
+ * The mongodb.Db instance, set when the connection is opened
+ *
+ * @property db
+ */
+
+Connection.prototype.db;
+
+/**
+ * A hash of the global options that are associated with this connection
+ *
+ * @property config
+ */
+
+Connection.prototype.config;
+
+/**
+ * Opens the connection to MongoDB.
+ *
+ * `options` is a hash with the following possible properties:
+ *
+ * config - passed to the connection config instance
+ * db - passed to the connection db instance
+ * server - passed to the connection server instance(s)
+ * replset - passed to the connection ReplSet instance
+ * user - username for authentication
+ * pass - password for authentication
+ * auth - options for authentication (see http://mongodb.github.com/node-mongodb-native/api-generated/db.html#authenticate)
+ *
+ * ####Notes:
+ *
+ * Mongoose forces the db option `forceServerObjectId` false and cannot be overridden.
+ * Mongoose defaults the server `auto_reconnect` options to true which can be overridden.
+ * See the node-mongodb-native driver instance for options that it understands.
+ *
+ * _Options passed take precedence over options included in connection strings._
+ *
+ * @param {String} connection_string mongodb://uri or the host to which you are connecting
+ * @param {String} [database] database name
+ * @param {Number} [port] database port
+ * @param {Object} [options] options
+ * @param {Function} [callback]
+ * @see node-mongodb-native https://github.com/mongodb/node-mongodb-native
+ * @see http://mongodb.github.com/node-mongodb-native/api-generated/db.html#authenticate
+ * @api public
+ */
+
+Connection.prototype.open = function(host, database, port, options, callback) {
+ var parsed;
+ var Promise = PromiseProvider.get();
+
+ if (typeof database === 'string') {
+ switch (arguments.length) {
+ case 2:
+ port = 27017;
+ break;
+ case 3:
+ switch (typeof port) {
+ case 'function':
+ callback = port;
+ port = 27017;
+ break;
+ case 'object':
+ options = port;
+ port = 27017;
+ break;
+ }
+ break;
+ case 4:
+ if (typeof options === 'function') {
+ callback = options;
+ options = {};
+ }
+ }
+ } else {
+ switch (typeof database) {
+ case 'function':
+ callback = database;
+ database = undefined;
+ break;
+ case 'object':
+ options = database;
+ database = undefined;
+ callback = port;
+ break;
+ }
+
+ if (!rgxProtocol.test(host)) {
+ host = 'mongodb://' + host;
+ }
+
+ try {
+ parsed = muri(host);
+ } catch (err) {
+ this.error(err, callback);
+ return this;
+ }
+
+ database = parsed.db;
+ host = parsed.hosts[0].host || parsed.hosts[0].ipc;
+ port = parsed.hosts[0].port || 27017;
+ }
+
+ this.options = this.parseOptions(options, parsed && parsed.options);
+
+ // make sure we can open
+ if (STATES.disconnected !== this.readyState) {
+ var err = new Error('Trying to open unclosed connection.');
+ err.state = this.readyState;
+ this.error(err, callback);
+ return new Promise.ES6(function(resolve, reject) {
+ reject(err);
+ });
+ }
+
+ if (!host) {
+ this.error(new Error('Missing hostname.'), callback);
+ return new Promise.ES6(function(resolve, reject) {
+ reject(err);
+ });
+ }
+
+ if (!database) {
+ this.error(new Error('Missing database name.'), callback);
+ return new Promise.ES6(function(resolve, reject) {
+ reject(err);
+ });
+ }
+
+ // authentication
+ if (this.optionsProvideAuthenticationData(options)) {
+ this.user = options.user;
+ this.pass = options.pass;
+ } else if (parsed && parsed.auth) {
+ this.user = parsed.auth.user;
+ this.pass = parsed.auth.pass;
+
+ // Check hostname for user/pass
+ } else if (/@/.test(host) && /:/.test(host.split('@')[0])) {
+ host = host.split('@');
+ var auth = host.shift().split(':');
+ host = host.pop();
+ this.user = auth[0];
+ this.pass = auth[1];
+ } else {
+ this.user = this.pass = undefined;
+ }
+
+ // global configuration options
+ if (options && options.config) {
+ this.config.autoIndex = options.config.autoIndex !== false;
+ }
+
+ this.name = database;
+ this.host = host;
+ this.port = port;
+
+ var _this = this;
+ var promise = new Promise.ES6(function(resolve, reject) {
+ _this._open(true, function(error) {
+ callback && callback(error);
+ if (error) {
+ reject(error);
+ if (!callback && !promise.$hasHandler) {
+ _this.emit('error', error);
+ }
+ return;
+ }
+ resolve();
+ });
+ });
+ return promise;
+};
+
+/**
+ * Helper for `dropDatabase()`.
+ *
+ * @param {Function} callback
+ * @return {Promise}
+ * @api public
+ */
+
+Connection.prototype.dropDatabase = function(callback) {
+ var Promise = PromiseProvider.get();
+ var _this = this;
+ var promise = new Promise.ES6(function(resolve, reject) {
+ if (_this.readyState !== STATES.connected) {
+ _this.on('open', function() {
+ _this.db.dropDatabase(function(error) {
+ if (error) {
+ reject(error);
+ } else {
+ resolve();
+ }
+ });
+ });
+ } else {
+ _this.db.dropDatabase(function(error) {
+ if (error) {
+ reject(error);
+ } else {
+ resolve();
+ }
+ });
+ }
+ });
+ if (callback) {
+ promise.then(function() { callback(); }, callback);
+ }
+ return promise;
+};
+
+/**
+ * Opens the connection to a replica set.
+ *
+ * ####Example:
+ *
+ * var db = mongoose.createConnection();
+ * db.openSet("mongodb://user:pwd@localhost:27020,localhost:27021,localhost:27012/mydb");
+ *
+ * The database name and/or auth need only be included in one URI.
+ * The `options` is a hash which is passed to the internal driver connection object.
+ *
+ * Valid `options`
+ *
+ * db - passed to the connection db instance
+ * server - passed to the connection server instance(s)
+ * replset - passed to the connection ReplSetServer instance
+ * user - username for authentication
+ * pass - password for authentication
+ * auth - options for authentication (see http://mongodb.github.com/node-mongodb-native/api-generated/db.html#authenticate)
+ * mongos - Boolean - if true, enables High Availability support for mongos
+ *
+ * _Options passed take precedence over options included in connection strings._
+ *
+ * ####Notes:
+ *
+ * _If connecting to multiple mongos servers, set the `mongos` option to true._
+ *
+ * conn.open('mongodb://mongosA:27501,mongosB:27501', { mongos: true }, cb);
+ *
+ * Mongoose forces the db option `forceServerObjectId` false and cannot be overridden.
+ * Mongoose defaults the server `auto_reconnect` options to true which can be overridden.
+ * See the node-mongodb-native driver instance for options that it understands.
+ *
+ * _Options passed take precedence over options included in connection strings._
+ *
+ * @param {String} uris MongoDB connection string
+ * @param {String} [database] database name if not included in `uris`
+ * @param {Object} [options] passed to the internal driver
+ * @param {Function} [callback]
+ * @see node-mongodb-native https://github.com/mongodb/node-mongodb-native
+ * @see http://mongodb.github.com/node-mongodb-native/api-generated/db.html#authenticate
+ * @api public
+ */
+
+Connection.prototype.openSet = function(uris, database, options, callback) {
+ if (!rgxProtocol.test(uris)) {
+ uris = 'mongodb://' + uris;
+ }
+
+ var Promise = PromiseProvider.get();
+
+ switch (arguments.length) {
+ case 3:
+ switch (typeof database) {
+ case 'string':
+ this.name = database;
+ break;
+ case 'object':
+ callback = options;
+ options = database;
+ database = null;
+ break;
+ }
+
+ if (typeof options === 'function') {
+ callback = options;
+ options = {};
+ }
+ break;
+ case 2:
+ switch (typeof database) {
+ case 'string':
+ this.name = database;
+ break;
+ case 'function':
+ callback = database;
+ database = null;
+ break;
+ case 'object':
+ options = database;
+ database = null;
+ break;
+ }
+ }
+
+ if (typeof database === 'string') {
+ this.name = database;
+ }
+
+ var parsed;
+ try {
+ parsed = muri(uris);
+ } catch (err) {
+ this.error(err, callback);
+ return new Promise.ES6(function(resolve, reject) {
+ reject(err);
+ });
+ }
+
+ if (!this.name) {
+ this.name = parsed.db;
+ }
+
+ this.hosts = parsed.hosts;
+ this.options = this.parseOptions(options, parsed && parsed.options);
+ this.replica = true;
+
+ if (!this.name) {
+ var err = new Error('No database name provided for replica set');
+ this.error(err, callback);
+ return new Promise.ES6(function(resolve, reject) {
+ reject(err);
+ });
+ }
+
+ // authentication
+ if (this.optionsProvideAuthenticationData(options)) {
+ this.user = options.user;
+ this.pass = options.pass;
+ } else if (parsed && parsed.auth) {
+ this.user = parsed.auth.user;
+ this.pass = parsed.auth.pass;
+ } else {
+ this.user = this.pass = undefined;
+ }
+
+ // global configuration options
+ if (options && options.config) {
+ this.config.autoIndex = options.config.autoIndex !== false;
+ }
+
+ var _this = this;
+ var emitted = false;
+ var promise = new Promise.ES6(function(resolve, reject) {
+ _this._open(true, function(error) {
+ callback && callback(error);
+ if (error) {
+ reject(error);
+ if (!callback && !promise.$hasHandler && !emitted) {
+ emitted = true;
+ _this.emit('error', error);
+ }
+ return;
+ }
+ resolve();
+ });
+ });
+ return promise;
+};
+
+/**
+ * error
+ *
+ * Graceful error handling, passes error to callback
+ * if available, else emits error on the connection.
+ *
+ * @param {Error} err
+ * @param {Function} callback optional
+ * @api private
+ */
+
+Connection.prototype.error = function(err, callback) {
+ if (callback) {
+ return callback(err);
+ }
+ this.emit('error', err);
+};
+
+/**
+ * Handles opening the connection with the appropriate method based on connection type.
+ *
+ * @param {Function} callback
+ * @api private
+ */
+
+Connection.prototype._open = function(emit, callback) {
+ this.readyState = STATES.connecting;
+ this._closeCalled = false;
+
+ var _this = this;
+
+ var method = this.replica
+ ? 'doOpenSet'
+ : 'doOpen';
+
+ // open connection
+ this[method](function(err) {
+ if (err) {
+ _this.readyState = STATES.disconnected;
+ if (_this._hasOpened) {
+ if (callback) {
+ callback(err);
+ }
+ } else {
+ _this.error(err, emit && callback);
+ }
+ return;
+ }
+
+ _this.onOpen(callback);
+ });
+};
+
+/**
+ * Called when the connection is opened
+ *
+ * @api private
+ */
+
+Connection.prototype.onOpen = function(callback) {
+ var _this = this;
+
+ function open(err, isAuth) {
+ if (err) {
+ _this.readyState = isAuth ? STATES.unauthorized : STATES.disconnected;
+ _this.error(err, callback);
+ return;
+ }
+
+ _this.readyState = STATES.connected;
+
+ // avoid having the collection subscribe to our event emitter
+ // to prevent 0.3 warning
+ for (var i in _this.collections) {
+ if (utils.object.hasOwnProperty(_this.collections, i)) {
+ _this.collections[i].onOpen();
+ }
+ }
+
+ callback && callback();
+ _this.emit('open');
+ }
+
+ // re-authenticate if we're not already connected #3871
+ if (this._readyState !== STATES.connected && this.shouldAuthenticate()) {
+ _this.db.authenticate(_this.user, _this.pass, _this.options.auth, function(err) {
+ open(err, true);
+ });
+ } else {
+ open();
+ }
+};
+
+/**
+ * Closes the connection
+ *
+ * @param {Function} [callback] optional
+ * @return {Connection} self
+ * @api public
+ */
+
+Connection.prototype.close = function(callback) {
+ var _this = this;
+ var Promise = PromiseProvider.get();
+ return new Promise.ES6(function(resolve, reject) {
+ _this._close(function(error) {
+ callback && callback(error);
+ if (error) {
+ reject(error);
+ return;
+ }
+ resolve();
+ });
+ });
+};
+
+/**
+ * Handles closing the connection
+ *
+ * @param {Function} callback
+ * @api private
+ */
+Connection.prototype._close = function(callback) {
+ var _this = this;
+ this._closeCalled = true;
+
+ switch (this.readyState) {
+ case 0: // disconnected
+ callback && callback();
+ break;
+
+ case 1: // connected
+ case 4: // unauthorized
+ this.readyState = STATES.disconnecting;
+ this.doClose(function(err) {
+ if (err) {
+ _this.error(err, callback);
+ } else {
+ _this.onClose();
+ callback && callback();
+ }
+ });
+ break;
+
+ case 2: // connecting
+ this.once('open', function() {
+ _this.close(callback);
+ });
+ break;
+
+ case 3: // disconnecting
+ if (!callback) {
+ break;
+ }
+ this.once('close', function() {
+ callback();
+ });
+ break;
+ }
+
+ return this;
+};
+
+/**
+ * Called when the connection closes
+ *
+ * @api private
+ */
+
+Connection.prototype.onClose = function() {
+ this.readyState = STATES.disconnected;
+
+ // avoid having the collection subscribe to our event emitter
+ // to prevent 0.3 warning
+ for (var i in this.collections) {
+ if (utils.object.hasOwnProperty(this.collections, i)) {
+ this.collections[i].onClose();
+ }
+ }
+
+ this.emit('close');
+};
+
+/**
+ * Retrieves a collection, creating it if not cached.
+ *
+ * Not typically needed by applications. Just talk to your collection through your model.
+ *
+ * @param {String} name of the collection
+ * @param {Object} [options] optional collection options
+ * @return {Collection} collection instance
+ * @api public
+ */
+
+Connection.prototype.collection = function(name, options) {
+ if (!(name in this.collections)) {
+ this.collections[name] = new Collection(name, this, options);
+ }
+ return this.collections[name];
+};
+
+/**
+ * Defines or retrieves a model.
+ *
+ * var mongoose = require('mongoose');
+ * var db = mongoose.createConnection(..);
+ * db.model('Venue', new Schema(..));
+ * var Ticket = db.model('Ticket', new Schema(..));
+ * var Venue = db.model('Venue');
+ *
+ * _When no `collection` argument is passed, Mongoose produces a collection name by passing the model `name` to the [utils.toCollectionName](#utils_exports.toCollectionName) method. This method pluralizes the name. If you don't like this behavior, either pass a collection name or set your schemas collection name option._
+ *
+ * ####Example:
+ *
+ * var schema = new Schema({ name: String }, { collection: 'actor' });
+ *
+ * // or
+ *
+ * schema.set('collection', 'actor');
+ *
+ * // or
+ *
+ * var collectionName = 'actor'
+ * var M = conn.model('Actor', schema, collectionName)
+ *
+ * @param {String} name the model name
+ * @param {Schema} [schema] a schema. necessary when defining a model
+ * @param {String} [collection] name of mongodb collection (optional) if not given it will be induced from model name
+ * @see Mongoose#model #index_Mongoose-model
+ * @return {Model} The compiled model
+ * @api public
+ */
+
+Connection.prototype.model = function(name, schema, collection) {
+ // collection name discovery
+ if (typeof schema === 'string') {
+ collection = schema;
+ schema = false;
+ }
+
+ if (utils.isObject(schema) && !schema.instanceOfSchema) {
+ schema = new Schema(schema);
+ }
+ if (schema && !schema.instanceOfSchema) {
+ throw new Error('The 2nd parameter to `mongoose.model()` should be a ' +
+ 'schema or a POJO');
+ }
+
+ if (this.models[name] && !collection) {
+ // model exists but we are not subclassing with custom collection
+ if (schema && schema.instanceOfSchema && schema !== this.models[name].schema) {
+ throw new MongooseError.OverwriteModelError(name);
+ }
+ return this.models[name];
+ }
+
+ var opts = {cache: false, connection: this};
+ var model;
+
+ if (schema && schema.instanceOfSchema) {
+ // compile a model
+ model = this.base.model(name, schema, collection, opts);
+
+ // only the first model with this name is cached to allow
+ // for one-offs with custom collection names etc.
+ if (!this.models[name]) {
+ this.models[name] = model;
+ }
+
+ model.init();
+ return model;
+ }
+
+ if (this.models[name] && collection) {
+ // subclassing current model with alternate collection
+ model = this.models[name];
+ schema = model.prototype.schema;
+ var sub = model.__subclass(this, schema, collection);
+ // do not cache the sub model
+ return sub;
+ }
+
+ // lookup model in mongoose module
+ model = this.base.models[name];
+
+ if (!model) {
+ throw new MongooseError.MissingSchemaError(name);
+ }
+
+ if (this === model.prototype.db
+ && (!collection || collection === model.collection.name)) {
+ // model already uses this connection.
+
+ // only the first model with this name is cached to allow
+ // for one-offs with custom collection names etc.
+ if (!this.models[name]) {
+ this.models[name] = model;
+ }
+
+ return model;
+ }
+ this.models[name] = model.__subclass(this, schema, collection);
+ return this.models[name];
+};
+
+/**
+ * Returns an array of model names created on this connection.
+ * @api public
+ * @return {Array}
+ */
+
+Connection.prototype.modelNames = function() {
+ return Object.keys(this.models);
+};
+
+/**
+ * @brief Returns if the connection requires authentication after it is opened. Generally if a
+ * username and password are both provided than authentication is needed, but in some cases a
+ * password is not required.
+ * @api private
+ * @return {Boolean} true if the connection should be authenticated after it is opened, otherwise false.
+ */
+Connection.prototype.shouldAuthenticate = function() {
+ return (this.user !== null && this.user !== void 0) &&
+ ((this.pass !== null || this.pass !== void 0) || this.authMechanismDoesNotRequirePassword());
+};
+
+/**
+ * @brief Returns a boolean value that specifies if the current authentication mechanism needs a
+ * password to authenticate according to the auth objects passed into the open/openSet methods.
+ * @api private
+ * @return {Boolean} true if the authentication mechanism specified in the options object requires
+ * a password, otherwise false.
+ */
+Connection.prototype.authMechanismDoesNotRequirePassword = function() {
+ if (this.options && this.options.auth) {
+ return authMechanismsWhichDontRequirePassword.indexOf(this.options.auth.authMechanism) >= 0;
+ }
+ return true;
+};
+
+/**
+ * @brief Returns a boolean value that specifies if the provided objects object provides enough
+ * data to authenticate with. Generally this is true if the username and password are both specified
+ * but in some authentication methods, a password is not required for authentication so only a username
+ * is required.
+ * @param {Object} [options] the options object passed into the open/openSet methods.
+ * @api private
+ * @return {Boolean} true if the provided options object provides enough data to authenticate with,
+ * otherwise false.
+ */
+Connection.prototype.optionsProvideAuthenticationData = function(options) {
+ return (options) &&
+ (options.user) &&
+ ((options.pass) || this.authMechanismDoesNotRequirePassword());
+};
+
+/*!
+ * Module exports.
+ */
+
+Connection.STATES = STATES;
+module.exports = Connection;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/connectionstate.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/connectionstate.js
new file mode 100644
index 0000000..b9d1baf
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/connectionstate.js
@@ -0,0 +1,27 @@
+
+/*!
+ * Connection states
+ */
+
+var STATES = module.exports = exports = Object.create(null);
+
+var disconnected = 'disconnected';
+var connected = 'connected';
+var connecting = 'connecting';
+var disconnecting = 'disconnecting';
+var unauthorized = 'unauthorized';
+var uninitialized = 'uninitialized';
+
+STATES[0] = disconnected;
+STATES[1] = connected;
+STATES[2] = connecting;
+STATES[3] = disconnecting;
+STATES[4] = unauthorized;
+STATES[99] = uninitialized;
+
+STATES[disconnected] = 0;
+STATES[connected] = 1;
+STATES[connecting] = 2;
+STATES[disconnecting] = 3;
+STATES[unauthorized] = 4;
+STATES[uninitialized] = 99;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/document.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/document.js
new file mode 100644
index 0000000..968ad1a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/document.js
@@ -0,0 +1,2615 @@
+/*!
+ * Module dependencies.
+ */
+
+var EventEmitter = require('events').EventEmitter;
+var MongooseError = require('./error');
+var MixedSchema = require('./schema/mixed');
+var Schema = require('./schema');
+var ObjectExpectedError = require('./error/objectExpected');
+var StrictModeError = require('./error/strict');
+var ValidatorError = require('./schematype').ValidatorError;
+var VersionError = require('./error').VersionError;
+var utils = require('./utils');
+var clone = utils.clone;
+var isMongooseObject = utils.isMongooseObject;
+var inspect = require('util').inspect;
+var ValidationError = MongooseError.ValidationError;
+var InternalCache = require('./internal');
+var deepEqual = utils.deepEqual;
+var hooks = require('hooks-fixed');
+var PromiseProvider = require('./promise_provider');
+var DocumentArray;
+var MongooseArray;
+var Embedded;
+var flatten = require('./services/common').flatten;
+var mpath = require('mpath');
+
+/**
+ * Document constructor.
+ *
+ * @param {Object} obj the values to set
+ * @param {Object} [fields] optional object containing the fields which were selected in the query returning this document and any populated paths data
+ * @param {Boolean} [skipId] bool, should we auto create an ObjectId _id
+ * @inherits NodeJS EventEmitter http://nodejs.org/api/events.html#events_class_events_eventemitter
+ * @event `init`: Emitted on a document after it has was retreived from the db and fully hydrated by Mongoose.
+ * @event `save`: Emitted when the document is successfully saved
+ * @api private
+ */
+
+function Document(obj, fields, skipId) {
+ this.$__ = new InternalCache;
+ this.$__.emitter = new EventEmitter();
+ this.isNew = true;
+ this.errors = undefined;
+
+ var schema = this.schema;
+
+ if (typeof fields === 'boolean') {
+ this.$__.strictMode = fields;
+ fields = undefined;
+ } else {
+ this.$__.strictMode = schema.options && schema.options.strict;
+ this.$__.selected = fields;
+ }
+
+ var required = schema.requiredPaths(true);
+ for (var i = 0; i < required.length; ++i) {
+ this.$__.activePaths.require(required[i]);
+ }
+
+ this.$__.emitter.setMaxListeners(0);
+ this._doc = this.$__buildDoc(obj, fields, skipId);
+
+ if (obj) {
+ if (obj instanceof Document) {
+ this.isNew = obj.isNew;
+ }
+ this.set(obj, undefined, true);
+ }
+
+ if (!schema.options.strict && obj) {
+ var _this = this,
+ keys = Object.keys(this._doc);
+
+ keys.forEach(function(key) {
+ if (!(key in schema.tree)) {
+ defineKey(key, null, _this);
+ }
+ });
+ }
+
+ this.$__registerHooksFromSchema();
+}
+
+/*!
+ * Document exposes the NodeJS event emitter API, so you can use
+ * `on`, `once`, etc.
+ */
+utils.each(
+ ['on', 'once', 'emit', 'listeners', 'removeListener', 'setMaxListeners',
+ 'removeAllListeners', 'addListener'],
+ function(emitterFn) {
+ Document.prototype[emitterFn] = function() {
+ return this.$__.emitter[emitterFn].apply(this.$__.emitter, arguments);
+ };
+ });
+
+Document.prototype.constructor = Document;
+
+/**
+ * The documents schema.
+ *
+ * @api public
+ * @property schema
+ */
+
+Document.prototype.schema;
+
+/**
+ * Boolean flag specifying if the document is new.
+ *
+ * @api public
+ * @property isNew
+ */
+
+Document.prototype.isNew;
+
+/**
+ * The string version of this documents _id.
+ *
+ * ####Note:
+ *
+ * This getter exists on all documents by default. The getter can be disabled by setting the `id` [option](/docs/guide.html#id) of its `Schema` to false at construction time.
+ *
+ * new Schema({ name: String }, { id: false });
+ *
+ * @api public
+ * @see Schema options /docs/guide.html#options
+ * @property id
+ */
+
+Document.prototype.id;
+
+/**
+ * Hash containing current validation errors.
+ *
+ * @api public
+ * @property errors
+ */
+
+Document.prototype.errors;
+
+/**
+ * Builds the default doc structure
+ *
+ * @param {Object} obj
+ * @param {Object} [fields]
+ * @param {Boolean} [skipId]
+ * @return {Object}
+ * @api private
+ * @method $__buildDoc
+ * @memberOf Document
+ */
+
+Document.prototype.$__buildDoc = function(obj, fields, skipId) {
+ var doc = {};
+ var exclude = null;
+ var keys;
+ var ki;
+ var _this = this;
+
+ // determine if this doc is a result of a query with
+ // excluded fields
+
+ if (fields && utils.getFunctionName(fields.constructor) === 'Object') {
+ keys = Object.keys(fields);
+ ki = keys.length;
+
+ if (ki === 1 && keys[0] === '_id') {
+ exclude = !!fields[keys[ki]];
+ } else {
+ while (ki--) {
+ if (keys[ki] !== '_id' &&
+ (!fields[keys[ki]] || typeof fields[keys[ki]] !== 'object')) {
+ exclude = !fields[keys[ki]];
+ break;
+ }
+ }
+ }
+ }
+
+ var paths = Object.keys(this.schema.paths);
+ var plen = paths.length;
+ var ii = 0;
+
+ var hasIncludedChildren = {};
+ if (exclude === false && fields) {
+ keys = Object.keys(fields);
+ for (var j = 0; j < keys.length; ++j) {
+ var parts = keys[j].split('.');
+ var c = [];
+ for (var k = 0; k < parts.length; ++k) {
+ c.push(parts[k]);
+ hasIncludedChildren[c.join('.')] = 1;
+ }
+ }
+ }
+
+ for (; ii < plen; ++ii) {
+ var p = paths[ii];
+
+ if (p === '_id') {
+ if (skipId) {
+ continue;
+ }
+ if (obj && '_id' in obj) {
+ continue;
+ }
+ }
+
+ var type = this.schema.paths[p];
+ var path = p.split('.');
+ var len = path.length;
+ var last = len - 1;
+ var curPath = '';
+ var doc_ = doc;
+ var i = 0;
+ var included = false;
+
+ for (; i < len; ++i) {
+ var piece = path[i],
+ def;
+
+ curPath += (!curPath.length ? '' : '.') + piece;
+
+ // support excluding intermediary levels
+ if (exclude === true) {
+ if (curPath in fields) {
+ break;
+ }
+ } else if (exclude === false && fields && !included) {
+ if (curPath in fields) {
+ included = true;
+ } else if (!hasIncludedChildren[curPath]) {
+ break;
+ }
+ }
+
+ if (i === last) {
+ if (fields && exclude !== null) {
+ if (exclude === true) {
+ // apply defaults to all non-excluded fields
+ if (p in fields) {
+ continue;
+ }
+
+ def = type.getDefault(_this, false);
+ if (typeof def !== 'undefined') {
+ doc_[piece] = def;
+ _this.$__.activePaths.default(p);
+ }
+ } else if (included) {
+ // selected field
+ def = type.getDefault(_this, false);
+ if (typeof def !== 'undefined') {
+ doc_[piece] = def;
+ _this.$__.activePaths.default(p);
+ }
+ }
+ } else {
+ def = type.getDefault(_this, false);
+ if (typeof def !== 'undefined') {
+ doc_[piece] = def;
+ _this.$__.activePaths.default(p);
+ }
+ }
+ } else {
+ doc_ = doc_[piece] || (doc_[piece] = {});
+ }
+ }
+ }
+
+ return doc;
+};
+
+/**
+ * Initializes the document without setters or marking anything modified.
+ *
+ * Called internally after a document is returned from mongodb.
+ *
+ * @param {Object} doc document returned by mongo
+ * @param {Function} fn callback
+ * @api public
+ */
+
+Document.prototype.init = function(doc, opts, fn) {
+ // do not prefix this method with $__ since its
+ // used by public hooks
+
+ if (typeof opts === 'function') {
+ fn = opts;
+ opts = null;
+ }
+
+ this.isNew = false;
+
+ // handle docs with populated paths
+ // If doc._id is not null or undefined
+ if (doc._id !== null && doc._id !== undefined &&
+ opts && opts.populated && opts.populated.length) {
+ var id = String(doc._id);
+ for (var i = 0; i < opts.populated.length; ++i) {
+ var item = opts.populated[i];
+ if (item.isVirtual) {
+ this.populated(item.path, utils.getValue(item.path, doc), item);
+ } else {
+ this.populated(item.path, item._docs[id], item);
+ }
+ }
+ }
+
+ init(this, doc, this._doc);
+ this.$__storeShard();
+
+ this.emit('init', this);
+ if (fn) {
+ fn(null);
+ }
+ return this;
+};
+
+/*!
+ * Init helper.
+ *
+ * @param {Object} self document instance
+ * @param {Object} obj raw mongodb doc
+ * @param {Object} doc object we are initializing
+ * @api private
+ */
+
+function init(self, obj, doc, prefix) {
+ prefix = prefix || '';
+
+ var keys = Object.keys(obj);
+ var len = keys.length;
+ var schema;
+ var path;
+ var i;
+ var index = 0;
+
+ if (self.schema.options.retainKeyOrder) {
+ while (index < len) {
+ _init(index++);
+ }
+ } else {
+ while (len--) {
+ _init(len);
+ }
+ }
+
+ function _init(index) {
+ i = keys[index];
+ path = prefix + i;
+ schema = self.schema.path(path);
+
+ if (!schema && utils.isObject(obj[i]) &&
+ (!obj[i].constructor || utils.getFunctionName(obj[i].constructor) === 'Object')) {
+ // assume nested object
+ if (!doc[i]) {
+ doc[i] = {};
+ }
+ init(self, obj[i], doc[i], path + '.');
+ } else {
+ if (obj[i] === null) {
+ doc[i] = null;
+ } else if (obj[i] !== undefined) {
+ if (schema) {
+ try {
+ doc[i] = schema.cast(obj[i], self, true);
+ } catch (e) {
+ self.invalidate(e.path, new ValidatorError({
+ path: e.path,
+ message: e.message,
+ type: 'cast',
+ value: e.value
+ }));
+ }
+ } else {
+ doc[i] = obj[i];
+ }
+ }
+ // mark as hydrated
+ if (!self.isModified(path)) {
+ self.$__.activePaths.init(path);
+ }
+ }
+ }
+}
+
+/**
+ * Stores the current values of the shard keys.
+ *
+ * ####Note:
+ *
+ * _Shard key values do not / are not allowed to change._
+ *
+ * @api private
+ * @method $__storeShard
+ * @memberOf Document
+ */
+
+Document.prototype.$__storeShard = function() {
+ // backwards compat
+ var key = this.schema.options.shardKey || this.schema.options.shardkey;
+ if (!(key && utils.getFunctionName(key.constructor) === 'Object')) {
+ return;
+ }
+
+ var orig = this.$__.shardval = {},
+ paths = Object.keys(key),
+ len = paths.length,
+ val;
+
+ for (var i = 0; i < len; ++i) {
+ val = this.getValue(paths[i]);
+ if (isMongooseObject(val)) {
+ orig[paths[i]] = val.toObject({depopulate: true, _isNested: true});
+ } else if (val !== null && val !== undefined && val.valueOf &&
+ // Explicitly don't take value of dates
+ (!val.constructor || utils.getFunctionName(val.constructor) !== 'Date')) {
+ orig[paths[i]] = val.valueOf();
+ } else {
+ orig[paths[i]] = val;
+ }
+ }
+};
+
+/*!
+ * Set up middleware support
+ */
+
+for (var k in hooks) {
+ if (k === 'pre' || k === 'post') {
+ Document.prototype['$' + k] = Document['$' + k] = hooks[k];
+ } else {
+ Document.prototype[k] = Document[k] = hooks[k];
+ }
+}
+
+/**
+ * Sends an update command with this document `_id` as the query selector.
+ *
+ * ####Example:
+ *
+ * weirdCar.update({$inc: {wheels:1}}, { w: 1 }, callback);
+ *
+ * ####Valid options:
+ *
+ * - same as in [Model.update](#model_Model.update)
+ *
+ * @see Model.update #model_Model.update
+ * @param {Object} doc
+ * @param {Object} options
+ * @param {Function} callback
+ * @return {Query}
+ * @api public
+ */
+
+Document.prototype.update = function update() {
+ var args = utils.args(arguments);
+ args.unshift({_id: this._id});
+ return this.constructor.update.apply(this.constructor, args);
+};
+
+/**
+ * Sets the value of a path, or many paths.
+ *
+ * ####Example:
+ *
+ * // path, value
+ * doc.set(path, value)
+ *
+ * // object
+ * doc.set({
+ * path : value
+ * , path2 : {
+ * path : value
+ * }
+ * })
+ *
+ * // on-the-fly cast to number
+ * doc.set(path, value, Number)
+ *
+ * // on-the-fly cast to string
+ * doc.set(path, value, String)
+ *
+ * // changing strict mode behavior
+ * doc.set(path, value, { strict: false });
+ *
+ * @param {String|Object} path path or object of key/vals to set
+ * @param {Any} val the value to set
+ * @param {Schema|String|Number|Buffer|*} [type] optionally specify a type for "on-the-fly" attributes
+ * @param {Object} [options] optionally specify options that modify the behavior of the set
+ * @api public
+ */
+
+Document.prototype.set = function(path, val, type, options) {
+ if (type && utils.getFunctionName(type.constructor) === 'Object') {
+ options = type;
+ type = undefined;
+ }
+
+ var merge = options && options.merge,
+ adhoc = type && type !== true,
+ constructing = type === true,
+ adhocs;
+
+ var strict = options && 'strict' in options
+ ? options.strict
+ : this.$__.strictMode;
+
+ if (adhoc) {
+ adhocs = this.$__.adhocPaths || (this.$__.adhocPaths = {});
+ adhocs[path] = Schema.interpretAsType(path, type, this.schema.options);
+ }
+
+ if (typeof path !== 'string') {
+ // new Document({ key: val })
+
+ if (path === null || path === void 0) {
+ var _ = path;
+ path = val;
+ val = _;
+ } else {
+ var prefix = val
+ ? val + '.'
+ : '';
+
+ if (path instanceof Document) {
+ if (path.$__isNested) {
+ path = path.toObject();
+ } else {
+ path = path._doc;
+ }
+ }
+
+ var keys = Object.keys(path);
+ var len = keys.length;
+ var i = 0;
+ var pathtype;
+ var key;
+
+ if (len === 0 && !this.schema.options.minimize) {
+ if (val) {
+ this.set(val, {});
+ }
+ return this;
+ }
+
+ if (this.schema.options.retainKeyOrder) {
+ while (i < len) {
+ _handleIndex.call(this, i++);
+ }
+ } else {
+ while (len--) {
+ _handleIndex.call(this, len);
+ }
+ }
+
+ return this;
+ }
+ }
+
+ function _handleIndex(i) {
+ key = keys[i];
+ var pathName = prefix + key;
+ pathtype = this.schema.pathType(pathName);
+
+ if (path[key] !== null
+ && path[key] !== void 0
+ // need to know if plain object - no Buffer, ObjectId, ref, etc
+ && utils.isObject(path[key])
+ && (!path[key].constructor || utils.getFunctionName(path[key].constructor) === 'Object')
+ && pathtype !== 'virtual'
+ && pathtype !== 'real'
+ && !(this.$__path(pathName) instanceof MixedSchema)
+ && !(this.schema.paths[pathName] &&
+ this.schema.paths[pathName].options &&
+ this.schema.paths[pathName].options.ref)) {
+ this.set(path[key], prefix + key, constructing);
+ } else if (strict) {
+ // Don't overwrite defaults with undefined keys (gh-3981)
+ if (constructing && path[key] === void 0 &&
+ this.get(key) !== void 0) {
+ return;
+ }
+
+ if (pathtype === 'real' || pathtype === 'virtual') {
+ // Check for setting single embedded schema to document (gh-3535)
+ if (this.schema.paths[pathName] &&
+ this.schema.paths[pathName].$isSingleNested &&
+ path[key] instanceof Document) {
+ path[key] = path[key].toObject({virtuals: false});
+ }
+ this.set(prefix + key, path[key], constructing);
+ } else if (pathtype === 'nested' && path[key] instanceof Document) {
+ this.set(prefix + key,
+ path[key].toObject({transform: false}), constructing);
+ } else if (strict === 'throw') {
+ if (pathtype === 'nested') {
+ throw new ObjectExpectedError(key, path[key]);
+ } else {
+ throw new StrictModeError(key);
+ }
+ }
+ } else if (path[key] !== void 0) {
+ this.set(prefix + key, path[key], constructing);
+ }
+ }
+
+ // ensure _strict is honored for obj props
+ // docschema = new Schema({ path: { nest: 'string' }})
+ // doc.set('path', obj);
+ var pathType = this.schema.pathType(path);
+ if (pathType === 'nested' && val) {
+ if (utils.isObject(val) &&
+ (!val.constructor || utils.getFunctionName(val.constructor) === 'Object')) {
+ if (!merge) {
+ this.setValue(path, null);
+ cleanModifiedSubpaths(this, path);
+ }
+
+ if (Object.keys(val).length === 0) {
+ this.setValue(path, {});
+ this.markModified(path);
+ cleanModifiedSubpaths(this, path);
+ } else {
+ this.set(val, path, constructing);
+ }
+ return this;
+ }
+ this.invalidate(path, new MongooseError.CastError('Object', val, path));
+ return this;
+ }
+
+ var schema;
+ var parts = path.split('.');
+
+ if (pathType === 'adhocOrUndefined' && strict) {
+ // check for roots that are Mixed types
+ var mixed;
+
+ for (i = 0; i < parts.length; ++i) {
+ var subpath = parts.slice(0, i + 1).join('.');
+ schema = this.schema.path(subpath);
+ if (schema instanceof MixedSchema) {
+ // allow changes to sub paths of mixed types
+ mixed = true;
+ break;
+ }
+
+ // If path is underneath a virtual, bypass everything and just set it.
+ if (i + 1 < parts.length && this.schema.pathType(subpath) === 'virtual') {
+ mpath.set(path, val, this);
+ return this;
+ }
+ }
+
+ if (!mixed) {
+ if (strict === 'throw') {
+ throw new StrictModeError(path);
+ }
+ return this;
+ }
+ } else if (pathType === 'virtual') {
+ schema = this.schema.virtualpath(path);
+ schema.applySetters(val, this);
+ return this;
+ } else {
+ schema = this.$__path(path);
+ }
+
+ var pathToMark;
+
+ // When using the $set operator the path to the field must already exist.
+ // Else mongodb throws: "LEFT_SUBFIELD only supports Object"
+
+ if (parts.length <= 1) {
+ pathToMark = path;
+ } else {
+ for (i = 0; i < parts.length; ++i) {
+ subpath = parts.slice(0, i + 1).join('.');
+ if (this.isDirectModified(subpath) // earlier prefixes that are already
+ // marked as dirty have precedence
+ || this.get(subpath) === null) {
+ pathToMark = subpath;
+ break;
+ }
+ }
+
+ if (!pathToMark) {
+ pathToMark = path;
+ }
+ }
+
+ // if this doc is being constructed we should not trigger getters
+ var priorVal = constructing
+ ? undefined
+ : this.getValue(path);
+
+ if (!schema) {
+ this.$__set(pathToMark, path, constructing, parts, schema, val, priorVal);
+ return this;
+ }
+
+ var shouldSet = true;
+ try {
+ // If the user is trying to set a ref path to a document with
+ // the correct model name, treat it as populated
+ var didPopulate = false;
+ if (schema.options &&
+ schema.options.ref &&
+ val instanceof Document &&
+ schema.options.ref === val.constructor.modelName) {
+ if (this.ownerDocument) {
+ this.ownerDocument().populated(this.$__fullPath(path),
+ val._id, {model: val.constructor});
+ } else {
+ this.populated(path, val._id, {model: val.constructor});
+ }
+ didPopulate = true;
+ }
+
+ var popOpts;
+ if (schema.options &&
+ Array.isArray(schema.options.type) &&
+ schema.options.type.length &&
+ schema.options.type[0].ref &&
+ Array.isArray(val) &&
+ val.length > 0 &&
+ val[0] instanceof Document &&
+ val[0].constructor.modelName &&
+ schema.options.type[0].ref === val[0].constructor.modelName) {
+ if (this.ownerDocument) {
+ popOpts = { model: val[0].constructor };
+ this.ownerDocument().populated(this.$__fullPath(path),
+ val.map(function(v) { return v._id; }), popOpts);
+ } else {
+ popOpts = { model: val[0].constructor };
+ this.populated(path, val.map(function(v) { return v._id; }), popOpts);
+ }
+ didPopulate = true;
+ }
+ val = schema.applySetters(val, this, false, priorVal);
+
+ if (!didPopulate && this.$__.populated) {
+ delete this.$__.populated[path];
+ }
+
+ this.$markValid(path);
+ } catch (e) {
+ this.invalidate(path,
+ new MongooseError.CastError(schema.instance, val, path, e));
+ shouldSet = false;
+ }
+
+ if (shouldSet) {
+ this.$__set(pathToMark, path, constructing, parts, schema, val, priorVal);
+ }
+
+ if (schema.$isSingleNested && this.isDirectModified(path)) {
+ cleanModifiedSubpaths(this, path);
+ }
+
+ return this;
+};
+
+/*!
+ * ignore
+ */
+
+function cleanModifiedSubpaths(doc, path) {
+ var _modifiedPaths = Object.keys(doc.$__.activePaths.states.modify);
+ var _numModifiedPaths = _modifiedPaths.length;
+ for (var j = 0; j < _numModifiedPaths; ++j) {
+ if (_modifiedPaths[j].indexOf(path + '.') === 0) {
+ delete doc.$__.activePaths.states.modify[_modifiedPaths[j]];
+ }
+ }
+}
+
+/**
+ * Determine if we should mark this change as modified.
+ *
+ * @return {Boolean}
+ * @api private
+ * @method $__shouldModify
+ * @memberOf Document
+ */
+
+Document.prototype.$__shouldModify = function(pathToMark, path, constructing, parts, schema, val, priorVal) {
+ if (this.isNew) {
+ return true;
+ }
+
+ if (undefined === val && !this.isSelected(path)) {
+ // when a path is not selected in a query, its initial
+ // value will be undefined.
+ return true;
+ }
+
+ if (undefined === val && path in this.$__.activePaths.states.default) {
+ // we're just unsetting the default value which was never saved
+ return false;
+ }
+
+ // gh-3992: if setting a populated field to a doc, don't mark modified
+ // if they have the same _id
+ if (this.populated(path) &&
+ val instanceof Document &&
+ deepEqual(val._id, priorVal)) {
+ return false;
+ }
+
+ if (!deepEqual(val, priorVal || this.get(path))) {
+ return true;
+ }
+
+ if (!constructing &&
+ val !== null &&
+ val !== undefined &&
+ path in this.$__.activePaths.states.default &&
+ deepEqual(val, schema.getDefault(this, constructing))) {
+ // a path with a default was $unset on the server
+ // and the user is setting it to the same value again
+ return true;
+ }
+ return false;
+};
+
+/**
+ * Handles the actual setting of the value and marking the path modified if appropriate.
+ *
+ * @api private
+ * @method $__set
+ * @memberOf Document
+ */
+
+Document.prototype.$__set = function(pathToMark, path, constructing, parts, schema, val, priorVal) {
+ Embedded = Embedded || require('./types/embedded');
+
+ var shouldModify = this.$__shouldModify(pathToMark, path, constructing, parts,
+ schema, val, priorVal);
+ var _this = this;
+
+ if (shouldModify) {
+ this.markModified(pathToMark, val);
+
+ // handle directly setting arrays (gh-1126)
+ MongooseArray || (MongooseArray = require('./types/array'));
+ if (val && val.isMongooseArray) {
+ val._registerAtomic('$set', val);
+
+ // Small hack for gh-1638: if we're overwriting the entire array, ignore
+ // paths that were modified before the array overwrite
+ this.$__.activePaths.forEach(function(modifiedPath) {
+ if (modifiedPath.indexOf(path + '.') === 0) {
+ _this.$__.activePaths.ignore(modifiedPath);
+ }
+ });
+ }
+ }
+
+ var obj = this._doc;
+ var i = 0;
+ var l = parts.length;
+ var cur = '';
+
+ for (; i < l; i++) {
+ var next = i + 1;
+ var last = next === l;
+ cur += (cur ? '.' + parts[i] : parts[i]);
+
+ if (last) {
+ obj[parts[i]] = val;
+ } else {
+ if (obj[parts[i]] && utils.getFunctionName(obj[parts[i]].constructor) === 'Object') {
+ obj = obj[parts[i]];
+ } else if (obj[parts[i]] && obj[parts[i]] instanceof Embedded) {
+ obj = obj[parts[i]];
+ } else if (obj[parts[i]] && obj[parts[i]].$isSingleNested) {
+ obj = obj[parts[i]];
+ } else if (obj[parts[i]] && Array.isArray(obj[parts[i]])) {
+ obj = obj[parts[i]];
+ } else {
+ this.set(cur, {});
+ obj = obj[parts[i]];
+ }
+ }
+ }
+};
+
+/**
+ * Gets a raw value from a path (no getters)
+ *
+ * @param {String} path
+ * @api private
+ */
+
+Document.prototype.getValue = function(path) {
+ return utils.getValue(path, this._doc);
+};
+
+/**
+ * Sets a raw value for a path (no casting, setters, transformations)
+ *
+ * @param {String} path
+ * @param {Object} value
+ * @api private
+ */
+
+Document.prototype.setValue = function(path, val) {
+ utils.setValue(path, val, this._doc);
+ return this;
+};
+
+/**
+ * Returns the value of a path.
+ *
+ * ####Example
+ *
+ * // path
+ * doc.get('age') // 47
+ *
+ * // dynamic casting to a string
+ * doc.get('age', String) // "47"
+ *
+ * @param {String} path
+ * @param {Schema|String|Number|Buffer|*} [type] optionally specify a type for on-the-fly attributes
+ * @api public
+ */
+
+Document.prototype.get = function(path, type) {
+ var adhoc;
+ if (type) {
+ adhoc = Schema.interpretAsType(path, type, this.schema.options);
+ }
+
+ var schema = this.$__path(path) || this.schema.virtualpath(path),
+ pieces = path.split('.'),
+ obj = this._doc;
+
+ for (var i = 0, l = pieces.length; i < l; i++) {
+ obj = obj === null || obj === void 0
+ ? undefined
+ : obj[pieces[i]];
+ }
+
+ if (adhoc) {
+ obj = adhoc.cast(obj);
+ }
+
+ // Check if this path is populated - don't apply getters if it is,
+ // because otherwise its a nested object. See gh-3357
+ if (schema && !this.populated(path)) {
+ obj = schema.applyGetters(obj, this);
+ }
+
+ return obj;
+};
+
+/**
+ * Returns the schematype for the given `path`.
+ *
+ * @param {String} path
+ * @api private
+ * @method $__path
+ * @memberOf Document
+ */
+
+Document.prototype.$__path = function(path) {
+ var adhocs = this.$__.adhocPaths,
+ adhocType = adhocs && adhocs[path];
+
+ if (adhocType) {
+ return adhocType;
+ }
+ return this.schema.path(path);
+};
+
+/**
+ * Marks the path as having pending changes to write to the db.
+ *
+ * _Very helpful when using [Mixed](./schematypes.html#mixed) types._
+ *
+ * ####Example:
+ *
+ * doc.mixed.type = 'changed';
+ * doc.markModified('mixed.type');
+ * doc.save() // changes to mixed.type are now persisted
+ *
+ * @param {String} path the path to mark modified
+ * @api public
+ */
+
+Document.prototype.markModified = function(path) {
+ this.$__.activePaths.modify(path);
+};
+
+/**
+ * Clears the modified state on the specified path.
+ *
+ * ####Example:
+ *
+ * doc.foo = 'bar';
+ * doc.unmarkModified('foo');
+ * doc.save() // changes to foo will not be persisted
+ *
+ * @param {String} path the path to unmark modified
+ * @api public
+ */
+
+Document.prototype.unmarkModified = function(path) {
+ this.$__.activePaths.init(path);
+};
+
+/**
+ * Don't run validation on this path or persist changes to this path.
+ *
+ * ####Example:
+ *
+ * doc.foo = null;
+ * doc.$ignore('foo');
+ * doc.save() // changes to foo will not be persisted and validators won't be run
+ *
+ * @param {String} path the path to ignore
+ * @api public
+ */
+
+Document.prototype.$ignore = function(path) {
+ this.$__.activePaths.ignore(path);
+};
+
+/**
+ * Returns the list of paths that have been modified.
+ *
+ * @return {Array}
+ * @api public
+ */
+
+Document.prototype.modifiedPaths = function() {
+ var directModifiedPaths = Object.keys(this.$__.activePaths.states.modify);
+ return directModifiedPaths.reduce(function(list, path) {
+ var parts = path.split('.');
+ return list.concat(parts.reduce(function(chains, part, i) {
+ return chains.concat(parts.slice(0, i).concat(part).join('.'));
+ }, []).filter(function(chain) {
+ return (list.indexOf(chain) === -1);
+ }));
+ }, []);
+};
+
+/**
+ * Returns true if this document was modified, else false.
+ *
+ * If `path` is given, checks if a path or any full path containing `path` as part of its path chain has been modified.
+ *
+ * ####Example
+ *
+ * doc.set('documents.0.title', 'changed');
+ * doc.isModified() // true
+ * doc.isModified('documents') // true
+ * doc.isModified('documents.0.title') // true
+ * doc.isModified('documents otherProp') // true
+ * doc.isDirectModified('documents') // false
+ *
+ * @param {String} [path] optional
+ * @return {Boolean}
+ * @api public
+ */
+
+Document.prototype.isModified = function(paths) {
+ if (paths) {
+ if (!Array.isArray(paths)) {
+ paths = paths.split(' ');
+ }
+ var modified = this.modifiedPaths();
+ var directModifiedPaths = Object.keys(this.$__.activePaths.states.modify);
+ var isModifiedChild = paths.some(function(path) {
+ return !!~modified.indexOf(path);
+ });
+ return isModifiedChild || paths.some(function(path) {
+ return directModifiedPaths.some(function(mod) {
+ return mod === path || path.indexOf(mod + '.') === 0;
+ });
+ });
+ }
+ return this.$__.activePaths.some('modify');
+};
+
+/**
+ * Checks if a path is set to its default.
+ *
+ * ####Example
+ *
+ * MyModel = mongoose.model('test', { name: { type: String, default: 'Val '} });
+ * var m = new MyModel();
+ * m.$isDefault('name'); // true
+ *
+ * @param {String} [path]
+ * @return {Boolean}
+ * @method $isDefault
+ * @api public
+ */
+
+Document.prototype.$isDefault = function(path) {
+ return (path in this.$__.activePaths.states.default);
+};
+
+/**
+ * Returns true if `path` was directly set and modified, else false.
+ *
+ * ####Example
+ *
+ * doc.set('documents.0.title', 'changed');
+ * doc.isDirectModified('documents.0.title') // true
+ * doc.isDirectModified('documents') // false
+ *
+ * @param {String} path
+ * @return {Boolean}
+ * @api public
+ */
+
+Document.prototype.isDirectModified = function(path) {
+ return (path in this.$__.activePaths.states.modify);
+};
+
+/**
+ * Checks if `path` was initialized.
+ *
+ * @param {String} path
+ * @return {Boolean}
+ * @api public
+ */
+
+Document.prototype.isInit = function(path) {
+ return (path in this.$__.activePaths.states.init);
+};
+
+/**
+ * Checks if `path` was selected in the source query which initialized this document.
+ *
+ * ####Example
+ *
+ * Thing.findOne().select('name').exec(function (err, doc) {
+ * doc.isSelected('name') // true
+ * doc.isSelected('age') // false
+ * })
+ *
+ * @param {String} path
+ * @return {Boolean}
+ * @api public
+ */
+
+Document.prototype.isSelected = function isSelected(path) {
+ if (this.$__.selected) {
+ if (path === '_id') {
+ return this.$__.selected._id !== 0;
+ }
+
+ var paths = Object.keys(this.$__.selected),
+ i = paths.length,
+ inclusive = false,
+ cur;
+
+ if (i === 1 && paths[0] === '_id') {
+ // only _id was selected.
+ return this.$__.selected._id === 0;
+ }
+
+ while (i--) {
+ cur = paths[i];
+ if (cur === '_id') {
+ continue;
+ }
+ inclusive = !!this.$__.selected[cur];
+ break;
+ }
+
+ if (path in this.$__.selected) {
+ return inclusive;
+ }
+
+ i = paths.length;
+ var pathDot = path + '.';
+
+ while (i--) {
+ cur = paths[i];
+ if (cur === '_id') {
+ continue;
+ }
+
+ if (cur.indexOf(pathDot) === 0) {
+ return inclusive;
+ }
+
+ if (pathDot.indexOf(cur + '.') === 0) {
+ return inclusive;
+ }
+ }
+
+ return !inclusive;
+ }
+
+ return true;
+};
+
+/**
+ * Executes registered validation rules for this document.
+ *
+ * ####Note:
+ *
+ * This method is called `pre` save and if a validation rule is violated, [save](#model_Model-save) is aborted and the error is returned to your `callback`.
+ *
+ * ####Example:
+ *
+ * doc.validate(function (err) {
+ * if (err) handleError(err);
+ * else // validation passed
+ * });
+ *
+ * @param {Object} optional options internal options
+ * @param {Function} callback optional callback called after validation completes, passing an error if one occurred
+ * @return {Promise} Promise
+ * @api public
+ */
+
+Document.prototype.validate = function(options, callback) {
+ if (typeof options === 'function') {
+ callback = options;
+ options = null;
+ }
+
+ this.$__validate(callback);
+};
+
+/*!
+ * ignore
+ */
+
+function _getPathsToValidate(doc) {
+ // only validate required fields when necessary
+ var paths = Object.keys(doc.$__.activePaths.states.require).filter(function(path) {
+ if (!doc.isSelected(path) && !doc.isModified(path)) {
+ return false;
+ }
+ var p = doc.schema.path(path);
+ if (typeof p.originalRequiredValue === 'function') {
+ return p.originalRequiredValue.call(doc);
+ }
+ return true;
+ });
+
+ paths = paths.concat(Object.keys(doc.$__.activePaths.states.init));
+ paths = paths.concat(Object.keys(doc.$__.activePaths.states.modify));
+ paths = paths.concat(Object.keys(doc.$__.activePaths.states.default));
+
+ // gh-661: if a whole array is modified, make sure to run validation on all
+ // the children as well
+ for (var i = 0; i < paths.length; ++i) {
+ var path = paths[i];
+ var val = doc.getValue(path);
+ if (val && val.isMongooseArray && !Buffer.isBuffer(val) && !val.isMongooseDocumentArray) {
+ var numElements = val.length;
+ for (var j = 0; j < numElements; ++j) {
+ paths.push(path + '.' + j);
+ }
+ }
+ }
+
+ var flattenOptions = { skipArrays: true };
+ for (i = 0; i < paths.length; ++i) {
+ var pathToCheck = paths[i];
+ if (doc.schema.nested[pathToCheck]) {
+ var _v = doc.getValue(pathToCheck);
+ if (isMongooseObject(_v)) {
+ _v = _v.toObject({ transform: false });
+ }
+ var flat = flatten(_v, '', flattenOptions);
+ var _subpaths = Object.keys(flat).map(function(p) {
+ return pathToCheck + '.' + p;
+ });
+ paths = paths.concat(_subpaths);
+ }
+ }
+
+ return paths;
+}
+
+/*!
+ * ignore
+ */
+
+Document.prototype.$__validate = function(callback) {
+ var _this = this;
+ var _complete = function() {
+ var err = _this.$__.validationError;
+ _this.$__.validationError = undefined;
+ _this.emit('validate', _this);
+ if (err) {
+ for (var key in err.errors) {
+ // Make sure cast errors persist
+ if (!_this.__parent && err.errors[key] instanceof MongooseError.CastError) {
+ _this.invalidate(key, err.errors[key]);
+ }
+ }
+
+ return err;
+ }
+ };
+
+ // only validate required fields when necessary
+ var paths = _getPathsToValidate(this);
+
+ if (paths.length === 0) {
+ process.nextTick(function() {
+ var err = _complete();
+ if (err) {
+ callback(err);
+ return;
+ }
+ callback();
+ });
+ }
+
+ var validating = {},
+ total = 0;
+
+ var complete = function() {
+ var err = _complete();
+ if (err) {
+ callback(err);
+ return;
+ }
+ callback();
+ };
+
+ var validatePath = function(path) {
+ if (validating[path]) {
+ return;
+ }
+
+ validating[path] = true;
+ total++;
+
+ process.nextTick(function() {
+ var p = _this.schema.path(path);
+ if (!p) {
+ return --total || complete();
+ }
+
+ // If user marked as invalid or there was a cast error, don't validate
+ if (!_this.$isValid(path)) {
+ --total || complete();
+ return;
+ }
+
+ var val = _this.getValue(path);
+ p.doValidate(val, function(err) {
+ if (err) {
+ _this.invalidate(path, err, undefined, true);
+ }
+ --total || complete();
+ }, _this);
+ });
+ };
+
+ paths.forEach(validatePath);
+};
+
+/**
+ * Executes registered validation rules (skipping asynchronous validators) for this document.
+ *
+ * ####Note:
+ *
+ * This method is useful if you need synchronous validation.
+ *
+ * ####Example:
+ *
+ * var err = doc.validateSync();
+ * if ( err ){
+ * handleError( err );
+ * } else {
+ * // validation passed
+ * }
+ *
+ * @param {Array|string} pathsToValidate only validate the given paths
+ * @return {MongooseError|undefined} MongooseError if there are errors during validation, or undefined if there is no error.
+ * @api public
+ */
+
+Document.prototype.validateSync = function(pathsToValidate) {
+ var _this = this;
+
+ if (typeof pathsToValidate === 'string') {
+ pathsToValidate = pathsToValidate.split(' ');
+ }
+
+ // only validate required fields when necessary
+ var paths = _getPathsToValidate(this);
+
+ if (pathsToValidate && pathsToValidate.length) {
+ var tmp = [];
+ for (var i = 0; i < paths.length; ++i) {
+ if (pathsToValidate.indexOf(paths[i]) !== -1) {
+ tmp.push(paths[i]);
+ }
+ }
+ paths = tmp;
+ }
+
+ var validating = {};
+
+ paths.forEach(function(path) {
+ if (validating[path]) {
+ return;
+ }
+
+ validating[path] = true;
+
+ var p = _this.schema.path(path);
+ if (!p) {
+ return;
+ }
+ if (!_this.$isValid(path)) {
+ return;
+ }
+
+ var val = _this.getValue(path);
+ var err = p.doValidateSync(val, _this);
+ if (err) {
+ _this.invalidate(path, err, undefined, true);
+ }
+ });
+
+ var err = _this.$__.validationError;
+ _this.$__.validationError = undefined;
+ _this.emit('validate', _this);
+
+ if (err) {
+ for (var key in err.errors) {
+ // Make sure cast errors persist
+ if (err.errors[key] instanceof MongooseError.CastError) {
+ _this.invalidate(key, err.errors[key]);
+ }
+ }
+ }
+
+ return err;
+};
+
+/**
+ * Marks a path as invalid, causing validation to fail.
+ *
+ * The `errorMsg` argument will become the message of the `ValidationError`.
+ *
+ * The `value` argument (if passed) will be available through the `ValidationError.value` property.
+ *
+ * doc.invalidate('size', 'must be less than 20', 14);
+
+ * doc.validate(function (err) {
+ * console.log(err)
+ * // prints
+ * { message: 'Validation failed',
+ * name: 'ValidationError',
+ * errors:
+ * { size:
+ * { message: 'must be less than 20',
+ * name: 'ValidatorError',
+ * path: 'size',
+ * type: 'user defined',
+ * value: 14 } } }
+ * })
+ *
+ * @param {String} path the field to invalidate
+ * @param {String|Error} errorMsg the error which states the reason `path` was invalid
+ * @param {Object|String|Number|any} value optional invalid value
+ * @param {String} [kind] optional `kind` property for the error
+ * @return {ValidationError} the current ValidationError, with all currently invalidated paths
+ * @api public
+ */
+
+Document.prototype.invalidate = function(path, err, val, kind) {
+ if (!this.$__.validationError) {
+ this.$__.validationError = new ValidationError(this);
+ }
+
+ if (this.$__.validationError.errors[path]) {
+ return;
+ }
+
+ if (!err || typeof err === 'string') {
+ err = new ValidatorError({
+ path: path,
+ message: err,
+ type: kind || 'user defined',
+ value: val
+ });
+ }
+
+ if (this.$__.validationError === err) {
+ return this.$__.validationError;
+ }
+
+ this.$__.validationError.errors[path] = err;
+ return this.$__.validationError;
+};
+
+/**
+ * Marks a path as valid, removing existing validation errors.
+ *
+ * @param {String} path the field to mark as valid
+ * @api private
+ * @method $markValid
+ * @receiver Document
+ */
+
+Document.prototype.$markValid = function(path) {
+ if (!this.$__.validationError || !this.$__.validationError.errors[path]) {
+ return;
+ }
+
+ delete this.$__.validationError.errors[path];
+ if (Object.keys(this.$__.validationError.errors).length === 0) {
+ this.$__.validationError = null;
+ }
+};
+
+/**
+ * Checks if a path is invalid
+ *
+ * @param {String} path the field to check
+ * @method $isValid
+ * @api private
+ * @receiver Document
+ */
+
+Document.prototype.$isValid = function(path) {
+ return !this.$__.validationError || !this.$__.validationError.errors[path];
+};
+
+/**
+ * Resets the internal modified state of this document.
+ *
+ * @api private
+ * @return {Document}
+ * @method $__reset
+ * @memberOf Document
+ */
+
+Document.prototype.$__reset = function reset() {
+ var _this = this;
+ DocumentArray || (DocumentArray = require('./types/documentarray'));
+
+ this.$__.activePaths
+ .map('init', 'modify', function(i) {
+ return _this.getValue(i);
+ })
+ .filter(function(val) {
+ return val && val instanceof Array && val.isMongooseDocumentArray && val.length;
+ })
+ .forEach(function(array) {
+ var i = array.length;
+ while (i--) {
+ var doc = array[i];
+ if (!doc) {
+ continue;
+ }
+ doc.$__reset();
+ }
+ });
+
+ // clear atomics
+ this.$__dirty().forEach(function(dirt) {
+ var type = dirt.value;
+ if (type && type._atomics) {
+ type._atomics = {};
+ }
+ });
+
+ // Clear 'dirty' cache
+ this.$__.activePaths.clear('modify');
+ this.$__.activePaths.clear('default');
+ this.$__.validationError = undefined;
+ this.errors = undefined;
+ _this = this;
+ this.schema.requiredPaths().forEach(function(path) {
+ _this.$__.activePaths.require(path);
+ });
+
+ return this;
+};
+
+/**
+ * Returns this documents dirty paths / vals.
+ *
+ * @api private
+ * @method $__dirty
+ * @memberOf Document
+ */
+
+Document.prototype.$__dirty = function() {
+ var _this = this;
+
+ var all = this.$__.activePaths.map('modify', function(path) {
+ return {
+ path: path,
+ value: _this.getValue(path),
+ schema: _this.$__path(path)
+ };
+ });
+
+ // gh-2558: if we had to set a default and the value is not undefined,
+ // we have to save as well
+ all = all.concat(this.$__.activePaths.map('default', function(path) {
+ if (path === '_id' || !_this.getValue(path)) {
+ return;
+ }
+ return {
+ path: path,
+ value: _this.getValue(path),
+ schema: _this.$__path(path)
+ };
+ }));
+
+ // Sort dirty paths in a flat hierarchy.
+ all.sort(function(a, b) {
+ return (a.path < b.path ? -1 : (a.path > b.path ? 1 : 0));
+ });
+
+ // Ignore "foo.a" if "foo" is dirty already.
+ var minimal = [],
+ lastPath,
+ top;
+
+ all.forEach(function(item) {
+ if (!item) {
+ return;
+ }
+ if (item.path.indexOf(lastPath) !== 0) {
+ lastPath = item.path + '.';
+ minimal.push(item);
+ top = item;
+ } else {
+ // special case for top level MongooseArrays
+ if (top.value && top.value._atomics && top.value.hasAtomics()) {
+ // the `top` array itself and a sub path of `top` are being modified.
+ // the only way to honor all of both modifications is through a $set
+ // of entire array.
+ top.value._atomics = {};
+ top.value._atomics.$set = top.value;
+ }
+ }
+ });
+
+ top = lastPath = null;
+ return minimal;
+};
+
+/*!
+ * Compiles schemas.
+ */
+
+function compile(tree, proto, prefix, options) {
+ var keys = Object.keys(tree),
+ i = keys.length,
+ limb,
+ key;
+
+ while (i--) {
+ key = keys[i];
+ limb = tree[key];
+
+ defineKey(key,
+ ((utils.getFunctionName(limb.constructor) === 'Object'
+ && Object.keys(limb).length)
+ && (!limb[options.typeKey] || (options.typeKey === 'type' && limb.type.type))
+ ? limb
+ : null)
+ , proto
+ , prefix
+ , keys
+ , options);
+ }
+}
+
+// gets descriptors for all properties of `object`
+// makes all properties non-enumerable to match previous behavior to #2211
+function getOwnPropertyDescriptors(object) {
+ var result = {};
+
+ Object.getOwnPropertyNames(object).forEach(function(key) {
+ result[key] = Object.getOwnPropertyDescriptor(object, key);
+ result[key].enumerable = true;
+ });
+
+ return result;
+}
+
+/*!
+ * Defines the accessor named prop on the incoming prototype.
+ */
+
+function defineKey(prop, subprops, prototype, prefix, keys, options) {
+ var path = (prefix ? prefix + '.' : '') + prop;
+ prefix = prefix || '';
+
+ if (subprops) {
+ Object.defineProperty(prototype, prop, {
+ enumerable: true,
+ configurable: true,
+ get: function() {
+ var _this = this;
+ if (!this.$__.getters) {
+ this.$__.getters = {};
+ }
+
+ if (!this.$__.getters[path]) {
+ var nested = Object.create(Object.getPrototypeOf(this), getOwnPropertyDescriptors(this));
+
+ // save scope for nested getters/setters
+ if (!prefix) {
+ nested.$__.scope = this;
+ }
+
+ // shadow inherited getters from sub-objects so
+ // thing.nested.nested.nested... doesn't occur (gh-366)
+ var i = 0,
+ len = keys.length;
+
+ for (; i < len; ++i) {
+ // over-write the parents getter without triggering it
+ Object.defineProperty(nested, keys[i], {
+ enumerable: false, // It doesn't show up.
+ writable: true, // We can set it later.
+ configurable: true, // We can Object.defineProperty again.
+ value: undefined // It shadows its parent.
+ });
+ }
+
+ Object.defineProperty(nested, 'toObject', {
+ enumerable: true,
+ configurable: true,
+ writable: false,
+ value: function() {
+ return _this.get(path);
+ }
+ });
+
+ Object.defineProperty(nested, 'toJSON', {
+ enumerable: true,
+ configurable: true,
+ writable: false,
+ value: function() {
+ return _this.get(path);
+ }
+ });
+
+ Object.defineProperty(nested, '$__isNested', {
+ enumerable: true,
+ configurable: true,
+ writable: false,
+ value: true
+ });
+
+ compile(subprops, nested, path, options);
+ this.$__.getters[path] = nested;
+ }
+
+ return this.$__.getters[path];
+ },
+ set: function(v) {
+ if (v instanceof Document) {
+ v = v.toObject({ transform: false });
+ }
+ return (this.$__.scope || this).set(path, v);
+ }
+ });
+ } else {
+ Object.defineProperty(prototype, prop, {
+ enumerable: true,
+ configurable: true,
+ get: function() {
+ return this.get.call(this.$__.scope || this, path);
+ },
+ set: function(v) {
+ return this.set.call(this.$__.scope || this, path, v);
+ }
+ });
+ }
+}
+
+/**
+ * Assigns/compiles `schema` into this documents prototype.
+ *
+ * @param {Schema} schema
+ * @api private
+ * @method $__setSchema
+ * @memberOf Document
+ */
+
+Document.prototype.$__setSchema = function(schema) {
+ compile(schema.tree, this, undefined, schema.options);
+ this.schema = schema;
+};
+
+
+/**
+ * Get active path that were changed and are arrays
+ *
+ * @api private
+ * @method $__getArrayPathsToValidate
+ * @memberOf Document
+ */
+
+Document.prototype.$__getArrayPathsToValidate = function() {
+ DocumentArray || (DocumentArray = require('./types/documentarray'));
+
+ // validate all document arrays.
+ return this.$__.activePaths
+ .map('init', 'modify', function(i) {
+ return this.getValue(i);
+ }.bind(this))
+ .filter(function(val) {
+ return val && val instanceof Array && val.isMongooseDocumentArray && val.length;
+ }).reduce(function(seed, array) {
+ return seed.concat(array);
+ }, [])
+ .filter(function(doc) {
+ return doc;
+ });
+};
+
+
+/**
+ * Get all subdocs (by bfs)
+ *
+ * @api private
+ * @method $__getAllSubdocs
+ * @memberOf Document
+ */
+
+Document.prototype.$__getAllSubdocs = function() {
+ DocumentArray || (DocumentArray = require('./types/documentarray'));
+ Embedded = Embedded || require('./types/embedded');
+
+ function docReducer(seed, path) {
+ var val = this[path];
+
+ if (val instanceof Embedded) {
+ seed.push(val);
+ }
+ if (val && val.$isSingleNested) {
+ seed = Object.keys(val._doc).reduce(docReducer.bind(val._doc), seed);
+ seed.push(val);
+ }
+ if (val && val.isMongooseDocumentArray) {
+ val.forEach(function _docReduce(doc) {
+ if (!doc || !doc._doc) {
+ return;
+ }
+ if (doc instanceof Embedded) {
+ seed.push(doc);
+ }
+ seed = Object.keys(doc._doc).reduce(docReducer.bind(doc._doc), seed);
+ });
+ } else if (val instanceof Document && val.$__isNested) {
+ val = val.toObject();
+ if (val) {
+ seed = Object.keys(val).reduce(docReducer.bind(val), seed);
+ }
+ }
+ return seed;
+ }
+
+ var subDocs = Object.keys(this._doc).reduce(docReducer.bind(this), []);
+
+ return subDocs;
+};
+
+/**
+ * Executes methods queued from the Schema definition
+ *
+ * @api private
+ * @method $__registerHooksFromSchema
+ * @memberOf Document
+ */
+
+Document.prototype.$__registerHooksFromSchema = function() {
+ Embedded = Embedded || require('./types/embedded');
+ var Promise = PromiseProvider.get();
+
+ var _this = this;
+ var q = _this.schema && _this.schema.callQueue;
+ if (!q.length) {
+ return _this;
+ }
+
+ // we are only interested in 'pre' hooks, and group by point-cut
+ var toWrap = q.reduce(function(seed, pair) {
+ if (pair[0] !== 'pre' && pair[0] !== 'post' && pair[0] !== 'on') {
+ _this[pair[0]].apply(_this, pair[1]);
+ return seed;
+ }
+ var args = [].slice.call(pair[1]);
+ var pointCut = pair[0] === 'on' ? 'post' : args[0];
+ if (!(pointCut in seed)) {
+ seed[pointCut] = {post: [], pre: []};
+ }
+ if (pair[0] === 'post') {
+ seed[pointCut].post.push(args);
+ } else if (pair[0] === 'on') {
+ seed[pointCut].push(args);
+ } else {
+ seed[pointCut].pre.push(args);
+ }
+ return seed;
+ }, {post: []});
+
+ // 'post' hooks are simpler
+ toWrap.post.forEach(function(args) {
+ _this.on.apply(_this, args);
+ });
+ delete toWrap.post;
+
+ // 'init' should be synchronous on subdocuments
+ if (toWrap.init && _this instanceof Embedded) {
+ if (toWrap.init.pre) {
+ toWrap.init.pre.forEach(function(args) {
+ _this.$pre.apply(_this, args);
+ });
+ }
+ if (toWrap.init.post) {
+ toWrap.init.post.forEach(function(args) {
+ _this.$post.apply(_this, args);
+ });
+ }
+ delete toWrap.init;
+ } else if (toWrap.set) {
+ // Set hooks also need to be sync re: gh-3479
+ if (toWrap.set.pre) {
+ toWrap.set.pre.forEach(function(args) {
+ _this.$pre.apply(_this, args);
+ });
+ }
+ if (toWrap.set.post) {
+ toWrap.set.post.forEach(function(args) {
+ _this.$post.apply(_this, args);
+ });
+ }
+ delete toWrap.set;
+ }
+
+ Object.keys(toWrap).forEach(function(pointCut) {
+ // this is so we can wrap everything into a promise;
+ var newName = ('$__original_' + pointCut);
+ if (!_this[pointCut]) {
+ return;
+ }
+ _this[newName] = _this[pointCut];
+ _this[pointCut] = function wrappedPointCut() {
+ var args = [].slice.call(arguments);
+ var lastArg = args.pop();
+ var fn;
+ var originalError = new Error();
+ var $results;
+ if (lastArg && typeof lastArg !== 'function') {
+ args.push(lastArg);
+ } else {
+ fn = lastArg;
+ }
+
+ var promise = new Promise.ES6(function(resolve, reject) {
+ args.push(function(error) {
+ if (error) {
+ // gh-2633: since VersionError is very generic, take the
+ // stack trace of the original save() function call rather
+ // than the async trace
+ if (error instanceof VersionError) {
+ error.stack = originalError.stack;
+ }
+ _this.$__handleReject(error);
+ reject(error);
+ return;
+ }
+
+ // There may be multiple results and promise libs other than
+ // mpromise don't support passing multiple values to `resolve()`
+ $results = Array.prototype.slice.call(arguments, 1);
+ resolve.apply(promise, $results);
+ });
+
+ _this[newName].apply(_this, args);
+ });
+ if (fn) {
+ if (_this.constructor.$wrapCallback) {
+ fn = _this.constructor.$wrapCallback(fn);
+ }
+ return promise.then(
+ function() {
+ process.nextTick(function() {
+ fn.apply(null, [null].concat($results));
+ });
+ },
+ function(error) {
+ process.nextTick(function() {
+ fn(error);
+ });
+ });
+ }
+ return promise;
+ };
+
+ toWrap[pointCut].pre.forEach(function(args) {
+ args[0] = newName;
+ _this.$pre.apply(_this, args);
+ });
+ toWrap[pointCut].post.forEach(function(args) {
+ args[0] = newName;
+ _this.$post.apply(_this, args);
+ });
+ });
+ return _this;
+};
+
+Document.prototype.$__handleReject = function handleReject(err) {
+ // emit on the Model if listening
+ if (this.listeners('error').length) {
+ this.emit('error', err);
+ } else if (this.constructor.listeners && this.constructor.listeners('error').length) {
+ this.constructor.emit('error', err);
+ } else if (this.listeners && this.listeners('error').length) {
+ this.emit('error', err);
+ }
+};
+
+/**
+ * Internal helper for toObject() and toJSON() that doesn't manipulate options
+ *
+ * @api private
+ * @method $toObject
+ * @memberOf Document
+ */
+
+Document.prototype.$toObject = function(options, json) {
+ var defaultOptions = {
+ transform: true,
+ json: json,
+ retainKeyOrder: this.schema.options.retainKeyOrder
+ };
+
+ // _isNested will only be true if this is not the top level document, we
+ // should never depopulate
+ if (options && options.depopulate && options._isNested && this.$__.wasPopulated) {
+ // populated paths that we set to a document
+ return clone(this._id, options);
+ }
+
+ // When internally saving this document we always pass options,
+ // bypassing the custom schema options.
+ if (!(options && utils.getFunctionName(options.constructor) === 'Object') ||
+ (options && options._useSchemaOptions)) {
+ if (json) {
+ options = this.schema.options.toJSON ?
+ clone(this.schema.options.toJSON) :
+ {};
+ options.json = true;
+ options._useSchemaOptions = true;
+ } else {
+ options = this.schema.options.toObject ?
+ clone(this.schema.options.toObject) :
+ {};
+ options.json = false;
+ options._useSchemaOptions = true;
+ }
+ }
+
+ for (var key in defaultOptions) {
+ if (options[key] === undefined) {
+ options[key] = defaultOptions[key];
+ }
+ }
+
+ ('minimize' in options) || (options.minimize = this.schema.options.minimize);
+
+ // remember the root transform function
+ // to save it from being overwritten by sub-transform functions
+ var originalTransform = options.transform;
+
+ options._isNested = true;
+
+ var ret = clone(this._doc, options) || {};
+
+ if (options.getters) {
+ applyGetters(this, ret, 'paths', options);
+ // applyGetters for paths will add nested empty objects;
+ // if minimize is set, we need to remove them.
+ if (options.minimize) {
+ ret = minimize(ret) || {};
+ }
+ }
+
+ if (options.virtuals || options.getters && options.virtuals !== false) {
+ applyGetters(this, ret, 'virtuals', options);
+ }
+
+ if (options.versionKey === false && this.schema.options.versionKey) {
+ delete ret[this.schema.options.versionKey];
+ }
+
+ var transform = options.transform;
+
+ // In the case where a subdocument has its own transform function, we need to
+ // check and see if the parent has a transform (options.transform) and if the
+ // child schema has a transform (this.schema.options.toObject) In this case,
+ // we need to adjust options.transform to be the child schema's transform and
+ // not the parent schema's
+ if (transform === true ||
+ (this.schema.options.toObject && transform)) {
+ var opts = options.json ? this.schema.options.toJSON : this.schema.options.toObject;
+
+ if (opts) {
+ transform = (typeof options.transform === 'function' ? options.transform : opts.transform);
+ }
+ } else {
+ options.transform = originalTransform;
+ }
+
+ if (typeof transform === 'function') {
+ var xformed = transform(this, ret, options);
+ if (typeof xformed !== 'undefined') {
+ ret = xformed;
+ }
+ }
+
+ return ret;
+};
+
+/**
+ * Converts this document into a plain javascript object, ready for storage in MongoDB.
+ *
+ * Buffers are converted to instances of [mongodb.Binary](http://mongodb.github.com/node-mongodb-native/api-bson-generated/binary.html) for proper storage.
+ *
+ * ####Options:
+ *
+ * - `getters` apply all getters (path and virtual getters)
+ * - `virtuals` apply virtual getters (can override `getters` option)
+ * - `minimize` remove empty objects (defaults to true)
+ * - `transform` a transform function to apply to the resulting document before returning
+ * - `depopulate` depopulate any populated paths, replacing them with their original refs (defaults to false)
+ * - `versionKey` whether to include the version key (defaults to true)
+ * - `retainKeyOrder` keep the order of object keys. If this is set to true, `Object.keys(new Doc({ a: 1, b: 2}).toObject())` will always produce `['a', 'b']` (defaults to false)
+ *
+ * ####Getters/Virtuals
+ *
+ * Example of only applying path getters
+ *
+ * doc.toObject({ getters: true, virtuals: false })
+ *
+ * Example of only applying virtual getters
+ *
+ * doc.toObject({ virtuals: true })
+ *
+ * Example of applying both path and virtual getters
+ *
+ * doc.toObject({ getters: true })
+ *
+ * To apply these options to every document of your schema by default, set your [schemas](#schema_Schema) `toObject` option to the same argument.
+ *
+ * schema.set('toObject', { virtuals: true })
+ *
+ * ####Transform
+ *
+ * We may need to perform a transformation of the resulting object based on some criteria, say to remove some sensitive information or return a custom object. In this case we set the optional `transform` function.
+ *
+ * Transform functions receive three arguments
+ *
+ * function (doc, ret, options) {}
+ *
+ * - `doc` The mongoose document which is being converted
+ * - `ret` The plain object representation which has been converted
+ * - `options` The options in use (either schema options or the options passed inline)
+ *
+ * ####Example
+ *
+ * // specify the transform schema option
+ * if (!schema.options.toObject) schema.options.toObject = {};
+ * schema.options.toObject.transform = function (doc, ret, options) {
+ * // remove the _id of every document before returning the result
+ * delete ret._id;
+ * return ret;
+ * }
+ *
+ * // without the transformation in the schema
+ * doc.toObject(); // { _id: 'anId', name: 'Wreck-it Ralph' }
+ *
+ * // with the transformation
+ * doc.toObject(); // { name: 'Wreck-it Ralph' }
+ *
+ * With transformations we can do a lot more than remove properties. We can even return completely new customized objects:
+ *
+ * if (!schema.options.toObject) schema.options.toObject = {};
+ * schema.options.toObject.transform = function (doc, ret, options) {
+ * return { movie: ret.name }
+ * }
+ *
+ * // without the transformation in the schema
+ * doc.toObject(); // { _id: 'anId', name: 'Wreck-it Ralph' }
+ *
+ * // with the transformation
+ * doc.toObject(); // { movie: 'Wreck-it Ralph' }
+ *
+ * _Note: if a transform function returns `undefined`, the return value will be ignored._
+ *
+ * Transformations may also be applied inline, overridding any transform set in the options:
+ *
+ * function xform (doc, ret, options) {
+ * return { inline: ret.name, custom: true }
+ * }
+ *
+ * // pass the transform as an inline option
+ * doc.toObject({ transform: xform }); // { inline: 'Wreck-it Ralph', custom: true }
+ *
+ * _Note: if you call `toObject` and pass any options, the transform declared in your schema options will __not__ be applied. To force its application pass `transform: true`_
+ *
+ * if (!schema.options.toObject) schema.options.toObject = {};
+ * schema.options.toObject.hide = '_id';
+ * schema.options.toObject.transform = function (doc, ret, options) {
+ * if (options.hide) {
+ * options.hide.split(' ').forEach(function (prop) {
+ * delete ret[prop];
+ * });
+ * }
+ * return ret;
+ * }
+ *
+ * var doc = new Doc({ _id: 'anId', secret: 47, name: 'Wreck-it Ralph' });
+ * doc.toObject(); // { secret: 47, name: 'Wreck-it Ralph' }
+ * doc.toObject({ hide: 'secret _id' }); // { _id: 'anId', secret: 47, name: 'Wreck-it Ralph' }
+ * doc.toObject({ hide: 'secret _id', transform: true }); // { name: 'Wreck-it Ralph' }
+ *
+ * Transforms are applied _only to the document and are not applied to sub-documents_.
+ *
+ * Transforms, like all of these options, are also available for `toJSON`.
+ *
+ * See [schema options](/docs/guide.html#toObject) for some more details.
+ *
+ * _During save, no custom options are applied to the document before being sent to the database._
+ *
+ * @param {Object} [options]
+ * @return {Object} js object
+ * @see mongodb.Binary http://mongodb.github.com/node-mongodb-native/api-bson-generated/binary.html
+ * @api public
+ */
+
+Document.prototype.toObject = function(options) {
+ return this.$toObject(options);
+};
+
+/*!
+ * Minimizes an object, removing undefined values and empty objects
+ *
+ * @param {Object} object to minimize
+ * @return {Object}
+ */
+
+function minimize(obj) {
+ var keys = Object.keys(obj),
+ i = keys.length,
+ hasKeys,
+ key,
+ val;
+
+ while (i--) {
+ key = keys[i];
+ val = obj[key];
+
+ if (utils.isObject(val)) {
+ obj[key] = minimize(val);
+ }
+
+ if (undefined === obj[key]) {
+ delete obj[key];
+ continue;
+ }
+
+ hasKeys = true;
+ }
+
+ return hasKeys
+ ? obj
+ : undefined;
+}
+
+/*!
+ * Applies virtuals properties to `json`.
+ *
+ * @param {Document} self
+ * @param {Object} json
+ * @param {String} type either `virtuals` or `paths`
+ * @return {Object} `json`
+ */
+
+function applyGetters(self, json, type, options) {
+ var schema = self.schema,
+ paths = Object.keys(schema[type]),
+ i = paths.length,
+ path;
+
+ while (i--) {
+ path = paths[i];
+
+ var parts = path.split('.'),
+ plen = parts.length,
+ last = plen - 1,
+ branch = json,
+ part;
+
+ for (var ii = 0; ii < plen; ++ii) {
+ part = parts[ii];
+ if (ii === last) {
+ branch[part] = clone(self.get(path), options);
+ } else {
+ branch = branch[part] || (branch[part] = {});
+ }
+ }
+ }
+
+ return json;
+}
+
+/**
+ * The return value of this method is used in calls to JSON.stringify(doc).
+ *
+ * This method accepts the same options as [Document#toObject](#document_Document-toObject). To apply the options to every document of your schema by default, set your [schemas](#schema_Schema) `toJSON` option to the same argument.
+ *
+ * schema.set('toJSON', { virtuals: true })
+ *
+ * See [schema options](/docs/guide.html#toJSON) for details.
+ *
+ * @param {Object} options
+ * @return {Object}
+ * @see Document#toObject #document_Document-toObject
+ * @api public
+ */
+
+Document.prototype.toJSON = function(options) {
+ return this.$toObject(options, true);
+};
+
+/**
+ * Helper for console.log
+ *
+ * @api public
+ */
+
+Document.prototype.inspect = function(options) {
+ var isPOJO = options &&
+ utils.getFunctionName(options.constructor) === 'Object';
+ var opts;
+ if (isPOJO) {
+ opts = options;
+ opts.minimize = false;
+ opts.retainKeyOrder = true;
+ }
+ return this.toObject(opts);
+};
+
+/**
+ * Helper for console.log
+ *
+ * @api public
+ * @method toString
+ */
+
+Document.prototype.toString = function() {
+ return inspect(this.inspect());
+};
+
+/**
+ * Returns true if the Document stores the same data as doc.
+ *
+ * Documents are considered equal when they have matching `_id`s, unless neither
+ * document has an `_id`, in which case this function falls back to using
+ * `deepEqual()`.
+ *
+ * @param {Document} doc a document to compare
+ * @return {Boolean}
+ * @api public
+ */
+
+Document.prototype.equals = function(doc) {
+ if (!doc) {
+ return false;
+ }
+
+ var tid = this.get('_id');
+ var docid = doc.get ? doc.get('_id') : doc;
+ if (!tid && !docid) {
+ return deepEqual(this, doc);
+ }
+ return tid && tid.equals
+ ? tid.equals(docid)
+ : tid === docid;
+};
+
+/**
+ * Populates document references, executing the `callback` when complete.
+ * If you want to use promises instead, use this function with
+ * [`execPopulate()`](#document_Document-execPopulate)
+ *
+ * ####Example:
+ *
+ * doc
+ * .populate('company')
+ * .populate({
+ * path: 'notes',
+ * match: /airline/,
+ * select: 'text',
+ * model: 'modelName'
+ * options: opts
+ * }, function (err, user) {
+ * assert(doc._id === user._id) // the document itself is passed
+ * })
+ *
+ * // summary
+ * doc.populate(path) // not executed
+ * doc.populate(options); // not executed
+ * doc.populate(path, callback) // executed
+ * doc.populate(options, callback); // executed
+ * doc.populate(callback); // executed
+ * doc.populate(options).execPopulate() // executed, returns promise
+ *
+ *
+ * ####NOTE:
+ *
+ * Population does not occur unless a `callback` is passed *or* you explicitly
+ * call `execPopulate()`.
+ * Passing the same path a second time will overwrite the previous path options.
+ * See [Model.populate()](#model_Model.populate) for explaination of options.
+ *
+ * @see Model.populate #model_Model.populate
+ * @see Document.execPopulate #document_Document-execPopulate
+ * @param {String|Object} [path] The path to populate or an options object
+ * @param {Function} [callback] When passed, population is invoked
+ * @api public
+ * @return {Document} this
+ */
+
+Document.prototype.populate = function populate() {
+ if (arguments.length === 0) {
+ return this;
+ }
+
+ var pop = this.$__.populate || (this.$__.populate = {});
+ var args = utils.args(arguments);
+ var fn;
+
+ if (typeof args[args.length - 1] === 'function') {
+ fn = args.pop();
+ }
+
+ // allow `doc.populate(callback)`
+ if (args.length) {
+ // use hash to remove duplicate paths
+ var res = utils.populate.apply(null, args);
+ for (var i = 0; i < res.length; ++i) {
+ pop[res[i].path] = res[i];
+ }
+ }
+
+ if (fn) {
+ var paths = utils.object.vals(pop);
+ this.$__.populate = undefined;
+ paths.__noPromise = true;
+ this.constructor.populate(this, paths, fn);
+ }
+
+ return this;
+};
+
+/**
+ * Explicitly executes population and returns a promise. Useful for ES2015
+ * integration.
+ *
+ * ####Example:
+ *
+ * var promise = doc.
+ * populate('company').
+ * populate({
+ * path: 'notes',
+ * match: /airline/,
+ * select: 'text',
+ * model: 'modelName'
+ * options: opts
+ * }).
+ * execPopulate();
+ *
+ * // summary
+ * doc.execPopulate().then(resolve, reject);
+ *
+ *
+ * @see Document.populate #document_Document-populate
+ * @api public
+ * @return {Promise} promise that resolves to the document when population is done
+ */
+
+Document.prototype.execPopulate = function() {
+ var Promise = PromiseProvider.get();
+ var _this = this;
+ return new Promise.ES6(function(resolve, reject) {
+ _this.populate(function(error, res) {
+ if (error) {
+ reject(error);
+ } else {
+ resolve(res);
+ }
+ });
+ });
+};
+
+/**
+ * Gets _id(s) used during population of the given `path`.
+ *
+ * ####Example:
+ *
+ * Model.findOne().populate('author').exec(function (err, doc) {
+ * console.log(doc.author.name) // Dr.Seuss
+ * console.log(doc.populated('author')) // '5144cf8050f071d979c118a7'
+ * })
+ *
+ * If the path was not populated, undefined is returned.
+ *
+ * @param {String} path
+ * @return {Array|ObjectId|Number|Buffer|String|undefined}
+ * @api public
+ */
+
+Document.prototype.populated = function(path, val, options) {
+ // val and options are internal
+
+ if (val === null || val === void 0) {
+ if (!this.$__.populated) {
+ return undefined;
+ }
+ var v = this.$__.populated[path];
+ if (v) {
+ return v.value;
+ }
+ return undefined;
+ }
+
+ // internal
+
+ if (val === true) {
+ if (!this.$__.populated) {
+ return undefined;
+ }
+ return this.$__.populated[path];
+ }
+
+ this.$__.populated || (this.$__.populated = {});
+ this.$__.populated[path] = {value: val, options: options};
+ return val;
+};
+
+/**
+ * Takes a populated field and returns it to its unpopulated state.
+ *
+ * ####Example:
+ *
+ * Model.findOne().populate('author').exec(function (err, doc) {
+ * console.log(doc.author.name); // Dr.Seuss
+ * console.log(doc.depopulate('author'));
+ * console.log(doc.author); // '5144cf8050f071d979c118a7'
+ * })
+ *
+ * If the path was not populated, this is a no-op.
+ *
+ * @param {String} path
+ * @see Document.populate #document_Document-populate
+ * @api public
+ */
+
+Document.prototype.depopulate = function(path) {
+ var populatedIds = this.populated(path);
+ if (!populatedIds) {
+ return;
+ }
+ delete this.$__.populated[path];
+ this.set(path, populatedIds);
+};
+
+
+/**
+ * Returns the full path to this document.
+ *
+ * @param {String} [path]
+ * @return {String}
+ * @api private
+ * @method $__fullPath
+ * @memberOf Document
+ */
+
+Document.prototype.$__fullPath = function(path) {
+ // overridden in SubDocuments
+ return path || '';
+};
+
+/*!
+ * Module exports.
+ */
+
+Document.ValidationError = ValidationError;
+module.exports = exports = Document;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/document_provider.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/document_provider.js
new file mode 100644
index 0000000..10087cc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/document_provider.js
@@ -0,0 +1,21 @@
+'use strict';
+
+/* eslint-env browser */
+
+/*!
+ * Module dependencies.
+ */
+var Document = require('./document.js');
+var BrowserDocument = require('./browserDocument.js');
+
+/**
+ * Returns the Document constructor for the current context
+ *
+ * @api private
+ */
+module.exports = function() {
+ if (typeof window !== 'undefined' && typeof document !== 'undefined' && document === window.document) {
+ return BrowserDocument;
+ }
+ return Document;
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/document_provider.web.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/document_provider.web.js
new file mode 100644
index 0000000..4223fc3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/document_provider.web.js
@@ -0,0 +1,17 @@
+'use strict';
+
+/* eslint-env browser */
+
+/*!
+ * Module dependencies.
+ */
+var BrowserDocument = require('./browserDocument.js');
+
+/**
+ * Returns the Document constructor for the current context
+ *
+ * @api private
+ */
+module.exports = function() {
+ return BrowserDocument;
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/SPEC.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/SPEC.md
new file mode 100644
index 0000000..6464693
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/SPEC.md
@@ -0,0 +1,4 @@
+
+# Driver Spec
+
+TODO
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/browser/ReadPreference.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/browser/ReadPreference.js
new file mode 100644
index 0000000..f20cd6c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/browser/ReadPreference.js
@@ -0,0 +1,5 @@
+/*!
+ * ignore
+ */
+
+module.exports = function() {};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/browser/binary.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/browser/binary.js
new file mode 100644
index 0000000..4d7a395
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/browser/binary.js
@@ -0,0 +1,12 @@
+
+/*!
+ * Module dependencies.
+ */
+
+var Binary = require('bson').Binary;
+
+/*!
+ * Module exports.
+ */
+
+module.exports = exports = Binary;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/browser/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/browser/index.js
new file mode 100644
index 0000000..fa5dbb4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/browser/index.js
@@ -0,0 +1,7 @@
+/*!
+ * Module exports.
+ */
+
+exports.Binary = require('./binary');
+exports.ObjectId = require('./objectid');
+exports.ReadPreference = require('./ReadPreference');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/browser/objectid.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/browser/objectid.js
new file mode 100644
index 0000000..e63c04a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/browser/objectid.js
@@ -0,0 +1,14 @@
+
+/*!
+ * [node-mongodb-native](https://github.com/mongodb/node-mongodb-native) ObjectId
+ * @constructor NodeMongoDbObjectId
+ * @see ObjectId
+ */
+
+var ObjectId = require('bson').ObjectID;
+
+/*!
+ * ignore
+ */
+
+module.exports = exports = ObjectId;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/index.js
new file mode 100644
index 0000000..5a842ba
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/index.js
@@ -0,0 +1,17 @@
+/*!
+ * ignore
+ */
+
+var driver;
+
+if (typeof window === 'undefined') {
+ driver = require(global.MONGOOSE_DRIVER_PATH || './node-mongodb-native');
+} else {
+ driver = require('./browser');
+}
+
+/*!
+ * ignore
+ */
+
+module.exports = driver;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/index.web.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/index.web.js
new file mode 100644
index 0000000..f833eb2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/index.web.js
@@ -0,0 +1,5 @@
+/*!
+ * ignore
+ */
+
+module.exports = require('./browser');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/ReadPreference.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/ReadPreference.js
new file mode 100644
index 0000000..e921d60
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/ReadPreference.js
@@ -0,0 +1,45 @@
+/*!
+ * Module dependencies.
+ */
+
+var mongodb = require('mongodb');
+var ReadPref = mongodb.ReadPreference;
+
+/*!
+ * Converts arguments to ReadPrefs the driver
+ * can understand.
+ *
+ * @param {String|Array} pref
+ * @param {Array} [tags]
+ */
+
+module.exports = function readPref(pref, tags) {
+ if (Array.isArray(pref)) {
+ tags = pref[1];
+ pref = pref[0];
+ }
+
+ if (pref instanceof ReadPref) {
+ return pref;
+ }
+
+ switch (pref) {
+ case 'p':
+ pref = 'primary';
+ break;
+ case 'pp':
+ pref = 'primaryPreferred';
+ break;
+ case 's':
+ pref = 'secondary';
+ break;
+ case 'sp':
+ pref = 'secondaryPreferred';
+ break;
+ case 'n':
+ pref = 'nearest';
+ break;
+ }
+
+ return new ReadPref(pref, tags);
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/binary.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/binary.js
new file mode 100644
index 0000000..657efde
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/binary.js
@@ -0,0 +1,8 @@
+
+/*!
+ * Module dependencies.
+ */
+
+var Binary = require('mongodb').Binary;
+
+module.exports = exports = Binary;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js
new file mode 100644
index 0000000..fd0da30
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js
@@ -0,0 +1,267 @@
+/*!
+ * Module dependencies.
+ */
+
+var MongooseCollection = require('../../collection'),
+ Collection = require('mongodb').Collection,
+ utils = require('../../utils');
+
+/**
+ * A [node-mongodb-native](https://github.com/mongodb/node-mongodb-native) collection implementation.
+ *
+ * All methods methods from the [node-mongodb-native](https://github.com/mongodb/node-mongodb-native) driver are copied and wrapped in queue management.
+ *
+ * @inherits Collection
+ * @api private
+ */
+
+function NativeCollection() {
+ this.collection = null;
+ MongooseCollection.apply(this, arguments);
+}
+
+/*!
+ * Inherit from abstract Collection.
+ */
+
+NativeCollection.prototype.__proto__ = MongooseCollection.prototype;
+
+/**
+ * Called when the connection opens.
+ *
+ * @api private
+ */
+
+NativeCollection.prototype.onOpen = function() {
+ var _this = this;
+
+ // always get a new collection in case the user changed host:port
+ // of parent db instance when re-opening the connection.
+
+ if (!_this.opts.capped.size) {
+ // non-capped
+ callback(null, _this.conn.db.collection(_this.name));
+ return _this.collection;
+ }
+
+ // capped
+ return _this.conn.db.collection(_this.name, function(err, c) {
+ if (err) return callback(err);
+
+ // discover if this collection exists and if it is capped
+ _this.conn.db.listCollections({name: _this.name}).toArray(function(err, docs) {
+ if (err) {
+ return callback(err);
+ }
+ var doc = docs[0];
+ var exists = !!doc;
+
+ if (exists) {
+ if (doc.options && doc.options.capped) {
+ callback(null, c);
+ } else {
+ var msg = 'A non-capped collection exists with the name: ' + _this.name + '\n\n'
+ + ' To use this collection as a capped collection, please '
+ + 'first convert it.\n'
+ + ' http://www.mongodb.org/display/DOCS/Capped+Collections#CappedCollections-Convertingacollectiontocapped';
+ err = new Error(msg);
+ callback(err);
+ }
+ } else {
+ // create
+ var opts = utils.clone(_this.opts.capped);
+ opts.capped = true;
+ _this.conn.db.createCollection(_this.name, opts, callback);
+ }
+ });
+ });
+
+ function callback(err, collection) {
+ if (err) {
+ // likely a strict mode error
+ _this.conn.emit('error', err);
+ } else {
+ _this.collection = collection;
+ MongooseCollection.prototype.onOpen.call(_this);
+ }
+ }
+};
+
+/**
+ * Called when the connection closes
+ *
+ * @api private
+ */
+
+NativeCollection.prototype.onClose = function() {
+ MongooseCollection.prototype.onClose.call(this);
+};
+
+/*!
+ * Copy the collection methods and make them subject to queues
+ */
+
+function iter(i) {
+ NativeCollection.prototype[i] = function() {
+ if (this.buffer) {
+ this.addQueue(i, arguments);
+ return;
+ }
+
+ var collection = this.collection,
+ args = arguments,
+ _this = this,
+ debug = _this.conn.base.options.debug;
+
+ if (debug) {
+ if (typeof debug === 'function') {
+ debug.apply(debug,
+ [_this.name, i].concat(utils.args(args, 0, args.length - 1)));
+ } else {
+ this.$print(_this.name, i, args);
+ }
+ }
+
+ try {
+ return collection[i].apply(collection, args);
+ } catch (error) {
+ // Collection operation may throw because of max bson size, catch it here
+ // See gh-3906
+ if (args.length > 0 &&
+ typeof args[args.length - 1] === 'function') {
+ args[args.length - 1](error);
+ } else {
+ throw error;
+ }
+ }
+ };
+}
+
+for (var i in Collection.prototype) {
+ // Janky hack to work around gh-3005 until we can get rid of the mongoose
+ // collection abstraction
+ try {
+ if (typeof Collection.prototype[i] !== 'function') {
+ continue;
+ }
+ } catch (e) {
+ continue;
+ }
+
+ iter(i);
+}
+
+/**
+ * Debug print helper
+ *
+ * @api public
+ * @method $print
+ */
+
+NativeCollection.prototype.$print = function(name, i, args) {
+ var moduleName = '\x1B[0;36mMongoose:\x1B[0m ';
+ var functionCall = [name, i].join('.');
+ var _args = [];
+ for (var j = args.length - 1; j >= 0; --j) {
+ if (this.$format(args[j]) || _args.length) {
+ _args.unshift(this.$format(args[j]));
+ }
+ }
+ var params = '(' + _args.join(', ') + ')';
+
+ console.error(moduleName + functionCall + params);
+};
+
+/**
+ * Formatter for debug print args
+ *
+ * @api public
+ * @method $format
+ */
+
+NativeCollection.prototype.$format = function(arg) {
+ var type = typeof arg;
+ if (type === 'function' || type === 'undefined') return '';
+ return format(arg);
+};
+
+/*!
+ * Debug print helper
+ */
+
+function map(o) {
+ return format(o, true);
+}
+function formatObjectId(x, key) {
+ var representation = 'ObjectId("' + x[key].toHexString() + '")';
+ x[key] = {inspect: function() { return representation; }};
+}
+function formatDate(x, key) {
+ var representation = 'new Date("' + x[key].toUTCString() + '")';
+ x[key] = {inspect: function() { return representation; }};
+}
+function format(obj, sub) {
+ if (obj && typeof obj.toBSON === 'function') {
+ obj = obj.toBSON();
+ }
+ var x = utils.clone(obj, {retainKeyOrder: 1, transform: false});
+ var representation;
+
+ if (x != null) {
+ if (x.constructor.name === 'Binary') {
+ x = 'BinData(' + x.sub_type + ', "' + x.toString('base64') + '")';
+ } else if (x.constructor.name === 'ObjectID') {
+ representation = 'ObjectId("' + x.toHexString() + '")';
+ x = {inspect: function() { return representation; }};
+ } else if (x.constructor.name === 'Date') {
+ representation = 'new Date("' + x.toUTCString() + '")';
+ x = {inspect: function() { return representation; }};
+ } else if (x.constructor.name === 'Object') {
+ var keys = Object.keys(x);
+ var numKeys = keys.length;
+ var key;
+ for (var i = 0; i < numKeys; ++i) {
+ key = keys[i];
+ if (x[key]) {
+ if (typeof x[key].toBSON === 'function') {
+ x[key] = x[key].toBSON();
+ }
+ if (x[key].constructor.name === 'Binary') {
+ x[key] = 'BinData(' + x[key].sub_type + ', "' +
+ x[key].buffer.toString('base64') + '")';
+ } else if (x[key].constructor.name === 'Object') {
+ x[key] = format(x[key], true);
+ } else if (x[key].constructor.name === 'ObjectID') {
+ formatObjectId(x, key);
+ } else if (x[key].constructor.name === 'Date') {
+ formatDate(x, key);
+ } else if (Array.isArray(x[key])) {
+ x[key] = x[key].map(map);
+ }
+ }
+ }
+ }
+ if (sub) return x;
+ }
+
+ return require('util')
+ .inspect(x, false, 10, true)
+ .replace(/\n/g, '')
+ .replace(/\s{2,}/g, ' ');
+}
+
+/**
+ * Retreives information about this collections indexes.
+ *
+ * @param {Function} callback
+ * @method getIndexes
+ * @api public
+ */
+
+NativeCollection.prototype.getIndexes = NativeCollection.prototype.indexInformation;
+
+/*!
+ * Module exports.
+ */
+
+module.exports = NativeCollection;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js
new file mode 100644
index 0000000..c17330d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js
@@ -0,0 +1,386 @@
+/*!
+ * Module dependencies.
+ */
+
+var MongooseConnection = require('../../connection');
+var mongo = require('mongodb');
+var Db = mongo.Db;
+var Server = mongo.Server;
+var Mongos = mongo.Mongos;
+var STATES = require('../../connectionstate');
+var ReplSetServers = mongo.ReplSet;
+var DisconnectedError = require('../../error/disconnected');
+
+/**
+ * A [node-mongodb-native](https://github.com/mongodb/node-mongodb-native) connection implementation.
+ *
+ * @inherits Connection
+ * @api private
+ */
+
+function NativeConnection() {
+ MongooseConnection.apply(this, arguments);
+ this._listening = false;
+}
+
+/**
+ * Expose the possible connection states.
+ * @api public
+ */
+
+NativeConnection.STATES = STATES;
+
+/*!
+ * Inherits from Connection.
+ */
+
+NativeConnection.prototype.__proto__ = MongooseConnection.prototype;
+
+/**
+ * Opens the connection to MongoDB.
+ *
+ * @param {Function} fn
+ * @return {Connection} this
+ * @api private
+ */
+
+NativeConnection.prototype.doOpen = function(fn) {
+ var _this = this;
+ var server = new Server(this.host, this.port, this.options.server);
+
+ if (this.options && this.options.mongos) {
+ var mongos = new Mongos([server], this.options.mongos);
+ this.db = new Db(this.name, mongos, this.options.db);
+ } else {
+ this.db = new Db(this.name, server, this.options.db);
+ }
+
+ this.db.open(function(err) {
+ listen(_this);
+
+ if (!mongos) {
+ server.s.server.on('error', function(error) {
+ if (/after \d+ attempts/.test(error.message)) {
+ _this.emit('error', new DisconnectedError(server.s.server.name));
+ }
+ });
+ }
+
+ if (err) return fn(err);
+
+ fn();
+ });
+
+ return this;
+};
+
+/**
+ * Switches to a different database using the same connection pool.
+ *
+ * Returns a new connection object, with the new db.
+ *
+ * @param {String} name The database name
+ * @return {Connection} New Connection Object
+ * @api public
+ */
+
+NativeConnection.prototype.useDb = function(name) {
+ // we have to manually copy all of the attributes...
+ var newConn = new this.constructor();
+ newConn.name = name;
+ newConn.base = this.base;
+ newConn.collections = {};
+ newConn.models = {};
+ newConn.replica = this.replica;
+ newConn.hosts = this.hosts;
+ newConn.host = this.host;
+ newConn.port = this.port;
+ newConn.user = this.user;
+ newConn.pass = this.pass;
+ newConn.options = this.options;
+ newConn._readyState = this._readyState;
+ newConn._closeCalled = this._closeCalled;
+ newConn._hasOpened = this._hasOpened;
+ newConn._listening = false;
+
+ // First, when we create another db object, we are not guaranteed to have a
+ // db object to work with. So, in the case where we have a db object and it
+ // is connected, we can just proceed with setting everything up. However, if
+ // we do not have a db or the state is not connected, then we need to wait on
+ // the 'open' event of the connection before doing the rest of the setup
+ // the 'connected' event is the first time we'll have access to the db object
+
+ var _this = this;
+
+ if (this.db && this._readyState === STATES.connected) {
+ wireup();
+ } else {
+ this.once('connected', wireup);
+ }
+
+ function wireup() {
+ newConn.db = _this.db.db(name);
+ newConn.onOpen();
+ // setup the events appropriately
+ listen(newConn);
+ }
+
+ newConn.name = name;
+
+ // push onto the otherDbs stack, this is used when state changes
+ this.otherDbs.push(newConn);
+ newConn.otherDbs.push(this);
+
+ return newConn;
+};
+
+/*!
+ * Register listeners for important events and bubble appropriately.
+ */
+
+function listen(conn) {
+ if (conn.db._listening) {
+ return;
+ }
+ conn.db._listening = true;
+
+ conn.db.on('close', function() {
+ if (conn._closeCalled) return;
+
+ // the driver never emits an `open` event. auto_reconnect still
+ // emits a `close` event but since we never get another
+ // `open` we can't emit close
+ if (conn.db.serverConfig.autoReconnect) {
+ conn.readyState = STATES.disconnected;
+ conn.emit('close');
+ return;
+ }
+ conn.onClose();
+ });
+ conn.db.on('error', function(err) {
+ conn.emit('error', err);
+ });
+ conn.db.on('reconnect', function() {
+ conn.readyState = STATES.connected;
+ conn.emit('reconnected');
+ });
+ conn.db.on('timeout', function(err) {
+ var error = new Error(err && err.err || 'connection timeout');
+ conn.emit('error', error);
+ });
+ conn.db.on('open', function(err, db) {
+ if (STATES.disconnected === conn.readyState && db && db.databaseName) {
+ conn.readyState = STATES.connected;
+ conn.emit('reconnected');
+ }
+ });
+ conn.db.on('parseError', function(err) {
+ conn.emit('parseError', err);
+ });
+}
+
+/**
+ * Opens a connection to a MongoDB ReplicaSet.
+ *
+ * See description of [doOpen](#NativeConnection-doOpen) for server options. In this case `options.replset` is also passed to ReplSetServers.
+ *
+ * @param {Function} fn
+ * @api private
+ * @return {Connection} this
+ */
+
+NativeConnection.prototype.doOpenSet = function(fn) {
+ var servers = [],
+ _this = this;
+
+ this.hosts.forEach(function(server) {
+ var host = server.host || server.ipc;
+ var port = server.port || 27017;
+ servers.push(new Server(host, port, _this.options.server));
+ });
+
+ var server = this.options.mongos
+ ? new Mongos(servers, this.options.mongos)
+ : new ReplSetServers(servers, this.options.replset || this.options.replSet);
+ this.db = new Db(this.name, server, this.options.db);
+
+ this.db.on('fullsetup', function() {
+ _this.emit('fullsetup');
+ });
+
+ this.db.on('all', function() {
+ _this.emit('all');
+ });
+
+ this.db.open(function(err) {
+ if (err) return fn(err);
+ fn();
+ listen(_this);
+ });
+
+ return this;
+};
+
+/**
+ * Closes the connection
+ *
+ * @param {Function} fn
+ * @return {Connection} this
+ * @api private
+ */
+
+NativeConnection.prototype.doClose = function(fn) {
+ this.db.close(fn);
+ return this;
+};
+
+/**
+ * Prepares default connection options for the node-mongodb-native driver.
+ *
+ * _NOTE: `passed` options take precedence over connection string options._
+ *
+ * @param {Object} passed options that were passed directly during connection
+ * @param {Object} [connStrOptions] options that were passed in the connection string
+ * @api private
+ */
+
+NativeConnection.prototype.parseOptions = function(passed, connStrOpts) {
+ var o = passed || {};
+ o.db || (o.db = {});
+ o.auth || (o.auth = {});
+ o.server || (o.server = {});
+ o.replset || (o.replset = o.replSet) || (o.replset = {});
+ o.server.socketOptions || (o.server.socketOptions = {});
+ o.replset.socketOptions || (o.replset.socketOptions = {});
+ o.mongos || (o.mongos = (connStrOpts && connStrOpts.mongos));
+ (o.mongos === true) && (o.mongos = {});
+
+ var opts = connStrOpts || {};
+ Object.keys(opts).forEach(function(name) {
+ switch (name) {
+ case 'ssl':
+ o.server.ssl = opts.ssl;
+ o.replset.ssl = opts.ssl;
+ o.mongos && (o.mongos.ssl = opts.ssl);
+ break;
+ case 'poolSize':
+ if (typeof o.server[name] === 'undefined') {
+ o.server[name] = o.replset[name] = opts[name];
+ }
+ break;
+ case 'slaveOk':
+ if (typeof o.server.slave_ok === 'undefined') {
+ o.server.slave_ok = opts[name];
+ }
+ break;
+ case 'autoReconnect':
+ if (typeof o.server.auto_reconnect === 'undefined') {
+ o.server.auto_reconnect = opts[name];
+ }
+ break;
+ case 'socketTimeoutMS':
+ case 'connectTimeoutMS':
+ if (typeof o.server.socketOptions[name] === 'undefined') {
+ o.server.socketOptions[name] = o.replset.socketOptions[name] = opts[name];
+ }
+ break;
+ case 'authdb':
+ if (typeof o.auth.authdb === 'undefined') {
+ o.auth.authdb = opts[name];
+ }
+ break;
+ case 'authSource':
+ if (typeof o.auth.authSource === 'undefined') {
+ o.auth.authSource = opts[name];
+ }
+ break;
+ case 'retries':
+ case 'reconnectWait':
+ case 'rs_name':
+ if (typeof o.replset[name] === 'undefined') {
+ o.replset[name] = opts[name];
+ }
+ break;
+ case 'replicaSet':
+ if (typeof o.replset.rs_name === 'undefined') {
+ o.replset.rs_name = opts[name];
+ }
+ break;
+ case 'readSecondary':
+ if (typeof o.replset.read_secondary === 'undefined') {
+ o.replset.read_secondary = opts[name];
+ }
+ break;
+ case 'nativeParser':
+ if (typeof o.db.native_parser === 'undefined') {
+ o.db.native_parser = opts[name];
+ }
+ break;
+ case 'w':
+ case 'safe':
+ case 'fsync':
+ case 'journal':
+ case 'wtimeoutMS':
+ if (typeof o.db[name] === 'undefined') {
+ o.db[name] = opts[name];
+ }
+ break;
+ case 'readPreference':
+ if (typeof o.db.readPreference === 'undefined') {
+ o.db.readPreference = opts[name];
+ }
+ break;
+ case 'readPreferenceTags':
+ if (typeof o.db.read_preference_tags === 'undefined') {
+ o.db.read_preference_tags = opts[name];
+ }
+ break;
+ case 'sslValidate':
+ o.server.sslValidate = opts.sslValidate;
+ o.replset.sslValidate = opts.sslValidate;
+ o.mongos && (o.mongos.sslValidate = opts.sslValidate);
+ }
+ });
+
+ if (!('auto_reconnect' in o.server)) {
+ o.server.auto_reconnect = true;
+ }
+
+ // mongoose creates its own ObjectIds
+ o.db.forceServerObjectId = false;
+
+ // default safe using new nomenclature
+ if (!('journal' in o.db || 'j' in o.db ||
+ 'fsync' in o.db || 'safe' in o.db || 'w' in o.db)) {
+ o.db.w = 1;
+ }
+
+ if (o.promiseLibrary) {
+ o.db.promiseLibrary = o.promiseLibrary;
+ }
+
+ validate(o);
+ return o;
+};
+
+/*!
+ * Validates the driver db options.
+ *
+ * @param {Object} o
+ */
+
+function validate(o) {
+ if (o.db.w === -1 || o.db.w === 0) {
+ if (o.db.journal || o.db.fsync || o.db.safe) {
+ throw new Error(
+ 'Invalid writeConcern: '
+ + 'w set to -1 or 0 cannot be combined with safe|fsync|journal');
+ }
+ }
+}
+
+/*!
+ * Module exports.
+ */
+
+module.exports = NativeConnection;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/index.js
new file mode 100644
index 0000000..fa5dbb4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/index.js
@@ -0,0 +1,7 @@
+/*!
+ * Module exports.
+ */
+
+exports.Binary = require('./binary');
+exports.ObjectId = require('./objectid');
+exports.ReadPreference = require('./ReadPreference');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/objectid.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/objectid.js
new file mode 100644
index 0000000..69fc08f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/drivers/node-mongodb-native/objectid.js
@@ -0,0 +1,14 @@
+
+/*!
+ * [node-mongodb-native](https://github.com/mongodb/node-mongodb-native) ObjectId
+ * @constructor NodeMongoDbObjectId
+ * @see ObjectId
+ */
+
+var ObjectId = require('mongodb').ObjectId;
+
+/*!
+ * ignore
+ */
+
+module.exports = exports = ObjectId;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error.js
new file mode 100644
index 0000000..b084e76
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error.js
@@ -0,0 +1,55 @@
+
+/**
+ * MongooseError constructor
+ *
+ * @param {String} msg Error message
+ * @inherits Error https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error
+ */
+
+function MongooseError(msg) {
+ Error.call(this);
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this);
+ } else {
+ this.stack = new Error().stack;
+ }
+ this.message = msg;
+ this.name = 'MongooseError';
+}
+
+/*!
+ * Inherits from Error.
+ */
+
+MongooseError.prototype = Object.create(Error.prototype);
+MongooseError.prototype.constructor = Error;
+
+/*!
+ * Module exports.
+ */
+
+module.exports = exports = MongooseError;
+
+/**
+ * The default built-in validator error messages.
+ *
+ * @see Error.messages #error_messages_MongooseError-messages
+ * @api public
+ */
+
+MongooseError.messages = require('./error/messages');
+
+// backward compat
+MongooseError.Messages = MongooseError.messages;
+
+/*!
+ * Expose subclasses
+ */
+
+MongooseError.CastError = require('./error/cast');
+MongooseError.ValidationError = require('./error/validation');
+MongooseError.ValidatorError = require('./error/validator');
+MongooseError.VersionError = require('./error/version');
+MongooseError.OverwriteModelError = require('./error/overwriteModel');
+MongooseError.MissingSchemaError = require('./error/missingSchema');
+MongooseError.DivergentArrayError = require('./error/divergentArray');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/browserMissingSchema.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/browserMissingSchema.js
new file mode 100644
index 0000000..1c7892e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/browserMissingSchema.js
@@ -0,0 +1,32 @@
+/*!
+ * Module dependencies.
+ */
+
+var MongooseError = require('../error.js');
+
+/*!
+ * MissingSchema Error constructor.
+ *
+ * @inherits MongooseError
+ */
+
+function MissingSchemaError() {
+ var msg = 'Schema hasn\'t been registered for document.\n'
+ + 'Use mongoose.Document(name, schema)';
+ MongooseError.call(this, msg);
+ Error.captureStackTrace && Error.captureStackTrace(this, arguments.callee);
+ this.name = 'MissingSchemaError';
+}
+
+/*!
+ * Inherits from MongooseError.
+ */
+
+MissingSchemaError.prototype = Object.create(MongooseError.prototype);
+MissingSchemaError.prototype.constructor = MongooseError;
+
+/*!
+ * exports
+ */
+
+module.exports = MissingSchemaError;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/cast.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/cast.js
new file mode 100644
index 0000000..f200a9d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/cast.js
@@ -0,0 +1,60 @@
+/*!
+ * Module dependencies.
+ */
+
+var MongooseError = require('../error.js');
+var util = require('util');
+
+/**
+ * Casting Error constructor.
+ *
+ * @param {String} type
+ * @param {String} value
+ * @inherits MongooseError
+ * @api private
+ */
+
+function CastError(type, value, path, reason) {
+ var stringValue = util.inspect(value);
+ stringValue = stringValue.replace(/^'/, '"').replace(/'$/, '"');
+ if (stringValue.charAt(0) !== '"') {
+ stringValue = '"' + stringValue + '"';
+ }
+ MongooseError.call(this, 'Cast to ' + type + ' failed for value ' +
+ stringValue + ' at path "' + path + '"');
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this);
+ } else {
+ this.stack = new Error().stack;
+ }
+ this.stringValue = stringValue;
+ this.name = 'CastError';
+ this.kind = type;
+ this.value = value;
+ this.path = path;
+ this.reason = reason;
+}
+
+/*!
+ * Inherits from MongooseError.
+ */
+
+CastError.prototype = Object.create(MongooseError.prototype);
+CastError.prototype.constructor = MongooseError;
+
+/*!
+ * ignore
+ */
+
+CastError.prototype.setModel = function(model) {
+ this.model = model;
+ this.message = 'Cast to ' + this.kind + ' failed for value ' +
+ this.stringValue + ' at path "' + this.path + '"' + ' for model "' +
+ model.modelName + '"';
+};
+
+/*!
+ * exports
+ */
+
+module.exports = CastError;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/disconnected.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/disconnected.js
new file mode 100644
index 0000000..b4eece1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/disconnected.js
@@ -0,0 +1,40 @@
+/*!
+ * Module dependencies.
+ */
+
+var MongooseError = require('../error.js');
+
+/**
+ * Casting Error constructor.
+ *
+ * @param {String} type
+ * @param {String} value
+ * @inherits MongooseError
+ * @api private
+ */
+
+function DisconnectedError(connectionString) {
+ MongooseError.call(this, 'Ran out of retries trying to reconnect to "' +
+ connectionString + '". Try setting `server.reconnectTries` and ' +
+ '`server.reconnectInterval` to something higher.');
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this);
+ } else {
+ this.stack = new Error().stack;
+ }
+ this.name = 'DisconnectedError';
+}
+
+/*!
+ * Inherits from MongooseError.
+ */
+
+DisconnectedError.prototype = Object.create(MongooseError.prototype);
+DisconnectedError.prototype.constructor = MongooseError;
+
+
+/*!
+ * exports
+ */
+
+module.exports = DisconnectedError;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/divergentArray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/divergentArray.js
new file mode 100644
index 0000000..1cbaa25
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/divergentArray.js
@@ -0,0 +1,42 @@
+
+/*!
+ * Module dependencies.
+ */
+
+var MongooseError = require('../error.js');
+
+/*!
+ * DivergentArrayError constructor.
+ *
+ * @inherits MongooseError
+ */
+
+function DivergentArrayError(paths) {
+ var msg = 'For your own good, using `document.save()` to update an array '
+ + 'which was selected using an $elemMatch projection OR '
+ + 'populated using skip, limit, query conditions, or exclusion of '
+ + 'the _id field when the operation results in a $pop or $set of '
+ + 'the entire array is not supported. The following '
+ + 'path(s) would have been modified unsafely:\n'
+ + ' ' + paths.join('\n ') + '\n'
+ + 'Use Model.update() to update these arrays instead.';
+ // TODO write up a docs page (FAQ) and link to it
+
+ MongooseError.call(this, msg);
+ Error.captureStackTrace && Error.captureStackTrace(this, arguments.callee);
+ this.name = 'DivergentArrayError';
+}
+
+/*!
+ * Inherits from MongooseError.
+ */
+
+DivergentArrayError.prototype = Object.create(MongooseError.prototype);
+DivergentArrayError.prototype.constructor = MongooseError;
+
+
+/*!
+ * exports
+ */
+
+module.exports = DivergentArrayError;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/messages.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/messages.js
new file mode 100644
index 0000000..88ddf6e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/messages.js
@@ -0,0 +1,42 @@
+
+/**
+ * The default built-in validator error messages. These may be customized.
+ *
+ * // customize within each schema or globally like so
+ * var mongoose = require('mongoose');
+ * mongoose.Error.messages.String.enum = "Your custom message for {PATH}.";
+ *
+ * As you might have noticed, error messages support basic templating
+ *
+ * - `{PATH}` is replaced with the invalid document path
+ * - `{VALUE}` is replaced with the invalid value
+ * - `{TYPE}` is replaced with the validator type such as "regexp", "min", or "user defined"
+ * - `{MIN}` is replaced with the declared min value for the Number.min validator
+ * - `{MAX}` is replaced with the declared max value for the Number.max validator
+ *
+ * Click the "show code" link below to see all defaults.
+ *
+ * @static messages
+ * @receiver MongooseError
+ * @api public
+ */
+
+var msg = module.exports = exports = {};
+
+msg.general = {};
+msg.general.default = 'Validator failed for path `{PATH}` with value `{VALUE}`';
+msg.general.required = 'Path `{PATH}` is required.';
+
+msg.Number = {};
+msg.Number.min = 'Path `{PATH}` ({VALUE}) is less than minimum allowed value ({MIN}).';
+msg.Number.max = 'Path `{PATH}` ({VALUE}) is more than maximum allowed value ({MAX}).';
+
+msg.Date = {};
+msg.Date.min = 'Path `{PATH}` ({VALUE}) is before minimum allowed value ({MIN}).';
+msg.Date.max = 'Path `{PATH}` ({VALUE}) is after maximum allowed value ({MAX}).';
+
+msg.String = {};
+msg.String.enum = '`{VALUE}` is not a valid enum value for path `{PATH}`.';
+msg.String.match = 'Path `{PATH}` is invalid ({VALUE}).';
+msg.String.minlength = 'Path `{PATH}` (`{VALUE}`) is shorter than the minimum allowed length ({MINLENGTH}).';
+msg.String.maxlength = 'Path `{PATH}` (`{VALUE}`) is longer than the maximum allowed length ({MAXLENGTH}).';
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/missingSchema.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/missingSchema.js
new file mode 100644
index 0000000..25eabfa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/missingSchema.js
@@ -0,0 +1,33 @@
+
+/*!
+ * Module dependencies.
+ */
+
+var MongooseError = require('../error.js');
+
+/*!
+ * MissingSchema Error constructor.
+ *
+ * @inherits MongooseError
+ */
+
+function MissingSchemaError(name) {
+ var msg = 'Schema hasn\'t been registered for model "' + name + '".\n'
+ + 'Use mongoose.model(name, schema)';
+ MongooseError.call(this, msg);
+ Error.captureStackTrace && Error.captureStackTrace(this, arguments.callee);
+ this.name = 'MissingSchemaError';
+}
+
+/*!
+ * Inherits from MongooseError.
+ */
+
+MissingSchemaError.prototype = Object.create(MongooseError.prototype);
+MissingSchemaError.prototype.constructor = MongooseError;
+
+/*!
+ * exports
+ */
+
+module.exports = MissingSchemaError;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/objectExpected.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/objectExpected.js
new file mode 100644
index 0000000..fa863bc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/objectExpected.js
@@ -0,0 +1,35 @@
+/*!
+ * Module dependencies.
+ */
+
+var MongooseError = require('../error.js');
+
+/**
+ * Strict mode error constructor
+ *
+ * @param {String} type
+ * @param {String} value
+ * @inherits MongooseError
+ * @api private
+ */
+
+function ObjectExpectedError(path, val) {
+ MongooseError.call(this, 'Tried to set nested object field `' + path +
+ '` to primitive value `' + val + '` and strict mode is set to throw.');
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this);
+ } else {
+ this.stack = new Error().stack;
+ }
+ this.name = 'ObjectExpectedError';
+ this.path = path;
+}
+
+/*!
+ * Inherits from MongooseError.
+ */
+
+ObjectExpectedError.prototype = Object.create(MongooseError.prototype);
+ObjectExpectedError.prototype.constructor = MongooseError;
+
+module.exports = ObjectExpectedError;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/overwriteModel.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/overwriteModel.js
new file mode 100644
index 0000000..c14ae7f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/overwriteModel.js
@@ -0,0 +1,31 @@
+
+/*!
+ * Module dependencies.
+ */
+
+var MongooseError = require('../error.js');
+
+/*!
+ * OverwriteModel Error constructor.
+ *
+ * @inherits MongooseError
+ */
+
+function OverwriteModelError(name) {
+ MongooseError.call(this, 'Cannot overwrite `' + name + '` model once compiled.');
+ Error.captureStackTrace && Error.captureStackTrace(this, arguments.callee);
+ this.name = 'OverwriteModelError';
+}
+
+/*!
+ * Inherits from MongooseError.
+ */
+
+OverwriteModelError.prototype = Object.create(MongooseError.prototype);
+OverwriteModelError.prototype.constructor = MongooseError;
+
+/*!
+ * exports
+ */
+
+module.exports = OverwriteModelError;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/strict.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/strict.js
new file mode 100644
index 0000000..6e34431
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/strict.js
@@ -0,0 +1,35 @@
+/*!
+ * Module dependencies.
+ */
+
+var MongooseError = require('../error.js');
+
+/**
+ * Strict mode error constructor
+ *
+ * @param {String} type
+ * @param {String} value
+ * @inherits MongooseError
+ * @api private
+ */
+
+function StrictModeError(path) {
+ MongooseError.call(this, 'Field `' + path + '` is not in schema and strict ' +
+ 'mode is set to throw.');
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this);
+ } else {
+ this.stack = new Error().stack;
+ }
+ this.name = 'StrictModeError';
+ this.path = path;
+}
+
+/*!
+ * Inherits from MongooseError.
+ */
+
+StrictModeError.prototype = Object.create(MongooseError.prototype);
+StrictModeError.prototype.constructor = MongooseError;
+
+module.exports = StrictModeError;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/validation.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/validation.js
new file mode 100644
index 0000000..e3322d4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/validation.js
@@ -0,0 +1,63 @@
+/*!
+ * Module requirements
+ */
+
+var MongooseError = require('../error.js');
+
+/**
+ * Document Validation Error
+ *
+ * @api private
+ * @param {Document} instance
+ * @inherits MongooseError
+ */
+
+function ValidationError(instance) {
+ this.errors = {};
+ if (instance && instance.constructor.name === 'model') {
+ MongooseError.call(this, instance.constructor.modelName + ' validation failed');
+ } else {
+ MongooseError.call(this, 'Validation failed');
+ }
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this);
+ } else {
+ this.stack = new Error().stack;
+ }
+ this.name = 'ValidationError';
+ if (instance) {
+ instance.errors = this.errors;
+ }
+}
+
+/*!
+ * Inherits from MongooseError.
+ */
+
+ValidationError.prototype = Object.create(MongooseError.prototype);
+ValidationError.prototype.constructor = MongooseError;
+
+
+/**
+ * Console.log helper
+ */
+
+ValidationError.prototype.toString = function() {
+ var ret = this.name + ': ';
+ var msgs = [];
+
+ Object.keys(this.errors || {}).forEach(function(key) {
+ if (this === this.errors[key]) {
+ return;
+ }
+ msgs.push(String(this.errors[key]));
+ }, this);
+
+ return ret + msgs.join(', ');
+};
+
+/*!
+ * Module exports
+ */
+
+module.exports = exports = ValidationError;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/validator.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/validator.js
new file mode 100644
index 0000000..96a3ba1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/validator.js
@@ -0,0 +1,81 @@
+/*!
+ * Module dependencies.
+ */
+
+var MongooseError = require('../error.js');
+
+/**
+ * Schema validator error
+ *
+ * @param {Object} properties
+ * @inherits MongooseError
+ * @api private
+ */
+
+function ValidatorError(properties) {
+ var msg = properties.message;
+ if (!msg) {
+ msg = MongooseError.messages.general.default;
+ }
+
+ var message = this.formatMessage(msg, properties);
+ MongooseError.call(this, message);
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this);
+ } else {
+ this.stack = new Error().stack;
+ }
+ this.properties = properties;
+ this.name = 'ValidatorError';
+ this.kind = properties.type;
+ this.path = properties.path;
+ this.value = properties.value;
+}
+
+/*!
+ * Inherits from MongooseError
+ */
+
+ValidatorError.prototype = Object.create(MongooseError.prototype);
+ValidatorError.prototype.constructor = MongooseError;
+
+/*!
+ * The object used to define this validator. Not enumerable to hide
+ * it from `require('util').inspect()` output re: gh-3925
+ */
+
+Object.defineProperty(ValidatorError.prototype, 'properties', {
+ enumerable: false,
+ writable: true,
+ value: null
+});
+
+/*!
+ * Formats error messages
+ */
+
+ValidatorError.prototype.formatMessage = function(msg, properties) {
+ var propertyNames = Object.keys(properties);
+ for (var i = 0; i < propertyNames.length; ++i) {
+ var propertyName = propertyNames[i];
+ if (propertyName === 'message') {
+ continue;
+ }
+ msg = msg.replace('{' + propertyName.toUpperCase() + '}', properties[propertyName]);
+ }
+ return msg;
+};
+
+/*!
+ * toString helper
+ */
+
+ValidatorError.prototype.toString = function() {
+ return this.message;
+};
+
+/*!
+ * exports
+ */
+
+module.exports = ValidatorError;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/version.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/version.js
new file mode 100644
index 0000000..e509b9b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/version.js
@@ -0,0 +1,33 @@
+'use strict';
+
+/*!
+ * Module dependencies.
+ */
+
+var MongooseError = require('../error.js');
+
+/**
+ * Version Error constructor.
+ *
+ * @inherits MongooseError
+ * @api private
+ */
+
+function VersionError(doc) {
+ MongooseError.call(this, 'No matching document found for id "' + doc._id +
+ '"');
+ this.name = 'VersionError';
+}
+
+/*!
+ * Inherits from MongooseError.
+ */
+
+VersionError.prototype = Object.create(MongooseError.prototype);
+VersionError.prototype.constructor = MongooseError;
+
+/*!
+ * exports
+ */
+
+module.exports = VersionError;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/index.js
new file mode 100644
index 0000000..e0c6445
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/index.js
@@ -0,0 +1,818 @@
+'use strict';
+
+/*!
+ * Module dependencies.
+ */
+
+var Schema = require('./schema'),
+ SchemaType = require('./schematype'),
+ VirtualType = require('./virtualtype'),
+ STATES = require('./connectionstate'),
+ Types = require('./types'),
+ Query = require('./query'),
+ Model = require('./model'),
+ Document = require('./document'),
+ utils = require('./utils'),
+ format = utils.toCollectionName,
+ pkg = require('../package.json');
+
+var querystring = require('querystring');
+
+var Aggregate = require('./aggregate');
+var PromiseProvider = require('./promise_provider');
+
+/**
+ * Mongoose constructor.
+ *
+ * The exports object of the `mongoose` module is an instance of this class.
+ * Most apps will only use this one instance.
+ *
+ * @api public
+ */
+
+function Mongoose() {
+ this.connections = [];
+ this.plugins = [];
+ this.models = {};
+ this.modelSchemas = {};
+ // default global options
+ this.options = {
+ pluralization: true
+ };
+ var conn = this.createConnection(); // default connection
+ conn.models = this.models;
+}
+
+/**
+ * Expose connection states for user-land
+ *
+ */
+Mongoose.prototype.STATES = STATES;
+
+/**
+ * Sets mongoose options
+ *
+ * ####Example:
+ *
+ * mongoose.set('test', value) // sets the 'test' option to `value`
+ *
+ * mongoose.set('debug', true) // enable logging collection methods + arguments to the console
+ *
+ * mongoose.set('debug', function(collectionName, methodName, arg1, arg2...) {}); // use custom function to log collection methods + arguments
+ *
+ * @param {String} key
+ * @param {String|Function} value
+ * @api public
+ */
+
+Mongoose.prototype.set = function(key, value) {
+ if (arguments.length === 1) {
+ return this.options[key];
+ }
+
+ this.options[key] = value;
+ return this;
+};
+Mongoose.prototype.set.$hasSideEffects = true;
+
+/**
+ * Gets mongoose options
+ *
+ * ####Example:
+ *
+ * mongoose.get('test') // returns the 'test' value
+ *
+ * @param {String} key
+ * @method get
+ * @api public
+ */
+
+Mongoose.prototype.get = Mongoose.prototype.set;
+
+/*!
+ * ReplSet connection string check.
+ */
+
+var rgxReplSet = /^.+,.+$/;
+
+/**
+ * Checks if ?replicaSet query parameter is specified in URI
+ *
+ * ####Example:
+ *
+ * checkReplicaSetInUri('localhost:27000?replicaSet=rs0'); // true
+ *
+ * @param {String} uri
+ * @return {boolean}
+ * @api private
+ */
+
+var checkReplicaSetInUri = function(uri) {
+ if (!uri) {
+ return false;
+ }
+
+ var queryStringStart = uri.indexOf('?');
+ var isReplicaSet = false;
+ if (queryStringStart !== -1) {
+ try {
+ var obj = querystring.parse(uri.substr(queryStringStart + 1));
+ if (obj && obj.replicaSet) {
+ isReplicaSet = true;
+ }
+ } catch (e) {
+ return false;
+ }
+ }
+
+ return isReplicaSet;
+};
+
+/**
+ * Creates a Connection instance.
+ *
+ * Each `connection` instance maps to a single database. This method is helpful when mangaging multiple db connections.
+ *
+ * If arguments are passed, they are proxied to either [Connection#open](#connection_Connection-open) or [Connection#openSet](#connection_Connection-openSet) appropriately. This means we can pass `db`, `server`, and `replset` options to the driver. _Note that the `safe` option specified in your schema will overwrite the `safe` db option specified here unless you set your schemas `safe` option to `undefined`. See [this](/docs/guide.html#safe) for more information._
+ *
+ * _Options passed take precedence over options included in connection strings._
+ *
+ * ####Example:
+ *
+ * // with mongodb:// URI
+ * db = mongoose.createConnection('mongodb://user:pass@localhost:port/database');
+ *
+ * // and options
+ * var opts = { db: { native_parser: true }}
+ * db = mongoose.createConnection('mongodb://user:pass@localhost:port/database', opts);
+ *
+ * // replica sets
+ * db = mongoose.createConnection('mongodb://user:pass@localhost:port,anotherhost:port,yetanother:port/database');
+ *
+ * // and options
+ * var opts = { replset: { strategy: 'ping', rs_name: 'testSet' }}
+ * db = mongoose.createConnection('mongodb://user:pass@localhost:port,anotherhost:port,yetanother:port/database', opts);
+ *
+ * // with [host, database_name[, port] signature
+ * db = mongoose.createConnection('localhost', 'database', port)
+ *
+ * // and options
+ * var opts = { server: { auto_reconnect: false }, user: 'username', pass: 'mypassword' }
+ * db = mongoose.createConnection('localhost', 'database', port, opts)
+ *
+ * // initialize now, connect later
+ * db = mongoose.createConnection();
+ * db.open('localhost', 'database', port, [opts]);
+ *
+ * @param {String} [uri] a mongodb:// URI
+ * @param {Object} [options] options to pass to the driver
+ * @param {Object} [options.config] mongoose-specific options
+ * @param {Boolean} [options.config.autoIndex] set to false to disable automatic index creation for all models associated with this connection.
+ * @see Connection#open #connection_Connection-open
+ * @see Connection#openSet #connection_Connection-openSet
+ * @return {Connection} the created Connection object
+ * @api public
+ */
+
+Mongoose.prototype.createConnection = function(uri, options) {
+ var conn = new Connection(this);
+ this.connections.push(conn);
+
+ var rsOption = options && (options.replset || options.replSet);
+ if (arguments.length) {
+ if (rgxReplSet.test(arguments[0]) || checkReplicaSetInUri(arguments[0])) {
+ conn.openSet.apply(conn, arguments).catch(function() {});
+ } else if (rsOption &&
+ (rsOption.replicaSet || rsOption.rs_name)) {
+ conn.openSet.apply(conn, arguments).catch(function() {});
+ } else {
+ conn.open.apply(conn, arguments).catch(function() {});
+ }
+ }
+
+ return conn;
+};
+Mongoose.prototype.createConnection.$hasSideEffects = true;
+
+/**
+ * Opens the default mongoose connection.
+ *
+ * If arguments are passed, they are proxied to either
+ * [Connection#open](#connection_Connection-open) or
+ * [Connection#openSet](#connection_Connection-openSet) appropriately.
+ *
+ * _Options passed take precedence over options included in connection strings._
+ *
+ * ####Example:
+ *
+ * mongoose.connect('mongodb://user:pass@localhost:port/database');
+ *
+ * // replica sets
+ * var uri = 'mongodb://user:pass@localhost:port,anotherhost:port,yetanother:port/mydatabase';
+ * mongoose.connect(uri);
+ *
+ * // with options
+ * mongoose.connect(uri, options);
+ *
+ * // connecting to multiple mongos
+ * var uri = 'mongodb://hostA:27501,hostB:27501';
+ * var opts = { mongos: true };
+ * mongoose.connect(uri, opts);
+ *
+ * // optional callback that gets fired when initial connection completed
+ * var uri = 'mongodb://nonexistent.domain:27000';
+ * mongoose.connect(uri, function(error) {
+ * // if error is truthy, the initial connection failed.
+ * })
+ *
+ * @param {String} uri(s)
+ * @param {Object} [options]
+ * @param {Function} [callback]
+ * @see Mongoose#createConnection #index_Mongoose-createConnection
+ * @api public
+ * @return {MongooseThenable} pseudo-promise wrapper around this
+ */
+
+Mongoose.prototype.connect = function() {
+ var conn = this.connection;
+ if (rgxReplSet.test(arguments[0]) || checkReplicaSetInUri(arguments[0])) {
+ return new MongooseThenable(this, conn.openSet.apply(conn, arguments));
+ }
+
+ return new MongooseThenable(this, conn.open.apply(conn, arguments));
+};
+Mongoose.prototype.connect.$hasSideEffects = true;
+
+/**
+ * Disconnects all connections.
+ *
+ * @param {Function} [fn] called after all connection close.
+ * @return {MongooseThenable} pseudo-promise wrapper around this
+ * @api public
+ */
+
+Mongoose.prototype.disconnect = function(fn) {
+ var error;
+ this.connections.forEach(function(conn) {
+ conn.close(function(err) {
+ if (error) {
+ return;
+ }
+ if (err) {
+ error = err;
+ }
+ });
+ });
+
+ var Promise = PromiseProvider.get();
+ return new MongooseThenable(this, new Promise.ES6(function(resolve, reject) {
+ fn && fn(error);
+ if (error) {
+ reject(error);
+ return;
+ }
+ resolve();
+ }));
+};
+Mongoose.prototype.disconnect.$hasSideEffects = true;
+
+/**
+ * Defines a model or retrieves it.
+ *
+ * Models defined on the `mongoose` instance are available to all connection created by the same `mongoose` instance.
+ *
+ * ####Example:
+ *
+ * var mongoose = require('mongoose');
+ *
+ * // define an Actor model with this mongoose instance
+ * mongoose.model('Actor', new Schema({ name: String }));
+ *
+ * // create a new connection
+ * var conn = mongoose.createConnection(..);
+ *
+ * // retrieve the Actor model
+ * var Actor = conn.model('Actor');
+ *
+ * _When no `collection` argument is passed, Mongoose produces a collection name by passing the model `name` to the [utils.toCollectionName](#utils_exports.toCollectionName) method. This method pluralizes the name. If you don't like this behavior, either pass a collection name or set your schemas collection name option._
+ *
+ * ####Example:
+ *
+ * var schema = new Schema({ name: String }, { collection: 'actor' });
+ *
+ * // or
+ *
+ * schema.set('collection', 'actor');
+ *
+ * // or
+ *
+ * var collectionName = 'actor'
+ * var M = mongoose.model('Actor', schema, collectionName)
+ *
+ * @param {String|Function} name model name or class extending Model
+ * @param {Schema} [schema]
+ * @param {String} [collection] name (optional, inferred from model name)
+ * @param {Boolean} [skipInit] whether to skip initialization (defaults to false)
+ * @api public
+ */
+
+Mongoose.prototype.model = function(name, schema, collection, skipInit) {
+ var model;
+ if (typeof name === 'function') {
+ model = name;
+ name = model.name;
+ if (!(model.prototype instanceof Model)) {
+ throw new mongoose.Error('The provided class ' + name + ' must extend Model');
+ }
+ }
+
+ if (typeof schema === 'string') {
+ collection = schema;
+ schema = false;
+ }
+
+ if (utils.isObject(schema) && !(schema.instanceOfSchema)) {
+ schema = new Schema(schema);
+ }
+ if (schema && !schema.instanceOfSchema) {
+ throw new Error('The 2nd parameter to `mongoose.model()` should be a ' +
+ 'schema or a POJO');
+ }
+
+ if (typeof collection === 'boolean') {
+ skipInit = collection;
+ collection = null;
+ }
+
+ // handle internal options from connection.model()
+ var options;
+ if (skipInit && utils.isObject(skipInit)) {
+ options = skipInit;
+ skipInit = true;
+ } else {
+ options = {};
+ }
+
+ // look up schema for the collection.
+ if (!this.modelSchemas[name]) {
+ if (schema) {
+ // cache it so we only apply plugins once
+ this.modelSchemas[name] = schema;
+ } else {
+ throw new mongoose.Error.MissingSchemaError(name);
+ }
+ }
+
+ if (schema) {
+ this._applyPlugins(schema);
+ }
+
+ var sub;
+
+ // connection.model() may be passing a different schema for
+ // an existing model name. in this case don't read from cache.
+ if (this.models[name] && options.cache !== false) {
+ if (schema && schema.instanceOfSchema && schema !== this.models[name].schema) {
+ throw new mongoose.Error.OverwriteModelError(name);
+ }
+
+ if (collection) {
+ // subclass current model with alternate collection
+ model = this.models[name];
+ schema = model.prototype.schema;
+ sub = model.__subclass(this.connection, schema, collection);
+ // do not cache the sub model
+ return sub;
+ }
+
+ return this.models[name];
+ }
+
+ // ensure a schema exists
+ if (!schema) {
+ schema = this.modelSchemas[name];
+ if (!schema) {
+ throw new mongoose.Error.MissingSchemaError(name);
+ }
+ }
+
+ // Apply relevant "global" options to the schema
+ if (!('pluralization' in schema.options)) schema.options.pluralization = this.options.pluralization;
+
+
+ if (!collection) {
+ collection = schema.get('collection') || format(name, schema.options);
+ }
+
+ var connection = options.connection || this.connection;
+ model = this.Model.compile(model || name, schema, collection, connection, this);
+
+ if (!skipInit) {
+ model.init();
+ }
+
+ if (options.cache === false) {
+ return model;
+ }
+
+ this.models[name] = model;
+ return this.models[name];
+};
+Mongoose.prototype.model.$hasSideEffects = true;
+
+/**
+ * Returns an array of model names created on this instance of Mongoose.
+ *
+ * ####Note:
+ *
+ * _Does not include names of models created using `connection.model()`._
+ *
+ * @api public
+ * @return {Array}
+ */
+
+Mongoose.prototype.modelNames = function() {
+ var names = Object.keys(this.models);
+ return names;
+};
+Mongoose.prototype.modelNames.$hasSideEffects = true;
+
+/**
+ * Applies global plugins to `schema`.
+ *
+ * @param {Schema} schema
+ * @api private
+ */
+
+Mongoose.prototype._applyPlugins = function(schema) {
+ if (schema.$globalPluginsApplied) {
+ return;
+ }
+ var i;
+ var len;
+ for (i = 0, len = this.plugins.length; i < len; ++i) {
+ schema.plugin(this.plugins[i][0], this.plugins[i][1]);
+ }
+ schema.$globalPluginsApplied = true;
+ for (i = 0, len = schema.childSchemas.length; i < len; ++i) {
+ this._applyPlugins(schema.childSchemas[i]);
+ }
+};
+Mongoose.prototype._applyPlugins.$hasSideEffects = true;
+
+/**
+ * Declares a global plugin executed on all Schemas.
+ *
+ * Equivalent to calling `.plugin(fn)` on each Schema you create.
+ *
+ * @param {Function} fn plugin callback
+ * @param {Object} [opts] optional options
+ * @return {Mongoose} this
+ * @see plugins ./plugins.html
+ * @api public
+ */
+
+Mongoose.prototype.plugin = function(fn, opts) {
+ this.plugins.push([fn, opts]);
+ return this;
+};
+Mongoose.prototype.plugin.$hasSideEffects = true;
+
+/**
+ * The default connection of the mongoose module.
+ *
+ * ####Example:
+ *
+ * var mongoose = require('mongoose');
+ * mongoose.connect(...);
+ * mongoose.connection.on('error', cb);
+ *
+ * This is the connection used by default for every model created using [mongoose.model](#index_Mongoose-model).
+ *
+ * @property connection
+ * @return {Connection}
+ * @api public
+ */
+
+Mongoose.prototype.__defineGetter__('connection', function() {
+ return this.connections[0];
+});
+
+Mongoose.prototype.__defineSetter__('connection', function(v) {
+ this.connections[0] = v;
+});
+
+/*!
+ * Driver depentend APIs
+ */
+
+var driver = global.MONGOOSE_DRIVER_PATH || './drivers/node-mongodb-native';
+
+/*!
+ * Connection
+ */
+
+var Connection = require(driver + '/connection');
+
+/*!
+ * Collection
+ */
+
+var Collection = require(driver + '/collection');
+
+/**
+ * The Mongoose Aggregate constructor
+ *
+ * @method Aggregate
+ * @api public
+ */
+
+Mongoose.prototype.Aggregate = Aggregate;
+
+/**
+ * The Mongoose Collection constructor
+ *
+ * @method Collection
+ * @api public
+ */
+
+Mongoose.prototype.Collection = Collection;
+
+/**
+ * The Mongoose [Connection](#connection_Connection) constructor
+ *
+ * @method Connection
+ * @api public
+ */
+
+Mongoose.prototype.Connection = Connection;
+
+/**
+ * The Mongoose version
+ *
+ * @property version
+ * @api public
+ */
+
+Mongoose.prototype.version = pkg.version;
+
+/**
+ * The Mongoose constructor
+ *
+ * The exports of the mongoose module is an instance of this class.
+ *
+ * ####Example:
+ *
+ * var mongoose = require('mongoose');
+ * var mongoose2 = new mongoose.Mongoose();
+ *
+ * @method Mongoose
+ * @api public
+ */
+
+Mongoose.prototype.Mongoose = Mongoose;
+
+/**
+ * The Mongoose [Schema](#schema_Schema) constructor
+ *
+ * ####Example:
+ *
+ * var mongoose = require('mongoose');
+ * var Schema = mongoose.Schema;
+ * var CatSchema = new Schema(..);
+ *
+ * @method Schema
+ * @api public
+ */
+
+Mongoose.prototype.Schema = Schema;
+
+/**
+ * The Mongoose [SchemaType](#schematype_SchemaType) constructor
+ *
+ * @method SchemaType
+ * @api public
+ */
+
+Mongoose.prototype.SchemaType = SchemaType;
+
+/**
+ * The various Mongoose SchemaTypes.
+ *
+ * ####Note:
+ *
+ * _Alias of mongoose.Schema.Types for backwards compatibility._
+ *
+ * @property SchemaTypes
+ * @see Schema.SchemaTypes #schema_Schema.Types
+ * @api public
+ */
+
+Mongoose.prototype.SchemaTypes = Schema.Types;
+
+/**
+ * The Mongoose [VirtualType](#virtualtype_VirtualType) constructor
+ *
+ * @method VirtualType
+ * @api public
+ */
+
+Mongoose.prototype.VirtualType = VirtualType;
+
+/**
+ * The various Mongoose Types.
+ *
+ * ####Example:
+ *
+ * var mongoose = require('mongoose');
+ * var array = mongoose.Types.Array;
+ *
+ * ####Types:
+ *
+ * - [ObjectId](#types-objectid-js)
+ * - [Buffer](#types-buffer-js)
+ * - [SubDocument](#types-embedded-js)
+ * - [Array](#types-array-js)
+ * - [DocumentArray](#types-documentarray-js)
+ *
+ * Using this exposed access to the `ObjectId` type, we can construct ids on demand.
+ *
+ * var ObjectId = mongoose.Types.ObjectId;
+ * var id1 = new ObjectId;
+ *
+ * @property Types
+ * @api public
+ */
+
+Mongoose.prototype.Types = Types;
+
+/**
+ * The Mongoose [Query](#query_Query) constructor.
+ *
+ * @method Query
+ * @api public
+ */
+
+Mongoose.prototype.Query = Query;
+
+/**
+ * The Mongoose [Promise](#promise_Promise) constructor.
+ *
+ * @method Promise
+ * @api public
+ */
+
+Object.defineProperty(Mongoose.prototype, 'Promise', {
+ get: function() {
+ return PromiseProvider.get();
+ },
+ set: function(lib) {
+ PromiseProvider.set(lib);
+ }
+});
+
+/**
+ * Storage layer for mongoose promises
+ *
+ * @method PromiseProvider
+ * @api public
+ */
+
+Mongoose.prototype.PromiseProvider = PromiseProvider;
+
+/**
+ * The Mongoose [Model](#model_Model) constructor.
+ *
+ * @method Model
+ * @api public
+ */
+
+Mongoose.prototype.Model = Model;
+
+/**
+ * The Mongoose [Document](#document-js) constructor.
+ *
+ * @method Document
+ * @api public
+ */
+
+Mongoose.prototype.Document = Document;
+
+/**
+ * The Mongoose DocumentProvider constructor.
+ *
+ * @method DocumentProvider
+ * @api public
+ */
+
+Mongoose.prototype.DocumentProvider = require('./document_provider');
+
+/**
+ * The [MongooseError](#error_MongooseError) constructor.
+ *
+ * @method Error
+ * @api public
+ */
+
+Mongoose.prototype.Error = require('./error');
+
+/**
+ * The Mongoose CastError constructor
+ *
+ * @method CastError
+ * @param {String} type The name of the type
+ * @param {Any} value The value that failed to cast
+ * @param {String} path The path `a.b.c` in the doc where this cast error occurred
+ * @param {Error} [reason] The original error that was thrown
+ * @api public
+ */
+
+Mongoose.prototype.CastError = require('./error/cast');
+
+/**
+ * The [node-mongodb-native](https://github.com/mongodb/node-mongodb-native) driver Mongoose uses.
+ *
+ * @property mongo
+ * @api public
+ */
+
+Mongoose.prototype.mongo = require('mongodb');
+
+/**
+ * The [mquery](https://github.com/aheckmann/mquery) query builder Mongoose uses.
+ *
+ * @property mquery
+ * @api public
+ */
+
+Mongoose.prototype.mquery = require('mquery');
+
+/**
+ * Wraps the given Mongoose instance into a thenable (pseudo-promise). This
+ * is so `connect()` and `disconnect()` can return a thenable while maintaining
+ * backwards compatibility.
+ *
+ * @api private
+ */
+
+function MongooseThenable(mongoose, promise) {
+ var _this = this;
+ for (var key in mongoose) {
+ if (typeof mongoose[key] === 'function' && mongoose[key].$hasSideEffects) {
+ (function(key) {
+ _this[key] = function() {
+ return mongoose[key].apply(mongoose, arguments);
+ };
+ })(key);
+ } else if (['connection', 'connections'].indexOf(key) !== -1) {
+ _this[key] = mongoose[key];
+ }
+ }
+ this.$opPromise = promise;
+}
+
+MongooseThenable.prototype = new Mongoose;
+
+/**
+ * Ability to use mongoose object as a pseudo-promise so `.connect().then()`
+ * and `.disconnect().then()` are viable.
+ *
+ * @param {Function} onFulfilled
+ * @param {Function} onRejected
+ * @return {Promise}
+ * @api private
+ */
+
+MongooseThenable.prototype.then = function(onFulfilled, onRejected) {
+ var Promise = PromiseProvider.get();
+ if (!this.$opPromise) {
+ return new Promise.ES6(function(resolve, reject) {
+ reject(new Error('Can only call `.then()` if connect() or disconnect() ' +
+ 'has been called'));
+ }).then(onFulfilled, onRejected);
+ }
+ this.$opPromise.$hasHandler = true;
+ return this.$opPromise.then(onFulfilled, onRejected);
+};
+
+/**
+ * Ability to use mongoose object as a pseudo-promise so `.connect().then()`
+ * and `.disconnect().then()` are viable.
+ *
+ * @param {Function} onFulfilled
+ * @param {Function} onRejected
+ * @return {Promise}
+ * @api private
+ */
+
+MongooseThenable.prototype.catch = function(onRejected) {
+ return this.then(null, onRejected);
+};
+
+/*!
+ * The exports object is an instance of Mongoose.
+ *
+ * @api public
+ */
+
+var mongoose = module.exports = exports = new Mongoose;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/internal.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/internal.js
new file mode 100644
index 0000000..edf3338
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/internal.js
@@ -0,0 +1,31 @@
+/*!
+ * Dependencies
+ */
+
+var StateMachine = require('./statemachine');
+var ActiveRoster = StateMachine.ctor('require', 'modify', 'init', 'default', 'ignore');
+
+module.exports = exports = InternalCache;
+
+function InternalCache() {
+ this.strictMode = undefined;
+ this.selected = undefined;
+ this.shardval = undefined;
+ this.saveError = undefined;
+ this.validationError = undefined;
+ this.adhocPaths = undefined;
+ this.removing = undefined;
+ this.inserting = undefined;
+ this.version = undefined;
+ this.getters = {};
+ this._id = undefined;
+ this.populate = undefined; // what we want to populate in this doc
+ this.populated = undefined;// the _ids that have been populated
+ this.wasPopulated = false; // if this doc was the result of a population
+ this.scope = undefined;
+ this.activePaths = new ActiveRoster;
+
+ // embedded docs
+ this.ownerDocument = undefined;
+ this.fullPath = undefined;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/model.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/model.js
new file mode 100644
index 0000000..4a7cbc4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/model.js
@@ -0,0 +1,3414 @@
+/*!
+ * Module dependencies.
+ */
+
+var Document = require('./document');
+var MongooseError = require('./error');
+var VersionError = MongooseError.VersionError;
+var DivergentArrayError = MongooseError.DivergentArrayError;
+var Query = require('./query');
+var Aggregate = require('./aggregate');
+var Schema = require('./schema');
+var utils = require('./utils');
+var hasOwnProperty = utils.object.hasOwnProperty;
+var isMongooseObject = utils.isMongooseObject;
+var EventEmitter = require('events').EventEmitter;
+var MongooseArray = require('./types/array');
+var util = require('util');
+var tick = utils.tick;
+
+var parallel = require('async/parallel');
+var PromiseProvider = require('./promise_provider');
+
+var VERSION_WHERE = 1,
+ VERSION_INC = 2,
+ VERSION_ALL = VERSION_WHERE | VERSION_INC;
+
+var POJO_TO_OBJECT_OPTIONS = {
+ depopulate: true,
+ transform: false,
+ _skipDepopulateTopLevel: true
+};
+
+/**
+ * Model constructor
+ *
+ * Provides the interface to MongoDB collections as well as creates document instances.
+ *
+ * @param {Object} doc values with which to create the document
+ * @inherits Document http://mongoosejs.com/docs/api.html#document-js
+ * @event `error`: If listening to this event, it is emitted when a document was saved without passing a callback and an `error` occurred. If not listening, the event bubbles to the connection used to create this Model.
+ * @event `index`: Emitted after `Model#ensureIndexes` completes. If an error occurred it is passed with the event.
+ * @event `index-single-start`: Emitted when an individual index starts within `Model#ensureIndexes`. The fields and options being used to build the index are also passed with the event.
+ * @event `index-single-done`: Emitted when an individual index finishes within `Model#ensureIndexes`. If an error occurred it is passed with the event. The fields, options, and index name are also passed.
+ * @api public
+ */
+
+function Model(doc, fields, skipId) {
+ Document.call(this, doc, fields, skipId);
+}
+
+/*!
+ * Inherits from Document.
+ *
+ * All Model.prototype features are available on
+ * top level (non-sub) documents.
+ */
+
+Model.prototype.__proto__ = Document.prototype;
+
+/**
+ * Connection the model uses.
+ *
+ * @api public
+ * @property db
+ */
+
+Model.prototype.db;
+
+/**
+ * Collection the model uses.
+ *
+ * @api public
+ * @property collection
+ */
+
+Model.prototype.collection;
+
+/**
+ * The name of the model
+ *
+ * @api public
+ * @property modelName
+ */
+
+Model.prototype.modelName;
+
+/**
+ * If this is a discriminator model, `baseModelName` is the name of
+ * the base model.
+ *
+ * @api public
+ * @property baseModelName
+ */
+
+Model.prototype.baseModelName;
+
+Model.prototype.$__handleSave = function(options, callback) {
+ var _this = this;
+ if (!options.safe && this.schema.options.safe) {
+ options.safe = this.schema.options.safe;
+ }
+ if (typeof options.safe === 'boolean') {
+ options.safe = null;
+ }
+
+ if (this.isNew) {
+ // send entire doc
+ var toObjectOptions = {};
+
+ toObjectOptions.retainKeyOrder = this.schema.options.retainKeyOrder;
+ toObjectOptions.depopulate = 1;
+ toObjectOptions._skipDepopulateTopLevel = true;
+ toObjectOptions.transform = false;
+
+ var obj = this.toObject(toObjectOptions);
+
+ if (!utils.object.hasOwnProperty(obj || {}, '_id')) {
+ // documents must have an _id else mongoose won't know
+ // what to update later if more changes are made. the user
+ // wouldn't know what _id was generated by mongodb either
+ // nor would the ObjectId generated my mongodb necessarily
+ // match the schema definition.
+ setTimeout(function() {
+ callback(new Error('document must have an _id before saving'));
+ }, 0);
+ return;
+ }
+
+ this.$__version(true, obj);
+ this.collection.insert(obj, options.safe, function(err, ret) {
+ if (err) {
+ _this.isNew = true;
+ _this.emit('isNew', true);
+
+ callback(err);
+ return;
+ }
+
+ callback(null, ret);
+ });
+ this.$__reset();
+ this.isNew = false;
+ this.emit('isNew', false);
+ // Make it possible to retry the insert
+ this.$__.inserting = true;
+ } else {
+ // Make sure we don't treat it as a new object on error,
+ // since it already exists
+ this.$__.inserting = false;
+
+ var delta = this.$__delta();
+
+ if (delta) {
+ if (delta instanceof Error) {
+ callback(delta);
+ return;
+ }
+
+ var where = this.$__where(delta[0]);
+
+ if (where instanceof Error) {
+ callback(where);
+ return;
+ }
+
+ this.collection.update(where, delta[1], options.safe, function(err, ret) {
+ if (err) {
+ callback(err);
+ return;
+ }
+ callback(null, ret);
+ });
+ } else {
+ this.$__reset();
+ callback();
+ return;
+ }
+
+ this.emit('isNew', false);
+ }
+};
+
+/*!
+ * ignore
+ */
+
+Model.prototype.$__save = function(options, callback) {
+ var _this = this;
+
+ _this.$__handleSave(options, function(error, result) {
+ if (error) {
+ return _this.schema.s.hooks.execPost('save:error', _this, [_this], { error: error }, function(error) {
+ callback(error);
+ });
+ }
+
+ _this.$__reset();
+ _this.$__storeShard();
+
+ var numAffected = 0;
+ if (result) {
+ if (Array.isArray(result)) {
+ numAffected = result.length;
+ } else if (result.result && result.result.n !== undefined) {
+ numAffected = result.result.n;
+ } else if (result.result && result.result.nModified !== undefined) {
+ numAffected = result.result.nModified;
+ } else {
+ numAffected = result;
+ }
+ }
+
+ // was this an update that required a version bump?
+ if (_this.$__.version && !_this.$__.inserting) {
+ var doIncrement = VERSION_INC === (VERSION_INC & _this.$__.version);
+ _this.$__.version = undefined;
+
+ if (numAffected <= 0) {
+ // the update failed. pass an error back
+ var err = new VersionError(_this);
+ return callback(err);
+ }
+
+ // increment version if was successful
+ if (doIncrement) {
+ var key = _this.schema.options.versionKey;
+ var version = _this.getValue(key) | 0;
+ _this.setValue(key, version + 1);
+ }
+ }
+
+ _this.emit('save', _this, numAffected);
+ callback(null, _this, numAffected);
+ });
+};
+
+/**
+ * Saves this document.
+ *
+ * ####Example:
+ *
+ * product.sold = Date.now();
+ * product.save(function (err, product, numAffected) {
+ * if (err) ..
+ * })
+ *
+ * The callback will receive three parameters
+ *
+ * 1. `err` if an error occurred
+ * 2. `product` which is the saved `product`
+ * 3. `numAffected` will be 1 when the document was successfully persisted to MongoDB, otherwise 0. Unless you tweak mongoose's internals, you don't need to worry about checking this parameter for errors - checking `err` is sufficient to make sure your document was properly saved.
+ *
+ * As an extra measure of flow control, save will return a Promise.
+ * ####Example:
+ * product.save().then(function(product) {
+ * ...
+ * });
+ *
+ * For legacy reasons, mongoose stores object keys in reverse order on initial
+ * save. That is, `{ a: 1, b: 2 }` will be saved as `{ b: 2, a: 1 }` in
+ * MongoDB. To override this behavior, set
+ * [the `toObject.retainKeyOrder` option](http://mongoosejs.com/docs/api.html#document_Document-toObject)
+ * to true on your schema.
+ *
+ * @param {Object} [options] options optional options
+ * @param {Object} [options.safe] overrides [schema's safe option](http://mongoosejs.com//docs/guide.html#safe)
+ * @param {Boolean} [options.validateBeforeSave] set to false to save without validating.
+ * @param {Function} [fn] optional callback
+ * @return {Promise} Promise
+ * @api public
+ * @see middleware http://mongoosejs.com/docs/middleware.html
+ */
+
+Model.prototype.save = function(options, fn) {
+ if (typeof options === 'function') {
+ fn = options;
+ options = undefined;
+ }
+
+ if (!options) {
+ options = {};
+ }
+
+ if (fn) {
+ fn = this.constructor.$wrapCallback(fn);
+ }
+
+ return this.$__save(options, fn);
+};
+
+/*!
+ * Determines whether versioning should be skipped for the given path
+ *
+ * @param {Document} self
+ * @param {String} path
+ * @return {Boolean} true if versioning should be skipped for the given path
+ */
+function shouldSkipVersioning(self, path) {
+ var skipVersioning = self.schema.options.skipVersioning;
+ if (!skipVersioning) return false;
+
+ // Remove any array indexes from the path
+ path = path.replace(/\.\d+\./, '.');
+
+ return skipVersioning[path];
+}
+
+/*!
+ * Apply the operation to the delta (update) clause as
+ * well as track versioning for our where clause.
+ *
+ * @param {Document} self
+ * @param {Object} where
+ * @param {Object} delta
+ * @param {Object} data
+ * @param {Mixed} val
+ * @param {String} [operation]
+ */
+
+function operand(self, where, delta, data, val, op) {
+ // delta
+ op || (op = '$set');
+ if (!delta[op]) delta[op] = {};
+ delta[op][data.path] = val;
+
+ // disabled versioning?
+ if (self.schema.options.versionKey === false) return;
+
+ // path excluded from versioning?
+ if (shouldSkipVersioning(self, data.path)) return;
+
+ // already marked for versioning?
+ if (VERSION_ALL === (VERSION_ALL & self.$__.version)) return;
+
+ switch (op) {
+ case '$set':
+ case '$unset':
+ case '$pop':
+ case '$pull':
+ case '$pullAll':
+ case '$push':
+ case '$pushAll':
+ case '$addToSet':
+ break;
+ default:
+ // nothing to do
+ return;
+ }
+
+ // ensure updates sent with positional notation are
+ // editing the correct array element.
+ // only increment the version if an array position changes.
+ // modifying elements of an array is ok if position does not change.
+
+ if (op === '$push' || op === '$pushAll' || op === '$addToSet') {
+ self.$__.version = VERSION_INC;
+ } else if (/^\$p/.test(op)) {
+ // potentially changing array positions
+ self.increment();
+ } else if (Array.isArray(val)) {
+ // $set an array
+ self.increment();
+ } else if (/\.\d+\.|\.\d+$/.test(data.path)) {
+ // now handling $set, $unset
+ // subpath of array
+ self.$__.version = VERSION_WHERE;
+ }
+}
+
+/*!
+ * Compiles an update and where clause for a `val` with _atomics.
+ *
+ * @param {Document} self
+ * @param {Object} where
+ * @param {Object} delta
+ * @param {Object} data
+ * @param {Array} value
+ */
+
+function handleAtomics(self, where, delta, data, value) {
+ if (delta.$set && delta.$set[data.path]) {
+ // $set has precedence over other atomics
+ return;
+ }
+
+ if (typeof value.$__getAtomics === 'function') {
+ value.$__getAtomics().forEach(function(atomic) {
+ var op = atomic[0];
+ var val = atomic[1];
+ if (self.schema.options.usePushEach && op === '$pushAll') {
+ op = '$push';
+ val = { $each: val };
+ }
+ operand(self, where, delta, data, val, op);
+ });
+ return;
+ }
+
+ // legacy support for plugins
+
+ var atomics = value._atomics,
+ ops = Object.keys(atomics),
+ i = ops.length,
+ val,
+ op;
+
+ if (i === 0) {
+ // $set
+
+ if (isMongooseObject(value)) {
+ value = value.toObject({depopulate: 1, _isNested: true});
+ } else if (value.valueOf) {
+ value = value.valueOf();
+ }
+
+ return operand(self, where, delta, data, value);
+ }
+
+ function iter(mem) {
+ return isMongooseObject(mem)
+ ? mem.toObject({depopulate: 1, _isNested: true})
+ : mem;
+ }
+
+ while (i--) {
+ op = ops[i];
+ val = atomics[op];
+
+ if (isMongooseObject(val)) {
+ val = val.toObject({depopulate: true, transform: false, _isNested: true});
+ } else if (Array.isArray(val)) {
+ val = val.map(iter);
+ } else if (val.valueOf) {
+ val = val.valueOf();
+ }
+
+ if (op === '$addToSet') {
+ val = {$each: val};
+ }
+
+ operand(self, where, delta, data, val, op);
+ }
+}
+
+/**
+ * Produces a special query document of the modified properties used in updates.
+ *
+ * @api private
+ * @method $__delta
+ * @memberOf Model
+ */
+
+Model.prototype.$__delta = function() {
+ var dirty = this.$__dirty();
+ if (!dirty.length && VERSION_ALL !== this.$__.version) return;
+
+ var where = {},
+ delta = {},
+ len = dirty.length,
+ divergent = [],
+ d = 0;
+
+ where._id = this._doc._id;
+ if (where._id.toObject) {
+ where._id = where._id.toObject({ transform: false, depopulate: true });
+ }
+
+ for (; d < len; ++d) {
+ var data = dirty[d];
+ var value = data.value;
+
+ var match = checkDivergentArray(this, data.path, value);
+ if (match) {
+ divergent.push(match);
+ continue;
+ }
+
+ var pop = this.populated(data.path, true);
+ if (!pop && this.$__.selected) {
+ // If any array was selected using an $elemMatch projection, we alter the path and where clause
+ // NOTE: MongoDB only supports projected $elemMatch on top level array.
+ var pathSplit = data.path.split('.');
+ var top = pathSplit[0];
+ if (this.$__.selected[top] && this.$__.selected[top].$elemMatch) {
+ // If the selected array entry was modified
+ if (pathSplit.length > 1 && pathSplit[1] == 0 && typeof where[top] === 'undefined') {
+ where[top] = this.$__.selected[top];
+ pathSplit[1] = '$';
+ data.path = pathSplit.join('.');
+ }
+ // if the selected array was modified in any other way throw an error
+ else {
+ divergent.push(data.path);
+ continue;
+ }
+ }
+ }
+
+ if (divergent.length) continue;
+
+ if (undefined === value) {
+ operand(this, where, delta, data, 1, '$unset');
+ } else if (value === null) {
+ operand(this, where, delta, data, null);
+ } else if (value._path && value._atomics) {
+ // arrays and other custom types (support plugins etc)
+ handleAtomics(this, where, delta, data, value);
+ } else if (value._path && Buffer.isBuffer(value)) {
+ // MongooseBuffer
+ value = value.toObject();
+ operand(this, where, delta, data, value);
+ } else {
+ value = utils.clone(value, {depopulate: 1, _isNested: true});
+ operand(this, where, delta, data, value);
+ }
+ }
+
+ if (divergent.length) {
+ return new DivergentArrayError(divergent);
+ }
+
+ if (this.$__.version) {
+ this.$__version(where, delta);
+ }
+
+ return [where, delta];
+};
+
+/*!
+ * Determine if array was populated with some form of filter and is now
+ * being updated in a manner which could overwrite data unintentionally.
+ *
+ * @see https://github.com/Automattic/mongoose/issues/1334
+ * @param {Document} doc
+ * @param {String} path
+ * @return {String|undefined}
+ */
+
+function checkDivergentArray(doc, path, array) {
+ // see if we populated this path
+ var pop = doc.populated(path, true);
+
+ if (!pop && doc.$__.selected) {
+ // If any array was selected using an $elemMatch projection, we deny the update.
+ // NOTE: MongoDB only supports projected $elemMatch on top level array.
+ var top = path.split('.')[0];
+ if (doc.$__.selected[top + '.$']) {
+ return top;
+ }
+ }
+
+ if (!(pop && array && array.isMongooseArray)) return;
+
+ // If the array was populated using options that prevented all
+ // documents from being returned (match, skip, limit) or they
+ // deselected the _id field, $pop and $set of the array are
+ // not safe operations. If _id was deselected, we do not know
+ // how to remove elements. $pop will pop off the _id from the end
+ // of the array in the db which is not guaranteed to be the
+ // same as the last element we have here. $set of the entire array
+ // would be similarily destructive as we never received all
+ // elements of the array and potentially would overwrite data.
+ var check = pop.options.match ||
+ pop.options.options && hasOwnProperty(pop.options.options, 'limit') || // 0 is not permitted
+ pop.options.options && pop.options.options.skip || // 0 is permitted
+ pop.options.select && // deselected _id?
+ (pop.options.select._id === 0 ||
+ /\s?-_id\s?/.test(pop.options.select));
+
+ if (check) {
+ var atomics = array._atomics;
+ if (Object.keys(atomics).length === 0 || atomics.$set || atomics.$pop) {
+ return path;
+ }
+ }
+}
+
+/**
+ * Appends versioning to the where and update clauses.
+ *
+ * @api private
+ * @method $__version
+ * @memberOf Model
+ */
+
+Model.prototype.$__version = function(where, delta) {
+ var key = this.schema.options.versionKey;
+
+ if (where === true) {
+ // this is an insert
+ if (key) this.setValue(key, delta[key] = 0);
+ return;
+ }
+
+ // updates
+
+ // only apply versioning if our versionKey was selected. else
+ // there is no way to select the correct version. we could fail
+ // fast here and force them to include the versionKey but
+ // thats a bit intrusive. can we do this automatically?
+ if (!this.isSelected(key)) {
+ return;
+ }
+
+ // $push $addToSet don't need the where clause set
+ if (VERSION_WHERE === (VERSION_WHERE & this.$__.version)) {
+ where[key] = this.getValue(key);
+ }
+
+ if (VERSION_INC === (VERSION_INC & this.$__.version)) {
+ if (!delta.$set || typeof delta.$set[key] === 'undefined') {
+ delta.$inc || (delta.$inc = {});
+ delta.$inc[key] = 1;
+ }
+ }
+};
+
+/**
+ * Signal that we desire an increment of this documents version.
+ *
+ * ####Example:
+ *
+ * Model.findById(id, function (err, doc) {
+ * doc.increment();
+ * doc.save(function (err) { .. })
+ * })
+ *
+ * @see versionKeys http://mongoosejs.com/docs/guide.html#versionKey
+ * @api public
+ */
+
+Model.prototype.increment = function increment() {
+ this.$__.version = VERSION_ALL;
+ return this;
+};
+
+/**
+ * Returns a query object which applies shardkeys if they exist.
+ *
+ * @api private
+ * @method $__where
+ * @memberOf Model
+ */
+
+Model.prototype.$__where = function _where(where) {
+ where || (where = {});
+
+ var paths,
+ len;
+
+ if (!where._id) {
+ where._id = this._doc._id;
+ }
+
+ if (this.$__.shardval) {
+ paths = Object.keys(this.$__.shardval);
+ len = paths.length;
+
+ for (var i = 0; i < len; ++i) {
+ where[paths[i]] = this.$__.shardval[paths[i]];
+ }
+ }
+
+ if (this._doc._id == null) {
+ return new Error('No _id found on document!');
+ }
+
+ return where;
+};
+
+/**
+ * Removes this document from the db.
+ *
+ * ####Example:
+ * product.remove(function (err, product) {
+ * if (err) return handleError(err);
+ * Product.findById(product._id, function (err, product) {
+ * console.log(product) // null
+ * })
+ * })
+ *
+ *
+ * As an extra measure of flow control, remove will return a Promise (bound to `fn` if passed) so it could be chained, or hooked to recive errors
+ *
+ * ####Example:
+ * product.remove().then(function (product) {
+ * ...
+ * }).onRejected(function (err) {
+ * assert.ok(err)
+ * })
+ *
+ * @param {function(err,product)} [fn] optional callback
+ * @return {Promise} Promise
+ * @api public
+ */
+
+Model.prototype.remove = function remove(options, fn) {
+ if (typeof options === 'function') {
+ fn = options;
+ options = undefined;
+ }
+
+ if (!options) {
+ options = {};
+ }
+
+ if (this.$__.removing) {
+ if (fn) {
+ this.$__.removing.then(
+ function(res) { fn(null, res); },
+ function(err) { fn(err); });
+ }
+ return this;
+ }
+
+ var _this = this;
+ var Promise = PromiseProvider.get();
+
+ if (fn) {
+ fn = this.constructor.$wrapCallback(fn);
+ }
+
+ this.$__.removing = new Promise.ES6(function(resolve, reject) {
+ var where = _this.$__where();
+ if (where instanceof Error) {
+ reject(where);
+ fn && fn(where);
+ return;
+ }
+
+ if (!options.safe && _this.schema.options.safe) {
+ options.safe = _this.schema.options.safe;
+ }
+
+ _this.collection.remove(where, options, function(err) {
+ if (!err) {
+ _this.emit('remove', _this);
+ resolve(_this);
+ fn && fn(null, _this);
+ return;
+ }
+ reject(err);
+ fn && fn(err);
+ });
+ });
+ return this.$__.removing;
+};
+
+/**
+ * Returns another Model instance.
+ *
+ * ####Example:
+ *
+ * var doc = new Tank;
+ * doc.model('User').findById(id, callback);
+ *
+ * @param {String} name model name
+ * @api public
+ */
+
+Model.prototype.model = function model(name) {
+ return this.db.model(name);
+};
+
+/**
+ * Adds a discriminator type.
+ *
+ * ####Example:
+ *
+ * function BaseSchema() {
+ * Schema.apply(this, arguments);
+ *
+ * this.add({
+ * name: String,
+ * createdAt: Date
+ * });
+ * }
+ * util.inherits(BaseSchema, Schema);
+ *
+ * var PersonSchema = new BaseSchema();
+ * var BossSchema = new BaseSchema({ department: String });
+ *
+ * var Person = mongoose.model('Person', PersonSchema);
+ * var Boss = Person.discriminator('Boss', BossSchema);
+ *
+ * @param {String} name discriminator model name
+ * @param {Schema} schema discriminator model schema
+ * @api public
+ */
+
+Model.discriminator = function discriminator(name, schema) {
+ var CUSTOMIZABLE_DISCRIMINATOR_OPTIONS = {
+ toJSON: true,
+ toObject: true,
+ _id: true,
+ id: true
+ };
+
+ if (!(schema && schema.instanceOfSchema)) {
+ throw new Error('You must pass a valid discriminator Schema');
+ }
+
+ if (this.schema.discriminatorMapping && !this.schema.discriminatorMapping.isRoot) {
+ throw new Error('Discriminator "' + name +
+ '" can only be a discriminator of the root model');
+ }
+
+ var key = this.schema.options.discriminatorKey;
+ if (schema.path(key)) {
+ throw new Error('Discriminator "' + name +
+ '" cannot have field with name "' + key + '"');
+ }
+
+ function merge(schema, baseSchema) {
+ utils.merge(schema, baseSchema);
+
+ var obj = {};
+ obj[key] = {
+ default: name,
+ set: function(newName) {
+ if (newName === name) {
+ return name;
+ }
+ throw new Error('Can\'t set discriminator key "' + key + '"');
+ }
+ };
+ obj[key][schema.options.typeKey] = String;
+ schema.add(obj);
+ schema.discriminatorMapping = {key: key, value: name, isRoot: false};
+
+ if (baseSchema.options.collection) {
+ schema.options.collection = baseSchema.options.collection;
+ }
+
+ var toJSON = schema.options.toJSON;
+ var toObject = schema.options.toObject;
+ var _id = schema.options._id;
+ var id = schema.options.id;
+
+ var keys = Object.keys(schema.options);
+
+ for (var i = 0; i < keys.length; ++i) {
+ var _key = keys[i];
+ if (!CUSTOMIZABLE_DISCRIMINATOR_OPTIONS[_key]) {
+ if (!utils.deepEqual(schema.options[_key], baseSchema.options[_key])) {
+ throw new Error('Can\'t customize discriminator option ' + _key +
+ ' (can only modify ' +
+ Object.keys(CUSTOMIZABLE_DISCRIMINATOR_OPTIONS).join(', ') +
+ ')');
+ }
+ }
+ }
+
+ schema.options = utils.clone(baseSchema.options);
+ if (toJSON) schema.options.toJSON = toJSON;
+ if (toObject) schema.options.toObject = toObject;
+ if (typeof _id !== 'undefined') {
+ schema.options._id = _id;
+ }
+ schema.options.id = id;
+
+ schema.callQueue = baseSchema.callQueue.concat(schema.callQueue.slice(schema._defaultMiddleware.length));
+ schema._requiredpaths = undefined; // reset just in case Schema#requiredPaths() was called on either schema
+ }
+
+ // merges base schema into new discriminator schema and sets new type field.
+ merge(schema, this.schema);
+
+ if (!this.discriminators) {
+ this.discriminators = {};
+ }
+
+ if (!this.schema.discriminatorMapping) {
+ this.schema.discriminatorMapping = {key: key, value: null, isRoot: true};
+ }
+
+ if (this.discriminators[name]) {
+ throw new Error('Discriminator with name "' + name + '" already exists');
+ }
+ if (this.db.models[name]) {
+ throw new MongooseError.OverwriteModelError(name);
+ }
+
+ this.discriminators[name] = this.db.model(name, schema, this.collection.name);
+ this.discriminators[name].prototype.__proto__ = this.prototype;
+ Object.defineProperty(this.discriminators[name], 'baseModelName', {
+ value: this.modelName,
+ configurable: true,
+ writable: false
+ });
+
+ // apply methods and statics
+ applyMethods(this.discriminators[name], schema);
+ applyStatics(this.discriminators[name], schema);
+
+ return this.discriminators[name];
+};
+
+// Model (class) features
+
+/*!
+ * Give the constructor the ability to emit events.
+ */
+
+for (var i in EventEmitter.prototype) {
+ Model[i] = EventEmitter.prototype[i];
+}
+
+/**
+ * Called when the model compiles.
+ *
+ * @api private
+ */
+
+Model.init = function init() {
+ if ((this.schema.options.autoIndex) ||
+ (this.schema.options.autoIndex === null && this.db.config.autoIndex)) {
+ this.ensureIndexes({ __noPromise: true, _automatic: true });
+ }
+
+ this.schema.emit('init', this);
+};
+
+/**
+ * Sends `ensureIndex` commands to mongo for each index declared in the schema.
+ *
+ * ####Example:
+ *
+ * Event.ensureIndexes(function (err) {
+ * if (err) return handleError(err);
+ * });
+ *
+ * After completion, an `index` event is emitted on this `Model` passing an error if one occurred.
+ *
+ * ####Example:
+ *
+ * var eventSchema = new Schema({ thing: { type: 'string', unique: true }})
+ * var Event = mongoose.model('Event', eventSchema);
+ *
+ * Event.on('index', function (err) {
+ * if (err) console.error(err); // error occurred during index creation
+ * })
+ *
+ * _NOTE: It is not recommended that you run this in production. Index creation may impact database performance depending on your load. Use with caution._
+ *
+ * The `ensureIndex` commands are not sent in parallel. This is to avoid the `MongoError: cannot add index with a background operation in progress` error. See [this ticket](https://github.com/Automattic/mongoose/issues/1365) for more information.
+ *
+ * @param {Object} [options] internal options
+ * @param {Function} [cb] optional callback
+ * @return {Promise}
+ * @api public
+ */
+
+Model.ensureIndexes = function ensureIndexes(options, callback) {
+ if (typeof options === 'function') {
+ callback = options;
+ options = null;
+ }
+
+ if (options && options.__noPromise) {
+ _ensureIndexes(this, options, callback);
+ return;
+ }
+
+ if (callback) {
+ callback = this.$wrapCallback(callback);
+ }
+
+ var _this = this;
+ var Promise = PromiseProvider.get();
+ return new Promise.ES6(function(resolve, reject) {
+ _ensureIndexes(_this, options || {}, function(error) {
+ if (error) {
+ callback && callback(error);
+ reject(error);
+ }
+ callback && callback();
+ resolve();
+ });
+ });
+};
+
+function _ensureIndexes(model, options, callback) {
+ var indexes = model.schema.indexes();
+ if (!indexes.length) {
+ setImmediate(function() {
+ callback && callback();
+ });
+ return;
+ }
+ // Indexes are created one-by-one to support how MongoDB < 2.4 deals
+ // with background indexes.
+
+ var done = function(err) {
+ if (err && model.schema.options.emitIndexErrors) {
+ model.emit('error', err);
+ }
+ model.emit('index', err);
+ callback && callback(err);
+ };
+
+ var indexSingleDone = function(err, fields, options, name) {
+ model.emit('index-single-done', err, fields, options, name);
+ };
+ var indexSingleStart = function(fields, options) {
+ model.emit('index-single-start', fields, options);
+ };
+
+ var create = function() {
+ var index = indexes.shift();
+ if (!index) return done();
+
+ var indexFields = index[0];
+ var options = index[1];
+ _handleSafe(options);
+
+ indexSingleStart(indexFields, options);
+
+ model.collection.ensureIndex(indexFields, options, tick(function(err, name) {
+ indexSingleDone(err, indexFields, options, name);
+ if (err) {
+ return done(err);
+ }
+ create();
+ }));
+ };
+
+ setImmediate(function() {
+ // If buffering is off, do this manually.
+ if (options._automatic && !model.collection.collection) {
+ model.collection.addQueue(create, []);
+ } else {
+ create();
+ }
+ });
+}
+
+function _handleSafe(options) {
+ if (options.safe) {
+ if (typeof options.safe === 'boolean') {
+ options.w = options.safe;
+ delete options.safe;
+ }
+ if (typeof options.safe === 'object') {
+ options.w = options.safe.w;
+ options.j = options.safe.j;
+ options.wtimeout = options.safe.wtimeout;
+ delete options.safe;
+ }
+ }
+}
+
+/**
+ * Schema the model uses.
+ *
+ * @property schema
+ * @receiver Model
+ * @api public
+ */
+
+Model.schema;
+
+/*!
+ * Connection instance the model uses.
+ *
+ * @property db
+ * @receiver Model
+ * @api public
+ */
+
+Model.db;
+
+/*!
+ * Collection the model uses.
+ *
+ * @property collection
+ * @receiver Model
+ * @api public
+ */
+
+Model.collection;
+
+/**
+ * Base Mongoose instance the model uses.
+ *
+ * @property base
+ * @receiver Model
+ * @api public
+ */
+
+Model.base;
+
+/**
+ * Registered discriminators for this model.
+ *
+ * @property discriminators
+ * @receiver Model
+ * @api public
+ */
+
+Model.discriminators;
+
+/**
+ * Removes documents from the collection.
+ *
+ * ####Example:
+ *
+ * Comment.remove({ title: 'baby born from alien father' }, function (err) {
+ *
+ * });
+ *
+ * ####Note:
+ *
+ * To remove documents without waiting for a response from MongoDB, do not pass a `callback`, then call `exec` on the returned [Query](#query-js):
+ *
+ * var query = Comment.remove({ _id: id });
+ * query.exec();
+ *
+ * ####Note:
+ *
+ * This method sends a remove command directly to MongoDB, no Mongoose documents are involved. Because no Mongoose documents are involved, _no middleware (hooks) are executed_.
+ *
+ * @param {Object} conditions
+ * @param {Function} [callback]
+ * @return {Query}
+ * @api public
+ */
+
+Model.remove = function remove(conditions, callback) {
+ if (typeof conditions === 'function') {
+ callback = conditions;
+ conditions = {};
+ }
+
+ // get the mongodb collection object
+ var mq = new this.Query(conditions, {}, this, this.collection);
+
+ if (callback) {
+ callback = this.$wrapCallback(callback);
+ }
+
+ return mq.remove(callback);
+};
+
+/**
+ * Finds documents
+ *
+ * The `conditions` are cast to their respective SchemaTypes before the command is sent.
+ *
+ * ####Examples:
+ *
+ * // named john and at least 18
+ * MyModel.find({ name: 'john', age: { $gte: 18 }});
+ *
+ * // executes immediately, passing results to callback
+ * MyModel.find({ name: 'john', age: { $gte: 18 }}, function (err, docs) {});
+ *
+ * // name LIKE john and only selecting the "name" and "friends" fields, executing immediately
+ * MyModel.find({ name: /john/i }, 'name friends', function (err, docs) { })
+ *
+ * // passing options
+ * MyModel.find({ name: /john/i }, null, { skip: 10 })
+ *
+ * // passing options and executing immediately
+ * MyModel.find({ name: /john/i }, null, { skip: 10 }, function (err, docs) {});
+ *
+ * // executing a query explicitly
+ * var query = MyModel.find({ name: /john/i }, null, { skip: 10 })
+ * query.exec(function (err, docs) {});
+ *
+ * // using the promise returned from executing a query
+ * var query = MyModel.find({ name: /john/i }, null, { skip: 10 });
+ * var promise = query.exec();
+ * promise.addBack(function (err, docs) {});
+ *
+ * @param {Object} conditions
+ * @param {Object} [projection] optional fields to return (http://bit.ly/1HotzBo)
+ * @param {Object} [options] optional
+ * @param {Function} [callback]
+ * @return {Query}
+ * @see field selection #query_Query-select
+ * @see promise #promise-js
+ * @api public
+ */
+
+Model.find = function find(conditions, projection, options, callback) {
+ if (typeof conditions === 'function') {
+ callback = conditions;
+ conditions = {};
+ projection = null;
+ options = null;
+ } else if (typeof projection === 'function') {
+ callback = projection;
+ projection = null;
+ options = null;
+ } else if (typeof options === 'function') {
+ callback = options;
+ options = null;
+ }
+
+ var mq = new this.Query({}, {}, this, this.collection);
+ mq.select(projection);
+ mq.setOptions(options);
+ if (this.schema.discriminatorMapping && mq.selectedInclusively()) {
+ mq.select(this.schema.options.discriminatorKey);
+ }
+
+ if (callback) {
+ callback = this.$wrapCallback(callback);
+ }
+
+ return mq.find(conditions, callback);
+};
+
+/**
+ * Finds a single document by its _id field. `findById(id)` is almost*
+ * equivalent to `findOne({ _id: id })`. If you want to query by a document's
+ * `_id`, use `findById()` instead of `findOne()`.
+ *
+ * The `id` is cast based on the Schema before sending the command.
+ *
+ * Note: `findById()` triggers `findOne` hooks.
+ *
+ * * Except for how it treats `undefined`. If you use `findOne()`, you'll see
+ * that `findOne(undefined)` and `findOne({ _id: undefined })` are equivalent
+ * to `findOne({})` and return arbitrary documents. However, mongoose
+ * translates `findById(undefined)` into `findOne({ _id: null })`.
+ *
+ * ####Example:
+ *
+ * // find adventure by id and execute immediately
+ * Adventure.findById(id, function (err, adventure) {});
+ *
+ * // same as above
+ * Adventure.findById(id).exec(callback);
+ *
+ * // select only the adventures name and length
+ * Adventure.findById(id, 'name length', function (err, adventure) {});
+ *
+ * // same as above
+ * Adventure.findById(id, 'name length').exec(callback);
+ *
+ * // include all properties except for `length`
+ * Adventure.findById(id, '-length').exec(function (err, adventure) {});
+ *
+ * // passing options (in this case return the raw js objects, not mongoose documents by passing `lean`
+ * Adventure.findById(id, 'name', { lean: true }, function (err, doc) {});
+ *
+ * // same as above
+ * Adventure.findById(id, 'name').lean().exec(function (err, doc) {});
+ *
+ * @param {Object|String|Number} id value of `_id` to query by
+ * @param {Object} [projection] optional fields to return (http://bit.ly/1HotzBo)
+ * @param {Object} [options] optional
+ * @param {Function} [callback]
+ * @return {Query}
+ * @see field selection #query_Query-select
+ * @see lean queries #query_Query-lean
+ * @api public
+ */
+
+Model.findById = function findById(id, projection, options, callback) {
+ if (typeof id === 'undefined') {
+ id = null;
+ }
+
+ if (callback) {
+ callback = this.$wrapCallback(callback);
+ }
+
+ return this.findOne({_id: id}, projection, options, callback);
+};
+
+/**
+ * Finds one document.
+ *
+ * The `conditions` are cast to their respective SchemaTypes before the command is sent.
+ *
+ * *Note:* `conditions` is optional, and if `conditions` is null or undefined,
+ * mongoose will send an empty `findOne` command to MongoDB, which will return
+ * an arbitrary document. If you're querying by `_id`, use `findById()` instead.
+ *
+ * ####Example:
+ *
+ * // find one iphone adventures - iphone adventures??
+ * Adventure.findOne({ type: 'iphone' }, function (err, adventure) {});
+ *
+ * // same as above
+ * Adventure.findOne({ type: 'iphone' }).exec(function (err, adventure) {});
+ *
+ * // select only the adventures name
+ * Adventure.findOne({ type: 'iphone' }, 'name', function (err, adventure) {});
+ *
+ * // same as above
+ * Adventure.findOne({ type: 'iphone' }, 'name').exec(function (err, adventure) {});
+ *
+ * // specify options, in this case lean
+ * Adventure.findOne({ type: 'iphone' }, 'name', { lean: true }, callback);
+ *
+ * // same as above
+ * Adventure.findOne({ type: 'iphone' }, 'name', { lean: true }).exec(callback);
+ *
+ * // chaining findOne queries (same as above)
+ * Adventure.findOne({ type: 'iphone' }).select('name').lean().exec(callback);
+ *
+ * @param {Object} [conditions]
+ * @param {Object} [projection] optional fields to return (http://bit.ly/1HotzBo)
+ * @param {Object} [options] optional
+ * @param {Function} [callback]
+ * @return {Query}
+ * @see field selection #query_Query-select
+ * @see lean queries #query_Query-lean
+ * @api public
+ */
+
+Model.findOne = function findOne(conditions, projection, options, callback) {
+ if (typeof options === 'function') {
+ callback = options;
+ options = null;
+ } else if (typeof projection === 'function') {
+ callback = projection;
+ projection = null;
+ options = null;
+ } else if (typeof conditions === 'function') {
+ callback = conditions;
+ conditions = {};
+ projection = null;
+ options = null;
+ }
+
+ // get the mongodb collection object
+ var mq = new this.Query({}, {}, this, this.collection);
+ mq.select(projection);
+ mq.setOptions(options);
+ if (this.schema.discriminatorMapping && mq.selectedInclusively()) {
+ mq.select(this.schema.options.discriminatorKey);
+ }
+
+ if (callback) {
+ callback = this.$wrapCallback(callback);
+ }
+
+ return mq.findOne(conditions, callback);
+};
+
+/**
+ * Counts number of matching documents in a database collection.
+ *
+ * ####Example:
+ *
+ * Adventure.count({ type: 'jungle' }, function (err, count) {
+ * if (err) ..
+ * console.log('there are %d jungle adventures', count);
+ * });
+ *
+ * @param {Object} conditions
+ * @param {Function} [callback]
+ * @return {Query}
+ * @api public
+ */
+
+Model.count = function count(conditions, callback) {
+ if (typeof conditions === 'function') {
+ callback = conditions;
+ conditions = {};
+ }
+
+ // get the mongodb collection object
+ var mq = new this.Query({}, {}, this, this.collection);
+
+ if (callback) {
+ callback = this.$wrapCallback(callback);
+ }
+
+ return mq.count(conditions, callback);
+};
+
+/**
+ * Creates a Query for a `distinct` operation.
+ *
+ * Passing a `callback` immediately executes the query.
+ *
+ * ####Example
+ *
+ * Link.distinct('url', { clicks: {$gt: 100}}, function (err, result) {
+ * if (err) return handleError(err);
+ *
+ * assert(Array.isArray(result));
+ * console.log('unique urls with more than 100 clicks', result);
+ * })
+ *
+ * var query = Link.distinct('url');
+ * query.exec(callback);
+ *
+ * @param {String} field
+ * @param {Object} [conditions] optional
+ * @param {Function} [callback]
+ * @return {Query}
+ * @api public
+ */
+
+Model.distinct = function distinct(field, conditions, callback) {
+ // get the mongodb collection object
+ var mq = new this.Query({}, {}, this, this.collection);
+
+ if (typeof conditions === 'function') {
+ callback = conditions;
+ conditions = {};
+ }
+ if (callback) {
+ callback = this.$wrapCallback(callback);
+ }
+
+ return mq.distinct(field, conditions, callback);
+};
+
+/**
+ * Creates a Query, applies the passed conditions, and returns the Query.
+ *
+ * For example, instead of writing:
+ *
+ * User.find({age: {$gte: 21, $lte: 65}}, callback);
+ *
+ * we can instead write:
+ *
+ * User.where('age').gte(21).lte(65).exec(callback);
+ *
+ * Since the Query class also supports `where` you can continue chaining
+ *
+ * User
+ * .where('age').gte(21).lte(65)
+ * .where('name', /^b/i)
+ * ... etc
+ *
+ * @param {String} path
+ * @param {Object} [val] optional value
+ * @return {Query}
+ * @api public
+ */
+
+Model.where = function where(path, val) {
+ void val; // eslint
+ // get the mongodb collection object
+ var mq = new this.Query({}, {}, this, this.collection).find({});
+ return mq.where.apply(mq, arguments);
+};
+
+/**
+ * Creates a `Query` and specifies a `$where` condition.
+ *
+ * Sometimes you need to query for things in mongodb using a JavaScript expression. You can do so via `find({ $where: javascript })`, or you can use the mongoose shortcut method $where via a Query chain or from your mongoose Model.
+ *
+ * Blog.$where('this.username.indexOf("val") !== -1').exec(function (err, docs) {});
+ *
+ * @param {String|Function} argument is a javascript string or anonymous function
+ * @method $where
+ * @memberOf Model
+ * @return {Query}
+ * @see Query.$where #query_Query-%24where
+ * @api public
+ */
+
+Model.$where = function $where() {
+ var mq = new this.Query({}, {}, this, this.collection).find({});
+ return mq.$where.apply(mq, arguments);
+};
+
+/**
+ * Issues a mongodb findAndModify update command.
+ *
+ * Finds a matching document, updates it according to the `update` arg, passing any `options`, and returns the found document (if any) to the callback. The query executes immediately if `callback` is passed else a Query object is returned.
+ *
+ * ####Options:
+ *
+ * - `new`: bool - if true, return the modified document rather than the original. defaults to false (changed in 4.0)
+ * - `upsert`: bool - creates the object if it doesn't exist. defaults to false.
+ * - `fields`: {Object|String} - Field selection. Equivalent to `.select(fields).findOneAndUpdate()`
+ * - `maxTimeMS`: puts a time limit on the query - requires mongodb >= 2.6.0
+ * - `sort`: if multiple docs are found by the conditions, sets the sort order to choose which doc to update
+ * - `runValidators`: if true, runs [update validators](/docs/validation.html#update-validators) on this command. Update validators validate the update operation against the model's schema.
+ * - `setDefaultsOnInsert`: if this and `upsert` are true, mongoose will apply the [defaults](http://mongoosejs.com/docs/defaults.html) specified in the model's schema if a new document is created. This option only works on MongoDB >= 2.4 because it relies on [MongoDB's `$setOnInsert` operator](https://docs.mongodb.org/v2.4/reference/operator/update/setOnInsert/).
+ * - `passRawResult`: if true, passes the [raw result from the MongoDB driver as the third callback parameter](http://mongodb.github.io/node-mongodb-native/2.0/api/Collection.html#findAndModify)
+ *
+ *
+ * ####Examples:
+ *
+ * A.findOneAndUpdate(conditions, update, options, callback) // executes
+ * A.findOneAndUpdate(conditions, update, options) // returns Query
+ * A.findOneAndUpdate(conditions, update, callback) // executes
+ * A.findOneAndUpdate(conditions, update) // returns Query
+ * A.findOneAndUpdate() // returns Query
+ *
+ * ####Note:
+ *
+ * All top level update keys which are not `atomic` operation names are treated as set operations:
+ *
+ * ####Example:
+ *
+ * var query = { name: 'borne' };
+ * Model.findOneAndUpdate(query, { name: 'jason borne' }, options, callback)
+ *
+ * // is sent as
+ * Model.findOneAndUpdate(query, { $set: { name: 'jason borne' }}, options, callback)
+ *
+ * This helps prevent accidentally overwriting your document with `{ name: 'jason borne' }`.
+ *
+ * ####Note:
+ *
+ * Values are cast to their appropriate types when using the findAndModify helpers.
+ * However, the below are never executed.
+ *
+ * - defaults
+ * - setters
+ *
+ * `findAndModify` helpers support limited defaults and validation. You can
+ * enable these by setting the `setDefaultsOnInsert` and `runValidators` options,
+ * respectively.
+ *
+ * If you need full-fledged validation, use the traditional approach of first
+ * retrieving the document.
+ *
+ * Model.findById(id, function (err, doc) {
+ * if (err) ..
+ * doc.name = 'jason borne';
+ * doc.save(callback);
+ * });
+ *
+ * @param {Object} [conditions]
+ * @param {Object} [update]
+ * @param {Object} [options]
+ * @param {Function} [callback]
+ * @return {Query}
+ * @see mongodb http://www.mongodb.org/display/DOCS/findAndModify+Command
+ * @api public
+ */
+
+Model.findOneAndUpdate = function(conditions, update, options, callback) {
+ if (typeof options === 'function') {
+ callback = options;
+ options = null;
+ } else if (arguments.length === 1) {
+ if (typeof conditions === 'function') {
+ var msg = 'Model.findOneAndUpdate(): First argument must not be a function.\n\n'
+ + ' ' + this.modelName + '.findOneAndUpdate(conditions, update, options, callback)\n'
+ + ' ' + this.modelName + '.findOneAndUpdate(conditions, update, options)\n'
+ + ' ' + this.modelName + '.findOneAndUpdate(conditions, update)\n'
+ + ' ' + this.modelName + '.findOneAndUpdate(update)\n'
+ + ' ' + this.modelName + '.findOneAndUpdate()\n';
+ throw new TypeError(msg);
+ }
+ update = conditions;
+ conditions = undefined;
+ }
+ if (callback) {
+ callback = this.$wrapCallback(callback);
+ }
+
+ var fields;
+ if (options && options.fields) {
+ fields = options.fields;
+ }
+
+ update = utils.clone(update, {depopulate: 1, _isNested: true});
+ if (this.schema.options.versionKey && options && options.upsert) {
+ if (!update.$setOnInsert) {
+ update.$setOnInsert = {};
+ }
+ update.$setOnInsert[this.schema.options.versionKey] = 0;
+ }
+
+ var mq = new this.Query({}, {}, this, this.collection);
+ mq.select(fields);
+
+ return mq.findOneAndUpdate(conditions, update, options, callback);
+};
+
+/**
+ * Issues a mongodb findAndModify update command by a document's _id field.
+ * `findByIdAndUpdate(id, ...)` is equivalent to `findOneAndUpdate({ _id: id }, ...)`.
+ *
+ * Finds a matching document, updates it according to the `update` arg,
+ * passing any `options`, and returns the found document (if any) to the
+ * callback. The query executes immediately if `callback` is passed else a
+ * Query object is returned.
+ *
+ * This function triggers `findOneAndUpdate` middleware.
+ *
+ * ####Options:
+ *
+ * - `new`: bool - true to return the modified document rather than the original. defaults to false
+ * - `upsert`: bool - creates the object if it doesn't exist. defaults to false.
+ * - `runValidators`: if true, runs [update validators](/docs/validation.html#update-validators) on this command. Update validators validate the update operation against the model's schema.
+ * - `setDefaultsOnInsert`: if this and `upsert` are true, mongoose will apply the [defaults](http://mongoosejs.com/docs/defaults.html) specified in the model's schema if a new document is created. This option only works on MongoDB >= 2.4 because it relies on [MongoDB's `$setOnInsert` operator](https://docs.mongodb.org/v2.4/reference/operator/update/setOnInsert/).
+ * - `sort`: if multiple docs are found by the conditions, sets the sort order to choose which doc to update
+ * - `select`: sets the document fields to return
+ *
+ * ####Examples:
+ *
+ * A.findByIdAndUpdate(id, update, options, callback) // executes
+ * A.findByIdAndUpdate(id, update, options) // returns Query
+ * A.findByIdAndUpdate(id, update, callback) // executes
+ * A.findByIdAndUpdate(id, update) // returns Query
+ * A.findByIdAndUpdate() // returns Query
+ *
+ * ####Note:
+ *
+ * All top level update keys which are not `atomic` operation names are treated as set operations:
+ *
+ * ####Example:
+ *
+ * Model.findByIdAndUpdate(id, { name: 'jason borne' }, options, callback)
+ *
+ * // is sent as
+ * Model.findByIdAndUpdate(id, { $set: { name: 'jason borne' }}, options, callback)
+ *
+ * This helps prevent accidentally overwriting your document with `{ name: 'jason borne' }`.
+ *
+ * ####Note:
+ *
+ * Values are cast to their appropriate types when using the findAndModify helpers.
+ * However, the below are never executed.
+ *
+ * - defaults
+ * - setters
+ *
+ * `findAndModify` helpers support limited defaults and validation. You can
+ * enable these by setting the `setDefaultsOnInsert` and `runValidators` options,
+ * respectively.
+ *
+ * If you need full-fledged validation, use the traditional approach of first
+ * retrieving the document.
+ *
+ * Model.findById(id, function (err, doc) {
+ * if (err) ..
+ * doc.name = 'jason borne';
+ * doc.save(callback);
+ * });
+ *
+ * @param {Object|Number|String} id value of `_id` to query by
+ * @param {Object} [update]
+ * @param {Object} [options]
+ * @param {Function} [callback]
+ * @return {Query}
+ * @see Model.findOneAndUpdate #model_Model.findOneAndUpdate
+ * @see mongodb http://www.mongodb.org/display/DOCS/findAndModify+Command
+ * @api public
+ */
+
+Model.findByIdAndUpdate = function(id, update, options, callback) {
+ if (callback) {
+ callback = this.$wrapCallback(callback);
+ }
+ if (arguments.length === 1) {
+ if (typeof id === 'function') {
+ var msg = 'Model.findByIdAndUpdate(): First argument must not be a function.\n\n'
+ + ' ' + this.modelName + '.findByIdAndUpdate(id, callback)\n'
+ + ' ' + this.modelName + '.findByIdAndUpdate(id)\n'
+ + ' ' + this.modelName + '.findByIdAndUpdate()\n';
+ throw new TypeError(msg);
+ }
+ return this.findOneAndUpdate({_id: id}, undefined);
+ }
+
+ // if a model is passed in instead of an id
+ if (id instanceof Document) {
+ id = id._id;
+ }
+
+ return this.findOneAndUpdate.call(this, {_id: id}, update, options, callback);
+};
+
+/**
+ * Issue a mongodb findAndModify remove command.
+ *
+ * Finds a matching document, removes it, passing the found document (if any) to the callback.
+ *
+ * Executes immediately if `callback` is passed else a Query object is returned.
+ *
+ * ####Options:
+ *
+ * - `sort`: if multiple docs are found by the conditions, sets the sort order to choose which doc to update
+ * - `maxTimeMS`: puts a time limit on the query - requires mongodb >= 2.6.0
+ * - `select`: sets the document fields to return
+ *
+ * ####Examples:
+ *
+ * A.findOneAndRemove(conditions, options, callback) // executes
+ * A.findOneAndRemove(conditions, options) // return Query
+ * A.findOneAndRemove(conditions, callback) // executes
+ * A.findOneAndRemove(conditions) // returns Query
+ * A.findOneAndRemove() // returns Query
+ *
+ * Values are cast to their appropriate types when using the findAndModify helpers.
+ * However, the below are never executed.
+ *
+ * - defaults
+ * - setters
+ *
+ * `findAndModify` helpers support limited defaults and validation. You can
+ * enable these by setting the `setDefaultsOnInsert` and `runValidators` options,
+ * respectively.
+ *
+ * If you need full-fledged validation, use the traditional approach of first
+ * retrieving the document.
+ *
+ * Model.findById(id, function (err, doc) {
+ * if (err) ..
+ * doc.name = 'jason borne';
+ * doc.save(callback);
+ * });
+ *
+ * @param {Object} conditions
+ * @param {Object} [options]
+ * @param {Function} [callback]
+ * @return {Query}
+ * @see mongodb http://www.mongodb.org/display/DOCS/findAndModify+Command
+ * @api public
+ */
+
+Model.findOneAndRemove = function(conditions, options, callback) {
+ if (arguments.length === 1 && typeof conditions === 'function') {
+ var msg = 'Model.findOneAndRemove(): First argument must not be a function.\n\n'
+ + ' ' + this.modelName + '.findOneAndRemove(conditions, callback)\n'
+ + ' ' + this.modelName + '.findOneAndRemove(conditions)\n'
+ + ' ' + this.modelName + '.findOneAndRemove()\n';
+ throw new TypeError(msg);
+ }
+
+ if (typeof options === 'function') {
+ callback = options;
+ options = undefined;
+ }
+ if (callback) {
+ callback = this.$wrapCallback(callback);
+ }
+
+ var fields;
+ if (options) {
+ fields = options.select;
+ options.select = undefined;
+ }
+
+ var mq = new this.Query({}, {}, this, this.collection);
+ mq.select(fields);
+
+ return mq.findOneAndRemove(conditions, options, callback);
+};
+
+/**
+ * Issue a mongodb findAndModify remove command by a document's _id field. `findByIdAndRemove(id, ...)` is equivalent to `findOneAndRemove({ _id: id }, ...)`.
+ *
+ * Finds a matching document, removes it, passing the found document (if any) to the callback.
+ *
+ * Executes immediately if `callback` is passed, else a `Query` object is returned.
+ *
+ * ####Options:
+ *
+ * - `sort`: if multiple docs are found by the conditions, sets the sort order to choose which doc to update
+ * - `select`: sets the document fields to return
+ *
+ * ####Examples:
+ *
+ * A.findByIdAndRemove(id, options, callback) // executes
+ * A.findByIdAndRemove(id, options) // return Query
+ * A.findByIdAndRemove(id, callback) // executes
+ * A.findByIdAndRemove(id) // returns Query
+ * A.findByIdAndRemove() // returns Query
+ *
+ * @param {Object|Number|String} id value of `_id` to query by
+ * @param {Object} [options]
+ * @param {Function} [callback]
+ * @return {Query}
+ * @see Model.findOneAndRemove #model_Model.findOneAndRemove
+ * @see mongodb http://www.mongodb.org/display/DOCS/findAndModify+Command
+ */
+
+Model.findByIdAndRemove = function(id, options, callback) {
+ if (arguments.length === 1 && typeof id === 'function') {
+ var msg = 'Model.findByIdAndRemove(): First argument must not be a function.\n\n'
+ + ' ' + this.modelName + '.findByIdAndRemove(id, callback)\n'
+ + ' ' + this.modelName + '.findByIdAndRemove(id)\n'
+ + ' ' + this.modelName + '.findByIdAndRemove()\n';
+ throw new TypeError(msg);
+ }
+ if (callback) {
+ callback = this.$wrapCallback(callback);
+ }
+
+ return this.findOneAndRemove({_id: id}, options, callback);
+};
+
+/**
+ * Shortcut for saving one or more documents to the database.
+ * `MyModel.create(docs)` does `new MyModel(doc).save()` for every doc in
+ * docs.
+ *
+ * Hooks Triggered:
+ * - `save()`
+ *
+ * ####Example:
+ *
+ * // pass individual docs
+ * Candy.create({ type: 'jelly bean' }, { type: 'snickers' }, function (err, jellybean, snickers) {
+ * if (err) // ...
+ * });
+ *
+ * // pass an array
+ * var array = [{ type: 'jelly bean' }, { type: 'snickers' }];
+ * Candy.create(array, function (err, candies) {
+ * if (err) // ...
+ *
+ * var jellybean = candies[0];
+ * var snickers = candies[1];
+ * // ...
+ * });
+ *
+ * // callback is optional; use the returned promise if you like:
+ * var promise = Candy.create({ type: 'jawbreaker' });
+ * promise.then(function (jawbreaker) {
+ * // ...
+ * })
+ *
+ * @param {Array|Object|*} doc(s)
+ * @param {Function} [callback] callback
+ * @return {Promise}
+ * @api public
+ */
+
+Model.create = function create(doc, callback) {
+ var args;
+ var cb;
+
+ if (Array.isArray(doc)) {
+ args = doc;
+ cb = callback;
+ } else {
+ var last = arguments[arguments.length - 1];
+ if (typeof last === 'function') {
+ cb = last;
+ args = utils.args(arguments, 0, arguments.length - 1);
+ } else {
+ args = utils.args(arguments);
+ }
+ }
+
+ var Promise = PromiseProvider.get();
+ var _this = this;
+ if (cb) {
+ cb = this.$wrapCallback(cb);
+ }
+
+ var promise = new Promise.ES6(function(resolve, reject) {
+ if (args.length === 0) {
+ setImmediate(function() {
+ cb && cb(null);
+ resolve(null);
+ });
+ return;
+ }
+
+ var toExecute = [];
+ args.forEach(function(doc) {
+ toExecute.push(function(callback) {
+ var toSave = doc instanceof _this ? doc : new _this(doc);
+ var callbackWrapper = function(error, doc) {
+ if (error) {
+ return callback(error);
+ }
+ callback(null, doc);
+ };
+
+ // Hack to avoid getting a promise because of
+ // $__registerHooksFromSchema
+ if (toSave.$__original_save) {
+ toSave.$__original_save({ __noPromise: true }, callbackWrapper);
+ } else {
+ toSave.save({ __noPromise: true }, callbackWrapper);
+ }
+ });
+ });
+
+ parallel(toExecute, function(error, savedDocs) {
+ if (error) {
+ if (cb) {
+ cb(error);
+ } else {
+ reject(error);
+ }
+ return;
+ }
+
+ if (doc instanceof Array) {
+ resolve(savedDocs);
+ cb && cb.call(_this, null, savedDocs);
+ } else {
+ resolve.apply(promise, savedDocs);
+ if (cb) {
+ savedDocs.unshift(null);
+ cb.apply(_this, savedDocs);
+ }
+ }
+ });
+ });
+
+ return promise;
+};
+
+/**
+ * Shortcut for validating an array of documents and inserting them into
+ * MongoDB if they're all valid. This function is faster than `.create()`
+ * because it only sends one operation to the server, rather than one for each
+ * document.
+ *
+ * This function does **not** trigger save middleware.
+ *
+ * ####Example:
+ *
+ * var arr = [{ name: 'Star Wars' }, { name: 'The Empire Strikes Back' }];
+ * Movies.insertMany(arr, function(error, docs) {});
+ *
+ * @param {Array|Object|*} doc(s)
+ * @param {Function} [callback] callback
+ * @return {Promise}
+ * @api public
+ */
+
+Model.insertMany = function(arr, callback) {
+ var _this = this;
+ if (callback) {
+ callback = this.$wrapCallback(callback);
+ }
+
+ var toExecute = [];
+ arr.forEach(function(doc) {
+ toExecute.push(function(callback) {
+ doc = new _this(doc);
+ doc.validate({ __noPromise: true }, function(error) {
+ if (error) {
+ return callback(error);
+ }
+ callback(null, doc);
+ });
+ });
+ });
+
+ parallel(toExecute, function(error, docs) {
+ if (error) {
+ callback && callback(error);
+ return;
+ }
+ var docObjects = docs.map(function(doc) {
+ if (doc.schema.options.versionKey) {
+ doc[doc.schema.options.versionKey] = 0;
+ }
+ if (doc.initializeTimestamps) {
+ return doc.initializeTimestamps().toObject(POJO_TO_OBJECT_OPTIONS);
+ }
+ return doc.toObject(POJO_TO_OBJECT_OPTIONS);
+ });
+ _this.collection.insertMany(docObjects, function(error) {
+ if (error) {
+ callback && callback(error);
+ return;
+ }
+ for (var i = 0; i < docs.length; ++i) {
+ docs[i].isNew = false;
+ docs[i].emit('isNew', false);
+ }
+ callback && callback(null, docs);
+ });
+ });
+};
+
+/**
+ * Shortcut for creating a new Document from existing raw data, pre-saved in the DB.
+ * The document returned has no paths marked as modified initially.
+ *
+ * ####Example:
+ *
+ * // hydrate previous data into a Mongoose document
+ * var mongooseCandy = Candy.hydrate({ _id: '54108337212ffb6d459f854c', type: 'jelly bean' });
+ *
+ * @param {Object} obj
+ * @return {Document}
+ * @api public
+ */
+
+Model.hydrate = function(obj) {
+ var model = require('./queryhelpers').createModel(this, obj);
+ model.init(obj);
+ return model;
+};
+
+/**
+ * Updates documents in the database without returning them.
+ *
+ * ####Examples:
+ *
+ * MyModel.update({ age: { $gt: 18 } }, { oldEnough: true }, fn);
+ * MyModel.update({ name: 'Tobi' }, { ferret: true }, { multi: true }, function (err, raw) {
+ * if (err) return handleError(err);
+ * console.log('The raw response from Mongo was ', raw);
+ * });
+ *
+ * ####Valid options:
+ *
+ * - `safe` (boolean) safe mode (defaults to value set in schema (true))
+ * - `upsert` (boolean) whether to create the doc if it doesn't match (false)
+ * - `multi` (boolean) whether multiple documents should be updated (false)
+ * - `runValidators`: if true, runs [update validators](/docs/validation.html#update-validators) on this command. Update validators validate the update operation against the model's schema.
+ * - `setDefaultsOnInsert`: if this and `upsert` are true, mongoose will apply the [defaults](http://mongoosejs.com/docs/defaults.html) specified in the model's schema if a new document is created. This option only works on MongoDB >= 2.4 because it relies on [MongoDB's `$setOnInsert` operator](https://docs.mongodb.org/v2.4/reference/operator/update/setOnInsert/).
+ * - `strict` (boolean) overrides the `strict` option for this update
+ * - `overwrite` (boolean) disables update-only mode, allowing you to overwrite the doc (false)
+ *
+ * All `update` values are cast to their appropriate SchemaTypes before being sent.
+ *
+ * The `callback` function receives `(err, rawResponse)`.
+ *
+ * - `err` is the error if any occurred
+ * - `rawResponse` is the full response from Mongo
+ *
+ * ####Note:
+ *
+ * All top level keys which are not `atomic` operation names are treated as set operations:
+ *
+ * ####Example:
+ *
+ * var query = { name: 'borne' };
+ * Model.update(query, { name: 'jason borne' }, options, callback)
+ *
+ * // is sent as
+ * Model.update(query, { $set: { name: 'jason borne' }}, options, callback)
+ * // if overwrite option is false. If overwrite is true, sent without the $set wrapper.
+ *
+ * This helps prevent accidentally overwriting all documents in your collection with `{ name: 'jason borne' }`.
+ *
+ * ####Note:
+ *
+ * Be careful to not use an existing model instance for the update clause (this won't work and can cause weird behavior like infinite loops). Also, ensure that the update clause does not have an _id property, which causes Mongo to return a "Mod on _id not allowed" error.
+ *
+ * ####Note:
+ *
+ * To update documents without waiting for a response from MongoDB, do not pass a `callback`, then call `exec` on the returned [Query](#query-js):
+ *
+ * Comment.update({ _id: id }, { $set: { text: 'changed' }}).exec();
+ *
+ * ####Note:
+ *
+ * Although values are casted to their appropriate types when using update, the following are *not* applied:
+ *
+ * - defaults
+ * - setters
+ * - validators
+ * - middleware
+ *
+ * If you need those features, use the traditional approach of first retrieving the document.
+ *
+ * Model.findOne({ name: 'borne' }, function (err, doc) {
+ * if (err) ..
+ * doc.name = 'jason borne';
+ * doc.save(callback);
+ * })
+ *
+ * @see strict http://mongoosejs.com/docs/guide.html#strict
+ * @see response http://docs.mongodb.org/v2.6/reference/command/update/#output
+ * @param {Object} conditions
+ * @param {Object} doc
+ * @param {Object} [options]
+ * @param {Function} [callback]
+ * @return {Query}
+ * @api public
+ */
+
+Model.update = function update(conditions, doc, options, callback) {
+ var mq = new this.Query({}, {}, this, this.collection);
+ if (callback) {
+ callback = this.$wrapCallback(callback);
+ }
+ // gh-2406
+ // make local deep copy of conditions
+ if (conditions instanceof Document) {
+ conditions = conditions.toObject();
+ } else {
+ conditions = utils.clone(conditions, {retainKeyOrder: true});
+ }
+ options = typeof options === 'function' ? options : utils.clone(options);
+
+ if (this.schema.options.versionKey && options && options.upsert) {
+ if (!doc.$setOnInsert) {
+ doc.$setOnInsert = {};
+ }
+ doc.$setOnInsert[this.schema.options.versionKey] = 0;
+ }
+
+ return mq.update(conditions, doc, options, callback);
+};
+
+/**
+ * Executes a mapReduce command.
+ *
+ * `o` is an object specifying all mapReduce options as well as the map and reduce functions. All options are delegated to the driver implementation. See [node-mongodb-native mapReduce() documentation](http://mongodb.github.io/node-mongodb-native/api-generated/collection.html#mapreduce) for more detail about options.
+ *
+ * ####Example:
+ *
+ * var o = {};
+ * o.map = function () { emit(this.name, 1) }
+ * o.reduce = function (k, vals) { return vals.length }
+ * User.mapReduce(o, function (err, results) {
+ * console.log(results)
+ * })
+ *
+ * ####Other options:
+ *
+ * - `query` {Object} query filter object.
+ * - `sort` {Object} sort input objects using this key
+ * - `limit` {Number} max number of documents
+ * - `keeptemp` {Boolean, default:false} keep temporary data
+ * - `finalize` {Function} finalize function
+ * - `scope` {Object} scope variables exposed to map/reduce/finalize during execution
+ * - `jsMode` {Boolean, default:false} it is possible to make the execution stay in JS. Provided in MongoDB > 2.0.X
+ * - `verbose` {Boolean, default:false} provide statistics on job execution time.
+ * - `readPreference` {String}
+ * - `out*` {Object, default: {inline:1}} sets the output target for the map reduce job.
+ *
+ * ####* out options:
+ *
+ * - `{inline:1}` the results are returned in an array
+ * - `{replace: 'collectionName'}` add the results to collectionName: the results replace the collection
+ * - `{reduce: 'collectionName'}` add the results to collectionName: if dups are detected, uses the reducer / finalize functions
+ * - `{merge: 'collectionName'}` add the results to collectionName: if dups exist the new docs overwrite the old
+ *
+ * If `options.out` is set to `replace`, `merge`, or `reduce`, a Model instance is returned that can be used for further querying. Queries run against this model are all executed with the `lean` option; meaning only the js object is returned and no Mongoose magic is applied (getters, setters, etc).
+ *
+ * ####Example:
+ *
+ * var o = {};
+ * o.map = function () { emit(this.name, 1) }
+ * o.reduce = function (k, vals) { return vals.length }
+ * o.out = { replace: 'createdCollectionNameForResults' }
+ * o.verbose = true;
+ *
+ * User.mapReduce(o, function (err, model, stats) {
+ * console.log('map reduce took %d ms', stats.processtime)
+ * model.find().where('value').gt(10).exec(function (err, docs) {
+ * console.log(docs);
+ * });
+ * })
+ *
+ * // a promise is returned so you may instead write
+ * var promise = User.mapReduce(o);
+ * promise.then(function (model, stats) {
+ * console.log('map reduce took %d ms', stats.processtime)
+ * return model.find().where('value').gt(10).exec();
+ * }).then(function (docs) {
+ * console.log(docs);
+ * }).then(null, handleError).end()
+ *
+ * @param {Object} o an object specifying map-reduce options
+ * @param {Function} [callback] optional callback
+ * @see http://www.mongodb.org/display/DOCS/MapReduce
+ * @return {Promise}
+ * @api public
+ */
+
+Model.mapReduce = function mapReduce(o, callback) {
+ var _this = this;
+ if (callback) {
+ callback = this.$wrapCallback(callback);
+ }
+ var Promise = PromiseProvider.get();
+ return new Promise.ES6(function(resolve, reject) {
+ if (!Model.mapReduce.schema) {
+ var opts = {noId: true, noVirtualId: true, strict: false};
+ Model.mapReduce.schema = new Schema({}, opts);
+ }
+
+ if (!o.out) o.out = {inline: 1};
+ if (o.verbose !== false) o.verbose = true;
+
+ o.map = String(o.map);
+ o.reduce = String(o.reduce);
+
+ if (o.query) {
+ var q = new _this.Query(o.query);
+ q.cast(_this);
+ o.query = q._conditions;
+ q = undefined;
+ }
+
+ _this.collection.mapReduce(null, null, o, function(err, ret, stats) {
+ if (err) {
+ callback && callback(err);
+ reject(err);
+ return;
+ }
+
+ if (ret.findOne && ret.mapReduce) {
+ // returned a collection, convert to Model
+ var model = Model.compile(
+ '_mapreduce_' + ret.collectionName
+ , Model.mapReduce.schema
+ , ret.collectionName
+ , _this.db
+ , _this.base);
+
+ model._mapreduce = true;
+
+ callback && callback(null, model, stats);
+ return resolve(model, stats);
+ }
+
+ callback && callback(null, ret, stats);
+ resolve(ret, stats);
+ });
+ });
+};
+
+/**
+ * geoNear support for Mongoose
+ *
+ * ####Options:
+ * - `lean` {Boolean} return the raw object
+ * - All options supported by the driver are also supported
+ *
+ * ####Example:
+ *
+ * // Legacy point
+ * Model.geoNear([1,3], { maxDistance : 5, spherical : true }, function(err, results, stats) {
+ * console.log(results);
+ * });
+ *
+ * // geoJson
+ * var point = { type : "Point", coordinates : [9,9] };
+ * Model.geoNear(point, { maxDistance : 5, spherical : true }, function(err, results, stats) {
+ * console.log(results);
+ * });
+ *
+ * @param {Object|Array} GeoJSON point or legacy coordinate pair [x,y] to search near
+ * @param {Object} options for the qurery
+ * @param {Function} [callback] optional callback for the query
+ * @return {Promise}
+ * @see http://docs.mongodb.org/manual/core/2dsphere/
+ * @see http://mongodb.github.io/node-mongodb-native/api-generated/collection.html?highlight=geonear#geoNear
+ * @api public
+ */
+
+Model.geoNear = function(near, options, callback) {
+ if (typeof options === 'function') {
+ callback = options;
+ options = {};
+ }
+
+ if (callback) {
+ callback = this.$wrapCallback(callback);
+ }
+
+ var _this = this;
+ var Promise = PromiseProvider.get();
+ if (!near) {
+ return new Promise.ES6(function(resolve, reject) {
+ var error = new Error('Must pass a near option to geoNear');
+ reject(error);
+ callback && callback(error);
+ });
+ }
+
+ var x, y;
+
+ return new Promise.ES6(function(resolve, reject) {
+ var handler = function(err, res) {
+ if (err) {
+ reject(err);
+ callback && callback(err);
+ return;
+ }
+ if (options.lean) {
+ resolve(res.results, res.stats);
+ callback && callback(null, res.results, res.stats);
+ return;
+ }
+
+ var count = res.results.length;
+ // if there are no results, fulfill the promise now
+ if (count === 0) {
+ resolve(res.results, res.stats);
+ callback && callback(null, res.results, res.stats);
+ return;
+ }
+
+ var errSeen = false;
+
+ function init(err) {
+ if (err && !errSeen) {
+ errSeen = true;
+ reject(err);
+ callback && callback(err);
+ return;
+ }
+ if (--count <= 0) {
+ resolve(res.results, res.stats);
+ callback && callback(null, res.results, res.stats);
+ }
+ }
+
+ for (var i = 0; i < res.results.length; i++) {
+ var temp = res.results[i].obj;
+ res.results[i].obj = new _this();
+ res.results[i].obj.init(temp, init);
+ }
+ };
+
+ if (Array.isArray(near)) {
+ if (near.length !== 2) {
+ var error = new Error('If using legacy coordinates, must be an array ' +
+ 'of size 2 for geoNear');
+ reject(error);
+ callback && callback(error);
+ return;
+ }
+ x = near[0];
+ y = near[1];
+ _this.collection.geoNear(x, y, options, handler);
+ } else {
+ if (near.type !== 'Point' || !Array.isArray(near.coordinates)) {
+ error = new Error('Must pass either a legacy coordinate array or ' +
+ 'GeoJSON Point to geoNear');
+ reject(error);
+ callback && callback(error);
+ return;
+ }
+
+ _this.collection.geoNear(near, options, handler);
+ }
+ });
+};
+
+/**
+ * Performs [aggregations](http://docs.mongodb.org/manual/applications/aggregation/) on the models collection.
+ *
+ * If a `callback` is passed, the `aggregate` is executed and a `Promise` is returned. If a callback is not passed, the `aggregate` itself is returned.
+ *
+ * ####Example:
+ *
+ * // Find the max balance of all accounts
+ * Users.aggregate(
+ * { $group: { _id: null, maxBalance: { $max: '$balance' }}}
+ * , { $project: { _id: 0, maxBalance: 1 }}
+ * , function (err, res) {
+ * if (err) return handleError(err);
+ * console.log(res); // [ { maxBalance: 98000 } ]
+ * });
+ *
+ * // Or use the aggregation pipeline builder.
+ * Users.aggregate()
+ * .group({ _id: null, maxBalance: { $max: '$balance' } })
+ * .select('-id maxBalance')
+ * .exec(function (err, res) {
+ * if (err) return handleError(err);
+ * console.log(res); // [ { maxBalance: 98 } ]
+ * });
+ *
+ * ####NOTE:
+ *
+ * - Arguments are not cast to the model's schema because `$project` operators allow redefining the "shape" of the documents at any stage of the pipeline, which may leave documents in an incompatible format.
+ * - The documents returned are plain javascript objects, not mongoose documents (since any shape of document can be returned).
+ * - Requires MongoDB >= 2.1
+ *
+ * @see Aggregate #aggregate_Aggregate
+ * @see MongoDB http://docs.mongodb.org/manual/applications/aggregation/
+ * @param {Object|Array} [...] aggregation pipeline operator(s) or operator array
+ * @param {Function} [callback]
+ * @return {Aggregate|Promise}
+ * @api public
+ */
+
+Model.aggregate = function aggregate() {
+ var args = [].slice.call(arguments),
+ aggregate,
+ callback;
+
+ if (typeof args[args.length - 1] === 'function') {
+ callback = args.pop();
+ }
+
+ if (args.length === 1 && util.isArray(args[0])) {
+ aggregate = new Aggregate(args[0]);
+ } else {
+ aggregate = new Aggregate(args);
+ }
+
+ aggregate.model(this);
+
+ if (typeof callback === 'undefined') {
+ return aggregate;
+ }
+
+ if (callback) {
+ callback = this.$wrapCallback(callback);
+ }
+
+ aggregate.exec(callback);
+};
+
+/**
+ * Implements `$geoSearch` functionality for Mongoose
+ *
+ * ####Example:
+ *
+ * var options = { near: [10, 10], maxDistance: 5 };
+ * Locations.geoSearch({ type : "house" }, options, function(err, res) {
+ * console.log(res);
+ * });
+ *
+ * ####Options:
+ * - `near` {Array} x,y point to search for
+ * - `maxDistance` {Number} the maximum distance from the point near that a result can be
+ * - `limit` {Number} The maximum number of results to return
+ * - `lean` {Boolean} return the raw object instead of the Mongoose Model
+ *
+ * @param {Object} conditions an object that specifies the match condition (required)
+ * @param {Object} options for the geoSearch, some (near, maxDistance) are required
+ * @param {Function} [callback] optional callback
+ * @return {Promise}
+ * @see http://docs.mongodb.org/manual/reference/command/geoSearch/
+ * @see http://docs.mongodb.org/manual/core/geohaystack/
+ * @api public
+ */
+
+Model.geoSearch = function(conditions, options, callback) {
+ if (typeof options === 'function') {
+ callback = options;
+ options = {};
+ }
+ if (callback) {
+ callback = this.$wrapCallback(callback);
+ }
+
+ var _this = this;
+ var Promise = PromiseProvider.get();
+ return new Promise.ES6(function(resolve, reject) {
+ var error;
+ if (conditions === undefined || !utils.isObject(conditions)) {
+ error = new Error('Must pass conditions to geoSearch');
+ } else if (!options.near) {
+ error = new Error('Must specify the near option in geoSearch');
+ } else if (!Array.isArray(options.near)) {
+ error = new Error('near option must be an array [x, y]');
+ }
+
+ if (error) {
+ callback && callback(error);
+ reject(error);
+ return;
+ }
+
+ // send the conditions in the options object
+ options.search = conditions;
+
+ _this.collection.geoHaystackSearch(options.near[0], options.near[1], options, function(err, res) {
+ // have to deal with driver problem. Should be fixed in a soon-ish release
+ // (7/8/2013)
+ if (err) {
+ callback && callback(err);
+ reject(err);
+ return;
+ }
+
+ var count = res.results.length;
+ if (options.lean || count === 0) {
+ callback && callback(null, res.results, res.stats);
+ resolve(res.results, res.stats);
+ return;
+ }
+
+ var errSeen = false;
+
+ function init(err) {
+ if (err && !errSeen) {
+ callback && callback(err);
+ reject(err);
+ return;
+ }
+
+ if (!--count && !errSeen) {
+ callback && callback(null, res.results, res.stats);
+ resolve(res.results, res.stats);
+ }
+ }
+
+ for (var i = 0; i < res.results.length; i++) {
+ var temp = res.results[i];
+ res.results[i] = new _this();
+ res.results[i].init(temp, {}, init);
+ }
+ });
+ });
+};
+
+/**
+ * Populates document references.
+ *
+ * ####Available options:
+ *
+ * - path: space delimited path(s) to populate
+ * - select: optional fields to select
+ * - match: optional query conditions to match
+ * - model: optional name of the model to use for population
+ * - options: optional query options like sort, limit, etc
+ *
+ * ####Examples:
+ *
+ * // populates a single object
+ * User.findById(id, function (err, user) {
+ * var opts = [
+ * { path: 'company', match: { x: 1 }, select: 'name' }
+ * , { path: 'notes', options: { limit: 10 }, model: 'override' }
+ * ]
+ *
+ * User.populate(user, opts, function (err, user) {
+ * console.log(user);
+ * })
+ * })
+ *
+ * // populates an array of objects
+ * User.find(match, function (err, users) {
+ * var opts = [{ path: 'company', match: { x: 1 }, select: 'name' }]
+ *
+ * var promise = User.populate(users, opts);
+ * promise.then(console.log).end();
+ * })
+ *
+ * // imagine a Weapon model exists with two saved documents:
+ * // { _id: 389, name: 'whip' }
+ * // { _id: 8921, name: 'boomerang' }
+ *
+ * var user = { name: 'Indiana Jones', weapon: 389 }
+ * Weapon.populate(user, { path: 'weapon', model: 'Weapon' }, function (err, user) {
+ * console.log(user.weapon.name) // whip
+ * })
+ *
+ * // populate many plain objects
+ * var users = [{ name: 'Indiana Jones', weapon: 389 }]
+ * users.push({ name: 'Batman', weapon: 8921 })
+ * Weapon.populate(users, { path: 'weapon' }, function (err, users) {
+ * users.forEach(function (user) {
+ * console.log('%s uses a %s', users.name, user.weapon.name)
+ * // Indiana Jones uses a whip
+ * // Batman uses a boomerang
+ * })
+ * })
+ * // Note that we didn't need to specify the Weapon model because
+ * // we were already using it's populate() method.
+ *
+ * @param {Document|Array} docs Either a single document or array of documents to populate.
+ * @param {Object} options A hash of key/val (path, options) used for population.
+ * @param {Function} [callback(err,doc)] Optional callback, executed upon completion. Receives `err` and the `doc(s)`.
+ * @return {Promise}
+ * @api public
+ */
+
+Model.populate = function(docs, paths, callback) {
+ var _this = this;
+ if (callback) {
+ callback = this.$wrapCallback(callback);
+ }
+
+ // normalized paths
+ var noPromise = paths && !!paths.__noPromise;
+ paths = utils.populate(paths);
+
+ // data that should persist across subPopulate calls
+ var cache = {};
+
+ if (noPromise) {
+ _populate(this, docs, paths, cache, callback);
+ } else {
+ var Promise = PromiseProvider.get();
+ return new Promise.ES6(function(resolve, reject) {
+ _populate(_this, docs, paths, cache, function(error, docs) {
+ if (error) {
+ callback && callback(error);
+ reject(error);
+ } else {
+ callback && callback(null, docs);
+ resolve(docs);
+ }
+ });
+ });
+ }
+};
+
+/*!
+ * Populate helper
+ *
+ * @param {Model} model the model to use
+ * @param {Document|Array} docs Either a single document or array of documents to populate.
+ * @param {Object} paths
+ * @param {Function} [cb(err,doc)] Optional callback, executed upon completion. Receives `err` and the `doc(s)`.
+ * @return {Function}
+ * @api private
+ */
+
+function _populate(model, docs, paths, cache, callback) {
+ var pending = paths.length;
+
+ if (pending === 0) {
+ return callback(null, docs);
+ }
+
+ // each path has its own query options and must be executed separately
+ var i = pending;
+ var path;
+ while (i--) {
+ path = paths[i];
+ populate(model, docs, path, next);
+ }
+
+ function next(err) {
+ if (err) {
+ return callback(err);
+ }
+ if (--pending) {
+ return;
+ }
+ callback(null, docs);
+ }
+}
+
+/*!
+ * Populates `docs`
+ */
+var excludeIdReg = /\s?-_id\s?/,
+ excludeIdRegGlobal = /\s?-_id\s?/g;
+
+function populate(model, docs, options, callback) {
+ var modelsMap;
+
+ // normalize single / multiple docs passed
+ if (!Array.isArray(docs)) {
+ docs = [docs];
+ }
+
+ if (docs.length === 0 || docs.every(utils.isNullOrUndefined)) {
+ return callback();
+ }
+
+ modelsMap = getModelsMapForPopulate(model, docs, options);
+
+ var i, len = modelsMap.length,
+ mod, match, select, vals = [];
+
+ function flatten(item) {
+ // no need to include undefined values in our query
+ return undefined !== item;
+ }
+
+ var _remaining = len;
+ var hasOne = false;
+ for (i = 0; i < len; i++) {
+ mod = modelsMap[i];
+ select = mod.options.select;
+
+ if (mod.options.match) {
+ match = utils.object.shallowCopy(mod.options.match);
+ } else {
+ match = {};
+ }
+
+ var ids = utils.array.flatten(mod.ids, flatten);
+ ids = utils.array.unique(ids);
+
+ if (ids.length === 0 || ids.every(utils.isNullOrUndefined)) {
+ --_remaining;
+ continue;
+ }
+
+ hasOne = true;
+ if (mod.foreignField !== '_id' || !match['_id']) {
+ match[mod.foreignField] = { $in: ids };
+ }
+
+ var assignmentOpts = {};
+ assignmentOpts.sort = mod.options.options && mod.options.options.sort || undefined;
+ assignmentOpts.excludeId = excludeIdReg.test(select) || (select && select._id === 0);
+
+ if (assignmentOpts.excludeId) {
+ // override the exclusion from the query so we can use the _id
+ // for document matching during assignment. we'll delete the
+ // _id back off before returning the result.
+ if (typeof select === 'string') {
+ select = select.replace(excludeIdRegGlobal, ' ');
+ } else {
+ // preserve original select conditions by copying
+ select = utils.object.shallowCopy(select);
+ delete select._id;
+ }
+ }
+
+ if (mod.options.options && mod.options.options.limit) {
+ assignmentOpts.originalLimit = mod.options.options.limit;
+ mod.options.options.limit = mod.options.options.limit * ids.length;
+ }
+
+ var subPopulate = mod.options.populate;
+ var query = mod.Model.find(match, select, mod.options.options);
+ if (subPopulate) {
+ query.populate(subPopulate);
+ }
+ query.exec(next.bind(this, mod, assignmentOpts));
+ }
+
+ if (!hasOne) {
+ return callback();
+ }
+
+ function next(options, assignmentOpts, err, valsFromDb) {
+ if (err) return callback(err);
+ vals = vals.concat(valsFromDb);
+ _assign(null, vals, options, assignmentOpts);
+ if (--_remaining === 0) {
+ callback();
+ }
+ }
+
+ function _assign(err, vals, mod, assignmentOpts) {
+ if (err) return callback(err);
+
+ var options = mod.options;
+ var _val;
+ var lean = options.options && options.options.lean,
+ len = vals.length,
+ rawOrder = {}, rawDocs = {}, key, val;
+
+ // optimization:
+ // record the document positions as returned by
+ // the query result.
+ for (var i = 0; i < len; i++) {
+ val = vals[i];
+ if (val) {
+ _val = utils.getValue(mod.foreignField, val);
+ if (Array.isArray(_val)) {
+ var _valLength = _val.length;
+ for (var j = 0; j < _valLength; ++j) {
+ if (_val[j] instanceof Document) {
+ _val[j] = _val[j]._id;
+ }
+ key = String(_val[j]);
+ if (rawDocs[key]) {
+ if (Array.isArray(rawDocs[key])) {
+ rawDocs[key].push(val);
+ rawOrder[key].push(i);
+ } else {
+ rawDocs[key] = [rawDocs[key], val];
+ rawOrder[key] = [rawOrder[key], i];
+ }
+ } else {
+ rawDocs[key] = val;
+ rawOrder[key] = i;
+ }
+ }
+ } else {
+ if (_val instanceof Document) {
+ _val = _val._id;
+ }
+ key = String(_val);
+ if (rawDocs[key]) {
+ if (Array.isArray(rawDocs[key])) {
+ rawDocs[key].push(val);
+ rawOrder[key].push(i);
+ } else {
+ rawDocs[key] = [rawDocs[key], val];
+ rawOrder[key] = [rawOrder[key], i];
+ }
+ } else {
+ rawDocs[key] = val;
+ rawOrder[key] = i;
+ }
+ }
+ // flag each as result of population
+ if (!lean) {
+ val.$__.wasPopulated = true;
+ }
+ }
+ }
+
+ assignVals({
+ originalModel: model,
+ rawIds: mod.ids,
+ localField: mod.localField,
+ foreignField: mod.foreignField,
+ rawDocs: rawDocs,
+ rawOrder: rawOrder,
+ docs: mod.docs,
+ path: options.path,
+ options: assignmentOpts,
+ justOne: mod.justOne,
+ isVirtual: mod.isVirtual
+ });
+ }
+}
+
+/*!
+ * Assigns documents returned from a population query back
+ * to the original document path.
+ */
+
+function assignVals(o) {
+ // replace the original ids in our intermediate _ids structure
+ // with the documents found by query
+ assignRawDocsToIdStructure(o.rawIds, o.rawDocs, o.rawOrder, o.options,
+ o.localField, o.foreignField);
+
+ // now update the original documents being populated using the
+ // result structure that contains real documents.
+
+ var docs = o.docs;
+ var rawIds = o.rawIds;
+ var options = o.options;
+
+ function setValue(val) {
+ return valueFilter(val, options);
+ }
+
+ for (var i = 0; i < docs.length; ++i) {
+ if (utils.getValue(o.path, docs[i]) == null &&
+ !o.originalModel.schema._getVirtual(o.path)) {
+ continue;
+ }
+
+ if (o.isVirtual && !o.justOne && !Array.isArray(rawIds[i])) {
+ rawIds[i] = [rawIds[i]];
+ }
+ utils.setValue(o.path, rawIds[i], docs[i], setValue);
+ }
+}
+
+/*!
+ * Assign `vals` returned by mongo query to the `rawIds`
+ * structure returned from utils.getVals() honoring
+ * query sort order if specified by user.
+ *
+ * This can be optimized.
+ *
+ * Rules:
+ *
+ * if the value of the path is not an array, use findOne rules, else find.
+ * for findOne the results are assigned directly to doc path (including null results).
+ * for find, if user specified sort order, results are assigned directly
+ * else documents are put back in original order of array if found in results
+ *
+ * @param {Array} rawIds
+ * @param {Array} vals
+ * @param {Boolean} sort
+ * @api private
+ */
+
+function assignRawDocsToIdStructure(rawIds, resultDocs, resultOrder, options, localFields, foreignFields, recursed) {
+ // honor user specified sort order
+ var newOrder = [];
+ var sorting = options.sort && rawIds.length > 1;
+ var doc;
+ var sid;
+ var id;
+
+ for (var i = 0; i < rawIds.length; ++i) {
+ id = rawIds[i];
+
+ if (Array.isArray(id)) {
+ // handle [ [id0, id2], [id3] ]
+ assignRawDocsToIdStructure(id, resultDocs, resultOrder, options, localFields, foreignFields, true);
+ newOrder.push(id);
+ continue;
+ }
+
+ if (id === null && !sorting) {
+ // keep nulls for findOne unless sorting, which always
+ // removes them (backward compat)
+ newOrder.push(id);
+ continue;
+ }
+
+ sid = String(id);
+
+ if (recursed) {
+ // apply find behavior
+
+ // assign matching documents in original order unless sorting
+ doc = resultDocs[sid];
+ if (doc) {
+ if (sorting) {
+ newOrder[resultOrder[sid]] = doc;
+ } else {
+ newOrder.push(doc);
+ }
+ } else {
+ newOrder.push(id);
+ }
+ } else {
+ // apply findOne behavior - if document in results, assign, else assign null
+ newOrder[i] = doc = resultDocs[sid] || null;
+ }
+ }
+
+ rawIds.length = 0;
+ if (newOrder.length) {
+ // reassign the documents based on corrected order
+
+ // forEach skips over sparse entries in arrays so we
+ // can safely use this to our advantage dealing with sorted
+ // result sets too.
+ newOrder.forEach(function(doc, i) {
+ if (!doc) {
+ return;
+ }
+ rawIds[i] = doc;
+ });
+ }
+}
+
+function getModelsMapForPopulate(model, docs, options) {
+ var i, doc, len = docs.length,
+ available = {},
+ map = [],
+ modelNameFromQuery = options.model && options.model.modelName || options.model,
+ schema, refPath, Model, currentOptions, modelNames, modelName, discriminatorKey, modelForFindSchema;
+
+ var originalOptions = utils.clone(options);
+ var isVirtual = false;
+
+ schema = model._getSchema(options.path);
+
+ if (schema && schema.caster) {
+ schema = schema.caster;
+ }
+
+ if (!schema && model.discriminators) {
+ discriminatorKey = model.schema.discriminatorMapping.key;
+ }
+
+ refPath = schema && schema.options && schema.options.refPath;
+
+ for (i = 0; i < len; i++) {
+ doc = docs[i];
+
+ if (refPath) {
+ modelNames = utils.getValue(refPath, doc);
+ if (Array.isArray(modelNames)) {
+ modelNames = modelNames.filter(function(v) {
+ return v != null;
+ });
+ }
+ } else {
+ if (!modelNameFromQuery) {
+ var modelForCurrentDoc = model;
+ var schemaForCurrentDoc;
+
+ if (!schema && discriminatorKey) {
+ modelForFindSchema = utils.getValue(discriminatorKey, doc);
+
+ if (modelForFindSchema) {
+ modelForCurrentDoc = model.db.model(modelForFindSchema);
+ schemaForCurrentDoc = modelForCurrentDoc._getSchema(options.path);
+
+ if (schemaForCurrentDoc && schemaForCurrentDoc.caster) {
+ schemaForCurrentDoc = schemaForCurrentDoc.caster;
+ }
+ }
+ } else {
+ schemaForCurrentDoc = schema;
+ }
+ var virtual = modelForCurrentDoc.schema._getVirtual(options.path);
+
+ if (schemaForCurrentDoc && schemaForCurrentDoc.options && schemaForCurrentDoc.options.ref) {
+ modelNames = [schemaForCurrentDoc.options.ref];
+ } else if (virtual && virtual.options && virtual.options.ref) {
+ modelNames = [virtual && virtual.options && virtual.options.ref];
+ isVirtual = true;
+ } else {
+ modelNames = [model.modelName];
+ }
+ } else {
+ modelNames = [modelNameFromQuery]; // query options
+ }
+ }
+
+ if (!modelNames) {
+ continue;
+ }
+
+ if (!Array.isArray(modelNames)) {
+ modelNames = [modelNames];
+ }
+
+ virtual = model.schema._getVirtual(options.path);
+ var localField = virtual && virtual.options ?
+ (virtual.$nestedSchemaPath ? virtual.$nestedSchemaPath + '.' : '') + virtual.options.localField :
+ options.path;
+ var foreignField = virtual && virtual.options ?
+ virtual.options.foreignField :
+ '_id';
+ var justOne = virtual && virtual.options && virtual.options.justOne;
+ if (virtual && virtual.options && virtual.options.ref) {
+ isVirtual = true;
+ }
+
+ if (virtual && (!localField || !foreignField)) {
+ throw new Error('If you are populating a virtual, you must set the ' +
+ 'localField and foreignField options');
+ }
+
+ options.isVirtual = isVirtual;
+ var ret = convertTo_id(utils.getValue(localField, doc));
+ var id = String(utils.getValue(foreignField, doc));
+ options._docs[id] = Array.isArray(ret) ? ret.slice() : ret;
+ if (doc.$__) {
+ doc.populated(options.path, options._docs[id], options);
+ }
+
+ var k = modelNames.length;
+ while (k--) {
+ modelName = modelNames[k];
+ Model = originalOptions.model && originalOptions.model.modelName ?
+ originalOptions.model :
+ model.db.model(modelName);
+
+ if (!available[modelName]) {
+ currentOptions = {
+ model: Model
+ };
+
+ if (isVirtual && virtual.options && virtual.options.options) {
+ currentOptions.options = utils.clone(virtual.options.options, {
+ retainKeyOrder: true
+ });
+ }
+ utils.merge(currentOptions, options);
+ if (schema && !discriminatorKey) {
+ currentOptions.model = Model;
+ }
+ options.model = Model;
+
+ available[modelName] = {
+ Model: Model,
+ options: currentOptions,
+ docs: [doc],
+ ids: [ret],
+ // Assume only 1 localField + foreignField
+ localField: localField,
+ foreignField: foreignField,
+ justOne: justOne,
+ isVirtual: isVirtual
+ };
+ map.push(available[modelName]);
+ } else {
+ available[modelName].docs.push(doc);
+ available[modelName].ids.push(ret);
+ }
+ }
+ }
+
+ return map;
+}
+
+/*!
+ * Retrieve the _id of `val` if a Document or Array of Documents.
+ *
+ * @param {Array|Document|Any} val
+ * @return {Array|Document|Any}
+ */
+
+function convertTo_id(val) {
+ if (val instanceof Model) return val._id;
+
+ if (Array.isArray(val)) {
+ for (var i = 0; i < val.length; ++i) {
+ if (val[i] instanceof Model) {
+ val[i] = val[i]._id;
+ }
+ }
+ if (val.isMongooseArray) {
+ return new MongooseArray(val, val._path, val._parent);
+ }
+
+ return [].concat(val);
+ }
+
+ return val;
+}
+
+/*!
+ * 1) Apply backwards compatible find/findOne behavior to sub documents
+ *
+ * find logic:
+ * a) filter out non-documents
+ * b) remove _id from sub docs when user specified
+ *
+ * findOne
+ * a) if no doc found, set to null
+ * b) remove _id from sub docs when user specified
+ *
+ * 2) Remove _ids when specified by users query.
+ *
+ * background:
+ * _ids are left in the query even when user excludes them so
+ * that population mapping can occur.
+ */
+
+function valueFilter(val, assignmentOpts) {
+ if (Array.isArray(val)) {
+ // find logic
+ var ret = [];
+ var numValues = val.length;
+ for (var i = 0; i < numValues; ++i) {
+ var subdoc = val[i];
+ if (!isDoc(subdoc)) continue;
+ maybeRemoveId(subdoc, assignmentOpts);
+ ret.push(subdoc);
+ if (assignmentOpts.originalLimit &&
+ ret.length >= assignmentOpts.originalLimit) {
+ break;
+ }
+ }
+
+ // Since we don't want to have to create a new mongoosearray, make sure to
+ // modify the array in place
+ while (val.length > ret.length) {
+ Array.prototype.pop.apply(val, []);
+ }
+ for (i = 0; i < ret.length; ++i) {
+ val[i] = ret[i];
+ }
+ return val;
+ }
+
+ // findOne
+ if (isDoc(val)) {
+ maybeRemoveId(val, assignmentOpts);
+ return val;
+ }
+
+ return null;
+}
+
+/*!
+ * Remove _id from `subdoc` if user specified "lean" query option
+ */
+
+function maybeRemoveId(subdoc, assignmentOpts) {
+ if (assignmentOpts.excludeId) {
+ if (typeof subdoc.setValue === 'function') {
+ delete subdoc._doc._id;
+ } else {
+ delete subdoc._id;
+ }
+ }
+}
+
+/*!
+ * Determine if `doc` is a document returned
+ * by a populate query.
+ */
+
+function isDoc(doc) {
+ if (doc == null) {
+ return false;
+ }
+
+ var type = typeof doc;
+ if (type === 'string') {
+ return false;
+ }
+
+ if (type === 'number') {
+ return false;
+ }
+
+ if (Buffer.isBuffer(doc)) {
+ return false;
+ }
+
+ if (doc.constructor.name === 'ObjectID') {
+ return false;
+ }
+
+ // only docs
+ return true;
+}
+
+/**
+ * Finds the schema for `path`. This is different than
+ * calling `schema.path` as it also resolves paths with
+ * positional selectors (something.$.another.$.path).
+ *
+ * @param {String} path
+ * @return {Schema}
+ * @api private
+ */
+
+Model._getSchema = function _getSchema(path) {
+ return this.schema._getSchema(path);
+};
+
+/*!
+ * Compiler utility.
+ *
+ * @param {String|Function} name model name or class extending Model
+ * @param {Schema} schema
+ * @param {String} collectionName
+ * @param {Connection} connection
+ * @param {Mongoose} base mongoose instance
+ */
+
+Model.compile = function compile(name, schema, collectionName, connection, base) {
+ var versioningEnabled = schema.options.versionKey !== false;
+
+ if (versioningEnabled && !schema.paths[schema.options.versionKey]) {
+ // add versioning to top level documents only
+ var o = {};
+ o[schema.options.versionKey] = Number;
+ schema.add(o);
+ }
+
+ var model;
+ if (typeof name === 'function' && name.prototype instanceof Model) {
+ model = name;
+ name = model.name;
+ schema.loadClass(model, true);
+ } else {
+ // generate new class
+ model = function model(doc, fields, skipId) {
+ if (!(this instanceof model)) {
+ return new model(doc, fields, skipId);
+ }
+ Model.call(this, doc, fields, skipId);
+ };
+ }
+
+ model.hooks = schema.s.hooks.clone();
+ model.base = base;
+ model.modelName = name;
+ if (!(model.prototype instanceof Model)) {
+ model.__proto__ = Model;
+ model.prototype.__proto__ = Model.prototype;
+ }
+ model.model = Model.prototype.model;
+ model.db = model.prototype.db = connection;
+ model.discriminators = model.prototype.discriminators = undefined;
+
+ model.prototype.$__setSchema(schema);
+
+ var collectionOptions = {
+ bufferCommands: schema.options.bufferCommands,
+ capped: schema.options.capped
+ };
+
+ model.prototype.collection = connection.collection(
+ collectionName
+ , collectionOptions
+ );
+
+ // apply methods and statics
+ applyMethods(model, schema);
+ applyStatics(model, schema);
+
+ model.schema = model.prototype.schema;
+ model.collection = model.prototype.collection;
+
+ // Create custom query constructor
+ model.Query = function() {
+ Query.apply(this, arguments);
+ this.options.retainKeyOrder = model.schema.options.retainKeyOrder;
+ };
+ model.Query.prototype = Object.create(Query.prototype);
+ model.Query.base = Query.base;
+ applyQueryMethods(model, schema.query);
+
+ var kareemOptions = { useErrorHandlers: true };
+ model.$__insertMany = model.hooks.createWrapper('insertMany',
+ model.insertMany, model, kareemOptions);
+ model.insertMany = function(arr, callback) {
+ var Promise = PromiseProvider.get();
+ return new Promise.ES6(function(resolve, reject) {
+ model.$__insertMany(arr, function(error, result) {
+ if (error) {
+ callback && callback(error);
+ return reject(error);
+ }
+ callback && callback(null, result);
+ resolve(result);
+ });
+ });
+ };
+
+ return model;
+};
+
+/*!
+ * Register methods for this model
+ *
+ * @param {Model} model
+ * @param {Schema} schema
+ */
+var applyMethods = function(model, schema) {
+ function apply(method, schema) {
+ Object.defineProperty(model.prototype, method, {
+ get: function() {
+ var h = {};
+ for (var k in schema.methods[method]) {
+ h[k] = schema.methods[method][k].bind(this);
+ }
+ return h;
+ },
+ configurable: true
+ });
+ }
+ for (var method in schema.methods) {
+ if (schema.tree.hasOwnProperty(method)) {
+ throw new Error('You have a method and a property in your schema both ' +
+ 'named "' + method + '"');
+ }
+ if (typeof schema.methods[method] === 'function') {
+ model.prototype[method] = schema.methods[method];
+ } else {
+ apply(method, schema);
+ }
+ }
+};
+
+/*!
+ * Register statics for this model
+ * @param {Model} model
+ * @param {Schema} schema
+ */
+var applyStatics = function(model, schema) {
+ for (var i in schema.statics) {
+ model[i] = schema.statics[i];
+ }
+};
+
+/*!
+ * Register custom query methods for this model
+ *
+ * @param {Model} model
+ * @param {Schema} schema
+ */
+
+function applyQueryMethods(model, methods) {
+ for (var i in methods) {
+ model.Query.prototype[i] = methods[i];
+ }
+}
+
+/*!
+ * Subclass this model with `conn`, `schema`, and `collection` settings.
+ *
+ * @param {Connection} conn
+ * @param {Schema} [schema]
+ * @param {String} [collection]
+ * @return {Model}
+ */
+
+Model.__subclass = function subclass(conn, schema, collection) {
+ // subclass model using this connection and collection name
+ var _this = this;
+
+ var Model = function Model(doc, fields, skipId) {
+ if (!(this instanceof Model)) {
+ return new Model(doc, fields, skipId);
+ }
+ _this.call(this, doc, fields, skipId);
+ };
+
+ Model.__proto__ = _this;
+ Model.prototype.__proto__ = _this.prototype;
+ Model.db = Model.prototype.db = conn;
+
+ var s = schema && typeof schema !== 'string'
+ ? schema
+ : _this.prototype.schema;
+
+ var options = s.options || {};
+
+ if (!collection) {
+ collection = _this.prototype.schema.get('collection')
+ || utils.toCollectionName(_this.modelName, options);
+ }
+
+ var collectionOptions = {
+ bufferCommands: s ? options.bufferCommands : true,
+ capped: s && options.capped
+ };
+
+ Model.prototype.collection = conn.collection(collection, collectionOptions);
+ Model.collection = Model.prototype.collection;
+ Model.init();
+ return Model;
+};
+
+Model.$wrapCallback = function(callback) {
+ var _this = this;
+ return function() {
+ try {
+ callback.apply(null, arguments);
+ } catch (error) {
+ _this.emit('error', error);
+ }
+ };
+};
+
+/*!
+ * Module exports.
+ */
+
+module.exports = exports = Model;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/promise.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/promise.js
new file mode 100644
index 0000000..72163ea
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/promise.js
@@ -0,0 +1,314 @@
+/*!
+ * Module dependencies
+ */
+
+var MPromise = require('mpromise');
+var util = require('util');
+
+/**
+ * Promise constructor.
+ *
+ * Promises are returned from executed queries. Example:
+ *
+ * var query = Candy.find({ bar: true });
+ * var promise = query.exec();
+ *
+ * DEPRECATED. Mongoose 5.0 will use native promises by default (or bluebird,
+ * if native promises are not present) but still
+ * support plugging in your own ES6-compatible promises library. Mongoose 5.0
+ * will **not** support mpromise.
+ *
+ * @param {Function} fn a function which will be called when the promise is resolved that accepts `fn(err, ...){}` as signature
+ * @inherits mpromise https://github.com/aheckmann/mpromise
+ * @inherits NodeJS EventEmitter http://nodejs.org/api/events.html#events_class_events_eventemitter
+ * @event `err`: Emits when the promise is rejected
+ * @event `complete`: Emits when the promise is fulfilled
+ * @api public
+ * @deprecated
+ */
+
+function Promise(fn) {
+ MPromise.call(this, fn);
+}
+
+/**
+ * ES6-style promise constructor wrapper around mpromise.
+ *
+ * @param {Function} resolver
+ * @return {Promise} new promise
+ * @api public
+ */
+Promise.ES6 = function(resolver) {
+ var promise = new Promise();
+
+ // No try/catch for backwards compatibility
+ resolver(
+ function() {
+ promise.complete.apply(promise, arguments);
+ },
+ function(e) {
+ promise.error(e);
+ });
+
+ return promise;
+};
+
+/*!
+ * Inherit from mpromise
+ */
+
+Promise.prototype = Object.create(MPromise.prototype, {
+ constructor: {
+ value: Promise,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+});
+
+/*!
+ * ignore
+ */
+
+Promise.prototype.then = util.deprecate(Promise.prototype.then,
+ 'Mongoose: mpromise (mongoose\'s default promise library) is deprecated, ' +
+ 'plug in your own promise library instead: ' +
+ 'http://mongoosejs.com/docs/promises.html');
+
+/**
+ * ES6-style `.catch()` shorthand
+ *
+ * @method catch
+ * @memberOf Promise
+ * @param {Function} onReject
+ * @return {Promise}
+ * @api public
+ */
+
+Promise.prototype.catch = function(onReject) {
+ return this.then(null, onReject);
+};
+
+/*!
+ * Override event names for backward compatibility.
+ */
+
+Promise.SUCCESS = 'complete';
+Promise.FAILURE = 'err';
+
+/**
+ * Adds `listener` to the `event`.
+ *
+ * If `event` is either the success or failure event and the event has already been emitted, the`listener` is called immediately and passed the results of the original emitted event.
+ *
+ * @see mpromise#on https://github.com/aheckmann/mpromise#on
+ * @method on
+ * @memberOf Promise
+ * @param {String} event
+ * @param {Function} listener
+ * @return {Promise} this
+ * @api public
+ */
+
+/**
+ * Rejects this promise with `reason`.
+ *
+ * If the promise has already been fulfilled or rejected, not action is taken.
+ *
+ * @see mpromise#reject https://github.com/aheckmann/mpromise#reject
+ * @method reject
+ * @memberOf Promise
+ * @param {Object|String|Error} reason
+ * @return {Promise} this
+ * @api public
+ */
+
+/**
+ * Rejects this promise with `err`.
+ *
+ * If the promise has already been fulfilled or rejected, not action is taken.
+ *
+ * Differs from [#reject](#promise_Promise-reject) by first casting `err` to an `Error` if it is not `instanceof Error`.
+ *
+ * @api public
+ * @param {Error|String} err
+ * @return {Promise} this
+ */
+
+Promise.prototype.error = function(err) {
+ if (!(err instanceof Error)) {
+ if (err instanceof Object) {
+ err = util.inspect(err);
+ }
+ err = new Error(err);
+ }
+ return this.reject(err);
+};
+
+/**
+ * Resolves this promise to a rejected state if `err` is passed or a fulfilled state if no `err` is passed.
+ *
+ * If the promise has already been fulfilled or rejected, not action is taken.
+ *
+ * `err` will be cast to an Error if not already instanceof Error.
+ *
+ * _NOTE: overrides [mpromise#resolve](https://github.com/aheckmann/mpromise#resolve) to provide error casting._
+ *
+ * @param {Error} [err] error or null
+ * @param {Object} [val] value to fulfill the promise with
+ * @api public
+ * @deprecated
+ */
+
+Promise.prototype.resolve = function(err) {
+ if (err) return this.error(err);
+ return this.fulfill.apply(this, Array.prototype.slice.call(arguments, 1));
+};
+
+/**
+ * Adds a single function as a listener to both err and complete.
+ *
+ * It will be executed with traditional node.js argument position when the promise is resolved.
+ *
+ * promise.addBack(function (err, args...) {
+ * if (err) return handleError(err);
+ * console.log('success');
+ * })
+ *
+ * Alias of [mpromise#onResolve](https://github.com/aheckmann/mpromise#onresolve).
+ *
+ * _Deprecated. Use `onResolve` instead._
+ *
+ * @method addBack
+ * @param {Function} listener
+ * @return {Promise} this
+ * @deprecated
+ */
+
+Promise.prototype.addBack = Promise.prototype.onResolve;
+
+/**
+ * Fulfills this promise with passed arguments.
+ *
+ * @method fulfill
+ * @receiver Promise
+ * @see https://github.com/aheckmann/mpromise#fulfill
+ * @param {any} args
+ * @api public
+ * @deprecated
+ */
+
+/**
+ * Fulfills this promise with passed arguments.
+ *
+ * Alias of [mpromise#fulfill](https://github.com/aheckmann/mpromise#fulfill).
+ *
+ * _Deprecated. Use `fulfill` instead._
+ *
+ * @method complete
+ * @receiver Promise
+ * @param {any} args
+ * @api public
+ * @deprecated
+ */
+
+Promise.prototype.complete = MPromise.prototype.fulfill;
+
+/**
+ * Adds a listener to the `complete` (success) event.
+ *
+ * Alias of [mpromise#onFulfill](https://github.com/aheckmann/mpromise#onfulfill).
+ *
+ * _Deprecated. Use `onFulfill` instead._
+ *
+ * @method addCallback
+ * @param {Function} listener
+ * @return {Promise} this
+ * @api public
+ * @deprecated
+ */
+
+Promise.prototype.addCallback = Promise.prototype.onFulfill;
+
+/**
+ * Adds a listener to the `err` (rejected) event.
+ *
+ * Alias of [mpromise#onReject](https://github.com/aheckmann/mpromise#onreject).
+ *
+ * _Deprecated. Use `onReject` instead._
+ *
+ * @method addErrback
+ * @param {Function} listener
+ * @return {Promise} this
+ * @api public
+ * @deprecated
+ */
+
+Promise.prototype.addErrback = Promise.prototype.onReject;
+
+/**
+ * Creates a new promise and returns it. If `onFulfill` or `onReject` are passed, they are added as SUCCESS/ERROR callbacks to this promise after the nextTick.
+ *
+ * Conforms to [promises/A+](https://github.com/promises-aplus/promises-spec) specification.
+ *
+ * ####Example:
+ *
+ * var promise = Meetups.find({ tags: 'javascript' }).select('_id').exec();
+ * promise.then(function (meetups) {
+ * var ids = meetups.map(function (m) {
+ * return m._id;
+ * });
+ * return People.find({ meetups: { $in: ids }).exec();
+ * }).then(function (people) {
+ * if (people.length < 10000) {
+ * throw new Error('Too few people!!!');
+ * } else {
+ * throw new Error('Still need more people!!!');
+ * }
+ * }).then(null, function (err) {
+ * assert.ok(err instanceof Error);
+ * });
+ *
+ * @see promises-A+ https://github.com/promises-aplus/promises-spec
+ * @see mpromise#then https://github.com/aheckmann/mpromise#then
+ * @method then
+ * @memberOf Promise
+ * @param {Function} onFulFill
+ * @param {Function} onReject
+ * @return {Promise} newPromise
+ * @deprecated
+ */
+
+/**
+ * Signifies that this promise was the last in a chain of `then()s`: if a handler passed to the call to `then` which produced this promise throws, the exception will go uncaught.
+ *
+ * ####Example:
+ *
+ * var p = new Promise;
+ * p.then(function(){ throw new Error('shucks') });
+ * setTimeout(function () {
+ * p.fulfill();
+ * // error was caught and swallowed by the promise returned from
+ * // p.then(). we either have to always register handlers on
+ * // the returned promises or we can do the following...
+ * }, 10);
+ *
+ * // this time we use .end() which prevents catching thrown errors
+ * var p = new Promise;
+ * var p2 = p.then(function(){ throw new Error('shucks') }).end(); // <--
+ * setTimeout(function () {
+ * p.fulfill(); // throws "shucks"
+ * }, 10);
+ *
+ * @api public
+ * @see mpromise#end https://github.com/aheckmann/mpromise#end
+ * @method end
+ * @memberOf Promise
+ * @deprecated
+ */
+
+/*!
+ * expose
+ */
+
+module.exports = Promise;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/promise_provider.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/promise_provider.js
new file mode 100644
index 0000000..368cf85
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/promise_provider.js
@@ -0,0 +1,51 @@
+/*!
+ * Module dependencies.
+ */
+
+var MPromise = require('./promise');
+
+/**
+ * Helper for multiplexing promise implementations
+ *
+ * @api private
+ */
+
+var Promise = {
+ _promise: MPromise
+};
+
+/**
+ * Get the current promise constructor
+ *
+ * @api private
+ */
+Promise.get = function() {
+ return Promise._promise;
+};
+
+/**
+ * Set the current promise constructor
+ *
+ * @api private
+ */
+
+Promise.set = function(lib) {
+ if (lib === MPromise) {
+ return Promise.reset();
+ }
+ Promise._promise = require('./ES6Promise');
+ Promise._promise.use(lib);
+ require('mquery').Promise = Promise._promise.ES6;
+};
+
+/**
+ * Resets to using mpromise
+ *
+ * @api private
+ */
+
+Promise.reset = function() {
+ Promise._promise = MPromise;
+};
+
+module.exports = Promise;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/query.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/query.js
new file mode 100644
index 0000000..66a5537
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/query.js
@@ -0,0 +1,3413 @@
+/*!
+ * Module dependencies.
+ */
+
+var PromiseProvider = require('./promise_provider');
+var QueryCursor = require('./querycursor');
+var QueryStream = require('./querystream');
+var StrictModeError = require('./error/strict');
+var cast = require('./cast');
+var helpers = require('./queryhelpers');
+var mquery = require('mquery');
+var readPref = require('./drivers').ReadPreference;
+var setDefaultsOnInsert = require('./services/setDefaultsOnInsert');
+var updateValidators = require('./services/updateValidators');
+var util = require('util');
+var utils = require('./utils');
+
+/**
+ * Query constructor used for building queries.
+ *
+ * ####Example:
+ *
+ * var query = new Query();
+ * query.setOptions({ lean : true });
+ * query.collection(model.collection);
+ * query.where('age').gte(21).exec(callback);
+ *
+ * @param {Object} [options]
+ * @param {Object} [model]
+ * @param {Object} [conditions]
+ * @param {Object} [collection] Mongoose collection
+ * @api private
+ */
+
+function Query(conditions, options, model, collection) {
+ // this stuff is for dealing with custom queries created by #toConstructor
+ if (!this._mongooseOptions) {
+ this._mongooseOptions = {};
+ }
+
+ // this is the case where we have a CustomQuery, we need to check if we got
+ // options passed in, and if we did, merge them in
+ if (options) {
+ var keys = Object.keys(options);
+ for (var i = 0; i < keys.length; ++i) {
+ var k = keys[i];
+ this._mongooseOptions[k] = options[k];
+ }
+ }
+
+ if (collection) {
+ this.mongooseCollection = collection;
+ }
+
+ if (model) {
+ this.model = model;
+ this.schema = model.schema;
+ }
+
+ // this is needed because map reduce returns a model that can be queried, but
+ // all of the queries on said model should be lean
+ if (this.model && this.model._mapreduce) {
+ this.lean();
+ }
+
+ // inherit mquery
+ mquery.call(this, this.mongooseCollection, options);
+
+ if (conditions) {
+ this.find(conditions);
+ }
+
+ if (this.schema) {
+ var kareemOptions = { useErrorHandlers: true };
+ this._count = this.model.hooks.createWrapper('count',
+ Query.prototype._count, this, kareemOptions);
+ this._execUpdate = this.model.hooks.createWrapper('update',
+ Query.prototype._execUpdate, this, kareemOptions);
+ this._find = this.model.hooks.createWrapper('find',
+ Query.prototype._find, this, kareemOptions);
+ this._findOne = this.model.hooks.createWrapper('findOne',
+ Query.prototype._findOne, this, kareemOptions);
+ this._findOneAndRemove = this.model.hooks.createWrapper('findOneAndRemove',
+ Query.prototype._findOneAndRemove, this, kareemOptions);
+ this._findOneAndUpdate = this.model.hooks.createWrapper('findOneAndUpdate',
+ Query.prototype._findOneAndUpdate, this, kareemOptions);
+ }
+}
+
+/*!
+ * inherit mquery
+ */
+
+Query.prototype = new mquery;
+Query.prototype.constructor = Query;
+Query.base = mquery.prototype;
+
+/**
+ * Flag to opt out of using `$geoWithin`.
+ *
+ * mongoose.Query.use$geoWithin = false;
+ *
+ * MongoDB 2.4 deprecated the use of `$within`, replacing it with `$geoWithin`. Mongoose uses `$geoWithin` by default (which is 100% backward compatible with $within). If you are running an older version of MongoDB, set this flag to `false` so your `within()` queries continue to work.
+ *
+ * @see http://docs.mongodb.org/manual/reference/operator/geoWithin/
+ * @default true
+ * @property use$geoWithin
+ * @memberOf Query
+ * @receiver Query
+ * @api public
+ */
+
+Query.use$geoWithin = mquery.use$geoWithin;
+
+/**
+ * Converts this query to a customized, reusable query constructor with all arguments and options retained.
+ *
+ * ####Example
+ *
+ * // Create a query for adventure movies and read from the primary
+ * // node in the replica-set unless it is down, in which case we'll
+ * // read from a secondary node.
+ * var query = Movie.find({ tags: 'adventure' }).read('primaryPreferred');
+ *
+ * // create a custom Query constructor based off these settings
+ * var Adventure = query.toConstructor();
+ *
+ * // Adventure is now a subclass of mongoose.Query and works the same way but with the
+ * // default query parameters and options set.
+ * Adventure().exec(callback)
+ *
+ * // further narrow down our query results while still using the previous settings
+ * Adventure().where({ name: /^Life/ }).exec(callback);
+ *
+ * // since Adventure is a stand-alone constructor we can also add our own
+ * // helper methods and getters without impacting global queries
+ * Adventure.prototype.startsWith = function (prefix) {
+ * this.where({ name: new RegExp('^' + prefix) })
+ * return this;
+ * }
+ * Object.defineProperty(Adventure.prototype, 'highlyRated', {
+ * get: function () {
+ * this.where({ rating: { $gt: 4.5 }});
+ * return this;
+ * }
+ * })
+ * Adventure().highlyRated.startsWith('Life').exec(callback)
+ *
+ * New in 3.7.3
+ *
+ * @return {Query} subclass-of-Query
+ * @api public
+ */
+
+Query.prototype.toConstructor = function toConstructor() {
+ var model = this.model;
+ var coll = this.mongooseCollection;
+
+ var CustomQuery = function(criteria, options) {
+ if (!(this instanceof CustomQuery)) {
+ return new CustomQuery(criteria, options);
+ }
+ this._mongooseOptions = utils.clone(p._mongooseOptions);
+ Query.call(this, criteria, options || null, model, coll);
+ };
+
+ util.inherits(CustomQuery, Query);
+
+ // set inherited defaults
+ var p = CustomQuery.prototype;
+
+ p.options = {};
+
+ p.setOptions(this.options);
+
+ p.op = this.op;
+ p._conditions = utils.clone(this._conditions, { retainKeyOrder: true });
+ p._fields = utils.clone(this._fields);
+ p._update = utils.clone(this._update);
+ p._path = this._path;
+ p._distinct = this._distinct;
+ p._collection = this._collection;
+ p._mongooseOptions = this._mongooseOptions;
+
+ return CustomQuery;
+};
+
+/**
+ * Specifies a javascript function or expression to pass to MongoDBs query system.
+ *
+ * ####Example
+ *
+ * query.$where('this.comments.length === 10 || this.name.length === 5')
+ *
+ * // or
+ *
+ * query.$where(function () {
+ * return this.comments.length === 10 || this.name.length === 5;
+ * })
+ *
+ * ####NOTE:
+ *
+ * Only use `$where` when you have a condition that cannot be met using other MongoDB operators like `$lt`.
+ * **Be sure to read about all of [its caveats](http://docs.mongodb.org/manual/reference/operator/where/) before using.**
+ *
+ * @see $where http://docs.mongodb.org/manual/reference/operator/where/
+ * @method $where
+ * @param {String|Function} js javascript string or function
+ * @return {Query} this
+ * @memberOf Query
+ * @method $where
+ * @api public
+ */
+
+/**
+ * Specifies a `path` for use with chaining.
+ *
+ * ####Example
+ *
+ * // instead of writing:
+ * User.find({age: {$gte: 21, $lte: 65}}, callback);
+ *
+ * // we can instead write:
+ * User.where('age').gte(21).lte(65);
+ *
+ * // passing query conditions is permitted
+ * User.find().where({ name: 'vonderful' })
+ *
+ * // chaining
+ * User
+ * .where('age').gte(21).lte(65)
+ * .where('name', /^vonderful/i)
+ * .where('friends').slice(10)
+ * .exec(callback)
+ *
+ * @method where
+ * @memberOf Query
+ * @param {String|Object} [path]
+ * @param {any} [val]
+ * @return {Query} this
+ * @api public
+ */
+
+/**
+ * Specifies the complementary comparison value for paths specified with `where()`
+ *
+ * ####Example
+ *
+ * User.where('age').equals(49);
+ *
+ * // is the same as
+ *
+ * User.where('age', 49);
+ *
+ * @method equals
+ * @memberOf Query
+ * @param {Object} val
+ * @return {Query} this
+ * @api public
+ */
+
+/**
+ * Specifies arguments for an `$or` condition.
+ *
+ * ####Example
+ *
+ * query.or([{ color: 'red' }, { status: 'emergency' }])
+ *
+ * @see $or http://docs.mongodb.org/manual/reference/operator/or/
+ * @method or
+ * @memberOf Query
+ * @param {Array} array array of conditions
+ * @return {Query} this
+ * @api public
+ */
+
+/**
+ * Specifies arguments for a `$nor` condition.
+ *
+ * ####Example
+ *
+ * query.nor([{ color: 'green' }, { status: 'ok' }])
+ *
+ * @see $nor http://docs.mongodb.org/manual/reference/operator/nor/
+ * @method nor
+ * @memberOf Query
+ * @param {Array} array array of conditions
+ * @return {Query} this
+ * @api public
+ */
+
+/**
+ * Specifies arguments for a `$and` condition.
+ *
+ * ####Example
+ *
+ * query.and([{ color: 'green' }, { status: 'ok' }])
+ *
+ * @method and
+ * @memberOf Query
+ * @see $and http://docs.mongodb.org/manual/reference/operator/and/
+ * @param {Array} array array of conditions
+ * @return {Query} this
+ * @api public
+ */
+
+/**
+ * Specifies a $gt query condition.
+ *
+ * When called with one argument, the most recent path passed to `where()` is used.
+ *
+ * ####Example
+ *
+ * Thing.find().where('age').gt(21)
+ *
+ * // or
+ * Thing.find().gt('age', 21)
+ *
+ * @method gt
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @see $gt http://docs.mongodb.org/manual/reference/operator/gt/
+ * @api public
+ */
+
+/**
+ * Specifies a $gte query condition.
+ *
+ * When called with one argument, the most recent path passed to `where()` is used.
+ *
+ * @method gte
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @see $gte http://docs.mongodb.org/manual/reference/operator/gte/
+ * @api public
+ */
+
+/**
+ * Specifies a $lt query condition.
+ *
+ * When called with one argument, the most recent path passed to `where()` is used.
+ *
+ * @method lt
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @see $lt http://docs.mongodb.org/manual/reference/operator/lt/
+ * @api public
+ */
+
+/**
+ * Specifies a $lte query condition.
+ *
+ * When called with one argument, the most recent path passed to `where()` is used.
+ *
+ * @method lte
+ * @see $lte http://docs.mongodb.org/manual/reference/operator/lte/
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @api public
+ */
+
+/**
+ * Specifies a $ne query condition.
+ *
+ * When called with one argument, the most recent path passed to `where()` is used.
+ *
+ * @see $ne http://docs.mongodb.org/manual/reference/operator/ne/
+ * @method ne
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @api public
+ */
+
+/**
+ * Specifies an $in query condition.
+ *
+ * When called with one argument, the most recent path passed to `where()` is used.
+ *
+ * @see $in http://docs.mongodb.org/manual/reference/operator/in/
+ * @method in
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @api public
+ */
+
+/**
+ * Specifies an $nin query condition.
+ *
+ * When called with one argument, the most recent path passed to `where()` is used.
+ *
+ * @see $nin http://docs.mongodb.org/manual/reference/operator/nin/
+ * @method nin
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @api public
+ */
+
+/**
+ * Specifies an $all query condition.
+ *
+ * When called with one argument, the most recent path passed to `where()` is used.
+ *
+ * @see $all http://docs.mongodb.org/manual/reference/operator/all/
+ * @method all
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @api public
+ */
+
+/**
+ * Specifies a $size query condition.
+ *
+ * When called with one argument, the most recent path passed to `where()` is used.
+ *
+ * ####Example
+ *
+ * MyModel.where('tags').size(0).exec(function (err, docs) {
+ * if (err) return handleError(err);
+ *
+ * assert(Array.isArray(docs));
+ * console.log('documents with 0 tags', docs);
+ * })
+ *
+ * @see $size http://docs.mongodb.org/manual/reference/operator/size/
+ * @method size
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @api public
+ */
+
+/**
+ * Specifies a $regex query condition.
+ *
+ * When called with one argument, the most recent path passed to `where()` is used.
+ *
+ * @see $regex http://docs.mongodb.org/manual/reference/operator/regex/
+ * @method regex
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @api public
+ */
+
+/**
+ * Specifies a $maxDistance query condition.
+ *
+ * When called with one argument, the most recent path passed to `where()` is used.
+ *
+ * @see $maxDistance http://docs.mongodb.org/manual/reference/operator/maxDistance/
+ * @method maxDistance
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @api public
+ */
+
+/**
+ * Specifies a `$mod` condition
+ *
+ * @method mod
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @return {Query} this
+ * @see $mod http://docs.mongodb.org/manual/reference/operator/mod/
+ * @api public
+ */
+
+/**
+ * Specifies an `$exists` condition
+ *
+ * ####Example
+ *
+ * // { name: { $exists: true }}
+ * Thing.where('name').exists()
+ * Thing.where('name').exists(true)
+ * Thing.find().exists('name')
+ *
+ * // { name: { $exists: false }}
+ * Thing.where('name').exists(false);
+ * Thing.find().exists('name', false);
+ *
+ * @method exists
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @return {Query} this
+ * @see $exists http://docs.mongodb.org/manual/reference/operator/exists/
+ * @api public
+ */
+
+/**
+ * Specifies an `$elemMatch` condition
+ *
+ * ####Example
+ *
+ * query.elemMatch('comment', { author: 'autobot', votes: {$gte: 5}})
+ *
+ * query.where('comment').elemMatch({ author: 'autobot', votes: {$gte: 5}})
+ *
+ * query.elemMatch('comment', function (elem) {
+ * elem.where('author').equals('autobot');
+ * elem.where('votes').gte(5);
+ * })
+ *
+ * query.where('comment').elemMatch(function (elem) {
+ * elem.where({ author: 'autobot' });
+ * elem.where('votes').gte(5);
+ * })
+ *
+ * @method elemMatch
+ * @memberOf Query
+ * @param {String|Object|Function} path
+ * @param {Object|Function} criteria
+ * @return {Query} this
+ * @see $elemMatch http://docs.mongodb.org/manual/reference/operator/elemMatch/
+ * @api public
+ */
+
+/**
+ * Defines a `$within` or `$geoWithin` argument for geo-spatial queries.
+ *
+ * ####Example
+ *
+ * query.where(path).within().box()
+ * query.where(path).within().circle()
+ * query.where(path).within().geometry()
+ *
+ * query.where('loc').within({ center: [50,50], radius: 10, unique: true, spherical: true });
+ * query.where('loc').within({ box: [[40.73, -73.9], [40.7, -73.988]] });
+ * query.where('loc').within({ polygon: [[],[],[],[]] });
+ *
+ * query.where('loc').within([], [], []) // polygon
+ * query.where('loc').within([], []) // box
+ * query.where('loc').within({ type: 'LineString', coordinates: [...] }); // geometry
+ *
+ * **MUST** be used after `where()`.
+ *
+ * ####NOTE:
+ *
+ * As of Mongoose 3.7, `$geoWithin` is always used for queries. To change this behavior, see [Query.use$geoWithin](#query_Query-use%2524geoWithin).
+ *
+ * ####NOTE:
+ *
+ * In Mongoose 3.7, `within` changed from a getter to a function. If you need the old syntax, use [this](https://github.com/ebensing/mongoose-within).
+ *
+ * @method within
+ * @see $polygon http://docs.mongodb.org/manual/reference/operator/polygon/
+ * @see $box http://docs.mongodb.org/manual/reference/operator/box/
+ * @see $geometry http://docs.mongodb.org/manual/reference/operator/geometry/
+ * @see $center http://docs.mongodb.org/manual/reference/operator/center/
+ * @see $centerSphere http://docs.mongodb.org/manual/reference/operator/centerSphere/
+ * @memberOf Query
+ * @return {Query} this
+ * @api public
+ */
+
+/**
+ * Specifies a $slice projection for an array.
+ *
+ * ####Example
+ *
+ * query.slice('comments', 5)
+ * query.slice('comments', -5)
+ * query.slice('comments', [10, 5])
+ * query.where('comments').slice(5)
+ * query.where('comments').slice([-10, 5])
+ *
+ * @method slice
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val number/range of elements to slice
+ * @return {Query} this
+ * @see mongodb http://www.mongodb.org/display/DOCS/Retrieving+a+Subset+of+Fields#RetrievingaSubsetofFields-RetrievingaSubrangeofArrayElements
+ * @see $slice http://docs.mongodb.org/manual/reference/projection/slice/#prj._S_slice
+ * @api public
+ */
+
+/**
+ * Specifies the maximum number of documents the query will return.
+ *
+ * ####Example
+ *
+ * query.limit(20)
+ *
+ * ####Note
+ *
+ * Cannot be used with `distinct()`
+ *
+ * @method limit
+ * @memberOf Query
+ * @param {Number} val
+ * @api public
+ */
+
+/**
+ * Specifies the number of documents to skip.
+ *
+ * ####Example
+ *
+ * query.skip(100).limit(20)
+ *
+ * ####Note
+ *
+ * Cannot be used with `distinct()`
+ *
+ * @method skip
+ * @memberOf Query
+ * @param {Number} val
+ * @see cursor.skip http://docs.mongodb.org/manual/reference/method/cursor.skip/
+ * @api public
+ */
+
+/**
+ * Specifies the maxScan option.
+ *
+ * ####Example
+ *
+ * query.maxScan(100)
+ *
+ * ####Note
+ *
+ * Cannot be used with `distinct()`
+ *
+ * @method maxScan
+ * @memberOf Query
+ * @param {Number} val
+ * @see maxScan http://docs.mongodb.org/manual/reference/operator/maxScan/
+ * @api public
+ */
+
+/**
+ * Specifies the batchSize option.
+ *
+ * ####Example
+ *
+ * query.batchSize(100)
+ *
+ * ####Note
+ *
+ * Cannot be used with `distinct()`
+ *
+ * @method batchSize
+ * @memberOf Query
+ * @param {Number} val
+ * @see batchSize http://docs.mongodb.org/manual/reference/method/cursor.batchSize/
+ * @api public
+ */
+
+/**
+ * Specifies the `comment` option.
+ *
+ * ####Example
+ *
+ * query.comment('login query')
+ *
+ * ####Note
+ *
+ * Cannot be used with `distinct()`
+ *
+ * @method comment
+ * @memberOf Query
+ * @param {Number} val
+ * @see comment http://docs.mongodb.org/manual/reference/operator/comment/
+ * @api public
+ */
+
+/**
+ * Specifies this query as a `snapshot` query.
+ *
+ * ####Example
+ *
+ * query.snapshot() // true
+ * query.snapshot(true)
+ * query.snapshot(false)
+ *
+ * ####Note
+ *
+ * Cannot be used with `distinct()`
+ *
+ * @method snapshot
+ * @memberOf Query
+ * @see snapshot http://docs.mongodb.org/manual/reference/operator/snapshot/
+ * @return {Query} this
+ * @api public
+ */
+
+/**
+ * Sets query hints.
+ *
+ * ####Example
+ *
+ * query.hint({ indexA: 1, indexB: -1})
+ *
+ * ####Note
+ *
+ * Cannot be used with `distinct()`
+ *
+ * @method hint
+ * @memberOf Query
+ * @param {Object} val a hint object
+ * @return {Query} this
+ * @see $hint http://docs.mongodb.org/manual/reference/operator/hint/
+ * @api public
+ */
+
+/**
+ * Specifies which document fields to include or exclude (also known as the query "projection")
+ *
+ * When using string syntax, prefixing a path with `-` will flag that path as excluded. When a path does not have the `-` prefix, it is included. Lastly, if a path is prefixed with `+`, it forces inclusion of the path, which is useful for paths excluded at the [schema level](/docs/api.html#schematype_SchemaType-select).
+ *
+ * ####Example
+ *
+ * // include a and b, exclude other fields
+ * query.select('a b');
+ *
+ * // exclude c and d, include other fields
+ * query.select('-c -d');
+ *
+ * // or you may use object notation, useful when
+ * // you have keys already prefixed with a "-"
+ * query.select({ a: 1, b: 1 });
+ * query.select({ c: 0, d: 0 });
+ *
+ * // force inclusion of field excluded at schema level
+ * query.select('+path')
+ *
+ * ####NOTE:
+ *
+ * Cannot be used with `distinct()`.
+ *
+ * _v2 had slightly different syntax such as allowing arrays of field names. This support was removed in v3._
+ *
+ * @method select
+ * @memberOf Query
+ * @param {Object|String} arg
+ * @return {Query} this
+ * @see SchemaType
+ * @api public
+ */
+
+/**
+ * _DEPRECATED_ Sets the slaveOk option.
+ *
+ * **Deprecated** in MongoDB 2.2 in favor of [read preferences](#query_Query-read).
+ *
+ * ####Example:
+ *
+ * query.slaveOk() // true
+ * query.slaveOk(true)
+ * query.slaveOk(false)
+ *
+ * @method slaveOk
+ * @memberOf Query
+ * @deprecated use read() preferences instead if on mongodb >= 2.2
+ * @param {Boolean} v defaults to true
+ * @see mongodb http://docs.mongodb.org/manual/applications/replication/#read-preference
+ * @see slaveOk http://docs.mongodb.org/manual/reference/method/rs.slaveOk/
+ * @see read() #query_Query-read
+ * @return {Query} this
+ * @api public
+ */
+
+/**
+ * Determines the MongoDB nodes from which to read.
+ *
+ * ####Preferences:
+ *
+ * primary - (default) Read from primary only. Operations will produce an error if primary is unavailable. Cannot be combined with tags.
+ * secondary Read from secondary if available, otherwise error.
+ * primaryPreferred Read from primary if available, otherwise a secondary.
+ * secondaryPreferred Read from a secondary if available, otherwise read from the primary.
+ * nearest All operations read from among the nearest candidates, but unlike other modes, this option will include both the primary and all secondaries in the random selection.
+ *
+ * Aliases
+ *
+ * p primary
+ * pp primaryPreferred
+ * s secondary
+ * sp secondaryPreferred
+ * n nearest
+ *
+ * ####Example:
+ *
+ * new Query().read('primary')
+ * new Query().read('p') // same as primary
+ *
+ * new Query().read('primaryPreferred')
+ * new Query().read('pp') // same as primaryPreferred
+ *
+ * new Query().read('secondary')
+ * new Query().read('s') // same as secondary
+ *
+ * new Query().read('secondaryPreferred')
+ * new Query().read('sp') // same as secondaryPreferred
+ *
+ * new Query().read('nearest')
+ * new Query().read('n') // same as nearest
+ *
+ * // read from secondaries with matching tags
+ * new Query().read('s', [{ dc:'sf', s: 1 },{ dc:'ma', s: 2 }])
+ *
+ * Read more about how to use read preferrences [here](http://docs.mongodb.org/manual/applications/replication/#read-preference) and [here](http://mongodb.github.com/node-mongodb-native/driver-articles/anintroductionto1_1and2_2.html#read-preferences).
+ *
+ * @method read
+ * @memberOf Query
+ * @param {String} pref one of the listed preference options or aliases
+ * @param {Array} [tags] optional tags for this query
+ * @see mongodb http://docs.mongodb.org/manual/applications/replication/#read-preference
+ * @see driver http://mongodb.github.com/node-mongodb-native/driver-articles/anintroductionto1_1and2_2.html#read-preferences
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.read = function read(pref, tags) {
+ // first cast into a ReadPreference object to support tags
+ var read = readPref.call(readPref, pref, tags);
+ return Query.base.read.call(this, read);
+};
+
+/**
+ * Merges another Query or conditions object into this one.
+ *
+ * When a Query is passed, conditions, field selection and options are merged.
+ *
+ * New in 3.7.0
+ *
+ * @method merge
+ * @memberOf Query
+ * @param {Query|Object} source
+ * @return {Query} this
+ */
+
+/**
+ * Sets query options.
+ *
+ * ####Options:
+ *
+ * - [tailable](http://www.mongodb.org/display/DOCS/Tailable+Cursors) *
+ * - [sort](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%7B%7Bsort(\)%7D%7D) *
+ * - [limit](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%7B%7Blimit%28%29%7D%7D) *
+ * - [skip](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%7B%7Bskip%28%29%7D%7D) *
+ * - [maxscan](https://docs.mongodb.org/v3.2/reference/operator/meta/maxScan/#metaOp._S_maxScan) *
+ * - [batchSize](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%7B%7BbatchSize%28%29%7D%7D) *
+ * - [comment](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24comment) *
+ * - [snapshot](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%7B%7Bsnapshot%28%29%7D%7D) *
+ * - [hint](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24hint) *
+ * - [readPreference](http://docs.mongodb.org/manual/applications/replication/#read-preference) **
+ * - [lean](./api.html#query_Query-lean) *
+ * - [safe](http://www.mongodb.org/display/DOCS/getLastError+Command)
+ *
+ * _* denotes a query helper method is also available_
+ * _** query helper method to set `readPreference` is `read()`_
+ *
+ * @param {Object} options
+ * @api public
+ */
+
+Query.prototype.setOptions = function(options, overwrite) {
+ // overwrite is only for internal use
+ if (overwrite) {
+ // ensure that _mongooseOptions & options are two different objects
+ this._mongooseOptions = (options && utils.clone(options)) || {};
+ this.options = options || {};
+
+ if ('populate' in options) {
+ this.populate(this._mongooseOptions);
+ }
+ return this;
+ }
+
+ if (!(options && options.constructor.name === 'Object')) {
+ return this;
+ }
+
+ if (options && Array.isArray(options.populate)) {
+ var populate = options.populate;
+ delete options.populate;
+ var _numPopulate = populate.length;
+ for (var i = 0; i < _numPopulate; ++i) {
+ this.populate(populate[i]);
+ }
+ }
+
+ return Query.base.setOptions.call(this, options);
+};
+
+/**
+ * Returns the current query conditions as a JSON object.
+ *
+ * ####Example:
+ *
+ * var query = new Query();
+ * query.find({ a: 1 }).where('b').gt(2);
+ * query.getQuery(); // { a: 1, b: { $gt: 2 } }
+ *
+ * @return {Object} current query conditions
+ * @api public
+ */
+
+Query.prototype.getQuery = function() {
+ return this._conditions;
+};
+
+/**
+ * Returns the current update operations as a JSON object.
+ *
+ * ####Example:
+ *
+ * var query = new Query();
+ * query.update({}, { $set: { a: 5 } });
+ * query.getUpdate(); // { $set: { a: 5 } }
+ *
+ * @return {Object} current update operations
+ * @api public
+ */
+
+Query.prototype.getUpdate = function() {
+ return this._update;
+};
+
+/**
+ * Returns fields selection for this query.
+ *
+ * @method _fieldsForExec
+ * @return {Object}
+ * @api private
+ * @receiver Query
+ */
+
+/**
+ * Return an update document with corrected $set operations.
+ *
+ * @method _updateForExec
+ * @api private
+ * @receiver Query
+ */
+
+Query.prototype._updateForExec = function() {
+ var update = utils.clone(this._update, {
+ retainKeyOrder: true,
+ transform: false,
+ depopulate: true
+ });
+ var ops = Object.keys(update);
+ var i = ops.length;
+ var ret = {};
+
+ while (i--) {
+ var op = ops[i];
+
+ if (this.options.overwrite) {
+ ret[op] = update[op];
+ continue;
+ }
+
+ if ('$' !== op[0]) {
+ // fix up $set sugar
+ if (!ret.$set) {
+ if (update.$set) {
+ ret.$set = update.$set;
+ } else {
+ ret.$set = {};
+ }
+ }
+ ret.$set[op] = update[op];
+ ops.splice(i, 1);
+ if (!~ops.indexOf('$set')) ops.push('$set');
+ } else if ('$set' === op) {
+ if (!ret.$set) {
+ ret[op] = update[op];
+ }
+ } else {
+ ret[op] = update[op];
+ }
+ }
+
+ this._compiledUpdate = ret;
+ return ret;
+};
+
+/**
+ * Makes sure _path is set.
+ *
+ * @method _ensurePath
+ * @param {String} method
+ * @api private
+ * @receiver Query
+ */
+
+/**
+ * Determines if `conds` can be merged using `mquery().merge()`
+ *
+ * @method canMerge
+ * @memberOf Query
+ * @param {Object} conds
+ * @return {Boolean}
+ * @api private
+ */
+
+/**
+ * Returns default options for this query.
+ *
+ * @param {Model} model
+ * @api private
+ */
+
+Query.prototype._optionsForExec = function(model) {
+ var options = Query.base._optionsForExec.call(this);
+
+ delete options.populate;
+ delete options.retainKeyOrder;
+ model = model || this.model;
+
+ if (!model) {
+ return options;
+ }
+
+ if (!('safe' in options) && model.schema.options.safe) {
+ options.safe = model.schema.options.safe;
+ }
+
+ if (!('readPreference' in options) && model.schema.options.read) {
+ options.readPreference = model.schema.options.read;
+ }
+
+ return options;
+};
+
+/**
+ * Sets the lean option.
+ *
+ * Documents returned from queries with the `lean` option enabled are plain javascript objects, not [MongooseDocuments](#document-js). They have no `save` method, getters/setters or other Mongoose magic applied.
+ *
+ * ####Example:
+ *
+ * new Query().lean() // true
+ * new Query().lean(true)
+ * new Query().lean(false)
+ *
+ * Model.find().lean().exec(function (err, docs) {
+ * docs[0] instanceof mongoose.Document // false
+ * });
+ *
+ * This is a [great](https://groups.google.com/forum/#!topic/mongoose-orm/u2_DzDydcnA/discussion) option in high-performance read-only scenarios, especially when combined with [stream](#query_Query-stream).
+ *
+ * @param {Boolean} bool defaults to true
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.lean = function(v) {
+ this._mongooseOptions.lean = arguments.length ? !!v : true;
+ return this;
+};
+
+/**
+ * Thunk around find()
+ *
+ * @param {Function} [callback]
+ * @return {Query} this
+ * @api private
+ */
+Query.prototype._find = function(callback) {
+ if (this._castError) {
+ callback(this._castError);
+ return this;
+ }
+
+ this._applyPaths();
+ this._fields = this._castFields(this._fields);
+
+ var fields = this._fieldsForExec();
+ var options = this._mongooseOptions;
+ var _this = this;
+
+ var cb = function(err, docs) {
+ if (err) {
+ return callback(err);
+ }
+
+ if (docs.length === 0) {
+ return callback(null, docs);
+ }
+
+ if (!options.populate) {
+ return options.lean === true
+ ? callback(null, docs)
+ : completeMany(_this.model, docs, fields, _this, null, callback);
+ }
+
+ var pop = helpers.preparePopulationOptionsMQ(_this, options);
+ pop.__noPromise = true;
+ _this.model.populate(docs, pop, function(err, docs) {
+ if (err) return callback(err);
+ return options.lean === true
+ ? callback(null, docs)
+ : completeMany(_this.model, docs, fields, _this, pop, callback);
+ });
+ };
+
+ return Query.base.find.call(this, {}, cb);
+};
+
+/**
+ * Finds documents.
+ *
+ * When no `callback` is passed, the query is not executed. When the query is executed, the result will be an array of documents.
+ *
+ * ####Example
+ *
+ * query.find({ name: 'Los Pollos Hermanos' }).find(callback)
+ *
+ * @param {Object} [criteria] mongodb selector
+ * @param {Function} [callback]
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.find = function(conditions, callback) {
+ if (typeof conditions === 'function') {
+ callback = conditions;
+ conditions = {};
+ }
+
+ conditions = utils.toObject(conditions);
+
+ if (mquery.canMerge(conditions)) {
+ this.merge(conditions);
+ }
+
+ prepareDiscriminatorCriteria(this);
+
+ try {
+ this.cast(this.model);
+ this._castError = null;
+ } catch (err) {
+ this._castError = err;
+ }
+
+ // if we don't have a callback, then just return the query object
+ if (!callback) {
+ return Query.base.find.call(this);
+ }
+
+ this._find(callback);
+
+ return this;
+};
+
+/**
+ * Merges another Query or conditions object into this one.
+ *
+ * When a Query is passed, conditions, field selection and options are merged.
+ *
+ * @param {Query|Object} source
+ * @return {Query} this
+ */
+
+Query.prototype.merge = function(source) {
+ if (!source) {
+ return this;
+ }
+
+ var opts = { retainKeyOrder: this.options.retainKeyOrder, overwrite: true };
+
+ if (source instanceof Query) {
+ // if source has a feature, apply it to ourselves
+
+ if (source._conditions) {
+ utils.merge(this._conditions, source._conditions, opts);
+ }
+
+ if (source._fields) {
+ this._fields || (this._fields = {});
+ utils.merge(this._fields, source._fields, opts);
+ }
+
+ if (source.options) {
+ this.options || (this.options = {});
+ utils.merge(this.options, source.options, opts);
+ }
+
+ if (source._update) {
+ this._update || (this._update = {});
+ utils.mergeClone(this._update, source._update);
+ }
+
+ if (source._distinct) {
+ this._distinct = source._distinct;
+ }
+
+ return this;
+ }
+
+ // plain object
+ utils.merge(this._conditions, source, opts);
+
+ return this;
+};
+
+/*!
+ * hydrates many documents
+ *
+ * @param {Model} model
+ * @param {Array} docs
+ * @param {Object} fields
+ * @param {Query} self
+ * @param {Array} [pop] array of paths used in population
+ * @param {Function} callback
+ */
+
+function completeMany(model, docs, fields, self, pop, callback) {
+ var arr = [];
+ var count = docs.length;
+ var len = count;
+ var opts = pop ?
+ {populated: pop}
+ : undefined;
+ function init(err) {
+ if (err) return callback(err);
+ --count || callback(null, arr);
+ }
+ for (var i = 0; i < len; ++i) {
+ arr[i] = helpers.createModel(model, docs[i], fields);
+ arr[i].init(docs[i], opts, init);
+ }
+}
+
+/**
+ * Thunk around findOne()
+ *
+ * @param {Function} [callback]
+ * @see findOne http://docs.mongodb.org/manual/reference/method/db.collection.findOne/
+ * @api private
+ */
+
+Query.prototype._findOne = function(callback) {
+ if (this._castError) {
+ return callback(this._castError);
+ }
+
+ this._applyPaths();
+ this._fields = this._castFields(this._fields);
+
+ var options = this._mongooseOptions;
+ var projection = this._fieldsForExec();
+ var _this = this;
+
+ // don't pass in the conditions because we already merged them in
+ Query.base.findOne.call(_this, {}, function(err, doc) {
+ if (err) {
+ return callback(err);
+ }
+ if (!doc) {
+ return callback(null, null);
+ }
+
+ if (!options.populate) {
+ return options.lean === true
+ ? callback(null, doc)
+ : completeOne(_this.model, doc, null, projection, _this, null, callback);
+ }
+
+ var pop = helpers.preparePopulationOptionsMQ(_this, options);
+ pop.__noPromise = true;
+ _this.model.populate(doc, pop, function(err, doc) {
+ if (err) {
+ return callback(err);
+ }
+ return options.lean === true
+ ? callback(null, doc)
+ : completeOne(_this.model, doc, null, projection, _this, pop, callback);
+ });
+ });
+};
+
+/**
+ * Declares the query a findOne operation. When executed, the first found document is passed to the callback.
+ *
+ * Passing a `callback` executes the query. The result of the query is a single document.
+ *
+ * * *Note:* `conditions` is optional, and if `conditions` is null or undefined,
+ * mongoose will send an empty `findOne` command to MongoDB, which will return
+ * an arbitrary document. If you're querying by `_id`, use `Model.findById()`
+ * instead.
+ *
+ * ####Example
+ *
+ * var query = Kitten.where({ color: 'white' });
+ * query.findOne(function (err, kitten) {
+ * if (err) return handleError(err);
+ * if (kitten) {
+ * // doc may be null if no document matched
+ * }
+ * });
+ *
+ * @param {Object|Query} [criteria] mongodb selector
+ * @param {Object} [projection] optional fields to return
+ * @param {Function} [callback]
+ * @return {Query} this
+ * @see findOne http://docs.mongodb.org/manual/reference/method/db.collection.findOne/
+ * @see Query.select #query_Query-select
+ * @api public
+ */
+
+Query.prototype.findOne = function(conditions, projection, options, callback) {
+ if (typeof conditions === 'function') {
+ callback = conditions;
+ conditions = null;
+ projection = null;
+ options = null;
+ } else if (typeof projection === 'function') {
+ callback = projection;
+ options = null;
+ projection = null;
+ } else if (typeof options === 'function') {
+ callback = options;
+ options = null;
+ }
+
+ // make sure we don't send in the whole Document to merge()
+ conditions = utils.toObject(conditions);
+
+ this.op = 'findOne';
+
+ if (options) {
+ this.setOptions(options);
+ }
+
+ if (projection) {
+ this.select(projection);
+ }
+
+ if (mquery.canMerge(conditions)) {
+ this.merge(conditions);
+ } else if (conditions != null) {
+ throw new Error('Invalid argument to findOne(): ' +
+ util.inspect(conditions));
+ }
+
+ prepareDiscriminatorCriteria(this);
+
+ try {
+ this.cast(this.model);
+ this._castError = null;
+ } catch (err) {
+ this._castError = err;
+ }
+
+ if (!callback) {
+ // already merged in the conditions, don't need to send them in.
+ return Query.base.findOne.call(this);
+ }
+
+ this._findOne(callback);
+
+ return this;
+};
+
+/**
+ * Thunk around count()
+ *
+ * @param {Function} [callback]
+ * @see count http://docs.mongodb.org/manual/reference/method/db.collection.count/
+ * @api private
+ */
+
+Query.prototype._count = function(callback) {
+ try {
+ this.cast(this.model);
+ } catch (err) {
+ process.nextTick(function() {
+ callback(err);
+ });
+ return this;
+ }
+
+ var conds = this._conditions;
+ var options = this._optionsForExec();
+
+ this._collection.count(conds, options, utils.tick(callback));
+};
+
+/**
+ * Specifying this query as a `count` query.
+ *
+ * Passing a `callback` executes the query.
+ *
+ * ####Example:
+ *
+ * var countQuery = model.where({ 'color': 'black' }).count();
+ *
+ * query.count({ color: 'black' }).count(callback)
+ *
+ * query.count({ color: 'black' }, callback)
+ *
+ * query.where('color', 'black').count(function (err, count) {
+ * if (err) return handleError(err);
+ * console.log('there are %d kittens', count);
+ * })
+ *
+ * @param {Object} [criteria] mongodb selector
+ * @param {Function} [callback]
+ * @return {Query} this
+ * @see count http://docs.mongodb.org/manual/reference/method/db.collection.count/
+ * @api public
+ */
+
+Query.prototype.count = function(conditions, callback) {
+ if (typeof conditions === 'function') {
+ callback = conditions;
+ conditions = undefined;
+ }
+
+ if (mquery.canMerge(conditions)) {
+ this.merge(conditions);
+ }
+
+ this.op = 'count';
+ if (!callback) {
+ return this;
+ }
+
+ this._count(callback);
+
+ return this;
+};
+
+/**
+ * Declares or executes a distict() operation.
+ *
+ * Passing a `callback` executes the query.
+ *
+ * ####Example
+ *
+ * distinct(field, conditions, callback)
+ * distinct(field, conditions)
+ * distinct(field, callback)
+ * distinct(field)
+ * distinct(callback)
+ * distinct()
+ *
+ * @param {String} [field]
+ * @param {Object|Query} [criteria]
+ * @param {Function} [callback]
+ * @return {Query} this
+ * @see distinct http://docs.mongodb.org/manual/reference/method/db.collection.distinct/
+ * @api public
+ */
+
+Query.prototype.distinct = function(field, conditions, callback) {
+ if (!callback) {
+ if (typeof conditions === 'function') {
+ callback = conditions;
+ conditions = undefined;
+ } else if (typeof field === 'function') {
+ callback = field;
+ field = undefined;
+ conditions = undefined;
+ }
+ }
+
+ conditions = utils.toObject(conditions);
+
+ if (mquery.canMerge(conditions)) {
+ this.merge(conditions);
+ }
+
+ try {
+ this.cast(this.model);
+ } catch (err) {
+ if (!callback) {
+ throw err;
+ }
+ callback(err);
+ return this;
+ }
+
+ return Query.base.distinct.call(this, {}, field, callback);
+};
+
+/**
+ * Sets the sort order
+ *
+ * If an object is passed, values allowed are `asc`, `desc`, `ascending`, `descending`, `1`, and `-1`.
+ *
+ * If a string is passed, it must be a space delimited list of path names. The
+ * sort order of each path is ascending unless the path name is prefixed with `-`
+ * which will be treated as descending.
+ *
+ * ####Example
+ *
+ * // sort by "field" ascending and "test" descending
+ * query.sort({ field: 'asc', test: -1 });
+ *
+ * // equivalent
+ * query.sort('field -test');
+ *
+ * ####Note
+ *
+ * Cannot be used with `distinct()`
+ *
+ * @param {Object|String} arg
+ * @return {Query} this
+ * @see cursor.sort http://docs.mongodb.org/manual/reference/method/cursor.sort/
+ * @api public
+ */
+
+Query.prototype.sort = function(arg) {
+ var nArg = {};
+
+ if (arguments.length > 1) {
+ throw new Error('sort() only takes 1 Argument');
+ }
+
+ if (Array.isArray(arg)) {
+ // time to deal with the terrible syntax
+ for (var i = 0; i < arg.length; i++) {
+ if (!Array.isArray(arg[i])) throw new Error('Invalid sort() argument.');
+ nArg[arg[i][0]] = arg[i][1];
+ }
+ } else {
+ nArg = arg;
+ }
+
+ return Query.base.sort.call(this, nArg);
+};
+
+/**
+ * Declare and/or execute this query as a remove() operation.
+ *
+ * ####Example
+ *
+ * Model.remove({ artist: 'Anne Murray' }, callback)
+ *
+ * ####Note
+ *
+ * The operation is only executed when a callback is passed. To force execution without a callback, you must first call `remove()` and then execute it by using the `exec()` method.
+ *
+ * // not executed
+ * var query = Model.find().remove({ name: 'Anne Murray' })
+ *
+ * // executed
+ * query.remove({ name: 'Anne Murray' }, callback)
+ * query.remove({ name: 'Anne Murray' }).remove(callback)
+ *
+ * // executed without a callback
+ * query.exec()
+ *
+ * // summary
+ * query.remove(conds, fn); // executes
+ * query.remove(conds)
+ * query.remove(fn) // executes
+ * query.remove()
+ *
+ * @param {Object|Query} [criteria] mongodb selector
+ * @param {Function} [callback]
+ * @return {Query} this
+ * @see remove http://docs.mongodb.org/manual/reference/method/db.collection.remove/
+ * @api public
+ */
+
+Query.prototype.remove = function(cond, callback) {
+ if (typeof cond === 'function') {
+ callback = cond;
+ cond = null;
+ }
+
+ var cb = typeof callback === 'function';
+
+ try {
+ this.cast(this.model);
+ } catch (err) {
+ if (cb) return process.nextTick(callback.bind(null, err));
+ return this;
+ }
+
+ return Query.base.remove.call(this, cond, callback);
+};
+
+/*!
+ * hydrates a document
+ *
+ * @param {Model} model
+ * @param {Document} doc
+ * @param {Object} res 3rd parameter to callback
+ * @param {Object} fields
+ * @param {Query} self
+ * @param {Array} [pop] array of paths used in population
+ * @param {Function} callback
+ */
+
+function completeOne(model, doc, res, fields, self, pop, callback) {
+ var opts = pop ?
+ {populated: pop}
+ : undefined;
+
+ var casted = helpers.createModel(model, doc, fields);
+ casted.init(doc, opts, function(err) {
+ if (err) {
+ return callback(err);
+ }
+ if (res) {
+ return callback(null, casted, res);
+ }
+ callback(null, casted);
+ });
+}
+
+/*!
+ * If the model is a discriminator type and not root, then add the key & value to the criteria.
+ */
+
+function prepareDiscriminatorCriteria(query) {
+ if (!query || !query.model || !query.model.schema) {
+ return;
+ }
+
+ var schema = query.model.schema;
+
+ if (schema && schema.discriminatorMapping && !schema.discriminatorMapping.isRoot) {
+ query._conditions[schema.discriminatorMapping.key] = schema.discriminatorMapping.value;
+ }
+}
+
+/**
+ * Issues a mongodb [findAndModify](http://www.mongodb.org/display/DOCS/findAndModify+Command) update command.
+ *
+ * Finds a matching document, updates it according to the `update` arg, passing any `options`, and returns the found document (if any) to the callback. The query executes immediately if `callback` is passed.
+ *
+ * ####Available options
+ *
+ * - `new`: bool - if true, return the modified document rather than the original. defaults to false (changed in 4.0)
+ * - `upsert`: bool - creates the object if it doesn't exist. defaults to false.
+ * - `fields`: {Object|String} - Field selection. Equivalent to `.select(fields).findOneAndUpdate()`
+ * - `sort`: if multiple docs are found by the conditions, sets the sort order to choose which doc to update
+ * - `maxTimeMS`: puts a time limit on the query - requires mongodb >= 2.6.0
+ * - `runValidators`: if true, runs [update validators](/docs/validation.html#update-validators) on this command. Update validators validate the update operation against the model's schema.
+ * - `setDefaultsOnInsert`: if this and `upsert` are true, mongoose will apply the [defaults](http://mongoosejs.com/docs/defaults.html) specified in the model's schema if a new document is created. This option only works on MongoDB >= 2.4 because it relies on [MongoDB's `$setOnInsert` operator](https://docs.mongodb.org/v2.4/reference/operator/update/setOnInsert/).
+ * - `passRawResult`: if true, passes the [raw result from the MongoDB driver as the third callback parameter](http://mongodb.github.io/node-mongodb-native/2.0/api/Collection.html#findAndModify)
+ * - `context` (string) if set to 'query' and `runValidators` is on, `this` will refer to the query in custom validator functions that update validation runs. Does nothing if `runValidators` is false.
+ *
+ * ####Callback Signature
+ * function(error, doc) {
+ * // error: any errors that occurred
+ * // doc: the document before updates are applied if `new: false`, or after updates if `new = true`
+ * }
+ *
+ * ####Examples
+ *
+ * query.findOneAndUpdate(conditions, update, options, callback) // executes
+ * query.findOneAndUpdate(conditions, update, options) // returns Query
+ * query.findOneAndUpdate(conditions, update, callback) // executes
+ * query.findOneAndUpdate(conditions, update) // returns Query
+ * query.findOneAndUpdate(update, callback) // returns Query
+ * query.findOneAndUpdate(update) // returns Query
+ * query.findOneAndUpdate(callback) // executes
+ * query.findOneAndUpdate() // returns Query
+ *
+ * @method findOneAndUpdate
+ * @memberOf Query
+ * @param {Object|Query} [query]
+ * @param {Object} [doc]
+ * @param {Object} [options]
+ * @param {Function} [callback]
+ * @see mongodb http://www.mongodb.org/display/DOCS/findAndModify+Command
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.findOneAndUpdate = function(criteria, doc, options, callback) {
+ this.op = 'findOneAndUpdate';
+ this._validate();
+
+ switch (arguments.length) {
+ case 3:
+ if (typeof options === 'function') {
+ callback = options;
+ options = {};
+ }
+ break;
+ case 2:
+ if (typeof doc === 'function') {
+ callback = doc;
+ doc = criteria;
+ criteria = undefined;
+ }
+ options = undefined;
+ break;
+ case 1:
+ if (typeof criteria === 'function') {
+ callback = criteria;
+ criteria = options = doc = undefined;
+ } else {
+ doc = criteria;
+ criteria = options = undefined;
+ }
+ }
+
+ if (mquery.canMerge(criteria)) {
+ this.merge(criteria);
+ }
+
+ // apply doc
+ if (doc) {
+ this._mergeUpdate(doc);
+ }
+
+ if (options) {
+ options = utils.clone(options, { retainKeyOrder: true });
+ if (options.projection) {
+ this.select(options.projection);
+ delete options.projection;
+ }
+ if (options.fields) {
+ this.select(options.fields);
+ delete options.fields;
+ }
+
+ this.setOptions(options);
+ }
+
+ if (!callback) {
+ return this;
+ }
+
+ return this._findOneAndUpdate(callback);
+};
+
+/**
+ * Thunk around findOneAndUpdate()
+ *
+ * @param {Function} [callback]
+ * @api private
+ */
+
+Query.prototype._findOneAndUpdate = function(callback) {
+ this._findAndModify('update', callback);
+ return this;
+};
+
+/**
+ * Issues a mongodb [findAndModify](http://www.mongodb.org/display/DOCS/findAndModify+Command) remove command.
+ *
+ * Finds a matching document, removes it, passing the found document (if any) to the callback. Executes immediately if `callback` is passed.
+ *
+ * ####Available options
+ *
+ * - `sort`: if multiple docs are found by the conditions, sets the sort order to choose which doc to update
+ * - `maxTimeMS`: puts a time limit on the query - requires mongodb >= 2.6.0
+ * - `passRawResult`: if true, passes the [raw result from the MongoDB driver as the third callback parameter](http://mongodb.github.io/node-mongodb-native/2.0/api/Collection.html#findAndModify)
+ *
+ * ####Callback Signature
+ * function(error, doc, result) {
+ * // error: any errors that occurred
+ * // doc: the document before updates are applied if `new: false`, or after updates if `new = true`
+ * // result: [raw result from the MongoDB driver](http://mongodb.github.io/node-mongodb-native/2.0/api/Collection.html#findAndModify)
+ * }
+ *
+ * ####Examples
+ *
+ * A.where().findOneAndRemove(conditions, options, callback) // executes
+ * A.where().findOneAndRemove(conditions, options) // return Query
+ * A.where().findOneAndRemove(conditions, callback) // executes
+ * A.where().findOneAndRemove(conditions) // returns Query
+ * A.where().findOneAndRemove(callback) // executes
+ * A.where().findOneAndRemove() // returns Query
+ *
+ * @method findOneAndRemove
+ * @memberOf Query
+ * @param {Object} [conditions]
+ * @param {Object} [options]
+ * @param {Function} [callback]
+ * @return {Query} this
+ * @see mongodb http://www.mongodb.org/display/DOCS/findAndModify+Command
+ * @api public
+ */
+
+Query.prototype.findOneAndRemove = function(conditions, options, callback) {
+ this.op = 'findOneAndRemove';
+ this._validate();
+
+ switch (arguments.length) {
+ case 2:
+ if (typeof options === 'function') {
+ callback = options;
+ options = {};
+ }
+ break;
+ case 1:
+ if (typeof conditions === 'function') {
+ callback = conditions;
+ conditions = undefined;
+ options = undefined;
+ }
+ break;
+ }
+
+ if (mquery.canMerge(conditions)) {
+ this.merge(conditions);
+ }
+
+ options && this.setOptions(options);
+
+ if (!callback) {
+ return this;
+ }
+
+ this._findOneAndRemove(callback);
+
+ return this;
+};
+
+/**
+ * Thunk around findOneAndRemove()
+ *
+ * @param {Function} [callback]
+ * @return {Query} this
+ * @api private
+ */
+Query.prototype._findOneAndRemove = function(callback) {
+ Query.base.findOneAndRemove.call(this, callback);
+};
+
+/**
+ * Override mquery.prototype._findAndModify to provide casting etc.
+ *
+ * @param {String} type - either "remove" or "update"
+ * @param {Function} callback
+ * @api private
+ */
+
+Query.prototype._findAndModify = function(type, callback) {
+ if (typeof callback !== 'function') {
+ throw new Error('Expected callback in _findAndModify');
+ }
+
+ var model = this.model;
+ var schema = model.schema;
+ var _this = this;
+ var castedQuery;
+ var castedDoc;
+ var fields;
+ var opts;
+ var doValidate;
+
+ castedQuery = castQuery(this);
+ if (castedQuery instanceof Error) {
+ return callback(castedQuery);
+ }
+
+ opts = this._optionsForExec(model);
+
+ if ('strict' in opts) {
+ this._mongooseOptions.strict = opts.strict;
+ }
+
+ if (type === 'remove') {
+ opts.remove = true;
+ } else {
+ if (!('new' in opts)) {
+ opts.new = false;
+ }
+ if (!('upsert' in opts)) {
+ opts.upsert = false;
+ }
+ if (opts.upsert || opts['new']) {
+ opts.remove = false;
+ }
+
+ castedDoc = castDoc(this, opts.overwrite);
+ castedDoc = setDefaultsOnInsert(this, schema, castedDoc, opts);
+ if (!castedDoc) {
+ if (opts.upsert) {
+ // still need to do the upsert to empty doc
+ var doc = utils.clone(castedQuery);
+ delete doc._id;
+ castedDoc = {$set: doc};
+ } else {
+ return this.findOne(callback);
+ }
+ } else if (castedDoc instanceof Error) {
+ return callback(castedDoc);
+ } else {
+ // In order to make MongoDB 2.6 happy (see
+ // https://jira.mongodb.org/browse/SERVER-12266 and related issues)
+ // if we have an actual update document but $set is empty, junk the $set.
+ if (castedDoc.$set && Object.keys(castedDoc.$set).length === 0) {
+ delete castedDoc.$set;
+ }
+ }
+
+ doValidate = updateValidators(this, schema, castedDoc, opts);
+ }
+
+ this._applyPaths();
+
+ var options = this._mongooseOptions;
+
+ if (this._fields) {
+ fields = utils.clone(this._fields);
+ opts.fields = this._castFields(fields);
+ if (opts.fields instanceof Error) {
+ return callback(opts.fields);
+ }
+ }
+
+ if (opts.sort) convertSortToArray(opts);
+
+ var cb = function(err, doc, res) {
+ if (err) {
+ return callback(err);
+ }
+
+ if (!doc || (utils.isObject(doc) && Object.keys(doc).length === 0)) {
+ if (opts.passRawResult) {
+ return callback(null, null, res);
+ }
+ return callback(null, null);
+ }
+
+ if (!opts.passRawResult) {
+ res = null;
+ }
+
+ if (!options.populate) {
+ return options.lean === true
+ ? callback(null, doc)
+ : completeOne(_this.model, doc, res, fields, _this, null, callback);
+ }
+
+ var pop = helpers.preparePopulationOptionsMQ(_this, options);
+ pop.__noPromise = true;
+ _this.model.populate(doc, pop, function(err, doc) {
+ if (err) {
+ return callback(err);
+ }
+
+ return options.lean === true
+ ? callback(null, doc)
+ : completeOne(_this.model, doc, res, fields, _this, pop, callback);
+ });
+ };
+
+ if (opts.runValidators && doValidate) {
+ var _callback = function(error) {
+ if (error) {
+ return callback(error);
+ }
+ _this._collection.findAndModify(castedQuery, castedDoc, opts, utils.tick(function(error, res) {
+ return cb(error, res ? res.value : res, res);
+ }));
+ };
+
+ try {
+ doValidate(_callback);
+ } catch (error) {
+ callback(error);
+ }
+ } else {
+ this._collection.findAndModify(castedQuery, castedDoc, opts, utils.tick(function(error, res) {
+ return cb(error, res ? res.value : res, res);
+ }));
+ }
+
+ return this;
+};
+
+/**
+ * Override mquery.prototype._mergeUpdate to handle mongoose objects in
+ * updates.
+ *
+ * @param {Object} doc
+ * @api private
+ */
+
+Query.prototype._mergeUpdate = function(doc) {
+ if (!this._update) this._update = {};
+ if (doc instanceof Query) {
+ if (doc._update) {
+ utils.mergeClone(this._update, doc._update);
+ }
+ } else {
+ utils.mergeClone(this._update, doc);
+ }
+};
+
+/*!
+ * The mongodb driver 1.3.23 only supports the nested array sort
+ * syntax. We must convert it or sorting findAndModify will not work.
+ */
+
+function convertSortToArray(opts) {
+ if (Array.isArray(opts.sort)) {
+ return;
+ }
+ if (!utils.isObject(opts.sort)) {
+ return;
+ }
+
+ var sort = [];
+
+ for (var key in opts.sort) {
+ if (utils.object.hasOwnProperty(opts.sort, key)) {
+ sort.push([key, opts.sort[key]]);
+ }
+ }
+
+ opts.sort = sort;
+}
+
+/**
+ * Internal thunk for .update()
+ *
+ * @param {Function} callback
+ * @see Model.update #model_Model.update
+ * @api private
+ */
+Query.prototype._execUpdate = function(callback) {
+ var schema = this.model.schema;
+ var doValidate;
+ var _this;
+
+ var castedQuery = this._conditions;
+ var castedDoc = this._update;
+ var options = this.options;
+
+ if (this._castError) {
+ callback(this._castError);
+ return this;
+ }
+
+ if (this.options.runValidators) {
+ _this = this;
+ doValidate = updateValidators(this, schema, castedDoc, options);
+ var _callback = function(err) {
+ if (err) {
+ return callback(err);
+ }
+
+ Query.base.update.call(_this, castedQuery, castedDoc, options, callback);
+ };
+ try {
+ doValidate(_callback);
+ } catch (err) {
+ process.nextTick(function() {
+ callback(err);
+ });
+ }
+ return this;
+ }
+
+ Query.base.update.call(this, castedQuery, castedDoc, options, callback);
+ return this;
+};
+
+/**
+ * Declare and/or execute this query as an update() operation.
+ *
+ * _All paths passed that are not $atomic operations will become $set ops._
+ *
+ * ####Example
+ *
+ * Model.where({ _id: id }).update({ title: 'words' })
+ *
+ * // becomes
+ *
+ * Model.where({ _id: id }).update({ $set: { title: 'words' }})
+ *
+ * ####Valid options:
+ *
+ * - `safe` (boolean) safe mode (defaults to value set in schema (true))
+ * - `upsert` (boolean) whether to create the doc if it doesn't match (false)
+ * - `multi` (boolean) whether multiple documents should be updated (false)
+ * - `runValidators`: if true, runs [update validators](/docs/validation.html#update-validators) on this command. Update validators validate the update operation against the model's schema.
+ * - `setDefaultsOnInsert`: if this and `upsert` are true, mongoose will apply the [defaults](http://mongoosejs.com/docs/defaults.html) specified in the model's schema if a new document is created. This option only works on MongoDB >= 2.4 because it relies on [MongoDB's `$setOnInsert` operator](https://docs.mongodb.org/v2.4/reference/operator/update/setOnInsert/).
+ * - `strict` (boolean) overrides the `strict` option for this update
+ * - `overwrite` (boolean) disables update-only mode, allowing you to overwrite the doc (false)
+ * - `context` (string) if set to 'query' and `runValidators` is on, `this` will refer to the query in custom validator functions that update validation runs. Does nothing if `runValidators` is false.
+ *
+ * ####Note
+ *
+ * Passing an empty object `{}` as the doc will result in a no-op unless the `overwrite` option is passed. Without the `overwrite` option set, the update operation will be ignored and the callback executed without sending the command to MongoDB so as to prevent accidently overwritting documents in the collection.
+ *
+ * ####Note
+ *
+ * The operation is only executed when a callback is passed. To force execution without a callback, we must first call update() and then execute it by using the `exec()` method.
+ *
+ * var q = Model.where({ _id: id });
+ * q.update({ $set: { name: 'bob' }}).update(); // not executed
+ *
+ * q.update({ $set: { name: 'bob' }}).exec(); // executed
+ *
+ * // keys that are not $atomic ops become $set.
+ * // this executes the same command as the previous example.
+ * q.update({ name: 'bob' }).exec();
+ *
+ * // overwriting with empty docs
+ * var q = Model.where({ _id: id }).setOptions({ overwrite: true })
+ * q.update({ }, callback); // executes
+ *
+ * // multi update with overwrite to empty doc
+ * var q = Model.where({ _id: id });
+ * q.setOptions({ multi: true, overwrite: true })
+ * q.update({ });
+ * q.update(callback); // executed
+ *
+ * // multi updates
+ * Model.where()
+ * .update({ name: /^match/ }, { $set: { arr: [] }}, { multi: true }, callback)
+ *
+ * // more multi updates
+ * Model.where()
+ * .setOptions({ multi: true })
+ * .update({ $set: { arr: [] }}, callback)
+ *
+ * // single update by default
+ * Model.where({ email: 'address@example.com' })
+ * .update({ $inc: { counter: 1 }}, callback)
+ *
+ * API summary
+ *
+ * update(criteria, doc, options, cb) // executes
+ * update(criteria, doc, options)
+ * update(criteria, doc, cb) // executes
+ * update(criteria, doc)
+ * update(doc, cb) // executes
+ * update(doc)
+ * update(cb) // executes
+ * update(true) // executes
+ * update()
+ *
+ * @param {Object} [criteria]
+ * @param {Object} [doc] the update command
+ * @param {Object} [options]
+ * @param {Function} [callback]
+ * @return {Query} this
+ * @see Model.update #model_Model.update
+ * @see update http://docs.mongodb.org/manual/reference/method/db.collection.update/
+ * @api public
+ */
+
+Query.prototype.update = function(conditions, doc, options, callback) {
+ if (typeof options === 'function') {
+ // .update(conditions, doc, callback)
+ callback = options;
+ options = null;
+ } else if (typeof doc === 'function') {
+ // .update(doc, callback);
+ callback = doc;
+ doc = conditions;
+ conditions = {};
+ options = null;
+ } else if (typeof conditions === 'function') {
+ // .update(callback)
+ callback = conditions;
+ conditions = undefined;
+ doc = undefined;
+ options = undefined;
+ } else if (typeof conditions === 'object' && !doc && !options && !callback) {
+ // .update(doc)
+ doc = conditions;
+ conditions = undefined;
+ options = undefined;
+ callback = undefined;
+ }
+
+ // make sure we don't send in the whole Document to merge()
+ conditions = utils.toObject(conditions);
+
+ var oldCb = callback;
+ if (oldCb) {
+ if (typeof oldCb === 'function') {
+ callback = function(error, result) {
+ oldCb(error, result ? result.result : {ok: 0, n: 0, nModified: 0});
+ };
+ } else {
+ throw new Error('Invalid callback() argument.');
+ }
+ }
+
+ // strict is an option used in the update checking, make sure it gets set
+ if (options) {
+ if ('strict' in options) {
+ this._mongooseOptions.strict = options.strict;
+ }
+ }
+
+ // if doc is undefined at this point, this means this function is being
+ // executed by exec(not always see below). Grab the update doc from here in
+ // order to validate
+ // This could also be somebody calling update() or update({}). Probably not a
+ // common use case, check for _update to make sure we don't do anything bad
+ if (!doc && this._update) {
+ doc = this._updateForExec();
+ }
+
+ if (mquery.canMerge(conditions)) {
+ this.merge(conditions);
+ }
+
+ // validate the selector part of the query
+ var castedQuery = castQuery(this);
+ if (castedQuery instanceof Error) {
+ this._castError = castedQuery;
+ if (callback) {
+ callback(castedQuery);
+ return this;
+ } else if (!options || !options.dontThrowCastError) {
+ throw castedQuery;
+ }
+ }
+
+ // validate the update part of the query
+ var castedDoc;
+ try {
+ var $options = {retainKeyOrder: true};
+ if (options && options.minimize) {
+ $options.minimize = true;
+ }
+ castedDoc = this._castUpdate(utils.clone(doc, $options),
+ options && options.overwrite);
+ } catch (err) {
+ this._castError = castedQuery;
+ if (callback) {
+ callback(err);
+ return this;
+ } else if (!options || !options.dontThrowCastError) {
+ throw err;
+ }
+ }
+
+ castedDoc = setDefaultsOnInsert(this, this.schema, castedDoc, options);
+ if (!castedDoc) {
+ // Make sure promises know that this is still an update, see gh-2796
+ this.op = 'update';
+ callback && callback(null);
+ return this;
+ }
+
+ if (utils.isObject(options)) {
+ this.setOptions(options);
+ }
+
+ if (!this._update) this._update = castedDoc;
+
+ // Hooks
+ if (callback) {
+ return this._execUpdate(callback);
+ }
+
+ return Query.base.update.call(this, castedQuery, castedDoc, options, callback);
+};
+
+/**
+ * Executes the query
+ *
+ * ####Examples:
+ *
+ * var promise = query.exec();
+ * var promise = query.exec('update');
+ *
+ * query.exec(callback);
+ * query.exec('find', callback);
+ *
+ * @param {String|Function} [operation]
+ * @param {Function} [callback]
+ * @return {Promise}
+ * @api public
+ */
+
+Query.prototype.exec = function exec(op, callback) {
+ var Promise = PromiseProvider.get();
+ var _this = this;
+
+ if (typeof op === 'function') {
+ callback = op;
+ op = null;
+ } else if (typeof op === 'string') {
+ this.op = op;
+ }
+
+ var _results;
+ var promise = new Promise.ES6(function(resolve, reject) {
+ if (!_this.op) {
+ resolve();
+ return;
+ }
+
+ _this[_this.op].call(_this, function(error, res) {
+ if (error) {
+ reject(error);
+ return;
+ }
+ _results = arguments;
+ resolve(res);
+ });
+ });
+
+ if (callback) {
+ promise.then(
+ function() {
+ callback.apply(null, _results);
+ },
+ function(error) {
+ callback(error);
+ }).
+ catch(function(error) {
+ // If we made it here, we must have an error in the callback re:
+ // gh-4500, so we need to emit.
+ setImmediate(function() {
+ _this.model.emit('error', error);
+ });
+ });
+ }
+
+ return promise;
+};
+
+/**
+ * Executes the query returning a `Promise` which will be
+ * resolved with either the doc(s) or rejected with the error.
+ *
+ * @param {Function} [resolve]
+ * @param {Function} [reject]
+ * @return {Promise}
+ * @api public
+ */
+
+Query.prototype.then = function(resolve, reject) {
+ return this.exec().then(resolve, reject);
+};
+
+/**
+ * Executes the query returning a `Promise` which will be
+ * resolved with either the doc(s) or rejected with the error.
+ * Like `.then()`, but only takes a rejection handler.
+ *
+ * @param {Function} [reject]
+ * @return {Promise}
+ * @api public
+ */
+
+Query.prototype.catch = function(reject) {
+ return this.exec().then(null, reject);
+};
+
+/**
+ * Finds the schema for `path`. This is different than
+ * calling `schema.path` as it also resolves paths with
+ * positional selectors (something.$.another.$.path).
+ *
+ * @param {String} path
+ * @api private
+ */
+
+Query.prototype._getSchema = function _getSchema(path) {
+ return this.model._getSchema(path);
+};
+
+/*!
+ * These operators require casting docs
+ * to real Documents for Update operations.
+ */
+
+var castOps = {
+ $push: 1,
+ $pushAll: 1,
+ $addToSet: 1,
+ $set: 1
+};
+
+/*!
+ * These operators should be cast to numbers instead
+ * of their path schema type.
+ */
+
+var numberOps = {
+ $pop: 1,
+ $unset: 1,
+ $inc: 1
+};
+
+/**
+ * Casts obj for an update command.
+ *
+ * @param {Object} obj
+ * @return {Object} obj after casting its values
+ * @api private
+ */
+
+Query.prototype._castUpdate = function _castUpdate(obj, overwrite) {
+ if (!obj) {
+ return undefined;
+ }
+
+ var ops = Object.keys(obj);
+ var i = ops.length;
+ var ret = {};
+ var hasKeys;
+ var val;
+ var hasDollarKey = false;
+
+ while (i--) {
+ var op = ops[i];
+ // if overwrite is set, don't do any of the special $set stuff
+ if (op[0] !== '$' && !overwrite) {
+ // fix up $set sugar
+ if (!ret.$set) {
+ if (obj.$set) {
+ ret.$set = obj.$set;
+ } else {
+ ret.$set = {};
+ }
+ }
+ ret.$set[op] = obj[op];
+ ops.splice(i, 1);
+ if (!~ops.indexOf('$set')) ops.push('$set');
+ } else if (op === '$set') {
+ if (!ret.$set) {
+ ret[op] = obj[op];
+ }
+ } else {
+ ret[op] = obj[op];
+ }
+ }
+
+ // cast each value
+ i = ops.length;
+
+ // if we get passed {} for the update, we still need to respect that when it
+ // is an overwrite scenario
+ if (overwrite) {
+ hasKeys = true;
+ }
+
+ while (i--) {
+ op = ops[i];
+ val = ret[op];
+ hasDollarKey = hasDollarKey || op.charAt(0) === '$';
+ if (val &&
+ val.constructor.name === 'Object' &&
+ (!overwrite || hasDollarKey)) {
+ hasKeys |= this._walkUpdatePath(val, op);
+ } else if (overwrite && ret.constructor.name === 'Object') {
+ // if we are just using overwrite, cast the query and then we will
+ // *always* return the value, even if it is an empty object. We need to
+ // set hasKeys above because we need to account for the case where the
+ // user passes {} and wants to clobber the whole document
+ // Also, _walkUpdatePath expects an operation, so give it $set since that
+ // is basically what we're doing
+ this._walkUpdatePath(ret, '$set');
+ } else {
+ var msg = 'Invalid atomic update value for ' + op + '. '
+ + 'Expected an object, received ' + typeof val;
+ throw new Error(msg);
+ }
+ }
+
+ return hasKeys && ret;
+};
+
+/**
+ * Walk each path of obj and cast its values
+ * according to its schema.
+ *
+ * @param {Object} obj - part of a query
+ * @param {String} op - the atomic operator ($pull, $set, etc)
+ * @param {String} pref - path prefix (internal only)
+ * @return {Bool} true if this path has keys to update
+ * @api private
+ */
+
+Query.prototype._walkUpdatePath = function _walkUpdatePath(obj, op, pref) {
+ var prefix = pref ? pref + '.' : '',
+ keys = Object.keys(obj),
+ i = keys.length,
+ hasKeys = false,
+ schema,
+ key,
+ val;
+
+ var useNestedStrict = this.schema.options.useNestedStrict;
+
+ while (i--) {
+ key = keys[i];
+ val = obj[key];
+
+ if (val && val.constructor.name === 'Object') {
+ // watch for embedded doc schemas
+ schema = this._getSchema(prefix + key);
+ if (schema && schema.caster && op in castOps) {
+ // embedded doc schema
+ hasKeys = true;
+
+ if ('$each' in val) {
+ obj[key] = {
+ $each: this._castUpdateVal(schema, val.$each, op)
+ };
+
+ if (val.$slice != null) {
+ obj[key].$slice = val.$slice | 0;
+ }
+
+ if (val.$sort) {
+ obj[key].$sort = val.$sort;
+ }
+
+ if (!!val.$position || val.$position === 0) {
+ obj[key].$position = val.$position;
+ }
+ } else {
+ obj[key] = this._castUpdateVal(schema, val, op);
+ }
+ } else if (op === '$currentDate') {
+ // $currentDate can take an object
+ obj[key] = this._castUpdateVal(schema, val, op);
+ hasKeys = true;
+ } else if (op === '$set' && schema) {
+ obj[key] = this._castUpdateVal(schema, val, op);
+ hasKeys = true;
+ } else {
+ var pathToCheck = (prefix + key);
+ var v = this.model.schema._getPathType(pathToCheck);
+ var _strict = 'strict' in this._mongooseOptions ?
+ this._mongooseOptions.strict :
+ ((useNestedStrict && v.schema) || this.schema).options.strict;
+ if (v.pathType === 'undefined') {
+ if (_strict === 'throw') {
+ throw new StrictModeError(pathToCheck);
+ } else if (_strict) {
+ delete obj[key];
+ continue;
+ }
+ }
+
+ // gh-2314
+ // we should be able to set a schema-less field
+ // to an empty object literal
+ hasKeys |= this._walkUpdatePath(val, op, prefix + key) ||
+ (utils.isObject(val) && Object.keys(val).length === 0);
+ }
+ } else {
+ var checkPath = (key === '$each' || key === '$or' || key === '$and') ?
+ pref : prefix + key;
+ schema = this._getSchema(checkPath);
+
+ var pathDetails = this.model.schema._getPathType(checkPath);
+ var isStrict = 'strict' in this._mongooseOptions ?
+ this._mongooseOptions.strict :
+ ((useNestedStrict && pathDetails.schema) || this.schema).options.strict;
+
+ var skip = isStrict &&
+ !schema &&
+ !/real|nested/.test(pathDetails.pathType);
+
+ if (skip) {
+ if (isStrict === 'throw') {
+ throw new StrictModeError(prefix + key);
+ } else {
+ delete obj[key];
+ }
+ } else {
+ // gh-1845 temporary fix: ignore $rename. See gh-3027 for tracking
+ // improving this.
+ if (op === '$rename') {
+ hasKeys = true;
+ continue;
+ }
+
+ hasKeys = true;
+ obj[key] = this._castUpdateVal(schema, val, op, key);
+ }
+ }
+ }
+ return hasKeys;
+};
+
+/**
+ * Casts `val` according to `schema` and atomic `op`.
+ *
+ * @param {Schema} schema
+ * @param {Object} val
+ * @param {String} op - the atomic operator ($pull, $set, etc)
+ * @param {String} [$conditional]
+ * @api private
+ */
+
+Query.prototype._castUpdateVal = function _castUpdateVal(schema, val, op, $conditional) {
+ if (!schema) {
+ // non-existing schema path
+ return op in numberOps
+ ? Number(val)
+ : val;
+ }
+
+ var cond = schema.caster && op in castOps &&
+ (utils.isObject(val) || Array.isArray(val));
+ if (cond) {
+ // Cast values for ops that add data to MongoDB.
+ // Ensures embedded documents get ObjectIds etc.
+ var tmp = schema.cast(val);
+ if (Array.isArray(val)) {
+ val = tmp;
+ } else if (Array.isArray(tmp)) {
+ val = tmp[0];
+ } else {
+ val = tmp;
+ }
+ }
+
+ if (op in numberOps) {
+ if (op === '$inc') {
+ return schema.castForQuery(val);
+ }
+ return Number(val);
+ }
+ if (op === '$currentDate') {
+ if (typeof val === 'object') {
+ return {$type: val.$type};
+ }
+ return Boolean(val);
+ }
+ if (/^\$/.test($conditional)) {
+ return schema.castForQuery($conditional, val);
+ }
+
+ return schema.castForQuery(val);
+};
+
+/*!
+ * castQuery
+ * @api private
+ */
+
+function castQuery(query) {
+ try {
+ return query.cast(query.model);
+ } catch (err) {
+ return err;
+ }
+}
+
+/*!
+ * castDoc
+ * @api private
+ */
+
+function castDoc(query, overwrite) {
+ try {
+ return query._castUpdate(query._update, overwrite);
+ } catch (err) {
+ return err;
+ }
+}
+
+/**
+ * Specifies paths which should be populated with other documents.
+ *
+ * ####Example:
+ *
+ * Kitten.findOne().populate('owner').exec(function (err, kitten) {
+ * console.log(kitten.owner.name) // Max
+ * })
+ *
+ * Kitten.find().populate({
+ * path: 'owner'
+ * , select: 'name'
+ * , match: { color: 'black' }
+ * , options: { sort: { name: -1 }}
+ * }).exec(function (err, kittens) {
+ * console.log(kittens[0].owner.name) // Zoopa
+ * })
+ *
+ * // alternatively
+ * Kitten.find().populate('owner', 'name', null, {sort: { name: -1 }}).exec(function (err, kittens) {
+ * console.log(kittens[0].owner.name) // Zoopa
+ * })
+ *
+ * Paths are populated after the query executes and a response is received. A separate query is then executed for each path specified for population. After a response for each query has also been returned, the results are passed to the callback.
+ *
+ * @param {Object|String} path either the path to populate or an object specifying all parameters
+ * @param {Object|String} [select] Field selection for the population query
+ * @param {Model} [model] The model you wish to use for population. If not specified, populate will look up the model by the name in the Schema's `ref` field.
+ * @param {Object} [match] Conditions for the population query
+ * @param {Object} [options] Options for the population query (sort, etc)
+ * @see population ./populate.html
+ * @see Query#select #query_Query-select
+ * @see Model.populate #model_Model.populate
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.populate = function() {
+ var res = utils.populate.apply(null, arguments);
+ var opts = this._mongooseOptions;
+
+ if (!utils.isObject(opts.populate)) {
+ opts.populate = {};
+ }
+
+ var pop = opts.populate;
+
+ for (var i = 0; i < res.length; ++i) {
+ var path = res[i].path;
+ if (pop[path] && pop[path].populate && res[i].populate) {
+ res[i].populate = pop[path].populate.concat(res[i].populate);
+ }
+ pop[res[i].path] = res[i];
+ }
+
+ return this;
+};
+
+/**
+ * Casts this query to the schema of `model`
+ *
+ * ####Note
+ *
+ * If `obj` is present, it is cast instead of this query.
+ *
+ * @param {Model} model
+ * @param {Object} [obj]
+ * @return {Object}
+ * @api public
+ */
+
+Query.prototype.cast = function(model, obj) {
+ obj || (obj = this._conditions);
+
+ try {
+ return cast(model.schema, obj);
+ } catch (err) {
+ // CastError, assign model
+ if (typeof err.setModel === 'function') {
+ err.setModel(model);
+ }
+ throw err;
+ }
+};
+
+/**
+ * Casts selected field arguments for field selection with mongo 2.2
+ *
+ * query.select({ ids: { $elemMatch: { $in: [hexString] }})
+ *
+ * @param {Object} fields
+ * @see https://github.com/Automattic/mongoose/issues/1091
+ * @see http://docs.mongodb.org/manual/reference/projection/elemMatch/
+ * @api private
+ */
+
+Query.prototype._castFields = function _castFields(fields) {
+ var selected,
+ elemMatchKeys,
+ keys,
+ key,
+ out,
+ i;
+
+ if (fields) {
+ keys = Object.keys(fields);
+ elemMatchKeys = [];
+ i = keys.length;
+
+ // collect $elemMatch args
+ while (i--) {
+ key = keys[i];
+ if (fields[key].$elemMatch) {
+ selected || (selected = {});
+ selected[key] = fields[key];
+ elemMatchKeys.push(key);
+ }
+ }
+ }
+
+ if (selected) {
+ // they passed $elemMatch, cast em
+ try {
+ out = this.cast(this.model, selected);
+ } catch (err) {
+ return err;
+ }
+
+ // apply the casted field args
+ i = elemMatchKeys.length;
+ while (i--) {
+ key = elemMatchKeys[i];
+ fields[key] = out[key];
+ }
+ }
+
+ return fields;
+};
+
+/**
+ * Applies schematype selected options to this query.
+ * @api private
+ */
+
+Query.prototype._applyPaths = function applyPaths() {
+ // determine if query is selecting or excluding fields
+
+ var fields = this._fields,
+ exclude,
+ keys,
+ ki;
+
+ if (fields) {
+ keys = Object.keys(fields);
+ ki = keys.length;
+
+ while (ki--) {
+ if (keys[ki][0] === '+') continue;
+ exclude = fields[keys[ki]] === 0;
+ break;
+ }
+ }
+
+ // if selecting, apply default schematype select:true fields
+ // if excluding, apply schematype select:false fields
+
+ var selected = [],
+ excluded = [],
+ seen = [];
+
+ var analyzePath = function(path, type) {
+ if (typeof type.selected !== 'boolean') return;
+
+ var plusPath = '+' + path;
+ if (fields && plusPath in fields) {
+ // forced inclusion
+ delete fields[plusPath];
+
+ // if there are other fields being included, add this one
+ // if no other included fields, leave this out (implied inclusion)
+ if (exclude === false && keys.length > 1 && !~keys.indexOf(path)) {
+ fields[path] = 1;
+ }
+
+ return;
+ }
+
+ // check for parent exclusions
+ var root = path.split('.')[0];
+ if (~excluded.indexOf(root)) return;
+
+ (type.selected ? selected : excluded).push(path);
+ };
+
+ var analyzeSchema = function(schema, prefix) {
+ prefix || (prefix = '');
+
+ // avoid recursion
+ if (~seen.indexOf(schema)) return;
+ seen.push(schema);
+
+ schema.eachPath(function(path, type) {
+ if (prefix) path = prefix + '.' + path;
+
+ analyzePath(path, type);
+
+ // array of subdocs?
+ if (type.schema) {
+ analyzeSchema(type.schema, path);
+ }
+ });
+ };
+
+ analyzeSchema(this.model.schema);
+
+ switch (exclude) {
+ case true:
+ excluded.length && this.select('-' + excluded.join(' -'));
+ break;
+ case false:
+ if (this.model.schema && this.model.schema.paths['_id'] &&
+ this.model.schema.paths['_id'].options && this.model.schema.paths['_id'].options.select === false) {
+ selected.push('-_id');
+ }
+ selected.length && this.select(selected.join(' '));
+ break;
+ case undefined:
+ // user didn't specify fields, implies returning all fields.
+ // only need to apply excluded fields
+ excluded.length && this.select('-' + excluded.join(' -'));
+ break;
+ }
+ seen = excluded = selected = keys = fields = null;
+};
+
+/**
+ * Returns a Node.js 0.8 style [read stream](http://nodejs.org/docs/v0.8.21/api/stream.html#stream_readable_stream) interface.
+ *
+ * ####Example
+ *
+ * // follows the nodejs 0.8 stream api
+ * Thing.find({ name: /^hello/ }).stream().pipe(res)
+ *
+ * // manual streaming
+ * var stream = Thing.find({ name: /^hello/ }).stream();
+ *
+ * stream.on('data', function (doc) {
+ * // do something with the mongoose document
+ * }).on('error', function (err) {
+ * // handle the error
+ * }).on('close', function () {
+ * // the stream is closed
+ * });
+ *
+ * ####Valid options
+ *
+ * - `transform`: optional function which accepts a mongoose document. The return value of the function will be emitted on `data`.
+ *
+ * ####Example
+ *
+ * // JSON.stringify all documents before emitting
+ * var stream = Thing.find().stream({ transform: JSON.stringify });
+ * stream.pipe(writeStream);
+ *
+ * @return {QueryStream}
+ * @param {Object} [options]
+ * @see QueryStream
+ * @api public
+ */
+
+Query.prototype.stream = function stream(opts) {
+ this._applyPaths();
+ this._fields = this._castFields(this._fields);
+ return new QueryStream(this, opts);
+};
+Query.prototype.stream = util.deprecate(Query.prototype.stream, 'Mongoose: ' +
+ 'Query.prototype.stream() is deprecated in mongoose >= 4.5.0, ' +
+ 'use Query.prototype.cursor() instead');
+
+/**
+ * Returns a wrapper around a [mongodb driver cursor](http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html).
+ * A QueryCursor exposes a [Streams3](https://strongloop.com/strongblog/whats-new-io-js-beta-streams3/)-compatible
+ * interface, as well as a `.next()` function.
+ *
+ * ####Example
+ *
+ * // There are 2 ways to use a cursor. First, as a stream:
+ * Thing.
+ * find({ name: /^hello/ }).
+ * cursor().
+ * on('data', function(doc) { console.log(doc); }).
+ * on('end', function() { console.log('Done!'); });
+ *
+ * // Or you can use `.next()` to manually get the next doc in the stream.
+ * // `.next()` returns a promise, so you can use promises or callbacks.
+ * var cursor = Thing.find({ name: /^hello/ }).cursor();
+ * cursor.next(function(error, doc) {
+ * console.log(doc);
+ * });
+ *
+ * // Because `.next()` returns a promise, you can use co
+ * // to easily iterate through all documents without loading them
+ * // all into memory.
+ * co(function*() {
+ * const cursor = Thing.find({ name: /^hello/ }).cursor();
+ * for (let doc = yield cursor.next(); doc != null; doc = yield cursor.next()) {
+ * console.log(doc);
+ * }
+ * });
+ *
+ * ####Valid options
+ *
+ * - `transform`: optional function which accepts a mongoose document. The return value of the function will be emitted on `data` and returned by `.next()`.
+ *
+ * @return {QueryCursor}
+ * @param {Object} [options]
+ * @see QueryCursor
+ * @api public
+ */
+
+Query.prototype.cursor = function cursor(opts) {
+ this._applyPaths();
+ this._fields = this._castFields(this._fields);
+ this.setOptions({ fields: this._fieldsForExec() });
+ if (opts) {
+ this.setOptions(opts);
+ }
+
+ try {
+ this.cast(this.model);
+ } catch (err) {
+ return (new QueryCursor(this, this.options))._markError(err);
+ }
+
+ return new QueryCursor(this, this.options);
+};
+
+// the rest of these are basically to support older Mongoose syntax with mquery
+
+/**
+ * _DEPRECATED_ Alias of `maxScan`
+ *
+ * @deprecated
+ * @see maxScan #query_Query-maxScan
+ * @method maxscan
+ * @memberOf Query
+ */
+
+Query.prototype.maxscan = Query.base.maxScan;
+
+/**
+ * Sets the tailable option (for use with capped collections).
+ *
+ * ####Example
+ *
+ * query.tailable() // true
+ * query.tailable(true)
+ * query.tailable(false)
+ *
+ * ####Note
+ *
+ * Cannot be used with `distinct()`
+ *
+ * @param {Boolean} bool defaults to true
+ * @param {Object} [opts] options to set
+ * @param {Number} [opts.numberOfRetries] if cursor is exhausted, retry this many times before giving up
+ * @param {Number} [opts.tailableRetryInterval] if cursor is exhausted, wait this many milliseconds before retrying
+ * @see tailable http://docs.mongodb.org/manual/tutorial/create-tailable-cursor/
+ * @api public
+ */
+
+Query.prototype.tailable = function(val, opts) {
+ // we need to support the tailable({ awaitdata : true }) as well as the
+ // tailable(true, {awaitdata :true}) syntax that mquery does not support
+ if (val && val.constructor.name === 'Object') {
+ opts = val;
+ val = true;
+ }
+
+ if (val === undefined) {
+ val = true;
+ }
+
+ if (opts && typeof opts === 'object') {
+ for (var key in opts) {
+ if (key === 'awaitdata') {
+ // For backwards compatibility
+ this.options[key] = !!opts[key];
+ } else {
+ this.options[key] = opts[key];
+ }
+ }
+ }
+
+ return Query.base.tailable.call(this, val);
+};
+
+/**
+ * Declares an intersects query for `geometry()`.
+ *
+ * ####Example
+ *
+ * query.where('path').intersects().geometry({
+ * type: 'LineString'
+ * , coordinates: [[180.0, 11.0], [180, 9.0]]
+ * })
+ *
+ * query.where('path').intersects({
+ * type: 'LineString'
+ * , coordinates: [[180.0, 11.0], [180, 9.0]]
+ * })
+ *
+ * ####NOTE:
+ *
+ * **MUST** be used after `where()`.
+ *
+ * ####NOTE:
+ *
+ * In Mongoose 3.7, `intersects` changed from a getter to a function. If you need the old syntax, use [this](https://github.com/ebensing/mongoose-within).
+ *
+ * @method intersects
+ * @memberOf Query
+ * @param {Object} [arg]
+ * @return {Query} this
+ * @see $geometry http://docs.mongodb.org/manual/reference/operator/geometry/
+ * @see geoIntersects http://docs.mongodb.org/manual/reference/operator/geoIntersects/
+ * @api public
+ */
+
+/**
+ * Specifies a `$geometry` condition
+ *
+ * ####Example
+ *
+ * var polyA = [[[ 10, 20 ], [ 10, 40 ], [ 30, 40 ], [ 30, 20 ]]]
+ * query.where('loc').within().geometry({ type: 'Polygon', coordinates: polyA })
+ *
+ * // or
+ * var polyB = [[ 0, 0 ], [ 1, 1 ]]
+ * query.where('loc').within().geometry({ type: 'LineString', coordinates: polyB })
+ *
+ * // or
+ * var polyC = [ 0, 0 ]
+ * query.where('loc').within().geometry({ type: 'Point', coordinates: polyC })
+ *
+ * // or
+ * query.where('loc').intersects().geometry({ type: 'Point', coordinates: polyC })
+ *
+ * The argument is assigned to the most recent path passed to `where()`.
+ *
+ * ####NOTE:
+ *
+ * `geometry()` **must** come after either `intersects()` or `within()`.
+ *
+ * The `object` argument must contain `type` and `coordinates` properties.
+ * - type {String}
+ * - coordinates {Array}
+ *
+ * @method geometry
+ * @memberOf Query
+ * @param {Object} object Must contain a `type` property which is a String and a `coordinates` property which is an Array. See the examples.
+ * @return {Query} this
+ * @see $geometry http://docs.mongodb.org/manual/reference/operator/geometry/
+ * @see http://docs.mongodb.org/manual/release-notes/2.4/#new-geospatial-indexes-with-geojson-and-improved-spherical-geometry
+ * @see http://www.mongodb.org/display/DOCS/Geospatial+Indexing
+ * @api public
+ */
+
+/**
+ * Specifies a `$near` or `$nearSphere` condition
+ *
+ * These operators return documents sorted by distance.
+ *
+ * ####Example
+ *
+ * query.where('loc').near({ center: [10, 10] });
+ * query.where('loc').near({ center: [10, 10], maxDistance: 5 });
+ * query.where('loc').near({ center: [10, 10], maxDistance: 5, spherical: true });
+ * query.near('loc', { center: [10, 10], maxDistance: 5 });
+ *
+ * @method near
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Object} val
+ * @return {Query} this
+ * @see $near http://docs.mongodb.org/manual/reference/operator/near/
+ * @see $nearSphere http://docs.mongodb.org/manual/reference/operator/nearSphere/
+ * @see $maxDistance http://docs.mongodb.org/manual/reference/operator/maxDistance/
+ * @see http://www.mongodb.org/display/DOCS/Geospatial+Indexing
+ * @api public
+ */
+
+/*!
+ * Overwriting mquery is needed to support a couple different near() forms found in older
+ * versions of mongoose
+ * near([1,1])
+ * near(1,1)
+ * near(field, [1,2])
+ * near(field, 1, 2)
+ * In addition to all of the normal forms supported by mquery
+ */
+
+Query.prototype.near = function() {
+ var params = [];
+ var sphere = this._mongooseOptions.nearSphere;
+
+ // TODO refactor
+
+ if (arguments.length === 1) {
+ if (Array.isArray(arguments[0])) {
+ params.push({center: arguments[0], spherical: sphere});
+ } else if (typeof arguments[0] === 'string') {
+ // just passing a path
+ params.push(arguments[0]);
+ } else if (utils.isObject(arguments[0])) {
+ if (typeof arguments[0].spherical !== 'boolean') {
+ arguments[0].spherical = sphere;
+ }
+ params.push(arguments[0]);
+ } else {
+ throw new TypeError('invalid argument');
+ }
+ } else if (arguments.length === 2) {
+ if (typeof arguments[0] === 'number' && typeof arguments[1] === 'number') {
+ params.push({center: [arguments[0], arguments[1]], spherical: sphere});
+ } else if (typeof arguments[0] === 'string' && Array.isArray(arguments[1])) {
+ params.push(arguments[0]);
+ params.push({center: arguments[1], spherical: sphere});
+ } else if (typeof arguments[0] === 'string' && utils.isObject(arguments[1])) {
+ params.push(arguments[0]);
+ if (typeof arguments[1].spherical !== 'boolean') {
+ arguments[1].spherical = sphere;
+ }
+ params.push(arguments[1]);
+ } else {
+ throw new TypeError('invalid argument');
+ }
+ } else if (arguments.length === 3) {
+ if (typeof arguments[0] === 'string' && typeof arguments[1] === 'number'
+ && typeof arguments[2] === 'number') {
+ params.push(arguments[0]);
+ params.push({center: [arguments[1], arguments[2]], spherical: sphere});
+ } else {
+ throw new TypeError('invalid argument');
+ }
+ } else {
+ throw new TypeError('invalid argument');
+ }
+
+ return Query.base.near.apply(this, params);
+};
+
+/**
+ * _DEPRECATED_ Specifies a `$nearSphere` condition
+ *
+ * ####Example
+ *
+ * query.where('loc').nearSphere({ center: [10, 10], maxDistance: 5 });
+ *
+ * **Deprecated.** Use `query.near()` instead with the `spherical` option set to `true`.
+ *
+ * ####Example
+ *
+ * query.where('loc').near({ center: [10, 10], spherical: true });
+ *
+ * @deprecated
+ * @see near() #query_Query-near
+ * @see $near http://docs.mongodb.org/manual/reference/operator/near/
+ * @see $nearSphere http://docs.mongodb.org/manual/reference/operator/nearSphere/
+ * @see $maxDistance http://docs.mongodb.org/manual/reference/operator/maxDistance/
+ */
+
+Query.prototype.nearSphere = function() {
+ this._mongooseOptions.nearSphere = true;
+ this.near.apply(this, arguments);
+ return this;
+};
+
+/**
+ * Specifies a $polygon condition
+ *
+ * ####Example
+ *
+ * query.where('loc').within().polygon([10,20], [13, 25], [7,15])
+ * query.polygon('loc', [10,20], [13, 25], [7,15])
+ *
+ * @method polygon
+ * @memberOf Query
+ * @param {String|Array} [path]
+ * @param {Array|Object} [coordinatePairs...]
+ * @return {Query} this
+ * @see $polygon http://docs.mongodb.org/manual/reference/operator/polygon/
+ * @see http://www.mongodb.org/display/DOCS/Geospatial+Indexing
+ * @api public
+ */
+
+/**
+ * Specifies a $box condition
+ *
+ * ####Example
+ *
+ * var lowerLeft = [40.73083, -73.99756]
+ * var upperRight= [40.741404, -73.988135]
+ *
+ * query.where('loc').within().box(lowerLeft, upperRight)
+ * query.box({ ll : lowerLeft, ur : upperRight })
+ *
+ * @method box
+ * @memberOf Query
+ * @see $box http://docs.mongodb.org/manual/reference/operator/box/
+ * @see within() Query#within #query_Query-within
+ * @see http://www.mongodb.org/display/DOCS/Geospatial+Indexing
+ * @param {Object} val
+ * @param [Array] Upper Right Coords
+ * @return {Query} this
+ * @api public
+ */
+
+/*!
+ * this is needed to support the mongoose syntax of:
+ * box(field, { ll : [x,y], ur : [x2,y2] })
+ * box({ ll : [x,y], ur : [x2,y2] })
+ */
+
+Query.prototype.box = function(ll, ur) {
+ if (!Array.isArray(ll) && utils.isObject(ll)) {
+ ur = ll.ur;
+ ll = ll.ll;
+ }
+ return Query.base.box.call(this, ll, ur);
+};
+
+/**
+ * Specifies a $center or $centerSphere condition.
+ *
+ * ####Example
+ *
+ * var area = { center: [50, 50], radius: 10, unique: true }
+ * query.where('loc').within().circle(area)
+ * // alternatively
+ * query.circle('loc', area);
+ *
+ * // spherical calculations
+ * var area = { center: [50, 50], radius: 10, unique: true, spherical: true }
+ * query.where('loc').within().circle(area)
+ * // alternatively
+ * query.circle('loc', area);
+ *
+ * New in 3.7.0
+ *
+ * @method circle
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Object} area
+ * @return {Query} this
+ * @see $center http://docs.mongodb.org/manual/reference/operator/center/
+ * @see $centerSphere http://docs.mongodb.org/manual/reference/operator/centerSphere/
+ * @see $geoWithin http://docs.mongodb.org/manual/reference/operator/geoWithin/
+ * @see http://www.mongodb.org/display/DOCS/Geospatial+Indexing
+ * @api public
+ */
+
+/**
+ * _DEPRECATED_ Alias for [circle](#query_Query-circle)
+ *
+ * **Deprecated.** Use [circle](#query_Query-circle) instead.
+ *
+ * @deprecated
+ * @method center
+ * @memberOf Query
+ * @api public
+ */
+
+Query.prototype.center = Query.base.circle;
+
+/**
+ * _DEPRECATED_ Specifies a $centerSphere condition
+ *
+ * **Deprecated.** Use [circle](#query_Query-circle) instead.
+ *
+ * ####Example
+ *
+ * var area = { center: [50, 50], radius: 10 };
+ * query.where('loc').within().centerSphere(area);
+ *
+ * @deprecated
+ * @param {String} [path]
+ * @param {Object} val
+ * @return {Query} this
+ * @see http://www.mongodb.org/display/DOCS/Geospatial+Indexing
+ * @see $centerSphere http://docs.mongodb.org/manual/reference/operator/centerSphere/
+ * @api public
+ */
+
+Query.prototype.centerSphere = function() {
+ if (arguments[0] && arguments[0].constructor.name === 'Object') {
+ arguments[0].spherical = true;
+ }
+
+ if (arguments[1] && arguments[1].constructor.name === 'Object') {
+ arguments[1].spherical = true;
+ }
+
+ Query.base.circle.apply(this, arguments);
+};
+
+/**
+ * Determines if field selection has been made.
+ *
+ * @method selected
+ * @memberOf Query
+ * @return {Boolean}
+ * @api public
+ */
+
+/**
+ * Determines if inclusive field selection has been made.
+ *
+ * query.selectedInclusively() // false
+ * query.select('name')
+ * query.selectedInclusively() // true
+ *
+ * @method selectedInclusively
+ * @memberOf Query
+ * @return {Boolean}
+ * @api public
+ */
+
+/**
+ * Determines if exclusive field selection has been made.
+ *
+ * query.selectedExclusively() // false
+ * query.select('-name')
+ * query.selectedExclusively() // true
+ * query.selectedInclusively() // false
+ *
+ * @method selectedExclusively
+ * @memberOf Query
+ * @return {Boolean}
+ * @api public
+ */
+
+/*!
+ * Export
+ */
+
+module.exports = Query;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/querycursor.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/querycursor.js
new file mode 100644
index 0000000..da82a5b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/querycursor.js
@@ -0,0 +1,314 @@
+/*!
+ * Module dependencies.
+ */
+
+var PromiseProvider = require('./promise_provider');
+var Readable = require('stream').Readable;
+var helpers = require('./queryhelpers');
+var util = require('util');
+
+/**
+ * A QueryCursor is a concurrency primitive for processing query results
+ * one document at a time. A QueryCursor fulfills the [Node.js streams3 API](https://strongloop.com/strongblog/whats-new-io-js-beta-streams3/),
+ * in addition to several other mechanisms for loading documents from MongoDB
+ * one at a time.
+ *
+ * Unless you're an advanced user, do **not** instantiate this class directly.
+ * Use [`Query#cursor()`](/docs/api.html#query_Query-cursor) instead.
+ *
+ * @param {Query} query
+ * @param {Object} options query options passed to `.find()`
+ * @inherits Readable
+ * @event `cursor`: Emitted when the cursor is created
+ * @event `error`: Emitted when an error occurred
+ * @event `data`: Emitted when the stream is flowing and the next doc is ready
+ * @event `end`: Emitted when the stream is exhausted
+ * @api public
+ */
+
+function QueryCursor(query, options) {
+ Readable.call(this, { objectMode: true });
+
+ this.cursor = null;
+ this.query = query;
+ this._transforms = options.transform ? [options.transform] : [];
+ var _this = this;
+ var model = query.model;
+ model.collection.find(query._conditions, options, function(err, cursor) {
+ if (_this._error) {
+ cursor.close(function() {});
+ _this.listeners('error').length > 0 && _this.emit('error', _this._error);
+ }
+ if (err) {
+ return _this.emit('error', err);
+ }
+ _this.cursor = cursor;
+ _this.emit('cursor', cursor);
+ });
+}
+
+util.inherits(QueryCursor, Readable);
+
+/*!
+ * Necessary to satisfy the Readable API
+ */
+
+QueryCursor.prototype._read = function() {
+ var _this = this;
+ _next(this, function(error, doc) {
+ if (error) {
+ return _this.emit('error', error);
+ }
+ if (!doc) {
+ _this.push(null);
+ return _this.cursor.close(function(error) {
+ if (error) {
+ return _this.emit('error', error);
+ }
+ _this.emit('close');
+ });
+ }
+ _this.push(doc);
+ });
+};
+
+/**
+ * Registers a transform function which subsequently maps documents retrieved
+ * via the streams interface or `.next()`
+ *
+ * ####Example
+ *
+ * // Map documents returned by `data` events
+ * Thing.
+ * find({ name: /^hello/ }).
+ * cursor().
+ * map(function (doc) {
+ * doc.foo = "bar";
+ * return doc;
+ * })
+ * on('data', function(doc) { console.log(doc.foo); });
+ *
+ * // Or map documents returned by `.next()`
+ * var cursor = Thing.find({ name: /^hello/ }).
+ * cursor().
+ * map(function (doc) {
+ * doc.foo = "bar";
+ * return doc;
+ * });
+ * cursor.next(function(error, doc) {
+ * console.log(doc.foo);
+ * });
+ *
+ * @param {Function} fn
+ * @return {QueryCursor}
+ * @api public
+ * @method map
+ */
+
+QueryCursor.prototype.map = function(fn) {
+ this._transforms.push(fn);
+ return this;
+};
+
+/*!
+ * Marks this cursor as errored
+ */
+
+QueryCursor.prototype._markError = function(error) {
+ this._error = error;
+ return this;
+};
+
+/**
+ * Marks this cursor as closed. Will stop streaming and subsequent calls to
+ * `next()` will error.
+ *
+ * @param {Function} callback
+ * @return {Promise}
+ * @api public
+ * @method close
+ * @emits close
+ * @see MongoDB driver cursor#close http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#close
+ */
+
+QueryCursor.prototype.close = function(callback) {
+ var Promise = PromiseProvider.get();
+ var _this = this;
+ return new Promise.ES6(function(resolve, reject) {
+ _this.cursor.close(function(error) {
+ if (error) {
+ callback && callback(error);
+ reject(error);
+ return _this.listeners('error').length > 0 &&
+ _this.emit('error', error);
+ }
+ _this.emit('close');
+ resolve();
+ callback && callback();
+ });
+ });
+};
+
+/**
+ * Get the next document from this cursor. Will return `null` when there are
+ * no documents left.
+ *
+ * @param {Function} callback
+ * @return {Promise}
+ * @api public
+ * @method next
+ */
+
+QueryCursor.prototype.next = function(callback) {
+ var Promise = PromiseProvider.get();
+ var _this = this;
+ return new Promise.ES6(function(resolve, reject) {
+ _next(_this, function(error, doc) {
+ if (error) {
+ callback && callback(error);
+ return reject(error);
+ }
+ callback && callback(null, doc);
+ resolve(doc);
+ });
+ });
+};
+
+/**
+ * Execute `fn` for every document in the cursor. If `fn` returns a promise,
+ * will wait for the promise to resolve before iterating on to the next one.
+ * Returns a promise that resolves when done.
+ *
+ * @param {Function} fn
+ * @param {Function} [callback] executed when all docs have been processed
+ * @return {Promise}
+ * @api public
+ * @method eachAsync
+ */
+
+QueryCursor.prototype.eachAsync = function(fn, callback) {
+ var Promise = PromiseProvider.get();
+ var _this = this;
+
+ var handleNextResult = function(doc, callback) {
+ var promise = fn(doc);
+ if (promise && typeof promise.then === 'function') {
+ promise.then(
+ function() { callback(null); },
+ function(error) { callback(error); });
+ } else {
+ callback(null);
+ }
+ };
+
+ var iterate = function(callback) {
+ return _next(_this, function(error, doc) {
+ if (error) {
+ return callback(error);
+ }
+ if (!doc) {
+ return callback(null);
+ }
+ handleNextResult(doc, function(error) {
+ if (error) {
+ return callback(error);
+ }
+ // Make sure to clear the stack re: gh-4697
+ setTimeout(function() {
+ iterate(callback);
+ }, 0);
+ });
+ });
+ };
+
+ return new Promise.ES6(function(resolve, reject) {
+ iterate(function(error) {
+ if (error) {
+ callback && callback(error);
+ return reject(error);
+ }
+ callback && callback(null);
+ return resolve();
+ });
+ });
+};
+
+/*!
+ * Get the next doc from the underlying cursor and mongooseify it
+ * (populate, etc.)
+ */
+
+function _next(ctx, cb) {
+ var callback = cb;
+ if (ctx._transforms.length) {
+ callback = function(err, doc) {
+ if (err || doc === null) return cb(err, doc);
+ cb(err, ctx._transforms.reduce(function(doc, fn) {
+ return fn(doc);
+ }, doc));
+ };
+ }
+
+ if (ctx._error) {
+ return process.nextTick(function() {
+ callback(ctx._error);
+ });
+ }
+
+ if (ctx.cursor) {
+ ctx.cursor.next(function(error, doc) {
+ if (error) {
+ return callback(error);
+ }
+ if (!doc) {
+ return callback(null, null);
+ }
+
+ var opts = ctx.query._mongooseOptions;
+ if (!opts.populate) {
+ return opts.lean === true ?
+ callback(null, doc) :
+ _create(ctx, doc, null, callback);
+ }
+
+ var pop = helpers.preparePopulationOptionsMQ(ctx.query,
+ ctx.query._mongooseOptions);
+ pop.forEach(function(option) {
+ delete option.model;
+ });
+ pop.__noPromise = true;
+ ctx.query.model.populate(doc, pop, function(err, doc) {
+ if (err) {
+ return callback(err);
+ }
+ return opts.lean === true ?
+ callback(null, doc) :
+ _create(ctx, doc, pop, callback);
+ });
+ });
+ } else {
+ ctx.once('cursor', function() {
+ _next(ctx, callback);
+ });
+ }
+}
+
+/*!
+ * Convert a raw doc into a full mongoose doc.
+ */
+
+function _create(ctx, doc, populatedIds, cb) {
+ var instance = helpers.createModel(ctx.query.model, doc, ctx.query._fields);
+ var opts = populatedIds ?
+ { populated: populatedIds } :
+ undefined;
+
+ instance.init(doc, opts, function(err) {
+ if (err) {
+ return cb(err);
+ }
+ cb(null, instance);
+ });
+}
+
+module.exports = QueryCursor;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/queryhelpers.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/queryhelpers.js
new file mode 100644
index 0000000..3e0b82d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/queryhelpers.js
@@ -0,0 +1,78 @@
+
+/*!
+ * Module dependencies
+ */
+
+var utils = require('./utils');
+
+/*!
+ * Prepare a set of path options for query population.
+ *
+ * @param {Query} query
+ * @param {Object} options
+ * @return {Array}
+ */
+
+exports.preparePopulationOptions = function preparePopulationOptions(query, options) {
+ var pop = utils.object.vals(query.options.populate);
+
+ // lean options should trickle through all queries
+ if (options.lean) pop.forEach(makeLean);
+
+ return pop;
+};
+
+/*!
+ * Prepare a set of path options for query population. This is the MongooseQuery
+ * version
+ *
+ * @param {Query} query
+ * @param {Object} options
+ * @return {Array}
+ */
+
+exports.preparePopulationOptionsMQ = function preparePopulationOptionsMQ(query, options) {
+ var pop = utils.object.vals(query._mongooseOptions.populate);
+
+ // lean options should trickle through all queries
+ if (options.lean) pop.forEach(makeLean);
+
+ return pop;
+};
+
+/*!
+ * If the document is a mapped discriminator type, it returns a model instance for that type, otherwise,
+ * it returns an instance of the given model.
+ *
+ * @param {Model} model
+ * @param {Object} doc
+ * @param {Object} fields
+ *
+ * @return {Model}
+ */
+exports.createModel = function createModel(model, doc, fields) {
+ var discriminatorMapping = model.schema
+ ? model.schema.discriminatorMapping
+ : null;
+
+ var key = discriminatorMapping && discriminatorMapping.isRoot
+ ? discriminatorMapping.key
+ : null;
+
+ if (key && doc[key] && model.discriminators && model.discriminators[doc[key]]) {
+ return new model.discriminators[doc[key]](undefined, fields, true);
+ }
+
+ return new model(undefined, fields, true);
+};
+
+/*!
+ * Set each path query option to lean
+ *
+ * @param {Object} option
+ */
+
+function makeLean(option) {
+ option.options || (option.options = {});
+ option.options.lean = true;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/querystream.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/querystream.js
new file mode 100644
index 0000000..2918e25
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/querystream.js
@@ -0,0 +1,367 @@
+/* eslint no-empty: 1 */
+
+/*!
+ * Module dependencies.
+ */
+
+var Stream = require('stream').Stream;
+var utils = require('./utils');
+var helpers = require('./queryhelpers');
+var K = function(k) {
+ return k;
+};
+
+/**
+ * Provides a Node.js 0.8 style [ReadStream](http://nodejs.org/docs/v0.8.21/api/stream.html#stream_readable_stream) interface for Queries.
+ *
+ * var stream = Model.find().stream();
+ *
+ * stream.on('data', function (doc) {
+ * // do something with the mongoose document
+ * }).on('error', function (err) {
+ * // handle the error
+ * }).on('close', function () {
+ * // the stream is closed
+ * });
+ *
+ *
+ * The stream interface allows us to simply "plug-in" to other _Node.js 0.8_ style write streams.
+ *
+ * Model.where('created').gte(twoWeeksAgo).stream().pipe(writeStream);
+ *
+ * ####Valid options
+ *
+ * - `transform`: optional function which accepts a mongoose document. The return value of the function will be emitted on `data`.
+ *
+ * ####Example
+ *
+ * // JSON.stringify all documents before emitting
+ * var stream = Thing.find().stream({ transform: JSON.stringify });
+ * stream.pipe(writeStream);
+ *
+ * _NOTE: plugging into an HTTP response will *not* work out of the box. Those streams expect only strings or buffers to be emitted, so first formatting our documents as strings/buffers is necessary._
+ *
+ * _NOTE: these streams are Node.js 0.8 style read streams which differ from Node.js 0.10 style. Node.js 0.10 streams are not well tested yet and are not guaranteed to work._
+ *
+ * @param {Query} query
+ * @param {Object} [options]
+ * @inherits NodeJS Stream http://nodejs.org/docs/v0.8.21/api/stream.html#stream_readable_stream
+ * @event `data`: emits a single Mongoose document
+ * @event `error`: emits when an error occurs during streaming. This will emit _before_ the `close` event.
+ * @event `close`: emits when the stream reaches the end of the cursor or an error occurs, or the stream is manually `destroy`ed. After this event, no more events are emitted.
+ * @api public
+ */
+
+function QueryStream(query, options) {
+ Stream.call(this);
+
+ this.query = query;
+ this.readable = true;
+ this.paused = false;
+ this._cursor = null;
+ this._destroyed = null;
+ this._fields = null;
+ this._buffer = null;
+ this._inline = T_INIT;
+ this._running = false;
+ this._transform = options && typeof options.transform === 'function'
+ ? options.transform
+ : K;
+
+ // give time to hook up events
+ var _this = this;
+ process.nextTick(function() {
+ _this._init();
+ });
+}
+
+/*!
+ * Inherit from Stream
+ */
+
+QueryStream.prototype.__proto__ = Stream.prototype;
+
+/**
+ * Flag stating whether or not this stream is readable.
+ *
+ * @property readable
+ * @api public
+ */
+
+QueryStream.prototype.readable;
+
+/**
+ * Flag stating whether or not this stream is paused.
+ *
+ * @property paused
+ * @api public
+ */
+
+QueryStream.prototype.paused;
+
+// trampoline flags
+var T_INIT = 0;
+var T_IDLE = 1;
+var T_CONT = 2;
+
+/**
+ * Initializes the query.
+ *
+ * @api private
+ */
+
+QueryStream.prototype._init = function() {
+ if (this._destroyed) {
+ return;
+ }
+
+ var query = this.query,
+ model = query.model,
+ options = query._optionsForExec(model),
+ _this = this;
+
+ try {
+ query.cast(model);
+ } catch (err) {
+ return _this.destroy(err);
+ }
+
+ _this._fields = utils.clone(query._fields);
+ options.fields = query._castFields(_this._fields);
+
+ model.collection.find(query._conditions, options, function(err, cursor) {
+ if (err) {
+ return _this.destroy(err);
+ }
+ _this._cursor = cursor;
+ _this._next();
+ });
+};
+
+/**
+ * Trampoline for pulling the next doc from cursor.
+ *
+ * @see QueryStream#__next #querystream_QueryStream-__next
+ * @api private
+ */
+
+QueryStream.prototype._next = function _next() {
+ if (this.paused || this._destroyed) {
+ this._running = false;
+ return this._running;
+ }
+
+ this._running = true;
+
+ if (this._buffer && this._buffer.length) {
+ var arg;
+ while (!this.paused && !this._destroyed && (arg = this._buffer.shift())) { // eslint-disable-line no-cond-assign
+ this._onNextObject.apply(this, arg);
+ }
+ }
+
+ // avoid stack overflows with large result sets.
+ // trampoline instead of recursion.
+ while (this.__next()) {
+ }
+};
+
+/**
+ * Pulls the next doc from the cursor.
+ *
+ * @see QueryStream#_next #querystream_QueryStream-_next
+ * @api private
+ */
+
+QueryStream.prototype.__next = function() {
+ if (this.paused || this._destroyed) {
+ this._running = false;
+ return this._running;
+ }
+
+ var _this = this;
+ _this._inline = T_INIT;
+
+ _this._cursor.nextObject(function cursorcb(err, doc) {
+ _this._onNextObject(err, doc);
+ });
+
+ // if onNextObject() was already called in this tick
+ // return ourselves to the trampoline.
+ if (T_CONT === this._inline) {
+ return true;
+ }
+ // onNextObject() hasn't fired yet. tell onNextObject
+ // that its ok to call _next b/c we are not within
+ // the trampoline anymore.
+ this._inline = T_IDLE;
+};
+
+/**
+ * Transforms raw `doc`s returned from the cursor into a model instance.
+ *
+ * @param {Error|null} err
+ * @param {Object} doc
+ * @api private
+ */
+
+QueryStream.prototype._onNextObject = function _onNextObject(err, doc) {
+ if (this._destroyed) {
+ return;
+ }
+
+ if (this.paused) {
+ this._buffer || (this._buffer = []);
+ this._buffer.push([err, doc]);
+ this._running = false;
+ return this._running;
+ }
+
+ if (err) {
+ return this.destroy(err);
+ }
+
+ // when doc is null we hit the end of the cursor
+ if (!doc) {
+ this.emit('end');
+ return this.destroy();
+ }
+
+ var opts = this.query._mongooseOptions;
+
+ if (!opts.populate) {
+ return opts.lean === true ?
+ emit(this, doc) :
+ createAndEmit(this, null, doc);
+ }
+
+ var _this = this;
+ var pop = helpers.preparePopulationOptionsMQ(_this.query, _this.query._mongooseOptions);
+
+ // Hack to work around gh-3108
+ pop.forEach(function(option) {
+ delete option.model;
+ });
+
+ pop.__noPromise = true;
+ _this.query.model.populate(doc, pop, function(err, doc) {
+ if (err) {
+ return _this.destroy(err);
+ }
+ return opts.lean === true ?
+ emit(_this, doc) :
+ createAndEmit(_this, pop, doc);
+ });
+};
+
+function createAndEmit(self, populatedIds, doc) {
+ var instance = helpers.createModel(self.query.model, doc, self._fields);
+ var opts = populatedIds ?
+ {populated: populatedIds} :
+ undefined;
+
+ instance.init(doc, opts, function(err) {
+ if (err) {
+ return self.destroy(err);
+ }
+ emit(self, instance);
+ });
+}
+
+/*!
+ * Emit a data event and manage the trampoline state
+ */
+
+function emit(self, doc) {
+ self.emit('data', self._transform(doc));
+
+ // trampoline management
+ if (T_IDLE === self._inline) {
+ // no longer in trampoline. restart it.
+ self._next();
+ } else {
+ // in a trampoline. tell __next that its
+ // ok to continue jumping.
+ self._inline = T_CONT;
+ }
+}
+
+/**
+ * Pauses this stream.
+ *
+ * @api public
+ */
+
+QueryStream.prototype.pause = function() {
+ this.paused = true;
+};
+
+/**
+ * Resumes this stream.
+ *
+ * @api public
+ */
+
+QueryStream.prototype.resume = function() {
+ this.paused = false;
+
+ if (!this._cursor) {
+ // cannot start if not initialized
+ return;
+ }
+
+ // are we within the trampoline?
+ if (T_INIT === this._inline) {
+ return;
+ }
+
+ if (!this._running) {
+ // outside QueryStream control, need manual restart
+ return this._next();
+ }
+};
+
+/**
+ * Destroys the stream, closing the underlying cursor, which emits the close event. No more events will be emitted after the close event.
+ *
+ * @param {Error} [err]
+ * @api public
+ */
+
+QueryStream.prototype.destroy = function(err) {
+ if (this._destroyed) {
+ return;
+ }
+ this._destroyed = true;
+ this._running = false;
+ this.readable = false;
+
+ if (this._cursor) {
+ this._cursor.close();
+ }
+
+ if (err) {
+ this.emit('error', err);
+ }
+
+ this.emit('close');
+};
+
+/**
+ * Pipes this query stream into another stream. This method is inherited from NodeJS Streams.
+ *
+ * ####Example:
+ *
+ * query.stream().pipe(writeStream [, options])
+ *
+ * @method pipe
+ * @memberOf QueryStream
+ * @see NodeJS http://nodejs.org/api/stream.html
+ * @api public
+ */
+
+/*!
+ * Module exports
+ */
+
+module.exports = exports = QueryStream;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema.js
new file mode 100644
index 0000000..7e28f58
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema.js
@@ -0,0 +1,1768 @@
+/*!
+ * Module dependencies.
+ */
+
+var readPref = require('./drivers').ReadPreference;
+var EventEmitter = require('events').EventEmitter;
+var VirtualType = require('./virtualtype');
+var utils = require('./utils');
+var MongooseTypes;
+var Kareem = require('kareem');
+var each = require('async/each');
+var SchemaType = require('./schematype');
+
+var IS_KAREEM_HOOK = {
+ count: true,
+ find: true,
+ findOne: true,
+ findOneAndUpdate: true,
+ findOneAndRemove: true,
+ insertMany: true,
+ update: true
+};
+
+/**
+ * Schema constructor.
+ *
+ * ####Example:
+ *
+ * var child = new Schema({ name: String });
+ * var schema = new Schema({ name: String, age: Number, children: [child] });
+ * var Tree = mongoose.model('Tree', schema);
+ *
+ * // setting schema options
+ * new Schema({ name: String }, { _id: false, autoIndex: false })
+ *
+ * ####Options:
+ *
+ * - [autoIndex](/docs/guide.html#autoIndex): bool - defaults to null (which means use the connection's autoIndex option)
+ * - [bufferCommands](/docs/guide.html#bufferCommands): bool - defaults to true
+ * - [capped](/docs/guide.html#capped): bool - defaults to false
+ * - [collection](/docs/guide.html#collection): string - no default
+ * - [emitIndexErrors](/docs/guide.html#emitIndexErrors): bool - defaults to false.
+ * - [id](/docs/guide.html#id): bool - defaults to true
+ * - [_id](/docs/guide.html#_id): bool - defaults to true
+ * - `minimize`: bool - controls [document#toObject](#document_Document-toObject) behavior when called manually - defaults to true
+ * - [read](/docs/guide.html#read): string
+ * - [safe](/docs/guide.html#safe): bool - defaults to true.
+ * - [shardKey](/docs/guide.html#shardKey): bool - defaults to `null`
+ * - [strict](/docs/guide.html#strict): bool - defaults to true
+ * - [toJSON](/docs/guide.html#toJSON) - object - no default
+ * - [toObject](/docs/guide.html#toObject) - object - no default
+ * - [typeKey](/docs/guide.html#typeKey) - string - defaults to 'type'
+ * - [useNestedStrict](/docs/guide.html#useNestedStrict) - boolean - defaults to false
+ * - [validateBeforeSave](/docs/guide.html#validateBeforeSave) - bool - defaults to `true`
+ * - [versionKey](/docs/guide.html#versionKey): string - defaults to "__v"
+ *
+ * ####Note:
+ *
+ * _When nesting schemas, (`children` in the example above), always declare the child schema first before passing it into its parent._
+ *
+ * @param {Object} definition
+ * @param {Object} [options]
+ * @inherits NodeJS EventEmitter http://nodejs.org/api/events.html#events_class_events_eventemitter
+ * @event `init`: Emitted after the schema is compiled into a `Model`.
+ * @api public
+ */
+
+function Schema(obj, options) {
+ if (!(this instanceof Schema)) {
+ return new Schema(obj, options);
+ }
+
+ this.obj = obj;
+ this.paths = {};
+ this.subpaths = {};
+ this.virtuals = {};
+ this.singleNestedPaths = {};
+ this.nested = {};
+ this.inherits = {};
+ this.callQueue = [];
+ this._indexes = [];
+ this.methods = {};
+ this.statics = {};
+ this.tree = {};
+ this._requiredpaths = undefined;
+ this.discriminatorMapping = undefined;
+ this._indexedpaths = undefined;
+ this.query = {};
+ this.childSchemas = [];
+
+ this.s = {
+ hooks: new Kareem(),
+ kareemHooks: IS_KAREEM_HOOK
+ };
+
+ this.options = this.defaultOptions(options);
+
+ // build paths
+ if (obj) {
+ this.add(obj);
+ }
+
+ // check if _id's value is a subdocument (gh-2276)
+ var _idSubDoc = obj && obj._id && utils.isObject(obj._id);
+
+ // ensure the documents get an auto _id unless disabled
+ var auto_id = !this.paths['_id'] &&
+ (!this.options.noId && this.options._id) && !_idSubDoc;
+
+ if (auto_id) {
+ obj = {_id: {auto: true}};
+ obj._id[this.options.typeKey] = Schema.ObjectId;
+ this.add(obj);
+ }
+
+ // ensure the documents receive an id getter unless disabled
+ var autoid = !this.paths['id'] &&
+ (!this.options.noVirtualId && this.options.id);
+ if (autoid) {
+ this.virtual('id').get(idGetter);
+ }
+
+ for (var i = 0; i < this._defaultMiddleware.length; ++i) {
+ var m = this._defaultMiddleware[i];
+ this[m.kind](m.hook, !!m.isAsync, m.fn);
+ }
+
+ if (this.options.timestamps) {
+ this.setupTimestamp(this.options.timestamps);
+ }
+}
+
+/*!
+ * Returns this documents _id cast to a string.
+ */
+
+function idGetter() {
+ if (this.$__._id) {
+ return this.$__._id;
+ }
+
+ this.$__._id = this._id == null
+ ? null
+ : String(this._id);
+ return this.$__._id;
+}
+
+/*!
+ * Inherit from EventEmitter.
+ */
+Schema.prototype = Object.create(EventEmitter.prototype);
+Schema.prototype.constructor = Schema;
+Schema.prototype.instanceOfSchema = true;
+
+/**
+ * Default middleware attached to a schema. Cannot be changed.
+ *
+ * This field is used to make sure discriminators don't get multiple copies of
+ * built-in middleware. Declared as a constant because changing this at runtime
+ * may lead to instability with Model.prototype.discriminator().
+ *
+ * @api private
+ * @property _defaultMiddleware
+ */
+Object.defineProperty(Schema.prototype, '_defaultMiddleware', {
+ configurable: false,
+ enumerable: false,
+ writable: false,
+ value: [
+ {
+ kind: 'pre',
+ hook: 'save',
+ fn: function(next, options) {
+ var _this = this;
+ // Nested docs have their own presave
+ if (this.ownerDocument) {
+ return next();
+ }
+
+ var hasValidateBeforeSaveOption = options &&
+ (typeof options === 'object') &&
+ ('validateBeforeSave' in options);
+
+ var shouldValidate;
+ if (hasValidateBeforeSaveOption) {
+ shouldValidate = !!options.validateBeforeSave;
+ } else {
+ shouldValidate = this.schema.options.validateBeforeSave;
+ }
+
+ // Validate
+ if (shouldValidate) {
+ // HACK: use $__original_validate to avoid promises so bluebird doesn't
+ // complain
+ if (this.$__original_validate) {
+ this.$__original_validate({__noPromise: true}, function(error) {
+ return _this.schema.s.hooks.execPost('save:error', _this, [_this], { error: error }, function(error) {
+ next(error);
+ });
+ });
+ } else {
+ this.validate({__noPromise: true}, function(error) {
+ return _this.schema.s.hooks.execPost('save:error', _this, [ _this], { error: error }, function(error) {
+ next(error);
+ });
+ });
+ }
+ } else {
+ next();
+ }
+ }
+ },
+ {
+ kind: 'pre',
+ hook: 'save',
+ isAsync: true,
+ fn: function(next, done) {
+ var _this = this;
+ var subdocs = this.$__getAllSubdocs();
+
+ if (!subdocs.length || this.$__preSavingFromParent) {
+ done();
+ next();
+ return;
+ }
+
+ each(subdocs, function(subdoc, cb) {
+ subdoc.$__preSavingFromParent = true;
+ subdoc.save(function(err) {
+ cb(err);
+ });
+ }, function(error) {
+ for (var i = 0; i < subdocs.length; ++i) {
+ delete subdocs[i].$__preSavingFromParent;
+ }
+ if (error) {
+ return _this.schema.s.hooks.execPost('save:error', _this, [_this], { error: error }, function(error) {
+ done(error);
+ });
+ }
+ next();
+ done();
+ });
+ }
+ },
+ {
+ kind: 'pre',
+ hook: 'validate',
+ isAsync: true,
+ fn: function(next, done) {
+ // Hack to ensure that we always wrap validate() in a promise
+ next();
+ done();
+ }
+ },
+ {
+ kind: 'pre',
+ hook: 'remove',
+ isAsync: true,
+ fn: function(next, done) {
+ if (this.ownerDocument) {
+ done();
+ next();
+ return;
+ }
+
+ var subdocs = this.$__getAllSubdocs();
+
+ if (!subdocs.length || this.$__preSavingFromParent) {
+ done();
+ next();
+ return;
+ }
+
+ each(subdocs, function(subdoc, cb) {
+ subdoc.remove({ noop: true }, function(err) {
+ cb(err);
+ });
+ }, function(error) {
+ if (error) {
+ done(error);
+ return;
+ }
+ next();
+ done();
+ });
+ }
+ }
+ ]
+});
+
+
+/**
+ * The original object passed to the schema constructor
+ *
+ * ####Example:
+ *
+ * var schema = new Schema({ a: String }).add({ b: String });
+ * schema.obj; // { a: String }
+ *
+ * @api public
+ * @property obj
+ */
+
+Schema.prototype.obj;
+
+/**
+ * Schema as flat paths
+ *
+ * ####Example:
+ * {
+ * '_id' : SchemaType,
+ * , 'nested.key' : SchemaType,
+ * }
+ *
+ * @api private
+ * @property paths
+ */
+
+Schema.prototype.paths;
+
+/**
+ * Schema as a tree
+ *
+ * ####Example:
+ * {
+ * '_id' : ObjectId
+ * , 'nested' : {
+ * 'key' : String
+ * }
+ * }
+ *
+ * @api private
+ * @property tree
+ */
+
+Schema.prototype.tree;
+
+/**
+ * Returns default options for this schema, merged with `options`.
+ *
+ * @param {Object} options
+ * @return {Object}
+ * @api private
+ */
+
+Schema.prototype.defaultOptions = function(options) {
+ if (options && options.safe === false) {
+ options.safe = {w: 0};
+ }
+
+ if (options && options.safe && options.safe.w === 0) {
+ // if you turn off safe writes, then versioning goes off as well
+ options.versionKey = false;
+ }
+
+ options = utils.options({
+ strict: true,
+ bufferCommands: true,
+ capped: false, // { size, max, autoIndexId }
+ versionKey: '__v',
+ discriminatorKey: '__t',
+ minimize: true,
+ autoIndex: null,
+ shardKey: null,
+ read: null,
+ validateBeforeSave: true,
+ // the following are only applied at construction time
+ noId: false, // deprecated, use { _id: false }
+ _id: true,
+ noVirtualId: false, // deprecated, use { id: false }
+ id: true,
+ typeKey: 'type',
+ retainKeyOrder: false
+ }, options);
+
+ if (options.read) {
+ options.read = readPref(options.read);
+ }
+
+ return options;
+};
+
+/**
+ * Adds key path / schema type pairs to this schema.
+ *
+ * ####Example:
+ *
+ * var ToySchema = new Schema;
+ * ToySchema.add({ name: 'string', color: 'string', price: 'number' });
+ *
+ * @param {Object} obj
+ * @param {String} prefix
+ * @api public
+ */
+
+Schema.prototype.add = function add(obj, prefix) {
+ prefix = prefix || '';
+ var keys = Object.keys(obj);
+
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+
+ if (obj[key] == null) {
+ throw new TypeError('Invalid value for schema path `' + prefix + key + '`');
+ }
+
+ if (Array.isArray(obj[key]) && obj[key].length === 1 && obj[key][0] == null) {
+ throw new TypeError('Invalid value for schema Array path `' + prefix + key + '`');
+ }
+
+ if (utils.isObject(obj[key]) &&
+ (!obj[key].constructor || utils.getFunctionName(obj[key].constructor) === 'Object') &&
+ (!obj[key][this.options.typeKey] || (this.options.typeKey === 'type' && obj[key].type.type))) {
+ if (Object.keys(obj[key]).length) {
+ // nested object { last: { name: String }}
+ this.nested[prefix + key] = true;
+ this.add(obj[key], prefix + key + '.');
+ } else {
+ if (prefix) {
+ this.nested[prefix.substr(0, prefix.length - 1)] = true;
+ }
+ this.path(prefix + key, obj[key]); // mixed type
+ }
+ } else {
+ if (prefix) {
+ this.nested[prefix.substr(0, prefix.length - 1)] = true;
+ }
+ this.path(prefix + key, obj[key]);
+ }
+ }
+};
+
+/**
+ * Reserved document keys.
+ *
+ * Keys in this object are names that are rejected in schema declarations b/c they conflict with mongoose functionality. Using these key name will throw an error.
+ *
+ * on, emit, _events, db, get, set, init, isNew, errors, schema, options, modelName, collection, _pres, _posts, toObject
+ *
+ * _NOTE:_ Use of these terms as method names is permitted, but play at your own risk, as they may be existing mongoose document methods you are stomping on.
+ *
+ * var schema = new Schema(..);
+ * schema.methods.init = function () {} // potentially breaking
+ */
+
+Schema.reserved = Object.create(null);
+var reserved = Schema.reserved;
+// Core object
+reserved['prototype'] =
+// EventEmitter
+reserved.emit =
+reserved.on =
+reserved.once =
+reserved.listeners =
+reserved.removeListener =
+// document properties and functions
+reserved.collection =
+reserved.db =
+reserved.errors =
+reserved.init =
+reserved.isModified =
+reserved.isNew =
+reserved.get =
+reserved.modelName =
+reserved.save =
+reserved.schema =
+reserved.set =
+reserved.toObject =
+reserved.validate =
+// hooks.js
+reserved._pres = reserved._posts = 1;
+
+/*!
+ * Document keys to print warnings for
+ */
+
+var warnings = {};
+warnings.increment = '`increment` should not be used as a schema path name ' +
+ 'unless you have disabled versioning.';
+
+/**
+ * Gets/sets schema paths.
+ *
+ * Sets a path (if arity 2)
+ * Gets a path (if arity 1)
+ *
+ * ####Example
+ *
+ * schema.path('name') // returns a SchemaType
+ * schema.path('name', Number) // changes the schemaType of `name` to Number
+ *
+ * @param {String} path
+ * @param {Object} constructor
+ * @api public
+ */
+
+Schema.prototype.path = function(path, obj) {
+ if (obj === undefined) {
+ if (this.paths[path]) {
+ return this.paths[path];
+ }
+ if (this.subpaths[path]) {
+ return this.subpaths[path];
+ }
+ if (this.singleNestedPaths[path]) {
+ return this.singleNestedPaths[path];
+ }
+
+ // subpaths?
+ return /\.\d+\.?.*$/.test(path)
+ ? getPositionalPath(this, path)
+ : undefined;
+ }
+
+ // some path names conflict with document methods
+ if (reserved[path]) {
+ throw new Error('`' + path + '` may not be used as a schema pathname');
+ }
+
+ if (warnings[path]) {
+ console.log('WARN: ' + warnings[path]);
+ }
+
+ // update the tree
+ var subpaths = path.split(/\./),
+ last = subpaths.pop(),
+ branch = this.tree;
+
+ subpaths.forEach(function(sub, i) {
+ if (!branch[sub]) {
+ branch[sub] = {};
+ }
+ if (typeof branch[sub] !== 'object') {
+ var msg = 'Cannot set nested path `' + path + '`. '
+ + 'Parent path `'
+ + subpaths.slice(0, i).concat([sub]).join('.')
+ + '` already set to type ' + branch[sub].name
+ + '.';
+ throw new Error(msg);
+ }
+ branch = branch[sub];
+ });
+
+ branch[last] = utils.clone(obj);
+
+ this.paths[path] = Schema.interpretAsType(path, obj, this.options);
+
+ if (this.paths[path].$isSingleNested) {
+ for (var key in this.paths[path].schema.paths) {
+ this.singleNestedPaths[path + '.' + key] =
+ this.paths[path].schema.paths[key];
+ }
+ for (key in this.paths[path].schema.singleNestedPaths) {
+ this.singleNestedPaths[path + '.' + key] =
+ this.paths[path].schema.singleNestedPaths[key];
+ }
+
+ this.childSchemas.push(this.paths[path].schema);
+ } else if (this.paths[path].$isMongooseDocumentArray) {
+ this.childSchemas.push(this.paths[path].schema);
+ }
+ return this;
+};
+
+/**
+ * Converts type arguments into Mongoose Types.
+ *
+ * @param {String} path
+ * @param {Object} obj constructor
+ * @api private
+ */
+
+Schema.interpretAsType = function(path, obj, options) {
+ if (obj.constructor) {
+ var constructorName = utils.getFunctionName(obj.constructor);
+ if (constructorName !== 'Object') {
+ var oldObj = obj;
+ obj = {};
+ obj[options.typeKey] = oldObj;
+ }
+ }
+
+ // Get the type making sure to allow keys named "type"
+ // and default to mixed if not specified.
+ // { type: { type: String, default: 'freshcut' } }
+ var type = obj[options.typeKey] && (options.typeKey !== 'type' || !obj.type.type)
+ ? obj[options.typeKey]
+ : {};
+
+ if (utils.getFunctionName(type.constructor) === 'Object' || type === 'mixed') {
+ return new MongooseTypes.Mixed(path, obj);
+ }
+
+ if (Array.isArray(type) || Array === type || type === 'array') {
+ // if it was specified through { type } look for `cast`
+ var cast = (Array === type || type === 'array')
+ ? obj.cast
+ : type[0];
+
+ if (cast && cast.instanceOfSchema) {
+ return new MongooseTypes.DocumentArray(path, cast, obj);
+ }
+
+ if (Array.isArray(cast)) {
+ return new MongooseTypes.Array(path, Schema.interpretAsType(path, cast, options), obj);
+ }
+
+ if (typeof cast === 'string') {
+ cast = MongooseTypes[cast.charAt(0).toUpperCase() + cast.substring(1)];
+ } else if (cast && (!cast[options.typeKey] || (options.typeKey === 'type' && cast.type.type))
+ && utils.getFunctionName(cast.constructor) === 'Object') {
+ if (Object.keys(cast).length) {
+ // The `minimize` and `typeKey` options propagate to child schemas
+ // declared inline, like `{ arr: [{ val: { $type: String } }] }`.
+ // See gh-3560
+ var childSchemaOptions = {minimize: options.minimize};
+ if (options.typeKey) {
+ childSchemaOptions.typeKey = options.typeKey;
+ }
+ var childSchema = new Schema(cast, childSchemaOptions);
+ childSchema.$implicitlyCreated = true;
+ return new MongooseTypes.DocumentArray(path, childSchema, obj);
+ } else {
+ // Special case: empty object becomes mixed
+ return new MongooseTypes.Array(path, MongooseTypes.Mixed, obj);
+ }
+ }
+
+ if (cast) {
+ type = cast[options.typeKey] && (options.typeKey !== 'type' || !cast.type.type)
+ ? cast[options.typeKey]
+ : cast;
+
+ name = typeof type === 'string'
+ ? type
+ : type.schemaName || utils.getFunctionName(type);
+
+ if (!(name in MongooseTypes)) {
+ throw new TypeError('Undefined type `' + name + '` at array `' + path +
+ '`');
+ }
+ }
+
+ return new MongooseTypes.Array(path, cast || MongooseTypes.Mixed, obj, options);
+ }
+
+ if (type && type.instanceOfSchema) {
+ return new MongooseTypes.Embedded(type, path, obj);
+ }
+
+ var name;
+ if (Buffer.isBuffer(type)) {
+ name = 'Buffer';
+ } else {
+ name = typeof type === 'string'
+ ? type
+ // If not string, `type` is a function. Outside of IE, function.name
+ // gives you the function name. In IE, you need to compute it
+ : type.schemaName || utils.getFunctionName(type);
+ }
+
+ if (name) {
+ name = name.charAt(0).toUpperCase() + name.substring(1);
+ }
+
+ if (undefined == MongooseTypes[name]) {
+ throw new TypeError('Undefined type `' + name + '` at `' + path +
+ '`\n Did you try nesting Schemas? ' +
+ 'You can only nest using refs or arrays.');
+ }
+
+ return new MongooseTypes[name](path, obj);
+};
+
+/**
+ * Iterates the schemas paths similar to Array#forEach.
+ *
+ * The callback is passed the pathname and schemaType as arguments on each iteration.
+ *
+ * @param {Function} fn callback function
+ * @return {Schema} this
+ * @api public
+ */
+
+Schema.prototype.eachPath = function(fn) {
+ var keys = Object.keys(this.paths),
+ len = keys.length;
+
+ for (var i = 0; i < len; ++i) {
+ fn(keys[i], this.paths[keys[i]]);
+ }
+
+ return this;
+};
+
+/**
+ * Returns an Array of path strings that are required by this schema.
+ *
+ * @api public
+ * @param {Boolean} invalidate refresh the cache
+ * @return {Array}
+ */
+
+Schema.prototype.requiredPaths = function requiredPaths(invalidate) {
+ if (this._requiredpaths && !invalidate) {
+ return this._requiredpaths;
+ }
+
+ var paths = Object.keys(this.paths),
+ i = paths.length,
+ ret = [];
+
+ while (i--) {
+ var path = paths[i];
+ if (this.paths[path].isRequired) {
+ ret.push(path);
+ }
+ }
+ this._requiredpaths = ret;
+ return this._requiredpaths;
+};
+
+/**
+ * Returns indexes from fields and schema-level indexes (cached).
+ *
+ * @api private
+ * @return {Array}
+ */
+
+Schema.prototype.indexedPaths = function indexedPaths() {
+ if (this._indexedpaths) {
+ return this._indexedpaths;
+ }
+ this._indexedpaths = this.indexes();
+ return this._indexedpaths;
+};
+
+/**
+ * Returns the pathType of `path` for this schema.
+ *
+ * Given a path, returns whether it is a real, virtual, nested, or ad-hoc/undefined path.
+ *
+ * @param {String} path
+ * @return {String}
+ * @api public
+ */
+
+Schema.prototype.pathType = function(path) {
+ if (path in this.paths) {
+ return 'real';
+ }
+ if (path in this.virtuals) {
+ return 'virtual';
+ }
+ if (path in this.nested) {
+ return 'nested';
+ }
+ if (path in this.subpaths) {
+ return 'real';
+ }
+ if (path in this.singleNestedPaths) {
+ return 'real';
+ }
+
+ if (/\.\d+\.|\.\d+$/.test(path)) {
+ return getPositionalPathType(this, path);
+ }
+ return 'adhocOrUndefined';
+};
+
+/**
+ * Returns true iff this path is a child of a mixed schema.
+ *
+ * @param {String} path
+ * @return {Boolean}
+ * @api private
+ */
+
+Schema.prototype.hasMixedParent = function(path) {
+ var subpaths = path.split(/\./g);
+ path = '';
+ for (var i = 0; i < subpaths.length; ++i) {
+ path = i > 0 ? path + '.' + subpaths[i] : subpaths[i];
+ if (path in this.paths &&
+ this.paths[path] instanceof MongooseTypes.Mixed) {
+ return true;
+ }
+ }
+
+ return false;
+};
+
+/**
+ * Setup updatedAt and createdAt timestamps to documents if enabled
+ *
+ * @param {Boolean|Object} timestamps timestamps options
+ * @api private
+ */
+Schema.prototype.setupTimestamp = function(timestamps) {
+ if (timestamps) {
+ var createdAt = timestamps.createdAt || 'createdAt';
+ var updatedAt = timestamps.updatedAt || 'updatedAt';
+ var schemaAdditions = {};
+
+ schemaAdditions[updatedAt] = Date;
+
+ if (!this.paths[createdAt]) {
+ schemaAdditions[createdAt] = Date;
+ }
+
+ this.add(schemaAdditions);
+
+ this.pre('save', function(next) {
+ var defaultTimestamp = new Date();
+ var auto_id = this._id && this._id.auto;
+
+ if (!this[createdAt] && this.isSelected(createdAt)) {
+ this[createdAt] = auto_id ? this._id.getTimestamp() : defaultTimestamp;
+ }
+
+ if (this.isNew || this.isModified()) {
+ this[updatedAt] = this.isNew ? this[createdAt] : defaultTimestamp;
+ }
+
+ next();
+ });
+
+ var genUpdates = function(overwrite) {
+ var now = new Date();
+ var updates = {};
+ if (overwrite) {
+ updates[updatedAt] = now;
+ updates[createdAt] = now;
+ return updates;
+ }
+ updates = { $set: {}, $setOnInsert: {} };
+ updates.$set[updatedAt] = now;
+ updates.$setOnInsert[createdAt] = now;
+
+ return updates;
+ };
+
+ this.methods.initializeTimestamps = function() {
+ if (!this[createdAt]) {
+ this[createdAt] = new Date();
+ }
+ if (!this[updatedAt]) {
+ this[updatedAt] = new Date();
+ }
+ return this;
+ };
+
+ this.pre('findOneAndUpdate', function(next) {
+ var overwrite = this.options.overwrite;
+ this.findOneAndUpdate({}, genUpdates(overwrite), { overwrite: overwrite });
+ applyTimestampsToChildren(this);
+ next();
+ });
+
+ this.pre('update', function(next) {
+ var overwrite = this.options.overwrite;
+ this.update({}, genUpdates(overwrite), { overwrite: overwrite });
+ applyTimestampsToChildren(this);
+ next();
+ });
+ }
+};
+
+/*!
+ * ignore
+ */
+
+function applyTimestampsToChildren(query) {
+ var now = new Date();
+ var update = query.getUpdate();
+ var keys = Object.keys(update);
+ var key;
+ var schema = query.model.schema;
+ var len;
+ var createdAt;
+ var updatedAt;
+ var timestamps;
+ var path;
+
+ var hasDollarKey = keys.length && keys[0].charAt(0) === '$';
+
+ if (hasDollarKey) {
+ if (update.$push) {
+ for (key in update.$push) {
+ var $path = schema.path(key);
+ if (update.$push[key] &&
+ $path &&
+ $path.$isMongooseDocumentArray &&
+ $path.schema.options.timestamps) {
+ timestamps = $path.schema.options.timestamps;
+ createdAt = timestamps.createdAt || 'createdAt';
+ updatedAt = timestamps.updatedAt || 'updatedAt';
+ update.$push[key][updatedAt] = now;
+ update.$push[key][createdAt] = now;
+ }
+ }
+ }
+ if (update.$set) {
+ for (key in update.$set) {
+ path = schema.path(key);
+ if (!path) {
+ continue;
+ }
+ if (Array.isArray(update.$set[key]) && path.$isMongooseDocumentArray) {
+ len = update.$set[key].length;
+ timestamps = schema.path(key).schema.options.timestamps;
+ if (timestamps) {
+ createdAt = timestamps.createdAt || 'createdAt';
+ updatedAt = timestamps.updatedAt || 'updatedAt';
+ for (var i = 0; i < len; ++i) {
+ update.$set[key][i][updatedAt] = now;
+ update.$set[key][i][createdAt] = now;
+ }
+ }
+ } else if (update.$set[key] && path.$isSingleNested) {
+ timestamps = schema.path(key).schema.options.timestamps;
+ if (timestamps) {
+ createdAt = timestamps.createdAt || 'createdAt';
+ updatedAt = timestamps.updatedAt || 'updatedAt';
+ update.$set[key][updatedAt] = now;
+ update.$set[key][createdAt] = now;
+ }
+ }
+ }
+ }
+ }
+}
+
+/*!
+ * ignore
+ */
+
+function getPositionalPathType(self, path) {
+ var subpaths = path.split(/\.(\d+)\.|\.(\d+)$/).filter(Boolean);
+ if (subpaths.length < 2) {
+ return self.paths[subpaths[0]];
+ }
+
+ var val = self.path(subpaths[0]);
+ var isNested = false;
+ if (!val) {
+ return val;
+ }
+
+ var last = subpaths.length - 1,
+ subpath,
+ i = 1;
+
+ for (; i < subpaths.length; ++i) {
+ isNested = false;
+ subpath = subpaths[i];
+
+ if (i === last && val && !/\D/.test(subpath)) {
+ if (val.$isMongooseDocumentArray) {
+ var oldVal = val;
+ val = new SchemaType(subpath);
+ val.cast = function(value, doc, init) {
+ return oldVal.cast(value, doc, init)[0];
+ };
+ val.caster = oldVal.caster;
+ val.schema = oldVal.schema;
+ } else if (val instanceof MongooseTypes.Array) {
+ // StringSchema, NumberSchema, etc
+ val = val.caster;
+ } else {
+ val = undefined;
+ }
+ break;
+ }
+
+ // ignore if its just a position segment: path.0.subpath
+ if (!/\D/.test(subpath)) {
+ continue;
+ }
+
+ if (!(val && val.schema)) {
+ val = undefined;
+ break;
+ }
+
+ var type = val.schema.pathType(subpath);
+ isNested = (type === 'nested');
+ val = val.schema.path(subpath);
+ }
+
+ self.subpaths[path] = val;
+ if (val) {
+ return 'real';
+ }
+ if (isNested) {
+ return 'nested';
+ }
+ return 'adhocOrUndefined';
+}
+
+
+/*!
+ * ignore
+ */
+
+function getPositionalPath(self, path) {
+ getPositionalPathType(self, path);
+ return self.subpaths[path];
+}
+
+/**
+ * Adds a method call to the queue.
+ *
+ * @param {String} name name of the document method to call later
+ * @param {Array} args arguments to pass to the method
+ * @api public
+ */
+
+Schema.prototype.queue = function(name, args) {
+ this.callQueue.push([name, args]);
+ return this;
+};
+
+/**
+ * Defines a pre hook for the document.
+ *
+ * ####Example
+ *
+ * var toySchema = new Schema(..);
+ *
+ * toySchema.pre('save', function (next) {
+ * if (!this.created) this.created = new Date;
+ * next();
+ * })
+ *
+ * toySchema.pre('validate', function (next) {
+ * if (this.name !== 'Woody') this.name = 'Woody';
+ * next();
+ * })
+ *
+ * @param {String} method
+ * @param {Function} callback
+ * @see hooks.js https://github.com/bnoguchi/hooks-js/tree/31ec571cef0332e21121ee7157e0cf9728572cc3
+ * @api public
+ */
+
+Schema.prototype.pre = function() {
+ var name = arguments[0];
+ if (IS_KAREEM_HOOK[name]) {
+ this.s.hooks.pre.apply(this.s.hooks, arguments);
+ return this;
+ }
+ return this.queue('pre', arguments);
+};
+
+/**
+ * Defines a post hook for the document
+ *
+ * var schema = new Schema(..);
+ * schema.post('save', function (doc) {
+ * console.log('this fired after a document was saved');
+ * });
+ *
+ * shema.post('find', function(docs) {
+ * console.log('this fired after you run a find query');
+ * });
+ *
+ * var Model = mongoose.model('Model', schema);
+ *
+ * var m = new Model(..);
+ * m.save(function(err) {
+ * console.log('this fires after the `post` hook');
+ * });
+ *
+ * m.find(function(err, docs) {
+ * console.log('this fires after the post find hook');
+ * });
+ *
+ * @param {String} method name of the method to hook
+ * @param {Function} fn callback
+ * @see middleware http://mongoosejs.com/docs/middleware.html
+ * @see hooks.js https://www.npmjs.com/package/hooks-fixed
+ * @see kareem http://npmjs.org/package/kareem
+ * @api public
+ */
+
+Schema.prototype.post = function(method, fn) {
+ if (IS_KAREEM_HOOK[method]) {
+ this.s.hooks.post.apply(this.s.hooks, arguments);
+ return this;
+ }
+ // assuming that all callbacks with arity < 2 are synchronous post hooks
+ if (fn.length < 2) {
+ return this.queue('on', [arguments[0], function(doc) {
+ return fn.call(doc, doc);
+ }]);
+ }
+
+ if (fn.length === 3) {
+ this.s.hooks.post(method + ':error', fn);
+ return this;
+ }
+
+ return this.queue('post', [arguments[0], function(next) {
+ // wrap original function so that the callback goes last,
+ // for compatibility with old code that is using synchronous post hooks
+ var _this = this;
+ var args = Array.prototype.slice.call(arguments, 1);
+ fn.call(this, this, function(err) {
+ return next.apply(_this, [err].concat(args));
+ });
+ }]);
+};
+
+/**
+ * Registers a plugin for this schema.
+ *
+ * @param {Function} plugin callback
+ * @param {Object} [opts]
+ * @see plugins
+ * @api public
+ */
+
+Schema.prototype.plugin = function(fn, opts) {
+ fn(this, opts);
+ return this;
+};
+
+/**
+ * Adds an instance method to documents constructed from Models compiled from this schema.
+ *
+ * ####Example
+ *
+ * var schema = kittySchema = new Schema(..);
+ *
+ * schema.method('meow', function () {
+ * console.log('meeeeeoooooooooooow');
+ * })
+ *
+ * var Kitty = mongoose.model('Kitty', schema);
+ *
+ * var fizz = new Kitty;
+ * fizz.meow(); // meeeeeooooooooooooow
+ *
+ * If a hash of name/fn pairs is passed as the only argument, each name/fn pair will be added as methods.
+ *
+ * schema.method({
+ * purr: function () {}
+ * , scratch: function () {}
+ * });
+ *
+ * // later
+ * fizz.purr();
+ * fizz.scratch();
+ *
+ * @param {String|Object} method name
+ * @param {Function} [fn]
+ * @api public
+ */
+
+Schema.prototype.method = function(name, fn) {
+ if (typeof name !== 'string') {
+ for (var i in name) {
+ this.methods[i] = name[i];
+ }
+ } else {
+ this.methods[name] = fn;
+ }
+ return this;
+};
+
+/**
+ * Adds static "class" methods to Models compiled from this schema.
+ *
+ * ####Example
+ *
+ * var schema = new Schema(..);
+ * schema.static('findByName', function (name, callback) {
+ * return this.find({ name: name }, callback);
+ * });
+ *
+ * var Drink = mongoose.model('Drink', schema);
+ * Drink.findByName('sanpellegrino', function (err, drinks) {
+ * //
+ * });
+ *
+ * If a hash of name/fn pairs is passed as the only argument, each name/fn pair will be added as statics.
+ *
+ * @param {String|Object} name
+ * @param {Function} [fn]
+ * @api public
+ */
+
+Schema.prototype.static = function(name, fn) {
+ if (typeof name !== 'string') {
+ for (var i in name) {
+ this.statics[i] = name[i];
+ }
+ } else {
+ this.statics[name] = fn;
+ }
+ return this;
+};
+
+/**
+ * Defines an index (most likely compound) for this schema.
+ *
+ * ####Example
+ *
+ * schema.index({ first: 1, last: -1 })
+ *
+ * @param {Object} fields
+ * @param {Object} [options] Options to pass to [MongoDB driver's `createIndex()` function](http://mongodb.github.io/node-mongodb-native/2.0/api/Collection.html#createIndex)
+ * @param {String} [options.expires=null] Mongoose-specific syntactic sugar, uses [ms](https://www.npmjs.com/package/ms) to convert `expires` option into seconds for the `expireAfterSeconds` in the above link.
+ * @api public
+ */
+
+Schema.prototype.index = function(fields, options) {
+ options || (options = {});
+
+ if (options.expires) {
+ utils.expires(options);
+ }
+
+ this._indexes.push([fields, options]);
+ return this;
+};
+
+/**
+ * Sets/gets a schema option.
+ *
+ * ####Example
+ *
+ * schema.set('strict'); // 'true' by default
+ * schema.set('strict', false); // Sets 'strict' to false
+ * schema.set('strict'); // 'false'
+ *
+ * @param {String} key option name
+ * @param {Object} [value] if not passed, the current option value is returned
+ * @see Schema ./
+ * @api public
+ */
+
+Schema.prototype.set = function(key, value, _tags) {
+ if (arguments.length === 1) {
+ return this.options[key];
+ }
+
+ switch (key) {
+ case 'read':
+ this.options[key] = readPref(value, _tags);
+ break;
+ case 'safe':
+ this.options[key] = value === false
+ ? {w: 0}
+ : value;
+ break;
+ case 'timestamps':
+ this.setupTimestamp(value);
+ this.options[key] = value;
+ break;
+ default:
+ this.options[key] = value;
+ }
+
+ return this;
+};
+
+/**
+ * Gets a schema option.
+ *
+ * @param {String} key option name
+ * @api public
+ */
+
+Schema.prototype.get = function(key) {
+ return this.options[key];
+};
+
+/**
+ * The allowed index types
+ *
+ * @static indexTypes
+ * @receiver Schema
+ * @api public
+ */
+
+var indexTypes = '2d 2dsphere hashed text'.split(' ');
+
+Object.defineProperty(Schema, 'indexTypes', {
+ get: function() {
+ return indexTypes;
+ },
+ set: function() {
+ throw new Error('Cannot overwrite Schema.indexTypes');
+ }
+});
+
+/**
+ * Compiles indexes from fields and schema-level indexes
+ *
+ * @api public
+ */
+
+Schema.prototype.indexes = function() {
+ 'use strict';
+
+ var indexes = [];
+ var seenPrefix = {};
+
+ var collectIndexes = function(schema, prefix) {
+ if (seenPrefix[prefix]) {
+ return;
+ }
+ seenPrefix[prefix] = true;
+
+ prefix = prefix || '';
+ var key, path, index, field, isObject, options, type;
+ var keys = Object.keys(schema.paths);
+
+ for (var i = 0; i < keys.length; ++i) {
+ key = keys[i];
+ path = schema.paths[key];
+
+ if ((path instanceof MongooseTypes.DocumentArray) || path.$isSingleNested) {
+ collectIndexes(path.schema, key + '.');
+ } else {
+ index = path._index;
+
+ if (index !== false && index !== null && index !== undefined) {
+ field = {};
+ isObject = utils.isObject(index);
+ options = isObject ? index : {};
+ type = typeof index === 'string' ? index :
+ isObject ? index.type :
+ false;
+
+ if (type && ~Schema.indexTypes.indexOf(type)) {
+ field[prefix + key] = type;
+ } else if (options.text) {
+ field[prefix + key] = 'text';
+ delete options.text;
+ } else {
+ field[prefix + key] = 1;
+ }
+
+ delete options.type;
+ if (!('background' in options)) {
+ options.background = true;
+ }
+
+ indexes.push([field, options]);
+ }
+ }
+ }
+
+ if (prefix) {
+ fixSubIndexPaths(schema, prefix);
+ } else {
+ schema._indexes.forEach(function(index) {
+ if (!('background' in index[1])) {
+ index[1].background = true;
+ }
+ });
+ indexes = indexes.concat(schema._indexes);
+ }
+ };
+
+ collectIndexes(this);
+ return indexes;
+
+ /*!
+ * Checks for indexes added to subdocs using Schema.index().
+ * These indexes need their paths prefixed properly.
+ *
+ * schema._indexes = [ [indexObj, options], [indexObj, options] ..]
+ */
+
+ function fixSubIndexPaths(schema, prefix) {
+ var subindexes = schema._indexes,
+ len = subindexes.length,
+ indexObj,
+ newindex,
+ klen,
+ keys,
+ key,
+ i = 0,
+ j;
+
+ for (i = 0; i < len; ++i) {
+ indexObj = subindexes[i][0];
+ keys = Object.keys(indexObj);
+ klen = keys.length;
+ newindex = {};
+
+ // use forward iteration, order matters
+ for (j = 0; j < klen; ++j) {
+ key = keys[j];
+ newindex[prefix + key] = indexObj[key];
+ }
+
+ indexes.push([newindex, subindexes[i][1]]);
+ }
+ }
+};
+
+/**
+ * Creates a virtual type with the given name.
+ *
+ * @param {String} name
+ * @param {Object} [options]
+ * @return {VirtualType}
+ */
+
+Schema.prototype.virtual = function(name, options) {
+ if (options && options.ref) {
+ if (!options.localField) {
+ throw new Error('Reference virtuals require `localField` option');
+ }
+
+ if (!options.foreignField) {
+ throw new Error('Reference virtuals require `foreignField` option');
+ }
+
+ this.pre('init', function(next, obj) {
+ if (name in obj) {
+ if (!this.$$populatedVirtuals) {
+ this.$$populatedVirtuals = {};
+ }
+
+ if (options.justOne) {
+ this.$$populatedVirtuals[name] = Array.isArray(obj[name]) ?
+ obj[name][0] :
+ obj[name];
+ } else {
+ this.$$populatedVirtuals[name] = Array.isArray(obj[name]) ?
+ obj[name] :
+ obj[name] == null ? [] : [obj[name]];
+ }
+
+ delete obj[name];
+ }
+ if (this.ownerDocument) {
+ next();
+ return obj;
+ } else {
+ next();
+ }
+ });
+
+ var virtual = this.virtual(name);
+ virtual.options = options;
+ return virtual.
+ get(function() {
+ if (!this.$$populatedVirtuals) {
+ this.$$populatedVirtuals = {};
+ }
+ if (name in this.$$populatedVirtuals) {
+ return this.$$populatedVirtuals[name];
+ }
+ return null;
+ }).
+ set(function(v) {
+ if (!this.$$populatedVirtuals) {
+ this.$$populatedVirtuals = {};
+ }
+ this.$$populatedVirtuals[name] = v;
+ });
+ }
+
+ var virtuals = this.virtuals;
+ var parts = name.split('.');
+
+ if (this.pathType(name) === 'real') {
+ throw new Error('Virtual path "' + name + '"' +
+ ' conflicts with a real path in the schema');
+ }
+
+ virtuals[name] = parts.reduce(function(mem, part, i) {
+ mem[part] || (mem[part] = (i === parts.length - 1)
+ ? new VirtualType(options, name)
+ : {});
+ return mem[part];
+ }, this.tree);
+
+ return virtuals[name];
+};
+
+/*!
+ * ignore
+ */
+
+Schema.prototype._getVirtual = function(name) {
+ return _getVirtual(this, name);
+};
+
+/*!
+ * ignore
+ */
+
+function _getVirtual(schema, name) {
+ var parts = name.split('.');
+ var cur = '';
+ var nestedSchemaPath = '';
+ for (var i = 0; i < parts.length; ++i) {
+ cur += (cur.length > 0 ? '.' : '') + parts[i];
+ if (schema.virtuals[cur]) {
+ if (i === parts.length - 1) {
+ schema.virtuals[cur].$nestedSchemaPath = nestedSchemaPath;
+ return schema.virtuals[cur];
+ }
+ continue;
+ } else if (schema.paths[cur] && schema.paths[cur].schema) {
+ schema = schema.paths[cur].schema;
+ nestedSchemaPath += (nestedSchemaPath.length > 0 ? '.' : '') + cur;
+ cur = '';
+ } else {
+ return null;
+ }
+ }
+}
+
+/**
+ * Returns the virtual type with the given `name`.
+ *
+ * @param {String} name
+ * @return {VirtualType}
+ */
+
+Schema.prototype.virtualpath = function(name) {
+ return this.virtuals[name];
+};
+
+/**
+ * Removes the given `path` (or [`paths`]).
+ *
+ * @param {String|Array} path
+ *
+ * @api public
+ */
+Schema.prototype.remove = function(path) {
+ if (typeof path === 'string') {
+ path = [path];
+ }
+ if (Array.isArray(path)) {
+ path.forEach(function(name) {
+ if (this.path(name)) {
+ delete this.paths[name];
+
+ var pieces = name.split('.');
+ var last = pieces.pop();
+ var branch = this.tree;
+ for (var i = 0; i < pieces.length; ++i) {
+ branch = branch[pieces[i]];
+ }
+ delete branch[last];
+ }
+ }, this);
+ }
+};
+
+/**
+ * Loads an ES6 class into a schema. Maps setters + getters, static methods, and instance methods to schema virtuals, statics, and methods.
+ *
+ * @param {Function} model
+ */
+Schema.prototype.loadClass = function(model, virtualsOnly) {
+ if (model === Object.prototype || model === Function.prototype) {
+ return this;
+ }
+
+ // Add static methods
+ if (!virtualsOnly) {
+ Object.getOwnPropertyNames(model).forEach(function(name) {
+ if (name.match(/^(length|name|prototype)$/)) {
+ return;
+ }
+ var method = Object.getOwnPropertyDescriptor(model, name);
+ if (typeof method.value === 'function') this.static(name, method.value);
+ }, this);
+ }
+
+ // Add methods and virtuals
+ Object.getOwnPropertyNames(model.prototype).forEach(function(name) {
+ if (name.match(/^(constructor)$/)) {
+ return;
+ }
+ var method = Object.getOwnPropertyDescriptor(model.prototype, name);
+ if (!virtualsOnly) {
+ if (typeof method.value === 'function') {
+ this.method(name, method.value);
+ }
+ }
+ if (typeof method.get === 'function') {
+ this.virtual(name).get(method.get);
+ }
+ if (typeof method.set === 'function') {
+ this.virtual(name).set(method.set);
+ }
+ }, this);
+
+ return (this.loadClass(Object.getPrototypeOf(model)));
+};
+
+/*!
+ * ignore
+ */
+
+Schema.prototype._getSchema = function(path) {
+ var _this = this;
+ var pathschema = _this.path(path);
+ var resultPath = [];
+
+ if (pathschema) {
+ pathschema.$fullPath = path;
+ return pathschema;
+ }
+
+ function search(parts, schema) {
+ var p = parts.length + 1,
+ foundschema,
+ trypath;
+
+ while (p--) {
+ trypath = parts.slice(0, p).join('.');
+ foundschema = schema.path(trypath);
+ if (foundschema) {
+ resultPath.push(trypath);
+
+ if (foundschema.caster) {
+ // array of Mixed?
+ if (foundschema.caster instanceof MongooseTypes.Mixed) {
+ foundschema.caster.$fullPath = resultPath.join('.');
+ return foundschema.caster;
+ }
+
+ // Now that we found the array, we need to check if there
+ // are remaining document paths to look up for casting.
+ // Also we need to handle array.$.path since schema.path
+ // doesn't work for that.
+ // If there is no foundschema.schema we are dealing with
+ // a path like array.$
+ if (p !== parts.length && foundschema.schema) {
+ if (parts[p] === '$') {
+ // comments.$.comments.$.title
+ return search(parts.slice(p + 1), foundschema.schema);
+ }
+ // this is the last path of the selector
+ return search(parts.slice(p), foundschema.schema);
+ }
+ }
+
+ foundschema.$fullPath = resultPath.join('.');
+
+ return foundschema;
+ }
+ }
+ }
+
+ // look for arrays
+ return search(path.split('.'), _this);
+};
+
+/*!
+ * ignore
+ */
+
+Schema.prototype._getPathType = function(path) {
+ var _this = this;
+ var pathschema = _this.path(path);
+
+ if (pathschema) {
+ return 'real';
+ }
+
+ function search(parts, schema) {
+ var p = parts.length + 1,
+ foundschema,
+ trypath;
+
+ while (p--) {
+ trypath = parts.slice(0, p).join('.');
+ foundschema = schema.path(trypath);
+ if (foundschema) {
+ if (foundschema.caster) {
+ // array of Mixed?
+ if (foundschema.caster instanceof MongooseTypes.Mixed) {
+ return { schema: foundschema, pathType: 'mixed' };
+ }
+
+ // Now that we found the array, we need to check if there
+ // are remaining document paths to look up for casting.
+ // Also we need to handle array.$.path since schema.path
+ // doesn't work for that.
+ // If there is no foundschema.schema we are dealing with
+ // a path like array.$
+ if (p !== parts.length && foundschema.schema) {
+ if (parts[p] === '$') {
+ if (p === parts.length - 1) {
+ return { schema: foundschema, pathType: 'nested' };
+ }
+ // comments.$.comments.$.title
+ return search(parts.slice(p + 1), foundschema.schema);
+ }
+ // this is the last path of the selector
+ return search(parts.slice(p), foundschema.schema);
+ }
+ return {
+ schema: foundschema,
+ pathType: foundschema.$isSingleNested ? 'nested' : 'array'
+ };
+ }
+ return { schema: foundschema, pathType: 'real' };
+ } else if (p === parts.length && schema.nested[trypath]) {
+ return { schema: schema, pathType: 'nested' };
+ }
+ }
+ return { schema: foundschema || schema, pathType: 'undefined' };
+ }
+
+ // look for arrays
+ return search(path.split('.'), _this);
+};
+
+
+/*!
+ * Module exports.
+ */
+
+module.exports = exports = Schema;
+
+// require down here because of reference issues
+
+/**
+ * The various built-in Mongoose Schema Types.
+ *
+ * ####Example:
+ *
+ * var mongoose = require('mongoose');
+ * var ObjectId = mongoose.Schema.Types.ObjectId;
+ *
+ * ####Types:
+ *
+ * - [String](#schema-string-js)
+ * - [Number](#schema-number-js)
+ * - [Boolean](#schema-boolean-js) | Bool
+ * - [Array](#schema-array-js)
+ * - [Buffer](#schema-buffer-js)
+ * - [Date](#schema-date-js)
+ * - [ObjectId](#schema-objectid-js) | Oid
+ * - [Mixed](#schema-mixed-js)
+ *
+ * Using this exposed access to the `Mixed` SchemaType, we can use them in our schema.
+ *
+ * var Mixed = mongoose.Schema.Types.Mixed;
+ * new mongoose.Schema({ _user: Mixed })
+ *
+ * @api public
+ */
+
+Schema.Types = MongooseTypes = require('./schema/index');
+
+/*!
+ * ignore
+ */
+
+exports.ObjectId = MongooseTypes.ObjectId;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/array.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/array.js
new file mode 100644
index 0000000..06a708a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/array.js
@@ -0,0 +1,314 @@
+/*!
+ * Module dependencies.
+ */
+
+var SchemaType = require('../schematype');
+var CastError = SchemaType.CastError;
+var Types = {
+ Boolean: require('./boolean'),
+ Date: require('./date'),
+ Number: require('./number'),
+ String: require('./string'),
+ ObjectId: require('./objectid'),
+ Buffer: require('./buffer')
+};
+var MongooseArray = require('../types').Array;
+var EmbeddedDoc = require('../types').Embedded;
+var Mixed = require('./mixed');
+var cast = require('../cast');
+var util = require('util');
+var utils = require('../utils');
+var castToNumber = require('./operators/helpers').castToNumber;
+var geospatial = require('./operators/geospatial');
+
+/**
+ * Array SchemaType constructor
+ *
+ * @param {String} key
+ * @param {SchemaType} cast
+ * @param {Object} options
+ * @inherits SchemaType
+ * @api public
+ */
+
+function SchemaArray(key, cast, options, schemaOptions) {
+ var typeKey = 'type';
+ if (schemaOptions && schemaOptions.typeKey) {
+ typeKey = schemaOptions.typeKey;
+ }
+
+ if (cast) {
+ var castOptions = {};
+
+ if (utils.getFunctionName(cast.constructor) === 'Object') {
+ if (cast[typeKey]) {
+ // support { type: Woot }
+ castOptions = utils.clone(cast); // do not alter user arguments
+ delete castOptions[typeKey];
+ cast = cast[typeKey];
+ } else {
+ cast = Mixed;
+ }
+ }
+
+ // support { type: 'String' }
+ var name = typeof cast === 'string'
+ ? cast
+ : utils.getFunctionName(cast);
+
+ var caster = name in Types
+ ? Types[name]
+ : cast;
+
+ this.casterConstructor = caster;
+ if (typeof caster === 'function') {
+ this.caster = new caster(null, castOptions);
+ } else {
+ this.caster = caster;
+ }
+
+ if (!(this.caster instanceof EmbeddedDoc)) {
+ this.caster.path = key;
+ }
+ }
+
+ SchemaType.call(this, key, options, 'Array');
+
+ var defaultArr;
+ var fn;
+
+ if (this.defaultValue != null) {
+ defaultArr = this.defaultValue;
+ fn = typeof defaultArr === 'function';
+ }
+
+ if (!('defaultValue' in this) || this.defaultValue !== void 0) {
+ this.default(function() {
+ var arr = [];
+ if (fn) {
+ arr = defaultArr();
+ } else if (defaultArr != null) {
+ arr = defaultArr;
+ }
+ // Leave it up to `cast()` to convert the array
+ return arr;
+ });
+ }
+}
+
+/**
+ * This schema type's name, to defend against minifiers that mangle
+ * function names.
+ *
+ * @api public
+ */
+SchemaArray.schemaName = 'Array';
+
+/*!
+ * Inherits from SchemaType.
+ */
+SchemaArray.prototype = Object.create(SchemaType.prototype);
+SchemaArray.prototype.constructor = SchemaArray;
+
+/**
+ * Check if the given value satisfies a required validator. The given value
+ * must be not null nor undefined, and have a non-zero length.
+ *
+ * @param {Any} value
+ * @return {Boolean}
+ * @api public
+ */
+
+SchemaArray.prototype.checkRequired = function(value) {
+ return !!(value && value.length);
+};
+
+/**
+ * Overrides the getters application for the population special-case
+ *
+ * @param {Object} value
+ * @param {Object} scope
+ * @api private
+ */
+
+SchemaArray.prototype.applyGetters = function(value, scope) {
+ if (this.caster.options && this.caster.options.ref) {
+ // means the object id was populated
+ return value;
+ }
+
+ return SchemaType.prototype.applyGetters.call(this, value, scope);
+};
+
+/**
+ * Casts values for set().
+ *
+ * @param {Object} value
+ * @param {Document} doc document that triggers the casting
+ * @param {Boolean} init whether this is an initialization cast
+ * @api private
+ */
+
+SchemaArray.prototype.cast = function(value, doc, init) {
+ if (Array.isArray(value)) {
+ if (!value.length && doc) {
+ var indexes = doc.schema.indexedPaths();
+
+ for (var i = 0, l = indexes.length; i < l; ++i) {
+ var pathIndex = indexes[i][0][this.path];
+ if (pathIndex === '2dsphere' || pathIndex === '2d') {
+ return;
+ }
+ }
+ }
+
+ if (!(value && value.isMongooseArray)) {
+ value = new MongooseArray(value, this.path, doc);
+ } else if (value && value.isMongooseArray) {
+ // We need to create a new array, otherwise change tracking will
+ // update the old doc (gh-4449)
+ value = new MongooseArray(value, this.path, doc);
+ }
+
+ if (this.caster) {
+ try {
+ for (i = 0, l = value.length; i < l; i++) {
+ value[i] = this.caster.cast(value[i], doc, init);
+ }
+ } catch (e) {
+ // rethrow
+ throw new CastError('[' + e.kind + ']', util.inspect(value), this.path, e);
+ }
+ }
+
+ return value;
+ }
+ // gh-2442: if we're loading this from the db and its not an array, mark
+ // the whole array as modified.
+ if (!!doc && !!init) {
+ doc.markModified(this.path);
+ }
+ return this.cast([value], doc, init);
+};
+
+/**
+ * Casts values for queries.
+ *
+ * @param {String} $conditional
+ * @param {any} [value]
+ * @api private
+ */
+
+SchemaArray.prototype.castForQuery = function($conditional, value) {
+ var handler,
+ val;
+
+ if (arguments.length === 2) {
+ handler = this.$conditionalHandlers[$conditional];
+
+ if (!handler) {
+ throw new Error('Can\'t use ' + $conditional + ' with Array.');
+ }
+
+ val = handler.call(this, value);
+ } else {
+ val = $conditional;
+ var proto = this.casterConstructor.prototype;
+ var method = proto && (proto.castForQuery || proto.cast);
+ var caster = this.caster;
+
+ if (Array.isArray(val)) {
+ val = val.map(function(v) {
+ if (utils.isObject(v) && v.$elemMatch) {
+ return v;
+ }
+ if (method) {
+ v = method.call(caster, v);
+ }
+ return v;
+ });
+ } else if (method) {
+ val = method.call(caster, val);
+ }
+ }
+
+ return val;
+};
+
+function cast$all(val) {
+ if (!Array.isArray(val)) {
+ val = [val];
+ }
+
+ val = val.map(function(v) {
+ if (utils.isObject(v)) {
+ var o = {};
+ o[this.path] = v;
+ return cast(this.casterConstructor.schema, o)[this.path];
+ }
+ return v;
+ }, this);
+
+ return this.castForQuery(val);
+}
+
+function cast$elemMatch(val) {
+ var keys = Object.keys(val);
+ var numKeys = keys.length;
+ var key;
+ var value;
+ for (var i = 0; i < numKeys; ++i) {
+ key = keys[i];
+ value = val[key];
+ if (key.indexOf('$') === 0 && value) {
+ val[key] = this.castForQuery(key, value);
+ }
+ }
+
+ return cast(this.casterConstructor.schema, val);
+}
+
+var handle = SchemaArray.prototype.$conditionalHandlers = {};
+
+handle.$all = cast$all;
+handle.$options = String;
+handle.$elemMatch = cast$elemMatch;
+handle.$geoIntersects = geospatial.cast$geoIntersects;
+handle.$or = handle.$and = function(val) {
+ if (!Array.isArray(val)) {
+ throw new TypeError('conditional $or/$and require array');
+ }
+
+ var ret = [];
+ for (var i = 0; i < val.length; ++i) {
+ ret.push(cast(this.casterConstructor.schema, val[i]));
+ }
+
+ return ret;
+};
+
+handle.$near =
+handle.$nearSphere = geospatial.cast$near;
+
+handle.$within =
+handle.$geoWithin = geospatial.cast$within;
+
+handle.$size =
+handle.$minDistance =
+handle.$maxDistance = castToNumber;
+
+handle.$eq =
+handle.$gt =
+handle.$gte =
+handle.$in =
+handle.$lt =
+handle.$lte =
+handle.$ne =
+handle.$nin =
+handle.$regex = SchemaArray.prototype.castForQuery;
+
+/*!
+ * Module exports.
+ */
+
+module.exports = SchemaArray;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/boolean.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/boolean.js
new file mode 100644
index 0000000..206d9fd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/boolean.js
@@ -0,0 +1,103 @@
+/*!
+ * Module dependencies.
+ */
+
+var utils = require('../utils');
+
+var SchemaType = require('../schematype');
+
+/**
+ * Boolean SchemaType constructor.
+ *
+ * @param {String} path
+ * @param {Object} options
+ * @inherits SchemaType
+ * @api public
+ */
+
+function SchemaBoolean(path, options) {
+ SchemaType.call(this, path, options, 'Boolean');
+}
+
+/**
+ * This schema type's name, to defend against minifiers that mangle
+ * function names.
+ *
+ * @api public
+ */
+SchemaBoolean.schemaName = 'Boolean';
+
+/*!
+ * Inherits from SchemaType.
+ */
+SchemaBoolean.prototype = Object.create(SchemaType.prototype);
+SchemaBoolean.prototype.constructor = SchemaBoolean;
+
+/**
+ * Check if the given value satisfies a required validator. For a boolean
+ * to satisfy a required validator, it must be strictly equal to true or to
+ * false.
+ *
+ * @param {Any} value
+ * @return {Boolean}
+ * @api public
+ */
+
+SchemaBoolean.prototype.checkRequired = function(value) {
+ return value === true || value === false;
+};
+
+/**
+ * Casts to boolean
+ *
+ * @param {Object} value
+ * @api private
+ */
+
+SchemaBoolean.prototype.cast = function(value) {
+ if (value === null) {
+ return value;
+ }
+ if (value === '0') {
+ return false;
+ }
+ if (value === 'true') {
+ return true;
+ }
+ if (value === 'false') {
+ return false;
+ }
+ return !!value;
+};
+
+SchemaBoolean.$conditionalHandlers =
+ utils.options(SchemaType.prototype.$conditionalHandlers, {});
+
+/**
+ * Casts contents for queries.
+ *
+ * @param {String} $conditional
+ * @param {any} val
+ * @api private
+ */
+
+SchemaBoolean.prototype.castForQuery = function($conditional, val) {
+ var handler;
+ if (arguments.length === 2) {
+ handler = SchemaBoolean.$conditionalHandlers[$conditional];
+
+ if (handler) {
+ return handler.call(this, val);
+ }
+
+ return this.cast(val);
+ }
+
+ return this.cast($conditional);
+};
+
+/*!
+ * Module exports.
+ */
+
+module.exports = SchemaBoolean;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/buffer.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/buffer.js
new file mode 100644
index 0000000..e7fe814
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/buffer.js
@@ -0,0 +1,188 @@
+/*!
+ * Module dependencies.
+ */
+
+var handleBitwiseOperator = require('./operators/bitwise');
+var utils = require('../utils');
+
+var MongooseBuffer = require('../types').Buffer;
+var SchemaType = require('../schematype');
+
+var Binary = MongooseBuffer.Binary;
+var CastError = SchemaType.CastError;
+var Document;
+
+/**
+ * Buffer SchemaType constructor
+ *
+ * @param {String} key
+ * @param {Object} options
+ * @inherits SchemaType
+ * @api public
+ */
+
+function SchemaBuffer(key, options) {
+ SchemaType.call(this, key, options, 'Buffer');
+}
+
+/**
+ * This schema type's name, to defend against minifiers that mangle
+ * function names.
+ *
+ * @api public
+ */
+SchemaBuffer.schemaName = 'Buffer';
+
+/*!
+ * Inherits from SchemaType.
+ */
+SchemaBuffer.prototype = Object.create(SchemaType.prototype);
+SchemaBuffer.prototype.constructor = SchemaBuffer;
+
+/**
+ * Check if the given value satisfies a required validator. To satisfy a
+ * required validator, a buffer must not be null or undefined and have
+ * non-zero length.
+ *
+ * @param {Any} value
+ * @param {Document} doc
+ * @return {Boolean}
+ * @api public
+ */
+
+SchemaBuffer.prototype.checkRequired = function(value, doc) {
+ if (SchemaType._isRef(this, value, doc, true)) {
+ return !!value;
+ }
+ return !!(value && value.length);
+};
+
+/**
+ * Casts contents
+ *
+ * @param {Object} value
+ * @param {Document} doc document that triggers the casting
+ * @param {Boolean} init
+ * @api private
+ */
+
+SchemaBuffer.prototype.cast = function(value, doc, init) {
+ var ret;
+ if (SchemaType._isRef(this, value, doc, init)) {
+ // wait! we may need to cast this to a document
+
+ if (value === null || value === undefined) {
+ return value;
+ }
+
+ // lazy load
+ Document || (Document = require('./../document'));
+
+ if (value instanceof Document) {
+ value.$__.wasPopulated = true;
+ return value;
+ }
+
+ // setting a populated path
+ if (Buffer.isBuffer(value)) {
+ return value;
+ } else if (!utils.isObject(value)) {
+ throw new CastError('buffer', value, this.path);
+ }
+
+ // Handle the case where user directly sets a populated
+ // path to a plain object; cast to the Model used in
+ // the population query.
+ var path = doc.$__fullPath(this.path);
+ var owner = doc.ownerDocument ? doc.ownerDocument() : doc;
+ var pop = owner.populated(path, true);
+ ret = new pop.options.model(value);
+ ret.$__.wasPopulated = true;
+ return ret;
+ }
+
+ // documents
+ if (value && value._id) {
+ value = value._id;
+ }
+
+ if (value && value.isMongooseBuffer) {
+ return value;
+ }
+
+ if (Buffer.isBuffer(value)) {
+ if (!value || !value.isMongooseBuffer) {
+ value = new MongooseBuffer(value, [this.path, doc]);
+ }
+
+ return value;
+ } else if (value instanceof Binary) {
+ ret = new MongooseBuffer(value.value(true), [this.path, doc]);
+ if (typeof value.sub_type !== 'number') {
+ throw new CastError('buffer', value, this.path);
+ }
+ ret._subtype = value.sub_type;
+ return ret;
+ }
+
+ if (value === null) {
+ return value;
+ }
+
+ var type = typeof value;
+ if (type === 'string' || type === 'number' || Array.isArray(value)) {
+ if (type === 'number') {
+ value = [value];
+ }
+ ret = new MongooseBuffer(value, [this.path, doc]);
+ return ret;
+ }
+
+ throw new CastError('buffer', value, this.path);
+};
+
+/*!
+ * ignore
+ */
+function handleSingle(val) {
+ return this.castForQuery(val);
+}
+
+SchemaBuffer.prototype.$conditionalHandlers =
+ utils.options(SchemaType.prototype.$conditionalHandlers, {
+ $bitsAllClear: handleBitwiseOperator,
+ $bitsAnyClear: handleBitwiseOperator,
+ $bitsAllSet: handleBitwiseOperator,
+ $bitsAnySet: handleBitwiseOperator,
+ $gt: handleSingle,
+ $gte: handleSingle,
+ $lt: handleSingle,
+ $lte: handleSingle
+ });
+
+/**
+ * Casts contents for queries.
+ *
+ * @param {String} $conditional
+ * @param {any} [value]
+ * @api private
+ */
+
+SchemaBuffer.prototype.castForQuery = function($conditional, val) {
+ var handler;
+ if (arguments.length === 2) {
+ handler = this.$conditionalHandlers[$conditional];
+ if (!handler) {
+ throw new Error('Can\'t use ' + $conditional + ' with Buffer.');
+ }
+ return handler.call(this, val);
+ }
+ val = $conditional;
+ return this.cast(val).toObject({ transform: false });
+};
+
+/*!
+ * Module exports.
+ */
+
+module.exports = SchemaBuffer;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/date.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/date.js
new file mode 100644
index 0000000..b7bcf22
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/date.js
@@ -0,0 +1,296 @@
+/*!
+ * Module requirements.
+ */
+
+var MongooseError = require('../error');
+var utils = require('../utils');
+
+var SchemaType = require('../schematype');
+
+var CastError = SchemaType.CastError;
+
+/**
+ * Date SchemaType constructor.
+ *
+ * @param {String} key
+ * @param {Object} options
+ * @inherits SchemaType
+ * @api public
+ */
+
+function SchemaDate(key, options) {
+ SchemaType.call(this, key, options, 'Date');
+}
+
+/**
+ * This schema type's name, to defend against minifiers that mangle
+ * function names.
+ *
+ * @api public
+ */
+SchemaDate.schemaName = 'Date';
+
+/*!
+ * Inherits from SchemaType.
+ */
+SchemaDate.prototype = Object.create(SchemaType.prototype);
+SchemaDate.prototype.constructor = SchemaDate;
+
+/**
+ * Declares a TTL index (rounded to the nearest second) for _Date_ types only.
+ *
+ * This sets the `expireAfterSeconds` index option available in MongoDB >= 2.1.2.
+ * This index type is only compatible with Date types.
+ *
+ * ####Example:
+ *
+ * // expire in 24 hours
+ * new Schema({ createdAt: { type: Date, expires: 60*60*24 }});
+ *
+ * `expires` utilizes the `ms` module from [guille](https://github.com/guille/) allowing us to use a friendlier syntax:
+ *
+ * ####Example:
+ *
+ * // expire in 24 hours
+ * new Schema({ createdAt: { type: Date, expires: '24h' }});
+ *
+ * // expire in 1.5 hours
+ * new Schema({ createdAt: { type: Date, expires: '1.5h' }});
+ *
+ * // expire in 7 days
+ * var schema = new Schema({ createdAt: Date });
+ * schema.path('createdAt').expires('7d');
+ *
+ * @param {Number|String} when
+ * @added 3.0.0
+ * @return {SchemaType} this
+ * @api public
+ */
+
+SchemaDate.prototype.expires = function(when) {
+ if (!this._index || this._index.constructor.name !== 'Object') {
+ this._index = {};
+ }
+
+ this._index.expires = when;
+ utils.expires(this._index);
+ return this;
+};
+
+/**
+ * Check if the given value satisfies a required validator. To satisfy
+ * a required validator, the given value must be an instance of `Date`.
+ *
+ * @param {Any} value
+ * @param {Document} doc
+ * @return {Boolean}
+ * @api public
+ */
+
+SchemaDate.prototype.checkRequired = function(value) {
+ return value instanceof Date;
+};
+
+/**
+ * Sets a minimum date validator.
+ *
+ * ####Example:
+ *
+ * var s = new Schema({ d: { type: Date, min: Date('1970-01-01') })
+ * var M = db.model('M', s)
+ * var m = new M({ d: Date('1969-12-31') })
+ * m.save(function (err) {
+ * console.error(err) // validator error
+ * m.d = Date('2014-12-08');
+ * m.save() // success
+ * })
+ *
+ * // custom error messages
+ * // We can also use the special {MIN} token which will be replaced with the invalid value
+ * var min = [Date('1970-01-01'), 'The value of path `{PATH}` ({VALUE}) is beneath the limit ({MIN}).'];
+ * var schema = new Schema({ d: { type: Date, min: min })
+ * var M = mongoose.model('M', schema);
+ * var s= new M({ d: Date('1969-12-31') });
+ * s.validate(function (err) {
+ * console.log(String(err)) // ValidationError: The value of path `d` (1969-12-31) is before the limit (1970-01-01).
+ * })
+ *
+ * @param {Date} value minimum date
+ * @param {String} [message] optional custom error message
+ * @return {SchemaType} this
+ * @see Customized Error Messages #error_messages_MongooseError-messages
+ * @api public
+ */
+
+SchemaDate.prototype.min = function(value, message) {
+ if (this.minValidator) {
+ this.validators = this.validators.filter(function(v) {
+ return v.validator !== this.minValidator;
+ }, this);
+ }
+
+ if (value) {
+ var msg = message || MongooseError.messages.Date.min;
+ msg = msg.replace(/{MIN}/, (value === Date.now ? 'Date.now()' : this.cast(value).toString()));
+ var _this = this;
+ this.validators.push({
+ validator: this.minValidator = function(val) {
+ var min = (value === Date.now ? value() : _this.cast(value));
+ return val === null || val.valueOf() >= min.valueOf();
+ },
+ message: msg,
+ type: 'min',
+ min: value
+ });
+ }
+
+ return this;
+};
+
+/**
+ * Sets a maximum date validator.
+ *
+ * ####Example:
+ *
+ * var s = new Schema({ d: { type: Date, max: Date('2014-01-01') })
+ * var M = db.model('M', s)
+ * var m = new M({ d: Date('2014-12-08') })
+ * m.save(function (err) {
+ * console.error(err) // validator error
+ * m.d = Date('2013-12-31');
+ * m.save() // success
+ * })
+ *
+ * // custom error messages
+ * // We can also use the special {MAX} token which will be replaced with the invalid value
+ * var max = [Date('2014-01-01'), 'The value of path `{PATH}` ({VALUE}) exceeds the limit ({MAX}).'];
+ * var schema = new Schema({ d: { type: Date, max: max })
+ * var M = mongoose.model('M', schema);
+ * var s= new M({ d: Date('2014-12-08') });
+ * s.validate(function (err) {
+ * console.log(String(err)) // ValidationError: The value of path `d` (2014-12-08) exceeds the limit (2014-01-01).
+ * })
+ *
+ * @param {Date} maximum date
+ * @param {String} [message] optional custom error message
+ * @return {SchemaType} this
+ * @see Customized Error Messages #error_messages_MongooseError-messages
+ * @api public
+ */
+
+SchemaDate.prototype.max = function(value, message) {
+ if (this.maxValidator) {
+ this.validators = this.validators.filter(function(v) {
+ return v.validator !== this.maxValidator;
+ }, this);
+ }
+
+ if (value) {
+ var msg = message || MongooseError.messages.Date.max;
+ msg = msg.replace(/{MAX}/, (value === Date.now ? 'Date.now()' : this.cast(value).toString()));
+ var _this = this;
+ this.validators.push({
+ validator: this.maxValidator = function(val) {
+ var max = (value === Date.now ? value() : _this.cast(value));
+ return val === null || val.valueOf() <= max.valueOf();
+ },
+ message: msg,
+ type: 'max',
+ max: value
+ });
+ }
+
+ return this;
+};
+
+/**
+ * Casts to date
+ *
+ * @param {Object} value to cast
+ * @api private
+ */
+
+SchemaDate.prototype.cast = function(value) {
+ // If null or undefined
+ if (value === null || value === void 0 || value === '') {
+ return null;
+ }
+
+ if (value instanceof Date) {
+ if (isNaN(value.valueOf())) {
+ throw new CastError('date', value, this.path);
+ }
+
+ return value;
+ }
+
+ var date;
+
+ if (typeof value === 'boolean') {
+ throw new CastError('date', value, this.path);
+ }
+
+ if (value instanceof Number || typeof value === 'number'
+ || String(value) == Number(value)) {
+ // support for timestamps
+ date = new Date(Number(value));
+ } else if (value.valueOf) {
+ // support for moment.js
+ date = new Date(value.valueOf());
+ }
+
+ if (!isNaN(date.valueOf())) {
+ return date;
+ }
+
+ throw new CastError('date', value, this.path);
+};
+
+/*!
+ * Date Query casting.
+ *
+ * @api private
+ */
+
+function handleSingle(val) {
+ return this.cast(val);
+}
+
+SchemaDate.prototype.$conditionalHandlers =
+ utils.options(SchemaType.prototype.$conditionalHandlers, {
+ $gt: handleSingle,
+ $gte: handleSingle,
+ $lt: handleSingle,
+ $lte: handleSingle
+ });
+
+
+/**
+ * Casts contents for queries.
+ *
+ * @param {String} $conditional
+ * @param {any} [value]
+ * @api private
+ */
+
+SchemaDate.prototype.castForQuery = function($conditional, val) {
+ var handler;
+
+ if (arguments.length !== 2) {
+ return this.cast($conditional);
+ }
+
+ handler = this.$conditionalHandlers[$conditional];
+
+ if (!handler) {
+ throw new Error('Can\'t use ' + $conditional + ' with Date.');
+ }
+
+ return handler.call(this, val);
+};
+
+/*!
+ * Module exports.
+ */
+
+module.exports = SchemaDate;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/documentarray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/documentarray.js
new file mode 100644
index 0000000..96da049
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/documentarray.js
@@ -0,0 +1,313 @@
+/* eslint no-empty: 1 */
+
+/*!
+ * Module dependencies.
+ */
+
+var ArrayType = require('./array');
+var CastError = require('../error/cast');
+var MongooseDocumentArray = require('../types/documentarray');
+var SchemaType = require('../schematype');
+var Subdocument = require('../types/embedded');
+var util = require('util');
+
+/**
+ * SubdocsArray SchemaType constructor
+ *
+ * @param {String} key
+ * @param {Schema} schema
+ * @param {Object} options
+ * @inherits SchemaArray
+ * @api public
+ */
+
+function DocumentArray(key, schema, options) {
+ // compile an embedded document for this schema
+ function EmbeddedDocument() {
+ Subdocument.apply(this, arguments);
+ }
+
+ EmbeddedDocument.prototype = Object.create(Subdocument.prototype);
+ EmbeddedDocument.prototype.$__setSchema(schema);
+ EmbeddedDocument.schema = schema;
+
+ // apply methods
+ for (var i in schema.methods) {
+ EmbeddedDocument.prototype[i] = schema.methods[i];
+ }
+
+ // apply statics
+ for (i in schema.statics) {
+ EmbeddedDocument[i] = schema.statics[i];
+ }
+
+ EmbeddedDocument.options = options;
+
+ ArrayType.call(this, key, EmbeddedDocument, options);
+
+ this.schema = schema;
+ this.$isMongooseDocumentArray = true;
+ var fn = this.defaultValue;
+
+ if (!('defaultValue' in this) || fn !== void 0) {
+ this.default(function() {
+ var arr = fn.call(this);
+ if (!Array.isArray(arr)) {
+ arr = [arr];
+ }
+ // Leave it up to `cast()` to convert this to a documentarray
+ return arr;
+ });
+ }
+}
+
+/**
+ * This schema type's name, to defend against minifiers that mangle
+ * function names.
+ *
+ * @api public
+ */
+DocumentArray.schemaName = 'DocumentArray';
+
+/*!
+ * Inherits from ArrayType.
+ */
+DocumentArray.prototype = Object.create(ArrayType.prototype);
+DocumentArray.prototype.constructor = DocumentArray;
+
+/**
+ * Performs local validations first, then validations on each embedded doc
+ *
+ * @api private
+ */
+
+DocumentArray.prototype.doValidate = function(array, fn, scope, options) {
+ var _this = this;
+ SchemaType.prototype.doValidate.call(this, array, function(err) {
+ if (err) {
+ return fn(err);
+ }
+
+ var count = array && array.length;
+ var error;
+
+ if (!count) {
+ return fn();
+ }
+ if (options && options.updateValidator) {
+ return fn();
+ }
+
+ // handle sparse arrays, do not use array.forEach which does not
+ // iterate over sparse elements yet reports array.length including
+ // them :(
+
+ function callback(err) {
+ if (err) {
+ error = err;
+ }
+ --count || fn(error);
+ }
+
+ for (var i = 0, len = count; i < len; ++i) {
+ // sidestep sparse entries
+ var doc = array[i];
+ if (!doc) {
+ --count || fn(error);
+ continue;
+ }
+
+ // If you set the array index directly, the doc might not yet be
+ // a full fledged mongoose subdoc, so make it into one.
+ if (!(doc instanceof Subdocument)) {
+ doc = array[i] = new _this.casterConstructor(doc, array, undefined,
+ undefined, i);
+ }
+
+ // HACK: use $__original_validate to avoid promises so bluebird doesn't
+ // complain
+ if (doc.$__original_validate) {
+ doc.$__original_validate({__noPromise: true}, callback);
+ } else {
+ doc.validate({__noPromise: true}, callback);
+ }
+ }
+ }, scope);
+};
+
+/**
+ * Performs local validations first, then validations on each embedded doc.
+ *
+ * ####Note:
+ *
+ * This method ignores the asynchronous validators.
+ *
+ * @return {MongooseError|undefined}
+ * @api private
+ */
+
+DocumentArray.prototype.doValidateSync = function(array, scope) {
+ var schemaTypeError = SchemaType.prototype.doValidateSync.call(this, array, scope);
+ if (schemaTypeError) {
+ return schemaTypeError;
+ }
+
+ var count = array && array.length,
+ resultError = null;
+
+ if (!count) {
+ return;
+ }
+
+ // handle sparse arrays, do not use array.forEach which does not
+ // iterate over sparse elements yet reports array.length including
+ // them :(
+
+ for (var i = 0, len = count; i < len; ++i) {
+ // only first error
+ if (resultError) {
+ break;
+ }
+ // sidestep sparse entries
+ var doc = array[i];
+ if (!doc) {
+ continue;
+ }
+
+ var subdocValidateError = doc.validateSync();
+
+ if (subdocValidateError) {
+ resultError = subdocValidateError;
+ }
+ }
+
+ return resultError;
+};
+
+/**
+ * Casts contents
+ *
+ * @param {Object} value
+ * @param {Document} document that triggers the casting
+ * @api private
+ */
+
+DocumentArray.prototype.cast = function(value, doc, init, prev, options) {
+ var selected,
+ subdoc,
+ i;
+
+ if (!Array.isArray(value)) {
+ // gh-2442 mark whole array as modified if we're initializing a doc from
+ // the db and the path isn't an array in the document
+ if (!!doc && init) {
+ doc.markModified(this.path);
+ }
+ return this.cast([value], doc, init, prev);
+ }
+
+ if (!(value && value.isMongooseDocumentArray) &&
+ (!options || !options.skipDocumentArrayCast)) {
+ value = new MongooseDocumentArray(value, this.path, doc);
+ if (prev && prev._handlers) {
+ for (var key in prev._handlers) {
+ doc.removeListener(key, prev._handlers[key]);
+ }
+ }
+ } else if (value && value.isMongooseDocumentArray) {
+ // We need to create a new array, otherwise change tracking will
+ // update the old doc (gh-4449)
+ value = new MongooseDocumentArray(value, this.path, doc);
+ }
+
+ i = value.length;
+
+ while (i--) {
+ if (!value[i]) {
+ continue;
+ }
+ // Check if the document has a different schema (re gh-3701)
+ if ((value[i] instanceof Subdocument) &&
+ value[i].schema !== this.casterConstructor.schema) {
+ value[i] = value[i].toObject({transform: false});
+ }
+ if (!(value[i] instanceof Subdocument) && value[i]) {
+ if (init) {
+ if (doc) {
+ selected || (selected = scopePaths(this, doc.$__.selected, init));
+ } else {
+ selected = true;
+ }
+
+ subdoc = new this.casterConstructor(null, value, true, selected, i);
+ value[i] = subdoc.init(value[i]);
+ } else {
+ try {
+ subdoc = prev.id(value[i]._id);
+ } catch (e) {
+ }
+
+ if (prev && subdoc) {
+ // handle resetting doc with existing id but differing data
+ // doc.array = [{ doc: 'val' }]
+ subdoc.set(value[i]);
+ // if set() is hooked it will have no return value
+ // see gh-746
+ value[i] = subdoc;
+ } else {
+ try {
+ subdoc = new this.casterConstructor(value[i], value, undefined,
+ undefined, i);
+ // if set() is hooked it will have no return value
+ // see gh-746
+ value[i] = subdoc;
+ } catch (error) {
+ var valueInErrorMessage = util.inspect(value[i]);
+ throw new CastError('embedded', valueInErrorMessage,
+ value._path, error);
+ }
+ }
+ }
+ }
+ }
+
+ return value;
+};
+
+/*!
+ * Scopes paths selected in a query to this array.
+ * Necessary for proper default application of subdocument values.
+ *
+ * @param {DocumentArray} array - the array to scope `fields` paths
+ * @param {Object|undefined} fields - the root fields selected in the query
+ * @param {Boolean|undefined} init - if we are being created part of a query result
+ */
+
+function scopePaths(array, fields, init) {
+ if (!(init && fields)) {
+ return undefined;
+ }
+
+ var path = array.path + '.',
+ keys = Object.keys(fields),
+ i = keys.length,
+ selected = {},
+ hasKeys,
+ key;
+
+ while (i--) {
+ key = keys[i];
+ if (key.indexOf(path) === 0) {
+ hasKeys || (hasKeys = true);
+ selected[key.substring(path.length)] = fields[key];
+ }
+ }
+
+ return hasKeys && selected || undefined;
+}
+
+/*!
+ * Module exports.
+ */
+
+module.exports = DocumentArray;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/embedded.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/embedded.js
new file mode 100644
index 0000000..1d3d892
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/embedded.js
@@ -0,0 +1,177 @@
+'use strict';
+
+/*!
+ * Module dependencies.
+ */
+
+var SchemaType = require('../schematype');
+var Subdocument = require('../types/subdocument');
+var castToNumber = require('./operators/helpers').castToNumber;
+var geospatial = require('./operators/geospatial');
+
+module.exports = Embedded;
+
+/**
+ * Sub-schema schematype constructor
+ *
+ * @param {Schema} schema
+ * @param {String} key
+ * @param {Object} options
+ * @inherits SchemaType
+ * @api public
+ */
+
+function Embedded(schema, path, options) {
+ var _embedded = function(value, path, parent) {
+ var _this = this;
+ Subdocument.apply(this, arguments);
+ this.$parent = parent;
+ if (parent) {
+ parent.on('save', function() {
+ _this.emit('save', _this);
+ });
+
+ parent.on('isNew', function(val) {
+ _this.isNew = val;
+ _this.emit('isNew', val);
+ });
+ }
+ };
+ _embedded.prototype = Object.create(Subdocument.prototype);
+ _embedded.prototype.$__setSchema(schema);
+ _embedded.schema = schema;
+ _embedded.$isSingleNested = true;
+ _embedded.prototype.$basePath = path;
+ _embedded.prototype.toBSON = function() {
+ return this.toObject({
+ transform: false,
+ retainKeyOrder: schema.options.retainKeyOrder
+ });
+ };
+
+ // apply methods
+ for (var i in schema.methods) {
+ _embedded.prototype[i] = schema.methods[i];
+ }
+
+ // apply statics
+ for (i in schema.statics) {
+ _embedded[i] = schema.statics[i];
+ }
+
+ this.caster = _embedded;
+ this.schema = schema;
+ this.$isSingleNested = true;
+ SchemaType.call(this, path, options, 'Embedded');
+}
+
+Embedded.prototype = Object.create(SchemaType.prototype);
+
+/**
+ * Special case for when users use a common location schema to represent
+ * locations for use with $geoWithin.
+ * https://docs.mongodb.org/manual/reference/operator/query/geoWithin/
+ *
+ * @param {Object} val
+ * @api private
+ */
+
+Embedded.prototype.$conditionalHandlers.$geoWithin = function(val) {
+ return { $geometry: this.castForQuery(val.$geometry) };
+};
+
+/*!
+ * ignore
+ */
+
+Embedded.prototype.$conditionalHandlers.$near =
+Embedded.prototype.$conditionalHandlers.$nearSphere = geospatial.cast$near;
+
+Embedded.prototype.$conditionalHandlers.$within =
+Embedded.prototype.$conditionalHandlers.$geoWithin = geospatial.cast$within;
+
+Embedded.prototype.$conditionalHandlers.$geoIntersects =
+ geospatial.cast$geoIntersects;
+
+Embedded.prototype.$conditionalHandlers.$minDistance = castToNumber;
+Embedded.prototype.$conditionalHandlers.$maxDistance = castToNumber;
+
+/**
+ * Casts contents
+ *
+ * @param {Object} value
+ * @api private
+ */
+
+Embedded.prototype.cast = function(val, doc, init) {
+ if (val && val.$isSingleNested) {
+ return val;
+ }
+ var subdoc = new this.caster(void 0, doc ? doc.$__.selected : void 0, doc);
+ if (init) {
+ subdoc.init(val);
+ } else {
+ subdoc.set(val, undefined, true);
+ }
+ return subdoc;
+};
+
+/**
+ * Casts contents for query
+ *
+ * @param {string} [$conditional] optional query operator (like `$eq` or `$in`)
+ * @param {any} value
+ * @api private
+ */
+
+Embedded.prototype.castForQuery = function($conditional, val) {
+ var handler;
+ if (arguments.length === 2) {
+ handler = this.$conditionalHandlers[$conditional];
+ if (!handler) {
+ throw new Error('Can\'t use ' + $conditional);
+ }
+ return handler.call(this, val);
+ }
+ val = $conditional;
+ if (val == null) {
+ return val;
+ }
+
+ return new this.caster(val);
+};
+
+/**
+ * Async validation on this single nested doc.
+ *
+ * @api private
+ */
+
+Embedded.prototype.doValidate = function(value, fn, scope) {
+ SchemaType.prototype.doValidate.call(this, value, function(error) {
+ if (error) {
+ return fn(error);
+ }
+ if (!value) {
+ return fn(null);
+ }
+ value.validate(fn, {__noPromise: true});
+ }, scope);
+};
+
+/**
+ * Synchronously validate this single nested doc
+ *
+ * @api private
+ */
+
+Embedded.prototype.doValidateSync = function(value, scope) {
+ var schemaTypeError = SchemaType.prototype.doValidateSync.call(this, value, scope);
+ if (schemaTypeError) {
+ return schemaTypeError;
+ }
+ if (!value) {
+ return;
+ }
+ return value.validateSync();
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/index.js
new file mode 100644
index 0000000..f2935c1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/index.js
@@ -0,0 +1,30 @@
+
+/*!
+ * Module exports.
+ */
+
+exports.String = require('./string');
+
+exports.Number = require('./number');
+
+exports.Boolean = require('./boolean');
+
+exports.DocumentArray = require('./documentarray');
+
+exports.Embedded = require('./embedded');
+
+exports.Array = require('./array');
+
+exports.Buffer = require('./buffer');
+
+exports.Date = require('./date');
+
+exports.ObjectId = require('./objectid');
+
+exports.Mixed = require('./mixed');
+
+// alias
+
+exports.Oid = exports.ObjectId;
+exports.Object = exports.Mixed;
+exports.Bool = exports.Boolean;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/mixed.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/mixed.js
new file mode 100644
index 0000000..e4c23ca
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/mixed.js
@@ -0,0 +1,80 @@
+/*!
+ * Module dependencies.
+ */
+
+var SchemaType = require('../schematype');
+var utils = require('../utils');
+
+/**
+ * Mixed SchemaType constructor.
+ *
+ * @param {String} path
+ * @param {Object} options
+ * @inherits SchemaType
+ * @api public
+ */
+
+function Mixed(path, options) {
+ if (options && options.default) {
+ var def = options.default;
+ if (Array.isArray(def) && def.length === 0) {
+ // make sure empty array defaults are handled
+ options.default = Array;
+ } else if (!options.shared && utils.isObject(def) && Object.keys(def).length === 0) {
+ // prevent odd "shared" objects between documents
+ options.default = function() {
+ return {};
+ };
+ }
+ }
+
+ SchemaType.call(this, path, options, 'Mixed');
+}
+
+/**
+ * This schema type's name, to defend against minifiers that mangle
+ * function names.
+ *
+ * @api public
+ */
+Mixed.schemaName = 'Mixed';
+
+/*!
+ * Inherits from SchemaType.
+ */
+Mixed.prototype = Object.create(SchemaType.prototype);
+Mixed.prototype.constructor = Mixed;
+
+/**
+ * Casts `val` for Mixed.
+ *
+ * _this is a no-op_
+ *
+ * @param {Object} value to cast
+ * @api private
+ */
+
+Mixed.prototype.cast = function(val) {
+ return val;
+};
+
+/**
+ * Casts contents for queries.
+ *
+ * @param {String} $cond
+ * @param {any} [val]
+ * @api private
+ */
+
+Mixed.prototype.castForQuery = function($cond, val) {
+ if (arguments.length === 2) {
+ return val;
+ }
+ return $cond;
+};
+
+/*!
+ * Module exports.
+ */
+
+module.exports = Mixed;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/number.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/number.js
new file mode 100644
index 0000000..a91f6dd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/number.js
@@ -0,0 +1,290 @@
+/*!
+ * Module requirements.
+ */
+
+var SchemaType = require('../schematype');
+var CastError = SchemaType.CastError;
+var handleBitwiseOperator = require('./operators/bitwise');
+var MongooseError = require('../error');
+var utils = require('../utils');
+var Document;
+
+/**
+ * Number SchemaType constructor.
+ *
+ * @param {String} key
+ * @param {Object} options
+ * @inherits SchemaType
+ * @api public
+ */
+
+function SchemaNumber(key, options) {
+ SchemaType.call(this, key, options, 'Number');
+}
+
+/**
+ * This schema type's name, to defend against minifiers that mangle
+ * function names.
+ *
+ * @api public
+ */
+SchemaNumber.schemaName = 'Number';
+
+/*!
+ * Inherits from SchemaType.
+ */
+SchemaNumber.prototype = Object.create(SchemaType.prototype);
+SchemaNumber.prototype.constructor = SchemaNumber;
+
+/**
+ * Check if the given value satisfies a required validator.
+ *
+ * @param {Any} value
+ * @param {Document} doc
+ * @return {Boolean}
+ * @api public
+ */
+
+SchemaNumber.prototype.checkRequired = function checkRequired(value, doc) {
+ if (SchemaType._isRef(this, value, doc, true)) {
+ return !!value;
+ }
+ return typeof value === 'number' || value instanceof Number;
+};
+
+/**
+ * Sets a minimum number validator.
+ *
+ * ####Example:
+ *
+ * var s = new Schema({ n: { type: Number, min: 10 })
+ * var M = db.model('M', s)
+ * var m = new M({ n: 9 })
+ * m.save(function (err) {
+ * console.error(err) // validator error
+ * m.n = 10;
+ * m.save() // success
+ * })
+ *
+ * // custom error messages
+ * // We can also use the special {MIN} token which will be replaced with the invalid value
+ * var min = [10, 'The value of path `{PATH}` ({VALUE}) is beneath the limit ({MIN}).'];
+ * var schema = new Schema({ n: { type: Number, min: min })
+ * var M = mongoose.model('Measurement', schema);
+ * var s= new M({ n: 4 });
+ * s.validate(function (err) {
+ * console.log(String(err)) // ValidationError: The value of path `n` (4) is beneath the limit (10).
+ * })
+ *
+ * @param {Number} value minimum number
+ * @param {String} [message] optional custom error message
+ * @return {SchemaType} this
+ * @see Customized Error Messages #error_messages_MongooseError-messages
+ * @api public
+ */
+
+SchemaNumber.prototype.min = function(value, message) {
+ if (this.minValidator) {
+ this.validators = this.validators.filter(function(v) {
+ return v.validator !== this.minValidator;
+ }, this);
+ }
+
+ if (value !== null && value !== undefined) {
+ var msg = message || MongooseError.messages.Number.min;
+ msg = msg.replace(/{MIN}/, value);
+ this.validators.push({
+ validator: this.minValidator = function(v) {
+ return v == null || v >= value;
+ },
+ message: msg,
+ type: 'min',
+ min: value
+ });
+ }
+
+ return this;
+};
+
+/**
+ * Sets a maximum number validator.
+ *
+ * ####Example:
+ *
+ * var s = new Schema({ n: { type: Number, max: 10 })
+ * var M = db.model('M', s)
+ * var m = new M({ n: 11 })
+ * m.save(function (err) {
+ * console.error(err) // validator error
+ * m.n = 10;
+ * m.save() // success
+ * })
+ *
+ * // custom error messages
+ * // We can also use the special {MAX} token which will be replaced with the invalid value
+ * var max = [10, 'The value of path `{PATH}` ({VALUE}) exceeds the limit ({MAX}).'];
+ * var schema = new Schema({ n: { type: Number, max: max })
+ * var M = mongoose.model('Measurement', schema);
+ * var s= new M({ n: 4 });
+ * s.validate(function (err) {
+ * console.log(String(err)) // ValidationError: The value of path `n` (4) exceeds the limit (10).
+ * })
+ *
+ * @param {Number} maximum number
+ * @param {String} [message] optional custom error message
+ * @return {SchemaType} this
+ * @see Customized Error Messages #error_messages_MongooseError-messages
+ * @api public
+ */
+
+SchemaNumber.prototype.max = function(value, message) {
+ if (this.maxValidator) {
+ this.validators = this.validators.filter(function(v) {
+ return v.validator !== this.maxValidator;
+ }, this);
+ }
+
+ if (value !== null && value !== undefined) {
+ var msg = message || MongooseError.messages.Number.max;
+ msg = msg.replace(/{MAX}/, value);
+ this.validators.push({
+ validator: this.maxValidator = function(v) {
+ return v == null || v <= value;
+ },
+ message: msg,
+ type: 'max',
+ max: value
+ });
+ }
+
+ return this;
+};
+
+/**
+ * Casts to number
+ *
+ * @param {Object} value value to cast
+ * @param {Document} doc document that triggers the casting
+ * @param {Boolean} init
+ * @api private
+ */
+
+SchemaNumber.prototype.cast = function(value, doc, init) {
+ if (SchemaType._isRef(this, value, doc, init)) {
+ // wait! we may need to cast this to a document
+
+ if (value === null || value === undefined) {
+ return value;
+ }
+
+ // lazy load
+ Document || (Document = require('./../document'));
+
+ if (value instanceof Document) {
+ value.$__.wasPopulated = true;
+ return value;
+ }
+
+ // setting a populated path
+ if (typeof value === 'number') {
+ return value;
+ } else if (Buffer.isBuffer(value) || !utils.isObject(value)) {
+ throw new CastError('number', value, this.path);
+ }
+
+ // Handle the case where user directly sets a populated
+ // path to a plain object; cast to the Model used in
+ // the population query.
+ var path = doc.$__fullPath(this.path);
+ var owner = doc.ownerDocument ? doc.ownerDocument() : doc;
+ var pop = owner.populated(path, true);
+ var ret = new pop.options.model(value);
+ ret.$__.wasPopulated = true;
+ return ret;
+ }
+
+ var val = value && typeof value._id !== 'undefined' ?
+ value._id : // documents
+ value;
+
+ if (!isNaN(val)) {
+ if (val === null) {
+ return val;
+ }
+ if (val === '') {
+ return null;
+ }
+ if (typeof val === 'string' || typeof val === 'boolean') {
+ val = Number(val);
+ }
+ if (val instanceof Number) {
+ return val;
+ }
+ if (typeof val === 'number') {
+ return val;
+ }
+ if (val.toString && !Array.isArray(val) && val.toString() == Number(val)) {
+ return new Number(val);
+ }
+ }
+
+ throw new CastError('number', value, this.path);
+};
+
+/*!
+ * ignore
+ */
+
+function handleSingle(val) {
+ return this.cast(val);
+}
+
+function handleArray(val) {
+ var _this = this;
+ if (!Array.isArray(val)) {
+ return [this.cast(val)];
+ }
+ return val.map(function(m) {
+ return _this.cast(m);
+ });
+}
+
+SchemaNumber.prototype.$conditionalHandlers =
+ utils.options(SchemaType.prototype.$conditionalHandlers, {
+ $bitsAllClear: handleBitwiseOperator,
+ $bitsAnyClear: handleBitwiseOperator,
+ $bitsAllSet: handleBitwiseOperator,
+ $bitsAnySet: handleBitwiseOperator,
+ $gt: handleSingle,
+ $gte: handleSingle,
+ $lt: handleSingle,
+ $lte: handleSingle,
+ $mod: handleArray
+ });
+
+/**
+ * Casts contents for queries.
+ *
+ * @param {String} $conditional
+ * @param {any} [value]
+ * @api private
+ */
+
+SchemaNumber.prototype.castForQuery = function($conditional, val) {
+ var handler;
+ if (arguments.length === 2) {
+ handler = this.$conditionalHandlers[$conditional];
+ if (!handler) {
+ throw new Error('Can\'t use ' + $conditional + ' with Number.');
+ }
+ return handler.call(this, val);
+ }
+ val = this.cast($conditional);
+ return val;
+};
+
+/*!
+ * Module exports.
+ */
+
+module.exports = SchemaNumber;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/objectid.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/objectid.js
new file mode 100644
index 0000000..2885823
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/objectid.js
@@ -0,0 +1,207 @@
+/* eslint no-empty: 1 */
+
+/*!
+ * Module dependencies.
+ */
+
+var SchemaType = require('../schematype'),
+ CastError = SchemaType.CastError,
+ oid = require('../types/objectid'),
+ utils = require('../utils'),
+ Document;
+
+/**
+ * ObjectId SchemaType constructor.
+ *
+ * @param {String} key
+ * @param {Object} options
+ * @inherits SchemaType
+ * @api public
+ */
+
+function ObjectId(key, options) {
+ SchemaType.call(this, key, options, 'ObjectID');
+}
+
+/**
+ * This schema type's name, to defend against minifiers that mangle
+ * function names.
+ *
+ * @api public
+ */
+ObjectId.schemaName = 'ObjectId';
+
+/*!
+ * Inherits from SchemaType.
+ */
+ObjectId.prototype = Object.create(SchemaType.prototype);
+ObjectId.prototype.constructor = ObjectId;
+
+/**
+ * Adds an auto-generated ObjectId default if turnOn is true.
+ * @param {Boolean} turnOn auto generated ObjectId defaults
+ * @api public
+ * @return {SchemaType} this
+ */
+
+ObjectId.prototype.auto = function(turnOn) {
+ if (turnOn) {
+ this.default(defaultId);
+ this.set(resetId);
+ }
+
+ return this;
+};
+
+/**
+ * Check if the given value satisfies a required validator.
+ *
+ * @param {Any} value
+ * @param {Document} doc
+ * @return {Boolean}
+ * @api public
+ */
+
+ObjectId.prototype.checkRequired = function checkRequired(value, doc) {
+ if (SchemaType._isRef(this, value, doc, true)) {
+ return !!value;
+ }
+ return value instanceof oid;
+};
+
+/**
+ * Casts to ObjectId
+ *
+ * @param {Object} value
+ * @param {Object} doc
+ * @param {Boolean} init whether this is an initialization cast
+ * @api private
+ */
+
+ObjectId.prototype.cast = function(value, doc, init) {
+ if (SchemaType._isRef(this, value, doc, init)) {
+ // wait! we may need to cast this to a document
+
+ if (value === null || value === undefined) {
+ return value;
+ }
+
+ // lazy load
+ Document || (Document = require('./../document'));
+
+ if (value instanceof Document) {
+ value.$__.wasPopulated = true;
+ return value;
+ }
+
+ // setting a populated path
+ if (value instanceof oid) {
+ return value;
+ } else if (Buffer.isBuffer(value) || !utils.isObject(value)) {
+ throw new CastError('ObjectId', value, this.path);
+ }
+
+ // Handle the case where user directly sets a populated
+ // path to a plain object; cast to the Model used in
+ // the population query.
+ var path = doc.$__fullPath(this.path);
+ var owner = doc.ownerDocument ? doc.ownerDocument() : doc;
+ var pop = owner.populated(path, true);
+ var ret = value;
+ if (!doc.$__.populated ||
+ !doc.$__.populated[path] ||
+ !doc.$__.populated[path].options ||
+ !doc.$__.populated[path].options.options ||
+ !doc.$__.populated[path].options.options.lean) {
+ ret = new pop.options.model(value);
+ ret.$__.wasPopulated = true;
+ }
+
+ return ret;
+ }
+
+ if (value === null || value === undefined) {
+ return value;
+ }
+
+ if (value instanceof oid) {
+ return value;
+ }
+
+ if (value._id) {
+ if (value._id instanceof oid) {
+ return value._id;
+ }
+ if (value._id.toString instanceof Function) {
+ try {
+ return new oid(value._id.toString());
+ } catch (e) {
+ }
+ }
+ }
+
+ if (value.toString instanceof Function) {
+ try {
+ return new oid(value.toString());
+ } catch (err) {
+ throw new CastError('ObjectId', value, this.path);
+ }
+ }
+
+ throw new CastError('ObjectId', value, this.path);
+};
+
+/*!
+ * ignore
+ */
+
+function handleSingle(val) {
+ return this.cast(val);
+}
+
+ObjectId.prototype.$conditionalHandlers =
+ utils.options(SchemaType.prototype.$conditionalHandlers, {
+ $gt: handleSingle,
+ $gte: handleSingle,
+ $lt: handleSingle,
+ $lte: handleSingle
+ });
+
+/**
+ * Casts contents for queries.
+ *
+ * @param {String} $conditional
+ * @param {any} [val]
+ * @api private
+ */
+
+ObjectId.prototype.castForQuery = function($conditional, val) {
+ var handler;
+ if (arguments.length === 2) {
+ handler = this.$conditionalHandlers[$conditional];
+ if (!handler) {
+ throw new Error('Can\'t use ' + $conditional + ' with ObjectId.');
+ }
+ return handler.call(this, val);
+ }
+ return this.cast($conditional);
+};
+
+/*!
+ * ignore
+ */
+
+function defaultId() {
+ return new oid();
+}
+
+function resetId(v) {
+ this.$__._id = null;
+ return v;
+}
+
+/*!
+ * Module exports.
+ */
+
+module.exports = ObjectId;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/operators/bitwise.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/operators/bitwise.js
new file mode 100644
index 0000000..c1fdd34
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/operators/bitwise.js
@@ -0,0 +1,36 @@
+/*!
+ * Module requirements.
+ */
+
+var CastError = require('../../error/cast');
+
+/*!
+ * ignore
+ */
+
+function handleBitwiseOperator(val) {
+ var _this = this;
+ if (Array.isArray(val)) {
+ return val.map(function(v) {
+ return _castNumber(_this.path, v);
+ });
+ } else if (Buffer.isBuffer(val)) {
+ return val;
+ }
+ // Assume trying to cast to number
+ return _castNumber(_this.path, val);
+}
+
+/*!
+ * ignore
+ */
+
+function _castNumber(path, num) {
+ var v = Number(num);
+ if (isNaN(v)) {
+ throw new CastError('number', num, path);
+ }
+ return v;
+}
+
+module.exports = handleBitwiseOperator;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/operators/geospatial.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/operators/geospatial.js
new file mode 100644
index 0000000..b490d2d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/operators/geospatial.js
@@ -0,0 +1,100 @@
+/*!
+ * Module requirements.
+ */
+
+var castArraysOfNumbers = require('./helpers').castArraysOfNumbers;
+var castToNumber = require('./helpers').castToNumber;
+
+/*!
+ * ignore
+ */
+
+exports.cast$geoIntersects = cast$geoIntersects;
+exports.cast$near = cast$near;
+exports.cast$within = cast$within;
+
+function cast$near(val) {
+ var SchemaArray = require('../array');
+
+ if (Array.isArray(val)) {
+ castArraysOfNumbers(val, this);
+ return val;
+ }
+
+ _castMinMaxDistance(this, val);
+
+ if (val && val.$geometry) {
+ return cast$geometry(val, this);
+ }
+
+ return SchemaArray.prototype.castForQuery.call(this, val);
+}
+
+function cast$geometry(val, self) {
+ switch (val.$geometry.type) {
+ case 'Polygon':
+ case 'LineString':
+ case 'Point':
+ castArraysOfNumbers(val.$geometry.coordinates, self);
+ break;
+ default:
+ // ignore unknowns
+ break;
+ }
+
+ _castMinMaxDistance(this, val);
+
+ return val;
+}
+
+function cast$within(val) {
+ _castMinMaxDistance(this, val);
+
+ if (val.$box || val.$polygon) {
+ var type = val.$box ? '$box' : '$polygon';
+ val[type].forEach(function(arr) {
+ if (!Array.isArray(arr)) {
+ var msg = 'Invalid $within $box argument. '
+ + 'Expected an array, received ' + arr;
+ throw new TypeError(msg);
+ }
+ arr.forEach(function(v, i) {
+ arr[i] = castToNumber.call(this, v);
+ });
+ });
+ } else if (val.$center || val.$centerSphere) {
+ type = val.$center ? '$center' : '$centerSphere';
+ val[type].forEach(function(item, i) {
+ if (Array.isArray(item)) {
+ item.forEach(function(v, j) {
+ item[j] = castToNumber.call(this, v);
+ });
+ } else {
+ val[type][i] = castToNumber.call(this, item);
+ }
+ });
+ } else if (val.$geometry) {
+ cast$geometry(val, this);
+ }
+
+ return val;
+}
+
+function cast$geoIntersects(val) {
+ var geo = val.$geometry;
+ if (!geo) {
+ return;
+ }
+
+ cast$geometry(val, this);
+ return val;
+}
+
+function _castMinMaxDistance(self, val) {
+ if (val.$maxDistance) {
+ val.$maxDistance = castToNumber.call(self, val.$maxDistance);
+ }
+ if (val.$minDistance) {
+ val.$minDistance = castToNumber.call(self, val.$minDistance);
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/operators/helpers.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/operators/helpers.js
new file mode 100644
index 0000000..850354a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/operators/helpers.js
@@ -0,0 +1,34 @@
+'use strict';
+
+/*!
+ * Module requirements.
+ */
+
+var Types = {
+ Number: require('../number')
+};
+
+/*!
+ * @ignore
+ */
+
+exports.castToNumber = castToNumber;
+exports.castArraysOfNumbers = castArraysOfNumbers;
+
+/*!
+ * @ignore
+ */
+
+function castToNumber(val) {
+ return Types.Number.prototype.cast.call(this, val);
+}
+
+function castArraysOfNumbers(arr, self) {
+ arr.forEach(function(v, i) {
+ if (Array.isArray(v)) {
+ castArraysOfNumbers(v, self);
+ } else {
+ arr[i] = castToNumber.call(self, v);
+ }
+ });
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/string.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/string.js
new file mode 100644
index 0000000..eae40b8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schema/string.js
@@ -0,0 +1,516 @@
+/*!
+ * Module dependencies.
+ */
+
+var SchemaType = require('../schematype');
+var CastError = SchemaType.CastError;
+var MongooseError = require('../error');
+var utils = require('../utils');
+var Document;
+
+/**
+ * String SchemaType constructor.
+ *
+ * @param {String} key
+ * @param {Object} options
+ * @inherits SchemaType
+ * @api public
+ */
+
+function SchemaString(key, options) {
+ this.enumValues = [];
+ this.regExp = null;
+ SchemaType.call(this, key, options, 'String');
+}
+
+/**
+ * This schema type's name, to defend against minifiers that mangle
+ * function names.
+ *
+ * @api public
+ */
+SchemaString.schemaName = 'String';
+
+/*!
+ * Inherits from SchemaType.
+ */
+SchemaString.prototype = Object.create(SchemaType.prototype);
+SchemaString.prototype.constructor = SchemaString;
+
+/**
+ * Adds an enum validator
+ *
+ * ####Example:
+ *
+ * var states = ['opening', 'open', 'closing', 'closed']
+ * var s = new Schema({ state: { type: String, enum: states }})
+ * var M = db.model('M', s)
+ * var m = new M({ state: 'invalid' })
+ * m.save(function (err) {
+ * console.error(String(err)) // ValidationError: `invalid` is not a valid enum value for path `state`.
+ * m.state = 'open'
+ * m.save(callback) // success
+ * })
+ *
+ * // or with custom error messages
+ * var enum = {
+ * values: ['opening', 'open', 'closing', 'closed'],
+ * message: 'enum validator failed for path `{PATH}` with value `{VALUE}`'
+ * }
+ * var s = new Schema({ state: { type: String, enum: enu })
+ * var M = db.model('M', s)
+ * var m = new M({ state: 'invalid' })
+ * m.save(function (err) {
+ * console.error(String(err)) // ValidationError: enum validator failed for path `state` with value `invalid`
+ * m.state = 'open'
+ * m.save(callback) // success
+ * })
+ *
+ * @param {String|Object} [args...] enumeration values
+ * @return {SchemaType} this
+ * @see Customized Error Messages #error_messages_MongooseError-messages
+ * @api public
+ */
+
+SchemaString.prototype.enum = function() {
+ if (this.enumValidator) {
+ this.validators = this.validators.filter(function(v) {
+ return v.validator !== this.enumValidator;
+ }, this);
+ this.enumValidator = false;
+ }
+
+ if (arguments[0] === void 0 || arguments[0] === false) {
+ return this;
+ }
+
+ var values;
+ var errorMessage;
+
+ if (utils.isObject(arguments[0])) {
+ values = arguments[0].values;
+ errorMessage = arguments[0].message;
+ } else {
+ values = arguments;
+ errorMessage = MongooseError.messages.String.enum;
+ }
+
+ for (var i = 0; i < values.length; i++) {
+ if (undefined !== values[i]) {
+ this.enumValues.push(this.cast(values[i]));
+ }
+ }
+
+ var vals = this.enumValues;
+ this.enumValidator = function(v) {
+ return undefined === v || ~vals.indexOf(v);
+ };
+ this.validators.push({
+ validator: this.enumValidator,
+ message: errorMessage,
+ type: 'enum',
+ enumValues: vals
+ });
+
+ return this;
+};
+
+/**
+ * Adds a lowercase setter.
+ *
+ * ####Example:
+ *
+ * var s = new Schema({ email: { type: String, lowercase: true }})
+ * var M = db.model('M', s);
+ * var m = new M({ email: 'SomeEmail@example.COM' });
+ * console.log(m.email) // someemail@example.com
+ *
+ * @api public
+ * @return {SchemaType} this
+ */
+
+SchemaString.prototype.lowercase = function(shouldApply) {
+ if (arguments.length > 0 && !shouldApply) {
+ return this;
+ }
+ return this.set(function(v, self) {
+ if (typeof v !== 'string') {
+ v = self.cast(v);
+ }
+ if (v) {
+ return v.toLowerCase();
+ }
+ return v;
+ });
+};
+
+/**
+ * Adds an uppercase setter.
+ *
+ * ####Example:
+ *
+ * var s = new Schema({ caps: { type: String, uppercase: true }})
+ * var M = db.model('M', s);
+ * var m = new M({ caps: 'an example' });
+ * console.log(m.caps) // AN EXAMPLE
+ *
+ * @api public
+ * @return {SchemaType} this
+ */
+
+SchemaString.prototype.uppercase = function(shouldApply) {
+ if (arguments.length > 0 && !shouldApply) {
+ return this;
+ }
+ return this.set(function(v, self) {
+ if (typeof v !== 'string') {
+ v = self.cast(v);
+ }
+ if (v) {
+ return v.toUpperCase();
+ }
+ return v;
+ });
+};
+
+/**
+ * Adds a trim setter.
+ *
+ * The string value will be trimmed when set.
+ *
+ * ####Example:
+ *
+ * var s = new Schema({ name: { type: String, trim: true }})
+ * var M = db.model('M', s)
+ * var string = ' some name '
+ * console.log(string.length) // 11
+ * var m = new M({ name: string })
+ * console.log(m.name.length) // 9
+ *
+ * @api public
+ * @return {SchemaType} this
+ */
+
+SchemaString.prototype.trim = function(shouldTrim) {
+ if (arguments.length > 0 && !shouldTrim) {
+ return this;
+ }
+ return this.set(function(v, self) {
+ if (typeof v !== 'string') {
+ v = self.cast(v);
+ }
+ if (v) {
+ return v.trim();
+ }
+ return v;
+ });
+};
+
+/**
+ * Sets a minimum length validator.
+ *
+ * ####Example:
+ *
+ * var schema = new Schema({ postalCode: { type: String, minlength: 5 })
+ * var Address = db.model('Address', schema)
+ * var address = new Address({ postalCode: '9512' })
+ * address.save(function (err) {
+ * console.error(err) // validator error
+ * address.postalCode = '95125';
+ * address.save() // success
+ * })
+ *
+ * // custom error messages
+ * // We can also use the special {MINLENGTH} token which will be replaced with the minimum allowed length
+ * var minlength = [5, 'The value of path `{PATH}` (`{VALUE}`) is shorter than the minimum allowed length ({MINLENGTH}).'];
+ * var schema = new Schema({ postalCode: { type: String, minlength: minlength })
+ * var Address = mongoose.model('Address', schema);
+ * var address = new Address({ postalCode: '9512' });
+ * address.validate(function (err) {
+ * console.log(String(err)) // ValidationError: The value of path `postalCode` (`9512`) is shorter than the minimum length (5).
+ * })
+ *
+ * @param {Number} value minimum string length
+ * @param {String} [message] optional custom error message
+ * @return {SchemaType} this
+ * @see Customized Error Messages #error_messages_MongooseError-messages
+ * @api public
+ */
+
+SchemaString.prototype.minlength = function(value, message) {
+ if (this.minlengthValidator) {
+ this.validators = this.validators.filter(function(v) {
+ return v.validator !== this.minlengthValidator;
+ }, this);
+ }
+
+ if (value !== null && value !== undefined) {
+ var msg = message || MongooseError.messages.String.minlength;
+ msg = msg.replace(/{MINLENGTH}/, value);
+ this.validators.push({
+ validator: this.minlengthValidator = function(v) {
+ return v === null || v.length >= value;
+ },
+ message: msg,
+ type: 'minlength',
+ minlength: value
+ });
+ }
+
+ return this;
+};
+
+/**
+ * Sets a maximum length validator.
+ *
+ * ####Example:
+ *
+ * var schema = new Schema({ postalCode: { type: String, maxlength: 9 })
+ * var Address = db.model('Address', schema)
+ * var address = new Address({ postalCode: '9512512345' })
+ * address.save(function (err) {
+ * console.error(err) // validator error
+ * address.postalCode = '95125';
+ * address.save() // success
+ * })
+ *
+ * // custom error messages
+ * // We can also use the special {MAXLENGTH} token which will be replaced with the maximum allowed length
+ * var maxlength = [9, 'The value of path `{PATH}` (`{VALUE}`) exceeds the maximum allowed length ({MAXLENGTH}).'];
+ * var schema = new Schema({ postalCode: { type: String, maxlength: maxlength })
+ * var Address = mongoose.model('Address', schema);
+ * var address = new Address({ postalCode: '9512512345' });
+ * address.validate(function (err) {
+ * console.log(String(err)) // ValidationError: The value of path `postalCode` (`9512512345`) exceeds the maximum allowed length (9).
+ * })
+ *
+ * @param {Number} value maximum string length
+ * @param {String} [message] optional custom error message
+ * @return {SchemaType} this
+ * @see Customized Error Messages #error_messages_MongooseError-messages
+ * @api public
+ */
+
+SchemaString.prototype.maxlength = function(value, message) {
+ if (this.maxlengthValidator) {
+ this.validators = this.validators.filter(function(v) {
+ return v.validator !== this.maxlengthValidator;
+ }, this);
+ }
+
+ if (value !== null && value !== undefined) {
+ var msg = message || MongooseError.messages.String.maxlength;
+ msg = msg.replace(/{MAXLENGTH}/, value);
+ this.validators.push({
+ validator: this.maxlengthValidator = function(v) {
+ return v === null || v.length <= value;
+ },
+ message: msg,
+ type: 'maxlength',
+ maxlength: value
+ });
+ }
+
+ return this;
+};
+
+/**
+ * Sets a regexp validator.
+ *
+ * Any value that does not pass `regExp`.test(val) will fail validation.
+ *
+ * ####Example:
+ *
+ * var s = new Schema({ name: { type: String, match: /^a/ }})
+ * var M = db.model('M', s)
+ * var m = new M({ name: 'I am invalid' })
+ * m.validate(function (err) {
+ * console.error(String(err)) // "ValidationError: Path `name` is invalid (I am invalid)."
+ * m.name = 'apples'
+ * m.validate(function (err) {
+ * assert.ok(err) // success
+ * })
+ * })
+ *
+ * // using a custom error message
+ * var match = [ /\.html$/, "That file doesn't end in .html ({VALUE})" ];
+ * var s = new Schema({ file: { type: String, match: match }})
+ * var M = db.model('M', s);
+ * var m = new M({ file: 'invalid' });
+ * m.validate(function (err) {
+ * console.log(String(err)) // "ValidationError: That file doesn't end in .html (invalid)"
+ * })
+ *
+ * Empty strings, `undefined`, and `null` values always pass the match validator. If you require these values, enable the `required` validator also.
+ *
+ * var s = new Schema({ name: { type: String, match: /^a/, required: true }})
+ *
+ * @param {RegExp} regExp regular expression to test against
+ * @param {String} [message] optional custom error message
+ * @return {SchemaType} this
+ * @see Customized Error Messages #error_messages_MongooseError-messages
+ * @api public
+ */
+
+SchemaString.prototype.match = function match(regExp, message) {
+ // yes, we allow multiple match validators
+
+ var msg = message || MongooseError.messages.String.match;
+
+ var matchValidator = function(v) {
+ if (!regExp) {
+ return false;
+ }
+
+ var ret = ((v != null && v !== '')
+ ? regExp.test(v)
+ : true);
+ return ret;
+ };
+
+ this.validators.push({
+ validator: matchValidator,
+ message: msg,
+ type: 'regexp',
+ regexp: regExp
+ });
+ return this;
+};
+
+/**
+ * Check if the given value satisfies a required validator.
+ *
+ * @param {Any} value
+ * @param {Document} doc
+ * @return {Boolean}
+ * @api public
+ */
+
+SchemaString.prototype.checkRequired = function checkRequired(value, doc) {
+ if (SchemaType._isRef(this, value, doc, true)) {
+ return !!value;
+ }
+ return (value instanceof String || typeof value === 'string') && value.length;
+};
+
+/**
+ * Casts to String
+ *
+ * @api private
+ */
+
+SchemaString.prototype.cast = function(value, doc, init) {
+ if (SchemaType._isRef(this, value, doc, init)) {
+ // wait! we may need to cast this to a document
+
+ if (value === null || value === undefined) {
+ return value;
+ }
+
+ // lazy load
+ Document || (Document = require('./../document'));
+
+ if (value instanceof Document) {
+ value.$__.wasPopulated = true;
+ return value;
+ }
+
+ // setting a populated path
+ if (typeof value === 'string') {
+ return value;
+ } else if (Buffer.isBuffer(value) || !utils.isObject(value)) {
+ throw new CastError('string', value, this.path);
+ }
+
+ // Handle the case where user directly sets a populated
+ // path to a plain object; cast to the Model used in
+ // the population query.
+ var path = doc.$__fullPath(this.path);
+ var owner = doc.ownerDocument ? doc.ownerDocument() : doc;
+ var pop = owner.populated(path, true);
+ var ret = new pop.options.model(value);
+ ret.$__.wasPopulated = true;
+ return ret;
+ }
+
+ // If null or undefined
+ if (value === null || value === undefined) {
+ return value;
+ }
+
+ if (typeof value !== 'undefined') {
+ // handle documents being passed
+ if (value._id && typeof value._id === 'string') {
+ return value._id;
+ }
+
+ // Re: gh-647 and gh-3030, we're ok with casting using `toString()`
+ // **unless** its the default Object.toString, because "[object Object]"
+ // doesn't really qualify as useful data
+ if (value.toString && value.toString !== Object.prototype.toString) {
+ return value.toString();
+ }
+ }
+
+ throw new CastError('string', value, this.path);
+};
+
+/*!
+ * ignore
+ */
+
+function handleSingle(val) {
+ return this.castForQuery(val);
+}
+
+function handleArray(val) {
+ var _this = this;
+ if (!Array.isArray(val)) {
+ return [this.castForQuery(val)];
+ }
+ return val.map(function(m) {
+ return _this.castForQuery(m);
+ });
+}
+
+SchemaString.prototype.$conditionalHandlers =
+ utils.options(SchemaType.prototype.$conditionalHandlers, {
+ $all: handleArray,
+ $gt: handleSingle,
+ $gte: handleSingle,
+ $lt: handleSingle,
+ $lte: handleSingle,
+ $options: handleSingle,
+ $regex: handleSingle,
+ $not: handleSingle
+ });
+
+/**
+ * Casts contents for queries.
+ *
+ * @param {String} $conditional
+ * @param {any} [val]
+ * @api private
+ */
+
+SchemaString.prototype.castForQuery = function($conditional, val) {
+ var handler;
+ if (arguments.length === 2) {
+ handler = this.$conditionalHandlers[$conditional];
+ if (!handler) {
+ throw new Error('Can\'t use ' + $conditional + ' with String.');
+ }
+ return handler.call(this, val);
+ }
+ val = $conditional;
+ if (Object.prototype.toString.call(val) === '[object RegExp]') {
+ return val;
+ }
+ return this.cast(val);
+};
+
+/*!
+ * Module exports.
+ */
+
+module.exports = SchemaString;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schematype.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schematype.js
new file mode 100644
index 0000000..3ca3423
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/schematype.js
@@ -0,0 +1,931 @@
+/*!
+ * Module dependencies.
+ */
+
+var utils = require('./utils');
+var MongooseError = require('./error');
+var CastError = MongooseError.CastError;
+var ValidatorError = MongooseError.ValidatorError;
+
+/**
+ * SchemaType constructor
+ *
+ * @param {String} path
+ * @param {Object} [options]
+ * @param {String} [instance]
+ * @api public
+ */
+
+function SchemaType(path, options, instance) {
+ this.path = path;
+ this.instance = instance;
+ this.validators = [];
+ this.setters = [];
+ this.getters = [];
+ this.options = options;
+ this._index = null;
+ this.selected;
+
+ for (var i in options) {
+ if (this[i] && typeof this[i] === 'function') {
+ // { unique: true, index: true }
+ if (i === 'index' && this._index) {
+ continue;
+ }
+
+ var opts = Array.isArray(options[i])
+ ? options[i]
+ : [options[i]];
+
+ this[i].apply(this, opts);
+ }
+ }
+}
+
+/**
+ * Sets a default value for this SchemaType.
+ *
+ * ####Example:
+ *
+ * var schema = new Schema({ n: { type: Number, default: 10 })
+ * var M = db.model('M', schema)
+ * var m = new M;
+ * console.log(m.n) // 10
+ *
+ * Defaults can be either `functions` which return the value to use as the default or the literal value itself. Either way, the value will be cast based on its schema type before being set during document creation.
+ *
+ * ####Example:
+ *
+ * // values are cast:
+ * var schema = new Schema({ aNumber: { type: Number, default: 4.815162342 }})
+ * var M = db.model('M', schema)
+ * var m = new M;
+ * console.log(m.aNumber) // 4.815162342
+ *
+ * // default unique objects for Mixed types:
+ * var schema = new Schema({ mixed: Schema.Types.Mixed });
+ * schema.path('mixed').default(function () {
+ * return {};
+ * });
+ *
+ * // if we don't use a function to return object literals for Mixed defaults,
+ * // each document will receive a reference to the same object literal creating
+ * // a "shared" object instance:
+ * var schema = new Schema({ mixed: Schema.Types.Mixed });
+ * schema.path('mixed').default({});
+ * var M = db.model('M', schema);
+ * var m1 = new M;
+ * m1.mixed.added = 1;
+ * console.log(m1.mixed); // { added: 1 }
+ * var m2 = new M;
+ * console.log(m2.mixed); // { added: 1 }
+ *
+ * @param {Function|any} val the default value
+ * @return {defaultValue}
+ * @api public
+ */
+
+SchemaType.prototype.default = function(val) {
+ if (arguments.length === 1) {
+ if (val === void 0) {
+ this.defaultValue = void 0;
+ return void 0;
+ }
+ this.defaultValue = val;
+ return this.defaultValue;
+ } else if (arguments.length > 1) {
+ this.defaultValue = utils.args(arguments);
+ }
+ return this.defaultValue;
+};
+
+/**
+ * Declares the index options for this schematype.
+ *
+ * ####Example:
+ *
+ * var s = new Schema({ name: { type: String, index: true })
+ * var s = new Schema({ loc: { type: [Number], index: 'hashed' })
+ * var s = new Schema({ loc: { type: [Number], index: '2d', sparse: true })
+ * var s = new Schema({ loc: { type: [Number], index: { type: '2dsphere', sparse: true }})
+ * var s = new Schema({ date: { type: Date, index: { unique: true, expires: '1d' }})
+ * Schema.path('my.path').index(true);
+ * Schema.path('my.date').index({ expires: 60 });
+ * Schema.path('my.path').index({ unique: true, sparse: true });
+ *
+ * ####NOTE:
+ *
+ * _Indexes are created in the background by default. Specify `background: false` to override._
+ *
+ * [Direction doesn't matter for single key indexes](http://www.mongodb.org/display/DOCS/Indexes#Indexes-CompoundKeysIndexes)
+ *
+ * @param {Object|Boolean|String} options
+ * @return {SchemaType} this
+ * @api public
+ */
+
+SchemaType.prototype.index = function(options) {
+ this._index = options;
+ utils.expires(this._index);
+ return this;
+};
+
+/**
+ * Declares an unique index.
+ *
+ * ####Example:
+ *
+ * var s = new Schema({ name: { type: String, unique: true }});
+ * Schema.path('name').index({ unique: true });
+ *
+ * _NOTE: violating the constraint returns an `E11000` error from MongoDB when saving, not a Mongoose validation error._
+ *
+ * @param {Boolean} bool
+ * @return {SchemaType} this
+ * @api public
+ */
+
+SchemaType.prototype.unique = function(bool) {
+ if (this._index === false) {
+ if (!bool) {
+ return;
+ }
+ throw new Error('Path "' + this.path + '" may not have `index` set to ' +
+ 'false and `unique` set to true');
+ }
+ if (this._index == null || this._index === true) {
+ this._index = {};
+ } else if (typeof this._index === 'string') {
+ this._index = {type: this._index};
+ }
+
+ this._index.unique = bool;
+ return this;
+};
+
+/**
+ * Declares a full text index.
+ *
+ * ###Example:
+ *
+ * var s = new Schema({name : {type: String, text : true })
+ * Schema.path('name').index({text : true});
+ * @param {Boolean} bool
+ * @return {SchemaType} this
+ * @api public
+ */
+
+SchemaType.prototype.text = function(bool) {
+ if (this._index === null || this._index === undefined ||
+ typeof this._index === 'boolean') {
+ this._index = {};
+ } else if (typeof this._index === 'string') {
+ this._index = {type: this._index};
+ }
+
+ this._index.text = bool;
+ return this;
+};
+
+/**
+ * Declares a sparse index.
+ *
+ * ####Example:
+ *
+ * var s = new Schema({ name: { type: String, sparse: true })
+ * Schema.path('name').index({ sparse: true });
+ *
+ * @param {Boolean} bool
+ * @return {SchemaType} this
+ * @api public
+ */
+
+SchemaType.prototype.sparse = function(bool) {
+ if (this._index === null || this._index === undefined ||
+ typeof this._index === 'boolean') {
+ this._index = {};
+ } else if (typeof this._index === 'string') {
+ this._index = {type: this._index};
+ }
+
+ this._index.sparse = bool;
+ return this;
+};
+
+/**
+ * Adds a setter to this schematype.
+ *
+ * ####Example:
+ *
+ * function capitalize (val) {
+ * if (typeof val !== 'string') val = '';
+ * return val.charAt(0).toUpperCase() + val.substring(1);
+ * }
+ *
+ * // defining within the schema
+ * var s = new Schema({ name: { type: String, set: capitalize }})
+ *
+ * // or by retreiving its SchemaType
+ * var s = new Schema({ name: String })
+ * s.path('name').set(capitalize)
+ *
+ * Setters allow you to transform the data before it gets to the raw mongodb document and is set as a value on an actual key.
+ *
+ * Suppose you are implementing user registration for a website. Users provide an email and password, which gets saved to mongodb. The email is a string that you will want to normalize to lower case, in order to avoid one email having more than one account -- e.g., otherwise, avenue@q.com can be registered for 2 accounts via avenue@q.com and AvEnUe@Q.CoM.
+ *
+ * You can set up email lower case normalization easily via a Mongoose setter.
+ *
+ * function toLower (v) {
+ * return v.toLowerCase();
+ * }
+ *
+ * var UserSchema = new Schema({
+ * email: { type: String, set: toLower }
+ * })
+ *
+ * var User = db.model('User', UserSchema)
+ *
+ * var user = new User({email: 'AVENUE@Q.COM'})
+ * console.log(user.email); // 'avenue@q.com'
+ *
+ * // or
+ * var user = new User
+ * user.email = 'Avenue@Q.com'
+ * console.log(user.email) // 'avenue@q.com'
+ *
+ * As you can see above, setters allow you to transform the data before it gets to the raw mongodb document and is set as a value on an actual key.
+ *
+ * _NOTE: we could have also just used the built-in `lowercase: true` SchemaType option instead of defining our own function._
+ *
+ * new Schema({ email: { type: String, lowercase: true }})
+ *
+ * Setters are also passed a second argument, the schematype on which the setter was defined. This allows for tailored behavior based on options passed in the schema.
+ *
+ * function inspector (val, schematype) {
+ * if (schematype.options.required) {
+ * return schematype.path + ' is required';
+ * } else {
+ * return val;
+ * }
+ * }
+ *
+ * var VirusSchema = new Schema({
+ * name: { type: String, required: true, set: inspector },
+ * taxonomy: { type: String, set: inspector }
+ * })
+ *
+ * var Virus = db.model('Virus', VirusSchema);
+ * var v = new Virus({ name: 'Parvoviridae', taxonomy: 'Parvovirinae' });
+ *
+ * console.log(v.name); // name is required
+ * console.log(v.taxonomy); // Parvovirinae
+ *
+ * @param {Function} fn
+ * @return {SchemaType} this
+ * @api public
+ */
+
+SchemaType.prototype.set = function(fn) {
+ if (typeof fn !== 'function') {
+ throw new TypeError('A setter must be a function.');
+ }
+ this.setters.push(fn);
+ return this;
+};
+
+/**
+ * Adds a getter to this schematype.
+ *
+ * ####Example:
+ *
+ * function dob (val) {
+ * if (!val) return val;
+ * return (val.getMonth() + 1) + "/" + val.getDate() + "/" + val.getFullYear();
+ * }
+ *
+ * // defining within the schema
+ * var s = new Schema({ born: { type: Date, get: dob })
+ *
+ * // or by retreiving its SchemaType
+ * var s = new Schema({ born: Date })
+ * s.path('born').get(dob)
+ *
+ * Getters allow you to transform the representation of the data as it travels from the raw mongodb document to the value that you see.
+ *
+ * Suppose you are storing credit card numbers and you want to hide everything except the last 4 digits to the mongoose user. You can do so by defining a getter in the following way:
+ *
+ * function obfuscate (cc) {
+ * return '****-****-****-' + cc.slice(cc.length-4, cc.length);
+ * }
+ *
+ * var AccountSchema = new Schema({
+ * creditCardNumber: { type: String, get: obfuscate }
+ * });
+ *
+ * var Account = db.model('Account', AccountSchema);
+ *
+ * Account.findById(id, function (err, found) {
+ * console.log(found.creditCardNumber); // '****-****-****-1234'
+ * });
+ *
+ * Getters are also passed a second argument, the schematype on which the getter was defined. This allows for tailored behavior based on options passed in the schema.
+ *
+ * function inspector (val, schematype) {
+ * if (schematype.options.required) {
+ * return schematype.path + ' is required';
+ * } else {
+ * return schematype.path + ' is not';
+ * }
+ * }
+ *
+ * var VirusSchema = new Schema({
+ * name: { type: String, required: true, get: inspector },
+ * taxonomy: { type: String, get: inspector }
+ * })
+ *
+ * var Virus = db.model('Virus', VirusSchema);
+ *
+ * Virus.findById(id, function (err, virus) {
+ * console.log(virus.name); // name is required
+ * console.log(virus.taxonomy); // taxonomy is not
+ * })
+ *
+ * @param {Function} fn
+ * @return {SchemaType} this
+ * @api public
+ */
+
+SchemaType.prototype.get = function(fn) {
+ if (typeof fn !== 'function') {
+ throw new TypeError('A getter must be a function.');
+ }
+ this.getters.push(fn);
+ return this;
+};
+
+/**
+ * Adds validator(s) for this document path.
+ *
+ * Validators always receive the value to validate as their first argument and must return `Boolean`. Returning `false` means validation failed.
+ *
+ * The error message argument is optional. If not passed, the [default generic error message template](#error_messages_MongooseError-messages) will be used.
+ *
+ * ####Examples:
+ *
+ * // make sure every value is equal to "something"
+ * function validator (val) {
+ * return val == 'something';
+ * }
+ * new Schema({ name: { type: String, validate: validator }});
+ *
+ * // with a custom error message
+ *
+ * var custom = [validator, 'Uh oh, {PATH} does not equal "something".']
+ * new Schema({ name: { type: String, validate: custom }});
+ *
+ * // adding many validators at a time
+ *
+ * var many = [
+ * { validator: validator, msg: 'uh oh' }
+ * , { validator: anotherValidator, msg: 'failed' }
+ * ]
+ * new Schema({ name: { type: String, validate: many }});
+ *
+ * // or utilizing SchemaType methods directly:
+ *
+ * var schema = new Schema({ name: 'string' });
+ * schema.path('name').validate(validator, 'validation of `{PATH}` failed with value `{VALUE}`');
+ *
+ * ####Error message templates:
+ *
+ * From the examples above, you may have noticed that error messages support basic templating. There are a few other template keywords besides `{PATH}` and `{VALUE}` too. To find out more, details are available [here](#error_messages_MongooseError.messages)
+ *
+ * ####Asynchronous validation:
+ *
+ * Passing a validator function that receives two arguments tells mongoose that the validator is an asynchronous validator. The first argument passed to the validator function is the value being validated. The second argument is a callback function that must called when you finish validating the value and passed either `true` or `false` to communicate either success or failure respectively.
+ *
+ * schema.path('name').validate(function (value, respond) {
+ * doStuff(value, function () {
+ * ...
+ * respond(false); // validation failed
+ * })
+ * }, '{PATH} failed validation.');
+ *
+ * // or with dynamic message
+ *
+ * schema.path('name').validate(function (value, respond) {
+ * doStuff(value, function () {
+ * ...
+ * respond(false, 'this message gets to the validation error');
+ * });
+ * }, 'this message does not matter');
+ *
+ * You might use asynchronous validators to retreive other documents from the database to validate against or to meet other I/O bound validation needs.
+ *
+ * Validation occurs `pre('save')` or whenever you manually execute [document#validate](#document_Document-validate).
+ *
+ * If validation fails during `pre('save')` and no callback was passed to receive the error, an `error` event will be emitted on your Models associated db [connection](#connection_Connection), passing the validation error object along.
+ *
+ * var conn = mongoose.createConnection(..);
+ * conn.on('error', handleError);
+ *
+ * var Product = conn.model('Product', yourSchema);
+ * var dvd = new Product(..);
+ * dvd.save(); // emits error on the `conn` above
+ *
+ * If you desire handling these errors at the Model level, attach an `error` listener to your Model and the event will instead be emitted there.
+ *
+ * // registering an error listener on the Model lets us handle errors more locally
+ * Product.on('error', handleError);
+ *
+ * @param {RegExp|Function|Object} obj validator
+ * @param {String} [errorMsg] optional error message
+ * @param {String} [type] optional validator type
+ * @return {SchemaType} this
+ * @api public
+ */
+
+SchemaType.prototype.validate = function(obj, message, type) {
+ if (typeof obj === 'function' || obj && utils.getFunctionName(obj.constructor) === 'RegExp') {
+ var properties;
+ if (message instanceof Object && !type) {
+ properties = utils.clone(message);
+ if (!properties.message) {
+ properties.message = properties.msg;
+ }
+ properties.validator = obj;
+ properties.type = properties.type || 'user defined';
+ } else {
+ if (!message) {
+ message = MongooseError.messages.general.default;
+ }
+ if (!type) {
+ type = 'user defined';
+ }
+ properties = {message: message, type: type, validator: obj};
+ }
+ this.validators.push(properties);
+ return this;
+ }
+
+ var i,
+ length,
+ arg;
+
+ for (i = 0, length = arguments.length; i < length; i++) {
+ arg = arguments[i];
+ if (!(arg && utils.getFunctionName(arg.constructor) === 'Object')) {
+ var msg = 'Invalid validator. Received (' + typeof arg + ') '
+ + arg
+ + '. See http://mongoosejs.com/docs/api.html#schematype_SchemaType-validate';
+
+ throw new Error(msg);
+ }
+ this.validate(arg.validator, arg);
+ }
+
+ return this;
+};
+
+/**
+ * Adds a required validator to this SchemaType. The validator gets added
+ * to the front of this SchemaType's validators array using `unshift()`.
+ *
+ * ####Example:
+ *
+ * var s = new Schema({ born: { type: Date, required: true })
+ *
+ * // or with custom error message
+ *
+ * var s = new Schema({ born: { type: Date, required: '{PATH} is required!' })
+ *
+ * // or through the path API
+ *
+ * Schema.path('name').required(true);
+ *
+ * // with custom error messaging
+ *
+ * Schema.path('name').required(true, 'grrr :( ');
+ *
+ * // or make a path conditionally required based on a function
+ * var isOver18 = function() { return this.age >= 18; };
+ * Schema.path('voterRegistrationId').required(isOver18);
+ *
+ * The required validator uses the SchemaType's `checkRequired` function to
+ * determine whether a given value satisfies the required validator. By default,
+ * a value satisfies the required validator if `val != null` (that is, if
+ * the value is not null nor undefined). However, most built-in mongoose schema
+ * types override the default `checkRequired` function:
+ *
+ * @param {Boolean} required enable/disable the validator
+ * @param {String} [message] optional custom error message
+ * @return {SchemaType} this
+ * @see Customized Error Messages #error_messages_MongooseError-messages
+ * @see SchemaArray#checkRequired #schema_array_SchemaArray.checkRequired
+ * @see SchemaBoolean#checkRequired #schema_boolean_SchemaBoolean-checkRequired
+ * @see SchemaBuffer#checkRequired #schema_buffer_SchemaBuffer.schemaName
+ * @see SchemaNumber#checkRequired #schema_number_SchemaNumber-min
+ * @see SchemaObjectId#checkRequired #schema_objectid_ObjectId-auto
+ * @see SchemaString#checkRequired #schema_string_SchemaString-checkRequired
+ * @api public
+ */
+
+SchemaType.prototype.required = function(required, message) {
+ if (required === false) {
+ this.validators = this.validators.filter(function(v) {
+ return v.validator !== this.requiredValidator;
+ }, this);
+
+ this.isRequired = false;
+ return this;
+ }
+
+ var _this = this;
+ this.isRequired = true;
+
+ this.requiredValidator = function(v) {
+ // in here, `this` refers to the validating document.
+ // no validation when this path wasn't selected in the query.
+ if ('isSelected' in this && !this.isSelected(_this.path) && !this.isModified(_this.path)) {
+ return true;
+ }
+
+ return ((typeof required === 'function') && !required.apply(this)) ||
+ _this.checkRequired(v, this);
+ };
+ this.originalRequiredValue = required;
+
+ if (typeof required === 'string') {
+ message = required;
+ required = undefined;
+ }
+
+ var msg = message || MongooseError.messages.general.required;
+ this.validators.unshift({
+ validator: this.requiredValidator,
+ message: msg,
+ type: 'required'
+ });
+
+ return this;
+};
+
+/**
+ * Gets the default value
+ *
+ * @param {Object} scope the scope which callback are executed
+ * @param {Boolean} init
+ * @api private
+ */
+
+SchemaType.prototype.getDefault = function(scope, init) {
+ var ret = typeof this.defaultValue === 'function'
+ ? this.defaultValue.call(scope)
+ : this.defaultValue;
+
+ if (ret !== null && ret !== undefined) {
+ var casted = this.cast(ret, scope, init);
+ if (casted && casted.$isSingleNested) {
+ casted.$parent = scope;
+ }
+ return casted;
+ }
+ return ret;
+};
+
+/**
+ * Applies setters
+ *
+ * @param {Object} value
+ * @param {Object} scope
+ * @param {Boolean} init
+ * @api private
+ */
+
+SchemaType.prototype.applySetters = function(value, scope, init, priorVal, options) {
+ var v = value,
+ setters = this.setters,
+ len = setters.length,
+ caster = this.caster;
+
+ while (len--) {
+ v = setters[len].call(scope, v, this);
+ }
+
+ if (Array.isArray(v) && caster && caster.setters) {
+ var newVal = [];
+ for (var i = 0; i < v.length; i++) {
+ newVal.push(caster.applySetters(v[i], scope, init, priorVal));
+ }
+ v = newVal;
+ }
+
+ if (v === null || v === undefined) {
+ return v;
+ }
+
+ // do not cast until all setters are applied #665
+ v = this.cast(v, scope, init, priorVal, options);
+
+ return v;
+};
+
+/**
+ * Applies getters to a value
+ *
+ * @param {Object} value
+ * @param {Object} scope
+ * @api private
+ */
+
+SchemaType.prototype.applyGetters = function(value, scope) {
+ var v = value,
+ getters = this.getters,
+ len = getters.length;
+
+ if (!len) {
+ return v;
+ }
+
+ while (len--) {
+ v = getters[len].call(scope, v, this);
+ }
+
+ return v;
+};
+
+/**
+ * Sets default `select()` behavior for this path.
+ *
+ * Set to `true` if this path should always be included in the results, `false` if it should be excluded by default. This setting can be overridden at the query level.
+ *
+ * ####Example:
+ *
+ * T = db.model('T', new Schema({ x: { type: String, select: true }}));
+ * T.find(..); // field x will always be selected ..
+ * // .. unless overridden;
+ * T.find().select('-x').exec(callback);
+ *
+ * @param {Boolean} val
+ * @return {SchemaType} this
+ * @api public
+ */
+
+SchemaType.prototype.select = function select(val) {
+ this.selected = !!val;
+ return this;
+};
+
+/**
+ * Performs a validation of `value` using the validators declared for this SchemaType.
+ *
+ * @param {any} value
+ * @param {Function} callback
+ * @param {Object} scope
+ * @api private
+ */
+
+SchemaType.prototype.doValidate = function(value, fn, scope) {
+ var err = false,
+ path = this.path,
+ count = this.validators.length;
+
+ if (!count) {
+ return fn(null);
+ }
+
+ var validate = function(ok, validatorProperties) {
+ if (err) {
+ return;
+ }
+ if (ok === undefined || ok) {
+ --count || fn(null);
+ } else {
+ err = new ValidatorError(validatorProperties);
+ fn(err);
+ }
+ };
+
+ var _this = this;
+ this.validators.forEach(function(v) {
+ if (err) {
+ return;
+ }
+
+ var validator = v.validator;
+
+ var validatorProperties = utils.clone(v);
+ validatorProperties.path = path;
+ validatorProperties.value = value;
+
+ if (validator instanceof RegExp) {
+ validate(validator.test(value), validatorProperties);
+ } else if (typeof validator === 'function') {
+ if (value === undefined && !_this.isRequired) {
+ validate(true, validatorProperties);
+ return;
+ }
+ if (validator.length === 2) {
+ var returnVal = validator.call(scope, value, function(ok, customMsg) {
+ if (typeof returnVal === 'boolean') {
+ return;
+ }
+ if (customMsg) {
+ validatorProperties.message = customMsg;
+ }
+ validate(ok, validatorProperties);
+ });
+ if (typeof returnVal === 'boolean') {
+ validate(returnVal, validatorProperties);
+ }
+ } else {
+ validate(validator.call(scope, value), validatorProperties);
+ }
+ }
+ });
+};
+
+/**
+ * Performs a validation of `value` using the validators declared for this SchemaType.
+ *
+ * ####Note:
+ *
+ * This method ignores the asynchronous validators.
+ *
+ * @param {any} value
+ * @param {Object} scope
+ * @return {MongooseError|undefined}
+ * @api private
+ */
+
+SchemaType.prototype.doValidateSync = function(value, scope) {
+ var err = null,
+ path = this.path,
+ count = this.validators.length;
+
+ if (!count) {
+ return null;
+ }
+
+ var validate = function(ok, validatorProperties) {
+ if (err) {
+ return;
+ }
+ if (ok !== undefined && !ok) {
+ err = new ValidatorError(validatorProperties);
+ }
+ };
+
+ var validators = this.validators;
+ if (value === void 0) {
+ if (this.validators.length > 0 && this.validators[0].type === 'required') {
+ validators = [this.validators[0]];
+ } else {
+ return null;
+ }
+ }
+
+ validators.forEach(function(v) {
+ if (err) {
+ return;
+ }
+
+ var validator = v.validator;
+ var validatorProperties = utils.clone(v);
+ validatorProperties.path = path;
+ validatorProperties.value = value;
+
+ if (validator instanceof RegExp) {
+ validate(validator.test(value), validatorProperties);
+ } else if (typeof validator === 'function') {
+ // if not async validators
+ if (validator.length !== 2) {
+ validate(validator.call(scope, value), validatorProperties);
+ }
+ }
+ });
+
+ return err;
+};
+
+/**
+ * Determines if value is a valid Reference.
+ *
+ * @param {SchemaType} self
+ * @param {Object} value
+ * @param {Document} doc
+ * @param {Boolean} init
+ * @return {Boolean}
+ * @api private
+ */
+
+SchemaType._isRef = function(self, value, doc, init) {
+ // fast path
+ var ref = init && self.options && self.options.ref;
+
+ if (!ref && doc && doc.$__fullPath) {
+ // checks for
+ // - this populated with adhoc model and no ref was set in schema OR
+ // - setting / pushing values after population
+ var path = doc.$__fullPath(self.path);
+ var owner = doc.ownerDocument ? doc.ownerDocument() : doc;
+ ref = owner.populated(path);
+ }
+
+ if (ref) {
+ if (value == null) {
+ return true;
+ }
+ if (!Buffer.isBuffer(value) && // buffers are objects too
+ value._bsontype !== 'Binary' // raw binary value from the db
+ && utils.isObject(value) // might have deselected _id in population query
+ ) {
+ return true;
+ }
+ }
+
+ return false;
+};
+
+/*!
+ * ignore
+ */
+
+function handleSingle(val) {
+ return this.castForQuery(val);
+}
+
+/*!
+ * ignore
+ */
+
+function handleArray(val) {
+ var _this = this;
+ if (!Array.isArray(val)) {
+ return [this.castForQuery(val)];
+ }
+ return val.map(function(m) {
+ return _this.castForQuery(m);
+ });
+}
+
+/*!
+ * ignore
+ */
+
+SchemaType.prototype.$conditionalHandlers = {
+ $all: handleArray,
+ $eq: handleSingle,
+ $in: handleArray,
+ $ne: handleSingle,
+ $nin: handleArray,
+ $type: function(val) {
+ if (typeof val !== 'number' && typeof val !== 'string') {
+ throw new Error('$type parameter must be number or string');
+ }
+
+ return val;
+ }
+};
+
+/**
+ * Cast the given value with the given optional query operator.
+ *
+ * @param {String} [$conditional] query operator, like `$eq` or `$in`
+ * @param {any} val
+ * @api private
+ */
+
+SchemaType.prototype.castForQuery = function($conditional, val) {
+ var handler;
+ if (arguments.length === 2) {
+ handler = this.$conditionalHandlers[$conditional];
+ if (!handler) {
+ throw new Error('Can\'t use ' + $conditional);
+ }
+ return handler.call(this, val);
+ }
+ val = $conditional;
+ return this.cast(val);
+};
+
+/**
+ * Default check for if this path satisfies the `required` validator.
+ *
+ * @param {any} val
+ * @api private
+ */
+
+SchemaType.prototype.checkRequired = function(val) {
+ return val != null;
+};
+
+/*!
+ * Module exports.
+ */
+
+module.exports = exports = SchemaType;
+
+exports.CastError = CastError;
+
+exports.ValidatorError = ValidatorError;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/services/common.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/services/common.js
new file mode 100644
index 0000000..d125987
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/services/common.js
@@ -0,0 +1,87 @@
+'use strict';
+
+/*!
+ * Module dependencies.
+ */
+
+var ObjectId = require('../types/objectid');
+var utils = require('../utils');
+
+exports.flatten = flatten;
+exports.modifiedPaths = modifiedPaths;
+
+/*!
+ * ignore
+ */
+
+function flatten(update, path, options) {
+ var keys;
+ if (update && utils.isMongooseObject(update) && !Buffer.isBuffer(update)) {
+ keys = Object.keys(update.toObject({ transform: false }));
+ } else {
+ keys = Object.keys(update || {});
+ }
+
+ var numKeys = keys.length;
+ var result = {};
+ path = path ? path + '.' : '';
+
+ for (var i = 0; i < numKeys; ++i) {
+ var key = keys[i];
+ var val = update[key];
+ result[path + key] = val;
+ if (shouldFlatten(val)) {
+ if (options && options.skipArrays && Array.isArray(val)) {
+ continue;
+ }
+ var flat = flatten(val, path + key);
+ for (var k in flat) {
+ result[k] = flat[k];
+ }
+ if (Array.isArray(val)) {
+ result[path + key] = val;
+ }
+ }
+ }
+
+ return result;
+}
+
+/*!
+ * ignore
+ */
+
+function modifiedPaths(update, path, result) {
+ var keys = Object.keys(update || {});
+ var numKeys = keys.length;
+ result = result || {};
+ path = path ? path + '.' : '';
+
+ for (var i = 0; i < numKeys; ++i) {
+ var key = keys[i];
+ var val = update[key];
+
+ result[path + key] = true;
+ if (utils.isMongooseObject(val) && !Buffer.isBuffer(val)) {
+ val = val.toObject({ transform: false });
+ }
+ if (shouldFlatten(val)) {
+ modifiedPaths(val, path + key, result);
+ }
+ }
+
+ return result;
+}
+
+/*!
+ * ignore
+ */
+
+function shouldFlatten(val) {
+ return val &&
+ typeof val === 'object' &&
+ !(val instanceof Date) &&
+ !(val instanceof ObjectId) &&
+ (!Array.isArray(val) || val.length > 0) &&
+ !(val instanceof Buffer);
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/services/setDefaultsOnInsert.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/services/setDefaultsOnInsert.js
new file mode 100644
index 0000000..36b87d7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/services/setDefaultsOnInsert.js
@@ -0,0 +1,96 @@
+'use strict';
+
+var modifiedPaths = require('./common').modifiedPaths;
+
+/**
+ * Applies defaults to update and findOneAndUpdate operations.
+ *
+ * @param {Query} query
+ * @param {Schema} schema
+ * @param {Object} castedDoc
+ * @param {Object} options
+ * @method setDefaultsOnInsert
+ * @api private
+ */
+
+module.exports = function(query, schema, castedDoc, options) {
+ var keys = Object.keys(castedDoc || {});
+ var updatedKeys = {};
+ var updatedValues = {};
+ var numKeys = keys.length;
+ var hasDollarUpdate = false;
+ var modified = {};
+
+ if (options && options.upsert) {
+ for (var i = 0; i < numKeys; ++i) {
+ if (keys[i].charAt(0) === '$') {
+ modifiedPaths(castedDoc[keys[i]], '', modified);
+ hasDollarUpdate = true;
+ }
+ }
+
+ if (!hasDollarUpdate) {
+ modifiedPaths(castedDoc, '', modified);
+ }
+
+ var paths = Object.keys(query._conditions);
+ var numPaths = keys.length;
+ for (i = 0; i < numPaths; ++i) {
+ var path = paths[i];
+ var condition = query._conditions[path];
+ if (condition && typeof condition === 'object') {
+ var conditionKeys = Object.keys(condition);
+ var numConditionKeys = conditionKeys.length;
+ var hasDollarKey = false;
+ for (var j = 0; j < numConditionKeys; ++j) {
+ if (conditionKeys[j].charAt(0) === '$') {
+ hasDollarKey = true;
+ break;
+ }
+ }
+ if (hasDollarKey) {
+ continue;
+ }
+ }
+ updatedKeys[path] = true;
+ modified[path] = true;
+ }
+
+ if (options.setDefaultsOnInsert) {
+ schema.eachPath(function(path, schemaType) {
+ if (path === '_id') {
+ // Ignore _id for now because it causes bugs in 2.4
+ return;
+ }
+ if (schemaType.$isSingleNested) {
+ // Only handle nested schemas 1-level deep to avoid infinite
+ // recursion re: https://github.com/mongodb-js/mongoose-autopopulate/issues/11
+ schemaType.schema.eachPath(function(_path, _schemaType) {
+ if (path === '_id') {
+ // Ignore _id for now because it causes bugs in 2.4
+ return;
+ }
+
+ var def = _schemaType.getDefault(null, true);
+ if (!modified[path + '.' + _path] && typeof def !== 'undefined') {
+ castedDoc = castedDoc || {};
+ castedDoc.$setOnInsert = castedDoc.$setOnInsert || {};
+ castedDoc.$setOnInsert[path + '.' + _path] = def;
+ updatedValues[path + '.' + _path] = def;
+ }
+ });
+ } else {
+ var def = schemaType.getDefault(null, true);
+ if (!modified[path] && typeof def !== 'undefined') {
+ castedDoc = castedDoc || {};
+ castedDoc.$setOnInsert = castedDoc.$setOnInsert || {};
+ castedDoc.$setOnInsert[path] = def;
+ updatedValues[path] = def;
+ }
+ }
+ });
+ }
+ }
+
+ return castedDoc;
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/services/updateValidators.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/services/updateValidators.js
new file mode 100644
index 0000000..162ea73
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/services/updateValidators.js
@@ -0,0 +1,100 @@
+/*!
+ * Module dependencies.
+ */
+
+var Mixed = require('../schema/mixed');
+var ValidationError = require('../error/validation');
+var parallel = require('async/parallel');
+var flatten = require('./common').flatten;
+var modifiedPaths = require('./common').modifiedPaths;
+
+/**
+ * Applies validators and defaults to update and findOneAndUpdate operations,
+ * specifically passing a null doc as `this` to validators and defaults
+ *
+ * @param {Query} query
+ * @param {Schema} schema
+ * @param {Object} castedDoc
+ * @param {Object} options
+ * @method runValidatorsOnUpdate
+ * @api private
+ */
+
+module.exports = function(query, schema, castedDoc, options) {
+ var keys = Object.keys(castedDoc || {});
+ var updatedKeys = {};
+ var updatedValues = {};
+ var numKeys = keys.length;
+ var hasDollarUpdate = false;
+ var modified = {};
+
+ for (var i = 0; i < numKeys; ++i) {
+ if (keys[i].charAt(0) === '$') {
+ modifiedPaths(castedDoc[keys[i]], '', modified);
+ var flat = flatten(castedDoc[keys[i]]);
+ var paths = Object.keys(flat);
+ var numPaths = paths.length;
+ for (var j = 0; j < numPaths; ++j) {
+ var updatedPath = paths[j].replace('.$.', '.0.');
+ updatedPath = updatedPath.replace(/\.\$$/, '.0');
+ if (keys[i] === '$set' || keys[i] === '$setOnInsert') {
+ updatedValues[updatedPath] = flat[paths[j]];
+ } else if (keys[i] === '$unset') {
+ updatedValues[updatedPath] = undefined;
+ }
+ updatedKeys[updatedPath] = true;
+ }
+ hasDollarUpdate = true;
+ }
+ }
+
+ if (!hasDollarUpdate) {
+ modifiedPaths(castedDoc, '', modified);
+ updatedValues = flatten(castedDoc);
+ updatedKeys = Object.keys(updatedValues);
+ }
+
+ var updates = Object.keys(updatedValues);
+ var numUpdates = updates.length;
+ var validatorsToExecute = [];
+ var validationErrors = [];
+ function iter(i) {
+ var schemaPath = schema._getSchema(updates[i]);
+ if (schemaPath) {
+ // gh-4305: `_getSchema()` will report all sub-fields of a 'Mixed' path
+ // as 'Mixed', so avoid double validating them.
+ if (schemaPath instanceof Mixed && schemaPath.$fullPath !== updates[i]) {
+ return;
+ }
+ validatorsToExecute.push(function(callback) {
+ schemaPath.doValidate(
+ updatedValues[updates[i]],
+ function(err) {
+ if (err) {
+ err.path = updates[i];
+ validationErrors.push(err);
+ }
+ callback(null);
+ },
+ options && options.context === 'query' ? query : null,
+ {updateValidator: true});
+ });
+ }
+ }
+ for (i = 0; i < numUpdates; ++i) {
+ iter(i);
+ }
+
+ return function(callback) {
+ parallel(validatorsToExecute, function() {
+ if (validationErrors.length) {
+ var err = new ValidationError(null);
+ for (var i = 0; i < validationErrors.length; ++i) {
+ err.errors[validationErrors[i].path] = validationErrors[i];
+ }
+ return callback(err);
+ }
+ callback(null);
+ });
+ };
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/statemachine.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/statemachine.js
new file mode 100644
index 0000000..3bba519
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/statemachine.js
@@ -0,0 +1,178 @@
+
+/*!
+ * Module dependencies.
+ */
+
+var utils = require('./utils');
+
+/*!
+ * StateMachine represents a minimal `interface` for the
+ * constructors it builds via StateMachine.ctor(...).
+ *
+ * @api private
+ */
+
+var StateMachine = module.exports = exports = function StateMachine() {
+};
+
+/*!
+ * StateMachine.ctor('state1', 'state2', ...)
+ * A factory method for subclassing StateMachine.
+ * The arguments are a list of states. For each state,
+ * the constructor's prototype gets state transition
+ * methods named after each state. These transition methods
+ * place their path argument into the given state.
+ *
+ * @param {String} state
+ * @param {String} [state]
+ * @return {Function} subclass constructor
+ * @private
+ */
+
+StateMachine.ctor = function() {
+ var states = utils.args(arguments);
+
+ var ctor = function() {
+ StateMachine.apply(this, arguments);
+ this.paths = {};
+ this.states = {};
+ this.stateNames = states;
+
+ var i = states.length,
+ state;
+
+ while (i--) {
+ state = states[i];
+ this.states[state] = {};
+ }
+ };
+
+ ctor.prototype = new StateMachine();
+
+ states.forEach(function(state) {
+ // Changes the `path`'s state to `state`.
+ ctor.prototype[state] = function(path) {
+ this._changeState(path, state);
+ };
+ });
+
+ return ctor;
+};
+
+/*!
+ * This function is wrapped by the state change functions:
+ *
+ * - `require(path)`
+ * - `modify(path)`
+ * - `init(path)`
+ *
+ * @api private
+ */
+
+StateMachine.prototype._changeState = function _changeState(path, nextState) {
+ var prevBucket = this.states[this.paths[path]];
+ if (prevBucket) delete prevBucket[path];
+
+ this.paths[path] = nextState;
+ this.states[nextState][path] = true;
+};
+
+/*!
+ * ignore
+ */
+
+StateMachine.prototype.clear = function clear(state) {
+ var keys = Object.keys(this.states[state]),
+ i = keys.length,
+ path;
+
+ while (i--) {
+ path = keys[i];
+ delete this.states[state][path];
+ delete this.paths[path];
+ }
+};
+
+/*!
+ * Checks to see if at least one path is in the states passed in via `arguments`
+ * e.g., this.some('required', 'inited')
+ *
+ * @param {String} state that we want to check for.
+ * @private
+ */
+
+StateMachine.prototype.some = function some() {
+ var _this = this;
+ var what = arguments.length ? arguments : this.stateNames;
+ return Array.prototype.some.call(what, function(state) {
+ return Object.keys(_this.states[state]).length;
+ });
+};
+
+/*!
+ * This function builds the functions that get assigned to `forEach` and `map`,
+ * since both of those methods share a lot of the same logic.
+ *
+ * @param {String} iterMethod is either 'forEach' or 'map'
+ * @return {Function}
+ * @api private
+ */
+
+StateMachine.prototype._iter = function _iter(iterMethod) {
+ return function() {
+ var numArgs = arguments.length,
+ states = utils.args(arguments, 0, numArgs - 1),
+ callback = arguments[numArgs - 1];
+
+ if (!states.length) states = this.stateNames;
+
+ var _this = this;
+
+ var paths = states.reduce(function(paths, state) {
+ return paths.concat(Object.keys(_this.states[state]));
+ }, []);
+
+ return paths[iterMethod](function(path, i, paths) {
+ return callback(path, i, paths);
+ });
+ };
+};
+
+/*!
+ * Iterates over the paths that belong to one of the parameter states.
+ *
+ * The function profile can look like:
+ * this.forEach(state1, fn); // iterates over all paths in state1
+ * this.forEach(state1, state2, fn); // iterates over all paths in state1 or state2
+ * this.forEach(fn); // iterates over all paths in all states
+ *
+ * @param {String} [state]
+ * @param {String} [state]
+ * @param {Function} callback
+ * @private
+ */
+
+StateMachine.prototype.forEach = function forEach() {
+ this.forEach = this._iter('forEach');
+ return this.forEach.apply(this, arguments);
+};
+
+/*!
+ * Maps over the paths that belong to one of the parameter states.
+ *
+ * The function profile can look like:
+ * this.forEach(state1, fn); // iterates over all paths in state1
+ * this.forEach(state1, state2, fn); // iterates over all paths in state1 or state2
+ * this.forEach(fn); // iterates over all paths in all states
+ *
+ * @param {String} [state]
+ * @param {String} [state]
+ * @param {Function} callback
+ * @return {Array}
+ * @private
+ */
+
+StateMachine.prototype.map = function map() {
+ this.map = this._iter('map');
+ return this.map.apply(this, arguments);
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/array.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/array.js
new file mode 100644
index 0000000..715b6b6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/array.js
@@ -0,0 +1,778 @@
+/*!
+ * Module dependencies.
+ */
+
+var EmbeddedDocument = require('./embedded');
+var Document = require('../document');
+var ObjectId = require('./objectid');
+var utils = require('../utils');
+var isMongooseObject = utils.isMongooseObject;
+
+/**
+ * Mongoose Array constructor.
+ *
+ * ####NOTE:
+ *
+ * _Values always have to be passed to the constructor to initialize, otherwise `MongooseArray#push` will mark the array as modified._
+ *
+ * @param {Array} values
+ * @param {String} path
+ * @param {Document} doc parent document
+ * @api private
+ * @inherits Array
+ * @see http://bit.ly/f6CnZU
+ */
+
+function MongooseArray(values, path, doc) {
+ var arr = [].concat(values);
+
+ var keysMA = Object.keys(MongooseArray.mixin);
+ var numKeys = keysMA.length;
+ for (var i = 0; i < numKeys; ++i) {
+ arr[keysMA[i]] = MongooseArray.mixin[keysMA[i]];
+ }
+
+ arr._path = path;
+ arr.isMongooseArray = true;
+ arr.validators = [];
+ arr._atomics = {};
+ arr._schema = void 0;
+
+ // Because doc comes from the context of another function, doc === global
+ // can happen if there was a null somewhere up the chain (see #3020)
+ // RB Jun 17, 2015 updated to check for presence of expected paths instead
+ // to make more proof against unusual node environments
+ if (doc && doc instanceof Document) {
+ arr._parent = doc;
+ arr._schema = doc.schema.path(path);
+ }
+
+ return arr;
+}
+
+MongooseArray.mixin = {
+ /*!
+ * ignore
+ */
+ toBSON: function() {
+ return this.toObject({ transform: false });
+ },
+
+ /**
+ * Stores a queue of atomic operations to perform
+ *
+ * @property _atomics
+ * @api private
+ */
+
+ _atomics: undefined,
+
+ /**
+ * Parent owner document
+ *
+ * @property _parent
+ * @api private
+ * @receiver MongooseArray
+ */
+
+ _parent: undefined,
+
+ /**
+ * Casts a member based on this arrays schema.
+ *
+ * @param {any} value
+ * @return value the casted value
+ * @method _cast
+ * @api private
+ * @receiver MongooseArray
+ */
+
+ _cast: function(value) {
+ var populated = false;
+ var Model;
+
+ if (this._parent) {
+ populated = this._parent.populated(this._path, true);
+ }
+
+ if (populated && value !== null && value !== undefined) {
+ // cast to the populated Models schema
+ Model = populated.options.model;
+
+ // only objects are permitted so we can safely assume that
+ // non-objects are to be interpreted as _id
+ if (Buffer.isBuffer(value) ||
+ value instanceof ObjectId || !utils.isObject(value)) {
+ value = {_id: value};
+ }
+
+ // gh-2399
+ // we should cast model only when it's not a discriminator
+ var isDisc = value.schema && value.schema.discriminatorMapping &&
+ value.schema.discriminatorMapping.key !== undefined;
+ if (!isDisc) {
+ value = new Model(value);
+ }
+ return this._schema.caster.cast(value, this._parent, true);
+ }
+
+ return this._schema.caster.cast(value, this._parent, false);
+ },
+
+ /**
+ * Marks this array as modified.
+ *
+ * If it bubbles up from an embedded document change, then it takes the following arguments (otherwise, takes 0 arguments)
+ *
+ * @param {EmbeddedDocument} embeddedDoc the embedded doc that invoked this method on the Array
+ * @param {String} embeddedPath the path which changed in the embeddedDoc
+ * @method _markModified
+ * @api private
+ * @receiver MongooseArray
+ */
+
+ _markModified: function(elem, embeddedPath) {
+ var parent = this._parent,
+ dirtyPath;
+
+ if (parent) {
+ dirtyPath = this._path;
+
+ if (arguments.length) {
+ if (embeddedPath != null) {
+ // an embedded doc bubbled up the change
+ dirtyPath = dirtyPath + '.' + this.indexOf(elem) + '.' + embeddedPath;
+ } else {
+ // directly set an index
+ dirtyPath = dirtyPath + '.' + elem;
+ }
+ }
+
+ parent.markModified(dirtyPath);
+ }
+
+ return this;
+ },
+
+ /**
+ * Register an atomic operation with the parent.
+ *
+ * @param {Array} op operation
+ * @param {any} val
+ * @method _registerAtomic
+ * @api private
+ * @receiver MongooseArray
+ */
+
+ _registerAtomic: function(op, val) {
+ if (op === '$set') {
+ // $set takes precedence over all other ops.
+ // mark entire array modified.
+ this._atomics = {$set: val};
+ return this;
+ }
+
+ var atomics = this._atomics;
+
+ // reset pop/shift after save
+ if (op === '$pop' && !('$pop' in atomics)) {
+ var _this = this;
+ this._parent.once('save', function() {
+ _this._popped = _this._shifted = null;
+ });
+ }
+
+ // check for impossible $atomic combos (Mongo denies more than one
+ // $atomic op on a single path
+ if (this._atomics.$set ||
+ Object.keys(atomics).length && !(op in atomics)) {
+ // a different op was previously registered.
+ // save the entire thing.
+ this._atomics = {$set: this};
+ return this;
+ }
+
+ var selector;
+
+ if (op === '$pullAll' || op === '$pushAll' || op === '$addToSet') {
+ atomics[op] || (atomics[op] = []);
+ atomics[op] = atomics[op].concat(val);
+ } else if (op === '$pullDocs') {
+ var pullOp = atomics['$pull'] || (atomics['$pull'] = {});
+ if (val[0] instanceof EmbeddedDocument) {
+ selector = pullOp['$or'] || (pullOp['$or'] = []);
+ Array.prototype.push.apply(selector, val.map(function(v) {
+ return v.toObject({transform: false});
+ }));
+ } else {
+ selector = pullOp['_id'] || (pullOp['_id'] = {$in: []});
+ selector['$in'] = selector['$in'].concat(val);
+ }
+ } else {
+ atomics[op] = val;
+ }
+
+ return this;
+ },
+
+ /**
+ * Depopulates stored atomic operation values as necessary for direct insertion to MongoDB.
+ *
+ * If no atomics exist, we return all array values after conversion.
+ *
+ * @return {Array}
+ * @method $__getAtomics
+ * @memberOf MongooseArray
+ * @api private
+ */
+
+ $__getAtomics: function() {
+ var ret = [];
+ var keys = Object.keys(this._atomics);
+ var i = keys.length;
+
+ if (i === 0) {
+ ret[0] = ['$set', this.toObject({depopulate: 1, transform: false, _isNested: true})];
+ return ret;
+ }
+
+ while (i--) {
+ var op = keys[i];
+ var val = this._atomics[op];
+
+ // the atomic values which are arrays are not MongooseArrays. we
+ // need to convert their elements as if they were MongooseArrays
+ // to handle populated arrays versus DocumentArrays properly.
+ if (isMongooseObject(val)) {
+ val = val.toObject({depopulate: 1, transform: false, _isNested: true});
+ } else if (Array.isArray(val)) {
+ val = this.toObject.call(val, {depopulate: 1, transform: false, _isNested: true});
+ } else if (val.valueOf) {
+ val = val.valueOf();
+ }
+
+ if (op === '$addToSet') {
+ val = {$each: val};
+ }
+
+ ret.push([op, val]);
+ }
+
+ return ret;
+ },
+
+ /**
+ * Returns the number of pending atomic operations to send to the db for this array.
+ *
+ * @api private
+ * @return {Number}
+ * @method hasAtomics
+ * @receiver MongooseArray
+ */
+
+ hasAtomics: function hasAtomics() {
+ if (!(this._atomics && this._atomics.constructor.name === 'Object')) {
+ return 0;
+ }
+
+ return Object.keys(this._atomics).length;
+ },
+
+ /**
+ * Internal helper for .map()
+ *
+ * @api private
+ * @return {Number}
+ * @method _mapCast
+ * @receiver MongooseArray
+ */
+ _mapCast: function(val, index) {
+ return this._cast(val, this.length + index);
+ },
+
+ /**
+ * Wraps [`Array#push`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/push) with proper change tracking.
+ *
+ * @param {Object} [args...]
+ * @api public
+ * @method push
+ * @receiver MongooseArray
+ */
+
+ push: function() {
+ var values = [].map.call(arguments, this._mapCast, this);
+ values = this._schema.applySetters(values, this._parent, undefined,
+ undefined, {skipDocumentArrayCast: true});
+ var ret = [].push.apply(this, values);
+
+ // $pushAll might be fibbed (could be $push). But it makes it easier to
+ // handle what could have been $push, $pushAll combos
+ this._registerAtomic('$pushAll', values);
+ this._markModified();
+ return ret;
+ },
+
+ /**
+ * Pushes items to the array non-atomically.
+ *
+ * ####NOTE:
+ *
+ * _marks the entire array as modified, which if saved, will store it as a `$set` operation, potentially overwritting any changes that happen between when you retrieved the object and when you save it._
+ *
+ * @param {any} [args...]
+ * @api public
+ * @method nonAtomicPush
+ * @receiver MongooseArray
+ */
+
+ nonAtomicPush: function() {
+ var values = [].map.call(arguments, this._mapCast, this);
+ var ret = [].push.apply(this, values);
+ this._registerAtomic('$set', this);
+ this._markModified();
+ return ret;
+ },
+
+ /**
+ * Pops the array atomically at most one time per document `save()`.
+ *
+ * #### NOTE:
+ *
+ * _Calling this mulitple times on an array before saving sends the same command as calling it once._
+ * _This update is implemented using the MongoDB [$pop](http://www.mongodb.org/display/DOCS/Updating/#Updating-%24pop) method which enforces this restriction._
+ *
+ * doc.array = [1,2,3];
+ *
+ * var popped = doc.array.$pop();
+ * console.log(popped); // 3
+ * console.log(doc.array); // [1,2]
+ *
+ * // no affect
+ * popped = doc.array.$pop();
+ * console.log(doc.array); // [1,2]
+ *
+ * doc.save(function (err) {
+ * if (err) return handleError(err);
+ *
+ * // we saved, now $pop works again
+ * popped = doc.array.$pop();
+ * console.log(popped); // 2
+ * console.log(doc.array); // [1]
+ * })
+ *
+ * @api public
+ * @method $pop
+ * @memberOf MongooseArray
+ * @see mongodb http://www.mongodb.org/display/DOCS/Updating/#Updating-%24pop
+ * @method $pop
+ * @receiver MongooseArray
+ */
+
+ $pop: function() {
+ this._registerAtomic('$pop', 1);
+ this._markModified();
+
+ // only allow popping once
+ if (this._popped) {
+ return;
+ }
+ this._popped = true;
+
+ return [].pop.call(this);
+ },
+
+ /**
+ * Wraps [`Array#pop`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/pop) with proper change tracking.
+ *
+ * ####Note:
+ *
+ * _marks the entire array as modified which will pass the entire thing to $set potentially overwritting any changes that happen between when you retrieved the object and when you save it._
+ *
+ * @see MongooseArray#$pop #types_array_MongooseArray-%24pop
+ * @api public
+ * @method pop
+ * @receiver MongooseArray
+ */
+
+ pop: function() {
+ var ret = [].pop.call(this);
+ this._registerAtomic('$set', this);
+ this._markModified();
+ return ret;
+ },
+
+ /**
+ * Atomically shifts the array at most one time per document `save()`.
+ *
+ * ####NOTE:
+ *
+ * _Calling this mulitple times on an array before saving sends the same command as calling it once._
+ * _This update is implemented using the MongoDB [$pop](http://www.mongodb.org/display/DOCS/Updating/#Updating-%24pop) method which enforces this restriction._
+ *
+ * doc.array = [1,2,3];
+ *
+ * var shifted = doc.array.$shift();
+ * console.log(shifted); // 1
+ * console.log(doc.array); // [2,3]
+ *
+ * // no affect
+ * shifted = doc.array.$shift();
+ * console.log(doc.array); // [2,3]
+ *
+ * doc.save(function (err) {
+ * if (err) return handleError(err);
+ *
+ * // we saved, now $shift works again
+ * shifted = doc.array.$shift();
+ * console.log(shifted ); // 2
+ * console.log(doc.array); // [3]
+ * })
+ *
+ * @api public
+ * @memberOf MongooseArray
+ * @method $shift
+ * @see mongodb http://www.mongodb.org/display/DOCS/Updating/#Updating-%24pop
+ */
+
+ $shift: function $shift() {
+ this._registerAtomic('$pop', -1);
+ this._markModified();
+
+ // only allow shifting once
+ if (this._shifted) {
+ return;
+ }
+ this._shifted = true;
+
+ return [].shift.call(this);
+ },
+
+ /**
+ * Wraps [`Array#shift`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/unshift) with proper change tracking.
+ *
+ * ####Example:
+ *
+ * doc.array = [2,3];
+ * var res = doc.array.shift();
+ * console.log(res) // 2
+ * console.log(doc.array) // [3]
+ *
+ * ####Note:
+ *
+ * _marks the entire array as modified, which if saved, will store it as a `$set` operation, potentially overwritting any changes that happen between when you retrieved the object and when you save it._
+ *
+ * @api public
+ * @method shift
+ * @receiver MongooseArray
+ */
+
+ shift: function() {
+ var ret = [].shift.call(this);
+ this._registerAtomic('$set', this);
+ this._markModified();
+ return ret;
+ },
+
+ /**
+ * Pulls items from the array atomically. Equality is determined by casting
+ * the provided value to an embedded document and comparing using
+ * [the `Document.equals()` function.](./api.html#document_Document-equals)
+ *
+ * ####Examples:
+ *
+ * doc.array.pull(ObjectId)
+ * doc.array.pull({ _id: 'someId' })
+ * doc.array.pull(36)
+ * doc.array.pull('tag 1', 'tag 2')
+ *
+ * To remove a document from a subdocument array we may pass an object with a matching `_id`.
+ *
+ * doc.subdocs.push({ _id: 4815162342 })
+ * doc.subdocs.pull({ _id: 4815162342 }) // removed
+ *
+ * Or we may passing the _id directly and let mongoose take care of it.
+ *
+ * doc.subdocs.push({ _id: 4815162342 })
+ * doc.subdocs.pull(4815162342); // works
+ *
+ * The first pull call will result in a atomic operation on the database, if pull is called repeatedly without saving the document, a $set operation is used on the complete array instead, overwriting possible changes that happened on the database in the meantime.
+ *
+ * @param {any} [args...]
+ * @see mongodb http://www.mongodb.org/display/DOCS/Updating/#Updating-%24pull
+ * @api public
+ * @method pull
+ * @receiver MongooseArray
+ */
+
+ pull: function() {
+ var values = [].map.call(arguments, this._cast, this),
+ cur = this._parent.get(this._path),
+ i = cur.length,
+ mem;
+
+ while (i--) {
+ mem = cur[i];
+ if (mem instanceof Document) {
+ var some = values.some(function(v) {
+ return mem.equals(v);
+ });
+ if (some) {
+ [].splice.call(cur, i, 1);
+ }
+ } else if (~cur.indexOf.call(values, mem)) {
+ [].splice.call(cur, i, 1);
+ }
+ }
+
+ if (values[0] instanceof EmbeddedDocument) {
+ this._registerAtomic('$pullDocs', values.map(function(v) {
+ return v._id || v;
+ }));
+ } else {
+ this._registerAtomic('$pullAll', values);
+ }
+
+ this._markModified();
+ return this;
+ },
+
+ /**
+ * Wraps [`Array#splice`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/splice) with proper change tracking and casting.
+ *
+ * ####Note:
+ *
+ * _marks the entire array as modified, which if saved, will store it as a `$set` operation, potentially overwritting any changes that happen between when you retrieved the object and when you save it._
+ *
+ * @api public
+ * @method splice
+ * @receiver MongooseArray
+ */
+
+ splice: function splice() {
+ var ret, vals, i;
+
+ if (arguments.length) {
+ vals = [];
+ for (i = 0; i < arguments.length; ++i) {
+ vals[i] = i < 2
+ ? arguments[i]
+ : this._cast(arguments[i], arguments[0] + (i - 2));
+ }
+ ret = [].splice.apply(this, vals);
+ this._registerAtomic('$set', this);
+ this._markModified();
+ }
+
+ return ret;
+ },
+
+ /**
+ * Wraps [`Array#unshift`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/unshift) with proper change tracking.
+ *
+ * ####Note:
+ *
+ * _marks the entire array as modified, which if saved, will store it as a `$set` operation, potentially overwritting any changes that happen between when you retrieved the object and when you save it._
+ *
+ * @api public
+ * @method unshift
+ * @receiver MongooseArray
+ */
+
+ unshift: function() {
+ var values = [].map.call(arguments, this._cast, this);
+ values = this._schema.applySetters(values, this._parent);
+ [].unshift.apply(this, values);
+ this._registerAtomic('$set', this);
+ this._markModified();
+ return this.length;
+ },
+
+ /**
+ * Wraps [`Array#sort`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/sort) with proper change tracking.
+ *
+ * ####NOTE:
+ *
+ * _marks the entire array as modified, which if saved, will store it as a `$set` operation, potentially overwritting any changes that happen between when you retrieved the object and when you save it._
+ *
+ * @api public
+ * @method sort
+ * @receiver MongooseArray
+ */
+
+ sort: function() {
+ var ret = [].sort.apply(this, arguments);
+ this._registerAtomic('$set', this);
+ this._markModified();
+ return ret;
+ },
+
+ /**
+ * Adds values to the array if not already present.
+ *
+ * ####Example:
+ *
+ * console.log(doc.array) // [2,3,4]
+ * var added = doc.array.addToSet(4,5);
+ * console.log(doc.array) // [2,3,4,5]
+ * console.log(added) // [5]
+ *
+ * @param {any} [args...]
+ * @return {Array} the values that were added
+ * @receiver MongooseArray
+ * @api public
+ * @method addToSet
+ */
+
+ addToSet: function addToSet() {
+ var values = [].map.call(arguments, this._mapCast, this);
+ values = this._schema.applySetters(values, this._parent);
+ var added = [];
+ var type = '';
+ if (values[0] instanceof EmbeddedDocument) {
+ type = 'doc';
+ } else if (values[0] instanceof Date) {
+ type = 'date';
+ }
+
+ values.forEach(function(v) {
+ var found;
+ switch (type) {
+ case 'doc':
+ found = this.some(function(doc) {
+ return doc.equals(v);
+ });
+ break;
+ case 'date':
+ var val = +v;
+ found = this.some(function(d) {
+ return +d === val;
+ });
+ break;
+ default:
+ found = ~this.indexOf(v);
+ }
+
+ if (!found) {
+ [].push.call(this, v);
+ this._registerAtomic('$addToSet', v);
+ this._markModified();
+ [].push.call(added, v);
+ }
+ }, this);
+
+ return added;
+ },
+
+ /**
+ * Sets the casted `val` at index `i` and marks the array modified.
+ *
+ * ####Example:
+ *
+ * // given documents based on the following
+ * var Doc = mongoose.model('Doc', new Schema({ array: [Number] }));
+ *
+ * var doc = new Doc({ array: [2,3,4] })
+ *
+ * console.log(doc.array) // [2,3,4]
+ *
+ * doc.array.set(1,"5");
+ * console.log(doc.array); // [2,5,4] // properly cast to number
+ * doc.save() // the change is saved
+ *
+ * // VS not using array#set
+ * doc.array[1] = "5";
+ * console.log(doc.array); // [2,"5",4] // no casting
+ * doc.save() // change is not saved
+ *
+ * @return {Array} this
+ * @api public
+ * @method set
+ * @receiver MongooseArray
+ */
+
+ set: function set(i, val) {
+ var value = this._cast(val, i);
+ value = this._schema.caster instanceof EmbeddedDocument ?
+ value :
+ this._schema.caster.applySetters(val, this._parent)
+ ;
+ this[i] = value;
+ this._markModified(i);
+ return this;
+ },
+
+ /**
+ * Returns a native js Array.
+ *
+ * @param {Object} options
+ * @return {Array}
+ * @api public
+ * @method toObject
+ * @receiver MongooseArray
+ */
+
+ toObject: function(options) {
+ if (options && options.depopulate) {
+ options._isNested = true;
+ return this.map(function(doc) {
+ return doc instanceof Document
+ ? doc.toObject(options)
+ : doc;
+ });
+ }
+
+ return this.slice();
+ },
+
+ /**
+ * Helper for console.log
+ *
+ * @api public
+ * @method inspect
+ * @receiver MongooseArray
+ */
+
+ inspect: function() {
+ return JSON.stringify(this);
+ },
+
+ /**
+ * Return the index of `obj` or `-1` if not found.
+ *
+ * @param {Object} obj the item to look for
+ * @return {Number}
+ * @api public
+ * @method indexOf
+ * @receiver MongooseArray
+ */
+
+ indexOf: function indexOf(obj) {
+ if (obj instanceof ObjectId) {
+ obj = obj.toString();
+ }
+ for (var i = 0, len = this.length; i < len; ++i) {
+ if (obj == this[i]) {
+ return i;
+ }
+ }
+ return -1;
+ }
+};
+
+/**
+ * Alias of [pull](#types_array_MongooseArray-pull)
+ *
+ * @see MongooseArray#pull #types_array_MongooseArray-pull
+ * @see mongodb http://www.mongodb.org/display/DOCS/Updating/#Updating-%24pull
+ * @api public
+ * @memberOf MongooseArray
+ * @method remove
+ */
+
+MongooseArray.mixin.remove = MongooseArray.mixin.pull;
+
+/*!
+ * Module exports.
+ */
+
+module.exports = exports = MongooseArray;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/buffer.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/buffer.js
new file mode 100644
index 0000000..8be67c8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/buffer.js
@@ -0,0 +1,273 @@
+/*!
+ * Module dependencies.
+ */
+
+var Binary = require('../drivers').Binary,
+ utils = require('../utils');
+
+/**
+ * Mongoose Buffer constructor.
+ *
+ * Values always have to be passed to the constructor to initialize.
+ *
+ * @param {Buffer} value
+ * @param {String} encode
+ * @param {Number} offset
+ * @api private
+ * @inherits Buffer
+ * @see http://bit.ly/f6CnZU
+ */
+
+function MongooseBuffer(value, encode, offset) {
+ var length = arguments.length;
+ var val;
+
+ if (length === 0 || arguments[0] === null || arguments[0] === undefined) {
+ val = 0;
+ } else {
+ val = value;
+ }
+
+ var encoding;
+ var path;
+ var doc;
+
+ if (Array.isArray(encode)) {
+ // internal casting
+ path = encode[0];
+ doc = encode[1];
+ } else {
+ encoding = encode;
+ }
+
+ var buf = new Buffer(val, encoding, offset);
+ utils.decorate(buf, MongooseBuffer.mixin);
+ buf.isMongooseBuffer = true;
+
+ // make sure these internal props don't show up in Object.keys()
+ Object.defineProperties(buf, {
+ validators: {value: []},
+ _path: {value: path},
+ _parent: {value: doc}
+ });
+
+ if (doc && typeof path === 'string') {
+ Object.defineProperty(buf, '_schema', {
+ value: doc.schema.path(path)
+ });
+ }
+
+ buf._subtype = 0;
+ return buf;
+}
+
+/*!
+ * Inherit from Buffer.
+ */
+
+// MongooseBuffer.prototype = new Buffer(0);
+
+MongooseBuffer.mixin = {
+
+ /**
+ * Parent owner document
+ *
+ * @api private
+ * @property _parent
+ * @receiver MongooseBuffer
+ */
+
+ _parent: undefined,
+
+ /**
+ * Default subtype for the Binary representing this Buffer
+ *
+ * @api private
+ * @property _subtype
+ * @receiver MongooseBuffer
+ */
+
+ _subtype: undefined,
+
+ /**
+ * Marks this buffer as modified.
+ *
+ * @api private
+ * @method _markModified
+ * @receiver MongooseBuffer
+ */
+
+ _markModified: function() {
+ var parent = this._parent;
+
+ if (parent) {
+ parent.markModified(this._path);
+ }
+ return this;
+ },
+
+ /**
+ * Writes the buffer.
+ *
+ * @api public
+ * @method write
+ * @receiver MongooseBuffer
+ */
+
+ write: function() {
+ var written = Buffer.prototype.write.apply(this, arguments);
+
+ if (written > 0) {
+ this._markModified();
+ }
+
+ return written;
+ },
+
+ /**
+ * Copies the buffer.
+ *
+ * ####Note:
+ *
+ * `Buffer#copy` does not mark `target` as modified so you must copy from a `MongooseBuffer` for it to work as expected. This is a work around since `copy` modifies the target, not this.
+ *
+ * @return {Number} The number of bytes copied.
+ * @param {Buffer} target
+ * @method copy
+ * @receiver MongooseBuffer
+ */
+
+ copy: function(target) {
+ var ret = Buffer.prototype.copy.apply(this, arguments);
+
+ if (target && target.isMongooseBuffer) {
+ target._markModified();
+ }
+
+ return ret;
+ }
+};
+
+/*!
+ * Compile other Buffer methods marking this buffer as modified.
+ */
+
+(
+// node < 0.5
+ 'writeUInt8 writeUInt16 writeUInt32 writeInt8 writeInt16 writeInt32 ' +
+ 'writeFloat writeDouble fill ' +
+ 'utf8Write binaryWrite asciiWrite set ' +
+
+// node >= 0.5
+ 'writeUInt16LE writeUInt16BE writeUInt32LE writeUInt32BE ' +
+ 'writeInt16LE writeInt16BE writeInt32LE writeInt32BE ' +
+ 'writeFloatLE writeFloatBE writeDoubleLE writeDoubleBE'
+).split(' ').forEach(function(method) {
+ if (!Buffer.prototype[method]) {
+ return;
+ }
+ MongooseBuffer.mixin[method] = function() {
+ var ret = Buffer.prototype[method].apply(this, arguments);
+ this._markModified();
+ return ret;
+ };
+});
+
+/**
+ * Converts this buffer to its Binary type representation.
+ *
+ * ####SubTypes:
+ *
+ * var bson = require('bson')
+ * bson.BSON_BINARY_SUBTYPE_DEFAULT
+ * bson.BSON_BINARY_SUBTYPE_FUNCTION
+ * bson.BSON_BINARY_SUBTYPE_BYTE_ARRAY
+ * bson.BSON_BINARY_SUBTYPE_UUID
+ * bson.BSON_BINARY_SUBTYPE_MD5
+ * bson.BSON_BINARY_SUBTYPE_USER_DEFINED
+ *
+ * doc.buffer.toObject(bson.BSON_BINARY_SUBTYPE_USER_DEFINED);
+ *
+ * @see http://bsonspec.org/#/specification
+ * @param {Hex} [subtype]
+ * @return {Binary}
+ * @api public
+ * @method toObject
+ * @receiver MongooseBuffer
+ */
+
+MongooseBuffer.mixin.toObject = function(options) {
+ var subtype = typeof options === 'number'
+ ? options
+ : (this._subtype || 0);
+ return new Binary(this, subtype);
+};
+
+/**
+ * Determines if this buffer is equals to `other` buffer
+ *
+ * @param {Buffer} other
+ * @return {Boolean}
+ * @method equals
+ * @receiver MongooseBuffer
+ */
+
+MongooseBuffer.mixin.equals = function(other) {
+ if (!Buffer.isBuffer(other)) {
+ return false;
+ }
+
+ if (this.length !== other.length) {
+ return false;
+ }
+
+ for (var i = 0; i < this.length; ++i) {
+ if (this[i] !== other[i]) {
+ return false;
+ }
+ }
+
+ return true;
+};
+
+/**
+ * Sets the subtype option and marks the buffer modified.
+ *
+ * ####SubTypes:
+ *
+ * var bson = require('bson')
+ * bson.BSON_BINARY_SUBTYPE_DEFAULT
+ * bson.BSON_BINARY_SUBTYPE_FUNCTION
+ * bson.BSON_BINARY_SUBTYPE_BYTE_ARRAY
+ * bson.BSON_BINARY_SUBTYPE_UUID
+ * bson.BSON_BINARY_SUBTYPE_MD5
+ * bson.BSON_BINARY_SUBTYPE_USER_DEFINED
+ *
+ * doc.buffer.subtype(bson.BSON_BINARY_SUBTYPE_UUID);
+ *
+ * @see http://bsonspec.org/#/specification
+ * @param {Hex} subtype
+ * @api public
+ * @method subtype
+ * @receiver MongooseBuffer
+ */
+
+MongooseBuffer.mixin.subtype = function(subtype) {
+ if (typeof subtype !== 'number') {
+ throw new TypeError('Invalid subtype. Expected a number');
+ }
+
+ if (this._subtype !== subtype) {
+ this._markModified();
+ }
+
+ this._subtype = subtype;
+};
+
+/*!
+ * Module exports.
+ */
+
+MongooseBuffer.Binary = Binary;
+
+module.exports = MongooseBuffer;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/documentarray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/documentarray.js
new file mode 100644
index 0000000..f6fb227
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/documentarray.js
@@ -0,0 +1,256 @@
+/*!
+ * Module dependencies.
+ */
+
+var MongooseArray = require('./array'),
+ ObjectId = require('./objectid'),
+ ObjectIdSchema = require('../schema/objectid'),
+ utils = require('../utils'),
+ Document = require('../document');
+
+/**
+ * DocumentArray constructor
+ *
+ * @param {Array} values
+ * @param {String} path the path to this array
+ * @param {Document} doc parent document
+ * @api private
+ * @return {MongooseDocumentArray}
+ * @inherits MongooseArray
+ * @see http://bit.ly/f6CnZU
+ */
+
+function MongooseDocumentArray(values, path, doc) {
+ var arr = [].concat(values);
+ arr._path = path;
+
+ var props = {
+ isMongooseArray: true,
+ isMongooseDocumentArray: true,
+ validators: [],
+ _atomics: {},
+ _schema: void 0,
+ _handlers: void 0
+ };
+
+ // Values always have to be passed to the constructor to initialize, since
+ // otherwise MongooseArray#push will mark the array as modified to the parent.
+ var keysMA = Object.keys(MongooseArray.mixin);
+ var numKeys = keysMA.length;
+ for (var j = 0; j < numKeys; ++j) {
+ arr[keysMA[j]] = MongooseArray.mixin[keysMA[j]];
+ }
+
+ var keysMDA = Object.keys(MongooseDocumentArray.mixin);
+ numKeys = keysMDA.length;
+ for (var i = 0; i < numKeys; ++i) {
+ arr[keysMDA[i]] = MongooseDocumentArray.mixin[keysMDA[i]];
+ }
+
+ var keysP = Object.keys(props);
+ numKeys = keysP.length;
+ for (var k = 0; k < numKeys; ++k) {
+ arr[keysP[k]] = props[keysP[k]];
+ }
+
+ // Because doc comes from the context of another function, doc === global
+ // can happen if there was a null somewhere up the chain (see #3020 && #3034)
+ // RB Jun 17, 2015 updated to check for presence of expected paths instead
+ // to make more proof against unusual node environments
+ if (doc && doc instanceof Document) {
+ arr._parent = doc;
+ arr._schema = doc.schema.path(path);
+ arr._handlers = {
+ isNew: arr.notify('isNew'),
+ save: arr.notify('save')
+ };
+
+ doc.on('save', arr._handlers.save);
+ doc.on('isNew', arr._handlers.isNew);
+ }
+
+ return arr;
+}
+
+/*!
+ * Inherits from MongooseArray
+ */
+// MongooseDocumentArray.mixin = Object.create( MongooseArray.mixin );
+MongooseDocumentArray.mixin = {
+ /*!
+ * ignore
+ */
+ toBSON: function() {
+ return this.toObject({ transform: false });
+ },
+
+ /**
+ * Overrides MongooseArray#cast
+ *
+ * @method _cast
+ * @api private
+ * @receiver MongooseDocumentArray
+ */
+
+ _cast: function(value, index) {
+ if (value instanceof this._schema.casterConstructor) {
+ if (!(value.__parent && value.__parentArray)) {
+ // value may have been created using array.create()
+ value.__parent = this._parent;
+ value.__parentArray = this;
+ }
+ value.__index = index;
+ return value;
+ }
+
+ if (value === undefined || value === null) {
+ return null;
+ }
+
+ // handle cast('string') or cast(ObjectId) etc.
+ // only objects are permitted so we can safely assume that
+ // non-objects are to be interpreted as _id
+ if (Buffer.isBuffer(value) ||
+ value instanceof ObjectId || !utils.isObject(value)) {
+ value = {_id: value};
+ }
+ return new this._schema.casterConstructor(value, this, undefined, undefined, index);
+ },
+
+ /**
+ * Searches array items for the first document with a matching _id.
+ *
+ * ####Example:
+ *
+ * var embeddedDoc = m.array.id(some_id);
+ *
+ * @return {EmbeddedDocument|null} the subdocument or null if not found.
+ * @param {ObjectId|String|Number|Buffer} id
+ * @TODO cast to the _id based on schema for proper comparison
+ * @method id
+ * @api public
+ * @receiver MongooseDocumentArray
+ */
+
+ id: function(id) {
+ var casted,
+ sid,
+ _id;
+
+ try {
+ var casted_ = ObjectIdSchema.prototype.cast.call({}, id);
+ if (casted_) {
+ casted = String(casted_);
+ }
+ } catch (e) {
+ casted = null;
+ }
+
+ for (var i = 0, l = this.length; i < l; i++) {
+ _id = this[i].get('_id');
+
+ if (_id === null || typeof _id === 'undefined') {
+ continue;
+ } else if (_id instanceof Document) {
+ sid || (sid = String(id));
+ if (sid == _id._id) {
+ return this[i];
+ }
+ } else if (!(id instanceof ObjectId) && !(_id instanceof ObjectId)) {
+ if (utils.deepEqual(id, _id)) {
+ return this[i];
+ }
+ } else if (casted == _id) {
+ return this[i];
+ }
+ }
+
+ return null;
+ },
+
+ /**
+ * Returns a native js Array of plain js objects
+ *
+ * ####NOTE:
+ *
+ * _Each sub-document is converted to a plain object by calling its `#toObject` method._
+ *
+ * @param {Object} [options] optional options to pass to each documents `toObject` method call during conversion
+ * @return {Array}
+ * @method toObject
+ * @api public
+ * @receiver MongooseDocumentArray
+ */
+
+ toObject: function(options) {
+ return this.map(function(doc) {
+ return doc && doc.toObject(options) || null;
+ });
+ },
+
+ /**
+ * Helper for console.log
+ *
+ * @method inspect
+ * @api public
+ * @receiver MongooseDocumentArray
+ */
+
+ inspect: function() {
+ return Array.prototype.slice.call(this);
+ },
+
+ /**
+ * Creates a subdocument casted to this schema.
+ *
+ * This is the same subdocument constructor used for casting.
+ *
+ * @param {Object} obj the value to cast to this arrays SubDocument schema
+ * @method create
+ * @api public
+ * @receiver MongooseDocumentArray
+ */
+
+ create: function(obj) {
+ return new this._schema.casterConstructor(obj);
+ },
+
+ /**
+ * Creates a fn that notifies all child docs of `event`.
+ *
+ * @param {String} event
+ * @return {Function}
+ * @method notify
+ * @api private
+ * @receiver MongooseDocumentArray
+ */
+
+ notify: function notify(event) {
+ var _this = this;
+ return function notify(val) {
+ var i = _this.length;
+ while (i--) {
+ if (!_this[i]) {
+ continue;
+ }
+ switch (event) {
+ // only swap for save event for now, we may change this to all event types later
+ case 'save':
+ val = _this[i];
+ break;
+ default:
+ // NO-OP
+ break;
+ }
+ _this[i].emit(event, val);
+ }
+ };
+ }
+
+};
+
+/*!
+ * Module exports.
+ */
+
+module.exports = MongooseDocumentArray;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/embedded.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/embedded.js
new file mode 100644
index 0000000..fbeaf6a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/embedded.js
@@ -0,0 +1,347 @@
+/* eslint no-func-assign: 1 */
+
+/*!
+ * Module dependencies.
+ */
+
+var Document = require('../document_provider')();
+var PromiseProvider = require('../promise_provider');
+
+/**
+ * EmbeddedDocument constructor.
+ *
+ * @param {Object} obj js object returned from the db
+ * @param {MongooseDocumentArray} parentArr the parent array of this document
+ * @param {Boolean} skipId
+ * @inherits Document
+ * @api private
+ */
+
+function EmbeddedDocument(obj, parentArr, skipId, fields, index) {
+ if (parentArr) {
+ this.__parentArray = parentArr;
+ this.__parent = parentArr._parent;
+ } else {
+ this.__parentArray = undefined;
+ this.__parent = undefined;
+ }
+ this.__index = index;
+
+ Document.call(this, obj, fields, skipId);
+
+ var _this = this;
+ this.on('isNew', function(val) {
+ _this.isNew = val;
+ });
+}
+
+/*!
+ * Inherit from Document
+ */
+EmbeddedDocument.prototype = Object.create(Document.prototype);
+EmbeddedDocument.prototype.constructor = EmbeddedDocument;
+
+EmbeddedDocument.prototype.toBSON = function() {
+ return this.toObject({ transform: false });
+};
+
+/**
+ * Marks the embedded doc modified.
+ *
+ * ####Example:
+ *
+ * var doc = blogpost.comments.id(hexstring);
+ * doc.mixed.type = 'changed';
+ * doc.markModified('mixed.type');
+ *
+ * @param {String} path the path which changed
+ * @api public
+ * @receiver EmbeddedDocument
+ */
+
+EmbeddedDocument.prototype.markModified = function(path) {
+ this.$__.activePaths.modify(path);
+ if (!this.__parentArray) {
+ return;
+ }
+
+ if (this.isNew) {
+ // Mark the WHOLE parent array as modified
+ // if this is a new document (i.e., we are initializing
+ // a document),
+ this.__parentArray._markModified();
+ } else {
+ this.__parentArray._markModified(this, path);
+ }
+};
+
+/*!
+ * ignore
+ */
+
+EmbeddedDocument.prototype.populate = function() {
+ throw new Error('Mongoose does not support calling populate() on nested ' +
+ 'docs. Instead of `doc.arr[0].populate("path")`, use ' +
+ '`doc.populate("arr.0.path")`');
+};
+
+/**
+ * Used as a stub for [hooks.js](https://github.com/bnoguchi/hooks-js/tree/31ec571cef0332e21121ee7157e0cf9728572cc3)
+ *
+ * ####NOTE:
+ *
+ * _This is a no-op. Does not actually save the doc to the db._
+ *
+ * @param {Function} [fn]
+ * @return {Promise} resolved Promise
+ * @api private
+ */
+
+EmbeddedDocument.prototype.save = function(fn) {
+ var Promise = PromiseProvider.get();
+ return new Promise.ES6(function(resolve) {
+ fn && fn();
+ resolve();
+ });
+};
+
+/*!
+ * Registers remove event listeners for triggering
+ * on subdocuments.
+ *
+ * @param {EmbeddedDocument} sub
+ * @api private
+ */
+
+function registerRemoveListener(sub) {
+ var owner = sub.ownerDocument();
+
+ function emitRemove() {
+ owner.removeListener('save', emitRemove);
+ owner.removeListener('remove', emitRemove);
+ sub.emit('remove', sub);
+ owner = sub = null;
+ }
+
+ owner.on('save', emitRemove);
+ owner.on('remove', emitRemove);
+}
+
+/**
+ * Removes the subdocument from its parent array.
+ *
+ * @param {Object} [options]
+ * @param {Function} [fn]
+ * @api public
+ */
+
+EmbeddedDocument.prototype.remove = function(options, fn) {
+ if ( typeof options === 'function' && !fn ) {
+ fn = options;
+ options = undefined;
+ }
+ if (!this.__parentArray || (options && options.noop)) {
+ fn && fn(null);
+ return this;
+ }
+
+ var _id;
+ if (!this.willRemove) {
+ _id = this._doc._id;
+ if (!_id) {
+ throw new Error('For your own good, Mongoose does not know ' +
+ 'how to remove an EmbeddedDocument that has no _id');
+ }
+ this.__parentArray.pull({_id: _id});
+ this.willRemove = true;
+ registerRemoveListener(this);
+ }
+
+ if (fn) {
+ fn(null);
+ }
+
+ return this;
+};
+
+/**
+ * Override #update method of parent documents.
+ * @api private
+ */
+
+EmbeddedDocument.prototype.update = function() {
+ throw new Error('The #update method is not available on EmbeddedDocuments');
+};
+
+/**
+ * Helper for console.log
+ *
+ * @api public
+ */
+
+EmbeddedDocument.prototype.inspect = function() {
+ return this.toObject({ transform: false, retainKeyOrder: true });
+};
+
+/**
+ * Marks a path as invalid, causing validation to fail.
+ *
+ * @param {String} path the field to invalidate
+ * @param {String|Error} err error which states the reason `path` was invalid
+ * @return {Boolean}
+ * @api public
+ */
+
+EmbeddedDocument.prototype.invalidate = function(path, err, val, first) {
+ if (!this.__parent) {
+ Document.prototype.invalidate.call(this, path, err, val);
+ if (err.name === 'ValidatorError') {
+ return true;
+ }
+ throw err;
+ }
+
+ var index = this.__index;
+ if (typeof index !== 'undefined') {
+ var parentPath = this.__parentArray._path;
+ var fullPath = [parentPath, index, path].join('.');
+ this.__parent.invalidate(fullPath, err, val);
+ }
+
+ if (first) {
+ this.$__.validationError = this.ownerDocument().$__.validationError;
+ }
+
+ return true;
+};
+
+/**
+ * Marks a path as valid, removing existing validation errors.
+ *
+ * @param {String} path the field to mark as valid
+ * @api private
+ * @method $markValid
+ * @receiver EmbeddedDocument
+ */
+
+EmbeddedDocument.prototype.$markValid = function(path) {
+ if (!this.__parent) {
+ return;
+ }
+
+ var index = this.__index;
+ if (typeof index !== 'undefined') {
+ var parentPath = this.__parentArray._path;
+ var fullPath = [parentPath, index, path].join('.');
+ this.__parent.$markValid(fullPath);
+ }
+};
+
+/**
+ * Checks if a path is invalid
+ *
+ * @param {String} path the field to check
+ * @api private
+ * @method $isValid
+ * @receiver EmbeddedDocument
+ */
+
+EmbeddedDocument.prototype.$isValid = function(path) {
+ var index = this.__index;
+ if (typeof index !== 'undefined' && this.__parent) {
+ return !this.__parent.$__.validationError ||
+ !this.__parent.$__.validationError.errors[this.$__fullPath(path)];
+ }
+
+ return true;
+};
+
+/**
+ * Returns the top level document of this sub-document.
+ *
+ * @return {Document}
+ */
+
+EmbeddedDocument.prototype.ownerDocument = function() {
+ if (this.$__.ownerDocument) {
+ return this.$__.ownerDocument;
+ }
+
+ var parent = this.__parent;
+ if (!parent) {
+ return this;
+ }
+
+ while (parent.__parent || parent.$parent) {
+ parent = parent.__parent || parent.$parent;
+ }
+
+ this.$__.ownerDocument = parent;
+ return this.$__.ownerDocument;
+};
+
+/**
+ * Returns the full path to this document. If optional `path` is passed, it is appended to the full path.
+ *
+ * @param {String} [path]
+ * @return {String}
+ * @api private
+ * @method $__fullPath
+ * @memberOf EmbeddedDocument
+ */
+
+EmbeddedDocument.prototype.$__fullPath = function(path) {
+ if (!this.$__.fullPath) {
+ var parent = this; // eslint-disable-line consistent-this
+ if (!parent.__parent) {
+ return path;
+ }
+
+ var paths = [];
+ while (parent.__parent || parent.$parent) {
+ if (parent.__parent) {
+ paths.unshift(parent.__parentArray._path);
+ } else {
+ paths.unshift(parent.$basePath);
+ }
+ parent = parent.__parent || parent.$parent;
+ }
+
+ this.$__.fullPath = paths.join('.');
+
+ if (!this.$__.ownerDocument) {
+ // optimization
+ this.$__.ownerDocument = parent;
+ }
+ }
+
+ return path
+ ? this.$__.fullPath + '.' + path
+ : this.$__.fullPath;
+};
+
+/**
+ * Returns this sub-documents parent document.
+ *
+ * @api public
+ */
+
+EmbeddedDocument.prototype.parent = function() {
+ return this.__parent;
+};
+
+/**
+ * Returns this sub-documents parent array.
+ *
+ * @api public
+ */
+
+EmbeddedDocument.prototype.parentArray = function() {
+ return this.__parentArray;
+};
+
+/*!
+ * Module exports.
+ */
+
+module.exports = EmbeddedDocument;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/index.js
new file mode 100644
index 0000000..0d01923
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/index.js
@@ -0,0 +1,15 @@
+
+/*!
+ * Module exports.
+ */
+
+exports.Array = require('./array');
+exports.Buffer = require('./buffer');
+
+exports.Document = // @deprecate
+exports.Embedded = require('./embedded');
+
+exports.DocumentArray = require('./documentarray');
+exports.ObjectId = require('./objectid');
+
+exports.Subdocument = require('./subdocument');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/objectid.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/objectid.js
new file mode 100644
index 0000000..9fe0b97
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/objectid.js
@@ -0,0 +1,13 @@
+/**
+ * ObjectId type constructor
+ *
+ * ####Example
+ *
+ * var id = new mongoose.Types.ObjectId;
+ *
+ * @constructor ObjectId
+ */
+
+var ObjectId = require('../drivers').ObjectId;
+
+module.exports = ObjectId;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/subdocument.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/subdocument.js
new file mode 100644
index 0000000..911fdf4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/types/subdocument.js
@@ -0,0 +1,152 @@
+var Document = require('../document');
+var PromiseProvider = require('../promise_provider');
+
+module.exports = Subdocument;
+
+/**
+ * Subdocument constructor.
+ *
+ * @inherits Document
+ * @api private
+ */
+
+function Subdocument(value, fields) {
+ this.$isSingleNested = true;
+ Document.call(this, value, fields);
+}
+
+Subdocument.prototype = Object.create(Document.prototype);
+
+Subdocument.prototype.toBSON = function() {
+ return this.toObject({ transform: false });
+};
+
+/**
+ * Used as a stub for [hooks.js](https://github.com/bnoguchi/hooks-js/tree/31ec571cef0332e21121ee7157e0cf9728572cc3)
+ *
+ * ####NOTE:
+ *
+ * _This is a no-op. Does not actually save the doc to the db._
+ *
+ * @param {Function} [fn]
+ * @return {Promise} resolved Promise
+ * @api private
+ */
+
+Subdocument.prototype.save = function(fn) {
+ var Promise = PromiseProvider.get();
+ return new Promise.ES6(function(resolve) {
+ fn && fn();
+ resolve();
+ });
+};
+
+Subdocument.prototype.$isValid = function(path) {
+ if (this.$parent) {
+ return this.$parent.$isValid([this.$basePath, path].join('.'));
+ }
+};
+
+Subdocument.prototype.markModified = function(path) {
+ Document.prototype.markModified.call(this, path);
+ if (this.$parent) {
+ if (this.$parent.isDirectModified(this.$basePath)) {
+ return;
+ }
+ this.$parent.markModified([this.$basePath, path].join('.'));
+ }
+};
+
+Subdocument.prototype.$markValid = function(path) {
+ if (this.$parent) {
+ this.$parent.$markValid([this.$basePath, path].join('.'));
+ }
+};
+
+Subdocument.prototype.invalidate = function(path, err, val) {
+ Document.prototype.invalidate.call(this, path, err, val);
+ if (this.$parent) {
+ this.$parent.invalidate([this.$basePath, path].join('.'), err, val);
+ } else if (err.kind === 'cast' || err.name === 'CastError') {
+ throw err;
+ }
+};
+
+/**
+ * Returns the top level document of this sub-document.
+ *
+ * @return {Document}
+ */
+
+Subdocument.prototype.ownerDocument = function() {
+ if (this.$__.ownerDocument) {
+ return this.$__.ownerDocument;
+ }
+
+ var parent = this.$parent;
+ if (!parent) {
+ return this;
+ }
+
+ while (parent.$parent || parent.__parent) {
+ parent = parent.$parent || parent.__parent;
+ }
+ this.$__.ownerDocument = parent;
+ return this.$__.ownerDocument;
+};
+
+/**
+ * Null-out this subdoc
+ *
+ * @param {Object} [options]
+ * @param {Function} [callback] optional callback for compatibility with Document.prototype.remove
+ */
+
+Subdocument.prototype.remove = function(options, callback) {
+ if (typeof options === 'function') {
+ callback = options;
+ options = null;
+ }
+
+ // If removing entire doc, no need to remove subdoc
+ if (!options || !options.noop) {
+ this.$parent.set(this.$basePath, null);
+ registerRemoveListener(this);
+ }
+
+ if (typeof callback === 'function') {
+ callback(null);
+ }
+};
+
+/*!
+ * ignore
+ */
+
+Subdocument.prototype.populate = function() {
+ throw new Error('Mongoose does not support calling populate() on nested ' +
+ 'docs. Instead of `doc.nested.populate("path")`, use ' +
+ '`doc.populate("nested.path")`');
+};
+
+/*!
+ * Registers remove event listeners for triggering
+ * on subdocuments.
+ *
+ * @param {EmbeddedDocument} sub
+ * @api private
+ */
+
+function registerRemoveListener(sub) {
+ var owner = sub.ownerDocument();
+
+ function emitRemove() {
+ owner.removeListener('save', emitRemove);
+ owner.removeListener('remove', emitRemove);
+ sub.emit('remove', sub);
+ owner = sub = null;
+ }
+
+ owner.on('save', emitRemove);
+ owner.on('remove', emitRemove);
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/utils.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/utils.js
new file mode 100644
index 0000000..391325f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/utils.js
@@ -0,0 +1,868 @@
+/*!
+ * Module dependencies.
+ */
+
+var ObjectId = require('./types/objectid');
+var cloneRegExp = require('regexp-clone');
+var sliced = require('sliced');
+var mpath = require('mpath');
+var ms = require('ms');
+var MongooseBuffer;
+var MongooseArray;
+var Document;
+
+/*!
+ * Produces a collection name from model `name`.
+ *
+ * @param {String} name a model name
+ * @return {String} a collection name
+ * @api private
+ */
+
+exports.toCollectionName = function(name, options) {
+ options = options || {};
+ if (name === 'system.profile') {
+ return name;
+ }
+ if (name === 'system.indexes') {
+ return name;
+ }
+ if (options.pluralization === false) {
+ return name;
+ }
+ return pluralize(name.toLowerCase());
+};
+
+/**
+ * Pluralization rules.
+ *
+ * These rules are applied while processing the argument to `toCollectionName`.
+ *
+ * @deprecated remove in 4.x gh-1350
+ */
+
+exports.pluralization = [
+ [/(m)an$/gi, '$1en'],
+ [/(pe)rson$/gi, '$1ople'],
+ [/(child)$/gi, '$1ren'],
+ [/^(ox)$/gi, '$1en'],
+ [/(ax|test)is$/gi, '$1es'],
+ [/(octop|vir)us$/gi, '$1i'],
+ [/(alias|status)$/gi, '$1es'],
+ [/(bu)s$/gi, '$1ses'],
+ [/(buffal|tomat|potat)o$/gi, '$1oes'],
+ [/([ti])um$/gi, '$1a'],
+ [/sis$/gi, 'ses'],
+ [/(?:([^f])fe|([lr])f)$/gi, '$1$2ves'],
+ [/(hive)$/gi, '$1s'],
+ [/([^aeiouy]|qu)y$/gi, '$1ies'],
+ [/(x|ch|ss|sh)$/gi, '$1es'],
+ [/(matr|vert|ind)ix|ex$/gi, '$1ices'],
+ [/([m|l])ouse$/gi, '$1ice'],
+ [/(kn|w|l)ife$/gi, '$1ives'],
+ [/(quiz)$/gi, '$1zes'],
+ [/s$/gi, 's'],
+ [/([^a-z])$/, '$1'],
+ [/$/gi, 's']
+];
+var rules = exports.pluralization;
+
+/**
+ * Uncountable words.
+ *
+ * These words are applied while processing the argument to `toCollectionName`.
+ * @api public
+ */
+
+exports.uncountables = [
+ 'advice',
+ 'energy',
+ 'excretion',
+ 'digestion',
+ 'cooperation',
+ 'health',
+ 'justice',
+ 'labour',
+ 'machinery',
+ 'equipment',
+ 'information',
+ 'pollution',
+ 'sewage',
+ 'paper',
+ 'money',
+ 'species',
+ 'series',
+ 'rain',
+ 'rice',
+ 'fish',
+ 'sheep',
+ 'moose',
+ 'deer',
+ 'news',
+ 'expertise',
+ 'status',
+ 'media'
+];
+var uncountables = exports.uncountables;
+
+/*!
+ * Pluralize function.
+ *
+ * @author TJ Holowaychuk (extracted from _ext.js_)
+ * @param {String} string to pluralize
+ * @api private
+ */
+
+function pluralize(str) {
+ var found;
+ if (!~uncountables.indexOf(str.toLowerCase())) {
+ found = rules.filter(function(rule) {
+ return str.match(rule[0]);
+ });
+ if (found[0]) {
+ return str.replace(found[0][0], found[0][1]);
+ }
+ }
+ return str;
+}
+
+/*!
+ * Determines if `a` and `b` are deep equal.
+ *
+ * Modified from node/lib/assert.js
+ *
+ * @param {any} a a value to compare to `b`
+ * @param {any} b a value to compare to `a`
+ * @return {Boolean}
+ * @api private
+ */
+
+exports.deepEqual = function deepEqual(a, b) {
+ if (a === b) {
+ return true;
+ }
+
+ if (a instanceof Date && b instanceof Date) {
+ return a.getTime() === b.getTime();
+ }
+
+ if (a instanceof ObjectId && b instanceof ObjectId) {
+ return a.toString() === b.toString();
+ }
+
+ if (a instanceof RegExp && b instanceof RegExp) {
+ return a.source === b.source &&
+ a.ignoreCase === b.ignoreCase &&
+ a.multiline === b.multiline &&
+ a.global === b.global;
+ }
+
+ if (typeof a !== 'object' && typeof b !== 'object') {
+ return a == b;
+ }
+
+ if (a === null || b === null || a === undefined || b === undefined) {
+ return false;
+ }
+
+ if (a.prototype !== b.prototype) {
+ return false;
+ }
+
+ // Handle MongooseNumbers
+ if (a instanceof Number && b instanceof Number) {
+ return a.valueOf() === b.valueOf();
+ }
+
+ if (Buffer.isBuffer(a)) {
+ return exports.buffer.areEqual(a, b);
+ }
+
+ if (isMongooseObject(a)) {
+ a = a.toObject();
+ }
+ if (isMongooseObject(b)) {
+ b = b.toObject();
+ }
+
+ try {
+ var ka = Object.keys(a),
+ kb = Object.keys(b),
+ key, i;
+ } catch (e) {
+ // happens when one is a string literal and the other isn't
+ return false;
+ }
+
+ // having the same number of owned properties (keys incorporates
+ // hasOwnProperty)
+ if (ka.length !== kb.length) {
+ return false;
+ }
+
+ // the same set of keys (although not necessarily the same order),
+ ka.sort();
+ kb.sort();
+
+ // ~~~cheap key test
+ for (i = ka.length - 1; i >= 0; i--) {
+ if (ka[i] !== kb[i]) {
+ return false;
+ }
+ }
+
+ // equivalent values for every corresponding key, and
+ // ~~~possibly expensive deep test
+ for (i = ka.length - 1; i >= 0; i--) {
+ key = ka[i];
+ if (!deepEqual(a[key], b[key])) {
+ return false;
+ }
+ }
+
+ return true;
+};
+
+/*!
+ * Object clone with Mongoose natives support.
+ *
+ * If options.minimize is true, creates a minimal data object. Empty objects and undefined values will not be cloned. This makes the data payload sent to MongoDB as small as possible.
+ *
+ * Functions are never cloned.
+ *
+ * @param {Object} obj the object to clone
+ * @param {Object} options
+ * @return {Object} the cloned object
+ * @api private
+ */
+
+exports.clone = function clone(obj, options) {
+ if (obj === undefined || obj === null) {
+ return obj;
+ }
+
+ if (Array.isArray(obj)) {
+ return cloneArray(obj, options);
+ }
+
+ if (isMongooseObject(obj)) {
+ if (options && options.json && typeof obj.toJSON === 'function') {
+ return obj.toJSON(options);
+ }
+ return obj.toObject(options);
+ }
+
+ if (obj.constructor) {
+ switch (exports.getFunctionName(obj.constructor)) {
+ case 'Object':
+ return cloneObject(obj, options);
+ case 'Date':
+ return new obj.constructor(+obj);
+ case 'RegExp':
+ return cloneRegExp(obj);
+ default:
+ // ignore
+ break;
+ }
+ }
+
+ if (obj instanceof ObjectId) {
+ return new ObjectId(obj.id);
+ }
+
+ if (!obj.constructor && exports.isObject(obj)) {
+ // object created with Object.create(null)
+ return cloneObject(obj, options);
+ }
+
+ if (obj.valueOf) {
+ return obj.valueOf();
+ }
+};
+var clone = exports.clone;
+
+/*!
+ * ignore
+ */
+
+function cloneObject(obj, options) {
+ var retainKeyOrder = options && options.retainKeyOrder,
+ minimize = options && options.minimize,
+ ret = {},
+ hasKeys,
+ keys,
+ val,
+ k,
+ i;
+
+ if (retainKeyOrder) {
+ for (k in obj) {
+ val = clone(obj[k], options);
+
+ if (!minimize || (typeof val !== 'undefined')) {
+ hasKeys || (hasKeys = true);
+ ret[k] = val;
+ }
+ }
+ } else {
+ // faster
+
+ keys = Object.keys(obj);
+ i = keys.length;
+
+ while (i--) {
+ k = keys[i];
+ val = clone(obj[k], options);
+
+ if (!minimize || (typeof val !== 'undefined')) {
+ if (!hasKeys) {
+ hasKeys = true;
+ }
+ ret[k] = val;
+ }
+ }
+ }
+
+ return minimize
+ ? hasKeys && ret
+ : ret;
+}
+
+function cloneArray(arr, options) {
+ var ret = [];
+ for (var i = 0, l = arr.length; i < l; i++) {
+ ret.push(clone(arr[i], options));
+ }
+ return ret;
+}
+
+/*!
+ * Shallow copies defaults into options.
+ *
+ * @param {Object} defaults
+ * @param {Object} options
+ * @return {Object} the merged object
+ * @api private
+ */
+
+exports.options = function(defaults, options) {
+ var keys = Object.keys(defaults),
+ i = keys.length,
+ k;
+
+ options = options || {};
+
+ while (i--) {
+ k = keys[i];
+ if (!(k in options)) {
+ options[k] = defaults[k];
+ }
+ }
+
+ return options;
+};
+
+/*!
+ * Generates a random string
+ *
+ * @api private
+ */
+
+exports.random = function() {
+ return Math.random().toString().substr(3);
+};
+
+/*!
+ * Merges `from` into `to` without overwriting existing properties.
+ *
+ * @param {Object} to
+ * @param {Object} from
+ * @api private
+ */
+
+exports.merge = function merge(to, from, options) {
+ options = options || {};
+ var keys = Object.keys(from);
+ var i = 0;
+ var len = keys.length;
+ var key;
+
+ if (options.retainKeyOrder) {
+ while (i < len) {
+ key = keys[i++];
+ if (typeof to[key] === 'undefined') {
+ to[key] = from[key];
+ } else if (exports.isObject(from[key])) {
+ merge(to[key], from[key]);
+ } else if (options.overwrite) {
+ to[key] = from[key];
+ }
+ }
+ } else {
+ while (len--) {
+ key = keys[len];
+ if (typeof to[key] === 'undefined') {
+ to[key] = from[key];
+ } else if (exports.isObject(from[key])) {
+ merge(to[key], from[key]);
+ } else if (options.overwrite) {
+ to[key] = from[key];
+ }
+ }
+ }
+};
+
+/*!
+ * toString helper
+ */
+
+var toString = Object.prototype.toString;
+
+/*!
+ * Applies toObject recursively.
+ *
+ * @param {Document|Array|Object} obj
+ * @return {Object}
+ * @api private
+ */
+
+exports.toObject = function toObject(obj) {
+ Document || (Document = require('./document'));
+ var ret;
+
+ if (exports.isNullOrUndefined(obj)) {
+ return obj;
+ }
+
+ if (obj instanceof Document) {
+ return obj.toObject();
+ }
+
+ if (Array.isArray(obj)) {
+ ret = [];
+
+ for (var i = 0, len = obj.length; i < len; ++i) {
+ ret.push(toObject(obj[i]));
+ }
+
+ return ret;
+ }
+
+ if ((obj.constructor && exports.getFunctionName(obj.constructor) === 'Object') ||
+ (!obj.constructor && exports.isObject(obj))) {
+ ret = {};
+
+ for (var k in obj) {
+ ret[k] = toObject(obj[k]);
+ }
+
+ return ret;
+ }
+
+ return obj;
+};
+
+/*!
+ * Determines if `arg` is an object.
+ *
+ * @param {Object|Array|String|Function|RegExp|any} arg
+ * @api private
+ * @return {Boolean}
+ */
+
+exports.isObject = function(arg) {
+ if (Buffer.isBuffer(arg)) {
+ return true;
+ }
+ return toString.call(arg) === '[object Object]';
+};
+
+/*!
+ * A faster Array.prototype.slice.call(arguments) alternative
+ * @api private
+ */
+
+exports.args = sliced;
+
+/*!
+ * process.nextTick helper.
+ *
+ * Wraps `callback` in a try/catch + nextTick.
+ *
+ * node-mongodb-native has a habit of state corruption when an error is immediately thrown from within a collection callback.
+ *
+ * @param {Function} callback
+ * @api private
+ */
+
+exports.tick = function tick(callback) {
+ if (typeof callback !== 'function') {
+ return;
+ }
+ return function() {
+ try {
+ callback.apply(this, arguments);
+ } catch (err) {
+ // only nextTick on err to get out of
+ // the event loop and avoid state corruption.
+ process.nextTick(function() {
+ throw err;
+ });
+ }
+ };
+};
+
+/*!
+ * Returns if `v` is a mongoose object that has a `toObject()` method we can use.
+ *
+ * This is for compatibility with libs like Date.js which do foolish things to Natives.
+ *
+ * @param {any} v
+ * @api private
+ */
+
+exports.isMongooseObject = function(v) {
+ Document || (Document = require('./document'));
+ MongooseArray || (MongooseArray = require('./types').Array);
+ MongooseBuffer || (MongooseBuffer = require('./types').Buffer);
+
+ return v instanceof Document ||
+ (v && v.isMongooseArray) ||
+ (v && v.isMongooseBuffer);
+};
+var isMongooseObject = exports.isMongooseObject;
+
+/*!
+ * Converts `expires` options of index objects to `expiresAfterSeconds` options for MongoDB.
+ *
+ * @param {Object} object
+ * @api private
+ */
+
+exports.expires = function expires(object) {
+ if (!(object && object.constructor.name === 'Object')) {
+ return;
+ }
+ if (!('expires' in object)) {
+ return;
+ }
+
+ var when;
+ if (typeof object.expires !== 'string') {
+ when = object.expires;
+ } else {
+ when = Math.round(ms(object.expires) / 1000);
+ }
+ object.expireAfterSeconds = when;
+ delete object.expires;
+};
+
+/*!
+ * Populate options constructor
+ */
+
+function PopulateOptions(path, select, match, options, model, subPopulate) {
+ this.path = path;
+ this.match = match;
+ this.select = select;
+ this.options = options;
+ this.model = model;
+ if (typeof subPopulate === 'object') {
+ this.populate = subPopulate;
+ }
+ this._docs = {};
+}
+
+// make it compatible with utils.clone
+PopulateOptions.prototype.constructor = Object;
+
+// expose
+exports.PopulateOptions = PopulateOptions;
+
+/*!
+ * populate helper
+ */
+
+exports.populate = function populate(path, select, model, match, options, subPopulate) {
+ // The order of select/conditions args is opposite Model.find but
+ // necessary to keep backward compatibility (select could be
+ // an array, string, or object literal).
+
+ // might have passed an object specifying all arguments
+ if (arguments.length === 1) {
+ if (path instanceof PopulateOptions) {
+ return [path];
+ }
+
+ if (Array.isArray(path)) {
+ return path.map(function(o) {
+ return exports.populate(o)[0];
+ });
+ }
+
+ if (exports.isObject(path)) {
+ match = path.match;
+ options = path.options;
+ select = path.select;
+ model = path.model;
+ subPopulate = path.populate;
+ path = path.path;
+ }
+ } else if (typeof model !== 'string' && typeof model !== 'function') {
+ options = match;
+ match = model;
+ model = undefined;
+ }
+
+ if (typeof path !== 'string') {
+ throw new TypeError('utils.populate: invalid path. Expected string. Got typeof `' + typeof path + '`');
+ }
+
+ if (typeof subPopulate === 'object') {
+ subPopulate = exports.populate(subPopulate);
+ }
+
+ var ret = [];
+ var paths = path.split(' ');
+ options = exports.clone(options, { retainKeyOrder: true });
+ for (var i = 0; i < paths.length; ++i) {
+ ret.push(new PopulateOptions(paths[i], select, match, options, model, subPopulate));
+ }
+
+ return ret;
+};
+
+/*!
+ * Return the value of `obj` at the given `path`.
+ *
+ * @param {String} path
+ * @param {Object} obj
+ */
+
+exports.getValue = function(path, obj, map) {
+ return mpath.get(path, obj, '_doc', map);
+};
+
+/*!
+ * Sets the value of `obj` at the given `path`.
+ *
+ * @param {String} path
+ * @param {Anything} val
+ * @param {Object} obj
+ */
+
+exports.setValue = function(path, val, obj, map) {
+ mpath.set(path, val, obj, '_doc', map);
+};
+
+/*!
+ * Returns an array of values from object `o`.
+ *
+ * @param {Object} o
+ * @return {Array}
+ * @private
+ */
+
+exports.object = {};
+exports.object.vals = function vals(o) {
+ var keys = Object.keys(o),
+ i = keys.length,
+ ret = [];
+
+ while (i--) {
+ ret.push(o[keys[i]]);
+ }
+
+ return ret;
+};
+
+/*!
+ * @see exports.options
+ */
+
+exports.object.shallowCopy = exports.options;
+
+/*!
+ * Safer helper for hasOwnProperty checks
+ *
+ * @param {Object} obj
+ * @param {String} prop
+ */
+
+var hop = Object.prototype.hasOwnProperty;
+exports.object.hasOwnProperty = function(obj, prop) {
+ return hop.call(obj, prop);
+};
+
+/*!
+ * Determine if `val` is null or undefined
+ *
+ * @return {Boolean}
+ */
+
+exports.isNullOrUndefined = function(val) {
+ return val === null || val === undefined;
+};
+
+/*!
+ * ignore
+ */
+
+exports.array = {};
+
+/*!
+ * Flattens an array.
+ *
+ * [ 1, [ 2, 3, [4] ]] -> [1,2,3,4]
+ *
+ * @param {Array} arr
+ * @param {Function} [filter] If passed, will be invoked with each item in the array. If `filter` returns a falsey value, the item will not be included in the results.
+ * @return {Array}
+ * @private
+ */
+
+exports.array.flatten = function flatten(arr, filter, ret) {
+ ret || (ret = []);
+
+ arr.forEach(function(item) {
+ if (Array.isArray(item)) {
+ flatten(item, filter, ret);
+ } else {
+ if (!filter || filter(item)) {
+ ret.push(item);
+ }
+ }
+ });
+
+ return ret;
+};
+
+/*!
+ * Removes duplicate values from an array
+ *
+ * [1, 2, 3, 3, 5] => [1, 2, 3, 5]
+ * [ ObjectId("550988ba0c19d57f697dc45e"), ObjectId("550988ba0c19d57f697dc45e") ]
+ * => [ObjectId("550988ba0c19d57f697dc45e")]
+ *
+ * @param {Array} arr
+ * @return {Array}
+ * @private
+ */
+
+exports.array.unique = function(arr) {
+ var primitives = {};
+ var ids = {};
+ var ret = [];
+ var length = arr.length;
+ for (var i = 0; i < length; ++i) {
+ if (typeof arr[i] === 'number' || typeof arr[i] === 'string') {
+ if (primitives[arr[i]]) {
+ continue;
+ }
+ ret.push(arr[i]);
+ primitives[arr[i]] = true;
+ } else if (arr[i] instanceof ObjectId) {
+ if (ids[arr[i].toString()]) {
+ continue;
+ }
+ ret.push(arr[i]);
+ ids[arr[i].toString()] = true;
+ } else {
+ ret.push(arr[i]);
+ }
+ }
+
+ return ret;
+};
+
+/*!
+ * Determines if two buffers are equal.
+ *
+ * @param {Buffer} a
+ * @param {Object} b
+ */
+
+exports.buffer = {};
+exports.buffer.areEqual = function(a, b) {
+ if (!Buffer.isBuffer(a)) {
+ return false;
+ }
+ if (!Buffer.isBuffer(b)) {
+ return false;
+ }
+ if (a.length !== b.length) {
+ return false;
+ }
+ for (var i = 0, len = a.length; i < len; ++i) {
+ if (a[i] !== b[i]) {
+ return false;
+ }
+ }
+ return true;
+};
+
+exports.getFunctionName = function(fn) {
+ if (fn.name) {
+ return fn.name;
+ }
+ return (fn.toString().trim().match(/^function\s*([^\s(]+)/) || [])[1];
+};
+
+exports.decorate = function(destination, source) {
+ for (var key in source) {
+ destination[key] = source[key];
+ }
+};
+
+/**
+ * merges to with a copy of from
+ *
+ * @param {Object} to
+ * @param {Object} fromObj
+ * @api private
+ */
+
+exports.mergeClone = function(to, fromObj) {
+ var keys = Object.keys(fromObj);
+ var len = keys.length;
+ var i = 0;
+ var key;
+
+ while (i < len) {
+ key = keys[i++];
+ if (typeof to[key] === 'undefined') {
+ // make sure to retain key order here because of a bug handling the $each
+ // operator in mongodb 2.4.4
+ to[key] = exports.clone(fromObj[key], {retainKeyOrder: 1});
+ } else {
+ if (exports.isObject(fromObj[key])) {
+ var obj = fromObj[key];
+ if (isMongooseObject(fromObj[key]) && !fromObj[key].isMongooseBuffer) {
+ obj = obj.toObject({ transform: false });
+ }
+ if (fromObj[key].isMongooseBuffer) {
+ obj = new Buffer(obj);
+ }
+ exports.mergeClone(to[key], obj);
+ } else {
+ // make sure to retain key order here because of a bug handling the
+ // $each operator in mongodb 2.4.4
+ to[key] = exports.clone(fromObj[key], {retainKeyOrder: 1});
+ }
+ }
+ }
+};
+
+/**
+ * Executes a function on each element of an array (like _.each)
+ *
+ * @param {Array} arr
+ * @param {Function} fn
+ * @api private
+ */
+
+exports.each = function(arr, fn) {
+ for (var i = 0; i < arr.length; ++i) {
+ fn(arr[i]);
+ }
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/virtualtype.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/virtualtype.js
new file mode 100644
index 0000000..f43cbe2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/virtualtype.js
@@ -0,0 +1,103 @@
+
+/**
+ * VirtualType constructor
+ *
+ * This is what mongoose uses to define virtual attributes via `Schema.prototype.virtual`.
+ *
+ * ####Example:
+ *
+ * var fullname = schema.virtual('fullname');
+ * fullname instanceof mongoose.VirtualType // true
+ *
+ * @parma {Object} options
+ * @api public
+ */
+
+function VirtualType(options, name) {
+ this.path = name;
+ this.getters = [];
+ this.setters = [];
+ this.options = options || {};
+}
+
+/**
+ * Defines a getter.
+ *
+ * ####Example:
+ *
+ * var virtual = schema.virtual('fullname');
+ * virtual.get(function () {
+ * return this.name.first + ' ' + this.name.last;
+ * });
+ *
+ * @param {Function} fn
+ * @return {VirtualType} this
+ * @api public
+ */
+
+VirtualType.prototype.get = function(fn) {
+ this.getters.push(fn);
+ return this;
+};
+
+/**
+ * Defines a setter.
+ *
+ * ####Example:
+ *
+ * var virtual = schema.virtual('fullname');
+ * virtual.set(function (v) {
+ * var parts = v.split(' ');
+ * this.name.first = parts[0];
+ * this.name.last = parts[1];
+ * });
+ *
+ * @param {Function} fn
+ * @return {VirtualType} this
+ * @api public
+ */
+
+VirtualType.prototype.set = function(fn) {
+ this.setters.push(fn);
+ return this;
+};
+
+/**
+ * Applies getters to `value` using optional `scope`.
+ *
+ * @param {Object} value
+ * @param {Object} scope
+ * @return {any} the value after applying all getters
+ * @api public
+ */
+
+VirtualType.prototype.applyGetters = function(value, scope) {
+ var v = value;
+ for (var l = this.getters.length - 1; l >= 0; l--) {
+ v = this.getters[l].call(scope, v, this);
+ }
+ return v;
+};
+
+/**
+ * Applies setters to `value` using optional `scope`.
+ *
+ * @param {Object} value
+ * @param {Object} scope
+ * @return {any} the value after applying all setters
+ * @api public
+ */
+
+VirtualType.prototype.applySetters = function(value, scope) {
+ var v = value;
+ for (var l = this.setters.length - 1; l >= 0; l--) {
+ v = this.setters[l].call(scope, v, this);
+ }
+ return v;
+};
+
+/*!
+ * exports
+ */
+
+module.exports = VirtualType;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/CHANGELOG.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/CHANGELOG.md
new file mode 100644
index 0000000..a82f6fe
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/CHANGELOG.md
@@ -0,0 +1,219 @@
+# v2.1.2
+- Fixed a stackoverflow bug with `detect`, `some`, `every` on large inputs (#1293).
+
+# v2.1.0
+
+- `retry` and `retryable` now support an optional `errorFilter` function that determines if the `task` should retry on the error (#1256, #1261)
+- Optimized array iteration in `race`, `cargo`, `queue`, and `priorityQueue` (#1253)
+- Added alias documentation to doc site (#1251, #1254)
+- Added [BootStrap scrollspy](http://getbootstrap.com/javascript/#scrollspy) to docs to highlight in the sidebar the current method being viewed (#1289, #1300)
+- Various minor doc fixes (#1263, #1264, #1271, #1278, #1280, #1282, #1302)
+
+# v2.0.1
+
+- Significantly optimized all iteration based collection methods such as `each`, `map`, `filter`, etc (#1245, #1246, #1247).
+
+# v2.0.0
+
+Lots of changes here!
+
+First and foremost, we have a slick new [site for docs](https://caolan.github.io/async/). Special thanks to [**@hargasinski**](https://github.com/hargasinski) for his work converting our old docs to `jsdoc` format and implementing the new website. Also huge ups to [**@ivanseidel**](https://github.com/ivanseidel) for designing our new logo. It was a long process for both of these tasks, but I think these changes turned out extraordinary well.
+
+The biggest feature is modularization. You can now `require("async/series")` to only require the `series` function. Every Async library function is available this way. You still can `require("async")` to require the entire library, like you could do before.
+
+We also provide Async as a collection of ES2015 modules. You can now `import {each} from 'async-es'` or `import waterfall from 'async-es/waterfall'`. If you are using only a few Async functions, and are using a ES bundler such as Rollup, this can significantly lower your build size.
+
+Major thanks to [**@Kikobeats**](github.com/Kikobeats), [**@aearly**](github.com/aearly) and [**@megawac**](github.com/megawac) for doing the majority of the modularization work, as well as [**@jdalton**](github.com/jdalton) and [**@Rich-Harris**](github.com/Rich-Harris) for advisory work on the general modularization strategy.
+
+Another one of the general themes of the 2.0 release is standardization of what an "async" function is. We are now more strictly following the node-style continuation passing style. That is, an async function is a function that:
+
+1. Takes a variable number of arguments
+2. The last argument is always a callback
+3. The callback can accept any number of arguments
+4. The first argument passed to the callback will be treated as an error result, if the argument is truthy
+5. Any number of result arguments can be passed after the "error" argument
+6. The callback is called once and exactly once, either on the same tick or later tick of the JavaScript event loop.
+
+There were several cases where Async accepted some functions that did not strictly have these properties, most notably `auto`, `every`, `some`, and `filter`.
+
+Another theme is performance. We have eliminated internal deferrals in all cases where they make sense. For example, in `waterfall` and `auto`, there was a `setImmediate` between each task -- these deferrals have been removed. A `setImmediate` call can add up to 1ms of delay. This might not seem like a lot, but it can add up if you are using many Async functions in the course of processing a HTTP request, for example. Nearly all asynchronous functions that do I/O already have some sort of deferral built in, so the extra deferral is unnecessary. The trade-off of this change is removing our built-in stack-overflow defense. Many synchronous callback calls in series can quickly overflow the JS call stack. If you do have a function that is sometimes synchronous (calling its callback on the same tick), and are running into stack overflows, wrap it with `async.ensureAsync()`.
+
+Another big performance win has been re-implementing `queue`, `cargo`, and `priorityQueue` with [doubly linked lists](https://en.wikipedia.org/wiki/Doubly_linked_list) instead of arrays. This has lead to queues being an order of [magnitude faster on large sets of tasks](https://github.com/caolan/async/pull/1205).
+
+## New Features
+
+- Async is now modularized. Individual functions can be `require()`d from the main package. (`require('async/auto')`) (#984, #996)
+- Async is also available as a collection of ES2015 modules in the new `async-es` package. (`import {forEachSeries} from 'async-es'`) (#984, #996)
+- Added `race`, analogous to `Promise.race()`. It will run an array of async tasks in parallel and will call its callback with the result of the first task to respond. (#568, #1038)
+- Collection methods now accept ES2015 iterators. Maps, Sets, and anything that implements the iterator spec can now be passed directly to `each`, `map`, `parallel`, etc.. (#579, #839, #1074)
+- Added `mapValues`, for mapping over the properties of an object and returning an object with the same keys. (#1157, #1177)
+- Added `timeout`, a wrapper for an async function that will make the task time-out after the specified time. (#1007, #1027)
+- Added `reflect` and `reflectAll`, analagous to [`Promise.reflect()`](http://bluebirdjs.com/docs/api/reflect.html), a wrapper for async tasks that always succeeds, by gathering results and errors into an object. (#942, #1012, #1095)
+- `constant` supports dynamic arguments -- it will now always use its last argument as the callback. (#1016, #1052)
+- `setImmediate` and `nextTick` now support arguments to partially apply to the deferred function, like the node-native versions do. (#940, #1053)
+- `auto` now supports resolving cyclic dependencies using [Kahn's algorithm](https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm) (#1140).
+- Added `autoInject`, a relative of `auto` that automatically spreads a task's dependencies as arguments to the task function. (#608, #1055, #1099, #1100)
+- You can now limit the concurrency of `auto` tasks. (#635, #637)
+- Added `retryable`, a relative of `retry` that wraps an async function, making it retry when called. (#1058)
+- `retry` now supports specifying a function that determines the next time interval, useful for exponential backoff, logging and other retry strategies. (#1161)
+- `retry` will now pass all of the arguments the task function was resolved with to the callback (#1231).
+- Added `q.unsaturated` -- callback called when a `queue`'s number of running workers falls below a threshold. (#868, #1030, #1033, #1034)
+- Added `q.error` -- a callback called whenever a `queue` task calls its callback with an error. (#1170)
+- `applyEach` and `applyEachSeries` now pass results to the final callback. (#1088)
+
+## Breaking changes
+
+- Calling a callback more than once is considered an error, and an error will be thrown. This had an explicit breaking change in `waterfall`. If you were relying on this behavior, you should more accurately represent your control flow as an event emitter or stream. (#814, #815, #1048, #1050)
+- `auto` task functions now always take the callback as the last argument. If a task has dependencies, the `results` object will be passed as the first argument. To migrate old task functions, wrap them with [`_.flip`](https://lodash.com/docs#flip) (#1036, #1042)
+- Internal `setImmediate` calls have been refactored away. This may make existing flows vulnerable to stack overflows if you use many synchronous functions in series. Use `ensureAsync` to work around this. (#696, #704, #1049, #1050)
+- `map` used to return an object when iterating over an object. `map` now always returns an array, like in other libraries. The previous object behavior has been split out into `mapValues`. (#1157, #1177)
+- `filter`, `reject`, `some`, `every`, and related functions now expect an error as the first callback argument, rather than just a simple boolean. Pass `null` as the first argument, or use `fs.access` instead of `fs.exists`. (#118, #774, #1028, #1041)
+- `{METHOD}` and `{METHOD}Series` are now implemented in terms of `{METHOD}Limit`. This is a major internal simplification, and is not expected to cause many problems, but it does subtly affect how functions execute internally. (#778, #847)
+- `retry`'s callback is now optional. Previously, omitting the callback would partially apply the function, meaning it could be passed directly as a task to `series` or `auto`. The partially applied "control-flow" behavior has been separated out into `retryable`. (#1054, #1058)
+- The test function for `whilst`, `until`, and `during` used to be passed non-error args from the iteratee function's callback, but this led to weirdness where the first call of the test function would be passed no args. We have made it so the test function is never passed extra arguments, and only the `doWhilst`, `doUntil`, and `doDuring` functions pass iteratee callback arguments to the test function (#1217, #1224)
+- The `q.tasks` array has been renamed `q._tasks` and is now implemented as a doubly linked list (DLL). Any code that used to interact with this array will need to be updated to either use the provided helpers or support DLLs (#1205).
+- The timing of the `q.saturated()` callback in a `queue` has been modified to better reflect when tasks pushed to the queue will start queueing. (#724, #1078)
+- Removed `iterator` method in favour of [ES2015 iterator protocol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators ) which natively supports arrays (#1237)
+- Dropped support for Component, Jam, SPM, and Volo (#1175, ##176)
+
+## Bug Fixes
+
+- Improved handling of no dependency cases in `auto` & `autoInject` (#1147).
+- Fixed a bug where the callback generated by `asyncify` with `Promises` could resolve twice (#1197).
+- Fixed several documented optional callbacks not actually being optional (#1223).
+
+## Other
+
+- Added `someSeries` and `everySeries` for symmetry, as well as a complete set of `any`/`anyLimit`/`anySeries` and `all`/`/allLmit`/`allSeries` aliases.
+- Added `find` as an alias for `detect. (as well as `findLimit` and `findSeries`).
+- Various doc fixes (#1005, #1008, #1010, #1015, #1021, #1037, #1039, #1051, #1102, #1107, #1121, #1123, #1129, #1135, #1138, #1141, #1153, #1216, #1217, #1232, #1233, #1236, #1238)
+
+Thank you [**@aearly**](github.com/aearly) and [**@megawac**](github.com/megawac) for taking the lead on version 2 of async.
+
+------------------------------------------
+
+# v1.5.2
+- Allow using `"constructor"` as an argument in `memoize` (#998)
+- Give a better error messsage when `auto` dependency checking fails (#994)
+- Various doc updates (#936, #956, #979, #1002)
+
+# v1.5.1
+- Fix issue with `pause` in `queue` with concurrency enabled (#946)
+- `while` and `until` now pass the final result to callback (#963)
+- `auto` will properly handle concurrency when there is no callback (#966)
+- `auto` will no. properly stop execution when an error occurs (#988, #993)
+- Various doc fixes (#971, #980)
+
+# v1.5.0
+
+- Added `transform`, analogous to [`_.transform`](http://lodash.com/docs#transform) (#892)
+- `map` now returns an object when an object is passed in, rather than array with non-numeric keys. `map` will begin always returning an array with numeric indexes in the next major release. (#873)
+- `auto` now accepts an optional `concurrency` argument to limit the number o. running tasks (#637)
+- Added `queue#workersList()`, to retrieve the lis. of currently running tasks. (#891)
+- Various code simplifications (#896, #904)
+- Various doc fixes :scroll: (#890, #894, #903, #905, #912)
+
+# v1.4.2
+
+- Ensure coverage files don't get published on npm (#879)
+
+# v1.4.1
+
+- Add in overlooked `detectLimit` method (#866)
+- Removed unnecessary files from npm releases (#861)
+- Removed usage of a reserved word to prevent :boom: in older environments (#870)
+
+# v1.4.0
+
+- `asyncify` now supports promises (#840)
+- Added `Limit` versions of `filter` and `reject` (#836)
+- Add `Limit` versions of `detect`, `some` and `every` (#828, #829)
+- `some`, `every` and `detect` now short circuit early (#828, #829)
+- Improve detection of the global object (#804), enabling use in WebWorkers
+- `whilst` now called with arguments from iterator (#823)
+- `during` now gets called with arguments from iterator (#824)
+- Code simplifications and optimizations aplenty ([diff](https://github.com/caolan/async/compare/v1.3.0...v1.4.0))
+
+
+# v1.3.0
+
+New Features:
+- Added `constant`
+- Added `asyncify`/`wrapSync` for making sync functions work with callbacks. (#671, #806)
+- Added `during` and `doDuring`, which are like `whilst` with an async truth test. (#800)
+- `retry` now accepts an `interval` parameter to specify a delay between retries. (#793)
+- `async` should work better in Web Workers due to better `root` detection (#804)
+- Callbacks are now optional in `whilst`, `doWhilst`, `until`, and `doUntil` (#642)
+- Various internal updates (#786, #801, #802, #803)
+- Various doc fixes (#790, #794)
+
+Bug Fixes:
+- `cargo` now exposes the `payload` size, and `cargo.payload` can be changed on the fly after the `cargo` is created. (#740, #744, #783)
+
+
+# v1.2.1
+
+Bug Fix:
+
+- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. (#782)
+
+
+# v1.2.0
+
+New Features:
+
+- Added `timesLimit` (#743)
+- `concurrency` can be changed after initialization in `queue` by setting `q.concurrency`. The new concurrency will be reflected the next time a task is processed. (#747, #772)
+
+Bug Fixes:
+
+- Fixed a regression in `each` and family with empty arrays that have additional properties. (#775, #777)
+
+
+# v1.1.1
+
+Bug Fix:
+
+- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. (#782)
+
+
+# v1.1.0
+
+New Features:
+
+- `cargo` now supports all of the same methods and event callbacks as `queue`.
+- Added `ensureAsync` - A wrapper that ensures an async function calls its callback on a later tick. (#769)
+- Optimized `map`, `eachOf`, and `waterfall` families of functions
+- Passing a `null` or `undefined` array to `map`, `each`, `parallel` and families will be treated as an empty array (#667).
+- The callback is now optional for the composed results of `compose` and `seq`. (#618)
+- Reduced file size by 4kb, (minified version by 1kb)
+- Added code coverage through `nyc` and `coveralls` (#768)
+
+Bug Fixes:
+
+- `forever` will no longer stack overflow with a synchronous iterator (#622)
+- `eachLimit` and other limit functions will stop iterating once an error occurs (#754)
+- Always pass `null` in callbacks when there is no error (#439)
+- Ensure proper conditions when calling `drain()` after pushing an empty data set to a queue (#668)
+- `each` and family will properly handle an empty array (#578)
+- `eachSeries` and family will finish if the underlying array is modified during execution (#557)
+- `queue` will throw if a non-function is passed to `q.push()` (#593)
+- Doc fixes (#629, #766)
+
+
+# v1.0.0
+
+No known breaking changes, we are simply complying with semver from here on out.
+
+Changes:
+
+- Start using a changelog!
+- Add `forEachOf` for iterating over Objects (or to iterate Arrays with indexes available) (#168 #704 #321)
+- Detect deadlocks in `auto` (#663)
+- Better support for require.js (#527)
+- Throw if queue created with concurrency `0` (#714)
+- Fix unneeded iteration in `queue.resume()` (#758)
+- Guard against timer mocking overriding `setImmediate` (#609 #611)
+- Miscellaneous doc fixes (#542 #596 #615 #628 #631 #690 #729)
+- Use single noop function internally (#546)
+- Optimize internal `_each`, `_map` and `_keys` functions.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/LICENSE
new file mode 100644
index 0000000..9fe85b9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2010-2016 Caolan McMahon
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/README.md
new file mode 100644
index 0000000..aece509
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/README.md
@@ -0,0 +1,12 @@
+![Async Logo](https://raw.githubusercontent.com/caolan/async/master/logo/async-logo_readme.jpg)
+
+[![Build Status via Travis CI](https://travis-ci.org/caolan/async.svg?branch=master)](https://travis-ci.org/caolan/async)
+[![NPM version](https://img.shields.io/npm/v/async.svg)](https://www.npmjs.com/package/async)
+[![Coverage Status](https://coveralls.io/repos/caolan/async/badge.svg?branch=master)](https://coveralls.io/r/caolan/async?branch=master)
+[![Join the chat at https://gitter.im/caolan/async](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/caolan/async?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+
+Async is a utility module which provides straight-forward, powerful functions for working with asynchronous JavaScript. Although originally designed for use with [Node.js](https://nodejs.org/) and installable via `npm install --save async`, it can also be used directly in the browser.
+
+For Documentation, visit <http://caolan.github.io/async/>
+
+*For Async v1.5.x documentation, go [HERE](https://github.com/caolan/async/blob/v1.5.2/README.md)*
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/apply.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/apply.js
new file mode 100644
index 0000000..c0c8840
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/apply.js
@@ -0,0 +1,62 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _baseRest = require('lodash/_baseRest');
+
+var _baseRest2 = _interopRequireDefault(_baseRest);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Creates a continuation function with some arguments already applied.
+ *
+ * Useful as a shorthand when combined with other control flow functions. Any
+ * arguments passed to the returned function are added to the arguments
+ * originally passed to apply.
+ *
+ * @name apply
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @category Util
+ * @param {Function} function - The function you want to eventually apply all
+ * arguments to. Invokes with (arguments...).
+ * @param {...*} arguments... - Any number of arguments to automatically apply
+ * when the continuation is called.
+ * @example
+ *
+ * // using apply
+ * async.parallel([
+ * async.apply(fs.writeFile, 'testfile1', 'test1'),
+ * async.apply(fs.writeFile, 'testfile2', 'test2')
+ * ]);
+ *
+ *
+ * // the same process without using apply
+ * async.parallel([
+ * function(callback) {
+ * fs.writeFile('testfile1', 'test1', callback);
+ * },
+ * function(callback) {
+ * fs.writeFile('testfile2', 'test2', callback);
+ * }
+ * ]);
+ *
+ * // It's possible to pass any number of additional arguments when calling the
+ * // continuation:
+ *
+ * node> var fn = async.apply(sys.puts, 'one');
+ * node> fn('two', 'three');
+ * one
+ * two
+ * three
+ */
+exports.default = (0, _baseRest2.default)(function (fn, args) {
+ return (0, _baseRest2.default)(function (callArgs) {
+ return fn.apply(null, args.concat(callArgs));
+ });
+});
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/applyEach.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/applyEach.js
new file mode 100644
index 0000000..6865996
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/applyEach.js
@@ -0,0 +1,51 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _applyEach = require('./internal/applyEach');
+
+var _applyEach2 = _interopRequireDefault(_applyEach);
+
+var _map = require('./map');
+
+var _map2 = _interopRequireDefault(_map);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Applies the provided arguments to each function in the array, calling
+ * `callback` after all functions have completed. If you only provide the first
+ * argument, `fns`, then it will return a function which lets you pass in the
+ * arguments as if it were a single function call. If more arguments are
+ * provided, `callback` is required while `args` is still optional.
+ *
+ * @name applyEach
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {Array|Iterable|Object} fns - A collection of asynchronous functions
+ * to all call with the same arguments
+ * @param {...*} [args] - any number of separate arguments to pass to the
+ * function.
+ * @param {Function} [callback] - the final argument should be the callback,
+ * called when all functions have completed processing.
+ * @returns {Function} - If only the first argument, `fns`, is provided, it will
+ * return a function which lets you pass in the arguments as if it were a single
+ * function call. The signature is `(..args, callback)`. If invoked with any
+ * arguments, `callback` is required.
+ * @example
+ *
+ * async.applyEach([enableSearch, updateSchema], 'bucket', callback);
+ *
+ * // partial application example:
+ * async.each(
+ * buckets,
+ * async.applyEach([enableSearch, updateSchema]),
+ * callback
+ * );
+ */
+exports.default = (0, _applyEach2.default)(_map2.default);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/applyEachSeries.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/applyEachSeries.js
new file mode 100644
index 0000000..989f208
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/applyEachSeries.js
@@ -0,0 +1,37 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _applyEach = require('./internal/applyEach');
+
+var _applyEach2 = _interopRequireDefault(_applyEach);
+
+var _mapSeries = require('./mapSeries');
+
+var _mapSeries2 = _interopRequireDefault(_mapSeries);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time.
+ *
+ * @name applyEachSeries
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.applyEach]{@link module:ControlFlow.applyEach}
+ * @category Control Flow
+ * @param {Array|Iterable|Object} fns - A collection of asynchronous functions to all
+ * call with the same arguments
+ * @param {...*} [args] - any number of separate arguments to pass to the
+ * function.
+ * @param {Function} [callback] - the final argument should be the callback,
+ * called when all functions have completed processing.
+ * @returns {Function} - If only the first argument is provided, it will return
+ * a function which lets you pass in the arguments as if it were a single
+ * function call.
+ */
+exports.default = (0, _applyEach2.default)(_mapSeries2.default);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/asyncify.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/asyncify.js
new file mode 100644
index 0000000..a31fa9f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/asyncify.js
@@ -0,0 +1,93 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = asyncify;
+
+var _isObject = require('lodash/isObject');
+
+var _isObject2 = _interopRequireDefault(_isObject);
+
+var _initialParams = require('./internal/initialParams');
+
+var _initialParams2 = _interopRequireDefault(_initialParams);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Take a sync function and make it async, passing its return value to a
+ * callback. This is useful for plugging sync functions into a waterfall,
+ * series, or other async functions. Any arguments passed to the generated
+ * function will be passed to the wrapped function (except for the final
+ * callback argument). Errors thrown will be passed to the callback.
+ *
+ * If the function passed to `asyncify` returns a Promise, that promises's
+ * resolved/rejected state will be used to call the callback, rather than simply
+ * the synchronous return value.
+ *
+ * This also means you can asyncify ES2016 `async` functions.
+ *
+ * @name asyncify
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @alias wrapSync
+ * @category Util
+ * @param {Function} func - The synchronous function to convert to an
+ * asynchronous function.
+ * @returns {Function} An asynchronous wrapper of the `func`. To be invoked with
+ * (callback).
+ * @example
+ *
+ * // passing a regular synchronous function
+ * async.waterfall([
+ * async.apply(fs.readFile, filename, "utf8"),
+ * async.asyncify(JSON.parse),
+ * function (data, next) {
+ * // data is the result of parsing the text.
+ * // If there was a parsing error, it would have been caught.
+ * }
+ * ], callback);
+ *
+ * // passing a function returning a promise
+ * async.waterfall([
+ * async.apply(fs.readFile, filename, "utf8"),
+ * async.asyncify(function (contents) {
+ * return db.model.create(contents);
+ * }),
+ * function (model, next) {
+ * // `model` is the instantiated model object.
+ * // If there was an error, this function would be skipped.
+ * }
+ * ], callback);
+ *
+ * // es6 example
+ * var q = async.queue(async.asyncify(async function(file) {
+ * var intermediateStep = await processFile(file);
+ * return await somePromise(intermediateStep)
+ * }));
+ *
+ * q.push(files);
+ */
+function asyncify(func) {
+ return (0, _initialParams2.default)(function (args, callback) {
+ var result;
+ try {
+ result = func.apply(this, args);
+ } catch (e) {
+ return callback(e);
+ }
+ // if result is Promise object
+ if ((0, _isObject2.default)(result) && typeof result.then === 'function') {
+ result.then(function (value) {
+ callback(null, value);
+ }, function (err) {
+ callback(err.message ? err : new Error(err));
+ });
+ } else {
+ callback(null, result);
+ }
+ });
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/auto.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/auto.js
new file mode 100644
index 0000000..e1572dd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/auto.js
@@ -0,0 +1,285 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+exports.default = function (tasks, concurrency, callback) {
+ if (typeof concurrency === 'function') {
+ // concurrency is optional, shift the args.
+ callback = concurrency;
+ concurrency = null;
+ }
+ callback = (0, _once2.default)(callback || _noop2.default);
+ var keys = (0, _keys2.default)(tasks);
+ var numTasks = keys.length;
+ if (!numTasks) {
+ return callback(null);
+ }
+ if (!concurrency) {
+ concurrency = numTasks;
+ }
+
+ var results = {};
+ var runningTasks = 0;
+ var hasError = false;
+
+ var listeners = {};
+
+ var readyTasks = [];
+
+ // for cycle detection:
+ var readyToCheck = []; // tasks that have been identified as reachable
+ // without the possibility of returning to an ancestor task
+ var uncheckedDependencies = {};
+
+ (0, _baseForOwn2.default)(tasks, function (task, key) {
+ if (!(0, _isArray2.default)(task)) {
+ // no dependencies
+ enqueueTask(key, [task]);
+ readyToCheck.push(key);
+ return;
+ }
+
+ var dependencies = task.slice(0, task.length - 1);
+ var remainingDependencies = dependencies.length;
+ if (remainingDependencies === 0) {
+ enqueueTask(key, task);
+ readyToCheck.push(key);
+ return;
+ }
+ uncheckedDependencies[key] = remainingDependencies;
+
+ (0, _arrayEach2.default)(dependencies, function (dependencyName) {
+ if (!tasks[dependencyName]) {
+ throw new Error('async.auto task `' + key + '` has a non-existent dependency in ' + dependencies.join(', '));
+ }
+ addListener(dependencyName, function () {
+ remainingDependencies--;
+ if (remainingDependencies === 0) {
+ enqueueTask(key, task);
+ }
+ });
+ });
+ });
+
+ checkForDeadlocks();
+ processQueue();
+
+ function enqueueTask(key, task) {
+ readyTasks.push(function () {
+ runTask(key, task);
+ });
+ }
+
+ function processQueue() {
+ if (readyTasks.length === 0 && runningTasks === 0) {
+ return callback(null, results);
+ }
+ while (readyTasks.length && runningTasks < concurrency) {
+ var run = readyTasks.shift();
+ run();
+ }
+ }
+
+ function addListener(taskName, fn) {
+ var taskListeners = listeners[taskName];
+ if (!taskListeners) {
+ taskListeners = listeners[taskName] = [];
+ }
+
+ taskListeners.push(fn);
+ }
+
+ function taskComplete(taskName) {
+ var taskListeners = listeners[taskName] || [];
+ (0, _arrayEach2.default)(taskListeners, function (fn) {
+ fn();
+ });
+ processQueue();
+ }
+
+ function runTask(key, task) {
+ if (hasError) return;
+
+ var taskCallback = (0, _onlyOnce2.default)((0, _baseRest2.default)(function (err, args) {
+ runningTasks--;
+ if (args.length <= 1) {
+ args = args[0];
+ }
+ if (err) {
+ var safeResults = {};
+ (0, _baseForOwn2.default)(results, function (val, rkey) {
+ safeResults[rkey] = val;
+ });
+ safeResults[key] = args;
+ hasError = true;
+ listeners = [];
+
+ callback(err, safeResults);
+ } else {
+ results[key] = args;
+ taskComplete(key);
+ }
+ }));
+
+ runningTasks++;
+ var taskFn = task[task.length - 1];
+ if (task.length > 1) {
+ taskFn(results, taskCallback);
+ } else {
+ taskFn(taskCallback);
+ }
+ }
+
+ function checkForDeadlocks() {
+ // Kahn's algorithm
+ // https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm
+ // http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html
+ var currentTask;
+ var counter = 0;
+ while (readyToCheck.length) {
+ currentTask = readyToCheck.pop();
+ counter++;
+ (0, _arrayEach2.default)(getDependents(currentTask), function (dependent) {
+ if (--uncheckedDependencies[dependent] === 0) {
+ readyToCheck.push(dependent);
+ }
+ });
+ }
+
+ if (counter !== numTasks) {
+ throw new Error('async.auto cannot execute tasks due to a recursive dependency');
+ }
+ }
+
+ function getDependents(taskName) {
+ var result = [];
+ (0, _baseForOwn2.default)(tasks, function (task, key) {
+ if ((0, _isArray2.default)(task) && (0, _baseIndexOf2.default)(task, taskName, 0) >= 0) {
+ result.push(key);
+ }
+ });
+ return result;
+ }
+};
+
+var _arrayEach = require('lodash/_arrayEach');
+
+var _arrayEach2 = _interopRequireDefault(_arrayEach);
+
+var _baseForOwn = require('lodash/_baseForOwn');
+
+var _baseForOwn2 = _interopRequireDefault(_baseForOwn);
+
+var _baseIndexOf = require('lodash/_baseIndexOf');
+
+var _baseIndexOf2 = _interopRequireDefault(_baseIndexOf);
+
+var _isArray = require('lodash/isArray');
+
+var _isArray2 = _interopRequireDefault(_isArray);
+
+var _keys = require('lodash/keys');
+
+var _keys2 = _interopRequireDefault(_keys);
+
+var _noop = require('lodash/noop');
+
+var _noop2 = _interopRequireDefault(_noop);
+
+var _baseRest = require('lodash/_baseRest');
+
+var _baseRest2 = _interopRequireDefault(_baseRest);
+
+var _once = require('./internal/once');
+
+var _once2 = _interopRequireDefault(_once);
+
+var _onlyOnce = require('./internal/onlyOnce');
+
+var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+module.exports = exports['default'];
+
+/**
+ * Determines the best order for running the functions in `tasks`, based on
+ * their requirements. Each function can optionally depend on other functions
+ * being completed first, and each function is run as soon as its requirements
+ * are satisfied.
+ *
+ * If any of the functions pass an error to their callback, the `auto` sequence
+ * will stop. Further tasks will not execute (so any other functions depending
+ * on it will not run), and the main `callback` is immediately called with the
+ * error.
+ *
+ * Functions also receive an object containing the results of functions which
+ * have completed so far as the first argument, if they have dependencies. If a
+ * task function has no dependencies, it will only be passed a callback.
+ *
+ * @name auto
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {Object} tasks - An object. Each of its properties is either a
+ * function or an array of requirements, with the function itself the last item
+ * in the array. The object's key of a property serves as the name of the task
+ * defined by that property, i.e. can be used when specifying requirements for
+ * other tasks. The function receives one or two arguments:
+ * * a `results` object, containing the results of the previously executed
+ * functions, only passed if the task has any dependencies,
+ * * a `callback(err, result)` function, which must be called when finished,
+ * passing an `error` (which can be `null`) and the result of the function's
+ * execution.
+ * @param {number} [concurrency=Infinity] - An optional `integer` for
+ * determining the maximum number of tasks that can be run in parallel. By
+ * default, as many as possible.
+ * @param {Function} [callback] - An optional callback which is called when all
+ * the tasks have been completed. It receives the `err` argument if any `tasks`
+ * pass an error to their callback. Results are always returned; however, if an
+ * error occurs, no further `tasks` will be performed, and the results object
+ * will only contain partial results. Invoked with (err, results).
+ * @returns undefined
+ * @example
+ *
+ * async.auto({
+ * // this function will just be passed a callback
+ * readData: async.apply(fs.readFile, 'data.txt', 'utf-8'),
+ * showData: ['readData', function(results, cb) {
+ * // results.readData is the file's contents
+ * // ...
+ * }]
+ * }, callback);
+ *
+ * async.auto({
+ * get_data: function(callback) {
+ * console.log('in get_data');
+ * // async code to get some data
+ * callback(null, 'data', 'converted to array');
+ * },
+ * make_folder: function(callback) {
+ * console.log('in make_folder');
+ * // async code to create a directory to store a file in
+ * // this is run at the same time as getting the data
+ * callback(null, 'folder');
+ * },
+ * write_file: ['get_data', 'make_folder', function(results, callback) {
+ * console.log('in write_file', JSON.stringify(results));
+ * // once there is some data and the directory exists,
+ * // write the data to a file in the directory
+ * callback(null, 'filename');
+ * }],
+ * email_link: ['write_file', function(results, callback) {
+ * console.log('in email_link', JSON.stringify(results));
+ * // once the file is written let's email a link to it...
+ * // results.write_file contains the filename returned by write_file.
+ * callback(null, {'file':results.write_file, 'email':'user@example.com'});
+ * }]
+ * }, function(err, results) {
+ * console.log('err = ', err);
+ * console.log('results = ', results);
+ * });
+ */ \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/autoInject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/autoInject.js
new file mode 100644
index 0000000..b9d1eaa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/autoInject.js
@@ -0,0 +1,167 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = autoInject;
+
+var _auto = require('./auto');
+
+var _auto2 = _interopRequireDefault(_auto);
+
+var _baseForOwn = require('lodash/_baseForOwn');
+
+var _baseForOwn2 = _interopRequireDefault(_baseForOwn);
+
+var _arrayMap = require('lodash/_arrayMap');
+
+var _arrayMap2 = _interopRequireDefault(_arrayMap);
+
+var _copyArray = require('lodash/_copyArray');
+
+var _copyArray2 = _interopRequireDefault(_copyArray);
+
+var _isArray = require('lodash/isArray');
+
+var _isArray2 = _interopRequireDefault(_isArray);
+
+var _trim = require('lodash/trim');
+
+var _trim2 = _interopRequireDefault(_trim);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var FN_ARGS = /^(function)?\s*[^\(]*\(\s*([^\)]*)\)/m;
+var FN_ARG_SPLIT = /,/;
+var FN_ARG = /(=.+)?(\s*)$/;
+var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
+
+function parseParams(func) {
+ func = func.toString().replace(STRIP_COMMENTS, '');
+ func = func.match(FN_ARGS)[2].replace(' ', '');
+ func = func ? func.split(FN_ARG_SPLIT) : [];
+ func = func.map(function (arg) {
+ return (0, _trim2.default)(arg.replace(FN_ARG, ''));
+ });
+ return func;
+}
+
+/**
+ * A dependency-injected version of the [async.auto]{@link module:ControlFlow.auto} function. Dependent
+ * tasks are specified as parameters to the function, after the usual callback
+ * parameter, with the parameter names matching the names of the tasks it
+ * depends on. This can provide even more readable task graphs which can be
+ * easier to maintain.
+ *
+ * If a final callback is specified, the task results are similarly injected,
+ * specified as named parameters after the initial error parameter.
+ *
+ * The autoInject function is purely syntactic sugar and its semantics are
+ * otherwise equivalent to [async.auto]{@link module:ControlFlow.auto}.
+ *
+ * @name autoInject
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.auto]{@link module:ControlFlow.auto}
+ * @category Control Flow
+ * @param {Object} tasks - An object, each of whose properties is a function of
+ * the form 'func([dependencies...], callback). The object's key of a property
+ * serves as the name of the task defined by that property, i.e. can be used
+ * when specifying requirements for other tasks.
+ * * The `callback` parameter is a `callback(err, result)` which must be called
+ * when finished, passing an `error` (which can be `null`) and the result of
+ * the function's execution. The remaining parameters name other tasks on
+ * which the task is dependent, and the results from those tasks are the
+ * arguments of those parameters.
+ * @param {Function} [callback] - An optional callback which is called when all
+ * the tasks have been completed. It receives the `err` argument if any `tasks`
+ * pass an error to their callback, and a `results` object with any completed
+ * task results, similar to `auto`.
+ * @example
+ *
+ * // The example from `auto` can be rewritten as follows:
+ * async.autoInject({
+ * get_data: function(callback) {
+ * // async code to get some data
+ * callback(null, 'data', 'converted to array');
+ * },
+ * make_folder: function(callback) {
+ * // async code to create a directory to store a file in
+ * // this is run at the same time as getting the data
+ * callback(null, 'folder');
+ * },
+ * write_file: function(get_data, make_folder, callback) {
+ * // once there is some data and the directory exists,
+ * // write the data to a file in the directory
+ * callback(null, 'filename');
+ * },
+ * email_link: function(write_file, callback) {
+ * // once the file is written let's email a link to it...
+ * // write_file contains the filename returned by write_file.
+ * callback(null, {'file':write_file, 'email':'user@example.com'});
+ * }
+ * }, function(err, results) {
+ * console.log('err = ', err);
+ * console.log('email_link = ', results.email_link);
+ * });
+ *
+ * // If you are using a JS minifier that mangles parameter names, `autoInject`
+ * // will not work with plain functions, since the parameter names will be
+ * // collapsed to a single letter identifier. To work around this, you can
+ * // explicitly specify the names of the parameters your task function needs
+ * // in an array, similar to Angular.js dependency injection.
+ *
+ * // This still has an advantage over plain `auto`, since the results a task
+ * // depends on are still spread into arguments.
+ * async.autoInject({
+ * //...
+ * write_file: ['get_data', 'make_folder', function(get_data, make_folder, callback) {
+ * callback(null, 'filename');
+ * }],
+ * email_link: ['write_file', function(write_file, callback) {
+ * callback(null, {'file':write_file, 'email':'user@example.com'});
+ * }]
+ * //...
+ * }, function(err, results) {
+ * console.log('err = ', err);
+ * console.log('email_link = ', results.email_link);
+ * });
+ */
+function autoInject(tasks, callback) {
+ var newTasks = {};
+
+ (0, _baseForOwn2.default)(tasks, function (taskFn, key) {
+ var params;
+
+ if ((0, _isArray2.default)(taskFn)) {
+ params = (0, _copyArray2.default)(taskFn);
+ taskFn = params.pop();
+
+ newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn);
+ } else if (taskFn.length === 1) {
+ // no dependencies, use the function as-is
+ newTasks[key] = taskFn;
+ } else {
+ params = parseParams(taskFn);
+ if (taskFn.length === 0 && params.length === 0) {
+ throw new Error("autoInject task functions require explicit parameters.");
+ }
+
+ params.pop();
+
+ newTasks[key] = params.concat(newTask);
+ }
+
+ function newTask(results, taskCb) {
+ var newArgs = (0, _arrayMap2.default)(params, function (name) {
+ return results[name];
+ });
+ newArgs.push(taskCb);
+ taskFn.apply(null, newArgs);
+ }
+ });
+
+ (0, _auto2.default)(newTasks, callback);
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/bower.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/bower.json
new file mode 100644
index 0000000..7dbeb14
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/bower.json
@@ -0,0 +1,17 @@
+{
+ "name": "async",
+ "main": "dist/async.js",
+ "ignore": [
+ "bower_components",
+ "lib",
+ "mocha_test",
+ "node_modules",
+ "perf",
+ "support",
+ "**/.*",
+ "*.config.js",
+ "*.json",
+ "index.js",
+ "Makefile"
+ ]
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/cargo.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/cargo.js
new file mode 100644
index 0000000..70e71a2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/cargo.js
@@ -0,0 +1,95 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = cargo;
+
+var _queue = require('./internal/queue');
+
+var _queue2 = _interopRequireDefault(_queue);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * A cargo of tasks for the worker function to complete. Cargo inherits all of
+ * the same methods and event callbacks as [`queue`]{@link module:ControlFlow.queue}.
+ * @typedef {Object} CargoObject
+ * @memberOf module:ControlFlow
+ * @property {Function} length - A function returning the number of items
+ * waiting to be processed. Invoke like `cargo.length()`.
+ * @property {number} payload - An `integer` for determining how many tasks
+ * should be process per round. This property can be changed after a `cargo` is
+ * created to alter the payload on-the-fly.
+ * @property {Function} push - Adds `task` to the `queue`. The callback is
+ * called once the `worker` has finished processing the task. Instead of a
+ * single task, an array of `tasks` can be submitted. The respective callback is
+ * used for every task in the list. Invoke like `cargo.push(task, [callback])`.
+ * @property {Function} saturated - A callback that is called when the
+ * `queue.length()` hits the concurrency and further tasks will be queued.
+ * @property {Function} empty - A callback that is called when the last item
+ * from the `queue` is given to a `worker`.
+ * @property {Function} drain - A callback that is called when the last item
+ * from the `queue` has returned from the `worker`.
+ * @property {Function} idle - a function returning false if there are items
+ * waiting or being processed, or true if not. Invoke like `cargo.idle()`.
+ * @property {Function} pause - a function that pauses the processing of tasks
+ * until `resume()` is called. Invoke like `cargo.pause()`.
+ * @property {Function} resume - a function that resumes the processing of
+ * queued tasks when the queue is paused. Invoke like `cargo.resume()`.
+ * @property {Function} kill - a function that removes the `drain` callback and
+ * empties remaining tasks from the queue forcing it to go idle. Invoke like `cargo.kill()`.
+ */
+
+/**
+ * Creates a `cargo` object with the specified payload. Tasks added to the
+ * cargo will be processed altogether (up to the `payload` limit). If the
+ * `worker` is in progress, the task is queued until it becomes available. Once
+ * the `worker` has completed some tasks, each callback of those tasks is
+ * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966)
+ * for how `cargo` and `queue` work.
+ *
+ * While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers
+ * at a time, cargo passes an array of tasks to a single worker, repeating
+ * when the worker is finished.
+ *
+ * @name cargo
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.queue]{@link module:ControlFlow.queue}
+ * @category Control Flow
+ * @param {Function} worker - An asynchronous function for processing an array
+ * of queued tasks, which must call its `callback(err)` argument when finished,
+ * with an optional `err` argument. Invoked with `(tasks, callback)`.
+ * @param {number} [payload=Infinity] - An optional `integer` for determining
+ * how many tasks should be processed per round; if omitted, the default is
+ * unlimited.
+ * @returns {module:ControlFlow.CargoObject} A cargo object to manage the tasks. Callbacks can
+ * attached as certain properties to listen for specific events during the
+ * lifecycle of the cargo and inner queue.
+ * @example
+ *
+ * // create a cargo object with payload 2
+ * var cargo = async.cargo(function(tasks, callback) {
+ * for (var i=0; i<tasks.length; i++) {
+ * console.log('hello ' + tasks[i].name);
+ * }
+ * callback();
+ * }, 2);
+ *
+ * // add some items
+ * cargo.push({name: 'foo'}, function(err) {
+ * console.log('finished processing foo');
+ * });
+ * cargo.push({name: 'bar'}, function(err) {
+ * console.log('finished processing bar');
+ * });
+ * cargo.push({name: 'baz'}, function(err) {
+ * console.log('finished processing baz');
+ * });
+ */
+function cargo(worker, payload) {
+ return (0, _queue2.default)(worker, 1, payload);
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/compose.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/compose.js
new file mode 100644
index 0000000..65b26bb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/compose.js
@@ -0,0 +1,55 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _seq = require('./seq');
+
+var _seq2 = _interopRequireDefault(_seq);
+
+var _baseRest = require('lodash/_baseRest');
+
+var _baseRest2 = _interopRequireDefault(_baseRest);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Creates a function which is a composition of the passed asynchronous
+ * functions. Each function consumes the return value of the function that
+ * follows. Composing functions `f()`, `g()`, and `h()` would produce the result
+ * of `f(g(h()))`, only this version uses callbacks to obtain the return values.
+ *
+ * Each function is executed with the `this` binding of the composed function.
+ *
+ * @name compose
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {...Function} functions - the asynchronous functions to compose
+ * @returns {Function} an asynchronous function that is the composed
+ * asynchronous `functions`
+ * @example
+ *
+ * function add1(n, callback) {
+ * setTimeout(function () {
+ * callback(null, n + 1);
+ * }, 10);
+ * }
+ *
+ * function mul3(n, callback) {
+ * setTimeout(function () {
+ * callback(null, n * 3);
+ * }, 10);
+ * }
+ *
+ * var add1mul3 = async.compose(mul3, add1);
+ * add1mul3(4, function (err, result) {
+ * // result now equals 15
+ * });
+ */
+exports.default = (0, _baseRest2.default)(function (args) {
+ return _seq2.default.apply(null, args.reverse());
+});
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/concat.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/concat.js
new file mode 100644
index 0000000..8dc741c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/concat.js
@@ -0,0 +1,45 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _concat = require('./internal/concat');
+
+var _concat2 = _interopRequireDefault(_concat);
+
+var _doParallel = require('./internal/doParallel');
+
+var _doParallel2 = _interopRequireDefault(_doParallel);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Applies `iteratee` to each item in `coll`, concatenating the results. Returns
+ * the concatenated list. The `iteratee`s are called in parallel, and the
+ * results are concatenated as they return. There is no guarantee that the
+ * results array will be returned in the original order of `coll` passed to the
+ * `iteratee` function.
+ *
+ * @name concat
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A function to apply to each item in `coll`.
+ * The iteratee is passed a `callback(err, results)` which must be called once
+ * it has completed with an error (which can be `null`) and an array of results.
+ * Invoked with (item, callback).
+ * @param {Function} [callback(err)] - A callback which is called after all the
+ * `iteratee` functions have finished, or an error occurs. Results is an array
+ * containing the concatenated results of the `iteratee` function. Invoked with
+ * (err, results).
+ * @example
+ *
+ * async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files) {
+ * // files is now a list of filenames that exist in the 3 directories
+ * });
+ */
+exports.default = (0, _doParallel2.default)(_concat2.default);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/concatSeries.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/concatSeries.js
new file mode 100644
index 0000000..9daf0a0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/concatSeries.js
@@ -0,0 +1,37 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _concat = require('./internal/concat');
+
+var _concat2 = _interopRequireDefault(_concat);
+
+var _doSeries = require('./internal/doSeries');
+
+var _doSeries2 = _interopRequireDefault(_doSeries);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time.
+ *
+ * @name concatSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.concat]{@link module:Collections.concat}
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A function to apply to each item in `coll`.
+ * The iteratee is passed a `callback(err, results)` which must be called once
+ * it has completed with an error (which can be `null`) and an array of results.
+ * Invoked with (item, callback).
+ * @param {Function} [callback(err)] - A callback which is called after all the
+ * `iteratee` functions have finished, or an error occurs. Results is an array
+ * containing the concatenated results of the `iteratee` function. Invoked with
+ * (err, results).
+ */
+exports.default = (0, _doSeries2.default)(_concat2.default);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/constant.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/constant.js
new file mode 100644
index 0000000..d130ca6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/constant.js
@@ -0,0 +1,65 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _baseRest = require('lodash/_baseRest');
+
+var _baseRest2 = _interopRequireDefault(_baseRest);
+
+var _initialParams = require('./internal/initialParams');
+
+var _initialParams2 = _interopRequireDefault(_initialParams);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Returns a function that when called, calls-back with the values provided.
+ * Useful as the first function in a [`waterfall`]{@link module:ControlFlow.waterfall}, or for plugging values in to
+ * [`auto`]{@link module:ControlFlow.auto}.
+ *
+ * @name constant
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @category Util
+ * @param {...*} arguments... - Any number of arguments to automatically invoke
+ * callback with.
+ * @returns {Function} Returns a function that when invoked, automatically
+ * invokes the callback with the previous given arguments.
+ * @example
+ *
+ * async.waterfall([
+ * async.constant(42),
+ * function (value, next) {
+ * // value === 42
+ * },
+ * //...
+ * ], callback);
+ *
+ * async.waterfall([
+ * async.constant(filename, "utf8"),
+ * fs.readFile,
+ * function (fileData, next) {
+ * //...
+ * }
+ * //...
+ * ], callback);
+ *
+ * async.auto({
+ * hostname: async.constant("https://server.net/"),
+ * port: findFreePort,
+ * launchServer: ["hostname", "port", function (options, cb) {
+ * startServer(options, cb);
+ * }],
+ * //...
+ * }, callback);
+ */
+exports.default = (0, _baseRest2.default)(function (values) {
+ var args = [null].concat(values);
+ return (0, _initialParams2.default)(function (ignoredArgs, callback) {
+ return callback.apply(this, args);
+ });
+});
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/detect.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/detect.js
new file mode 100644
index 0000000..2539ba5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/detect.js
@@ -0,0 +1,61 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _identity = require('lodash/identity');
+
+var _identity2 = _interopRequireDefault(_identity);
+
+var _createTester = require('./internal/createTester');
+
+var _createTester2 = _interopRequireDefault(_createTester);
+
+var _eachOf = require('./eachOf');
+
+var _eachOf2 = _interopRequireDefault(_eachOf);
+
+var _findGetResult = require('./internal/findGetResult');
+
+var _findGetResult2 = _interopRequireDefault(_findGetResult);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Returns the first value in `coll` that passes an async truth test. The
+ * `iteratee` is applied in parallel, meaning the first iteratee to return
+ * `true` will fire the detect `callback` with that result. That means the
+ * result might not be the first item in the original `coll` (in terms of order)
+ * that passes the test.
+
+ * If order within the original `coll` is important, then look at
+ * [`detectSeries`]{@link module:Collections.detectSeries}.
+ *
+ * @name detect
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @alias find
+ * @category Collections
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A truth test to apply to each item in `coll`.
+ * The iteratee is passed a `callback(err, truthValue)` which must be called
+ * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called as soon as any
+ * iteratee returns `true`, or after all the `iteratee` functions have finished.
+ * Result will be the first item in the array that passes the truth test
+ * (iteratee) or the value `undefined` if none passed. Invoked with
+ * (err, result).
+ * @example
+ *
+ * async.detect(['file1','file2','file3'], function(filePath, callback) {
+ * fs.access(filePath, function(err) {
+ * callback(null, !err)
+ * });
+ * }, function(err, result) {
+ * // result now equals the first file in the list that exists
+ * });
+ */
+exports.default = (0, _createTester2.default)(_eachOf2.default, _identity2.default, _findGetResult2.default);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/detectLimit.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/detectLimit.js
new file mode 100644
index 0000000..37aaf53
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/detectLimit.js
@@ -0,0 +1,48 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _identity = require('lodash/identity');
+
+var _identity2 = _interopRequireDefault(_identity);
+
+var _createTester = require('./internal/createTester');
+
+var _createTester2 = _interopRequireDefault(_createTester);
+
+var _eachOfLimit = require('./eachOfLimit');
+
+var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
+
+var _findGetResult = require('./internal/findGetResult');
+
+var _findGetResult2 = _interopRequireDefault(_findGetResult);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a
+ * time.
+ *
+ * @name detectLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.detect]{@link module:Collections.detect}
+ * @alias findLimit
+ * @category Collections
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {Function} iteratee - A truth test to apply to each item in `coll`.
+ * The iteratee is passed a `callback(err, truthValue)` which must be called
+ * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called as soon as any
+ * iteratee returns `true`, or after all the `iteratee` functions have finished.
+ * Result will be the first item in the array that passes the truth test
+ * (iteratee) or the value `undefined` if none passed. Invoked with
+ * (err, result).
+ */
+exports.default = (0, _createTester2.default)(_eachOfLimit2.default, _identity2.default, _findGetResult2.default);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/detectSeries.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/detectSeries.js
new file mode 100644
index 0000000..686b1ae
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/detectSeries.js
@@ -0,0 +1,46 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _identity = require('lodash/identity');
+
+var _identity2 = _interopRequireDefault(_identity);
+
+var _createTester = require('./internal/createTester');
+
+var _createTester2 = _interopRequireDefault(_createTester);
+
+var _eachOfSeries = require('./eachOfSeries');
+
+var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries);
+
+var _findGetResult = require('./internal/findGetResult');
+
+var _findGetResult2 = _interopRequireDefault(_findGetResult);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time.
+ *
+ * @name detectSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.detect]{@link module:Collections.detect}
+ * @alias findSeries
+ * @category Collections
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A truth test to apply to each item in `coll`.
+ * The iteratee is passed a `callback(err, truthValue)` which must be called
+ * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called as soon as any
+ * iteratee returns `true`, or after all the `iteratee` functions have finished.
+ * Result will be the first item in the array that passes the truth test
+ * (iteratee) or the value `undefined` if none passed. Invoked with
+ * (err, result).
+ */
+exports.default = (0, _createTester2.default)(_eachOfSeries2.default, _identity2.default, _findGetResult2.default);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/dir.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/dir.js
new file mode 100644
index 0000000..bfdf41c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/dir.js
@@ -0,0 +1,42 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _consoleFunc = require('./internal/consoleFunc');
+
+var _consoleFunc2 = _interopRequireDefault(_consoleFunc);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Logs the result of an `async` function to the `console` using `console.dir`
+ * to display the properties of the resulting object. Only works in Node.js or
+ * in browsers that support `console.dir` and `console.error` (such as FF and
+ * Chrome). If multiple arguments are returned from the async function,
+ * `console.dir` is called on each argument in order.
+ *
+ * @name dir
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @category Util
+ * @param {Function} function - The function you want to eventually apply all
+ * arguments to.
+ * @param {...*} arguments... - Any number of arguments to apply to the function.
+ * @example
+ *
+ * // in a module
+ * var hello = function(name, callback) {
+ * setTimeout(function() {
+ * callback(null, {hello: name});
+ * }, 1000);
+ * };
+ *
+ * // in the node repl
+ * node> async.dir(hello, 'world');
+ * {hello: 'world'}
+ */
+exports.default = (0, _consoleFunc2.default)('dir');
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/dist/async.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/dist/async.js
new file mode 100644
index 0000000..bb95651
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/dist/async.js
@@ -0,0 +1,5427 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
+ (factory((global.async = global.async || {})));
+}(this, (function (exports) { 'use strict';
+
+/**
+ * This method returns the first argument it receives.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ *
+ * console.log(_.identity(object) === object);
+ * // => true
+ */
+function identity(value) {
+ return value;
+}
+
+/**
+ * A faster alternative to `Function#apply`, this function invokes `func`
+ * with the `this` binding of `thisArg` and the arguments of `args`.
+ *
+ * @private
+ * @param {Function} func The function to invoke.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} args The arguments to invoke `func` with.
+ * @returns {*} Returns the result of `func`.
+ */
+function apply(func, thisArg, args) {
+ switch (args.length) {
+ case 0: return func.call(thisArg);
+ case 1: return func.call(thisArg, args[0]);
+ case 2: return func.call(thisArg, args[0], args[1]);
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
+ }
+ return func.apply(thisArg, args);
+}
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * A specialized version of `baseRest` which transforms the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @param {Function} transform The rest array transform.
+ * @returns {Function} Returns the new function.
+ */
+function overRest(func, start, transform) {
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ index = -1;
+ var otherArgs = Array(start + 1);
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = transform(array);
+ return apply(func, this, otherArgs);
+ };
+}
+
+/**
+ * Creates a function that returns `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {*} value The value to return from the new function.
+ * @returns {Function} Returns the new constant function.
+ * @example
+ *
+ * var objects = _.times(2, _.constant({ 'a': 1 }));
+ *
+ * console.log(objects);
+ * // => [{ 'a': 1 }, { 'a': 1 }]
+ *
+ * console.log(objects[0] === objects[1]);
+ * // => true
+ */
+function constant(value) {
+ return function() {
+ return value;
+ };
+}
+
+/**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+function isObject(value) {
+ var type = typeof value;
+ return value != null && (type == 'object' || type == 'function');
+}
+
+/** `Object#toString` result references. */
+var funcTag = '[object Function]';
+var genTag = '[object GeneratorFunction]';
+var proxyTag = '[object Proxy]';
+
+/** Used for built-in method references. */
+var objectProto$1 = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto$1.toString;
+
+/**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+function isFunction(value) {
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 9 which returns 'object' for typed array and other constructors.
+ var tag = isObject(value) ? objectToString.call(value) : '';
+ return tag == funcTag || tag == genTag || tag == proxyTag;
+}
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+/** Detect free variable `self`. */
+var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+/** Used as a reference to the global object. */
+var root = freeGlobal || freeSelf || Function('return this')();
+
+/** Used to detect overreaching core-js shims. */
+var coreJsData = root['__core-js_shared__'];
+
+/** Used to detect methods masquerading as native. */
+var maskSrcKey = (function() {
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
+ return uid ? ('Symbol(src)_1.' + uid) : '';
+}());
+
+/**
+ * Checks if `func` has its source masked.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
+ */
+function isMasked(func) {
+ return !!maskSrcKey && (maskSrcKey in func);
+}
+
+/** Used for built-in method references. */
+var funcProto$1 = Function.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString$1 = funcProto$1.toString;
+
+/**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to process.
+ * @returns {string} Returns the source code.
+ */
+function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString$1.call(func);
+ } catch (e) {}
+ try {
+ return (func + '');
+ } catch (e) {}
+ }
+ return '';
+}
+
+/**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
+ */
+var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
+
+/** Used to detect host constructors (Safari). */
+var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+/** Used for built-in method references. */
+var funcProto = Function.prototype;
+var objectProto = Object.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString = funcProto.toString;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/** Used to detect if a method is native. */
+var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+);
+
+/**
+ * The base implementation of `_.isNative` without bad shim checks.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ */
+function baseIsNative(value) {
+ if (!isObject(value) || isMasked(value)) {
+ return false;
+ }
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
+}
+
+/**
+ * Gets the value at `key` of `object`.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+function getValue(object, key) {
+ return object == null ? undefined : object[key];
+}
+
+/**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+function getNative(object, key) {
+ var value = getValue(object, key);
+ return baseIsNative(value) ? value : undefined;
+}
+
+var defineProperty = (function() {
+ try {
+ var func = getNative(Object, 'defineProperty');
+ func({}, '', {});
+ return func;
+ } catch (e) {}
+}());
+
+/**
+ * The base implementation of `setToString` without support for hot loop shorting.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+var baseSetToString = !defineProperty ? identity : function(func, string) {
+ return defineProperty(func, 'toString', {
+ 'configurable': true,
+ 'enumerable': false,
+ 'value': constant(string),
+ 'writable': true
+ });
+};
+
+/** Used to detect hot functions by number of calls within a span of milliseconds. */
+var HOT_COUNT = 500;
+var HOT_SPAN = 16;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeNow = Date.now;
+
+/**
+ * Creates a function that'll short out and invoke `identity` instead
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
+ * milliseconds.
+ *
+ * @private
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new shortable function.
+ */
+function shortOut(func) {
+ var count = 0,
+ lastCalled = 0;
+
+ return function() {
+ var stamp = nativeNow(),
+ remaining = HOT_SPAN - (stamp - lastCalled);
+
+ lastCalled = stamp;
+ if (remaining > 0) {
+ if (++count >= HOT_COUNT) {
+ return arguments[0];
+ }
+ } else {
+ count = 0;
+ }
+ return func.apply(undefined, arguments);
+ };
+}
+
+/**
+ * Sets the `toString` method of `func` to return `string`.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+var setToString = shortOut(baseSetToString);
+
+/**
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ */
+function baseRest$1(func, start) {
+ return setToString(overRest(func, start, identity), func + '');
+}
+
+var initialParams = function (fn) {
+ return baseRest$1(function (args /*..., callback*/) {
+ var callback = args.pop();
+ fn.call(this, args, callback);
+ });
+};
+
+function applyEach$1(eachfn) {
+ return baseRest$1(function (fns, args) {
+ var go = initialParams(function (args, callback) {
+ var that = this;
+ return eachfn(fns, function (fn, cb) {
+ fn.apply(that, args.concat([cb]));
+ }, callback);
+ });
+ if (args.length) {
+ return go.apply(this, args);
+ } else {
+ return go;
+ }
+ });
+}
+
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+function isArrayLike(value) {
+ return value != null && isLength(value.length) && !isFunction(value);
+}
+
+/**
+ * This method returns `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Util
+ * @example
+ *
+ * _.times(2, _.noop);
+ * // => [undefined, undefined]
+ */
+function noop() {
+ // No operation performed.
+}
+
+function once(fn) {
+ return function () {
+ if (fn === null) return;
+ var callFn = fn;
+ fn = null;
+ callFn.apply(this, arguments);
+ };
+}
+
+var iteratorSymbol = typeof Symbol === 'function' && Symbol.iterator;
+
+var getIterator = function (coll) {
+ return iteratorSymbol && coll[iteratorSymbol] && coll[iteratorSymbol]();
+};
+
+/**
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
+ *
+ * @private
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ */
+function baseTimes(n, iteratee) {
+ var index = -1,
+ result = Array(n);
+
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+ return result;
+}
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return value != null && typeof value == 'object';
+}
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]';
+
+/** Used for built-in method references. */
+var objectProto$4 = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString$1 = objectProto$4.toString;
+
+/**
+ * The base implementation of `_.isArguments`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ */
+function baseIsArguments(value) {
+ return isObjectLike(value) && objectToString$1.call(value) == argsTag;
+}
+
+/** Used for built-in method references. */
+var objectProto$3 = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
+
+/** Built-in value references. */
+var propertyIsEnumerable = objectProto$3.propertyIsEnumerable;
+
+/**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ * else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
+ return isObjectLike(value) && hasOwnProperty$2.call(value, 'callee') &&
+ !propertyIsEnumerable.call(value, 'callee');
+};
+
+/**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+var isArray = Array.isArray;
+
+/**
+ * This method returns `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `false`.
+ * @example
+ *
+ * _.times(2, _.stubFalse);
+ * // => [false, false]
+ */
+function stubFalse() {
+ return false;
+}
+
+/** Detect free variable `exports`. */
+var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
+
+/** Detect free variable `module`. */
+var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+/** Detect the popular CommonJS extension `module.exports`. */
+var moduleExports = freeModule && freeModule.exports === freeExports;
+
+/** Built-in value references. */
+var Buffer = moduleExports ? root.Buffer : undefined;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
+
+/**
+ * Checks if `value` is a buffer.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
+ * @example
+ *
+ * _.isBuffer(new Buffer(2));
+ * // => true
+ *
+ * _.isBuffer(new Uint8Array(2));
+ * // => false
+ */
+var isBuffer = nativeIsBuffer || stubFalse;
+
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER$1 = 9007199254740991;
+
+/** Used to detect unsigned integer values. */
+var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+/**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+function isIndex(value, length) {
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
+ return !!length &&
+ (typeof value == 'number' || reIsUint.test(value)) &&
+ (value > -1 && value % 1 == 0 && value < length);
+}
+
+/** `Object#toString` result references. */
+var argsTag$1 = '[object Arguments]';
+var arrayTag = '[object Array]';
+var boolTag = '[object Boolean]';
+var dateTag = '[object Date]';
+var errorTag = '[object Error]';
+var funcTag$1 = '[object Function]';
+var mapTag = '[object Map]';
+var numberTag = '[object Number]';
+var objectTag = '[object Object]';
+var regexpTag = '[object RegExp]';
+var setTag = '[object Set]';
+var stringTag = '[object String]';
+var weakMapTag = '[object WeakMap]';
+
+var arrayBufferTag = '[object ArrayBuffer]';
+var dataViewTag = '[object DataView]';
+var float32Tag = '[object Float32Array]';
+var float64Tag = '[object Float64Array]';
+var int8Tag = '[object Int8Array]';
+var int16Tag = '[object Int16Array]';
+var int32Tag = '[object Int32Array]';
+var uint8Tag = '[object Uint8Array]';
+var uint8ClampedTag = '[object Uint8ClampedArray]';
+var uint16Tag = '[object Uint16Array]';
+var uint32Tag = '[object Uint32Array]';
+
+/** Used to identify `toStringTag` values of typed arrays. */
+var typedArrayTags = {};
+typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+typedArrayTags[uint32Tag] = true;
+typedArrayTags[argsTag$1] = typedArrayTags[arrayTag] =
+typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
+typedArrayTags[errorTag] = typedArrayTags[funcTag$1] =
+typedArrayTags[mapTag] = typedArrayTags[numberTag] =
+typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
+typedArrayTags[setTag] = typedArrayTags[stringTag] =
+typedArrayTags[weakMapTag] = false;
+
+/** Used for built-in method references. */
+var objectProto$5 = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString$2 = objectProto$5.toString;
+
+/**
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ */
+function baseIsTypedArray(value) {
+ return isObjectLike(value) &&
+ isLength(value.length) && !!typedArrayTags[objectToString$2.call(value)];
+}
+
+/**
+ * The base implementation of `_.unary` without support for storing metadata.
+ *
+ * @private
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ */
+function baseUnary(func) {
+ return function(value) {
+ return func(value);
+ };
+}
+
+/** Detect free variable `exports`. */
+var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports;
+
+/** Detect free variable `module`. */
+var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module;
+
+/** Detect the popular CommonJS extension `module.exports`. */
+var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
+
+/** Detect free variable `process` from Node.js. */
+var freeProcess = moduleExports$1 && freeGlobal.process;
+
+/** Used to access faster Node.js helpers. */
+var nodeUtil = (function() {
+ try {
+ return freeProcess && freeProcess.binding('util');
+ } catch (e) {}
+}());
+
+/* Node.js helper references. */
+var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
+
+/**
+ * Checks if `value` is classified as a typed array.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ * @example
+ *
+ * _.isTypedArray(new Uint8Array);
+ * // => true
+ *
+ * _.isTypedArray([]);
+ * // => false
+ */
+var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
+
+/** Used for built-in method references. */
+var objectProto$2 = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
+
+/**
+ * Creates an array of the enumerable property names of the array-like `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @param {boolean} inherited Specify returning inherited property names.
+ * @returns {Array} Returns the array of property names.
+ */
+function arrayLikeKeys(value, inherited) {
+ var isArr = isArray(value),
+ isArg = !isArr && isArguments(value),
+ isBuff = !isArr && !isArg && isBuffer(value),
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
+ skipIndexes = isArr || isArg || isBuff || isType,
+ result = skipIndexes ? baseTimes(value.length, String) : [],
+ length = result.length;
+
+ for (var key in value) {
+ if ((inherited || hasOwnProperty$1.call(value, key)) &&
+ !(skipIndexes && (
+ // Safari 9 has enumerable `arguments.length` in strict mode.
+ key == 'length' ||
+ // Node.js 0.10 has enumerable non-index properties on buffers.
+ (isBuff && (key == 'offset' || key == 'parent')) ||
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
+ // Skip index properties.
+ isIndex(key, length)
+ ))) {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+/** Used for built-in method references. */
+var objectProto$7 = Object.prototype;
+
+/**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$7;
+
+ return value === proto;
+}
+
+/**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
+}
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeKeys = overArg(Object.keys, Object);
+
+/** Used for built-in method references. */
+var objectProto$6 = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty$3 = objectProto$6.hasOwnProperty;
+
+/**
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function baseKeys(object) {
+ if (!isPrototype(object)) {
+ return nativeKeys(object);
+ }
+ var result = [];
+ for (var key in Object(object)) {
+ if (hasOwnProperty$3.call(object, key) && key != 'constructor') {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+/**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+function keys(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
+}
+
+function createArrayIterator(coll) {
+ var i = -1;
+ var len = coll.length;
+ return function next() {
+ return ++i < len ? { value: coll[i], key: i } : null;
+ };
+}
+
+function createES2015Iterator(iterator) {
+ var i = -1;
+ return function next() {
+ var item = iterator.next();
+ if (item.done) return null;
+ i++;
+ return { value: item.value, key: i };
+ };
+}
+
+function createObjectIterator(obj) {
+ var okeys = keys(obj);
+ var i = -1;
+ var len = okeys.length;
+ return function next() {
+ var key = okeys[++i];
+ return i < len ? { value: obj[key], key: key } : null;
+ };
+}
+
+function iterator(coll) {
+ if (isArrayLike(coll)) {
+ return createArrayIterator(coll);
+ }
+
+ var iterator = getIterator(coll);
+ return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll);
+}
+
+function onlyOnce(fn) {
+ return function () {
+ if (fn === null) throw new Error("Callback was already called.");
+ var callFn = fn;
+ fn = null;
+ callFn.apply(this, arguments);
+ };
+}
+
+// A temporary value used to identify if the loop should be broken.
+// See #1064, #1293
+var breakLoop = {};
+
+function _eachOfLimit(limit) {
+ return function (obj, iteratee, callback) {
+ callback = once(callback || noop);
+ if (limit <= 0 || !obj) {
+ return callback(null);
+ }
+ var nextElem = iterator(obj);
+ var done = false;
+ var running = 0;
+
+ function iterateeCallback(err, value) {
+ running -= 1;
+ if (err) {
+ done = true;
+ callback(err);
+ } else if (value === breakLoop || done && running <= 0) {
+ done = true;
+ return callback(null);
+ } else {
+ replenish();
+ }
+ }
+
+ function replenish() {
+ while (running < limit && !done) {
+ var elem = nextElem();
+ if (elem === null) {
+ done = true;
+ if (running <= 0) {
+ callback(null);
+ }
+ return;
+ }
+ running += 1;
+ iteratee(elem.value, elem.key, onlyOnce(iterateeCallback));
+ }
+ }
+
+ replenish();
+ };
+}
+
+/**
+ * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a
+ * time.
+ *
+ * @name eachOfLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.eachOf]{@link module:Collections.eachOf}
+ * @alias forEachOfLimit
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {Function} iteratee - A function to apply to each
+ * item in `coll`. The `key` is the item's key, or index in the case of an
+ * array. The iteratee is passed a `callback(err)` which must be called once it
+ * has completed. If no error has occurred, the callback should be run without
+ * arguments or with an explicit `null` argument. Invoked with
+ * (item, key, callback).
+ * @param {Function} [callback] - A callback which is called when all
+ * `iteratee` functions have finished, or an error occurs. Invoked with (err).
+ */
+function eachOfLimit(coll, limit, iteratee, callback) {
+ _eachOfLimit(limit)(coll, iteratee, callback);
+}
+
+function doLimit(fn, limit) {
+ return function (iterable, iteratee, callback) {
+ return fn(iterable, limit, iteratee, callback);
+ };
+}
+
+// eachOf implementation optimized for array-likes
+function eachOfArrayLike(coll, iteratee, callback) {
+ callback = once(callback || noop);
+ var index = 0,
+ completed = 0,
+ length = coll.length;
+ if (length === 0) {
+ callback(null);
+ }
+
+ function iteratorCallback(err) {
+ if (err) {
+ callback(err);
+ } else if (++completed === length) {
+ callback(null);
+ }
+ }
+
+ for (; index < length; index++) {
+ iteratee(coll[index], index, onlyOnce(iteratorCallback));
+ }
+}
+
+// a generic version of eachOf which can handle array, object, and iterator cases.
+var eachOfGeneric = doLimit(eachOfLimit, Infinity);
+
+/**
+ * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument
+ * to the iteratee.
+ *
+ * @name eachOf
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @alias forEachOf
+ * @category Collection
+ * @see [async.each]{@link module:Collections.each}
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A function to apply to each
+ * item in `coll`. The `key` is the item's key, or index in the case of an
+ * array. The iteratee is passed a `callback(err)` which must be called once it
+ * has completed. If no error has occurred, the callback should be run without
+ * arguments or with an explicit `null` argument. Invoked with
+ * (item, key, callback).
+ * @param {Function} [callback] - A callback which is called when all
+ * `iteratee` functions have finished, or an error occurs. Invoked with (err).
+ * @example
+ *
+ * var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"};
+ * var configs = {};
+ *
+ * async.forEachOf(obj, function (value, key, callback) {
+ * fs.readFile(__dirname + value, "utf8", function (err, data) {
+ * if (err) return callback(err);
+ * try {
+ * configs[key] = JSON.parse(data);
+ * } catch (e) {
+ * return callback(e);
+ * }
+ * callback();
+ * });
+ * }, function (err) {
+ * if (err) console.error(err.message);
+ * // configs is now a map of JSON data
+ * doSomethingWith(configs);
+ * });
+ */
+var eachOf = function (coll, iteratee, callback) {
+ var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric;
+ eachOfImplementation(coll, iteratee, callback);
+};
+
+function doParallel(fn) {
+ return function (obj, iteratee, callback) {
+ return fn(eachOf, obj, iteratee, callback);
+ };
+}
+
+function _asyncMap(eachfn, arr, iteratee, callback) {
+ callback = once(callback || noop);
+ arr = arr || [];
+ var results = [];
+ var counter = 0;
+
+ eachfn(arr, function (value, _, callback) {
+ var index = counter++;
+ iteratee(value, function (err, v) {
+ results[index] = v;
+ callback(err);
+ });
+ }, function (err) {
+ callback(err, results);
+ });
+}
+
+/**
+ * Produces a new collection of values by mapping each value in `coll` through
+ * the `iteratee` function. The `iteratee` is called with an item from `coll`
+ * and a callback for when it has finished processing. Each of these callback
+ * takes 2 arguments: an `error`, and the transformed item from `coll`. If
+ * `iteratee` passes an error to its callback, the main `callback` (for the
+ * `map` function) is immediately called with the error.
+ *
+ * Note, that since this function applies the `iteratee` to each item in
+ * parallel, there is no guarantee that the `iteratee` functions will complete
+ * in order. However, the results array will be in the same order as the
+ * original `coll`.
+ *
+ * If `map` is passed an Object, the results will be an Array. The results
+ * will roughly be in the order of the original Objects' keys (but this can
+ * vary across JavaScript engines)
+ *
+ * @name map
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A function to apply to each item in `coll`.
+ * The iteratee is passed a `callback(err, transformed)` which must be called
+ * once it has completed with an error (which can be `null`) and a
+ * transformed item. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
+ * functions have finished, or an error occurs. Results is an Array of the
+ * transformed items from the `coll`. Invoked with (err, results).
+ * @example
+ *
+ * async.map(['file1','file2','file3'], fs.stat, function(err, results) {
+ * // results is now an array of stats for each file
+ * });
+ */
+var map = doParallel(_asyncMap);
+
+/**
+ * Applies the provided arguments to each function in the array, calling
+ * `callback` after all functions have completed. If you only provide the first
+ * argument, `fns`, then it will return a function which lets you pass in the
+ * arguments as if it were a single function call. If more arguments are
+ * provided, `callback` is required while `args` is still optional.
+ *
+ * @name applyEach
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {Array|Iterable|Object} fns - A collection of asynchronous functions
+ * to all call with the same arguments
+ * @param {...*} [args] - any number of separate arguments to pass to the
+ * function.
+ * @param {Function} [callback] - the final argument should be the callback,
+ * called when all functions have completed processing.
+ * @returns {Function} - If only the first argument, `fns`, is provided, it will
+ * return a function which lets you pass in the arguments as if it were a single
+ * function call. The signature is `(..args, callback)`. If invoked with any
+ * arguments, `callback` is required.
+ * @example
+ *
+ * async.applyEach([enableSearch, updateSchema], 'bucket', callback);
+ *
+ * // partial application example:
+ * async.each(
+ * buckets,
+ * async.applyEach([enableSearch, updateSchema]),
+ * callback
+ * );
+ */
+var applyEach = applyEach$1(map);
+
+function doParallelLimit(fn) {
+ return function (obj, limit, iteratee, callback) {
+ return fn(_eachOfLimit(limit), obj, iteratee, callback);
+ };
+}
+
+/**
+ * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time.
+ *
+ * @name mapLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.map]{@link module:Collections.map}
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {Function} iteratee - A function to apply to each item in `coll`.
+ * The iteratee is passed a `callback(err, transformed)` which must be called
+ * once it has completed with an error (which can be `null`) and a transformed
+ * item. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
+ * functions have finished, or an error occurs. Results is an array of the
+ * transformed items from the `coll`. Invoked with (err, results).
+ */
+var mapLimit = doParallelLimit(_asyncMap);
+
+/**
+ * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time.
+ *
+ * @name mapSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.map]{@link module:Collections.map}
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A function to apply to each item in `coll`.
+ * The iteratee is passed a `callback(err, transformed)` which must be called
+ * once it has completed with an error (which can be `null`) and a
+ * transformed item. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
+ * functions have finished, or an error occurs. Results is an array of the
+ * transformed items from the `coll`. Invoked with (err, results).
+ */
+var mapSeries = doLimit(mapLimit, 1);
+
+/**
+ * The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time.
+ *
+ * @name applyEachSeries
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.applyEach]{@link module:ControlFlow.applyEach}
+ * @category Control Flow
+ * @param {Array|Iterable|Object} fns - A collection of asynchronous functions to all
+ * call with the same arguments
+ * @param {...*} [args] - any number of separate arguments to pass to the
+ * function.
+ * @param {Function} [callback] - the final argument should be the callback,
+ * called when all functions have completed processing.
+ * @returns {Function} - If only the first argument is provided, it will return
+ * a function which lets you pass in the arguments as if it were a single
+ * function call.
+ */
+var applyEachSeries = applyEach$1(mapSeries);
+
+/**
+ * Creates a continuation function with some arguments already applied.
+ *
+ * Useful as a shorthand when combined with other control flow functions. Any
+ * arguments passed to the returned function are added to the arguments
+ * originally passed to apply.
+ *
+ * @name apply
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @category Util
+ * @param {Function} function - The function you want to eventually apply all
+ * arguments to. Invokes with (arguments...).
+ * @param {...*} arguments... - Any number of arguments to automatically apply
+ * when the continuation is called.
+ * @example
+ *
+ * // using apply
+ * async.parallel([
+ * async.apply(fs.writeFile, 'testfile1', 'test1'),
+ * async.apply(fs.writeFile, 'testfile2', 'test2')
+ * ]);
+ *
+ *
+ * // the same process without using apply
+ * async.parallel([
+ * function(callback) {
+ * fs.writeFile('testfile1', 'test1', callback);
+ * },
+ * function(callback) {
+ * fs.writeFile('testfile2', 'test2', callback);
+ * }
+ * ]);
+ *
+ * // It's possible to pass any number of additional arguments when calling the
+ * // continuation:
+ *
+ * node> var fn = async.apply(sys.puts, 'one');
+ * node> fn('two', 'three');
+ * one
+ * two
+ * three
+ */
+var apply$2 = baseRest$1(function (fn, args) {
+ return baseRest$1(function (callArgs) {
+ return fn.apply(null, args.concat(callArgs));
+ });
+});
+
+/**
+ * Take a sync function and make it async, passing its return value to a
+ * callback. This is useful for plugging sync functions into a waterfall,
+ * series, or other async functions. Any arguments passed to the generated
+ * function will be passed to the wrapped function (except for the final
+ * callback argument). Errors thrown will be passed to the callback.
+ *
+ * If the function passed to `asyncify` returns a Promise, that promises's
+ * resolved/rejected state will be used to call the callback, rather than simply
+ * the synchronous return value.
+ *
+ * This also means you can asyncify ES2016 `async` functions.
+ *
+ * @name asyncify
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @alias wrapSync
+ * @category Util
+ * @param {Function} func - The synchronous function to convert to an
+ * asynchronous function.
+ * @returns {Function} An asynchronous wrapper of the `func`. To be invoked with
+ * (callback).
+ * @example
+ *
+ * // passing a regular synchronous function
+ * async.waterfall([
+ * async.apply(fs.readFile, filename, "utf8"),
+ * async.asyncify(JSON.parse),
+ * function (data, next) {
+ * // data is the result of parsing the text.
+ * // If there was a parsing error, it would have been caught.
+ * }
+ * ], callback);
+ *
+ * // passing a function returning a promise
+ * async.waterfall([
+ * async.apply(fs.readFile, filename, "utf8"),
+ * async.asyncify(function (contents) {
+ * return db.model.create(contents);
+ * }),
+ * function (model, next) {
+ * // `model` is the instantiated model object.
+ * // If there was an error, this function would be skipped.
+ * }
+ * ], callback);
+ *
+ * // es6 example
+ * var q = async.queue(async.asyncify(async function(file) {
+ * var intermediateStep = await processFile(file);
+ * return await somePromise(intermediateStep)
+ * }));
+ *
+ * q.push(files);
+ */
+function asyncify(func) {
+ return initialParams(function (args, callback) {
+ var result;
+ try {
+ result = func.apply(this, args);
+ } catch (e) {
+ return callback(e);
+ }
+ // if result is Promise object
+ if (isObject(result) && typeof result.then === 'function') {
+ result.then(function (value) {
+ callback(null, value);
+ }, function (err) {
+ callback(err.message ? err : new Error(err));
+ });
+ } else {
+ callback(null, result);
+ }
+ });
+}
+
+/**
+ * A specialized version of `_.forEach` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+function arrayEach(array, iteratee) {
+ var index = -1,
+ length = array ? array.length : 0;
+
+ while (++index < length) {
+ if (iteratee(array[index], index, array) === false) {
+ break;
+ }
+ }
+ return array;
+}
+
+/**
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var index = -1,
+ iterable = Object(object),
+ props = keysFunc(object),
+ length = props.length;
+
+ while (length--) {
+ var key = props[fromRight ? length : ++index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
+ }
+ return object;
+ };
+}
+
+/**
+ * The base implementation of `baseForOwn` which iterates over `object`
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+var baseFor = createBaseFor();
+
+/**
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+function baseForOwn(object, iteratee) {
+ return object && baseFor(object, iteratee, keys);
+}
+
+/**
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {number} fromIndex The index to search from.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function baseFindIndex(array, predicate, fromIndex, fromRight) {
+ var length = array.length,
+ index = fromIndex + (fromRight ? 1 : -1);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (predicate(array[index], index, array)) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+/**
+ * The base implementation of `_.isNaN` without support for number objects.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ */
+function baseIsNaN(value) {
+ return value !== value;
+}
+
+/**
+ * A specialized version of `_.indexOf` which performs strict equality
+ * comparisons of values, i.e. `===`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function strictIndexOf(array, value, fromIndex) {
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+/**
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function baseIndexOf(array, value, fromIndex) {
+ return value === value
+ ? strictIndexOf(array, value, fromIndex)
+ : baseFindIndex(array, baseIsNaN, fromIndex);
+}
+
+/**
+ * Determines the best order for running the functions in `tasks`, based on
+ * their requirements. Each function can optionally depend on other functions
+ * being completed first, and each function is run as soon as its requirements
+ * are satisfied.
+ *
+ * If any of the functions pass an error to their callback, the `auto` sequence
+ * will stop. Further tasks will not execute (so any other functions depending
+ * on it will not run), and the main `callback` is immediately called with the
+ * error.
+ *
+ * Functions also receive an object containing the results of functions which
+ * have completed so far as the first argument, if they have dependencies. If a
+ * task function has no dependencies, it will only be passed a callback.
+ *
+ * @name auto
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {Object} tasks - An object. Each of its properties is either a
+ * function or an array of requirements, with the function itself the last item
+ * in the array. The object's key of a property serves as the name of the task
+ * defined by that property, i.e. can be used when specifying requirements for
+ * other tasks. The function receives one or two arguments:
+ * * a `results` object, containing the results of the previously executed
+ * functions, only passed if the task has any dependencies,
+ * * a `callback(err, result)` function, which must be called when finished,
+ * passing an `error` (which can be `null`) and the result of the function's
+ * execution.
+ * @param {number} [concurrency=Infinity] - An optional `integer` for
+ * determining the maximum number of tasks that can be run in parallel. By
+ * default, as many as possible.
+ * @param {Function} [callback] - An optional callback which is called when all
+ * the tasks have been completed. It receives the `err` argument if any `tasks`
+ * pass an error to their callback. Results are always returned; however, if an
+ * error occurs, no further `tasks` will be performed, and the results object
+ * will only contain partial results. Invoked with (err, results).
+ * @returns undefined
+ * @example
+ *
+ * async.auto({
+ * // this function will just be passed a callback
+ * readData: async.apply(fs.readFile, 'data.txt', 'utf-8'),
+ * showData: ['readData', function(results, cb) {
+ * // results.readData is the file's contents
+ * // ...
+ * }]
+ * }, callback);
+ *
+ * async.auto({
+ * get_data: function(callback) {
+ * console.log('in get_data');
+ * // async code to get some data
+ * callback(null, 'data', 'converted to array');
+ * },
+ * make_folder: function(callback) {
+ * console.log('in make_folder');
+ * // async code to create a directory to store a file in
+ * // this is run at the same time as getting the data
+ * callback(null, 'folder');
+ * },
+ * write_file: ['get_data', 'make_folder', function(results, callback) {
+ * console.log('in write_file', JSON.stringify(results));
+ * // once there is some data and the directory exists,
+ * // write the data to a file in the directory
+ * callback(null, 'filename');
+ * }],
+ * email_link: ['write_file', function(results, callback) {
+ * console.log('in email_link', JSON.stringify(results));
+ * // once the file is written let's email a link to it...
+ * // results.write_file contains the filename returned by write_file.
+ * callback(null, {'file':results.write_file, 'email':'user@example.com'});
+ * }]
+ * }, function(err, results) {
+ * console.log('err = ', err);
+ * console.log('results = ', results);
+ * });
+ */
+var auto = function (tasks, concurrency, callback) {
+ if (typeof concurrency === 'function') {
+ // concurrency is optional, shift the args.
+ callback = concurrency;
+ concurrency = null;
+ }
+ callback = once(callback || noop);
+ var keys$$1 = keys(tasks);
+ var numTasks = keys$$1.length;
+ if (!numTasks) {
+ return callback(null);
+ }
+ if (!concurrency) {
+ concurrency = numTasks;
+ }
+
+ var results = {};
+ var runningTasks = 0;
+ var hasError = false;
+
+ var listeners = {};
+
+ var readyTasks = [];
+
+ // for cycle detection:
+ var readyToCheck = []; // tasks that have been identified as reachable
+ // without the possibility of returning to an ancestor task
+ var uncheckedDependencies = {};
+
+ baseForOwn(tasks, function (task, key) {
+ if (!isArray(task)) {
+ // no dependencies
+ enqueueTask(key, [task]);
+ readyToCheck.push(key);
+ return;
+ }
+
+ var dependencies = task.slice(0, task.length - 1);
+ var remainingDependencies = dependencies.length;
+ if (remainingDependencies === 0) {
+ enqueueTask(key, task);
+ readyToCheck.push(key);
+ return;
+ }
+ uncheckedDependencies[key] = remainingDependencies;
+
+ arrayEach(dependencies, function (dependencyName) {
+ if (!tasks[dependencyName]) {
+ throw new Error('async.auto task `' + key + '` has a non-existent dependency in ' + dependencies.join(', '));
+ }
+ addListener(dependencyName, function () {
+ remainingDependencies--;
+ if (remainingDependencies === 0) {
+ enqueueTask(key, task);
+ }
+ });
+ });
+ });
+
+ checkForDeadlocks();
+ processQueue();
+
+ function enqueueTask(key, task) {
+ readyTasks.push(function () {
+ runTask(key, task);
+ });
+ }
+
+ function processQueue() {
+ if (readyTasks.length === 0 && runningTasks === 0) {
+ return callback(null, results);
+ }
+ while (readyTasks.length && runningTasks < concurrency) {
+ var run = readyTasks.shift();
+ run();
+ }
+ }
+
+ function addListener(taskName, fn) {
+ var taskListeners = listeners[taskName];
+ if (!taskListeners) {
+ taskListeners = listeners[taskName] = [];
+ }
+
+ taskListeners.push(fn);
+ }
+
+ function taskComplete(taskName) {
+ var taskListeners = listeners[taskName] || [];
+ arrayEach(taskListeners, function (fn) {
+ fn();
+ });
+ processQueue();
+ }
+
+ function runTask(key, task) {
+ if (hasError) return;
+
+ var taskCallback = onlyOnce(baseRest$1(function (err, args) {
+ runningTasks--;
+ if (args.length <= 1) {
+ args = args[0];
+ }
+ if (err) {
+ var safeResults = {};
+ baseForOwn(results, function (val, rkey) {
+ safeResults[rkey] = val;
+ });
+ safeResults[key] = args;
+ hasError = true;
+ listeners = [];
+
+ callback(err, safeResults);
+ } else {
+ results[key] = args;
+ taskComplete(key);
+ }
+ }));
+
+ runningTasks++;
+ var taskFn = task[task.length - 1];
+ if (task.length > 1) {
+ taskFn(results, taskCallback);
+ } else {
+ taskFn(taskCallback);
+ }
+ }
+
+ function checkForDeadlocks() {
+ // Kahn's algorithm
+ // https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm
+ // http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html
+ var currentTask;
+ var counter = 0;
+ while (readyToCheck.length) {
+ currentTask = readyToCheck.pop();
+ counter++;
+ arrayEach(getDependents(currentTask), function (dependent) {
+ if (--uncheckedDependencies[dependent] === 0) {
+ readyToCheck.push(dependent);
+ }
+ });
+ }
+
+ if (counter !== numTasks) {
+ throw new Error('async.auto cannot execute tasks due to a recursive dependency');
+ }
+ }
+
+ function getDependents(taskName) {
+ var result = [];
+ baseForOwn(tasks, function (task, key) {
+ if (isArray(task) && baseIndexOf(task, taskName, 0) >= 0) {
+ result.push(key);
+ }
+ });
+ return result;
+ }
+};
+
+/**
+ * A specialized version of `_.map` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+function arrayMap(array, iteratee) {
+ var index = -1,
+ length = array ? array.length : 0,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
+ }
+ return result;
+}
+
+/**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+function copyArray(source, array) {
+ var index = -1,
+ length = source.length;
+
+ array || (array = Array(length));
+ while (++index < length) {
+ array[index] = source[index];
+ }
+ return array;
+}
+
+/** Built-in value references. */
+var Symbol$1 = root.Symbol;
+
+/** `Object#toString` result references. */
+var symbolTag = '[object Symbol]';
+
+/** Used for built-in method references. */
+var objectProto$8 = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString$3 = objectProto$8.toString;
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString$3.call(value) == symbolTag);
+}
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined;
+var symbolToString = symbolProto ? symbolProto.toString : undefined;
+
+/**
+ * The base implementation of `_.toString` which doesn't convert nullish
+ * values to empty strings.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+function baseToString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
+ }
+ if (isArray(value)) {
+ // Recursively convert values (susceptible to call stack limits).
+ return arrayMap(value, baseToString) + '';
+ }
+ if (isSymbol(value)) {
+ return symbolToString ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
+
+/**
+ * The base implementation of `_.slice` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+function baseSlice(array, start, end) {
+ var index = -1,
+ length = array.length;
+
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = end > length ? length : end;
+ if (end < 0) {
+ end += length;
+ }
+ length = start > end ? 0 : ((end - start) >>> 0);
+ start >>>= 0;
+
+ var result = Array(length);
+ while (++index < length) {
+ result[index] = array[index + start];
+ }
+ return result;
+}
+
+/**
+ * Casts `array` to a slice if it's needed.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {number} start The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the cast slice.
+ */
+function castSlice(array, start, end) {
+ var length = array.length;
+ end = end === undefined ? length : end;
+ return (!start && end >= length) ? array : baseSlice(array, start, end);
+}
+
+/**
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
+ * that is not found in the character symbols.
+ *
+ * @private
+ * @param {Array} strSymbols The string symbols to inspect.
+ * @param {Array} chrSymbols The character symbols to find.
+ * @returns {number} Returns the index of the last unmatched string symbol.
+ */
+function charsEndIndex(strSymbols, chrSymbols) {
+ var index = strSymbols.length;
+
+ while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
+ return index;
+}
+
+/**
+ * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
+ * that is not found in the character symbols.
+ *
+ * @private
+ * @param {Array} strSymbols The string symbols to inspect.
+ * @param {Array} chrSymbols The character symbols to find.
+ * @returns {number} Returns the index of the first unmatched string symbol.
+ */
+function charsStartIndex(strSymbols, chrSymbols) {
+ var index = -1,
+ length = strSymbols.length;
+
+ while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
+ return index;
+}
+
+/**
+ * Converts an ASCII `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+function asciiToArray(string) {
+ return string.split('');
+}
+
+/** Used to compose unicode character classes. */
+var rsAstralRange = '\\ud800-\\udfff';
+var rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23';
+var rsComboSymbolsRange = '\\u20d0-\\u20f0';
+var rsVarRange = '\\ufe0e\\ufe0f';
+
+/** Used to compose unicode capture groups. */
+var rsZWJ = '\\u200d';
+
+/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
+var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
+
+/**
+ * Checks if `string` contains Unicode symbols.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {boolean} Returns `true` if a symbol is found, else `false`.
+ */
+function hasUnicode(string) {
+ return reHasUnicode.test(string);
+}
+
+/** Used to compose unicode character classes. */
+var rsAstralRange$1 = '\\ud800-\\udfff';
+var rsComboMarksRange$1 = '\\u0300-\\u036f\\ufe20-\\ufe23';
+var rsComboSymbolsRange$1 = '\\u20d0-\\u20f0';
+var rsVarRange$1 = '\\ufe0e\\ufe0f';
+
+/** Used to compose unicode capture groups. */
+var rsAstral = '[' + rsAstralRange$1 + ']';
+var rsCombo = '[' + rsComboMarksRange$1 + rsComboSymbolsRange$1 + ']';
+var rsFitz = '\\ud83c[\\udffb-\\udfff]';
+var rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')';
+var rsNonAstral = '[^' + rsAstralRange$1 + ']';
+var rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}';
+var rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]';
+var rsZWJ$1 = '\\u200d';
+
+/** Used to compose unicode regexes. */
+var reOptMod = rsModifier + '?';
+var rsOptVar = '[' + rsVarRange$1 + ']?';
+var rsOptJoin = '(?:' + rsZWJ$1 + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*';
+var rsSeq = rsOptVar + reOptMod + rsOptJoin;
+var rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
+
+/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
+var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
+
+/**
+ * Converts a Unicode `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+function unicodeToArray(string) {
+ return string.match(reUnicode) || [];
+}
+
+/**
+ * Converts `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+function stringToArray(string) {
+ return hasUnicode(string)
+ ? unicodeToArray(string)
+ : asciiToArray(string);
+}
+
+/**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+function toString(value) {
+ return value == null ? '' : baseToString(value);
+}
+
+/** Used to match leading and trailing whitespace. */
+var reTrim = /^\s+|\s+$/g;
+
+/**
+ * Removes leading and trailing whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trim(' abc ');
+ * // => 'abc'
+ *
+ * _.trim('-_-abc-_-', '_-');
+ * // => 'abc'
+ *
+ * _.map([' foo ', ' bar '], _.trim);
+ * // => ['foo', 'bar']
+ */
+function trim(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrim, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ chrSymbols = stringToArray(chars),
+ start = charsStartIndex(strSymbols, chrSymbols),
+ end = charsEndIndex(strSymbols, chrSymbols) + 1;
+
+ return castSlice(strSymbols, start, end).join('');
+}
+
+var FN_ARGS = /^(function)?\s*[^\(]*\(\s*([^\)]*)\)/m;
+var FN_ARG_SPLIT = /,/;
+var FN_ARG = /(=.+)?(\s*)$/;
+var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
+
+function parseParams(func) {
+ func = func.toString().replace(STRIP_COMMENTS, '');
+ func = func.match(FN_ARGS)[2].replace(' ', '');
+ func = func ? func.split(FN_ARG_SPLIT) : [];
+ func = func.map(function (arg) {
+ return trim(arg.replace(FN_ARG, ''));
+ });
+ return func;
+}
+
+/**
+ * A dependency-injected version of the [async.auto]{@link module:ControlFlow.auto} function. Dependent
+ * tasks are specified as parameters to the function, after the usual callback
+ * parameter, with the parameter names matching the names of the tasks it
+ * depends on. This can provide even more readable task graphs which can be
+ * easier to maintain.
+ *
+ * If a final callback is specified, the task results are similarly injected,
+ * specified as named parameters after the initial error parameter.
+ *
+ * The autoInject function is purely syntactic sugar and its semantics are
+ * otherwise equivalent to [async.auto]{@link module:ControlFlow.auto}.
+ *
+ * @name autoInject
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.auto]{@link module:ControlFlow.auto}
+ * @category Control Flow
+ * @param {Object} tasks - An object, each of whose properties is a function of
+ * the form 'func([dependencies...], callback). The object's key of a property
+ * serves as the name of the task defined by that property, i.e. can be used
+ * when specifying requirements for other tasks.
+ * * The `callback` parameter is a `callback(err, result)` which must be called
+ * when finished, passing an `error` (which can be `null`) and the result of
+ * the function's execution. The remaining parameters name other tasks on
+ * which the task is dependent, and the results from those tasks are the
+ * arguments of those parameters.
+ * @param {Function} [callback] - An optional callback which is called when all
+ * the tasks have been completed. It receives the `err` argument if any `tasks`
+ * pass an error to their callback, and a `results` object with any completed
+ * task results, similar to `auto`.
+ * @example
+ *
+ * // The example from `auto` can be rewritten as follows:
+ * async.autoInject({
+ * get_data: function(callback) {
+ * // async code to get some data
+ * callback(null, 'data', 'converted to array');
+ * },
+ * make_folder: function(callback) {
+ * // async code to create a directory to store a file in
+ * // this is run at the same time as getting the data
+ * callback(null, 'folder');
+ * },
+ * write_file: function(get_data, make_folder, callback) {
+ * // once there is some data and the directory exists,
+ * // write the data to a file in the directory
+ * callback(null, 'filename');
+ * },
+ * email_link: function(write_file, callback) {
+ * // once the file is written let's email a link to it...
+ * // write_file contains the filename returned by write_file.
+ * callback(null, {'file':write_file, 'email':'user@example.com'});
+ * }
+ * }, function(err, results) {
+ * console.log('err = ', err);
+ * console.log('email_link = ', results.email_link);
+ * });
+ *
+ * // If you are using a JS minifier that mangles parameter names, `autoInject`
+ * // will not work with plain functions, since the parameter names will be
+ * // collapsed to a single letter identifier. To work around this, you can
+ * // explicitly specify the names of the parameters your task function needs
+ * // in an array, similar to Angular.js dependency injection.
+ *
+ * // This still has an advantage over plain `auto`, since the results a task
+ * // depends on are still spread into arguments.
+ * async.autoInject({
+ * //...
+ * write_file: ['get_data', 'make_folder', function(get_data, make_folder, callback) {
+ * callback(null, 'filename');
+ * }],
+ * email_link: ['write_file', function(write_file, callback) {
+ * callback(null, {'file':write_file, 'email':'user@example.com'});
+ * }]
+ * //...
+ * }, function(err, results) {
+ * console.log('err = ', err);
+ * console.log('email_link = ', results.email_link);
+ * });
+ */
+function autoInject(tasks, callback) {
+ var newTasks = {};
+
+ baseForOwn(tasks, function (taskFn, key) {
+ var params;
+
+ if (isArray(taskFn)) {
+ params = copyArray(taskFn);
+ taskFn = params.pop();
+
+ newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn);
+ } else if (taskFn.length === 1) {
+ // no dependencies, use the function as-is
+ newTasks[key] = taskFn;
+ } else {
+ params = parseParams(taskFn);
+ if (taskFn.length === 0 && params.length === 0) {
+ throw new Error("autoInject task functions require explicit parameters.");
+ }
+
+ params.pop();
+
+ newTasks[key] = params.concat(newTask);
+ }
+
+ function newTask(results, taskCb) {
+ var newArgs = arrayMap(params, function (name) {
+ return results[name];
+ });
+ newArgs.push(taskCb);
+ taskFn.apply(null, newArgs);
+ }
+ });
+
+ auto(newTasks, callback);
+}
+
+var hasSetImmediate = typeof setImmediate === 'function' && setImmediate;
+var hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function';
+
+function fallback(fn) {
+ setTimeout(fn, 0);
+}
+
+function wrap(defer) {
+ return baseRest$1(function (fn, args) {
+ defer(function () {
+ fn.apply(null, args);
+ });
+ });
+}
+
+var _defer;
+
+if (hasSetImmediate) {
+ _defer = setImmediate;
+} else if (hasNextTick) {
+ _defer = process.nextTick;
+} else {
+ _defer = fallback;
+}
+
+var setImmediate$1 = wrap(_defer);
+
+// Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation
+// used for queues. This implementation assumes that the node provided by the user can be modified
+// to adjust the next and last properties. We implement only the minimal functionality
+// for queue support.
+function DLL() {
+ this.head = this.tail = null;
+ this.length = 0;
+}
+
+function setInitial(dll, node) {
+ dll.length = 1;
+ dll.head = dll.tail = node;
+}
+
+DLL.prototype.removeLink = function (node) {
+ if (node.prev) node.prev.next = node.next;else this.head = node.next;
+ if (node.next) node.next.prev = node.prev;else this.tail = node.prev;
+
+ node.prev = node.next = null;
+ this.length -= 1;
+ return node;
+};
+
+DLL.prototype.empty = DLL;
+
+DLL.prototype.insertAfter = function (node, newNode) {
+ newNode.prev = node;
+ newNode.next = node.next;
+ if (node.next) node.next.prev = newNode;else this.tail = newNode;
+ node.next = newNode;
+ this.length += 1;
+};
+
+DLL.prototype.insertBefore = function (node, newNode) {
+ newNode.prev = node.prev;
+ newNode.next = node;
+ if (node.prev) node.prev.next = newNode;else this.head = newNode;
+ node.prev = newNode;
+ this.length += 1;
+};
+
+DLL.prototype.unshift = function (node) {
+ if (this.head) this.insertBefore(this.head, node);else setInitial(this, node);
+};
+
+DLL.prototype.push = function (node) {
+ if (this.tail) this.insertAfter(this.tail, node);else setInitial(this, node);
+};
+
+DLL.prototype.shift = function () {
+ return this.head && this.removeLink(this.head);
+};
+
+DLL.prototype.pop = function () {
+ return this.tail && this.removeLink(this.tail);
+};
+
+function queue(worker, concurrency, payload) {
+ if (concurrency == null) {
+ concurrency = 1;
+ } else if (concurrency === 0) {
+ throw new Error('Concurrency must not be zero');
+ }
+
+ function _insert(data, insertAtFront, callback) {
+ if (callback != null && typeof callback !== 'function') {
+ throw new Error('task callback must be a function');
+ }
+ q.started = true;
+ if (!isArray(data)) {
+ data = [data];
+ }
+ if (data.length === 0 && q.idle()) {
+ // call drain immediately if there are no tasks
+ return setImmediate$1(function () {
+ q.drain();
+ });
+ }
+
+ for (var i = 0, l = data.length; i < l; i++) {
+ var item = {
+ data: data[i],
+ callback: callback || noop
+ };
+
+ if (insertAtFront) {
+ q._tasks.unshift(item);
+ } else {
+ q._tasks.push(item);
+ }
+ }
+ setImmediate$1(q.process);
+ }
+
+ function _next(tasks) {
+ return baseRest$1(function (args) {
+ workers -= 1;
+
+ for (var i = 0, l = tasks.length; i < l; i++) {
+ var task = tasks[i];
+ var index = baseIndexOf(workersList, task, 0);
+ if (index >= 0) {
+ workersList.splice(index);
+ }
+
+ task.callback.apply(task, args);
+
+ if (args[0] != null) {
+ q.error(args[0], task.data);
+ }
+ }
+
+ if (workers <= q.concurrency - q.buffer) {
+ q.unsaturated();
+ }
+
+ if (q.idle()) {
+ q.drain();
+ }
+ q.process();
+ });
+ }
+
+ var workers = 0;
+ var workersList = [];
+ var q = {
+ _tasks: new DLL(),
+ concurrency: concurrency,
+ payload: payload,
+ saturated: noop,
+ unsaturated: noop,
+ buffer: concurrency / 4,
+ empty: noop,
+ drain: noop,
+ error: noop,
+ started: false,
+ paused: false,
+ push: function (data, callback) {
+ _insert(data, false, callback);
+ },
+ kill: function () {
+ q.drain = noop;
+ q._tasks.empty();
+ },
+ unshift: function (data, callback) {
+ _insert(data, true, callback);
+ },
+ process: function () {
+ while (!q.paused && workers < q.concurrency && q._tasks.length) {
+ var tasks = [],
+ data = [];
+ var l = q._tasks.length;
+ if (q.payload) l = Math.min(l, q.payload);
+ for (var i = 0; i < l; i++) {
+ var node = q._tasks.shift();
+ tasks.push(node);
+ data.push(node.data);
+ }
+
+ if (q._tasks.length === 0) {
+ q.empty();
+ }
+ workers += 1;
+ workersList.push(tasks[0]);
+
+ if (workers === q.concurrency) {
+ q.saturated();
+ }
+
+ var cb = onlyOnce(_next(tasks));
+ worker(data, cb);
+ }
+ },
+ length: function () {
+ return q._tasks.length;
+ },
+ running: function () {
+ return workers;
+ },
+ workersList: function () {
+ return workersList;
+ },
+ idle: function () {
+ return q._tasks.length + workers === 0;
+ },
+ pause: function () {
+ q.paused = true;
+ },
+ resume: function () {
+ if (q.paused === false) {
+ return;
+ }
+ q.paused = false;
+ var resumeCount = Math.min(q.concurrency, q._tasks.length);
+ // Need to call q.process once per concurrent
+ // worker to preserve full concurrency after pause
+ for (var w = 1; w <= resumeCount; w++) {
+ setImmediate$1(q.process);
+ }
+ }
+ };
+ return q;
+}
+
+/**
+ * A cargo of tasks for the worker function to complete. Cargo inherits all of
+ * the same methods and event callbacks as [`queue`]{@link module:ControlFlow.queue}.
+ * @typedef {Object} CargoObject
+ * @memberOf module:ControlFlow
+ * @property {Function} length - A function returning the number of items
+ * waiting to be processed. Invoke like `cargo.length()`.
+ * @property {number} payload - An `integer` for determining how many tasks
+ * should be process per round. This property can be changed after a `cargo` is
+ * created to alter the payload on-the-fly.
+ * @property {Function} push - Adds `task` to the `queue`. The callback is
+ * called once the `worker` has finished processing the task. Instead of a
+ * single task, an array of `tasks` can be submitted. The respective callback is
+ * used for every task in the list. Invoke like `cargo.push(task, [callback])`.
+ * @property {Function} saturated - A callback that is called when the
+ * `queue.length()` hits the concurrency and further tasks will be queued.
+ * @property {Function} empty - A callback that is called when the last item
+ * from the `queue` is given to a `worker`.
+ * @property {Function} drain - A callback that is called when the last item
+ * from the `queue` has returned from the `worker`.
+ * @property {Function} idle - a function returning false if there are items
+ * waiting or being processed, or true if not. Invoke like `cargo.idle()`.
+ * @property {Function} pause - a function that pauses the processing of tasks
+ * until `resume()` is called. Invoke like `cargo.pause()`.
+ * @property {Function} resume - a function that resumes the processing of
+ * queued tasks when the queue is paused. Invoke like `cargo.resume()`.
+ * @property {Function} kill - a function that removes the `drain` callback and
+ * empties remaining tasks from the queue forcing it to go idle. Invoke like `cargo.kill()`.
+ */
+
+/**
+ * Creates a `cargo` object with the specified payload. Tasks added to the
+ * cargo will be processed altogether (up to the `payload` limit). If the
+ * `worker` is in progress, the task is queued until it becomes available. Once
+ * the `worker` has completed some tasks, each callback of those tasks is
+ * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966)
+ * for how `cargo` and `queue` work.
+ *
+ * While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers
+ * at a time, cargo passes an array of tasks to a single worker, repeating
+ * when the worker is finished.
+ *
+ * @name cargo
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.queue]{@link module:ControlFlow.queue}
+ * @category Control Flow
+ * @param {Function} worker - An asynchronous function for processing an array
+ * of queued tasks, which must call its `callback(err)` argument when finished,
+ * with an optional `err` argument. Invoked with `(tasks, callback)`.
+ * @param {number} [payload=Infinity] - An optional `integer` for determining
+ * how many tasks should be processed per round; if omitted, the default is
+ * unlimited.
+ * @returns {module:ControlFlow.CargoObject} A cargo object to manage the tasks. Callbacks can
+ * attached as certain properties to listen for specific events during the
+ * lifecycle of the cargo and inner queue.
+ * @example
+ *
+ * // create a cargo object with payload 2
+ * var cargo = async.cargo(function(tasks, callback) {
+ * for (var i=0; i<tasks.length; i++) {
+ * console.log('hello ' + tasks[i].name);
+ * }
+ * callback();
+ * }, 2);
+ *
+ * // add some items
+ * cargo.push({name: 'foo'}, function(err) {
+ * console.log('finished processing foo');
+ * });
+ * cargo.push({name: 'bar'}, function(err) {
+ * console.log('finished processing bar');
+ * });
+ * cargo.push({name: 'baz'}, function(err) {
+ * console.log('finished processing baz');
+ * });
+ */
+function cargo(worker, payload) {
+ return queue(worker, 1, payload);
+}
+
+/**
+ * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time.
+ *
+ * @name eachOfSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.eachOf]{@link module:Collections.eachOf}
+ * @alias forEachOfSeries
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A function to apply to each item in `coll`. The
+ * `key` is the item's key, or index in the case of an array. The iteratee is
+ * passed a `callback(err)` which must be called once it has completed. If no
+ * error has occurred, the callback should be run without arguments or with an
+ * explicit `null` argument. Invoked with (item, key, callback).
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
+ * functions have finished, or an error occurs. Invoked with (err).
+ */
+var eachOfSeries = doLimit(eachOfLimit, 1);
+
+/**
+ * Reduces `coll` into a single value using an async `iteratee` to return each
+ * successive step. `memo` is the initial state of the reduction. This function
+ * only operates in series.
+ *
+ * For performance reasons, it may make sense to split a call to this function
+ * into a parallel map, and then use the normal `Array.prototype.reduce` on the
+ * results. This function is for situations where each step in the reduction
+ * needs to be async; if you can get the data before reducing it, then it's
+ * probably a good idea to do so.
+ *
+ * @name reduce
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @alias inject
+ * @alias foldl
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {*} memo - The initial state of the reduction.
+ * @param {Function} iteratee - A function applied to each item in the
+ * array to produce the next step in the reduction. The `iteratee` is passed a
+ * `callback(err, reduction)` which accepts an optional error as its first
+ * argument, and the state of the reduction as the second. If an error is
+ * passed to the callback, the reduction is stopped and the main `callback` is
+ * immediately called with the error. Invoked with (memo, item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Result is the reduced value. Invoked with
+ * (err, result).
+ * @example
+ *
+ * async.reduce([1,2,3], 0, function(memo, item, callback) {
+ * // pointless async:
+ * process.nextTick(function() {
+ * callback(null, memo + item)
+ * });
+ * }, function(err, result) {
+ * // result is now equal to the last value of memo, which is 6
+ * });
+ */
+function reduce(coll, memo, iteratee, callback) {
+ callback = once(callback || noop);
+ eachOfSeries(coll, function (x, i, callback) {
+ iteratee(memo, x, function (err, v) {
+ memo = v;
+ callback(err);
+ });
+ }, function (err) {
+ callback(err, memo);
+ });
+}
+
+/**
+ * Version of the compose function that is more natural to read. Each function
+ * consumes the return value of the previous function. It is the equivalent of
+ * [compose]{@link module:ControlFlow.compose} with the arguments reversed.
+ *
+ * Each function is executed with the `this` binding of the composed function.
+ *
+ * @name seq
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.compose]{@link module:ControlFlow.compose}
+ * @category Control Flow
+ * @param {...Function} functions - the asynchronous functions to compose
+ * @returns {Function} a function that composes the `functions` in order
+ * @example
+ *
+ * // Requires lodash (or underscore), express3 and dresende's orm2.
+ * // Part of an app, that fetches cats of the logged user.
+ * // This example uses `seq` function to avoid overnesting and error
+ * // handling clutter.
+ * app.get('/cats', function(request, response) {
+ * var User = request.models.User;
+ * async.seq(
+ * _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data))
+ * function(user, fn) {
+ * user.getCats(fn); // 'getCats' has signature (callback(err, data))
+ * }
+ * )(req.session.user_id, function (err, cats) {
+ * if (err) {
+ * console.error(err);
+ * response.json({ status: 'error', message: err.message });
+ * } else {
+ * response.json({ status: 'ok', message: 'Cats found', data: cats });
+ * }
+ * });
+ * });
+ */
+var seq$1 = baseRest$1(function seq(functions) {
+ return baseRest$1(function (args) {
+ var that = this;
+
+ var cb = args[args.length - 1];
+ if (typeof cb == 'function') {
+ args.pop();
+ } else {
+ cb = noop;
+ }
+
+ reduce(functions, args, function (newargs, fn, cb) {
+ fn.apply(that, newargs.concat([baseRest$1(function (err, nextargs) {
+ cb(err, nextargs);
+ })]));
+ }, function (err, results) {
+ cb.apply(that, [err].concat(results));
+ });
+ });
+});
+
+/**
+ * Creates a function which is a composition of the passed asynchronous
+ * functions. Each function consumes the return value of the function that
+ * follows. Composing functions `f()`, `g()`, and `h()` would produce the result
+ * of `f(g(h()))`, only this version uses callbacks to obtain the return values.
+ *
+ * Each function is executed with the `this` binding of the composed function.
+ *
+ * @name compose
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {...Function} functions - the asynchronous functions to compose
+ * @returns {Function} an asynchronous function that is the composed
+ * asynchronous `functions`
+ * @example
+ *
+ * function add1(n, callback) {
+ * setTimeout(function () {
+ * callback(null, n + 1);
+ * }, 10);
+ * }
+ *
+ * function mul3(n, callback) {
+ * setTimeout(function () {
+ * callback(null, n * 3);
+ * }, 10);
+ * }
+ *
+ * var add1mul3 = async.compose(mul3, add1);
+ * add1mul3(4, function (err, result) {
+ * // result now equals 15
+ * });
+ */
+var compose = baseRest$1(function (args) {
+ return seq$1.apply(null, args.reverse());
+});
+
+function concat$1(eachfn, arr, fn, callback) {
+ var result = [];
+ eachfn(arr, function (x, index, cb) {
+ fn(x, function (err, y) {
+ result = result.concat(y || []);
+ cb(err);
+ });
+ }, function (err) {
+ callback(err, result);
+ });
+}
+
+/**
+ * Applies `iteratee` to each item in `coll`, concatenating the results. Returns
+ * the concatenated list. The `iteratee`s are called in parallel, and the
+ * results are concatenated as they return. There is no guarantee that the
+ * results array will be returned in the original order of `coll` passed to the
+ * `iteratee` function.
+ *
+ * @name concat
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A function to apply to each item in `coll`.
+ * The iteratee is passed a `callback(err, results)` which must be called once
+ * it has completed with an error (which can be `null`) and an array of results.
+ * Invoked with (item, callback).
+ * @param {Function} [callback(err)] - A callback which is called after all the
+ * `iteratee` functions have finished, or an error occurs. Results is an array
+ * containing the concatenated results of the `iteratee` function. Invoked with
+ * (err, results).
+ * @example
+ *
+ * async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files) {
+ * // files is now a list of filenames that exist in the 3 directories
+ * });
+ */
+var concat = doParallel(concat$1);
+
+function doSeries(fn) {
+ return function (obj, iteratee, callback) {
+ return fn(eachOfSeries, obj, iteratee, callback);
+ };
+}
+
+/**
+ * The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time.
+ *
+ * @name concatSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.concat]{@link module:Collections.concat}
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A function to apply to each item in `coll`.
+ * The iteratee is passed a `callback(err, results)` which must be called once
+ * it has completed with an error (which can be `null`) and an array of results.
+ * Invoked with (item, callback).
+ * @param {Function} [callback(err)] - A callback which is called after all the
+ * `iteratee` functions have finished, or an error occurs. Results is an array
+ * containing the concatenated results of the `iteratee` function. Invoked with
+ * (err, results).
+ */
+var concatSeries = doSeries(concat$1);
+
+/**
+ * Returns a function that when called, calls-back with the values provided.
+ * Useful as the first function in a [`waterfall`]{@link module:ControlFlow.waterfall}, or for plugging values in to
+ * [`auto`]{@link module:ControlFlow.auto}.
+ *
+ * @name constant
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @category Util
+ * @param {...*} arguments... - Any number of arguments to automatically invoke
+ * callback with.
+ * @returns {Function} Returns a function that when invoked, automatically
+ * invokes the callback with the previous given arguments.
+ * @example
+ *
+ * async.waterfall([
+ * async.constant(42),
+ * function (value, next) {
+ * // value === 42
+ * },
+ * //...
+ * ], callback);
+ *
+ * async.waterfall([
+ * async.constant(filename, "utf8"),
+ * fs.readFile,
+ * function (fileData, next) {
+ * //...
+ * }
+ * //...
+ * ], callback);
+ *
+ * async.auto({
+ * hostname: async.constant("https://server.net/"),
+ * port: findFreePort,
+ * launchServer: ["hostname", "port", function (options, cb) {
+ * startServer(options, cb);
+ * }],
+ * //...
+ * }, callback);
+ */
+var constant$2 = baseRest$1(function (values) {
+ var args = [null].concat(values);
+ return initialParams(function (ignoredArgs, callback) {
+ return callback.apply(this, args);
+ });
+});
+
+function _createTester(eachfn, check, getResult) {
+ return function (arr, limit, iteratee, cb) {
+ function done() {
+ if (cb) {
+ cb(null, getResult(false));
+ }
+ }
+ function wrappedIteratee(x, _, callback) {
+ if (!cb) return callback();
+ iteratee(x, function (err, v) {
+ // Check cb as another iteratee may have resolved with a
+ // value or error since we started this iteratee
+ if (cb && (err || check(v))) {
+ if (err) cb(err);else cb(err, getResult(true, x));
+ cb = iteratee = false;
+ callback(err, breakLoop);
+ } else {
+ callback();
+ }
+ });
+ }
+ if (arguments.length > 3) {
+ cb = cb || noop;
+ eachfn(arr, limit, wrappedIteratee, done);
+ } else {
+ cb = iteratee;
+ cb = cb || noop;
+ iteratee = limit;
+ eachfn(arr, wrappedIteratee, done);
+ }
+ };
+}
+
+function _findGetResult(v, x) {
+ return x;
+}
+
+/**
+ * Returns the first value in `coll` that passes an async truth test. The
+ * `iteratee` is applied in parallel, meaning the first iteratee to return
+ * `true` will fire the detect `callback` with that result. That means the
+ * result might not be the first item in the original `coll` (in terms of order)
+ * that passes the test.
+
+ * If order within the original `coll` is important, then look at
+ * [`detectSeries`]{@link module:Collections.detectSeries}.
+ *
+ * @name detect
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @alias find
+ * @category Collections
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A truth test to apply to each item in `coll`.
+ * The iteratee is passed a `callback(err, truthValue)` which must be called
+ * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called as soon as any
+ * iteratee returns `true`, or after all the `iteratee` functions have finished.
+ * Result will be the first item in the array that passes the truth test
+ * (iteratee) or the value `undefined` if none passed. Invoked with
+ * (err, result).
+ * @example
+ *
+ * async.detect(['file1','file2','file3'], function(filePath, callback) {
+ * fs.access(filePath, function(err) {
+ * callback(null, !err)
+ * });
+ * }, function(err, result) {
+ * // result now equals the first file in the list that exists
+ * });
+ */
+var detect = _createTester(eachOf, identity, _findGetResult);
+
+/**
+ * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a
+ * time.
+ *
+ * @name detectLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.detect]{@link module:Collections.detect}
+ * @alias findLimit
+ * @category Collections
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {Function} iteratee - A truth test to apply to each item in `coll`.
+ * The iteratee is passed a `callback(err, truthValue)` which must be called
+ * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called as soon as any
+ * iteratee returns `true`, or after all the `iteratee` functions have finished.
+ * Result will be the first item in the array that passes the truth test
+ * (iteratee) or the value `undefined` if none passed. Invoked with
+ * (err, result).
+ */
+var detectLimit = _createTester(eachOfLimit, identity, _findGetResult);
+
+/**
+ * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time.
+ *
+ * @name detectSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.detect]{@link module:Collections.detect}
+ * @alias findSeries
+ * @category Collections
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A truth test to apply to each item in `coll`.
+ * The iteratee is passed a `callback(err, truthValue)` which must be called
+ * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called as soon as any
+ * iteratee returns `true`, or after all the `iteratee` functions have finished.
+ * Result will be the first item in the array that passes the truth test
+ * (iteratee) or the value `undefined` if none passed. Invoked with
+ * (err, result).
+ */
+var detectSeries = _createTester(eachOfSeries, identity, _findGetResult);
+
+function consoleFunc(name) {
+ return baseRest$1(function (fn, args) {
+ fn.apply(null, args.concat([baseRest$1(function (err, args) {
+ if (typeof console === 'object') {
+ if (err) {
+ if (console.error) {
+ console.error(err);
+ }
+ } else if (console[name]) {
+ arrayEach(args, function (x) {
+ console[name](x);
+ });
+ }
+ }
+ })]));
+ });
+}
+
+/**
+ * Logs the result of an `async` function to the `console` using `console.dir`
+ * to display the properties of the resulting object. Only works in Node.js or
+ * in browsers that support `console.dir` and `console.error` (such as FF and
+ * Chrome). If multiple arguments are returned from the async function,
+ * `console.dir` is called on each argument in order.
+ *
+ * @name dir
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @category Util
+ * @param {Function} function - The function you want to eventually apply all
+ * arguments to.
+ * @param {...*} arguments... - Any number of arguments to apply to the function.
+ * @example
+ *
+ * // in a module
+ * var hello = function(name, callback) {
+ * setTimeout(function() {
+ * callback(null, {hello: name});
+ * }, 1000);
+ * };
+ *
+ * // in the node repl
+ * node> async.dir(hello, 'world');
+ * {hello: 'world'}
+ */
+var dir = consoleFunc('dir');
+
+/**
+ * The post-check version of [`during`]{@link module:ControlFlow.during}. To reflect the difference in
+ * the order of operations, the arguments `test` and `fn` are switched.
+ *
+ * Also a version of [`doWhilst`]{@link module:ControlFlow.doWhilst} with asynchronous `test` function.
+ * @name doDuring
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.during]{@link module:ControlFlow.during}
+ * @category Control Flow
+ * @param {Function} fn - A function which is called each time `test` passes.
+ * The function is passed a `callback(err)`, which must be called once it has
+ * completed with an optional `err` argument. Invoked with (callback).
+ * @param {Function} test - asynchronous truth test to perform before each
+ * execution of `fn`. Invoked with (...args, callback), where `...args` are the
+ * non-error args from the previous callback of `fn`.
+ * @param {Function} [callback] - A callback which is called after the test
+ * function has failed and repeated execution of `fn` has stopped. `callback`
+ * will be passed an error if one occured, otherwise `null`.
+ */
+function doDuring(fn, test, callback) {
+ callback = onlyOnce(callback || noop);
+
+ var next = baseRest$1(function (err, args) {
+ if (err) return callback(err);
+ args.push(check);
+ test.apply(this, args);
+ });
+
+ function check(err, truth) {
+ if (err) return callback(err);
+ if (!truth) return callback(null);
+ fn(next);
+ }
+
+ check(null, true);
+}
+
+/**
+ * The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in
+ * the order of operations, the arguments `test` and `iteratee` are switched.
+ *
+ * `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.
+ *
+ * @name doWhilst
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.whilst]{@link module:ControlFlow.whilst}
+ * @category Control Flow
+ * @param {Function} iteratee - A function which is called each time `test`
+ * passes. The function is passed a `callback(err)`, which must be called once
+ * it has completed with an optional `err` argument. Invoked with (callback).
+ * @param {Function} test - synchronous truth test to perform after each
+ * execution of `iteratee`. Invoked with the non-error callback results of
+ * `iteratee`.
+ * @param {Function} [callback] - A callback which is called after the test
+ * function has failed and repeated execution of `iteratee` has stopped.
+ * `callback` will be passed an error and any arguments passed to the final
+ * `iteratee`'s callback. Invoked with (err, [results]);
+ */
+function doWhilst(iteratee, test, callback) {
+ callback = onlyOnce(callback || noop);
+ var next = baseRest$1(function (err, args) {
+ if (err) return callback(err);
+ if (test.apply(this, args)) return iteratee(next);
+ callback.apply(null, [null].concat(args));
+ });
+ iteratee(next);
+}
+
+/**
+ * Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the
+ * argument ordering differs from `until`.
+ *
+ * @name doUntil
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.doWhilst]{@link module:ControlFlow.doWhilst}
+ * @category Control Flow
+ * @param {Function} fn - A function which is called each time `test` fails.
+ * The function is passed a `callback(err)`, which must be called once it has
+ * completed with an optional `err` argument. Invoked with (callback).
+ * @param {Function} test - synchronous truth test to perform after each
+ * execution of `fn`. Invoked with the non-error callback results of `fn`.
+ * @param {Function} [callback] - A callback which is called after the test
+ * function has passed and repeated execution of `fn` has stopped. `callback`
+ * will be passed an error and any arguments passed to the final `fn`'s
+ * callback. Invoked with (err, [results]);
+ */
+function doUntil(fn, test, callback) {
+ doWhilst(fn, function () {
+ return !test.apply(this, arguments);
+ }, callback);
+}
+
+/**
+ * Like [`whilst`]{@link module:ControlFlow.whilst}, except the `test` is an asynchronous function that
+ * is passed a callback in the form of `function (err, truth)`. If error is
+ * passed to `test` or `fn`, the main callback is immediately called with the
+ * value of the error.
+ *
+ * @name during
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.whilst]{@link module:ControlFlow.whilst}
+ * @category Control Flow
+ * @param {Function} test - asynchronous truth test to perform before each
+ * execution of `fn`. Invoked with (callback).
+ * @param {Function} fn - A function which is called each time `test` passes.
+ * The function is passed a `callback(err)`, which must be called once it has
+ * completed with an optional `err` argument. Invoked with (callback).
+ * @param {Function} [callback] - A callback which is called after the test
+ * function has failed and repeated execution of `fn` has stopped. `callback`
+ * will be passed an error, if one occured, otherwise `null`.
+ * @example
+ *
+ * var count = 0;
+ *
+ * async.during(
+ * function (callback) {
+ * return callback(null, count < 5);
+ * },
+ * function (callback) {
+ * count++;
+ * setTimeout(callback, 1000);
+ * },
+ * function (err) {
+ * // 5 seconds have passed
+ * }
+ * );
+ */
+function during(test, fn, callback) {
+ callback = onlyOnce(callback || noop);
+
+ function next(err) {
+ if (err) return callback(err);
+ test(check);
+ }
+
+ function check(err, truth) {
+ if (err) return callback(err);
+ if (!truth) return callback(null);
+ fn(next);
+ }
+
+ test(check);
+}
+
+function _withoutIndex(iteratee) {
+ return function (value, index, callback) {
+ return iteratee(value, callback);
+ };
+}
+
+/**
+ * Applies the function `iteratee` to each item in `coll`, in parallel.
+ * The `iteratee` is called with an item from the list, and a callback for when
+ * it has finished. If the `iteratee` passes an error to its `callback`, the
+ * main `callback` (for the `each` function) is immediately called with the
+ * error.
+ *
+ * Note, that since this function applies `iteratee` to each item in parallel,
+ * there is no guarantee that the iteratee functions will complete in order.
+ *
+ * @name each
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @alias forEach
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A function to apply to each item
+ * in `coll`. The iteratee is passed a `callback(err)` which must be called once
+ * it has completed. If no error has occurred, the `callback` should be run
+ * without arguments or with an explicit `null` argument. The array index is not
+ * passed to the iteratee. Invoked with (item, callback). If you need the index,
+ * use `eachOf`.
+ * @param {Function} [callback] - A callback which is called when all
+ * `iteratee` functions have finished, or an error occurs. Invoked with (err).
+ * @example
+ *
+ * // assuming openFiles is an array of file names and saveFile is a function
+ * // to save the modified contents of that file:
+ *
+ * async.each(openFiles, saveFile, function(err){
+ * // if any of the saves produced an error, err would equal that error
+ * });
+ *
+ * // assuming openFiles is an array of file names
+ * async.each(openFiles, function(file, callback) {
+ *
+ * // Perform operation on file here.
+ * console.log('Processing file ' + file);
+ *
+ * if( file.length > 32 ) {
+ * console.log('This file name is too long');
+ * callback('File name too long');
+ * } else {
+ * // Do work to process file here
+ * console.log('File processed');
+ * callback();
+ * }
+ * }, function(err) {
+ * // if any of the file processing produced an error, err would equal that error
+ * if( err ) {
+ * // One of the iterations produced an error.
+ * // All processing will now stop.
+ * console.log('A file failed to process');
+ * } else {
+ * console.log('All files have been processed successfully');
+ * }
+ * });
+ */
+function eachLimit(coll, iteratee, callback) {
+ eachOf(coll, _withoutIndex(iteratee), callback);
+}
+
+/**
+ * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time.
+ *
+ * @name eachLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.each]{@link module:Collections.each}
+ * @alias forEachLimit
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {Function} iteratee - A function to apply to each item in `coll`. The
+ * iteratee is passed a `callback(err)` which must be called once it has
+ * completed. If no error has occurred, the `callback` should be run without
+ * arguments or with an explicit `null` argument. The array index is not passed
+ * to the iteratee. Invoked with (item, callback). If you need the index, use
+ * `eachOfLimit`.
+ * @param {Function} [callback] - A callback which is called when all
+ * `iteratee` functions have finished, or an error occurs. Invoked with (err).
+ */
+function eachLimit$1(coll, limit, iteratee, callback) {
+ _eachOfLimit(limit)(coll, _withoutIndex(iteratee), callback);
+}
+
+/**
+ * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time.
+ *
+ * @name eachSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.each]{@link module:Collections.each}
+ * @alias forEachSeries
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A function to apply to each
+ * item in `coll`. The iteratee is passed a `callback(err)` which must be called
+ * once it has completed. If no error has occurred, the `callback` should be run
+ * without arguments or with an explicit `null` argument. The array index is
+ * not passed to the iteratee. Invoked with (item, callback). If you need the
+ * index, use `eachOfSeries`.
+ * @param {Function} [callback] - A callback which is called when all
+ * `iteratee` functions have finished, or an error occurs. Invoked with (err).
+ */
+var eachSeries = doLimit(eachLimit$1, 1);
+
+/**
+ * Wrap an async function and ensure it calls its callback on a later tick of
+ * the event loop. If the function already calls its callback on a next tick,
+ * no extra deferral is added. This is useful for preventing stack overflows
+ * (`RangeError: Maximum call stack size exceeded`) and generally keeping
+ * [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony)
+ * contained.
+ *
+ * @name ensureAsync
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @category Util
+ * @param {Function} fn - an async function, one that expects a node-style
+ * callback as its last argument.
+ * @returns {Function} Returns a wrapped function with the exact same call
+ * signature as the function passed in.
+ * @example
+ *
+ * function sometimesAsync(arg, callback) {
+ * if (cache[arg]) {
+ * return callback(null, cache[arg]); // this would be synchronous!!
+ * } else {
+ * doSomeIO(arg, callback); // this IO would be asynchronous
+ * }
+ * }
+ *
+ * // this has a risk of stack overflows if many results are cached in a row
+ * async.mapSeries(args, sometimesAsync, done);
+ *
+ * // this will defer sometimesAsync's callback if necessary,
+ * // preventing stack overflows
+ * async.mapSeries(args, async.ensureAsync(sometimesAsync), done);
+ */
+function ensureAsync(fn) {
+ return initialParams(function (args, callback) {
+ var sync = true;
+ args.push(function () {
+ var innerArgs = arguments;
+ if (sync) {
+ setImmediate$1(function () {
+ callback.apply(null, innerArgs);
+ });
+ } else {
+ callback.apply(null, innerArgs);
+ }
+ });
+ fn.apply(this, args);
+ sync = false;
+ });
+}
+
+function notId(v) {
+ return !v;
+}
+
+/**
+ * Returns `true` if every element in `coll` satisfies an async test. If any
+ * iteratee call returns `false`, the main `callback` is immediately called.
+ *
+ * @name every
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @alias all
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A truth test to apply to each item in the
+ * collection in parallel. The iteratee is passed a `callback(err, truthValue)`
+ * which must be called with a boolean argument once it has completed. Invoked
+ * with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Result will be either `true` or `false`
+ * depending on the values of the async tests. Invoked with (err, result).
+ * @example
+ *
+ * async.every(['file1','file2','file3'], function(filePath, callback) {
+ * fs.access(filePath, function(err) {
+ * callback(null, !err)
+ * });
+ * }, function(err, result) {
+ * // if result is true then every file exists
+ * });
+ */
+var every = _createTester(eachOf, notId, notId);
+
+/**
+ * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time.
+ *
+ * @name everyLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.every]{@link module:Collections.every}
+ * @alias allLimit
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {Function} iteratee - A truth test to apply to each item in the
+ * collection in parallel. The iteratee is passed a `callback(err, truthValue)`
+ * which must be called with a boolean argument once it has completed. Invoked
+ * with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Result will be either `true` or `false`
+ * depending on the values of the async tests. Invoked with (err, result).
+ */
+var everyLimit = _createTester(eachOfLimit, notId, notId);
+
+/**
+ * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time.
+ *
+ * @name everySeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.every]{@link module:Collections.every}
+ * @alias allSeries
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A truth test to apply to each item in the
+ * collection in parallel. The iteratee is passed a `callback(err, truthValue)`
+ * which must be called with a boolean argument once it has completed. Invoked
+ * with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Result will be either `true` or `false`
+ * depending on the values of the async tests. Invoked with (err, result).
+ */
+var everySeries = doLimit(everyLimit, 1);
+
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+function _filter(eachfn, arr, iteratee, callback) {
+ callback = once(callback || noop);
+ var results = [];
+ eachfn(arr, function (x, index, callback) {
+ iteratee(x, function (err, v) {
+ if (err) {
+ callback(err);
+ } else {
+ if (v) {
+ results.push({ index: index, value: x });
+ }
+ callback();
+ }
+ });
+ }, function (err) {
+ if (err) {
+ callback(err);
+ } else {
+ callback(null, arrayMap(results.sort(function (a, b) {
+ return a.index - b.index;
+ }), baseProperty('value')));
+ }
+ });
+}
+
+/**
+ * Returns a new array of all the values in `coll` which pass an async truth
+ * test. This operation is performed in parallel, but the results array will be
+ * in the same order as the original.
+ *
+ * @name filter
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @alias select
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A truth test to apply to each item in `coll`.
+ * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
+ * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Invoked with (err, results).
+ * @example
+ *
+ * async.filter(['file1','file2','file3'], function(filePath, callback) {
+ * fs.access(filePath, function(err) {
+ * callback(null, !err)
+ * });
+ * }, function(err, results) {
+ * // results now equals an array of the existing files
+ * });
+ */
+var filter = doParallel(_filter);
+
+/**
+ * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a
+ * time.
+ *
+ * @name filterLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.filter]{@link module:Collections.filter}
+ * @alias selectLimit
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {Function} iteratee - A truth test to apply to each item in `coll`.
+ * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
+ * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Invoked with (err, results).
+ */
+var filterLimit = doParallelLimit(_filter);
+
+/**
+ * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time.
+ *
+ * @name filterSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.filter]{@link module:Collections.filter}
+ * @alias selectSeries
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A truth test to apply to each item in `coll`.
+ * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
+ * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Invoked with (err, results)
+ */
+var filterSeries = doLimit(filterLimit, 1);
+
+/**
+ * Calls the asynchronous function `fn` with a callback parameter that allows it
+ * to call itself again, in series, indefinitely.
+
+ * If an error is passed to the
+ * callback then `errback` is called with the error, and execution stops,
+ * otherwise it will never be called.
+ *
+ * @name forever
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {Function} fn - a function to call repeatedly. Invoked with (next).
+ * @param {Function} [errback] - when `fn` passes an error to it's callback,
+ * this function will be called, and execution stops. Invoked with (err).
+ * @example
+ *
+ * async.forever(
+ * function(next) {
+ * // next is suitable for passing to things that need a callback(err [, whatever]);
+ * // it will result in this function being called again.
+ * },
+ * function(err) {
+ * // if next is called with a value in its first parameter, it will appear
+ * // in here as 'err', and execution will stop.
+ * }
+ * );
+ */
+function forever(fn, errback) {
+ var done = onlyOnce(errback || noop);
+ var task = ensureAsync(fn);
+
+ function next(err) {
+ if (err) return done(err);
+ task(next);
+ }
+ next();
+}
+
+/**
+ * Logs the result of an `async` function to the `console`. Only works in
+ * Node.js or in browsers that support `console.log` and `console.error` (such
+ * as FF and Chrome). If multiple arguments are returned from the async
+ * function, `console.log` is called on each argument in order.
+ *
+ * @name log
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @category Util
+ * @param {Function} function - The function you want to eventually apply all
+ * arguments to.
+ * @param {...*} arguments... - Any number of arguments to apply to the function.
+ * @example
+ *
+ * // in a module
+ * var hello = function(name, callback) {
+ * setTimeout(function() {
+ * callback(null, 'hello ' + name);
+ * }, 1000);
+ * };
+ *
+ * // in the node repl
+ * node> async.log(hello, 'world');
+ * 'hello world'
+ */
+var log = consoleFunc('log');
+
+/**
+ * The same as [`mapValues`]{@link module:Collections.mapValues} but runs a maximum of `limit` async operations at a
+ * time.
+ *
+ * @name mapValuesLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.mapValues]{@link module:Collections.mapValues}
+ * @category Collection
+ * @param {Object} obj - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {Function} iteratee - A function to apply to each value in `obj`.
+ * The iteratee is passed a `callback(err, transformed)` which must be called
+ * once it has completed with an error (which can be `null`) and a
+ * transformed value. Invoked with (value, key, callback).
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
+ * functions have finished, or an error occurs. `result` is a new object consisting
+ * of each key from `obj`, with each transformed value on the right-hand side.
+ * Invoked with (err, result).
+ */
+function mapValuesLimit(obj, limit, iteratee, callback) {
+ callback = once(callback || noop);
+ var newObj = {};
+ eachOfLimit(obj, limit, function (val, key, next) {
+ iteratee(val, key, function (err, result) {
+ if (err) return next(err);
+ newObj[key] = result;
+ next();
+ });
+ }, function (err) {
+ callback(err, newObj);
+ });
+}
+
+/**
+ * A relative of [`map`]{@link module:Collections.map}, designed for use with objects.
+ *
+ * Produces a new Object by mapping each value of `obj` through the `iteratee`
+ * function. The `iteratee` is called each `value` and `key` from `obj` and a
+ * callback for when it has finished processing. Each of these callbacks takes
+ * two arguments: an `error`, and the transformed item from `obj`. If `iteratee`
+ * passes an error to its callback, the main `callback` (for the `mapValues`
+ * function) is immediately called with the error.
+ *
+ * Note, the order of the keys in the result is not guaranteed. The keys will
+ * be roughly in the order they complete, (but this is very engine-specific)
+ *
+ * @name mapValues
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @category Collection
+ * @param {Object} obj - A collection to iterate over.
+ * @param {Function} iteratee - A function to apply to each value and key in
+ * `coll`. The iteratee is passed a `callback(err, transformed)` which must be
+ * called once it has completed with an error (which can be `null`) and a
+ * transformed value. Invoked with (value, key, callback).
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
+ * functions have finished, or an error occurs. `result` is a new object consisting
+ * of each key from `obj`, with each transformed value on the right-hand side.
+ * Invoked with (err, result).
+ * @example
+ *
+ * async.mapValues({
+ * f1: 'file1',
+ * f2: 'file2',
+ * f3: 'file3'
+ * }, function (file, key, callback) {
+ * fs.stat(file, callback);
+ * }, function(err, result) {
+ * // result is now a map of stats for each file, e.g.
+ * // {
+ * // f1: [stats for file1],
+ * // f2: [stats for file2],
+ * // f3: [stats for file3]
+ * // }
+ * });
+ */
+
+var mapValues = doLimit(mapValuesLimit, Infinity);
+
+/**
+ * The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time.
+ *
+ * @name mapValuesSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.mapValues]{@link module:Collections.mapValues}
+ * @category Collection
+ * @param {Object} obj - A collection to iterate over.
+ * @param {Function} iteratee - A function to apply to each value in `obj`.
+ * The iteratee is passed a `callback(err, transformed)` which must be called
+ * once it has completed with an error (which can be `null`) and a
+ * transformed value. Invoked with (value, key, callback).
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
+ * functions have finished, or an error occurs. `result` is a new object consisting
+ * of each key from `obj`, with each transformed value on the right-hand side.
+ * Invoked with (err, result).
+ */
+var mapValuesSeries = doLimit(mapValuesLimit, 1);
+
+function has(obj, key) {
+ return key in obj;
+}
+
+/**
+ * Caches the results of an `async` function. When creating a hash to store
+ * function results against, the callback is omitted from the hash and an
+ * optional hash function can be used.
+ *
+ * If no hash function is specified, the first argument is used as a hash key,
+ * which may work reasonably if it is a string or a data type that converts to a
+ * distinct string. Note that objects and arrays will not behave reasonably.
+ * Neither will cases where the other arguments are significant. In such cases,
+ * specify your own hash function.
+ *
+ * The cache of results is exposed as the `memo` property of the function
+ * returned by `memoize`.
+ *
+ * @name memoize
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @category Util
+ * @param {Function} fn - The function to proxy and cache results from.
+ * @param {Function} hasher - An optional function for generating a custom hash
+ * for storing results. It has all the arguments applied to it apart from the
+ * callback, and must be synchronous.
+ * @returns {Function} a memoized version of `fn`
+ * @example
+ *
+ * var slow_fn = function(name, callback) {
+ * // do something
+ * callback(null, result);
+ * };
+ * var fn = async.memoize(slow_fn);
+ *
+ * // fn can now be used as if it were slow_fn
+ * fn('some name', function() {
+ * // callback
+ * });
+ */
+function memoize(fn, hasher) {
+ var memo = Object.create(null);
+ var queues = Object.create(null);
+ hasher = hasher || identity;
+ var memoized = initialParams(function memoized(args, callback) {
+ var key = hasher.apply(null, args);
+ if (has(memo, key)) {
+ setImmediate$1(function () {
+ callback.apply(null, memo[key]);
+ });
+ } else if (has(queues, key)) {
+ queues[key].push(callback);
+ } else {
+ queues[key] = [callback];
+ fn.apply(null, args.concat([baseRest$1(function (args) {
+ memo[key] = args;
+ var q = queues[key];
+ delete queues[key];
+ for (var i = 0, l = q.length; i < l; i++) {
+ q[i].apply(null, args);
+ }
+ })]));
+ }
+ });
+ memoized.memo = memo;
+ memoized.unmemoized = fn;
+ return memoized;
+}
+
+/**
+ * Calls `callback` on a later loop around the event loop. In Node.js this just
+ * calls `setImmediate`. In the browser it will use `setImmediate` if
+ * available, otherwise `setTimeout(callback, 0)`, which means other higher
+ * priority events may precede the execution of `callback`.
+ *
+ * This is used internally for browser-compatibility purposes.
+ *
+ * @name nextTick
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @alias setImmediate
+ * @category Util
+ * @param {Function} callback - The function to call on a later loop around
+ * the event loop. Invoked with (args...).
+ * @param {...*} args... - any number of additional arguments to pass to the
+ * callback on the next tick.
+ * @example
+ *
+ * var call_order = [];
+ * async.nextTick(function() {
+ * call_order.push('two');
+ * // call_order now equals ['one','two']
+ * });
+ * call_order.push('one');
+ *
+ * async.setImmediate(function (a, b, c) {
+ * // a, b, and c equal 1, 2, and 3
+ * }, 1, 2, 3);
+ */
+var _defer$1;
+
+if (hasNextTick) {
+ _defer$1 = process.nextTick;
+} else if (hasSetImmediate) {
+ _defer$1 = setImmediate;
+} else {
+ _defer$1 = fallback;
+}
+
+var nextTick = wrap(_defer$1);
+
+function _parallel(eachfn, tasks, callback) {
+ callback = callback || noop;
+ var results = isArrayLike(tasks) ? [] : {};
+
+ eachfn(tasks, function (task, key, callback) {
+ task(baseRest$1(function (err, args) {
+ if (args.length <= 1) {
+ args = args[0];
+ }
+ results[key] = args;
+ callback(err);
+ }));
+ }, function (err) {
+ callback(err, results);
+ });
+}
+
+/**
+ * Run the `tasks` collection of functions in parallel, without waiting until
+ * the previous function has completed. If any of the functions pass an error to
+ * its callback, the main `callback` is immediately called with the value of the
+ * error. Once the `tasks` have completed, the results are passed to the final
+ * `callback` as an array.
+ *
+ * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about
+ * parallel execution of code. If your tasks do not use any timers or perform
+ * any I/O, they will actually be executed in series. Any synchronous setup
+ * sections for each task will happen one after the other. JavaScript remains
+ * single-threaded.
+ *
+ * It is also possible to use an object instead of an array. Each property will
+ * be run as a function and the results will be passed to the final `callback`
+ * as an object instead of an array. This can be a more readable way of handling
+ * results from {@link async.parallel}.
+ *
+ * @name parallel
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {Array|Iterable|Object} tasks - A collection containing functions to run.
+ * Each function is passed a `callback(err, result)` which it must call on
+ * completion with an error `err` (which can be `null`) and an optional `result`
+ * value.
+ * @param {Function} [callback] - An optional callback to run once all the
+ * functions have completed successfully. This function gets a results array
+ * (or object) containing all the result arguments passed to the task callbacks.
+ * Invoked with (err, results).
+ * @example
+ * async.parallel([
+ * function(callback) {
+ * setTimeout(function() {
+ * callback(null, 'one');
+ * }, 200);
+ * },
+ * function(callback) {
+ * setTimeout(function() {
+ * callback(null, 'two');
+ * }, 100);
+ * }
+ * ],
+ * // optional callback
+ * function(err, results) {
+ * // the results array will equal ['one','two'] even though
+ * // the second function had a shorter timeout.
+ * });
+ *
+ * // an example using an object instead of an array
+ * async.parallel({
+ * one: function(callback) {
+ * setTimeout(function() {
+ * callback(null, 1);
+ * }, 200);
+ * },
+ * two: function(callback) {
+ * setTimeout(function() {
+ * callback(null, 2);
+ * }, 100);
+ * }
+ * }, function(err, results) {
+ * // results is now equals to: {one: 1, two: 2}
+ * });
+ */
+function parallelLimit(tasks, callback) {
+ _parallel(eachOf, tasks, callback);
+}
+
+/**
+ * The same as [`parallel`]{@link module:ControlFlow.parallel} but runs a maximum of `limit` async operations at a
+ * time.
+ *
+ * @name parallelLimit
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.parallel]{@link module:ControlFlow.parallel}
+ * @category Control Flow
+ * @param {Array|Collection} tasks - A collection containing functions to run.
+ * Each function is passed a `callback(err, result)` which it must call on
+ * completion with an error `err` (which can be `null`) and an optional `result`
+ * value.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {Function} [callback] - An optional callback to run once all the
+ * functions have completed successfully. This function gets a results array
+ * (or object) containing all the result arguments passed to the task callbacks.
+ * Invoked with (err, results).
+ */
+function parallelLimit$1(tasks, limit, callback) {
+ _parallel(_eachOfLimit(limit), tasks, callback);
+}
+
+/**
+ * A queue of tasks for the worker function to complete.
+ * @typedef {Object} QueueObject
+ * @memberOf module:ControlFlow
+ * @property {Function} length - a function returning the number of items
+ * waiting to be processed. Invoke with `queue.length()`.
+ * @property {boolean} started - a boolean indicating whether or not any
+ * items have been pushed and processed by the queue.
+ * @property {Function} running - a function returning the number of items
+ * currently being processed. Invoke with `queue.running()`.
+ * @property {Function} workersList - a function returning the array of items
+ * currently being processed. Invoke with `queue.workersList()`.
+ * @property {Function} idle - a function returning false if there are items
+ * waiting or being processed, or true if not. Invoke with `queue.idle()`.
+ * @property {number} concurrency - an integer for determining how many `worker`
+ * functions should be run in parallel. This property can be changed after a
+ * `queue` is created to alter the concurrency on-the-fly.
+ * @property {Function} push - add a new task to the `queue`. Calls `callback`
+ * once the `worker` has finished processing the task. Instead of a single task,
+ * a `tasks` array can be submitted. The respective callback is used for every
+ * task in the list. Invoke with `queue.push(task, [callback])`,
+ * @property {Function} unshift - add a new task to the front of the `queue`.
+ * Invoke with `queue.unshift(task, [callback])`.
+ * @property {Function} saturated - a callback that is called when the number of
+ * running workers hits the `concurrency` limit, and further tasks will be
+ * queued.
+ * @property {Function} unsaturated - a callback that is called when the number
+ * of running workers is less than the `concurrency` & `buffer` limits, and
+ * further tasks will not be queued.
+ * @property {number} buffer - A minimum threshold buffer in order to say that
+ * the `queue` is `unsaturated`.
+ * @property {Function} empty - a callback that is called when the last item
+ * from the `queue` is given to a `worker`.
+ * @property {Function} drain - a callback that is called when the last item
+ * from the `queue` has returned from the `worker`.
+ * @property {Function} error - a callback that is called when a task errors.
+ * Has the signature `function(error, task)`.
+ * @property {boolean} paused - a boolean for determining whether the queue is
+ * in a paused state.
+ * @property {Function} pause - a function that pauses the processing of tasks
+ * until `resume()` is called. Invoke with `queue.pause()`.
+ * @property {Function} resume - a function that resumes the processing of
+ * queued tasks when the queue is paused. Invoke with `queue.resume()`.
+ * @property {Function} kill - a function that removes the `drain` callback and
+ * empties remaining tasks from the queue forcing it to go idle. Invoke with `queue.kill()`.
+ */
+
+/**
+ * Creates a `queue` object with the specified `concurrency`. Tasks added to the
+ * `queue` are processed in parallel (up to the `concurrency` limit). If all
+ * `worker`s are in progress, the task is queued until one becomes available.
+ * Once a `worker` completes a `task`, that `task`'s callback is called.
+ *
+ * @name queue
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {Function} worker - An asynchronous function for processing a queued
+ * task, which must call its `callback(err)` argument when finished, with an
+ * optional `error` as an argument. If you want to handle errors from an
+ * individual task, pass a callback to `q.push()`. Invoked with
+ * (task, callback).
+ * @param {number} [concurrency=1] - An `integer` for determining how many
+ * `worker` functions should be run in parallel. If omitted, the concurrency
+ * defaults to `1`. If the concurrency is `0`, an error is thrown.
+ * @returns {module:ControlFlow.QueueObject} A queue object to manage the tasks. Callbacks can
+ * attached as certain properties to listen for specific events during the
+ * lifecycle of the queue.
+ * @example
+ *
+ * // create a queue object with concurrency 2
+ * var q = async.queue(function(task, callback) {
+ * console.log('hello ' + task.name);
+ * callback();
+ * }, 2);
+ *
+ * // assign a callback
+ * q.drain = function() {
+ * console.log('all items have been processed');
+ * };
+ *
+ * // add some items to the queue
+ * q.push({name: 'foo'}, function(err) {
+ * console.log('finished processing foo');
+ * });
+ * q.push({name: 'bar'}, function (err) {
+ * console.log('finished processing bar');
+ * });
+ *
+ * // add some items to the queue (batch-wise)
+ * q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function(err) {
+ * console.log('finished processing item');
+ * });
+ *
+ * // add some items to the front of the queue
+ * q.unshift({name: 'bar'}, function (err) {
+ * console.log('finished processing bar');
+ * });
+ */
+var queue$1 = function (worker, concurrency) {
+ return queue(function (items, cb) {
+ worker(items[0], cb);
+ }, concurrency, 1);
+};
+
+/**
+ * The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and
+ * completed in ascending priority order.
+ *
+ * @name priorityQueue
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.queue]{@link module:ControlFlow.queue}
+ * @category Control Flow
+ * @param {Function} worker - An asynchronous function for processing a queued
+ * task, which must call its `callback(err)` argument when finished, with an
+ * optional `error` as an argument. If you want to handle errors from an
+ * individual task, pass a callback to `q.push()`. Invoked with
+ * (task, callback).
+ * @param {number} concurrency - An `integer` for determining how many `worker`
+ * functions should be run in parallel. If omitted, the concurrency defaults to
+ * `1`. If the concurrency is `0`, an error is thrown.
+ * @returns {module:ControlFlow.QueueObject} A priorityQueue object to manage the tasks. There are two
+ * differences between `queue` and `priorityQueue` objects:
+ * * `push(task, priority, [callback])` - `priority` should be a number. If an
+ * array of `tasks` is given, all tasks will be assigned the same priority.
+ * * The `unshift` method was removed.
+ */
+var priorityQueue = function (worker, concurrency) {
+ // Start with a normal queue
+ var q = queue$1(worker, concurrency);
+
+ // Override push to accept second parameter representing priority
+ q.push = function (data, priority, callback) {
+ if (callback == null) callback = noop;
+ if (typeof callback !== 'function') {
+ throw new Error('task callback must be a function');
+ }
+ q.started = true;
+ if (!isArray(data)) {
+ data = [data];
+ }
+ if (data.length === 0) {
+ // call drain immediately if there are no tasks
+ return setImmediate$1(function () {
+ q.drain();
+ });
+ }
+
+ priority = priority || 0;
+ var nextNode = q._tasks.head;
+ while (nextNode && priority >= nextNode.priority) {
+ nextNode = nextNode.next;
+ }
+
+ for (var i = 0, l = data.length; i < l; i++) {
+ var item = {
+ data: data[i],
+ priority: priority,
+ callback: callback
+ };
+
+ if (nextNode) {
+ q._tasks.insertBefore(nextNode, item);
+ } else {
+ q._tasks.push(item);
+ }
+ }
+ setImmediate$1(q.process);
+ };
+
+ // Remove unshift function
+ delete q.unshift;
+
+ return q;
+};
+
+/**
+ * Runs the `tasks` array of functions in parallel, without waiting until the
+ * previous function has completed. Once any of the `tasks` complete or pass an
+ * error to its callback, the main `callback` is immediately called. It's
+ * equivalent to `Promise.race()`.
+ *
+ * @name race
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {Array} tasks - An array containing functions to run. Each function
+ * is passed a `callback(err, result)` which it must call on completion with an
+ * error `err` (which can be `null`) and an optional `result` value.
+ * @param {Function} callback - A callback to run once any of the functions have
+ * completed. This function gets an error or result from the first function that
+ * completed. Invoked with (err, result).
+ * @returns undefined
+ * @example
+ *
+ * async.race([
+ * function(callback) {
+ * setTimeout(function() {
+ * callback(null, 'one');
+ * }, 200);
+ * },
+ * function(callback) {
+ * setTimeout(function() {
+ * callback(null, 'two');
+ * }, 100);
+ * }
+ * ],
+ * // main callback
+ * function(err, result) {
+ * // the result will be equal to 'two' as it finishes earlier
+ * });
+ */
+function race(tasks, callback) {
+ callback = once(callback || noop);
+ if (!isArray(tasks)) return callback(new TypeError('First argument to race must be an array of functions'));
+ if (!tasks.length) return callback();
+ for (var i = 0, l = tasks.length; i < l; i++) {
+ tasks[i](callback);
+ }
+}
+
+var slice = Array.prototype.slice;
+
+/**
+ * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order.
+ *
+ * @name reduceRight
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.reduce]{@link module:Collections.reduce}
+ * @alias foldr
+ * @category Collection
+ * @param {Array} array - A collection to iterate over.
+ * @param {*} memo - The initial state of the reduction.
+ * @param {Function} iteratee - A function applied to each item in the
+ * array to produce the next step in the reduction. The `iteratee` is passed a
+ * `callback(err, reduction)` which accepts an optional error as its first
+ * argument, and the state of the reduction as the second. If an error is
+ * passed to the callback, the reduction is stopped and the main `callback` is
+ * immediately called with the error. Invoked with (memo, item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Result is the reduced value. Invoked with
+ * (err, result).
+ */
+function reduceRight(array, memo, iteratee, callback) {
+ var reversed = slice.call(array).reverse();
+ reduce(reversed, memo, iteratee, callback);
+}
+
+/**
+ * Wraps the function in another function that always returns data even when it
+ * errors.
+ *
+ * The object returned has either the property `error` or `value`.
+ *
+ * @name reflect
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @category Util
+ * @param {Function} fn - The function you want to wrap
+ * @returns {Function} - A function that always passes null to it's callback as
+ * the error. The second argument to the callback will be an `object` with
+ * either an `error` or a `value` property.
+ * @example
+ *
+ * async.parallel([
+ * async.reflect(function(callback) {
+ * // do some stuff ...
+ * callback(null, 'one');
+ * }),
+ * async.reflect(function(callback) {
+ * // do some more stuff but error ...
+ * callback('bad stuff happened');
+ * }),
+ * async.reflect(function(callback) {
+ * // do some more stuff ...
+ * callback(null, 'two');
+ * })
+ * ],
+ * // optional callback
+ * function(err, results) {
+ * // values
+ * // results[0].value = 'one'
+ * // results[1].error = 'bad stuff happened'
+ * // results[2].value = 'two'
+ * });
+ */
+function reflect(fn) {
+ return initialParams(function reflectOn(args, reflectCallback) {
+ args.push(baseRest$1(function callback(err, cbArgs) {
+ if (err) {
+ reflectCallback(null, {
+ error: err
+ });
+ } else {
+ var value = null;
+ if (cbArgs.length === 1) {
+ value = cbArgs[0];
+ } else if (cbArgs.length > 1) {
+ value = cbArgs;
+ }
+ reflectCallback(null, {
+ value: value
+ });
+ }
+ }));
+
+ return fn.apply(this, args);
+ });
+}
+
+function reject$1(eachfn, arr, iteratee, callback) {
+ _filter(eachfn, arr, function (value, cb) {
+ iteratee(value, function (err, v) {
+ if (err) {
+ cb(err);
+ } else {
+ cb(null, !v);
+ }
+ });
+ }, callback);
+}
+
+/**
+ * The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test.
+ *
+ * @name reject
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.filter]{@link module:Collections.filter}
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A truth test to apply to each item in `coll`.
+ * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
+ * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Invoked with (err, results).
+ * @example
+ *
+ * async.reject(['file1','file2','file3'], function(filePath, callback) {
+ * fs.access(filePath, function(err) {
+ * callback(null, !err)
+ * });
+ * }, function(err, results) {
+ * // results now equals an array of missing files
+ * createFiles(results);
+ * });
+ */
+var reject = doParallel(reject$1);
+
+/**
+ * A helper function that wraps an array or an object of functions with reflect.
+ *
+ * @name reflectAll
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @see [async.reflect]{@link module:Utils.reflect}
+ * @category Util
+ * @param {Array} tasks - The array of functions to wrap in `async.reflect`.
+ * @returns {Array} Returns an array of functions, each function wrapped in
+ * `async.reflect`
+ * @example
+ *
+ * let tasks = [
+ * function(callback) {
+ * setTimeout(function() {
+ * callback(null, 'one');
+ * }, 200);
+ * },
+ * function(callback) {
+ * // do some more stuff but error ...
+ * callback(new Error('bad stuff happened'));
+ * },
+ * function(callback) {
+ * setTimeout(function() {
+ * callback(null, 'two');
+ * }, 100);
+ * }
+ * ];
+ *
+ * async.parallel(async.reflectAll(tasks),
+ * // optional callback
+ * function(err, results) {
+ * // values
+ * // results[0].value = 'one'
+ * // results[1].error = Error('bad stuff happened')
+ * // results[2].value = 'two'
+ * });
+ *
+ * // an example using an object instead of an array
+ * let tasks = {
+ * one: function(callback) {
+ * setTimeout(function() {
+ * callback(null, 'one');
+ * }, 200);
+ * },
+ * two: function(callback) {
+ * callback('two');
+ * },
+ * three: function(callback) {
+ * setTimeout(function() {
+ * callback(null, 'three');
+ * }, 100);
+ * }
+ * };
+ *
+ * async.parallel(async.reflectAll(tasks),
+ * // optional callback
+ * function(err, results) {
+ * // values
+ * // results.one.value = 'one'
+ * // results.two.error = 'two'
+ * // results.three.value = 'three'
+ * });
+ */
+function reflectAll(tasks) {
+ var results;
+ if (isArray(tasks)) {
+ results = arrayMap(tasks, reflect);
+ } else {
+ results = {};
+ baseForOwn(tasks, function (task, key) {
+ results[key] = reflect.call(this, task);
+ });
+ }
+ return results;
+}
+
+/**
+ * The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a
+ * time.
+ *
+ * @name rejectLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.reject]{@link module:Collections.reject}
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {Function} iteratee - A truth test to apply to each item in `coll`.
+ * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
+ * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Invoked with (err, results).
+ */
+var rejectLimit = doParallelLimit(reject$1);
+
+/**
+ * The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time.
+ *
+ * @name rejectSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.reject]{@link module:Collections.reject}
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A truth test to apply to each item in `coll`.
+ * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
+ * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Invoked with (err, results).
+ */
+var rejectSeries = doLimit(rejectLimit, 1);
+
+/**
+ * Attempts to get a successful response from `task` no more than `times` times
+ * before returning an error. If the task is successful, the `callback` will be
+ * passed the result of the successful task. If all attempts fail, the callback
+ * will be passed the error and result (if any) of the final attempt.
+ *
+ * @name retry
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an
+ * object with `times` and `interval` or a number.
+ * * `times` - The number of attempts to make before giving up. The default
+ * is `5`.
+ * * `interval` - The time to wait between retries, in milliseconds. The
+ * default is `0`. The interval may also be specified as a function of the
+ * retry count (see example).
+ * * `errorFilter` - An optional synchronous function that is invoked on
+ * erroneous result. If it returns `true` the retry attempts will continue;
+ * if the function returns `false` the retry flow is aborted with the current
+ * attempt's error and result being returned to the final callback.
+ * Invoked with (err).
+ * * If `opts` is a number, the number specifies the number of times to retry,
+ * with the default interval of `0`.
+ * @param {Function} task - A function which receives two arguments: (1) a
+ * `callback(err, result)` which must be called when finished, passing `err`
+ * (which can be `null`) and the `result` of the function's execution, and (2)
+ * a `results` object, containing the results of the previously executed
+ * functions (if nested inside another control flow). Invoked with
+ * (callback, results).
+ * @param {Function} [callback] - An optional callback which is called when the
+ * task has succeeded, or after the final failed attempt. It receives the `err`
+ * and `result` arguments of the last attempt at completing the `task`. Invoked
+ * with (err, results).
+ * @example
+ *
+ * // The `retry` function can be used as a stand-alone control flow by passing
+ * // a callback, as shown below:
+ *
+ * // try calling apiMethod 3 times
+ * async.retry(3, apiMethod, function(err, result) {
+ * // do something with the result
+ * });
+ *
+ * // try calling apiMethod 3 times, waiting 200 ms between each retry
+ * async.retry({times: 3, interval: 200}, apiMethod, function(err, result) {
+ * // do something with the result
+ * });
+ *
+ * // try calling apiMethod 10 times with exponential backoff
+ * // (i.e. intervals of 100, 200, 400, 800, 1600, ... milliseconds)
+ * async.retry({
+ * times: 10,
+ * interval: function(retryCount) {
+ * return 50 * Math.pow(2, retryCount);
+ * }
+ * }, apiMethod, function(err, result) {
+ * // do something with the result
+ * });
+ *
+ * // try calling apiMethod the default 5 times no delay between each retry
+ * async.retry(apiMethod, function(err, result) {
+ * // do something with the result
+ * });
+ *
+ * // try calling apiMethod only when error condition satisfies, all other
+ * // errors will abort the retry control flow and return to final callback
+ * async.retry({
+ * errorFilter: function(err) {
+ * return err.message === 'Temporary error'; // only retry on a specific error
+ * }
+ * }, apiMethod, function(err, result) {
+ * // do something with the result
+ * });
+ *
+ * // It can also be embedded within other control flow functions to retry
+ * // individual methods that are not as reliable, like this:
+ * async.auto({
+ * users: api.getUsers.bind(api),
+ * payments: async.retry(3, api.getPayments.bind(api))
+ * }, function(err, results) {
+ * // do something with the results
+ * });
+ *
+ */
+function retry(opts, task, callback) {
+ var DEFAULT_TIMES = 5;
+ var DEFAULT_INTERVAL = 0;
+
+ var options = {
+ times: DEFAULT_TIMES,
+ intervalFunc: constant(DEFAULT_INTERVAL)
+ };
+
+ function parseTimes(acc, t) {
+ if (typeof t === 'object') {
+ acc.times = +t.times || DEFAULT_TIMES;
+
+ acc.intervalFunc = typeof t.interval === 'function' ? t.interval : constant(+t.interval || DEFAULT_INTERVAL);
+
+ acc.errorFilter = t.errorFilter;
+ } else if (typeof t === 'number' || typeof t === 'string') {
+ acc.times = +t || DEFAULT_TIMES;
+ } else {
+ throw new Error("Invalid arguments for async.retry");
+ }
+ }
+
+ if (arguments.length < 3 && typeof opts === 'function') {
+ callback = task || noop;
+ task = opts;
+ } else {
+ parseTimes(options, opts);
+ callback = callback || noop;
+ }
+
+ if (typeof task !== 'function') {
+ throw new Error("Invalid arguments for async.retry");
+ }
+
+ var attempt = 1;
+ function retryAttempt() {
+ task(function (err) {
+ if (err && attempt++ < options.times && (typeof options.errorFilter != 'function' || options.errorFilter(err))) {
+ setTimeout(retryAttempt, options.intervalFunc(attempt));
+ } else {
+ callback.apply(null, arguments);
+ }
+ });
+ }
+
+ retryAttempt();
+}
+
+/**
+ * A close relative of [`retry`]{@link module:ControlFlow.retry}. This method wraps a task and makes it
+ * retryable, rather than immediately calling it with retries.
+ *
+ * @name retryable
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.retry]{@link module:ControlFlow.retry}
+ * @category Control Flow
+ * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional
+ * options, exactly the same as from `retry`
+ * @param {Function} task - the asynchronous function to wrap
+ * @returns {Functions} The wrapped function, which when invoked, will retry on
+ * an error, based on the parameters specified in `opts`.
+ * @example
+ *
+ * async.auto({
+ * dep1: async.retryable(3, getFromFlakyService),
+ * process: ["dep1", async.retryable(3, function (results, cb) {
+ * maybeProcessData(results.dep1, cb);
+ * })]
+ * }, callback);
+ */
+var retryable = function (opts, task) {
+ if (!task) {
+ task = opts;
+ opts = null;
+ }
+ return initialParams(function (args, callback) {
+ function taskFn(cb) {
+ task.apply(null, args.concat([cb]));
+ }
+
+ if (opts) retry(opts, taskFn, callback);else retry(taskFn, callback);
+ });
+};
+
+/**
+ * Run the functions in the `tasks` collection in series, each one running once
+ * the previous function has completed. If any functions in the series pass an
+ * error to its callback, no more functions are run, and `callback` is
+ * immediately called with the value of the error. Otherwise, `callback`
+ * receives an array of results when `tasks` have completed.
+ *
+ * It is also possible to use an object instead of an array. Each property will
+ * be run as a function, and the results will be passed to the final `callback`
+ * as an object instead of an array. This can be a more readable way of handling
+ * results from {@link async.series}.
+ *
+ * **Note** that while many implementations preserve the order of object
+ * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6)
+ * explicitly states that
+ *
+ * > The mechanics and order of enumerating the properties is not specified.
+ *
+ * So if you rely on the order in which your series of functions are executed,
+ * and want this to work on all platforms, consider using an array.
+ *
+ * @name series
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {Array|Iterable|Object} tasks - A collection containing functions to run, each
+ * function is passed a `callback(err, result)` it must call on completion with
+ * an error `err` (which can be `null`) and an optional `result` value.
+ * @param {Function} [callback] - An optional callback to run once all the
+ * functions have completed. This function gets a results array (or object)
+ * containing all the result arguments passed to the `task` callbacks. Invoked
+ * with (err, result).
+ * @example
+ * async.series([
+ * function(callback) {
+ * // do some stuff ...
+ * callback(null, 'one');
+ * },
+ * function(callback) {
+ * // do some more stuff ...
+ * callback(null, 'two');
+ * }
+ * ],
+ * // optional callback
+ * function(err, results) {
+ * // results is now equal to ['one', 'two']
+ * });
+ *
+ * async.series({
+ * one: function(callback) {
+ * setTimeout(function() {
+ * callback(null, 1);
+ * }, 200);
+ * },
+ * two: function(callback){
+ * setTimeout(function() {
+ * callback(null, 2);
+ * }, 100);
+ * }
+ * }, function(err, results) {
+ * // results is now equal to: {one: 1, two: 2}
+ * });
+ */
+function series(tasks, callback) {
+ _parallel(eachOfSeries, tasks, callback);
+}
+
+/**
+ * Returns `true` if at least one element in the `coll` satisfies an async test.
+ * If any iteratee call returns `true`, the main `callback` is immediately
+ * called.
+ *
+ * @name some
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @alias any
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A truth test to apply to each item in the array
+ * in parallel. The iteratee is passed a `callback(err, truthValue)` which must
+ * be called with a boolean argument once it has completed. Invoked with
+ * (item, callback).
+ * @param {Function} [callback] - A callback which is called as soon as any
+ * iteratee returns `true`, or after all the iteratee functions have finished.
+ * Result will be either `true` or `false` depending on the values of the async
+ * tests. Invoked with (err, result).
+ * @example
+ *
+ * async.some(['file1','file2','file3'], function(filePath, callback) {
+ * fs.access(filePath, function(err) {
+ * callback(null, !err)
+ * });
+ * }, function(err, result) {
+ * // if result is true then at least one of the files exists
+ * });
+ */
+var some = _createTester(eachOf, Boolean, identity);
+
+/**
+ * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time.
+ *
+ * @name someLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.some]{@link module:Collections.some}
+ * @alias anyLimit
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {Function} iteratee - A truth test to apply to each item in the array
+ * in parallel. The iteratee is passed a `callback(err, truthValue)` which must
+ * be called with a boolean argument once it has completed. Invoked with
+ * (item, callback).
+ * @param {Function} [callback] - A callback which is called as soon as any
+ * iteratee returns `true`, or after all the iteratee functions have finished.
+ * Result will be either `true` or `false` depending on the values of the async
+ * tests. Invoked with (err, result).
+ */
+var someLimit = _createTester(eachOfLimit, Boolean, identity);
+
+/**
+ * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time.
+ *
+ * @name someSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.some]{@link module:Collections.some}
+ * @alias anySeries
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A truth test to apply to each item in the array
+ * in parallel. The iteratee is passed a `callback(err, truthValue)` which must
+ * be called with a boolean argument once it has completed. Invoked with
+ * (item, callback).
+ * @param {Function} [callback] - A callback which is called as soon as any
+ * iteratee returns `true`, or after all the iteratee functions have finished.
+ * Result will be either `true` or `false` depending on the values of the async
+ * tests. Invoked with (err, result).
+ */
+var someSeries = doLimit(someLimit, 1);
+
+/**
+ * Sorts a list by the results of running each `coll` value through an async
+ * `iteratee`.
+ *
+ * @name sortBy
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A function to apply to each item in `coll`.
+ * The iteratee is passed a `callback(err, sortValue)` which must be called once
+ * it has completed with an error (which can be `null`) and a value to use as
+ * the sort criteria. Invoked with (item, callback).
+ * @param {Function} callback - A callback which is called after all the
+ * `iteratee` functions have finished, or an error occurs. Results is the items
+ * from the original `coll` sorted by the values returned by the `iteratee`
+ * calls. Invoked with (err, results).
+ * @example
+ *
+ * async.sortBy(['file1','file2','file3'], function(file, callback) {
+ * fs.stat(file, function(err, stats) {
+ * callback(err, stats.mtime);
+ * });
+ * }, function(err, results) {
+ * // results is now the original array of files sorted by
+ * // modified date
+ * });
+ *
+ * // By modifying the callback parameter the
+ * // sorting order can be influenced:
+ *
+ * // ascending order
+ * async.sortBy([1,9,3,5], function(x, callback) {
+ * callback(null, x);
+ * }, function(err,result) {
+ * // result callback
+ * });
+ *
+ * // descending order
+ * async.sortBy([1,9,3,5], function(x, callback) {
+ * callback(null, x*-1); //<- x*-1 instead of x, turns the order around
+ * }, function(err,result) {
+ * // result callback
+ * });
+ */
+function sortBy(coll, iteratee, callback) {
+ map(coll, function (x, callback) {
+ iteratee(x, function (err, criteria) {
+ if (err) return callback(err);
+ callback(null, { value: x, criteria: criteria });
+ });
+ }, function (err, results) {
+ if (err) return callback(err);
+ callback(null, arrayMap(results.sort(comparator), baseProperty('value')));
+ });
+
+ function comparator(left, right) {
+ var a = left.criteria,
+ b = right.criteria;
+ return a < b ? -1 : a > b ? 1 : 0;
+ }
+}
+
+/**
+ * Sets a time limit on an asynchronous function. If the function does not call
+ * its callback within the specified milliseconds, it will be called with a
+ * timeout error. The code property for the error object will be `'ETIMEDOUT'`.
+ *
+ * @name timeout
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @category Util
+ * @param {Function} asyncFn - The asynchronous function you want to set the
+ * time limit.
+ * @param {number} milliseconds - The specified time limit.
+ * @param {*} [info] - Any variable you want attached (`string`, `object`, etc)
+ * to timeout Error for more information..
+ * @returns {Function} Returns a wrapped function that can be used with any of
+ * the control flow functions. Invoke this function with the same
+ * parameters as you would `asyncFunc`.
+ * @example
+ *
+ * function myFunction(foo, callback) {
+ * doAsyncTask(foo, function(err, data) {
+ * // handle errors
+ * if (err) return callback(err);
+ *
+ * // do some stuff ...
+ *
+ * // return processed data
+ * return callback(null, data);
+ * });
+ * }
+ *
+ * var wrapped = async.timeout(myFunction, 1000);
+ *
+ * // call `wrapped` as you would `myFunction`
+ * wrapped({ bar: 'bar' }, function(err, data) {
+ * // if `myFunction` takes < 1000 ms to execute, `err`
+ * // and `data` will have their expected values
+ *
+ * // else `err` will be an Error with the code 'ETIMEDOUT'
+ * });
+ */
+function timeout(asyncFn, milliseconds, info) {
+ var originalCallback, timer;
+ var timedOut = false;
+
+ function injectedCallback() {
+ if (!timedOut) {
+ originalCallback.apply(null, arguments);
+ clearTimeout(timer);
+ }
+ }
+
+ function timeoutCallback() {
+ var name = asyncFn.name || 'anonymous';
+ var error = new Error('Callback function "' + name + '" timed out.');
+ error.code = 'ETIMEDOUT';
+ if (info) {
+ error.info = info;
+ }
+ timedOut = true;
+ originalCallback(error);
+ }
+
+ return initialParams(function (args, origCallback) {
+ originalCallback = origCallback;
+ // setup timer and call original function
+ timer = setTimeout(timeoutCallback, milliseconds);
+ asyncFn.apply(null, args.concat(injectedCallback));
+ });
+}
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeCeil = Math.ceil;
+var nativeMax$1 = Math.max;
+
+/**
+ * The base implementation of `_.range` and `_.rangeRight` which doesn't
+ * coerce arguments.
+ *
+ * @private
+ * @param {number} start The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} step The value to increment or decrement by.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Array} Returns the range of numbers.
+ */
+function baseRange(start, end, step, fromRight) {
+ var index = -1,
+ length = nativeMax$1(nativeCeil((end - start) / (step || 1)), 0),
+ result = Array(length);
+
+ while (length--) {
+ result[fromRight ? length : ++index] = start;
+ start += step;
+ }
+ return result;
+}
+
+/**
+ * The same as [times]{@link module:ControlFlow.times} but runs a maximum of `limit` async operations at a
+ * time.
+ *
+ * @name timesLimit
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.times]{@link module:ControlFlow.times}
+ * @category Control Flow
+ * @param {number} count - The number of times to run the function.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {Function} iteratee - The function to call `n` times. Invoked with the
+ * iteration index and a callback (n, next).
+ * @param {Function} callback - see [async.map]{@link module:Collections.map}.
+ */
+function timeLimit(count, limit, iteratee, callback) {
+ mapLimit(baseRange(0, count, 1), limit, iteratee, callback);
+}
+
+/**
+ * Calls the `iteratee` function `n` times, and accumulates results in the same
+ * manner you would use with [map]{@link module:Collections.map}.
+ *
+ * @name times
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.map]{@link module:Collections.map}
+ * @category Control Flow
+ * @param {number} n - The number of times to run the function.
+ * @param {Function} iteratee - The function to call `n` times. Invoked with the
+ * iteration index and a callback (n, next).
+ * @param {Function} callback - see {@link module:Collections.map}.
+ * @example
+ *
+ * // Pretend this is some complicated async factory
+ * var createUser = function(id, callback) {
+ * callback(null, {
+ * id: 'user' + id
+ * });
+ * };
+ *
+ * // generate 5 users
+ * async.times(5, function(n, next) {
+ * createUser(n, function(err, user) {
+ * next(err, user);
+ * });
+ * }, function(err, users) {
+ * // we should now have 5 users
+ * });
+ */
+var times = doLimit(timeLimit, Infinity);
+
+/**
+ * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time.
+ *
+ * @name timesSeries
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.times]{@link module:ControlFlow.times}
+ * @category Control Flow
+ * @param {number} n - The number of times to run the function.
+ * @param {Function} iteratee - The function to call `n` times. Invoked with the
+ * iteration index and a callback (n, next).
+ * @param {Function} callback - see {@link module:Collections.map}.
+ */
+var timesSeries = doLimit(timeLimit, 1);
+
+/**
+ * A relative of `reduce`. Takes an Object or Array, and iterates over each
+ * element in series, each step potentially mutating an `accumulator` value.
+ * The type of the accumulator defaults to the type of collection passed in.
+ *
+ * @name transform
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {*} [accumulator] - The initial state of the transform. If omitted,
+ * it will default to an empty Object or Array, depending on the type of `coll`
+ * @param {Function} iteratee - A function applied to each item in the
+ * collection that potentially modifies the accumulator. The `iteratee` is
+ * passed a `callback(err)` which accepts an optional error as its first
+ * argument. If an error is passed to the callback, the transform is stopped
+ * and the main `callback` is immediately called with the error.
+ * Invoked with (accumulator, item, key, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Result is the transformed accumulator.
+ * Invoked with (err, result).
+ * @example
+ *
+ * async.transform([1,2,3], function(acc, item, index, callback) {
+ * // pointless async:
+ * process.nextTick(function() {
+ * acc.push(item * 2)
+ * callback(null)
+ * });
+ * }, function(err, result) {
+ * // result is now equal to [2, 4, 6]
+ * });
+ *
+ * @example
+ *
+ * async.transform({a: 1, b: 2, c: 3}, function (obj, val, key, callback) {
+ * setImmediate(function () {
+ * obj[key] = val * 2;
+ * callback();
+ * })
+ * }, function (err, result) {
+ * // result is equal to {a: 2, b: 4, c: 6}
+ * })
+ */
+function transform(coll, accumulator, iteratee, callback) {
+ if (arguments.length === 3) {
+ callback = iteratee;
+ iteratee = accumulator;
+ accumulator = isArray(coll) ? [] : {};
+ }
+ callback = once(callback || noop);
+
+ eachOf(coll, function (v, k, cb) {
+ iteratee(accumulator, v, k, cb);
+ }, function (err) {
+ callback(err, accumulator);
+ });
+}
+
+/**
+ * Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original,
+ * unmemoized form. Handy for testing.
+ *
+ * @name unmemoize
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @see [async.memoize]{@link module:Utils.memoize}
+ * @category Util
+ * @param {Function} fn - the memoized function
+ * @returns {Function} a function that calls the original unmemoized function
+ */
+function unmemoize(fn) {
+ return function () {
+ return (fn.unmemoized || fn).apply(null, arguments);
+ };
+}
+
+/**
+ * Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when
+ * stopped, or an error occurs.
+ *
+ * @name whilst
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {Function} test - synchronous truth test to perform before each
+ * execution of `iteratee`. Invoked with ().
+ * @param {Function} iteratee - A function which is called each time `test` passes.
+ * The function is passed a `callback(err)`, which must be called once it has
+ * completed with an optional `err` argument. Invoked with (callback).
+ * @param {Function} [callback] - A callback which is called after the test
+ * function has failed and repeated execution of `iteratee` has stopped. `callback`
+ * will be passed an error and any arguments passed to the final `iteratee`'s
+ * callback. Invoked with (err, [results]);
+ * @returns undefined
+ * @example
+ *
+ * var count = 0;
+ * async.whilst(
+ * function() { return count < 5; },
+ * function(callback) {
+ * count++;
+ * setTimeout(function() {
+ * callback(null, count);
+ * }, 1000);
+ * },
+ * function (err, n) {
+ * // 5 seconds have passed, n = 5
+ * }
+ * );
+ */
+function whilst(test, iteratee, callback) {
+ callback = onlyOnce(callback || noop);
+ if (!test()) return callback(null);
+ var next = baseRest$1(function (err, args) {
+ if (err) return callback(err);
+ if (test()) return iteratee(next);
+ callback.apply(null, [null].concat(args));
+ });
+ iteratee(next);
+}
+
+/**
+ * Repeatedly call `fn` until `test` returns `true`. Calls `callback` when
+ * stopped, or an error occurs. `callback` will be passed an error and any
+ * arguments passed to the final `fn`'s callback.
+ *
+ * The inverse of [whilst]{@link module:ControlFlow.whilst}.
+ *
+ * @name until
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.whilst]{@link module:ControlFlow.whilst}
+ * @category Control Flow
+ * @param {Function} test - synchronous truth test to perform before each
+ * execution of `fn`. Invoked with ().
+ * @param {Function} fn - A function which is called each time `test` fails.
+ * The function is passed a `callback(err)`, which must be called once it has
+ * completed with an optional `err` argument. Invoked with (callback).
+ * @param {Function} [callback] - A callback which is called after the test
+ * function has passed and repeated execution of `fn` has stopped. `callback`
+ * will be passed an error and any arguments passed to the final `fn`'s
+ * callback. Invoked with (err, [results]);
+ */
+function until(test, fn, callback) {
+ whilst(function () {
+ return !test.apply(this, arguments);
+ }, fn, callback);
+}
+
+/**
+ * Runs the `tasks` array of functions in series, each passing their results to
+ * the next in the array. However, if any of the `tasks` pass an error to their
+ * own callback, the next function is not executed, and the main `callback` is
+ * immediately called with the error.
+ *
+ * @name waterfall
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {Array} tasks - An array of functions to run, each function is passed
+ * a `callback(err, result1, result2, ...)` it must call on completion. The
+ * first argument is an error (which can be `null`) and any further arguments
+ * will be passed as arguments in order to the next task.
+ * @param {Function} [callback] - An optional callback to run once all the
+ * functions have completed. This will be passed the results of the last task's
+ * callback. Invoked with (err, [results]).
+ * @returns undefined
+ * @example
+ *
+ * async.waterfall([
+ * function(callback) {
+ * callback(null, 'one', 'two');
+ * },
+ * function(arg1, arg2, callback) {
+ * // arg1 now equals 'one' and arg2 now equals 'two'
+ * callback(null, 'three');
+ * },
+ * function(arg1, callback) {
+ * // arg1 now equals 'three'
+ * callback(null, 'done');
+ * }
+ * ], function (err, result) {
+ * // result now equals 'done'
+ * });
+ *
+ * // Or, with named functions:
+ * async.waterfall([
+ * myFirstFunction,
+ * mySecondFunction,
+ * myLastFunction,
+ * ], function (err, result) {
+ * // result now equals 'done'
+ * });
+ * function myFirstFunction(callback) {
+ * callback(null, 'one', 'two');
+ * }
+ * function mySecondFunction(arg1, arg2, callback) {
+ * // arg1 now equals 'one' and arg2 now equals 'two'
+ * callback(null, 'three');
+ * }
+ * function myLastFunction(arg1, callback) {
+ * // arg1 now equals 'three'
+ * callback(null, 'done');
+ * }
+ */
+var waterfall = function (tasks, callback) {
+ callback = once(callback || noop);
+ if (!isArray(tasks)) return callback(new Error('First argument to waterfall must be an array of functions'));
+ if (!tasks.length) return callback();
+ var taskIndex = 0;
+
+ function nextTask(args) {
+ if (taskIndex === tasks.length) {
+ return callback.apply(null, [null].concat(args));
+ }
+
+ var taskCallback = onlyOnce(baseRest$1(function (err, args) {
+ if (err) {
+ return callback.apply(null, [err].concat(args));
+ }
+ nextTask(args);
+ }));
+
+ args.push(taskCallback);
+
+ var task = tasks[taskIndex++];
+ task.apply(null, args);
+ }
+
+ nextTask([]);
+};
+
+/**
+ * Async is a utility module which provides straight-forward, powerful functions
+ * for working with asynchronous JavaScript. Although originally designed for
+ * use with [Node.js](http://nodejs.org) and installable via
+ * `npm install --save async`, it can also be used directly in the browser.
+ * @module async
+ */
+
+/**
+ * A collection of `async` functions for manipulating collections, such as
+ * arrays and objects.
+ * @module Collections
+ */
+
+/**
+ * A collection of `async` functions for controlling the flow through a script.
+ * @module ControlFlow
+ */
+
+/**
+ * A collection of `async` utility functions.
+ * @module Utils
+ */
+var index = {
+ applyEach: applyEach,
+ applyEachSeries: applyEachSeries,
+ apply: apply$2,
+ asyncify: asyncify,
+ auto: auto,
+ autoInject: autoInject,
+ cargo: cargo,
+ compose: compose,
+ concat: concat,
+ concatSeries: concatSeries,
+ constant: constant$2,
+ detect: detect,
+ detectLimit: detectLimit,
+ detectSeries: detectSeries,
+ dir: dir,
+ doDuring: doDuring,
+ doUntil: doUntil,
+ doWhilst: doWhilst,
+ during: during,
+ each: eachLimit,
+ eachLimit: eachLimit$1,
+ eachOf: eachOf,
+ eachOfLimit: eachOfLimit,
+ eachOfSeries: eachOfSeries,
+ eachSeries: eachSeries,
+ ensureAsync: ensureAsync,
+ every: every,
+ everyLimit: everyLimit,
+ everySeries: everySeries,
+ filter: filter,
+ filterLimit: filterLimit,
+ filterSeries: filterSeries,
+ forever: forever,
+ log: log,
+ map: map,
+ mapLimit: mapLimit,
+ mapSeries: mapSeries,
+ mapValues: mapValues,
+ mapValuesLimit: mapValuesLimit,
+ mapValuesSeries: mapValuesSeries,
+ memoize: memoize,
+ nextTick: nextTick,
+ parallel: parallelLimit,
+ parallelLimit: parallelLimit$1,
+ priorityQueue: priorityQueue,
+ queue: queue$1,
+ race: race,
+ reduce: reduce,
+ reduceRight: reduceRight,
+ reflect: reflect,
+ reflectAll: reflectAll,
+ reject: reject,
+ rejectLimit: rejectLimit,
+ rejectSeries: rejectSeries,
+ retry: retry,
+ retryable: retryable,
+ seq: seq$1,
+ series: series,
+ setImmediate: setImmediate$1,
+ some: some,
+ someLimit: someLimit,
+ someSeries: someSeries,
+ sortBy: sortBy,
+ timeout: timeout,
+ times: times,
+ timesLimit: timeLimit,
+ timesSeries: timesSeries,
+ transform: transform,
+ unmemoize: unmemoize,
+ until: until,
+ waterfall: waterfall,
+ whilst: whilst,
+
+ // aliases
+ all: every,
+ any: some,
+ forEach: eachLimit,
+ forEachSeries: eachSeries,
+ forEachLimit: eachLimit$1,
+ forEachOf: eachOf,
+ forEachOfSeries: eachOfSeries,
+ forEachOfLimit: eachOfLimit,
+ inject: reduce,
+ foldl: reduce,
+ foldr: reduceRight,
+ select: filter,
+ selectLimit: filterLimit,
+ selectSeries: filterSeries,
+ wrapSync: asyncify
+};
+
+exports['default'] = index;
+exports.applyEach = applyEach;
+exports.applyEachSeries = applyEachSeries;
+exports.apply = apply$2;
+exports.asyncify = asyncify;
+exports.auto = auto;
+exports.autoInject = autoInject;
+exports.cargo = cargo;
+exports.compose = compose;
+exports.concat = concat;
+exports.concatSeries = concatSeries;
+exports.constant = constant$2;
+exports.detect = detect;
+exports.detectLimit = detectLimit;
+exports.detectSeries = detectSeries;
+exports.dir = dir;
+exports.doDuring = doDuring;
+exports.doUntil = doUntil;
+exports.doWhilst = doWhilst;
+exports.during = during;
+exports.each = eachLimit;
+exports.eachLimit = eachLimit$1;
+exports.eachOf = eachOf;
+exports.eachOfLimit = eachOfLimit;
+exports.eachOfSeries = eachOfSeries;
+exports.eachSeries = eachSeries;
+exports.ensureAsync = ensureAsync;
+exports.every = every;
+exports.everyLimit = everyLimit;
+exports.everySeries = everySeries;
+exports.filter = filter;
+exports.filterLimit = filterLimit;
+exports.filterSeries = filterSeries;
+exports.forever = forever;
+exports.log = log;
+exports.map = map;
+exports.mapLimit = mapLimit;
+exports.mapSeries = mapSeries;
+exports.mapValues = mapValues;
+exports.mapValuesLimit = mapValuesLimit;
+exports.mapValuesSeries = mapValuesSeries;
+exports.memoize = memoize;
+exports.nextTick = nextTick;
+exports.parallel = parallelLimit;
+exports.parallelLimit = parallelLimit$1;
+exports.priorityQueue = priorityQueue;
+exports.queue = queue$1;
+exports.race = race;
+exports.reduce = reduce;
+exports.reduceRight = reduceRight;
+exports.reflect = reflect;
+exports.reflectAll = reflectAll;
+exports.reject = reject;
+exports.rejectLimit = rejectLimit;
+exports.rejectSeries = rejectSeries;
+exports.retry = retry;
+exports.retryable = retryable;
+exports.seq = seq$1;
+exports.series = series;
+exports.setImmediate = setImmediate$1;
+exports.some = some;
+exports.someLimit = someLimit;
+exports.someSeries = someSeries;
+exports.sortBy = sortBy;
+exports.timeout = timeout;
+exports.times = times;
+exports.timesLimit = timeLimit;
+exports.timesSeries = timesSeries;
+exports.transform = transform;
+exports.unmemoize = unmemoize;
+exports.until = until;
+exports.waterfall = waterfall;
+exports.whilst = whilst;
+exports.all = every;
+exports.allLimit = everyLimit;
+exports.allSeries = everySeries;
+exports.any = some;
+exports.anyLimit = someLimit;
+exports.anySeries = someSeries;
+exports.find = detect;
+exports.findLimit = detectLimit;
+exports.findSeries = detectSeries;
+exports.forEach = eachLimit;
+exports.forEachSeries = eachSeries;
+exports.forEachLimit = eachLimit$1;
+exports.forEachOf = eachOf;
+exports.forEachOfSeries = eachOfSeries;
+exports.forEachOfLimit = eachOfLimit;
+exports.inject = reduce;
+exports.foldl = reduce;
+exports.foldr = reduceRight;
+exports.select = filter;
+exports.selectLimit = filterLimit;
+exports.selectSeries = filterSeries;
+exports.wrapSync = asyncify;
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+})));
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/dist/async.min.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/dist/async.min.js
new file mode 100644
index 0000000..15c4a33
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/dist/async.min.js
@@ -0,0 +1,2 @@
+!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n.async=n.async||{})}(this,function(n){"use strict";function t(n){return n}function e(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)}function r(n,t,r){return t=ot(void 0===t?n.length-1:t,0),function(){for(var u=arguments,o=-1,i=ot(u.length-t,0),c=Array(i);++o<i;)c[o]=u[t+o];o=-1;for(var f=Array(t+1);++o<t;)f[o]=u[o];return f[t]=r(c),e(n,this,f)}}function u(n){return function(){return n}}function o(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function i(n){var t=o(n)?lt.call(n):"";return t==it||t==ct||t==ft}function c(n){return!!vt&&vt in n}function f(n){if(null!=n){try{return mt.call(n)}catch(n){}try{return n+""}catch(n){}}return""}function a(n){if(!o(n)||c(n))return!1;var t=i(n)?wt:bt;return t.test(f(n))}function l(n,t){return null==n?void 0:n[t]}function s(n,t){var e=l(n,t);return a(e)?e:void 0}function p(n){var t=0,e=0;return function(){var r=_t(),u=At-(r-e);if(e=r,u>0){if(++t>=Lt)return arguments[0]}else t=0;return n.apply(void 0,arguments)}}function h(n,e){return Tt(r(n,e,t),n+"")}function y(n){return h(function(t,e){var r=Ft(function(e,r){var u=this;return n(t,function(n,t){n.apply(u,e.concat([t]))},r)});return e.length?r.apply(this,e):r})}function v(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=It}function d(n){return null!=n&&v(n.length)&&!i(n)}function m(){}function g(n){return function(){if(null!==n){var t=n;n=null,t.apply(this,arguments)}}}function b(n,t){for(var e=-1,r=Array(n);++e<n;)r[e]=t(e);return r}function j(n){return null!=n&&"object"==typeof n}function S(n){return j(n)&&zt.call(n)==Mt}function k(){return!1}function O(n,t){return t=null==t?Jt:t,!!t&&("number"==typeof n||Kt.test(n))&&n>-1&&n%1==0&&n<t}function w(n){return j(n)&&v(n.length)&&!!Se[we.call(n)]}function x(n){return function(t){return n(t)}}function E(n,t){var e=qt(n),r=!e&&Dt(n),u=!e&&!r&&Ht(n),o=!e&&!r&&!u&&Fe(n),i=e||r||u||o,c=i?b(n.length,String):[],f=c.length;for(var a in n)!t&&!Be.call(n,a)||i&&("length"==a||u&&("offset"==a||"parent"==a)||o&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||O(a,f))||c.push(a);return c}function L(n){var t=n&&n.constructor,e="function"==typeof t&&t.prototype||$e;return n===e}function A(n,t){return function(e){return n(t(e))}}function _(n){if(!L(n))return Me(n);var t=[];for(var e in Object(n))ze.call(n,e)&&"constructor"!=e&&t.push(e);return t}function T(n){return d(n)?E(n):_(n)}function F(n){var t=-1,e=n.length;return function(){return++t<e?{value:n[t],key:t}:null}}function I(n){var t=-1;return function(){var e=n.next();return e.done?null:(t++,{value:e.value,key:t})}}function B(n){var t=T(n),e=-1,r=t.length;return function(){var u=t[++e];return e<r?{value:n[u],key:u}:null}}function $(n){if(d(n))return F(n);var t=$t(n);return t?I(t):B(n)}function M(n){return function(){if(null===n)throw new Error("Callback was already called.");var t=n;n=null,t.apply(this,arguments)}}function P(n){return function(t,e,r){function u(n,t){if(f-=1,n)c=!0,r(n);else{if(t===Re||c&&f<=0)return c=!0,r(null);o()}}function o(){for(;f<n&&!c;){var t=i();if(null===t)return c=!0,void(f<=0&&r(null));f+=1,e(t.value,t.key,M(u))}}if(r=g(r||m),n<=0||!t)return r(null);var i=$(t),c=!1,f=0;o()}}function z(n,t,e,r){P(t)(n,e,r)}function R(n,t){return function(e,r,u){return n(e,t,r,u)}}function U(n,t,e){function r(n){n?e(n):++o===i&&e(null)}e=g(e||m);var u=0,o=0,i=n.length;for(0===i&&e(null);u<i;u++)t(n[u],u,M(r))}function V(n){return function(t,e,r){return n(Ve,t,e,r)}}function D(n,t,e,r){r=g(r||m),t=t||[];var u=[],o=0;n(t,function(n,t,r){var i=o++;e(n,function(n,t){u[i]=t,r(n)})},function(n){r(n,u)})}function q(n){return function(t,e,r,u){return n(P(e),t,r,u)}}function C(n){return Ft(function(t,e){var r;try{r=n.apply(this,t)}catch(n){return e(n)}o(r)&&"function"==typeof r.then?r.then(function(n){e(null,n)},function(n){e(n.message?n:new Error(n))}):e(null,r)})}function W(n,t){for(var e=-1,r=n?n.length:0;++e<r&&t(n[e],e,n)!==!1;);return n}function Q(n){return function(t,e,r){for(var u=-1,o=Object(t),i=r(t),c=i.length;c--;){var f=i[n?c:++u];if(e(o[f],f,o)===!1)break}return t}}function G(n,t){return n&&Ne(n,t,T)}function N(n,t,e,r){for(var u=n.length,o=e+(r?1:-1);r?o--:++o<u;)if(t(n[o],o,n))return o;return-1}function H(n){return n!==n}function J(n,t,e){for(var r=e-1,u=n.length;++r<u;)if(n[r]===t)return r;return-1}function K(n,t,e){return t===t?J(n,t,e):N(n,H,e)}function X(n,t){for(var e=-1,r=n?n.length:0,u=Array(r);++e<r;)u[e]=t(n[e],e,n);return u}function Y(n,t){var e=-1,r=n.length;for(t||(t=Array(r));++e<r;)t[e]=n[e];return t}function Z(n){return"symbol"==typeof n||j(n)&&Ye.call(n)==Ke}function nn(n){if("string"==typeof n)return n;if(qt(n))return X(n,nn)+"";if(Z(n))return tr?tr.call(n):"";var t=n+"";return"0"==t&&1/n==-Ze?"-0":t}function tn(n,t,e){var r=-1,u=n.length;t<0&&(t=-t>u?0:u+t),e=e>u?u:e,e<0&&(e+=u),u=t>e?0:e-t>>>0,t>>>=0;for(var o=Array(u);++r<u;)o[r]=n[r+t];return o}function en(n,t,e){var r=n.length;return e=void 0===e?r:e,!t&&e>=r?n:tn(n,t,e)}function rn(n,t){for(var e=n.length;e--&&K(t,n[e],0)>-1;);return e}function un(n,t){for(var e=-1,r=n.length;++e<r&&K(t,n[e],0)>-1;);return e}function on(n){return n.split("")}function cn(n){return cr.test(n)}function fn(n){return n.match(xr)||[]}function an(n){return cn(n)?fn(n):on(n)}function ln(n){return null==n?"":nn(n)}function sn(n,t,e){if(n=ln(n),n&&(e||void 0===t))return n.replace(Er,"");if(!n||!(t=nn(t)))return n;var r=an(n),u=an(t),o=un(r,u),i=rn(r,u)+1;return en(r,o,i).join("")}function pn(n){return n=n.toString().replace(Tr,""),n=n.match(Lr)[2].replace(" ",""),n=n?n.split(Ar):[],n=n.map(function(n){return sn(n.replace(_r,""))})}function hn(n,t){var e={};G(n,function(n,t){function r(t,e){var r=X(u,function(n){return t[n]});r.push(e),n.apply(null,r)}var u;if(qt(n))u=Y(n),n=u.pop(),e[t]=u.concat(u.length>0?r:n);else if(1===n.length)e[t]=n;else{if(u=pn(n),0===n.length&&0===u.length)throw new Error("autoInject task functions require explicit parameters.");u.pop(),e[t]=u.concat(r)}}),He(e,t)}function yn(n){setTimeout(n,0)}function vn(n){return h(function(t,e){n(function(){t.apply(null,e)})})}function dn(){this.head=this.tail=null,this.length=0}function mn(n,t){n.length=1,n.head=n.tail=t}function gn(n,t,e){function r(n,t,e){if(null!=e&&"function"!=typeof e)throw new Error("task callback must be a function");if(c.started=!0,qt(n)||(n=[n]),0===n.length&&c.idle())return Br(function(){c.drain()});for(var r=0,u=n.length;r<u;r++){var o={data:n[r],callback:e||m};t?c._tasks.unshift(o):c._tasks.push(o)}Br(c.process)}function u(n){return h(function(t){o-=1;for(var e=0,r=n.length;e<r;e++){var u=n[e],f=K(i,u,0);f>=0&&i.splice(f),u.callback.apply(u,t),null!=t[0]&&c.error(t[0],u.data)}o<=c.concurrency-c.buffer&&c.unsaturated(),c.idle()&&c.drain(),c.process()})}if(null==t)t=1;else if(0===t)throw new Error("Concurrency must not be zero");var o=0,i=[],c={_tasks:new dn,concurrency:t,payload:e,saturated:m,unsaturated:m,buffer:t/4,empty:m,drain:m,error:m,started:!1,paused:!1,push:function(n,t){r(n,!1,t)},kill:function(){c.drain=m,c._tasks.empty()},unshift:function(n,t){r(n,!0,t)},process:function(){for(;!c.paused&&o<c.concurrency&&c._tasks.length;){var t=[],e=[],r=c._tasks.length;c.payload&&(r=Math.min(r,c.payload));for(var f=0;f<r;f++){var a=c._tasks.shift();t.push(a),e.push(a.data)}0===c._tasks.length&&c.empty(),o+=1,i.push(t[0]),o===c.concurrency&&c.saturated();var l=M(u(t));n(e,l)}},length:function(){return c._tasks.length},running:function(){return o},workersList:function(){return i},idle:function(){return c._tasks.length+o===0},pause:function(){c.paused=!0},resume:function(){if(c.paused!==!1){c.paused=!1;for(var n=Math.min(c.concurrency,c._tasks.length),t=1;t<=n;t++)Br(c.process)}}};return c}function bn(n,t){return gn(n,1,t)}function jn(n,t,e,r){r=g(r||m),Mr(n,function(n,r,u){e(t,n,function(n,e){t=e,u(n)})},function(n){r(n,t)})}function Sn(n,t,e,r){var u=[];n(t,function(n,t,r){e(n,function(n,t){u=u.concat(t||[]),r(n)})},function(n){r(n,u)})}function kn(n){return function(t,e,r){return n(Mr,t,e,r)}}function On(n,t,e){return function(r,u,o,i){function c(){i&&i(null,e(!1))}function f(n,r,u){return i?void o(n,function(r,c){i&&(r||t(c))?(r?i(r):i(r,e(!0,n)),i=o=!1,u(r,Re)):u()}):u()}arguments.length>3?(i=i||m,n(r,u,f,c)):(i=o,i=i||m,o=u,n(r,f,c))}}function wn(n,t){return t}function xn(n){return h(function(t,e){t.apply(null,e.concat([h(function(t,e){"object"==typeof console&&(t?console.error&&console.error(t):console[n]&&W(e,function(t){console[n](t)}))})]))})}function En(n,t,e){function r(t,r){return t?e(t):r?void n(u):e(null)}e=M(e||m);var u=h(function(n,u){return n?e(n):(u.push(r),void t.apply(this,u))});r(null,!0)}function Ln(n,t,e){e=M(e||m);var r=h(function(u,o){return u?e(u):t.apply(this,o)?n(r):void e.apply(null,[null].concat(o))});n(r)}function An(n,t,e){Ln(n,function(){return!t.apply(this,arguments)},e)}function _n(n,t,e){function r(t){return t?e(t):void n(u)}function u(n,u){return n?e(n):u?void t(r):e(null)}e=M(e||m),n(u)}function Tn(n){return function(t,e,r){return n(t,r)}}function Fn(n,t,e){Ve(n,Tn(t),e)}function In(n,t,e,r){P(t)(n,Tn(e),r)}function Bn(n){return Ft(function(t,e){var r=!0;t.push(function(){var n=arguments;r?Br(function(){e.apply(null,n)}):e.apply(null,n)}),n.apply(this,t),r=!1})}function $n(n){return!n}function Mn(n){return function(t){return null==t?void 0:t[n]}}function Pn(n,t,e,r){r=g(r||m);var u=[];n(t,function(n,t,r){e(n,function(e,o){e?r(e):(o&&u.push({index:t,value:n}),r())})},function(n){n?r(n):r(null,X(u.sort(function(n,t){return n.index-t.index}),Mn("value")))})}function zn(n,t){function e(n){return n?r(n):void u(e)}var r=M(t||m),u=Bn(n);e()}function Rn(n,t,e,r){r=g(r||m);var u={};z(n,t,function(n,t,r){e(n,t,function(n,e){return n?r(n):(u[t]=e,void r())})},function(n){r(n,u)})}function Un(n,t){return t in n}function Vn(n,e){var r=Object.create(null),u=Object.create(null);e=e||t;var o=Ft(function(t,o){var i=e.apply(null,t);Un(r,i)?Br(function(){o.apply(null,r[i])}):Un(u,i)?u[i].push(o):(u[i]=[o],n.apply(null,t.concat([h(function(n){r[i]=n;var t=u[i];delete u[i];for(var e=0,o=t.length;e<o;e++)t[e].apply(null,n)})])))});return o.memo=r,o.unmemoized=n,o}function Dn(n,t,e){e=e||m;var r=d(t)?[]:{};n(t,function(n,t,e){n(h(function(n,u){u.length<=1&&(u=u[0]),r[t]=u,e(n)}))},function(n){e(n,r)})}function qn(n,t){Dn(Ve,n,t)}function Cn(n,t,e){Dn(P(t),n,e)}function Wn(n,t){if(t=g(t||m),!qt(n))return t(new TypeError("First argument to race must be an array of functions"));if(!n.length)return t();for(var e=0,r=n.length;e<r;e++)n[e](t)}function Qn(n,t,e,r){var u=uu.call(n).reverse();jn(u,t,e,r)}function Gn(n){return Ft(function(t,e){return t.push(h(function(n,t){if(n)e(null,{error:n});else{var r=null;1===t.length?r=t[0]:t.length>1&&(r=t),e(null,{value:r})}})),n.apply(this,t)})}function Nn(n,t,e,r){Pn(n,t,function(n,t){e(n,function(n,e){n?t(n):t(null,!e)})},r)}function Hn(n){var t;return qt(n)?t=X(n,Gn):(t={},G(n,function(n,e){t[e]=Gn.call(this,n)})),t}function Jn(n,t,e){function r(n,t){if("object"==typeof t)n.times=+t.times||i,n.intervalFunc="function"==typeof t.interval?t.interval:u(+t.interval||c),n.errorFilter=t.errorFilter;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");n.times=+t||i}}function o(){t(function(n){n&&a++<f.times&&("function"!=typeof f.errorFilter||f.errorFilter(n))?setTimeout(o,f.intervalFunc(a)):e.apply(null,arguments)})}var i=5,c=0,f={times:i,intervalFunc:u(c)};if(arguments.length<3&&"function"==typeof n?(e=t||m,t=n):(r(f,n),e=e||m),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var a=1;o()}function Kn(n,t){Dn(Mr,n,t)}function Xn(n,t,e){function r(n,t){var e=n.criteria,r=t.criteria;return e<r?-1:e>r?1:0}De(n,function(n,e){t(n,function(t,r){return t?e(t):void e(null,{value:n,criteria:r})})},function(n,t){return n?e(n):void e(null,X(t.sort(r),Mn("value")))})}function Yn(n,t,e){function r(){c||(o.apply(null,arguments),clearTimeout(i))}function u(){var t=n.name||"anonymous",r=new Error('Callback function "'+t+'" timed out.');r.code="ETIMEDOUT",e&&(r.info=e),c=!0,o(r)}var o,i,c=!1;return Ft(function(e,c){o=c,i=setTimeout(u,t),n.apply(null,e.concat(r))})}function Zn(n,t,e,r){for(var u=-1,o=hu(pu((t-n)/(e||1)),0),i=Array(o);o--;)i[r?o:++u]=n,n+=e;return i}function nt(n,t,e,r){Ce(Zn(0,n,1),t,e,r)}function tt(n,t,e,r){3===arguments.length&&(r=e,e=t,t=qt(n)?[]:{}),r=g(r||m),Ve(n,function(n,r,u){e(t,n,r,u)},function(n){r(n,t)})}function et(n){return function(){return(n.unmemoized||n).apply(null,arguments)}}function rt(n,t,e){if(e=M(e||m),!n())return e(null);var r=h(function(u,o){return u?e(u):n()?t(r):void e.apply(null,[null].concat(o))});t(r)}function ut(n,t,e){rt(function(){return!n.apply(this,arguments)},t,e)}var ot=Math.max,it="[object Function]",ct="[object GeneratorFunction]",ft="[object Proxy]",at=Object.prototype,lt=at.toString,st="object"==typeof global&&global&&global.Object===Object&&global,pt="object"==typeof self&&self&&self.Object===Object&&self,ht=st||pt||Function("return this")(),yt=ht["__core-js_shared__"],vt=function(){var n=/[^.]+$/.exec(yt&&yt.keys&&yt.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),dt=Function.prototype,mt=dt.toString,gt=/[\\^$.*+?()[\]{}|]/g,bt=/^\[object .+?Constructor\]$/,jt=Function.prototype,St=Object.prototype,kt=jt.toString,Ot=St.hasOwnProperty,wt=RegExp("^"+kt.call(Ot).replace(gt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xt=function(){try{var n=s(Object,"defineProperty");return n({},"",{}),n}catch(n){}}(),Et=xt?function(n,t){return xt(n,"toString",{configurable:!0,enumerable:!1,value:u(t),writable:!0})}:t,Lt=500,At=16,_t=Date.now,Tt=p(Et),Ft=function(n){return h(function(t){var e=t.pop();n.call(this,t,e)})},It=9007199254740991,Bt="function"==typeof Symbol&&Symbol.iterator,$t=function(n){return Bt&&n[Bt]&&n[Bt]()},Mt="[object Arguments]",Pt=Object.prototype,zt=Pt.toString,Rt=Object.prototype,Ut=Rt.hasOwnProperty,Vt=Rt.propertyIsEnumerable,Dt=S(function(){return arguments}())?S:function(n){return j(n)&&Ut.call(n,"callee")&&!Vt.call(n,"callee")},qt=Array.isArray,Ct="object"==typeof n&&n&&!n.nodeType&&n,Wt=Ct&&"object"==typeof module&&module&&!module.nodeType&&module,Qt=Wt&&Wt.exports===Ct,Gt=Qt?ht.Buffer:void 0,Nt=Gt?Gt.isBuffer:void 0,Ht=Nt||k,Jt=9007199254740991,Kt=/^(?:0|[1-9]\d*)$/,Xt="[object Arguments]",Yt="[object Array]",Zt="[object Boolean]",ne="[object Date]",te="[object Error]",ee="[object Function]",re="[object Map]",ue="[object Number]",oe="[object Object]",ie="[object RegExp]",ce="[object Set]",fe="[object String]",ae="[object WeakMap]",le="[object ArrayBuffer]",se="[object DataView]",pe="[object Float32Array]",he="[object Float64Array]",ye="[object Int8Array]",ve="[object Int16Array]",de="[object Int32Array]",me="[object Uint8Array]",ge="[object Uint8ClampedArray]",be="[object Uint16Array]",je="[object Uint32Array]",Se={};Se[pe]=Se[he]=Se[ye]=Se[ve]=Se[de]=Se[me]=Se[ge]=Se[be]=Se[je]=!0,Se[Xt]=Se[Yt]=Se[le]=Se[Zt]=Se[se]=Se[ne]=Se[te]=Se[ee]=Se[re]=Se[ue]=Se[oe]=Se[ie]=Se[ce]=Se[fe]=Se[ae]=!1;var ke,Oe=Object.prototype,we=Oe.toString,xe="object"==typeof n&&n&&!n.nodeType&&n,Ee=xe&&"object"==typeof module&&module&&!module.nodeType&&module,Le=Ee&&Ee.exports===xe,Ae=Le&&st.process,_e=function(){try{return Ae&&Ae.binding("util")}catch(n){}}(),Te=_e&&_e.isTypedArray,Fe=Te?x(Te):w,Ie=Object.prototype,Be=Ie.hasOwnProperty,$e=Object.prototype,Me=A(Object.keys,Object),Pe=Object.prototype,ze=Pe.hasOwnProperty,Re={},Ue=R(z,1/0),Ve=function(n,t,e){var r=d(n)?U:Ue;r(n,t,e)},De=V(D),qe=y(De),Ce=q(D),We=R(Ce,1),Qe=y(We),Ge=h(function(n,t){return h(function(e){return n.apply(null,t.concat(e))})}),Ne=Q(),He=function(n,t,e){function r(n,t){b.push(function(){c(n,t)})}function u(){if(0===b.length&&0===y)return e(null,p);for(;b.length&&y<t;){var n=b.shift();n()}}function o(n,t){var e=d[n];e||(e=d[n]=[]),e.push(t)}function i(n){var t=d[n]||[];W(t,function(n){n()}),u()}function c(n,t){if(!v){var r=M(h(function(t,r){if(y--,r.length<=1&&(r=r[0]),t){var u={};G(p,function(n,t){u[t]=n}),u[n]=r,v=!0,d=[],e(t,u)}else p[n]=r,i(n)}));y++;var u=t[t.length-1];t.length>1?u(p,r):u(r)}}function f(){for(var n,t=0;j.length;)n=j.pop(),t++,W(a(n),function(n){0===--S[n]&&j.push(n)});if(t!==s)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function a(t){var e=[];return G(n,function(n,r){qt(n)&&K(n,t,0)>=0&&e.push(r)}),e}"function"==typeof t&&(e=t,t=null),e=g(e||m);var l=T(n),s=l.length;if(!s)return e(null);t||(t=s);var p={},y=0,v=!1,d={},b=[],j=[],S={};G(n,function(t,e){if(!qt(t))return r(e,[t]),void j.push(e);var u=t.slice(0,t.length-1),i=u.length;return 0===i?(r(e,t),void j.push(e)):(S[e]=i,void W(u,function(c){if(!n[c])throw new Error("async.auto task `"+e+"` has a non-existent dependency in "+u.join(", "));o(c,function(){i--,0===i&&r(e,t)})}))}),f(),u()},Je=ht.Symbol,Ke="[object Symbol]",Xe=Object.prototype,Ye=Xe.toString,Ze=1/0,nr=Je?Je.prototype:void 0,tr=nr?nr.toString:void 0,er="\\ud800-\\udfff",rr="\\u0300-\\u036f\\ufe20-\\ufe23",ur="\\u20d0-\\u20f0",or="\\ufe0e\\ufe0f",ir="\\u200d",cr=RegExp("["+ir+er+rr+ur+or+"]"),fr="\\ud800-\\udfff",ar="\\u0300-\\u036f\\ufe20-\\ufe23",lr="\\u20d0-\\u20f0",sr="\\ufe0e\\ufe0f",pr="["+fr+"]",hr="["+ar+lr+"]",yr="\\ud83c[\\udffb-\\udfff]",vr="(?:"+hr+"|"+yr+")",dr="[^"+fr+"]",mr="(?:\\ud83c[\\udde6-\\uddff]){2}",gr="[\\ud800-\\udbff][\\udc00-\\udfff]",br="\\u200d",jr=vr+"?",Sr="["+sr+"]?",kr="(?:"+br+"(?:"+[dr,mr,gr].join("|")+")"+Sr+jr+")*",Or=Sr+jr+kr,wr="(?:"+[dr+hr+"?",hr,mr,gr,pr].join("|")+")",xr=RegExp(yr+"(?="+yr+")|"+wr+Or,"g"),Er=/^\s+|\s+$/g,Lr=/^(function)?\s*[^\(]*\(\s*([^\)]*)\)/m,Ar=/,/,_r=/(=.+)?(\s*)$/,Tr=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Fr="function"==typeof setImmediate&&setImmediate,Ir="object"==typeof process&&"function"==typeof process.nextTick;ke=Fr?setImmediate:Ir?process.nextTick:yn;var Br=vn(ke);dn.prototype.removeLink=function(n){return n.prev?n.prev.next=n.next:this.head=n.next,n.next?n.next.prev=n.prev:this.tail=n.prev,n.prev=n.next=null,this.length-=1,n},dn.prototype.empty=dn,dn.prototype.insertAfter=function(n,t){t.prev=n,t.next=n.next,n.next?n.next.prev=t:this.tail=t,n.next=t,this.length+=1},dn.prototype.insertBefore=function(n,t){t.prev=n.prev,t.next=n,n.prev?n.prev.next=t:this.head=t,n.prev=t,this.length+=1},dn.prototype.unshift=function(n){this.head?this.insertBefore(this.head,n):mn(this,n)},dn.prototype.push=function(n){this.tail?this.insertAfter(this.tail,n):mn(this,n)},dn.prototype.shift=function(){return this.head&&this.removeLink(this.head)},dn.prototype.pop=function(){return this.tail&&this.removeLink(this.tail)};var $r,Mr=R(z,1),Pr=h(function(n){return h(function(t){var e=this,r=t[t.length-1];"function"==typeof r?t.pop():r=m,jn(n,t,function(n,t,r){t.apply(e,n.concat([h(function(n,t){r(n,t)})]))},function(n,t){r.apply(e,[n].concat(t))})})}),zr=h(function(n){return Pr.apply(null,n.reverse())}),Rr=V(Sn),Ur=kn(Sn),Vr=h(function(n){var t=[null].concat(n);return Ft(function(n,e){return e.apply(this,t)})}),Dr=On(Ve,t,wn),qr=On(z,t,wn),Cr=On(Mr,t,wn),Wr=xn("dir"),Qr=R(In,1),Gr=On(Ve,$n,$n),Nr=On(z,$n,$n),Hr=R(Nr,1),Jr=V(Pn),Kr=q(Pn),Xr=R(Kr,1),Yr=xn("log"),Zr=R(Rn,1/0),nu=R(Rn,1);$r=Ir?process.nextTick:Fr?setImmediate:yn;var tu=vn($r),eu=function(n,t){return gn(function(t,e){n(t[0],e)},t,1)},ru=function(n,t){var e=eu(n,t);return e.push=function(n,t,r){if(null==r&&(r=m),"function"!=typeof r)throw new Error("task callback must be a function");if(e.started=!0,qt(n)||(n=[n]),0===n.length)return Br(function(){e.drain()});t=t||0;for(var u=e._tasks.head;u&&t>=u.priority;)u=u.next;for(var o=0,i=n.length;o<i;o++){var c={data:n[o],priority:t,callback:r};u?e._tasks.insertBefore(u,c):e._tasks.push(c)}Br(e.process)},delete e.unshift,e},uu=Array.prototype.slice,ou=V(Nn),iu=q(Nn),cu=R(iu,1),fu=function(n,t){return t||(t=n,n=null),Ft(function(e,r){function u(n){t.apply(null,e.concat([n]))}n?Jn(n,u,r):Jn(u,r)})},au=On(Ve,Boolean,t),lu=On(z,Boolean,t),su=R(lu,1),pu=Math.ceil,hu=Math.max,yu=R(nt,1/0),vu=R(nt,1),du=function(n,t){function e(u){if(r===n.length)return t.apply(null,[null].concat(u));var o=M(h(function(n,r){return n?t.apply(null,[n].concat(r)):void e(r)}));u.push(o);var i=n[r++];i.apply(null,u)}if(t=g(t||m),!qt(n))return t(new Error("First argument to waterfall must be an array of functions"));if(!n.length)return t();var r=0;e([])},mu={applyEach:qe,applyEachSeries:Qe,apply:Ge,asyncify:C,auto:He,autoInject:hn,cargo:bn,compose:zr,concat:Rr,concatSeries:Ur,constant:Vr,detect:Dr,detectLimit:qr,detectSeries:Cr,dir:Wr,doDuring:En,doUntil:An,doWhilst:Ln,during:_n,each:Fn,eachLimit:In,eachOf:Ve,eachOfLimit:z,eachOfSeries:Mr,eachSeries:Qr,ensureAsync:Bn,every:Gr,everyLimit:Nr,everySeries:Hr,filter:Jr,filterLimit:Kr,filterSeries:Xr,forever:zn,log:Yr,map:De,mapLimit:Ce,mapSeries:We,mapValues:Zr,mapValuesLimit:Rn,mapValuesSeries:nu,memoize:Vn,nextTick:tu,parallel:qn,parallelLimit:Cn,priorityQueue:ru,queue:eu,race:Wn,reduce:jn,reduceRight:Qn,reflect:Gn,reflectAll:Hn,reject:ou,rejectLimit:iu,rejectSeries:cu,retry:Jn,retryable:fu,seq:Pr,series:Kn,setImmediate:Br,some:au,someLimit:lu,someSeries:su,sortBy:Xn,timeout:Yn,times:yu,timesLimit:nt,timesSeries:vu,transform:tt,unmemoize:et,until:ut,waterfall:du,whilst:rt,all:Gr,any:au,forEach:Fn,forEachSeries:Qr,forEachLimit:In,forEachOf:Ve,forEachOfSeries:Mr,forEachOfLimit:z,inject:jn,foldl:jn,foldr:Qn,select:Jr,selectLimit:Kr,selectSeries:Xr,wrapSync:C};n.default=mu,n.applyEach=qe,n.applyEachSeries=Qe,n.apply=Ge,n.asyncify=C,n.auto=He,n.autoInject=hn,n.cargo=bn,n.compose=zr,n.concat=Rr,n.concatSeries=Ur,n.constant=Vr,n.detect=Dr,n.detectLimit=qr,n.detectSeries=Cr,n.dir=Wr,n.doDuring=En,n.doUntil=An,n.doWhilst=Ln,n.during=_n,n.each=Fn,n.eachLimit=In,n.eachOf=Ve,n.eachOfLimit=z,n.eachOfSeries=Mr,n.eachSeries=Qr,n.ensureAsync=Bn,n.every=Gr,n.everyLimit=Nr,n.everySeries=Hr,n.filter=Jr,n.filterLimit=Kr,n.filterSeries=Xr,n.forever=zn,n.log=Yr,n.map=De,n.mapLimit=Ce,n.mapSeries=We,n.mapValues=Zr,n.mapValuesLimit=Rn,n.mapValuesSeries=nu,n.memoize=Vn,n.nextTick=tu,n.parallel=qn,n.parallelLimit=Cn,n.priorityQueue=ru,n.queue=eu,n.race=Wn,n.reduce=jn,n.reduceRight=Qn,n.reflect=Gn,n.reflectAll=Hn,n.reject=ou,n.rejectLimit=iu,n.rejectSeries=cu,n.retry=Jn,n.retryable=fu,n.seq=Pr,n.series=Kn,n.setImmediate=Br,n.some=au,n.someLimit=lu,n.someSeries=su,n.sortBy=Xn,n.timeout=Yn,n.times=yu,n.timesLimit=nt,n.timesSeries=vu,n.transform=tt,n.unmemoize=et,n.until=ut,n.waterfall=du,n.whilst=rt,n.all=Gr,n.allLimit=Nr,n.allSeries=Hr,n.any=au,n.anyLimit=lu,n.anySeries=su,n.find=Dr,n.findLimit=qr,n.findSeries=Cr,n.forEach=Fn,n.forEachSeries=Qr,n.forEachLimit=In,n.forEachOf=Ve,n.forEachOfSeries=Mr,n.forEachOfLimit=z,n.inject=jn,n.foldl=jn,n.foldr=Qn,n.select=Jr,n.selectLimit=Kr,n.selectSeries=Xr,n.wrapSync=C,Object.defineProperty(n,"__esModule",{value:!0})});
+//# sourceMappingURL=async.min.map \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/doDuring.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/doDuring.js
new file mode 100644
index 0000000..c962895
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/doDuring.js
@@ -0,0 +1,60 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = doDuring;
+
+var _noop = require('lodash/noop');
+
+var _noop2 = _interopRequireDefault(_noop);
+
+var _baseRest = require('lodash/_baseRest');
+
+var _baseRest2 = _interopRequireDefault(_baseRest);
+
+var _onlyOnce = require('./internal/onlyOnce');
+
+var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The post-check version of [`during`]{@link module:ControlFlow.during}. To reflect the difference in
+ * the order of operations, the arguments `test` and `fn` are switched.
+ *
+ * Also a version of [`doWhilst`]{@link module:ControlFlow.doWhilst} with asynchronous `test` function.
+ * @name doDuring
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.during]{@link module:ControlFlow.during}
+ * @category Control Flow
+ * @param {Function} fn - A function which is called each time `test` passes.
+ * The function is passed a `callback(err)`, which must be called once it has
+ * completed with an optional `err` argument. Invoked with (callback).
+ * @param {Function} test - asynchronous truth test to perform before each
+ * execution of `fn`. Invoked with (...args, callback), where `...args` are the
+ * non-error args from the previous callback of `fn`.
+ * @param {Function} [callback] - A callback which is called after the test
+ * function has failed and repeated execution of `fn` has stopped. `callback`
+ * will be passed an error if one occured, otherwise `null`.
+ */
+function doDuring(fn, test, callback) {
+ callback = (0, _onlyOnce2.default)(callback || _noop2.default);
+
+ var next = (0, _baseRest2.default)(function (err, args) {
+ if (err) return callback(err);
+ args.push(check);
+ test.apply(this, args);
+ });
+
+ function check(err, truth) {
+ if (err) return callback(err);
+ if (!truth) return callback(null);
+ fn(next);
+ }
+
+ check(null, true);
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/doUntil.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/doUntil.js
new file mode 100644
index 0000000..e7b5ee7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/doUntil.js
@@ -0,0 +1,39 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = doUntil;
+
+var _doWhilst = require('./doWhilst');
+
+var _doWhilst2 = _interopRequireDefault(_doWhilst);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the
+ * argument ordering differs from `until`.
+ *
+ * @name doUntil
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.doWhilst]{@link module:ControlFlow.doWhilst}
+ * @category Control Flow
+ * @param {Function} fn - A function which is called each time `test` fails.
+ * The function is passed a `callback(err)`, which must be called once it has
+ * completed with an optional `err` argument. Invoked with (callback).
+ * @param {Function} test - synchronous truth test to perform after each
+ * execution of `fn`. Invoked with the non-error callback results of `fn`.
+ * @param {Function} [callback] - A callback which is called after the test
+ * function has passed and repeated execution of `fn` has stopped. `callback`
+ * will be passed an error and any arguments passed to the final `fn`'s
+ * callback. Invoked with (err, [results]);
+ */
+function doUntil(fn, test, callback) {
+ (0, _doWhilst2.default)(fn, function () {
+ return !test.apply(this, arguments);
+ }, callback);
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/doWhilst.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/doWhilst.js
new file mode 100644
index 0000000..088b2cf
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/doWhilst.js
@@ -0,0 +1,54 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = doWhilst;
+
+var _noop = require('lodash/noop');
+
+var _noop2 = _interopRequireDefault(_noop);
+
+var _baseRest = require('lodash/_baseRest');
+
+var _baseRest2 = _interopRequireDefault(_baseRest);
+
+var _onlyOnce = require('./internal/onlyOnce');
+
+var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in
+ * the order of operations, the arguments `test` and `iteratee` are switched.
+ *
+ * `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.
+ *
+ * @name doWhilst
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.whilst]{@link module:ControlFlow.whilst}
+ * @category Control Flow
+ * @param {Function} iteratee - A function which is called each time `test`
+ * passes. The function is passed a `callback(err)`, which must be called once
+ * it has completed with an optional `err` argument. Invoked with (callback).
+ * @param {Function} test - synchronous truth test to perform after each
+ * execution of `iteratee`. Invoked with the non-error callback results of
+ * `iteratee`.
+ * @param {Function} [callback] - A callback which is called after the test
+ * function has failed and repeated execution of `iteratee` has stopped.
+ * `callback` will be passed an error and any arguments passed to the final
+ * `iteratee`'s callback. Invoked with (err, [results]);
+ */
+function doWhilst(iteratee, test, callback) {
+ callback = (0, _onlyOnce2.default)(callback || _noop2.default);
+ var next = (0, _baseRest2.default)(function (err, args) {
+ if (err) return callback(err);
+ if (test.apply(this, args)) return iteratee(next);
+ callback.apply(null, [null].concat(args));
+ });
+ iteratee(next);
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/during.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/during.js
new file mode 100644
index 0000000..f605ada
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/during.js
@@ -0,0 +1,71 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = during;
+
+var _noop = require('lodash/noop');
+
+var _noop2 = _interopRequireDefault(_noop);
+
+var _onlyOnce = require('./internal/onlyOnce');
+
+var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Like [`whilst`]{@link module:ControlFlow.whilst}, except the `test` is an asynchronous function that
+ * is passed a callback in the form of `function (err, truth)`. If error is
+ * passed to `test` or `fn`, the main callback is immediately called with the
+ * value of the error.
+ *
+ * @name during
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.whilst]{@link module:ControlFlow.whilst}
+ * @category Control Flow
+ * @param {Function} test - asynchronous truth test to perform before each
+ * execution of `fn`. Invoked with (callback).
+ * @param {Function} fn - A function which is called each time `test` passes.
+ * The function is passed a `callback(err)`, which must be called once it has
+ * completed with an optional `err` argument. Invoked with (callback).
+ * @param {Function} [callback] - A callback which is called after the test
+ * function has failed and repeated execution of `fn` has stopped. `callback`
+ * will be passed an error, if one occured, otherwise `null`.
+ * @example
+ *
+ * var count = 0;
+ *
+ * async.during(
+ * function (callback) {
+ * return callback(null, count < 5);
+ * },
+ * function (callback) {
+ * count++;
+ * setTimeout(callback, 1000);
+ * },
+ * function (err) {
+ * // 5 seconds have passed
+ * }
+ * );
+ */
+function during(test, fn, callback) {
+ callback = (0, _onlyOnce2.default)(callback || _noop2.default);
+
+ function next(err) {
+ if (err) return callback(err);
+ test(check);
+ }
+
+ function check(err, truth) {
+ if (err) return callback(err);
+ if (!truth) return callback(null);
+ fn(next);
+ }
+
+ test(check);
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/each.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/each.js
new file mode 100644
index 0000000..222a176
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/each.js
@@ -0,0 +1,80 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = eachLimit;
+
+var _eachOf = require('./eachOf');
+
+var _eachOf2 = _interopRequireDefault(_eachOf);
+
+var _withoutIndex = require('./internal/withoutIndex');
+
+var _withoutIndex2 = _interopRequireDefault(_withoutIndex);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Applies the function `iteratee` to each item in `coll`, in parallel.
+ * The `iteratee` is called with an item from the list, and a callback for when
+ * it has finished. If the `iteratee` passes an error to its `callback`, the
+ * main `callback` (for the `each` function) is immediately called with the
+ * error.
+ *
+ * Note, that since this function applies `iteratee` to each item in parallel,
+ * there is no guarantee that the iteratee functions will complete in order.
+ *
+ * @name each
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @alias forEach
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A function to apply to each item
+ * in `coll`. The iteratee is passed a `callback(err)` which must be called once
+ * it has completed. If no error has occurred, the `callback` should be run
+ * without arguments or with an explicit `null` argument. The array index is not
+ * passed to the iteratee. Invoked with (item, callback). If you need the index,
+ * use `eachOf`.
+ * @param {Function} [callback] - A callback which is called when all
+ * `iteratee` functions have finished, or an error occurs. Invoked with (err).
+ * @example
+ *
+ * // assuming openFiles is an array of file names and saveFile is a function
+ * // to save the modified contents of that file:
+ *
+ * async.each(openFiles, saveFile, function(err){
+ * // if any of the saves produced an error, err would equal that error
+ * });
+ *
+ * // assuming openFiles is an array of file names
+ * async.each(openFiles, function(file, callback) {
+ *
+ * // Perform operation on file here.
+ * console.log('Processing file ' + file);
+ *
+ * if( file.length > 32 ) {
+ * console.log('This file name is too long');
+ * callback('File name too long');
+ * } else {
+ * // Do work to process file here
+ * console.log('File processed');
+ * callback();
+ * }
+ * }, function(err) {
+ * // if any of the file processing produced an error, err would equal that error
+ * if( err ) {
+ * // One of the iterations produced an error.
+ * // All processing will now stop.
+ * console.log('A file failed to process');
+ * } else {
+ * console.log('All files have been processed successfully');
+ * }
+ * });
+ */
+function eachLimit(coll, iteratee, callback) {
+ (0, _eachOf2.default)(coll, (0, _withoutIndex2.default)(iteratee), callback);
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/eachLimit.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/eachLimit.js
new file mode 100644
index 0000000..674c135
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/eachLimit.js
@@ -0,0 +1,42 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = eachLimit;
+
+var _eachOfLimit = require('./internal/eachOfLimit');
+
+var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
+
+var _withoutIndex = require('./internal/withoutIndex');
+
+var _withoutIndex2 = _interopRequireDefault(_withoutIndex);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time.
+ *
+ * @name eachLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.each]{@link module:Collections.each}
+ * @alias forEachLimit
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {Function} iteratee - A function to apply to each item in `coll`. The
+ * iteratee is passed a `callback(err)` which must be called once it has
+ * completed. If no error has occurred, the `callback` should be run without
+ * arguments or with an explicit `null` argument. The array index is not passed
+ * to the iteratee. Invoked with (item, callback). If you need the index, use
+ * `eachOfLimit`.
+ * @param {Function} [callback] - A callback which is called when all
+ * `iteratee` functions have finished, or an error occurs. Invoked with (err).
+ */
+function eachLimit(coll, limit, iteratee, callback) {
+ (0, _eachOfLimit2.default)(limit)(coll, (0, _withoutIndex2.default)(iteratee), callback);
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/eachOf.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/eachOf.js
new file mode 100644
index 0000000..4ab9a54
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/eachOf.js
@@ -0,0 +1,105 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+exports.default = function (coll, iteratee, callback) {
+ var eachOfImplementation = (0, _isArrayLike2.default)(coll) ? eachOfArrayLike : eachOfGeneric;
+ eachOfImplementation(coll, iteratee, callback);
+};
+
+var _isArrayLike = require('lodash/isArrayLike');
+
+var _isArrayLike2 = _interopRequireDefault(_isArrayLike);
+
+var _eachOfLimit = require('./eachOfLimit');
+
+var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
+
+var _doLimit = require('./internal/doLimit');
+
+var _doLimit2 = _interopRequireDefault(_doLimit);
+
+var _noop = require('lodash/noop');
+
+var _noop2 = _interopRequireDefault(_noop);
+
+var _once = require('./internal/once');
+
+var _once2 = _interopRequireDefault(_once);
+
+var _onlyOnce = require('./internal/onlyOnce');
+
+var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+// eachOf implementation optimized for array-likes
+function eachOfArrayLike(coll, iteratee, callback) {
+ callback = (0, _once2.default)(callback || _noop2.default);
+ var index = 0,
+ completed = 0,
+ length = coll.length;
+ if (length === 0) {
+ callback(null);
+ }
+
+ function iteratorCallback(err) {
+ if (err) {
+ callback(err);
+ } else if (++completed === length) {
+ callback(null);
+ }
+ }
+
+ for (; index < length; index++) {
+ iteratee(coll[index], index, (0, _onlyOnce2.default)(iteratorCallback));
+ }
+}
+
+// a generic version of eachOf which can handle array, object, and iterator cases.
+var eachOfGeneric = (0, _doLimit2.default)(_eachOfLimit2.default, Infinity);
+
+/**
+ * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument
+ * to the iteratee.
+ *
+ * @name eachOf
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @alias forEachOf
+ * @category Collection
+ * @see [async.each]{@link module:Collections.each}
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A function to apply to each
+ * item in `coll`. The `key` is the item's key, or index in the case of an
+ * array. The iteratee is passed a `callback(err)` which must be called once it
+ * has completed. If no error has occurred, the callback should be run without
+ * arguments or with an explicit `null` argument. Invoked with
+ * (item, key, callback).
+ * @param {Function} [callback] - A callback which is called when all
+ * `iteratee` functions have finished, or an error occurs. Invoked with (err).
+ * @example
+ *
+ * var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"};
+ * var configs = {};
+ *
+ * async.forEachOf(obj, function (value, key, callback) {
+ * fs.readFile(__dirname + value, "utf8", function (err, data) {
+ * if (err) return callback(err);
+ * try {
+ * configs[key] = JSON.parse(data);
+ * } catch (e) {
+ * return callback(e);
+ * }
+ * callback();
+ * });
+ * }, function (err) {
+ * if (err) console.error(err.message);
+ * // configs is now a map of JSON data
+ * doSomethingWith(configs);
+ * });
+ */
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/eachOfLimit.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/eachOfLimit.js
new file mode 100644
index 0000000..a2ece1b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/eachOfLimit.js
@@ -0,0 +1,39 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = eachOfLimit;
+
+var _eachOfLimit2 = require('./internal/eachOfLimit');
+
+var _eachOfLimit3 = _interopRequireDefault(_eachOfLimit2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a
+ * time.
+ *
+ * @name eachOfLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.eachOf]{@link module:Collections.eachOf}
+ * @alias forEachOfLimit
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {Function} iteratee - A function to apply to each
+ * item in `coll`. The `key` is the item's key, or index in the case of an
+ * array. The iteratee is passed a `callback(err)` which must be called once it
+ * has completed. If no error has occurred, the callback should be run without
+ * arguments or with an explicit `null` argument. Invoked with
+ * (item, key, callback).
+ * @param {Function} [callback] - A callback which is called when all
+ * `iteratee` functions have finished, or an error occurs. Invoked with (err).
+ */
+function eachOfLimit(coll, limit, iteratee, callback) {
+ (0, _eachOfLimit3.default)(limit)(coll, iteratee, callback);
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/eachOfSeries.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/eachOfSeries.js
new file mode 100644
index 0000000..968db26
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/eachOfSeries.js
@@ -0,0 +1,37 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _eachOfLimit = require('./eachOfLimit');
+
+var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
+
+var _doLimit = require('./internal/doLimit');
+
+var _doLimit2 = _interopRequireDefault(_doLimit);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time.
+ *
+ * @name eachOfSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.eachOf]{@link module:Collections.eachOf}
+ * @alias forEachOfSeries
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A function to apply to each item in `coll`. The
+ * `key` is the item's key, or index in the case of an array. The iteratee is
+ * passed a `callback(err)` which must be called once it has completed. If no
+ * error has occurred, the callback should be run without arguments or with an
+ * explicit `null` argument. Invoked with (item, key, callback).
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
+ * functions have finished, or an error occurs. Invoked with (err).
+ */
+exports.default = (0, _doLimit2.default)(_eachOfLimit2.default, 1);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/eachSeries.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/eachSeries.js
new file mode 100644
index 0000000..31a7456
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/eachSeries.js
@@ -0,0 +1,38 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _eachLimit = require('./eachLimit');
+
+var _eachLimit2 = _interopRequireDefault(_eachLimit);
+
+var _doLimit = require('./internal/doLimit');
+
+var _doLimit2 = _interopRequireDefault(_doLimit);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time.
+ *
+ * @name eachSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.each]{@link module:Collections.each}
+ * @alias forEachSeries
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A function to apply to each
+ * item in `coll`. The iteratee is passed a `callback(err)` which must be called
+ * once it has completed. If no error has occurred, the `callback` should be run
+ * without arguments or with an explicit `null` argument. The array index is
+ * not passed to the iteratee. Invoked with (item, callback). If you need the
+ * index, use `eachOfSeries`.
+ * @param {Function} [callback] - A callback which is called when all
+ * `iteratee` functions have finished, or an error occurs. Invoked with (err).
+ */
+exports.default = (0, _doLimit2.default)(_eachLimit2.default, 1);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/ensureAsync.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/ensureAsync.js
new file mode 100644
index 0000000..08e0829
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/ensureAsync.js
@@ -0,0 +1,69 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = ensureAsync;
+
+var _setImmediate = require('./internal/setImmediate');
+
+var _setImmediate2 = _interopRequireDefault(_setImmediate);
+
+var _initialParams = require('./internal/initialParams');
+
+var _initialParams2 = _interopRequireDefault(_initialParams);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Wrap an async function and ensure it calls its callback on a later tick of
+ * the event loop. If the function already calls its callback on a next tick,
+ * no extra deferral is added. This is useful for preventing stack overflows
+ * (`RangeError: Maximum call stack size exceeded`) and generally keeping
+ * [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony)
+ * contained.
+ *
+ * @name ensureAsync
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @category Util
+ * @param {Function} fn - an async function, one that expects a node-style
+ * callback as its last argument.
+ * @returns {Function} Returns a wrapped function with the exact same call
+ * signature as the function passed in.
+ * @example
+ *
+ * function sometimesAsync(arg, callback) {
+ * if (cache[arg]) {
+ * return callback(null, cache[arg]); // this would be synchronous!!
+ * } else {
+ * doSomeIO(arg, callback); // this IO would be asynchronous
+ * }
+ * }
+ *
+ * // this has a risk of stack overflows if many results are cached in a row
+ * async.mapSeries(args, sometimesAsync, done);
+ *
+ * // this will defer sometimesAsync's callback if necessary,
+ * // preventing stack overflows
+ * async.mapSeries(args, async.ensureAsync(sometimesAsync), done);
+ */
+function ensureAsync(fn) {
+ return (0, _initialParams2.default)(function (args, callback) {
+ var sync = true;
+ args.push(function () {
+ var innerArgs = arguments;
+ if (sync) {
+ (0, _setImmediate2.default)(function () {
+ callback.apply(null, innerArgs);
+ });
+ } else {
+ callback.apply(null, innerArgs);
+ }
+ });
+ fn.apply(this, args);
+ sync = false;
+ });
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/every.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/every.js
new file mode 100644
index 0000000..edaa7ed
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/every.js
@@ -0,0 +1,50 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createTester = require('./internal/createTester');
+
+var _createTester2 = _interopRequireDefault(_createTester);
+
+var _eachOf = require('./eachOf');
+
+var _eachOf2 = _interopRequireDefault(_eachOf);
+
+var _notId = require('./internal/notId');
+
+var _notId2 = _interopRequireDefault(_notId);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Returns `true` if every element in `coll` satisfies an async test. If any
+ * iteratee call returns `false`, the main `callback` is immediately called.
+ *
+ * @name every
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @alias all
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A truth test to apply to each item in the
+ * collection in parallel. The iteratee is passed a `callback(err, truthValue)`
+ * which must be called with a boolean argument once it has completed. Invoked
+ * with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Result will be either `true` or `false`
+ * depending on the values of the async tests. Invoked with (err, result).
+ * @example
+ *
+ * async.every(['file1','file2','file3'], function(filePath, callback) {
+ * fs.access(filePath, function(err) {
+ * callback(null, !err)
+ * });
+ * }, function(err, result) {
+ * // if result is true then every file exists
+ * });
+ */
+exports.default = (0, _createTester2.default)(_eachOf2.default, _notId2.default, _notId2.default);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/everyLimit.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/everyLimit.js
new file mode 100644
index 0000000..ef6c35a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/everyLimit.js
@@ -0,0 +1,42 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createTester = require('./internal/createTester');
+
+var _createTester2 = _interopRequireDefault(_createTester);
+
+var _eachOfLimit = require('./eachOfLimit');
+
+var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
+
+var _notId = require('./internal/notId');
+
+var _notId2 = _interopRequireDefault(_notId);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time.
+ *
+ * @name everyLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.every]{@link module:Collections.every}
+ * @alias allLimit
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {Function} iteratee - A truth test to apply to each item in the
+ * collection in parallel. The iteratee is passed a `callback(err, truthValue)`
+ * which must be called with a boolean argument once it has completed. Invoked
+ * with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Result will be either `true` or `false`
+ * depending on the values of the async tests. Invoked with (err, result).
+ */
+exports.default = (0, _createTester2.default)(_eachOfLimit2.default, _notId2.default, _notId2.default);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/everySeries.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/everySeries.js
new file mode 100644
index 0000000..5ed1c1a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/everySeries.js
@@ -0,0 +1,37 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _everyLimit = require('./everyLimit');
+
+var _everyLimit2 = _interopRequireDefault(_everyLimit);
+
+var _doLimit = require('./internal/doLimit');
+
+var _doLimit2 = _interopRequireDefault(_doLimit);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time.
+ *
+ * @name everySeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.every]{@link module:Collections.every}
+ * @alias allSeries
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A truth test to apply to each item in the
+ * collection in parallel. The iteratee is passed a `callback(err, truthValue)`
+ * which must be called with a boolean argument once it has completed. Invoked
+ * with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Result will be either `true` or `false`
+ * depending on the values of the async tests. Invoked with (err, result).
+ */
+exports.default = (0, _doLimit2.default)(_everyLimit2.default, 1);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/filter.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/filter.js
new file mode 100644
index 0000000..54772d5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/filter.js
@@ -0,0 +1,45 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _filter = require('./internal/filter');
+
+var _filter2 = _interopRequireDefault(_filter);
+
+var _doParallel = require('./internal/doParallel');
+
+var _doParallel2 = _interopRequireDefault(_doParallel);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Returns a new array of all the values in `coll` which pass an async truth
+ * test. This operation is performed in parallel, but the results array will be
+ * in the same order as the original.
+ *
+ * @name filter
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @alias select
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A truth test to apply to each item in `coll`.
+ * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
+ * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Invoked with (err, results).
+ * @example
+ *
+ * async.filter(['file1','file2','file3'], function(filePath, callback) {
+ * fs.access(filePath, function(err) {
+ * callback(null, !err)
+ * });
+ * }, function(err, results) {
+ * // results now equals an array of the existing files
+ * });
+ */
+exports.default = (0, _doParallel2.default)(_filter2.default);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/filterLimit.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/filterLimit.js
new file mode 100644
index 0000000..06216f7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/filterLimit.js
@@ -0,0 +1,37 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _filter = require('./internal/filter');
+
+var _filter2 = _interopRequireDefault(_filter);
+
+var _doParallelLimit = require('./internal/doParallelLimit');
+
+var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a
+ * time.
+ *
+ * @name filterLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.filter]{@link module:Collections.filter}
+ * @alias selectLimit
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {Function} iteratee - A truth test to apply to each item in `coll`.
+ * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
+ * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Invoked with (err, results).
+ */
+exports.default = (0, _doParallelLimit2.default)(_filter2.default);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/filterSeries.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/filterSeries.js
new file mode 100644
index 0000000..e48d966
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/filterSeries.js
@@ -0,0 +1,35 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _filterLimit = require('./filterLimit');
+
+var _filterLimit2 = _interopRequireDefault(_filterLimit);
+
+var _doLimit = require('./internal/doLimit');
+
+var _doLimit2 = _interopRequireDefault(_doLimit);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time.
+ *
+ * @name filterSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.filter]{@link module:Collections.filter}
+ * @alias selectSeries
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A truth test to apply to each item in `coll`.
+ * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
+ * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Invoked with (err, results)
+ */
+exports.default = (0, _doLimit2.default)(_filterLimit2.default, 1);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/forever.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/forever.js
new file mode 100644
index 0000000..87156d0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/forever.js
@@ -0,0 +1,61 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = forever;
+
+var _noop = require('lodash/noop');
+
+var _noop2 = _interopRequireDefault(_noop);
+
+var _onlyOnce = require('./internal/onlyOnce');
+
+var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
+
+var _ensureAsync = require('./ensureAsync');
+
+var _ensureAsync2 = _interopRequireDefault(_ensureAsync);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Calls the asynchronous function `fn` with a callback parameter that allows it
+ * to call itself again, in series, indefinitely.
+
+ * If an error is passed to the
+ * callback then `errback` is called with the error, and execution stops,
+ * otherwise it will never be called.
+ *
+ * @name forever
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {Function} fn - a function to call repeatedly. Invoked with (next).
+ * @param {Function} [errback] - when `fn` passes an error to it's callback,
+ * this function will be called, and execution stops. Invoked with (err).
+ * @example
+ *
+ * async.forever(
+ * function(next) {
+ * // next is suitable for passing to things that need a callback(err [, whatever]);
+ * // it will result in this function being called again.
+ * },
+ * function(err) {
+ * // if next is called with a value in its first parameter, it will appear
+ * // in here as 'err', and execution will stop.
+ * }
+ * );
+ */
+function forever(fn, errback) {
+ var done = (0, _onlyOnce2.default)(errback || _noop2.default);
+ var task = (0, _ensureAsync2.default)(fn);
+
+ function next(err) {
+ if (err) return done(err);
+ task(next);
+ }
+ next();
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/index.js
new file mode 100644
index 0000000..b3595c7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/index.js
@@ -0,0 +1,505 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.wrapSync = exports.selectSeries = exports.selectLimit = exports.select = exports.foldr = exports.foldl = exports.inject = exports.forEachOfLimit = exports.forEachOfSeries = exports.forEachOf = exports.forEachLimit = exports.forEachSeries = exports.forEach = exports.findSeries = exports.findLimit = exports.find = exports.anySeries = exports.anyLimit = exports.any = exports.allSeries = exports.allLimit = exports.all = exports.whilst = exports.waterfall = exports.until = exports.unmemoize = exports.transform = exports.timesSeries = exports.timesLimit = exports.times = exports.timeout = exports.sortBy = exports.someSeries = exports.someLimit = exports.some = exports.setImmediate = exports.series = exports.seq = exports.retryable = exports.retry = exports.rejectSeries = exports.rejectLimit = exports.reject = exports.reflectAll = exports.reflect = exports.reduceRight = exports.reduce = exports.race = exports.queue = exports.priorityQueue = exports.parallelLimit = exports.parallel = exports.nextTick = exports.memoize = exports.mapValuesSeries = exports.mapValuesLimit = exports.mapValues = exports.mapSeries = exports.mapLimit = exports.map = exports.log = exports.forever = exports.filterSeries = exports.filterLimit = exports.filter = exports.everySeries = exports.everyLimit = exports.every = exports.ensureAsync = exports.eachSeries = exports.eachOfSeries = exports.eachOfLimit = exports.eachOf = exports.eachLimit = exports.each = exports.during = exports.doWhilst = exports.doUntil = exports.doDuring = exports.dir = exports.detectSeries = exports.detectLimit = exports.detect = exports.constant = exports.concatSeries = exports.concat = exports.compose = exports.cargo = exports.autoInject = exports.auto = exports.asyncify = exports.apply = exports.applyEachSeries = exports.applyEach = undefined;
+
+var _applyEach = require('./applyEach');
+
+var _applyEach2 = _interopRequireDefault(_applyEach);
+
+var _applyEachSeries = require('./applyEachSeries');
+
+var _applyEachSeries2 = _interopRequireDefault(_applyEachSeries);
+
+var _apply = require('./apply');
+
+var _apply2 = _interopRequireDefault(_apply);
+
+var _asyncify = require('./asyncify');
+
+var _asyncify2 = _interopRequireDefault(_asyncify);
+
+var _auto = require('./auto');
+
+var _auto2 = _interopRequireDefault(_auto);
+
+var _autoInject = require('./autoInject');
+
+var _autoInject2 = _interopRequireDefault(_autoInject);
+
+var _cargo = require('./cargo');
+
+var _cargo2 = _interopRequireDefault(_cargo);
+
+var _compose = require('./compose');
+
+var _compose2 = _interopRequireDefault(_compose);
+
+var _concat = require('./concat');
+
+var _concat2 = _interopRequireDefault(_concat);
+
+var _concatSeries = require('./concatSeries');
+
+var _concatSeries2 = _interopRequireDefault(_concatSeries);
+
+var _constant = require('./constant');
+
+var _constant2 = _interopRequireDefault(_constant);
+
+var _detect = require('./detect');
+
+var _detect2 = _interopRequireDefault(_detect);
+
+var _detectLimit = require('./detectLimit');
+
+var _detectLimit2 = _interopRequireDefault(_detectLimit);
+
+var _detectSeries = require('./detectSeries');
+
+var _detectSeries2 = _interopRequireDefault(_detectSeries);
+
+var _dir = require('./dir');
+
+var _dir2 = _interopRequireDefault(_dir);
+
+var _doDuring = require('./doDuring');
+
+var _doDuring2 = _interopRequireDefault(_doDuring);
+
+var _doUntil = require('./doUntil');
+
+var _doUntil2 = _interopRequireDefault(_doUntil);
+
+var _doWhilst = require('./doWhilst');
+
+var _doWhilst2 = _interopRequireDefault(_doWhilst);
+
+var _during = require('./during');
+
+var _during2 = _interopRequireDefault(_during);
+
+var _each = require('./each');
+
+var _each2 = _interopRequireDefault(_each);
+
+var _eachLimit = require('./eachLimit');
+
+var _eachLimit2 = _interopRequireDefault(_eachLimit);
+
+var _eachOf = require('./eachOf');
+
+var _eachOf2 = _interopRequireDefault(_eachOf);
+
+var _eachOfLimit = require('./eachOfLimit');
+
+var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
+
+var _eachOfSeries = require('./eachOfSeries');
+
+var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries);
+
+var _eachSeries = require('./eachSeries');
+
+var _eachSeries2 = _interopRequireDefault(_eachSeries);
+
+var _ensureAsync = require('./ensureAsync');
+
+var _ensureAsync2 = _interopRequireDefault(_ensureAsync);
+
+var _every = require('./every');
+
+var _every2 = _interopRequireDefault(_every);
+
+var _everyLimit = require('./everyLimit');
+
+var _everyLimit2 = _interopRequireDefault(_everyLimit);
+
+var _everySeries = require('./everySeries');
+
+var _everySeries2 = _interopRequireDefault(_everySeries);
+
+var _filter = require('./filter');
+
+var _filter2 = _interopRequireDefault(_filter);
+
+var _filterLimit = require('./filterLimit');
+
+var _filterLimit2 = _interopRequireDefault(_filterLimit);
+
+var _filterSeries = require('./filterSeries');
+
+var _filterSeries2 = _interopRequireDefault(_filterSeries);
+
+var _forever = require('./forever');
+
+var _forever2 = _interopRequireDefault(_forever);
+
+var _log = require('./log');
+
+var _log2 = _interopRequireDefault(_log);
+
+var _map = require('./map');
+
+var _map2 = _interopRequireDefault(_map);
+
+var _mapLimit = require('./mapLimit');
+
+var _mapLimit2 = _interopRequireDefault(_mapLimit);
+
+var _mapSeries = require('./mapSeries');
+
+var _mapSeries2 = _interopRequireDefault(_mapSeries);
+
+var _mapValues = require('./mapValues');
+
+var _mapValues2 = _interopRequireDefault(_mapValues);
+
+var _mapValuesLimit = require('./mapValuesLimit');
+
+var _mapValuesLimit2 = _interopRequireDefault(_mapValuesLimit);
+
+var _mapValuesSeries = require('./mapValuesSeries');
+
+var _mapValuesSeries2 = _interopRequireDefault(_mapValuesSeries);
+
+var _memoize = require('./memoize');
+
+var _memoize2 = _interopRequireDefault(_memoize);
+
+var _nextTick = require('./nextTick');
+
+var _nextTick2 = _interopRequireDefault(_nextTick);
+
+var _parallel = require('./parallel');
+
+var _parallel2 = _interopRequireDefault(_parallel);
+
+var _parallelLimit = require('./parallelLimit');
+
+var _parallelLimit2 = _interopRequireDefault(_parallelLimit);
+
+var _priorityQueue = require('./priorityQueue');
+
+var _priorityQueue2 = _interopRequireDefault(_priorityQueue);
+
+var _queue = require('./queue');
+
+var _queue2 = _interopRequireDefault(_queue);
+
+var _race = require('./race');
+
+var _race2 = _interopRequireDefault(_race);
+
+var _reduce = require('./reduce');
+
+var _reduce2 = _interopRequireDefault(_reduce);
+
+var _reduceRight = require('./reduceRight');
+
+var _reduceRight2 = _interopRequireDefault(_reduceRight);
+
+var _reflect = require('./reflect');
+
+var _reflect2 = _interopRequireDefault(_reflect);
+
+var _reject = require('./reject');
+
+var _reject2 = _interopRequireDefault(_reject);
+
+var _reflectAll = require('./reflectAll');
+
+var _reflectAll2 = _interopRequireDefault(_reflectAll);
+
+var _rejectLimit = require('./rejectLimit');
+
+var _rejectLimit2 = _interopRequireDefault(_rejectLimit);
+
+var _rejectSeries = require('./rejectSeries');
+
+var _rejectSeries2 = _interopRequireDefault(_rejectSeries);
+
+var _retry = require('./retry');
+
+var _retry2 = _interopRequireDefault(_retry);
+
+var _retryable = require('./retryable');
+
+var _retryable2 = _interopRequireDefault(_retryable);
+
+var _seq = require('./seq');
+
+var _seq2 = _interopRequireDefault(_seq);
+
+var _series = require('./series');
+
+var _series2 = _interopRequireDefault(_series);
+
+var _setImmediate = require('./setImmediate');
+
+var _setImmediate2 = _interopRequireDefault(_setImmediate);
+
+var _some = require('./some');
+
+var _some2 = _interopRequireDefault(_some);
+
+var _someLimit = require('./someLimit');
+
+var _someLimit2 = _interopRequireDefault(_someLimit);
+
+var _someSeries = require('./someSeries');
+
+var _someSeries2 = _interopRequireDefault(_someSeries);
+
+var _sortBy = require('./sortBy');
+
+var _sortBy2 = _interopRequireDefault(_sortBy);
+
+var _timeout = require('./timeout');
+
+var _timeout2 = _interopRequireDefault(_timeout);
+
+var _times = require('./times');
+
+var _times2 = _interopRequireDefault(_times);
+
+var _timesLimit = require('./timesLimit');
+
+var _timesLimit2 = _interopRequireDefault(_timesLimit);
+
+var _timesSeries = require('./timesSeries');
+
+var _timesSeries2 = _interopRequireDefault(_timesSeries);
+
+var _transform = require('./transform');
+
+var _transform2 = _interopRequireDefault(_transform);
+
+var _unmemoize = require('./unmemoize');
+
+var _unmemoize2 = _interopRequireDefault(_unmemoize);
+
+var _until = require('./until');
+
+var _until2 = _interopRequireDefault(_until);
+
+var _waterfall = require('./waterfall');
+
+var _waterfall2 = _interopRequireDefault(_waterfall);
+
+var _whilst = require('./whilst');
+
+var _whilst2 = _interopRequireDefault(_whilst);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Async is a utility module which provides straight-forward, powerful functions
+ * for working with asynchronous JavaScript. Although originally designed for
+ * use with [Node.js](http://nodejs.org) and installable via
+ * `npm install --save async`, it can also be used directly in the browser.
+ * @module async
+ */
+
+/**
+ * A collection of `async` functions for manipulating collections, such as
+ * arrays and objects.
+ * @module Collections
+ */
+
+/**
+ * A collection of `async` functions for controlling the flow through a script.
+ * @module ControlFlow
+ */
+
+/**
+ * A collection of `async` utility functions.
+ * @module Utils
+ */
+exports.default = {
+ applyEach: _applyEach2.default,
+ applyEachSeries: _applyEachSeries2.default,
+ apply: _apply2.default,
+ asyncify: _asyncify2.default,
+ auto: _auto2.default,
+ autoInject: _autoInject2.default,
+ cargo: _cargo2.default,
+ compose: _compose2.default,
+ concat: _concat2.default,
+ concatSeries: _concatSeries2.default,
+ constant: _constant2.default,
+ detect: _detect2.default,
+ detectLimit: _detectLimit2.default,
+ detectSeries: _detectSeries2.default,
+ dir: _dir2.default,
+ doDuring: _doDuring2.default,
+ doUntil: _doUntil2.default,
+ doWhilst: _doWhilst2.default,
+ during: _during2.default,
+ each: _each2.default,
+ eachLimit: _eachLimit2.default,
+ eachOf: _eachOf2.default,
+ eachOfLimit: _eachOfLimit2.default,
+ eachOfSeries: _eachOfSeries2.default,
+ eachSeries: _eachSeries2.default,
+ ensureAsync: _ensureAsync2.default,
+ every: _every2.default,
+ everyLimit: _everyLimit2.default,
+ everySeries: _everySeries2.default,
+ filter: _filter2.default,
+ filterLimit: _filterLimit2.default,
+ filterSeries: _filterSeries2.default,
+ forever: _forever2.default,
+ log: _log2.default,
+ map: _map2.default,
+ mapLimit: _mapLimit2.default,
+ mapSeries: _mapSeries2.default,
+ mapValues: _mapValues2.default,
+ mapValuesLimit: _mapValuesLimit2.default,
+ mapValuesSeries: _mapValuesSeries2.default,
+ memoize: _memoize2.default,
+ nextTick: _nextTick2.default,
+ parallel: _parallel2.default,
+ parallelLimit: _parallelLimit2.default,
+ priorityQueue: _priorityQueue2.default,
+ queue: _queue2.default,
+ race: _race2.default,
+ reduce: _reduce2.default,
+ reduceRight: _reduceRight2.default,
+ reflect: _reflect2.default,
+ reflectAll: _reflectAll2.default,
+ reject: _reject2.default,
+ rejectLimit: _rejectLimit2.default,
+ rejectSeries: _rejectSeries2.default,
+ retry: _retry2.default,
+ retryable: _retryable2.default,
+ seq: _seq2.default,
+ series: _series2.default,
+ setImmediate: _setImmediate2.default,
+ some: _some2.default,
+ someLimit: _someLimit2.default,
+ someSeries: _someSeries2.default,
+ sortBy: _sortBy2.default,
+ timeout: _timeout2.default,
+ times: _times2.default,
+ timesLimit: _timesLimit2.default,
+ timesSeries: _timesSeries2.default,
+ transform: _transform2.default,
+ unmemoize: _unmemoize2.default,
+ until: _until2.default,
+ waterfall: _waterfall2.default,
+ whilst: _whilst2.default,
+
+ // aliases
+ all: _every2.default,
+ any: _some2.default,
+ forEach: _each2.default,
+ forEachSeries: _eachSeries2.default,
+ forEachLimit: _eachLimit2.default,
+ forEachOf: _eachOf2.default,
+ forEachOfSeries: _eachOfSeries2.default,
+ forEachOfLimit: _eachOfLimit2.default,
+ inject: _reduce2.default,
+ foldl: _reduce2.default,
+ foldr: _reduceRight2.default,
+ select: _filter2.default,
+ selectLimit: _filterLimit2.default,
+ selectSeries: _filterSeries2.default,
+ wrapSync: _asyncify2.default
+};
+exports.applyEach = _applyEach2.default;
+exports.applyEachSeries = _applyEachSeries2.default;
+exports.apply = _apply2.default;
+exports.asyncify = _asyncify2.default;
+exports.auto = _auto2.default;
+exports.autoInject = _autoInject2.default;
+exports.cargo = _cargo2.default;
+exports.compose = _compose2.default;
+exports.concat = _concat2.default;
+exports.concatSeries = _concatSeries2.default;
+exports.constant = _constant2.default;
+exports.detect = _detect2.default;
+exports.detectLimit = _detectLimit2.default;
+exports.detectSeries = _detectSeries2.default;
+exports.dir = _dir2.default;
+exports.doDuring = _doDuring2.default;
+exports.doUntil = _doUntil2.default;
+exports.doWhilst = _doWhilst2.default;
+exports.during = _during2.default;
+exports.each = _each2.default;
+exports.eachLimit = _eachLimit2.default;
+exports.eachOf = _eachOf2.default;
+exports.eachOfLimit = _eachOfLimit2.default;
+exports.eachOfSeries = _eachOfSeries2.default;
+exports.eachSeries = _eachSeries2.default;
+exports.ensureAsync = _ensureAsync2.default;
+exports.every = _every2.default;
+exports.everyLimit = _everyLimit2.default;
+exports.everySeries = _everySeries2.default;
+exports.filter = _filter2.default;
+exports.filterLimit = _filterLimit2.default;
+exports.filterSeries = _filterSeries2.default;
+exports.forever = _forever2.default;
+exports.log = _log2.default;
+exports.map = _map2.default;
+exports.mapLimit = _mapLimit2.default;
+exports.mapSeries = _mapSeries2.default;
+exports.mapValues = _mapValues2.default;
+exports.mapValuesLimit = _mapValuesLimit2.default;
+exports.mapValuesSeries = _mapValuesSeries2.default;
+exports.memoize = _memoize2.default;
+exports.nextTick = _nextTick2.default;
+exports.parallel = _parallel2.default;
+exports.parallelLimit = _parallelLimit2.default;
+exports.priorityQueue = _priorityQueue2.default;
+exports.queue = _queue2.default;
+exports.race = _race2.default;
+exports.reduce = _reduce2.default;
+exports.reduceRight = _reduceRight2.default;
+exports.reflect = _reflect2.default;
+exports.reflectAll = _reflectAll2.default;
+exports.reject = _reject2.default;
+exports.rejectLimit = _rejectLimit2.default;
+exports.rejectSeries = _rejectSeries2.default;
+exports.retry = _retry2.default;
+exports.retryable = _retryable2.default;
+exports.seq = _seq2.default;
+exports.series = _series2.default;
+exports.setImmediate = _setImmediate2.default;
+exports.some = _some2.default;
+exports.someLimit = _someLimit2.default;
+exports.someSeries = _someSeries2.default;
+exports.sortBy = _sortBy2.default;
+exports.timeout = _timeout2.default;
+exports.times = _times2.default;
+exports.timesLimit = _timesLimit2.default;
+exports.timesSeries = _timesSeries2.default;
+exports.transform = _transform2.default;
+exports.unmemoize = _unmemoize2.default;
+exports.until = _until2.default;
+exports.waterfall = _waterfall2.default;
+exports.whilst = _whilst2.default;
+exports.all = _every2.default;
+exports.allLimit = _everyLimit2.default;
+exports.allSeries = _everySeries2.default;
+exports.any = _some2.default;
+exports.anyLimit = _someLimit2.default;
+exports.anySeries = _someSeries2.default;
+exports.find = _detect2.default;
+exports.findLimit = _detectLimit2.default;
+exports.findSeries = _detectSeries2.default;
+exports.forEach = _each2.default;
+exports.forEachSeries = _eachSeries2.default;
+exports.forEachLimit = _eachLimit2.default;
+exports.forEachOf = _eachOf2.default;
+exports.forEachOfSeries = _eachOfSeries2.default;
+exports.forEachOfLimit = _eachOfLimit2.default;
+exports.inject = _reduce2.default;
+exports.foldl = _reduce2.default;
+exports.foldr = _reduceRight2.default;
+exports.select = _filter2.default;
+exports.selectLimit = _filterLimit2.default;
+exports.selectSeries = _filterSeries2.default;
+exports.wrapSync = _asyncify2.default; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/DoublyLinkedList.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/DoublyLinkedList.js
new file mode 100644
index 0000000..796d123
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/DoublyLinkedList.js
@@ -0,0 +1,63 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = DLL;
+// Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation
+// used for queues. This implementation assumes that the node provided by the user can be modified
+// to adjust the next and last properties. We implement only the minimal functionality
+// for queue support.
+function DLL() {
+ this.head = this.tail = null;
+ this.length = 0;
+}
+
+function setInitial(dll, node) {
+ dll.length = 1;
+ dll.head = dll.tail = node;
+}
+
+DLL.prototype.removeLink = function (node) {
+ if (node.prev) node.prev.next = node.next;else this.head = node.next;
+ if (node.next) node.next.prev = node.prev;else this.tail = node.prev;
+
+ node.prev = node.next = null;
+ this.length -= 1;
+ return node;
+};
+
+DLL.prototype.empty = DLL;
+
+DLL.prototype.insertAfter = function (node, newNode) {
+ newNode.prev = node;
+ newNode.next = node.next;
+ if (node.next) node.next.prev = newNode;else this.tail = newNode;
+ node.next = newNode;
+ this.length += 1;
+};
+
+DLL.prototype.insertBefore = function (node, newNode) {
+ newNode.prev = node.prev;
+ newNode.next = node;
+ if (node.prev) node.prev.next = newNode;else this.head = newNode;
+ node.prev = newNode;
+ this.length += 1;
+};
+
+DLL.prototype.unshift = function (node) {
+ if (this.head) this.insertBefore(this.head, node);else setInitial(this, node);
+};
+
+DLL.prototype.push = function (node) {
+ if (this.tail) this.insertAfter(this.tail, node);else setInitial(this, node);
+};
+
+DLL.prototype.shift = function () {
+ return this.head && this.removeLink(this.head);
+};
+
+DLL.prototype.pop = function () {
+ return this.tail && this.removeLink(this.tail);
+};
+module.exports = exports["default"]; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/applyEach.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/applyEach.js
new file mode 100644
index 0000000..bfe97e6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/applyEach.js
@@ -0,0 +1,33 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = applyEach;
+
+var _baseRest = require('lodash/_baseRest');
+
+var _baseRest2 = _interopRequireDefault(_baseRest);
+
+var _initialParams = require('./initialParams');
+
+var _initialParams2 = _interopRequireDefault(_initialParams);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function applyEach(eachfn) {
+ return (0, _baseRest2.default)(function (fns, args) {
+ var go = (0, _initialParams2.default)(function (args, callback) {
+ var that = this;
+ return eachfn(fns, function (fn, cb) {
+ fn.apply(that, args.concat([cb]));
+ }, callback);
+ });
+ if (args.length) {
+ return go.apply(this, args);
+ } else {
+ return go;
+ }
+ });
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/breakLoop.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/breakLoop.js
new file mode 100644
index 0000000..1065058
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/breakLoop.js
@@ -0,0 +1,9 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+// A temporary value used to identify if the loop should be broken.
+// See #1064, #1293
+exports.default = {};
+module.exports = exports["default"]; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/concat.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/concat.js
new file mode 100644
index 0000000..f2ffb53
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/concat.js
@@ -0,0 +1,18 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = concat;
+function concat(eachfn, arr, fn, callback) {
+ var result = [];
+ eachfn(arr, function (x, index, cb) {
+ fn(x, function (err, y) {
+ result = result.concat(y || []);
+ cb(err);
+ });
+ }, function (err) {
+ callback(err, result);
+ });
+}
+module.exports = exports["default"]; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/consoleFunc.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/consoleFunc.js
new file mode 100644
index 0000000..0fdab2f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/consoleFunc.js
@@ -0,0 +1,35 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = consoleFunc;
+
+var _arrayEach = require('lodash/_arrayEach');
+
+var _arrayEach2 = _interopRequireDefault(_arrayEach);
+
+var _baseRest = require('lodash/_baseRest');
+
+var _baseRest2 = _interopRequireDefault(_baseRest);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function consoleFunc(name) {
+ return (0, _baseRest2.default)(function (fn, args) {
+ fn.apply(null, args.concat([(0, _baseRest2.default)(function (err, args) {
+ if (typeof console === 'object') {
+ if (err) {
+ if (console.error) {
+ console.error(err);
+ }
+ } else if (console[name]) {
+ (0, _arrayEach2.default)(args, function (x) {
+ console[name](x);
+ });
+ }
+ }
+ })]));
+ });
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/createTester.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/createTester.js
new file mode 100644
index 0000000..5330c38
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/createTester.js
@@ -0,0 +1,50 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _createTester;
+
+var _noop = require('lodash/noop');
+
+var _noop2 = _interopRequireDefault(_noop);
+
+var _breakLoop = require('./breakLoop');
+
+var _breakLoop2 = _interopRequireDefault(_breakLoop);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _createTester(eachfn, check, getResult) {
+ return function (arr, limit, iteratee, cb) {
+ function done() {
+ if (cb) {
+ cb(null, getResult(false));
+ }
+ }
+ function wrappedIteratee(x, _, callback) {
+ if (!cb) return callback();
+ iteratee(x, function (err, v) {
+ // Check cb as another iteratee may have resolved with a
+ // value or error since we started this iteratee
+ if (cb && (err || check(v))) {
+ if (err) cb(err);else cb(err, getResult(true, x));
+ cb = iteratee = false;
+ callback(err, _breakLoop2.default);
+ } else {
+ callback();
+ }
+ });
+ }
+ if (arguments.length > 3) {
+ cb = cb || _noop2.default;
+ eachfn(arr, limit, wrappedIteratee, done);
+ } else {
+ cb = iteratee;
+ cb = cb || _noop2.default;
+ iteratee = limit;
+ eachfn(arr, wrappedIteratee, done);
+ }
+ };
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/doLimit.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/doLimit.js
new file mode 100644
index 0000000..963c608
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/doLimit.js
@@ -0,0 +1,12 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = doLimit;
+function doLimit(fn, limit) {
+ return function (iterable, iteratee, callback) {
+ return fn(iterable, limit, iteratee, callback);
+ };
+}
+module.exports = exports["default"]; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/doParallel.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/doParallel.js
new file mode 100644
index 0000000..f4a30ee
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/doParallel.js
@@ -0,0 +1,19 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = doParallel;
+
+var _eachOf = require('../eachOf');
+
+var _eachOf2 = _interopRequireDefault(_eachOf);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function doParallel(fn) {
+ return function (obj, iteratee, callback) {
+ return fn(_eachOf2.default, obj, iteratee, callback);
+ };
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/doParallelLimit.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/doParallelLimit.js
new file mode 100644
index 0000000..4c4d3b4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/doParallelLimit.js
@@ -0,0 +1,19 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = doParallelLimit;
+
+var _eachOfLimit = require('./eachOfLimit');
+
+var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function doParallelLimit(fn) {
+ return function (obj, limit, iteratee, callback) {
+ return fn((0, _eachOfLimit2.default)(limit), obj, iteratee, callback);
+ };
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/doSeries.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/doSeries.js
new file mode 100644
index 0000000..b149d95
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/doSeries.js
@@ -0,0 +1,19 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = doSeries;
+
+var _eachOfSeries = require('../eachOfSeries');
+
+var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function doSeries(fn) {
+ return function (obj, iteratee, callback) {
+ return fn(_eachOfSeries2.default, obj, iteratee, callback);
+ };
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/eachOfLimit.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/eachOfLimit.js
new file mode 100644
index 0000000..e4c74bb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/eachOfLimit.js
@@ -0,0 +1,71 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _eachOfLimit;
+
+var _noop = require('lodash/noop');
+
+var _noop2 = _interopRequireDefault(_noop);
+
+var _once = require('./once');
+
+var _once2 = _interopRequireDefault(_once);
+
+var _iterator = require('./iterator');
+
+var _iterator2 = _interopRequireDefault(_iterator);
+
+var _onlyOnce = require('./onlyOnce');
+
+var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
+
+var _breakLoop = require('./breakLoop');
+
+var _breakLoop2 = _interopRequireDefault(_breakLoop);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _eachOfLimit(limit) {
+ return function (obj, iteratee, callback) {
+ callback = (0, _once2.default)(callback || _noop2.default);
+ if (limit <= 0 || !obj) {
+ return callback(null);
+ }
+ var nextElem = (0, _iterator2.default)(obj);
+ var done = false;
+ var running = 0;
+
+ function iterateeCallback(err, value) {
+ running -= 1;
+ if (err) {
+ done = true;
+ callback(err);
+ } else if (value === _breakLoop2.default || done && running <= 0) {
+ done = true;
+ return callback(null);
+ } else {
+ replenish();
+ }
+ }
+
+ function replenish() {
+ while (running < limit && !done) {
+ var elem = nextElem();
+ if (elem === null) {
+ done = true;
+ if (running <= 0) {
+ callback(null);
+ }
+ return;
+ }
+ running += 1;
+ iteratee(elem.value, elem.key, (0, _onlyOnce2.default)(iterateeCallback));
+ }
+ }
+
+ replenish();
+ };
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/filter.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/filter.js
new file mode 100644
index 0000000..ff163e9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/filter.js
@@ -0,0 +1,50 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _filter;
+
+var _arrayMap = require('lodash/_arrayMap');
+
+var _arrayMap2 = _interopRequireDefault(_arrayMap);
+
+var _baseProperty = require('lodash/_baseProperty');
+
+var _baseProperty2 = _interopRequireDefault(_baseProperty);
+
+var _noop = require('lodash/noop');
+
+var _noop2 = _interopRequireDefault(_noop);
+
+var _once = require('./once');
+
+var _once2 = _interopRequireDefault(_once);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _filter(eachfn, arr, iteratee, callback) {
+ callback = (0, _once2.default)(callback || _noop2.default);
+ var results = [];
+ eachfn(arr, function (x, index, callback) {
+ iteratee(x, function (err, v) {
+ if (err) {
+ callback(err);
+ } else {
+ if (v) {
+ results.push({ index: index, value: x });
+ }
+ callback();
+ }
+ });
+ }, function (err) {
+ if (err) {
+ callback(err);
+ } else {
+ callback(null, (0, _arrayMap2.default)(results.sort(function (a, b) {
+ return a.index - b.index;
+ }), (0, _baseProperty2.default)('value')));
+ }
+ });
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/findGetResult.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/findGetResult.js
new file mode 100644
index 0000000..f8d3fe0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/findGetResult.js
@@ -0,0 +1,10 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _findGetResult;
+function _findGetResult(v, x) {
+ return x;
+}
+module.exports = exports["default"]; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/getIterator.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/getIterator.js
new file mode 100644
index 0000000..3eadd24
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/getIterator.js
@@ -0,0 +1,13 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+exports.default = function (coll) {
+ return iteratorSymbol && coll[iteratorSymbol] && coll[iteratorSymbol]();
+};
+
+var iteratorSymbol = typeof Symbol === 'function' && Symbol.iterator;
+
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/initialParams.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/initialParams.js
new file mode 100644
index 0000000..0142132
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/initialParams.js
@@ -0,0 +1,20 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+exports.default = function (fn) {
+ return (0, _baseRest2.default)(function (args /*..., callback*/) {
+ var callback = args.pop();
+ fn.call(this, args, callback);
+ });
+};
+
+var _baseRest = require('lodash/_baseRest');
+
+var _baseRest2 = _interopRequireDefault(_baseRest);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/iterator.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/iterator.js
new file mode 100644
index 0000000..3d32942
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/iterator.js
@@ -0,0 +1,58 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = iterator;
+
+var _isArrayLike = require('lodash/isArrayLike');
+
+var _isArrayLike2 = _interopRequireDefault(_isArrayLike);
+
+var _getIterator = require('./getIterator');
+
+var _getIterator2 = _interopRequireDefault(_getIterator);
+
+var _keys = require('lodash/keys');
+
+var _keys2 = _interopRequireDefault(_keys);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function createArrayIterator(coll) {
+ var i = -1;
+ var len = coll.length;
+ return function next() {
+ return ++i < len ? { value: coll[i], key: i } : null;
+ };
+}
+
+function createES2015Iterator(iterator) {
+ var i = -1;
+ return function next() {
+ var item = iterator.next();
+ if (item.done) return null;
+ i++;
+ return { value: item.value, key: i };
+ };
+}
+
+function createObjectIterator(obj) {
+ var okeys = (0, _keys2.default)(obj);
+ var i = -1;
+ var len = okeys.length;
+ return function next() {
+ var key = okeys[++i];
+ return i < len ? { value: obj[key], key: key } : null;
+ };
+}
+
+function iterator(coll) {
+ if ((0, _isArrayLike2.default)(coll)) {
+ return createArrayIterator(coll);
+ }
+
+ var iterator = (0, _getIterator2.default)(coll);
+ return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll);
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/map.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/map.js
new file mode 100644
index 0000000..e303d83
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/map.js
@@ -0,0 +1,34 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _asyncMap;
+
+var _noop = require('lodash/noop');
+
+var _noop2 = _interopRequireDefault(_noop);
+
+var _once = require('./once');
+
+var _once2 = _interopRequireDefault(_once);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _asyncMap(eachfn, arr, iteratee, callback) {
+ callback = (0, _once2.default)(callback || _noop2.default);
+ arr = arr || [];
+ var results = [];
+ var counter = 0;
+
+ eachfn(arr, function (value, _, callback) {
+ var index = counter++;
+ iteratee(value, function (err, v) {
+ results[index] = v;
+ callback(err);
+ });
+ }, function (err) {
+ callback(err, results);
+ });
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/notId.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/notId.js
new file mode 100644
index 0000000..0106c92
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/notId.js
@@ -0,0 +1,10 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = notId;
+function notId(v) {
+ return !v;
+}
+module.exports = exports["default"]; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/once.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/once.js
new file mode 100644
index 0000000..f0c379f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/once.js
@@ -0,0 +1,15 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = once;
+function once(fn) {
+ return function () {
+ if (fn === null) return;
+ var callFn = fn;
+ fn = null;
+ callFn.apply(this, arguments);
+ };
+}
+module.exports = exports["default"]; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/onlyOnce.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/onlyOnce.js
new file mode 100644
index 0000000..f2e3001
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/onlyOnce.js
@@ -0,0 +1,15 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = onlyOnce;
+function onlyOnce(fn) {
+ return function () {
+ if (fn === null) throw new Error("Callback was already called.");
+ var callFn = fn;
+ fn = null;
+ callFn.apply(this, arguments);
+ };
+}
+module.exports = exports["default"]; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/parallel.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/parallel.js
new file mode 100644
index 0000000..3915b20
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/parallel.js
@@ -0,0 +1,38 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _parallel;
+
+var _noop = require('lodash/noop');
+
+var _noop2 = _interopRequireDefault(_noop);
+
+var _isArrayLike = require('lodash/isArrayLike');
+
+var _isArrayLike2 = _interopRequireDefault(_isArrayLike);
+
+var _baseRest = require('lodash/_baseRest');
+
+var _baseRest2 = _interopRequireDefault(_baseRest);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _parallel(eachfn, tasks, callback) {
+ callback = callback || _noop2.default;
+ var results = (0, _isArrayLike2.default)(tasks) ? [] : {};
+
+ eachfn(tasks, function (task, key, callback) {
+ task((0, _baseRest2.default)(function (err, args) {
+ if (args.length <= 1) {
+ args = args[0];
+ }
+ results[key] = args;
+ callback(err);
+ }));
+ }, function (err) {
+ callback(err, results);
+ });
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/queue.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/queue.js
new file mode 100644
index 0000000..6d53cc2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/queue.js
@@ -0,0 +1,184 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = queue;
+
+var _baseIndexOf = require('lodash/_baseIndexOf');
+
+var _baseIndexOf2 = _interopRequireDefault(_baseIndexOf);
+
+var _isArray = require('lodash/isArray');
+
+var _isArray2 = _interopRequireDefault(_isArray);
+
+var _noop = require('lodash/noop');
+
+var _noop2 = _interopRequireDefault(_noop);
+
+var _baseRest = require('lodash/_baseRest');
+
+var _baseRest2 = _interopRequireDefault(_baseRest);
+
+var _onlyOnce = require('./onlyOnce');
+
+var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
+
+var _setImmediate = require('./setImmediate');
+
+var _setImmediate2 = _interopRequireDefault(_setImmediate);
+
+var _DoublyLinkedList = require('./DoublyLinkedList');
+
+var _DoublyLinkedList2 = _interopRequireDefault(_DoublyLinkedList);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function queue(worker, concurrency, payload) {
+ if (concurrency == null) {
+ concurrency = 1;
+ } else if (concurrency === 0) {
+ throw new Error('Concurrency must not be zero');
+ }
+
+ function _insert(data, insertAtFront, callback) {
+ if (callback != null && typeof callback !== 'function') {
+ throw new Error('task callback must be a function');
+ }
+ q.started = true;
+ if (!(0, _isArray2.default)(data)) {
+ data = [data];
+ }
+ if (data.length === 0 && q.idle()) {
+ // call drain immediately if there are no tasks
+ return (0, _setImmediate2.default)(function () {
+ q.drain();
+ });
+ }
+
+ for (var i = 0, l = data.length; i < l; i++) {
+ var item = {
+ data: data[i],
+ callback: callback || _noop2.default
+ };
+
+ if (insertAtFront) {
+ q._tasks.unshift(item);
+ } else {
+ q._tasks.push(item);
+ }
+ }
+ (0, _setImmediate2.default)(q.process);
+ }
+
+ function _next(tasks) {
+ return (0, _baseRest2.default)(function (args) {
+ workers -= 1;
+
+ for (var i = 0, l = tasks.length; i < l; i++) {
+ var task = tasks[i];
+ var index = (0, _baseIndexOf2.default)(workersList, task, 0);
+ if (index >= 0) {
+ workersList.splice(index);
+ }
+
+ task.callback.apply(task, args);
+
+ if (args[0] != null) {
+ q.error(args[0], task.data);
+ }
+ }
+
+ if (workers <= q.concurrency - q.buffer) {
+ q.unsaturated();
+ }
+
+ if (q.idle()) {
+ q.drain();
+ }
+ q.process();
+ });
+ }
+
+ var workers = 0;
+ var workersList = [];
+ var q = {
+ _tasks: new _DoublyLinkedList2.default(),
+ concurrency: concurrency,
+ payload: payload,
+ saturated: _noop2.default,
+ unsaturated: _noop2.default,
+ buffer: concurrency / 4,
+ empty: _noop2.default,
+ drain: _noop2.default,
+ error: _noop2.default,
+ started: false,
+ paused: false,
+ push: function (data, callback) {
+ _insert(data, false, callback);
+ },
+ kill: function () {
+ q.drain = _noop2.default;
+ q._tasks.empty();
+ },
+ unshift: function (data, callback) {
+ _insert(data, true, callback);
+ },
+ process: function () {
+ while (!q.paused && workers < q.concurrency && q._tasks.length) {
+ var tasks = [],
+ data = [];
+ var l = q._tasks.length;
+ if (q.payload) l = Math.min(l, q.payload);
+ for (var i = 0; i < l; i++) {
+ var node = q._tasks.shift();
+ tasks.push(node);
+ data.push(node.data);
+ }
+
+ if (q._tasks.length === 0) {
+ q.empty();
+ }
+ workers += 1;
+ workersList.push(tasks[0]);
+
+ if (workers === q.concurrency) {
+ q.saturated();
+ }
+
+ var cb = (0, _onlyOnce2.default)(_next(tasks));
+ worker(data, cb);
+ }
+ },
+ length: function () {
+ return q._tasks.length;
+ },
+ running: function () {
+ return workers;
+ },
+ workersList: function () {
+ return workersList;
+ },
+ idle: function () {
+ return q._tasks.length + workers === 0;
+ },
+ pause: function () {
+ q.paused = true;
+ },
+ resume: function () {
+ if (q.paused === false) {
+ return;
+ }
+ q.paused = false;
+ var resumeCount = Math.min(q.concurrency, q._tasks.length);
+ // Need to call q.process once per concurrent
+ // worker to preserve full concurrency after pause
+ for (var w = 1; w <= resumeCount; w++) {
+ (0, _setImmediate2.default)(q.process);
+ }
+ }
+ };
+ return q;
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/reject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/reject.js
new file mode 100644
index 0000000..b20cc3b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/reject.js
@@ -0,0 +1,25 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = reject;
+
+var _filter = require('./filter');
+
+var _filter2 = _interopRequireDefault(_filter);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function reject(eachfn, arr, iteratee, callback) {
+ (0, _filter2.default)(eachfn, arr, function (value, cb) {
+ iteratee(value, function (err, v) {
+ if (err) {
+ cb(err);
+ } else {
+ cb(null, !v);
+ }
+ });
+ }, callback);
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/setImmediate.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/setImmediate.js
new file mode 100644
index 0000000..18f170d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/setImmediate.js
@@ -0,0 +1,41 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.hasNextTick = exports.hasSetImmediate = undefined;
+exports.fallback = fallback;
+exports.wrap = wrap;
+
+var _baseRest = require('lodash/_baseRest');
+
+var _baseRest2 = _interopRequireDefault(_baseRest);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var hasSetImmediate = exports.hasSetImmediate = typeof setImmediate === 'function' && setImmediate;
+var hasNextTick = exports.hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function';
+
+function fallback(fn) {
+ setTimeout(fn, 0);
+}
+
+function wrap(defer) {
+ return (0, _baseRest2.default)(function (fn, args) {
+ defer(function () {
+ fn.apply(null, args);
+ });
+ });
+}
+
+var _defer;
+
+if (hasSetImmediate) {
+ _defer = setImmediate;
+} else if (hasNextTick) {
+ _defer = process.nextTick;
+} else {
+ _defer = fallback;
+}
+
+exports.default = wrap(_defer); \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/withoutIndex.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/withoutIndex.js
new file mode 100644
index 0000000..2bd3579
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/internal/withoutIndex.js
@@ -0,0 +1,12 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _withoutIndex;
+function _withoutIndex(iteratee) {
+ return function (value, index, callback) {
+ return iteratee(value, callback);
+ };
+}
+module.exports = exports["default"]; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/log.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/log.js
new file mode 100644
index 0000000..ac04693
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/log.js
@@ -0,0 +1,41 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _consoleFunc = require('./internal/consoleFunc');
+
+var _consoleFunc2 = _interopRequireDefault(_consoleFunc);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Logs the result of an `async` function to the `console`. Only works in
+ * Node.js or in browsers that support `console.log` and `console.error` (such
+ * as FF and Chrome). If multiple arguments are returned from the async
+ * function, `console.log` is called on each argument in order.
+ *
+ * @name log
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @category Util
+ * @param {Function} function - The function you want to eventually apply all
+ * arguments to.
+ * @param {...*} arguments... - Any number of arguments to apply to the function.
+ * @example
+ *
+ * // in a module
+ * var hello = function(name, callback) {
+ * setTimeout(function() {
+ * callback(null, 'hello ' + name);
+ * }, 1000);
+ * };
+ *
+ * // in the node repl
+ * node> async.log(hello, 'world');
+ * 'hello world'
+ */
+exports.default = (0, _consoleFunc2.default)('log');
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/map.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/map.js
new file mode 100644
index 0000000..37e0b01
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/map.js
@@ -0,0 +1,54 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _doParallel = require('./internal/doParallel');
+
+var _doParallel2 = _interopRequireDefault(_doParallel);
+
+var _map = require('./internal/map');
+
+var _map2 = _interopRequireDefault(_map);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Produces a new collection of values by mapping each value in `coll` through
+ * the `iteratee` function. The `iteratee` is called with an item from `coll`
+ * and a callback for when it has finished processing. Each of these callback
+ * takes 2 arguments: an `error`, and the transformed item from `coll`. If
+ * `iteratee` passes an error to its callback, the main `callback` (for the
+ * `map` function) is immediately called with the error.
+ *
+ * Note, that since this function applies the `iteratee` to each item in
+ * parallel, there is no guarantee that the `iteratee` functions will complete
+ * in order. However, the results array will be in the same order as the
+ * original `coll`.
+ *
+ * If `map` is passed an Object, the results will be an Array. The results
+ * will roughly be in the order of the original Objects' keys (but this can
+ * vary across JavaScript engines)
+ *
+ * @name map
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A function to apply to each item in `coll`.
+ * The iteratee is passed a `callback(err, transformed)` which must be called
+ * once it has completed with an error (which can be `null`) and a
+ * transformed item. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
+ * functions have finished, or an error occurs. Results is an Array of the
+ * transformed items from the `coll`. Invoked with (err, results).
+ * @example
+ *
+ * async.map(['file1','file2','file3'], fs.stat, function(err, results) {
+ * // results is now an array of stats for each file
+ * });
+ */
+exports.default = (0, _doParallel2.default)(_map2.default);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/mapLimit.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/mapLimit.js
new file mode 100644
index 0000000..9165e0a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/mapLimit.js
@@ -0,0 +1,37 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _doParallelLimit = require('./internal/doParallelLimit');
+
+var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit);
+
+var _map = require('./internal/map');
+
+var _map2 = _interopRequireDefault(_map);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time.
+ *
+ * @name mapLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.map]{@link module:Collections.map}
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {Function} iteratee - A function to apply to each item in `coll`.
+ * The iteratee is passed a `callback(err, transformed)` which must be called
+ * once it has completed with an error (which can be `null`) and a transformed
+ * item. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
+ * functions have finished, or an error occurs. Results is an array of the
+ * transformed items from the `coll`. Invoked with (err, results).
+ */
+exports.default = (0, _doParallelLimit2.default)(_map2.default);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/mapSeries.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/mapSeries.js
new file mode 100644
index 0000000..b3894ad
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/mapSeries.js
@@ -0,0 +1,36 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _mapLimit = require('./mapLimit');
+
+var _mapLimit2 = _interopRequireDefault(_mapLimit);
+
+var _doLimit = require('./internal/doLimit');
+
+var _doLimit2 = _interopRequireDefault(_doLimit);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time.
+ *
+ * @name mapSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.map]{@link module:Collections.map}
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A function to apply to each item in `coll`.
+ * The iteratee is passed a `callback(err, transformed)` which must be called
+ * once it has completed with an error (which can be `null`) and a
+ * transformed item. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
+ * functions have finished, or an error occurs. Results is an array of the
+ * transformed items from the `coll`. Invoked with (err, results).
+ */
+exports.default = (0, _doLimit2.default)(_mapLimit2.default, 1);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/mapValues.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/mapValues.js
new file mode 100644
index 0000000..6677637
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/mapValues.js
@@ -0,0 +1,63 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _mapValuesLimit = require('./mapValuesLimit');
+
+var _mapValuesLimit2 = _interopRequireDefault(_mapValuesLimit);
+
+var _doLimit = require('./internal/doLimit');
+
+var _doLimit2 = _interopRequireDefault(_doLimit);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * A relative of [`map`]{@link module:Collections.map}, designed for use with objects.
+ *
+ * Produces a new Object by mapping each value of `obj` through the `iteratee`
+ * function. The `iteratee` is called each `value` and `key` from `obj` and a
+ * callback for when it has finished processing. Each of these callbacks takes
+ * two arguments: an `error`, and the transformed item from `obj`. If `iteratee`
+ * passes an error to its callback, the main `callback` (for the `mapValues`
+ * function) is immediately called with the error.
+ *
+ * Note, the order of the keys in the result is not guaranteed. The keys will
+ * be roughly in the order they complete, (but this is very engine-specific)
+ *
+ * @name mapValues
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @category Collection
+ * @param {Object} obj - A collection to iterate over.
+ * @param {Function} iteratee - A function to apply to each value and key in
+ * `coll`. The iteratee is passed a `callback(err, transformed)` which must be
+ * called once it has completed with an error (which can be `null`) and a
+ * transformed value. Invoked with (value, key, callback).
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
+ * functions have finished, or an error occurs. `result` is a new object consisting
+ * of each key from `obj`, with each transformed value on the right-hand side.
+ * Invoked with (err, result).
+ * @example
+ *
+ * async.mapValues({
+ * f1: 'file1',
+ * f2: 'file2',
+ * f3: 'file3'
+ * }, function (file, key, callback) {
+ * fs.stat(file, callback);
+ * }, function(err, result) {
+ * // result is now a map of stats for each file, e.g.
+ * // {
+ * // f1: [stats for file1],
+ * // f2: [stats for file2],
+ * // f3: [stats for file3]
+ * // }
+ * });
+ */
+
+exports.default = (0, _doLimit2.default)(_mapValuesLimit2.default, Infinity);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/mapValuesLimit.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/mapValuesLimit.js
new file mode 100644
index 0000000..f331fa0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/mapValuesLimit.js
@@ -0,0 +1,56 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = mapValuesLimit;
+
+var _eachOfLimit = require('./eachOfLimit');
+
+var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
+
+var _noop = require('lodash/noop');
+
+var _noop2 = _interopRequireDefault(_noop);
+
+var _once = require('./internal/once');
+
+var _once2 = _interopRequireDefault(_once);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [`mapValues`]{@link module:Collections.mapValues} but runs a maximum of `limit` async operations at a
+ * time.
+ *
+ * @name mapValuesLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.mapValues]{@link module:Collections.mapValues}
+ * @category Collection
+ * @param {Object} obj - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {Function} iteratee - A function to apply to each value in `obj`.
+ * The iteratee is passed a `callback(err, transformed)` which must be called
+ * once it has completed with an error (which can be `null`) and a
+ * transformed value. Invoked with (value, key, callback).
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
+ * functions have finished, or an error occurs. `result` is a new object consisting
+ * of each key from `obj`, with each transformed value on the right-hand side.
+ * Invoked with (err, result).
+ */
+function mapValuesLimit(obj, limit, iteratee, callback) {
+ callback = (0, _once2.default)(callback || _noop2.default);
+ var newObj = {};
+ (0, _eachOfLimit2.default)(obj, limit, function (val, key, next) {
+ iteratee(val, key, function (err, result) {
+ if (err) return next(err);
+ newObj[key] = result;
+ next();
+ });
+ }, function (err) {
+ callback(err, newObj);
+ });
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/mapValuesSeries.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/mapValuesSeries.js
new file mode 100644
index 0000000..6385719
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/mapValuesSeries.js
@@ -0,0 +1,37 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _mapValuesLimit = require('./mapValuesLimit');
+
+var _mapValuesLimit2 = _interopRequireDefault(_mapValuesLimit);
+
+var _doLimit = require('./internal/doLimit');
+
+var _doLimit2 = _interopRequireDefault(_doLimit);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time.
+ *
+ * @name mapValuesSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.mapValues]{@link module:Collections.mapValues}
+ * @category Collection
+ * @param {Object} obj - A collection to iterate over.
+ * @param {Function} iteratee - A function to apply to each value in `obj`.
+ * The iteratee is passed a `callback(err, transformed)` which must be called
+ * once it has completed with an error (which can be `null`) and a
+ * transformed value. Invoked with (value, key, callback).
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
+ * functions have finished, or an error occurs. `result` is a new object consisting
+ * of each key from `obj`, with each transformed value on the right-hand side.
+ * Invoked with (err, result).
+ */
+exports.default = (0, _doLimit2.default)(_mapValuesLimit2.default, 1);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/memoize.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/memoize.js
new file mode 100644
index 0000000..4c757ab
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/memoize.js
@@ -0,0 +1,95 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = memoize;
+
+var _identity = require('lodash/identity');
+
+var _identity2 = _interopRequireDefault(_identity);
+
+var _baseRest = require('lodash/_baseRest');
+
+var _baseRest2 = _interopRequireDefault(_baseRest);
+
+var _setImmediate = require('./internal/setImmediate');
+
+var _setImmediate2 = _interopRequireDefault(_setImmediate);
+
+var _initialParams = require('./internal/initialParams');
+
+var _initialParams2 = _interopRequireDefault(_initialParams);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function has(obj, key) {
+ return key in obj;
+}
+
+/**
+ * Caches the results of an `async` function. When creating a hash to store
+ * function results against, the callback is omitted from the hash and an
+ * optional hash function can be used.
+ *
+ * If no hash function is specified, the first argument is used as a hash key,
+ * which may work reasonably if it is a string or a data type that converts to a
+ * distinct string. Note that objects and arrays will not behave reasonably.
+ * Neither will cases where the other arguments are significant. In such cases,
+ * specify your own hash function.
+ *
+ * The cache of results is exposed as the `memo` property of the function
+ * returned by `memoize`.
+ *
+ * @name memoize
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @category Util
+ * @param {Function} fn - The function to proxy and cache results from.
+ * @param {Function} hasher - An optional function for generating a custom hash
+ * for storing results. It has all the arguments applied to it apart from the
+ * callback, and must be synchronous.
+ * @returns {Function} a memoized version of `fn`
+ * @example
+ *
+ * var slow_fn = function(name, callback) {
+ * // do something
+ * callback(null, result);
+ * };
+ * var fn = async.memoize(slow_fn);
+ *
+ * // fn can now be used as if it were slow_fn
+ * fn('some name', function() {
+ * // callback
+ * });
+ */
+function memoize(fn, hasher) {
+ var memo = Object.create(null);
+ var queues = Object.create(null);
+ hasher = hasher || _identity2.default;
+ var memoized = (0, _initialParams2.default)(function memoized(args, callback) {
+ var key = hasher.apply(null, args);
+ if (has(memo, key)) {
+ (0, _setImmediate2.default)(function () {
+ callback.apply(null, memo[key]);
+ });
+ } else if (has(queues, key)) {
+ queues[key].push(callback);
+ } else {
+ queues[key] = [callback];
+ fn.apply(null, args.concat([(0, _baseRest2.default)(function (args) {
+ memo[key] = args;
+ var q = queues[key];
+ delete queues[key];
+ for (var i = 0, l = q.length; i < l; i++) {
+ q[i].apply(null, args);
+ }
+ })]));
+ }
+ });
+ memoized.memo = memo;
+ memoized.unmemoized = fn;
+ return memoized;
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/nextTick.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/nextTick.js
new file mode 100644
index 0000000..fa48e32
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/nextTick.js
@@ -0,0 +1,51 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _setImmediate = require('./internal/setImmediate');
+
+/**
+ * Calls `callback` on a later loop around the event loop. In Node.js this just
+ * calls `setImmediate`. In the browser it will use `setImmediate` if
+ * available, otherwise `setTimeout(callback, 0)`, which means other higher
+ * priority events may precede the execution of `callback`.
+ *
+ * This is used internally for browser-compatibility purposes.
+ *
+ * @name nextTick
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @alias setImmediate
+ * @category Util
+ * @param {Function} callback - The function to call on a later loop around
+ * the event loop. Invoked with (args...).
+ * @param {...*} args... - any number of additional arguments to pass to the
+ * callback on the next tick.
+ * @example
+ *
+ * var call_order = [];
+ * async.nextTick(function() {
+ * call_order.push('two');
+ * // call_order now equals ['one','two']
+ * });
+ * call_order.push('one');
+ *
+ * async.setImmediate(function (a, b, c) {
+ * // a, b, and c equal 1, 2, and 3
+ * }, 1, 2, 3);
+ */
+var _defer;
+
+if (_setImmediate.hasNextTick) {
+ _defer = process.nextTick;
+} else if (_setImmediate.hasSetImmediate) {
+ _defer = setImmediate;
+} else {
+ _defer = _setImmediate.fallback;
+}
+
+exports.default = (0, _setImmediate.wrap)(_defer);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/LICENSE
new file mode 100644
index 0000000..c6f2f61
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/LICENSE
@@ -0,0 +1,47 @@
+Copyright JS Foundation and other contributors <https://js.foundation/>
+
+Based on Underscore.js, copyright Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/README.md
new file mode 100644
index 0000000..382e740
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/README.md
@@ -0,0 +1,39 @@
+# lodash v4.17.2
+
+The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules.
+
+## Installation
+
+Using npm:
+```shell
+$ npm i -g npm
+$ npm i --save lodash
+```
+
+In Node.js:
+```js
+// Load the full build.
+var _ = require('lodash');
+// Load the core build.
+var _ = require('lodash/core');
+// Load the FP build for immutable auto-curried iteratee-first data-last methods.
+var fp = require('lodash/fp');
+
+// Load method categories.
+var array = require('lodash/array');
+var object = require('lodash/fp/object');
+
+// Cherry-pick methods for smaller browserify/rollup/webpack bundles.
+var at = require('lodash/at');
+var curryN = require('lodash/fp/curryN');
+```
+
+See the [package source](https://github.com/lodash/lodash/tree/4.17.2-npm) for more details.
+
+**Note:**<br>
+Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL.
+
+## Support
+
+Tested in Chrome 53-54, Firefox 48-49, IE 11, Edge 14, Safari 9-10, Node.js 6-7, & PhantomJS 2.1.1.<br>
+Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_DataView.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_DataView.js
new file mode 100644
index 0000000..ac2d57c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_DataView.js
@@ -0,0 +1,7 @@
+var getNative = require('./_getNative'),
+ root = require('./_root');
+
+/* Built-in method references that are verified to be native. */
+var DataView = getNative(root, 'DataView');
+
+module.exports = DataView;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Hash.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Hash.js
new file mode 100644
index 0000000..b504fe3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Hash.js
@@ -0,0 +1,32 @@
+var hashClear = require('./_hashClear'),
+ hashDelete = require('./_hashDelete'),
+ hashGet = require('./_hashGet'),
+ hashHas = require('./_hashHas'),
+ hashSet = require('./_hashSet');
+
+/**
+ * Creates a hash object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function Hash(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
+
+// Add methods to `Hash`.
+Hash.prototype.clear = hashClear;
+Hash.prototype['delete'] = hashDelete;
+Hash.prototype.get = hashGet;
+Hash.prototype.has = hashHas;
+Hash.prototype.set = hashSet;
+
+module.exports = Hash;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_LazyWrapper.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_LazyWrapper.js
new file mode 100644
index 0000000..81786c7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_LazyWrapper.js
@@ -0,0 +1,28 @@
+var baseCreate = require('./_baseCreate'),
+ baseLodash = require('./_baseLodash');
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295;
+
+/**
+ * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
+ *
+ * @private
+ * @constructor
+ * @param {*} value The value to wrap.
+ */
+function LazyWrapper(value) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__dir__ = 1;
+ this.__filtered__ = false;
+ this.__iteratees__ = [];
+ this.__takeCount__ = MAX_ARRAY_LENGTH;
+ this.__views__ = [];
+}
+
+// Ensure `LazyWrapper` is an instance of `baseLodash`.
+LazyWrapper.prototype = baseCreate(baseLodash.prototype);
+LazyWrapper.prototype.constructor = LazyWrapper;
+
+module.exports = LazyWrapper;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_ListCache.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_ListCache.js
new file mode 100644
index 0000000..26895c3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_ListCache.js
@@ -0,0 +1,32 @@
+var listCacheClear = require('./_listCacheClear'),
+ listCacheDelete = require('./_listCacheDelete'),
+ listCacheGet = require('./_listCacheGet'),
+ listCacheHas = require('./_listCacheHas'),
+ listCacheSet = require('./_listCacheSet');
+
+/**
+ * Creates an list cache object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function ListCache(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
+
+// Add methods to `ListCache`.
+ListCache.prototype.clear = listCacheClear;
+ListCache.prototype['delete'] = listCacheDelete;
+ListCache.prototype.get = listCacheGet;
+ListCache.prototype.has = listCacheHas;
+ListCache.prototype.set = listCacheSet;
+
+module.exports = ListCache;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_LodashWrapper.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_LodashWrapper.js
new file mode 100644
index 0000000..c1e4d9d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_LodashWrapper.js
@@ -0,0 +1,22 @@
+var baseCreate = require('./_baseCreate'),
+ baseLodash = require('./_baseLodash');
+
+/**
+ * The base constructor for creating `lodash` wrapper objects.
+ *
+ * @private
+ * @param {*} value The value to wrap.
+ * @param {boolean} [chainAll] Enable explicit method chain sequences.
+ */
+function LodashWrapper(value, chainAll) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__chain__ = !!chainAll;
+ this.__index__ = 0;
+ this.__values__ = undefined;
+}
+
+LodashWrapper.prototype = baseCreate(baseLodash.prototype);
+LodashWrapper.prototype.constructor = LodashWrapper;
+
+module.exports = LodashWrapper;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Map.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Map.js
new file mode 100644
index 0000000..b73f29a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Map.js
@@ -0,0 +1,7 @@
+var getNative = require('./_getNative'),
+ root = require('./_root');
+
+/* Built-in method references that are verified to be native. */
+var Map = getNative(root, 'Map');
+
+module.exports = Map;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_MapCache.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_MapCache.js
new file mode 100644
index 0000000..4a4eea7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_MapCache.js
@@ -0,0 +1,32 @@
+var mapCacheClear = require('./_mapCacheClear'),
+ mapCacheDelete = require('./_mapCacheDelete'),
+ mapCacheGet = require('./_mapCacheGet'),
+ mapCacheHas = require('./_mapCacheHas'),
+ mapCacheSet = require('./_mapCacheSet');
+
+/**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function MapCache(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
+
+// Add methods to `MapCache`.
+MapCache.prototype.clear = mapCacheClear;
+MapCache.prototype['delete'] = mapCacheDelete;
+MapCache.prototype.get = mapCacheGet;
+MapCache.prototype.has = mapCacheHas;
+MapCache.prototype.set = mapCacheSet;
+
+module.exports = MapCache;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Promise.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Promise.js
new file mode 100644
index 0000000..247b9e1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Promise.js
@@ -0,0 +1,7 @@
+var getNative = require('./_getNative'),
+ root = require('./_root');
+
+/* Built-in method references that are verified to be native. */
+var Promise = getNative(root, 'Promise');
+
+module.exports = Promise;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Set.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Set.js
new file mode 100644
index 0000000..b3c8dcb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Set.js
@@ -0,0 +1,7 @@
+var getNative = require('./_getNative'),
+ root = require('./_root');
+
+/* Built-in method references that are verified to be native. */
+var Set = getNative(root, 'Set');
+
+module.exports = Set;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_SetCache.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_SetCache.js
new file mode 100644
index 0000000..6468b06
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_SetCache.js
@@ -0,0 +1,27 @@
+var MapCache = require('./_MapCache'),
+ setCacheAdd = require('./_setCacheAdd'),
+ setCacheHas = require('./_setCacheHas');
+
+/**
+ *
+ * Creates an array cache object to store unique values.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+function SetCache(values) {
+ var index = -1,
+ length = values == null ? 0 : values.length;
+
+ this.__data__ = new MapCache;
+ while (++index < length) {
+ this.add(values[index]);
+ }
+}
+
+// Add methods to `SetCache`.
+SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
+SetCache.prototype.has = setCacheHas;
+
+module.exports = SetCache;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Stack.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Stack.js
new file mode 100644
index 0000000..80b2cf1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Stack.js
@@ -0,0 +1,27 @@
+var ListCache = require('./_ListCache'),
+ stackClear = require('./_stackClear'),
+ stackDelete = require('./_stackDelete'),
+ stackGet = require('./_stackGet'),
+ stackHas = require('./_stackHas'),
+ stackSet = require('./_stackSet');
+
+/**
+ * Creates a stack cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function Stack(entries) {
+ var data = this.__data__ = new ListCache(entries);
+ this.size = data.size;
+}
+
+// Add methods to `Stack`.
+Stack.prototype.clear = stackClear;
+Stack.prototype['delete'] = stackDelete;
+Stack.prototype.get = stackGet;
+Stack.prototype.has = stackHas;
+Stack.prototype.set = stackSet;
+
+module.exports = Stack;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Symbol.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Symbol.js
new file mode 100644
index 0000000..a013f7c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Symbol.js
@@ -0,0 +1,6 @@
+var root = require('./_root');
+
+/** Built-in value references. */
+var Symbol = root.Symbol;
+
+module.exports = Symbol;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Uint8Array.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Uint8Array.js
new file mode 100644
index 0000000..2fb30e1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_Uint8Array.js
@@ -0,0 +1,6 @@
+var root = require('./_root');
+
+/** Built-in value references. */
+var Uint8Array = root.Uint8Array;
+
+module.exports = Uint8Array;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_WeakMap.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_WeakMap.js
new file mode 100644
index 0000000..567f86c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_WeakMap.js
@@ -0,0 +1,7 @@
+var getNative = require('./_getNative'),
+ root = require('./_root');
+
+/* Built-in method references that are verified to be native. */
+var WeakMap = getNative(root, 'WeakMap');
+
+module.exports = WeakMap;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_addMapEntry.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_addMapEntry.js
new file mode 100644
index 0000000..5a69212
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_addMapEntry.js
@@ -0,0 +1,15 @@
+/**
+ * Adds the key-value `pair` to `map`.
+ *
+ * @private
+ * @param {Object} map The map to modify.
+ * @param {Array} pair The key-value pair to add.
+ * @returns {Object} Returns `map`.
+ */
+function addMapEntry(map, pair) {
+ // Don't return `map.set` because it's not chainable in IE 11.
+ map.set(pair[0], pair[1]);
+ return map;
+}
+
+module.exports = addMapEntry;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_addSetEntry.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_addSetEntry.js
new file mode 100644
index 0000000..1a07b70
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_addSetEntry.js
@@ -0,0 +1,15 @@
+/**
+ * Adds `value` to `set`.
+ *
+ * @private
+ * @param {Object} set The set to modify.
+ * @param {*} value The value to add.
+ * @returns {Object} Returns `set`.
+ */
+function addSetEntry(set, value) {
+ // Don't return `set.add` because it's not chainable in IE 11.
+ set.add(value);
+ return set;
+}
+
+module.exports = addSetEntry;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_apply.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_apply.js
new file mode 100644
index 0000000..36436dd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_apply.js
@@ -0,0 +1,21 @@
+/**
+ * A faster alternative to `Function#apply`, this function invokes `func`
+ * with the `this` binding of `thisArg` and the arguments of `args`.
+ *
+ * @private
+ * @param {Function} func The function to invoke.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} args The arguments to invoke `func` with.
+ * @returns {*} Returns the result of `func`.
+ */
+function apply(func, thisArg, args) {
+ switch (args.length) {
+ case 0: return func.call(thisArg);
+ case 1: return func.call(thisArg, args[0]);
+ case 2: return func.call(thisArg, args[0], args[1]);
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
+ }
+ return func.apply(thisArg, args);
+}
+
+module.exports = apply;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayAggregator.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayAggregator.js
new file mode 100644
index 0000000..d96c3ca
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayAggregator.js
@@ -0,0 +1,22 @@
+/**
+ * A specialized version of `baseAggregator` for arrays.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform keys.
+ * @param {Object} accumulator The initial aggregated object.
+ * @returns {Function} Returns `accumulator`.
+ */
+function arrayAggregator(array, setter, iteratee, accumulator) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ var value = array[index];
+ setter(accumulator, value, iteratee(value), array);
+ }
+ return accumulator;
+}
+
+module.exports = arrayAggregator;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayEach.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayEach.js
new file mode 100644
index 0000000..2c5f579
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayEach.js
@@ -0,0 +1,22 @@
+/**
+ * A specialized version of `_.forEach` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+function arrayEach(array, iteratee) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (iteratee(array[index], index, array) === false) {
+ break;
+ }
+ }
+ return array;
+}
+
+module.exports = arrayEach;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayEachRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayEachRight.js
new file mode 100644
index 0000000..976ca5c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayEachRight.js
@@ -0,0 +1,21 @@
+/**
+ * A specialized version of `_.forEachRight` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+function arrayEachRight(array, iteratee) {
+ var length = array == null ? 0 : array.length;
+
+ while (length--) {
+ if (iteratee(array[length], length, array) === false) {
+ break;
+ }
+ }
+ return array;
+}
+
+module.exports = arrayEachRight;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayEvery.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayEvery.js
new file mode 100644
index 0000000..e26a918
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayEvery.js
@@ -0,0 +1,23 @@
+/**
+ * A specialized version of `_.every` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ */
+function arrayEvery(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (!predicate(array[index], index, array)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+module.exports = arrayEvery;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayFilter.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayFilter.js
new file mode 100644
index 0000000..75ea254
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayFilter.js
@@ -0,0 +1,25 @@
+/**
+ * A specialized version of `_.filter` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+function arrayFilter(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+}
+
+module.exports = arrayFilter;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayIncludes.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayIncludes.js
new file mode 100644
index 0000000..3737a6d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayIncludes.js
@@ -0,0 +1,17 @@
+var baseIndexOf = require('./_baseIndexOf');
+
+/**
+ * A specialized version of `_.includes` for arrays without support for
+ * specifying an index to search from.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+function arrayIncludes(array, value) {
+ var length = array == null ? 0 : array.length;
+ return !!length && baseIndexOf(array, value, 0) > -1;
+}
+
+module.exports = arrayIncludes;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayIncludesWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayIncludesWith.js
new file mode 100644
index 0000000..235fd97
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayIncludesWith.js
@@ -0,0 +1,22 @@
+/**
+ * This function is like `arrayIncludes` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+function arrayIncludesWith(array, value, comparator) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (comparator(value, array[index])) {
+ return true;
+ }
+ }
+ return false;
+}
+
+module.exports = arrayIncludesWith;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayLikeKeys.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayLikeKeys.js
new file mode 100644
index 0000000..b2ec9ce
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayLikeKeys.js
@@ -0,0 +1,49 @@
+var baseTimes = require('./_baseTimes'),
+ isArguments = require('./isArguments'),
+ isArray = require('./isArray'),
+ isBuffer = require('./isBuffer'),
+ isIndex = require('./_isIndex'),
+ isTypedArray = require('./isTypedArray');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Creates an array of the enumerable property names of the array-like `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @param {boolean} inherited Specify returning inherited property names.
+ * @returns {Array} Returns the array of property names.
+ */
+function arrayLikeKeys(value, inherited) {
+ var isArr = isArray(value),
+ isArg = !isArr && isArguments(value),
+ isBuff = !isArr && !isArg && isBuffer(value),
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
+ skipIndexes = isArr || isArg || isBuff || isType,
+ result = skipIndexes ? baseTimes(value.length, String) : [],
+ length = result.length;
+
+ for (var key in value) {
+ if ((inherited || hasOwnProperty.call(value, key)) &&
+ !(skipIndexes && (
+ // Safari 9 has enumerable `arguments.length` in strict mode.
+ key == 'length' ||
+ // Node.js 0.10 has enumerable non-index properties on buffers.
+ (isBuff && (key == 'offset' || key == 'parent')) ||
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
+ // Skip index properties.
+ isIndex(key, length)
+ ))) {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+module.exports = arrayLikeKeys;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayMap.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayMap.js
new file mode 100644
index 0000000..22b2246
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayMap.js
@@ -0,0 +1,21 @@
+/**
+ * A specialized version of `_.map` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+function arrayMap(array, iteratee) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
+ }
+ return result;
+}
+
+module.exports = arrayMap;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayPush.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayPush.js
new file mode 100644
index 0000000..7d742b3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayPush.js
@@ -0,0 +1,20 @@
+/**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+function arrayPush(array, values) {
+ var index = -1,
+ length = values.length,
+ offset = array.length;
+
+ while (++index < length) {
+ array[offset + index] = values[index];
+ }
+ return array;
+}
+
+module.exports = arrayPush;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayReduce.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayReduce.js
new file mode 100644
index 0000000..de8b79b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayReduce.js
@@ -0,0 +1,26 @@
+/**
+ * A specialized version of `_.reduce` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+function arrayReduce(array, iteratee, accumulator, initAccum) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ if (initAccum && length) {
+ accumulator = array[++index];
+ }
+ while (++index < length) {
+ accumulator = iteratee(accumulator, array[index], index, array);
+ }
+ return accumulator;
+}
+
+module.exports = arrayReduce;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayReduceRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayReduceRight.js
new file mode 100644
index 0000000..22d8976
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayReduceRight.js
@@ -0,0 +1,24 @@
+/**
+ * A specialized version of `_.reduceRight` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the last element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+function arrayReduceRight(array, iteratee, accumulator, initAccum) {
+ var length = array == null ? 0 : array.length;
+ if (initAccum && length) {
+ accumulator = array[--length];
+ }
+ while (length--) {
+ accumulator = iteratee(accumulator, array[length], length, array);
+ }
+ return accumulator;
+}
+
+module.exports = arrayReduceRight;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arraySample.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arraySample.js
new file mode 100644
index 0000000..fcab010
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arraySample.js
@@ -0,0 +1,15 @@
+var baseRandom = require('./_baseRandom');
+
+/**
+ * A specialized version of `_.sample` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to sample.
+ * @returns {*} Returns the random element.
+ */
+function arraySample(array) {
+ var length = array.length;
+ return length ? array[baseRandom(0, length - 1)] : undefined;
+}
+
+module.exports = arraySample;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arraySampleSize.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arraySampleSize.js
new file mode 100644
index 0000000..8c7e364
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arraySampleSize.js
@@ -0,0 +1,17 @@
+var baseClamp = require('./_baseClamp'),
+ copyArray = require('./_copyArray'),
+ shuffleSelf = require('./_shuffleSelf');
+
+/**
+ * A specialized version of `_.sampleSize` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to sample.
+ * @param {number} n The number of elements to sample.
+ * @returns {Array} Returns the random elements.
+ */
+function arraySampleSize(array, n) {
+ return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
+}
+
+module.exports = arraySampleSize;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayShuffle.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayShuffle.js
new file mode 100644
index 0000000..46313a3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arrayShuffle.js
@@ -0,0 +1,15 @@
+var copyArray = require('./_copyArray'),
+ shuffleSelf = require('./_shuffleSelf');
+
+/**
+ * A specialized version of `_.shuffle` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ */
+function arrayShuffle(array) {
+ return shuffleSelf(copyArray(array));
+}
+
+module.exports = arrayShuffle;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arraySome.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arraySome.js
new file mode 100644
index 0000000..6fd02fd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_arraySome.js
@@ -0,0 +1,23 @@
+/**
+ * A specialized version of `_.some` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+function arraySome(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (predicate(array[index], index, array)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+module.exports = arraySome;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_asciiSize.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_asciiSize.js
new file mode 100644
index 0000000..11d29c3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_asciiSize.js
@@ -0,0 +1,12 @@
+var baseProperty = require('./_baseProperty');
+
+/**
+ * Gets the size of an ASCII `string`.
+ *
+ * @private
+ * @param {string} string The string inspect.
+ * @returns {number} Returns the string size.
+ */
+var asciiSize = baseProperty('length');
+
+module.exports = asciiSize;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_asciiToArray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_asciiToArray.js
new file mode 100644
index 0000000..8e3dd5b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_asciiToArray.js
@@ -0,0 +1,12 @@
+/**
+ * Converts an ASCII `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+function asciiToArray(string) {
+ return string.split('');
+}
+
+module.exports = asciiToArray;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_asciiWords.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_asciiWords.js
new file mode 100644
index 0000000..d765f0f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_asciiWords.js
@@ -0,0 +1,15 @@
+/** Used to match words composed of alphanumeric characters. */
+var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
+
+/**
+ * Splits an ASCII `string` into an array of its words.
+ *
+ * @private
+ * @param {string} The string to inspect.
+ * @returns {Array} Returns the words of `string`.
+ */
+function asciiWords(string) {
+ return string.match(reAsciiWord) || [];
+}
+
+module.exports = asciiWords;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_assignInDefaults.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_assignInDefaults.js
new file mode 100644
index 0000000..ea6b0e3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_assignInDefaults.js
@@ -0,0 +1,27 @@
+var eq = require('./eq');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used by `_.defaults` to customize its `_.assignIn` use.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to assign.
+ * @param {Object} object The parent object of `objValue`.
+ * @returns {*} Returns the value to assign.
+ */
+function assignInDefaults(objValue, srcValue, key, object) {
+ if (objValue === undefined ||
+ (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ return srcValue;
+ }
+ return objValue;
+}
+
+module.exports = assignInDefaults;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_assignMergeValue.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_assignMergeValue.js
new file mode 100644
index 0000000..cb1185e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_assignMergeValue.js
@@ -0,0 +1,20 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ eq = require('./eq');
+
+/**
+ * This function is like `assignValue` except that it doesn't assign
+ * `undefined` values.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+function assignMergeValue(object, key, value) {
+ if ((value !== undefined && !eq(object[key], value)) ||
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
+ }
+}
+
+module.exports = assignMergeValue;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_assignValue.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_assignValue.js
new file mode 100644
index 0000000..4083957
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_assignValue.js
@@ -0,0 +1,28 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ eq = require('./eq');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+function assignValue(object, key, value) {
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
+ }
+}
+
+module.exports = assignValue;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_assocIndexOf.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_assocIndexOf.js
new file mode 100644
index 0000000..5b77a2b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_assocIndexOf.js
@@ -0,0 +1,21 @@
+var eq = require('./eq');
+
+/**
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
+ }
+ }
+ return -1;
+}
+
+module.exports = assocIndexOf;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseAggregator.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseAggregator.js
new file mode 100644
index 0000000..4bc9e91
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseAggregator.js
@@ -0,0 +1,21 @@
+var baseEach = require('./_baseEach');
+
+/**
+ * Aggregates elements of `collection` on `accumulator` with keys transformed
+ * by `iteratee` and values set by `setter`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform keys.
+ * @param {Object} accumulator The initial aggregated object.
+ * @returns {Function} Returns `accumulator`.
+ */
+function baseAggregator(collection, setter, iteratee, accumulator) {
+ baseEach(collection, function(value, key, collection) {
+ setter(accumulator, value, iteratee(value), collection);
+ });
+ return accumulator;
+}
+
+module.exports = baseAggregator;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseAssign.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseAssign.js
new file mode 100644
index 0000000..e5c4a1a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseAssign.js
@@ -0,0 +1,17 @@
+var copyObject = require('./_copyObject'),
+ keys = require('./keys');
+
+/**
+ * The base implementation of `_.assign` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+function baseAssign(object, source) {
+ return object && copyObject(source, keys(source), object);
+}
+
+module.exports = baseAssign;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseAssignIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseAssignIn.js
new file mode 100644
index 0000000..6624f90
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseAssignIn.js
@@ -0,0 +1,17 @@
+var copyObject = require('./_copyObject'),
+ keysIn = require('./keysIn');
+
+/**
+ * The base implementation of `_.assignIn` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+function baseAssignIn(object, source) {
+ return object && copyObject(source, keysIn(source), object);
+}
+
+module.exports = baseAssignIn;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseAssignValue.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseAssignValue.js
new file mode 100644
index 0000000..d6f66ef
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseAssignValue.js
@@ -0,0 +1,25 @@
+var defineProperty = require('./_defineProperty');
+
+/**
+ * The base implementation of `assignValue` and `assignMergeValue` without
+ * value checks.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+function baseAssignValue(object, key, value) {
+ if (key == '__proto__' && defineProperty) {
+ defineProperty(object, key, {
+ 'configurable': true,
+ 'enumerable': true,
+ 'value': value,
+ 'writable': true
+ });
+ } else {
+ object[key] = value;
+ }
+}
+
+module.exports = baseAssignValue;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseAt.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseAt.js
new file mode 100644
index 0000000..90e4237
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseAt.js
@@ -0,0 +1,23 @@
+var get = require('./get');
+
+/**
+ * The base implementation of `_.at` without support for individual paths.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {string[]} paths The property paths to pick.
+ * @returns {Array} Returns the picked elements.
+ */
+function baseAt(object, paths) {
+ var index = -1,
+ length = paths.length,
+ result = Array(length),
+ skip = object == null;
+
+ while (++index < length) {
+ result[index] = skip ? undefined : get(object, paths[index]);
+ }
+ return result;
+}
+
+module.exports = baseAt;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseClamp.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseClamp.js
new file mode 100644
index 0000000..a1c5692
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseClamp.js
@@ -0,0 +1,22 @@
+/**
+ * The base implementation of `_.clamp` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {number} number The number to clamp.
+ * @param {number} [lower] The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the clamped number.
+ */
+function baseClamp(number, lower, upper) {
+ if (number === number) {
+ if (upper !== undefined) {
+ number = number <= upper ? number : upper;
+ }
+ if (lower !== undefined) {
+ number = number >= lower ? number : lower;
+ }
+ }
+ return number;
+}
+
+module.exports = baseClamp;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseClone.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseClone.js
new file mode 100644
index 0000000..7c27a37
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseClone.js
@@ -0,0 +1,153 @@
+var Stack = require('./_Stack'),
+ arrayEach = require('./_arrayEach'),
+ assignValue = require('./_assignValue'),
+ baseAssign = require('./_baseAssign'),
+ baseAssignIn = require('./_baseAssignIn'),
+ cloneBuffer = require('./_cloneBuffer'),
+ copyArray = require('./_copyArray'),
+ copySymbols = require('./_copySymbols'),
+ copySymbolsIn = require('./_copySymbolsIn'),
+ getAllKeys = require('./_getAllKeys'),
+ getAllKeysIn = require('./_getAllKeysIn'),
+ getTag = require('./_getTag'),
+ initCloneArray = require('./_initCloneArray'),
+ initCloneByTag = require('./_initCloneByTag'),
+ initCloneObject = require('./_initCloneObject'),
+ isArray = require('./isArray'),
+ isBuffer = require('./isBuffer'),
+ isObject = require('./isObject'),
+ keys = require('./keys');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1,
+ CLONE_FLAT_FLAG = 2,
+ CLONE_SYMBOLS_FLAG = 4;
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]',
+ weakMapTag = '[object WeakMap]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+/** Used to identify `toStringTag` values supported by `_.clone`. */
+var cloneableTags = {};
+cloneableTags[argsTag] = cloneableTags[arrayTag] =
+cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
+cloneableTags[boolTag] = cloneableTags[dateTag] =
+cloneableTags[float32Tag] = cloneableTags[float64Tag] =
+cloneableTags[int8Tag] = cloneableTags[int16Tag] =
+cloneableTags[int32Tag] = cloneableTags[mapTag] =
+cloneableTags[numberTag] = cloneableTags[objectTag] =
+cloneableTags[regexpTag] = cloneableTags[setTag] =
+cloneableTags[stringTag] = cloneableTags[symbolTag] =
+cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
+cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+cloneableTags[errorTag] = cloneableTags[funcTag] =
+cloneableTags[weakMapTag] = false;
+
+/**
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
+ * traversed objects.
+ *
+ * @private
+ * @param {*} value The value to clone.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Deep clone
+ * 2 - Flatten inherited properties
+ * 4 - Clone symbols
+ * @param {Function} [customizer] The function to customize cloning.
+ * @param {string} [key] The key of `value`.
+ * @param {Object} [object] The parent object of `value`.
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
+ * @returns {*} Returns the cloned value.
+ */
+function baseClone(value, bitmask, customizer, key, object, stack) {
+ var result,
+ isDeep = bitmask & CLONE_DEEP_FLAG,
+ isFlat = bitmask & CLONE_FLAT_FLAG,
+ isFull = bitmask & CLONE_SYMBOLS_FLAG;
+
+ if (customizer) {
+ result = object ? customizer(value, key, object, stack) : customizer(value);
+ }
+ if (result !== undefined) {
+ return result;
+ }
+ if (!isObject(value)) {
+ return value;
+ }
+ var isArr = isArray(value);
+ if (isArr) {
+ result = initCloneArray(value);
+ if (!isDeep) {
+ return copyArray(value, result);
+ }
+ } else {
+ var tag = getTag(value),
+ isFunc = tag == funcTag || tag == genTag;
+
+ if (isBuffer(value)) {
+ return cloneBuffer(value, isDeep);
+ }
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+ result = (isFlat || isFunc) ? {} : initCloneObject(value);
+ if (!isDeep) {
+ return isFlat
+ ? copySymbolsIn(value, baseAssignIn(result, value))
+ : copySymbols(value, baseAssign(result, value));
+ }
+ } else {
+ if (!cloneableTags[tag]) {
+ return object ? value : {};
+ }
+ result = initCloneByTag(value, tag, baseClone, isDeep);
+ }
+ }
+ // Check for circular references and return its corresponding clone.
+ stack || (stack = new Stack);
+ var stacked = stack.get(value);
+ if (stacked) {
+ return stacked;
+ }
+ stack.set(value, result);
+
+ var keysFunc = isFull
+ ? (isFlat ? getAllKeysIn : getAllKeys)
+ : (isFlat ? keysIn : keys);
+
+ var props = isArr ? undefined : keysFunc(value);
+ arrayEach(props || value, function(subValue, key) {
+ if (props) {
+ key = subValue;
+ subValue = value[key];
+ }
+ // Recursively populate clone (susceptible to call stack limits).
+ assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+ return result;
+}
+
+module.exports = baseClone;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseConforms.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseConforms.js
new file mode 100644
index 0000000..947e20d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseConforms.js
@@ -0,0 +1,18 @@
+var baseConformsTo = require('./_baseConformsTo'),
+ keys = require('./keys');
+
+/**
+ * The base implementation of `_.conforms` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {Function} Returns the new spec function.
+ */
+function baseConforms(source) {
+ var props = keys(source);
+ return function(object) {
+ return baseConformsTo(object, source, props);
+ };
+}
+
+module.exports = baseConforms;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseConformsTo.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseConformsTo.js
new file mode 100644
index 0000000..e449cb8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseConformsTo.js
@@ -0,0 +1,27 @@
+/**
+ * The base implementation of `_.conformsTo` which accepts `props` to check.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {boolean} Returns `true` if `object` conforms, else `false`.
+ */
+function baseConformsTo(object, source, props) {
+ var length = props.length;
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (length--) {
+ var key = props[length],
+ predicate = source[key],
+ value = object[key];
+
+ if ((value === undefined && !(key in object)) || !predicate(value)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+module.exports = baseConformsTo;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseCreate.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseCreate.js
new file mode 100644
index 0000000..ffa6a52
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseCreate.js
@@ -0,0 +1,30 @@
+var isObject = require('./isObject');
+
+/** Built-in value references. */
+var objectCreate = Object.create;
+
+/**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} proto The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+var baseCreate = (function() {
+ function object() {}
+ return function(proto) {
+ if (!isObject(proto)) {
+ return {};
+ }
+ if (objectCreate) {
+ return objectCreate(proto);
+ }
+ object.prototype = proto;
+ var result = new object;
+ object.prototype = undefined;
+ return result;
+ };
+}());
+
+module.exports = baseCreate;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseDelay.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseDelay.js
new file mode 100644
index 0000000..1486d69
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseDelay.js
@@ -0,0 +1,21 @@
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * The base implementation of `_.delay` and `_.defer` which accepts `args`
+ * to provide to `func`.
+ *
+ * @private
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {Array} args The arguments to provide to `func`.
+ * @returns {number|Object} Returns the timer id or timeout object.
+ */
+function baseDelay(func, wait, args) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return setTimeout(function() { func.apply(undefined, args); }, wait);
+}
+
+module.exports = baseDelay;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseDifference.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseDifference.js
new file mode 100644
index 0000000..343ac19
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseDifference.js
@@ -0,0 +1,67 @@
+var SetCache = require('./_SetCache'),
+ arrayIncludes = require('./_arrayIncludes'),
+ arrayIncludesWith = require('./_arrayIncludesWith'),
+ arrayMap = require('./_arrayMap'),
+ baseUnary = require('./_baseUnary'),
+ cacheHas = require('./_cacheHas');
+
+/** Used as the size to enable large array optimizations. */
+var LARGE_ARRAY_SIZE = 200;
+
+/**
+ * The base implementation of methods like `_.difference` without support
+ * for excluding multiple arrays or iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Array} values The values to exclude.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ */
+function baseDifference(array, values, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ isCommon = true,
+ length = array.length,
+ result = [],
+ valuesLength = values.length;
+
+ if (!length) {
+ return result;
+ }
+ if (iteratee) {
+ values = arrayMap(values, baseUnary(iteratee));
+ }
+ if (comparator) {
+ includes = arrayIncludesWith;
+ isCommon = false;
+ }
+ else if (values.length >= LARGE_ARRAY_SIZE) {
+ includes = cacheHas;
+ isCommon = false;
+ values = new SetCache(values);
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee == null ? value : iteratee(value);
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var valuesIndex = valuesLength;
+ while (valuesIndex--) {
+ if (values[valuesIndex] === computed) {
+ continue outer;
+ }
+ }
+ result.push(value);
+ }
+ else if (!includes(values, computed, comparator)) {
+ result.push(value);
+ }
+ }
+ return result;
+}
+
+module.exports = baseDifference;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseEach.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseEach.js
new file mode 100644
index 0000000..512c067
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseEach.js
@@ -0,0 +1,14 @@
+var baseForOwn = require('./_baseForOwn'),
+ createBaseEach = require('./_createBaseEach');
+
+/**
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+var baseEach = createBaseEach(baseForOwn);
+
+module.exports = baseEach;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseEachRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseEachRight.js
new file mode 100644
index 0000000..0a8feec
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseEachRight.js
@@ -0,0 +1,14 @@
+var baseForOwnRight = require('./_baseForOwnRight'),
+ createBaseEach = require('./_createBaseEach');
+
+/**
+ * The base implementation of `_.forEachRight` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+var baseEachRight = createBaseEach(baseForOwnRight, true);
+
+module.exports = baseEachRight;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseEvery.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseEvery.js
new file mode 100644
index 0000000..fa52f7b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseEvery.js
@@ -0,0 +1,21 @@
+var baseEach = require('./_baseEach');
+
+/**
+ * The base implementation of `_.every` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`
+ */
+function baseEvery(collection, predicate) {
+ var result = true;
+ baseEach(collection, function(value, index, collection) {
+ result = !!predicate(value, index, collection);
+ return result;
+ });
+ return result;
+}
+
+module.exports = baseEvery;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseExtremum.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseExtremum.js
new file mode 100644
index 0000000..9d6aa77
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseExtremum.js
@@ -0,0 +1,32 @@
+var isSymbol = require('./isSymbol');
+
+/**
+ * The base implementation of methods like `_.max` and `_.min` which accepts a
+ * `comparator` to determine the extremum value.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The iteratee invoked per iteration.
+ * @param {Function} comparator The comparator used to compare values.
+ * @returns {*} Returns the extremum value.
+ */
+function baseExtremum(array, iteratee, comparator) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var value = array[index],
+ current = iteratee(value);
+
+ if (current != null && (computed === undefined
+ ? (current === current && !isSymbol(current))
+ : comparator(current, computed)
+ )) {
+ var computed = current,
+ result = value;
+ }
+ }
+ return result;
+}
+
+module.exports = baseExtremum;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFill.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFill.js
new file mode 100644
index 0000000..46ef9c7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFill.js
@@ -0,0 +1,32 @@
+var toInteger = require('./toInteger'),
+ toLength = require('./toLength');
+
+/**
+ * The base implementation of `_.fill` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ */
+function baseFill(array, value, start, end) {
+ var length = array.length;
+
+ start = toInteger(start);
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = (end === undefined || end > length) ? length : toInteger(end);
+ if (end < 0) {
+ end += length;
+ }
+ end = start > end ? 0 : toLength(end);
+ while (start < end) {
+ array[start++] = value;
+ }
+ return array;
+}
+
+module.exports = baseFill;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFilter.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFilter.js
new file mode 100644
index 0000000..4678477
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFilter.js
@@ -0,0 +1,21 @@
+var baseEach = require('./_baseEach');
+
+/**
+ * The base implementation of `_.filter` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+function baseFilter(collection, predicate) {
+ var result = [];
+ baseEach(collection, function(value, index, collection) {
+ if (predicate(value, index, collection)) {
+ result.push(value);
+ }
+ });
+ return result;
+}
+
+module.exports = baseFilter;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFindIndex.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFindIndex.js
new file mode 100644
index 0000000..e3f5d8a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFindIndex.js
@@ -0,0 +1,24 @@
+/**
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {number} fromIndex The index to search from.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function baseFindIndex(array, predicate, fromIndex, fromRight) {
+ var length = array.length,
+ index = fromIndex + (fromRight ? 1 : -1);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (predicate(array[index], index, array)) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+module.exports = baseFindIndex;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFindKey.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFindKey.js
new file mode 100644
index 0000000..2e430f3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFindKey.js
@@ -0,0 +1,23 @@
+/**
+ * The base implementation of methods like `_.findKey` and `_.findLastKey`,
+ * without support for iteratee shorthands, which iterates over `collection`
+ * using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the found element or its key, else `undefined`.
+ */
+function baseFindKey(collection, predicate, eachFunc) {
+ var result;
+ eachFunc(collection, function(value, key, collection) {
+ if (predicate(value, key, collection)) {
+ result = key;
+ return false;
+ }
+ });
+ return result;
+}
+
+module.exports = baseFindKey;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFlatten.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFlatten.js
new file mode 100644
index 0000000..4b1e009
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFlatten.js
@@ -0,0 +1,38 @@
+var arrayPush = require('./_arrayPush'),
+ isFlattenable = require('./_isFlattenable');
+
+/**
+ * The base implementation of `_.flatten` with support for restricting flattening.
+ *
+ * @private
+ * @param {Array} array The array to flatten.
+ * @param {number} depth The maximum recursion depth.
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
+ * @param {Array} [result=[]] The initial result value.
+ * @returns {Array} Returns the new flattened array.
+ */
+function baseFlatten(array, depth, predicate, isStrict, result) {
+ var index = -1,
+ length = array.length;
+
+ predicate || (predicate = isFlattenable);
+ result || (result = []);
+
+ while (++index < length) {
+ var value = array[index];
+ if (depth > 0 && predicate(value)) {
+ if (depth > 1) {
+ // Recursively flatten arrays (susceptible to call stack limits).
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
+ } else {
+ arrayPush(result, value);
+ }
+ } else if (!isStrict) {
+ result[result.length] = value;
+ }
+ }
+ return result;
+}
+
+module.exports = baseFlatten;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFor.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFor.js
new file mode 100644
index 0000000..d946590
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFor.js
@@ -0,0 +1,16 @@
+var createBaseFor = require('./_createBaseFor');
+
+/**
+ * The base implementation of `baseForOwn` which iterates over `object`
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+var baseFor = createBaseFor();
+
+module.exports = baseFor;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseForOwn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseForOwn.js
new file mode 100644
index 0000000..503d523
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseForOwn.js
@@ -0,0 +1,16 @@
+var baseFor = require('./_baseFor'),
+ keys = require('./keys');
+
+/**
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+function baseForOwn(object, iteratee) {
+ return object && baseFor(object, iteratee, keys);
+}
+
+module.exports = baseForOwn;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseForOwnRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseForOwnRight.js
new file mode 100644
index 0000000..a4b10e6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseForOwnRight.js
@@ -0,0 +1,16 @@
+var baseForRight = require('./_baseForRight'),
+ keys = require('./keys');
+
+/**
+ * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+function baseForOwnRight(object, iteratee) {
+ return object && baseForRight(object, iteratee, keys);
+}
+
+module.exports = baseForOwnRight;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseForRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseForRight.js
new file mode 100644
index 0000000..32842cd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseForRight.js
@@ -0,0 +1,15 @@
+var createBaseFor = require('./_createBaseFor');
+
+/**
+ * This function is like `baseFor` except that it iterates over properties
+ * in the opposite order.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+var baseForRight = createBaseFor(true);
+
+module.exports = baseForRight;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFunctions.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFunctions.js
new file mode 100644
index 0000000..d23bc9b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseFunctions.js
@@ -0,0 +1,19 @@
+var arrayFilter = require('./_arrayFilter'),
+ isFunction = require('./isFunction');
+
+/**
+ * The base implementation of `_.functions` which creates an array of
+ * `object` function property names filtered from `props`.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Array} props The property names to filter.
+ * @returns {Array} Returns the function names.
+ */
+function baseFunctions(object, props) {
+ return arrayFilter(props, function(key) {
+ return isFunction(object[key]);
+ });
+}
+
+module.exports = baseFunctions;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseGet.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseGet.js
new file mode 100644
index 0000000..a194913
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseGet.js
@@ -0,0 +1,24 @@
+var castPath = require('./_castPath'),
+ toKey = require('./_toKey');
+
+/**
+ * The base implementation of `_.get` without support for default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @returns {*} Returns the resolved value.
+ */
+function baseGet(object, path) {
+ path = castPath(path, object);
+
+ var index = 0,
+ length = path.length;
+
+ while (object != null && index < length) {
+ object = object[toKey(path[index++])];
+ }
+ return (index && index == length) ? object : undefined;
+}
+
+module.exports = baseGet;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseGetAllKeys.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseGetAllKeys.js
new file mode 100644
index 0000000..8ad204e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseGetAllKeys.js
@@ -0,0 +1,20 @@
+var arrayPush = require('./_arrayPush'),
+ isArray = require('./isArray');
+
+/**
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function baseGetAllKeys(object, keysFunc, symbolsFunc) {
+ var result = keysFunc(object);
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
+}
+
+module.exports = baseGetAllKeys;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseGetTag.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseGetTag.js
new file mode 100644
index 0000000..cf869ac
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseGetTag.js
@@ -0,0 +1,29 @@
+var Symbol = require('./_Symbol'),
+ getRawTag = require('./_getRawTag'),
+ objectToString = require('./_objectToString');
+
+/** `Object#toString` result references. */
+var nullTag = '[object Null]',
+ undefinedTag = '[object Undefined]';
+
+/** Built-in value references. */
+var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
+
+/**
+ * The base implementation of `getTag` without fallbacks for buggy environments.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+function baseGetTag(value) {
+ if (value == null) {
+ return value === undefined ? undefinedTag : nullTag;
+ }
+ value = Object(value);
+ return (symToStringTag && symToStringTag in value)
+ ? getRawTag(value)
+ : objectToString(value);
+}
+
+module.exports = baseGetTag;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseGt.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseGt.js
new file mode 100644
index 0000000..502d273
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseGt.js
@@ -0,0 +1,14 @@
+/**
+ * The base implementation of `_.gt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ */
+function baseGt(value, other) {
+ return value > other;
+}
+
+module.exports = baseGt;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseHas.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseHas.js
new file mode 100644
index 0000000..1b73032
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseHas.js
@@ -0,0 +1,19 @@
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * The base implementation of `_.has` without support for deep paths.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+function baseHas(object, key) {
+ return object != null && hasOwnProperty.call(object, key);
+}
+
+module.exports = baseHas;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseHasIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseHasIn.js
new file mode 100644
index 0000000..2e0d042
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseHasIn.js
@@ -0,0 +1,13 @@
+/**
+ * The base implementation of `_.hasIn` without support for deep paths.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+function baseHasIn(object, key) {
+ return object != null && key in Object(object);
+}
+
+module.exports = baseHasIn;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseInRange.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseInRange.js
new file mode 100644
index 0000000..ec95666
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseInRange.js
@@ -0,0 +1,18 @@
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max,
+ nativeMin = Math.min;
+
+/**
+ * The base implementation of `_.inRange` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {number} number The number to check.
+ * @param {number} start The start of the range.
+ * @param {number} end The end of the range.
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
+ */
+function baseInRange(number, start, end) {
+ return number >= nativeMin(start, end) && number < nativeMax(start, end);
+}
+
+module.exports = baseInRange;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIndexOf.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIndexOf.js
new file mode 100644
index 0000000..167e706
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIndexOf.js
@@ -0,0 +1,20 @@
+var baseFindIndex = require('./_baseFindIndex'),
+ baseIsNaN = require('./_baseIsNaN'),
+ strictIndexOf = require('./_strictIndexOf');
+
+/**
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function baseIndexOf(array, value, fromIndex) {
+ return value === value
+ ? strictIndexOf(array, value, fromIndex)
+ : baseFindIndex(array, baseIsNaN, fromIndex);
+}
+
+module.exports = baseIndexOf;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIndexOfWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIndexOfWith.js
new file mode 100644
index 0000000..f815fe0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIndexOfWith.js
@@ -0,0 +1,23 @@
+/**
+ * This function is like `baseIndexOf` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function baseIndexOfWith(array, value, fromIndex, comparator) {
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (comparator(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+module.exports = baseIndexOfWith;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIntersection.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIntersection.js
new file mode 100644
index 0000000..c1d250c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIntersection.js
@@ -0,0 +1,74 @@
+var SetCache = require('./_SetCache'),
+ arrayIncludes = require('./_arrayIncludes'),
+ arrayIncludesWith = require('./_arrayIncludesWith'),
+ arrayMap = require('./_arrayMap'),
+ baseUnary = require('./_baseUnary'),
+ cacheHas = require('./_cacheHas');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * The base implementation of methods like `_.intersection`, without support
+ * for iteratee shorthands, that accepts an array of arrays to inspect.
+ *
+ * @private
+ * @param {Array} arrays The arrays to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of shared values.
+ */
+function baseIntersection(arrays, iteratee, comparator) {
+ var includes = comparator ? arrayIncludesWith : arrayIncludes,
+ length = arrays[0].length,
+ othLength = arrays.length,
+ othIndex = othLength,
+ caches = Array(othLength),
+ maxLength = Infinity,
+ result = [];
+
+ while (othIndex--) {
+ var array = arrays[othIndex];
+ if (othIndex && iteratee) {
+ array = arrayMap(array, baseUnary(iteratee));
+ }
+ maxLength = nativeMin(array.length, maxLength);
+ caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
+ ? new SetCache(othIndex && array)
+ : undefined;
+ }
+ array = arrays[0];
+
+ var index = -1,
+ seen = caches[0];
+
+ outer:
+ while (++index < length && result.length < maxLength) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (!(seen
+ ? cacheHas(seen, computed)
+ : includes(result, computed, comparator)
+ )) {
+ othIndex = othLength;
+ while (--othIndex) {
+ var cache = caches[othIndex];
+ if (!(cache
+ ? cacheHas(cache, computed)
+ : includes(arrays[othIndex], computed, comparator))
+ ) {
+ continue outer;
+ }
+ }
+ if (seen) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+}
+
+module.exports = baseIntersection;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseInverter.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseInverter.js
new file mode 100644
index 0000000..fbc337f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseInverter.js
@@ -0,0 +1,21 @@
+var baseForOwn = require('./_baseForOwn');
+
+/**
+ * The base implementation of `_.invert` and `_.invertBy` which inverts
+ * `object` with values transformed by `iteratee` and set by `setter`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform values.
+ * @param {Object} accumulator The initial inverted object.
+ * @returns {Function} Returns `accumulator`.
+ */
+function baseInverter(object, setter, iteratee, accumulator) {
+ baseForOwn(object, function(value, key, object) {
+ setter(accumulator, iteratee(value), key, object);
+ });
+ return accumulator;
+}
+
+module.exports = baseInverter;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseInvoke.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseInvoke.js
new file mode 100644
index 0000000..49bcf3c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseInvoke.js
@@ -0,0 +1,24 @@
+var apply = require('./_apply'),
+ castPath = require('./_castPath'),
+ last = require('./last'),
+ parent = require('./_parent'),
+ toKey = require('./_toKey');
+
+/**
+ * The base implementation of `_.invoke` without support for individual
+ * method arguments.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {Array} args The arguments to invoke the method with.
+ * @returns {*} Returns the result of the invoked method.
+ */
+function baseInvoke(object, path, args) {
+ path = castPath(path, object);
+ object = parent(object, path);
+ var func = object == null ? object : object[toKey(last(path))];
+ return func == null ? undefined : apply(func, object, args);
+}
+
+module.exports = baseInvoke;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsArguments.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsArguments.js
new file mode 100644
index 0000000..b3562cc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsArguments.js
@@ -0,0 +1,18 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]';
+
+/**
+ * The base implementation of `_.isArguments`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ */
+function baseIsArguments(value) {
+ return isObjectLike(value) && baseGetTag(value) == argsTag;
+}
+
+module.exports = baseIsArguments;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsArrayBuffer.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsArrayBuffer.js
new file mode 100644
index 0000000..a2c4f30
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsArrayBuffer.js
@@ -0,0 +1,17 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+var arrayBufferTag = '[object ArrayBuffer]';
+
+/**
+ * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
+ */
+function baseIsArrayBuffer(value) {
+ return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
+}
+
+module.exports = baseIsArrayBuffer;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsDate.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsDate.js
new file mode 100644
index 0000000..ba67c78
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsDate.js
@@ -0,0 +1,18 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var dateTag = '[object Date]';
+
+/**
+ * The base implementation of `_.isDate` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ */
+function baseIsDate(value) {
+ return isObjectLike(value) && baseGetTag(value) == dateTag;
+}
+
+module.exports = baseIsDate;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsEqual.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsEqual.js
new file mode 100644
index 0000000..0c4212e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsEqual.js
@@ -0,0 +1,29 @@
+var baseIsEqualDeep = require('./_baseIsEqualDeep'),
+ isObject = require('./isObject'),
+ isObjectLike = require('./isObjectLike');
+
+/**
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+function baseIsEqual(value, other, bitmask, customizer, stack) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
+}
+
+module.exports = baseIsEqual;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsEqualDeep.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsEqualDeep.js
new file mode 100644
index 0000000..b32f1f3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsEqualDeep.js
@@ -0,0 +1,88 @@
+var Stack = require('./_Stack'),
+ equalArrays = require('./_equalArrays'),
+ equalByTag = require('./_equalByTag'),
+ equalObjects = require('./_equalObjects'),
+ getTag = require('./_getTag'),
+ isArray = require('./isArray'),
+ isBuffer = require('./isBuffer'),
+ isTypedArray = require('./isTypedArray');
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1;
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ objectTag = '[object Object]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = arrayTag,
+ othTag = arrayTag;
+
+ if (!objIsArr) {
+ objTag = getTag(object);
+ objTag = objTag == argsTag ? objectTag : objTag;
+ }
+ if (!othIsArr) {
+ othTag = getTag(other);
+ othTag = othTag == argsTag ? objectTag : othTag;
+ }
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
+ isSameTag = objTag == othTag;
+
+ if (isSameTag && isBuffer(object)) {
+ if (!isBuffer(other)) {
+ return false;
+ }
+ objIsArr = true;
+ objIsObj = false;
+ }
+ if (isSameTag && !objIsObj) {
+ stack || (stack = new Stack);
+ return (objIsArr || isTypedArray(object))
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
+ }
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ var objUnwrapped = objIsWrapped ? object.value() : object,
+ othUnwrapped = othIsWrapped ? other.value() : other;
+
+ stack || (stack = new Stack);
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ stack || (stack = new Stack);
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
+}
+
+module.exports = baseIsEqualDeep;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsMap.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsMap.js
new file mode 100644
index 0000000..02a4021
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsMap.js
@@ -0,0 +1,18 @@
+var getTag = require('./_getTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]';
+
+/**
+ * The base implementation of `_.isMap` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
+ */
+function baseIsMap(value) {
+ return isObjectLike(value) && getTag(value) == mapTag;
+}
+
+module.exports = baseIsMap;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsMatch.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsMatch.js
new file mode 100644
index 0000000..72494be
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsMatch.js
@@ -0,0 +1,62 @@
+var Stack = require('./_Stack'),
+ baseIsEqual = require('./_baseIsEqual');
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+/**
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Array} matchData The property names, values, and compare flags to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ */
+function baseIsMatch(object, source, matchData, customizer) {
+ var index = matchData.length,
+ length = index,
+ noCustomizer = !customizer;
+
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (index--) {
+ var data = matchData[index];
+ if ((noCustomizer && data[2])
+ ? data[1] !== object[data[0]]
+ : !(data[0] in object)
+ ) {
+ return false;
+ }
+ }
+ while (++index < length) {
+ data = matchData[index];
+ var key = data[0],
+ objValue = object[key],
+ srcValue = data[1];
+
+ if (noCustomizer && data[2]) {
+ if (objValue === undefined && !(key in object)) {
+ return false;
+ }
+ } else {
+ var stack = new Stack;
+ if (customizer) {
+ var result = customizer(objValue, srcValue, key, object, source, stack);
+ }
+ if (!(result === undefined
+ ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
+ : result
+ )) {
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+module.exports = baseIsMatch;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsNaN.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsNaN.js
new file mode 100644
index 0000000..316f1eb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsNaN.js
@@ -0,0 +1,12 @@
+/**
+ * The base implementation of `_.isNaN` without support for number objects.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ */
+function baseIsNaN(value) {
+ return value !== value;
+}
+
+module.exports = baseIsNaN;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsNative.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsNative.js
new file mode 100644
index 0000000..8702330
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsNative.js
@@ -0,0 +1,47 @@
+var isFunction = require('./isFunction'),
+ isMasked = require('./_isMasked'),
+ isObject = require('./isObject'),
+ toSource = require('./_toSource');
+
+/**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
+ */
+var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
+
+/** Used to detect host constructors (Safari). */
+var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+/** Used for built-in method references. */
+var funcProto = Function.prototype,
+ objectProto = Object.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString = funcProto.toString;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/** Used to detect if a method is native. */
+var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+);
+
+/**
+ * The base implementation of `_.isNative` without bad shim checks.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ */
+function baseIsNative(value) {
+ if (!isObject(value) || isMasked(value)) {
+ return false;
+ }
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
+}
+
+module.exports = baseIsNative;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsRegExp.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsRegExp.js
new file mode 100644
index 0000000..6cd7c1a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsRegExp.js
@@ -0,0 +1,18 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var regexpTag = '[object RegExp]';
+
+/**
+ * The base implementation of `_.isRegExp` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ */
+function baseIsRegExp(value) {
+ return isObjectLike(value) && baseGetTag(value) == regexpTag;
+}
+
+module.exports = baseIsRegExp;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsSet.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsSet.js
new file mode 100644
index 0000000..6dee367
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsSet.js
@@ -0,0 +1,18 @@
+var getTag = require('./_getTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var setTag = '[object Set]';
+
+/**
+ * The base implementation of `_.isSet` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
+ */
+function baseIsSet(value) {
+ return isObjectLike(value) && getTag(value) == setTag;
+}
+
+module.exports = baseIsSet;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsTypedArray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsTypedArray.js
new file mode 100644
index 0000000..1edb32f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIsTypedArray.js
@@ -0,0 +1,60 @@
+var baseGetTag = require('./_baseGetTag'),
+ isLength = require('./isLength'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ weakMapTag = '[object WeakMap]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+/** Used to identify `toStringTag` values of typed arrays. */
+var typedArrayTags = {};
+typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+typedArrayTags[uint32Tag] = true;
+typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
+typedArrayTags[errorTag] = typedArrayTags[funcTag] =
+typedArrayTags[mapTag] = typedArrayTags[numberTag] =
+typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
+typedArrayTags[setTag] = typedArrayTags[stringTag] =
+typedArrayTags[weakMapTag] = false;
+
+/**
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ */
+function baseIsTypedArray(value) {
+ return isObjectLike(value) &&
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
+}
+
+module.exports = baseIsTypedArray;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIteratee.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIteratee.js
new file mode 100644
index 0000000..995c257
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseIteratee.js
@@ -0,0 +1,31 @@
+var baseMatches = require('./_baseMatches'),
+ baseMatchesProperty = require('./_baseMatchesProperty'),
+ identity = require('./identity'),
+ isArray = require('./isArray'),
+ property = require('./property');
+
+/**
+ * The base implementation of `_.iteratee`.
+ *
+ * @private
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
+ * @returns {Function} Returns the iteratee.
+ */
+function baseIteratee(value) {
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
+ if (typeof value == 'function') {
+ return value;
+ }
+ if (value == null) {
+ return identity;
+ }
+ if (typeof value == 'object') {
+ return isArray(value)
+ ? baseMatchesProperty(value[0], value[1])
+ : baseMatches(value);
+ }
+ return property(value);
+}
+
+module.exports = baseIteratee;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseKeys.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseKeys.js
new file mode 100644
index 0000000..45e9e6f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseKeys.js
@@ -0,0 +1,30 @@
+var isPrototype = require('./_isPrototype'),
+ nativeKeys = require('./_nativeKeys');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function baseKeys(object) {
+ if (!isPrototype(object)) {
+ return nativeKeys(object);
+ }
+ var result = [];
+ for (var key in Object(object)) {
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+module.exports = baseKeys;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseKeysIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseKeysIn.js
new file mode 100644
index 0000000..ea8a0a1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseKeysIn.js
@@ -0,0 +1,33 @@
+var isObject = require('./isObject'),
+ isPrototype = require('./_isPrototype'),
+ nativeKeysIn = require('./_nativeKeysIn');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function baseKeysIn(object) {
+ if (!isObject(object)) {
+ return nativeKeysIn(object);
+ }
+ var isProto = isPrototype(object),
+ result = [];
+
+ for (var key in object) {
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+module.exports = baseKeysIn;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseLodash.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseLodash.js
new file mode 100644
index 0000000..f76c790
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseLodash.js
@@ -0,0 +1,10 @@
+/**
+ * The function whose prototype chain sequence wrappers inherit from.
+ *
+ * @private
+ */
+function baseLodash() {
+ // No operation performed.
+}
+
+module.exports = baseLodash;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseLt.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseLt.js
new file mode 100644
index 0000000..8674d29
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseLt.js
@@ -0,0 +1,14 @@
+/**
+ * The base implementation of `_.lt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ */
+function baseLt(value, other) {
+ return value < other;
+}
+
+module.exports = baseLt;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMap.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMap.js
new file mode 100644
index 0000000..0bf5cea
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMap.js
@@ -0,0 +1,22 @@
+var baseEach = require('./_baseEach'),
+ isArrayLike = require('./isArrayLike');
+
+/**
+ * The base implementation of `_.map` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+function baseMap(collection, iteratee) {
+ var index = -1,
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value, key, collection) {
+ result[++index] = iteratee(value, key, collection);
+ });
+ return result;
+}
+
+module.exports = baseMap;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMatches.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMatches.js
new file mode 100644
index 0000000..e56582a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMatches.js
@@ -0,0 +1,22 @@
+var baseIsMatch = require('./_baseIsMatch'),
+ getMatchData = require('./_getMatchData'),
+ matchesStrictComparable = require('./_matchesStrictComparable');
+
+/**
+ * The base implementation of `_.matches` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ */
+function baseMatches(source) {
+ var matchData = getMatchData(source);
+ if (matchData.length == 1 && matchData[0][2]) {
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
+ }
+ return function(object) {
+ return object === source || baseIsMatch(object, source, matchData);
+ };
+}
+
+module.exports = baseMatches;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMatchesProperty.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMatchesProperty.js
new file mode 100644
index 0000000..24afd89
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMatchesProperty.js
@@ -0,0 +1,33 @@
+var baseIsEqual = require('./_baseIsEqual'),
+ get = require('./get'),
+ hasIn = require('./hasIn'),
+ isKey = require('./_isKey'),
+ isStrictComparable = require('./_isStrictComparable'),
+ matchesStrictComparable = require('./_matchesStrictComparable'),
+ toKey = require('./_toKey');
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+/**
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
+ *
+ * @private
+ * @param {string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+function baseMatchesProperty(path, srcValue) {
+ if (isKey(path) && isStrictComparable(srcValue)) {
+ return matchesStrictComparable(toKey(path), srcValue);
+ }
+ return function(object) {
+ var objValue = get(object, path);
+ return (objValue === undefined && objValue === srcValue)
+ ? hasIn(object, path)
+ : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
+ };
+}
+
+module.exports = baseMatchesProperty;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMean.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMean.js
new file mode 100644
index 0000000..fa9e00a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMean.js
@@ -0,0 +1,20 @@
+var baseSum = require('./_baseSum');
+
+/** Used as references for various `Number` constants. */
+var NAN = 0 / 0;
+
+/**
+ * The base implementation of `_.mean` and `_.meanBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the mean.
+ */
+function baseMean(array, iteratee) {
+ var length = array == null ? 0 : array.length;
+ return length ? (baseSum(array, iteratee) / length) : NAN;
+}
+
+module.exports = baseMean;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMerge.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMerge.js
new file mode 100644
index 0000000..f4cb8c6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMerge.js
@@ -0,0 +1,41 @@
+var Stack = require('./_Stack'),
+ assignMergeValue = require('./_assignMergeValue'),
+ baseFor = require('./_baseFor'),
+ baseMergeDeep = require('./_baseMergeDeep'),
+ isObject = require('./isObject'),
+ keysIn = require('./keysIn');
+
+/**
+ * The base implementation of `_.merge` without support for multiple sources.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} [customizer] The function to customize merged values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+function baseMerge(object, source, srcIndex, customizer, stack) {
+ if (object === source) {
+ return;
+ }
+ baseFor(source, function(srcValue, key) {
+ if (isObject(srcValue)) {
+ stack || (stack = new Stack);
+ baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
+ }
+ else {
+ var newValue = customizer
+ ? customizer(object[key], srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = srcValue;
+ }
+ assignMergeValue(object, key, newValue);
+ }
+ }, keysIn);
+}
+
+module.exports = baseMerge;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMergeDeep.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMergeDeep.js
new file mode 100644
index 0000000..42b405a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseMergeDeep.js
@@ -0,0 +1,93 @@
+var assignMergeValue = require('./_assignMergeValue'),
+ cloneBuffer = require('./_cloneBuffer'),
+ cloneTypedArray = require('./_cloneTypedArray'),
+ copyArray = require('./_copyArray'),
+ initCloneObject = require('./_initCloneObject'),
+ isArguments = require('./isArguments'),
+ isArray = require('./isArray'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ isBuffer = require('./isBuffer'),
+ isFunction = require('./isFunction'),
+ isObject = require('./isObject'),
+ isPlainObject = require('./isPlainObject'),
+ isTypedArray = require('./isTypedArray'),
+ toPlainObject = require('./toPlainObject');
+
+/**
+ * A specialized version of `baseMerge` for arrays and objects which performs
+ * deep merges and tracks traversed objects enabling objects with circular
+ * references to be merged.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {string} key The key of the value to merge.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} mergeFunc The function to merge values.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
+ var objValue = object[key],
+ srcValue = source[key],
+ stacked = stack.get(srcValue);
+
+ if (stacked) {
+ assignMergeValue(object, key, stacked);
+ return;
+ }
+ var newValue = customizer
+ ? customizer(objValue, srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ var isCommon = newValue === undefined;
+
+ if (isCommon) {
+ var isArr = isArray(srcValue),
+ isBuff = !isArr && isBuffer(srcValue),
+ isTyped = !isArr && !isBuff && isTypedArray(srcValue);
+
+ newValue = srcValue;
+ if (isArr || isBuff || isTyped) {
+ if (isArray(objValue)) {
+ newValue = objValue;
+ }
+ else if (isArrayLikeObject(objValue)) {
+ newValue = copyArray(objValue);
+ }
+ else if (isBuff) {
+ isCommon = false;
+ newValue = cloneBuffer(srcValue, true);
+ }
+ else if (isTyped) {
+ isCommon = false;
+ newValue = cloneTypedArray(srcValue, true);
+ }
+ else {
+ newValue = [];
+ }
+ }
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+ newValue = objValue;
+ if (isArguments(objValue)) {
+ newValue = toPlainObject(objValue);
+ }
+ else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
+ newValue = initCloneObject(srcValue);
+ }
+ }
+ else {
+ isCommon = false;
+ }
+ }
+ if (isCommon) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ stack.set(srcValue, newValue);
+ mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
+ stack['delete'](srcValue);
+ }
+ assignMergeValue(object, key, newValue);
+}
+
+module.exports = baseMergeDeep;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseNth.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseNth.js
new file mode 100644
index 0000000..0403c2a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseNth.js
@@ -0,0 +1,20 @@
+var isIndex = require('./_isIndex');
+
+/**
+ * The base implementation of `_.nth` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {number} n The index of the element to return.
+ * @returns {*} Returns the nth element of `array`.
+ */
+function baseNth(array, n) {
+ var length = array.length;
+ if (!length) {
+ return;
+ }
+ n += n < 0 ? length : 0;
+ return isIndex(n, length) ? array[n] : undefined;
+}
+
+module.exports = baseNth;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseOrderBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseOrderBy.js
new file mode 100644
index 0000000..d8a46ab
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseOrderBy.js
@@ -0,0 +1,34 @@
+var arrayMap = require('./_arrayMap'),
+ baseIteratee = require('./_baseIteratee'),
+ baseMap = require('./_baseMap'),
+ baseSortBy = require('./_baseSortBy'),
+ baseUnary = require('./_baseUnary'),
+ compareMultiple = require('./_compareMultiple'),
+ identity = require('./identity');
+
+/**
+ * The base implementation of `_.orderBy` without param guards.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
+ * @param {string[]} orders The sort orders of `iteratees`.
+ * @returns {Array} Returns the new sorted array.
+ */
+function baseOrderBy(collection, iteratees, orders) {
+ var index = -1;
+ iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee));
+
+ var result = baseMap(collection, function(value, key, collection) {
+ var criteria = arrayMap(iteratees, function(iteratee) {
+ return iteratee(value);
+ });
+ return { 'criteria': criteria, 'index': ++index, 'value': value };
+ });
+
+ return baseSortBy(result, function(object, other) {
+ return compareMultiple(object, other, orders);
+ });
+}
+
+module.exports = baseOrderBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePick.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePick.js
new file mode 100644
index 0000000..6afce40
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePick.js
@@ -0,0 +1,20 @@
+var basePickBy = require('./_basePickBy'),
+ hasIn = require('./hasIn');
+
+/**
+ * The base implementation of `_.pick` without support for individual
+ * property identifiers.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @returns {Object} Returns the new object.
+ */
+function basePick(object, paths) {
+ object = Object(object);
+ return basePickBy(object, paths, function(value, path) {
+ return hasIn(object, path);
+ });
+}
+
+module.exports = basePick;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePickBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePickBy.js
new file mode 100644
index 0000000..85be68c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePickBy.js
@@ -0,0 +1,30 @@
+var baseGet = require('./_baseGet'),
+ baseSet = require('./_baseSet'),
+ castPath = require('./_castPath');
+
+/**
+ * The base implementation of `_.pickBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @param {Function} predicate The function invoked per property.
+ * @returns {Object} Returns the new object.
+ */
+function basePickBy(object, paths, predicate) {
+ var index = -1,
+ length = paths.length,
+ result = {};
+
+ while (++index < length) {
+ var path = paths[index],
+ value = baseGet(object, path);
+
+ if (predicate(value, path)) {
+ baseSet(result, castPath(path, object), value);
+ }
+ }
+ return result;
+}
+
+module.exports = basePickBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseProperty.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseProperty.js
new file mode 100644
index 0000000..496281e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseProperty.js
@@ -0,0 +1,14 @@
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+module.exports = baseProperty;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePropertyDeep.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePropertyDeep.js
new file mode 100644
index 0000000..1e5aae5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePropertyDeep.js
@@ -0,0 +1,16 @@
+var baseGet = require('./_baseGet');
+
+/**
+ * A specialized version of `baseProperty` which supports deep paths.
+ *
+ * @private
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+function basePropertyDeep(path) {
+ return function(object) {
+ return baseGet(object, path);
+ };
+}
+
+module.exports = basePropertyDeep;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePropertyOf.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePropertyOf.js
new file mode 100644
index 0000000..4617399
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePropertyOf.js
@@ -0,0 +1,14 @@
+/**
+ * The base implementation of `_.propertyOf` without support for deep paths.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ */
+function basePropertyOf(object) {
+ return function(key) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+module.exports = basePropertyOf;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePullAll.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePullAll.js
new file mode 100644
index 0000000..305720e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePullAll.js
@@ -0,0 +1,51 @@
+var arrayMap = require('./_arrayMap'),
+ baseIndexOf = require('./_baseIndexOf'),
+ baseIndexOfWith = require('./_baseIndexOfWith'),
+ baseUnary = require('./_baseUnary'),
+ copyArray = require('./_copyArray');
+
+/** Used for built-in method references. */
+var arrayProto = Array.prototype;
+
+/** Built-in value references. */
+var splice = arrayProto.splice;
+
+/**
+ * The base implementation of `_.pullAllBy` without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns `array`.
+ */
+function basePullAll(array, values, iteratee, comparator) {
+ var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
+ index = -1,
+ length = values.length,
+ seen = array;
+
+ if (array === values) {
+ values = copyArray(values);
+ }
+ if (iteratee) {
+ seen = arrayMap(array, baseUnary(iteratee));
+ }
+ while (++index < length) {
+ var fromIndex = 0,
+ value = values[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
+ if (seen !== array) {
+ splice.call(seen, fromIndex, 1);
+ }
+ splice.call(array, fromIndex, 1);
+ }
+ }
+ return array;
+}
+
+module.exports = basePullAll;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePullAt.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePullAt.js
new file mode 100644
index 0000000..c3e9e71
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_basePullAt.js
@@ -0,0 +1,37 @@
+var baseUnset = require('./_baseUnset'),
+ isIndex = require('./_isIndex');
+
+/** Used for built-in method references. */
+var arrayProto = Array.prototype;
+
+/** Built-in value references. */
+var splice = arrayProto.splice;
+
+/**
+ * The base implementation of `_.pullAt` without support for individual
+ * indexes or capturing the removed elements.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {number[]} indexes The indexes of elements to remove.
+ * @returns {Array} Returns `array`.
+ */
+function basePullAt(array, indexes) {
+ var length = array ? indexes.length : 0,
+ lastIndex = length - 1;
+
+ while (length--) {
+ var index = indexes[length];
+ if (length == lastIndex || index !== previous) {
+ var previous = index;
+ if (isIndex(index)) {
+ splice.call(array, index, 1);
+ } else {
+ baseUnset(array, index);
+ }
+ }
+ }
+ return array;
+}
+
+module.exports = basePullAt;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseRandom.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseRandom.js
new file mode 100644
index 0000000..94f76a7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseRandom.js
@@ -0,0 +1,18 @@
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeFloor = Math.floor,
+ nativeRandom = Math.random;
+
+/**
+ * The base implementation of `_.random` without support for returning
+ * floating-point numbers.
+ *
+ * @private
+ * @param {number} lower The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the random number.
+ */
+function baseRandom(lower, upper) {
+ return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
+}
+
+module.exports = baseRandom;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseRange.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseRange.js
new file mode 100644
index 0000000..0fb8e41
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseRange.js
@@ -0,0 +1,28 @@
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeCeil = Math.ceil,
+ nativeMax = Math.max;
+
+/**
+ * The base implementation of `_.range` and `_.rangeRight` which doesn't
+ * coerce arguments.
+ *
+ * @private
+ * @param {number} start The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} step The value to increment or decrement by.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Array} Returns the range of numbers.
+ */
+function baseRange(start, end, step, fromRight) {
+ var index = -1,
+ length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
+ result = Array(length);
+
+ while (length--) {
+ result[fromRight ? length : ++index] = start;
+ start += step;
+ }
+ return result;
+}
+
+module.exports = baseRange;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseReduce.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseReduce.js
new file mode 100644
index 0000000..5a1f8b5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseReduce.js
@@ -0,0 +1,23 @@
+/**
+ * The base implementation of `_.reduce` and `_.reduceRight`, without support
+ * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} accumulator The initial value.
+ * @param {boolean} initAccum Specify using the first or last element of
+ * `collection` as the initial value.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the accumulated value.
+ */
+function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
+ eachFunc(collection, function(value, index, collection) {
+ accumulator = initAccum
+ ? (initAccum = false, value)
+ : iteratee(accumulator, value, index, collection);
+ });
+ return accumulator;
+}
+
+module.exports = baseReduce;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseRepeat.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseRepeat.js
new file mode 100644
index 0000000..ee44c31
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseRepeat.js
@@ -0,0 +1,35 @@
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeFloor = Math.floor;
+
+/**
+ * The base implementation of `_.repeat` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {string} string The string to repeat.
+ * @param {number} n The number of times to repeat the string.
+ * @returns {string} Returns the repeated string.
+ */
+function baseRepeat(string, n) {
+ var result = '';
+ if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
+ return result;
+ }
+ // Leverage the exponentiation by squaring algorithm for a faster repeat.
+ // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
+ do {
+ if (n % 2) {
+ result += string;
+ }
+ n = nativeFloor(n / 2);
+ if (n) {
+ string += string;
+ }
+ } while (n);
+
+ return result;
+}
+
+module.exports = baseRepeat;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseRest.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseRest.js
new file mode 100644
index 0000000..d0dc4bd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseRest.js
@@ -0,0 +1,17 @@
+var identity = require('./identity'),
+ overRest = require('./_overRest'),
+ setToString = require('./_setToString');
+
+/**
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ */
+function baseRest(func, start) {
+ return setToString(overRest(func, start, identity), func + '');
+}
+
+module.exports = baseRest;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSample.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSample.js
new file mode 100644
index 0000000..58582b9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSample.js
@@ -0,0 +1,15 @@
+var arraySample = require('./_arraySample'),
+ values = require('./values');
+
+/**
+ * The base implementation of `_.sample`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to sample.
+ * @returns {*} Returns the random element.
+ */
+function baseSample(collection) {
+ return arraySample(values(collection));
+}
+
+module.exports = baseSample;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSampleSize.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSampleSize.js
new file mode 100644
index 0000000..5c90ec5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSampleSize.js
@@ -0,0 +1,18 @@
+var baseClamp = require('./_baseClamp'),
+ shuffleSelf = require('./_shuffleSelf'),
+ values = require('./values');
+
+/**
+ * The base implementation of `_.sampleSize` without param guards.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to sample.
+ * @param {number} n The number of elements to sample.
+ * @returns {Array} Returns the random elements.
+ */
+function baseSampleSize(collection, n) {
+ var array = values(collection);
+ return shuffleSelf(array, baseClamp(n, 0, array.length));
+}
+
+module.exports = baseSampleSize;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSet.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSet.js
new file mode 100644
index 0000000..612a24c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSet.js
@@ -0,0 +1,47 @@
+var assignValue = require('./_assignValue'),
+ castPath = require('./_castPath'),
+ isIndex = require('./_isIndex'),
+ isObject = require('./isObject'),
+ toKey = require('./_toKey');
+
+/**
+ * The base implementation of `_.set`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+function baseSet(object, path, value, customizer) {
+ if (!isObject(object)) {
+ return object;
+ }
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length,
+ lastIndex = length - 1,
+ nested = object;
+
+ while (nested != null && ++index < length) {
+ var key = toKey(path[index]),
+ newValue = value;
+
+ if (index != lastIndex) {
+ var objValue = nested[key];
+ newValue = customizer ? customizer(objValue, key, nested) : undefined;
+ if (newValue === undefined) {
+ newValue = isObject(objValue)
+ ? objValue
+ : (isIndex(path[index + 1]) ? [] : {});
+ }
+ }
+ assignValue(nested, key, newValue);
+ nested = nested[key];
+ }
+ return object;
+}
+
+module.exports = baseSet;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSetData.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSetData.js
new file mode 100644
index 0000000..c409947
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSetData.js
@@ -0,0 +1,17 @@
+var identity = require('./identity'),
+ metaMap = require('./_metaMap');
+
+/**
+ * The base implementation of `setData` without support for hot loop shorting.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+var baseSetData = !metaMap ? identity : function(func, data) {
+ metaMap.set(func, data);
+ return func;
+};
+
+module.exports = baseSetData;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSetToString.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSetToString.js
new file mode 100644
index 0000000..89eaca3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSetToString.js
@@ -0,0 +1,22 @@
+var constant = require('./constant'),
+ defineProperty = require('./_defineProperty'),
+ identity = require('./identity');
+
+/**
+ * The base implementation of `setToString` without support for hot loop shorting.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+var baseSetToString = !defineProperty ? identity : function(func, string) {
+ return defineProperty(func, 'toString', {
+ 'configurable': true,
+ 'enumerable': false,
+ 'value': constant(string),
+ 'writable': true
+ });
+};
+
+module.exports = baseSetToString;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseShuffle.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseShuffle.js
new file mode 100644
index 0000000..023077a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseShuffle.js
@@ -0,0 +1,15 @@
+var shuffleSelf = require('./_shuffleSelf'),
+ values = require('./values');
+
+/**
+ * The base implementation of `_.shuffle`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ */
+function baseShuffle(collection) {
+ return shuffleSelf(values(collection));
+}
+
+module.exports = baseShuffle;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSlice.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSlice.js
new file mode 100644
index 0000000..786f6c9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSlice.js
@@ -0,0 +1,31 @@
+/**
+ * The base implementation of `_.slice` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+function baseSlice(array, start, end) {
+ var index = -1,
+ length = array.length;
+
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = end > length ? length : end;
+ if (end < 0) {
+ end += length;
+ }
+ length = start > end ? 0 : ((end - start) >>> 0);
+ start >>>= 0;
+
+ var result = Array(length);
+ while (++index < length) {
+ result[index] = array[index + start];
+ }
+ return result;
+}
+
+module.exports = baseSlice;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSome.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSome.js
new file mode 100644
index 0000000..58f3f44
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSome.js
@@ -0,0 +1,22 @@
+var baseEach = require('./_baseEach');
+
+/**
+ * The base implementation of `_.some` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+function baseSome(collection, predicate) {
+ var result;
+
+ baseEach(collection, function(value, index, collection) {
+ result = predicate(value, index, collection);
+ return !result;
+ });
+ return !!result;
+}
+
+module.exports = baseSome;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSortBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSortBy.js
new file mode 100644
index 0000000..a25c92e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSortBy.js
@@ -0,0 +1,21 @@
+/**
+ * The base implementation of `_.sortBy` which uses `comparer` to define the
+ * sort order of `array` and replaces criteria objects with their corresponding
+ * values.
+ *
+ * @private
+ * @param {Array} array The array to sort.
+ * @param {Function} comparer The function to define sort order.
+ * @returns {Array} Returns `array`.
+ */
+function baseSortBy(array, comparer) {
+ var length = array.length;
+
+ array.sort(comparer);
+ while (length--) {
+ array[length] = array[length].value;
+ }
+ return array;
+}
+
+module.exports = baseSortBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSortedIndex.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSortedIndex.js
new file mode 100644
index 0000000..638c366
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSortedIndex.js
@@ -0,0 +1,42 @@
+var baseSortedIndexBy = require('./_baseSortedIndexBy'),
+ identity = require('./identity'),
+ isSymbol = require('./isSymbol');
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295,
+ HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
+
+/**
+ * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
+ * performs a binary search of `array` to determine the index at which `value`
+ * should be inserted into `array` in order to maintain its sort order.
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+function baseSortedIndex(array, value, retHighest) {
+ var low = 0,
+ high = array == null ? low : array.length;
+
+ if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
+ while (low < high) {
+ var mid = (low + high) >>> 1,
+ computed = array[mid];
+
+ if (computed !== null && !isSymbol(computed) &&
+ (retHighest ? (computed <= value) : (computed < value))) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return high;
+ }
+ return baseSortedIndexBy(array, value, identity, retHighest);
+}
+
+module.exports = baseSortedIndex;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSortedIndexBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSortedIndexBy.js
new file mode 100644
index 0000000..bb22e36
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSortedIndexBy.js
@@ -0,0 +1,64 @@
+var isSymbol = require('./isSymbol');
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295,
+ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeFloor = Math.floor,
+ nativeMin = Math.min;
+
+/**
+ * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
+ * which invokes `iteratee` for `value` and each element of `array` to compute
+ * their sort ranking. The iteratee is invoked with one argument; (value).
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} iteratee The iteratee invoked per element.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+function baseSortedIndexBy(array, value, iteratee, retHighest) {
+ value = iteratee(value);
+
+ var low = 0,
+ high = array == null ? 0 : array.length,
+ valIsNaN = value !== value,
+ valIsNull = value === null,
+ valIsSymbol = isSymbol(value),
+ valIsUndefined = value === undefined;
+
+ while (low < high) {
+ var mid = nativeFloor((low + high) / 2),
+ computed = iteratee(array[mid]),
+ othIsDefined = computed !== undefined,
+ othIsNull = computed === null,
+ othIsReflexive = computed === computed,
+ othIsSymbol = isSymbol(computed);
+
+ if (valIsNaN) {
+ var setLow = retHighest || othIsReflexive;
+ } else if (valIsUndefined) {
+ setLow = othIsReflexive && (retHighest || othIsDefined);
+ } else if (valIsNull) {
+ setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
+ } else if (valIsSymbol) {
+ setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
+ } else if (othIsNull || othIsSymbol) {
+ setLow = false;
+ } else {
+ setLow = retHighest ? (computed <= value) : (computed < value);
+ }
+ if (setLow) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return nativeMin(high, MAX_ARRAY_INDEX);
+}
+
+module.exports = baseSortedIndexBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSortedUniq.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSortedUniq.js
new file mode 100644
index 0000000..802159a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSortedUniq.js
@@ -0,0 +1,30 @@
+var eq = require('./eq');
+
+/**
+ * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+function baseSortedUniq(array, iteratee) {
+ var index = -1,
+ length = array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ if (!index || !eq(computed, seen)) {
+ var seen = computed;
+ result[resIndex++] = value === 0 ? 0 : value;
+ }
+ }
+ return result;
+}
+
+module.exports = baseSortedUniq;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSum.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSum.js
new file mode 100644
index 0000000..a9e84c1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseSum.js
@@ -0,0 +1,24 @@
+/**
+ * The base implementation of `_.sum` and `_.sumBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the sum.
+ */
+function baseSum(array, iteratee) {
+ var result,
+ index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var current = iteratee(array[index]);
+ if (current !== undefined) {
+ result = result === undefined ? current : (result + current);
+ }
+ }
+ return result;
+}
+
+module.exports = baseSum;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseTimes.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseTimes.js
new file mode 100644
index 0000000..0603fc3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseTimes.js
@@ -0,0 +1,20 @@
+/**
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
+ *
+ * @private
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ */
+function baseTimes(n, iteratee) {
+ var index = -1,
+ result = Array(n);
+
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+ return result;
+}
+
+module.exports = baseTimes;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseToNumber.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseToNumber.js
new file mode 100644
index 0000000..04859f3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseToNumber.js
@@ -0,0 +1,24 @@
+var isSymbol = require('./isSymbol');
+
+/** Used as references for various `Number` constants. */
+var NAN = 0 / 0;
+
+/**
+ * The base implementation of `_.toNumber` which doesn't ensure correct
+ * conversions of binary, hexadecimal, or octal string values.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ */
+function baseToNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ return +value;
+}
+
+module.exports = baseToNumber;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseToPairs.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseToPairs.js
new file mode 100644
index 0000000..bff1991
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseToPairs.js
@@ -0,0 +1,18 @@
+var arrayMap = require('./_arrayMap');
+
+/**
+ * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
+ * of key-value pairs for `object` corresponding to the property names of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the key-value pairs.
+ */
+function baseToPairs(object, props) {
+ return arrayMap(props, function(key) {
+ return [key, object[key]];
+ });
+}
+
+module.exports = baseToPairs;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseToString.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseToString.js
new file mode 100644
index 0000000..ada6ad2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseToString.js
@@ -0,0 +1,37 @@
+var Symbol = require('./_Symbol'),
+ arrayMap = require('./_arrayMap'),
+ isArray = require('./isArray'),
+ isSymbol = require('./isSymbol');
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
+
+/**
+ * The base implementation of `_.toString` which doesn't convert nullish
+ * values to empty strings.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+function baseToString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
+ }
+ if (isArray(value)) {
+ // Recursively convert values (susceptible to call stack limits).
+ return arrayMap(value, baseToString) + '';
+ }
+ if (isSymbol(value)) {
+ return symbolToString ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
+
+module.exports = baseToString;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseUnary.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseUnary.js
new file mode 100644
index 0000000..98639e9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseUnary.js
@@ -0,0 +1,14 @@
+/**
+ * The base implementation of `_.unary` without support for storing metadata.
+ *
+ * @private
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ */
+function baseUnary(func) {
+ return function(value) {
+ return func(value);
+ };
+}
+
+module.exports = baseUnary;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseUniq.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseUniq.js
new file mode 100644
index 0000000..aea459d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseUniq.js
@@ -0,0 +1,72 @@
+var SetCache = require('./_SetCache'),
+ arrayIncludes = require('./_arrayIncludes'),
+ arrayIncludesWith = require('./_arrayIncludesWith'),
+ cacheHas = require('./_cacheHas'),
+ createSet = require('./_createSet'),
+ setToArray = require('./_setToArray');
+
+/** Used as the size to enable large array optimizations. */
+var LARGE_ARRAY_SIZE = 200;
+
+/**
+ * The base implementation of `_.uniqBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+function baseUniq(array, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ length = array.length,
+ isCommon = true,
+ result = [],
+ seen = result;
+
+ if (comparator) {
+ isCommon = false;
+ includes = arrayIncludesWith;
+ }
+ else if (length >= LARGE_ARRAY_SIZE) {
+ var set = iteratee ? null : createSet(array);
+ if (set) {
+ return setToArray(set);
+ }
+ isCommon = false;
+ includes = cacheHas;
+ seen = new SetCache;
+ }
+ else {
+ seen = iteratee ? [] : result;
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var seenIndex = seen.length;
+ while (seenIndex--) {
+ if (seen[seenIndex] === computed) {
+ continue outer;
+ }
+ }
+ if (iteratee) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ else if (!includes(seen, computed, comparator)) {
+ if (seen !== result) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+}
+
+module.exports = baseUniq;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseUnset.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseUnset.js
new file mode 100644
index 0000000..eefc6e3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseUnset.js
@@ -0,0 +1,20 @@
+var castPath = require('./_castPath'),
+ last = require('./last'),
+ parent = require('./_parent'),
+ toKey = require('./_toKey');
+
+/**
+ * The base implementation of `_.unset`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The property path to unset.
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
+ */
+function baseUnset(object, path) {
+ path = castPath(path, object);
+ object = parent(object, path);
+ return object == null || delete object[toKey(last(path))];
+}
+
+module.exports = baseUnset;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseUpdate.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseUpdate.js
new file mode 100644
index 0000000..92a6237
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseUpdate.js
@@ -0,0 +1,18 @@
+var baseGet = require('./_baseGet'),
+ baseSet = require('./_baseSet');
+
+/**
+ * The base implementation of `_.update`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to update.
+ * @param {Function} updater The function to produce the updated value.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+function baseUpdate(object, path, updater, customizer) {
+ return baseSet(object, path, updater(baseGet(object, path)), customizer);
+}
+
+module.exports = baseUpdate;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseValues.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseValues.js
new file mode 100644
index 0000000..b95faad
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseValues.js
@@ -0,0 +1,19 @@
+var arrayMap = require('./_arrayMap');
+
+/**
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
+ * array of `object` property values corresponding to the property names
+ * of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the array of property values.
+ */
+function baseValues(object, props) {
+ return arrayMap(props, function(key) {
+ return object[key];
+ });
+}
+
+module.exports = baseValues;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseWhile.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseWhile.js
new file mode 100644
index 0000000..07eac61
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseWhile.js
@@ -0,0 +1,26 @@
+var baseSlice = require('./_baseSlice');
+
+/**
+ * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
+ * without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Array} Returns the slice of `array`.
+ */
+function baseWhile(array, predicate, isDrop, fromRight) {
+ var length = array.length,
+ index = fromRight ? length : -1;
+
+ while ((fromRight ? index-- : ++index < length) &&
+ predicate(array[index], index, array)) {}
+
+ return isDrop
+ ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
+ : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
+}
+
+module.exports = baseWhile;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseWrapperValue.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseWrapperValue.js
new file mode 100644
index 0000000..443e0df
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseWrapperValue.js
@@ -0,0 +1,25 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ arrayPush = require('./_arrayPush'),
+ arrayReduce = require('./_arrayReduce');
+
+/**
+ * The base implementation of `wrapperValue` which returns the result of
+ * performing a sequence of actions on the unwrapped `value`, where each
+ * successive action is supplied the return value of the previous.
+ *
+ * @private
+ * @param {*} value The unwrapped value.
+ * @param {Array} actions Actions to perform to resolve the unwrapped value.
+ * @returns {*} Returns the resolved value.
+ */
+function baseWrapperValue(value, actions) {
+ var result = value;
+ if (result instanceof LazyWrapper) {
+ result = result.value();
+ }
+ return arrayReduce(actions, function(result, action) {
+ return action.func.apply(action.thisArg, arrayPush([result], action.args));
+ }, result);
+}
+
+module.exports = baseWrapperValue;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseXor.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseXor.js
new file mode 100644
index 0000000..8e69338
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseXor.js
@@ -0,0 +1,36 @@
+var baseDifference = require('./_baseDifference'),
+ baseFlatten = require('./_baseFlatten'),
+ baseUniq = require('./_baseUniq');
+
+/**
+ * The base implementation of methods like `_.xor`, without support for
+ * iteratee shorthands, that accepts an array of arrays to inspect.
+ *
+ * @private
+ * @param {Array} arrays The arrays to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of values.
+ */
+function baseXor(arrays, iteratee, comparator) {
+ var length = arrays.length;
+ if (length < 2) {
+ return length ? baseUniq(arrays[0]) : [];
+ }
+ var index = -1,
+ result = Array(length);
+
+ while (++index < length) {
+ var array = arrays[index],
+ othIndex = -1;
+
+ while (++othIndex < length) {
+ if (othIndex != index) {
+ result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
+ }
+ }
+ }
+ return baseUniq(baseFlatten(result, 1), iteratee, comparator);
+}
+
+module.exports = baseXor;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseZipObject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseZipObject.js
new file mode 100644
index 0000000..401f85b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_baseZipObject.js
@@ -0,0 +1,23 @@
+/**
+ * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
+ *
+ * @private
+ * @param {Array} props The property identifiers.
+ * @param {Array} values The property values.
+ * @param {Function} assignFunc The function to assign values.
+ * @returns {Object} Returns the new object.
+ */
+function baseZipObject(props, values, assignFunc) {
+ var index = -1,
+ length = props.length,
+ valsLength = values.length,
+ result = {};
+
+ while (++index < length) {
+ var value = index < valsLength ? values[index] : undefined;
+ assignFunc(result, props[index], value);
+ }
+ return result;
+}
+
+module.exports = baseZipObject;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cacheHas.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cacheHas.js
new file mode 100644
index 0000000..2dec892
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cacheHas.js
@@ -0,0 +1,13 @@
+/**
+ * Checks if a `cache` value for `key` exists.
+ *
+ * @private
+ * @param {Object} cache The cache to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function cacheHas(cache, key) {
+ return cache.has(key);
+}
+
+module.exports = cacheHas;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_castArrayLikeObject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_castArrayLikeObject.js
new file mode 100644
index 0000000..92c75fa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_castArrayLikeObject.js
@@ -0,0 +1,14 @@
+var isArrayLikeObject = require('./isArrayLikeObject');
+
+/**
+ * Casts `value` to an empty array if it's not an array like object.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Array|Object} Returns the cast array-like object.
+ */
+function castArrayLikeObject(value) {
+ return isArrayLikeObject(value) ? value : [];
+}
+
+module.exports = castArrayLikeObject;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_castFunction.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_castFunction.js
new file mode 100644
index 0000000..98c91ae
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_castFunction.js
@@ -0,0 +1,14 @@
+var identity = require('./identity');
+
+/**
+ * Casts `value` to `identity` if it's not a function.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Function} Returns cast function.
+ */
+function castFunction(value) {
+ return typeof value == 'function' ? value : identity;
+}
+
+module.exports = castFunction;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_castPath.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_castPath.js
new file mode 100644
index 0000000..017e4c1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_castPath.js
@@ -0,0 +1,21 @@
+var isArray = require('./isArray'),
+ isKey = require('./_isKey'),
+ stringToPath = require('./_stringToPath'),
+ toString = require('./toString');
+
+/**
+ * Casts `value` to a path array if it's not one.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {Array} Returns the cast property path array.
+ */
+function castPath(value, object) {
+ if (isArray(value)) {
+ return value;
+ }
+ return isKey(value, object) ? [value] : stringToPath(toString(value));
+}
+
+module.exports = castPath;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_castRest.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_castRest.js
new file mode 100644
index 0000000..213c66f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_castRest.js
@@ -0,0 +1,14 @@
+var baseRest = require('./_baseRest');
+
+/**
+ * A `baseRest` alias which can be replaced with `identity` by module
+ * replacement plugins.
+ *
+ * @private
+ * @type {Function}
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+var castRest = baseRest;
+
+module.exports = castRest;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_castSlice.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_castSlice.js
new file mode 100644
index 0000000..071faeb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_castSlice.js
@@ -0,0 +1,18 @@
+var baseSlice = require('./_baseSlice');
+
+/**
+ * Casts `array` to a slice if it's needed.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {number} start The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the cast slice.
+ */
+function castSlice(array, start, end) {
+ var length = array.length;
+ end = end === undefined ? length : end;
+ return (!start && end >= length) ? array : baseSlice(array, start, end);
+}
+
+module.exports = castSlice;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_charsEndIndex.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_charsEndIndex.js
new file mode 100644
index 0000000..07908ff
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_charsEndIndex.js
@@ -0,0 +1,19 @@
+var baseIndexOf = require('./_baseIndexOf');
+
+/**
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
+ * that is not found in the character symbols.
+ *
+ * @private
+ * @param {Array} strSymbols The string symbols to inspect.
+ * @param {Array} chrSymbols The character symbols to find.
+ * @returns {number} Returns the index of the last unmatched string symbol.
+ */
+function charsEndIndex(strSymbols, chrSymbols) {
+ var index = strSymbols.length;
+
+ while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
+ return index;
+}
+
+module.exports = charsEndIndex;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_charsStartIndex.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_charsStartIndex.js
new file mode 100644
index 0000000..b17afd2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_charsStartIndex.js
@@ -0,0 +1,20 @@
+var baseIndexOf = require('./_baseIndexOf');
+
+/**
+ * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
+ * that is not found in the character symbols.
+ *
+ * @private
+ * @param {Array} strSymbols The string symbols to inspect.
+ * @param {Array} chrSymbols The character symbols to find.
+ * @returns {number} Returns the index of the first unmatched string symbol.
+ */
+function charsStartIndex(strSymbols, chrSymbols) {
+ var index = -1,
+ length = strSymbols.length;
+
+ while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
+ return index;
+}
+
+module.exports = charsStartIndex;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneArrayBuffer.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneArrayBuffer.js
new file mode 100644
index 0000000..c3d8f6e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneArrayBuffer.js
@@ -0,0 +1,16 @@
+var Uint8Array = require('./_Uint8Array');
+
+/**
+ * Creates a clone of `arrayBuffer`.
+ *
+ * @private
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
+ */
+function cloneArrayBuffer(arrayBuffer) {
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
+ return result;
+}
+
+module.exports = cloneArrayBuffer;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneBuffer.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneBuffer.js
new file mode 100644
index 0000000..27c4810
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneBuffer.js
@@ -0,0 +1,35 @@
+var root = require('./_root');
+
+/** Detect free variable `exports`. */
+var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
+
+/** Detect free variable `module`. */
+var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+/** Detect the popular CommonJS extension `module.exports`. */
+var moduleExports = freeModule && freeModule.exports === freeExports;
+
+/** Built-in value references. */
+var Buffer = moduleExports ? root.Buffer : undefined,
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
+
+/**
+ * Creates a clone of `buffer`.
+ *
+ * @private
+ * @param {Buffer} buffer The buffer to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Buffer} Returns the cloned buffer.
+ */
+function cloneBuffer(buffer, isDeep) {
+ if (isDeep) {
+ return buffer.slice();
+ }
+ var length = buffer.length,
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
+
+ buffer.copy(result);
+ return result;
+}
+
+module.exports = cloneBuffer;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneDataView.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneDataView.js
new file mode 100644
index 0000000..9c9b7b0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneDataView.js
@@ -0,0 +1,16 @@
+var cloneArrayBuffer = require('./_cloneArrayBuffer');
+
+/**
+ * Creates a clone of `dataView`.
+ *
+ * @private
+ * @param {Object} dataView The data view to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned data view.
+ */
+function cloneDataView(dataView, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
+}
+
+module.exports = cloneDataView;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneMap.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneMap.js
new file mode 100644
index 0000000..334b73e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneMap.js
@@ -0,0 +1,22 @@
+var addMapEntry = require('./_addMapEntry'),
+ arrayReduce = require('./_arrayReduce'),
+ mapToArray = require('./_mapToArray');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1;
+
+/**
+ * Creates a clone of `map`.
+ *
+ * @private
+ * @param {Object} map The map to clone.
+ * @param {Function} cloneFunc The function to clone values.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned map.
+ */
+function cloneMap(map, isDeep, cloneFunc) {
+ var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);
+ return arrayReduce(array, addMapEntry, new map.constructor);
+}
+
+module.exports = cloneMap;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneRegExp.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneRegExp.js
new file mode 100644
index 0000000..64a30df
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneRegExp.js
@@ -0,0 +1,17 @@
+/** Used to match `RegExp` flags from their coerced string values. */
+var reFlags = /\w*$/;
+
+/**
+ * Creates a clone of `regexp`.
+ *
+ * @private
+ * @param {Object} regexp The regexp to clone.
+ * @returns {Object} Returns the cloned regexp.
+ */
+function cloneRegExp(regexp) {
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
+ result.lastIndex = regexp.lastIndex;
+ return result;
+}
+
+module.exports = cloneRegExp;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneSet.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneSet.js
new file mode 100644
index 0000000..713a2f7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneSet.js
@@ -0,0 +1,22 @@
+var addSetEntry = require('./_addSetEntry'),
+ arrayReduce = require('./_arrayReduce'),
+ setToArray = require('./_setToArray');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1;
+
+/**
+ * Creates a clone of `set`.
+ *
+ * @private
+ * @param {Object} set The set to clone.
+ * @param {Function} cloneFunc The function to clone values.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned set.
+ */
+function cloneSet(set, isDeep, cloneFunc) {
+ var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);
+ return arrayReduce(array, addSetEntry, new set.constructor);
+}
+
+module.exports = cloneSet;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneSymbol.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneSymbol.js
new file mode 100644
index 0000000..bede39f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneSymbol.js
@@ -0,0 +1,18 @@
+var Symbol = require('./_Symbol');
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
+
+/**
+ * Creates a clone of the `symbol` object.
+ *
+ * @private
+ * @param {Object} symbol The symbol object to clone.
+ * @returns {Object} Returns the cloned symbol object.
+ */
+function cloneSymbol(symbol) {
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
+}
+
+module.exports = cloneSymbol;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneTypedArray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneTypedArray.js
new file mode 100644
index 0000000..7aad84d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_cloneTypedArray.js
@@ -0,0 +1,16 @@
+var cloneArrayBuffer = require('./_cloneArrayBuffer');
+
+/**
+ * Creates a clone of `typedArray`.
+ *
+ * @private
+ * @param {Object} typedArray The typed array to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned typed array.
+ */
+function cloneTypedArray(typedArray, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
+}
+
+module.exports = cloneTypedArray;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_compareAscending.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_compareAscending.js
new file mode 100644
index 0000000..8dc2791
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_compareAscending.js
@@ -0,0 +1,41 @@
+var isSymbol = require('./isSymbol');
+
+/**
+ * Compares values to sort them in ascending order.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {number} Returns the sort order indicator for `value`.
+ */
+function compareAscending(value, other) {
+ if (value !== other) {
+ var valIsDefined = value !== undefined,
+ valIsNull = value === null,
+ valIsReflexive = value === value,
+ valIsSymbol = isSymbol(value);
+
+ var othIsDefined = other !== undefined,
+ othIsNull = other === null,
+ othIsReflexive = other === other,
+ othIsSymbol = isSymbol(other);
+
+ if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
+ (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
+ (valIsNull && othIsDefined && othIsReflexive) ||
+ (!valIsDefined && othIsReflexive) ||
+ !valIsReflexive) {
+ return 1;
+ }
+ if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
+ (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
+ (othIsNull && valIsDefined && valIsReflexive) ||
+ (!othIsDefined && valIsReflexive) ||
+ !othIsReflexive) {
+ return -1;
+ }
+ }
+ return 0;
+}
+
+module.exports = compareAscending;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_compareMultiple.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_compareMultiple.js
new file mode 100644
index 0000000..ad61f0f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_compareMultiple.js
@@ -0,0 +1,44 @@
+var compareAscending = require('./_compareAscending');
+
+/**
+ * Used by `_.orderBy` to compare multiple properties of a value to another
+ * and stable sort them.
+ *
+ * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
+ * specify an order of "desc" for descending or "asc" for ascending sort order
+ * of corresponding values.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {boolean[]|string[]} orders The order to sort by for each property.
+ * @returns {number} Returns the sort order indicator for `object`.
+ */
+function compareMultiple(object, other, orders) {
+ var index = -1,
+ objCriteria = object.criteria,
+ othCriteria = other.criteria,
+ length = objCriteria.length,
+ ordersLength = orders.length;
+
+ while (++index < length) {
+ var result = compareAscending(objCriteria[index], othCriteria[index]);
+ if (result) {
+ if (index >= ordersLength) {
+ return result;
+ }
+ var order = orders[index];
+ return result * (order == 'desc' ? -1 : 1);
+ }
+ }
+ // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
+ // that causes it, under certain circumstances, to provide the same value for
+ // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
+ // for more details.
+ //
+ // This also ensures a stable sort in V8 and other engines.
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
+ return object.index - other.index;
+}
+
+module.exports = compareMultiple;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_composeArgs.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_composeArgs.js
new file mode 100644
index 0000000..1ce40f4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_composeArgs.js
@@ -0,0 +1,39 @@
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Creates an array that is the composition of partially applied arguments,
+ * placeholders, and provided arguments into a single array of arguments.
+ *
+ * @private
+ * @param {Array} args The provided arguments.
+ * @param {Array} partials The arguments to prepend to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @params {boolean} [isCurried] Specify composing for a curried function.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+function composeArgs(args, partials, holders, isCurried) {
+ var argsIndex = -1,
+ argsLength = args.length,
+ holdersLength = holders.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
+ result = Array(leftLength + rangeLength),
+ isUncurried = !isCurried;
+
+ while (++leftIndex < leftLength) {
+ result[leftIndex] = partials[leftIndex];
+ }
+ while (++argsIndex < holdersLength) {
+ if (isUncurried || argsIndex < argsLength) {
+ result[holders[argsIndex]] = args[argsIndex];
+ }
+ }
+ while (rangeLength--) {
+ result[leftIndex++] = args[argsIndex++];
+ }
+ return result;
+}
+
+module.exports = composeArgs;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_composeArgsRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_composeArgsRight.js
new file mode 100644
index 0000000..8dc588d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_composeArgsRight.js
@@ -0,0 +1,41 @@
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * This function is like `composeArgs` except that the arguments composition
+ * is tailored for `_.partialRight`.
+ *
+ * @private
+ * @param {Array} args The provided arguments.
+ * @param {Array} partials The arguments to append to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @params {boolean} [isCurried] Specify composing for a curried function.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+function composeArgsRight(args, partials, holders, isCurried) {
+ var argsIndex = -1,
+ argsLength = args.length,
+ holdersIndex = -1,
+ holdersLength = holders.length,
+ rightIndex = -1,
+ rightLength = partials.length,
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
+ result = Array(rangeLength + rightLength),
+ isUncurried = !isCurried;
+
+ while (++argsIndex < rangeLength) {
+ result[argsIndex] = args[argsIndex];
+ }
+ var offset = argsIndex;
+ while (++rightIndex < rightLength) {
+ result[offset + rightIndex] = partials[rightIndex];
+ }
+ while (++holdersIndex < holdersLength) {
+ if (isUncurried || argsIndex < argsLength) {
+ result[offset + holders[holdersIndex]] = args[argsIndex++];
+ }
+ }
+ return result;
+}
+
+module.exports = composeArgsRight;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_copyArray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_copyArray.js
new file mode 100644
index 0000000..cd94d5d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_copyArray.js
@@ -0,0 +1,20 @@
+/**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+function copyArray(source, array) {
+ var index = -1,
+ length = source.length;
+
+ array || (array = Array(length));
+ while (++index < length) {
+ array[index] = source[index];
+ }
+ return array;
+}
+
+module.exports = copyArray;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_copyObject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_copyObject.js
new file mode 100644
index 0000000..2f2a5c2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_copyObject.js
@@ -0,0 +1,40 @@
+var assignValue = require('./_assignValue'),
+ baseAssignValue = require('./_baseAssignValue');
+
+/**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property identifiers to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
+ */
+function copyObject(source, props, object, customizer) {
+ var isNew = !object;
+ object || (object = {});
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index];
+
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = source[key];
+ }
+ if (isNew) {
+ baseAssignValue(object, key, newValue);
+ } else {
+ assignValue(object, key, newValue);
+ }
+ }
+ return object;
+}
+
+module.exports = copyObject;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_copySymbols.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_copySymbols.js
new file mode 100644
index 0000000..c35944a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_copySymbols.js
@@ -0,0 +1,16 @@
+var copyObject = require('./_copyObject'),
+ getSymbols = require('./_getSymbols');
+
+/**
+ * Copies own symbols of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+function copySymbols(source, object) {
+ return copyObject(source, getSymbols(source), object);
+}
+
+module.exports = copySymbols;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_copySymbolsIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_copySymbolsIn.js
new file mode 100644
index 0000000..fdf20a7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_copySymbolsIn.js
@@ -0,0 +1,16 @@
+var copyObject = require('./_copyObject'),
+ getSymbolsIn = require('./_getSymbolsIn');
+
+/**
+ * Copies own and inherited symbols of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+function copySymbolsIn(source, object) {
+ return copyObject(source, getSymbolsIn(source), object);
+}
+
+module.exports = copySymbolsIn;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_coreJsData.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_coreJsData.js
new file mode 100644
index 0000000..f8e5b4e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_coreJsData.js
@@ -0,0 +1,6 @@
+var root = require('./_root');
+
+/** Used to detect overreaching core-js shims. */
+var coreJsData = root['__core-js_shared__'];
+
+module.exports = coreJsData;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_countHolders.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_countHolders.js
new file mode 100644
index 0000000..718fcda
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_countHolders.js
@@ -0,0 +1,21 @@
+/**
+ * Gets the number of `placeholder` occurrences in `array`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} placeholder The placeholder to search for.
+ * @returns {number} Returns the placeholder count.
+ */
+function countHolders(array, placeholder) {
+ var length = array.length,
+ result = 0;
+
+ while (length--) {
+ if (array[length] === placeholder) {
+ ++result;
+ }
+ }
+ return result;
+}
+
+module.exports = countHolders;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createAggregator.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createAggregator.js
new file mode 100644
index 0000000..0be42c4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createAggregator.js
@@ -0,0 +1,23 @@
+var arrayAggregator = require('./_arrayAggregator'),
+ baseAggregator = require('./_baseAggregator'),
+ baseIteratee = require('./_baseIteratee'),
+ isArray = require('./isArray');
+
+/**
+ * Creates a function like `_.groupBy`.
+ *
+ * @private
+ * @param {Function} setter The function to set accumulator values.
+ * @param {Function} [initializer] The accumulator object initializer.
+ * @returns {Function} Returns the new aggregator function.
+ */
+function createAggregator(setter, initializer) {
+ return function(collection, iteratee) {
+ var func = isArray(collection) ? arrayAggregator : baseAggregator,
+ accumulator = initializer ? initializer() : {};
+
+ return func(collection, setter, baseIteratee(iteratee, 2), accumulator);
+ };
+}
+
+module.exports = createAggregator;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createAssigner.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createAssigner.js
new file mode 100644
index 0000000..1f904c5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createAssigner.js
@@ -0,0 +1,37 @@
+var baseRest = require('./_baseRest'),
+ isIterateeCall = require('./_isIterateeCall');
+
+/**
+ * Creates a function like `_.assign`.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
+ */
+function createAssigner(assigner) {
+ return baseRest(function(object, sources) {
+ var index = -1,
+ length = sources.length,
+ customizer = length > 1 ? sources[length - 1] : undefined,
+ guard = length > 2 ? sources[2] : undefined;
+
+ customizer = (assigner.length > 3 && typeof customizer == 'function')
+ ? (length--, customizer)
+ : undefined;
+
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ customizer = length < 3 ? undefined : customizer;
+ length = 1;
+ }
+ object = Object(object);
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, index, customizer);
+ }
+ }
+ return object;
+ });
+}
+
+module.exports = createAssigner;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createBaseEach.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createBaseEach.js
new file mode 100644
index 0000000..d24fdd1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createBaseEach.js
@@ -0,0 +1,32 @@
+var isArrayLike = require('./isArrayLike');
+
+/**
+ * Creates a `baseEach` or `baseEachRight` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ if (collection == null) {
+ return collection;
+ }
+ if (!isArrayLike(collection)) {
+ return eachFunc(collection, iteratee);
+ }
+ var length = collection.length,
+ index = fromRight ? length : -1,
+ iterable = Object(collection);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
+ }
+ return collection;
+ };
+}
+
+module.exports = createBaseEach;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createBaseFor.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createBaseFor.js
new file mode 100644
index 0000000..94cbf29
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createBaseFor.js
@@ -0,0 +1,25 @@
+/**
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var index = -1,
+ iterable = Object(object),
+ props = keysFunc(object),
+ length = props.length;
+
+ while (length--) {
+ var key = props[fromRight ? length : ++index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
+ }
+ return object;
+ };
+}
+
+module.exports = createBaseFor;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createBind.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createBind.js
new file mode 100644
index 0000000..07cb99f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createBind.js
@@ -0,0 +1,28 @@
+var createCtor = require('./_createCtor'),
+ root = require('./_root');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1;
+
+/**
+ * Creates a function that wraps `func` to invoke it with the optional `this`
+ * binding of `thisArg`.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createBind(func, bitmask, thisArg) {
+ var isBind = bitmask & WRAP_BIND_FLAG,
+ Ctor = createCtor(func);
+
+ function wrapper() {
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return fn.apply(isBind ? thisArg : this, arguments);
+ }
+ return wrapper;
+}
+
+module.exports = createBind;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createCaseFirst.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createCaseFirst.js
new file mode 100644
index 0000000..fe8ea48
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createCaseFirst.js
@@ -0,0 +1,33 @@
+var castSlice = require('./_castSlice'),
+ hasUnicode = require('./_hasUnicode'),
+ stringToArray = require('./_stringToArray'),
+ toString = require('./toString');
+
+/**
+ * Creates a function like `_.lowerFirst`.
+ *
+ * @private
+ * @param {string} methodName The name of the `String` case method to use.
+ * @returns {Function} Returns the new case function.
+ */
+function createCaseFirst(methodName) {
+ return function(string) {
+ string = toString(string);
+
+ var strSymbols = hasUnicode(string)
+ ? stringToArray(string)
+ : undefined;
+
+ var chr = strSymbols
+ ? strSymbols[0]
+ : string.charAt(0);
+
+ var trailing = strSymbols
+ ? castSlice(strSymbols, 1).join('')
+ : string.slice(1);
+
+ return chr[methodName]() + trailing;
+ };
+}
+
+module.exports = createCaseFirst;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createCompounder.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createCompounder.js
new file mode 100644
index 0000000..8d4cee2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createCompounder.js
@@ -0,0 +1,24 @@
+var arrayReduce = require('./_arrayReduce'),
+ deburr = require('./deburr'),
+ words = require('./words');
+
+/** Used to compose unicode capture groups. */
+var rsApos = "['\u2019]";
+
+/** Used to match apostrophes. */
+var reApos = RegExp(rsApos, 'g');
+
+/**
+ * Creates a function like `_.camelCase`.
+ *
+ * @private
+ * @param {Function} callback The function to combine each word.
+ * @returns {Function} Returns the new compounder function.
+ */
+function createCompounder(callback) {
+ return function(string) {
+ return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
+ };
+}
+
+module.exports = createCompounder;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createCtor.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createCtor.js
new file mode 100644
index 0000000..9047aa5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createCtor.js
@@ -0,0 +1,37 @@
+var baseCreate = require('./_baseCreate'),
+ isObject = require('./isObject');
+
+/**
+ * Creates a function that produces an instance of `Ctor` regardless of
+ * whether it was invoked as part of a `new` expression or by `call` or `apply`.
+ *
+ * @private
+ * @param {Function} Ctor The constructor to wrap.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createCtor(Ctor) {
+ return function() {
+ // Use a `switch` statement to work with class constructors. See
+ // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
+ // for more details.
+ var args = arguments;
+ switch (args.length) {
+ case 0: return new Ctor;
+ case 1: return new Ctor(args[0]);
+ case 2: return new Ctor(args[0], args[1]);
+ case 3: return new Ctor(args[0], args[1], args[2]);
+ case 4: return new Ctor(args[0], args[1], args[2], args[3]);
+ case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
+ case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
+ case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
+ }
+ var thisBinding = baseCreate(Ctor.prototype),
+ result = Ctor.apply(thisBinding, args);
+
+ // Mimic the constructor's `return` behavior.
+ // See https://es5.github.io/#x13.2.2 for more details.
+ return isObject(result) ? result : thisBinding;
+ };
+}
+
+module.exports = createCtor;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createCurry.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createCurry.js
new file mode 100644
index 0000000..f06c2cd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createCurry.js
@@ -0,0 +1,46 @@
+var apply = require('./_apply'),
+ createCtor = require('./_createCtor'),
+ createHybrid = require('./_createHybrid'),
+ createRecurry = require('./_createRecurry'),
+ getHolder = require('./_getHolder'),
+ replaceHolders = require('./_replaceHolders'),
+ root = require('./_root');
+
+/**
+ * Creates a function that wraps `func` to enable currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {number} arity The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createCurry(func, bitmask, arity) {
+ var Ctor = createCtor(func);
+
+ function wrapper() {
+ var length = arguments.length,
+ args = Array(length),
+ index = length,
+ placeholder = getHolder(wrapper);
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
+ ? []
+ : replaceHolders(args, placeholder);
+
+ length -= holders.length;
+ if (length < arity) {
+ return createRecurry(
+ func, bitmask, createHybrid, wrapper.placeholder, undefined,
+ args, holders, undefined, undefined, arity - length);
+ }
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return apply(fn, this, args);
+ }
+ return wrapper;
+}
+
+module.exports = createCurry;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createFind.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createFind.js
new file mode 100644
index 0000000..8859ff8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createFind.js
@@ -0,0 +1,25 @@
+var baseIteratee = require('./_baseIteratee'),
+ isArrayLike = require('./isArrayLike'),
+ keys = require('./keys');
+
+/**
+ * Creates a `_.find` or `_.findLast` function.
+ *
+ * @private
+ * @param {Function} findIndexFunc The function to find the collection index.
+ * @returns {Function} Returns the new find function.
+ */
+function createFind(findIndexFunc) {
+ return function(collection, predicate, fromIndex) {
+ var iterable = Object(collection);
+ if (!isArrayLike(collection)) {
+ var iteratee = baseIteratee(predicate, 3);
+ collection = keys(collection);
+ predicate = function(key) { return iteratee(iterable[key], key, iterable); };
+ }
+ var index = findIndexFunc(collection, predicate, fromIndex);
+ return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
+ };
+}
+
+module.exports = createFind;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createFlow.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createFlow.js
new file mode 100644
index 0000000..c6b43f7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createFlow.js
@@ -0,0 +1,82 @@
+var LodashWrapper = require('./_LodashWrapper'),
+ flatRest = require('./_flatRest'),
+ getData = require('./_getData'),
+ getFuncName = require('./_getFuncName'),
+ isArray = require('./isArray'),
+ isLaziable = require('./_isLaziable');
+
+/** Used as the size to enable large array optimizations. */
+var LARGE_ARRAY_SIZE = 200;
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_CURRY_FLAG = 8,
+ WRAP_PARTIAL_FLAG = 32,
+ WRAP_ARY_FLAG = 128,
+ WRAP_REARG_FLAG = 256;
+
+/**
+ * Creates a `_.flow` or `_.flowRight` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new flow function.
+ */
+function createFlow(fromRight) {
+ return flatRest(function(funcs) {
+ var length = funcs.length,
+ index = length,
+ prereq = LodashWrapper.prototype.thru;
+
+ if (fromRight) {
+ funcs.reverse();
+ }
+ while (index--) {
+ var func = funcs[index];
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
+ var wrapper = new LodashWrapper([], true);
+ }
+ }
+ index = wrapper ? index : length;
+ while (++index < length) {
+ func = funcs[index];
+
+ var funcName = getFuncName(func),
+ data = funcName == 'wrapper' ? getData(func) : undefined;
+
+ if (data && isLaziable(data[0]) &&
+ data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
+ !data[4].length && data[9] == 1
+ ) {
+ wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
+ } else {
+ wrapper = (func.length == 1 && isLaziable(func))
+ ? wrapper[funcName]()
+ : wrapper.thru(func);
+ }
+ }
+ return function() {
+ var args = arguments,
+ value = args[0];
+
+ if (wrapper && args.length == 1 &&
+ isArray(value) && value.length >= LARGE_ARRAY_SIZE) {
+ return wrapper.plant(value).value();
+ }
+ var index = 0,
+ result = length ? funcs[index].apply(this, args) : value;
+
+ while (++index < length) {
+ result = funcs[index].call(this, result);
+ }
+ return result;
+ };
+ });
+}
+
+module.exports = createFlow;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createHybrid.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createHybrid.js
new file mode 100644
index 0000000..b671bd1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createHybrid.js
@@ -0,0 +1,92 @@
+var composeArgs = require('./_composeArgs'),
+ composeArgsRight = require('./_composeArgsRight'),
+ countHolders = require('./_countHolders'),
+ createCtor = require('./_createCtor'),
+ createRecurry = require('./_createRecurry'),
+ getHolder = require('./_getHolder'),
+ reorder = require('./_reorder'),
+ replaceHolders = require('./_replaceHolders'),
+ root = require('./_root');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_CURRY_FLAG = 8,
+ WRAP_CURRY_RIGHT_FLAG = 16,
+ WRAP_ARY_FLAG = 128,
+ WRAP_FLIP_FLAG = 512;
+
+/**
+ * Creates a function that wraps `func` to invoke it with optional `this`
+ * binding of `thisArg`, partial application, and currying.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ * the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [partialsRight] The arguments to append to those provided
+ * to the new function.
+ * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
+ var isAry = bitmask & WRAP_ARY_FLAG,
+ isBind = bitmask & WRAP_BIND_FLAG,
+ isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
+ isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
+ isFlip = bitmask & WRAP_FLIP_FLAG,
+ Ctor = isBindKey ? undefined : createCtor(func);
+
+ function wrapper() {
+ var length = arguments.length,
+ args = Array(length),
+ index = length;
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ if (isCurried) {
+ var placeholder = getHolder(wrapper),
+ holdersCount = countHolders(args, placeholder);
+ }
+ if (partials) {
+ args = composeArgs(args, partials, holders, isCurried);
+ }
+ if (partialsRight) {
+ args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
+ }
+ length -= holdersCount;
+ if (isCurried && length < arity) {
+ var newHolders = replaceHolders(args, placeholder);
+ return createRecurry(
+ func, bitmask, createHybrid, wrapper.placeholder, thisArg,
+ args, newHolders, argPos, ary, arity - length
+ );
+ }
+ var thisBinding = isBind ? thisArg : this,
+ fn = isBindKey ? thisBinding[func] : func;
+
+ length = args.length;
+ if (argPos) {
+ args = reorder(args, argPos);
+ } else if (isFlip && length > 1) {
+ args.reverse();
+ }
+ if (isAry && ary < length) {
+ args.length = ary;
+ }
+ if (this && this !== root && this instanceof wrapper) {
+ fn = Ctor || createCtor(fn);
+ }
+ return fn.apply(thisBinding, args);
+ }
+ return wrapper;
+}
+
+module.exports = createHybrid;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createInverter.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createInverter.js
new file mode 100644
index 0000000..6c0c562
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createInverter.js
@@ -0,0 +1,17 @@
+var baseInverter = require('./_baseInverter');
+
+/**
+ * Creates a function like `_.invertBy`.
+ *
+ * @private
+ * @param {Function} setter The function to set accumulator values.
+ * @param {Function} toIteratee The function to resolve iteratees.
+ * @returns {Function} Returns the new inverter function.
+ */
+function createInverter(setter, toIteratee) {
+ return function(object, iteratee) {
+ return baseInverter(object, setter, toIteratee(iteratee), {});
+ };
+}
+
+module.exports = createInverter;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createMathOperation.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createMathOperation.js
new file mode 100644
index 0000000..f1e238a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createMathOperation.js
@@ -0,0 +1,38 @@
+var baseToNumber = require('./_baseToNumber'),
+ baseToString = require('./_baseToString');
+
+/**
+ * Creates a function that performs a mathematical operation on two values.
+ *
+ * @private
+ * @param {Function} operator The function to perform the operation.
+ * @param {number} [defaultValue] The value used for `undefined` arguments.
+ * @returns {Function} Returns the new mathematical operation function.
+ */
+function createMathOperation(operator, defaultValue) {
+ return function(value, other) {
+ var result;
+ if (value === undefined && other === undefined) {
+ return defaultValue;
+ }
+ if (value !== undefined) {
+ result = value;
+ }
+ if (other !== undefined) {
+ if (result === undefined) {
+ return other;
+ }
+ if (typeof value == 'string' || typeof other == 'string') {
+ value = baseToString(value);
+ other = baseToString(other);
+ } else {
+ value = baseToNumber(value);
+ other = baseToNumber(other);
+ }
+ result = operator(value, other);
+ }
+ return result;
+ };
+}
+
+module.exports = createMathOperation;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createOver.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createOver.js
new file mode 100644
index 0000000..3b94551
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createOver.js
@@ -0,0 +1,27 @@
+var apply = require('./_apply'),
+ arrayMap = require('./_arrayMap'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest'),
+ baseUnary = require('./_baseUnary'),
+ flatRest = require('./_flatRest');
+
+/**
+ * Creates a function like `_.over`.
+ *
+ * @private
+ * @param {Function} arrayFunc The function to iterate over iteratees.
+ * @returns {Function} Returns the new over function.
+ */
+function createOver(arrayFunc) {
+ return flatRest(function(iteratees) {
+ iteratees = arrayMap(iteratees, baseUnary(baseIteratee));
+ return baseRest(function(args) {
+ var thisArg = this;
+ return arrayFunc(iteratees, function(iteratee) {
+ return apply(iteratee, thisArg, args);
+ });
+ });
+ });
+}
+
+module.exports = createOver;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createPadding.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createPadding.js
new file mode 100644
index 0000000..2124612
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createPadding.js
@@ -0,0 +1,33 @@
+var baseRepeat = require('./_baseRepeat'),
+ baseToString = require('./_baseToString'),
+ castSlice = require('./_castSlice'),
+ hasUnicode = require('./_hasUnicode'),
+ stringSize = require('./_stringSize'),
+ stringToArray = require('./_stringToArray');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeCeil = Math.ceil;
+
+/**
+ * Creates the padding for `string` based on `length`. The `chars` string
+ * is truncated if the number of characters exceeds `length`.
+ *
+ * @private
+ * @param {number} length The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padding for `string`.
+ */
+function createPadding(length, chars) {
+ chars = chars === undefined ? ' ' : baseToString(chars);
+
+ var charsLength = chars.length;
+ if (charsLength < 2) {
+ return charsLength ? baseRepeat(chars, length) : chars;
+ }
+ var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
+ return hasUnicode(chars)
+ ? castSlice(stringToArray(result), 0, length).join('')
+ : result.slice(0, length);
+}
+
+module.exports = createPadding;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createPartial.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createPartial.js
new file mode 100644
index 0000000..e16c248
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createPartial.js
@@ -0,0 +1,43 @@
+var apply = require('./_apply'),
+ createCtor = require('./_createCtor'),
+ root = require('./_root');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1;
+
+/**
+ * Creates a function that wraps `func` to invoke it with the `this` binding
+ * of `thisArg` and `partials` prepended to the arguments it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} partials The arguments to prepend to those provided to
+ * the new function.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createPartial(func, bitmask, thisArg, partials) {
+ var isBind = bitmask & WRAP_BIND_FLAG,
+ Ctor = createCtor(func);
+
+ function wrapper() {
+ var argsIndex = -1,
+ argsLength = arguments.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ args = Array(leftLength + argsLength),
+ fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+
+ while (++leftIndex < leftLength) {
+ args[leftIndex] = partials[leftIndex];
+ }
+ while (argsLength--) {
+ args[leftIndex++] = arguments[++argsIndex];
+ }
+ return apply(fn, isBind ? thisArg : this, args);
+ }
+ return wrapper;
+}
+
+module.exports = createPartial;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createRange.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createRange.js
new file mode 100644
index 0000000..9f52c77
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createRange.js
@@ -0,0 +1,30 @@
+var baseRange = require('./_baseRange'),
+ isIterateeCall = require('./_isIterateeCall'),
+ toFinite = require('./toFinite');
+
+/**
+ * Creates a `_.range` or `_.rangeRight` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new range function.
+ */
+function createRange(fromRight) {
+ return function(start, end, step) {
+ if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
+ end = step = undefined;
+ }
+ // Ensure the sign of `-0` is preserved.
+ start = toFinite(start);
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = toFinite(end);
+ }
+ step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
+ return baseRange(start, end, step, fromRight);
+ };
+}
+
+module.exports = createRange;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createRecurry.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createRecurry.js
new file mode 100644
index 0000000..eb29fb2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createRecurry.js
@@ -0,0 +1,56 @@
+var isLaziable = require('./_isLaziable'),
+ setData = require('./_setData'),
+ setWrapToString = require('./_setWrapToString');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_CURRY_BOUND_FLAG = 4,
+ WRAP_CURRY_FLAG = 8,
+ WRAP_PARTIAL_FLAG = 32,
+ WRAP_PARTIAL_RIGHT_FLAG = 64;
+
+/**
+ * Creates a function that wraps `func` to continue currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {Function} wrapFunc The function to create the `func` wrapper.
+ * @param {*} placeholder The placeholder value.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ * the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
+ var isCurry = bitmask & WRAP_CURRY_FLAG,
+ newHolders = isCurry ? holders : undefined,
+ newHoldersRight = isCurry ? undefined : holders,
+ newPartials = isCurry ? partials : undefined,
+ newPartialsRight = isCurry ? undefined : partials;
+
+ bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
+ bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
+
+ if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
+ bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
+ }
+ var newData = [
+ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
+ newHoldersRight, argPos, ary, arity
+ ];
+
+ var result = wrapFunc.apply(undefined, newData);
+ if (isLaziable(func)) {
+ setData(result, newData);
+ }
+ result.placeholder = placeholder;
+ return setWrapToString(result, func, bitmask);
+}
+
+module.exports = createRecurry;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createRelationalOperation.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createRelationalOperation.js
new file mode 100644
index 0000000..a17c6b5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createRelationalOperation.js
@@ -0,0 +1,20 @@
+var toNumber = require('./toNumber');
+
+/**
+ * Creates a function that performs a relational operation on two values.
+ *
+ * @private
+ * @param {Function} operator The function to perform the operation.
+ * @returns {Function} Returns the new relational operation function.
+ */
+function createRelationalOperation(operator) {
+ return function(value, other) {
+ if (!(typeof value == 'string' && typeof other == 'string')) {
+ value = toNumber(value);
+ other = toNumber(other);
+ }
+ return operator(value, other);
+ };
+}
+
+module.exports = createRelationalOperation;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createRound.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createRound.js
new file mode 100644
index 0000000..74b20d4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createRound.js
@@ -0,0 +1,33 @@
+var toInteger = require('./toInteger'),
+ toNumber = require('./toNumber'),
+ toString = require('./toString');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * Creates a function like `_.round`.
+ *
+ * @private
+ * @param {string} methodName The name of the `Math` method to use when rounding.
+ * @returns {Function} Returns the new round function.
+ */
+function createRound(methodName) {
+ var func = Math[methodName];
+ return function(number, precision) {
+ number = toNumber(number);
+ precision = nativeMin(toInteger(precision), 292);
+ if (precision) {
+ // Shift with exponential notation to avoid floating-point issues.
+ // See [MDN](https://mdn.io/round#Examples) for more details.
+ var pair = (toString(number) + 'e').split('e'),
+ value = func(pair[0] + 'e' + (+pair[1] + precision));
+
+ pair = (toString(value) + 'e').split('e');
+ return +(pair[0] + 'e' + (+pair[1] - precision));
+ }
+ return func(number);
+ };
+}
+
+module.exports = createRound;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createSet.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createSet.js
new file mode 100644
index 0000000..0f644ee
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createSet.js
@@ -0,0 +1,19 @@
+var Set = require('./_Set'),
+ noop = require('./noop'),
+ setToArray = require('./_setToArray');
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/**
+ * Creates a set object of `values`.
+ *
+ * @private
+ * @param {Array} values The values to add to the set.
+ * @returns {Object} Returns the new set.
+ */
+var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
+ return new Set(values);
+};
+
+module.exports = createSet;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createToPairs.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createToPairs.js
new file mode 100644
index 0000000..568417a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createToPairs.js
@@ -0,0 +1,30 @@
+var baseToPairs = require('./_baseToPairs'),
+ getTag = require('./_getTag'),
+ mapToArray = require('./_mapToArray'),
+ setToPairs = require('./_setToPairs');
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+ setTag = '[object Set]';
+
+/**
+ * Creates a `_.toPairs` or `_.toPairsIn` function.
+ *
+ * @private
+ * @param {Function} keysFunc The function to get the keys of a given object.
+ * @returns {Function} Returns the new pairs function.
+ */
+function createToPairs(keysFunc) {
+ return function(object) {
+ var tag = getTag(object);
+ if (tag == mapTag) {
+ return mapToArray(object);
+ }
+ if (tag == setTag) {
+ return setToPairs(object);
+ }
+ return baseToPairs(object, keysFunc(object));
+ };
+}
+
+module.exports = createToPairs;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createWrap.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createWrap.js
new file mode 100644
index 0000000..f14b968
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_createWrap.js
@@ -0,0 +1,106 @@
+var baseSetData = require('./_baseSetData'),
+ createBind = require('./_createBind'),
+ createCurry = require('./_createCurry'),
+ createHybrid = require('./_createHybrid'),
+ createPartial = require('./_createPartial'),
+ getData = require('./_getData'),
+ mergeData = require('./_mergeData'),
+ setData = require('./_setData'),
+ setWrapToString = require('./_setWrapToString'),
+ toInteger = require('./toInteger');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_CURRY_FLAG = 8,
+ WRAP_CURRY_RIGHT_FLAG = 16,
+ WRAP_PARTIAL_FLAG = 32,
+ WRAP_PARTIAL_RIGHT_FLAG = 64;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Creates a function that either curries or invokes `func` with optional
+ * `this` binding and partially applied arguments.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask flags.
+ * 1 - `_.bind`
+ * 2 - `_.bindKey`
+ * 4 - `_.curry` or `_.curryRight` of a bound function
+ * 8 - `_.curry`
+ * 16 - `_.curryRight`
+ * 32 - `_.partial`
+ * 64 - `_.partialRight`
+ * 128 - `_.rearg`
+ * 256 - `_.ary`
+ * 512 - `_.flip`
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to be partially applied.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
+ var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
+ if (!isBindKey && typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var length = partials ? partials.length : 0;
+ if (!length) {
+ bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
+ partials = holders = undefined;
+ }
+ ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
+ arity = arity === undefined ? arity : toInteger(arity);
+ length -= holders ? holders.length : 0;
+
+ if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
+ var partialsRight = partials,
+ holdersRight = holders;
+
+ partials = holders = undefined;
+ }
+ var data = isBindKey ? undefined : getData(func);
+
+ var newData = [
+ func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
+ argPos, ary, arity
+ ];
+
+ if (data) {
+ mergeData(newData, data);
+ }
+ func = newData[0];
+ bitmask = newData[1];
+ thisArg = newData[2];
+ partials = newData[3];
+ holders = newData[4];
+ arity = newData[9] = newData[9] == null
+ ? (isBindKey ? 0 : func.length)
+ : nativeMax(newData[9] - length, 0);
+
+ if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
+ bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
+ }
+ if (!bitmask || bitmask == WRAP_BIND_FLAG) {
+ var result = createBind(func, bitmask, thisArg);
+ } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
+ result = createCurry(func, bitmask, arity);
+ } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
+ result = createPartial(func, bitmask, thisArg, partials);
+ } else {
+ result = createHybrid.apply(undefined, newData);
+ }
+ var setter = data ? baseSetData : setData;
+ return setWrapToString(setter(result, newData), func, bitmask);
+}
+
+module.exports = createWrap;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_deburrLetter.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_deburrLetter.js
new file mode 100644
index 0000000..3e531ed
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_deburrLetter.js
@@ -0,0 +1,71 @@
+var basePropertyOf = require('./_basePropertyOf');
+
+/** Used to map Latin Unicode letters to basic Latin letters. */
+var deburredLetters = {
+ // Latin-1 Supplement block.
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
+ '\xc7': 'C', '\xe7': 'c',
+ '\xd0': 'D', '\xf0': 'd',
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
+ '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
+ '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
+ '\xd1': 'N', '\xf1': 'n',
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
+ '\xc6': 'Ae', '\xe6': 'ae',
+ '\xde': 'Th', '\xfe': 'th',
+ '\xdf': 'ss',
+ // Latin Extended-A block.
+ '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
+ '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
+ '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
+ '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
+ '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
+ '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
+ '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
+ '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
+ '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
+ '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
+ '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
+ '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
+ '\u0134': 'J', '\u0135': 'j',
+ '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
+ '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
+ '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
+ '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
+ '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
+ '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
+ '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
+ '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
+ '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
+ '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
+ '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
+ '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
+ '\u0163': 't', '\u0165': 't', '\u0167': 't',
+ '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
+ '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
+ '\u0174': 'W', '\u0175': 'w',
+ '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
+ '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
+ '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
+ '\u0132': 'IJ', '\u0133': 'ij',
+ '\u0152': 'Oe', '\u0153': 'oe',
+ '\u0149': "'n", '\u017f': 's'
+};
+
+/**
+ * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
+ * letters to basic Latin letters.
+ *
+ * @private
+ * @param {string} letter The matched letter to deburr.
+ * @returns {string} Returns the deburred letter.
+ */
+var deburrLetter = basePropertyOf(deburredLetters);
+
+module.exports = deburrLetter;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_defineProperty.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_defineProperty.js
new file mode 100644
index 0000000..b6116d9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_defineProperty.js
@@ -0,0 +1,11 @@
+var getNative = require('./_getNative');
+
+var defineProperty = (function() {
+ try {
+ var func = getNative(Object, 'defineProperty');
+ func({}, '', {});
+ return func;
+ } catch (e) {}
+}());
+
+module.exports = defineProperty;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_equalArrays.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_equalArrays.js
new file mode 100644
index 0000000..f6a3b7c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_equalArrays.js
@@ -0,0 +1,83 @@
+var SetCache = require('./_SetCache'),
+ arraySome = require('./_arraySome'),
+ cacheHas = require('./_cacheHas');
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+/**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(array);
+ if (stacked && stack.get(other)) {
+ return stacked == other;
+ }
+ var index = -1,
+ result = true,
+ seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
+
+ stack.set(array, other);
+ stack.set(other, array);
+
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, arrValue, index, other, array, stack)
+ : customizer(arrValue, othValue, index, array, other, stack);
+ }
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
+ }
+ result = false;
+ break;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (seen) {
+ if (!arraySome(other, function(othValue, othIndex) {
+ if (!cacheHas(seen, othIndex) &&
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
+ return seen.push(othIndex);
+ }
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
+ )) {
+ result = false;
+ break;
+ }
+ }
+ stack['delete'](array);
+ stack['delete'](other);
+ return result;
+}
+
+module.exports = equalArrays;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_equalByTag.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_equalByTag.js
new file mode 100644
index 0000000..71919e8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_equalByTag.js
@@ -0,0 +1,112 @@
+var Symbol = require('./_Symbol'),
+ Uint8Array = require('./_Uint8Array'),
+ eq = require('./eq'),
+ equalArrays = require('./_equalArrays'),
+ mapToArray = require('./_mapToArray'),
+ setToArray = require('./_setToArray');
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+/** `Object#toString` result references. */
+var boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]';
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
+
+/**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
+ switch (tag) {
+ case dataViewTag:
+ if ((object.byteLength != other.byteLength) ||
+ (object.byteOffset != other.byteOffset)) {
+ return false;
+ }
+ object = object.buffer;
+ other = other.buffer;
+
+ case arrayBufferTag:
+ if ((object.byteLength != other.byteLength) ||
+ !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
+ return false;
+ }
+ return true;
+
+ case boolTag:
+ case dateTag:
+ case numberTag:
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
+ // Invalid dates are coerced to `NaN`.
+ return eq(+object, +other);
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings, primitives and objects,
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
+ // for more details.
+ return object == (other + '');
+
+ case mapTag:
+ var convert = mapToArray;
+
+ case setTag:
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
+ convert || (convert = setToArray);
+
+ if (object.size != other.size && !isPartial) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked) {
+ return stacked == other;
+ }
+ bitmask |= COMPARE_UNORDERED_FLAG;
+
+ // Recursively compare objects (susceptible to call stack limits).
+ stack.set(object, other);
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
+ stack['delete'](object);
+ return result;
+
+ case symbolTag:
+ if (symbolValueOf) {
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
+ }
+ }
+ return false;
+}
+
+module.exports = equalByTag;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_equalObjects.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_equalObjects.js
new file mode 100644
index 0000000..7044ae9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_equalObjects.js
@@ -0,0 +1,89 @@
+var keys = require('./keys');
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1;
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ objProps = keys(object),
+ objLength = objProps.length,
+ othProps = keys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked && stack.get(other)) {
+ return stacked == other;
+ }
+ var result = true;
+ stack.set(object, other);
+ stack.set(other, object);
+
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, objValue, key, other, object, stack)
+ : customizer(objValue, othValue, key, object, other, stack);
+ }
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
+ }
+ }
+ stack['delete'](object);
+ stack['delete'](other);
+ return result;
+}
+
+module.exports = equalObjects;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_escapeHtmlChar.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_escapeHtmlChar.js
new file mode 100644
index 0000000..7ca68ee
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_escapeHtmlChar.js
@@ -0,0 +1,21 @@
+var basePropertyOf = require('./_basePropertyOf');
+
+/** Used to map characters to HTML entities. */
+var htmlEscapes = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#39;'
+};
+
+/**
+ * Used by `_.escape` to convert characters to HTML entities.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+var escapeHtmlChar = basePropertyOf(htmlEscapes);
+
+module.exports = escapeHtmlChar;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_escapeStringChar.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_escapeStringChar.js
new file mode 100644
index 0000000..44eca96
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_escapeStringChar.js
@@ -0,0 +1,22 @@
+/** Used to escape characters for inclusion in compiled string literals. */
+var stringEscapes = {
+ '\\': '\\',
+ "'": "'",
+ '\n': 'n',
+ '\r': 'r',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+};
+
+/**
+ * Used by `_.template` to escape characters for inclusion in compiled string literals.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+function escapeStringChar(chr) {
+ return '\\' + stringEscapes[chr];
+}
+
+module.exports = escapeStringChar;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_flatRest.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_flatRest.js
new file mode 100644
index 0000000..94ab6cc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_flatRest.js
@@ -0,0 +1,16 @@
+var flatten = require('./flatten'),
+ overRest = require('./_overRest'),
+ setToString = require('./_setToString');
+
+/**
+ * A specialized version of `baseRest` which flattens the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+function flatRest(func) {
+ return setToString(overRest(func, undefined, flatten), func + '');
+}
+
+module.exports = flatRest;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_freeGlobal.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_freeGlobal.js
new file mode 100644
index 0000000..bbec998
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_freeGlobal.js
@@ -0,0 +1,4 @@
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+module.exports = freeGlobal;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getAllKeys.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getAllKeys.js
new file mode 100644
index 0000000..a9ce699
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getAllKeys.js
@@ -0,0 +1,16 @@
+var baseGetAllKeys = require('./_baseGetAllKeys'),
+ getSymbols = require('./_getSymbols'),
+ keys = require('./keys');
+
+/**
+ * Creates an array of own enumerable property names and symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function getAllKeys(object) {
+ return baseGetAllKeys(object, keys, getSymbols);
+}
+
+module.exports = getAllKeys;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getAllKeysIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getAllKeysIn.js
new file mode 100644
index 0000000..1b46678
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getAllKeysIn.js
@@ -0,0 +1,17 @@
+var baseGetAllKeys = require('./_baseGetAllKeys'),
+ getSymbolsIn = require('./_getSymbolsIn'),
+ keysIn = require('./keysIn');
+
+/**
+ * Creates an array of own and inherited enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function getAllKeysIn(object) {
+ return baseGetAllKeys(object, keysIn, getSymbolsIn);
+}
+
+module.exports = getAllKeysIn;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getData.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getData.js
new file mode 100644
index 0000000..a1fe7b7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getData.js
@@ -0,0 +1,15 @@
+var metaMap = require('./_metaMap'),
+ noop = require('./noop');
+
+/**
+ * Gets metadata for `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {*} Returns the metadata for `func`.
+ */
+var getData = !metaMap ? noop : function(func) {
+ return metaMap.get(func);
+};
+
+module.exports = getData;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getFuncName.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getFuncName.js
new file mode 100644
index 0000000..21e15b3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getFuncName.js
@@ -0,0 +1,31 @@
+var realNames = require('./_realNames');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Gets the name of `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {string} Returns the function name.
+ */
+function getFuncName(func) {
+ var result = (func.name + ''),
+ array = realNames[result],
+ length = hasOwnProperty.call(realNames, result) ? array.length : 0;
+
+ while (length--) {
+ var data = array[length],
+ otherFunc = data.func;
+ if (otherFunc == null || otherFunc == func) {
+ return data.name;
+ }
+ }
+ return result;
+}
+
+module.exports = getFuncName;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getHolder.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getHolder.js
new file mode 100644
index 0000000..65e94b5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getHolder.js
@@ -0,0 +1,13 @@
+/**
+ * Gets the argument placeholder value for `func`.
+ *
+ * @private
+ * @param {Function} func The function to inspect.
+ * @returns {*} Returns the placeholder value.
+ */
+function getHolder(func) {
+ var object = func;
+ return object.placeholder;
+}
+
+module.exports = getHolder;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getMapData.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getMapData.js
new file mode 100644
index 0000000..17f6303
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getMapData.js
@@ -0,0 +1,18 @@
+var isKeyable = require('./_isKeyable');
+
+/**
+ * Gets the data for `map`.
+ *
+ * @private
+ * @param {Object} map The map to query.
+ * @param {string} key The reference key.
+ * @returns {*} Returns the map data.
+ */
+function getMapData(map, key) {
+ var data = map.__data__;
+ return isKeyable(key)
+ ? data[typeof key == 'string' ? 'string' : 'hash']
+ : data.map;
+}
+
+module.exports = getMapData;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getMatchData.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getMatchData.js
new file mode 100644
index 0000000..2cc70f9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getMatchData.js
@@ -0,0 +1,24 @@
+var isStrictComparable = require('./_isStrictComparable'),
+ keys = require('./keys');
+
+/**
+ * Gets the property names, values, and compare flags of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the match data of `object`.
+ */
+function getMatchData(object) {
+ var result = keys(object),
+ length = result.length;
+
+ while (length--) {
+ var key = result[length],
+ value = object[key];
+
+ result[length] = [key, value, isStrictComparable(value)];
+ }
+ return result;
+}
+
+module.exports = getMatchData;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getNative.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getNative.js
new file mode 100644
index 0000000..97a622b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getNative.js
@@ -0,0 +1,17 @@
+var baseIsNative = require('./_baseIsNative'),
+ getValue = require('./_getValue');
+
+/**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+function getNative(object, key) {
+ var value = getValue(object, key);
+ return baseIsNative(value) ? value : undefined;
+}
+
+module.exports = getNative;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getPrototype.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getPrototype.js
new file mode 100644
index 0000000..e808612
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getPrototype.js
@@ -0,0 +1,6 @@
+var overArg = require('./_overArg');
+
+/** Built-in value references. */
+var getPrototype = overArg(Object.getPrototypeOf, Object);
+
+module.exports = getPrototype;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getRawTag.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getRawTag.js
new file mode 100644
index 0000000..49a95c9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getRawTag.js
@@ -0,0 +1,46 @@
+var Symbol = require('./_Symbol');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var nativeObjectToString = objectProto.toString;
+
+/** Built-in value references. */
+var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
+
+/**
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the raw `toStringTag`.
+ */
+function getRawTag(value) {
+ var isOwn = hasOwnProperty.call(value, symToStringTag),
+ tag = value[symToStringTag];
+
+ try {
+ value[symToStringTag] = undefined;
+ var unmasked = true;
+ } catch (e) {}
+
+ var result = nativeObjectToString.call(value);
+ if (unmasked) {
+ if (isOwn) {
+ value[symToStringTag] = tag;
+ } else {
+ delete value[symToStringTag];
+ }
+ }
+ return result;
+}
+
+module.exports = getRawTag;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getSymbols.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getSymbols.js
new file mode 100644
index 0000000..b53c127
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getSymbols.js
@@ -0,0 +1,16 @@
+var overArg = require('./_overArg'),
+ stubArray = require('./stubArray');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeGetSymbols = Object.getOwnPropertySymbols;
+
+/**
+ * Creates an array of the own enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
+
+module.exports = getSymbols;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getSymbolsIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getSymbolsIn.js
new file mode 100644
index 0000000..cec0855
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getSymbolsIn.js
@@ -0,0 +1,25 @@
+var arrayPush = require('./_arrayPush'),
+ getPrototype = require('./_getPrototype'),
+ getSymbols = require('./_getSymbols'),
+ stubArray = require('./stubArray');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeGetSymbols = Object.getOwnPropertySymbols;
+
+/**
+ * Creates an array of the own and inherited enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
+ var result = [];
+ while (object) {
+ arrayPush(result, getSymbols(object));
+ object = getPrototype(object);
+ }
+ return result;
+};
+
+module.exports = getSymbolsIn;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getTag.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getTag.js
new file mode 100644
index 0000000..deaf89d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getTag.js
@@ -0,0 +1,58 @@
+var DataView = require('./_DataView'),
+ Map = require('./_Map'),
+ Promise = require('./_Promise'),
+ Set = require('./_Set'),
+ WeakMap = require('./_WeakMap'),
+ baseGetTag = require('./_baseGetTag'),
+ toSource = require('./_toSource');
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+ objectTag = '[object Object]',
+ promiseTag = '[object Promise]',
+ setTag = '[object Set]',
+ weakMapTag = '[object WeakMap]';
+
+var dataViewTag = '[object DataView]';
+
+/** Used to detect maps, sets, and weakmaps. */
+var dataViewCtorString = toSource(DataView),
+ mapCtorString = toSource(Map),
+ promiseCtorString = toSource(Promise),
+ setCtorString = toSource(Set),
+ weakMapCtorString = toSource(WeakMap);
+
+/**
+ * Gets the `toStringTag` of `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+var getTag = baseGetTag;
+
+// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
+if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
+ (Map && getTag(new Map) != mapTag) ||
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
+ (Set && getTag(new Set) != setTag) ||
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
+ getTag = function(value) {
+ var result = baseGetTag(value),
+ Ctor = result == objectTag ? value.constructor : undefined,
+ ctorString = Ctor ? toSource(Ctor) : '';
+
+ if (ctorString) {
+ switch (ctorString) {
+ case dataViewCtorString: return dataViewTag;
+ case mapCtorString: return mapTag;
+ case promiseCtorString: return promiseTag;
+ case setCtorString: return setTag;
+ case weakMapCtorString: return weakMapTag;
+ }
+ }
+ return result;
+ };
+}
+
+module.exports = getTag;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getValue.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getValue.js
new file mode 100644
index 0000000..5f7d773
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getValue.js
@@ -0,0 +1,13 @@
+/**
+ * Gets the value at `key` of `object`.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+function getValue(object, key) {
+ return object == null ? undefined : object[key];
+}
+
+module.exports = getValue;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getView.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getView.js
new file mode 100644
index 0000000..df1e5d4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getView.js
@@ -0,0 +1,33 @@
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max,
+ nativeMin = Math.min;
+
+/**
+ * Gets the view, applying any `transforms` to the `start` and `end` positions.
+ *
+ * @private
+ * @param {number} start The start of the view.
+ * @param {number} end The end of the view.
+ * @param {Array} transforms The transformations to apply to the view.
+ * @returns {Object} Returns an object containing the `start` and `end`
+ * positions of the view.
+ */
+function getView(start, end, transforms) {
+ var index = -1,
+ length = transforms.length;
+
+ while (++index < length) {
+ var data = transforms[index],
+ size = data.size;
+
+ switch (data.type) {
+ case 'drop': start += size; break;
+ case 'dropRight': end -= size; break;
+ case 'take': end = nativeMin(end, start + size); break;
+ case 'takeRight': start = nativeMax(start, end - size); break;
+ }
+ }
+ return { 'start': start, 'end': end };
+}
+
+module.exports = getView;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getWrapDetails.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getWrapDetails.js
new file mode 100644
index 0000000..3bcc6e4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_getWrapDetails.js
@@ -0,0 +1,17 @@
+/** Used to match wrap detail comments. */
+var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
+ reSplitDetails = /,? & /;
+
+/**
+ * Extracts wrapper details from the `source` body comment.
+ *
+ * @private
+ * @param {string} source The source to inspect.
+ * @returns {Array} Returns the wrapper details.
+ */
+function getWrapDetails(source) {
+ var match = source.match(reWrapDetails);
+ return match ? match[1].split(reSplitDetails) : [];
+}
+
+module.exports = getWrapDetails;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hasPath.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hasPath.js
new file mode 100644
index 0000000..93dbde1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hasPath.js
@@ -0,0 +1,39 @@
+var castPath = require('./_castPath'),
+ isArguments = require('./isArguments'),
+ isArray = require('./isArray'),
+ isIndex = require('./_isIndex'),
+ isLength = require('./isLength'),
+ toKey = require('./_toKey');
+
+/**
+ * Checks if `path` exists on `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @param {Function} hasFunc The function to check properties.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ */
+function hasPath(object, path, hasFunc) {
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length,
+ result = false;
+
+ while (++index < length) {
+ var key = toKey(path[index]);
+ if (!(result = object != null && hasFunc(object, key))) {
+ break;
+ }
+ object = object[key];
+ }
+ if (result || ++index != length) {
+ return result;
+ }
+ length = object == null ? 0 : object.length;
+ return !!length && isLength(length) && isIndex(key, length) &&
+ (isArray(object) || isArguments(object));
+}
+
+module.exports = hasPath;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hasUnicode.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hasUnicode.js
new file mode 100644
index 0000000..cb6ca15
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hasUnicode.js
@@ -0,0 +1,26 @@
+/** Used to compose unicode character classes. */
+var rsAstralRange = '\\ud800-\\udfff',
+ rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
+ rsVarRange = '\\ufe0e\\ufe0f';
+
+/** Used to compose unicode capture groups. */
+var rsZWJ = '\\u200d';
+
+/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
+var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
+
+/**
+ * Checks if `string` contains Unicode symbols.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {boolean} Returns `true` if a symbol is found, else `false`.
+ */
+function hasUnicode(string) {
+ return reHasUnicode.test(string);
+}
+
+module.exports = hasUnicode;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hasUnicodeWord.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hasUnicodeWord.js
new file mode 100644
index 0000000..a35d6e5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hasUnicodeWord.js
@@ -0,0 +1,15 @@
+/** Used to detect strings that need a more robust regexp to match words. */
+var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
+
+/**
+ * Checks if `string` contains a word composed of Unicode symbols.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {boolean} Returns `true` if a word is found, else `false`.
+ */
+function hasUnicodeWord(string) {
+ return reHasUnicodeWord.test(string);
+}
+
+module.exports = hasUnicodeWord;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hashClear.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hashClear.js
new file mode 100644
index 0000000..5d4b70c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hashClear.js
@@ -0,0 +1,15 @@
+var nativeCreate = require('./_nativeCreate');
+
+/**
+ * Removes all key-value entries from the hash.
+ *
+ * @private
+ * @name clear
+ * @memberOf Hash
+ */
+function hashClear() {
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
+ this.size = 0;
+}
+
+module.exports = hashClear;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hashDelete.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hashDelete.js
new file mode 100644
index 0000000..ea9dabf
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hashDelete.js
@@ -0,0 +1,17 @@
+/**
+ * Removes `key` and its value from the hash.
+ *
+ * @private
+ * @name delete
+ * @memberOf Hash
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function hashDelete(key) {
+ var result = this.has(key) && delete this.__data__[key];
+ this.size -= result ? 1 : 0;
+ return result;
+}
+
+module.exports = hashDelete;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hashGet.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hashGet.js
new file mode 100644
index 0000000..1fc2f34
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hashGet.js
@@ -0,0 +1,30 @@
+var nativeCreate = require('./_nativeCreate');
+
+/** Used to stand-in for `undefined` hash values. */
+var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Gets the hash value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Hash
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function hashGet(key) {
+ var data = this.__data__;
+ if (nativeCreate) {
+ var result = data[key];
+ return result === HASH_UNDEFINED ? undefined : result;
+ }
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
+}
+
+module.exports = hashGet;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hashHas.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hashHas.js
new file mode 100644
index 0000000..f30aac3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hashHas.js
@@ -0,0 +1,23 @@
+var nativeCreate = require('./_nativeCreate');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Hash
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function hashHas(key) {
+ var data = this.__data__;
+ return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
+}
+
+module.exports = hashHas;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hashSet.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hashSet.js
new file mode 100644
index 0000000..e105528
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_hashSet.js
@@ -0,0 +1,23 @@
+var nativeCreate = require('./_nativeCreate');
+
+/** Used to stand-in for `undefined` hash values. */
+var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+/**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Hash
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the hash instance.
+ */
+function hashSet(key, value) {
+ var data = this.__data__;
+ this.size += this.has(key) ? 0 : 1;
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+ return this;
+}
+
+module.exports = hashSet;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_initCloneArray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_initCloneArray.js
new file mode 100644
index 0000000..aef0212
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_initCloneArray.js
@@ -0,0 +1,26 @@
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Initializes an array clone.
+ *
+ * @private
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the initialized clone.
+ */
+function initCloneArray(array) {
+ var length = array.length,
+ result = array.constructor(length);
+
+ // Add properties assigned by `RegExp#exec`.
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
+ result.index = array.index;
+ result.input = array.input;
+ }
+ return result;
+}
+
+module.exports = initCloneArray;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_initCloneByTag.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_initCloneByTag.js
new file mode 100644
index 0000000..e7b77ed
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_initCloneByTag.js
@@ -0,0 +1,80 @@
+var cloneArrayBuffer = require('./_cloneArrayBuffer'),
+ cloneDataView = require('./_cloneDataView'),
+ cloneMap = require('./_cloneMap'),
+ cloneRegExp = require('./_cloneRegExp'),
+ cloneSet = require('./_cloneSet'),
+ cloneSymbol = require('./_cloneSymbol'),
+ cloneTypedArray = require('./_cloneTypedArray');
+
+/** `Object#toString` result references. */
+var boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+/**
+ * Initializes an object clone based on its `toStringTag`.
+ *
+ * **Note:** This function only supports cloning values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @param {string} tag The `toStringTag` of the object to clone.
+ * @param {Function} cloneFunc The function to clone values.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+function initCloneByTag(object, tag, cloneFunc, isDeep) {
+ var Ctor = object.constructor;
+ switch (tag) {
+ case arrayBufferTag:
+ return cloneArrayBuffer(object);
+
+ case boolTag:
+ case dateTag:
+ return new Ctor(+object);
+
+ case dataViewTag:
+ return cloneDataView(object, isDeep);
+
+ case float32Tag: case float64Tag:
+ case int8Tag: case int16Tag: case int32Tag:
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
+ return cloneTypedArray(object, isDeep);
+
+ case mapTag:
+ return cloneMap(object, isDeep, cloneFunc);
+
+ case numberTag:
+ case stringTag:
+ return new Ctor(object);
+
+ case regexpTag:
+ return cloneRegExp(object);
+
+ case setTag:
+ return cloneSet(object, isDeep, cloneFunc);
+
+ case symbolTag:
+ return cloneSymbol(object);
+ }
+}
+
+module.exports = initCloneByTag;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_initCloneObject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_initCloneObject.js
new file mode 100644
index 0000000..5a13e64
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_initCloneObject.js
@@ -0,0 +1,18 @@
+var baseCreate = require('./_baseCreate'),
+ getPrototype = require('./_getPrototype'),
+ isPrototype = require('./_isPrototype');
+
+/**
+ * Initializes an object clone.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+function initCloneObject(object) {
+ return (typeof object.constructor == 'function' && !isPrototype(object))
+ ? baseCreate(getPrototype(object))
+ : {};
+}
+
+module.exports = initCloneObject;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_insertWrapDetails.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_insertWrapDetails.js
new file mode 100644
index 0000000..e790808
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_insertWrapDetails.js
@@ -0,0 +1,23 @@
+/** Used to match wrap detail comments. */
+var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;
+
+/**
+ * Inserts wrapper `details` in a comment at the top of the `source` body.
+ *
+ * @private
+ * @param {string} source The source to modify.
+ * @returns {Array} details The details to insert.
+ * @returns {string} Returns the modified source.
+ */
+function insertWrapDetails(source, details) {
+ var length = details.length;
+ if (!length) {
+ return source;
+ }
+ var lastIndex = length - 1;
+ details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
+ details = details.join(length > 2 ? ', ' : ' ');
+ return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
+}
+
+module.exports = insertWrapDetails;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isFlattenable.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isFlattenable.js
new file mode 100644
index 0000000..4cc2c24
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isFlattenable.js
@@ -0,0 +1,20 @@
+var Symbol = require('./_Symbol'),
+ isArguments = require('./isArguments'),
+ isArray = require('./isArray');
+
+/** Built-in value references. */
+var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
+
+/**
+ * Checks if `value` is a flattenable `arguments` object or array.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
+ */
+function isFlattenable(value) {
+ return isArray(value) || isArguments(value) ||
+ !!(spreadableSymbol && value && value[spreadableSymbol]);
+}
+
+module.exports = isFlattenable;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isIndex.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isIndex.js
new file mode 100644
index 0000000..e123dde
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isIndex.js
@@ -0,0 +1,22 @@
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/** Used to detect unsigned integer values. */
+var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+/**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+function isIndex(value, length) {
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return !!length &&
+ (typeof value == 'number' || reIsUint.test(value)) &&
+ (value > -1 && value % 1 == 0 && value < length);
+}
+
+module.exports = isIndex;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isIterateeCall.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isIterateeCall.js
new file mode 100644
index 0000000..a0bb5a9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isIterateeCall.js
@@ -0,0 +1,30 @@
+var eq = require('./eq'),
+ isArrayLike = require('./isArrayLike'),
+ isIndex = require('./_isIndex'),
+ isObject = require('./isObject');
+
+/**
+ * Checks if the given arguments are from an iteratee call.
+ *
+ * @private
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
+ * else `false`.
+ */
+function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)
+ ) {
+ return eq(object[index], value);
+ }
+ return false;
+}
+
+module.exports = isIterateeCall;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isKey.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isKey.js
new file mode 100644
index 0000000..ff08b06
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isKey.js
@@ -0,0 +1,29 @@
+var isArray = require('./isArray'),
+ isSymbol = require('./isSymbol');
+
+/** Used to match property names within property paths. */
+var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/;
+
+/**
+ * Checks if `value` is a property name and not a property path.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+ */
+function isKey(value, object) {
+ if (isArray(value)) {
+ return false;
+ }
+ var type = typeof value;
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
+ value == null || isSymbol(value)) {
+ return true;
+ }
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
+ (object != null && value in Object(object));
+}
+
+module.exports = isKey;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isKeyable.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isKeyable.js
new file mode 100644
index 0000000..39f1828
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isKeyable.js
@@ -0,0 +1,15 @@
+/**
+ * Checks if `value` is suitable for use as unique object key.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
+ */
+function isKeyable(value) {
+ var type = typeof value;
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+ ? (value !== '__proto__')
+ : (value === null);
+}
+
+module.exports = isKeyable;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isLaziable.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isLaziable.js
new file mode 100644
index 0000000..a57c4f2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isLaziable.js
@@ -0,0 +1,28 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ getData = require('./_getData'),
+ getFuncName = require('./_getFuncName'),
+ lodash = require('./wrapperLodash');
+
+/**
+ * Checks if `func` has a lazy counterpart.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
+ * else `false`.
+ */
+function isLaziable(func) {
+ var funcName = getFuncName(func),
+ other = lodash[funcName];
+
+ if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
+ return false;
+ }
+ if (func === other) {
+ return true;
+ }
+ var data = getData(other);
+ return !!data && func === data[0];
+}
+
+module.exports = isLaziable;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isMaskable.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isMaskable.js
new file mode 100644
index 0000000..eb98d09
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isMaskable.js
@@ -0,0 +1,14 @@
+var coreJsData = require('./_coreJsData'),
+ isFunction = require('./isFunction'),
+ stubFalse = require('./stubFalse');
+
+/**
+ * Checks if `func` is capable of being masked.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
+ */
+var isMaskable = coreJsData ? isFunction : stubFalse;
+
+module.exports = isMaskable;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isMasked.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isMasked.js
new file mode 100644
index 0000000..4b0f21b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isMasked.js
@@ -0,0 +1,20 @@
+var coreJsData = require('./_coreJsData');
+
+/** Used to detect methods masquerading as native. */
+var maskSrcKey = (function() {
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
+ return uid ? ('Symbol(src)_1.' + uid) : '';
+}());
+
+/**
+ * Checks if `func` has its source masked.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
+ */
+function isMasked(func) {
+ return !!maskSrcKey && (maskSrcKey in func);
+}
+
+module.exports = isMasked;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isPrototype.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isPrototype.js
new file mode 100644
index 0000000..0f29498
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isPrototype.js
@@ -0,0 +1,18 @@
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+}
+
+module.exports = isPrototype;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isStrictComparable.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isStrictComparable.js
new file mode 100644
index 0000000..b59f40b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_isStrictComparable.js
@@ -0,0 +1,15 @@
+var isObject = require('./isObject');
+
+/**
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
+ * equality comparisons, else `false`.
+ */
+function isStrictComparable(value) {
+ return value === value && !isObject(value);
+}
+
+module.exports = isStrictComparable;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_iteratorToArray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_iteratorToArray.js
new file mode 100644
index 0000000..4768566
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_iteratorToArray.js
@@ -0,0 +1,18 @@
+/**
+ * Converts `iterator` to an array.
+ *
+ * @private
+ * @param {Object} iterator The iterator to convert.
+ * @returns {Array} Returns the converted array.
+ */
+function iteratorToArray(iterator) {
+ var data,
+ result = [];
+
+ while (!(data = iterator.next()).done) {
+ result.push(data.value);
+ }
+ return result;
+}
+
+module.exports = iteratorToArray;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_lazyClone.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_lazyClone.js
new file mode 100644
index 0000000..d8a51f8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_lazyClone.js
@@ -0,0 +1,23 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ copyArray = require('./_copyArray');
+
+/**
+ * Creates a clone of the lazy wrapper object.
+ *
+ * @private
+ * @name clone
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the cloned `LazyWrapper` object.
+ */
+function lazyClone() {
+ var result = new LazyWrapper(this.__wrapped__);
+ result.__actions__ = copyArray(this.__actions__);
+ result.__dir__ = this.__dir__;
+ result.__filtered__ = this.__filtered__;
+ result.__iteratees__ = copyArray(this.__iteratees__);
+ result.__takeCount__ = this.__takeCount__;
+ result.__views__ = copyArray(this.__views__);
+ return result;
+}
+
+module.exports = lazyClone;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_lazyReverse.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_lazyReverse.js
new file mode 100644
index 0000000..c5b5219
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_lazyReverse.js
@@ -0,0 +1,23 @@
+var LazyWrapper = require('./_LazyWrapper');
+
+/**
+ * Reverses the direction of lazy iteration.
+ *
+ * @private
+ * @name reverse
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the new reversed `LazyWrapper` object.
+ */
+function lazyReverse() {
+ if (this.__filtered__) {
+ var result = new LazyWrapper(this);
+ result.__dir__ = -1;
+ result.__filtered__ = true;
+ } else {
+ result = this.clone();
+ result.__dir__ *= -1;
+ }
+ return result;
+}
+
+module.exports = lazyReverse;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_lazyValue.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_lazyValue.js
new file mode 100644
index 0000000..09bf14b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_lazyValue.js
@@ -0,0 +1,73 @@
+var baseWrapperValue = require('./_baseWrapperValue'),
+ getView = require('./_getView'),
+ isArray = require('./isArray');
+
+/** Used as the size to enable large array optimizations. */
+var LARGE_ARRAY_SIZE = 200;
+
+/** Used to indicate the type of lazy iteratees. */
+var LAZY_FILTER_FLAG = 1,
+ LAZY_MAP_FLAG = 2;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * Extracts the unwrapped value from its lazy wrapper.
+ *
+ * @private
+ * @name value
+ * @memberOf LazyWrapper
+ * @returns {*} Returns the unwrapped value.
+ */
+function lazyValue() {
+ var array = this.__wrapped__.value(),
+ dir = this.__dir__,
+ isArr = isArray(array),
+ isRight = dir < 0,
+ arrLength = isArr ? array.length : 0,
+ view = getView(0, arrLength, this.__views__),
+ start = view.start,
+ end = view.end,
+ length = end - start,
+ index = isRight ? end : (start - 1),
+ iteratees = this.__iteratees__,
+ iterLength = iteratees.length,
+ resIndex = 0,
+ takeCount = nativeMin(length, this.__takeCount__);
+
+ if (!isArr || arrLength < LARGE_ARRAY_SIZE ||
+ (arrLength == length && takeCount == length)) {
+ return baseWrapperValue(array, this.__actions__);
+ }
+ var result = [];
+
+ outer:
+ while (length-- && resIndex < takeCount) {
+ index += dir;
+
+ var iterIndex = -1,
+ value = array[index];
+
+ while (++iterIndex < iterLength) {
+ var data = iteratees[iterIndex],
+ iteratee = data.iteratee,
+ type = data.type,
+ computed = iteratee(value);
+
+ if (type == LAZY_MAP_FLAG) {
+ value = computed;
+ } else if (!computed) {
+ if (type == LAZY_FILTER_FLAG) {
+ continue outer;
+ } else {
+ break outer;
+ }
+ }
+ }
+ result[resIndex++] = value;
+ }
+ return result;
+}
+
+module.exports = lazyValue;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_listCacheClear.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_listCacheClear.js
new file mode 100644
index 0000000..acbe39a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_listCacheClear.js
@@ -0,0 +1,13 @@
+/**
+ * Removes all key-value entries from the list cache.
+ *
+ * @private
+ * @name clear
+ * @memberOf ListCache
+ */
+function listCacheClear() {
+ this.__data__ = [];
+ this.size = 0;
+}
+
+module.exports = listCacheClear;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_listCacheDelete.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_listCacheDelete.js
new file mode 100644
index 0000000..b1384ad
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_listCacheDelete.js
@@ -0,0 +1,35 @@
+var assocIndexOf = require('./_assocIndexOf');
+
+/** Used for built-in method references. */
+var arrayProto = Array.prototype;
+
+/** Built-in value references. */
+var splice = arrayProto.splice;
+
+/**
+ * Removes `key` and its value from the list cache.
+ *
+ * @private
+ * @name delete
+ * @memberOf ListCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function listCacheDelete(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = data.length - 1;
+ if (index == lastIndex) {
+ data.pop();
+ } else {
+ splice.call(data, index, 1);
+ }
+ --this.size;
+ return true;
+}
+
+module.exports = listCacheDelete;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_listCacheGet.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_listCacheGet.js
new file mode 100644
index 0000000..f8192fc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_listCacheGet.js
@@ -0,0 +1,19 @@
+var assocIndexOf = require('./_assocIndexOf');
+
+/**
+ * Gets the list cache value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf ListCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function listCacheGet(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ return index < 0 ? undefined : data[index][1];
+}
+
+module.exports = listCacheGet;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_listCacheHas.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_listCacheHas.js
new file mode 100644
index 0000000..2adf671
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_listCacheHas.js
@@ -0,0 +1,16 @@
+var assocIndexOf = require('./_assocIndexOf');
+
+/**
+ * Checks if a list cache value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf ListCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function listCacheHas(key) {
+ return assocIndexOf(this.__data__, key) > -1;
+}
+
+module.exports = listCacheHas;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_listCacheSet.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_listCacheSet.js
new file mode 100644
index 0000000..5855c95
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_listCacheSet.js
@@ -0,0 +1,26 @@
+var assocIndexOf = require('./_assocIndexOf');
+
+/**
+ * Sets the list cache `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf ListCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the list cache instance.
+ */
+function listCacheSet(key, value) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ ++this.size;
+ data.push([key, value]);
+ } else {
+ data[index][1] = value;
+ }
+ return this;
+}
+
+module.exports = listCacheSet;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapCacheClear.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapCacheClear.js
new file mode 100644
index 0000000..bc9ca20
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapCacheClear.js
@@ -0,0 +1,21 @@
+var Hash = require('./_Hash'),
+ ListCache = require('./_ListCache'),
+ Map = require('./_Map');
+
+/**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+function mapCacheClear() {
+ this.size = 0;
+ this.__data__ = {
+ 'hash': new Hash,
+ 'map': new (Map || ListCache),
+ 'string': new Hash
+ };
+}
+
+module.exports = mapCacheClear;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapCacheDelete.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapCacheDelete.js
new file mode 100644
index 0000000..946ca3c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapCacheDelete.js
@@ -0,0 +1,18 @@
+var getMapData = require('./_getMapData');
+
+/**
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function mapCacheDelete(key) {
+ var result = getMapData(this, key)['delete'](key);
+ this.size -= result ? 1 : 0;
+ return result;
+}
+
+module.exports = mapCacheDelete;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapCacheGet.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapCacheGet.js
new file mode 100644
index 0000000..f29f55c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapCacheGet.js
@@ -0,0 +1,16 @@
+var getMapData = require('./_getMapData');
+
+/**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function mapCacheGet(key) {
+ return getMapData(this, key).get(key);
+}
+
+module.exports = mapCacheGet;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapCacheHas.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapCacheHas.js
new file mode 100644
index 0000000..a1214c0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapCacheHas.js
@@ -0,0 +1,16 @@
+var getMapData = require('./_getMapData');
+
+/**
+ * Checks if a map value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function mapCacheHas(key) {
+ return getMapData(this, key).has(key);
+}
+
+module.exports = mapCacheHas;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapCacheSet.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapCacheSet.js
new file mode 100644
index 0000000..7346849
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapCacheSet.js
@@ -0,0 +1,22 @@
+var getMapData = require('./_getMapData');
+
+/**
+ * Sets the map `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache instance.
+ */
+function mapCacheSet(key, value) {
+ var data = getMapData(this, key),
+ size = data.size;
+
+ data.set(key, value);
+ this.size += data.size == size ? 0 : 1;
+ return this;
+}
+
+module.exports = mapCacheSet;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapToArray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapToArray.js
new file mode 100644
index 0000000..fe3dd53
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mapToArray.js
@@ -0,0 +1,18 @@
+/**
+ * Converts `map` to its key-value pairs.
+ *
+ * @private
+ * @param {Object} map The map to convert.
+ * @returns {Array} Returns the key-value pairs.
+ */
+function mapToArray(map) {
+ var index = -1,
+ result = Array(map.size);
+
+ map.forEach(function(value, key) {
+ result[++index] = [key, value];
+ });
+ return result;
+}
+
+module.exports = mapToArray;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_matchesStrictComparable.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_matchesStrictComparable.js
new file mode 100644
index 0000000..f608af9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_matchesStrictComparable.js
@@ -0,0 +1,20 @@
+/**
+ * A specialized version of `matchesProperty` for source values suitable
+ * for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+function matchesStrictComparable(key, srcValue) {
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ return object[key] === srcValue &&
+ (srcValue !== undefined || (key in Object(object)));
+ };
+}
+
+module.exports = matchesStrictComparable;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_memoizeCapped.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_memoizeCapped.js
new file mode 100644
index 0000000..7f71c8f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_memoizeCapped.js
@@ -0,0 +1,26 @@
+var memoize = require('./memoize');
+
+/** Used as the maximum memoize cache size. */
+var MAX_MEMOIZE_SIZE = 500;
+
+/**
+ * A specialized version of `_.memoize` which clears the memoized function's
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
+ *
+ * @private
+ * @param {Function} func The function to have its output memoized.
+ * @returns {Function} Returns the new memoized function.
+ */
+function memoizeCapped(func) {
+ var result = memoize(func, function(key) {
+ if (cache.size === MAX_MEMOIZE_SIZE) {
+ cache.clear();
+ }
+ return key;
+ });
+
+ var cache = result.cache;
+ return result;
+}
+
+module.exports = memoizeCapped;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mergeData.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mergeData.js
new file mode 100644
index 0000000..cb570f9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mergeData.js
@@ -0,0 +1,90 @@
+var composeArgs = require('./_composeArgs'),
+ composeArgsRight = require('./_composeArgsRight'),
+ replaceHolders = require('./_replaceHolders');
+
+/** Used as the internal argument placeholder. */
+var PLACEHOLDER = '__lodash_placeholder__';
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_CURRY_BOUND_FLAG = 4,
+ WRAP_CURRY_FLAG = 8,
+ WRAP_ARY_FLAG = 128,
+ WRAP_REARG_FLAG = 256;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * Merges the function metadata of `source` into `data`.
+ *
+ * Merging metadata reduces the number of wrappers used to invoke a function.
+ * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
+ * may be applied regardless of execution order. Methods like `_.ary` and
+ * `_.rearg` modify function arguments, making the order in which they are
+ * executed important, preventing the merging of metadata. However, we make
+ * an exception for a safe combined case where curried functions have `_.ary`
+ * and or `_.rearg` applied.
+ *
+ * @private
+ * @param {Array} data The destination metadata.
+ * @param {Array} source The source metadata.
+ * @returns {Array} Returns `data`.
+ */
+function mergeData(data, source) {
+ var bitmask = data[1],
+ srcBitmask = source[1],
+ newBitmask = bitmask | srcBitmask,
+ isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
+
+ var isCombo =
+ ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
+ ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
+ ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
+
+ // Exit early if metadata can't be merged.
+ if (!(isCommon || isCombo)) {
+ return data;
+ }
+ // Use source `thisArg` if available.
+ if (srcBitmask & WRAP_BIND_FLAG) {
+ data[2] = source[2];
+ // Set when currying a bound function.
+ newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
+ }
+ // Compose partial arguments.
+ var value = source[3];
+ if (value) {
+ var partials = data[3];
+ data[3] = partials ? composeArgs(partials, value, source[4]) : value;
+ data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
+ }
+ // Compose partial right arguments.
+ value = source[5];
+ if (value) {
+ partials = data[5];
+ data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
+ data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
+ }
+ // Use source `argPos` if available.
+ value = source[7];
+ if (value) {
+ data[7] = value;
+ }
+ // Use source `ary` if it's smaller.
+ if (srcBitmask & WRAP_ARY_FLAG) {
+ data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
+ }
+ // Use source `arity` if one is not provided.
+ if (data[9] == null) {
+ data[9] = source[9];
+ }
+ // Use source `func` and merge bitmasks.
+ data[0] = source[0];
+ data[1] = newBitmask;
+
+ return data;
+}
+
+module.exports = mergeData;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mergeDefaults.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mergeDefaults.js
new file mode 100644
index 0000000..9888f0e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_mergeDefaults.js
@@ -0,0 +1,27 @@
+var baseMerge = require('./_baseMerge'),
+ isObject = require('./isObject');
+
+/**
+ * Used by `_.defaultsDeep` to customize its `_.merge` use.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to merge.
+ * @param {Object} object The parent object of `objValue`.
+ * @param {Object} source The parent object of `srcValue`.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ * @returns {*} Returns the value to assign.
+ */
+function mergeDefaults(objValue, srcValue, key, object, source, stack) {
+ if (isObject(objValue) && isObject(srcValue)) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ stack.set(srcValue, objValue);
+ baseMerge(objValue, srcValue, undefined, mergeDefaults, stack);
+ stack['delete'](srcValue);
+ }
+ return objValue;
+}
+
+module.exports = mergeDefaults;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_metaMap.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_metaMap.js
new file mode 100644
index 0000000..0157a0b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_metaMap.js
@@ -0,0 +1,6 @@
+var WeakMap = require('./_WeakMap');
+
+/** Used to store function metadata. */
+var metaMap = WeakMap && new WeakMap;
+
+module.exports = metaMap;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_nativeCreate.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_nativeCreate.js
new file mode 100644
index 0000000..c7aede8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_nativeCreate.js
@@ -0,0 +1,6 @@
+var getNative = require('./_getNative');
+
+/* Built-in method references that are verified to be native. */
+var nativeCreate = getNative(Object, 'create');
+
+module.exports = nativeCreate;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_nativeKeys.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_nativeKeys.js
new file mode 100644
index 0000000..479a104
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_nativeKeys.js
@@ -0,0 +1,6 @@
+var overArg = require('./_overArg');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeKeys = overArg(Object.keys, Object);
+
+module.exports = nativeKeys;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_nativeKeysIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_nativeKeysIn.js
new file mode 100644
index 0000000..00ee505
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_nativeKeysIn.js
@@ -0,0 +1,20 @@
+/**
+ * This function is like
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * except that it includes inherited enumerable properties.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function nativeKeysIn(object) {
+ var result = [];
+ if (object != null) {
+ for (var key in Object(object)) {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+module.exports = nativeKeysIn;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_nodeUtil.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_nodeUtil.js
new file mode 100644
index 0000000..14e179f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_nodeUtil.js
@@ -0,0 +1,22 @@
+var freeGlobal = require('./_freeGlobal');
+
+/** Detect free variable `exports`. */
+var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
+
+/** Detect free variable `module`. */
+var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+/** Detect the popular CommonJS extension `module.exports`. */
+var moduleExports = freeModule && freeModule.exports === freeExports;
+
+/** Detect free variable `process` from Node.js. */
+var freeProcess = moduleExports && freeGlobal.process;
+
+/** Used to access faster Node.js helpers. */
+var nodeUtil = (function() {
+ try {
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
+ } catch (e) {}
+}());
+
+module.exports = nodeUtil;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_objectToString.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_objectToString.js
new file mode 100644
index 0000000..c614ec0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_objectToString.js
@@ -0,0 +1,22 @@
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var nativeObjectToString = objectProto.toString;
+
+/**
+ * Converts `value` to a string using `Object.prototype.toString`.
+ *
+ * @private
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ */
+function objectToString(value) {
+ return nativeObjectToString.call(value);
+}
+
+module.exports = objectToString;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_overArg.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_overArg.js
new file mode 100644
index 0000000..651c5c5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_overArg.js
@@ -0,0 +1,15 @@
+/**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
+}
+
+module.exports = overArg;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_overRest.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_overRest.js
new file mode 100644
index 0000000..c7cdef3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_overRest.js
@@ -0,0 +1,36 @@
+var apply = require('./_apply');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * A specialized version of `baseRest` which transforms the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @param {Function} transform The rest array transform.
+ * @returns {Function} Returns the new function.
+ */
+function overRest(func, start, transform) {
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ index = -1;
+ var otherArgs = Array(start + 1);
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = transform(array);
+ return apply(func, this, otherArgs);
+ };
+}
+
+module.exports = overRest;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_parent.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_parent.js
new file mode 100644
index 0000000..f174328
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_parent.js
@@ -0,0 +1,16 @@
+var baseGet = require('./_baseGet'),
+ baseSlice = require('./_baseSlice');
+
+/**
+ * Gets the parent value at `path` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} path The path to get the parent value of.
+ * @returns {*} Returns the parent value.
+ */
+function parent(object, path) {
+ return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
+}
+
+module.exports = parent;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_reEscape.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_reEscape.js
new file mode 100644
index 0000000..7f47eda
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_reEscape.js
@@ -0,0 +1,4 @@
+/** Used to match template delimiters. */
+var reEscape = /<%-([\s\S]+?)%>/g;
+
+module.exports = reEscape;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_reEvaluate.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_reEvaluate.js
new file mode 100644
index 0000000..6adfc31
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_reEvaluate.js
@@ -0,0 +1,4 @@
+/** Used to match template delimiters. */
+var reEvaluate = /<%([\s\S]+?)%>/g;
+
+module.exports = reEvaluate;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_reInterpolate.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_reInterpolate.js
new file mode 100644
index 0000000..d02ff0b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_reInterpolate.js
@@ -0,0 +1,4 @@
+/** Used to match template delimiters. */
+var reInterpolate = /<%=([\s\S]+?)%>/g;
+
+module.exports = reInterpolate;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_realNames.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_realNames.js
new file mode 100644
index 0000000..aa0d529
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_realNames.js
@@ -0,0 +1,4 @@
+/** Used to lookup unminified function names. */
+var realNames = {};
+
+module.exports = realNames;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_reorder.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_reorder.js
new file mode 100644
index 0000000..a3502b0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_reorder.js
@@ -0,0 +1,29 @@
+var copyArray = require('./_copyArray'),
+ isIndex = require('./_isIndex');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * Reorder `array` according to the specified indexes where the element at
+ * the first index is assigned as the first element, the element at
+ * the second index is assigned as the second element, and so on.
+ *
+ * @private
+ * @param {Array} array The array to reorder.
+ * @param {Array} indexes The arranged array indexes.
+ * @returns {Array} Returns `array`.
+ */
+function reorder(array, indexes) {
+ var arrLength = array.length,
+ length = nativeMin(indexes.length, arrLength),
+ oldArray = copyArray(array);
+
+ while (length--) {
+ var index = indexes[length];
+ array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
+ }
+ return array;
+}
+
+module.exports = reorder;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_replaceHolders.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_replaceHolders.js
new file mode 100644
index 0000000..74360ec
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_replaceHolders.js
@@ -0,0 +1,29 @@
+/** Used as the internal argument placeholder. */
+var PLACEHOLDER = '__lodash_placeholder__';
+
+/**
+ * Replaces all `placeholder` elements in `array` with an internal placeholder
+ * and returns an array of their indexes.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {*} placeholder The placeholder to replace.
+ * @returns {Array} Returns the new array of placeholder indexes.
+ */
+function replaceHolders(array, placeholder) {
+ var index = -1,
+ length = array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value === placeholder || value === PLACEHOLDER) {
+ array[index] = PLACEHOLDER;
+ result[resIndex++] = index;
+ }
+ }
+ return result;
+}
+
+module.exports = replaceHolders;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_root.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_root.js
new file mode 100644
index 0000000..d2852be
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_root.js
@@ -0,0 +1,9 @@
+var freeGlobal = require('./_freeGlobal');
+
+/** Detect free variable `self`. */
+var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+/** Used as a reference to the global object. */
+var root = freeGlobal || freeSelf || Function('return this')();
+
+module.exports = root;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setCacheAdd.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setCacheAdd.js
new file mode 100644
index 0000000..1081a74
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setCacheAdd.js
@@ -0,0 +1,19 @@
+/** Used to stand-in for `undefined` hash values. */
+var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+/**
+ * Adds `value` to the array cache.
+ *
+ * @private
+ * @name add
+ * @memberOf SetCache
+ * @alias push
+ * @param {*} value The value to cache.
+ * @returns {Object} Returns the cache instance.
+ */
+function setCacheAdd(value) {
+ this.__data__.set(value, HASH_UNDEFINED);
+ return this;
+}
+
+module.exports = setCacheAdd;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setCacheHas.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setCacheHas.js
new file mode 100644
index 0000000..9a49255
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setCacheHas.js
@@ -0,0 +1,14 @@
+/**
+ * Checks if `value` is in the array cache.
+ *
+ * @private
+ * @name has
+ * @memberOf SetCache
+ * @param {*} value The value to search for.
+ * @returns {number} Returns `true` if `value` is found, else `false`.
+ */
+function setCacheHas(value) {
+ return this.__data__.has(value);
+}
+
+module.exports = setCacheHas;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setData.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setData.js
new file mode 100644
index 0000000..e5cf3eb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setData.js
@@ -0,0 +1,20 @@
+var baseSetData = require('./_baseSetData'),
+ shortOut = require('./_shortOut');
+
+/**
+ * Sets metadata for `func`.
+ *
+ * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
+ * period of time, it will trip its breaker and transition to an identity
+ * function to avoid garbage collection pauses in V8. See
+ * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
+ * for more details.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+var setData = shortOut(baseSetData);
+
+module.exports = setData;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setToArray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setToArray.js
new file mode 100644
index 0000000..b87f074
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setToArray.js
@@ -0,0 +1,18 @@
+/**
+ * Converts `set` to an array of its values.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the values.
+ */
+function setToArray(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = value;
+ });
+ return result;
+}
+
+module.exports = setToArray;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setToPairs.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setToPairs.js
new file mode 100644
index 0000000..36ad37a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setToPairs.js
@@ -0,0 +1,18 @@
+/**
+ * Converts `set` to its value-value pairs.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the value-value pairs.
+ */
+function setToPairs(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = [value, value];
+ });
+ return result;
+}
+
+module.exports = setToPairs;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setToString.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setToString.js
new file mode 100644
index 0000000..6ca8419
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setToString.js
@@ -0,0 +1,14 @@
+var baseSetToString = require('./_baseSetToString'),
+ shortOut = require('./_shortOut');
+
+/**
+ * Sets the `toString` method of `func` to return `string`.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+var setToString = shortOut(baseSetToString);
+
+module.exports = setToString;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setWrapToString.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setWrapToString.js
new file mode 100644
index 0000000..decdc44
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_setWrapToString.js
@@ -0,0 +1,21 @@
+var getWrapDetails = require('./_getWrapDetails'),
+ insertWrapDetails = require('./_insertWrapDetails'),
+ setToString = require('./_setToString'),
+ updateWrapDetails = require('./_updateWrapDetails');
+
+/**
+ * Sets the `toString` method of `wrapper` to mimic the source of `reference`
+ * with wrapper details in a comment at the top of the source body.
+ *
+ * @private
+ * @param {Function} wrapper The function to modify.
+ * @param {Function} reference The reference function.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @returns {Function} Returns `wrapper`.
+ */
+function setWrapToString(wrapper, reference, bitmask) {
+ var source = (reference + '');
+ return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
+}
+
+module.exports = setWrapToString;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_shortOut.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_shortOut.js
new file mode 100644
index 0000000..3300a07
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_shortOut.js
@@ -0,0 +1,37 @@
+/** Used to detect hot functions by number of calls within a span of milliseconds. */
+var HOT_COUNT = 800,
+ HOT_SPAN = 16;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeNow = Date.now;
+
+/**
+ * Creates a function that'll short out and invoke `identity` instead
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
+ * milliseconds.
+ *
+ * @private
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new shortable function.
+ */
+function shortOut(func) {
+ var count = 0,
+ lastCalled = 0;
+
+ return function() {
+ var stamp = nativeNow(),
+ remaining = HOT_SPAN - (stamp - lastCalled);
+
+ lastCalled = stamp;
+ if (remaining > 0) {
+ if (++count >= HOT_COUNT) {
+ return arguments[0];
+ }
+ } else {
+ count = 0;
+ }
+ return func.apply(undefined, arguments);
+ };
+}
+
+module.exports = shortOut;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_shuffleSelf.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_shuffleSelf.js
new file mode 100644
index 0000000..8bcc4f5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_shuffleSelf.js
@@ -0,0 +1,28 @@
+var baseRandom = require('./_baseRandom');
+
+/**
+ * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
+ *
+ * @private
+ * @param {Array} array The array to shuffle.
+ * @param {number} [size=array.length] The size of `array`.
+ * @returns {Array} Returns `array`.
+ */
+function shuffleSelf(array, size) {
+ var index = -1,
+ length = array.length,
+ lastIndex = length - 1;
+
+ size = size === undefined ? length : size;
+ while (++index < size) {
+ var rand = baseRandom(index, lastIndex),
+ value = array[rand];
+
+ array[rand] = array[index];
+ array[index] = value;
+ }
+ array.length = size;
+ return array;
+}
+
+module.exports = shuffleSelf;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stackClear.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stackClear.js
new file mode 100644
index 0000000..ce8e5a9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stackClear.js
@@ -0,0 +1,15 @@
+var ListCache = require('./_ListCache');
+
+/**
+ * Removes all key-value entries from the stack.
+ *
+ * @private
+ * @name clear
+ * @memberOf Stack
+ */
+function stackClear() {
+ this.__data__ = new ListCache;
+ this.size = 0;
+}
+
+module.exports = stackClear;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stackDelete.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stackDelete.js
new file mode 100644
index 0000000..ff9887a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stackDelete.js
@@ -0,0 +1,18 @@
+/**
+ * Removes `key` and its value from the stack.
+ *
+ * @private
+ * @name delete
+ * @memberOf Stack
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function stackDelete(key) {
+ var data = this.__data__,
+ result = data['delete'](key);
+
+ this.size = data.size;
+ return result;
+}
+
+module.exports = stackDelete;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stackGet.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stackGet.js
new file mode 100644
index 0000000..1cdf004
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stackGet.js
@@ -0,0 +1,14 @@
+/**
+ * Gets the stack value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Stack
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function stackGet(key) {
+ return this.__data__.get(key);
+}
+
+module.exports = stackGet;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stackHas.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stackHas.js
new file mode 100644
index 0000000..16a3ad1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stackHas.js
@@ -0,0 +1,14 @@
+/**
+ * Checks if a stack value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Stack
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function stackHas(key) {
+ return this.__data__.has(key);
+}
+
+module.exports = stackHas;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stackSet.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stackSet.js
new file mode 100644
index 0000000..b790ac5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stackSet.js
@@ -0,0 +1,34 @@
+var ListCache = require('./_ListCache'),
+ Map = require('./_Map'),
+ MapCache = require('./_MapCache');
+
+/** Used as the size to enable large array optimizations. */
+var LARGE_ARRAY_SIZE = 200;
+
+/**
+ * Sets the stack `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Stack
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the stack cache instance.
+ */
+function stackSet(key, value) {
+ var data = this.__data__;
+ if (data instanceof ListCache) {
+ var pairs = data.__data__;
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
+ pairs.push([key, value]);
+ this.size = ++data.size;
+ return this;
+ }
+ data = this.__data__ = new MapCache(pairs);
+ }
+ data.set(key, value);
+ this.size = data.size;
+ return this;
+}
+
+module.exports = stackSet;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_strictIndexOf.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_strictIndexOf.js
new file mode 100644
index 0000000..0486a49
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_strictIndexOf.js
@@ -0,0 +1,23 @@
+/**
+ * A specialized version of `_.indexOf` which performs strict equality
+ * comparisons of values, i.e. `===`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function strictIndexOf(array, value, fromIndex) {
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+module.exports = strictIndexOf;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_strictLastIndexOf.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_strictLastIndexOf.js
new file mode 100644
index 0000000..d7310dc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_strictLastIndexOf.js
@@ -0,0 +1,21 @@
+/**
+ * A specialized version of `_.lastIndexOf` which performs strict equality
+ * comparisons of values, i.e. `===`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function strictLastIndexOf(array, value, fromIndex) {
+ var index = fromIndex + 1;
+ while (index--) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return index;
+}
+
+module.exports = strictLastIndexOf;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stringSize.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stringSize.js
new file mode 100644
index 0000000..17ef462
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stringSize.js
@@ -0,0 +1,18 @@
+var asciiSize = require('./_asciiSize'),
+ hasUnicode = require('./_hasUnicode'),
+ unicodeSize = require('./_unicodeSize');
+
+/**
+ * Gets the number of symbols in `string`.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {number} Returns the string size.
+ */
+function stringSize(string) {
+ return hasUnicode(string)
+ ? unicodeSize(string)
+ : asciiSize(string);
+}
+
+module.exports = stringSize;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stringToArray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stringToArray.js
new file mode 100644
index 0000000..d161158
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stringToArray.js
@@ -0,0 +1,18 @@
+var asciiToArray = require('./_asciiToArray'),
+ hasUnicode = require('./_hasUnicode'),
+ unicodeToArray = require('./_unicodeToArray');
+
+/**
+ * Converts `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+function stringToArray(string) {
+ return hasUnicode(string)
+ ? unicodeToArray(string)
+ : asciiToArray(string);
+}
+
+module.exports = stringToArray;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stringToPath.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stringToPath.js
new file mode 100644
index 0000000..db7b0f7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_stringToPath.js
@@ -0,0 +1,28 @@
+var memoizeCapped = require('./_memoizeCapped');
+
+/** Used to match property names within property paths. */
+var reLeadingDot = /^\./,
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
+
+/** Used to match backslashes in property paths. */
+var reEscapeChar = /\\(\\)?/g;
+
+/**
+ * Converts `string` to a property path array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the property path array.
+ */
+var stringToPath = memoizeCapped(function(string) {
+ var result = [];
+ if (reLeadingDot.test(string)) {
+ result.push('');
+ }
+ string.replace(rePropName, function(match, number, quote, string) {
+ result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+});
+
+module.exports = stringToPath;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_toKey.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_toKey.js
new file mode 100644
index 0000000..c6d645c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_toKey.js
@@ -0,0 +1,21 @@
+var isSymbol = require('./isSymbol');
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/**
+ * Converts `value` to a string key if it's not a string or symbol.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {string|symbol} Returns the key.
+ */
+function toKey(value) {
+ if (typeof value == 'string' || isSymbol(value)) {
+ return value;
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
+
+module.exports = toKey;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_toSource.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_toSource.js
new file mode 100644
index 0000000..a020b38
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_toSource.js
@@ -0,0 +1,26 @@
+/** Used for built-in method references. */
+var funcProto = Function.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString = funcProto.toString;
+
+/**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to convert.
+ * @returns {string} Returns the source code.
+ */
+function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e) {}
+ try {
+ return (func + '');
+ } catch (e) {}
+ }
+ return '';
+}
+
+module.exports = toSource;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_unescapeHtmlChar.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_unescapeHtmlChar.js
new file mode 100644
index 0000000..a71fecb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_unescapeHtmlChar.js
@@ -0,0 +1,21 @@
+var basePropertyOf = require('./_basePropertyOf');
+
+/** Used to map HTML entities to characters. */
+var htmlUnescapes = {
+ '&amp;': '&',
+ '&lt;': '<',
+ '&gt;': '>',
+ '&quot;': '"',
+ '&#39;': "'"
+};
+
+/**
+ * Used by `_.unescape` to convert HTML entities to characters.
+ *
+ * @private
+ * @param {string} chr The matched character to unescape.
+ * @returns {string} Returns the unescaped character.
+ */
+var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
+
+module.exports = unescapeHtmlChar;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_unicodeSize.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_unicodeSize.js
new file mode 100644
index 0000000..68137ec
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_unicodeSize.js
@@ -0,0 +1,44 @@
+/** Used to compose unicode character classes. */
+var rsAstralRange = '\\ud800-\\udfff',
+ rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
+ rsVarRange = '\\ufe0e\\ufe0f';
+
+/** Used to compose unicode capture groups. */
+var rsAstral = '[' + rsAstralRange + ']',
+ rsCombo = '[' + rsComboRange + ']',
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
+ rsNonAstral = '[^' + rsAstralRange + ']',
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
+ rsZWJ = '\\u200d';
+
+/** Used to compose unicode regexes. */
+var reOptMod = rsModifier + '?',
+ rsOptVar = '[' + rsVarRange + ']?',
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
+ rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
+
+/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
+var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
+
+/**
+ * Gets the size of a Unicode `string`.
+ *
+ * @private
+ * @param {string} string The string inspect.
+ * @returns {number} Returns the string size.
+ */
+function unicodeSize(string) {
+ var result = reUnicode.lastIndex = 0;
+ while (reUnicode.test(string)) {
+ ++result;
+ }
+ return result;
+}
+
+module.exports = unicodeSize;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_unicodeToArray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_unicodeToArray.js
new file mode 100644
index 0000000..2a725c0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_unicodeToArray.js
@@ -0,0 +1,40 @@
+/** Used to compose unicode character classes. */
+var rsAstralRange = '\\ud800-\\udfff',
+ rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
+ rsVarRange = '\\ufe0e\\ufe0f';
+
+/** Used to compose unicode capture groups. */
+var rsAstral = '[' + rsAstralRange + ']',
+ rsCombo = '[' + rsComboRange + ']',
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
+ rsNonAstral = '[^' + rsAstralRange + ']',
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
+ rsZWJ = '\\u200d';
+
+/** Used to compose unicode regexes. */
+var reOptMod = rsModifier + '?',
+ rsOptVar = '[' + rsVarRange + ']?',
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
+ rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
+
+/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
+var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
+
+/**
+ * Converts a Unicode `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+function unicodeToArray(string) {
+ return string.match(reUnicode) || [];
+}
+
+module.exports = unicodeToArray;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_unicodeWords.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_unicodeWords.js
new file mode 100644
index 0000000..d8b822a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_unicodeWords.js
@@ -0,0 +1,69 @@
+/** Used to compose unicode character classes. */
+var rsAstralRange = '\\ud800-\\udfff',
+ rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
+ rsDingbatRange = '\\u2700-\\u27bf',
+ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
+ rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
+ rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
+ rsPunctuationRange = '\\u2000-\\u206f',
+ rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
+ rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
+ rsVarRange = '\\ufe0e\\ufe0f',
+ rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
+
+/** Used to compose unicode capture groups. */
+var rsApos = "['\u2019]",
+ rsBreak = '[' + rsBreakRange + ']',
+ rsCombo = '[' + rsComboRange + ']',
+ rsDigits = '\\d+',
+ rsDingbat = '[' + rsDingbatRange + ']',
+ rsLower = '[' + rsLowerRange + ']',
+ rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
+ rsNonAstral = '[^' + rsAstralRange + ']',
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
+ rsUpper = '[' + rsUpperRange + ']',
+ rsZWJ = '\\u200d';
+
+/** Used to compose unicode regexes. */
+var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
+ rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
+ rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
+ rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
+ reOptMod = rsModifier + '?',
+ rsOptVar = '[' + rsVarRange + ']?',
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
+ rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)',
+ rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)',
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
+ rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
+
+/** Used to match complex or compound words. */
+var reUnicodeWord = RegExp([
+ rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
+ rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
+ rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
+ rsUpper + '+' + rsOptContrUpper,
+ rsOrdUpper,
+ rsOrdLower,
+ rsDigits,
+ rsEmoji
+].join('|'), 'g');
+
+/**
+ * Splits a Unicode `string` into an array of its words.
+ *
+ * @private
+ * @param {string} The string to inspect.
+ * @returns {Array} Returns the words of `string`.
+ */
+function unicodeWords(string) {
+ return string.match(reUnicodeWord) || [];
+}
+
+module.exports = unicodeWords;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_updateWrapDetails.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_updateWrapDetails.js
new file mode 100644
index 0000000..8759fbd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_updateWrapDetails.js
@@ -0,0 +1,46 @@
+var arrayEach = require('./_arrayEach'),
+ arrayIncludes = require('./_arrayIncludes');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_CURRY_FLAG = 8,
+ WRAP_CURRY_RIGHT_FLAG = 16,
+ WRAP_PARTIAL_FLAG = 32,
+ WRAP_PARTIAL_RIGHT_FLAG = 64,
+ WRAP_ARY_FLAG = 128,
+ WRAP_REARG_FLAG = 256,
+ WRAP_FLIP_FLAG = 512;
+
+/** Used to associate wrap methods with their bit flags. */
+var wrapFlags = [
+ ['ary', WRAP_ARY_FLAG],
+ ['bind', WRAP_BIND_FLAG],
+ ['bindKey', WRAP_BIND_KEY_FLAG],
+ ['curry', WRAP_CURRY_FLAG],
+ ['curryRight', WRAP_CURRY_RIGHT_FLAG],
+ ['flip', WRAP_FLIP_FLAG],
+ ['partial', WRAP_PARTIAL_FLAG],
+ ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
+ ['rearg', WRAP_REARG_FLAG]
+];
+
+/**
+ * Updates wrapper `details` based on `bitmask` flags.
+ *
+ * @private
+ * @returns {Array} details The details to modify.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @returns {Array} Returns `details`.
+ */
+function updateWrapDetails(details, bitmask) {
+ arrayEach(wrapFlags, function(pair) {
+ var value = '_.' + pair[0];
+ if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
+ details.push(value);
+ }
+ });
+ return details.sort();
+}
+
+module.exports = updateWrapDetails;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_wrapperClone.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_wrapperClone.js
new file mode 100644
index 0000000..7bb58a2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/_wrapperClone.js
@@ -0,0 +1,23 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ LodashWrapper = require('./_LodashWrapper'),
+ copyArray = require('./_copyArray');
+
+/**
+ * Creates a clone of `wrapper`.
+ *
+ * @private
+ * @param {Object} wrapper The wrapper to clone.
+ * @returns {Object} Returns the cloned wrapper.
+ */
+function wrapperClone(wrapper) {
+ if (wrapper instanceof LazyWrapper) {
+ return wrapper.clone();
+ }
+ var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
+ result.__actions__ = copyArray(wrapper.__actions__);
+ result.__index__ = wrapper.__index__;
+ result.__values__ = wrapper.__values__;
+ return result;
+}
+
+module.exports = wrapperClone;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/add.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/add.js
new file mode 100644
index 0000000..f069515
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/add.js
@@ -0,0 +1,22 @@
+var createMathOperation = require('./_createMathOperation');
+
+/**
+ * Adds two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.4.0
+ * @category Math
+ * @param {number} augend The first number in an addition.
+ * @param {number} addend The second number in an addition.
+ * @returns {number} Returns the total.
+ * @example
+ *
+ * _.add(6, 4);
+ * // => 10
+ */
+var add = createMathOperation(function(augend, addend) {
+ return augend + addend;
+}, 0);
+
+module.exports = add;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/after.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/after.js
new file mode 100644
index 0000000..3900c97
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/after.js
@@ -0,0 +1,42 @@
+var toInteger = require('./toInteger');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * The opposite of `_.before`; this method creates a function that invokes
+ * `func` once it's called `n` or more times.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {number} n The number of calls before `func` is invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var saves = ['profile', 'settings'];
+ *
+ * var done = _.after(saves.length, function() {
+ * console.log('done saving!');
+ * });
+ *
+ * _.forEach(saves, function(type) {
+ * asyncSave({ 'type': type, 'complete': done });
+ * });
+ * // => Logs 'done saving!' after the two async saves have completed.
+ */
+function after(n, func) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+}
+
+module.exports = after;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/array.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/array.js
new file mode 100644
index 0000000..af688d3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/array.js
@@ -0,0 +1,67 @@
+module.exports = {
+ 'chunk': require('./chunk'),
+ 'compact': require('./compact'),
+ 'concat': require('./concat'),
+ 'difference': require('./difference'),
+ 'differenceBy': require('./differenceBy'),
+ 'differenceWith': require('./differenceWith'),
+ 'drop': require('./drop'),
+ 'dropRight': require('./dropRight'),
+ 'dropRightWhile': require('./dropRightWhile'),
+ 'dropWhile': require('./dropWhile'),
+ 'fill': require('./fill'),
+ 'findIndex': require('./findIndex'),
+ 'findLastIndex': require('./findLastIndex'),
+ 'first': require('./first'),
+ 'flatten': require('./flatten'),
+ 'flattenDeep': require('./flattenDeep'),
+ 'flattenDepth': require('./flattenDepth'),
+ 'fromPairs': require('./fromPairs'),
+ 'head': require('./head'),
+ 'indexOf': require('./indexOf'),
+ 'initial': require('./initial'),
+ 'intersection': require('./intersection'),
+ 'intersectionBy': require('./intersectionBy'),
+ 'intersectionWith': require('./intersectionWith'),
+ 'join': require('./join'),
+ 'last': require('./last'),
+ 'lastIndexOf': require('./lastIndexOf'),
+ 'nth': require('./nth'),
+ 'pull': require('./pull'),
+ 'pullAll': require('./pullAll'),
+ 'pullAllBy': require('./pullAllBy'),
+ 'pullAllWith': require('./pullAllWith'),
+ 'pullAt': require('./pullAt'),
+ 'remove': require('./remove'),
+ 'reverse': require('./reverse'),
+ 'slice': require('./slice'),
+ 'sortedIndex': require('./sortedIndex'),
+ 'sortedIndexBy': require('./sortedIndexBy'),
+ 'sortedIndexOf': require('./sortedIndexOf'),
+ 'sortedLastIndex': require('./sortedLastIndex'),
+ 'sortedLastIndexBy': require('./sortedLastIndexBy'),
+ 'sortedLastIndexOf': require('./sortedLastIndexOf'),
+ 'sortedUniq': require('./sortedUniq'),
+ 'sortedUniqBy': require('./sortedUniqBy'),
+ 'tail': require('./tail'),
+ 'take': require('./take'),
+ 'takeRight': require('./takeRight'),
+ 'takeRightWhile': require('./takeRightWhile'),
+ 'takeWhile': require('./takeWhile'),
+ 'union': require('./union'),
+ 'unionBy': require('./unionBy'),
+ 'unionWith': require('./unionWith'),
+ 'uniq': require('./uniq'),
+ 'uniqBy': require('./uniqBy'),
+ 'uniqWith': require('./uniqWith'),
+ 'unzip': require('./unzip'),
+ 'unzipWith': require('./unzipWith'),
+ 'without': require('./without'),
+ 'xor': require('./xor'),
+ 'xorBy': require('./xorBy'),
+ 'xorWith': require('./xorWith'),
+ 'zip': require('./zip'),
+ 'zipObject': require('./zipObject'),
+ 'zipObjectDeep': require('./zipObjectDeep'),
+ 'zipWith': require('./zipWith')
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/ary.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/ary.js
new file mode 100644
index 0000000..70c87d0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/ary.js
@@ -0,0 +1,29 @@
+var createWrap = require('./_createWrap');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_ARY_FLAG = 128;
+
+/**
+ * Creates a function that invokes `func`, with up to `n` arguments,
+ * ignoring any additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @param {number} [n=func.length] The arity cap.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new capped function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.ary(parseInt, 1));
+ * // => [6, 8, 10]
+ */
+function ary(func, n, guard) {
+ n = guard ? undefined : n;
+ n = (func && n == null) ? func.length : n;
+ return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
+}
+
+module.exports = ary;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/assign.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/assign.js
new file mode 100644
index 0000000..909db26
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/assign.js
@@ -0,0 +1,58 @@
+var assignValue = require('./_assignValue'),
+ copyObject = require('./_copyObject'),
+ createAssigner = require('./_createAssigner'),
+ isArrayLike = require('./isArrayLike'),
+ isPrototype = require('./_isPrototype'),
+ keys = require('./keys');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Assigns own enumerable string keyed properties of source objects to the
+ * destination object. Source objects are applied from left to right.
+ * Subsequent sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object` and is loosely based on
+ * [`Object.assign`](https://mdn.io/Object/assign).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assignIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assign({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'c': 3 }
+ */
+var assign = createAssigner(function(object, source) {
+ if (isPrototype(source) || isArrayLike(source)) {
+ copyObject(source, keys(source), object);
+ return;
+ }
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ assignValue(object, key, source[key]);
+ }
+ }
+});
+
+module.exports = assign;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/assignIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/assignIn.js
new file mode 100644
index 0000000..e663473
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/assignIn.js
@@ -0,0 +1,40 @@
+var copyObject = require('./_copyObject'),
+ createAssigner = require('./_createAssigner'),
+ keysIn = require('./keysIn');
+
+/**
+ * This method is like `_.assign` except that it iterates over own and
+ * inherited source properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extend
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assign
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assignIn({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
+ */
+var assignIn = createAssigner(function(object, source) {
+ copyObject(source, keysIn(source), object);
+});
+
+module.exports = assignIn;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/assignInWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/assignInWith.js
new file mode 100644
index 0000000..68fcc0b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/assignInWith.js
@@ -0,0 +1,38 @@
+var copyObject = require('./_copyObject'),
+ createAssigner = require('./_createAssigner'),
+ keysIn = require('./keysIn');
+
+/**
+ * This method is like `_.assignIn` except that it accepts `customizer`
+ * which is invoked to produce the assigned values. If `customizer` returns
+ * `undefined`, assignment is handled by the method instead. The `customizer`
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extendWith
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @see _.assignWith
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * return _.isUndefined(objValue) ? srcValue : objValue;
+ * }
+ *
+ * var defaults = _.partialRight(_.assignInWith, customizer);
+ *
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keysIn(source), object, customizer);
+});
+
+module.exports = assignInWith;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/assignWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/assignWith.js
new file mode 100644
index 0000000..7dc6c76
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/assignWith.js
@@ -0,0 +1,37 @@
+var copyObject = require('./_copyObject'),
+ createAssigner = require('./_createAssigner'),
+ keys = require('./keys');
+
+/**
+ * This method is like `_.assign` except that it accepts `customizer`
+ * which is invoked to produce the assigned values. If `customizer` returns
+ * `undefined`, assignment is handled by the method instead. The `customizer`
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @see _.assignInWith
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * return _.isUndefined(objValue) ? srcValue : objValue;
+ * }
+ *
+ * var defaults = _.partialRight(_.assignWith, customizer);
+ *
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keys(source), object, customizer);
+});
+
+module.exports = assignWith;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/at.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/at.js
new file mode 100644
index 0000000..781ee9e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/at.js
@@ -0,0 +1,23 @@
+var baseAt = require('./_baseAt'),
+ flatRest = require('./_flatRest');
+
+/**
+ * Creates an array of values corresponding to `paths` of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Array} Returns the picked values.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+ *
+ * _.at(object, ['a[0].b.c', 'a[1]']);
+ * // => [3, 4]
+ */
+var at = flatRest(baseAt);
+
+module.exports = at;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/attempt.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/attempt.js
new file mode 100644
index 0000000..624d015
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/attempt.js
@@ -0,0 +1,35 @@
+var apply = require('./_apply'),
+ baseRest = require('./_baseRest'),
+ isError = require('./isError');
+
+/**
+ * Attempts to invoke `func`, returning either the result or the caught error
+ * object. Any additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Function} func The function to attempt.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {*} Returns the `func` result or error object.
+ * @example
+ *
+ * // Avoid throwing errors for invalid selectors.
+ * var elements = _.attempt(function(selector) {
+ * return document.querySelectorAll(selector);
+ * }, '>_>');
+ *
+ * if (_.isError(elements)) {
+ * elements = [];
+ * }
+ */
+var attempt = baseRest(function(func, args) {
+ try {
+ return apply(func, undefined, args);
+ } catch (e) {
+ return isError(e) ? e : new Error(e);
+ }
+});
+
+module.exports = attempt;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/before.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/before.js
new file mode 100644
index 0000000..a3e0a16
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/before.js
@@ -0,0 +1,40 @@
+var toInteger = require('./toInteger');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a function that invokes `func`, with the `this` binding and arguments
+ * of the created function, while it's called less than `n` times. Subsequent
+ * calls to the created function return the result of the last `func` invocation.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {number} n The number of calls at which `func` is no longer invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * jQuery(element).on('click', _.before(5, addContactToList));
+ * // => Allows adding up to 4 contacts to the list.
+ */
+function before(n, func) {
+ var result;
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n > 0) {
+ result = func.apply(this, arguments);
+ }
+ if (n <= 1) {
+ func = undefined;
+ }
+ return result;
+ };
+}
+
+module.exports = before;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/bind.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/bind.js
new file mode 100644
index 0000000..b1076e9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/bind.js
@@ -0,0 +1,57 @@
+var baseRest = require('./_baseRest'),
+ createWrap = require('./_createWrap'),
+ getHolder = require('./_getHolder'),
+ replaceHolders = require('./_replaceHolders');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+ WRAP_PARTIAL_FLAG = 32;
+
+/**
+ * Creates a function that invokes `func` with the `this` binding of `thisArg`
+ * and `partials` prepended to the arguments it receives.
+ *
+ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
+ * property of bound functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to bind.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * function greet(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * var bound = _.bind(greet, object, 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bind(greet, object, _, '!');
+ * bound('hi');
+ * // => 'hi fred!'
+ */
+var bind = baseRest(function(func, thisArg, partials) {
+ var bitmask = WRAP_BIND_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, getHolder(bind));
+ bitmask |= WRAP_PARTIAL_FLAG;
+ }
+ return createWrap(func, bitmask, thisArg, partials, holders);
+});
+
+// Assign default placeholders.
+bind.placeholder = {};
+
+module.exports = bind;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/bindAll.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/bindAll.js
new file mode 100644
index 0000000..a35706d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/bindAll.js
@@ -0,0 +1,41 @@
+var arrayEach = require('./_arrayEach'),
+ baseAssignValue = require('./_baseAssignValue'),
+ bind = require('./bind'),
+ flatRest = require('./_flatRest'),
+ toKey = require('./_toKey');
+
+/**
+ * Binds methods of an object to the object itself, overwriting the existing
+ * method.
+ *
+ * **Note:** This method doesn't set the "length" property of bound functions.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Object} object The object to bind and assign the bound methods to.
+ * @param {...(string|string[])} methodNames The object method names to bind.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var view = {
+ * 'label': 'docs',
+ * 'click': function() {
+ * console.log('clicked ' + this.label);
+ * }
+ * };
+ *
+ * _.bindAll(view, ['click']);
+ * jQuery(element).on('click', view.click);
+ * // => Logs 'clicked docs' when clicked.
+ */
+var bindAll = flatRest(function(object, methodNames) {
+ arrayEach(methodNames, function(key) {
+ key = toKey(key);
+ baseAssignValue(object, key, bind(object[key], object));
+ });
+ return object;
+});
+
+module.exports = bindAll;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/bindKey.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/bindKey.js
new file mode 100644
index 0000000..f7fd64c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/bindKey.js
@@ -0,0 +1,68 @@
+var baseRest = require('./_baseRest'),
+ createWrap = require('./_createWrap'),
+ getHolder = require('./_getHolder'),
+ replaceHolders = require('./_replaceHolders');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_PARTIAL_FLAG = 32;
+
+/**
+ * Creates a function that invokes the method at `object[key]` with `partials`
+ * prepended to the arguments it receives.
+ *
+ * This method differs from `_.bind` by allowing bound functions to reference
+ * methods that may be redefined or don't yet exist. See
+ * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
+ * for more details.
+ *
+ * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Function
+ * @param {Object} object The object to invoke the method on.
+ * @param {string} key The key of the method.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * var object = {
+ * 'user': 'fred',
+ * 'greet': function(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ * };
+ *
+ * var bound = _.bindKey(object, 'greet', 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * object.greet = function(greeting, punctuation) {
+ * return greeting + 'ya ' + this.user + punctuation;
+ * };
+ *
+ * bound('!');
+ * // => 'hiya fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bindKey(object, 'greet', _, '!');
+ * bound('hi');
+ * // => 'hiya fred!'
+ */
+var bindKey = baseRest(function(object, key, partials) {
+ var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, getHolder(bindKey));
+ bitmask |= WRAP_PARTIAL_FLAG;
+ }
+ return createWrap(key, bitmask, object, partials, holders);
+});
+
+// Assign default placeholders.
+bindKey.placeholder = {};
+
+module.exports = bindKey;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/camelCase.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/camelCase.js
new file mode 100644
index 0000000..d7390de
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/camelCase.js
@@ -0,0 +1,29 @@
+var capitalize = require('./capitalize'),
+ createCompounder = require('./_createCompounder');
+
+/**
+ * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the camel cased string.
+ * @example
+ *
+ * _.camelCase('Foo Bar');
+ * // => 'fooBar'
+ *
+ * _.camelCase('--foo-bar--');
+ * // => 'fooBar'
+ *
+ * _.camelCase('__FOO_BAR__');
+ * // => 'fooBar'
+ */
+var camelCase = createCompounder(function(result, word, index) {
+ word = word.toLowerCase();
+ return result + (index ? capitalize(word) : word);
+});
+
+module.exports = camelCase;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/capitalize.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/capitalize.js
new file mode 100644
index 0000000..3e1600e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/capitalize.js
@@ -0,0 +1,23 @@
+var toString = require('./toString'),
+ upperFirst = require('./upperFirst');
+
+/**
+ * Converts the first character of `string` to upper case and the remaining
+ * to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to capitalize.
+ * @returns {string} Returns the capitalized string.
+ * @example
+ *
+ * _.capitalize('FRED');
+ * // => 'Fred'
+ */
+function capitalize(string) {
+ return upperFirst(toString(string).toLowerCase());
+}
+
+module.exports = capitalize;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/castArray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/castArray.js
new file mode 100644
index 0000000..e470bdb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/castArray.js
@@ -0,0 +1,44 @@
+var isArray = require('./isArray');
+
+/**
+ * Casts `value` as an array if it's not one.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.4.0
+ * @category Lang
+ * @param {*} value The value to inspect.
+ * @returns {Array} Returns the cast array.
+ * @example
+ *
+ * _.castArray(1);
+ * // => [1]
+ *
+ * _.castArray({ 'a': 1 });
+ * // => [{ 'a': 1 }]
+ *
+ * _.castArray('abc');
+ * // => ['abc']
+ *
+ * _.castArray(null);
+ * // => [null]
+ *
+ * _.castArray(undefined);
+ * // => [undefined]
+ *
+ * _.castArray();
+ * // => []
+ *
+ * var array = [1, 2, 3];
+ * console.log(_.castArray(array) === array);
+ * // => true
+ */
+function castArray() {
+ if (!arguments.length) {
+ return [];
+ }
+ var value = arguments[0];
+ return isArray(value) ? value : [value];
+}
+
+module.exports = castArray;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/ceil.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/ceil.js
new file mode 100644
index 0000000..56c8722
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/ceil.js
@@ -0,0 +1,26 @@
+var createRound = require('./_createRound');
+
+/**
+ * Computes `number` rounded up to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round up.
+ * @param {number} [precision=0] The precision to round up to.
+ * @returns {number} Returns the rounded up number.
+ * @example
+ *
+ * _.ceil(4.006);
+ * // => 5
+ *
+ * _.ceil(6.004, 2);
+ * // => 6.01
+ *
+ * _.ceil(6040, -2);
+ * // => 6100
+ */
+var ceil = createRound('ceil');
+
+module.exports = ceil;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/chain.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/chain.js
new file mode 100644
index 0000000..f6cd647
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/chain.js
@@ -0,0 +1,38 @@
+var lodash = require('./wrapperLodash');
+
+/**
+ * Creates a `lodash` wrapper instance that wraps `value` with explicit method
+ * chain sequences enabled. The result of such sequences must be unwrapped
+ * with `_#value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Seq
+ * @param {*} value The value to wrap.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'pebbles', 'age': 1 }
+ * ];
+ *
+ * var youngest = _
+ * .chain(users)
+ * .sortBy('age')
+ * .map(function(o) {
+ * return o.user + ' is ' + o.age;
+ * })
+ * .head()
+ * .value();
+ * // => 'pebbles is 1'
+ */
+function chain(value) {
+ var result = lodash(value);
+ result.__chain__ = true;
+ return result;
+}
+
+module.exports = chain;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/chunk.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/chunk.js
new file mode 100644
index 0000000..5b562fe
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/chunk.js
@@ -0,0 +1,50 @@
+var baseSlice = require('./_baseSlice'),
+ isIterateeCall = require('./_isIterateeCall'),
+ toInteger = require('./toInteger');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeCeil = Math.ceil,
+ nativeMax = Math.max;
+
+/**
+ * Creates an array of elements split into groups the length of `size`.
+ * If `array` can't be split evenly, the final chunk will be the remaining
+ * elements.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to process.
+ * @param {number} [size=1] The length of each chunk
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the new array of chunks.
+ * @example
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 2);
+ * // => [['a', 'b'], ['c', 'd']]
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 3);
+ * // => [['a', 'b', 'c'], ['d']]
+ */
+function chunk(array, size, guard) {
+ if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
+ size = 1;
+ } else {
+ size = nativeMax(toInteger(size), 0);
+ }
+ var length = array == null ? 0 : array.length;
+ if (!length || size < 1) {
+ return [];
+ }
+ var index = 0,
+ resIndex = 0,
+ result = Array(nativeCeil(length / size));
+
+ while (index < length) {
+ result[resIndex++] = baseSlice(array, index, (index += size));
+ }
+ return result;
+}
+
+module.exports = chunk;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/clamp.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/clamp.js
new file mode 100644
index 0000000..91a72c9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/clamp.js
@@ -0,0 +1,39 @@
+var baseClamp = require('./_baseClamp'),
+ toNumber = require('./toNumber');
+
+/**
+ * Clamps `number` within the inclusive `lower` and `upper` bounds.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Number
+ * @param {number} number The number to clamp.
+ * @param {number} [lower] The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the clamped number.
+ * @example
+ *
+ * _.clamp(-10, -5, 5);
+ * // => -5
+ *
+ * _.clamp(10, -5, 5);
+ * // => 5
+ */
+function clamp(number, lower, upper) {
+ if (upper === undefined) {
+ upper = lower;
+ lower = undefined;
+ }
+ if (upper !== undefined) {
+ upper = toNumber(upper);
+ upper = upper === upper ? upper : 0;
+ }
+ if (lower !== undefined) {
+ lower = toNumber(lower);
+ lower = lower === lower ? lower : 0;
+ }
+ return baseClamp(toNumber(number), lower, upper);
+}
+
+module.exports = clamp;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/clone.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/clone.js
new file mode 100644
index 0000000..dd439d6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/clone.js
@@ -0,0 +1,36 @@
+var baseClone = require('./_baseClone');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_SYMBOLS_FLAG = 4;
+
+/**
+ * Creates a shallow clone of `value`.
+ *
+ * **Note:** This method is loosely based on the
+ * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
+ * and supports cloning arrays, array buffers, booleans, date objects, maps,
+ * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
+ * arrays. The own enumerable properties of `arguments` objects are cloned
+ * as plain objects. An empty object is returned for uncloneable values such
+ * as error objects, functions, DOM nodes, and WeakMaps.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeep
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var shallow = _.clone(objects);
+ * console.log(shallow[0] === objects[0]);
+ * // => true
+ */
+function clone(value) {
+ return baseClone(value, CLONE_SYMBOLS_FLAG);
+}
+
+module.exports = clone;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/cloneDeep.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/cloneDeep.js
new file mode 100644
index 0000000..4425fbe
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/cloneDeep.js
@@ -0,0 +1,29 @@
+var baseClone = require('./_baseClone');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1,
+ CLONE_SYMBOLS_FLAG = 4;
+
+/**
+ * This method is like `_.clone` except that it recursively clones `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Lang
+ * @param {*} value The value to recursively clone.
+ * @returns {*} Returns the deep cloned value.
+ * @see _.clone
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var deep = _.cloneDeep(objects);
+ * console.log(deep[0] === objects[0]);
+ * // => false
+ */
+function cloneDeep(value) {
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
+}
+
+module.exports = cloneDeep;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/cloneDeepWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/cloneDeepWith.js
new file mode 100644
index 0000000..fd9c6c0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/cloneDeepWith.js
@@ -0,0 +1,40 @@
+var baseClone = require('./_baseClone');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1,
+ CLONE_SYMBOLS_FLAG = 4;
+
+/**
+ * This method is like `_.cloneWith` except that it recursively clones `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to recursively clone.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @returns {*} Returns the deep cloned value.
+ * @see _.cloneWith
+ * @example
+ *
+ * function customizer(value) {
+ * if (_.isElement(value)) {
+ * return value.cloneNode(true);
+ * }
+ * }
+ *
+ * var el = _.cloneDeepWith(document.body, customizer);
+ *
+ * console.log(el === document.body);
+ * // => false
+ * console.log(el.nodeName);
+ * // => 'BODY'
+ * console.log(el.childNodes.length);
+ * // => 20
+ */
+function cloneDeepWith(value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
+}
+
+module.exports = cloneDeepWith;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/cloneWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/cloneWith.js
new file mode 100644
index 0000000..d2f4e75
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/cloneWith.js
@@ -0,0 +1,42 @@
+var baseClone = require('./_baseClone');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_SYMBOLS_FLAG = 4;
+
+/**
+ * This method is like `_.clone` except that it accepts `customizer` which
+ * is invoked to produce the cloned value. If `customizer` returns `undefined`,
+ * cloning is handled by the method instead. The `customizer` is invoked with
+ * up to four arguments; (value [, index|key, object, stack]).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeepWith
+ * @example
+ *
+ * function customizer(value) {
+ * if (_.isElement(value)) {
+ * return value.cloneNode(false);
+ * }
+ * }
+ *
+ * var el = _.cloneWith(document.body, customizer);
+ *
+ * console.log(el === document.body);
+ * // => false
+ * console.log(el.nodeName);
+ * // => 'BODY'
+ * console.log(el.childNodes.length);
+ * // => 0
+ */
+function cloneWith(value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
+}
+
+module.exports = cloneWith;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/collection.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/collection.js
new file mode 100644
index 0000000..77fe837
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/collection.js
@@ -0,0 +1,30 @@
+module.exports = {
+ 'countBy': require('./countBy'),
+ 'each': require('./each'),
+ 'eachRight': require('./eachRight'),
+ 'every': require('./every'),
+ 'filter': require('./filter'),
+ 'find': require('./find'),
+ 'findLast': require('./findLast'),
+ 'flatMap': require('./flatMap'),
+ 'flatMapDeep': require('./flatMapDeep'),
+ 'flatMapDepth': require('./flatMapDepth'),
+ 'forEach': require('./forEach'),
+ 'forEachRight': require('./forEachRight'),
+ 'groupBy': require('./groupBy'),
+ 'includes': require('./includes'),
+ 'invokeMap': require('./invokeMap'),
+ 'keyBy': require('./keyBy'),
+ 'map': require('./map'),
+ 'orderBy': require('./orderBy'),
+ 'partition': require('./partition'),
+ 'reduce': require('./reduce'),
+ 'reduceRight': require('./reduceRight'),
+ 'reject': require('./reject'),
+ 'sample': require('./sample'),
+ 'sampleSize': require('./sampleSize'),
+ 'shuffle': require('./shuffle'),
+ 'size': require('./size'),
+ 'some': require('./some'),
+ 'sortBy': require('./sortBy')
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/commit.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/commit.js
new file mode 100644
index 0000000..fe4db71
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/commit.js
@@ -0,0 +1,33 @@
+var LodashWrapper = require('./_LodashWrapper');
+
+/**
+ * Executes the chain sequence and returns the wrapped result.
+ *
+ * @name commit
+ * @memberOf _
+ * @since 3.2.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2];
+ * var wrapped = _(array).push(3);
+ *
+ * console.log(array);
+ * // => [1, 2]
+ *
+ * wrapped = wrapped.commit();
+ * console.log(array);
+ * // => [1, 2, 3]
+ *
+ * wrapped.last();
+ * // => 3
+ *
+ * console.log(array);
+ * // => [1, 2, 3]
+ */
+function wrapperCommit() {
+ return new LodashWrapper(this.value(), this.__chain__);
+}
+
+module.exports = wrapperCommit;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/compact.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/compact.js
new file mode 100644
index 0000000..031fab4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/compact.js
@@ -0,0 +1,31 @@
+/**
+ * Creates an array with all falsey values removed. The values `false`, `null`,
+ * `0`, `""`, `undefined`, and `NaN` are falsey.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to compact.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.compact([0, 1, false, 2, '', 3]);
+ * // => [1, 2, 3]
+ */
+function compact(array) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+}
+
+module.exports = compact;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/concat.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/concat.js
new file mode 100644
index 0000000..1da48a4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/concat.js
@@ -0,0 +1,43 @@
+var arrayPush = require('./_arrayPush'),
+ baseFlatten = require('./_baseFlatten'),
+ copyArray = require('./_copyArray'),
+ isArray = require('./isArray');
+
+/**
+ * Creates a new array concatenating `array` with any additional arrays
+ * and/or values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to concatenate.
+ * @param {...*} [values] The values to concatenate.
+ * @returns {Array} Returns the new concatenated array.
+ * @example
+ *
+ * var array = [1];
+ * var other = _.concat(array, 2, [3], [[4]]);
+ *
+ * console.log(other);
+ * // => [1, 2, 3, [4]]
+ *
+ * console.log(array);
+ * // => [1]
+ */
+function concat() {
+ var length = arguments.length;
+ if (!length) {
+ return [];
+ }
+ var args = Array(length - 1),
+ array = arguments[0],
+ index = length;
+
+ while (index--) {
+ args[index - 1] = arguments[index];
+ }
+ return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
+}
+
+module.exports = concat;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/cond.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/cond.js
new file mode 100644
index 0000000..6455598
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/cond.js
@@ -0,0 +1,60 @@
+var apply = require('./_apply'),
+ arrayMap = require('./_arrayMap'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a function that iterates over `pairs` and invokes the corresponding
+ * function of the first predicate to return truthy. The predicate-function
+ * pairs are invoked with the `this` binding and arguments of the created
+ * function.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {Array} pairs The predicate-function pairs.
+ * @returns {Function} Returns the new composite function.
+ * @example
+ *
+ * var func = _.cond([
+ * [_.matches({ 'a': 1 }), _.constant('matches A')],
+ * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
+ * [_.stubTrue, _.constant('no match')]
+ * ]);
+ *
+ * func({ 'a': 1, 'b': 2 });
+ * // => 'matches A'
+ *
+ * func({ 'a': 0, 'b': 1 });
+ * // => 'matches B'
+ *
+ * func({ 'a': '1', 'b': '2' });
+ * // => 'no match'
+ */
+function cond(pairs) {
+ var length = pairs == null ? 0 : pairs.length,
+ toIteratee = baseIteratee;
+
+ pairs = !length ? [] : arrayMap(pairs, function(pair) {
+ if (typeof pair[1] != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return [toIteratee(pair[0]), pair[1]];
+ });
+
+ return baseRest(function(args) {
+ var index = -1;
+ while (++index < length) {
+ var pair = pairs[index];
+ if (apply(pair[0], this, args)) {
+ return apply(pair[1], this, args);
+ }
+ }
+ });
+}
+
+module.exports = cond;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/conforms.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/conforms.js
new file mode 100644
index 0000000..5501a94
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/conforms.js
@@ -0,0 +1,35 @@
+var baseClone = require('./_baseClone'),
+ baseConforms = require('./_baseConforms');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1;
+
+/**
+ * Creates a function that invokes the predicate properties of `source` with
+ * the corresponding property values of a given object, returning `true` if
+ * all predicates return truthy, else `false`.
+ *
+ * **Note:** The created function is equivalent to `_.conformsTo` with
+ * `source` partially applied.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 2, 'b': 1 },
+ * { 'a': 1, 'b': 2 }
+ * ];
+ *
+ * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
+ * // => [{ 'a': 1, 'b': 2 }]
+ */
+function conforms(source) {
+ return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
+}
+
+module.exports = conforms;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/conformsTo.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/conformsTo.js
new file mode 100644
index 0000000..b8a93eb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/conformsTo.js
@@ -0,0 +1,32 @@
+var baseConformsTo = require('./_baseConformsTo'),
+ keys = require('./keys');
+
+/**
+ * Checks if `object` conforms to `source` by invoking the predicate
+ * properties of `source` with the corresponding property values of `object`.
+ *
+ * **Note:** This method is equivalent to `_.conforms` when `source` is
+ * partially applied.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.14.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {boolean} Returns `true` if `object` conforms, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ *
+ * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
+ * // => true
+ *
+ * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
+ * // => false
+ */
+function conformsTo(object, source) {
+ return source == null || baseConformsTo(object, source, keys(source));
+}
+
+module.exports = conformsTo;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/constant.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/constant.js
new file mode 100644
index 0000000..655ece3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/constant.js
@@ -0,0 +1,26 @@
+/**
+ * Creates a function that returns `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {*} value The value to return from the new function.
+ * @returns {Function} Returns the new constant function.
+ * @example
+ *
+ * var objects = _.times(2, _.constant({ 'a': 1 }));
+ *
+ * console.log(objects);
+ * // => [{ 'a': 1 }, { 'a': 1 }]
+ *
+ * console.log(objects[0] === objects[1]);
+ * // => true
+ */
+function constant(value) {
+ return function() {
+ return value;
+ };
+}
+
+module.exports = constant;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/core.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/core.js
new file mode 100644
index 0000000..59cdc7b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/core.js
@@ -0,0 +1,3839 @@
+/**
+ * @license
+ * Lodash (Custom Build) <https://lodash.com/>
+ * Build: `lodash core -o ./dist/lodash.core.js`
+ * Copyright JS Foundation and other contributors <https://js.foundation/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+;(function() {
+
+ /** Used as a safe reference for `undefined` in pre-ES5 environments. */
+ var undefined;
+
+ /** Used as the semantic version number. */
+ var VERSION = '4.17.2';
+
+ /** Error message constants. */
+ var FUNC_ERROR_TEXT = 'Expected a function';
+
+ /** Used to compose bitmasks for value comparisons. */
+ var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+ /** Used to compose bitmasks for function metadata. */
+ var WRAP_BIND_FLAG = 1,
+ WRAP_PARTIAL_FLAG = 32;
+
+ /** Used as references for various `Number` constants. */
+ var INFINITY = 1 / 0,
+ MAX_SAFE_INTEGER = 9007199254740991;
+
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ asyncTag = '[object AsyncFunction]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ proxyTag = '[object Proxy]',
+ regexpTag = '[object RegExp]',
+ stringTag = '[object String]';
+
+ /** Used to match HTML entities and HTML characters. */
+ var reUnescapedHtml = /[&<>"']/g,
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+
+ /** Used to map characters to HTML entities. */
+ var htmlEscapes = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#39;'
+ };
+
+ /** Detect free variable `global` from Node.js. */
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+ /** Detect free variable `self`. */
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+ /** Used as a reference to the global object. */
+ var root = freeGlobal || freeSelf || Function('return this')();
+
+ /** Detect free variable `exports`. */
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
+
+ /** Detect free variable `module`. */
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayPush(array, values) {
+ array.push.apply(array, values);
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {number} fromIndex The index to search from.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseFindIndex(array, predicate, fromIndex, fromRight) {
+ var length = array.length,
+ index = fromIndex + (fromRight ? 1 : -1);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (predicate(array[index], index, array)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+ }
+
+ /**
+ * The base implementation of `_.propertyOf` without support for deep paths.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function basePropertyOf(object) {
+ return function(key) {
+ return object == null ? undefined : object[key];
+ };
+ }
+
+ /**
+ * The base implementation of `_.reduce` and `_.reduceRight`, without support
+ * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} accumulator The initial value.
+ * @param {boolean} initAccum Specify using the first or last element of
+ * `collection` as the initial value.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the accumulated value.
+ */
+ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
+ eachFunc(collection, function(value, index, collection) {
+ accumulator = initAccum
+ ? (initAccum = false, value)
+ : iteratee(accumulator, value, index, collection);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
+ * array of `object` property values corresponding to the property names
+ * of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the array of property values.
+ */
+ function baseValues(object, props) {
+ return baseMap(props, function(key) {
+ return object[key];
+ });
+ }
+
+ /**
+ * Used by `_.escape` to convert characters to HTML entities.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+ var escapeHtmlChar = basePropertyOf(htmlEscapes);
+
+ /**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /** Used for built-in method references. */
+ var arrayProto = Array.prototype,
+ objectProto = Object.prototype;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /** Used to generate unique IDs. */
+ var idCounter = 0;
+
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var nativeObjectToString = objectProto.toString;
+
+ /** Used to restore the original `_` reference in `_.noConflict`. */
+ var oldDash = root._;
+
+ /** Built-in value references. */
+ var objectCreate = Object.create,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable;
+
+ /* Built-in method references for those with the same name as other `lodash` methods. */
+ var nativeIsFinite = root.isFinite,
+ nativeKeys = overArg(Object.keys, Object),
+ nativeMax = Math.max;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` object which wraps `value` to enable implicit method
+ * chain sequences. Methods that operate on and return arrays, collections,
+ * and functions can be chained together. Methods that retrieve a single value
+ * or may return a primitive value will automatically end the chain sequence
+ * and return the unwrapped value. Otherwise, the value must be unwrapped
+ * with `_#value`.
+ *
+ * Explicit chain sequences, which must be unwrapped with `_#value`, may be
+ * enabled using `_.chain`.
+ *
+ * The execution of chained methods is lazy, that is, it's deferred until
+ * `_#value` is implicitly or explicitly called.
+ *
+ * Lazy evaluation allows several methods to support shortcut fusion.
+ * Shortcut fusion is an optimization to merge iteratee calls; this avoids
+ * the creation of intermediate arrays and can greatly reduce the number of
+ * iteratee executions. Sections of a chain sequence qualify for shortcut
+ * fusion if the section is applied to an array of at least `200` elements
+ * and any iteratees accept only one argument. The heuristic for whether a
+ * section qualifies for shortcut fusion is subject to change.
+ *
+ * Chaining is supported in custom builds as long as the `_#value` method is
+ * directly or indirectly included in the build.
+ *
+ * In addition to lodash methods, wrappers have `Array` and `String` methods.
+ *
+ * The wrapper `Array` methods are:
+ * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
+ *
+ * The wrapper `String` methods are:
+ * `replace` and `split`
+ *
+ * The wrapper methods that support shortcut fusion are:
+ * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
+ * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
+ * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
+ *
+ * The chainable wrapper methods are:
+ * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
+ * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
+ * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
+ * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
+ * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
+ * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
+ * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
+ * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
+ * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
+ * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
+ * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
+ * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
+ * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
+ * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
+ * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
+ * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
+ * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
+ * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
+ * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
+ * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
+ * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
+ * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
+ * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
+ * `zipObject`, `zipObjectDeep`, and `zipWith`
+ *
+ * The wrapper methods that are **not** chainable by default are:
+ * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
+ * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
+ * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
+ * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
+ * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
+ * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
+ * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
+ * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
+ * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
+ * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
+ * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
+ * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
+ * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
+ * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
+ * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
+ * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
+ * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
+ * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
+ * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
+ * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
+ * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
+ * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
+ * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
+ * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
+ * `upperFirst`, `value`, and `words`
+ *
+ * @name _
+ * @constructor
+ * @category Seq
+ * @param {*} value The value to wrap in a `lodash` instance.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2, 3]);
+ *
+ * // Returns an unwrapped value.
+ * wrapped.reduce(_.add);
+ * // => 6
+ *
+ * // Returns a wrapped value.
+ * var squares = wrapped.map(square);
+ *
+ * _.isArray(squares);
+ * // => false
+ *
+ * _.isArray(squares.value());
+ * // => true
+ */
+ function lodash(value) {
+ return value instanceof LodashWrapper
+ ? value
+ : new LodashWrapper(value);
+ }
+
+ /**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} proto The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+ var baseCreate = (function() {
+ function object() {}
+ return function(proto) {
+ if (!isObject(proto)) {
+ return {};
+ }
+ if (objectCreate) {
+ return objectCreate(proto);
+ }
+ object.prototype = proto;
+ var result = new object;
+ object.prototype = undefined;
+ return result;
+ };
+ }());
+
+ /**
+ * The base constructor for creating `lodash` wrapper objects.
+ *
+ * @private
+ * @param {*} value The value to wrap.
+ * @param {boolean} [chainAll] Enable explicit method chain sequences.
+ */
+ function LodashWrapper(value, chainAll) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__chain__ = !!chainAll;
+ }
+
+ LodashWrapper.prototype = baseCreate(lodash.prototype);
+ LodashWrapper.prototype.constructor = LodashWrapper;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Used by `_.defaults` to customize its `_.assignIn` use.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to assign.
+ * @param {Object} object The parent object of `objValue`.
+ * @returns {*} Returns the value to assign.
+ */
+ function assignInDefaults(objValue, srcValue, key, object) {
+ if (objValue === undefined ||
+ (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ return srcValue;
+ }
+ return objValue;
+ }
+
+ /**
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignValue(object, key, value) {
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
+ }
+ }
+
+ /**
+ * The base implementation of `assignValue` and `assignMergeValue` without
+ * value checks.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function baseAssignValue(object, key, value) {
+ object[key] = value;
+ }
+
+ /**
+ * The base implementation of `_.delay` and `_.defer` which accepts `args`
+ * to provide to `func`.
+ *
+ * @private
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {Array} args The arguments to provide to `func`.
+ * @returns {number|Object} Returns the timer id or timeout object.
+ */
+ function baseDelay(func, wait, args) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return setTimeout(function() { func.apply(undefined, args); }, wait);
+ }
+
+ /**
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+ var baseEach = createBaseEach(baseForOwn);
+
+ /**
+ * The base implementation of `_.every` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`
+ */
+ function baseEvery(collection, predicate) {
+ var result = true;
+ baseEach(collection, function(value, index, collection) {
+ result = !!predicate(value, index, collection);
+ return result;
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of methods like `_.max` and `_.min` which accepts a
+ * `comparator` to determine the extremum value.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The iteratee invoked per iteration.
+ * @param {Function} comparator The comparator used to compare values.
+ * @returns {*} Returns the extremum value.
+ */
+ function baseExtremum(array, iteratee, comparator) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var value = array[index],
+ current = iteratee(value);
+
+ if (current != null && (computed === undefined
+ ? (current === current && !false)
+ : comparator(current, computed)
+ )) {
+ var computed = current,
+ result = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.filter` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+ function baseFilter(collection, predicate) {
+ var result = [];
+ baseEach(collection, function(value, index, collection) {
+ if (predicate(value, index, collection)) {
+ result.push(value);
+ }
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.flatten` with support for restricting flattening.
+ *
+ * @private
+ * @param {Array} array The array to flatten.
+ * @param {number} depth The maximum recursion depth.
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
+ * @param {Array} [result=[]] The initial result value.
+ * @returns {Array} Returns the new flattened array.
+ */
+ function baseFlatten(array, depth, predicate, isStrict, result) {
+ var index = -1,
+ length = array.length;
+
+ predicate || (predicate = isFlattenable);
+ result || (result = []);
+
+ while (++index < length) {
+ var value = array[index];
+ if (depth > 0 && predicate(value)) {
+ if (depth > 1) {
+ // Recursively flatten arrays (susceptible to call stack limits).
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
+ } else {
+ arrayPush(result, value);
+ }
+ } else if (!isStrict) {
+ result[result.length] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `baseForOwn` which iterates over `object`
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+ var baseFor = createBaseFor();
+
+ /**
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+ function baseForOwn(object, iteratee) {
+ return object && baseFor(object, iteratee, keys);
+ }
+
+ /**
+ * The base implementation of `_.functions` which creates an array of
+ * `object` function property names filtered from `props`.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Array} props The property names to filter.
+ * @returns {Array} Returns the function names.
+ */
+ function baseFunctions(object, props) {
+ return baseFilter(props, function(key) {
+ return isFunction(object[key]);
+ });
+ }
+
+ /**
+ * The base implementation of `getTag` without fallbacks for buggy environments.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+ function baseGetTag(value) {
+ return objectToString(value);
+ }
+
+ /**
+ * The base implementation of `_.gt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ */
+ function baseGt(value, other) {
+ return value > other;
+ }
+
+ /**
+ * The base implementation of `_.isArguments`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ */
+ var baseIsArguments = noop;
+
+ /**
+ * The base implementation of `_.isDate` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ */
+ function baseIsDate(value) {
+ return isObjectLike(value) && baseGetTag(value) == dateTag;
+ }
+
+ /**
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
+ }
+
+ /**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = arrayTag,
+ othTag = arrayTag;
+
+ if (!objIsArr) {
+ objTag = baseGetTag(object);
+ objTag = objTag == argsTag ? objectTag : objTag;
+ }
+ if (!othIsArr) {
+ othTag = baseGetTag(other);
+ othTag = othTag == argsTag ? objectTag : othTag;
+ }
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
+ isSameTag = objTag == othTag;
+
+ stack || (stack = []);
+ var objStack = find(stack, function(entry) {
+ return entry[0] == object;
+ });
+ var othStack = find(stack, function(entry) {
+ return entry[0] == other;
+ });
+ if (objStack && othStack) {
+ return objStack[1] == other;
+ }
+ stack.push([object, other]);
+ stack.push([other, object]);
+ if (isSameTag && !objIsObj) {
+ var result = (objIsArr)
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
+ stack.pop();
+ return result;
+ }
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ var objUnwrapped = objIsWrapped ? object.value() : object,
+ othUnwrapped = othIsWrapped ? other.value() : other;
+
+ var result = equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
+ stack.pop();
+ return result;
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ var result = equalObjects(object, other, bitmask, customizer, equalFunc, stack);
+ stack.pop();
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.isRegExp` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ */
+ function baseIsRegExp(value) {
+ return isObjectLike(value) && baseGetTag(value) == regexpTag;
+ }
+
+ /**
+ * The base implementation of `_.iteratee`.
+ *
+ * @private
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
+ * @returns {Function} Returns the iteratee.
+ */
+ function baseIteratee(func) {
+ if (typeof func == 'function') {
+ return func;
+ }
+ if (func == null) {
+ return identity;
+ }
+ return (typeof func == 'object' ? baseMatches : baseProperty)(func);
+ }
+
+ /**
+ * The base implementation of `_.lt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ */
+ function baseLt(value, other) {
+ return value < other;
+ }
+
+ /**
+ * The base implementation of `_.map` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+ function baseMap(collection, iteratee) {
+ var index = -1,
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value, key, collection) {
+ result[++index] = iteratee(value, key, collection);
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.matches` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseMatches(source) {
+ var props = nativeKeys(source);
+ return function(object) {
+ var length = props.length;
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (length--) {
+ var key = props[length];
+ if (!(key in object &&
+ baseIsEqual(source[key], object[key], COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG)
+ )) {
+ return false;
+ }
+ }
+ return true;
+ };
+ }
+
+ /**
+ * The base implementation of `_.pick` without support for individual
+ * property identifiers.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @returns {Object} Returns the new object.
+ */
+ function basePick(object, props) {
+ object = Object(object);
+ return reduce(props, function(result, key) {
+ if (key in object) {
+ result[key] = object[key];
+ }
+ return result;
+ }, {});
+ }
+
+ /**
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ */
+ function baseRest(func, start) {
+ return setToString(overRest(func, start, identity), func + '');
+ }
+
+ /**
+ * The base implementation of `_.slice` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function baseSlice(array, start, end) {
+ var index = -1,
+ length = array.length;
+
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = end > length ? length : end;
+ if (end < 0) {
+ end += length;
+ }
+ length = start > end ? 0 : ((end - start) >>> 0);
+ start >>>= 0;
+
+ var result = Array(length);
+ while (++index < length) {
+ result[index] = array[index + start];
+ }
+ return result;
+ }
+
+ /**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+ function copyArray(source) {
+ return baseSlice(source, 0, source.length);
+ }
+
+ /**
+ * The base implementation of `_.some` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function baseSome(collection, predicate) {
+ var result;
+
+ baseEach(collection, function(value, index, collection) {
+ result = predicate(value, index, collection);
+ return !result;
+ });
+ return !!result;
+ }
+
+ /**
+ * The base implementation of `wrapperValue` which returns the result of
+ * performing a sequence of actions on the unwrapped `value`, where each
+ * successive action is supplied the return value of the previous.
+ *
+ * @private
+ * @param {*} value The unwrapped value.
+ * @param {Array} actions Actions to perform to resolve the unwrapped value.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseWrapperValue(value, actions) {
+ var result = value;
+ return reduce(actions, function(result, action) {
+ return action.func.apply(action.thisArg, arrayPush([result], action.args));
+ }, result);
+ }
+
+ /**
+ * Compares values to sort them in ascending order.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {number} Returns the sort order indicator for `value`.
+ */
+ function compareAscending(value, other) {
+ if (value !== other) {
+ var valIsDefined = value !== undefined,
+ valIsNull = value === null,
+ valIsReflexive = value === value,
+ valIsSymbol = false;
+
+ var othIsDefined = other !== undefined,
+ othIsNull = other === null,
+ othIsReflexive = other === other,
+ othIsSymbol = false;
+
+ if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
+ (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
+ (valIsNull && othIsDefined && othIsReflexive) ||
+ (!valIsDefined && othIsReflexive) ||
+ !valIsReflexive) {
+ return 1;
+ }
+ if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
+ (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
+ (othIsNull && valIsDefined && valIsReflexive) ||
+ (!othIsDefined && valIsReflexive) ||
+ !othIsReflexive) {
+ return -1;
+ }
+ }
+ return 0;
+ }
+
+ /**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property identifiers to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
+ */
+ function copyObject(source, props, object, customizer) {
+ var isNew = !object;
+ object || (object = {});
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index];
+
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = source[key];
+ }
+ if (isNew) {
+ baseAssignValue(object, key, newValue);
+ } else {
+ assignValue(object, key, newValue);
+ }
+ }
+ return object;
+ }
+
+ /**
+ * Creates a function like `_.assign`.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
+ */
+ function createAssigner(assigner) {
+ return baseRest(function(object, sources) {
+ var index = -1,
+ length = sources.length,
+ customizer = length > 1 ? sources[length - 1] : undefined;
+
+ customizer = (assigner.length > 3 && typeof customizer == 'function')
+ ? (length--, customizer)
+ : undefined;
+
+ object = Object(object);
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, index, customizer);
+ }
+ }
+ return object;
+ });
+ }
+
+ /**
+ * Creates a `baseEach` or `baseEachRight` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ if (collection == null) {
+ return collection;
+ }
+ if (!isArrayLike(collection)) {
+ return eachFunc(collection, iteratee);
+ }
+ var length = collection.length,
+ index = fromRight ? length : -1,
+ iterable = Object(collection);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
+ }
+ return collection;
+ };
+ }
+
+ /**
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var index = -1,
+ iterable = Object(object),
+ props = keysFunc(object),
+ length = props.length;
+
+ while (length--) {
+ var key = props[fromRight ? length : ++index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
+ }
+ return object;
+ };
+ }
+
+ /**
+ * Creates a function that produces an instance of `Ctor` regardless of
+ * whether it was invoked as part of a `new` expression or by `call` or `apply`.
+ *
+ * @private
+ * @param {Function} Ctor The constructor to wrap.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createCtor(Ctor) {
+ return function() {
+ // Use a `switch` statement to work with class constructors. See
+ // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
+ // for more details.
+ var args = arguments;
+ var thisBinding = baseCreate(Ctor.prototype),
+ result = Ctor.apply(thisBinding, args);
+
+ // Mimic the constructor's `return` behavior.
+ // See https://es5.github.io/#x13.2.2 for more details.
+ return isObject(result) ? result : thisBinding;
+ };
+ }
+
+ /**
+ * Creates a `_.find` or `_.findLast` function.
+ *
+ * @private
+ * @param {Function} findIndexFunc The function to find the collection index.
+ * @returns {Function} Returns the new find function.
+ */
+ function createFind(findIndexFunc) {
+ return function(collection, predicate, fromIndex) {
+ var iterable = Object(collection);
+ if (!isArrayLike(collection)) {
+ var iteratee = baseIteratee(predicate, 3);
+ collection = keys(collection);
+ predicate = function(key) { return iteratee(iterable[key], key, iterable); };
+ }
+ var index = findIndexFunc(collection, predicate, fromIndex);
+ return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with the `this` binding
+ * of `thisArg` and `partials` prepended to the arguments it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} partials The arguments to prepend to those provided to
+ * the new function.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createPartial(func, bitmask, thisArg, partials) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var isBind = bitmask & WRAP_BIND_FLAG,
+ Ctor = createCtor(func);
+
+ function wrapper() {
+ var argsIndex = -1,
+ argsLength = arguments.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ args = Array(leftLength + argsLength),
+ fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+
+ while (++leftIndex < leftLength) {
+ args[leftIndex] = partials[leftIndex];
+ }
+ while (argsLength--) {
+ args[leftIndex++] = arguments[++argsIndex];
+ }
+ return fn.apply(isBind ? thisArg : this, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
+ }
+ var index = -1,
+ result = true,
+ seen = (bitmask & COMPARE_UNORDERED_FLAG) ? [] : undefined;
+
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
+
+ var compared;
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
+ }
+ result = false;
+ break;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (seen) {
+ if (!baseSome(other, function(othValue, othIndex) {
+ if (!indexOf(seen, othIndex) &&
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
+ return seen.push(othIndex);
+ }
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
+ )) {
+ result = false;
+ break;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
+ switch (tag) {
+
+ case boolTag:
+ case dateTag:
+ case numberTag:
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
+ // Invalid dates are coerced to `NaN`.
+ return eq(+object, +other);
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings, primitives and objects,
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
+ // for more details.
+ return object == (other + '');
+
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ objProps = keys(object),
+ objLength = objProps.length,
+ othProps = keys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ var result = true;
+
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
+
+ var compared;
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseRest` which flattens the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+ function flatRest(func) {
+ return setToString(overRest(func, undefined, flatten), func + '');
+ }
+
+ /**
+ * Checks if `value` is a flattenable `arguments` object or array.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
+ */
+ function isFlattenable(value) {
+ return isArray(value) || isArguments(value);
+ }
+
+ /**
+ * This function is like
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * except that it includes inherited enumerable properties.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function nativeKeysIn(object) {
+ var result = [];
+ if (object != null) {
+ for (var key in Object(object)) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts `value` to a string using `Object.prototype.toString`.
+ *
+ * @private
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ */
+ function objectToString(value) {
+ return nativeObjectToString.call(value);
+ }
+
+ /**
+ * A specialized version of `baseRest` which transforms the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @param {Function} transform The rest array transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overRest(func, start, transform) {
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ index = -1;
+ var otherArgs = Array(start + 1);
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = transform(array);
+ return func.apply(this, otherArgs);
+ };
+ }
+
+ /**
+ * Sets the `toString` method of `func` to return `string`.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+ var setToString = identity;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an array with all falsey values removed. The values `false`, `null`,
+ * `0`, `""`, `undefined`, and `NaN` are falsey.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to compact.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.compact([0, 1, false, 2, '', 3]);
+ * // => [1, 2, 3]
+ */
+ function compact(array) {
+ return baseFilter(array, Boolean);
+ }
+
+ /**
+ * Creates a new array concatenating `array` with any additional arrays
+ * and/or values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to concatenate.
+ * @param {...*} [values] The values to concatenate.
+ * @returns {Array} Returns the new concatenated array.
+ * @example
+ *
+ * var array = [1];
+ * var other = _.concat(array, 2, [3], [[4]]);
+ *
+ * console.log(other);
+ * // => [1, 2, 3, [4]]
+ *
+ * console.log(array);
+ * // => [1]
+ */
+ function concat() {
+ var length = arguments.length;
+ if (!length) {
+ return [];
+ }
+ var args = Array(length - 1),
+ array = arguments[0],
+ index = length;
+
+ while (index--) {
+ args[index - 1] = arguments[index];
+ }
+ return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
+ }
+
+ /**
+ * This method is like `_.find` except that it returns the index of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.findIndex(users, function(o) { return o.user == 'barney'; });
+ * // => 0
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findIndex(users, { 'user': 'fred', 'active': false });
+ * // => 1
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findIndex(users, ['active', false]);
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findIndex(users, 'active');
+ * // => 2
+ */
+ function findIndex(array, predicate, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
+ }
+ return baseFindIndex(array, baseIteratee(predicate, 3), index);
+ }
+
+ /**
+ * Flattens `array` a single level deep.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flatten([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, [3, [4]], 5]
+ */
+ function flatten(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, 1) : [];
+ }
+
+ /**
+ * Recursively flattens `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flattenDeep([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, 3, 4, 5]
+ */
+ function flattenDeep(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, INFINITY) : [];
+ }
+
+ /**
+ * Gets the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias first
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the first element of `array`.
+ * @example
+ *
+ * _.head([1, 2, 3]);
+ * // => 1
+ *
+ * _.head([]);
+ * // => undefined
+ */
+ function head(array) {
+ return (array && array.length) ? array[0] : undefined;
+ }
+
+ /**
+ * Gets the index at which the first occurrence of `value` is found in `array`
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. If `fromIndex` is negative, it's used as the
+ * offset from the end of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.indexOf([1, 2, 1, 2], 2);
+ * // => 1
+ *
+ * // Search from the `fromIndex`.
+ * _.indexOf([1, 2, 1, 2], 2, 2);
+ * // => 3
+ */
+ function indexOf(array, value, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (typeof fromIndex == 'number') {
+ fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex;
+ } else {
+ fromIndex = 0;
+ }
+ var index = (fromIndex || 0) - 1,
+ isReflexive = value === value;
+
+ while (++index < length) {
+ var other = array[index];
+ if ((isReflexive ? other === value : other !== other)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Gets the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the last element of `array`.
+ * @example
+ *
+ * _.last([1, 2, 3]);
+ * // => 3
+ */
+ function last(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? array[length - 1] : undefined;
+ }
+
+ /**
+ * Creates a slice of `array` from `start` up to, but not including, `end`.
+ *
+ * **Note:** This method is used instead of
+ * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
+ * returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function slice(array, start, end) {
+ var length = array == null ? 0 : array.length;
+ start = start == null ? 0 : +start;
+ end = end === undefined ? length : +end;
+ return length ? baseSlice(array, start, end) : [];
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` wrapper instance that wraps `value` with explicit method
+ * chain sequences enabled. The result of such sequences must be unwrapped
+ * with `_#value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Seq
+ * @param {*} value The value to wrap.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'pebbles', 'age': 1 }
+ * ];
+ *
+ * var youngest = _
+ * .chain(users)
+ * .sortBy('age')
+ * .map(function(o) {
+ * return o.user + ' is ' + o.age;
+ * })
+ * .head()
+ * .value();
+ * // => 'pebbles is 1'
+ */
+ function chain(value) {
+ var result = lodash(value);
+ result.__chain__ = true;
+ return result;
+ }
+
+ /**
+ * This method invokes `interceptor` and returns `value`. The interceptor
+ * is invoked with one argument; (value). The purpose of this method is to
+ * "tap into" a method chain sequence in order to modify intermediate results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * _([1, 2, 3])
+ * .tap(function(array) {
+ * // Mutate input array.
+ * array.pop();
+ * })
+ * .reverse()
+ * .value();
+ * // => [2, 1]
+ */
+ function tap(value, interceptor) {
+ interceptor(value);
+ return value;
+ }
+
+ /**
+ * This method is like `_.tap` except that it returns the result of `interceptor`.
+ * The purpose of this method is to "pass thru" values replacing intermediate
+ * results in a method chain sequence.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns the result of `interceptor`.
+ * @example
+ *
+ * _(' abc ')
+ * .chain()
+ * .trim()
+ * .thru(function(value) {
+ * return [value];
+ * })
+ * .value();
+ * // => ['abc']
+ */
+ function thru(value, interceptor) {
+ return interceptor(value);
+ }
+
+ /**
+ * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
+ *
+ * @name chain
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * // A sequence without explicit chaining.
+ * _(users).head();
+ * // => { 'user': 'barney', 'age': 36 }
+ *
+ * // A sequence with explicit chaining.
+ * _(users)
+ * .chain()
+ * .head()
+ * .pick('user')
+ * .value();
+ * // => { 'user': 'barney' }
+ */
+ function wrapperChain() {
+ return chain(this);
+ }
+
+ /**
+ * Executes the chain sequence to resolve the unwrapped value.
+ *
+ * @name value
+ * @memberOf _
+ * @since 0.1.0
+ * @alias toJSON, valueOf
+ * @category Seq
+ * @returns {*} Returns the resolved unwrapped value.
+ * @example
+ *
+ * _([1, 2, 3]).value();
+ * // => [1, 2, 3]
+ */
+ function wrapperValue() {
+ return baseWrapperValue(this.__wrapped__, this.__actions__);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Checks if `predicate` returns truthy for **all** elements of `collection`.
+ * Iteration is stopped once `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * **Note:** This method returns `true` for
+ * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
+ * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
+ * elements of empty collections.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.every([true, 1, null, 'yes'], Boolean);
+ * // => false
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.every(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.every(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.every(users, 'active');
+ * // => false
+ */
+ function every(collection, predicate, guard) {
+ predicate = guard ? undefined : predicate;
+ return baseEvery(collection, baseIteratee(predicate));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning an array of all elements
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * **Note:** Unlike `_.remove`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.reject
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.filter(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, { 'age': 36, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.filter(users, 'active');
+ * // => objects for ['barney']
+ */
+ function filter(collection, predicate) {
+ return baseFilter(collection, baseIteratee(predicate));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning the first element
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false },
+ * { 'user': 'pebbles', 'age': 1, 'active': true }
+ * ];
+ *
+ * _.find(users, function(o) { return o.age < 40; });
+ * // => object for 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.find(users, { 'age': 1, 'active': true });
+ * // => object for 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.find(users, ['active', false]);
+ * // => object for 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.find(users, 'active');
+ * // => object for 'barney'
+ */
+ var find = createFind(findIndex);
+
+ /**
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length"
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
+ * or `_.forOwn` for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias each
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEachRight
+ * @example
+ *
+ * _.forEach([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `1` then `2`.
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+ function forEach(collection, iteratee) {
+ return baseEach(collection, baseIteratee(iteratee));
+ }
+
+ /**
+ * Creates an array of values by running each element in `collection` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+ *
+ * The guarded methods are:
+ * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
+ * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
+ * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
+ * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * _.map([4, 8], square);
+ * // => [16, 64]
+ *
+ * _.map({ 'a': 4, 'b': 8 }, square);
+ * // => [16, 64] (iteration order is not guaranteed)
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, 'user');
+ * // => ['barney', 'fred']
+ */
+ function map(collection, iteratee) {
+ return baseMap(collection, baseIteratee(iteratee));
+ }
+
+ /**
+ * Reduces `collection` to a value which is the accumulated result of running
+ * each element in `collection` thru `iteratee`, where each successive
+ * invocation is supplied the return value of the previous. If `accumulator`
+ * is not given, the first element of `collection` is used as the initial
+ * value. The iteratee is invoked with four arguments:
+ * (accumulator, value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.reduce`, `_.reduceRight`, and `_.transform`.
+ *
+ * The guarded methods are:
+ * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
+ * and `sortBy`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduceRight
+ * @example
+ *
+ * _.reduce([1, 2], function(sum, n) {
+ * return sum + n;
+ * }, 0);
+ * // => 3
+ *
+ * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * return result;
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
+ */
+ function reduce(collection, iteratee, accumulator) {
+ return baseReduce(collection, baseIteratee(iteratee), accumulator, arguments.length < 3, baseEach);
+ }
+
+ /**
+ * Gets the size of `collection` by returning its length for array-like
+ * values or the number of own enumerable string keyed properties for objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @returns {number} Returns the collection size.
+ * @example
+ *
+ * _.size([1, 2, 3]);
+ * // => 3
+ *
+ * _.size({ 'a': 1, 'b': 2 });
+ * // => 2
+ *
+ * _.size('pebbles');
+ * // => 7
+ */
+ function size(collection) {
+ if (collection == null) {
+ return 0;
+ }
+ collection = isArrayLike(collection) ? collection : nativeKeys(collection);
+ return collection.length;
+ }
+
+ /**
+ * Checks if `predicate` returns truthy for **any** element of `collection`.
+ * Iteration is stopped once `predicate` returns truthy. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.some([null, 0, 'yes', false], Boolean);
+ * // => true
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.some(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.some(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.some(users, 'active');
+ * // => true
+ */
+ function some(collection, predicate, guard) {
+ predicate = guard ? undefined : predicate;
+ return baseSome(collection, baseIteratee(predicate));
+ }
+
+ /**
+ * Creates an array of elements, sorted in ascending order by the results of
+ * running each element in a collection thru each iteratee. This method
+ * performs a stable sort, that is, it preserves the original sort order of
+ * equal elements. The iteratees are invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'barney', 'age': 34 }
+ * ];
+ *
+ * _.sortBy(users, [function(o) { return o.user; }]);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+ *
+ * _.sortBy(users, ['user', 'age']);
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
+ */
+ function sortBy(collection, iteratee) {
+ var index = 0;
+ iteratee = baseIteratee(iteratee);
+
+ return baseMap(baseMap(collection, function(value, key, collection) {
+ return { 'value': value, 'index': index++, 'criteria': iteratee(value, key, collection) };
+ }).sort(function(object, other) {
+ return compareAscending(object.criteria, other.criteria) || (object.index - other.index);
+ }), baseProperty('value'));
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a function that invokes `func`, with the `this` binding and arguments
+ * of the created function, while it's called less than `n` times. Subsequent
+ * calls to the created function return the result of the last `func` invocation.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {number} n The number of calls at which `func` is no longer invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * jQuery(element).on('click', _.before(5, addContactToList));
+ * // => Allows adding up to 4 contacts to the list.
+ */
+ function before(n, func) {
+ var result;
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n > 0) {
+ result = func.apply(this, arguments);
+ }
+ if (n <= 1) {
+ func = undefined;
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of `thisArg`
+ * and `partials` prepended to the arguments it receives.
+ *
+ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
+ * property of bound functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to bind.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * function greet(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * var bound = _.bind(greet, object, 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bind(greet, object, _, '!');
+ * bound('hi');
+ * // => 'hi fred!'
+ */
+ var bind = baseRest(function(func, thisArg, partials) {
+ return createPartial(func, WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG, thisArg, partials);
+ });
+
+ /**
+ * Defers invoking the `func` until the current call stack has cleared. Any
+ * additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to defer.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.defer(function(text) {
+ * console.log(text);
+ * }, 'deferred');
+ * // => Logs 'deferred' after one millisecond.
+ */
+ var defer = baseRest(function(func, args) {
+ return baseDelay(func, 1, args);
+ });
+
+ /**
+ * Invokes `func` after `wait` milliseconds. Any additional arguments are
+ * provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.delay(function(text) {
+ * console.log(text);
+ * }, 1000, 'later');
+ * // => Logs 'later' after one second.
+ */
+ var delay = baseRest(function(func, wait, args) {
+ return baseDelay(func, toNumber(wait) || 0, args);
+ });
+
+ /**
+ * Creates a function that negates the result of the predicate `func`. The
+ * `func` predicate is invoked with the `this` binding and arguments of the
+ * created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} predicate The predicate to negate.
+ * @returns {Function} Returns the new negated function.
+ * @example
+ *
+ * function isEven(n) {
+ * return n % 2 == 0;
+ * }
+ *
+ * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
+ * // => [1, 3, 5]
+ */
+ function negate(predicate) {
+ if (typeof predicate != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return function() {
+ var args = arguments;
+ return !predicate.apply(this, args);
+ };
+ }
+
+ /**
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
+ * to the function return the value of the first invocation. The `func` is
+ * invoked with the `this` binding and arguments of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var initialize = _.once(createApplication);
+ * initialize();
+ * initialize();
+ * // => `createApplication` is invoked once
+ */
+ function once(func) {
+ return before(2, func);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a shallow clone of `value`.
+ *
+ * **Note:** This method is loosely based on the
+ * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
+ * and supports cloning arrays, array buffers, booleans, date objects, maps,
+ * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
+ * arrays. The own enumerable properties of `arguments` objects are cloned
+ * as plain objects. An empty object is returned for uncloneable values such
+ * as error objects, functions, DOM nodes, and WeakMaps.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeep
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var shallow = _.clone(objects);
+ * console.log(shallow[0] === objects[0]);
+ * // => true
+ */
+ function clone(value) {
+ if (!isObject(value)) {
+ return value;
+ }
+ return isArray(value) ? copyArray(value) : copyObject(value, nativeKeys(value));
+ }
+
+ /**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+ function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+ }
+
+ /**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ * else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
+ return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
+ !propertyIsEnumerable.call(value, 'callee');
+ };
+
+ /**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+ var isArray = Array.isArray;
+
+ /**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+ function isArrayLike(value) {
+ return value != null && isLength(value.length) && !isFunction(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a boolean primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
+ * @example
+ *
+ * _.isBoolean(false);
+ * // => true
+ *
+ * _.isBoolean(null);
+ * // => false
+ */
+ function isBoolean(value) {
+ return value === true || value === false ||
+ (isObjectLike(value) && baseGetTag(value) == boolTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Date` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ * @example
+ *
+ * _.isDate(new Date);
+ * // => true
+ *
+ * _.isDate('Mon April 23 2012');
+ * // => false
+ */
+ var isDate = baseIsDate;
+
+ /**
+ * Checks if `value` is an empty object, collection, map, or set.
+ *
+ * Objects are considered empty if they have no own enumerable string keyed
+ * properties.
+ *
+ * Array-like values such as `arguments` objects, arrays, buffers, strings, or
+ * jQuery-like collections are considered empty if they have a `length` of `0`.
+ * Similarly, maps and sets are considered empty if they have a `size` of `0`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
+ * @example
+ *
+ * _.isEmpty(null);
+ * // => true
+ *
+ * _.isEmpty(true);
+ * // => true
+ *
+ * _.isEmpty(1);
+ * // => true
+ *
+ * _.isEmpty([1, 2, 3]);
+ * // => false
+ *
+ * _.isEmpty({ 'a': 1 });
+ * // => false
+ */
+ function isEmpty(value) {
+ if (isArrayLike(value) &&
+ (isArray(value) || isString(value) ||
+ isFunction(value.splice) || isArguments(value))) {
+ return !value.length;
+ }
+ return !nativeKeys(value).length;
+ }
+
+ /**
+ * Performs a deep comparison between two values to determine if they are
+ * equivalent.
+ *
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
+ * by their own, not inherited, enumerable properties. Functions and DOM
+ * nodes are **not** supported.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.isEqual(object, other);
+ * // => true
+ *
+ * object === other;
+ * // => false
+ */
+ function isEqual(value, other) {
+ return baseIsEqual(value, other);
+ }
+
+ /**
+ * Checks if `value` is a finite primitive number.
+ *
+ * **Note:** This method is based on
+ * [`Number.isFinite`](https://mdn.io/Number/isFinite).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
+ * @example
+ *
+ * _.isFinite(3);
+ * // => true
+ *
+ * _.isFinite(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isFinite(Infinity);
+ * // => false
+ *
+ * _.isFinite('3');
+ * // => false
+ */
+ function isFinite(value) {
+ return typeof value == 'number' && nativeIsFinite(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+ function isFunction(value) {
+ if (!isObject(value)) {
+ return false;
+ }
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
+ var tag = baseGetTag(value);
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
+ }
+
+ /**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+ function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ }
+
+ /**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+ function isObject(value) {
+ var type = typeof value;
+ return value != null && (type == 'object' || type == 'function');
+ }
+
+ /**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+ function isObjectLike(value) {
+ return value != null && typeof value == 'object';
+ }
+
+ /**
+ * Checks if `value` is `NaN`.
+ *
+ * **Note:** This method is based on
+ * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
+ * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
+ * `undefined` and other non-number values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ * @example
+ *
+ * _.isNaN(NaN);
+ * // => true
+ *
+ * _.isNaN(new Number(NaN));
+ * // => true
+ *
+ * isNaN(undefined);
+ * // => true
+ *
+ * _.isNaN(undefined);
+ * // => false
+ */
+ function isNaN(value) {
+ // An `NaN` primitive is the only value that is not equal to itself.
+ // Perform the `toStringTag` check first to avoid errors with some
+ // ActiveX objects in IE.
+ return isNumber(value) && value != +value;
+ }
+
+ /**
+ * Checks if `value` is `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
+ * @example
+ *
+ * _.isNull(null);
+ * // => true
+ *
+ * _.isNull(void 0);
+ * // => false
+ */
+ function isNull(value) {
+ return value === null;
+ }
+
+ /**
+ * Checks if `value` is classified as a `Number` primitive or object.
+ *
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
+ * classified as numbers, use the `_.isFinite` method.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a number, else `false`.
+ * @example
+ *
+ * _.isNumber(3);
+ * // => true
+ *
+ * _.isNumber(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isNumber(Infinity);
+ * // => true
+ *
+ * _.isNumber('3');
+ * // => false
+ */
+ function isNumber(value) {
+ return typeof value == 'number' ||
+ (isObjectLike(value) && baseGetTag(value) == numberTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a `RegExp` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ * @example
+ *
+ * _.isRegExp(/abc/);
+ * // => true
+ *
+ * _.isRegExp('/abc/');
+ * // => false
+ */
+ var isRegExp = baseIsRegExp;
+
+ /**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+ function isString(value) {
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
+ }
+
+ /**
+ * Checks if `value` is `undefined`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
+ * @example
+ *
+ * _.isUndefined(void 0);
+ * // => true
+ *
+ * _.isUndefined(null);
+ * // => false
+ */
+ function isUndefined(value) {
+ return value === undefined;
+ }
+
+ /**
+ * Converts `value` to an array.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the converted array.
+ * @example
+ *
+ * _.toArray({ 'a': 1, 'b': 2 });
+ * // => [1, 2]
+ *
+ * _.toArray('abc');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toArray(1);
+ * // => []
+ *
+ * _.toArray(null);
+ * // => []
+ */
+ function toArray(value) {
+ if (!isArrayLike(value)) {
+ return values(value);
+ }
+ return value.length ? copyArray(value) : [];
+ }
+
+ /**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3.2);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3.2');
+ * // => 3
+ */
+ var toInteger = Number;
+
+ /**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3.2);
+ * // => 3.2
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3.2');
+ * // => 3.2
+ */
+ var toNumber = Number;
+
+ /**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+ function toString(value) {
+ if (typeof value == 'string') {
+ return value;
+ }
+ return value == null ? '' : (value + '');
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Assigns own enumerable string keyed properties of source objects to the
+ * destination object. Source objects are applied from left to right.
+ * Subsequent sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object` and is loosely based on
+ * [`Object.assign`](https://mdn.io/Object/assign).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assignIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assign({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ var assign = createAssigner(function(object, source) {
+ copyObject(source, nativeKeys(source), object);
+ });
+
+ /**
+ * This method is like `_.assign` except that it iterates over own and
+ * inherited source properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extend
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assign
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assignIn({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
+ */
+ var assignIn = createAssigner(function(object, source) {
+ copyObject(source, nativeKeysIn(source), object);
+ });
+
+ /**
+ * This method is like `_.assignIn` except that it accepts `customizer`
+ * which is invoked to produce the assigned values. If `customizer` returns
+ * `undefined`, assignment is handled by the method instead. The `customizer`
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extendWith
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @see _.assignWith
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * return _.isUndefined(objValue) ? srcValue : objValue;
+ * }
+ *
+ * var defaults = _.partialRight(_.assignInWith, customizer);
+ *
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keysIn(source), object, customizer);
+ });
+
+ /**
+ * Creates an object that inherits from the `prototype` object. If a
+ * `properties` object is given, its own enumerable string keyed properties
+ * are assigned to the created object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Object
+ * @param {Object} prototype The object to inherit from.
+ * @param {Object} [properties] The properties to assign to the object.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * function Shape() {
+ * this.x = 0;
+ * this.y = 0;
+ * }
+ *
+ * function Circle() {
+ * Shape.call(this);
+ * }
+ *
+ * Circle.prototype = _.create(Shape.prototype, {
+ * 'constructor': Circle
+ * });
+ *
+ * var circle = new Circle;
+ * circle instanceof Circle;
+ * // => true
+ *
+ * circle instanceof Shape;
+ * // => true
+ */
+ function create(prototype, properties) {
+ var result = baseCreate(prototype);
+ return properties == null ? result : assign(result, properties);
+ }
+
+ /**
+ * Assigns own and inherited enumerable string keyed properties of source
+ * objects to the destination object for all destination properties that
+ * resolve to `undefined`. Source objects are applied from left to right.
+ * Once a property is set, additional values of the same property are ignored.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaultsDeep
+ * @example
+ *
+ * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var defaults = baseRest(function(args) {
+ args.push(undefined, assignInDefaults);
+ return assignInWith.apply(undefined, args);
+ });
+
+ /**
+ * Checks if `path` is a direct property of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = { 'a': { 'b': 2 } };
+ * var other = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.has(object, 'a');
+ * // => true
+ *
+ * _.has(object, 'a.b');
+ * // => true
+ *
+ * _.has(object, ['a', 'b']);
+ * // => true
+ *
+ * _.has(other, 'a');
+ * // => false
+ */
+ function has(object, path) {
+ return object != null && hasOwnProperty.call(object, path);
+ }
+
+ /**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+ var keys = nativeKeys;
+
+ /**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+ var keysIn = nativeKeysIn;
+
+ /**
+ * Creates an object composed of the picked `object` properties.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pick(object, ['a', 'c']);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ var pick = flatRest(function(object, paths) {
+ return object == null ? {} : basePick(object, paths);
+ });
+
+ /**
+ * This method is like `_.get` except that if the resolved value is a
+ * function it's invoked with the `this` binding of its parent object and
+ * its result is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to resolve.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
+ *
+ * _.result(object, 'a[0].b.c1');
+ * // => 3
+ *
+ * _.result(object, 'a[0].b.c2');
+ * // => 4
+ *
+ * _.result(object, 'a[0].b.c3', 'default');
+ * // => 'default'
+ *
+ * _.result(object, 'a[0].b.c3', _.constant('default'));
+ * // => 'default'
+ */
+ function result(object, path, defaultValue) {
+ var value = object == null ? undefined : object[path];
+ if (value === undefined) {
+ value = defaultValue;
+ }
+ return isFunction(value) ? value.call(object) : value;
+ }
+
+ /**
+ * Creates an array of the own enumerable string keyed property values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.values(new Foo);
+ * // => [1, 2] (iteration order is not guaranteed)
+ *
+ * _.values('hi');
+ * // => ['h', 'i']
+ */
+ function values(object) {
+ return object == null ? [] : baseValues(object, keys(object));
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
+ * corresponding HTML entities.
+ *
+ * **Note:** No other characters are escaped. To escape additional
+ * characters use a third-party library like [_he_](https://mths.be/he).
+ *
+ * Though the ">" character is escaped for symmetry, characters like
+ * ">" and "/" don't need escaping in HTML and have no special meaning
+ * unless they're part of a tag or unquoted attribute value. See
+ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
+ * (under "semi-related fun fact") for more details.
+ *
+ * When working with HTML you should always
+ * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
+ * XSS vectors.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escape('fred, barney, & pebbles');
+ * // => 'fred, barney, &amp; pebbles'
+ */
+ function escape(string) {
+ string = toString(string);
+ return (string && reHasUnescapedHtml.test(string))
+ ? string.replace(reUnescapedHtml, escapeHtmlChar)
+ : string;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * This method returns the first argument it receives.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ *
+ * console.log(_.identity(object) === object);
+ * // => true
+ */
+ function identity(value) {
+ return value;
+ }
+
+ /**
+ * Creates a function that invokes `func` with the arguments of the created
+ * function. If `func` is a property name, the created function returns the
+ * property value for a given element. If `func` is an array or object, the
+ * created function returns `true` for elements that contain the equivalent
+ * source properties, otherwise it returns `false`.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Util
+ * @param {*} [func=_.identity] The value to convert to a callback.
+ * @returns {Function} Returns the callback.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
+ * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, _.iteratee(['user', 'fred']));
+ * // => [{ 'user': 'fred', 'age': 40 }]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, _.iteratee('user'));
+ * // => ['barney', 'fred']
+ *
+ * // Create custom iteratee shorthands.
+ * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
+ * return !_.isRegExp(func) ? iteratee(func) : function(string) {
+ * return func.test(string);
+ * };
+ * });
+ *
+ * _.filter(['abc', 'def'], /ef/);
+ * // => ['def']
+ */
+ var iteratee = baseIteratee;
+
+ /**
+ * Creates a function that performs a partial deep comparison between a given
+ * object and `source`, returning `true` if the given object has equivalent
+ * property values, else `false`.
+ *
+ * **Note:** The created function is equivalent to `_.isMatch` with `source`
+ * partially applied.
+ *
+ * Partial comparisons will match empty array and empty object `source`
+ * values against any array or object value, respectively. See `_.isEqual`
+ * for a list of supported value comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 1, 'b': 2, 'c': 3 },
+ * { 'a': 4, 'b': 5, 'c': 6 }
+ * ];
+ *
+ * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
+ * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
+ */
+ function matches(source) {
+ return baseMatches(assign({}, source));
+ }
+
+ /**
+ * Adds all own enumerable string keyed function properties of a source
+ * object to the destination object. If `object` is a function, then methods
+ * are added to its prototype as well.
+ *
+ * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
+ * avoid conflicts caused by modifying the original.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Function|Object} [object=lodash] The destination object.
+ * @param {Object} source The object of functions to add.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
+ * @returns {Function|Object} Returns `object`.
+ * @example
+ *
+ * function vowels(string) {
+ * return _.filter(string, function(v) {
+ * return /[aeiou]/i.test(v);
+ * });
+ * }
+ *
+ * _.mixin({ 'vowels': vowels });
+ * _.vowels('fred');
+ * // => ['e']
+ *
+ * _('fred').vowels().value();
+ * // => ['e']
+ *
+ * _.mixin({ 'vowels': vowels }, { 'chain': false });
+ * _('fred').vowels();
+ * // => ['e']
+ */
+ function mixin(object, source, options) {
+ var props = keys(source),
+ methodNames = baseFunctions(source, props);
+
+ if (options == null &&
+ !(isObject(source) && (methodNames.length || !props.length))) {
+ options = source;
+ source = object;
+ object = this;
+ methodNames = baseFunctions(source, keys(source));
+ }
+ var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
+ isFunc = isFunction(object);
+
+ baseEach(methodNames, function(methodName) {
+ var func = source[methodName];
+ object[methodName] = func;
+ if (isFunc) {
+ object.prototype[methodName] = function() {
+ var chainAll = this.__chain__;
+ if (chain || chainAll) {
+ var result = object(this.__wrapped__),
+ actions = result.__actions__ = copyArray(this.__actions__);
+
+ actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
+ result.__chain__ = chainAll;
+ return result;
+ }
+ return func.apply(object, arrayPush([this.value()], arguments));
+ };
+ }
+ });
+
+ return object;
+ }
+
+ /**
+ * Reverts the `_` variable to its previous value and returns a reference to
+ * the `lodash` function.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @returns {Function} Returns the `lodash` function.
+ * @example
+ *
+ * var lodash = _.noConflict();
+ */
+ function noConflict() {
+ if (root._ === this) {
+ root._ = oldDash;
+ }
+ return this;
+ }
+
+ /**
+ * This method returns `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Util
+ * @example
+ *
+ * _.times(2, _.noop);
+ * // => [undefined, undefined]
+ */
+ function noop() {
+ // No operation performed.
+ }
+
+ /**
+ * Generates a unique ID. If `prefix` is given, the ID is appended to it.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {string} [prefix=''] The value to prefix the ID with.
+ * @returns {string} Returns the unique ID.
+ * @example
+ *
+ * _.uniqueId('contact_');
+ * // => 'contact_104'
+ *
+ * _.uniqueId();
+ * // => '105'
+ */
+ function uniqueId(prefix) {
+ var id = ++idCounter;
+ return toString(prefix) + id;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Computes the maximum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * _.max([4, 2, 8, 6]);
+ * // => 8
+ *
+ * _.max([]);
+ * // => undefined
+ */
+ function max(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseGt)
+ : undefined;
+ }
+
+ /**
+ * Computes the minimum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * _.min([4, 2, 8, 6]);
+ * // => 2
+ *
+ * _.min([]);
+ * // => undefined
+ */
+ function min(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseLt)
+ : undefined;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return wrapped values in chain sequences.
+ lodash.assignIn = assignIn;
+ lodash.before = before;
+ lodash.bind = bind;
+ lodash.chain = chain;
+ lodash.compact = compact;
+ lodash.concat = concat;
+ lodash.create = create;
+ lodash.defaults = defaults;
+ lodash.defer = defer;
+ lodash.delay = delay;
+ lodash.filter = filter;
+ lodash.flatten = flatten;
+ lodash.flattenDeep = flattenDeep;
+ lodash.iteratee = iteratee;
+ lodash.keys = keys;
+ lodash.map = map;
+ lodash.matches = matches;
+ lodash.mixin = mixin;
+ lodash.negate = negate;
+ lodash.once = once;
+ lodash.pick = pick;
+ lodash.slice = slice;
+ lodash.sortBy = sortBy;
+ lodash.tap = tap;
+ lodash.thru = thru;
+ lodash.toArray = toArray;
+ lodash.values = values;
+
+ // Add aliases.
+ lodash.extend = assignIn;
+
+ // Add methods to `lodash.prototype`.
+ mixin(lodash, lodash);
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return unwrapped values in chain sequences.
+ lodash.clone = clone;
+ lodash.escape = escape;
+ lodash.every = every;
+ lodash.find = find;
+ lodash.forEach = forEach;
+ lodash.has = has;
+ lodash.head = head;
+ lodash.identity = identity;
+ lodash.indexOf = indexOf;
+ lodash.isArguments = isArguments;
+ lodash.isArray = isArray;
+ lodash.isBoolean = isBoolean;
+ lodash.isDate = isDate;
+ lodash.isEmpty = isEmpty;
+ lodash.isEqual = isEqual;
+ lodash.isFinite = isFinite;
+ lodash.isFunction = isFunction;
+ lodash.isNaN = isNaN;
+ lodash.isNull = isNull;
+ lodash.isNumber = isNumber;
+ lodash.isObject = isObject;
+ lodash.isRegExp = isRegExp;
+ lodash.isString = isString;
+ lodash.isUndefined = isUndefined;
+ lodash.last = last;
+ lodash.max = max;
+ lodash.min = min;
+ lodash.noConflict = noConflict;
+ lodash.noop = noop;
+ lodash.reduce = reduce;
+ lodash.result = result;
+ lodash.size = size;
+ lodash.some = some;
+ lodash.uniqueId = uniqueId;
+
+ // Add aliases.
+ lodash.each = forEach;
+ lodash.first = head;
+
+ mixin(lodash, (function() {
+ var source = {};
+ baseForOwn(lodash, function(func, methodName) {
+ if (!hasOwnProperty.call(lodash.prototype, methodName)) {
+ source[methodName] = func;
+ }
+ });
+ return source;
+ }()), { 'chain': false });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * The semantic version number.
+ *
+ * @static
+ * @memberOf _
+ * @type {string}
+ */
+ lodash.VERSION = VERSION;
+
+ // Add `Array` methods to `lodash.prototype`.
+ baseEach(['pop', 'join', 'replace', 'reverse', 'split', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
+ var func = (/^(?:replace|split)$/.test(methodName) ? String.prototype : arrayProto)[methodName],
+ chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
+ retUnwrapped = /^(?:pop|join|replace|shift)$/.test(methodName);
+
+ lodash.prototype[methodName] = function() {
+ var args = arguments;
+ if (retUnwrapped && !this.__chain__) {
+ var value = this.value();
+ return func.apply(isArray(value) ? value : [], args);
+ }
+ return this[chainName](function(value) {
+ return func.apply(isArray(value) ? value : [], args);
+ });
+ };
+ });
+
+ // Add chain sequence methods to the `lodash` wrapper.
+ lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
+
+ /*--------------------------------------------------------------------------*/
+
+ // Some AMD build optimizers, like r.js, check for condition patterns like:
+ if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
+ // Expose Lodash on the global object to prevent errors when Lodash is
+ // loaded by a script tag in the presence of an AMD loader.
+ // See http://requirejs.org/docs/errors.html#mismatch for more details.
+ // Use `_.noConflict` to remove Lodash from the global object.
+ root._ = lodash;
+
+ // Define as an anonymous module so, through path mapping, it can be
+ // referenced as the "underscore" module.
+ define(function() {
+ return lodash;
+ });
+ }
+ // Check for `exports` after `define` in case a build optimizer adds it.
+ else if (freeModule) {
+ // Export for Node.js.
+ (freeModule.exports = lodash)._ = lodash;
+ // Export for CommonJS support.
+ freeExports._ = lodash;
+ }
+ else {
+ // Export to the global object.
+ root._ = lodash;
+ }
+}.call(this));
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/core.min.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/core.min.js
new file mode 100644
index 0000000..ee223b2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/core.min.js
@@ -0,0 +1,29 @@
+/**
+ * @license
+ * Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
+ * Build: `lodash core -o ./dist/lodash.core.js`
+ */
+;(function(){function n(n){return K(n)&&pn.call(n,"callee")&&!bn.call(n,"callee")}function t(n,t){return n.push.apply(n,t),n}function r(n){return function(t){return null==t?nn:t[n]}}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return d(t,function(t){return n[t]})}function o(n){return n instanceof i?n:new i(n)}function i(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function c(n,t,r,e){return n===nn||M(n,ln[r])&&!pn.call(e,r)?t:n}function f(n,t,r){
+if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){n.apply(nn,r)},t)}function a(n,t){var r=true;return mn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function l(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===nn?i===i:r(i,c)))var c=i,f=o}return f}function p(n,t){var r=[];return mn(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function s(n,r,e,u,o){var i=-1,c=n.length;for(e||(e=D),o||(o=[]);++i<c;){var f=n[i];0<r&&e(f)?1<r?s(f,r-1,e,u,o):t(o,f):u||(o[o.length]=f);
+}return o}function h(n,t){return n&&On(n,t,In)}function v(n,t){return p(t,function(t){return V(n[t])})}function y(n,t){return n>t}function b(n,t,r,e,u){return n===t||(null==n||null==t||!H(n)&&!K(t)?n!==n&&t!==t:g(n,t,r,e,b,u))}function g(n,t,r,e,u,o){var i=Nn(n),c=Nn(t),f="[object Array]",a="[object Array]";i||(f=hn.call(n),f="[object Arguments]"==f?"[object Object]":f),c||(a=hn.call(t),a="[object Arguments]"==a?"[object Object]":a);var l="[object Object]"==f,c="[object Object]"==a,a=f==a;o||(o=[]);
+var p=An(o,function(t){return t[0]==n}),s=An(o,function(n){return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=B(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=M(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 1&r||(i=l&&pn.call(n,"__wrapped__"),f=c&&pn.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=R(n,t,r,e,u,o),
+o.pop(),r):(i=i?n.value():n,f=f?t.value():t,r=u(i,f,r,e,o),o.pop(),r)}function _(n){return typeof n=="function"?n:null==n?Y:(typeof n=="object"?m:r)(n)}function j(n,t){return n<t}function d(n,t){var r=-1,e=U(n)?Array(n.length):[];return mn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function m(n){var t=_n(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&b(n[u],r[u],3)))return false}return true}}function O(n,t){return n=Object(n),G(t,function(t,r){return r in n&&(t[r]=n[r]),
+t},{})}function x(n){return xn(q(n,void 0,Y),n+"")}function A(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function E(n){return A(n,0,n.length)}function w(n,t){var r;return mn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function k(n,r){return G(r,function(n,r){return r.func.apply(r.thisArg,t([n],r.args))},n)}function N(n,t,r,e){var u=!r;r||(r={});for(var o=-1,i=t.length;++o<i;){var c=t[o],f=e?e(r[c],n[c],c,r,n):nn;
+if(f===nn&&(f=n[c]),u)r[c]=f;else{var a=r,l=a[c];pn.call(a,c)&&M(l,f)&&(f!==nn||c in a)||(a[c]=f)}}return r}function F(n){return x(function(t,r){var e=-1,u=r.length,o=1<u?r[u-1]:nn,o=3<n.length&&typeof o=="function"?(u--,o):nn;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function S(n){return function(){var t=arguments,r=dn(n.prototype),t=n.apply(r,t);return H(t)?t:r}}function T(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==on&&this instanceof e?u:n;++c<f;)a[c]=r[c];
+for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=S(n);return e}function B(n,t,r,e,u,o){var i=n.length,c=t.length;if(i!=c&&!(1&r&&c>i))return false;for(var c=-1,f=true,a=2&r?[]:nn;++c<i;){var l=n[c],p=t[c];if(void 0!==nn){f=false;break}if(a){if(!w(t,function(n,t){if(!z(a,t)&&(l===n||u(l,n,r,e,o)))return a.push(t)})){f=false;break}}else if(l!==p&&!u(l,p,r,e,o)){f=false;break}}return f}function R(n,t,r,e,u,o){var i=1&r,c=In(n),f=c.length,a=In(t).length;
+if(f!=a&&!i)return false;for(var l=f;l--;){var p=c[l];if(!(i?p in t:pn.call(t,p)))return false}for(a=true;++l<f;){var p=c[l],s=n[p],h=t[p];if(void 0!==nn||s!==h&&!u(s,h,r,e,o)){a=false;break}i||(i="constructor"==p)}return a&&!i&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(a=false)),a}function D(t){return Nn(t)||n(t)}function I(n){var t=[];if(null!=n)for(var r in Object(n))t.push(r);return t}function q(n,t,r){
+return t=jn(t===nn?n.length-1:t,0),function(){for(var e=arguments,u=-1,o=jn(e.length-t,0),i=Array(o);++u<o;)i[u]=e[t+u];for(u=-1,o=Array(t+1);++u<t;)o[u]=e[u];return o[t]=r(i),n.apply(this,o)}}function $(n){return(null==n?0:n.length)?s(n,1):[]}function P(n){return n&&n.length?n[0]:nn}function z(n,t,r){var e=null==n?0:n.length;r=typeof r=="number"?0>r?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1}function C(n,t){return mn(n,_(t))}function G(n,t,r){return e(n,_(t),r,3>arguments.length,mn);
+}function J(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Fn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=nn),r}}function M(n,t){return n===t||n!==n&&t!==t}function U(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1<t&&0==t%1&&9007199254740991>=t),t&&!V(n)}function V(n){return!!H(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function H(n){var t=typeof n;
+return null!=n&&("object"==t||"function"==t)}function K(n){return null!=n&&typeof n=="object"}function L(n){return typeof n=="number"||K(n)&&"[object Number]"==hn.call(n)}function Q(n){return typeof n=="string"||!Nn(n)&&K(n)&&"[object String]"==hn.call(n)}function W(n){return typeof n=="string"?n:null==n?"":n+""}function X(n){return null==n?[]:u(n,In(n))}function Y(n){return n}function Z(n,r,e){var u=In(r),o=v(r,u);null!=e||H(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=v(r,In(r)));var i=!(H(e)&&"chain"in e&&!e.chain),c=V(n);
+return mn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=n(this.__wrapped__);return(e.__actions__=E(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var nn,tn=1/0,rn=/[&<>"']/g,en=RegExp(rn.source),un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){
+return function(t){return null==n?nn:n[t]}}({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),an=Array.prototype,ln=Object.prototype,pn=ln.hasOwnProperty,sn=0,hn=ln.toString,vn=on._,yn=Object.create,bn=ln.propertyIsEnumerable,gn=on.isFinite,_n=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),jn=Math.max,dn=function(){function n(){}return function(t){return H(t)?yn?yn(t):(n.prototype=t,t=new n,n.prototype=nn,t):{}}}();i.prototype=dn(o.prototype),i.prototype.constructor=i;
+var mn=function(n,t){return function(r,e){if(null==r)return r;if(!U(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(h),On=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}(),xn=Y,An=function(n){return function(t,r,e){var u=Object(t);if(!U(t)){var o=_(r);t=In(t),r=function(n){return o(u[n],n,u)}}return r=n(t,r,e),-1<r?u[o?t[r]:r]:nn}}(function(n,t,r){var e=null==n?0:n.length;
+if(!e)return-1;r=null==r?0:Fn(r),0>r&&(r=jn(e+r,0));n:{for(t=_(t),e=n.length,r+=-1;++r<e;)if(t(n[r],r,n)){n=r;break n}n=-1}return n}),En=x(function(n,t,r){return T(n,t,r)}),wn=x(function(n,t){return f(n,1,t)}),kn=x(function(n,t,r){return f(n,Sn(t)||0,r)}),Nn=Array.isArray,Fn=Number,Sn=Number,Tn=F(function(n,t){N(t,_n(t),n)}),Bn=F(function(n,t){N(t,I(t),n)}),Rn=F(function(n,t,r,e){N(t,qn(t),n,e)}),Dn=x(function(n){return n.push(nn,c),Rn.apply(nn,n)}),In=_n,qn=I,$n=function(n){return xn(q(n,nn,$),n+"");
+}(function(n,t){return null==n?{}:O(n,t)});o.assignIn=Bn,o.before=J,o.bind=En,o.chain=function(n){return n=o(n),n.__chain__=true,n},o.compact=function(n){return p(n,Boolean)},o.concat=function(){var n=arguments.length;if(!n)return[];for(var r=Array(n-1),e=arguments[0];n--;)r[n-1]=arguments[n];return t(Nn(e)?E(e):[e],s(r,1))},o.create=function(n,t){var r=dn(n);return null==t?r:Tn(r,t)},o.defaults=Dn,o.defer=wn,o.delay=kn,o.filter=function(n,t){return p(n,_(t))},o.flatten=$,o.flattenDeep=function(n){
+return(null==n?0:n.length)?s(n,tn):[]},o.iteratee=_,o.keys=In,o.map=function(n,t){return d(n,_(t))},o.matches=function(n){return m(Tn({},n))},o.mixin=Z,o.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},o.once=function(n){return J(2,n)},o.pick=$n,o.slice=function(n,t,r){var e=null==n?0:n.length;return r=r===nn?e:+r,e?A(n,null==t?0:+t,r):[]},o.sortBy=function(n,t){var e=0;return t=_(t),d(d(n,function(n,r,u){return{
+value:n,index:e++,criteria:t(n,r,u)}}).sort(function(n,t){var r;n:{r=n.criteria;var e=t.criteria;if(r!==e){var u=r!==nn,o=null===r,i=r===r,c=e!==nn,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r<e||f&&u&&i||!c&&i||!a){r=-1;break n}}r=0}return r||n.index-t.index}),r("value"))},o.tap=function(n,t){return t(n),n},o.thru=function(n,t){return t(n)},o.toArray=function(n){return U(n)?n.length?E(n):[]:X(n)},o.values=X,o.extend=Bn,Z(o,o),o.clone=function(n){return H(n)?Nn(n)?E(n):N(n,_n(n)):n;
+},o.escape=function(n){return(n=W(n))&&en.test(n)?n.replace(rn,fn):n},o.every=function(n,t,r){return t=r?nn:t,a(n,_(t))},o.find=An,o.forEach=C,o.has=function(n,t){return null!=n&&pn.call(n,t)},o.head=P,o.identity=Y,o.indexOf=z,o.isArguments=n,o.isArray=Nn,o.isBoolean=function(n){return true===n||false===n||K(n)&&"[object Boolean]"==hn.call(n)},o.isDate=function(n){return K(n)&&"[object Date]"==hn.call(n)},o.isEmpty=function(t){return U(t)&&(Nn(t)||Q(t)||V(t.splice)||n(t))?!t.length:!_n(t).length},o.isEqual=function(n,t){
+return b(n,t)},o.isFinite=function(n){return typeof n=="number"&&gn(n)},o.isFunction=V,o.isNaN=function(n){return L(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=L,o.isObject=H,o.isRegExp=function(n){return K(n)&&"[object RegExp]"==hn.call(n)},o.isString=Q,o.isUndefined=function(n){return n===nn},o.last=function(n){var t=null==n?0:n.length;return t?n[t-1]:nn},o.max=function(n){return n&&n.length?l(n,Y,y):nn},o.min=function(n){return n&&n.length?l(n,Y,j):nn},o.noConflict=function(){return on._===this&&(on._=vn),
+this},o.noop=function(){},o.reduce=G,o.result=function(n,t,r){return t=null==n?nn:n[t],t===nn&&(t=r),V(t)?t.call(n):t},o.size=function(n){return null==n?0:(n=U(n)?n:_n(n),n.length)},o.some=function(n,t,r){return t=r?nn:t,w(n,_(t))},o.uniqueId=function(n){var t=++sn;return W(n)+t},o.each=C,o.first=P,Z(o,function(){var n={};return h(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.17.2",mn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){
+var t=(/^(?:replace|split)$/.test(n)?String.prototype:an)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);o.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Nn(u)?u:[],n)}return this[r](function(r){return t.apply(Nn(r)?r:[],n)})}}),o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=function(){return k(this.__wrapped__,this.__actions__)},typeof define=="function"&&typeof define.amd=="object"&&define.amd?(on._=o,
+define(function(){return o})):cn?((cn.exports=o)._=o,un._=o):on._=o}).call(this); \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/countBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/countBy.js
new file mode 100644
index 0000000..0e88abc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/countBy.js
@@ -0,0 +1,40 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ createAggregator = require('./_createAggregator');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The corresponding value of
+ * each key is the number of times the key was returned by `iteratee`. The
+ * iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.countBy([6.1, 4.2, 6.3], Math.floor);
+ * // => { '4': 1, '6': 2 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.countBy(['one', 'two', 'three'], 'length');
+ * // => { '3': 2, '5': 1 }
+ */
+var countBy = createAggregator(function(result, value, key) {
+ if (hasOwnProperty.call(result, key)) {
+ ++result[key];
+ } else {
+ baseAssignValue(result, key, 1);
+ }
+});
+
+module.exports = countBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/create.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/create.js
new file mode 100644
index 0000000..919edb8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/create.js
@@ -0,0 +1,43 @@
+var baseAssign = require('./_baseAssign'),
+ baseCreate = require('./_baseCreate');
+
+/**
+ * Creates an object that inherits from the `prototype` object. If a
+ * `properties` object is given, its own enumerable string keyed properties
+ * are assigned to the created object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Object
+ * @param {Object} prototype The object to inherit from.
+ * @param {Object} [properties] The properties to assign to the object.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * function Shape() {
+ * this.x = 0;
+ * this.y = 0;
+ * }
+ *
+ * function Circle() {
+ * Shape.call(this);
+ * }
+ *
+ * Circle.prototype = _.create(Shape.prototype, {
+ * 'constructor': Circle
+ * });
+ *
+ * var circle = new Circle;
+ * circle instanceof Circle;
+ * // => true
+ *
+ * circle instanceof Shape;
+ * // => true
+ */
+function create(prototype, properties) {
+ var result = baseCreate(prototype);
+ return properties == null ? result : baseAssign(result, properties);
+}
+
+module.exports = create;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/curry.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/curry.js
new file mode 100644
index 0000000..918db1a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/curry.js
@@ -0,0 +1,57 @@
+var createWrap = require('./_createWrap');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_CURRY_FLAG = 8;
+
+/**
+ * Creates a function that accepts arguments of `func` and either invokes
+ * `func` returning its result, if at least `arity` number of arguments have
+ * been provided, or returns a function that accepts the remaining `func`
+ * arguments, and so on. The arity of `func` may be specified if `func.length`
+ * is not sufficient.
+ *
+ * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curry(abc);
+ *
+ * curried(1)(2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // Curried with placeholders.
+ * curried(1)(_, 3)(2);
+ * // => [1, 2, 3]
+ */
+function curry(func, arity, guard) {
+ arity = guard ? undefined : arity;
+ var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curry.placeholder;
+ return result;
+}
+
+// Assign default placeholders.
+curry.placeholder = {};
+
+module.exports = curry;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/curryRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/curryRight.js
new file mode 100644
index 0000000..c85b6f3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/curryRight.js
@@ -0,0 +1,54 @@
+var createWrap = require('./_createWrap');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_CURRY_RIGHT_FLAG = 16;
+
+/**
+ * This method is like `_.curry` except that arguments are applied to `func`
+ * in the manner of `_.partialRight` instead of `_.partial`.
+ *
+ * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curryRight(abc);
+ *
+ * curried(3)(2)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(2, 3)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // Curried with placeholders.
+ * curried(3)(1, _)(2);
+ * // => [1, 2, 3]
+ */
+function curryRight(func, arity, guard) {
+ arity = guard ? undefined : arity;
+ var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curryRight.placeholder;
+ return result;
+}
+
+// Assign default placeholders.
+curryRight.placeholder = {};
+
+module.exports = curryRight;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/date.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/date.js
new file mode 100644
index 0000000..cbf5b41
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/date.js
@@ -0,0 +1,3 @@
+module.exports = {
+ 'now': require('./now')
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/debounce.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/debounce.js
new file mode 100644
index 0000000..04d7dfd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/debounce.js
@@ -0,0 +1,188 @@
+var isObject = require('./isObject'),
+ now = require('./now'),
+ toNumber = require('./toNumber');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max,
+ nativeMin = Math.min;
+
+/**
+ * Creates a debounced function that delays invoking `func` until after `wait`
+ * milliseconds have elapsed since the last time the debounced function was
+ * invoked. The debounced function comes with a `cancel` method to cancel
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
+ * Provide `options` to indicate whether `func` should be invoked on the
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
+ * with the last arguments provided to the debounced function. Subsequent
+ * calls to the debounced function return the result of the last `func`
+ * invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
+ * invoked on the trailing edge of the timeout only if the debounced function
+ * is invoked more than once during the `wait` timeout.
+ *
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
+ *
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+ * for details over the differences between `_.debounce` and `_.throttle`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to debounce.
+ * @param {number} [wait=0] The number of milliseconds to delay.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=false]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {number} [options.maxWait]
+ * The maximum time `func` is allowed to be delayed before it's invoked.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
+ * @returns {Function} Returns the new debounced function.
+ * @example
+ *
+ * // Avoid costly calculations while the window size is in flux.
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
+ *
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
+ * 'leading': true,
+ * 'trailing': false
+ * }));
+ *
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
+ * var source = new EventSource('/stream');
+ * jQuery(source).on('message', debounced);
+ *
+ * // Cancel the trailing debounced invocation.
+ * jQuery(window).on('popstate', debounced.cancel);
+ */
+function debounce(func, wait, options) {
+ var lastArgs,
+ lastThis,
+ maxWait,
+ result,
+ timerId,
+ lastCallTime,
+ lastInvokeTime = 0,
+ leading = false,
+ maxing = false,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ wait = toNumber(wait) || 0;
+ if (isObject(options)) {
+ leading = !!options.leading;
+ maxing = 'maxWait' in options;
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+
+ function invokeFunc(time) {
+ var args = lastArgs,
+ thisArg = lastThis;
+
+ lastArgs = lastThis = undefined;
+ lastInvokeTime = time;
+ result = func.apply(thisArg, args);
+ return result;
+ }
+
+ function leadingEdge(time) {
+ // Reset any `maxWait` timer.
+ lastInvokeTime = time;
+ // Start the timer for the trailing edge.
+ timerId = setTimeout(timerExpired, wait);
+ // Invoke the leading edge.
+ return leading ? invokeFunc(time) : result;
+ }
+
+ function remainingWait(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime,
+ result = wait - timeSinceLastCall;
+
+ return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
+ }
+
+ function shouldInvoke(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime;
+
+ // Either this is the first call, activity has stopped and we're at the
+ // trailing edge, the system time has gone backwards and we're treating
+ // it as the trailing edge, or we've hit the `maxWait` limit.
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
+ }
+
+ function timerExpired() {
+ var time = now();
+ if (shouldInvoke(time)) {
+ return trailingEdge(time);
+ }
+ // Restart the timer.
+ timerId = setTimeout(timerExpired, remainingWait(time));
+ }
+
+ function trailingEdge(time) {
+ timerId = undefined;
+
+ // Only invoke if we have `lastArgs` which means `func` has been
+ // debounced at least once.
+ if (trailing && lastArgs) {
+ return invokeFunc(time);
+ }
+ lastArgs = lastThis = undefined;
+ return result;
+ }
+
+ function cancel() {
+ if (timerId !== undefined) {
+ clearTimeout(timerId);
+ }
+ lastInvokeTime = 0;
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
+ }
+
+ function flush() {
+ return timerId === undefined ? result : trailingEdge(now());
+ }
+
+ function debounced() {
+ var time = now(),
+ isInvoking = shouldInvoke(time);
+
+ lastArgs = arguments;
+ lastThis = this;
+ lastCallTime = time;
+
+ if (isInvoking) {
+ if (timerId === undefined) {
+ return leadingEdge(lastCallTime);
+ }
+ if (maxing) {
+ // Handle invocations in a tight loop.
+ timerId = setTimeout(timerExpired, wait);
+ return invokeFunc(lastCallTime);
+ }
+ }
+ if (timerId === undefined) {
+ timerId = setTimeout(timerExpired, wait);
+ }
+ return result;
+ }
+ debounced.cancel = cancel;
+ debounced.flush = flush;
+ return debounced;
+}
+
+module.exports = debounce;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/deburr.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/deburr.js
new file mode 100644
index 0000000..f85e314
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/deburr.js
@@ -0,0 +1,45 @@
+var deburrLetter = require('./_deburrLetter'),
+ toString = require('./toString');
+
+/** Used to match Latin Unicode letters (excluding mathematical operators). */
+var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
+
+/** Used to compose unicode character classes. */
+var rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
+
+/** Used to compose unicode capture groups. */
+var rsCombo = '[' + rsComboRange + ']';
+
+/**
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
+ */
+var reComboMark = RegExp(rsCombo, 'g');
+
+/**
+ * Deburrs `string` by converting
+ * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
+ * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
+ * letters to basic Latin letters and removing
+ * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to deburr.
+ * @returns {string} Returns the deburred string.
+ * @example
+ *
+ * _.deburr('déjà vu');
+ * // => 'deja vu'
+ */
+function deburr(string) {
+ string = toString(string);
+ return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
+}
+
+module.exports = deburr;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/defaultTo.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/defaultTo.js
new file mode 100644
index 0000000..5b33359
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/defaultTo.js
@@ -0,0 +1,25 @@
+/**
+ * Checks `value` to determine whether a default value should be returned in
+ * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
+ * or `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.14.0
+ * @category Util
+ * @param {*} value The value to check.
+ * @param {*} defaultValue The default value.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * _.defaultTo(1, 10);
+ * // => 1
+ *
+ * _.defaultTo(undefined, 10);
+ * // => 10
+ */
+function defaultTo(value, defaultValue) {
+ return (value == null || value !== value) ? defaultValue : value;
+}
+
+module.exports = defaultTo;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/defaults.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/defaults.js
new file mode 100644
index 0000000..5333b42
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/defaults.js
@@ -0,0 +1,32 @@
+var apply = require('./_apply'),
+ assignInDefaults = require('./_assignInDefaults'),
+ assignInWith = require('./assignInWith'),
+ baseRest = require('./_baseRest');
+
+/**
+ * Assigns own and inherited enumerable string keyed properties of source
+ * objects to the destination object for all destination properties that
+ * resolve to `undefined`. Source objects are applied from left to right.
+ * Once a property is set, additional values of the same property are ignored.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaultsDeep
+ * @example
+ *
+ * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+var defaults = baseRest(function(args) {
+ args.push(undefined, assignInDefaults);
+ return apply(assignInWith, undefined, args);
+});
+
+module.exports = defaults;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/defaultsDeep.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/defaultsDeep.js
new file mode 100644
index 0000000..41680ed
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/defaultsDeep.js
@@ -0,0 +1,30 @@
+var apply = require('./_apply'),
+ baseRest = require('./_baseRest'),
+ mergeDefaults = require('./_mergeDefaults'),
+ mergeWith = require('./mergeWith');
+
+/**
+ * This method is like `_.defaults` except that it recursively assigns
+ * default properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaults
+ * @example
+ *
+ * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
+ * // => { 'a': { 'b': 2, 'c': 3 } }
+ */
+var defaultsDeep = baseRest(function(args) {
+ args.push(undefined, mergeDefaults);
+ return apply(mergeWith, undefined, args);
+});
+
+module.exports = defaultsDeep;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/defer.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/defer.js
new file mode 100644
index 0000000..f6d6c6f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/defer.js
@@ -0,0 +1,26 @@
+var baseDelay = require('./_baseDelay'),
+ baseRest = require('./_baseRest');
+
+/**
+ * Defers invoking the `func` until the current call stack has cleared. Any
+ * additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to defer.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.defer(function(text) {
+ * console.log(text);
+ * }, 'deferred');
+ * // => Logs 'deferred' after one millisecond.
+ */
+var defer = baseRest(function(func, args) {
+ return baseDelay(func, 1, args);
+});
+
+module.exports = defer;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/delay.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/delay.js
new file mode 100644
index 0000000..bd55479
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/delay.js
@@ -0,0 +1,28 @@
+var baseDelay = require('./_baseDelay'),
+ baseRest = require('./_baseRest'),
+ toNumber = require('./toNumber');
+
+/**
+ * Invokes `func` after `wait` milliseconds. Any additional arguments are
+ * provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.delay(function(text) {
+ * console.log(text);
+ * }, 1000, 'later');
+ * // => Logs 'later' after one second.
+ */
+var delay = baseRest(function(func, wait, args) {
+ return baseDelay(func, toNumber(wait) || 0, args);
+});
+
+module.exports = delay;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/difference.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/difference.js
new file mode 100644
index 0000000..fa28bb3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/difference.js
@@ -0,0 +1,33 @@
+var baseDifference = require('./_baseDifference'),
+ baseFlatten = require('./_baseFlatten'),
+ baseRest = require('./_baseRest'),
+ isArrayLikeObject = require('./isArrayLikeObject');
+
+/**
+ * Creates an array of `array` values not included in the other given arrays
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. The order and references of result values are
+ * determined by the first array.
+ *
+ * **Note:** Unlike `_.pullAll`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.without, _.xor
+ * @example
+ *
+ * _.difference([2, 1], [2, 3]);
+ * // => [1]
+ */
+var difference = baseRest(function(array, values) {
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
+ : [];
+});
+
+module.exports = difference;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/differenceBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/differenceBy.js
new file mode 100644
index 0000000..2cd63e7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/differenceBy.js
@@ -0,0 +1,44 @@
+var baseDifference = require('./_baseDifference'),
+ baseFlatten = require('./_baseFlatten'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.difference` except that it accepts `iteratee` which
+ * is invoked for each element of `array` and `values` to generate the criterion
+ * by which they're compared. The order and references of result values are
+ * determined by the first array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
+ * // => [{ 'x': 2 }]
+ */
+var differenceBy = baseRest(function(array, values) {
+ var iteratee = last(values);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2))
+ : [];
+});
+
+module.exports = differenceBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/differenceWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/differenceWith.js
new file mode 100644
index 0000000..c0233f4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/differenceWith.js
@@ -0,0 +1,40 @@
+var baseDifference = require('./_baseDifference'),
+ baseFlatten = require('./_baseFlatten'),
+ baseRest = require('./_baseRest'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.difference` except that it accepts `comparator`
+ * which is invoked to compare elements of `array` to `values`. The order and
+ * references of result values are determined by the first array. The comparator
+ * is invoked with two arguments: (arrVal, othVal).
+ *
+ * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ *
+ * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
+ * // => [{ 'x': 2, 'y': 1 }]
+ */
+var differenceWith = baseRest(function(array, values) {
+ var comparator = last(values);
+ if (isArrayLikeObject(comparator)) {
+ comparator = undefined;
+ }
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
+ : [];
+});
+
+module.exports = differenceWith;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/divide.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/divide.js
new file mode 100644
index 0000000..8cae0cd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/divide.js
@@ -0,0 +1,22 @@
+var createMathOperation = require('./_createMathOperation');
+
+/**
+ * Divide two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {number} dividend The first number in a division.
+ * @param {number} divisor The second number in a division.
+ * @returns {number} Returns the quotient.
+ * @example
+ *
+ * _.divide(6, 4);
+ * // => 1.5
+ */
+var divide = createMathOperation(function(dividend, divisor) {
+ return dividend / divisor;
+}, 1);
+
+module.exports = divide;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/drop.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/drop.js
new file mode 100644
index 0000000..d5c3cba
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/drop.js
@@ -0,0 +1,38 @@
+var baseSlice = require('./_baseSlice'),
+ toInteger = require('./toInteger');
+
+/**
+ * Creates a slice of `array` with `n` elements dropped from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.drop([1, 2, 3]);
+ * // => [2, 3]
+ *
+ * _.drop([1, 2, 3], 2);
+ * // => [3]
+ *
+ * _.drop([1, 2, 3], 5);
+ * // => []
+ *
+ * _.drop([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+function drop(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ return baseSlice(array, n < 0 ? 0 : n, length);
+}
+
+module.exports = drop;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/dropRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/dropRight.js
new file mode 100644
index 0000000..441fe99
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/dropRight.js
@@ -0,0 +1,39 @@
+var baseSlice = require('./_baseSlice'),
+ toInteger = require('./toInteger');
+
+/**
+ * Creates a slice of `array` with `n` elements dropped from the end.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.dropRight([1, 2, 3]);
+ * // => [1, 2]
+ *
+ * _.dropRight([1, 2, 3], 2);
+ * // => [1]
+ *
+ * _.dropRight([1, 2, 3], 5);
+ * // => []
+ *
+ * _.dropRight([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+function dropRight(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ n = length - n;
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+}
+
+module.exports = dropRight;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/dropRightWhile.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/dropRightWhile.js
new file mode 100644
index 0000000..9ad36a0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/dropRightWhile.js
@@ -0,0 +1,45 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseWhile = require('./_baseWhile');
+
+/**
+ * Creates a slice of `array` excluding elements dropped from the end.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.dropRightWhile(users, function(o) { return !o.active; });
+ * // => objects for ['barney']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.dropRightWhile(users, ['active', false]);
+ * // => objects for ['barney']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.dropRightWhile(users, 'active');
+ * // => objects for ['barney', 'fred', 'pebbles']
+ */
+function dropRightWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, baseIteratee(predicate, 3), true, true)
+ : [];
+}
+
+module.exports = dropRightWhile;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/dropWhile.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/dropWhile.js
new file mode 100644
index 0000000..903ef56
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/dropWhile.js
@@ -0,0 +1,45 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseWhile = require('./_baseWhile');
+
+/**
+ * Creates a slice of `array` excluding elements dropped from the beginning.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.dropWhile(users, function(o) { return !o.active; });
+ * // => objects for ['pebbles']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.dropWhile(users, { 'user': 'barney', 'active': false });
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.dropWhile(users, ['active', false]);
+ * // => objects for ['pebbles']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.dropWhile(users, 'active');
+ * // => objects for ['barney', 'fred', 'pebbles']
+ */
+function dropWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, baseIteratee(predicate, 3), true)
+ : [];
+}
+
+module.exports = dropWhile;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/each.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/each.js
new file mode 100644
index 0000000..8800f42
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/each.js
@@ -0,0 +1 @@
+module.exports = require('./forEach');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/eachRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/eachRight.js
new file mode 100644
index 0000000..3252b2a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/eachRight.js
@@ -0,0 +1 @@
+module.exports = require('./forEachRight');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/endsWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/endsWith.js
new file mode 100644
index 0000000..76fc866
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/endsWith.js
@@ -0,0 +1,43 @@
+var baseClamp = require('./_baseClamp'),
+ baseToString = require('./_baseToString'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/**
+ * Checks if `string` ends with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=string.length] The position to search up to.
+ * @returns {boolean} Returns `true` if `string` ends with `target`,
+ * else `false`.
+ * @example
+ *
+ * _.endsWith('abc', 'c');
+ * // => true
+ *
+ * _.endsWith('abc', 'b');
+ * // => false
+ *
+ * _.endsWith('abc', 'b', 2);
+ * // => true
+ */
+function endsWith(string, target, position) {
+ string = toString(string);
+ target = baseToString(target);
+
+ var length = string.length;
+ position = position === undefined
+ ? length
+ : baseClamp(toInteger(position), 0, length);
+
+ var end = position;
+ position -= target.length;
+ return position >= 0 && string.slice(position, end) == target;
+}
+
+module.exports = endsWith;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/entries.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/entries.js
new file mode 100644
index 0000000..7a88df2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/entries.js
@@ -0,0 +1 @@
+module.exports = require('./toPairs');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/entriesIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/entriesIn.js
new file mode 100644
index 0000000..f6c6331
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/entriesIn.js
@@ -0,0 +1 @@
+module.exports = require('./toPairsIn');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/eq.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/eq.js
new file mode 100644
index 0000000..a940688
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/eq.js
@@ -0,0 +1,37 @@
+/**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+}
+
+module.exports = eq;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/escape.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/escape.js
new file mode 100644
index 0000000..9247e00
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/escape.js
@@ -0,0 +1,43 @@
+var escapeHtmlChar = require('./_escapeHtmlChar'),
+ toString = require('./toString');
+
+/** Used to match HTML entities and HTML characters. */
+var reUnescapedHtml = /[&<>"']/g,
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+
+/**
+ * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
+ * corresponding HTML entities.
+ *
+ * **Note:** No other characters are escaped. To escape additional
+ * characters use a third-party library like [_he_](https://mths.be/he).
+ *
+ * Though the ">" character is escaped for symmetry, characters like
+ * ">" and "/" don't need escaping in HTML and have no special meaning
+ * unless they're part of a tag or unquoted attribute value. See
+ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
+ * (under "semi-related fun fact") for more details.
+ *
+ * When working with HTML you should always
+ * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
+ * XSS vectors.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escape('fred, barney, & pebbles');
+ * // => 'fred, barney, &amp; pebbles'
+ */
+function escape(string) {
+ string = toString(string);
+ return (string && reHasUnescapedHtml.test(string))
+ ? string.replace(reUnescapedHtml, escapeHtmlChar)
+ : string;
+}
+
+module.exports = escape;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/escapeRegExp.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/escapeRegExp.js
new file mode 100644
index 0000000..0a58c69
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/escapeRegExp.js
@@ -0,0 +1,32 @@
+var toString = require('./toString');
+
+/**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
+ */
+var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
+ reHasRegExpChar = RegExp(reRegExpChar.source);
+
+/**
+ * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
+ * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escapeRegExp('[lodash](https://lodash.com/)');
+ * // => '\[lodash\]\(https://lodash\.com/\)'
+ */
+function escapeRegExp(string) {
+ string = toString(string);
+ return (string && reHasRegExpChar.test(string))
+ ? string.replace(reRegExpChar, '\\$&')
+ : string;
+}
+
+module.exports = escapeRegExp;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/every.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/every.js
new file mode 100644
index 0000000..25080da
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/every.js
@@ -0,0 +1,56 @@
+var arrayEvery = require('./_arrayEvery'),
+ baseEvery = require('./_baseEvery'),
+ baseIteratee = require('./_baseIteratee'),
+ isArray = require('./isArray'),
+ isIterateeCall = require('./_isIterateeCall');
+
+/**
+ * Checks if `predicate` returns truthy for **all** elements of `collection`.
+ * Iteration is stopped once `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * **Note:** This method returns `true` for
+ * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
+ * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
+ * elements of empty collections.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.every([true, 1, null, 'yes'], Boolean);
+ * // => false
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.every(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.every(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.every(users, 'active');
+ * // => false
+ */
+function every(collection, predicate, guard) {
+ var func = isArray(collection) ? arrayEvery : baseEvery;
+ if (guard && isIterateeCall(collection, predicate, guard)) {
+ predicate = undefined;
+ }
+ return func(collection, baseIteratee(predicate, 3));
+}
+
+module.exports = every;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/extend.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/extend.js
new file mode 100644
index 0000000..e00166c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/extend.js
@@ -0,0 +1 @@
+module.exports = require('./assignIn');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/extendWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/extendWith.js
new file mode 100644
index 0000000..dbdcb3b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/extendWith.js
@@ -0,0 +1 @@
+module.exports = require('./assignInWith');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fill.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fill.js
new file mode 100644
index 0000000..ae13aa1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fill.js
@@ -0,0 +1,45 @@
+var baseFill = require('./_baseFill'),
+ isIterateeCall = require('./_isIterateeCall');
+
+/**
+ * Fills elements of `array` with `value` from `start` up to, but not
+ * including, `end`.
+ *
+ * **Note:** This method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Array
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _.fill(array, 'a');
+ * console.log(array);
+ * // => ['a', 'a', 'a']
+ *
+ * _.fill(Array(3), 2);
+ * // => [2, 2, 2]
+ *
+ * _.fill([4, 6, 8, 10], '*', 1, 3);
+ * // => [4, '*', '*', 10]
+ */
+function fill(array, value, start, end) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
+ start = 0;
+ end = length;
+ }
+ return baseFill(array, value, start, end);
+}
+
+module.exports = fill;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/filter.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/filter.js
new file mode 100644
index 0000000..52616be
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/filter.js
@@ -0,0 +1,48 @@
+var arrayFilter = require('./_arrayFilter'),
+ baseFilter = require('./_baseFilter'),
+ baseIteratee = require('./_baseIteratee'),
+ isArray = require('./isArray');
+
+/**
+ * Iterates over elements of `collection`, returning an array of all elements
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * **Note:** Unlike `_.remove`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.reject
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.filter(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, { 'age': 36, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.filter(users, 'active');
+ * // => objects for ['barney']
+ */
+function filter(collection, predicate) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ return func(collection, baseIteratee(predicate, 3));
+}
+
+module.exports = filter;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/find.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/find.js
new file mode 100644
index 0000000..de732cc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/find.js
@@ -0,0 +1,42 @@
+var createFind = require('./_createFind'),
+ findIndex = require('./findIndex');
+
+/**
+ * Iterates over elements of `collection`, returning the first element
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false },
+ * { 'user': 'pebbles', 'age': 1, 'active': true }
+ * ];
+ *
+ * _.find(users, function(o) { return o.age < 40; });
+ * // => object for 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.find(users, { 'age': 1, 'active': true });
+ * // => object for 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.find(users, ['active', false]);
+ * // => object for 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.find(users, 'active');
+ * // => object for 'barney'
+ */
+var find = createFind(findIndex);
+
+module.exports = find;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/findIndex.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/findIndex.js
new file mode 100644
index 0000000..4689069
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/findIndex.js
@@ -0,0 +1,55 @@
+var baseFindIndex = require('./_baseFindIndex'),
+ baseIteratee = require('./_baseIteratee'),
+ toInteger = require('./toInteger');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * This method is like `_.find` except that it returns the index of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.findIndex(users, function(o) { return o.user == 'barney'; });
+ * // => 0
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findIndex(users, { 'user': 'fred', 'active': false });
+ * // => 1
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findIndex(users, ['active', false]);
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findIndex(users, 'active');
+ * // => 2
+ */
+function findIndex(array, predicate, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
+ }
+ return baseFindIndex(array, baseIteratee(predicate, 3), index);
+}
+
+module.exports = findIndex;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/findKey.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/findKey.js
new file mode 100644
index 0000000..cac0248
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/findKey.js
@@ -0,0 +1,44 @@
+var baseFindKey = require('./_baseFindKey'),
+ baseForOwn = require('./_baseForOwn'),
+ baseIteratee = require('./_baseIteratee');
+
+/**
+ * This method is like `_.find` except that it returns the key of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {string|undefined} Returns the key of the matched element,
+ * else `undefined`.
+ * @example
+ *
+ * var users = {
+ * 'barney': { 'age': 36, 'active': true },
+ * 'fred': { 'age': 40, 'active': false },
+ * 'pebbles': { 'age': 1, 'active': true }
+ * };
+ *
+ * _.findKey(users, function(o) { return o.age < 40; });
+ * // => 'barney' (iteration order is not guaranteed)
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findKey(users, { 'age': 1, 'active': true });
+ * // => 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findKey(users, ['active', false]);
+ * // => 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findKey(users, 'active');
+ * // => 'barney'
+ */
+function findKey(object, predicate) {
+ return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn);
+}
+
+module.exports = findKey;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/findLast.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/findLast.js
new file mode 100644
index 0000000..70b4271
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/findLast.js
@@ -0,0 +1,25 @@
+var createFind = require('./_createFind'),
+ findLastIndex = require('./findLastIndex');
+
+/**
+ * This method is like `_.find` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=collection.length-1] The index to search from.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * _.findLast([1, 2, 3, 4], function(n) {
+ * return n % 2 == 1;
+ * });
+ * // => 3
+ */
+var findLast = createFind(findLastIndex);
+
+module.exports = findLast;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/findLastIndex.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/findLastIndex.js
new file mode 100644
index 0000000..7da3431
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/findLastIndex.js
@@ -0,0 +1,59 @@
+var baseFindIndex = require('./_baseFindIndex'),
+ baseIteratee = require('./_baseIteratee'),
+ toInteger = require('./toInteger');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max,
+ nativeMin = Math.min;
+
+/**
+ * This method is like `_.findIndex` except that it iterates over elements
+ * of `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=array.length-1] The index to search from.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
+ * // => 2
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findLastIndex(users, { 'user': 'barney', 'active': true });
+ * // => 0
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findLastIndex(users, ['active', false]);
+ * // => 2
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findLastIndex(users, 'active');
+ * // => 0
+ */
+function findLastIndex(array, predicate, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = length - 1;
+ if (fromIndex !== undefined) {
+ index = toInteger(fromIndex);
+ index = fromIndex < 0
+ ? nativeMax(length + index, 0)
+ : nativeMin(index, length - 1);
+ }
+ return baseFindIndex(array, baseIteratee(predicate, 3), index, true);
+}
+
+module.exports = findLastIndex;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/findLastKey.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/findLastKey.js
new file mode 100644
index 0000000..66fb9fb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/findLastKey.js
@@ -0,0 +1,44 @@
+var baseFindKey = require('./_baseFindKey'),
+ baseForOwnRight = require('./_baseForOwnRight'),
+ baseIteratee = require('./_baseIteratee');
+
+/**
+ * This method is like `_.findKey` except that it iterates over elements of
+ * a collection in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {string|undefined} Returns the key of the matched element,
+ * else `undefined`.
+ * @example
+ *
+ * var users = {
+ * 'barney': { 'age': 36, 'active': true },
+ * 'fred': { 'age': 40, 'active': false },
+ * 'pebbles': { 'age': 1, 'active': true }
+ * };
+ *
+ * _.findLastKey(users, function(o) { return o.age < 40; });
+ * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findLastKey(users, { 'age': 36, 'active': true });
+ * // => 'barney'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findLastKey(users, ['active', false]);
+ * // => 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findLastKey(users, 'active');
+ * // => 'pebbles'
+ */
+function findLastKey(object, predicate) {
+ return baseFindKey(object, baseIteratee(predicate, 3), baseForOwnRight);
+}
+
+module.exports = findLastKey;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/first.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/first.js
new file mode 100644
index 0000000..53f4ad1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/first.js
@@ -0,0 +1 @@
+module.exports = require('./head');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flatMap.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flatMap.js
new file mode 100644
index 0000000..e668506
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flatMap.js
@@ -0,0 +1,29 @@
+var baseFlatten = require('./_baseFlatten'),
+ map = require('./map');
+
+/**
+ * Creates a flattened array of values by running each element in `collection`
+ * thru `iteratee` and flattening the mapped results. The iteratee is invoked
+ * with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [n, n];
+ * }
+ *
+ * _.flatMap([1, 2], duplicate);
+ * // => [1, 1, 2, 2]
+ */
+function flatMap(collection, iteratee) {
+ return baseFlatten(map(collection, iteratee), 1);
+}
+
+module.exports = flatMap;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flatMapDeep.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flatMapDeep.js
new file mode 100644
index 0000000..4653d60
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flatMapDeep.js
@@ -0,0 +1,31 @@
+var baseFlatten = require('./_baseFlatten'),
+ map = require('./map');
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/**
+ * This method is like `_.flatMap` except that it recursively flattens the
+ * mapped results.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [[[n, n]]];
+ * }
+ *
+ * _.flatMapDeep([1, 2], duplicate);
+ * // => [1, 1, 2, 2]
+ */
+function flatMapDeep(collection, iteratee) {
+ return baseFlatten(map(collection, iteratee), INFINITY);
+}
+
+module.exports = flatMapDeep;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flatMapDepth.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flatMapDepth.js
new file mode 100644
index 0000000..6d72005
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flatMapDepth.js
@@ -0,0 +1,31 @@
+var baseFlatten = require('./_baseFlatten'),
+ map = require('./map'),
+ toInteger = require('./toInteger');
+
+/**
+ * This method is like `_.flatMap` except that it recursively flattens the
+ * mapped results up to `depth` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {number} [depth=1] The maximum recursion depth.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [[[n, n]]];
+ * }
+ *
+ * _.flatMapDepth([1, 2], duplicate, 2);
+ * // => [[1, 1], [2, 2]]
+ */
+function flatMapDepth(collection, iteratee, depth) {
+ depth = depth === undefined ? 1 : toInteger(depth);
+ return baseFlatten(map(collection, iteratee), depth);
+}
+
+module.exports = flatMapDepth;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flatten.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flatten.js
new file mode 100644
index 0000000..3f09f7f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flatten.js
@@ -0,0 +1,22 @@
+var baseFlatten = require('./_baseFlatten');
+
+/**
+ * Flattens `array` a single level deep.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flatten([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, [3, [4]], 5]
+ */
+function flatten(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, 1) : [];
+}
+
+module.exports = flatten;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flattenDeep.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flattenDeep.js
new file mode 100644
index 0000000..8ad585c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flattenDeep.js
@@ -0,0 +1,25 @@
+var baseFlatten = require('./_baseFlatten');
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/**
+ * Recursively flattens `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flattenDeep([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, 3, 4, 5]
+ */
+function flattenDeep(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, INFINITY) : [];
+}
+
+module.exports = flattenDeep;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flattenDepth.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flattenDepth.js
new file mode 100644
index 0000000..441fdcc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flattenDepth.js
@@ -0,0 +1,33 @@
+var baseFlatten = require('./_baseFlatten'),
+ toInteger = require('./toInteger');
+
+/**
+ * Recursively flatten `array` up to `depth` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.4.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @param {number} [depth=1] The maximum recursion depth.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * var array = [1, [2, [3, [4]], 5]];
+ *
+ * _.flattenDepth(array, 1);
+ * // => [1, 2, [3, [4]], 5]
+ *
+ * _.flattenDepth(array, 2);
+ * // => [1, 2, 3, [4], 5]
+ */
+function flattenDepth(array, depth) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ depth = depth === undefined ? 1 : toInteger(depth);
+ return baseFlatten(array, depth);
+}
+
+module.exports = flattenDepth;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flip.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flip.js
new file mode 100644
index 0000000..c28dd78
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flip.js
@@ -0,0 +1,28 @@
+var createWrap = require('./_createWrap');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_FLIP_FLAG = 512;
+
+/**
+ * Creates a function that invokes `func` with arguments reversed.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to flip arguments for.
+ * @returns {Function} Returns the new flipped function.
+ * @example
+ *
+ * var flipped = _.flip(function() {
+ * return _.toArray(arguments);
+ * });
+ *
+ * flipped('a', 'b', 'c', 'd');
+ * // => ['d', 'c', 'b', 'a']
+ */
+function flip(func) {
+ return createWrap(func, WRAP_FLIP_FLAG);
+}
+
+module.exports = flip;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/floor.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/floor.js
new file mode 100644
index 0000000..ab6dfa2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/floor.js
@@ -0,0 +1,26 @@
+var createRound = require('./_createRound');
+
+/**
+ * Computes `number` rounded down to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round down.
+ * @param {number} [precision=0] The precision to round down to.
+ * @returns {number} Returns the rounded down number.
+ * @example
+ *
+ * _.floor(4.006);
+ * // => 4
+ *
+ * _.floor(0.046, 2);
+ * // => 0.04
+ *
+ * _.floor(4060, -2);
+ * // => 4000
+ */
+var floor = createRound('floor');
+
+module.exports = floor;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flow.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flow.js
new file mode 100644
index 0000000..74b6b62
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flow.js
@@ -0,0 +1,27 @@
+var createFlow = require('./_createFlow');
+
+/**
+ * Creates a function that returns the result of invoking the given functions
+ * with the `this` binding of the created function, where each successive
+ * invocation is supplied the return value of the previous.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [funcs] The functions to invoke.
+ * @returns {Function} Returns the new composite function.
+ * @see _.flowRight
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var addSquare = _.flow([_.add, square]);
+ * addSquare(1, 2);
+ * // => 9
+ */
+var flow = createFlow();
+
+module.exports = flow;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flowRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flowRight.js
new file mode 100644
index 0000000..1146141
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/flowRight.js
@@ -0,0 +1,26 @@
+var createFlow = require('./_createFlow');
+
+/**
+ * This method is like `_.flow` except that it creates a function that
+ * invokes the given functions from right to left.
+ *
+ * @static
+ * @since 3.0.0
+ * @memberOf _
+ * @category Util
+ * @param {...(Function|Function[])} [funcs] The functions to invoke.
+ * @returns {Function} Returns the new composite function.
+ * @see _.flow
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var addSquare = _.flowRight([square, _.add]);
+ * addSquare(1, 2);
+ * // => 9
+ */
+var flowRight = createFlow(true);
+
+module.exports = flowRight;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forEach.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forEach.js
new file mode 100644
index 0000000..c64eaa7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forEach.js
@@ -0,0 +1,41 @@
+var arrayEach = require('./_arrayEach'),
+ baseEach = require('./_baseEach'),
+ castFunction = require('./_castFunction'),
+ isArray = require('./isArray');
+
+/**
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length"
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
+ * or `_.forOwn` for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias each
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEachRight
+ * @example
+ *
+ * _.forEach([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `1` then `2`.
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+function forEach(collection, iteratee) {
+ var func = isArray(collection) ? arrayEach : baseEach;
+ return func(collection, castFunction(iteratee));
+}
+
+module.exports = forEach;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forEachRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forEachRight.js
new file mode 100644
index 0000000..7390eba
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forEachRight.js
@@ -0,0 +1,31 @@
+var arrayEachRight = require('./_arrayEachRight'),
+ baseEachRight = require('./_baseEachRight'),
+ castFunction = require('./_castFunction'),
+ isArray = require('./isArray');
+
+/**
+ * This method is like `_.forEach` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @alias eachRight
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEach
+ * @example
+ *
+ * _.forEachRight([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `2` then `1`.
+ */
+function forEachRight(collection, iteratee) {
+ var func = isArray(collection) ? arrayEachRight : baseEachRight;
+ return func(collection, castFunction(iteratee));
+}
+
+module.exports = forEachRight;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forIn.js
new file mode 100644
index 0000000..583a596
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forIn.js
@@ -0,0 +1,39 @@
+var baseFor = require('./_baseFor'),
+ castFunction = require('./_castFunction'),
+ keysIn = require('./keysIn');
+
+/**
+ * Iterates over own and inherited enumerable string keyed properties of an
+ * object and invokes `iteratee` for each property. The iteratee is invoked
+ * with three arguments: (value, key, object). Iteratee functions may exit
+ * iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forInRight
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forIn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
+ */
+function forIn(object, iteratee) {
+ return object == null
+ ? object
+ : baseFor(object, castFunction(iteratee), keysIn);
+}
+
+module.exports = forIn;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forInRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forInRight.js
new file mode 100644
index 0000000..4aedf58
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forInRight.js
@@ -0,0 +1,37 @@
+var baseForRight = require('./_baseForRight'),
+ castFunction = require('./_castFunction'),
+ keysIn = require('./keysIn');
+
+/**
+ * This method is like `_.forIn` except that it iterates over properties of
+ * `object` in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forInRight(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
+ */
+function forInRight(object, iteratee) {
+ return object == null
+ ? object
+ : baseForRight(object, castFunction(iteratee), keysIn);
+}
+
+module.exports = forInRight;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forOwn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forOwn.js
new file mode 100644
index 0000000..94eed84
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forOwn.js
@@ -0,0 +1,36 @@
+var baseForOwn = require('./_baseForOwn'),
+ castFunction = require('./_castFunction');
+
+/**
+ * Iterates over own enumerable string keyed properties of an object and
+ * invokes `iteratee` for each property. The iteratee is invoked with three
+ * arguments: (value, key, object). Iteratee functions may exit iteration
+ * early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forOwnRight
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+function forOwn(object, iteratee) {
+ return object && baseForOwn(object, castFunction(iteratee));
+}
+
+module.exports = forOwn;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forOwnRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forOwnRight.js
new file mode 100644
index 0000000..86f338f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/forOwnRight.js
@@ -0,0 +1,34 @@
+var baseForOwnRight = require('./_baseForOwnRight'),
+ castFunction = require('./_castFunction');
+
+/**
+ * This method is like `_.forOwn` except that it iterates over properties of
+ * `object` in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forOwn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwnRight(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
+ */
+function forOwnRight(object, iteratee) {
+ return object && baseForOwnRight(object, castFunction(iteratee));
+}
+
+module.exports = forOwnRight;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp.js
new file mode 100644
index 0000000..e372dbb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp.js
@@ -0,0 +1,2 @@
+var _ = require('./lodash.min').runInContext();
+module.exports = require('./fp/_baseConvert')(_, _);
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/F.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/F.js
new file mode 100644
index 0000000..a05a63a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/F.js
@@ -0,0 +1 @@
+module.exports = require('./stubFalse');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/T.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/T.js
new file mode 100644
index 0000000..e2ba8ea
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/T.js
@@ -0,0 +1 @@
+module.exports = require('./stubTrue');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/__.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/__.js
new file mode 100644
index 0000000..4af98de
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/__.js
@@ -0,0 +1 @@
+module.exports = require('./placeholder');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/_baseConvert.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/_baseConvert.js
new file mode 100644
index 0000000..c9d3247
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/_baseConvert.js
@@ -0,0 +1,567 @@
+var mapping = require('./_mapping'),
+ fallbackHolder = require('./placeholder');
+
+/** Built-in value reference. */
+var push = Array.prototype.push;
+
+/**
+ * Creates a function, with an arity of `n`, that invokes `func` with the
+ * arguments it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} n The arity of the new function.
+ * @returns {Function} Returns the new function.
+ */
+function baseArity(func, n) {
+ return n == 2
+ ? function(a, b) { return func.apply(undefined, arguments); }
+ : function(a) { return func.apply(undefined, arguments); };
+}
+
+/**
+ * Creates a function that invokes `func`, with up to `n` arguments, ignoring
+ * any additional arguments.
+ *
+ * @private
+ * @param {Function} func The function to cap arguments for.
+ * @param {number} n The arity cap.
+ * @returns {Function} Returns the new function.
+ */
+function baseAry(func, n) {
+ return n == 2
+ ? function(a, b) { return func(a, b); }
+ : function(a) { return func(a); };
+}
+
+/**
+ * Creates a clone of `array`.
+ *
+ * @private
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the cloned array.
+ */
+function cloneArray(array) {
+ var length = array ? array.length : 0,
+ result = Array(length);
+
+ while (length--) {
+ result[length] = array[length];
+ }
+ return result;
+}
+
+/**
+ * Creates a function that clones a given object using the assignment `func`.
+ *
+ * @private
+ * @param {Function} func The assignment function.
+ * @returns {Function} Returns the new cloner function.
+ */
+function createCloner(func) {
+ return function(object) {
+ return func({}, object);
+ };
+}
+
+/**
+ * This function is like `_.spread` except that it includes arguments after those spread.
+ *
+ * @private
+ * @param {Function} func The function to spread arguments over.
+ * @param {number} start The start position of the spread.
+ * @returns {Function} Returns the new function.
+ */
+function spread(func, start) {
+ return function() {
+ var length = arguments.length,
+ args = Array(length);
+
+ while (length--) {
+ args[length] = arguments[length];
+ }
+ var array = args[start],
+ lastIndex = args.length - 1,
+ otherArgs = args.slice(0, start);
+
+ if (array) {
+ push.apply(otherArgs, array);
+ }
+ if (start != lastIndex) {
+ push.apply(otherArgs, args.slice(start + 1));
+ }
+ return func.apply(this, otherArgs);
+ };
+}
+
+/**
+ * Creates a function that wraps `func` and uses `cloner` to clone the first
+ * argument it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} cloner The function to clone arguments.
+ * @returns {Function} Returns the new immutable function.
+ */
+function wrapImmutable(func, cloner) {
+ return function() {
+ var length = arguments.length;
+ if (!length) {
+ return;
+ }
+ var args = Array(length);
+ while (length--) {
+ args[length] = arguments[length];
+ }
+ var result = args[0] = cloner.apply(undefined, args);
+ func.apply(undefined, args);
+ return result;
+ };
+}
+
+/**
+ * The base implementation of `convert` which accepts a `util` object of methods
+ * required to perform conversions.
+ *
+ * @param {Object} util The util object.
+ * @param {string} name The name of the function to convert.
+ * @param {Function} func The function to convert.
+ * @param {Object} [options] The options object.
+ * @param {boolean} [options.cap=true] Specify capping iteratee arguments.
+ * @param {boolean} [options.curry=true] Specify currying.
+ * @param {boolean} [options.fixed=true] Specify fixed arity.
+ * @param {boolean} [options.immutable=true] Specify immutable operations.
+ * @param {boolean} [options.rearg=true] Specify rearranging arguments.
+ * @returns {Function|Object} Returns the converted function or object.
+ */
+function baseConvert(util, name, func, options) {
+ var setPlaceholder,
+ isLib = typeof name == 'function',
+ isObj = name === Object(name);
+
+ if (isObj) {
+ options = func;
+ func = name;
+ name = undefined;
+ }
+ if (func == null) {
+ throw new TypeError;
+ }
+ options || (options = {});
+
+ var config = {
+ 'cap': 'cap' in options ? options.cap : true,
+ 'curry': 'curry' in options ? options.curry : true,
+ 'fixed': 'fixed' in options ? options.fixed : true,
+ 'immutable': 'immutable' in options ? options.immutable : true,
+ 'rearg': 'rearg' in options ? options.rearg : true
+ };
+
+ var forceCurry = ('curry' in options) && options.curry,
+ forceFixed = ('fixed' in options) && options.fixed,
+ forceRearg = ('rearg' in options) && options.rearg,
+ placeholder = isLib ? func : fallbackHolder,
+ pristine = isLib ? func.runInContext() : undefined;
+
+ var helpers = isLib ? func : {
+ 'ary': util.ary,
+ 'assign': util.assign,
+ 'clone': util.clone,
+ 'curry': util.curry,
+ 'forEach': util.forEach,
+ 'isArray': util.isArray,
+ 'isFunction': util.isFunction,
+ 'iteratee': util.iteratee,
+ 'keys': util.keys,
+ 'rearg': util.rearg,
+ 'toInteger': util.toInteger,
+ 'toPath': util.toPath
+ };
+
+ var ary = helpers.ary,
+ assign = helpers.assign,
+ clone = helpers.clone,
+ curry = helpers.curry,
+ each = helpers.forEach,
+ isArray = helpers.isArray,
+ isFunction = helpers.isFunction,
+ keys = helpers.keys,
+ rearg = helpers.rearg,
+ toInteger = helpers.toInteger,
+ toPath = helpers.toPath;
+
+ var aryMethodKeys = keys(mapping.aryMethod);
+
+ var wrappers = {
+ 'castArray': function(castArray) {
+ return function() {
+ var value = arguments[0];
+ return isArray(value)
+ ? castArray(cloneArray(value))
+ : castArray.apply(undefined, arguments);
+ };
+ },
+ 'iteratee': function(iteratee) {
+ return function() {
+ var func = arguments[0],
+ arity = arguments[1],
+ result = iteratee(func, arity),
+ length = result.length;
+
+ if (config.cap && typeof arity == 'number') {
+ arity = arity > 2 ? (arity - 2) : 1;
+ return (length && length <= arity) ? result : baseAry(result, arity);
+ }
+ return result;
+ };
+ },
+ 'mixin': function(mixin) {
+ return function(source) {
+ var func = this;
+ if (!isFunction(func)) {
+ return mixin(func, Object(source));
+ }
+ var pairs = [];
+ each(keys(source), function(key) {
+ if (isFunction(source[key])) {
+ pairs.push([key, func.prototype[key]]);
+ }
+ });
+
+ mixin(func, Object(source));
+
+ each(pairs, function(pair) {
+ var value = pair[1];
+ if (isFunction(value)) {
+ func.prototype[pair[0]] = value;
+ } else {
+ delete func.prototype[pair[0]];
+ }
+ });
+ return func;
+ };
+ },
+ 'nthArg': function(nthArg) {
+ return function(n) {
+ var arity = n < 0 ? 1 : (toInteger(n) + 1);
+ return curry(nthArg(n), arity);
+ };
+ },
+ 'rearg': function(rearg) {
+ return function(func, indexes) {
+ var arity = indexes ? indexes.length : 0;
+ return curry(rearg(func, indexes), arity);
+ };
+ },
+ 'runInContext': function(runInContext) {
+ return function(context) {
+ return baseConvert(util, runInContext(context), options);
+ };
+ }
+ };
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Casts `func` to a function with an arity capped iteratee if needed.
+ *
+ * @private
+ * @param {string} name The name of the function to inspect.
+ * @param {Function} func The function to inspect.
+ * @returns {Function} Returns the cast function.
+ */
+ function castCap(name, func) {
+ if (config.cap) {
+ var indexes = mapping.iterateeRearg[name];
+ if (indexes) {
+ return iterateeRearg(func, indexes);
+ }
+ var n = !isLib && mapping.iterateeAry[name];
+ if (n) {
+ return iterateeAry(func, n);
+ }
+ }
+ return func;
+ }
+
+ /**
+ * Casts `func` to a curried function if needed.
+ *
+ * @private
+ * @param {string} name The name of the function to inspect.
+ * @param {Function} func The function to inspect.
+ * @param {number} n The arity of `func`.
+ * @returns {Function} Returns the cast function.
+ */
+ function castCurry(name, func, n) {
+ return (forceCurry || (config.curry && n > 1))
+ ? curry(func, n)
+ : func;
+ }
+
+ /**
+ * Casts `func` to a fixed arity function if needed.
+ *
+ * @private
+ * @param {string} name The name of the function to inspect.
+ * @param {Function} func The function to inspect.
+ * @param {number} n The arity cap.
+ * @returns {Function} Returns the cast function.
+ */
+ function castFixed(name, func, n) {
+ if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {
+ var data = mapping.methodSpread[name],
+ start = data && data.start;
+
+ return start === undefined ? ary(func, n) : spread(func, start);
+ }
+ return func;
+ }
+
+ /**
+ * Casts `func` to an rearged function if needed.
+ *
+ * @private
+ * @param {string} name The name of the function to inspect.
+ * @param {Function} func The function to inspect.
+ * @param {number} n The arity of `func`.
+ * @returns {Function} Returns the cast function.
+ */
+ function castRearg(name, func, n) {
+ return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name]))
+ ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n])
+ : func;
+ }
+
+ /**
+ * Creates a clone of `object` by `path`.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @param {Array|string} path The path to clone by.
+ * @returns {Object} Returns the cloned object.
+ */
+ function cloneByPath(object, path) {
+ path = toPath(path);
+
+ var index = -1,
+ length = path.length,
+ lastIndex = length - 1,
+ result = clone(Object(object)),
+ nested = result;
+
+ while (nested != null && ++index < length) {
+ var key = path[index],
+ value = nested[key];
+
+ if (value != null) {
+ nested[path[index]] = clone(index == lastIndex ? value : Object(value));
+ }
+ nested = nested[key];
+ }
+ return result;
+ }
+
+ /**
+ * Converts `lodash` to an immutable auto-curried iteratee-first data-last
+ * version with conversion `options` applied.
+ *
+ * @param {Object} [options] The options object. See `baseConvert` for more details.
+ * @returns {Function} Returns the converted `lodash`.
+ */
+ function convertLib(options) {
+ return _.runInContext.convert(options)(undefined);
+ }
+
+ /**
+ * Create a converter function for `func` of `name`.
+ *
+ * @param {string} name The name of the function to convert.
+ * @param {Function} func The function to convert.
+ * @returns {Function} Returns the new converter function.
+ */
+ function createConverter(name, func) {
+ var realName = mapping.aliasToReal[name] || name,
+ methodName = mapping.remap[realName] || realName,
+ oldOptions = options;
+
+ return function(options) {
+ var newUtil = isLib ? pristine : helpers,
+ newFunc = isLib ? pristine[methodName] : func,
+ newOptions = assign(assign({}, oldOptions), options);
+
+ return baseConvert(newUtil, realName, newFunc, newOptions);
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke its iteratee, with up to `n`
+ * arguments, ignoring any additional arguments.
+ *
+ * @private
+ * @param {Function} func The function to cap iteratee arguments for.
+ * @param {number} n The arity cap.
+ * @returns {Function} Returns the new function.
+ */
+ function iterateeAry(func, n) {
+ return overArg(func, function(func) {
+ return typeof func == 'function' ? baseAry(func, n) : func;
+ });
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke its iteratee with arguments
+ * arranged according to the specified `indexes` where the argument value at
+ * the first index is provided as the first argument, the argument value at
+ * the second index is provided as the second argument, and so on.
+ *
+ * @private
+ * @param {Function} func The function to rearrange iteratee arguments for.
+ * @param {number[]} indexes The arranged argument indexes.
+ * @returns {Function} Returns the new function.
+ */
+ function iterateeRearg(func, indexes) {
+ return overArg(func, function(func) {
+ var n = indexes.length;
+ return baseArity(rearg(baseAry(func, n), indexes), n);
+ });
+ }
+
+ /**
+ * Creates a function that invokes `func` with its first argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overArg(func, transform) {
+ return function() {
+ var length = arguments.length;
+ if (!length) {
+ return func();
+ }
+ var args = Array(length);
+ while (length--) {
+ args[length] = arguments[length];
+ }
+ var index = config.rearg ? 0 : (length - 1);
+ args[index] = transform(args[index]);
+ return func.apply(undefined, args);
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` and applys the conversions
+ * rules by `name`.
+ *
+ * @private
+ * @param {string} name The name of the function to wrap.
+ * @param {Function} func The function to wrap.
+ * @returns {Function} Returns the converted function.
+ */
+ function wrap(name, func) {
+ var result,
+ realName = mapping.aliasToReal[name] || name,
+ wrapped = func,
+ wrapper = wrappers[realName];
+
+ if (wrapper) {
+ wrapped = wrapper(func);
+ }
+ else if (config.immutable) {
+ if (mapping.mutate.array[realName]) {
+ wrapped = wrapImmutable(func, cloneArray);
+ }
+ else if (mapping.mutate.object[realName]) {
+ wrapped = wrapImmutable(func, createCloner(func));
+ }
+ else if (mapping.mutate.set[realName]) {
+ wrapped = wrapImmutable(func, cloneByPath);
+ }
+ }
+ each(aryMethodKeys, function(aryKey) {
+ each(mapping.aryMethod[aryKey], function(otherName) {
+ if (realName == otherName) {
+ var spreadData = mapping.methodSpread[realName],
+ afterRearg = spreadData && spreadData.afterRearg;
+
+ result = afterRearg
+ ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey)
+ : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey);
+
+ result = castCap(realName, result);
+ result = castCurry(realName, result, aryKey);
+ return false;
+ }
+ });
+ return !result;
+ });
+
+ result || (result = wrapped);
+ if (result == func) {
+ result = forceCurry ? curry(result, 1) : function() {
+ return func.apply(this, arguments);
+ };
+ }
+ result.convert = createConverter(realName, func);
+ if (mapping.placeholder[realName]) {
+ setPlaceholder = true;
+ result.placeholder = func.placeholder = placeholder;
+ }
+ return result;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ if (!isObj) {
+ return wrap(name, func);
+ }
+ var _ = func;
+
+ // Convert methods by ary cap.
+ var pairs = [];
+ each(aryMethodKeys, function(aryKey) {
+ each(mapping.aryMethod[aryKey], function(key) {
+ var func = _[mapping.remap[key] || key];
+ if (func) {
+ pairs.push([key, wrap(key, func)]);
+ }
+ });
+ });
+
+ // Convert remaining methods.
+ each(keys(_), function(key) {
+ var func = _[key];
+ if (typeof func == 'function') {
+ var length = pairs.length;
+ while (length--) {
+ if (pairs[length][0] == key) {
+ return;
+ }
+ }
+ func.convert = createConverter(key, func);
+ pairs.push([key, func]);
+ }
+ });
+
+ // Assign to `_` leaving `_.prototype` unchanged to allow chaining.
+ each(pairs, function(pair) {
+ _[pair[0]] = pair[1];
+ });
+
+ _.convert = convertLib;
+ if (setPlaceholder) {
+ _.placeholder = placeholder;
+ }
+ // Assign aliases.
+ each(keys(_), function(key) {
+ each(mapping.realToAlias[key] || [], function(alias) {
+ _[alias] = _[key];
+ });
+ });
+
+ return _;
+}
+
+module.exports = baseConvert;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/_convertBrowser.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/_convertBrowser.js
new file mode 100644
index 0000000..bde030d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/_convertBrowser.js
@@ -0,0 +1,18 @@
+var baseConvert = require('./_baseConvert');
+
+/**
+ * Converts `lodash` to an immutable auto-curried iteratee-first data-last
+ * version with conversion `options` applied.
+ *
+ * @param {Function} lodash The lodash function to convert.
+ * @param {Object} [options] The options object. See `baseConvert` for more details.
+ * @returns {Function} Returns the converted `lodash`.
+ */
+function browserConvert(lodash, options) {
+ return baseConvert(lodash, lodash, options);
+}
+
+if (typeof _ == 'function' && typeof _.runInContext == 'function') {
+ _ = browserConvert(_.runInContext());
+}
+module.exports = browserConvert;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/_falseOptions.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/_falseOptions.js
new file mode 100644
index 0000000..773235e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/_falseOptions.js
@@ -0,0 +1,7 @@
+module.exports = {
+ 'cap': false,
+ 'curry': false,
+ 'fixed': false,
+ 'immutable': false,
+ 'rearg': false
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/_mapping.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/_mapping.js
new file mode 100644
index 0000000..cbbcd99
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/_mapping.js
@@ -0,0 +1,367 @@
+/** Used to map aliases to their real names. */
+exports.aliasToReal = {
+
+ // Lodash aliases.
+ 'each': 'forEach',
+ 'eachRight': 'forEachRight',
+ 'entries': 'toPairs',
+ 'entriesIn': 'toPairsIn',
+ 'extend': 'assignIn',
+ 'extendAll': 'assignInAll',
+ 'extendAllWith': 'assignInAllWith',
+ 'extendWith': 'assignInWith',
+ 'first': 'head',
+
+ // Methods that are curried variants of others.
+ 'conforms': 'conformsTo',
+ 'matches': 'isMatch',
+ 'property': 'get',
+
+ // Ramda aliases.
+ '__': 'placeholder',
+ 'F': 'stubFalse',
+ 'T': 'stubTrue',
+ 'all': 'every',
+ 'allPass': 'overEvery',
+ 'always': 'constant',
+ 'any': 'some',
+ 'anyPass': 'overSome',
+ 'apply': 'spread',
+ 'assoc': 'set',
+ 'assocPath': 'set',
+ 'complement': 'negate',
+ 'compose': 'flowRight',
+ 'contains': 'includes',
+ 'dissoc': 'unset',
+ 'dissocPath': 'unset',
+ 'dropLast': 'dropRight',
+ 'dropLastWhile': 'dropRightWhile',
+ 'equals': 'isEqual',
+ 'identical': 'eq',
+ 'indexBy': 'keyBy',
+ 'init': 'initial',
+ 'invertObj': 'invert',
+ 'juxt': 'over',
+ 'omitAll': 'omit',
+ 'nAry': 'ary',
+ 'path': 'get',
+ 'pathEq': 'matchesProperty',
+ 'pathOr': 'getOr',
+ 'paths': 'at',
+ 'pickAll': 'pick',
+ 'pipe': 'flow',
+ 'pluck': 'map',
+ 'prop': 'get',
+ 'propEq': 'matchesProperty',
+ 'propOr': 'getOr',
+ 'props': 'at',
+ 'symmetricDifference': 'xor',
+ 'symmetricDifferenceBy': 'xorBy',
+ 'symmetricDifferenceWith': 'xorWith',
+ 'takeLast': 'takeRight',
+ 'takeLastWhile': 'takeRightWhile',
+ 'unapply': 'rest',
+ 'unnest': 'flatten',
+ 'useWith': 'overArgs',
+ 'where': 'conformsTo',
+ 'whereEq': 'isMatch',
+ 'zipObj': 'zipObject'
+};
+
+/** Used to map ary to method names. */
+exports.aryMethod = {
+ '1': [
+ 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create',
+ 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow',
+ 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll',
+ 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse',
+ 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
+ 'uniqueId', 'words', 'zipAll'
+ ],
+ '2': [
+ 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith',
+ 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith',
+ 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN',
+ 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference',
+ 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq',
+ 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex',
+ 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach',
+ 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get',
+ 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection',
+ 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy',
+ 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty',
+ 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit',
+ 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial',
+ 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll',
+ 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',
+ 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',
+ 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',
+ 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',
+ 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',
+ 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',
+ 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',
+ 'zipObjectDeep'
+ ],
+ '3': [
+ 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
+ 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',
+ 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',
+ 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',
+ 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',
+ 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight',
+ 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy',
+ 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy',
+ 'xorWith', 'zipWith'
+ ],
+ '4': [
+ 'fill', 'setWith', 'updateWith'
+ ]
+};
+
+/** Used to map ary to rearg configs. */
+exports.aryRearg = {
+ '2': [1, 0],
+ '3': [2, 0, 1],
+ '4': [3, 2, 0, 1]
+};
+
+/** Used to map method names to their iteratee ary. */
+exports.iterateeAry = {
+ 'dropRightWhile': 1,
+ 'dropWhile': 1,
+ 'every': 1,
+ 'filter': 1,
+ 'find': 1,
+ 'findFrom': 1,
+ 'findIndex': 1,
+ 'findIndexFrom': 1,
+ 'findKey': 1,
+ 'findLast': 1,
+ 'findLastFrom': 1,
+ 'findLastIndex': 1,
+ 'findLastIndexFrom': 1,
+ 'findLastKey': 1,
+ 'flatMap': 1,
+ 'flatMapDeep': 1,
+ 'flatMapDepth': 1,
+ 'forEach': 1,
+ 'forEachRight': 1,
+ 'forIn': 1,
+ 'forInRight': 1,
+ 'forOwn': 1,
+ 'forOwnRight': 1,
+ 'map': 1,
+ 'mapKeys': 1,
+ 'mapValues': 1,
+ 'partition': 1,
+ 'reduce': 2,
+ 'reduceRight': 2,
+ 'reject': 1,
+ 'remove': 1,
+ 'some': 1,
+ 'takeRightWhile': 1,
+ 'takeWhile': 1,
+ 'times': 1,
+ 'transform': 2
+};
+
+/** Used to map method names to iteratee rearg configs. */
+exports.iterateeRearg = {
+ 'mapKeys': [1]
+};
+
+/** Used to map method names to rearg configs. */
+exports.methodRearg = {
+ 'assignInAllWith': [1, 0],
+ 'assignInWith': [1, 2, 0],
+ 'assignAllWith': [1, 0],
+ 'assignWith': [1, 2, 0],
+ 'differenceBy': [1, 2, 0],
+ 'differenceWith': [1, 2, 0],
+ 'getOr': [2, 1, 0],
+ 'intersectionBy': [1, 2, 0],
+ 'intersectionWith': [1, 2, 0],
+ 'isEqualWith': [1, 2, 0],
+ 'isMatchWith': [2, 1, 0],
+ 'mergeAllWith': [1, 0],
+ 'mergeWith': [1, 2, 0],
+ 'padChars': [2, 1, 0],
+ 'padCharsEnd': [2, 1, 0],
+ 'padCharsStart': [2, 1, 0],
+ 'pullAllBy': [2, 1, 0],
+ 'pullAllWith': [2, 1, 0],
+ 'rangeStep': [1, 2, 0],
+ 'rangeStepRight': [1, 2, 0],
+ 'setWith': [3, 1, 2, 0],
+ 'sortedIndexBy': [2, 1, 0],
+ 'sortedLastIndexBy': [2, 1, 0],
+ 'unionBy': [1, 2, 0],
+ 'unionWith': [1, 2, 0],
+ 'updateWith': [3, 1, 2, 0],
+ 'xorBy': [1, 2, 0],
+ 'xorWith': [1, 2, 0],
+ 'zipWith': [1, 2, 0]
+};
+
+/** Used to map method names to spread configs. */
+exports.methodSpread = {
+ 'assignAll': { 'start': 0 },
+ 'assignAllWith': { 'start': 0 },
+ 'assignInAll': { 'start': 0 },
+ 'assignInAllWith': { 'start': 0 },
+ 'defaultsAll': { 'start': 0 },
+ 'defaultsDeepAll': { 'start': 0 },
+ 'invokeArgs': { 'start': 2 },
+ 'invokeArgsMap': { 'start': 2 },
+ 'mergeAll': { 'start': 0 },
+ 'mergeAllWith': { 'start': 0 },
+ 'partial': { 'start': 1 },
+ 'partialRight': { 'start': 1 },
+ 'without': { 'start': 1 },
+ 'zipAll': { 'start': 0 }
+};
+
+/** Used to identify methods which mutate arrays or objects. */
+exports.mutate = {
+ 'array': {
+ 'fill': true,
+ 'pull': true,
+ 'pullAll': true,
+ 'pullAllBy': true,
+ 'pullAllWith': true,
+ 'pullAt': true,
+ 'remove': true,
+ 'reverse': true
+ },
+ 'object': {
+ 'assign': true,
+ 'assignAll': true,
+ 'assignAllWith': true,
+ 'assignIn': true,
+ 'assignInAll': true,
+ 'assignInAllWith': true,
+ 'assignInWith': true,
+ 'assignWith': true,
+ 'defaults': true,
+ 'defaultsAll': true,
+ 'defaultsDeep': true,
+ 'defaultsDeepAll': true,
+ 'merge': true,
+ 'mergeAll': true,
+ 'mergeAllWith': true,
+ 'mergeWith': true,
+ },
+ 'set': {
+ 'set': true,
+ 'setWith': true,
+ 'unset': true,
+ 'update': true,
+ 'updateWith': true
+ }
+};
+
+/** Used to track methods with placeholder support */
+exports.placeholder = {
+ 'bind': true,
+ 'bindKey': true,
+ 'curry': true,
+ 'curryRight': true,
+ 'partial': true,
+ 'partialRight': true
+};
+
+/** Used to map real names to their aliases. */
+exports.realToAlias = (function() {
+ var hasOwnProperty = Object.prototype.hasOwnProperty,
+ object = exports.aliasToReal,
+ result = {};
+
+ for (var key in object) {
+ var value = object[key];
+ if (hasOwnProperty.call(result, value)) {
+ result[value].push(key);
+ } else {
+ result[value] = [key];
+ }
+ }
+ return result;
+}());
+
+/** Used to map method names to other names. */
+exports.remap = {
+ 'assignAll': 'assign',
+ 'assignAllWith': 'assignWith',
+ 'assignInAll': 'assignIn',
+ 'assignInAllWith': 'assignInWith',
+ 'curryN': 'curry',
+ 'curryRightN': 'curryRight',
+ 'defaultsAll': 'defaults',
+ 'defaultsDeepAll': 'defaultsDeep',
+ 'findFrom': 'find',
+ 'findIndexFrom': 'findIndex',
+ 'findLastFrom': 'findLast',
+ 'findLastIndexFrom': 'findLastIndex',
+ 'getOr': 'get',
+ 'includesFrom': 'includes',
+ 'indexOfFrom': 'indexOf',
+ 'invokeArgs': 'invoke',
+ 'invokeArgsMap': 'invokeMap',
+ 'lastIndexOfFrom': 'lastIndexOf',
+ 'mergeAll': 'merge',
+ 'mergeAllWith': 'mergeWith',
+ 'padChars': 'pad',
+ 'padCharsEnd': 'padEnd',
+ 'padCharsStart': 'padStart',
+ 'propertyOf': 'get',
+ 'rangeStep': 'range',
+ 'rangeStepRight': 'rangeRight',
+ 'restFrom': 'rest',
+ 'spreadFrom': 'spread',
+ 'trimChars': 'trim',
+ 'trimCharsEnd': 'trimEnd',
+ 'trimCharsStart': 'trimStart',
+ 'zipAll': 'zip'
+};
+
+/** Used to track methods that skip fixing their arity. */
+exports.skipFixed = {
+ 'castArray': true,
+ 'flow': true,
+ 'flowRight': true,
+ 'iteratee': true,
+ 'mixin': true,
+ 'rearg': true,
+ 'runInContext': true
+};
+
+/** Used to track methods that skip rearranging arguments. */
+exports.skipRearg = {
+ 'add': true,
+ 'assign': true,
+ 'assignIn': true,
+ 'bind': true,
+ 'bindKey': true,
+ 'concat': true,
+ 'difference': true,
+ 'divide': true,
+ 'eq': true,
+ 'gt': true,
+ 'gte': true,
+ 'isEqual': true,
+ 'lt': true,
+ 'lte': true,
+ 'matchesProperty': true,
+ 'merge': true,
+ 'multiply': true,
+ 'overArgs': true,
+ 'partial': true,
+ 'partialRight': true,
+ 'propertyOf': true,
+ 'random': true,
+ 'range': true,
+ 'rangeRight': true,
+ 'subtract': true,
+ 'zip': true,
+ 'zipObject': true,
+ 'zipObjectDeep': true
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/_util.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/_util.js
new file mode 100644
index 0000000..7084463
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/_util.js
@@ -0,0 +1,14 @@
+module.exports = {
+ 'ary': require('../ary'),
+ 'assign': require('../_baseAssign'),
+ 'clone': require('../clone'),
+ 'curry': require('../curry'),
+ 'forEach': require('../_arrayEach'),
+ 'isArray': require('../isArray'),
+ 'isFunction': require('../isFunction'),
+ 'iteratee': require('../iteratee'),
+ 'keys': require('../_baseKeys'),
+ 'rearg': require('../rearg'),
+ 'toInteger': require('../toInteger'),
+ 'toPath': require('../toPath')
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/add.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/add.js
new file mode 100644
index 0000000..816eeec
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/add.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('add', require('../add'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/after.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/after.js
new file mode 100644
index 0000000..21a0167
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/after.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('after', require('../after'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/all.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/all.js
new file mode 100644
index 0000000..d0839f7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/all.js
@@ -0,0 +1 @@
+module.exports = require('./every');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/allPass.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/allPass.js
new file mode 100644
index 0000000..79b73ef
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/allPass.js
@@ -0,0 +1 @@
+module.exports = require('./overEvery');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/always.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/always.js
new file mode 100644
index 0000000..9887703
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/always.js
@@ -0,0 +1 @@
+module.exports = require('./constant');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/any.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/any.js
new file mode 100644
index 0000000..900ac25
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/any.js
@@ -0,0 +1 @@
+module.exports = require('./some');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/anyPass.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/anyPass.js
new file mode 100644
index 0000000..2774ab3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/anyPass.js
@@ -0,0 +1 @@
+module.exports = require('./overSome');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/apply.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/apply.js
new file mode 100644
index 0000000..2b75712
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/apply.js
@@ -0,0 +1 @@
+module.exports = require('./spread');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/array.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/array.js
new file mode 100644
index 0000000..fe939c2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/array.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../array'));
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/ary.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/ary.js
new file mode 100644
index 0000000..8edf187
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/ary.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('ary', require('../ary'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assign.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assign.js
new file mode 100644
index 0000000..23f47af
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assign.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assign', require('../assign'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignAll.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignAll.js
new file mode 100644
index 0000000..b1d36c7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assignAll', require('../assign'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignAllWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignAllWith.js
new file mode 100644
index 0000000..21e836e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignAllWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assignAllWith', require('../assignWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignIn.js
new file mode 100644
index 0000000..6e7c65f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignIn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assignIn', require('../assignIn'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignInAll.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignInAll.js
new file mode 100644
index 0000000..7ba75db
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignInAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assignInAll', require('../assignIn'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignInAllWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignInAllWith.js
new file mode 100644
index 0000000..e766903
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignInAllWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assignInAllWith', require('../assignInWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignInWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignInWith.js
new file mode 100644
index 0000000..acb5923
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignInWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assignInWith', require('../assignInWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignWith.js
new file mode 100644
index 0000000..eb92521
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assignWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assignWith', require('../assignWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assoc.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assoc.js
new file mode 100644
index 0000000..7648820
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assoc.js
@@ -0,0 +1 @@
+module.exports = require('./set');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assocPath.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assocPath.js
new file mode 100644
index 0000000..7648820
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/assocPath.js
@@ -0,0 +1 @@
+module.exports = require('./set');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/at.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/at.js
new file mode 100644
index 0000000..cc39d25
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/at.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('at', require('../at'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/attempt.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/attempt.js
new file mode 100644
index 0000000..26ca42e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/attempt.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('attempt', require('../attempt'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/before.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/before.js
new file mode 100644
index 0000000..7a2de65
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/before.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('before', require('../before'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/bind.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/bind.js
new file mode 100644
index 0000000..5cbe4f3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/bind.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('bind', require('../bind'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/bindAll.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/bindAll.js
new file mode 100644
index 0000000..6b4a4a0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/bindAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('bindAll', require('../bindAll'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/bindKey.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/bindKey.js
new file mode 100644
index 0000000..6a46c6b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/bindKey.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('bindKey', require('../bindKey'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/camelCase.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/camelCase.js
new file mode 100644
index 0000000..87b77b4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/camelCase.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('camelCase', require('../camelCase'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/capitalize.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/capitalize.js
new file mode 100644
index 0000000..cac74e1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/capitalize.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('capitalize', require('../capitalize'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/castArray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/castArray.js
new file mode 100644
index 0000000..8681c09
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/castArray.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('castArray', require('../castArray'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/ceil.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/ceil.js
new file mode 100644
index 0000000..f416b72
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/ceil.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('ceil', require('../ceil'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/chain.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/chain.js
new file mode 100644
index 0000000..604fe39
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/chain.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('chain', require('../chain'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/chunk.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/chunk.js
new file mode 100644
index 0000000..871ab08
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/chunk.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('chunk', require('../chunk'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/clamp.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/clamp.js
new file mode 100644
index 0000000..3b06c01
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/clamp.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('clamp', require('../clamp'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/clone.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/clone.js
new file mode 100644
index 0000000..cadb59c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/clone.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('clone', require('../clone'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/cloneDeep.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/cloneDeep.js
new file mode 100644
index 0000000..a6107aa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/cloneDeep.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('cloneDeep', require('../cloneDeep'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/cloneDeepWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/cloneDeepWith.js
new file mode 100644
index 0000000..6f01e44
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/cloneDeepWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('cloneDeepWith', require('../cloneDeepWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/cloneWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/cloneWith.js
new file mode 100644
index 0000000..aa88578
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/cloneWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('cloneWith', require('../cloneWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/collection.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/collection.js
new file mode 100644
index 0000000..fc8b328
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/collection.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../collection'));
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/commit.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/commit.js
new file mode 100644
index 0000000..130a894
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/commit.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('commit', require('../commit'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/compact.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/compact.js
new file mode 100644
index 0000000..ce8f7a1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/compact.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('compact', require('../compact'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/complement.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/complement.js
new file mode 100644
index 0000000..93eb462
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/complement.js
@@ -0,0 +1 @@
+module.exports = require('./negate');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/compose.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/compose.js
new file mode 100644
index 0000000..1954e94
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/compose.js
@@ -0,0 +1 @@
+module.exports = require('./flowRight');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/concat.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/concat.js
new file mode 100644
index 0000000..e59346a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/concat.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('concat', require('../concat'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/cond.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/cond.js
new file mode 100644
index 0000000..6a0120e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/cond.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('cond', require('../cond'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/conforms.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/conforms.js
new file mode 100644
index 0000000..3247f64
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/conforms.js
@@ -0,0 +1 @@
+module.exports = require('./conformsTo');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/conformsTo.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/conformsTo.js
new file mode 100644
index 0000000..aa7f41e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/conformsTo.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('conformsTo', require('../conformsTo'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/constant.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/constant.js
new file mode 100644
index 0000000..9e406fc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/constant.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('constant', require('../constant'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/contains.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/contains.js
new file mode 100644
index 0000000..594722a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/contains.js
@@ -0,0 +1 @@
+module.exports = require('./includes');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/convert.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/convert.js
new file mode 100644
index 0000000..4795dc4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/convert.js
@@ -0,0 +1,18 @@
+var baseConvert = require('./_baseConvert'),
+ util = require('./_util');
+
+/**
+ * Converts `func` of `name` to an immutable auto-curried iteratee-first data-last
+ * version with conversion `options` applied. If `name` is an object its methods
+ * will be converted.
+ *
+ * @param {string} name The name of the function to wrap.
+ * @param {Function} [func] The function to wrap.
+ * @param {Object} [options] The options object. See `baseConvert` for more details.
+ * @returns {Function|Object} Returns the converted function or object.
+ */
+function convert(name, func, options) {
+ return baseConvert(util, name, func, options);
+}
+
+module.exports = convert;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/countBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/countBy.js
new file mode 100644
index 0000000..dfa4643
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/countBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('countBy', require('../countBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/create.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/create.js
new file mode 100644
index 0000000..752025f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/create.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('create', require('../create'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/curry.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/curry.js
new file mode 100644
index 0000000..b0b4168
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/curry.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('curry', require('../curry'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/curryN.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/curryN.js
new file mode 100644
index 0000000..2ae7d00
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/curryN.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('curryN', require('../curry'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/curryRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/curryRight.js
new file mode 100644
index 0000000..cb619eb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/curryRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('curryRight', require('../curryRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/curryRightN.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/curryRightN.js
new file mode 100644
index 0000000..2495afc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/curryRightN.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('curryRightN', require('../curryRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/date.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/date.js
new file mode 100644
index 0000000..82cb952
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/date.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../date'));
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/debounce.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/debounce.js
new file mode 100644
index 0000000..2612229
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/debounce.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('debounce', require('../debounce'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/deburr.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/deburr.js
new file mode 100644
index 0000000..96463ab
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/deburr.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('deburr', require('../deburr'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defaultTo.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defaultTo.js
new file mode 100644
index 0000000..d6b52a4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defaultTo.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('defaultTo', require('../defaultTo'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defaults.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defaults.js
new file mode 100644
index 0000000..e1a8e6e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defaults.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('defaults', require('../defaults'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defaultsAll.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defaultsAll.js
new file mode 100644
index 0000000..238fcc3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defaultsAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('defaultsAll', require('../defaults'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defaultsDeep.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defaultsDeep.js
new file mode 100644
index 0000000..1f172ff
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defaultsDeep.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('defaultsDeep', require('../defaultsDeep'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defaultsDeepAll.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defaultsDeepAll.js
new file mode 100644
index 0000000..6835f2f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defaultsDeepAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('defaultsDeepAll', require('../defaultsDeep'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defer.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defer.js
new file mode 100644
index 0000000..ec7990f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/defer.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('defer', require('../defer'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/delay.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/delay.js
new file mode 100644
index 0000000..556dbd5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/delay.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('delay', require('../delay'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/difference.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/difference.js
new file mode 100644
index 0000000..2d03765
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/difference.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('difference', require('../difference'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/differenceBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/differenceBy.js
new file mode 100644
index 0000000..2f91491
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/differenceBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('differenceBy', require('../differenceBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/differenceWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/differenceWith.js
new file mode 100644
index 0000000..bcf5ad2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/differenceWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('differenceWith', require('../differenceWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dissoc.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dissoc.js
new file mode 100644
index 0000000..7ec7be1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dissoc.js
@@ -0,0 +1 @@
+module.exports = require('./unset');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dissocPath.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dissocPath.js
new file mode 100644
index 0000000..7ec7be1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dissocPath.js
@@ -0,0 +1 @@
+module.exports = require('./unset');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/divide.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/divide.js
new file mode 100644
index 0000000..82048c5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/divide.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('divide', require('../divide'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/drop.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/drop.js
new file mode 100644
index 0000000..2fa9b4f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/drop.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('drop', require('../drop'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dropLast.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dropLast.js
new file mode 100644
index 0000000..174e525
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dropLast.js
@@ -0,0 +1 @@
+module.exports = require('./dropRight');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dropLastWhile.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dropLastWhile.js
new file mode 100644
index 0000000..be2a9d2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dropLastWhile.js
@@ -0,0 +1 @@
+module.exports = require('./dropRightWhile');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dropRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dropRight.js
new file mode 100644
index 0000000..e98881f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dropRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('dropRight', require('../dropRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dropRightWhile.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dropRightWhile.js
new file mode 100644
index 0000000..cacaa70
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dropRightWhile.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('dropRightWhile', require('../dropRightWhile'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dropWhile.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dropWhile.js
new file mode 100644
index 0000000..285f864
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/dropWhile.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('dropWhile', require('../dropWhile'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/each.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/each.js
new file mode 100644
index 0000000..8800f42
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/each.js
@@ -0,0 +1 @@
+module.exports = require('./forEach');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/eachRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/eachRight.js
new file mode 100644
index 0000000..3252b2a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/eachRight.js
@@ -0,0 +1 @@
+module.exports = require('./forEachRight');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/endsWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/endsWith.js
new file mode 100644
index 0000000..17dc2a4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/endsWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('endsWith', require('../endsWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/entries.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/entries.js
new file mode 100644
index 0000000..7a88df2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/entries.js
@@ -0,0 +1 @@
+module.exports = require('./toPairs');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/entriesIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/entriesIn.js
new file mode 100644
index 0000000..f6c6331
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/entriesIn.js
@@ -0,0 +1 @@
+module.exports = require('./toPairsIn');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/eq.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/eq.js
new file mode 100644
index 0000000..9a3d21b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/eq.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('eq', require('../eq'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/equals.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/equals.js
new file mode 100644
index 0000000..e6a5ce0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/equals.js
@@ -0,0 +1 @@
+module.exports = require('./isEqual');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/escape.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/escape.js
new file mode 100644
index 0000000..52c1fbb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/escape.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('escape', require('../escape'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/escapeRegExp.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/escapeRegExp.js
new file mode 100644
index 0000000..369b2ef
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/escapeRegExp.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('escapeRegExp', require('../escapeRegExp'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/every.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/every.js
new file mode 100644
index 0000000..95c2776
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/every.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('every', require('../every'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/extend.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/extend.js
new file mode 100644
index 0000000..e00166c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/extend.js
@@ -0,0 +1 @@
+module.exports = require('./assignIn');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/extendAll.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/extendAll.js
new file mode 100644
index 0000000..cc55b64
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/extendAll.js
@@ -0,0 +1 @@
+module.exports = require('./assignInAll');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/extendAllWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/extendAllWith.js
new file mode 100644
index 0000000..6679d20
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/extendAllWith.js
@@ -0,0 +1 @@
+module.exports = require('./assignInAllWith');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/extendWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/extendWith.js
new file mode 100644
index 0000000..dbdcb3b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/extendWith.js
@@ -0,0 +1 @@
+module.exports = require('./assignInWith');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/fill.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/fill.js
new file mode 100644
index 0000000..b2d47e8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/fill.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('fill', require('../fill'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/filter.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/filter.js
new file mode 100644
index 0000000..796d501
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/filter.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('filter', require('../filter'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/find.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/find.js
new file mode 100644
index 0000000..f805d33
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/find.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('find', require('../find'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findFrom.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findFrom.js
new file mode 100644
index 0000000..da8275e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findFrom', require('../find'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findIndex.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findIndex.js
new file mode 100644
index 0000000..8c15fd1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findIndex.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findIndex', require('../findIndex'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findIndexFrom.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findIndexFrom.js
new file mode 100644
index 0000000..32e98cb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findIndexFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findIndexFrom', require('../findIndex'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findKey.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findKey.js
new file mode 100644
index 0000000..475bcfa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findKey.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findKey', require('../findKey'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findLast.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findLast.js
new file mode 100644
index 0000000..093fe94
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findLast.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findLast', require('../findLast'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findLastFrom.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findLastFrom.js
new file mode 100644
index 0000000..76c38fb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findLastFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findLastFrom', require('../findLast'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findLastIndex.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findLastIndex.js
new file mode 100644
index 0000000..36986df
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findLastIndex.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findLastIndex', require('../findLastIndex'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findLastIndexFrom.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findLastIndexFrom.js
new file mode 100644
index 0000000..34c8176
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findLastIndexFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findLastIndexFrom', require('../findLastIndex'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findLastKey.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findLastKey.js
new file mode 100644
index 0000000..5f81b60
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/findLastKey.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findLastKey', require('../findLastKey'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/first.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/first.js
new file mode 100644
index 0000000..53f4ad1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/first.js
@@ -0,0 +1 @@
+module.exports = require('./head');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flatMap.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flatMap.js
new file mode 100644
index 0000000..d01dc4d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flatMap.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flatMap', require('../flatMap'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flatMapDeep.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flatMapDeep.js
new file mode 100644
index 0000000..569c42e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flatMapDeep.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flatMapDeep', require('../flatMapDeep'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flatMapDepth.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flatMapDepth.js
new file mode 100644
index 0000000..6eb68fd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flatMapDepth.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flatMapDepth', require('../flatMapDepth'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flatten.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flatten.js
new file mode 100644
index 0000000..30425d8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flatten.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flatten', require('../flatten'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flattenDeep.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flattenDeep.js
new file mode 100644
index 0000000..aed5db2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flattenDeep.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flattenDeep', require('../flattenDeep'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flattenDepth.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flattenDepth.js
new file mode 100644
index 0000000..ad65e37
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flattenDepth.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flattenDepth', require('../flattenDepth'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flip.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flip.js
new file mode 100644
index 0000000..0547e7b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flip.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flip', require('../flip'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/floor.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/floor.js
new file mode 100644
index 0000000..a6cf335
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/floor.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('floor', require('../floor'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flow.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flow.js
new file mode 100644
index 0000000..cd83677
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flow.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flow', require('../flow'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flowRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flowRight.js
new file mode 100644
index 0000000..972a5b9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/flowRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flowRight', require('../flowRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forEach.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forEach.js
new file mode 100644
index 0000000..2f49452
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forEach.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('forEach', require('../forEach'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forEachRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forEachRight.js
new file mode 100644
index 0000000..3ff9733
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forEachRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('forEachRight', require('../forEachRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forIn.js
new file mode 100644
index 0000000..9341749
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forIn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('forIn', require('../forIn'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forInRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forInRight.js
new file mode 100644
index 0000000..cecf8bb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forInRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('forInRight', require('../forInRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forOwn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forOwn.js
new file mode 100644
index 0000000..246449e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forOwn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('forOwn', require('../forOwn'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forOwnRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forOwnRight.js
new file mode 100644
index 0000000..c5e826e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/forOwnRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('forOwnRight', require('../forOwnRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/fromPairs.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/fromPairs.js
new file mode 100644
index 0000000..f8cc596
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/fromPairs.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('fromPairs', require('../fromPairs'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/function.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/function.js
new file mode 100644
index 0000000..dfe69b1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/function.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../function'));
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/functions.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/functions.js
new file mode 100644
index 0000000..09d1bb1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/functions.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('functions', require('../functions'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/functionsIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/functionsIn.js
new file mode 100644
index 0000000..2cfeb83
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/functionsIn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('functionsIn', require('../functionsIn'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/get.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/get.js
new file mode 100644
index 0000000..6d3a328
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/get.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('get', require('../get'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/getOr.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/getOr.js
new file mode 100644
index 0000000..7dbf771
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/getOr.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('getOr', require('../get'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/groupBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/groupBy.js
new file mode 100644
index 0000000..fc0bc78
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/groupBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('groupBy', require('../groupBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/gt.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/gt.js
new file mode 100644
index 0000000..9e57c80
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/gt.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('gt', require('../gt'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/gte.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/gte.js
new file mode 100644
index 0000000..4584786
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/gte.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('gte', require('../gte'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/has.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/has.js
new file mode 100644
index 0000000..b901298
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/has.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('has', require('../has'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/hasIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/hasIn.js
new file mode 100644
index 0000000..b3c3d1a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/hasIn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('hasIn', require('../hasIn'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/head.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/head.js
new file mode 100644
index 0000000..2694f0a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/head.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('head', require('../head'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/identical.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/identical.js
new file mode 100644
index 0000000..85563f4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/identical.js
@@ -0,0 +1 @@
+module.exports = require('./eq');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/identity.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/identity.js
new file mode 100644
index 0000000..096415a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/identity.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('identity', require('../identity'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/inRange.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/inRange.js
new file mode 100644
index 0000000..202d940
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/inRange.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('inRange', require('../inRange'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/includes.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/includes.js
new file mode 100644
index 0000000..1146780
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/includes.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('includes', require('../includes'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/includesFrom.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/includesFrom.js
new file mode 100644
index 0000000..683afdb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/includesFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('includesFrom', require('../includes'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/indexBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/indexBy.js
new file mode 100644
index 0000000..7e64bc0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/indexBy.js
@@ -0,0 +1 @@
+module.exports = require('./keyBy');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/indexOf.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/indexOf.js
new file mode 100644
index 0000000..524658e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/indexOf.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('indexOf', require('../indexOf'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/indexOfFrom.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/indexOfFrom.js
new file mode 100644
index 0000000..d99c822
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/indexOfFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('indexOfFrom', require('../indexOf'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/init.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/init.js
new file mode 100644
index 0000000..2f88d8b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/init.js
@@ -0,0 +1 @@
+module.exports = require('./initial');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/initial.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/initial.js
new file mode 100644
index 0000000..b732ba0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/initial.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('initial', require('../initial'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/intersection.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/intersection.js
new file mode 100644
index 0000000..52936d5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/intersection.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('intersection', require('../intersection'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/intersectionBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/intersectionBy.js
new file mode 100644
index 0000000..72629f2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/intersectionBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('intersectionBy', require('../intersectionBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/intersectionWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/intersectionWith.js
new file mode 100644
index 0000000..e064f40
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/intersectionWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('intersectionWith', require('../intersectionWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invert.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invert.js
new file mode 100644
index 0000000..2d5d1f0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invert.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('invert', require('../invert'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invertBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invertBy.js
new file mode 100644
index 0000000..63ca97e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invertBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('invertBy', require('../invertBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invertObj.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invertObj.js
new file mode 100644
index 0000000..f1d842e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invertObj.js
@@ -0,0 +1 @@
+module.exports = require('./invert');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invoke.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invoke.js
new file mode 100644
index 0000000..fcf17f0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invoke.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('invoke', require('../invoke'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invokeArgs.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invokeArgs.js
new file mode 100644
index 0000000..d3f2953
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invokeArgs.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('invokeArgs', require('../invoke'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invokeArgsMap.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invokeArgsMap.js
new file mode 100644
index 0000000..eaa9f84
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invokeArgsMap.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('invokeArgsMap', require('../invokeMap'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invokeMap.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invokeMap.js
new file mode 100644
index 0000000..6515fd7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/invokeMap.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('invokeMap', require('../invokeMap'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isArguments.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isArguments.js
new file mode 100644
index 0000000..1d93c9e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isArguments.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isArguments', require('../isArguments'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isArray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isArray.js
new file mode 100644
index 0000000..ba7ade8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isArray.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isArray', require('../isArray'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isArrayBuffer.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isArrayBuffer.js
new file mode 100644
index 0000000..5088513
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isArrayBuffer.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isArrayBuffer', require('../isArrayBuffer'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isArrayLike.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isArrayLike.js
new file mode 100644
index 0000000..8f1856b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isArrayLike.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isArrayLike', require('../isArrayLike'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isArrayLikeObject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isArrayLikeObject.js
new file mode 100644
index 0000000..2108498
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isArrayLikeObject.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isArrayLikeObject', require('../isArrayLikeObject'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isBoolean.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isBoolean.js
new file mode 100644
index 0000000..9339f75
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isBoolean.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isBoolean', require('../isBoolean'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isBuffer.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isBuffer.js
new file mode 100644
index 0000000..e60b123
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isBuffer.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isBuffer', require('../isBuffer'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isDate.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isDate.js
new file mode 100644
index 0000000..dc41d08
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isDate.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isDate', require('../isDate'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isElement.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isElement.js
new file mode 100644
index 0000000..18ee039
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isElement.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isElement', require('../isElement'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isEmpty.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isEmpty.js
new file mode 100644
index 0000000..0f4ae84
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isEmpty.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isEmpty', require('../isEmpty'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isEqual.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isEqual.js
new file mode 100644
index 0000000..4138386
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isEqual.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isEqual', require('../isEqual'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isEqualWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isEqualWith.js
new file mode 100644
index 0000000..029ff5c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isEqualWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isEqualWith', require('../isEqualWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isError.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isError.js
new file mode 100644
index 0000000..3dfd81c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isError.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isError', require('../isError'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isFinite.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isFinite.js
new file mode 100644
index 0000000..0b647b8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isFinite.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isFinite', require('../isFinite'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isFunction.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isFunction.js
new file mode 100644
index 0000000..ff8e5c4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isFunction.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isFunction', require('../isFunction'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isInteger.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isInteger.js
new file mode 100644
index 0000000..67af4ff
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isInteger.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isInteger', require('../isInteger'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isLength.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isLength.js
new file mode 100644
index 0000000..fc101c5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isLength.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isLength', require('../isLength'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isMap.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isMap.js
new file mode 100644
index 0000000..a209aa6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isMap.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isMap', require('../isMap'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isMatch.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isMatch.js
new file mode 100644
index 0000000..6264ca1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isMatch.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isMatch', require('../isMatch'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isMatchWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isMatchWith.js
new file mode 100644
index 0000000..d95f319
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isMatchWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isMatchWith', require('../isMatchWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isNaN.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isNaN.js
new file mode 100644
index 0000000..66a978f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isNaN.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isNaN', require('../isNaN'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isNative.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isNative.js
new file mode 100644
index 0000000..3d775ba
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isNative.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isNative', require('../isNative'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isNil.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isNil.js
new file mode 100644
index 0000000..5952c02
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isNil.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isNil', require('../isNil'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isNull.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isNull.js
new file mode 100644
index 0000000..f201a35
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isNull.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isNull', require('../isNull'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isNumber.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isNumber.js
new file mode 100644
index 0000000..a2b5fa0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isNumber.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isNumber', require('../isNumber'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isObject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isObject.js
new file mode 100644
index 0000000..231ace0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isObject.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isObject', require('../isObject'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isObjectLike.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isObjectLike.js
new file mode 100644
index 0000000..f16082e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isObjectLike.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isObjectLike', require('../isObjectLike'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isPlainObject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isPlainObject.js
new file mode 100644
index 0000000..b5bea90
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isPlainObject.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isPlainObject', require('../isPlainObject'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isRegExp.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isRegExp.js
new file mode 100644
index 0000000..12a1a3d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isRegExp.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isRegExp', require('../isRegExp'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isSafeInteger.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isSafeInteger.js
new file mode 100644
index 0000000..7230f55
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isSafeInteger.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isSafeInteger', require('../isSafeInteger'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isSet.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isSet.js
new file mode 100644
index 0000000..35c01f6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isSet.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isSet', require('../isSet'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isString.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isString.js
new file mode 100644
index 0000000..1fd0679
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isString.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isString', require('../isString'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isSymbol.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isSymbol.js
new file mode 100644
index 0000000..3867695
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isSymbol.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isSymbol', require('../isSymbol'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isTypedArray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isTypedArray.js
new file mode 100644
index 0000000..8567953
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isTypedArray.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isTypedArray', require('../isTypedArray'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isUndefined.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isUndefined.js
new file mode 100644
index 0000000..ddbca31
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isUndefined.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isUndefined', require('../isUndefined'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isWeakMap.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isWeakMap.js
new file mode 100644
index 0000000..ef60c61
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isWeakMap.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isWeakMap', require('../isWeakMap'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isWeakSet.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isWeakSet.js
new file mode 100644
index 0000000..c99bfaa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/isWeakSet.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isWeakSet', require('../isWeakSet'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/iteratee.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/iteratee.js
new file mode 100644
index 0000000..9f0f717
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/iteratee.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('iteratee', require('../iteratee'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/join.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/join.js
new file mode 100644
index 0000000..a220e00
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/join.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('join', require('../join'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/juxt.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/juxt.js
new file mode 100644
index 0000000..f71e04e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/juxt.js
@@ -0,0 +1 @@
+module.exports = require('./over');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/kebabCase.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/kebabCase.js
new file mode 100644
index 0000000..60737f1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/kebabCase.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('kebabCase', require('../kebabCase'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/keyBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/keyBy.js
new file mode 100644
index 0000000..9a6a85d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/keyBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('keyBy', require('../keyBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/keys.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/keys.js
new file mode 100644
index 0000000..e12bb07
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/keys.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('keys', require('../keys'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/keysIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/keysIn.js
new file mode 100644
index 0000000..f3eb36a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/keysIn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('keysIn', require('../keysIn'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lang.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lang.js
new file mode 100644
index 0000000..08cc9c1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lang.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../lang'));
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/last.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/last.js
new file mode 100644
index 0000000..0f71699
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/last.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('last', require('../last'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lastIndexOf.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lastIndexOf.js
new file mode 100644
index 0000000..ddf39c3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lastIndexOf.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('lastIndexOf', require('../lastIndexOf'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lastIndexOfFrom.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lastIndexOfFrom.js
new file mode 100644
index 0000000..1ff6a0b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lastIndexOfFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('lastIndexOfFrom', require('../lastIndexOf'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lowerCase.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lowerCase.js
new file mode 100644
index 0000000..ea64bc1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lowerCase.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('lowerCase', require('../lowerCase'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lowerFirst.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lowerFirst.js
new file mode 100644
index 0000000..539720a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lowerFirst.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('lowerFirst', require('../lowerFirst'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lt.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lt.js
new file mode 100644
index 0000000..a31d21e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lt.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('lt', require('../lt'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lte.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lte.js
new file mode 100644
index 0000000..d795d10
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/lte.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('lte', require('../lte'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/map.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/map.js
new file mode 100644
index 0000000..cf98794
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/map.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('map', require('../map'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mapKeys.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mapKeys.js
new file mode 100644
index 0000000..1684587
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mapKeys.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('mapKeys', require('../mapKeys'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mapValues.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mapValues.js
new file mode 100644
index 0000000..4004972
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mapValues.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('mapValues', require('../mapValues'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/matches.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/matches.js
new file mode 100644
index 0000000..29d1e1e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/matches.js
@@ -0,0 +1 @@
+module.exports = require('./isMatch');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/matchesProperty.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/matchesProperty.js
new file mode 100644
index 0000000..4575bd2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/matchesProperty.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('matchesProperty', require('../matchesProperty'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/math.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/math.js
new file mode 100644
index 0000000..e8f50f7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/math.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../math'));
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/max.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/max.js
new file mode 100644
index 0000000..a66acac
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/max.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('max', require('../max'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/maxBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/maxBy.js
new file mode 100644
index 0000000..d083fd6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/maxBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('maxBy', require('../maxBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mean.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mean.js
new file mode 100644
index 0000000..3117246
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mean.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('mean', require('../mean'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/meanBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/meanBy.js
new file mode 100644
index 0000000..556f25e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/meanBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('meanBy', require('../meanBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/memoize.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/memoize.js
new file mode 100644
index 0000000..638eec6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/memoize.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('memoize', require('../memoize'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/merge.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/merge.js
new file mode 100644
index 0000000..ac66add
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/merge.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('merge', require('../merge'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mergeAll.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mergeAll.js
new file mode 100644
index 0000000..a3674d6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mergeAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('mergeAll', require('../merge'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mergeAllWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mergeAllWith.js
new file mode 100644
index 0000000..4bd4206
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mergeAllWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('mergeAllWith', require('../mergeWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mergeWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mergeWith.js
new file mode 100644
index 0000000..00d44d5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mergeWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('mergeWith', require('../mergeWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/method.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/method.js
new file mode 100644
index 0000000..f4060c6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/method.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('method', require('../method'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/methodOf.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/methodOf.js
new file mode 100644
index 0000000..6139905
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/methodOf.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('methodOf', require('../methodOf'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/min.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/min.js
new file mode 100644
index 0000000..d12c6b4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/min.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('min', require('../min'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/minBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/minBy.js
new file mode 100644
index 0000000..fdb9e24
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/minBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('minBy', require('../minBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mixin.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mixin.js
new file mode 100644
index 0000000..332e6fb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/mixin.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('mixin', require('../mixin'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/multiply.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/multiply.js
new file mode 100644
index 0000000..4dcf0b0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/multiply.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('multiply', require('../multiply'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/nAry.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/nAry.js
new file mode 100644
index 0000000..f262a76
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/nAry.js
@@ -0,0 +1 @@
+module.exports = require('./ary');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/negate.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/negate.js
new file mode 100644
index 0000000..8b6dc7c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/negate.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('negate', require('../negate'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/next.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/next.js
new file mode 100644
index 0000000..140155e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/next.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('next', require('../next'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/noop.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/noop.js
new file mode 100644
index 0000000..b9e32cc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/noop.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('noop', require('../noop'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/now.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/now.js
new file mode 100644
index 0000000..6de2068
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/now.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('now', require('../now'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/nth.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/nth.js
new file mode 100644
index 0000000..da4fda7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/nth.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('nth', require('../nth'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/nthArg.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/nthArg.js
new file mode 100644
index 0000000..fce3165
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/nthArg.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('nthArg', require('../nthArg'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/number.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/number.js
new file mode 100644
index 0000000..5c10b88
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/number.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../number'));
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/object.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/object.js
new file mode 100644
index 0000000..ae39a13
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/object.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../object'));
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/omit.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/omit.js
new file mode 100644
index 0000000..fd68529
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/omit.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('omit', require('../omit'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/omitAll.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/omitAll.js
new file mode 100644
index 0000000..144cf4b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/omitAll.js
@@ -0,0 +1 @@
+module.exports = require('./omit');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/omitBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/omitBy.js
new file mode 100644
index 0000000..90df738
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/omitBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('omitBy', require('../omitBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/once.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/once.js
new file mode 100644
index 0000000..f8f0a5c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/once.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('once', require('../once'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/orderBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/orderBy.js
new file mode 100644
index 0000000..848e210
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/orderBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('orderBy', require('../orderBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/over.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/over.js
new file mode 100644
index 0000000..01eba7b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/over.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('over', require('../over'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/overArgs.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/overArgs.js
new file mode 100644
index 0000000..738556f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/overArgs.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('overArgs', require('../overArgs'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/overEvery.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/overEvery.js
new file mode 100644
index 0000000..9f5a032
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/overEvery.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('overEvery', require('../overEvery'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/overSome.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/overSome.js
new file mode 100644
index 0000000..15939d5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/overSome.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('overSome', require('../overSome'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pad.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pad.js
new file mode 100644
index 0000000..f1dea4a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pad.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pad', require('../pad'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/padChars.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/padChars.js
new file mode 100644
index 0000000..d6e0804
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/padChars.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('padChars', require('../pad'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/padCharsEnd.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/padCharsEnd.js
new file mode 100644
index 0000000..d4ab79a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/padCharsEnd.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('padCharsEnd', require('../padEnd'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/padCharsStart.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/padCharsStart.js
new file mode 100644
index 0000000..a08a300
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/padCharsStart.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('padCharsStart', require('../padStart'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/padEnd.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/padEnd.js
new file mode 100644
index 0000000..a8522ec
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/padEnd.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('padEnd', require('../padEnd'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/padStart.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/padStart.js
new file mode 100644
index 0000000..f4ca79d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/padStart.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('padStart', require('../padStart'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/parseInt.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/parseInt.js
new file mode 100644
index 0000000..27314cc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/parseInt.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('parseInt', require('../parseInt'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/partial.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/partial.js
new file mode 100644
index 0000000..5d46015
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/partial.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('partial', require('../partial'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/partialRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/partialRight.js
new file mode 100644
index 0000000..7f05fed
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/partialRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('partialRight', require('../partialRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/partition.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/partition.js
new file mode 100644
index 0000000..2ebcacc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/partition.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('partition', require('../partition'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/path.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/path.js
new file mode 100644
index 0000000..b29cfb2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/path.js
@@ -0,0 +1 @@
+module.exports = require('./get');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pathEq.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pathEq.js
new file mode 100644
index 0000000..36c027a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pathEq.js
@@ -0,0 +1 @@
+module.exports = require('./matchesProperty');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pathOr.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pathOr.js
new file mode 100644
index 0000000..4ab5820
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pathOr.js
@@ -0,0 +1 @@
+module.exports = require('./getOr');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/paths.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/paths.js
new file mode 100644
index 0000000..1eb7950
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/paths.js
@@ -0,0 +1 @@
+module.exports = require('./at');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pick.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pick.js
new file mode 100644
index 0000000..197393d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pick.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pick', require('../pick'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pickAll.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pickAll.js
new file mode 100644
index 0000000..a8ecd46
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pickAll.js
@@ -0,0 +1 @@
+module.exports = require('./pick');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pickBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pickBy.js
new file mode 100644
index 0000000..d832d16
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pickBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pickBy', require('../pickBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pipe.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pipe.js
new file mode 100644
index 0000000..b2e1e2c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pipe.js
@@ -0,0 +1 @@
+module.exports = require('./flow');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/placeholder.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/placeholder.js
new file mode 100644
index 0000000..1ce1739
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/placeholder.js
@@ -0,0 +1,6 @@
+/**
+ * The default argument placeholder value for methods.
+ *
+ * @type {Object}
+ */
+module.exports = {};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/plant.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/plant.js
new file mode 100644
index 0000000..eca8f32
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/plant.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('plant', require('../plant'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pluck.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pluck.js
new file mode 100644
index 0000000..0d1e1ab
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pluck.js
@@ -0,0 +1 @@
+module.exports = require('./map');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/prop.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/prop.js
new file mode 100644
index 0000000..b29cfb2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/prop.js
@@ -0,0 +1 @@
+module.exports = require('./get');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/propEq.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/propEq.js
new file mode 100644
index 0000000..36c027a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/propEq.js
@@ -0,0 +1 @@
+module.exports = require('./matchesProperty');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/propOr.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/propOr.js
new file mode 100644
index 0000000..4ab5820
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/propOr.js
@@ -0,0 +1 @@
+module.exports = require('./getOr');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/property.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/property.js
new file mode 100644
index 0000000..b29cfb2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/property.js
@@ -0,0 +1 @@
+module.exports = require('./get');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/propertyOf.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/propertyOf.js
new file mode 100644
index 0000000..f6273ee
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/propertyOf.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('propertyOf', require('../get'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/props.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/props.js
new file mode 100644
index 0000000..1eb7950
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/props.js
@@ -0,0 +1 @@
+module.exports = require('./at');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pull.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pull.js
new file mode 100644
index 0000000..8d7084f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pull.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pull', require('../pull'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pullAll.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pullAll.js
new file mode 100644
index 0000000..98d5c9a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pullAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pullAll', require('../pullAll'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pullAllBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pullAllBy.js
new file mode 100644
index 0000000..876bc3b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pullAllBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pullAllBy', require('../pullAllBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pullAllWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pullAllWith.js
new file mode 100644
index 0000000..f71ba4d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pullAllWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pullAllWith', require('../pullAllWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pullAt.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pullAt.js
new file mode 100644
index 0000000..e8b3bb6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/pullAt.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pullAt', require('../pullAt'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/random.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/random.js
new file mode 100644
index 0000000..99d852e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/random.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('random', require('../random'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/range.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/range.js
new file mode 100644
index 0000000..a6bb591
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/range.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('range', require('../range'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/rangeRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/rangeRight.js
new file mode 100644
index 0000000..fdb712f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/rangeRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('rangeRight', require('../rangeRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/rangeStep.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/rangeStep.js
new file mode 100644
index 0000000..d72dfc2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/rangeStep.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('rangeStep', require('../range'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/rangeStepRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/rangeStepRight.js
new file mode 100644
index 0000000..8b2a67b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/rangeStepRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('rangeStepRight', require('../rangeRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/rearg.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/rearg.js
new file mode 100644
index 0000000..678e02a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/rearg.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('rearg', require('../rearg'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/reduce.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/reduce.js
new file mode 100644
index 0000000..4cef0a0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/reduce.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('reduce', require('../reduce'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/reduceRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/reduceRight.js
new file mode 100644
index 0000000..caf5bb5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/reduceRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('reduceRight', require('../reduceRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/reject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/reject.js
new file mode 100644
index 0000000..c163273
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/reject.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('reject', require('../reject'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/remove.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/remove.js
new file mode 100644
index 0000000..e9d1327
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/remove.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('remove', require('../remove'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/repeat.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/repeat.js
new file mode 100644
index 0000000..08470f2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/repeat.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('repeat', require('../repeat'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/replace.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/replace.js
new file mode 100644
index 0000000..2227db6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/replace.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('replace', require('../replace'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/rest.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/rest.js
new file mode 100644
index 0000000..c1f3d64
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/rest.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('rest', require('../rest'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/restFrom.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/restFrom.js
new file mode 100644
index 0000000..714e42b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/restFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('restFrom', require('../rest'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/result.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/result.js
new file mode 100644
index 0000000..f86ce07
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/result.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('result', require('../result'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/reverse.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/reverse.js
new file mode 100644
index 0000000..07c9f5e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/reverse.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('reverse', require('../reverse'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/round.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/round.js
new file mode 100644
index 0000000..4c0e5c8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/round.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('round', require('../round'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sample.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sample.js
new file mode 100644
index 0000000..6bea125
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sample.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sample', require('../sample'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sampleSize.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sampleSize.js
new file mode 100644
index 0000000..359ed6f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sampleSize.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sampleSize', require('../sampleSize'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/seq.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/seq.js
new file mode 100644
index 0000000..d8f42b0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/seq.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../seq'));
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/set.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/set.js
new file mode 100644
index 0000000..0b56a56
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/set.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('set', require('../set'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/setWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/setWith.js
new file mode 100644
index 0000000..0b58495
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/setWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('setWith', require('../setWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/shuffle.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/shuffle.js
new file mode 100644
index 0000000..aa3a1ca
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/shuffle.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('shuffle', require('../shuffle'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/size.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/size.js
new file mode 100644
index 0000000..7490136
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/size.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('size', require('../size'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/slice.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/slice.js
new file mode 100644
index 0000000..15945d3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/slice.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('slice', require('../slice'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/snakeCase.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/snakeCase.js
new file mode 100644
index 0000000..a0ff780
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/snakeCase.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('snakeCase', require('../snakeCase'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/some.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/some.js
new file mode 100644
index 0000000..a4fa2d0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/some.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('some', require('../some'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortBy.js
new file mode 100644
index 0000000..e0790ad
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortBy', require('../sortBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedIndex.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedIndex.js
new file mode 100644
index 0000000..364a054
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedIndex.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedIndex', require('../sortedIndex'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedIndexBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedIndexBy.js
new file mode 100644
index 0000000..9593dbd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedIndexBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedIndexBy', require('../sortedIndexBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedIndexOf.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedIndexOf.js
new file mode 100644
index 0000000..c9084ca
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedIndexOf.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedIndexOf', require('../sortedIndexOf'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedLastIndex.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedLastIndex.js
new file mode 100644
index 0000000..47fe241
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedLastIndex.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedLastIndex', require('../sortedLastIndex'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedLastIndexBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedLastIndexBy.js
new file mode 100644
index 0000000..0f9a347
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedLastIndexBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedLastIndexBy', require('../sortedLastIndexBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedLastIndexOf.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedLastIndexOf.js
new file mode 100644
index 0000000..0d4d932
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedLastIndexOf.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedLastIndexOf', require('../sortedLastIndexOf'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedUniq.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedUniq.js
new file mode 100644
index 0000000..882d283
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedUniq.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedUniq', require('../sortedUniq'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedUniqBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedUniqBy.js
new file mode 100644
index 0000000..033db91
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sortedUniqBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedUniqBy', require('../sortedUniqBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/split.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/split.js
new file mode 100644
index 0000000..14de1a7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/split.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('split', require('../split'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/spread.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/spread.js
new file mode 100644
index 0000000..2d11b70
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/spread.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('spread', require('../spread'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/spreadFrom.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/spreadFrom.js
new file mode 100644
index 0000000..0b630df
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/spreadFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('spreadFrom', require('../spread'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/startCase.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/startCase.js
new file mode 100644
index 0000000..ada98c9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/startCase.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('startCase', require('../startCase'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/startsWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/startsWith.js
new file mode 100644
index 0000000..985e2f2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/startsWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('startsWith', require('../startsWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/string.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/string.js
new file mode 100644
index 0000000..773b037
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/string.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../string'));
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/stubArray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/stubArray.js
new file mode 100644
index 0000000..cd604cb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/stubArray.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('stubArray', require('../stubArray'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/stubFalse.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/stubFalse.js
new file mode 100644
index 0000000..3296664
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/stubFalse.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('stubFalse', require('../stubFalse'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/stubObject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/stubObject.js
new file mode 100644
index 0000000..c6c8ec4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/stubObject.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('stubObject', require('../stubObject'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/stubString.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/stubString.js
new file mode 100644
index 0000000..701051e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/stubString.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('stubString', require('../stubString'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/stubTrue.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/stubTrue.js
new file mode 100644
index 0000000..9249082
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/stubTrue.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('stubTrue', require('../stubTrue'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/subtract.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/subtract.js
new file mode 100644
index 0000000..d32b16d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/subtract.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('subtract', require('../subtract'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sum.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sum.js
new file mode 100644
index 0000000..5cce12b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sum.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sum', require('../sum'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sumBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sumBy.js
new file mode 100644
index 0000000..c882656
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/sumBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sumBy', require('../sumBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/symmetricDifference.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/symmetricDifference.js
new file mode 100644
index 0000000..78c16ad
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/symmetricDifference.js
@@ -0,0 +1 @@
+module.exports = require('./xor');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/symmetricDifferenceBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/symmetricDifferenceBy.js
new file mode 100644
index 0000000..298fc7f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/symmetricDifferenceBy.js
@@ -0,0 +1 @@
+module.exports = require('./xorBy');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/symmetricDifferenceWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/symmetricDifferenceWith.js
new file mode 100644
index 0000000..70bc6fa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/symmetricDifferenceWith.js
@@ -0,0 +1 @@
+module.exports = require('./xorWith');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/tail.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/tail.js
new file mode 100644
index 0000000..f122f0a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/tail.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('tail', require('../tail'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/take.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/take.js
new file mode 100644
index 0000000..9af98a7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/take.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('take', require('../take'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/takeLast.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/takeLast.js
new file mode 100644
index 0000000..e98c84a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/takeLast.js
@@ -0,0 +1 @@
+module.exports = require('./takeRight');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/takeLastWhile.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/takeLastWhile.js
new file mode 100644
index 0000000..5367968
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/takeLastWhile.js
@@ -0,0 +1 @@
+module.exports = require('./takeRightWhile');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/takeRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/takeRight.js
new file mode 100644
index 0000000..b82950a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/takeRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('takeRight', require('../takeRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/takeRightWhile.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/takeRightWhile.js
new file mode 100644
index 0000000..8ffb0a2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/takeRightWhile.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('takeRightWhile', require('../takeRightWhile'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/takeWhile.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/takeWhile.js
new file mode 100644
index 0000000..2813664
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/takeWhile.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('takeWhile', require('../takeWhile'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/tap.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/tap.js
new file mode 100644
index 0000000..d33ad6e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/tap.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('tap', require('../tap'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/template.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/template.js
new file mode 100644
index 0000000..74857e1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/template.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('template', require('../template'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/templateSettings.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/templateSettings.js
new file mode 100644
index 0000000..7bcc0a8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/templateSettings.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('templateSettings', require('../templateSettings'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/throttle.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/throttle.js
new file mode 100644
index 0000000..77fff14
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/throttle.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('throttle', require('../throttle'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/thru.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/thru.js
new file mode 100644
index 0000000..d42b3b1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/thru.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('thru', require('../thru'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/times.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/times.js
new file mode 100644
index 0000000..0dab06d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/times.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('times', require('../times'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toArray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toArray.js
new file mode 100644
index 0000000..f0c360a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toArray.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toArray', require('../toArray'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toFinite.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toFinite.js
new file mode 100644
index 0000000..3a47687
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toFinite.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toFinite', require('../toFinite'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toInteger.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toInteger.js
new file mode 100644
index 0000000..e0af6a7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toInteger.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toInteger', require('../toInteger'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toIterator.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toIterator.js
new file mode 100644
index 0000000..65e6baa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toIterator.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toIterator', require('../toIterator'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toJSON.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toJSON.js
new file mode 100644
index 0000000..2d718d0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toJSON.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toJSON', require('../toJSON'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toLength.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toLength.js
new file mode 100644
index 0000000..b97cdd9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toLength.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toLength', require('../toLength'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toLower.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toLower.js
new file mode 100644
index 0000000..616ef36
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toLower.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toLower', require('../toLower'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toNumber.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toNumber.js
new file mode 100644
index 0000000..d0c6f4d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toNumber.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toNumber', require('../toNumber'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toPairs.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toPairs.js
new file mode 100644
index 0000000..af78378
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toPairs.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toPairs', require('../toPairs'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toPairsIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toPairsIn.js
new file mode 100644
index 0000000..66504ab
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toPairsIn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toPairsIn', require('../toPairsIn'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toPath.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toPath.js
new file mode 100644
index 0000000..b4d5e50
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toPath.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toPath', require('../toPath'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toPlainObject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toPlainObject.js
new file mode 100644
index 0000000..278bb86
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toPlainObject.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toPlainObject', require('../toPlainObject'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toSafeInteger.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toSafeInteger.js
new file mode 100644
index 0000000..367a26f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toSafeInteger.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toSafeInteger', require('../toSafeInteger'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toString.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toString.js
new file mode 100644
index 0000000..cec4f8e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toString.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toString', require('../toString'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toUpper.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toUpper.js
new file mode 100644
index 0000000..54f9a56
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/toUpper.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toUpper', require('../toUpper'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/transform.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/transform.js
new file mode 100644
index 0000000..759d088
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/transform.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('transform', require('../transform'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trim.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trim.js
new file mode 100644
index 0000000..e6319a7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trim.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('trim', require('../trim'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trimChars.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trimChars.js
new file mode 100644
index 0000000..c9294de
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trimChars.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('trimChars', require('../trim'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trimCharsEnd.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trimCharsEnd.js
new file mode 100644
index 0000000..284bc2f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trimCharsEnd.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('trimCharsEnd', require('../trimEnd'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trimCharsStart.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trimCharsStart.js
new file mode 100644
index 0000000..ff0ee65
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trimCharsStart.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('trimCharsStart', require('../trimStart'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trimEnd.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trimEnd.js
new file mode 100644
index 0000000..7190880
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trimEnd.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('trimEnd', require('../trimEnd'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trimStart.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trimStart.js
new file mode 100644
index 0000000..fda902c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/trimStart.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('trimStart', require('../trimStart'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/truncate.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/truncate.js
new file mode 100644
index 0000000..d265c1d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/truncate.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('truncate', require('../truncate'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unapply.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unapply.js
new file mode 100644
index 0000000..c5dfe77
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unapply.js
@@ -0,0 +1 @@
+module.exports = require('./rest');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unary.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unary.js
new file mode 100644
index 0000000..286c945
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unary.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('unary', require('../unary'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unescape.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unescape.js
new file mode 100644
index 0000000..fddcb46
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unescape.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('unescape', require('../unescape'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/union.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/union.js
new file mode 100644
index 0000000..ef8228d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/union.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('union', require('../union'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unionBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unionBy.js
new file mode 100644
index 0000000..603687a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unionBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('unionBy', require('../unionBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unionWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unionWith.js
new file mode 100644
index 0000000..65bb3a7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unionWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('unionWith', require('../unionWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/uniq.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/uniq.js
new file mode 100644
index 0000000..bc18524
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/uniq.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('uniq', require('../uniq'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/uniqBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/uniqBy.js
new file mode 100644
index 0000000..634c6a8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/uniqBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('uniqBy', require('../uniqBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/uniqWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/uniqWith.js
new file mode 100644
index 0000000..0ec601a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/uniqWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('uniqWith', require('../uniqWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/uniqueId.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/uniqueId.js
new file mode 100644
index 0000000..aa8fc2f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/uniqueId.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('uniqueId', require('../uniqueId'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unnest.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unnest.js
new file mode 100644
index 0000000..5d34060
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unnest.js
@@ -0,0 +1 @@
+module.exports = require('./flatten');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unset.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unset.js
new file mode 100644
index 0000000..ea203a0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unset.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('unset', require('../unset'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unzip.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unzip.js
new file mode 100644
index 0000000..cc364b3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unzip.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('unzip', require('../unzip'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unzipWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unzipWith.js
new file mode 100644
index 0000000..182eaa1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/unzipWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('unzipWith', require('../unzipWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/update.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/update.js
new file mode 100644
index 0000000..b8ce2cc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/update.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('update', require('../update'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/updateWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/updateWith.js
new file mode 100644
index 0000000..d5e8282
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/updateWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('updateWith', require('../updateWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/upperCase.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/upperCase.js
new file mode 100644
index 0000000..c886f20
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/upperCase.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('upperCase', require('../upperCase'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/upperFirst.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/upperFirst.js
new file mode 100644
index 0000000..d8c04df
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/upperFirst.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('upperFirst', require('../upperFirst'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/useWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/useWith.js
new file mode 100644
index 0000000..d8b3df5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/useWith.js
@@ -0,0 +1 @@
+module.exports = require('./overArgs');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/util.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/util.js
new file mode 100644
index 0000000..18c00ba
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/util.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../util'));
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/value.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/value.js
new file mode 100644
index 0000000..555eec7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/value.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('value', require('../value'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/valueOf.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/valueOf.js
new file mode 100644
index 0000000..f968807
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/valueOf.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('valueOf', require('../valueOf'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/values.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/values.js
new file mode 100644
index 0000000..2dfc561
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/values.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('values', require('../values'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/valuesIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/valuesIn.js
new file mode 100644
index 0000000..a1b2bb8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/valuesIn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('valuesIn', require('../valuesIn'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/where.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/where.js
new file mode 100644
index 0000000..3247f64
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/where.js
@@ -0,0 +1 @@
+module.exports = require('./conformsTo');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/whereEq.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/whereEq.js
new file mode 100644
index 0000000..29d1e1e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/whereEq.js
@@ -0,0 +1 @@
+module.exports = require('./isMatch');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/without.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/without.js
new file mode 100644
index 0000000..bad9e12
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/without.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('without', require('../without'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/words.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/words.js
new file mode 100644
index 0000000..4a90141
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/words.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('words', require('../words'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrap.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrap.js
new file mode 100644
index 0000000..e93bd8a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrap.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('wrap', require('../wrap'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrapperAt.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrapperAt.js
new file mode 100644
index 0000000..8f0a310
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrapperAt.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('wrapperAt', require('../wrapperAt'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrapperChain.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrapperChain.js
new file mode 100644
index 0000000..2a48ea2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrapperChain.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('wrapperChain', require('../wrapperChain'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrapperLodash.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrapperLodash.js
new file mode 100644
index 0000000..a7162d0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrapperLodash.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('wrapperLodash', require('../wrapperLodash'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrapperReverse.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrapperReverse.js
new file mode 100644
index 0000000..e1481aa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrapperReverse.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('wrapperReverse', require('../wrapperReverse'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrapperValue.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrapperValue.js
new file mode 100644
index 0000000..8eb9112
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/wrapperValue.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('wrapperValue', require('../wrapperValue'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/xor.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/xor.js
new file mode 100644
index 0000000..29e2819
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/xor.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('xor', require('../xor'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/xorBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/xorBy.js
new file mode 100644
index 0000000..b355686
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/xorBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('xorBy', require('../xorBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/xorWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/xorWith.js
new file mode 100644
index 0000000..8e05739
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/xorWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('xorWith', require('../xorWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zip.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zip.js
new file mode 100644
index 0000000..69e147a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zip.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('zip', require('../zip'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zipAll.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zipAll.js
new file mode 100644
index 0000000..efa8ccb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zipAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('zipAll', require('../zip'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zipObj.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zipObj.js
new file mode 100644
index 0000000..f4a3453
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zipObj.js
@@ -0,0 +1 @@
+module.exports = require('./zipObject');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zipObject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zipObject.js
new file mode 100644
index 0000000..462dbb6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zipObject.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('zipObject', require('../zipObject'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zipObjectDeep.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zipObjectDeep.js
new file mode 100644
index 0000000..53a5d33
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zipObjectDeep.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('zipObjectDeep', require('../zipObjectDeep'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zipWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zipWith.js
new file mode 100644
index 0000000..c5cf9e2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fp/zipWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('zipWith', require('../zipWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fromPairs.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fromPairs.js
new file mode 100644
index 0000000..ee7940d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/fromPairs.js
@@ -0,0 +1,28 @@
+/**
+ * The inverse of `_.toPairs`; this method returns an object composed
+ * from key-value `pairs`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} pairs The key-value pairs.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.fromPairs([['a', 1], ['b', 2]]);
+ * // => { 'a': 1, 'b': 2 }
+ */
+function fromPairs(pairs) {
+ var index = -1,
+ length = pairs == null ? 0 : pairs.length,
+ result = {};
+
+ while (++index < length) {
+ var pair = pairs[index];
+ result[pair[0]] = pair[1];
+ }
+ return result;
+}
+
+module.exports = fromPairs;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/function.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/function.js
new file mode 100644
index 0000000..b0fc6d9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/function.js
@@ -0,0 +1,25 @@
+module.exports = {
+ 'after': require('./after'),
+ 'ary': require('./ary'),
+ 'before': require('./before'),
+ 'bind': require('./bind'),
+ 'bindKey': require('./bindKey'),
+ 'curry': require('./curry'),
+ 'curryRight': require('./curryRight'),
+ 'debounce': require('./debounce'),
+ 'defer': require('./defer'),
+ 'delay': require('./delay'),
+ 'flip': require('./flip'),
+ 'memoize': require('./memoize'),
+ 'negate': require('./negate'),
+ 'once': require('./once'),
+ 'overArgs': require('./overArgs'),
+ 'partial': require('./partial'),
+ 'partialRight': require('./partialRight'),
+ 'rearg': require('./rearg'),
+ 'rest': require('./rest'),
+ 'spread': require('./spread'),
+ 'throttle': require('./throttle'),
+ 'unary': require('./unary'),
+ 'wrap': require('./wrap')
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/functions.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/functions.js
new file mode 100644
index 0000000..9722928
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/functions.js
@@ -0,0 +1,31 @@
+var baseFunctions = require('./_baseFunctions'),
+ keys = require('./keys');
+
+/**
+ * Creates an array of function property names from own enumerable properties
+ * of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @returns {Array} Returns the function names.
+ * @see _.functionsIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = _.constant('a');
+ * this.b = _.constant('b');
+ * }
+ *
+ * Foo.prototype.c = _.constant('c');
+ *
+ * _.functions(new Foo);
+ * // => ['a', 'b']
+ */
+function functions(object) {
+ return object == null ? [] : baseFunctions(object, keys(object));
+}
+
+module.exports = functions;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/functionsIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/functionsIn.js
new file mode 100644
index 0000000..f00345d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/functionsIn.js
@@ -0,0 +1,31 @@
+var baseFunctions = require('./_baseFunctions'),
+ keysIn = require('./keysIn');
+
+/**
+ * Creates an array of function property names from own and inherited
+ * enumerable properties of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @returns {Array} Returns the function names.
+ * @see _.functions
+ * @example
+ *
+ * function Foo() {
+ * this.a = _.constant('a');
+ * this.b = _.constant('b');
+ * }
+ *
+ * Foo.prototype.c = _.constant('c');
+ *
+ * _.functionsIn(new Foo);
+ * // => ['a', 'b', 'c']
+ */
+function functionsIn(object) {
+ return object == null ? [] : baseFunctions(object, keysIn(object));
+}
+
+module.exports = functionsIn;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/get.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/get.js
new file mode 100644
index 0000000..8805ff9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/get.js
@@ -0,0 +1,33 @@
+var baseGet = require('./_baseGet');
+
+/**
+ * Gets the value at `path` of `object`. If the resolved value is
+ * `undefined`, the `defaultValue` is returned in its place.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.get(object, 'a[0].b.c');
+ * // => 3
+ *
+ * _.get(object, ['a', '0', 'b', 'c']);
+ * // => 3
+ *
+ * _.get(object, 'a.b.c', 'default');
+ * // => 'default'
+ */
+function get(object, path, defaultValue) {
+ var result = object == null ? undefined : baseGet(object, path);
+ return result === undefined ? defaultValue : result;
+}
+
+module.exports = get;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/groupBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/groupBy.js
new file mode 100644
index 0000000..babf4f6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/groupBy.js
@@ -0,0 +1,41 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ createAggregator = require('./_createAggregator');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The order of grouped values
+ * is determined by the order they occur in `collection`. The corresponding
+ * value of each key is an array of elements responsible for generating the
+ * key. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.groupBy([6.1, 4.2, 6.3], Math.floor);
+ * // => { '4': [4.2], '6': [6.1, 6.3] }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.groupBy(['one', 'two', 'three'], 'length');
+ * // => { '3': ['one', 'two'], '5': ['three'] }
+ */
+var groupBy = createAggregator(function(result, value, key) {
+ if (hasOwnProperty.call(result, key)) {
+ result[key].push(value);
+ } else {
+ baseAssignValue(result, key, [value]);
+ }
+});
+
+module.exports = groupBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/gt.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/gt.js
new file mode 100644
index 0000000..3a66282
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/gt.js
@@ -0,0 +1,29 @@
+var baseGt = require('./_baseGt'),
+ createRelationalOperation = require('./_createRelationalOperation');
+
+/**
+ * Checks if `value` is greater than `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ * @see _.lt
+ * @example
+ *
+ * _.gt(3, 1);
+ * // => true
+ *
+ * _.gt(3, 3);
+ * // => false
+ *
+ * _.gt(1, 3);
+ * // => false
+ */
+var gt = createRelationalOperation(baseGt);
+
+module.exports = gt;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/gte.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/gte.js
new file mode 100644
index 0000000..4180a68
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/gte.js
@@ -0,0 +1,30 @@
+var createRelationalOperation = require('./_createRelationalOperation');
+
+/**
+ * Checks if `value` is greater than or equal to `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than or equal to
+ * `other`, else `false`.
+ * @see _.lte
+ * @example
+ *
+ * _.gte(3, 1);
+ * // => true
+ *
+ * _.gte(3, 3);
+ * // => true
+ *
+ * _.gte(1, 3);
+ * // => false
+ */
+var gte = createRelationalOperation(function(value, other) {
+ return value >= other;
+});
+
+module.exports = gte;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/has.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/has.js
new file mode 100644
index 0000000..34df55e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/has.js
@@ -0,0 +1,35 @@
+var baseHas = require('./_baseHas'),
+ hasPath = require('./_hasPath');
+
+/**
+ * Checks if `path` is a direct property of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = { 'a': { 'b': 2 } };
+ * var other = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.has(object, 'a');
+ * // => true
+ *
+ * _.has(object, 'a.b');
+ * // => true
+ *
+ * _.has(object, ['a', 'b']);
+ * // => true
+ *
+ * _.has(other, 'a');
+ * // => false
+ */
+function has(object, path) {
+ return object != null && hasPath(object, path, baseHas);
+}
+
+module.exports = has;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/hasIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/hasIn.js
new file mode 100644
index 0000000..06a3686
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/hasIn.js
@@ -0,0 +1,34 @@
+var baseHasIn = require('./_baseHasIn'),
+ hasPath = require('./_hasPath');
+
+/**
+ * Checks if `path` is a direct or inherited property of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.hasIn(object, 'a');
+ * // => true
+ *
+ * _.hasIn(object, 'a.b');
+ * // => true
+ *
+ * _.hasIn(object, ['a', 'b']);
+ * // => true
+ *
+ * _.hasIn(object, 'b');
+ * // => false
+ */
+function hasIn(object, path) {
+ return object != null && hasPath(object, path, baseHasIn);
+}
+
+module.exports = hasIn;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/head.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/head.js
new file mode 100644
index 0000000..dee9d1f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/head.js
@@ -0,0 +1,23 @@
+/**
+ * Gets the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias first
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the first element of `array`.
+ * @example
+ *
+ * _.head([1, 2, 3]);
+ * // => 1
+ *
+ * _.head([]);
+ * // => undefined
+ */
+function head(array) {
+ return (array && array.length) ? array[0] : undefined;
+}
+
+module.exports = head;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/identity.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/identity.js
new file mode 100644
index 0000000..2d5d963
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/identity.js
@@ -0,0 +1,21 @@
+/**
+ * This method returns the first argument it receives.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ *
+ * console.log(_.identity(object) === object);
+ * // => true
+ */
+function identity(value) {
+ return value;
+}
+
+module.exports = identity;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/inRange.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/inRange.js
new file mode 100644
index 0000000..f20728d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/inRange.js
@@ -0,0 +1,55 @@
+var baseInRange = require('./_baseInRange'),
+ toFinite = require('./toFinite'),
+ toNumber = require('./toNumber');
+
+/**
+ * Checks if `n` is between `start` and up to, but not including, `end`. If
+ * `end` is not specified, it's set to `start` with `start` then set to `0`.
+ * If `start` is greater than `end` the params are swapped to support
+ * negative ranges.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.3.0
+ * @category Number
+ * @param {number} number The number to check.
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
+ * @see _.range, _.rangeRight
+ * @example
+ *
+ * _.inRange(3, 2, 4);
+ * // => true
+ *
+ * _.inRange(4, 8);
+ * // => true
+ *
+ * _.inRange(4, 2);
+ * // => false
+ *
+ * _.inRange(2, 2);
+ * // => false
+ *
+ * _.inRange(1.2, 2);
+ * // => true
+ *
+ * _.inRange(5.2, 4);
+ * // => false
+ *
+ * _.inRange(-3, -2, -6);
+ * // => true
+ */
+function inRange(number, start, end) {
+ start = toFinite(start);
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = toFinite(end);
+ }
+ number = toNumber(number);
+ return baseInRange(number, start, end);
+}
+
+module.exports = inRange;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/includes.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/includes.js
new file mode 100644
index 0000000..ae0deed
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/includes.js
@@ -0,0 +1,53 @@
+var baseIndexOf = require('./_baseIndexOf'),
+ isArrayLike = require('./isArrayLike'),
+ isString = require('./isString'),
+ toInteger = require('./toInteger'),
+ values = require('./values');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Checks if `value` is in `collection`. If `collection` is a string, it's
+ * checked for a substring of `value`, otherwise
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * is used for equality comparisons. If `fromIndex` is negative, it's used as
+ * the offset from the end of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {boolean} Returns `true` if `value` is found, else `false`.
+ * @example
+ *
+ * _.includes([1, 2, 3], 1);
+ * // => true
+ *
+ * _.includes([1, 2, 3], 1, 2);
+ * // => false
+ *
+ * _.includes({ 'a': 1, 'b': 2 }, 1);
+ * // => true
+ *
+ * _.includes('abcd', 'bc');
+ * // => true
+ */
+function includes(collection, value, fromIndex, guard) {
+ collection = isArrayLike(collection) ? collection : values(collection);
+ fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
+
+ var length = collection.length;
+ if (fromIndex < 0) {
+ fromIndex = nativeMax(length + fromIndex, 0);
+ }
+ return isString(collection)
+ ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
+ : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
+}
+
+module.exports = includes;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/index.js
new file mode 100644
index 0000000..5d063e2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/index.js
@@ -0,0 +1 @@
+module.exports = require('./lodash'); \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/indexOf.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/indexOf.js
new file mode 100644
index 0000000..3c644af
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/indexOf.js
@@ -0,0 +1,42 @@
+var baseIndexOf = require('./_baseIndexOf'),
+ toInteger = require('./toInteger');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Gets the index at which the first occurrence of `value` is found in `array`
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. If `fromIndex` is negative, it's used as the
+ * offset from the end of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.indexOf([1, 2, 1, 2], 2);
+ * // => 1
+ *
+ * // Search from the `fromIndex`.
+ * _.indexOf([1, 2, 1, 2], 2, 2);
+ * // => 3
+ */
+function indexOf(array, value, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
+ }
+ return baseIndexOf(array, value, index);
+}
+
+module.exports = indexOf;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/initial.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/initial.js
new file mode 100644
index 0000000..f47fc50
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/initial.js
@@ -0,0 +1,22 @@
+var baseSlice = require('./_baseSlice');
+
+/**
+ * Gets all but the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.initial([1, 2, 3]);
+ * // => [1, 2]
+ */
+function initial(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseSlice(array, 0, -1) : [];
+}
+
+module.exports = initial;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/intersection.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/intersection.js
new file mode 100644
index 0000000..a94c135
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/intersection.js
@@ -0,0 +1,30 @@
+var arrayMap = require('./_arrayMap'),
+ baseIntersection = require('./_baseIntersection'),
+ baseRest = require('./_baseRest'),
+ castArrayLikeObject = require('./_castArrayLikeObject');
+
+/**
+ * Creates an array of unique values that are included in all given arrays
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. The order and references of result values are
+ * determined by the first array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * _.intersection([2, 1], [2, 3]);
+ * // => [2]
+ */
+var intersection = baseRest(function(arrays) {
+ var mapped = arrayMap(arrays, castArrayLikeObject);
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped)
+ : [];
+});
+
+module.exports = intersection;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/intersectionBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/intersectionBy.js
new file mode 100644
index 0000000..31461aa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/intersectionBy.js
@@ -0,0 +1,45 @@
+var arrayMap = require('./_arrayMap'),
+ baseIntersection = require('./_baseIntersection'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest'),
+ castArrayLikeObject = require('./_castArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.intersection` except that it accepts `iteratee`
+ * which is invoked for each element of each `arrays` to generate the criterion
+ * by which they're compared. The order and references of result values are
+ * determined by the first array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [2.1]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }]
+ */
+var intersectionBy = baseRest(function(arrays) {
+ var iteratee = last(arrays),
+ mapped = arrayMap(arrays, castArrayLikeObject);
+
+ if (iteratee === last(mapped)) {
+ iteratee = undefined;
+ } else {
+ mapped.pop();
+ }
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped, baseIteratee(iteratee, 2))
+ : [];
+});
+
+module.exports = intersectionBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/intersectionWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/intersectionWith.js
new file mode 100644
index 0000000..63cabfa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/intersectionWith.js
@@ -0,0 +1,41 @@
+var arrayMap = require('./_arrayMap'),
+ baseIntersection = require('./_baseIntersection'),
+ baseRest = require('./_baseRest'),
+ castArrayLikeObject = require('./_castArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.intersection` except that it accepts `comparator`
+ * which is invoked to compare elements of `arrays`. The order and references
+ * of result values are determined by the first array. The comparator is
+ * invoked with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.intersectionWith(objects, others, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }]
+ */
+var intersectionWith = baseRest(function(arrays) {
+ var comparator = last(arrays),
+ mapped = arrayMap(arrays, castArrayLikeObject);
+
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ if (comparator) {
+ mapped.pop();
+ }
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped, undefined, comparator)
+ : [];
+});
+
+module.exports = intersectionWith;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/invert.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/invert.js
new file mode 100644
index 0000000..21d10ab
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/invert.js
@@ -0,0 +1,27 @@
+var constant = require('./constant'),
+ createInverter = require('./_createInverter'),
+ identity = require('./identity');
+
+/**
+ * Creates an object composed of the inverted keys and values of `object`.
+ * If `object` contains duplicate values, subsequent values overwrite
+ * property assignments of previous values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.7.0
+ * @category Object
+ * @param {Object} object The object to invert.
+ * @returns {Object} Returns the new inverted object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
+ *
+ * _.invert(object);
+ * // => { '1': 'c', '2': 'b' }
+ */
+var invert = createInverter(function(result, value, key) {
+ result[value] = key;
+}, constant(identity));
+
+module.exports = invert;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/invertBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/invertBy.js
new file mode 100644
index 0000000..e5ba0f7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/invertBy.js
@@ -0,0 +1,44 @@
+var baseIteratee = require('./_baseIteratee'),
+ createInverter = require('./_createInverter');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * This method is like `_.invert` except that the inverted object is generated
+ * from the results of running each element of `object` thru `iteratee`. The
+ * corresponding inverted value of each inverted key is an array of keys
+ * responsible for generating the inverted value. The iteratee is invoked
+ * with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.1.0
+ * @category Object
+ * @param {Object} object The object to invert.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Object} Returns the new inverted object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
+ *
+ * _.invertBy(object);
+ * // => { '1': ['a', 'c'], '2': ['b'] }
+ *
+ * _.invertBy(object, function(value) {
+ * return 'group' + value;
+ * });
+ * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
+ */
+var invertBy = createInverter(function(result, value, key) {
+ if (hasOwnProperty.call(result, value)) {
+ result[value].push(key);
+ } else {
+ result[value] = [key];
+ }
+}, baseIteratee);
+
+module.exports = invertBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/invoke.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/invoke.js
new file mode 100644
index 0000000..97d51eb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/invoke.js
@@ -0,0 +1,24 @@
+var baseInvoke = require('./_baseInvoke'),
+ baseRest = require('./_baseRest');
+
+/**
+ * Invokes the method at `path` of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {*} Returns the result of the invoked method.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
+ *
+ * _.invoke(object, 'a[0].b.c.slice', 1, 3);
+ * // => [2, 3]
+ */
+var invoke = baseRest(baseInvoke);
+
+module.exports = invoke;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/invokeMap.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/invokeMap.js
new file mode 100644
index 0000000..8da5126
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/invokeMap.js
@@ -0,0 +1,41 @@
+var apply = require('./_apply'),
+ baseEach = require('./_baseEach'),
+ baseInvoke = require('./_baseInvoke'),
+ baseRest = require('./_baseRest'),
+ isArrayLike = require('./isArrayLike');
+
+/**
+ * Invokes the method at `path` of each element in `collection`, returning
+ * an array of the results of each invoked method. Any additional arguments
+ * are provided to each invoked method. If `path` is a function, it's invoked
+ * for, and `this` bound to, each element in `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|string} path The path of the method to invoke or
+ * the function invoked per iteration.
+ * @param {...*} [args] The arguments to invoke each method with.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
+ * // => [[1, 5, 7], [1, 2, 3]]
+ *
+ * _.invokeMap([123, 456], String.prototype.split, '');
+ * // => [['1', '2', '3'], ['4', '5', '6']]
+ */
+var invokeMap = baseRest(function(collection, path, args) {
+ var index = -1,
+ isFunc = typeof path == 'function',
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value) {
+ result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
+ });
+ return result;
+});
+
+module.exports = invokeMap;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isArguments.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isArguments.js
new file mode 100644
index 0000000..8b9ed66
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isArguments.js
@@ -0,0 +1,36 @@
+var baseIsArguments = require('./_baseIsArguments'),
+ isObjectLike = require('./isObjectLike');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/** Built-in value references. */
+var propertyIsEnumerable = objectProto.propertyIsEnumerable;
+
+/**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ * else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
+ return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
+ !propertyIsEnumerable.call(value, 'callee');
+};
+
+module.exports = isArguments;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isArray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isArray.js
new file mode 100644
index 0000000..88ab55f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isArray.js
@@ -0,0 +1,26 @@
+/**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+var isArray = Array.isArray;
+
+module.exports = isArray;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isArrayBuffer.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isArrayBuffer.js
new file mode 100644
index 0000000..12904a6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isArrayBuffer.js
@@ -0,0 +1,27 @@
+var baseIsArrayBuffer = require('./_baseIsArrayBuffer'),
+ baseUnary = require('./_baseUnary'),
+ nodeUtil = require('./_nodeUtil');
+
+/* Node.js helper references. */
+var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer;
+
+/**
+ * Checks if `value` is classified as an `ArrayBuffer` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
+ * @example
+ *
+ * _.isArrayBuffer(new ArrayBuffer(2));
+ * // => true
+ *
+ * _.isArrayBuffer(new Array(2));
+ * // => false
+ */
+var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
+
+module.exports = isArrayBuffer;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isArrayLike.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isArrayLike.js
new file mode 100644
index 0000000..0f96680
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isArrayLike.js
@@ -0,0 +1,33 @@
+var isFunction = require('./isFunction'),
+ isLength = require('./isLength');
+
+/**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+function isArrayLike(value) {
+ return value != null && isLength(value.length) && !isFunction(value);
+}
+
+module.exports = isArrayLike;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isArrayLikeObject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isArrayLikeObject.js
new file mode 100644
index 0000000..6c4812a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isArrayLikeObject.js
@@ -0,0 +1,33 @@
+var isArrayLike = require('./isArrayLike'),
+ isObjectLike = require('./isObjectLike');
+
+/**
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
+ * else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
+ *
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
+ */
+function isArrayLikeObject(value) {
+ return isObjectLike(value) && isArrayLike(value);
+}
+
+module.exports = isArrayLikeObject;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isBoolean.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isBoolean.js
new file mode 100644
index 0000000..a43ed4b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isBoolean.js
@@ -0,0 +1,29 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var boolTag = '[object Boolean]';
+
+/**
+ * Checks if `value` is classified as a boolean primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
+ * @example
+ *
+ * _.isBoolean(false);
+ * // => true
+ *
+ * _.isBoolean(null);
+ * // => false
+ */
+function isBoolean(value) {
+ return value === true || value === false ||
+ (isObjectLike(value) && baseGetTag(value) == boolTag);
+}
+
+module.exports = isBoolean;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isBuffer.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isBuffer.js
new file mode 100644
index 0000000..c103cc7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isBuffer.js
@@ -0,0 +1,38 @@
+var root = require('./_root'),
+ stubFalse = require('./stubFalse');
+
+/** Detect free variable `exports`. */
+var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
+
+/** Detect free variable `module`. */
+var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+/** Detect the popular CommonJS extension `module.exports`. */
+var moduleExports = freeModule && freeModule.exports === freeExports;
+
+/** Built-in value references. */
+var Buffer = moduleExports ? root.Buffer : undefined;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
+
+/**
+ * Checks if `value` is a buffer.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
+ * @example
+ *
+ * _.isBuffer(new Buffer(2));
+ * // => true
+ *
+ * _.isBuffer(new Uint8Array(2));
+ * // => false
+ */
+var isBuffer = nativeIsBuffer || stubFalse;
+
+module.exports = isBuffer;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isDate.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isDate.js
new file mode 100644
index 0000000..7f0209f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isDate.js
@@ -0,0 +1,27 @@
+var baseIsDate = require('./_baseIsDate'),
+ baseUnary = require('./_baseUnary'),
+ nodeUtil = require('./_nodeUtil');
+
+/* Node.js helper references. */
+var nodeIsDate = nodeUtil && nodeUtil.isDate;
+
+/**
+ * Checks if `value` is classified as a `Date` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ * @example
+ *
+ * _.isDate(new Date);
+ * // => true
+ *
+ * _.isDate('Mon April 23 2012');
+ * // => false
+ */
+var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
+
+module.exports = isDate;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isElement.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isElement.js
new file mode 100644
index 0000000..76ae29c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isElement.js
@@ -0,0 +1,25 @@
+var isObjectLike = require('./isObjectLike'),
+ isPlainObject = require('./isPlainObject');
+
+/**
+ * Checks if `value` is likely a DOM element.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
+ * @example
+ *
+ * _.isElement(document.body);
+ * // => true
+ *
+ * _.isElement('<body>');
+ * // => false
+ */
+function isElement(value) {
+ return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
+}
+
+module.exports = isElement;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isEmpty.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isEmpty.js
new file mode 100644
index 0000000..3597294
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isEmpty.js
@@ -0,0 +1,77 @@
+var baseKeys = require('./_baseKeys'),
+ getTag = require('./_getTag'),
+ isArguments = require('./isArguments'),
+ isArray = require('./isArray'),
+ isArrayLike = require('./isArrayLike'),
+ isBuffer = require('./isBuffer'),
+ isPrototype = require('./_isPrototype'),
+ isTypedArray = require('./isTypedArray');
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+ setTag = '[object Set]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Checks if `value` is an empty object, collection, map, or set.
+ *
+ * Objects are considered empty if they have no own enumerable string keyed
+ * properties.
+ *
+ * Array-like values such as `arguments` objects, arrays, buffers, strings, or
+ * jQuery-like collections are considered empty if they have a `length` of `0`.
+ * Similarly, maps and sets are considered empty if they have a `size` of `0`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
+ * @example
+ *
+ * _.isEmpty(null);
+ * // => true
+ *
+ * _.isEmpty(true);
+ * // => true
+ *
+ * _.isEmpty(1);
+ * // => true
+ *
+ * _.isEmpty([1, 2, 3]);
+ * // => false
+ *
+ * _.isEmpty({ 'a': 1 });
+ * // => false
+ */
+function isEmpty(value) {
+ if (value == null) {
+ return true;
+ }
+ if (isArrayLike(value) &&
+ (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
+ isBuffer(value) || isTypedArray(value) || isArguments(value))) {
+ return !value.length;
+ }
+ var tag = getTag(value);
+ if (tag == mapTag || tag == setTag) {
+ return !value.size;
+ }
+ if (isPrototype(value)) {
+ return !baseKeys(value).length;
+ }
+ for (var key in value) {
+ if (hasOwnProperty.call(value, key)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+module.exports = isEmpty;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isEqual.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isEqual.js
new file mode 100644
index 0000000..8a54126
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isEqual.js
@@ -0,0 +1,35 @@
+var baseIsEqual = require('./_baseIsEqual');
+
+/**
+ * Performs a deep comparison between two values to determine if they are
+ * equivalent.
+ *
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
+ * by their own, not inherited, enumerable properties. Functions and DOM
+ * nodes are **not** supported.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.isEqual(object, other);
+ * // => true
+ *
+ * object === other;
+ * // => false
+ */
+function isEqual(value, other) {
+ return baseIsEqual(value, other);
+}
+
+module.exports = isEqual;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isEqualWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isEqualWith.js
new file mode 100644
index 0000000..21bdc7f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isEqualWith.js
@@ -0,0 +1,41 @@
+var baseIsEqual = require('./_baseIsEqual');
+
+/**
+ * This method is like `_.isEqual` except that it accepts `customizer` which
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+ * are handled by the method instead. The `customizer` is invoked with up to
+ * six arguments: (objValue, othValue [, index|key, object, other, stack]).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * function isGreeting(value) {
+ * return /^h(?:i|ello)$/.test(value);
+ * }
+ *
+ * function customizer(objValue, othValue) {
+ * if (isGreeting(objValue) && isGreeting(othValue)) {
+ * return true;
+ * }
+ * }
+ *
+ * var array = ['hello', 'goodbye'];
+ * var other = ['hi', 'goodbye'];
+ *
+ * _.isEqualWith(array, other, customizer);
+ * // => true
+ */
+function isEqualWith(value, other, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ var result = customizer ? customizer(value, other) : undefined;
+ return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
+}
+
+module.exports = isEqualWith;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isError.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isError.js
new file mode 100644
index 0000000..b4f41e0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isError.js
@@ -0,0 +1,36 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike'),
+ isPlainObject = require('./isPlainObject');
+
+/** `Object#toString` result references. */
+var domExcTag = '[object DOMException]',
+ errorTag = '[object Error]';
+
+/**
+ * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
+ * `SyntaxError`, `TypeError`, or `URIError` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
+ * @example
+ *
+ * _.isError(new Error);
+ * // => true
+ *
+ * _.isError(Error);
+ * // => false
+ */
+function isError(value) {
+ if (!isObjectLike(value)) {
+ return false;
+ }
+ var tag = baseGetTag(value);
+ return tag == errorTag || tag == domExcTag ||
+ (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
+}
+
+module.exports = isError;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isFinite.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isFinite.js
new file mode 100644
index 0000000..601842b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isFinite.js
@@ -0,0 +1,36 @@
+var root = require('./_root');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeIsFinite = root.isFinite;
+
+/**
+ * Checks if `value` is a finite primitive number.
+ *
+ * **Note:** This method is based on
+ * [`Number.isFinite`](https://mdn.io/Number/isFinite).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
+ * @example
+ *
+ * _.isFinite(3);
+ * // => true
+ *
+ * _.isFinite(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isFinite(Infinity);
+ * // => false
+ *
+ * _.isFinite('3');
+ * // => false
+ */
+function isFinite(value) {
+ return typeof value == 'number' && nativeIsFinite(value);
+}
+
+module.exports = isFinite;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isFunction.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isFunction.js
new file mode 100644
index 0000000..907a8cd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isFunction.js
@@ -0,0 +1,37 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObject = require('./isObject');
+
+/** `Object#toString` result references. */
+var asyncTag = '[object AsyncFunction]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ proxyTag = '[object Proxy]';
+
+/**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+function isFunction(value) {
+ if (!isObject(value)) {
+ return false;
+ }
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
+ var tag = baseGetTag(value);
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
+}
+
+module.exports = isFunction;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isInteger.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isInteger.js
new file mode 100644
index 0000000..66aa87d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isInteger.js
@@ -0,0 +1,33 @@
+var toInteger = require('./toInteger');
+
+/**
+ * Checks if `value` is an integer.
+ *
+ * **Note:** This method is based on
+ * [`Number.isInteger`](https://mdn.io/Number/isInteger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
+ * @example
+ *
+ * _.isInteger(3);
+ * // => true
+ *
+ * _.isInteger(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isInteger(Infinity);
+ * // => false
+ *
+ * _.isInteger('3');
+ * // => false
+ */
+function isInteger(value) {
+ return typeof value == 'number' && value == toInteger(value);
+}
+
+module.exports = isInteger;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isLength.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isLength.js
new file mode 100644
index 0000000..3a95caa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isLength.js
@@ -0,0 +1,35 @@
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+module.exports = isLength;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isMap.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isMap.js
new file mode 100644
index 0000000..44f8517
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isMap.js
@@ -0,0 +1,27 @@
+var baseIsMap = require('./_baseIsMap'),
+ baseUnary = require('./_baseUnary'),
+ nodeUtil = require('./_nodeUtil');
+
+/* Node.js helper references. */
+var nodeIsMap = nodeUtil && nodeUtil.isMap;
+
+/**
+ * Checks if `value` is classified as a `Map` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
+ * @example
+ *
+ * _.isMap(new Map);
+ * // => true
+ *
+ * _.isMap(new WeakMap);
+ * // => false
+ */
+var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
+
+module.exports = isMap;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isMatch.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isMatch.js
new file mode 100644
index 0000000..9773a18
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isMatch.js
@@ -0,0 +1,36 @@
+var baseIsMatch = require('./_baseIsMatch'),
+ getMatchData = require('./_getMatchData');
+
+/**
+ * Performs a partial deep comparison between `object` and `source` to
+ * determine if `object` contains equivalent property values.
+ *
+ * **Note:** This method is equivalent to `_.matches` when `source` is
+ * partially applied.
+ *
+ * Partial comparisons will match empty array and empty object `source`
+ * values against any array or object value, respectively. See `_.isEqual`
+ * for a list of supported value comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ *
+ * _.isMatch(object, { 'b': 2 });
+ * // => true
+ *
+ * _.isMatch(object, { 'b': 1 });
+ * // => false
+ */
+function isMatch(object, source) {
+ return object === source || baseIsMatch(object, source, getMatchData(source));
+}
+
+module.exports = isMatch;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isMatchWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isMatchWith.js
new file mode 100644
index 0000000..187b6a6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isMatchWith.js
@@ -0,0 +1,41 @@
+var baseIsMatch = require('./_baseIsMatch'),
+ getMatchData = require('./_getMatchData');
+
+/**
+ * This method is like `_.isMatch` except that it accepts `customizer` which
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+ * are handled by the method instead. The `customizer` is invoked with five
+ * arguments: (objValue, srcValue, index|key, object, source).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ * @example
+ *
+ * function isGreeting(value) {
+ * return /^h(?:i|ello)$/.test(value);
+ * }
+ *
+ * function customizer(objValue, srcValue) {
+ * if (isGreeting(objValue) && isGreeting(srcValue)) {
+ * return true;
+ * }
+ * }
+ *
+ * var object = { 'greeting': 'hello' };
+ * var source = { 'greeting': 'hi' };
+ *
+ * _.isMatchWith(object, source, customizer);
+ * // => true
+ */
+function isMatchWith(object, source, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseIsMatch(object, source, getMatchData(source), customizer);
+}
+
+module.exports = isMatchWith;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isNaN.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isNaN.js
new file mode 100644
index 0000000..7d0d783
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isNaN.js
@@ -0,0 +1,38 @@
+var isNumber = require('./isNumber');
+
+/**
+ * Checks if `value` is `NaN`.
+ *
+ * **Note:** This method is based on
+ * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
+ * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
+ * `undefined` and other non-number values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ * @example
+ *
+ * _.isNaN(NaN);
+ * // => true
+ *
+ * _.isNaN(new Number(NaN));
+ * // => true
+ *
+ * isNaN(undefined);
+ * // => true
+ *
+ * _.isNaN(undefined);
+ * // => false
+ */
+function isNaN(value) {
+ // An `NaN` primitive is the only value that is not equal to itself.
+ // Perform the `toStringTag` check first to avoid errors with some
+ // ActiveX objects in IE.
+ return isNumber(value) && value != +value;
+}
+
+module.exports = isNaN;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isNative.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isNative.js
new file mode 100644
index 0000000..f0cb8d5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isNative.js
@@ -0,0 +1,40 @@
+var baseIsNative = require('./_baseIsNative'),
+ isMaskable = require('./_isMaskable');
+
+/** Error message constants. */
+var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.';
+
+/**
+ * Checks if `value` is a pristine native function.
+ *
+ * **Note:** This method can't reliably detect native functions in the presence
+ * of the core-js package because core-js circumvents this kind of detection.
+ * Despite multiple requests, the core-js maintainer has made it clear: any
+ * attempt to fix the detection will be obstructed. As a result, we're left
+ * with little choice but to throw an error. Unfortunately, this also affects
+ * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
+ * which rely on core-js.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ * @example
+ *
+ * _.isNative(Array.prototype.push);
+ * // => true
+ *
+ * _.isNative(_);
+ * // => false
+ */
+function isNative(value) {
+ if (isMaskable(value)) {
+ throw new Error(CORE_ERROR_TEXT);
+ }
+ return baseIsNative(value);
+}
+
+module.exports = isNative;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isNil.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isNil.js
new file mode 100644
index 0000000..79f0505
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isNil.js
@@ -0,0 +1,25 @@
+/**
+ * Checks if `value` is `null` or `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
+ * @example
+ *
+ * _.isNil(null);
+ * // => true
+ *
+ * _.isNil(void 0);
+ * // => true
+ *
+ * _.isNil(NaN);
+ * // => false
+ */
+function isNil(value) {
+ return value == null;
+}
+
+module.exports = isNil;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isNull.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isNull.js
new file mode 100644
index 0000000..c0a374d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isNull.js
@@ -0,0 +1,22 @@
+/**
+ * Checks if `value` is `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
+ * @example
+ *
+ * _.isNull(null);
+ * // => true
+ *
+ * _.isNull(void 0);
+ * // => false
+ */
+function isNull(value) {
+ return value === null;
+}
+
+module.exports = isNull;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isNumber.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isNumber.js
new file mode 100644
index 0000000..cd34ee4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isNumber.js
@@ -0,0 +1,38 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var numberTag = '[object Number]';
+
+/**
+ * Checks if `value` is classified as a `Number` primitive or object.
+ *
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
+ * classified as numbers, use the `_.isFinite` method.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a number, else `false`.
+ * @example
+ *
+ * _.isNumber(3);
+ * // => true
+ *
+ * _.isNumber(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isNumber(Infinity);
+ * // => true
+ *
+ * _.isNumber('3');
+ * // => false
+ */
+function isNumber(value) {
+ return typeof value == 'number' ||
+ (isObjectLike(value) && baseGetTag(value) == numberTag);
+}
+
+module.exports = isNumber;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isObject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isObject.js
new file mode 100644
index 0000000..1dc8939
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isObject.js
@@ -0,0 +1,31 @@
+/**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+function isObject(value) {
+ var type = typeof value;
+ return value != null && (type == 'object' || type == 'function');
+}
+
+module.exports = isObject;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isObjectLike.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isObjectLike.js
new file mode 100644
index 0000000..301716b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isObjectLike.js
@@ -0,0 +1,29 @@
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return value != null && typeof value == 'object';
+}
+
+module.exports = isObjectLike;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isPlainObject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isPlainObject.js
new file mode 100644
index 0000000..2387373
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isPlainObject.js
@@ -0,0 +1,62 @@
+var baseGetTag = require('./_baseGetTag'),
+ getPrototype = require('./_getPrototype'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var objectTag = '[object Object]';
+
+/** Used for built-in method references. */
+var funcProto = Function.prototype,
+ objectProto = Object.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString = funcProto.toString;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/** Used to infer the `Object` constructor. */
+var objectCtorString = funcToString.call(Object);
+
+/**
+ * Checks if `value` is a plain object, that is, an object created by the
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.8.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * _.isPlainObject(new Foo);
+ * // => false
+ *
+ * _.isPlainObject([1, 2, 3]);
+ * // => false
+ *
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
+ * // => true
+ *
+ * _.isPlainObject(Object.create(null));
+ * // => true
+ */
+function isPlainObject(value) {
+ if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
+ return false;
+ }
+ var proto = getPrototype(value);
+ if (proto === null) {
+ return true;
+ }
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
+ return typeof Ctor == 'function' && Ctor instanceof Ctor &&
+ funcToString.call(Ctor) == objectCtorString;
+}
+
+module.exports = isPlainObject;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isRegExp.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isRegExp.js
new file mode 100644
index 0000000..76c9b6e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isRegExp.js
@@ -0,0 +1,27 @@
+var baseIsRegExp = require('./_baseIsRegExp'),
+ baseUnary = require('./_baseUnary'),
+ nodeUtil = require('./_nodeUtil');
+
+/* Node.js helper references. */
+var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp;
+
+/**
+ * Checks if `value` is classified as a `RegExp` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ * @example
+ *
+ * _.isRegExp(/abc/);
+ * // => true
+ *
+ * _.isRegExp('/abc/');
+ * // => false
+ */
+var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
+
+module.exports = isRegExp;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isSafeInteger.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isSafeInteger.js
new file mode 100644
index 0000000..2a48526
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isSafeInteger.js
@@ -0,0 +1,37 @@
+var isInteger = require('./isInteger');
+
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
+ * double precision number which isn't the result of a rounded unsafe integer.
+ *
+ * **Note:** This method is based on
+ * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
+ * @example
+ *
+ * _.isSafeInteger(3);
+ * // => true
+ *
+ * _.isSafeInteger(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isSafeInteger(Infinity);
+ * // => false
+ *
+ * _.isSafeInteger('3');
+ * // => false
+ */
+function isSafeInteger(value) {
+ return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
+}
+
+module.exports = isSafeInteger;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isSet.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isSet.js
new file mode 100644
index 0000000..ab88bdf
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isSet.js
@@ -0,0 +1,27 @@
+var baseIsSet = require('./_baseIsSet'),
+ baseUnary = require('./_baseUnary'),
+ nodeUtil = require('./_nodeUtil');
+
+/* Node.js helper references. */
+var nodeIsSet = nodeUtil && nodeUtil.isSet;
+
+/**
+ * Checks if `value` is classified as a `Set` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
+ * @example
+ *
+ * _.isSet(new Set);
+ * // => true
+ *
+ * _.isSet(new WeakSet);
+ * // => false
+ */
+var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
+
+module.exports = isSet;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isString.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isString.js
new file mode 100644
index 0000000..627eb9c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isString.js
@@ -0,0 +1,30 @@
+var baseGetTag = require('./_baseGetTag'),
+ isArray = require('./isArray'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var stringTag = '[object String]';
+
+/**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+function isString(value) {
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
+}
+
+module.exports = isString;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isSymbol.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isSymbol.js
new file mode 100644
index 0000000..dfb60b9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isSymbol.js
@@ -0,0 +1,29 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var symbolTag = '[object Symbol]';
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && baseGetTag(value) == symbolTag);
+}
+
+module.exports = isSymbol;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isTypedArray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isTypedArray.js
new file mode 100644
index 0000000..da3f8dd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isTypedArray.js
@@ -0,0 +1,27 @@
+var baseIsTypedArray = require('./_baseIsTypedArray'),
+ baseUnary = require('./_baseUnary'),
+ nodeUtil = require('./_nodeUtil');
+
+/* Node.js helper references. */
+var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
+
+/**
+ * Checks if `value` is classified as a typed array.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ * @example
+ *
+ * _.isTypedArray(new Uint8Array);
+ * // => true
+ *
+ * _.isTypedArray([]);
+ * // => false
+ */
+var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
+
+module.exports = isTypedArray;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isUndefined.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isUndefined.js
new file mode 100644
index 0000000..377d121
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isUndefined.js
@@ -0,0 +1,22 @@
+/**
+ * Checks if `value` is `undefined`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
+ * @example
+ *
+ * _.isUndefined(void 0);
+ * // => true
+ *
+ * _.isUndefined(null);
+ * // => false
+ */
+function isUndefined(value) {
+ return value === undefined;
+}
+
+module.exports = isUndefined;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isWeakMap.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isWeakMap.js
new file mode 100644
index 0000000..8d36f66
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isWeakMap.js
@@ -0,0 +1,28 @@
+var getTag = require('./_getTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var weakMapTag = '[object WeakMap]';
+
+/**
+ * Checks if `value` is classified as a `WeakMap` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
+ * @example
+ *
+ * _.isWeakMap(new WeakMap);
+ * // => true
+ *
+ * _.isWeakMap(new Map);
+ * // => false
+ */
+function isWeakMap(value) {
+ return isObjectLike(value) && getTag(value) == weakMapTag;
+}
+
+module.exports = isWeakMap;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isWeakSet.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isWeakSet.js
new file mode 100644
index 0000000..e628b26
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/isWeakSet.js
@@ -0,0 +1,28 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var weakSetTag = '[object WeakSet]';
+
+/**
+ * Checks if `value` is classified as a `WeakSet` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
+ * @example
+ *
+ * _.isWeakSet(new WeakSet);
+ * // => true
+ *
+ * _.isWeakSet(new Set);
+ * // => false
+ */
+function isWeakSet(value) {
+ return isObjectLike(value) && baseGetTag(value) == weakSetTag;
+}
+
+module.exports = isWeakSet;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/iteratee.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/iteratee.js
new file mode 100644
index 0000000..61b73a8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/iteratee.js
@@ -0,0 +1,53 @@
+var baseClone = require('./_baseClone'),
+ baseIteratee = require('./_baseIteratee');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1;
+
+/**
+ * Creates a function that invokes `func` with the arguments of the created
+ * function. If `func` is a property name, the created function returns the
+ * property value for a given element. If `func` is an array or object, the
+ * created function returns `true` for elements that contain the equivalent
+ * source properties, otherwise it returns `false`.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Util
+ * @param {*} [func=_.identity] The value to convert to a callback.
+ * @returns {Function} Returns the callback.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
+ * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, _.iteratee(['user', 'fred']));
+ * // => [{ 'user': 'fred', 'age': 40 }]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, _.iteratee('user'));
+ * // => ['barney', 'fred']
+ *
+ * // Create custom iteratee shorthands.
+ * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
+ * return !_.isRegExp(func) ? iteratee(func) : function(string) {
+ * return func.test(string);
+ * };
+ * });
+ *
+ * _.filter(['abc', 'def'], /ef/);
+ * // => ['def']
+ */
+function iteratee(func) {
+ return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
+}
+
+module.exports = iteratee;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/join.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/join.js
new file mode 100644
index 0000000..45de079
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/join.js
@@ -0,0 +1,26 @@
+/** Used for built-in method references. */
+var arrayProto = Array.prototype;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeJoin = arrayProto.join;
+
+/**
+ * Converts all elements in `array` into a string separated by `separator`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to convert.
+ * @param {string} [separator=','] The element separator.
+ * @returns {string} Returns the joined string.
+ * @example
+ *
+ * _.join(['a', 'b', 'c'], '~');
+ * // => 'a~b~c'
+ */
+function join(array, separator) {
+ return array == null ? '' : nativeJoin.call(array, separator);
+}
+
+module.exports = join;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/kebabCase.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/kebabCase.js
new file mode 100644
index 0000000..8a52be6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/kebabCase.js
@@ -0,0 +1,28 @@
+var createCompounder = require('./_createCompounder');
+
+/**
+ * Converts `string` to
+ * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the kebab cased string.
+ * @example
+ *
+ * _.kebabCase('Foo Bar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('fooBar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('__FOO_BAR__');
+ * // => 'foo-bar'
+ */
+var kebabCase = createCompounder(function(result, word, index) {
+ return result + (index ? '-' : '') + word.toLowerCase();
+});
+
+module.exports = kebabCase;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/keyBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/keyBy.js
new file mode 100644
index 0000000..acc007a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/keyBy.js
@@ -0,0 +1,36 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ createAggregator = require('./_createAggregator');
+
+/**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The corresponding value of
+ * each key is the last element responsible for generating the key. The
+ * iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * var array = [
+ * { 'dir': 'left', 'code': 97 },
+ * { 'dir': 'right', 'code': 100 }
+ * ];
+ *
+ * _.keyBy(array, function(o) {
+ * return String.fromCharCode(o.code);
+ * });
+ * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
+ *
+ * _.keyBy(array, 'dir');
+ * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
+ */
+var keyBy = createAggregator(function(result, value, key) {
+ baseAssignValue(result, key, value);
+});
+
+module.exports = keyBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/keys.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/keys.js
new file mode 100644
index 0000000..d143c71
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/keys.js
@@ -0,0 +1,37 @@
+var arrayLikeKeys = require('./_arrayLikeKeys'),
+ baseKeys = require('./_baseKeys'),
+ isArrayLike = require('./isArrayLike');
+
+/**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+function keys(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
+}
+
+module.exports = keys;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/keysIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/keysIn.js
new file mode 100644
index 0000000..a62308f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/keysIn.js
@@ -0,0 +1,32 @@
+var arrayLikeKeys = require('./_arrayLikeKeys'),
+ baseKeysIn = require('./_baseKeysIn'),
+ isArrayLike = require('./isArrayLike');
+
+/**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+function keysIn(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
+}
+
+module.exports = keysIn;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lang.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lang.js
new file mode 100644
index 0000000..a396216
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lang.js
@@ -0,0 +1,58 @@
+module.exports = {
+ 'castArray': require('./castArray'),
+ 'clone': require('./clone'),
+ 'cloneDeep': require('./cloneDeep'),
+ 'cloneDeepWith': require('./cloneDeepWith'),
+ 'cloneWith': require('./cloneWith'),
+ 'conformsTo': require('./conformsTo'),
+ 'eq': require('./eq'),
+ 'gt': require('./gt'),
+ 'gte': require('./gte'),
+ 'isArguments': require('./isArguments'),
+ 'isArray': require('./isArray'),
+ 'isArrayBuffer': require('./isArrayBuffer'),
+ 'isArrayLike': require('./isArrayLike'),
+ 'isArrayLikeObject': require('./isArrayLikeObject'),
+ 'isBoolean': require('./isBoolean'),
+ 'isBuffer': require('./isBuffer'),
+ 'isDate': require('./isDate'),
+ 'isElement': require('./isElement'),
+ 'isEmpty': require('./isEmpty'),
+ 'isEqual': require('./isEqual'),
+ 'isEqualWith': require('./isEqualWith'),
+ 'isError': require('./isError'),
+ 'isFinite': require('./isFinite'),
+ 'isFunction': require('./isFunction'),
+ 'isInteger': require('./isInteger'),
+ 'isLength': require('./isLength'),
+ 'isMap': require('./isMap'),
+ 'isMatch': require('./isMatch'),
+ 'isMatchWith': require('./isMatchWith'),
+ 'isNaN': require('./isNaN'),
+ 'isNative': require('./isNative'),
+ 'isNil': require('./isNil'),
+ 'isNull': require('./isNull'),
+ 'isNumber': require('./isNumber'),
+ 'isObject': require('./isObject'),
+ 'isObjectLike': require('./isObjectLike'),
+ 'isPlainObject': require('./isPlainObject'),
+ 'isRegExp': require('./isRegExp'),
+ 'isSafeInteger': require('./isSafeInteger'),
+ 'isSet': require('./isSet'),
+ 'isString': require('./isString'),
+ 'isSymbol': require('./isSymbol'),
+ 'isTypedArray': require('./isTypedArray'),
+ 'isUndefined': require('./isUndefined'),
+ 'isWeakMap': require('./isWeakMap'),
+ 'isWeakSet': require('./isWeakSet'),
+ 'lt': require('./lt'),
+ 'lte': require('./lte'),
+ 'toArray': require('./toArray'),
+ 'toFinite': require('./toFinite'),
+ 'toInteger': require('./toInteger'),
+ 'toLength': require('./toLength'),
+ 'toNumber': require('./toNumber'),
+ 'toPlainObject': require('./toPlainObject'),
+ 'toSafeInteger': require('./toSafeInteger'),
+ 'toString': require('./toString')
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/last.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/last.js
new file mode 100644
index 0000000..cad1eaf
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/last.js
@@ -0,0 +1,20 @@
+/**
+ * Gets the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the last element of `array`.
+ * @example
+ *
+ * _.last([1, 2, 3]);
+ * // => 3
+ */
+function last(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? array[length - 1] : undefined;
+}
+
+module.exports = last;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lastIndexOf.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lastIndexOf.js
new file mode 100644
index 0000000..dabfb61
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lastIndexOf.js
@@ -0,0 +1,46 @@
+var baseFindIndex = require('./_baseFindIndex'),
+ baseIsNaN = require('./_baseIsNaN'),
+ strictLastIndexOf = require('./_strictLastIndexOf'),
+ toInteger = require('./toInteger');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max,
+ nativeMin = Math.min;
+
+/**
+ * This method is like `_.indexOf` except that it iterates over elements of
+ * `array` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=array.length-1] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.lastIndexOf([1, 2, 1, 2], 2);
+ * // => 3
+ *
+ * // Search from the `fromIndex`.
+ * _.lastIndexOf([1, 2, 1, 2], 2, 2);
+ * // => 1
+ */
+function lastIndexOf(array, value, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = length;
+ if (fromIndex !== undefined) {
+ index = toInteger(fromIndex);
+ index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
+ }
+ return value === value
+ ? strictLastIndexOf(array, value, index)
+ : baseFindIndex(array, baseIsNaN, index, true);
+}
+
+module.exports = lastIndexOf;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lodash.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lodash.js
new file mode 100644
index 0000000..ebd9671
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lodash.js
@@ -0,0 +1,17065 @@
+/**
+ * @license
+ * Lodash <https://lodash.com/>
+ * Copyright JS Foundation and other contributors <https://js.foundation/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+;(function() {
+
+ /** Used as a safe reference for `undefined` in pre-ES5 environments. */
+ var undefined;
+
+ /** Used as the semantic version number. */
+ var VERSION = '4.17.2';
+
+ /** Used as the size to enable large array optimizations. */
+ var LARGE_ARRAY_SIZE = 200;
+
+ /** Error message constants. */
+ var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
+ FUNC_ERROR_TEXT = 'Expected a function';
+
+ /** Used to stand-in for `undefined` hash values. */
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+ /** Used as the maximum memoize cache size. */
+ var MAX_MEMOIZE_SIZE = 500;
+
+ /** Used as the internal argument placeholder. */
+ var PLACEHOLDER = '__lodash_placeholder__';
+
+ /** Used to compose bitmasks for cloning. */
+ var CLONE_DEEP_FLAG = 1,
+ CLONE_FLAT_FLAG = 2,
+ CLONE_SYMBOLS_FLAG = 4;
+
+ /** Used to compose bitmasks for value comparisons. */
+ var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+ /** Used to compose bitmasks for function metadata. */
+ var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_CURRY_BOUND_FLAG = 4,
+ WRAP_CURRY_FLAG = 8,
+ WRAP_CURRY_RIGHT_FLAG = 16,
+ WRAP_PARTIAL_FLAG = 32,
+ WRAP_PARTIAL_RIGHT_FLAG = 64,
+ WRAP_ARY_FLAG = 128,
+ WRAP_REARG_FLAG = 256,
+ WRAP_FLIP_FLAG = 512;
+
+ /** Used as default options for `_.truncate`. */
+ var DEFAULT_TRUNC_LENGTH = 30,
+ DEFAULT_TRUNC_OMISSION = '...';
+
+ /** Used to detect hot functions by number of calls within a span of milliseconds. */
+ var HOT_COUNT = 800,
+ HOT_SPAN = 16;
+
+ /** Used to indicate the type of lazy iteratees. */
+ var LAZY_FILTER_FLAG = 1,
+ LAZY_MAP_FLAG = 2,
+ LAZY_WHILE_FLAG = 3;
+
+ /** Used as references for various `Number` constants. */
+ var INFINITY = 1 / 0,
+ MAX_SAFE_INTEGER = 9007199254740991,
+ MAX_INTEGER = 1.7976931348623157e+308,
+ NAN = 0 / 0;
+
+ /** Used as references for the maximum length and index of an array. */
+ var MAX_ARRAY_LENGTH = 4294967295,
+ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
+ HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
+
+ /** Used to associate wrap methods with their bit flags. */
+ var wrapFlags = [
+ ['ary', WRAP_ARY_FLAG],
+ ['bind', WRAP_BIND_FLAG],
+ ['bindKey', WRAP_BIND_KEY_FLAG],
+ ['curry', WRAP_CURRY_FLAG],
+ ['curryRight', WRAP_CURRY_RIGHT_FLAG],
+ ['flip', WRAP_FLIP_FLAG],
+ ['partial', WRAP_PARTIAL_FLAG],
+ ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
+ ['rearg', WRAP_REARG_FLAG]
+ ];
+
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ asyncTag = '[object AsyncFunction]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ domExcTag = '[object DOMException]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ nullTag = '[object Null]',
+ objectTag = '[object Object]',
+ promiseTag = '[object Promise]',
+ proxyTag = '[object Proxy]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]',
+ undefinedTag = '[object Undefined]',
+ weakMapTag = '[object WeakMap]',
+ weakSetTag = '[object WeakSet]';
+
+ var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+ /** Used to match empty string literals in compiled template source. */
+ var reEmptyStringLeading = /\b__p \+= '';/g,
+ reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
+ reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
+
+ /** Used to match HTML entities and HTML characters. */
+ var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
+ reUnescapedHtml = /[&<>"']/g,
+ reHasEscapedHtml = RegExp(reEscapedHtml.source),
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+
+ /** Used to match template delimiters. */
+ var reEscape = /<%-([\s\S]+?)%>/g,
+ reEvaluate = /<%([\s\S]+?)%>/g,
+ reInterpolate = /<%=([\s\S]+?)%>/g;
+
+ /** Used to match property names within property paths. */
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/,
+ reLeadingDot = /^\./,
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
+
+ /**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
+ */
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
+ reHasRegExpChar = RegExp(reRegExpChar.source);
+
+ /** Used to match leading and trailing whitespace. */
+ var reTrim = /^\s+|\s+$/g,
+ reTrimStart = /^\s+/,
+ reTrimEnd = /\s+$/;
+
+ /** Used to match wrap detail comments. */
+ var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
+ reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
+ reSplitDetails = /,? & /;
+
+ /** Used to match words composed of alphanumeric characters. */
+ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
+
+ /** Used to match backslashes in property paths. */
+ var reEscapeChar = /\\(\\)?/g;
+
+ /**
+ * Used to match
+ * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
+ */
+ var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
+
+ /** Used to match `RegExp` flags from their coerced string values. */
+ var reFlags = /\w*$/;
+
+ /** Used to detect bad signed hexadecimal string values. */
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+ /** Used to detect binary string values. */
+ var reIsBinary = /^0b[01]+$/i;
+
+ /** Used to detect host constructors (Safari). */
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+ /** Used to detect octal string values. */
+ var reIsOctal = /^0o[0-7]+$/i;
+
+ /** Used to detect unsigned integer values. */
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+ /** Used to match Latin Unicode letters (excluding mathematical operators). */
+ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
+
+ /** Used to ensure capturing order of template delimiters. */
+ var reNoMatch = /($^)/;
+
+ /** Used to match unescaped characters in compiled string literals. */
+ var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
+
+ /** Used to compose unicode character classes. */
+ var rsAstralRange = '\\ud800-\\udfff',
+ rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
+ rsDingbatRange = '\\u2700-\\u27bf',
+ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
+ rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
+ rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
+ rsPunctuationRange = '\\u2000-\\u206f',
+ rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
+ rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
+ rsVarRange = '\\ufe0e\\ufe0f',
+ rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
+
+ /** Used to compose unicode capture groups. */
+ var rsApos = "['\u2019]",
+ rsAstral = '[' + rsAstralRange + ']',
+ rsBreak = '[' + rsBreakRange + ']',
+ rsCombo = '[' + rsComboRange + ']',
+ rsDigits = '\\d+',
+ rsDingbat = '[' + rsDingbatRange + ']',
+ rsLower = '[' + rsLowerRange + ']',
+ rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
+ rsNonAstral = '[^' + rsAstralRange + ']',
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
+ rsUpper = '[' + rsUpperRange + ']',
+ rsZWJ = '\\u200d';
+
+ /** Used to compose unicode regexes. */
+ var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
+ rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
+ rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
+ rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
+ reOptMod = rsModifier + '?',
+ rsOptVar = '[' + rsVarRange + ']?',
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
+ rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)',
+ rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)',
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
+ rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
+ rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
+
+ /** Used to match apostrophes. */
+ var reApos = RegExp(rsApos, 'g');
+
+ /**
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
+ */
+ var reComboMark = RegExp(rsCombo, 'g');
+
+ /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
+ var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
+
+ /** Used to match complex or compound words. */
+ var reUnicodeWord = RegExp([
+ rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
+ rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
+ rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
+ rsUpper + '+' + rsOptContrUpper,
+ rsOrdUpper,
+ rsOrdLower,
+ rsDigits,
+ rsEmoji
+ ].join('|'), 'g');
+
+ /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
+ var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
+
+ /** Used to detect strings that need a more robust regexp to match words. */
+ var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
+
+ /** Used to assign default `context` object properties. */
+ var contextProps = [
+ 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
+ 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
+ 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
+ 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
+ '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
+ ];
+
+ /** Used to make template sourceURLs easier to identify. */
+ var templateCounter = -1;
+
+ /** Used to identify `toStringTag` values of typed arrays. */
+ var typedArrayTags = {};
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+ typedArrayTags[uint32Tag] = true;
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+ typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
+ typedArrayTags[errorTag] = typedArrayTags[funcTag] =
+ typedArrayTags[mapTag] = typedArrayTags[numberTag] =
+ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
+ typedArrayTags[setTag] = typedArrayTags[stringTag] =
+ typedArrayTags[weakMapTag] = false;
+
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
+ var cloneableTags = {};
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
+ cloneableTags[weakMapTag] = false;
+
+ /** Used to map Latin Unicode letters to basic Latin letters. */
+ var deburredLetters = {
+ // Latin-1 Supplement block.
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
+ '\xc7': 'C', '\xe7': 'c',
+ '\xd0': 'D', '\xf0': 'd',
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
+ '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
+ '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
+ '\xd1': 'N', '\xf1': 'n',
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
+ '\xc6': 'Ae', '\xe6': 'ae',
+ '\xde': 'Th', '\xfe': 'th',
+ '\xdf': 'ss',
+ // Latin Extended-A block.
+ '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
+ '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
+ '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
+ '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
+ '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
+ '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
+ '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
+ '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
+ '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
+ '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
+ '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
+ '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
+ '\u0134': 'J', '\u0135': 'j',
+ '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
+ '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
+ '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
+ '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
+ '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
+ '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
+ '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
+ '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
+ '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
+ '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
+ '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
+ '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
+ '\u0163': 't', '\u0165': 't', '\u0167': 't',
+ '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
+ '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
+ '\u0174': 'W', '\u0175': 'w',
+ '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
+ '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
+ '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
+ '\u0132': 'IJ', '\u0133': 'ij',
+ '\u0152': 'Oe', '\u0153': 'oe',
+ '\u0149': "'n", '\u017f': 's'
+ };
+
+ /** Used to map characters to HTML entities. */
+ var htmlEscapes = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#39;'
+ };
+
+ /** Used to map HTML entities to characters. */
+ var htmlUnescapes = {
+ '&amp;': '&',
+ '&lt;': '<',
+ '&gt;': '>',
+ '&quot;': '"',
+ '&#39;': "'"
+ };
+
+ /** Used to escape characters for inclusion in compiled string literals. */
+ var stringEscapes = {
+ '\\': '\\',
+ "'": "'",
+ '\n': 'n',
+ '\r': 'r',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+ };
+
+ /** Built-in method references without a dependency on `root`. */
+ var freeParseFloat = parseFloat,
+ freeParseInt = parseInt;
+
+ /** Detect free variable `global` from Node.js. */
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+ /** Detect free variable `self`. */
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+ /** Used as a reference to the global object. */
+ var root = freeGlobal || freeSelf || Function('return this')();
+
+ /** Detect free variable `exports`. */
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
+
+ /** Detect free variable `module`. */
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+ /** Detect the popular CommonJS extension `module.exports`. */
+ var moduleExports = freeModule && freeModule.exports === freeExports;
+
+ /** Detect free variable `process` from Node.js. */
+ var freeProcess = moduleExports && freeGlobal.process;
+
+ /** Used to access faster Node.js helpers. */
+ var nodeUtil = (function() {
+ try {
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
+ } catch (e) {}
+ }());
+
+ /* Node.js helper references. */
+ var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
+ nodeIsDate = nodeUtil && nodeUtil.isDate,
+ nodeIsMap = nodeUtil && nodeUtil.isMap,
+ nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
+ nodeIsSet = nodeUtil && nodeUtil.isSet,
+ nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Adds the key-value `pair` to `map`.
+ *
+ * @private
+ * @param {Object} map The map to modify.
+ * @param {Array} pair The key-value pair to add.
+ * @returns {Object} Returns `map`.
+ */
+ function addMapEntry(map, pair) {
+ // Don't return `map.set` because it's not chainable in IE 11.
+ map.set(pair[0], pair[1]);
+ return map;
+ }
+
+ /**
+ * Adds `value` to `set`.
+ *
+ * @private
+ * @param {Object} set The set to modify.
+ * @param {*} value The value to add.
+ * @returns {Object} Returns `set`.
+ */
+ function addSetEntry(set, value) {
+ // Don't return `set.add` because it's not chainable in IE 11.
+ set.add(value);
+ return set;
+ }
+
+ /**
+ * A faster alternative to `Function#apply`, this function invokes `func`
+ * with the `this` binding of `thisArg` and the arguments of `args`.
+ *
+ * @private
+ * @param {Function} func The function to invoke.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} args The arguments to invoke `func` with.
+ * @returns {*} Returns the result of `func`.
+ */
+ function apply(func, thisArg, args) {
+ switch (args.length) {
+ case 0: return func.call(thisArg);
+ case 1: return func.call(thisArg, args[0]);
+ case 2: return func.call(thisArg, args[0], args[1]);
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
+ }
+ return func.apply(thisArg, args);
+ }
+
+ /**
+ * A specialized version of `baseAggregator` for arrays.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform keys.
+ * @param {Object} accumulator The initial aggregated object.
+ * @returns {Function} Returns `accumulator`.
+ */
+ function arrayAggregator(array, setter, iteratee, accumulator) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ var value = array[index];
+ setter(accumulator, value, iteratee(value), array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * A specialized version of `_.forEach` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayEach(array, iteratee) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (iteratee(array[index], index, array) === false) {
+ break;
+ }
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.forEachRight` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayEachRight(array, iteratee) {
+ var length = array == null ? 0 : array.length;
+
+ while (length--) {
+ if (iteratee(array[length], length, array) === false) {
+ break;
+ }
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.every` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ */
+ function arrayEvery(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (!predicate(array[index], index, array)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * A specialized version of `_.filter` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+ function arrayFilter(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `_.includes` for arrays without support for
+ * specifying an index to search from.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+ function arrayIncludes(array, value) {
+ var length = array == null ? 0 : array.length;
+ return !!length && baseIndexOf(array, value, 0) > -1;
+ }
+
+ /**
+ * This function is like `arrayIncludes` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+ function arrayIncludesWith(array, value, comparator) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (comparator(value, array[index])) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `_.map` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+ function arrayMap(array, iteratee) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
+ }
+ return result;
+ }
+
+ /**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayPush(array, values) {
+ var index = -1,
+ length = values.length,
+ offset = array.length;
+
+ while (++index < length) {
+ array[offset + index] = values[index];
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.reduce` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ if (initAccum && length) {
+ accumulator = array[++index];
+ }
+ while (++index < length) {
+ accumulator = iteratee(accumulator, array[index], index, array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * A specialized version of `_.reduceRight` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the last element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+ function arrayReduceRight(array, iteratee, accumulator, initAccum) {
+ var length = array == null ? 0 : array.length;
+ if (initAccum && length) {
+ accumulator = array[--length];
+ }
+ while (length--) {
+ accumulator = iteratee(accumulator, array[length], length, array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * A specialized version of `_.some` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function arraySome(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (predicate(array[index], index, array)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Gets the size of an ASCII `string`.
+ *
+ * @private
+ * @param {string} string The string inspect.
+ * @returns {number} Returns the string size.
+ */
+ var asciiSize = baseProperty('length');
+
+ /**
+ * Converts an ASCII `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function asciiToArray(string) {
+ return string.split('');
+ }
+
+ /**
+ * Splits an ASCII `string` into an array of its words.
+ *
+ * @private
+ * @param {string} The string to inspect.
+ * @returns {Array} Returns the words of `string`.
+ */
+ function asciiWords(string) {
+ return string.match(reAsciiWord) || [];
+ }
+
+ /**
+ * The base implementation of methods like `_.findKey` and `_.findLastKey`,
+ * without support for iteratee shorthands, which iterates over `collection`
+ * using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the found element or its key, else `undefined`.
+ */
+ function baseFindKey(collection, predicate, eachFunc) {
+ var result;
+ eachFunc(collection, function(value, key, collection) {
+ if (predicate(value, key, collection)) {
+ result = key;
+ return false;
+ }
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {number} fromIndex The index to search from.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseFindIndex(array, predicate, fromIndex, fromRight) {
+ var length = array.length,
+ index = fromIndex + (fromRight ? 1 : -1);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (predicate(array[index], index, array)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseIndexOf(array, value, fromIndex) {
+ return value === value
+ ? strictIndexOf(array, value, fromIndex)
+ : baseFindIndex(array, baseIsNaN, fromIndex);
+ }
+
+ /**
+ * This function is like `baseIndexOf` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseIndexOfWith(array, value, fromIndex, comparator) {
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (comparator(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `_.isNaN` without support for number objects.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ */
+ function baseIsNaN(value) {
+ return value !== value;
+ }
+
+ /**
+ * The base implementation of `_.mean` and `_.meanBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the mean.
+ */
+ function baseMean(array, iteratee) {
+ var length = array == null ? 0 : array.length;
+ return length ? (baseSum(array, iteratee) / length) : NAN;
+ }
+
+ /**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+ }
+
+ /**
+ * The base implementation of `_.propertyOf` without support for deep paths.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function basePropertyOf(object) {
+ return function(key) {
+ return object == null ? undefined : object[key];
+ };
+ }
+
+ /**
+ * The base implementation of `_.reduce` and `_.reduceRight`, without support
+ * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} accumulator The initial value.
+ * @param {boolean} initAccum Specify using the first or last element of
+ * `collection` as the initial value.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the accumulated value.
+ */
+ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
+ eachFunc(collection, function(value, index, collection) {
+ accumulator = initAccum
+ ? (initAccum = false, value)
+ : iteratee(accumulator, value, index, collection);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.sortBy` which uses `comparer` to define the
+ * sort order of `array` and replaces criteria objects with their corresponding
+ * values.
+ *
+ * @private
+ * @param {Array} array The array to sort.
+ * @param {Function} comparer The function to define sort order.
+ * @returns {Array} Returns `array`.
+ */
+ function baseSortBy(array, comparer) {
+ var length = array.length;
+
+ array.sort(comparer);
+ while (length--) {
+ array[length] = array[length].value;
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.sum` and `_.sumBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the sum.
+ */
+ function baseSum(array, iteratee) {
+ var result,
+ index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var current = iteratee(array[index]);
+ if (current !== undefined) {
+ result = result === undefined ? current : (result + current);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
+ *
+ * @private
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ */
+ function baseTimes(n, iteratee) {
+ var index = -1,
+ result = Array(n);
+
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
+ * of key-value pairs for `object` corresponding to the property names of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the key-value pairs.
+ */
+ function baseToPairs(object, props) {
+ return arrayMap(props, function(key) {
+ return [key, object[key]];
+ });
+ }
+
+ /**
+ * The base implementation of `_.unary` without support for storing metadata.
+ *
+ * @private
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ */
+ function baseUnary(func) {
+ return function(value) {
+ return func(value);
+ };
+ }
+
+ /**
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
+ * array of `object` property values corresponding to the property names
+ * of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the array of property values.
+ */
+ function baseValues(object, props) {
+ return arrayMap(props, function(key) {
+ return object[key];
+ });
+ }
+
+ /**
+ * Checks if a `cache` value for `key` exists.
+ *
+ * @private
+ * @param {Object} cache The cache to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function cacheHas(cache, key) {
+ return cache.has(key);
+ }
+
+ /**
+ * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
+ * that is not found in the character symbols.
+ *
+ * @private
+ * @param {Array} strSymbols The string symbols to inspect.
+ * @param {Array} chrSymbols The character symbols to find.
+ * @returns {number} Returns the index of the first unmatched string symbol.
+ */
+ function charsStartIndex(strSymbols, chrSymbols) {
+ var index = -1,
+ length = strSymbols.length;
+
+ while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
+ return index;
+ }
+
+ /**
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
+ * that is not found in the character symbols.
+ *
+ * @private
+ * @param {Array} strSymbols The string symbols to inspect.
+ * @param {Array} chrSymbols The character symbols to find.
+ * @returns {number} Returns the index of the last unmatched string symbol.
+ */
+ function charsEndIndex(strSymbols, chrSymbols) {
+ var index = strSymbols.length;
+
+ while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
+ return index;
+ }
+
+ /**
+ * Gets the number of `placeholder` occurrences in `array`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} placeholder The placeholder to search for.
+ * @returns {number} Returns the placeholder count.
+ */
+ function countHolders(array, placeholder) {
+ var length = array.length,
+ result = 0;
+
+ while (length--) {
+ if (array[length] === placeholder) {
+ ++result;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
+ * letters to basic Latin letters.
+ *
+ * @private
+ * @param {string} letter The matched letter to deburr.
+ * @returns {string} Returns the deburred letter.
+ */
+ var deburrLetter = basePropertyOf(deburredLetters);
+
+ /**
+ * Used by `_.escape` to convert characters to HTML entities.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+ var escapeHtmlChar = basePropertyOf(htmlEscapes);
+
+ /**
+ * Used by `_.template` to escape characters for inclusion in compiled string literals.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+ function escapeStringChar(chr) {
+ return '\\' + stringEscapes[chr];
+ }
+
+ /**
+ * Gets the value at `key` of `object`.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+ function getValue(object, key) {
+ return object == null ? undefined : object[key];
+ }
+
+ /**
+ * Checks if `string` contains Unicode symbols.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {boolean} Returns `true` if a symbol is found, else `false`.
+ */
+ function hasUnicode(string) {
+ return reHasUnicode.test(string);
+ }
+
+ /**
+ * Checks if `string` contains a word composed of Unicode symbols.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {boolean} Returns `true` if a word is found, else `false`.
+ */
+ function hasUnicodeWord(string) {
+ return reHasUnicodeWord.test(string);
+ }
+
+ /**
+ * Converts `iterator` to an array.
+ *
+ * @private
+ * @param {Object} iterator The iterator to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function iteratorToArray(iterator) {
+ var data,
+ result = [];
+
+ while (!(data = iterator.next()).done) {
+ result.push(data.value);
+ }
+ return result;
+ }
+
+ /**
+ * Converts `map` to its key-value pairs.
+ *
+ * @private
+ * @param {Object} map The map to convert.
+ * @returns {Array} Returns the key-value pairs.
+ */
+ function mapToArray(map) {
+ var index = -1,
+ result = Array(map.size);
+
+ map.forEach(function(value, key) {
+ result[++index] = [key, value];
+ });
+ return result;
+ }
+
+ /**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
+ }
+
+ /**
+ * Replaces all `placeholder` elements in `array` with an internal placeholder
+ * and returns an array of their indexes.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {*} placeholder The placeholder to replace.
+ * @returns {Array} Returns the new array of placeholder indexes.
+ */
+ function replaceHolders(array, placeholder) {
+ var index = -1,
+ length = array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value === placeholder || value === PLACEHOLDER) {
+ array[index] = PLACEHOLDER;
+ result[resIndex++] = index;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts `set` to an array of its values.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the values.
+ */
+ function setToArray(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = value;
+ });
+ return result;
+ }
+
+ /**
+ * Converts `set` to its value-value pairs.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the value-value pairs.
+ */
+ function setToPairs(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = [value, value];
+ });
+ return result;
+ }
+
+ /**
+ * A specialized version of `_.indexOf` which performs strict equality
+ * comparisons of values, i.e. `===`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function strictIndexOf(array, value, fromIndex) {
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * A specialized version of `_.lastIndexOf` which performs strict equality
+ * comparisons of values, i.e. `===`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function strictLastIndexOf(array, value, fromIndex) {
+ var index = fromIndex + 1;
+ while (index--) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return index;
+ }
+
+ /**
+ * Gets the number of symbols in `string`.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {number} Returns the string size.
+ */
+ function stringSize(string) {
+ return hasUnicode(string)
+ ? unicodeSize(string)
+ : asciiSize(string);
+ }
+
+ /**
+ * Converts `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function stringToArray(string) {
+ return hasUnicode(string)
+ ? unicodeToArray(string)
+ : asciiToArray(string);
+ }
+
+ /**
+ * Used by `_.unescape` to convert HTML entities to characters.
+ *
+ * @private
+ * @param {string} chr The matched character to unescape.
+ * @returns {string} Returns the unescaped character.
+ */
+ var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
+
+ /**
+ * Gets the size of a Unicode `string`.
+ *
+ * @private
+ * @param {string} string The string inspect.
+ * @returns {number} Returns the string size.
+ */
+ function unicodeSize(string) {
+ var result = reUnicode.lastIndex = 0;
+ while (reUnicode.test(string)) {
+ ++result;
+ }
+ return result;
+ }
+
+ /**
+ * Converts a Unicode `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function unicodeToArray(string) {
+ return string.match(reUnicode) || [];
+ }
+
+ /**
+ * Splits a Unicode `string` into an array of its words.
+ *
+ * @private
+ * @param {string} The string to inspect.
+ * @returns {Array} Returns the words of `string`.
+ */
+ function unicodeWords(string) {
+ return string.match(reUnicodeWord) || [];
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Create a new pristine `lodash` function using the `context` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Util
+ * @param {Object} [context=root] The context object.
+ * @returns {Function} Returns a new `lodash` function.
+ * @example
+ *
+ * _.mixin({ 'foo': _.constant('foo') });
+ *
+ * var lodash = _.runInContext();
+ * lodash.mixin({ 'bar': lodash.constant('bar') });
+ *
+ * _.isFunction(_.foo);
+ * // => true
+ * _.isFunction(_.bar);
+ * // => false
+ *
+ * lodash.isFunction(lodash.foo);
+ * // => false
+ * lodash.isFunction(lodash.bar);
+ * // => true
+ *
+ * // Create a suped-up `defer` in Node.js.
+ * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
+ */
+ var runInContext = (function runInContext(context) {
+ context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
+
+ /** Built-in constructor references. */
+ var Array = context.Array,
+ Date = context.Date,
+ Error = context.Error,
+ Function = context.Function,
+ Math = context.Math,
+ Object = context.Object,
+ RegExp = context.RegExp,
+ String = context.String,
+ TypeError = context.TypeError;
+
+ /** Used for built-in method references. */
+ var arrayProto = Array.prototype,
+ funcProto = Function.prototype,
+ objectProto = Object.prototype;
+
+ /** Used to detect overreaching core-js shims. */
+ var coreJsData = context['__core-js_shared__'];
+
+ /** Used to resolve the decompiled source of functions. */
+ var funcToString = funcProto.toString;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /** Used to generate unique IDs. */
+ var idCounter = 0;
+
+ /** Used to detect methods masquerading as native. */
+ var maskSrcKey = (function() {
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
+ return uid ? ('Symbol(src)_1.' + uid) : '';
+ }());
+
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var nativeObjectToString = objectProto.toString;
+
+ /** Used to infer the `Object` constructor. */
+ var objectCtorString = funcToString.call(Object);
+
+ /** Used to restore the original `_` reference in `_.noConflict`. */
+ var oldDash = root._;
+
+ /** Used to detect if a method is native. */
+ var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+ );
+
+ /** Built-in value references. */
+ var Buffer = moduleExports ? context.Buffer : undefined,
+ Symbol = context.Symbol,
+ Uint8Array = context.Uint8Array,
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
+ getPrototype = overArg(Object.getPrototypeOf, Object),
+ objectCreate = Object.create,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
+ splice = arrayProto.splice,
+ spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
+ symIterator = Symbol ? Symbol.iterator : undefined,
+ symToStringTag = Symbol ? Symbol.toStringTag : undefined;
+
+ var defineProperty = (function() {
+ try {
+ var func = getNative(Object, 'defineProperty');
+ func({}, '', {});
+ return func;
+ } catch (e) {}
+ }());
+
+ /** Mocked built-ins. */
+ var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
+ ctxNow = Date && Date.now !== root.Date.now && Date.now,
+ ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
+
+ /* Built-in method references for those with the same name as other `lodash` methods. */
+ var nativeCeil = Math.ceil,
+ nativeFloor = Math.floor,
+ nativeGetSymbols = Object.getOwnPropertySymbols,
+ nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
+ nativeIsFinite = context.isFinite,
+ nativeJoin = arrayProto.join,
+ nativeKeys = overArg(Object.keys, Object),
+ nativeMax = Math.max,
+ nativeMin = Math.min,
+ nativeNow = Date.now,
+ nativeParseInt = context.parseInt,
+ nativeRandom = Math.random,
+ nativeReverse = arrayProto.reverse;
+
+ /* Built-in method references that are verified to be native. */
+ var DataView = getNative(context, 'DataView'),
+ Map = getNative(context, 'Map'),
+ Promise = getNative(context, 'Promise'),
+ Set = getNative(context, 'Set'),
+ WeakMap = getNative(context, 'WeakMap'),
+ nativeCreate = getNative(Object, 'create');
+
+ /** Used to store function metadata. */
+ var metaMap = WeakMap && new WeakMap;
+
+ /** Used to lookup unminified function names. */
+ var realNames = {};
+
+ /** Used to detect maps, sets, and weakmaps. */
+ var dataViewCtorString = toSource(DataView),
+ mapCtorString = toSource(Map),
+ promiseCtorString = toSource(Promise),
+ setCtorString = toSource(Set),
+ weakMapCtorString = toSource(WeakMap);
+
+ /** Used to convert symbols to primitives and strings. */
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` object which wraps `value` to enable implicit method
+ * chain sequences. Methods that operate on and return arrays, collections,
+ * and functions can be chained together. Methods that retrieve a single value
+ * or may return a primitive value will automatically end the chain sequence
+ * and return the unwrapped value. Otherwise, the value must be unwrapped
+ * with `_#value`.
+ *
+ * Explicit chain sequences, which must be unwrapped with `_#value`, may be
+ * enabled using `_.chain`.
+ *
+ * The execution of chained methods is lazy, that is, it's deferred until
+ * `_#value` is implicitly or explicitly called.
+ *
+ * Lazy evaluation allows several methods to support shortcut fusion.
+ * Shortcut fusion is an optimization to merge iteratee calls; this avoids
+ * the creation of intermediate arrays and can greatly reduce the number of
+ * iteratee executions. Sections of a chain sequence qualify for shortcut
+ * fusion if the section is applied to an array of at least `200` elements
+ * and any iteratees accept only one argument. The heuristic for whether a
+ * section qualifies for shortcut fusion is subject to change.
+ *
+ * Chaining is supported in custom builds as long as the `_#value` method is
+ * directly or indirectly included in the build.
+ *
+ * In addition to lodash methods, wrappers have `Array` and `String` methods.
+ *
+ * The wrapper `Array` methods are:
+ * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
+ *
+ * The wrapper `String` methods are:
+ * `replace` and `split`
+ *
+ * The wrapper methods that support shortcut fusion are:
+ * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
+ * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
+ * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
+ *
+ * The chainable wrapper methods are:
+ * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
+ * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
+ * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
+ * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
+ * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
+ * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
+ * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
+ * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
+ * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
+ * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
+ * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
+ * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
+ * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
+ * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
+ * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
+ * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
+ * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
+ * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
+ * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
+ * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
+ * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
+ * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
+ * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
+ * `zipObject`, `zipObjectDeep`, and `zipWith`
+ *
+ * The wrapper methods that are **not** chainable by default are:
+ * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
+ * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
+ * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
+ * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
+ * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
+ * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
+ * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
+ * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
+ * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
+ * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
+ * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
+ * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
+ * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
+ * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
+ * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
+ * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
+ * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
+ * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
+ * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
+ * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
+ * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
+ * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
+ * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
+ * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
+ * `upperFirst`, `value`, and `words`
+ *
+ * @name _
+ * @constructor
+ * @category Seq
+ * @param {*} value The value to wrap in a `lodash` instance.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2, 3]);
+ *
+ * // Returns an unwrapped value.
+ * wrapped.reduce(_.add);
+ * // => 6
+ *
+ * // Returns a wrapped value.
+ * var squares = wrapped.map(square);
+ *
+ * _.isArray(squares);
+ * // => false
+ *
+ * _.isArray(squares.value());
+ * // => true
+ */
+ function lodash(value) {
+ if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
+ if (value instanceof LodashWrapper) {
+ return value;
+ }
+ if (hasOwnProperty.call(value, '__wrapped__')) {
+ return wrapperClone(value);
+ }
+ }
+ return new LodashWrapper(value);
+ }
+
+ /**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} proto The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+ var baseCreate = (function() {
+ function object() {}
+ return function(proto) {
+ if (!isObject(proto)) {
+ return {};
+ }
+ if (objectCreate) {
+ return objectCreate(proto);
+ }
+ object.prototype = proto;
+ var result = new object;
+ object.prototype = undefined;
+ return result;
+ };
+ }());
+
+ /**
+ * The function whose prototype chain sequence wrappers inherit from.
+ *
+ * @private
+ */
+ function baseLodash() {
+ // No operation performed.
+ }
+
+ /**
+ * The base constructor for creating `lodash` wrapper objects.
+ *
+ * @private
+ * @param {*} value The value to wrap.
+ * @param {boolean} [chainAll] Enable explicit method chain sequences.
+ */
+ function LodashWrapper(value, chainAll) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__chain__ = !!chainAll;
+ this.__index__ = 0;
+ this.__values__ = undefined;
+ }
+
+ /**
+ * By default, the template delimiters used by lodash are like those in
+ * embedded Ruby (ERB). Change the following template settings to use
+ * alternative delimiters.
+ *
+ * @static
+ * @memberOf _
+ * @type {Object}
+ */
+ lodash.templateSettings = {
+
+ /**
+ * Used to detect `data` property values to be HTML-escaped.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'escape': reEscape,
+
+ /**
+ * Used to detect code to be evaluated.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'evaluate': reEvaluate,
+
+ /**
+ * Used to detect `data` property values to inject.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'interpolate': reInterpolate,
+
+ /**
+ * Used to reference the data object in the template text.
+ *
+ * @memberOf _.templateSettings
+ * @type {string}
+ */
+ 'variable': '',
+
+ /**
+ * Used to import variables into the compiled template.
+ *
+ * @memberOf _.templateSettings
+ * @type {Object}
+ */
+ 'imports': {
+
+ /**
+ * A reference to the `lodash` function.
+ *
+ * @memberOf _.templateSettings.imports
+ * @type {Function}
+ */
+ '_': lodash
+ }
+ };
+
+ // Ensure wrappers are instances of `baseLodash`.
+ lodash.prototype = baseLodash.prototype;
+ lodash.prototype.constructor = lodash;
+
+ LodashWrapper.prototype = baseCreate(baseLodash.prototype);
+ LodashWrapper.prototype.constructor = LodashWrapper;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
+ *
+ * @private
+ * @constructor
+ * @param {*} value The value to wrap.
+ */
+ function LazyWrapper(value) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__dir__ = 1;
+ this.__filtered__ = false;
+ this.__iteratees__ = [];
+ this.__takeCount__ = MAX_ARRAY_LENGTH;
+ this.__views__ = [];
+ }
+
+ /**
+ * Creates a clone of the lazy wrapper object.
+ *
+ * @private
+ * @name clone
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the cloned `LazyWrapper` object.
+ */
+ function lazyClone() {
+ var result = new LazyWrapper(this.__wrapped__);
+ result.__actions__ = copyArray(this.__actions__);
+ result.__dir__ = this.__dir__;
+ result.__filtered__ = this.__filtered__;
+ result.__iteratees__ = copyArray(this.__iteratees__);
+ result.__takeCount__ = this.__takeCount__;
+ result.__views__ = copyArray(this.__views__);
+ return result;
+ }
+
+ /**
+ * Reverses the direction of lazy iteration.
+ *
+ * @private
+ * @name reverse
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the new reversed `LazyWrapper` object.
+ */
+ function lazyReverse() {
+ if (this.__filtered__) {
+ var result = new LazyWrapper(this);
+ result.__dir__ = -1;
+ result.__filtered__ = true;
+ } else {
+ result = this.clone();
+ result.__dir__ *= -1;
+ }
+ return result;
+ }
+
+ /**
+ * Extracts the unwrapped value from its lazy wrapper.
+ *
+ * @private
+ * @name value
+ * @memberOf LazyWrapper
+ * @returns {*} Returns the unwrapped value.
+ */
+ function lazyValue() {
+ var array = this.__wrapped__.value(),
+ dir = this.__dir__,
+ isArr = isArray(array),
+ isRight = dir < 0,
+ arrLength = isArr ? array.length : 0,
+ view = getView(0, arrLength, this.__views__),
+ start = view.start,
+ end = view.end,
+ length = end - start,
+ index = isRight ? end : (start - 1),
+ iteratees = this.__iteratees__,
+ iterLength = iteratees.length,
+ resIndex = 0,
+ takeCount = nativeMin(length, this.__takeCount__);
+
+ if (!isArr || arrLength < LARGE_ARRAY_SIZE ||
+ (arrLength == length && takeCount == length)) {
+ return baseWrapperValue(array, this.__actions__);
+ }
+ var result = [];
+
+ outer:
+ while (length-- && resIndex < takeCount) {
+ index += dir;
+
+ var iterIndex = -1,
+ value = array[index];
+
+ while (++iterIndex < iterLength) {
+ var data = iteratees[iterIndex],
+ iteratee = data.iteratee,
+ type = data.type,
+ computed = iteratee(value);
+
+ if (type == LAZY_MAP_FLAG) {
+ value = computed;
+ } else if (!computed) {
+ if (type == LAZY_FILTER_FLAG) {
+ continue outer;
+ } else {
+ break outer;
+ }
+ }
+ }
+ result[resIndex++] = value;
+ }
+ return result;
+ }
+
+ // Ensure `LazyWrapper` is an instance of `baseLodash`.
+ LazyWrapper.prototype = baseCreate(baseLodash.prototype);
+ LazyWrapper.prototype.constructor = LazyWrapper;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a hash object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function Hash(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the hash.
+ *
+ * @private
+ * @name clear
+ * @memberOf Hash
+ */
+ function hashClear() {
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
+ this.size = 0;
+ }
+
+ /**
+ * Removes `key` and its value from the hash.
+ *
+ * @private
+ * @name delete
+ * @memberOf Hash
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function hashDelete(key) {
+ var result = this.has(key) && delete this.__data__[key];
+ this.size -= result ? 1 : 0;
+ return result;
+ }
+
+ /**
+ * Gets the hash value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Hash
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function hashGet(key) {
+ var data = this.__data__;
+ if (nativeCreate) {
+ var result = data[key];
+ return result === HASH_UNDEFINED ? undefined : result;
+ }
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
+ }
+
+ /**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Hash
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function hashHas(key) {
+ var data = this.__data__;
+ return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
+ }
+
+ /**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Hash
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the hash instance.
+ */
+ function hashSet(key, value) {
+ var data = this.__data__;
+ this.size += this.has(key) ? 0 : 1;
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+ return this;
+ }
+
+ // Add methods to `Hash`.
+ Hash.prototype.clear = hashClear;
+ Hash.prototype['delete'] = hashDelete;
+ Hash.prototype.get = hashGet;
+ Hash.prototype.has = hashHas;
+ Hash.prototype.set = hashSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an list cache object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function ListCache(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the list cache.
+ *
+ * @private
+ * @name clear
+ * @memberOf ListCache
+ */
+ function listCacheClear() {
+ this.__data__ = [];
+ this.size = 0;
+ }
+
+ /**
+ * Removes `key` and its value from the list cache.
+ *
+ * @private
+ * @name delete
+ * @memberOf ListCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function listCacheDelete(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = data.length - 1;
+ if (index == lastIndex) {
+ data.pop();
+ } else {
+ splice.call(data, index, 1);
+ }
+ --this.size;
+ return true;
+ }
+
+ /**
+ * Gets the list cache value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf ListCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function listCacheGet(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ return index < 0 ? undefined : data[index][1];
+ }
+
+ /**
+ * Checks if a list cache value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf ListCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function listCacheHas(key) {
+ return assocIndexOf(this.__data__, key) > -1;
+ }
+
+ /**
+ * Sets the list cache `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf ListCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the list cache instance.
+ */
+ function listCacheSet(key, value) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ ++this.size;
+ data.push([key, value]);
+ } else {
+ data[index][1] = value;
+ }
+ return this;
+ }
+
+ // Add methods to `ListCache`.
+ ListCache.prototype.clear = listCacheClear;
+ ListCache.prototype['delete'] = listCacheDelete;
+ ListCache.prototype.get = listCacheGet;
+ ListCache.prototype.has = listCacheHas;
+ ListCache.prototype.set = listCacheSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function MapCache(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+ function mapCacheClear() {
+ this.size = 0;
+ this.__data__ = {
+ 'hash': new Hash,
+ 'map': new (Map || ListCache),
+ 'string': new Hash
+ };
+ }
+
+ /**
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function mapCacheDelete(key) {
+ var result = getMapData(this, key)['delete'](key);
+ this.size -= result ? 1 : 0;
+ return result;
+ }
+
+ /**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function mapCacheGet(key) {
+ return getMapData(this, key).get(key);
+ }
+
+ /**
+ * Checks if a map value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function mapCacheHas(key) {
+ return getMapData(this, key).has(key);
+ }
+
+ /**
+ * Sets the map `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache instance.
+ */
+ function mapCacheSet(key, value) {
+ var data = getMapData(this, key),
+ size = data.size;
+
+ data.set(key, value);
+ this.size += data.size == size ? 0 : 1;
+ return this;
+ }
+
+ // Add methods to `MapCache`.
+ MapCache.prototype.clear = mapCacheClear;
+ MapCache.prototype['delete'] = mapCacheDelete;
+ MapCache.prototype.get = mapCacheGet;
+ MapCache.prototype.has = mapCacheHas;
+ MapCache.prototype.set = mapCacheSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ *
+ * Creates an array cache object to store unique values.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+ function SetCache(values) {
+ var index = -1,
+ length = values == null ? 0 : values.length;
+
+ this.__data__ = new MapCache;
+ while (++index < length) {
+ this.add(values[index]);
+ }
+ }
+
+ /**
+ * Adds `value` to the array cache.
+ *
+ * @private
+ * @name add
+ * @memberOf SetCache
+ * @alias push
+ * @param {*} value The value to cache.
+ * @returns {Object} Returns the cache instance.
+ */
+ function setCacheAdd(value) {
+ this.__data__.set(value, HASH_UNDEFINED);
+ return this;
+ }
+
+ /**
+ * Checks if `value` is in the array cache.
+ *
+ * @private
+ * @name has
+ * @memberOf SetCache
+ * @param {*} value The value to search for.
+ * @returns {number} Returns `true` if `value` is found, else `false`.
+ */
+ function setCacheHas(value) {
+ return this.__data__.has(value);
+ }
+
+ // Add methods to `SetCache`.
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
+ SetCache.prototype.has = setCacheHas;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a stack cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function Stack(entries) {
+ var data = this.__data__ = new ListCache(entries);
+ this.size = data.size;
+ }
+
+ /**
+ * Removes all key-value entries from the stack.
+ *
+ * @private
+ * @name clear
+ * @memberOf Stack
+ */
+ function stackClear() {
+ this.__data__ = new ListCache;
+ this.size = 0;
+ }
+
+ /**
+ * Removes `key` and its value from the stack.
+ *
+ * @private
+ * @name delete
+ * @memberOf Stack
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function stackDelete(key) {
+ var data = this.__data__,
+ result = data['delete'](key);
+
+ this.size = data.size;
+ return result;
+ }
+
+ /**
+ * Gets the stack value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Stack
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function stackGet(key) {
+ return this.__data__.get(key);
+ }
+
+ /**
+ * Checks if a stack value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Stack
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function stackHas(key) {
+ return this.__data__.has(key);
+ }
+
+ /**
+ * Sets the stack `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Stack
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the stack cache instance.
+ */
+ function stackSet(key, value) {
+ var data = this.__data__;
+ if (data instanceof ListCache) {
+ var pairs = data.__data__;
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
+ pairs.push([key, value]);
+ this.size = ++data.size;
+ return this;
+ }
+ data = this.__data__ = new MapCache(pairs);
+ }
+ data.set(key, value);
+ this.size = data.size;
+ return this;
+ }
+
+ // Add methods to `Stack`.
+ Stack.prototype.clear = stackClear;
+ Stack.prototype['delete'] = stackDelete;
+ Stack.prototype.get = stackGet;
+ Stack.prototype.has = stackHas;
+ Stack.prototype.set = stackSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an array of the enumerable property names of the array-like `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @param {boolean} inherited Specify returning inherited property names.
+ * @returns {Array} Returns the array of property names.
+ */
+ function arrayLikeKeys(value, inherited) {
+ var isArr = isArray(value),
+ isArg = !isArr && isArguments(value),
+ isBuff = !isArr && !isArg && isBuffer(value),
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
+ skipIndexes = isArr || isArg || isBuff || isType,
+ result = skipIndexes ? baseTimes(value.length, String) : [],
+ length = result.length;
+
+ for (var key in value) {
+ if ((inherited || hasOwnProperty.call(value, key)) &&
+ !(skipIndexes && (
+ // Safari 9 has enumerable `arguments.length` in strict mode.
+ key == 'length' ||
+ // Node.js 0.10 has enumerable non-index properties on buffers.
+ (isBuff && (key == 'offset' || key == 'parent')) ||
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
+ // Skip index properties.
+ isIndex(key, length)
+ ))) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `_.sample` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to sample.
+ * @returns {*} Returns the random element.
+ */
+ function arraySample(array) {
+ var length = array.length;
+ return length ? array[baseRandom(0, length - 1)] : undefined;
+ }
+
+ /**
+ * A specialized version of `_.sampleSize` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to sample.
+ * @param {number} n The number of elements to sample.
+ * @returns {Array} Returns the random elements.
+ */
+ function arraySampleSize(array, n) {
+ return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
+ }
+
+ /**
+ * A specialized version of `_.shuffle` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ */
+ function arrayShuffle(array) {
+ return shuffleSelf(copyArray(array));
+ }
+
+ /**
+ * Used by `_.defaults` to customize its `_.assignIn` use.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to assign.
+ * @param {Object} object The parent object of `objValue`.
+ * @returns {*} Returns the value to assign.
+ */
+ function assignInDefaults(objValue, srcValue, key, object) {
+ if (objValue === undefined ||
+ (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ return srcValue;
+ }
+ return objValue;
+ }
+
+ /**
+ * This function is like `assignValue` except that it doesn't assign
+ * `undefined` values.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignMergeValue(object, key, value) {
+ if ((value !== undefined && !eq(object[key], value)) ||
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
+ }
+ }
+
+ /**
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignValue(object, key, value) {
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
+ }
+ }
+
+ /**
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Aggregates elements of `collection` on `accumulator` with keys transformed
+ * by `iteratee` and values set by `setter`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform keys.
+ * @param {Object} accumulator The initial aggregated object.
+ * @returns {Function} Returns `accumulator`.
+ */
+ function baseAggregator(collection, setter, iteratee, accumulator) {
+ baseEach(collection, function(value, key, collection) {
+ setter(accumulator, value, iteratee(value), collection);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.assign` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+ function baseAssign(object, source) {
+ return object && copyObject(source, keys(source), object);
+ }
+
+ /**
+ * The base implementation of `_.assignIn` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+ function baseAssignIn(object, source) {
+ return object && copyObject(source, keysIn(source), object);
+ }
+
+ /**
+ * The base implementation of `assignValue` and `assignMergeValue` without
+ * value checks.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function baseAssignValue(object, key, value) {
+ if (key == '__proto__' && defineProperty) {
+ defineProperty(object, key, {
+ 'configurable': true,
+ 'enumerable': true,
+ 'value': value,
+ 'writable': true
+ });
+ } else {
+ object[key] = value;
+ }
+ }
+
+ /**
+ * The base implementation of `_.at` without support for individual paths.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {string[]} paths The property paths to pick.
+ * @returns {Array} Returns the picked elements.
+ */
+ function baseAt(object, paths) {
+ var index = -1,
+ length = paths.length,
+ result = Array(length),
+ skip = object == null;
+
+ while (++index < length) {
+ result[index] = skip ? undefined : get(object, paths[index]);
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.clamp` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {number} number The number to clamp.
+ * @param {number} [lower] The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the clamped number.
+ */
+ function baseClamp(number, lower, upper) {
+ if (number === number) {
+ if (upper !== undefined) {
+ number = number <= upper ? number : upper;
+ }
+ if (lower !== undefined) {
+ number = number >= lower ? number : lower;
+ }
+ }
+ return number;
+ }
+
+ /**
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
+ * traversed objects.
+ *
+ * @private
+ * @param {*} value The value to clone.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Deep clone
+ * 2 - Flatten inherited properties
+ * 4 - Clone symbols
+ * @param {Function} [customizer] The function to customize cloning.
+ * @param {string} [key] The key of `value`.
+ * @param {Object} [object] The parent object of `value`.
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
+ * @returns {*} Returns the cloned value.
+ */
+ function baseClone(value, bitmask, customizer, key, object, stack) {
+ var result,
+ isDeep = bitmask & CLONE_DEEP_FLAG,
+ isFlat = bitmask & CLONE_FLAT_FLAG,
+ isFull = bitmask & CLONE_SYMBOLS_FLAG;
+
+ if (customizer) {
+ result = object ? customizer(value, key, object, stack) : customizer(value);
+ }
+ if (result !== undefined) {
+ return result;
+ }
+ if (!isObject(value)) {
+ return value;
+ }
+ var isArr = isArray(value);
+ if (isArr) {
+ result = initCloneArray(value);
+ if (!isDeep) {
+ return copyArray(value, result);
+ }
+ } else {
+ var tag = getTag(value),
+ isFunc = tag == funcTag || tag == genTag;
+
+ if (isBuffer(value)) {
+ return cloneBuffer(value, isDeep);
+ }
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+ result = (isFlat || isFunc) ? {} : initCloneObject(value);
+ if (!isDeep) {
+ return isFlat
+ ? copySymbolsIn(value, baseAssignIn(result, value))
+ : copySymbols(value, baseAssign(result, value));
+ }
+ } else {
+ if (!cloneableTags[tag]) {
+ return object ? value : {};
+ }
+ result = initCloneByTag(value, tag, baseClone, isDeep);
+ }
+ }
+ // Check for circular references and return its corresponding clone.
+ stack || (stack = new Stack);
+ var stacked = stack.get(value);
+ if (stacked) {
+ return stacked;
+ }
+ stack.set(value, result);
+
+ var keysFunc = isFull
+ ? (isFlat ? getAllKeysIn : getAllKeys)
+ : (isFlat ? keysIn : keys);
+
+ var props = isArr ? undefined : keysFunc(value);
+ arrayEach(props || value, function(subValue, key) {
+ if (props) {
+ key = subValue;
+ subValue = value[key];
+ }
+ // Recursively populate clone (susceptible to call stack limits).
+ assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.conforms` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseConforms(source) {
+ var props = keys(source);
+ return function(object) {
+ return baseConformsTo(object, source, props);
+ };
+ }
+
+ /**
+ * The base implementation of `_.conformsTo` which accepts `props` to check.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {boolean} Returns `true` if `object` conforms, else `false`.
+ */
+ function baseConformsTo(object, source, props) {
+ var length = props.length;
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (length--) {
+ var key = props[length],
+ predicate = source[key],
+ value = object[key];
+
+ if ((value === undefined && !(key in object)) || !predicate(value)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * The base implementation of `_.delay` and `_.defer` which accepts `args`
+ * to provide to `func`.
+ *
+ * @private
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {Array} args The arguments to provide to `func`.
+ * @returns {number|Object} Returns the timer id or timeout object.
+ */
+ function baseDelay(func, wait, args) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return setTimeout(function() { func.apply(undefined, args); }, wait);
+ }
+
+ /**
+ * The base implementation of methods like `_.difference` without support
+ * for excluding multiple arrays or iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Array} values The values to exclude.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ */
+ function baseDifference(array, values, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ isCommon = true,
+ length = array.length,
+ result = [],
+ valuesLength = values.length;
+
+ if (!length) {
+ return result;
+ }
+ if (iteratee) {
+ values = arrayMap(values, baseUnary(iteratee));
+ }
+ if (comparator) {
+ includes = arrayIncludesWith;
+ isCommon = false;
+ }
+ else if (values.length >= LARGE_ARRAY_SIZE) {
+ includes = cacheHas;
+ isCommon = false;
+ values = new SetCache(values);
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee == null ? value : iteratee(value);
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var valuesIndex = valuesLength;
+ while (valuesIndex--) {
+ if (values[valuesIndex] === computed) {
+ continue outer;
+ }
+ }
+ result.push(value);
+ }
+ else if (!includes(values, computed, comparator)) {
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+ var baseEach = createBaseEach(baseForOwn);
+
+ /**
+ * The base implementation of `_.forEachRight` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+ var baseEachRight = createBaseEach(baseForOwnRight, true);
+
+ /**
+ * The base implementation of `_.every` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`
+ */
+ function baseEvery(collection, predicate) {
+ var result = true;
+ baseEach(collection, function(value, index, collection) {
+ result = !!predicate(value, index, collection);
+ return result;
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of methods like `_.max` and `_.min` which accepts a
+ * `comparator` to determine the extremum value.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The iteratee invoked per iteration.
+ * @param {Function} comparator The comparator used to compare values.
+ * @returns {*} Returns the extremum value.
+ */
+ function baseExtremum(array, iteratee, comparator) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var value = array[index],
+ current = iteratee(value);
+
+ if (current != null && (computed === undefined
+ ? (current === current && !isSymbol(current))
+ : comparator(current, computed)
+ )) {
+ var computed = current,
+ result = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.fill` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ */
+ function baseFill(array, value, start, end) {
+ var length = array.length;
+
+ start = toInteger(start);
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = (end === undefined || end > length) ? length : toInteger(end);
+ if (end < 0) {
+ end += length;
+ }
+ end = start > end ? 0 : toLength(end);
+ while (start < end) {
+ array[start++] = value;
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.filter` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+ function baseFilter(collection, predicate) {
+ var result = [];
+ baseEach(collection, function(value, index, collection) {
+ if (predicate(value, index, collection)) {
+ result.push(value);
+ }
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.flatten` with support for restricting flattening.
+ *
+ * @private
+ * @param {Array} array The array to flatten.
+ * @param {number} depth The maximum recursion depth.
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
+ * @param {Array} [result=[]] The initial result value.
+ * @returns {Array} Returns the new flattened array.
+ */
+ function baseFlatten(array, depth, predicate, isStrict, result) {
+ var index = -1,
+ length = array.length;
+
+ predicate || (predicate = isFlattenable);
+ result || (result = []);
+
+ while (++index < length) {
+ var value = array[index];
+ if (depth > 0 && predicate(value)) {
+ if (depth > 1) {
+ // Recursively flatten arrays (susceptible to call stack limits).
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
+ } else {
+ arrayPush(result, value);
+ }
+ } else if (!isStrict) {
+ result[result.length] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `baseForOwn` which iterates over `object`
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+ var baseFor = createBaseFor();
+
+ /**
+ * This function is like `baseFor` except that it iterates over properties
+ * in the opposite order.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+ var baseForRight = createBaseFor(true);
+
+ /**
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+ function baseForOwn(object, iteratee) {
+ return object && baseFor(object, iteratee, keys);
+ }
+
+ /**
+ * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+ function baseForOwnRight(object, iteratee) {
+ return object && baseForRight(object, iteratee, keys);
+ }
+
+ /**
+ * The base implementation of `_.functions` which creates an array of
+ * `object` function property names filtered from `props`.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Array} props The property names to filter.
+ * @returns {Array} Returns the function names.
+ */
+ function baseFunctions(object, props) {
+ return arrayFilter(props, function(key) {
+ return isFunction(object[key]);
+ });
+ }
+
+ /**
+ * The base implementation of `_.get` without support for default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseGet(object, path) {
+ path = castPath(path, object);
+
+ var index = 0,
+ length = path.length;
+
+ while (object != null && index < length) {
+ object = object[toKey(path[index++])];
+ }
+ return (index && index == length) ? object : undefined;
+ }
+
+ /**
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
+ var result = keysFunc(object);
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
+ }
+
+ /**
+ * The base implementation of `getTag` without fallbacks for buggy environments.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+ function baseGetTag(value) {
+ if (value == null) {
+ return value === undefined ? undefinedTag : nullTag;
+ }
+ value = Object(value);
+ return (symToStringTag && symToStringTag in value)
+ ? getRawTag(value)
+ : objectToString(value);
+ }
+
+ /**
+ * The base implementation of `_.gt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ */
+ function baseGt(value, other) {
+ return value > other;
+ }
+
+ /**
+ * The base implementation of `_.has` without support for deep paths.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+ function baseHas(object, key) {
+ return object != null && hasOwnProperty.call(object, key);
+ }
+
+ /**
+ * The base implementation of `_.hasIn` without support for deep paths.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+ function baseHasIn(object, key) {
+ return object != null && key in Object(object);
+ }
+
+ /**
+ * The base implementation of `_.inRange` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {number} number The number to check.
+ * @param {number} start The start of the range.
+ * @param {number} end The end of the range.
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
+ */
+ function baseInRange(number, start, end) {
+ return number >= nativeMin(start, end) && number < nativeMax(start, end);
+ }
+
+ /**
+ * The base implementation of methods like `_.intersection`, without support
+ * for iteratee shorthands, that accepts an array of arrays to inspect.
+ *
+ * @private
+ * @param {Array} arrays The arrays to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of shared values.
+ */
+ function baseIntersection(arrays, iteratee, comparator) {
+ var includes = comparator ? arrayIncludesWith : arrayIncludes,
+ length = arrays[0].length,
+ othLength = arrays.length,
+ othIndex = othLength,
+ caches = Array(othLength),
+ maxLength = Infinity,
+ result = [];
+
+ while (othIndex--) {
+ var array = arrays[othIndex];
+ if (othIndex && iteratee) {
+ array = arrayMap(array, baseUnary(iteratee));
+ }
+ maxLength = nativeMin(array.length, maxLength);
+ caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
+ ? new SetCache(othIndex && array)
+ : undefined;
+ }
+ array = arrays[0];
+
+ var index = -1,
+ seen = caches[0];
+
+ outer:
+ while (++index < length && result.length < maxLength) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (!(seen
+ ? cacheHas(seen, computed)
+ : includes(result, computed, comparator)
+ )) {
+ othIndex = othLength;
+ while (--othIndex) {
+ var cache = caches[othIndex];
+ if (!(cache
+ ? cacheHas(cache, computed)
+ : includes(arrays[othIndex], computed, comparator))
+ ) {
+ continue outer;
+ }
+ }
+ if (seen) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.invert` and `_.invertBy` which inverts
+ * `object` with values transformed by `iteratee` and set by `setter`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform values.
+ * @param {Object} accumulator The initial inverted object.
+ * @returns {Function} Returns `accumulator`.
+ */
+ function baseInverter(object, setter, iteratee, accumulator) {
+ baseForOwn(object, function(value, key, object) {
+ setter(accumulator, iteratee(value), key, object);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.invoke` without support for individual
+ * method arguments.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {Array} args The arguments to invoke the method with.
+ * @returns {*} Returns the result of the invoked method.
+ */
+ function baseInvoke(object, path, args) {
+ path = castPath(path, object);
+ object = parent(object, path);
+ var func = object == null ? object : object[toKey(last(path))];
+ return func == null ? undefined : apply(func, object, args);
+ }
+
+ /**
+ * The base implementation of `_.isArguments`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ */
+ function baseIsArguments(value) {
+ return isObjectLike(value) && baseGetTag(value) == argsTag;
+ }
+
+ /**
+ * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
+ */
+ function baseIsArrayBuffer(value) {
+ return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
+ }
+
+ /**
+ * The base implementation of `_.isDate` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ */
+ function baseIsDate(value) {
+ return isObjectLike(value) && baseGetTag(value) == dateTag;
+ }
+
+ /**
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
+ }
+
+ /**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = arrayTag,
+ othTag = arrayTag;
+
+ if (!objIsArr) {
+ objTag = getTag(object);
+ objTag = objTag == argsTag ? objectTag : objTag;
+ }
+ if (!othIsArr) {
+ othTag = getTag(other);
+ othTag = othTag == argsTag ? objectTag : othTag;
+ }
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
+ isSameTag = objTag == othTag;
+
+ if (isSameTag && isBuffer(object)) {
+ if (!isBuffer(other)) {
+ return false;
+ }
+ objIsArr = true;
+ objIsObj = false;
+ }
+ if (isSameTag && !objIsObj) {
+ stack || (stack = new Stack);
+ return (objIsArr || isTypedArray(object))
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
+ }
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ var objUnwrapped = objIsWrapped ? object.value() : object,
+ othUnwrapped = othIsWrapped ? other.value() : other;
+
+ stack || (stack = new Stack);
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ stack || (stack = new Stack);
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
+ }
+
+ /**
+ * The base implementation of `_.isMap` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
+ */
+ function baseIsMap(value) {
+ return isObjectLike(value) && getTag(value) == mapTag;
+ }
+
+ /**
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Array} matchData The property names, values, and compare flags to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ */
+ function baseIsMatch(object, source, matchData, customizer) {
+ var index = matchData.length,
+ length = index,
+ noCustomizer = !customizer;
+
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (index--) {
+ var data = matchData[index];
+ if ((noCustomizer && data[2])
+ ? data[1] !== object[data[0]]
+ : !(data[0] in object)
+ ) {
+ return false;
+ }
+ }
+ while (++index < length) {
+ data = matchData[index];
+ var key = data[0],
+ objValue = object[key],
+ srcValue = data[1];
+
+ if (noCustomizer && data[2]) {
+ if (objValue === undefined && !(key in object)) {
+ return false;
+ }
+ } else {
+ var stack = new Stack;
+ if (customizer) {
+ var result = customizer(objValue, srcValue, key, object, source, stack);
+ }
+ if (!(result === undefined
+ ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
+ : result
+ )) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * The base implementation of `_.isNative` without bad shim checks.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ */
+ function baseIsNative(value) {
+ if (!isObject(value) || isMasked(value)) {
+ return false;
+ }
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
+ }
+
+ /**
+ * The base implementation of `_.isRegExp` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ */
+ function baseIsRegExp(value) {
+ return isObjectLike(value) && baseGetTag(value) == regexpTag;
+ }
+
+ /**
+ * The base implementation of `_.isSet` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
+ */
+ function baseIsSet(value) {
+ return isObjectLike(value) && getTag(value) == setTag;
+ }
+
+ /**
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ */
+ function baseIsTypedArray(value) {
+ return isObjectLike(value) &&
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
+ }
+
+ /**
+ * The base implementation of `_.iteratee`.
+ *
+ * @private
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
+ * @returns {Function} Returns the iteratee.
+ */
+ function baseIteratee(value) {
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
+ if (typeof value == 'function') {
+ return value;
+ }
+ if (value == null) {
+ return identity;
+ }
+ if (typeof value == 'object') {
+ return isArray(value)
+ ? baseMatchesProperty(value[0], value[1])
+ : baseMatches(value);
+ }
+ return property(value);
+ }
+
+ /**
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeys(object) {
+ if (!isPrototype(object)) {
+ return nativeKeys(object);
+ }
+ var result = [];
+ for (var key in Object(object)) {
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeysIn(object) {
+ if (!isObject(object)) {
+ return nativeKeysIn(object);
+ }
+ var isProto = isPrototype(object),
+ result = [];
+
+ for (var key in object) {
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.lt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ */
+ function baseLt(value, other) {
+ return value < other;
+ }
+
+ /**
+ * The base implementation of `_.map` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+ function baseMap(collection, iteratee) {
+ var index = -1,
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value, key, collection) {
+ result[++index] = iteratee(value, key, collection);
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.matches` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseMatches(source) {
+ var matchData = getMatchData(source);
+ if (matchData.length == 1 && matchData[0][2]) {
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
+ }
+ return function(object) {
+ return object === source || baseIsMatch(object, source, matchData);
+ };
+ }
+
+ /**
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
+ *
+ * @private
+ * @param {string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseMatchesProperty(path, srcValue) {
+ if (isKey(path) && isStrictComparable(srcValue)) {
+ return matchesStrictComparable(toKey(path), srcValue);
+ }
+ return function(object) {
+ var objValue = get(object, path);
+ return (objValue === undefined && objValue === srcValue)
+ ? hasIn(object, path)
+ : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
+ };
+ }
+
+ /**
+ * The base implementation of `_.merge` without support for multiple sources.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} [customizer] The function to customize merged values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+ function baseMerge(object, source, srcIndex, customizer, stack) {
+ if (object === source) {
+ return;
+ }
+ baseFor(source, function(srcValue, key) {
+ if (isObject(srcValue)) {
+ stack || (stack = new Stack);
+ baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
+ }
+ else {
+ var newValue = customizer
+ ? customizer(object[key], srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = srcValue;
+ }
+ assignMergeValue(object, key, newValue);
+ }
+ }, keysIn);
+ }
+
+ /**
+ * A specialized version of `baseMerge` for arrays and objects which performs
+ * deep merges and tracks traversed objects enabling objects with circular
+ * references to be merged.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {string} key The key of the value to merge.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} mergeFunc The function to merge values.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
+ var objValue = object[key],
+ srcValue = source[key],
+ stacked = stack.get(srcValue);
+
+ if (stacked) {
+ assignMergeValue(object, key, stacked);
+ return;
+ }
+ var newValue = customizer
+ ? customizer(objValue, srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ var isCommon = newValue === undefined;
+
+ if (isCommon) {
+ var isArr = isArray(srcValue),
+ isBuff = !isArr && isBuffer(srcValue),
+ isTyped = !isArr && !isBuff && isTypedArray(srcValue);
+
+ newValue = srcValue;
+ if (isArr || isBuff || isTyped) {
+ if (isArray(objValue)) {
+ newValue = objValue;
+ }
+ else if (isArrayLikeObject(objValue)) {
+ newValue = copyArray(objValue);
+ }
+ else if (isBuff) {
+ isCommon = false;
+ newValue = cloneBuffer(srcValue, true);
+ }
+ else if (isTyped) {
+ isCommon = false;
+ newValue = cloneTypedArray(srcValue, true);
+ }
+ else {
+ newValue = [];
+ }
+ }
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+ newValue = objValue;
+ if (isArguments(objValue)) {
+ newValue = toPlainObject(objValue);
+ }
+ else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
+ newValue = initCloneObject(srcValue);
+ }
+ }
+ else {
+ isCommon = false;
+ }
+ }
+ if (isCommon) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ stack.set(srcValue, newValue);
+ mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
+ stack['delete'](srcValue);
+ }
+ assignMergeValue(object, key, newValue);
+ }
+
+ /**
+ * The base implementation of `_.nth` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {number} n The index of the element to return.
+ * @returns {*} Returns the nth element of `array`.
+ */
+ function baseNth(array, n) {
+ var length = array.length;
+ if (!length) {
+ return;
+ }
+ n += n < 0 ? length : 0;
+ return isIndex(n, length) ? array[n] : undefined;
+ }
+
+ /**
+ * The base implementation of `_.orderBy` without param guards.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
+ * @param {string[]} orders The sort orders of `iteratees`.
+ * @returns {Array} Returns the new sorted array.
+ */
+ function baseOrderBy(collection, iteratees, orders) {
+ var index = -1;
+ iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
+
+ var result = baseMap(collection, function(value, key, collection) {
+ var criteria = arrayMap(iteratees, function(iteratee) {
+ return iteratee(value);
+ });
+ return { 'criteria': criteria, 'index': ++index, 'value': value };
+ });
+
+ return baseSortBy(result, function(object, other) {
+ return compareMultiple(object, other, orders);
+ });
+ }
+
+ /**
+ * The base implementation of `_.pick` without support for individual
+ * property identifiers.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @returns {Object} Returns the new object.
+ */
+ function basePick(object, paths) {
+ object = Object(object);
+ return basePickBy(object, paths, function(value, path) {
+ return hasIn(object, path);
+ });
+ }
+
+ /**
+ * The base implementation of `_.pickBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @param {Function} predicate The function invoked per property.
+ * @returns {Object} Returns the new object.
+ */
+ function basePickBy(object, paths, predicate) {
+ var index = -1,
+ length = paths.length,
+ result = {};
+
+ while (++index < length) {
+ var path = paths[index],
+ value = baseGet(object, path);
+
+ if (predicate(value, path)) {
+ baseSet(result, castPath(path, object), value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseProperty` which supports deep paths.
+ *
+ * @private
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function basePropertyDeep(path) {
+ return function(object) {
+ return baseGet(object, path);
+ };
+ }
+
+ /**
+ * The base implementation of `_.pullAllBy` without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns `array`.
+ */
+ function basePullAll(array, values, iteratee, comparator) {
+ var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
+ index = -1,
+ length = values.length,
+ seen = array;
+
+ if (array === values) {
+ values = copyArray(values);
+ }
+ if (iteratee) {
+ seen = arrayMap(array, baseUnary(iteratee));
+ }
+ while (++index < length) {
+ var fromIndex = 0,
+ value = values[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
+ if (seen !== array) {
+ splice.call(seen, fromIndex, 1);
+ }
+ splice.call(array, fromIndex, 1);
+ }
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.pullAt` without support for individual
+ * indexes or capturing the removed elements.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {number[]} indexes The indexes of elements to remove.
+ * @returns {Array} Returns `array`.
+ */
+ function basePullAt(array, indexes) {
+ var length = array ? indexes.length : 0,
+ lastIndex = length - 1;
+
+ while (length--) {
+ var index = indexes[length];
+ if (length == lastIndex || index !== previous) {
+ var previous = index;
+ if (isIndex(index)) {
+ splice.call(array, index, 1);
+ } else {
+ baseUnset(array, index);
+ }
+ }
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.random` without support for returning
+ * floating-point numbers.
+ *
+ * @private
+ * @param {number} lower The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the random number.
+ */
+ function baseRandom(lower, upper) {
+ return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
+ }
+
+ /**
+ * The base implementation of `_.range` and `_.rangeRight` which doesn't
+ * coerce arguments.
+ *
+ * @private
+ * @param {number} start The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} step The value to increment or decrement by.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Array} Returns the range of numbers.
+ */
+ function baseRange(start, end, step, fromRight) {
+ var index = -1,
+ length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
+ result = Array(length);
+
+ while (length--) {
+ result[fromRight ? length : ++index] = start;
+ start += step;
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.repeat` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {string} string The string to repeat.
+ * @param {number} n The number of times to repeat the string.
+ * @returns {string} Returns the repeated string.
+ */
+ function baseRepeat(string, n) {
+ var result = '';
+ if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
+ return result;
+ }
+ // Leverage the exponentiation by squaring algorithm for a faster repeat.
+ // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
+ do {
+ if (n % 2) {
+ result += string;
+ }
+ n = nativeFloor(n / 2);
+ if (n) {
+ string += string;
+ }
+ } while (n);
+
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ */
+ function baseRest(func, start) {
+ return setToString(overRest(func, start, identity), func + '');
+ }
+
+ /**
+ * The base implementation of `_.sample`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to sample.
+ * @returns {*} Returns the random element.
+ */
+ function baseSample(collection) {
+ return arraySample(values(collection));
+ }
+
+ /**
+ * The base implementation of `_.sampleSize` without param guards.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to sample.
+ * @param {number} n The number of elements to sample.
+ * @returns {Array} Returns the random elements.
+ */
+ function baseSampleSize(collection, n) {
+ var array = values(collection);
+ return shuffleSelf(array, baseClamp(n, 0, array.length));
+ }
+
+ /**
+ * The base implementation of `_.set`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+ function baseSet(object, path, value, customizer) {
+ if (!isObject(object)) {
+ return object;
+ }
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length,
+ lastIndex = length - 1,
+ nested = object;
+
+ while (nested != null && ++index < length) {
+ var key = toKey(path[index]),
+ newValue = value;
+
+ if (index != lastIndex) {
+ var objValue = nested[key];
+ newValue = customizer ? customizer(objValue, key, nested) : undefined;
+ if (newValue === undefined) {
+ newValue = isObject(objValue)
+ ? objValue
+ : (isIndex(path[index + 1]) ? [] : {});
+ }
+ }
+ assignValue(nested, key, newValue);
+ nested = nested[key];
+ }
+ return object;
+ }
+
+ /**
+ * The base implementation of `setData` without support for hot loop shorting.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+ var baseSetData = !metaMap ? identity : function(func, data) {
+ metaMap.set(func, data);
+ return func;
+ };
+
+ /**
+ * The base implementation of `setToString` without support for hot loop shorting.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+ var baseSetToString = !defineProperty ? identity : function(func, string) {
+ return defineProperty(func, 'toString', {
+ 'configurable': true,
+ 'enumerable': false,
+ 'value': constant(string),
+ 'writable': true
+ });
+ };
+
+ /**
+ * The base implementation of `_.shuffle`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ */
+ function baseShuffle(collection) {
+ return shuffleSelf(values(collection));
+ }
+
+ /**
+ * The base implementation of `_.slice` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function baseSlice(array, start, end) {
+ var index = -1,
+ length = array.length;
+
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = end > length ? length : end;
+ if (end < 0) {
+ end += length;
+ }
+ length = start > end ? 0 : ((end - start) >>> 0);
+ start >>>= 0;
+
+ var result = Array(length);
+ while (++index < length) {
+ result[index] = array[index + start];
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.some` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function baseSome(collection, predicate) {
+ var result;
+
+ baseEach(collection, function(value, index, collection) {
+ result = predicate(value, index, collection);
+ return !result;
+ });
+ return !!result;
+ }
+
+ /**
+ * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
+ * performs a binary search of `array` to determine the index at which `value`
+ * should be inserted into `array` in order to maintain its sort order.
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+ function baseSortedIndex(array, value, retHighest) {
+ var low = 0,
+ high = array == null ? low : array.length;
+
+ if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
+ while (low < high) {
+ var mid = (low + high) >>> 1,
+ computed = array[mid];
+
+ if (computed !== null && !isSymbol(computed) &&
+ (retHighest ? (computed <= value) : (computed < value))) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return high;
+ }
+ return baseSortedIndexBy(array, value, identity, retHighest);
+ }
+
+ /**
+ * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
+ * which invokes `iteratee` for `value` and each element of `array` to compute
+ * their sort ranking. The iteratee is invoked with one argument; (value).
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} iteratee The iteratee invoked per element.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+ function baseSortedIndexBy(array, value, iteratee, retHighest) {
+ value = iteratee(value);
+
+ var low = 0,
+ high = array == null ? 0 : array.length,
+ valIsNaN = value !== value,
+ valIsNull = value === null,
+ valIsSymbol = isSymbol(value),
+ valIsUndefined = value === undefined;
+
+ while (low < high) {
+ var mid = nativeFloor((low + high) / 2),
+ computed = iteratee(array[mid]),
+ othIsDefined = computed !== undefined,
+ othIsNull = computed === null,
+ othIsReflexive = computed === computed,
+ othIsSymbol = isSymbol(computed);
+
+ if (valIsNaN) {
+ var setLow = retHighest || othIsReflexive;
+ } else if (valIsUndefined) {
+ setLow = othIsReflexive && (retHighest || othIsDefined);
+ } else if (valIsNull) {
+ setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
+ } else if (valIsSymbol) {
+ setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
+ } else if (othIsNull || othIsSymbol) {
+ setLow = false;
+ } else {
+ setLow = retHighest ? (computed <= value) : (computed < value);
+ }
+ if (setLow) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return nativeMin(high, MAX_ARRAY_INDEX);
+ }
+
+ /**
+ * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+ function baseSortedUniq(array, iteratee) {
+ var index = -1,
+ length = array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ if (!index || !eq(computed, seen)) {
+ var seen = computed;
+ result[resIndex++] = value === 0 ? 0 : value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.toNumber` which doesn't ensure correct
+ * conversions of binary, hexadecimal, or octal string values.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ */
+ function baseToNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ return +value;
+ }
+
+ /**
+ * The base implementation of `_.toString` which doesn't convert nullish
+ * values to empty strings.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+ function baseToString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
+ }
+ if (isArray(value)) {
+ // Recursively convert values (susceptible to call stack limits).
+ return arrayMap(value, baseToString) + '';
+ }
+ if (isSymbol(value)) {
+ return symbolToString ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+ }
+
+ /**
+ * The base implementation of `_.uniqBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+ function baseUniq(array, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ length = array.length,
+ isCommon = true,
+ result = [],
+ seen = result;
+
+ if (comparator) {
+ isCommon = false;
+ includes = arrayIncludesWith;
+ }
+ else if (length >= LARGE_ARRAY_SIZE) {
+ var set = iteratee ? null : createSet(array);
+ if (set) {
+ return setToArray(set);
+ }
+ isCommon = false;
+ includes = cacheHas;
+ seen = new SetCache;
+ }
+ else {
+ seen = iteratee ? [] : result;
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var seenIndex = seen.length;
+ while (seenIndex--) {
+ if (seen[seenIndex] === computed) {
+ continue outer;
+ }
+ }
+ if (iteratee) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ else if (!includes(seen, computed, comparator)) {
+ if (seen !== result) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.unset`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The property path to unset.
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
+ */
+ function baseUnset(object, path) {
+ path = castPath(path, object);
+ object = parent(object, path);
+ return object == null || delete object[toKey(last(path))];
+ }
+
+ /**
+ * The base implementation of `_.update`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to update.
+ * @param {Function} updater The function to produce the updated value.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+ function baseUpdate(object, path, updater, customizer) {
+ return baseSet(object, path, updater(baseGet(object, path)), customizer);
+ }
+
+ /**
+ * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
+ * without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function baseWhile(array, predicate, isDrop, fromRight) {
+ var length = array.length,
+ index = fromRight ? length : -1;
+
+ while ((fromRight ? index-- : ++index < length) &&
+ predicate(array[index], index, array)) {}
+
+ return isDrop
+ ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
+ : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
+ }
+
+ /**
+ * The base implementation of `wrapperValue` which returns the result of
+ * performing a sequence of actions on the unwrapped `value`, where each
+ * successive action is supplied the return value of the previous.
+ *
+ * @private
+ * @param {*} value The unwrapped value.
+ * @param {Array} actions Actions to perform to resolve the unwrapped value.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseWrapperValue(value, actions) {
+ var result = value;
+ if (result instanceof LazyWrapper) {
+ result = result.value();
+ }
+ return arrayReduce(actions, function(result, action) {
+ return action.func.apply(action.thisArg, arrayPush([result], action.args));
+ }, result);
+ }
+
+ /**
+ * The base implementation of methods like `_.xor`, without support for
+ * iteratee shorthands, that accepts an array of arrays to inspect.
+ *
+ * @private
+ * @param {Array} arrays The arrays to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of values.
+ */
+ function baseXor(arrays, iteratee, comparator) {
+ var length = arrays.length;
+ if (length < 2) {
+ return length ? baseUniq(arrays[0]) : [];
+ }
+ var index = -1,
+ result = Array(length);
+
+ while (++index < length) {
+ var array = arrays[index],
+ othIndex = -1;
+
+ while (++othIndex < length) {
+ if (othIndex != index) {
+ result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
+ }
+ }
+ }
+ return baseUniq(baseFlatten(result, 1), iteratee, comparator);
+ }
+
+ /**
+ * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
+ *
+ * @private
+ * @param {Array} props The property identifiers.
+ * @param {Array} values The property values.
+ * @param {Function} assignFunc The function to assign values.
+ * @returns {Object} Returns the new object.
+ */
+ function baseZipObject(props, values, assignFunc) {
+ var index = -1,
+ length = props.length,
+ valsLength = values.length,
+ result = {};
+
+ while (++index < length) {
+ var value = index < valsLength ? values[index] : undefined;
+ assignFunc(result, props[index], value);
+ }
+ return result;
+ }
+
+ /**
+ * Casts `value` to an empty array if it's not an array like object.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Array|Object} Returns the cast array-like object.
+ */
+ function castArrayLikeObject(value) {
+ return isArrayLikeObject(value) ? value : [];
+ }
+
+ /**
+ * Casts `value` to `identity` if it's not a function.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Function} Returns cast function.
+ */
+ function castFunction(value) {
+ return typeof value == 'function' ? value : identity;
+ }
+
+ /**
+ * Casts `value` to a path array if it's not one.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {Array} Returns the cast property path array.
+ */
+ function castPath(value, object) {
+ if (isArray(value)) {
+ return value;
+ }
+ return isKey(value, object) ? [value] : stringToPath(toString(value));
+ }
+
+ /**
+ * A `baseRest` alias which can be replaced with `identity` by module
+ * replacement plugins.
+ *
+ * @private
+ * @type {Function}
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+ var castRest = baseRest;
+
+ /**
+ * Casts `array` to a slice if it's needed.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {number} start The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the cast slice.
+ */
+ function castSlice(array, start, end) {
+ var length = array.length;
+ end = end === undefined ? length : end;
+ return (!start && end >= length) ? array : baseSlice(array, start, end);
+ }
+
+ /**
+ * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
+ *
+ * @private
+ * @param {number|Object} id The timer id or timeout object of the timer to clear.
+ */
+ var clearTimeout = ctxClearTimeout || function(id) {
+ return root.clearTimeout(id);
+ };
+
+ /**
+ * Creates a clone of `buffer`.
+ *
+ * @private
+ * @param {Buffer} buffer The buffer to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Buffer} Returns the cloned buffer.
+ */
+ function cloneBuffer(buffer, isDeep) {
+ if (isDeep) {
+ return buffer.slice();
+ }
+ var length = buffer.length,
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
+
+ buffer.copy(result);
+ return result;
+ }
+
+ /**
+ * Creates a clone of `arrayBuffer`.
+ *
+ * @private
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
+ */
+ function cloneArrayBuffer(arrayBuffer) {
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
+ return result;
+ }
+
+ /**
+ * Creates a clone of `dataView`.
+ *
+ * @private
+ * @param {Object} dataView The data view to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned data view.
+ */
+ function cloneDataView(dataView, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
+ }
+
+ /**
+ * Creates a clone of `map`.
+ *
+ * @private
+ * @param {Object} map The map to clone.
+ * @param {Function} cloneFunc The function to clone values.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned map.
+ */
+ function cloneMap(map, isDeep, cloneFunc) {
+ var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);
+ return arrayReduce(array, addMapEntry, new map.constructor);
+ }
+
+ /**
+ * Creates a clone of `regexp`.
+ *
+ * @private
+ * @param {Object} regexp The regexp to clone.
+ * @returns {Object} Returns the cloned regexp.
+ */
+ function cloneRegExp(regexp) {
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
+ result.lastIndex = regexp.lastIndex;
+ return result;
+ }
+
+ /**
+ * Creates a clone of `set`.
+ *
+ * @private
+ * @param {Object} set The set to clone.
+ * @param {Function} cloneFunc The function to clone values.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned set.
+ */
+ function cloneSet(set, isDeep, cloneFunc) {
+ var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);
+ return arrayReduce(array, addSetEntry, new set.constructor);
+ }
+
+ /**
+ * Creates a clone of the `symbol` object.
+ *
+ * @private
+ * @param {Object} symbol The symbol object to clone.
+ * @returns {Object} Returns the cloned symbol object.
+ */
+ function cloneSymbol(symbol) {
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
+ }
+
+ /**
+ * Creates a clone of `typedArray`.
+ *
+ * @private
+ * @param {Object} typedArray The typed array to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned typed array.
+ */
+ function cloneTypedArray(typedArray, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
+ }
+
+ /**
+ * Compares values to sort them in ascending order.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {number} Returns the sort order indicator for `value`.
+ */
+ function compareAscending(value, other) {
+ if (value !== other) {
+ var valIsDefined = value !== undefined,
+ valIsNull = value === null,
+ valIsReflexive = value === value,
+ valIsSymbol = isSymbol(value);
+
+ var othIsDefined = other !== undefined,
+ othIsNull = other === null,
+ othIsReflexive = other === other,
+ othIsSymbol = isSymbol(other);
+
+ if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
+ (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
+ (valIsNull && othIsDefined && othIsReflexive) ||
+ (!valIsDefined && othIsReflexive) ||
+ !valIsReflexive) {
+ return 1;
+ }
+ if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
+ (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
+ (othIsNull && valIsDefined && valIsReflexive) ||
+ (!othIsDefined && valIsReflexive) ||
+ !othIsReflexive) {
+ return -1;
+ }
+ }
+ return 0;
+ }
+
+ /**
+ * Used by `_.orderBy` to compare multiple properties of a value to another
+ * and stable sort them.
+ *
+ * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
+ * specify an order of "desc" for descending or "asc" for ascending sort order
+ * of corresponding values.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {boolean[]|string[]} orders The order to sort by for each property.
+ * @returns {number} Returns the sort order indicator for `object`.
+ */
+ function compareMultiple(object, other, orders) {
+ var index = -1,
+ objCriteria = object.criteria,
+ othCriteria = other.criteria,
+ length = objCriteria.length,
+ ordersLength = orders.length;
+
+ while (++index < length) {
+ var result = compareAscending(objCriteria[index], othCriteria[index]);
+ if (result) {
+ if (index >= ordersLength) {
+ return result;
+ }
+ var order = orders[index];
+ return result * (order == 'desc' ? -1 : 1);
+ }
+ }
+ // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
+ // that causes it, under certain circumstances, to provide the same value for
+ // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
+ // for more details.
+ //
+ // This also ensures a stable sort in V8 and other engines.
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
+ return object.index - other.index;
+ }
+
+ /**
+ * Creates an array that is the composition of partially applied arguments,
+ * placeholders, and provided arguments into a single array of arguments.
+ *
+ * @private
+ * @param {Array} args The provided arguments.
+ * @param {Array} partials The arguments to prepend to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @params {boolean} [isCurried] Specify composing for a curried function.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+ function composeArgs(args, partials, holders, isCurried) {
+ var argsIndex = -1,
+ argsLength = args.length,
+ holdersLength = holders.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
+ result = Array(leftLength + rangeLength),
+ isUncurried = !isCurried;
+
+ while (++leftIndex < leftLength) {
+ result[leftIndex] = partials[leftIndex];
+ }
+ while (++argsIndex < holdersLength) {
+ if (isUncurried || argsIndex < argsLength) {
+ result[holders[argsIndex]] = args[argsIndex];
+ }
+ }
+ while (rangeLength--) {
+ result[leftIndex++] = args[argsIndex++];
+ }
+ return result;
+ }
+
+ /**
+ * This function is like `composeArgs` except that the arguments composition
+ * is tailored for `_.partialRight`.
+ *
+ * @private
+ * @param {Array} args The provided arguments.
+ * @param {Array} partials The arguments to append to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @params {boolean} [isCurried] Specify composing for a curried function.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+ function composeArgsRight(args, partials, holders, isCurried) {
+ var argsIndex = -1,
+ argsLength = args.length,
+ holdersIndex = -1,
+ holdersLength = holders.length,
+ rightIndex = -1,
+ rightLength = partials.length,
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
+ result = Array(rangeLength + rightLength),
+ isUncurried = !isCurried;
+
+ while (++argsIndex < rangeLength) {
+ result[argsIndex] = args[argsIndex];
+ }
+ var offset = argsIndex;
+ while (++rightIndex < rightLength) {
+ result[offset + rightIndex] = partials[rightIndex];
+ }
+ while (++holdersIndex < holdersLength) {
+ if (isUncurried || argsIndex < argsLength) {
+ result[offset + holders[holdersIndex]] = args[argsIndex++];
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+ function copyArray(source, array) {
+ var index = -1,
+ length = source.length;
+
+ array || (array = Array(length));
+ while (++index < length) {
+ array[index] = source[index];
+ }
+ return array;
+ }
+
+ /**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property identifiers to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
+ */
+ function copyObject(source, props, object, customizer) {
+ var isNew = !object;
+ object || (object = {});
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index];
+
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = source[key];
+ }
+ if (isNew) {
+ baseAssignValue(object, key, newValue);
+ } else {
+ assignValue(object, key, newValue);
+ }
+ }
+ return object;
+ }
+
+ /**
+ * Copies own symbols of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+ function copySymbols(source, object) {
+ return copyObject(source, getSymbols(source), object);
+ }
+
+ /**
+ * Copies own and inherited symbols of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+ function copySymbolsIn(source, object) {
+ return copyObject(source, getSymbolsIn(source), object);
+ }
+
+ /**
+ * Creates a function like `_.groupBy`.
+ *
+ * @private
+ * @param {Function} setter The function to set accumulator values.
+ * @param {Function} [initializer] The accumulator object initializer.
+ * @returns {Function} Returns the new aggregator function.
+ */
+ function createAggregator(setter, initializer) {
+ return function(collection, iteratee) {
+ var func = isArray(collection) ? arrayAggregator : baseAggregator,
+ accumulator = initializer ? initializer() : {};
+
+ return func(collection, setter, getIteratee(iteratee, 2), accumulator);
+ };
+ }
+
+ /**
+ * Creates a function like `_.assign`.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
+ */
+ function createAssigner(assigner) {
+ return baseRest(function(object, sources) {
+ var index = -1,
+ length = sources.length,
+ customizer = length > 1 ? sources[length - 1] : undefined,
+ guard = length > 2 ? sources[2] : undefined;
+
+ customizer = (assigner.length > 3 && typeof customizer == 'function')
+ ? (length--, customizer)
+ : undefined;
+
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ customizer = length < 3 ? undefined : customizer;
+ length = 1;
+ }
+ object = Object(object);
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, index, customizer);
+ }
+ }
+ return object;
+ });
+ }
+
+ /**
+ * Creates a `baseEach` or `baseEachRight` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ if (collection == null) {
+ return collection;
+ }
+ if (!isArrayLike(collection)) {
+ return eachFunc(collection, iteratee);
+ }
+ var length = collection.length,
+ index = fromRight ? length : -1,
+ iterable = Object(collection);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
+ }
+ return collection;
+ };
+ }
+
+ /**
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var index = -1,
+ iterable = Object(object),
+ props = keysFunc(object),
+ length = props.length;
+
+ while (length--) {
+ var key = props[fromRight ? length : ++index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
+ }
+ return object;
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with the optional `this`
+ * binding of `thisArg`.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createBind(func, bitmask, thisArg) {
+ var isBind = bitmask & WRAP_BIND_FLAG,
+ Ctor = createCtor(func);
+
+ function wrapper() {
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return fn.apply(isBind ? thisArg : this, arguments);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a function like `_.lowerFirst`.
+ *
+ * @private
+ * @param {string} methodName The name of the `String` case method to use.
+ * @returns {Function} Returns the new case function.
+ */
+ function createCaseFirst(methodName) {
+ return function(string) {
+ string = toString(string);
+
+ var strSymbols = hasUnicode(string)
+ ? stringToArray(string)
+ : undefined;
+
+ var chr = strSymbols
+ ? strSymbols[0]
+ : string.charAt(0);
+
+ var trailing = strSymbols
+ ? castSlice(strSymbols, 1).join('')
+ : string.slice(1);
+
+ return chr[methodName]() + trailing;
+ };
+ }
+
+ /**
+ * Creates a function like `_.camelCase`.
+ *
+ * @private
+ * @param {Function} callback The function to combine each word.
+ * @returns {Function} Returns the new compounder function.
+ */
+ function createCompounder(callback) {
+ return function(string) {
+ return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
+ };
+ }
+
+ /**
+ * Creates a function that produces an instance of `Ctor` regardless of
+ * whether it was invoked as part of a `new` expression or by `call` or `apply`.
+ *
+ * @private
+ * @param {Function} Ctor The constructor to wrap.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createCtor(Ctor) {
+ return function() {
+ // Use a `switch` statement to work with class constructors. See
+ // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
+ // for more details.
+ var args = arguments;
+ switch (args.length) {
+ case 0: return new Ctor;
+ case 1: return new Ctor(args[0]);
+ case 2: return new Ctor(args[0], args[1]);
+ case 3: return new Ctor(args[0], args[1], args[2]);
+ case 4: return new Ctor(args[0], args[1], args[2], args[3]);
+ case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
+ case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
+ case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
+ }
+ var thisBinding = baseCreate(Ctor.prototype),
+ result = Ctor.apply(thisBinding, args);
+
+ // Mimic the constructor's `return` behavior.
+ // See https://es5.github.io/#x13.2.2 for more details.
+ return isObject(result) ? result : thisBinding;
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to enable currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {number} arity The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createCurry(func, bitmask, arity) {
+ var Ctor = createCtor(func);
+
+ function wrapper() {
+ var length = arguments.length,
+ args = Array(length),
+ index = length,
+ placeholder = getHolder(wrapper);
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
+ ? []
+ : replaceHolders(args, placeholder);
+
+ length -= holders.length;
+ if (length < arity) {
+ return createRecurry(
+ func, bitmask, createHybrid, wrapper.placeholder, undefined,
+ args, holders, undefined, undefined, arity - length);
+ }
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return apply(fn, this, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a `_.find` or `_.findLast` function.
+ *
+ * @private
+ * @param {Function} findIndexFunc The function to find the collection index.
+ * @returns {Function} Returns the new find function.
+ */
+ function createFind(findIndexFunc) {
+ return function(collection, predicate, fromIndex) {
+ var iterable = Object(collection);
+ if (!isArrayLike(collection)) {
+ var iteratee = getIteratee(predicate, 3);
+ collection = keys(collection);
+ predicate = function(key) { return iteratee(iterable[key], key, iterable); };
+ }
+ var index = findIndexFunc(collection, predicate, fromIndex);
+ return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
+ };
+ }
+
+ /**
+ * Creates a `_.flow` or `_.flowRight` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new flow function.
+ */
+ function createFlow(fromRight) {
+ return flatRest(function(funcs) {
+ var length = funcs.length,
+ index = length,
+ prereq = LodashWrapper.prototype.thru;
+
+ if (fromRight) {
+ funcs.reverse();
+ }
+ while (index--) {
+ var func = funcs[index];
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
+ var wrapper = new LodashWrapper([], true);
+ }
+ }
+ index = wrapper ? index : length;
+ while (++index < length) {
+ func = funcs[index];
+
+ var funcName = getFuncName(func),
+ data = funcName == 'wrapper' ? getData(func) : undefined;
+
+ if (data && isLaziable(data[0]) &&
+ data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
+ !data[4].length && data[9] == 1
+ ) {
+ wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
+ } else {
+ wrapper = (func.length == 1 && isLaziable(func))
+ ? wrapper[funcName]()
+ : wrapper.thru(func);
+ }
+ }
+ return function() {
+ var args = arguments,
+ value = args[0];
+
+ if (wrapper && args.length == 1 &&
+ isArray(value) && value.length >= LARGE_ARRAY_SIZE) {
+ return wrapper.plant(value).value();
+ }
+ var index = 0,
+ result = length ? funcs[index].apply(this, args) : value;
+
+ while (++index < length) {
+ result = funcs[index].call(this, result);
+ }
+ return result;
+ };
+ });
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with optional `this`
+ * binding of `thisArg`, partial application, and currying.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ * the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [partialsRight] The arguments to append to those provided
+ * to the new function.
+ * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
+ var isAry = bitmask & WRAP_ARY_FLAG,
+ isBind = bitmask & WRAP_BIND_FLAG,
+ isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
+ isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
+ isFlip = bitmask & WRAP_FLIP_FLAG,
+ Ctor = isBindKey ? undefined : createCtor(func);
+
+ function wrapper() {
+ var length = arguments.length,
+ args = Array(length),
+ index = length;
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ if (isCurried) {
+ var placeholder = getHolder(wrapper),
+ holdersCount = countHolders(args, placeholder);
+ }
+ if (partials) {
+ args = composeArgs(args, partials, holders, isCurried);
+ }
+ if (partialsRight) {
+ args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
+ }
+ length -= holdersCount;
+ if (isCurried && length < arity) {
+ var newHolders = replaceHolders(args, placeholder);
+ return createRecurry(
+ func, bitmask, createHybrid, wrapper.placeholder, thisArg,
+ args, newHolders, argPos, ary, arity - length
+ );
+ }
+ var thisBinding = isBind ? thisArg : this,
+ fn = isBindKey ? thisBinding[func] : func;
+
+ length = args.length;
+ if (argPos) {
+ args = reorder(args, argPos);
+ } else if (isFlip && length > 1) {
+ args.reverse();
+ }
+ if (isAry && ary < length) {
+ args.length = ary;
+ }
+ if (this && this !== root && this instanceof wrapper) {
+ fn = Ctor || createCtor(fn);
+ }
+ return fn.apply(thisBinding, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a function like `_.invertBy`.
+ *
+ * @private
+ * @param {Function} setter The function to set accumulator values.
+ * @param {Function} toIteratee The function to resolve iteratees.
+ * @returns {Function} Returns the new inverter function.
+ */
+ function createInverter(setter, toIteratee) {
+ return function(object, iteratee) {
+ return baseInverter(object, setter, toIteratee(iteratee), {});
+ };
+ }
+
+ /**
+ * Creates a function that performs a mathematical operation on two values.
+ *
+ * @private
+ * @param {Function} operator The function to perform the operation.
+ * @param {number} [defaultValue] The value used for `undefined` arguments.
+ * @returns {Function} Returns the new mathematical operation function.
+ */
+ function createMathOperation(operator, defaultValue) {
+ return function(value, other) {
+ var result;
+ if (value === undefined && other === undefined) {
+ return defaultValue;
+ }
+ if (value !== undefined) {
+ result = value;
+ }
+ if (other !== undefined) {
+ if (result === undefined) {
+ return other;
+ }
+ if (typeof value == 'string' || typeof other == 'string') {
+ value = baseToString(value);
+ other = baseToString(other);
+ } else {
+ value = baseToNumber(value);
+ other = baseToNumber(other);
+ }
+ result = operator(value, other);
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function like `_.over`.
+ *
+ * @private
+ * @param {Function} arrayFunc The function to iterate over iteratees.
+ * @returns {Function} Returns the new over function.
+ */
+ function createOver(arrayFunc) {
+ return flatRest(function(iteratees) {
+ iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
+ return baseRest(function(args) {
+ var thisArg = this;
+ return arrayFunc(iteratees, function(iteratee) {
+ return apply(iteratee, thisArg, args);
+ });
+ });
+ });
+ }
+
+ /**
+ * Creates the padding for `string` based on `length`. The `chars` string
+ * is truncated if the number of characters exceeds `length`.
+ *
+ * @private
+ * @param {number} length The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padding for `string`.
+ */
+ function createPadding(length, chars) {
+ chars = chars === undefined ? ' ' : baseToString(chars);
+
+ var charsLength = chars.length;
+ if (charsLength < 2) {
+ return charsLength ? baseRepeat(chars, length) : chars;
+ }
+ var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
+ return hasUnicode(chars)
+ ? castSlice(stringToArray(result), 0, length).join('')
+ : result.slice(0, length);
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with the `this` binding
+ * of `thisArg` and `partials` prepended to the arguments it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} partials The arguments to prepend to those provided to
+ * the new function.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createPartial(func, bitmask, thisArg, partials) {
+ var isBind = bitmask & WRAP_BIND_FLAG,
+ Ctor = createCtor(func);
+
+ function wrapper() {
+ var argsIndex = -1,
+ argsLength = arguments.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ args = Array(leftLength + argsLength),
+ fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+
+ while (++leftIndex < leftLength) {
+ args[leftIndex] = partials[leftIndex];
+ }
+ while (argsLength--) {
+ args[leftIndex++] = arguments[++argsIndex];
+ }
+ return apply(fn, isBind ? thisArg : this, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a `_.range` or `_.rangeRight` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new range function.
+ */
+ function createRange(fromRight) {
+ return function(start, end, step) {
+ if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
+ end = step = undefined;
+ }
+ // Ensure the sign of `-0` is preserved.
+ start = toFinite(start);
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = toFinite(end);
+ }
+ step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
+ return baseRange(start, end, step, fromRight);
+ };
+ }
+
+ /**
+ * Creates a function that performs a relational operation on two values.
+ *
+ * @private
+ * @param {Function} operator The function to perform the operation.
+ * @returns {Function} Returns the new relational operation function.
+ */
+ function createRelationalOperation(operator) {
+ return function(value, other) {
+ if (!(typeof value == 'string' && typeof other == 'string')) {
+ value = toNumber(value);
+ other = toNumber(other);
+ }
+ return operator(value, other);
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to continue currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {Function} wrapFunc The function to create the `func` wrapper.
+ * @param {*} placeholder The placeholder value.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ * the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
+ var isCurry = bitmask & WRAP_CURRY_FLAG,
+ newHolders = isCurry ? holders : undefined,
+ newHoldersRight = isCurry ? undefined : holders,
+ newPartials = isCurry ? partials : undefined,
+ newPartialsRight = isCurry ? undefined : partials;
+
+ bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
+ bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
+
+ if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
+ bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
+ }
+ var newData = [
+ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
+ newHoldersRight, argPos, ary, arity
+ ];
+
+ var result = wrapFunc.apply(undefined, newData);
+ if (isLaziable(func)) {
+ setData(result, newData);
+ }
+ result.placeholder = placeholder;
+ return setWrapToString(result, func, bitmask);
+ }
+
+ /**
+ * Creates a function like `_.round`.
+ *
+ * @private
+ * @param {string} methodName The name of the `Math` method to use when rounding.
+ * @returns {Function} Returns the new round function.
+ */
+ function createRound(methodName) {
+ var func = Math[methodName];
+ return function(number, precision) {
+ number = toNumber(number);
+ precision = nativeMin(toInteger(precision), 292);
+ if (precision) {
+ // Shift with exponential notation to avoid floating-point issues.
+ // See [MDN](https://mdn.io/round#Examples) for more details.
+ var pair = (toString(number) + 'e').split('e'),
+ value = func(pair[0] + 'e' + (+pair[1] + precision));
+
+ pair = (toString(value) + 'e').split('e');
+ return +(pair[0] + 'e' + (+pair[1] - precision));
+ }
+ return func(number);
+ };
+ }
+
+ /**
+ * Creates a set object of `values`.
+ *
+ * @private
+ * @param {Array} values The values to add to the set.
+ * @returns {Object} Returns the new set.
+ */
+ var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
+ return new Set(values);
+ };
+
+ /**
+ * Creates a `_.toPairs` or `_.toPairsIn` function.
+ *
+ * @private
+ * @param {Function} keysFunc The function to get the keys of a given object.
+ * @returns {Function} Returns the new pairs function.
+ */
+ function createToPairs(keysFunc) {
+ return function(object) {
+ var tag = getTag(object);
+ if (tag == mapTag) {
+ return mapToArray(object);
+ }
+ if (tag == setTag) {
+ return setToPairs(object);
+ }
+ return baseToPairs(object, keysFunc(object));
+ };
+ }
+
+ /**
+ * Creates a function that either curries or invokes `func` with optional
+ * `this` binding and partially applied arguments.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask flags.
+ * 1 - `_.bind`
+ * 2 - `_.bindKey`
+ * 4 - `_.curry` or `_.curryRight` of a bound function
+ * 8 - `_.curry`
+ * 16 - `_.curryRight`
+ * 32 - `_.partial`
+ * 64 - `_.partialRight`
+ * 128 - `_.rearg`
+ * 256 - `_.ary`
+ * 512 - `_.flip`
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to be partially applied.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
+ var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
+ if (!isBindKey && typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var length = partials ? partials.length : 0;
+ if (!length) {
+ bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
+ partials = holders = undefined;
+ }
+ ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
+ arity = arity === undefined ? arity : toInteger(arity);
+ length -= holders ? holders.length : 0;
+
+ if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
+ var partialsRight = partials,
+ holdersRight = holders;
+
+ partials = holders = undefined;
+ }
+ var data = isBindKey ? undefined : getData(func);
+
+ var newData = [
+ func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
+ argPos, ary, arity
+ ];
+
+ if (data) {
+ mergeData(newData, data);
+ }
+ func = newData[0];
+ bitmask = newData[1];
+ thisArg = newData[2];
+ partials = newData[3];
+ holders = newData[4];
+ arity = newData[9] = newData[9] == null
+ ? (isBindKey ? 0 : func.length)
+ : nativeMax(newData[9] - length, 0);
+
+ if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
+ bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
+ }
+ if (!bitmask || bitmask == WRAP_BIND_FLAG) {
+ var result = createBind(func, bitmask, thisArg);
+ } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
+ result = createCurry(func, bitmask, arity);
+ } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
+ result = createPartial(func, bitmask, thisArg, partials);
+ } else {
+ result = createHybrid.apply(undefined, newData);
+ }
+ var setter = data ? baseSetData : setData;
+ return setWrapToString(setter(result, newData), func, bitmask);
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(array);
+ if (stacked && stack.get(other)) {
+ return stacked == other;
+ }
+ var index = -1,
+ result = true,
+ seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
+
+ stack.set(array, other);
+ stack.set(other, array);
+
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, arrValue, index, other, array, stack)
+ : customizer(arrValue, othValue, index, array, other, stack);
+ }
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
+ }
+ result = false;
+ break;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (seen) {
+ if (!arraySome(other, function(othValue, othIndex) {
+ if (!cacheHas(seen, othIndex) &&
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
+ return seen.push(othIndex);
+ }
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
+ )) {
+ result = false;
+ break;
+ }
+ }
+ stack['delete'](array);
+ stack['delete'](other);
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
+ switch (tag) {
+ case dataViewTag:
+ if ((object.byteLength != other.byteLength) ||
+ (object.byteOffset != other.byteOffset)) {
+ return false;
+ }
+ object = object.buffer;
+ other = other.buffer;
+
+ case arrayBufferTag:
+ if ((object.byteLength != other.byteLength) ||
+ !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
+ return false;
+ }
+ return true;
+
+ case boolTag:
+ case dateTag:
+ case numberTag:
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
+ // Invalid dates are coerced to `NaN`.
+ return eq(+object, +other);
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings, primitives and objects,
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
+ // for more details.
+ return object == (other + '');
+
+ case mapTag:
+ var convert = mapToArray;
+
+ case setTag:
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
+ convert || (convert = setToArray);
+
+ if (object.size != other.size && !isPartial) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked) {
+ return stacked == other;
+ }
+ bitmask |= COMPARE_UNORDERED_FLAG;
+
+ // Recursively compare objects (susceptible to call stack limits).
+ stack.set(object, other);
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
+ stack['delete'](object);
+ return result;
+
+ case symbolTag:
+ if (symbolValueOf) {
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ objProps = keys(object),
+ objLength = objProps.length,
+ othProps = keys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked && stack.get(other)) {
+ return stacked == other;
+ }
+ var result = true;
+ stack.set(object, other);
+ stack.set(other, object);
+
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, objValue, key, other, object, stack)
+ : customizer(objValue, othValue, key, object, other, stack);
+ }
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
+ }
+ }
+ stack['delete'](object);
+ stack['delete'](other);
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseRest` which flattens the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+ function flatRest(func) {
+ return setToString(overRest(func, undefined, flatten), func + '');
+ }
+
+ /**
+ * Creates an array of own enumerable property names and symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function getAllKeys(object) {
+ return baseGetAllKeys(object, keys, getSymbols);
+ }
+
+ /**
+ * Creates an array of own and inherited enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function getAllKeysIn(object) {
+ return baseGetAllKeys(object, keysIn, getSymbolsIn);
+ }
+
+ /**
+ * Gets metadata for `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {*} Returns the metadata for `func`.
+ */
+ var getData = !metaMap ? noop : function(func) {
+ return metaMap.get(func);
+ };
+
+ /**
+ * Gets the name of `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {string} Returns the function name.
+ */
+ function getFuncName(func) {
+ var result = (func.name + ''),
+ array = realNames[result],
+ length = hasOwnProperty.call(realNames, result) ? array.length : 0;
+
+ while (length--) {
+ var data = array[length],
+ otherFunc = data.func;
+ if (otherFunc == null || otherFunc == func) {
+ return data.name;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Gets the argument placeholder value for `func`.
+ *
+ * @private
+ * @param {Function} func The function to inspect.
+ * @returns {*} Returns the placeholder value.
+ */
+ function getHolder(func) {
+ var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
+ return object.placeholder;
+ }
+
+ /**
+ * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
+ * this function returns the custom method, otherwise it returns `baseIteratee`.
+ * If arguments are provided, the chosen function is invoked with them and
+ * its result is returned.
+ *
+ * @private
+ * @param {*} [value] The value to convert to an iteratee.
+ * @param {number} [arity] The arity of the created iteratee.
+ * @returns {Function} Returns the chosen function or its result.
+ */
+ function getIteratee() {
+ var result = lodash.iteratee || iteratee;
+ result = result === iteratee ? baseIteratee : result;
+ return arguments.length ? result(arguments[0], arguments[1]) : result;
+ }
+
+ /**
+ * Gets the data for `map`.
+ *
+ * @private
+ * @param {Object} map The map to query.
+ * @param {string} key The reference key.
+ * @returns {*} Returns the map data.
+ */
+ function getMapData(map, key) {
+ var data = map.__data__;
+ return isKeyable(key)
+ ? data[typeof key == 'string' ? 'string' : 'hash']
+ : data.map;
+ }
+
+ /**
+ * Gets the property names, values, and compare flags of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the match data of `object`.
+ */
+ function getMatchData(object) {
+ var result = keys(object),
+ length = result.length;
+
+ while (length--) {
+ var key = result[length],
+ value = object[key];
+
+ result[length] = [key, value, isStrictComparable(value)];
+ }
+ return result;
+ }
+
+ /**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+ function getNative(object, key) {
+ var value = getValue(object, key);
+ return baseIsNative(value) ? value : undefined;
+ }
+
+ /**
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the raw `toStringTag`.
+ */
+ function getRawTag(value) {
+ var isOwn = hasOwnProperty.call(value, symToStringTag),
+ tag = value[symToStringTag];
+
+ try {
+ value[symToStringTag] = undefined;
+ var unmasked = true;
+ } catch (e) {}
+
+ var result = nativeObjectToString.call(value);
+ if (unmasked) {
+ if (isOwn) {
+ value[symToStringTag] = tag;
+ } else {
+ delete value[symToStringTag];
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Creates an array of the own enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+ var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
+
+ /**
+ * Creates an array of the own and inherited enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
+ var result = [];
+ while (object) {
+ arrayPush(result, getSymbols(object));
+ object = getPrototype(object);
+ }
+ return result;
+ };
+
+ /**
+ * Gets the `toStringTag` of `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+ var getTag = baseGetTag;
+
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
+ (Map && getTag(new Map) != mapTag) ||
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
+ (Set && getTag(new Set) != setTag) ||
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
+ getTag = function(value) {
+ var result = baseGetTag(value),
+ Ctor = result == objectTag ? value.constructor : undefined,
+ ctorString = Ctor ? toSource(Ctor) : '';
+
+ if (ctorString) {
+ switch (ctorString) {
+ case dataViewCtorString: return dataViewTag;
+ case mapCtorString: return mapTag;
+ case promiseCtorString: return promiseTag;
+ case setCtorString: return setTag;
+ case weakMapCtorString: return weakMapTag;
+ }
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Gets the view, applying any `transforms` to the `start` and `end` positions.
+ *
+ * @private
+ * @param {number} start The start of the view.
+ * @param {number} end The end of the view.
+ * @param {Array} transforms The transformations to apply to the view.
+ * @returns {Object} Returns an object containing the `start` and `end`
+ * positions of the view.
+ */
+ function getView(start, end, transforms) {
+ var index = -1,
+ length = transforms.length;
+
+ while (++index < length) {
+ var data = transforms[index],
+ size = data.size;
+
+ switch (data.type) {
+ case 'drop': start += size; break;
+ case 'dropRight': end -= size; break;
+ case 'take': end = nativeMin(end, start + size); break;
+ case 'takeRight': start = nativeMax(start, end - size); break;
+ }
+ }
+ return { 'start': start, 'end': end };
+ }
+
+ /**
+ * Extracts wrapper details from the `source` body comment.
+ *
+ * @private
+ * @param {string} source The source to inspect.
+ * @returns {Array} Returns the wrapper details.
+ */
+ function getWrapDetails(source) {
+ var match = source.match(reWrapDetails);
+ return match ? match[1].split(reSplitDetails) : [];
+ }
+
+ /**
+ * Checks if `path` exists on `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @param {Function} hasFunc The function to check properties.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ */
+ function hasPath(object, path, hasFunc) {
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length,
+ result = false;
+
+ while (++index < length) {
+ var key = toKey(path[index]);
+ if (!(result = object != null && hasFunc(object, key))) {
+ break;
+ }
+ object = object[key];
+ }
+ if (result || ++index != length) {
+ return result;
+ }
+ length = object == null ? 0 : object.length;
+ return !!length && isLength(length) && isIndex(key, length) &&
+ (isArray(object) || isArguments(object));
+ }
+
+ /**
+ * Initializes an array clone.
+ *
+ * @private
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the initialized clone.
+ */
+ function initCloneArray(array) {
+ var length = array.length,
+ result = array.constructor(length);
+
+ // Add properties assigned by `RegExp#exec`.
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
+ result.index = array.index;
+ result.input = array.input;
+ }
+ return result;
+ }
+
+ /**
+ * Initializes an object clone.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+ function initCloneObject(object) {
+ return (typeof object.constructor == 'function' && !isPrototype(object))
+ ? baseCreate(getPrototype(object))
+ : {};
+ }
+
+ /**
+ * Initializes an object clone based on its `toStringTag`.
+ *
+ * **Note:** This function only supports cloning values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @param {string} tag The `toStringTag` of the object to clone.
+ * @param {Function} cloneFunc The function to clone values.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+ function initCloneByTag(object, tag, cloneFunc, isDeep) {
+ var Ctor = object.constructor;
+ switch (tag) {
+ case arrayBufferTag:
+ return cloneArrayBuffer(object);
+
+ case boolTag:
+ case dateTag:
+ return new Ctor(+object);
+
+ case dataViewTag:
+ return cloneDataView(object, isDeep);
+
+ case float32Tag: case float64Tag:
+ case int8Tag: case int16Tag: case int32Tag:
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
+ return cloneTypedArray(object, isDeep);
+
+ case mapTag:
+ return cloneMap(object, isDeep, cloneFunc);
+
+ case numberTag:
+ case stringTag:
+ return new Ctor(object);
+
+ case regexpTag:
+ return cloneRegExp(object);
+
+ case setTag:
+ return cloneSet(object, isDeep, cloneFunc);
+
+ case symbolTag:
+ return cloneSymbol(object);
+ }
+ }
+
+ /**
+ * Inserts wrapper `details` in a comment at the top of the `source` body.
+ *
+ * @private
+ * @param {string} source The source to modify.
+ * @returns {Array} details The details to insert.
+ * @returns {string} Returns the modified source.
+ */
+ function insertWrapDetails(source, details) {
+ var length = details.length;
+ if (!length) {
+ return source;
+ }
+ var lastIndex = length - 1;
+ details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
+ details = details.join(length > 2 ? ', ' : ' ');
+ return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
+ }
+
+ /**
+ * Checks if `value` is a flattenable `arguments` object or array.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
+ */
+ function isFlattenable(value) {
+ return isArray(value) || isArguments(value) ||
+ !!(spreadableSymbol && value && value[spreadableSymbol]);
+ }
+
+ /**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+ function isIndex(value, length) {
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return !!length &&
+ (typeof value == 'number' || reIsUint.test(value)) &&
+ (value > -1 && value % 1 == 0 && value < length);
+ }
+
+ /**
+ * Checks if the given arguments are from an iteratee call.
+ *
+ * @private
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
+ * else `false`.
+ */
+ function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)
+ ) {
+ return eq(object[index], value);
+ }
+ return false;
+ }
+
+ /**
+ * Checks if `value` is a property name and not a property path.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+ */
+ function isKey(value, object) {
+ if (isArray(value)) {
+ return false;
+ }
+ var type = typeof value;
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
+ value == null || isSymbol(value)) {
+ return true;
+ }
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
+ (object != null && value in Object(object));
+ }
+
+ /**
+ * Checks if `value` is suitable for use as unique object key.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
+ */
+ function isKeyable(value) {
+ var type = typeof value;
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+ ? (value !== '__proto__')
+ : (value === null);
+ }
+
+ /**
+ * Checks if `func` has a lazy counterpart.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
+ * else `false`.
+ */
+ function isLaziable(func) {
+ var funcName = getFuncName(func),
+ other = lodash[funcName];
+
+ if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
+ return false;
+ }
+ if (func === other) {
+ return true;
+ }
+ var data = getData(other);
+ return !!data && func === data[0];
+ }
+
+ /**
+ * Checks if `func` has its source masked.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
+ */
+ function isMasked(func) {
+ return !!maskSrcKey && (maskSrcKey in func);
+ }
+
+ /**
+ * Checks if `func` is capable of being masked.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
+ */
+ var isMaskable = coreJsData ? isFunction : stubFalse;
+
+ /**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+ function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+ }
+
+ /**
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
+ * equality comparisons, else `false`.
+ */
+ function isStrictComparable(value) {
+ return value === value && !isObject(value);
+ }
+
+ /**
+ * A specialized version of `matchesProperty` for source values suitable
+ * for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function matchesStrictComparable(key, srcValue) {
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ return object[key] === srcValue &&
+ (srcValue !== undefined || (key in Object(object)));
+ };
+ }
+
+ /**
+ * A specialized version of `_.memoize` which clears the memoized function's
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
+ *
+ * @private
+ * @param {Function} func The function to have its output memoized.
+ * @returns {Function} Returns the new memoized function.
+ */
+ function memoizeCapped(func) {
+ var result = memoize(func, function(key) {
+ if (cache.size === MAX_MEMOIZE_SIZE) {
+ cache.clear();
+ }
+ return key;
+ });
+
+ var cache = result.cache;
+ return result;
+ }
+
+ /**
+ * Merges the function metadata of `source` into `data`.
+ *
+ * Merging metadata reduces the number of wrappers used to invoke a function.
+ * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
+ * may be applied regardless of execution order. Methods like `_.ary` and
+ * `_.rearg` modify function arguments, making the order in which they are
+ * executed important, preventing the merging of metadata. However, we make
+ * an exception for a safe combined case where curried functions have `_.ary`
+ * and or `_.rearg` applied.
+ *
+ * @private
+ * @param {Array} data The destination metadata.
+ * @param {Array} source The source metadata.
+ * @returns {Array} Returns `data`.
+ */
+ function mergeData(data, source) {
+ var bitmask = data[1],
+ srcBitmask = source[1],
+ newBitmask = bitmask | srcBitmask,
+ isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
+
+ var isCombo =
+ ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
+ ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
+ ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
+
+ // Exit early if metadata can't be merged.
+ if (!(isCommon || isCombo)) {
+ return data;
+ }
+ // Use source `thisArg` if available.
+ if (srcBitmask & WRAP_BIND_FLAG) {
+ data[2] = source[2];
+ // Set when currying a bound function.
+ newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
+ }
+ // Compose partial arguments.
+ var value = source[3];
+ if (value) {
+ var partials = data[3];
+ data[3] = partials ? composeArgs(partials, value, source[4]) : value;
+ data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
+ }
+ // Compose partial right arguments.
+ value = source[5];
+ if (value) {
+ partials = data[5];
+ data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
+ data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
+ }
+ // Use source `argPos` if available.
+ value = source[7];
+ if (value) {
+ data[7] = value;
+ }
+ // Use source `ary` if it's smaller.
+ if (srcBitmask & WRAP_ARY_FLAG) {
+ data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
+ }
+ // Use source `arity` if one is not provided.
+ if (data[9] == null) {
+ data[9] = source[9];
+ }
+ // Use source `func` and merge bitmasks.
+ data[0] = source[0];
+ data[1] = newBitmask;
+
+ return data;
+ }
+
+ /**
+ * Used by `_.defaultsDeep` to customize its `_.merge` use.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to merge.
+ * @param {Object} object The parent object of `objValue`.
+ * @param {Object} source The parent object of `srcValue`.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ * @returns {*} Returns the value to assign.
+ */
+ function mergeDefaults(objValue, srcValue, key, object, source, stack) {
+ if (isObject(objValue) && isObject(srcValue)) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ stack.set(srcValue, objValue);
+ baseMerge(objValue, srcValue, undefined, mergeDefaults, stack);
+ stack['delete'](srcValue);
+ }
+ return objValue;
+ }
+
+ /**
+ * This function is like
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * except that it includes inherited enumerable properties.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function nativeKeysIn(object) {
+ var result = [];
+ if (object != null) {
+ for (var key in Object(object)) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts `value` to a string using `Object.prototype.toString`.
+ *
+ * @private
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ */
+ function objectToString(value) {
+ return nativeObjectToString.call(value);
+ }
+
+ /**
+ * A specialized version of `baseRest` which transforms the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @param {Function} transform The rest array transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overRest(func, start, transform) {
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ index = -1;
+ var otherArgs = Array(start + 1);
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = transform(array);
+ return apply(func, this, otherArgs);
+ };
+ }
+
+ /**
+ * Gets the parent value at `path` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} path The path to get the parent value of.
+ * @returns {*} Returns the parent value.
+ */
+ function parent(object, path) {
+ return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
+ }
+
+ /**
+ * Reorder `array` according to the specified indexes where the element at
+ * the first index is assigned as the first element, the element at
+ * the second index is assigned as the second element, and so on.
+ *
+ * @private
+ * @param {Array} array The array to reorder.
+ * @param {Array} indexes The arranged array indexes.
+ * @returns {Array} Returns `array`.
+ */
+ function reorder(array, indexes) {
+ var arrLength = array.length,
+ length = nativeMin(indexes.length, arrLength),
+ oldArray = copyArray(array);
+
+ while (length--) {
+ var index = indexes[length];
+ array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
+ }
+ return array;
+ }
+
+ /**
+ * Sets metadata for `func`.
+ *
+ * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
+ * period of time, it will trip its breaker and transition to an identity
+ * function to avoid garbage collection pauses in V8. See
+ * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
+ * for more details.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+ var setData = shortOut(baseSetData);
+
+ /**
+ * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
+ *
+ * @private
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @returns {number|Object} Returns the timer id or timeout object.
+ */
+ var setTimeout = ctxSetTimeout || function(func, wait) {
+ return root.setTimeout(func, wait);
+ };
+
+ /**
+ * Sets the `toString` method of `func` to return `string`.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+ var setToString = shortOut(baseSetToString);
+
+ /**
+ * Sets the `toString` method of `wrapper` to mimic the source of `reference`
+ * with wrapper details in a comment at the top of the source body.
+ *
+ * @private
+ * @param {Function} wrapper The function to modify.
+ * @param {Function} reference The reference function.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @returns {Function} Returns `wrapper`.
+ */
+ function setWrapToString(wrapper, reference, bitmask) {
+ var source = (reference + '');
+ return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
+ }
+
+ /**
+ * Creates a function that'll short out and invoke `identity` instead
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
+ * milliseconds.
+ *
+ * @private
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new shortable function.
+ */
+ function shortOut(func) {
+ var count = 0,
+ lastCalled = 0;
+
+ return function() {
+ var stamp = nativeNow(),
+ remaining = HOT_SPAN - (stamp - lastCalled);
+
+ lastCalled = stamp;
+ if (remaining > 0) {
+ if (++count >= HOT_COUNT) {
+ return arguments[0];
+ }
+ } else {
+ count = 0;
+ }
+ return func.apply(undefined, arguments);
+ };
+ }
+
+ /**
+ * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
+ *
+ * @private
+ * @param {Array} array The array to shuffle.
+ * @param {number} [size=array.length] The size of `array`.
+ * @returns {Array} Returns `array`.
+ */
+ function shuffleSelf(array, size) {
+ var index = -1,
+ length = array.length,
+ lastIndex = length - 1;
+
+ size = size === undefined ? length : size;
+ while (++index < size) {
+ var rand = baseRandom(index, lastIndex),
+ value = array[rand];
+
+ array[rand] = array[index];
+ array[index] = value;
+ }
+ array.length = size;
+ return array;
+ }
+
+ /**
+ * Converts `string` to a property path array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the property path array.
+ */
+ var stringToPath = memoizeCapped(function(string) {
+ var result = [];
+ if (reLeadingDot.test(string)) {
+ result.push('');
+ }
+ string.replace(rePropName, function(match, number, quote, string) {
+ result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+ });
+
+ /**
+ * Converts `value` to a string key if it's not a string or symbol.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {string|symbol} Returns the key.
+ */
+ function toKey(value) {
+ if (typeof value == 'string' || isSymbol(value)) {
+ return value;
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+ }
+
+ /**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to convert.
+ * @returns {string} Returns the source code.
+ */
+ function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e) {}
+ try {
+ return (func + '');
+ } catch (e) {}
+ }
+ return '';
+ }
+
+ /**
+ * Updates wrapper `details` based on `bitmask` flags.
+ *
+ * @private
+ * @returns {Array} details The details to modify.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @returns {Array} Returns `details`.
+ */
+ function updateWrapDetails(details, bitmask) {
+ arrayEach(wrapFlags, function(pair) {
+ var value = '_.' + pair[0];
+ if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
+ details.push(value);
+ }
+ });
+ return details.sort();
+ }
+
+ /**
+ * Creates a clone of `wrapper`.
+ *
+ * @private
+ * @param {Object} wrapper The wrapper to clone.
+ * @returns {Object} Returns the cloned wrapper.
+ */
+ function wrapperClone(wrapper) {
+ if (wrapper instanceof LazyWrapper) {
+ return wrapper.clone();
+ }
+ var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
+ result.__actions__ = copyArray(wrapper.__actions__);
+ result.__index__ = wrapper.__index__;
+ result.__values__ = wrapper.__values__;
+ return result;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an array of elements split into groups the length of `size`.
+ * If `array` can't be split evenly, the final chunk will be the remaining
+ * elements.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to process.
+ * @param {number} [size=1] The length of each chunk
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the new array of chunks.
+ * @example
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 2);
+ * // => [['a', 'b'], ['c', 'd']]
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 3);
+ * // => [['a', 'b', 'c'], ['d']]
+ */
+ function chunk(array, size, guard) {
+ if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
+ size = 1;
+ } else {
+ size = nativeMax(toInteger(size), 0);
+ }
+ var length = array == null ? 0 : array.length;
+ if (!length || size < 1) {
+ return [];
+ }
+ var index = 0,
+ resIndex = 0,
+ result = Array(nativeCeil(length / size));
+
+ while (index < length) {
+ result[resIndex++] = baseSlice(array, index, (index += size));
+ }
+ return result;
+ }
+
+ /**
+ * Creates an array with all falsey values removed. The values `false`, `null`,
+ * `0`, `""`, `undefined`, and `NaN` are falsey.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to compact.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.compact([0, 1, false, 2, '', 3]);
+ * // => [1, 2, 3]
+ */
+ function compact(array) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Creates a new array concatenating `array` with any additional arrays
+ * and/or values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to concatenate.
+ * @param {...*} [values] The values to concatenate.
+ * @returns {Array} Returns the new concatenated array.
+ * @example
+ *
+ * var array = [1];
+ * var other = _.concat(array, 2, [3], [[4]]);
+ *
+ * console.log(other);
+ * // => [1, 2, 3, [4]]
+ *
+ * console.log(array);
+ * // => [1]
+ */
+ function concat() {
+ var length = arguments.length;
+ if (!length) {
+ return [];
+ }
+ var args = Array(length - 1),
+ array = arguments[0],
+ index = length;
+
+ while (index--) {
+ args[index - 1] = arguments[index];
+ }
+ return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
+ }
+
+ /**
+ * Creates an array of `array` values not included in the other given arrays
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. The order and references of result values are
+ * determined by the first array.
+ *
+ * **Note:** Unlike `_.pullAll`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.without, _.xor
+ * @example
+ *
+ * _.difference([2, 1], [2, 3]);
+ * // => [1]
+ */
+ var difference = baseRest(function(array, values) {
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
+ : [];
+ });
+
+ /**
+ * This method is like `_.difference` except that it accepts `iteratee` which
+ * is invoked for each element of `array` and `values` to generate the criterion
+ * by which they're compared. The order and references of result values are
+ * determined by the first array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
+ * // => [{ 'x': 2 }]
+ */
+ var differenceBy = baseRest(function(array, values) {
+ var iteratee = last(values);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
+ : [];
+ });
+
+ /**
+ * This method is like `_.difference` except that it accepts `comparator`
+ * which is invoked to compare elements of `array` to `values`. The order and
+ * references of result values are determined by the first array. The comparator
+ * is invoked with two arguments: (arrVal, othVal).
+ *
+ * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ *
+ * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
+ * // => [{ 'x': 2, 'y': 1 }]
+ */
+ var differenceWith = baseRest(function(array, values) {
+ var comparator = last(values);
+ if (isArrayLikeObject(comparator)) {
+ comparator = undefined;
+ }
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
+ : [];
+ });
+
+ /**
+ * Creates a slice of `array` with `n` elements dropped from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.drop([1, 2, 3]);
+ * // => [2, 3]
+ *
+ * _.drop([1, 2, 3], 2);
+ * // => [3]
+ *
+ * _.drop([1, 2, 3], 5);
+ * // => []
+ *
+ * _.drop([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+ function drop(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ return baseSlice(array, n < 0 ? 0 : n, length);
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements dropped from the end.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.dropRight([1, 2, 3]);
+ * // => [1, 2]
+ *
+ * _.dropRight([1, 2, 3], 2);
+ * // => [1]
+ *
+ * _.dropRight([1, 2, 3], 5);
+ * // => []
+ *
+ * _.dropRight([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+ function dropRight(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ n = length - n;
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+ }
+
+ /**
+ * Creates a slice of `array` excluding elements dropped from the end.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.dropRightWhile(users, function(o) { return !o.active; });
+ * // => objects for ['barney']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.dropRightWhile(users, ['active', false]);
+ * // => objects for ['barney']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.dropRightWhile(users, 'active');
+ * // => objects for ['barney', 'fred', 'pebbles']
+ */
+ function dropRightWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3), true, true)
+ : [];
+ }
+
+ /**
+ * Creates a slice of `array` excluding elements dropped from the beginning.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.dropWhile(users, function(o) { return !o.active; });
+ * // => objects for ['pebbles']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.dropWhile(users, { 'user': 'barney', 'active': false });
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.dropWhile(users, ['active', false]);
+ * // => objects for ['pebbles']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.dropWhile(users, 'active');
+ * // => objects for ['barney', 'fred', 'pebbles']
+ */
+ function dropWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3), true)
+ : [];
+ }
+
+ /**
+ * Fills elements of `array` with `value` from `start` up to, but not
+ * including, `end`.
+ *
+ * **Note:** This method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Array
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _.fill(array, 'a');
+ * console.log(array);
+ * // => ['a', 'a', 'a']
+ *
+ * _.fill(Array(3), 2);
+ * // => [2, 2, 2]
+ *
+ * _.fill([4, 6, 8, 10], '*', 1, 3);
+ * // => [4, '*', '*', 10]
+ */
+ function fill(array, value, start, end) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
+ start = 0;
+ end = length;
+ }
+ return baseFill(array, value, start, end);
+ }
+
+ /**
+ * This method is like `_.find` except that it returns the index of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.findIndex(users, function(o) { return o.user == 'barney'; });
+ * // => 0
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findIndex(users, { 'user': 'fred', 'active': false });
+ * // => 1
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findIndex(users, ['active', false]);
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findIndex(users, 'active');
+ * // => 2
+ */
+ function findIndex(array, predicate, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
+ }
+ return baseFindIndex(array, getIteratee(predicate, 3), index);
+ }
+
+ /**
+ * This method is like `_.findIndex` except that it iterates over elements
+ * of `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=array.length-1] The index to search from.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
+ * // => 2
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findLastIndex(users, { 'user': 'barney', 'active': true });
+ * // => 0
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findLastIndex(users, ['active', false]);
+ * // => 2
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findLastIndex(users, 'active');
+ * // => 0
+ */
+ function findLastIndex(array, predicate, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = length - 1;
+ if (fromIndex !== undefined) {
+ index = toInteger(fromIndex);
+ index = fromIndex < 0
+ ? nativeMax(length + index, 0)
+ : nativeMin(index, length - 1);
+ }
+ return baseFindIndex(array, getIteratee(predicate, 3), index, true);
+ }
+
+ /**
+ * Flattens `array` a single level deep.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flatten([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, [3, [4]], 5]
+ */
+ function flatten(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, 1) : [];
+ }
+
+ /**
+ * Recursively flattens `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flattenDeep([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, 3, 4, 5]
+ */
+ function flattenDeep(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, INFINITY) : [];
+ }
+
+ /**
+ * Recursively flatten `array` up to `depth` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.4.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @param {number} [depth=1] The maximum recursion depth.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * var array = [1, [2, [3, [4]], 5]];
+ *
+ * _.flattenDepth(array, 1);
+ * // => [1, 2, [3, [4]], 5]
+ *
+ * _.flattenDepth(array, 2);
+ * // => [1, 2, 3, [4], 5]
+ */
+ function flattenDepth(array, depth) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ depth = depth === undefined ? 1 : toInteger(depth);
+ return baseFlatten(array, depth);
+ }
+
+ /**
+ * The inverse of `_.toPairs`; this method returns an object composed
+ * from key-value `pairs`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} pairs The key-value pairs.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.fromPairs([['a', 1], ['b', 2]]);
+ * // => { 'a': 1, 'b': 2 }
+ */
+ function fromPairs(pairs) {
+ var index = -1,
+ length = pairs == null ? 0 : pairs.length,
+ result = {};
+
+ while (++index < length) {
+ var pair = pairs[index];
+ result[pair[0]] = pair[1];
+ }
+ return result;
+ }
+
+ /**
+ * Gets the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias first
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the first element of `array`.
+ * @example
+ *
+ * _.head([1, 2, 3]);
+ * // => 1
+ *
+ * _.head([]);
+ * // => undefined
+ */
+ function head(array) {
+ return (array && array.length) ? array[0] : undefined;
+ }
+
+ /**
+ * Gets the index at which the first occurrence of `value` is found in `array`
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. If `fromIndex` is negative, it's used as the
+ * offset from the end of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.indexOf([1, 2, 1, 2], 2);
+ * // => 1
+ *
+ * // Search from the `fromIndex`.
+ * _.indexOf([1, 2, 1, 2], 2, 2);
+ * // => 3
+ */
+ function indexOf(array, value, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
+ }
+ return baseIndexOf(array, value, index);
+ }
+
+ /**
+ * Gets all but the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.initial([1, 2, 3]);
+ * // => [1, 2]
+ */
+ function initial(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseSlice(array, 0, -1) : [];
+ }
+
+ /**
+ * Creates an array of unique values that are included in all given arrays
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. The order and references of result values are
+ * determined by the first array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * _.intersection([2, 1], [2, 3]);
+ * // => [2]
+ */
+ var intersection = baseRest(function(arrays) {
+ var mapped = arrayMap(arrays, castArrayLikeObject);
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped)
+ : [];
+ });
+
+ /**
+ * This method is like `_.intersection` except that it accepts `iteratee`
+ * which is invoked for each element of each `arrays` to generate the criterion
+ * by which they're compared. The order and references of result values are
+ * determined by the first array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [2.1]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }]
+ */
+ var intersectionBy = baseRest(function(arrays) {
+ var iteratee = last(arrays),
+ mapped = arrayMap(arrays, castArrayLikeObject);
+
+ if (iteratee === last(mapped)) {
+ iteratee = undefined;
+ } else {
+ mapped.pop();
+ }
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped, getIteratee(iteratee, 2))
+ : [];
+ });
+
+ /**
+ * This method is like `_.intersection` except that it accepts `comparator`
+ * which is invoked to compare elements of `arrays`. The order and references
+ * of result values are determined by the first array. The comparator is
+ * invoked with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.intersectionWith(objects, others, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }]
+ */
+ var intersectionWith = baseRest(function(arrays) {
+ var comparator = last(arrays),
+ mapped = arrayMap(arrays, castArrayLikeObject);
+
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ if (comparator) {
+ mapped.pop();
+ }
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped, undefined, comparator)
+ : [];
+ });
+
+ /**
+ * Converts all elements in `array` into a string separated by `separator`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to convert.
+ * @param {string} [separator=','] The element separator.
+ * @returns {string} Returns the joined string.
+ * @example
+ *
+ * _.join(['a', 'b', 'c'], '~');
+ * // => 'a~b~c'
+ */
+ function join(array, separator) {
+ return array == null ? '' : nativeJoin.call(array, separator);
+ }
+
+ /**
+ * Gets the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the last element of `array`.
+ * @example
+ *
+ * _.last([1, 2, 3]);
+ * // => 3
+ */
+ function last(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? array[length - 1] : undefined;
+ }
+
+ /**
+ * This method is like `_.indexOf` except that it iterates over elements of
+ * `array` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=array.length-1] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.lastIndexOf([1, 2, 1, 2], 2);
+ * // => 3
+ *
+ * // Search from the `fromIndex`.
+ * _.lastIndexOf([1, 2, 1, 2], 2, 2);
+ * // => 1
+ */
+ function lastIndexOf(array, value, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = length;
+ if (fromIndex !== undefined) {
+ index = toInteger(fromIndex);
+ index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
+ }
+ return value === value
+ ? strictLastIndexOf(array, value, index)
+ : baseFindIndex(array, baseIsNaN, index, true);
+ }
+
+ /**
+ * Gets the element at index `n` of `array`. If `n` is negative, the nth
+ * element from the end is returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.11.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=0] The index of the element to return.
+ * @returns {*} Returns the nth element of `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'd'];
+ *
+ * _.nth(array, 1);
+ * // => 'b'
+ *
+ * _.nth(array, -2);
+ * // => 'c';
+ */
+ function nth(array, n) {
+ return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
+ }
+
+ /**
+ * Removes all given values from `array` using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
+ * to remove elements from an array by predicate.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...*} [values] The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
+ *
+ * _.pull(array, 'a', 'c');
+ * console.log(array);
+ * // => ['b', 'b']
+ */
+ var pull = baseRest(pullAll);
+
+ /**
+ * This method is like `_.pull` except that it accepts an array of values to remove.
+ *
+ * **Note:** Unlike `_.difference`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
+ *
+ * _.pullAll(array, ['a', 'c']);
+ * console.log(array);
+ * // => ['b', 'b']
+ */
+ function pullAll(array, values) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values)
+ : array;
+ }
+
+ /**
+ * This method is like `_.pullAll` except that it accepts `iteratee` which is
+ * invoked for each element of `array` and `values` to generate the criterion
+ * by which they're compared. The iteratee is invoked with one argument: (value).
+ *
+ * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
+ *
+ * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
+ * console.log(array);
+ * // => [{ 'x': 2 }]
+ */
+ function pullAllBy(array, values, iteratee) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values, getIteratee(iteratee, 2))
+ : array;
+ }
+
+ /**
+ * This method is like `_.pullAll` except that it accepts `comparator` which
+ * is invoked to compare elements of `array` to `values`. The comparator is
+ * invoked with two arguments: (arrVal, othVal).
+ *
+ * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
+ *
+ * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
+ * console.log(array);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
+ */
+ function pullAllWith(array, values, comparator) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values, undefined, comparator)
+ : array;
+ }
+
+ /**
+ * Removes elements from `array` corresponding to `indexes` and returns an
+ * array of removed elements.
+ *
+ * **Note:** Unlike `_.at`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...(number|number[])} [indexes] The indexes of elements to remove.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'd'];
+ * var pulled = _.pullAt(array, [1, 3]);
+ *
+ * console.log(array);
+ * // => ['a', 'c']
+ *
+ * console.log(pulled);
+ * // => ['b', 'd']
+ */
+ var pullAt = flatRest(function(array, indexes) {
+ var length = array == null ? 0 : array.length,
+ result = baseAt(array, indexes);
+
+ basePullAt(array, arrayMap(indexes, function(index) {
+ return isIndex(index, length) ? +index : index;
+ }).sort(compareAscending));
+
+ return result;
+ });
+
+ /**
+ * Removes all elements from `array` that `predicate` returns truthy for
+ * and returns an array of the removed elements. The predicate is invoked
+ * with three arguments: (value, index, array).
+ *
+ * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
+ * to pull elements from an array by value.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = [1, 2, 3, 4];
+ * var evens = _.remove(array, function(n) {
+ * return n % 2 == 0;
+ * });
+ *
+ * console.log(array);
+ * // => [1, 3]
+ *
+ * console.log(evens);
+ * // => [2, 4]
+ */
+ function remove(array, predicate) {
+ var result = [];
+ if (!(array && array.length)) {
+ return result;
+ }
+ var index = -1,
+ indexes = [],
+ length = array.length;
+
+ predicate = getIteratee(predicate, 3);
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result.push(value);
+ indexes.push(index);
+ }
+ }
+ basePullAt(array, indexes);
+ return result;
+ }
+
+ /**
+ * Reverses `array` so that the first element becomes the last, the second
+ * element becomes the second to last, and so on.
+ *
+ * **Note:** This method mutates `array` and is based on
+ * [`Array#reverse`](https://mdn.io/Array/reverse).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _.reverse(array);
+ * // => [3, 2, 1]
+ *
+ * console.log(array);
+ * // => [3, 2, 1]
+ */
+ function reverse(array) {
+ return array == null ? array : nativeReverse.call(array);
+ }
+
+ /**
+ * Creates a slice of `array` from `start` up to, but not including, `end`.
+ *
+ * **Note:** This method is used instead of
+ * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
+ * returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function slice(array, start, end) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
+ start = 0;
+ end = length;
+ }
+ else {
+ start = start == null ? 0 : toInteger(start);
+ end = end === undefined ? length : toInteger(end);
+ }
+ return baseSlice(array, start, end);
+ }
+
+ /**
+ * Uses a binary search to determine the lowest index at which `value`
+ * should be inserted into `array` in order to maintain its sort order.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedIndex([30, 50], 40);
+ * // => 1
+ */
+ function sortedIndex(array, value) {
+ return baseSortedIndex(array, value);
+ }
+
+ /**
+ * This method is like `_.sortedIndex` except that it accepts `iteratee`
+ * which is invoked for `value` and each element of `array` to compute their
+ * sort ranking. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * var objects = [{ 'x': 4 }, { 'x': 5 }];
+ *
+ * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
+ * // => 0
+ */
+ function sortedIndexBy(array, value, iteratee) {
+ return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
+ }
+
+ /**
+ * This method is like `_.indexOf` except that it performs a binary
+ * search on a sorted `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
+ * // => 1
+ */
+ function sortedIndexOf(array, value) {
+ var length = array == null ? 0 : array.length;
+ if (length) {
+ var index = baseSortedIndex(array, value);
+ if (index < length && eq(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * This method is like `_.sortedIndex` except that it returns the highest
+ * index at which `value` should be inserted into `array` in order to
+ * maintain its sort order.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
+ * // => 4
+ */
+ function sortedLastIndex(array, value) {
+ return baseSortedIndex(array, value, true);
+ }
+
+ /**
+ * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
+ * which is invoked for `value` and each element of `array` to compute their
+ * sort ranking. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * var objects = [{ 'x': 4 }, { 'x': 5 }];
+ *
+ * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
+ * // => 1
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
+ * // => 1
+ */
+ function sortedLastIndexBy(array, value, iteratee) {
+ return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
+ }
+
+ /**
+ * This method is like `_.lastIndexOf` except that it performs a binary
+ * search on a sorted `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
+ * // => 3
+ */
+ function sortedLastIndexOf(array, value) {
+ var length = array == null ? 0 : array.length;
+ if (length) {
+ var index = baseSortedIndex(array, value, true) - 1;
+ if (eq(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * This method is like `_.uniq` except that it's designed and optimized
+ * for sorted arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.sortedUniq([1, 1, 2]);
+ * // => [1, 2]
+ */
+ function sortedUniq(array) {
+ return (array && array.length)
+ ? baseSortedUniq(array)
+ : [];
+ }
+
+ /**
+ * This method is like `_.uniqBy` except that it's designed and optimized
+ * for sorted arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
+ * // => [1.1, 2.3]
+ */
+ function sortedUniqBy(array, iteratee) {
+ return (array && array.length)
+ ? baseSortedUniq(array, getIteratee(iteratee, 2))
+ : [];
+ }
+
+ /**
+ * Gets all but the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.tail([1, 2, 3]);
+ * // => [2, 3]
+ */
+ function tail(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseSlice(array, 1, length) : [];
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements taken from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.take([1, 2, 3]);
+ * // => [1]
+ *
+ * _.take([1, 2, 3], 2);
+ * // => [1, 2]
+ *
+ * _.take([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.take([1, 2, 3], 0);
+ * // => []
+ */
+ function take(array, n, guard) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements taken from the end.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.takeRight([1, 2, 3]);
+ * // => [3]
+ *
+ * _.takeRight([1, 2, 3], 2);
+ * // => [2, 3]
+ *
+ * _.takeRight([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.takeRight([1, 2, 3], 0);
+ * // => []
+ */
+ function takeRight(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ n = length - n;
+ return baseSlice(array, n < 0 ? 0 : n, length);
+ }
+
+ /**
+ * Creates a slice of `array` with elements taken from the end. Elements are
+ * taken until `predicate` returns falsey. The predicate is invoked with
+ * three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.takeRightWhile(users, function(o) { return !o.active; });
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
+ * // => objects for ['pebbles']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.takeRightWhile(users, ['active', false]);
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.takeRightWhile(users, 'active');
+ * // => []
+ */
+ function takeRightWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3), false, true)
+ : [];
+ }
+
+ /**
+ * Creates a slice of `array` with elements taken from the beginning. Elements
+ * are taken until `predicate` returns falsey. The predicate is invoked with
+ * three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false},
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.takeWhile(users, function(o) { return !o.active; });
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.takeWhile(users, { 'user': 'barney', 'active': false });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.takeWhile(users, ['active', false]);
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.takeWhile(users, 'active');
+ * // => []
+ */
+ function takeWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3))
+ : [];
+ }
+
+ /**
+ * Creates an array of unique values, in order, from all given arrays using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.union([2], [1, 2]);
+ * // => [2, 1]
+ */
+ var union = baseRest(function(arrays) {
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
+ });
+
+ /**
+ * This method is like `_.union` except that it accepts `iteratee` which is
+ * invoked for each element of each `arrays` to generate the criterion by
+ * which uniqueness is computed. Result values are chosen from the first
+ * array in which the value occurs. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.unionBy([2.1], [1.2, 2.3], Math.floor);
+ * // => [2.1, 1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+ var unionBy = baseRest(function(arrays) {
+ var iteratee = last(arrays);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
+ });
+
+ /**
+ * This method is like `_.union` except that it accepts `comparator` which
+ * is invoked to compare elements of `arrays`. Result values are chosen from
+ * the first array in which the value occurs. The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.unionWith(objects, others, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+ */
+ var unionWith = baseRest(function(arrays) {
+ var comparator = last(arrays);
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
+ });
+
+ /**
+ * Creates a duplicate-free version of an array, using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons, in which only the first occurrence of each element
+ * is kept. The order of result values is determined by the order they occur
+ * in the array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniq([2, 1, 2]);
+ * // => [2, 1]
+ */
+ function uniq(array) {
+ return (array && array.length) ? baseUniq(array) : [];
+ }
+
+ /**
+ * This method is like `_.uniq` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * uniqueness is computed. The order of result values is determined by the
+ * order they occur in the array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
+ * // => [2.1, 1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+ function uniqBy(array, iteratee) {
+ return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
+ }
+
+ /**
+ * This method is like `_.uniq` except that it accepts `comparator` which
+ * is invoked to compare elements of `array`. The order of result values is
+ * determined by the order they occur in the array.The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.uniqWith(objects, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
+ */
+ function uniqWith(array, comparator) {
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
+ }
+
+ /**
+ * This method is like `_.zip` except that it accepts an array of grouped
+ * elements and creates an array regrouping the elements to their pre-zip
+ * configuration.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.2.0
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
+ * // => [['a', 1, true], ['b', 2, false]]
+ *
+ * _.unzip(zipped);
+ * // => [['a', 'b'], [1, 2], [true, false]]
+ */
+ function unzip(array) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var length = 0;
+ array = arrayFilter(array, function(group) {
+ if (isArrayLikeObject(group)) {
+ length = nativeMax(group.length, length);
+ return true;
+ }
+ });
+ return baseTimes(length, function(index) {
+ return arrayMap(array, baseProperty(index));
+ });
+ }
+
+ /**
+ * This method is like `_.unzip` except that it accepts `iteratee` to specify
+ * how regrouped values should be combined. The iteratee is invoked with the
+ * elements of each group: (...group).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @param {Function} [iteratee=_.identity] The function to combine
+ * regrouped values.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
+ * // => [[1, 10, 100], [2, 20, 200]]
+ *
+ * _.unzipWith(zipped, _.add);
+ * // => [3, 30, 300]
+ */
+ function unzipWith(array, iteratee) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var result = unzip(array);
+ if (iteratee == null) {
+ return result;
+ }
+ return arrayMap(result, function(group) {
+ return apply(iteratee, undefined, group);
+ });
+ }
+
+ /**
+ * Creates an array excluding all given values using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * **Note:** Unlike `_.pull`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...*} [values] The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.difference, _.xor
+ * @example
+ *
+ * _.without([2, 1, 2, 3], 1, 2);
+ * // => [3]
+ */
+ var without = baseRest(function(array, values) {
+ return isArrayLikeObject(array)
+ ? baseDifference(array, values)
+ : [];
+ });
+
+ /**
+ * Creates an array of unique values that is the
+ * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
+ * of the given arrays. The order of result values is determined by the order
+ * they occur in the arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.difference, _.without
+ * @example
+ *
+ * _.xor([2, 1], [2, 3]);
+ * // => [1, 3]
+ */
+ var xor = baseRest(function(arrays) {
+ return baseXor(arrayFilter(arrays, isArrayLikeObject));
+ });
+
+ /**
+ * This method is like `_.xor` except that it accepts `iteratee` which is
+ * invoked for each element of each `arrays` to generate the criterion by
+ * which by which they're compared. The order of result values is determined
+ * by the order they occur in the arrays. The iteratee is invoked with one
+ * argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [1.2, 3.4]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 2 }]
+ */
+ var xorBy = baseRest(function(arrays) {
+ var iteratee = last(arrays);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
+ });
+
+ /**
+ * This method is like `_.xor` except that it accepts `comparator` which is
+ * invoked to compare elements of `arrays`. The order of result values is
+ * determined by the order they occur in the arrays. The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.xorWith(objects, others, _.isEqual);
+ * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+ */
+ var xorWith = baseRest(function(arrays) {
+ var comparator = last(arrays);
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
+ });
+
+ /**
+ * Creates an array of grouped elements, the first of which contains the
+ * first elements of the given arrays, the second of which contains the
+ * second elements of the given arrays, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zip(['a', 'b'], [1, 2], [true, false]);
+ * // => [['a', 1, true], ['b', 2, false]]
+ */
+ var zip = baseRest(unzip);
+
+ /**
+ * This method is like `_.fromPairs` except that it accepts two arrays,
+ * one of property identifiers and one of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.4.0
+ * @category Array
+ * @param {Array} [props=[]] The property identifiers.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObject(['a', 'b'], [1, 2]);
+ * // => { 'a': 1, 'b': 2 }
+ */
+ function zipObject(props, values) {
+ return baseZipObject(props || [], values || [], assignValue);
+ }
+
+ /**
+ * This method is like `_.zipObject` except that it supports property paths.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.1.0
+ * @category Array
+ * @param {Array} [props=[]] The property identifiers.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
+ * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
+ */
+ function zipObjectDeep(props, values) {
+ return baseZipObject(props || [], values || [], baseSet);
+ }
+
+ /**
+ * This method is like `_.zip` except that it accepts `iteratee` to specify
+ * how grouped values should be combined. The iteratee is invoked with the
+ * elements of each group: (...group).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @param {Function} [iteratee=_.identity] The function to combine
+ * grouped values.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
+ * return a + b + c;
+ * });
+ * // => [111, 222]
+ */
+ var zipWith = baseRest(function(arrays) {
+ var length = arrays.length,
+ iteratee = length > 1 ? arrays[length - 1] : undefined;
+
+ iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
+ return unzipWith(arrays, iteratee);
+ });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` wrapper instance that wraps `value` with explicit method
+ * chain sequences enabled. The result of such sequences must be unwrapped
+ * with `_#value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Seq
+ * @param {*} value The value to wrap.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'pebbles', 'age': 1 }
+ * ];
+ *
+ * var youngest = _
+ * .chain(users)
+ * .sortBy('age')
+ * .map(function(o) {
+ * return o.user + ' is ' + o.age;
+ * })
+ * .head()
+ * .value();
+ * // => 'pebbles is 1'
+ */
+ function chain(value) {
+ var result = lodash(value);
+ result.__chain__ = true;
+ return result;
+ }
+
+ /**
+ * This method invokes `interceptor` and returns `value`. The interceptor
+ * is invoked with one argument; (value). The purpose of this method is to
+ * "tap into" a method chain sequence in order to modify intermediate results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * _([1, 2, 3])
+ * .tap(function(array) {
+ * // Mutate input array.
+ * array.pop();
+ * })
+ * .reverse()
+ * .value();
+ * // => [2, 1]
+ */
+ function tap(value, interceptor) {
+ interceptor(value);
+ return value;
+ }
+
+ /**
+ * This method is like `_.tap` except that it returns the result of `interceptor`.
+ * The purpose of this method is to "pass thru" values replacing intermediate
+ * results in a method chain sequence.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns the result of `interceptor`.
+ * @example
+ *
+ * _(' abc ')
+ * .chain()
+ * .trim()
+ * .thru(function(value) {
+ * return [value];
+ * })
+ * .value();
+ * // => ['abc']
+ */
+ function thru(value, interceptor) {
+ return interceptor(value);
+ }
+
+ /**
+ * This method is the wrapper version of `_.at`.
+ *
+ * @name at
+ * @memberOf _
+ * @since 1.0.0
+ * @category Seq
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+ *
+ * _(object).at(['a[0].b.c', 'a[1]']).value();
+ * // => [3, 4]
+ */
+ var wrapperAt = flatRest(function(paths) {
+ var length = paths.length,
+ start = length ? paths[0] : 0,
+ value = this.__wrapped__,
+ interceptor = function(object) { return baseAt(object, paths); };
+
+ if (length > 1 || this.__actions__.length ||
+ !(value instanceof LazyWrapper) || !isIndex(start)) {
+ return this.thru(interceptor);
+ }
+ value = value.slice(start, +start + (length ? 1 : 0));
+ value.__actions__.push({
+ 'func': thru,
+ 'args': [interceptor],
+ 'thisArg': undefined
+ });
+ return new LodashWrapper(value, this.__chain__).thru(function(array) {
+ if (length && !array.length) {
+ array.push(undefined);
+ }
+ return array;
+ });
+ });
+
+ /**
+ * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
+ *
+ * @name chain
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * // A sequence without explicit chaining.
+ * _(users).head();
+ * // => { 'user': 'barney', 'age': 36 }
+ *
+ * // A sequence with explicit chaining.
+ * _(users)
+ * .chain()
+ * .head()
+ * .pick('user')
+ * .value();
+ * // => { 'user': 'barney' }
+ */
+ function wrapperChain() {
+ return chain(this);
+ }
+
+ /**
+ * Executes the chain sequence and returns the wrapped result.
+ *
+ * @name commit
+ * @memberOf _
+ * @since 3.2.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2];
+ * var wrapped = _(array).push(3);
+ *
+ * console.log(array);
+ * // => [1, 2]
+ *
+ * wrapped = wrapped.commit();
+ * console.log(array);
+ * // => [1, 2, 3]
+ *
+ * wrapped.last();
+ * // => 3
+ *
+ * console.log(array);
+ * // => [1, 2, 3]
+ */
+ function wrapperCommit() {
+ return new LodashWrapper(this.value(), this.__chain__);
+ }
+
+ /**
+ * Gets the next value on a wrapped object following the
+ * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
+ *
+ * @name next
+ * @memberOf _
+ * @since 4.0.0
+ * @category Seq
+ * @returns {Object} Returns the next iterator value.
+ * @example
+ *
+ * var wrapped = _([1, 2]);
+ *
+ * wrapped.next();
+ * // => { 'done': false, 'value': 1 }
+ *
+ * wrapped.next();
+ * // => { 'done': false, 'value': 2 }
+ *
+ * wrapped.next();
+ * // => { 'done': true, 'value': undefined }
+ */
+ function wrapperNext() {
+ if (this.__values__ === undefined) {
+ this.__values__ = toArray(this.value());
+ }
+ var done = this.__index__ >= this.__values__.length,
+ value = done ? undefined : this.__values__[this.__index__++];
+
+ return { 'done': done, 'value': value };
+ }
+
+ /**
+ * Enables the wrapper to be iterable.
+ *
+ * @name Symbol.iterator
+ * @memberOf _
+ * @since 4.0.0
+ * @category Seq
+ * @returns {Object} Returns the wrapper object.
+ * @example
+ *
+ * var wrapped = _([1, 2]);
+ *
+ * wrapped[Symbol.iterator]() === wrapped;
+ * // => true
+ *
+ * Array.from(wrapped);
+ * // => [1, 2]
+ */
+ function wrapperToIterator() {
+ return this;
+ }
+
+ /**
+ * Creates a clone of the chain sequence planting `value` as the wrapped value.
+ *
+ * @name plant
+ * @memberOf _
+ * @since 3.2.0
+ * @category Seq
+ * @param {*} value The value to plant.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2]).map(square);
+ * var other = wrapped.plant([3, 4]);
+ *
+ * other.value();
+ * // => [9, 16]
+ *
+ * wrapped.value();
+ * // => [1, 4]
+ */
+ function wrapperPlant(value) {
+ var result,
+ parent = this;
+
+ while (parent instanceof baseLodash) {
+ var clone = wrapperClone(parent);
+ clone.__index__ = 0;
+ clone.__values__ = undefined;
+ if (result) {
+ previous.__wrapped__ = clone;
+ } else {
+ result = clone;
+ }
+ var previous = clone;
+ parent = parent.__wrapped__;
+ }
+ previous.__wrapped__ = value;
+ return result;
+ }
+
+ /**
+ * This method is the wrapper version of `_.reverse`.
+ *
+ * **Note:** This method mutates the wrapped array.
+ *
+ * @name reverse
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _(array).reverse().value()
+ * // => [3, 2, 1]
+ *
+ * console.log(array);
+ * // => [3, 2, 1]
+ */
+ function wrapperReverse() {
+ var value = this.__wrapped__;
+ if (value instanceof LazyWrapper) {
+ var wrapped = value;
+ if (this.__actions__.length) {
+ wrapped = new LazyWrapper(this);
+ }
+ wrapped = wrapped.reverse();
+ wrapped.__actions__.push({
+ 'func': thru,
+ 'args': [reverse],
+ 'thisArg': undefined
+ });
+ return new LodashWrapper(wrapped, this.__chain__);
+ }
+ return this.thru(reverse);
+ }
+
+ /**
+ * Executes the chain sequence to resolve the unwrapped value.
+ *
+ * @name value
+ * @memberOf _
+ * @since 0.1.0
+ * @alias toJSON, valueOf
+ * @category Seq
+ * @returns {*} Returns the resolved unwrapped value.
+ * @example
+ *
+ * _([1, 2, 3]).value();
+ * // => [1, 2, 3]
+ */
+ function wrapperValue() {
+ return baseWrapperValue(this.__wrapped__, this.__actions__);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The corresponding value of
+ * each key is the number of times the key was returned by `iteratee`. The
+ * iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.countBy([6.1, 4.2, 6.3], Math.floor);
+ * // => { '4': 1, '6': 2 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.countBy(['one', 'two', 'three'], 'length');
+ * // => { '3': 2, '5': 1 }
+ */
+ var countBy = createAggregator(function(result, value, key) {
+ if (hasOwnProperty.call(result, key)) {
+ ++result[key];
+ } else {
+ baseAssignValue(result, key, 1);
+ }
+ });
+
+ /**
+ * Checks if `predicate` returns truthy for **all** elements of `collection`.
+ * Iteration is stopped once `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * **Note:** This method returns `true` for
+ * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
+ * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
+ * elements of empty collections.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.every([true, 1, null, 'yes'], Boolean);
+ * // => false
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.every(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.every(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.every(users, 'active');
+ * // => false
+ */
+ function every(collection, predicate, guard) {
+ var func = isArray(collection) ? arrayEvery : baseEvery;
+ if (guard && isIterateeCall(collection, predicate, guard)) {
+ predicate = undefined;
+ }
+ return func(collection, getIteratee(predicate, 3));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning an array of all elements
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * **Note:** Unlike `_.remove`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.reject
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.filter(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, { 'age': 36, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.filter(users, 'active');
+ * // => objects for ['barney']
+ */
+ function filter(collection, predicate) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ return func(collection, getIteratee(predicate, 3));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning the first element
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false },
+ * { 'user': 'pebbles', 'age': 1, 'active': true }
+ * ];
+ *
+ * _.find(users, function(o) { return o.age < 40; });
+ * // => object for 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.find(users, { 'age': 1, 'active': true });
+ * // => object for 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.find(users, ['active', false]);
+ * // => object for 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.find(users, 'active');
+ * // => object for 'barney'
+ */
+ var find = createFind(findIndex);
+
+ /**
+ * This method is like `_.find` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=collection.length-1] The index to search from.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * _.findLast([1, 2, 3, 4], function(n) {
+ * return n % 2 == 1;
+ * });
+ * // => 3
+ */
+ var findLast = createFind(findLastIndex);
+
+ /**
+ * Creates a flattened array of values by running each element in `collection`
+ * thru `iteratee` and flattening the mapped results. The iteratee is invoked
+ * with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [n, n];
+ * }
+ *
+ * _.flatMap([1, 2], duplicate);
+ * // => [1, 1, 2, 2]
+ */
+ function flatMap(collection, iteratee) {
+ return baseFlatten(map(collection, iteratee), 1);
+ }
+
+ /**
+ * This method is like `_.flatMap` except that it recursively flattens the
+ * mapped results.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [[[n, n]]];
+ * }
+ *
+ * _.flatMapDeep([1, 2], duplicate);
+ * // => [1, 1, 2, 2]
+ */
+ function flatMapDeep(collection, iteratee) {
+ return baseFlatten(map(collection, iteratee), INFINITY);
+ }
+
+ /**
+ * This method is like `_.flatMap` except that it recursively flattens the
+ * mapped results up to `depth` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {number} [depth=1] The maximum recursion depth.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [[[n, n]]];
+ * }
+ *
+ * _.flatMapDepth([1, 2], duplicate, 2);
+ * // => [[1, 1], [2, 2]]
+ */
+ function flatMapDepth(collection, iteratee, depth) {
+ depth = depth === undefined ? 1 : toInteger(depth);
+ return baseFlatten(map(collection, iteratee), depth);
+ }
+
+ /**
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length"
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
+ * or `_.forOwn` for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias each
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEachRight
+ * @example
+ *
+ * _.forEach([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `1` then `2`.
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+ function forEach(collection, iteratee) {
+ var func = isArray(collection) ? arrayEach : baseEach;
+ return func(collection, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * This method is like `_.forEach` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @alias eachRight
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEach
+ * @example
+ *
+ * _.forEachRight([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `2` then `1`.
+ */
+ function forEachRight(collection, iteratee) {
+ var func = isArray(collection) ? arrayEachRight : baseEachRight;
+ return func(collection, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The order of grouped values
+ * is determined by the order they occur in `collection`. The corresponding
+ * value of each key is an array of elements responsible for generating the
+ * key. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.groupBy([6.1, 4.2, 6.3], Math.floor);
+ * // => { '4': [4.2], '6': [6.1, 6.3] }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.groupBy(['one', 'two', 'three'], 'length');
+ * // => { '3': ['one', 'two'], '5': ['three'] }
+ */
+ var groupBy = createAggregator(function(result, value, key) {
+ if (hasOwnProperty.call(result, key)) {
+ result[key].push(value);
+ } else {
+ baseAssignValue(result, key, [value]);
+ }
+ });
+
+ /**
+ * Checks if `value` is in `collection`. If `collection` is a string, it's
+ * checked for a substring of `value`, otherwise
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * is used for equality comparisons. If `fromIndex` is negative, it's used as
+ * the offset from the end of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {boolean} Returns `true` if `value` is found, else `false`.
+ * @example
+ *
+ * _.includes([1, 2, 3], 1);
+ * // => true
+ *
+ * _.includes([1, 2, 3], 1, 2);
+ * // => false
+ *
+ * _.includes({ 'a': 1, 'b': 2 }, 1);
+ * // => true
+ *
+ * _.includes('abcd', 'bc');
+ * // => true
+ */
+ function includes(collection, value, fromIndex, guard) {
+ collection = isArrayLike(collection) ? collection : values(collection);
+ fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
+
+ var length = collection.length;
+ if (fromIndex < 0) {
+ fromIndex = nativeMax(length + fromIndex, 0);
+ }
+ return isString(collection)
+ ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
+ : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
+ }
+
+ /**
+ * Invokes the method at `path` of each element in `collection`, returning
+ * an array of the results of each invoked method. Any additional arguments
+ * are provided to each invoked method. If `path` is a function, it's invoked
+ * for, and `this` bound to, each element in `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|string} path The path of the method to invoke or
+ * the function invoked per iteration.
+ * @param {...*} [args] The arguments to invoke each method with.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
+ * // => [[1, 5, 7], [1, 2, 3]]
+ *
+ * _.invokeMap([123, 456], String.prototype.split, '');
+ * // => [['1', '2', '3'], ['4', '5', '6']]
+ */
+ var invokeMap = baseRest(function(collection, path, args) {
+ var index = -1,
+ isFunc = typeof path == 'function',
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value) {
+ result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
+ });
+ return result;
+ });
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The corresponding value of
+ * each key is the last element responsible for generating the key. The
+ * iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * var array = [
+ * { 'dir': 'left', 'code': 97 },
+ * { 'dir': 'right', 'code': 100 }
+ * ];
+ *
+ * _.keyBy(array, function(o) {
+ * return String.fromCharCode(o.code);
+ * });
+ * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
+ *
+ * _.keyBy(array, 'dir');
+ * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
+ */
+ var keyBy = createAggregator(function(result, value, key) {
+ baseAssignValue(result, key, value);
+ });
+
+ /**
+ * Creates an array of values by running each element in `collection` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+ *
+ * The guarded methods are:
+ * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
+ * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
+ * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
+ * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * _.map([4, 8], square);
+ * // => [16, 64]
+ *
+ * _.map({ 'a': 4, 'b': 8 }, square);
+ * // => [16, 64] (iteration order is not guaranteed)
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, 'user');
+ * // => ['barney', 'fred']
+ */
+ function map(collection, iteratee) {
+ var func = isArray(collection) ? arrayMap : baseMap;
+ return func(collection, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * This method is like `_.sortBy` except that it allows specifying the sort
+ * orders of the iteratees to sort by. If `orders` is unspecified, all values
+ * are sorted in ascending order. Otherwise, specify an order of "desc" for
+ * descending or "asc" for ascending sort order of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @param {string[]} [orders] The sort orders of `iteratees`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 34 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'barney', 'age': 36 }
+ * ];
+ *
+ * // Sort by `user` in ascending order and by `age` in descending order.
+ * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+ */
+ function orderBy(collection, iteratees, orders, guard) {
+ if (collection == null) {
+ return [];
+ }
+ if (!isArray(iteratees)) {
+ iteratees = iteratees == null ? [] : [iteratees];
+ }
+ orders = guard ? undefined : orders;
+ if (!isArray(orders)) {
+ orders = orders == null ? [] : [orders];
+ }
+ return baseOrderBy(collection, iteratees, orders);
+ }
+
+ /**
+ * Creates an array of elements split into two groups, the first of which
+ * contains elements `predicate` returns truthy for, the second of which
+ * contains elements `predicate` returns falsey for. The predicate is
+ * invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the array of grouped elements.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true },
+ * { 'user': 'pebbles', 'age': 1, 'active': false }
+ * ];
+ *
+ * _.partition(users, function(o) { return o.active; });
+ * // => objects for [['fred'], ['barney', 'pebbles']]
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.partition(users, { 'age': 1, 'active': false });
+ * // => objects for [['pebbles'], ['barney', 'fred']]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.partition(users, ['active', false]);
+ * // => objects for [['barney', 'pebbles'], ['fred']]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.partition(users, 'active');
+ * // => objects for [['fred'], ['barney', 'pebbles']]
+ */
+ var partition = createAggregator(function(result, value, key) {
+ result[key ? 0 : 1].push(value);
+ }, function() { return [[], []]; });
+
+ /**
+ * Reduces `collection` to a value which is the accumulated result of running
+ * each element in `collection` thru `iteratee`, where each successive
+ * invocation is supplied the return value of the previous. If `accumulator`
+ * is not given, the first element of `collection` is used as the initial
+ * value. The iteratee is invoked with four arguments:
+ * (accumulator, value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.reduce`, `_.reduceRight`, and `_.transform`.
+ *
+ * The guarded methods are:
+ * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
+ * and `sortBy`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduceRight
+ * @example
+ *
+ * _.reduce([1, 2], function(sum, n) {
+ * return sum + n;
+ * }, 0);
+ * // => 3
+ *
+ * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * return result;
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
+ */
+ function reduce(collection, iteratee, accumulator) {
+ var func = isArray(collection) ? arrayReduce : baseReduce,
+ initAccum = arguments.length < 3;
+
+ return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
+ }
+
+ /**
+ * This method is like `_.reduce` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduce
+ * @example
+ *
+ * var array = [[0, 1], [2, 3], [4, 5]];
+ *
+ * _.reduceRight(array, function(flattened, other) {
+ * return flattened.concat(other);
+ * }, []);
+ * // => [4, 5, 2, 3, 0, 1]
+ */
+ function reduceRight(collection, iteratee, accumulator) {
+ var func = isArray(collection) ? arrayReduceRight : baseReduce,
+ initAccum = arguments.length < 3;
+
+ return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
+ }
+
+ /**
+ * The opposite of `_.filter`; this method returns the elements of `collection`
+ * that `predicate` does **not** return truthy for.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.filter
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true }
+ * ];
+ *
+ * _.reject(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.reject(users, { 'age': 40, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.reject(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.reject(users, 'active');
+ * // => objects for ['barney']
+ */
+ function reject(collection, predicate) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ return func(collection, negate(getIteratee(predicate, 3)));
+ }
+
+ /**
+ * Gets a random element from `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to sample.
+ * @returns {*} Returns the random element.
+ * @example
+ *
+ * _.sample([1, 2, 3, 4]);
+ * // => 2
+ */
+ function sample(collection) {
+ var func = isArray(collection) ? arraySample : baseSample;
+ return func(collection);
+ }
+
+ /**
+ * Gets `n` random elements at unique keys from `collection` up to the
+ * size of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to sample.
+ * @param {number} [n=1] The number of elements to sample.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the random elements.
+ * @example
+ *
+ * _.sampleSize([1, 2, 3], 2);
+ * // => [3, 1]
+ *
+ * _.sampleSize([1, 2, 3], 4);
+ * // => [2, 3, 1]
+ */
+ function sampleSize(collection, n, guard) {
+ if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
+ n = 1;
+ } else {
+ n = toInteger(n);
+ }
+ var func = isArray(collection) ? arraySampleSize : baseSampleSize;
+ return func(collection, n);
+ }
+
+ /**
+ * Creates an array of shuffled values, using a version of the
+ * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ * @example
+ *
+ * _.shuffle([1, 2, 3, 4]);
+ * // => [4, 1, 3, 2]
+ */
+ function shuffle(collection) {
+ var func = isArray(collection) ? arrayShuffle : baseShuffle;
+ return func(collection);
+ }
+
+ /**
+ * Gets the size of `collection` by returning its length for array-like
+ * values or the number of own enumerable string keyed properties for objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @returns {number} Returns the collection size.
+ * @example
+ *
+ * _.size([1, 2, 3]);
+ * // => 3
+ *
+ * _.size({ 'a': 1, 'b': 2 });
+ * // => 2
+ *
+ * _.size('pebbles');
+ * // => 7
+ */
+ function size(collection) {
+ if (collection == null) {
+ return 0;
+ }
+ if (isArrayLike(collection)) {
+ return isString(collection) ? stringSize(collection) : collection.length;
+ }
+ var tag = getTag(collection);
+ if (tag == mapTag || tag == setTag) {
+ return collection.size;
+ }
+ return baseKeys(collection).length;
+ }
+
+ /**
+ * Checks if `predicate` returns truthy for **any** element of `collection`.
+ * Iteration is stopped once `predicate` returns truthy. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.some([null, 0, 'yes', false], Boolean);
+ * // => true
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.some(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.some(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.some(users, 'active');
+ * // => true
+ */
+ function some(collection, predicate, guard) {
+ var func = isArray(collection) ? arraySome : baseSome;
+ if (guard && isIterateeCall(collection, predicate, guard)) {
+ predicate = undefined;
+ }
+ return func(collection, getIteratee(predicate, 3));
+ }
+
+ /**
+ * Creates an array of elements, sorted in ascending order by the results of
+ * running each element in a collection thru each iteratee. This method
+ * performs a stable sort, that is, it preserves the original sort order of
+ * equal elements. The iteratees are invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'barney', 'age': 34 }
+ * ];
+ *
+ * _.sortBy(users, [function(o) { return o.user; }]);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+ *
+ * _.sortBy(users, ['user', 'age']);
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
+ */
+ var sortBy = baseRest(function(collection, iteratees) {
+ if (collection == null) {
+ return [];
+ }
+ var length = iteratees.length;
+ if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
+ iteratees = [];
+ } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
+ iteratees = [iteratees[0]];
+ }
+ return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
+ });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Gets the timestamp of the number of milliseconds that have elapsed since
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Date
+ * @returns {number} Returns the timestamp.
+ * @example
+ *
+ * _.defer(function(stamp) {
+ * console.log(_.now() - stamp);
+ * }, _.now());
+ * // => Logs the number of milliseconds it took for the deferred invocation.
+ */
+ var now = ctxNow || function() {
+ return root.Date.now();
+ };
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * The opposite of `_.before`; this method creates a function that invokes
+ * `func` once it's called `n` or more times.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {number} n The number of calls before `func` is invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var saves = ['profile', 'settings'];
+ *
+ * var done = _.after(saves.length, function() {
+ * console.log('done saving!');
+ * });
+ *
+ * _.forEach(saves, function(type) {
+ * asyncSave({ 'type': type, 'complete': done });
+ * });
+ * // => Logs 'done saving!' after the two async saves have completed.
+ */
+ function after(n, func) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func`, with up to `n` arguments,
+ * ignoring any additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @param {number} [n=func.length] The arity cap.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new capped function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.ary(parseInt, 1));
+ * // => [6, 8, 10]
+ */
+ function ary(func, n, guard) {
+ n = guard ? undefined : n;
+ n = (func && n == null) ? func.length : n;
+ return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
+ }
+
+ /**
+ * Creates a function that invokes `func`, with the `this` binding and arguments
+ * of the created function, while it's called less than `n` times. Subsequent
+ * calls to the created function return the result of the last `func` invocation.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {number} n The number of calls at which `func` is no longer invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * jQuery(element).on('click', _.before(5, addContactToList));
+ * // => Allows adding up to 4 contacts to the list.
+ */
+ function before(n, func) {
+ var result;
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n > 0) {
+ result = func.apply(this, arguments);
+ }
+ if (n <= 1) {
+ func = undefined;
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of `thisArg`
+ * and `partials` prepended to the arguments it receives.
+ *
+ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
+ * property of bound functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to bind.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * function greet(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * var bound = _.bind(greet, object, 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bind(greet, object, _, '!');
+ * bound('hi');
+ * // => 'hi fred!'
+ */
+ var bind = baseRest(function(func, thisArg, partials) {
+ var bitmask = WRAP_BIND_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, getHolder(bind));
+ bitmask |= WRAP_PARTIAL_FLAG;
+ }
+ return createWrap(func, bitmask, thisArg, partials, holders);
+ });
+
+ /**
+ * Creates a function that invokes the method at `object[key]` with `partials`
+ * prepended to the arguments it receives.
+ *
+ * This method differs from `_.bind` by allowing bound functions to reference
+ * methods that may be redefined or don't yet exist. See
+ * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
+ * for more details.
+ *
+ * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Function
+ * @param {Object} object The object to invoke the method on.
+ * @param {string} key The key of the method.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * var object = {
+ * 'user': 'fred',
+ * 'greet': function(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ * };
+ *
+ * var bound = _.bindKey(object, 'greet', 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * object.greet = function(greeting, punctuation) {
+ * return greeting + 'ya ' + this.user + punctuation;
+ * };
+ *
+ * bound('!');
+ * // => 'hiya fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bindKey(object, 'greet', _, '!');
+ * bound('hi');
+ * // => 'hiya fred!'
+ */
+ var bindKey = baseRest(function(object, key, partials) {
+ var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, getHolder(bindKey));
+ bitmask |= WRAP_PARTIAL_FLAG;
+ }
+ return createWrap(key, bitmask, object, partials, holders);
+ });
+
+ /**
+ * Creates a function that accepts arguments of `func` and either invokes
+ * `func` returning its result, if at least `arity` number of arguments have
+ * been provided, or returns a function that accepts the remaining `func`
+ * arguments, and so on. The arity of `func` may be specified if `func.length`
+ * is not sufficient.
+ *
+ * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curry(abc);
+ *
+ * curried(1)(2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // Curried with placeholders.
+ * curried(1)(_, 3)(2);
+ * // => [1, 2, 3]
+ */
+ function curry(func, arity, guard) {
+ arity = guard ? undefined : arity;
+ var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curry.placeholder;
+ return result;
+ }
+
+ /**
+ * This method is like `_.curry` except that arguments are applied to `func`
+ * in the manner of `_.partialRight` instead of `_.partial`.
+ *
+ * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curryRight(abc);
+ *
+ * curried(3)(2)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(2, 3)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // Curried with placeholders.
+ * curried(3)(1, _)(2);
+ * // => [1, 2, 3]
+ */
+ function curryRight(func, arity, guard) {
+ arity = guard ? undefined : arity;
+ var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curryRight.placeholder;
+ return result;
+ }
+
+ /**
+ * Creates a debounced function that delays invoking `func` until after `wait`
+ * milliseconds have elapsed since the last time the debounced function was
+ * invoked. The debounced function comes with a `cancel` method to cancel
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
+ * Provide `options` to indicate whether `func` should be invoked on the
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
+ * with the last arguments provided to the debounced function. Subsequent
+ * calls to the debounced function return the result of the last `func`
+ * invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
+ * invoked on the trailing edge of the timeout only if the debounced function
+ * is invoked more than once during the `wait` timeout.
+ *
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
+ *
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+ * for details over the differences between `_.debounce` and `_.throttle`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to debounce.
+ * @param {number} [wait=0] The number of milliseconds to delay.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=false]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {number} [options.maxWait]
+ * The maximum time `func` is allowed to be delayed before it's invoked.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
+ * @returns {Function} Returns the new debounced function.
+ * @example
+ *
+ * // Avoid costly calculations while the window size is in flux.
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
+ *
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
+ * 'leading': true,
+ * 'trailing': false
+ * }));
+ *
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
+ * var source = new EventSource('/stream');
+ * jQuery(source).on('message', debounced);
+ *
+ * // Cancel the trailing debounced invocation.
+ * jQuery(window).on('popstate', debounced.cancel);
+ */
+ function debounce(func, wait, options) {
+ var lastArgs,
+ lastThis,
+ maxWait,
+ result,
+ timerId,
+ lastCallTime,
+ lastInvokeTime = 0,
+ leading = false,
+ maxing = false,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ wait = toNumber(wait) || 0;
+ if (isObject(options)) {
+ leading = !!options.leading;
+ maxing = 'maxWait' in options;
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+
+ function invokeFunc(time) {
+ var args = lastArgs,
+ thisArg = lastThis;
+
+ lastArgs = lastThis = undefined;
+ lastInvokeTime = time;
+ result = func.apply(thisArg, args);
+ return result;
+ }
+
+ function leadingEdge(time) {
+ // Reset any `maxWait` timer.
+ lastInvokeTime = time;
+ // Start the timer for the trailing edge.
+ timerId = setTimeout(timerExpired, wait);
+ // Invoke the leading edge.
+ return leading ? invokeFunc(time) : result;
+ }
+
+ function remainingWait(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime,
+ result = wait - timeSinceLastCall;
+
+ return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
+ }
+
+ function shouldInvoke(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime;
+
+ // Either this is the first call, activity has stopped and we're at the
+ // trailing edge, the system time has gone backwards and we're treating
+ // it as the trailing edge, or we've hit the `maxWait` limit.
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
+ }
+
+ function timerExpired() {
+ var time = now();
+ if (shouldInvoke(time)) {
+ return trailingEdge(time);
+ }
+ // Restart the timer.
+ timerId = setTimeout(timerExpired, remainingWait(time));
+ }
+
+ function trailingEdge(time) {
+ timerId = undefined;
+
+ // Only invoke if we have `lastArgs` which means `func` has been
+ // debounced at least once.
+ if (trailing && lastArgs) {
+ return invokeFunc(time);
+ }
+ lastArgs = lastThis = undefined;
+ return result;
+ }
+
+ function cancel() {
+ if (timerId !== undefined) {
+ clearTimeout(timerId);
+ }
+ lastInvokeTime = 0;
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
+ }
+
+ function flush() {
+ return timerId === undefined ? result : trailingEdge(now());
+ }
+
+ function debounced() {
+ var time = now(),
+ isInvoking = shouldInvoke(time);
+
+ lastArgs = arguments;
+ lastThis = this;
+ lastCallTime = time;
+
+ if (isInvoking) {
+ if (timerId === undefined) {
+ return leadingEdge(lastCallTime);
+ }
+ if (maxing) {
+ // Handle invocations in a tight loop.
+ timerId = setTimeout(timerExpired, wait);
+ return invokeFunc(lastCallTime);
+ }
+ }
+ if (timerId === undefined) {
+ timerId = setTimeout(timerExpired, wait);
+ }
+ return result;
+ }
+ debounced.cancel = cancel;
+ debounced.flush = flush;
+ return debounced;
+ }
+
+ /**
+ * Defers invoking the `func` until the current call stack has cleared. Any
+ * additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to defer.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.defer(function(text) {
+ * console.log(text);
+ * }, 'deferred');
+ * // => Logs 'deferred' after one millisecond.
+ */
+ var defer = baseRest(function(func, args) {
+ return baseDelay(func, 1, args);
+ });
+
+ /**
+ * Invokes `func` after `wait` milliseconds. Any additional arguments are
+ * provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.delay(function(text) {
+ * console.log(text);
+ * }, 1000, 'later');
+ * // => Logs 'later' after one second.
+ */
+ var delay = baseRest(function(func, wait, args) {
+ return baseDelay(func, toNumber(wait) || 0, args);
+ });
+
+ /**
+ * Creates a function that invokes `func` with arguments reversed.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to flip arguments for.
+ * @returns {Function} Returns the new flipped function.
+ * @example
+ *
+ * var flipped = _.flip(function() {
+ * return _.toArray(arguments);
+ * });
+ *
+ * flipped('a', 'b', 'c', 'd');
+ * // => ['d', 'c', 'b', 'a']
+ */
+ function flip(func) {
+ return createWrap(func, WRAP_FLIP_FLAG);
+ }
+
+ /**
+ * Creates a function that memoizes the result of `func`. If `resolver` is
+ * provided, it determines the cache key for storing the result based on the
+ * arguments provided to the memoized function. By default, the first argument
+ * provided to the memoized function is used as the map cache key. The `func`
+ * is invoked with the `this` binding of the memoized function.
+ *
+ * **Note:** The cache is exposed as the `cache` property on the memoized
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
+ * constructor with one whose instances implement the
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to have its output memoized.
+ * @param {Function} [resolver] The function to resolve the cache key.
+ * @returns {Function} Returns the new memoized function.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ * var other = { 'c': 3, 'd': 4 };
+ *
+ * var values = _.memoize(_.values);
+ * values(object);
+ * // => [1, 2]
+ *
+ * values(other);
+ * // => [3, 4]
+ *
+ * object.a = 2;
+ * values(object);
+ * // => [1, 2]
+ *
+ * // Modify the result cache.
+ * values.cache.set(object, ['a', 'b']);
+ * values(object);
+ * // => ['a', 'b']
+ *
+ * // Replace `_.memoize.Cache`.
+ * _.memoize.Cache = WeakMap;
+ */
+ function memoize(func, resolver) {
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var memoized = function() {
+ var args = arguments,
+ key = resolver ? resolver.apply(this, args) : args[0],
+ cache = memoized.cache;
+
+ if (cache.has(key)) {
+ return cache.get(key);
+ }
+ var result = func.apply(this, args);
+ memoized.cache = cache.set(key, result) || cache;
+ return result;
+ };
+ memoized.cache = new (memoize.Cache || MapCache);
+ return memoized;
+ }
+
+ // Expose `MapCache`.
+ memoize.Cache = MapCache;
+
+ /**
+ * Creates a function that negates the result of the predicate `func`. The
+ * `func` predicate is invoked with the `this` binding and arguments of the
+ * created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} predicate The predicate to negate.
+ * @returns {Function} Returns the new negated function.
+ * @example
+ *
+ * function isEven(n) {
+ * return n % 2 == 0;
+ * }
+ *
+ * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
+ * // => [1, 3, 5]
+ */
+ function negate(predicate) {
+ if (typeof predicate != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return function() {
+ var args = arguments;
+ switch (args.length) {
+ case 0: return !predicate.call(this);
+ case 1: return !predicate.call(this, args[0]);
+ case 2: return !predicate.call(this, args[0], args[1]);
+ case 3: return !predicate.call(this, args[0], args[1], args[2]);
+ }
+ return !predicate.apply(this, args);
+ };
+ }
+
+ /**
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
+ * to the function return the value of the first invocation. The `func` is
+ * invoked with the `this` binding and arguments of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var initialize = _.once(createApplication);
+ * initialize();
+ * initialize();
+ * // => `createApplication` is invoked once
+ */
+ function once(func) {
+ return before(2, func);
+ }
+
+ /**
+ * Creates a function that invokes `func` with its arguments transformed.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to wrap.
+ * @param {...(Function|Function[])} [transforms=[_.identity]]
+ * The argument transforms.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * function doubled(n) {
+ * return n * 2;
+ * }
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var func = _.overArgs(function(x, y) {
+ * return [x, y];
+ * }, [square, doubled]);
+ *
+ * func(9, 3);
+ * // => [81, 6]
+ *
+ * func(10, 5);
+ * // => [100, 10]
+ */
+ var overArgs = castRest(function(func, transforms) {
+ transforms = (transforms.length == 1 && isArray(transforms[0]))
+ ? arrayMap(transforms[0], baseUnary(getIteratee()))
+ : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
+
+ var funcsLength = transforms.length;
+ return baseRest(function(args) {
+ var index = -1,
+ length = nativeMin(args.length, funcsLength);
+
+ while (++index < length) {
+ args[index] = transforms[index].call(this, args[index]);
+ }
+ return apply(func, this, args);
+ });
+ });
+
+ /**
+ * Creates a function that invokes `func` with `partials` prepended to the
+ * arguments it receives. This method is like `_.bind` except it does **not**
+ * alter the `this` binding.
+ *
+ * The `_.partial.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.2.0
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * function greet(greeting, name) {
+ * return greeting + ' ' + name;
+ * }
+ *
+ * var sayHelloTo = _.partial(greet, 'hello');
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ *
+ * // Partially applied with placeholders.
+ * var greetFred = _.partial(greet, _, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ */
+ var partial = baseRest(function(func, partials) {
+ var holders = replaceHolders(partials, getHolder(partial));
+ return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
+ });
+
+ /**
+ * This method is like `_.partial` except that partially applied arguments
+ * are appended to the arguments it receives.
+ *
+ * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * function greet(greeting, name) {
+ * return greeting + ' ' + name;
+ * }
+ *
+ * var greetFred = _.partialRight(greet, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ *
+ * // Partially applied with placeholders.
+ * var sayHelloTo = _.partialRight(greet, 'hello', _);
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ */
+ var partialRight = baseRest(function(func, partials) {
+ var holders = replaceHolders(partials, getHolder(partialRight));
+ return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
+ });
+
+ /**
+ * Creates a function that invokes `func` with arguments arranged according
+ * to the specified `indexes` where the argument value at the first index is
+ * provided as the first argument, the argument value at the second index is
+ * provided as the second argument, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to rearrange arguments for.
+ * @param {...(number|number[])} indexes The arranged argument indexes.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var rearged = _.rearg(function(a, b, c) {
+ * return [a, b, c];
+ * }, [2, 0, 1]);
+ *
+ * rearged('b', 'c', 'a')
+ * // => ['a', 'b', 'c']
+ */
+ var rearg = flatRest(function(func, indexes) {
+ return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
+ });
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * created function and arguments from `start` and beyond provided as
+ * an array.
+ *
+ * **Note:** This method is based on the
+ * [rest parameter](https://mdn.io/rest_parameters).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.rest(function(what, names) {
+ * return what + ' ' + _.initial(names).join(', ') +
+ * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
+ * });
+ *
+ * say('hello', 'fred', 'barney', 'pebbles');
+ * // => 'hello fred, barney, & pebbles'
+ */
+ function rest(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = start === undefined ? start : toInteger(start);
+ return baseRest(func, start);
+ }
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * create function and an array of arguments much like
+ * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
+ *
+ * **Note:** This method is based on the
+ * [spread operator](https://mdn.io/spread_operator).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Function
+ * @param {Function} func The function to spread arguments over.
+ * @param {number} [start=0] The start position of the spread.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.spread(function(who, what) {
+ * return who + ' says ' + what;
+ * });
+ *
+ * say(['fred', 'hello']);
+ * // => 'fred says hello'
+ *
+ * var numbers = Promise.all([
+ * Promise.resolve(40),
+ * Promise.resolve(36)
+ * ]);
+ *
+ * numbers.then(_.spread(function(x, y) {
+ * return x + y;
+ * }));
+ * // => a Promise of 76
+ */
+ function spread(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = start === undefined ? 0 : nativeMax(toInteger(start), 0);
+ return baseRest(function(args) {
+ var array = args[start],
+ otherArgs = castSlice(args, 0, start);
+
+ if (array) {
+ arrayPush(otherArgs, array);
+ }
+ return apply(func, this, otherArgs);
+ });
+ }
+
+ /**
+ * Creates a throttled function that only invokes `func` at most once per
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
+ * method to cancel delayed `func` invocations and a `flush` method to
+ * immediately invoke them. Provide `options` to indicate whether `func`
+ * should be invoked on the leading and/or trailing edge of the `wait`
+ * timeout. The `func` is invoked with the last arguments provided to the
+ * throttled function. Subsequent calls to the throttled function return the
+ * result of the last `func` invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
+ * invoked on the trailing edge of the timeout only if the throttled function
+ * is invoked more than once during the `wait` timeout.
+ *
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
+ *
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+ * for details over the differences between `_.throttle` and `_.debounce`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to throttle.
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=true]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
+ * @returns {Function} Returns the new throttled function.
+ * @example
+ *
+ * // Avoid excessively updating the position while scrolling.
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
+ *
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
+ * jQuery(element).on('click', throttled);
+ *
+ * // Cancel the trailing throttled invocation.
+ * jQuery(window).on('popstate', throttled.cancel);
+ */
+ function throttle(func, wait, options) {
+ var leading = true,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (isObject(options)) {
+ leading = 'leading' in options ? !!options.leading : leading;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+ return debounce(func, wait, {
+ 'leading': leading,
+ 'maxWait': wait,
+ 'trailing': trailing
+ });
+ }
+
+ /**
+ * Creates a function that accepts up to one argument, ignoring any
+ * additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.unary(parseInt));
+ * // => [6, 8, 10]
+ */
+ function unary(func) {
+ return ary(func, 1);
+ }
+
+ /**
+ * Creates a function that provides `value` to `wrapper` as its first
+ * argument. Any additional arguments provided to the function are appended
+ * to those provided to the `wrapper`. The wrapper is invoked with the `this`
+ * binding of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {*} value The value to wrap.
+ * @param {Function} [wrapper=identity] The wrapper function.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var p = _.wrap(_.escape, function(func, text) {
+ * return '<p>' + func(text) + '</p>';
+ * });
+ *
+ * p('fred, barney, & pebbles');
+ * // => '<p>fred, barney, &amp; pebbles</p>'
+ */
+ function wrap(value, wrapper) {
+ return partial(castFunction(wrapper), value);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Casts `value` as an array if it's not one.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.4.0
+ * @category Lang
+ * @param {*} value The value to inspect.
+ * @returns {Array} Returns the cast array.
+ * @example
+ *
+ * _.castArray(1);
+ * // => [1]
+ *
+ * _.castArray({ 'a': 1 });
+ * // => [{ 'a': 1 }]
+ *
+ * _.castArray('abc');
+ * // => ['abc']
+ *
+ * _.castArray(null);
+ * // => [null]
+ *
+ * _.castArray(undefined);
+ * // => [undefined]
+ *
+ * _.castArray();
+ * // => []
+ *
+ * var array = [1, 2, 3];
+ * console.log(_.castArray(array) === array);
+ * // => true
+ */
+ function castArray() {
+ if (!arguments.length) {
+ return [];
+ }
+ var value = arguments[0];
+ return isArray(value) ? value : [value];
+ }
+
+ /**
+ * Creates a shallow clone of `value`.
+ *
+ * **Note:** This method is loosely based on the
+ * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
+ * and supports cloning arrays, array buffers, booleans, date objects, maps,
+ * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
+ * arrays. The own enumerable properties of `arguments` objects are cloned
+ * as plain objects. An empty object is returned for uncloneable values such
+ * as error objects, functions, DOM nodes, and WeakMaps.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeep
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var shallow = _.clone(objects);
+ * console.log(shallow[0] === objects[0]);
+ * // => true
+ */
+ function clone(value) {
+ return baseClone(value, CLONE_SYMBOLS_FLAG);
+ }
+
+ /**
+ * This method is like `_.clone` except that it accepts `customizer` which
+ * is invoked to produce the cloned value. If `customizer` returns `undefined`,
+ * cloning is handled by the method instead. The `customizer` is invoked with
+ * up to four arguments; (value [, index|key, object, stack]).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeepWith
+ * @example
+ *
+ * function customizer(value) {
+ * if (_.isElement(value)) {
+ * return value.cloneNode(false);
+ * }
+ * }
+ *
+ * var el = _.cloneWith(document.body, customizer);
+ *
+ * console.log(el === document.body);
+ * // => false
+ * console.log(el.nodeName);
+ * // => 'BODY'
+ * console.log(el.childNodes.length);
+ * // => 0
+ */
+ function cloneWith(value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
+ }
+
+ /**
+ * This method is like `_.clone` except that it recursively clones `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Lang
+ * @param {*} value The value to recursively clone.
+ * @returns {*} Returns the deep cloned value.
+ * @see _.clone
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var deep = _.cloneDeep(objects);
+ * console.log(deep[0] === objects[0]);
+ * // => false
+ */
+ function cloneDeep(value) {
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
+ }
+
+ /**
+ * This method is like `_.cloneWith` except that it recursively clones `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to recursively clone.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @returns {*} Returns the deep cloned value.
+ * @see _.cloneWith
+ * @example
+ *
+ * function customizer(value) {
+ * if (_.isElement(value)) {
+ * return value.cloneNode(true);
+ * }
+ * }
+ *
+ * var el = _.cloneDeepWith(document.body, customizer);
+ *
+ * console.log(el === document.body);
+ * // => false
+ * console.log(el.nodeName);
+ * // => 'BODY'
+ * console.log(el.childNodes.length);
+ * // => 20
+ */
+ function cloneDeepWith(value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
+ }
+
+ /**
+ * Checks if `object` conforms to `source` by invoking the predicate
+ * properties of `source` with the corresponding property values of `object`.
+ *
+ * **Note:** This method is equivalent to `_.conforms` when `source` is
+ * partially applied.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.14.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {boolean} Returns `true` if `object` conforms, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ *
+ * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
+ * // => true
+ *
+ * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
+ * // => false
+ */
+ function conformsTo(object, source) {
+ return source == null || baseConformsTo(object, source, keys(source));
+ }
+
+ /**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+ function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+ }
+
+ /**
+ * Checks if `value` is greater than `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ * @see _.lt
+ * @example
+ *
+ * _.gt(3, 1);
+ * // => true
+ *
+ * _.gt(3, 3);
+ * // => false
+ *
+ * _.gt(1, 3);
+ * // => false
+ */
+ var gt = createRelationalOperation(baseGt);
+
+ /**
+ * Checks if `value` is greater than or equal to `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than or equal to
+ * `other`, else `false`.
+ * @see _.lte
+ * @example
+ *
+ * _.gte(3, 1);
+ * // => true
+ *
+ * _.gte(3, 3);
+ * // => true
+ *
+ * _.gte(1, 3);
+ * // => false
+ */
+ var gte = createRelationalOperation(function(value, other) {
+ return value >= other;
+ });
+
+ /**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ * else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
+ return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
+ !propertyIsEnumerable.call(value, 'callee');
+ };
+
+ /**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+ var isArray = Array.isArray;
+
+ /**
+ * Checks if `value` is classified as an `ArrayBuffer` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
+ * @example
+ *
+ * _.isArrayBuffer(new ArrayBuffer(2));
+ * // => true
+ *
+ * _.isArrayBuffer(new Array(2));
+ * // => false
+ */
+ var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
+
+ /**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+ function isArrayLike(value) {
+ return value != null && isLength(value.length) && !isFunction(value);
+ }
+
+ /**
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
+ * else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
+ *
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
+ */
+ function isArrayLikeObject(value) {
+ return isObjectLike(value) && isArrayLike(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a boolean primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
+ * @example
+ *
+ * _.isBoolean(false);
+ * // => true
+ *
+ * _.isBoolean(null);
+ * // => false
+ */
+ function isBoolean(value) {
+ return value === true || value === false ||
+ (isObjectLike(value) && baseGetTag(value) == boolTag);
+ }
+
+ /**
+ * Checks if `value` is a buffer.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
+ * @example
+ *
+ * _.isBuffer(new Buffer(2));
+ * // => true
+ *
+ * _.isBuffer(new Uint8Array(2));
+ * // => false
+ */
+ var isBuffer = nativeIsBuffer || stubFalse;
+
+ /**
+ * Checks if `value` is classified as a `Date` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ * @example
+ *
+ * _.isDate(new Date);
+ * // => true
+ *
+ * _.isDate('Mon April 23 2012');
+ * // => false
+ */
+ var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
+
+ /**
+ * Checks if `value` is likely a DOM element.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
+ * @example
+ *
+ * _.isElement(document.body);
+ * // => true
+ *
+ * _.isElement('<body>');
+ * // => false
+ */
+ function isElement(value) {
+ return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
+ }
+
+ /**
+ * Checks if `value` is an empty object, collection, map, or set.
+ *
+ * Objects are considered empty if they have no own enumerable string keyed
+ * properties.
+ *
+ * Array-like values such as `arguments` objects, arrays, buffers, strings, or
+ * jQuery-like collections are considered empty if they have a `length` of `0`.
+ * Similarly, maps and sets are considered empty if they have a `size` of `0`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
+ * @example
+ *
+ * _.isEmpty(null);
+ * // => true
+ *
+ * _.isEmpty(true);
+ * // => true
+ *
+ * _.isEmpty(1);
+ * // => true
+ *
+ * _.isEmpty([1, 2, 3]);
+ * // => false
+ *
+ * _.isEmpty({ 'a': 1 });
+ * // => false
+ */
+ function isEmpty(value) {
+ if (value == null) {
+ return true;
+ }
+ if (isArrayLike(value) &&
+ (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
+ isBuffer(value) || isTypedArray(value) || isArguments(value))) {
+ return !value.length;
+ }
+ var tag = getTag(value);
+ if (tag == mapTag || tag == setTag) {
+ return !value.size;
+ }
+ if (isPrototype(value)) {
+ return !baseKeys(value).length;
+ }
+ for (var key in value) {
+ if (hasOwnProperty.call(value, key)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Performs a deep comparison between two values to determine if they are
+ * equivalent.
+ *
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
+ * by their own, not inherited, enumerable properties. Functions and DOM
+ * nodes are **not** supported.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.isEqual(object, other);
+ * // => true
+ *
+ * object === other;
+ * // => false
+ */
+ function isEqual(value, other) {
+ return baseIsEqual(value, other);
+ }
+
+ /**
+ * This method is like `_.isEqual` except that it accepts `customizer` which
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+ * are handled by the method instead. The `customizer` is invoked with up to
+ * six arguments: (objValue, othValue [, index|key, object, other, stack]).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * function isGreeting(value) {
+ * return /^h(?:i|ello)$/.test(value);
+ * }
+ *
+ * function customizer(objValue, othValue) {
+ * if (isGreeting(objValue) && isGreeting(othValue)) {
+ * return true;
+ * }
+ * }
+ *
+ * var array = ['hello', 'goodbye'];
+ * var other = ['hi', 'goodbye'];
+ *
+ * _.isEqualWith(array, other, customizer);
+ * // => true
+ */
+ function isEqualWith(value, other, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ var result = customizer ? customizer(value, other) : undefined;
+ return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
+ }
+
+ /**
+ * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
+ * `SyntaxError`, `TypeError`, or `URIError` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
+ * @example
+ *
+ * _.isError(new Error);
+ * // => true
+ *
+ * _.isError(Error);
+ * // => false
+ */
+ function isError(value) {
+ if (!isObjectLike(value)) {
+ return false;
+ }
+ var tag = baseGetTag(value);
+ return tag == errorTag || tag == domExcTag ||
+ (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
+ }
+
+ /**
+ * Checks if `value` is a finite primitive number.
+ *
+ * **Note:** This method is based on
+ * [`Number.isFinite`](https://mdn.io/Number/isFinite).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
+ * @example
+ *
+ * _.isFinite(3);
+ * // => true
+ *
+ * _.isFinite(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isFinite(Infinity);
+ * // => false
+ *
+ * _.isFinite('3');
+ * // => false
+ */
+ function isFinite(value) {
+ return typeof value == 'number' && nativeIsFinite(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+ function isFunction(value) {
+ if (!isObject(value)) {
+ return false;
+ }
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
+ var tag = baseGetTag(value);
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
+ }
+
+ /**
+ * Checks if `value` is an integer.
+ *
+ * **Note:** This method is based on
+ * [`Number.isInteger`](https://mdn.io/Number/isInteger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
+ * @example
+ *
+ * _.isInteger(3);
+ * // => true
+ *
+ * _.isInteger(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isInteger(Infinity);
+ * // => false
+ *
+ * _.isInteger('3');
+ * // => false
+ */
+ function isInteger(value) {
+ return typeof value == 'number' && value == toInteger(value);
+ }
+
+ /**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+ function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ }
+
+ /**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+ function isObject(value) {
+ var type = typeof value;
+ return value != null && (type == 'object' || type == 'function');
+ }
+
+ /**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+ function isObjectLike(value) {
+ return value != null && typeof value == 'object';
+ }
+
+ /**
+ * Checks if `value` is classified as a `Map` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
+ * @example
+ *
+ * _.isMap(new Map);
+ * // => true
+ *
+ * _.isMap(new WeakMap);
+ * // => false
+ */
+ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
+
+ /**
+ * Performs a partial deep comparison between `object` and `source` to
+ * determine if `object` contains equivalent property values.
+ *
+ * **Note:** This method is equivalent to `_.matches` when `source` is
+ * partially applied.
+ *
+ * Partial comparisons will match empty array and empty object `source`
+ * values against any array or object value, respectively. See `_.isEqual`
+ * for a list of supported value comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ *
+ * _.isMatch(object, { 'b': 2 });
+ * // => true
+ *
+ * _.isMatch(object, { 'b': 1 });
+ * // => false
+ */
+ function isMatch(object, source) {
+ return object === source || baseIsMatch(object, source, getMatchData(source));
+ }
+
+ /**
+ * This method is like `_.isMatch` except that it accepts `customizer` which
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+ * are handled by the method instead. The `customizer` is invoked with five
+ * arguments: (objValue, srcValue, index|key, object, source).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ * @example
+ *
+ * function isGreeting(value) {
+ * return /^h(?:i|ello)$/.test(value);
+ * }
+ *
+ * function customizer(objValue, srcValue) {
+ * if (isGreeting(objValue) && isGreeting(srcValue)) {
+ * return true;
+ * }
+ * }
+ *
+ * var object = { 'greeting': 'hello' };
+ * var source = { 'greeting': 'hi' };
+ *
+ * _.isMatchWith(object, source, customizer);
+ * // => true
+ */
+ function isMatchWith(object, source, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseIsMatch(object, source, getMatchData(source), customizer);
+ }
+
+ /**
+ * Checks if `value` is `NaN`.
+ *
+ * **Note:** This method is based on
+ * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
+ * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
+ * `undefined` and other non-number values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ * @example
+ *
+ * _.isNaN(NaN);
+ * // => true
+ *
+ * _.isNaN(new Number(NaN));
+ * // => true
+ *
+ * isNaN(undefined);
+ * // => true
+ *
+ * _.isNaN(undefined);
+ * // => false
+ */
+ function isNaN(value) {
+ // An `NaN` primitive is the only value that is not equal to itself.
+ // Perform the `toStringTag` check first to avoid errors with some
+ // ActiveX objects in IE.
+ return isNumber(value) && value != +value;
+ }
+
+ /**
+ * Checks if `value` is a pristine native function.
+ *
+ * **Note:** This method can't reliably detect native functions in the presence
+ * of the core-js package because core-js circumvents this kind of detection.
+ * Despite multiple requests, the core-js maintainer has made it clear: any
+ * attempt to fix the detection will be obstructed. As a result, we're left
+ * with little choice but to throw an error. Unfortunately, this also affects
+ * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
+ * which rely on core-js.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ * @example
+ *
+ * _.isNative(Array.prototype.push);
+ * // => true
+ *
+ * _.isNative(_);
+ * // => false
+ */
+ function isNative(value) {
+ if (isMaskable(value)) {
+ throw new Error(CORE_ERROR_TEXT);
+ }
+ return baseIsNative(value);
+ }
+
+ /**
+ * Checks if `value` is `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
+ * @example
+ *
+ * _.isNull(null);
+ * // => true
+ *
+ * _.isNull(void 0);
+ * // => false
+ */
+ function isNull(value) {
+ return value === null;
+ }
+
+ /**
+ * Checks if `value` is `null` or `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
+ * @example
+ *
+ * _.isNil(null);
+ * // => true
+ *
+ * _.isNil(void 0);
+ * // => true
+ *
+ * _.isNil(NaN);
+ * // => false
+ */
+ function isNil(value) {
+ return value == null;
+ }
+
+ /**
+ * Checks if `value` is classified as a `Number` primitive or object.
+ *
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
+ * classified as numbers, use the `_.isFinite` method.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a number, else `false`.
+ * @example
+ *
+ * _.isNumber(3);
+ * // => true
+ *
+ * _.isNumber(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isNumber(Infinity);
+ * // => true
+ *
+ * _.isNumber('3');
+ * // => false
+ */
+ function isNumber(value) {
+ return typeof value == 'number' ||
+ (isObjectLike(value) && baseGetTag(value) == numberTag);
+ }
+
+ /**
+ * Checks if `value` is a plain object, that is, an object created by the
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.8.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * _.isPlainObject(new Foo);
+ * // => false
+ *
+ * _.isPlainObject([1, 2, 3]);
+ * // => false
+ *
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
+ * // => true
+ *
+ * _.isPlainObject(Object.create(null));
+ * // => true
+ */
+ function isPlainObject(value) {
+ if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
+ return false;
+ }
+ var proto = getPrototype(value);
+ if (proto === null) {
+ return true;
+ }
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
+ return typeof Ctor == 'function' && Ctor instanceof Ctor &&
+ funcToString.call(Ctor) == objectCtorString;
+ }
+
+ /**
+ * Checks if `value` is classified as a `RegExp` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ * @example
+ *
+ * _.isRegExp(/abc/);
+ * // => true
+ *
+ * _.isRegExp('/abc/');
+ * // => false
+ */
+ var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
+
+ /**
+ * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
+ * double precision number which isn't the result of a rounded unsafe integer.
+ *
+ * **Note:** This method is based on
+ * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
+ * @example
+ *
+ * _.isSafeInteger(3);
+ * // => true
+ *
+ * _.isSafeInteger(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isSafeInteger(Infinity);
+ * // => false
+ *
+ * _.isSafeInteger('3');
+ * // => false
+ */
+ function isSafeInteger(value) {
+ return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
+ }
+
+ /**
+ * Checks if `value` is classified as a `Set` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
+ * @example
+ *
+ * _.isSet(new Set);
+ * // => true
+ *
+ * _.isSet(new WeakSet);
+ * // => false
+ */
+ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
+
+ /**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+ function isString(value) {
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+ function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && baseGetTag(value) == symbolTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a typed array.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ * @example
+ *
+ * _.isTypedArray(new Uint8Array);
+ * // => true
+ *
+ * _.isTypedArray([]);
+ * // => false
+ */
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
+
+ /**
+ * Checks if `value` is `undefined`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
+ * @example
+ *
+ * _.isUndefined(void 0);
+ * // => true
+ *
+ * _.isUndefined(null);
+ * // => false
+ */
+ function isUndefined(value) {
+ return value === undefined;
+ }
+
+ /**
+ * Checks if `value` is classified as a `WeakMap` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
+ * @example
+ *
+ * _.isWeakMap(new WeakMap);
+ * // => true
+ *
+ * _.isWeakMap(new Map);
+ * // => false
+ */
+ function isWeakMap(value) {
+ return isObjectLike(value) && getTag(value) == weakMapTag;
+ }
+
+ /**
+ * Checks if `value` is classified as a `WeakSet` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
+ * @example
+ *
+ * _.isWeakSet(new WeakSet);
+ * // => true
+ *
+ * _.isWeakSet(new Set);
+ * // => false
+ */
+ function isWeakSet(value) {
+ return isObjectLike(value) && baseGetTag(value) == weakSetTag;
+ }
+
+ /**
+ * Checks if `value` is less than `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ * @see _.gt
+ * @example
+ *
+ * _.lt(1, 3);
+ * // => true
+ *
+ * _.lt(3, 3);
+ * // => false
+ *
+ * _.lt(3, 1);
+ * // => false
+ */
+ var lt = createRelationalOperation(baseLt);
+
+ /**
+ * Checks if `value` is less than or equal to `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than or equal to
+ * `other`, else `false`.
+ * @see _.gte
+ * @example
+ *
+ * _.lte(1, 3);
+ * // => true
+ *
+ * _.lte(3, 3);
+ * // => true
+ *
+ * _.lte(3, 1);
+ * // => false
+ */
+ var lte = createRelationalOperation(function(value, other) {
+ return value <= other;
+ });
+
+ /**
+ * Converts `value` to an array.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the converted array.
+ * @example
+ *
+ * _.toArray({ 'a': 1, 'b': 2 });
+ * // => [1, 2]
+ *
+ * _.toArray('abc');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toArray(1);
+ * // => []
+ *
+ * _.toArray(null);
+ * // => []
+ */
+ function toArray(value) {
+ if (!value) {
+ return [];
+ }
+ if (isArrayLike(value)) {
+ return isString(value) ? stringToArray(value) : copyArray(value);
+ }
+ if (symIterator && value[symIterator]) {
+ return iteratorToArray(value[symIterator]());
+ }
+ var tag = getTag(value),
+ func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
+
+ return func(value);
+ }
+
+ /**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+ function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+ }
+
+ /**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3.2);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3.2');
+ * // => 3
+ */
+ function toInteger(value) {
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
+ }
+
+ /**
+ * Converts `value` to an integer suitable for use as the length of an
+ * array-like object.
+ *
+ * **Note:** This method is based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toLength(3.2);
+ * // => 3
+ *
+ * _.toLength(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toLength(Infinity);
+ * // => 4294967295
+ *
+ * _.toLength('3.2');
+ * // => 3
+ */
+ function toLength(value) {
+ return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
+ }
+
+ /**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3.2);
+ * // => 3.2
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3.2');
+ * // => 3.2
+ */
+ function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ if (isObject(value)) {
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
+ }
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
+ }
+ value = value.replace(reTrim, '');
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
+ }
+
+ /**
+ * Converts `value` to a plain object flattening inherited enumerable string
+ * keyed properties of `value` to own properties of the plain object.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Object} Returns the converted plain object.
+ * @example
+ *
+ * function Foo() {
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.assign({ 'a': 1 }, new Foo);
+ * // => { 'a': 1, 'b': 2 }
+ *
+ * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
+ * // => { 'a': 1, 'b': 2, 'c': 3 }
+ */
+ function toPlainObject(value) {
+ return copyObject(value, keysIn(value));
+ }
+
+ /**
+ * Converts `value` to a safe integer. A safe integer can be compared and
+ * represented correctly.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toSafeInteger(3.2);
+ * // => 3
+ *
+ * _.toSafeInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toSafeInteger(Infinity);
+ * // => 9007199254740991
+ *
+ * _.toSafeInteger('3.2');
+ * // => 3
+ */
+ function toSafeInteger(value) {
+ return baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);
+ }
+
+ /**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+ function toString(value) {
+ return value == null ? '' : baseToString(value);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Assigns own enumerable string keyed properties of source objects to the
+ * destination object. Source objects are applied from left to right.
+ * Subsequent sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object` and is loosely based on
+ * [`Object.assign`](https://mdn.io/Object/assign).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assignIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assign({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ var assign = createAssigner(function(object, source) {
+ if (isPrototype(source) || isArrayLike(source)) {
+ copyObject(source, keys(source), object);
+ return;
+ }
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ assignValue(object, key, source[key]);
+ }
+ }
+ });
+
+ /**
+ * This method is like `_.assign` except that it iterates over own and
+ * inherited source properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extend
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assign
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assignIn({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
+ */
+ var assignIn = createAssigner(function(object, source) {
+ copyObject(source, keysIn(source), object);
+ });
+
+ /**
+ * This method is like `_.assignIn` except that it accepts `customizer`
+ * which is invoked to produce the assigned values. If `customizer` returns
+ * `undefined`, assignment is handled by the method instead. The `customizer`
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extendWith
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @see _.assignWith
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * return _.isUndefined(objValue) ? srcValue : objValue;
+ * }
+ *
+ * var defaults = _.partialRight(_.assignInWith, customizer);
+ *
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keysIn(source), object, customizer);
+ });
+
+ /**
+ * This method is like `_.assign` except that it accepts `customizer`
+ * which is invoked to produce the assigned values. If `customizer` returns
+ * `undefined`, assignment is handled by the method instead. The `customizer`
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @see _.assignInWith
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * return _.isUndefined(objValue) ? srcValue : objValue;
+ * }
+ *
+ * var defaults = _.partialRight(_.assignWith, customizer);
+ *
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keys(source), object, customizer);
+ });
+
+ /**
+ * Creates an array of values corresponding to `paths` of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Array} Returns the picked values.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+ *
+ * _.at(object, ['a[0].b.c', 'a[1]']);
+ * // => [3, 4]
+ */
+ var at = flatRest(baseAt);
+
+ /**
+ * Creates an object that inherits from the `prototype` object. If a
+ * `properties` object is given, its own enumerable string keyed properties
+ * are assigned to the created object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Object
+ * @param {Object} prototype The object to inherit from.
+ * @param {Object} [properties] The properties to assign to the object.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * function Shape() {
+ * this.x = 0;
+ * this.y = 0;
+ * }
+ *
+ * function Circle() {
+ * Shape.call(this);
+ * }
+ *
+ * Circle.prototype = _.create(Shape.prototype, {
+ * 'constructor': Circle
+ * });
+ *
+ * var circle = new Circle;
+ * circle instanceof Circle;
+ * // => true
+ *
+ * circle instanceof Shape;
+ * // => true
+ */
+ function create(prototype, properties) {
+ var result = baseCreate(prototype);
+ return properties == null ? result : baseAssign(result, properties);
+ }
+
+ /**
+ * Assigns own and inherited enumerable string keyed properties of source
+ * objects to the destination object for all destination properties that
+ * resolve to `undefined`. Source objects are applied from left to right.
+ * Once a property is set, additional values of the same property are ignored.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaultsDeep
+ * @example
+ *
+ * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var defaults = baseRest(function(args) {
+ args.push(undefined, assignInDefaults);
+ return apply(assignInWith, undefined, args);
+ });
+
+ /**
+ * This method is like `_.defaults` except that it recursively assigns
+ * default properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaults
+ * @example
+ *
+ * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
+ * // => { 'a': { 'b': 2, 'c': 3 } }
+ */
+ var defaultsDeep = baseRest(function(args) {
+ args.push(undefined, mergeDefaults);
+ return apply(mergeWith, undefined, args);
+ });
+
+ /**
+ * This method is like `_.find` except that it returns the key of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {string|undefined} Returns the key of the matched element,
+ * else `undefined`.
+ * @example
+ *
+ * var users = {
+ * 'barney': { 'age': 36, 'active': true },
+ * 'fred': { 'age': 40, 'active': false },
+ * 'pebbles': { 'age': 1, 'active': true }
+ * };
+ *
+ * _.findKey(users, function(o) { return o.age < 40; });
+ * // => 'barney' (iteration order is not guaranteed)
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findKey(users, { 'age': 1, 'active': true });
+ * // => 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findKey(users, ['active', false]);
+ * // => 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findKey(users, 'active');
+ * // => 'barney'
+ */
+ function findKey(object, predicate) {
+ return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
+ }
+
+ /**
+ * This method is like `_.findKey` except that it iterates over elements of
+ * a collection in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {string|undefined} Returns the key of the matched element,
+ * else `undefined`.
+ * @example
+ *
+ * var users = {
+ * 'barney': { 'age': 36, 'active': true },
+ * 'fred': { 'age': 40, 'active': false },
+ * 'pebbles': { 'age': 1, 'active': true }
+ * };
+ *
+ * _.findLastKey(users, function(o) { return o.age < 40; });
+ * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findLastKey(users, { 'age': 36, 'active': true });
+ * // => 'barney'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findLastKey(users, ['active', false]);
+ * // => 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findLastKey(users, 'active');
+ * // => 'pebbles'
+ */
+ function findLastKey(object, predicate) {
+ return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
+ }
+
+ /**
+ * Iterates over own and inherited enumerable string keyed properties of an
+ * object and invokes `iteratee` for each property. The iteratee is invoked
+ * with three arguments: (value, key, object). Iteratee functions may exit
+ * iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forInRight
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forIn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
+ */
+ function forIn(object, iteratee) {
+ return object == null
+ ? object
+ : baseFor(object, getIteratee(iteratee, 3), keysIn);
+ }
+
+ /**
+ * This method is like `_.forIn` except that it iterates over properties of
+ * `object` in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forInRight(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
+ */
+ function forInRight(object, iteratee) {
+ return object == null
+ ? object
+ : baseForRight(object, getIteratee(iteratee, 3), keysIn);
+ }
+
+ /**
+ * Iterates over own enumerable string keyed properties of an object and
+ * invokes `iteratee` for each property. The iteratee is invoked with three
+ * arguments: (value, key, object). Iteratee functions may exit iteration
+ * early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forOwnRight
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+ function forOwn(object, iteratee) {
+ return object && baseForOwn(object, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * This method is like `_.forOwn` except that it iterates over properties of
+ * `object` in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forOwn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwnRight(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
+ */
+ function forOwnRight(object, iteratee) {
+ return object && baseForOwnRight(object, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * Creates an array of function property names from own enumerable properties
+ * of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @returns {Array} Returns the function names.
+ * @see _.functionsIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = _.constant('a');
+ * this.b = _.constant('b');
+ * }
+ *
+ * Foo.prototype.c = _.constant('c');
+ *
+ * _.functions(new Foo);
+ * // => ['a', 'b']
+ */
+ function functions(object) {
+ return object == null ? [] : baseFunctions(object, keys(object));
+ }
+
+ /**
+ * Creates an array of function property names from own and inherited
+ * enumerable properties of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @returns {Array} Returns the function names.
+ * @see _.functions
+ * @example
+ *
+ * function Foo() {
+ * this.a = _.constant('a');
+ * this.b = _.constant('b');
+ * }
+ *
+ * Foo.prototype.c = _.constant('c');
+ *
+ * _.functionsIn(new Foo);
+ * // => ['a', 'b', 'c']
+ */
+ function functionsIn(object) {
+ return object == null ? [] : baseFunctions(object, keysIn(object));
+ }
+
+ /**
+ * Gets the value at `path` of `object`. If the resolved value is
+ * `undefined`, the `defaultValue` is returned in its place.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.get(object, 'a[0].b.c');
+ * // => 3
+ *
+ * _.get(object, ['a', '0', 'b', 'c']);
+ * // => 3
+ *
+ * _.get(object, 'a.b.c', 'default');
+ * // => 'default'
+ */
+ function get(object, path, defaultValue) {
+ var result = object == null ? undefined : baseGet(object, path);
+ return result === undefined ? defaultValue : result;
+ }
+
+ /**
+ * Checks if `path` is a direct property of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = { 'a': { 'b': 2 } };
+ * var other = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.has(object, 'a');
+ * // => true
+ *
+ * _.has(object, 'a.b');
+ * // => true
+ *
+ * _.has(object, ['a', 'b']);
+ * // => true
+ *
+ * _.has(other, 'a');
+ * // => false
+ */
+ function has(object, path) {
+ return object != null && hasPath(object, path, baseHas);
+ }
+
+ /**
+ * Checks if `path` is a direct or inherited property of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.hasIn(object, 'a');
+ * // => true
+ *
+ * _.hasIn(object, 'a.b');
+ * // => true
+ *
+ * _.hasIn(object, ['a', 'b']);
+ * // => true
+ *
+ * _.hasIn(object, 'b');
+ * // => false
+ */
+ function hasIn(object, path) {
+ return object != null && hasPath(object, path, baseHasIn);
+ }
+
+ /**
+ * Creates an object composed of the inverted keys and values of `object`.
+ * If `object` contains duplicate values, subsequent values overwrite
+ * property assignments of previous values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.7.0
+ * @category Object
+ * @param {Object} object The object to invert.
+ * @returns {Object} Returns the new inverted object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
+ *
+ * _.invert(object);
+ * // => { '1': 'c', '2': 'b' }
+ */
+ var invert = createInverter(function(result, value, key) {
+ result[value] = key;
+ }, constant(identity));
+
+ /**
+ * This method is like `_.invert` except that the inverted object is generated
+ * from the results of running each element of `object` thru `iteratee`. The
+ * corresponding inverted value of each inverted key is an array of keys
+ * responsible for generating the inverted value. The iteratee is invoked
+ * with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.1.0
+ * @category Object
+ * @param {Object} object The object to invert.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Object} Returns the new inverted object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
+ *
+ * _.invertBy(object);
+ * // => { '1': ['a', 'c'], '2': ['b'] }
+ *
+ * _.invertBy(object, function(value) {
+ * return 'group' + value;
+ * });
+ * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
+ */
+ var invertBy = createInverter(function(result, value, key) {
+ if (hasOwnProperty.call(result, value)) {
+ result[value].push(key);
+ } else {
+ result[value] = [key];
+ }
+ }, getIteratee);
+
+ /**
+ * Invokes the method at `path` of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {*} Returns the result of the invoked method.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
+ *
+ * _.invoke(object, 'a[0].b.c.slice', 1, 3);
+ * // => [2, 3]
+ */
+ var invoke = baseRest(baseInvoke);
+
+ /**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+ function keys(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
+ }
+
+ /**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+ function keysIn(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
+ }
+
+ /**
+ * The opposite of `_.mapValues`; this method creates an object with the
+ * same values as `object` and keys generated by running each own enumerable
+ * string keyed property of `object` thru `iteratee`. The iteratee is invoked
+ * with three arguments: (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapValues
+ * @example
+ *
+ * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
+ * return key + value;
+ * });
+ * // => { 'a1': 1, 'b2': 2 }
+ */
+ function mapKeys(object, iteratee) {
+ var result = {};
+ iteratee = getIteratee(iteratee, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ baseAssignValue(result, iteratee(value, key, object), value);
+ });
+ return result;
+ }
+
+ /**
+ * Creates an object with the same keys as `object` and values generated
+ * by running each own enumerable string keyed property of `object` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapKeys
+ * @example
+ *
+ * var users = {
+ * 'fred': { 'user': 'fred', 'age': 40 },
+ * 'pebbles': { 'user': 'pebbles', 'age': 1 }
+ * };
+ *
+ * _.mapValues(users, function(o) { return o.age; });
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.mapValues(users, 'age');
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ */
+ function mapValues(object, iteratee) {
+ var result = {};
+ iteratee = getIteratee(iteratee, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ baseAssignValue(result, key, iteratee(value, key, object));
+ });
+ return result;
+ }
+
+ /**
+ * This method is like `_.assign` except that it recursively merges own and
+ * inherited enumerable string keyed properties of source objects into the
+ * destination object. Source properties that resolve to `undefined` are
+ * skipped if a destination value exists. Array and plain object properties
+ * are merged recursively. Other objects and value types are overridden by
+ * assignment. Source objects are applied from left to right. Subsequent
+ * sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {
+ * 'a': [{ 'b': 2 }, { 'd': 4 }]
+ * };
+ *
+ * var other = {
+ * 'a': [{ 'c': 3 }, { 'e': 5 }]
+ * };
+ *
+ * _.merge(object, other);
+ * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
+ */
+ var merge = createAssigner(function(object, source, srcIndex) {
+ baseMerge(object, source, srcIndex);
+ });
+
+ /**
+ * This method is like `_.merge` except that it accepts `customizer` which
+ * is invoked to produce the merged values of the destination and source
+ * properties. If `customizer` returns `undefined`, merging is handled by the
+ * method instead. The `customizer` is invoked with six arguments:
+ * (objValue, srcValue, key, object, source, stack).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} customizer The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * if (_.isArray(objValue)) {
+ * return objValue.concat(srcValue);
+ * }
+ * }
+ *
+ * var object = { 'a': [1], 'b': [2] };
+ * var other = { 'a': [3], 'b': [4] };
+ *
+ * _.mergeWith(object, other, customizer);
+ * // => { 'a': [1, 3], 'b': [2, 4] }
+ */
+ var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
+ baseMerge(object, source, srcIndex, customizer);
+ });
+
+ /**
+ * The opposite of `_.pick`; this method creates an object composed of the
+ * own and inherited enumerable property paths of `object` that are not omitted.
+ *
+ * **Note:** This method is considerably slower than `_.pick`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to omit.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.omit(object, ['a', 'c']);
+ * // => { 'b': '2' }
+ */
+ var omit = flatRest(function(object, paths) {
+ var result = {};
+ if (object == null) {
+ return result;
+ }
+ var isDeep = false;
+ paths = arrayMap(paths, function(path) {
+ path = castPath(path, object);
+ isDeep || (isDeep = path.length > 1);
+ return path;
+ });
+ copyObject(object, getAllKeysIn(object), result);
+ if (isDeep) {
+ result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG);
+ }
+ var length = paths.length;
+ while (length--) {
+ baseUnset(result, paths[length]);
+ }
+ return result;
+ });
+
+ /**
+ * The opposite of `_.pickBy`; this method creates an object composed of
+ * the own and inherited enumerable string keyed properties of `object` that
+ * `predicate` doesn't return truthy for. The predicate is invoked with two
+ * arguments: (value, key).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Function} [predicate=_.identity] The function invoked per property.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.omitBy(object, _.isNumber);
+ * // => { 'b': '2' }
+ */
+ function omitBy(object, predicate) {
+ return pickBy(object, negate(getIteratee(predicate)));
+ }
+
+ /**
+ * Creates an object composed of the picked `object` properties.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pick(object, ['a', 'c']);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ var pick = flatRest(function(object, paths) {
+ return object == null ? {} : basePick(object, paths);
+ });
+
+ /**
+ * Creates an object composed of the `object` properties `predicate` returns
+ * truthy for. The predicate is invoked with two arguments: (value, key).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Function} [predicate=_.identity] The function invoked per property.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pickBy(object, _.isNumber);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ function pickBy(object, predicate) {
+ if (object == null) {
+ return {};
+ }
+ var props = arrayMap(getAllKeysIn(object), function(prop) {
+ return [prop];
+ });
+ predicate = getIteratee(predicate);
+ return basePickBy(object, props, function(value, path) {
+ return predicate(value, path[0]);
+ });
+ }
+
+ /**
+ * This method is like `_.get` except that if the resolved value is a
+ * function it's invoked with the `this` binding of its parent object and
+ * its result is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to resolve.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
+ *
+ * _.result(object, 'a[0].b.c1');
+ * // => 3
+ *
+ * _.result(object, 'a[0].b.c2');
+ * // => 4
+ *
+ * _.result(object, 'a[0].b.c3', 'default');
+ * // => 'default'
+ *
+ * _.result(object, 'a[0].b.c3', _.constant('default'));
+ * // => 'default'
+ */
+ function result(object, path, defaultValue) {
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length;
+
+ // Ensure the loop is entered when path is empty.
+ if (!length) {
+ length = 1;
+ object = undefined;
+ }
+ while (++index < length) {
+ var value = object == null ? undefined : object[toKey(path[index])];
+ if (value === undefined) {
+ index = length;
+ value = defaultValue;
+ }
+ object = isFunction(value) ? value.call(object) : value;
+ }
+ return object;
+ }
+
+ /**
+ * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
+ * it's created. Arrays are created for missing index properties while objects
+ * are created for all other missing properties. Use `_.setWith` to customize
+ * `path` creation.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.set(object, 'a[0].b.c', 4);
+ * console.log(object.a[0].b.c);
+ * // => 4
+ *
+ * _.set(object, ['x', '0', 'y', 'z'], 5);
+ * console.log(object.x[0].y.z);
+ * // => 5
+ */
+ function set(object, path, value) {
+ return object == null ? object : baseSet(object, path, value);
+ }
+
+ /**
+ * This method is like `_.set` except that it accepts `customizer` which is
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
+ * path creation is handled by the method instead. The `customizer` is invoked
+ * with three arguments: (nsValue, key, nsObject).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {};
+ *
+ * _.setWith(object, '[0][1]', 'a', Object);
+ * // => { '0': { '1': 'a' } }
+ */
+ function setWith(object, path, value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return object == null ? object : baseSet(object, path, value, customizer);
+ }
+
+ /**
+ * Creates an array of own enumerable string keyed-value pairs for `object`
+ * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
+ * entries are returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias entries
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the key-value pairs.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.toPairs(new Foo);
+ * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
+ */
+ var toPairs = createToPairs(keys);
+
+ /**
+ * Creates an array of own and inherited enumerable string keyed-value pairs
+ * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
+ * or set, its entries are returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias entriesIn
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the key-value pairs.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.toPairsIn(new Foo);
+ * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
+ */
+ var toPairsIn = createToPairs(keysIn);
+
+ /**
+ * An alternative to `_.reduce`; this method transforms `object` to a new
+ * `accumulator` object which is the result of running each of its own
+ * enumerable string keyed properties thru `iteratee`, with each invocation
+ * potentially mutating the `accumulator` object. If `accumulator` is not
+ * provided, a new object with the same `[[Prototype]]` will be used. The
+ * iteratee is invoked with four arguments: (accumulator, value, key, object).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The custom accumulator value.
+ * @returns {*} Returns the accumulated value.
+ * @example
+ *
+ * _.transform([2, 3, 4], function(result, n) {
+ * result.push(n *= n);
+ * return n % 2 == 0;
+ * }, []);
+ * // => [4, 9]
+ *
+ * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] }
+ */
+ function transform(object, iteratee, accumulator) {
+ var isArr = isArray(object),
+ isArrLike = isArr || isBuffer(object) || isTypedArray(object);
+
+ iteratee = getIteratee(iteratee, 4);
+ if (accumulator == null) {
+ var Ctor = object && object.constructor;
+ if (isArrLike) {
+ accumulator = isArr ? new Ctor : [];
+ }
+ else if (isObject(object)) {
+ accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
+ }
+ else {
+ accumulator = {};
+ }
+ }
+ (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
+ return iteratee(accumulator, value, index, object);
+ });
+ return accumulator;
+ }
+
+ /**
+ * Removes the property at `path` of `object`.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to unset.
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 7 } }] };
+ * _.unset(object, 'a[0].b.c');
+ * // => true
+ *
+ * console.log(object);
+ * // => { 'a': [{ 'b': {} }] };
+ *
+ * _.unset(object, ['a', '0', 'b', 'c']);
+ * // => true
+ *
+ * console.log(object);
+ * // => { 'a': [{ 'b': {} }] };
+ */
+ function unset(object, path) {
+ return object == null ? true : baseUnset(object, path);
+ }
+
+ /**
+ * This method is like `_.set` except that accepts `updater` to produce the
+ * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
+ * is invoked with one argument: (value).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {Function} updater The function to produce the updated value.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.update(object, 'a[0].b.c', function(n) { return n * n; });
+ * console.log(object.a[0].b.c);
+ * // => 9
+ *
+ * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
+ * console.log(object.x[0].y.z);
+ * // => 0
+ */
+ function update(object, path, updater) {
+ return object == null ? object : baseUpdate(object, path, castFunction(updater));
+ }
+
+ /**
+ * This method is like `_.update` except that it accepts `customizer` which is
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
+ * path creation is handled by the method instead. The `customizer` is invoked
+ * with three arguments: (nsValue, key, nsObject).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {Function} updater The function to produce the updated value.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {};
+ *
+ * _.updateWith(object, '[0][1]', _.constant('a'), Object);
+ * // => { '0': { '1': 'a' } }
+ */
+ function updateWith(object, path, updater, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
+ }
+
+ /**
+ * Creates an array of the own enumerable string keyed property values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.values(new Foo);
+ * // => [1, 2] (iteration order is not guaranteed)
+ *
+ * _.values('hi');
+ * // => ['h', 'i']
+ */
+ function values(object) {
+ return object == null ? [] : baseValues(object, keys(object));
+ }
+
+ /**
+ * Creates an array of the own and inherited enumerable string keyed property
+ * values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.valuesIn(new Foo);
+ * // => [1, 2, 3] (iteration order is not guaranteed)
+ */
+ function valuesIn(object) {
+ return object == null ? [] : baseValues(object, keysIn(object));
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Clamps `number` within the inclusive `lower` and `upper` bounds.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Number
+ * @param {number} number The number to clamp.
+ * @param {number} [lower] The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the clamped number.
+ * @example
+ *
+ * _.clamp(-10, -5, 5);
+ * // => -5
+ *
+ * _.clamp(10, -5, 5);
+ * // => 5
+ */
+ function clamp(number, lower, upper) {
+ if (upper === undefined) {
+ upper = lower;
+ lower = undefined;
+ }
+ if (upper !== undefined) {
+ upper = toNumber(upper);
+ upper = upper === upper ? upper : 0;
+ }
+ if (lower !== undefined) {
+ lower = toNumber(lower);
+ lower = lower === lower ? lower : 0;
+ }
+ return baseClamp(toNumber(number), lower, upper);
+ }
+
+ /**
+ * Checks if `n` is between `start` and up to, but not including, `end`. If
+ * `end` is not specified, it's set to `start` with `start` then set to `0`.
+ * If `start` is greater than `end` the params are swapped to support
+ * negative ranges.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.3.0
+ * @category Number
+ * @param {number} number The number to check.
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
+ * @see _.range, _.rangeRight
+ * @example
+ *
+ * _.inRange(3, 2, 4);
+ * // => true
+ *
+ * _.inRange(4, 8);
+ * // => true
+ *
+ * _.inRange(4, 2);
+ * // => false
+ *
+ * _.inRange(2, 2);
+ * // => false
+ *
+ * _.inRange(1.2, 2);
+ * // => true
+ *
+ * _.inRange(5.2, 4);
+ * // => false
+ *
+ * _.inRange(-3, -2, -6);
+ * // => true
+ */
+ function inRange(number, start, end) {
+ start = toFinite(start);
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = toFinite(end);
+ }
+ number = toNumber(number);
+ return baseInRange(number, start, end);
+ }
+
+ /**
+ * Produces a random number between the inclusive `lower` and `upper` bounds.
+ * If only one argument is provided a number between `0` and the given number
+ * is returned. If `floating` is `true`, or either `lower` or `upper` are
+ * floats, a floating-point number is returned instead of an integer.
+ *
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
+ * floating-point values which can produce unexpected results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.7.0
+ * @category Number
+ * @param {number} [lower=0] The lower bound.
+ * @param {number} [upper=1] The upper bound.
+ * @param {boolean} [floating] Specify returning a floating-point number.
+ * @returns {number} Returns the random number.
+ * @example
+ *
+ * _.random(0, 5);
+ * // => an integer between 0 and 5
+ *
+ * _.random(5);
+ * // => also an integer between 0 and 5
+ *
+ * _.random(5, true);
+ * // => a floating-point number between 0 and 5
+ *
+ * _.random(1.2, 5.2);
+ * // => a floating-point number between 1.2 and 5.2
+ */
+ function random(lower, upper, floating) {
+ if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
+ upper = floating = undefined;
+ }
+ if (floating === undefined) {
+ if (typeof upper == 'boolean') {
+ floating = upper;
+ upper = undefined;
+ }
+ else if (typeof lower == 'boolean') {
+ floating = lower;
+ lower = undefined;
+ }
+ }
+ if (lower === undefined && upper === undefined) {
+ lower = 0;
+ upper = 1;
+ }
+ else {
+ lower = toFinite(lower);
+ if (upper === undefined) {
+ upper = lower;
+ lower = 0;
+ } else {
+ upper = toFinite(upper);
+ }
+ }
+ if (lower > upper) {
+ var temp = lower;
+ lower = upper;
+ upper = temp;
+ }
+ if (floating || lower % 1 || upper % 1) {
+ var rand = nativeRandom();
+ return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
+ }
+ return baseRandom(lower, upper);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the camel cased string.
+ * @example
+ *
+ * _.camelCase('Foo Bar');
+ * // => 'fooBar'
+ *
+ * _.camelCase('--foo-bar--');
+ * // => 'fooBar'
+ *
+ * _.camelCase('__FOO_BAR__');
+ * // => 'fooBar'
+ */
+ var camelCase = createCompounder(function(result, word, index) {
+ word = word.toLowerCase();
+ return result + (index ? capitalize(word) : word);
+ });
+
+ /**
+ * Converts the first character of `string` to upper case and the remaining
+ * to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to capitalize.
+ * @returns {string} Returns the capitalized string.
+ * @example
+ *
+ * _.capitalize('FRED');
+ * // => 'Fred'
+ */
+ function capitalize(string) {
+ return upperFirst(toString(string).toLowerCase());
+ }
+
+ /**
+ * Deburrs `string` by converting
+ * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
+ * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
+ * letters to basic Latin letters and removing
+ * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to deburr.
+ * @returns {string} Returns the deburred string.
+ * @example
+ *
+ * _.deburr('déjà vu');
+ * // => 'deja vu'
+ */
+ function deburr(string) {
+ string = toString(string);
+ return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
+ }
+
+ /**
+ * Checks if `string` ends with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=string.length] The position to search up to.
+ * @returns {boolean} Returns `true` if `string` ends with `target`,
+ * else `false`.
+ * @example
+ *
+ * _.endsWith('abc', 'c');
+ * // => true
+ *
+ * _.endsWith('abc', 'b');
+ * // => false
+ *
+ * _.endsWith('abc', 'b', 2);
+ * // => true
+ */
+ function endsWith(string, target, position) {
+ string = toString(string);
+ target = baseToString(target);
+
+ var length = string.length;
+ position = position === undefined
+ ? length
+ : baseClamp(toInteger(position), 0, length);
+
+ var end = position;
+ position -= target.length;
+ return position >= 0 && string.slice(position, end) == target;
+ }
+
+ /**
+ * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
+ * corresponding HTML entities.
+ *
+ * **Note:** No other characters are escaped. To escape additional
+ * characters use a third-party library like [_he_](https://mths.be/he).
+ *
+ * Though the ">" character is escaped for symmetry, characters like
+ * ">" and "/" don't need escaping in HTML and have no special meaning
+ * unless they're part of a tag or unquoted attribute value. See
+ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
+ * (under "semi-related fun fact") for more details.
+ *
+ * When working with HTML you should always
+ * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
+ * XSS vectors.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escape('fred, barney, & pebbles');
+ * // => 'fred, barney, &amp; pebbles'
+ */
+ function escape(string) {
+ string = toString(string);
+ return (string && reHasUnescapedHtml.test(string))
+ ? string.replace(reUnescapedHtml, escapeHtmlChar)
+ : string;
+ }
+
+ /**
+ * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
+ * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escapeRegExp('[lodash](https://lodash.com/)');
+ * // => '\[lodash\]\(https://lodash\.com/\)'
+ */
+ function escapeRegExp(string) {
+ string = toString(string);
+ return (string && reHasRegExpChar.test(string))
+ ? string.replace(reRegExpChar, '\\$&')
+ : string;
+ }
+
+ /**
+ * Converts `string` to
+ * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the kebab cased string.
+ * @example
+ *
+ * _.kebabCase('Foo Bar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('fooBar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('__FOO_BAR__');
+ * // => 'foo-bar'
+ */
+ var kebabCase = createCompounder(function(result, word, index) {
+ return result + (index ? '-' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Converts `string`, as space separated words, to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the lower cased string.
+ * @example
+ *
+ * _.lowerCase('--Foo-Bar--');
+ * // => 'foo bar'
+ *
+ * _.lowerCase('fooBar');
+ * // => 'foo bar'
+ *
+ * _.lowerCase('__FOO_BAR__');
+ * // => 'foo bar'
+ */
+ var lowerCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Converts the first character of `string` to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.lowerFirst('Fred');
+ * // => 'fred'
+ *
+ * _.lowerFirst('FRED');
+ * // => 'fRED'
+ */
+ var lowerFirst = createCaseFirst('toLowerCase');
+
+ /**
+ * Pads `string` on the left and right sides if it's shorter than `length`.
+ * Padding characters are truncated if they can't be evenly divided by `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.pad('abc', 8);
+ * // => ' abc '
+ *
+ * _.pad('abc', 8, '_-');
+ * // => '_-abc_-_'
+ *
+ * _.pad('abc', 3);
+ * // => 'abc'
+ */
+ function pad(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ if (!length || strLength >= length) {
+ return string;
+ }
+ var mid = (length - strLength) / 2;
+ return (
+ createPadding(nativeFloor(mid), chars) +
+ string +
+ createPadding(nativeCeil(mid), chars)
+ );
+ }
+
+ /**
+ * Pads `string` on the right side if it's shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.padEnd('abc', 6);
+ * // => 'abc '
+ *
+ * _.padEnd('abc', 6, '_-');
+ * // => 'abc_-_'
+ *
+ * _.padEnd('abc', 3);
+ * // => 'abc'
+ */
+ function padEnd(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ return (length && strLength < length)
+ ? (string + createPadding(length - strLength, chars))
+ : string;
+ }
+
+ /**
+ * Pads `string` on the left side if it's shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.padStart('abc', 6);
+ * // => ' abc'
+ *
+ * _.padStart('abc', 6, '_-');
+ * // => '_-_abc'
+ *
+ * _.padStart('abc', 3);
+ * // => 'abc'
+ */
+ function padStart(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ return (length && strLength < length)
+ ? (createPadding(length - strLength, chars) + string)
+ : string;
+ }
+
+ /**
+ * Converts `string` to an integer of the specified radix. If `radix` is
+ * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
+ * hexadecimal, in which case a `radix` of `16` is used.
+ *
+ * **Note:** This method aligns with the
+ * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category String
+ * @param {string} string The string to convert.
+ * @param {number} [radix=10] The radix to interpret `value` by.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.parseInt('08');
+ * // => 8
+ *
+ * _.map(['6', '08', '10'], _.parseInt);
+ * // => [6, 8, 10]
+ */
+ function parseInt(string, radix, guard) {
+ if (guard || radix == null) {
+ radix = 0;
+ } else if (radix) {
+ radix = +radix;
+ }
+ return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
+ }
+
+ /**
+ * Repeats the given string `n` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to repeat.
+ * @param {number} [n=1] The number of times to repeat the string.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the repeated string.
+ * @example
+ *
+ * _.repeat('*', 3);
+ * // => '***'
+ *
+ * _.repeat('abc', 2);
+ * // => 'abcabc'
+ *
+ * _.repeat('abc', 0);
+ * // => ''
+ */
+ function repeat(string, n, guard) {
+ if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
+ n = 1;
+ } else {
+ n = toInteger(n);
+ }
+ return baseRepeat(toString(string), n);
+ }
+
+ /**
+ * Replaces matches for `pattern` in `string` with `replacement`.
+ *
+ * **Note:** This method is based on
+ * [`String#replace`](https://mdn.io/String/replace).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to modify.
+ * @param {RegExp|string} pattern The pattern to replace.
+ * @param {Function|string} replacement The match replacement.
+ * @returns {string} Returns the modified string.
+ * @example
+ *
+ * _.replace('Hi Fred', 'Fred', 'Barney');
+ * // => 'Hi Barney'
+ */
+ function replace() {
+ var args = arguments,
+ string = toString(args[0]);
+
+ return args.length < 3 ? string : string.replace(args[1], args[2]);
+ }
+
+ /**
+ * Converts `string` to
+ * [snake case](https://en.wikipedia.org/wiki/Snake_case).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the snake cased string.
+ * @example
+ *
+ * _.snakeCase('Foo Bar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('fooBar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('--FOO-BAR--');
+ * // => 'foo_bar'
+ */
+ var snakeCase = createCompounder(function(result, word, index) {
+ return result + (index ? '_' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Splits `string` by `separator`.
+ *
+ * **Note:** This method is based on
+ * [`String#split`](https://mdn.io/String/split).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to split.
+ * @param {RegExp|string} separator The separator pattern to split by.
+ * @param {number} [limit] The length to truncate results to.
+ * @returns {Array} Returns the string segments.
+ * @example
+ *
+ * _.split('a-b-c', '-', 2);
+ * // => ['a', 'b']
+ */
+ function split(string, separator, limit) {
+ if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
+ separator = limit = undefined;
+ }
+ limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
+ if (!limit) {
+ return [];
+ }
+ string = toString(string);
+ if (string && (
+ typeof separator == 'string' ||
+ (separator != null && !isRegExp(separator))
+ )) {
+ separator = baseToString(separator);
+ if (!separator && hasUnicode(string)) {
+ return castSlice(stringToArray(string), 0, limit);
+ }
+ }
+ return string.split(separator, limit);
+ }
+
+ /**
+ * Converts `string` to
+ * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.1.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the start cased string.
+ * @example
+ *
+ * _.startCase('--foo-bar--');
+ * // => 'Foo Bar'
+ *
+ * _.startCase('fooBar');
+ * // => 'Foo Bar'
+ *
+ * _.startCase('__FOO_BAR__');
+ * // => 'FOO BAR'
+ */
+ var startCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + upperFirst(word);
+ });
+
+ /**
+ * Checks if `string` starts with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=0] The position to search from.
+ * @returns {boolean} Returns `true` if `string` starts with `target`,
+ * else `false`.
+ * @example
+ *
+ * _.startsWith('abc', 'a');
+ * // => true
+ *
+ * _.startsWith('abc', 'b');
+ * // => false
+ *
+ * _.startsWith('abc', 'b', 1);
+ * // => true
+ */
+ function startsWith(string, target, position) {
+ string = toString(string);
+ position = baseClamp(toInteger(position), 0, string.length);
+ target = baseToString(target);
+ return string.slice(position, position + target.length) == target;
+ }
+
+ /**
+ * Creates a compiled template function that can interpolate data properties
+ * in "interpolate" delimiters, HTML-escape interpolated data properties in
+ * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
+ * properties may be accessed as free variables in the template. If a setting
+ * object is given, it takes precedence over `_.templateSettings` values.
+ *
+ * **Note:** In the development build `_.template` utilizes
+ * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
+ * for easier debugging.
+ *
+ * For more information on precompiling templates see
+ * [lodash's custom builds documentation](https://lodash.com/custom-builds).
+ *
+ * For more information on Chrome extension sandboxes see
+ * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The template string.
+ * @param {Object} [options={}] The options object.
+ * @param {RegExp} [options.escape=_.templateSettings.escape]
+ * The HTML "escape" delimiter.
+ * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
+ * The "evaluate" delimiter.
+ * @param {Object} [options.imports=_.templateSettings.imports]
+ * An object to import into the template as free variables.
+ * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
+ * The "interpolate" delimiter.
+ * @param {string} [options.sourceURL='lodash.templateSources[n]']
+ * The sourceURL of the compiled template.
+ * @param {string} [options.variable='obj']
+ * The data object variable name.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the compiled template function.
+ * @example
+ *
+ * // Use the "interpolate" delimiter to create a compiled template.
+ * var compiled = _.template('hello <%= user %>!');
+ * compiled({ 'user': 'fred' });
+ * // => 'hello fred!'
+ *
+ * // Use the HTML "escape" delimiter to escape data property values.
+ * var compiled = _.template('<b><%- value %></b>');
+ * compiled({ 'value': '<script>' });
+ * // => '<b>&lt;script&gt;</b>'
+ *
+ * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
+ * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the internal `print` function in "evaluate" delimiters.
+ * var compiled = _.template('<% print("hello " + user); %>!');
+ * compiled({ 'user': 'barney' });
+ * // => 'hello barney!'
+ *
+ * // Use the ES template literal delimiter as an "interpolate" delimiter.
+ * // Disable support by replacing the "interpolate" delimiter.
+ * var compiled = _.template('hello ${ user }!');
+ * compiled({ 'user': 'pebbles' });
+ * // => 'hello pebbles!'
+ *
+ * // Use backslashes to treat delimiters as plain text.
+ * var compiled = _.template('<%= "\\<%- value %\\>" %>');
+ * compiled({ 'value': 'ignored' });
+ * // => '<%- value %>'
+ *
+ * // Use the `imports` option to import `jQuery` as `jq`.
+ * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
+ * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the `sourceURL` option to specify a custom sourceURL for the template.
+ * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
+ * compiled(data);
+ * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
+ *
+ * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
+ * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
+ * compiled.source;
+ * // => function(data) {
+ * // var __t, __p = '';
+ * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
+ * // return __p;
+ * // }
+ *
+ * // Use custom template delimiters.
+ * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
+ * var compiled = _.template('hello {{ user }}!');
+ * compiled({ 'user': 'mustache' });
+ * // => 'hello mustache!'
+ *
+ * // Use the `source` property to inline compiled templates for meaningful
+ * // line numbers in error messages and stack traces.
+ * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
+ * var JST = {\
+ * "main": ' + _.template(mainText).source + '\
+ * };\
+ * ');
+ */
+ function template(string, options, guard) {
+ // Based on John Resig's `tmpl` implementation
+ // (http://ejohn.org/blog/javascript-micro-templating/)
+ // and Laura Doktorova's doT.js (https://github.com/olado/doT).
+ var settings = lodash.templateSettings;
+
+ if (guard && isIterateeCall(string, options, guard)) {
+ options = undefined;
+ }
+ string = toString(string);
+ options = assignInWith({}, options, settings, assignInDefaults);
+
+ var imports = assignInWith({}, options.imports, settings.imports, assignInDefaults),
+ importsKeys = keys(imports),
+ importsValues = baseValues(imports, importsKeys);
+
+ var isEscaping,
+ isEvaluating,
+ index = 0,
+ interpolate = options.interpolate || reNoMatch,
+ source = "__p += '";
+
+ // Compile the regexp to match each delimiter.
+ var reDelimiters = RegExp(
+ (options.escape || reNoMatch).source + '|' +
+ interpolate.source + '|' +
+ (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
+ (options.evaluate || reNoMatch).source + '|$'
+ , 'g');
+
+ // Use a sourceURL for easier debugging.
+ var sourceURL = '//# sourceURL=' +
+ ('sourceURL' in options
+ ? options.sourceURL
+ : ('lodash.templateSources[' + (++templateCounter) + ']')
+ ) + '\n';
+
+ string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
+ interpolateValue || (interpolateValue = esTemplateValue);
+
+ // Escape characters that can't be included in string literals.
+ source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
+
+ // Replace delimiters with snippets.
+ if (escapeValue) {
+ isEscaping = true;
+ source += "' +\n__e(" + escapeValue + ") +\n'";
+ }
+ if (evaluateValue) {
+ isEvaluating = true;
+ source += "';\n" + evaluateValue + ";\n__p += '";
+ }
+ if (interpolateValue) {
+ source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
+ }
+ index = offset + match.length;
+
+ // The JS engine embedded in Adobe products needs `match` returned in
+ // order to produce the correct `offset` value.
+ return match;
+ });
+
+ source += "';\n";
+
+ // If `variable` is not specified wrap a with-statement around the generated
+ // code to add the data object to the top of the scope chain.
+ var variable = options.variable;
+ if (!variable) {
+ source = 'with (obj) {\n' + source + '\n}\n';
+ }
+ // Cleanup code by stripping empty strings.
+ source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
+ .replace(reEmptyStringMiddle, '$1')
+ .replace(reEmptyStringTrailing, '$1;');
+
+ // Frame code as the function body.
+ source = 'function(' + (variable || 'obj') + ') {\n' +
+ (variable
+ ? ''
+ : 'obj || (obj = {});\n'
+ ) +
+ "var __t, __p = ''" +
+ (isEscaping
+ ? ', __e = _.escape'
+ : ''
+ ) +
+ (isEvaluating
+ ? ', __j = Array.prototype.join;\n' +
+ "function print() { __p += __j.call(arguments, '') }\n"
+ : ';\n'
+ ) +
+ source +
+ 'return __p\n}';
+
+ var result = attempt(function() {
+ return Function(importsKeys, sourceURL + 'return ' + source)
+ .apply(undefined, importsValues);
+ });
+
+ // Provide the compiled function's source by its `toString` method or
+ // the `source` property as a convenience for inlining compiled templates.
+ result.source = source;
+ if (isError(result)) {
+ throw result;
+ }
+ return result;
+ }
+
+ /**
+ * Converts `string`, as a whole, to lower case just like
+ * [String#toLowerCase](https://mdn.io/toLowerCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the lower cased string.
+ * @example
+ *
+ * _.toLower('--Foo-Bar--');
+ * // => '--foo-bar--'
+ *
+ * _.toLower('fooBar');
+ * // => 'foobar'
+ *
+ * _.toLower('__FOO_BAR__');
+ * // => '__foo_bar__'
+ */
+ function toLower(value) {
+ return toString(value).toLowerCase();
+ }
+
+ /**
+ * Converts `string`, as a whole, to upper case just like
+ * [String#toUpperCase](https://mdn.io/toUpperCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the upper cased string.
+ * @example
+ *
+ * _.toUpper('--foo-bar--');
+ * // => '--FOO-BAR--'
+ *
+ * _.toUpper('fooBar');
+ * // => 'FOOBAR'
+ *
+ * _.toUpper('__foo_bar__');
+ * // => '__FOO_BAR__'
+ */
+ function toUpper(value) {
+ return toString(value).toUpperCase();
+ }
+
+ /**
+ * Removes leading and trailing whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trim(' abc ');
+ * // => 'abc'
+ *
+ * _.trim('-_-abc-_-', '_-');
+ * // => 'abc'
+ *
+ * _.map([' foo ', ' bar '], _.trim);
+ * // => ['foo', 'bar']
+ */
+ function trim(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrim, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ chrSymbols = stringToArray(chars),
+ start = charsStartIndex(strSymbols, chrSymbols),
+ end = charsEndIndex(strSymbols, chrSymbols) + 1;
+
+ return castSlice(strSymbols, start, end).join('');
+ }
+
+ /**
+ * Removes trailing whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trimEnd(' abc ');
+ * // => ' abc'
+ *
+ * _.trimEnd('-_-abc-_-', '_-');
+ * // => '-_-abc'
+ */
+ function trimEnd(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrimEnd, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
+
+ return castSlice(strSymbols, 0, end).join('');
+ }
+
+ /**
+ * Removes leading whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trimStart(' abc ');
+ * // => 'abc '
+ *
+ * _.trimStart('-_-abc-_-', '_-');
+ * // => 'abc-_-'
+ */
+ function trimStart(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrimStart, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ start = charsStartIndex(strSymbols, stringToArray(chars));
+
+ return castSlice(strSymbols, start).join('');
+ }
+
+ /**
+ * Truncates `string` if it's longer than the given maximum string length.
+ * The last characters of the truncated string are replaced with the omission
+ * string which defaults to "...".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to truncate.
+ * @param {Object} [options={}] The options object.
+ * @param {number} [options.length=30] The maximum string length.
+ * @param {string} [options.omission='...'] The string to indicate text is omitted.
+ * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
+ * @returns {string} Returns the truncated string.
+ * @example
+ *
+ * _.truncate('hi-diddly-ho there, neighborino');
+ * // => 'hi-diddly-ho there, neighbo...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'length': 24,
+ * 'separator': ' '
+ * });
+ * // => 'hi-diddly-ho there,...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'length': 24,
+ * 'separator': /,? +/
+ * });
+ * // => 'hi-diddly-ho there...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'omission': ' [...]'
+ * });
+ * // => 'hi-diddly-ho there, neig [...]'
+ */
+ function truncate(string, options) {
+ var length = DEFAULT_TRUNC_LENGTH,
+ omission = DEFAULT_TRUNC_OMISSION;
+
+ if (isObject(options)) {
+ var separator = 'separator' in options ? options.separator : separator;
+ length = 'length' in options ? toInteger(options.length) : length;
+ omission = 'omission' in options ? baseToString(options.omission) : omission;
+ }
+ string = toString(string);
+
+ var strLength = string.length;
+ if (hasUnicode(string)) {
+ var strSymbols = stringToArray(string);
+ strLength = strSymbols.length;
+ }
+ if (length >= strLength) {
+ return string;
+ }
+ var end = length - stringSize(omission);
+ if (end < 1) {
+ return omission;
+ }
+ var result = strSymbols
+ ? castSlice(strSymbols, 0, end).join('')
+ : string.slice(0, end);
+
+ if (separator === undefined) {
+ return result + omission;
+ }
+ if (strSymbols) {
+ end += (result.length - end);
+ }
+ if (isRegExp(separator)) {
+ if (string.slice(end).search(separator)) {
+ var match,
+ substring = result;
+
+ if (!separator.global) {
+ separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
+ }
+ separator.lastIndex = 0;
+ while ((match = separator.exec(substring))) {
+ var newEnd = match.index;
+ }
+ result = result.slice(0, newEnd === undefined ? end : newEnd);
+ }
+ } else if (string.indexOf(baseToString(separator), end) != end) {
+ var index = result.lastIndexOf(separator);
+ if (index > -1) {
+ result = result.slice(0, index);
+ }
+ }
+ return result + omission;
+ }
+
+ /**
+ * The inverse of `_.escape`; this method converts the HTML entities
+ * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
+ * their corresponding characters.
+ *
+ * **Note:** No other HTML entities are unescaped. To unescape additional
+ * HTML entities use a third-party library like [_he_](https://mths.be/he).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.6.0
+ * @category String
+ * @param {string} [string=''] The string to unescape.
+ * @returns {string} Returns the unescaped string.
+ * @example
+ *
+ * _.unescape('fred, barney, &amp; pebbles');
+ * // => 'fred, barney, & pebbles'
+ */
+ function unescape(string) {
+ string = toString(string);
+ return (string && reHasEscapedHtml.test(string))
+ ? string.replace(reEscapedHtml, unescapeHtmlChar)
+ : string;
+ }
+
+ /**
+ * Converts `string`, as space separated words, to upper case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the upper cased string.
+ * @example
+ *
+ * _.upperCase('--foo-bar');
+ * // => 'FOO BAR'
+ *
+ * _.upperCase('fooBar');
+ * // => 'FOO BAR'
+ *
+ * _.upperCase('__foo_bar__');
+ * // => 'FOO BAR'
+ */
+ var upperCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + word.toUpperCase();
+ });
+
+ /**
+ * Converts the first character of `string` to upper case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.upperFirst('fred');
+ * // => 'Fred'
+ *
+ * _.upperFirst('FRED');
+ * // => 'FRED'
+ */
+ var upperFirst = createCaseFirst('toUpperCase');
+
+ /**
+ * Splits `string` into an array of its words.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {RegExp|string} [pattern] The pattern to match words.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the words of `string`.
+ * @example
+ *
+ * _.words('fred, barney, & pebbles');
+ * // => ['fred', 'barney', 'pebbles']
+ *
+ * _.words('fred, barney, & pebbles', /[^, ]+/g);
+ * // => ['fred', 'barney', '&', 'pebbles']
+ */
+ function words(string, pattern, guard) {
+ string = toString(string);
+ pattern = guard ? undefined : pattern;
+
+ if (pattern === undefined) {
+ return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
+ }
+ return string.match(pattern) || [];
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Attempts to invoke `func`, returning either the result or the caught error
+ * object. Any additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Function} func The function to attempt.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {*} Returns the `func` result or error object.
+ * @example
+ *
+ * // Avoid throwing errors for invalid selectors.
+ * var elements = _.attempt(function(selector) {
+ * return document.querySelectorAll(selector);
+ * }, '>_>');
+ *
+ * if (_.isError(elements)) {
+ * elements = [];
+ * }
+ */
+ var attempt = baseRest(function(func, args) {
+ try {
+ return apply(func, undefined, args);
+ } catch (e) {
+ return isError(e) ? e : new Error(e);
+ }
+ });
+
+ /**
+ * Binds methods of an object to the object itself, overwriting the existing
+ * method.
+ *
+ * **Note:** This method doesn't set the "length" property of bound functions.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Object} object The object to bind and assign the bound methods to.
+ * @param {...(string|string[])} methodNames The object method names to bind.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var view = {
+ * 'label': 'docs',
+ * 'click': function() {
+ * console.log('clicked ' + this.label);
+ * }
+ * };
+ *
+ * _.bindAll(view, ['click']);
+ * jQuery(element).on('click', view.click);
+ * // => Logs 'clicked docs' when clicked.
+ */
+ var bindAll = flatRest(function(object, methodNames) {
+ arrayEach(methodNames, function(key) {
+ key = toKey(key);
+ baseAssignValue(object, key, bind(object[key], object));
+ });
+ return object;
+ });
+
+ /**
+ * Creates a function that iterates over `pairs` and invokes the corresponding
+ * function of the first predicate to return truthy. The predicate-function
+ * pairs are invoked with the `this` binding and arguments of the created
+ * function.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {Array} pairs The predicate-function pairs.
+ * @returns {Function} Returns the new composite function.
+ * @example
+ *
+ * var func = _.cond([
+ * [_.matches({ 'a': 1 }), _.constant('matches A')],
+ * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
+ * [_.stubTrue, _.constant('no match')]
+ * ]);
+ *
+ * func({ 'a': 1, 'b': 2 });
+ * // => 'matches A'
+ *
+ * func({ 'a': 0, 'b': 1 });
+ * // => 'matches B'
+ *
+ * func({ 'a': '1', 'b': '2' });
+ * // => 'no match'
+ */
+ function cond(pairs) {
+ var length = pairs == null ? 0 : pairs.length,
+ toIteratee = getIteratee();
+
+ pairs = !length ? [] : arrayMap(pairs, function(pair) {
+ if (typeof pair[1] != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return [toIteratee(pair[0]), pair[1]];
+ });
+
+ return baseRest(function(args) {
+ var index = -1;
+ while (++index < length) {
+ var pair = pairs[index];
+ if (apply(pair[0], this, args)) {
+ return apply(pair[1], this, args);
+ }
+ }
+ });
+ }
+
+ /**
+ * Creates a function that invokes the predicate properties of `source` with
+ * the corresponding property values of a given object, returning `true` if
+ * all predicates return truthy, else `false`.
+ *
+ * **Note:** The created function is equivalent to `_.conformsTo` with
+ * `source` partially applied.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 2, 'b': 1 },
+ * { 'a': 1, 'b': 2 }
+ * ];
+ *
+ * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
+ * // => [{ 'a': 1, 'b': 2 }]
+ */
+ function conforms(source) {
+ return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
+ }
+
+ /**
+ * Creates a function that returns `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {*} value The value to return from the new function.
+ * @returns {Function} Returns the new constant function.
+ * @example
+ *
+ * var objects = _.times(2, _.constant({ 'a': 1 }));
+ *
+ * console.log(objects);
+ * // => [{ 'a': 1 }, { 'a': 1 }]
+ *
+ * console.log(objects[0] === objects[1]);
+ * // => true
+ */
+ function constant(value) {
+ return function() {
+ return value;
+ };
+ }
+
+ /**
+ * Checks `value` to determine whether a default value should be returned in
+ * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
+ * or `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.14.0
+ * @category Util
+ * @param {*} value The value to check.
+ * @param {*} defaultValue The default value.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * _.defaultTo(1, 10);
+ * // => 1
+ *
+ * _.defaultTo(undefined, 10);
+ * // => 10
+ */
+ function defaultTo(value, defaultValue) {
+ return (value == null || value !== value) ? defaultValue : value;
+ }
+
+ /**
+ * Creates a function that returns the result of invoking the given functions
+ * with the `this` binding of the created function, where each successive
+ * invocation is supplied the return value of the previous.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [funcs] The functions to invoke.
+ * @returns {Function} Returns the new composite function.
+ * @see _.flowRight
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var addSquare = _.flow([_.add, square]);
+ * addSquare(1, 2);
+ * // => 9
+ */
+ var flow = createFlow();
+
+ /**
+ * This method is like `_.flow` except that it creates a function that
+ * invokes the given functions from right to left.
+ *
+ * @static
+ * @since 3.0.0
+ * @memberOf _
+ * @category Util
+ * @param {...(Function|Function[])} [funcs] The functions to invoke.
+ * @returns {Function} Returns the new composite function.
+ * @see _.flow
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var addSquare = _.flowRight([square, _.add]);
+ * addSquare(1, 2);
+ * // => 9
+ */
+ var flowRight = createFlow(true);
+
+ /**
+ * This method returns the first argument it receives.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ *
+ * console.log(_.identity(object) === object);
+ * // => true
+ */
+ function identity(value) {
+ return value;
+ }
+
+ /**
+ * Creates a function that invokes `func` with the arguments of the created
+ * function. If `func` is a property name, the created function returns the
+ * property value for a given element. If `func` is an array or object, the
+ * created function returns `true` for elements that contain the equivalent
+ * source properties, otherwise it returns `false`.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Util
+ * @param {*} [func=_.identity] The value to convert to a callback.
+ * @returns {Function} Returns the callback.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
+ * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, _.iteratee(['user', 'fred']));
+ * // => [{ 'user': 'fred', 'age': 40 }]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, _.iteratee('user'));
+ * // => ['barney', 'fred']
+ *
+ * // Create custom iteratee shorthands.
+ * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
+ * return !_.isRegExp(func) ? iteratee(func) : function(string) {
+ * return func.test(string);
+ * };
+ * });
+ *
+ * _.filter(['abc', 'def'], /ef/);
+ * // => ['def']
+ */
+ function iteratee(func) {
+ return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
+ }
+
+ /**
+ * Creates a function that performs a partial deep comparison between a given
+ * object and `source`, returning `true` if the given object has equivalent
+ * property values, else `false`.
+ *
+ * **Note:** The created function is equivalent to `_.isMatch` with `source`
+ * partially applied.
+ *
+ * Partial comparisons will match empty array and empty object `source`
+ * values against any array or object value, respectively. See `_.isEqual`
+ * for a list of supported value comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 1, 'b': 2, 'c': 3 },
+ * { 'a': 4, 'b': 5, 'c': 6 }
+ * ];
+ *
+ * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
+ * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
+ */
+ function matches(source) {
+ return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
+ }
+
+ /**
+ * Creates a function that performs a partial deep comparison between the
+ * value at `path` of a given object to `srcValue`, returning `true` if the
+ * object value is equivalent, else `false`.
+ *
+ * **Note:** Partial comparisons will match empty array and empty object
+ * `srcValue` values against any array or object value, respectively. See
+ * `_.isEqual` for a list of supported value comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 1, 'b': 2, 'c': 3 },
+ * { 'a': 4, 'b': 5, 'c': 6 }
+ * ];
+ *
+ * _.find(objects, _.matchesProperty('a', 4));
+ * // => { 'a': 4, 'b': 5, 'c': 6 }
+ */
+ function matchesProperty(path, srcValue) {
+ return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
+ }
+
+ /**
+ * Creates a function that invokes the method at `path` of a given object.
+ * Any additional arguments are provided to the invoked method.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Util
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Function} Returns the new invoker function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': _.constant(2) } },
+ * { 'a': { 'b': _.constant(1) } }
+ * ];
+ *
+ * _.map(objects, _.method('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(objects, _.method(['a', 'b']));
+ * // => [2, 1]
+ */
+ var method = baseRest(function(path, args) {
+ return function(object) {
+ return baseInvoke(object, path, args);
+ };
+ });
+
+ /**
+ * The opposite of `_.method`; this method creates a function that invokes
+ * the method at a given path of `object`. Any additional arguments are
+ * provided to the invoked method.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Util
+ * @param {Object} object The object to query.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Function} Returns the new invoker function.
+ * @example
+ *
+ * var array = _.times(3, _.constant),
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.methodOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
+ * // => [2, 0]
+ */
+ var methodOf = baseRest(function(object, args) {
+ return function(path) {
+ return baseInvoke(object, path, args);
+ };
+ });
+
+ /**
+ * Adds all own enumerable string keyed function properties of a source
+ * object to the destination object. If `object` is a function, then methods
+ * are added to its prototype as well.
+ *
+ * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
+ * avoid conflicts caused by modifying the original.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Function|Object} [object=lodash] The destination object.
+ * @param {Object} source The object of functions to add.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
+ * @returns {Function|Object} Returns `object`.
+ * @example
+ *
+ * function vowels(string) {
+ * return _.filter(string, function(v) {
+ * return /[aeiou]/i.test(v);
+ * });
+ * }
+ *
+ * _.mixin({ 'vowels': vowels });
+ * _.vowels('fred');
+ * // => ['e']
+ *
+ * _('fred').vowels().value();
+ * // => ['e']
+ *
+ * _.mixin({ 'vowels': vowels }, { 'chain': false });
+ * _('fred').vowels();
+ * // => ['e']
+ */
+ function mixin(object, source, options) {
+ var props = keys(source),
+ methodNames = baseFunctions(source, props);
+
+ if (options == null &&
+ !(isObject(source) && (methodNames.length || !props.length))) {
+ options = source;
+ source = object;
+ object = this;
+ methodNames = baseFunctions(source, keys(source));
+ }
+ var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
+ isFunc = isFunction(object);
+
+ arrayEach(methodNames, function(methodName) {
+ var func = source[methodName];
+ object[methodName] = func;
+ if (isFunc) {
+ object.prototype[methodName] = function() {
+ var chainAll = this.__chain__;
+ if (chain || chainAll) {
+ var result = object(this.__wrapped__),
+ actions = result.__actions__ = copyArray(this.__actions__);
+
+ actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
+ result.__chain__ = chainAll;
+ return result;
+ }
+ return func.apply(object, arrayPush([this.value()], arguments));
+ };
+ }
+ });
+
+ return object;
+ }
+
+ /**
+ * Reverts the `_` variable to its previous value and returns a reference to
+ * the `lodash` function.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @returns {Function} Returns the `lodash` function.
+ * @example
+ *
+ * var lodash = _.noConflict();
+ */
+ function noConflict() {
+ if (root._ === this) {
+ root._ = oldDash;
+ }
+ return this;
+ }
+
+ /**
+ * This method returns `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Util
+ * @example
+ *
+ * _.times(2, _.noop);
+ * // => [undefined, undefined]
+ */
+ function noop() {
+ // No operation performed.
+ }
+
+ /**
+ * Creates a function that gets the argument at index `n`. If `n` is negative,
+ * the nth argument from the end is returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {number} [n=0] The index of the argument to return.
+ * @returns {Function} Returns the new pass-thru function.
+ * @example
+ *
+ * var func = _.nthArg(1);
+ * func('a', 'b', 'c', 'd');
+ * // => 'b'
+ *
+ * var func = _.nthArg(-2);
+ * func('a', 'b', 'c', 'd');
+ * // => 'c'
+ */
+ function nthArg(n) {
+ n = toInteger(n);
+ return baseRest(function(args) {
+ return baseNth(args, n);
+ });
+ }
+
+ /**
+ * Creates a function that invokes `iteratees` with the arguments it receives
+ * and returns their results.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to invoke.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.over([Math.max, Math.min]);
+ *
+ * func(1, 2, 3, 4);
+ * // => [4, 1]
+ */
+ var over = createOver(arrayMap);
+
+ /**
+ * Creates a function that checks if **all** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [predicates=[_.identity]]
+ * The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overEvery([Boolean, isFinite]);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => false
+ *
+ * func(NaN);
+ * // => false
+ */
+ var overEvery = createOver(arrayEvery);
+
+ /**
+ * Creates a function that checks if **any** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [predicates=[_.identity]]
+ * The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overSome([Boolean, isFinite]);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => true
+ *
+ * func(NaN);
+ * // => false
+ */
+ var overSome = createOver(arraySome);
+
+ /**
+ * Creates a function that returns the value at `path` of a given object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': 2 } },
+ * { 'a': { 'b': 1 } }
+ * ];
+ *
+ * _.map(objects, _.property('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
+ * // => [1, 2]
+ */
+ function property(path) {
+ return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
+ }
+
+ /**
+ * The opposite of `_.property`; this method creates a function that returns
+ * the value at a given path of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ * @example
+ *
+ * var array = [0, 1, 2],
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
+ * // => [2, 0]
+ */
+ function propertyOf(object) {
+ return function(path) {
+ return object == null ? undefined : baseGet(object, path);
+ };
+ }
+
+ /**
+ * Creates an array of numbers (positive and/or negative) progressing from
+ * `start` up to, but not including, `end`. A step of `-1` is used if a negative
+ * `start` is specified without an `end` or `step`. If `end` is not specified,
+ * it's set to `start` with `start` then set to `0`.
+ *
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
+ * floating-point values which can produce unexpected results.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the range of numbers.
+ * @see _.inRange, _.rangeRight
+ * @example
+ *
+ * _.range(4);
+ * // => [0, 1, 2, 3]
+ *
+ * _.range(-4);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 5);
+ * // => [1, 2, 3, 4]
+ *
+ * _.range(0, 20, 5);
+ * // => [0, 5, 10, 15]
+ *
+ * _.range(0, -4, -1);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.range(0);
+ * // => []
+ */
+ var range = createRange();
+
+ /**
+ * This method is like `_.range` except that it populates values in
+ * descending order.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the range of numbers.
+ * @see _.inRange, _.range
+ * @example
+ *
+ * _.rangeRight(4);
+ * // => [3, 2, 1, 0]
+ *
+ * _.rangeRight(-4);
+ * // => [-3, -2, -1, 0]
+ *
+ * _.rangeRight(1, 5);
+ * // => [4, 3, 2, 1]
+ *
+ * _.rangeRight(0, 20, 5);
+ * // => [15, 10, 5, 0]
+ *
+ * _.rangeRight(0, -4, -1);
+ * // => [-3, -2, -1, 0]
+ *
+ * _.rangeRight(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.rangeRight(0);
+ * // => []
+ */
+ var rangeRight = createRange(true);
+
+ /**
+ * This method returns a new empty array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Array} Returns the new empty array.
+ * @example
+ *
+ * var arrays = _.times(2, _.stubArray);
+ *
+ * console.log(arrays);
+ * // => [[], []]
+ *
+ * console.log(arrays[0] === arrays[1]);
+ * // => false
+ */
+ function stubArray() {
+ return [];
+ }
+
+ /**
+ * This method returns `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `false`.
+ * @example
+ *
+ * _.times(2, _.stubFalse);
+ * // => [false, false]
+ */
+ function stubFalse() {
+ return false;
+ }
+
+ /**
+ * This method returns a new empty object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Object} Returns the new empty object.
+ * @example
+ *
+ * var objects = _.times(2, _.stubObject);
+ *
+ * console.log(objects);
+ * // => [{}, {}]
+ *
+ * console.log(objects[0] === objects[1]);
+ * // => false
+ */
+ function stubObject() {
+ return {};
+ }
+
+ /**
+ * This method returns an empty string.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {string} Returns the empty string.
+ * @example
+ *
+ * _.times(2, _.stubString);
+ * // => ['', '']
+ */
+ function stubString() {
+ return '';
+ }
+
+ /**
+ * This method returns `true`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `true`.
+ * @example
+ *
+ * _.times(2, _.stubTrue);
+ * // => [true, true]
+ */
+ function stubTrue() {
+ return true;
+ }
+
+ /**
+ * Invokes the iteratee `n` times, returning an array of the results of
+ * each invocation. The iteratee is invoked with one argument; (index).
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.times(3, String);
+ * // => ['0', '1', '2']
+ *
+ * _.times(4, _.constant(0));
+ * // => [0, 0, 0, 0]
+ */
+ function times(n, iteratee) {
+ n = toInteger(n);
+ if (n < 1 || n > MAX_SAFE_INTEGER) {
+ return [];
+ }
+ var index = MAX_ARRAY_LENGTH,
+ length = nativeMin(n, MAX_ARRAY_LENGTH);
+
+ iteratee = getIteratee(iteratee);
+ n -= MAX_ARRAY_LENGTH;
+
+ var result = baseTimes(length, iteratee);
+ while (++index < n) {
+ iteratee(index);
+ }
+ return result;
+ }
+
+ /**
+ * Converts `value` to a property path array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the new property path array.
+ * @example
+ *
+ * _.toPath('a.b.c');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toPath('a[0].b.c');
+ * // => ['a', '0', 'b', 'c']
+ */
+ function toPath(value) {
+ if (isArray(value)) {
+ return arrayMap(value, toKey);
+ }
+ return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
+ }
+
+ /**
+ * Generates a unique ID. If `prefix` is given, the ID is appended to it.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {string} [prefix=''] The value to prefix the ID with.
+ * @returns {string} Returns the unique ID.
+ * @example
+ *
+ * _.uniqueId('contact_');
+ * // => 'contact_104'
+ *
+ * _.uniqueId();
+ * // => '105'
+ */
+ function uniqueId(prefix) {
+ var id = ++idCounter;
+ return toString(prefix) + id;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Adds two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.4.0
+ * @category Math
+ * @param {number} augend The first number in an addition.
+ * @param {number} addend The second number in an addition.
+ * @returns {number} Returns the total.
+ * @example
+ *
+ * _.add(6, 4);
+ * // => 10
+ */
+ var add = createMathOperation(function(augend, addend) {
+ return augend + addend;
+ }, 0);
+
+ /**
+ * Computes `number` rounded up to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round up.
+ * @param {number} [precision=0] The precision to round up to.
+ * @returns {number} Returns the rounded up number.
+ * @example
+ *
+ * _.ceil(4.006);
+ * // => 5
+ *
+ * _.ceil(6.004, 2);
+ * // => 6.01
+ *
+ * _.ceil(6040, -2);
+ * // => 6100
+ */
+ var ceil = createRound('ceil');
+
+ /**
+ * Divide two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {number} dividend The first number in a division.
+ * @param {number} divisor The second number in a division.
+ * @returns {number} Returns the quotient.
+ * @example
+ *
+ * _.divide(6, 4);
+ * // => 1.5
+ */
+ var divide = createMathOperation(function(dividend, divisor) {
+ return dividend / divisor;
+ }, 1);
+
+ /**
+ * Computes `number` rounded down to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round down.
+ * @param {number} [precision=0] The precision to round down to.
+ * @returns {number} Returns the rounded down number.
+ * @example
+ *
+ * _.floor(4.006);
+ * // => 4
+ *
+ * _.floor(0.046, 2);
+ * // => 0.04
+ *
+ * _.floor(4060, -2);
+ * // => 4000
+ */
+ var floor = createRound('floor');
+
+ /**
+ * Computes the maximum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * _.max([4, 2, 8, 6]);
+ * // => 8
+ *
+ * _.max([]);
+ * // => undefined
+ */
+ function max(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseGt)
+ : undefined;
+ }
+
+ /**
+ * This method is like `_.max` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.maxBy(objects, function(o) { return o.n; });
+ * // => { 'n': 2 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.maxBy(objects, 'n');
+ * // => { 'n': 2 }
+ */
+ function maxBy(array, iteratee) {
+ return (array && array.length)
+ ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
+ : undefined;
+ }
+
+ /**
+ * Computes the mean of the values in `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {number} Returns the mean.
+ * @example
+ *
+ * _.mean([4, 2, 8, 6]);
+ * // => 5
+ */
+ function mean(array) {
+ return baseMean(array, identity);
+ }
+
+ /**
+ * This method is like `_.mean` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the value to be averaged.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the mean.
+ * @example
+ *
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+ *
+ * _.meanBy(objects, function(o) { return o.n; });
+ * // => 5
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.meanBy(objects, 'n');
+ * // => 5
+ */
+ function meanBy(array, iteratee) {
+ return baseMean(array, getIteratee(iteratee, 2));
+ }
+
+ /**
+ * Computes the minimum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * _.min([4, 2, 8, 6]);
+ * // => 2
+ *
+ * _.min([]);
+ * // => undefined
+ */
+ function min(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseLt)
+ : undefined;
+ }
+
+ /**
+ * This method is like `_.min` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.minBy(objects, function(o) { return o.n; });
+ * // => { 'n': 1 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.minBy(objects, 'n');
+ * // => { 'n': 1 }
+ */
+ function minBy(array, iteratee) {
+ return (array && array.length)
+ ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
+ : undefined;
+ }
+
+ /**
+ * Multiply two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {number} multiplier The first number in a multiplication.
+ * @param {number} multiplicand The second number in a multiplication.
+ * @returns {number} Returns the product.
+ * @example
+ *
+ * _.multiply(6, 4);
+ * // => 24
+ */
+ var multiply = createMathOperation(function(multiplier, multiplicand) {
+ return multiplier * multiplicand;
+ }, 1);
+
+ /**
+ * Computes `number` rounded to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round.
+ * @param {number} [precision=0] The precision to round to.
+ * @returns {number} Returns the rounded number.
+ * @example
+ *
+ * _.round(4.006);
+ * // => 4
+ *
+ * _.round(4.006, 2);
+ * // => 4.01
+ *
+ * _.round(4060, -2);
+ * // => 4100
+ */
+ var round = createRound('round');
+
+ /**
+ * Subtract two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {number} minuend The first number in a subtraction.
+ * @param {number} subtrahend The second number in a subtraction.
+ * @returns {number} Returns the difference.
+ * @example
+ *
+ * _.subtract(6, 4);
+ * // => 2
+ */
+ var subtract = createMathOperation(function(minuend, subtrahend) {
+ return minuend - subtrahend;
+ }, 0);
+
+ /**
+ * Computes the sum of the values in `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.4.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {number} Returns the sum.
+ * @example
+ *
+ * _.sum([4, 2, 8, 6]);
+ * // => 20
+ */
+ function sum(array) {
+ return (array && array.length)
+ ? baseSum(array, identity)
+ : 0;
+ }
+
+ /**
+ * This method is like `_.sum` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the value to be summed.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the sum.
+ * @example
+ *
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+ *
+ * _.sumBy(objects, function(o) { return o.n; });
+ * // => 20
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sumBy(objects, 'n');
+ * // => 20
+ */
+ function sumBy(array, iteratee) {
+ return (array && array.length)
+ ? baseSum(array, getIteratee(iteratee, 2))
+ : 0;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return wrapped values in chain sequences.
+ lodash.after = after;
+ lodash.ary = ary;
+ lodash.assign = assign;
+ lodash.assignIn = assignIn;
+ lodash.assignInWith = assignInWith;
+ lodash.assignWith = assignWith;
+ lodash.at = at;
+ lodash.before = before;
+ lodash.bind = bind;
+ lodash.bindAll = bindAll;
+ lodash.bindKey = bindKey;
+ lodash.castArray = castArray;
+ lodash.chain = chain;
+ lodash.chunk = chunk;
+ lodash.compact = compact;
+ lodash.concat = concat;
+ lodash.cond = cond;
+ lodash.conforms = conforms;
+ lodash.constant = constant;
+ lodash.countBy = countBy;
+ lodash.create = create;
+ lodash.curry = curry;
+ lodash.curryRight = curryRight;
+ lodash.debounce = debounce;
+ lodash.defaults = defaults;
+ lodash.defaultsDeep = defaultsDeep;
+ lodash.defer = defer;
+ lodash.delay = delay;
+ lodash.difference = difference;
+ lodash.differenceBy = differenceBy;
+ lodash.differenceWith = differenceWith;
+ lodash.drop = drop;
+ lodash.dropRight = dropRight;
+ lodash.dropRightWhile = dropRightWhile;
+ lodash.dropWhile = dropWhile;
+ lodash.fill = fill;
+ lodash.filter = filter;
+ lodash.flatMap = flatMap;
+ lodash.flatMapDeep = flatMapDeep;
+ lodash.flatMapDepth = flatMapDepth;
+ lodash.flatten = flatten;
+ lodash.flattenDeep = flattenDeep;
+ lodash.flattenDepth = flattenDepth;
+ lodash.flip = flip;
+ lodash.flow = flow;
+ lodash.flowRight = flowRight;
+ lodash.fromPairs = fromPairs;
+ lodash.functions = functions;
+ lodash.functionsIn = functionsIn;
+ lodash.groupBy = groupBy;
+ lodash.initial = initial;
+ lodash.intersection = intersection;
+ lodash.intersectionBy = intersectionBy;
+ lodash.intersectionWith = intersectionWith;
+ lodash.invert = invert;
+ lodash.invertBy = invertBy;
+ lodash.invokeMap = invokeMap;
+ lodash.iteratee = iteratee;
+ lodash.keyBy = keyBy;
+ lodash.keys = keys;
+ lodash.keysIn = keysIn;
+ lodash.map = map;
+ lodash.mapKeys = mapKeys;
+ lodash.mapValues = mapValues;
+ lodash.matches = matches;
+ lodash.matchesProperty = matchesProperty;
+ lodash.memoize = memoize;
+ lodash.merge = merge;
+ lodash.mergeWith = mergeWith;
+ lodash.method = method;
+ lodash.methodOf = methodOf;
+ lodash.mixin = mixin;
+ lodash.negate = negate;
+ lodash.nthArg = nthArg;
+ lodash.omit = omit;
+ lodash.omitBy = omitBy;
+ lodash.once = once;
+ lodash.orderBy = orderBy;
+ lodash.over = over;
+ lodash.overArgs = overArgs;
+ lodash.overEvery = overEvery;
+ lodash.overSome = overSome;
+ lodash.partial = partial;
+ lodash.partialRight = partialRight;
+ lodash.partition = partition;
+ lodash.pick = pick;
+ lodash.pickBy = pickBy;
+ lodash.property = property;
+ lodash.propertyOf = propertyOf;
+ lodash.pull = pull;
+ lodash.pullAll = pullAll;
+ lodash.pullAllBy = pullAllBy;
+ lodash.pullAllWith = pullAllWith;
+ lodash.pullAt = pullAt;
+ lodash.range = range;
+ lodash.rangeRight = rangeRight;
+ lodash.rearg = rearg;
+ lodash.reject = reject;
+ lodash.remove = remove;
+ lodash.rest = rest;
+ lodash.reverse = reverse;
+ lodash.sampleSize = sampleSize;
+ lodash.set = set;
+ lodash.setWith = setWith;
+ lodash.shuffle = shuffle;
+ lodash.slice = slice;
+ lodash.sortBy = sortBy;
+ lodash.sortedUniq = sortedUniq;
+ lodash.sortedUniqBy = sortedUniqBy;
+ lodash.split = split;
+ lodash.spread = spread;
+ lodash.tail = tail;
+ lodash.take = take;
+ lodash.takeRight = takeRight;
+ lodash.takeRightWhile = takeRightWhile;
+ lodash.takeWhile = takeWhile;
+ lodash.tap = tap;
+ lodash.throttle = throttle;
+ lodash.thru = thru;
+ lodash.toArray = toArray;
+ lodash.toPairs = toPairs;
+ lodash.toPairsIn = toPairsIn;
+ lodash.toPath = toPath;
+ lodash.toPlainObject = toPlainObject;
+ lodash.transform = transform;
+ lodash.unary = unary;
+ lodash.union = union;
+ lodash.unionBy = unionBy;
+ lodash.unionWith = unionWith;
+ lodash.uniq = uniq;
+ lodash.uniqBy = uniqBy;
+ lodash.uniqWith = uniqWith;
+ lodash.unset = unset;
+ lodash.unzip = unzip;
+ lodash.unzipWith = unzipWith;
+ lodash.update = update;
+ lodash.updateWith = updateWith;
+ lodash.values = values;
+ lodash.valuesIn = valuesIn;
+ lodash.without = without;
+ lodash.words = words;
+ lodash.wrap = wrap;
+ lodash.xor = xor;
+ lodash.xorBy = xorBy;
+ lodash.xorWith = xorWith;
+ lodash.zip = zip;
+ lodash.zipObject = zipObject;
+ lodash.zipObjectDeep = zipObjectDeep;
+ lodash.zipWith = zipWith;
+
+ // Add aliases.
+ lodash.entries = toPairs;
+ lodash.entriesIn = toPairsIn;
+ lodash.extend = assignIn;
+ lodash.extendWith = assignInWith;
+
+ // Add methods to `lodash.prototype`.
+ mixin(lodash, lodash);
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return unwrapped values in chain sequences.
+ lodash.add = add;
+ lodash.attempt = attempt;
+ lodash.camelCase = camelCase;
+ lodash.capitalize = capitalize;
+ lodash.ceil = ceil;
+ lodash.clamp = clamp;
+ lodash.clone = clone;
+ lodash.cloneDeep = cloneDeep;
+ lodash.cloneDeepWith = cloneDeepWith;
+ lodash.cloneWith = cloneWith;
+ lodash.conformsTo = conformsTo;
+ lodash.deburr = deburr;
+ lodash.defaultTo = defaultTo;
+ lodash.divide = divide;
+ lodash.endsWith = endsWith;
+ lodash.eq = eq;
+ lodash.escape = escape;
+ lodash.escapeRegExp = escapeRegExp;
+ lodash.every = every;
+ lodash.find = find;
+ lodash.findIndex = findIndex;
+ lodash.findKey = findKey;
+ lodash.findLast = findLast;
+ lodash.findLastIndex = findLastIndex;
+ lodash.findLastKey = findLastKey;
+ lodash.floor = floor;
+ lodash.forEach = forEach;
+ lodash.forEachRight = forEachRight;
+ lodash.forIn = forIn;
+ lodash.forInRight = forInRight;
+ lodash.forOwn = forOwn;
+ lodash.forOwnRight = forOwnRight;
+ lodash.get = get;
+ lodash.gt = gt;
+ lodash.gte = gte;
+ lodash.has = has;
+ lodash.hasIn = hasIn;
+ lodash.head = head;
+ lodash.identity = identity;
+ lodash.includes = includes;
+ lodash.indexOf = indexOf;
+ lodash.inRange = inRange;
+ lodash.invoke = invoke;
+ lodash.isArguments = isArguments;
+ lodash.isArray = isArray;
+ lodash.isArrayBuffer = isArrayBuffer;
+ lodash.isArrayLike = isArrayLike;
+ lodash.isArrayLikeObject = isArrayLikeObject;
+ lodash.isBoolean = isBoolean;
+ lodash.isBuffer = isBuffer;
+ lodash.isDate = isDate;
+ lodash.isElement = isElement;
+ lodash.isEmpty = isEmpty;
+ lodash.isEqual = isEqual;
+ lodash.isEqualWith = isEqualWith;
+ lodash.isError = isError;
+ lodash.isFinite = isFinite;
+ lodash.isFunction = isFunction;
+ lodash.isInteger = isInteger;
+ lodash.isLength = isLength;
+ lodash.isMap = isMap;
+ lodash.isMatch = isMatch;
+ lodash.isMatchWith = isMatchWith;
+ lodash.isNaN = isNaN;
+ lodash.isNative = isNative;
+ lodash.isNil = isNil;
+ lodash.isNull = isNull;
+ lodash.isNumber = isNumber;
+ lodash.isObject = isObject;
+ lodash.isObjectLike = isObjectLike;
+ lodash.isPlainObject = isPlainObject;
+ lodash.isRegExp = isRegExp;
+ lodash.isSafeInteger = isSafeInteger;
+ lodash.isSet = isSet;
+ lodash.isString = isString;
+ lodash.isSymbol = isSymbol;
+ lodash.isTypedArray = isTypedArray;
+ lodash.isUndefined = isUndefined;
+ lodash.isWeakMap = isWeakMap;
+ lodash.isWeakSet = isWeakSet;
+ lodash.join = join;
+ lodash.kebabCase = kebabCase;
+ lodash.last = last;
+ lodash.lastIndexOf = lastIndexOf;
+ lodash.lowerCase = lowerCase;
+ lodash.lowerFirst = lowerFirst;
+ lodash.lt = lt;
+ lodash.lte = lte;
+ lodash.max = max;
+ lodash.maxBy = maxBy;
+ lodash.mean = mean;
+ lodash.meanBy = meanBy;
+ lodash.min = min;
+ lodash.minBy = minBy;
+ lodash.stubArray = stubArray;
+ lodash.stubFalse = stubFalse;
+ lodash.stubObject = stubObject;
+ lodash.stubString = stubString;
+ lodash.stubTrue = stubTrue;
+ lodash.multiply = multiply;
+ lodash.nth = nth;
+ lodash.noConflict = noConflict;
+ lodash.noop = noop;
+ lodash.now = now;
+ lodash.pad = pad;
+ lodash.padEnd = padEnd;
+ lodash.padStart = padStart;
+ lodash.parseInt = parseInt;
+ lodash.random = random;
+ lodash.reduce = reduce;
+ lodash.reduceRight = reduceRight;
+ lodash.repeat = repeat;
+ lodash.replace = replace;
+ lodash.result = result;
+ lodash.round = round;
+ lodash.runInContext = runInContext;
+ lodash.sample = sample;
+ lodash.size = size;
+ lodash.snakeCase = snakeCase;
+ lodash.some = some;
+ lodash.sortedIndex = sortedIndex;
+ lodash.sortedIndexBy = sortedIndexBy;
+ lodash.sortedIndexOf = sortedIndexOf;
+ lodash.sortedLastIndex = sortedLastIndex;
+ lodash.sortedLastIndexBy = sortedLastIndexBy;
+ lodash.sortedLastIndexOf = sortedLastIndexOf;
+ lodash.startCase = startCase;
+ lodash.startsWith = startsWith;
+ lodash.subtract = subtract;
+ lodash.sum = sum;
+ lodash.sumBy = sumBy;
+ lodash.template = template;
+ lodash.times = times;
+ lodash.toFinite = toFinite;
+ lodash.toInteger = toInteger;
+ lodash.toLength = toLength;
+ lodash.toLower = toLower;
+ lodash.toNumber = toNumber;
+ lodash.toSafeInteger = toSafeInteger;
+ lodash.toString = toString;
+ lodash.toUpper = toUpper;
+ lodash.trim = trim;
+ lodash.trimEnd = trimEnd;
+ lodash.trimStart = trimStart;
+ lodash.truncate = truncate;
+ lodash.unescape = unescape;
+ lodash.uniqueId = uniqueId;
+ lodash.upperCase = upperCase;
+ lodash.upperFirst = upperFirst;
+
+ // Add aliases.
+ lodash.each = forEach;
+ lodash.eachRight = forEachRight;
+ lodash.first = head;
+
+ mixin(lodash, (function() {
+ var source = {};
+ baseForOwn(lodash, function(func, methodName) {
+ if (!hasOwnProperty.call(lodash.prototype, methodName)) {
+ source[methodName] = func;
+ }
+ });
+ return source;
+ }()), { 'chain': false });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * The semantic version number.
+ *
+ * @static
+ * @memberOf _
+ * @type {string}
+ */
+ lodash.VERSION = VERSION;
+
+ // Assign default placeholders.
+ arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
+ lodash[methodName].placeholder = lodash;
+ });
+
+ // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
+ arrayEach(['drop', 'take'], function(methodName, index) {
+ LazyWrapper.prototype[methodName] = function(n) {
+ var filtered = this.__filtered__;
+ if (filtered && !index) {
+ return new LazyWrapper(this);
+ }
+ n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
+
+ var result = this.clone();
+ if (filtered) {
+ result.__takeCount__ = nativeMin(n, result.__takeCount__);
+ } else {
+ result.__views__.push({
+ 'size': nativeMin(n, MAX_ARRAY_LENGTH),
+ 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
+ });
+ }
+ return result;
+ };
+
+ LazyWrapper.prototype[methodName + 'Right'] = function(n) {
+ return this.reverse()[methodName](n).reverse();
+ };
+ });
+
+ // Add `LazyWrapper` methods that accept an `iteratee` value.
+ arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
+ var type = index + 1,
+ isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
+
+ LazyWrapper.prototype[methodName] = function(iteratee) {
+ var result = this.clone();
+ result.__iteratees__.push({
+ 'iteratee': getIteratee(iteratee, 3),
+ 'type': type
+ });
+ result.__filtered__ = result.__filtered__ || isFilter;
+ return result;
+ };
+ });
+
+ // Add `LazyWrapper` methods for `_.head` and `_.last`.
+ arrayEach(['head', 'last'], function(methodName, index) {
+ var takeName = 'take' + (index ? 'Right' : '');
+
+ LazyWrapper.prototype[methodName] = function() {
+ return this[takeName](1).value()[0];
+ };
+ });
+
+ // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
+ arrayEach(['initial', 'tail'], function(methodName, index) {
+ var dropName = 'drop' + (index ? '' : 'Right');
+
+ LazyWrapper.prototype[methodName] = function() {
+ return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
+ };
+ });
+
+ LazyWrapper.prototype.compact = function() {
+ return this.filter(identity);
+ };
+
+ LazyWrapper.prototype.find = function(predicate) {
+ return this.filter(predicate).head();
+ };
+
+ LazyWrapper.prototype.findLast = function(predicate) {
+ return this.reverse().find(predicate);
+ };
+
+ LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
+ if (typeof path == 'function') {
+ return new LazyWrapper(this);
+ }
+ return this.map(function(value) {
+ return baseInvoke(value, path, args);
+ });
+ });
+
+ LazyWrapper.prototype.reject = function(predicate) {
+ return this.filter(negate(getIteratee(predicate)));
+ };
+
+ LazyWrapper.prototype.slice = function(start, end) {
+ start = toInteger(start);
+
+ var result = this;
+ if (result.__filtered__ && (start > 0 || end < 0)) {
+ return new LazyWrapper(result);
+ }
+ if (start < 0) {
+ result = result.takeRight(-start);
+ } else if (start) {
+ result = result.drop(start);
+ }
+ if (end !== undefined) {
+ end = toInteger(end);
+ result = end < 0 ? result.dropRight(-end) : result.take(end - start);
+ }
+ return result;
+ };
+
+ LazyWrapper.prototype.takeRightWhile = function(predicate) {
+ return this.reverse().takeWhile(predicate).reverse();
+ };
+
+ LazyWrapper.prototype.toArray = function() {
+ return this.take(MAX_ARRAY_LENGTH);
+ };
+
+ // Add `LazyWrapper` methods to `lodash.prototype`.
+ baseForOwn(LazyWrapper.prototype, function(func, methodName) {
+ var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
+ isTaker = /^(?:head|last)$/.test(methodName),
+ lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
+ retUnwrapped = isTaker || /^find/.test(methodName);
+
+ if (!lodashFunc) {
+ return;
+ }
+ lodash.prototype[methodName] = function() {
+ var value = this.__wrapped__,
+ args = isTaker ? [1] : arguments,
+ isLazy = value instanceof LazyWrapper,
+ iteratee = args[0],
+ useLazy = isLazy || isArray(value);
+
+ var interceptor = function(value) {
+ var result = lodashFunc.apply(lodash, arrayPush([value], args));
+ return (isTaker && chainAll) ? result[0] : result;
+ };
+
+ if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
+ // Avoid lazy use if the iteratee has a "length" value other than `1`.
+ isLazy = useLazy = false;
+ }
+ var chainAll = this.__chain__,
+ isHybrid = !!this.__actions__.length,
+ isUnwrapped = retUnwrapped && !chainAll,
+ onlyLazy = isLazy && !isHybrid;
+
+ if (!retUnwrapped && useLazy) {
+ value = onlyLazy ? value : new LazyWrapper(this);
+ var result = func.apply(value, args);
+ result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
+ return new LodashWrapper(result, chainAll);
+ }
+ if (isUnwrapped && onlyLazy) {
+ return func.apply(this, args);
+ }
+ result = this.thru(interceptor);
+ return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
+ };
+ });
+
+ // Add `Array` methods to `lodash.prototype`.
+ arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
+ var func = arrayProto[methodName],
+ chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
+ retUnwrapped = /^(?:pop|shift)$/.test(methodName);
+
+ lodash.prototype[methodName] = function() {
+ var args = arguments;
+ if (retUnwrapped && !this.__chain__) {
+ var value = this.value();
+ return func.apply(isArray(value) ? value : [], args);
+ }
+ return this[chainName](function(value) {
+ return func.apply(isArray(value) ? value : [], args);
+ });
+ };
+ });
+
+ // Map minified method names to their real names.
+ baseForOwn(LazyWrapper.prototype, function(func, methodName) {
+ var lodashFunc = lodash[methodName];
+ if (lodashFunc) {
+ var key = (lodashFunc.name + ''),
+ names = realNames[key] || (realNames[key] = []);
+
+ names.push({ 'name': methodName, 'func': lodashFunc });
+ }
+ });
+
+ realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
+ 'name': 'wrapper',
+ 'func': undefined
+ }];
+
+ // Add methods to `LazyWrapper`.
+ LazyWrapper.prototype.clone = lazyClone;
+ LazyWrapper.prototype.reverse = lazyReverse;
+ LazyWrapper.prototype.value = lazyValue;
+
+ // Add chain sequence methods to the `lodash` wrapper.
+ lodash.prototype.at = wrapperAt;
+ lodash.prototype.chain = wrapperChain;
+ lodash.prototype.commit = wrapperCommit;
+ lodash.prototype.next = wrapperNext;
+ lodash.prototype.plant = wrapperPlant;
+ lodash.prototype.reverse = wrapperReverse;
+ lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
+
+ // Add lazy aliases.
+ lodash.prototype.first = lodash.prototype.head;
+
+ if (symIterator) {
+ lodash.prototype[symIterator] = wrapperToIterator;
+ }
+ return lodash;
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ // Export lodash.
+ var _ = runInContext();
+
+ // Some AMD build optimizers, like r.js, check for condition patterns like:
+ if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
+ // Expose Lodash on the global object to prevent errors when Lodash is
+ // loaded by a script tag in the presence of an AMD loader.
+ // See http://requirejs.org/docs/errors.html#mismatch for more details.
+ // Use `_.noConflict` to remove Lodash from the global object.
+ root._ = _;
+
+ // Define as an anonymous module so, through path mapping, it can be
+ // referenced as the "underscore" module.
+ define(function() {
+ return _;
+ });
+ }
+ // Check for `exports` after `define` in case a build optimizer adds it.
+ else if (freeModule) {
+ // Export for Node.js.
+ (freeModule.exports = _)._ = _;
+ // Export for CommonJS support.
+ freeExports._ = _;
+ }
+ else {
+ // Export to the global object.
+ root._ = _;
+ }
+}.call(this));
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lodash.min.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lodash.min.js
new file mode 100644
index 0000000..cf2fd3d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lodash.min.js
@@ -0,0 +1,136 @@
+/**
+ * @license
+ * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
+ */
+;(function(){function n(n,t){return n.set(t[0],t[1]),n}function t(n,t){return n.add(t),n}function r(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function e(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function u(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&false!==t(n[r],r,n););return n}function i(n,t){for(var r=null==n?0:n.length;r--&&false!==t(n[r],r,n););
+return n}function o(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return false;return true}function f(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function c(n,t){return!(null==n||!n.length)&&-1<d(n,t,0)}function a(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return true;return false}function l(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function s(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];
+return n}function h(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);return r}function p(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function _(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return true;return false}function v(n,t,r){var e;return r(n,function(n,r,u){if(t(n,r,u))return e=r,false}),e}function g(n,t,r,e){var u=n.length;for(r+=e?1:-1;e?r--:++r<u;)if(t(n[r],r,n))return r;return-1}function d(n,t,r){if(t===t)n:{
+--r;for(var e=n.length;++r<e;)if(n[r]===t){n=r;break n}n=-1}else n=g(n,b,r);return n}function y(n,t,r,e){--r;for(var u=n.length;++r<u;)if(e(n[r],t))return r;return-1}function b(n){return n!==n}function x(n,t){var r=null==n?0:n.length;return r?k(n,t)/r:P}function j(n){return function(t){return null==t?F:t[n]}}function w(n){return function(t){return null==n?F:n[t]}}function m(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=false,n):t(r,n,u,i)}),r}function A(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;
+return n}function k(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==F&&(r=r===F?i:r+i)}return r}function E(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function O(n,t){return l(t,function(t){return[t,n[t]]})}function S(n){return function(t){return n(t)}}function I(n,t){return l(t,function(t){return n[t]})}function R(n,t){return n.has(t)}function z(n,t){for(var r=-1,e=n.length;++r<e&&-1<d(t,n[r],0););return r}function W(n,t){for(var r=n.length;r--&&-1<d(t,n[r],0););return r}function B(n){
+return"\\"+Tn[n]}function L(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function U(n,t){return function(r){return n(t(r))}}function C(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r];o!==t&&"__lodash_placeholder__"!==o||(n[r]="__lodash_placeholder__",i[u++]=r)}return i}function D(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}function M(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function T(n){if(Bn.test(n)){
+for(var t=zn.lastIndex=0;zn.test(n);)++t;n=t}else n=tt(n);return n}function $(n){return Bn.test(n)?n.match(zn)||[]:n.split("")}var F,N=1/0,P=NaN,Z=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],q=/\b__p\+='';/g,V=/\b(__p\+=)''\+/g,K=/(__e\(.*?\)|\b__t\))\+'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,J=RegExp(G.source),Y=RegExp(H.source),Q=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,nn=/<%=([\s\S]+?)%>/g,tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rn=/^\w*$/,en=/^\./,un=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,on=/[\\^$.*+?()[\]{}|]/g,fn=RegExp(on.source),cn=/^\s+|\s+$/g,an=/^\s+/,ln=/\s+$/,sn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,hn=/\{\n\/\* \[wrapped with (.+)\] \*/,pn=/,? & /,_n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,vn=/\\(\\)?/g,gn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dn=/\w*$/,yn=/^[-+]0x[0-9a-f]+$/i,bn=/^0b[01]+$/i,xn=/^\[object .+?Constructor\]$/,jn=/^0o[0-7]+$/i,wn=/^(?:0|[1-9]\d*)$/,mn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,An=/($^)/,kn=/['\n\r\u2028\u2029\\]/g,En="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",On="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+En,Sn="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",In=RegExp("['\u2019]","g"),Rn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),zn=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+Sn+En,"g"),Wn=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)|\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)|\\d+",On].join("|"),"g"),Bn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Ln=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Un="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Cn={};
+Cn["[object Float32Array]"]=Cn["[object Float64Array]"]=Cn["[object Int8Array]"]=Cn["[object Int16Array]"]=Cn["[object Int32Array]"]=Cn["[object Uint8Array]"]=Cn["[object Uint8ClampedArray]"]=Cn["[object Uint16Array]"]=Cn["[object Uint32Array]"]=true,Cn["[object Arguments]"]=Cn["[object Array]"]=Cn["[object ArrayBuffer]"]=Cn["[object Boolean]"]=Cn["[object DataView]"]=Cn["[object Date]"]=Cn["[object Error]"]=Cn["[object Function]"]=Cn["[object Map]"]=Cn["[object Number]"]=Cn["[object Object]"]=Cn["[object RegExp]"]=Cn["[object Set]"]=Cn["[object String]"]=Cn["[object WeakMap]"]=false;
+var Dn={};Dn["[object Arguments]"]=Dn["[object Array]"]=Dn["[object ArrayBuffer]"]=Dn["[object DataView]"]=Dn["[object Boolean]"]=Dn["[object Date]"]=Dn["[object Float32Array]"]=Dn["[object Float64Array]"]=Dn["[object Int8Array]"]=Dn["[object Int16Array]"]=Dn["[object Int32Array]"]=Dn["[object Map]"]=Dn["[object Number]"]=Dn["[object Object]"]=Dn["[object RegExp]"]=Dn["[object Set]"]=Dn["[object String]"]=Dn["[object Symbol]"]=Dn["[object Uint8Array]"]=Dn["[object Uint8ClampedArray]"]=Dn["[object Uint16Array]"]=Dn["[object Uint32Array]"]=true,
+Dn["[object Error]"]=Dn["[object Function]"]=Dn["[object WeakMap]"]=false;var Mn,Tn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$n=parseFloat,Fn=parseInt,Nn=typeof global=="object"&&global&&global.Object===Object&&global,Pn=typeof self=="object"&&self&&self.Object===Object&&self,Zn=Nn||Pn||Function("return this")(),qn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vn=qn&&typeof module=="object"&&module&&!module.nodeType&&module,Kn=Vn&&Vn.exports===qn,Gn=Kn&&Nn.process;
+n:{try{Mn=Gn&&Gn.binding&&Gn.binding("util");break n}catch(n){}Mn=void 0}var Hn=Mn&&Mn.isArrayBuffer,Jn=Mn&&Mn.isDate,Yn=Mn&&Mn.isMap,Qn=Mn&&Mn.isRegExp,Xn=Mn&&Mn.isSet,nt=Mn&&Mn.isTypedArray,tt=j("length"),rt=w({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I",
+"\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C",
+"\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i",
+"\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S",
+"\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe",
+"\u0149":"'n","\u017f":"s"}),et=w({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),ut=w({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),it=function w(En){function On(n){if(bu(n)&&!cf(n)&&!(n instanceof Mn)){if(n instanceof zn)return n;if(fi.call(n,"__wrapped__"))return Ne(n)}return new zn(n)}function Sn(){}function zn(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=F}function Mn(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,
+this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Tn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Nn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Pn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function qn(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new Pn;++t<r;)this.add(n[t])}function Vn(n){
+this.size=(this.__data__=new Nn(n)).size}function Gn(n,t){var r,e=cf(n),u=!e&&ff(n),i=!e&&!u&&lf(n),o=!e&&!u&&!i&&vf(n),u=(e=e||u||i||o)?E(n.length,ti):[],f=u.length;for(r in n)!t&&!fi.call(n,r)||e&&("length"==r||i&&("offset"==r||"parent"==r)||o&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||Se(r,f))||u.push(r);return u}function tt(n){var t=n.length;return t?n[ar(0,t-1)]:F}function ot(n,t){return Me(Tr(n),dt(t,0,n.length))}function ft(n){return Me(Tr(n))}function ct(n,t,r,e){return n===F||su(n,ui[r])&&!fi.call(e,r)?t:n;
+}function at(n,t,r){(r===F||su(n[t],r))&&(r!==F||t in n)||vt(n,t,r)}function lt(n,t,r){var e=n[t];fi.call(n,t)&&su(e,r)&&(r!==F||t in n)||vt(n,t,r)}function st(n,t){for(var r=n.length;r--;)if(su(n[r][0],t))return r;return-1}function ht(n,t,r,e){return io(n,function(n,u,i){t(e,n,r(n),i)}),e}function pt(n,t){return n&&$r(t,Bu(t),n)}function _t(n,t){return n&&$r(t,Lu(t),n)}function vt(n,t,r){"__proto__"==t&&ki?ki(n,t,{configurable:true,enumerable:true,value:r,writable:true}):n[t]=r}function gt(n,t){for(var r=-1,e=t.length,u=Gu(e),i=null==n;++r<e;)u[r]=i?F:zu(n,t[r]);
+return u}function dt(n,t,r){return n===n&&(r!==F&&(n=n<=r?n:r),t!==F&&(n=n>=t?n:t)),n}function yt(n,t,r,e,i,o){var f,c=1&t,a=2&t,l=4&t;if(r&&(f=i?r(n,e,i,o):r(n)),f!==F)return f;if(!yu(n))return n;if(e=cf(n)){if(f=Ae(n),!c)return Tr(n,f)}else{var s=go(n),h="[object Function]"==s||"[object GeneratorFunction]"==s;if(lf(n))return Br(n,c);if("[object Object]"==s||"[object Arguments]"==s||h&&!i){if(f=a||h?{}:ke(n),!c)return a?Nr(n,_t(f,n)):Fr(n,pt(f,n))}else{if(!Dn[s])return i?n:{};f=Ee(n,s,yt,c)}}if(o||(o=new Vn),
+i=o.get(n))return i;o.set(n,f);var a=l?a?ge:ve:a?Lu:Bu,p=e?F:a(n);return u(p||n,function(e,u){p&&(u=e,e=n[u]),lt(f,u,yt(e,t,r,u,n,o))}),f}function bt(n){var t=Bu(n);return function(r){return xt(r,n,t)}}function xt(n,t,r){var e=r.length;if(null==n)return!e;for(n=Xu(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===F&&!(u in n)||!i(o))return false}return true}function jt(n,t,r){if(typeof n!="function")throw new ri("Expected a function");return xo(function(){n.apply(F,r)},t)}function wt(n,t,r,e){var u=-1,i=c,o=true,f=n.length,s=[],h=t.length;
+if(!f)return s;r&&(t=l(t,S(r))),e?(i=a,o=false):200<=t.length&&(i=R,o=false,t=new qn(t));n:for(;++u<f;){var p=n[u],_=null==r?p:r(p),p=e||0!==p?p:0;if(o&&_===_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function mt(n,t){var r=true;return io(n,function(n,e,u){return r=!!t(n,e,u)}),r}function At(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===F?o===o&&!mu(o):r(o,f)))var f=o,c=i}return c}function kt(n,t){var r=[];return io(n,function(n,e,u){
+t(n,e,u)&&r.push(n)}),r}function Et(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=Oe),u||(u=[]);++i<o;){var f=n[i];0<t&&r(f)?1<t?Et(f,t-1,r,e,u):s(u,f):e||(u[u.length]=f)}return u}function Ot(n,t){return n&&fo(n,t,Bu)}function St(n,t){return n&&co(n,t,Bu)}function It(n,t){return f(t,function(t){return vu(n[t])})}function Rt(n,t){t=zr(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[Te(t[r++])];return r&&r==e?n:F}function zt(n,t,r){return t=t(n),cf(n)?t:s(t,r(n))}function Wt(n){if(null==n)return n===F?"[object Undefined]":"[object Null]";
+n=Xu(n);var t;if(Ai&&Ai in n){var r=fi.call(n,Ai),e=n[Ai];try{n[Ai]=F,t=true}catch(n){}var u=li.call(n);t&&(r?n[Ai]=e:delete n[Ai]),t=u}else t=li.call(n);return t}function Bt(n,t){return n>t}function Lt(n,t){return null!=n&&fi.call(n,t)}function Ut(n,t){return null!=n&&t in Xu(n)}function Ct(n,t,r){for(var e=r?a:c,u=n[0].length,i=n.length,o=i,f=Gu(i),s=1/0,h=[];o--;){var p=n[o];o&&t&&(p=l(p,S(t))),s=Di(p.length,s),f[o]=!r&&(t||120<=u&&120<=p.length)?new qn(o&&p):F}var p=n[0],_=-1,v=f[0];n:for(;++_<u&&h.length<s;){
+var g=p[_],d=t?t(g):g,g=r||0!==g?g:0;if(v?!R(v,d):!e(h,d,r)){for(o=i;--o;){var y=f[o];if(y?!R(y,d):!e(n[o],d,r))continue n}v&&v.push(d),h.push(g)}}return h}function Dt(n,t,r){var e={};return Ot(n,function(n,u,i){t(e,r(n),u,i)}),e}function Mt(n,t,e){return t=zr(t,n),n=2>t.length?n:Rt(n,gr(t,0,-1)),t=null==n?n:n[Te(Ke(t))],null==t?F:r(t,n,e)}function Tt(n){return bu(n)&&"[object Arguments]"==Wt(n)}function $t(n){return bu(n)&&"[object ArrayBuffer]"==Wt(n)}function Ft(n){return bu(n)&&"[object Date]"==Wt(n);
+}function Nt(n,t,r,e,u){if(n===t)t=true;else if(null==n||null==t||!yu(n)&&!bu(t))t=n!==n&&t!==t;else n:{var i=cf(n),o=cf(t),f="[object Array]",c="[object Array]";i||(f=go(n),f="[object Arguments]"==f?"[object Object]":f),o||(c=go(t),c="[object Arguments]"==c?"[object Object]":c);var a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&lf(n)){if(!lf(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Vn),t=i||vf(n)?he(n,t,r,e,Nt,u):pe(n,t,f,r,e,Nt,u);else{if(!(1&r)&&(i=a&&fi.call(n,"__wrapped__"),f=o&&fi.call(t,"__wrapped__"),
+i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Vn),t=Nt(n,t,r,e,u);break n}if(c)t:if(u||(u=new Vn),i=1&r,f=Bu(n),o=f.length,c=Bu(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:fi.call(t,l))){t=false;break t}}if((c=u.get(n))&&u.get(t))t=c==t;else{c=true,u.set(n,t),u.set(t,n);for(var s=i;++a<o;){var l=f[a],h=n[l],p=t[l];if(e)var _=i?e(p,h,l,t,n,u):e(h,p,l,n,t,u);if(_===F?h!==p&&!Nt(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l)}c&&!s&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(c=false)),
+u.delete(n),u.delete(t),t=c}}else t=false;else t=false}}return t}function Pt(n){return bu(n)&&"[object Map]"==go(n)}function Zt(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=Xu(n);u--;){var f=r[u];if(o&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return false}for(;++u<i;){var f=r[u],c=f[0],a=n[c],l=f[1];if(o&&f[2]){if(a===F&&!(c in n))return false}else{if(f=new Vn,e)var s=e(a,l,c,n,t,f);if(s===F?!Nt(l,a,3,e,f):!s)return false}}return true}function qt(n){return!(!yu(n)||ai&&ai in n)&&(vu(n)?pi:xn).test($e(n))}function Vt(n){
+return bu(n)&&"[object RegExp]"==Wt(n)}function Kt(n){return bu(n)&&"[object Set]"==go(n)}function Gt(n){return bu(n)&&du(n.length)&&!!Cn[Wt(n)]}function Ht(n){return typeof n=="function"?n:null==n?Fu:typeof n=="object"?cf(n)?nr(n[0],n[1]):Xt(n):qu(n)}function Jt(n){if(!We(n))return Ui(n);var t,r=[];for(t in Xu(n))fi.call(n,t)&&"constructor"!=t&&r.push(t);return r}function Yt(n,t){return n<t}function Qt(n,t){var r=-1,e=hu(n)?Gu(n.length):[];return io(n,function(n,u,i){e[++r]=t(n,u,i)}),e}function Xt(n){
+var t=je(n);return 1==t.length&&t[0][2]?Be(t[0][0],t[0][1]):function(r){return r===n||Zt(r,n,t)}}function nr(n,t){return Re(n)&&t===t&&!yu(t)?Be(Te(n),t):function(r){var e=zu(r,n);return e===F&&e===t?Wu(r,n):Nt(t,e,3)}}function tr(n,t,r,e,u){n!==t&&fo(t,function(i,o){if(yu(i)){u||(u=new Vn);var f=u,c=n[o],a=t[o],l=f.get(a);if(l)at(n,o,l);else{var l=e?e(c,a,o+"",n,t,f):F,s=l===F;if(s){var h=cf(a),p=!h&&lf(a),_=!h&&!p&&vf(a),l=a;h||p||_?cf(c)?l=c:pu(c)?l=Tr(c):p?(s=false,l=Br(a,true)):_?(s=false,l=Ur(a,true)):l=[]:ju(a)||ff(a)?(l=c,
+ff(c)?l=Iu(c):(!yu(c)||r&&vu(c))&&(l=ke(a))):s=false}s&&(f.set(a,l),tr(l,a,r,e,f),f.delete(a)),at(n,o,l)}}else f=e?e(n[o],i,o+"",n,t,u):F,f===F&&(f=i),at(n,o,f)},Lu)}function rr(n,t){var r=n.length;if(r)return t+=0>t?r:0,Se(t,r)?n[t]:F}function er(n,t,r){var e=-1;return t=l(t.length?t:[Fu],S(be())),n=Qt(n,function(n){return{a:l(t,function(t){return t(n)}),b:++e,c:n}}),A(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e<o;){var c=Cr(u[e],i[e]);if(c){e=e>=f?c:c*("desc"==r[e]?-1:1);
+break n}}e=n.b-t.b}return e})}function ur(n,t){return n=Xu(n),ir(n,t,function(t,r){return Wu(n,r)})}function ir(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=Rt(n,o);r(f,o)&&_r(i,zr(o,n),f)}return i}function or(n){return function(t){return Rt(t,n)}}function fr(n,t,r,e){var u=e?y:d,i=-1,o=t.length,f=n;for(n===t&&(t=Tr(t)),r&&(f=l(n,S(r)));++i<o;)for(var c=0,a=t[i],a=r?r(a):a;-1<(c=u(f,a,c,e));)f!==n&&ji.call(f,c,1),ji.call(n,c,1);return n}function cr(n,t){for(var r=n?t.length:0,e=r-1;r--;){
+var u=t[r];if(r==e||u!==i){var i=u;Se(u)?ji.call(n,u,1):Ar(n,u)}}}function ar(n,t){return n+Ri($i()*(t-n+1))}function lr(n,t){var r="";if(!n||1>t||9007199254740991<t)return r;do t%2&&(r+=n),(t=Ri(t/2))&&(n+=n);while(t);return r}function sr(n,t){return jo(Ue(n,t,Fu),n+"")}function hr(n){return tt(Cu(n))}function pr(n,t){var r=Cu(n);return Me(r,dt(t,0,r.length))}function _r(n,t,r,e){if(!yu(n))return n;t=zr(t,n);for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++u<i;){var c=Te(t[u]),a=r;if(u!=o){var l=f[c],a=e?e(l,c,f):F;
+a===F&&(a=yu(l)?l:Se(t[u+1])?[]:{})}lt(f,c,a),f=f[c]}return n}function vr(n){return Me(Cu(n))}function gr(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Gu(u);++e<u;)r[e]=n[e+t];return r}function dr(n,t){var r;return io(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function yr(n,t,r){var e=0,u=null==n?e:n.length;if(typeof t=="number"&&t===t&&2147483647>=u){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!mu(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return br(n,t,Fu,r);
+}function br(n,t,r,e){t=r(t);for(var u=0,i=null==n?0:n.length,o=t!==t,f=null===t,c=mu(t),a=t===F;u<i;){var l=Ri((u+i)/2),s=r(n[l]),h=s!==F,p=null===s,_=s===s,v=mu(s);(o?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?s<=t:s<t)?u=l+1:i=l}return Di(i,4294967294)}function xr(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r],f=t?t(o):o;if(!r||!su(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function jr(n){return typeof n=="number"?n:mu(n)?P:+n}function wr(n){if(typeof n=="string")return n;
+if(cf(n))return l(n,wr)+"";if(mu(n))return eo?eo.call(n):"";var t=n+"";return"0"==t&&1/n==-N?"-0":t}function mr(n,t,r){var e=-1,u=c,i=n.length,o=true,f=[],l=f;if(r)o=false,u=a;else if(200<=i){if(u=t?null:ho(n))return D(u);o=false,u=R,l=new qn}else l=t?[]:f;n:for(;++e<i;){var s=n[e],h=t?t(s):s,s=r||0!==s?s:0;if(o&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue n;t&&l.push(h),f.push(s)}else u(l,h,r)||(l!==f&&l.push(h),f.push(s))}return f}function Ar(n,t){return t=zr(t,n),n=2>t.length?n:Rt(n,gr(t,0,-1)),
+null==n||delete n[Te(Ke(t))]}function kr(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?gr(n,e?0:i,e?i+1:u):gr(n,e?i+1:0,e?u:i)}function Er(n,t){var r=n;return r instanceof Mn&&(r=r.value()),h(t,function(n,t){return t.func.apply(t.thisArg,s([n],t.args))},r)}function Or(n,t,r){var e=n.length;if(2>e)return e?mr(n[0]):[];for(var u=-1,i=Gu(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=wt(i[u]||o,n[f],t,r));return mr(Et(i,1),t,r)}function Sr(n,t,r){for(var e=-1,u=n.length,i=t.length,o={};++e<u;)r(o,n[e],e<i?t[e]:F);
+return o}function Ir(n){return pu(n)?n:[]}function Rr(n){return typeof n=="function"?n:Fu}function zr(n,t){return cf(n)?n:Re(n,t)?[n]:wo(Ru(n))}function Wr(n,t,r){var e=n.length;return r=r===F?e:r,!t&&r>=e?n:gr(n,t,r)}function Br(n,t){if(t)return n.slice();var r=n.length,r=di?di(r):new n.constructor(r);return n.copy(r),r}function Lr(n){var t=new n.constructor(n.byteLength);return new gi(t).set(new gi(n)),t}function Ur(n,t){return new n.constructor(t?Lr(n.buffer):n.buffer,n.byteOffset,n.length)}function Cr(n,t){
+if(n!==t){var r=n!==F,e=null===n,u=n===n,i=mu(n),o=t!==F,f=null===t,c=t===t,a=mu(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n<t||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Dr(n,t,r,e){var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Ci(i-o,0),l=Gu(c+a);for(e=!e;++f<c;)l[f]=t[f];for(;++u<o;)(e||u<i)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l}function Mr(n,t,r,e){var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Ci(i-f,0),s=Gu(l+a);
+for(e=!e;++u<l;)s[u]=n[u];for(l=u;++c<a;)s[l+c]=t[c];for(;++o<f;)(e||u<i)&&(s[l+r[o]]=n[u++]);return s}function Tr(n,t){var r=-1,e=n.length;for(t||(t=Gu(e));++r<e;)t[r]=n[r];return t}function $r(n,t,r,e){var u=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var f=t[i],c=e?e(r[f],n[f],f,r,n):F;c===F&&(c=n[f]),u?vt(r,f,c):lt(r,f,c)}return r}function Fr(n,t){return $r(n,_o(n),t)}function Nr(n,t){return $r(n,vo(n),t)}function Pr(n,t){return function(r,u){var i=cf(r)?e:ht,o=t?t():{};return i(r,n,be(u,2),o);
+}}function Zr(n){return sr(function(t,r){var e=-1,u=r.length,i=1<u?r[u-1]:F,o=2<u?r[2]:F,i=3<n.length&&typeof i=="function"?(u--,i):F;for(o&&Ie(r[0],r[1],o)&&(i=3>u?F:i,u=1),t=Xu(t);++e<u;)(o=r[e])&&n(t,o,e,i);return t})}function qr(n,t){return function(r,e){if(null==r)return r;if(!hu(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=Xu(r);(t?i--:++i<u)&&false!==e(o[i],i,o););return r}}function Vr(n){return function(t,r,e){var u=-1,i=Xu(t);e=e(t);for(var o=e.length;o--;){var f=e[n?o:++u];if(false===r(i[f],f,i))break;
+}return t}}function Kr(n,t,r){function e(){return(this&&this!==Zn&&this instanceof e?i:n).apply(u?r:this,arguments)}var u=1&t,i=Jr(n);return e}function Gr(n){return function(t){t=Ru(t);var r=Bn.test(t)?$(t):F,e=r?r[0]:t.charAt(0);return t=r?Wr(r,1).join(""):t.slice(1),e[n]()+t}}function Hr(n){return function(t){return h(Tu(Mu(t).replace(In,"")),n,"")}}function Jr(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:
+return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=uo(n.prototype),t=n.apply(r,t);return yu(t)?t:r}}function Yr(n,t,e){function u(){for(var o=arguments.length,f=Gu(o),c=o,a=ye(u);c--;)f[c]=arguments[c];return c=3>o&&f[0]!==a&&f[o-1]!==a?[]:C(f,a),o-=c.length,o<e?ce(n,t,ne,u.placeholder,F,f,c,F,F,e-o):r(this&&this!==Zn&&this instanceof u?i:n,this,f);
+}var i=Jr(n);return u}function Qr(n){return function(t,r,e){var u=Xu(t);if(!hu(t)){var i=be(r,3);t=Bu(t),r=function(n){return i(u[n],n,u)}}return r=n(t,r,e),-1<r?u[i?t[r]:r]:F}}function Xr(n){return _e(function(t){var r=t.length,e=r,u=zn.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if(typeof i!="function")throw new ri("Expected a function");if(u&&!o&&"wrapper"==de(i))var o=new zn([],true)}for(e=o?e:r;++e<r;)var i=t[e],u=de(i),f="wrapper"==u?po(i):F,o=f&&ze(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?o[de(f[0])].apply(o,f[3]):1==i.length&&ze(i)?o[u]():o.thru(i);
+return function(){var n=arguments,e=n[0];if(o&&1==n.length&&cf(e)&&200<=e.length)return o.plant(e).value();for(var u=0,n=r?t[u].apply(this,n):e;++u<r;)n=t[u].call(this,n);return n}})}function ne(n,t,r,e,u,i,o,f,c,a){function l(){for(var d=arguments.length,y=Gu(d),b=d;b--;)y[b]=arguments[b];if(_){var x,j=ye(l),b=y.length;for(x=0;b--;)y[b]===j&&++x}if(e&&(y=Dr(y,e,u,_)),i&&(y=Mr(y,i,o,_)),d-=x,_&&d<a)return j=C(y,j),ce(n,t,ne,l.placeholder,r,y,j,f,c,a-d);if(j=h?r:this,b=p?j[n]:n,d=y.length,f){x=y.length;
+for(var w=Di(f.length,x),m=Tr(y);w--;){var A=f[w];y[w]=Se(A,x)?m[A]:F}}else v&&1<d&&y.reverse();return s&&c<d&&(y.length=c),this&&this!==Zn&&this instanceof l&&(b=g||Jr(b)),b.apply(j,y)}var s=128&t,h=1&t,p=2&t,_=24&t,v=512&t,g=p?F:Jr(n);return l}function te(n,t){return function(r,e){return Dt(r,n,t(e))}}function re(n,t){return function(r,e){var u;if(r===F&&e===F)return t;if(r!==F&&(u=r),e!==F){if(u===F)return e;typeof r=="string"||typeof e=="string"?(r=wr(r),e=wr(e)):(r=jr(r),e=jr(e)),u=n(r,e)}return u;
+}}function ee(n){return _e(function(t){return t=l(t,S(be())),sr(function(e){var u=this;return n(t,function(n){return r(n,u,e)})})})}function ue(n,t){t=t===F?" ":wr(t);var r=t.length;return 2>r?r?lr(t,n):t:(r=lr(t,Ii(n/T(t))),Bn.test(t)?Wr($(r),0,n).join(""):r.slice(0,n))}function ie(n,t,e,u){function i(){for(var t=-1,c=arguments.length,a=-1,l=u.length,s=Gu(l+c),h=this&&this!==Zn&&this instanceof i?f:n;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++t];return r(h,o?e:this,s)}var o=1&t,f=Jr(n);return i;
+}function oe(n){return function(t,r,e){e&&typeof e!="number"&&Ie(t,r,e)&&(r=e=F),t=ku(t),r===F?(r=t,t=0):r=ku(r),e=e===F?t<r?1:-1:ku(e);var u=-1;r=Ci(Ii((r-t)/(e||1)),0);for(var i=Gu(r);r--;)i[n?r:++u]=t,t+=e;return i}}function fe(n){return function(t,r){return typeof t=="string"&&typeof r=="string"||(t=Su(t),r=Su(r)),n(t,r)}}function ce(n,t,r,e,u,i,o,f,c,a){var l=8&t,s=l?o:F;o=l?F:o;var h=l?i:F;return i=l?F:i,t=(t|(l?32:64))&~(l?64:32),4&t||(t&=-4),u=[n,t,u,h,s,i,o,f,c,a],r=r.apply(F,u),ze(n)&&bo(r,u),
+r.placeholder=e,Ce(r,n,t)}function ae(n){var t=Qu[n];return function(n,r){if(n=Su(n),r=Di(Eu(r),292)){var e=(Ru(n)+"e").split("e"),e=t(e[0]+"e"+(+e[1]+r)),e=(Ru(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return t(n)}}function le(n){return function(t){var r=go(t);return"[object Map]"==r?L(t):"[object Set]"==r?M(t):O(t,n(t))}}function se(n,t,r,e,u,i,o,f){var c=2&t;if(!c&&typeof n!="function")throw new ri("Expected a function");var a=e?e.length:0;if(a||(t&=-97,e=u=F),o=o===F?o:Ci(Eu(o),0),f=f===F?f:Eu(f),
+a-=u?u.length:0,64&t){var l=e,s=u;e=u=F}var h=c?F:po(n);return i=[n,t,r,e,u,l,s,i,o,f],h&&(r=i[1],n=h[1],t=r|n,e=128==n&&8==r||128==n&&256==r&&i[7].length<=h[8]||384==n&&h[7].length<=h[8]&&8==r,131>t||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Dr(e,r,h[4]):r,i[4]=e?C(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Mr(e,r,h[6]):r,i[6]=e?C(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Di(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],
+i[1]=t),n=i[0],t=i[1],r=i[2],e=i[3],u=i[4],f=i[9]=null==i[9]?c?0:n.length:Ci(i[9]-a,0),!f&&24&t&&(t&=-25),Ce((h?ao:bo)(t&&1!=t?8==t||16==t?Yr(n,t,f):32!=t&&33!=t||u.length?ne.apply(F,i):ie(n,t,r,e):Kr(n,t,r),i),n,t)}function he(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t;var c=-1,a=true,l=2&r?new qn:F;for(i.set(n,t),i.set(t,n);++c<f;){var s=n[c],h=t[c];if(e)var p=o?e(h,s,c,t,n,i):e(s,h,c,n,t,i);if(p!==F){if(p)continue;a=false;break}if(l){
+if(!_(t,function(n,t){if(!R(l,t)&&(s===n||u(s,n,r,e,i)))return l.push(t)})){a=false;break}}else if(s!==h&&!u(s,h,r,e,i)){a=false;break}}return i.delete(n),i.delete(t),a}function pe(n,t,r,e,u,i,o){switch(r){case"[object DataView]":if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)break;n=n.buffer,t=t.buffer;case"[object ArrayBuffer]":if(n.byteLength!=t.byteLength||!i(new gi(n),new gi(t)))break;return true;case"[object Boolean]":case"[object Date]":case"[object Number]":return su(+n,+t);case"[object Error]":
+return n.name==t.name&&n.message==t.message;case"[object RegExp]":case"[object String]":return n==t+"";case"[object Map]":var f=L;case"[object Set]":if(f||(f=D),n.size!=t.size&&!(1&e))break;return(r=o.get(n))?r==t:(e|=2,o.set(n,t),t=he(f(n),f(t),e,u,i,o),o.delete(n),t);case"[object Symbol]":if(ro)return ro.call(n)==ro.call(t)}return false}function _e(n){return jo(Ue(n,F,qe),n+"")}function ve(n){return zt(n,Bu,_o)}function ge(n){return zt(n,Lu,vo)}function de(n){for(var t=n.name+"",r=Hi[t],e=fi.call(Hi,t)?r.length:0;e--;){
+var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function ye(n){return(fi.call(On,"placeholder")?On:n).placeholder}function be(){var n=On.iteratee||Nu,n=n===Nu?Ht:n;return arguments.length?n(arguments[0],arguments[1]):n}function xe(n,t){var r=n.__data__,e=typeof t;return("string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t)?r[typeof t=="string"?"string":"hash"]:r.map}function je(n){for(var t=Bu(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,u===u&&!yu(u)]}return t;
+}function we(n,t){var r=null==n?F:n[t];return qt(r)?r:F}function me(n,t,r){t=zr(t,n);for(var e=-1,u=t.length,i=false;++e<u;){var o=Te(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:(u=null==n?0:n.length,!!u&&du(u)&&Se(o,u)&&(cf(n)||ff(n)))}function Ae(n){var t=n.length,r=n.constructor(t);return t&&"string"==typeof n[0]&&fi.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function ke(n){return typeof n.constructor!="function"||We(n)?{}:uo(yi(n))}function Ee(r,e,u,i){var o=r.constructor;
+switch(e){case"[object ArrayBuffer]":return Lr(r);case"[object Boolean]":case"[object Date]":return new o(+r);case"[object DataView]":return e=i?Lr(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Ur(r,i);case"[object Map]":return e=i?u(L(r),1):L(r),
+h(e,n,new r.constructor);case"[object Number]":case"[object String]":return new o(r);case"[object RegExp]":return e=new r.constructor(r.source,dn.exec(r)),e.lastIndex=r.lastIndex,e;case"[object Set]":return e=i?u(D(r),1):D(r),h(e,t,new r.constructor);case"[object Symbol]":return ro?Xu(ro.call(r)):{}}}function Oe(n){return cf(n)||ff(n)||!!(wi&&n&&n[wi])}function Se(n,t){return t=null==t?9007199254740991:t,!!t&&(typeof n=="number"||wn.test(n))&&-1<n&&0==n%1&&n<t}function Ie(n,t,r){if(!yu(r))return false;
+var e=typeof t;return!!("number"==e?hu(r)&&Se(t,r.length):"string"==e&&t in r)&&su(r[t],n)}function Re(n,t){if(cf(n))return false;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!mu(n))||(rn.test(n)||!tn.test(n)||null!=t&&n in Xu(t))}function ze(n){var t=de(n),r=On[t];return typeof r=="function"&&t in Mn.prototype&&(n===r||(t=po(r),!!t&&n===t[0]))}function We(n){var t=n&&n.constructor;return n===(typeof t=="function"&&t.prototype||ui)}function Be(n,t){return function(r){return null!=r&&(r[n]===t&&(t!==F||n in Xu(r)));
+}}function Le(n,t,r,e,u,i){return yu(n)&&yu(t)&&(i.set(t,n),tr(n,t,F,Le,i),i.delete(t)),n}function Ue(n,t,e){return t=Ci(t===F?n.length-1:t,0),function(){for(var u=arguments,i=-1,o=Ci(u.length-t,0),f=Gu(o);++i<o;)f[i]=u[t+i];for(i=-1,o=Gu(t+1);++i<t;)o[i]=u[i];return o[t]=e(f),r(n,this,o)}}function Ce(n,t,r){var e=t+"";t=jo;var u,i=Fe;return u=(u=e.match(hn))?u[1].split(pn):[],r=i(u,r),(i=r.length)&&(u=i-1,r[u]=(1<i?"& ":"")+r[u],r=r.join(2<i?", ":" "),e=e.replace(sn,"{\n/* [wrapped with "+r+"] */\n")),
+t(n,e)}function De(n){var t=0,r=0;return function(){var e=Mi(),u=16-(e-r);if(r=e,0<u){if(800<=++t)return arguments[0]}else t=0;return n.apply(F,arguments)}}function Me(n,t){var r=-1,e=n.length,u=e-1;for(t=t===F?e:t;++r<t;){var e=ar(r,u),i=n[e];n[e]=n[r],n[r]=i}return n.length=t,n}function Te(n){if(typeof n=="string"||mu(n))return n;var t=n+"";return"0"==t&&1/n==-N?"-0":t}function $e(n){if(null!=n){try{return oi.call(n)}catch(n){}return n+""}return""}function Fe(n,t){return u(Z,function(r){var e="_."+r[0];
+t&r[1]&&!c(n,e)&&n.push(e)}),n.sort()}function Ne(n){if(n instanceof Mn)return n.clone();var t=new zn(n.__wrapped__,n.__chain__);return t.__actions__=Tr(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function Pe(n,t,r){var e=null==n?0:n.length;return e?(r=null==r?0:Eu(r),0>r&&(r=Ci(e+r,0)),g(n,be(t,3),r)):-1}function Ze(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==F&&(u=Eu(r),u=0>r?Ci(e+u,0):Di(u,e-1)),g(n,be(t,3),u,true)}function qe(n){return(null==n?0:n.length)?Et(n,1):[];
+}function Ve(n){return n&&n.length?n[0]:F}function Ke(n){var t=null==n?0:n.length;return t?n[t-1]:F}function Ge(n,t){return n&&n.length&&t&&t.length?fr(n,t):n}function He(n){return null==n?n:Fi.call(n)}function Je(n){if(!n||!n.length)return[];var t=0;return n=f(n,function(n){if(pu(n))return t=Ci(n.length,t),true}),E(t,function(t){return l(n,j(t))})}function Ye(n,t){if(!n||!n.length)return[];var e=Je(n);return null==t?e:l(e,function(n){return r(t,F,n)})}function Qe(n){return n=On(n),n.__chain__=true,n;
+}function Xe(n,t){return t(n)}function nu(){return this}function tu(n,t){return(cf(n)?u:io)(n,be(t,3))}function ru(n,t){return(cf(n)?i:oo)(n,be(t,3))}function eu(n,t){return(cf(n)?l:Qt)(n,be(t,3))}function uu(n,t,r){return t=r?F:t,t=n&&null==t?n.length:t,se(n,128,F,F,F,F,t)}function iu(n,t){var r;if(typeof t!="function")throw new ri("Expected a function");return n=Eu(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=F),r}}function ou(n,t,r){return t=r?F:t,n=se(n,8,F,F,F,F,F,t),n.placeholder=ou.placeholder,
+n}function fu(n,t,r){return t=r?F:t,n=se(n,16,F,F,F,F,F,t),n.placeholder=fu.placeholder,n}function cu(n,t,r){function e(t){var r=c,e=a;return c=a=F,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===F||r>=t||0>r||g&&n>=l}function i(){var n=Ho();if(u(n))return o(n);var r,e=xo;r=n-_,n=t-(n-p),r=g?Di(n,l-r):n,h=e(i,r)}function o(n){return h=F,d&&c?e(n):(c=a=F,s)}function f(){var n=Ho(),r=u(n);if(c=arguments,a=this,p=n,r){if(h===F)return _=n=p,h=xo(i,t),v?e(n):s;if(g)return h=xo(i,t),e(p)}return h===F&&(h=xo(i,t)),
+s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!="function")throw new ri("Expected a function");return t=Su(t)||0,yu(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Ci(Su(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==F&&so(h),_=0,c=p=a=h=F},f.flush=function(){return h===F?s:o(Ho())},f}function au(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;return i.has(u)?i.get(u):(e=n.apply(this,e),r.cache=i.set(u,e)||i,e)}if(typeof n!="function"||null!=t&&typeof t!="function")throw new ri("Expected a function");
+return r.cache=new(au.Cache||Pn),r}function lu(n){if(typeof n!="function")throw new ri("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function su(n,t){return n===t||n!==n&&t!==t}function hu(n){return null!=n&&du(n.length)&&!vu(n)}function pu(n){return bu(n)&&hu(n)}function _u(n){if(!bu(n))return false;var t=Wt(n);return"[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!ju(n);
+}function vu(n){return!!yu(n)&&(n=Wt(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function gu(n){return typeof n=="number"&&n==Eu(n)}function du(n){return typeof n=="number"&&-1<n&&0==n%1&&9007199254740991>=n}function yu(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function bu(n){return null!=n&&typeof n=="object"}function xu(n){return typeof n=="number"||bu(n)&&"[object Number]"==Wt(n)}function ju(n){return!(!bu(n)||"[object Object]"!=Wt(n))&&(n=yi(n),
+null===n||(n=fi.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&oi.call(n)==si))}function wu(n){return typeof n=="string"||!cf(n)&&bu(n)&&"[object String]"==Wt(n)}function mu(n){return typeof n=="symbol"||bu(n)&&"[object Symbol]"==Wt(n)}function Au(n){if(!n)return[];if(hu(n))return wu(n)?$(n):Tr(n);if(mi&&n[mi]){n=n[mi]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=go(n),("[object Map]"==t?L:"[object Set]"==t?D:Cu)(n)}function ku(n){return n?(n=Su(n),
+n===N||n===-N?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function Eu(n){n=ku(n);var t=n%1;return n===n?t?n-t:n:0}function Ou(n){return n?dt(Eu(n),0,4294967295):0}function Su(n){if(typeof n=="number")return n;if(mu(n))return P;if(yu(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n,n=yu(n)?n+"":n),typeof n!="string")return 0===n?n:+n;n=n.replace(cn,"");var t=bn.test(n);return t||jn.test(n)?Fn(n.slice(2),t?2:8):yn.test(n)?P:+n}function Iu(n){return $r(n,Lu(n))}function Ru(n){return null==n?"":wr(n);
+}function zu(n,t,r){return n=null==n?F:Rt(n,t),n===F?r:n}function Wu(n,t){return null!=n&&me(n,t,Ut)}function Bu(n){return hu(n)?Gn(n):Jt(n)}function Lu(n){if(hu(n))n=Gn(n,true);else if(yu(n)){var t,r=We(n),e=[];for(t in n)("constructor"!=t||!r&&fi.call(n,t))&&e.push(t);n=e}else{if(t=[],null!=n)for(r in Xu(n))t.push(r);n=t}return n}function Uu(n,t){if(null==n)return{};var r=l(ge(n),function(n){return[n]});return t=be(t),ir(n,r,function(n,r){return t(n,r[0])})}function Cu(n){return null==n?[]:I(n,Bu(n));
+}function Du(n){return Ff(Ru(n).toLowerCase())}function Mu(n){return(n=Ru(n))&&n.replace(mn,rt).replace(Rn,"")}function Tu(n,t,r){return n=Ru(n),t=r?F:t,t===F?Ln.test(n)?n.match(Wn)||[]:n.match(_n)||[]:n.match(t)||[]}function $u(n){return function(){return n}}function Fu(n){return n}function Nu(n){return Ht(typeof n=="function"?n:yt(n,1))}function Pu(n,t,r){var e=Bu(t),i=It(t,e);null!=r||yu(t)&&(i.length||!e.length)||(r=t,t=n,n=this,i=It(t,Bu(t)));var o=!(yu(r)&&"chain"in r&&!r.chain),f=vu(n);return u(i,function(r){
+var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Tr(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,s([this.value()],arguments))})}),n}function Zu(){}function qu(n){return Re(n)?j(Te(n)):or(n)}function Vu(){return[]}function Ku(){return false}En=null==En?Zn:it.defaults(Zn.Object(),En,it.pick(Zn,Un));var Gu=En.Array,Hu=En.Date,Ju=En.Error,Yu=En.Function,Qu=En.Math,Xu=En.Object,ni=En.RegExp,ti=En.String,ri=En.TypeError,ei=Gu.prototype,ui=Xu.prototype,ii=En["__core-js_shared__"],oi=Yu.prototype.toString,fi=ui.hasOwnProperty,ci=0,ai=function(){
+var n=/[^.]+$/.exec(ii&&ii.keys&&ii.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),li=ui.toString,si=oi.call(Xu),hi=Zn._,pi=ni("^"+oi.call(fi).replace(on,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_i=Kn?En.Buffer:F,vi=En.Symbol,gi=En.Uint8Array,di=_i?_i.f:F,yi=U(Xu.getPrototypeOf,Xu),bi=Xu.create,xi=ui.propertyIsEnumerable,ji=ei.splice,wi=vi?vi.isConcatSpreadable:F,mi=vi?vi.iterator:F,Ai=vi?vi.toStringTag:F,ki=function(){try{var n=we(Xu,"defineProperty");
+return n({},"",{}),n}catch(n){}}(),Ei=En.clearTimeout!==Zn.clearTimeout&&En.clearTimeout,Oi=Hu&&Hu.now!==Zn.Date.now&&Hu.now,Si=En.setTimeout!==Zn.setTimeout&&En.setTimeout,Ii=Qu.ceil,Ri=Qu.floor,zi=Xu.getOwnPropertySymbols,Wi=_i?_i.isBuffer:F,Bi=En.isFinite,Li=ei.join,Ui=U(Xu.keys,Xu),Ci=Qu.max,Di=Qu.min,Mi=Hu.now,Ti=En.parseInt,$i=Qu.random,Fi=ei.reverse,Ni=we(En,"DataView"),Pi=we(En,"Map"),Zi=we(En,"Promise"),qi=we(En,"Set"),Vi=we(En,"WeakMap"),Ki=we(Xu,"create"),Gi=Vi&&new Vi,Hi={},Ji=$e(Ni),Yi=$e(Pi),Qi=$e(Zi),Xi=$e(qi),no=$e(Vi),to=vi?vi.prototype:F,ro=to?to.valueOf:F,eo=to?to.toString:F,uo=function(){
+function n(){}return function(t){return yu(t)?bi?bi(t):(n.prototype=t,t=new n,n.prototype=F,t):{}}}();On.templateSettings={escape:Q,evaluate:X,interpolate:nn,variable:"",imports:{_:On}},On.prototype=Sn.prototype,On.prototype.constructor=On,zn.prototype=uo(Sn.prototype),zn.prototype.constructor=zn,Mn.prototype=uo(Sn.prototype),Mn.prototype.constructor=Mn,Tn.prototype.clear=function(){this.__data__=Ki?Ki(null):{},this.size=0},Tn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n],
+this.size-=n?1:0,n},Tn.prototype.get=function(n){var t=this.__data__;return Ki?(n=t[n],"__lodash_hash_undefined__"===n?F:n):fi.call(t,n)?t[n]:F},Tn.prototype.has=function(n){var t=this.__data__;return Ki?t[n]!==F:fi.call(t,n)},Tn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Ki&&t===F?"__lodash_hash_undefined__":t,this},Nn.prototype.clear=function(){this.__data__=[],this.size=0},Nn.prototype.delete=function(n){var t=this.__data__;return n=st(t,n),!(0>n)&&(n==t.length-1?t.pop():ji.call(t,n,1),
+--this.size,true)},Nn.prototype.get=function(n){var t=this.__data__;return n=st(t,n),0>n?F:t[n][1]},Nn.prototype.has=function(n){return-1<st(this.__data__,n)},Nn.prototype.set=function(n,t){var r=this.__data__,e=st(r,n);return 0>e?(++this.size,r.push([n,t])):r[e][1]=t,this},Pn.prototype.clear=function(){this.size=0,this.__data__={hash:new Tn,map:new(Pi||Nn),string:new Tn}},Pn.prototype.delete=function(n){return n=xe(this,n).delete(n),this.size-=n?1:0,n},Pn.prototype.get=function(n){return xe(this,n).get(n);
+},Pn.prototype.has=function(n){return xe(this,n).has(n)},Pn.prototype.set=function(n,t){var r=xe(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},qn.prototype.add=qn.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},qn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.clear=function(){this.__data__=new Nn,this.size=0},Vn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Vn.prototype.get=function(n){
+return this.__data__.get(n)},Vn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Nn){var e=r.__data__;if(!Pi||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Pn(e)}return r.set(n,t),this.size=r.size,this};var io=qr(Ot),oo=qr(St,true),fo=Vr(),co=Vr(true),ao=Gi?function(n,t){return Gi.set(n,t),n}:Fu,lo=ki?function(n,t){return ki(n,"toString",{configurable:true,enumerable:false,value:$u(t),writable:true})}:Fu,so=Ei||function(n){
+return Zn.clearTimeout(n)},ho=qi&&1/D(new qi([,-0]))[1]==N?function(n){return new qi(n)}:Zu,po=Gi?function(n){return Gi.get(n)}:Zu,_o=zi?U(zi,Xu):Vu,vo=zi?function(n){for(var t=[];n;)s(t,_o(n)),n=yi(n);return t}:Vu,go=Wt;(Ni&&"[object DataView]"!=go(new Ni(new ArrayBuffer(1)))||Pi&&"[object Map]"!=go(new Pi)||Zi&&"[object Promise]"!=go(Zi.resolve())||qi&&"[object Set]"!=go(new qi)||Vi&&"[object WeakMap]"!=go(new Vi))&&(go=function(n){var t=Wt(n);if(n=(n="[object Object]"==t?n.constructor:F)?$e(n):"")switch(n){
+case Ji:return"[object DataView]";case Yi:return"[object Map]";case Qi:return"[object Promise]";case Xi:return"[object Set]";case no:return"[object WeakMap]"}return t});var yo=ii?vu:Ku,bo=De(ao),xo=Si||function(n,t){return Zn.setTimeout(n,t)},jo=De(lo),wo=function(n){n=au(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return en.test(n)&&t.push(""),n.replace(un,function(n,r,e,u){t.push(e?u.replace(vn,"$1"):r||n)}),t}),mo=sr(function(n,t){return pu(n)?wt(n,Et(t,1,pu,true)):[];
+}),Ao=sr(function(n,t){var r=Ke(t);return pu(r)&&(r=F),pu(n)?wt(n,Et(t,1,pu,true),be(r,2)):[]}),ko=sr(function(n,t){var r=Ke(t);return pu(r)&&(r=F),pu(n)?wt(n,Et(t,1,pu,true),F,r):[]}),Eo=sr(function(n){var t=l(n,Ir);return t.length&&t[0]===n[0]?Ct(t):[]}),Oo=sr(function(n){var t=Ke(n),r=l(n,Ir);return t===Ke(r)?t=F:r.pop(),r.length&&r[0]===n[0]?Ct(r,be(t,2)):[]}),So=sr(function(n){var t=Ke(n),r=l(n,Ir);return(t=typeof t=="function"?t:F)&&r.pop(),r.length&&r[0]===n[0]?Ct(r,F,t):[]}),Io=sr(Ge),Ro=_e(function(n,t){
+var r=null==n?0:n.length,e=gt(n,t);return cr(n,l(t,function(n){return Se(n,r)?+n:n}).sort(Cr)),e}),zo=sr(function(n){return mr(Et(n,1,pu,true))}),Wo=sr(function(n){var t=Ke(n);return pu(t)&&(t=F),mr(Et(n,1,pu,true),be(t,2))}),Bo=sr(function(n){var t=Ke(n),t=typeof t=="function"?t:F;return mr(Et(n,1,pu,true),F,t)}),Lo=sr(function(n,t){return pu(n)?wt(n,t):[]}),Uo=sr(function(n){return Or(f(n,pu))}),Co=sr(function(n){var t=Ke(n);return pu(t)&&(t=F),Or(f(n,pu),be(t,2))}),Do=sr(function(n){var t=Ke(n),t=typeof t=="function"?t:F;
+return Or(f(n,pu),F,t)}),Mo=sr(Je),To=sr(function(n){var t=n.length,t=1<t?n[t-1]:F,t=typeof t=="function"?(n.pop(),t):F;return Ye(n,t)}),$o=_e(function(n){function t(t){return gt(t,n)}var r=n.length,e=r?n[0]:0,u=this.__wrapped__;return!(1<r||this.__actions__.length)&&u instanceof Mn&&Se(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:Xe,args:[t],thisArg:F}),new zn(u,this.__chain__).thru(function(n){return r&&!n.length&&n.push(F),n})):this.thru(t)}),Fo=Pr(function(n,t,r){fi.call(n,r)?++n[r]:vt(n,r,1);
+}),No=Qr(Pe),Po=Qr(Ze),Zo=Pr(function(n,t,r){fi.call(n,r)?n[r].push(t):vt(n,r,[t])}),qo=sr(function(n,t,e){var u=-1,i=typeof t=="function",o=hu(n)?Gu(n.length):[];return io(n,function(n){o[++u]=i?r(t,n,e):Mt(n,t,e)}),o}),Vo=Pr(function(n,t,r){vt(n,r,t)}),Ko=Pr(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),Go=sr(function(n,t){if(null==n)return[];var r=t.length;return 1<r&&Ie(n,t[0],t[1])?t=[]:2<r&&Ie(t[0],t[1],t[2])&&(t=[t[0]]),er(n,Et(t,1),[])}),Ho=Oi||function(){return Zn.Date.now();
+},Jo=sr(function(n,t,r){var e=1;if(r.length)var u=C(r,ye(Jo)),e=32|e;return se(n,e,t,r,u)}),Yo=sr(function(n,t,r){var e=3;if(r.length)var u=C(r,ye(Yo)),e=32|e;return se(t,e,n,r,u)}),Qo=sr(function(n,t){return jt(n,1,t)}),Xo=sr(function(n,t,r){return jt(n,Su(t)||0,r)});au.Cache=Pn;var nf=sr(function(n,t){t=1==t.length&&cf(t[0])?l(t[0],S(be())):l(Et(t,1),S(be()));var e=t.length;return sr(function(u){for(var i=-1,o=Di(u.length,e);++i<o;)u[i]=t[i].call(this,u[i]);return r(n,this,u)})}),tf=sr(function(n,t){
+return se(n,32,F,t,C(t,ye(tf)))}),rf=sr(function(n,t){return se(n,64,F,t,C(t,ye(rf)))}),ef=_e(function(n,t){return se(n,256,F,F,F,t)}),uf=fe(Bt),of=fe(function(n,t){return n>=t}),ff=Tt(function(){return arguments}())?Tt:function(n){return bu(n)&&fi.call(n,"callee")&&!xi.call(n,"callee")},cf=Gu.isArray,af=Hn?S(Hn):$t,lf=Wi||Ku,sf=Jn?S(Jn):Ft,hf=Yn?S(Yn):Pt,pf=Qn?S(Qn):Vt,_f=Xn?S(Xn):Kt,vf=nt?S(nt):Gt,gf=fe(Yt),df=fe(function(n,t){return n<=t}),yf=Zr(function(n,t){if(We(t)||hu(t))$r(t,Bu(t),n);else for(var r in t)fi.call(t,r)&&lt(n,r,t[r]);
+}),bf=Zr(function(n,t){$r(t,Lu(t),n)}),xf=Zr(function(n,t,r,e){$r(t,Lu(t),n,e)}),jf=Zr(function(n,t,r,e){$r(t,Bu(t),n,e)}),wf=_e(gt),mf=sr(function(n){return n.push(F,ct),r(xf,F,n)}),Af=sr(function(n){return n.push(F,Le),r(If,F,n)}),kf=te(function(n,t,r){n[t]=r},$u(Fu)),Ef=te(function(n,t,r){fi.call(n,t)?n[t].push(r):n[t]=[r]},be),Of=sr(Mt),Sf=Zr(function(n,t,r){tr(n,t,r)}),If=Zr(function(n,t,r,e){tr(n,t,r,e)}),Rf=_e(function(n,t){var r={};if(null==n)return r;var e=false;t=l(t,function(t){return t=zr(t,n),
+e||(e=1<t.length),t}),$r(n,ge(n),r),e&&(r=yt(r,7));for(var u=t.length;u--;)Ar(r,t[u]);return r}),zf=_e(function(n,t){return null==n?{}:ur(n,t)}),Wf=le(Bu),Bf=le(Lu),Lf=Hr(function(n,t,r){return t=t.toLowerCase(),n+(r?Du(t):t)}),Uf=Hr(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Cf=Hr(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Df=Gr("toLowerCase"),Mf=Hr(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}),Tf=Hr(function(n,t,r){return n+(r?" ":"")+Ff(t)}),$f=Hr(function(n,t,r){
+return n+(r?" ":"")+t.toUpperCase()}),Ff=Gr("toUpperCase"),Nf=sr(function(n,t){try{return r(n,F,t)}catch(n){return _u(n)?n:new Ju(n)}}),Pf=_e(function(n,t){return u(t,function(t){t=Te(t),vt(n,t,Jo(n[t],n))}),n}),Zf=Xr(),qf=Xr(true),Vf=sr(function(n,t){return function(r){return Mt(r,n,t)}}),Kf=sr(function(n,t){return function(r){return Mt(n,r,t)}}),Gf=ee(l),Hf=ee(o),Jf=ee(_),Yf=oe(),Qf=oe(true),Xf=re(function(n,t){return n+t},0),nc=ae("ceil"),tc=re(function(n,t){return n/t},1),rc=ae("floor"),ec=re(function(n,t){
+return n*t},1),uc=ae("round"),ic=re(function(n,t){return n-t},0);return On.after=function(n,t){if(typeof t!="function")throw new ri("Expected a function");return n=Eu(n),function(){if(1>--n)return t.apply(this,arguments)}},On.ary=uu,On.assign=yf,On.assignIn=bf,On.assignInWith=xf,On.assignWith=jf,On.at=wf,On.before=iu,On.bind=Jo,On.bindAll=Pf,On.bindKey=Yo,On.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return cf(n)?n:[n]},On.chain=Qe,On.chunk=function(n,t,r){if(t=(r?Ie(n,t,r):t===F)?1:Ci(Eu(t),0),
+r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Gu(Ii(r/t));e<r;)i[u++]=gr(n,e,e+=t);return i},On.compact=function(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){var i=n[t];i&&(u[e++]=i)}return u},On.concat=function(){var n=arguments.length;if(!n)return[];for(var t=Gu(n-1),r=arguments[0];n--;)t[n-1]=arguments[n];return s(cf(r)?Tr(r):[r],Et(t,1))},On.cond=function(n){var t=null==n?0:n.length,e=be();return n=t?l(n,function(n){if("function"!=typeof n[1])throw new ri("Expected a function");
+return[e(n[0]),n[1]]}):[],sr(function(e){for(var u=-1;++u<t;){var i=n[u];if(r(i[0],this,e))return r(i[1],this,e)}})},On.conforms=function(n){return bt(yt(n,1))},On.constant=$u,On.countBy=Fo,On.create=function(n,t){var r=uo(n);return null==t?r:pt(r,t)},On.curry=ou,On.curryRight=fu,On.debounce=cu,On.defaults=mf,On.defaultsDeep=Af,On.defer=Qo,On.delay=Xo,On.difference=mo,On.differenceBy=Ao,On.differenceWith=ko,On.drop=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Eu(t),gr(n,0>t?0:t,e)):[];
+},On.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Eu(t),t=e-t,gr(n,0,0>t?0:t)):[]},On.dropRightWhile=function(n,t){return n&&n.length?kr(n,be(t,3),true,true):[]},On.dropWhile=function(n,t){return n&&n.length?kr(n,be(t,3),true):[]},On.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!="number"&&Ie(n,t,r)&&(r=0,e=u),u=n.length,r=Eu(r),0>r&&(r=-r>u?0:u+r),e=e===F||e>u?u:Eu(e),0>e&&(e+=u),e=r>e?0:Ou(e);r<e;)n[r++]=t;return n},On.filter=function(n,t){
+return(cf(n)?f:kt)(n,be(t,3))},On.flatMap=function(n,t){return Et(eu(n,t),1)},On.flatMapDeep=function(n,t){return Et(eu(n,t),N)},On.flatMapDepth=function(n,t,r){return r=r===F?1:Eu(r),Et(eu(n,t),r)},On.flatten=qe,On.flattenDeep=function(n){return(null==n?0:n.length)?Et(n,N):[]},On.flattenDepth=function(n,t){return null!=n&&n.length?(t=t===F?1:Eu(t),Et(n,t)):[]},On.flip=function(n){return se(n,512)},On.flow=Zf,On.flowRight=qf,On.fromPairs=function(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){
+var u=n[t];e[u[0]]=u[1]}return e},On.functions=function(n){return null==n?[]:It(n,Bu(n))},On.functionsIn=function(n){return null==n?[]:It(n,Lu(n))},On.groupBy=Zo,On.initial=function(n){return(null==n?0:n.length)?gr(n,0,-1):[]},On.intersection=Eo,On.intersectionBy=Oo,On.intersectionWith=So,On.invert=kf,On.invertBy=Ef,On.invokeMap=qo,On.iteratee=Nu,On.keyBy=Vo,On.keys=Bu,On.keysIn=Lu,On.map=eu,On.mapKeys=function(n,t){var r={};return t=be(t,3),Ot(n,function(n,e,u){vt(r,t(n,e,u),n)}),r},On.mapValues=function(n,t){
+var r={};return t=be(t,3),Ot(n,function(n,e,u){vt(r,e,t(n,e,u))}),r},On.matches=function(n){return Xt(yt(n,1))},On.matchesProperty=function(n,t){return nr(n,yt(t,1))},On.memoize=au,On.merge=Sf,On.mergeWith=If,On.method=Vf,On.methodOf=Kf,On.mixin=Pu,On.negate=lu,On.nthArg=function(n){return n=Eu(n),sr(function(t){return rr(t,n)})},On.omit=Rf,On.omitBy=function(n,t){return Uu(n,lu(be(t)))},On.once=function(n){return iu(2,n)},On.orderBy=function(n,t,r,e){return null==n?[]:(cf(t)||(t=null==t?[]:[t]),
+r=e?F:r,cf(r)||(r=null==r?[]:[r]),er(n,t,r))},On.over=Gf,On.overArgs=nf,On.overEvery=Hf,On.overSome=Jf,On.partial=tf,On.partialRight=rf,On.partition=Ko,On.pick=zf,On.pickBy=Uu,On.property=qu,On.propertyOf=function(n){return function(t){return null==n?F:Rt(n,t)}},On.pull=Io,On.pullAll=Ge,On.pullAllBy=function(n,t,r){return n&&n.length&&t&&t.length?fr(n,t,be(r,2)):n},On.pullAllWith=function(n,t,r){return n&&n.length&&t&&t.length?fr(n,t,F,r):n},On.pullAt=Ro,On.range=Yf,On.rangeRight=Qf,On.rearg=ef,On.reject=function(n,t){
+return(cf(n)?f:kt)(n,lu(be(t,3)))},On.remove=function(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=be(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),u.push(e))}return cr(n,u),r},On.rest=function(n,t){if(typeof n!="function")throw new ri("Expected a function");return t=t===F?t:Eu(t),sr(n,t)},On.reverse=He,On.sampleSize=function(n,t,r){return t=(r?Ie(n,t,r):t===F)?1:Eu(t),(cf(n)?ot:pr)(n,t)},On.set=function(n,t,r){return null==n?n:_r(n,t,r)},On.setWith=function(n,t,r,e){return e=typeof e=="function"?e:F,
+null==n?n:_r(n,t,r,e)},On.shuffle=function(n){return(cf(n)?ft:vr)(n)},On.slice=function(n,t,r){var e=null==n?0:n.length;return e?(r&&typeof r!="number"&&Ie(n,t,r)?(t=0,r=e):(t=null==t?0:Eu(t),r=r===F?e:Eu(r)),gr(n,t,r)):[]},On.sortBy=Go,On.sortedUniq=function(n){return n&&n.length?xr(n):[]},On.sortedUniqBy=function(n,t){return n&&n.length?xr(n,be(t,2)):[]},On.split=function(n,t,r){return r&&typeof r!="number"&&Ie(n,t,r)&&(t=r=F),r=r===F?4294967295:r>>>0,r?(n=Ru(n))&&(typeof t=="string"||null!=t&&!pf(t))&&(t=wr(t),
+!t&&Bn.test(n))?Wr($(n),0,r):n.split(t,r):[]},On.spread=function(n,t){if(typeof n!="function")throw new ri("Expected a function");return t=t===F?0:Ci(Eu(t),0),sr(function(e){var u=e[t];return e=Wr(e,0,t),u&&s(e,u),r(n,this,e)})},On.tail=function(n){var t=null==n?0:n.length;return t?gr(n,1,t):[]},On.take=function(n,t,r){return n&&n.length?(t=r||t===F?1:Eu(t),gr(n,0,0>t?0:t)):[]},On.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Eu(t),t=e-t,gr(n,0>t?0:t,e)):[]},On.takeRightWhile=function(n,t){
+return n&&n.length?kr(n,be(t,3),false,true):[]},On.takeWhile=function(n,t){return n&&n.length?kr(n,be(t,3)):[]},On.tap=function(n,t){return t(n),n},On.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new ri("Expected a function");return yu(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),cu(n,t,{leading:e,maxWait:t,trailing:u})},On.thru=Xe,On.toArray=Au,On.toPairs=Wf,On.toPairsIn=Bf,On.toPath=function(n){return cf(n)?l(n,Te):mu(n)?[n]:Tr(wo(Ru(n)))},On.toPlainObject=Iu,
+On.transform=function(n,t,r){var e=cf(n),i=e||lf(n)||vf(n);if(t=be(t,4),null==r){var o=n&&n.constructor;r=i?e?new o:[]:yu(n)&&vu(o)?uo(yi(n)):{}}return(i?u:Ot)(n,function(n,e,u){return t(r,n,e,u)}),r},On.unary=function(n){return uu(n,1)},On.union=zo,On.unionBy=Wo,On.unionWith=Bo,On.uniq=function(n){return n&&n.length?mr(n):[]},On.uniqBy=function(n,t){return n&&n.length?mr(n,be(t,2)):[]},On.uniqWith=function(n,t){return t=typeof t=="function"?t:F,n&&n.length?mr(n,F,t):[]},On.unset=function(n,t){return null==n||Ar(n,t);
+},On.unzip=Je,On.unzipWith=Ye,On.update=function(n,t,r){return null==n?n:_r(n,t,Rr(r)(Rt(n,t)),void 0)},On.updateWith=function(n,t,r,e){return e=typeof e=="function"?e:F,null!=n&&(n=_r(n,t,Rr(r)(Rt(n,t)),e)),n},On.values=Cu,On.valuesIn=function(n){return null==n?[]:I(n,Lu(n))},On.without=Lo,On.words=Tu,On.wrap=function(n,t){return tf(Rr(t),n)},On.xor=Uo,On.xorBy=Co,On.xorWith=Do,On.zip=Mo,On.zipObject=function(n,t){return Sr(n||[],t||[],lt)},On.zipObjectDeep=function(n,t){return Sr(n||[],t||[],_r);
+},On.zipWith=To,On.entries=Wf,On.entriesIn=Bf,On.extend=bf,On.extendWith=xf,Pu(On,On),On.add=Xf,On.attempt=Nf,On.camelCase=Lf,On.capitalize=Du,On.ceil=nc,On.clamp=function(n,t,r){return r===F&&(r=t,t=F),r!==F&&(r=Su(r),r=r===r?r:0),t!==F&&(t=Su(t),t=t===t?t:0),dt(Su(n),t,r)},On.clone=function(n){return yt(n,4)},On.cloneDeep=function(n){return yt(n,5)},On.cloneDeepWith=function(n,t){return t=typeof t=="function"?t:F,yt(n,5,t)},On.cloneWith=function(n,t){return t=typeof t=="function"?t:F,yt(n,4,t)},
+On.conformsTo=function(n,t){return null==t||xt(n,t,Bu(t))},On.deburr=Mu,On.defaultTo=function(n,t){return null==n||n!==n?t:n},On.divide=tc,On.endsWith=function(n,t,r){n=Ru(n),t=wr(t);var e=n.length,e=r=r===F?e:dt(Eu(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},On.eq=su,On.escape=function(n){return(n=Ru(n))&&Y.test(n)?n.replace(H,et):n},On.escapeRegExp=function(n){return(n=Ru(n))&&fn.test(n)?n.replace(on,"\\$&"):n},On.every=function(n,t,r){var e=cf(n)?o:mt;return r&&Ie(n,t,r)&&(t=F),e(n,be(t,3));
+},On.find=No,On.findIndex=Pe,On.findKey=function(n,t){return v(n,be(t,3),Ot)},On.findLast=Po,On.findLastIndex=Ze,On.findLastKey=function(n,t){return v(n,be(t,3),St)},On.floor=rc,On.forEach=tu,On.forEachRight=ru,On.forIn=function(n,t){return null==n?n:fo(n,be(t,3),Lu)},On.forInRight=function(n,t){return null==n?n:co(n,be(t,3),Lu)},On.forOwn=function(n,t){return n&&Ot(n,be(t,3))},On.forOwnRight=function(n,t){return n&&St(n,be(t,3))},On.get=zu,On.gt=uf,On.gte=of,On.has=function(n,t){return null!=n&&me(n,t,Lt);
+},On.hasIn=Wu,On.head=Ve,On.identity=Fu,On.includes=function(n,t,r,e){return n=hu(n)?n:Cu(n),r=r&&!e?Eu(r):0,e=n.length,0>r&&(r=Ci(e+r,0)),wu(n)?r<=e&&-1<n.indexOf(t,r):!!e&&-1<d(n,t,r)},On.indexOf=function(n,t,r){var e=null==n?0:n.length;return e?(r=null==r?0:Eu(r),0>r&&(r=Ci(e+r,0)),d(n,t,r)):-1},On.inRange=function(n,t,r){return t=ku(t),r===F?(r=t,t=0):r=ku(r),n=Su(n),n>=Di(t,r)&&n<Ci(t,r)},On.invoke=Of,On.isArguments=ff,On.isArray=cf,On.isArrayBuffer=af,On.isArrayLike=hu,On.isArrayLikeObject=pu,
+On.isBoolean=function(n){return true===n||false===n||bu(n)&&"[object Boolean]"==Wt(n)},On.isBuffer=lf,On.isDate=sf,On.isElement=function(n){return bu(n)&&1===n.nodeType&&!ju(n)},On.isEmpty=function(n){if(null==n)return true;if(hu(n)&&(cf(n)||typeof n=="string"||typeof n.splice=="function"||lf(n)||vf(n)||ff(n)))return!n.length;var t=go(n);if("[object Map]"==t||"[object Set]"==t)return!n.size;if(We(n))return!Jt(n).length;for(var r in n)if(fi.call(n,r))return false;return true},On.isEqual=function(n,t){return Nt(n,t);
+},On.isEqualWith=function(n,t,r){var e=(r=typeof r=="function"?r:F)?r(n,t):F;return e===F?Nt(n,t,F,r):!!e},On.isError=_u,On.isFinite=function(n){return typeof n=="number"&&Bi(n)},On.isFunction=vu,On.isInteger=gu,On.isLength=du,On.isMap=hf,On.isMatch=function(n,t){return n===t||Zt(n,t,je(t))},On.isMatchWith=function(n,t,r){return r=typeof r=="function"?r:F,Zt(n,t,je(t),r)},On.isNaN=function(n){return xu(n)&&n!=+n},On.isNative=function(n){if(yo(n))throw new Ju("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");
+return qt(n)},On.isNil=function(n){return null==n},On.isNull=function(n){return null===n},On.isNumber=xu,On.isObject=yu,On.isObjectLike=bu,On.isPlainObject=ju,On.isRegExp=pf,On.isSafeInteger=function(n){return gu(n)&&-9007199254740991<=n&&9007199254740991>=n},On.isSet=_f,On.isString=wu,On.isSymbol=mu,On.isTypedArray=vf,On.isUndefined=function(n){return n===F},On.isWeakMap=function(n){return bu(n)&&"[object WeakMap]"==go(n)},On.isWeakSet=function(n){return bu(n)&&"[object WeakSet]"==Wt(n)},On.join=function(n,t){
+return null==n?"":Li.call(n,t)},On.kebabCase=Uf,On.last=Ke,On.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==F&&(u=Eu(r),u=0>u?Ci(e+u,0):Di(u,e-1)),t===t){for(r=u+1;r--&&n[r]!==t;);n=r}else n=g(n,b,u,true);return n},On.lowerCase=Cf,On.lowerFirst=Df,On.lt=gf,On.lte=df,On.max=function(n){return n&&n.length?At(n,Fu,Bt):F},On.maxBy=function(n,t){return n&&n.length?At(n,be(t,2),Bt):F},On.mean=function(n){return x(n,Fu)},On.meanBy=function(n,t){return x(n,be(t,2))},On.min=function(n){
+return n&&n.length?At(n,Fu,Yt):F},On.minBy=function(n,t){return n&&n.length?At(n,be(t,2),Yt):F},On.stubArray=Vu,On.stubFalse=Ku,On.stubObject=function(){return{}},On.stubString=function(){return""},On.stubTrue=function(){return true},On.multiply=ec,On.nth=function(n,t){return n&&n.length?rr(n,Eu(t)):F},On.noConflict=function(){return Zn._===this&&(Zn._=hi),this},On.noop=Zu,On.now=Ho,On.pad=function(n,t,r){n=Ru(n);var e=(t=Eu(t))?T(n):0;return!t||e>=t?n:(t=(t-e)/2,ue(Ri(t),r)+n+ue(Ii(t),r))},On.padEnd=function(n,t,r){
+n=Ru(n);var e=(t=Eu(t))?T(n):0;return t&&e<t?n+ue(t-e,r):n},On.padStart=function(n,t,r){n=Ru(n);var e=(t=Eu(t))?T(n):0;return t&&e<t?ue(t-e,r)+n:n},On.parseInt=function(n,t,r){return r||null==t?t=0:t&&(t=+t),Ti(Ru(n).replace(an,""),t||0)},On.random=function(n,t,r){if(r&&typeof r!="boolean"&&Ie(n,t,r)&&(t=r=F),r===F&&(typeof t=="boolean"?(r=t,t=F):typeof n=="boolean"&&(r=n,n=F)),n===F&&t===F?(n=0,t=1):(n=ku(n),t===F?(t=n,n=0):t=ku(t)),n>t){var e=n;n=t,t=e}return r||n%1||t%1?(r=$i(),Di(n+r*(t-n+$n("1e-"+((r+"").length-1))),t)):ar(n,t);
+},On.reduce=function(n,t,r){var e=cf(n)?h:m,u=3>arguments.length;return e(n,be(t,4),r,u,io)},On.reduceRight=function(n,t,r){var e=cf(n)?p:m,u=3>arguments.length;return e(n,be(t,4),r,u,oo)},On.repeat=function(n,t,r){return t=(r?Ie(n,t,r):t===F)?1:Eu(t),lr(Ru(n),t)},On.replace=function(){var n=arguments,t=Ru(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},On.result=function(n,t,r){t=zr(t,n);var e=-1,u=t.length;for(u||(u=1,n=F);++e<u;){var i=null==n?F:n[Te(t[e])];i===F&&(e=u,i=r),n=vu(i)?i.call(n):i;
+}return n},On.round=uc,On.runInContext=w,On.sample=function(n){return(cf(n)?tt:hr)(n)},On.size=function(n){if(null==n)return 0;if(hu(n))return wu(n)?T(n):n.length;var t=go(n);return"[object Map]"==t||"[object Set]"==t?n.size:Jt(n).length},On.snakeCase=Mf,On.some=function(n,t,r){var e=cf(n)?_:dr;return r&&Ie(n,t,r)&&(t=F),e(n,be(t,3))},On.sortedIndex=function(n,t){return yr(n,t)},On.sortedIndexBy=function(n,t,r){return br(n,t,be(r,2))},On.sortedIndexOf=function(n,t){var r=null==n?0:n.length;if(r){
+var e=yr(n,t);if(e<r&&su(n[e],t))return e}return-1},On.sortedLastIndex=function(n,t){return yr(n,t,true)},On.sortedLastIndexBy=function(n,t,r){return br(n,t,be(r,2),true)},On.sortedLastIndexOf=function(n,t){if(null==n?0:n.length){var r=yr(n,t,true)-1;if(su(n[r],t))return r}return-1},On.startCase=Tf,On.startsWith=function(n,t,r){return n=Ru(n),r=dt(Eu(r),0,n.length),t=wr(t),n.slice(r,r+t.length)==t},On.subtract=ic,On.sum=function(n){return n&&n.length?k(n,Fu):0},On.sumBy=function(n,t){return n&&n.length?k(n,be(t,2)):0;
+},On.template=function(n,t,r){var e=On.templateSettings;r&&Ie(n,t,r)&&(t=F),n=Ru(n),t=xf({},t,e,ct),r=xf({},t.imports,e.imports,ct);var u,i,o=Bu(r),f=I(r,o),c=0;r=t.interpolate||An;var a="__p+='";r=ni((t.escape||An).source+"|"+r.source+"|"+(r===nn?gn:An).source+"|"+(t.evaluate||An).source+"|$","g");var l="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,o,f,l){return e||(e=o),a+=n.slice(c,l).replace(kn,B),r&&(u=true,a+="'+__e("+r+")+'"),f&&(i=true,a+="';"+f+";\n__p+='"),
+e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+t.length,t}),a+="';",(t=t.variable)||(a="with(obj){"+a+"}"),a=(i?a.replace(q,""):a).replace(V,"$1").replace(K,"$1;"),a="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",t=Nf(function(){return Yu(o,l+"return "+a).apply(F,f)}),t.source=a,_u(t))throw t;return t},On.times=function(n,t){if(n=Eu(n),1>n||9007199254740991<n)return[];
+var r=4294967295,e=Di(n,4294967295);for(t=be(t),n-=4294967295,e=E(e,t);++r<n;)t(r);return e},On.toFinite=ku,On.toInteger=Eu,On.toLength=Ou,On.toLower=function(n){return Ru(n).toLowerCase()},On.toNumber=Su,On.toSafeInteger=function(n){return dt(Eu(n),-9007199254740991,9007199254740991)},On.toString=Ru,On.toUpper=function(n){return Ru(n).toUpperCase()},On.trim=function(n,t,r){return(n=Ru(n))&&(r||t===F)?n.replace(cn,""):n&&(t=wr(t))?(n=$(n),r=$(t),t=z(n,r),r=W(n,r)+1,Wr(n,t,r).join("")):n},On.trimEnd=function(n,t,r){
+return(n=Ru(n))&&(r||t===F)?n.replace(ln,""):n&&(t=wr(t))?(n=$(n),t=W(n,$(t))+1,Wr(n,0,t).join("")):n},On.trimStart=function(n,t,r){return(n=Ru(n))&&(r||t===F)?n.replace(an,""):n&&(t=wr(t))?(n=$(n),t=z(n,$(t)),Wr(n,t).join("")):n},On.truncate=function(n,t){var r=30,e="...";if(yu(t))var u="separator"in t?t.separator:u,r="length"in t?Eu(t.length):r,e="omission"in t?wr(t.omission):e;n=Ru(n);var i=n.length;if(Bn.test(n))var o=$(n),i=o.length;if(r>=i)return n;if(i=r-T(e),1>i)return e;if(r=o?Wr(o,0,i).join(""):n.slice(0,i),
+u===F)return r+e;if(o&&(i+=r.length-i),pf(u)){if(n.slice(i).search(u)){var f=r;for(u.global||(u=ni(u.source,Ru(dn.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===F?i:c)}}else n.indexOf(wr(u),i)!=i&&(u=r.lastIndexOf(u),-1<u&&(r=r.slice(0,u)));return r+e},On.unescape=function(n){return(n=Ru(n))&&J.test(n)?n.replace(G,ut):n},On.uniqueId=function(n){var t=++ci;return Ru(n)+t},On.upperCase=$f,On.upperFirst=Ff,On.each=tu,On.eachRight=ru,On.first=Ve,Pu(On,function(){var n={};return Ot(On,function(t,r){
+fi.call(On.prototype,r)||(n[r]=t)}),n}(),{chain:false}),On.VERSION="4.17.2",u("bind bindKey curry curryRight partial partialRight".split(" "),function(n){On[n].placeholder=On}),u(["drop","take"],function(n,t){Mn.prototype[n]=function(r){var e=this.__filtered__;if(e&&!t)return new Mn(this);r=r===F?1:Ci(Eu(r),0);var u=this.clone();return e?u.__takeCount__=Di(r,u.__takeCount__):u.__views__.push({size:Di(r,4294967295),type:n+(0>u.__dir__?"Right":"")}),u},Mn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse();
+}}),u(["filter","map","takeWhile"],function(n,t){var r=t+1,e=1==r||3==r;Mn.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:be(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),u(["head","last"],function(n,t){var r="take"+(t?"Right":"");Mn.prototype[n]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Mn.prototype[n]=function(){return this.__filtered__?new Mn(this):this[r](1)}}),Mn.prototype.compact=function(){
+return this.filter(Fu)},Mn.prototype.find=function(n){return this.filter(n).head()},Mn.prototype.findLast=function(n){return this.reverse().find(n)},Mn.prototype.invokeMap=sr(function(n,t){return typeof n=="function"?new Mn(this):this.map(function(r){return Mt(r,n,t)})}),Mn.prototype.reject=function(n){return this.filter(lu(be(n)))},Mn.prototype.slice=function(n,t){n=Eu(n);var r=this;return r.__filtered__&&(0<n||0>t)?new Mn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==F&&(t=Eu(t),r=0>t?r.dropRight(-t):r.take(t-n)),
+r)},Mn.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Mn.prototype.toArray=function(){return this.take(4294967295)},Ot(Mn.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=On[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(On.prototype[t]=function(){function t(n){return n=u.apply(On,s([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Mn,a=f[0],l=c||cf(o);l&&r&&typeof a=="function"&&1!=a.length&&(c=l=false);
+var h=this.__chain__,p=!!this.__actions__.length,a=i&&!h,c=c&&!p;return!i&&l?(o=c?o:new Mn(this),o=n.apply(o,f),o.__actions__.push({func:Xe,args:[t],thisArg:F}),new zn(o,h)):a&&c?n.apply(this,f):(o=this.thru(t),a?e?o.value()[0]:o.value():o)})}),u("pop push shift sort splice unshift".split(" "),function(n){var t=ei[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);On.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(cf(u)?u:[],n);
+}return this[r](function(r){return t.apply(cf(r)?r:[],n)})}}),Ot(Mn.prototype,function(n,t){var r=On[t];if(r){var e=r.name+"";(Hi[e]||(Hi[e]=[])).push({name:t,func:r})}}),Hi[ne(F,2).name]=[{name:"wrapper",func:F}],Mn.prototype.clone=function(){var n=new Mn(this.__wrapped__);return n.__actions__=Tr(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Tr(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Tr(this.__views__),n},Mn.prototype.reverse=function(){
+if(this.__filtered__){var n=new Mn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Mn.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=cf(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++c<a;){var l=o[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":n-=s;break;case"take":n=Di(n,f+s);break;case"takeRight":f=Ci(f,n-s)}}if(n={start:f,end:n},o=n.start,f=n.end,n=f-o,u=u?f:o-1,o=this.__iteratees__,f=o.length,
+c=0,a=Di(n,this.__takeCount__),!e||200>i||i==n&&a==n)return Er(t,this.__actions__);e=[];n:for(;n--&&c<a;){for(u+=r,i=-1,l=t[u];++i<f;){var h=o[i],s=h.type,h=(0,h.iteratee)(l);if(2==s)l=h;else if(!h){if(1==s)continue n;break n}}e[c++]=l}return e},On.prototype.at=$o,On.prototype.chain=function(){return Qe(this)},On.prototype.commit=function(){return new zn(this.value(),this.__chain__)},On.prototype.next=function(){this.__values__===F&&(this.__values__=Au(this.value()));var n=this.__index__>=this.__values__.length;
+return{done:n,value:n?F:this.__values__[this.__index__++]}},On.prototype.plant=function(n){for(var t,r=this;r instanceof Sn;){var e=Ne(r);e.__index__=0,e.__values__=F,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},On.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Mn?(this.__actions__.length&&(n=new Mn(this)),n=n.reverse(),n.__actions__.push({func:Xe,args:[He],thisArg:F}),new zn(n,this.__chain__)):this.thru(He)},On.prototype.toJSON=On.prototype.valueOf=On.prototype.value=function(){
+return Er(this.__wrapped__,this.__actions__)},On.prototype.first=On.prototype.head,mi&&(On.prototype[mi]=nu),On}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Zn._=it, define(function(){return it})):Vn?((Vn.exports=it)._=it,qn._=it):Zn._=it}).call(this); \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lowerCase.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lowerCase.js
new file mode 100644
index 0000000..66c1f49
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lowerCase.js
@@ -0,0 +1,27 @@
+var createCompounder = require('./_createCompounder');
+
+/**
+ * Converts `string`, as space separated words, to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the lower cased string.
+ * @example
+ *
+ * _.lowerCase('--Foo-Bar--');
+ * // => 'foo bar'
+ *
+ * _.lowerCase('fooBar');
+ * // => 'foo bar'
+ *
+ * _.lowerCase('__FOO_BAR__');
+ * // => 'foo bar'
+ */
+var lowerCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + word.toLowerCase();
+});
+
+module.exports = lowerCase;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lowerFirst.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lowerFirst.js
new file mode 100644
index 0000000..c08f082
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lowerFirst.js
@@ -0,0 +1,22 @@
+var createCaseFirst = require('./_createCaseFirst');
+
+/**
+ * Converts the first character of `string` to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.lowerFirst('Fred');
+ * // => 'fred'
+ *
+ * _.lowerFirst('FRED');
+ * // => 'fRED'
+ */
+var lowerFirst = createCaseFirst('toLowerCase');
+
+module.exports = lowerFirst;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lt.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lt.js
new file mode 100644
index 0000000..813866e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lt.js
@@ -0,0 +1,29 @@
+var baseLt = require('./_baseLt'),
+ createRelationalOperation = require('./_createRelationalOperation');
+
+/**
+ * Checks if `value` is less than `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ * @see _.gt
+ * @example
+ *
+ * _.lt(1, 3);
+ * // => true
+ *
+ * _.lt(3, 3);
+ * // => false
+ *
+ * _.lt(3, 1);
+ * // => false
+ */
+var lt = createRelationalOperation(baseLt);
+
+module.exports = lt;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lte.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lte.js
new file mode 100644
index 0000000..382f661
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/lte.js
@@ -0,0 +1,30 @@
+var createRelationalOperation = require('./_createRelationalOperation');
+
+/**
+ * Checks if `value` is less than or equal to `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than or equal to
+ * `other`, else `false`.
+ * @see _.gte
+ * @example
+ *
+ * _.lte(1, 3);
+ * // => true
+ *
+ * _.lte(3, 3);
+ * // => true
+ *
+ * _.lte(3, 1);
+ * // => false
+ */
+var lte = createRelationalOperation(function(value, other) {
+ return value <= other;
+});
+
+module.exports = lte;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/map.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/map.js
new file mode 100644
index 0000000..22efee7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/map.js
@@ -0,0 +1,53 @@
+var arrayMap = require('./_arrayMap'),
+ baseIteratee = require('./_baseIteratee'),
+ baseMap = require('./_baseMap'),
+ isArray = require('./isArray');
+
+/**
+ * Creates an array of values by running each element in `collection` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+ *
+ * The guarded methods are:
+ * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
+ * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
+ * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
+ * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * _.map([4, 8], square);
+ * // => [16, 64]
+ *
+ * _.map({ 'a': 4, 'b': 8 }, square);
+ * // => [16, 64] (iteration order is not guaranteed)
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, 'user');
+ * // => ['barney', 'fred']
+ */
+function map(collection, iteratee) {
+ var func = isArray(collection) ? arrayMap : baseMap;
+ return func(collection, baseIteratee(iteratee, 3));
+}
+
+module.exports = map;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/mapKeys.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/mapKeys.js
new file mode 100644
index 0000000..3b68797
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/mapKeys.js
@@ -0,0 +1,36 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ baseForOwn = require('./_baseForOwn'),
+ baseIteratee = require('./_baseIteratee');
+
+/**
+ * The opposite of `_.mapValues`; this method creates an object with the
+ * same values as `object` and keys generated by running each own enumerable
+ * string keyed property of `object` thru `iteratee`. The iteratee is invoked
+ * with three arguments: (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapValues
+ * @example
+ *
+ * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
+ * return key + value;
+ * });
+ * // => { 'a1': 1, 'b2': 2 }
+ */
+function mapKeys(object, iteratee) {
+ var result = {};
+ iteratee = baseIteratee(iteratee, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ baseAssignValue(result, iteratee(value, key, object), value);
+ });
+ return result;
+}
+
+module.exports = mapKeys;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/mapValues.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/mapValues.js
new file mode 100644
index 0000000..4ec0825
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/mapValues.js
@@ -0,0 +1,43 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ baseForOwn = require('./_baseForOwn'),
+ baseIteratee = require('./_baseIteratee');
+
+/**
+ * Creates an object with the same keys as `object` and values generated
+ * by running each own enumerable string keyed property of `object` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapKeys
+ * @example
+ *
+ * var users = {
+ * 'fred': { 'user': 'fred', 'age': 40 },
+ * 'pebbles': { 'user': 'pebbles', 'age': 1 }
+ * };
+ *
+ * _.mapValues(users, function(o) { return o.age; });
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.mapValues(users, 'age');
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ */
+function mapValues(object, iteratee) {
+ var result = {};
+ iteratee = baseIteratee(iteratee, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ baseAssignValue(result, key, iteratee(value, key, object));
+ });
+ return result;
+}
+
+module.exports = mapValues;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/matches.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/matches.js
new file mode 100644
index 0000000..11145db
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/matches.js
@@ -0,0 +1,39 @@
+var baseClone = require('./_baseClone'),
+ baseMatches = require('./_baseMatches');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1;
+
+/**
+ * Creates a function that performs a partial deep comparison between a given
+ * object and `source`, returning `true` if the given object has equivalent
+ * property values, else `false`.
+ *
+ * **Note:** The created function is equivalent to `_.isMatch` with `source`
+ * partially applied.
+ *
+ * Partial comparisons will match empty array and empty object `source`
+ * values against any array or object value, respectively. See `_.isEqual`
+ * for a list of supported value comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 1, 'b': 2, 'c': 3 },
+ * { 'a': 4, 'b': 5, 'c': 6 }
+ * ];
+ *
+ * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
+ * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
+ */
+function matches(source) {
+ return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
+}
+
+module.exports = matches;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/matchesProperty.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/matchesProperty.js
new file mode 100644
index 0000000..cc062ac
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/matchesProperty.js
@@ -0,0 +1,37 @@
+var baseClone = require('./_baseClone'),
+ baseMatchesProperty = require('./_baseMatchesProperty');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1;
+
+/**
+ * Creates a function that performs a partial deep comparison between the
+ * value at `path` of a given object to `srcValue`, returning `true` if the
+ * object value is equivalent, else `false`.
+ *
+ * **Note:** Partial comparisons will match empty array and empty object
+ * `srcValue` values against any array or object value, respectively. See
+ * `_.isEqual` for a list of supported value comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 1, 'b': 2, 'c': 3 },
+ * { 'a': 4, 'b': 5, 'c': 6 }
+ * ];
+ *
+ * _.find(objects, _.matchesProperty('a', 4));
+ * // => { 'a': 4, 'b': 5, 'c': 6 }
+ */
+function matchesProperty(path, srcValue) {
+ return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
+}
+
+module.exports = matchesProperty;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/math.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/math.js
new file mode 100644
index 0000000..5966887
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/math.js
@@ -0,0 +1,17 @@
+module.exports = {
+ 'add': require('./add'),
+ 'ceil': require('./ceil'),
+ 'divide': require('./divide'),
+ 'floor': require('./floor'),
+ 'max': require('./max'),
+ 'maxBy': require('./maxBy'),
+ 'mean': require('./mean'),
+ 'meanBy': require('./meanBy'),
+ 'min': require('./min'),
+ 'minBy': require('./minBy'),
+ 'multiply': require('./multiply'),
+ 'round': require('./round'),
+ 'subtract': require('./subtract'),
+ 'sum': require('./sum'),
+ 'sumBy': require('./sumBy')
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/max.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/max.js
new file mode 100644
index 0000000..142ad8c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/max.js
@@ -0,0 +1,29 @@
+var baseExtremum = require('./_baseExtremum'),
+ baseGt = require('./_baseGt'),
+ identity = require('./identity');
+
+/**
+ * Computes the maximum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * _.max([4, 2, 8, 6]);
+ * // => 8
+ *
+ * _.max([]);
+ * // => undefined
+ */
+function max(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseGt)
+ : undefined;
+}
+
+module.exports = max;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/maxBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/maxBy.js
new file mode 100644
index 0000000..2eba9c0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/maxBy.js
@@ -0,0 +1,34 @@
+var baseExtremum = require('./_baseExtremum'),
+ baseGt = require('./_baseGt'),
+ baseIteratee = require('./_baseIteratee');
+
+/**
+ * This method is like `_.max` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.maxBy(objects, function(o) { return o.n; });
+ * // => { 'n': 2 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.maxBy(objects, 'n');
+ * // => { 'n': 2 }
+ */
+function maxBy(array, iteratee) {
+ return (array && array.length)
+ ? baseExtremum(array, baseIteratee(iteratee, 2), baseGt)
+ : undefined;
+}
+
+module.exports = maxBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/mean.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/mean.js
new file mode 100644
index 0000000..e3ffff6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/mean.js
@@ -0,0 +1,22 @@
+var baseMean = require('./_baseMean'),
+ identity = require('./identity');
+
+/**
+ * Computes the mean of the values in `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {number} Returns the mean.
+ * @example
+ *
+ * _.mean([4, 2, 8, 6]);
+ * // => 5
+ */
+function mean(array) {
+ return baseMean(array, identity);
+}
+
+module.exports = mean;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/meanBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/meanBy.js
new file mode 100644
index 0000000..b031671
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/meanBy.js
@@ -0,0 +1,31 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseMean = require('./_baseMean');
+
+/**
+ * This method is like `_.mean` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the value to be averaged.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the mean.
+ * @example
+ *
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+ *
+ * _.meanBy(objects, function(o) { return o.n; });
+ * // => 5
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.meanBy(objects, 'n');
+ * // => 5
+ */
+function meanBy(array, iteratee) {
+ return baseMean(array, baseIteratee(iteratee, 2));
+}
+
+module.exports = meanBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/memoize.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/memoize.js
new file mode 100644
index 0000000..d6035af
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/memoize.js
@@ -0,0 +1,73 @@
+var MapCache = require('./_MapCache');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a function that memoizes the result of `func`. If `resolver` is
+ * provided, it determines the cache key for storing the result based on the
+ * arguments provided to the memoized function. By default, the first argument
+ * provided to the memoized function is used as the map cache key. The `func`
+ * is invoked with the `this` binding of the memoized function.
+ *
+ * **Note:** The cache is exposed as the `cache` property on the memoized
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
+ * constructor with one whose instances implement the
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to have its output memoized.
+ * @param {Function} [resolver] The function to resolve the cache key.
+ * @returns {Function} Returns the new memoized function.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ * var other = { 'c': 3, 'd': 4 };
+ *
+ * var values = _.memoize(_.values);
+ * values(object);
+ * // => [1, 2]
+ *
+ * values(other);
+ * // => [3, 4]
+ *
+ * object.a = 2;
+ * values(object);
+ * // => [1, 2]
+ *
+ * // Modify the result cache.
+ * values.cache.set(object, ['a', 'b']);
+ * values(object);
+ * // => ['a', 'b']
+ *
+ * // Replace `_.memoize.Cache`.
+ * _.memoize.Cache = WeakMap;
+ */
+function memoize(func, resolver) {
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var memoized = function() {
+ var args = arguments,
+ key = resolver ? resolver.apply(this, args) : args[0],
+ cache = memoized.cache;
+
+ if (cache.has(key)) {
+ return cache.get(key);
+ }
+ var result = func.apply(this, args);
+ memoized.cache = cache.set(key, result) || cache;
+ return result;
+ };
+ memoized.cache = new (memoize.Cache || MapCache);
+ return memoized;
+}
+
+// Expose `MapCache`.
+memoize.Cache = MapCache;
+
+module.exports = memoize;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/merge.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/merge.js
new file mode 100644
index 0000000..4bbc3a1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/merge.js
@@ -0,0 +1,39 @@
+var baseMerge = require('./_baseMerge'),
+ createAssigner = require('./_createAssigner');
+
+/**
+ * This method is like `_.assign` except that it recursively merges own and
+ * inherited enumerable string keyed properties of source objects into the
+ * destination object. Source properties that resolve to `undefined` are
+ * skipped if a destination value exists. Array and plain object properties
+ * are merged recursively. Other objects and value types are overridden by
+ * assignment. Source objects are applied from left to right. Subsequent
+ * sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {
+ * 'a': [{ 'b': 2 }, { 'd': 4 }]
+ * };
+ *
+ * var other = {
+ * 'a': [{ 'c': 3 }, { 'e': 5 }]
+ * };
+ *
+ * _.merge(object, other);
+ * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
+ */
+var merge = createAssigner(function(object, source, srcIndex) {
+ baseMerge(object, source, srcIndex);
+});
+
+module.exports = merge;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/mergeWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/mergeWith.js
new file mode 100644
index 0000000..1b43a2c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/mergeWith.js
@@ -0,0 +1,39 @@
+var baseMerge = require('./_baseMerge'),
+ createAssigner = require('./_createAssigner');
+
+/**
+ * This method is like `_.merge` except that it accepts `customizer` which
+ * is invoked to produce the merged values of the destination and source
+ * properties. If `customizer` returns `undefined`, merging is handled by the
+ * method instead. The `customizer` is invoked with six arguments:
+ * (objValue, srcValue, key, object, source, stack).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} customizer The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * if (_.isArray(objValue)) {
+ * return objValue.concat(srcValue);
+ * }
+ * }
+ *
+ * var object = { 'a': [1], 'b': [2] };
+ * var other = { 'a': [3], 'b': [4] };
+ *
+ * _.mergeWith(object, other, customizer);
+ * // => { 'a': [1, 3], 'b': [2, 4] }
+ */
+var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
+ baseMerge(object, source, srcIndex, customizer);
+});
+
+module.exports = mergeWith;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/method.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/method.js
new file mode 100644
index 0000000..23ec32d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/method.js
@@ -0,0 +1,34 @@
+var baseInvoke = require('./_baseInvoke'),
+ baseRest = require('./_baseRest');
+
+/**
+ * Creates a function that invokes the method at `path` of a given object.
+ * Any additional arguments are provided to the invoked method.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Util
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Function} Returns the new invoker function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': _.constant(2) } },
+ * { 'a': { 'b': _.constant(1) } }
+ * ];
+ *
+ * _.map(objects, _.method('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(objects, _.method(['a', 'b']));
+ * // => [2, 1]
+ */
+var method = baseRest(function(path, args) {
+ return function(object) {
+ return baseInvoke(object, path, args);
+ };
+});
+
+module.exports = method;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/methodOf.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/methodOf.js
new file mode 100644
index 0000000..df59b57
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/methodOf.js
@@ -0,0 +1,33 @@
+var baseInvoke = require('./_baseInvoke'),
+ baseRest = require('./_baseRest');
+
+/**
+ * The opposite of `_.method`; this method creates a function that invokes
+ * the method at a given path of `object`. Any additional arguments are
+ * provided to the invoked method.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Util
+ * @param {Object} object The object to query.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Function} Returns the new invoker function.
+ * @example
+ *
+ * var array = _.times(3, _.constant),
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.methodOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
+ * // => [2, 0]
+ */
+var methodOf = baseRest(function(object, args) {
+ return function(path) {
+ return baseInvoke(object, path, args);
+ };
+});
+
+module.exports = methodOf;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/min.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/min.js
new file mode 100644
index 0000000..428f571
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/min.js
@@ -0,0 +1,29 @@
+var baseExtremum = require('./_baseExtremum'),
+ baseLt = require('./_baseLt'),
+ identity = require('./identity');
+
+/**
+ * Computes the minimum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * _.min([4, 2, 8, 6]);
+ * // => 2
+ *
+ * _.min([]);
+ * // => undefined
+ */
+function min(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseLt)
+ : undefined;
+}
+
+module.exports = min;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/minBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/minBy.js
new file mode 100644
index 0000000..b2697e4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/minBy.js
@@ -0,0 +1,34 @@
+var baseExtremum = require('./_baseExtremum'),
+ baseIteratee = require('./_baseIteratee'),
+ baseLt = require('./_baseLt');
+
+/**
+ * This method is like `_.min` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.minBy(objects, function(o) { return o.n; });
+ * // => { 'n': 1 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.minBy(objects, 'n');
+ * // => { 'n': 1 }
+ */
+function minBy(array, iteratee) {
+ return (array && array.length)
+ ? baseExtremum(array, baseIteratee(iteratee, 2), baseLt)
+ : undefined;
+}
+
+module.exports = minBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/mixin.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/mixin.js
new file mode 100644
index 0000000..6dc9674
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/mixin.js
@@ -0,0 +1,74 @@
+var arrayEach = require('./_arrayEach'),
+ arrayPush = require('./_arrayPush'),
+ baseFunctions = require('./_baseFunctions'),
+ copyArray = require('./_copyArray'),
+ isFunction = require('./isFunction'),
+ isObject = require('./isObject'),
+ keys = require('./keys');
+
+/**
+ * Adds all own enumerable string keyed function properties of a source
+ * object to the destination object. If `object` is a function, then methods
+ * are added to its prototype as well.
+ *
+ * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
+ * avoid conflicts caused by modifying the original.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Function|Object} [object=lodash] The destination object.
+ * @param {Object} source The object of functions to add.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
+ * @returns {Function|Object} Returns `object`.
+ * @example
+ *
+ * function vowels(string) {
+ * return _.filter(string, function(v) {
+ * return /[aeiou]/i.test(v);
+ * });
+ * }
+ *
+ * _.mixin({ 'vowels': vowels });
+ * _.vowels('fred');
+ * // => ['e']
+ *
+ * _('fred').vowels().value();
+ * // => ['e']
+ *
+ * _.mixin({ 'vowels': vowels }, { 'chain': false });
+ * _('fred').vowels();
+ * // => ['e']
+ */
+function mixin(object, source, options) {
+ var props = keys(source),
+ methodNames = baseFunctions(source, props);
+
+ var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
+ isFunc = isFunction(object);
+
+ arrayEach(methodNames, function(methodName) {
+ var func = source[methodName];
+ object[methodName] = func;
+ if (isFunc) {
+ object.prototype[methodName] = function() {
+ var chainAll = this.__chain__;
+ if (chain || chainAll) {
+ var result = object(this.__wrapped__),
+ actions = result.__actions__ = copyArray(this.__actions__);
+
+ actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
+ result.__chain__ = chainAll;
+ return result;
+ }
+ return func.apply(object, arrayPush([this.value()], arguments));
+ };
+ }
+ });
+
+ return object;
+}
+
+module.exports = mixin;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/multiply.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/multiply.js
new file mode 100644
index 0000000..d7876e1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/multiply.js
@@ -0,0 +1,22 @@
+var createMathOperation = require('./_createMathOperation');
+
+/**
+ * Multiply two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {number} multiplier The first number in a multiplication.
+ * @param {number} multiplicand The second number in a multiplication.
+ * @returns {number} Returns the product.
+ * @example
+ *
+ * _.multiply(6, 4);
+ * // => 24
+ */
+var multiply = createMathOperation(function(multiplier, multiplicand) {
+ return multiplier * multiplicand;
+}, 1);
+
+module.exports = multiply;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/negate.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/negate.js
new file mode 100644
index 0000000..5a65cd1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/negate.js
@@ -0,0 +1,40 @@
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a function that negates the result of the predicate `func`. The
+ * `func` predicate is invoked with the `this` binding and arguments of the
+ * created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} predicate The predicate to negate.
+ * @returns {Function} Returns the new negated function.
+ * @example
+ *
+ * function isEven(n) {
+ * return n % 2 == 0;
+ * }
+ *
+ * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
+ * // => [1, 3, 5]
+ */
+function negate(predicate) {
+ if (typeof predicate != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return function() {
+ var args = arguments;
+ switch (args.length) {
+ case 0: return !predicate.call(this);
+ case 1: return !predicate.call(this, args[0]);
+ case 2: return !predicate.call(this, args[0], args[1]);
+ case 3: return !predicate.call(this, args[0], args[1], args[2]);
+ }
+ return !predicate.apply(this, args);
+ };
+}
+
+module.exports = negate;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/next.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/next.js
new file mode 100644
index 0000000..55f949c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/next.js
@@ -0,0 +1,35 @@
+var toArray = require('./toArray');
+
+/**
+ * Gets the next value on a wrapped object following the
+ * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
+ *
+ * @name next
+ * @memberOf _
+ * @since 4.0.0
+ * @category Seq
+ * @returns {Object} Returns the next iterator value.
+ * @example
+ *
+ * var wrapped = _([1, 2]);
+ *
+ * wrapped.next();
+ * // => { 'done': false, 'value': 1 }
+ *
+ * wrapped.next();
+ * // => { 'done': false, 'value': 2 }
+ *
+ * wrapped.next();
+ * // => { 'done': true, 'value': undefined }
+ */
+function wrapperNext() {
+ if (this.__values__ === undefined) {
+ this.__values__ = toArray(this.value());
+ }
+ var done = this.__index__ >= this.__values__.length,
+ value = done ? undefined : this.__values__[this.__index__++];
+
+ return { 'done': done, 'value': value };
+}
+
+module.exports = wrapperNext;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/noop.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/noop.js
new file mode 100644
index 0000000..3c0862e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/noop.js
@@ -0,0 +1,17 @@
+/**
+ * This method returns `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Util
+ * @example
+ *
+ * _.times(2, _.noop);
+ * // => [undefined, undefined]
+ */
+function noop() {
+ // No operation performed.
+}
+
+module.exports = noop;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/now.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/now.js
new file mode 100644
index 0000000..44a0562
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/now.js
@@ -0,0 +1,23 @@
+var root = require('./_root');
+
+/**
+ * Gets the timestamp of the number of milliseconds that have elapsed since
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Date
+ * @returns {number} Returns the timestamp.
+ * @example
+ *
+ * _.defer(function(stamp) {
+ * console.log(_.now() - stamp);
+ * }, _.now());
+ * // => Logs the number of milliseconds it took for the deferred invocation.
+ */
+var now = function() {
+ return root.Date.now();
+};
+
+module.exports = now;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/nth.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/nth.js
new file mode 100644
index 0000000..8a344de
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/nth.js
@@ -0,0 +1,29 @@
+var baseNth = require('./_baseNth'),
+ toInteger = require('./toInteger');
+
+/**
+ * Gets the element at index `n` of `array`. If `n` is negative, the nth
+ * element from the end is returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.11.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=0] The index of the element to return.
+ * @returns {*} Returns the nth element of `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'd'];
+ *
+ * _.nth(array, 1);
+ * // => 'b'
+ *
+ * _.nth(array, -2);
+ * // => 'c';
+ */
+function nth(array, n) {
+ return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
+}
+
+module.exports = nth;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/nthArg.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/nthArg.js
new file mode 100644
index 0000000..09406dd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/nthArg.js
@@ -0,0 +1,32 @@
+var baseNth = require('./_baseNth'),
+ baseRest = require('./_baseRest'),
+ toInteger = require('./toInteger');
+
+/**
+ * Creates a function that gets the argument at index `n`. If `n` is negative,
+ * the nth argument from the end is returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {number} [n=0] The index of the argument to return.
+ * @returns {Function} Returns the new pass-thru function.
+ * @example
+ *
+ * var func = _.nthArg(1);
+ * func('a', 'b', 'c', 'd');
+ * // => 'b'
+ *
+ * var func = _.nthArg(-2);
+ * func('a', 'b', 'c', 'd');
+ * // => 'c'
+ */
+function nthArg(n) {
+ n = toInteger(n);
+ return baseRest(function(args) {
+ return baseNth(args, n);
+ });
+}
+
+module.exports = nthArg;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/number.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/number.js
new file mode 100644
index 0000000..c3b0100
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/number.js
@@ -0,0 +1,5 @@
+module.exports = {
+ 'clamp': require('./clamp'),
+ 'inRange': require('./inRange'),
+ 'random': require('./random')
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/object.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/object.js
new file mode 100644
index 0000000..f046b05
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/object.js
@@ -0,0 +1,49 @@
+module.exports = {
+ 'assign': require('./assign'),
+ 'assignIn': require('./assignIn'),
+ 'assignInWith': require('./assignInWith'),
+ 'assignWith': require('./assignWith'),
+ 'at': require('./at'),
+ 'create': require('./create'),
+ 'defaults': require('./defaults'),
+ 'defaultsDeep': require('./defaultsDeep'),
+ 'entries': require('./entries'),
+ 'entriesIn': require('./entriesIn'),
+ 'extend': require('./extend'),
+ 'extendWith': require('./extendWith'),
+ 'findKey': require('./findKey'),
+ 'findLastKey': require('./findLastKey'),
+ 'forIn': require('./forIn'),
+ 'forInRight': require('./forInRight'),
+ 'forOwn': require('./forOwn'),
+ 'forOwnRight': require('./forOwnRight'),
+ 'functions': require('./functions'),
+ 'functionsIn': require('./functionsIn'),
+ 'get': require('./get'),
+ 'has': require('./has'),
+ 'hasIn': require('./hasIn'),
+ 'invert': require('./invert'),
+ 'invertBy': require('./invertBy'),
+ 'invoke': require('./invoke'),
+ 'keys': require('./keys'),
+ 'keysIn': require('./keysIn'),
+ 'mapKeys': require('./mapKeys'),
+ 'mapValues': require('./mapValues'),
+ 'merge': require('./merge'),
+ 'mergeWith': require('./mergeWith'),
+ 'omit': require('./omit'),
+ 'omitBy': require('./omitBy'),
+ 'pick': require('./pick'),
+ 'pickBy': require('./pickBy'),
+ 'result': require('./result'),
+ 'set': require('./set'),
+ 'setWith': require('./setWith'),
+ 'toPairs': require('./toPairs'),
+ 'toPairsIn': require('./toPairsIn'),
+ 'transform': require('./transform'),
+ 'unset': require('./unset'),
+ 'update': require('./update'),
+ 'updateWith': require('./updateWith'),
+ 'values': require('./values'),
+ 'valuesIn': require('./valuesIn')
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/omit.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/omit.js
new file mode 100644
index 0000000..75d40aa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/omit.js
@@ -0,0 +1,56 @@
+var arrayMap = require('./_arrayMap'),
+ baseClone = require('./_baseClone'),
+ baseUnset = require('./_baseUnset'),
+ castPath = require('./_castPath'),
+ copyObject = require('./_copyObject'),
+ flatRest = require('./_flatRest'),
+ getAllKeysIn = require('./_getAllKeysIn');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1,
+ CLONE_FLAT_FLAG = 2,
+ CLONE_SYMBOLS_FLAG = 4;
+
+/**
+ * The opposite of `_.pick`; this method creates an object composed of the
+ * own and inherited enumerable property paths of `object` that are not omitted.
+ *
+ * **Note:** This method is considerably slower than `_.pick`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to omit.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.omit(object, ['a', 'c']);
+ * // => { 'b': '2' }
+ */
+var omit = flatRest(function(object, paths) {
+ var result = {};
+ if (object == null) {
+ return result;
+ }
+ var isDeep = false;
+ paths = arrayMap(paths, function(path) {
+ path = castPath(path, object);
+ isDeep || (isDeep = path.length > 1);
+ return path;
+ });
+ copyObject(object, getAllKeysIn(object), result);
+ if (isDeep) {
+ result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG);
+ }
+ var length = paths.length;
+ while (length--) {
+ baseUnset(result, paths[length]);
+ }
+ return result;
+});
+
+module.exports = omit;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/omitBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/omitBy.js
new file mode 100644
index 0000000..a064036
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/omitBy.js
@@ -0,0 +1,29 @@
+var baseIteratee = require('./_baseIteratee'),
+ negate = require('./negate'),
+ pickBy = require('./pickBy');
+
+/**
+ * The opposite of `_.pickBy`; this method creates an object composed of
+ * the own and inherited enumerable string keyed properties of `object` that
+ * `predicate` doesn't return truthy for. The predicate is invoked with two
+ * arguments: (value, key).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Function} [predicate=_.identity] The function invoked per property.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.omitBy(object, _.isNumber);
+ * // => { 'b': '2' }
+ */
+function omitBy(object, predicate) {
+ return pickBy(object, negate(baseIteratee(predicate)));
+}
+
+module.exports = omitBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/once.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/once.js
new file mode 100644
index 0000000..0706fc3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/once.js
@@ -0,0 +1,25 @@
+var before = require('./before');
+
+/**
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
+ * to the function return the value of the first invocation. The `func` is
+ * invoked with the `this` binding and arguments of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var initialize = _.once(createApplication);
+ * initialize();
+ * initialize();
+ * // => `createApplication` is invoked once
+ */
+function once(func) {
+ return before(2, func);
+}
+
+module.exports = once;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/orderBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/orderBy.js
new file mode 100644
index 0000000..7195c8c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/orderBy.js
@@ -0,0 +1,47 @@
+var baseOrderBy = require('./_baseOrderBy'),
+ isArray = require('./isArray');
+
+/**
+ * This method is like `_.sortBy` except that it allows specifying the sort
+ * orders of the iteratees to sort by. If `orders` is unspecified, all values
+ * are sorted in ascending order. Otherwise, specify an order of "desc" for
+ * descending or "asc" for ascending sort order of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @param {string[]} [orders] The sort orders of `iteratees`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 34 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'barney', 'age': 36 }
+ * ];
+ *
+ * // Sort by `user` in ascending order and by `age` in descending order.
+ * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+ */
+function orderBy(collection, iteratees, orders, guard) {
+ if (collection == null) {
+ return [];
+ }
+ if (!isArray(iteratees)) {
+ iteratees = iteratees == null ? [] : [iteratees];
+ }
+ orders = guard ? undefined : orders;
+ if (!isArray(orders)) {
+ orders = orders == null ? [] : [orders];
+ }
+ return baseOrderBy(collection, iteratees, orders);
+}
+
+module.exports = orderBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/over.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/over.js
new file mode 100644
index 0000000..bea2f91
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/over.js
@@ -0,0 +1,24 @@
+var arrayMap = require('./_arrayMap'),
+ createOver = require('./_createOver');
+
+/**
+ * Creates a function that invokes `iteratees` with the arguments it receives
+ * and returns their results.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to invoke.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.over([Math.max, Math.min]);
+ *
+ * func(1, 2, 3, 4);
+ * // => [4, 1]
+ */
+var over = createOver(arrayMap);
+
+module.exports = over;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/overArgs.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/overArgs.js
new file mode 100644
index 0000000..f0067db
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/overArgs.js
@@ -0,0 +1,61 @@
+var apply = require('./_apply'),
+ arrayMap = require('./_arrayMap'),
+ baseFlatten = require('./_baseFlatten'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest'),
+ baseUnary = require('./_baseUnary'),
+ castRest = require('./_castRest'),
+ isArray = require('./isArray');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * Creates a function that invokes `func` with its arguments transformed.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to wrap.
+ * @param {...(Function|Function[])} [transforms=[_.identity]]
+ * The argument transforms.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * function doubled(n) {
+ * return n * 2;
+ * }
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var func = _.overArgs(function(x, y) {
+ * return [x, y];
+ * }, [square, doubled]);
+ *
+ * func(9, 3);
+ * // => [81, 6]
+ *
+ * func(10, 5);
+ * // => [100, 10]
+ */
+var overArgs = castRest(function(func, transforms) {
+ transforms = (transforms.length == 1 && isArray(transforms[0]))
+ ? arrayMap(transforms[0], baseUnary(baseIteratee))
+ : arrayMap(baseFlatten(transforms, 1), baseUnary(baseIteratee));
+
+ var funcsLength = transforms.length;
+ return baseRest(function(args) {
+ var index = -1,
+ length = nativeMin(args.length, funcsLength);
+
+ while (++index < length) {
+ args[index] = transforms[index].call(this, args[index]);
+ }
+ return apply(func, this, args);
+ });
+});
+
+module.exports = overArgs;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/overEvery.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/overEvery.js
new file mode 100644
index 0000000..c115d15
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/overEvery.js
@@ -0,0 +1,30 @@
+var arrayEvery = require('./_arrayEvery'),
+ createOver = require('./_createOver');
+
+/**
+ * Creates a function that checks if **all** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [predicates=[_.identity]]
+ * The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overEvery([Boolean, isFinite]);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => false
+ *
+ * func(NaN);
+ * // => false
+ */
+var overEvery = createOver(arrayEvery);
+
+module.exports = overEvery;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/overSome.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/overSome.js
new file mode 100644
index 0000000..f902907
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/overSome.js
@@ -0,0 +1,30 @@
+var arraySome = require('./_arraySome'),
+ createOver = require('./_createOver');
+
+/**
+ * Creates a function that checks if **any** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [predicates=[_.identity]]
+ * The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overSome([Boolean, isFinite]);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => true
+ *
+ * func(NaN);
+ * // => false
+ */
+var overSome = createOver(arraySome);
+
+module.exports = overSome;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/package.json
new file mode 100644
index 0000000..da0e1a9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/package.json
@@ -0,0 +1,70 @@
+{
+ "name": "lodash",
+ "version": "4.17.2",
+ "description": "Lodash modular utilities.",
+ "keywords": [
+ "modules",
+ "stdlib",
+ "util"
+ ],
+ "homepage": "https://lodash.com/",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/lodash/lodash.git"
+ },
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "main": "lodash.js",
+ "author": {
+ "name": "John-David Dalton",
+ "email": "john.david.dalton@gmail.com",
+ "url": "http://allyoucanleet.com/"
+ },
+ "contributors": [
+ {
+ "name": "John-David Dalton",
+ "email": "john.david.dalton@gmail.com",
+ "url": "http://allyoucanleet.com/"
+ },
+ {
+ "name": "Mathias Bynens",
+ "email": "mathias@qiwi.be",
+ "url": "https://mathiasbynens.be/"
+ }
+ ],
+ "scripts": {
+ "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
+ },
+ "bugs": {
+ "url": "https://github.com/lodash/lodash/issues"
+ },
+ "_id": "lodash@4.17.2",
+ "_shasum": "34a3055babe04ce42467b607d700072c7ff6bf42",
+ "_from": "lodash@>=4.14.0 <5.0.0",
+ "_npmVersion": "2.15.11",
+ "_nodeVersion": "7.1.0",
+ "_npmUser": {
+ "name": "jdalton",
+ "email": "john.david.dalton@gmail.com"
+ },
+ "dist": {
+ "shasum": "34a3055babe04ce42467b607d700072c7ff6bf42",
+ "tarball": "https://registry.npmjs.org/lodash/-/lodash-4.17.2.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "jdalton",
+ "email": "john.david.dalton@gmail.com"
+ },
+ {
+ "name": "mathias",
+ "email": "mathias@qiwi.be"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-18-east.internal.npmjs.com",
+ "tmp": "tmp/lodash-4.17.2.tgz_1479280899250_0.8391377755906433"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.2.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pad.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pad.js
new file mode 100644
index 0000000..77e1f1c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pad.js
@@ -0,0 +1,49 @@
+var createPadding = require('./_createPadding'),
+ stringSize = require('./_stringSize'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeCeil = Math.ceil,
+ nativeFloor = Math.floor;
+
+/**
+ * Pads `string` on the left and right sides if it's shorter than `length`.
+ * Padding characters are truncated if they can't be evenly divided by `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.pad('abc', 8);
+ * // => ' abc '
+ *
+ * _.pad('abc', 8, '_-');
+ * // => '_-abc_-_'
+ *
+ * _.pad('abc', 3);
+ * // => 'abc'
+ */
+function pad(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ if (!length || strLength >= length) {
+ return string;
+ }
+ var mid = (length - strLength) / 2;
+ return (
+ createPadding(nativeFloor(mid), chars) +
+ string +
+ createPadding(nativeCeil(mid), chars)
+ );
+}
+
+module.exports = pad;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/padEnd.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/padEnd.js
new file mode 100644
index 0000000..224eb80
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/padEnd.js
@@ -0,0 +1,39 @@
+var createPadding = require('./_createPadding'),
+ stringSize = require('./_stringSize'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/**
+ * Pads `string` on the right side if it's shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.padEnd('abc', 6);
+ * // => 'abc '
+ *
+ * _.padEnd('abc', 6, '_-');
+ * // => 'abc_-_'
+ *
+ * _.padEnd('abc', 3);
+ * // => 'abc'
+ */
+function padEnd(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ return (length && strLength < length)
+ ? (string + createPadding(length - strLength, chars))
+ : string;
+}
+
+module.exports = padEnd;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/padStart.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/padStart.js
new file mode 100644
index 0000000..f991866
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/padStart.js
@@ -0,0 +1,39 @@
+var createPadding = require('./_createPadding'),
+ stringSize = require('./_stringSize'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/**
+ * Pads `string` on the left side if it's shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.padStart('abc', 6);
+ * // => ' abc'
+ *
+ * _.padStart('abc', 6, '_-');
+ * // => '_-_abc'
+ *
+ * _.padStart('abc', 3);
+ * // => 'abc'
+ */
+function padStart(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ return (length && strLength < length)
+ ? (createPadding(length - strLength, chars) + string)
+ : string;
+}
+
+module.exports = padStart;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/parseInt.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/parseInt.js
new file mode 100644
index 0000000..82badf0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/parseInt.js
@@ -0,0 +1,43 @@
+var root = require('./_root'),
+ toString = require('./toString');
+
+/** Used to match leading and trailing whitespace. */
+var reTrimStart = /^\s+/;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeParseInt = root.parseInt;
+
+/**
+ * Converts `string` to an integer of the specified radix. If `radix` is
+ * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
+ * hexadecimal, in which case a `radix` of `16` is used.
+ *
+ * **Note:** This method aligns with the
+ * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category String
+ * @param {string} string The string to convert.
+ * @param {number} [radix=10] The radix to interpret `value` by.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.parseInt('08');
+ * // => 8
+ *
+ * _.map(['6', '08', '10'], _.parseInt);
+ * // => [6, 8, 10]
+ */
+function parseInt(string, radix, guard) {
+ if (guard || radix == null) {
+ radix = 0;
+ } else if (radix) {
+ radix = +radix;
+ }
+ return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
+}
+
+module.exports = parseInt;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/partial.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/partial.js
new file mode 100644
index 0000000..05fe8d3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/partial.js
@@ -0,0 +1,50 @@
+var baseRest = require('./_baseRest'),
+ createWrap = require('./_createWrap'),
+ getHolder = require('./_getHolder'),
+ replaceHolders = require('./_replaceHolders');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_PARTIAL_FLAG = 32;
+
+/**
+ * Creates a function that invokes `func` with `partials` prepended to the
+ * arguments it receives. This method is like `_.bind` except it does **not**
+ * alter the `this` binding.
+ *
+ * The `_.partial.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.2.0
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * function greet(greeting, name) {
+ * return greeting + ' ' + name;
+ * }
+ *
+ * var sayHelloTo = _.partial(greet, 'hello');
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ *
+ * // Partially applied with placeholders.
+ * var greetFred = _.partial(greet, _, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ */
+var partial = baseRest(function(func, partials) {
+ var holders = replaceHolders(partials, getHolder(partial));
+ return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
+});
+
+// Assign default placeholders.
+partial.placeholder = {};
+
+module.exports = partial;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/partialRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/partialRight.js
new file mode 100644
index 0000000..eee031f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/partialRight.js
@@ -0,0 +1,49 @@
+var baseRest = require('./_baseRest'),
+ createWrap = require('./_createWrap'),
+ getHolder = require('./_getHolder'),
+ replaceHolders = require('./_replaceHolders');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_PARTIAL_RIGHT_FLAG = 64;
+
+/**
+ * This method is like `_.partial` except that partially applied arguments
+ * are appended to the arguments it receives.
+ *
+ * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * function greet(greeting, name) {
+ * return greeting + ' ' + name;
+ * }
+ *
+ * var greetFred = _.partialRight(greet, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ *
+ * // Partially applied with placeholders.
+ * var sayHelloTo = _.partialRight(greet, 'hello', _);
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ */
+var partialRight = baseRest(function(func, partials) {
+ var holders = replaceHolders(partials, getHolder(partialRight));
+ return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
+});
+
+// Assign default placeholders.
+partialRight.placeholder = {};
+
+module.exports = partialRight;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/partition.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/partition.js
new file mode 100644
index 0000000..6b814a9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/partition.js
@@ -0,0 +1,43 @@
+var createAggregator = require('./_createAggregator');
+
+/**
+ * Creates an array of elements split into two groups, the first of which
+ * contains elements `predicate` returns truthy for, the second of which
+ * contains elements `predicate` returns falsey for. The predicate is
+ * invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the array of grouped elements.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true },
+ * { 'user': 'pebbles', 'age': 1, 'active': false }
+ * ];
+ *
+ * _.partition(users, function(o) { return o.active; });
+ * // => objects for [['fred'], ['barney', 'pebbles']]
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.partition(users, { 'age': 1, 'active': false });
+ * // => objects for [['pebbles'], ['barney', 'fred']]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.partition(users, ['active', false]);
+ * // => objects for [['barney', 'pebbles'], ['fred']]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.partition(users, 'active');
+ * // => objects for [['fred'], ['barney', 'pebbles']]
+ */
+var partition = createAggregator(function(result, value, key) {
+ result[key ? 0 : 1].push(value);
+}, function() { return [[], []]; });
+
+module.exports = partition;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pick.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pick.js
new file mode 100644
index 0000000..3160199
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pick.js
@@ -0,0 +1,25 @@
+var basePick = require('./_basePick'),
+ flatRest = require('./_flatRest');
+
+/**
+ * Creates an object composed of the picked `object` properties.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pick(object, ['a', 'c']);
+ * // => { 'a': 1, 'c': 3 }
+ */
+var pick = flatRest(function(object, paths) {
+ return object == null ? {} : basePick(object, paths);
+});
+
+module.exports = pick;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pickBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pickBy.js
new file mode 100644
index 0000000..ae7c271
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pickBy.js
@@ -0,0 +1,37 @@
+var arrayMap = require('./_arrayMap'),
+ baseIteratee = require('./_baseIteratee'),
+ basePickBy = require('./_basePickBy'),
+ getAllKeysIn = require('./_getAllKeysIn');
+
+/**
+ * Creates an object composed of the `object` properties `predicate` returns
+ * truthy for. The predicate is invoked with two arguments: (value, key).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Function} [predicate=_.identity] The function invoked per property.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pickBy(object, _.isNumber);
+ * // => { 'a': 1, 'c': 3 }
+ */
+function pickBy(object, predicate) {
+ if (object == null) {
+ return {};
+ }
+ var props = arrayMap(getAllKeysIn(object), function(prop) {
+ return [prop];
+ });
+ predicate = baseIteratee(predicate);
+ return basePickBy(object, props, function(value, path) {
+ return predicate(value, path[0]);
+ });
+}
+
+module.exports = pickBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/plant.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/plant.js
new file mode 100644
index 0000000..23776f3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/plant.js
@@ -0,0 +1,48 @@
+var baseLodash = require('./_baseLodash'),
+ wrapperClone = require('./_wrapperClone');
+
+/**
+ * Creates a clone of the chain sequence planting `value` as the wrapped value.
+ *
+ * @name plant
+ * @memberOf _
+ * @since 3.2.0
+ * @category Seq
+ * @param {*} value The value to plant.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2]).map(square);
+ * var other = wrapped.plant([3, 4]);
+ *
+ * other.value();
+ * // => [9, 16]
+ *
+ * wrapped.value();
+ * // => [1, 4]
+ */
+function wrapperPlant(value) {
+ var result,
+ parent = this;
+
+ while (parent instanceof baseLodash) {
+ var clone = wrapperClone(parent);
+ clone.__index__ = 0;
+ clone.__values__ = undefined;
+ if (result) {
+ previous.__wrapped__ = clone;
+ } else {
+ result = clone;
+ }
+ var previous = clone;
+ parent = parent.__wrapped__;
+ }
+ previous.__wrapped__ = value;
+ return result;
+}
+
+module.exports = wrapperPlant;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/property.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/property.js
new file mode 100644
index 0000000..ca8202f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/property.js
@@ -0,0 +1,32 @@
+var baseProperty = require('./_baseProperty'),
+ basePropertyDeep = require('./_basePropertyDeep'),
+ isKey = require('./_isKey'),
+ toKey = require('./_toKey');
+
+/**
+ * Creates a function that returns the value at `path` of a given object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': 2 } },
+ * { 'a': { 'b': 1 } }
+ * ];
+ *
+ * _.map(objects, _.property('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
+ * // => [1, 2]
+ */
+function property(path) {
+ return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
+}
+
+module.exports = property;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/propertyOf.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/propertyOf.js
new file mode 100644
index 0000000..384044d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/propertyOf.js
@@ -0,0 +1,30 @@
+var baseGet = require('./_baseGet');
+
+/**
+ * The opposite of `_.property`; this method creates a function that returns
+ * the value at a given path of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ * @example
+ *
+ * var array = [0, 1, 2],
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
+ * // => [2, 0]
+ */
+function propertyOf(object) {
+ return function(path) {
+ return object == null ? undefined : baseGet(object, path);
+ };
+}
+
+module.exports = propertyOf;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pull.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pull.js
new file mode 100644
index 0000000..a2efcb5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pull.js
@@ -0,0 +1,29 @@
+var baseRest = require('./_baseRest'),
+ pullAll = require('./pullAll');
+
+/**
+ * Removes all given values from `array` using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
+ * to remove elements from an array by predicate.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...*} [values] The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
+ *
+ * _.pull(array, 'a', 'c');
+ * console.log(array);
+ * // => ['b', 'b']
+ */
+var pull = baseRest(pullAll);
+
+module.exports = pull;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pullAll.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pullAll.js
new file mode 100644
index 0000000..f4605c2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pullAll.js
@@ -0,0 +1,29 @@
+var basePullAll = require('./_basePullAll');
+
+/**
+ * This method is like `_.pull` except that it accepts an array of values to remove.
+ *
+ * **Note:** Unlike `_.difference`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
+ *
+ * _.pullAll(array, ['a', 'c']);
+ * console.log(array);
+ * // => ['b', 'b']
+ */
+function pullAll(array, values) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values)
+ : array;
+}
+
+module.exports = pullAll;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pullAllBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pullAllBy.js
new file mode 100644
index 0000000..74025e8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pullAllBy.js
@@ -0,0 +1,33 @@
+var baseIteratee = require('./_baseIteratee'),
+ basePullAll = require('./_basePullAll');
+
+/**
+ * This method is like `_.pullAll` except that it accepts `iteratee` which is
+ * invoked for each element of `array` and `values` to generate the criterion
+ * by which they're compared. The iteratee is invoked with one argument: (value).
+ *
+ * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
+ *
+ * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
+ * console.log(array);
+ * // => [{ 'x': 2 }]
+ */
+function pullAllBy(array, values, iteratee) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values, baseIteratee(iteratee, 2))
+ : array;
+}
+
+module.exports = pullAllBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pullAllWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pullAllWith.js
new file mode 100644
index 0000000..1d2fd9f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pullAllWith.js
@@ -0,0 +1,32 @@
+var basePullAll = require('./_basePullAll');
+
+/**
+ * This method is like `_.pullAll` except that it accepts `comparator` which
+ * is invoked to compare elements of `array` to `values`. The comparator is
+ * invoked with two arguments: (arrVal, othVal).
+ *
+ * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
+ *
+ * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
+ * console.log(array);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
+ */
+function pullAllWith(array, values, comparator) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values, undefined, comparator)
+ : array;
+}
+
+module.exports = pullAllWith;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pullAt.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pullAt.js
new file mode 100644
index 0000000..6ed84e0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/pullAt.js
@@ -0,0 +1,43 @@
+var arrayMap = require('./_arrayMap'),
+ baseAt = require('./_baseAt'),
+ basePullAt = require('./_basePullAt'),
+ compareAscending = require('./_compareAscending'),
+ flatRest = require('./_flatRest'),
+ isIndex = require('./_isIndex');
+
+/**
+ * Removes elements from `array` corresponding to `indexes` and returns an
+ * array of removed elements.
+ *
+ * **Note:** Unlike `_.at`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...(number|number[])} [indexes] The indexes of elements to remove.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'd'];
+ * var pulled = _.pullAt(array, [1, 3]);
+ *
+ * console.log(array);
+ * // => ['a', 'c']
+ *
+ * console.log(pulled);
+ * // => ['b', 'd']
+ */
+var pullAt = flatRest(function(array, indexes) {
+ var length = array == null ? 0 : array.length,
+ result = baseAt(array, indexes);
+
+ basePullAt(array, arrayMap(indexes, function(index) {
+ return isIndex(index, length) ? +index : index;
+ }).sort(compareAscending));
+
+ return result;
+});
+
+module.exports = pullAt;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/random.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/random.js
new file mode 100644
index 0000000..8067711
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/random.js
@@ -0,0 +1,82 @@
+var baseRandom = require('./_baseRandom'),
+ isIterateeCall = require('./_isIterateeCall'),
+ toFinite = require('./toFinite');
+
+/** Built-in method references without a dependency on `root`. */
+var freeParseFloat = parseFloat;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min,
+ nativeRandom = Math.random;
+
+/**
+ * Produces a random number between the inclusive `lower` and `upper` bounds.
+ * If only one argument is provided a number between `0` and the given number
+ * is returned. If `floating` is `true`, or either `lower` or `upper` are
+ * floats, a floating-point number is returned instead of an integer.
+ *
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
+ * floating-point values which can produce unexpected results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.7.0
+ * @category Number
+ * @param {number} [lower=0] The lower bound.
+ * @param {number} [upper=1] The upper bound.
+ * @param {boolean} [floating] Specify returning a floating-point number.
+ * @returns {number} Returns the random number.
+ * @example
+ *
+ * _.random(0, 5);
+ * // => an integer between 0 and 5
+ *
+ * _.random(5);
+ * // => also an integer between 0 and 5
+ *
+ * _.random(5, true);
+ * // => a floating-point number between 0 and 5
+ *
+ * _.random(1.2, 5.2);
+ * // => a floating-point number between 1.2 and 5.2
+ */
+function random(lower, upper, floating) {
+ if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
+ upper = floating = undefined;
+ }
+ if (floating === undefined) {
+ if (typeof upper == 'boolean') {
+ floating = upper;
+ upper = undefined;
+ }
+ else if (typeof lower == 'boolean') {
+ floating = lower;
+ lower = undefined;
+ }
+ }
+ if (lower === undefined && upper === undefined) {
+ lower = 0;
+ upper = 1;
+ }
+ else {
+ lower = toFinite(lower);
+ if (upper === undefined) {
+ upper = lower;
+ lower = 0;
+ } else {
+ upper = toFinite(upper);
+ }
+ }
+ if (lower > upper) {
+ var temp = lower;
+ lower = upper;
+ upper = temp;
+ }
+ if (floating || lower % 1 || upper % 1) {
+ var rand = nativeRandom();
+ return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
+ }
+ return baseRandom(lower, upper);
+}
+
+module.exports = random;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/range.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/range.js
new file mode 100644
index 0000000..fa63b09
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/range.js
@@ -0,0 +1,46 @@
+var createRange = require('./_createRange');
+
+/**
+ * Creates an array of numbers (positive and/or negative) progressing from
+ * `start` up to, but not including, `end`. A step of `-1` is used if a negative
+ * `start` is specified without an `end` or `step`. If `end` is not specified,
+ * it's set to `start` with `start` then set to `0`.
+ *
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
+ * floating-point values which can produce unexpected results.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the range of numbers.
+ * @see _.inRange, _.rangeRight
+ * @example
+ *
+ * _.range(4);
+ * // => [0, 1, 2, 3]
+ *
+ * _.range(-4);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 5);
+ * // => [1, 2, 3, 4]
+ *
+ * _.range(0, 20, 5);
+ * // => [0, 5, 10, 15]
+ *
+ * _.range(0, -4, -1);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.range(0);
+ * // => []
+ */
+var range = createRange();
+
+module.exports = range;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/rangeRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/rangeRight.js
new file mode 100644
index 0000000..271fafc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/rangeRight.js
@@ -0,0 +1,41 @@
+var createRange = require('./_createRange');
+
+/**
+ * This method is like `_.range` except that it populates values in
+ * descending order.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the range of numbers.
+ * @see _.inRange, _.range
+ * @example
+ *
+ * _.rangeRight(4);
+ * // => [3, 2, 1, 0]
+ *
+ * _.rangeRight(-4);
+ * // => [-3, -2, -1, 0]
+ *
+ * _.rangeRight(1, 5);
+ * // => [4, 3, 2, 1]
+ *
+ * _.rangeRight(0, 20, 5);
+ * // => [15, 10, 5, 0]
+ *
+ * _.rangeRight(0, -4, -1);
+ * // => [-3, -2, -1, 0]
+ *
+ * _.rangeRight(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.rangeRight(0);
+ * // => []
+ */
+var rangeRight = createRange(true);
+
+module.exports = rangeRight;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/rearg.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/rearg.js
new file mode 100644
index 0000000..a3e1970
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/rearg.js
@@ -0,0 +1,33 @@
+var createWrap = require('./_createWrap'),
+ flatRest = require('./_flatRest');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_REARG_FLAG = 256;
+
+/**
+ * Creates a function that invokes `func` with arguments arranged according
+ * to the specified `indexes` where the argument value at the first index is
+ * provided as the first argument, the argument value at the second index is
+ * provided as the second argument, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to rearrange arguments for.
+ * @param {...(number|number[])} indexes The arranged argument indexes.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var rearged = _.rearg(function(a, b, c) {
+ * return [a, b, c];
+ * }, [2, 0, 1]);
+ *
+ * rearged('b', 'c', 'a')
+ * // => ['a', 'b', 'c']
+ */
+var rearg = flatRest(function(func, indexes) {
+ return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
+});
+
+module.exports = rearg;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/reduce.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/reduce.js
new file mode 100644
index 0000000..5a1df4d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/reduce.js
@@ -0,0 +1,51 @@
+var arrayReduce = require('./_arrayReduce'),
+ baseEach = require('./_baseEach'),
+ baseIteratee = require('./_baseIteratee'),
+ baseReduce = require('./_baseReduce'),
+ isArray = require('./isArray');
+
+/**
+ * Reduces `collection` to a value which is the accumulated result of running
+ * each element in `collection` thru `iteratee`, where each successive
+ * invocation is supplied the return value of the previous. If `accumulator`
+ * is not given, the first element of `collection` is used as the initial
+ * value. The iteratee is invoked with four arguments:
+ * (accumulator, value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.reduce`, `_.reduceRight`, and `_.transform`.
+ *
+ * The guarded methods are:
+ * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
+ * and `sortBy`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduceRight
+ * @example
+ *
+ * _.reduce([1, 2], function(sum, n) {
+ * return sum + n;
+ * }, 0);
+ * // => 3
+ *
+ * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * return result;
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
+ */
+function reduce(collection, iteratee, accumulator) {
+ var func = isArray(collection) ? arrayReduce : baseReduce,
+ initAccum = arguments.length < 3;
+
+ return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);
+}
+
+module.exports = reduce;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/reduceRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/reduceRight.js
new file mode 100644
index 0000000..e06a7cb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/reduceRight.js
@@ -0,0 +1,36 @@
+var arrayReduceRight = require('./_arrayReduceRight'),
+ baseEachRight = require('./_baseEachRight'),
+ baseIteratee = require('./_baseIteratee'),
+ baseReduce = require('./_baseReduce'),
+ isArray = require('./isArray');
+
+/**
+ * This method is like `_.reduce` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduce
+ * @example
+ *
+ * var array = [[0, 1], [2, 3], [4, 5]];
+ *
+ * _.reduceRight(array, function(flattened, other) {
+ * return flattened.concat(other);
+ * }, []);
+ * // => [4, 5, 2, 3, 0, 1]
+ */
+function reduceRight(collection, iteratee, accumulator) {
+ var func = isArray(collection) ? arrayReduceRight : baseReduce,
+ initAccum = arguments.length < 3;
+
+ return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
+}
+
+module.exports = reduceRight;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/reject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/reject.js
new file mode 100644
index 0000000..a13e554
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/reject.js
@@ -0,0 +1,46 @@
+var arrayFilter = require('./_arrayFilter'),
+ baseFilter = require('./_baseFilter'),
+ baseIteratee = require('./_baseIteratee'),
+ isArray = require('./isArray'),
+ negate = require('./negate');
+
+/**
+ * The opposite of `_.filter`; this method returns the elements of `collection`
+ * that `predicate` does **not** return truthy for.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.filter
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true }
+ * ];
+ *
+ * _.reject(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.reject(users, { 'age': 40, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.reject(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.reject(users, 'active');
+ * // => objects for ['barney']
+ */
+function reject(collection, predicate) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ return func(collection, negate(baseIteratee(predicate, 3)));
+}
+
+module.exports = reject;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/remove.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/remove.js
new file mode 100644
index 0000000..87b1898
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/remove.js
@@ -0,0 +1,53 @@
+var baseIteratee = require('./_baseIteratee'),
+ basePullAt = require('./_basePullAt');
+
+/**
+ * Removes all elements from `array` that `predicate` returns truthy for
+ * and returns an array of the removed elements. The predicate is invoked
+ * with three arguments: (value, index, array).
+ *
+ * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
+ * to pull elements from an array by value.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = [1, 2, 3, 4];
+ * var evens = _.remove(array, function(n) {
+ * return n % 2 == 0;
+ * });
+ *
+ * console.log(array);
+ * // => [1, 3]
+ *
+ * console.log(evens);
+ * // => [2, 4]
+ */
+function remove(array, predicate) {
+ var result = [];
+ if (!(array && array.length)) {
+ return result;
+ }
+ var index = -1,
+ indexes = [],
+ length = array.length;
+
+ predicate = baseIteratee(predicate, 3);
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result.push(value);
+ indexes.push(index);
+ }
+ }
+ basePullAt(array, indexes);
+ return result;
+}
+
+module.exports = remove;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/repeat.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/repeat.js
new file mode 100644
index 0000000..f4d8c69
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/repeat.js
@@ -0,0 +1,37 @@
+var baseRepeat = require('./_baseRepeat'),
+ isIterateeCall = require('./_isIterateeCall'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/**
+ * Repeats the given string `n` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to repeat.
+ * @param {number} [n=1] The number of times to repeat the string.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the repeated string.
+ * @example
+ *
+ * _.repeat('*', 3);
+ * // => '***'
+ *
+ * _.repeat('abc', 2);
+ * // => 'abcabc'
+ *
+ * _.repeat('abc', 0);
+ * // => ''
+ */
+function repeat(string, n, guard) {
+ if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
+ n = 1;
+ } else {
+ n = toInteger(n);
+ }
+ return baseRepeat(toString(string), n);
+}
+
+module.exports = repeat;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/replace.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/replace.js
new file mode 100644
index 0000000..6e26ecd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/replace.js
@@ -0,0 +1,29 @@
+var toString = require('./toString');
+
+/**
+ * Replaces matches for `pattern` in `string` with `replacement`.
+ *
+ * **Note:** This method is based on
+ * [`String#replace`](https://mdn.io/String/replace).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to modify.
+ * @param {RegExp|string} pattern The pattern to replace.
+ * @param {Function|string} replacement The match replacement.
+ * @returns {string} Returns the modified string.
+ * @example
+ *
+ * _.replace('Hi Fred', 'Fred', 'Barney');
+ * // => 'Hi Barney'
+ */
+function replace() {
+ var args = arguments,
+ string = toString(args[0]);
+
+ return args.length < 3 ? string : string.replace(args[1], args[2]);
+}
+
+module.exports = replace;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/rest.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/rest.js
new file mode 100644
index 0000000..eaaad00
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/rest.js
@@ -0,0 +1,40 @@
+var baseRest = require('./_baseRest'),
+ toInteger = require('./toInteger');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * created function and arguments from `start` and beyond provided as
+ * an array.
+ *
+ * **Note:** This method is based on the
+ * [rest parameter](https://mdn.io/rest_parameters).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.rest(function(what, names) {
+ * return what + ' ' + _.initial(names).join(', ') +
+ * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
+ * });
+ *
+ * say('hello', 'fred', 'barney', 'pebbles');
+ * // => 'hello fred, barney, & pebbles'
+ */
+function rest(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = start === undefined ? start : toInteger(start);
+ return baseRest(func, start);
+}
+
+module.exports = rest;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/result.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/result.js
new file mode 100644
index 0000000..eae1250
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/result.js
@@ -0,0 +1,56 @@
+var castPath = require('./_castPath'),
+ isFunction = require('./isFunction'),
+ toKey = require('./_toKey');
+
+/**
+ * This method is like `_.get` except that if the resolved value is a
+ * function it's invoked with the `this` binding of its parent object and
+ * its result is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to resolve.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
+ *
+ * _.result(object, 'a[0].b.c1');
+ * // => 3
+ *
+ * _.result(object, 'a[0].b.c2');
+ * // => 4
+ *
+ * _.result(object, 'a[0].b.c3', 'default');
+ * // => 'default'
+ *
+ * _.result(object, 'a[0].b.c3', _.constant('default'));
+ * // => 'default'
+ */
+function result(object, path, defaultValue) {
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length;
+
+ // Ensure the loop is entered when path is empty.
+ if (!length) {
+ length = 1;
+ object = undefined;
+ }
+ while (++index < length) {
+ var value = object == null ? undefined : object[toKey(path[index])];
+ if (value === undefined) {
+ index = length;
+ value = defaultValue;
+ }
+ object = isFunction(value) ? value.call(object) : value;
+ }
+ return object;
+}
+
+module.exports = result;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/reverse.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/reverse.js
new file mode 100644
index 0000000..21764af
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/reverse.js
@@ -0,0 +1,34 @@
+/** Used for built-in method references. */
+var arrayProto = Array.prototype;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeReverse = arrayProto.reverse;
+
+/**
+ * Reverses `array` so that the first element becomes the last, the second
+ * element becomes the second to last, and so on.
+ *
+ * **Note:** This method mutates `array` and is based on
+ * [`Array#reverse`](https://mdn.io/Array/reverse).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _.reverse(array);
+ * // => [3, 2, 1]
+ *
+ * console.log(array);
+ * // => [3, 2, 1]
+ */
+function reverse(array) {
+ return array == null ? array : nativeReverse.call(array);
+}
+
+module.exports = reverse;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/round.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/round.js
new file mode 100644
index 0000000..fccc831
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/round.js
@@ -0,0 +1,26 @@
+var createRound = require('./_createRound');
+
+/**
+ * Computes `number` rounded to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round.
+ * @param {number} [precision=0] The precision to round to.
+ * @returns {number} Returns the rounded number.
+ * @example
+ *
+ * _.round(4.006);
+ * // => 4
+ *
+ * _.round(4.006, 2);
+ * // => 4.01
+ *
+ * _.round(4060, -2);
+ * // => 4100
+ */
+var round = createRound('round');
+
+module.exports = round;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sample.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sample.js
new file mode 100644
index 0000000..39c3560
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sample.js
@@ -0,0 +1,24 @@
+var arraySample = require('./_arraySample'),
+ baseSample = require('./_baseSample'),
+ isArray = require('./isArray');
+
+/**
+ * Gets a random element from `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to sample.
+ * @returns {*} Returns the random element.
+ * @example
+ *
+ * _.sample([1, 2, 3, 4]);
+ * // => 2
+ */
+function sample(collection) {
+ var func = isArray(collection) ? arraySample : baseSample;
+ return func(collection);
+}
+
+module.exports = sample;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sampleSize.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sampleSize.js
new file mode 100644
index 0000000..a303686
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sampleSize.js
@@ -0,0 +1,37 @@
+var arraySampleSize = require('./_arraySampleSize'),
+ baseSampleSize = require('./_baseSampleSize'),
+ isArray = require('./isArray'),
+ isIterateeCall = require('./_isIterateeCall'),
+ toInteger = require('./toInteger');
+
+/**
+ * Gets `n` random elements at unique keys from `collection` up to the
+ * size of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to sample.
+ * @param {number} [n=1] The number of elements to sample.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the random elements.
+ * @example
+ *
+ * _.sampleSize([1, 2, 3], 2);
+ * // => [3, 1]
+ *
+ * _.sampleSize([1, 2, 3], 4);
+ * // => [2, 3, 1]
+ */
+function sampleSize(collection, n, guard) {
+ if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
+ n = 1;
+ } else {
+ n = toInteger(n);
+ }
+ var func = isArray(collection) ? arraySampleSize : baseSampleSize;
+ return func(collection, n);
+}
+
+module.exports = sampleSize;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/seq.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/seq.js
new file mode 100644
index 0000000..1570c2d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/seq.js
@@ -0,0 +1,16 @@
+module.exports = {
+ 'at': require('./wrapperAt'),
+ 'chain': require('./chain'),
+ 'commit': require('./commit'),
+ 'lodash': require('./wrapperLodash'),
+ 'next': require('./next'),
+ 'plant': require('./plant'),
+ 'reverse': require('./wrapperReverse'),
+ 'tap': require('./tap'),
+ 'thru': require('./thru'),
+ 'toIterator': require('./toIterator'),
+ 'toJSON': require('./toJSON'),
+ 'value': require('./wrapperValue'),
+ 'valueOf': require('./valueOf'),
+ 'wrapperChain': require('./wrapperChain')
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/set.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/set.js
new file mode 100644
index 0000000..d663002
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/set.js
@@ -0,0 +1,35 @@
+var baseSet = require('./_baseSet');
+
+/**
+ * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
+ * it's created. Arrays are created for missing index properties while objects
+ * are created for all other missing properties. Use `_.setWith` to customize
+ * `path` creation.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.set(object, 'a[0].b.c', 4);
+ * console.log(object.a[0].b.c);
+ * // => 4
+ *
+ * _.set(object, ['x', '0', 'y', 'z'], 5);
+ * console.log(object.x[0].y.z);
+ * // => 5
+ */
+function set(object, path, value) {
+ return object == null ? object : baseSet(object, path, value);
+}
+
+module.exports = set;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/setWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/setWith.js
new file mode 100644
index 0000000..fb3e0f6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/setWith.js
@@ -0,0 +1,32 @@
+var baseSet = require('./_baseSet');
+
+/**
+ * This method is like `_.set` except that it accepts `customizer` which is
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
+ * path creation is handled by the method instead. The `customizer` is invoked
+ * with three arguments: (nsValue, key, nsObject).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {};
+ *
+ * _.setWith(object, '[0][1]', 'a', Object);
+ * // => { '0': { '1': 'a' } }
+ */
+function setWith(object, path, value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return object == null ? object : baseSet(object, path, value, customizer);
+}
+
+module.exports = setWith;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/shuffle.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/shuffle.js
new file mode 100644
index 0000000..2b72da7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/shuffle.js
@@ -0,0 +1,25 @@
+var arrayShuffle = require('./_arrayShuffle'),
+ baseShuffle = require('./_baseShuffle'),
+ isArray = require('./isArray');
+
+/**
+ * Creates an array of shuffled values, using a version of the
+ * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ * @example
+ *
+ * _.shuffle([1, 2, 3, 4]);
+ * // => [4, 1, 3, 2]
+ */
+function shuffle(collection) {
+ var func = isArray(collection) ? arrayShuffle : baseShuffle;
+ return func(collection);
+}
+
+module.exports = shuffle;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/size.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/size.js
new file mode 100644
index 0000000..3561fc1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/size.js
@@ -0,0 +1,46 @@
+var baseKeys = require('./_baseKeys'),
+ getTag = require('./_getTag'),
+ isArrayLike = require('./isArrayLike'),
+ isString = require('./isString'),
+ stringSize = require('./_stringSize');
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+ setTag = '[object Set]';
+
+/**
+ * Gets the size of `collection` by returning its length for array-like
+ * values or the number of own enumerable string keyed properties for objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @returns {number} Returns the collection size.
+ * @example
+ *
+ * _.size([1, 2, 3]);
+ * // => 3
+ *
+ * _.size({ 'a': 1, 'b': 2 });
+ * // => 2
+ *
+ * _.size('pebbles');
+ * // => 7
+ */
+function size(collection) {
+ if (collection == null) {
+ return 0;
+ }
+ if (isArrayLike(collection)) {
+ return isString(collection) ? stringSize(collection) : collection.length;
+ }
+ var tag = getTag(collection);
+ if (tag == mapTag || tag == setTag) {
+ return collection.size;
+ }
+ return baseKeys(collection).length;
+}
+
+module.exports = size;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/slice.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/slice.js
new file mode 100644
index 0000000..f732442
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/slice.js
@@ -0,0 +1,37 @@
+var baseSlice = require('./_baseSlice'),
+ isIterateeCall = require('./_isIterateeCall'),
+ toInteger = require('./toInteger');
+
+/**
+ * Creates a slice of `array` from `start` up to, but not including, `end`.
+ *
+ * **Note:** This method is used instead of
+ * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
+ * returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+function slice(array, start, end) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
+ start = 0;
+ end = length;
+ }
+ else {
+ start = start == null ? 0 : toInteger(start);
+ end = end === undefined ? length : toInteger(end);
+ }
+ return baseSlice(array, start, end);
+}
+
+module.exports = slice;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/snakeCase.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/snakeCase.js
new file mode 100644
index 0000000..27f2a76
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/snakeCase.js
@@ -0,0 +1,28 @@
+var createCompounder = require('./_createCompounder');
+
+/**
+ * Converts `string` to
+ * [snake case](https://en.wikipedia.org/wiki/Snake_case).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the snake cased string.
+ * @example
+ *
+ * _.snakeCase('Foo Bar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('fooBar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('--FOO-BAR--');
+ * // => 'foo_bar'
+ */
+var snakeCase = createCompounder(function(result, word, index) {
+ return result + (index ? '_' : '') + word.toLowerCase();
+});
+
+module.exports = snakeCase;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/some.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/some.js
new file mode 100644
index 0000000..9c1d08c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/some.js
@@ -0,0 +1,51 @@
+var arraySome = require('./_arraySome'),
+ baseIteratee = require('./_baseIteratee'),
+ baseSome = require('./_baseSome'),
+ isArray = require('./isArray'),
+ isIterateeCall = require('./_isIterateeCall');
+
+/**
+ * Checks if `predicate` returns truthy for **any** element of `collection`.
+ * Iteration is stopped once `predicate` returns truthy. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.some([null, 0, 'yes', false], Boolean);
+ * // => true
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.some(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.some(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.some(users, 'active');
+ * // => true
+ */
+function some(collection, predicate, guard) {
+ var func = isArray(collection) ? arraySome : baseSome;
+ if (guard && isIterateeCall(collection, predicate, guard)) {
+ predicate = undefined;
+ }
+ return func(collection, baseIteratee(predicate, 3));
+}
+
+module.exports = some;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortBy.js
new file mode 100644
index 0000000..4ba8f7a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortBy.js
@@ -0,0 +1,48 @@
+var baseFlatten = require('./_baseFlatten'),
+ baseOrderBy = require('./_baseOrderBy'),
+ baseRest = require('./_baseRest'),
+ isIterateeCall = require('./_isIterateeCall');
+
+/**
+ * Creates an array of elements, sorted in ascending order by the results of
+ * running each element in a collection thru each iteratee. This method
+ * performs a stable sort, that is, it preserves the original sort order of
+ * equal elements. The iteratees are invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'barney', 'age': 34 }
+ * ];
+ *
+ * _.sortBy(users, [function(o) { return o.user; }]);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+ *
+ * _.sortBy(users, ['user', 'age']);
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
+ */
+var sortBy = baseRest(function(collection, iteratees) {
+ if (collection == null) {
+ return [];
+ }
+ var length = iteratees.length;
+ if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
+ iteratees = [];
+ } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
+ iteratees = [iteratees[0]];
+ }
+ return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
+});
+
+module.exports = sortBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedIndex.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedIndex.js
new file mode 100644
index 0000000..e763473
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedIndex.js
@@ -0,0 +1,24 @@
+var baseSortedIndex = require('./_baseSortedIndex');
+
+/**
+ * Uses a binary search to determine the lowest index at which `value`
+ * should be inserted into `array` in order to maintain its sort order.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedIndex([30, 50], 40);
+ * // => 1
+ */
+function sortedIndex(array, value) {
+ return baseSortedIndex(array, value);
+}
+
+module.exports = sortedIndex;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedIndexBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedIndexBy.js
new file mode 100644
index 0000000..945f23c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedIndexBy.js
@@ -0,0 +1,33 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseSortedIndexBy = require('./_baseSortedIndexBy');
+
+/**
+ * This method is like `_.sortedIndex` except that it accepts `iteratee`
+ * which is invoked for `value` and each element of `array` to compute their
+ * sort ranking. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * var objects = [{ 'x': 4 }, { 'x': 5 }];
+ *
+ * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
+ * // => 0
+ */
+function sortedIndexBy(array, value, iteratee) {
+ return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2));
+}
+
+module.exports = sortedIndexBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedIndexOf.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedIndexOf.js
new file mode 100644
index 0000000..e2d3b7a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedIndexOf.js
@@ -0,0 +1,31 @@
+var baseSortedIndex = require('./_baseSortedIndex'),
+ eq = require('./eq');
+
+/**
+ * This method is like `_.indexOf` except that it performs a binary
+ * search on a sorted `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
+ * // => 1
+ */
+function sortedIndexOf(array, value) {
+ var length = array == null ? 0 : array.length;
+ if (length) {
+ var index = baseSortedIndex(array, value);
+ if (index < length && eq(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+module.exports = sortedIndexOf;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedLastIndex.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedLastIndex.js
new file mode 100644
index 0000000..9380cb9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedLastIndex.js
@@ -0,0 +1,25 @@
+var baseSortedIndex = require('./_baseSortedIndex');
+
+/**
+ * This method is like `_.sortedIndex` except that it returns the highest
+ * index at which `value` should be inserted into `array` in order to
+ * maintain its sort order.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
+ * // => 4
+ */
+function sortedLastIndex(array, value) {
+ return baseSortedIndex(array, value, true);
+}
+
+module.exports = sortedLastIndex;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedLastIndexBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedLastIndexBy.js
new file mode 100644
index 0000000..9225eeb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedLastIndexBy.js
@@ -0,0 +1,33 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseSortedIndexBy = require('./_baseSortedIndexBy');
+
+/**
+ * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
+ * which is invoked for `value` and each element of `array` to compute their
+ * sort ranking. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * var objects = [{ 'x': 4 }, { 'x': 5 }];
+ *
+ * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
+ * // => 1
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
+ * // => 1
+ */
+function sortedLastIndexBy(array, value, iteratee) {
+ return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2), true);
+}
+
+module.exports = sortedLastIndexBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedLastIndexOf.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedLastIndexOf.js
new file mode 100644
index 0000000..18bc4c5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedLastIndexOf.js
@@ -0,0 +1,31 @@
+var baseSortedIndex = require('./_baseSortedIndex'),
+ eq = require('./eq');
+
+/**
+ * This method is like `_.lastIndexOf` except that it performs a binary
+ * search on a sorted `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
+ * // => 3
+ */
+function sortedLastIndexOf(array, value) {
+ var length = array == null ? 0 : array.length;
+ if (length) {
+ var index = baseSortedIndex(array, value, true) - 1;
+ if (eq(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+module.exports = sortedLastIndexOf;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedUniq.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedUniq.js
new file mode 100644
index 0000000..866db31
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedUniq.js
@@ -0,0 +1,24 @@
+var baseSortedUniq = require('./_baseSortedUniq');
+
+/**
+ * This method is like `_.uniq` except that it's designed and optimized
+ * for sorted arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.sortedUniq([1, 1, 2]);
+ * // => [1, 2]
+ */
+function sortedUniq(array) {
+ return (array && array.length)
+ ? baseSortedUniq(array)
+ : [];
+}
+
+module.exports = sortedUniq;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedUniqBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedUniqBy.js
new file mode 100644
index 0000000..4f05ebe
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sortedUniqBy.js
@@ -0,0 +1,26 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseSortedUniq = require('./_baseSortedUniq');
+
+/**
+ * This method is like `_.uniqBy` except that it's designed and optimized
+ * for sorted arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
+ * // => [1.1, 2.3]
+ */
+function sortedUniqBy(array, iteratee) {
+ return (array && array.length)
+ ? baseSortedUniq(array, baseIteratee(iteratee, 2))
+ : [];
+}
+
+module.exports = sortedUniqBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/split.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/split.js
new file mode 100644
index 0000000..956b48a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/split.js
@@ -0,0 +1,52 @@
+var baseToString = require('./_baseToString'),
+ castSlice = require('./_castSlice'),
+ hasUnicode = require('./_hasUnicode'),
+ isIterateeCall = require('./_isIterateeCall'),
+ isRegExp = require('./isRegExp'),
+ stringToArray = require('./_stringToArray'),
+ toString = require('./toString');
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295;
+
+/**
+ * Splits `string` by `separator`.
+ *
+ * **Note:** This method is based on
+ * [`String#split`](https://mdn.io/String/split).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to split.
+ * @param {RegExp|string} separator The separator pattern to split by.
+ * @param {number} [limit] The length to truncate results to.
+ * @returns {Array} Returns the string segments.
+ * @example
+ *
+ * _.split('a-b-c', '-', 2);
+ * // => ['a', 'b']
+ */
+function split(string, separator, limit) {
+ if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
+ separator = limit = undefined;
+ }
+ limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
+ if (!limit) {
+ return [];
+ }
+ string = toString(string);
+ if (string && (
+ typeof separator == 'string' ||
+ (separator != null && !isRegExp(separator))
+ )) {
+ separator = baseToString(separator);
+ if (!separator && hasUnicode(string)) {
+ return castSlice(stringToArray(string), 0, limit);
+ }
+ }
+ return string.split(separator, limit);
+}
+
+module.exports = split;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/spread.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/spread.js
new file mode 100644
index 0000000..ee44c8d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/spread.js
@@ -0,0 +1,63 @@
+var apply = require('./_apply'),
+ arrayPush = require('./_arrayPush'),
+ baseRest = require('./_baseRest'),
+ castSlice = require('./_castSlice'),
+ toInteger = require('./toInteger');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * create function and an array of arguments much like
+ * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
+ *
+ * **Note:** This method is based on the
+ * [spread operator](https://mdn.io/spread_operator).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Function
+ * @param {Function} func The function to spread arguments over.
+ * @param {number} [start=0] The start position of the spread.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.spread(function(who, what) {
+ * return who + ' says ' + what;
+ * });
+ *
+ * say(['fred', 'hello']);
+ * // => 'fred says hello'
+ *
+ * var numbers = Promise.all([
+ * Promise.resolve(40),
+ * Promise.resolve(36)
+ * ]);
+ *
+ * numbers.then(_.spread(function(x, y) {
+ * return x + y;
+ * }));
+ * // => a Promise of 76
+ */
+function spread(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = start === undefined ? 0 : nativeMax(toInteger(start), 0);
+ return baseRest(function(args) {
+ var array = args[start],
+ otherArgs = castSlice(args, 0, start);
+
+ if (array) {
+ arrayPush(otherArgs, array);
+ }
+ return apply(func, this, otherArgs);
+ });
+}
+
+module.exports = spread;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/startCase.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/startCase.js
new file mode 100644
index 0000000..a48f21c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/startCase.js
@@ -0,0 +1,29 @@
+var createCompounder = require('./_createCompounder'),
+ upperFirst = require('./upperFirst');
+
+/**
+ * Converts `string` to
+ * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.1.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the start cased string.
+ * @example
+ *
+ * _.startCase('--foo-bar--');
+ * // => 'Foo Bar'
+ *
+ * _.startCase('fooBar');
+ * // => 'Foo Bar'
+ *
+ * _.startCase('__FOO_BAR__');
+ * // => 'FOO BAR'
+ */
+var startCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + upperFirst(word);
+});
+
+module.exports = startCase;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/startsWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/startsWith.js
new file mode 100644
index 0000000..359e5ad
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/startsWith.js
@@ -0,0 +1,36 @@
+var baseClamp = require('./_baseClamp'),
+ baseToString = require('./_baseToString'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/**
+ * Checks if `string` starts with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=0] The position to search from.
+ * @returns {boolean} Returns `true` if `string` starts with `target`,
+ * else `false`.
+ * @example
+ *
+ * _.startsWith('abc', 'a');
+ * // => true
+ *
+ * _.startsWith('abc', 'b');
+ * // => false
+ *
+ * _.startsWith('abc', 'b', 1);
+ * // => true
+ */
+function startsWith(string, target, position) {
+ string = toString(string);
+ position = baseClamp(toInteger(position), 0, string.length);
+ target = baseToString(target);
+ return string.slice(position, position + target.length) == target;
+}
+
+module.exports = startsWith;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/string.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/string.js
new file mode 100644
index 0000000..2c829c1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/string.js
@@ -0,0 +1,33 @@
+module.exports = {
+ 'camelCase': require('./camelCase'),
+ 'capitalize': require('./capitalize'),
+ 'deburr': require('./deburr'),
+ 'endsWith': require('./endsWith'),
+ 'escape': require('./escape'),
+ 'escapeRegExp': require('./escapeRegExp'),
+ 'kebabCase': require('./kebabCase'),
+ 'lowerCase': require('./lowerCase'),
+ 'lowerFirst': require('./lowerFirst'),
+ 'pad': require('./pad'),
+ 'padEnd': require('./padEnd'),
+ 'padStart': require('./padStart'),
+ 'parseInt': require('./parseInt'),
+ 'repeat': require('./repeat'),
+ 'replace': require('./replace'),
+ 'snakeCase': require('./snakeCase'),
+ 'split': require('./split'),
+ 'startCase': require('./startCase'),
+ 'startsWith': require('./startsWith'),
+ 'template': require('./template'),
+ 'templateSettings': require('./templateSettings'),
+ 'toLower': require('./toLower'),
+ 'toUpper': require('./toUpper'),
+ 'trim': require('./trim'),
+ 'trimEnd': require('./trimEnd'),
+ 'trimStart': require('./trimStart'),
+ 'truncate': require('./truncate'),
+ 'unescape': require('./unescape'),
+ 'upperCase': require('./upperCase'),
+ 'upperFirst': require('./upperFirst'),
+ 'words': require('./words')
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/stubArray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/stubArray.js
new file mode 100644
index 0000000..f460c15
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/stubArray.js
@@ -0,0 +1,23 @@
+/**
+ * This method returns a new empty array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Array} Returns the new empty array.
+ * @example
+ *
+ * var arrays = _.times(2, _.stubArray);
+ *
+ * console.log(arrays);
+ * // => [[], []]
+ *
+ * console.log(arrays[0] === arrays[1]);
+ * // => false
+ */
+function stubArray() {
+ return [];
+}
+
+module.exports = stubArray;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/stubFalse.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/stubFalse.js
new file mode 100644
index 0000000..9b346fc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/stubFalse.js
@@ -0,0 +1,18 @@
+/**
+ * This method returns `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `false`.
+ * @example
+ *
+ * _.times(2, _.stubFalse);
+ * // => [false, false]
+ */
+function stubFalse() {
+ return false;
+}
+
+module.exports = stubFalse;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/stubObject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/stubObject.js
new file mode 100644
index 0000000..1d190a1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/stubObject.js
@@ -0,0 +1,23 @@
+/**
+ * This method returns a new empty object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Object} Returns the new empty object.
+ * @example
+ *
+ * var objects = _.times(2, _.stubObject);
+ *
+ * console.log(objects);
+ * // => [{}, {}]
+ *
+ * console.log(objects[0] === objects[1]);
+ * // => false
+ */
+function stubObject() {
+ return {};
+}
+
+module.exports = stubObject;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/stubString.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/stubString.js
new file mode 100644
index 0000000..2db0bed
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/stubString.js
@@ -0,0 +1,18 @@
+/**
+ * This method returns an empty string.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {string} Returns the empty string.
+ * @example
+ *
+ * _.times(2, _.stubString);
+ * // => ['', '']
+ */
+function stubString() {
+ return '';
+}
+
+module.exports = stubString;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/stubTrue.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/stubTrue.js
new file mode 100644
index 0000000..af3cc9e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/stubTrue.js
@@ -0,0 +1,18 @@
+/**
+ * This method returns `true`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `true`.
+ * @example
+ *
+ * _.times(2, _.stubTrue);
+ * // => [true, true]
+ */
+function stubTrue() {
+ return true;
+}
+
+module.exports = stubTrue;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/subtract.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/subtract.js
new file mode 100644
index 0000000..6720778
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/subtract.js
@@ -0,0 +1,22 @@
+var createMathOperation = require('./_createMathOperation');
+
+/**
+ * Subtract two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {number} minuend The first number in a subtraction.
+ * @param {number} subtrahend The second number in a subtraction.
+ * @returns {number} Returns the difference.
+ * @example
+ *
+ * _.subtract(6, 4);
+ * // => 2
+ */
+var subtract = createMathOperation(function(minuend, subtrahend) {
+ return minuend - subtrahend;
+}, 0);
+
+module.exports = subtract;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sum.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sum.js
new file mode 100644
index 0000000..3b07ee4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sum.js
@@ -0,0 +1,24 @@
+var baseSum = require('./_baseSum'),
+ identity = require('./identity');
+
+/**
+ * Computes the sum of the values in `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.4.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {number} Returns the sum.
+ * @example
+ *
+ * _.sum([4, 2, 8, 6]);
+ * // => 20
+ */
+function sum(array) {
+ return (array && array.length)
+ ? baseSum(array, identity)
+ : 0;
+}
+
+module.exports = sum;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sumBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sumBy.js
new file mode 100644
index 0000000..00e36d0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/sumBy.js
@@ -0,0 +1,33 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseSum = require('./_baseSum');
+
+/**
+ * This method is like `_.sum` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the value to be summed.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the sum.
+ * @example
+ *
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+ *
+ * _.sumBy(objects, function(o) { return o.n; });
+ * // => 20
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sumBy(objects, 'n');
+ * // => 20
+ */
+function sumBy(array, iteratee) {
+ return (array && array.length)
+ ? baseSum(array, baseIteratee(iteratee, 2))
+ : 0;
+}
+
+module.exports = sumBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/tail.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/tail.js
new file mode 100644
index 0000000..001c22d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/tail.js
@@ -0,0 +1,22 @@
+var baseSlice = require('./_baseSlice');
+
+/**
+ * Gets all but the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.tail([1, 2, 3]);
+ * // => [2, 3]
+ */
+function tail(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseSlice(array, 1, length) : [];
+}
+
+module.exports = tail;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/take.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/take.js
new file mode 100644
index 0000000..b7da712
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/take.js
@@ -0,0 +1,37 @@
+var baseSlice = require('./_baseSlice'),
+ toInteger = require('./toInteger');
+
+/**
+ * Creates a slice of `array` with `n` elements taken from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.take([1, 2, 3]);
+ * // => [1]
+ *
+ * _.take([1, 2, 3], 2);
+ * // => [1, 2]
+ *
+ * _.take([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.take([1, 2, 3], 0);
+ * // => []
+ */
+function take(array, n, guard) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+}
+
+module.exports = take;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/takeRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/takeRight.js
new file mode 100644
index 0000000..6c37506
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/takeRight.js
@@ -0,0 +1,39 @@
+var baseSlice = require('./_baseSlice'),
+ toInteger = require('./toInteger');
+
+/**
+ * Creates a slice of `array` with `n` elements taken from the end.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.takeRight([1, 2, 3]);
+ * // => [3]
+ *
+ * _.takeRight([1, 2, 3], 2);
+ * // => [2, 3]
+ *
+ * _.takeRight([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.takeRight([1, 2, 3], 0);
+ * // => []
+ */
+function takeRight(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ n = length - n;
+ return baseSlice(array, n < 0 ? 0 : n, length);
+}
+
+module.exports = takeRight;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/takeRightWhile.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/takeRightWhile.js
new file mode 100644
index 0000000..94ab783
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/takeRightWhile.js
@@ -0,0 +1,45 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseWhile = require('./_baseWhile');
+
+/**
+ * Creates a slice of `array` with elements taken from the end. Elements are
+ * taken until `predicate` returns falsey. The predicate is invoked with
+ * three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.takeRightWhile(users, function(o) { return !o.active; });
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
+ * // => objects for ['pebbles']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.takeRightWhile(users, ['active', false]);
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.takeRightWhile(users, 'active');
+ * // => []
+ */
+function takeRightWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, baseIteratee(predicate, 3), false, true)
+ : [];
+}
+
+module.exports = takeRightWhile;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/takeWhile.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/takeWhile.js
new file mode 100644
index 0000000..dc84d69
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/takeWhile.js
@@ -0,0 +1,45 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseWhile = require('./_baseWhile');
+
+/**
+ * Creates a slice of `array` with elements taken from the beginning. Elements
+ * are taken until `predicate` returns falsey. The predicate is invoked with
+ * three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false},
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.takeWhile(users, function(o) { return !o.active; });
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.takeWhile(users, { 'user': 'barney', 'active': false });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.takeWhile(users, ['active', false]);
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.takeWhile(users, 'active');
+ * // => []
+ */
+function takeWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, baseIteratee(predicate, 3))
+ : [];
+}
+
+module.exports = takeWhile;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/tap.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/tap.js
new file mode 100644
index 0000000..d007285
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/tap.js
@@ -0,0 +1,29 @@
+/**
+ * This method invokes `interceptor` and returns `value`. The interceptor
+ * is invoked with one argument; (value). The purpose of this method is to
+ * "tap into" a method chain sequence in order to modify intermediate results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * _([1, 2, 3])
+ * .tap(function(array) {
+ * // Mutate input array.
+ * array.pop();
+ * })
+ * .reverse()
+ * .value();
+ * // => [2, 1]
+ */
+function tap(value, interceptor) {
+ interceptor(value);
+ return value;
+}
+
+module.exports = tap;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/template.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/template.js
new file mode 100644
index 0000000..2df417f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/template.js
@@ -0,0 +1,238 @@
+var assignInDefaults = require('./_assignInDefaults'),
+ assignInWith = require('./assignInWith'),
+ attempt = require('./attempt'),
+ baseValues = require('./_baseValues'),
+ escapeStringChar = require('./_escapeStringChar'),
+ isError = require('./isError'),
+ isIterateeCall = require('./_isIterateeCall'),
+ keys = require('./keys'),
+ reInterpolate = require('./_reInterpolate'),
+ templateSettings = require('./templateSettings'),
+ toString = require('./toString');
+
+/** Used to match empty string literals in compiled template source. */
+var reEmptyStringLeading = /\b__p \+= '';/g,
+ reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
+ reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
+
+/**
+ * Used to match
+ * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
+ */
+var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
+
+/** Used to ensure capturing order of template delimiters. */
+var reNoMatch = /($^)/;
+
+/** Used to match unescaped characters in compiled string literals. */
+var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
+
+/**
+ * Creates a compiled template function that can interpolate data properties
+ * in "interpolate" delimiters, HTML-escape interpolated data properties in
+ * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
+ * properties may be accessed as free variables in the template. If a setting
+ * object is given, it takes precedence over `_.templateSettings` values.
+ *
+ * **Note:** In the development build `_.template` utilizes
+ * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
+ * for easier debugging.
+ *
+ * For more information on precompiling templates see
+ * [lodash's custom builds documentation](https://lodash.com/custom-builds).
+ *
+ * For more information on Chrome extension sandboxes see
+ * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The template string.
+ * @param {Object} [options={}] The options object.
+ * @param {RegExp} [options.escape=_.templateSettings.escape]
+ * The HTML "escape" delimiter.
+ * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
+ * The "evaluate" delimiter.
+ * @param {Object} [options.imports=_.templateSettings.imports]
+ * An object to import into the template as free variables.
+ * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
+ * The "interpolate" delimiter.
+ * @param {string} [options.sourceURL='templateSources[n]']
+ * The sourceURL of the compiled template.
+ * @param {string} [options.variable='obj']
+ * The data object variable name.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the compiled template function.
+ * @example
+ *
+ * // Use the "interpolate" delimiter to create a compiled template.
+ * var compiled = _.template('hello <%= user %>!');
+ * compiled({ 'user': 'fred' });
+ * // => 'hello fred!'
+ *
+ * // Use the HTML "escape" delimiter to escape data property values.
+ * var compiled = _.template('<b><%- value %></b>');
+ * compiled({ 'value': '<script>' });
+ * // => '<b>&lt;script&gt;</b>'
+ *
+ * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
+ * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the internal `print` function in "evaluate" delimiters.
+ * var compiled = _.template('<% print("hello " + user); %>!');
+ * compiled({ 'user': 'barney' });
+ * // => 'hello barney!'
+ *
+ * // Use the ES template literal delimiter as an "interpolate" delimiter.
+ * // Disable support by replacing the "interpolate" delimiter.
+ * var compiled = _.template('hello ${ user }!');
+ * compiled({ 'user': 'pebbles' });
+ * // => 'hello pebbles!'
+ *
+ * // Use backslashes to treat delimiters as plain text.
+ * var compiled = _.template('<%= "\\<%- value %\\>" %>');
+ * compiled({ 'value': 'ignored' });
+ * // => '<%- value %>'
+ *
+ * // Use the `imports` option to import `jQuery` as `jq`.
+ * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
+ * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the `sourceURL` option to specify a custom sourceURL for the template.
+ * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
+ * compiled(data);
+ * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
+ *
+ * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
+ * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
+ * compiled.source;
+ * // => function(data) {
+ * // var __t, __p = '';
+ * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
+ * // return __p;
+ * // }
+ *
+ * // Use custom template delimiters.
+ * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
+ * var compiled = _.template('hello {{ user }}!');
+ * compiled({ 'user': 'mustache' });
+ * // => 'hello mustache!'
+ *
+ * // Use the `source` property to inline compiled templates for meaningful
+ * // line numbers in error messages and stack traces.
+ * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
+ * var JST = {\
+ * "main": ' + _.template(mainText).source + '\
+ * };\
+ * ');
+ */
+function template(string, options, guard) {
+ // Based on John Resig's `tmpl` implementation
+ // (http://ejohn.org/blog/javascript-micro-templating/)
+ // and Laura Doktorova's doT.js (https://github.com/olado/doT).
+ var settings = templateSettings.imports._.templateSettings || templateSettings;
+
+ if (guard && isIterateeCall(string, options, guard)) {
+ options = undefined;
+ }
+ string = toString(string);
+ options = assignInWith({}, options, settings, assignInDefaults);
+
+ var imports = assignInWith({}, options.imports, settings.imports, assignInDefaults),
+ importsKeys = keys(imports),
+ importsValues = baseValues(imports, importsKeys);
+
+ var isEscaping,
+ isEvaluating,
+ index = 0,
+ interpolate = options.interpolate || reNoMatch,
+ source = "__p += '";
+
+ // Compile the regexp to match each delimiter.
+ var reDelimiters = RegExp(
+ (options.escape || reNoMatch).source + '|' +
+ interpolate.source + '|' +
+ (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
+ (options.evaluate || reNoMatch).source + '|$'
+ , 'g');
+
+ // Use a sourceURL for easier debugging.
+ var sourceURL = 'sourceURL' in options ? '//# sourceURL=' + options.sourceURL + '\n' : '';
+
+ string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
+ interpolateValue || (interpolateValue = esTemplateValue);
+
+ // Escape characters that can't be included in string literals.
+ source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
+
+ // Replace delimiters with snippets.
+ if (escapeValue) {
+ isEscaping = true;
+ source += "' +\n__e(" + escapeValue + ") +\n'";
+ }
+ if (evaluateValue) {
+ isEvaluating = true;
+ source += "';\n" + evaluateValue + ";\n__p += '";
+ }
+ if (interpolateValue) {
+ source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
+ }
+ index = offset + match.length;
+
+ // The JS engine embedded in Adobe products needs `match` returned in
+ // order to produce the correct `offset` value.
+ return match;
+ });
+
+ source += "';\n";
+
+ // If `variable` is not specified wrap a with-statement around the generated
+ // code to add the data object to the top of the scope chain.
+ var variable = options.variable;
+ if (!variable) {
+ source = 'with (obj) {\n' + source + '\n}\n';
+ }
+ // Cleanup code by stripping empty strings.
+ source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
+ .replace(reEmptyStringMiddle, '$1')
+ .replace(reEmptyStringTrailing, '$1;');
+
+ // Frame code as the function body.
+ source = 'function(' + (variable || 'obj') + ') {\n' +
+ (variable
+ ? ''
+ : 'obj || (obj = {});\n'
+ ) +
+ "var __t, __p = ''" +
+ (isEscaping
+ ? ', __e = _.escape'
+ : ''
+ ) +
+ (isEvaluating
+ ? ', __j = Array.prototype.join;\n' +
+ "function print() { __p += __j.call(arguments, '') }\n"
+ : ';\n'
+ ) +
+ source +
+ 'return __p\n}';
+
+ var result = attempt(function() {
+ return Function(importsKeys, sourceURL + 'return ' + source)
+ .apply(undefined, importsValues);
+ });
+
+ // Provide the compiled function's source by its `toString` method or
+ // the `source` property as a convenience for inlining compiled templates.
+ result.source = source;
+ if (isError(result)) {
+ throw result;
+ }
+ return result;
+}
+
+module.exports = template;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/templateSettings.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/templateSettings.js
new file mode 100644
index 0000000..bce2f74
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/templateSettings.js
@@ -0,0 +1,67 @@
+var escape = require('./escape'),
+ reEscape = require('./_reEscape'),
+ reEvaluate = require('./_reEvaluate'),
+ reInterpolate = require('./_reInterpolate');
+
+/**
+ * By default, the template delimiters used by lodash are like those in
+ * embedded Ruby (ERB). Change the following template settings to use
+ * alternative delimiters.
+ *
+ * @static
+ * @memberOf _
+ * @type {Object}
+ */
+var templateSettings = {
+
+ /**
+ * Used to detect `data` property values to be HTML-escaped.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'escape': reEscape,
+
+ /**
+ * Used to detect code to be evaluated.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'evaluate': reEvaluate,
+
+ /**
+ * Used to detect `data` property values to inject.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'interpolate': reInterpolate,
+
+ /**
+ * Used to reference the data object in the template text.
+ *
+ * @memberOf _.templateSettings
+ * @type {string}
+ */
+ 'variable': '',
+
+ /**
+ * Used to import variables into the compiled template.
+ *
+ * @memberOf _.templateSettings
+ * @type {Object}
+ */
+ 'imports': {
+
+ /**
+ * A reference to the `lodash` function.
+ *
+ * @memberOf _.templateSettings.imports
+ * @type {Function}
+ */
+ '_': { 'escape': escape }
+ }
+};
+
+module.exports = templateSettings;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/throttle.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/throttle.js
new file mode 100644
index 0000000..e2bb806
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/throttle.js
@@ -0,0 +1,69 @@
+var debounce = require('./debounce'),
+ isObject = require('./isObject');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a throttled function that only invokes `func` at most once per
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
+ * method to cancel delayed `func` invocations and a `flush` method to
+ * immediately invoke them. Provide `options` to indicate whether `func`
+ * should be invoked on the leading and/or trailing edge of the `wait`
+ * timeout. The `func` is invoked with the last arguments provided to the
+ * throttled function. Subsequent calls to the throttled function return the
+ * result of the last `func` invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
+ * invoked on the trailing edge of the timeout only if the throttled function
+ * is invoked more than once during the `wait` timeout.
+ *
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
+ *
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+ * for details over the differences between `_.throttle` and `_.debounce`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to throttle.
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=true]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
+ * @returns {Function} Returns the new throttled function.
+ * @example
+ *
+ * // Avoid excessively updating the position while scrolling.
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
+ *
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
+ * jQuery(element).on('click', throttled);
+ *
+ * // Cancel the trailing throttled invocation.
+ * jQuery(window).on('popstate', throttled.cancel);
+ */
+function throttle(func, wait, options) {
+ var leading = true,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (isObject(options)) {
+ leading = 'leading' in options ? !!options.leading : leading;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+ return debounce(func, wait, {
+ 'leading': leading,
+ 'maxWait': wait,
+ 'trailing': trailing
+ });
+}
+
+module.exports = throttle;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/thru.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/thru.js
new file mode 100644
index 0000000..91e132e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/thru.js
@@ -0,0 +1,28 @@
+/**
+ * This method is like `_.tap` except that it returns the result of `interceptor`.
+ * The purpose of this method is to "pass thru" values replacing intermediate
+ * results in a method chain sequence.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns the result of `interceptor`.
+ * @example
+ *
+ * _(' abc ')
+ * .chain()
+ * .trim()
+ * .thru(function(value) {
+ * return [value];
+ * })
+ * .value();
+ * // => ['abc']
+ */
+function thru(value, interceptor) {
+ return interceptor(value);
+}
+
+module.exports = thru;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/times.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/times.js
new file mode 100644
index 0000000..266c90c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/times.js
@@ -0,0 +1,51 @@
+var baseTimes = require('./_baseTimes'),
+ castFunction = require('./_castFunction'),
+ toInteger = require('./toInteger');
+
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * Invokes the iteratee `n` times, returning an array of the results of
+ * each invocation. The iteratee is invoked with one argument; (index).
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.times(3, String);
+ * // => ['0', '1', '2']
+ *
+ * _.times(4, _.constant(0));
+ * // => [0, 0, 0, 0]
+ */
+function times(n, iteratee) {
+ n = toInteger(n);
+ if (n < 1 || n > MAX_SAFE_INTEGER) {
+ return [];
+ }
+ var index = MAX_ARRAY_LENGTH,
+ length = nativeMin(n, MAX_ARRAY_LENGTH);
+
+ iteratee = castFunction(iteratee);
+ n -= MAX_ARRAY_LENGTH;
+
+ var result = baseTimes(length, iteratee);
+ while (++index < n) {
+ iteratee(index);
+ }
+ return result;
+}
+
+module.exports = times;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toArray.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toArray.js
new file mode 100644
index 0000000..9809584
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toArray.js
@@ -0,0 +1,58 @@
+var Symbol = require('./_Symbol'),
+ copyArray = require('./_copyArray'),
+ getTag = require('./_getTag'),
+ isArrayLike = require('./isArrayLike'),
+ isString = require('./isString'),
+ iteratorToArray = require('./_iteratorToArray'),
+ mapToArray = require('./_mapToArray'),
+ setToArray = require('./_setToArray'),
+ stringToArray = require('./_stringToArray'),
+ values = require('./values');
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+ setTag = '[object Set]';
+
+/** Built-in value references. */
+var symIterator = Symbol ? Symbol.iterator : undefined;
+
+/**
+ * Converts `value` to an array.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the converted array.
+ * @example
+ *
+ * _.toArray({ 'a': 1, 'b': 2 });
+ * // => [1, 2]
+ *
+ * _.toArray('abc');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toArray(1);
+ * // => []
+ *
+ * _.toArray(null);
+ * // => []
+ */
+function toArray(value) {
+ if (!value) {
+ return [];
+ }
+ if (isArrayLike(value)) {
+ return isString(value) ? stringToArray(value) : copyArray(value);
+ }
+ if (symIterator && value[symIterator]) {
+ return iteratorToArray(value[symIterator]());
+ }
+ var tag = getTag(value),
+ func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
+
+ return func(value);
+}
+
+module.exports = toArray;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toFinite.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toFinite.js
new file mode 100644
index 0000000..3b5bba6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toFinite.js
@@ -0,0 +1,42 @@
+var toNumber = require('./toNumber');
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0,
+ MAX_INTEGER = 1.7976931348623157e+308;
+
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
+module.exports = toFinite;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toInteger.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toInteger.js
new file mode 100644
index 0000000..c6aadf8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toInteger.js
@@ -0,0 +1,36 @@
+var toFinite = require('./toFinite');
+
+/**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3.2);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3.2');
+ * // => 3
+ */
+function toInteger(value) {
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
+}
+
+module.exports = toInteger;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toIterator.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toIterator.js
new file mode 100644
index 0000000..beeed5d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toIterator.js
@@ -0,0 +1,23 @@
+/**
+ * Enables the wrapper to be iterable.
+ *
+ * @name Symbol.iterator
+ * @memberOf _
+ * @since 4.0.0
+ * @category Seq
+ * @returns {Object} Returns the wrapper object.
+ * @example
+ *
+ * var wrapped = _([1, 2]);
+ *
+ * wrapped[Symbol.iterator]() === wrapped;
+ * // => true
+ *
+ * Array.from(wrapped);
+ * // => [1, 2]
+ */
+function wrapperToIterator() {
+ return this;
+}
+
+module.exports = wrapperToIterator;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toJSON.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toJSON.js
new file mode 100644
index 0000000..5e751a2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toJSON.js
@@ -0,0 +1 @@
+module.exports = require('./wrapperValue');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toLength.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toLength.js
new file mode 100644
index 0000000..be8f2a7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toLength.js
@@ -0,0 +1,38 @@
+var baseClamp = require('./_baseClamp'),
+ toInteger = require('./toInteger');
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295;
+
+/**
+ * Converts `value` to an integer suitable for use as the length of an
+ * array-like object.
+ *
+ * **Note:** This method is based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toLength(3.2);
+ * // => 3
+ *
+ * _.toLength(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toLength(Infinity);
+ * // => 4294967295
+ *
+ * _.toLength('3.2');
+ * // => 3
+ */
+function toLength(value) {
+ return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
+}
+
+module.exports = toLength;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toLower.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toLower.js
new file mode 100644
index 0000000..b4b7858
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toLower.js
@@ -0,0 +1,28 @@
+var toString = require('./toString');
+
+/**
+ * Converts `string`, as a whole, to lower case just like
+ * [String#toLowerCase](https://mdn.io/toLowerCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the lower cased string.
+ * @example
+ *
+ * _.toLower('--Foo-Bar--');
+ * // => '--foo-bar--'
+ *
+ * _.toLower('fooBar');
+ * // => 'foobar'
+ *
+ * _.toLower('__FOO_BAR__');
+ * // => '__foo_bar__'
+ */
+function toLower(value) {
+ return toString(value).toLowerCase();
+}
+
+module.exports = toLower;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toNumber.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toNumber.js
new file mode 100644
index 0000000..b0f72de
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toNumber.js
@@ -0,0 +1,66 @@
+var isObject = require('./isObject'),
+ isSymbol = require('./isSymbol');
+
+/** Used as references for various `Number` constants. */
+var NAN = 0 / 0;
+
+/** Used to match leading and trailing whitespace. */
+var reTrim = /^\s+|\s+$/g;
+
+/** Used to detect bad signed hexadecimal string values. */
+var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+/** Used to detect binary string values. */
+var reIsBinary = /^0b[01]+$/i;
+
+/** Used to detect octal string values. */
+var reIsOctal = /^0o[0-7]+$/i;
+
+/** Built-in method references without a dependency on `root`. */
+var freeParseInt = parseInt;
+
+/**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3.2);
+ * // => 3.2
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3.2');
+ * // => 3.2
+ */
+function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ if (isObject(value)) {
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
+ }
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
+ }
+ value = value.replace(reTrim, '');
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
+}
+
+module.exports = toNumber;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toPairs.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toPairs.js
new file mode 100644
index 0000000..c4f52ae
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toPairs.js
@@ -0,0 +1,30 @@
+var createToPairs = require('./_createToPairs'),
+ keys = require('./keys');
+
+/**
+ * Creates an array of own enumerable string keyed-value pairs for `object`
+ * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
+ * entries are returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias entries
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the key-value pairs.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.toPairs(new Foo);
+ * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
+ */
+var toPairs = createToPairs(keys);
+
+module.exports = toPairs;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toPairsIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toPairsIn.js
new file mode 100644
index 0000000..32c562c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toPairsIn.js
@@ -0,0 +1,30 @@
+var createToPairs = require('./_createToPairs'),
+ keysIn = require('./keysIn');
+
+/**
+ * Creates an array of own and inherited enumerable string keyed-value pairs
+ * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
+ * or set, its entries are returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias entriesIn
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the key-value pairs.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.toPairsIn(new Foo);
+ * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
+ */
+var toPairsIn = createToPairs(keysIn);
+
+module.exports = toPairsIn;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toPath.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toPath.js
new file mode 100644
index 0000000..d3e96ee
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toPath.js
@@ -0,0 +1,33 @@
+var arrayMap = require('./_arrayMap'),
+ copyArray = require('./_copyArray'),
+ isArray = require('./isArray'),
+ isSymbol = require('./isSymbol'),
+ stringToPath = require('./_stringToPath'),
+ toKey = require('./_toKey'),
+ toString = require('./toString');
+
+/**
+ * Converts `value` to a property path array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the new property path array.
+ * @example
+ *
+ * _.toPath('a.b.c');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toPath('a[0].b.c');
+ * // => ['a', '0', 'b', 'c']
+ */
+function toPath(value) {
+ if (isArray(value)) {
+ return arrayMap(value, toKey);
+ }
+ return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
+}
+
+module.exports = toPath;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toPlainObject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toPlainObject.js
new file mode 100644
index 0000000..5de79b8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toPlainObject.js
@@ -0,0 +1,32 @@
+var copyObject = require('./_copyObject'),
+ keysIn = require('./keysIn');
+
+/**
+ * Converts `value` to a plain object flattening inherited enumerable string
+ * keyed properties of `value` to own properties of the plain object.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Object} Returns the converted plain object.
+ * @example
+ *
+ * function Foo() {
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.assign({ 'a': 1 }, new Foo);
+ * // => { 'a': 1, 'b': 2 }
+ *
+ * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
+ * // => { 'a': 1, 'b': 2, 'c': 3 }
+ */
+function toPlainObject(value) {
+ return copyObject(value, keysIn(value));
+}
+
+module.exports = toPlainObject;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toSafeInteger.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toSafeInteger.js
new file mode 100644
index 0000000..885c5fb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toSafeInteger.js
@@ -0,0 +1,35 @@
+var baseClamp = require('./_baseClamp'),
+ toInteger = require('./toInteger');
+
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * Converts `value` to a safe integer. A safe integer can be compared and
+ * represented correctly.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toSafeInteger(3.2);
+ * // => 3
+ *
+ * _.toSafeInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toSafeInteger(Infinity);
+ * // => 9007199254740991
+ *
+ * _.toSafeInteger('3.2');
+ * // => 3
+ */
+function toSafeInteger(value) {
+ return baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);
+}
+
+module.exports = toSafeInteger;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toString.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toString.js
new file mode 100644
index 0000000..daaf681
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toString.js
@@ -0,0 +1,28 @@
+var baseToString = require('./_baseToString');
+
+/**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+function toString(value) {
+ return value == null ? '' : baseToString(value);
+}
+
+module.exports = toString;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toUpper.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toUpper.js
new file mode 100644
index 0000000..b3648e8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/toUpper.js
@@ -0,0 +1,28 @@
+var toString = require('./toString');
+
+/**
+ * Converts `string`, as a whole, to upper case just like
+ * [String#toUpperCase](https://mdn.io/toUpperCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the upper cased string.
+ * @example
+ *
+ * _.toUpper('--foo-bar--');
+ * // => '--FOO-BAR--'
+ *
+ * _.toUpper('fooBar');
+ * // => 'FOOBAR'
+ *
+ * _.toUpper('__foo_bar__');
+ * // => '__FOO_BAR__'
+ */
+function toUpper(value) {
+ return toString(value).toUpperCase();
+}
+
+module.exports = toUpper;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/transform.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/transform.js
new file mode 100644
index 0000000..d755a15
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/transform.js
@@ -0,0 +1,65 @@
+var arrayEach = require('./_arrayEach'),
+ baseCreate = require('./_baseCreate'),
+ baseForOwn = require('./_baseForOwn'),
+ baseIteratee = require('./_baseIteratee'),
+ getPrototype = require('./_getPrototype'),
+ isArray = require('./isArray'),
+ isBuffer = require('./isBuffer'),
+ isFunction = require('./isFunction'),
+ isObject = require('./isObject'),
+ isTypedArray = require('./isTypedArray');
+
+/**
+ * An alternative to `_.reduce`; this method transforms `object` to a new
+ * `accumulator` object which is the result of running each of its own
+ * enumerable string keyed properties thru `iteratee`, with each invocation
+ * potentially mutating the `accumulator` object. If `accumulator` is not
+ * provided, a new object with the same `[[Prototype]]` will be used. The
+ * iteratee is invoked with four arguments: (accumulator, value, key, object).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The custom accumulator value.
+ * @returns {*} Returns the accumulated value.
+ * @example
+ *
+ * _.transform([2, 3, 4], function(result, n) {
+ * result.push(n *= n);
+ * return n % 2 == 0;
+ * }, []);
+ * // => [4, 9]
+ *
+ * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] }
+ */
+function transform(object, iteratee, accumulator) {
+ var isArr = isArray(object),
+ isArrLike = isArr || isBuffer(object) || isTypedArray(object);
+
+ iteratee = baseIteratee(iteratee, 4);
+ if (accumulator == null) {
+ var Ctor = object && object.constructor;
+ if (isArrLike) {
+ accumulator = isArr ? new Ctor : [];
+ }
+ else if (isObject(object)) {
+ accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
+ }
+ else {
+ accumulator = {};
+ }
+ }
+ (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
+ return iteratee(accumulator, value, index, object);
+ });
+ return accumulator;
+}
+
+module.exports = transform;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/trim.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/trim.js
new file mode 100644
index 0000000..5e38c8e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/trim.js
@@ -0,0 +1,49 @@
+var baseToString = require('./_baseToString'),
+ castSlice = require('./_castSlice'),
+ charsEndIndex = require('./_charsEndIndex'),
+ charsStartIndex = require('./_charsStartIndex'),
+ stringToArray = require('./_stringToArray'),
+ toString = require('./toString');
+
+/** Used to match leading and trailing whitespace. */
+var reTrim = /^\s+|\s+$/g;
+
+/**
+ * Removes leading and trailing whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trim(' abc ');
+ * // => 'abc'
+ *
+ * _.trim('-_-abc-_-', '_-');
+ * // => 'abc'
+ *
+ * _.map([' foo ', ' bar '], _.trim);
+ * // => ['foo', 'bar']
+ */
+function trim(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrim, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ chrSymbols = stringToArray(chars),
+ start = charsStartIndex(strSymbols, chrSymbols),
+ end = charsEndIndex(strSymbols, chrSymbols) + 1;
+
+ return castSlice(strSymbols, start, end).join('');
+}
+
+module.exports = trim;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/trimEnd.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/trimEnd.js
new file mode 100644
index 0000000..82c54a9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/trimEnd.js
@@ -0,0 +1,43 @@
+var baseToString = require('./_baseToString'),
+ castSlice = require('./_castSlice'),
+ charsEndIndex = require('./_charsEndIndex'),
+ stringToArray = require('./_stringToArray'),
+ toString = require('./toString');
+
+/** Used to match leading and trailing whitespace. */
+var reTrimEnd = /\s+$/;
+
+/**
+ * Removes trailing whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trimEnd(' abc ');
+ * // => ' abc'
+ *
+ * _.trimEnd('-_-abc-_-', '_-');
+ * // => '-_-abc'
+ */
+function trimEnd(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrimEnd, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
+
+ return castSlice(strSymbols, 0, end).join('');
+}
+
+module.exports = trimEnd;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/trimStart.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/trimStart.js
new file mode 100644
index 0000000..30f4f47
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/trimStart.js
@@ -0,0 +1,43 @@
+var baseToString = require('./_baseToString'),
+ castSlice = require('./_castSlice'),
+ charsStartIndex = require('./_charsStartIndex'),
+ stringToArray = require('./_stringToArray'),
+ toString = require('./toString');
+
+/** Used to match leading and trailing whitespace. */
+var reTrimStart = /^\s+/;
+
+/**
+ * Removes leading whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trimStart(' abc ');
+ * // => 'abc '
+ *
+ * _.trimStart('-_-abc-_-', '_-');
+ * // => 'abc-_-'
+ */
+function trimStart(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrimStart, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ start = charsStartIndex(strSymbols, stringToArray(chars));
+
+ return castSlice(strSymbols, start).join('');
+}
+
+module.exports = trimStart;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/truncate.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/truncate.js
new file mode 100644
index 0000000..21fcdfe
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/truncate.js
@@ -0,0 +1,111 @@
+var baseToString = require('./_baseToString'),
+ castSlice = require('./_castSlice'),
+ hasUnicode = require('./_hasUnicode'),
+ isObject = require('./isObject'),
+ isRegExp = require('./isRegExp'),
+ stringSize = require('./_stringSize'),
+ stringToArray = require('./_stringToArray'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/** Used as default options for `_.truncate`. */
+var DEFAULT_TRUNC_LENGTH = 30,
+ DEFAULT_TRUNC_OMISSION = '...';
+
+/** Used to match `RegExp` flags from their coerced string values. */
+var reFlags = /\w*$/;
+
+/**
+ * Truncates `string` if it's longer than the given maximum string length.
+ * The last characters of the truncated string are replaced with the omission
+ * string which defaults to "...".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to truncate.
+ * @param {Object} [options={}] The options object.
+ * @param {number} [options.length=30] The maximum string length.
+ * @param {string} [options.omission='...'] The string to indicate text is omitted.
+ * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
+ * @returns {string} Returns the truncated string.
+ * @example
+ *
+ * _.truncate('hi-diddly-ho there, neighborino');
+ * // => 'hi-diddly-ho there, neighbo...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'length': 24,
+ * 'separator': ' '
+ * });
+ * // => 'hi-diddly-ho there,...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'length': 24,
+ * 'separator': /,? +/
+ * });
+ * // => 'hi-diddly-ho there...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'omission': ' [...]'
+ * });
+ * // => 'hi-diddly-ho there, neig [...]'
+ */
+function truncate(string, options) {
+ var length = DEFAULT_TRUNC_LENGTH,
+ omission = DEFAULT_TRUNC_OMISSION;
+
+ if (isObject(options)) {
+ var separator = 'separator' in options ? options.separator : separator;
+ length = 'length' in options ? toInteger(options.length) : length;
+ omission = 'omission' in options ? baseToString(options.omission) : omission;
+ }
+ string = toString(string);
+
+ var strLength = string.length;
+ if (hasUnicode(string)) {
+ var strSymbols = stringToArray(string);
+ strLength = strSymbols.length;
+ }
+ if (length >= strLength) {
+ return string;
+ }
+ var end = length - stringSize(omission);
+ if (end < 1) {
+ return omission;
+ }
+ var result = strSymbols
+ ? castSlice(strSymbols, 0, end).join('')
+ : string.slice(0, end);
+
+ if (separator === undefined) {
+ return result + omission;
+ }
+ if (strSymbols) {
+ end += (result.length - end);
+ }
+ if (isRegExp(separator)) {
+ if (string.slice(end).search(separator)) {
+ var match,
+ substring = result;
+
+ if (!separator.global) {
+ separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
+ }
+ separator.lastIndex = 0;
+ while ((match = separator.exec(substring))) {
+ var newEnd = match.index;
+ }
+ result = result.slice(0, newEnd === undefined ? end : newEnd);
+ }
+ } else if (string.indexOf(baseToString(separator), end) != end) {
+ var index = result.lastIndexOf(separator);
+ if (index > -1) {
+ result = result.slice(0, index);
+ }
+ }
+ return result + omission;
+}
+
+module.exports = truncate;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unary.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unary.js
new file mode 100644
index 0000000..76f48f6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unary.js
@@ -0,0 +1,22 @@
+var ary = require('./ary');
+
+/**
+ * Creates a function that accepts up to one argument, ignoring any
+ * additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.unary(parseInt));
+ * // => [6, 8, 10]
+ */
+function unary(func) {
+ return ary(func, 1);
+}
+
+module.exports = unary;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unescape.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unescape.js
new file mode 100644
index 0000000..3b6efd5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unescape.js
@@ -0,0 +1,34 @@
+var toString = require('./toString'),
+ unescapeHtmlChar = require('./_unescapeHtmlChar');
+
+/** Used to match HTML entities and HTML characters. */
+var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
+ reHasEscapedHtml = RegExp(reEscapedHtml.source);
+
+/**
+ * The inverse of `_.escape`; this method converts the HTML entities
+ * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
+ * their corresponding characters.
+ *
+ * **Note:** No other HTML entities are unescaped. To unescape additional
+ * HTML entities use a third-party library like [_he_](https://mths.be/he).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.6.0
+ * @category String
+ * @param {string} [string=''] The string to unescape.
+ * @returns {string} Returns the unescaped string.
+ * @example
+ *
+ * _.unescape('fred, barney, &amp; pebbles');
+ * // => 'fred, barney, & pebbles'
+ */
+function unescape(string) {
+ string = toString(string);
+ return (string && reHasEscapedHtml.test(string))
+ ? string.replace(reEscapedHtml, unescapeHtmlChar)
+ : string;
+}
+
+module.exports = unescape;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/union.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/union.js
new file mode 100644
index 0000000..e676dfe
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/union.js
@@ -0,0 +1,26 @@
+var baseFlatten = require('./_baseFlatten'),
+ baseRest = require('./_baseRest'),
+ baseUniq = require('./_baseUniq'),
+ isArrayLikeObject = require('./isArrayLikeObject');
+
+/**
+ * Creates an array of unique values, in order, from all given arrays using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.union([2], [1, 2]);
+ * // => [2, 1]
+ */
+var union = baseRest(function(arrays) {
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
+});
+
+module.exports = union;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unionBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unionBy.js
new file mode 100644
index 0000000..6ae8ccd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unionBy.js
@@ -0,0 +1,39 @@
+var baseFlatten = require('./_baseFlatten'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest'),
+ baseUniq = require('./_baseUniq'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.union` except that it accepts `iteratee` which is
+ * invoked for each element of each `arrays` to generate the criterion by
+ * which uniqueness is computed. Result values are chosen from the first
+ * array in which the value occurs. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.unionBy([2.1], [1.2, 2.3], Math.floor);
+ * // => [2.1, 1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+var unionBy = baseRest(function(arrays) {
+ var iteratee = last(arrays);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2));
+});
+
+module.exports = unionBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unionWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unionWith.js
new file mode 100644
index 0000000..78736b2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unionWith.js
@@ -0,0 +1,34 @@
+var baseFlatten = require('./_baseFlatten'),
+ baseRest = require('./_baseRest'),
+ baseUniq = require('./_baseUniq'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.union` except that it accepts `comparator` which
+ * is invoked to compare elements of `arrays`. Result values are chosen from
+ * the first array in which the value occurs. The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.unionWith(objects, others, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+ */
+var unionWith = baseRest(function(arrays) {
+ var comparator = last(arrays);
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
+});
+
+module.exports = unionWith;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/uniq.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/uniq.js
new file mode 100644
index 0000000..157d1cd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/uniq.js
@@ -0,0 +1,25 @@
+var baseUniq = require('./_baseUniq');
+
+/**
+ * Creates a duplicate-free version of an array, using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons, in which only the first occurrence of each element
+ * is kept. The order of result values is determined by the order they occur
+ * in the array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniq([2, 1, 2]);
+ * // => [2, 1]
+ */
+function uniq(array) {
+ return (array && array.length) ? baseUniq(array) : [];
+}
+
+module.exports = uniq;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/uniqBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/uniqBy.js
new file mode 100644
index 0000000..53402a9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/uniqBy.js
@@ -0,0 +1,31 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseUniq = require('./_baseUniq');
+
+/**
+ * This method is like `_.uniq` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * uniqueness is computed. The order of result values is determined by the
+ * order they occur in the array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
+ * // => [2.1, 1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+function uniqBy(array, iteratee) {
+ return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];
+}
+
+module.exports = uniqBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/uniqWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/uniqWith.js
new file mode 100644
index 0000000..18d72aa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/uniqWith.js
@@ -0,0 +1,28 @@
+var baseUniq = require('./_baseUniq');
+
+/**
+ * This method is like `_.uniq` except that it accepts `comparator` which
+ * is invoked to compare elements of `array`. The order of result values is
+ * determined by the order they occur in the array.The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.uniqWith(objects, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
+ */
+function uniqWith(array, comparator) {
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
+}
+
+module.exports = uniqWith;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/uniqueId.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/uniqueId.js
new file mode 100644
index 0000000..ffa8c03
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/uniqueId.js
@@ -0,0 +1,28 @@
+var toString = require('./toString');
+
+/** Used to generate unique IDs. */
+var idCounter = 0;
+
+/**
+ * Generates a unique ID. If `prefix` is given, the ID is appended to it.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {string} [prefix=''] The value to prefix the ID with.
+ * @returns {string} Returns the unique ID.
+ * @example
+ *
+ * _.uniqueId('contact_');
+ * // => 'contact_104'
+ *
+ * _.uniqueId();
+ * // => '105'
+ */
+function uniqueId(prefix) {
+ var id = ++idCounter;
+ return toString(prefix) + id;
+}
+
+module.exports = uniqueId;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unset.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unset.js
new file mode 100644
index 0000000..723c3d4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unset.js
@@ -0,0 +1,34 @@
+var baseUnset = require('./_baseUnset');
+
+/**
+ * Removes the property at `path` of `object`.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to unset.
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 7 } }] };
+ * _.unset(object, 'a[0].b.c');
+ * // => true
+ *
+ * console.log(object);
+ * // => { 'a': [{ 'b': {} }] };
+ *
+ * _.unset(object, ['a', '0', 'b', 'c']);
+ * // => true
+ *
+ * console.log(object);
+ * // => { 'a': [{ 'b': {} }] };
+ */
+function unset(object, path) {
+ return object == null ? true : baseUnset(object, path);
+}
+
+module.exports = unset;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unzip.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unzip.js
new file mode 100644
index 0000000..fce0ec7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unzip.js
@@ -0,0 +1,45 @@
+var arrayFilter = require('./_arrayFilter'),
+ arrayMap = require('./_arrayMap'),
+ baseProperty = require('./_baseProperty'),
+ baseTimes = require('./_baseTimes'),
+ isArrayLikeObject = require('./isArrayLikeObject');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * This method is like `_.zip` except that it accepts an array of grouped
+ * elements and creates an array regrouping the elements to their pre-zip
+ * configuration.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.2.0
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
+ * // => [['a', 1, true], ['b', 2, false]]
+ *
+ * _.unzip(zipped);
+ * // => [['a', 'b'], [1, 2], [true, false]]
+ */
+function unzip(array) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var length = 0;
+ array = arrayFilter(array, function(group) {
+ if (isArrayLikeObject(group)) {
+ length = nativeMax(group.length, length);
+ return true;
+ }
+ });
+ return baseTimes(length, function(index) {
+ return arrayMap(array, baseProperty(index));
+ });
+}
+
+module.exports = unzip;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unzipWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unzipWith.js
new file mode 100644
index 0000000..926c899
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/unzipWith.js
@@ -0,0 +1,39 @@
+var apply = require('./_apply'),
+ arrayMap = require('./_arrayMap'),
+ unzip = require('./unzip');
+
+/**
+ * This method is like `_.unzip` except that it accepts `iteratee` to specify
+ * how regrouped values should be combined. The iteratee is invoked with the
+ * elements of each group: (...group).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @param {Function} [iteratee=_.identity] The function to combine
+ * regrouped values.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
+ * // => [[1, 10, 100], [2, 20, 200]]
+ *
+ * _.unzipWith(zipped, _.add);
+ * // => [3, 30, 300]
+ */
+function unzipWith(array, iteratee) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var result = unzip(array);
+ if (iteratee == null) {
+ return result;
+ }
+ return arrayMap(result, function(group) {
+ return apply(iteratee, undefined, group);
+ });
+}
+
+module.exports = unzipWith;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/update.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/update.js
new file mode 100644
index 0000000..b90098e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/update.js
@@ -0,0 +1,35 @@
+var baseUpdate = require('./_baseUpdate'),
+ castFunction = require('./_castFunction');
+
+/**
+ * This method is like `_.set` except that accepts `updater` to produce the
+ * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
+ * is invoked with one argument: (value).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {Function} updater The function to produce the updated value.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.update(object, 'a[0].b.c', function(n) { return n * n; });
+ * console.log(object.a[0].b.c);
+ * // => 9
+ *
+ * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
+ * console.log(object.x[0].y.z);
+ * // => 0
+ */
+function update(object, path, updater) {
+ return object == null ? object : baseUpdate(object, path, castFunction(updater));
+}
+
+module.exports = update;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/updateWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/updateWith.js
new file mode 100644
index 0000000..a2f4a2c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/updateWith.js
@@ -0,0 +1,33 @@
+var baseUpdate = require('./_baseUpdate'),
+ castFunction = require('./_castFunction');
+
+/**
+ * This method is like `_.update` except that it accepts `customizer` which is
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
+ * path creation is handled by the method instead. The `customizer` is invoked
+ * with three arguments: (nsValue, key, nsObject).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {Function} updater The function to produce the updated value.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {};
+ *
+ * _.updateWith(object, '[0][1]', _.constant('a'), Object);
+ * // => { '0': { '1': 'a' } }
+ */
+function updateWith(object, path, updater, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
+}
+
+module.exports = updateWith;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/upperCase.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/upperCase.js
new file mode 100644
index 0000000..efbb8b0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/upperCase.js
@@ -0,0 +1,27 @@
+var createCompounder = require('./_createCompounder');
+
+/**
+ * Converts `string`, as space separated words, to upper case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the upper cased string.
+ * @example
+ *
+ * _.upperCase('--foo-bar');
+ * // => 'FOO BAR'
+ *
+ * _.upperCase('fooBar');
+ * // => 'FOO BAR'
+ *
+ * _.upperCase('__foo_bar__');
+ * // => 'FOO BAR'
+ */
+var upperCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + word.toUpperCase();
+});
+
+module.exports = upperCase;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/upperFirst.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/upperFirst.js
new file mode 100644
index 0000000..1dd64e1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/upperFirst.js
@@ -0,0 +1,22 @@
+var createCaseFirst = require('./_createCaseFirst');
+
+/**
+ * Converts the first character of `string` to upper case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.upperFirst('fred');
+ * // => 'Fred'
+ *
+ * _.upperFirst('FRED');
+ * // => 'FRED'
+ */
+var upperFirst = createCaseFirst('toUpperCase');
+
+module.exports = upperFirst;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/util.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/util.js
new file mode 100644
index 0000000..d244dc2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/util.js
@@ -0,0 +1,34 @@
+module.exports = {
+ 'attempt': require('./attempt'),
+ 'bindAll': require('./bindAll'),
+ 'cond': require('./cond'),
+ 'conforms': require('./conforms'),
+ 'constant': require('./constant'),
+ 'defaultTo': require('./defaultTo'),
+ 'flow': require('./flow'),
+ 'flowRight': require('./flowRight'),
+ 'identity': require('./identity'),
+ 'iteratee': require('./iteratee'),
+ 'matches': require('./matches'),
+ 'matchesProperty': require('./matchesProperty'),
+ 'method': require('./method'),
+ 'methodOf': require('./methodOf'),
+ 'mixin': require('./mixin'),
+ 'noop': require('./noop'),
+ 'nthArg': require('./nthArg'),
+ 'over': require('./over'),
+ 'overEvery': require('./overEvery'),
+ 'overSome': require('./overSome'),
+ 'property': require('./property'),
+ 'propertyOf': require('./propertyOf'),
+ 'range': require('./range'),
+ 'rangeRight': require('./rangeRight'),
+ 'stubArray': require('./stubArray'),
+ 'stubFalse': require('./stubFalse'),
+ 'stubObject': require('./stubObject'),
+ 'stubString': require('./stubString'),
+ 'stubTrue': require('./stubTrue'),
+ 'times': require('./times'),
+ 'toPath': require('./toPath'),
+ 'uniqueId': require('./uniqueId')
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/value.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/value.js
new file mode 100644
index 0000000..5e751a2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/value.js
@@ -0,0 +1 @@
+module.exports = require('./wrapperValue');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/valueOf.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/valueOf.js
new file mode 100644
index 0000000..5e751a2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/valueOf.js
@@ -0,0 +1 @@
+module.exports = require('./wrapperValue');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/values.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/values.js
new file mode 100644
index 0000000..b069654
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/values.js
@@ -0,0 +1,34 @@
+var baseValues = require('./_baseValues'),
+ keys = require('./keys');
+
+/**
+ * Creates an array of the own enumerable string keyed property values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.values(new Foo);
+ * // => [1, 2] (iteration order is not guaranteed)
+ *
+ * _.values('hi');
+ * // => ['h', 'i']
+ */
+function values(object) {
+ return object == null ? [] : baseValues(object, keys(object));
+}
+
+module.exports = values;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/valuesIn.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/valuesIn.js
new file mode 100644
index 0000000..6296094
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/valuesIn.js
@@ -0,0 +1,32 @@
+var baseValues = require('./_baseValues'),
+ keysIn = require('./keysIn');
+
+/**
+ * Creates an array of the own and inherited enumerable string keyed property
+ * values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.valuesIn(new Foo);
+ * // => [1, 2, 3] (iteration order is not guaranteed)
+ */
+function valuesIn(object) {
+ return object == null ? [] : baseValues(object, keysIn(object));
+}
+
+module.exports = valuesIn;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/without.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/without.js
new file mode 100644
index 0000000..3a28e8a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/without.js
@@ -0,0 +1,31 @@
+var baseDifference = require('./_baseDifference'),
+ baseRest = require('./_baseRest'),
+ isArrayLikeObject = require('./isArrayLikeObject');
+
+/**
+ * Creates an array excluding all given values using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * **Note:** Unlike `_.pull`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...*} [values] The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.difference, _.xor
+ * @example
+ *
+ * _.without([2, 1, 2, 3], 1, 2);
+ * // => [3]
+ */
+var without = baseRest(function(array, values) {
+ return isArrayLikeObject(array)
+ ? baseDifference(array, values)
+ : [];
+});
+
+module.exports = without;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/words.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/words.js
new file mode 100644
index 0000000..6d7cdd1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/words.js
@@ -0,0 +1,35 @@
+var asciiWords = require('./_asciiWords'),
+ hasUnicodeWord = require('./_hasUnicodeWord'),
+ toString = require('./toString'),
+ unicodeWords = require('./_unicodeWords');
+
+/**
+ * Splits `string` into an array of its words.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {RegExp|string} [pattern] The pattern to match words.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the words of `string`.
+ * @example
+ *
+ * _.words('fred, barney, & pebbles');
+ * // => ['fred', 'barney', 'pebbles']
+ *
+ * _.words('fred, barney, & pebbles', /[^, ]+/g);
+ * // => ['fred', 'barney', '&', 'pebbles']
+ */
+function words(string, pattern, guard) {
+ string = toString(string);
+ pattern = guard ? undefined : pattern;
+
+ if (pattern === undefined) {
+ return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
+ }
+ return string.match(pattern) || [];
+}
+
+module.exports = words;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrap.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrap.js
new file mode 100644
index 0000000..cad3c50
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrap.js
@@ -0,0 +1,30 @@
+var castFunction = require('./_castFunction'),
+ partial = require('./partial');
+
+/**
+ * Creates a function that provides `value` to `wrapper` as its first
+ * argument. Any additional arguments provided to the function are appended
+ * to those provided to the `wrapper`. The wrapper is invoked with the `this`
+ * binding of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {*} value The value to wrap.
+ * @param {Function} [wrapper=identity] The wrapper function.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var p = _.wrap(_.escape, function(func, text) {
+ * return '<p>' + func(text) + '</p>';
+ * });
+ *
+ * p('fred, barney, & pebbles');
+ * // => '<p>fred, barney, &amp; pebbles</p>'
+ */
+function wrap(value, wrapper) {
+ return partial(castFunction(wrapper), value);
+}
+
+module.exports = wrap;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrapperAt.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrapperAt.js
new file mode 100644
index 0000000..6f6a1d0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrapperAt.js
@@ -0,0 +1,48 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ LodashWrapper = require('./_LodashWrapper'),
+ baseAt = require('./_baseAt'),
+ flatRest = require('./_flatRest'),
+ isIndex = require('./_isIndex'),
+ thru = require('./thru');
+
+/**
+ * This method is the wrapper version of `_.at`.
+ *
+ * @name at
+ * @memberOf _
+ * @since 1.0.0
+ * @category Seq
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+ *
+ * _(object).at(['a[0].b.c', 'a[1]']).value();
+ * // => [3, 4]
+ */
+var wrapperAt = flatRest(function(paths) {
+ var length = paths.length,
+ start = length ? paths[0] : 0,
+ value = this.__wrapped__,
+ interceptor = function(object) { return baseAt(object, paths); };
+
+ if (length > 1 || this.__actions__.length ||
+ !(value instanceof LazyWrapper) || !isIndex(start)) {
+ return this.thru(interceptor);
+ }
+ value = value.slice(start, +start + (length ? 1 : 0));
+ value.__actions__.push({
+ 'func': thru,
+ 'args': [interceptor],
+ 'thisArg': undefined
+ });
+ return new LodashWrapper(value, this.__chain__).thru(function(array) {
+ if (length && !array.length) {
+ array.push(undefined);
+ }
+ return array;
+ });
+});
+
+module.exports = wrapperAt;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrapperChain.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrapperChain.js
new file mode 100644
index 0000000..bda2ce6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrapperChain.js
@@ -0,0 +1,34 @@
+var chain = require('./chain');
+
+/**
+ * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
+ *
+ * @name chain
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * // A sequence without explicit chaining.
+ * _(users).head();
+ * // => { 'user': 'barney', 'age': 36 }
+ *
+ * // A sequence with explicit chaining.
+ * _(users)
+ * .chain()
+ * .head()
+ * .pick('user')
+ * .value();
+ * // => { 'user': 'barney' }
+ */
+function wrapperChain() {
+ return chain(this);
+}
+
+module.exports = wrapperChain;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrapperLodash.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrapperLodash.js
new file mode 100644
index 0000000..bf27a3c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrapperLodash.js
@@ -0,0 +1,147 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ LodashWrapper = require('./_LodashWrapper'),
+ baseLodash = require('./_baseLodash'),
+ isArray = require('./isArray'),
+ isObjectLike = require('./isObjectLike'),
+ wrapperClone = require('./_wrapperClone');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Creates a `lodash` object which wraps `value` to enable implicit method
+ * chain sequences. Methods that operate on and return arrays, collections,
+ * and functions can be chained together. Methods that retrieve a single value
+ * or may return a primitive value will automatically end the chain sequence
+ * and return the unwrapped value. Otherwise, the value must be unwrapped
+ * with `_#value`.
+ *
+ * Explicit chain sequences, which must be unwrapped with `_#value`, may be
+ * enabled using `_.chain`.
+ *
+ * The execution of chained methods is lazy, that is, it's deferred until
+ * `_#value` is implicitly or explicitly called.
+ *
+ * Lazy evaluation allows several methods to support shortcut fusion.
+ * Shortcut fusion is an optimization to merge iteratee calls; this avoids
+ * the creation of intermediate arrays and can greatly reduce the number of
+ * iteratee executions. Sections of a chain sequence qualify for shortcut
+ * fusion if the section is applied to an array of at least `200` elements
+ * and any iteratees accept only one argument. The heuristic for whether a
+ * section qualifies for shortcut fusion is subject to change.
+ *
+ * Chaining is supported in custom builds as long as the `_#value` method is
+ * directly or indirectly included in the build.
+ *
+ * In addition to lodash methods, wrappers have `Array` and `String` methods.
+ *
+ * The wrapper `Array` methods are:
+ * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
+ *
+ * The wrapper `String` methods are:
+ * `replace` and `split`
+ *
+ * The wrapper methods that support shortcut fusion are:
+ * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
+ * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
+ * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
+ *
+ * The chainable wrapper methods are:
+ * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
+ * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
+ * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
+ * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
+ * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
+ * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
+ * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
+ * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
+ * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
+ * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
+ * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
+ * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
+ * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
+ * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
+ * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
+ * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
+ * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
+ * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
+ * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
+ * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
+ * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
+ * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
+ * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
+ * `zipObject`, `zipObjectDeep`, and `zipWith`
+ *
+ * The wrapper methods that are **not** chainable by default are:
+ * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
+ * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
+ * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
+ * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
+ * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
+ * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
+ * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
+ * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
+ * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
+ * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
+ * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
+ * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
+ * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
+ * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
+ * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
+ * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
+ * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
+ * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
+ * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
+ * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
+ * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
+ * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
+ * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
+ * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
+ * `upperFirst`, `value`, and `words`
+ *
+ * @name _
+ * @constructor
+ * @category Seq
+ * @param {*} value The value to wrap in a `lodash` instance.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2, 3]);
+ *
+ * // Returns an unwrapped value.
+ * wrapped.reduce(_.add);
+ * // => 6
+ *
+ * // Returns a wrapped value.
+ * var squares = wrapped.map(square);
+ *
+ * _.isArray(squares);
+ * // => false
+ *
+ * _.isArray(squares.value());
+ * // => true
+ */
+function lodash(value) {
+ if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
+ if (value instanceof LodashWrapper) {
+ return value;
+ }
+ if (hasOwnProperty.call(value, '__wrapped__')) {
+ return wrapperClone(value);
+ }
+ }
+ return new LodashWrapper(value);
+}
+
+// Ensure wrappers are instances of `baseLodash`.
+lodash.prototype = baseLodash.prototype;
+lodash.prototype.constructor = lodash;
+
+module.exports = lodash;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrapperReverse.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrapperReverse.js
new file mode 100644
index 0000000..e93112a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrapperReverse.js
@@ -0,0 +1,44 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ LodashWrapper = require('./_LodashWrapper'),
+ reverse = require('./reverse'),
+ thru = require('./thru');
+
+/**
+ * This method is the wrapper version of `_.reverse`.
+ *
+ * **Note:** This method mutates the wrapped array.
+ *
+ * @name reverse
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _(array).reverse().value()
+ * // => [3, 2, 1]
+ *
+ * console.log(array);
+ * // => [3, 2, 1]
+ */
+function wrapperReverse() {
+ var value = this.__wrapped__;
+ if (value instanceof LazyWrapper) {
+ var wrapped = value;
+ if (this.__actions__.length) {
+ wrapped = new LazyWrapper(this);
+ }
+ wrapped = wrapped.reverse();
+ wrapped.__actions__.push({
+ 'func': thru,
+ 'args': [reverse],
+ 'thisArg': undefined
+ });
+ return new LodashWrapper(wrapped, this.__chain__);
+ }
+ return this.thru(reverse);
+}
+
+module.exports = wrapperReverse;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrapperValue.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrapperValue.js
new file mode 100644
index 0000000..f56c2da
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/wrapperValue.js
@@ -0,0 +1,21 @@
+var baseWrapperValue = require('./_baseWrapperValue');
+
+/**
+ * Executes the chain sequence to resolve the unwrapped value.
+ *
+ * @name value
+ * @memberOf _
+ * @since 0.1.0
+ * @alias toJSON, valueOf
+ * @category Seq
+ * @returns {*} Returns the resolved unwrapped value.
+ * @example
+ *
+ * _([1, 2, 3]).value();
+ * // => [1, 2, 3]
+ */
+function wrapperValue() {
+ return baseWrapperValue(this.__wrapped__, this.__actions__);
+}
+
+module.exports = wrapperValue;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/xor.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/xor.js
new file mode 100644
index 0000000..d4d2860
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/xor.js
@@ -0,0 +1,28 @@
+var arrayFilter = require('./_arrayFilter'),
+ baseRest = require('./_baseRest'),
+ baseXor = require('./_baseXor'),
+ isArrayLikeObject = require('./isArrayLikeObject');
+
+/**
+ * Creates an array of unique values that is the
+ * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
+ * of the given arrays. The order of result values is determined by the order
+ * they occur in the arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.difference, _.without
+ * @example
+ *
+ * _.xor([2, 1], [2, 3]);
+ * // => [1, 3]
+ */
+var xor = baseRest(function(arrays) {
+ return baseXor(arrayFilter(arrays, isArrayLikeObject));
+});
+
+module.exports = xor;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/xorBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/xorBy.js
new file mode 100644
index 0000000..e047895
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/xorBy.js
@@ -0,0 +1,39 @@
+var arrayFilter = require('./_arrayFilter'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest'),
+ baseXor = require('./_baseXor'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.xor` except that it accepts `iteratee` which is
+ * invoked for each element of each `arrays` to generate the criterion by
+ * which by which they're compared. The order of result values is determined
+ * by the order they occur in the arrays. The iteratee is invoked with one
+ * argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [1.2, 3.4]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 2 }]
+ */
+var xorBy = baseRest(function(arrays) {
+ var iteratee = last(arrays);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), baseIteratee(iteratee, 2));
+});
+
+module.exports = xorBy;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/xorWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/xorWith.js
new file mode 100644
index 0000000..e3a8ac6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/xorWith.js
@@ -0,0 +1,34 @@
+var arrayFilter = require('./_arrayFilter'),
+ baseRest = require('./_baseRest'),
+ baseXor = require('./_baseXor'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.xor` except that it accepts `comparator` which is
+ * invoked to compare elements of `arrays`. The order of result values is
+ * determined by the order they occur in the arrays. The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.xorWith(objects, others, _.isEqual);
+ * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+ */
+var xorWith = baseRest(function(arrays) {
+ var comparator = last(arrays);
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
+});
+
+module.exports = xorWith;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/zip.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/zip.js
new file mode 100644
index 0000000..c800ab3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/zip.js
@@ -0,0 +1,22 @@
+var baseRest = require('./_baseRest'),
+ unzip = require('./unzip');
+
+/**
+ * Creates an array of grouped elements, the first of which contains the
+ * first elements of the given arrays, the second of which contains the
+ * second elements of the given arrays, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zip(['a', 'b'], [1, 2], [true, false]);
+ * // => [['a', 1, true], ['b', 2, false]]
+ */
+var zip = baseRest(unzip);
+
+module.exports = zip;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/zipObject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/zipObject.js
new file mode 100644
index 0000000..23fdf14
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/zipObject.js
@@ -0,0 +1,24 @@
+var assignValue = require('./_assignValue'),
+ baseZipObject = require('./_baseZipObject');
+
+/**
+ * This method is like `_.fromPairs` except that it accepts two arrays,
+ * one of property identifiers and one of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.4.0
+ * @category Array
+ * @param {Array} [props=[]] The property identifiers.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObject(['a', 'b'], [1, 2]);
+ * // => { 'a': 1, 'b': 2 }
+ */
+function zipObject(props, values) {
+ return baseZipObject(props || [], values || [], assignValue);
+}
+
+module.exports = zipObject;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/zipObjectDeep.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/zipObjectDeep.js
new file mode 100644
index 0000000..7c858f8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/zipObjectDeep.js
@@ -0,0 +1,23 @@
+var baseSet = require('./_baseSet'),
+ baseZipObject = require('./_baseZipObject');
+
+/**
+ * This method is like `_.zipObject` except that it supports property paths.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.1.0
+ * @category Array
+ * @param {Array} [props=[]] The property identifiers.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
+ * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
+ */
+function zipObjectDeep(props, values) {
+ return baseZipObject(props || [], values || [], baseSet);
+}
+
+module.exports = zipObjectDeep;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/zipWith.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/zipWith.js
new file mode 100644
index 0000000..d7a1f91
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/node_modules/lodash/zipWith.js
@@ -0,0 +1,32 @@
+var baseRest = require('./_baseRest'),
+ unzipWith = require('./unzipWith');
+
+/**
+ * This method is like `_.zip` except that it accepts `iteratee` to specify
+ * how grouped values should be combined. The iteratee is invoked with the
+ * elements of each group: (...group).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @param {Function} [iteratee=_.identity] The function to combine
+ * grouped values.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
+ * return a + b + c;
+ * });
+ * // => [111, 222]
+ */
+var zipWith = baseRest(function(arrays) {
+ var length = arrays.length,
+ iteratee = length > 1 ? arrays[length - 1] : undefined;
+
+ iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
+ return unzipWith(arrays, iteratee);
+});
+
+module.exports = zipWith;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/package.json
new file mode 100644
index 0000000..a74c00f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/package.json
@@ -0,0 +1,121 @@
+{
+ "name": "async",
+ "description": "Higher-order functions and common patterns for asynchronous code",
+ "version": "2.1.2",
+ "main": "dist/async.js",
+ "author": {
+ "name": "Caolan McMahon"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/caolan/async.git"
+ },
+ "bugs": {
+ "url": "https://github.com/caolan/async/issues"
+ },
+ "keywords": [
+ "async",
+ "callback",
+ "module",
+ "utility"
+ ],
+ "dependencies": {
+ "lodash": "^4.14.0"
+ },
+ "devDependencies": {
+ "babel-cli": "^6.16.0",
+ "babel-core": "^6.3.26",
+ "babel-plugin-add-module-exports": "^0.2.1",
+ "babel-plugin-istanbul": "^2.0.1",
+ "babel-plugin-transform-es2015-modules-commonjs": "^6.3.16",
+ "babel-preset-es2015": "^6.3.13",
+ "babelify": "^7.2.0",
+ "benchmark": "^2.1.1",
+ "bluebird": "^3.4.6",
+ "chai": "^3.1.0",
+ "cheerio": "^0.22.0",
+ "coveralls": "^2.11.2",
+ "es6-promise": "^2.3.0",
+ "eslint": "^2.13.1",
+ "fs-extra": "^0.26.7",
+ "gh-pages-deploy": "^0.4.2",
+ "jsdoc": "^3.4.0",
+ "karma": "^1.3.0",
+ "karma-browserify": "^5.1.0",
+ "karma-firefox-launcher": "^1.0.0",
+ "karma-mocha": "^1.2.0",
+ "karma-mocha-reporter": "^2.2.0",
+ "mocha": "^3.1.2",
+ "native-promise-only": "^0.8.0-a",
+ "nyc": "^7.0.0",
+ "recursive-readdir": "^1.3.0",
+ "rimraf": "^2.5.0",
+ "rollup": "^0.36.3",
+ "rollup-plugin-node-resolve": "^2.0.0",
+ "rollup-plugin-npm": "^2.0.0",
+ "rsvp": "^3.0.18",
+ "semver": "^4.3.6",
+ "uglify-js": "~2.7.3",
+ "vinyl-buffer": "^1.0.0",
+ "vinyl-source-stream": "^1.1.0",
+ "watchify": "^3.7.0",
+ "yargs": "~3.9.1"
+ },
+ "scripts": {
+ "coverage": "nyc npm run mocha-node-test -- --grep @nycinvalid --invert",
+ "coveralls": "npm run coverage && nyc report --reporter=text-lcov | coveralls",
+ "jsdoc": "jsdoc -c ./support/jsdoc/jsdoc.json && node support/jsdoc/jsdoc-fix-html.js",
+ "lint": "eslint lib/ mocha_test/ perf/memory.js perf/suites.js perf/benchmark.js support/build/ support/*.js karma.conf.js",
+ "mocha-browser-test": "karma start",
+ "mocha-node-test": "mocha mocha_test/ --compilers js:babel-core/register",
+ "mocha-test": "npm run mocha-node-test && npm run mocha-browser-test",
+ "test": "npm run lint && npm run mocha-node-test"
+ },
+ "license": "MIT",
+ "gh-pages-deploy": {
+ "staticpath": "docs"
+ },
+ "nyc": {
+ "exclude": [
+ "mocha_test"
+ ]
+ },
+ "homepage": "https://github.com/caolan/async#readme",
+ "_id": "async@2.1.2",
+ "_shasum": "612a4ab45ef42a70cde806bad86ee6db047e8385",
+ "_from": "async@2.1.2",
+ "_npmVersion": "3.10.8",
+ "_nodeVersion": "6.8.0",
+ "_npmUser": {
+ "name": "megawac",
+ "email": "megawac@gmail.com"
+ },
+ "dist": {
+ "shasum": "612a4ab45ef42a70cde806bad86ee6db047e8385",
+ "tarball": "https://registry.npmjs.org/async/-/async-2.1.2.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "caolan",
+ "email": "caolan.mcmahon@gmail.com"
+ },
+ {
+ "name": "beaugunderson",
+ "email": "beau@beaugunderson.com"
+ },
+ {
+ "name": "aearly",
+ "email": "alexander.early@gmail.com"
+ },
+ {
+ "name": "megawac",
+ "email": "megawac@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/async-2.1.2.tgz_1476657994986_0.4750206011813134"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/async/-/async-2.1.2.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/parallel.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/parallel.js
new file mode 100644
index 0000000..99053a2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/parallel.js
@@ -0,0 +1,87 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = parallelLimit;
+
+var _eachOf = require('./eachOf');
+
+var _eachOf2 = _interopRequireDefault(_eachOf);
+
+var _parallel = require('./internal/parallel');
+
+var _parallel2 = _interopRequireDefault(_parallel);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Run the `tasks` collection of functions in parallel, without waiting until
+ * the previous function has completed. If any of the functions pass an error to
+ * its callback, the main `callback` is immediately called with the value of the
+ * error. Once the `tasks` have completed, the results are passed to the final
+ * `callback` as an array.
+ *
+ * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about
+ * parallel execution of code. If your tasks do not use any timers or perform
+ * any I/O, they will actually be executed in series. Any synchronous setup
+ * sections for each task will happen one after the other. JavaScript remains
+ * single-threaded.
+ *
+ * It is also possible to use an object instead of an array. Each property will
+ * be run as a function and the results will be passed to the final `callback`
+ * as an object instead of an array. This can be a more readable way of handling
+ * results from {@link async.parallel}.
+ *
+ * @name parallel
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {Array|Iterable|Object} tasks - A collection containing functions to run.
+ * Each function is passed a `callback(err, result)` which it must call on
+ * completion with an error `err` (which can be `null`) and an optional `result`
+ * value.
+ * @param {Function} [callback] - An optional callback to run once all the
+ * functions have completed successfully. This function gets a results array
+ * (or object) containing all the result arguments passed to the task callbacks.
+ * Invoked with (err, results).
+ * @example
+ * async.parallel([
+ * function(callback) {
+ * setTimeout(function() {
+ * callback(null, 'one');
+ * }, 200);
+ * },
+ * function(callback) {
+ * setTimeout(function() {
+ * callback(null, 'two');
+ * }, 100);
+ * }
+ * ],
+ * // optional callback
+ * function(err, results) {
+ * // the results array will equal ['one','two'] even though
+ * // the second function had a shorter timeout.
+ * });
+ *
+ * // an example using an object instead of an array
+ * async.parallel({
+ * one: function(callback) {
+ * setTimeout(function() {
+ * callback(null, 1);
+ * }, 200);
+ * },
+ * two: function(callback) {
+ * setTimeout(function() {
+ * callback(null, 2);
+ * }, 100);
+ * }
+ * }, function(err, results) {
+ * // results is now equals to: {one: 1, two: 2}
+ * });
+ */
+function parallelLimit(tasks, callback) {
+ (0, _parallel2.default)(_eachOf2.default, tasks, callback);
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/parallelLimit.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/parallelLimit.js
new file mode 100644
index 0000000..b0bc746
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/parallelLimit.js
@@ -0,0 +1,41 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = parallelLimit;
+
+var _eachOfLimit = require('./internal/eachOfLimit');
+
+var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
+
+var _parallel = require('./internal/parallel');
+
+var _parallel2 = _interopRequireDefault(_parallel);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [`parallel`]{@link module:ControlFlow.parallel} but runs a maximum of `limit` async operations at a
+ * time.
+ *
+ * @name parallelLimit
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.parallel]{@link module:ControlFlow.parallel}
+ * @category Control Flow
+ * @param {Array|Collection} tasks - A collection containing functions to run.
+ * Each function is passed a `callback(err, result)` which it must call on
+ * completion with an error `err` (which can be `null`) and an optional `result`
+ * value.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {Function} [callback] - An optional callback to run once all the
+ * functions have completed successfully. This function gets a results array
+ * (or object) containing all the result arguments passed to the task callbacks.
+ * Invoked with (err, results).
+ */
+function parallelLimit(tasks, limit, callback) {
+ (0, _parallel2.default)((0, _eachOfLimit2.default)(limit), tasks, callback);
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/priorityQueue.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/priorityQueue.js
new file mode 100644
index 0000000..4e37149
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/priorityQueue.js
@@ -0,0 +1,99 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+exports.default = function (worker, concurrency) {
+ // Start with a normal queue
+ var q = (0, _queue2.default)(worker, concurrency);
+
+ // Override push to accept second parameter representing priority
+ q.push = function (data, priority, callback) {
+ if (callback == null) callback = _noop2.default;
+ if (typeof callback !== 'function') {
+ throw new Error('task callback must be a function');
+ }
+ q.started = true;
+ if (!(0, _isArray2.default)(data)) {
+ data = [data];
+ }
+ if (data.length === 0) {
+ // call drain immediately if there are no tasks
+ return (0, _setImmediate2.default)(function () {
+ q.drain();
+ });
+ }
+
+ priority = priority || 0;
+ var nextNode = q._tasks.head;
+ while (nextNode && priority >= nextNode.priority) {
+ nextNode = nextNode.next;
+ }
+
+ for (var i = 0, l = data.length; i < l; i++) {
+ var item = {
+ data: data[i],
+ priority: priority,
+ callback: callback
+ };
+
+ if (nextNode) {
+ q._tasks.insertBefore(nextNode, item);
+ } else {
+ q._tasks.push(item);
+ }
+ }
+ (0, _setImmediate2.default)(q.process);
+ };
+
+ // Remove unshift function
+ delete q.unshift;
+
+ return q;
+};
+
+var _isArray = require('lodash/isArray');
+
+var _isArray2 = _interopRequireDefault(_isArray);
+
+var _noop = require('lodash/noop');
+
+var _noop2 = _interopRequireDefault(_noop);
+
+var _setImmediate = require('./setImmediate');
+
+var _setImmediate2 = _interopRequireDefault(_setImmediate);
+
+var _queue = require('./queue');
+
+var _queue2 = _interopRequireDefault(_queue);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+module.exports = exports['default'];
+
+/**
+ * The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and
+ * completed in ascending priority order.
+ *
+ * @name priorityQueue
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.queue]{@link module:ControlFlow.queue}
+ * @category Control Flow
+ * @param {Function} worker - An asynchronous function for processing a queued
+ * task, which must call its `callback(err)` argument when finished, with an
+ * optional `error` as an argument. If you want to handle errors from an
+ * individual task, pass a callback to `q.push()`. Invoked with
+ * (task, callback).
+ * @param {number} concurrency - An `integer` for determining how many `worker`
+ * functions should be run in parallel. If omitted, the concurrency defaults to
+ * `1`. If the concurrency is `0`, an error is thrown.
+ * @returns {module:ControlFlow.QueueObject} A priorityQueue object to manage the tasks. There are two
+ * differences between `queue` and `priorityQueue` objects:
+ * * `push(task, priority, [callback])` - `priority` should be a number. If an
+ * array of `tasks` is given, all tasks will be assigned the same priority.
+ * * The `unshift` method was removed.
+ */ \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/queue.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/queue.js
new file mode 100644
index 0000000..b991f31
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/queue.js
@@ -0,0 +1,120 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+exports.default = function (worker, concurrency) {
+ return (0, _queue2.default)(function (items, cb) {
+ worker(items[0], cb);
+ }, concurrency, 1);
+};
+
+var _queue = require('./internal/queue');
+
+var _queue2 = _interopRequireDefault(_queue);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+module.exports = exports['default'];
+
+/**
+ * A queue of tasks for the worker function to complete.
+ * @typedef {Object} QueueObject
+ * @memberOf module:ControlFlow
+ * @property {Function} length - a function returning the number of items
+ * waiting to be processed. Invoke with `queue.length()`.
+ * @property {boolean} started - a boolean indicating whether or not any
+ * items have been pushed and processed by the queue.
+ * @property {Function} running - a function returning the number of items
+ * currently being processed. Invoke with `queue.running()`.
+ * @property {Function} workersList - a function returning the array of items
+ * currently being processed. Invoke with `queue.workersList()`.
+ * @property {Function} idle - a function returning false if there are items
+ * waiting or being processed, or true if not. Invoke with `queue.idle()`.
+ * @property {number} concurrency - an integer for determining how many `worker`
+ * functions should be run in parallel. This property can be changed after a
+ * `queue` is created to alter the concurrency on-the-fly.
+ * @property {Function} push - add a new task to the `queue`. Calls `callback`
+ * once the `worker` has finished processing the task. Instead of a single task,
+ * a `tasks` array can be submitted. The respective callback is used for every
+ * task in the list. Invoke with `queue.push(task, [callback])`,
+ * @property {Function} unshift - add a new task to the front of the `queue`.
+ * Invoke with `queue.unshift(task, [callback])`.
+ * @property {Function} saturated - a callback that is called when the number of
+ * running workers hits the `concurrency` limit, and further tasks will be
+ * queued.
+ * @property {Function} unsaturated - a callback that is called when the number
+ * of running workers is less than the `concurrency` & `buffer` limits, and
+ * further tasks will not be queued.
+ * @property {number} buffer - A minimum threshold buffer in order to say that
+ * the `queue` is `unsaturated`.
+ * @property {Function} empty - a callback that is called when the last item
+ * from the `queue` is given to a `worker`.
+ * @property {Function} drain - a callback that is called when the last item
+ * from the `queue` has returned from the `worker`.
+ * @property {Function} error - a callback that is called when a task errors.
+ * Has the signature `function(error, task)`.
+ * @property {boolean} paused - a boolean for determining whether the queue is
+ * in a paused state.
+ * @property {Function} pause - a function that pauses the processing of tasks
+ * until `resume()` is called. Invoke with `queue.pause()`.
+ * @property {Function} resume - a function that resumes the processing of
+ * queued tasks when the queue is paused. Invoke with `queue.resume()`.
+ * @property {Function} kill - a function that removes the `drain` callback and
+ * empties remaining tasks from the queue forcing it to go idle. Invoke with `queue.kill()`.
+ */
+
+/**
+ * Creates a `queue` object with the specified `concurrency`. Tasks added to the
+ * `queue` are processed in parallel (up to the `concurrency` limit). If all
+ * `worker`s are in progress, the task is queued until one becomes available.
+ * Once a `worker` completes a `task`, that `task`'s callback is called.
+ *
+ * @name queue
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {Function} worker - An asynchronous function for processing a queued
+ * task, which must call its `callback(err)` argument when finished, with an
+ * optional `error` as an argument. If you want to handle errors from an
+ * individual task, pass a callback to `q.push()`. Invoked with
+ * (task, callback).
+ * @param {number} [concurrency=1] - An `integer` for determining how many
+ * `worker` functions should be run in parallel. If omitted, the concurrency
+ * defaults to `1`. If the concurrency is `0`, an error is thrown.
+ * @returns {module:ControlFlow.QueueObject} A queue object to manage the tasks. Callbacks can
+ * attached as certain properties to listen for specific events during the
+ * lifecycle of the queue.
+ * @example
+ *
+ * // create a queue object with concurrency 2
+ * var q = async.queue(function(task, callback) {
+ * console.log('hello ' + task.name);
+ * callback();
+ * }, 2);
+ *
+ * // assign a callback
+ * q.drain = function() {
+ * console.log('all items have been processed');
+ * };
+ *
+ * // add some items to the queue
+ * q.push({name: 'foo'}, function(err) {
+ * console.log('finished processing foo');
+ * });
+ * q.push({name: 'bar'}, function (err) {
+ * console.log('finished processing bar');
+ * });
+ *
+ * // add some items to the queue (batch-wise)
+ * q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function(err) {
+ * console.log('finished processing item');
+ * });
+ *
+ * // add some items to the front of the queue
+ * q.unshift({name: 'bar'}, function (err) {
+ * console.log('finished processing bar');
+ * });
+ */ \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/race.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/race.js
new file mode 100644
index 0000000..4d0625b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/race.js
@@ -0,0 +1,67 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = race;
+
+var _isArray = require('lodash/isArray');
+
+var _isArray2 = _interopRequireDefault(_isArray);
+
+var _noop = require('lodash/noop');
+
+var _noop2 = _interopRequireDefault(_noop);
+
+var _once = require('./internal/once');
+
+var _once2 = _interopRequireDefault(_once);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Runs the `tasks` array of functions in parallel, without waiting until the
+ * previous function has completed. Once any of the `tasks` complete or pass an
+ * error to its callback, the main `callback` is immediately called. It's
+ * equivalent to `Promise.race()`.
+ *
+ * @name race
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {Array} tasks - An array containing functions to run. Each function
+ * is passed a `callback(err, result)` which it must call on completion with an
+ * error `err` (which can be `null`) and an optional `result` value.
+ * @param {Function} callback - A callback to run once any of the functions have
+ * completed. This function gets an error or result from the first function that
+ * completed. Invoked with (err, result).
+ * @returns undefined
+ * @example
+ *
+ * async.race([
+ * function(callback) {
+ * setTimeout(function() {
+ * callback(null, 'one');
+ * }, 200);
+ * },
+ * function(callback) {
+ * setTimeout(function() {
+ * callback(null, 'two');
+ * }, 100);
+ * }
+ * ],
+ * // main callback
+ * function(err, result) {
+ * // the result will be equal to 'two' as it finishes earlier
+ * });
+ */
+function race(tasks, callback) {
+ callback = (0, _once2.default)(callback || _noop2.default);
+ if (!(0, _isArray2.default)(tasks)) return callback(new TypeError('First argument to race must be an array of functions'));
+ if (!tasks.length) return callback();
+ for (var i = 0, l = tasks.length; i < l; i++) {
+ tasks[i](callback);
+ }
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/reduce.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/reduce.js
new file mode 100644
index 0000000..15e26ea
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/reduce.js
@@ -0,0 +1,73 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = reduce;
+
+var _eachOfSeries = require('./eachOfSeries');
+
+var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries);
+
+var _noop = require('lodash/noop');
+
+var _noop2 = _interopRequireDefault(_noop);
+
+var _once = require('./internal/once');
+
+var _once2 = _interopRequireDefault(_once);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Reduces `coll` into a single value using an async `iteratee` to return each
+ * successive step. `memo` is the initial state of the reduction. This function
+ * only operates in series.
+ *
+ * For performance reasons, it may make sense to split a call to this function
+ * into a parallel map, and then use the normal `Array.prototype.reduce` on the
+ * results. This function is for situations where each step in the reduction
+ * needs to be async; if you can get the data before reducing it, then it's
+ * probably a good idea to do so.
+ *
+ * @name reduce
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @alias inject
+ * @alias foldl
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {*} memo - The initial state of the reduction.
+ * @param {Function} iteratee - A function applied to each item in the
+ * array to produce the next step in the reduction. The `iteratee` is passed a
+ * `callback(err, reduction)` which accepts an optional error as its first
+ * argument, and the state of the reduction as the second. If an error is
+ * passed to the callback, the reduction is stopped and the main `callback` is
+ * immediately called with the error. Invoked with (memo, item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Result is the reduced value. Invoked with
+ * (err, result).
+ * @example
+ *
+ * async.reduce([1,2,3], 0, function(memo, item, callback) {
+ * // pointless async:
+ * process.nextTick(function() {
+ * callback(null, memo + item)
+ * });
+ * }, function(err, result) {
+ * // result is now equal to the last value of memo, which is 6
+ * });
+ */
+function reduce(coll, memo, iteratee, callback) {
+ callback = (0, _once2.default)(callback || _noop2.default);
+ (0, _eachOfSeries2.default)(coll, function (x, i, callback) {
+ iteratee(memo, x, function (err, v) {
+ memo = v;
+ callback(err);
+ });
+ }, function (err) {
+ callback(err, memo);
+ });
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/reduceRight.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/reduceRight.js
new file mode 100644
index 0000000..3ffdd8e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/reduceRight.js
@@ -0,0 +1,42 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = reduceRight;
+
+var _reduce = require('./reduce');
+
+var _reduce2 = _interopRequireDefault(_reduce);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var slice = Array.prototype.slice;
+
+/**
+ * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order.
+ *
+ * @name reduceRight
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.reduce]{@link module:Collections.reduce}
+ * @alias foldr
+ * @category Collection
+ * @param {Array} array - A collection to iterate over.
+ * @param {*} memo - The initial state of the reduction.
+ * @param {Function} iteratee - A function applied to each item in the
+ * array to produce the next step in the reduction. The `iteratee` is passed a
+ * `callback(err, reduction)` which accepts an optional error as its first
+ * argument, and the state of the reduction as the second. If an error is
+ * passed to the callback, the reduction is stopped and the main `callback` is
+ * immediately called with the error. Invoked with (memo, item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Result is the reduced value. Invoked with
+ * (err, result).
+ */
+function reduceRight(array, memo, iteratee, callback) {
+ var reversed = slice.call(array).reverse();
+ (0, _reduce2.default)(reversed, memo, iteratee, callback);
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/reflect.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/reflect.js
new file mode 100644
index 0000000..e4fabcc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/reflect.js
@@ -0,0 +1,80 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = reflect;
+
+var _initialParams = require('./internal/initialParams');
+
+var _initialParams2 = _interopRequireDefault(_initialParams);
+
+var _baseRest = require('lodash/_baseRest');
+
+var _baseRest2 = _interopRequireDefault(_baseRest);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Wraps the function in another function that always returns data even when it
+ * errors.
+ *
+ * The object returned has either the property `error` or `value`.
+ *
+ * @name reflect
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @category Util
+ * @param {Function} fn - The function you want to wrap
+ * @returns {Function} - A function that always passes null to it's callback as
+ * the error. The second argument to the callback will be an `object` with
+ * either an `error` or a `value` property.
+ * @example
+ *
+ * async.parallel([
+ * async.reflect(function(callback) {
+ * // do some stuff ...
+ * callback(null, 'one');
+ * }),
+ * async.reflect(function(callback) {
+ * // do some more stuff but error ...
+ * callback('bad stuff happened');
+ * }),
+ * async.reflect(function(callback) {
+ * // do some more stuff ...
+ * callback(null, 'two');
+ * })
+ * ],
+ * // optional callback
+ * function(err, results) {
+ * // values
+ * // results[0].value = 'one'
+ * // results[1].error = 'bad stuff happened'
+ * // results[2].value = 'two'
+ * });
+ */
+function reflect(fn) {
+ return (0, _initialParams2.default)(function reflectOn(args, reflectCallback) {
+ args.push((0, _baseRest2.default)(function callback(err, cbArgs) {
+ if (err) {
+ reflectCallback(null, {
+ error: err
+ });
+ } else {
+ var value = null;
+ if (cbArgs.length === 1) {
+ value = cbArgs[0];
+ } else if (cbArgs.length > 1) {
+ value = cbArgs;
+ }
+ reflectCallback(null, {
+ value: value
+ });
+ }
+ }));
+
+ return fn.apply(this, args);
+ });
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/reflectAll.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/reflectAll.js
new file mode 100644
index 0000000..fc0f401
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/reflectAll.js
@@ -0,0 +1,104 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = reflectAll;
+
+var _reflect = require('./reflect');
+
+var _reflect2 = _interopRequireDefault(_reflect);
+
+var _isArray = require('lodash/isArray');
+
+var _isArray2 = _interopRequireDefault(_isArray);
+
+var _arrayMap2 = require('lodash/_arrayMap');
+
+var _arrayMap3 = _interopRequireDefault(_arrayMap2);
+
+var _baseForOwn = require('lodash/_baseForOwn');
+
+var _baseForOwn2 = _interopRequireDefault(_baseForOwn);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * A helper function that wraps an array or an object of functions with reflect.
+ *
+ * @name reflectAll
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @see [async.reflect]{@link module:Utils.reflect}
+ * @category Util
+ * @param {Array} tasks - The array of functions to wrap in `async.reflect`.
+ * @returns {Array} Returns an array of functions, each function wrapped in
+ * `async.reflect`
+ * @example
+ *
+ * let tasks = [
+ * function(callback) {
+ * setTimeout(function() {
+ * callback(null, 'one');
+ * }, 200);
+ * },
+ * function(callback) {
+ * // do some more stuff but error ...
+ * callback(new Error('bad stuff happened'));
+ * },
+ * function(callback) {
+ * setTimeout(function() {
+ * callback(null, 'two');
+ * }, 100);
+ * }
+ * ];
+ *
+ * async.parallel(async.reflectAll(tasks),
+ * // optional callback
+ * function(err, results) {
+ * // values
+ * // results[0].value = 'one'
+ * // results[1].error = Error('bad stuff happened')
+ * // results[2].value = 'two'
+ * });
+ *
+ * // an example using an object instead of an array
+ * let tasks = {
+ * one: function(callback) {
+ * setTimeout(function() {
+ * callback(null, 'one');
+ * }, 200);
+ * },
+ * two: function(callback) {
+ * callback('two');
+ * },
+ * three: function(callback) {
+ * setTimeout(function() {
+ * callback(null, 'three');
+ * }, 100);
+ * }
+ * };
+ *
+ * async.parallel(async.reflectAll(tasks),
+ * // optional callback
+ * function(err, results) {
+ * // values
+ * // results.one.value = 'one'
+ * // results.two.error = 'two'
+ * // results.three.value = 'three'
+ * });
+ */
+function reflectAll(tasks) {
+ var results;
+ if ((0, _isArray2.default)(tasks)) {
+ results = (0, _arrayMap3.default)(tasks, _reflect2.default);
+ } else {
+ results = {};
+ (0, _baseForOwn2.default)(tasks, function (task, key) {
+ results[key] = _reflect2.default.call(this, task);
+ });
+ }
+ return results;
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/reject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/reject.js
new file mode 100644
index 0000000..5fc5c9c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/reject.js
@@ -0,0 +1,44 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _reject = require('./internal/reject');
+
+var _reject2 = _interopRequireDefault(_reject);
+
+var _doParallel = require('./internal/doParallel');
+
+var _doParallel2 = _interopRequireDefault(_doParallel);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test.
+ *
+ * @name reject
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.filter]{@link module:Collections.filter}
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A truth test to apply to each item in `coll`.
+ * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
+ * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Invoked with (err, results).
+ * @example
+ *
+ * async.reject(['file1','file2','file3'], function(filePath, callback) {
+ * fs.access(filePath, function(err) {
+ * callback(null, !err)
+ * });
+ * }, function(err, results) {
+ * // results now equals an array of missing files
+ * createFiles(results);
+ * });
+ */
+exports.default = (0, _doParallel2.default)(_reject2.default);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/rejectLimit.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/rejectLimit.js
new file mode 100644
index 0000000..600087c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/rejectLimit.js
@@ -0,0 +1,36 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _reject = require('./internal/reject');
+
+var _reject2 = _interopRequireDefault(_reject);
+
+var _doParallelLimit = require('./internal/doParallelLimit');
+
+var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a
+ * time.
+ *
+ * @name rejectLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.reject]{@link module:Collections.reject}
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {Function} iteratee - A truth test to apply to each item in `coll`.
+ * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
+ * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Invoked with (err, results).
+ */
+exports.default = (0, _doParallelLimit2.default)(_reject2.default);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/rejectSeries.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/rejectSeries.js
new file mode 100644
index 0000000..57f49de
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/rejectSeries.js
@@ -0,0 +1,34 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _rejectLimit = require('./rejectLimit');
+
+var _rejectLimit2 = _interopRequireDefault(_rejectLimit);
+
+var _doLimit = require('./internal/doLimit');
+
+var _doLimit2 = _interopRequireDefault(_doLimit);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time.
+ *
+ * @name rejectSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.reject]{@link module:Collections.reject}
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A truth test to apply to each item in `coll`.
+ * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
+ * with a boolean argument once it has completed. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Invoked with (err, results).
+ */
+exports.default = (0, _doLimit2.default)(_rejectLimit2.default, 1);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/retry.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/retry.js
new file mode 100644
index 0000000..3738be2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/retry.js
@@ -0,0 +1,152 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = retry;
+
+var _noop = require('lodash/noop');
+
+var _noop2 = _interopRequireDefault(_noop);
+
+var _constant = require('lodash/constant');
+
+var _constant2 = _interopRequireDefault(_constant);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Attempts to get a successful response from `task` no more than `times` times
+ * before returning an error. If the task is successful, the `callback` will be
+ * passed the result of the successful task. If all attempts fail, the callback
+ * will be passed the error and result (if any) of the final attempt.
+ *
+ * @name retry
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an
+ * object with `times` and `interval` or a number.
+ * * `times` - The number of attempts to make before giving up. The default
+ * is `5`.
+ * * `interval` - The time to wait between retries, in milliseconds. The
+ * default is `0`. The interval may also be specified as a function of the
+ * retry count (see example).
+ * * `errorFilter` - An optional synchronous function that is invoked on
+ * erroneous result. If it returns `true` the retry attempts will continue;
+ * if the function returns `false` the retry flow is aborted with the current
+ * attempt's error and result being returned to the final callback.
+ * Invoked with (err).
+ * * If `opts` is a number, the number specifies the number of times to retry,
+ * with the default interval of `0`.
+ * @param {Function} task - A function which receives two arguments: (1) a
+ * `callback(err, result)` which must be called when finished, passing `err`
+ * (which can be `null`) and the `result` of the function's execution, and (2)
+ * a `results` object, containing the results of the previously executed
+ * functions (if nested inside another control flow). Invoked with
+ * (callback, results).
+ * @param {Function} [callback] - An optional callback which is called when the
+ * task has succeeded, or after the final failed attempt. It receives the `err`
+ * and `result` arguments of the last attempt at completing the `task`. Invoked
+ * with (err, results).
+ * @example
+ *
+ * // The `retry` function can be used as a stand-alone control flow by passing
+ * // a callback, as shown below:
+ *
+ * // try calling apiMethod 3 times
+ * async.retry(3, apiMethod, function(err, result) {
+ * // do something with the result
+ * });
+ *
+ * // try calling apiMethod 3 times, waiting 200 ms between each retry
+ * async.retry({times: 3, interval: 200}, apiMethod, function(err, result) {
+ * // do something with the result
+ * });
+ *
+ * // try calling apiMethod 10 times with exponential backoff
+ * // (i.e. intervals of 100, 200, 400, 800, 1600, ... milliseconds)
+ * async.retry({
+ * times: 10,
+ * interval: function(retryCount) {
+ * return 50 * Math.pow(2, retryCount);
+ * }
+ * }, apiMethod, function(err, result) {
+ * // do something with the result
+ * });
+ *
+ * // try calling apiMethod the default 5 times no delay between each retry
+ * async.retry(apiMethod, function(err, result) {
+ * // do something with the result
+ * });
+ *
+ * // try calling apiMethod only when error condition satisfies, all other
+ * // errors will abort the retry control flow and return to final callback
+ * async.retry({
+ * errorFilter: function(err) {
+ * return err.message === 'Temporary error'; // only retry on a specific error
+ * }
+ * }, apiMethod, function(err, result) {
+ * // do something with the result
+ * });
+ *
+ * // It can also be embedded within other control flow functions to retry
+ * // individual methods that are not as reliable, like this:
+ * async.auto({
+ * users: api.getUsers.bind(api),
+ * payments: async.retry(3, api.getPayments.bind(api))
+ * }, function(err, results) {
+ * // do something with the results
+ * });
+ *
+ */
+function retry(opts, task, callback) {
+ var DEFAULT_TIMES = 5;
+ var DEFAULT_INTERVAL = 0;
+
+ var options = {
+ times: DEFAULT_TIMES,
+ intervalFunc: (0, _constant2.default)(DEFAULT_INTERVAL)
+ };
+
+ function parseTimes(acc, t) {
+ if (typeof t === 'object') {
+ acc.times = +t.times || DEFAULT_TIMES;
+
+ acc.intervalFunc = typeof t.interval === 'function' ? t.interval : (0, _constant2.default)(+t.interval || DEFAULT_INTERVAL);
+
+ acc.errorFilter = t.errorFilter;
+ } else if (typeof t === 'number' || typeof t === 'string') {
+ acc.times = +t || DEFAULT_TIMES;
+ } else {
+ throw new Error("Invalid arguments for async.retry");
+ }
+ }
+
+ if (arguments.length < 3 && typeof opts === 'function') {
+ callback = task || _noop2.default;
+ task = opts;
+ } else {
+ parseTimes(options, opts);
+ callback = callback || _noop2.default;
+ }
+
+ if (typeof task !== 'function') {
+ throw new Error("Invalid arguments for async.retry");
+ }
+
+ var attempt = 1;
+ function retryAttempt() {
+ task(function (err) {
+ if (err && attempt++ < options.times && (typeof options.errorFilter != 'function' || options.errorFilter(err))) {
+ setTimeout(retryAttempt, options.intervalFunc(attempt));
+ } else {
+ callback.apply(null, arguments);
+ }
+ });
+ }
+
+ retryAttempt();
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/retryable.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/retryable.js
new file mode 100644
index 0000000..bf6e2fb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/retryable.js
@@ -0,0 +1,56 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+exports.default = function (opts, task) {
+ if (!task) {
+ task = opts;
+ opts = null;
+ }
+ return (0, _initialParams2.default)(function (args, callback) {
+ function taskFn(cb) {
+ task.apply(null, args.concat([cb]));
+ }
+
+ if (opts) (0, _retry2.default)(opts, taskFn, callback);else (0, _retry2.default)(taskFn, callback);
+ });
+};
+
+var _retry = require('./retry');
+
+var _retry2 = _interopRequireDefault(_retry);
+
+var _initialParams = require('./internal/initialParams');
+
+var _initialParams2 = _interopRequireDefault(_initialParams);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+module.exports = exports['default'];
+
+/**
+ * A close relative of [`retry`]{@link module:ControlFlow.retry}. This method wraps a task and makes it
+ * retryable, rather than immediately calling it with retries.
+ *
+ * @name retryable
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.retry]{@link module:ControlFlow.retry}
+ * @category Control Flow
+ * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional
+ * options, exactly the same as from `retry`
+ * @param {Function} task - the asynchronous function to wrap
+ * @returns {Functions} The wrapped function, which when invoked, will retry on
+ * an error, based on the parameters specified in `opts`.
+ * @example
+ *
+ * async.auto({
+ * dep1: async.retryable(3, getFromFlakyService),
+ * process: ["dep1", async.retryable(3, function (results, cb) {
+ * maybeProcessData(results.dep1, cb);
+ * })]
+ * }, callback);
+ */ \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/seq.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/seq.js
new file mode 100644
index 0000000..fc91fac
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/seq.js
@@ -0,0 +1,79 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _noop = require('lodash/noop');
+
+var _noop2 = _interopRequireDefault(_noop);
+
+var _baseRest = require('lodash/_baseRest');
+
+var _baseRest2 = _interopRequireDefault(_baseRest);
+
+var _reduce = require('./reduce');
+
+var _reduce2 = _interopRequireDefault(_reduce);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Version of the compose function that is more natural to read. Each function
+ * consumes the return value of the previous function. It is the equivalent of
+ * [compose]{@link module:ControlFlow.compose} with the arguments reversed.
+ *
+ * Each function is executed with the `this` binding of the composed function.
+ *
+ * @name seq
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.compose]{@link module:ControlFlow.compose}
+ * @category Control Flow
+ * @param {...Function} functions - the asynchronous functions to compose
+ * @returns {Function} a function that composes the `functions` in order
+ * @example
+ *
+ * // Requires lodash (or underscore), express3 and dresende's orm2.
+ * // Part of an app, that fetches cats of the logged user.
+ * // This example uses `seq` function to avoid overnesting and error
+ * // handling clutter.
+ * app.get('/cats', function(request, response) {
+ * var User = request.models.User;
+ * async.seq(
+ * _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data))
+ * function(user, fn) {
+ * user.getCats(fn); // 'getCats' has signature (callback(err, data))
+ * }
+ * )(req.session.user_id, function (err, cats) {
+ * if (err) {
+ * console.error(err);
+ * response.json({ status: 'error', message: err.message });
+ * } else {
+ * response.json({ status: 'ok', message: 'Cats found', data: cats });
+ * }
+ * });
+ * });
+ */
+exports.default = (0, _baseRest2.default)(function seq(functions) {
+ return (0, _baseRest2.default)(function (args) {
+ var that = this;
+
+ var cb = args[args.length - 1];
+ if (typeof cb == 'function') {
+ args.pop();
+ } else {
+ cb = _noop2.default;
+ }
+
+ (0, _reduce2.default)(functions, args, function (newargs, fn, cb) {
+ fn.apply(that, newargs.concat([(0, _baseRest2.default)(function (err, nextargs) {
+ cb(err, nextargs);
+ })]));
+ }, function (err, results) {
+ cb.apply(that, [err].concat(results));
+ });
+ });
+});
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/series.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/series.js
new file mode 100644
index 0000000..668f9d6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/series.js
@@ -0,0 +1,85 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = series;
+
+var _parallel = require('./internal/parallel');
+
+var _parallel2 = _interopRequireDefault(_parallel);
+
+var _eachOfSeries = require('./eachOfSeries');
+
+var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Run the functions in the `tasks` collection in series, each one running once
+ * the previous function has completed. If any functions in the series pass an
+ * error to its callback, no more functions are run, and `callback` is
+ * immediately called with the value of the error. Otherwise, `callback`
+ * receives an array of results when `tasks` have completed.
+ *
+ * It is also possible to use an object instead of an array. Each property will
+ * be run as a function, and the results will be passed to the final `callback`
+ * as an object instead of an array. This can be a more readable way of handling
+ * results from {@link async.series}.
+ *
+ * **Note** that while many implementations preserve the order of object
+ * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6)
+ * explicitly states that
+ *
+ * > The mechanics and order of enumerating the properties is not specified.
+ *
+ * So if you rely on the order in which your series of functions are executed,
+ * and want this to work on all platforms, consider using an array.
+ *
+ * @name series
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {Array|Iterable|Object} tasks - A collection containing functions to run, each
+ * function is passed a `callback(err, result)` it must call on completion with
+ * an error `err` (which can be `null`) and an optional `result` value.
+ * @param {Function} [callback] - An optional callback to run once all the
+ * functions have completed. This function gets a results array (or object)
+ * containing all the result arguments passed to the `task` callbacks. Invoked
+ * with (err, result).
+ * @example
+ * async.series([
+ * function(callback) {
+ * // do some stuff ...
+ * callback(null, 'one');
+ * },
+ * function(callback) {
+ * // do some more stuff ...
+ * callback(null, 'two');
+ * }
+ * ],
+ * // optional callback
+ * function(err, results) {
+ * // results is now equal to ['one', 'two']
+ * });
+ *
+ * async.series({
+ * one: function(callback) {
+ * setTimeout(function() {
+ * callback(null, 1);
+ * }, 200);
+ * },
+ * two: function(callback){
+ * setTimeout(function() {
+ * callback(null, 2);
+ * }, 100);
+ * }
+ * }, function(err, results) {
+ * // results is now equal to: {one: 1, two: 2}
+ * });
+ */
+function series(tasks, callback) {
+ (0, _parallel2.default)(_eachOfSeries2.default, tasks, callback);
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/setImmediate.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/setImmediate.js
new file mode 100644
index 0000000..23d48e2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/setImmediate.js
@@ -0,0 +1,45 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _setImmediate = require('./internal/setImmediate');
+
+var _setImmediate2 = _interopRequireDefault(_setImmediate);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Calls `callback` on a later loop around the event loop. In Node.js this just
+ * calls `setImmediate`. In the browser it will use `setImmediate` if
+ * available, otherwise `setTimeout(callback, 0)`, which means other higher
+ * priority events may precede the execution of `callback`.
+ *
+ * This is used internally for browser-compatibility purposes.
+ *
+ * @name setImmediate
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @alias nextTick
+ * @category Util
+ * @param {Function} callback - The function to call on a later loop around
+ * the event loop. Invoked with (args...).
+ * @param {...*} args... - any number of additional arguments to pass to the
+ * callback on the next tick.
+ * @example
+ *
+ * var call_order = [];
+ * async.nextTick(function() {
+ * call_order.push('two');
+ * // call_order now equals ['one','two']
+ * });
+ * call_order.push('one');
+ *
+ * async.setImmediate(function (a, b, c) {
+ * // a, b, and c equal 1, 2, and 3
+ * }, 1, 2, 3);
+ */
+exports.default = _setImmediate2.default;
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/some.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/some.js
new file mode 100644
index 0000000..acb3544
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/some.js
@@ -0,0 +1,52 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createTester = require('./internal/createTester');
+
+var _createTester2 = _interopRequireDefault(_createTester);
+
+var _eachOf = require('./eachOf');
+
+var _eachOf2 = _interopRequireDefault(_eachOf);
+
+var _identity = require('lodash/identity');
+
+var _identity2 = _interopRequireDefault(_identity);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Returns `true` if at least one element in the `coll` satisfies an async test.
+ * If any iteratee call returns `true`, the main `callback` is immediately
+ * called.
+ *
+ * @name some
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @alias any
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A truth test to apply to each item in the array
+ * in parallel. The iteratee is passed a `callback(err, truthValue)` which must
+ * be called with a boolean argument once it has completed. Invoked with
+ * (item, callback).
+ * @param {Function} [callback] - A callback which is called as soon as any
+ * iteratee returns `true`, or after all the iteratee functions have finished.
+ * Result will be either `true` or `false` depending on the values of the async
+ * tests. Invoked with (err, result).
+ * @example
+ *
+ * async.some(['file1','file2','file3'], function(filePath, callback) {
+ * fs.access(filePath, function(err) {
+ * callback(null, !err)
+ * });
+ * }, function(err, result) {
+ * // if result is true then at least one of the files exists
+ * });
+ */
+exports.default = (0, _createTester2.default)(_eachOf2.default, Boolean, _identity2.default);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/someLimit.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/someLimit.js
new file mode 100644
index 0000000..c241818
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/someLimit.js
@@ -0,0 +1,43 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createTester = require('./internal/createTester');
+
+var _createTester2 = _interopRequireDefault(_createTester);
+
+var _eachOfLimit = require('./eachOfLimit');
+
+var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
+
+var _identity = require('lodash/identity');
+
+var _identity2 = _interopRequireDefault(_identity);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time.
+ *
+ * @name someLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.some]{@link module:Collections.some}
+ * @alias anyLimit
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {Function} iteratee - A truth test to apply to each item in the array
+ * in parallel. The iteratee is passed a `callback(err, truthValue)` which must
+ * be called with a boolean argument once it has completed. Invoked with
+ * (item, callback).
+ * @param {Function} [callback] - A callback which is called as soon as any
+ * iteratee returns `true`, or after all the iteratee functions have finished.
+ * Result will be either `true` or `false` depending on the values of the async
+ * tests. Invoked with (err, result).
+ */
+exports.default = (0, _createTester2.default)(_eachOfLimit2.default, Boolean, _identity2.default);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/someSeries.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/someSeries.js
new file mode 100644
index 0000000..96d77ac
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/someSeries.js
@@ -0,0 +1,38 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _someLimit = require('./someLimit');
+
+var _someLimit2 = _interopRequireDefault(_someLimit);
+
+var _doLimit = require('./internal/doLimit');
+
+var _doLimit2 = _interopRequireDefault(_doLimit);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time.
+ *
+ * @name someSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.some]{@link module:Collections.some}
+ * @alias anySeries
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A truth test to apply to each item in the array
+ * in parallel. The iteratee is passed a `callback(err, truthValue)` which must
+ * be called with a boolean argument once it has completed. Invoked with
+ * (item, callback).
+ * @param {Function} [callback] - A callback which is called as soon as any
+ * iteratee returns `true`, or after all the iteratee functions have finished.
+ * Result will be either `true` or `false` depending on the values of the async
+ * tests. Invoked with (err, result).
+ */
+exports.default = (0, _doLimit2.default)(_someLimit2.default, 1);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/sortBy.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/sortBy.js
new file mode 100644
index 0000000..b89acbd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/sortBy.js
@@ -0,0 +1,85 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = sortBy;
+
+var _arrayMap = require('lodash/_arrayMap');
+
+var _arrayMap2 = _interopRequireDefault(_arrayMap);
+
+var _baseProperty = require('lodash/_baseProperty');
+
+var _baseProperty2 = _interopRequireDefault(_baseProperty);
+
+var _map = require('./map');
+
+var _map2 = _interopRequireDefault(_map);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Sorts a list by the results of running each `coll` value through an async
+ * `iteratee`.
+ *
+ * @name sortBy
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {Function} iteratee - A function to apply to each item in `coll`.
+ * The iteratee is passed a `callback(err, sortValue)` which must be called once
+ * it has completed with an error (which can be `null`) and a value to use as
+ * the sort criteria. Invoked with (item, callback).
+ * @param {Function} callback - A callback which is called after all the
+ * `iteratee` functions have finished, or an error occurs. Results is the items
+ * from the original `coll` sorted by the values returned by the `iteratee`
+ * calls. Invoked with (err, results).
+ * @example
+ *
+ * async.sortBy(['file1','file2','file3'], function(file, callback) {
+ * fs.stat(file, function(err, stats) {
+ * callback(err, stats.mtime);
+ * });
+ * }, function(err, results) {
+ * // results is now the original array of files sorted by
+ * // modified date
+ * });
+ *
+ * // By modifying the callback parameter the
+ * // sorting order can be influenced:
+ *
+ * // ascending order
+ * async.sortBy([1,9,3,5], function(x, callback) {
+ * callback(null, x);
+ * }, function(err,result) {
+ * // result callback
+ * });
+ *
+ * // descending order
+ * async.sortBy([1,9,3,5], function(x, callback) {
+ * callback(null, x*-1); //<- x*-1 instead of x, turns the order around
+ * }, function(err,result) {
+ * // result callback
+ * });
+ */
+function sortBy(coll, iteratee, callback) {
+ (0, _map2.default)(coll, function (x, callback) {
+ iteratee(x, function (err, criteria) {
+ if (err) return callback(err);
+ callback(null, { value: x, criteria: criteria });
+ });
+ }, function (err, results) {
+ if (err) return callback(err);
+ callback(null, (0, _arrayMap2.default)(results.sort(comparator), (0, _baseProperty2.default)('value')));
+ });
+
+ function comparator(left, right) {
+ var a = left.criteria,
+ b = right.criteria;
+ return a < b ? -1 : a > b ? 1 : 0;
+ }
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/timeout.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/timeout.js
new file mode 100644
index 0000000..81a5b7a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/timeout.js
@@ -0,0 +1,85 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = timeout;
+
+var _initialParams = require('./internal/initialParams');
+
+var _initialParams2 = _interopRequireDefault(_initialParams);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Sets a time limit on an asynchronous function. If the function does not call
+ * its callback within the specified milliseconds, it will be called with a
+ * timeout error. The code property for the error object will be `'ETIMEDOUT'`.
+ *
+ * @name timeout
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @category Util
+ * @param {Function} asyncFn - The asynchronous function you want to set the
+ * time limit.
+ * @param {number} milliseconds - The specified time limit.
+ * @param {*} [info] - Any variable you want attached (`string`, `object`, etc)
+ * to timeout Error for more information..
+ * @returns {Function} Returns a wrapped function that can be used with any of
+ * the control flow functions. Invoke this function with the same
+ * parameters as you would `asyncFunc`.
+ * @example
+ *
+ * function myFunction(foo, callback) {
+ * doAsyncTask(foo, function(err, data) {
+ * // handle errors
+ * if (err) return callback(err);
+ *
+ * // do some stuff ...
+ *
+ * // return processed data
+ * return callback(null, data);
+ * });
+ * }
+ *
+ * var wrapped = async.timeout(myFunction, 1000);
+ *
+ * // call `wrapped` as you would `myFunction`
+ * wrapped({ bar: 'bar' }, function(err, data) {
+ * // if `myFunction` takes < 1000 ms to execute, `err`
+ * // and `data` will have their expected values
+ *
+ * // else `err` will be an Error with the code 'ETIMEDOUT'
+ * });
+ */
+function timeout(asyncFn, milliseconds, info) {
+ var originalCallback, timer;
+ var timedOut = false;
+
+ function injectedCallback() {
+ if (!timedOut) {
+ originalCallback.apply(null, arguments);
+ clearTimeout(timer);
+ }
+ }
+
+ function timeoutCallback() {
+ var name = asyncFn.name || 'anonymous';
+ var error = new Error('Callback function "' + name + '" timed out.');
+ error.code = 'ETIMEDOUT';
+ if (info) {
+ error.info = info;
+ }
+ timedOut = true;
+ originalCallback(error);
+ }
+
+ return (0, _initialParams2.default)(function (args, origCallback) {
+ originalCallback = origCallback;
+ // setup timer and call original function
+ timer = setTimeout(timeoutCallback, milliseconds);
+ asyncFn.apply(null, args.concat(injectedCallback));
+ });
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/times.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/times.js
new file mode 100644
index 0000000..fad418f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/times.js
@@ -0,0 +1,50 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _timesLimit = require('./timesLimit');
+
+var _timesLimit2 = _interopRequireDefault(_timesLimit);
+
+var _doLimit = require('./internal/doLimit');
+
+var _doLimit2 = _interopRequireDefault(_doLimit);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Calls the `iteratee` function `n` times, and accumulates results in the same
+ * manner you would use with [map]{@link module:Collections.map}.
+ *
+ * @name times
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.map]{@link module:Collections.map}
+ * @category Control Flow
+ * @param {number} n - The number of times to run the function.
+ * @param {Function} iteratee - The function to call `n` times. Invoked with the
+ * iteration index and a callback (n, next).
+ * @param {Function} callback - see {@link module:Collections.map}.
+ * @example
+ *
+ * // Pretend this is some complicated async factory
+ * var createUser = function(id, callback) {
+ * callback(null, {
+ * id: 'user' + id
+ * });
+ * };
+ *
+ * // generate 5 users
+ * async.times(5, function(n, next) {
+ * createUser(n, function(err, user) {
+ * next(err, user);
+ * });
+ * }, function(err, users) {
+ * // we should now have 5 users
+ * });
+ */
+exports.default = (0, _doLimit2.default)(_timesLimit2.default, Infinity);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/timesLimit.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/timesLimit.js
new file mode 100644
index 0000000..d38e531
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/timesLimit.js
@@ -0,0 +1,37 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = timeLimit;
+
+var _mapLimit = require('./mapLimit');
+
+var _mapLimit2 = _interopRequireDefault(_mapLimit);
+
+var _baseRange = require('lodash/_baseRange');
+
+var _baseRange2 = _interopRequireDefault(_baseRange);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [times]{@link module:ControlFlow.times} but runs a maximum of `limit` async operations at a
+ * time.
+ *
+ * @name timesLimit
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.times]{@link module:ControlFlow.times}
+ * @category Control Flow
+ * @param {number} count - The number of times to run the function.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {Function} iteratee - The function to call `n` times. Invoked with the
+ * iteration index and a callback (n, next).
+ * @param {Function} callback - see [async.map]{@link module:Collections.map}.
+ */
+function timeLimit(count, limit, iteratee, callback) {
+ (0, _mapLimit2.default)((0, _baseRange2.default)(0, count, 1), limit, iteratee, callback);
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/timesSeries.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/timesSeries.js
new file mode 100644
index 0000000..55e112a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/timesSeries.js
@@ -0,0 +1,32 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _timesLimit = require('./timesLimit');
+
+var _timesLimit2 = _interopRequireDefault(_timesLimit);
+
+var _doLimit = require('./internal/doLimit');
+
+var _doLimit2 = _interopRequireDefault(_doLimit);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time.
+ *
+ * @name timesSeries
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.times]{@link module:ControlFlow.times}
+ * @category Control Flow
+ * @param {number} n - The number of times to run the function.
+ * @param {Function} iteratee - The function to call `n` times. Invoked with the
+ * iteration index and a callback (n, next).
+ * @param {Function} callback - see {@link module:Collections.map}.
+ */
+exports.default = (0, _doLimit2.default)(_timesLimit2.default, 1);
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/transform.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/transform.js
new file mode 100644
index 0000000..e80d1ee
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/transform.js
@@ -0,0 +1,85 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = transform;
+
+var _isArray = require('lodash/isArray');
+
+var _isArray2 = _interopRequireDefault(_isArray);
+
+var _noop = require('lodash/noop');
+
+var _noop2 = _interopRequireDefault(_noop);
+
+var _eachOf = require('./eachOf');
+
+var _eachOf2 = _interopRequireDefault(_eachOf);
+
+var _once = require('./internal/once');
+
+var _once2 = _interopRequireDefault(_once);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * A relative of `reduce`. Takes an Object or Array, and iterates over each
+ * element in series, each step potentially mutating an `accumulator` value.
+ * The type of the accumulator defaults to the type of collection passed in.
+ *
+ * @name transform
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @category Collection
+ * @param {Array|Iterable|Object} coll - A collection to iterate over.
+ * @param {*} [accumulator] - The initial state of the transform. If omitted,
+ * it will default to an empty Object or Array, depending on the type of `coll`
+ * @param {Function} iteratee - A function applied to each item in the
+ * collection that potentially modifies the accumulator. The `iteratee` is
+ * passed a `callback(err)` which accepts an optional error as its first
+ * argument. If an error is passed to the callback, the transform is stopped
+ * and the main `callback` is immediately called with the error.
+ * Invoked with (accumulator, item, key, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished. Result is the transformed accumulator.
+ * Invoked with (err, result).
+ * @example
+ *
+ * async.transform([1,2,3], function(acc, item, index, callback) {
+ * // pointless async:
+ * process.nextTick(function() {
+ * acc.push(item * 2)
+ * callback(null)
+ * });
+ * }, function(err, result) {
+ * // result is now equal to [2, 4, 6]
+ * });
+ *
+ * @example
+ *
+ * async.transform({a: 1, b: 2, c: 3}, function (obj, val, key, callback) {
+ * setImmediate(function () {
+ * obj[key] = val * 2;
+ * callback();
+ * })
+ * }, function (err, result) {
+ * // result is equal to {a: 2, b: 4, c: 6}
+ * })
+ */
+function transform(coll, accumulator, iteratee, callback) {
+ if (arguments.length === 3) {
+ callback = iteratee;
+ iteratee = accumulator;
+ accumulator = (0, _isArray2.default)(coll) ? [] : {};
+ }
+ callback = (0, _once2.default)(callback || _noop2.default);
+
+ (0, _eachOf2.default)(coll, function (v, k, cb) {
+ iteratee(accumulator, v, k, cb);
+ }, function (err) {
+ callback(err, accumulator);
+ });
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/unmemoize.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/unmemoize.js
new file mode 100644
index 0000000..dbe7931
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/unmemoize.js
@@ -0,0 +1,25 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = unmemoize;
+/**
+ * Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original,
+ * unmemoized form. Handy for testing.
+ *
+ * @name unmemoize
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @see [async.memoize]{@link module:Utils.memoize}
+ * @category Util
+ * @param {Function} fn - the memoized function
+ * @returns {Function} a function that calls the original unmemoized function
+ */
+function unmemoize(fn) {
+ return function () {
+ return (fn.unmemoized || fn).apply(null, arguments);
+ };
+}
+module.exports = exports["default"]; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/until.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/until.js
new file mode 100644
index 0000000..d895867
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/until.js
@@ -0,0 +1,42 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = until;
+
+var _whilst = require('./whilst');
+
+var _whilst2 = _interopRequireDefault(_whilst);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Repeatedly call `fn` until `test` returns `true`. Calls `callback` when
+ * stopped, or an error occurs. `callback` will be passed an error and any
+ * arguments passed to the final `fn`'s callback.
+ *
+ * The inverse of [whilst]{@link module:ControlFlow.whilst}.
+ *
+ * @name until
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.whilst]{@link module:ControlFlow.whilst}
+ * @category Control Flow
+ * @param {Function} test - synchronous truth test to perform before each
+ * execution of `fn`. Invoked with ().
+ * @param {Function} fn - A function which is called each time `test` fails.
+ * The function is passed a `callback(err)`, which must be called once it has
+ * completed with an optional `err` argument. Invoked with (callback).
+ * @param {Function} [callback] - A callback which is called after the test
+ * function has passed and repeated execution of `fn` has stopped. `callback`
+ * will be passed an error and any arguments passed to the final `fn`'s
+ * callback. Invoked with (err, [results]);
+ */
+function until(test, fn, callback) {
+ (0, _whilst2.default)(function () {
+ return !test.apply(this, arguments);
+ }, fn, callback);
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/waterfall.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/waterfall.js
new file mode 100644
index 0000000..07611f4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/waterfall.js
@@ -0,0 +1,114 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+exports.default = function (tasks, callback) {
+ callback = (0, _once2.default)(callback || _noop2.default);
+ if (!(0, _isArray2.default)(tasks)) return callback(new Error('First argument to waterfall must be an array of functions'));
+ if (!tasks.length) return callback();
+ var taskIndex = 0;
+
+ function nextTask(args) {
+ if (taskIndex === tasks.length) {
+ return callback.apply(null, [null].concat(args));
+ }
+
+ var taskCallback = (0, _onlyOnce2.default)((0, _baseRest2.default)(function (err, args) {
+ if (err) {
+ return callback.apply(null, [err].concat(args));
+ }
+ nextTask(args);
+ }));
+
+ args.push(taskCallback);
+
+ var task = tasks[taskIndex++];
+ task.apply(null, args);
+ }
+
+ nextTask([]);
+};
+
+var _isArray = require('lodash/isArray');
+
+var _isArray2 = _interopRequireDefault(_isArray);
+
+var _noop = require('lodash/noop');
+
+var _noop2 = _interopRequireDefault(_noop);
+
+var _once = require('./internal/once');
+
+var _once2 = _interopRequireDefault(_once);
+
+var _baseRest = require('lodash/_baseRest');
+
+var _baseRest2 = _interopRequireDefault(_baseRest);
+
+var _onlyOnce = require('./internal/onlyOnce');
+
+var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+module.exports = exports['default'];
+
+/**
+ * Runs the `tasks` array of functions in series, each passing their results to
+ * the next in the array. However, if any of the `tasks` pass an error to their
+ * own callback, the next function is not executed, and the main `callback` is
+ * immediately called with the error.
+ *
+ * @name waterfall
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {Array} tasks - An array of functions to run, each function is passed
+ * a `callback(err, result1, result2, ...)` it must call on completion. The
+ * first argument is an error (which can be `null`) and any further arguments
+ * will be passed as arguments in order to the next task.
+ * @param {Function} [callback] - An optional callback to run once all the
+ * functions have completed. This will be passed the results of the last task's
+ * callback. Invoked with (err, [results]).
+ * @returns undefined
+ * @example
+ *
+ * async.waterfall([
+ * function(callback) {
+ * callback(null, 'one', 'two');
+ * },
+ * function(arg1, arg2, callback) {
+ * // arg1 now equals 'one' and arg2 now equals 'two'
+ * callback(null, 'three');
+ * },
+ * function(arg1, callback) {
+ * // arg1 now equals 'three'
+ * callback(null, 'done');
+ * }
+ * ], function (err, result) {
+ * // result now equals 'done'
+ * });
+ *
+ * // Or, with named functions:
+ * async.waterfall([
+ * myFirstFunction,
+ * mySecondFunction,
+ * myLastFunction,
+ * ], function (err, result) {
+ * // result now equals 'done'
+ * });
+ * function myFirstFunction(callback) {
+ * callback(null, 'one', 'two');
+ * }
+ * function mySecondFunction(arg1, arg2, callback) {
+ * // arg1 now equals 'one' and arg2 now equals 'two'
+ * callback(null, 'three');
+ * }
+ * function myLastFunction(arg1, callback) {
+ * // arg1 now equals 'three'
+ * callback(null, 'done');
+ * }
+ */ \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/whilst.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/whilst.js
new file mode 100644
index 0000000..9145e2e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/async/whilst.js
@@ -0,0 +1,67 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = whilst;
+
+var _noop = require('lodash/noop');
+
+var _noop2 = _interopRequireDefault(_noop);
+
+var _baseRest = require('lodash/_baseRest');
+
+var _baseRest2 = _interopRequireDefault(_baseRest);
+
+var _onlyOnce = require('./internal/onlyOnce');
+
+var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when
+ * stopped, or an error occurs.
+ *
+ * @name whilst
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {Function} test - synchronous truth test to perform before each
+ * execution of `iteratee`. Invoked with ().
+ * @param {Function} iteratee - A function which is called each time `test` passes.
+ * The function is passed a `callback(err)`, which must be called once it has
+ * completed with an optional `err` argument. Invoked with (callback).
+ * @param {Function} [callback] - A callback which is called after the test
+ * function has failed and repeated execution of `iteratee` has stopped. `callback`
+ * will be passed an error and any arguments passed to the final `iteratee`'s
+ * callback. Invoked with (err, [results]);
+ * @returns undefined
+ * @example
+ *
+ * var count = 0;
+ * async.whilst(
+ * function() { return count < 5; },
+ * function(callback) {
+ * count++;
+ * setTimeout(function() {
+ * callback(null, count);
+ * }, 1000);
+ * },
+ * function (err, n) {
+ * // 5 seconds have passed, n = 5
+ * }
+ * );
+ */
+function whilst(test, iteratee, callback) {
+ callback = (0, _onlyOnce2.default)(callback || _noop2.default);
+ if (!test()) return callback(null);
+ var next = (0, _baseRest2.default)(function (err, args) {
+ if (err) return callback(err);
+ if (test()) return iteratee(next);
+ callback.apply(null, [null].concat(args));
+ });
+ iteratee(next);
+}
+module.exports = exports['default']; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/HISTORY.md
new file mode 100644
index 0000000..59e2084
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/HISTORY.md
@@ -0,0 +1,179 @@
+0.5.7 2016-11-18
+-----------------
+- NODE-848 BSON Regex flags must be alphabetically ordered.
+
+0.5.6 2016-10-19
+-----------------
+- NODE-833, Detects cyclic dependencies in documents and throws error if one is found.
+- Fix(deserializer): corrected the check for (size + index) comparison… (Issue #195, https://github.com/JoelParke).
+
+0.5.5 2016-09-15
+-----------------
+- Added DBPointer up conversion to DBRef
+
+0.5.4 2016-08-23
+-----------------
+- Added promoteValues flag (default to true) allowing user to specify if deserialization should be into wrapper classes only.
+
+0.5.3 2016-07-11
+-----------------
+- Throw error if ObjectId is not a string or a buffer.
+
+0.5.2 2016-07-11
+-----------------
+- All values encoded big-endian style for ObjectId.
+
+0.5.1 2016-07-11
+-----------------
+- Fixed encoding/decoding issue in ObjectId timestamp generation.
+- Removed BinaryParser dependency from the serializer/deserializer.
+
+0.5.0 2016-07-05
+-----------------
+- Added Decimal128 type and extended test suite to include entire bson corpus.
+
+0.4.23 2016-04-08
+-----------------
+- Allow for proper detection of ObjectId or objects that look like ObjectId, improving compatibility across third party libraries.
+- Remove one package from dependency due to having been pulled from NPM.
+
+0.4.22 2016-03-04
+-----------------
+- Fix "TypeError: data.copy is not a function" in Electron (Issue #170, https://github.com/kangas).
+- Fixed issue with undefined type on deserializing.
+
+0.4.21 2016-01-12
+-----------------
+- Minor optimizations to avoid non needed object creation.
+
+0.4.20 2015-10-15
+-----------------
+- Added bower file to repository.
+- Fixed browser pid sometimes set greater than 0xFFFF on browsers (Issue #155, https://github.com/rahatarmanahmed)
+
+0.4.19 2015-10-15
+-----------------
+- Remove all support for bson-ext.
+
+0.4.18 2015-10-15
+-----------------
+- ObjectID equality check should return boolean instead of throwing exception for invalid oid string #139
+- add option for deserializing binary into Buffer object #116
+
+0.4.17 2015-10-15
+-----------------
+- Validate regexp string for null bytes and throw if there is one.
+
+0.4.16 2015-10-07
+-----------------
+- Fixed issue with return statement in Map.js.
+
+0.4.15 2015-10-06
+-----------------
+- Exposed Map correctly via index.js file.
+
+0.4.14 2015-10-06
+-----------------
+- Exposed Map correctly via bson.js file.
+
+0.4.13 2015-10-06
+-----------------
+- Added ES6 Map type serialization as well as a polyfill for ES5.
+
+0.4.12 2015-09-18
+-----------------
+- Made ignore undefined an optional parameter.
+
+0.4.11 2015-08-06
+-----------------
+- Minor fix for invalid key checking.
+
+0.4.10 2015-08-06
+-----------------
+- NODE-38 Added new BSONRegExp type to allow direct serialization to MongoDB type.
+- Some performance improvements by in lining code.
+
+0.4.9 2015-08-06
+----------------
+- Undefined fields are omitted from serialization in objects.
+
+0.4.8 2015-07-14
+----------------
+- Fixed size validation to ensure we can deserialize from dumped files.
+
+0.4.7 2015-06-26
+----------------
+- Added ability to instruct deserializer to return raw BSON buffers for named array fields.
+- Minor deserialization optimization by moving inlined function out.
+
+0.4.6 2015-06-17
+----------------
+- Fixed serializeWithBufferAndIndex bug.
+
+0.4.5 2015-06-17
+----------------
+- Removed any references to the shared buffer to avoid non GC collectible bson instances.
+
+0.4.4 2015-06-17
+----------------
+- Fixed rethrowing of error when not RangeError.
+
+0.4.3 2015-06-17
+----------------
+- Start buffer at 64K and double as needed, meaning we keep a low memory profile until needed.
+
+0.4.2 2015-06-16
+----------------
+- More fixes for corrupt Bson
+
+0.4.1 2015-06-16
+----------------
+- More fixes for corrupt Bson
+
+0.4.0 2015-06-16
+----------------
+- New JS serializer serializing into a single buffer then copying out the new buffer. Performance is similar to current C++ parser.
+- Removed bson-ext extension dependency for now.
+
+0.3.2 2015-03-27
+----------------
+- Removed node-gyp from install script in package.json.
+
+0.3.1 2015-03-27
+----------------
+- Return pure js version on native() call if failed to initialize.
+
+0.3.0 2015-03-26
+----------------
+- Pulled out all C++ code into bson-ext and made it an optional dependency.
+
+0.2.21 2015-03-21
+-----------------
+- Updated Nan to 1.7.0 to support io.js and node 0.12.0
+
+0.2.19 2015-02-16
+-----------------
+- Updated Nan to 1.6.2 to support io.js and node 0.12.0
+
+0.2.18 2015-01-20
+-----------------
+- Updated Nan to 1.5.1 to support io.js
+
+0.2.16 2014-12-17
+-----------------
+- Made pid cycle on 0xffff to avoid weird overflows on creation of ObjectID's
+
+0.2.12 2014-08-24
+-----------------
+- Fixes for fortify review of c++ extension
+- toBSON correctly allows returns of non objects
+
+0.2.3 2013-10-01
+----------------
+- Drying of ObjectId code for generation of id (Issue #54, https://github.com/moredip)
+- Fixed issue where corrupt CString's could cause endless loop
+- Support for Node 0.11.X > (Issue #49, https://github.com/kkoopa)
+
+0.1.4 2012-09-25
+----------------
+- Added precompiled c++ native extensions for win32 ia32 and x64
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/LICENSE.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/LICENSE.md
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/LICENSE.md
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/README.md
new file mode 100644
index 0000000..749275d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/README.md
@@ -0,0 +1,95 @@
+# BSON parser
+
+If you don't yet know what BSON actually is, read [the spec](http://bsonspec.org).
+
+This package can be used to serialize JSON documents into the BSON format or the other way around. If you want to use it within the browser, give [browserify](https://github.com/substack/node-browserify) a try (it will help you add this package to your bundle). The current build is located in the `browser_build/bson.js` file.
+
+A simple example of how to use BSON in the browser:
+
+```html
+<script src="./browser_build/bson.js"></script>
+
+<script>
+ function start() {
+ var BSON = bson().BSON
+ var Long = bson().Long
+
+ var doc = { long: Long.fromNumber(100) }
+
+ // Serialize a document
+ var data = BSON.serialize(doc, false, true, false)
+ // De serialize it again
+ var doc_2 = BSON.deserialize(data)
+ }
+</script>
+```
+
+A simple example of how to use BSON in `node.js`:
+
+```js
+var bson = require('bson')
+var BSON = new bson.BSONPure.BSON()
+var Long = bson.BSONPure.Long
+
+var doc = { long: Long.fromNumber(100) }
+
+// Serialize a document
+var data = BSON.serialize(doc, false, true, false)
+console.log('data:', data)
+
+// Deserialize the resulting Buffer
+var doc_2 = BSON.deserialize(data)
+console.log('doc_2:', doc_2)
+```
+
+## API
+
+The API consists of two simple methods to serialize/deserialize objects to/from BSON format:
+=======
+## Installation
+
+`npm install bson`
+
+## API
+
+### BSON serialization and deserialiation
+
+**`new bson.BSONPure.BSON()`** - Creates a new BSON seralizer/deserializer you can use to serialize and deserialize BSON.
+
+ * BSON.serialize(object, checkKeys, asBuffer, serializeFunctions)
+ * @param {Object} object the Javascript object to serialize.
+ * @param {Boolean} checkKeys the serializer will check if keys are valid.
+ * @param {Boolean} asBuffer return the serialized object as a Buffer object **(ignore)**.
+ * @param {Boolean} serializeFunctions serialize the javascript functions **(default:false)**
+ * @return {TypedArray/Array} returns a TypedArray or Array depending on what your browser supports
+
+ * BSON.deserialize(buffer, options, isArray)
+ * Options
+ * **evalFunctions** {Boolean, default:false}, evaluate functions in the BSON document scoped to the object deserialized.
+ * **cacheFunctions** {Boolean, default:false}, cache evaluated functions for reuse.
+ * **cacheFunctionsCrc32** {Boolean, default:false}, use a crc32 code for caching, otherwise use the string of the function.
+ * **promoteBuffers** {Boolean, default:false}, deserialize Binary data directly into node.js Buffer object.
+ * @param {TypedArray/Array} a TypedArray/Array containing the BSON data
+ * @param {Object} [options] additional options used for the deserialization.
+ * @param {Boolean} [isArray] ignore used for recursive parsing.
+ * @return {Object} returns the deserialized Javascript Object.
+
+### ObjectId
+
+**`bson.ObjectId.isValid(id)`** - Returns true if `id` is a valid number or hexadecimal string representing an ObjectId.
+**`bson.ObjectId.createFromHexString(hexString)`** - Returns the ObjectId the `hexString` represents.
+**`bson.ObjectId.createFromTime(time)`** - Returns an ObjectId containing the passed time.
+* `time` - A Unix timestamp (number of seconds since the epoch).
+
+**`var objectId = new bson.ObjectId(id)`** - Creates a new `ObjectId`.
+* `id` - Must either be a 24-character hex string or a 12 byte binary string.
+
+**`objectId.toJSON()`**
+**`objectId.toString()`**
+**`objectId.toHexString()`** - Returns a hexadecimal string representation of the ObjectId.
+
+**`objectId.equals(otherObjectId)`** - Returns true if the ObjectIds are the same, false otherwise.
+
+**`objectId.getTimestamp()`** - Returns a `Date` object containing the time the objectId was created for.
+
+**`objectId.getTimestamp()`** - Returns a `Date` object containing the time the objectId contains.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/alternate_parsers/bson.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/alternate_parsers/bson.js
new file mode 100644
index 0000000..555aa79
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/alternate_parsers/bson.js
@@ -0,0 +1,1574 @@
+var Long = require('../lib/bson/long').Long
+ , Double = require('../lib/bson/double').Double
+ , Timestamp = require('../lib/bson/timestamp').Timestamp
+ , ObjectID = require('../lib/bson/objectid').ObjectID
+ , Symbol = require('../lib/bson/symbol').Symbol
+ , Code = require('../lib/bson/code').Code
+ , MinKey = require('../lib/bson/min_key').MinKey
+ , MaxKey = require('../lib/bson/max_key').MaxKey
+ , DBRef = require('../lib/bson/db_ref').DBRef
+ , Binary = require('../lib/bson/binary').Binary
+ , BinaryParser = require('../lib/bson/binary_parser').BinaryParser
+ , writeIEEE754 = require('../lib/bson/float_parser').writeIEEE754
+ , readIEEE754 = require('../lib/bson/float_parser').readIEEE754
+
+// To ensure that 0.4 of node works correctly
+var isDate = function isDate(d) {
+ return typeof d === 'object' && Object.prototype.toString.call(d) === '[object Date]';
+}
+
+/**
+ * Create a new BSON instance
+ *
+ * @class
+ * @return {BSON} instance of BSON Parser.
+ */
+function BSON () {};
+
+/**
+ * @ignore
+ * @api private
+ */
+// BSON MAX VALUES
+BSON.BSON_INT32_MAX = 0x7FFFFFFF;
+BSON.BSON_INT32_MIN = -0x80000000;
+
+BSON.BSON_INT64_MAX = Math.pow(2, 63) - 1;
+BSON.BSON_INT64_MIN = -Math.pow(2, 63);
+
+// JS MAX PRECISE VALUES
+BSON.JS_INT_MAX = 0x20000000000000; // Any integer up to 2^53 can be precisely represented by a double.
+BSON.JS_INT_MIN = -0x20000000000000; // Any integer down to -2^53 can be precisely represented by a double.
+
+// Internal long versions
+var JS_INT_MAX_LONG = Long.fromNumber(0x20000000000000); // Any integer up to 2^53 can be precisely represented by a double.
+var JS_INT_MIN_LONG = Long.fromNumber(-0x20000000000000); // Any integer down to -2^53 can be precisely represented by a double.
+
+/**
+ * Number BSON Type
+ *
+ * @classconstant BSON_DATA_NUMBER
+ **/
+BSON.BSON_DATA_NUMBER = 1;
+/**
+ * String BSON Type
+ *
+ * @classconstant BSON_DATA_STRING
+ **/
+BSON.BSON_DATA_STRING = 2;
+/**
+ * Object BSON Type
+ *
+ * @classconstant BSON_DATA_OBJECT
+ **/
+BSON.BSON_DATA_OBJECT = 3;
+/**
+ * Array BSON Type
+ *
+ * @classconstant BSON_DATA_ARRAY
+ **/
+BSON.BSON_DATA_ARRAY = 4;
+/**
+ * Binary BSON Type
+ *
+ * @classconstant BSON_DATA_BINARY
+ **/
+BSON.BSON_DATA_BINARY = 5;
+/**
+ * Binary BSON Type
+ *
+ * @classconstant BSON_DATA_UNDEFINED
+ **/
+BSON.BSON_DATA_UNDEFINED = 6;
+/**
+ * ObjectID BSON Type
+ *
+ * @classconstant BSON_DATA_OID
+ **/
+BSON.BSON_DATA_OID = 7;
+/**
+ * Boolean BSON Type
+ *
+ * @classconstant BSON_DATA_BOOLEAN
+ **/
+BSON.BSON_DATA_BOOLEAN = 8;
+/**
+ * Date BSON Type
+ *
+ * @classconstant BSON_DATA_DATE
+ **/
+BSON.BSON_DATA_DATE = 9;
+/**
+ * null BSON Type
+ *
+ * @classconstant BSON_DATA_NULL
+ **/
+BSON.BSON_DATA_NULL = 10;
+/**
+ * RegExp BSON Type
+ *
+ * @classconstant BSON_DATA_REGEXP
+ **/
+BSON.BSON_DATA_REGEXP = 11;
+/**
+ * Code BSON Type
+ *
+ * @classconstant BSON_DATA_CODE
+ **/
+BSON.BSON_DATA_CODE = 13;
+/**
+ * Symbol BSON Type
+ *
+ * @classconstant BSON_DATA_SYMBOL
+ **/
+BSON.BSON_DATA_SYMBOL = 14;
+/**
+ * Code with Scope BSON Type
+ *
+ * @classconstant BSON_DATA_CODE_W_SCOPE
+ **/
+BSON.BSON_DATA_CODE_W_SCOPE = 15;
+/**
+ * 32 bit Integer BSON Type
+ *
+ * @classconstant BSON_DATA_INT
+ **/
+BSON.BSON_DATA_INT = 16;
+/**
+ * Timestamp BSON Type
+ *
+ * @classconstant BSON_DATA_TIMESTAMP
+ **/
+BSON.BSON_DATA_TIMESTAMP = 17;
+/**
+ * Long BSON Type
+ *
+ * @classconstant BSON_DATA_LONG
+ **/
+BSON.BSON_DATA_LONG = 18;
+/**
+ * MinKey BSON Type
+ *
+ * @classconstant BSON_DATA_MIN_KEY
+ **/
+BSON.BSON_DATA_MIN_KEY = 0xff;
+/**
+ * MaxKey BSON Type
+ *
+ * @classconstant BSON_DATA_MAX_KEY
+ **/
+BSON.BSON_DATA_MAX_KEY = 0x7f;
+
+/**
+ * Binary Default Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_DEFAULT
+ **/
+BSON.BSON_BINARY_SUBTYPE_DEFAULT = 0;
+/**
+ * Binary Function Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_FUNCTION
+ **/
+BSON.BSON_BINARY_SUBTYPE_FUNCTION = 1;
+/**
+ * Binary Byte Array Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_BYTE_ARRAY
+ **/
+BSON.BSON_BINARY_SUBTYPE_BYTE_ARRAY = 2;
+/**
+ * Binary UUID Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_UUID
+ **/
+BSON.BSON_BINARY_SUBTYPE_UUID = 3;
+/**
+ * Binary MD5 Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_MD5
+ **/
+BSON.BSON_BINARY_SUBTYPE_MD5 = 4;
+/**
+ * Binary User Defined Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_USER_DEFINED
+ **/
+BSON.BSON_BINARY_SUBTYPE_USER_DEFINED = 128;
+
+/**
+ * Calculate the bson size for a passed in Javascript object.
+ *
+ * @param {Object} object the Javascript object to calculate the BSON byte size for.
+ * @param {Boolean} [serializeFunctions] serialize all functions in the object **(default:false)**.
+ * @return {Number} returns the number of bytes the BSON object will take up.
+ * @api public
+ */
+BSON.calculateObjectSize = function calculateObjectSize(object, serializeFunctions) {
+ var totalLength = (4 + 1);
+
+ if(Array.isArray(object)) {
+ for(var i = 0; i < object.length; i++) {
+ totalLength += calculateElement(i.toString(), object[i], serializeFunctions)
+ }
+ } else {
+ // If we have toBSON defined, override the current object
+ if(object.toBSON) {
+ object = object.toBSON();
+ }
+
+ // Calculate size
+ for(var key in object) {
+ totalLength += calculateElement(key, object[key], serializeFunctions)
+ }
+ }
+
+ return totalLength;
+}
+
+/**
+ * @ignore
+ * @api private
+ */
+function calculateElement(name, value, serializeFunctions) {
+ var isBuffer = typeof Buffer !== 'undefined';
+
+ // If we have toBSON defined, override the current object
+ if(value && value.toBSON){
+ value = value.toBSON();
+ }
+
+ switch(typeof value) {
+ case 'string':
+ return 1 + (!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1 + 4 + (!isBuffer ? numberOfBytes(value) : Buffer.byteLength(value, 'utf8')) + 1;
+ case 'number':
+ if(Math.floor(value) === value && value >= BSON.JS_INT_MIN && value <= BSON.JS_INT_MAX) {
+ if(value >= BSON.BSON_INT32_MIN && value <= BSON.BSON_INT32_MAX) { // 32 bit
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (4 + 1);
+ } else {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (8 + 1);
+ }
+ } else { // 64 bit
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (8 + 1);
+ }
+ case 'undefined':
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (1);
+ case 'boolean':
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (1 + 1);
+ case 'object':
+ if(value == null || value instanceof MinKey || value instanceof MaxKey || value['_bsontype'] == 'MinKey' || value['_bsontype'] == 'MaxKey') {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (1);
+ } else if(value instanceof ObjectID || value['_bsontype'] == 'ObjectID') {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (12 + 1);
+ } else if(value instanceof Date || isDate(value)) {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (8 + 1);
+ } else if(typeof Buffer !== 'undefined' && Buffer.isBuffer(value)) {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (1 + 4 + 1) + value.length;
+ } else if(value instanceof Long || value instanceof Double || value instanceof Timestamp
+ || value['_bsontype'] == 'Long' || value['_bsontype'] == 'Double' || value['_bsontype'] == 'Timestamp') {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (8 + 1);
+ } else if(value instanceof Code || value['_bsontype'] == 'Code') {
+ // Calculate size depending on the availability of a scope
+ if(value.scope != null && Object.keys(value.scope).length > 0) {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + 1 + 4 + 4 + (!isBuffer ? numberOfBytes(value.code.toString()) : Buffer.byteLength(value.code.toString(), 'utf8')) + 1 + BSON.calculateObjectSize(value.scope, serializeFunctions);
+ } else {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + 1 + 4 + (!isBuffer ? numberOfBytes(value.code.toString()) : Buffer.byteLength(value.code.toString(), 'utf8')) + 1;
+ }
+ } else if(value instanceof Binary || value['_bsontype'] == 'Binary') {
+ // Check what kind of subtype we have
+ if(value.sub_type == Binary.SUBTYPE_BYTE_ARRAY) {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (value.position + 1 + 4 + 1 + 4);
+ } else {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (value.position + 1 + 4 + 1);
+ }
+ } else if(value instanceof Symbol || value['_bsontype'] == 'Symbol') {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + ((!isBuffer ? numberOfBytes(value.value) : Buffer.byteLength(value.value, 'utf8')) + 4 + 1 + 1);
+ } else if(value instanceof DBRef || value['_bsontype'] == 'DBRef') {
+ // Set up correct object for serialization
+ var ordered_values = {
+ '$ref': value.namespace
+ , '$id' : value.oid
+ };
+
+ // Add db reference if it exists
+ if(null != value.db) {
+ ordered_values['$db'] = value.db;
+ }
+
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + 1 + BSON.calculateObjectSize(ordered_values, serializeFunctions);
+ } else if(value instanceof RegExp || Object.prototype.toString.call(value) === '[object RegExp]') {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + 1 + (!isBuffer ? numberOfBytes(value.source) : Buffer.byteLength(value.source, 'utf8')) + 1
+ + (value.global ? 1 : 0) + (value.ignoreCase ? 1 : 0) + (value.multiline ? 1 : 0) + 1
+ } else {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + BSON.calculateObjectSize(value, serializeFunctions) + 1;
+ }
+ case 'function':
+ // WTF for 0.4.X where typeof /someregexp/ === 'function'
+ if(value instanceof RegExp || Object.prototype.toString.call(value) === '[object RegExp]' || String.call(value) == '[object RegExp]') {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + 1 + (!isBuffer ? numberOfBytes(value.source) : Buffer.byteLength(value.source, 'utf8')) + 1
+ + (value.global ? 1 : 0) + (value.ignoreCase ? 1 : 0) + (value.multiline ? 1 : 0) + 1
+ } else {
+ if(serializeFunctions && value.scope != null && Object.keys(value.scope).length > 0) {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + 1 + 4 + 4 + (!isBuffer ? numberOfBytes(value.toString()) : Buffer.byteLength(value.toString(), 'utf8')) + 1 + BSON.calculateObjectSize(value.scope, serializeFunctions);
+ } else if(serializeFunctions) {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + 1 + 4 + (!isBuffer ? numberOfBytes(value.toString()) : Buffer.byteLength(value.toString(), 'utf8')) + 1;
+ }
+ }
+ }
+
+ return 0;
+}
+
+/**
+ * Serialize a Javascript object using a predefined Buffer and index into the buffer, useful when pre-allocating the space for serialization.
+ *
+ * @param {Object} object the Javascript object to serialize.
+ * @param {Boolean} checkKeys the serializer will check if keys are valid.
+ * @param {Buffer} buffer the Buffer you pre-allocated to store the serialized BSON object.
+ * @param {Number} index the index in the buffer where we wish to start serializing into.
+ * @param {Boolean} serializeFunctions serialize the javascript functions **(default:false)**.
+ * @return {Number} returns the new write index in the Buffer.
+ * @api public
+ */
+BSON.serializeWithBufferAndIndex = function serializeWithBufferAndIndex(object, checkKeys, buffer, index, serializeFunctions) {
+ // Default setting false
+ serializeFunctions = serializeFunctions == null ? false : serializeFunctions;
+ // Write end information (length of the object)
+ var size = buffer.length;
+ // Write the size of the object
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ return serializeObject(object, checkKeys, buffer, index, serializeFunctions) - 1;
+}
+
+/**
+ * @ignore
+ * @api private
+ */
+var serializeObject = function(object, checkKeys, buffer, index, serializeFunctions) {
+ if(object.toBSON) {
+ if(typeof object.toBSON != 'function') throw new Error("toBSON is not a function");
+ object = object.toBSON();
+ if(object != null && typeof object != 'object') throw new Error("toBSON function did not return an object");
+ }
+
+ // Process the object
+ if(Array.isArray(object)) {
+ for(var i = 0; i < object.length; i++) {
+ index = packElement(i.toString(), object[i], checkKeys, buffer, index, serializeFunctions);
+ }
+ } else {
+ // If we have toBSON defined, override the current object
+ if(object.toBSON) {
+ object = object.toBSON();
+ }
+
+ // Serialize the object
+ for(var key in object) {
+ // Check the key and throw error if it's illegal
+ if (key != '$db' && key != '$ref' && key != '$id') {
+ // dollars and dots ok
+ BSON.checkKey(key, !checkKeys);
+ }
+
+ // Pack the element
+ index = packElement(key, object[key], checkKeys, buffer, index, serializeFunctions);
+ }
+ }
+
+ // Write zero
+ buffer[index++] = 0;
+ return index;
+}
+
+var stringToBytes = function(str) {
+ var ch, st, re = [];
+ for (var i = 0; i < str.length; i++ ) {
+ ch = str.charCodeAt(i); // get char
+ st = []; // set up "stack"
+ do {
+ st.push( ch & 0xFF ); // push byte to stack
+ ch = ch >> 8; // shift value down by 1 byte
+ }
+ while ( ch );
+ // add stack contents to result
+ // done because chars have "wrong" endianness
+ re = re.concat( st.reverse() );
+ }
+ // return an array of bytes
+ return re;
+}
+
+var numberOfBytes = function(str) {
+ var ch, st, re = 0;
+ for (var i = 0; i < str.length; i++ ) {
+ ch = str.charCodeAt(i); // get char
+ st = []; // set up "stack"
+ do {
+ st.push( ch & 0xFF ); // push byte to stack
+ ch = ch >> 8; // shift value down by 1 byte
+ }
+ while ( ch );
+ // add stack contents to result
+ // done because chars have "wrong" endianness
+ re = re + st.length;
+ }
+ // return an array of bytes
+ return re;
+}
+
+/**
+ * @ignore
+ * @api private
+ */
+var writeToTypedArray = function(buffer, string, index) {
+ var bytes = stringToBytes(string);
+ for(var i = 0; i < bytes.length; i++) {
+ buffer[index + i] = bytes[i];
+ }
+ return bytes.length;
+}
+
+/**
+ * @ignore
+ * @api private
+ */
+var supportsBuffer = typeof Buffer != 'undefined';
+
+/**
+ * @ignore
+ * @api private
+ */
+var packElement = function(name, value, checkKeys, buffer, index, serializeFunctions) {
+
+ // If we have toBSON defined, override the current object
+ if(value && value.toBSON){
+ value = value.toBSON();
+ }
+
+ var startIndex = index;
+
+ switch(typeof value) {
+ case 'string':
+ // console.log("+++++++++++ index string:: " + index)
+ // Encode String type
+ buffer[index++] = BSON.BSON_DATA_STRING;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+
+ // Calculate size
+ var size = supportsBuffer ? Buffer.byteLength(value) + 1 : numberOfBytes(value) + 1;
+ // console.log("====== key :: " + name + " size ::" + size)
+ // Write the size of the string to buffer
+ buffer[index + 3] = (size >> 24) & 0xff;
+ buffer[index + 2] = (size >> 16) & 0xff;
+ buffer[index + 1] = (size >> 8) & 0xff;
+ buffer[index] = size & 0xff;
+ // Ajust the index
+ index = index + 4;
+ // Write the string
+ supportsBuffer ? buffer.write(value, index, 'utf8') : writeToTypedArray(buffer, value, index);
+ // Update index
+ index = index + size - 1;
+ // Write zero
+ buffer[index++] = 0;
+ // Return index
+ return index;
+ case 'number':
+ // We have an integer value
+ if(Math.floor(value) === value && value >= BSON.JS_INT_MIN && value <= BSON.JS_INT_MAX) {
+ // If the value fits in 32 bits encode as int, if it fits in a double
+ // encode it as a double, otherwise long
+ if(value >= BSON.BSON_INT32_MIN && value <= BSON.BSON_INT32_MAX) {
+ // Set int type 32 bits or less
+ buffer[index++] = BSON.BSON_DATA_INT;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Write the int value
+ buffer[index++] = value & 0xff;
+ buffer[index++] = (value >> 8) & 0xff;
+ buffer[index++] = (value >> 16) & 0xff;
+ buffer[index++] = (value >> 24) & 0xff;
+ } else if(value >= BSON.JS_INT_MIN && value <= BSON.JS_INT_MAX) {
+ // Encode as double
+ buffer[index++] = BSON.BSON_DATA_NUMBER;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Write float
+ writeIEEE754(buffer, value, index, 'little', 52, 8);
+ // Ajust index
+ index = index + 8;
+ } else {
+ // Set long type
+ buffer[index++] = BSON.BSON_DATA_LONG;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ var longVal = Long.fromNumber(value);
+ var lowBits = longVal.getLowBits();
+ var highBits = longVal.getHighBits();
+ // Encode low bits
+ buffer[index++] = lowBits & 0xff;
+ buffer[index++] = (lowBits >> 8) & 0xff;
+ buffer[index++] = (lowBits >> 16) & 0xff;
+ buffer[index++] = (lowBits >> 24) & 0xff;
+ // Encode high bits
+ buffer[index++] = highBits & 0xff;
+ buffer[index++] = (highBits >> 8) & 0xff;
+ buffer[index++] = (highBits >> 16) & 0xff;
+ buffer[index++] = (highBits >> 24) & 0xff;
+ }
+ } else {
+ // Encode as double
+ buffer[index++] = BSON.BSON_DATA_NUMBER;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Write float
+ writeIEEE754(buffer, value, index, 'little', 52, 8);
+ // Ajust index
+ index = index + 8;
+ }
+
+ return index;
+ case 'undefined':
+ // Set long type
+ buffer[index++] = BSON.BSON_DATA_NULL;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ return index;
+ case 'boolean':
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_BOOLEAN;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Encode the boolean value
+ buffer[index++] = value ? 1 : 0;
+ return index;
+ case 'object':
+ if(value === null || value instanceof MinKey || value instanceof MaxKey
+ || value['_bsontype'] == 'MinKey' || value['_bsontype'] == 'MaxKey') {
+ // Write the type of either min or max key
+ if(value === null) {
+ buffer[index++] = BSON.BSON_DATA_NULL;
+ } else if(value instanceof MinKey) {
+ buffer[index++] = BSON.BSON_DATA_MIN_KEY;
+ } else {
+ buffer[index++] = BSON.BSON_DATA_MAX_KEY;
+ }
+
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ return index;
+ } else if(value instanceof ObjectID || value['_bsontype'] == 'ObjectID') {
+ // console.log("+++++++++++ index OBJECTID:: " + index)
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_OID;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+
+ // Write objectid
+ supportsBuffer ? buffer.write(value.id, index, 'binary') : writeToTypedArray(buffer, value.id, index);
+ // Ajust index
+ index = index + 12;
+ return index;
+ } else if(value instanceof Date || isDate(value)) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_DATE;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+
+ // Write the date
+ var dateInMilis = Long.fromNumber(value.getTime());
+ var lowBits = dateInMilis.getLowBits();
+ var highBits = dateInMilis.getHighBits();
+ // Encode low bits
+ buffer[index++] = lowBits & 0xff;
+ buffer[index++] = (lowBits >> 8) & 0xff;
+ buffer[index++] = (lowBits >> 16) & 0xff;
+ buffer[index++] = (lowBits >> 24) & 0xff;
+ // Encode high bits
+ buffer[index++] = highBits & 0xff;
+ buffer[index++] = (highBits >> 8) & 0xff;
+ buffer[index++] = (highBits >> 16) & 0xff;
+ buffer[index++] = (highBits >> 24) & 0xff;
+ return index;
+ } else if(typeof Buffer !== 'undefined' && Buffer.isBuffer(value)) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_BINARY;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Get size of the buffer (current write point)
+ var size = value.length;
+ // Write the size of the string to buffer
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ // Write the default subtype
+ buffer[index++] = BSON.BSON_BINARY_SUBTYPE_DEFAULT;
+ // Copy the content form the binary field to the buffer
+ value.copy(buffer, index, 0, size);
+ // Adjust the index
+ index = index + size;
+ return index;
+ } else if(value instanceof Long || value instanceof Timestamp || value['_bsontype'] == 'Long' || value['_bsontype'] == 'Timestamp') {
+ // Write the type
+ buffer[index++] = value instanceof Long || value['_bsontype'] == 'Long' ? BSON.BSON_DATA_LONG : BSON.BSON_DATA_TIMESTAMP;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Write the date
+ var lowBits = value.getLowBits();
+ var highBits = value.getHighBits();
+ // Encode low bits
+ buffer[index++] = lowBits & 0xff;
+ buffer[index++] = (lowBits >> 8) & 0xff;
+ buffer[index++] = (lowBits >> 16) & 0xff;
+ buffer[index++] = (lowBits >> 24) & 0xff;
+ // Encode high bits
+ buffer[index++] = highBits & 0xff;
+ buffer[index++] = (highBits >> 8) & 0xff;
+ buffer[index++] = (highBits >> 16) & 0xff;
+ buffer[index++] = (highBits >> 24) & 0xff;
+ return index;
+ } else if(value instanceof Double || value['_bsontype'] == 'Double') {
+ // Encode as double
+ buffer[index++] = BSON.BSON_DATA_NUMBER;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Write float
+ writeIEEE754(buffer, value, index, 'little', 52, 8);
+ // Ajust index
+ index = index + 8;
+ return index;
+ } else if(value instanceof Code || value['_bsontype'] == 'Code') {
+ if(value.scope != null && Object.keys(value.scope).length > 0) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_CODE_W_SCOPE;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Calculate the scope size
+ var scopeSize = BSON.calculateObjectSize(value.scope, serializeFunctions);
+ // Function string
+ var functionString = value.code.toString();
+ // Function Size
+ var codeSize = supportsBuffer ? Buffer.byteLength(functionString) + 1 : numberOfBytes(functionString) + 1;
+
+ // Calculate full size of the object
+ var totalSize = 4 + codeSize + scopeSize + 4;
+
+ // Write the total size of the object
+ buffer[index++] = totalSize & 0xff;
+ buffer[index++] = (totalSize >> 8) & 0xff;
+ buffer[index++] = (totalSize >> 16) & 0xff;
+ buffer[index++] = (totalSize >> 24) & 0xff;
+
+ // Write the size of the string to buffer
+ buffer[index++] = codeSize & 0xff;
+ buffer[index++] = (codeSize >> 8) & 0xff;
+ buffer[index++] = (codeSize >> 16) & 0xff;
+ buffer[index++] = (codeSize >> 24) & 0xff;
+
+ // Write the string
+ supportsBuffer ? buffer.write(functionString, index, 'utf8') : writeToTypedArray(buffer, functionString, index);
+ // Update index
+ index = index + codeSize - 1;
+ // Write zero
+ buffer[index++] = 0;
+ // Serialize the scope object
+ var scopeObjectBuffer = supportsBuffer ? new Buffer(scopeSize) : new Uint8Array(new ArrayBuffer(scopeSize));
+ // Execute the serialization into a seperate buffer
+ serializeObject(value.scope, checkKeys, scopeObjectBuffer, 0, serializeFunctions);
+
+ // Adjusted scope Size (removing the header)
+ var scopeDocSize = scopeSize;
+ // Write scope object size
+ buffer[index++] = scopeDocSize & 0xff;
+ buffer[index++] = (scopeDocSize >> 8) & 0xff;
+ buffer[index++] = (scopeDocSize >> 16) & 0xff;
+ buffer[index++] = (scopeDocSize >> 24) & 0xff;
+
+ // Write the scopeObject into the buffer
+ supportsBuffer ? scopeObjectBuffer.copy(buffer, index, 0, scopeSize) : buffer.set(scopeObjectBuffer, index);
+ // Adjust index, removing the empty size of the doc (5 bytes 0000000005)
+ index = index + scopeDocSize - 5;
+ // Write trailing zero
+ buffer[index++] = 0;
+ return index
+ } else {
+ buffer[index++] = BSON.BSON_DATA_CODE;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Function string
+ var functionString = value.code.toString();
+ // Function Size
+ var size = supportsBuffer ? Buffer.byteLength(functionString) + 1 : numberOfBytes(functionString) + 1;
+ // Write the size of the string to buffer
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ // Write the string
+ supportsBuffer ? buffer.write(functionString, index, 'utf8') : writeToTypedArray(buffer, functionString, index);
+ // Update index
+ index = index + size - 1;
+ // Write zero
+ buffer[index++] = 0;
+ return index;
+ }
+ } else if(value instanceof Binary || value['_bsontype'] == 'Binary') {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_BINARY;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Extract the buffer
+ var data = value.value(true);
+ // Calculate size
+ var size = value.position;
+ // Write the size of the string to buffer
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ // Write the subtype to the buffer
+ buffer[index++] = value.sub_type;
+
+ // If we have binary type 2 the 4 first bytes are the size
+ if(value.sub_type == Binary.SUBTYPE_BYTE_ARRAY) {
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ }
+
+ // Write the data to the object
+ supportsBuffer ? data.copy(buffer, index, 0, value.position) : buffer.set(data, index);
+ // Ajust index
+ index = index + value.position;
+ return index;
+ } else if(value instanceof Symbol || value['_bsontype'] == 'Symbol') {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_SYMBOL;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Calculate size
+ var size = supportsBuffer ? Buffer.byteLength(value.value) + 1 : numberOfBytes(value.value) + 1;
+ // Write the size of the string to buffer
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ // Write the string
+ buffer.write(value.value, index, 'utf8');
+ // Update index
+ index = index + size - 1;
+ // Write zero
+ buffer[index++] = 0x00;
+ return index;
+ } else if(value instanceof DBRef || value['_bsontype'] == 'DBRef') {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_OBJECT;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Set up correct object for serialization
+ var ordered_values = {
+ '$ref': value.namespace
+ , '$id' : value.oid
+ };
+
+ // Add db reference if it exists
+ if(null != value.db) {
+ ordered_values['$db'] = value.db;
+ }
+
+ // Message size
+ var size = BSON.calculateObjectSize(ordered_values, serializeFunctions);
+ // Serialize the object
+ var endIndex = BSON.serializeWithBufferAndIndex(ordered_values, checkKeys, buffer, index, serializeFunctions);
+ // Write the size of the string to buffer
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ // Write zero for object
+ buffer[endIndex++] = 0x00;
+ // Return the end index
+ return endIndex;
+ } else if(value instanceof RegExp || Object.prototype.toString.call(value) === '[object RegExp]') {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_REGEXP;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+
+ // Write the regular expression string
+ supportsBuffer ? buffer.write(value.source, index, 'utf8') : writeToTypedArray(buffer, value.source, index);
+ // Adjust the index
+ index = index + (supportsBuffer ? Buffer.byteLength(value.source) : numberOfBytes(value.source));
+ // Write zero
+ buffer[index++] = 0x00;
+ // Write the parameters
+ if(value.global) buffer[index++] = 0x73; // s
+ if(value.ignoreCase) buffer[index++] = 0x69; // i
+ if(value.multiline) buffer[index++] = 0x6d; // m
+ // Add ending zero
+ buffer[index++] = 0x00;
+ return index;
+ } else {
+ // Write the type
+ buffer[index++] = Array.isArray(value) ? BSON.BSON_DATA_ARRAY : BSON.BSON_DATA_OBJECT;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Adjust the index
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ var endIndex = serializeObject(value, checkKeys, buffer, index + 4, serializeFunctions);
+ // Write size
+ var size = endIndex - index;
+ // Write the size of the string to buffer
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ return endIndex;
+ }
+ case 'function':
+ // WTF for 0.4.X where typeof /someregexp/ === 'function'
+ if(value instanceof RegExp || Object.prototype.toString.call(value) === '[object RegExp]' || String.call(value) == '[object RegExp]') {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_REGEXP;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+
+ // Write the regular expression string
+ buffer.write(value.source, index, 'utf8');
+ // Adjust the index
+ index = index + (supportsBuffer ? Buffer.byteLength(value.source) : numberOfBytes(value.source));
+ // Write zero
+ buffer[index++] = 0x00;
+ // Write the parameters
+ if(value.global) buffer[index++] = 0x73; // s
+ if(value.ignoreCase) buffer[index++] = 0x69; // i
+ if(value.multiline) buffer[index++] = 0x6d; // m
+ // Add ending zero
+ buffer[index++] = 0x00;
+ return index;
+ } else {
+ if(serializeFunctions && value.scope != null && Object.keys(value.scope).length > 0) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_CODE_W_SCOPE;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Calculate the scope size
+ var scopeSize = BSON.calculateObjectSize(value.scope, serializeFunctions);
+ // Function string
+ var functionString = value.toString();
+ // Function Size
+ var codeSize = supportsBuffer ? Buffer.byteLength(functionString) + 1 : numberOfBytes(functionString) + 1;
+
+ // Calculate full size of the object
+ var totalSize = 4 + codeSize + scopeSize;
+
+ // Write the total size of the object
+ buffer[index++] = totalSize & 0xff;
+ buffer[index++] = (totalSize >> 8) & 0xff;
+ buffer[index++] = (totalSize >> 16) & 0xff;
+ buffer[index++] = (totalSize >> 24) & 0xff;
+
+ // Write the size of the string to buffer
+ buffer[index++] = codeSize & 0xff;
+ buffer[index++] = (codeSize >> 8) & 0xff;
+ buffer[index++] = (codeSize >> 16) & 0xff;
+ buffer[index++] = (codeSize >> 24) & 0xff;
+
+ // Write the string
+ supportsBuffer ? buffer.write(functionString, index, 'utf8') : writeToTypedArray(buffer, functionString, index);
+ // Update index
+ index = index + codeSize - 1;
+ // Write zero
+ buffer[index++] = 0;
+ // Serialize the scope object
+ var scopeObjectBuffer = new Buffer(scopeSize);
+ // Execute the serialization into a seperate buffer
+ serializeObject(value.scope, checkKeys, scopeObjectBuffer, 0, serializeFunctions);
+
+ // Adjusted scope Size (removing the header)
+ var scopeDocSize = scopeSize - 4;
+ // Write scope object size
+ buffer[index++] = scopeDocSize & 0xff;
+ buffer[index++] = (scopeDocSize >> 8) & 0xff;
+ buffer[index++] = (scopeDocSize >> 16) & 0xff;
+ buffer[index++] = (scopeDocSize >> 24) & 0xff;
+
+ // Write the scopeObject into the buffer
+ scopeObjectBuffer.copy(buffer, index, 0, scopeSize);
+
+ // Adjust index, removing the empty size of the doc (5 bytes 0000000005)
+ index = index + scopeDocSize - 5;
+ // Write trailing zero
+ buffer[index++] = 0;
+ return index
+ } else if(serializeFunctions) {
+ buffer[index++] = BSON.BSON_DATA_CODE;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Function string
+ var functionString = value.toString();
+ // Function Size
+ var size = supportsBuffer ? Buffer.byteLength(functionString) + 1 : numberOfBytes(functionString) + 1;
+ // Write the size of the string to buffer
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ // Write the string
+ supportsBuffer ? buffer.write(functionString, index, 'utf8') : writeToTypedArray(buffer, functionString, index);
+ // Update index
+ index = index + size - 1;
+ // Write zero
+ buffer[index++] = 0;
+ return index;
+ }
+ }
+ }
+
+ // If no value to serialize
+ return index;
+}
+
+/**
+ * Serialize a Javascript object.
+ *
+ * @param {Object} object the Javascript object to serialize.
+ * @param {Boolean} checkKeys the serializer will check if keys are valid.
+ * @param {Boolean} asBuffer return the serialized object as a Buffer object **(ignore)**.
+ * @param {Boolean} serializeFunctions serialize the javascript functions **(default:false)**.
+ * @return {Buffer} returns the Buffer object containing the serialized object.
+ * @api public
+ */
+BSON.serialize = function(object, checkKeys, asBuffer, serializeFunctions) {
+ // Throw error if we are trying serialize an illegal type
+ if(object == null || typeof object != 'object' || Array.isArray(object))
+ throw new Error("Only javascript objects supported");
+
+ // Emoty target buffer
+ var buffer = null;
+ // Calculate the size of the object
+ var size = BSON.calculateObjectSize(object, serializeFunctions);
+ // Fetch the best available type for storing the binary data
+ if(buffer = typeof Buffer != 'undefined') {
+ buffer = new Buffer(size);
+ asBuffer = true;
+ } else if(typeof Uint8Array != 'undefined') {
+ buffer = new Uint8Array(new ArrayBuffer(size));
+ } else {
+ buffer = new Array(size);
+ }
+
+ // If asBuffer is false use typed arrays
+ BSON.serializeWithBufferAndIndex(object, checkKeys, buffer, 0, serializeFunctions);
+ // console.log("++++++++++++++++++++++++++++++++++++ OLDJS :: " + buffer.length)
+ // console.log(buffer.toString('hex'))
+ // console.log(buffer.toString('ascii'))
+ return buffer;
+}
+
+/**
+ * Contains the function cache if we have that enable to allow for avoiding the eval step on each deserialization, comparison is by md5
+ *
+ * @ignore
+ * @api private
+ */
+var functionCache = BSON.functionCache = {};
+
+/**
+ * Crc state variables shared by function
+ *
+ * @ignore
+ * @api private
+ */
+var table = [0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D];
+
+/**
+ * CRC32 hash method, Fast and enough versitility for our usage
+ *
+ * @ignore
+ * @api private
+ */
+var crc32 = function(string, start, end) {
+ var crc = 0
+ var x = 0;
+ var y = 0;
+ crc = crc ^ (-1);
+
+ for(var i = start, iTop = end; i < iTop;i++) {
+ y = (crc ^ string[i]) & 0xFF;
+ x = table[y];
+ crc = (crc >>> 8) ^ x;
+ }
+
+ return crc ^ (-1);
+}
+
+/**
+ * Deserialize stream data as BSON documents.
+ *
+ * Options
+ * - **evalFunctions** {Boolean, default:false}, evaluate functions in the BSON document scoped to the object deserialized.
+ * - **cacheFunctions** {Boolean, default:false}, cache evaluated functions for reuse.
+ * - **cacheFunctionsCrc32** {Boolean, default:false}, use a crc32 code for caching, otherwise use the string of the function.
+ * - **promoteLongs** {Boolean, default:true}, when deserializing a Long will fit it into a Number if it's smaller than 53 bits
+ *
+ * @param {Buffer} data the buffer containing the serialized set of BSON documents.
+ * @param {Number} startIndex the start index in the data Buffer where the deserialization is to start.
+ * @param {Number} numberOfDocuments number of documents to deserialize.
+ * @param {Array} documents an array where to store the deserialized documents.
+ * @param {Number} docStartIndex the index in the documents array from where to start inserting documents.
+ * @param {Object} [options] additional options used for the deserialization.
+ * @return {Number} returns the next index in the buffer after deserialization **x** numbers of documents.
+ * @api public
+ */
+BSON.deserializeStream = function(data, startIndex, numberOfDocuments, documents, docStartIndex, options) {
+ // if(numberOfDocuments !== documents.length) throw new Error("Number of expected results back is less than the number of documents");
+ options = options != null ? options : {};
+ var index = startIndex;
+ // Loop over all documents
+ for(var i = 0; i < numberOfDocuments; i++) {
+ // Find size of the document
+ var size = data[index] | data[index + 1] << 8 | data[index + 2] << 16 | data[index + 3] << 24;
+ // Update options with index
+ options['index'] = index;
+ // Parse the document at this point
+ documents[docStartIndex + i] = BSON.deserialize(data, options);
+ // Adjust index by the document size
+ index = index + size;
+ }
+
+ // Return object containing end index of parsing and list of documents
+ return index;
+}
+
+/**
+ * Ensure eval is isolated.
+ *
+ * @ignore
+ * @api private
+ */
+var isolateEvalWithHash = function(functionCache, hash, functionString, object) {
+ // Contains the value we are going to set
+ var value = null;
+
+ // Check for cache hit, eval if missing and return cached function
+ if(functionCache[hash] == null) {
+ eval("value = " + functionString);
+ functionCache[hash] = value;
+ }
+ // Set the object
+ return functionCache[hash].bind(object);
+}
+
+/**
+ * Ensure eval is isolated.
+ *
+ * @ignore
+ * @api private
+ */
+var isolateEval = function(functionString) {
+ // Contains the value we are going to set
+ var value = null;
+ // Eval the function
+ eval("value = " + functionString);
+ return value;
+}
+
+/**
+ * Convert Uint8Array to String
+ *
+ * @ignore
+ * @api private
+ */
+var convertUint8ArrayToUtf8String = function(byteArray, startIndex, endIndex) {
+ return BinaryParser.decode_utf8(convertArraytoUtf8BinaryString(byteArray, startIndex, endIndex));
+}
+
+var convertArraytoUtf8BinaryString = function(byteArray, startIndex, endIndex) {
+ var result = "";
+ for(var i = startIndex; i < endIndex; i++) {
+ result = result + String.fromCharCode(byteArray[i]);
+ }
+
+ return result;
+};
+
+/**
+ * Deserialize data as BSON.
+ *
+ * Options
+ * - **evalFunctions** {Boolean, default:false}, evaluate functions in the BSON document scoped to the object deserialized.
+ * - **cacheFunctions** {Boolean, default:false}, cache evaluated functions for reuse.
+ * - **cacheFunctionsCrc32** {Boolean, default:false}, use a crc32 code for caching, otherwise use the string of the function.
+ * - **promoteLongs** {Boolean, default:true}, when deserializing a Long will fit it into a Number if it's smaller than 53 bits
+ *
+ * @param {Buffer} buffer the buffer containing the serialized set of BSON documents.
+ * @param {Object} [options] additional options used for the deserialization.
+ * @param {Boolean} [isArray] ignore used for recursive parsing.
+ * @return {Object} returns the deserialized Javascript Object.
+ * @api public
+ */
+BSON.deserialize = function(buffer, options, isArray) {
+ // Options
+ options = options == null ? {} : options;
+ var evalFunctions = options['evalFunctions'] == null ? false : options['evalFunctions'];
+ var cacheFunctions = options['cacheFunctions'] == null ? false : options['cacheFunctions'];
+ var cacheFunctionsCrc32 = options['cacheFunctionsCrc32'] == null ? false : options['cacheFunctionsCrc32'];
+ var promoteLongs = options['promoteLongs'] == null ? true : options['promoteLongs'];
+
+ // Validate that we have at least 4 bytes of buffer
+ if(buffer.length < 5) throw new Error("corrupt bson message < 5 bytes long");
+
+ // Set up index
+ var index = typeof options['index'] == 'number' ? options['index'] : 0;
+ // Reads in a C style string
+ var readCStyleString = function() {
+ // Get the start search index
+ var i = index;
+ // Locate the end of the c string
+ while(buffer[i] !== 0x00 && i < buffer.length) {
+ i++
+ }
+ // If are at the end of the buffer there is a problem with the document
+ if(i >= buffer.length) throw new Error("Bad BSON Document: illegal CString")
+ // Grab utf8 encoded string
+ var string = supportsBuffer && Buffer.isBuffer(buffer) ? buffer.toString('utf8', index, i) : convertUint8ArrayToUtf8String(buffer, index, i);
+ // Update index position
+ index = i + 1;
+ // Return string
+ return string;
+ }
+
+ // Create holding object
+ var object = isArray ? [] : {};
+
+ // Read the document size
+ var size = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+
+ // Ensure buffer is valid size
+ if(size < 5 || size > buffer.length) throw new Error("corrupt bson message");
+
+ // While we have more left data left keep parsing
+ while(true) {
+ // Read the type
+ var elementType = buffer[index++];
+ // If we get a zero it's the last byte, exit
+ if(elementType == 0) break;
+ // Read the name of the field
+ var name = readCStyleString();
+ // Switch on the type
+ switch(elementType) {
+ case BSON.BSON_DATA_OID:
+ var string = supportsBuffer && Buffer.isBuffer(buffer) ? buffer.toString('binary', index, index + 12) : convertArraytoUtf8BinaryString(buffer, index, index + 12);
+ // Decode the oid
+ object[name] = new ObjectID(string);
+ // Update index
+ index = index + 12;
+ break;
+ case BSON.BSON_DATA_STRING:
+ // Read the content of the field
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ // Add string to object
+ object[name] = supportsBuffer && Buffer.isBuffer(buffer) ? buffer.toString('utf8', index, index + stringSize - 1) : convertUint8ArrayToUtf8String(buffer, index, index + stringSize - 1);
+ // Update parse index position
+ index = index + stringSize;
+ break;
+ case BSON.BSON_DATA_INT:
+ // Decode the 32bit value
+ object[name] = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ break;
+ case BSON.BSON_DATA_NUMBER:
+ // Decode the double value
+ object[name] = readIEEE754(buffer, index, 'little', 52, 8);
+ // Update the index
+ index = index + 8;
+ break;
+ case BSON.BSON_DATA_DATE:
+ // Unpack the low and high bits
+ var lowBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var highBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ // Set date object
+ object[name] = new Date(new Long(lowBits, highBits).toNumber());
+ break;
+ case BSON.BSON_DATA_BOOLEAN:
+ // Parse the boolean value
+ object[name] = buffer[index++] == 1;
+ break;
+ case BSON.BSON_DATA_UNDEFINED:
+ case BSON.BSON_DATA_NULL:
+ // Parse the boolean value
+ object[name] = null;
+ break;
+ case BSON.BSON_DATA_BINARY:
+ // Decode the size of the binary blob
+ var binarySize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ // Decode the subtype
+ var subType = buffer[index++];
+ // Decode as raw Buffer object if options specifies it
+ if(buffer['slice'] != null) {
+ // If we have subtype 2 skip the 4 bytes for the size
+ if(subType == Binary.SUBTYPE_BYTE_ARRAY) {
+ binarySize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ }
+ // Slice the data
+ object[name] = new Binary(buffer.slice(index, index + binarySize), subType);
+ } else {
+ var _buffer = typeof Uint8Array != 'undefined' ? new Uint8Array(new ArrayBuffer(binarySize)) : new Array(binarySize);
+ // If we have subtype 2 skip the 4 bytes for the size
+ if(subType == Binary.SUBTYPE_BYTE_ARRAY) {
+ binarySize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ }
+ // Copy the data
+ for(var i = 0; i < binarySize; i++) {
+ _buffer[i] = buffer[index + i];
+ }
+ // Create the binary object
+ object[name] = new Binary(_buffer, subType);
+ }
+ // Update the index
+ index = index + binarySize;
+ break;
+ case BSON.BSON_DATA_ARRAY:
+ options['index'] = index;
+ // Decode the size of the array document
+ var objectSize = buffer[index] | buffer[index + 1] << 8 | buffer[index + 2] << 16 | buffer[index + 3] << 24;
+ // Set the array to the object
+ object[name] = BSON.deserialize(buffer, options, true);
+ // Adjust the index
+ index = index + objectSize;
+ break;
+ case BSON.BSON_DATA_OBJECT:
+ options['index'] = index;
+ // Decode the size of the object document
+ var objectSize = buffer[index] | buffer[index + 1] << 8 | buffer[index + 2] << 16 | buffer[index + 3] << 24;
+ // Set the array to the object
+ object[name] = BSON.deserialize(buffer, options, false);
+ // Adjust the index
+ index = index + objectSize;
+ break;
+ case BSON.BSON_DATA_REGEXP:
+ // Create the regexp
+ var source = readCStyleString();
+ var regExpOptions = readCStyleString();
+ // For each option add the corresponding one for javascript
+ var optionsArray = new Array(regExpOptions.length);
+
+ // Parse options
+ for(var i = 0; i < regExpOptions.length; i++) {
+ switch(regExpOptions[i]) {
+ case 'm':
+ optionsArray[i] = 'm';
+ break;
+ case 's':
+ optionsArray[i] = 'g';
+ break;
+ case 'i':
+ optionsArray[i] = 'i';
+ break;
+ }
+ }
+
+ object[name] = new RegExp(source, optionsArray.join(''));
+ break;
+ case BSON.BSON_DATA_LONG:
+ // Unpack the low and high bits
+ var lowBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var highBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ // Create long object
+ var long = new Long(lowBits, highBits);
+ // Promote the long if possible
+ if(promoteLongs) {
+ object[name] = long.lessThanOrEqual(JS_INT_MAX_LONG) && long.greaterThanOrEqual(JS_INT_MIN_LONG) ? long.toNumber() : long;
+ } else {
+ object[name] = long;
+ }
+ break;
+ case BSON.BSON_DATA_SYMBOL:
+ // Read the content of the field
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ // Add string to object
+ object[name] = new Symbol(buffer.toString('utf8', index, index + stringSize - 1));
+ // Update parse index position
+ index = index + stringSize;
+ break;
+ case BSON.BSON_DATA_TIMESTAMP:
+ // Unpack the low and high bits
+ var lowBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var highBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ // Set the object
+ object[name] = new Timestamp(lowBits, highBits);
+ break;
+ case BSON.BSON_DATA_MIN_KEY:
+ // Parse the object
+ object[name] = new MinKey();
+ break;
+ case BSON.BSON_DATA_MAX_KEY:
+ // Parse the object
+ object[name] = new MaxKey();
+ break;
+ case BSON.BSON_DATA_CODE:
+ // Read the content of the field
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ // Function string
+ var functionString = supportsBuffer && Buffer.isBuffer(buffer) ? buffer.toString('utf8', index, index + stringSize - 1) : convertUint8ArrayToUtf8String(buffer, index, index + stringSize - 1);
+
+ // If we are evaluating the functions
+ if(evalFunctions) {
+ // Contains the value we are going to set
+ var value = null;
+ // If we have cache enabled let's look for the md5 of the function in the cache
+ if(cacheFunctions) {
+ var hash = cacheFunctionsCrc32 ? crc32(functionString) : functionString;
+ // Got to do this to avoid V8 deoptimizing the call due to finding eval
+ object[name] = isolateEvalWithHash(functionCache, hash, functionString, object);
+ } else {
+ // Set directly
+ object[name] = isolateEval(functionString);
+ }
+ } else {
+ object[name] = new Code(functionString, {});
+ }
+
+ // Update parse index position
+ index = index + stringSize;
+ break;
+ case BSON.BSON_DATA_CODE_W_SCOPE:
+ // Read the content of the field
+ var totalSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ // Javascript function
+ var functionString = supportsBuffer && Buffer.isBuffer(buffer) ? buffer.toString('utf8', index, index + stringSize - 1) : convertUint8ArrayToUtf8String(buffer, index, index + stringSize - 1);
+ // Update parse index position
+ index = index + stringSize;
+ // Parse the element
+ options['index'] = index;
+ // Decode the size of the object document
+ var objectSize = buffer[index] | buffer[index + 1] << 8 | buffer[index + 2] << 16 | buffer[index + 3] << 24;
+ // Decode the scope object
+ var scopeObject = BSON.deserialize(buffer, options, false);
+ // Adjust the index
+ index = index + objectSize;
+
+ // If we are evaluating the functions
+ if(evalFunctions) {
+ // Contains the value we are going to set
+ var value = null;
+ // If we have cache enabled let's look for the md5 of the function in the cache
+ if(cacheFunctions) {
+ var hash = cacheFunctionsCrc32 ? crc32(functionString) : functionString;
+ // Got to do this to avoid V8 deoptimizing the call due to finding eval
+ object[name] = isolateEvalWithHash(functionCache, hash, functionString, object);
+ } else {
+ // Set directly
+ object[name] = isolateEval(functionString);
+ }
+
+ // Set the scope on the object
+ object[name].scope = scopeObject;
+ } else {
+ object[name] = new Code(functionString, scopeObject);
+ }
+
+ // Add string to object
+ break;
+ }
+ }
+
+ // Check if we have a db ref object
+ if(object['$id'] != null) object = new DBRef(object['$ref'], object['$id'], object['$db']);
+
+ // Return the final objects
+ return object;
+}
+
+/**
+ * Check if key name is valid.
+ *
+ * @ignore
+ * @api private
+ */
+BSON.checkKey = function checkKey (key, dollarsAndDotsOk) {
+ if (!key.length) return;
+ // Check if we have a legal key for the object
+ if (!!~key.indexOf("\x00")) {
+ // The BSON spec doesn't allow keys with null bytes because keys are
+ // null-terminated.
+ throw Error("key " + key + " must not contain null bytes");
+ }
+ if (!dollarsAndDotsOk) {
+ if('$' == key[0]) {
+ throw Error("key " + key + " must not start with '$'");
+ } else if (!!~key.indexOf('.')) {
+ throw Error("key " + key + " must not contain '.'");
+ }
+ }
+};
+
+/**
+ * Deserialize data as BSON.
+ *
+ * Options
+ * - **evalFunctions** {Boolean, default:false}, evaluate functions in the BSON document scoped to the object deserialized.
+ * - **cacheFunctions** {Boolean, default:false}, cache evaluated functions for reuse.
+ * - **cacheFunctionsCrc32** {Boolean, default:false}, use a crc32 code for caching, otherwise use the string of the function.
+ *
+ * @param {Buffer} buffer the buffer containing the serialized set of BSON documents.
+ * @param {Object} [options] additional options used for the deserialization.
+ * @param {Boolean} [isArray] ignore used for recursive parsing.
+ * @return {Object} returns the deserialized Javascript Object.
+ * @api public
+ */
+BSON.prototype.deserialize = function(data, options) {
+ return BSON.deserialize(data, options);
+}
+
+/**
+ * Deserialize stream data as BSON documents.
+ *
+ * Options
+ * - **evalFunctions** {Boolean, default:false}, evaluate functions in the BSON document scoped to the object deserialized.
+ * - **cacheFunctions** {Boolean, default:false}, cache evaluated functions for reuse.
+ * - **cacheFunctionsCrc32** {Boolean, default:false}, use a crc32 code for caching, otherwise use the string of the function.
+ *
+ * @param {Buffer} data the buffer containing the serialized set of BSON documents.
+ * @param {Number} startIndex the start index in the data Buffer where the deserialization is to start.
+ * @param {Number} numberOfDocuments number of documents to deserialize.
+ * @param {Array} documents an array where to store the deserialized documents.
+ * @param {Number} docStartIndex the index in the documents array from where to start inserting documents.
+ * @param {Object} [options] additional options used for the deserialization.
+ * @return {Number} returns the next index in the buffer after deserialization **x** numbers of documents.
+ * @api public
+ */
+BSON.prototype.deserializeStream = function(data, startIndex, numberOfDocuments, documents, docStartIndex, options) {
+ return BSON.deserializeStream(data, startIndex, numberOfDocuments, documents, docStartIndex, options);
+}
+
+/**
+ * Serialize a Javascript object.
+ *
+ * @param {Object} object the Javascript object to serialize.
+ * @param {Boolean} checkKeys the serializer will check if keys are valid.
+ * @param {Boolean} asBuffer return the serialized object as a Buffer object **(ignore)**.
+ * @param {Boolean} serializeFunctions serialize the javascript functions **(default:false)**.
+ * @return {Buffer} returns the Buffer object containing the serialized object.
+ * @api public
+ */
+BSON.prototype.serialize = function(object, checkKeys, asBuffer, serializeFunctions) {
+ return BSON.serialize(object, checkKeys, asBuffer, serializeFunctions);
+}
+
+/**
+ * Calculate the bson size for a passed in Javascript object.
+ *
+ * @param {Object} object the Javascript object to calculate the BSON byte size for.
+ * @param {Boolean} [serializeFunctions] serialize all functions in the object **(default:false)**.
+ * @return {Number} returns the number of bytes the BSON object will take up.
+ * @api public
+ */
+BSON.prototype.calculateObjectSize = function(object, serializeFunctions) {
+ return BSON.calculateObjectSize(object, serializeFunctions);
+}
+
+/**
+ * Serialize a Javascript object using a predefined Buffer and index into the buffer, useful when pre-allocating the space for serialization.
+ *
+ * @param {Object} object the Javascript object to serialize.
+ * @param {Boolean} checkKeys the serializer will check if keys are valid.
+ * @param {Buffer} buffer the Buffer you pre-allocated to store the serialized BSON object.
+ * @param {Number} index the index in the buffer where we wish to start serializing into.
+ * @param {Boolean} serializeFunctions serialize the javascript functions **(default:false)**.
+ * @return {Number} returns the new write index in the Buffer.
+ * @api public
+ */
+BSON.prototype.serializeWithBufferAndIndex = function(object, checkKeys, buffer, startIndex, serializeFunctions) {
+ return BSON.serializeWithBufferAndIndex(object, checkKeys, buffer, startIndex, serializeFunctions);
+}
+
+/**
+ * @ignore
+ * @api private
+ */
+module.exports = BSON;
+module.exports.Code = Code;
+module.exports.Symbol = Symbol;
+module.exports.BSON = BSON;
+module.exports.DBRef = DBRef;
+module.exports.Binary = Binary;
+module.exports.ObjectID = ObjectID;
+module.exports.Long = Long;
+module.exports.Timestamp = Timestamp;
+module.exports.Double = Double;
+module.exports.MinKey = MinKey;
+module.exports.MaxKey = MaxKey;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/alternate_parsers/faster_bson.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/alternate_parsers/faster_bson.js
new file mode 100644
index 0000000..f19e44f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/alternate_parsers/faster_bson.js
@@ -0,0 +1,429 @@
+/// reduced to ~ 410 LOCs (parser only 300 vs. 1400+) with (some, needed) BSON classes "inlined".
+/// Compare ~ 4,300 (22KB vs. 157KB) in browser build at: https://github.com/mongodb/js-bson/blob/master/browser_build/bson.js
+
+module.exports.calculateObjectSize = calculateObjectSize;
+
+function calculateObjectSize(object) {
+ var totalLength = (4 + 1); /// handles the obj.length prefix + terminating '0' ?!
+ for(var key in object) { /// looks like it handles arrays under the same for...in loop!?
+ totalLength += calculateElement(key, object[key])
+ }
+ return totalLength;
+}
+
+function calculateElement(name, value) {
+ var len = 1; /// always starting with 1 for the data type byte!
+ if (name) len += Buffer.byteLength(name, 'utf8') + 1; /// cstring: name + '0' termination
+
+ if (value === undefined || value === null) return len; /// just the type byte plus name cstring
+ switch( value.constructor ) { /// removed all checks 'isBuffer' if Node.js Buffer class is present!?
+
+ case ObjectID: /// we want these sorted from most common case to least common/deprecated;
+ return len + 12;
+ case String:
+ return len + 4 + Buffer.byteLength(value, 'utf8') +1; ///
+ case Number:
+ if (Math.floor(value) === value) { /// case: integer; pos.# more common, '&&' stops if 1st fails!
+ if ( value <= 2147483647 && value >= -2147483647 ) // 32 bit
+ return len + 4;
+ else return len + 8; /// covers Long-ish JS integers as Longs!
+ } else return len + 8; /// 8+1 --- covers Double & std. float
+ case Boolean:
+ return len + 1;
+
+ case Array:
+ case Object:
+ return len + calculateObjectSize(value);
+
+ case Buffer: /// replaces the entire Binary class!
+ return len + 4 + value.length + 1;
+
+ case Regex: /// these are handled as strings by serializeFast() later, hence 'gim' opts = 3 + 1 chars
+ return len + Buffer.byteLength(value.source, 'utf8') + 1
+ + (value.global ? 1 : 0) + (value.ignoreCase ? 1 : 0) + (value.multiline ? 1 : 0) +1;
+ case Date:
+ case Long:
+ case Timestamp:
+ case Double:
+ return len + 8;
+
+ case MinKey:
+ case MaxKey:
+ return len; /// these two return the type byte and name cstring only!
+ }
+ return 0;
+}
+
+module.exports.serializeFast = serializeFast;
+module.exports.serialize = function(object, checkKeys, asBuffer, serializeFunctions, index) {
+ var buffer = new Buffer(calculateObjectSize(object));
+ return serializeFast(object, checkKeys, buffer, 0);
+}
+
+function serializeFast(object, checkKeys, buffer, i) { /// set checkKeys = false in query(..., options object to save performance IFF you're certain your keys are safe/system-set!
+ var size = buffer.length;
+ buffer[i++] = size & 0xff; buffer[i++] = (size >> 8) & 0xff; /// these get overwritten later!
+ buffer[i++] = (size >> 16) & 0xff; buffer[i++] = (size >> 24) & 0xff;
+
+ if (object.constructor === Array) { /// any need to checkKeys here?!? since we're doing for rather than for...in, should be safe from extra (non-numeric) keys added to the array?!
+ for(var j = 0; j < object.length; j++) {
+ i = packElement(j.toString(), object[j], checkKeys, buffer, i);
+ }
+ } else { /// checkKeys is needed if any suspicion of end-user key tampering/"injection" (a la SQL)
+ for(var key in object) { /// mostly there should never be direct access to them!?
+ if (checkKeys && (key.indexOf('\x00') >= 0 || key === '$where') ) { /// = "no script"?!; could add back key.indexOf('$') or maybe check for 'eval'?!
+/// took out: || key.indexOf('.') >= 0... Don't we allow dot notation queries?!
+ console.log('checkKeys error: ');
+ return new Error('Illegal object key!');
+ }
+ i = packElement(key, object[key], checkKeys, buffer, i); /// checkKeys pass needed for recursion!
+ }
+ }
+ buffer[i++] = 0; /// write terminating zero; !we do NOT -1 the index increase here as original does!
+ return i;
+}
+
+function packElement(name, value, checkKeys, buffer, i) { /// serializeFunctions removed! checkKeys needed for Array & Object cases pass through (calling serializeFast recursively!)
+ if (value === undefined || value === null){
+ buffer[i++] = 10; /// = BSON.BSON_DATA_NULL;
+ i += buffer.write(name, i, 'utf8'); buffer[i++] = 0; /// buffer.write(...) returns bytesWritten!
+ return i;
+ }
+ switch(value.constructor) {
+
+ case ObjectID:
+ buffer[i++] = 7; /// = BSON.BSON_DATA_OID;
+ i += buffer.write(name, i, 'utf8'); buffer[i++] = 0;
+/// i += buffer.write(value.id, i, 'binary'); /// OLD: writes a String to a Buffer; 'binary' deprecated!!
+ value.id.copy(buffer, i); /// NEW ObjectID version has this.id = Buffer at the ready!
+ return i += 12;
+
+ case String:
+ buffer[i++] = 2; /// = BSON.BSON_DATA_STRING;
+ i += buffer.write(name, i, 'utf8'); buffer[i++] = 0;
+
+ var size = Buffer.byteLength(value) + 1; /// includes the terminating '0'!?
+ buffer[i++] = size & 0xff; buffer[i++] = (size >> 8) & 0xff;
+ buffer[i++] = (size >> 16) & 0xff; buffer[i++] = (size >> 24) & 0xff;
+
+ i += buffer.write(value, i, 'utf8'); buffer[i++] = 0;
+ return i;
+
+ case Number:
+ if ( ~~(value) === value) { /// double-Tilde is equiv. to Math.floor(value)
+ if ( value <= 2147483647 && value >= -2147483647){ /// = BSON.BSON_INT32_MAX / MIN asf.
+ buffer[i++] = 16; /// = BSON.BSON_DATA_INT;
+ i += buffer.write(name, i, 'utf8'); buffer[i++] = 0;
+ buffer[i++] = value & 0xff; buffer[i++] = (value >> 8) & 0xff;
+ buffer[i++] = (value >> 16) & 0xff; buffer[i++] = (value >> 24) & 0xff;
+
+// Else large-ish JS int!? to Long!?
+ } else { /// if (value <= BSON.JS_INT_MAX && value >= BSON.JS_INT_MIN){ /// 9007199254740992 asf.
+ buffer[i++] = 18; /// = BSON.BSON_DATA_LONG;
+ i += buffer.write(name, i, 'utf8'); buffer[i++] = 0;
+ var lowBits = ( value % 4294967296 ) | 0, highBits = ( value / 4294967296 ) | 0;
+
+ buffer[i++] = lowBits & 0xff; buffer[i++] = (lowBits >> 8) & 0xff;
+ buffer[i++] = (lowBits >> 16) & 0xff; buffer[i++] = (lowBits >> 24) & 0xff;
+ buffer[i++] = highBits & 0xff; buffer[i++] = (highBits >> 8) & 0xff;
+ buffer[i++] = (highBits >> 16) & 0xff; buffer[i++] = (highBits >> 24) & 0xff;
+ }
+ } else { /// we have a float / Double
+ buffer[i++] = 1; /// = BSON.BSON_DATA_NUMBER;
+ i += buffer.write(name, i, 'utf8'); buffer[i++] = 0;
+/// OLD: writeIEEE754(buffer, value, i, 'little', 52, 8);
+ buffer.writeDoubleLE(value, i); i += 8;
+ }
+ return i;
+
+ case Boolean:
+ buffer[i++] = 8; /// = BSON.BSON_DATA_BOOLEAN;
+ i += buffer.write(name, i, 'utf8'); buffer[i++] = 0;
+ buffer[i++] = value ? 1 : 0;
+ return i;
+
+ case Array:
+ case Object:
+ buffer[i++] = value.constructor === Array ? 4 : 3; /// = BSON.BSON_DATA_ARRAY / _OBJECT;
+ i += buffer.write(name, i, 'utf8'); buffer[i++] = 0;
+
+ var endIndex = serializeFast(value, checkKeys, buffer, i); /// + 4); no longer needed b/c serializeFast writes a temp 4 bytes for length
+ var size = endIndex - i;
+ buffer[i++] = size & 0xff; buffer[i++] = (size >> 8) & 0xff;
+ buffer[i++] = (size >> 16) & 0xff; buffer[i++] = (size >> 24) & 0xff;
+ return endIndex;
+
+ /// case Binary: /// is basically identical unless special/deprecated options!
+ case Buffer: /// solves ALL of our Binary needs without the BSON.Binary class!?
+ buffer[i++] = 5; /// = BSON.BSON_DATA_BINARY;
+ i += buffer.write(name, i, 'utf8'); buffer[i++] = 0;
+ var size = value.length;
+ buffer[i++] = size & 0xff; buffer[i++] = (size >> 8) & 0xff;
+ buffer[i++] = (size >> 16) & 0xff; buffer[i++] = (size >> 24) & 0xff;
+
+ buffer[i++] = 0; /// write BSON.BSON_BINARY_SUBTYPE_DEFAULT;
+ value.copy(buffer, i); ///, 0, size); << defaults to sourceStart=0, sourceEnd=sourceBuffer.length);
+ i += size;
+ return i;
+
+ case RegExp:
+ buffer[i++] = 11; /// = BSON.BSON_DATA_REGEXP;
+ i += buffer.write(name, i, 'utf8'); buffer[i++] = 0;
+ i += buffer.write(value.source, i, 'utf8'); buffer[i++] = 0x00;
+
+ if (value.global) buffer[i++] = 0x73; // s = 'g' for JS Regex!
+ if (value.ignoreCase) buffer[i++] = 0x69; // i
+ if (value.multiline) buffer[i++] = 0x6d; // m
+ buffer[i++] = 0x00;
+ return i;
+
+ case Date:
+ buffer[i++] = 9; /// = BSON.BSON_DATA_DATE;
+ i += buffer.write(name, i, 'utf8'); buffer[i++] = 0;
+ var millis = value.getTime();
+ var lowBits = ( millis % 4294967296 ) | 0, highBits = ( millis / 4294967296 ) | 0;
+
+ buffer[i++] = lowBits & 0xff; buffer[i++] = (lowBits >> 8) & 0xff;
+ buffer[i++] = (lowBits >> 16) & 0xff; buffer[i++] = (lowBits >> 24) & 0xff;
+ buffer[i++] = highBits & 0xff; buffer[i++] = (highBits >> 8) & 0xff;
+ buffer[i++] = (highBits >> 16) & 0xff; buffer[i++] = (highBits >> 24) & 0xff;
+ return i;
+
+ case Long:
+ case Timestamp:
+ buffer[i++] = value.constructor === Long ? 18 : 17; /// = BSON.BSON_DATA_LONG / _TIMESTAMP
+ i += buffer.write(name, i, 'utf8'); buffer[i++] = 0;
+ var lowBits = value.getLowBits(), highBits = value.getHighBits();
+
+ buffer[i++] = lowBits & 0xff; buffer[i++] = (lowBits >> 8) & 0xff;
+ buffer[i++] = (lowBits >> 16) & 0xff; buffer[i++] = (lowBits >> 24) & 0xff;
+ buffer[i++] = highBits & 0xff; buffer[i++] = (highBits >> 8) & 0xff;
+ buffer[i++] = (highBits >> 16) & 0xff; buffer[i++] = (highBits >> 24) & 0xff;
+ return i;
+
+ case Double:
+ buffer[i++] = 1; /// = BSON.BSON_DATA_NUMBER;
+ i += buffer.write(name, i, 'utf8'); buffer[i++] = 0;
+/// OLD: writeIEEE754(buffer, value, i, 'little', 52, 8); i += 8;
+ buffer.writeDoubleLE(value, i); i += 8;
+ return i
+
+ case MinKey: /// = BSON.BSON_DATA_MINKEY;
+ buffer[i++] = 127; i += buffer.write(name, i, 'utf8'); buffer[i++] = 0;
+ return i;
+ case MaxKey: /// = BSON.BSON_DATA_MAXKEY;
+ buffer[i++] = 255; i += buffer.write(name, i, 'utf8'); buffer[i++] = 0;
+ return i;
+
+ } /// end of switch
+ return i; /// ?! If no value to serialize
+}
+
+
+module.exports.deserializeFast = deserializeFast;
+
+function deserializeFast(buffer, i, isArray){ //// , options, isArray) { //// no more options!
+ if (buffer.length < 5) return new Error('Corrupt bson message < 5 bytes long'); /// from 'throw'
+ var elementType, tempindex = 0, name;
+ var string, low, high; /// = lowBits / highBits
+ /// using 'i' as the index to keep the lines shorter:
+ i || ( i = 0 ); /// for parseResponse it's 0; set to running index in deserialize(object/array) recursion
+ var object = isArray ? [] : {}; /// needed for type ARRAY recursion later!
+ var size = buffer[i++] | buffer[i++] << 8 | buffer[i++] << 16 | buffer[i++] << 24;
+ if(size < 5 || size > buffer.length) return new Error('Corrupt BSON message');
+/// 'size' var was not used by anything after this, so we can reuse it
+
+ while(true) { // While we have more left data left keep parsing
+ elementType = buffer[i++]; // Read the type
+ if (elementType === 0) break; // If we get a zero it's the last byte, exit
+
+ tempindex = i; /// inlined readCStyleString & removed extra i<buffer.length check slowing EACH loop!
+ while( buffer[tempindex] !== 0x00 ) tempindex++; /// read ahead w/out changing main 'i' index
+ if (tempindex >= buffer.length) return new Error('Corrupt BSON document: illegal CString')
+ name = buffer.toString('utf8', i, tempindex);
+ i = tempindex + 1; /// Update index position to after the string + '0' termination
+
+ switch(elementType) {
+
+ case 7: /// = BSON.BSON_DATA_OID:
+ var buf = new Buffer(12);
+ buffer.copy(buf, 0, i, i += 12 ); /// copy 12 bytes from the current 'i' offset into fresh Buffer
+ object[name] = new ObjectID(buf); ///... & attach to the new ObjectID instance
+ break;
+
+ case 2: /// = BSON.BSON_DATA_STRING:
+ size = buffer[i++] | buffer[i++] <<8 | buffer[i++] <<16 | buffer[i++] <<24;
+ object[name] = buffer.toString('utf8', i, i += size -1 );
+ i++; break; /// need to get the '0' index "tick-forward" back!
+
+ case 16: /// = BSON.BSON_DATA_INT: // Decode the 32bit value
+ object[name] = buffer[i++] | buffer[i++] << 8 | buffer[i++] << 16 | buffer[i++] << 24; break;
+
+ case 1: /// = BSON.BSON_DATA_NUMBER: // Decode the double value
+ object[name] = buffer.readDoubleLE(i); /// slightly faster depending on dec.points; a LOT cleaner
+ /// OLD: object[name] = readIEEE754(buffer, i, 'little', 52, 8);
+ i += 8; break;
+
+ case 8: /// = BSON.BSON_DATA_BOOLEAN:
+ object[name] = buffer[i++] == 1; break;
+
+ case 6: /// = BSON.BSON_DATA_UNDEFINED: /// deprecated
+ case 10: /// = BSON.BSON_DATA_NULL:
+ object[name] = null; break;
+
+ case 4: /// = BSON.BSON_DATA_ARRAY
+ size = buffer[i] | buffer[i+1] <<8 | buffer[i+2] <<16 | buffer[i+3] <<24; /// NO 'i' increment since the size bytes are reread during the recursion!
+ object[name] = deserializeFast(buffer, i, true ); /// pass current index & set isArray = true
+ i += size; break;
+ case 3: /// = BSON.BSON_DATA_OBJECT:
+ size = buffer[i] | buffer[i+1] <<8 | buffer[i+2] <<16 | buffer[i+3] <<24;
+ object[name] = deserializeFast(buffer, i, false ); /// isArray = false => Object
+ i += size; break;
+
+ case 5: /// = BSON.BSON_DATA_BINARY: // Decode the size of the binary blob
+ size = buffer[i++] | buffer[i++] << 8 | buffer[i++] << 16 | buffer[i++] << 24;
+ buffer[i++]; /// Skip, as we assume always default subtype, i.e. 0!
+ object[name] = buffer.slice(i, i += size); /// creates a new Buffer "slice" view of the same memory!
+ break;
+
+ case 9: /// = BSON.BSON_DATA_DATE: /// SEE notes below on the Date type vs. other options...
+ low = buffer[i++] | buffer[i++] << 8 | buffer[i++] << 16 | buffer[i++] << 24;
+ high = buffer[i++] | buffer[i++] << 8 | buffer[i++] << 16 | buffer[i++] << 24;
+ object[name] = new Date( high * 4294967296 + (low < 0 ? low + 4294967296 : low) ); break;
+
+ case 18: /// = BSON.BSON_DATA_LONG: /// usage should be somewhat rare beyond parseResponse() -> cursorId, where it is handled inline, NOT as part of deserializeFast(returnedObjects); get lowBits, highBits:
+ low = buffer[i++] | buffer[i++] << 8 | buffer[i++] << 16 | buffer[i++] << 24;
+ high = buffer[i++] | buffer[i++] << 8 | buffer[i++] << 16 | buffer[i++] << 24;
+
+ size = high * 4294967296 + (low < 0 ? low + 4294967296 : low); /// from long.toNumber()
+ if (size < JS_INT_MAX && size > JS_INT_MIN) object[name] = size; /// positive # more likely!
+ else object[name] = new Long(low, high); break;
+
+ case 127: /// = BSON.BSON_DATA_MIN_KEY: /// do we EVER actually get these BACK from MongoDB server?!
+ object[name] = new MinKey(); break;
+ case 255: /// = BSON.BSON_DATA_MAX_KEY:
+ object[name] = new MaxKey(); break;
+
+ case 17: /// = BSON.BSON_DATA_TIMESTAMP: /// somewhat obscure internal BSON type; MongoDB uses it for (pseudo) high-res time timestamp (past millisecs precision is just a counter!) in the Oplog ts: field, etc.
+ low = buffer[i++] | buffer[i++] << 8 | buffer[i++] << 16 | buffer[i++] << 24;
+ high = buffer[i++] | buffer[i++] << 8 | buffer[i++] << 16 | buffer[i++] << 24;
+ object[name] = new Timestamp(low, high); break;
+
+/// case 11: /// = RegExp is skipped; we should NEVER be getting any from the MongoDB server!?
+ } /// end of switch(elementType)
+ } /// end of while(1)
+ return object; // Return the finalized object
+}
+
+
+function MinKey() { this._bsontype = 'MinKey'; } /// these are merely placeholders/stubs to signify the type!?
+
+function MaxKey() { this._bsontype = 'MaxKey'; }
+
+function Long(low, high) {
+ this._bsontype = 'Long';
+ this.low_ = low | 0; this.high_ = high | 0; /// force into 32 signed bits.
+}
+Long.prototype.getLowBits = function(){ return this.low_; }
+Long.prototype.getHighBits = function(){ return this.high_; }
+
+Long.prototype.toNumber = function(){
+ return this.high_ * 4294967296 + (this.low_ < 0 ? this.low_ + 4294967296 : this.low_);
+}
+Long.fromNumber = function(num){
+ return new Long(num % 4294967296, num / 4294967296); /// |0 is forced in the constructor!
+}
+function Double(value) {
+ this._bsontype = 'Double';
+ this.value = value;
+}
+function Timestamp(low, high) {
+ this._bsontype = 'Timestamp';
+ this.low_ = low | 0; this.high_ = high | 0; /// force into 32 signed bits.
+}
+Timestamp.prototype.getLowBits = function(){ return this.low_; }
+Timestamp.prototype.getHighBits = function(){ return this.high_; }
+
+/////////////////////////////// ObjectID /////////////////////////////////
+/// machine & proc IDs stored as 1 string, b/c Buffer shouldn't be held for long periods (could use SlowBuffer?!)
+
+var MACHINE = parseInt(Math.random() * 0xFFFFFF, 10);
+var PROCESS = process.pid % 0xFFFF;
+var MACHINE_AND_PROC = encodeIntBE(MACHINE, 3) + encodeIntBE(PROCESS, 2); /// keep as ONE string, ready to go.
+
+function encodeIntBE(data, bytes){ /// encode the bytes to a string
+ var result = '';
+ if (bytes >= 4){ result += String.fromCharCode(Math.floor(data / 0x1000000)); data %= 0x1000000; }
+ if (bytes >= 3){ result += String.fromCharCode(Math.floor(data / 0x10000)); data %= 0x10000; }
+ if (bytes >= 2){ result += String.fromCharCode(Math.floor(data / 0x100)); data %= 0x100; }
+ result += String.fromCharCode(Math.floor(data));
+ return result;
+}
+var _counter = ~~(Math.random() * 0xFFFFFF); /// double-tilde is equivalent to Math.floor()
+var checkForHex = new RegExp('^[0-9a-fA-F]{24}$');
+
+function ObjectID(id) {
+ this._bsontype = 'ObjectID';
+ if (!id){ this.id = createFromScratch(); /// base case, DONE.
+ } else {
+ if (id.constructor === Buffer){
+ this.id = id; /// case of
+ } else if (id.constructor === String) {
+ if ( id.length === 24 && checkForHex.test(id) ) {
+ this.id = new Buffer(id, 'hex');
+ } else {
+ this.id = new Error('Illegal/faulty Hexadecimal string supplied!'); /// changed from 'throw'
+ }
+ } else if (id.constructor === Number) {
+ this.id = createFromTime(id); /// this is what should be the only interface for this!?
+ }
+ }
+}
+function createFromScratch() {
+ var buf = new Buffer(12), i = 0;
+ var ts = ~~(Date.now()/1000); /// 4 bytes timestamp in seconds, BigEndian notation!
+ buf[i++] = (ts >> 24) & 0xFF; buf[i++] = (ts >> 16) & 0xFF;
+ buf[i++] = (ts >> 8) & 0xFF; buf[i++] = (ts) & 0xFF;
+
+ buf.write(MACHINE_AND_PROC, i, 5, 'utf8'); i += 5; /// write 3 bytes + 2 bytes MACHINE_ID and PROCESS_ID
+ _counter = ++_counter % 0xFFFFFF; /// 3 bytes internal _counter for subsecond resolution; BigEndian
+ buf[i++] = (_counter >> 16) & 0xFF;
+ buf[i++] = (_counter >> 8) & 0xFF;
+ buf[i++] = (_counter) & 0xFF;
+ return buf;
+}
+function createFromTime(ts) {
+ ts || ( ts = ~~(Date.now()/1000) ); /// 4 bytes timestamp in seconds only
+ var buf = new Buffer(12), i = 0;
+ buf[i++] = (ts >> 24) & 0xFF; buf[i++] = (ts >> 16) & 0xFF;
+ buf[i++] = (ts >> 8) & 0xFF; buf[i++] = (ts) & 0xFF;
+
+ for (;i < 12; ++i) buf[i] = 0x00; /// indeces 4 through 11 (8 bytes) get filled up with nulls
+ return buf;
+}
+ObjectID.prototype.toHexString = function toHexString() {
+ return this.id.toString('hex');
+}
+ObjectID.prototype.getTimestamp = function getTimestamp() {
+ return this.id.readUIntBE(0, 4);
+}
+ObjectID.prototype.getTimestampDate = function getTimestampDate() {
+ var ts = new Date();
+ ts.setTime(this.id.readUIntBE(0, 4) * 1000);
+ return ts;
+}
+ObjectID.createPk = function createPk () { ///?override if a PrivateKey factory w/ unique factors is warranted?!
+ return new ObjectID();
+}
+ObjectID.prototype.toJSON = function toJSON() {
+ return "ObjectID('" +this.id.toString('hex')+ "')";
+}
+
+/// module.exports.BSON = BSON; /// not needed anymore!? exports.Binary = Binary;
+module.exports.ObjectID = ObjectID;
+module.exports.MinKey = MinKey;
+module.exports.MaxKey = MaxKey;
+module.exports.Long = Long; /// ?! we really don't want to do the complicated Long math anywhere for now!?
+
+//module.exports.Double = Double;
+//module.exports.Timestamp = Timestamp;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/bower.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/bower.json
new file mode 100644
index 0000000..b32140e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/bower.json
@@ -0,0 +1,25 @@
+{
+ "name": "bson",
+ "description": "A bson parser for node.js and the browser",
+ "keywords": [
+ "mongodb",
+ "bson",
+ "parser"
+ ],
+ "author": "Christian Amor Kvalheim <christkv@gmail.com>",
+ "main": "./browser_build/bson.js",
+ "license": "Apache-2.0",
+ "moduleType": [
+ "globals",
+ "node"
+ ],
+ "ignore": [
+ "**/.*",
+ "alternate_parsers",
+ "benchmarks",
+ "bower_components",
+ "node_modules",
+ "test",
+ "tools"
+ ]
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/browser_build/bson.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/browser_build/bson.js
new file mode 100644
index 0000000..8e942dd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/browser_build/bson.js
@@ -0,0 +1,4843 @@
+var bson = (function(){
+
+ var pkgmap = {},
+ global = {},
+ nativeRequire = typeof require != 'undefined' && require,
+ lib, ties, main, async;
+
+ function exports(){ return main(); };
+
+ exports.main = exports;
+ exports.module = module;
+ exports.packages = pkgmap;
+ exports.pkg = pkg;
+ exports.require = function require(uri){
+ return pkgmap.main.index.require(uri);
+ };
+
+
+ ties = {};
+
+ aliases = {};
+
+
+ return exports;
+
+function join() {
+ return normalize(Array.prototype.join.call(arguments, "/"));
+};
+
+function normalize(path) {
+ var ret = [], parts = path.split('/'), cur, prev;
+
+ var i = 0, l = parts.length-1;
+ for (; i <= l; i++) {
+ cur = parts[i];
+
+ if (cur === "." && prev !== undefined) continue;
+
+ if (cur === ".." && ret.length && prev !== ".." && prev !== "." && prev !== undefined) {
+ ret.pop();
+ prev = ret.slice(-1)[0];
+ } else {
+ if (prev === ".") ret.pop();
+ ret.push(cur);
+ prev = cur;
+ }
+ }
+
+ return ret.join("/");
+};
+
+function dirname(path) {
+ return path && path.substr(0, path.lastIndexOf("/")) || ".";
+};
+
+function findModule(workingModule, uri){
+ var moduleId = join(dirname(workingModule.id), /\.\/$/.test(uri) ? (uri + 'index') : uri ).replace(/\.js$/, ''),
+ moduleIndexId = join(moduleId, 'index'),
+ pkg = workingModule.pkg,
+ module;
+
+ var i = pkg.modules.length,
+ id;
+
+ while(i-->0){
+ id = pkg.modules[i].id;
+
+ if(id==moduleId || id == moduleIndexId){
+ module = pkg.modules[i];
+ break;
+ }
+ }
+
+ return module;
+}
+
+function newRequire(callingModule){
+ function require(uri){
+ var module, pkg;
+
+ if(/^\./.test(uri)){
+ module = findModule(callingModule, uri);
+ } else if ( ties && ties.hasOwnProperty( uri ) ) {
+ return ties[uri];
+ } else if ( aliases && aliases.hasOwnProperty( uri ) ) {
+ return require(aliases[uri]);
+ } else {
+ pkg = pkgmap[uri];
+
+ if(!pkg && nativeRequire){
+ try {
+ pkg = nativeRequire(uri);
+ } catch (nativeRequireError) {}
+
+ if(pkg) return pkg;
+ }
+
+ if(!pkg){
+ throw new Error('Cannot find module "'+uri+'" @[module: '+callingModule.id+' package: '+callingModule.pkg.name+']');
+ }
+
+ module = pkg.index;
+ }
+
+ if(!module){
+ throw new Error('Cannot find module "'+uri+'" @[module: '+callingModule.id+' package: '+callingModule.pkg.name+']');
+ }
+
+ module.parent = callingModule;
+ return module.call();
+ };
+
+
+ return require;
+}
+
+
+function module(parent, id, wrapper){
+ var mod = { pkg: parent, id: id, wrapper: wrapper },
+ cached = false;
+
+ mod.exports = {};
+ mod.require = newRequire(mod);
+
+ mod.call = function(){
+ if(cached) {
+ return mod.exports;
+ }
+
+ cached = true;
+
+ global.require = mod.require;
+
+ mod.wrapper(mod, mod.exports, global, global.require);
+ return mod.exports;
+ };
+
+ if(parent.mainModuleId == mod.id){
+ parent.index = mod;
+ parent.parents.length === 0 && ( main = mod.call );
+ }
+
+ parent.modules.push(mod);
+}
+
+function pkg(/* [ parentId ...], wrapper */){
+ var wrapper = arguments[ arguments.length - 1 ],
+ parents = Array.prototype.slice.call(arguments, 0, arguments.length - 1),
+ ctx = wrapper(parents);
+
+
+ pkgmap[ctx.name] = ctx;
+
+ arguments.length == 1 && ( pkgmap.main = ctx );
+
+ return function(modules){
+ var id;
+ for(id in modules){
+ module(ctx, id, modules[id]);
+ }
+ };
+}
+
+
+}(this));
+
+bson.pkg(function(parents){
+
+ return {
+ 'name' : 'bson',
+ 'mainModuleId' : 'bson',
+ 'modules' : [],
+ 'parents' : parents
+ };
+
+})({ 'binary': function(module, exports, global, require, undefined){
+ /**
+ * Module dependencies.
+ */
+if(typeof window === 'undefined') {
+ var Buffer = require('buffer').Buffer; // TODO just use global Buffer
+}
+
+// Binary default subtype
+var BSON_BINARY_SUBTYPE_DEFAULT = 0;
+
+/**
+ * @ignore
+ * @api private
+ */
+var writeStringToArray = function(data) {
+ // Create a buffer
+ var buffer = typeof Uint8Array != 'undefined' ? new Uint8Array(new ArrayBuffer(data.length)) : new Array(data.length);
+ // Write the content to the buffer
+ for(var i = 0; i < data.length; i++) {
+ buffer[i] = data.charCodeAt(i);
+ }
+ // Write the string to the buffer
+ return buffer;
+}
+
+/**
+ * Convert Array ot Uint8Array to Binary String
+ *
+ * @ignore
+ * @api private
+ */
+var convertArraytoUtf8BinaryString = function(byteArray, startIndex, endIndex) {
+ var result = "";
+ for(var i = startIndex; i < endIndex; i++) {
+ result = result + String.fromCharCode(byteArray[i]);
+ }
+ return result;
+};
+
+/**
+ * A class representation of the BSON Binary type.
+ *
+ * Sub types
+ * - **BSON.BSON_BINARY_SUBTYPE_DEFAULT**, default BSON type.
+ * - **BSON.BSON_BINARY_SUBTYPE_FUNCTION**, BSON function type.
+ * - **BSON.BSON_BINARY_SUBTYPE_BYTE_ARRAY**, BSON byte array type.
+ * - **BSON.BSON_BINARY_SUBTYPE_UUID**, BSON uuid type.
+ * - **BSON.BSON_BINARY_SUBTYPE_MD5**, BSON md5 type.
+ * - **BSON.BSON_BINARY_SUBTYPE_USER_DEFINED**, BSON user defined type.
+ *
+ * @class Represents the Binary BSON type.
+ * @param {Buffer} buffer a buffer object containing the binary data.
+ * @param {Number} [subType] the option binary type.
+ * @return {Grid}
+ */
+function Binary(buffer, subType) {
+ if(!(this instanceof Binary)) return new Binary(buffer, subType);
+
+ this._bsontype = 'Binary';
+
+ if(buffer instanceof Number) {
+ this.sub_type = buffer;
+ this.position = 0;
+ } else {
+ this.sub_type = subType == null ? BSON_BINARY_SUBTYPE_DEFAULT : subType;
+ this.position = 0;
+ }
+
+ if(buffer != null && !(buffer instanceof Number)) {
+ // Only accept Buffer, Uint8Array or Arrays
+ if(typeof buffer == 'string') {
+ // Different ways of writing the length of the string for the different types
+ if(typeof Buffer != 'undefined') {
+ this.buffer = new Buffer(buffer);
+ } else if(typeof Uint8Array != 'undefined' || (Object.prototype.toString.call(buffer) == '[object Array]')) {
+ this.buffer = writeStringToArray(buffer);
+ } else {
+ throw new Error("only String, Buffer, Uint8Array or Array accepted");
+ }
+ } else {
+ this.buffer = buffer;
+ }
+ this.position = buffer.length;
+ } else {
+ if(typeof Buffer != 'undefined') {
+ this.buffer = new Buffer(Binary.BUFFER_SIZE);
+ } else if(typeof Uint8Array != 'undefined'){
+ this.buffer = new Uint8Array(new ArrayBuffer(Binary.BUFFER_SIZE));
+ } else {
+ this.buffer = new Array(Binary.BUFFER_SIZE);
+ }
+ // Set position to start of buffer
+ this.position = 0;
+ }
+};
+
+/**
+ * Updates this binary with byte_value.
+ *
+ * @param {Character} byte_value a single byte we wish to write.
+ * @api public
+ */
+Binary.prototype.put = function put(byte_value) {
+ // If it's a string and a has more than one character throw an error
+ if(byte_value['length'] != null && typeof byte_value != 'number' && byte_value.length != 1) throw new Error("only accepts single character String, Uint8Array or Array");
+ if(typeof byte_value != 'number' && byte_value < 0 || byte_value > 255) throw new Error("only accepts number in a valid unsigned byte range 0-255");
+
+ // Decode the byte value once
+ var decoded_byte = null;
+ if(typeof byte_value == 'string') {
+ decoded_byte = byte_value.charCodeAt(0);
+ } else if(byte_value['length'] != null) {
+ decoded_byte = byte_value[0];
+ } else {
+ decoded_byte = byte_value;
+ }
+
+ if(this.buffer.length > this.position) {
+ this.buffer[this.position++] = decoded_byte;
+ } else {
+ if(typeof Buffer != 'undefined' && Buffer.isBuffer(this.buffer)) {
+ // Create additional overflow buffer
+ var buffer = new Buffer(Binary.BUFFER_SIZE + this.buffer.length);
+ // Combine the two buffers together
+ this.buffer.copy(buffer, 0, 0, this.buffer.length);
+ this.buffer = buffer;
+ this.buffer[this.position++] = decoded_byte;
+ } else {
+ var buffer = null;
+ // Create a new buffer (typed or normal array)
+ if(Object.prototype.toString.call(this.buffer) == '[object Uint8Array]') {
+ buffer = new Uint8Array(new ArrayBuffer(Binary.BUFFER_SIZE + this.buffer.length));
+ } else {
+ buffer = new Array(Binary.BUFFER_SIZE + this.buffer.length);
+ }
+
+ // We need to copy all the content to the new array
+ for(var i = 0; i < this.buffer.length; i++) {
+ buffer[i] = this.buffer[i];
+ }
+
+ // Reassign the buffer
+ this.buffer = buffer;
+ // Write the byte
+ this.buffer[this.position++] = decoded_byte;
+ }
+ }
+};
+
+/**
+ * Writes a buffer or string to the binary.
+ *
+ * @param {Buffer|String} string a string or buffer to be written to the Binary BSON object.
+ * @param {Number} offset specify the binary of where to write the content.
+ * @api public
+ */
+Binary.prototype.write = function write(string, offset) {
+ offset = typeof offset == 'number' ? offset : this.position;
+
+ // If the buffer is to small let's extend the buffer
+ if(this.buffer.length < offset + string.length) {
+ var buffer = null;
+ // If we are in node.js
+ if(typeof Buffer != 'undefined' && Buffer.isBuffer(this.buffer)) {
+ buffer = new Buffer(this.buffer.length + string.length);
+ this.buffer.copy(buffer, 0, 0, this.buffer.length);
+ } else if(Object.prototype.toString.call(this.buffer) == '[object Uint8Array]') {
+ // Create a new buffer
+ buffer = new Uint8Array(new ArrayBuffer(this.buffer.length + string.length))
+ // Copy the content
+ for(var i = 0; i < this.position; i++) {
+ buffer[i] = this.buffer[i];
+ }
+ }
+
+ // Assign the new buffer
+ this.buffer = buffer;
+ }
+
+ if(typeof Buffer != 'undefined' && Buffer.isBuffer(string) && Buffer.isBuffer(this.buffer)) {
+ string.copy(this.buffer, offset, 0, string.length);
+ this.position = (offset + string.length) > this.position ? (offset + string.length) : this.position;
+ // offset = string.length
+ } else if(typeof Buffer != 'undefined' && typeof string == 'string' && Buffer.isBuffer(this.buffer)) {
+ this.buffer.write(string, 'binary', offset);
+ this.position = (offset + string.length) > this.position ? (offset + string.length) : this.position;
+ // offset = string.length;
+ } else if(Object.prototype.toString.call(string) == '[object Uint8Array]'
+ || Object.prototype.toString.call(string) == '[object Array]' && typeof string != 'string') {
+ for(var i = 0; i < string.length; i++) {
+ this.buffer[offset++] = string[i];
+ }
+
+ this.position = offset > this.position ? offset : this.position;
+ } else if(typeof string == 'string') {
+ for(var i = 0; i < string.length; i++) {
+ this.buffer[offset++] = string.charCodeAt(i);
+ }
+
+ this.position = offset > this.position ? offset : this.position;
+ }
+};
+
+/**
+ * Reads **length** bytes starting at **position**.
+ *
+ * @param {Number} position read from the given position in the Binary.
+ * @param {Number} length the number of bytes to read.
+ * @return {Buffer}
+ * @api public
+ */
+Binary.prototype.read = function read(position, length) {
+ length = length && length > 0
+ ? length
+ : this.position;
+
+ // Let's return the data based on the type we have
+ if(this.buffer['slice']) {
+ return this.buffer.slice(position, position + length);
+ } else {
+ // Create a buffer to keep the result
+ var buffer = typeof Uint8Array != 'undefined' ? new Uint8Array(new ArrayBuffer(length)) : new Array(length);
+ for(var i = 0; i < length; i++) {
+ buffer[i] = this.buffer[position++];
+ }
+ }
+ // Return the buffer
+ return buffer;
+};
+
+/**
+ * Returns the value of this binary as a string.
+ *
+ * @return {String}
+ * @api public
+ */
+Binary.prototype.value = function value(asRaw) {
+ asRaw = asRaw == null ? false : asRaw;
+
+ // If it's a node.js buffer object
+ if(typeof Buffer != 'undefined' && Buffer.isBuffer(this.buffer)) {
+ return asRaw ? this.buffer.slice(0, this.position) : this.buffer.toString('binary', 0, this.position);
+ } else {
+ if(asRaw) {
+ // we support the slice command use it
+ if(this.buffer['slice'] != null) {
+ return this.buffer.slice(0, this.position);
+ } else {
+ // Create a new buffer to copy content to
+ var newBuffer = Object.prototype.toString.call(this.buffer) == '[object Uint8Array]' ? new Uint8Array(new ArrayBuffer(this.position)) : new Array(this.position);
+ // Copy content
+ for(var i = 0; i < this.position; i++) {
+ newBuffer[i] = this.buffer[i];
+ }
+ // Return the buffer
+ return newBuffer;
+ }
+ } else {
+ return convertArraytoUtf8BinaryString(this.buffer, 0, this.position);
+ }
+ }
+};
+
+/**
+ * Length.
+ *
+ * @return {Number} the length of the binary.
+ * @api public
+ */
+Binary.prototype.length = function length() {
+ return this.position;
+};
+
+/**
+ * @ignore
+ * @api private
+ */
+Binary.prototype.toJSON = function() {
+ return this.buffer != null ? this.buffer.toString('base64') : '';
+}
+
+/**
+ * @ignore
+ * @api private
+ */
+Binary.prototype.toString = function(format) {
+ return this.buffer != null ? this.buffer.slice(0, this.position).toString(format) : '';
+}
+
+Binary.BUFFER_SIZE = 256;
+
+/**
+ * Default BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+Binary.SUBTYPE_DEFAULT = 0;
+/**
+ * Function BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+Binary.SUBTYPE_FUNCTION = 1;
+/**
+ * Byte Array BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+Binary.SUBTYPE_BYTE_ARRAY = 2;
+/**
+ * OLD UUID BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+Binary.SUBTYPE_UUID_OLD = 3;
+/**
+ * UUID BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+Binary.SUBTYPE_UUID = 4;
+/**
+ * MD5 BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+Binary.SUBTYPE_MD5 = 5;
+/**
+ * User BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+Binary.SUBTYPE_USER_DEFINED = 128;
+
+/**
+ * Expose.
+ */
+exports.Binary = Binary;
+
+
+},
+
+
+
+'binary_parser': function(module, exports, global, require, undefined){
+ /**
+ * Binary Parser.
+ * Jonas Raoni Soares Silva
+ * http://jsfromhell.com/classes/binary-parser [v1.0]
+ */
+var chr = String.fromCharCode;
+
+var maxBits = [];
+for (var i = 0; i < 64; i++) {
+ maxBits[i] = Math.pow(2, i);
+}
+
+function BinaryParser (bigEndian, allowExceptions) {
+ if(!(this instanceof BinaryParser)) return new BinaryParser(bigEndian, allowExceptions);
+
+ this.bigEndian = bigEndian;
+ this.allowExceptions = allowExceptions;
+};
+
+BinaryParser.warn = function warn (msg) {
+ if (this.allowExceptions) {
+ throw new Error(msg);
+ }
+
+ return 1;
+};
+
+BinaryParser.decodeFloat = function decodeFloat (data, precisionBits, exponentBits) {
+ var b = new this.Buffer(this.bigEndian, data);
+
+ b.checkBuffer(precisionBits + exponentBits + 1);
+
+ var bias = maxBits[exponentBits - 1] - 1
+ , signal = b.readBits(precisionBits + exponentBits, 1)
+ , exponent = b.readBits(precisionBits, exponentBits)
+ , significand = 0
+ , divisor = 2
+ , curByte = b.buffer.length + (-precisionBits >> 3) - 1;
+
+ do {
+ for (var byteValue = b.buffer[ ++curByte ], startBit = precisionBits % 8 || 8, mask = 1 << startBit; mask >>= 1; ( byteValue & mask ) && ( significand += 1 / divisor ), divisor *= 2 );
+ } while (precisionBits -= startBit);
+
+ return exponent == ( bias << 1 ) + 1 ? significand ? NaN : signal ? -Infinity : +Infinity : ( 1 + signal * -2 ) * ( exponent || significand ? !exponent ? Math.pow( 2, -bias + 1 ) * significand : Math.pow( 2, exponent - bias ) * ( 1 + significand ) : 0 );
+};
+
+BinaryParser.decodeInt = function decodeInt (data, bits, signed, forceBigEndian) {
+ var b = new this.Buffer(this.bigEndian || forceBigEndian, data)
+ , x = b.readBits(0, bits)
+ , max = maxBits[bits]; //max = Math.pow( 2, bits );
+
+ return signed && x >= max / 2
+ ? x - max
+ : x;
+};
+
+BinaryParser.encodeFloat = function encodeFloat (data, precisionBits, exponentBits) {
+ var bias = maxBits[exponentBits - 1] - 1
+ , minExp = -bias + 1
+ , maxExp = bias
+ , minUnnormExp = minExp - precisionBits
+ , n = parseFloat(data)
+ , status = isNaN(n) || n == -Infinity || n == +Infinity ? n : 0
+ , exp = 0
+ , len = 2 * bias + 1 + precisionBits + 3
+ , bin = new Array(len)
+ , signal = (n = status !== 0 ? 0 : n) < 0
+ , intPart = Math.floor(n = Math.abs(n))
+ , floatPart = n - intPart
+ , lastBit
+ , rounded
+ , result
+ , i
+ , j;
+
+ for (i = len; i; bin[--i] = 0);
+
+ for (i = bias + 2; intPart && i; bin[--i] = intPart % 2, intPart = Math.floor(intPart / 2));
+
+ for (i = bias + 1; floatPart > 0 && i; (bin[++i] = ((floatPart *= 2) >= 1) - 0 ) && --floatPart);
+
+ for (i = -1; ++i < len && !bin[i];);
+
+ if (bin[(lastBit = precisionBits - 1 + (i = (exp = bias + 1 - i) >= minExp && exp <= maxExp ? i + 1 : bias + 1 - (exp = minExp - 1))) + 1]) {
+ if (!(rounded = bin[lastBit])) {
+ for (j = lastBit + 2; !rounded && j < len; rounded = bin[j++]);
+ }
+
+ for (j = lastBit + 1; rounded && --j >= 0; (bin[j] = !bin[j] - 0) && (rounded = 0));
+ }
+
+ for (i = i - 2 < 0 ? -1 : i - 3; ++i < len && !bin[i];);
+
+ if ((exp = bias + 1 - i) >= minExp && exp <= maxExp) {
+ ++i;
+ } else if (exp < minExp) {
+ exp != bias + 1 - len && exp < minUnnormExp && this.warn("encodeFloat::float underflow");
+ i = bias + 1 - (exp = minExp - 1);
+ }
+
+ if (intPart || status !== 0) {
+ this.warn(intPart ? "encodeFloat::float overflow" : "encodeFloat::" + status);
+ exp = maxExp + 1;
+ i = bias + 2;
+
+ if (status == -Infinity) {
+ signal = 1;
+ } else if (isNaN(status)) {
+ bin[i] = 1;
+ }
+ }
+
+ for (n = Math.abs(exp + bias), j = exponentBits + 1, result = ""; --j; result = (n % 2) + result, n = n >>= 1);
+
+ for (n = 0, j = 0, i = (result = (signal ? "1" : "0") + result + bin.slice(i, i + precisionBits).join("")).length, r = []; i; j = (j + 1) % 8) {
+ n += (1 << j) * result.charAt(--i);
+ if (j == 7) {
+ r[r.length] = String.fromCharCode(n);
+ n = 0;
+ }
+ }
+
+ r[r.length] = n
+ ? String.fromCharCode(n)
+ : "";
+
+ return (this.bigEndian ? r.reverse() : r).join("");
+};
+
+BinaryParser.encodeInt = function encodeInt (data, bits, signed, forceBigEndian) {
+ var max = maxBits[bits];
+
+ if (data >= max || data < -(max / 2)) {
+ this.warn("encodeInt::overflow");
+ data = 0;
+ }
+
+ if (data < 0) {
+ data += max;
+ }
+
+ for (var r = []; data; r[r.length] = String.fromCharCode(data % 256), data = Math.floor(data / 256));
+
+ for (bits = -(-bits >> 3) - r.length; bits--; r[r.length] = "\0");
+
+ return ((this.bigEndian || forceBigEndian) ? r.reverse() : r).join("");
+};
+
+BinaryParser.toSmall = function( data ){ return this.decodeInt( data, 8, true ); };
+BinaryParser.fromSmall = function( data ){ return this.encodeInt( data, 8, true ); };
+BinaryParser.toByte = function( data ){ return this.decodeInt( data, 8, false ); };
+BinaryParser.fromByte = function( data ){ return this.encodeInt( data, 8, false ); };
+BinaryParser.toShort = function( data ){ return this.decodeInt( data, 16, true ); };
+BinaryParser.fromShort = function( data ){ return this.encodeInt( data, 16, true ); };
+BinaryParser.toWord = function( data ){ return this.decodeInt( data, 16, false ); };
+BinaryParser.fromWord = function( data ){ return this.encodeInt( data, 16, false ); };
+BinaryParser.toInt = function( data ){ return this.decodeInt( data, 32, true ); };
+BinaryParser.fromInt = function( data ){ return this.encodeInt( data, 32, true ); };
+BinaryParser.toLong = function( data ){ return this.decodeInt( data, 64, true ); };
+BinaryParser.fromLong = function( data ){ return this.encodeInt( data, 64, true ); };
+BinaryParser.toDWord = function( data ){ return this.decodeInt( data, 32, false ); };
+BinaryParser.fromDWord = function( data ){ return this.encodeInt( data, 32, false ); };
+BinaryParser.toQWord = function( data ){ return this.decodeInt( data, 64, true ); };
+BinaryParser.fromQWord = function( data ){ return this.encodeInt( data, 64, true ); };
+BinaryParser.toFloat = function( data ){ return this.decodeFloat( data, 23, 8 ); };
+BinaryParser.fromFloat = function( data ){ return this.encodeFloat( data, 23, 8 ); };
+BinaryParser.toDouble = function( data ){ return this.decodeFloat( data, 52, 11 ); };
+BinaryParser.fromDouble = function( data ){ return this.encodeFloat( data, 52, 11 ); };
+
+// Factor out the encode so it can be shared by add_header and push_int32
+BinaryParser.encode_int32 = function encode_int32 (number, asArray) {
+ var a, b, c, d, unsigned;
+ unsigned = (number < 0) ? (number + 0x100000000) : number;
+ a = Math.floor(unsigned / 0xffffff);
+ unsigned &= 0xffffff;
+ b = Math.floor(unsigned / 0xffff);
+ unsigned &= 0xffff;
+ c = Math.floor(unsigned / 0xff);
+ unsigned &= 0xff;
+ d = Math.floor(unsigned);
+ return asArray ? [chr(a), chr(b), chr(c), chr(d)] : chr(a) + chr(b) + chr(c) + chr(d);
+};
+
+BinaryParser.encode_int64 = function encode_int64 (number) {
+ var a, b, c, d, e, f, g, h, unsigned;
+ unsigned = (number < 0) ? (number + 0x10000000000000000) : number;
+ a = Math.floor(unsigned / 0xffffffffffffff);
+ unsigned &= 0xffffffffffffff;
+ b = Math.floor(unsigned / 0xffffffffffff);
+ unsigned &= 0xffffffffffff;
+ c = Math.floor(unsigned / 0xffffffffff);
+ unsigned &= 0xffffffffff;
+ d = Math.floor(unsigned / 0xffffffff);
+ unsigned &= 0xffffffff;
+ e = Math.floor(unsigned / 0xffffff);
+ unsigned &= 0xffffff;
+ f = Math.floor(unsigned / 0xffff);
+ unsigned &= 0xffff;
+ g = Math.floor(unsigned / 0xff);
+ unsigned &= 0xff;
+ h = Math.floor(unsigned);
+ return chr(a) + chr(b) + chr(c) + chr(d) + chr(e) + chr(f) + chr(g) + chr(h);
+};
+
+/**
+ * UTF8 methods
+ */
+
+// Take a raw binary string and return a utf8 string
+BinaryParser.decode_utf8 = function decode_utf8 (binaryStr) {
+ var len = binaryStr.length
+ , decoded = ''
+ , i = 0
+ , c = 0
+ , c1 = 0
+ , c2 = 0
+ , c3;
+
+ while (i < len) {
+ c = binaryStr.charCodeAt(i);
+ if (c < 128) {
+ decoded += String.fromCharCode(c);
+ i++;
+ } else if ((c > 191) && (c < 224)) {
+ c2 = binaryStr.charCodeAt(i+1);
+ decoded += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
+ i += 2;
+ } else {
+ c2 = binaryStr.charCodeAt(i+1);
+ c3 = binaryStr.charCodeAt(i+2);
+ decoded += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
+ i += 3;
+ }
+ }
+
+ return decoded;
+};
+
+// Encode a cstring
+BinaryParser.encode_cstring = function encode_cstring (s) {
+ return unescape(encodeURIComponent(s)) + BinaryParser.fromByte(0);
+};
+
+// Take a utf8 string and return a binary string
+BinaryParser.encode_utf8 = function encode_utf8 (s) {
+ var a = ""
+ , c;
+
+ for (var n = 0, len = s.length; n < len; n++) {
+ c = s.charCodeAt(n);
+
+ if (c < 128) {
+ a += String.fromCharCode(c);
+ } else if ((c > 127) && (c < 2048)) {
+ a += String.fromCharCode((c>>6) | 192) ;
+ a += String.fromCharCode((c&63) | 128);
+ } else {
+ a += String.fromCharCode((c>>12) | 224);
+ a += String.fromCharCode(((c>>6) & 63) | 128);
+ a += String.fromCharCode((c&63) | 128);
+ }
+ }
+
+ return a;
+};
+
+BinaryParser.hprint = function hprint (s) {
+ var number;
+
+ for (var i = 0, len = s.length; i < len; i++) {
+ if (s.charCodeAt(i) < 32) {
+ number = s.charCodeAt(i) <= 15
+ ? "0" + s.charCodeAt(i).toString(16)
+ : s.charCodeAt(i).toString(16);
+ process.stdout.write(number + " ")
+ } else {
+ number = s.charCodeAt(i) <= 15
+ ? "0" + s.charCodeAt(i).toString(16)
+ : s.charCodeAt(i).toString(16);
+ process.stdout.write(number + " ")
+ }
+ }
+
+ process.stdout.write("\n\n");
+};
+
+BinaryParser.ilprint = function hprint (s) {
+ var number;
+
+ for (var i = 0, len = s.length; i < len; i++) {
+ if (s.charCodeAt(i) < 32) {
+ number = s.charCodeAt(i) <= 15
+ ? "0" + s.charCodeAt(i).toString(10)
+ : s.charCodeAt(i).toString(10);
+
+ require('util').debug(number+' : ');
+ } else {
+ number = s.charCodeAt(i) <= 15
+ ? "0" + s.charCodeAt(i).toString(10)
+ : s.charCodeAt(i).toString(10);
+ require('util').debug(number+' : '+ s.charAt(i));
+ }
+ }
+};
+
+BinaryParser.hlprint = function hprint (s) {
+ var number;
+
+ for (var i = 0, len = s.length; i < len; i++) {
+ if (s.charCodeAt(i) < 32) {
+ number = s.charCodeAt(i) <= 15
+ ? "0" + s.charCodeAt(i).toString(16)
+ : s.charCodeAt(i).toString(16);
+ require('util').debug(number+' : ');
+ } else {
+ number = s.charCodeAt(i) <= 15
+ ? "0" + s.charCodeAt(i).toString(16)
+ : s.charCodeAt(i).toString(16);
+ require('util').debug(number+' : '+ s.charAt(i));
+ }
+ }
+};
+
+/**
+ * BinaryParser buffer constructor.
+ */
+function BinaryParserBuffer (bigEndian, buffer) {
+ this.bigEndian = bigEndian || 0;
+ this.buffer = [];
+ this.setBuffer(buffer);
+};
+
+BinaryParserBuffer.prototype.setBuffer = function setBuffer (data) {
+ var l, i, b;
+
+ if (data) {
+ i = l = data.length;
+ b = this.buffer = new Array(l);
+ for (; i; b[l - i] = data.charCodeAt(--i));
+ this.bigEndian && b.reverse();
+ }
+};
+
+BinaryParserBuffer.prototype.hasNeededBits = function hasNeededBits (neededBits) {
+ return this.buffer.length >= -(-neededBits >> 3);
+};
+
+BinaryParserBuffer.prototype.checkBuffer = function checkBuffer (neededBits) {
+ if (!this.hasNeededBits(neededBits)) {
+ throw new Error("checkBuffer::missing bytes");
+ }
+};
+
+BinaryParserBuffer.prototype.readBits = function readBits (start, length) {
+ //shl fix: Henri Torgemane ~1996 (compressed by Jonas Raoni)
+
+ function shl (a, b) {
+ for (; b--; a = ((a %= 0x7fffffff + 1) & 0x40000000) == 0x40000000 ? a * 2 : (a - 0x40000000) * 2 + 0x7fffffff + 1);
+ return a;
+ }
+
+ if (start < 0 || length <= 0) {
+ return 0;
+ }
+
+ this.checkBuffer(start + length);
+
+ var offsetLeft
+ , offsetRight = start % 8
+ , curByte = this.buffer.length - ( start >> 3 ) - 1
+ , lastByte = this.buffer.length + ( -( start + length ) >> 3 )
+ , diff = curByte - lastByte
+ , sum = ((this.buffer[ curByte ] >> offsetRight) & ((1 << (diff ? 8 - offsetRight : length)) - 1)) + (diff && (offsetLeft = (start + length) % 8) ? (this.buffer[lastByte++] & ((1 << offsetLeft) - 1)) << (diff-- << 3) - offsetRight : 0);
+
+ for(; diff; sum += shl(this.buffer[lastByte++], (diff-- << 3) - offsetRight));
+
+ return sum;
+};
+
+/**
+ * Expose.
+ */
+BinaryParser.Buffer = BinaryParserBuffer;
+
+exports.BinaryParser = BinaryParser;
+
+},
+
+
+
+'bson': function(module, exports, global, require, undefined){
+ var Long = require('./long').Long
+ , Double = require('./double').Double
+ , Timestamp = require('./timestamp').Timestamp
+ , ObjectID = require('./objectid').ObjectID
+ , Symbol = require('./symbol').Symbol
+ , Code = require('./code').Code
+ , MinKey = require('./min_key').MinKey
+ , MaxKey = require('./max_key').MaxKey
+ , DBRef = require('./db_ref').DBRef
+ , Binary = require('./binary').Binary
+ , BinaryParser = require('./binary_parser').BinaryParser
+ , writeIEEE754 = require('./float_parser').writeIEEE754
+ , readIEEE754 = require('./float_parser').readIEEE754
+
+// To ensure that 0.4 of node works correctly
+var isDate = function isDate(d) {
+ return typeof d === 'object' && Object.prototype.toString.call(d) === '[object Date]';
+}
+
+/**
+ * Create a new BSON instance
+ *
+ * @class Represents the BSON Parser
+ * @return {BSON} instance of BSON Parser.
+ */
+function BSON () {};
+
+/**
+ * @ignore
+ * @api private
+ */
+// BSON MAX VALUES
+BSON.BSON_INT32_MAX = 0x7FFFFFFF;
+BSON.BSON_INT32_MIN = -0x80000000;
+
+BSON.BSON_INT64_MAX = Math.pow(2, 63) - 1;
+BSON.BSON_INT64_MIN = -Math.pow(2, 63);
+
+// JS MAX PRECISE VALUES
+BSON.JS_INT_MAX = 0x20000000000000; // Any integer up to 2^53 can be precisely represented by a double.
+BSON.JS_INT_MIN = -0x20000000000000; // Any integer down to -2^53 can be precisely represented by a double.
+
+// Internal long versions
+var JS_INT_MAX_LONG = Long.fromNumber(0x20000000000000); // Any integer up to 2^53 can be precisely represented by a double.
+var JS_INT_MIN_LONG = Long.fromNumber(-0x20000000000000); // Any integer down to -2^53 can be precisely represented by a double.
+
+/**
+ * Number BSON Type
+ *
+ * @classconstant BSON_DATA_NUMBER
+ **/
+BSON.BSON_DATA_NUMBER = 1;
+/**
+ * String BSON Type
+ *
+ * @classconstant BSON_DATA_STRING
+ **/
+BSON.BSON_DATA_STRING = 2;
+/**
+ * Object BSON Type
+ *
+ * @classconstant BSON_DATA_OBJECT
+ **/
+BSON.BSON_DATA_OBJECT = 3;
+/**
+ * Array BSON Type
+ *
+ * @classconstant BSON_DATA_ARRAY
+ **/
+BSON.BSON_DATA_ARRAY = 4;
+/**
+ * Binary BSON Type
+ *
+ * @classconstant BSON_DATA_BINARY
+ **/
+BSON.BSON_DATA_BINARY = 5;
+/**
+ * ObjectID BSON Type
+ *
+ * @classconstant BSON_DATA_OID
+ **/
+BSON.BSON_DATA_OID = 7;
+/**
+ * Boolean BSON Type
+ *
+ * @classconstant BSON_DATA_BOOLEAN
+ **/
+BSON.BSON_DATA_BOOLEAN = 8;
+/**
+ * Date BSON Type
+ *
+ * @classconstant BSON_DATA_DATE
+ **/
+BSON.BSON_DATA_DATE = 9;
+/**
+ * null BSON Type
+ *
+ * @classconstant BSON_DATA_NULL
+ **/
+BSON.BSON_DATA_NULL = 10;
+/**
+ * RegExp BSON Type
+ *
+ * @classconstant BSON_DATA_REGEXP
+ **/
+BSON.BSON_DATA_REGEXP = 11;
+/**
+ * Code BSON Type
+ *
+ * @classconstant BSON_DATA_CODE
+ **/
+BSON.BSON_DATA_CODE = 13;
+/**
+ * Symbol BSON Type
+ *
+ * @classconstant BSON_DATA_SYMBOL
+ **/
+BSON.BSON_DATA_SYMBOL = 14;
+/**
+ * Code with Scope BSON Type
+ *
+ * @classconstant BSON_DATA_CODE_W_SCOPE
+ **/
+BSON.BSON_DATA_CODE_W_SCOPE = 15;
+/**
+ * 32 bit Integer BSON Type
+ *
+ * @classconstant BSON_DATA_INT
+ **/
+BSON.BSON_DATA_INT = 16;
+/**
+ * Timestamp BSON Type
+ *
+ * @classconstant BSON_DATA_TIMESTAMP
+ **/
+BSON.BSON_DATA_TIMESTAMP = 17;
+/**
+ * Long BSON Type
+ *
+ * @classconstant BSON_DATA_LONG
+ **/
+BSON.BSON_DATA_LONG = 18;
+/**
+ * MinKey BSON Type
+ *
+ * @classconstant BSON_DATA_MIN_KEY
+ **/
+BSON.BSON_DATA_MIN_KEY = 0xff;
+/**
+ * MaxKey BSON Type
+ *
+ * @classconstant BSON_DATA_MAX_KEY
+ **/
+BSON.BSON_DATA_MAX_KEY = 0x7f;
+
+/**
+ * Binary Default Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_DEFAULT
+ **/
+BSON.BSON_BINARY_SUBTYPE_DEFAULT = 0;
+/**
+ * Binary Function Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_FUNCTION
+ **/
+BSON.BSON_BINARY_SUBTYPE_FUNCTION = 1;
+/**
+ * Binary Byte Array Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_BYTE_ARRAY
+ **/
+BSON.BSON_BINARY_SUBTYPE_BYTE_ARRAY = 2;
+/**
+ * Binary UUID Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_UUID
+ **/
+BSON.BSON_BINARY_SUBTYPE_UUID = 3;
+/**
+ * Binary MD5 Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_MD5
+ **/
+BSON.BSON_BINARY_SUBTYPE_MD5 = 4;
+/**
+ * Binary User Defined Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_USER_DEFINED
+ **/
+BSON.BSON_BINARY_SUBTYPE_USER_DEFINED = 128;
+
+/**
+ * Calculate the bson size for a passed in Javascript object.
+ *
+ * @param {Object} object the Javascript object to calculate the BSON byte size for.
+ * @param {Boolean} [serializeFunctions] serialize all functions in the object **(default:false)**.
+ * @return {Number} returns the number of bytes the BSON object will take up.
+ * @api public
+ */
+BSON.calculateObjectSize = function calculateObjectSize(object, serializeFunctions) {
+ var totalLength = (4 + 1);
+
+ if(Array.isArray(object)) {
+ for(var i = 0; i < object.length; i++) {
+ totalLength += calculateElement(i.toString(), object[i], serializeFunctions)
+ }
+ } else {
+ // If we have toBSON defined, override the current object
+ if(object.toBSON) {
+ object = object.toBSON();
+ }
+
+ // Calculate size
+ for(var key in object) {
+ totalLength += calculateElement(key, object[key], serializeFunctions)
+ }
+ }
+
+ return totalLength;
+}
+
+/**
+ * @ignore
+ * @api private
+ */
+function calculateElement(name, value, serializeFunctions) {
+ var isBuffer = typeof Buffer !== 'undefined';
+
+ switch(typeof value) {
+ case 'string':
+ return 1 + (!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1 + 4 + (!isBuffer ? numberOfBytes(value) : Buffer.byteLength(value, 'utf8')) + 1;
+ case 'number':
+ if(Math.floor(value) === value && value >= BSON.JS_INT_MIN && value <= BSON.JS_INT_MAX) {
+ if(value >= BSON.BSON_INT32_MIN && value <= BSON.BSON_INT32_MAX) { // 32 bit
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (4 + 1);
+ } else {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (8 + 1);
+ }
+ } else { // 64 bit
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (8 + 1);
+ }
+ case 'undefined':
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (1);
+ case 'boolean':
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (1 + 1);
+ case 'object':
+ if(value == null || value instanceof MinKey || value instanceof MaxKey || value['_bsontype'] == 'MinKey' || value['_bsontype'] == 'MaxKey') {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (1);
+ } else if(value instanceof ObjectID || value['_bsontype'] == 'ObjectID') {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (12 + 1);
+ } else if(value instanceof Date || isDate(value)) {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (8 + 1);
+ } else if(typeof Buffer !== 'undefined' && Buffer.isBuffer(value)) {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (1 + 4 + 1) + value.length;
+ } else if(value instanceof Long || value instanceof Double || value instanceof Timestamp
+ || value['_bsontype'] == 'Long' || value['_bsontype'] == 'Double' || value['_bsontype'] == 'Timestamp') {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (8 + 1);
+ } else if(value instanceof Code || value['_bsontype'] == 'Code') {
+ // Calculate size depending on the availability of a scope
+ if(value.scope != null && Object.keys(value.scope).length > 0) {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + 1 + 4 + 4 + (!isBuffer ? numberOfBytes(value.code.toString()) : Buffer.byteLength(value.code.toString(), 'utf8')) + 1 + BSON.calculateObjectSize(value.scope, serializeFunctions);
+ } else {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + 1 + 4 + (!isBuffer ? numberOfBytes(value.code.toString()) : Buffer.byteLength(value.code.toString(), 'utf8')) + 1;
+ }
+ } else if(value instanceof Binary || value['_bsontype'] == 'Binary') {
+ // Check what kind of subtype we have
+ if(value.sub_type == Binary.SUBTYPE_BYTE_ARRAY) {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (value.position + 1 + 4 + 1 + 4);
+ } else {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + (value.position + 1 + 4 + 1);
+ }
+ } else if(value instanceof Symbol || value['_bsontype'] == 'Symbol') {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + ((!isBuffer ? numberOfBytes(value.value) : Buffer.byteLength(value.value, 'utf8')) + 4 + 1 + 1);
+ } else if(value instanceof DBRef || value['_bsontype'] == 'DBRef') {
+ // Set up correct object for serialization
+ var ordered_values = {
+ '$ref': value.namespace
+ , '$id' : value.oid
+ };
+
+ // Add db reference if it exists
+ if(null != value.db) {
+ ordered_values['$db'] = value.db;
+ }
+
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + 1 + BSON.calculateObjectSize(ordered_values, serializeFunctions);
+ } else if(value instanceof RegExp || Object.prototype.toString.call(value) === '[object RegExp]') {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + 1 + (!isBuffer ? numberOfBytes(value.source) : Buffer.byteLength(value.source, 'utf8')) + 1
+ + (value.global ? 1 : 0) + (value.ignoreCase ? 1 : 0) + (value.multiline ? 1 : 0) + 1
+ } else {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + BSON.calculateObjectSize(value, serializeFunctions) + 1;
+ }
+ case 'function':
+ // WTF for 0.4.X where typeof /someregexp/ === 'function'
+ if(value instanceof RegExp || Object.prototype.toString.call(value) === '[object RegExp]' || String.call(value) == '[object RegExp]') {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + 1 + (!isBuffer ? numberOfBytes(value.source) : Buffer.byteLength(value.source, 'utf8')) + 1
+ + (value.global ? 1 : 0) + (value.ignoreCase ? 1 : 0) + (value.multiline ? 1 : 0) + 1
+ } else {
+ if(serializeFunctions && value.scope != null && Object.keys(value.scope).length > 0) {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + 1 + 4 + 4 + (!isBuffer ? numberOfBytes(value.toString()) : Buffer.byteLength(value.toString(), 'utf8')) + 1 + BSON.calculateObjectSize(value.scope, serializeFunctions);
+ } else if(serializeFunctions) {
+ return (name != null ? ((!isBuffer ? numberOfBytes(name) : Buffer.byteLength(name, 'utf8')) + 1) : 0) + 1 + 4 + (!isBuffer ? numberOfBytes(value.toString()) : Buffer.byteLength(value.toString(), 'utf8')) + 1;
+ }
+ }
+ }
+
+ return 0;
+}
+
+/**
+ * Serialize a Javascript object using a predefined Buffer and index into the buffer, useful when pre-allocating the space for serialization.
+ *
+ * @param {Object} object the Javascript object to serialize.
+ * @param {Boolean} checkKeys the serializer will check if keys are valid.
+ * @param {Buffer} buffer the Buffer you pre-allocated to store the serialized BSON object.
+ * @param {Number} index the index in the buffer where we wish to start serializing into.
+ * @param {Boolean} serializeFunctions serialize the javascript functions **(default:false)**.
+ * @return {Number} returns the new write index in the Buffer.
+ * @api public
+ */
+BSON.serializeWithBufferAndIndex = function serializeWithBufferAndIndex(object, checkKeys, buffer, index, serializeFunctions) {
+ // Default setting false
+ serializeFunctions = serializeFunctions == null ? false : serializeFunctions;
+ // Write end information (length of the object)
+ var size = buffer.length;
+ // Write the size of the object
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ return serializeObject(object, checkKeys, buffer, index, serializeFunctions) - 1;
+}
+
+/**
+ * @ignore
+ * @api private
+ */
+var serializeObject = function(object, checkKeys, buffer, index, serializeFunctions) {
+ // Process the object
+ if(Array.isArray(object)) {
+ for(var i = 0; i < object.length; i++) {
+ index = packElement(i.toString(), object[i], checkKeys, buffer, index, serializeFunctions);
+ }
+ } else {
+ // If we have toBSON defined, override the current object
+ if(object.toBSON) {
+ object = object.toBSON();
+ }
+
+ // Serialize the object
+ for(var key in object) {
+ // Check the key and throw error if it's illegal
+ if (key != '$db' && key != '$ref' && key != '$id') {
+ // dollars and dots ok
+ BSON.checkKey(key, !checkKeys);
+ }
+
+ // Pack the element
+ index = packElement(key, object[key], checkKeys, buffer, index, serializeFunctions);
+ }
+ }
+
+ // Write zero
+ buffer[index++] = 0;
+ return index;
+}
+
+var stringToBytes = function(str) {
+ var ch, st, re = [];
+ for (var i = 0; i < str.length; i++ ) {
+ ch = str.charCodeAt(i); // get char
+ st = []; // set up "stack"
+ do {
+ st.push( ch & 0xFF ); // push byte to stack
+ ch = ch >> 8; // shift value down by 1 byte
+ }
+ while ( ch );
+ // add stack contents to result
+ // done because chars have "wrong" endianness
+ re = re.concat( st.reverse() );
+ }
+ // return an array of bytes
+ return re;
+}
+
+var numberOfBytes = function(str) {
+ var ch, st, re = 0;
+ for (var i = 0; i < str.length; i++ ) {
+ ch = str.charCodeAt(i); // get char
+ st = []; // set up "stack"
+ do {
+ st.push( ch & 0xFF ); // push byte to stack
+ ch = ch >> 8; // shift value down by 1 byte
+ }
+ while ( ch );
+ // add stack contents to result
+ // done because chars have "wrong" endianness
+ re = re + st.length;
+ }
+ // return an array of bytes
+ return re;
+}
+
+/**
+ * @ignore
+ * @api private
+ */
+var writeToTypedArray = function(buffer, string, index) {
+ var bytes = stringToBytes(string);
+ for(var i = 0; i < bytes.length; i++) {
+ buffer[index + i] = bytes[i];
+ }
+ return bytes.length;
+}
+
+/**
+ * @ignore
+ * @api private
+ */
+var supportsBuffer = typeof Buffer != 'undefined';
+
+/**
+ * @ignore
+ * @api private
+ */
+var packElement = function(name, value, checkKeys, buffer, index, serializeFunctions) {
+ var startIndex = index;
+
+ switch(typeof value) {
+ case 'string':
+ // Encode String type
+ buffer[index++] = BSON.BSON_DATA_STRING;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+
+ // Calculate size
+ var size = supportsBuffer ? Buffer.byteLength(value) + 1 : numberOfBytes(value) + 1;
+ // Write the size of the string to buffer
+ buffer[index + 3] = (size >> 24) & 0xff;
+ buffer[index + 2] = (size >> 16) & 0xff;
+ buffer[index + 1] = (size >> 8) & 0xff;
+ buffer[index] = size & 0xff;
+ // Ajust the index
+ index = index + 4;
+ // Write the string
+ supportsBuffer ? buffer.write(value, index, 'utf8') : writeToTypedArray(buffer, value, index);
+ // Update index
+ index = index + size - 1;
+ // Write zero
+ buffer[index++] = 0;
+ // Return index
+ return index;
+ case 'number':
+ // We have an integer value
+ if(Math.floor(value) === value && value >= BSON.JS_INT_MIN && value <= BSON.JS_INT_MAX) {
+ // If the value fits in 32 bits encode as int, if it fits in a double
+ // encode it as a double, otherwise long
+ if(value >= BSON.BSON_INT32_MIN && value <= BSON.BSON_INT32_MAX) {
+ // Set int type 32 bits or less
+ buffer[index++] = BSON.BSON_DATA_INT;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Write the int value
+ buffer[index++] = value & 0xff;
+ buffer[index++] = (value >> 8) & 0xff;
+ buffer[index++] = (value >> 16) & 0xff;
+ buffer[index++] = (value >> 24) & 0xff;
+ } else if(value >= BSON.JS_INT_MIN && value <= BSON.JS_INT_MAX) {
+ // Encode as double
+ buffer[index++] = BSON.BSON_DATA_NUMBER;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Write float
+ writeIEEE754(buffer, value, index, 'little', 52, 8);
+ // Ajust index
+ index = index + 8;
+ } else {
+ // Set long type
+ buffer[index++] = BSON.BSON_DATA_LONG;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ var longVal = Long.fromNumber(value);
+ var lowBits = longVal.getLowBits();
+ var highBits = longVal.getHighBits();
+ // Encode low bits
+ buffer[index++] = lowBits & 0xff;
+ buffer[index++] = (lowBits >> 8) & 0xff;
+ buffer[index++] = (lowBits >> 16) & 0xff;
+ buffer[index++] = (lowBits >> 24) & 0xff;
+ // Encode high bits
+ buffer[index++] = highBits & 0xff;
+ buffer[index++] = (highBits >> 8) & 0xff;
+ buffer[index++] = (highBits >> 16) & 0xff;
+ buffer[index++] = (highBits >> 24) & 0xff;
+ }
+ } else {
+ // Encode as double
+ buffer[index++] = BSON.BSON_DATA_NUMBER;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Write float
+ writeIEEE754(buffer, value, index, 'little', 52, 8);
+ // Ajust index
+ index = index + 8;
+ }
+
+ return index;
+ case 'undefined':
+ // Set long type
+ buffer[index++] = BSON.BSON_DATA_NULL;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ return index;
+ case 'boolean':
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_BOOLEAN;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Encode the boolean value
+ buffer[index++] = value ? 1 : 0;
+ return index;
+ case 'object':
+ if(value === null || value instanceof MinKey || value instanceof MaxKey
+ || value['_bsontype'] == 'MinKey' || value['_bsontype'] == 'MaxKey') {
+ // Write the type of either min or max key
+ if(value === null) {
+ buffer[index++] = BSON.BSON_DATA_NULL;
+ } else if(value instanceof MinKey) {
+ buffer[index++] = BSON.BSON_DATA_MIN_KEY;
+ } else {
+ buffer[index++] = BSON.BSON_DATA_MAX_KEY;
+ }
+
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ return index;
+ } else if(value instanceof ObjectID || value['_bsontype'] == 'ObjectID') {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_OID;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+
+ // Write objectid
+ supportsBuffer ? buffer.write(value.id, index, 'binary') : writeToTypedArray(buffer, value.id, index);
+ // Ajust index
+ index = index + 12;
+ return index;
+ } else if(value instanceof Date || isDate(value)) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_DATE;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+
+ // Write the date
+ var dateInMilis = Long.fromNumber(value.getTime());
+ var lowBits = dateInMilis.getLowBits();
+ var highBits = dateInMilis.getHighBits();
+ // Encode low bits
+ buffer[index++] = lowBits & 0xff;
+ buffer[index++] = (lowBits >> 8) & 0xff;
+ buffer[index++] = (lowBits >> 16) & 0xff;
+ buffer[index++] = (lowBits >> 24) & 0xff;
+ // Encode high bits
+ buffer[index++] = highBits & 0xff;
+ buffer[index++] = (highBits >> 8) & 0xff;
+ buffer[index++] = (highBits >> 16) & 0xff;
+ buffer[index++] = (highBits >> 24) & 0xff;
+ return index;
+ } else if(typeof Buffer !== 'undefined' && Buffer.isBuffer(value)) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_BINARY;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Get size of the buffer (current write point)
+ var size = value.length;
+ // Write the size of the string to buffer
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ // Write the default subtype
+ buffer[index++] = BSON.BSON_BINARY_SUBTYPE_DEFAULT;
+ // Copy the content form the binary field to the buffer
+ value.copy(buffer, index, 0, size);
+ // Adjust the index
+ index = index + size;
+ return index;
+ } else if(value instanceof Long || value instanceof Timestamp || value['_bsontype'] == 'Long' || value['_bsontype'] == 'Timestamp') {
+ // Write the type
+ buffer[index++] = value instanceof Long ? BSON.BSON_DATA_LONG : BSON.BSON_DATA_TIMESTAMP;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Write the date
+ var lowBits = value.getLowBits();
+ var highBits = value.getHighBits();
+ // Encode low bits
+ buffer[index++] = lowBits & 0xff;
+ buffer[index++] = (lowBits >> 8) & 0xff;
+ buffer[index++] = (lowBits >> 16) & 0xff;
+ buffer[index++] = (lowBits >> 24) & 0xff;
+ // Encode high bits
+ buffer[index++] = highBits & 0xff;
+ buffer[index++] = (highBits >> 8) & 0xff;
+ buffer[index++] = (highBits >> 16) & 0xff;
+ buffer[index++] = (highBits >> 24) & 0xff;
+ return index;
+ } else if(value instanceof Double || value['_bsontype'] == 'Double') {
+ // Encode as double
+ buffer[index++] = BSON.BSON_DATA_NUMBER;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Write float
+ writeIEEE754(buffer, value, index, 'little', 52, 8);
+ // Ajust index
+ index = index + 8;
+ return index;
+ } else if(value instanceof Code || value['_bsontype'] == 'Code') {
+ if(value.scope != null && Object.keys(value.scope).length > 0) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_CODE_W_SCOPE;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Calculate the scope size
+ var scopeSize = BSON.calculateObjectSize(value.scope, serializeFunctions);
+ // Function string
+ var functionString = value.code.toString();
+ // Function Size
+ var codeSize = supportsBuffer ? Buffer.byteLength(functionString) + 1 : numberOfBytes(functionString) + 1;
+
+ // Calculate full size of the object
+ var totalSize = 4 + codeSize + scopeSize + 4;
+
+ // Write the total size of the object
+ buffer[index++] = totalSize & 0xff;
+ buffer[index++] = (totalSize >> 8) & 0xff;
+ buffer[index++] = (totalSize >> 16) & 0xff;
+ buffer[index++] = (totalSize >> 24) & 0xff;
+
+ // Write the size of the string to buffer
+ buffer[index++] = codeSize & 0xff;
+ buffer[index++] = (codeSize >> 8) & 0xff;
+ buffer[index++] = (codeSize >> 16) & 0xff;
+ buffer[index++] = (codeSize >> 24) & 0xff;
+
+ // Write the string
+ supportsBuffer ? buffer.write(functionString, index, 'utf8') : writeToTypedArray(buffer, functionString, index);
+ // Update index
+ index = index + codeSize - 1;
+ // Write zero
+ buffer[index++] = 0;
+ // Serialize the scope object
+ var scopeObjectBuffer = supportsBuffer ? new Buffer(scopeSize) : new Uint8Array(new ArrayBuffer(scopeSize));
+ // Execute the serialization into a seperate buffer
+ serializeObject(value.scope, checkKeys, scopeObjectBuffer, 0, serializeFunctions);
+
+ // Adjusted scope Size (removing the header)
+ var scopeDocSize = scopeSize;
+ // Write scope object size
+ buffer[index++] = scopeDocSize & 0xff;
+ buffer[index++] = (scopeDocSize >> 8) & 0xff;
+ buffer[index++] = (scopeDocSize >> 16) & 0xff;
+ buffer[index++] = (scopeDocSize >> 24) & 0xff;
+
+ // Write the scopeObject into the buffer
+ supportsBuffer ? scopeObjectBuffer.copy(buffer, index, 0, scopeSize) : buffer.set(scopeObjectBuffer, index);
+ // Adjust index, removing the empty size of the doc (5 bytes 0000000005)
+ index = index + scopeDocSize - 5;
+ // Write trailing zero
+ buffer[index++] = 0;
+ return index
+ } else {
+ buffer[index++] = BSON.BSON_DATA_CODE;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Function string
+ var functionString = value.code.toString();
+ // Function Size
+ var size = supportsBuffer ? Buffer.byteLength(functionString) + 1 : numberOfBytes(functionString) + 1;
+ // Write the size of the string to buffer
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ // Write the string
+ supportsBuffer ? buffer.write(functionString, index, 'utf8') : writeToTypedArray(buffer, functionString, index);
+ // Update index
+ index = index + size - 1;
+ // Write zero
+ buffer[index++] = 0;
+ return index;
+ }
+ } else if(value instanceof Binary || value['_bsontype'] == 'Binary') {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_BINARY;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Extract the buffer
+ var data = value.value(true);
+ // Calculate size
+ var size = value.position;
+ // Write the size of the string to buffer
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ // Write the subtype to the buffer
+ buffer[index++] = value.sub_type;
+
+ // If we have binary type 2 the 4 first bytes are the size
+ if(value.sub_type == Binary.SUBTYPE_BYTE_ARRAY) {
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ }
+
+ // Write the data to the object
+ supportsBuffer ? data.copy(buffer, index, 0, value.position) : buffer.set(data, index);
+ // Ajust index
+ index = index + value.position;
+ return index;
+ } else if(value instanceof Symbol || value['_bsontype'] == 'Symbol') {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_SYMBOL;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Calculate size
+ var size = supportsBuffer ? Buffer.byteLength(value.value) + 1 : numberOfBytes(value.value) + 1;
+ // Write the size of the string to buffer
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ // Write the string
+ buffer.write(value.value, index, 'utf8');
+ // Update index
+ index = index + size - 1;
+ // Write zero
+ buffer[index++] = 0x00;
+ return index;
+ } else if(value instanceof DBRef || value['_bsontype'] == 'DBRef') {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_OBJECT;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Set up correct object for serialization
+ var ordered_values = {
+ '$ref': value.namespace
+ , '$id' : value.oid
+ };
+
+ // Add db reference if it exists
+ if(null != value.db) {
+ ordered_values['$db'] = value.db;
+ }
+
+ // Message size
+ var size = BSON.calculateObjectSize(ordered_values, serializeFunctions);
+ // Serialize the object
+ var endIndex = BSON.serializeWithBufferAndIndex(ordered_values, checkKeys, buffer, index, serializeFunctions);
+ // Write the size of the string to buffer
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ // Write zero for object
+ buffer[endIndex++] = 0x00;
+ // Return the end index
+ return endIndex;
+ } else if(value instanceof RegExp || Object.prototype.toString.call(value) === '[object RegExp]') {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_REGEXP;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+
+ // Write the regular expression string
+ supportsBuffer ? buffer.write(value.source, index, 'utf8') : writeToTypedArray(buffer, value.source, index);
+ // Adjust the index
+ index = index + (supportsBuffer ? Buffer.byteLength(value.source) : numberOfBytes(value.source));
+ // Write zero
+ buffer[index++] = 0x00;
+ // Write the parameters
+ if(value.global) buffer[index++] = 0x73; // s
+ if(value.ignoreCase) buffer[index++] = 0x69; // i
+ if(value.multiline) buffer[index++] = 0x6d; // m
+ // Add ending zero
+ buffer[index++] = 0x00;
+ return index;
+ } else {
+ // Write the type
+ buffer[index++] = Array.isArray(value) ? BSON.BSON_DATA_ARRAY : BSON.BSON_DATA_OBJECT;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Adjust the index
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ var endIndex = serializeObject(value, checkKeys, buffer, index + 4, serializeFunctions);
+ // Write size
+ var size = endIndex - index;
+ // Write the size of the string to buffer
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ return endIndex;
+ }
+ case 'function':
+ // WTF for 0.4.X where typeof /someregexp/ === 'function'
+ if(value instanceof RegExp || Object.prototype.toString.call(value) === '[object RegExp]' || String.call(value) == '[object RegExp]') {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_REGEXP;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+
+ // Write the regular expression string
+ buffer.write(value.source, index, 'utf8');
+ // Adjust the index
+ index = index + (supportsBuffer ? Buffer.byteLength(value.source) : numberOfBytes(value.source));
+ // Write zero
+ buffer[index++] = 0x00;
+ // Write the parameters
+ if(value.global) buffer[index++] = 0x73; // s
+ if(value.ignoreCase) buffer[index++] = 0x69; // i
+ if(value.multiline) buffer[index++] = 0x6d; // m
+ // Add ending zero
+ buffer[index++] = 0x00;
+ return index;
+ } else {
+ if(serializeFunctions && value.scope != null && Object.keys(value.scope).length > 0) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_CODE_W_SCOPE;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Calculate the scope size
+ var scopeSize = BSON.calculateObjectSize(value.scope, serializeFunctions);
+ // Function string
+ var functionString = value.toString();
+ // Function Size
+ var codeSize = supportsBuffer ? Buffer.byteLength(functionString) + 1 : numberOfBytes(functionString) + 1;
+
+ // Calculate full size of the object
+ var totalSize = 4 + codeSize + scopeSize;
+
+ // Write the total size of the object
+ buffer[index++] = totalSize & 0xff;
+ buffer[index++] = (totalSize >> 8) & 0xff;
+ buffer[index++] = (totalSize >> 16) & 0xff;
+ buffer[index++] = (totalSize >> 24) & 0xff;
+
+ // Write the size of the string to buffer
+ buffer[index++] = codeSize & 0xff;
+ buffer[index++] = (codeSize >> 8) & 0xff;
+ buffer[index++] = (codeSize >> 16) & 0xff;
+ buffer[index++] = (codeSize >> 24) & 0xff;
+
+ // Write the string
+ supportsBuffer ? buffer.write(functionString, index, 'utf8') : writeToTypedArray(buffer, functionString, index);
+ // Update index
+ index = index + codeSize - 1;
+ // Write zero
+ buffer[index++] = 0;
+ // Serialize the scope object
+ var scopeObjectBuffer = new Buffer(scopeSize);
+ // Execute the serialization into a seperate buffer
+ serializeObject(value.scope, checkKeys, scopeObjectBuffer, 0, serializeFunctions);
+
+ // Adjusted scope Size (removing the header)
+ var scopeDocSize = scopeSize - 4;
+ // Write scope object size
+ buffer[index++] = scopeDocSize & 0xff;
+ buffer[index++] = (scopeDocSize >> 8) & 0xff;
+ buffer[index++] = (scopeDocSize >> 16) & 0xff;
+ buffer[index++] = (scopeDocSize >> 24) & 0xff;
+
+ // Write the scopeObject into the buffer
+ scopeObjectBuffer.copy(buffer, index, 0, scopeSize);
+
+ // Adjust index, removing the empty size of the doc (5 bytes 0000000005)
+ index = index + scopeDocSize - 5;
+ // Write trailing zero
+ buffer[index++] = 0;
+ return index
+ } else if(serializeFunctions) {
+ buffer[index++] = BSON.BSON_DATA_CODE;
+ // Number of written bytes
+ var numberOfWrittenBytes = supportsBuffer ? buffer.write(name, index, 'utf8') : writeToTypedArray(buffer, name, index);
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Function string
+ var functionString = value.toString();
+ // Function Size
+ var size = supportsBuffer ? Buffer.byteLength(functionString) + 1 : numberOfBytes(functionString) + 1;
+ // Write the size of the string to buffer
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ // Write the string
+ supportsBuffer ? buffer.write(functionString, index, 'utf8') : writeToTypedArray(buffer, functionString, index);
+ // Update index
+ index = index + size - 1;
+ // Write zero
+ buffer[index++] = 0;
+ return index;
+ }
+ }
+ }
+
+ // If no value to serialize
+ return index;
+}
+
+/**
+ * Serialize a Javascript object.
+ *
+ * @param {Object} object the Javascript object to serialize.
+ * @param {Boolean} checkKeys the serializer will check if keys are valid.
+ * @param {Boolean} asBuffer return the serialized object as a Buffer object **(ignore)**.
+ * @param {Boolean} serializeFunctions serialize the javascript functions **(default:false)**.
+ * @return {Buffer} returns the Buffer object containing the serialized object.
+ * @api public
+ */
+BSON.serialize = function(object, checkKeys, asBuffer, serializeFunctions) {
+ // Throw error if we are trying serialize an illegal type
+ if(object == null || typeof object != 'object' || Array.isArray(object))
+ throw new Error("Only javascript objects supported");
+
+ // Emoty target buffer
+ var buffer = null;
+ // Calculate the size of the object
+ var size = BSON.calculateObjectSize(object, serializeFunctions);
+ // Fetch the best available type for storing the binary data
+ if(buffer = typeof Buffer != 'undefined') {
+ buffer = new Buffer(size);
+ asBuffer = true;
+ } else if(typeof Uint8Array != 'undefined') {
+ buffer = new Uint8Array(new ArrayBuffer(size));
+ } else {
+ buffer = new Array(size);
+ }
+
+ // If asBuffer is false use typed arrays
+ BSON.serializeWithBufferAndIndex(object, checkKeys, buffer, 0, serializeFunctions);
+ return buffer;
+}
+
+/**
+ * Contains the function cache if we have that enable to allow for avoiding the eval step on each deserialization, comparison is by md5
+ *
+ * @ignore
+ * @api private
+ */
+var functionCache = BSON.functionCache = {};
+
+/**
+ * Crc state variables shared by function
+ *
+ * @ignore
+ * @api private
+ */
+var table = [0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D];
+
+/**
+ * CRC32 hash method, Fast and enough versitility for our usage
+ *
+ * @ignore
+ * @api private
+ */
+var crc32 = function(string, start, end) {
+ var crc = 0
+ var x = 0;
+ var y = 0;
+ crc = crc ^ (-1);
+
+ for(var i = start, iTop = end; i < iTop;i++) {
+ y = (crc ^ string[i]) & 0xFF;
+ x = table[y];
+ crc = (crc >>> 8) ^ x;
+ }
+
+ return crc ^ (-1);
+}
+
+/**
+ * Deserialize stream data as BSON documents.
+ *
+ * Options
+ * - **evalFunctions** {Boolean, default:false}, evaluate functions in the BSON document scoped to the object deserialized.
+ * - **cacheFunctions** {Boolean, default:false}, cache evaluated functions for reuse.
+ * - **cacheFunctionsCrc32** {Boolean, default:false}, use a crc32 code for caching, otherwise use the string of the function.
+ * - **promoteLongs** {Boolean, default:true}, when deserializing a Long will fit it into a Number if it's smaller than 53 bits
+ *
+ * @param {Buffer} data the buffer containing the serialized set of BSON documents.
+ * @param {Number} startIndex the start index in the data Buffer where the deserialization is to start.
+ * @param {Number} numberOfDocuments number of documents to deserialize.
+ * @param {Array} documents an array where to store the deserialized documents.
+ * @param {Number} docStartIndex the index in the documents array from where to start inserting documents.
+ * @param {Object} [options] additional options used for the deserialization.
+ * @return {Number} returns the next index in the buffer after deserialization **x** numbers of documents.
+ * @api public
+ */
+BSON.deserializeStream = function(data, startIndex, numberOfDocuments, documents, docStartIndex, options) {
+ // if(numberOfDocuments !== documents.length) throw new Error("Number of expected results back is less than the number of documents");
+ options = options != null ? options : {};
+ var index = startIndex;
+ // Loop over all documents
+ for(var i = 0; i < numberOfDocuments; i++) {
+ // Find size of the document
+ var size = data[index] | data[index + 1] << 8 | data[index + 2] << 16 | data[index + 3] << 24;
+ // Update options with index
+ options['index'] = index;
+ // Parse the document at this point
+ documents[docStartIndex + i] = BSON.deserialize(data, options);
+ // Adjust index by the document size
+ index = index + size;
+ }
+
+ // Return object containing end index of parsing and list of documents
+ return index;
+}
+
+/**
+ * Ensure eval is isolated.
+ *
+ * @ignore
+ * @api private
+ */
+var isolateEvalWithHash = function(functionCache, hash, functionString, object) {
+ // Contains the value we are going to set
+ var value = null;
+
+ // Check for cache hit, eval if missing and return cached function
+ if(functionCache[hash] == null) {
+ eval("value = " + functionString);
+ functionCache[hash] = value;
+ }
+ // Set the object
+ return functionCache[hash].bind(object);
+}
+
+/**
+ * Ensure eval is isolated.
+ *
+ * @ignore
+ * @api private
+ */
+var isolateEval = function(functionString) {
+ // Contains the value we are going to set
+ var value = null;
+ // Eval the function
+ eval("value = " + functionString);
+ return value;
+}
+
+/**
+ * Convert Uint8Array to String
+ *
+ * @ignore
+ * @api private
+ */
+var convertUint8ArrayToUtf8String = function(byteArray, startIndex, endIndex) {
+ return BinaryParser.decode_utf8(convertArraytoUtf8BinaryString(byteArray, startIndex, endIndex));
+}
+
+var convertArraytoUtf8BinaryString = function(byteArray, startIndex, endIndex) {
+ var result = "";
+ for(var i = startIndex; i < endIndex; i++) {
+ result = result + String.fromCharCode(byteArray[i]);
+ }
+
+ return result;
+};
+
+/**
+ * Deserialize data as BSON.
+ *
+ * Options
+ * - **evalFunctions** {Boolean, default:false}, evaluate functions in the BSON document scoped to the object deserialized.
+ * - **cacheFunctions** {Boolean, default:false}, cache evaluated functions for reuse.
+ * - **cacheFunctionsCrc32** {Boolean, default:false}, use a crc32 code for caching, otherwise use the string of the function.
+ * - **promoteLongs** {Boolean, default:true}, when deserializing a Long will fit it into a Number if it's smaller than 53 bits
+ *
+ * @param {Buffer} buffer the buffer containing the serialized set of BSON documents.
+ * @param {Object} [options] additional options used for the deserialization.
+ * @param {Boolean} [isArray] ignore used for recursive parsing.
+ * @return {Object} returns the deserialized Javascript Object.
+ * @api public
+ */
+BSON.deserialize = function(buffer, options, isArray) {
+ // Options
+ options = options == null ? {} : options;
+ var evalFunctions = options['evalFunctions'] == null ? false : options['evalFunctions'];
+ var cacheFunctions = options['cacheFunctions'] == null ? false : options['cacheFunctions'];
+ var cacheFunctionsCrc32 = options['cacheFunctionsCrc32'] == null ? false : options['cacheFunctionsCrc32'];
+ var promoteLongs = options['promoteLongs'] || true;
+
+ // Validate that we have at least 4 bytes of buffer
+ if(buffer.length < 5) throw new Error("corrupt bson message < 5 bytes long");
+
+ // Set up index
+ var index = typeof options['index'] == 'number' ? options['index'] : 0;
+ // Reads in a C style string
+ var readCStyleString = function() {
+ // Get the start search index
+ var i = index;
+ // Locate the end of the c string
+ while(buffer[i] !== 0x00) { i++ }
+ // Grab utf8 encoded string
+ var string = supportsBuffer && Buffer.isBuffer(buffer) ? buffer.toString('utf8', index, i) : convertUint8ArrayToUtf8String(buffer, index, i);
+ // Update index position
+ index = i + 1;
+ // Return string
+ return string;
+ }
+
+ // Create holding object
+ var object = isArray ? [] : {};
+
+ // Read the document size
+ var size = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+
+ // Ensure buffer is valid size
+ if(size < 5 || size > buffer.length) throw new Error("corrupt bson message");
+
+ // While we have more left data left keep parsing
+ while(true) {
+ // Read the type
+ var elementType = buffer[index++];
+ // If we get a zero it's the last byte, exit
+ if(elementType == 0) break;
+ // Read the name of the field
+ var name = readCStyleString();
+ // Switch on the type
+ switch(elementType) {
+ case BSON.BSON_DATA_OID:
+ var string = supportsBuffer && Buffer.isBuffer(buffer) ? buffer.toString('binary', index, index + 12) : convertArraytoUtf8BinaryString(buffer, index, index + 12);
+ // Decode the oid
+ object[name] = new ObjectID(string);
+ // Update index
+ index = index + 12;
+ break;
+ case BSON.BSON_DATA_STRING:
+ // Read the content of the field
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ // Add string to object
+ object[name] = supportsBuffer && Buffer.isBuffer(buffer) ? buffer.toString('utf8', index, index + stringSize - 1) : convertUint8ArrayToUtf8String(buffer, index, index + stringSize - 1);
+ // Update parse index position
+ index = index + stringSize;
+ break;
+ case BSON.BSON_DATA_INT:
+ // Decode the 32bit value
+ object[name] = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ break;
+ case BSON.BSON_DATA_NUMBER:
+ // Decode the double value
+ object[name] = readIEEE754(buffer, index, 'little', 52, 8);
+ // Update the index
+ index = index + 8;
+ break;
+ case BSON.BSON_DATA_DATE:
+ // Unpack the low and high bits
+ var lowBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var highBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ // Set date object
+ object[name] = new Date(new Long(lowBits, highBits).toNumber());
+ break;
+ case BSON.BSON_DATA_BOOLEAN:
+ // Parse the boolean value
+ object[name] = buffer[index++] == 1;
+ break;
+ case BSON.BSON_DATA_NULL:
+ // Parse the boolean value
+ object[name] = null;
+ break;
+ case BSON.BSON_DATA_BINARY:
+ // Decode the size of the binary blob
+ var binarySize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ // Decode the subtype
+ var subType = buffer[index++];
+ // Decode as raw Buffer object if options specifies it
+ if(buffer['slice'] != null) {
+ // If we have subtype 2 skip the 4 bytes for the size
+ if(subType == Binary.SUBTYPE_BYTE_ARRAY) {
+ binarySize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ }
+ // Slice the data
+ object[name] = new Binary(buffer.slice(index, index + binarySize), subType);
+ } else {
+ var _buffer = typeof Uint8Array != 'undefined' ? new Uint8Array(new ArrayBuffer(binarySize)) : new Array(binarySize);
+ // If we have subtype 2 skip the 4 bytes for the size
+ if(subType == Binary.SUBTYPE_BYTE_ARRAY) {
+ binarySize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ }
+ // Copy the data
+ for(var i = 0; i < binarySize; i++) {
+ _buffer[i] = buffer[index + i];
+ }
+ // Create the binary object
+ object[name] = new Binary(_buffer, subType);
+ }
+ // Update the index
+ index = index + binarySize;
+ break;
+ case BSON.BSON_DATA_ARRAY:
+ options['index'] = index;
+ // Decode the size of the array document
+ var objectSize = buffer[index] | buffer[index + 1] << 8 | buffer[index + 2] << 16 | buffer[index + 3] << 24;
+ // Set the array to the object
+ object[name] = BSON.deserialize(buffer, options, true);
+ // Adjust the index
+ index = index + objectSize;
+ break;
+ case BSON.BSON_DATA_OBJECT:
+ options['index'] = index;
+ // Decode the size of the object document
+ var objectSize = buffer[index] | buffer[index + 1] << 8 | buffer[index + 2] << 16 | buffer[index + 3] << 24;
+ // Set the array to the object
+ object[name] = BSON.deserialize(buffer, options, false);
+ // Adjust the index
+ index = index + objectSize;
+ break;
+ case BSON.BSON_DATA_REGEXP:
+ // Create the regexp
+ var source = readCStyleString();
+ var regExpOptions = readCStyleString();
+ // For each option add the corresponding one for javascript
+ var optionsArray = new Array(regExpOptions.length);
+
+ // Parse options
+ for(var i = 0; i < regExpOptions.length; i++) {
+ switch(regExpOptions[i]) {
+ case 'm':
+ optionsArray[i] = 'm';
+ break;
+ case 's':
+ optionsArray[i] = 'g';
+ break;
+ case 'i':
+ optionsArray[i] = 'i';
+ break;
+ }
+ }
+
+ object[name] = new RegExp(source, optionsArray.join(''));
+ break;
+ case BSON.BSON_DATA_LONG:
+ // Unpack the low and high bits
+ var lowBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var highBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ // Create long object
+ var long = new Long(lowBits, highBits);
+ // Promote the long if possible
+ if(promoteLongs) {
+ object[name] = long.lessThanOrEqual(JS_INT_MAX_LONG) && long.greaterThanOrEqual(JS_INT_MIN_LONG) ? long.toNumber() : long;
+ } else {
+ object[name] = long;
+ }
+ break;
+ case BSON.BSON_DATA_SYMBOL:
+ // Read the content of the field
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ // Add string to object
+ object[name] = new Symbol(buffer.toString('utf8', index, index + stringSize - 1));
+ // Update parse index position
+ index = index + stringSize;
+ break;
+ case BSON.BSON_DATA_TIMESTAMP:
+ // Unpack the low and high bits
+ var lowBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var highBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ // Set the object
+ object[name] = new Timestamp(lowBits, highBits);
+ break;
+ case BSON.BSON_DATA_MIN_KEY:
+ // Parse the object
+ object[name] = new MinKey();
+ break;
+ case BSON.BSON_DATA_MAX_KEY:
+ // Parse the object
+ object[name] = new MaxKey();
+ break;
+ case BSON.BSON_DATA_CODE:
+ // Read the content of the field
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ // Function string
+ var functionString = supportsBuffer && Buffer.isBuffer(buffer) ? buffer.toString('utf8', index, index + stringSize - 1) : convertUint8ArrayToUtf8String(buffer, index, index + stringSize - 1);
+
+ // If we are evaluating the functions
+ if(evalFunctions) {
+ // Contains the value we are going to set
+ var value = null;
+ // If we have cache enabled let's look for the md5 of the function in the cache
+ if(cacheFunctions) {
+ var hash = cacheFunctionsCrc32 ? crc32(functionString) : functionString;
+ // Got to do this to avoid V8 deoptimizing the call due to finding eval
+ object[name] = isolateEvalWithHash(functionCache, hash, functionString, object);
+ } else {
+ // Set directly
+ object[name] = isolateEval(functionString);
+ }
+ } else {
+ object[name] = new Code(functionString, {});
+ }
+
+ // Update parse index position
+ index = index + stringSize;
+ break;
+ case BSON.BSON_DATA_CODE_W_SCOPE:
+ // Read the content of the field
+ var totalSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ // Javascript function
+ var functionString = supportsBuffer && Buffer.isBuffer(buffer) ? buffer.toString('utf8', index, index + stringSize - 1) : convertUint8ArrayToUtf8String(buffer, index, index + stringSize - 1);
+ // Update parse index position
+ index = index + stringSize;
+ // Parse the element
+ options['index'] = index;
+ // Decode the size of the object document
+ var objectSize = buffer[index] | buffer[index + 1] << 8 | buffer[index + 2] << 16 | buffer[index + 3] << 24;
+ // Decode the scope object
+ var scopeObject = BSON.deserialize(buffer, options, false);
+ // Adjust the index
+ index = index + objectSize;
+
+ // If we are evaluating the functions
+ if(evalFunctions) {
+ // Contains the value we are going to set
+ var value = null;
+ // If we have cache enabled let's look for the md5 of the function in the cache
+ if(cacheFunctions) {
+ var hash = cacheFunctionsCrc32 ? crc32(functionString) : functionString;
+ // Got to do this to avoid V8 deoptimizing the call due to finding eval
+ object[name] = isolateEvalWithHash(functionCache, hash, functionString, object);
+ } else {
+ // Set directly
+ object[name] = isolateEval(functionString);
+ }
+
+ // Set the scope on the object
+ object[name].scope = scopeObject;
+ } else {
+ object[name] = new Code(functionString, scopeObject);
+ }
+
+ // Add string to object
+ break;
+ }
+ }
+
+ // Check if we have a db ref object
+ if(object['$id'] != null) object = new DBRef(object['$ref'], object['$id'], object['$db']);
+
+ // Return the final objects
+ return object;
+}
+
+/**
+ * Check if key name is valid.
+ *
+ * @ignore
+ * @api private
+ */
+BSON.checkKey = function checkKey (key, dollarsAndDotsOk) {
+ if (!key.length) return;
+ // Check if we have a legal key for the object
+ if (!!~key.indexOf("\x00")) {
+ // The BSON spec doesn't allow keys with null bytes because keys are
+ // null-terminated.
+ throw Error("key " + key + " must not contain null bytes");
+ }
+ if (!dollarsAndDotsOk) {
+ if('$' == key[0]) {
+ throw Error("key " + key + " must not start with '$'");
+ } else if (!!~key.indexOf('.')) {
+ throw Error("key " + key + " must not contain '.'");
+ }
+ }
+};
+
+/**
+ * Deserialize data as BSON.
+ *
+ * Options
+ * - **evalFunctions** {Boolean, default:false}, evaluate functions in the BSON document scoped to the object deserialized.
+ * - **cacheFunctions** {Boolean, default:false}, cache evaluated functions for reuse.
+ * - **cacheFunctionsCrc32** {Boolean, default:false}, use a crc32 code for caching, otherwise use the string of the function.
+ *
+ * @param {Buffer} buffer the buffer containing the serialized set of BSON documents.
+ * @param {Object} [options] additional options used for the deserialization.
+ * @param {Boolean} [isArray] ignore used for recursive parsing.
+ * @return {Object} returns the deserialized Javascript Object.
+ * @api public
+ */
+BSON.prototype.deserialize = function(data, options) {
+ return BSON.deserialize(data, options);
+}
+
+/**
+ * Deserialize stream data as BSON documents.
+ *
+ * Options
+ * - **evalFunctions** {Boolean, default:false}, evaluate functions in the BSON document scoped to the object deserialized.
+ * - **cacheFunctions** {Boolean, default:false}, cache evaluated functions for reuse.
+ * - **cacheFunctionsCrc32** {Boolean, default:false}, use a crc32 code for caching, otherwise use the string of the function.
+ *
+ * @param {Buffer} data the buffer containing the serialized set of BSON documents.
+ * @param {Number} startIndex the start index in the data Buffer where the deserialization is to start.
+ * @param {Number} numberOfDocuments number of documents to deserialize.
+ * @param {Array} documents an array where to store the deserialized documents.
+ * @param {Number} docStartIndex the index in the documents array from where to start inserting documents.
+ * @param {Object} [options] additional options used for the deserialization.
+ * @return {Number} returns the next index in the buffer after deserialization **x** numbers of documents.
+ * @api public
+ */
+BSON.prototype.deserializeStream = function(data, startIndex, numberOfDocuments, documents, docStartIndex, options) {
+ return BSON.deserializeStream(data, startIndex, numberOfDocuments, documents, docStartIndex, options);
+}
+
+/**
+ * Serialize a Javascript object.
+ *
+ * @param {Object} object the Javascript object to serialize.
+ * @param {Boolean} checkKeys the serializer will check if keys are valid.
+ * @param {Boolean} asBuffer return the serialized object as a Buffer object **(ignore)**.
+ * @param {Boolean} serializeFunctions serialize the javascript functions **(default:false)**.
+ * @return {Buffer} returns the Buffer object containing the serialized object.
+ * @api public
+ */
+BSON.prototype.serialize = function(object, checkKeys, asBuffer, serializeFunctions) {
+ return BSON.serialize(object, checkKeys, asBuffer, serializeFunctions);
+}
+
+/**
+ * Calculate the bson size for a passed in Javascript object.
+ *
+ * @param {Object} object the Javascript object to calculate the BSON byte size for.
+ * @param {Boolean} [serializeFunctions] serialize all functions in the object **(default:false)**.
+ * @return {Number} returns the number of bytes the BSON object will take up.
+ * @api public
+ */
+BSON.prototype.calculateObjectSize = function(object, serializeFunctions) {
+ return BSON.calculateObjectSize(object, serializeFunctions);
+}
+
+/**
+ * Serialize a Javascript object using a predefined Buffer and index into the buffer, useful when pre-allocating the space for serialization.
+ *
+ * @param {Object} object the Javascript object to serialize.
+ * @param {Boolean} checkKeys the serializer will check if keys are valid.
+ * @param {Buffer} buffer the Buffer you pre-allocated to store the serialized BSON object.
+ * @param {Number} index the index in the buffer where we wish to start serializing into.
+ * @param {Boolean} serializeFunctions serialize the javascript functions **(default:false)**.
+ * @return {Number} returns the new write index in the Buffer.
+ * @api public
+ */
+BSON.prototype.serializeWithBufferAndIndex = function(object, checkKeys, buffer, startIndex, serializeFunctions) {
+ return BSON.serializeWithBufferAndIndex(object, checkKeys, buffer, startIndex, serializeFunctions);
+}
+
+/**
+ * @ignore
+ * @api private
+ */
+exports.Code = Code;
+exports.Symbol = Symbol;
+exports.BSON = BSON;
+exports.DBRef = DBRef;
+exports.Binary = Binary;
+exports.ObjectID = ObjectID;
+exports.Long = Long;
+exports.Timestamp = Timestamp;
+exports.Double = Double;
+exports.MinKey = MinKey;
+exports.MaxKey = MaxKey;
+
+},
+
+
+
+'code': function(module, exports, global, require, undefined){
+ /**
+ * A class representation of the BSON Code type.
+ *
+ * @class Represents the BSON Code type.
+ * @param {String|Function} code a string or function.
+ * @param {Object} [scope] an optional scope for the function.
+ * @return {Code}
+ */
+function Code(code, scope) {
+ if(!(this instanceof Code)) return new Code(code, scope);
+
+ this._bsontype = 'Code';
+ this.code = code;
+ this.scope = scope == null ? {} : scope;
+};
+
+/**
+ * @ignore
+ * @api private
+ */
+Code.prototype.toJSON = function() {
+ return {scope:this.scope, code:this.code};
+}
+
+exports.Code = Code;
+},
+
+
+
+'db_ref': function(module, exports, global, require, undefined){
+ /**
+ * A class representation of the BSON DBRef type.
+ *
+ * @class Represents the BSON DBRef type.
+ * @param {String} namespace the collection name.
+ * @param {ObjectID} oid the reference ObjectID.
+ * @param {String} [db] optional db name, if omitted the reference is local to the current db.
+ * @return {DBRef}
+ */
+function DBRef(namespace, oid, db) {
+ if(!(this instanceof DBRef)) return new DBRef(namespace, oid, db);
+
+ this._bsontype = 'DBRef';
+ this.namespace = namespace;
+ this.oid = oid;
+ this.db = db;
+};
+
+/**
+ * @ignore
+ * @api private
+ */
+DBRef.prototype.toJSON = function() {
+ return {
+ '$ref':this.namespace,
+ '$id':this.oid,
+ '$db':this.db == null ? '' : this.db
+ };
+}
+
+exports.DBRef = DBRef;
+},
+
+
+
+'double': function(module, exports, global, require, undefined){
+ /**
+ * A class representation of the BSON Double type.
+ *
+ * @class Represents the BSON Double type.
+ * @param {Number} value the number we want to represent as a double.
+ * @return {Double}
+ */
+function Double(value) {
+ if(!(this instanceof Double)) return new Double(value);
+
+ this._bsontype = 'Double';
+ this.value = value;
+}
+
+/**
+ * Access the number value.
+ *
+ * @return {Number} returns the wrapped double number.
+ * @api public
+ */
+Double.prototype.valueOf = function() {
+ return this.value;
+};
+
+/**
+ * @ignore
+ * @api private
+ */
+Double.prototype.toJSON = function() {
+ return this.value;
+}
+
+exports.Double = Double;
+},
+
+
+
+'float_parser': function(module, exports, global, require, undefined){
+ // Copyright (c) 2008, Fair Oaks Labs, Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+//
+// * Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// * Neither the name of Fair Oaks Labs, Inc. nor the names of its contributors
+// may be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+//
+// Modifications to writeIEEE754 to support negative zeroes made by Brian White
+
+var readIEEE754 = function(buffer, offset, endian, mLen, nBytes) {
+ var e, m,
+ bBE = (endian === 'big'),
+ eLen = nBytes * 8 - mLen - 1,
+ eMax = (1 << eLen) - 1,
+ eBias = eMax >> 1,
+ nBits = -7,
+ i = bBE ? 0 : (nBytes - 1),
+ d = bBE ? 1 : -1,
+ s = buffer[offset + i];
+
+ i += d;
+
+ e = s & ((1 << (-nBits)) - 1);
+ s >>= (-nBits);
+ nBits += eLen;
+ for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8);
+
+ m = e & ((1 << (-nBits)) - 1);
+ e >>= (-nBits);
+ nBits += mLen;
+ for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8);
+
+ if (e === 0) {
+ e = 1 - eBias;
+ } else if (e === eMax) {
+ return m ? NaN : ((s ? -1 : 1) * Infinity);
+ } else {
+ m = m + Math.pow(2, mLen);
+ e = e - eBias;
+ }
+ return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
+};
+
+var writeIEEE754 = function(buffer, value, offset, endian, mLen, nBytes) {
+ var e, m, c,
+ bBE = (endian === 'big'),
+ eLen = nBytes * 8 - mLen - 1,
+ eMax = (1 << eLen) - 1,
+ eBias = eMax >> 1,
+ rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0),
+ i = bBE ? (nBytes-1) : 0,
+ d = bBE ? -1 : 1,
+ s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;
+
+ value = Math.abs(value);
+
+ if (isNaN(value) || value === Infinity) {
+ m = isNaN(value) ? 1 : 0;
+ e = eMax;
+ } else {
+ e = Math.floor(Math.log(value) / Math.LN2);
+ if (value * (c = Math.pow(2, -e)) < 1) {
+ e--;
+ c *= 2;
+ }
+ if (e+eBias >= 1) {
+ value += rt / c;
+ } else {
+ value += rt * Math.pow(2, 1 - eBias);
+ }
+ if (value * c >= 2) {
+ e++;
+ c /= 2;
+ }
+
+ if (e + eBias >= eMax) {
+ m = 0;
+ e = eMax;
+ } else if (e + eBias >= 1) {
+ m = (value * c - 1) * Math.pow(2, mLen);
+ e = e + eBias;
+ } else {
+ m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
+ e = 0;
+ }
+ }
+
+ for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8);
+
+ e = (e << mLen) | m;
+ eLen += mLen;
+ for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8);
+
+ buffer[offset + i - d] |= s * 128;
+};
+
+exports.readIEEE754 = readIEEE754;
+exports.writeIEEE754 = writeIEEE754;
+},
+
+
+
+'index': function(module, exports, global, require, undefined){
+ try {
+ exports.BSONPure = require('./bson');
+ exports.BSONNative = require('../../ext');
+} catch(err) {
+ // do nothing
+}
+
+[ './binary_parser'
+ , './binary'
+ , './code'
+ , './db_ref'
+ , './double'
+ , './max_key'
+ , './min_key'
+ , './objectid'
+ , './symbol'
+ , './timestamp'
+ , './long'].forEach(function (path) {
+ var module = require('./' + path);
+ for (var i in module) {
+ exports[i] = module[i];
+ }
+});
+
+// Exports all the classes for the NATIVE JS BSON Parser
+exports.native = function() {
+ var classes = {};
+ // Map all the classes
+ [ './binary_parser'
+ , './binary'
+ , './code'
+ , './db_ref'
+ , './double'
+ , './max_key'
+ , './min_key'
+ , './objectid'
+ , './symbol'
+ , './timestamp'
+ , './long'
+ , '../../ext'
+].forEach(function (path) {
+ var module = require('./' + path);
+ for (var i in module) {
+ classes[i] = module[i];
+ }
+ });
+ // Return classes list
+ return classes;
+}
+
+// Exports all the classes for the PURE JS BSON Parser
+exports.pure = function() {
+ var classes = {};
+ // Map all the classes
+ [ './binary_parser'
+ , './binary'
+ , './code'
+ , './db_ref'
+ , './double'
+ , './max_key'
+ , './min_key'
+ , './objectid'
+ , './symbol'
+ , './timestamp'
+ , './long'
+ , '././bson'].forEach(function (path) {
+ var module = require('./' + path);
+ for (var i in module) {
+ classes[i] = module[i];
+ }
+ });
+ // Return classes list
+ return classes;
+}
+
+},
+
+
+
+'long': function(module, exports, global, require, undefined){
+ // Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Copyright 2009 Google Inc. All Rights Reserved
+
+/**
+ * Defines a Long class for representing a 64-bit two's-complement
+ * integer value, which faithfully simulates the behavior of a Java "Long". This
+ * implementation is derived from LongLib in GWT.
+ *
+ * Constructs a 64-bit two's-complement integer, given its low and high 32-bit
+ * values as *signed* integers. See the from* functions below for more
+ * convenient ways of constructing Longs.
+ *
+ * The internal representation of a Long is the two given signed, 32-bit values.
+ * We use 32-bit pieces because these are the size of integers on which
+ * Javascript performs bit-operations. For operations like addition and
+ * multiplication, we split each number into 16-bit pieces, which can easily be
+ * multiplied within Javascript's floating-point representation without overflow
+ * or change in sign.
+ *
+ * In the algorithms below, we frequently reduce the negative case to the
+ * positive case by negating the input(s) and then post-processing the result.
+ * Note that we must ALWAYS check specially whether those values are MIN_VALUE
+ * (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as
+ * a positive number, it overflows back into a negative). Not handling this
+ * case would often result in infinite recursion.
+ *
+ * @class Represents the BSON Long type.
+ * @param {Number} low the low (signed) 32 bits of the Long.
+ * @param {Number} high the high (signed) 32 bits of the Long.
+ */
+function Long(low, high) {
+ if(!(this instanceof Long)) return new Long(low, high);
+
+ this._bsontype = 'Long';
+ /**
+ * @type {number}
+ * @api private
+ */
+ this.low_ = low | 0; // force into 32 signed bits.
+
+ /**
+ * @type {number}
+ * @api private
+ */
+ this.high_ = high | 0; // force into 32 signed bits.
+};
+
+/**
+ * Return the int value.
+ *
+ * @return {Number} the value, assuming it is a 32-bit integer.
+ * @api public
+ */
+Long.prototype.toInt = function() {
+ return this.low_;
+};
+
+/**
+ * Return the Number value.
+ *
+ * @return {Number} the closest floating-point representation to this value.
+ * @api public
+ */
+Long.prototype.toNumber = function() {
+ return this.high_ * Long.TWO_PWR_32_DBL_ +
+ this.getLowBitsUnsigned();
+};
+
+/**
+ * Return the JSON value.
+ *
+ * @return {String} the JSON representation.
+ * @api public
+ */
+Long.prototype.toJSON = function() {
+ return this.toString();
+}
+
+/**
+ * Return the String value.
+ *
+ * @param {Number} [opt_radix] the radix in which the text should be written.
+ * @return {String} the textual representation of this value.
+ * @api public
+ */
+Long.prototype.toString = function(opt_radix) {
+ var radix = opt_radix || 10;
+ if (radix < 2 || 36 < radix) {
+ throw Error('radix out of range: ' + radix);
+ }
+
+ if (this.isZero()) {
+ return '0';
+ }
+
+ if (this.isNegative()) {
+ if (this.equals(Long.MIN_VALUE)) {
+ // We need to change the Long value before it can be negated, so we remove
+ // the bottom-most digit in this base and then recurse to do the rest.
+ var radixLong = Long.fromNumber(radix);
+ var div = this.div(radixLong);
+ var rem = div.multiply(radixLong).subtract(this);
+ return div.toString(radix) + rem.toInt().toString(radix);
+ } else {
+ return '-' + this.negate().toString(radix);
+ }
+ }
+
+ // Do several (6) digits each time through the loop, so as to
+ // minimize the calls to the very expensive emulated div.
+ var radixToPower = Long.fromNumber(Math.pow(radix, 6));
+
+ var rem = this;
+ var result = '';
+ while (true) {
+ var remDiv = rem.div(radixToPower);
+ var intval = rem.subtract(remDiv.multiply(radixToPower)).toInt();
+ var digits = intval.toString(radix);
+
+ rem = remDiv;
+ if (rem.isZero()) {
+ return digits + result;
+ } else {
+ while (digits.length < 6) {
+ digits = '0' + digits;
+ }
+ result = '' + digits + result;
+ }
+ }
+};
+
+/**
+ * Return the high 32-bits value.
+ *
+ * @return {Number} the high 32-bits as a signed value.
+ * @api public
+ */
+Long.prototype.getHighBits = function() {
+ return this.high_;
+};
+
+/**
+ * Return the low 32-bits value.
+ *
+ * @return {Number} the low 32-bits as a signed value.
+ * @api public
+ */
+Long.prototype.getLowBits = function() {
+ return this.low_;
+};
+
+/**
+ * Return the low unsigned 32-bits value.
+ *
+ * @return {Number} the low 32-bits as an unsigned value.
+ * @api public
+ */
+Long.prototype.getLowBitsUnsigned = function() {
+ return (this.low_ >= 0) ?
+ this.low_ : Long.TWO_PWR_32_DBL_ + this.low_;
+};
+
+/**
+ * Returns the number of bits needed to represent the absolute value of this Long.
+ *
+ * @return {Number} Returns the number of bits needed to represent the absolute value of this Long.
+ * @api public
+ */
+Long.prototype.getNumBitsAbs = function() {
+ if (this.isNegative()) {
+ if (this.equals(Long.MIN_VALUE)) {
+ return 64;
+ } else {
+ return this.negate().getNumBitsAbs();
+ }
+ } else {
+ var val = this.high_ != 0 ? this.high_ : this.low_;
+ for (var bit = 31; bit > 0; bit--) {
+ if ((val & (1 << bit)) != 0) {
+ break;
+ }
+ }
+ return this.high_ != 0 ? bit + 33 : bit + 1;
+ }
+};
+
+/**
+ * Return whether this value is zero.
+ *
+ * @return {Boolean} whether this value is zero.
+ * @api public
+ */
+Long.prototype.isZero = function() {
+ return this.high_ == 0 && this.low_ == 0;
+};
+
+/**
+ * Return whether this value is negative.
+ *
+ * @return {Boolean} whether this value is negative.
+ * @api public
+ */
+Long.prototype.isNegative = function() {
+ return this.high_ < 0;
+};
+
+/**
+ * Return whether this value is odd.
+ *
+ * @return {Boolean} whether this value is odd.
+ * @api public
+ */
+Long.prototype.isOdd = function() {
+ return (this.low_ & 1) == 1;
+};
+
+/**
+ * Return whether this Long equals the other
+ *
+ * @param {Long} other Long to compare against.
+ * @return {Boolean} whether this Long equals the other
+ * @api public
+ */
+Long.prototype.equals = function(other) {
+ return (this.high_ == other.high_) && (this.low_ == other.low_);
+};
+
+/**
+ * Return whether this Long does not equal the other.
+ *
+ * @param {Long} other Long to compare against.
+ * @return {Boolean} whether this Long does not equal the other.
+ * @api public
+ */
+Long.prototype.notEquals = function(other) {
+ return (this.high_ != other.high_) || (this.low_ != other.low_);
+};
+
+/**
+ * Return whether this Long is less than the other.
+ *
+ * @param {Long} other Long to compare against.
+ * @return {Boolean} whether this Long is less than the other.
+ * @api public
+ */
+Long.prototype.lessThan = function(other) {
+ return this.compare(other) < 0;
+};
+
+/**
+ * Return whether this Long is less than or equal to the other.
+ *
+ * @param {Long} other Long to compare against.
+ * @return {Boolean} whether this Long is less than or equal to the other.
+ * @api public
+ */
+Long.prototype.lessThanOrEqual = function(other) {
+ return this.compare(other) <= 0;
+};
+
+/**
+ * Return whether this Long is greater than the other.
+ *
+ * @param {Long} other Long to compare against.
+ * @return {Boolean} whether this Long is greater than the other.
+ * @api public
+ */
+Long.prototype.greaterThan = function(other) {
+ return this.compare(other) > 0;
+};
+
+/**
+ * Return whether this Long is greater than or equal to the other.
+ *
+ * @param {Long} other Long to compare against.
+ * @return {Boolean} whether this Long is greater than or equal to the other.
+ * @api public
+ */
+Long.prototype.greaterThanOrEqual = function(other) {
+ return this.compare(other) >= 0;
+};
+
+/**
+ * Compares this Long with the given one.
+ *
+ * @param {Long} other Long to compare against.
+ * @return {Boolean} 0 if they are the same, 1 if the this is greater, and -1 if the given one is greater.
+ * @api public
+ */
+Long.prototype.compare = function(other) {
+ if (this.equals(other)) {
+ return 0;
+ }
+
+ var thisNeg = this.isNegative();
+ var otherNeg = other.isNegative();
+ if (thisNeg && !otherNeg) {
+ return -1;
+ }
+ if (!thisNeg && otherNeg) {
+ return 1;
+ }
+
+ // at this point, the signs are the same, so subtraction will not overflow
+ if (this.subtract(other).isNegative()) {
+ return -1;
+ } else {
+ return 1;
+ }
+};
+
+/**
+ * The negation of this value.
+ *
+ * @return {Long} the negation of this value.
+ * @api public
+ */
+Long.prototype.negate = function() {
+ if (this.equals(Long.MIN_VALUE)) {
+ return Long.MIN_VALUE;
+ } else {
+ return this.not().add(Long.ONE);
+ }
+};
+
+/**
+ * Returns the sum of this and the given Long.
+ *
+ * @param {Long} other Long to add to this one.
+ * @return {Long} the sum of this and the given Long.
+ * @api public
+ */
+Long.prototype.add = function(other) {
+ // Divide each number into 4 chunks of 16 bits, and then sum the chunks.
+
+ var a48 = this.high_ >>> 16;
+ var a32 = this.high_ & 0xFFFF;
+ var a16 = this.low_ >>> 16;
+ var a00 = this.low_ & 0xFFFF;
+
+ var b48 = other.high_ >>> 16;
+ var b32 = other.high_ & 0xFFFF;
+ var b16 = other.low_ >>> 16;
+ var b00 = other.low_ & 0xFFFF;
+
+ var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
+ c00 += a00 + b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xFFFF;
+ c16 += a16 + b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c32 += a32 + b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c48 += a48 + b48;
+ c48 &= 0xFFFF;
+ return Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32);
+};
+
+/**
+ * Returns the difference of this and the given Long.
+ *
+ * @param {Long} other Long to subtract from this.
+ * @return {Long} the difference of this and the given Long.
+ * @api public
+ */
+Long.prototype.subtract = function(other) {
+ return this.add(other.negate());
+};
+
+/**
+ * Returns the product of this and the given Long.
+ *
+ * @param {Long} other Long to multiply with this.
+ * @return {Long} the product of this and the other.
+ * @api public
+ */
+Long.prototype.multiply = function(other) {
+ if (this.isZero()) {
+ return Long.ZERO;
+ } else if (other.isZero()) {
+ return Long.ZERO;
+ }
+
+ if (this.equals(Long.MIN_VALUE)) {
+ return other.isOdd() ? Long.MIN_VALUE : Long.ZERO;
+ } else if (other.equals(Long.MIN_VALUE)) {
+ return this.isOdd() ? Long.MIN_VALUE : Long.ZERO;
+ }
+
+ if (this.isNegative()) {
+ if (other.isNegative()) {
+ return this.negate().multiply(other.negate());
+ } else {
+ return this.negate().multiply(other).negate();
+ }
+ } else if (other.isNegative()) {
+ return this.multiply(other.negate()).negate();
+ }
+
+ // If both Longs are small, use float multiplication
+ if (this.lessThan(Long.TWO_PWR_24_) &&
+ other.lessThan(Long.TWO_PWR_24_)) {
+ return Long.fromNumber(this.toNumber() * other.toNumber());
+ }
+
+ // Divide each Long into 4 chunks of 16 bits, and then add up 4x4 products.
+ // We can skip products that would overflow.
+
+ var a48 = this.high_ >>> 16;
+ var a32 = this.high_ & 0xFFFF;
+ var a16 = this.low_ >>> 16;
+ var a00 = this.low_ & 0xFFFF;
+
+ var b48 = other.high_ >>> 16;
+ var b32 = other.high_ & 0xFFFF;
+ var b16 = other.low_ >>> 16;
+ var b00 = other.low_ & 0xFFFF;
+
+ var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
+ c00 += a00 * b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xFFFF;
+ c16 += a16 * b00;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c16 += a00 * b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c32 += a32 * b00;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c32 += a16 * b16;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c32 += a00 * b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
+ c48 &= 0xFFFF;
+ return Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32);
+};
+
+/**
+ * Returns this Long divided by the given one.
+ *
+ * @param {Long} other Long by which to divide.
+ * @return {Long} this Long divided by the given one.
+ * @api public
+ */
+Long.prototype.div = function(other) {
+ if (other.isZero()) {
+ throw Error('division by zero');
+ } else if (this.isZero()) {
+ return Long.ZERO;
+ }
+
+ if (this.equals(Long.MIN_VALUE)) {
+ if (other.equals(Long.ONE) ||
+ other.equals(Long.NEG_ONE)) {
+ return Long.MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE
+ } else if (other.equals(Long.MIN_VALUE)) {
+ return Long.ONE;
+ } else {
+ // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.
+ var halfThis = this.shiftRight(1);
+ var approx = halfThis.div(other).shiftLeft(1);
+ if (approx.equals(Long.ZERO)) {
+ return other.isNegative() ? Long.ONE : Long.NEG_ONE;
+ } else {
+ var rem = this.subtract(other.multiply(approx));
+ var result = approx.add(rem.div(other));
+ return result;
+ }
+ }
+ } else if (other.equals(Long.MIN_VALUE)) {
+ return Long.ZERO;
+ }
+
+ if (this.isNegative()) {
+ if (other.isNegative()) {
+ return this.negate().div(other.negate());
+ } else {
+ return this.negate().div(other).negate();
+ }
+ } else if (other.isNegative()) {
+ return this.div(other.negate()).negate();
+ }
+
+ // Repeat the following until the remainder is less than other: find a
+ // floating-point that approximates remainder / other *from below*, add this
+ // into the result, and subtract it from the remainder. It is critical that
+ // the approximate value is less than or equal to the real value so that the
+ // remainder never becomes negative.
+ var res = Long.ZERO;
+ var rem = this;
+ while (rem.greaterThanOrEqual(other)) {
+ // Approximate the result of division. This may be a little greater or
+ // smaller than the actual value.
+ var approx = Math.max(1, Math.floor(rem.toNumber() / other.toNumber()));
+
+ // We will tweak the approximate result by changing it in the 48-th digit or
+ // the smallest non-fractional digit, whichever is larger.
+ var log2 = Math.ceil(Math.log(approx) / Math.LN2);
+ var delta = (log2 <= 48) ? 1 : Math.pow(2, log2 - 48);
+
+ // Decrease the approximation until it is smaller than the remainder. Note
+ // that if it is too large, the product overflows and is negative.
+ var approxRes = Long.fromNumber(approx);
+ var approxRem = approxRes.multiply(other);
+ while (approxRem.isNegative() || approxRem.greaterThan(rem)) {
+ approx -= delta;
+ approxRes = Long.fromNumber(approx);
+ approxRem = approxRes.multiply(other);
+ }
+
+ // We know the answer can't be zero... and actually, zero would cause
+ // infinite recursion since we would make no progress.
+ if (approxRes.isZero()) {
+ approxRes = Long.ONE;
+ }
+
+ res = res.add(approxRes);
+ rem = rem.subtract(approxRem);
+ }
+ return res;
+};
+
+/**
+ * Returns this Long modulo the given one.
+ *
+ * @param {Long} other Long by which to mod.
+ * @return {Long} this Long modulo the given one.
+ * @api public
+ */
+Long.prototype.modulo = function(other) {
+ return this.subtract(this.div(other).multiply(other));
+};
+
+/**
+ * The bitwise-NOT of this value.
+ *
+ * @return {Long} the bitwise-NOT of this value.
+ * @api public
+ */
+Long.prototype.not = function() {
+ return Long.fromBits(~this.low_, ~this.high_);
+};
+
+/**
+ * Returns the bitwise-AND of this Long and the given one.
+ *
+ * @param {Long} other the Long with which to AND.
+ * @return {Long} the bitwise-AND of this and the other.
+ * @api public
+ */
+Long.prototype.and = function(other) {
+ return Long.fromBits(this.low_ & other.low_, this.high_ & other.high_);
+};
+
+/**
+ * Returns the bitwise-OR of this Long and the given one.
+ *
+ * @param {Long} other the Long with which to OR.
+ * @return {Long} the bitwise-OR of this and the other.
+ * @api public
+ */
+Long.prototype.or = function(other) {
+ return Long.fromBits(this.low_ | other.low_, this.high_ | other.high_);
+};
+
+/**
+ * Returns the bitwise-XOR of this Long and the given one.
+ *
+ * @param {Long} other the Long with which to XOR.
+ * @return {Long} the bitwise-XOR of this and the other.
+ * @api public
+ */
+Long.prototype.xor = function(other) {
+ return Long.fromBits(this.low_ ^ other.low_, this.high_ ^ other.high_);
+};
+
+/**
+ * Returns this Long with bits shifted to the left by the given amount.
+ *
+ * @param {Number} numBits the number of bits by which to shift.
+ * @return {Long} this shifted to the left by the given amount.
+ * @api public
+ */
+Long.prototype.shiftLeft = function(numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var low = this.low_;
+ if (numBits < 32) {
+ var high = this.high_;
+ return Long.fromBits(
+ low << numBits,
+ (high << numBits) | (low >>> (32 - numBits)));
+ } else {
+ return Long.fromBits(0, low << (numBits - 32));
+ }
+ }
+};
+
+/**
+ * Returns this Long with bits shifted to the right by the given amount.
+ *
+ * @param {Number} numBits the number of bits by which to shift.
+ * @return {Long} this shifted to the right by the given amount.
+ * @api public
+ */
+Long.prototype.shiftRight = function(numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var high = this.high_;
+ if (numBits < 32) {
+ var low = this.low_;
+ return Long.fromBits(
+ (low >>> numBits) | (high << (32 - numBits)),
+ high >> numBits);
+ } else {
+ return Long.fromBits(
+ high >> (numBits - 32),
+ high >= 0 ? 0 : -1);
+ }
+ }
+};
+
+/**
+ * Returns this Long with bits shifted to the right by the given amount, with the new top bits matching the current sign bit.
+ *
+ * @param {Number} numBits the number of bits by which to shift.
+ * @return {Long} this shifted to the right by the given amount, with zeros placed into the new leading bits.
+ * @api public
+ */
+Long.prototype.shiftRightUnsigned = function(numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var high = this.high_;
+ if (numBits < 32) {
+ var low = this.low_;
+ return Long.fromBits(
+ (low >>> numBits) | (high << (32 - numBits)),
+ high >>> numBits);
+ } else if (numBits == 32) {
+ return Long.fromBits(high, 0);
+ } else {
+ return Long.fromBits(high >>> (numBits - 32), 0);
+ }
+ }
+};
+
+/**
+ * Returns a Long representing the given (32-bit) integer value.
+ *
+ * @param {Number} value the 32-bit integer in question.
+ * @return {Long} the corresponding Long value.
+ * @api public
+ */
+Long.fromInt = function(value) {
+ if (-128 <= value && value < 128) {
+ var cachedObj = Long.INT_CACHE_[value];
+ if (cachedObj) {
+ return cachedObj;
+ }
+ }
+
+ var obj = new Long(value | 0, value < 0 ? -1 : 0);
+ if (-128 <= value && value < 128) {
+ Long.INT_CACHE_[value] = obj;
+ }
+ return obj;
+};
+
+/**
+ * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.
+ *
+ * @param {Number} value the number in question.
+ * @return {Long} the corresponding Long value.
+ * @api public
+ */
+Long.fromNumber = function(value) {
+ if (isNaN(value) || !isFinite(value)) {
+ return Long.ZERO;
+ } else if (value <= -Long.TWO_PWR_63_DBL_) {
+ return Long.MIN_VALUE;
+ } else if (value + 1 >= Long.TWO_PWR_63_DBL_) {
+ return Long.MAX_VALUE;
+ } else if (value < 0) {
+ return Long.fromNumber(-value).negate();
+ } else {
+ return new Long(
+ (value % Long.TWO_PWR_32_DBL_) | 0,
+ (value / Long.TWO_PWR_32_DBL_) | 0);
+ }
+};
+
+/**
+ * Returns a Long representing the 64-bit integer that comes by concatenating the given high and low bits. Each is assumed to use 32 bits.
+ *
+ * @param {Number} lowBits the low 32-bits.
+ * @param {Number} highBits the high 32-bits.
+ * @return {Long} the corresponding Long value.
+ * @api public
+ */
+Long.fromBits = function(lowBits, highBits) {
+ return new Long(lowBits, highBits);
+};
+
+/**
+ * Returns a Long representation of the given string, written using the given radix.
+ *
+ * @param {String} str the textual representation of the Long.
+ * @param {Number} opt_radix the radix in which the text is written.
+ * @return {Long} the corresponding Long value.
+ * @api public
+ */
+Long.fromString = function(str, opt_radix) {
+ if (str.length == 0) {
+ throw Error('number format error: empty string');
+ }
+
+ var radix = opt_radix || 10;
+ if (radix < 2 || 36 < radix) {
+ throw Error('radix out of range: ' + radix);
+ }
+
+ if (str.charAt(0) == '-') {
+ return Long.fromString(str.substring(1), radix).negate();
+ } else if (str.indexOf('-') >= 0) {
+ throw Error('number format error: interior "-" character: ' + str);
+ }
+
+ // Do several (8) digits each time through the loop, so as to
+ // minimize the calls to the very expensive emulated div.
+ var radixToPower = Long.fromNumber(Math.pow(radix, 8));
+
+ var result = Long.ZERO;
+ for (var i = 0; i < str.length; i += 8) {
+ var size = Math.min(8, str.length - i);
+ var value = parseInt(str.substring(i, i + size), radix);
+ if (size < 8) {
+ var power = Long.fromNumber(Math.pow(radix, size));
+ result = result.multiply(power).add(Long.fromNumber(value));
+ } else {
+ result = result.multiply(radixToPower);
+ result = result.add(Long.fromNumber(value));
+ }
+ }
+ return result;
+};
+
+// NOTE: Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the
+// from* methods on which they depend.
+
+
+/**
+ * A cache of the Long representations of small integer values.
+ * @type {Object}
+ * @api private
+ */
+Long.INT_CACHE_ = {};
+
+// NOTE: the compiler should inline these constant values below and then remove
+// these variables, so there should be no runtime penalty for these.
+
+/**
+ * Number used repeated below in calculations. This must appear before the
+ * first call to any from* function below.
+ * @type {number}
+ * @api private
+ */
+Long.TWO_PWR_16_DBL_ = 1 << 16;
+
+/**
+ * @type {number}
+ * @api private
+ */
+Long.TWO_PWR_24_DBL_ = 1 << 24;
+
+/**
+ * @type {number}
+ * @api private
+ */
+Long.TWO_PWR_32_DBL_ = Long.TWO_PWR_16_DBL_ * Long.TWO_PWR_16_DBL_;
+
+/**
+ * @type {number}
+ * @api private
+ */
+Long.TWO_PWR_31_DBL_ = Long.TWO_PWR_32_DBL_ / 2;
+
+/**
+ * @type {number}
+ * @api private
+ */
+Long.TWO_PWR_48_DBL_ = Long.TWO_PWR_32_DBL_ * Long.TWO_PWR_16_DBL_;
+
+/**
+ * @type {number}
+ * @api private
+ */
+Long.TWO_PWR_64_DBL_ = Long.TWO_PWR_32_DBL_ * Long.TWO_PWR_32_DBL_;
+
+/**
+ * @type {number}
+ * @api private
+ */
+Long.TWO_PWR_63_DBL_ = Long.TWO_PWR_64_DBL_ / 2;
+
+/** @type {Long} */
+Long.ZERO = Long.fromInt(0);
+
+/** @type {Long} */
+Long.ONE = Long.fromInt(1);
+
+/** @type {Long} */
+Long.NEG_ONE = Long.fromInt(-1);
+
+/** @type {Long} */
+Long.MAX_VALUE =
+ Long.fromBits(0xFFFFFFFF | 0, 0x7FFFFFFF | 0);
+
+/** @type {Long} */
+Long.MIN_VALUE = Long.fromBits(0, 0x80000000 | 0);
+
+/**
+ * @type {Long}
+ * @api private
+ */
+Long.TWO_PWR_24_ = Long.fromInt(1 << 24);
+
+/**
+ * Expose.
+ */
+exports.Long = Long;
+},
+
+
+
+'max_key': function(module, exports, global, require, undefined){
+ /**
+ * A class representation of the BSON MaxKey type.
+ *
+ * @class Represents the BSON MaxKey type.
+ * @return {MaxKey}
+ */
+function MaxKey() {
+ if(!(this instanceof MaxKey)) return new MaxKey();
+
+ this._bsontype = 'MaxKey';
+}
+
+exports.MaxKey = MaxKey;
+},
+
+
+
+'min_key': function(module, exports, global, require, undefined){
+ /**
+ * A class representation of the BSON MinKey type.
+ *
+ * @class Represents the BSON MinKey type.
+ * @return {MinKey}
+ */
+function MinKey() {
+ if(!(this instanceof MinKey)) return new MinKey();
+
+ this._bsontype = 'MinKey';
+}
+
+exports.MinKey = MinKey;
+},
+
+
+
+'objectid': function(module, exports, global, require, undefined){
+ /**
+ * Module dependencies.
+ */
+var BinaryParser = require('./binary_parser').BinaryParser;
+
+/**
+ * Machine id.
+ *
+ * Create a random 3-byte value (i.e. unique for this
+ * process). Other drivers use a md5 of the machine id here, but
+ * that would mean an asyc call to gethostname, so we don't bother.
+ */
+var MACHINE_ID = parseInt(Math.random() * 0xFFFFFF, 10);
+
+// Regular expression that checks for hex value
+var checkForHexRegExp = new RegExp("^[0-9a-fA-F]{24}$");
+
+/**
+* Create a new ObjectID instance
+*
+* @class Represents the BSON ObjectID type
+* @param {String|Number} id Can be a 24 byte hex string, 12 byte binary string or a Number.
+* @return {Object} instance of ObjectID.
+*/
+var ObjectID = function ObjectID(id, _hex) {
+ if(!(this instanceof ObjectID)) return new ObjectID(id, _hex);
+
+ this._bsontype = 'ObjectID';
+ var __id = null;
+
+ // Throw an error if it's not a valid setup
+ if(id != null && 'number' != typeof id && (id.length != 12 && id.length != 24))
+ throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");
+
+ // Generate id based on the input
+ if(id == null || typeof id == 'number') {
+ // convert to 12 byte binary string
+ this.id = this.generate(id);
+ } else if(id != null && id.length === 12) {
+ // assume 12 byte string
+ this.id = id;
+ } else if(checkForHexRegExp.test(id)) {
+ return ObjectID.createFromHexString(id);
+ } else {
+ throw new Error("Value passed in is not a valid 24 character hex string");
+ }
+
+ if(ObjectID.cacheHexString) this.__id = this.toHexString();
+};
+
+// Allow usage of ObjectId as well as ObjectID
+var ObjectId = ObjectID;
+
+// Precomputed hex table enables speedy hex string conversion
+var hexTable = [];
+for (var i = 0; i < 256; i++) {
+ hexTable[i] = (i <= 15 ? '0' : '') + i.toString(16);
+}
+
+/**
+* Return the ObjectID id as a 24 byte hex string representation
+*
+* @return {String} return the 24 byte hex string representation.
+* @api public
+*/
+ObjectID.prototype.toHexString = function() {
+ if(ObjectID.cacheHexString && this.__id) return this.__id;
+
+ var hexString = '';
+
+ for (var i = 0; i < this.id.length; i++) {
+ hexString += hexTable[this.id.charCodeAt(i)];
+ }
+
+ if(ObjectID.cacheHexString) this.__id = hexString;
+ return hexString;
+};
+
+/**
+* Update the ObjectID index used in generating new ObjectID's on the driver
+*
+* @return {Number} returns next index value.
+* @api private
+*/
+ObjectID.prototype.get_inc = function() {
+ return ObjectID.index = (ObjectID.index + 1) % 0xFFFFFF;
+};
+
+/**
+* Update the ObjectID index used in generating new ObjectID's on the driver
+*
+* @return {Number} returns next index value.
+* @api private
+*/
+ObjectID.prototype.getInc = function() {
+ return this.get_inc();
+};
+
+/**
+* Generate a 12 byte id string used in ObjectID's
+*
+* @param {Number} [time] optional parameter allowing to pass in a second based timestamp.
+* @return {String} return the 12 byte id binary string.
+* @api private
+*/
+ObjectID.prototype.generate = function(time) {
+ if ('number' == typeof time) {
+ var time4Bytes = BinaryParser.encodeInt(time, 32, true, true);
+ /* for time-based ObjectID the bytes following the time will be zeroed */
+ var machine3Bytes = BinaryParser.encodeInt(MACHINE_ID, 24, false);
+ var pid2Bytes = BinaryParser.fromShort(typeof process === 'undefined' ? Math.floor(Math.random() * 100000) : process.pid);
+ var index3Bytes = BinaryParser.encodeInt(this.get_inc(), 24, false, true);
+ } else {
+ var unixTime = parseInt(Date.now()/1000,10);
+ var time4Bytes = BinaryParser.encodeInt(unixTime, 32, true, true);
+ var machine3Bytes = BinaryParser.encodeInt(MACHINE_ID, 24, false);
+ var pid2Bytes = BinaryParser.fromShort(typeof process === 'undefined' ? Math.floor(Math.random() * 100000) : process.pid);
+ var index3Bytes = BinaryParser.encodeInt(this.get_inc(), 24, false, true);
+ }
+
+ return time4Bytes + machine3Bytes + pid2Bytes + index3Bytes;
+};
+
+/**
+* Converts the id into a 24 byte hex string for printing
+*
+* @return {String} return the 24 byte hex string representation.
+* @api private
+*/
+ObjectID.prototype.toString = function() {
+ return this.toHexString();
+};
+
+/**
+* Converts to a string representation of this Id.
+*
+* @return {String} return the 24 byte hex string representation.
+* @api private
+*/
+ObjectID.prototype.inspect = ObjectID.prototype.toString;
+
+/**
+* Converts to its JSON representation.
+*
+* @return {String} return the 24 byte hex string representation.
+* @api private
+*/
+ObjectID.prototype.toJSON = function() {
+ return this.toHexString();
+};
+
+/**
+* Compares the equality of this ObjectID with `otherID`.
+*
+* @param {Object} otherID ObjectID instance to compare against.
+* @return {Bool} the result of comparing two ObjectID's
+* @api public
+*/
+ObjectID.prototype.equals = function equals (otherID) {
+ var id = (otherID instanceof ObjectID || otherID.toHexString)
+ ? otherID.id
+ : ObjectID.createFromHexString(otherID).id;
+
+ return this.id === id;
+}
+
+/**
+* Returns the generation date (accurate up to the second) that this ID was generated.
+*
+* @return {Date} the generation date
+* @api public
+*/
+ObjectID.prototype.getTimestamp = function() {
+ var timestamp = new Date();
+ timestamp.setTime(Math.floor(BinaryParser.decodeInt(this.id.substring(0,4), 32, true, true)) * 1000);
+ return timestamp;
+}
+
+/**
+* @ignore
+* @api private
+*/
+ObjectID.index = parseInt(Math.random() * 0xFFFFFF, 10);
+
+ObjectID.createPk = function createPk () {
+ return new ObjectID();
+};
+
+/**
+* Creates an ObjectID from a second based number, with the rest of the ObjectID zeroed out. Used for comparisons or sorting the ObjectID.
+*
+* @param {Number} time an integer number representing a number of seconds.
+* @return {ObjectID} return the created ObjectID
+* @api public
+*/
+ObjectID.createFromTime = function createFromTime (time) {
+ var id = BinaryParser.encodeInt(time, 32, true, true) +
+ BinaryParser.encodeInt(0, 64, true, true);
+ return new ObjectID(id);
+};
+
+/**
+* Creates an ObjectID from a hex string representation of an ObjectID.
+*
+* @param {String} hexString create a ObjectID from a passed in 24 byte hexstring.
+* @return {ObjectID} return the created ObjectID
+* @api public
+*/
+ObjectID.createFromHexString = function createFromHexString (hexString) {
+ // Throw an error if it's not a valid setup
+ if(typeof hexString === 'undefined' || hexString != null && hexString.length != 24)
+ throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");
+
+ var len = hexString.length;
+
+ if(len > 12*2) {
+ throw new Error('Id cannot be longer than 12 bytes');
+ }
+
+ var result = ''
+ , string
+ , number;
+
+ for (var index = 0; index < len; index += 2) {
+ string = hexString.substr(index, 2);
+ number = parseInt(string, 16);
+ result += BinaryParser.fromByte(number);
+ }
+
+ return new ObjectID(result, hexString);
+};
+
+/**
+* @ignore
+*/
+Object.defineProperty(ObjectID.prototype, "generationTime", {
+ enumerable: true
+ , get: function () {
+ return Math.floor(BinaryParser.decodeInt(this.id.substring(0,4), 32, true, true));
+ }
+ , set: function (value) {
+ var value = BinaryParser.encodeInt(value, 32, true, true);
+ this.id = value + this.id.substr(4);
+ // delete this.__id;
+ this.toHexString();
+ }
+});
+
+/**
+ * Expose.
+ */
+exports.ObjectID = ObjectID;
+exports.ObjectId = ObjectID;
+
+},
+
+
+
+'symbol': function(module, exports, global, require, undefined){
+ /**
+ * A class representation of the BSON Symbol type.
+ *
+ * @class Represents the BSON Symbol type.
+ * @param {String} value the string representing the symbol.
+ * @return {Symbol}
+ */
+function Symbol(value) {
+ if(!(this instanceof Symbol)) return new Symbol(value);
+ this._bsontype = 'Symbol';
+ this.value = value;
+}
+
+/**
+ * Access the wrapped string value.
+ *
+ * @return {String} returns the wrapped string.
+ * @api public
+ */
+Symbol.prototype.valueOf = function() {
+ return this.value;
+};
+
+/**
+ * @ignore
+ * @api private
+ */
+Symbol.prototype.toString = function() {
+ return this.value;
+}
+
+/**
+ * @ignore
+ * @api private
+ */
+Symbol.prototype.inspect = function() {
+ return this.value;
+}
+
+/**
+ * @ignore
+ * @api private
+ */
+Symbol.prototype.toJSON = function() {
+ return this.value;
+}
+
+exports.Symbol = Symbol;
+},
+
+
+
+'timestamp': function(module, exports, global, require, undefined){
+ // Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Copyright 2009 Google Inc. All Rights Reserved
+
+/**
+ * Defines a Timestamp class for representing a 64-bit two's-complement
+ * integer value, which faithfully simulates the behavior of a Java "Timestamp". This
+ * implementation is derived from TimestampLib in GWT.
+ *
+ * Constructs a 64-bit two's-complement integer, given its low and high 32-bit
+ * values as *signed* integers. See the from* functions below for more
+ * convenient ways of constructing Timestamps.
+ *
+ * The internal representation of a Timestamp is the two given signed, 32-bit values.
+ * We use 32-bit pieces because these are the size of integers on which
+ * Javascript performs bit-operations. For operations like addition and
+ * multiplication, we split each number into 16-bit pieces, which can easily be
+ * multiplied within Javascript's floating-point representation without overflow
+ * or change in sign.
+ *
+ * In the algorithms below, we frequently reduce the negative case to the
+ * positive case by negating the input(s) and then post-processing the result.
+ * Note that we must ALWAYS check specially whether those values are MIN_VALUE
+ * (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as
+ * a positive number, it overflows back into a negative). Not handling this
+ * case would often result in infinite recursion.
+ *
+ * @class Represents the BSON Timestamp type.
+ * @param {Number} low the low (signed) 32 bits of the Timestamp.
+ * @param {Number} high the high (signed) 32 bits of the Timestamp.
+ */
+function Timestamp(low, high) {
+ if(!(this instanceof Timestamp)) return new Timestamp(low, high);
+ this._bsontype = 'Timestamp';
+ /**
+ * @type {number}
+ * @api private
+ */
+ this.low_ = low | 0; // force into 32 signed bits.
+
+ /**
+ * @type {number}
+ * @api private
+ */
+ this.high_ = high | 0; // force into 32 signed bits.
+};
+
+/**
+ * Return the int value.
+ *
+ * @return {Number} the value, assuming it is a 32-bit integer.
+ * @api public
+ */
+Timestamp.prototype.toInt = function() {
+ return this.low_;
+};
+
+/**
+ * Return the Number value.
+ *
+ * @return {Number} the closest floating-point representation to this value.
+ * @api public
+ */
+Timestamp.prototype.toNumber = function() {
+ return this.high_ * Timestamp.TWO_PWR_32_DBL_ +
+ this.getLowBitsUnsigned();
+};
+
+/**
+ * Return the JSON value.
+ *
+ * @return {String} the JSON representation.
+ * @api public
+ */
+Timestamp.prototype.toJSON = function() {
+ return this.toString();
+}
+
+/**
+ * Return the String value.
+ *
+ * @param {Number} [opt_radix] the radix in which the text should be written.
+ * @return {String} the textual representation of this value.
+ * @api public
+ */
+Timestamp.prototype.toString = function(opt_radix) {
+ var radix = opt_radix || 10;
+ if (radix < 2 || 36 < radix) {
+ throw Error('radix out of range: ' + radix);
+ }
+
+ if (this.isZero()) {
+ return '0';
+ }
+
+ if (this.isNegative()) {
+ if (this.equals(Timestamp.MIN_VALUE)) {
+ // We need to change the Timestamp value before it can be negated, so we remove
+ // the bottom-most digit in this base and then recurse to do the rest.
+ var radixTimestamp = Timestamp.fromNumber(radix);
+ var div = this.div(radixTimestamp);
+ var rem = div.multiply(radixTimestamp).subtract(this);
+ return div.toString(radix) + rem.toInt().toString(radix);
+ } else {
+ return '-' + this.negate().toString(radix);
+ }
+ }
+
+ // Do several (6) digits each time through the loop, so as to
+ // minimize the calls to the very expensive emulated div.
+ var radixToPower = Timestamp.fromNumber(Math.pow(radix, 6));
+
+ var rem = this;
+ var result = '';
+ while (true) {
+ var remDiv = rem.div(radixToPower);
+ var intval = rem.subtract(remDiv.multiply(radixToPower)).toInt();
+ var digits = intval.toString(radix);
+
+ rem = remDiv;
+ if (rem.isZero()) {
+ return digits + result;
+ } else {
+ while (digits.length < 6) {
+ digits = '0' + digits;
+ }
+ result = '' + digits + result;
+ }
+ }
+};
+
+/**
+ * Return the high 32-bits value.
+ *
+ * @return {Number} the high 32-bits as a signed value.
+ * @api public
+ */
+Timestamp.prototype.getHighBits = function() {
+ return this.high_;
+};
+
+/**
+ * Return the low 32-bits value.
+ *
+ * @return {Number} the low 32-bits as a signed value.
+ * @api public
+ */
+Timestamp.prototype.getLowBits = function() {
+ return this.low_;
+};
+
+/**
+ * Return the low unsigned 32-bits value.
+ *
+ * @return {Number} the low 32-bits as an unsigned value.
+ * @api public
+ */
+Timestamp.prototype.getLowBitsUnsigned = function() {
+ return (this.low_ >= 0) ?
+ this.low_ : Timestamp.TWO_PWR_32_DBL_ + this.low_;
+};
+
+/**
+ * Returns the number of bits needed to represent the absolute value of this Timestamp.
+ *
+ * @return {Number} Returns the number of bits needed to represent the absolute value of this Timestamp.
+ * @api public
+ */
+Timestamp.prototype.getNumBitsAbs = function() {
+ if (this.isNegative()) {
+ if (this.equals(Timestamp.MIN_VALUE)) {
+ return 64;
+ } else {
+ return this.negate().getNumBitsAbs();
+ }
+ } else {
+ var val = this.high_ != 0 ? this.high_ : this.low_;
+ for (var bit = 31; bit > 0; bit--) {
+ if ((val & (1 << bit)) != 0) {
+ break;
+ }
+ }
+ return this.high_ != 0 ? bit + 33 : bit + 1;
+ }
+};
+
+/**
+ * Return whether this value is zero.
+ *
+ * @return {Boolean} whether this value is zero.
+ * @api public
+ */
+Timestamp.prototype.isZero = function() {
+ return this.high_ == 0 && this.low_ == 0;
+};
+
+/**
+ * Return whether this value is negative.
+ *
+ * @return {Boolean} whether this value is negative.
+ * @api public
+ */
+Timestamp.prototype.isNegative = function() {
+ return this.high_ < 0;
+};
+
+/**
+ * Return whether this value is odd.
+ *
+ * @return {Boolean} whether this value is odd.
+ * @api public
+ */
+Timestamp.prototype.isOdd = function() {
+ return (this.low_ & 1) == 1;
+};
+
+/**
+ * Return whether this Timestamp equals the other
+ *
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {Boolean} whether this Timestamp equals the other
+ * @api public
+ */
+Timestamp.prototype.equals = function(other) {
+ return (this.high_ == other.high_) && (this.low_ == other.low_);
+};
+
+/**
+ * Return whether this Timestamp does not equal the other.
+ *
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {Boolean} whether this Timestamp does not equal the other.
+ * @api public
+ */
+Timestamp.prototype.notEquals = function(other) {
+ return (this.high_ != other.high_) || (this.low_ != other.low_);
+};
+
+/**
+ * Return whether this Timestamp is less than the other.
+ *
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {Boolean} whether this Timestamp is less than the other.
+ * @api public
+ */
+Timestamp.prototype.lessThan = function(other) {
+ return this.compare(other) < 0;
+};
+
+/**
+ * Return whether this Timestamp is less than or equal to the other.
+ *
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {Boolean} whether this Timestamp is less than or equal to the other.
+ * @api public
+ */
+Timestamp.prototype.lessThanOrEqual = function(other) {
+ return this.compare(other) <= 0;
+};
+
+/**
+ * Return whether this Timestamp is greater than the other.
+ *
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {Boolean} whether this Timestamp is greater than the other.
+ * @api public
+ */
+Timestamp.prototype.greaterThan = function(other) {
+ return this.compare(other) > 0;
+};
+
+/**
+ * Return whether this Timestamp is greater than or equal to the other.
+ *
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {Boolean} whether this Timestamp is greater than or equal to the other.
+ * @api public
+ */
+Timestamp.prototype.greaterThanOrEqual = function(other) {
+ return this.compare(other) >= 0;
+};
+
+/**
+ * Compares this Timestamp with the given one.
+ *
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {Boolean} 0 if they are the same, 1 if the this is greater, and -1 if the given one is greater.
+ * @api public
+ */
+Timestamp.prototype.compare = function(other) {
+ if (this.equals(other)) {
+ return 0;
+ }
+
+ var thisNeg = this.isNegative();
+ var otherNeg = other.isNegative();
+ if (thisNeg && !otherNeg) {
+ return -1;
+ }
+ if (!thisNeg && otherNeg) {
+ return 1;
+ }
+
+ // at this point, the signs are the same, so subtraction will not overflow
+ if (this.subtract(other).isNegative()) {
+ return -1;
+ } else {
+ return 1;
+ }
+};
+
+/**
+ * The negation of this value.
+ *
+ * @return {Timestamp} the negation of this value.
+ * @api public
+ */
+Timestamp.prototype.negate = function() {
+ if (this.equals(Timestamp.MIN_VALUE)) {
+ return Timestamp.MIN_VALUE;
+ } else {
+ return this.not().add(Timestamp.ONE);
+ }
+};
+
+/**
+ * Returns the sum of this and the given Timestamp.
+ *
+ * @param {Timestamp} other Timestamp to add to this one.
+ * @return {Timestamp} the sum of this and the given Timestamp.
+ * @api public
+ */
+Timestamp.prototype.add = function(other) {
+ // Divide each number into 4 chunks of 16 bits, and then sum the chunks.
+
+ var a48 = this.high_ >>> 16;
+ var a32 = this.high_ & 0xFFFF;
+ var a16 = this.low_ >>> 16;
+ var a00 = this.low_ & 0xFFFF;
+
+ var b48 = other.high_ >>> 16;
+ var b32 = other.high_ & 0xFFFF;
+ var b16 = other.low_ >>> 16;
+ var b00 = other.low_ & 0xFFFF;
+
+ var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
+ c00 += a00 + b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xFFFF;
+ c16 += a16 + b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c32 += a32 + b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c48 += a48 + b48;
+ c48 &= 0xFFFF;
+ return Timestamp.fromBits((c16 << 16) | c00, (c48 << 16) | c32);
+};
+
+/**
+ * Returns the difference of this and the given Timestamp.
+ *
+ * @param {Timestamp} other Timestamp to subtract from this.
+ * @return {Timestamp} the difference of this and the given Timestamp.
+ * @api public
+ */
+Timestamp.prototype.subtract = function(other) {
+ return this.add(other.negate());
+};
+
+/**
+ * Returns the product of this and the given Timestamp.
+ *
+ * @param {Timestamp} other Timestamp to multiply with this.
+ * @return {Timestamp} the product of this and the other.
+ * @api public
+ */
+Timestamp.prototype.multiply = function(other) {
+ if (this.isZero()) {
+ return Timestamp.ZERO;
+ } else if (other.isZero()) {
+ return Timestamp.ZERO;
+ }
+
+ if (this.equals(Timestamp.MIN_VALUE)) {
+ return other.isOdd() ? Timestamp.MIN_VALUE : Timestamp.ZERO;
+ } else if (other.equals(Timestamp.MIN_VALUE)) {
+ return this.isOdd() ? Timestamp.MIN_VALUE : Timestamp.ZERO;
+ }
+
+ if (this.isNegative()) {
+ if (other.isNegative()) {
+ return this.negate().multiply(other.negate());
+ } else {
+ return this.negate().multiply(other).negate();
+ }
+ } else if (other.isNegative()) {
+ return this.multiply(other.negate()).negate();
+ }
+
+ // If both Timestamps are small, use float multiplication
+ if (this.lessThan(Timestamp.TWO_PWR_24_) &&
+ other.lessThan(Timestamp.TWO_PWR_24_)) {
+ return Timestamp.fromNumber(this.toNumber() * other.toNumber());
+ }
+
+ // Divide each Timestamp into 4 chunks of 16 bits, and then add up 4x4 products.
+ // We can skip products that would overflow.
+
+ var a48 = this.high_ >>> 16;
+ var a32 = this.high_ & 0xFFFF;
+ var a16 = this.low_ >>> 16;
+ var a00 = this.low_ & 0xFFFF;
+
+ var b48 = other.high_ >>> 16;
+ var b32 = other.high_ & 0xFFFF;
+ var b16 = other.low_ >>> 16;
+ var b00 = other.low_ & 0xFFFF;
+
+ var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
+ c00 += a00 * b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xFFFF;
+ c16 += a16 * b00;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c16 += a00 * b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c32 += a32 * b00;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c32 += a16 * b16;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c32 += a00 * b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
+ c48 &= 0xFFFF;
+ return Timestamp.fromBits((c16 << 16) | c00, (c48 << 16) | c32);
+};
+
+/**
+ * Returns this Timestamp divided by the given one.
+ *
+ * @param {Timestamp} other Timestamp by which to divide.
+ * @return {Timestamp} this Timestamp divided by the given one.
+ * @api public
+ */
+Timestamp.prototype.div = function(other) {
+ if (other.isZero()) {
+ throw Error('division by zero');
+ } else if (this.isZero()) {
+ return Timestamp.ZERO;
+ }
+
+ if (this.equals(Timestamp.MIN_VALUE)) {
+ if (other.equals(Timestamp.ONE) ||
+ other.equals(Timestamp.NEG_ONE)) {
+ return Timestamp.MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE
+ } else if (other.equals(Timestamp.MIN_VALUE)) {
+ return Timestamp.ONE;
+ } else {
+ // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.
+ var halfThis = this.shiftRight(1);
+ var approx = halfThis.div(other).shiftLeft(1);
+ if (approx.equals(Timestamp.ZERO)) {
+ return other.isNegative() ? Timestamp.ONE : Timestamp.NEG_ONE;
+ } else {
+ var rem = this.subtract(other.multiply(approx));
+ var result = approx.add(rem.div(other));
+ return result;
+ }
+ }
+ } else if (other.equals(Timestamp.MIN_VALUE)) {
+ return Timestamp.ZERO;
+ }
+
+ if (this.isNegative()) {
+ if (other.isNegative()) {
+ return this.negate().div(other.negate());
+ } else {
+ return this.negate().div(other).negate();
+ }
+ } else if (other.isNegative()) {
+ return this.div(other.negate()).negate();
+ }
+
+ // Repeat the following until the remainder is less than other: find a
+ // floating-point that approximates remainder / other *from below*, add this
+ // into the result, and subtract it from the remainder. It is critical that
+ // the approximate value is less than or equal to the real value so that the
+ // remainder never becomes negative.
+ var res = Timestamp.ZERO;
+ var rem = this;
+ while (rem.greaterThanOrEqual(other)) {
+ // Approximate the result of division. This may be a little greater or
+ // smaller than the actual value.
+ var approx = Math.max(1, Math.floor(rem.toNumber() / other.toNumber()));
+
+ // We will tweak the approximate result by changing it in the 48-th digit or
+ // the smallest non-fractional digit, whichever is larger.
+ var log2 = Math.ceil(Math.log(approx) / Math.LN2);
+ var delta = (log2 <= 48) ? 1 : Math.pow(2, log2 - 48);
+
+ // Decrease the approximation until it is smaller than the remainder. Note
+ // that if it is too large, the product overflows and is negative.
+ var approxRes = Timestamp.fromNumber(approx);
+ var approxRem = approxRes.multiply(other);
+ while (approxRem.isNegative() || approxRem.greaterThan(rem)) {
+ approx -= delta;
+ approxRes = Timestamp.fromNumber(approx);
+ approxRem = approxRes.multiply(other);
+ }
+
+ // We know the answer can't be zero... and actually, zero would cause
+ // infinite recursion since we would make no progress.
+ if (approxRes.isZero()) {
+ approxRes = Timestamp.ONE;
+ }
+
+ res = res.add(approxRes);
+ rem = rem.subtract(approxRem);
+ }
+ return res;
+};
+
+/**
+ * Returns this Timestamp modulo the given one.
+ *
+ * @param {Timestamp} other Timestamp by which to mod.
+ * @return {Timestamp} this Timestamp modulo the given one.
+ * @api public
+ */
+Timestamp.prototype.modulo = function(other) {
+ return this.subtract(this.div(other).multiply(other));
+};
+
+/**
+ * The bitwise-NOT of this value.
+ *
+ * @return {Timestamp} the bitwise-NOT of this value.
+ * @api public
+ */
+Timestamp.prototype.not = function() {
+ return Timestamp.fromBits(~this.low_, ~this.high_);
+};
+
+/**
+ * Returns the bitwise-AND of this Timestamp and the given one.
+ *
+ * @param {Timestamp} other the Timestamp with which to AND.
+ * @return {Timestamp} the bitwise-AND of this and the other.
+ * @api public
+ */
+Timestamp.prototype.and = function(other) {
+ return Timestamp.fromBits(this.low_ & other.low_, this.high_ & other.high_);
+};
+
+/**
+ * Returns the bitwise-OR of this Timestamp and the given one.
+ *
+ * @param {Timestamp} other the Timestamp with which to OR.
+ * @return {Timestamp} the bitwise-OR of this and the other.
+ * @api public
+ */
+Timestamp.prototype.or = function(other) {
+ return Timestamp.fromBits(this.low_ | other.low_, this.high_ | other.high_);
+};
+
+/**
+ * Returns the bitwise-XOR of this Timestamp and the given one.
+ *
+ * @param {Timestamp} other the Timestamp with which to XOR.
+ * @return {Timestamp} the bitwise-XOR of this and the other.
+ * @api public
+ */
+Timestamp.prototype.xor = function(other) {
+ return Timestamp.fromBits(this.low_ ^ other.low_, this.high_ ^ other.high_);
+};
+
+/**
+ * Returns this Timestamp with bits shifted to the left by the given amount.
+ *
+ * @param {Number} numBits the number of bits by which to shift.
+ * @return {Timestamp} this shifted to the left by the given amount.
+ * @api public
+ */
+Timestamp.prototype.shiftLeft = function(numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var low = this.low_;
+ if (numBits < 32) {
+ var high = this.high_;
+ return Timestamp.fromBits(
+ low << numBits,
+ (high << numBits) | (low >>> (32 - numBits)));
+ } else {
+ return Timestamp.fromBits(0, low << (numBits - 32));
+ }
+ }
+};
+
+/**
+ * Returns this Timestamp with bits shifted to the right by the given amount.
+ *
+ * @param {Number} numBits the number of bits by which to shift.
+ * @return {Timestamp} this shifted to the right by the given amount.
+ * @api public
+ */
+Timestamp.prototype.shiftRight = function(numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var high = this.high_;
+ if (numBits < 32) {
+ var low = this.low_;
+ return Timestamp.fromBits(
+ (low >>> numBits) | (high << (32 - numBits)),
+ high >> numBits);
+ } else {
+ return Timestamp.fromBits(
+ high >> (numBits - 32),
+ high >= 0 ? 0 : -1);
+ }
+ }
+};
+
+/**
+ * Returns this Timestamp with bits shifted to the right by the given amount, with the new top bits matching the current sign bit.
+ *
+ * @param {Number} numBits the number of bits by which to shift.
+ * @return {Timestamp} this shifted to the right by the given amount, with zeros placed into the new leading bits.
+ * @api public
+ */
+Timestamp.prototype.shiftRightUnsigned = function(numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var high = this.high_;
+ if (numBits < 32) {
+ var low = this.low_;
+ return Timestamp.fromBits(
+ (low >>> numBits) | (high << (32 - numBits)),
+ high >>> numBits);
+ } else if (numBits == 32) {
+ return Timestamp.fromBits(high, 0);
+ } else {
+ return Timestamp.fromBits(high >>> (numBits - 32), 0);
+ }
+ }
+};
+
+/**
+ * Returns a Timestamp representing the given (32-bit) integer value.
+ *
+ * @param {Number} value the 32-bit integer in question.
+ * @return {Timestamp} the corresponding Timestamp value.
+ * @api public
+ */
+Timestamp.fromInt = function(value) {
+ if (-128 <= value && value < 128) {
+ var cachedObj = Timestamp.INT_CACHE_[value];
+ if (cachedObj) {
+ return cachedObj;
+ }
+ }
+
+ var obj = new Timestamp(value | 0, value < 0 ? -1 : 0);
+ if (-128 <= value && value < 128) {
+ Timestamp.INT_CACHE_[value] = obj;
+ }
+ return obj;
+};
+
+/**
+ * Returns a Timestamp representing the given value, provided that it is a finite number. Otherwise, zero is returned.
+ *
+ * @param {Number} value the number in question.
+ * @return {Timestamp} the corresponding Timestamp value.
+ * @api public
+ */
+Timestamp.fromNumber = function(value) {
+ if (isNaN(value) || !isFinite(value)) {
+ return Timestamp.ZERO;
+ } else if (value <= -Timestamp.TWO_PWR_63_DBL_) {
+ return Timestamp.MIN_VALUE;
+ } else if (value + 1 >= Timestamp.TWO_PWR_63_DBL_) {
+ return Timestamp.MAX_VALUE;
+ } else if (value < 0) {
+ return Timestamp.fromNumber(-value).negate();
+ } else {
+ return new Timestamp(
+ (value % Timestamp.TWO_PWR_32_DBL_) | 0,
+ (value / Timestamp.TWO_PWR_32_DBL_) | 0);
+ }
+};
+
+/**
+ * Returns a Timestamp representing the 64-bit integer that comes by concatenating the given high and low bits. Each is assumed to use 32 bits.
+ *
+ * @param {Number} lowBits the low 32-bits.
+ * @param {Number} highBits the high 32-bits.
+ * @return {Timestamp} the corresponding Timestamp value.
+ * @api public
+ */
+Timestamp.fromBits = function(lowBits, highBits) {
+ return new Timestamp(lowBits, highBits);
+};
+
+/**
+ * Returns a Timestamp representation of the given string, written using the given radix.
+ *
+ * @param {String} str the textual representation of the Timestamp.
+ * @param {Number} opt_radix the radix in which the text is written.
+ * @return {Timestamp} the corresponding Timestamp value.
+ * @api public
+ */
+Timestamp.fromString = function(str, opt_radix) {
+ if (str.length == 0) {
+ throw Error('number format error: empty string');
+ }
+
+ var radix = opt_radix || 10;
+ if (radix < 2 || 36 < radix) {
+ throw Error('radix out of range: ' + radix);
+ }
+
+ if (str.charAt(0) == '-') {
+ return Timestamp.fromString(str.substring(1), radix).negate();
+ } else if (str.indexOf('-') >= 0) {
+ throw Error('number format error: interior "-" character: ' + str);
+ }
+
+ // Do several (8) digits each time through the loop, so as to
+ // minimize the calls to the very expensive emulated div.
+ var radixToPower = Timestamp.fromNumber(Math.pow(radix, 8));
+
+ var result = Timestamp.ZERO;
+ for (var i = 0; i < str.length; i += 8) {
+ var size = Math.min(8, str.length - i);
+ var value = parseInt(str.substring(i, i + size), radix);
+ if (size < 8) {
+ var power = Timestamp.fromNumber(Math.pow(radix, size));
+ result = result.multiply(power).add(Timestamp.fromNumber(value));
+ } else {
+ result = result.multiply(radixToPower);
+ result = result.add(Timestamp.fromNumber(value));
+ }
+ }
+ return result;
+};
+
+// NOTE: Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the
+// from* methods on which they depend.
+
+
+/**
+ * A cache of the Timestamp representations of small integer values.
+ * @type {Object}
+ * @api private
+ */
+Timestamp.INT_CACHE_ = {};
+
+// NOTE: the compiler should inline these constant values below and then remove
+// these variables, so there should be no runtime penalty for these.
+
+/**
+ * Number used repeated below in calculations. This must appear before the
+ * first call to any from* function below.
+ * @type {number}
+ * @api private
+ */
+Timestamp.TWO_PWR_16_DBL_ = 1 << 16;
+
+/**
+ * @type {number}
+ * @api private
+ */
+Timestamp.TWO_PWR_24_DBL_ = 1 << 24;
+
+/**
+ * @type {number}
+ * @api private
+ */
+Timestamp.TWO_PWR_32_DBL_ = Timestamp.TWO_PWR_16_DBL_ * Timestamp.TWO_PWR_16_DBL_;
+
+/**
+ * @type {number}
+ * @api private
+ */
+Timestamp.TWO_PWR_31_DBL_ = Timestamp.TWO_PWR_32_DBL_ / 2;
+
+/**
+ * @type {number}
+ * @api private
+ */
+Timestamp.TWO_PWR_48_DBL_ = Timestamp.TWO_PWR_32_DBL_ * Timestamp.TWO_PWR_16_DBL_;
+
+/**
+ * @type {number}
+ * @api private
+ */
+Timestamp.TWO_PWR_64_DBL_ = Timestamp.TWO_PWR_32_DBL_ * Timestamp.TWO_PWR_32_DBL_;
+
+/**
+ * @type {number}
+ * @api private
+ */
+Timestamp.TWO_PWR_63_DBL_ = Timestamp.TWO_PWR_64_DBL_ / 2;
+
+/** @type {Timestamp} */
+Timestamp.ZERO = Timestamp.fromInt(0);
+
+/** @type {Timestamp} */
+Timestamp.ONE = Timestamp.fromInt(1);
+
+/** @type {Timestamp} */
+Timestamp.NEG_ONE = Timestamp.fromInt(-1);
+
+/** @type {Timestamp} */
+Timestamp.MAX_VALUE =
+ Timestamp.fromBits(0xFFFFFFFF | 0, 0x7FFFFFFF | 0);
+
+/** @type {Timestamp} */
+Timestamp.MIN_VALUE = Timestamp.fromBits(0, 0x80000000 | 0);
+
+/**
+ * @type {Timestamp}
+ * @api private
+ */
+Timestamp.TWO_PWR_24_ = Timestamp.fromInt(1 << 24);
+
+/**
+ * Expose.
+ */
+exports.Timestamp = Timestamp;
+},
+
+ });
+
+
+if(typeof module != 'undefined' && module.exports ){
+ module.exports = bson;
+
+ if( !module.parent ){
+ bson();
+ }
+}
+
+if(typeof window != 'undefined' && typeof require == 'undefined'){
+ window.require = bson.require;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/browser_build/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/browser_build/package.json
new file mode 100644
index 0000000..3ebb587
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/browser_build/package.json
@@ -0,0 +1,8 @@
+{ "name" : "bson"
+, "description" : "A bson parser for node.js and the browser"
+, "main": "../lib/bson/bson"
+, "directories" : { "lib" : "../lib/bson" }
+, "engines" : { "node" : ">=0.6.0" }
+, "licenses" : [ { "type" : "Apache License, Version 2.0"
+ , "url" : "http://www.apache.org/licenses/LICENSE-2.0" } ]
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/deserializer_bak.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/deserializer_bak.js
new file mode 100644
index 0000000..c879ad5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/deserializer_bak.js
@@ -0,0 +1,357 @@
+"use strict"
+
+var writeIEEE754 = require('../float_parser').writeIEEE754,
+ readIEEE754 = require('../float_parser').readIEEE754,
+ f = require('util').format,
+ Long = require('../long').Long,
+ Double = require('../double').Double,
+ Timestamp = require('../timestamp').Timestamp,
+ ObjectID = require('../objectid').ObjectID,
+ Symbol = require('../symbol').Symbol,
+ Code = require('../code').Code,
+ MinKey = require('../min_key').MinKey,
+ MaxKey = require('../max_key').MaxKey,
+ DBRef = require('../db_ref').DBRef,
+ BSONRegExp = require('../regexp').BSONRegExp,
+ Binary = require('../binary').Binary;
+
+var BSON = {};
+
+/**
+ * Contains the function cache if we have that enable to allow for avoiding the eval step on each deserialization, comparison is by md5
+ *
+ * @ignore
+ * @api private
+ */
+var functionCache = BSON.functionCache = {};
+
+/**
+ * Number BSON Type
+ *
+ * @classconstant BSON_DATA_NUMBER
+ **/
+BSON.BSON_DATA_NUMBER = 1;
+/**
+ * String BSON Type
+ *
+ * @classconstant BSON_DATA_STRING
+ **/
+BSON.BSON_DATA_STRING = 2;
+/**
+ * Object BSON Type
+ *
+ * @classconstant BSON_DATA_OBJECT
+ **/
+BSON.BSON_DATA_OBJECT = 3;
+/**
+ * Array BSON Type
+ *
+ * @classconstant BSON_DATA_ARRAY
+ **/
+BSON.BSON_DATA_ARRAY = 4;
+/**
+ * Binary BSON Type
+ *
+ * @classconstant BSON_DATA_BINARY
+ **/
+BSON.BSON_DATA_BINARY = 5;
+/**
+ * ObjectID BSON Type
+ *
+ * @classconstant BSON_DATA_OID
+ **/
+BSON.BSON_DATA_OID = 7;
+/**
+ * Boolean BSON Type
+ *
+ * @classconstant BSON_DATA_BOOLEAN
+ **/
+BSON.BSON_DATA_BOOLEAN = 8;
+/**
+ * Date BSON Type
+ *
+ * @classconstant BSON_DATA_DATE
+ **/
+BSON.BSON_DATA_DATE = 9;
+/**
+ * null BSON Type
+ *
+ * @classconstant BSON_DATA_NULL
+ **/
+BSON.BSON_DATA_NULL = 10;
+/**
+ * RegExp BSON Type
+ *
+ * @classconstant BSON_DATA_REGEXP
+ **/
+BSON.BSON_DATA_REGEXP = 11;
+/**
+ * Code BSON Type
+ *
+ * @classconstant BSON_DATA_CODE
+ **/
+BSON.BSON_DATA_CODE = 13;
+/**
+ * Symbol BSON Type
+ *
+ * @classconstant BSON_DATA_SYMBOL
+ **/
+BSON.BSON_DATA_SYMBOL = 14;
+/**
+ * Code with Scope BSON Type
+ *
+ * @classconstant BSON_DATA_CODE_W_SCOPE
+ **/
+BSON.BSON_DATA_CODE_W_SCOPE = 15;
+/**
+ * 32 bit Integer BSON Type
+ *
+ * @classconstant BSON_DATA_INT
+ **/
+BSON.BSON_DATA_INT = 16;
+/**
+ * Timestamp BSON Type
+ *
+ * @classconstant BSON_DATA_TIMESTAMP
+ **/
+BSON.BSON_DATA_TIMESTAMP = 17;
+/**
+ * Long BSON Type
+ *
+ * @classconstant BSON_DATA_LONG
+ **/
+BSON.BSON_DATA_LONG = 18;
+/**
+ * MinKey BSON Type
+ *
+ * @classconstant BSON_DATA_MIN_KEY
+ **/
+BSON.BSON_DATA_MIN_KEY = 0xff;
+/**
+ * MaxKey BSON Type
+ *
+ * @classconstant BSON_DATA_MAX_KEY
+ **/
+BSON.BSON_DATA_MAX_KEY = 0x7f;
+
+/**
+ * Binary Default Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_DEFAULT
+ **/
+BSON.BSON_BINARY_SUBTYPE_DEFAULT = 0;
+/**
+ * Binary Function Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_FUNCTION
+ **/
+BSON.BSON_BINARY_SUBTYPE_FUNCTION = 1;
+/**
+ * Binary Byte Array Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_BYTE_ARRAY
+ **/
+BSON.BSON_BINARY_SUBTYPE_BYTE_ARRAY = 2;
+/**
+ * Binary UUID Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_UUID
+ **/
+BSON.BSON_BINARY_SUBTYPE_UUID = 3;
+/**
+ * Binary MD5 Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_MD5
+ **/
+BSON.BSON_BINARY_SUBTYPE_MD5 = 4;
+/**
+ * Binary User Defined Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_USER_DEFINED
+ **/
+BSON.BSON_BINARY_SUBTYPE_USER_DEFINED = 128;
+
+// BSON MAX VALUES
+BSON.BSON_INT32_MAX = 0x7FFFFFFF;
+BSON.BSON_INT32_MIN = -0x80000000;
+
+BSON.BSON_INT64_MAX = Math.pow(2, 63) - 1;
+BSON.BSON_INT64_MIN = -Math.pow(2, 63);
+
+// JS MAX PRECISE VALUES
+BSON.JS_INT_MAX = 0x20000000000000; // Any integer up to 2^53 can be precisely represented by a double.
+BSON.JS_INT_MIN = -0x20000000000000; // Any integer down to -2^53 can be precisely represented by a double.
+
+// Internal long versions
+var JS_INT_MAX_LONG = Long.fromNumber(0x20000000000000); // Any integer up to 2^53 can be precisely represented by a double.
+var JS_INT_MIN_LONG = Long.fromNumber(-0x20000000000000); // Any integer down to -2^53 can be precisely represented by a double.
+
+var deserialize = function(buffer, options, isArray) {
+ var index = 0;
+ // Read the document size
+ var size = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+
+ // Ensure buffer is valid size
+ if(size < 5 || buffer.length < size) {
+ throw new Error("corrupt bson message");
+ }
+
+ // Illegal end value
+ if(buffer[size - 1] != 0) {
+ throw new Error("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");
+ }
+
+ // Start deserializtion
+ return deserializeObject(buffer, options, isArray);
+}
+
+// // Reads in a C style string
+// var readCStyleStringSpecial = function(buffer, index) {
+// // Get the start search index
+// var i = index;
+// // Locate the end of the c string
+// while(buffer[i] !== 0x00 && i < buffer.length) {
+// i++
+// }
+// // If are at the end of the buffer there is a problem with the document
+// if(i >= buffer.length) throw new Error("Bad BSON Document: illegal CString")
+// // Grab utf8 encoded string
+// var string = buffer.toString('utf8', index, i);
+// // Update index position
+// index = i + 1;
+// // Return string
+// return {s: string, i: index};
+// }
+
+// Reads in a C style string
+var readCStyleStringSpecial = function(buffer, index) {
+ // Get the start search index
+ var i = index;
+ // Locate the end of the c string
+ while(buffer[i] !== 0x00 && i < buffer.length) {
+ i++
+ }
+ // If are at the end of the buffer there is a problem with the document
+ if(i >= buffer.length) throw new Error("Bad BSON Document: illegal CString")
+ // Grab utf8 encoded string
+ return buffer.toString('utf8', index, i);
+}
+
+var DeserializationMethods = {}
+DeserializationMethods[BSON.BSON_DATA_OID] = function(name, object, buffer, index) {
+ var string = buffer.toString('binary', index, index + 12);
+ object[name] = new ObjectID(string);
+ return index + 12;
+}
+
+DeserializationMethods[BSON.BSON_DATA_NUMBER] = function(name, object, buffer, index) {
+ object[name] = buffer.readDoubleLE(index);
+ return index + 8;
+}
+
+DeserializationMethods[BSON.BSON_DATA_INT] = function(name, object, buffer, index) {
+ object[name] = buffer.readInt32LE(index);
+ return index + 4;
+}
+
+DeserializationMethods[BSON.BSON_DATA_TIMESTAMP] = function(name, object, buffer, index) {
+ var lowBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var highBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ object[name] = new Timestamp(lowBits, highBits);
+ return index;
+}
+
+DeserializationMethods[BSON.BSON_DATA_STRING] = function(name, object, buffer, index) {
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ if(stringSize <= 0 || stringSize > (buffer.length - index) || buffer[index + stringSize - 1] != 0) throw new Error("bad string length in bson");
+ object[name] = buffer.toString('utf8', index, index + stringSize - 1);
+ return index + stringSize;
+}
+
+DeserializationMethods[BSON.BSON_DATA_BOOLEAN] = function(name, object, buffer, index) {
+ object[name] = buffer[index++] == 1;
+ return index;
+}
+
+var deserializeObject = function(buffer, options, isArray) {
+ // Options
+ options = options == null ? {} : options;
+ var evalFunctions = options['evalFunctions'] == null ? false : options['evalFunctions'];
+ var cacheFunctions = options['cacheFunctions'] == null ? false : options['cacheFunctions'];
+ var cacheFunctionsCrc32 = options['cacheFunctionsCrc32'] == null ? false : options['cacheFunctionsCrc32'];
+ var promoteLongs = options['promoteLongs'] == null ? true : options['promoteLongs'];
+ var fieldsAsRaw = options['fieldsAsRaw'] == null ? {} : options['fieldsAsRaw'];
+ // Return BSONRegExp objects instead of native regular expressions
+ var bsonRegExp = typeof options['bsonRegExp'] == 'boolean' ? options['bsonRegExp'] : false;
+ var promoteBuffers = options['promoteBuffers'] == null ? false : options['promoteBuffers'];
+
+ // Validate that we have at least 4 bytes of buffer
+ if(buffer.length < 5) throw new Error("corrupt bson message < 5 bytes long");
+
+ // Set up index
+ var index = typeof options['index'] == 'number' ? options['index'] : 0;
+
+ // Read the document size
+ var size = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+
+ // Ensure buffer is valid size
+ if(size < 5 || size > buffer.length) throw new Error("corrupt bson message");
+
+ // Create holding object
+ var object = isArray ? [] : {};
+
+ // While we have more left data left keep parsing
+ while(true) {
+ // Read the type
+ var elementType = buffer[index++];
+ // If we get a zero it's the last byte, exit
+ if(elementType == 0) break;
+ var name = readCStyleStringSpecial(buffer, index);
+ index = index + name.length + 1;
+
+ // console.log("----------- 0 " + elementType + " :: " + name)
+ index = DeserializationMethods[elementType](name, object, buffer, index);
+ // console.log('--------------- 1')
+ }
+
+ // Check if we have a db ref object
+ if(object['$id'] != null) object = new DBRef(object['$ref'], object['$id'], object['$db']);
+
+ // Return the final objects
+ return object;
+}
+
+/**
+ * Ensure eval is isolated.
+ *
+ * @ignore
+ * @api private
+ */
+var isolateEvalWithHash = function(functionCache, hash, functionString, object) {
+ // Contains the value we are going to set
+ var value = null;
+
+ // Check for cache hit, eval if missing and return cached function
+ if(functionCache[hash] == null) {
+ eval("value = " + functionString);
+ functionCache[hash] = value;
+ }
+ // Set the object
+ return functionCache[hash].bind(object);
+}
+
+/**
+ * Ensure eval is isolated.
+ *
+ * @ignore
+ * @api private
+ */
+var isolateEval = function(functionString) {
+ // Contains the value we are going to set
+ var value = null;
+ // Eval the function
+ eval("value = " + functionString);
+ return value;
+}
+
+module.exports = deserialize
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/binary.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/binary.js
new file mode 100644
index 0000000..793b56f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/binary.js
@@ -0,0 +1,347 @@
+/**
+ * Module dependencies.
+ * @ignore
+ */
+
+// Test if we're in Node via presence of "global" not absence of "window"
+// to support hybrid environments like Electron
+if(typeof global !== 'undefined') {
+ var Buffer = require('buffer').Buffer; // TODO just use global Buffer
+}
+
+/**
+ * A class representation of the BSON Binary type.
+ *
+ * Sub types
+ * - **BSON.BSON_BINARY_SUBTYPE_DEFAULT**, default BSON type.
+ * - **BSON.BSON_BINARY_SUBTYPE_FUNCTION**, BSON function type.
+ * - **BSON.BSON_BINARY_SUBTYPE_BYTE_ARRAY**, BSON byte array type.
+ * - **BSON.BSON_BINARY_SUBTYPE_UUID**, BSON uuid type.
+ * - **BSON.BSON_BINARY_SUBTYPE_MD5**, BSON md5 type.
+ * - **BSON.BSON_BINARY_SUBTYPE_USER_DEFINED**, BSON user defined type.
+ *
+ * @class
+ * @param {Buffer} buffer a buffer object containing the binary data.
+ * @param {Number} [subType] the option binary type.
+ * @return {Binary}
+ */
+function Binary(buffer, subType) {
+ if(!(this instanceof Binary)) return new Binary(buffer, subType);
+
+ this._bsontype = 'Binary';
+
+ if(buffer instanceof Number) {
+ this.sub_type = buffer;
+ this.position = 0;
+ } else {
+ this.sub_type = subType == null ? BSON_BINARY_SUBTYPE_DEFAULT : subType;
+ this.position = 0;
+ }
+
+ if(buffer != null && !(buffer instanceof Number)) {
+ // Only accept Buffer, Uint8Array or Arrays
+ if(typeof buffer == 'string') {
+ // Different ways of writing the length of the string for the different types
+ if(typeof Buffer != 'undefined') {
+ this.buffer = new Buffer(buffer);
+ } else if(typeof Uint8Array != 'undefined' || (Object.prototype.toString.call(buffer) == '[object Array]')) {
+ this.buffer = writeStringToArray(buffer);
+ } else {
+ throw new Error("only String, Buffer, Uint8Array or Array accepted");
+ }
+ } else {
+ this.buffer = buffer;
+ }
+ this.position = buffer.length;
+ } else {
+ if(typeof Buffer != 'undefined') {
+ this.buffer = new Buffer(Binary.BUFFER_SIZE);
+ } else if(typeof Uint8Array != 'undefined'){
+ this.buffer = new Uint8Array(new ArrayBuffer(Binary.BUFFER_SIZE));
+ } else {
+ this.buffer = new Array(Binary.BUFFER_SIZE);
+ }
+ // Set position to start of buffer
+ this.position = 0;
+ }
+};
+
+/**
+ * Updates this binary with byte_value.
+ *
+ * @method
+ * @param {string} byte_value a single byte we wish to write.
+ */
+Binary.prototype.put = function put(byte_value) {
+ // If it's a string and a has more than one character throw an error
+ if(byte_value['length'] != null && typeof byte_value != 'number' && byte_value.length != 1) throw new Error("only accepts single character String, Uint8Array or Array");
+ if(typeof byte_value != 'number' && byte_value < 0 || byte_value > 255) throw new Error("only accepts number in a valid unsigned byte range 0-255");
+
+ // Decode the byte value once
+ var decoded_byte = null;
+ if(typeof byte_value == 'string') {
+ decoded_byte = byte_value.charCodeAt(0);
+ } else if(byte_value['length'] != null) {
+ decoded_byte = byte_value[0];
+ } else {
+ decoded_byte = byte_value;
+ }
+
+ if(this.buffer.length > this.position) {
+ this.buffer[this.position++] = decoded_byte;
+ } else {
+ if(typeof Buffer != 'undefined' && Buffer.isBuffer(this.buffer)) {
+ // Create additional overflow buffer
+ var buffer = new Buffer(Binary.BUFFER_SIZE + this.buffer.length);
+ // Combine the two buffers together
+ this.buffer.copy(buffer, 0, 0, this.buffer.length);
+ this.buffer = buffer;
+ this.buffer[this.position++] = decoded_byte;
+ } else {
+ var buffer = null;
+ // Create a new buffer (typed or normal array)
+ if(Object.prototype.toString.call(this.buffer) == '[object Uint8Array]') {
+ buffer = new Uint8Array(new ArrayBuffer(Binary.BUFFER_SIZE + this.buffer.length));
+ } else {
+ buffer = new Array(Binary.BUFFER_SIZE + this.buffer.length);
+ }
+
+ // We need to copy all the content to the new array
+ for(var i = 0; i < this.buffer.length; i++) {
+ buffer[i] = this.buffer[i];
+ }
+
+ // Reassign the buffer
+ this.buffer = buffer;
+ // Write the byte
+ this.buffer[this.position++] = decoded_byte;
+ }
+ }
+};
+
+/**
+ * Writes a buffer or string to the binary.
+ *
+ * @method
+ * @param {(Buffer|string)} string a string or buffer to be written to the Binary BSON object.
+ * @param {number} offset specify the binary of where to write the content.
+ * @return {null}
+ */
+Binary.prototype.write = function write(string, offset) {
+ offset = typeof offset == 'number' ? offset : this.position;
+
+ // If the buffer is to small let's extend the buffer
+ if(this.buffer.length < offset + string.length) {
+ var buffer = null;
+ // If we are in node.js
+ if(typeof Buffer != 'undefined' && Buffer.isBuffer(this.buffer)) {
+ buffer = new Buffer(this.buffer.length + string.length);
+ this.buffer.copy(buffer, 0, 0, this.buffer.length);
+ } else if(Object.prototype.toString.call(this.buffer) == '[object Uint8Array]') {
+ // Create a new buffer
+ buffer = new Uint8Array(new ArrayBuffer(this.buffer.length + string.length))
+ // Copy the content
+ for(var i = 0; i < this.position; i++) {
+ buffer[i] = this.buffer[i];
+ }
+ }
+
+ // Assign the new buffer
+ this.buffer = buffer;
+ }
+
+ if(typeof Buffer != 'undefined' && Buffer.isBuffer(string) && Buffer.isBuffer(this.buffer)) {
+ string.copy(this.buffer, offset, 0, string.length);
+ this.position = (offset + string.length) > this.position ? (offset + string.length) : this.position;
+ // offset = string.length
+ } else if(typeof Buffer != 'undefined' && typeof string == 'string' && Buffer.isBuffer(this.buffer)) {
+ this.buffer.write(string, offset, 'binary');
+ this.position = (offset + string.length) > this.position ? (offset + string.length) : this.position;
+ // offset = string.length;
+ } else if(Object.prototype.toString.call(string) == '[object Uint8Array]'
+ || Object.prototype.toString.call(string) == '[object Array]' && typeof string != 'string') {
+ for(var i = 0; i < string.length; i++) {
+ this.buffer[offset++] = string[i];
+ }
+
+ this.position = offset > this.position ? offset : this.position;
+ } else if(typeof string == 'string') {
+ for(var i = 0; i < string.length; i++) {
+ this.buffer[offset++] = string.charCodeAt(i);
+ }
+
+ this.position = offset > this.position ? offset : this.position;
+ }
+};
+
+/**
+ * Reads **length** bytes starting at **position**.
+ *
+ * @method
+ * @param {number} position read from the given position in the Binary.
+ * @param {number} length the number of bytes to read.
+ * @return {Buffer}
+ */
+Binary.prototype.read = function read(position, length) {
+ length = length && length > 0
+ ? length
+ : this.position;
+
+ // Let's return the data based on the type we have
+ if(this.buffer['slice']) {
+ return this.buffer.slice(position, position + length);
+ } else {
+ // Create a buffer to keep the result
+ var buffer = typeof Uint8Array != 'undefined' ? new Uint8Array(new ArrayBuffer(length)) : new Array(length);
+ for(var i = 0; i < length; i++) {
+ buffer[i] = this.buffer[position++];
+ }
+ }
+ // Return the buffer
+ return buffer;
+};
+
+/**
+ * Returns the value of this binary as a string.
+ *
+ * @method
+ * @return {string}
+ */
+Binary.prototype.value = function value(asRaw) {
+ asRaw = asRaw == null ? false : asRaw;
+
+ // Optimize to serialize for the situation where the data == size of buffer
+ if(asRaw && typeof Buffer != 'undefined' && Buffer.isBuffer(this.buffer) && this.buffer.length == this.position)
+ return this.buffer;
+
+ // If it's a node.js buffer object
+ if(typeof Buffer != 'undefined' && Buffer.isBuffer(this.buffer)) {
+ return asRaw ? this.buffer.slice(0, this.position) : this.buffer.toString('binary', 0, this.position);
+ } else {
+ if(asRaw) {
+ // we support the slice command use it
+ if(this.buffer['slice'] != null) {
+ return this.buffer.slice(0, this.position);
+ } else {
+ // Create a new buffer to copy content to
+ var newBuffer = Object.prototype.toString.call(this.buffer) == '[object Uint8Array]' ? new Uint8Array(new ArrayBuffer(this.position)) : new Array(this.position);
+ // Copy content
+ for(var i = 0; i < this.position; i++) {
+ newBuffer[i] = this.buffer[i];
+ }
+ // Return the buffer
+ return newBuffer;
+ }
+ } else {
+ return convertArraytoUtf8BinaryString(this.buffer, 0, this.position);
+ }
+ }
+};
+
+/**
+ * Length.
+ *
+ * @method
+ * @return {number} the length of the binary.
+ */
+Binary.prototype.length = function length() {
+ return this.position;
+};
+
+/**
+ * @ignore
+ */
+Binary.prototype.toJSON = function() {
+ return this.buffer != null ? this.buffer.toString('base64') : '';
+}
+
+/**
+ * @ignore
+ */
+Binary.prototype.toString = function(format) {
+ return this.buffer != null ? this.buffer.slice(0, this.position).toString(format) : '';
+}
+
+/**
+ * Binary default subtype
+ * @ignore
+ */
+var BSON_BINARY_SUBTYPE_DEFAULT = 0;
+
+/**
+ * @ignore
+ */
+var writeStringToArray = function(data) {
+ // Create a buffer
+ var buffer = typeof Uint8Array != 'undefined' ? new Uint8Array(new ArrayBuffer(data.length)) : new Array(data.length);
+ // Write the content to the buffer
+ for(var i = 0; i < data.length; i++) {
+ buffer[i] = data.charCodeAt(i);
+ }
+ // Write the string to the buffer
+ return buffer;
+}
+
+/**
+ * Convert Array ot Uint8Array to Binary String
+ *
+ * @ignore
+ */
+var convertArraytoUtf8BinaryString = function(byteArray, startIndex, endIndex) {
+ var result = "";
+ for(var i = startIndex; i < endIndex; i++) {
+ result = result + String.fromCharCode(byteArray[i]);
+ }
+ return result;
+};
+
+Binary.BUFFER_SIZE = 256;
+
+/**
+ * Default BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+Binary.SUBTYPE_DEFAULT = 0;
+/**
+ * Function BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+Binary.SUBTYPE_FUNCTION = 1;
+/**
+ * Byte Array BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+Binary.SUBTYPE_BYTE_ARRAY = 2;
+/**
+ * OLD UUID BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+Binary.SUBTYPE_UUID_OLD = 3;
+/**
+ * UUID BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+Binary.SUBTYPE_UUID = 4;
+/**
+ * MD5 BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+Binary.SUBTYPE_MD5 = 5;
+/**
+ * User BSON type
+ *
+ * @classconstant SUBTYPE_DEFAULT
+ **/
+Binary.SUBTYPE_USER_DEFINED = 128;
+
+/**
+ * Expose.
+ */
+module.exports = Binary;
+module.exports.Binary = Binary;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/bson.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/bson.js
new file mode 100644
index 0000000..bd2ee6c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/bson.js
@@ -0,0 +1,327 @@
+"use strict"
+
+var writeIEEE754 = require('./float_parser').writeIEEE754,
+ readIEEE754 = require('./float_parser').readIEEE754,
+ Map = require('./map'),
+ Long = require('./long'),
+ Double = require('./double'),
+ Timestamp = require('./timestamp'),
+ ObjectID = require('./objectid'),
+ BSONRegExp = require('./regexp'),
+ Symbol = require('./symbol'),
+ Int32 = require('./int_32'),
+ Code = require('./code'),
+ Decimal128 = require('./decimal128'),
+ MinKey = require('./min_key'),
+ MaxKey = require('./max_key'),
+ DBRef = require('./db_ref'),
+ Binary = require('./binary');
+
+// Parts of the parser
+var deserialize = require('./parser/deserializer'),
+ serializer = require('./parser/serializer'),
+ calculateObjectSize = require('./parser/calculate_size');
+
+/**
+ * @ignore
+ * @api private
+ */
+// Max Size
+var MAXSIZE = (1024*1024*17);
+// Max Document Buffer size
+var buffer = new Buffer(MAXSIZE);
+
+var BSON = function() {
+}
+
+/**
+ * Serialize a Javascript object.
+ *
+ * @param {Object} object the Javascript object to serialize.
+ * @param {Boolean} checkKeys the serializer will check if keys are valid.
+ * @param {Boolean} asBuffer return the serialized object as a Buffer object **(ignore)**.
+ * @param {Boolean} serializeFunctions serialize the javascript functions **(default:false)**.
+ * @return {Buffer} returns the Buffer object containing the serialized object.
+ * @api public
+ */
+BSON.prototype.serialize = function serialize(object, checkKeys, asBuffer, serializeFunctions, index, ignoreUndefined) {
+ // Attempt to serialize
+ var serializationIndex = serializer(buffer, object, checkKeys, index || 0, 0, serializeFunctions, ignoreUndefined, []);
+ // Create the final buffer
+ var finishedBuffer = new Buffer(serializationIndex);
+ // Copy into the finished buffer
+ buffer.copy(finishedBuffer, 0, 0, finishedBuffer.length);
+ // Return the buffer
+ return finishedBuffer;
+}
+
+/**
+ * Serialize a Javascript object using a predefined Buffer and index into the buffer, useful when pre-allocating the space for serialization.
+ *
+ * @param {Object} object the Javascript object to serialize.
+ * @param {Boolean} checkKeys the serializer will check if keys are valid.
+ * @param {Buffer} buffer the Buffer you pre-allocated to store the serialized BSON object.
+ * @param {Number} index the index in the buffer where we wish to start serializing into.
+ * @param {Boolean} serializeFunctions serialize the javascript functions **(default:false)**.
+ * @return {Number} returns the index pointing to the last written byte in the buffer.
+ * @api public
+ */
+BSON.prototype.serializeWithBufferAndIndex = function(object, checkKeys, finalBuffer, startIndex, serializeFunctions, ignoreUndefined) {
+ // Attempt to serialize
+ var serializationIndex = serializer(buffer, object, checkKeys, startIndex || 0, 0, serializeFunctions, ignoreUndefined);
+ buffer.copy(finalBuffer, startIndex, 0, serializationIndex);
+ // Return the index
+ return serializationIndex - 1;
+}
+
+/**
+ * Deserialize data as BSON.
+ *
+ * Options
+ * - **evalFunctions** {Boolean, default:false}, evaluate functions in the BSON document scoped to the object deserialized.
+ * - **cacheFunctions** {Boolean, default:false}, cache evaluated functions for reuse.
+ * - **cacheFunctionsCrc32** {Boolean, default:false}, use a crc32 code for caching, otherwise use the string of the function.
+ * - **promoteLongs** {Boolean, default:true}, when deserializing a Long will fit it into a Number if it's smaller than 53 bits
+ *
+ * @param {Buffer} buffer the buffer containing the serialized set of BSON documents.
+ * @param {Object} [options] additional options used for the deserialization.
+ * @param {Boolean} [isArray] ignore used for recursive parsing.
+ * @return {Object} returns the deserialized Javascript Object.
+ * @api public
+ */
+BSON.prototype.deserialize = function(data, options) {
+ return deserialize(data, options);
+}
+
+/**
+ * Calculate the bson size for a passed in Javascript object.
+ *
+ * @param {Object} object the Javascript object to calculate the BSON byte size for.
+ * @param {Boolean} [serializeFunctions] serialize all functions in the object **(default:false)**.
+ * @return {Number} returns the number of bytes the BSON object will take up.
+ * @api public
+ */
+BSON.prototype.calculateObjectSize = function(object, serializeFunctions, ignoreUndefined) {
+ return calculateObjectSize(object, serializeFunctions, ignoreUndefined);
+}
+
+/**
+ * Deserialize stream data as BSON documents.
+ *
+ * Options
+ * - **evalFunctions** {Boolean, default:false}, evaluate functions in the BSON document scoped to the object deserialized.
+ * - **cacheFunctions** {Boolean, default:false}, cache evaluated functions for reuse.
+ * - **cacheFunctionsCrc32** {Boolean, default:false}, use a crc32 code for caching, otherwise use the string of the function.
+ * - **promoteLongs** {Boolean, default:true}, when deserializing a Long will fit it into a Number if it's smaller than 53 bits
+ *
+ * @param {Buffer} data the buffer containing the serialized set of BSON documents.
+ * @param {Number} startIndex the start index in the data Buffer where the deserialization is to start.
+ * @param {Number} numberOfDocuments number of documents to deserialize.
+ * @param {Array} documents an array where to store the deserialized documents.
+ * @param {Number} docStartIndex the index in the documents array from where to start inserting documents.
+ * @param {Object} [options] additional options used for the deserialization.
+ * @return {Number} returns the next index in the buffer after deserialization **x** numbers of documents.
+ * @api public
+ */
+BSON.prototype.deserializeStream = function(data, startIndex, numberOfDocuments, documents, docStartIndex, options) {
+ // if(numberOfDocuments !== documents.length) throw new Error("Number of expected results back is less than the number of documents");
+ options = options != null ? options : {};
+ var index = startIndex;
+ // Loop over all documents
+ for(var i = 0; i < numberOfDocuments; i++) {
+ // Find size of the document
+ var size = data[index] | data[index + 1] << 8 | data[index + 2] << 16 | data[index + 3] << 24;
+ // Update options with index
+ options['index'] = index;
+ // Parse the document at this point
+ documents[docStartIndex + i] = this.deserialize(data, options);
+ // Adjust index by the document size
+ index = index + size;
+ }
+
+ // Return object containing end index of parsing and list of documents
+ return index;
+}
+
+/**
+ * @ignore
+ * @api private
+ */
+// BSON MAX VALUES
+BSON.BSON_INT32_MAX = 0x7FFFFFFF;
+BSON.BSON_INT32_MIN = -0x80000000;
+
+BSON.BSON_INT64_MAX = Math.pow(2, 63) - 1;
+BSON.BSON_INT64_MIN = -Math.pow(2, 63);
+
+// JS MAX PRECISE VALUES
+BSON.JS_INT_MAX = 0x20000000000000; // Any integer up to 2^53 can be precisely represented by a double.
+BSON.JS_INT_MIN = -0x20000000000000; // Any integer down to -2^53 can be precisely represented by a double.
+
+// Internal long versions
+var JS_INT_MAX_LONG = Long.fromNumber(0x20000000000000); // Any integer up to 2^53 can be precisely represented by a double.
+var JS_INT_MIN_LONG = Long.fromNumber(-0x20000000000000); // Any integer down to -2^53 can be precisely represented by a double.
+
+/**
+ * Number BSON Type
+ *
+ * @classconstant BSON_DATA_NUMBER
+ **/
+BSON.BSON_DATA_NUMBER = 1;
+/**
+ * String BSON Type
+ *
+ * @classconstant BSON_DATA_STRING
+ **/
+BSON.BSON_DATA_STRING = 2;
+/**
+ * Object BSON Type
+ *
+ * @classconstant BSON_DATA_OBJECT
+ **/
+BSON.BSON_DATA_OBJECT = 3;
+/**
+ * Array BSON Type
+ *
+ * @classconstant BSON_DATA_ARRAY
+ **/
+BSON.BSON_DATA_ARRAY = 4;
+/**
+ * Binary BSON Type
+ *
+ * @classconstant BSON_DATA_BINARY
+ **/
+BSON.BSON_DATA_BINARY = 5;
+/**
+ * ObjectID BSON Type
+ *
+ * @classconstant BSON_DATA_OID
+ **/
+BSON.BSON_DATA_OID = 7;
+/**
+ * Boolean BSON Type
+ *
+ * @classconstant BSON_DATA_BOOLEAN
+ **/
+BSON.BSON_DATA_BOOLEAN = 8;
+/**
+ * Date BSON Type
+ *
+ * @classconstant BSON_DATA_DATE
+ **/
+BSON.BSON_DATA_DATE = 9;
+/**
+ * null BSON Type
+ *
+ * @classconstant BSON_DATA_NULL
+ **/
+BSON.BSON_DATA_NULL = 10;
+/**
+ * RegExp BSON Type
+ *
+ * @classconstant BSON_DATA_REGEXP
+ **/
+BSON.BSON_DATA_REGEXP = 11;
+/**
+ * Code BSON Type
+ *
+ * @classconstant BSON_DATA_CODE
+ **/
+BSON.BSON_DATA_CODE = 13;
+/**
+ * Symbol BSON Type
+ *
+ * @classconstant BSON_DATA_SYMBOL
+ **/
+BSON.BSON_DATA_SYMBOL = 14;
+/**
+ * Code with Scope BSON Type
+ *
+ * @classconstant BSON_DATA_CODE_W_SCOPE
+ **/
+BSON.BSON_DATA_CODE_W_SCOPE = 15;
+/**
+ * 32 bit Integer BSON Type
+ *
+ * @classconstant BSON_DATA_INT
+ **/
+BSON.BSON_DATA_INT = 16;
+/**
+ * Timestamp BSON Type
+ *
+ * @classconstant BSON_DATA_TIMESTAMP
+ **/
+BSON.BSON_DATA_TIMESTAMP = 17;
+/**
+ * Long BSON Type
+ *
+ * @classconstant BSON_DATA_LONG
+ **/
+BSON.BSON_DATA_LONG = 18;
+/**
+ * MinKey BSON Type
+ *
+ * @classconstant BSON_DATA_MIN_KEY
+ **/
+BSON.BSON_DATA_MIN_KEY = 0xff;
+/**
+ * MaxKey BSON Type
+ *
+ * @classconstant BSON_DATA_MAX_KEY
+ **/
+BSON.BSON_DATA_MAX_KEY = 0x7f;
+
+/**
+ * Binary Default Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_DEFAULT
+ **/
+BSON.BSON_BINARY_SUBTYPE_DEFAULT = 0;
+/**
+ * Binary Function Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_FUNCTION
+ **/
+BSON.BSON_BINARY_SUBTYPE_FUNCTION = 1;
+/**
+ * Binary Byte Array Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_BYTE_ARRAY
+ **/
+BSON.BSON_BINARY_SUBTYPE_BYTE_ARRAY = 2;
+/**
+ * Binary UUID Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_UUID
+ **/
+BSON.BSON_BINARY_SUBTYPE_UUID = 3;
+/**
+ * Binary MD5 Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_MD5
+ **/
+BSON.BSON_BINARY_SUBTYPE_MD5 = 4;
+/**
+ * Binary User Defined Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_USER_DEFINED
+ **/
+BSON.BSON_BINARY_SUBTYPE_USER_DEFINED = 128;
+
+// Return BSON
+module.exports = BSON;
+module.exports.Code = Code;
+module.exports.Map = Map;
+module.exports.Symbol = Symbol;
+module.exports.BSON = BSON;
+module.exports.DBRef = DBRef;
+module.exports.Binary = Binary;
+module.exports.ObjectID = ObjectID;
+module.exports.Long = Long;
+module.exports.Timestamp = Timestamp;
+module.exports.Double = Double;
+module.exports.Int32 = Int32;
+module.exports.MinKey = MinKey;
+module.exports.MaxKey = MaxKey;
+module.exports.BSONRegExp = BSONRegExp;
+module.exports.Decimal128 = Decimal128;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/code.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/code.js
new file mode 100644
index 0000000..bc80ce5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/code.js
@@ -0,0 +1,24 @@
+/**
+ * A class representation of the BSON Code type.
+ *
+ * @class
+ * @param {(string|function)} code a string or function.
+ * @param {Object} [scope] an optional scope for the function.
+ * @return {Code}
+ */
+var Code = function Code(code, scope) {
+ if(!(this instanceof Code)) return new Code(code, scope);
+ this._bsontype = 'Code';
+ this.code = code;
+ this.scope = scope;
+};
+
+/**
+ * @ignore
+ */
+Code.prototype.toJSON = function() {
+ return {scope:this.scope, code:this.code};
+}
+
+module.exports = Code;
+module.exports.Code = Code;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/db_ref.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/db_ref.js
new file mode 100644
index 0000000..06789a6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/db_ref.js
@@ -0,0 +1,32 @@
+/**
+ * A class representation of the BSON DBRef type.
+ *
+ * @class
+ * @param {string} namespace the collection name.
+ * @param {ObjectID} oid the reference ObjectID.
+ * @param {string} [db] optional db name, if omitted the reference is local to the current db.
+ * @return {DBRef}
+ */
+function DBRef(namespace, oid, db) {
+ if(!(this instanceof DBRef)) return new DBRef(namespace, oid, db);
+
+ this._bsontype = 'DBRef';
+ this.namespace = namespace;
+ this.oid = oid;
+ this.db = db;
+};
+
+/**
+ * @ignore
+ * @api private
+ */
+DBRef.prototype.toJSON = function() {
+ return {
+ '$ref':this.namespace,
+ '$id':this.oid,
+ '$db':this.db == null ? '' : this.db
+ };
+}
+
+module.exports = DBRef;
+module.exports.DBRef = DBRef; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/decimal128.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/decimal128.js
new file mode 100644
index 0000000..23ae082
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/decimal128.js
@@ -0,0 +1,728 @@
+"use strict"
+
+var Long = require('./long');
+
+var PARSE_STRING_REGEXP = /^(\+|\-)?(\d+|(\d*\.\d*))?(E|e)?([\-\+])?(\d+)?$/;
+var PARSE_INF_REGEXP = /^(\+|\-)?(Infinity|inf)$/i;
+var PARSE_NAN_REGEXP = /^(\+|\-)?NaN$/i;
+
+var EXPONENT_MAX = 6111;
+var EXPONENT_MIN = -6176;
+var EXPONENT_BIAS = 6176;
+var MAX_DIGITS = 34;
+
+// Nan value bits as 32 bit values (due to lack of longs)
+var NAN_BUFFER = [0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00].reverse();
+// Infinity value bits 32 bit values (due to lack of longs)
+var INF_NEGATIVE_BUFFER = [0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00].reverse();
+var INF_POSITIVE_BUFFER = [0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00].reverse();
+
+var EXPONENT_REGEX = /^([\-\+])?(\d+)?$/;
+
+
+// Detect if the value is a digit
+var isDigit = function(value) {
+ return !isNaN(parseInt(value, 10));
+}
+
+// Divide two uint128 values
+var divideu128 = function(value) {
+ var DIVISOR = Long.fromNumber(1000 * 1000 * 1000);
+ var _rem = Long.fromNumber(0);
+ var i = 0;
+
+ if(!value.parts[0] && !value.parts[1] &&
+ !value.parts[2] && !value.parts[3]) {
+ return { quotient: value, rem: _rem };
+ }
+
+ for(var i = 0; i <= 3; i++) {
+ // Adjust remainder to match value of next dividend
+ _rem = _rem.shiftLeft(32);
+ // Add the divided to _rem
+ _rem = _rem.add(new Long(value.parts[i], 0));
+ value.parts[i] = _rem.div(DIVISOR).low_;
+ _rem = _rem.modulo(DIVISOR);
+ }
+
+ return { quotient: value, rem: _rem };
+}
+
+// Multiply two Long values and return the 128 bit value
+var multiply64x2 = function(left, right) {
+ if(!left && !right) {
+ return {high: Long.fromNumber(0), low: Long.fromNumber(0)};
+ }
+
+ var leftHigh = left.shiftRightUnsigned(32);
+ var leftLow = new Long(left.getLowBits(), 0);
+ var rightHigh = right.shiftRightUnsigned(32);
+ var rightLow = new Long(right.getLowBits(), 0);
+
+ var productHigh = leftHigh.multiply(rightHigh);
+ var productMid = leftHigh.multiply(rightLow);
+ var productMid2 = leftLow.multiply(rightHigh);
+ var productLow = leftLow.multiply(rightLow);
+
+ productHigh = productHigh.add(productMid.shiftRightUnsigned(32));
+ productMid = new Long(productMid.getLowBits(), 0)
+ .add(productMid2)
+ .add(productLow.shiftRightUnsigned(32));
+
+ productHigh = productHigh.add(productMid.shiftRightUnsigned(32));
+ productLow = productMid.shiftLeft(32).add(new Long(productLow.getLowBits(), 0));
+
+ // Return the 128 bit result
+ return {high: productHigh, low: productLow};
+}
+
+var lessThan = function(left, right) {
+ // Make values unsigned
+ var uhleft = left.high_ >>> 0;
+ var uhright = right.high_ >>> 0;
+
+ // Compare high bits first
+ if(uhleft < uhright) {
+ return true
+ } else if(uhleft == uhright) {
+ var ulleft = left.low_ >>> 0;
+ var ulright = right.low_ >>> 0;
+ if(ulleft < ulright) return true;
+ }
+
+ return false;
+}
+
+var longtoHex = function(value) {
+ var buffer = new Buffer(8);
+ var index = 0;
+ // Encode the low 64 bits of the decimal
+ // Encode low bits
+ buffer[index++] = value.low_ & 0xff;
+ buffer[index++] = (value.low_ >> 8) & 0xff;
+ buffer[index++] = (value.low_ >> 16) & 0xff;
+ buffer[index++] = (value.low_ >> 24) & 0xff;
+ // Encode high bits
+ buffer[index++] = value.high_ & 0xff;
+ buffer[index++] = (value.high_ >> 8) & 0xff;
+ buffer[index++] = (value.high_ >> 16) & 0xff;
+ buffer[index++] = (value.high_ >> 24) & 0xff;
+ return buffer.reverse().toString('hex');
+}
+
+var int32toHex = function(value) {
+ var buffer = new Buffer(4);
+ var index = 0;
+ // Encode the low 64 bits of the decimal
+ // Encode low bits
+ buffer[index++] = value & 0xff;
+ buffer[index++] = (value >> 8) & 0xff;
+ buffer[index++] = (value >> 16) & 0xff;
+ buffer[index++] = (value >> 24) & 0xff;
+ return buffer.reverse().toString('hex');
+}
+
+var Decimal128 = function(bytes) {
+ this._bsontype = 'Decimal128';
+ this.bytes = bytes;
+}
+
+Decimal128.fromString = function(string) {
+ // Parse state tracking
+ var isNegative = false;
+ var sawRadix = false;
+ var foundNonZero = false;
+
+ // Total number of significant digits (no leading or trailing zero)
+ var significantDigits = 0;
+ // Total number of significand digits read
+ var nDigitsRead = 0;
+ // Total number of digits (no leading zeros)
+ var nDigits = 0;
+ // The number of the digits after radix
+ var radixPosition = 0;
+ // The index of the first non-zero in *str*
+ var firstNonZero = 0;
+
+ // Digits Array
+ var digits = [0];
+ // The number of digits in digits
+ var nDigitsStored = 0;
+ // Insertion pointer for digits
+ var digitsInsert = 0;
+ // The index of the first non-zero digit
+ var firstDigit = 0;
+ // The index of the last digit
+ var lastDigit = 0;
+
+ // Exponent
+ var exponent = 0;
+ // loop index over array
+ var i = 0;
+ // The high 17 digits of the significand
+ var significandHigh = [0, 0];
+ // The low 17 digits of the significand
+ var significandLow = [0, 0];
+ // The biased exponent
+ var biasedExponent = 0;
+
+ // Read index
+ var index = 0;
+
+ // Trim the string
+ string = string.trim();
+
+ // Results
+ var stringMatch = string.match(PARSE_STRING_REGEXP);
+ var infMatch = string.match(PARSE_INF_REGEXP);
+ var nanMatch = string.match(PARSE_NAN_REGEXP);
+
+ // Validate the string
+ if(!stringMatch
+ && ! infMatch
+ && ! nanMatch || string.length == 0) {
+ throw new Error("" + string + " not a valid Decimal128 string");
+ }
+
+ // Check if we have an illegal exponent format
+ if(stringMatch && stringMatch[4] && stringMatch[2] === undefined) {
+ throw new Error("" + string + " not a valid Decimal128 string");
+ }
+
+ // Get the negative or positive sign
+ if(string[index] == '+' || string[index] == '-') {
+ isNegative = string[index++] == '-';
+ }
+
+ // Check if user passed Infinity or NaN
+ if(!isDigit(string[index]) && string[index] != '.') {
+ if(string[index] == 'i' || string[index] == 'I') {
+ return new Decimal128(new Buffer(isNegative ? INF_NEGATIVE_BUFFER : INF_POSITIVE_BUFFER));
+ } else if(string[index] == 'N') {
+ return new Decimal128(new Buffer(NAN_BUFFER));
+ }
+ }
+
+ // Read all the digits
+ while(isDigit(string[index]) || string[index] == '.') {
+ if(string[index] == '.') {
+ if(sawRadix) {
+ return new Decimal128(new Buffer(NAN_BUFFER));
+ }
+
+ sawRadix = true;
+ index = index + 1;
+ continue;
+ }
+
+ if(nDigitsStored < 34) {
+ if(string[index] != '0' || foundNonZero) {
+ if(!foundNonZero) {
+ firstNonZero = nDigitsRead;
+ }
+
+ foundNonZero = true;
+
+ // Only store 34 digits
+ digits[digitsInsert++] = parseInt(string[index], 10);
+ nDigitsStored = nDigitsStored + 1;
+ }
+ }
+
+ if(foundNonZero) {
+ nDigits = nDigits + 1;
+ }
+
+ if(sawRadix) {
+ radixPosition = radixPosition + 1;
+ }
+
+ nDigitsRead = nDigitsRead + 1;
+ index = index + 1;
+ }
+
+ if(sawRadix && !nDigitsRead) {
+ throw new Error("" + string + " not a valid Decimal128 string");
+ }
+
+ // Read exponent if exists
+ if(string[index] == 'e' || string[index] == 'E') {
+ // Read exponent digits
+ var match = string.substr(++index).match(EXPONENT_REGEX);
+
+ // No digits read
+ if(!match || !match[2]) {
+ return new Decimal128(new Buffer(NAN_BUFFER));
+ }
+
+ // Get exponent
+ exponent = parseInt(match[0], 10);
+
+ // Adjust the index
+ index = index + match[0].length;
+ }
+
+ // Return not a number
+ if(string[index]) {
+ return new Decimal128(new Buffer(NAN_BUFFER));
+ }
+
+ // Done reading input
+ // Find first non-zero digit in digits
+ firstDigit = 0;
+
+ if(!nDigitsStored) {
+ firstDigit = 0;
+ lastDigit = 0;
+ digits[0] = 0;
+ nDigits = 1;
+ nDigitsStored = 1;
+ significantDigits = 0;
+ } else {
+ lastDigit = nDigitsStored - 1;
+ significantDigits = nDigits;
+
+ if(exponent != 0 && significantDigits != 1) {
+ while(string[firstNonZero + significantDigits - 1] == '0') {
+ significantDigits = significantDigits - 1;
+ }
+ }
+ }
+
+ // Normalization of exponent
+ // Correct exponent based on radix position, and shift significand as needed
+ // to represent user input
+
+ // Overflow prevention
+ if(exponent <= radixPosition && radixPosition - exponent > (1 << 14)) {
+ exponent = EXPONENT_MIN;
+ } else {
+ exponent = exponent - radixPosition;
+ }
+
+ // Attempt to normalize the exponent
+ while(exponent > EXPONENT_MAX) {
+ // Shift exponent to significand and decrease
+ lastDigit = lastDigit + 1;
+
+ if(lastDigit - firstDigit > MAX_DIGITS) {
+ // Check if we have a zero then just hard clamp, otherwise fail
+ var digitsString = digits.join('');
+ if(digitsString.match(/^0+$/)) {
+ exponent = EXPONENT_MAX;
+ break;
+ } else {
+ return new Decimal128(new Buffer(isNegative ? INF_NEGATIVE_BUFFER : INF_POSITIVE_BUFFER));
+ }
+ }
+
+ exponent = exponent - 1;
+ }
+
+ while(exponent < EXPONENT_MIN || nDigitsStored < nDigits) {
+ // Shift last digit
+ if(lastDigit == 0) {
+ exponent = EXPONENT_MIN;
+ significantDigits = 0;
+ break;
+ }
+
+ if(nDigitsStored < nDigits) {
+ // adjust to match digits not stored
+ nDigits = nDigits - 1;
+ } else {
+ // adjust to round
+ lastDigit = lastDigit - 1;
+ }
+
+ if(exponent < EXPONENT_MAX) {
+ exponent = exponent + 1;
+ } else {
+ // Check if we have a zero then just hard clamp, otherwise fail
+ var digitsString = digits.join('');
+ if(digitsString.match(/^0+$/)) {
+ exponent = EXPONENT_MAX;
+ break;
+ } else {
+ return new Decimal128(new Buffer(isNegative ? INF_NEGATIVE_BUFFER : INF_POSITIVE_BUFFER))
+ }
+ }
+ }
+
+
+ // Round
+ // We've normalized the exponent, but might still need to round.
+ if((lastDigit - firstDigit + 1 < significantDigits) && string[significantDigits] != '0') {
+ var endOfString = nDigitsRead;
+
+ // If we have seen a radix point, 'string' is 1 longer than we have
+ // documented with ndigits_read, so inc the position of the first nonzero
+ // digit and the position that digits are read to.
+ if(sawRadix && exponent == EXPONENT_MIN) {
+ firstNonZero = firstNonZero + 1;
+ endOfString = endOfString + 1;
+ }
+
+ var roundDigit = parseInt(string[firstNonZero + lastDigit + 1], 10);
+ var roundBit = 0;
+
+ if(roundDigit >= 5) {
+ roundBit = 1;
+
+ if(roundDigit == 5) {
+ roundBit = digits[lastDigit] % 2 == 1;
+
+ for(var i = firstNonZero + lastDigit + 2; i < endOfString; i++) {
+ if(parseInt(string[i], 10)) {
+ roundBit = 1;
+ break;
+ }
+ }
+ }
+ }
+
+ if(roundBit) {
+ var dIdx = lastDigit;
+
+ for(; dIdx >= 0; dIdx--) {
+ if(++digits[dIdx] > 9) {
+ digits[dIdx] = 0;
+
+ // overflowed most significant digit
+ if(dIdx == 0) {
+ if(exponent < EXPONENT_MAX) {
+ exponent = exponent + 1;
+ digits[dIdx] = 1;
+ } else {
+ return new Decimal128(new Buffer(isNegative ? INF_NEGATIVE_BUFFER : INF_POSITIVE_BUFFER))
+ }
+ }
+ } else {
+ break;
+ }
+ }
+ }
+ }
+
+ // Encode significand
+ // The high 17 digits of the significand
+ significandHigh = Long.fromNumber(0);
+ // The low 17 digits of the significand
+ significandLow = Long.fromNumber(0);
+
+ // read a zero
+ if(significantDigits == 0) {
+ significandHigh = Long.fromNumber(0);
+ significandLow = Long.fromNumber(0);
+ } else if(lastDigit - firstDigit < 17) {
+ var dIdx = firstDigit;
+ significandLow = Long.fromNumber(digits[dIdx++]);
+ significandHigh = new Long(0, 0);
+
+ for(; dIdx <= lastDigit; dIdx++) {
+ significandLow = significandLow.multiply(Long.fromNumber(10));
+ significandLow = significandLow.add(Long.fromNumber(digits[dIdx]));
+ }
+ } else {
+ var dIdx = firstDigit;
+ significandHigh = Long.fromNumber(digits[dIdx++]);
+
+ for(; dIdx <= lastDigit - 17; dIdx++) {
+ significandHigh = significandHigh.multiply(Long.fromNumber(10));
+ significandHigh = significandHigh.add(Long.fromNumber(digits[dIdx]));
+ }
+
+ significandLow = Long.fromNumber(digits[dIdx++]);
+
+ for(; dIdx <= lastDigit; dIdx++) {
+ significandLow = significandLow.multiply(Long.fromNumber(10));
+ significandLow = significandLow.add(Long.fromNumber(digits[dIdx]));
+ }
+ }
+
+ var significand = multiply64x2(significandHigh, Long.fromString("100000000000000000"));
+
+ significand.low = significand.low.add(significandLow);
+
+ if(lessThan(significand.low, significandLow)) {
+ significand.high = significand.high.add(Long.fromNumber(1));
+ }
+
+ // Biased exponent
+ var biasedExponent = (exponent + EXPONENT_BIAS);
+ var dec = { low: Long.fromNumber(0), high: Long.fromNumber(0) };
+
+ // Encode combination, exponent, and significand.
+ if(significand.high.shiftRightUnsigned(49).and(Long.fromNumber(1)).equals(Long.fromNumber)) {
+ // Encode '11' into bits 1 to 3
+ dec.high = dec.high.or(Long.fromNumber(0x3).shiftLeft(61));
+ dec.high = dec.high.or(Long.fromNumber(biasedExponent).and(Long.fromNumber(0x3fff).shiftLeft(47)));
+ dec.high = dec.high.or(significand.high.and(Long.fromNumber(0x7fffffffffff)));
+ } else {
+ dec.high = dec.high.or(Long.fromNumber(biasedExponent & 0x3fff).shiftLeft(49));
+ dec.high = dec.high.or(significand.high.and(Long.fromNumber(0x1ffffffffffff)));
+ }
+
+ dec.low = significand.low;
+
+ // Encode sign
+ if(isNegative) {
+ dec.high = dec.high.or(Long.fromString('9223372036854775808'));
+ }
+
+ // Encode into a buffer
+ var buffer = new Buffer(16);
+ var index = 0;
+
+ // Encode the low 64 bits of the decimal
+ // Encode low bits
+ buffer[index++] = dec.low.low_ & 0xff;
+ buffer[index++] = (dec.low.low_ >> 8) & 0xff;
+ buffer[index++] = (dec.low.low_ >> 16) & 0xff;
+ buffer[index++] = (dec.low.low_ >> 24) & 0xff;
+ // Encode high bits
+ buffer[index++] = dec.low.high_ & 0xff;
+ buffer[index++] = (dec.low.high_ >> 8) & 0xff;
+ buffer[index++] = (dec.low.high_ >> 16) & 0xff;
+ buffer[index++] = (dec.low.high_ >> 24) & 0xff;
+
+ // Encode the high 64 bits of the decimal
+ // Encode low bits
+ buffer[index++] = dec.high.low_ & 0xff;
+ buffer[index++] = (dec.high.low_ >> 8) & 0xff;
+ buffer[index++] = (dec.high.low_ >> 16) & 0xff;
+ buffer[index++] = (dec.high.low_ >> 24) & 0xff;
+ // Encode high bits
+ buffer[index++] = dec.high.high_ & 0xff;
+ buffer[index++] = (dec.high.high_ >> 8) & 0xff;
+ buffer[index++] = (dec.high.high_ >> 16) & 0xff;
+ buffer[index++] = (dec.high.high_ >> 24) & 0xff;
+
+ // Return the new Decimal128
+ return new Decimal128(buffer);
+}
+
+// Extract least significant 5 bits
+var COMBINATION_MASK = 0x1f;
+// Extract least significant 14 bits
+var EXPONENT_MASK = 0x3fff;
+// Value of combination field for Inf
+var COMBINATION_INFINITY = 30;
+// Value of combination field for NaN
+var COMBINATION_NAN = 31;
+// Value of combination field for NaN
+var COMBINATION_SNAN = 32;
+// decimal128 exponent bias
+var EXPONENT_BIAS = 6176;
+
+Decimal128.prototype.toString = function() {
+ // Note: bits in this routine are referred to starting at 0,
+ // from the sign bit, towards the coefficient.
+
+ // bits 0 - 31
+ var high;
+ // bits 32 - 63
+ var midh;
+ // bits 64 - 95
+ var midl;
+ // bits 96 - 127
+ var low;
+ // bits 1 - 5
+ var combination;
+ // decoded biased exponent (14 bits)
+ var biased_exponent;
+ // the number of significand digits
+ var significand_digits = 0;
+ // the base-10 digits in the significand
+ var significand = new Array(36);
+ for(var i = 0; i < significand.length; i++) significand[i] = 0;
+ // read pointer into significand
+ var index = 0;
+
+ // unbiased exponent
+ var exponent;
+ // the exponent if scientific notation is used
+ var scientific_exponent;
+
+ // true if the number is zero
+ var is_zero = false;
+
+ // the most signifcant significand bits (50-46)
+ var significand_msb;
+ // temporary storage for significand decoding
+ var significand128 = {parts: new Array(4)};
+ // indexing variables
+ var i;
+ var j, k;
+
+ // Output string
+ var string = [];
+
+ // Unpack index
+ var index = 0;
+
+ // Buffer reference
+ var buffer = this.bytes;
+
+ // Unpack the low 64bits into a long
+ low = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ midl = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+
+ // Unpack the high 64bits into a long
+ midh = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ high = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+
+ // Unpack index
+ var index = 0;
+
+ // Create the state of the decimal
+ var dec = {
+ low: new Long(low, midl),
+ high: new Long(midh, high) };
+
+ if(dec.high.lessThan(Long.ZERO)) {
+ string.push('-');
+ }
+
+ // Decode combination field and exponent
+ combination = (high >> 26) & COMBINATION_MASK;
+
+ if((combination >> 3) == 3) {
+ // Check for 'special' values
+ if(combination == COMBINATION_INFINITY) {
+ return string.join('') + "Infinity";
+ } else if(combination == COMBINATION_NAN) {
+ return "NaN";
+ } else {
+ biased_exponent = (high >> 15) & EXPONENT_MASK;
+ significand_msb = 0x08 + ((high >> 14) & 0x01);
+ }
+ } else {
+ significand_msb = (high >> 14) & 0x07;
+ biased_exponent = (high >> 17) & EXPONENT_MASK;
+ }
+
+ exponent = biased_exponent - EXPONENT_BIAS;
+
+ // Create string of significand digits
+
+ // Convert the 114-bit binary number represented by
+ // (significand_high, significand_low) to at most 34 decimal
+ // digits through modulo and division.
+ significand128.parts[0] = (high & 0x3fff) + ((significand_msb & 0xf) << 14);
+ significand128.parts[1] = midh;
+ significand128.parts[2] = midl;
+ significand128.parts[3] = low;
+
+ if(significand128.parts[0] == 0 && significand128.parts[1] == 0
+ && significand128.parts[2] == 0 && significand128.parts[3] == 0) {
+ is_zero = true;
+ } else {
+ for(var k = 3; k >= 0; k--) {
+ var least_digits = 0;
+ // Peform the divide
+ var result = divideu128(significand128);
+ significand128 = result.quotient;
+ least_digits = result.rem.low_;
+
+ // We now have the 9 least significant digits (in base 2).
+ // Convert and output to string.
+ if(!least_digits) continue;
+
+ for(var j = 8; j >= 0; j--) {
+ // significand[k * 9 + j] = Math.round(least_digits % 10);
+ significand[k * 9 + j] = least_digits % 10;
+ // least_digits = Math.round(least_digits / 10);
+ least_digits = Math.floor(least_digits / 10);
+ }
+ }
+ }
+
+ // Output format options:
+ // Scientific - [-]d.dddE(+/-)dd or [-]dE(+/-)dd
+ // Regular - ddd.ddd
+
+ if(is_zero) {
+ significand_digits = 1;
+ significand[index] = 0;
+ } else {
+ significand_digits = 36;
+ var i = 0;
+
+ while(!significand[index]) {
+ i++;
+ significand_digits = significand_digits - 1;
+ index = index + 1;
+ }
+ }
+
+ scientific_exponent = significand_digits - 1 + exponent;
+
+ // The scientific exponent checks are dictated by the string conversion
+ // specification and are somewhat arbitrary cutoffs.
+ //
+ // We must check exponent > 0, because if this is the case, the number
+ // has trailing zeros. However, we *cannot* output these trailing zeros,
+ // because doing so would change the precision of the value, and would
+ // change stored data if the string converted number is round tripped.
+
+ if(scientific_exponent >= 34 || scientific_exponent <= -7 ||
+ exponent > 0) {
+ // Scientific format
+ string.push(significand[index++]);
+ significand_digits = significand_digits - 1;
+
+ if(significand_digits) {
+ string.push('.');
+ }
+
+ for(var i = 0; i < significand_digits; i++) {
+ string.push(significand[index++]);
+ }
+
+ // Exponent
+ string.push('E');
+ if(scientific_exponent > 0) {
+ string.push('+' + scientific_exponent);
+ } else {
+ string.push(scientific_exponent);
+ }
+ } else {
+ // Regular format with no decimal place
+ if(exponent >= 0) {
+ for(var i = 0; i < significand_digits; i++) {
+ string.push(significand[index++]);
+ }
+ } else {
+ var radix_position = significand_digits + exponent;
+
+ // non-zero digits before radix
+ if(radix_position > 0) {
+ for(var i = 0; i < radix_position; i++) {
+ string.push(significand[index++]);
+ }
+ } else {
+ string.push('0');
+ }
+
+ string.push('.');
+ // add leading zeros after radix
+ while(radix_position++ < 0) {
+ string.push('0');
+ }
+
+ for(var i = 0; i < significand_digits - Math.max(radix_position - 1, 0); i++) {
+ string.push(significand[index++]);
+ }
+ }
+ }
+
+ return string.join('');
+}
+
+Decimal128.prototype.toJSON = function() {
+ return { "$numberDecimal": this.toString() };
+}
+
+module.exports = Decimal128;
+module.exports.Decimal128 = Decimal128;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/double.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/double.js
new file mode 100644
index 0000000..82c5bd6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/double.js
@@ -0,0 +1,33 @@
+/**
+ * A class representation of the BSON Double type.
+ *
+ * @class
+ * @param {number} value the number we want to represent as a double.
+ * @return {Double}
+ */
+function Double(value) {
+ if(!(this instanceof Double)) return new Double(value);
+
+ this._bsontype = 'Double';
+ this.value = value;
+}
+
+/**
+ * Access the number value.
+ *
+ * @method
+ * @return {number} returns the wrapped double number.
+ */
+Double.prototype.valueOf = function() {
+ return this.value;
+};
+
+/**
+ * @ignore
+ */
+Double.prototype.toJSON = function() {
+ return this.value;
+}
+
+module.exports = Double;
+module.exports.Double = Double;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/float_parser.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/float_parser.js
new file mode 100644
index 0000000..6fca392
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/float_parser.js
@@ -0,0 +1,121 @@
+// Copyright (c) 2008, Fair Oaks Labs, Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+//
+// * Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// * Neither the name of Fair Oaks Labs, Inc. nor the names of its contributors
+// may be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+//
+// Modifications to writeIEEE754 to support negative zeroes made by Brian White
+
+var readIEEE754 = function(buffer, offset, endian, mLen, nBytes) {
+ var e, m,
+ bBE = (endian === 'big'),
+ eLen = nBytes * 8 - mLen - 1,
+ eMax = (1 << eLen) - 1,
+ eBias = eMax >> 1,
+ nBits = -7,
+ i = bBE ? 0 : (nBytes - 1),
+ d = bBE ? 1 : -1,
+ s = buffer[offset + i];
+
+ i += d;
+
+ e = s & ((1 << (-nBits)) - 1);
+ s >>= (-nBits);
+ nBits += eLen;
+ for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8);
+
+ m = e & ((1 << (-nBits)) - 1);
+ e >>= (-nBits);
+ nBits += mLen;
+ for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8);
+
+ if (e === 0) {
+ e = 1 - eBias;
+ } else if (e === eMax) {
+ return m ? NaN : ((s ? -1 : 1) * Infinity);
+ } else {
+ m = m + Math.pow(2, mLen);
+ e = e - eBias;
+ }
+ return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
+};
+
+var writeIEEE754 = function(buffer, value, offset, endian, mLen, nBytes) {
+ var e, m, c,
+ bBE = (endian === 'big'),
+ eLen = nBytes * 8 - mLen - 1,
+ eMax = (1 << eLen) - 1,
+ eBias = eMax >> 1,
+ rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0),
+ i = bBE ? (nBytes-1) : 0,
+ d = bBE ? -1 : 1,
+ s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;
+
+ value = Math.abs(value);
+
+ if (isNaN(value) || value === Infinity) {
+ m = isNaN(value) ? 1 : 0;
+ e = eMax;
+ } else {
+ e = Math.floor(Math.log(value) / Math.LN2);
+ if (value * (c = Math.pow(2, -e)) < 1) {
+ e--;
+ c *= 2;
+ }
+ if (e+eBias >= 1) {
+ value += rt / c;
+ } else {
+ value += rt * Math.pow(2, 1 - eBias);
+ }
+ if (value * c >= 2) {
+ e++;
+ c /= 2;
+ }
+
+ if (e + eBias >= eMax) {
+ m = 0;
+ e = eMax;
+ } else if (e + eBias >= 1) {
+ m = (value * c - 1) * Math.pow(2, mLen);
+ e = e + eBias;
+ } else {
+ m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
+ e = 0;
+ }
+ }
+
+ for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8);
+
+ e = (e << mLen) | m;
+ eLen += mLen;
+ for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8);
+
+ buffer[offset + i - d] |= s * 128;
+};
+
+exports.readIEEE754 = readIEEE754;
+exports.writeIEEE754 = writeIEEE754; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/index.js
new file mode 100644
index 0000000..a11199a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/index.js
@@ -0,0 +1,90 @@
+try {
+ exports.BSONPure = require('./bson');
+ exports.BSONNative = require('./bson');
+} catch(err) {
+}
+
+[ 'binary'
+ , 'code'
+ , 'map'
+ , 'db_ref'
+ , 'double'
+ , 'int_32'
+ , 'max_key'
+ , 'min_key'
+ , 'objectid'
+ , 'regexp'
+ , 'symbol'
+ , 'decimal128'
+ , 'timestamp'
+ , 'long'
+ , 'bson'].forEach(function (path) {
+ var module = require('./' + path);
+ for (var i in module) {
+ exports[i] = module[i];
+ }
+});
+
+// Exports all the classes for the PURE JS BSON Parser
+exports.pure = function() {
+ var classes = {};
+ // Map all the classes
+ [ 'binary'
+ , 'code'
+ , 'map'
+ , 'db_ref'
+ , 'double'
+ , 'int_32'
+ , 'max_key'
+ , 'min_key'
+ , 'objectid'
+ , 'regexp'
+ , 'symbol'
+ , 'decimal128'
+ , 'timestamp'
+ , 'long'
+ , 'bson'].forEach(function (path) {
+ var module = require('./' + path);
+ for (var i in module) {
+ classes[i] = module[i];
+ }
+ });
+ // Return classes list
+ return classes;
+}
+
+// Exports all the classes for the NATIVE JS BSON Parser
+exports.native = function() {
+ var classes = {};
+ // Map all the classes
+ [ 'binary'
+ , 'code'
+ , 'map'
+ , 'db_ref'
+ , 'double'
+ , 'int_32'
+ , 'max_key'
+ , 'min_key'
+ , 'objectid'
+ , 'regexp'
+ , 'symbol'
+ , 'decimal128'
+ , 'timestamp'
+ , 'long'
+ , 'bson'].forEach(function (path) {
+ var module = require('./' + path);
+ for (var i in module) {
+ classes[i] = module[i];
+ }
+ });
+
+ // Catch error and return no classes found
+ try {
+ classes['BSON'] = require('./bson');
+ } catch(err) {
+ return exports.pure();
+ }
+
+ // Return classes list
+ return classes;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/int_32.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/int_32.js
new file mode 100644
index 0000000..6c729f6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/int_32.js
@@ -0,0 +1,26 @@
+var Int32 = function(value) {
+ if(!(this instanceof Int32)) return new Int32(value);
+
+ this._bsontype = 'Int32';
+ this.value = value;
+}
+
+/**
+ * Access the number value.
+ *
+ * @method
+ * @return {number} returns the wrapped int32 number.
+ */
+Int32.prototype.valueOf = function() {
+ return this.value;
+};
+
+/**
+ * @ignore
+ */
+Int32.prototype.toJSON = function() {
+ return this.value;
+}
+
+module.exports = Int32;
+module.exports.Int32 = Int32;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/long.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/long.js
new file mode 100644
index 0000000..6f18885
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/long.js
@@ -0,0 +1,856 @@
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Copyright 2009 Google Inc. All Rights Reserved
+
+/**
+ * Defines a Long class for representing a 64-bit two's-complement
+ * integer value, which faithfully simulates the behavior of a Java "Long". This
+ * implementation is derived from LongLib in GWT.
+ *
+ * Constructs a 64-bit two's-complement integer, given its low and high 32-bit
+ * values as *signed* integers. See the from* functions below for more
+ * convenient ways of constructing Longs.
+ *
+ * The internal representation of a Long is the two given signed, 32-bit values.
+ * We use 32-bit pieces because these are the size of integers on which
+ * Javascript performs bit-operations. For operations like addition and
+ * multiplication, we split each number into 16-bit pieces, which can easily be
+ * multiplied within Javascript's floating-point representation without overflow
+ * or change in sign.
+ *
+ * In the algorithms below, we frequently reduce the negative case to the
+ * positive case by negating the input(s) and then post-processing the result.
+ * Note that we must ALWAYS check specially whether those values are MIN_VALUE
+ * (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as
+ * a positive number, it overflows back into a negative). Not handling this
+ * case would often result in infinite recursion.
+ *
+ * @class
+ * @param {number} low the low (signed) 32 bits of the Long.
+ * @param {number} high the high (signed) 32 bits of the Long.
+ * @return {Long}
+ */
+function Long(low, high) {
+ if(!(this instanceof Long)) return new Long(low, high);
+
+ this._bsontype = 'Long';
+ /**
+ * @type {number}
+ * @ignore
+ */
+ this.low_ = low | 0; // force into 32 signed bits.
+
+ /**
+ * @type {number}
+ * @ignore
+ */
+ this.high_ = high | 0; // force into 32 signed bits.
+};
+
+/**
+ * Return the int value.
+ *
+ * @method
+ * @return {number} the value, assuming it is a 32-bit integer.
+ */
+Long.prototype.toInt = function() {
+ return this.low_;
+};
+
+/**
+ * Return the Number value.
+ *
+ * @method
+ * @return {number} the closest floating-point representation to this value.
+ */
+Long.prototype.toNumber = function() {
+ return this.high_ * Long.TWO_PWR_32_DBL_ +
+ this.getLowBitsUnsigned();
+};
+
+/**
+ * Return the JSON value.
+ *
+ * @method
+ * @return {string} the JSON representation.
+ */
+Long.prototype.toJSON = function() {
+ return this.toString();
+}
+
+/**
+ * Return the String value.
+ *
+ * @method
+ * @param {number} [opt_radix] the radix in which the text should be written.
+ * @return {string} the textual representation of this value.
+ */
+Long.prototype.toString = function(opt_radix) {
+ var radix = opt_radix || 10;
+ if (radix < 2 || 36 < radix) {
+ throw Error('radix out of range: ' + radix);
+ }
+
+ if (this.isZero()) {
+ return '0';
+ }
+
+ if (this.isNegative()) {
+ if (this.equals(Long.MIN_VALUE)) {
+ // We need to change the Long value before it can be negated, so we remove
+ // the bottom-most digit in this base and then recurse to do the rest.
+ var radixLong = Long.fromNumber(radix);
+ var div = this.div(radixLong);
+ var rem = div.multiply(radixLong).subtract(this);
+ return div.toString(radix) + rem.toInt().toString(radix);
+ } else {
+ return '-' + this.negate().toString(radix);
+ }
+ }
+
+ // Do several (6) digits each time through the loop, so as to
+ // minimize the calls to the very expensive emulated div.
+ var radixToPower = Long.fromNumber(Math.pow(radix, 6));
+
+ var rem = this;
+ var result = '';
+ while (true) {
+ var remDiv = rem.div(radixToPower);
+ var intval = rem.subtract(remDiv.multiply(radixToPower)).toInt();
+ var digits = intval.toString(radix);
+
+ rem = remDiv;
+ if (rem.isZero()) {
+ return digits + result;
+ } else {
+ while (digits.length < 6) {
+ digits = '0' + digits;
+ }
+ result = '' + digits + result;
+ }
+ }
+};
+
+/**
+ * Return the high 32-bits value.
+ *
+ * @method
+ * @return {number} the high 32-bits as a signed value.
+ */
+Long.prototype.getHighBits = function() {
+ return this.high_;
+};
+
+/**
+ * Return the low 32-bits value.
+ *
+ * @method
+ * @return {number} the low 32-bits as a signed value.
+ */
+Long.prototype.getLowBits = function() {
+ return this.low_;
+};
+
+/**
+ * Return the low unsigned 32-bits value.
+ *
+ * @method
+ * @return {number} the low 32-bits as an unsigned value.
+ */
+Long.prototype.getLowBitsUnsigned = function() {
+ return (this.low_ >= 0) ?
+ this.low_ : Long.TWO_PWR_32_DBL_ + this.low_;
+};
+
+/**
+ * Returns the number of bits needed to represent the absolute value of this Long.
+ *
+ * @method
+ * @return {number} Returns the number of bits needed to represent the absolute value of this Long.
+ */
+Long.prototype.getNumBitsAbs = function() {
+ if (this.isNegative()) {
+ if (this.equals(Long.MIN_VALUE)) {
+ return 64;
+ } else {
+ return this.negate().getNumBitsAbs();
+ }
+ } else {
+ var val = this.high_ != 0 ? this.high_ : this.low_;
+ for (var bit = 31; bit > 0; bit--) {
+ if ((val & (1 << bit)) != 0) {
+ break;
+ }
+ }
+ return this.high_ != 0 ? bit + 33 : bit + 1;
+ }
+};
+
+/**
+ * Return whether this value is zero.
+ *
+ * @method
+ * @return {boolean} whether this value is zero.
+ */
+Long.prototype.isZero = function() {
+ return this.high_ == 0 && this.low_ == 0;
+};
+
+/**
+ * Return whether this value is negative.
+ *
+ * @method
+ * @return {boolean} whether this value is negative.
+ */
+Long.prototype.isNegative = function() {
+ return this.high_ < 0;
+};
+
+/**
+ * Return whether this value is odd.
+ *
+ * @method
+ * @return {boolean} whether this value is odd.
+ */
+Long.prototype.isOdd = function() {
+ return (this.low_ & 1) == 1;
+};
+
+/**
+ * Return whether this Long equals the other
+ *
+ * @method
+ * @param {Long} other Long to compare against.
+ * @return {boolean} whether this Long equals the other
+ */
+Long.prototype.equals = function(other) {
+ return (this.high_ == other.high_) && (this.low_ == other.low_);
+};
+
+/**
+ * Return whether this Long does not equal the other.
+ *
+ * @method
+ * @param {Long} other Long to compare against.
+ * @return {boolean} whether this Long does not equal the other.
+ */
+Long.prototype.notEquals = function(other) {
+ return (this.high_ != other.high_) || (this.low_ != other.low_);
+};
+
+/**
+ * Return whether this Long is less than the other.
+ *
+ * @method
+ * @param {Long} other Long to compare against.
+ * @return {boolean} whether this Long is less than the other.
+ */
+Long.prototype.lessThan = function(other) {
+ return this.compare(other) < 0;
+};
+
+/**
+ * Return whether this Long is less than or equal to the other.
+ *
+ * @method
+ * @param {Long} other Long to compare against.
+ * @return {boolean} whether this Long is less than or equal to the other.
+ */
+Long.prototype.lessThanOrEqual = function(other) {
+ return this.compare(other) <= 0;
+};
+
+/**
+ * Return whether this Long is greater than the other.
+ *
+ * @method
+ * @param {Long} other Long to compare against.
+ * @return {boolean} whether this Long is greater than the other.
+ */
+Long.prototype.greaterThan = function(other) {
+ return this.compare(other) > 0;
+};
+
+/**
+ * Return whether this Long is greater than or equal to the other.
+ *
+ * @method
+ * @param {Long} other Long to compare against.
+ * @return {boolean} whether this Long is greater than or equal to the other.
+ */
+Long.prototype.greaterThanOrEqual = function(other) {
+ return this.compare(other) >= 0;
+};
+
+/**
+ * Compares this Long with the given one.
+ *
+ * @method
+ * @param {Long} other Long to compare against.
+ * @return {boolean} 0 if they are the same, 1 if the this is greater, and -1 if the given one is greater.
+ */
+Long.prototype.compare = function(other) {
+ if (this.equals(other)) {
+ return 0;
+ }
+
+ var thisNeg = this.isNegative();
+ var otherNeg = other.isNegative();
+ if (thisNeg && !otherNeg) {
+ return -1;
+ }
+ if (!thisNeg && otherNeg) {
+ return 1;
+ }
+
+ // at this point, the signs are the same, so subtraction will not overflow
+ if (this.subtract(other).isNegative()) {
+ return -1;
+ } else {
+ return 1;
+ }
+};
+
+/**
+ * The negation of this value.
+ *
+ * @method
+ * @return {Long} the negation of this value.
+ */
+Long.prototype.negate = function() {
+ if (this.equals(Long.MIN_VALUE)) {
+ return Long.MIN_VALUE;
+ } else {
+ return this.not().add(Long.ONE);
+ }
+};
+
+/**
+ * Returns the sum of this and the given Long.
+ *
+ * @method
+ * @param {Long} other Long to add to this one.
+ * @return {Long} the sum of this and the given Long.
+ */
+Long.prototype.add = function(other) {
+ // Divide each number into 4 chunks of 16 bits, and then sum the chunks.
+
+ var a48 = this.high_ >>> 16;
+ var a32 = this.high_ & 0xFFFF;
+ var a16 = this.low_ >>> 16;
+ var a00 = this.low_ & 0xFFFF;
+
+ var b48 = other.high_ >>> 16;
+ var b32 = other.high_ & 0xFFFF;
+ var b16 = other.low_ >>> 16;
+ var b00 = other.low_ & 0xFFFF;
+
+ var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
+ c00 += a00 + b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xFFFF;
+ c16 += a16 + b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c32 += a32 + b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c48 += a48 + b48;
+ c48 &= 0xFFFF;
+ return Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32);
+};
+
+/**
+ * Returns the difference of this and the given Long.
+ *
+ * @method
+ * @param {Long} other Long to subtract from this.
+ * @return {Long} the difference of this and the given Long.
+ */
+Long.prototype.subtract = function(other) {
+ return this.add(other.negate());
+};
+
+/**
+ * Returns the product of this and the given Long.
+ *
+ * @method
+ * @param {Long} other Long to multiply with this.
+ * @return {Long} the product of this and the other.
+ */
+Long.prototype.multiply = function(other) {
+ if (this.isZero()) {
+ return Long.ZERO;
+ } else if (other.isZero()) {
+ return Long.ZERO;
+ }
+
+ if (this.equals(Long.MIN_VALUE)) {
+ return other.isOdd() ? Long.MIN_VALUE : Long.ZERO;
+ } else if (other.equals(Long.MIN_VALUE)) {
+ return this.isOdd() ? Long.MIN_VALUE : Long.ZERO;
+ }
+
+ if (this.isNegative()) {
+ if (other.isNegative()) {
+ return this.negate().multiply(other.negate());
+ } else {
+ return this.negate().multiply(other).negate();
+ }
+ } else if (other.isNegative()) {
+ return this.multiply(other.negate()).negate();
+ }
+
+ // If both Longs are small, use float multiplication
+ if (this.lessThan(Long.TWO_PWR_24_) &&
+ other.lessThan(Long.TWO_PWR_24_)) {
+ return Long.fromNumber(this.toNumber() * other.toNumber());
+ }
+
+ // Divide each Long into 4 chunks of 16 bits, and then add up 4x4 products.
+ // We can skip products that would overflow.
+
+ var a48 = this.high_ >>> 16;
+ var a32 = this.high_ & 0xFFFF;
+ var a16 = this.low_ >>> 16;
+ var a00 = this.low_ & 0xFFFF;
+
+ var b48 = other.high_ >>> 16;
+ var b32 = other.high_ & 0xFFFF;
+ var b16 = other.low_ >>> 16;
+ var b00 = other.low_ & 0xFFFF;
+
+ var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
+ c00 += a00 * b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xFFFF;
+ c16 += a16 * b00;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c16 += a00 * b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c32 += a32 * b00;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c32 += a16 * b16;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c32 += a00 * b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
+ c48 &= 0xFFFF;
+ return Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32);
+};
+
+/**
+ * Returns this Long divided by the given one.
+ *
+ * @method
+ * @param {Long} other Long by which to divide.
+ * @return {Long} this Long divided by the given one.
+ */
+Long.prototype.div = function(other) {
+ if (other.isZero()) {
+ throw Error('division by zero');
+ } else if (this.isZero()) {
+ return Long.ZERO;
+ }
+
+ if (this.equals(Long.MIN_VALUE)) {
+ if (other.equals(Long.ONE) ||
+ other.equals(Long.NEG_ONE)) {
+ return Long.MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE
+ } else if (other.equals(Long.MIN_VALUE)) {
+ return Long.ONE;
+ } else {
+ // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.
+ var halfThis = this.shiftRight(1);
+ var approx = halfThis.div(other).shiftLeft(1);
+ if (approx.equals(Long.ZERO)) {
+ return other.isNegative() ? Long.ONE : Long.NEG_ONE;
+ } else {
+ var rem = this.subtract(other.multiply(approx));
+ var result = approx.add(rem.div(other));
+ return result;
+ }
+ }
+ } else if (other.equals(Long.MIN_VALUE)) {
+ return Long.ZERO;
+ }
+
+ if (this.isNegative()) {
+ if (other.isNegative()) {
+ return this.negate().div(other.negate());
+ } else {
+ return this.negate().div(other).negate();
+ }
+ } else if (other.isNegative()) {
+ return this.div(other.negate()).negate();
+ }
+
+ // Repeat the following until the remainder is less than other: find a
+ // floating-point that approximates remainder / other *from below*, add this
+ // into the result, and subtract it from the remainder. It is critical that
+ // the approximate value is less than or equal to the real value so that the
+ // remainder never becomes negative.
+ var res = Long.ZERO;
+ var rem = this;
+ while (rem.greaterThanOrEqual(other)) {
+ // Approximate the result of division. This may be a little greater or
+ // smaller than the actual value.
+ var approx = Math.max(1, Math.floor(rem.toNumber() / other.toNumber()));
+
+ // We will tweak the approximate result by changing it in the 48-th digit or
+ // the smallest non-fractional digit, whichever is larger.
+ var log2 = Math.ceil(Math.log(approx) / Math.LN2);
+ var delta = (log2 <= 48) ? 1 : Math.pow(2, log2 - 48);
+
+ // Decrease the approximation until it is smaller than the remainder. Note
+ // that if it is too large, the product overflows and is negative.
+ var approxRes = Long.fromNumber(approx);
+ var approxRem = approxRes.multiply(other);
+ while (approxRem.isNegative() || approxRem.greaterThan(rem)) {
+ approx -= delta;
+ approxRes = Long.fromNumber(approx);
+ approxRem = approxRes.multiply(other);
+ }
+
+ // We know the answer can't be zero... and actually, zero would cause
+ // infinite recursion since we would make no progress.
+ if (approxRes.isZero()) {
+ approxRes = Long.ONE;
+ }
+
+ res = res.add(approxRes);
+ rem = rem.subtract(approxRem);
+ }
+ return res;
+};
+
+/**
+ * Returns this Long modulo the given one.
+ *
+ * @method
+ * @param {Long} other Long by which to mod.
+ * @return {Long} this Long modulo the given one.
+ */
+Long.prototype.modulo = function(other) {
+ return this.subtract(this.div(other).multiply(other));
+};
+
+/**
+ * The bitwise-NOT of this value.
+ *
+ * @method
+ * @return {Long} the bitwise-NOT of this value.
+ */
+Long.prototype.not = function() {
+ return Long.fromBits(~this.low_, ~this.high_);
+};
+
+/**
+ * Returns the bitwise-AND of this Long and the given one.
+ *
+ * @method
+ * @param {Long} other the Long with which to AND.
+ * @return {Long} the bitwise-AND of this and the other.
+ */
+Long.prototype.and = function(other) {
+ return Long.fromBits(this.low_ & other.low_, this.high_ & other.high_);
+};
+
+/**
+ * Returns the bitwise-OR of this Long and the given one.
+ *
+ * @method
+ * @param {Long} other the Long with which to OR.
+ * @return {Long} the bitwise-OR of this and the other.
+ */
+Long.prototype.or = function(other) {
+ return Long.fromBits(this.low_ | other.low_, this.high_ | other.high_);
+};
+
+/**
+ * Returns the bitwise-XOR of this Long and the given one.
+ *
+ * @method
+ * @param {Long} other the Long with which to XOR.
+ * @return {Long} the bitwise-XOR of this and the other.
+ */
+Long.prototype.xor = function(other) {
+ return Long.fromBits(this.low_ ^ other.low_, this.high_ ^ other.high_);
+};
+
+/**
+ * Returns this Long with bits shifted to the left by the given amount.
+ *
+ * @method
+ * @param {number} numBits the number of bits by which to shift.
+ * @return {Long} this shifted to the left by the given amount.
+ */
+Long.prototype.shiftLeft = function(numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var low = this.low_;
+ if (numBits < 32) {
+ var high = this.high_;
+ return Long.fromBits(
+ low << numBits,
+ (high << numBits) | (low >>> (32 - numBits)));
+ } else {
+ return Long.fromBits(0, low << (numBits - 32));
+ }
+ }
+};
+
+/**
+ * Returns this Long with bits shifted to the right by the given amount.
+ *
+ * @method
+ * @param {number} numBits the number of bits by which to shift.
+ * @return {Long} this shifted to the right by the given amount.
+ */
+Long.prototype.shiftRight = function(numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var high = this.high_;
+ if (numBits < 32) {
+ var low = this.low_;
+ return Long.fromBits(
+ (low >>> numBits) | (high << (32 - numBits)),
+ high >> numBits);
+ } else {
+ return Long.fromBits(
+ high >> (numBits - 32),
+ high >= 0 ? 0 : -1);
+ }
+ }
+};
+
+/**
+ * Returns this Long with bits shifted to the right by the given amount, with the new top bits matching the current sign bit.
+ *
+ * @method
+ * @param {number} numBits the number of bits by which to shift.
+ * @return {Long} this shifted to the right by the given amount, with zeros placed into the new leading bits.
+ */
+Long.prototype.shiftRightUnsigned = function(numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var high = this.high_;
+ if (numBits < 32) {
+ var low = this.low_;
+ return Long.fromBits(
+ (low >>> numBits) | (high << (32 - numBits)),
+ high >>> numBits);
+ } else if (numBits == 32) {
+ return Long.fromBits(high, 0);
+ } else {
+ return Long.fromBits(high >>> (numBits - 32), 0);
+ }
+ }
+};
+
+/**
+ * Returns a Long representing the given (32-bit) integer value.
+ *
+ * @method
+ * @param {number} value the 32-bit integer in question.
+ * @return {Long} the corresponding Long value.
+ */
+Long.fromInt = function(value) {
+ if (-128 <= value && value < 128) {
+ var cachedObj = Long.INT_CACHE_[value];
+ if (cachedObj) {
+ return cachedObj;
+ }
+ }
+
+ var obj = new Long(value | 0, value < 0 ? -1 : 0);
+ if (-128 <= value && value < 128) {
+ Long.INT_CACHE_[value] = obj;
+ }
+ return obj;
+};
+
+/**
+ * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.
+ *
+ * @method
+ * @param {number} value the number in question.
+ * @return {Long} the corresponding Long value.
+ */
+Long.fromNumber = function(value) {
+ if (isNaN(value) || !isFinite(value)) {
+ return Long.ZERO;
+ } else if (value <= -Long.TWO_PWR_63_DBL_) {
+ return Long.MIN_VALUE;
+ } else if (value + 1 >= Long.TWO_PWR_63_DBL_) {
+ return Long.MAX_VALUE;
+ } else if (value < 0) {
+ return Long.fromNumber(-value).negate();
+ } else {
+ return new Long(
+ (value % Long.TWO_PWR_32_DBL_) | 0,
+ (value / Long.TWO_PWR_32_DBL_) | 0);
+ }
+};
+
+/**
+ * Returns a Long representing the 64-bit integer that comes by concatenating the given high and low bits. Each is assumed to use 32 bits.
+ *
+ * @method
+ * @param {number} lowBits the low 32-bits.
+ * @param {number} highBits the high 32-bits.
+ * @return {Long} the corresponding Long value.
+ */
+Long.fromBits = function(lowBits, highBits) {
+ return new Long(lowBits, highBits);
+};
+
+/**
+ * Returns a Long representation of the given string, written using the given radix.
+ *
+ * @method
+ * @param {string} str the textual representation of the Long.
+ * @param {number} opt_radix the radix in which the text is written.
+ * @return {Long} the corresponding Long value.
+ */
+Long.fromString = function(str, opt_radix) {
+ if (str.length == 0) {
+ throw Error('number format error: empty string');
+ }
+
+ var radix = opt_radix || 10;
+ if (radix < 2 || 36 < radix) {
+ throw Error('radix out of range: ' + radix);
+ }
+
+ if (str.charAt(0) == '-') {
+ return Long.fromString(str.substring(1), radix).negate();
+ } else if (str.indexOf('-') >= 0) {
+ throw Error('number format error: interior "-" character: ' + str);
+ }
+
+ // Do several (8) digits each time through the loop, so as to
+ // minimize the calls to the very expensive emulated div.
+ var radixToPower = Long.fromNumber(Math.pow(radix, 8));
+
+ var result = Long.ZERO;
+ for (var i = 0; i < str.length; i += 8) {
+ var size = Math.min(8, str.length - i);
+ var value = parseInt(str.substring(i, i + size), radix);
+ if (size < 8) {
+ var power = Long.fromNumber(Math.pow(radix, size));
+ result = result.multiply(power).add(Long.fromNumber(value));
+ } else {
+ result = result.multiply(radixToPower);
+ result = result.add(Long.fromNumber(value));
+ }
+ }
+ return result;
+};
+
+// NOTE: Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the
+// from* methods on which they depend.
+
+
+/**
+ * A cache of the Long representations of small integer values.
+ * @type {Object}
+ * @ignore
+ */
+Long.INT_CACHE_ = {};
+
+// NOTE: the compiler should inline these constant values below and then remove
+// these variables, so there should be no runtime penalty for these.
+
+/**
+ * Number used repeated below in calculations. This must appear before the
+ * first call to any from* function below.
+ * @type {number}
+ * @ignore
+ */
+Long.TWO_PWR_16_DBL_ = 1 << 16;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Long.TWO_PWR_24_DBL_ = 1 << 24;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Long.TWO_PWR_32_DBL_ = Long.TWO_PWR_16_DBL_ * Long.TWO_PWR_16_DBL_;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Long.TWO_PWR_31_DBL_ = Long.TWO_PWR_32_DBL_ / 2;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Long.TWO_PWR_48_DBL_ = Long.TWO_PWR_32_DBL_ * Long.TWO_PWR_16_DBL_;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Long.TWO_PWR_64_DBL_ = Long.TWO_PWR_32_DBL_ * Long.TWO_PWR_32_DBL_;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Long.TWO_PWR_63_DBL_ = Long.TWO_PWR_64_DBL_ / 2;
+
+/** @type {Long} */
+Long.ZERO = Long.fromInt(0);
+
+/** @type {Long} */
+Long.ONE = Long.fromInt(1);
+
+/** @type {Long} */
+Long.NEG_ONE = Long.fromInt(-1);
+
+/** @type {Long} */
+Long.MAX_VALUE =
+ Long.fromBits(0xFFFFFFFF | 0, 0x7FFFFFFF | 0);
+
+/** @type {Long} */
+Long.MIN_VALUE = Long.fromBits(0, 0x80000000 | 0);
+
+/**
+ * @type {Long}
+ * @ignore
+ */
+Long.TWO_PWR_24_ = Long.fromInt(1 << 24);
+
+/**
+ * Expose.
+ */
+module.exports = Long;
+module.exports.Long = Long; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/map.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/map.js
new file mode 100644
index 0000000..f53c8c1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/map.js
@@ -0,0 +1,126 @@
+"use strict"
+
+// We have an ES6 Map available, return the native instance
+if(typeof global.Map !== 'undefined') {
+ module.exports = global.Map;
+ module.exports.Map = global.Map;
+} else {
+ // We will return a polyfill
+ var Map = function(array) {
+ this._keys = [];
+ this._values = {};
+
+ for(var i = 0; i < array.length; i++) {
+ if(array[i] == null) continue; // skip null and undefined
+ var entry = array[i];
+ var key = entry[0];
+ var value = entry[1];
+ // Add the key to the list of keys in order
+ this._keys.push(key);
+ // Add the key and value to the values dictionary with a point
+ // to the location in the ordered keys list
+ this._values[key] = {v: value, i: this._keys.length - 1};
+ }
+ }
+
+ Map.prototype.clear = function() {
+ this._keys = [];
+ this._values = {};
+ }
+
+ Map.prototype.delete = function(key) {
+ var value = this._values[key];
+ if(value == null) return false;
+ // Delete entry
+ delete this._values[key];
+ // Remove the key from the ordered keys list
+ this._keys.splice(value.i, 1);
+ return true;
+ }
+
+ Map.prototype.entries = function() {
+ var self = this;
+ var index = 0;
+
+ return {
+ next: function() {
+ var key = self._keys[index++];
+ return {
+ value: key !== undefined ? [key, self._values[key].v] : undefined,
+ done: key !== undefined ? false : true
+ }
+ }
+ };
+ }
+
+ Map.prototype.forEach = function(callback, self) {
+ self = self || this;
+
+ for(var i = 0; i < this._keys.length; i++) {
+ var key = this._keys[i];
+ // Call the forEach callback
+ callback.call(self, this._values[key].v, key, self);
+ }
+ }
+
+ Map.prototype.get = function(key) {
+ return this._values[key] ? this._values[key].v : undefined;
+ }
+
+ Map.prototype.has = function(key) {
+ return this._values[key] != null;
+ }
+
+ Map.prototype.keys = function(key) {
+ var self = this;
+ var index = 0;
+
+ return {
+ next: function() {
+ var key = self._keys[index++];
+ return {
+ value: key !== undefined ? key : undefined,
+ done: key !== undefined ? false : true
+ }
+ }
+ };
+ }
+
+ Map.prototype.set = function(key, value) {
+ if(this._values[key]) {
+ this._values[key].v = value;
+ return this;
+ }
+
+ // Add the key to the list of keys in order
+ this._keys.push(key);
+ // Add the key and value to the values dictionary with a point
+ // to the location in the ordered keys list
+ this._values[key] = {v: value, i: this._keys.length - 1};
+ return this;
+ }
+
+ Map.prototype.values = function(key, value) {
+ var self = this;
+ var index = 0;
+
+ return {
+ next: function() {
+ var key = self._keys[index++];
+ return {
+ value: key !== undefined ? self._values[key].v : undefined,
+ done: key !== undefined ? false : true
+ }
+ }
+ };
+ }
+
+ // Last ismaster
+ Object.defineProperty(Map.prototype, 'size', {
+ enumerable:true,
+ get: function() { return this._keys.length; }
+ });
+
+ module.exports = Map;
+ module.exports.Map = Map;
+} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/max_key.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/max_key.js
new file mode 100644
index 0000000..03ee9cd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/max_key.js
@@ -0,0 +1,14 @@
+/**
+ * A class representation of the BSON MaxKey type.
+ *
+ * @class
+ * @return {MaxKey} A MaxKey instance
+ */
+function MaxKey() {
+ if(!(this instanceof MaxKey)) return new MaxKey();
+
+ this._bsontype = 'MaxKey';
+}
+
+module.exports = MaxKey;
+module.exports.MaxKey = MaxKey; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/min_key.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/min_key.js
new file mode 100644
index 0000000..5e120fb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/min_key.js
@@ -0,0 +1,14 @@
+/**
+ * A class representation of the BSON MinKey type.
+ *
+ * @class
+ * @return {MinKey} A MinKey instance
+ */
+function MinKey() {
+ if(!(this instanceof MinKey)) return new MinKey();
+
+ this._bsontype = 'MinKey';
+}
+
+module.exports = MinKey;
+module.exports.MinKey = MinKey; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/objectid.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/objectid.js
new file mode 100644
index 0000000..83b85d7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/objectid.js
@@ -0,0 +1,343 @@
+/**
+ * Machine id.
+ *
+ * Create a random 3-byte value (i.e. unique for this
+ * process). Other drivers use a md5 of the machine id here, but
+ * that would mean an asyc call to gethostname, so we don't bother.
+ * @ignore
+ */
+var MACHINE_ID = parseInt(Math.random() * 0xFFFFFF, 10);
+
+// Regular expression that checks for hex value
+var checkForHexRegExp = new RegExp("^[0-9a-fA-F]{24}$");
+
+/**
+* Create a new ObjectID instance
+*
+* @class
+* @param {(string|number)} id Can be a 24 byte hex string, 12 byte binary string or a Number.
+* @property {number} generationTime The generation time of this ObjectId instance
+* @return {ObjectID} instance of ObjectID.
+*/
+var ObjectID = function ObjectID(id) {
+ // Duck-typing to support ObjectId from different npm packages
+ if(id instanceof ObjectID) return id;
+ if(!(this instanceof ObjectID)) return new ObjectID(id);
+
+ this._bsontype = 'ObjectID';
+
+ var __id = null;
+ var valid = ObjectID.isValid(id);
+
+ // Throw an error if it's not a valid setup
+ if(!valid && id != null){
+ throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");
+ } else if(valid && typeof id == 'string' && id.length == 24) {
+ return ObjectID.createFromHexString(id);
+ } else if(id == null || typeof id == 'number') {
+ // convert to 12 byte binary string
+ this.id = this.generate(id);
+ } else if(id != null && id.length === 12) {
+ // assume 12 byte string
+ this.id = id;
+ } else if(id != null && id.toHexString) {
+ // Duck-typing to support ObjectId from different npm packages
+ return id;
+ } else {
+ throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");
+ }
+
+ if(ObjectID.cacheHexString) this.__id = this.toHexString();
+};
+
+// Allow usage of ObjectId as well as ObjectID
+var ObjectId = ObjectID;
+
+// Precomputed hex table enables speedy hex string conversion
+var hexTable = [];
+for (var i = 0; i < 256; i++) {
+ hexTable[i] = (i <= 15 ? '0' : '') + i.toString(16);
+}
+
+/**
+* Return the ObjectID id as a 24 byte hex string representation
+*
+* @method
+* @return {string} return the 24 byte hex string representation.
+*/
+ObjectID.prototype.toHexString = function() {
+ if(ObjectID.cacheHexString && this.__id) return this.__id;
+
+ var hexString = '';
+ if(!this.id || !this.id.length) {
+ throw new Error('invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is [' + JSON.stringify(this.id) + ']');
+ }
+
+ if(this.id instanceof _Buffer) {
+ hexString = convertToHex(this.id);
+ if(ObjectID.cacheHexString) this.__id = hexString;
+ return hexString;
+ }
+
+ for (var i = 0; i < this.id.length; i++) {
+ hexString += hexTable[this.id.charCodeAt(i)];
+ }
+
+ if(ObjectID.cacheHexString) this.__id = hexString;
+ return hexString;
+};
+
+/**
+* Update the ObjectID index used in generating new ObjectID's on the driver
+*
+* @method
+* @return {number} returns next index value.
+* @ignore
+*/
+ObjectID.prototype.get_inc = function() {
+ return ObjectID.index = (ObjectID.index + 1) % 0xFFFFFF;
+};
+
+/**
+* Update the ObjectID index used in generating new ObjectID's on the driver
+*
+* @method
+* @return {number} returns next index value.
+* @ignore
+*/
+ObjectID.prototype.getInc = function() {
+ return this.get_inc();
+};
+
+/**
+* Generate a 12 byte id buffer used in ObjectID's
+*
+* @method
+* @param {number} [time] optional parameter allowing to pass in a second based timestamp.
+* @return {Buffer} return the 12 byte id buffer string.
+*/
+ObjectID.prototype.generate = function(time) {
+ if ('number' != typeof time) {
+ time = ~~(Date.now()/1000);
+ }
+
+ // Use pid
+ var pid = (typeof process === 'undefined' ? Math.floor(Math.random() * 100000) : process.pid) % 0xFFFF;
+ var inc = this.get_inc();
+ // Buffer used
+ var buffer = new Buffer(12);
+ // Encode time
+ buffer[3] = time & 0xff;
+ buffer[2] = (time >> 8) & 0xff;
+ buffer[1] = (time >> 16) & 0xff;
+ buffer[0] = (time >> 24) & 0xff;
+ // Encode machine
+ buffer[6] = MACHINE_ID & 0xff;
+ buffer[5] = (MACHINE_ID >> 8) & 0xff;
+ buffer[4] = (MACHINE_ID >> 16) & 0xff;
+ // Encode pid
+ buffer[8] = pid & 0xff;
+ buffer[7] = (pid >> 8) & 0xff;
+ // Encode index
+ buffer[11] = inc & 0xff;
+ buffer[10] = (inc >> 8) & 0xff;
+ buffer[9] = (inc >> 16) & 0xff;
+ // Return the buffer
+ return buffer;
+};
+
+/**
+* Converts the id into a 24 byte hex string for printing
+*
+* @return {String} return the 24 byte hex string representation.
+* @ignore
+*/
+ObjectID.prototype.toString = function() {
+ return this.toHexString();
+};
+
+/**
+* Converts to a string representation of this Id.
+*
+* @return {String} return the 24 byte hex string representation.
+* @ignore
+*/
+ObjectID.prototype.inspect = ObjectID.prototype.toString;
+
+/**
+* Converts to its JSON representation.
+*
+* @return {String} return the 24 byte hex string representation.
+* @ignore
+*/
+ObjectID.prototype.toJSON = function() {
+ return this.toHexString();
+};
+
+/**
+* Compares the equality of this ObjectID with `otherID`.
+*
+* @method
+* @param {object} otherID ObjectID instance to compare against.
+* @return {boolean} the result of comparing two ObjectID's
+*/
+ObjectID.prototype.equals = function equals (otherId) {
+ var id;
+
+ if(otherId instanceof ObjectID) {
+ return this.toString() == otherId.toString();
+ } else if(typeof otherId == 'string' && ObjectID.isValid(otherId) && otherId.length == 12 && this.id instanceof _Buffer) {
+ return otherId === this.id.toString('binary');
+ } else if(typeof otherId == 'string' && ObjectID.isValid(otherId) && otherId.length == 24) {
+ return otherId === this.toHexString();
+ } else if(typeof otherId == 'string' && ObjectID.isValid(otherId) && otherId.length == 12) {
+ return otherId === this.id;
+ } else if(otherId != null && (otherId instanceof ObjectID || otherId.toHexString)) {
+ return otherId.toHexString() === this.toHexString();
+ } else {
+ return false;
+ }
+}
+
+/**
+* Returns the generation date (accurate up to the second) that this ID was generated.
+*
+* @method
+* @return {date} the generation date
+*/
+ObjectID.prototype.getTimestamp = function() {
+ var timestamp = new Date();
+ var time = this.id[3] | this.id[2] << 8 | this.id[1] << 16 | this.id[0] << 24;
+ timestamp.setTime(Math.floor(time) * 1000);
+ return timestamp;
+}
+
+/**
+* @ignore
+*/
+ObjectID.index = ~~(Math.random() * 0xFFFFFF);
+
+/**
+* @ignore
+*/
+ObjectID.createPk = function createPk () {
+ return new ObjectID();
+};
+
+/**
+* Creates an ObjectID from a second based number, with the rest of the ObjectID zeroed out. Used for comparisons or sorting the ObjectID.
+*
+* @method
+* @param {number} time an integer number representing a number of seconds.
+* @return {ObjectID} return the created ObjectID
+*/
+ObjectID.createFromTime = function createFromTime (time) {
+ var buffer = new Buffer([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
+ // Encode time into first 4 bytes
+ buffer[3] = time & 0xff;
+ buffer[2] = (time >> 8) & 0xff;
+ buffer[1] = (time >> 16) & 0xff;
+ buffer[0] = (time >> 24) & 0xff;
+ // Return the new objectId
+ return new ObjectID(buffer);
+};
+
+// Lookup tables
+var encodeLookup = '0123456789abcdef'.split('')
+var decodeLookup = []
+var i = 0
+while (i < 10) decodeLookup[0x30 + i] = i++
+while (i < 16) decodeLookup[0x41 - 10 + i] = decodeLookup[0x61 - 10 + i] = i++
+
+var _Buffer = Buffer;
+var convertToHex = function(bytes) {
+ return bytes.toString('hex');
+}
+
+/**
+* Creates an ObjectID from a hex string representation of an ObjectID.
+*
+* @method
+* @param {string} hexString create a ObjectID from a passed in 24 byte hexstring.
+* @return {ObjectID} return the created ObjectID
+*/
+ObjectID.createFromHexString = function createFromHexString (string) {
+ // Throw an error if it's not a valid setup
+ if(typeof string === 'undefined' || string != null && string.length != 24)
+ throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");
+
+ var length = string.length;
+
+ if(length > 12*2) {
+ throw new Error('Id cannot be longer than 12 bytes');
+ }
+
+ // Calculate lengths
+ var sizeof = length >> 1;
+ var array = new _Buffer(sizeof);
+ var n = 0;
+ var i = 0;
+
+ while (i < length) {
+ array[n++] = decodeLookup[string.charCodeAt(i++)] << 4 | decodeLookup[string.charCodeAt(i++)]
+ }
+
+ return new ObjectID(array);
+};
+
+/**
+* Checks if a value is a valid bson ObjectId
+*
+* @method
+* @return {boolean} return true if the value is a valid bson ObjectId, return false otherwise.
+*/
+ObjectID.isValid = function isValid(id) {
+ if(id == null) return false;
+
+ if(typeof id == 'number') {
+ return true;
+ }
+
+ if(typeof id == 'string') {
+ return id.length == 12 || (id.length == 24 && checkForHexRegExp.test(id));
+ }
+
+ if(id instanceof ObjectID) {
+ return true;
+ }
+
+ if(id instanceof _Buffer) {
+ return true;
+ }
+
+ // Duck-Typing detection of ObjectId like objects
+ if(id.toHexString) {
+ return id.id.length == 12 || (id.id.length == 24 && checkForHexRegExp.test(id.id));
+ }
+
+ return false;
+};
+
+/**
+* @ignore
+*/
+Object.defineProperty(ObjectID.prototype, "generationTime", {
+ enumerable: true
+ , get: function () {
+ return this.id[3] | this.id[2] << 8 | this.id[1] << 16 | this.id[0] << 24;
+ }
+ , set: function (value) {
+ // Encode time into first 4 bytes
+ this.id[3] = value & 0xff;
+ this.id[2] = (value >> 8) & 0xff;
+ this.id[1] = (value >> 16) & 0xff;
+ this.id[0] = (value >> 24) & 0xff;
+ }
+});
+
+/**
+ * Expose.
+ */
+module.exports = ObjectID;
+module.exports.ObjectID = ObjectID;
+module.exports.ObjectId = ObjectID;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/parser/calculate_size.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/parser/calculate_size.js
new file mode 100644
index 0000000..53d338f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/parser/calculate_size.js
@@ -0,0 +1,152 @@
+"use strict"
+
+var writeIEEE754 = require('../float_parser').writeIEEE754
+ , readIEEE754 = require('../float_parser').readIEEE754
+ , Long = require('../long').Long
+ , Double = require('../double').Double
+ , Timestamp = require('../timestamp').Timestamp
+ , ObjectID = require('../objectid').ObjectID
+ , Symbol = require('../symbol').Symbol
+ , BSONRegExp = require('../regexp').BSONRegExp
+ , Code = require('../code').Code
+ , Decimal128 = require('../decimal128')
+ , MinKey = require('../min_key').MinKey
+ , MaxKey = require('../max_key').MaxKey
+ , DBRef = require('../db_ref').DBRef
+ , Binary = require('../binary').Binary;
+
+// To ensure that 0.4 of node works correctly
+var isDate = function isDate(d) {
+ return typeof d === 'object' && Object.prototype.toString.call(d) === '[object Date]';
+}
+
+var calculateObjectSize = function calculateObjectSize(object, serializeFunctions, ignoreUndefined) {
+ var totalLength = (4 + 1);
+
+ if(Array.isArray(object)) {
+ for(var i = 0; i < object.length; i++) {
+ totalLength += calculateElement(i.toString(), object[i], serializeFunctions, true, ignoreUndefined)
+ }
+ } else {
+ // If we have toBSON defined, override the current object
+ if(object.toBSON) {
+ object = object.toBSON();
+ }
+
+ // Calculate size
+ for(var key in object) {
+ totalLength += calculateElement(key, object[key], serializeFunctions, false, ignoreUndefined)
+ }
+ }
+
+ return totalLength;
+}
+
+/**
+ * @ignore
+ * @api private
+ */
+function calculateElement(name, value, serializeFunctions, isArray, ignoreUndefined) {
+ // If we have toBSON defined, override the current object
+ if(value && value.toBSON){
+ value = value.toBSON();
+ }
+
+ switch(typeof value) {
+ case 'string':
+ return 1 + Buffer.byteLength(name, 'utf8') + 1 + 4 + Buffer.byteLength(value, 'utf8') + 1;
+ case 'number':
+ if(Math.floor(value) === value && value >= BSON.JS_INT_MIN && value <= BSON.JS_INT_MAX) {
+ if(value >= BSON.BSON_INT32_MIN && value <= BSON.BSON_INT32_MAX) { // 32 bit
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (4 + 1);
+ } else {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (8 + 1);
+ }
+ } else { // 64 bit
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (8 + 1);
+ }
+ case 'undefined':
+ if(isArray || !ignoreUndefined) return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (1);
+ return 0;
+ case 'boolean':
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (1 + 1);
+ case 'object':
+ if(value == null || value instanceof MinKey || value instanceof MaxKey || value['_bsontype'] == 'MinKey' || value['_bsontype'] == 'MaxKey') {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (1);
+ } else if(value instanceof ObjectID || value['_bsontype'] == 'ObjectID') {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (12 + 1);
+ } else if(value instanceof Date || isDate(value)) {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (8 + 1);
+ } else if(typeof Buffer !== 'undefined' && Buffer.isBuffer(value)) {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (1 + 4 + 1) + value.length;
+ } else if(value instanceof Long || value instanceof Double || value instanceof Timestamp
+ || value['_bsontype'] == 'Long' || value['_bsontype'] == 'Double' || value['_bsontype'] == 'Timestamp') {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (8 + 1);
+ } else if(value instanceof Decimal128 || value['_bsontype'] == 'Decimal128') {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (16 + 1);
+ } else if(value instanceof Code || value['_bsontype'] == 'Code') {
+ // Calculate size depending on the availability of a scope
+ if(value.scope != null && Object.keys(value.scope).length > 0) {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + 1 + 4 + 4 + Buffer.byteLength(value.code.toString(), 'utf8') + 1 + calculateObjectSize(value.scope, serializeFunctions, ignoreUndefined);
+ } else {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + 1 + 4 + Buffer.byteLength(value.code.toString(), 'utf8') + 1;
+ }
+ } else if(value instanceof Binary || value['_bsontype'] == 'Binary') {
+ // Check what kind of subtype we have
+ if(value.sub_type == Binary.SUBTYPE_BYTE_ARRAY) {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (value.position + 1 + 4 + 1 + 4);
+ } else {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + (value.position + 1 + 4 + 1);
+ }
+ } else if(value instanceof Symbol || value['_bsontype'] == 'Symbol') {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + Buffer.byteLength(value.value, 'utf8') + 4 + 1 + 1;
+ } else if(value instanceof DBRef || value['_bsontype'] == 'DBRef') {
+ // Set up correct object for serialization
+ var ordered_values = {
+ '$ref': value.namespace
+ , '$id' : value.oid
+ };
+
+ // Add db reference if it exists
+ if(null != value.db) {
+ ordered_values['$db'] = value.db;
+ }
+
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + 1 + calculateObjectSize(ordered_values, serializeFunctions, ignoreUndefined);
+ } else if(value instanceof RegExp || Object.prototype.toString.call(value) === '[object RegExp]') {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + 1 + Buffer.byteLength(value.source, 'utf8') + 1
+ + (value.global ? 1 : 0) + (value.ignoreCase ? 1 : 0) + (value.multiline ? 1 : 0) + 1
+ } else if(value instanceof BSONRegExp || value['_bsontype'] == 'BSONRegExp') {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + 1 + Buffer.byteLength(value.pattern, 'utf8') + 1
+ + Buffer.byteLength(value.options, 'utf8') + 1
+ } else {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + calculateObjectSize(value, serializeFunctions, ignoreUndefined) + 1;
+ }
+ case 'function':
+ // WTF for 0.4.X where typeof /someregexp/ === 'function'
+ if(value instanceof RegExp || Object.prototype.toString.call(value) === '[object RegExp]' || String.call(value) == '[object RegExp]') {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + 1 + Buffer.byteLength(value.source, 'utf8') + 1
+ + (value.global ? 1 : 0) + (value.ignoreCase ? 1 : 0) + (value.multiline ? 1 : 0) + 1
+ } else {
+ if(serializeFunctions && value.scope != null && Object.keys(value.scope).length > 0) {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + 1 + 4 + 4 + Buffer.byteLength(value.toString(), 'utf8') + 1 + calculateObjectSize(value.scope, serializeFunctions, ignoreUndefined);
+ } else if(serializeFunctions) {
+ return (name != null ? (Buffer.byteLength(name, 'utf8') + 1) : 0) + 1 + 4 + Buffer.byteLength(value.toString(), 'utf8') + 1;
+ }
+ }
+ }
+
+ return 0;
+}
+
+var BSON = {};
+
+// BSON MAX VALUES
+BSON.BSON_INT32_MAX = 0x7FFFFFFF;
+BSON.BSON_INT32_MIN = -0x80000000;
+
+// JS MAX PRECISE VALUES
+BSON.JS_INT_MAX = 0x20000000000000; // Any integer up to 2^53 can be precisely represented by a double.
+BSON.JS_INT_MIN = -0x20000000000000; // Any integer down to -2^53 can be precisely represented by a double.
+
+module.exports = calculateObjectSize;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/parser/deserializer.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/parser/deserializer.js
new file mode 100644
index 0000000..bb27cd4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/parser/deserializer.js
@@ -0,0 +1,653 @@
+"use strict"
+
+var readIEEE754 = require('../float_parser').readIEEE754,
+ f = require('util').format,
+ Long = require('../long').Long,
+ Double = require('../double').Double,
+ Timestamp = require('../timestamp').Timestamp,
+ ObjectID = require('../objectid').ObjectID,
+ Symbol = require('../symbol').Symbol,
+ Code = require('../code').Code,
+ MinKey = require('../min_key').MinKey,
+ MaxKey = require('../max_key').MaxKey,
+ Decimal128 = require('../decimal128'),
+ Int32 = require('../int_32'),
+ DBRef = require('../db_ref').DBRef,
+ BSONRegExp = require('../regexp').BSONRegExp,
+ Binary = require('../binary').Binary;
+
+var deserialize = function(buffer, options, isArray) {
+ options = options == null ? {} : options;
+ var index = options && options.index ? options.index : 0;
+ // Read the document size
+ var size = buffer[index] | buffer[index+1] << 8 | buffer[index+2] << 16 | buffer[index+3] << 24;
+
+ // Ensure buffer is valid size
+ if(size < 5 || buffer.length < size || (size + index) > buffer.length) {
+ throw new Error("corrupt bson message");
+ }
+
+ // Illegal end value
+ if(buffer[index + size - 1] != 0) {
+ throw new Error("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");
+ }
+
+ // Start deserializtion
+ return deserializeObject(buffer, index, options, isArray);
+}
+
+var deserializeObject = function(buffer, index, options, isArray) {
+ var evalFunctions = options['evalFunctions'] == null ? false : options['evalFunctions'];
+ var cacheFunctions = options['cacheFunctions'] == null ? false : options['cacheFunctions'];
+ var cacheFunctionsCrc32 = options['cacheFunctionsCrc32'] == null ? false : options['cacheFunctionsCrc32'];
+ var fieldsAsRaw = options['fieldsAsRaw'] == null ? null : options['fieldsAsRaw'];
+
+ // Return raw bson buffer instead of parsing it
+ var raw = options['raw'] == null ? false : options['raw'];
+
+ // Return BSONRegExp objects instead of native regular expressions
+ var bsonRegExp = typeof options['bsonRegExp'] == 'boolean' ? options['bsonRegExp'] : false;
+
+ // Controls the promotion of values vs wrapper classes
+ var promoteBuffers = options['promoteBuffers'] == null ? false : options['promoteBuffers'];
+ var promoteLongs = options['promoteLongs'] == null ? true : options['promoteLongs'];
+ var promoteValues = options['promoteValues'] == null ? true : options['promoteValues'];
+
+ // Set the start index
+ var startIndex = index;
+
+ // Validate that we have at least 4 bytes of buffer
+ if(buffer.length < 5) throw new Error("corrupt bson message < 5 bytes long");
+
+ // Read the document size
+ var size = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+
+ // Ensure buffer is valid size
+ if(size < 5 || size > buffer.length) throw new Error("corrupt bson message");
+
+ // Create holding object
+ var object = isArray ? [] : {};
+ // Used for arrays to skip having to perform utf8 decoding
+ var arrayIndex = 0;
+
+ // While we have more left data left keep parsing
+ while(true) {
+ // Read the type
+ var elementType = buffer[index++];
+ // If we get a zero it's the last byte, exit
+ if(elementType == 0) {
+ break;
+ }
+
+ // Get the start search index
+ var i = index;
+ // Locate the end of the c string
+ while(buffer[i] !== 0x00 && i < buffer.length) {
+ i++
+ }
+
+ // If are at the end of the buffer there is a problem with the document
+ if(i >= buffer.length) throw new Error("Bad BSON Document: illegal CString")
+ var name = isArray ? arrayIndex++ : buffer.toString('utf8', index, i);
+
+ index = i + 1;
+
+ if(elementType == BSON.BSON_DATA_STRING) {
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ if(stringSize <= 0 || stringSize > (buffer.length - index) || buffer[index + stringSize - 1] != 0) throw new Error("bad string length in bson");
+ object[name] = buffer.toString('utf8', index, index + stringSize - 1);
+ index = index + stringSize;
+ } else if(elementType == BSON.BSON_DATA_OID) {
+ var oid = new Buffer(12);
+ buffer.copy(oid, 0, index, index + 12);
+ object[name] = new ObjectID(oid);
+ index = index + 12;
+ } else if(elementType == BSON.BSON_DATA_INT && promoteValues == false) {
+ object[name] = new Int32(buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24);
+ } else if(elementType == BSON.BSON_DATA_INT) {
+ object[name] = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ } else if(elementType == BSON.BSON_DATA_NUMBER && promoteValues == false) {
+ object[name] = new Double(buffer.readDoubleLE(index));
+ index = index + 8;
+ } else if(elementType == BSON.BSON_DATA_NUMBER) {
+ object[name] = buffer.readDoubleLE(index);
+ index = index + 8;
+ } else if(elementType == BSON.BSON_DATA_DATE) {
+ var lowBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var highBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ object[name] = new Date(new Long(lowBits, highBits).toNumber());
+ } else if(elementType == BSON.BSON_DATA_BOOLEAN) {
+ if(buffer[index] != 0 && buffer[index] != 1) throw new Error('illegal boolean type value');
+ object[name] = buffer[index++] == 1;
+ } else if(elementType == BSON.BSON_DATA_OBJECT) {
+ var _index = index;
+ var objectSize = buffer[index] | buffer[index + 1] << 8 | buffer[index + 2] << 16 | buffer[index + 3] << 24;
+ if(objectSize <= 0 || objectSize > (buffer.length - index)) throw new Error("bad embedded document length in bson");
+
+ // We have a raw value
+ if(raw) {
+ object[name] = buffer.slice(index, index + objectSize);
+ } else {
+ object[name] = deserializeObject(buffer, _index, options, false);
+ }
+
+ index = index + objectSize;
+ } else if(elementType == BSON.BSON_DATA_ARRAY) {
+ var _index = index;
+ var objectSize = buffer[index] | buffer[index + 1] << 8 | buffer[index + 2] << 16 | buffer[index + 3] << 24;
+ var arrayOptions = options;
+
+ // Stop index
+ var stopIndex = index + objectSize;
+
+ // All elements of array to be returned as raw bson
+ if(fieldsAsRaw && fieldsAsRaw[name]) {
+ arrayOptions = {};
+ for(var n in options) arrayOptions[n] = options[n];
+ arrayOptions['raw'] = true;
+ }
+
+ object[name] = deserializeObject(buffer, _index, arrayOptions, true);
+ index = index + objectSize;
+
+ if(buffer[index - 1] != 0) throw new Error('invalid array terminator byte');
+ if(index != stopIndex) throw new Error('corrupted array bson');
+ } else if(elementType == BSON.BSON_DATA_UNDEFINED) {
+ object[name] = undefined;
+ } else if(elementType == BSON.BSON_DATA_NULL) {
+ object[name] = null;
+ } else if(elementType == BSON.BSON_DATA_LONG) {
+ // Unpack the low and high bits
+ var lowBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var highBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var long = new Long(lowBits, highBits);
+ // Promote the long if possible
+ if(promoteLongs && promoteValues == true) {
+ object[name] = long.lessThanOrEqual(JS_INT_MAX_LONG) && long.greaterThanOrEqual(JS_INT_MIN_LONG) ? long.toNumber() : long;
+ } else {
+ object[name] = long;
+ }
+ } else if(elementType == BSON.BSON_DATA_DECIMAL128) {
+ // Buffer to contain the decimal bytes
+ var bytes = new Buffer(16);
+ // Copy the next 16 bytes into the bytes buffer
+ buffer.copy(bytes, 0, index, index + 16);
+ // Update index
+ index = index + 16;
+ // Assign the new Decimal128 value
+ var decimal128 = new Decimal128(bytes);
+ // If we have an alternative mapper use that
+ object[name] = decimal128.toObject ? decimal128.toObject() : decimal128;
+ } else if(elementType == BSON.BSON_DATA_BINARY) {
+ var binarySize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var totalBinarySize = binarySize;
+ var subType = buffer[index++];
+
+ // Did we have a negative binary size, throw
+ if(binarySize < 0) throw new Error('Negative binary type element size found');
+
+ // Is the length longer than the document
+ if(binarySize > buffer.length) throw new Error('Binary type size larger than document size');
+
+ // Decode as raw Buffer object if options specifies it
+ if(buffer['slice'] != null) {
+ // If we have subtype 2 skip the 4 bytes for the size
+ if(subType == Binary.SUBTYPE_BYTE_ARRAY) {
+ binarySize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ if(binarySize < 0) throw new Error('Negative binary type element size found for subtype 0x02');
+ if(binarySize > (totalBinarySize - 4)) throw new Error('Binary type with subtype 0x02 contains to long binary size');
+ if(binarySize < (totalBinarySize - 4)) throw new Error('Binary type with subtype 0x02 contains to short binary size');
+ }
+
+ if(promoteBuffers && promoteValues) {
+ object[name] = buffer.slice(index, index + binarySize);
+ } else {
+ object[name] = new Binary(buffer.slice(index, index + binarySize), subType);
+ }
+ } else {
+ var _buffer = typeof Uint8Array != 'undefined' ? new Uint8Array(new ArrayBuffer(binarySize)) : new Array(binarySize);
+ // If we have subtype 2 skip the 4 bytes for the size
+ if(subType == Binary.SUBTYPE_BYTE_ARRAY) {
+ binarySize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ if(binarySize < 0) throw new Error('Negative binary type element size found for subtype 0x02');
+ if(binarySize > (totalBinarySize - 4)) throw new Error('Binary type with subtype 0x02 contains to long binary size');
+ if(binarySize < (totalBinarySize - 4)) throw new Error('Binary type with subtype 0x02 contains to short binary size');
+ }
+
+ // Copy the data
+ for(var i = 0; i < binarySize; i++) {
+ _buffer[i] = buffer[index + i];
+ }
+
+ if(promoteBuffers && promoteValues) {
+ object[name] = _buffer;
+ } else {
+ object[name] = new Binary(_buffer, subType);
+ }
+ }
+
+ // Update the index
+ index = index + binarySize;
+ } else if(elementType == BSON.BSON_DATA_REGEXP && bsonRegExp == false) {
+ // Get the start search index
+ var i = index;
+ // Locate the end of the c string
+ while(buffer[i] !== 0x00 && i < buffer.length) {
+ i++
+ }
+ // If are at the end of the buffer there is a problem with the document
+ if(i >= buffer.length) throw new Error("Bad BSON Document: illegal CString")
+ // Return the C string
+ var source = buffer.toString('utf8', index, i);
+ // Create the regexp
+ index = i + 1;
+
+ // Get the start search index
+ var i = index;
+ // Locate the end of the c string
+ while(buffer[i] !== 0x00 && i < buffer.length) {
+ i++
+ }
+ // If are at the end of the buffer there is a problem with the document
+ if(i >= buffer.length) throw new Error("Bad BSON Document: illegal CString")
+ // Return the C string
+ var regExpOptions = buffer.toString('utf8', index, i);
+ index = i + 1;
+
+ // For each option add the corresponding one for javascript
+ var optionsArray = new Array(regExpOptions.length);
+
+ // Parse options
+ for(var i = 0; i < regExpOptions.length; i++) {
+ switch(regExpOptions[i]) {
+ case 'm':
+ optionsArray[i] = 'm';
+ break;
+ case 's':
+ optionsArray[i] = 'g';
+ break;
+ case 'i':
+ optionsArray[i] = 'i';
+ break;
+ }
+ }
+
+ object[name] = new RegExp(source, optionsArray.join(''));
+ } else if(elementType == BSON.BSON_DATA_REGEXP && bsonRegExp == true) {
+ // Get the start search index
+ var i = index;
+ // Locate the end of the c string
+ while(buffer[i] !== 0x00 && i < buffer.length) {
+ i++
+ }
+ // If are at the end of the buffer there is a problem with the document
+ if(i >= buffer.length) throw new Error("Bad BSON Document: illegal CString")
+ // Return the C string
+ var source = buffer.toString('utf8', index, i);
+ index = i + 1;
+
+ // Get the start search index
+ var i = index;
+ // Locate the end of the c string
+ while(buffer[i] !== 0x00 && i < buffer.length) {
+ i++
+ }
+ // If are at the end of the buffer there is a problem with the document
+ if(i >= buffer.length) throw new Error("Bad BSON Document: illegal CString")
+ // Return the C string
+ var regExpOptions = buffer.toString('utf8', index, i);
+ index = i + 1;
+
+ // Set the object
+ object[name] = new BSONRegExp(source, regExpOptions);
+ } else if(elementType == BSON.BSON_DATA_SYMBOL) {
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ if(stringSize <= 0 || stringSize > (buffer.length - index) || buffer[index + stringSize - 1] != 0) throw new Error("bad string length in bson");
+ object[name] = new Symbol(buffer.toString('utf8', index, index + stringSize - 1));
+ index = index + stringSize;
+ } else if(elementType == BSON.BSON_DATA_TIMESTAMP) {
+ var lowBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ var highBits = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ object[name] = new Timestamp(lowBits, highBits);
+ } else if(elementType == BSON.BSON_DATA_MIN_KEY) {
+ object[name] = new MinKey();
+ } else if(elementType == BSON.BSON_DATA_MAX_KEY) {
+ object[name] = new MaxKey();
+ } else if(elementType == BSON.BSON_DATA_CODE) {
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ if(stringSize <= 0 || stringSize > (buffer.length - index) || buffer[index + stringSize - 1] != 0) throw new Error("bad string length in bson");
+ var functionString = buffer.toString('utf8', index, index + stringSize - 1);
+
+ // If we are evaluating the functions
+ if(evalFunctions) {
+ var value = null;
+ // If we have cache enabled let's look for the md5 of the function in the cache
+ if(cacheFunctions) {
+ var hash = cacheFunctionsCrc32 ? crc32(functionString) : functionString;
+ // Got to do this to avoid V8 deoptimizing the call due to finding eval
+ object[name] = isolateEvalWithHash(functionCache, hash, functionString, object);
+ } else {
+ object[name] = isolateEval(functionString);
+ }
+ } else {
+ object[name] = new Code(functionString);
+ }
+
+ // Update parse index position
+ index = index + stringSize;
+ } else if(elementType == BSON.BSON_DATA_CODE_W_SCOPE) {
+ var totalSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+
+ // Element cannot be shorter than totalSize + stringSize + documentSize + terminator
+ if(totalSize < (4 + 4 + 4 + 1)) {
+ throw new Error("code_w_scope total size shorter minimum expected length");
+ }
+
+ // Get the code string size
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ // Check if we have a valid string
+ if(stringSize <= 0 || stringSize > (buffer.length - index) || buffer[index + stringSize - 1] != 0) throw new Error("bad string length in bson");
+
+ // Javascript function
+ var functionString = buffer.toString('utf8', index, index + stringSize - 1);
+ // Update parse index position
+ index = index + stringSize;
+ // Parse the element
+ var _index = index;
+ // Decode the size of the object document
+ var objectSize = buffer[index] | buffer[index + 1] << 8 | buffer[index + 2] << 16 | buffer[index + 3] << 24;
+ // Decode the scope object
+ var scopeObject = deserializeObject(buffer, _index, options, false);
+ // Adjust the index
+ index = index + objectSize;
+
+ // Check if field length is to short
+ if(totalSize < (4 + 4 + objectSize + stringSize)) {
+ throw new Error('code_w_scope total size is to short, truncating scope');
+ }
+
+ // Check if totalSize field is to long
+ if(totalSize > (4 + 4 + objectSize + stringSize)) {
+ throw new Error('code_w_scope total size is to long, clips outer document');
+ }
+
+ // If we are evaluating the functions
+ if(evalFunctions) {
+ // Contains the value we are going to set
+ var value = null;
+ // If we have cache enabled let's look for the md5 of the function in the cache
+ if(cacheFunctions) {
+ var hash = cacheFunctionsCrc32 ? crc32(functionString) : functionString;
+ // Got to do this to avoid V8 deoptimizing the call due to finding eval
+ object[name] = isolateEvalWithHash(functionCache, hash, functionString, object);
+ } else {
+ object[name] = isolateEval(functionString);
+ }
+
+ object[name].scope = scopeObject;
+ } else {
+ object[name] = new Code(functionString, scopeObject);
+ }
+ } else if(elementType == BSON_DATA_DBPOINTER) {
+ // Get the code string size
+ var stringSize = buffer[index++] | buffer[index++] << 8 | buffer[index++] << 16 | buffer[index++] << 24;
+ // Check if we have a valid string
+ if(stringSize <= 0 || stringSize > (buffer.length - index) || buffer[index + stringSize - 1] != 0) throw new Error("bad string length in bson");
+ // Namespace
+ var namespace = buffer.toString('utf8', index, index + stringSize - 1);
+ // Update parse index position
+ index = index + stringSize;
+
+ // Read the oid
+ var oidBuffer = new Buffer(12);
+ buffer.copy(oidBuffer, 0, index, index + 12);
+ var oid = new ObjectID(oidBuffer);
+
+ // Update the index
+ index = index + 12;
+
+ // Split the namespace
+ var parts = namespace.split('.');
+ var db = parts.shift();
+ var collection = parts.join('.');
+ // Upgrade to DBRef type
+ object[name] = new DBRef(collection, oid, db);
+ } else {
+ throw new Error("Detected unknown BSON type " + elementType.toString(16) + " for fieldname \"" + name + "\", are you using the latest BSON parser");
+ }
+ }
+
+ // Check if the deserialization was against a valid array/object
+ if(size != (index - startIndex)) {
+ if(isArray) throw new Error('corrupt array bson');
+ throw new Error('corrupt object bson');
+ }
+
+ // Check if we have a db ref object
+ if(object['$id'] != null) object = new DBRef(object['$ref'], object['$id'], object['$db']);
+ return object;
+}
+
+/**
+ * Ensure eval is isolated.
+ *
+ * @ignore
+ * @api private
+ */
+var isolateEvalWithHash = function(functionCache, hash, functionString, object) {
+ // Contains the value we are going to set
+ var value = null;
+
+ // Check for cache hit, eval if missing and return cached function
+ if(functionCache[hash] == null) {
+ eval("value = " + functionString);
+ functionCache[hash] = value;
+ }
+ // Set the object
+ return functionCache[hash].bind(object);
+}
+
+/**
+ * Ensure eval is isolated.
+ *
+ * @ignore
+ * @api private
+ */
+var isolateEval = function(functionString) {
+ // Contains the value we are going to set
+ var value = null;
+ // Eval the function
+ eval("value = " + functionString);
+ return value;
+}
+
+var BSON = {};
+
+/**
+ * Contains the function cache if we have that enable to allow for avoiding the eval step on each deserialization, comparison is by md5
+ *
+ * @ignore
+ * @api private
+ */
+var functionCache = BSON.functionCache = {};
+
+/**
+ * Number BSON Type
+ *
+ * @classconstant BSON_DATA_NUMBER
+ **/
+BSON.BSON_DATA_NUMBER = 1;
+/**
+ * String BSON Type
+ *
+ * @classconstant BSON_DATA_STRING
+ **/
+BSON.BSON_DATA_STRING = 2;
+/**
+ * Object BSON Type
+ *
+ * @classconstant BSON_DATA_OBJECT
+ **/
+BSON.BSON_DATA_OBJECT = 3;
+/**
+ * Array BSON Type
+ *
+ * @classconstant BSON_DATA_ARRAY
+ **/
+BSON.BSON_DATA_ARRAY = 4;
+/**
+ * Binary BSON Type
+ *
+ * @classconstant BSON_DATA_BINARY
+ **/
+BSON.BSON_DATA_BINARY = 5;
+/**
+ * Binary BSON Type
+ *
+ * @classconstant BSON_DATA_UNDEFINED
+ **/
+BSON.BSON_DATA_UNDEFINED = 6;
+/**
+ * ObjectID BSON Type
+ *
+ * @classconstant BSON_DATA_OID
+ **/
+BSON.BSON_DATA_OID = 7;
+/**
+ * Boolean BSON Type
+ *
+ * @classconstant BSON_DATA_BOOLEAN
+ **/
+BSON.BSON_DATA_BOOLEAN = 8;
+/**
+ * Date BSON Type
+ *
+ * @classconstant BSON_DATA_DATE
+ **/
+BSON.BSON_DATA_DATE = 9;
+/**
+ * null BSON Type
+ *
+ * @classconstant BSON_DATA_NULL
+ **/
+BSON.BSON_DATA_NULL = 10;
+/**
+ * RegExp BSON Type
+ *
+ * @classconstant BSON_DATA_REGEXP
+ **/
+BSON.BSON_DATA_REGEXP = 11;
+/**
+ * Code BSON Type
+ *
+ * @classconstant BSON_DATA_DBPOINTER
+ **/
+BSON.BSON_DATA_DBPOINTER = 12;
+/**
+ * Code BSON Type
+ *
+ * @classconstant BSON_DATA_CODE
+ **/
+BSON.BSON_DATA_CODE = 13;
+/**
+ * Symbol BSON Type
+ *
+ * @classconstant BSON_DATA_SYMBOL
+ **/
+BSON.BSON_DATA_SYMBOL = 14;
+/**
+ * Code with Scope BSON Type
+ *
+ * @classconstant BSON_DATA_CODE_W_SCOPE
+ **/
+BSON.BSON_DATA_CODE_W_SCOPE = 15;
+/**
+ * 32 bit Integer BSON Type
+ *
+ * @classconstant BSON_DATA_INT
+ **/
+BSON.BSON_DATA_INT = 16;
+/**
+ * Timestamp BSON Type
+ *
+ * @classconstant BSON_DATA_TIMESTAMP
+ **/
+BSON.BSON_DATA_TIMESTAMP = 17;
+/**
+ * Long BSON Type
+ *
+ * @classconstant BSON_DATA_LONG
+ **/
+BSON.BSON_DATA_LONG = 18;
+/**
+ * Long BSON Type
+ *
+ * @classconstant BSON_DATA_DECIMAL128
+ **/
+BSON.BSON_DATA_DECIMAL128 = 19;
+/**
+ * MinKey BSON Type
+ *
+ * @classconstant BSON_DATA_MIN_KEY
+ **/
+BSON.BSON_DATA_MIN_KEY = 0xff;
+/**
+ * MaxKey BSON Type
+ *
+ * @classconstant BSON_DATA_MAX_KEY
+ **/
+BSON.BSON_DATA_MAX_KEY = 0x7f;
+
+/**
+ * Binary Default Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_DEFAULT
+ **/
+BSON.BSON_BINARY_SUBTYPE_DEFAULT = 0;
+/**
+ * Binary Function Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_FUNCTION
+ **/
+BSON.BSON_BINARY_SUBTYPE_FUNCTION = 1;
+/**
+ * Binary Byte Array Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_BYTE_ARRAY
+ **/
+BSON.BSON_BINARY_SUBTYPE_BYTE_ARRAY = 2;
+/**
+ * Binary UUID Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_UUID
+ **/
+BSON.BSON_BINARY_SUBTYPE_UUID = 3;
+/**
+ * Binary MD5 Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_MD5
+ **/
+BSON.BSON_BINARY_SUBTYPE_MD5 = 4;
+/**
+ * Binary User Defined Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_USER_DEFINED
+ **/
+BSON.BSON_BINARY_SUBTYPE_USER_DEFINED = 128;
+
+// BSON MAX VALUES
+BSON.BSON_INT32_MAX = 0x7FFFFFFF;
+BSON.BSON_INT32_MIN = -0x80000000;
+
+BSON.BSON_INT64_MAX = Math.pow(2, 63) - 1;
+BSON.BSON_INT64_MIN = -Math.pow(2, 63);
+
+// JS MAX PRECISE VALUES
+BSON.JS_INT_MAX = 0x20000000000000; // Any integer up to 2^53 can be precisely represented by a double.
+BSON.JS_INT_MIN = -0x20000000000000; // Any integer down to -2^53 can be precisely represented by a double.
+
+// Internal long versions
+var JS_INT_MAX_LONG = Long.fromNumber(0x20000000000000); // Any integer up to 2^53 can be precisely represented by a double.
+var JS_INT_MIN_LONG = Long.fromNumber(-0x20000000000000); // Any integer down to -2^53 can be precisely represented by a double.
+
+module.exports = deserialize
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/parser/serializer.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/parser/serializer.js
new file mode 100644
index 0000000..1b2f83f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/parser/serializer.js
@@ -0,0 +1,991 @@
+"use strict"
+
+var writeIEEE754 = require('../float_parser').writeIEEE754,
+ readIEEE754 = require('../float_parser').readIEEE754,
+ Long = require('../long').Long,
+ Map = require('../map'),
+ Double = require('../double').Double,
+ Timestamp = require('../timestamp').Timestamp,
+ ObjectID = require('../objectid').ObjectID,
+ Symbol = require('../symbol').Symbol,
+ Code = require('../code').Code,
+ BSONRegExp = require('../regexp').BSONRegExp,
+ Int32 = require('../int_32').Int32,
+ MinKey = require('../min_key').MinKey,
+ MaxKey = require('../max_key').MaxKey,
+ Decimal128 = require('../decimal128'),
+ DBRef = require('../db_ref').DBRef,
+ Binary = require('../binary').Binary;
+
+try {
+ var _Buffer = Uint8Array;
+} catch(e) {
+ var _Buffer = Buffer;
+}
+
+var regexp = /\x00/
+
+// To ensure that 0.4 of node works correctly
+var isDate = function isDate(d) {
+ return typeof d === 'object' && Object.prototype.toString.call(d) === '[object Date]';
+}
+
+var isRegExp = function isRegExp(d) {
+ return Object.prototype.toString.call(d) === '[object RegExp]';
+}
+
+var serializeString = function(buffer, key, value, index, isArray) {
+ // Encode String type
+ buffer[index++] = BSON.BSON_DATA_STRING;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes + 1;
+ buffer[index - 1] = 0;
+ // Write the string
+ var size = buffer.write(value, index + 4, 'utf8');
+ // Write the size of the string to buffer
+ buffer[index + 3] = (size + 1 >> 24) & 0xff;
+ buffer[index + 2] = (size + 1 >> 16) & 0xff;
+ buffer[index + 1] = (size + 1 >> 8) & 0xff;
+ buffer[index] = size + 1 & 0xff;
+ // Update index
+ index = index + 4 + size;
+ // Write zero
+ buffer[index++] = 0;
+ return index;
+}
+
+var serializeNumber = function(buffer, key, value, index, isArray) {
+ // We have an integer value
+ if(Math.floor(value) === value && value >= BSON.JS_INT_MIN && value <= BSON.JS_INT_MAX) {
+ // If the value fits in 32 bits encode as int, if it fits in a double
+ // encode it as a double, otherwise long
+ if(value >= BSON.BSON_INT32_MIN && value <= BSON.BSON_INT32_MAX) {
+ // Set int type 32 bits or less
+ buffer[index++] = BSON.BSON_DATA_INT;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write the int value
+ buffer[index++] = value & 0xff;
+ buffer[index++] = (value >> 8) & 0xff;
+ buffer[index++] = (value >> 16) & 0xff;
+ buffer[index++] = (value >> 24) & 0xff;
+ } else if(value >= BSON.JS_INT_MIN && value <= BSON.JS_INT_MAX) {
+ // Encode as double
+ buffer[index++] = BSON.BSON_DATA_NUMBER;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write float
+ writeIEEE754(buffer, value, index, 'little', 52, 8);
+ // Ajust index
+ index = index + 8;
+ } else {
+ // Set long type
+ buffer[index++] = BSON.BSON_DATA_LONG;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ var longVal = Long.fromNumber(value);
+ var lowBits = longVal.getLowBits();
+ var highBits = longVal.getHighBits();
+ // Encode low bits
+ buffer[index++] = lowBits & 0xff;
+ buffer[index++] = (lowBits >> 8) & 0xff;
+ buffer[index++] = (lowBits >> 16) & 0xff;
+ buffer[index++] = (lowBits >> 24) & 0xff;
+ // Encode high bits
+ buffer[index++] = highBits & 0xff;
+ buffer[index++] = (highBits >> 8) & 0xff;
+ buffer[index++] = (highBits >> 16) & 0xff;
+ buffer[index++] = (highBits >> 24) & 0xff;
+ }
+ } else {
+ // Encode as double
+ buffer[index++] = BSON.BSON_DATA_NUMBER;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write float
+ writeIEEE754(buffer, value, index, 'little', 52, 8);
+ // Ajust index
+ index = index + 8;
+ }
+
+ return index;
+}
+
+var serializeUndefined = function(buffer, key, value, index, isArray) {
+ // Set long type
+ buffer[index++] = BSON.BSON_DATA_NULL;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ return index;
+}
+
+var serializeBoolean = function(buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_BOOLEAN;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Encode the boolean value
+ buffer[index++] = value ? 1 : 0;
+ return index;
+}
+
+var serializeDate = function(buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_DATE;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+
+ // Write the date
+ var dateInMilis = Long.fromNumber(value.getTime());
+ var lowBits = dateInMilis.getLowBits();
+ var highBits = dateInMilis.getHighBits();
+ // Encode low bits
+ buffer[index++] = lowBits & 0xff;
+ buffer[index++] = (lowBits >> 8) & 0xff;
+ buffer[index++] = (lowBits >> 16) & 0xff;
+ buffer[index++] = (lowBits >> 24) & 0xff;
+ // Encode high bits
+ buffer[index++] = highBits & 0xff;
+ buffer[index++] = (highBits >> 8) & 0xff;
+ buffer[index++] = (highBits >> 16) & 0xff;
+ buffer[index++] = (highBits >> 24) & 0xff;
+ return index;
+}
+
+var serializeRegExp = function(buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_REGEXP;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ if (value.source && value.source.match(regexp) != null) {
+ throw Error("value " + value.source + " must not contain null bytes");
+ }
+ // Adjust the index
+ index = index + buffer.write(value.source, index, 'utf8');
+ // Write zero
+ buffer[index++] = 0x00;
+ // Write the parameters
+ if(value.global) buffer[index++] = 0x73; // s
+ if(value.ignoreCase) buffer[index++] = 0x69; // i
+ if(value.multiline) buffer[index++] = 0x6d; // m
+ // Add ending zero
+ buffer[index++] = 0x00;
+ return index;
+}
+
+var serializeBSONRegExp = function(buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_REGEXP;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Adjust the index
+ index = index + buffer.write(value.pattern, index, 'utf8');
+ // Write zero
+ buffer[index++] = 0x00;
+ // Write the options
+ index = index + buffer.write(value.options.split('').sort().join(''), index, 'utf8');
+ // Add ending zero
+ buffer[index++] = 0x00;
+ return index;
+}
+
+var serializeMinMax = function(buffer, key, value, index, isArray) {
+ // Write the type of either min or max key
+ if(value === null) {
+ buffer[index++] = BSON.BSON_DATA_NULL;
+ } else if(value instanceof MinKey) {
+ buffer[index++] = BSON.BSON_DATA_MIN_KEY;
+ } else {
+ buffer[index++] = BSON.BSON_DATA_MAX_KEY;
+ }
+
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ return index;
+}
+
+var serializeObjectId = function(buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_OID;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+
+ // Write the objectId into the shared buffer
+ if(typeof value.id == 'string') {
+ buffer.write(value.id, index, 'binary')
+ } else if(value.id && value.id.copy){
+ value.id.copy(buffer, index, 0, 12);
+ } else {
+ throw new Error('object [' + JSON.stringify(value) + "] is not a valid ObjectId");
+ }
+
+ // Ajust index
+ return index + 12;
+}
+
+var serializeBuffer = function(buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_BINARY;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Get size of the buffer (current write point)
+ var size = value.length;
+ // Write the size of the string to buffer
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ // Write the default subtype
+ buffer[index++] = BSON.BSON_BINARY_SUBTYPE_DEFAULT;
+ // Copy the content form the binary field to the buffer
+ value.copy(buffer, index, 0, size);
+ // Adjust the index
+ index = index + size;
+ return index;
+}
+
+var serializeObject = function(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, isArray, path) {
+ for(var i = 0; i < path.length; i++) {
+ if(path[i] === value) throw new Error('cyclic dependency detected');
+ }
+
+ // Push value to stack
+ path.push(value);
+ // Write the type
+ buffer[index++] = Array.isArray(value) ? BSON.BSON_DATA_ARRAY : BSON.BSON_DATA_OBJECT;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ var endIndex = serializeInto(buffer, value, checkKeys, index, depth + 1, serializeFunctions, ignoreUndefined, path);
+ // Pop stack
+ path.pop();
+ // Write size
+ var size = endIndex - index;
+ return endIndex;
+}
+
+var serializeDecimal128 = function(buffer, key, value, index, isArray) {
+ buffer[index++] = BSON.BSON_DATA_DECIMAL128;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write the data from the value
+ value.bytes.copy(buffer, index, 0, 16);
+ return index + 16;
+}
+
+var serializeLong = function(buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = value._bsontype == 'Long' ? BSON.BSON_DATA_LONG : BSON.BSON_DATA_TIMESTAMP;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write the date
+ var lowBits = value.getLowBits();
+ var highBits = value.getHighBits();
+ // Encode low bits
+ buffer[index++] = lowBits & 0xff;
+ buffer[index++] = (lowBits >> 8) & 0xff;
+ buffer[index++] = (lowBits >> 16) & 0xff;
+ buffer[index++] = (lowBits >> 24) & 0xff;
+ // Encode high bits
+ buffer[index++] = highBits & 0xff;
+ buffer[index++] = (highBits >> 8) & 0xff;
+ buffer[index++] = (highBits >> 16) & 0xff;
+ buffer[index++] = (highBits >> 24) & 0xff;
+ return index;
+}
+
+var serializeInt32 = function(buffer, key, value, index, isArray) {
+ // Set int type 32 bits or less
+ buffer[index++] = BSON.BSON_DATA_INT;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write the int value
+ buffer[index++] = value & 0xff;
+ buffer[index++] = (value >> 8) & 0xff;
+ buffer[index++] = (value >> 16) & 0xff;
+ buffer[index++] = (value >> 24) & 0xff;
+ return index;
+}
+
+var serializeDouble = function(buffer, key, value, index, isArray) {
+ // Encode as double
+ buffer[index++] = BSON.BSON_DATA_NUMBER;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write float
+ writeIEEE754(buffer, value, index, 'little', 52, 8);
+ // Ajust index
+ index = index + 8;
+ return index;
+}
+
+var serializeFunction = function(buffer, key, value, index, checkKeys, depth, isArray) {
+ buffer[index++] = BSON.BSON_DATA_CODE;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Function string
+ var functionString = value.toString();
+ // Write the string
+ var size = buffer.write(functionString, index + 4, 'utf8') + 1;
+ // Write the size of the string to buffer
+ buffer[index] = size & 0xff;
+ buffer[index + 1] = (size >> 8) & 0xff;
+ buffer[index + 2] = (size >> 16) & 0xff;
+ buffer[index + 3] = (size >> 24) & 0xff;
+ // Update index
+ index = index + 4 + size - 1;
+ // Write zero
+ buffer[index++] = 0;
+ return index;
+}
+
+var serializeCode = function(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, isArray) {
+ if(value.scope && typeof value.scope == 'object') {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_CODE_W_SCOPE;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+
+ // Starting index
+ var startIndex = index;
+
+ // Serialize the function
+ // Get the function string
+ var functionString = typeof value.code == 'string' ? value.code : value.code.toString();
+ // Index adjustment
+ index = index + 4;
+ // Write string into buffer
+ var codeSize = buffer.write(functionString, index + 4, 'utf8') + 1;
+ // Write the size of the string to buffer
+ buffer[index] = codeSize & 0xff;
+ buffer[index + 1] = (codeSize >> 8) & 0xff;
+ buffer[index + 2] = (codeSize >> 16) & 0xff;
+ buffer[index + 3] = (codeSize >> 24) & 0xff;
+ // Write end 0
+ buffer[index + 4 + codeSize - 1] = 0;
+ // Write the
+ index = index + codeSize + 4;
+
+ //
+ // Serialize the scope value
+ var endIndex = serializeInto(buffer, value.scope, checkKeys, index, depth + 1, serializeFunctions, ignoreUndefined)
+ index = endIndex - 1;
+
+ // Writ the total
+ var totalSize = endIndex - startIndex;
+
+ // Write the total size of the object
+ buffer[startIndex++] = totalSize & 0xff;
+ buffer[startIndex++] = (totalSize >> 8) & 0xff;
+ buffer[startIndex++] = (totalSize >> 16) & 0xff;
+ buffer[startIndex++] = (totalSize >> 24) & 0xff;
+ // Write trailing zero
+ buffer[index++] = 0;
+ } else {
+ buffer[index++] = BSON.BSON_DATA_CODE;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Function string
+ var functionString = value.code.toString();
+ // Write the string
+ var size = buffer.write(functionString, index + 4, 'utf8') + 1;
+ // Write the size of the string to buffer
+ buffer[index] = size & 0xff;
+ buffer[index + 1] = (size >> 8) & 0xff;
+ buffer[index + 2] = (size >> 16) & 0xff;
+ buffer[index + 3] = (size >> 24) & 0xff;
+ // Update index
+ index = index + 4 + size - 1;
+ // Write zero
+ buffer[index++] = 0;
+ }
+
+ return index;
+}
+
+var serializeBinary = function(buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_BINARY;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Extract the buffer
+ var data = value.value(true);
+ // Calculate size
+ var size = value.position;
+ // Add the deprecated 02 type 4 bytes of size to total
+ if(value.sub_type == Binary.SUBTYPE_BYTE_ARRAY) size = size + 4;
+ // Write the size of the string to buffer
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ // Write the subtype to the buffer
+ buffer[index++] = value.sub_type;
+
+ // If we have binary type 2 the 4 first bytes are the size
+ if(value.sub_type == Binary.SUBTYPE_BYTE_ARRAY) {
+ size = size - 4;
+ buffer[index++] = size & 0xff;
+ buffer[index++] = (size >> 8) & 0xff;
+ buffer[index++] = (size >> 16) & 0xff;
+ buffer[index++] = (size >> 24) & 0xff;
+ }
+
+ // Write the data to the object
+ data.copy(buffer, index, 0, value.position);
+ // Adjust the index
+ index = index + value.position;
+ return index;
+}
+
+var serializeSymbol = function(buffer, key, value, index, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_SYMBOL;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+ // Write the string
+ var size = buffer.write(value.value, index + 4, 'utf8') + 1;
+ // Write the size of the string to buffer
+ buffer[index] = size & 0xff;
+ buffer[index + 1] = (size >> 8) & 0xff;
+ buffer[index + 2] = (size >> 16) & 0xff;
+ buffer[index + 3] = (size >> 24) & 0xff;
+ // Update index
+ index = index + 4 + size - 1;
+ // Write zero
+ buffer[index++] = 0x00;
+ return index;
+}
+
+var serializeDBRef = function(buffer, key, value, index, depth, serializeFunctions, isArray) {
+ // Write the type
+ buffer[index++] = BSON.BSON_DATA_OBJECT;
+ // Number of written bytes
+ var numberOfWrittenBytes = !isArray ? buffer.write(key, index, 'utf8') : buffer.write(key, index, 'ascii');
+
+ // Encode the name
+ index = index + numberOfWrittenBytes;
+ buffer[index++] = 0;
+
+ var startIndex = index;
+ var endIndex;
+
+ // Serialize object
+ if(null != value.db) {
+ endIndex = serializeInto(buffer, {
+ '$ref': value.namespace
+ , '$id' : value.oid
+ , '$db' : value.db
+ }, false, index, depth + 1, serializeFunctions);
+ } else {
+ endIndex = serializeInto(buffer, {
+ '$ref': value.namespace
+ , '$id' : value.oid
+ }, false, index, depth + 1, serializeFunctions);
+ }
+
+ // Calculate object size
+ var size = endIndex - startIndex;
+ // Write the size
+ buffer[startIndex++] = size & 0xff;
+ buffer[startIndex++] = (size >> 8) & 0xff;
+ buffer[startIndex++] = (size >> 16) & 0xff;
+ buffer[startIndex++] = (size >> 24) & 0xff;
+ // Set index
+ return endIndex;
+}
+
+var serializeInto = function serializeInto(buffer, object, checkKeys, startingIndex, depth, serializeFunctions, ignoreUndefined, path) {
+ startingIndex = startingIndex || 0;
+ path = path || [];
+
+ // Push the object to the path
+ path.push(object);
+
+ // Start place to serialize into
+ var index = startingIndex + 4;
+ var self = this;
+
+ // Special case isArray
+ if(Array.isArray(object)) {
+ // Get object keys
+ for(var i = 0; i < object.length; i++) {
+ var key = "" + i;
+ var value = object[i];
+
+ // Is there an override value
+ if(value && value.toBSON) {
+ if(typeof value.toBSON != 'function') throw new Error("toBSON is not a function");
+ value = value.toBSON();
+ }
+
+ var type = typeof value;
+ if(type == 'string') {
+ index = serializeString(buffer, key, value, index, true);
+ } else if(type == 'number') {
+ index = serializeNumber(buffer, key, value, index, true);
+ } else if(type == 'boolean') {
+ index = serializeBoolean(buffer, key, value, index, true);
+ } else if(value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index, true);
+ } else if(type == 'undefined' || value == null) {
+ index = serializeUndefined(buffer, key, value, index, true);
+ } else if(value['_bsontype'] == 'ObjectID') {
+ index = serializeObjectId(buffer, key, value, index, true);
+ } else if(Buffer.isBuffer(value)) {
+ index = serializeBuffer(buffer, key, value, index, true);
+ } else if(value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index, true);
+ } else if(type == 'object' && value['_bsontype'] == null) {
+ index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, true, path);
+ } else if(type == 'object' && value['_bsontype'] == 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index, true);
+ } else if(value['_bsontype'] == 'Long' || value['_bsontype'] == 'Timestamp') {
+ index = serializeLong(buffer, key, value, index, true);
+ } else if(value['_bsontype'] == 'Double') {
+ index = serializeDouble(buffer, key, value, index, true);
+ } else if(typeof value == 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index, checkKeys, depth, serializeFunctions, true);
+ } else if(value['_bsontype'] == 'Code') {
+ index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, true);
+ } else if(value['_bsontype'] == 'Binary') {
+ index = serializeBinary(buffer, key, value, index, true);
+ } else if(value['_bsontype'] == 'Symbol') {
+ index = serializeSymbol(buffer, key, value, index, true);
+ } else if(value['_bsontype'] == 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions, true);
+ } else if(value['_bsontype'] == 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index, true);
+ } else if(value['_bsontype'] == 'Int32') {
+ index = serializeInt32(buffer, key, value, index, true);
+ } else if(value['_bsontype'] == 'MinKey' || value['_bsontype'] == 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index, true);
+ }
+ }
+ } else if(object instanceof Map) {
+ var iterator = object.entries();
+ var done = false;
+
+ while(!done) {
+ // Unpack the next entry
+ var entry = iterator.next();
+ done = entry.done;
+ // Are we done, then skip and terminate
+ if(done) continue;
+
+ // Get the entry values
+ var key = entry.value[0];
+ var value = entry.value[1];
+
+ // Check the type of the value
+ var type = typeof value;
+
+ // Check the key and throw error if it's illegal
+ if(key != '$db' && key != '$ref' && key != '$id') {
+ if (key.match(regexp) != null) {
+ // The BSON spec doesn't allow keys with null bytes because keys are
+ // null-terminated.
+ throw Error("key " + key + " must not contain null bytes");
+ }
+
+ if (checkKeys) {
+ if('$' == key[0]) {
+ throw Error("key " + key + " must not start with '$'");
+ } else if (!!~key.indexOf('.')) {
+ throw Error("key " + key + " must not contain '.'");
+ }
+ }
+ }
+
+ if(type == 'string') {
+ index = serializeString(buffer, key, value, index);
+ } else if(type == 'number') {
+ index = serializeNumber(buffer, key, value, index);
+ } else if(type == 'boolean') {
+ index = serializeBoolean(buffer, key, value, index);
+ } else if(value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index);
+ } else if(value === undefined && ignoreUndefined == true) {
+ } else if(value === null || value === undefined) {
+ index = serializeUndefined(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'ObjectID') {
+ index = serializeObjectId(buffer, key, value, index);
+ } else if(Buffer.isBuffer(value)) {
+ index = serializeBuffer(buffer, key, value, index);
+ } else if(value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index);
+ } else if(type == 'object' && value['_bsontype'] == null) {
+ index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, false, path);
+ } else if(type == 'object' && value['_bsontype'] == 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'Long' || value['_bsontype'] == 'Timestamp') {
+ index = serializeLong(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'Double') {
+ index = serializeDouble(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'Code') {
+ index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined);
+ } else if(typeof value == 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index, checkKeys, depth, serializeFunctions);
+ } else if(value['_bsontype'] == 'Binary') {
+ index = serializeBinary(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'Symbol') {
+ index = serializeSymbol(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions);
+ } else if(value['_bsontype'] == 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'Int32') {
+ index = serializeInt32(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'MinKey' || value['_bsontype'] == 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index);
+ }
+ }
+ } else {
+ // Did we provide a custom serialization method
+ if(object.toBSON) {
+ if(typeof object.toBSON != 'function') throw new Error("toBSON is not a function");
+ object = object.toBSON();
+ if(object != null && typeof object != 'object') throw new Error("toBSON function did not return an object");
+ }
+
+ // Iterate over all the keys
+ for(var key in object) {
+ var value = object[key];
+ // Is there an override value
+ if(value && value.toBSON) {
+ if(typeof value.toBSON != 'function') throw new Error("toBSON is not a function");
+ value = value.toBSON();
+ }
+
+ // Check the type of the value
+ var type = typeof value;
+
+ // Check the key and throw error if it's illegal
+ if(key != '$db' && key != '$ref' && key != '$id') {
+ if (key.match(regexp) != null) {
+ // The BSON spec doesn't allow keys with null bytes because keys are
+ // null-terminated.
+ throw Error("key " + key + " must not contain null bytes");
+ }
+
+ if (checkKeys) {
+ if('$' == key[0]) {
+ throw Error("key " + key + " must not start with '$'");
+ } else if (!!~key.indexOf('.')) {
+ throw Error("key " + key + " must not contain '.'");
+ }
+ }
+ }
+
+ if(type == 'string') {
+ index = serializeString(buffer, key, value, index);
+ } else if(type == 'number') {
+ index = serializeNumber(buffer, key, value, index);
+ } else if(type == 'boolean') {
+ index = serializeBoolean(buffer, key, value, index);
+ } else if(value instanceof Date || isDate(value)) {
+ index = serializeDate(buffer, key, value, index);
+ } else if(value === undefined && ignoreUndefined == true) {
+ } else if(value === null || value === undefined) {
+ index = serializeUndefined(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'ObjectID') {
+ index = serializeObjectId(buffer, key, value, index);
+ } else if(Buffer.isBuffer(value)) {
+ index = serializeBuffer(buffer, key, value, index);
+ } else if(value instanceof RegExp || isRegExp(value)) {
+ index = serializeRegExp(buffer, key, value, index);
+ } else if(type == 'object' && value['_bsontype'] == null) {
+ index = serializeObject(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined, false, path);
+ } else if(type == 'object' && value['_bsontype'] == 'Decimal128') {
+ index = serializeDecimal128(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'Long' || value['_bsontype'] == 'Timestamp') {
+ index = serializeLong(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'Double') {
+ index = serializeDouble(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'Code') {
+ index = serializeCode(buffer, key, value, index, checkKeys, depth, serializeFunctions, ignoreUndefined);
+ } else if(typeof value == 'function' && serializeFunctions) {
+ index = serializeFunction(buffer, key, value, index, checkKeys, depth, serializeFunctions);
+ } else if(value['_bsontype'] == 'Binary') {
+ index = serializeBinary(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'Symbol') {
+ index = serializeSymbol(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'DBRef') {
+ index = serializeDBRef(buffer, key, value, index, depth, serializeFunctions);
+ } else if(value['_bsontype'] == 'BSONRegExp') {
+ index = serializeBSONRegExp(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'Int32') {
+ index = serializeInt32(buffer, key, value, index);
+ } else if(value['_bsontype'] == 'MinKey' || value['_bsontype'] == 'MaxKey') {
+ index = serializeMinMax(buffer, key, value, index);
+ }
+ }
+ }
+
+ // Remove the path
+ path.pop();
+
+ // Final padding byte for object
+ buffer[index++] = 0x00;
+
+ // Final size
+ var size = index - startingIndex;
+ // Write the size of the object
+ buffer[startingIndex++] = size & 0xff;
+ buffer[startingIndex++] = (size >> 8) & 0xff;
+ buffer[startingIndex++] = (size >> 16) & 0xff;
+ buffer[startingIndex++] = (size >> 24) & 0xff;
+ return index;
+}
+
+var BSON = {};
+
+/**
+ * Contains the function cache if we have that enable to allow for avoiding the eval step on each deserialization, comparison is by md5
+ *
+ * @ignore
+ * @api private
+ */
+var functionCache = BSON.functionCache = {};
+
+/**
+ * Number BSON Type
+ *
+ * @classconstant BSON_DATA_NUMBER
+ **/
+BSON.BSON_DATA_NUMBER = 1;
+/**
+ * String BSON Type
+ *
+ * @classconstant BSON_DATA_STRING
+ **/
+BSON.BSON_DATA_STRING = 2;
+/**
+ * Object BSON Type
+ *
+ * @classconstant BSON_DATA_OBJECT
+ **/
+BSON.BSON_DATA_OBJECT = 3;
+/**
+ * Array BSON Type
+ *
+ * @classconstant BSON_DATA_ARRAY
+ **/
+BSON.BSON_DATA_ARRAY = 4;
+/**
+ * Binary BSON Type
+ *
+ * @classconstant BSON_DATA_BINARY
+ **/
+BSON.BSON_DATA_BINARY = 5;
+/**
+ * ObjectID BSON Type, deprecated
+ *
+ * @classconstant BSON_DATA_UNDEFINED
+ **/
+BSON.BSON_DATA_UNDEFINED = 6;
+/**
+ * ObjectID BSON Type
+ *
+ * @classconstant BSON_DATA_OID
+ **/
+BSON.BSON_DATA_OID = 7;
+/**
+ * Boolean BSON Type
+ *
+ * @classconstant BSON_DATA_BOOLEAN
+ **/
+BSON.BSON_DATA_BOOLEAN = 8;
+/**
+ * Date BSON Type
+ *
+ * @classconstant BSON_DATA_DATE
+ **/
+BSON.BSON_DATA_DATE = 9;
+/**
+ * null BSON Type
+ *
+ * @classconstant BSON_DATA_NULL
+ **/
+BSON.BSON_DATA_NULL = 10;
+/**
+ * RegExp BSON Type
+ *
+ * @classconstant BSON_DATA_REGEXP
+ **/
+BSON.BSON_DATA_REGEXP = 11;
+/**
+ * Code BSON Type
+ *
+ * @classconstant BSON_DATA_CODE
+ **/
+BSON.BSON_DATA_CODE = 13;
+/**
+ * Symbol BSON Type
+ *
+ * @classconstant BSON_DATA_SYMBOL
+ **/
+BSON.BSON_DATA_SYMBOL = 14;
+/**
+ * Code with Scope BSON Type
+ *
+ * @classconstant BSON_DATA_CODE_W_SCOPE
+ **/
+BSON.BSON_DATA_CODE_W_SCOPE = 15;
+/**
+ * 32 bit Integer BSON Type
+ *
+ * @classconstant BSON_DATA_INT
+ **/
+BSON.BSON_DATA_INT = 16;
+/**
+ * Timestamp BSON Type
+ *
+ * @classconstant BSON_DATA_TIMESTAMP
+ **/
+BSON.BSON_DATA_TIMESTAMP = 17;
+/**
+ * Long BSON Type
+ *
+ * @classconstant BSON_DATA_LONG
+ **/
+BSON.BSON_DATA_LONG = 18;
+/**
+ * Long BSON Type
+ *
+ * @classconstant BSON_DATA_DECIMAL128
+ **/
+BSON.BSON_DATA_DECIMAL128 = 19;
+/**
+ * MinKey BSON Type
+ *
+ * @classconstant BSON_DATA_MIN_KEY
+ **/
+BSON.BSON_DATA_MIN_KEY = 0xff;
+/**
+ * MaxKey BSON Type
+ *
+ * @classconstant BSON_DATA_MAX_KEY
+ **/
+BSON.BSON_DATA_MAX_KEY = 0x7f;
+/**
+ * Binary Default Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_DEFAULT
+ **/
+BSON.BSON_BINARY_SUBTYPE_DEFAULT = 0;
+/**
+ * Binary Function Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_FUNCTION
+ **/
+BSON.BSON_BINARY_SUBTYPE_FUNCTION = 1;
+/**
+ * Binary Byte Array Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_BYTE_ARRAY
+ **/
+BSON.BSON_BINARY_SUBTYPE_BYTE_ARRAY = 2;
+/**
+ * Binary UUID Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_UUID
+ **/
+BSON.BSON_BINARY_SUBTYPE_UUID = 3;
+/**
+ * Binary MD5 Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_MD5
+ **/
+BSON.BSON_BINARY_SUBTYPE_MD5 = 4;
+/**
+ * Binary User Defined Type
+ *
+ * @classconstant BSON_BINARY_SUBTYPE_USER_DEFINED
+ **/
+BSON.BSON_BINARY_SUBTYPE_USER_DEFINED = 128;
+
+// BSON MAX VALUES
+BSON.BSON_INT32_MAX = 0x7FFFFFFF;
+BSON.BSON_INT32_MIN = -0x80000000;
+
+BSON.BSON_INT64_MAX = Math.pow(2, 63) - 1;
+BSON.BSON_INT64_MIN = -Math.pow(2, 63);
+
+// JS MAX PRECISE VALUES
+BSON.JS_INT_MAX = 0x20000000000000; // Any integer up to 2^53 can be precisely represented by a double.
+BSON.JS_INT_MIN = -0x20000000000000; // Any integer down to -2^53 can be precisely represented by a double.
+
+// Internal long versions
+var JS_INT_MAX_LONG = Long.fromNumber(0x20000000000000); // Any integer up to 2^53 can be precisely represented by a double.
+var JS_INT_MIN_LONG = Long.fromNumber(-0x20000000000000); // Any integer down to -2^53 can be precisely represented by a double.
+
+module.exports = serializeInto;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/regexp.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/regexp.js
new file mode 100644
index 0000000..6b148b2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/regexp.js
@@ -0,0 +1,30 @@
+/**
+ * A class representation of the BSON RegExp type.
+ *
+ * @class
+ * @return {BSONRegExp} A MinKey instance
+ */
+function BSONRegExp(pattern, options) {
+ if(!(this instanceof BSONRegExp)) return new BSONRegExp();
+
+ // Execute
+ this._bsontype = 'BSONRegExp';
+ this.pattern = pattern;
+ this.options = options;
+
+ // Validate options
+ for(var i = 0; i < options.length; i++) {
+ if(!(this.options[i] == 'i'
+ || this.options[i] == 'm'
+ || this.options[i] == 'x'
+ || this.options[i] == 'l'
+ || this.options[i] == 's'
+ || this.options[i] == 'u'
+ )) {
+ throw new Error('the regular expression options [' + this.options[i] + "] is not supported");
+ }
+ }
+}
+
+module.exports = BSONRegExp;
+module.exports.BSONRegExp = BSONRegExp; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/symbol.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/symbol.js
new file mode 100644
index 0000000..7681a4d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/symbol.js
@@ -0,0 +1,47 @@
+/**
+ * A class representation of the BSON Symbol type.
+ *
+ * @class
+ * @deprecated
+ * @param {string} value the string representing the symbol.
+ * @return {Symbol}
+ */
+function Symbol(value) {
+ if(!(this instanceof Symbol)) return new Symbol(value);
+ this._bsontype = 'Symbol';
+ this.value = value;
+}
+
+/**
+ * Access the wrapped string value.
+ *
+ * @method
+ * @return {String} returns the wrapped string.
+ */
+Symbol.prototype.valueOf = function() {
+ return this.value;
+};
+
+/**
+ * @ignore
+ */
+Symbol.prototype.toString = function() {
+ return this.value;
+}
+
+/**
+ * @ignore
+ */
+Symbol.prototype.inspect = function() {
+ return this.value;
+}
+
+/**
+ * @ignore
+ */
+Symbol.prototype.toJSON = function() {
+ return this.value;
+}
+
+module.exports = Symbol;
+module.exports.Symbol = Symbol; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/timestamp.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/timestamp.js
new file mode 100644
index 0000000..7718caf
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/lib/bson/timestamp.js
@@ -0,0 +1,856 @@
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Copyright 2009 Google Inc. All Rights Reserved
+
+/**
+ * This type is for INTERNAL use in MongoDB only and should not be used in applications.
+ * The appropriate corresponding type is the JavaScript Date type.
+ *
+ * Defines a Timestamp class for representing a 64-bit two's-complement
+ * integer value, which faithfully simulates the behavior of a Java "Timestamp". This
+ * implementation is derived from TimestampLib in GWT.
+ *
+ * Constructs a 64-bit two's-complement integer, given its low and high 32-bit
+ * values as *signed* integers. See the from* functions below for more
+ * convenient ways of constructing Timestamps.
+ *
+ * The internal representation of a Timestamp is the two given signed, 32-bit values.
+ * We use 32-bit pieces because these are the size of integers on which
+ * Javascript performs bit-operations. For operations like addition and
+ * multiplication, we split each number into 16-bit pieces, which can easily be
+ * multiplied within Javascript's floating-point representation without overflow
+ * or change in sign.
+ *
+ * In the algorithms below, we frequently reduce the negative case to the
+ * positive case by negating the input(s) and then post-processing the result.
+ * Note that we must ALWAYS check specially whether those values are MIN_VALUE
+ * (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as
+ * a positive number, it overflows back into a negative). Not handling this
+ * case would often result in infinite recursion.
+ *
+ * @class
+ * @param {number} low the low (signed) 32 bits of the Timestamp.
+ * @param {number} high the high (signed) 32 bits of the Timestamp.
+ */
+function Timestamp(low, high) {
+ if(!(this instanceof Timestamp)) return new Timestamp(low, high);
+ this._bsontype = 'Timestamp';
+ /**
+ * @type {number}
+ * @ignore
+ */
+ this.low_ = low | 0; // force into 32 signed bits.
+
+ /**
+ * @type {number}
+ * @ignore
+ */
+ this.high_ = high | 0; // force into 32 signed bits.
+};
+
+/**
+ * Return the int value.
+ *
+ * @return {number} the value, assuming it is a 32-bit integer.
+ */
+Timestamp.prototype.toInt = function() {
+ return this.low_;
+};
+
+/**
+ * Return the Number value.
+ *
+ * @method
+ * @return {number} the closest floating-point representation to this value.
+ */
+Timestamp.prototype.toNumber = function() {
+ return this.high_ * Timestamp.TWO_PWR_32_DBL_ +
+ this.getLowBitsUnsigned();
+};
+
+/**
+ * Return the JSON value.
+ *
+ * @method
+ * @return {string} the JSON representation.
+ */
+Timestamp.prototype.toJSON = function() {
+ return this.toString();
+}
+
+/**
+ * Return the String value.
+ *
+ * @method
+ * @param {number} [opt_radix] the radix in which the text should be written.
+ * @return {string} the textual representation of this value.
+ */
+Timestamp.prototype.toString = function(opt_radix) {
+ var radix = opt_radix || 10;
+ if (radix < 2 || 36 < radix) {
+ throw Error('radix out of range: ' + radix);
+ }
+
+ if (this.isZero()) {
+ return '0';
+ }
+
+ if (this.isNegative()) {
+ if (this.equals(Timestamp.MIN_VALUE)) {
+ // We need to change the Timestamp value before it can be negated, so we remove
+ // the bottom-most digit in this base and then recurse to do the rest.
+ var radixTimestamp = Timestamp.fromNumber(radix);
+ var div = this.div(radixTimestamp);
+ var rem = div.multiply(radixTimestamp).subtract(this);
+ return div.toString(radix) + rem.toInt().toString(radix);
+ } else {
+ return '-' + this.negate().toString(radix);
+ }
+ }
+
+ // Do several (6) digits each time through the loop, so as to
+ // minimize the calls to the very expensive emulated div.
+ var radixToPower = Timestamp.fromNumber(Math.pow(radix, 6));
+
+ var rem = this;
+ var result = '';
+ while (true) {
+ var remDiv = rem.div(radixToPower);
+ var intval = rem.subtract(remDiv.multiply(radixToPower)).toInt();
+ var digits = intval.toString(radix);
+
+ rem = remDiv;
+ if (rem.isZero()) {
+ return digits + result;
+ } else {
+ while (digits.length < 6) {
+ digits = '0' + digits;
+ }
+ result = '' + digits + result;
+ }
+ }
+};
+
+/**
+ * Return the high 32-bits value.
+ *
+ * @method
+ * @return {number} the high 32-bits as a signed value.
+ */
+Timestamp.prototype.getHighBits = function() {
+ return this.high_;
+};
+
+/**
+ * Return the low 32-bits value.
+ *
+ * @method
+ * @return {number} the low 32-bits as a signed value.
+ */
+Timestamp.prototype.getLowBits = function() {
+ return this.low_;
+};
+
+/**
+ * Return the low unsigned 32-bits value.
+ *
+ * @method
+ * @return {number} the low 32-bits as an unsigned value.
+ */
+Timestamp.prototype.getLowBitsUnsigned = function() {
+ return (this.low_ >= 0) ?
+ this.low_ : Timestamp.TWO_PWR_32_DBL_ + this.low_;
+};
+
+/**
+ * Returns the number of bits needed to represent the absolute value of this Timestamp.
+ *
+ * @method
+ * @return {number} Returns the number of bits needed to represent the absolute value of this Timestamp.
+ */
+Timestamp.prototype.getNumBitsAbs = function() {
+ if (this.isNegative()) {
+ if (this.equals(Timestamp.MIN_VALUE)) {
+ return 64;
+ } else {
+ return this.negate().getNumBitsAbs();
+ }
+ } else {
+ var val = this.high_ != 0 ? this.high_ : this.low_;
+ for (var bit = 31; bit > 0; bit--) {
+ if ((val & (1 << bit)) != 0) {
+ break;
+ }
+ }
+ return this.high_ != 0 ? bit + 33 : bit + 1;
+ }
+};
+
+/**
+ * Return whether this value is zero.
+ *
+ * @method
+ * @return {boolean} whether this value is zero.
+ */
+Timestamp.prototype.isZero = function() {
+ return this.high_ == 0 && this.low_ == 0;
+};
+
+/**
+ * Return whether this value is negative.
+ *
+ * @method
+ * @return {boolean} whether this value is negative.
+ */
+Timestamp.prototype.isNegative = function() {
+ return this.high_ < 0;
+};
+
+/**
+ * Return whether this value is odd.
+ *
+ * @method
+ * @return {boolean} whether this value is odd.
+ */
+Timestamp.prototype.isOdd = function() {
+ return (this.low_ & 1) == 1;
+};
+
+/**
+ * Return whether this Timestamp equals the other
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {boolean} whether this Timestamp equals the other
+ */
+Timestamp.prototype.equals = function(other) {
+ return (this.high_ == other.high_) && (this.low_ == other.low_);
+};
+
+/**
+ * Return whether this Timestamp does not equal the other.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {boolean} whether this Timestamp does not equal the other.
+ */
+Timestamp.prototype.notEquals = function(other) {
+ return (this.high_ != other.high_) || (this.low_ != other.low_);
+};
+
+/**
+ * Return whether this Timestamp is less than the other.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {boolean} whether this Timestamp is less than the other.
+ */
+Timestamp.prototype.lessThan = function(other) {
+ return this.compare(other) < 0;
+};
+
+/**
+ * Return whether this Timestamp is less than or equal to the other.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {boolean} whether this Timestamp is less than or equal to the other.
+ */
+Timestamp.prototype.lessThanOrEqual = function(other) {
+ return this.compare(other) <= 0;
+};
+
+/**
+ * Return whether this Timestamp is greater than the other.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {boolean} whether this Timestamp is greater than the other.
+ */
+Timestamp.prototype.greaterThan = function(other) {
+ return this.compare(other) > 0;
+};
+
+/**
+ * Return whether this Timestamp is greater than or equal to the other.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {boolean} whether this Timestamp is greater than or equal to the other.
+ */
+Timestamp.prototype.greaterThanOrEqual = function(other) {
+ return this.compare(other) >= 0;
+};
+
+/**
+ * Compares this Timestamp with the given one.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to compare against.
+ * @return {boolean} 0 if they are the same, 1 if the this is greater, and -1 if the given one is greater.
+ */
+Timestamp.prototype.compare = function(other) {
+ if (this.equals(other)) {
+ return 0;
+ }
+
+ var thisNeg = this.isNegative();
+ var otherNeg = other.isNegative();
+ if (thisNeg && !otherNeg) {
+ return -1;
+ }
+ if (!thisNeg && otherNeg) {
+ return 1;
+ }
+
+ // at this point, the signs are the same, so subtraction will not overflow
+ if (this.subtract(other).isNegative()) {
+ return -1;
+ } else {
+ return 1;
+ }
+};
+
+/**
+ * The negation of this value.
+ *
+ * @method
+ * @return {Timestamp} the negation of this value.
+ */
+Timestamp.prototype.negate = function() {
+ if (this.equals(Timestamp.MIN_VALUE)) {
+ return Timestamp.MIN_VALUE;
+ } else {
+ return this.not().add(Timestamp.ONE);
+ }
+};
+
+/**
+ * Returns the sum of this and the given Timestamp.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to add to this one.
+ * @return {Timestamp} the sum of this and the given Timestamp.
+ */
+Timestamp.prototype.add = function(other) {
+ // Divide each number into 4 chunks of 16 bits, and then sum the chunks.
+
+ var a48 = this.high_ >>> 16;
+ var a32 = this.high_ & 0xFFFF;
+ var a16 = this.low_ >>> 16;
+ var a00 = this.low_ & 0xFFFF;
+
+ var b48 = other.high_ >>> 16;
+ var b32 = other.high_ & 0xFFFF;
+ var b16 = other.low_ >>> 16;
+ var b00 = other.low_ & 0xFFFF;
+
+ var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
+ c00 += a00 + b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xFFFF;
+ c16 += a16 + b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c32 += a32 + b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c48 += a48 + b48;
+ c48 &= 0xFFFF;
+ return Timestamp.fromBits((c16 << 16) | c00, (c48 << 16) | c32);
+};
+
+/**
+ * Returns the difference of this and the given Timestamp.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to subtract from this.
+ * @return {Timestamp} the difference of this and the given Timestamp.
+ */
+Timestamp.prototype.subtract = function(other) {
+ return this.add(other.negate());
+};
+
+/**
+ * Returns the product of this and the given Timestamp.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp to multiply with this.
+ * @return {Timestamp} the product of this and the other.
+ */
+Timestamp.prototype.multiply = function(other) {
+ if (this.isZero()) {
+ return Timestamp.ZERO;
+ } else if (other.isZero()) {
+ return Timestamp.ZERO;
+ }
+
+ if (this.equals(Timestamp.MIN_VALUE)) {
+ return other.isOdd() ? Timestamp.MIN_VALUE : Timestamp.ZERO;
+ } else if (other.equals(Timestamp.MIN_VALUE)) {
+ return this.isOdd() ? Timestamp.MIN_VALUE : Timestamp.ZERO;
+ }
+
+ if (this.isNegative()) {
+ if (other.isNegative()) {
+ return this.negate().multiply(other.negate());
+ } else {
+ return this.negate().multiply(other).negate();
+ }
+ } else if (other.isNegative()) {
+ return this.multiply(other.negate()).negate();
+ }
+
+ // If both Timestamps are small, use float multiplication
+ if (this.lessThan(Timestamp.TWO_PWR_24_) &&
+ other.lessThan(Timestamp.TWO_PWR_24_)) {
+ return Timestamp.fromNumber(this.toNumber() * other.toNumber());
+ }
+
+ // Divide each Timestamp into 4 chunks of 16 bits, and then add up 4x4 products.
+ // We can skip products that would overflow.
+
+ var a48 = this.high_ >>> 16;
+ var a32 = this.high_ & 0xFFFF;
+ var a16 = this.low_ >>> 16;
+ var a00 = this.low_ & 0xFFFF;
+
+ var b48 = other.high_ >>> 16;
+ var b32 = other.high_ & 0xFFFF;
+ var b16 = other.low_ >>> 16;
+ var b00 = other.low_ & 0xFFFF;
+
+ var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
+ c00 += a00 * b00;
+ c16 += c00 >>> 16;
+ c00 &= 0xFFFF;
+ c16 += a16 * b00;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c16 += a00 * b16;
+ c32 += c16 >>> 16;
+ c16 &= 0xFFFF;
+ c32 += a32 * b00;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c32 += a16 * b16;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c32 += a00 * b32;
+ c48 += c32 >>> 16;
+ c32 &= 0xFFFF;
+ c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
+ c48 &= 0xFFFF;
+ return Timestamp.fromBits((c16 << 16) | c00, (c48 << 16) | c32);
+};
+
+/**
+ * Returns this Timestamp divided by the given one.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp by which to divide.
+ * @return {Timestamp} this Timestamp divided by the given one.
+ */
+Timestamp.prototype.div = function(other) {
+ if (other.isZero()) {
+ throw Error('division by zero');
+ } else if (this.isZero()) {
+ return Timestamp.ZERO;
+ }
+
+ if (this.equals(Timestamp.MIN_VALUE)) {
+ if (other.equals(Timestamp.ONE) ||
+ other.equals(Timestamp.NEG_ONE)) {
+ return Timestamp.MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE
+ } else if (other.equals(Timestamp.MIN_VALUE)) {
+ return Timestamp.ONE;
+ } else {
+ // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.
+ var halfThis = this.shiftRight(1);
+ var approx = halfThis.div(other).shiftLeft(1);
+ if (approx.equals(Timestamp.ZERO)) {
+ return other.isNegative() ? Timestamp.ONE : Timestamp.NEG_ONE;
+ } else {
+ var rem = this.subtract(other.multiply(approx));
+ var result = approx.add(rem.div(other));
+ return result;
+ }
+ }
+ } else if (other.equals(Timestamp.MIN_VALUE)) {
+ return Timestamp.ZERO;
+ }
+
+ if (this.isNegative()) {
+ if (other.isNegative()) {
+ return this.negate().div(other.negate());
+ } else {
+ return this.negate().div(other).negate();
+ }
+ } else if (other.isNegative()) {
+ return this.div(other.negate()).negate();
+ }
+
+ // Repeat the following until the remainder is less than other: find a
+ // floating-point that approximates remainder / other *from below*, add this
+ // into the result, and subtract it from the remainder. It is critical that
+ // the approximate value is less than or equal to the real value so that the
+ // remainder never becomes negative.
+ var res = Timestamp.ZERO;
+ var rem = this;
+ while (rem.greaterThanOrEqual(other)) {
+ // Approximate the result of division. This may be a little greater or
+ // smaller than the actual value.
+ var approx = Math.max(1, Math.floor(rem.toNumber() / other.toNumber()));
+
+ // We will tweak the approximate result by changing it in the 48-th digit or
+ // the smallest non-fractional digit, whichever is larger.
+ var log2 = Math.ceil(Math.log(approx) / Math.LN2);
+ var delta = (log2 <= 48) ? 1 : Math.pow(2, log2 - 48);
+
+ // Decrease the approximation until it is smaller than the remainder. Note
+ // that if it is too large, the product overflows and is negative.
+ var approxRes = Timestamp.fromNumber(approx);
+ var approxRem = approxRes.multiply(other);
+ while (approxRem.isNegative() || approxRem.greaterThan(rem)) {
+ approx -= delta;
+ approxRes = Timestamp.fromNumber(approx);
+ approxRem = approxRes.multiply(other);
+ }
+
+ // We know the answer can't be zero... and actually, zero would cause
+ // infinite recursion since we would make no progress.
+ if (approxRes.isZero()) {
+ approxRes = Timestamp.ONE;
+ }
+
+ res = res.add(approxRes);
+ rem = rem.subtract(approxRem);
+ }
+ return res;
+};
+
+/**
+ * Returns this Timestamp modulo the given one.
+ *
+ * @method
+ * @param {Timestamp} other Timestamp by which to mod.
+ * @return {Timestamp} this Timestamp modulo the given one.
+ */
+Timestamp.prototype.modulo = function(other) {
+ return this.subtract(this.div(other).multiply(other));
+};
+
+/**
+ * The bitwise-NOT of this value.
+ *
+ * @method
+ * @return {Timestamp} the bitwise-NOT of this value.
+ */
+Timestamp.prototype.not = function() {
+ return Timestamp.fromBits(~this.low_, ~this.high_);
+};
+
+/**
+ * Returns the bitwise-AND of this Timestamp and the given one.
+ *
+ * @method
+ * @param {Timestamp} other the Timestamp with which to AND.
+ * @return {Timestamp} the bitwise-AND of this and the other.
+ */
+Timestamp.prototype.and = function(other) {
+ return Timestamp.fromBits(this.low_ & other.low_, this.high_ & other.high_);
+};
+
+/**
+ * Returns the bitwise-OR of this Timestamp and the given one.
+ *
+ * @method
+ * @param {Timestamp} other the Timestamp with which to OR.
+ * @return {Timestamp} the bitwise-OR of this and the other.
+ */
+Timestamp.prototype.or = function(other) {
+ return Timestamp.fromBits(this.low_ | other.low_, this.high_ | other.high_);
+};
+
+/**
+ * Returns the bitwise-XOR of this Timestamp and the given one.
+ *
+ * @method
+ * @param {Timestamp} other the Timestamp with which to XOR.
+ * @return {Timestamp} the bitwise-XOR of this and the other.
+ */
+Timestamp.prototype.xor = function(other) {
+ return Timestamp.fromBits(this.low_ ^ other.low_, this.high_ ^ other.high_);
+};
+
+/**
+ * Returns this Timestamp with bits shifted to the left by the given amount.
+ *
+ * @method
+ * @param {number} numBits the number of bits by which to shift.
+ * @return {Timestamp} this shifted to the left by the given amount.
+ */
+Timestamp.prototype.shiftLeft = function(numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var low = this.low_;
+ if (numBits < 32) {
+ var high = this.high_;
+ return Timestamp.fromBits(
+ low << numBits,
+ (high << numBits) | (low >>> (32 - numBits)));
+ } else {
+ return Timestamp.fromBits(0, low << (numBits - 32));
+ }
+ }
+};
+
+/**
+ * Returns this Timestamp with bits shifted to the right by the given amount.
+ *
+ * @method
+ * @param {number} numBits the number of bits by which to shift.
+ * @return {Timestamp} this shifted to the right by the given amount.
+ */
+Timestamp.prototype.shiftRight = function(numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var high = this.high_;
+ if (numBits < 32) {
+ var low = this.low_;
+ return Timestamp.fromBits(
+ (low >>> numBits) | (high << (32 - numBits)),
+ high >> numBits);
+ } else {
+ return Timestamp.fromBits(
+ high >> (numBits - 32),
+ high >= 0 ? 0 : -1);
+ }
+ }
+};
+
+/**
+ * Returns this Timestamp with bits shifted to the right by the given amount, with the new top bits matching the current sign bit.
+ *
+ * @method
+ * @param {number} numBits the number of bits by which to shift.
+ * @return {Timestamp} this shifted to the right by the given amount, with zeros placed into the new leading bits.
+ */
+Timestamp.prototype.shiftRightUnsigned = function(numBits) {
+ numBits &= 63;
+ if (numBits == 0) {
+ return this;
+ } else {
+ var high = this.high_;
+ if (numBits < 32) {
+ var low = this.low_;
+ return Timestamp.fromBits(
+ (low >>> numBits) | (high << (32 - numBits)),
+ high >>> numBits);
+ } else if (numBits == 32) {
+ return Timestamp.fromBits(high, 0);
+ } else {
+ return Timestamp.fromBits(high >>> (numBits - 32), 0);
+ }
+ }
+};
+
+/**
+ * Returns a Timestamp representing the given (32-bit) integer value.
+ *
+ * @method
+ * @param {number} value the 32-bit integer in question.
+ * @return {Timestamp} the corresponding Timestamp value.
+ */
+Timestamp.fromInt = function(value) {
+ if (-128 <= value && value < 128) {
+ var cachedObj = Timestamp.INT_CACHE_[value];
+ if (cachedObj) {
+ return cachedObj;
+ }
+ }
+
+ var obj = new Timestamp(value | 0, value < 0 ? -1 : 0);
+ if (-128 <= value && value < 128) {
+ Timestamp.INT_CACHE_[value] = obj;
+ }
+ return obj;
+};
+
+/**
+ * Returns a Timestamp representing the given value, provided that it is a finite number. Otherwise, zero is returned.
+ *
+ * @method
+ * @param {number} value the number in question.
+ * @return {Timestamp} the corresponding Timestamp value.
+ */
+Timestamp.fromNumber = function(value) {
+ if (isNaN(value) || !isFinite(value)) {
+ return Timestamp.ZERO;
+ } else if (value <= -Timestamp.TWO_PWR_63_DBL_) {
+ return Timestamp.MIN_VALUE;
+ } else if (value + 1 >= Timestamp.TWO_PWR_63_DBL_) {
+ return Timestamp.MAX_VALUE;
+ } else if (value < 0) {
+ return Timestamp.fromNumber(-value).negate();
+ } else {
+ return new Timestamp(
+ (value % Timestamp.TWO_PWR_32_DBL_) | 0,
+ (value / Timestamp.TWO_PWR_32_DBL_) | 0);
+ }
+};
+
+/**
+ * Returns a Timestamp representing the 64-bit integer that comes by concatenating the given high and low bits. Each is assumed to use 32 bits.
+ *
+ * @method
+ * @param {number} lowBits the low 32-bits.
+ * @param {number} highBits the high 32-bits.
+ * @return {Timestamp} the corresponding Timestamp value.
+ */
+Timestamp.fromBits = function(lowBits, highBits) {
+ return new Timestamp(lowBits, highBits);
+};
+
+/**
+ * Returns a Timestamp representation of the given string, written using the given radix.
+ *
+ * @method
+ * @param {string} str the textual representation of the Timestamp.
+ * @param {number} opt_radix the radix in which the text is written.
+ * @return {Timestamp} the corresponding Timestamp value.
+ */
+Timestamp.fromString = function(str, opt_radix) {
+ if (str.length == 0) {
+ throw Error('number format error: empty string');
+ }
+
+ var radix = opt_radix || 10;
+ if (radix < 2 || 36 < radix) {
+ throw Error('radix out of range: ' + radix);
+ }
+
+ if (str.charAt(0) == '-') {
+ return Timestamp.fromString(str.substring(1), radix).negate();
+ } else if (str.indexOf('-') >= 0) {
+ throw Error('number format error: interior "-" character: ' + str);
+ }
+
+ // Do several (8) digits each time through the loop, so as to
+ // minimize the calls to the very expensive emulated div.
+ var radixToPower = Timestamp.fromNumber(Math.pow(radix, 8));
+
+ var result = Timestamp.ZERO;
+ for (var i = 0; i < str.length; i += 8) {
+ var size = Math.min(8, str.length - i);
+ var value = parseInt(str.substring(i, i + size), radix);
+ if (size < 8) {
+ var power = Timestamp.fromNumber(Math.pow(radix, size));
+ result = result.multiply(power).add(Timestamp.fromNumber(value));
+ } else {
+ result = result.multiply(radixToPower);
+ result = result.add(Timestamp.fromNumber(value));
+ }
+ }
+ return result;
+};
+
+// NOTE: Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the
+// from* methods on which they depend.
+
+
+/**
+ * A cache of the Timestamp representations of small integer values.
+ * @type {Object}
+ * @ignore
+ */
+Timestamp.INT_CACHE_ = {};
+
+// NOTE: the compiler should inline these constant values below and then remove
+// these variables, so there should be no runtime penalty for these.
+
+/**
+ * Number used repeated below in calculations. This must appear before the
+ * first call to any from* function below.
+ * @type {number}
+ * @ignore
+ */
+Timestamp.TWO_PWR_16_DBL_ = 1 << 16;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Timestamp.TWO_PWR_24_DBL_ = 1 << 24;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Timestamp.TWO_PWR_32_DBL_ = Timestamp.TWO_PWR_16_DBL_ * Timestamp.TWO_PWR_16_DBL_;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Timestamp.TWO_PWR_31_DBL_ = Timestamp.TWO_PWR_32_DBL_ / 2;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Timestamp.TWO_PWR_48_DBL_ = Timestamp.TWO_PWR_32_DBL_ * Timestamp.TWO_PWR_16_DBL_;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Timestamp.TWO_PWR_64_DBL_ = Timestamp.TWO_PWR_32_DBL_ * Timestamp.TWO_PWR_32_DBL_;
+
+/**
+ * @type {number}
+ * @ignore
+ */
+Timestamp.TWO_PWR_63_DBL_ = Timestamp.TWO_PWR_64_DBL_ / 2;
+
+/** @type {Timestamp} */
+Timestamp.ZERO = Timestamp.fromInt(0);
+
+/** @type {Timestamp} */
+Timestamp.ONE = Timestamp.fromInt(1);
+
+/** @type {Timestamp} */
+Timestamp.NEG_ONE = Timestamp.fromInt(-1);
+
+/** @type {Timestamp} */
+Timestamp.MAX_VALUE =
+ Timestamp.fromBits(0xFFFFFFFF | 0, 0x7FFFFFFF | 0);
+
+/** @type {Timestamp} */
+Timestamp.MIN_VALUE = Timestamp.fromBits(0, 0x80000000 | 0);
+
+/**
+ * @type {Timestamp}
+ * @ignore
+ */
+Timestamp.TWO_PWR_24_ = Timestamp.fromInt(1 << 24);
+
+/**
+ * Expose.
+ */
+module.exports = Timestamp;
+module.exports.Timestamp = Timestamp; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/package.json
new file mode 100644
index 0000000..85c3813
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/package.json
@@ -0,0 +1,81 @@
+{
+ "name": "bson",
+ "description": "A bson parser for node.js and the browser",
+ "keywords": [
+ "mongodb",
+ "bson",
+ "parser"
+ ],
+ "files": [
+ "lib",
+ "browser_build",
+ "alternate_parsers",
+ "bower.json",
+ "tools",
+ "deserializer_bak.js"
+ ],
+ "version": "0.5.7",
+ "author": {
+ "name": "Christian Amor Kvalheim",
+ "email": "christkv@gmail.com"
+ },
+ "contributors": [],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mongodb/js-bson.git"
+ },
+ "bugs": {
+ "url": "https://github.com/mongodb/js-bson/issues"
+ },
+ "devDependencies": {
+ "benchmark": "1.0.0",
+ "colors": "1.1.0",
+ "gleak": "0.2.3",
+ "nodeunit": "0.9.0"
+ },
+ "config": {
+ "native": false
+ },
+ "main": "./lib/bson/index",
+ "directories": {
+ "lib": "./lib/bson"
+ },
+ "engines": {
+ "node": ">=0.6.19"
+ },
+ "scripts": {
+ "test": "nodeunit ./test/node"
+ },
+ "browser": "lib/bson/bson.js",
+ "license": "Apache-2.0",
+ "gitHead": "c3bc67c4e89e795beca2d6d309e7a840b740574d",
+ "homepage": "https://github.com/mongodb/js-bson#readme",
+ "_id": "bson@0.5.7",
+ "_shasum": "0d11fe0936c1fee029e11f7063f5d0ab2422ea3e",
+ "_from": "bson@>=0.5.4 <0.6.0",
+ "_npmVersion": "3.10.8",
+ "_nodeVersion": "6.9.1",
+ "_npmUser": {
+ "name": "christkv",
+ "email": "christkv@gmail.com"
+ },
+ "dist": {
+ "shasum": "0d11fe0936c1fee029e11f7063f5d0ab2422ea3e",
+ "tarball": "https://registry.npmjs.org/bson/-/bson-0.5.7.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "octave",
+ "email": "chinsay@gmail.com"
+ },
+ {
+ "name": "christkv",
+ "email": "christkv@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-18-east.internal.npmjs.com",
+ "tmp": "tmp/bson-0.5.7.tgz_1479477418380_0.5046395626850426"
+ },
+ "_resolved": "https://registry.npmjs.org/bson/-/bson-0.5.7.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/tools/gleak.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/tools/gleak.js
new file mode 100644
index 0000000..c707cfc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/bson/tools/gleak.js
@@ -0,0 +1,21 @@
+
+var gleak = require('gleak')();
+gleak.ignore('AssertionError');
+gleak.ignore('testFullSpec_param_found');
+gleak.ignore('events');
+gleak.ignore('Uint8Array');
+gleak.ignore('Uint8ClampedArray');
+gleak.ignore('TAP_Global_Harness');
+gleak.ignore('setImmediate');
+gleak.ignore('clearImmediate');
+
+gleak.ignore('DTRACE_NET_SERVER_CONNECTION');
+gleak.ignore('DTRACE_NET_STREAM_END');
+gleak.ignore('DTRACE_NET_SOCKET_READ');
+gleak.ignore('DTRACE_NET_SOCKET_WRITE');
+gleak.ignore('DTRACE_HTTP_SERVER_REQUEST');
+gleak.ignore('DTRACE_HTTP_SERVER_RESPONSE');
+gleak.ignore('DTRACE_HTTP_CLIENT_REQUEST');
+gleak.ignore('DTRACE_HTTP_CLIENT_RESPONSE');
+
+module.exports = gleak;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/.npmignore
new file mode 100644
index 0000000..96e29a8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/.npmignore
@@ -0,0 +1,2 @@
+**.swp
+node_modules
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/Makefile b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/Makefile
new file mode 100644
index 0000000..1db5d65
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/Makefile
@@ -0,0 +1,9 @@
+test:
+ @NODE_ENV=test ./node_modules/expresso/bin/expresso \
+ $(TESTFLAGS) \
+ ./test.js
+
+test-cov:
+ @TESTFLAGS=--cov $(MAKE) test
+
+.PHONY: test test-cov
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/README.md
new file mode 100644
index 0000000..98fe85b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/README.md
@@ -0,0 +1,369 @@
+hooks
+============
+
+Add pre and post middleware hooks to your JavaScript methods.
+
+## Installation
+ npm install hooks
+
+## Motivation
+Suppose you have a JavaScript object with a `save` method.
+
+It would be nice to be able to declare code that runs before `save` and after `save`.
+For example, you might want to run validation code before every `save`,
+and you might want to dispatch a job to a background job queue after `save`.
+
+One might have an urge to hard code this all into `save`, but that turns out to
+couple all these pieces of functionality (validation, save, and job creation) more
+tightly than is necessary. For example, what if someone does not want to do background
+job creation after the logical save?
+
+It is nicer to tack on functionality using what we call `pre` and `post` hooks. These
+are functions that you define and that you direct to execute before or after particular
+methods.
+
+## Example
+We can use `hooks` to add validation and background jobs in the following way:
+
+```javascript
+var hooks = require('hooks')
+ , Document = require('./path/to/some/document/constructor');
+
+// Add hooks' methods: `hook`, `pre`, and `post`
+for (var k in hooks) {
+ Document[k] = hooks[k];
+}
+
+// Define a new method that is able to invoke pre and post middleware
+Document.hook('save', Document.prototype.save);
+
+// Define a middleware function to be invoked before 'save'
+Document.pre('save', function validate (next) {
+ // The `this` context inside of `pre` and `post` functions
+ // is the Document instance
+ if (this.isValid()) next(); // next() passes control to the next middleware
+ // or to the target method itself
+ else next(new Error("Invalid")); // next(error) invokes an error callback
+});
+
+// Define a middleware function to be invoked after 'save'
+Document.post('save', function createJob (next) {
+ this.sendToBackgroundQueue();
+ next();
+});
+```
+
+If you already have defined `Document.prototype` methods for which you want pres and posts,
+then you do not need to explicitly invoke `Document.hook(...)`. Invoking `Document.pre(methodName, fn)`
+or `Document.post(methodName, fn)` will automatically and lazily change `Document.prototype[methodName]`
+so that it plays well with `hooks`. An equivalent way to implement the previous example is:
+
+```javascript
+var hooks = require('hooks')
+ , Document = require('./path/to/some/document/constructor');
+
+// Add hooks' methods: `hook`, `pre`, and `post`
+for (var k in hooks) {
+ Document[k] = hooks[k];
+}
+
+Document.prototype.save = function () {
+ // ...
+};
+
+// Define a middleware function to be invoked before 'save'
+Document.pre('save', function validate (next) {
+ // The `this` context inside of `pre` and `post` functions
+ // is the Document instance
+ if (this.isValid()) next(); // next() passes control to the next middleware
+ // or to the target method itself
+ else next(new Error("Invalid")); // next(error) invokes an error callback
+});
+
+// Define a middleware function to be invoked after 'save'
+Document.post('save', function createJob (next) {
+ this.sendToBackgroundQueue();
+ next();
+});
+```
+
+## Pres and Posts as Middleware
+We structure pres and posts as middleware to give you maximum flexibility:
+
+1. You can define **multiple** pres (or posts) for a single method.
+2. These pres (or posts) are then executed as a chain of methods.
+3. Any functions in this middleware chain can choose to halt the chain's execution by `next`ing an Error from that middleware function. If this occurs, then none of the other middleware in the chain will execute, and the main method (e.g., `save`) will not execute. This is nice, for example, when we don't want a document to save if it is invalid.
+
+## Defining multiple pres (or posts)
+`pre` and `post` are chainable, so you can define multiple via:
+```javascript
+Document.pre('save', function (next) {
+ console.log("hello");
+ next();
+}).pre('save', function (next) {
+ console.log("world");
+ next();
+});
+
+Document.post('save', function (next) {
+ console.log("hello");
+ next();
+}).post('save', function (next) {
+ console.log("world");
+ next();
+});
+```
+
+As soon as one pre finishes executing, the next one will be invoked, and so on.
+
+## Error Handling
+You can define a default error handler by passing a 2nd function as the 3rd argument to `hook`:
+```javascript
+Document.hook('set', function (path, val) {
+ this[path] = val;
+}, function (err) {
+ // Handler the error here
+ console.error(err);
+});
+```
+
+Then, we can pass errors to this handler from a pre or post middleware function:
+```javascript
+Document.pre('set', function (next, path, val) {
+ next(new Error());
+});
+```
+
+If you do not set up a default handler, then `hooks` makes the default handler that just throws the `Error`.
+
+The default error handler can be over-rided on a per method invocation basis.
+
+If the main method that you are surrounding with pre and post middleware expects its last argument to be a function
+with callback signature `function (error, ...)`, then that callback becomes the error handler, over-riding the default
+error handler you may have set up.
+
+```javascript
+Document.hook('save', function (callback) {
+ // Save logic goes here
+ ...
+});
+
+var doc = new Document();
+doc.save( function (err, saved) {
+ // We can pass err via `next` in any of our pre or post middleware functions
+ if (err) console.error(err);
+
+ // Rest of callback logic follows ...
+});
+```
+
+## Mutating Arguments via Middleware
+`pre` and `post` middleware can also accept the intended arguments for the method
+they augment. This is useful if you want to mutate the arguments before passing
+them along to the next middleware and eventually pass a mutated arguments list to
+the main method itself.
+
+As a simple example, let's define a method `set` that just sets a key, value pair.
+If we want to namespace the key, we can do so by adding a `pre` middleware hook
+that runs before `set`, alters the arguments by namespacing the `key` argument, and passes them onto `set`:
+
+```javascript
+Document.hook('set', function (key, val) {
+ this[key] = val;
+});
+Document.pre('set', function (next, key, val) {
+ next('namespace-' + key, val);
+});
+var doc = new Document();
+doc.set('hello', 'world');
+console.log(doc.hello); // undefined
+console.log(doc['namespace-hello']); // 'world'
+```
+
+As you can see above, we pass arguments via `next`.
+
+If you are not mutating the arguments, then you can pass zero arguments
+to `next`, and the next middleware function will still have access
+to the arguments.
+
+```javascript
+Document.hook('set', function (key, val) {
+ this[key] = val;
+});
+Document.pre('set', function (next, key, val) {
+ // I have access to key and val here
+ next(); // We don't need to pass anything to next
+});
+Document.pre('set', function (next, key, val) {
+ // And I still have access to the original key and val here
+ next();
+});
+```
+
+Finally, you can add arguments that downstream middleware can also see:
+
+```javascript
+// Note that in the definition of `set`, there is no 3rd argument, options
+Document.hook('set', function (key, val) {
+ // But...
+ var options = arguments[2]; // ...I have access to an options argument
+ // because of pre function pre2 (defined below)
+ console.log(options); // '{debug: true}'
+ this[key] = val;
+});
+Document.pre('set', function pre1 (next, key, val) {
+ // I only have access to key and val arguments
+ console.log(arguments.length); // 3
+ next(key, val, {debug: true});
+});
+Document.pre('set', function pre2 (next, key, val, options) {
+ console.log(arguments.length); // 4
+ console.log(options); // '{ debug: true}'
+ next();
+});
+Document.pre('set', function pre3 (next, key, val, options) {
+ // I still have access to key, val, AND the options argument introduced via the preceding middleware
+ console.log(arguments.length); // 4
+ console.log(options); // '{ debug: true}'
+ next();
+});
+
+var doc = new Document()
+doc.set('hey', 'there');
+```
+
+## Post middleware
+
+Post middleware intercepts the callback originally sent to the asynchronous function you have hooked to.
+
+This means that the following chain of execution will occur in a typical `save` operation:
+
+(1) doc.save -> (2) pre --(next)--> (3) save calls back -> (4) post --(next)--> (5) targetFn
+
+Illustrated below:
+
+```
+Document.pre('save', function (next) {
+ this.key = "value";
+ next();
+});
+// Post handler occurs before `set` calls back. This is useful if we need to grab something
+// async before `set` finishes.
+Document.post('set', function (next) {
+ var me = this;
+ getSomethingAsync(function(value){ // let's assume it returns "Hello Async"
+ me.key2 = value;
+ next();
+ });
+});
+
+var doc = new Document();
+doc.save(function(err){
+ console.log(this.key); // "value" - this value was saved
+ console.log(this.key2); // "Hello Async" - this value was *not* saved
+}
+
+```
+
+Post middleware must call `next()` or execution will stop.
+
+## Parallel `pre` middleware
+
+All middleware up to this point has been "serial" middleware -- i.e., middleware whose logic
+is executed as a serial chain.
+
+Some scenarios call for parallel middleware -- i.e., middleware that can wait for several
+asynchronous services at once to respond.
+
+For instance, you may only want to save a Document only after you have checked
+that the Document is valid according to two different remote services.
+
+We accomplish asynchronous middleware by adding a second kind of flow control callback
+(the only flow control callback so far has been `next`), called `done`.
+
+- `next` passes control to the next middleware in the chain
+- `done` keeps track of how many parallel middleware have invoked `done` and passes
+ control to the target method when ALL parallel middleware have invoked `done`. If
+ you pass an `Error` to `done`, then the error is handled, and the main method that is
+ wrapped by pres and posts will not get invoked.
+
+We declare pre middleware that is parallel by passing a 3rd boolean argument to our `pre`
+definition method.
+
+We illustrate via the parallel validation example mentioned above:
+
+```javascript
+Document.hook('save', function targetFn (callback) {
+ // Save logic goes here
+ // ...
+ // This only gets run once the two `done`s are both invoked via preOne and preTwo.
+});
+
+ // true marks this as parallel middleware
+Document.pre('save', true, function preOne (next, doneOne, callback) {
+ remoteServiceOne.validate(this.serialize(), function (err, isValid) {
+ // The code in here will probably be run after the `next` below this block
+ // and could possibly be run after the console.log("Hola") in `preTwo
+ if (err) return doneOne(err);
+ if (isValid) doneOne();
+ });
+ next(); // Pass control to the next middleware
+});
+
+// We will suppose that we need 2 different remote services to validate our document
+Document.pre('save', true, function preTwo (next, doneTwo, callback) {
+ remoteServiceTwo.validate(this.serialize(), function (err, isValid) {
+ if (err) return doneTwo(err);
+ if (isValid) doneTwo();
+ });
+ next();
+});
+
+// While preOne and preTwo are parallel, preThree is a serial pre middleware
+Document.pre('save', function preThree (next, callback) {
+ next();
+});
+
+var doc = new Document();
+doc.save( function (err, doc) {
+ // Do stuff with the saved doc here...
+});
+```
+
+In the above example, flow control may happen in the following way:
+
+(1) doc.save -> (2) preOne --(next)--> (3) preTwo --(next)--> (4) preThree --(next)--> (wait for dones to invoke) -> (5) doneTwo -> (6) doneOne -> (7) targetFn
+
+So what's happening is that:
+
+1. You call `doc.save(...)`
+2. First, your preOne middleware gets executed. It makes a remote call to the validation service and `next()`s to the preTwo middleware.
+3. Now, your preTwo middleware gets executed. It makes a remote call to another validation service and `next()`s to the preThree middleware.
+4. Your preThree middleware gets executed. It immediately `next()`s. But nothing else gets executing until both `doneOne` and `doneTwo` are invoked inside the callbacks handling the response from the two valiation services.
+5. We will suppose that validation remoteServiceTwo returns a response to us first. In this case, we call `doneTwo` inside the callback to remoteServiceTwo.
+6. Some fractions of a second later, remoteServiceOne returns a response to us. In this case, we call `doneOne` inside the callback to remoteServiceOne.
+7. `hooks` implementation keeps track of how many parallel middleware has been defined per target function. It detects that both asynchronous pre middlewares (`preOne` and `preTwo`) have finally called their `done` functions (`doneOne` and `doneTwo`), so the implementation finally invokes our `targetFn` (i.e., our core `save` business logic).
+
+## Removing Pres
+
+You can remove a particular pre associated with a hook:
+
+ Document.pre('set', someFn);
+ Document.removePre('set', someFn);
+
+And you can also remove all pres associated with a hook:
+ Document.removePre('set'); // Removes all declared `pre`s on the hook 'set'
+
+## Tests
+To run the tests:
+ make test
+
+### Contributors
+- [Brian Noguchi](https://github.com/bnoguchi)
+
+### License
+MIT License
+
+---
+### Author
+Brian Noguchi
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/hooks.alt.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/hooks.alt.js
new file mode 100644
index 0000000..6ced357
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/hooks.alt.js
@@ -0,0 +1,134 @@
+/**
+ * Hooks are useful if we want to add a method that automatically has `pre` and `post` hooks.
+ * For example, it would be convenient to have `pre` and `post` hooks for `save`.
+ * _.extend(Model, mixins.hooks);
+ * Model.hook('save', function () {
+ * console.log('saving');
+ * });
+ * Model.pre('save', function (next, done) {
+ * console.log('about to save');
+ * next();
+ * });
+ * Model.post('save', function (next, done) {
+ * console.log('saved');
+ * next();
+ * });
+ *
+ * var m = new Model();
+ * m.save();
+ * // about to save
+ * // saving
+ * // saved
+ */
+
+// TODO Add in pre and post skipping options
+module.exports = {
+ /**
+ * Declares a new hook to which you can add pres and posts
+ * @param {String} name of the function
+ * @param {Function} the method
+ * @param {Function} the error handler callback
+ */
+ hook: function (name, fn, err) {
+ if (arguments.length === 1 && typeof name === 'object') {
+ for (var k in name) { // `name` is a hash of hookName->hookFn
+ this.hook(k, name[k]);
+ }
+ return;
+ }
+
+ if (!err) err = fn;
+
+ var proto = this.prototype || this
+ , pres = proto._pres = proto._pres || {}
+ , posts = proto._posts = proto._posts || {};
+ pres[name] = pres[name] || [];
+ posts[name] = posts[name] || [];
+
+ function noop () {}
+
+ proto[name] = function () {
+ var self = this
+ , pres = this._pres[name]
+ , posts = this._posts[name]
+ , numAsyncPres = 0
+ , hookArgs = [].slice.call(arguments)
+ , preChain = pres.map( function (pre, i) {
+ var wrapper = function () {
+ if (arguments[0] instanceof Error)
+ return err(arguments[0]);
+ if (numAsyncPres) {
+ // arguments[1] === asyncComplete
+ if (arguments.length)
+ hookArgs = [].slice.call(arguments, 2);
+ pre.apply(self,
+ [ preChain[i+1] || allPresInvoked,
+ asyncComplete
+ ].concat(hookArgs)
+ );
+ } else {
+ if (arguments.length)
+ hookArgs = [].slice.call(arguments);
+ pre.apply(self,
+ [ preChain[i+1] || allPresDone ].concat(hookArgs));
+ }
+ }; // end wrapper = function () {...
+ if (wrapper.isAsync = pre.isAsync)
+ numAsyncPres++;
+ return wrapper;
+ }); // end posts.map(...)
+ function allPresInvoked () {
+ if (arguments[0] instanceof Error)
+ err(arguments[0]);
+ }
+
+ function allPresDone () {
+ if (arguments[0] instanceof Error)
+ return err(arguments[0]);
+ if (arguments.length)
+ hookArgs = [].slice.call(arguments);
+ fn.apply(self, hookArgs);
+ var postChain = posts.map( function (post, i) {
+ var wrapper = function () {
+ if (arguments[0] instanceof Error)
+ return err(arguments[0]);
+ if (arguments.length)
+ hookArgs = [].slice.call(arguments);
+ post.apply(self,
+ [ postChain[i+1] || noop].concat(hookArgs));
+ }; // end wrapper = function () {...
+ return wrapper;
+ }); // end posts.map(...)
+ if (postChain.length) postChain[0]();
+ }
+
+ if (numAsyncPres) {
+ complete = numAsyncPres;
+ function asyncComplete () {
+ if (arguments[0] instanceof Error)
+ return err(arguments[0]);
+ --complete || allPresDone.call(this);
+ }
+ }
+ (preChain[0] || allPresDone)();
+ };
+
+ return this;
+ },
+
+ pre: function (name, fn, isAsync) {
+ var proto = this.prototype
+ , pres = proto._pres = proto._pres || {};
+ if (fn.isAsync = isAsync) {
+ this.prototype[name].numAsyncPres++;
+ }
+ (pres[name] = pres[name] || []).push(fn);
+ return this;
+ },
+ post: function (name, fn, isAsync) {
+ var proto = this.prototype
+ , posts = proto._posts = proto._posts || {};
+ (posts[name] = posts[name] || []).push(fn);
+ return this;
+ }
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/hooks.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/hooks.js
new file mode 100644
index 0000000..b94d11e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/hooks.js
@@ -0,0 +1,188 @@
+// TODO Add in pre and post skipping options
+module.exports = {
+ /**
+ * Declares a new hook to which you can add pres and posts
+ * @param {String} name of the function
+ * @param {Function} the method
+ * @param {Function} the error handler callback
+ */
+ hook: function (name, fn, errorCb) {
+ if (arguments.length === 1 && typeof name === 'object') {
+ for (var k in name) { // `name` is a hash of hookName->hookFn
+ this.hook(k, name[k]);
+ }
+ return;
+ }
+
+ var proto = this.prototype || this
+ , pres = proto._pres = proto._pres || {}
+ , posts = proto._posts = proto._posts || {};
+ pres[name] = pres[name] || [];
+ posts[name] = posts[name] || [];
+
+ proto[name] = function () {
+ var self = this
+ , hookArgs // arguments eventually passed to the hook - are mutable
+ , lastArg = arguments[arguments.length-1]
+ , pres = this._pres[name]
+ , posts = this._posts[name]
+ , _total = pres.length
+ , _current = -1
+ , _asyncsLeft = proto[name].numAsyncPres
+ , _asyncsDone = function(err) {
+ if (err) {
+ return handleError(err);
+ }
+ --_asyncsLeft || _done.apply(self, hookArgs);
+ }
+ , handleError = function(err) {
+ if ('function' == typeof lastArg)
+ return lastArg(err);
+ if (errorCb) return errorCb.call(self, err);
+ throw err;
+ }
+ , _next = function () {
+ if (arguments[0] instanceof Error) {
+ return handleError(arguments[0]);
+ }
+ var _args = Array.prototype.slice.call(arguments)
+ , currPre
+ , preArgs;
+ if (_args.length && !(arguments[0] == null && typeof lastArg === 'function'))
+ hookArgs = _args;
+ if (++_current < _total) {
+ currPre = pres[_current]
+ if (currPre.isAsync && currPre.length < 2)
+ throw new Error("Your pre must have next and done arguments -- e.g., function (next, done, ...)");
+ if (currPre.length < 1)
+ throw new Error("Your pre must have a next argument -- e.g., function (next, ...)");
+ preArgs = (currPre.isAsync
+ ? [once(_next), once(_asyncsDone)]
+ : [once(_next)]).concat(hookArgs);
+ return currPre.apply(self, preArgs);
+ } else if (!_asyncsLeft) {
+ return _done.apply(self, hookArgs);
+ }
+ }
+ , _done = function () {
+ var args_ = Array.prototype.slice.call(arguments)
+ , ret, total_, current_, next_, done_, postArgs;
+
+ if (_current === _total) {
+
+ next_ = function () {
+ if (arguments[0] instanceof Error) {
+ return handleError(arguments[0]);
+ }
+ var args_ = Array.prototype.slice.call(arguments, 1)
+ , currPost
+ , postArgs;
+ if (args_.length) hookArgs = args_;
+ if (++current_ < total_) {
+ currPost = posts[current_]
+ if (currPost.length < 1)
+ throw new Error("Your post must have a next argument -- e.g., function (next, ...)");
+ postArgs = [once(next_)].concat(hookArgs);
+ return currPost.apply(self, postArgs);
+ } else if (typeof lastArg === 'function'){
+ // All post handlers are done, call original callback function
+ return lastArg.apply(self, arguments);
+ }
+ };
+
+ // We are assuming that if the last argument provided to the wrapped function is a function, it was expecting
+ // a callback. We trap that callback and wait to call it until all post handlers have finished.
+ if(typeof lastArg === 'function'){
+ args_[args_.length - 1] = once(next_);
+ }
+
+ total_ = posts.length;
+ current_ = -1;
+ ret = fn.apply(self, args_); // Execute wrapped function, post handlers come afterward
+
+ if (total_ && typeof lastArg !== 'function') return next_(); // no callback provided, execute next_() manually
+ return ret;
+ }
+ };
+
+ return _next.apply(this, arguments);
+ };
+
+ proto[name].numAsyncPres = 0;
+
+ return this;
+ },
+
+ pre: function (name, isAsync, fn, errorCb) {
+ if ('boolean' !== typeof arguments[1]) {
+ errorCb = fn;
+ fn = isAsync;
+ isAsync = false;
+ }
+ var proto = this.prototype || this
+ , pres = proto._pres = proto._pres || {};
+
+ this._lazySetupHooks(proto, name, errorCb);
+
+ if (fn.isAsync = isAsync) {
+ proto[name].numAsyncPres++;
+ }
+
+ (pres[name] = pres[name] || []).push(fn);
+ return this;
+ },
+ post: function (name, isAsync, fn) {
+ if (arguments.length === 2) {
+ fn = isAsync;
+ isAsync = false;
+ }
+ var proto = this.prototype || this
+ , posts = proto._posts = proto._posts || {};
+
+ this._lazySetupHooks(proto, name);
+ (posts[name] = posts[name] || []).push(fn);
+ return this;
+ },
+ removePre: function (name, fnToRemove) {
+ var proto = this.prototype || this
+ , pres = proto._pres || (proto._pres || {});
+ if (!pres[name]) return this;
+ if (arguments.length === 1) {
+ // Remove all pre callbacks for hook `name`
+ pres[name].length = 0;
+ } else {
+ pres[name] = pres[name].filter( function (currFn) {
+ return currFn !== fnToRemove;
+ });
+ }
+ return this;
+ },
+ removePost: function (name, fnToRemove) {
+ var proto = this.prototype || this
+ , posts = proto._posts || (proto._posts || {});
+ if (!posts[name]) return this;
+ if (arguments.length === 1) {
+ // Remove all post callbacks for hook `name`
+ posts[name].length = 0;
+ } else {
+ posts[name] = posts[name].filter( function (currFn) {
+ return currFn !== fnToRemove;
+ });
+ }
+ return this;
+ },
+
+ _lazySetupHooks: function (proto, methodName, errorCb) {
+ if ('undefined' === typeof proto[methodName].numAsyncPres) {
+ this.hook(methodName, proto[methodName], errorCb);
+ }
+ }
+};
+
+function once (fn, scope) {
+ return function fnWrapper () {
+ if (fnWrapper.hookCalled) return;
+ fnWrapper.hookCalled = true;
+ fn.apply(scope, arguments);
+ };
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/package.json
new file mode 100644
index 0000000..6c80085
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/package.json
@@ -0,0 +1,70 @@
+{
+ "name": "hooks-fixed",
+ "description": "Adds pre and post hook functionality to your JavaScript methods.",
+ "version": "1.2.0",
+ "keywords": [
+ "node",
+ "hooks",
+ "middleware",
+ "pre",
+ "post"
+ ],
+ "homepage": "https://github.com/vkarpov15/hooks-fixed/",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/vkarpov15/hooks-fixed.git"
+ },
+ "author": {
+ "name": "Brian Noguchi",
+ "email": "brian.noguchi@gmail.com",
+ "url": "https://github.com/bnoguchi/"
+ },
+ "main": "./hooks.js",
+ "directories": {
+ "lib": "."
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "expresso": ">=0.7.6",
+ "should": ">=0.2.1",
+ "underscore": ">=1.1.4"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ },
+ "licenses": [
+ "MIT"
+ ],
+ "optionalDependencies": {},
+ "gitHead": "db6db04cb1e9e8d549d5a48eb33b42513e89d036",
+ "bugs": {
+ "url": "https://github.com/vkarpov15/hooks-fixed/issues"
+ },
+ "_id": "hooks-fixed@1.2.0",
+ "_shasum": "0d2772d4d7d685ff9244724a9f0b5b2559aac96b",
+ "_from": "hooks-fixed@1.2.0",
+ "_npmVersion": "3.9.5",
+ "_nodeVersion": "6.2.2",
+ "_npmUser": {
+ "name": "vkarpov15",
+ "email": "val@karpov.io"
+ },
+ "dist": {
+ "shasum": "0d2772d4d7d685ff9244724a9f0b5b2559aac96b",
+ "tarball": "https://registry.npmjs.org/hooks-fixed/-/hooks-fixed-1.2.0.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "vkarpov15",
+ "email": "valkar207@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/hooks-fixed-1.2.0.tgz_1469112529130_0.3766456232406199"
+ },
+ "_resolved": "https://registry.npmjs.org/hooks-fixed/-/hooks-fixed-1.2.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/test.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/test.js
new file mode 100644
index 0000000..81ad79e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/hooks-fixed/test.js
@@ -0,0 +1,786 @@
+var hooks = require('./hooks')
+ , should = require('should')
+ , assert = require('assert')
+ , _ = require('underscore');
+
+// TODO Add in test for making sure all pres get called if pre is defined directly on an instance.
+// TODO Test for calling `done` twice or `next` twice in the same function counts only once
+module.exports = {
+ 'should be able to assign multiple hooks at once': function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook({
+ hook1: function (a) {},
+ hook2: function (b) {}
+ });
+ var a = new A();
+ assert.equal(typeof a.hook1, 'function');
+ assert.equal(typeof a.hook2, 'function');
+ },
+ 'should run without pres and posts when not present': function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook('save', function () {
+ this.value = 1;
+ });
+ var a = new A();
+ a.save();
+ a.value.should.equal(1);
+ },
+ 'should run with pres when present': function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook('save', function () {
+ this.value = 1;
+ });
+ A.pre('save', function (next) {
+ this.preValue = 2;
+ next();
+ });
+ var a = new A();
+ a.save();
+ a.value.should.equal(1);
+ a.preValue.should.equal(2);
+ },
+ 'should run with posts when present': function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook('save', function () {
+ this.value = 1;
+ });
+ A.post('save', function (next) {
+ this.value = 2;
+ next();
+ });
+ var a = new A();
+ a.save();
+ a.value.should.equal(2);
+ },
+ 'should run pres and posts when present': function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook('save', function () {
+ this.value = 1;
+ });
+ A.pre('save', function (next) {
+ this.preValue = 2;
+ next();
+ });
+ A.post('save', function (next) {
+ this.value = 3;
+ next();
+ });
+ var a = new A();
+ a.save();
+ a.value.should.equal(3);
+ a.preValue.should.equal(2);
+ },
+ 'should run posts after pres': function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook('save', function () {
+ this.value = 1;
+ });
+ A.pre('save', function (next) {
+ this.override = 100;
+ next();
+ });
+ A.post('save', function (next) {
+ this.override = 200;
+ next();
+ });
+ var a = new A();
+ a.save();
+ a.value.should.equal(1);
+ a.override.should.equal(200);
+ },
+ 'should not run a hook if a pre fails': function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ var counter = 0;
+ A.hook('save', function () {
+ this.value = 1;
+ }, function (err) {
+ counter++;
+ });
+ A.pre('save', true, function (next, done) {
+ next(new Error());
+ });
+ var a = new A();
+ a.save();
+ counter.should.equal(1);
+ assert.equal(typeof a.value, 'undefined');
+ },
+ 'should be able to run multiple pres': function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook('save', function () {
+ this.value = 1;
+ });
+ A.pre('save', function (next) {
+ this.v1 = 1;
+ next();
+ }).pre('save', function (next) {
+ this.v2 = 2;
+ next();
+ });
+ var a = new A();
+ a.save();
+ a.v1.should.equal(1);
+ a.v2.should.equal(2);
+ },
+ 'should run multiple pres until a pre fails and not call the hook': function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook('save', function () {
+ this.value = 1;
+ }, function (err) {});
+ A.pre('save', function (next) {
+ this.v1 = 1;
+ next();
+ }).pre('save', function (next) {
+ next(new Error());
+ }).pre('save', function (next) {
+ this.v3 = 3;
+ next();
+ });
+ var a = new A();
+ a.save();
+ a.v1.should.equal(1);
+ assert.equal(typeof a.v3, 'undefined');
+ assert.equal(typeof a.value, 'undefined');
+ },
+ 'should be able to run multiple posts': function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook('save', function () {
+ this.value = 1;
+ });
+ A.post('save', function (next) {
+ this.value = 2;
+ next();
+ }).post('save', function (next) {
+ this.value = 3.14;
+ next();
+ }).post('save', function (next) {
+ this.v3 = 3;
+ next();
+ });
+ var a = new A();
+ a.save();
+ assert.equal(a.value, 3.14);
+ assert.equal(a.v3, 3);
+ },
+ 'should run only posts up until an error': function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook('save', function () {
+ this.value = 1;
+ }, function (err) {});
+ A.post('save', function (next) {
+ this.value = 2;
+ next();
+ }).post('save', function (next) {
+ this.value = 3;
+ next(new Error());
+ }).post('save', function (next) {
+ this.value = 4;
+ next();
+ });
+ var a = new A();
+ a.save();
+ a.value.should.equal(3);
+ },
+ "should fall back first to the hook method's last argument as the error handler if it is a function of arity 1 or 2": function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ var counter = 0;
+ A.hook('save', function (callback) {
+ this.value = 1;
+ });
+ A.pre('save', true, function (next, done) {
+ next(new Error());
+ });
+ var a = new A();
+ a.save( function (err) {
+ if (err instanceof Error) counter++;
+ });
+ counter.should.equal(1);
+ should.deepEqual(undefined, a.value);
+ },
+ 'should fall back second to the default error handler if specified': function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ var counter = 0;
+ A.hook('save', function (callback) {
+ this.value = 1;
+ }, function (err) {
+ if (err instanceof Error) counter++;
+ });
+ A.pre('save', true, function (next, done) {
+ next(new Error());
+ });
+ var a = new A();
+ a.save();
+ counter.should.equal(1);
+ should.deepEqual(undefined, a.value);
+ },
+ 'fallback default error handler should scope to the object': function () {
+ var A = function () {
+ this.counter = 0;
+ };
+ _.extend(A, hooks);
+ var counter = 0;
+ A.hook('save', function (callback) {
+ this.value = 1;
+ }, function (err) {
+ if (err instanceof Error) this.counter++;
+ });
+ A.pre('save', true, function (next, done) {
+ next(new Error());
+ });
+ var a = new A();
+ a.save();
+ a.counter.should.equal(1);
+ should.deepEqual(undefined, a.value);
+ },
+ 'should fall back last to throwing the error': function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ var counter = 0;
+ A.hook('save', function (err) {
+ if (err instanceof Error) return counter++;
+ this.value = 1;
+ });
+ A.pre('save', true, function (next, done) {
+ next(new Error());
+ });
+ var a = new A();
+ var didCatch = false;
+ try {
+ a.save();
+ } catch (e) {
+ didCatch = true;
+ e.should.be.an.instanceof(Error);
+ counter.should.equal(0);
+ assert.equal(typeof a.value, 'undefined');
+ }
+ didCatch.should.be.true;
+ },
+ "should proceed without mutating arguments if `next(null|undefined)` is called in a serial pre, and the last argument of the target method is a callback with node-like signature function (err, obj) {...} or function (err) {...}": function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ var counter = 0;
+ A.prototype.save = function (callback) {
+ this.value = 1;
+ callback();
+ };
+ A.pre('save', function (next) {
+ next(null);
+ });
+ A.pre('save', function (next) {
+ next(undefined);
+ });
+ var a = new A();
+ a.save( function (err) {
+ if (err instanceof Error) counter++;
+ else counter--;
+ });
+ counter.should.equal(-1);
+ a.value.should.eql(1);
+ },
+ "should proceed with mutating arguments if `next(null|undefined)` is callback in a serial pre, and the last argument of the target method is not a function": function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.prototype.set = function (v) {
+ this.value = v;
+ };
+ A.pre('set', function (next) {
+ next(undefined);
+ });
+ A.pre('set', function (next) {
+ next(null);
+ });
+ var a = new A();
+ a.set(1);
+ should.strictEqual(null, a.value);
+ },
+ 'should not run any posts if a pre fails': function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook('save', function () {
+ this.value = 2;
+ }, function (err) {});
+ A.pre('save', function (next) {
+ this.value = 1;
+ next(new Error());
+ }).post('save', function (next) {
+ this.value = 3;
+ next();
+ });
+ var a = new A();
+ a.save();
+ a.value.should.equal(1);
+ },
+
+ "can pass the hook's arguments verbatim to pres": function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook('set', function (path, val) {
+ this[path] = val;
+ });
+ A.pre('set', function (next, path, val) {
+ path.should.equal('hello');
+ val.should.equal('world');
+ next();
+ });
+ var a = new A();
+ a.set('hello', 'world');
+ a.hello.should.equal('world');
+ },
+// "can pass the hook's arguments as an array to pres": function () {
+// // Great for dynamic arity - e.g., slice(...)
+// var A = function () {};
+// _.extend(A, hooks);
+// A.hook('set', function (path, val) {
+// this[path] = val;
+// });
+// A.pre('set', function (next, hello, world) {
+// hello.should.equal('hello');
+// world.should.equal('world');
+// next();
+// });
+// var a = new A();
+// a.set('hello', 'world');
+// assert.equal(a.hello, 'world');
+// },
+ "can pass the hook's arguments verbatim to posts": function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook('set', function (path, val) {
+ this[path] = val;
+ });
+ A.post('set', function (next, path, val) {
+ path.should.equal('hello');
+ val.should.equal('world');
+ next();
+ });
+ var a = new A();
+ a.set('hello', 'world');
+ assert.equal(a.hello, 'world');
+ },
+// "can pass the hook's arguments as an array to posts": function () {
+// var A = function () {};
+// _.extend(A, hooks);
+// A.hook('set', function (path, val) {
+// this[path] = val;
+// });
+// A.post('set', function (next, halt, args) {
+// assert.equal(args[0], 'hello');
+// assert.equal(args[1], 'world');
+// next();
+// });
+// var a = new A();
+// a.set('hello', 'world');
+// assert.equal(a.hello, 'world');
+// },
+ "pres should be able to modify and pass on a modified version of the hook's arguments": function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook('set', function (path, val) {
+ this[path] = val;
+ assert.equal(arguments[2], 'optional');
+ });
+ A.pre('set', function (next, path, val) {
+ next('foo', 'bar');
+ });
+ A.pre('set', function (next, path, val) {
+ assert.equal(path, 'foo');
+ assert.equal(val, 'bar');
+ next('rock', 'says', 'optional');
+ });
+ A.pre('set', function (next, path, val, opt) {
+ assert.equal(path, 'rock');
+ assert.equal(val, 'says');
+ assert.equal(opt, 'optional');
+ next();
+ });
+ var a = new A();
+ a.set('hello', 'world');
+ assert.equal(typeof a.hello, 'undefined');
+ a.rock.should.equal('says');
+ },
+ 'posts should see the modified version of arguments if the pres modified them': function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook('set', function (path, val) {
+ this[path] = val;
+ });
+ A.pre('set', function (next, path, val) {
+ next('foo', 'bar');
+ });
+ A.post('set', function (next, path, val) {
+ path.should.equal('foo');
+ val.should.equal('bar');
+ });
+ var a = new A();
+ a.set('hello', 'world');
+ assert.equal(typeof a.hello, 'undefined');
+ a.foo.should.equal('bar');
+ },
+ 'should pad missing arguments (relative to expected arguments of the hook) with null': function () {
+ // Otherwise, with hookFn = function (a, b, next, ),
+ // if we use hookFn(a), then because the pre functions are of the form
+ // preFn = function (a, b, next, ), then it actually gets executed with
+ // preFn(a, next, ), so when we call next() from within preFn, we are actually
+ // calling ()
+
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook('set', function (path, val, opts) {
+ this[path] = val;
+ });
+ A.pre('set', function (next, path, val, opts) {
+ next('foo', 'bar');
+ assert.equal(typeof opts, 'undefined');
+ });
+ var a = new A();
+ a.set('hello', 'world');
+ },
+
+ 'should not invoke the target method until all asynchronous middleware have invoked dones': function () {
+ var counter = 0;
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook('set', function (path, val) {
+ counter++;
+ this[path] = val;
+ counter.should.equal(7);
+ });
+ A.pre('set', function (next, path, val) {
+ counter++;
+ next();
+ });
+ A.pre('set', true, function (next, done, path, val) {
+ counter++;
+ setTimeout(function () {
+ counter++;
+ done();
+ }, 1000);
+ next();
+ });
+ A.pre('set', function (next, path, val) {
+ counter++;
+ next();
+ });
+ A.pre('set', true, function (next, done, path, val) {
+ counter++;
+ setTimeout(function () {
+ counter++;
+ done();
+ }, 500);
+ next();
+ });
+ var a = new A();
+ a.set('hello', 'world');
+ },
+
+ 'invoking a method twice should run its async middleware twice': function () {
+ var counter = 0;
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook('set', function (path, val) {
+ this[path] = val;
+ if (path === 'hello') counter.should.equal(1);
+ if (path === 'foo') counter.should.equal(2);
+ });
+ A.pre('set', true, function (next, done, path, val) {
+ setTimeout(function () {
+ counter++;
+ done();
+ }, 1000);
+ next();
+ });
+ var a = new A();
+ a.set('hello', 'world');
+ a.set('foo', 'bar');
+ },
+
+ 'calling the same done multiple times should have the effect of only calling it once': function () {
+ var A = function () {
+ this.acked = false;
+ };
+ _.extend(A, hooks);
+ A.hook('ack', function () {
+ console.log("UH OH, YOU SHOULD NOT BE SEEING THIS");
+ this.acked = true;
+ });
+ A.pre('ack', true, function (next, done) {
+ next();
+ done();
+ done();
+ });
+ A.pre('ack', true, function (next, done) {
+ next();
+ // Notice that done() is not invoked here
+ });
+ var a = new A();
+ a.ack();
+ setTimeout( function () {
+ a.acked.should.be.false;
+ }, 1000);
+ },
+
+ 'calling the same next multiple times should have the effect of only calling it once': function (beforeExit) {
+ var A = function () {
+ this.acked = false;
+ };
+ _.extend(A, hooks);
+ A.hook('ack', function () {
+ console.log("UH OH, YOU SHOULD NOT BE SEEING THIS");
+ this.acked = true;
+ });
+ A.pre('ack', function (next) {
+ // force a throw to re-exec next()
+ try {
+ next(new Error('bam'));
+ } catch (err) {
+ next();
+ }
+ });
+ A.pre('ack', function (next) {
+ next();
+ });
+ var a = new A();
+ a.ack();
+ beforeExit( function () {
+ a.acked.should.be.false;
+ });
+ },
+
+ 'asynchronous middleware should be able to pass an error via `done`, stopping the middleware chain': function () {
+ var counter = 0;
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook('set', function (path, val, fn) {
+ counter++;
+ this[path] = val;
+ fn(null);
+ });
+ A.pre('set', true, function (next, done, path, val, fn) {
+ setTimeout(function () {
+ counter++;
+ done(new Error);
+ }, 1000);
+ next();
+ });
+ var a = new A();
+ a.set('hello', 'world', function (err) {
+ err.should.be.an.instanceof(Error);
+ should.strictEqual(undefined, a['hello']);
+ counter.should.eql(1);
+ });
+ },
+
+ 'should be able to remove a particular pre': function () {
+ var A = function () {}
+ , preTwo;
+ _.extend(A, hooks);
+ A.hook('save', function () {
+ this.value = 1;
+ });
+ A.pre('save', function (next) {
+ this.preValueOne = 2;
+ next();
+ });
+ A.pre('save', preTwo = function (next) {
+ this.preValueTwo = 4;
+ next();
+ });
+ A.removePre('save', preTwo);
+ var a = new A();
+ a.save();
+ a.value.should.equal(1);
+ a.preValueOne.should.equal(2);
+ should.strictEqual(undefined, a.preValueTwo);
+ },
+
+ 'should be able to remove all pres associated with a hook': function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook('save', function () {
+ this.value = 1;
+ });
+ A.pre('save', function (next) {
+ this.preValueOne = 2;
+ next();
+ });
+ A.pre('save', function (next) {
+ this.preValueTwo = 4;
+ next();
+ });
+ A.removePre('save');
+ var a = new A();
+ a.save();
+ a.value.should.equal(1);
+ should.strictEqual(undefined, a.preValueOne);
+ should.strictEqual(undefined, a.preValueTwo);
+ },
+
+ 'should be able to remove a particular post': function () {
+ var A = function () {}
+ , postTwo;
+ _.extend(A, hooks);
+ A.hook('save', function () {
+ this.value = 1;
+ });
+ A.post('save', function (next) {
+ this.postValueOne = 2;
+ next();
+ });
+ A.post('save', postTwo = function (next) {
+ this.postValueTwo = 4;
+ next();
+ });
+ A.removePost('save', postTwo);
+ var a = new A();
+ a.save();
+ a.value.should.equal(1);
+ a.postValueOne.should.equal(2);
+ should.strictEqual(undefined, a.postValueTwo);
+ },
+
+ 'should be able to remove all posts associated with a hook': function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook('save', function () {
+ this.value = 1;
+ });
+ A.post('save', function (next) {
+ this.postValueOne = 2;
+ next();
+ });
+ A.post('save', function (next) {
+ this.postValueTwo = 4;
+ next();
+ });
+ A.removePost('save');
+ var a = new A();
+ a.save();
+ a.value.should.equal(1);
+ should.strictEqual(undefined, a.postValueOne);
+ should.strictEqual(undefined, a.postValueTwo);
+ },
+
+ '#pre should lazily make a method hookable': function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.prototype.save = function () {
+ this.value = 1;
+ };
+ A.pre('save', function (next) {
+ this.preValue = 2;
+ next();
+ });
+ var a = new A();
+ a.save();
+ a.value.should.equal(1);
+ a.preValue.should.equal(2);
+ },
+
+ '#pre lazily making a method hookable should be able to provide a default errorHandler as the last argument': function () {
+ var A = function () {};
+ var preValue = "";
+ _.extend(A, hooks);
+ A.prototype.save = function () {
+ this.value = 1;
+ };
+ A.pre('save', function (next) {
+ next(new Error);
+ }, function (err) {
+ preValue = 'ERROR';
+ });
+ var a = new A();
+ a.save();
+ should.strictEqual(undefined, a.value);
+ preValue.should.equal('ERROR');
+ },
+
+ '#post should lazily make a method hookable': function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.prototype.save = function () {
+ this.value = 1;
+ };
+ A.post('save', function (next) {
+ this.value = 2;
+ next();
+ });
+ var a = new A();
+ a.save();
+ a.value.should.equal(2);
+ },
+
+ "a lazy hooks setup should handle errors via a method's last argument, if it's a callback": function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.prototype.save = function (fn) {};
+ A.pre('save', function (next) {
+ next(new Error("hi there"));
+ });
+ var a = new A();
+ a.save( function (err) {
+ err.should.be.an.instanceof(Error);
+ });
+ },
+
+ 'should intercept method callbacks for post handlers': function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook('save', function (val, callback) {
+ this.value = val;
+ callback();
+ });
+ A.post('save', function (next) {
+ assert.equal(a.value, 2);
+ this.value += 2;
+ setTimeout(next, 10);
+ }).post('save', function (next) {
+ assert.equal(a.value, 4);
+ this.value += 3;
+ setTimeout(next, 10);
+ }).post('save', function (next) {
+ assert.equal(a.value, 7);
+ this.value2 = 3;
+ setTimeout(next, 10);
+ });
+ var a = new A();
+ a.save(2, function(){
+ assert.equal(a.value, 7);
+ assert.equal(a.value2, 3);
+ });
+ },
+
+ 'should handle parallel followed by serial': function () {
+ var A = function () {};
+ _.extend(A, hooks);
+ A.hook('save', function (val, callback) {
+ this.value = val;
+ callback();
+ });
+ A.pre('save', true, function(next, done) {
+ process.nextTick(function() {
+ done();
+ });
+ next();
+ }).pre('save', function(done) {
+ process.nextTick(function() {
+ done();
+ });
+ });
+ var a = new A();
+ a.save(2, function(){
+ assert.ok(true);
+ });
+ }
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/.npmignore
new file mode 100644
index 0000000..59d842b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/.npmignore
@@ -0,0 +1,28 @@
+# Logs
+logs
+*.log
+
+# Runtime data
+pids
+*.pid
+*.seed
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+
+# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# Compiled binary addons (http://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directory
+# Commenting this out is preferred by some people, see
+# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
+node_modules
+
+# Users Environment Variables
+.lock-wscript
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/.travis.yml b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/.travis.yml
new file mode 100644
index 0000000..117c2b6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/.travis.yml
@@ -0,0 +1,9 @@
+language: node_js
+node_js:
+ - "5"
+ - "4"
+ - "0.12"
+ - "0.10"
+ - "iojs"
+script: "npm run-script test-travis"
+after_script: "npm install coveralls@2.10.0 && cat ./coverage/lcov.info | coveralls"
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/LICENSE
new file mode 100644
index 0000000..e06d208
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/LICENSE
@@ -0,0 +1,202 @@
+Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright {yyyy} {name of copyright owner}
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/Makefile b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/Makefile
new file mode 100644
index 0000000..f71ba90
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/Makefile
@@ -0,0 +1,5 @@
+docs:
+ node ./docs.js
+
+coverage:
+ ./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -- -R spec ./test/*
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/README.md
new file mode 100644
index 0000000..7d2dc84
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/README.md
@@ -0,0 +1,379 @@
+# kareem
+
+ [![Build Status](https://travis-ci.org/vkarpov15/kareem.svg?branch=master)](https://travis-ci.org/vkarpov15/kareem)
+ [![Coverage Status](https://img.shields.io/coveralls/vkarpov15/kareem.svg)](https://coveralls.io/r/vkarpov15/kareem)
+
+Re-imagined take on the [hooks](http://npmjs.org/package/hooks) module, meant to offer additional flexibility in allowing you to execute hooks whenever necessary, as opposed to simply wrapping a single function.
+
+Named for the NBA's all-time leading scorer Kareem Abdul-Jabbar, known for his mastery of the [hook shot](http://en.wikipedia.org/wiki/Kareem_Abdul-Jabbar#Skyhook)
+
+<img src="http://upload.wikimedia.org/wikipedia/commons/0/00/Kareem-Abdul-Jabbar_Lipofsky.jpg" width="220">
+
+# API
+
+## pre hooks
+
+Much like [hooks](https://npmjs.org/package/hooks), kareem lets you define
+pre and post hooks: pre hooks are called before a given function executes.
+Unlike hooks, kareem stores hooks and other internal state in a separate
+object, rather than relying on inheritance. Furthermore, kareem exposes
+an `execPre()` function that allows you to execute your pre hooks when
+appropriate, giving you more fine-grained control over your function hooks.
+
+
+#### It runs without any hooks specified
+
+```javascript
+
+ hooks.execPre('cook', null, function() {
+ done();
+ });
+
+```
+
+#### It runs basic serial pre hooks
+
+pre hook functions take one parameter, a "done" function that you execute
+when your pre hook is finished.
+
+
+```javascript
+
+ var count = 0;
+
+ hooks.pre('cook', function(done) {
+ ++count;
+ done();
+ });
+
+ hooks.execPre('cook', null, function() {
+ assert.equal(1, count);
+ done();
+ });
+
+```
+
+#### It can run multipe pre hooks
+
+```javascript
+
+ var count1 = 0;
+ var count2 = 0;
+
+ hooks.pre('cook', function(done) {
+ ++count1;
+ done();
+ });
+
+ hooks.pre('cook', function(done) {
+ ++count2;
+ done();
+ });
+
+ hooks.execPre('cook', null, function() {
+ assert.equal(1, count1);
+ assert.equal(1, count2);
+ done();
+ });
+
+```
+
+#### It can run fully synchronous pre hooks
+
+If your pre hook function takes no parameters, its assumed to be
+fully synchronous.
+
+
+```javascript
+
+ var count1 = 0;
+ var count2 = 0;
+
+ hooks.pre('cook', function() {
+ ++count1;
+ });
+
+ hooks.pre('cook', function() {
+ ++count2;
+ });
+
+ hooks.execPre('cook', null, function(error) {
+ assert.equal(null, error);
+ assert.equal(1, count1);
+ assert.equal(1, count2);
+ done();
+ });
+
+```
+
+#### It properly attaches context to pre hooks
+
+Pre save hook functions are bound to the second parameter to `execPre()`
+
+
+```javascript
+
+ hooks.pre('cook', function(done) {
+ this.bacon = 3;
+ done();
+ });
+
+ hooks.pre('cook', function(done) {
+ this.eggs = 4;
+ done();
+ });
+
+ var obj = { bacon: 0, eggs: 0 };
+
+ // In the pre hooks, `this` will refer to `obj`
+ hooks.execPre('cook', obj, function(error) {
+ assert.equal(null, error);
+ assert.equal(3, obj.bacon);
+ assert.equal(4, obj.eggs);
+ done();
+ });
+
+```
+
+#### It can execute parallel (async) pre hooks
+
+Like the hooks module, you can declare "async" pre hooks - these take two
+parameters, the functions `next()` and `done()`. `next()` passes control to
+the next pre hook, but the underlying function won't be called until all
+async pre hooks have called `done()`.
+
+
+```javascript
+
+ hooks.pre('cook', true, function(next, done) {
+ this.bacon = 3;
+ next();
+ setTimeout(function() {
+ done();
+ }, 5);
+ });
+
+ hooks.pre('cook', true, function(next, done) {
+ next();
+ var _this = this;
+ setTimeout(function() {
+ _this.eggs = 4;
+ done();
+ }, 10);
+ });
+
+ hooks.pre('cook', function(next) {
+ this.waffles = false;
+ next();
+ });
+
+ var obj = { bacon: 0, eggs: 0 };
+
+ hooks.execPre('cook', obj, function() {
+ assert.equal(3, obj.bacon);
+ assert.equal(4, obj.eggs);
+ assert.equal(false, obj.waffles);
+ done();
+ });
+
+```
+
+## post hooks
+
+#### It runs without any hooks specified
+
+```javascript
+
+ hooks.execPost('cook', null, [1], function(error, eggs) {
+ assert.ifError(error);
+ assert.equal(1, eggs);
+ done();
+ });
+
+```
+
+#### It executes with parameters passed in
+
+```javascript
+
+ hooks.post('cook', function(eggs, bacon, callback) {
+ assert.equal(1, eggs);
+ assert.equal(2, bacon);
+ callback();
+ });
+
+ hooks.execPost('cook', null, [1, 2], function(error, eggs, bacon) {
+ assert.ifError(error);
+ assert.equal(1, eggs);
+ assert.equal(2, bacon);
+ done();
+ });
+
+```
+
+#### It can use synchronous post hooks
+
+```javascript
+
+ var execed = {};
+
+ hooks.post('cook', function(eggs, bacon) {
+ execed.first = true;
+ assert.equal(1, eggs);
+ assert.equal(2, bacon);
+ });
+
+ hooks.post('cook', function(eggs, bacon, callback) {
+ execed.second = true;
+ assert.equal(1, eggs);
+ assert.equal(2, bacon);
+ callback();
+ });
+
+ hooks.execPost('cook', null, [1, 2], function(error, eggs, bacon) {
+ assert.ifError(error);
+ assert.equal(2, Object.keys(execed).length);
+ assert.ok(execed.first);
+ assert.ok(execed.second);
+ assert.equal(1, eggs);
+ assert.equal(2, bacon);
+ done();
+ });
+
+```
+
+## wrap()
+
+#### It wraps pre and post calls into one call
+
+```javascript
+
+ hooks.pre('cook', true, function(next, done) {
+ this.bacon = 3;
+ next();
+ setTimeout(function() {
+ done();
+ }, 5);
+ });
+
+ hooks.pre('cook', true, function(next, done) {
+ next();
+ var _this = this;
+ setTimeout(function() {
+ _this.eggs = 4;
+ done();
+ }, 10);
+ });
+
+ hooks.pre('cook', function(next) {
+ this.waffles = false;
+ next();
+ });
+
+ hooks.post('cook', function(obj) {
+ obj.tofu = 'no';
+ });
+
+ var obj = { bacon: 0, eggs: 0 };
+
+ var args = [obj];
+ args.push(function(error, result) {
+ assert.ifError(error);
+ assert.equal(null, error);
+ assert.equal(3, obj.bacon);
+ assert.equal(4, obj.eggs);
+ assert.equal(false, obj.waffles);
+ assert.equal('no', obj.tofu);
+
+ assert.equal(obj, result);
+ done();
+ });
+
+ hooks.wrap(
+ 'cook',
+ function(o, callback) {
+ assert.equal(3, obj.bacon);
+ assert.equal(4, obj.eggs);
+ assert.equal(false, obj.waffles);
+ assert.equal(undefined, obj.tofu);
+ callback(null, o);
+ },
+ obj,
+ args);
+
+```
+
+## createWrapper()
+
+#### It wraps wrap() into a callable function
+
+```javascript
+
+ hooks.pre('cook', true, function(next, done) {
+ this.bacon = 3;
+ next();
+ setTimeout(function() {
+ done();
+ }, 5);
+ });
+
+ hooks.pre('cook', true, function(next, done) {
+ next();
+ var _this = this;
+ setTimeout(function() {
+ _this.eggs = 4;
+ done();
+ }, 10);
+ });
+
+ hooks.pre('cook', function(next) {
+ this.waffles = false;
+ next();
+ });
+
+ hooks.post('cook', function(obj) {
+ obj.tofu = 'no';
+ });
+
+ var obj = { bacon: 0, eggs: 0 };
+
+ var cook = hooks.createWrapper(
+ 'cook',
+ function(o, callback) {
+ assert.equal(3, obj.bacon);
+ assert.equal(4, obj.eggs);
+ assert.equal(false, obj.waffles);
+ assert.equal(undefined, obj.tofu);
+ callback(null, o);
+ },
+ obj);
+
+ cook(obj, function(error, result) {
+ assert.ifError(error);
+ assert.equal(3, obj.bacon);
+ assert.equal(4, obj.eggs);
+ assert.equal(false, obj.waffles);
+ assert.equal('no', obj.tofu);
+
+ assert.equal(obj, result);
+ done();
+ });
+
+```
+
+## clone()
+
+#### It clones a Kareem object
+
+```javascript
+
+ var k1 = new Kareem();
+ k1.pre('cook', function() {});
+ k1.post('cook', function() {});
+
+ var k2 = k1.clone();
+ assert.deepEqual(['cook'], Object.keys(k2._pres));
+ assert.deepEqual(['cook'], Object.keys(k2._posts));
+
+```
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/docs.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/docs.js
new file mode 100644
index 0000000..4a8d4c8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/docs.js
@@ -0,0 +1,37 @@
+var acquit = require('acquit');
+
+var content = require('fs').readFileSync('./test/examples.test.js').toString();
+var blocks = acquit.parse(content);
+
+var mdOutput =
+ '# kareem\n\n' +
+ ' [![Build Status](https://travis-ci.org/vkarpov15/kareem.svg?branch=master)](https://travis-ci.org/vkarpov15/kareem)\n' +
+ ' [![Coverage Status](https://img.shields.io/coveralls/vkarpov15/kareem.svg)](https://coveralls.io/r/vkarpov15/kareem)\n\n' +
+ 'Re-imagined take on the [hooks](http://npmjs.org/package/hooks) module, ' +
+ 'meant to offer additional flexibility in allowing you to execute hooks ' +
+ 'whenever necessary, as opposed to simply wrapping a single function.\n\n' +
+ 'Named for the NBA\'s all-time leading scorer Kareem Abdul-Jabbar, known ' +
+ 'for his mastery of the [hook shot](http://en.wikipedia.org/wiki/Kareem_Abdul-Jabbar#Skyhook)\n\n' +
+ '<img src="http://upload.wikimedia.org/wikipedia/commons/0/00/Kareem-Abdul-Jabbar_Lipofsky.jpg" width="220">\n\n' +
+ '# API\n\n';
+
+for (var i = 0; i < blocks.length; ++i) {
+ var describe = blocks[i];
+ mdOutput += '## ' + describe.contents + '\n\n';
+ mdOutput += describe.comments[0] ?
+ acquit.trimEachLine(describe.comments[0]) + '\n\n' :
+ '';
+
+ for (var j = 0; j < describe.blocks.length; ++j) {
+ var it = describe.blocks[j];
+ mdOutput += '#### It ' + it.contents + '\n\n';
+ mdOutput += it.comments[0] ?
+ acquit.trimEachLine(it.comments[0]) + '\n\n' :
+ '';
+ mdOutput += '```javascript\n';
+ mdOutput += ' ' + it.code + '\n';
+ mdOutput += '```\n\n';
+ }
+}
+
+require('fs').writeFileSync('README.md', mdOutput);
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/gulpfile.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/gulpfile.js
new file mode 100644
index 0000000..635bfc7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/gulpfile.js
@@ -0,0 +1,18 @@
+var gulp = require('gulp');
+var mocha = require('gulp-mocha');
+var config = require('./package.json');
+var jscs = require('gulp-jscs');
+
+gulp.task('mocha', function() {
+ return gulp.src('./test/*').
+ pipe(mocha({ reporter: 'dot' }));
+});
+
+gulp.task('jscs', function() {
+ return gulp.src('./index.js').
+ pipe(jscs(config.jscsConfig));
+});
+
+gulp.task('watch', function() {
+ gulp.watch('./index.js', ['jscs', 'mocha']);
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/index.js
new file mode 100644
index 0000000..ccc266c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/index.js
@@ -0,0 +1,312 @@
+'use strict';
+
+function Kareem() {
+ this._pres = {};
+ this._posts = {};
+}
+
+Kareem.prototype.execPre = function(name, context, callback) {
+ var pres = this._pres[name] || [];
+ var numPres = pres.length;
+ var numAsyncPres = pres.numAsync || 0;
+ var currentPre = 0;
+ var asyncPresLeft = numAsyncPres;
+ var done = false;
+
+ if (!numPres) {
+ return process.nextTick(function() {
+ callback(null);
+ });
+ }
+
+ var next = function() {
+ if (currentPre >= numPres) {
+ return;
+ }
+ var pre = pres[currentPre];
+
+ if (pre.isAsync) {
+ pre.fn.call(
+ context,
+ function(error) {
+ if (error) {
+ if (done) {
+ return;
+ }
+ done = true;
+ return callback(error);
+ }
+
+ ++currentPre;
+ next.apply(context, arguments);
+ },
+ function(error) {
+ if (error) {
+ if (done) {
+ return;
+ }
+ done = true;
+ return callback(error);
+ }
+
+ if (--numAsyncPres === 0) {
+ return callback(null);
+ }
+ });
+ } else if (pre.fn.length > 0) {
+ var args = [function(error) {
+ if (error) {
+ if (done) {
+ return;
+ }
+ done = true;
+ return callback(error);
+ }
+
+ if (++currentPre >= numPres) {
+ if (asyncPresLeft > 0) {
+ // Leave parallel hooks to run
+ return;
+ } else {
+ return callback(null);
+ }
+ }
+
+ next.apply(context, arguments);
+ }];
+ if (arguments.length >= 2) {
+ for (var i = 1; i < arguments.length; ++i) {
+ args.push(arguments[i]);
+ }
+ }
+ pre.fn.apply(context, args);
+ } else {
+ pre.fn.call(context);
+ if (++currentPre >= numPres) {
+ if (asyncPresLeft > 0) {
+ // Leave parallel hooks to run
+ return;
+ } else {
+ return process.nextTick(function() {
+ callback(null);
+ });
+ }
+ }
+ next();
+ }
+ };
+
+ next();
+};
+
+Kareem.prototype.execPreSync = function(name, context) {
+ var pres = this._pres[name] || [];
+ var numPres = pres.length;
+
+ for (var i = 0; i < numPres; ++i) {
+ pres[i].fn.call(context);
+ }
+};
+
+Kareem.prototype.execPost = function(name, context, args, options, callback) {
+ if (arguments.length < 5) {
+ callback = options;
+ options = null;
+ }
+ var posts = this._posts[name] || [];
+ var numPosts = posts.length;
+ var currentPost = 0;
+
+ var firstError = null;
+ if (options && options.error) {
+ firstError = options.error;
+ }
+
+ if (!numPosts) {
+ return process.nextTick(function() {
+ callback.apply(null, [firstError].concat(args));
+ });
+ }
+
+ var next = function() {
+ var post = posts[currentPost];
+
+ if (firstError) {
+ if (post.length === args.length + 2) {
+ post.apply(context, [firstError].concat(args).concat(function(error) {
+ if (error) {
+ firstError = error;
+ }
+ if (++currentPost >= numPosts) {
+ return callback.call(null, firstError);
+ }
+ next();
+ }));
+ } else {
+ if (++currentPost >= numPosts) {
+ return callback.call(null, firstError);
+ }
+ next();
+ }
+ } else {
+ if (post.length === args.length + 2) {
+ // Skip error handlers if no error
+ if (++currentPost >= numPosts) {
+ return callback.apply(null, [null].concat(args));
+ }
+ return next();
+ }
+ if (post.length === args.length + 1) {
+ post.apply(context, args.concat(function(error) {
+ if (error) {
+ firstError = error;
+ return next();
+ }
+
+ if (++currentPost >= numPosts) {
+ return callback.apply(null, [null].concat(args));
+ }
+
+ next();
+ }));
+ } else {
+ post.apply(context, args);
+
+ if (++currentPost >= numPosts) {
+ return callback.apply(null, [null].concat(args));
+ }
+
+ next();
+ }
+ }
+ };
+
+ next();
+};
+
+Kareem.prototype.execPostSync = function(name, context) {
+ var posts = this._posts[name] || [];
+ var numPosts = posts.length;
+
+ for (var i = 0; i < numPosts; ++i) {
+ posts[i].call(context);
+ }
+};
+
+function _handleWrapError(instance, error, name, context, args, options, callback) {
+ if (options.useErrorHandlers) {
+ var _options = { error: error };
+ var newArgs = [];
+ // Filter out trailing undefineds
+ for (var i = args.length; i >= 0; --i) {
+ if (newArgs.length > 0 || args[i] !== void 0) {
+ newArgs.unshift(args[i]);
+ }
+ }
+ return instance.execPost(name, context, newArgs, _options, function(error) {
+ return typeof callback === 'function' && callback(error);
+ });
+ } else {
+ return typeof callback === 'function' ?
+ callback(error) :
+ undefined;
+ }
+}
+
+Kareem.prototype.wrap = function(name, fn, context, args, options) {
+ var lastArg = (args.length > 0 ? args[args.length - 1] : null);
+ var argsWithoutCb = typeof lastArg === 'function' ?
+ args.slice(0, args.length - 1) :
+ args;
+ var _this = this;
+
+ var useLegacyPost;
+ if (typeof options === 'object') {
+ useLegacyPost = options && options.useLegacyPost;
+ } else {
+ useLegacyPost = options;
+ }
+ options = options || {};
+
+ this.execPre(name, context, function(error) {
+ if (error) {
+ return _handleWrapError(_this, error, name, context, argsWithoutCb,
+ options, lastArg)
+ }
+
+ var end = (typeof lastArg === 'function' ? args.length - 1 : args.length);
+
+ fn.apply(context, args.slice(0, end).concat(function() {
+ var args = arguments;
+ var argsWithoutError = Array.prototype.slice.call(arguments, 1);
+ if (arguments[0]) {
+ // Assume error
+ return _handleWrapError(_this, arguments[0], name, context,
+ args, options, lastArg);
+ } else {
+ if (useLegacyPost && typeof lastArg === 'function') {
+ lastArg.apply(context, arguments);
+ }
+
+ _this.execPost(name, context, argsWithoutError, function() {
+ if (arguments[0]) {
+ return typeof lastArg === 'function' ?
+ lastArg(arguments[0]) :
+ undefined;
+ }
+
+ return typeof lastArg === 'function' && !useLegacyPost ?
+ lastArg.apply(context, arguments) :
+ undefined;
+ });
+ }
+ }));
+ });
+};
+
+Kareem.prototype.createWrapper = function(name, fn, context, options) {
+ var _this = this;
+ return function() {
+ var args = Array.prototype.slice.call(arguments);
+ _this.wrap(name, fn, context, args, options);
+ };
+};
+
+Kareem.prototype.pre = function(name, isAsync, fn, error) {
+ if (typeof arguments[1] !== 'boolean') {
+ error = fn;
+ fn = isAsync;
+ isAsync = false;
+ }
+
+ this._pres[name] = this._pres[name] || [];
+ var pres = this._pres[name];
+
+ if (isAsync) {
+ pres.numAsync = pres.numAsync || 0;
+ ++pres.numAsync;
+ }
+
+ pres.push({ fn: fn, isAsync: isAsync });
+
+ return this;
+};
+
+Kareem.prototype.post = function(name, fn) {
+ (this._posts[name] = this._posts[name] || []).push(fn);
+ return this;
+};
+
+Kareem.prototype.clone = function() {
+ var n = new Kareem();
+ for (var key in this._pres) {
+ n._pres[key] = this._pres[key].slice();
+ }
+ for (var key in this._posts) {
+ n._posts[key] = this._posts[key].slice();
+ }
+
+ return n;
+};
+
+module.exports = Kareem;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/package.json
new file mode 100644
index 0000000..45e4a65
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/package.json
@@ -0,0 +1,63 @@
+{
+ "name": "kareem",
+ "version": "1.1.3",
+ "description": "Next-generation take on pre/post function hooks",
+ "main": "index.js",
+ "scripts": {
+ "test": "./node_modules/mocha/bin/mocha ./test/*",
+ "test-travis": "./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -- -R spec ./test/*"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/vkarpov15/kareem.git"
+ },
+ "devDependencies": {
+ "acquit": "0.0.3",
+ "gulp": "3.8.10",
+ "gulp-mocha": "2.0.0",
+ "gulp-jscs": "1.4.0",
+ "istanbul": "0.3.5",
+ "jscs": "1.9.0",
+ "mocha": "2.0.0"
+ },
+ "jscsConfig": {
+ "preset": "airbnb",
+ "requireMultipleVarDecl": null,
+ "disallowMultipleVarDecl": true
+ },
+ "author": {
+ "name": "Valeri Karpov",
+ "email": "val@karpov.io"
+ },
+ "license": "Apache 2.0",
+ "gitHead": "87171c8d0d3743d7f3a5dce2e540314b32980920",
+ "bugs": {
+ "url": "https://github.com/vkarpov15/kareem/issues"
+ },
+ "homepage": "https://github.com/vkarpov15/kareem#readme",
+ "_id": "kareem@1.1.3",
+ "_shasum": "0877610d8879c38da62d1dbafde4e17f2692f041",
+ "_from": "kareem@1.1.3",
+ "_npmVersion": "3.8.6",
+ "_nodeVersion": "6.0.0",
+ "_npmUser": {
+ "name": "vkarpov15",
+ "email": "val@karpov.io"
+ },
+ "dist": {
+ "shasum": "0877610d8879c38da62d1dbafde4e17f2692f041",
+ "tarball": "https://registry.npmjs.org/kareem/-/kareem-1.1.3.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "vkarpov15",
+ "email": "valkar207@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/kareem-1.1.3.tgz_1467040511533_0.5054662451148033"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/kareem/-/kareem-1.1.3.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/test/examples.test.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/test/examples.test.js
new file mode 100644
index 0000000..96d2fb8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/test/examples.test.js
@@ -0,0 +1,339 @@
+var assert = require('assert');
+var Kareem = require('../');
+
+/* Much like [hooks](https://npmjs.org/package/hooks), kareem lets you define
+ * pre and post hooks: pre hooks are called before a given function executes.
+ * Unlike hooks, kareem stores hooks and other internal state in a separate
+ * object, rather than relying on inheritance. Furthermore, kareem exposes
+ * an `execPre()` function that allows you to execute your pre hooks when
+ * appropriate, giving you more fine-grained control over your function hooks.
+ */
+describe('pre hooks', function() {
+ var hooks;
+
+ beforeEach(function() {
+ hooks = new Kareem();
+ });
+
+ it('runs without any hooks specified', function(done) {
+ hooks.execPre('cook', null, function() {
+ done();
+ });
+ });
+
+ /* pre hook functions take one parameter, a "done" function that you execute
+ * when your pre hook is finished.
+ */
+ it('runs basic serial pre hooks', function(done) {
+ var count = 0;
+
+ hooks.pre('cook', function(done) {
+ ++count;
+ done();
+ });
+
+ hooks.execPre('cook', null, function() {
+ assert.equal(1, count);
+ done();
+ });
+ });
+
+ it('can run multipe pre hooks', function(done) {
+ var count1 = 0;
+ var count2 = 0;
+
+ hooks.pre('cook', function(done) {
+ ++count1;
+ done();
+ });
+
+ hooks.pre('cook', function(done) {
+ ++count2;
+ done();
+ });
+
+ hooks.execPre('cook', null, function() {
+ assert.equal(1, count1);
+ assert.equal(1, count2);
+ done();
+ });
+ });
+
+ /* If your pre hook function takes no parameters, its assumed to be
+ * fully synchronous.
+ */
+ it('can run fully synchronous pre hooks', function(done) {
+ var count1 = 0;
+ var count2 = 0;
+
+ hooks.pre('cook', function() {
+ ++count1;
+ });
+
+ hooks.pre('cook', function() {
+ ++count2;
+ });
+
+ hooks.execPre('cook', null, function(error) {
+ assert.equal(null, error);
+ assert.equal(1, count1);
+ assert.equal(1, count2);
+ done();
+ });
+ });
+
+ /* Pre save hook functions are bound to the second parameter to `execPre()`
+ */
+ it('properly attaches context to pre hooks', function(done) {
+ hooks.pre('cook', function(done) {
+ this.bacon = 3;
+ done();
+ });
+
+ hooks.pre('cook', function(done) {
+ this.eggs = 4;
+ done();
+ });
+
+ var obj = { bacon: 0, eggs: 0 };
+
+ // In the pre hooks, `this` will refer to `obj`
+ hooks.execPre('cook', obj, function(error) {
+ assert.equal(null, error);
+ assert.equal(3, obj.bacon);
+ assert.equal(4, obj.eggs);
+ done();
+ });
+ });
+
+ /* Like the hooks module, you can declare "async" pre hooks - these take two
+ * parameters, the functions `next()` and `done()`. `next()` passes control to
+ * the next pre hook, but the underlying function won't be called until all
+ * async pre hooks have called `done()`.
+ */
+ it('can execute parallel (async) pre hooks', function(done) {
+ hooks.pre('cook', true, function(next, done) {
+ this.bacon = 3;
+ next();
+ setTimeout(function() {
+ done();
+ }, 5);
+ });
+
+ hooks.pre('cook', true, function(next, done) {
+ next();
+ var _this = this;
+ setTimeout(function() {
+ _this.eggs = 4;
+ done();
+ }, 10);
+ });
+
+ hooks.pre('cook', function(next) {
+ this.waffles = false;
+ next();
+ });
+
+ var obj = { bacon: 0, eggs: 0 };
+
+ hooks.execPre('cook', obj, function() {
+ assert.equal(3, obj.bacon);
+ assert.equal(4, obj.eggs);
+ assert.equal(false, obj.waffles);
+ done();
+ });
+ });
+});
+
+describe('post hooks', function() {
+ var hooks;
+
+ beforeEach(function() {
+ hooks = new Kareem();
+ });
+
+ it('runs without any hooks specified', function(done) {
+ hooks.execPost('cook', null, [1], function(error, eggs) {
+ assert.ifError(error);
+ assert.equal(1, eggs);
+ done();
+ });
+ });
+
+ it('executes with parameters passed in', function(done) {
+ hooks.post('cook', function(eggs, bacon, callback) {
+ assert.equal(1, eggs);
+ assert.equal(2, bacon);
+ callback();
+ });
+
+ hooks.execPost('cook', null, [1, 2], function(error, eggs, bacon) {
+ assert.ifError(error);
+ assert.equal(1, eggs);
+ assert.equal(2, bacon);
+ done();
+ });
+ });
+
+ it('can use synchronous post hooks', function(done) {
+ var execed = {};
+
+ hooks.post('cook', function(eggs, bacon) {
+ execed.first = true;
+ assert.equal(1, eggs);
+ assert.equal(2, bacon);
+ });
+
+ hooks.post('cook', function(eggs, bacon, callback) {
+ execed.second = true;
+ assert.equal(1, eggs);
+ assert.equal(2, bacon);
+ callback();
+ });
+
+ hooks.execPost('cook', null, [1, 2], function(error, eggs, bacon) {
+ assert.ifError(error);
+ assert.equal(2, Object.keys(execed).length);
+ assert.ok(execed.first);
+ assert.ok(execed.second);
+ assert.equal(1, eggs);
+ assert.equal(2, bacon);
+ done();
+ });
+ });
+});
+
+describe('wrap()', function() {
+ var hooks;
+
+ beforeEach(function() {
+ hooks = new Kareem();
+ });
+
+ it('wraps pre and post calls into one call', function(done) {
+ hooks.pre('cook', true, function(next, done) {
+ this.bacon = 3;
+ next();
+ setTimeout(function() {
+ done();
+ }, 5);
+ });
+
+ hooks.pre('cook', true, function(next, done) {
+ next();
+ var _this = this;
+ setTimeout(function() {
+ _this.eggs = 4;
+ done();
+ }, 10);
+ });
+
+ hooks.pre('cook', function(next) {
+ this.waffles = false;
+ next();
+ });
+
+ hooks.post('cook', function(obj) {
+ obj.tofu = 'no';
+ });
+
+ var obj = { bacon: 0, eggs: 0 };
+
+ var args = [obj];
+ args.push(function(error, result) {
+ assert.ifError(error);
+ assert.equal(null, error);
+ assert.equal(3, obj.bacon);
+ assert.equal(4, obj.eggs);
+ assert.equal(false, obj.waffles);
+ assert.equal('no', obj.tofu);
+
+ assert.equal(obj, result);
+ done();
+ });
+
+ hooks.wrap(
+ 'cook',
+ function(o, callback) {
+ assert.equal(3, obj.bacon);
+ assert.equal(4, obj.eggs);
+ assert.equal(false, obj.waffles);
+ assert.equal(undefined, obj.tofu);
+ callback(null, o);
+ },
+ obj,
+ args);
+ });
+});
+
+describe('createWrapper()', function() {
+ var hooks;
+
+ beforeEach(function() {
+ hooks = new Kareem();
+ });
+
+ it('wraps wrap() into a callable function', function(done) {
+ hooks.pre('cook', true, function(next, done) {
+ this.bacon = 3;
+ next();
+ setTimeout(function() {
+ done();
+ }, 5);
+ });
+
+ hooks.pre('cook', true, function(next, done) {
+ next();
+ var _this = this;
+ setTimeout(function() {
+ _this.eggs = 4;
+ done();
+ }, 10);
+ });
+
+ hooks.pre('cook', function(next) {
+ this.waffles = false;
+ next();
+ });
+
+ hooks.post('cook', function(obj) {
+ obj.tofu = 'no';
+ });
+
+ var obj = { bacon: 0, eggs: 0 };
+
+ var cook = hooks.createWrapper(
+ 'cook',
+ function(o, callback) {
+ assert.equal(3, obj.bacon);
+ assert.equal(4, obj.eggs);
+ assert.equal(false, obj.waffles);
+ assert.equal(undefined, obj.tofu);
+ callback(null, o);
+ },
+ obj);
+
+ cook(obj, function(error, result) {
+ assert.ifError(error);
+ assert.equal(3, obj.bacon);
+ assert.equal(4, obj.eggs);
+ assert.equal(false, obj.waffles);
+ assert.equal('no', obj.tofu);
+
+ assert.equal(obj, result);
+ done();
+ });
+ });
+});
+
+describe('clone()', function() {
+ it('clones a Kareem object', function() {
+ var k1 = new Kareem();
+ k1.pre('cook', function() {});
+ k1.post('cook', function() {});
+
+ var k2 = k1.clone();
+ assert.deepEqual(['cook'], Object.keys(k2._pres));
+ assert.deepEqual(['cook'], Object.keys(k2._posts));
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/test/post.test.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/test/post.test.js
new file mode 100644
index 0000000..9fcbb0e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/test/post.test.js
@@ -0,0 +1,155 @@
+var assert = require('assert');
+var Kareem = require('../');
+
+describe('execPost', function() {
+ var hooks;
+
+ beforeEach(function() {
+ hooks = new Kareem();
+ });
+
+ it('handles errors', function(done) {
+ hooks.post('cook', function(eggs, callback) {
+ callback('error!');
+ });
+
+ hooks.execPost('cook', null, [4], function(error, eggs) {
+ assert.equal('error!', error);
+ assert.ok(!eggs);
+ done();
+ });
+ });
+
+ it('multiple posts', function(done) {
+ hooks.post('cook', function(eggs, callback) {
+ setTimeout(
+ function() {
+ callback();
+ },
+ 5);
+ });
+
+ hooks.post('cook', function(eggs, callback) {
+ setTimeout(
+ function() {
+ callback();
+ },
+ 5);
+ });
+
+ hooks.execPost('cook', null, [4], function(error, eggs) {
+ assert.ifError(error);
+ assert.equal(4, eggs);
+ done();
+ });
+ });
+
+ it('error posts', function(done) {
+ var called = {};
+ hooks.post('cook', function(eggs, callback) {
+ called.first = true;
+ callback();
+ });
+
+ hooks.post('cook', function(eggs, callback) {
+ called.second = true;
+ callback(new Error('fail'));
+ });
+
+ hooks.post('cook', function(eggs, callback) {
+ assert.ok(false);
+ });
+
+ hooks.post('cook', function(error, eggs, callback) {
+ called.fourth = true;
+ assert.equal(error.message, 'fail');
+ callback(new Error('fourth'));
+ });
+
+ hooks.post('cook', function(error, eggs, callback) {
+ called.fifth = true;
+ assert.equal(error.message, 'fourth');
+ callback(new Error('fifth'));
+ });
+
+ hooks.execPost('cook', null, [4], function(error, eggs) {
+ assert.ok(error);
+ assert.equal(error.message, 'fifth');
+ assert.deepEqual(called, {
+ first: true,
+ second: true,
+ fourth: true,
+ fifth: true
+ });
+ done();
+ });
+ });
+
+ it('error posts with initial error', function(done) {
+ var called = {};
+
+ hooks.post('cook', function(eggs, callback) {
+ assert.ok(false);
+ });
+
+ hooks.post('cook', function(error, eggs, callback) {
+ called.second = true;
+ assert.equal(error.message, 'fail');
+ callback(new Error('second'));
+ });
+
+ hooks.post('cook', function(error, eggs, callback) {
+ called.third = true;
+ assert.equal(error.message, 'second');
+ callback(new Error('third'));
+ });
+
+ hooks.post('cook', function(error, eggs, callback) {
+ called.fourth = true;
+ assert.equal(error.message, 'third');
+ callback();
+ });
+
+ var options = { error: new Error('fail') };
+ hooks.execPost('cook', null, [4], options, function(error, eggs) {
+ assert.ok(error);
+ assert.equal(error.message, 'third');
+ assert.deepEqual(called, {
+ second: true,
+ third: true,
+ fourth: true
+ });
+ done();
+ });
+ });
+});
+
+describe('execPostSync', function() {
+ var hooks;
+
+ beforeEach(function() {
+ hooks = new Kareem();
+ });
+
+ it('executes hooks synchronously', function() {
+ var execed = {};
+
+ hooks.post('cook', function() {
+ execed.first = true;
+ });
+
+ hooks.post('cook', function() {
+ execed.second = true;
+ });
+
+ hooks.execPostSync('cook', null);
+ assert.ok(execed.first);
+ assert.ok(execed.second);
+ });
+
+ it('works with no hooks specified', function() {
+ assert.doesNotThrow(function() {
+ hooks.execPostSync('cook', null);
+ });
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/test/pre.test.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/test/pre.test.js
new file mode 100644
index 0000000..adbbc39
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/test/pre.test.js
@@ -0,0 +1,256 @@
+var assert = require('assert');
+var Kareem = require('../');
+
+describe('execPre', function() {
+ var hooks;
+
+ beforeEach(function() {
+ hooks = new Kareem();
+ });
+
+ it('handles errors with multiple pres', function(done) {
+ var execed = {};
+
+ hooks.pre('cook', function(done) {
+ execed.first = true;
+ done();
+ });
+
+ hooks.pre('cook', function(done) {
+ execed.second = true;
+ done('error!');
+ });
+
+ hooks.pre('cook', function(done) {
+ execed.third = true;
+ done();
+ });
+
+ hooks.execPre('cook', null, function(err) {
+ assert.equal('error!', err);
+ assert.equal(2, Object.keys(execed).length);
+ assert.ok(execed.first);
+ assert.ok(execed.second);
+ done();
+ });
+ });
+
+ it('handles async errors', function(done) {
+ var execed = {};
+
+ hooks.pre('cook', true, function(next, done) {
+ execed.first = true;
+ setTimeout(
+ function() {
+ done('error!');
+ },
+ 5);
+
+ next();
+ });
+
+ hooks.pre('cook', true, function(next, done) {
+ execed.second = true;
+ setTimeout(
+ function() {
+ done('other error!');
+ },
+ 10);
+
+ next();
+ });
+
+ hooks.execPre('cook', null, function(err) {
+ assert.equal('error!', err);
+ assert.equal(2, Object.keys(execed).length);
+ assert.ok(execed.first);
+ assert.ok(execed.second);
+ done();
+ });
+ });
+
+ it('handles async errors in next()', function(done) {
+ var execed = {};
+
+ hooks.pre('cook', true, function(next, done) {
+ execed.first = true;
+ setTimeout(
+ function() {
+ done('other error!');
+ },
+ 15);
+
+ next();
+ });
+
+ hooks.pre('cook', true, function(next, done) {
+ execed.second = true;
+ setTimeout(
+ function() {
+ next('error!');
+ done('another error!');
+ },
+ 5);
+ });
+
+ hooks.execPre('cook', null, function(err) {
+ assert.equal('error!', err);
+ assert.equal(2, Object.keys(execed).length);
+ assert.ok(execed.first);
+ assert.ok(execed.second);
+ done();
+ });
+ });
+
+ it('handles async errors in next() when already done', function(done) {
+ var execed = {};
+
+ hooks.pre('cook', true, function(next, done) {
+ execed.first = true;
+ setTimeout(
+ function() {
+ done('other error!');
+ },
+ 5);
+
+ next();
+ });
+
+ hooks.pre('cook', true, function(next, done) {
+ execed.second = true;
+ setTimeout(
+ function() {
+ next('error!');
+ done('another error!');
+ },
+ 25);
+ });
+
+ hooks.execPre('cook', null, function(err) {
+ assert.equal('other error!', err);
+ assert.equal(2, Object.keys(execed).length);
+ assert.ok(execed.first);
+ assert.ok(execed.second);
+ done();
+ });
+ });
+
+ it('returns correct error when async pre errors', function(done) {
+ var execed = {};
+
+ hooks.pre('cook', true, function(next, done) {
+ execed.first = true;
+ setTimeout(
+ function() {
+ done('other error!');
+ },
+ 5);
+
+ next();
+ });
+
+ hooks.pre('cook', function(next) {
+ execed.second = true;
+ setTimeout(
+ function() {
+ next('error!');
+ },
+ 15);
+ });
+
+ hooks.execPre('cook', null, function(err) {
+ assert.equal('other error!', err);
+ assert.equal(2, Object.keys(execed).length);
+ assert.ok(execed.first);
+ assert.ok(execed.second);
+ done();
+ });
+ });
+
+ it('lets async pres run when fully sync pres are done', function(done) {
+ var execed = {};
+
+ hooks.pre('cook', true, function(next, done) {
+ execed.first = true;
+ setTimeout(
+ function() {
+ done();
+ },
+ 5);
+
+ next();
+ });
+
+ hooks.pre('cook', function() {
+ execed.second = true;
+ });
+
+ hooks.execPre('cook', null, function(err) {
+ assert.ifError(err);
+ assert.equal(2, Object.keys(execed).length);
+ assert.ok(execed.first);
+ assert.ok(execed.second);
+ done();
+ });
+ });
+
+ it('allows passing arguments to the next pre', function(done) {
+ var execed = {};
+
+ hooks.pre('cook', function(next) {
+ execed.first = true;
+ next(null, 'test');
+ });
+
+ hooks.pre('cook', function(next, p) {
+ execed.second = true;
+ assert.equal(p, 'test');
+ next();
+ });
+
+ hooks.pre('cook', function(next, p) {
+ execed.third = true;
+ assert.ok(!p);
+ next();
+ });
+
+ hooks.execPre('cook', null, function(err) {
+ assert.ifError(err);
+ assert.equal(3, Object.keys(execed).length);
+ assert.ok(execed.first);
+ assert.ok(execed.second);
+ assert.ok(execed.third);
+ done();
+ });
+ });
+});
+
+describe('execPreSync', function() {
+ var hooks;
+
+ beforeEach(function() {
+ hooks = new Kareem();
+ });
+
+ it('executes hooks synchronously', function() {
+ var execed = {};
+
+ hooks.pre('cook', function() {
+ execed.first = true;
+ });
+
+ hooks.pre('cook', function() {
+ execed.second = true;
+ });
+
+ hooks.execPreSync('cook', null);
+ assert.ok(execed.first);
+ assert.ok(execed.second);
+ });
+
+ it('works with no hooks specified', function() {
+ assert.doesNotThrow(function() {
+ hooks.execPreSync('cook', null);
+ });
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/test/wrap.test.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/test/wrap.test.js
new file mode 100644
index 0000000..b3fe7d0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/kareem/test/wrap.test.js
@@ -0,0 +1,347 @@
+var assert = require('assert');
+var Kareem = require('../');
+
+describe('wrap()', function() {
+ var hooks;
+
+ beforeEach(function() {
+ hooks = new Kareem();
+ });
+
+ it('handles pre errors', function(done) {
+ hooks.pre('cook', function(done) {
+ done('error!');
+ });
+
+ hooks.post('cook', function(obj) {
+ obj.tofu = 'no';
+ });
+
+ var obj = { bacon: 0, eggs: 0 };
+
+ var args = [obj];
+ args.push(function(error, result) {
+ assert.equal('error!', error);
+ assert.ok(!result);
+ assert.equal(undefined, obj.tofu);
+ done();
+ });
+
+ hooks.wrap(
+ 'cook',
+ function(o, callback) {
+ // Should never get called
+ assert.ok(false);
+ callback(null, o);
+ },
+ obj,
+ args);
+ });
+
+ it('handles pre errors when no callback defined', function(done) {
+ hooks.pre('cook', function(done) {
+ done('error!');
+ });
+
+ hooks.post('cook', function(obj) {
+ obj.tofu = 'no';
+ });
+
+ var obj = { bacon: 0, eggs: 0 };
+
+ var args = [obj];
+
+ hooks.wrap(
+ 'cook',
+ function(o, callback) {
+ // Should never get called
+ assert.ok(false);
+ callback(null, o);
+ },
+ obj,
+ args);
+
+ setTimeout(
+ function() {
+ done();
+ },
+ 25);
+ });
+
+ it('handles errors in wrapped function', function(done) {
+ hooks.pre('cook', function(done) {
+ done();
+ });
+
+ hooks.post('cook', function(obj) {
+ obj.tofu = 'no';
+ });
+
+ var obj = { bacon: 0, eggs: 0 };
+
+ var args = [obj];
+ args.push(function(error, result) {
+ assert.equal('error!', error);
+ assert.ok(!result);
+ assert.equal(undefined, obj.tofu);
+ done();
+ });
+
+ hooks.wrap(
+ 'cook',
+ function(o, callback) {
+ callback('error!');
+ },
+ obj,
+ args);
+ });
+
+ it('handles errors in post', function(done) {
+ hooks.pre('cook', function(done) {
+ done();
+ });
+
+ hooks.post('cook', function(obj, callback) {
+ obj.tofu = 'no';
+ callback('error!');
+ });
+
+ var obj = { bacon: 0, eggs: 0 };
+
+ var args = [obj];
+ args.push(function(error, result) {
+ assert.equal('error!', error);
+ assert.ok(!result);
+ assert.equal('no', obj.tofu);
+ done();
+ });
+
+ hooks.wrap(
+ 'cook',
+ function(o, callback) {
+ callback(null, o);
+ },
+ obj,
+ args);
+ });
+
+ it('defers errors to post hooks if enabled', function(done) {
+ hooks.pre('cook', function(done) {
+ done(new Error('fail'));
+ });
+
+ hooks.post('cook', function(error, callback) {
+ callback(new Error('another error occurred'));
+ });
+
+ var args = [];
+ args.push(function(error) {
+ assert.equal(error.message, 'another error occurred');
+ done();
+ });
+
+ hooks.wrap(
+ 'cook',
+ function(callback) {
+ assert.ok(false);
+ callback();
+ },
+ null,
+ args,
+ { useErrorHandlers: true });
+ });
+
+ it('error handlers with no callback', function(done) {
+ hooks.pre('cook', function(done) {
+ done(new Error('fail'));
+ });
+
+ hooks.post('cook', function(error, callback) {
+ assert.equal(error.message, 'fail');
+ done();
+ });
+
+ var args = [];
+
+ hooks.wrap(
+ 'cook',
+ function(callback) {
+ assert.ok(false);
+ callback();
+ },
+ null,
+ args,
+ { useErrorHandlers: true });
+ });
+
+ it('error handlers with no error', function(done) {
+ hooks.post('cook', function(error, callback) {
+ callback(new Error('another error occurred'));
+ });
+
+ var args = [];
+ args.push(function(error) {
+ assert.ifError(error);
+ done();
+ });
+
+ hooks.wrap(
+ 'cook',
+ function(callback) {
+ callback();
+ },
+ null,
+ args,
+ { useErrorHandlers: true });
+ });
+
+ it('works with no args', function(done) {
+ hooks.pre('cook', function(done) {
+ done();
+ });
+
+ hooks.post('cook', function(callback) {
+ obj.tofu = 'no';
+ callback();
+ });
+
+ var obj = { bacon: 0, eggs: 0 };
+
+ var args = [];
+
+ hooks.wrap(
+ 'cook',
+ function(callback) {
+ callback(null);
+ },
+ obj,
+ args);
+
+ setTimeout(
+ function() {
+ assert.equal('no', obj.tofu);
+ done();
+ },
+ 25);
+ });
+
+ it('handles pre errors with no args', function(done) {
+ hooks.pre('cook', function(done) {
+ done('error!');
+ });
+
+ hooks.post('cook', function(callback) {
+ obj.tofu = 'no';
+ callback();
+ });
+
+ var obj = { bacon: 0, eggs: 0 };
+
+ var args = [];
+
+ hooks.wrap(
+ 'cook',
+ function(callback) {
+ callback(null);
+ },
+ obj,
+ args);
+
+ setTimeout(
+ function() {
+ assert.equal(undefined, obj.tofu);
+ done();
+ },
+ 25);
+ });
+
+ it('handles wrapped function errors with no args', function(done) {
+ hooks.pre('cook', function(done) {
+ obj.waffles = false;
+ done();
+ });
+
+ hooks.post('cook', function(callback) {
+ obj.tofu = 'no';
+ callback();
+ });
+
+ var obj = { bacon: 0, eggs: 0 };
+
+ var args = [];
+
+ hooks.wrap(
+ 'cook',
+ function(callback) {
+ callback('error!');
+ },
+ obj,
+ args);
+
+ setTimeout(
+ function() {
+ assert.equal(false, obj.waffles);
+ assert.equal(undefined, obj.tofu);
+ done();
+ },
+ 25);
+ });
+
+ it('handles post errors with no args', function(done) {
+ hooks.pre('cook', function(done) {
+ obj.waffles = false;
+ done();
+ });
+
+ hooks.post('cook', function(callback) {
+ obj.tofu = 'no';
+ callback('error!');
+ });
+
+ var obj = { bacon: 0, eggs: 0 };
+
+ var args = [];
+
+ hooks.wrap(
+ 'cook',
+ function(callback) {
+ callback();
+ },
+ obj,
+ args);
+
+ setTimeout(
+ function() {
+ assert.equal(false, obj.waffles);
+ assert.equal('no', obj.tofu);
+ done();
+ },
+ 25);
+ });
+
+ it('can use legacy post behavior', function(done) {
+ var called = 0;
+ hooks.post('cook', function(callback) {
+ ++called;
+ callback();
+ });
+
+ var args = [function(error) {
+ assert.equal(called, 0);
+
+ setTimeout(function() {
+ assert.equal(called, 1);
+ done();
+ }, 0);
+ }];
+
+ hooks.wrap(
+ 'cook',
+ function(callback) {
+ callback();
+ },
+ null,
+ args,
+ true);
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/.coveralls.yml b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/.coveralls.yml
new file mode 100644
index 0000000..ad1e93c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/.coveralls.yml
@@ -0,0 +1 @@
+repo_token: GZFmqKPy7XEX0uOl9TDZFUoOQ5AHADMkU
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/HISTORY.md
new file mode 100644
index 0000000..0c03f52
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/HISTORY.md
@@ -0,0 +1,1547 @@
+2.2.11 2016-10-21
+-----------------
+* Updated mongodb-core to 2.0.13.
+ - Fire callback when topology was destroyed (Issue #147, https://github.com/vkarpov15).
+ - Refactoring to support pipelining ala 1.4.x branch will retaining the benefits of the growing/shrinking pool (Issue #146).
+ - Fix typo in serverHeartbeatFailed event name (Issue #143, https://github.com/jakesjews).
+ - NODE-798 Driver hangs on count command in replica set with one member (Issue #141, https://github.com/isayme).
+* Updated bson library to 0.5.6.
+ - Included cyclic dependency detection
+* Fix typo in serverHeartbeatFailed event name (Issue #1418, https://github.com/jakesjews).
+* NODE-824, readPreference "nearest" does not work when specified at collection level.
+* NODE-822, GridFSBucketWriteStream end method does not handle optional parameters.
+* NODE-823, GridFSBucketWriteStream end: callback is invoked with invalid parameters.
+* NODE-829, Using Start/End offset option in GridFSBucketReadStream doesn't return the right sized buffer.
+
+2.2.10 2016-09-15
+-----------------
+* Updated mongodb-core to 2.0.12.
+* fix debug logging message not printing server name.
+* fixed application metadata being sent by wrong ismaster.
+* NODE-812 Fixed mongos stall due to proxy monitoring ismaster failure causing reconnect.
+* NODE-818 Replicaset timeouts in initial connect sequence can "no primary found".
+* Updated bson library to 0.5.5.
+* Added DBPointer up conversion to DBRef.
+* MongoDB 3.4-RC Pass **appname** through MongoClient.connect uri or options to allow metadata to be passed.
+* MongoDB 3.4-RC Pass collation options on update, findOne, find, createIndex, aggregate.
+* MongoDB 3.4-RC Allow write concerns to be passed to all supporting server commands.
+* MongoDB 3.4-RC Allow passing of **servername** as SSL options to support SNI.
+
+2.2.9 2016-08-29
+----------------
+* Updated mongodb-core to 2.0.11.
+* NODE-803, Fixed issue in how the latency window is calculated for Mongos topology causing issues for single proxy connections.
+* Avoid timeout in attemptReconnect causing multiple attemptReconnect attempts to happen (Issue #134, https://github.com/dead-horse).
+* Ensure promoteBuffers is propegated in same fashion as promoteValues and promoteLongs.
+* Don't treat ObjectId as object for mapReduce scope (Issue #1397, https://github.com/vkarpov15).
+
+2.2.8 2016-08-23
+----------------
+* Updated mongodb-core to 2.0.10.
+* Added promoteValues flag (default to true) to allow user to specify they only want wrapped BSON values back instead of promotion to native types.
+* Do not close mongos proxy connection on failed ismaster check in ha process (Issue #130).
+
+2.2.7 2016-08-19
+----------------
+* If only a single mongos is provided in the seedlist, fix issue where it would be assigned as single standalone server instead of mongos topology (Issue #130).
+* Updated mongodb-core to 2.0.9.
+* Allow promoteLongs to be passed in through Response.parse method and overrides default set on the connection.
+* NODE-798 Driver hangs on count command in replica set with one member.
+* Allow promoteLongs to be passed in through Response.parse method and overrides default set on the connection.
+* Allow passing in servername for TLS connections for SNI support.
+
+2.2.6 2016-08-16
+----------------
+* Updated mongodb-core to 2.0.8.
+* Allow execution of store operations independent of having both a primary and secondary available (Issue #123).
+* Fixed command execution issue for mongos to ensure buffering of commands when no mongos available.
+* Allow passing in an array of tags to ReadPreference constructor (Issue #1382, https://github.com/vkarpov15)
+* Added hashed connection names and fullResult.
+* Updated bson library to 0.5.3.
+* Enable maxTimeMS in count, distinct, findAndModify.
+
+2.2.5 2016-07-28
+----------------
+* Updated mongodb-core to 2.0.7.
+* Allow primary to be returned when secondaryPreferred is passed (Issue #117, https://github.com/dhendo).
+* Added better warnings when passing in illegal seed list members to a Mongos topology.
+* Minor attemptReconnect bug that would cause multiple attemptReconnect to run in parallel.
+* Fix wrong opType passed to disconnectHandler.add (Issue #121, https://github.com/adrian-gierakowski)
+* Implemented domain backward comp support enabled via domainsEnabled options on Server/ReplSet/Mongos and MongoClient.connect.
+
+2.2.4 2016-07-19
+----------------
+* NPM corrupted upload fix.
+
+2.2.3 2016-07-19
+----------------
+* Updated mongodb-core to 2.0.6.
+* Destroy connection on socket timeout due to newer node versions not closing the socket.
+
+2.2.2 2016-07-15
+----------------
+* Updated mongodb-core to 2.0.5.
+* Minor fixes to handle faster MongoClient connectivity from the driver, allowing single server instances to detect if they are a proxy.
+* Added numberOfConsecutiveTimeouts to pool that will destroy the pool if the number of consecutive timeouts > reconnectTries.
+* Print warning if seedlist servers host name does not match the one provided in it's ismaster.me field for Replicaset members.
+* Fix issue where Replicaset connection would not succeeed if there the replicaset was a single primary server setup.
+
+2.2.1 2016-07-11
+----------------
+* Updated mongodb-core to 2.0.4.
+* handle situation where user is providing seedlist names that do not match host list. fix allows for a single full discovery connection sweep before erroring out.
+* NODE-747 Polyfill for Object.assign for 0.12.x or 0.10.x.
+* NODE-746 Improves replicaset errors for wrong setName.
+
+2.2.0 2016-07-05
+----------------
+* Updated mongodb-core to 2.0.3.
+* Moved all authentication and handling of growing/shrinking of pool connections into actual pool.
+* All authentication methods now handle both auth/reauthenticate and logout events.
+* Introduced logout method to get rid of onAll option for logout command.
+* Updated bson to 0.5.0 that includes Decimal128 support.
+* Fixed logger error serialization issue.
+* Documentation fixes.
+* Implemented Server Selection Specification test suite.
+* Added warning level to logger.
+* Added warning message when sockeTimeout < haInterval for Replset/Mongos.
+* Mongos emits close event on no proxies available or when reconnect attempt fails.
+* Replset emits close event when no servers available or when attemptReconnect fails to reconnect.
+* Don't throw in auth methods but return error in callback.
+
+2.1.21 2016-05-30
+-----------------
+* Updated mongodb-core to 1.3.21.
+* Pool gets stuck if a connection marked for immediateRelease times out (Issue #99, https://github.com/nbrachet).
+* Make authentication process retry up to authenticationRetries at authenticationRetryIntervalMS interval.
+* Made ismaster replicaset calls operate with connectTimeout or monitorSocketTimeout to lower impact of big socketTimeouts on monitoring performance.
+* Make sure connections mark as "immediateRelease" don't linger the inUserConnections list. Otherwise, after that connection times out, getAll() incorrectly returns more connections than are effectively present, causing the pool to not get restarted by reconnectServer. (Issue #99, https://github.com/nbrachet).
+* Make cursor getMore or killCursor correctly trigger pool reconnect to single server if pool has not been destroyed.
+* Make ismaster monitoring for single server connection default to avoid user confusion due to change in behavior.
+
+2.1.20 2016-05-25
+-----------------
+* Refactored MongoClient options handling to simplify the logic, unifying it.
+* NODE-707 Implemented openUploadStreamWithId on GridFS to allow for custom fileIds so users are able to customize shard key and shard distribution.
+* NODE-710 Allow setting driver loggerLevel and logger function from MongoClient options.
+* Updated mongodb-core to 1.3.20.
+* Minor fix for SSL errors on connection attempts, minor fix to reconnect handler for the server.
+* Don't write to socket before having registered the callback for commands, work around for windows issuing error events twice on node.js when socket gets destroyed by firewall.
+* Fix minor issue where connectingServers would not be removed correctly causing single server connections to not auto-reconnect.
+
+2.1.19 2016-05-17
+----------------
+* Handle situation where a server connection in a replicaset sometimes fails to be destroyed properly due to being in the middle of authentication when the destroy method is called on the replicaset causing it to be orphaned and never collected.
+* Ensure replicaset topology destroy is never called by SDAM.
+* Ensure all paths are correctly returned on inspectServer in replset.
+* Updated mongodb-core to 1.3.19 to fix minor connectivity issue on quick open/close of MongoClient connections on auth enabled mongodb Replicasets.
+
+2.1.18 2016-04-27
+-----------------
+* Updated mongodb-core to 1.3.18 to fix Node 6.0 issues.
+
+2.1.17 2016-04-26
+-----------------
+* Updated mongodb-core to 1.3.16 to work around issue with early versions of node 0.10.x due to missing unref method on ClearText streams.
+* INT-1308: Allow listIndexes to inherit readPreference from Collection or DB.
+* Fix timeout issue using new flags #1361.
+* Updated mongodb-core to 1.3.17.
+* Better handling of unique createIndex error.
+* Emit error only if db instance has an error listener.
+* DEFAULT authMechanism; don't throw error if explicitly set by user.
+
+2.1.16 2016-04-06
+-----------------
+* Updated mongodb-core to 1.3.16.
+
+2.1.15 2016-04-06
+-----------------
+* Updated mongodb-core to 1.3.15.
+* Set ssl, sslValidate etc to mongosOptions on url_parser (Issue #1352, https://github.com/rubenstolk).
+- NODE-687 Fixed issue where a server object failed to be destroyed if the replicaset state did not update successfully. This could leave active connections accumulating over time.
+- Fixed some situations where all connections are flushed due to a single connection in the connection pool closing.
+
+2.1.14 2016-03-29
+-----------------
+* Updated mongodb-core to 1.3.13.
+* Handle missing cursor on getMore when going through a mongos proxy by pinning to socket connection and not server.
+
+2.1.13 2016-03-29
+-----------------
+* Updated mongodb-core to 1.3.12.
+
+2.1.12 2016-03-29
+-----------------
+* Updated mongodb-core to 1.3.11.
+* Mongos setting acceptableLatencyMS exposed to control the latency women for mongos selection.
+* Mongos pickProxies fall back to closest mongos if no proxies meet latency window specified.
+* isConnected method for mongos uses same selection code as getServer.
+* Exceptions in cursor getServer trapped and correctly delegated to high level handler.
+
+2.1.11 2016-03-23
+-----------------
+* Updated mongodb-core to 1.3.10.
+* Introducing simplified connections settings.
+
+2.1.10 2016-03-21
+-----------------
+* Updated mongodb-core to 1.3.9.
+* Fixing issue that prevented mapReduce stats from being resolved (Issue #1351, https://github.com/davidgtonge)
+* Forwards SDAM monitoring events from mongodb-core.
+
+2.1.9 2016-03-16
+----------------
+* Updated mongodb-core to 1.3.7 to fix intermittent race condition that causes some users to experience big amounts of socket connections.
+* Makde bson parser in ordered/unordered bulk be directly from mongodb-core to avoid intermittent null error on mongoose.
+
+2.1.8 2016-03-14
+----------------
+* Updated mongodb-core to 1.3.5.
+* NODE-660 TypeError: Cannot read property 'noRelease' of undefined.
+* Harden MessageHandler in server.js to avoid issues where we cannot find a callback for an operation.
+* Ensure RequestId can never be larger than Max Number integer size.
+* NODE-661 typo in url_parser.js resulting in replSetServerOptions is not defined when connecting over ssl.
+* Confusing error with invalid partial index filter (Issue #1341, https://github.com/vkarpov15).
+* NODE-669 Should only error out promise for bulkWrite when error is a driver level error not a write error or write concern error.
+* NODE-662 shallow copy options on methods that are not currently doing it to avoid passed in options mutiation.
+* NODE-663 added lookup helper on aggregation cursor.
+* NODE-585 Result object specified incorrectly for findAndModify?.
+* NODE-666 harden validation for findAndModify CRUD methods.
+
+2.1.7 2016-02-09
+----------------
+* NODE-656 fixed corner case where cursor count command could be left without a connection available.
+* NODE-658 Work around issue that bufferMaxEntries:-1 for js gets interpreted wrongly due to double nature of Javascript numbers.
+* Fix: GridFS always returns the oldest version due to incorrect field name (Issue #1338, https://github.com/mdebruijne).
+* NODE-655 GridFS stream support for cancelling upload streams and download streams (Issue #1339, https://github.com/vkarpov15).
+* NODE-657 insertOne don`t return promise in some cases.
+* Added destroy alias for abort function on GridFSBucketWriteStream.
+
+2.1.6 2016-02-05
+----------------
+* Updated mongodb-core to 1.3.1.
+
+2.1.5 2016-02-04
+----------------
+* Updated mongodb-core to 1.3.0.
+* Added raw support for the command function on topologies.
+* Fixed issue where raw results that fell on batchSize boundaries failed (Issue #72)
+* Copy over all the properties to the callback returned from bindToDomain, (Issue #72)
+* Added connection hash id to be able to reference connection host/name without leaking it outside of driver.
+* NODE-638, Cannot authenticate database user with utf-8 password.
+* Refactored pool to be worker queue based, minimizing the impact a slow query have on throughput as long as # slow queries < # connections in the pool.
+* Pool now grows and shrinks correctly depending on demand not causing a full pool reconnect.
+* Improvements in monitoring of a Replicaset where in certain situations the inquiry process could get exited.
+* Switched to using Array.push instead of concat for use cases of a lot of documents.
+* Fixed issue where re-authentication could loose the credentials if whole Replicaset disconnected at once.
+* Added peer optional dependencies support using require_optional module.
+* Bug is listCollections for collection names that start with db name (Issue #1333, https://github.com/flyingfisher)
+* Emit error before closing stream (Issue #1335, https://github.com/eagleeye)
+
+2.1.4 2016-01-12
+----------------
+* Restricted node engine to >0.10.3 (https://jira.mongodb.org/browse/NODE-635).
+* Multiple database names ignored without a warning (https://jira.mongodb.org/browse/NODE-636, Issue #1324, https://github.com/yousefhamza).
+* Convert custom readPreference objects in collection.js (Issue #1326, https://github.com/Machyne).
+
+2.1.3 2016-01-04
+----------------
+* Updated mongodb-core to 1.2.31.
+* Allow connection to secondary if primaryPreferred or secondaryPreferred (Issue #70, https://github.com/leichter)
+
+2.1.2 2015-12-23
+----------------
+* Updated mongodb-core to 1.2.30.
+* Pool allocates size + 1 connections when using replicasets, reserving additional pool connection for monitoring exclusively.
+* Fixes bug when all replicaset members are down, that would cause it to fail to reconnect using the originally provided seedlist.
+
+2.1.1 2015-12-13
+----------------
+* Surfaced checkServerIdentity options for MongoClient, Server, ReplSet and Mongos to allow for control of the checkServerIdentity method available in Node.s 0.12.x or higher.
+* Added readPreference support to listCollections and listIndexes helpers.
+* Updated mongodb-core to 1.2.28.
+
+2.1.0 2015-12-06
+----------------
+* Implements the connection string specification, https://github.com/mongodb/specifications/blob/master/source/connection-string/connection-string-spec.rst.
+* Implements the new GridFS specification, https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.rst.
+* Full MongoDB 3.2 support.
+* NODE-601 Added maxAwaitTimeMS support for 3.2 getMore to allow for custom timeouts on tailable cursors.
+* Updated mongodb-core to 1.2.26.
+* Return destination in GridStore pipe function.
+* NODE-606 better error handling on destroyed topology for db.js methods.
+* Added isDestroyed method to server, replset and mongos topologies.
+* Upgraded test suite to run using mongodb-topology-manager.
+
+2.0.53 2015-12-23
+-----------------
+* Updated mongodb-core to 1.2.30.
+* Pool allocates size + 1 connections when using replicasets, reserving additional pool connection for monitoring exclusively.
+* Fixes bug when all replicaset members are down, that would cause it to fail to reconnect using the originally provided seedlist.
+
+2.0.52 2015-12-14
+-----------------
+* removed remove from Gridstore.close.
+
+2.0.51 2015-12-13
+-----------------
+* Surfaced checkServerIdentity options for MongoClient, Server, ReplSet and Mongos to allow for control of the checkServerIdentity method available in Node.s 0.12.x or higher.
+* Added readPreference support to listCollections and listIndexes helpers.
+* Updated mongodb-core to 1.2.28.
+
+2.0.50 2015-12-06
+-----------------
+* Updated mongodb-core to 1.2.26.
+
+2.0.49 2015-11-20
+-----------------
+* Updated mongodb-core to 1.2.24 with several fixes.
+ * Fix Automattic/mongoose#3481; flush callbacks on error, (Issue #57, https://github.com/vkarpov15).
+ * $explain query for wire protocol 2.6 and 2.4 does not set number of returned documents to -1 but to 0.
+ * ismaster runs against admin.$cmd instead of system.$cmd.
+ * Fixes to handle getMore command errors for MongoDB 3.2
+ * Allows the process to properly close upon a Db.close() call on the replica set by shutting down the haTimer and closing arbiter connections.
+
+2.0.48 2015-11-07
+-----------------
+* GridFS no longer performs any deletes when writing a brand new file that does not have any previous <db>.fs.chunks or <db>.fs.files documents.
+* Updated mongodb-core to 1.2.21.
+* Hardened the checking for replicaset equality checks.
+* OpReplay flag correctly set on Wire protocol query.
+* Mongos load balancing added, introduced localThresholdMS to control the feature.
+* Kerberos now a peerDependency, making it not install it by default in Node 5.0 or higher.
+
+2.0.47 2015-10-28
+-----------------
+* Updated mongodb-core to 1.2.20.
+* Fixed bug in arbiter connection capping code.
+* NODE-599 correctly handle arrays of server tags in order of priority.
+* Fix for 2.6 wire protocol handler related to readPreference handling.
+* Added maxAwaitTimeMS support for 3.2 getMore to allow for custom timeouts on tailable cursors.
+* Make CoreCursor check for $err before saying that 'next' succeeded (Issue #53, https://github.com/vkarpov15).
+
+2.0.46 2015-10-15
+-----------------
+* Updated mongodb-core to 1.2.19.
+* NODE-578 Order of sort fields is lost for numeric field names.
+* Expose BSON Map (ES6 Map or polyfill).
+* Minor fixes for APM support to pass extended APM test suite.
+
+2.0.45 2015-09-30
+-----------------
+* NODE-566 Fix issue with rewind on capped collections causing cursor state to be reset on connection loss.
+
+2.0.44 2015-09-28
+-----------------
+* Bug fixes for APM upconverting of legacy INSERT/UPDATE/REMOVE wire protocol messages.
+* NODE-562, fixed issue where a Replicaset MongoDB URI with a single seed and replSet name set would cause a single direct connection instead of topology discovery.
+* Updated mongodb-core to 1.2.14.
+* NODE-563 Introduced options.ignoreUndefined for db class and MongoClient db options, made serialize undefined to null default again but allowing for overrides on insert/update/delete operations.
+* Use handleCallback if result is an error for count queries. (Issue #1298, https://github.com/agclever)
+* Rewind cursor to correctly force reconnect on capped collections when first query comes back empty.
+* NODE-571 added code 59 to legacy server errors when SCRAM-SHA-1 mechanism fails.
+* NODE-572 Remove examples that use the second parameter to `find()`.
+
+2.0.43 2015-09-14
+-----------------
+* Propagate timeout event correctly to db instances.
+* Application Monitoring API (APM) implemented.
+* NOT providing replSet name in MongoClient connection URI will force single server connection. Fixes issue where it was impossible to directly connect to a replicaset member server.
+* Updated mongodb-core to 1.2.12.
+* NODE-541 Initial Support "read committed" isolation level where "committed" means confimed by the voting majority of a replica set.
+* GridStore doesn't share readPreference setting from connection string. (Issue #1295, https://github.com/zhangyaoxing)
+* fixed forceServerObjectId calls (Issue #1292, https://github.com/d-mon-)
+* Pass promise library through to DB function (Issue #1294, https://github.com/RovingCodeMonkey)
+
+2.0.42 2015-08-18
+-----------------
+* Added test case to exercise all non-crud methods on mongos topologies, fixed numberOfConnectedServers on mongos topology instance.
+
+2.0.41 2015-08-14
+-----------------
+* Added missing Mongos.prototype.parserType function.
+* Updated mongodb-core to 1.2.10.
+
+2.0.40 2015-07-14
+-----------------
+* Updated mongodb-core to 1.2.9 for 2.4 wire protocol error handler fix.
+* NODE-525 Reset connectionTimeout after it's overwritten by tls.connect.
+* NODE-518 connectTimeoutMS is doubled in 2.0.39.
+* NODE-506 Ensures that errors from bulk unordered and ordered are instanceof Error (Issue #1282, https://github.com/owenallenaz).
+* NODE-526 Unique index not throwing duplicate key error.
+* NODE-528 Ignore undefined fields in Collection.find().
+* NODE-527 The API example for collection.createIndex shows Db.createIndex functionality.
+
+2.0.39 2015-07-14
+-----------------
+* Updated mongodb-core to 1.2.6 for NODE-505.
+
+2.0.38 2015-07-14
+-----------------
+* NODE-505 Query fails to find records that have a 'result' property with an array value.
+
+2.0.37 2015-07-14
+-----------------
+* NODE-504 Collection * Default options when using promiseLibrary.
+* NODE-500 Accidental repeat of hostname in seed list multiplies total connections persistently.
+* Updated mongodb-core to 1.2.5 to fix NODE-492.
+
+2.0.36 2015-07-07
+-----------------
+* Fully promisified allowing the use of ES6 generators and libraries like co. Also allows for BYOP (Bring your own promises).
+* NODE-493 updated mongodb-core to 1.2.4 to ensure we cannot DDOS the mongod or mongos process on large connection pool sizes.
+
+2.0.35 2015-06-17
+-----------------
+* Upgraded to mongodb-core 1.2.2 including removing warnings when C++ bson parser is not available and a fix for SCRAM authentication.
+
+2.0.34 2015-06-17
+-----------------
+* Upgraded to mongodb-core 1.2.1 speeding up serialization and removing the need for the c++ bson extension.
+* NODE-486 fixed issue related to limit and skip when calling toArray in 2.0 driver.
+* NODE-483 throw error if capabilities of topology is queries before topology has performed connection setup.
+* NODE-482 fixed issue where MongoClient.connect would incorrectly identify a replset seed list server as a non replicaset member.
+* NODE-487 fixed issue where killcursor command was not being sent correctly on limit and skip queries.
+
+2.0.33 2015-05-20
+-----------------
+* Bumped mongodb-core to 1.1.32.
+
+2.0.32 2015-05-19
+-----------------
+* NODE-463 db.close immediately executes its callback.
+* Don't only emit server close event once (Issue #1276, https://github.com/vkarpov15).
+* NODE-464 Updated mongodb-core to 1.1.31 that uses a single socket connection to arbiters and hidden servers as well as emitting all event correctly.
+
+2.0.31 2015-05-08
+-----------------
+* NODE-461 Tripping on error "no chunks found for file, possibly corrupt" when there is no error.
+
+2.0.30 2015-05-07
+-----------------
+* NODE-460 fix; don't set authMechanism for user in db.authenticate() to avoid mongoose authentication issue.
+
+2.0.29 2015-05-07
+-----------------
+* NODE-444 Possible memory leak, too many listeners added.
+* NODE-459 Auth failure using Node 0.8.28, MongoDB 3.0.2 & mongodb-node-native 1.4.35.
+* Bumped mongodb-core to 1.1.26.
+
+2.0.28 2015-04-24
+-----------------
+* Bumped mongodb-core to 1.1.25
+* Added Cursor.prototype.setCursorOption to allow for setting node specific cursor options for tailable cursors.
+* NODE-430 Cursor.count() opts argument masked by var opts = {}
+* NODE-406 Implemented Cursor.prototype.map function tapping into MongoClient cursor transforms.
+* NODE-438 replaceOne is not returning the result.ops property as described in the docs.
+* NODE-433 _read, pipe and write all open gridstore automatically if not open.
+* NODE-426 ensure drain event is emitted after write function returns, fixes intermittent issues in writing files to gridstore.
+* NODE-440 GridStoreStream._read() doesn't check GridStore.read() error.
+* Always use readPreference = primary for findAndModify command (ignore passed in read preferences) (Issue #1274, https://github.com/vkarpov15).
+* Minor fix in GridStore.exists for dealing with regular expressions searches.
+
+2.0.27 2015-04-07
+-----------------
+* NODE-410 Correctly handle issue with pause/resume in Node 0.10.x that causes exceptions when using the Node 0.12.0 style streams.
+
+2.0.26 2015-04-07
+-----------------
+* Implements the Common Index specification Standard API at https://github.com/mongodb/specifications/blob/master/source/index-management.rst.
+* NODE-408 Expose GridStore.currentChunk.chunkNumber.
+
+2.0.25 2015-03-26
+-----------------
+* Upgraded mongodb-core to 1.1.21, making the C++ bson code an optional dependency to the bson module.
+
+2.0.24 2015-03-24
+-----------------
+* NODE-395 Socket Not Closing, db.close called before full set finished initalizing leading to server connections in progress not being closed properly.
+* Upgraded mongodb-core to 1.1.20.
+
+2.0.23 2015-03-21
+-----------------
+* NODE-380 Correctly return MongoError from toError method.
+* Fixed issue where addCursorFlag was not correctly setting the flag on the command for mongodb-core.
+* NODE-388 Changed length from method to property on order.js/unordered.js bulk operations.
+* Upgraded mongodb-core to 1.1.19.
+
+2.0.22 2015-03-16
+-----------------
+* NODE-377, fixed issue where tags would correctly be checked on secondary and nearest to filter out eligible server candidates.
+* Upgraded mongodb-core to 1.1.17.
+
+2.0.21 2015-03-06
+-----------------
+* Upgraded mongodb-core to 1.1.16 making sslValidate default to true to force validation on connection unless overriden by the user.
+
+2.0.20 2015-03-04
+-----------------
+* Updated mongodb-core 1.1.15 to relax pickserver method.
+
+2.0.19 2015-03-03
+-----------------
+* NODE-376 Fixes issue * Unordered batch incorrectly tracks batch size when switching batch types (Issue #1261, https://github.com/meirgottlieb)
+* NODE-379 Fixes bug in cursor.count() that causes the result to always be zero for dotted collection names (Issue #1262, https://github.com/vsivsi)
+* Expose MongoError from mongodb-core (Issue #1260, https://github.com/tjconcept)
+
+2.0.18 2015-02-27
+-----------------
+* Bumped mongodb-core 1.1.14 to ensure passives are correctly added as secondaries.
+
+2.0.17 2015-02-27
+-----------------
+* NODE-336 Added length function to ordered and unordered bulk operations to be able know the amount of current operations in bulk.
+* Bumped mongodb-core 1.1.13 to ensure passives are correctly added as secondaries.
+
+2.0.16 2015-02-16
+-----------------
+* listCollection now returns filtered result correctly removing db name for 2.6 or earlier servers.
+* Bumped mongodb-core 1.1.12 to correctly work for node 0.12.0 and io.js.
+* Add ability to get collection name from cursor (Issue #1253, https://github.com/vkarpov15)
+
+2.0.15 2015-02-02
+-----------------
+* Unified behavior of listCollections results so 3.0 and pre 3.0 return same type of results.
+* Bumped mongodb-core to 1.1.11 to support per document tranforms in cursors as well as relaxing the setName requirement.
+* NODE-360 Aggregation cursor and command correctly passing down the maxTimeMS property.
+* Added ~1.0 mongodb-tools module for test running.
+* Remove the required setName for replicaset connections, if not set it will pick the first setName returned.
+
+2.0.14 2015-01-21
+-----------------
+* Fixed some MongoClient.connect options pass through issues and added test coverage.
+* Bumped mongodb-core to 1.1.9 including fixes for io.js
+
+2.0.13 2015-01-09
+-----------------
+* Bumped mongodb-core to 1.1.8.
+* Optimized query path for performance, moving Object.defineProperty outside of constructors.
+
+2.0.12 2014-12-22
+-----------------
+* Minor fixes to listCollections to ensure correct querying of a collection when using a string.
+
+2.0.11 2014-12-19
+-----------------
+* listCollections filters out index namespaces on < 2.8 correctly
+* Bumped mongo-client to 1.1.7
+
+2.0.10 2014-12-18
+-----------------
+* NODE-328 fixed db.open return when no callback available issue and added test.
+* NODE-327 Refactored listCollections to return cursor to support 2.8.
+* NODE-327 Added listIndexes method and refactored internal methods to use the new command helper.
+* NODE-335 Cannot create index for nested objects fixed by relaxing key checking for createIndex helper.
+* Enable setting of connectTimeoutMS (Issue #1235, https://github.com/vkarpov15)
+* Bumped mongo-client to 1.1.6
+
+2.0.9 2014-12-01
+----------------
+* Bumped mongodb-core to 1.1.3 fixing global leaked variables and introducing strict across all classes.
+* All classes are now strict (Issue #1233)
+* NODE-324 Refactored insert/update/remove and all other crud opts to rely on internal methods to avoid any recursion.
+* Fixed recursion issues in debug logging due to JSON.stringify()
+* Documentation fixes (Issue #1232, https://github.com/wsmoak)
+* Fix writeConcern in Db.prototype.ensureIndex (Issue #1231, https://github.com/Qard)
+
+2.0.8 2014-11-28
+----------------
+* NODE-322 Finished up prototype refactoring of Db class.
+* NODE-322 Exposed Cursor in index.js for New Relic.
+
+2.0.7 2014-11-20
+----------------
+* Bumped mongodb-core to 1.1.2 fixing a UTF8 encoding issue for collection names.
+* NODE-318 collection.update error while setting a function with serializeFunctions option.
+* Documentation fixes.
+
+2.0.6 2014-11-14
+----------------
+* Refactored code to be prototype based instead of privileged methods.
+* Bumped mongodb-core to 1.1.1 to take advantage of the prototype based refactorings.
+* Implemented missing aspects of the CRUD specification.
+* Fixed documentation issues.
+* Fixed global leak REFERENCE_BY_ID in gridfs grid_store (Issue #1225, https://github.com/j)
+* Fix LearnBoost/mongoose#2313: don't let user accidentally clobber geoNear params (Issue #1223, https://github.com/vkarpov15)
+
+2.0.5 2014-10-29
+----------------
+* Minor fixes to documentation and generation of documentation.
+* NODE-306 (No results in aggregation cursor when collection name contains a dot), Merged code for cursor and aggregation cursor.
+
+2.0.4 2014-10-23
+----------------
+* Allow for single replicaset seed list with no setName specified (Issue #1220, https://github.com/imaman)
+* Made each rewind on each call allowing for re-using the cursor.
+* Fixed issue where incorrect iterations would happen on each for extensive batchSizes.
+* NODE-301 specifying maxTimeMS on find causes all fields to be omitted from result.
+
+2.0.3 2014-10-14
+----------------
+* NODE-297 Aggregate Broken for case of pipeline with no options.
+
+2.0.2 2014-10-08
+----------------
+* Bumped mongodb-core to 1.0.2.
+* Fixed bson module dependency issue by relying on the mongodb-core one.
+* Use findOne instead of find followed by nextObject (Issue #1216, https://github.com/sergeyksv)
+
+2.0.1 2014-10-07
+----------------
+* Dependency fix
+
+2.0.0 2014-10-07
+----------------
+* First release of 2.0 driver
+
+2.0.0-alpha2 2014-10-02
+-----------------------
+* CRUD API (insertOne, insertMany, updateOne, updateMany, removeOne, removeMany, bulkWrite, findOneAndDelete, findOneAndUpdate, findOneAndReplace)
+* Cluster Management Spec compatible.
+
+2.0.0-alpha1 2014-09-08
+-----------------------
+* Insert method allows only up 1000 pr batch for legacy as well as 2.6 mode
+* Streaming behavior is 0.10.x or higher with backwards compatibility using readable-stream npm package
+* Gridfs stream only available through .stream() method due to overlapping names on Gridstore object and streams in 0.10.x and higher of node
+* remove third result on update and remove and return the whole result document instead (getting rid of the weird 3 result parameters)
+ * Might break some application
+* Returns the actual mongodb-core result instead of just the number of records changed for insert/update/remove
+* MongoClient only has the connect method (no ability instantiate with Server, ReplSet or similar)
+* Removed Grid class
+* GridStore only supports w+ for metadata updates, no appending to file as it's not thread safe and can cause corruption of the data
+ + seek will fail if attempt to use with w or w+
+ + write will fail if attempted with w+ or r
+ + w+ only works for updating metadata on a file
+* Cursor toArray and each resets and re-runs the cursor
+* FindAndModify returns whole result document instead of just value
+* Extend cursor to allow for setting all the options via methods instead of dealing with the current messed up find
+* Removed db.dereference method
+* Removed db.cursorInfo method
+* Removed db.stats method
+* Removed db.collectionNames not needed anymore as it's just a specialized case of listCollections
+* Removed db.collectionInfo removed due to not being compatible with new storage engines in 2.8 as they need to use the listCollections command due to system collections not working for namespaces.
+* Added db.listCollections to replace several methods above
+
+1.4.10 2014-09-04
+-----------------
+* Fixed BSON and Kerberos compilation issues
+* Bumped BSON to ~0.2 always installing latest BSON 0.2.x series
+* Fixed Kerberos and bumped to 0.0.4
+
+1.4.9 2014-08-26
+----------------
+* Check _bsonType for Binary (Issue #1202, https://github.com/mchapman)
+* Remove duplicate Cursor constructor (Issue #1201, https://github.com/KenPowers)
+* Added missing parameter in the documentation (Issue #1199, https://github.com/wpjunior)
+* Documented third parameter on the update callback(Issue #1196, https://github.com/gabmontes)
+* NODE-240 Operations on SSL connection hang on node 0.11.x
+* NODE-235 writeResult is not being passed on when error occurs in insert
+* NODE-229 Allow count to work with query hints
+* NODE-233 collection.save() does not support fullResult
+* NODE-244 Should parseError also emit a `disconnected` event?
+* NODE-246 Cursors are inefficiently constructed and consequently cannot be promisified.
+* NODE-248 Crash with X509 auth
+* NODE-252 Uncaught Exception in Base.__executeAllServerSpecificErrorCallbacks
+* Bumped BSON parser to 0.2.12
+
+
+1.4.8 2014-08-01
+----------------
+* NODE-205 correctly emit authenticate event
+* NODE-210 ensure no undefined connection error when checking server state
+* NODE-212 correctly inherit socketTimeoutMS from replicaset when HA process adds new servers or reconnects to existing ones
+* NODE-220 don't throw error if ensureIndex errors out in Gridstore
+* Updated bson to 0.2.11 to ensure correct toBSON behavior when returning non object in nested classes
+* Fixed test running filters
+* Wrap debug log in a call to format (Issue #1187, https://github.com/andyroyle)
+* False option values should not trigger w:1 (Issue #1186, https://github.com/jsdevel)
+* Fix aggregatestream.close(Issue #1194, https://github.com/jonathanong)
+* Fixed parsing issue for w:0 in url parser when in connection string
+* Modified collection.geoNear to support a geoJSON point or legacy coordinate pair (Issue #1198, https://github.com/mmacmillan)
+
+1.4.7 2014-06-18
+----------------
+* Make callbacks to be executed in right domain when server comes back up (Issue #1184, https://github.com/anton-kotenko)
+* Fix issue where currentOp query against mongos would fail due to mongos passing through $readPreference field to mongod (CS-X)
+
+1.4.6 2014-06-12
+----------------
+* Added better support for MongoClient IP6 parsing (Issue #1181, https://github.com/micovery)
+* Remove options check on index creation (Issue #1179, Issue #1183, https://github.com/jdesboeufs, https://github.com/rubenvereecken)
+* Added missing type check before calling optional callback function (Issue #1180)
+
+1.4.5 2014-05-21
+----------------
+* Added fullResult flag to insert/update/remove which will pass raw result document back. Document contents will vary depending on the server version the driver is talking to. No attempt is made to coerce a joint response.
+* Fix to avoid MongoClient.connect hanging during auth when secondaries building indexes pre 2.6.
+* return the destination stream in GridStore.pipe (Issue #1176, https://github.com/iamdoron)
+
+1.4.4 2014-05-13
+----------------
+* Bumped BSON version to use the NaN 1.0 package, fixed strict comparison issue for ObjectID
+* Removed leaking global variable (Issue #1174, https://github.com/dainis)
+* MongoClient respects connectTimeoutMS for initial discovery process (NODE-185)
+* Fix bug with return messages larger than 16MB but smaller than max BSON Message Size (NODE-184)
+
+1.4.3 2014-05-01
+----------------
+* Clone options for commands to avoid polluting original options passed from Mongoose (Issue #1171, https://github.com/vkarpov15)
+* Made geoNear and geoHaystackSearch only clean out allowed options from command generation (Issue #1167)
+* Fixed typo for allowDiskUse (Issue #1168, https://github.com/joaofranca)
+* A 'mapReduce' function changed 'function' to instance '\<Object\>' of 'Code' class (Issue #1165, https://github.com/exabugs)
+* Made findAndModify set sort only when explicitly set (Issue #1163, https://github.com/sars)
+* Rewriting a gridStore file by id should use a new filename if provided (Issue #1169, https://github.com/vsivsi)
+
+1.4.2 2014-04-15
+----------------
+* Fix for inheritance of readPreferences from MongoClient NODE-168/NODE-169
+* Merged in fix for ping strategy to avoid hitting non-pinged servers (Issue #1161, https://github.com/vaseker)
+* Merged in fix for correct debug output for connection messages (Issue #1158, https://github.com/vaseker)
+* Fixed global variable leak (Issue #1160, https://github.com/vaseker)
+
+1.4.1 2014-04-09
+----------------
+* Correctly emit joined event when primary change
+* Add _id to documents correctly when using bulk operations
+
+1.4.0 2014-04-03
+----------------
+* All node exceptions will no longer be caught if on('error') is defined
+* Added X509 auth support
+* Fix for MongoClient connection timeout issue (NODE-97)
+* Pass through error messages from parseError instead of just text (Issue #1125)
+* Close db connection on error (Issue #1128, https://github.com/benighted)
+* Fixed documentation generation
+* Added aggregation cursor for 2.6 and emulated cursor for pre 2.6 (uses stream2)
+* New Bulk API implementation using write commands for 2.6 and down converts for pre 2.6
+* Insert/Update/Remove using new write commands when available
+* Added support for new roles based API's in 2.6 for addUser/removeUser
+* Added bufferMaxEntries to start failing if the buffer hits the specified number of entries
+* Upgraded BSON parser to version 0.2.7 to work with < 0.11.10 C++ API changes
+* Support for OP_LOG_REPLAY flag (NODE-94)
+* Fixes for SSL HA ping and discovery.
+* Uses createIndexes if available for ensureIndex/createIndex
+* Added parallelCollectionScan method to collection returning CommandCursor instances for cursors
+* Made CommandCursor behave as Readable stream.
+* Only Db honors readPreference settings, removed Server.js legacy readPreference settings due to user confusion.
+* Reconnect event emitted by ReplSet/Mongos/Server after reconnect and before replaying of buffered operations.
+* GridFS buildMongoObject returns error on illegal md5 (NODE-157, https://github.com/iantocristian)
+* Default GridFS chunk size changed to (255 * 1024) bytes to optimize for collections defaulting to power of 2 sizes on 2.6.
+* Refactored commands to all go through command function ensuring consistent command execution.
+* Fixed issues where readPreferences where not correctly passed to mongos.
+* Catch error == null and make err detection more prominent (NODE-130)
+* Allow reads from arbiter for single server connection (NODE-117)
+* Handle error coming back with no documents (NODE-130)
+* Correctly use close parameter in Gridstore.write() (NODE-125)
+* Throw an error on a bulk find with no selector (NODE-129, https://github.com/vkarpov15)
+* Use a shallow copy of options in find() (NODE-124, https://github.com/vkarpov15)
+* Fix statistical strategy (NODE-158, https://github.com/vkarpov15)
+* GridFS off-by-one bug in lastChunkNumber() causes uncaught throw and data loss (Issue #1154, https://github.com/vsivsi)
+* GridStore drops passed `aliases` option, always results in `null` value in GridFS files (Issue #1152, https://github.com/vsivsi)
+* Remove superfluous connect object copying in index.js (Issue #1145, https://github.com/thomseddon)
+* Do not return false when the connection buffer is still empty (Issue #1143, https://github.com/eknkc)
+* Check ReadPreference object on ReplSet.canRead (Issue #1142, https://github.com/eknkc)
+* Fix unpack error on _executeQueryCommand (Issue #1141, https://github.com/eknkc)
+* Close db on failed connect so node can exit (Issue #1128, https://github.com/benighted)
+* Fix global leak with _write_concern (Issue #1126, https://github.com/shanejonas)
+
+1.3.19 2013-08-21
+-----------------
+* Correctly rethrowing errors after change from event emission to callbacks, compatibility with 0.10.X domains without breaking 0.8.X support.
+* Small fix to return the entire findAndModify result as the third parameter (Issue #1068)
+* No removal of "close" event handlers on server reconnect, emits "reconnect" event when reconnection happens. Reconnect Only applies for single server connections as of now as semantics for ReplSet and Mongos is not clear (Issue #1056)
+
+1.3.18 2013-08-10
+-----------------
+* Fixed issue when throwing exceptions in MongoClient.connect/Db.open (Issue #1057)
+* Fixed an issue where _events is not cleaned up correctly causing a slow steady memory leak.
+
+1.3.17 2013-08-07
+-----------------
+* Ignore return commands that have no registered callback
+* Made collection.count not use the db.command function
+* Fix throw exception on ping command (Issue #1055)
+
+1.3.16 2013-08-02
+-----------------
+* Fixes connection issue where lots of connections would happen if a server is in recovery mode during connection (Issue #1050, NODE-50, NODE-51)
+* Bug in unlink mulit filename (Issue #1054)
+
+1.3.15 2013-08-01
+-----------------
+* Memory leak issue due to node Issue #4390 where _events[id] is set to undefined instead of deleted leading to leaks in the Event Emitter over time
+
+1.3.14 2013-08-01
+-----------------
+* Fixed issue with checkKeys where it would error on X.X
+
+1.3.13 2013-07-31
+-----------------
+* Added override for checkKeys on insert/update (Warning will expose you to injection attacks) (Issue #1046)
+* BSON size checking now done pre serialization (Issue #1037)
+* Added isConnected returns false when no connection Pool exists (Issue #1043)
+* Unified command handling to ensure same handling (Issue #1041, #1042)
+* Correctly emit "open" and "fullsetup" across all Db's associated with Mongos, ReplSet or Server (Issue #1040)
+* Correctly handles bug in authentication when attempting to connect to a recovering node in a replicaset.
+* Correctly remove recovering servers from available servers in replicaset. Piggybacks on the ping command.
+* Removed findAndModify chaining to be compliant with behavior in other official drivers and to fix a known mongos issue.
+* Fixed issue with Kerberos authentication on Windows for re-authentication.
+* Fixed Mongos failover behavior to correctly throw out old servers.
+* Ensure stored queries/write ops are executed correctly after connection timeout
+* Added promoteLongs option for to allow for overriding the promotion of Longs to Numbers and return the actual Long.
+
+1.3.12 2013-07-19
+-----------------
+* Fixed issue where timeouts sometimes would behave wrongly (Issue #1032)
+* Fixed bug with callback third parameter on some commands (Issue #1033)
+* Fixed possible issue where killcursor command might leave hanging functions
+* Fixed issue where Mongos was not correctly removing dead servers from the pool of eligable servers
+* Throw error if dbName or collection name contains null character (at command level and at collection level)
+* Updated bson parser to 0.2.1 with security fix and non-promotion of Long values to javascript Numbers (once a long always a long)
+
+1.3.11 2013-07-04
+-----------------
+* Fixed errors on geoNear and geoSearch (Issue #1024, https://github.com/ebensing)
+* Add driver version to export (Issue #1021, https://github.com/aheckmann)
+* Add text to readpreference obedient commands (Issue #1019)
+* Drivers should check the query failure bit even on getmore response (Issue #1018)
+* Map reduce has incorrect expectations of 'inline' value for 'out' option (Issue #1016, https://github.com/rcotter)
+* Support SASL PLAIN authentication (Issue #1009)
+* Ability to use different Service Name on the driver for Kerberos Authentication (Issue #1008)
+* Remove unnecessary octal literal to allow the code to run in strict mode (Issue #1005, https://github.com/jamesallardice)
+* Proper handling of recovering nodes (when they go into recovery and when they return from recovery, Issue #1027)
+
+1.3.10 2013-06-17
+-----------------
+* Guard against possible undefined in server::canCheckoutWriter (Issue #992, https://github.com/willyaranda)
+* Fixed some duplicate test names (Issue #993, https://github.com/kawanet)
+* Introduced write and read concerns for GridFS (Issue #996)
+* Fixed commands not correctly respecting Collection level read preference (Issue #995, #999)
+* Fixed issue with pool size on replicaset connections (Issue #1000)
+* Execute all query commands on master switch (Issue #1002, https://github.com/fogaztuc)
+
+1.3.9 2013-06-05
+----------------
+* Fixed memory leak when findAndModify errors out on w>1 and chained callbacks not properly cleaned up.
+
+1.3.8 2013-05-31
+----------------
+* Fixed issue with socket death on windows where it emits error event instead of close event (Issue #987)
+* Emit authenticate event on db after authenticate method has finished on db instance (Issue #984)
+* Allows creation of MongoClient and do new MongoClient().connect(..). Emits open event when connection correct allowing for apps to react on event.
+
+1.3.7 2013-05-29
+----------------
+* After reconnect, tailable getMores go on inconsistent connections (Issue #981, #982, https://github.com/glasser)
+* Updated Bson to 0.1.9 to fix ARM support (Issue #985)
+
+1.3.6 2013-05-21
+----------------
+* Fixed issue where single server reconnect attempt would throw due to missing options variable (Issue #979)
+* Fixed issue where difference in ismaster server name and seed list caused connections issues, (Issue #976)
+
+1.3.5 2013-05-14
+----------------
+* Fixed issue where HA for replicaset would pick the same broken connection when attempting to ping the replicaset causing the replicaset to never recover.
+
+1.3.4 2013-05-14
+----------------
+* Fixed bug where options not correctly passed in for uri parser (Issue #973, https://github.com/supershabam)
+* Fixed bug when passing a named index hint (Issue #974)
+
+1.3.3 2013-05-09
+----------------
+* Fixed auto-reconnect issue with single server instance.
+
+1.3.2 2013-05-08
+----------------
+* Fixes for an issue where replicaset would be pronounced dead when high priority primary caused double elections.
+
+1.3.1 2013-05-06
+----------------
+* Fix for replicaset consisting of primary/secondary/arbiter with priority applied failing to reconnect properly
+* Applied auth before server instance is set as connected when single server connection
+* Throw error if array of documents passed to save method
+
+1.3.0 2013-04-25
+----------------
+* Whole High availability handling for Replicaset, Server and Mongos connections refactored to ensure better handling of failover cases.
+* Fixed issue where findAndModify would not correctly skip issuing of chained getLastError (Issue #941)
+* Fixed throw error issue on errors with findAndModify during write out operation (Issue #939, https://github.com/autopulated)
+* Gridstore.prototype.writeFile now returns gridstore object correctly (Issue #938)
+* Kerberos support is now an optional module that allows for use of GSSAPI authentication using MongoDB Subscriber edition
+* Fixed issue where cursor.toArray could blow the stack on node 0.10.X (#950)
+
+1.2.14 2013-03-14
+-----------------
+* Refactored test suite to speed up running of replicaset tests
+* Fix of async error handling when error happens in callback (Issue #909, https://github.com/medikoo)
+* Corrected a slaveOk setting issue (Issue #906, #905)
+* Fixed HA issue where ping's would not go to correct server on HA server connection failure.
+* Uses setImmediate if on 0.10 otherwise nextTick for cursor stream
+* Fixed race condition in Cursor stream (NODE-31)
+* Fixed issues related to node 0.10 and process.nextTick now correctly using setImmediate where needed on node 0.10
+* Added support for maxMessageSizeBytes if available (DRIVERS-1)
+* Added support for authSource (2.4) to MongoClient URL and db.authenticate method (DRIVER-69/NODE-34)
+* Fixed issue in GridStore seek and GridStore read to correctly work on multiple seeks (Issue #895)
+
+1.2.13 2013-02-22
+-----------------
+* Allow strategy 'none' for repliaset if no strategy wanted (will default to round robin selection of servers on a set readPreference)
+* Fixed missing MongoErrors on some cursor methods (Issue #882)
+* Correctly returning a null for the db instance on MongoClient.connect when auth fails (Issue #890)
+* Added dropTarget option support for renameCollection/rename (Issue #891, help from https://github.com/jbottigliero)
+* Fixed issue where connection using MongoClient.connect would fail if first server did not exist (Issue #885)
+
+1.2.12 2013-02-13
+-----------------
+* Added limit/skip options to Collection.count (Issue #870)
+* Added applySkipLimit option to Cursor.count (Issue #870)
+* Enabled ping strategy as default for Replicaset if none specified (Issue #876)
+* Should correctly pick nearest server for SECONDARY/SECONDARY_PREFERRED/NEAREST (Issue #878)
+
+1.2.11 2013-01-29
+-----------------
+* Added fixes for handling type 2 binary due to PHP driver (Issue #864)
+* Moved callBackStore to Base class to have single unified store (Issue #866)
+* Ping strategy now reuses sockets unless they are closed by the server to avoid overhead
+
+1.2.10 2013-01-25
+-----------------
+* Merged in SSL support for 2.4 supporting certificate validation and presenting certificates to the server.
+* Only open a new HA socket when previous one dead (Issue #859, #857)
+* Minor fixes
+
+1.2.9 2013-01-15
+----------------
+* Fixed bug in SSL support for MongoClient/Db.connect when discovering servers (Issue #849)
+* Connection string with no db specified should default to admin db (Issue #848)
+* Support port passed as string to Server class (Issue #844)
+* Removed noOpen support for MongoClient/Db.connect as auto discovery of servers for Mongod/Mongos makes it not possible (Issue #842)
+* Included toError wrapper code moved to utils.js file (Issue #839, #840)
+* Rewrote cursor handling to avoid process.nextTick using trampoline instead to avoid stack overflow, speedup about 40%
+
+1.2.8 2013-01-07
+----------------
+* Accept function in a Map Reduce scope object not only a function string (Issue #826, https://github.com/aheckmann)
+* Typo in db.authenticate caused a check (for provided connection) to return false, causing a connection AND onAll=true to be passed into __executeQueryCommand downstream (Issue #831, https://github.com/m4tty)
+* Allow gridfs objects to use non ObjectID ids (Issue #825, https://github.com/nailgun)
+* Removed the double wrap, by not passing an Error object to the wrap function (Issue #832, https://github.com/m4tty)
+* Fix connection leak (gh-827) for HA replicaset health checks (Issue #833, https://github.com/aheckmann)
+* Modified findOne to use nextObject instead of toArray avoiding a nextTick operation (Issue #836)
+* Fixes for cursor stream to avoid multiple getmore issues when one in progress (Issue #818)
+* Fixes .open replaying all backed up commands correctly if called after operations performed, (Issue #829 and #823)
+
+1.2.7 2012-12-23
+----------------
+* Rolled back batches as they hang in certain situations
+* Fixes for NODE-25, keep reading from secondaries when primary goes down
+
+1.2.6 2012-12-21
+----------------
+* domain sockets shouldn't require a port arg (Issue #815, https://github.com/aheckmann)
+* Cannot read property 'info' of null (Issue #809, https://github.com/thesmart)
+* Cursor.each should work in batches (Issue #804, https://github.com/Swatinem)
+* Cursor readPreference bug for non-supported read preferences (Issue #817)
+
+1.2.5 2012-12-12
+----------------
+* Fixed ssl regression, added more test coverage (Issue #800)
+* Added better error reporting to the Db.connect if no valid serverConfig setup found (Issue #798)
+
+1.2.4 2012-12-11
+----------------
+* Fix to ensure authentication is correctly applied across all secondaries when using MongoClient.
+
+1.2.3 2012-12-10
+----------------
+* Fix for new replicaset members correctly authenticating when being added (Issue #791, https://github.com/m4tty)
+* Fixed seek issue in gridstore when using stream (Issue #790)
+
+1.2.2 2012-12-03
+----------------
+* Fix for journal write concern not correctly being passed under some circumstances.
+* Fixed correct behavior and re-auth for servers that get stepped down (Issue #779).
+
+1.2.1 2012-11-30
+----------------
+* Fix for double callback on insert with w:0 specified (Issue #783)
+* Small cleanup of urlparser.
+
+1.2.0 2012-11-27
+----------------
+* Honor connectTimeoutMS option for replicasets (Issue #750, https://github.com/aheckmann)
+* Fix ping strategy regression (Issue #738, https://github.com/aheckmann)
+* Small cleanup of code (Issue #753, https://github.com/sokra/node-mongodb-native)
+* Fixed index declaration using objects/arrays from other contexts (Issue #755, https://github.com/sokra/node-mongodb-native)
+* Intermittent (and rare) null callback exception when using ReplicaSets (Issue #752)
+* Force correct setting of read_secondary based on the read preference (Issue #741)
+* If using read preferences with secondaries queries will not fail if primary is down (Issue #744)
+* noOpen connection for Db.connect removed as not compatible with autodetection of Mongo type
+* Mongos connection with auth not working (Issue #737)
+* Use the connect method directly from the require. require('mongodb')("mongodb://localhost:27017/db")
+* new MongoClient introduced as the point of connecting to MongoDB's instead of the Db
+ * open/close/db/connect methods implemented
+* Implemented common URL connection format using MongoClient.connect allowing for simialar interface across all drivers.
+* Fixed a bug with aggregation helper not properly accepting readPreference
+
+1.1.11 2012-10-10
+-----------------
+* Removed strict mode and introduced normal handling of safe at DB level.
+
+1.1.10 2012-10-08
+-----------------
+* fix Admin.serverStatus (Issue #723, https://github.com/Contra)
+* logging on connection open/close(Issue #721, https://github.com/asiletto)
+* more fixes for windows bson install (Issue #724)
+
+1.1.9 2012-10-05
+----------------
+* Updated bson to 0.1.5 to fix build problem on sunos/windows.
+
+1.1.8 2012-10-01
+----------------
+* Fixed db.eval to correctly handle system.js global javascript functions (Issue #709)
+* Cleanup of non-closing connections (Issue #706)
+* More cleanup of connections under replicaset (Issue #707, https://github.com/elbert3)
+* Set keepalive on as default, override if not needed
+* Cleanup of jsbon install to correctly build without install.js script (https://github.com/shtylman)
+* Added domain socket support new Server("/tmp/mongodb.sock") style
+
+1.1.7 2012-09-10
+----------------
+* Protect against starting PingStrategy being called more than once (Issue #694, https://github.com/aheckmann)
+* Make PingStrategy interval configurable (was 1 second, relaxed to 5) (Issue #693, https://github.com/aheckmann)
+* Made PingStrategy api more consistant, callback to start/stop methods are optional (Issue #693, https://github.com/aheckmann)
+* Proper stopping of strategy on replicaset stop
+* Throw error when gridstore file is not found in read mode (Issue #702, https://github.com/jbrumwell)
+* Cursor stream resume now using nextTick to avoid duplicated records (Issue #696)
+
+1.1.6 2012-09-01
+----------------
+* Fix for readPreference NEAREST for replicasets (Issue #693, https://github.com/aheckmann)
+* Emit end correctly on stream cursor (Issue #692, https://github.com/Raynos)
+
+1.1.5 2012-08-29
+----------------
+* Fix for eval on replicaset Issue #684
+* Use helpful error msg when native parser not compiled (Issue #685, https://github.com/aheckmann)
+* Arbiter connect hotfix (Issue #681, https://github.com/fengmk2)
+* Upgraded bson parser to 0.1.2 using gyp, deprecated support for node 0.4.X
+* Added name parameter to createIndex/ensureIndex to be able to override index names larger than 128 bytes
+* Added exhaust option for find for feature completion (not recommended for normal use)
+* Added tailableRetryInterval to find for tailable cursors to allow to control getMore retry time interval
+* Fixes for read preferences when using MongoS to correctly handle no read preference set when iterating over a cursor (Issue #686)
+
+1.1.4 2012-08-12
+----------------
+* Added Mongos connection type with a fallback list for mongos proxies, supports ha (on by default) and will attempt to reconnect to failed proxies.
+* Documents can now have a toBSON method that lets the user control the serialization behavior for documents being saved.
+* Gridstore instance object now works as a readstream or writestream (thanks to code from Aaron heckmann (https://github.com/aheckmann/gridfs-stream)).
+* Fix gridfs readstream (Issue #607, https://github.com/tedeh).
+* Added disableDriverBSONSizeCheck property to Server.js for people who wish to push the inserts to the limit (Issue #609).
+* Fixed bug where collection.group keyf given as Code is processed as a regular object (Issue #608, https://github.com/rrusso2007).
+* Case mismatch between driver's ObjectID and mongo's ObjectId, allow both (Issue #618).
+* Cleanup map reduce (Issue #614, https://github.com/aheckmann).
+* Add proper error handling to gridfs (Issue #615, https://github.com/aheckmann).
+* Ensure cursor is using same connection for all operations to avoid potential jump of servers when using replicasets.
+* Date identification handled correctly in bson js parser when running in vm context.
+* Documentation updates
+* GridStore filename not set on read (Issue #621)
+* Optimizations on the C++ bson parser to fix a potential memory leak and avoid non-needed calls
+* Added support for awaitdata for tailable cursors (Issue #624)
+* Implementing read preference setting at collection and cursor level
+ * collection.find().setReadPreference(Server.SECONDARY_PREFERRED)
+ * db.collection("some", {readPreference:Server.SECONDARY})
+* Replicaset now returns when the master is discovered on db.open and lets the rest of the connections happen asynchronous.
+ * ReplSet/ReplSetServers emits "fullsetup" when all servers have been connected to
+* Prevent callback from executing more than once in getMore function (Issue #631, https://github.com/shankar0306)
+* Corrupt bson messages now errors out to all callbacks and closes up connections correctly, Issue #634
+* Replica set member status update when primary changes bug (Issue #635, https://github.com/alinsilvian)
+* Fixed auth to work better when multiple connections are involved.
+* Default connection pool size increased to 5 connections.
+* Fixes for the ReadStream class to work properly with 0.8 of Node.js
+* Added explain function support to aggregation helper
+* Added socketTimeoutMS and connectTimeoutMS to socket options for repl_set.js and server.js
+* Fixed addUser to correctly handle changes in 2.2 for getLastError authentication required
+* Added index to gridstore chunks on file_id (Issue #649, https://github.com/jacobbubu)
+* Fixed Always emit db events (Issue #657)
+* Close event not correctly resets DB openCalled variable to allow reconnect
+* Added open event on connection established for replicaset, mongos and server
+* Much faster BSON C++ parser thanks to Lucasfilm Singapore.
+* Refactoring of replicaset connection logic to simplify the code.
+* Add `options.connectArbiter` to decide connect arbiters or not (Issue #675)
+* Minor optimization for findAndModify when not using j,w or fsync for safe
+
+1.0.2 2012-05-15
+----------------
+* Reconnect functionality for replicaset fix for mongodb 2.0.5
+
+1.0.1 2012-05-12
+----------------
+* Passing back getLastError object as 3rd parameter on findAndModify command.
+* Fixed a bunch of performance regressions in objectId and cursor.
+* Fixed issue #600 allowing for single document delete to be passed in remove command.
+
+1.0.0 2012-04-25
+----------------
+* Fixes to handling of failover on server error
+* Only emits error messages if there are error listeners to avoid uncaught events
+* Server.isConnected using the server state variable not the connection pool state
+
+0.9.9.8 2012-04-12
+------------------
+* _id=0 is being turned into an ObjectID (Issue #551)
+* fix for error in GridStore write method (Issue #559)
+* Fix for reading a GridStore from arbitrary, non-chunk aligned offsets, added test (Issue #563, https://github.com/subroutine)
+* Modified limitRequest to allow negative limits to pass through to Mongo, added test (Issue #561)
+* Corrupt GridFS files when chunkSize < fileSize, fixed concurrency issue (Issue #555)
+* Handle dead tailable cursors (Issue #568, https://github.com/aheckmann)
+* Connection pools handles closing themselves down and clearing the state
+* Check bson size of documents against maxBsonSize and throw client error instead of server error, (Issue #553)
+* Returning update status document at the end of the callback for updates, (Issue #569)
+* Refactor use of Arguments object to gain performance (Issue #574, https://github.com/AaronAsAChimp)
+
+0.9.9.7 2012-03-16
+------------------
+* Stats not returned from map reduce with inline results (Issue #542)
+* Re-enable testing of whether or not the callback is called in the multi-chunk seek, fix small GridStore bug (Issue #543, https://github.com/pgebheim)
+* Streaming large files from GridFS causes truncation (Issue #540)
+* Make callback type checks agnostic to V8 context boundaries (Issue #545)
+* Correctly throw error if an attempt is made to execute an insert/update/remove/createIndex/ensureIndex with safe enabled and no callback
+* Db.open throws if the application attemps to call open again without calling close first
+
+0.9.9.6 2012-03-12
+------------------
+* BSON parser is externalized in it's own repository, currently using git master
+* Fixes for Replicaset connectivity issue (Issue #537)
+* Fixed issues with node 0.4.X vs 0.6.X (Issue #534)
+* Removed SimpleEmitter and replaced with standard EventEmitter
+* GridStore.seek fails to change chunks and call callback when in read mode (Issue #532)
+
+0.9.9.5 2012-03-07
+------------------
+* Merged in replSetGetStatus helper to admin class (Issue #515, https://github.com/mojodna)
+* Merged in serverStatus helper to admin class (Issue #516, https://github.com/mojodna)
+* Fixed memory leak in C++ bson parser (Issue #526)
+* Fix empty MongoError "message" property (Issue #530, https://github.com/aheckmann)
+* Cannot save files with the same file name to GridFS (Issue #531)
+
+0.9.9.4 2012-02-26
+------------------
+* bugfix for findAndModify: Error: corrupt bson message < 5 bytes long (Issue #519)
+
+0.9.9.3 2012-02-23
+------------------
+* document: save callback arguments are both undefined, (Issue #518)
+* Native BSON parser install error with npm, (Issue #517)
+
+0.9.9.2 2012-02-17
+------------------
+* Improved detection of Buffers using Buffer.isBuffer instead of instanceof.
+* Added wrap error around db.dropDatabase to catch all errors (Issue #512)
+* Added aggregate helper to collection, only for MongoDB >= 2.1
+
+0.9.9.1 2012-02-15
+------------------
+* Better handling of safe when using some commands such as createIndex, ensureIndex, addUser, removeUser, createCollection.
+* Mapreduce now throws error if out parameter is not specified.
+
+0.9.9 2012-02-13
+----------------
+* Added createFromTime method on ObjectID to allow for queries against _id more easily using the timestamp.
+* Db.close(true) now makes connection unusable as it's been force closed by app.
+* Fixed mapReduce and group functions to correctly send slaveOk on queries.
+* Fixes for find method to correctly work with find(query, fields, callback) (Issue #506).
+* A fix for connection error handling when using the SSL on MongoDB.
+
+0.9.8-7 2012-02-06
+------------------
+* Simplified findOne to use the find command instead of the custom code (Issue #498).
+* BSON JS parser not also checks for _bsonType variable in case BSON object is in weird scope (Issue #495).
+
+0.9.8-6 2012-02-04
+------------------
+* Removed the check for replicaset change code as it will never work with node.js.
+
+0.9.8-5 2012-02-02
+------------------
+* Added geoNear command to Collection.
+* Added geoHaystackSearch command to Collection.
+* Added indexes command to collection to retrieve the indexes on a Collection.
+* Added stats command to collection to retrieve the statistics on a Collection.
+* Added listDatabases command to admin object to allow retrieval of all available dbs.
+* Changed createCreateIndexCommand to work better with options.
+* Fixed dereference method on Db class to correctly dereference Db reference objects.
+* Moved connect object onto Db class(Db.connect) as well as keeping backward compatibility.
+* Removed writeBuffer method from gridstore, write handles switching automatically now.
+* Changed readBuffer to read on Gridstore, Gridstore now only supports Binary Buffers no Strings anymore.
+* Moved Long class to bson directory.
+
+0.9.8-4 2012-01-28
+------------------
+* Added reIndex command to collection and db level.
+* Added support for $returnKey, $maxScan, $min, $max, $showDiskLoc, $comment to cursor and find/findOne methods.
+* Added dropDups and v option to createIndex and ensureIndex.
+* Added isCapped method to Collection.
+* Added indexExists method to Collection.
+* Added findAndRemove method to Collection.
+* Fixed bug for replicaset connection when no active servers in the set.
+* Fixed bug for replicaset connections when errors occur during connection.
+* Merged in patch for BSON Number handling from Lee Salzman, did some small fixes and added test coverage.
+
+0.9.8-3 2012-01-21
+------------------
+* Workaround for issue with Object.defineProperty (Issue #484)
+* ObjectID generation with date does not set rest of fields to zero (Issue #482)
+
+0.9.8-2 2012-01-20
+------------------
+* Fixed a missing this in the ReplSetServers constructor.
+
+0.9.8-1 2012-01-17
+------------------
+* FindAndModify bug fix for duplicate errors (Issue #481)
+
+0.9.8 2012-01-17
+----------------
+* Replicasets now correctly adjusts to live changes in the replicaset configuration on the servers, reconnecting correctly.
+ * Set the interval for checking for changes setting the replicaSetCheckInterval property when creating the ReplSetServers instance or on db.serverConfig.replicaSetCheckInterval. (default 1000 miliseconds)
+* Fixes formattedOrderClause in collection.js to accept a plain hash as a parameter (Issue #469) https://github.com/tedeh
+* Removed duplicate code for formattedOrderClause and moved to utils module
+* Pass in poolSize for ReplSetServers to set default poolSize for new replicaset members
+* Bug fix for BSON JS deserializer. Isolating the eval functions in separate functions to avoid V8 deoptimizations
+* Correct handling of illegal BSON messages during deserialization
+* Fixed Infinite loop when reading GridFs file with no chunks (Issue #471)
+* Correctly update existing user password when using addUser (Issue #470)
+
+0.9.7.3-5 2012-01-04
+--------------------
+* Fix for RegExp serialization for 0.4.X where typeof /regexp/ == 'function' vs in 0.6.X typeof /regexp/ == 'object'
+* Don't allow keepAlive and setNoDelay for 0.4.X as it throws errors
+
+0.9.7.3-4 2012-01-04
+--------------------
+* Chased down potential memory leak on findAndModify, Issue #467 (node.js removeAllListeners leaves the key in the _events object, node.js bug on eventlistener?, leads to extremely slow memory leak on listener object)
+* Sanity checks for GridFS performance with benchmark added
+
+0.9.7.3-3 2012-01-04
+--------------------
+* Bug fixes for performance issues going form 0.9.6.X to 0.9.7.X on linux
+* BSON bug fixes for performance
+
+0.9.7.3-2 2012-01-02
+--------------------
+* Fixed up documentation to reflect the preferred way of instantiating bson types
+* GC bug fix for JS bson parser to avoid stop-and-go GC collection
+
+0.9.7.3-1 2012-01-02
+--------------------
+* Fix to make db.bson_serializer and db.bson_deserializer work as it did previously
+
+0.9.7.3 2011-12-30
+--------------------
+* Moved BSON_BINARY_SUBTYPE_DEFAULT from BSON object to Binary object and removed the BSON_BINARY_ prefixes
+* Removed Native BSON types, C++ parser uses JS types (faster due to cost of crossing the JS-C++ barrier for each call)
+* Added build fix for 0.4.X branch of Node.js where GetOwnPropertyNames is not defined in v8
+* Fix for wire protocol parser for corner situation where the message is larger than the maximum socket buffer in node.js (Issue #464, #461, #447)
+* Connection pool status set to connected on poolReady, isConnected returns false on anything but connected status (Issue #455)
+
+0.9.7.2-5 2011-12-22
+--------------------
+* Brand spanking new Streaming Cursor support Issue #458 (https://github.com/christkv/node-mongodb-native/pull/458) thanks to Mr Aaron Heckmann
+
+0.9.7.2-4 2011-12-21
+--------------------
+* Refactoring of callback code to work around performance regression on linux
+* Fixed group function to correctly use the command mode as default
+
+0.9.7.2-3 2011-12-18
+--------------------
+* Fixed error handling for findAndModify while still working for mongodb 1.8.6 (Issue #450).
+* Allow for force send query to primary, pass option (read:'primary') on find command.
+ * ``find({a:1}, {read:'primary'}).toArray(function(err, items) {});``
+
+0.9.7.2-2 2011-12-16
+--------------------
+* Fixes infinite streamRecords QueryFailure fix when using Mongos (Issue #442)
+
+0.9.7.2-1 2011-12-16
+--------------------
+* ~10% perf improvement for ObjectId#toHexString (Issue #448, https://github.com/aheckmann)
+* Only using process.nextTick on errors emitted on callbacks not on all parsing, reduces number of ticks in the driver
+* Changed parsing off bson messages to use process.nextTick to do bson parsing in batches if the message is over 10K as to yield more time to the event look increasing concurrency on big mongoreply messages with multiple documents
+
+0.9.7.2 2011-12-15
+------------------
+* Added SSL support for future version of mongodb (VERY VERY EXPERIMENTAL)
+ * pass in the ssl:true option to the server or replicaset server config to enable
+ * a bug either in mongodb or node.js does not allow for more than 1 connection pr db instance (poolSize:1).
+* Added getTimestamp() method to objectID that returns a date object
+* Added finalize function to collection.group
+ * function group (keys, condition, initial, reduce, finalize, command, callback)
+* Reaper no longer using setTimeout to handle reaping. Triggering is done in the general flow leading to predictable behavior.
+ * reaperInterval, set interval for reaper (default 10000 miliseconds)
+ * reaperTimeout, set timeout for calls (default 30000 miliseconds)
+ * reaper, enable/disable reaper (default false)
+* Work around for issues with findAndModify during high concurrency load, insure that the behavior is the same across the 1.8.X branch and 2.X branch of MongoDb
+* Reworked multiple db's sharing same connection pool to behave correctly on error, timeout and close
+* EnsureIndex command can be executed without a callback (Issue #438)
+* Eval function no accepts options including nolock (Issue #432)
+ * eval(code, parameters, options, callback) (where options = {nolock:true})
+
+0.9.7.1-4 2011-11-27
+--------------------
+* Replaced install.sh with install.js to install correctly on all supported os's
+
+0.9.7.1-3 2011-11-27
+--------------------
+* Fixes incorrect scope for ensureIndex error wrapping (Issue #419) https://github.com/ritch
+
+0.9.7.1-2 2011-11-27
+--------------------
+* Set statistical selection strategy as default for secondary choice.
+
+0.9.7.1-1 2011-11-27
+--------------------
+* Better handling of single server reconnect (fixes some bugs)
+* Better test coverage of single server failure
+* Correct handling of callbacks on replicaset servers when firewall dropping packets, correct reconnect
+
+0.9.7.1 2011-11-24
+------------------
+* Better handling of dead server for single server instances
+* FindOne and find treats selector == null as {}, Issue #403
+* Possible to pass in a strategy for the replicaset to pick secondary reader node
+ * parameter strategy
+ * ping (default), pings the servers and picks the one with the lowest ping time
+ * statistical, measures each request and pick the one with the lowest mean and std deviation
+* Set replicaset read preference replicaset.setReadPreference()
+ * Server.READ_PRIMARY (use primary server for reads)
+ * Server.READ_SECONDARY (from a secondary server (uses the strategy set))
+ * tags, {object of tags}
+* Added replay of commands issued to a closed connection when the connection is re-established
+* Fix isConnected and close on unopened connections. Issue #409, fix by (https://github.com/sethml)
+* Moved reaper to db.open instead of constructor (Issue #406)
+* Allows passing through of socket connection settings to Server or ReplSetServer under the option socketOptions
+ * timeout = set seconds before connection times out (default 0)
+ * noDelay = Disables the Nagle algorithm (default true)
+ * keepAlive = Set if keepAlive is used (default 0, which means no keepAlive, set higher than 0 for keepAlive)
+ * encoding = ['ascii', 'utf8', or 'base64'] (default null)
+* Fixes for handling of errors during shutdown off a socket connection
+* Correctly applies socket options including timeout
+* Cleanup of test management code to close connections correctly
+* Handle parser errors better, closing down the connection and emitting an error
+* Correctly emit errors from server.js only wrapping errors that are strings
+
+0.9.7 2011-11-10
+----------------
+* Added priority setting to replicaset manager
+* Added correct handling of passive servers in replicaset
+* Reworked socket code for simpler clearer handling
+* Correct handling of connections in test helpers
+* Added control of retries on failure
+ * control with parameters retryMiliSeconds and numberOfRetries when creating a db instance
+* Added reaper that will timeout and cleanup queries that never return
+ * control with parameters reaperInterval and reaperTimeout when creating a db instance
+* Refactored test helper classes for replicaset tests
+* Allows raw (no bson parser mode for insert, update, remove, find and findOne)
+ * control raw mode passing in option raw:true on the commands
+ * will return buffers with the binary bson objects
+* Fixed memory leak in cursor.toArray
+* Fixed bug in command creation for mongodb server with wrong scope of call
+* Added db(dbName) method to db.js to allow for reuse of connections against other databases
+* Serialization of functions in an object is off by default, override with parameter
+ * serializeFunctions [true/false] on db level, collection level or individual insert/update/findAndModify
+* Added Long.fromString to c++ class and fixed minor bug in the code (Test case for $gt operator on 64-bit integers, Issue #394)
+* FindOne and find now share same code execution and will work in the same manner, Issue #399
+* Fix for tailable cursors, Issue #384
+* Fix for Cursor rewind broken, Issue #389
+* Allow Gridstore.exist to query using regexp, Issue #387, fix by (https://github.com/kaij)
+* Updated documentation on https://github.com/christkv/node-mongodb-native
+* Fixed toJSON methods across all objects for BSON, Binary return Base64 Encoded data
+
+0.9.6-22 2011-10-15
+-------------------
+* Fixed bug in js bson parser that could cause wrong object size on serialization, Issue #370
+* Fixed bug in findAndModify that did not throw error on replicaset timeout, Issue #373
+
+0.9.6-21 2011-10-05
+-------------------
+* Reworked reconnect code to work correctly
+* Handling errors in different parts of the code to ensure that it does not lock the connection
+* Consistent error handling for Object.createFromHexString for JS and C++
+
+0.9.6-20 2011-10-04
+-------------------
+* Reworked bson.js parser to get rid off Array.shift() due to it allocating new memory for each call. Speedup varies between 5-15% depending on doc
+* Reworked bson.cc to throw error when trying to serialize js bson types
+* Added MinKey, MaxKey and Double support for JS and C++ parser
+* Reworked socket handling code to emit errors on unparsable messages
+* Added logger option for Db class, lets you pass in a function in the shape
+ {
+ log : function(message, object) {},
+ error : function(errorMessage, errorObject) {},
+ debug : function(debugMessage, object) {},
+ }
+
+ Usage is new Db(new Server(..), {logger: loggerInstance})
+
+0.9.6-19 2011-09-29
+-------------------
+* Fixing compatibility issues between C++ bson parser and js parser
+* Added Symbol support to C++ parser
+* Fixed socket handling bug for seldom misaligned message from mongodb
+* Correctly handles serialization of functions using the C++ bson parser
+
+0.9.6-18 2011-09-22
+-------------------
+* Fixed bug in waitForConnection that would lead to 100% cpu usage, Issue #352
+
+0.9.6-17 2011-09-21
+-------------------
+* Fixed broken exception test causing bamboo to hang
+* Handling correctly command+lastError when both return results as in findAndModify, Issue #351
+
+0.9.6-16 2011-09-14
+-------------------
+* Fixing a bunch of issues with compatibility with MongoDB 2.0.X branch. Some fairly big changes in behavior from 1.8.X to 2.0.X on the server.
+* Error Connection MongoDB V2.0.0 with Auth=true, Issue #348
+
+0.9.6-15 2011-09-09
+-------------------
+* Fixed issue where pools would not be correctly cleaned up after an error, Issue #345
+* Fixed authentication issue with secondary servers in Replicaset, Issue #334
+* Duplicate replica-set servers when omitting port, Issue #341
+* Fixing findAndModify to correctly work with Replicasets ensuring proper error handling, Issue #336
+* Merged in code from (https://github.com/aheckmann) that checks for global variable leaks
+
+0.9.6-14 2011-09-05
+-------------------
+* Minor fixes for error handling in cursor streaming (https://github.com/sethml), Issue #332
+* Minor doc fixes
+* Some more cursor sort tests added, Issue #333
+* Fixes to work with 0.5.X branch
+* Fix Db not removing reconnect listener from serverConfig, (https://github.com/sbrekken), Issue #337
+* Removed node_events.h includes (https://github.com/jannehietamaki), Issue #339
+* Implement correct safe/strict mode for findAndModify.
+
+0.9.6-13 2011-08-24
+-------------------
+* Db names correctly error checked for illegal characters
+
+0.9.6-12 2011-08-24
+-------------------
+* Nasty bug in GridFS if you changed the default chunk size
+* Fixed error handling bug in findOne
+
+0.9.6-11 2011-08-23
+-------------------
+* Timeout option not correctly making it to the cursor, Issue #320, Fix from (https://github.com/year2013)
+* Fixes for memory leaks when using buffers and C++ parser
+* Fixes to make tests pass on 0.5.X
+* Cleanup of bson.js to remove duplicated code paths
+* Fix for errors occurring in ensureIndex, Issue #326
+* Removing require.paths to make tests work with the 0.5.X branch
+
+0.9.6-10 2011-08-11
+-------------------
+* Specific type Double for capped collections (https://github.com/mbostock), Issue #312
+* Decorating Errors with all all object info from Mongo (https://github.com/laurie71), Issue #308
+* Implementing fixes for mongodb 1.9.1 and higher to make tests pass
+* Admin validateCollection now takes an options argument for you to pass in full option
+* Implemented keepGoing parameter for mongodb 1.9.1 or higher, Issue #310
+* Added test for read_secondary count issue, merged in fix from (https://github.com/year2013), Issue #317
+
+0.9.6-9
+-------
+* Bug fix for bson parsing the key '':'' correctly without crashing
+
+0.9.6-8
+-------
+* Changed to using node.js crypto library MD5 digest
+* Connect method support documented mongodb: syntax by (https://github.com/sethml)
+* Support Symbol type for BSON, serializes to it's own type Symbol, Issue #302, #288
+* Code object without scope serializing to correct BSON type
+* Lot's of fixes to avoid double callbacks (https://github.com/aheckmann) Issue #304
+* Long deserializes as Number for values in the range -2^53 to 2^53, Issue #305 (https://github.com/sethml)
+* Fixed C++ parser to reflect JS parser handling of long deserialization
+* Bson small optimizations
+
+0.9.6-7 2011-07-13
+------------------
+* JS Bson deserialization bug #287
+
+0.9.6-6 2011-07-12
+------------------
+* FindAndModify not returning error message as other methods Issue #277
+* Added test coverage for $push, $pushAll and $inc atomic operations
+* Correct Error handling for non 12/24 bit ids on Pure JS ObjectID class Issue #276
+* Fixed terrible deserialization bug in js bson code #285
+* Fix by andrewjstone to avoid throwing errors when this.primary not defined
+
+0.9.6-5 2011-07-06
+------------------
+* Rewritten BSON js parser now faster than the C parser on my core2duo laptop
+* Added option full to indexInformation to get all index info Issue #265
+* Passing in ObjectID for new Gridstore works correctly Issue #272
+
+0.9.6-4 2011-07-01
+------------------
+* Added test and bug fix for insert/update/remove without callback supplied
+
+0.9.6-3 2011-07-01
+------------------
+* Added simple grid class called Grid with put, get, delete methods
+* Fixed writeBuffer/readBuffer methods on GridStore so they work correctly
+* Automatic handling of buffers when using write method on GridStore
+* GridStore now accepts a ObjectID instead of file name for write and read methods
+* GridStore.list accepts id option to return of file ids instead of filenames
+* GridStore close method returns document for the file allowing user to reference _id field
+
+0.9.6-2 2011-06-30
+------------------
+* Fixes for reconnect logic for server object (replays auth correctly)
+* More testcases for auth
+* Fixes in error handling for replicaset
+* Fixed bug with safe parameter that would fail to execute safe when passing w or wtimeout
+* Fixed slaveOk bug for findOne method
+* Implemented auth support for replicaset and test cases
+* Fixed error when not passing in rs_name
+
+0.9.6-1 2011-06-25
+------------------
+* Fixes for test to run properly using c++ bson parser
+* Fixes for dbref in native parser (correctly handles ref without db component)
+* Connection fixes for replicasets to avoid runtime conditions in cygwin (https://github.com/vincentcr)
+* Fixes for timestamp in js bson parser (distinct timestamp type now)
+
+0.9.6 2011-06-21
+----------------
+* Worked around npm version handling bug
+* Race condition fix for cygwin (https://github.com/vincentcr)
+
+0.9.5-1 2011-06-21
+------------------
+* Extracted Timestamp as separate class for bson js parser to avoid instanceof problems
+* Fixed driver strict mode issue
+
+0.9.5 2011-06-20
+----------------
+* Replicaset support (failover and reading from secondary servers)
+* Removed ServerPair and ServerCluster
+* Added connection pool functionality
+* Fixed serious bug in C++ bson parser where bytes > 127 would generate 2 byte sequences
+* Allows for forcing the server to assign ObjectID's using the option {forceServerObjectId: true}
+
+0.6.8
+-----
+* Removed multiple message concept from bson
+* Changed db.open(db) to be db.open(err, db)
+
+0.1 2010-01-30
+--------------
+* Initial release support of driver using native node.js interface
+* Supports gridfs specification
+* Supports admin functionality
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/LICENSE
new file mode 100644
index 0000000..ad410e1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/LICENSE
@@ -0,0 +1,201 @@
+Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright {yyyy} {name of copyright owner}
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License. \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/Makefile b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/Makefile
new file mode 100644
index 0000000..36e1202
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/Makefile
@@ -0,0 +1,11 @@
+NODE = node
+NPM = npm
+JSDOC = jsdoc
+name = all
+
+generate_docs:
+ # cp -R ./HISTORY.md ./docs/content/meta/release-notes.md
+ hugo -s docs/reference -d ../../public
+ $(JSDOC) -c conf.json -t docs/jsdoc-template/ -d ./public/api
+ cp -R ./public/api/scripts ./public/.
+ cp -R ./public/api/styles ./public/.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/README.md
new file mode 100644
index 0000000..73f2785
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/README.md
@@ -0,0 +1,415 @@
+[![NPM](https://nodei.co/npm/mongodb.png?downloads=true&downloadRank=true)](https://nodei.co/npm/mongodb/) [![NPM](https://nodei.co/npm-dl/mongodb.png?months=6&height=3)](https://nodei.co/npm/mongodb/)
+
+[![Build Status](https://secure.travis-ci.org/mongodb/node-mongodb-native.svg?branch=2.1)](http://travis-ci.org/mongodb/node-mongodb-native)
+[![Coverage Status](https://coveralls.io/repos/github/mongodb/node-mongodb-native/badge.svg?branch=2.1)](https://coveralls.io/github/mongodb/node-mongodb-native?branch=2.1)
+[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/mongodb/node-mongodb-native?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+# Description
+
+The official [MongoDB](https://www.mongodb.com/) driver for Node.js. Provides a high-level API on top of [mongodb-core](https://www.npmjs.com/package/mongodb-core) that is meant for end users.
+
+## MongoDB Node.JS Driver
+
+| what | where |
+|---------------|------------------------------------------------|
+| documentation | http://mongodb.github.io/node-mongodb-native/ |
+| api-doc | http://mongodb.github.io/node-mongodb-native/2.2/api/ |
+| source | https://github.com/mongodb/node-mongodb-native |
+| mongodb | http://www.mongodb.org/ |
+
+### Blogs of Engineers involved in the driver
+- Christian Kvalheim [@christkv](https://twitter.com/christkv) <http://christiankvalheim.com>
+
+### Bugs / Feature Requests
+
+Think you’ve found a bug? Want to see a new feature in node-mongodb-native? Please open a
+case in our issue management tool, JIRA:
+
+- Create an account and login <https://jira.mongodb.org>.
+- Navigate to the NODE project <https://jira.mongodb.org/browse/NODE>.
+- Click **Create Issue** - Please provide as much information as possible about the issue type and how to reproduce it.
+
+Bug reports in JIRA for all driver projects (i.e. NODE, PYTHON, CSHARP, JAVA) and the
+Core Server (i.e. SERVER) project are **public**.
+
+### Questions and Bug Reports
+
+ * mailing list: https://groups.google.com/forum/#!forum/node-mongodb-native
+ * jira: http://jira.mongodb.org/
+
+### Change Log
+
+http://jira.mongodb.org/browse/NODE
+
+# Installation
+
+The recommended way to get started using the Node.js 2.0 driver is by using the `NPM` (Node Package Manager) to install the dependency in your project.
+
+## MongoDB Driver
+
+Given that you have created your own project using `npm init` we install the mongodb driver and it's dependencies by executing the following `NPM` command.
+
+```
+npm install mongodb --save
+```
+
+This will download the MongoDB driver and add a dependency entry in your `package.json` file.
+
+## Troubleshooting
+
+The MongoDB driver depends on several other packages. These are.
+
+* mongodb-core
+* bson
+* kerberos
+* node-gyp
+
+The `kerberos` package is a C++ extension that requires a build environment to be installed on your system. You must be able to build node.js itself to be able to compile and install the `kerberos` module. Furthermore the `kerberos` module requires the MIT Kerberos package to correctly compile on UNIX operating systems. Consult your UNIX operation system package manager what libraries to install.
+
+{{% note class="important" %}}
+Windows already contains the SSPI API used for Kerberos authentication. However you will need to install a full compiler tool chain using visual studio C++ to correctly install the kerberos extension.
+{{% /note %}}
+
+### Diagnosing on UNIX
+
+If you don’t have the build essentials it won’t build. In the case of linux you will need gcc and g++, node.js with all the headers and python. The easiest way to figure out what’s missing is by trying to build the kerberos project. You can do this by performing the following steps.
+
+```
+git clone https://github.com/christkv/kerberos.git
+cd kerberos
+npm install
+```
+
+If all the steps complete you have the right toolchain installed. If you get node-gyp not found you need to install it globally by doing.
+
+```
+npm install -g node-gyp
+```
+
+If correctly compiles and runs the tests you are golden. We can now try to install the mongod driver by performing the following command.
+
+```
+cd yourproject
+npm install mongodb --save
+```
+
+If it still fails the next step is to examine the npm log. Rerun the command but in this case in verbose mode.
+
+```
+npm --loglevel verbose install mongodb
+```
+
+This will print out all the steps npm is performing while trying to install the module.
+
+### Diagnosing on Windows
+
+A known compiler tool chain known to work for compiling `kerberos` on windows is the following.
+
+* Visual Studio c++ 2010 (do not use higher versions)
+* Windows 7 64bit SDK
+* Python 2.7 or higher
+
+Open visual studio command prompt. Ensure node.exe is in your path and install node-gyp.
+
+```
+npm install -g node-gyp
+```
+
+Next you will have to build the project manually to test it. Use any tool you use with git and grab the repo.
+
+```
+git clone https://github.com/christkv/kerberos.git
+cd kerberos
+npm install
+node-gyp rebuild
+```
+
+This should rebuild the driver successfully if you have everything set up correctly.
+
+### Other possible issues
+
+Your python installation might be hosed making gyp break. I always recommend that you test your deployment environment first by trying to build node itself on the server in question as this should unearth any issues with broken packages (and there are a lot of broken packages out there).
+
+Another thing is to ensure your user has write permission to wherever the node modules are being installed.
+
+QuickStart
+==========
+The quick start guide will show you how to setup a simple application using node.js and MongoDB. Its scope is only how to set up the driver and perform the simple crud operations. For more in depth coverage we encourage reading the tutorials.
+
+Create the package.json file
+----------------------------
+Let's create a directory where our application will live. In our case we will put this under our projects directory.
+
+```
+mkdir myproject
+cd myproject
+```
+
+Enter the following command and answer the questions to create the initial structure for your new project
+
+```
+npm init
+```
+
+Next we need to edit the generated package.json file to add the dependency for the MongoDB driver. The package.json file below is just an example and your will look different depending on how you answered the questions after entering `npm init`
+
+```
+{
+ "name": "myproject",
+ "version": "1.0.0",
+ "description": "My first project",
+ "main": "index.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/christkv/myfirstproject.git"
+ },
+ "dependencies": {
+ "mongodb": "~2.0"
+ },
+ "author": "Christian Kvalheim",
+ "license": "Apache 2.0",
+ "bugs": {
+ "url": "https://github.com/christkv/myfirstproject/issues"
+ },
+ "homepage": "https://github.com/christkv/myfirstproject"
+}
+```
+
+Save the file and return to the shell or command prompt and use **NPM** to install all the dependencies.
+
+```
+npm install
+```
+
+You should see **NPM** download a lot of files. Once it's done you'll find all the downloaded packages under the **node_modules** directory.
+
+Booting up a MongoDB Server
+---------------------------
+Let's boot up a MongoDB server instance. Download the right MongoDB version from [MongoDB](http://www.mongodb.org), open a new shell or command line and ensure the **mongod** command is in the shell or command line path. Now let's create a database directory (in our case under **/data**).
+
+```
+mongod --dbpath=/data --port 27017
+```
+
+You should see the **mongod** process start up and print some status information.
+
+Connecting to MongoDB
+---------------------
+Let's create a new **app.js** file that we will use to show the basic CRUD operations using the MongoDB driver.
+
+First let's add code to connect to the server and the database **myproject**.
+
+```js
+var MongoClient = require('mongodb').MongoClient
+ , assert = require('assert');
+
+// Connection URL
+var url = 'mongodb://localhost:27017/myproject';
+// Use connect method to connect to the Server
+MongoClient.connect(url, function(err, db) {
+ assert.equal(null, err);
+ console.log("Connected correctly to server");
+
+ db.close();
+});
+```
+
+Given that you booted up the **mongod** process earlier the application should connect successfully and print **Connected correctly to server** to the console.
+
+Let's Add some code to show the different CRUD operations available.
+
+Inserting a Document
+--------------------
+Let's create a function that will insert some documents for us.
+
+```js
+var insertDocuments = function(db, callback) {
+ // Get the documents collection
+ var collection = db.collection('documents');
+ // Insert some documents
+ collection.insertMany([
+ {a : 1}, {a : 2}, {a : 3}
+ ], function(err, result) {
+ assert.equal(err, null);
+ assert.equal(3, result.result.n);
+ assert.equal(3, result.ops.length);
+ console.log("Inserted 3 documents into the document collection");
+ callback(result);
+ });
+}
+```
+
+The insert command will return a results object that contains several fields that might be useful.
+
+* **result** Contains the result document from MongoDB
+* **ops** Contains the documents inserted with added **_id** fields
+* **connection** Contains the connection used to perform the insert
+
+Let's add call the **insertDocuments** command to the **MongoClient.connect** method callback.
+
+```js
+var MongoClient = require('mongodb').MongoClient
+ , assert = require('assert');
+
+// Connection URL
+var url = 'mongodb://localhost:27017/myproject';
+// Use connect method to connect to the Server
+MongoClient.connect(url, function(err, db) {
+ assert.equal(null, err);
+ console.log("Connected correctly to server");
+
+ insertDocuments(db, function() {
+ db.close();
+ });
+});
+```
+
+We can now run the update **app.js** file.
+
+```
+node app.js
+```
+
+You should see the following output after running the **app.js** file.
+
+```
+Connected correctly to server
+Inserted 3 documents into the document collection
+```
+
+Updating a document
+-------------------
+Let's look at how to do a simple document update by adding a new field **b** to the document that has the field **a** set to **2**.
+
+```js
+var updateDocument = function(db, callback) {
+ // Get the documents collection
+ var collection = db.collection('documents');
+ // Update document where a is 2, set b equal to 1
+ collection.updateOne({ a : 2 }
+ , { $set: { b : 1 } }, function(err, result) {
+ assert.equal(err, null);
+ assert.equal(1, result.result.n);
+ console.log("Updated the document with the field a equal to 2");
+ callback(result);
+ });
+}
+```
+
+The method will update the first document where the field **a** is equal to **2** by adding a new field **b** to the document set to **1**. Let's update the callback function from **MongoClient.connect** to include the update method.
+
+```js
+var MongoClient = require('mongodb').MongoClient
+ , assert = require('assert');
+
+// Connection URL
+var url = 'mongodb://localhost:27017/myproject';
+// Use connect method to connect to the Server
+MongoClient.connect(url, function(err, db) {
+ assert.equal(null, err);
+ console.log("Connected correctly to server");
+
+ insertDocuments(db, function() {
+ updateDocument(db, function() {
+ db.close();
+ });
+ });
+});
+```
+
+Delete a document
+-----------------
+Next lets delete the document where the field **a** equals to **3**.
+
+```js
+var deleteDocument = function(db, callback) {
+ // Get the documents collection
+ var collection = db.collection('documents');
+ // Insert some documents
+ collection.deleteOne({ a : 3 }, function(err, result) {
+ assert.equal(err, null);
+ assert.equal(1, result.result.n);
+ console.log("Removed the document with the field a equal to 3");
+ callback(result);
+ });
+}
+```
+
+This will delete the first document where the field **a** equals to **3**. Let's add the method to the **MongoClient
+.connect** callback function.
+
+```js
+var MongoClient = require('mongodb').MongoClient
+ , assert = require('assert');
+
+// Connection URL
+var url = 'mongodb://localhost:27017/myproject';
+// Use connect method to connect to the Server
+MongoClient.connect(url, function(err, db) {
+ assert.equal(null, err);
+ console.log("Connected correctly to server");
+
+ insertDocuments(db, function() {
+ updateDocument(db, function() {
+ deleteDocument(db, function() {
+ db.close();
+ });
+ });
+ });
+});
+```
+
+Finally let's retrieve all the documents using a simple find.
+
+Find All Documents
+------------------
+We will finish up the Quickstart CRUD methods by performing a simple query that returns all the documents matching the query.
+
+```js
+var findDocuments = function(db, callback) {
+ // Get the documents collection
+ var collection = db.collection('documents');
+ // Find some documents
+ collection.find({}).toArray(function(err, docs) {
+ assert.equal(err, null);
+ assert.equal(2, docs.length);
+ console.log("Found the following records");
+ console.dir(docs);
+ callback(docs);
+ });
+}
+```
+
+This query will return all the documents in the **documents** collection. Since we deleted a document the total
+documents returned is **2**. Finally let's add the findDocument method to the **MongoClient.connect** callback.
+
+```js
+var MongoClient = require('mongodb').MongoClient
+ , assert = require('assert');
+
+// Connection URL
+var url = 'mongodb://localhost:27017/myproject';
+// Use connect method to connect to the Server
+MongoClient.connect(url, function(err, db) {
+ assert.equal(null, err);
+ console.log("Connected correctly to server");
+
+ insertDocuments(db, function() {
+ updateDocument(db, function() {
+ deleteDocument(db, function() {
+ findDocuments(db, function() {
+ db.close();
+ });
+ });
+ });
+ });
+});
+```
+
+This concludes the QuickStart of connecting and performing some Basic operations using the MongoDB Node.js driver. For more detailed information you can look at the tutorials covering more specific topics of interest.
+
+## Next Steps
+
+ * [MongoDB Documentation](http://mongodb.org/)
+ * [Read about Schemas](http://learnmongodbthehardway.com/)
+ * [Star us on GitHub](https://github.com/mongodb/node-mongodb-native)
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/boot_auth.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/boot_auth.js
new file mode 100644
index 0000000..95956c7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/boot_auth.js
@@ -0,0 +1,52 @@
+var ReplSetManager = require('mongodb-topology-manager').ReplSet,
+ f = require('util').format;
+
+var rsOptions = {
+ server: {
+ keyFile: __dirname + '/test/functional/data/keyfile.txt',
+ auth: null,
+ replSet: 'rs'
+ },
+ client: {
+ replSet: 'rs'
+ }
+}
+
+// Set up the nodes
+var nodes = [{
+ options: {
+ bind_ip: 'localhost', port: 31000,
+ dbpath: f('%s/../db/31000', __dirname),
+ }
+}, {
+ options: {
+ bind_ip: 'localhost', port: 31001,
+ dbpath: f('%s/../db/31001', __dirname),
+ }
+}, {
+ options: {
+ bind_ip: 'localhost', port: 31002,
+ dbpath: f('%s/../db/31002', __dirname),
+ }
+}]
+
+// Merge in any node start up options
+for(var i = 0; i < nodes.length; i++) {
+ for(var name in rsOptions.server) {
+ nodes[i].options[name] = rsOptions.server[name];
+ }
+}
+
+// Create a manager
+var replicasetManager = new ReplSetManager('mongod', nodes, rsOptions.client);
+// Purge the set
+replicasetManager.purge().then(function() {
+ // Start the server
+ replicasetManager.start().then(function() {
+ process.exit(0);
+ }).catch(function(e) {
+ console.log("====== ")
+ console.dir(e)
+ // // console.dir(e);
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/conf.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/conf.json
new file mode 100644
index 0000000..aba0b7a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/conf.json
@@ -0,0 +1,73 @@
+{
+ "plugins": ["plugins/markdown", "docs/lib/jsdoc/examples_plugin.js"],
+ "source": {
+ "include": [
+ "test/functional/operation_example_tests.js",
+ "test/functional/operation_promises_example_tests.js",
+ "test/functional/operation_generators_example_tests.js",
+ "test/functional/authentication_tests.js",
+ "test/functional/gridfs_stream_tests.js",
+ "lib/admin.js",
+ "lib/collection.js",
+ "lib/cursor.js",
+ "lib/aggregation_cursor.js",
+ "lib/command_cursor.js",
+ "lib/db.js",
+ "lib/mongo_client.js",
+ "lib/mongos.js",
+ "lib/read_preference.js",
+ "lib/replset.js",
+ "lib/server.js",
+ "lib/bulk/common.js",
+ "lib/bulk/ordered.js",
+ "lib/bulk/unordered.js",
+ "lib/gridfs/grid_store.js",
+ "node_modules/mongodb-core/lib/error.js",
+ "lib/gridfs-stream/index.js",
+ "lib/gridfs-stream/download.js",
+ "lib/gridfs-stream/upload.js",
+ "node_modules/mongodb-core/lib/connection/logger.js",
+ "node_modules/bson/lib/bson/binary.js",
+ "node_modules/bson/lib/bson/code.js",
+ "node_modules/bson/lib/bson/db_ref.js",
+ "node_modules/bson/lib/bson/double.js",
+ "node_modules/bson/lib/bson/long.js",
+ "node_modules/bson/lib/bson/objectid.js",
+ "node_modules/bson/lib/bson/symbol.js",
+ "node_modules/bson/lib/bson/timestamp.js",
+ "node_modules/bson/lib/bson/max_key.js",
+ "node_modules/bson/lib/bson/min_key.js"
+ ]
+ },
+ "templates": {
+ "cleverLinks": true,
+ "monospaceLinks": true,
+ "default": {
+ "outputSourceFiles" : true
+ },
+ "applicationName": "Node.js MongoDB Driver API",
+ "disqus": true,
+ "googleAnalytics": "UA-29229787-1",
+ "openGraph": {
+ "title": "",
+ "type": "website",
+ "image": "",
+ "site_name": "",
+ "url": ""
+ },
+ "meta": {
+ "title": "",
+ "description": "",
+ "keyword": ""
+ },
+ "linenums": true
+ },
+ "markdown": {
+ "parser": "gfm",
+ "hardwrap": true,
+ "tags": ["examples"]
+ },
+ "examples": {
+ "indent": 4
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/index.js
new file mode 100644
index 0000000..5808750
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/index.js
@@ -0,0 +1,55 @@
+// Core module
+var core = require('mongodb-core'),
+ Instrumentation = require('./lib/apm');
+
+// Set up the connect function
+var connect = require('./lib/mongo_client').connect;
+
+// Expose error class
+connect.MongoError = core.MongoError;
+
+// Actual driver classes exported
+connect.Admin = require('./lib/admin');
+connect.MongoClient = require('./lib/mongo_client');
+connect.Db = require('./lib/db');
+connect.Collection = require('./lib/collection');
+connect.Server = require('./lib/server');
+connect.ReplSet = require('./lib/replset');
+connect.Mongos = require('./lib/mongos');
+connect.ReadPreference = require('./lib/read_preference');
+connect.GridStore = require('./lib/gridfs/grid_store');
+connect.Chunk = require('./lib/gridfs/chunk');
+connect.Logger = core.Logger;
+connect.Cursor = require('./lib/cursor');
+connect.GridFSBucket = require('./lib/gridfs-stream');
+// Exported to be used in tests not to be used anywhere else
+connect.CoreServer = require('mongodb-core').Server;
+connect.CoreConnection = require('mongodb-core').Connection;
+
+// BSON types exported
+connect.Binary = core.BSON.Binary;
+connect.Code = core.BSON.Code;
+connect.Map = core.BSON.Map;
+connect.DBRef = core.BSON.DBRef;
+connect.Double = core.BSON.Double;
+connect.Int32 = core.BSON.Int32;
+connect.Long = core.BSON.Long;
+connect.MinKey = core.BSON.MinKey;
+connect.MaxKey = core.BSON.MaxKey;
+connect.ObjectID = core.BSON.ObjectID;
+connect.ObjectId = core.BSON.ObjectID;
+connect.Symbol = core.BSON.Symbol;
+connect.Timestamp = core.BSON.Timestamp;
+connect.Decimal128 = core.BSON.Decimal128;
+
+// Add connect method
+connect.connect = connect;
+
+// Set up the instrumentation method
+connect.instrument = function(options, callback) {
+ if(typeof options == 'function') callback = options, options = {};
+ return new Instrumentation(core, options, callback);
+}
+
+// Set our exports to be the connect function
+module.exports = connect;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/insert_bench.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/insert_bench.js
new file mode 100644
index 0000000..5c4d0b9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/insert_bench.js
@@ -0,0 +1,231 @@
+var MongoClient = require('./').MongoClient,
+ assert = require('assert');
+
+// var memwatch = require('memwatch-next');
+// memwatch.on('leak', function(info) {
+// console.log("======== leak")
+// });
+//
+// memwatch.on('stats', function(stats) {
+// console.log("======== stats")
+// console.dir(stats)
+// });
+
+// // Take first snapshot
+// var hd = new memwatch.HeapDiff();
+
+MongoClient.connect('mongodb://localhost:27017/bench', function(err, db) {
+ var docs = [];
+ var total = 1000;
+ var count = total;
+ var measurements = [];
+
+ // Insert a bunch of documents
+ for(var i = 0; i < 100; i++) {
+ docs.push(JSON.parse(data));
+ }
+
+ var col = db.collection('inserts');
+
+ function execute(col, callback) {
+ var start = new Date().getTime();
+
+ col.find({}).limit(100).toArray(function(e, docs) {
+ measurements.push(new Date().getTime() - start);
+ assert.equal(null, e);
+ callback();
+ });
+ }
+
+ console.log("== insert documents")
+ col.insert(docs, function(e, r) {
+ docs = [];
+ assert.equal(null, e);
+
+ console.log("== start bench")
+ for(var i = 0; i < total; i++) {
+ execute(col, function(e) {
+ count = count - 1;
+
+ if(count == 0) {
+ // Calculate total execution time for operations
+ var totalTime = measurements.reduce(function(prev, curr) {
+ return prev + curr;
+ }, 0);
+
+ console.log("===========================================");
+ console.log("total time: " + totalTime)
+
+ // var diff = hd.end();
+ // console.log("===========================================");
+ // console.log(JSON.stringify(diff, null, 2))
+
+ db.close();
+ process.exit(0)
+ }
+ });
+ }
+ });
+});
+
+var data = JSON.stringify({
+ "data": [
+ {
+ "_id": 1,
+ "x": 11
+ },
+ {
+ "_id": 2,
+ "x": 22
+ },
+ {
+ "_id": 3,
+ "x": 33
+ }
+ ],
+ "collection_name": "test",
+ "database_name": "command-monitoring-tests",
+ "tests": [
+ {
+ "description": "A successful mixed bulk write",
+ "operation": {
+ "name": "bulkWrite",
+ "arguments": {
+ "requests": [
+ {
+ "insertOne": {
+ "document": {
+ "_id": 4,
+ "x": 44
+ }
+ }
+ },
+ {
+ "updateOne": {
+ "filter": {
+ "_id": 3
+ },
+ "update": {
+ "set": {
+ "x": 333
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ "expectations": [
+ {
+ "command_started_event": {
+ "command": {
+ "insert": "test",
+ "documents": [
+ {
+ "_id": 4,
+ "x": 44
+ }
+ ],
+ "ordered": true
+ },
+ "command_name": "insert",
+ "database_name": "command-monitoring-tests"
+ }
+ },
+ {
+ "command_succeeded_event": {
+ "reply": {
+ "ok": 1.0,
+ "n": 1
+ },
+ "command_name": "insert"
+ }
+ },
+ {
+ "command_started_event": {
+ "command": {
+ "update": "test",
+ "updates": [
+ {
+ "q": {
+ "_id": 3
+ },
+ "u": {
+ "set": {
+ "x": 333
+ }
+ },
+ "upsert": false,
+ "multi": false
+ }
+ ],
+ "ordered": true
+ },
+ "command_name": "update",
+ "database_name": "command-monitoring-tests"
+ }
+ },
+ {
+ "command_succeeded_event": {
+ "reply": {
+ "ok": 1.0,
+ "n": 1
+ },
+ "command_name": "update"
+ }
+ }
+ ]
+ },
+ {
+ "description": "A successful unordered bulk write with an unacknowledged write concern",
+ "operation": {
+ "name": "bulkWrite",
+ "arguments": {
+ "requests": [
+ {
+ "insertOne": {
+ "document": {
+ "_id": 4,
+ "x": 44
+ }
+ }
+ }
+ ],
+ "ordered": false,
+ "writeConcern": {
+ "w": 0
+ }
+ }
+ },
+ "expectations": [
+ {
+ "command_started_event": {
+ "command": {
+ "insert": "test",
+ "documents": [
+ {
+ "_id": 4,
+ "x": 44
+ }
+ ],
+ "ordered": false,
+ "writeConcern": {
+ "w": 0
+ }
+ },
+ "command_name": "insert",
+ "database_name": "command-monitoring-tests"
+ }
+ },
+ {
+ "command_succeeded_event": {
+ "reply": {
+ "ok": 1.0
+ },
+ "command_name": "insert"
+ }
+ }
+ ]
+ }
+ ]
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/admin.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/admin.js
new file mode 100644
index 0000000..528d582
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/admin.js
@@ -0,0 +1,581 @@
+"use strict";
+
+var toError = require('./utils').toError,
+ Define = require('./metadata'),
+ shallowClone = require('./utils').shallowClone;
+
+/**
+ * @fileOverview The **Admin** class is an internal class that allows convenient access to
+ * the admin functionality and commands for MongoDB.
+ *
+ * **ADMIN Cannot directly be instantiated**
+ * @example
+ * var MongoClient = require('mongodb').MongoClient,
+ * test = require('assert');
+ * // Connection url
+ * var url = 'mongodb://localhost:27017/test';
+ * // Connect using MongoClient
+ * MongoClient.connect(url, function(err, db) {
+ * // Use the admin database for the operation
+ * var adminDb = db.admin();
+ *
+ * // List all the available databases
+ * adminDb.listDatabases(function(err, dbs) {
+ * test.equal(null, err);
+ * test.ok(dbs.databases.length > 0);
+ * db.close();
+ * });
+ * });
+ */
+
+/**
+ * Create a new Admin instance (INTERNAL TYPE, do not instantiate directly)
+ * @class
+ * @return {Admin} a collection instance.
+ */
+var Admin = function(db, topology, promiseLibrary) {
+ if(!(this instanceof Admin)) return new Admin(db, topology);
+ var self = this;
+
+ // Internal state
+ this.s = {
+ db: db
+ , topology: topology
+ , promiseLibrary: promiseLibrary
+ }
+}
+
+var define = Admin.define = new Define('Admin', Admin, false);
+
+/**
+ * The callback format for results
+ * @callback Admin~resultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {object} result The result object if the command was executed successfully.
+ */
+
+/**
+ * Execute a command
+ * @method
+ * @param {object} command The command hash
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {number} [options.maxTimeMS=null] Number of milliseconds to wait before aborting the query.
+ * @param {Admin~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.command = function(command, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ options = args.length ? args.shift() : {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return this.s.db.executeDbAdminCommand(command, options, function(err, doc) {
+ return callback != null ? callback(err, doc) : null;
+ });
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.s.db.executeDbAdminCommand(command, options, function(err, doc) {
+ if(err) return reject(err);
+ resolve(doc);
+ });
+ });
+}
+
+define.classMethod('command', {callback: true, promise:true});
+
+/**
+ * Retrieve the server information for the current
+ * instance of the db client
+ *
+ * @param {Admin~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.buildInfo = function(callback) {
+ var self = this;
+ // Execute using callback
+ if(typeof callback == 'function') return this.serverInfo(callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.serverInfo(function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('buildInfo', {callback: true, promise:true});
+
+/**
+ * Retrieve the server information for the current
+ * instance of the db client
+ *
+ * @param {Admin~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.serverInfo = function(callback) {
+ var self = this;
+ // Execute using callback
+ if(typeof callback == 'function') return this.s.db.executeDbAdminCommand({buildinfo:1}, function(err, doc) {
+ if(err != null) return callback(err, null);
+ callback(null, doc);
+ });
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.s.db.executeDbAdminCommand({buildinfo:1}, function(err, doc) {
+ if(err) return reject(err);
+ resolve(doc);
+ });
+ });
+}
+
+define.classMethod('serverInfo', {callback: true, promise:true});
+
+/**
+ * Retrieve this db's server status.
+ *
+ * @param {Admin~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.serverStatus = function(callback) {
+ var self = this;
+
+ // Execute using callback
+ if(typeof callback == 'function') return serverStatus(self, callback)
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ serverStatus(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var serverStatus = function(self, callback) {
+ self.s.db.executeDbAdminCommand({serverStatus: 1}, function(err, doc) {
+ if(err == null && doc.ok === 1) {
+ callback(null, doc);
+ } else {
+ if(err) return callback(err, false);
+ return callback(toError(doc), false);
+ }
+ });
+}
+
+define.classMethod('serverStatus', {callback: true, promise:true});
+
+/**
+ * Retrieve the current profiling Level for MongoDB
+ *
+ * @param {Admin~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.profilingLevel = function(callback) {
+ var self = this;
+
+ // Execute using callback
+ if(typeof callback == 'function') return profilingLevel(self, callback)
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ profilingLevel(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var profilingLevel = function(self, callback) {
+ self.s.db.executeDbAdminCommand({profile:-1}, function(err, doc) {
+ doc = doc;
+
+ if(err == null && doc.ok === 1) {
+ var was = doc.was;
+ if(was == 0) return callback(null, "off");
+ if(was == 1) return callback(null, "slow_only");
+ if(was == 2) return callback(null, "all");
+ return callback(new Error("Error: illegal profiling level value " + was), null);
+ } else {
+ err != null ? callback(err, null) : callback(new Error("Error with profile command"), null);
+ }
+ });
+}
+
+define.classMethod('profilingLevel', {callback: true, promise:true});
+
+/**
+ * Ping the MongoDB server and retrieve results
+ *
+ * @param {Admin~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.ping = function(options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 0);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+
+ // Execute using callback
+ if(typeof callback == 'function') return this.s.db.executeDbAdminCommand({ping: 1}, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.s.db.executeDbAdminCommand({ping: 1}, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('ping', {callback: true, promise:true});
+
+/**
+ * Authenticate a user against the server.
+ * @method
+ * @param {string} username The username.
+ * @param {string} [password] The password.
+ * @param {Admin~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.authenticate = function(username, password, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = shallowClone(options);
+ options.authdb = 'admin';
+
+ // Execute using callback
+ if(typeof callback == 'function') return this.s.db.authenticate(username, password, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.s.db.authenticate(username, password, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('authenticate', {callback: true, promise:true});
+
+/**
+ * Logout user from server, fire off on all connections and remove all auth info
+ * @method
+ * @param {Admin~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.logout = function(callback) {
+ var self = this;
+ // Execute using callback
+ if(typeof callback == 'function') return this.s.db.logout({dbName: 'admin'}, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.s.db.logout({dbName: 'admin'}, function(err, r) {
+ if(err) return reject(err);
+ resolve(true);
+ });
+ });
+}
+
+define.classMethod('logout', {callback: true, promise:true});
+
+// Get write concern
+var writeConcern = function(options, db) {
+ options = shallowClone(options);
+
+ // If options already contain write concerns return it
+ if(options.w || options.wtimeout || options.j || options.fsync) {
+ return options;
+ }
+
+ // Set db write concern if available
+ if(db.writeConcern) {
+ if(options.w) options.w = db.writeConcern.w;
+ if(options.wtimeout) options.wtimeout = db.writeConcern.wtimeout;
+ if(options.j) options.j = db.writeConcern.j;
+ if(options.fsync) options.fsync = db.writeConcern.fsync;
+ }
+
+ // Return modified options
+ return options;
+}
+
+/**
+ * Add a user to the database.
+ * @method
+ * @param {string} username The username.
+ * @param {string} password The password.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.fsync=false] Specify a file sync write concern.
+ * @param {object} [options.customData=null] Custom data associated with the user (only Mongodb 2.6 or higher)
+ * @param {object[]} [options.roles=null] Roles associated with the created user (only Mongodb 2.6 or higher)
+ * @param {Admin~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.addUser = function(username, password, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 2);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ options = args.length ? args.shift() : {};
+ options = options || {};
+ // Get the options
+ options = writeConcern(options, self.s.db)
+ // Set the db name to admin
+ options.dbName = 'admin';
+
+ // Execute using callback
+ if(typeof callback == 'function')
+ return self.s.db.addUser(username, password, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.s.db.addUser(username, password, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('addUser', {callback: true, promise:true});
+
+/**
+ * Remove a user from a database
+ * @method
+ * @param {string} username The username.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.fsync=false] Specify a file sync write concern.
+ * @param {Admin~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.removeUser = function(username, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ options = args.length ? args.shift() : {};
+ options = options || {};
+ // Get the options
+ options = writeConcern(options, self.s.db)
+ // Set the db name
+ options.dbName = 'admin';
+
+ // Execute using callback
+ if(typeof callback == 'function')
+ return self.s.db.removeUser(username, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.s.db.removeUser(username, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('removeUser', {callback: true, promise:true});
+
+/**
+ * Set the current profiling level of MongoDB
+ *
+ * @param {string} level The new profiling level (off, slow_only, all).
+ * @param {Admin~resultCallback} [callback] The command result callback.
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.setProfilingLevel = function(level, callback) {
+ var self = this;
+
+ // Execute using callback
+ if(typeof callback == 'function') return setProfilingLevel(self, level, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ setProfilingLevel(self, level, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var setProfilingLevel = function(self, level, callback) {
+ var command = {};
+ var profile = 0;
+
+ if(level == "off") {
+ profile = 0;
+ } else if(level == "slow_only") {
+ profile = 1;
+ } else if(level == "all") {
+ profile = 2;
+ } else {
+ return callback(new Error("Error: illegal profiling level value " + level));
+ }
+
+ // Set up the profile number
+ command['profile'] = profile;
+
+ self.s.db.executeDbAdminCommand(command, function(err, doc) {
+ doc = doc;
+
+ if(err == null && doc.ok === 1)
+ return callback(null, level);
+ return err != null ? callback(err, null) : callback(new Error("Error with profile command"), null);
+ });
+}
+
+define.classMethod('setProfilingLevel', {callback: true, promise:true});
+
+/**
+ * Retrive the current profiling information for MongoDB
+ *
+ * @param {Admin~resultCallback} [callback] The command result callback.
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.profilingInfo = function(callback) {
+ var self = this;
+
+ // Execute using callback
+ if(typeof callback == 'function') return profilingInfo(self, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ profilingInfo(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var profilingInfo = function(self, callback) {
+ try {
+ self.s.topology.cursor("admin.system.profile", { find: 'system.profile', query: {}}, {}).toArray(callback);
+ } catch (err) {
+ return callback(err, null);
+ }
+}
+
+define.classMethod('profilingLevel', {callback: true, promise:true});
+
+/**
+ * Validate an existing collection
+ *
+ * @param {string} collectionName The name of the collection to validate.
+ * @param {object} [options=null] Optional settings.
+ * @param {Admin~resultCallback} [callback] The command result callback.
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.validateCollection = function(collectionName, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ options = args.length ? args.shift() : {};
+ options = options || {};
+
+ // Execute using callback
+ if(typeof callback == 'function')
+ return validateCollection(self, collectionName, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ validateCollection(self, collectionName, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var validateCollection = function(self, collectionName, options, callback) {
+ var command = {validate: collectionName};
+ var keys = Object.keys(options);
+
+ // Decorate command with extra options
+ for(var i = 0; i < keys.length; i++) {
+ if(options.hasOwnProperty(keys[i])) {
+ command[keys[i]] = options[keys[i]];
+ }
+ }
+
+ self.s.db.command(command, function(err, doc) {
+ if(err != null) return callback(err, null);
+
+ if(doc.ok === 0)
+ return callback(new Error("Error with validate command"), null);
+ if(doc.result != null && doc.result.constructor != String)
+ return callback(new Error("Error with validation data"), null);
+ if(doc.result != null && doc.result.match(/exception|corrupt/) != null)
+ return callback(new Error("Error: invalid collection " + collectionName), null);
+ if(doc.valid != null && !doc.valid)
+ return callback(new Error("Error: invalid collection " + collectionName), null);
+
+ return callback(null, doc);
+ });
+}
+
+define.classMethod('validateCollection', {callback: true, promise:true});
+
+/**
+ * List the available databases
+ *
+ * @param {Admin~resultCallback} [callback] The command result callback.
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.listDatabases = function(callback) {
+ var self = this;
+ // Execute using callback
+ if(typeof callback == 'function') return self.s.db.executeDbAdminCommand({listDatabases:1}, {}, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.s.db.executeDbAdminCommand({listDatabases:1}, {}, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('listDatabases', {callback: true, promise:true});
+
+/**
+ * Get ReplicaSet status
+ *
+ * @param {Admin~resultCallback} [callback] The command result callback.
+ * @return {Promise} returns Promise if no callback passed
+ */
+Admin.prototype.replSetGetStatus = function(callback) {
+ var self = this;
+ // Execute using callback
+ if(typeof callback == 'function') return replSetGetStatus(self, callback);
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ replSetGetStatus(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var replSetGetStatus = function(self, callback) {
+ self.s.db.executeDbAdminCommand({replSetGetStatus:1}, function(err, doc) {
+ if(err == null && doc.ok === 1)
+ return callback(null, doc);
+ if(err) return callback(err, false);
+ callback(toError(doc), false);
+ });
+}
+
+define.classMethod('replSetGetStatus', {callback: true, promise:true});
+
+module.exports = Admin;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/aggregation_cursor.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/aggregation_cursor.js
new file mode 100644
index 0000000..7546ee3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/aggregation_cursor.js
@@ -0,0 +1,444 @@
+"use strict";
+
+var inherits = require('util').inherits
+ , f = require('util').format
+ , toError = require('./utils').toError
+ , getSingleProperty = require('./utils').getSingleProperty
+ , formattedOrderClause = require('./utils').formattedOrderClause
+ , handleCallback = require('./utils').handleCallback
+ , Logger = require('mongodb-core').Logger
+ , EventEmitter = require('events').EventEmitter
+ , ReadPreference = require('./read_preference')
+ , MongoError = require('mongodb-core').MongoError
+ , Readable = require('stream').Readable || require('readable-stream').Readable
+ , Define = require('./metadata')
+ , CoreCursor = require('./cursor')
+ , Query = require('mongodb-core').Query;
+
+/**
+ * @fileOverview The **AggregationCursor** class is an internal class that embodies an aggregation cursor on MongoDB
+ * allowing for iteration over the results returned from the underlying query. It supports
+ * one by one document iteration, conversion to an array or can be iterated as a Node 0.10.X
+ * or higher stream
+ *
+ * **AGGREGATIONCURSOR Cannot directly be instantiated**
+ * @example
+ * var MongoClient = require('mongodb').MongoClient,
+ * test = require('assert');
+ * // Connection url
+ * var url = 'mongodb://localhost:27017/test';
+ * // Connect using MongoClient
+ * MongoClient.connect(url, function(err, db) {
+ * // Create a collection we want to drop later
+ * var col = db.collection('createIndexExample1');
+ * // Insert a bunch of documents
+ * col.insert([{a:1, b:1}
+ * , {a:2, b:2}, {a:3, b:3}
+ * , {a:4, b:4}], {w:1}, function(err, result) {
+ * test.equal(null, err);
+ * // Show that duplicate records got dropped
+ * col.aggregation({}, {cursor: {}}).toArray(function(err, items) {
+ * test.equal(null, err);
+ * test.equal(4, items.length);
+ * db.close();
+ * });
+ * });
+ * });
+ */
+
+/**
+ * Namespace provided by the browser.
+ * @external Readable
+ */
+
+/**
+ * Creates a new Aggregation Cursor instance (INTERNAL TYPE, do not instantiate directly)
+ * @class AggregationCursor
+ * @extends external:Readable
+ * @fires AggregationCursor#data
+ * @fires AggregationCursor#end
+ * @fires AggregationCursor#close
+ * @fires AggregationCursor#readable
+ * @return {AggregationCursor} an AggregationCursor instance.
+ */
+var AggregationCursor = function(bson, ns, cmd, options, topology, topologyOptions) {
+ CoreCursor.apply(this, Array.prototype.slice.call(arguments, 0));
+ var self = this;
+ var state = AggregationCursor.INIT;
+ var streamOptions = {};
+
+ // MaxTimeMS
+ var maxTimeMS = null;
+
+ // Get the promiseLibrary
+ var promiseLibrary = options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // Set up
+ Readable.call(this, {objectMode: true});
+
+ // Internal state
+ this.s = {
+ // MaxTimeMS
+ maxTimeMS: maxTimeMS
+ // State
+ , state: state
+ // Stream options
+ , streamOptions: streamOptions
+ // BSON
+ , bson: bson
+ // Namespae
+ , ns: ns
+ // Command
+ , cmd: cmd
+ // Options
+ , options: options
+ // Topology
+ , topology: topology
+ // Topology Options
+ , topologyOptions: topologyOptions
+ // Promise library
+ , promiseLibrary: promiseLibrary
+ }
+}
+
+/**
+ * AggregationCursor stream data event, fired for each document in the cursor.
+ *
+ * @event AggregationCursor#data
+ * @type {object}
+ */
+
+/**
+ * AggregationCursor stream end event
+ *
+ * @event AggregationCursor#end
+ * @type {null}
+ */
+
+/**
+ * AggregationCursor stream close event
+ *
+ * @event AggregationCursor#close
+ * @type {null}
+ */
+
+/**
+ * AggregationCursor stream readable event
+ *
+ * @event AggregationCursor#readable
+ * @type {null}
+ */
+
+// Inherit from Readable
+inherits(AggregationCursor, Readable);
+
+// Set the methods to inherit from prototype
+var methodsToInherit = ['_next', 'next', 'each', 'forEach', 'toArray'
+ , 'rewind', 'bufferedCount', 'readBufferedDocuments', 'close', 'isClosed', 'kill'
+ , '_find', '_getmore', '_killcursor', 'isDead', 'explain', 'isNotified'];
+
+// Extend the Cursor
+for(var name in CoreCursor.prototype) {
+ AggregationCursor.prototype[name] = CoreCursor.prototype[name];
+}
+
+var define = AggregationCursor.define = new Define('AggregationCursor', AggregationCursor, true);
+
+/**
+ * Set the batch size for the cursor.
+ * @method
+ * @param {number} value The batchSize for the cursor.
+ * @throws {MongoError}
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.batchSize = function(value) {
+ if(this.s.state == AggregationCursor.CLOSED || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true });
+ if(typeof value != 'number') throw MongoError.create({message: "batchSize requires an integer", drvier:true });
+ if(this.s.cmd.cursor) this.s.cmd.cursor.batchSize = value;
+ this.setCursorBatchSize(value);
+ return this;
+}
+
+define.classMethod('batchSize', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a geoNear stage to the aggregation pipeline
+ * @method
+ * @param {object} document The geoNear stage document.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.geoNear = function(document) {
+ this.s.cmd.pipeline.push({$geoNear: document});
+ return this;
+}
+
+define.classMethod('geoNear', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a group stage to the aggregation pipeline
+ * @method
+ * @param {object} document The group stage document.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.group = function(document) {
+ this.s.cmd.pipeline.push({$group: document});
+ return this;
+}
+
+define.classMethod('group', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a limit stage to the aggregation pipeline
+ * @method
+ * @param {number} value The state limit value.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.limit = function(value) {
+ this.s.cmd.pipeline.push({$limit: value});
+ return this;
+}
+
+define.classMethod('limit', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a match stage to the aggregation pipeline
+ * @method
+ * @param {object} document The match stage document.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.match = function(document) {
+ this.s.cmd.pipeline.push({$match: document});
+ return this;
+}
+
+define.classMethod('match', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a maxTimeMS stage to the aggregation pipeline
+ * @method
+ * @param {number} value The state maxTimeMS value.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.maxTimeMS = function(value) {
+ if(this.s.topology.lastIsMaster().minWireVersion > 2) {
+ this.s.cmd.maxTimeMS = value;
+ }
+ return this;
+}
+
+define.classMethod('maxTimeMS', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a out stage to the aggregation pipeline
+ * @method
+ * @param {number} destination The destination name.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.out = function(destination) {
+ this.s.cmd.pipeline.push({$out: destination});
+ return this;
+}
+
+define.classMethod('out', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a project stage to the aggregation pipeline
+ * @method
+ * @param {object} document The project stage document.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.project = function(document) {
+ this.s.cmd.pipeline.push({$project: document});
+ return this;
+}
+
+define.classMethod('project', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a lookup stage to the aggregation pipeline
+ * @method
+ * @param {object} document The lookup stage document.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.lookup = function(document) {
+ this.s.cmd.pipeline.push({$lookup: document});
+ return this;
+}
+
+define.classMethod('lookup', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a redact stage to the aggregation pipeline
+ * @method
+ * @param {object} document The redact stage document.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.redact = function(document) {
+ this.s.cmd.pipeline.push({$redact: document});
+ return this;
+}
+
+define.classMethod('redact', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a skip stage to the aggregation pipeline
+ * @method
+ * @param {number} value The state skip value.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.skip = function(value) {
+ this.s.cmd.pipeline.push({$skip: value});
+ return this;
+}
+
+define.classMethod('skip', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a sort stage to the aggregation pipeline
+ * @method
+ * @param {object} document The sort stage document.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.sort = function(document) {
+ this.s.cmd.pipeline.push({$sort: document});
+ return this;
+}
+
+define.classMethod('sort', {callback: false, promise:false, returns: [AggregationCursor]});
+
+/**
+ * Add a unwind stage to the aggregation pipeline
+ * @method
+ * @param {number} field The unwind field name.
+ * @return {AggregationCursor}
+ */
+AggregationCursor.prototype.unwind = function(field) {
+ this.s.cmd.pipeline.push({$unwind: field});
+ return this;
+}
+
+define.classMethod('unwind', {callback: false, promise:false, returns: [AggregationCursor]});
+
+AggregationCursor.prototype.get = AggregationCursor.prototype.toArray;
+
+// Inherited methods
+define.classMethod('toArray', {callback: true, promise:true});
+define.classMethod('each', {callback: true, promise:false});
+define.classMethod('forEach', {callback: true, promise:false});
+define.classMethod('next', {callback: true, promise:true});
+define.classMethod('close', {callback: true, promise:true});
+define.classMethod('isClosed', {callback: false, promise:false, returns: [Boolean]});
+define.classMethod('rewind', {callback: false, promise:false});
+define.classMethod('bufferedCount', {callback: false, promise:false, returns: [Number]});
+define.classMethod('readBufferedDocuments', {callback: false, promise:false, returns: [Array]});
+
+/**
+ * Get the next available document from the cursor, returns null if no more documents are available.
+ * @function AggregationCursor.prototype.next
+ * @param {AggregationCursor~resultCallback} [callback] The result callback.
+ * @throws {MongoError}
+ * @return {Promise} returns Promise if no callback passed
+ */
+
+/**
+ * The callback format for results
+ * @callback AggregationCursor~toArrayResultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {object[]} documents All the documents the satisfy the cursor.
+ */
+
+/**
+ * Returns an array of documents. The caller is responsible for making sure that there
+ * is enough memory to store the results. Note that the array only contain partial
+ * results when this cursor had been previouly accessed. In that case,
+ * cursor.rewind() can be used to reset the cursor.
+ * @method AggregationCursor.prototype.toArray
+ * @param {AggregationCursor~toArrayResultCallback} [callback] The result callback.
+ * @throws {MongoError}
+ * @return {Promise} returns Promise if no callback passed
+ */
+
+/**
+ * The callback format for results
+ * @callback AggregationCursor~resultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {(object|null)} result The result object if the command was executed successfully.
+ */
+
+/**
+ * Iterates over all the documents for this cursor. As with **{cursor.toArray}**,
+ * not all of the elements will be iterated if this cursor had been previouly accessed.
+ * In that case, **{cursor.rewind}** can be used to reset the cursor. However, unlike
+ * **{cursor.toArray}**, the cursor will only hold a maximum of batch size elements
+ * at any given time if batch size is specified. Otherwise, the caller is responsible
+ * for making sure that the entire result can fit the memory.
+ * @method AggregationCursor.prototype.each
+ * @param {AggregationCursor~resultCallback} callback The result callback.
+ * @throws {MongoError}
+ * @return {null}
+ */
+
+/**
+ * Close the cursor, sending a AggregationCursor command and emitting close.
+ * @method AggregationCursor.prototype.close
+ * @param {AggregationCursor~resultCallback} [callback] The result callback.
+ * @return {Promise} returns Promise if no callback passed
+ */
+
+/**
+ * Is the cursor closed
+ * @method AggregationCursor.prototype.isClosed
+ * @return {boolean}
+ */
+
+/**
+ * Execute the explain for the cursor
+ * @method AggregationCursor.prototype.explain
+ * @param {AggregationCursor~resultCallback} [callback] The result callback.
+ * @return {Promise} returns Promise if no callback passed
+ */
+
+/**
+ * Clone the cursor
+ * @function AggregationCursor.prototype.clone
+ * @return {AggregationCursor}
+ */
+
+/**
+ * Resets the cursor
+ * @function AggregationCursor.prototype.rewind
+ * @return {AggregationCursor}
+ */
+
+/**
+ * The callback format for the forEach iterator method
+ * @callback AggregationCursor~iteratorCallback
+ * @param {Object} doc An emitted document for the iterator
+ */
+
+/**
+ * The callback error format for the forEach iterator method
+ * @callback AggregationCursor~endCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ */
+
+/*
+ * Iterates over all the documents for this cursor using the iterator, callback pattern.
+ * @method AggregationCursor.prototype.forEach
+ * @param {AggregationCursor~iteratorCallback} iterator The iteration callback.
+ * @param {AggregationCursor~endCallback} callback The end callback.
+ * @throws {MongoError}
+ * @return {null}
+ */
+
+AggregationCursor.INIT = 0;
+AggregationCursor.OPEN = 1;
+AggregationCursor.CLOSED = 2;
+
+module.exports = AggregationCursor;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/apm.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/apm.js
new file mode 100644
index 0000000..3810c3f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/apm.js
@@ -0,0 +1,613 @@
+var EventEmitter = require('events').EventEmitter,
+ inherits = require('util').inherits;
+
+// Get prototypes
+var AggregationCursor = require('./aggregation_cursor'),
+ CommandCursor = require('./command_cursor'),
+ OrderedBulkOperation = require('./bulk/ordered').OrderedBulkOperation,
+ UnorderedBulkOperation = require('./bulk/unordered').UnorderedBulkOperation,
+ GridStore = require('./gridfs/grid_store'),
+ Server = require('./server'),
+ ReplSet = require('./replset'),
+ Mongos = require('./mongos'),
+ Cursor = require('./cursor'),
+ Collection = require('./collection'),
+ Db = require('./db'),
+ Admin = require('./admin');
+
+var basicOperationIdGenerator = {
+ operationId: 1,
+
+ next: function() {
+ return this.operationId++;
+ }
+}
+
+var basicTimestampGenerator = {
+ current: function() {
+ return new Date().getTime();
+ },
+
+ duration: function(start, end) {
+ return end - start;
+ }
+}
+
+var senstiveCommands = ['authenticate', 'saslStart', 'saslContinue', 'getnonce',
+ 'createUser', 'updateUser', 'copydbgetnonce', 'copydbsaslstart', 'copydb'];
+
+var Instrumentation = function(core, options, callback) {
+ options = options || {};
+
+ // Optional id generators
+ var operationIdGenerator = options.operationIdGenerator || basicOperationIdGenerator;
+ // Optional timestamp generator
+ var timestampGenerator = options.timestampGenerator || basicTimestampGenerator;
+ // Extend with event emitter functionality
+ EventEmitter.call(this);
+
+ // Contains all the instrumentation overloads
+ this.overloads = [];
+
+ // ---------------------------------------------------------
+ //
+ // Instrument prototype
+ //
+ // ---------------------------------------------------------
+
+ var instrumentPrototype = function(callback) {
+ var instrumentations = []
+
+ // Classes to support
+ var classes = [GridStore, OrderedBulkOperation, UnorderedBulkOperation,
+ CommandCursor, AggregationCursor, Cursor, Collection, Db];
+
+ // Add instrumentations to the available list
+ for(var i = 0; i < classes.length; i++) {
+ if(classes[i].define) {
+ instrumentations.push(classes[i].define.generate());
+ }
+ }
+
+ // Return the list of instrumentation points
+ callback(null, instrumentations);
+ }
+
+ // Did the user want to instrument the prototype
+ if(typeof callback == 'function') {
+ instrumentPrototype(callback);
+ }
+
+ // ---------------------------------------------------------
+ //
+ // Server
+ //
+ // ---------------------------------------------------------
+
+ // Reference
+ var self = this;
+ // Names of methods we need to wrap
+ var methods = ['command', 'insert', 'update', 'remove'];
+ // Prototype
+ var proto = core.Server.prototype;
+ // Core server method we are going to wrap
+ methods.forEach(function(x) {
+ var func = proto[x];
+
+ // Add to overloaded methods
+ self.overloads.push({proto: proto, name:x, func:func});
+
+ // The actual prototype
+ proto[x] = function() {
+ var requestId = core.Query.nextRequestId();
+ // Get the aruments
+ var args = Array.prototype.slice.call(arguments, 0);
+ var ns = args[0];
+ var commandObj = args[1];
+ var options = args[2] || {};
+ var keys = Object.keys(commandObj);
+ var commandName = keys[0];
+ var db = ns.split('.')[0];
+
+ // Do we have a legacy insert/update/remove command
+ if(x == 'insert') { //} && !this.lastIsMaster().maxWireVersion) {
+ commandName = 'insert';
+ // Get the collection
+ var col = ns.split('.');
+ col.shift();
+ col = col.join('.');
+
+ // Re-write the command
+ commandObj = {
+ insert: col, documents: commandObj
+ }
+
+ if(options.writeConcern && Object.keys(options.writeConcern).length > 0) {
+ commandObj.writeConcern = options.writeConcern;
+ }
+
+ commandObj.ordered = options.ordered != undefined ? options.ordered : true;
+ } else if(x == 'update') { // && !this.lastIsMaster().maxWireVersion) {
+ commandName = 'update';
+
+ // Get the collection
+ var col = ns.split('.');
+ col.shift();
+ col = col.join('.');
+
+ // Re-write the command
+ commandObj = {
+ update: col, updates: commandObj
+ }
+
+ if(options.writeConcern && Object.keys(options.writeConcern).length > 0) {
+ commandObj.writeConcern = options.writeConcern;
+ }
+
+ commandObj.ordered = options.ordered != undefined ? options.ordered : true;
+ } else if(x == 'remove') { //&& !this.lastIsMaster().maxWireVersion) {
+ commandName = 'delete';
+
+ // Get the collection
+ var col = ns.split('.');
+ col.shift();
+ col = col.join('.');
+
+ // Re-write the command
+ commandObj = {
+ delete: col, deletes: commandObj
+ }
+
+ if(options.writeConcern && Object.keys(options.writeConcern).length > 0) {
+ commandObj.writeConcern = options.writeConcern;
+ }
+
+ commandObj.ordered = options.ordered != undefined ? options.ordered : true;
+ // } else if(x == 'insert' || x == 'update' || x == 'remove' && this.lastIsMaster().maxWireVersion >= 2) {
+ // // Skip the insert/update/remove commands as they are executed as actual write commands in 2.6 or higher
+ // return func.apply(this, args);
+ }
+
+ // console.log("=== APM 0")
+
+ // Get the callback
+ var callback = args.pop();
+ // Set current callback operation id from the current context or create
+ // a new one
+ var ourOpId = callback.operationId || operationIdGenerator.next();
+ // console.log("=== APM 1")
+
+ // Get a connection reference for this server instance
+ var connection = this.s.pool.get()
+
+ // console.log("=== APM 2")
+ // Emit the start event for the command
+ var command = {
+ // Returns the command.
+ command: commandObj,
+ // Returns the database name.
+ databaseName: db,
+ // Returns the command name.
+ commandName: commandName,
+ // Returns the driver generated request id.
+ requestId: requestId,
+ // Returns the driver generated operation id.
+ // This is used to link events together such as bulk write operations. OPTIONAL.
+ operationId: ourOpId,
+ // Returns the connection id for the command. For languages that do not have this,
+ // this MUST return the driver equivalent which MUST include the server address and port.
+ // The name of this field is flexible to match the object that is returned from the driver.
+ connectionId: connection
+ };
+
+ // console.log("=== APM 3")
+
+ // Filter out any sensitive commands
+ if(senstiveCommands.indexOf(commandName.toLowerCase())) {
+ command.commandObj = {};
+ command.commandObj[commandName] = true;
+ }
+
+ // Emit the started event
+ self.emit('started', command)
+
+ // Start time
+ var startTime = timestampGenerator.current();
+
+ // Push our handler callback
+ args.push(function(err, r) {
+ var endTime = timestampGenerator.current();
+ var command = {
+ duration: timestampGenerator.duration(startTime, endTime),
+ commandName: commandName,
+ requestId: requestId,
+ operationId: ourOpId,
+ connectionId: connection
+ };
+
+ // If we have an error
+ if(err || (r && r.result && r.result.ok == 0)) {
+ command.failure = err || r.result.writeErrors || r.result;
+
+ // Filter out any sensitive commands
+ if(senstiveCommands.indexOf(commandName.toLowerCase())) {
+ command.failure = {};
+ }
+
+ self.emit('failed', command);
+ } else if(commandObj && commandObj.writeConcern
+ && commandObj.writeConcern.w == 0) {
+ // If we have write concern 0
+ command.reply = {ok:1};
+ self.emit('succeeded', command);
+ } else {
+ command.reply = r && r.result ? r.result : r;
+
+ // Filter out any sensitive commands
+ if(senstiveCommands.indexOf(commandName.toLowerCase()) != -1) {
+ command.reply = {};
+ }
+
+ self.emit('succeeded', command);
+ }
+
+ // Return to caller
+ callback(err, r);
+ });
+
+ // Apply the call
+ func.apply(this, args);
+ }
+ });
+
+ // ---------------------------------------------------------
+ //
+ // Bulk Operations
+ //
+ // ---------------------------------------------------------
+
+ // Inject ourselves into the Bulk methods
+ var methods = ['execute'];
+ var prototypes = [
+ require('./bulk/ordered').Bulk.prototype,
+ require('./bulk/unordered').Bulk.prototype
+ ]
+
+ prototypes.forEach(function(proto) {
+ // Core server method we are going to wrap
+ methods.forEach(function(x) {
+ var func = proto[x];
+
+ // Add to overloaded methods
+ self.overloads.push({proto: proto, name:x, func:func});
+
+ // The actual prototype
+ proto[x] = function() {
+ var bulk = this;
+ // Get the aruments
+ var args = Array.prototype.slice.call(arguments, 0);
+ // Set an operation Id on the bulk object
+ this.operationId = operationIdGenerator.next();
+
+ // Get the callback
+ var callback = args.pop();
+ // If we have a callback use this
+ if(typeof callback == 'function') {
+ args.push(function(err, r) {
+ // Return to caller
+ callback(err, r);
+ });
+
+ // Apply the call
+ func.apply(this, args);
+ } else {
+ return func.apply(this, args);
+ }
+ }
+ });
+ });
+
+ // ---------------------------------------------------------
+ //
+ // Cursor
+ //
+ // ---------------------------------------------------------
+
+ // Inject ourselves into the Cursor methods
+ var methods = ['_find', '_getmore', '_killcursor'];
+ var prototypes = [
+ require('./cursor').prototype,
+ require('./command_cursor').prototype,
+ require('./aggregation_cursor').prototype
+ ]
+
+ // Command name translation
+ var commandTranslation = {
+ '_find': 'find', '_getmore': 'getMore', '_killcursor': 'killCursors', '_explain': 'explain'
+ }
+
+ prototypes.forEach(function(proto) {
+
+ // Core server method we are going to wrap
+ methods.forEach(function(x) {
+ var func = proto[x];
+
+ // Add to overloaded methods
+ self.overloads.push({proto: proto, name:x, func:func});
+
+ // The actual prototype
+ proto[x] = function() {
+ var cursor = this;
+ var requestId = core.Query.nextRequestId();
+ var ourOpId = operationIdGenerator.next();
+ var parts = this.ns.split('.');
+ var db = parts[0];
+
+ // Get the collection
+ parts.shift();
+ var collection = parts.join('.');
+
+ // Set the command
+ var command = this.query;
+ var cmd = this.s.cmd;
+
+ // If we have a find method, set the operationId on the cursor
+ if(x == '_find') {
+ cursor.operationId = ourOpId;
+ }
+
+ // Do we have a find command rewrite it
+ if(x == '_getmore') {
+ command = {
+ getMore: this.cursorState.cursorId,
+ collection: collection,
+ batchSize: cmd.batchSize
+ }
+
+ if(cmd.maxTimeMS) command.maxTimeMS = cmd.maxTimeMS;
+ } else if(x == '_killcursors') {
+ command = {
+ killCursors: collection,
+ cursors: [this.cursorState.cursorId]
+ }
+ } else if(cmd.find) {
+ command = {
+ find: collection, filter: cmd.query
+ }
+
+ if(cmd.sort) command.sort = cmd.sort;
+ if(cmd.fields) command.projection = cmd.fields;
+ if(cmd.limit && cmd.limit < 0) {
+ command.limit = Math.abs(cmd.limit);
+ command.singleBatch = true;
+ } else if(cmd.limit) {
+ command.limit = Math.abs(cmd.limit);
+ }
+
+ // Options
+ if(cmd.skip) command.skip = cmd.skip;
+ if(cmd.hint) command.hint = cmd.hint;
+ if(cmd.batchSize) command.batchSize = cmd.batchSize;
+ if(typeof cmd.returnKey == 'boolean') command.returnKey = cmd.returnKey;
+ if(cmd.comment) command.comment = cmd.comment;
+ if(cmd.min) command.min = cmd.min;
+ if(cmd.max) command.max = cmd.max;
+ if(cmd.maxScan) command.maxScan = cmd.maxScan;
+ if(cmd.maxTimeMS) command.maxTimeMS = cmd.maxTimeMS;
+
+ // Flags
+ if(typeof cmd.awaitData == 'boolean') command.awaitData = cmd.awaitData;
+ if(typeof cmd.snapshot == 'boolean') command.snapshot = cmd.snapshot;
+ if(typeof cmd.tailable == 'boolean') command.tailable = cmd.tailable;
+ if(typeof cmd.oplogReplay == 'boolean') command.oplogReplay = cmd.oplogReplay;
+ if(typeof cmd.noCursorTimeout == 'boolean') command.noCursorTimeout = cmd.noCursorTimeout;
+ if(typeof cmd.partial == 'boolean') command.partial = cmd.partial;
+ if(typeof cmd.showDiskLoc == 'boolean') command.showRecordId = cmd.showDiskLoc;
+
+ // Read Concern
+ if(cmd.readConcern) command.readConcern = cmd.readConcern;
+
+ // Override method
+ if(cmd.explain) command.explain = cmd.explain;
+ if(cmd.exhaust) command.exhaust = cmd.exhaust;
+
+ // If we have a explain flag
+ if(cmd.explain) {
+ // Create fake explain command
+ command = {
+ explain: command,
+ verbosity: 'allPlansExecution'
+ }
+
+ // Set readConcern on the command if available
+ if(cmd.readConcern) command.readConcern = cmd.readConcern
+
+ // Set up the _explain name for the command
+ x = '_explain';
+ }
+ } else {
+ command = cmd;
+ }
+
+ // Set up the connection
+ var connectionId = null;
+
+ // Set local connection
+ if(this.connection) connectionId = this.connection;
+ if(!connectionId && this.server && this.server.getConnection) connectionId = this.server.getConnection();
+
+ // Get the command Name
+ var commandName = x == '_find' ? Object.keys(command)[0] : commandTranslation[x];
+
+ // Emit the start event for the command
+ var command = {
+ // Returns the command.
+ command: command,
+ // Returns the database name.
+ databaseName: db,
+ // Returns the command name.
+ commandName: commandName,
+ // Returns the driver generated request id.
+ requestId: requestId,
+ // Returns the driver generated operation id.
+ // This is used to link events together such as bulk write operations. OPTIONAL.
+ operationId: this.operationId,
+ // Returns the connection id for the command. For languages that do not have this,
+ // this MUST return the driver equivalent which MUST include the server address and port.
+ // The name of this field is flexible to match the object that is returned from the driver.
+ connectionId: connectionId
+ };
+
+ // Get the aruments
+ var args = Array.prototype.slice.call(arguments, 0);
+
+ // Get the callback
+ var callback = args.pop();
+
+ // We do not have a callback but a Promise
+ if(typeof callback == 'function' || command.commandName == 'killCursors') {
+ var startTime = timestampGenerator.current();
+ // Emit the started event
+ self.emit('started', command)
+
+ // Emit succeeded event with killcursor if we have a legacy protocol
+ if(command.commandName == 'killCursors'
+ && this.server.lastIsMaster()
+ && this.server.lastIsMaster().maxWireVersion < 4) {
+ // Emit the succeeded command
+ var command = {
+ duration: timestampGenerator.duration(startTime, timestampGenerator.current()),
+ commandName: commandName,
+ requestId: requestId,
+ operationId: cursor.operationId,
+ connectionId: cursor.server.getConnection(),
+ reply: [{ok:1}]
+ };
+
+ // Emit the command
+ return self.emit('succeeded', command)
+ }
+
+ // Add our callback handler
+ args.push(function(err, r) {
+ if(err) {
+ // Command
+ var command = {
+ duration: timestampGenerator.duration(startTime, timestampGenerator.current()),
+ commandName: commandName,
+ requestId: requestId,
+ operationId: ourOpId,
+ connectionId: cursor.server.getConnection(),
+ failure: err };
+
+ // Emit the command
+ self.emit('failed', command)
+ } else {
+ // Do we have a getMore
+ if(commandName.toLowerCase() == 'getmore' && r == null) {
+ r = {
+ cursor: {
+ id: cursor.cursorState.cursorId,
+ ns: cursor.ns,
+ nextBatch: cursor.cursorState.documents
+ }, ok:1
+ }
+ } else if(commandName.toLowerCase() == 'find' && r == null) {
+ r = {
+ cursor: {
+ id: cursor.cursorState.cursorId,
+ ns: cursor.ns,
+ firstBatch: cursor.cursorState.documents
+ }, ok:1
+ }
+ } else if(commandName.toLowerCase() == 'killcursors' && r == null) {
+ r = {
+ cursorsUnknown:[cursor.cursorState.lastCursorId],
+ ok:1
+ }
+ }
+
+ // cursor id is zero, we can issue success command
+ var command = {
+ duration: timestampGenerator.duration(startTime, timestampGenerator.current()),
+ commandName: commandName,
+ requestId: requestId,
+ operationId: cursor.operationId,
+ connectionId: cursor.server.getConnection(),
+ reply: r && r.result ? r.result : r
+ };
+
+ // Emit the command
+ self.emit('succeeded', command)
+ }
+
+ // Return
+ if(!callback) return;
+
+ // Return to caller
+ callback(err, r);
+ });
+
+ // Apply the call
+ func.apply(this, args);
+ } else {
+ // Assume promise, push back the missing value
+ args.push(callback);
+ // Get the promise
+ var promise = func.apply(this, args);
+ // Return a new promise
+ return new cursor.s.promiseLibrary(function(resolve, reject) {
+ var startTime = timestampGenerator.current();
+ // Emit the started event
+ self.emit('started', command)
+ // Execute the function
+ promise.then(function(r) {
+ // cursor id is zero, we can issue success command
+ var command = {
+ duration: timestampGenerator.duration(startTime, timestampGenerator.current()),
+ commandName: commandName,
+ requestId: requestId,
+ operationId: cursor.operationId,
+ connectionId: cursor.server.getConnection(),
+ reply: cursor.cursorState.documents
+ };
+
+ // Emit the command
+ self.emit('succeeded', command)
+ }).catch(function(err) {
+ // Command
+ var command = {
+ duration: timestampGenerator.duration(startTime, timestampGenerator.current()),
+ commandName: commandName,
+ requestId: requestId,
+ operationId: ourOpId,
+ connectionId: cursor.server.getConnection(),
+ failure: err };
+
+ // Emit the command
+ self.emit('failed', command)
+ // reject the promise
+ reject(err);
+ });
+ });
+ }
+ }
+ });
+ });
+}
+
+inherits(Instrumentation, EventEmitter);
+
+Instrumentation.prototype.uninstrument = function() {
+ for(var i = 0; i < this.overloads.length; i++) {
+ var obj = this.overloads[i];
+ obj.proto[obj.name] = obj.func;
+ }
+
+ // Remove all listeners
+ this.removeAllListeners('started');
+ this.removeAllListeners('succeeded');
+ this.removeAllListeners('failed');
+}
+
+module.exports = Instrumentation;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/bulk/common.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/bulk/common.js
new file mode 100644
index 0000000..ff723bb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/bulk/common.js
@@ -0,0 +1,440 @@
+"use strict";
+
+var utils = require('../utils'),
+ Long = require('mongodb-core').BSON.Long,
+ Timestamp = require('mongodb-core').BSON.Timestamp;
+
+// Error codes
+var UNKNOWN_ERROR = 8;
+var INVALID_BSON_ERROR = 22;
+var WRITE_CONCERN_ERROR = 64;
+var MULTIPLE_ERROR = 65;
+
+// Insert types
+var INSERT = 1;
+var UPDATE = 2;
+var REMOVE = 3
+
+
+// Get write concern
+var writeConcern = function(target, col, options) {
+ var writeConcern = {};
+
+ // Collection level write concern
+ if(col.writeConcern && col.writeConcern.w != null) writeConcern.w = col.writeConcern.w;
+ if(col.writeConcern && col.writeConcern.j != null) writeConcern.j = col.writeConcern.j;
+ if(col.writeConcern && col.writeConcern.fsync != null) writeConcern.fsync = col.writeConcern.fsync;
+ if(col.writeConcern && col.writeConcern.wtimeout != null) writeConcern.wtimeout = col.writeConcern.wtimeout;
+
+ // Options level write concern
+ if(options && options.w != null) writeConcern.w = options.w;
+ if(options && options.wtimeout != null) writeConcern.wtimeout = options.wtimeout;
+ if(options && options.j != null) writeConcern.j = options.j;
+ if(options && options.fsync != null) writeConcern.fsync = options.fsync;
+
+ // Return write concern
+ return writeConcern;
+}
+
+/**
+ * Helper function to define properties
+ * @ignore
+ */
+var defineReadOnlyProperty = function(self, name, value) {
+ Object.defineProperty(self, name, {
+ enumerable: true
+ , get: function() {
+ return value;
+ }
+ });
+}
+
+/**
+ * Keeps the state of a unordered batch so we can rewrite the results
+ * correctly after command execution
+ * @ignore
+ */
+var Batch = function(batchType, originalZeroIndex) {
+ this.originalZeroIndex = originalZeroIndex;
+ this.currentIndex = 0;
+ this.originalIndexes = [];
+ this.batchType = batchType;
+ this.operations = [];
+ this.size = 0;
+ this.sizeBytes = 0;
+}
+
+/**
+ * Wraps a legacy operation so we can correctly rewrite it's error
+ * @ignore
+ */
+var LegacyOp = function(batchType, operation, index) {
+ this.batchType = batchType;
+ this.index = index;
+ this.operation = operation;
+}
+
+/**
+ * Create a new BulkWriteResult instance (INTERNAL TYPE, do not instantiate directly)
+ *
+ * @class
+ * @property {boolean} ok Did bulk operation correctly execute
+ * @property {number} nInserted number of inserted documents
+ * @property {number} nUpdated number of documents updated logically
+ * @property {number} nUpserted Number of upserted documents
+ * @property {number} nModified Number of documents updated physically on disk
+ * @property {number} nRemoved Number of removed documents
+ * @return {BulkWriteResult} a BulkWriteResult instance
+ */
+var BulkWriteResult = function(bulkResult) {
+ defineReadOnlyProperty(this, "ok", bulkResult.ok);
+ defineReadOnlyProperty(this, "nInserted", bulkResult.nInserted);
+ defineReadOnlyProperty(this, "nUpserted", bulkResult.nUpserted);
+ defineReadOnlyProperty(this, "nMatched", bulkResult.nMatched);
+ defineReadOnlyProperty(this, "nModified", bulkResult.nModified);
+ defineReadOnlyProperty(this, "nRemoved", bulkResult.nRemoved);
+
+ /**
+ * Return an array of inserted ids
+ *
+ * @return {object[]}
+ */
+ this.getInsertedIds = function() {
+ return bulkResult.insertedIds;
+ }
+
+ /**
+ * Return an array of upserted ids
+ *
+ * @return {object[]}
+ */
+ this.getUpsertedIds = function() {
+ return bulkResult.upserted;
+ }
+
+ /**
+ * Return the upserted id at position x
+ *
+ * @param {number} index the number of the upserted id to return, returns undefined if no result for passed in index
+ * @return {object}
+ */
+ this.getUpsertedIdAt = function(index) {
+ return bulkResult.upserted[index];
+ }
+
+ /**
+ * Return raw internal result
+ *
+ * @return {object}
+ */
+ this.getRawResponse = function() {
+ return bulkResult;
+ }
+
+ /**
+ * Returns true if the bulk operation contains a write error
+ *
+ * @return {boolean}
+ */
+ this.hasWriteErrors = function() {
+ return bulkResult.writeErrors.length > 0;
+ }
+
+ /**
+ * Returns the number of write errors off the bulk operation
+ *
+ * @return {number}
+ */
+ this.getWriteErrorCount = function() {
+ return bulkResult.writeErrors.length;
+ }
+
+ /**
+ * Returns a specific write error object
+ *
+ * @return {WriteError}
+ */
+ this.getWriteErrorAt = function(index) {
+ if(index < bulkResult.writeErrors.length) {
+ return bulkResult.writeErrors[index];
+ }
+ return null;
+ }
+
+ /**
+ * Retrieve all write errors
+ *
+ * @return {object[]}
+ */
+ this.getWriteErrors = function() {
+ return bulkResult.writeErrors;
+ }
+
+ /**
+ * Retrieve lastOp if available
+ *
+ * @return {object}
+ */
+ this.getLastOp = function() {
+ return bulkResult.lastOp;
+ }
+
+ /**
+ * Retrieve the write concern error if any
+ *
+ * @return {WriteConcernError}
+ */
+ this.getWriteConcernError = function() {
+ if(bulkResult.writeConcernErrors.length == 0) {
+ return null;
+ } else if(bulkResult.writeConcernErrors.length == 1) {
+ // Return the error
+ return bulkResult.writeConcernErrors[0];
+ } else {
+
+ // Combine the errors
+ var errmsg = "";
+ for(var i = 0; i < bulkResult.writeConcernErrors.length; i++) {
+ var err = bulkResult.writeConcernErrors[i];
+ errmsg = errmsg + err.errmsg;
+
+ // TODO: Something better
+ if(i == 0) errmsg = errmsg + " and ";
+ }
+
+ return new WriteConcernError({ errmsg : errmsg, code : WRITE_CONCERN_ERROR });
+ }
+ }
+
+ this.toJSON = function() {
+ return bulkResult;
+ }
+
+ this.toString = function() {
+ return "BulkWriteResult(" + this.toJSON(bulkResult) + ")";
+ }
+
+ this.isOk = function() {
+ return bulkResult.ok == 1;
+ }
+}
+
+/**
+ * Create a new WriteConcernError instance (INTERNAL TYPE, do not instantiate directly)
+ *
+ * @class
+ * @property {number} code Write concern error code.
+ * @property {string} errmsg Write concern error message.
+ * @return {WriteConcernError} a WriteConcernError instance
+ */
+var WriteConcernError = function(err) {
+ if(!(this instanceof WriteConcernError)) return new WriteConcernError(err);
+
+ // Define properties
+ defineReadOnlyProperty(this, "code", err.code);
+ defineReadOnlyProperty(this, "errmsg", err.errmsg);
+
+ this.toJSON = function() {
+ return {code: err.code, errmsg: err.errmsg};
+ }
+
+ this.toString = function() {
+ return "WriteConcernError(" + err.errmsg + ")";
+ }
+}
+
+/**
+ * Create a new WriteError instance (INTERNAL TYPE, do not instantiate directly)
+ *
+ * @class
+ * @property {number} code Write concern error code.
+ * @property {number} index Write concern error original bulk operation index.
+ * @property {string} errmsg Write concern error message.
+ * @return {WriteConcernError} a WriteConcernError instance
+ */
+var WriteError = function(err) {
+ if(!(this instanceof WriteError)) return new WriteError(err);
+
+ // Define properties
+ defineReadOnlyProperty(this, "code", err.code);
+ defineReadOnlyProperty(this, "index", err.index);
+ defineReadOnlyProperty(this, "errmsg", err.errmsg);
+
+ //
+ // Define access methods
+ this.getOperation = function() {
+ return err.op;
+ }
+
+ this.toJSON = function() {
+ return {code: err.code, index: err.index, errmsg: err.errmsg, op: err.op};
+ }
+
+ this.toString = function() {
+ return "WriteError(" + JSON.stringify(this.toJSON()) + ")";
+ }
+}
+
+/**
+ * Merges results into shared data structure
+ * @ignore
+ */
+var mergeBatchResults = function(ordered, batch, bulkResult, err, result) {
+ // If we have an error set the result to be the err object
+ if(err) {
+ result = err;
+ } else if(result && result.result) {
+ result = result.result;
+ } else if(result == null) {
+ return;
+ }
+
+ // Do we have a top level error stop processing and return
+ if(result.ok == 0 && bulkResult.ok == 1) {
+ bulkResult.ok = 0;
+
+ var writeError = {
+ index: 0
+ , code: result.code || 0
+ , errmsg: result.message
+ , op: batch.operations[0]
+ };
+
+ bulkResult.writeErrors.push(new WriteError(writeError));
+ return;
+ } else if(result.ok == 0 && bulkResult.ok == 0) {
+ return;
+ }
+
+ // Deal with opTime if available
+ if(result.opTime || result.lastOp) {
+ var opTime = result.lastOp || result.opTime;
+ var lastOpTS = null;
+ var lastOpT = null;
+
+ // We have a time stamp
+ if(opTime instanceof Timestamp) {
+ if(bulkResult.lastOp == null) {
+ bulkResult.lastOp = opTime;
+ } else if(opTime.greaterThan(bulkResult.lastOp)) {
+ bulkResult.lastOp = opTime;
+ }
+ } else {
+ // Existing TS
+ if(bulkResult.lastOp) {
+ lastOpTS = typeof bulkResult.lastOp.ts == 'number'
+ ? Long.fromNumber(bulkResult.lastOp.ts) : bulkResult.lastOp.ts;
+ lastOpT = typeof bulkResult.lastOp.t == 'number'
+ ? Long.fromNumber(bulkResult.lastOp.t) : bulkResult.lastOp.t;
+ }
+
+ // Current OpTime TS
+ var opTimeTS = typeof opTime.ts == 'number'
+ ? Long.fromNumber(opTime.ts) : opTime.ts;
+ var opTimeT = typeof opTime.t == 'number'
+ ? Long.fromNumber(opTime.t) : opTime.t;
+
+ // Compare the opTime's
+ if(bulkResult.lastOp == null) {
+ bulkResult.lastOp = opTime;
+ } else if(opTimeTS.greaterThan(lastOpTS)) {
+ bulkResult.lastOp = opTime;
+ } else if(opTimeTS.equals(lastOpTS)) {
+ if(opTimeT.greaterThan(lastOpT)) {
+ bulkResult.lastOp = opTime;
+ }
+ }
+ }
+ }
+
+ // If we have an insert Batch type
+ if(batch.batchType == INSERT && result.n) {
+ bulkResult.nInserted = bulkResult.nInserted + result.n;
+ }
+
+ // If we have an insert Batch type
+ if(batch.batchType == REMOVE && result.n) {
+ bulkResult.nRemoved = bulkResult.nRemoved + result.n;
+ }
+
+ var nUpserted = 0;
+
+ // We have an array of upserted values, we need to rewrite the indexes
+ if(Array.isArray(result.upserted)) {
+ nUpserted = result.upserted.length;
+
+ for(var i = 0; i < result.upserted.length; i++) {
+ bulkResult.upserted.push({
+ index: result.upserted[i].index + batch.originalZeroIndex
+ , _id: result.upserted[i]._id
+ });
+ }
+ } else if(result.upserted) {
+
+ nUpserted = 1;
+
+ bulkResult.upserted.push({
+ index: batch.originalZeroIndex
+ , _id: result.upserted
+ });
+ }
+
+ // If we have an update Batch type
+ if(batch.batchType == UPDATE && result.n) {
+ var nModified = result.nModified;
+ bulkResult.nUpserted = bulkResult.nUpserted + nUpserted;
+ bulkResult.nMatched = bulkResult.nMatched + (result.n - nUpserted);
+
+ if(typeof nModified == 'number') {
+ bulkResult.nModified = bulkResult.nModified + nModified;
+ } else {
+ bulkResult.nModified = null;
+ }
+ }
+
+ if(Array.isArray(result.writeErrors)) {
+ for(var i = 0; i < result.writeErrors.length; i++) {
+
+ var writeError = {
+ index: batch.originalZeroIndex + result.writeErrors[i].index
+ , code: result.writeErrors[i].code
+ , errmsg: result.writeErrors[i].errmsg
+ , op: batch.operations[result.writeErrors[i].index]
+ };
+
+ bulkResult.writeErrors.push(new WriteError(writeError));
+ }
+ }
+
+ if(result.writeConcernError) {
+ bulkResult.writeConcernErrors.push(new WriteConcernError(result.writeConcernError));
+ }
+}
+
+//
+// Clone the options
+var cloneOptions = function(options) {
+ var clone = {};
+ var keys = Object.keys(options);
+ for(var i = 0; i < keys.length; i++) {
+ clone[keys[i]] = options[keys[i]];
+ }
+
+ return clone;
+}
+
+// Exports symbols
+exports.BulkWriteResult = BulkWriteResult;
+exports.WriteError = WriteError;
+exports.Batch = Batch;
+exports.LegacyOp = LegacyOp;
+exports.mergeBatchResults = mergeBatchResults;
+exports.cloneOptions = cloneOptions;
+exports.writeConcern = writeConcern;
+exports.INVALID_BSON_ERROR = INVALID_BSON_ERROR;
+exports.WRITE_CONCERN_ERROR = WRITE_CONCERN_ERROR;
+exports.MULTIPLE_ERROR = MULTIPLE_ERROR;
+exports.UNKNOWN_ERROR = UNKNOWN_ERROR;
+exports.INSERT = INSERT;
+exports.UPDATE = UPDATE;
+exports.REMOVE = REMOVE;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/bulk/ordered.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/bulk/ordered.js
new file mode 100644
index 0000000..b6c183d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/bulk/ordered.js
@@ -0,0 +1,539 @@
+"use strict";
+
+var common = require('./common')
+ , utils = require('../utils')
+ , toError = require('../utils').toError
+ , f = require('util').format
+ , handleCallback = require('../utils').handleCallback
+ , shallowClone = utils.shallowClone
+ , WriteError = common.WriteError
+ , BulkWriteResult = common.BulkWriteResult
+ , LegacyOp = common.LegacyOp
+ , ObjectID = require('mongodb-core').BSON.ObjectID
+ , Define = require('../metadata')
+ , BSON = require('mongodb-core').BSON
+ , Batch = common.Batch
+ , mergeBatchResults = common.mergeBatchResults;
+
+var bson = new BSON.BSONPure();
+
+/**
+ * Create a FindOperatorsOrdered instance (INTERNAL TYPE, do not instantiate directly)
+ * @class
+ * @return {FindOperatorsOrdered} a FindOperatorsOrdered instance.
+ */
+var FindOperatorsOrdered = function(self) {
+ this.s = self.s;
+}
+
+/**
+ * Add a single update document to the bulk operation
+ *
+ * @method
+ * @param {object} doc update operations
+ * @throws {MongoError}
+ * @return {OrderedBulkOperation}
+ */
+FindOperatorsOrdered.prototype.update = function(updateDocument) {
+ // Perform upsert
+ var upsert = typeof this.s.currentOp.upsert == 'boolean' ? this.s.currentOp.upsert : false;
+
+ // Establish the update command
+ var document = {
+ q: this.s.currentOp.selector
+ , u: updateDocument
+ , multi: true
+ , upsert: upsert
+ }
+
+ // Clear out current Op
+ this.s.currentOp = null;
+ // Add the update document to the list
+ return addToOperationsList(this, common.UPDATE, document);
+}
+
+/**
+ * Add a single update one document to the bulk operation
+ *
+ * @method
+ * @param {object} doc update operations
+ * @throws {MongoError}
+ * @return {OrderedBulkOperation}
+ */
+FindOperatorsOrdered.prototype.updateOne = function(updateDocument) {
+ // Perform upsert
+ var upsert = typeof this.s.currentOp.upsert == 'boolean' ? this.s.currentOp.upsert : false;
+
+ // Establish the update command
+ var document = {
+ q: this.s.currentOp.selector
+ , u: updateDocument
+ , multi: false
+ , upsert: upsert
+ }
+
+ // Clear out current Op
+ this.s.currentOp = null;
+ // Add the update document to the list
+ return addToOperationsList(this, common.UPDATE, document);
+}
+
+/**
+ * Add a replace one operation to the bulk operation
+ *
+ * @method
+ * @param {object} doc the new document to replace the existing one with
+ * @throws {MongoError}
+ * @return {OrderedBulkOperation}
+ */
+FindOperatorsOrdered.prototype.replaceOne = function(updateDocument) {
+ this.updateOne(updateDocument);
+}
+
+/**
+ * Upsert modifier for update bulk operation
+ *
+ * @method
+ * @throws {MongoError}
+ * @return {FindOperatorsOrdered}
+ */
+FindOperatorsOrdered.prototype.upsert = function() {
+ this.s.currentOp.upsert = true;
+ return this;
+}
+
+/**
+ * Add a remove one operation to the bulk operation
+ *
+ * @method
+ * @throws {MongoError}
+ * @return {OrderedBulkOperation}
+ */
+FindOperatorsOrdered.prototype.deleteOne = function() {
+ // Establish the update command
+ var document = {
+ q: this.s.currentOp.selector
+ , limit: 1
+ }
+
+ // Clear out current Op
+ this.s.currentOp = null;
+ // Add the remove document to the list
+ return addToOperationsList(this, common.REMOVE, document);
+}
+
+// Backward compatibility
+FindOperatorsOrdered.prototype.removeOne = FindOperatorsOrdered.prototype.deleteOne;
+
+/**
+ * Add a remove operation to the bulk operation
+ *
+ * @method
+ * @throws {MongoError}
+ * @return {OrderedBulkOperation}
+ */
+FindOperatorsOrdered.prototype.delete = function() {
+ // Establish the update command
+ var document = {
+ q: this.s.currentOp.selector
+ , limit: 0
+ }
+
+ // Clear out current Op
+ this.s.currentOp = null;
+ // Add the remove document to the list
+ return addToOperationsList(this, common.REMOVE, document);
+}
+
+// Backward compatibility
+FindOperatorsOrdered.prototype.remove = FindOperatorsOrdered.prototype.delete;
+
+// Add to internal list of documents
+var addToOperationsList = function(_self, docType, document) {
+ // Get the bsonSize
+ var bsonSize = bson.calculateObjectSize(document, false);
+
+ // Throw error if the doc is bigger than the max BSON size
+ if(bsonSize >= _self.s.maxBatchSizeBytes) {
+ throw toError("document is larger than the maximum size " + _self.s.maxBatchSizeBytes);
+ }
+
+ // Create a new batch object if we don't have a current one
+ if(_self.s.currentBatch == null) _self.s.currentBatch = new Batch(docType, _self.s.currentIndex);
+
+ // Check if we need to create a new batch
+ if(((_self.s.currentBatchSize + 1) >= _self.s.maxWriteBatchSize)
+ || ((_self.s.currentBatchSizeBytes + _self.s.currentBatchSizeBytes) >= _self.s.maxBatchSizeBytes)
+ || (_self.s.currentBatch.batchType != docType)) {
+ // Save the batch to the execution stack
+ _self.s.batches.push(_self.s.currentBatch);
+
+ // Create a new batch
+ _self.s.currentBatch = new Batch(docType, _self.s.currentIndex);
+
+ // Reset the current size trackers
+ _self.s.currentBatchSize = 0;
+ _self.s.currentBatchSizeBytes = 0;
+ } else {
+ // Update current batch size
+ _self.s.currentBatchSize = _self.s.currentBatchSize + 1;
+ _self.s.currentBatchSizeBytes = _self.s.currentBatchSizeBytes + bsonSize;
+ }
+
+ if(docType == common.INSERT) {
+ _self.s.bulkResult.insertedIds.push({index: _self.s.currentIndex, _id: document._id});
+ }
+
+ // We have an array of documents
+ if(Array.isArray(document)) {
+ throw toError("operation passed in cannot be an Array");
+ } else {
+ _self.s.currentBatch.originalIndexes.push(_self.s.currentIndex);
+ _self.s.currentBatch.operations.push(document)
+ _self.s.currentBatchSizeBytes = _self.s.currentBatchSizeBytes + bsonSize;
+ _self.s.currentIndex = _self.s.currentIndex + 1;
+ }
+
+ // Return self
+ return _self;
+}
+
+/**
+ * Create a new OrderedBulkOperation instance (INTERNAL TYPE, do not instantiate directly)
+ * @class
+ * @property {number} length Get the number of operations in the bulk.
+ * @return {OrderedBulkOperation} a OrderedBulkOperation instance.
+ */
+function OrderedBulkOperation(topology, collection, options) {
+ options = options == null ? {} : options;
+ // TODO Bring from driver information in isMaster
+ var self = this;
+ var executed = false;
+
+ // Current item
+ var currentOp = null;
+
+ // Handle to the bson serializer, used to calculate running sizes
+ var bson = topology.bson;
+
+ // Namespace for the operation
+ var namespace = collection.collectionName;
+
+ // Set max byte size
+ var maxBatchSizeBytes = topology.isMasterDoc && topology.isMasterDoc.maxBsonObjectSize
+ ? topology.isMasterDoc.maxBsonObjectSize : (1024*1025*16);
+ var maxWriteBatchSize = topology.isMasterDoc && topology.isMasterDoc.maxWriteBatchSize
+ ? topology.isMasterDoc.maxWriteBatchSize : 1000;
+
+ // Get the write concern
+ var writeConcern = common.writeConcern(shallowClone(options), collection, options);
+
+ // Get the promiseLibrary
+ var promiseLibrary = options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // Current batch
+ var currentBatch = null;
+ var currentIndex = 0;
+ var currentBatchSize = 0;
+ var currentBatchSizeBytes = 0;
+ var batches = [];
+
+ // Final results
+ var bulkResult = {
+ ok: 1
+ , writeErrors: []
+ , writeConcernErrors: []
+ , insertedIds: []
+ , nInserted: 0
+ , nUpserted: 0
+ , nMatched: 0
+ , nModified: 0
+ , nRemoved: 0
+ , upserted: []
+ };
+
+ // Internal state
+ this.s = {
+ // Final result
+ bulkResult: bulkResult
+ // Current batch state
+ , currentBatch: null
+ , currentIndex: 0
+ , currentBatchSize: 0
+ , currentBatchSizeBytes: 0
+ , batches: []
+ // Write concern
+ , writeConcern: writeConcern
+ // Max batch size options
+ , maxBatchSizeBytes: maxBatchSizeBytes
+ , maxWriteBatchSize: maxWriteBatchSize
+ // Namespace
+ , namespace: namespace
+ // BSON
+ , bson: bson
+ // Topology
+ , topology: topology
+ // Options
+ , options: options
+ // Current operation
+ , currentOp: currentOp
+ // Executed
+ , executed: executed
+ // Collection
+ , collection: collection
+ // Promise Library
+ , promiseLibrary: promiseLibrary
+ // Fundamental error
+ , err: null
+ // Bypass validation
+ , bypassDocumentValidation: typeof options.bypassDocumentValidation == 'boolean' ? options.bypassDocumentValidation : false
+ }
+}
+
+var define = OrderedBulkOperation.define = new Define('OrderedBulkOperation', OrderedBulkOperation, false);
+
+OrderedBulkOperation.prototype.raw = function(op) {
+ var key = Object.keys(op)[0];
+
+ // Set up the force server object id
+ var forceServerObjectId = typeof this.s.options.forceServerObjectId == 'boolean'
+ ? this.s.options.forceServerObjectId : this.s.collection.s.db.options.forceServerObjectId;
+
+ // Update operations
+ if((op.updateOne && op.updateOne.q)
+ || (op.updateMany && op.updateMany.q)
+ || (op.replaceOne && op.replaceOne.q)) {
+ op[key].multi = op.updateOne || op.replaceOne ? false : true;
+ return addToOperationsList(this, common.UPDATE, op[key]);
+ }
+
+ // Crud spec update format
+ if(op.updateOne || op.updateMany || op.replaceOne) {
+ var multi = op.updateOne || op.replaceOne ? false : true;
+ var operation = {q: op[key].filter, u: op[key].update || op[key].replacement, multi: multi}
+ operation.upsert = op[key].upsert ? true: false;
+ if(op.collation) operation.collation = op.collation;
+ return addToOperationsList(this, common.UPDATE, operation);
+ }
+
+ // Remove operations
+ if(op.removeOne || op.removeMany || (op.deleteOne && op.deleteOne.q) || op.deleteMany && op.deleteMany.q) {
+ op[key].limit = op.removeOne ? 1 : 0;
+ return addToOperationsList(this, common.REMOVE, op[key]);
+ }
+
+ // Crud spec delete operations, less efficient
+ if(op.deleteOne || op.deleteMany) {
+ var limit = op.deleteOne ? 1 : 0;
+ var operation = {q: op[key].filter, limit: limit}
+ if(op.collation) operation.collation = op.collation;
+ return addToOperationsList(this, common.REMOVE, operation);
+ }
+
+ // Insert operations
+ if(op.insertOne && op.insertOne.document == null) {
+ if(forceServerObjectId !== true && op.insertOne._id == null) op.insertOne._id = new ObjectID();
+ return addToOperationsList(this, common.INSERT, op.insertOne);
+ } else if(op.insertOne && op.insertOne.document) {
+ if(forceServerObjectId !== true && op.insertOne.document._id == null) op.insertOne.document._id = new ObjectID();
+ return addToOperationsList(this, common.INSERT, op.insertOne.document);
+ }
+
+ if(op.insertMany) {
+ for(var i = 0; i < op.insertMany.length; i++) {
+ if(forceServerObjectId !== true && op.insertMany[i]._id == null) op.insertMany[i]._id = new ObjectID();
+ addToOperationsList(this, common.INSERT, op.insertMany[i]);
+ }
+
+ return;
+ }
+
+ // No valid type of operation
+ throw toError("bulkWrite only supports insertOne, insertMany, updateOne, updateMany, removeOne, removeMany, deleteOne, deleteMany");
+}
+
+/**
+ * Add a single insert document to the bulk operation
+ *
+ * @param {object} doc the document to insert
+ * @throws {MongoError}
+ * @return {OrderedBulkOperation}
+ */
+OrderedBulkOperation.prototype.insert = function(document) {
+ if(this.s.collection.s.db.options.forceServerObjectId !== true && document._id == null) document._id = new ObjectID();
+ return addToOperationsList(this, common.INSERT, document);
+}
+
+/**
+ * Initiate a find operation for an update/updateOne/remove/removeOne/replaceOne
+ *
+ * @method
+ * @param {object} selector The selector for the bulk operation.
+ * @throws {MongoError}
+ * @return {FindOperatorsOrdered}
+ */
+OrderedBulkOperation.prototype.find = function(selector) {
+ if (!selector) {
+ throw toError("Bulk find operation must specify a selector");
+ }
+
+ // Save a current selector
+ this.s.currentOp = {
+ selector: selector
+ }
+
+ return new FindOperatorsOrdered(this);
+}
+
+Object.defineProperty(OrderedBulkOperation.prototype, 'length', {
+ enumerable: true,
+ get: function() {
+ return this.s.currentIndex;
+ }
+});
+
+//
+// Execute next write command in a chain
+var executeCommands = function(self, callback) {
+ if(self.s.batches.length == 0) {
+ return handleCallback(callback, null, new BulkWriteResult(self.s.bulkResult));
+ }
+
+ // Ordered execution of the command
+ var batch = self.s.batches.shift();
+
+ var resultHandler = function(err, result) {
+ // Error is a driver related error not a bulk op error, terminate
+ if(err && err.driver || err && err.message) {
+ return handleCallback(callback, err);
+ }
+
+ // If we have and error
+ if(err) err.ok = 0;
+ // Merge the results together
+ var mergeResult = mergeBatchResults(true, batch, self.s.bulkResult, err, result);
+ if(mergeResult != null) {
+ return handleCallback(callback, null, new BulkWriteResult(self.s.bulkResult));
+ }
+
+ // If we are ordered and have errors and they are
+ // not all replication errors terminate the operation
+ if(self.s.bulkResult.writeErrors.length > 0) {
+ return handleCallback(callback, toError(self.s.bulkResult.writeErrors[0]), new BulkWriteResult(self.s.bulkResult));
+ }
+
+ // Execute the next command in line
+ executeCommands(self, callback);
+ }
+
+ var finalOptions = {ordered: true}
+ if(self.s.writeConcern != null) {
+ finalOptions.writeConcern = self.s.writeConcern;
+ }
+
+ // Set an operationIf if provided
+ if(self.operationId) {
+ resultHandler.operationId = self.operationId;
+ }
+
+ // Serialize functions
+ if(self.s.options.serializeFunctions) {
+ finalOptions.serializeFunctions = true
+ }
+
+ // Serialize functions
+ if(self.s.options.ignoreUndefined) {
+ finalOptions.ignoreUndefined = true
+ }
+
+ // Is the bypassDocumentValidation options specific
+ if(self.s.bypassDocumentValidation == true) {
+ finalOptions.bypassDocumentValidation = true;
+ }
+
+ try {
+ if(batch.batchType == common.INSERT) {
+ self.s.topology.insert(self.s.collection.namespace, batch.operations, finalOptions, resultHandler);
+ } else if(batch.batchType == common.UPDATE) {
+ self.s.topology.update(self.s.collection.namespace, batch.operations, finalOptions, resultHandler);
+ } else if(batch.batchType == common.REMOVE) {
+ self.s.topology.remove(self.s.collection.namespace, batch.operations, finalOptions, resultHandler);
+ }
+ } catch(err) {
+ // Force top level error
+ err.ok = 0;
+ // Merge top level error and return
+ handleCallback(callback, null, mergeBatchResults(false, batch, self.s.bulkResult, err, null));
+ }
+}
+
+/**
+ * The callback format for results
+ * @callback OrderedBulkOperation~resultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {BulkWriteResult} result The bulk write result.
+ */
+
+/**
+ * Execute the ordered bulk operation
+ *
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.fsync=false] Specify a file sync write concern.
+ * @param {OrderedBulkOperation~resultCallback} [callback] The result callback
+ * @throws {MongoError}
+ * @return {Promise} returns Promise if no callback passed
+ */
+OrderedBulkOperation.prototype.execute = function(_writeConcern, callback) {
+ var self = this;
+ if(this.s.executed) throw new toError("batch cannot be re-executed");
+ if(typeof _writeConcern == 'function') {
+ callback = _writeConcern;
+ } else {
+ this.s.writeConcern = _writeConcern;
+ }
+
+ // If we have current batch
+ if(this.s.currentBatch) this.s.batches.push(this.s.currentBatch)
+
+ // If we have no operations in the bulk raise an error
+ if(this.s.batches.length == 0) {
+ throw toError("Invalid Operation, No operations in bulk");
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') {
+ return executeCommands(this, callback);
+ }
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ executeCommands(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('execute', {callback: true, promise:false});
+
+/**
+ * Returns an unordered batch object
+ * @ignore
+ */
+var initializeOrderedBulkOp = function(topology, collection, options) {
+ return new OrderedBulkOperation(topology, collection, options);
+}
+
+initializeOrderedBulkOp.OrderedBulkOperation = OrderedBulkOperation;
+module.exports = initializeOrderedBulkOp;
+module.exports.Bulk = OrderedBulkOperation;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/bulk/unordered.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/bulk/unordered.js
new file mode 100644
index 0000000..ecb91db
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/bulk/unordered.js
@@ -0,0 +1,542 @@
+"use strict";
+
+var common = require('./common')
+ , utils = require('../utils')
+ , toError = require('../utils').toError
+ , f = require('util').format
+ , handleCallback = require('../utils').handleCallback
+ , shallowClone = utils.shallowClone
+ , WriteError = common.WriteError
+ , BulkWriteResult = common.BulkWriteResult
+ , LegacyOp = common.LegacyOp
+ , ObjectID = require('mongodb-core').BSON.ObjectID
+ , BSON = require('mongodb-core').BSON
+ , Define = require('../metadata')
+ , Batch = common.Batch
+ , mergeBatchResults = common.mergeBatchResults;
+
+var bson = new BSON.BSONPure();
+
+/**
+ * Create a FindOperatorsUnordered instance (INTERNAL TYPE, do not instantiate directly)
+ * @class
+ * @property {number} length Get the number of operations in the bulk.
+ * @return {FindOperatorsUnordered} a FindOperatorsUnordered instance.
+ */
+var FindOperatorsUnordered = function(self) {
+ this.s = self.s;
+}
+
+/**
+ * Add a single update document to the bulk operation
+ *
+ * @method
+ * @param {object} doc update operations
+ * @throws {MongoError}
+ * @return {UnorderedBulkOperation}
+ */
+FindOperatorsUnordered.prototype.update = function(updateDocument) {
+ // Perform upsert
+ var upsert = typeof this.s.currentOp.upsert == 'boolean' ? this.s.currentOp.upsert : false;
+
+ // Establish the update command
+ var document = {
+ q: this.s.currentOp.selector
+ , u: updateDocument
+ , multi: true
+ , upsert: upsert
+ }
+
+ // Clear out current Op
+ this.s.currentOp = null;
+ // Add the update document to the list
+ return addToOperationsList(this, common.UPDATE, document);
+}
+
+/**
+ * Add a single update one document to the bulk operation
+ *
+ * @method
+ * @param {object} doc update operations
+ * @throws {MongoError}
+ * @return {UnorderedBulkOperation}
+ */
+FindOperatorsUnordered.prototype.updateOne = function(updateDocument) {
+ // Perform upsert
+ var upsert = typeof this.s.currentOp.upsert == 'boolean' ? this.s.currentOp.upsert : false;
+
+ // Establish the update command
+ var document = {
+ q: this.s.currentOp.selector
+ , u: updateDocument
+ , multi: false
+ , upsert: upsert
+ }
+
+ // Clear out current Op
+ this.s.currentOp = null;
+ // Add the update document to the list
+ return addToOperationsList(this, common.UPDATE, document);
+}
+
+/**
+ * Add a replace one operation to the bulk operation
+ *
+ * @method
+ * @param {object} doc the new document to replace the existing one with
+ * @throws {MongoError}
+ * @return {UnorderedBulkOperation}
+ */
+FindOperatorsUnordered.prototype.replaceOne = function(updateDocument) {
+ this.updateOne(updateDocument);
+}
+
+/**
+ * Upsert modifier for update bulk operation
+ *
+ * @method
+ * @throws {MongoError}
+ * @return {UnorderedBulkOperation}
+ */
+FindOperatorsUnordered.prototype.upsert = function() {
+ this.s.currentOp.upsert = true;
+ return this;
+}
+
+/**
+ * Add a remove one operation to the bulk operation
+ *
+ * @method
+ * @throws {MongoError}
+ * @return {UnorderedBulkOperation}
+ */
+FindOperatorsUnordered.prototype.removeOne = function() {
+ // Establish the update command
+ var document = {
+ q: this.s.currentOp.selector
+ , limit: 1
+ }
+
+ // Clear out current Op
+ this.s.currentOp = null;
+ // Add the remove document to the list
+ return addToOperationsList(this, common.REMOVE, document);
+}
+
+/**
+ * Add a remove operation to the bulk operation
+ *
+ * @method
+ * @throws {MongoError}
+ * @return {UnorderedBulkOperation}
+ */
+FindOperatorsUnordered.prototype.remove = function() {
+ // Establish the update command
+ var document = {
+ q: this.s.currentOp.selector
+ , limit: 0
+ }
+
+ // Clear out current Op
+ this.s.currentOp = null;
+ // Add the remove document to the list
+ return addToOperationsList(this, common.REMOVE, document);
+}
+
+//
+// Add to the operations list
+//
+var addToOperationsList = function(_self, docType, document) {
+ // Get the bsonSize
+ var bsonSize = bson.calculateObjectSize(document, false);
+ // Throw error if the doc is bigger than the max BSON size
+ if(bsonSize >= _self.s.maxBatchSizeBytes) throw toError("document is larger than the maximum size " + _self.s.maxBatchSizeBytes);
+ // Holds the current batch
+ _self.s.currentBatch = null;
+ // Get the right type of batch
+ if(docType == common.INSERT) {
+ _self.s.currentBatch = _self.s.currentInsertBatch;
+ } else if(docType == common.UPDATE) {
+ _self.s.currentBatch = _self.s.currentUpdateBatch;
+ } else if(docType == common.REMOVE) {
+ _self.s.currentBatch = _self.s.currentRemoveBatch;
+ }
+
+ // Create a new batch object if we don't have a current one
+ if(_self.s.currentBatch == null) _self.s.currentBatch = new Batch(docType, _self.s.currentIndex);
+
+ // Check if we need to create a new batch
+ if(((_self.s.currentBatch.size + 1) >= _self.s.maxWriteBatchSize)
+ || ((_self.s.currentBatch.sizeBytes + bsonSize) >= _self.s.maxBatchSizeBytes)
+ || (_self.s.currentBatch.batchType != docType)) {
+ // Save the batch to the execution stack
+ _self.s.batches.push(_self.s.currentBatch);
+
+ // Create a new batch
+ _self.s.currentBatch = new Batch(docType, _self.s.currentIndex);
+ }
+
+ // We have an array of documents
+ if(Array.isArray(document)) {
+ throw toError("operation passed in cannot be an Array");
+ } else {
+ _self.s.currentBatch.operations.push(document);
+ _self.s.currentBatch.originalIndexes.push(_self.s.currentIndex);
+ _self.s.currentIndex = _self.s.currentIndex + 1;
+ }
+
+ // Save back the current Batch to the right type
+ if(docType == common.INSERT) {
+ _self.s.currentInsertBatch = _self.s.currentBatch;
+ _self.s.bulkResult.insertedIds.push({index: _self.s.currentIndex, _id: document._id});
+ } else if(docType == common.UPDATE) {
+ _self.s.currentUpdateBatch = _self.s.currentBatch;
+ } else if(docType == common.REMOVE) {
+ _self.s.currentRemoveBatch = _self.s.currentBatch;
+ }
+
+ // Update current batch size
+ _self.s.currentBatch.size = _self.s.currentBatch.size + 1;
+ _self.s.currentBatch.sizeBytes = _self.s.currentBatch.sizeBytes + bsonSize;
+
+ // Return self
+ return _self;
+}
+
+/**
+ * Create a new UnorderedBulkOperation instance (INTERNAL TYPE, do not instantiate directly)
+ * @class
+ * @return {UnorderedBulkOperation} a UnorderedBulkOperation instance.
+ */
+var UnorderedBulkOperation = function(topology, collection, options) {
+ options = options == null ? {} : options;
+
+ // Contains reference to self
+ var self = this;
+ // Get the namesspace for the write operations
+ var namespace = collection.collectionName;
+ // Used to mark operation as executed
+ var executed = false;
+
+ // Current item
+ // var currentBatch = null;
+ var currentOp = null;
+ var currentIndex = 0;
+ var batches = [];
+
+ // The current Batches for the different operations
+ var currentInsertBatch = null;
+ var currentUpdateBatch = null;
+ var currentRemoveBatch = null;
+
+ // Handle to the bson serializer, used to calculate running sizes
+ var bson = topology.bson;
+
+ // Set max byte size
+ var maxBatchSizeBytes = topology.isMasterDoc && topology.isMasterDoc.maxBsonObjectSize
+ ? topology.isMasterDoc.maxBsonObjectSize : (1024*1025*16);
+ var maxWriteBatchSize = topology.isMasterDoc && topology.isMasterDoc.maxWriteBatchSize
+ ? topology.isMasterDoc.maxWriteBatchSize : 1000;
+
+ // Get the write concern
+ var writeConcern = common.writeConcern(shallowClone(options), collection, options);
+
+ // Get the promiseLibrary
+ var promiseLibrary = options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // Final results
+ var bulkResult = {
+ ok: 1
+ , writeErrors: []
+ , writeConcernErrors: []
+ , insertedIds: []
+ , nInserted: 0
+ , nUpserted: 0
+ , nMatched: 0
+ , nModified: 0
+ , nRemoved: 0
+ , upserted: []
+ };
+
+ // Internal state
+ this.s = {
+ // Final result
+ bulkResult: bulkResult
+ // Current batch state
+ , currentInsertBatch: null
+ , currentUpdateBatch: null
+ , currentRemoveBatch: null
+ , currentBatch: null
+ , currentIndex: 0
+ , batches: []
+ // Write concern
+ , writeConcern: writeConcern
+ // Max batch size options
+ , maxBatchSizeBytes: maxBatchSizeBytes
+ , maxWriteBatchSize: maxWriteBatchSize
+ // Namespace
+ , namespace: namespace
+ // BSON
+ , bson: bson
+ // Topology
+ , topology: topology
+ // Options
+ , options: options
+ // Current operation
+ , currentOp: currentOp
+ // Executed
+ , executed: executed
+ // Collection
+ , collection: collection
+ // Promise Library
+ , promiseLibrary: promiseLibrary
+ // Bypass validation
+ , bypassDocumentValidation: typeof options.bypassDocumentValidation == 'boolean' ? options.bypassDocumentValidation : false
+ }
+}
+
+var define = UnorderedBulkOperation.define = new Define('UnorderedBulkOperation', UnorderedBulkOperation, false);
+
+/**
+ * Add a single insert document to the bulk operation
+ *
+ * @param {object} doc the document to insert
+ * @throws {MongoError}
+ * @return {UnorderedBulkOperation}
+ */
+UnorderedBulkOperation.prototype.insert = function(document) {
+ if(this.s.collection.s.db.options.forceServerObjectId !== true && document._id == null) document._id = new ObjectID();
+ return addToOperationsList(this, common.INSERT, document);
+}
+
+/**
+ * Initiate a find operation for an update/updateOne/remove/removeOne/replaceOne
+ *
+ * @method
+ * @param {object} selector The selector for the bulk operation.
+ * @throws {MongoError}
+ * @return {FindOperatorsUnordered}
+ */
+UnorderedBulkOperation.prototype.find = function(selector) {
+ if (!selector) {
+ throw toError("Bulk find operation must specify a selector");
+ }
+
+ // Save a current selector
+ this.s.currentOp = {
+ selector: selector
+ }
+
+ return new FindOperatorsUnordered(this);
+}
+
+Object.defineProperty(UnorderedBulkOperation.prototype, 'length', {
+ enumerable: true,
+ get: function() {
+ return this.s.currentIndex;
+ }
+});
+
+UnorderedBulkOperation.prototype.raw = function(op) {
+ var key = Object.keys(op)[0];
+
+ // Set up the force server object id
+ var forceServerObjectId = typeof this.s.options.forceServerObjectId == 'boolean'
+ ? this.s.options.forceServerObjectId : this.s.collection.s.db.options.forceServerObjectId;
+
+ // Update operations
+ if((op.updateOne && op.updateOne.q)
+ || (op.updateMany && op.updateMany.q)
+ || (op.replaceOne && op.replaceOne.q)) {
+ op[key].multi = op.updateOne || op.replaceOne ? false : true;
+ return addToOperationsList(this, common.UPDATE, op[key]);
+ }
+
+ // Crud spec update format
+ if(op.updateOne || op.updateMany || op.replaceOne) {
+ var multi = op.updateOne || op.replaceOne ? false : true;
+ var operation = {q: op[key].filter, u: op[key].update || op[key].replacement, multi: multi}
+ if(op[key].upsert) operation.upsert = true;
+ return addToOperationsList(this, common.UPDATE, operation);
+ }
+
+ // Remove operations
+ if(op.removeOne || op.removeMany || (op.deleteOne && op.deleteOne.q) || op.deleteMany && op.deleteMany.q) {
+ op[key].limit = op.removeOne ? 1 : 0;
+ return addToOperationsList(this, common.REMOVE, op[key]);
+ }
+
+ // Crud spec delete operations, less efficient
+ if(op.deleteOne || op.deleteMany) {
+ var limit = op.deleteOne ? 1 : 0;
+ var operation = {q: op[key].filter, limit: limit}
+ return addToOperationsList(this, common.REMOVE, operation);
+ }
+
+ // Insert operations
+ if(op.insertOne && op.insertOne.document == null) {
+ if(forceServerObjectId !== true && op.insertOne._id == null) op.insertOne._id = new ObjectID();
+ return addToOperationsList(this, common.INSERT, op.insertOne);
+ } else if(op.insertOne && op.insertOne.document) {
+ if(forceServerObjectId !== true && op.insertOne.document._id == null) op.insertOne.document._id = new ObjectID();
+ return addToOperationsList(this, common.INSERT, op.insertOne.document);
+ }
+
+ if(op.insertMany) {
+ for(var i = 0; i < op.insertMany.length; i++) {
+ if(forceServerObjectId !== true && op.insertMany[i]._id == null) op.insertMany[i]._id = new ObjectID();
+ addToOperationsList(this, common.INSERT, op.insertMany[i]);
+ }
+
+ return;
+ }
+
+ // No valid type of operation
+ throw toError("bulkWrite only supports insertOne, insertMany, updateOne, updateMany, removeOne, removeMany, deleteOne, deleteMany");
+}
+
+//
+// Execute the command
+var executeBatch = function(self, batch, callback) {
+ var finalOptions = {ordered: false}
+ if(self.s.writeConcern != null) {
+ finalOptions.writeConcern = self.s.writeConcern;
+ }
+
+ var resultHandler = function(err, result) {
+ // Error is a driver related error not a bulk op error, terminate
+ if(err && err.driver || err && err.message) {
+ return handleCallback(callback, err);
+ }
+
+ // If we have and error
+ if(err) err.ok = 0;
+ handleCallback(callback, null, mergeBatchResults(false, batch, self.s.bulkResult, err, result));
+ }
+
+ // Set an operationIf if provided
+ if(self.operationId) {
+ resultHandler.operationId = self.operationId;
+ }
+
+ // Serialize functions
+ if(self.s.options.serializeFunctions) {
+ finalOptions.serializeFunctions = true
+ }
+
+ // Is the bypassDocumentValidation options specific
+ if(self.s.bypassDocumentValidation == true) {
+ finalOptions.bypassDocumentValidation = true;
+ }
+
+ try {
+ if(batch.batchType == common.INSERT) {
+ self.s.topology.insert(self.s.collection.namespace, batch.operations, finalOptions, resultHandler);
+ } else if(batch.batchType == common.UPDATE) {
+ self.s.topology.update(self.s.collection.namespace, batch.operations, finalOptions, resultHandler);
+ } else if(batch.batchType == common.REMOVE) {
+ self.s.topology.remove(self.s.collection.namespace, batch.operations, finalOptions, resultHandler);
+ }
+ } catch(err) {
+ // Force top level error
+ err.ok = 0;
+ // Merge top level error and return
+ handleCallback(callback, null, mergeBatchResults(false, batch, self.s.bulkResult, err, null));
+ }
+}
+
+//
+// Execute all the commands
+var executeBatches = function(self, callback) {
+ var numberOfCommandsToExecute = self.s.batches.length;
+ var error = null;
+ // Execute over all the batches
+ for(var i = 0; i < self.s.batches.length; i++) {
+ executeBatch(self, self.s.batches[i], function(err, result) {
+ // Driver layer error capture it
+ if(err) error = err;
+ // Count down the number of commands left to execute
+ numberOfCommandsToExecute = numberOfCommandsToExecute - 1;
+
+ // Execute
+ if(numberOfCommandsToExecute == 0) {
+ // Driver level error
+ if(error) return handleCallback(callback, error);
+ // Treat write errors
+ var error = self.s.bulkResult.writeErrors.length > 0 ? toError(self.s.bulkResult.writeErrors[0]) : null;
+ handleCallback(callback, error, new BulkWriteResult(self.s.bulkResult));
+ }
+ });
+ }
+}
+
+/**
+ * The callback format for results
+ * @callback UnorderedBulkOperation~resultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {BulkWriteResult} result The bulk write result.
+ */
+
+/**
+ * Execute the ordered bulk operation
+ *
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.fsync=false] Specify a file sync write concern.
+ * @param {UnorderedBulkOperation~resultCallback} [callback] The result callback
+ * @throws {MongoError}
+ * @return {Promise} returns Promise if no callback passed
+ */
+UnorderedBulkOperation.prototype.execute = function(_writeConcern, callback) {
+ var self = this;
+ if(this.s.executed) throw toError("batch cannot be re-executed");
+ if(typeof _writeConcern == 'function') {
+ callback = _writeConcern;
+ } else {
+ this.s.writeConcern = _writeConcern;
+ }
+
+ // If we have current batch
+ if(this.s.currentInsertBatch) this.s.batches.push(this.s.currentInsertBatch);
+ if(this.s.currentUpdateBatch) this.s.batches.push(this.s.currentUpdateBatch);
+ if(this.s.currentRemoveBatch) this.s.batches.push(this.s.currentRemoveBatch);
+
+ // If we have no operations in the bulk raise an error
+ if(this.s.batches.length == 0) {
+ throw toError("Invalid Operation, No operations in bulk");
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return executeBatches(this, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ executeBatches(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('execute', {callback: true, promise:false});
+
+/**
+ * Returns an unordered batch object
+ * @ignore
+ */
+var initializeUnorderedBulkOp = function(topology, collection, options) {
+ return new UnorderedBulkOperation(topology, collection, options);
+}
+
+initializeUnorderedBulkOp.UnorderedBulkOperation = UnorderedBulkOperation;
+module.exports = initializeUnorderedBulkOp;
+module.exports.Bulk = UnorderedBulkOperation;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/collection.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/collection.js
new file mode 100644
index 0000000..bae5d5c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/collection.js
@@ -0,0 +1,3360 @@
+"use strict";
+
+var checkCollectionName = require('./utils').checkCollectionName
+ , ObjectID = require('mongodb-core').BSON.ObjectID
+ , Long = require('mongodb-core').BSON.Long
+ , Code = require('mongodb-core').BSON.Code
+ , f = require('util').format
+ , AggregationCursor = require('./aggregation_cursor')
+ , MongoError = require('mongodb-core').MongoError
+ , shallowClone = require('./utils').shallowClone
+ , isObject = require('./utils').isObject
+ , toError = require('./utils').toError
+ , normalizeHintField = require('./utils').normalizeHintField
+ , handleCallback = require('./utils').handleCallback
+ , decorateCommand = require('./utils').decorateCommand
+ , formattedOrderClause = require('./utils').formattedOrderClause
+ , ReadPreference = require('./read_preference')
+ , CoreReadPreference = require('mongodb-core').ReadPreference
+ , CommandCursor = require('./command_cursor')
+ , Define = require('./metadata')
+ , Cursor = require('./cursor')
+ , unordered = require('./bulk/unordered')
+ , ordered = require('./bulk/ordered')
+ , assign = require('./utils').assign;
+
+/**
+ * @fileOverview The **Collection** class is an internal class that embodies a MongoDB collection
+ * allowing for insert/update/remove/find and other command operation on that MongoDB collection.
+ *
+ * **COLLECTION Cannot directly be instantiated**
+ * @example
+ * var MongoClient = require('mongodb').MongoClient,
+ * test = require('assert');
+ * // Connection url
+ * var url = 'mongodb://localhost:27017/test';
+ * // Connect using MongoClient
+ * MongoClient.connect(url, function(err, db) {
+ * // Create a collection we want to drop later
+ * var col = db.collection('createIndexExample1');
+ * // Show that duplicate records got dropped
+ * col.find({}).toArray(function(err, items) {
+ * test.equal(null, err);
+ * test.equal(4, items.length);
+ * db.close();
+ * });
+ * });
+ */
+
+/**
+ * Create a new Collection instance (INTERNAL TYPE, do not instantiate directly)
+ * @class
+ * @property {string} collectionName Get the collection name.
+ * @property {string} namespace Get the full collection namespace.
+ * @property {object} writeConcern The current write concern values.
+ * @property {object} readConcern The current read concern values.
+ * @property {object} hint Get current index hint for collection.
+ * @return {Collection} a Collection instance.
+ */
+var Collection = function(db, topology, dbName, name, pkFactory, options) {
+ checkCollectionName(name);
+ var self = this;
+ // Unpack variables
+ var internalHint = null;
+ var opts = options != null && ('object' === typeof options) ? options : {};
+ var slaveOk = options == null || options.slaveOk == null ? db.slaveOk : options.slaveOk;
+ var serializeFunctions = options == null || options.serializeFunctions == null ? db.s.options.serializeFunctions : options.serializeFunctions;
+ var raw = options == null || options.raw == null ? db.s.options.raw : options.raw;
+ var promoteLongs = options == null || options.promoteLongs == null ? db.s.options.promoteLongs : options.promoteLongs;
+ var promoteValues = options == null || options.promoteValues == null ? db.s.options.promoteValues : options.promoteValues;
+ var promoteBuffers = options == null || options.promoteBuffers == null ? db.s.options.promoteBuffers : options.promoteBuffers;
+ var readPreference = null;
+ var collectionHint = null;
+ var namespace = f("%s.%s", dbName, name);
+
+ // Get the promiseLibrary
+ var promiseLibrary = options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // Assign the right collection level readPreference
+ if(options && options.readPreference) {
+ readPreference = options.readPreference;
+ } else if(db.options.readPreference) {
+ readPreference = db.options.readPreference;
+ }
+
+ // Set custom primary key factory if provided
+ pkFactory = pkFactory == null
+ ? ObjectID
+ : pkFactory;
+
+ // Internal state
+ this.s = {
+ // Set custom primary key factory if provided
+ pkFactory: pkFactory
+ // Db
+ , db: db
+ // Topology
+ , topology: topology
+ // dbName
+ , dbName: dbName
+ // Options
+ , options: options
+ // Namespace
+ , namespace: namespace
+ // Read preference
+ , readPreference: readPreference
+ // SlaveOK
+ , slaveOk: slaveOk
+ // Serialize functions
+ , serializeFunctions: serializeFunctions
+ // Raw
+ , raw: raw
+ // promoteLongs
+ , promoteLongs: promoteLongs
+ // promoteValues
+ , promoteValues: promoteValues
+ // promoteBuffers
+ , promoteBuffers: promoteBuffers
+ // internalHint
+ , internalHint: internalHint
+ // collectionHint
+ , collectionHint: collectionHint
+ // Name
+ , name: name
+ // Promise library
+ , promiseLibrary: promiseLibrary
+ // Read Concern
+ , readConcern: options.readConcern
+ }
+}
+
+var define = Collection.define = new Define('Collection', Collection, false);
+
+Object.defineProperty(Collection.prototype, 'collectionName', {
+ enumerable: true, get: function() { return this.s.name; }
+});
+
+Object.defineProperty(Collection.prototype, 'namespace', {
+ enumerable: true, get: function() { return this.s.namespace; }
+});
+
+Object.defineProperty(Collection.prototype, 'readConcern', {
+ enumerable: true, get: function() { return this.s.readConcern || {level: 'local'}; }
+});
+
+Object.defineProperty(Collection.prototype, 'writeConcern', {
+ enumerable:true,
+ get: function() {
+ var ops = {};
+ if(this.s.options.w != null) ops.w = this.s.options.w;
+ if(this.s.options.j != null) ops.j = this.s.options.j;
+ if(this.s.options.fsync != null) ops.fsync = this.s.options.fsync;
+ if(this.s.options.wtimeout != null) ops.wtimeout = this.s.options.wtimeout;
+ return ops;
+ }
+});
+
+/**
+ * @ignore
+ */
+Object.defineProperty(Collection.prototype, "hint", {
+ enumerable: true
+ , get: function () { return this.s.collectionHint; }
+ , set: function (v) { this.s.collectionHint = normalizeHintField(v); }
+});
+
+/**
+ * Creates a cursor for a query that can be used to iterate over results from MongoDB
+ * @method
+ * @param {object} query The cursor query object.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Collection.prototype.find = function() {
+ var options
+ , args = Array.prototype.slice.call(arguments, 0)
+ , has_callback = typeof args[args.length - 1] === 'function'
+ , has_weird_callback = typeof args[0] === 'function'
+ , callback = has_callback ? args.pop() : (has_weird_callback ? args.shift() : null)
+ , len = args.length
+ , selector = len >= 1 ? args[0] : {}
+ , fields = len >= 2 ? args[1] : undefined;
+
+ if(len === 1 && has_weird_callback) {
+ // backwards compat for callback?, options case
+ selector = {};
+ options = args[0];
+ }
+
+ if(len === 2 && fields !== undefined && !Array.isArray(fields)) {
+ var fieldKeys = Object.keys(fields);
+ var is_option = false;
+
+ for(var i = 0; i < fieldKeys.length; i++) {
+ if(testForFields[fieldKeys[i]] != null) {
+ is_option = true;
+ break;
+ }
+ }
+
+ if(is_option) {
+ options = fields;
+ fields = undefined;
+ } else {
+ options = {};
+ }
+ } else if(len === 2 && Array.isArray(fields) && !Array.isArray(fields[0])) {
+ var newFields = {};
+ // Rewrite the array
+ for(var i = 0; i < fields.length; i++) {
+ newFields[fields[i]] = 1;
+ }
+ // Set the fields
+ fields = newFields;
+ }
+
+ if(3 === len) {
+ options = args[2];
+ }
+
+ // Ensure selector is not null
+ selector = selector == null ? {} : selector;
+ // Validate correctness off the selector
+ var object = selector;
+ if(Buffer.isBuffer(object)) {
+ var object_size = object[0] | object[1] << 8 | object[2] << 16 | object[3] << 24;
+ if(object_size != object.length) {
+ var error = new Error("query selector raw message size does not match message header size [" + object.length + "] != [" + object_size + "]");
+ error.name = 'MongoError';
+ throw error;
+ }
+ }
+
+ // Validate correctness of the field selector
+ var object = fields;
+ if(Buffer.isBuffer(object)) {
+ var object_size = object[0] | object[1] << 8 | object[2] << 16 | object[3] << 24;
+ if(object_size != object.length) {
+ var error = new Error("query fields raw message size does not match message header size [" + object.length + "] != [" + object_size + "]");
+ error.name = 'MongoError';
+ throw error;
+ }
+ }
+
+ // Check special case where we are using an objectId
+ if(selector instanceof ObjectID || (selector != null && selector._bsontype == 'ObjectID')) {
+ selector = {_id:selector};
+ }
+
+ // If it's a serialized fields field we need to just let it through
+ // user be warned it better be good
+ if(options && options.fields && !(Buffer.isBuffer(options.fields))) {
+ fields = {};
+
+ if(Array.isArray(options.fields)) {
+ if(!options.fields.length) {
+ fields['_id'] = 1;
+ } else {
+ for (var i = 0, l = options.fields.length; i < l; i++) {
+ fields[options.fields[i]] = 1;
+ }
+ }
+ } else {
+ fields = options.fields;
+ }
+ }
+
+ if (!options) options = {};
+
+ var newOptions = {};
+ // Make a shallow copy of options
+ for (var key in options) {
+ newOptions[key] = options[key];
+ }
+
+ // Unpack options
+ newOptions.skip = len > 3 ? args[2] : options.skip ? options.skip : 0;
+ newOptions.limit = len > 3 ? args[3] : options.limit ? options.limit : 0;
+ newOptions.raw = options.raw != null && typeof options.raw === 'boolean' ? options.raw : this.s.raw;
+ newOptions.hint = options.hint != null ? normalizeHintField(options.hint) : this.s.collectionHint;
+ newOptions.timeout = len == 5 ? args[4] : typeof options.timeout === 'undefined' ? undefined : options.timeout;
+ // // If we have overridden slaveOk otherwise use the default db setting
+ newOptions.slaveOk = options.slaveOk != null ? options.slaveOk : this.s.db.slaveOk;
+
+ // Add read preference if needed
+ newOptions = getReadPreference(this, newOptions, this.s.db, this);
+
+ // Set slave ok to true if read preference different from primary
+ if(newOptions.readPreference != null
+ && (newOptions.readPreference != 'primary' || newOptions.readPreference.mode != 'primary')) {
+ newOptions.slaveOk = true;
+ }
+
+ // Ensure the query is an object
+ if(selector != null && typeof selector != 'object') {
+ throw MongoError.create({message: "query selector must be an object", driver:true });
+ }
+
+ // Build the find command
+ var findCommand = {
+ find: this.s.namespace
+ , limit: newOptions.limit
+ , skip: newOptions.skip
+ , query: selector
+ }
+
+ // Ensure we use the right await data option
+ if(typeof newOptions.awaitdata == 'boolean') {
+ newOptions.awaitData = newOptions.awaitdata
+ };
+
+ // Translate to new command option noCursorTimeout
+ if(typeof newOptions.timeout == 'boolean') newOptions.noCursorTimeout = newOptions.timeout;
+
+ // Merge in options to command
+ for(var name in newOptions) {
+ if(newOptions[name] != null) findCommand[name] = newOptions[name];
+ }
+
+ // Format the fields
+ var formatFields = function(fields) {
+ var object = {};
+ if(Array.isArray(fields)) {
+ for(var i = 0; i < fields.length; i++) {
+ if(Array.isArray(fields[i])) {
+ object[fields[i][0]] = fields[i][1];
+ } else {
+ object[fields[i][0]] = 1;
+ }
+ }
+ } else {
+ object = fields;
+ }
+
+ return object;
+ }
+
+ // Special treatment for the fields selector
+ if(fields) findCommand.fields = formatFields(fields);
+
+ // Add db object to the new options
+ newOptions.db = this.s.db;
+
+ // Add the promise library
+ newOptions.promiseLibrary = this.s.promiseLibrary;
+
+ // Set raw if available at collection level
+ if(newOptions.raw == null && typeof this.s.raw == 'boolean') newOptions.raw = this.s.raw;
+ // Set promoteLongs if available at collection level
+ if(newOptions.promoteLongs == null && typeof this.s.promoteLongs == 'boolean') newOptions.promoteLongs = this.s.promoteLongs;
+ if(newOptions.promoteValues == null && typeof this.s.promoteValues == 'boolean') newOptions.promoteValues = this.s.promoteValues;
+ if(newOptions.promoteBuffers == null && typeof this.s.promoteBuffers == 'boolean') newOptions.promoteBuffers = this.s.promoteBuffers;
+
+ // Sort options
+ if(findCommand.sort) {
+ findCommand.sort = formattedOrderClause(findCommand.sort);
+ }
+
+ // Set the readConcern
+ if(this.s.readConcern) {
+ findCommand.readConcern = this.s.readConcern;
+ }
+
+ // Decorate find command with collation options
+ decorateWithCollation(findCommand, this, options);
+
+ // Create the cursor
+ if(typeof callback == 'function') return handleCallback(callback, null, this.s.topology.cursor(this.s.namespace, findCommand, newOptions));
+ return this.s.topology.cursor(this.s.namespace, findCommand, newOptions);
+}
+
+define.classMethod('find', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Inserts a single document into MongoDB. If documents passed in do not contain the **_id** field,
+ * one will be added to each of the documents missing it by the driver, mutating the document. This behavior
+ * can be overridden by setting the **forceServerObjectId** flag.
+ *
+ * @method
+ * @param {object} doc Document to insert.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
+ * @param {boolean} [options.forceServerObjectId=false] Force server to assign _id values instead of driver.
+ * @param {boolean} [options.bypassDocumentValidation=false] Allow driver to bypass schema validation in MongoDB 3.2 or higher.
+ * @param {Collection~insertOneWriteOpCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.insertOne = function(doc, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+ if(Array.isArray(doc) && typeof callback == 'function') {
+ return callback(MongoError.create({message: 'doc parameter must be an object', driver:true }));
+ } else if(Array.isArray(doc)) {
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ reject(MongoError.create({message: 'doc parameter must be an object', driver:true }));
+ });
+ }
+
+ // Add ignoreUndfined
+ if(this.s.options.ignoreUndefined) {
+ options = shallowClone(options);
+ options.ignoreUndefined = this.s.options.ignoreUndefined;
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return insertOne(self, doc, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ insertOne(self, doc, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var insertOne = function(self, doc, options, callback) {
+ insertDocuments(self, [doc], options, function(err, r) {
+ if(callback == null) return;
+ if(err && callback) return callback(err);
+ // Workaround for pre 2.6 servers
+ if(r == null) return callback(null, {result: {ok:1}});
+ // Add values to top level to ensure crud spec compatibility
+ r.insertedCount = r.result.n;
+ r.insertedId = doc._id;
+ if(callback) callback(null, r);
+ });
+}
+
+var mapInserManyResults = function(docs, r) {
+ var ids = r.getInsertedIds();
+ var keys = Object.keys(ids);
+ var finalIds = new Array(keys.length);
+
+ for(var i = 0; i < keys.length; i++) {
+ if(ids[keys[i]]._id) {
+ finalIds[ids[keys[i]].index] = ids[keys[i]]._id;
+ }
+ }
+
+ var finalResult = {
+ result: {ok: 1, n: r.insertedCount},
+ ops: docs,
+ insertedCount: r.insertedCount,
+ insertedIds: finalIds
+ };
+
+ if(r.getLastOp()) {
+ finalResult.result.opTime = r.getLastOp();
+ }
+
+ return finalResult;
+}
+
+define.classMethod('insertOne', {callback: true, promise:true});
+
+/**
+ * Inserts an array of documents into MongoDB. If documents passed in do not contain the **_id** field,
+ * one will be added to each of the documents missing it by the driver, mutating the document. This behavior
+ * can be overridden by setting the **forceServerObjectId** flag.
+ *
+ * @method
+ * @param {object[]} docs Documents to insert.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
+ * @param {boolean} [options.forceServerObjectId=false] Force server to assign _id values instead of driver.
+ * @param {boolean} [options.bypassDocumentValidation=false] Allow driver to bypass schema validation in MongoDB 3.2 or higher.
+ * @param {Collection~insertWriteOpCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.insertMany = function(docs, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {ordered:true};
+ if(!Array.isArray(docs) && typeof callback == 'function') {
+ return callback(MongoError.create({message: 'docs parameter must be an array of documents', driver:true }));
+ } else if(!Array.isArray(docs)) {
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ reject(MongoError.create({message: 'docs parameter must be an array of documents', driver:true }));
+ });
+ }
+
+ // Get the write concern options
+ if(typeof options.checkKeys != 'boolean') {
+ options.checkKeys = true;
+ }
+
+ // If keep going set unordered
+ options['serializeFunctions'] = options['serializeFunctions'] || self.s.serializeFunctions;
+
+ // Set up the force server object id
+ var forceServerObjectId = typeof options.forceServerObjectId == 'boolean'
+ ? options.forceServerObjectId : self.s.db.options.forceServerObjectId;
+
+ // Do we want to force the server to assign the _id key
+ if(forceServerObjectId !== true) {
+ // Add _id if not specified
+ for(var i = 0; i < docs.length; i++) {
+ if(docs[i]._id == null) docs[i]._id = self.s.pkFactory.createPk();
+ }
+ }
+
+ // Generate the bulk write operations
+ var operations = [{
+ insertMany: docs
+ }];
+
+ // Execute using callback
+ if(typeof callback == 'function') return bulkWrite(self, operations, options, function(err, r) {
+ if(err) return callback(err, r);
+ callback(null, mapInserManyResults(docs, r));
+ });
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ bulkWrite(self, operations, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(mapInserManyResults(docs, r));
+ });
+ });
+}
+
+define.classMethod('insertMany', {callback: true, promise:true});
+
+/**
+ * @typedef {Object} Collection~BulkWriteOpResult
+ * @property {number} insertedCount Number of documents inserted.
+ * @property {number} matchedCount Number of documents matched for update.
+ * @property {number} modifiedCount Number of documents modified.
+ * @property {number} deletedCount Number of documents deleted.
+ * @property {number} upsertedCount Number of documents upserted.
+ * @property {object} insertedIds Inserted document generated Id's, hash key is the index of the originating operation
+ * @property {object} upsertedIds Upserted document generated Id's, hash key is the index of the originating operation
+ * @property {object} result The command result object.
+ */
+
+/**
+ * The callback format for inserts
+ * @callback Collection~bulkWriteOpCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Collection~BulkWriteOpResult} result The result object if the command was executed successfully.
+ */
+
+/**
+ * Perform a bulkWrite operation without a fluent API
+ *
+ * Legal operation types are
+ *
+ * { insertOne: { document: { a: 1 } } }
+ *
+ * { updateOne: { filter: {a:2}, update: {$set: {a:2}}, upsert:true } }
+ *
+ * { updateMany: { filter: {a:2}, update: {$set: {a:2}}, upsert:true } }
+ *
+ * { deleteOne: { filter: {c:1} } }
+ *
+ * { deleteMany: { filter: {c:1} } }
+ *
+ * { replaceOne: { filter: {c:3}, replacement: {c:4}, upsert:true}}
+ *
+ * If documents passed in do not contain the **_id** field,
+ * one will be added to each of the documents missing it by the driver, mutating the document. This behavior
+ * can be overridden by setting the **forceServerObjectId** flag.
+ *
+ * @method
+ * @param {object[]} operations Bulk operations to perform.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
+ * @param {boolean} [options.ordered=true] Execute write operation in ordered or unordered fashion.
+ * @param {boolean} [options.bypassDocumentValidation=false] Allow driver to bypass schema validation in MongoDB 3.2 or higher.
+ * @param {Collection~bulkWriteOpCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.bulkWrite = function(operations, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {ordered:true};
+
+ if(!Array.isArray(operations)) {
+ throw MongoError.create({message: "operations must be an array of documents", driver:true });
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return bulkWrite(self, operations, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ bulkWrite(self, operations, options, function(err, r) {
+ if(err && r == null) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var bulkWrite = function(self, operations, options, callback) {
+ // Add ignoreUndfined
+ if(self.s.options.ignoreUndefined) {
+ options = shallowClone(options);
+ options.ignoreUndefined = self.s.options.ignoreUndefined;
+ }
+
+ // Create the bulk operation
+ var bulk = options.ordered == true || options.ordered == null ? self.initializeOrderedBulkOp(options) : self.initializeUnorderedBulkOp(options);
+
+ // Do we have a collation
+ var collation = false;
+
+ // for each op go through and add to the bulk
+ try {
+ for(var i = 0; i < operations.length; i++) {
+ // Get the operation type
+ var key = Object.keys(operations[i])[0];
+ // Check if we have a collation
+ if(operations[i][key].collation) {
+ collation = true;
+ }
+
+ // Pass to the raw bulk
+ bulk.raw(operations[i]);
+ }
+ } catch(err) {
+ return callback(err, null);
+ }
+
+ // Final options for write concern
+ var finalOptions = writeConcern(shallowClone(options), self.s.db, self, options);
+ var writeCon = finalOptions.writeConcern ? finalOptions.writeConcern : {};
+ var capabilities = self.s.topology.capabilities();
+
+ // Did the user pass in a collation, check if our write server supports it
+ if(collation && capabilities && !capabilities.commandsTakeCollation) {
+ return callback(new MongoError(f('server/primary/mongos does not support collation')));
+ }
+
+ // Execute the bulk
+ bulk.execute(writeCon, function(err, r) {
+ // We have connection level error
+ if(!r && err) return callback(err, null);
+ // We have single error
+ if(r && r.hasWriteErrors() && r.getWriteErrorCount() == 1) {
+ return callback(toError(r.getWriteErrorAt(0)), r);
+ }
+
+ r.insertedCount = r.nInserted;
+ r.matchedCount = r.nMatched;
+ r.modifiedCount = r.nModified || 0;
+ r.deletedCount = r.nRemoved;
+ r.upsertedCount = r.getUpsertedIds().length;
+ r.upsertedIds = {};
+ r.insertedIds = {};
+
+ // Update the n
+ r.n = r.insertedCount;
+
+ // Inserted documents
+ var inserted = r.getInsertedIds();
+ // Map inserted ids
+ for(var i = 0; i < inserted.length; i++) {
+ r.insertedIds[inserted[i].index] = inserted[i]._id;
+ }
+
+ // Upserted documents
+ var upserted = r.getUpsertedIds();
+ // Map upserted ids
+ for(var i = 0; i < upserted.length; i++) {
+ r.upsertedIds[upserted[i].index] = upserted[i]._id;
+ }
+
+ // Check if we have write errors
+ if(r.hasWriteErrors()) {
+ // Get all the errors
+ var errors = r.getWriteErrors();
+ // Return the MongoError object
+ return callback(toError({
+ message: 'write operation failed', code: errors[0].code, writeErrors: errors
+ }), r);
+ }
+
+ // Check if we have a writeConcern error
+ if(r.getWriteConcernError()) {
+ // Return the MongoError object
+ return callback(toError(r.getWriteConcernError()), r);
+ }
+
+ // Return the results
+ callback(null, r);
+ });
+}
+
+var insertDocuments = function(self, docs, options, callback) {
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+ // Ensure we are operating on an array op docs
+ docs = Array.isArray(docs) ? docs : [docs];
+
+ // Get the write concern options
+ var finalOptions = writeConcern(shallowClone(options), self.s.db, self, options);
+ if(typeof finalOptions.checkKeys != 'boolean') finalOptions.checkKeys = true;
+
+ // If keep going set unordered
+ if(finalOptions.keepGoing == true) finalOptions.ordered = false;
+ finalOptions['serializeFunctions'] = options['serializeFunctions'] || self.s.serializeFunctions;
+
+ // Set up the force server object id
+ var forceServerObjectId = typeof options.forceServerObjectId == 'boolean'
+ ? options.forceServerObjectId : self.s.db.options.forceServerObjectId;
+
+ // Add _id if not specified
+ if(forceServerObjectId !== true){
+ for(var i = 0; i < docs.length; i++) {
+ if(docs[i]._id == null) docs[i]._id = self.s.pkFactory.createPk();
+ }
+ }
+
+ // File inserts
+ self.s.topology.insert(self.s.namespace, docs, finalOptions, function(err, result) {
+ if(callback == null) return;
+ if(err) return handleCallback(callback, err);
+ if(result == null) return handleCallback(callback, null, null);
+ if(result.result.code) return handleCallback(callback, toError(result.result));
+ if(result.result.writeErrors) return handleCallback(callback, toError(result.result.writeErrors[0]));
+ // Add docs to the list
+ result.ops = docs;
+ // Return the results
+ handleCallback(callback, null, result);
+ });
+}
+
+define.classMethod('bulkWrite', {callback: true, promise:true});
+
+/**
+ * @typedef {Object} Collection~WriteOpResult
+ * @property {object[]} ops All the documents inserted using insertOne/insertMany/replaceOne. Documents contain the _id field if forceServerObjectId == false for insertOne/insertMany
+ * @property {object} connection The connection object used for the operation.
+ * @property {object} result The command result object.
+ */
+
+/**
+ * The callback format for inserts
+ * @callback Collection~writeOpCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Collection~WriteOpResult} result The result object if the command was executed successfully.
+ */
+
+/**
+ * @typedef {Object} Collection~insertWriteOpResult
+ * @property {Number} insertedCount The total amount of documents inserted.
+ * @property {object[]} ops All the documents inserted using insertOne/insertMany/replaceOne. Documents contain the _id field if forceServerObjectId == false for insertOne/insertMany
+ * @property {ObjectId[]} insertedIds All the generated _id's for the inserted documents.
+ * @property {object} connection The connection object used for the operation.
+ * @property {object} result The raw command result object returned from MongoDB (content might vary by server version).
+ * @property {Number} result.ok Is 1 if the command executed correctly.
+ * @property {Number} result.n The total count of documents inserted.
+ */
+
+/**
+ * @typedef {Object} Collection~insertOneWriteOpResult
+ * @property {Number} insertedCount The total amount of documents inserted.
+ * @property {object[]} ops All the documents inserted using insertOne/insertMany/replaceOne. Documents contain the _id field if forceServerObjectId == false for insertOne/insertMany
+ * @property {ObjectId} insertedId The driver generated ObjectId for the insert operation.
+ * @property {object} connection The connection object used for the operation.
+ * @property {object} result The raw command result object returned from MongoDB (content might vary by server version).
+ * @property {Number} result.ok Is 1 if the command executed correctly.
+ * @property {Number} result.n The total count of documents inserted.
+ */
+
+/**
+ * The callback format for inserts
+ * @callback Collection~insertWriteOpCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Collection~insertWriteOpResult} result The result object if the command was executed successfully.
+ */
+
+/**
+ * The callback format for inserts
+ * @callback Collection~insertOneWriteOpCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Collection~insertOneWriteOpResult} result The result object if the command was executed successfully.
+ */
+
+/**
+ * Inserts a single document or a an array of documents into MongoDB. If documents passed in do not contain the **_id** field,
+ * one will be added to each of the documents missing it by the driver, mutating the document. This behavior
+ * can be overridden by setting the **forceServerObjectId** flag.
+ *
+ * @method
+ * @param {(object|object[])} docs Documents to insert.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
+ * @param {boolean} [options.forceServerObjectId=false] Force server to assign _id values instead of driver.
+ * @param {boolean} [options.bypassDocumentValidation=false] Allow driver to bypass schema validation in MongoDB 3.2 or higher.
+ * @param {Collection~insertWriteOpCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use insertOne, insertMany or bulkWrite
+ */
+Collection.prototype.insert = function(docs, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {ordered:false};
+ docs = !Array.isArray(docs) ? [docs] : docs;
+
+ if(options.keepGoing == true) {
+ options.ordered = false;
+ }
+
+ return this.insertMany(docs, options, callback);
+}
+
+define.classMethod('insert', {callback: true, promise:true});
+
+/**
+ * @typedef {Object} Collection~updateWriteOpResult
+ * @property {Object} result The raw result returned from MongoDB, field will vary depending on server version.
+ * @property {Number} result.ok Is 1 if the command executed correctly.
+ * @property {Number} result.n The total count of documents scanned.
+ * @property {Number} result.nModified The total count of documents modified.
+ * @property {Object} connection The connection object used for the operation.
+ * @property {Number} matchedCount The number of documents that matched the filter.
+ * @property {Number} modifiedCount The number of documents that were modified.
+ * @property {Number} upsertedCount The number of documents upserted.
+ * @property {Object} upsertedId The upserted id.
+ * @property {ObjectId} upsertedId._id The upserted _id returned from the server.
+ */
+
+/**
+ * The callback format for inserts
+ * @callback Collection~updateWriteOpCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Collection~updateWriteOpResult} result The result object if the command was executed successfully.
+ */
+
+/**
+ * Update a single document on MongoDB
+ * @method
+ * @param {object} filter The Filter used to select the document to update
+ * @param {object} update The update operations to be applied to the document
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.upsert=false] Update operation is an upsert.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.bypassDocumentValidation=false] Allow driver to bypass schema validation in MongoDB 3.2 or higher.
+ * @param {Collection~updateWriteOpCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.updateOne = function(filter, update, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = shallowClone(options)
+
+ // Add ignoreUndfined
+ if(this.s.options.ignoreUndefined) {
+ options = shallowClone(options);
+ options.ignoreUndefined = this.s.options.ignoreUndefined;
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return updateOne(self, filter, update, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ updateOne(self, filter, update, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var updateOne = function(self, filter, update, options, callback) {
+ // Set single document update
+ options.multi = false;
+ // Execute update
+ updateDocuments(self, filter, update, options, function(err, r) {
+ if(callback == null) return;
+ if(err && callback) return callback(err);
+ if(r == null) return callback(null, {result: {ok:1}});
+ r.matchedCount = r.result.n;
+ r.modifiedCount = r.result.nModified != null ? r.result.nModified : r.result.n;
+ r.upsertedId = Array.isArray(r.result.upserted) && r.result.upserted.length > 0 ? r.result.upserted[0] : null;
+ r.upsertedCount = Array.isArray(r.result.upserted) && r.result.upserted.length ? r.result.upserted.length : 0;
+ if(callback) callback(null, r);
+ });
+}
+
+define.classMethod('updateOne', {callback: true, promise:true});
+
+/**
+ * Replace a document on MongoDB
+ * @method
+ * @param {object} filter The Filter used to select the document to update
+ * @param {object} doc The Document that replaces the matching document
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.upsert=false] Update operation is an upsert.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.bypassDocumentValidation=false] Allow driver to bypass schema validation in MongoDB 3.2 or higher.
+ * @param {Collection~updateWriteOpCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.replaceOne = function(filter, update, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = shallowClone(options)
+
+ // Add ignoreUndfined
+ if(this.s.options.ignoreUndefined) {
+ options = shallowClone(options);
+ options.ignoreUndefined = this.s.options.ignoreUndefined;
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return replaceOne(self, filter, update, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ replaceOne(self, filter, update, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var replaceOne = function(self, filter, update, options, callback) {
+ // Set single document update
+ options.multi = false;
+ // Execute update
+ updateDocuments(self, filter, update, options, function(err, r) {
+ if(callback == null) return;
+ if(err && callback) return callback(err);
+ if(r == null) return callback(null, {result: {ok:1}});
+ r.matchedCount = r.result.n;
+ r.modifiedCount = r.result.nModified != null ? r.result.nModified : r.result.n;
+ r.upsertedId = Array.isArray(r.result.upserted) && r.result.upserted.length > 0 ? r.result.upserted[0] : null;
+ r.upsertedCount = Array.isArray(r.result.upserted) && r.result.upserted.length ? r.result.upserted.length : 0;
+ r.ops = [update];
+ if(callback) callback(null, r);
+ });
+}
+
+define.classMethod('replaceOne', {callback: true, promise:true});
+
+/**
+ * Update multiple documents on MongoDB
+ * @method
+ * @param {object} filter The Filter used to select the document to update
+ * @param {object} update The update operations to be applied to the document
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.upsert=false] Update operation is an upsert.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {Collection~updateWriteOpCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.updateMany = function(filter, update, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = shallowClone(options)
+
+ // Add ignoreUndfined
+ if(this.s.options.ignoreUndefined) {
+ options = shallowClone(options);
+ options.ignoreUndefined = this.s.options.ignoreUndefined;
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return updateMany(self, filter, update, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ updateMany(self, filter, update, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var updateMany = function(self, filter, update, options, callback) {
+ // Set single document update
+ options.multi = true;
+ // Execute update
+ updateDocuments(self, filter, update, options, function(err, r) {
+ if(callback == null) return;
+ if(err && callback) return callback(err);
+ if(r == null) return callback(null, {result: {ok:1}});
+ r.matchedCount = r.result.n;
+ r.modifiedCount = r.result.nModified != null ? r.result.nModified : r.result.n;
+ r.upsertedId = Array.isArray(r.result.upserted) && r.result.upserted.length > 0 ? r.result.upserted[0] : null;
+ r.upsertedCount = Array.isArray(r.result.upserted) && r.result.upserted.length ? r.result.upserted.length : 0;
+ if(callback) callback(null, r);
+ });
+}
+
+define.classMethod('updateMany', {callback: true, promise:true});
+
+var updateDocuments = function(self, selector, document, options, callback) {
+ if('function' === typeof options) callback = options, options = null;
+ if(options == null) options = {};
+ if(!('function' === typeof callback)) callback = null;
+
+ // If we are not providing a selector or document throw
+ if(selector == null || typeof selector != 'object') return callback(toError("selector must be a valid JavaScript object"));
+ if(document == null || typeof document != 'object') return callback(toError("document must be a valid JavaScript object"));
+
+ // Get the write concern options
+ var finalOptions = writeConcern(shallowClone(options), self.s.db, self, options);
+
+ // Do we return the actual result document
+ // Either use override on the function, or go back to default on either the collection
+ // level or db
+ finalOptions['serializeFunctions'] = options['serializeFunctions'] || self.s.serializeFunctions;
+
+ // Execute the operation
+ var op = {q: selector, u: document};
+ op.upsert = typeof options.upsert == 'boolean' ? options.upsert : false;
+ op.multi = typeof options.multi == 'boolean' ? options.multi : false;
+
+ // Have we specified collation
+ decorateWithCollation(finalOptions, self, options);
+
+ // Update options
+ self.s.topology.update(self.s.namespace, [op], finalOptions, function(err, result) {
+ if(callback == null) return;
+ if(err) return handleCallback(callback, err, null);
+ if(result == null) return handleCallback(callback, null, null);
+ if(result.result.code) return handleCallback(callback, toError(result.result));
+ if(result.result.writeErrors) return handleCallback(callback, toError(result.result.writeErrors[0]));
+ // Return the results
+ handleCallback(callback, null, result);
+ });
+}
+
+/**
+ * Updates documents.
+ * @method
+ * @param {object} selector The selector for the update operation.
+ * @param {object} document The update document.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.upsert=false] Update operation is an upsert.
+ * @param {boolean} [options.multi=false] Update one/all documents with operation.
+ * @param {boolean} [options.bypassDocumentValidation=false] Allow driver to bypass schema validation in MongoDB 3.2 or higher.
+ * @param {object} [options.collation=null] Specify collation (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields).
+ * @param {Collection~writeOpCallback} [callback] The command result callback
+ * @throws {MongoError}
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated use updateOne, updateMany or bulkWrite
+ */
+Collection.prototype.update = function(selector, document, options, callback) {
+ var self = this;
+
+ // Add ignoreUndfined
+ if(this.s.options.ignoreUndefined) {
+ options = shallowClone(options);
+ options.ignoreUndefined = this.s.options.ignoreUndefined;
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return updateDocuments(self, selector, document, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ updateDocuments(self, selector, document, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('update', {callback: true, promise:true});
+
+/**
+ * @typedef {Object} Collection~deleteWriteOpResult
+ * @property {Object} result The raw result returned from MongoDB, field will vary depending on server version.
+ * @property {Number} result.ok Is 1 if the command executed correctly.
+ * @property {Number} result.n The total count of documents deleted.
+ * @property {Object} connection The connection object used for the operation.
+ * @property {Number} deletedCount The number of documents deleted.
+ */
+
+/**
+ * The callback format for inserts
+ * @callback Collection~deleteWriteOpCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Collection~deleteWriteOpResult} result The result object if the command was executed successfully.
+ */
+
+/**
+ * Delete a document on MongoDB
+ * @method
+ * @param {object} filter The Filter used to select the document to remove
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {Collection~deleteWriteOpCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.deleteOne = function(filter, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ var options = shallowClone(options);
+
+ // Add ignoreUndfined
+ if(this.s.options.ignoreUndefined) {
+ options = shallowClone(options);
+ options.ignoreUndefined = this.s.options.ignoreUndefined;
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return deleteOne(self, filter, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ deleteOne(self, filter, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var deleteOne = function(self, filter, options, callback) {
+ options.single = true;
+ removeDocuments(self, filter, options, function(err, r) {
+ if(callback == null) return;
+ if(err && callback) return callback(err);
+ if(r == null) return callback(null, {result: {ok:1}});
+ r.deletedCount = r.result.n;
+ if(callback) callback(null, r);
+ });
+}
+
+define.classMethod('deleteOne', {callback: true, promise:true});
+
+Collection.prototype.removeOne = Collection.prototype.deleteOne;
+
+define.classMethod('removeOne', {callback: true, promise:true});
+
+/**
+ * Delete multiple documents on MongoDB
+ * @method
+ * @param {object} filter The Filter used to select the documents to remove
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {Collection~deleteWriteOpCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.deleteMany = function(filter, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ var options = shallowClone(options);
+
+ // Add ignoreUndfined
+ if(this.s.options.ignoreUndefined) {
+ options = shallowClone(options);
+ options.ignoreUndefined = this.s.options.ignoreUndefined;
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return deleteMany(self, filter, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ deleteMany(self, filter, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var deleteMany = function(self, filter, options, callback) {
+ options.single = false;
+
+ removeDocuments(self, filter, options, function(err, r) {
+ if(callback == null) return;
+ if(err && callback) return callback(err);
+ if(r == null) return callback(null, {result: {ok:1}});
+ r.deletedCount = r.result.n;
+ if(callback) callback(null, r);
+ });
+}
+
+var removeDocuments = function(self, selector, options, callback) {
+ if(typeof options == 'function') {
+ callback = options, options = {};
+ } else if (typeof selector === 'function') {
+ callback = selector;
+ options = {};
+ selector = {};
+ }
+
+ // Create an empty options object if the provided one is null
+ options = options || {};
+
+ // Get the write concern options
+ var finalOptions = writeConcern(shallowClone(options), self.s.db, self, options);
+
+ // If selector is null set empty
+ if(selector == null) selector = {};
+
+ // Build the op
+ var op = {q: selector, limit: 0};
+ if(options.single) op.limit = 1;
+
+ // Have we specified collation
+ decorateWithCollation(finalOptions, self, options);
+
+ // Execute the remove
+ self.s.topology.remove(self.s.namespace, [op], finalOptions, function(err, result) {
+ if(callback == null) return;
+ if(err) return handleCallback(callback, err, null);
+ if(result == null) return handleCallback(callback, null, null);
+ if(result.result.code) return handleCallback(callback, toError(result.result));
+ if(result.result.writeErrors) return handleCallback(callback, toError(result.result.writeErrors[0]));
+ // Return the results
+ handleCallback(callback, null, result);
+ });
+}
+
+define.classMethod('deleteMany', {callback: true, promise:true});
+
+Collection.prototype.removeMany = Collection.prototype.deleteMany;
+
+define.classMethod('removeMany', {callback: true, promise:true});
+
+/**
+ * Remove documents.
+ * @method
+ * @param {object} selector The selector for the update operation.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.single=false] Removes the first document found.
+ * @param {Collection~writeOpCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated use deleteOne, deleteMany or bulkWrite
+ */
+Collection.prototype.remove = function(selector, options, callback) {
+ var self = this;
+
+ // Add ignoreUndfined
+ if(this.s.options.ignoreUndefined) {
+ options = shallowClone(options);
+ options.ignoreUndefined = this.s.options.ignoreUndefined;
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return removeDocuments(self, selector, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ removeDocuments(self, selector, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('remove', {callback: true, promise:true});
+
+/**
+ * Save a document. Simple full document replacement function. Not recommended for efficiency, use atomic
+ * operators and update instead for more efficient operations.
+ * @method
+ * @param {object} doc Document to save
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {Collection~writeOpCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated use insertOne, insertMany, updateOne or updateMany
+ */
+Collection.prototype.save = function(doc, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // Add ignoreUndfined
+ if(this.s.options.ignoreUndefined) {
+ options = shallowClone(options);
+ options.ignoreUndefined = this.s.options.ignoreUndefined;
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return save(self, doc, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ save(self, doc, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var save = function(self, doc, options, callback) {
+ // Get the write concern options
+ var finalOptions = writeConcern(shallowClone(options), self.s.db, self, options);
+ // Establish if we need to perform an insert or update
+ if(doc._id != null) {
+ finalOptions.upsert = true;
+ return updateDocuments(self, {_id: doc._id}, doc, finalOptions, callback);
+ }
+
+ // Insert the document
+ insertDocuments(self, [doc], options, function(err, r) {
+ if(callback == null) return;
+ if(doc == null) return handleCallback(callback, null, null);
+ if(err) return handleCallback(callback, err, null);
+ handleCallback(callback, null, r);
+ });
+}
+
+define.classMethod('save', {callback: true, promise:true});
+
+/**
+ * The callback format for results
+ * @callback Collection~resultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {object} result The result object if the command was executed successfully.
+ */
+
+/**
+ * Fetches the first document that matches the query
+ * @method
+ * @param {object} query Query for find Operation
+ * @param {object} [options=null] Optional settings.
+ * @param {number} [options.limit=0] Sets the limit of documents returned in the query.
+ * @param {(array|object)} [options.sort=null] Set to sort the documents coming back from the query. Array of indexes, [['a', 1]] etc.
+ * @param {object} [options.fields=null] The fields to return in the query. Object of fields to include or exclude (not both), {'a':1}
+ * @param {number} [options.skip=0] Set to skip N documents ahead in your query (useful for pagination).
+ * @param {Object} [options.hint=null] Tell the query to use specific indexes in the query. Object of indexes to use, {'_id':1}
+ * @param {boolean} [options.explain=false] Explain the query instead of returning the data.
+ * @param {boolean} [options.snapshot=false] Snapshot query.
+ * @param {boolean} [options.timeout=false] Specify if the cursor can timeout.
+ * @param {boolean} [options.tailable=false] Specify if the cursor is tailable.
+ * @param {number} [options.batchSize=0] Set the batchSize for the getMoreCommand when iterating over the query results.
+ * @param {boolean} [options.returnKey=false] Only return the index key.
+ * @param {number} [options.maxScan=null] Limit the number of items to scan.
+ * @param {number} [options.min=null] Set index bounds.
+ * @param {number} [options.max=null] Set index bounds.
+ * @param {boolean} [options.showDiskLoc=false] Show disk location of results.
+ * @param {string} [options.comment=null] You can put a $comment field on a query to make looking in the profiler logs simpler.
+ * @param {boolean} [options.raw=false] Return document results as raw BSON buffers.
+ * @param {boolean} [options.promoteLongs=true] Promotes Long values to number if they fit inside the 53 bits resolution.
+ * @param {boolean} [options.promoteValues=true] Promotes BSON values to native types where possible, set to false to only receive wrapper types.
+ * @param {boolean} [options.promoteBuffers=false] Promotes Binary BSON values to native Node Buffers.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {boolean} [options.partial=false] Specify if the cursor should return partial results when querying against a sharded system
+ * @param {number} [options.maxTimeMS=null] Number of miliseconds to wait before aborting the query.
+ * @param {object} [options.collation=null] Specify collation (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields).
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.findOne = function() {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 0);
+ var callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+
+ // Execute using callback
+ if(typeof callback == 'function') return findOne(self, args, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ findOne(self, args, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var findOne = function(self, args, callback) {
+ var cursor = self.find.apply(self, args).limit(-1).batchSize(1);
+ // Return the item
+ cursor.next(function(err, item) {
+ if(err != null) return handleCallback(callback, toError(err), null);
+ handleCallback(callback, null, item);
+ });
+}
+
+define.classMethod('findOne', {callback: true, promise:true});
+
+/**
+ * The callback format for the collection method, must be used if strict is specified
+ * @callback Collection~collectionResultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Collection} collection The collection instance.
+ */
+
+/**
+ * Rename the collection.
+ *
+ * @method
+ * @param {string} newName New name of of the collection.
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.dropTarget=false] Drop the target name collection if it previously exists.
+ * @param {Collection~collectionResultCallback} [callback] The results callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.rename = function(newName, opt, callback) {
+ var self = this;
+ if(typeof opt == 'function') callback = opt, opt = {};
+ opt = assign({}, opt, {readPreference: ReadPreference.PRIMARY});
+
+ // Execute using callback
+ if(typeof callback == 'function') return rename(self, newName, opt, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ rename(self, newName, opt, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var rename = function(self, newName, opt, callback) {
+ // Check the collection name
+ checkCollectionName(newName);
+ // Build the command
+ var renameCollection = f("%s.%s", self.s.dbName, self.s.name);
+ var toCollection = f("%s.%s", self.s.dbName, newName);
+ var dropTarget = typeof opt.dropTarget == 'boolean' ? opt.dropTarget : false;
+ var cmd = {'renameCollection':renameCollection, 'to':toCollection, 'dropTarget':dropTarget};
+
+ // Decorate command with writeConcern if supported
+ decorateWithWriteConcern(cmd, self, opt);
+
+ // Execute against admin
+ self.s.db.admin().command(cmd, opt, function(err, doc) {
+ if(err) return handleCallback(callback, err, null);
+ // We have an error
+ if(doc.errmsg) return handleCallback(callback, toError(doc), null);
+ try {
+ return handleCallback(callback, null, new Collection(self.s.db, self.s.topology, self.s.dbName, newName, self.s.pkFactory, self.s.options));
+ } catch(err) {
+ return handleCallback(callback, toError(err), null);
+ }
+ });
+}
+
+define.classMethod('rename', {callback: true, promise:true});
+
+/**
+ * Drop the collection from the database, removing it permanently. New accesses will create a new collection.
+ *
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {Collection~resultCallback} [callback] The results callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.drop = function(options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return self.s.db.dropCollection(self.s.name, options, callback);
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.s.db.dropCollection(self.s.name, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('drop', {callback: true, promise:true});
+
+/**
+ * Returns the options of the collection.
+ *
+ * @method
+ * @param {Collection~resultCallback} [callback] The results callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.options = function(callback) {
+ var self = this;
+
+ // Execute using callback
+ if(typeof callback == 'function') return options(self, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ options(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var options = function(self, callback) {
+ self.s.db.listCollections({name: self.s.name}).toArray(function(err, collections) {
+ if(err) return handleCallback(callback, err);
+ if(collections.length == 0) {
+ return handleCallback(callback, MongoError.create({message: f("collection %s not found", self.s.namespace), driver:true }));
+ }
+
+ handleCallback(callback, err, collections[0].options || null);
+ });
+}
+
+define.classMethod('options', {callback: true, promise:true});
+
+/**
+ * Returns if the collection is a capped collection
+ *
+ * @method
+ * @param {Collection~resultCallback} [callback] The results callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.isCapped = function(callback) {
+ var self = this;
+
+ // Execute using callback
+ if(typeof callback == 'function') return isCapped(self, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ isCapped(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var isCapped = function(self, callback) {
+ self.options(function(err, document) {
+ if(err) return handleCallback(callback, err);
+ handleCallback(callback, null, document && document.capped);
+ });
+}
+
+define.classMethod('isCapped', {callback: true, promise:true});
+
+/**
+ * Creates an index on the db and collection collection.
+ * @method
+ * @param {(string|object)} fieldOrSpec Defines the index.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.unique=false] Creates an unique index.
+ * @param {boolean} [options.sparse=false] Creates a sparse index.
+ * @param {boolean} [options.background=false] Creates the index in the background, yielding whenever possible.
+ * @param {boolean} [options.dropDups=false] A unique index cannot be created on a key that has pre-existing duplicate values. If you would like to create the index anyway, keeping the first document the database indexes and deleting all subsequent documents that have duplicate value
+ * @param {number} [options.min=null] For geospatial indexes set the lower bound for the co-ordinates.
+ * @param {number} [options.max=null] For geospatial indexes set the high bound for the co-ordinates.
+ * @param {number} [options.v=null] Specify the format version of the indexes.
+ * @param {number} [options.expireAfterSeconds=null] Allows you to expire data on indexes applied to a data (MongoDB 2.2 or higher)
+ * @param {number} [options.name=null] Override the autogenerated index name (useful if the resulting name is larger than 128 bytes)
+ * @param {object} [options.collation=null] Specify collation (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields).
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.createIndex = function(fieldOrSpec, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ options = args.length ? args.shift() || {} : {};
+ options = typeof callback === 'function' ? options : callback;
+ options = options == null ? {} : options;
+
+ // Execute using callback
+ if(typeof callback == 'function') return createIndex(self, fieldOrSpec, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ createIndex(self, fieldOrSpec, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var createIndex = function(self, fieldOrSpec, options, callback) {
+ self.s.db.createIndex(self.s.name, fieldOrSpec, options, callback);
+}
+
+define.classMethod('createIndex', {callback: true, promise:true});
+
+/**
+ * Creates multiple indexes in the collection, this method is only supported for
+ * MongoDB 2.6 or higher. Earlier version of MongoDB will throw a command not supported
+ * error. Index specifications are defined at http://docs.mongodb.org/manual/reference/command/createIndexes/.
+ * @method
+ * @param {array} indexSpecs An array of index specifications to be created
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.createIndexes = function(indexSpecs, callback) {
+ var self = this;
+
+ // Execute using callback
+ if(typeof callback == 'function') return createIndexes(self, indexSpecs, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ createIndexes(self, indexSpecs, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var createIndexes = function(self, indexSpecs, callback) {
+ var capabilities = self.s.topology.capabilities();
+
+ // Ensure we generate the correct name if the parameter is not set
+ for(var i = 0; i < indexSpecs.length; i++) {
+ if(indexSpecs[i].name == null) {
+ var keys = [];
+
+ // Did the user pass in a collation, check if our write server supports it
+ if(indexSpecs[i].collation && capabilities && !capabilities.commandsTakeCollation) {
+ return callback(new MongoError(f('server/primary/mongos does not support collation')));
+ }
+
+ for(var name in indexSpecs[i].key) {
+ keys.push(f('%s_%s', name, indexSpecs[i].key[name]));
+ }
+
+ // Set the name
+ indexSpecs[i].name = keys.join('_');
+ }
+ }
+
+ // Execute the index
+ self.s.db.command({
+ createIndexes: self.s.name, indexes: indexSpecs
+ }, { readPreference: ReadPreference.PRIMARY }, callback);
+}
+
+define.classMethod('createIndexes', {callback: true, promise:true});
+
+/**
+ * Drops an index from this collection.
+ * @method
+ * @param {string} indexName Name of the index to drop.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.dropIndex = function(indexName, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ options = args.length ? args.shift() || {} : {};
+ // Run only against primary
+ options.readPreference = ReadPreference.PRIMARY;
+
+ // Execute using callback
+ if(typeof callback == 'function') return dropIndex(self, indexName, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ dropIndex(self, indexName, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var dropIndex = function(self, indexName, options, callback) {
+ // Delete index command
+ var cmd = {'dropIndexes':self.s.name, 'index':indexName};
+
+ // Decorate command with writeConcern if supported
+ decorateWithWriteConcern(cmd, self, options);
+
+ // Execute command
+ self.s.db.command(cmd, options, function(err, result) {
+ if(typeof callback != 'function') return;
+ if(err) return handleCallback(callback, err, null);
+ handleCallback(callback, null, result);
+ });
+}
+
+define.classMethod('dropIndex', {callback: true, promise:true});
+
+/**
+ * Drops all indexes from this collection.
+ * @method
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.dropIndexes = function(options, callback) {
+ var self = this;
+
+ // Do we have options
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return dropIndexes(self, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ dropIndexes(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var dropIndexes = function(self, options, callback) {
+ self.dropIndex('*', options, function(err, result) {
+ if(err) return handleCallback(callback, err, false);
+ handleCallback(callback, null, true);
+ });
+}
+
+define.classMethod('dropIndexes', {callback: true, promise:true});
+
+/**
+ * Drops all indexes from this collection.
+ * @method
+ * @deprecated use dropIndexes
+ * @param {Collection~resultCallback} callback The command result callback
+ * @return {Promise} returns Promise if no [callback] passed
+ */
+Collection.prototype.dropAllIndexes = Collection.prototype.dropIndexes;
+
+define.classMethod('dropAllIndexes', {callback: true, promise:true});
+
+/**
+ * Reindex all indexes on the collection
+ * Warning: reIndex is a blocking operation (indexes are rebuilt in the foreground) and will be slow for large collections.
+ * @method
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.reIndex = function(options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return reIndex(self, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ reIndex(self, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var reIndex = function(self, options, callback) {
+ // Reindex
+ var cmd = {'reIndex':self.s.name};
+
+ // Decorate command with writeConcern if supported
+ decorateWithWriteConcern(cmd, self, options);
+
+ // Execute the command
+ self.s.db.command(cmd, options, function(err, result) {
+ if(callback == null) return;
+ if(err) return handleCallback(callback, err, null);
+ handleCallback(callback, null, result.ok ? true : false);
+ });
+}
+
+define.classMethod('reIndex', {callback: true, promise:true});
+
+/**
+ * Get the list of all indexes information for the collection.
+ *
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {number} [options.batchSize=null] The batchSize for the returned command cursor or if pre 2.8 the systems batch collection
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @return {CommandCursor}
+ */
+Collection.prototype.listIndexes = function(options) {
+ options = options || {};
+ // Clone the options
+ options = shallowClone(options);
+ // Determine the read preference in the options.
+ options = getReadPreference(this, options, this.s.db, this);
+ // Set the CommandCursor constructor
+ options.cursorFactory = CommandCursor;
+ // Set the promiseLibrary
+ options.promiseLibrary = this.s.promiseLibrary;
+
+ if(!this.s.topology.capabilities()) {
+ throw new MongoError('cannot connect to server');
+ }
+
+ // We have a list collections command
+ if(this.s.topology.capabilities().hasListIndexesCommand) {
+ // Cursor options
+ var cursor = options.batchSize ? {batchSize: options.batchSize} : {}
+ // Build the command
+ var command = { listIndexes: this.s.name, cursor: cursor };
+ // Execute the cursor
+ var cursor = this.s.topology.cursor(f('%s.$cmd', this.s.dbName), command, options);
+ // Do we have a readPreference, apply it
+ if(options.readPreference) cursor.setReadPreference(options.readPreference);
+ // Return the cursor
+ return cursor;
+ }
+
+ // Get the namespace
+ var ns = f('%s.system.indexes', this.s.dbName);
+ // Get the query
+ var cursor = this.s.topology.cursor(ns, {find: ns, query: {ns: this.s.namespace}}, options);
+ // Do we have a readPreference, apply it
+ if(options.readPreference) cursor.setReadPreference(options.readPreference);
+ // Set the passed in batch size if one was provided
+ if(options.batchSize) cursor = cursor.batchSize(options.batchSize);
+ // Return the cursor
+ return cursor;
+};
+
+define.classMethod('listIndexes', {callback: false, promise:false, returns: [CommandCursor]});
+
+/**
+ * Ensures that an index exists, if it does not it creates it
+ * @method
+ * @deprecated use createIndexes instead
+ * @param {(string|object)} fieldOrSpec Defines the index.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.unique=false] Creates an unique index.
+ * @param {boolean} [options.sparse=false] Creates a sparse index.
+ * @param {boolean} [options.background=false] Creates the index in the background, yielding whenever possible.
+ * @param {boolean} [options.dropDups=false] A unique index cannot be created on a key that has pre-existing duplicate values. If you would like to create the index anyway, keeping the first document the database indexes and deleting all subsequent documents that have duplicate value
+ * @param {number} [options.min=null] For geospatial indexes set the lower bound for the co-ordinates.
+ * @param {number} [options.max=null] For geospatial indexes set the high bound for the co-ordinates.
+ * @param {number} [options.v=null] Specify the format version of the indexes.
+ * @param {number} [options.expireAfterSeconds=null] Allows you to expire data on indexes applied to a data (MongoDB 2.2 or higher)
+ * @param {number} [options.name=null] Override the autogenerated index name (useful if the resulting name is larger than 128 bytes)
+ * @param {object} [options.collation=null] Specify collation (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields).
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.ensureIndex = function(fieldOrSpec, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return ensureIndex(self, fieldOrSpec, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ ensureIndex(self, fieldOrSpec, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var ensureIndex = function(self, fieldOrSpec, options, callback) {
+ self.s.db.ensureIndex(self.s.name, fieldOrSpec, options, callback);
+}
+
+define.classMethod('ensureIndex', {callback: true, promise:true});
+
+/**
+ * Checks if one or more indexes exist on the collection, fails on first non-existing index
+ * @method
+ * @param {(string|array)} indexes One or more index names to check.
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.indexExists = function(indexes, callback) {
+ var self = this;
+
+ // Execute using callback
+ if(typeof callback == 'function') return indexExists(self, indexes, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ indexExists(self, indexes, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var indexExists = function(self, indexes, callback) {
+ self.indexInformation(function(err, indexInformation) {
+ // If we have an error return
+ if(err != null) return handleCallback(callback, err, null);
+ // Let's check for the index names
+ if(!Array.isArray(indexes)) return handleCallback(callback, null, indexInformation[indexes] != null);
+ // Check in list of indexes
+ for(var i = 0; i < indexes.length; i++) {
+ if(indexInformation[indexes[i]] == null) {
+ return handleCallback(callback, null, false);
+ }
+ }
+
+ // All keys found return true
+ return handleCallback(callback, null, true);
+ });
+}
+
+define.classMethod('indexExists', {callback: true, promise:true});
+
+/**
+ * Retrieves this collections index info.
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.full=false] Returns the full raw index information.
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.indexInformation = function(options, callback) {
+ var self = this;
+ // Unpack calls
+ var args = Array.prototype.slice.call(arguments, 0);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ options = args.length ? args.shift() || {} : {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return indexInformation(self, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ indexInformation(self, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var indexInformation = function(self, options, callback) {
+ self.s.db.indexInformation(self.s.name, options, callback);
+}
+
+define.classMethod('indexInformation', {callback: true, promise:true});
+
+/**
+ * The callback format for results
+ * @callback Collection~countCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {number} result The count of documents that matched the query.
+ */
+
+/**
+ * Count number of matching documents in the db to a query.
+ * @method
+ * @param {object} query The query for the count.
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.limit=null] The limit of documents to count.
+ * @param {boolean} [options.skip=null] The number of documents to skip for the count.
+ * @param {string} [options.hint=null] An index name hint for the query.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {number} [options.maxTimeMS=null] Number of miliseconds to wait before aborting the query.
+ * @param {Collection~countCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.count = function(query, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 0);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ var queryOption = args.length ? args.shift() || {} : {};
+ var optionsOption = args.length ? args.shift() || {} : {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return count(self, queryOption, optionsOption, callback);
+
+ // Check if query is empty
+ query = query || {};
+ options = options || {};
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ count(self, query, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var count = function(self, query, options, callback) {
+ var skip = options.skip;
+ var limit = options.limit;
+ var hint = options.hint;
+ var maxTimeMS = options.maxTimeMS;
+
+ // Final query
+ var cmd = {
+ 'count': self.s.name, 'query': query
+ };
+
+ // Add limit, skip and maxTimeMS if defined
+ if(typeof skip == 'number') cmd.skip = skip;
+ if(typeof limit == 'number') cmd.limit = limit;
+ if(typeof maxTimeMS == 'number') cmd.maxTimeMS = maxTimeMS;
+ if(hint) options.hint = hint;
+
+ options = shallowClone(options);
+ // Ensure we have the right read preference inheritance
+ options = getReadPreference(self, options, self.s.db, self);
+
+ // Do we have a readConcern specified
+ if(self.s.readConcern) {
+ cmd.readConcern = self.s.readConcern;
+ }
+
+ // Have we specified collation
+ decorateWithCollation(cmd, self, options);
+
+ // Execute command
+ self.s.db.command(cmd, options, function(err, result) {
+ if(err) return handleCallback(callback, err);
+ handleCallback(callback, null, result.n);
+ });
+}
+
+define.classMethod('count', {callback: true, promise:true});
+
+/**
+ * The distinct command returns returns a list of distinct values for the given key across a collection.
+ * @method
+ * @param {string} key Field of the document to find distinct values for.
+ * @param {object} query The query for filtering the set of documents to which we apply the distinct filter.
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {number} [options.maxTimeMS=null] Number of miliseconds to wait before aborting the query.
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.distinct = function(key, query, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ var queryOption = args.length ? args.shift() || {} : {};
+ var optionsOption = args.length ? args.shift() || {} : {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return distinct(self, key, queryOption, optionsOption, callback);
+
+ // Ensure the query and options are set
+ query = query || {};
+ options = options || {};
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ distinct(self, key, query, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var distinct = function(self, key, query, options, callback) {
+ // maxTimeMS option
+ var maxTimeMS = options.maxTimeMS;
+
+ // Distinct command
+ var cmd = {
+ 'distinct': self.s.name, 'key': key, 'query': query
+ };
+
+ options = shallowClone(options);
+ // Ensure we have the right read preference inheritance
+ options = getReadPreference(self, options, self.s.db, self);
+
+ // Add maxTimeMS if defined
+ if(typeof maxTimeMS == 'number')
+ cmd.maxTimeMS = maxTimeMS;
+
+ // Do we have a readConcern specified
+ if(self.s.readConcern) {
+ cmd.readConcern = self.s.readConcern;
+ }
+
+ // Have we specified collation
+ decorateWithCollation(cmd, self, options);
+
+ // Execute the command
+ self.s.db.command(cmd, options, function(err, result) {
+ if(err) return handleCallback(callback, err);
+ handleCallback(callback, null, result.values);
+ });
+}
+
+define.classMethod('distinct', {callback: true, promise:true});
+
+/**
+ * Retrieve all the indexes on the collection.
+ * @method
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.indexes = function(callback) {
+ var self = this;
+ // Execute using callback
+ if(typeof callback == 'function') return indexes(self, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ indexes(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var indexes = function(self, callback) {
+ self.s.db.indexInformation(self.s.name, {full:true}, callback);
+}
+
+define.classMethod('indexes', {callback: true, promise:true});
+
+/**
+ * Get all the collection statistics.
+ *
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {number} [options.scale=null] Divide the returned sizes by scale value.
+ * @param {Collection~resultCallback} [callback] The collection result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.stats = function(options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 0);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ // Fetch all commands
+ options = args.length ? args.shift() || {} : {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return stats(self, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ stats(self, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var stats = function(self, options, callback) {
+ // Build command object
+ var commandObject = {
+ collStats:self.s.name
+ }
+
+ // Check if we have the scale value
+ if(options['scale'] != null) commandObject['scale'] = options['scale'];
+
+ options = shallowClone(options);
+ // Ensure we have the right read preference inheritance
+ options = getReadPreference(self, options, self.s.db, self);
+
+ // Execute the command
+ self.s.db.command(commandObject, options, callback);
+}
+
+define.classMethod('stats', {callback: true, promise:true});
+
+/**
+ * @typedef {Object} Collection~findAndModifyWriteOpResult
+ * @property {object} value Document returned from findAndModify command.
+ * @property {object} lastErrorObject The raw lastErrorObject returned from the command.
+ * @property {Number} ok Is 1 if the command executed correctly.
+ */
+
+/**
+ * The callback format for inserts
+ * @callback Collection~findAndModifyCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Collection~findAndModifyWriteOpResult} result The result object if the command was executed successfully.
+ */
+
+/**
+ * Find a document and delete it in one atomic operation, requires a write lock for the duration of the operation.
+ *
+ * @method
+ * @param {object} filter Document selection filter.
+ * @param {object} [options=null] Optional settings.
+ * @param {object} [options.projection=null] Limits the fields to return for all matching documents.
+ * @param {object} [options.sort=null] Determines which document the operation modifies if the query selects multiple documents.
+ * @param {number} [options.maxTimeMS=null] The maximum amount of time to allow the query to run.
+ * @param {Collection~findAndModifyCallback} [callback] The collection result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.findOneAndDelete = function(filter, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // Basic validation
+ if(filter == null || typeof filter != 'object') throw toError('filter parameter must be an object');
+
+ // Execute using callback
+ if(typeof callback == 'function') return findOneAndDelete(self, filter, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ options = options || {};
+
+ findOneAndDelete(self, filter, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var findOneAndDelete = function(self, filter, options, callback) {
+ // Final options
+ var finalOptions = shallowClone(options);
+ finalOptions['fields'] = options.projection;
+ finalOptions['remove'] = true;
+ // Execute find and Modify
+ self.findAndModify(
+ filter
+ , options.sort
+ , null
+ , finalOptions
+ , callback
+ );
+}
+
+define.classMethod('findOneAndDelete', {callback: true, promise:true});
+
+/**
+ * Find a document and replace it in one atomic operation, requires a write lock for the duration of the operation.
+ *
+ * @method
+ * @param {object} filter Document selection filter.
+ * @param {object} replacement Document replacing the matching document.
+ * @param {object} [options=null] Optional settings.
+ * @param {object} [options.projection=null] Limits the fields to return for all matching documents.
+ * @param {object} [options.sort=null] Determines which document the operation modifies if the query selects multiple documents.
+ * @param {number} [options.maxTimeMS=null] The maximum amount of time to allow the query to run.
+ * @param {boolean} [options.upsert=false] Upsert the document if it does not exist.
+ * @param {boolean} [options.returnOriginal=true] When false, returns the updated document rather than the original. The default is true.
+ * @param {Collection~findAndModifyCallback} [callback] The collection result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.findOneAndReplace = function(filter, replacement, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // Basic validation
+ if(filter == null || typeof filter != 'object') throw toError('filter parameter must be an object');
+ if(replacement == null || typeof replacement != 'object') throw toError('replacement parameter must be an object');
+
+ // Execute using callback
+ if(typeof callback == 'function') return findOneAndReplace(self, filter, replacement, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ options = options || {};
+
+ findOneAndReplace(self, filter, replacement, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var findOneAndReplace = function(self, filter, replacement, options, callback) {
+ // Final options
+ var finalOptions = shallowClone(options);
+ finalOptions['fields'] = options.projection;
+ finalOptions['update'] = true;
+ finalOptions['new'] = typeof options.returnOriginal == 'boolean' ? !options.returnOriginal : false;
+ finalOptions['upsert'] = typeof options.upsert == 'boolean' ? options.upsert : false;
+
+ // Execute findAndModify
+ self.findAndModify(
+ filter
+ , options.sort
+ , replacement
+ , finalOptions
+ , callback
+ );
+}
+
+define.classMethod('findOneAndReplace', {callback: true, promise:true});
+
+/**
+ * Find a document and update it in one atomic operation, requires a write lock for the duration of the operation.
+ *
+ * @method
+ * @param {object} filter Document selection filter.
+ * @param {object} update Update operations to be performed on the document
+ * @param {object} [options=null] Optional settings.
+ * @param {object} [options.projection=null] Limits the fields to return for all matching documents.
+ * @param {object} [options.sort=null] Determines which document the operation modifies if the query selects multiple documents.
+ * @param {number} [options.maxTimeMS=null] The maximum amount of time to allow the query to run.
+ * @param {boolean} [options.upsert=false] Upsert the document if it does not exist.
+ * @param {boolean} [options.returnOriginal=true] When false, returns the updated document rather than the original. The default is true.
+ * @param {Collection~findAndModifyCallback} [callback] The collection result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.findOneAndUpdate = function(filter, update, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // Basic validation
+ if(filter == null || typeof filter != 'object') throw toError('filter parameter must be an object');
+ if(update == null || typeof update != 'object') throw toError('update parameter must be an object');
+
+ // Execute using callback
+ if(typeof callback == 'function') return findOneAndUpdate(self, filter, update, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ options = options || {};
+
+ findOneAndUpdate(self, filter, update, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var findOneAndUpdate = function(self, filter, update, options, callback) {
+ // Final options
+ var finalOptions = shallowClone(options);
+ finalOptions['fields'] = options.projection;
+ finalOptions['update'] = true;
+ finalOptions['new'] = typeof options.returnOriginal == 'boolean' ? !options.returnOriginal : false;
+ finalOptions['upsert'] = typeof options.upsert == 'boolean' ? options.upsert : false;
+
+ // Execute findAndModify
+ self.findAndModify(
+ filter
+ , options.sort
+ , update
+ , finalOptions
+ , callback
+ );
+}
+
+define.classMethod('findOneAndUpdate', {callback: true, promise:true});
+
+/**
+ * Find and update a document.
+ * @method
+ * @param {object} query Query object to locate the object to modify.
+ * @param {array} sort If multiple docs match, choose the first one in the specified sort order as the object to manipulate.
+ * @param {object} doc The fields/vals to be updated.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.remove=false] Set to true to remove the object before returning.
+ * @param {boolean} [options.upsert=false] Perform an upsert operation.
+ * @param {boolean} [options.new=false] Set to true if you want to return the modified object rather than the original. Ignored for remove.
+ * @param {object} [options.fields=null] Object containing the field projection for the result returned from the operation.
+ * @param {Collection~findAndModifyCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated use findOneAndUpdate, findOneAndReplace or findOneAndDelete instead
+ */
+Collection.prototype.findAndModify = function(query, sort, doc, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ sort = args.length ? args.shift() || [] : [];
+ doc = args.length ? args.shift() : null;
+ options = args.length ? args.shift() || {} : {};
+
+ // Clone options
+ var options = shallowClone(options);
+ // Force read preference primary
+ options.readPreference = ReadPreference.PRIMARY;
+
+ // Execute using callback
+ if(typeof callback == 'function') return findAndModify(self, query, sort, doc, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ options = options || {};
+
+ findAndModify(self, query, sort, doc, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var findAndModify = function(self, query, sort, doc, options, callback) {
+ // Create findAndModify command object
+ var queryObject = {
+ 'findandmodify': self.s.name
+ , 'query': query
+ };
+
+ sort = formattedOrderClause(sort);
+ if(sort) {
+ queryObject.sort = sort;
+ }
+
+ queryObject.new = options.new ? true : false;
+ queryObject.remove = options.remove ? true : false;
+ queryObject.upsert = options.upsert ? true : false;
+
+ if(options.fields) {
+ queryObject.fields = options.fields;
+ }
+
+ if(doc && !options.remove) {
+ queryObject.update = doc;
+ }
+
+ if(options.maxTimeMS)
+ queryObject.maxTimeMS = options.maxTimeMS;
+
+ // Either use override on the function, or go back to default on either the collection
+ // level or db
+ if(options['serializeFunctions'] != null) {
+ options['serializeFunctions'] = options['serializeFunctions'];
+ } else {
+ options['serializeFunctions'] = self.s.serializeFunctions;
+ }
+
+ // No check on the documents
+ options.checkKeys = false;
+
+ // Get the write concern settings
+ var finalOptions = writeConcern(options, self.s.db, self, options);
+
+ // Decorate the findAndModify command with the write Concern
+ if(finalOptions.writeConcern) {
+ queryObject.writeConcern = finalOptions.writeConcern;
+ }
+
+ // Have we specified bypassDocumentValidation
+ if(typeof finalOptions.bypassDocumentValidation == 'boolean') {
+ queryObject.bypassDocumentValidation = finalOptions.bypassDocumentValidation;
+ }
+
+ // Have we specified collation
+ decorateWithCollation(queryObject, self, options);
+
+ // Execute the command
+ self.s.db.command(queryObject
+ , options, function(err, result) {
+ if(err) return handleCallback(callback, err, null);
+ return handleCallback(callback, null, result);
+ });
+}
+
+define.classMethod('findAndModify', {callback: true, promise:true});
+
+/**
+ * Find and remove a document.
+ * @method
+ * @param {object} query Query object to locate the object to modify.
+ * @param {array} sort If multiple docs match, choose the first one in the specified sort order as the object to manipulate.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated use findOneAndDelete instead
+ */
+Collection.prototype.findAndRemove = function(query, sort, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ sort = args.length ? args.shift() || [] : [];
+ options = args.length ? args.shift() || {} : {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return findAndRemove(self, query, sort, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ findAndRemove(self, query, sort, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var findAndRemove = function(self, query, sort, options, callback) {
+ // Add the remove option
+ options['remove'] = true;
+ // Execute the callback
+ self.findAndModify(query, sort, null, options, callback);
+}
+
+define.classMethod('findAndRemove', {callback: true, promise:true});
+
+function decorateWithWriteConcern(command, self, options) {
+ // Do we support collation 3.4 and higher
+ var capabilities = self.s.topology.capabilities();
+ // Do we support write concerns 3.4 and higher
+ if(capabilities && capabilities.commandsTakeWriteConcern) {
+ // Get the write concern settings
+ var finalOptions = writeConcern(shallowClone(options), self.s.db, self, options);
+ // Add the write concern to the command
+ if(finalOptions.writeConcern) {
+ command.writeConcern = finalOptions.writeConcern;
+ }
+ }
+}
+
+function decorateWithCollation(command, self, options) {
+ // Do we support collation 3.4 and higher
+ var capabilities = self.s.topology.capabilities();
+ // Do we support write concerns 3.4 and higher
+ if(capabilities && capabilities.commandsTakeCollation) {
+ if(options.collation && typeof options.collation == 'object') {
+ command.collation = options.collation;
+ }
+ }
+}
+
+/**
+ * Execute an aggregation framework pipeline against the collection, needs MongoDB >= 2.2
+ * @method
+ * @param {object} pipeline Array containing all the aggregation framework commands for the execution.
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {object} [options.cursor=null] Return the query as cursor, on 2.6 > it returns as a real cursor on pre 2.6 it returns as an emulated cursor.
+ * @param {number} [options.cursor.batchSize=null] The batchSize for the cursor
+ * @param {boolean} [options.explain=false] Explain returns the aggregation execution plan (requires mongodb 2.6 >).
+ * @param {boolean} [options.allowDiskUse=false] allowDiskUse lets the server know if it can use disk to store temporary results for the aggregation (requires mongodb 2.6 >).
+ * @param {number} [options.maxTimeMS=null] maxTimeMS specifies a cumulative time limit in milliseconds for processing operations on the cursor. MongoDB interrupts the operation at the earliest following interrupt point.
+ * @param {boolean} [options.bypassDocumentValidation=false] Allow driver to bypass schema validation in MongoDB 3.2 or higher.
+ * @param {boolean} [options.raw=false] Return document results as raw BSON buffers.
+ * @param {boolean} [options.promoteLongs=true] Promotes Long values to number if they fit inside the 53 bits resolution.
+ * @param {boolean} [options.promoteValues=true] Promotes BSON values to native types where possible, set to false to only receive wrapper types.
+ * @param {boolean} [options.promoteBuffers=false] Promotes Binary BSON values to native Node Buffers.
+ * @param {object} [options.collation=null] Specify collation (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields).
+ * @param {Collection~resultCallback} callback The command result callback
+ * @return {(null|AggregationCursor)}
+ */
+Collection.prototype.aggregate = function(pipeline, options, callback) {
+ var self = this;
+
+ if(Array.isArray(pipeline)) {
+ // Set up callback if one is provided
+ if(typeof options == 'function') {
+ callback = options;
+ options = {};
+ }
+
+ // If we have no options or callback we are doing
+ // a cursor based aggregation
+ if(options == null && callback == null) {
+ options = {};
+ }
+ } else {
+ // Aggregation pipeline passed as arguments on the method
+ var args = Array.prototype.slice.call(arguments, 0);
+ // Get the callback
+ callback = args.pop();
+ // Get the possible options object
+ var opts = args[args.length - 1];
+ // If it contains any of the admissible options pop it of the args
+ options = opts && (opts.readPreference
+ || opts.explain || opts.cursor || opts.out
+ || opts.maxTimeMS || opts.allowDiskUse) ? args.pop() : {};
+ // Left over arguments is the pipeline
+ pipeline = args;
+ }
+
+ // Ignore readConcern option
+ var ignoreReadConcern = false;
+
+ // Build the command
+ var command = { aggregate : this.s.name, pipeline : pipeline};
+
+ // If out was specified
+ if(typeof options.out == 'string') {
+ pipeline.push({$out: options.out});
+ // Ignore read concern
+ ignoreReadConcern = true;
+ } else if(pipeline.length > 0 && pipeline[pipeline.length - 1]['$out']) {
+ ignoreReadConcern = true;
+ }
+
+ // Decorate command with writeConcern if out has been specified
+ if(pipeline.length > 0 && pipeline[pipeline.length - 1]['$out']) {
+ decorateWithWriteConcern(command, self, options);
+ }
+
+ // Have we specified collation
+ decorateWithCollation(command, self, options);
+
+ // If we have bypassDocumentValidation set
+ if(typeof options.bypassDocumentValidation == 'boolean') {
+ command.bypassDocumentValidation = options.bypassDocumentValidation;
+ }
+
+ // Do we have a readConcern specified
+ if(!ignoreReadConcern && this.s.readConcern) {
+ command.readConcern = this.s.readConcern;
+ }
+
+ // If we have allowDiskUse defined
+ if(options.allowDiskUse) command.allowDiskUse = options.allowDiskUse;
+ if(typeof options.maxTimeMS == 'number') command.maxTimeMS = options.maxTimeMS;
+
+ options = shallowClone(options);
+ // Ensure we have the right read preference inheritance
+ options = getReadPreference(this, options, this.s.db, this);
+
+ // If explain has been specified add it
+ if(options.explain) command.explain = options.explain;
+
+ // Validate that cursor options is valid
+ if(options.cursor != null && typeof options.cursor != 'object') {
+ throw toError('cursor options must be an object');
+ }
+
+ // promiseLibrary
+ options.promiseLibrary = this.s.promiseLibrary;
+
+ // Set the AggregationCursor constructor
+ options.cursorFactory = AggregationCursor;
+ if(typeof callback != 'function') {
+ if(!this.s.topology.capabilities()) {
+ throw new MongoError('cannot connect to server');
+ }
+
+ if(this.s.topology.capabilities().hasAggregationCursor) {
+ options.cursor = options.cursor || { batchSize : 1000 };
+ command.cursor = options.cursor;
+ }
+
+ // Allow disk usage command
+ if(typeof options.allowDiskUse == 'boolean') command.allowDiskUse = options.allowDiskUse;
+ if(typeof options.maxTimeMS == 'number') command.maxTimeMS = options.maxTimeMS;
+
+ // Execute the cursor
+ return this.s.topology.cursor(this.s.namespace, command, options);
+ }
+
+ var cursor = null;
+ // We do not allow cursor
+ if(options.cursor) {
+ return this.s.topology.cursor(this.s.namespace, command, options);
+ }
+
+ // Execute the command
+ this.s.db.command(command, options, function(err, result) {
+ if(err) {
+ handleCallback(callback, err);
+ } else if(result['err'] || result['errmsg']) {
+ handleCallback(callback, toError(result));
+ } else if(typeof result == 'object' && result['serverPipeline']) {
+ handleCallback(callback, null, result['serverPipeline']);
+ } else if(typeof result == 'object' && result['stages']) {
+ handleCallback(callback, null, result['stages']);
+ } else {
+ handleCallback(callback, null, result.result);
+ }
+ });
+}
+
+define.classMethod('aggregate', {callback: true, promise:false});
+
+/**
+ * The callback format for results
+ * @callback Collection~parallelCollectionScanCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Cursor[]} cursors A list of cursors returned allowing for parallel reading of collection.
+ */
+
+/**
+ * Return N number of parallel cursors for a collection allowing parallel reading of entire collection. There are
+ * no ordering guarantees for returned results.
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {number} [options.batchSize=null] Set the batchSize for the getMoreCommand when iterating over the query results.
+ * @param {number} [options.numCursors=1] The maximum number of parallel command cursors to return (the number of returned cursors will be in the range 1:numCursors)
+ * @param {boolean} [options.raw=false] Return all BSON documents as Raw Buffer documents.
+ * @param {Collection~parallelCollectionScanCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.parallelCollectionScan = function(options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {numCursors: 1};
+ // Set number of cursors to 1
+ options.numCursors = options.numCursors || 1;
+ options.batchSize = options.batchSize || 1000;
+
+ options = shallowClone(options);
+ // Ensure we have the right read preference inheritance
+ options = getReadPreference(this, options, this.s.db, this);
+
+ // Add a promiseLibrary
+ options.promiseLibrary = this.s.promiseLibrary;
+
+ // Execute using callback
+ if(typeof callback == 'function') return parallelCollectionScan(self, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ parallelCollectionScan(self, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var parallelCollectionScan = function(self, options, callback) {
+ // Create command object
+ var commandObject = {
+ parallelCollectionScan: self.s.name
+ , numCursors: options.numCursors
+ }
+
+ // Do we have a readConcern specified
+ if(self.s.readConcern) {
+ commandObject.readConcern = self.s.readConcern;
+ }
+
+ // Store the raw value
+ var raw = options.raw;
+ delete options['raw'];
+
+ // Execute the command
+ self.s.db.command(commandObject, options, function(err, result) {
+ if(err) return handleCallback(callback, err, null);
+ if(result == null) return handleCallback(callback, new Error("no result returned for parallelCollectionScan"), null);
+
+ var cursors = [];
+ // Add the raw back to the option
+ if(raw) options.raw = raw;
+ // Create command cursors for each item
+ for(var i = 0; i < result.cursors.length; i++) {
+ var rawId = result.cursors[i].cursor.id
+ // Convert cursorId to Long if needed
+ var cursorId = typeof rawId == 'number' ? Long.fromNumber(rawId) : rawId;
+
+ // Command cursor options
+ var cmd = {
+ batchSize: options.batchSize
+ , cursorId: cursorId
+ , items: result.cursors[i].cursor.firstBatch
+ }
+
+ // Add a command cursor
+ cursors.push(self.s.topology.cursor(self.s.namespace, cursorId, options));
+ }
+
+ handleCallback(callback, null, cursors);
+ });
+}
+
+define.classMethod('parallelCollectionScan', {callback: true, promise:true});
+
+/**
+ * Execute the geoNear command to search for items in the collection
+ *
+ * @method
+ * @param {number} x Point to search on the x axis, ensure the indexes are ordered in the same order.
+ * @param {number} y Point to search on the y axis, ensure the indexes are ordered in the same order.
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {number} [options.num=null] Max number of results to return.
+ * @param {number} [options.minDistance=null] Include results starting at minDistance from a point (2.6 or higher)
+ * @param {number} [options.maxDistance=null] Include results up to maxDistance from the point.
+ * @param {number} [options.distanceMultiplier=null] Include a value to multiply the distances with allowing for range conversions.
+ * @param {object} [options.query=null] Filter the results by a query.
+ * @param {boolean} [options.spherical=false] Perform query using a spherical model.
+ * @param {boolean} [options.uniqueDocs=false] The closest location in a document to the center of the search region will always be returned MongoDB > 2.X.
+ * @param {boolean} [options.includeLocs=false] Include the location data fields in the top level of the results MongoDB > 2.X.
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.geoNear = function(x, y, options, callback) {
+ var self = this;
+ var point = typeof(x) == 'object' && x
+ , args = Array.prototype.slice.call(arguments, point?1:2);
+
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ // Fetch all commands
+ options = args.length ? args.shift() || {} : {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return geoNear(self, x, y, point, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ geoNear(self, x, y, point, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var geoNear = function(self, x, y, point, options, callback) {
+ // Build command object
+ var commandObject = {
+ geoNear:self.s.name,
+ near: point || [x, y]
+ }
+
+ options = shallowClone(options);
+ // Ensure we have the right read preference inheritance
+ options = getReadPreference(self, options, self.s.db, self);
+
+ // Exclude readPreference and existing options to prevent user from
+ // shooting themselves in the foot
+ var exclude = {
+ readPreference: true,
+ geoNear: true,
+ near: true
+ };
+
+ // Filter out any excluded objects
+ commandObject = decorateCommand(commandObject, options, exclude);
+
+ // Do we have a readConcern specified
+ if(self.s.readConcern) {
+ commandObject.readConcern = self.s.readConcern;
+ }
+
+ // Have we specified collation
+ decorateWithCollation(commandObject, self, options);
+
+ // Execute the command
+ self.s.db.command(commandObject, options, function (err, res) {
+ if(err) return handleCallback(callback, err);
+ if(res.err || res.errmsg) return handleCallback(callback, toError(res));
+ // should we only be returning res.results here? Not sure if the user
+ // should see the other return information
+ handleCallback(callback, null, res);
+ });
+}
+
+define.classMethod('geoNear', {callback: true, promise:true});
+
+/**
+ * Execute a geo search using a geo haystack index on a collection.
+ *
+ * @method
+ * @param {number} x Point to search on the x axis, ensure the indexes are ordered in the same order.
+ * @param {number} y Point to search on the y axis, ensure the indexes are ordered in the same order.
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {number} [options.maxDistance=null] Include results up to maxDistance from the point.
+ * @param {object} [options.search=null] Filter the results by a query.
+ * @param {number} [options.limit=false] Max number of results to return.
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.geoHaystackSearch = function(x, y, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 2);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ // Fetch all commands
+ options = args.length ? args.shift() || {} : {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return geoHaystackSearch(self, x, y, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ geoHaystackSearch(self, x, y, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var geoHaystackSearch = function(self, x, y, options, callback) {
+ // Build command object
+ var commandObject = {
+ geoSearch: self.s.name,
+ near: [x, y]
+ }
+
+ // Remove read preference from hash if it exists
+ commandObject = decorateCommand(commandObject, options, {readPreference: true});
+
+ options = shallowClone(options);
+ // Ensure we have the right read preference inheritance
+ options = getReadPreference(self, options, self.s.db, self);
+
+ // Do we have a readConcern specified
+ if(self.s.readConcern) {
+ commandObject.readConcern = self.s.readConcern;
+ }
+
+ // Execute the command
+ self.s.db.command(commandObject, options, function (err, res) {
+ if(err) return handleCallback(callback, err);
+ if(res.err || res.errmsg) handleCallback(callback, utils.toError(res));
+ // should we only be returning res.results here? Not sure if the user
+ // should see the other return information
+ handleCallback(callback, null, res);
+ });
+}
+
+define.classMethod('geoHaystackSearch', {callback: true, promise:true});
+
+/**
+ * Group function helper
+ * @ignore
+ */
+// var groupFunction = function () {
+// var c = db[ns].find(condition);
+// var map = new Map();
+// var reduce_function = reduce;
+//
+// while (c.hasNext()) {
+// var obj = c.next();
+// var key = {};
+//
+// for (var i = 0, len = keys.length; i < len; ++i) {
+// var k = keys[i];
+// key[k] = obj[k];
+// }
+//
+// var aggObj = map.get(key);
+//
+// if (aggObj == null) {
+// var newObj = Object.extend({}, key);
+// aggObj = Object.extend(newObj, initial);
+// map.put(key, aggObj);
+// }
+//
+// reduce_function(obj, aggObj);
+// }
+//
+// return { "result": map.values() };
+// }.toString();
+var groupFunction = 'function () {\nvar c = db[ns].find(condition);\nvar map = new Map();\nvar reduce_function = reduce;\n\nwhile (c.hasNext()) {\nvar obj = c.next();\nvar key = {};\n\nfor (var i = 0, len = keys.length; i < len; ++i) {\nvar k = keys[i];\nkey[k] = obj[k];\n}\n\nvar aggObj = map.get(key);\n\nif (aggObj == null) {\nvar newObj = Object.extend({}, key);\naggObj = Object.extend(newObj, initial);\nmap.put(key, aggObj);\n}\n\nreduce_function(obj, aggObj);\n}\n\nreturn { "result": map.values() };\n}';
+
+/**
+ * Run a group command across a collection
+ *
+ * @method
+ * @param {(object|array|function|code)} keys An object, array or function expressing the keys to group by.
+ * @param {object} condition An optional condition that must be true for a row to be considered.
+ * @param {object} initial Initial value of the aggregation counter object.
+ * @param {(function|Code)} reduce The reduce function aggregates (reduces) the objects iterated
+ * @param {(function|Code)} finalize An optional function to be run on each item in the result set just before the item is returned.
+ * @param {boolean} command Specify if you wish to run using the internal group command or using eval, default is true.
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.group = function(keys, condition, initial, reduce, finalize, command, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 3);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ // Fetch all commands
+ reduce = args.length ? args.shift() : null;
+ finalize = args.length ? args.shift() : null;
+ command = args.length ? args.shift() : null;
+ options = args.length ? args.shift() || {} : {};
+
+ // Make sure we are backward compatible
+ if(!(typeof finalize == 'function')) {
+ command = finalize;
+ finalize = null;
+ }
+
+ if (!Array.isArray(keys) && keys instanceof Object && typeof(keys) !== 'function' && !(keys instanceof Code)) {
+ keys = Object.keys(keys);
+ }
+
+ if(typeof reduce === 'function') {
+ reduce = reduce.toString();
+ }
+
+ if(typeof finalize === 'function') {
+ finalize = finalize.toString();
+ }
+
+ // Set up the command as default
+ command = command == null ? true : command;
+
+ // Execute using callback
+ if(typeof callback == 'function') return group(self, keys, condition, initial, reduce, finalize, command, options, callback);
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ group(self, keys, condition, initial, reduce, finalize, command, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var group = function(self, keys, condition, initial, reduce, finalize, command, options, callback) {
+ // Execute using the command
+ if(command) {
+ var reduceFunction = reduce instanceof Code
+ ? reduce
+ : new Code(reduce);
+
+ var selector = {
+ group: {
+ 'ns': self.s.name
+ , '$reduce': reduceFunction
+ , 'cond': condition
+ , 'initial': initial
+ , 'out': "inline"
+ }
+ };
+
+ // if finalize is defined
+ if(finalize != null) selector.group['finalize'] = finalize;
+ // Set up group selector
+ if ('function' === typeof keys || keys instanceof Code) {
+ selector.group.$keyf = keys instanceof Code
+ ? keys
+ : new Code(keys);
+ } else {
+ var hash = {};
+ keys.forEach(function (key) {
+ hash[key] = 1;
+ });
+ selector.group.key = hash;
+ }
+
+ options = shallowClone(options);
+ // Ensure we have the right read preference inheritance
+ options = getReadPreference(self, options, self.s.db, self);
+
+ // Do we have a readConcern specified
+ if(self.s.readConcern) {
+ selector.readConcern = self.s.readConcern;
+ }
+
+ // Have we specified collation
+ decorateWithCollation(selector, self, options);
+
+ // Execute command
+ self.s.db.command(selector, options, function(err, result) {
+ if(err) return handleCallback(callback, err, null);
+ handleCallback(callback, null, result.retval);
+ });
+ } else {
+ // Create execution scope
+ var scope = reduce != null && reduce instanceof Code
+ ? reduce.scope
+ : {};
+
+ scope.ns = self.s.name;
+ scope.keys = keys;
+ scope.condition = condition;
+ scope.initial = initial;
+
+ // Pass in the function text to execute within mongodb.
+ var groupfn = groupFunction.replace(/ reduce;/, reduce.toString() + ';');
+
+ self.s.db.eval(new Code(groupfn, scope), function (err, results) {
+ if (err) return handleCallback(callback, err, null);
+ handleCallback(callback, null, results.result || results);
+ });
+ }
+}
+
+define.classMethod('group', {callback: true, promise:true});
+
+/**
+ * Functions that are passed as scope args must
+ * be converted to Code instances.
+ * @ignore
+ */
+function processScope (scope) {
+ if(!isObject(scope) || scope instanceof ObjectID) {
+ return scope;
+ }
+
+ var keys = Object.keys(scope);
+ var i = keys.length;
+ var key;
+ var new_scope = {};
+
+ while (i--) {
+ key = keys[i];
+ if ('function' == typeof scope[key]) {
+ new_scope[key] = new Code(String(scope[key]));
+ } else {
+ new_scope[key] = processScope(scope[key]);
+ }
+ }
+
+ return new_scope;
+}
+
+/**
+ * Run Map Reduce across a collection. Be aware that the inline option for out will return an array of results not a collection.
+ *
+ * @method
+ * @param {(function|string)} map The mapping function.
+ * @param {(function|string)} reduce The reduce function.
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {object} [options.out=null] Sets the output target for the map reduce job. *{inline:1} | {replace:'collectionName'} | {merge:'collectionName'} | {reduce:'collectionName'}*
+ * @param {object} [options.query=null] Query filter object.
+ * @param {object} [options.sort=null] Sorts the input objects using this key. Useful for optimization, like sorting by the emit key for fewer reduces.
+ * @param {number} [options.limit=null] Number of objects to return from collection.
+ * @param {boolean} [options.keeptemp=false] Keep temporary data.
+ * @param {(function|string)} [options.finalize=null] Finalize function.
+ * @param {object} [options.scope=null] Can pass in variables that can be access from map/reduce/finalize.
+ * @param {boolean} [options.jsMode=false] It is possible to make the execution stay in JS. Provided in MongoDB > 2.0.X.
+ * @param {boolean} [options.verbose=false] Provide statistics on job execution time.
+ * @param {boolean} [options.bypassDocumentValidation=false] Allow driver to bypass schema validation in MongoDB 3.2 or higher.
+ * @param {Collection~resultCallback} [callback] The command result callback
+ * @throws {MongoError}
+ * @return {Promise} returns Promise if no callback passed
+ */
+Collection.prototype.mapReduce = function(map, reduce, options, callback) {
+ var self = this;
+ if('function' === typeof options) callback = options, options = {};
+ // Out must allways be defined (make sure we don't break weirdly on pre 1.8+ servers)
+ if(null == options.out) {
+ throw new Error("the out option parameter must be defined, see mongodb docs for possible values");
+ }
+
+ if('function' === typeof map) {
+ map = map.toString();
+ }
+
+ if('function' === typeof reduce) {
+ reduce = reduce.toString();
+ }
+
+ if('function' === typeof options.finalize) {
+ options.finalize = options.finalize.toString();
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return mapReduce(self, map, reduce, options, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ mapReduce(self, map, reduce, options, function(err, r, r1) {
+ if(err) return reject(err);
+ if(!r1) return resolve(r);
+ resolve({results: r, stats: r1});
+ });
+ });
+}
+
+var mapReduce = function(self, map, reduce, options, callback) {
+ var mapCommandHash = {
+ mapreduce: self.s.name
+ , map: map
+ , reduce: reduce
+ };
+
+ // Add any other options passed in
+ for(var n in options) {
+ if('scope' == n) {
+ mapCommandHash[n] = processScope(options[n]);
+ } else {
+ mapCommandHash[n] = options[n];
+ }
+ }
+
+ options = shallowClone(options);
+ // Ensure we have the right read preference inheritance
+ options = getReadPreference(self, options, self.s.db, self);
+
+ // If we have a read preference and inline is not set as output fail hard
+ if((options.readPreference != false && options.readPreference != 'primary')
+ && options['out'] && (options['out'].inline != 1 && options['out'] != 'inline')) {
+ // Force readPreference to primary
+ options.readPreference = 'primary';
+ // Decorate command with writeConcern if supported
+ decorateWithWriteConcern(mapCommandHash, self, options);
+ } else if(self.s.readConcern) {
+ mapCommandHash.readConcern = self.s.readConcern;
+ }
+
+ // Is bypassDocumentValidation specified
+ if(typeof options.bypassDocumentValidation == 'boolean') {
+ mapCommandHash.bypassDocumentValidation = options.bypassDocumentValidation;
+ }
+
+ // Have we specified collation
+ decorateWithCollation(mapCommandHash, self, options);
+
+ // Execute command
+ self.s.db.command(mapCommandHash, {readPreference:options.readPreference}, function (err, result) {
+ if(err) return handleCallback(callback, err);
+ // Check if we have an error
+ if(1 != result.ok || result.err || result.errmsg) {
+ return handleCallback(callback, toError(result));
+ }
+
+ // Create statistics value
+ var stats = {};
+ if(result.timeMillis) stats['processtime'] = result.timeMillis;
+ if(result.counts) stats['counts'] = result.counts;
+ if(result.timing) stats['timing'] = result.timing;
+
+ // invoked with inline?
+ if(result.results) {
+ // If we wish for no verbosity
+ if(options['verbose'] == null || !options['verbose']) {
+ return handleCallback(callback, null, result.results);
+ }
+
+ return handleCallback(callback, null, result.results, stats);
+ }
+
+ // The returned collection
+ var collection = null;
+
+ // If we have an object it's a different db
+ if(result.result != null && typeof result.result == 'object') {
+ var doc = result.result;
+ collection = self.s.db.db(doc.db).collection(doc.collection);
+ } else {
+ // Create a collection object that wraps the result collection
+ collection = self.s.db.collection(result.result)
+ }
+
+ // If we wish for no verbosity
+ if(options['verbose'] == null || !options['verbose']) {
+ return handleCallback(callback, err, collection);
+ }
+
+ // Return stats as third set of values
+ handleCallback(callback, err, collection, stats);
+ });
+}
+
+define.classMethod('mapReduce', {callback: true, promise:true});
+
+/**
+ * Initiate a Out of order batch write operation. All operations will be buffered into insert/update/remove commands executed out of order.
+ *
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @return {UnorderedBulkOperation}
+ */
+Collection.prototype.initializeUnorderedBulkOp = function(options) {
+ options = options || {};
+ options.promiseLibrary = this.s.promiseLibrary;
+ return unordered(this.s.topology, this, options);
+}
+
+define.classMethod('initializeUnorderedBulkOp', {callback: false, promise:false, returns: [ordered.UnorderedBulkOperation]});
+
+/**
+ * Initiate an In order bulk write operation, operations will be serially executed in the order they are added, creating a new operation for each switch in types.
+ *
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {OrderedBulkOperation} callback The command result callback
+ * @return {null}
+ */
+Collection.prototype.initializeOrderedBulkOp = function(options) {
+ options = options || {};
+ options.promiseLibrary = this.s.promiseLibrary;
+ return ordered(this.s.topology, this, options);
+}
+
+define.classMethod('initializeOrderedBulkOp', {callback: false, promise:false, returns: [ordered.OrderedBulkOperation]});
+
+// Get write concern
+var writeConcern = function(target, db, col, options) {
+ if(options.w != null || options.j != null || options.fsync != null) {
+ var opts = {};
+ if(options.w != null) opts.w = options.w;
+ if(options.wtimeout != null) opts.wtimeout = options.wtimeout;
+ if(options.j != null) opts.j = options.j;
+ if(options.fsync != null) opts.fsync = options.fsync;
+ target.writeConcern = opts;
+ } else if(col.writeConcern.w != null || col.writeConcern.j != null || col.writeConcern.fsync != null) {
+ target.writeConcern = col.writeConcern;
+ } else if(db.writeConcern.w != null || db.writeConcern.j != null || db.writeConcern.fsync != null) {
+ target.writeConcern = db.writeConcern;
+ }
+
+ return target
+}
+
+// Figure out the read preference
+var getReadPreference = function(self, options, db, coll) {
+ var r = null
+ if(options.readPreference) {
+ r = options.readPreference
+ } else if(self.s.readPreference) {
+ r = self.s.readPreference
+ } else if(db.s.readPreference) {
+ r = db.s.readPreference;
+ }
+
+ if(r instanceof ReadPreference) {
+ options.readPreference = new CoreReadPreference(r.mode, r.tags, {maxStalenessMS: r.maxStalenessMS});
+ } else if(typeof r == 'string') {
+ options.readPreference = new CoreReadPreference(r);
+ } else if(r && !(r instanceof ReadPreference) && typeof r == 'object') {
+ var mode = r.mode || r.preference;
+ if (mode && typeof mode == 'string') {
+ options.readPreference = new CoreReadPreference(mode, r.tags, {maxStalenessMS: r.maxStalenessMS});
+ }
+ }
+
+ return options;
+}
+
+var testForFields = {
+ limit: 1, sort: 1, fields:1, skip: 1, hint: 1, explain: 1, snapshot: 1, timeout: 1, tailable: 1, tailableRetryInterval: 1
+ , numberOfRetries: 1, awaitdata: 1, awaitData: 1, exhaust: 1, batchSize: 1, returnKey: 1, maxScan: 1, min: 1, max: 1, showDiskLoc: 1
+ , comment: 1, raw: 1, readPreference: 1, partial: 1, read: 1, dbName: 1, oplogReplay: 1, connection: 1, maxTimeMS: 1, transforms: 1
+ , collation: 1
+}
+
+module.exports = Collection;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/command_cursor.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/command_cursor.js
new file mode 100644
index 0000000..c0d86ca
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/command_cursor.js
@@ -0,0 +1,320 @@
+"use strict";
+
+var inherits = require('util').inherits
+ , f = require('util').format
+ , toError = require('./utils').toError
+ , getSingleProperty = require('./utils').getSingleProperty
+ , formattedOrderClause = require('./utils').formattedOrderClause
+ , handleCallback = require('./utils').handleCallback
+ , Logger = require('mongodb-core').Logger
+ , EventEmitter = require('events').EventEmitter
+ , ReadPreference = require('./read_preference')
+ , MongoError = require('mongodb-core').MongoError
+ , Readable = require('stream').Readable || require('readable-stream').Readable
+ , Define = require('./metadata')
+ , CoreCursor = require('./cursor')
+ , Query = require('mongodb-core').Query
+ , CoreReadPreference = require('mongodb-core').ReadPreference;
+
+/**
+ * @fileOverview The **CommandCursor** class is an internal class that embodies a
+ * generalized cursor based on a MongoDB command allowing for iteration over the
+ * results returned. It supports one by one document iteration, conversion to an
+ * array or can be iterated as a Node 0.10.X or higher stream
+ *
+ * **CommandCursor Cannot directly be instantiated**
+ * @example
+ * var MongoClient = require('mongodb').MongoClient,
+ * test = require('assert');
+ * // Connection url
+ * var url = 'mongodb://localhost:27017/test';
+ * // Connect using MongoClient
+ * MongoClient.connect(url, function(err, db) {
+ * // Create a collection we want to drop later
+ * var col = db.collection('listCollectionsExample1');
+ * // Insert a bunch of documents
+ * col.insert([{a:1, b:1}
+ * , {a:2, b:2}, {a:3, b:3}
+ * , {a:4, b:4}], {w:1}, function(err, result) {
+ * test.equal(null, err);
+ *
+ * // List the database collections available
+ * db.listCollections().toArray(function(err, items) {
+ * test.equal(null, err);
+ * db.close();
+ * });
+ * });
+ * });
+ */
+
+/**
+ * Namespace provided by the browser.
+ * @external Readable
+ */
+
+/**
+ * Creates a new Command Cursor instance (INTERNAL TYPE, do not instantiate directly)
+ * @class CommandCursor
+ * @extends external:Readable
+ * @fires CommandCursor#data
+ * @fires CommandCursor#end
+ * @fires CommandCursor#close
+ * @fires CommandCursor#readable
+ * @return {CommandCursor} an CommandCursor instance.
+ */
+var CommandCursor = function(bson, ns, cmd, options, topology, topologyOptions) {
+ CoreCursor.apply(this, Array.prototype.slice.call(arguments, 0));
+ var self = this;
+ var state = CommandCursor.INIT;
+ var streamOptions = {};
+
+ // MaxTimeMS
+ var maxTimeMS = null;
+
+ // Get the promiseLibrary
+ var promiseLibrary = options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // Set up
+ Readable.call(this, {objectMode: true});
+
+ // Internal state
+ this.s = {
+ // MaxTimeMS
+ maxTimeMS: maxTimeMS
+ // State
+ , state: state
+ // Stream options
+ , streamOptions: streamOptions
+ // BSON
+ , bson: bson
+ // Namespae
+ , ns: ns
+ // Command
+ , cmd: cmd
+ // Options
+ , options: options
+ // Topology
+ , topology: topology
+ // Topology Options
+ , topologyOptions: topologyOptions
+ // Promise library
+ , promiseLibrary: promiseLibrary
+ }
+}
+
+/**
+ * CommandCursor stream data event, fired for each document in the cursor.
+ *
+ * @event CommandCursor#data
+ * @type {object}
+ */
+
+/**
+ * CommandCursor stream end event
+ *
+ * @event CommandCursor#end
+ * @type {null}
+ */
+
+/**
+ * CommandCursor stream close event
+ *
+ * @event CommandCursor#close
+ * @type {null}
+ */
+
+/**
+ * CommandCursor stream readable event
+ *
+ * @event CommandCursor#readable
+ * @type {null}
+ */
+
+// Inherit from Readable
+inherits(CommandCursor, Readable);
+
+// Set the methods to inherit from prototype
+var methodsToInherit = ['_next', 'next', 'each', 'forEach', 'toArray'
+ , 'rewind', 'bufferedCount', 'readBufferedDocuments', 'close', 'isClosed', 'kill'
+ , '_find', '_getmore', '_killcursor', 'isDead', 'explain', 'isNotified', 'isKilled'];
+
+// Only inherit the types we need
+for(var i = 0; i < methodsToInherit.length; i++) {
+ CommandCursor.prototype[methodsToInherit[i]] = CoreCursor.prototype[methodsToInherit[i]];
+}
+
+var define = CommandCursor.define = new Define('CommandCursor', CommandCursor, true);
+
+/**
+ * Set the ReadPreference for the cursor.
+ * @method
+ * @param {(string|ReadPreference)} readPreference The new read preference for the cursor.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+CommandCursor.prototype.setReadPreference = function(r) {
+ if(this.s.state == CommandCursor.CLOSED || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ if(this.s.state != CommandCursor.INIT) throw MongoError.create({message: 'cannot change cursor readPreference after cursor has been accessed', driver:true});
+
+ if(r instanceof ReadPreference) {
+ this.s.options.readPreference = new CoreReadPreference(r.mode, r.tags, {maxStalenessMS: r.maxStalenessMS});
+ } else if(typeof r == 'string') {
+ this.s.options.readPreference = new CoreReadPreference(r);
+ } else if(r instanceof CoreReadPreference) {
+ this.s.options.readPreference = r;
+ }
+
+ return this;
+}
+
+define.classMethod('setReadPreference', {callback: false, promise:false, returns: [CommandCursor]});
+
+/**
+ * Set the batch size for the cursor.
+ * @method
+ * @param {number} value The batchSize for the cursor.
+ * @throws {MongoError}
+ * @return {CommandCursor}
+ */
+CommandCursor.prototype.batchSize = function(value) {
+ if(this.s.state == CommandCursor.CLOSED || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ if(typeof value != 'number') throw MongoError.create({message: "batchSize requires an integer", driver:true});
+ if(this.s.cmd.cursor) this.s.cmd.cursor.batchSize = value;
+ this.setCursorBatchSize(value);
+ return this;
+}
+
+define.classMethod('batchSize', {callback: false, promise:false, returns: [CommandCursor]});
+
+/**
+ * Add a maxTimeMS stage to the aggregation pipeline
+ * @method
+ * @param {number} value The state maxTimeMS value.
+ * @return {CommandCursor}
+ */
+CommandCursor.prototype.maxTimeMS = function(value) {
+ if(this.s.topology.lastIsMaster().minWireVersion > 2) {
+ this.s.cmd.maxTimeMS = value;
+ }
+ return this;
+}
+
+define.classMethod('maxTimeMS', {callback: false, promise:false, returns: [CommandCursor]});
+
+CommandCursor.prototype.get = CommandCursor.prototype.toArray;
+
+define.classMethod('get', {callback: true, promise:false});
+
+// Inherited methods
+define.classMethod('toArray', {callback: true, promise:true});
+define.classMethod('each', {callback: true, promise:false});
+define.classMethod('forEach', {callback: true, promise:false});
+define.classMethod('next', {callback: true, promise:true});
+define.classMethod('close', {callback: true, promise:true});
+define.classMethod('isClosed', {callback: false, promise:false, returns: [Boolean]});
+define.classMethod('rewind', {callback: false, promise:false});
+define.classMethod('bufferedCount', {callback: false, promise:false, returns: [Number]});
+define.classMethod('readBufferedDocuments', {callback: false, promise:false, returns: [Array]});
+
+/**
+ * Get the next available document from the cursor, returns null if no more documents are available.
+ * @function CommandCursor.prototype.next
+ * @param {CommandCursor~resultCallback} [callback] The result callback.
+ * @throws {MongoError}
+ * @return {Promise} returns Promise if no callback passed
+ */
+
+/**
+ * The callback format for results
+ * @callback CommandCursor~toArrayResultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {object[]} documents All the documents the satisfy the cursor.
+ */
+
+/**
+ * Returns an array of documents. The caller is responsible for making sure that there
+ * is enough memory to store the results. Note that the array only contain partial
+ * results when this cursor had been previouly accessed.
+ * @method CommandCursor.prototype.toArray
+ * @param {CommandCursor~toArrayResultCallback} [callback] The result callback.
+ * @throws {MongoError}
+ * @return {Promise} returns Promise if no callback passed
+ */
+
+/**
+ * The callback format for results
+ * @callback CommandCursor~resultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {(object|null)} result The result object if the command was executed successfully.
+ */
+
+/**
+ * Iterates over all the documents for this cursor. As with **{cursor.toArray}**,
+ * not all of the elements will be iterated if this cursor had been previouly accessed.
+ * In that case, **{cursor.rewind}** can be used to reset the cursor. However, unlike
+ * **{cursor.toArray}**, the cursor will only hold a maximum of batch size elements
+ * at any given time if batch size is specified. Otherwise, the caller is responsible
+ * for making sure that the entire result can fit the memory.
+ * @method CommandCursor.prototype.each
+ * @param {CommandCursor~resultCallback} callback The result callback.
+ * @throws {MongoError}
+ * @return {null}
+ */
+
+/**
+ * Close the cursor, sending a KillCursor command and emitting close.
+ * @method CommandCursor.prototype.close
+ * @param {CommandCursor~resultCallback} [callback] The result callback.
+ * @return {Promise} returns Promise if no callback passed
+ */
+
+/**
+ * Is the cursor closed
+ * @method CommandCursor.prototype.isClosed
+ * @return {boolean}
+ */
+
+/**
+ * Clone the cursor
+ * @function CommandCursor.prototype.clone
+ * @return {CommandCursor}
+ */
+
+/**
+ * Resets the cursor
+ * @function CommandCursor.prototype.rewind
+ * @return {CommandCursor}
+ */
+
+/**
+ * The callback format for the forEach iterator method
+ * @callback CommandCursor~iteratorCallback
+ * @param {Object} doc An emitted document for the iterator
+ */
+
+/**
+ * The callback error format for the forEach iterator method
+ * @callback CommandCursor~endCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ */
+
+/*
+ * Iterates over all the documents for this cursor using the iterator, callback pattern.
+ * @method CommandCursor.prototype.forEach
+ * @param {CommandCursor~iteratorCallback} iterator The iteration callback.
+ * @param {CommandCursor~endCallback} callback The end callback.
+ * @throws {MongoError}
+ * @return {null}
+ */
+
+CommandCursor.INIT = 0;
+CommandCursor.OPEN = 1;
+CommandCursor.CLOSED = 2;
+
+module.exports = CommandCursor;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/cursor.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/cursor.js
new file mode 100644
index 0000000..44431c1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/cursor.js
@@ -0,0 +1,1182 @@
+"use strict";
+
+var inherits = require('util').inherits
+ , f = require('util').format
+ , formattedOrderClause = require('./utils').formattedOrderClause
+ , handleCallback = require('./utils').handleCallback
+ , ReadPreference = require('./read_preference')
+ , MongoError = require('mongodb-core').MongoError
+ , Readable = require('stream').Readable || require('readable-stream').Readable
+ , Define = require('./metadata')
+ , CoreCursor = require('mongodb-core').Cursor
+ , Map = require('mongodb-core').BSON.Map
+ , Query = require('mongodb-core').Query
+ , CoreReadPreference = require('mongodb-core').ReadPreference;
+
+/**
+ * @fileOverview The **Cursor** class is an internal class that embodies a cursor on MongoDB
+ * allowing for iteration over the results returned from the underlying query. It supports
+ * one by one document iteration, conversion to an array or can be iterated as a Node 0.10.X
+ * or higher stream
+ *
+ * **CURSORS Cannot directly be instantiated**
+ * @example
+ * var MongoClient = require('mongodb').MongoClient,
+ * test = require('assert');
+ * // Connection url
+ * var url = 'mongodb://localhost:27017/test';
+ * // Connect using MongoClient
+ * MongoClient.connect(url, function(err, db) {
+ * // Create a collection we want to drop later
+ * var col = db.collection('createIndexExample1');
+ * // Insert a bunch of documents
+ * col.insert([{a:1, b:1}
+ * , {a:2, b:2}, {a:3, b:3}
+ * , {a:4, b:4}], {w:1}, function(err, result) {
+ * test.equal(null, err);
+ *
+ * // Show that duplicate records got dropped
+ * col.find({}).toArray(function(err, items) {
+ * test.equal(null, err);
+ * test.equal(4, items.length);
+ * db.close();
+ * });
+ * });
+ * });
+ */
+
+/**
+ * Namespace provided by the mongodb-core and node.js
+ * @external CoreCursor
+ * @external Readable
+ */
+
+// Flags allowed for cursor
+var flags = ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'exhaust', 'partial'];
+var fields = ['numberOfRetries', 'tailableRetryInterval'];
+var push = Array.prototype.push;
+
+/**
+ * Creates a new Cursor instance (INTERNAL TYPE, do not instantiate directly)
+ * @class Cursor
+ * @extends external:CoreCursor
+ * @extends external:Readable
+ * @property {string} sortValue Cursor query sort setting.
+ * @property {boolean} timeout Is Cursor able to time out.
+ * @property {ReadPreference} readPreference Get cursor ReadPreference.
+ * @fires Cursor#data
+ * @fires Cursor#end
+ * @fires Cursor#close
+ * @fires Cursor#readable
+ * @return {Cursor} a Cursor instance.
+ * @example
+ * Cursor cursor options.
+ *
+ * collection.find({}).project({a:1}) // Create a projection of field a
+ * collection.find({}).skip(1).limit(10) // Skip 1 and limit 10
+ * collection.find({}).batchSize(5) // Set batchSize on cursor to 5
+ * collection.find({}).filter({a:1}) // Set query on the cursor
+ * collection.find({}).comment('add a comment') // Add a comment to the query, allowing to correlate queries
+ * collection.find({}).addCursorFlag('tailable', true) // Set cursor as tailable
+ * collection.find({}).addCursorFlag('oplogReplay', true) // Set cursor as oplogReplay
+ * collection.find({}).addCursorFlag('noCursorTimeout', true) // Set cursor as noCursorTimeout
+ * collection.find({}).addCursorFlag('awaitData', true) // Set cursor as awaitData
+ * collection.find({}).addCursorFlag('partial', true) // Set cursor as partial
+ * collection.find({}).addQueryModifier('$orderby', {a:1}) // Set $orderby {a:1}
+ * collection.find({}).max(10) // Set the cursor maxScan
+ * collection.find({}).maxScan(10) // Set the cursor maxScan
+ * collection.find({}).maxTimeMS(1000) // Set the cursor maxTimeMS
+ * collection.find({}).min(100) // Set the cursor min
+ * collection.find({}).returnKey(10) // Set the cursor returnKey
+ * collection.find({}).setReadPreference(ReadPreference.PRIMARY) // Set the cursor readPreference
+ * collection.find({}).showRecordId(true) // Set the cursor showRecordId
+ * collection.find({}).snapshot(true) // Set the cursor snapshot
+ * collection.find({}).sort([['a', 1]]) // Sets the sort order of the cursor query
+ * collection.find({}).hint('a_1') // Set the cursor hint
+ *
+ * All options are chainable, so one can do the following.
+ *
+ * collection.find({}).maxTimeMS(1000).maxScan(100).skip(1).toArray(..)
+ */
+var Cursor = function(bson, ns, cmd, options, topology, topologyOptions) {
+ CoreCursor.apply(this, Array.prototype.slice.call(arguments, 0));
+ var self = this;
+ var state = Cursor.INIT;
+ var streamOptions = {};
+
+ // Tailable cursor options
+ var numberOfRetries = options.numberOfRetries || 5;
+ var tailableRetryInterval = options.tailableRetryInterval || 500;
+ var currentNumberOfRetries = numberOfRetries;
+
+ // Get the promiseLibrary
+ var promiseLibrary = options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // Set up
+ Readable.call(this, {objectMode: true});
+
+ // Internal cursor state
+ this.s = {
+ // Tailable cursor options
+ numberOfRetries: numberOfRetries
+ , tailableRetryInterval: tailableRetryInterval
+ , currentNumberOfRetries: currentNumberOfRetries
+ // State
+ , state: state
+ // Stream options
+ , streamOptions: streamOptions
+ // BSON
+ , bson: bson
+ // Namespace
+ , ns: ns
+ // Command
+ , cmd: cmd
+ // Options
+ , options: options
+ // Topology
+ , topology: topology
+ // Topology options
+ , topologyOptions: topologyOptions
+ // Promise library
+ , promiseLibrary: promiseLibrary
+ // Current doc
+ , currentDoc: null
+ }
+
+ // Translate correctly
+ if(self.s.options.noCursorTimeout == true) {
+ self.addCursorFlag('noCursorTimeout', true);
+ }
+
+ // Set the sort value
+ this.sortValue = self.s.cmd.sort;
+}
+
+/**
+ * Cursor stream data event, fired for each document in the cursor.
+ *
+ * @event Cursor#data
+ * @type {object}
+ */
+
+/**
+ * Cursor stream end event
+ *
+ * @event Cursor#end
+ * @type {null}
+ */
+
+/**
+ * Cursor stream close event
+ *
+ * @event Cursor#close
+ * @type {null}
+ */
+
+/**
+ * Cursor stream readable event
+ *
+ * @event Cursor#readable
+ * @type {null}
+ */
+
+// Inherit from Readable
+inherits(Cursor, Readable);
+
+// Map core cursor _next method so we can apply mapping
+CoreCursor.prototype._next = CoreCursor.prototype.next;
+
+for(var name in CoreCursor.prototype) {
+ Cursor.prototype[name] = CoreCursor.prototype[name];
+}
+
+var define = Cursor.define = new Define('Cursor', Cursor, true);
+
+/**
+ * Check if there is any document still available in the cursor
+ * @method
+ * @param {Cursor~resultCallback} [callback] The result callback.
+ * @throws {MongoError}
+ * @return {Promise} returns Promise if no callback passed
+ */
+Cursor.prototype.hasNext = function(callback) {
+ var self = this;
+
+ // Execute using callback
+ if(typeof callback == 'function') {
+ if(self.s.currentDoc){
+ return callback(null, true);
+ } else {
+ return nextObject(self, function(err, doc) {
+ if(!doc) return callback(null, false);
+ self.s.currentDoc = doc;
+ callback(null, true);
+ });
+ }
+ }
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ if(self.s.currentDoc){
+ resolve(true);
+ } else {
+ nextObject(self, function(err, doc) {
+ if(self.s.state == Cursor.CLOSED || self.isDead()) return resolve(false);
+ if(err) return reject(err);
+ if(!doc) return resolve(false);
+ self.s.currentDoc = doc;
+ resolve(true);
+ });
+ }
+ });
+}
+
+define.classMethod('hasNext', {callback: true, promise:true});
+
+/**
+ * Get the next available document from the cursor, returns null if no more documents are available.
+ * @method
+ * @param {Cursor~resultCallback} [callback] The result callback.
+ * @throws {MongoError}
+ * @return {Promise} returns Promise if no callback passed
+ */
+Cursor.prototype.next = function(callback) {
+ var self = this;
+
+ // Execute using callback
+ if(typeof callback == 'function') {
+ // Return the currentDoc if someone called hasNext first
+ if(self.s.currentDoc) {
+ var doc = self.s.currentDoc;
+ self.s.currentDoc = null;
+ return callback(null, doc);
+ }
+
+ // Return the next object
+ return nextObject(self, callback)
+ };
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ // Return the currentDoc if someone called hasNext first
+ if(self.s.currentDoc) {
+ var doc = self.s.currentDoc;
+ self.s.currentDoc = null;
+ return resolve(doc);
+ }
+
+ nextObject(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('next', {callback: true, promise:true});
+
+/**
+ * Set the cursor query
+ * @method
+ * @param {object} filter The filter object used for the cursor.
+ * @return {Cursor}
+ */
+Cursor.prototype.filter = function(filter) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.query = filter;
+ return this;
+}
+
+define.classMethod('filter', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set the cursor maxScan
+ * @method
+ * @param {object} maxScan Constrains the query to only scan the specified number of documents when fulfilling the query
+ * @return {Cursor}
+ */
+Cursor.prototype.maxScan = function(maxScan) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.maxScan = maxScan;
+ return this;
+}
+
+define.classMethod('maxScan', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set the cursor hint
+ * @method
+ * @param {object} hint If specified, then the query system will only consider plans using the hinted index.
+ * @return {Cursor}
+ */
+Cursor.prototype.hint = function(hint) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.hint = hint;
+ return this;
+}
+
+define.classMethod('hint', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set the cursor min
+ * @method
+ * @param {object} min Specify a $min value to specify the inclusive lower bound for a specific index in order to constrain the results of find(). The $min specifies the lower bound for all keys of a specific index in order.
+ * @return {Cursor}
+ */
+Cursor.prototype.min = function(min) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.min = min;
+ return this;
+}
+
+define.classMethod('min', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set the cursor max
+ * @method
+ * @param {object} max Specify a $max value to specify the exclusive upper bound for a specific index in order to constrain the results of find(). The $max specifies the upper bound for all keys of a specific index in order.
+ * @return {Cursor}
+ */
+Cursor.prototype.max = function(max) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.max = max;
+ return this;
+}
+
+define.classMethod('max', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set the cursor returnKey
+ * @method
+ * @param {object} returnKey Only return the index field or fields for the results of the query. If $returnKey is set to true and the query does not use an index to perform the read operation, the returned documents will not contain any fields. Use one of the following forms:
+ * @return {Cursor}
+ */
+Cursor.prototype.returnKey = function(value) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.returnKey = value;
+ return this;
+}
+
+define.classMethod('returnKey', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set the cursor showRecordId
+ * @method
+ * @param {object} showRecordId The $showDiskLoc option has now been deprecated and replaced with the showRecordId field. $showDiskLoc will still be accepted for OP_QUERY stye find.
+ * @return {Cursor}
+ */
+Cursor.prototype.showRecordId = function(value) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.showDiskLoc = value;
+ return this;
+}
+
+define.classMethod('showRecordId', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set the cursor snapshot
+ * @method
+ * @param {object} snapshot The $snapshot operator prevents the cursor from returning a document more than once because an intervening write operation results in a move of the document.
+ * @return {Cursor}
+ */
+Cursor.prototype.snapshot = function(value) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.snapshot = value;
+ return this;
+}
+
+define.classMethod('snapshot', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set a node.js specific cursor option
+ * @method
+ * @param {string} field The cursor option to set ['numberOfRetries', 'tailableRetryInterval'].
+ * @param {object} value The field value.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.setCursorOption = function(field, value) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ if(fields.indexOf(field) == -1) throw MongoError.create({message: f("option %s not a supported option %s", field, fields), driver:true });
+ this.s[field] = value;
+ if(field == 'numberOfRetries')
+ this.s.currentNumberOfRetries = value;
+ return this;
+}
+
+define.classMethod('setCursorOption', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Add a cursor flag to the cursor
+ * @method
+ * @param {string} flag The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial'].
+ * @param {boolean} value The flag boolean value.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.addCursorFlag = function(flag, value) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ if(flags.indexOf(flag) == -1) throw MongoError.create({message: f("flag %s not a supported flag %s", flag, flags), driver:true });
+ if(typeof value != 'boolean') throw MongoError.create({message: f("flag %s must be a boolean value", flag), driver:true});
+ this.s.cmd[flag] = value;
+ return this;
+}
+
+define.classMethod('addCursorFlag', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Add a query modifier to the cursor query
+ * @method
+ * @param {string} name The query modifier (must start with $, such as $orderby etc)
+ * @param {boolean} value The flag boolean value.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.addQueryModifier = function(name, value) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ if(name[0] != '$') throw MongoError.create({message: f("%s is not a valid query modifier"), driver:true});
+ // Strip of the $
+ var field = name.substr(1);
+ // Set on the command
+ this.s.cmd[field] = value;
+ // Deal with the special case for sort
+ if(field == 'orderby') this.s.cmd.sort = this.s.cmd[field];
+ return this;
+}
+
+define.classMethod('addQueryModifier', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Add a comment to the cursor query allowing for tracking the comment in the log.
+ * @method
+ * @param {string} value The comment attached to this query.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.comment = function(value) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.comment = value;
+ return this;
+}
+
+define.classMethod('comment', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set a maxAwaitTimeMS on a tailing cursor query to allow to customize the timeout value for the option awaitData (Only supported on MongoDB 3.2 or higher, ignored otherwise)
+ * @method
+ * @param {number} value Number of milliseconds to wait before aborting the tailed query.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.maxAwaitTimeMS = function(value) {
+ if(typeof value != 'number') throw MongoError.create({message: "maxAwaitTimeMS must be a number", driver:true});
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.maxAwaitTimeMS = value;
+ return this;
+}
+
+define.classMethod('maxAwaitTimeMS', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set a maxTimeMS on the cursor query, allowing for hard timeout limits on queries (Only supported on MongoDB 2.6 or higher)
+ * @method
+ * @param {number} value Number of milliseconds to wait before aborting the query.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.maxTimeMS = function(value) {
+ if(typeof value != 'number') throw MongoError.create({message: "maxTimeMS must be a number", driver:true});
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.maxTimeMS = value;
+ return this;
+}
+
+define.classMethod('maxTimeMS', {callback: false, promise:false, returns: [Cursor]});
+
+Cursor.prototype.maxTimeMs = Cursor.prototype.maxTimeMS;
+
+define.classMethod('maxTimeMs', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Sets a field projection for the query.
+ * @method
+ * @param {object} value The field projection object.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.project = function(value) {
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ this.s.cmd.fields = value;
+ return this;
+}
+
+define.classMethod('project', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Sets the sort order of the cursor query.
+ * @method
+ * @param {(string|array|object)} keyOrList The key or keys set for the sort.
+ * @param {number} [direction] The direction of the sorting (1 or -1).
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.sort = function(keyOrList, direction) {
+ if(this.s.options.tailable) throw MongoError.create({message: "Tailable cursor doesn't support sorting", driver:true});
+ if(this.s.state == Cursor.CLOSED || this.s.state == Cursor.OPEN || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ var order = keyOrList;
+
+ // We have an array of arrays, we need to preserve the order of the sort
+ // so we will us a Map
+ if(Array.isArray(order) && Array.isArray(order[0])) {
+ order = new Map(order.map(function(x) {
+ var value = [x[0], null];
+ if(x[1] == 'asc') {
+ value[1] = 1;
+ } else if(x[1] == 'desc') {
+ value[1] = -1;
+ } else if(x[1] == 1 || x[1] == -1) {
+ value[1] = x[1];
+ } else {
+ throw new MongoError("Illegal sort clause, must be of the form [['field1', '(ascending|descending)'], ['field2', '(ascending|descending)']]");
+ }
+
+ return value;
+ }));
+ }
+
+ if(direction != null) {
+ order = [[keyOrList, direction]];
+ }
+
+ this.s.cmd.sort = order;
+ this.sortValue = order;
+ return this;
+}
+
+define.classMethod('sort', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set the batch size for the cursor.
+ * @method
+ * @param {number} value The batchSize for the cursor.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.batchSize = function(value) {
+ if(this.s.options.tailable) throw MongoError.create({message: "Tailable cursor doesn't support batchSize", driver:true});
+ if(this.s.state == Cursor.CLOSED || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ if(typeof value != 'number') throw MongoError.create({message: "batchSize requires an integer", driver:true});
+ this.s.cmd.batchSize = value;
+ this.setCursorBatchSize(value);
+ return this;
+}
+
+define.classMethod('batchSize', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set the collation options for the cursor.
+ * @method
+ * @param {object} value The cursor collation options (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields).
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.collation = function(value) {
+ this.s.cmd.collation = value;
+ return this;
+}
+
+define.classMethod('collation', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set the limit for the cursor.
+ * @method
+ * @param {number} value The limit for the cursor query.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.limit = function(value) {
+ if(this.s.options.tailable) throw MongoError.create({message: "Tailable cursor doesn't support limit", driver:true});
+ if(this.s.state == Cursor.OPEN || this.s.state == Cursor.CLOSED || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ if(typeof value != 'number') throw MongoError.create({message: "limit requires an integer", driver:true});
+ this.s.cmd.limit = value;
+ // this.cursorLimit = value;
+ this.setCursorLimit(value);
+ return this;
+}
+
+define.classMethod('limit', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Set the skip for the cursor.
+ * @method
+ * @param {number} value The skip for the cursor query.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.skip = function(value) {
+ if(this.s.options.tailable) throw MongoError.create({message: "Tailable cursor doesn't support skip", driver:true});
+ if(this.s.state == Cursor.OPEN || this.s.state == Cursor.CLOSED || this.isDead()) throw MongoError.create({message: "Cursor is closed", driver:true});
+ if(typeof value != 'number') throw MongoError.create({message: "skip requires an integer", driver:true});
+ this.s.cmd.skip = value;
+ this.setCursorSkip(value);
+ return this;
+}
+
+define.classMethod('skip', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * The callback format for results
+ * @callback Cursor~resultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {(object|null|boolean)} result The result object if the command was executed successfully.
+ */
+
+/**
+ * Clone the cursor
+ * @function external:CoreCursor#clone
+ * @return {Cursor}
+ */
+
+/**
+ * Resets the cursor
+ * @function external:CoreCursor#rewind
+ * @return {null}
+ */
+
+/**
+ * Get the next available document from the cursor, returns null if no more documents are available.
+ * @method
+ * @param {Cursor~resultCallback} [callback] The result callback.
+ * @throws {MongoError}
+ * @deprecated
+ * @return {Promise} returns Promise if no callback passed
+ */
+Cursor.prototype.nextObject = Cursor.prototype.next;
+
+var nextObject = function(self, callback) {
+ if(self.s.state == Cursor.CLOSED || self.isDead && self.isDead()) return handleCallback(callback, MongoError.create({message: "Cursor is closed", driver:true}));
+ if(self.s.state == Cursor.INIT && self.s.cmd.sort) {
+ try {
+ self.s.cmd.sort = formattedOrderClause(self.s.cmd.sort);
+ } catch(err) {
+ return handleCallback(callback, err);
+ }
+ }
+
+ // Get the next object
+ self._next(function(err, doc) {
+ self.s.state = Cursor.OPEN;
+ if(err) return handleCallback(callback, err);
+ handleCallback(callback, null, doc);
+ });
+}
+
+define.classMethod('nextObject', {callback: true, promise:true});
+
+// Trampoline emptying the number of retrieved items
+// without incurring a nextTick operation
+var loop = function(self, callback) {
+ // No more items we are done
+ if(self.bufferedCount() == 0) return;
+ // Get the next document
+ self._next(callback);
+ // Loop
+ return loop;
+}
+
+Cursor.prototype.next = Cursor.prototype.nextObject;
+
+define.classMethod('next', {callback: true, promise:true});
+
+/**
+ * Iterates over all the documents for this cursor. As with **{cursor.toArray}**,
+ * not all of the elements will be iterated if this cursor had been previouly accessed.
+ * In that case, **{cursor.rewind}** can be used to reset the cursor. However, unlike
+ * **{cursor.toArray}**, the cursor will only hold a maximum of batch size elements
+ * at any given time if batch size is specified. Otherwise, the caller is responsible
+ * for making sure that the entire result can fit the memory.
+ * @method
+ * @deprecated
+ * @param {Cursor~resultCallback} callback The result callback.
+ * @throws {MongoError}
+ * @return {null}
+ */
+Cursor.prototype.each = function(callback) {
+ // Rewind cursor state
+ this.rewind();
+ // Set current cursor to INIT
+ this.s.state = Cursor.INIT;
+ // Run the query
+ _each(this, callback);
+};
+
+define.classMethod('each', {callback: true, promise:false});
+
+// Run the each loop
+var _each = function(self, callback) {
+ if(!callback) throw MongoError.create({message: 'callback is mandatory', driver:true});
+ if(self.isNotified()) return;
+ if(self.s.state == Cursor.CLOSED || self.isDead()) {
+ return handleCallback(callback, MongoError.create({message: "Cursor is closed", driver:true}));
+ }
+
+ if(self.s.state == Cursor.INIT) self.s.state = Cursor.OPEN;
+
+ // Define function to avoid global scope escape
+ var fn = null;
+ // Trampoline all the entries
+ if(self.bufferedCount() > 0) {
+ while(fn = loop(self, callback)) fn(self, callback);
+ _each(self, callback);
+ } else {
+ self.next(function(err, item) {
+ if(err) return handleCallback(callback, err);
+ if(item == null) {
+ self.s.state = Cursor.CLOSED;
+ return handleCallback(callback, null, null);
+ }
+
+ if(handleCallback(callback, null, item) == false) return;
+ _each(self, callback);
+ })
+ }
+}
+
+/**
+ * The callback format for the forEach iterator method
+ * @callback Cursor~iteratorCallback
+ * @param {Object} doc An emitted document for the iterator
+ */
+
+/**
+ * The callback error format for the forEach iterator method
+ * @callback Cursor~endCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ */
+
+/**
+ * Iterates over all the documents for this cursor using the iterator, callback pattern.
+ * @method
+ * @param {Cursor~iteratorCallback} iterator The iteration callback.
+ * @param {Cursor~endCallback} callback The end callback.
+ * @throws {MongoError}
+ * @return {null}
+ */
+Cursor.prototype.forEach = function(iterator, callback) {
+ this.each(function(err, doc){
+ if(err) { callback(err); return false; }
+ if(doc != null) { iterator(doc); return true; }
+ if(doc == null && callback) {
+ var internalCallback = callback;
+ callback = null;
+ internalCallback(null);
+ return false;
+ }
+ });
+}
+
+define.classMethod('forEach', {callback: true, promise:false});
+
+/**
+ * Set the ReadPreference for the cursor.
+ * @method
+ * @param {(string|ReadPreference)} readPreference The new read preference for the cursor.
+ * @throws {MongoError}
+ * @return {Cursor}
+ */
+Cursor.prototype.setReadPreference = function(r) {
+ if(this.s.state != Cursor.INIT) throw MongoError.create({message: 'cannot change cursor readPreference after cursor has been accessed', driver:true});
+ if(r instanceof ReadPreference) {
+ this.s.options.readPreference = new CoreReadPreference(r.mode, r.tags, {maxStalenessMS: r.maxStalenessMS});
+ } else if(typeof r == 'string'){
+ this.s.options.readPreference = new CoreReadPreference(r);
+ } else if(r instanceof CoreReadPreference) {
+ this.s.options.readPreference = r;
+ }
+
+ return this;
+}
+
+define.classMethod('setReadPreference', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * The callback format for results
+ * @callback Cursor~toArrayResultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {object[]} documents All the documents the satisfy the cursor.
+ */
+
+/**
+ * Returns an array of documents. The caller is responsible for making sure that there
+ * is enough memory to store the results. Note that the array only contain partial
+ * results when this cursor had been previouly accessed. In that case,
+ * cursor.rewind() can be used to reset the cursor.
+ * @method
+ * @param {Cursor~toArrayResultCallback} [callback] The result callback.
+ * @throws {MongoError}
+ * @return {Promise} returns Promise if no callback passed
+ */
+Cursor.prototype.toArray = function(callback) {
+ var self = this;
+ if(self.s.options.tailable) throw MongoError.create({message: 'Tailable cursor cannot be converted to array', driver:true});
+
+ // Execute using callback
+ if(typeof callback == 'function') return toArray(self, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ toArray(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+var toArray = function(self, callback) {
+ var items = [];
+
+ // Reset cursor
+ self.rewind();
+ self.s.state = Cursor.INIT;
+
+ // Fetch all the documents
+ var fetchDocs = function() {
+ self._next(function(err, doc) {
+ if(err) return handleCallback(callback, err);
+ if(doc == null) {
+ self.s.state = Cursor.CLOSED;
+ return handleCallback(callback, null, items);
+ }
+
+ // Add doc to items
+ items.push(doc)
+
+ // Get all buffered objects
+ if(self.bufferedCount() > 0) {
+ var docs = self.readBufferedDocuments(self.bufferedCount())
+
+ // Transform the doc if transform method added
+ if(self.s.transforms && typeof self.s.transforms.doc == 'function') {
+ docs = docs.map(self.s.transforms.doc);
+ }
+
+ push.apply(items, docs);
+ }
+
+ // Attempt a fetch
+ fetchDocs();
+ })
+ }
+
+ fetchDocs();
+}
+
+define.classMethod('toArray', {callback: true, promise:true});
+
+/**
+ * The callback format for results
+ * @callback Cursor~countResultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {number} count The count of documents.
+ */
+
+/**
+ * Get the count of documents for this cursor
+ * @method
+ * @param {boolean} [applySkipLimit=true] Should the count command apply limit and skip settings on the cursor or in the passed in options.
+ * @param {object} [options=null] Optional settings.
+ * @param {number} [options.skip=null] The number of documents to skip.
+ * @param {number} [options.limit=null] The maximum amounts to count before aborting.
+ * @param {number} [options.maxTimeMS=null] Number of miliseconds to wait before aborting the query.
+ * @param {string} [options.hint=null] An index name hint for the query.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {Cursor~countResultCallback} [callback] The result callback.
+ * @return {Promise} returns Promise if no callback passed
+ */
+Cursor.prototype.count = function(applySkipLimit, opts, callback) {
+ var self = this;
+ if(self.s.cmd.query == null) throw MongoError.create({message: "count can only be used with find command", driver:true});
+ if(typeof opts == 'function') callback = opts, opts = {};
+ opts = opts || {};
+
+ // Execute using callback
+ if(typeof callback == 'function') return count(self, applySkipLimit, opts, callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ count(self, applySkipLimit, opts, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var count = function(self, applySkipLimit, opts, callback) {
+ if(typeof applySkipLimit == 'function') {
+ callback = applySkipLimit;
+ applySkipLimit = true;
+ }
+
+ if(applySkipLimit) {
+ if(typeof self.cursorSkip() == 'number') opts.skip = self.cursorSkip();
+ if(typeof self.cursorLimit() == 'number') opts.limit = self.cursorLimit();
+ }
+
+ // Command
+ var delimiter = self.s.ns.indexOf('.');
+
+ var command = {
+ 'count': self.s.ns.substr(delimiter+1), 'query': self.s.cmd.query
+ }
+
+ if(typeof opts.maxTimeMS == 'number') {
+ command.maxTimeMS = opts.maxTimeMS;
+ } else if(self.s.cmd && typeof self.s.cmd.maxTimeMS == 'number') {
+ command.maxTimeMS = self.s.cmd.maxTimeMS;
+ }
+
+ // Merge in any options
+ if(opts.skip) command.skip = opts.skip;
+ if(opts.limit) command.limit = opts.limit;
+ if(self.s.options.hint) command.hint = self.s.options.hint;
+
+ // Execute the command
+ self.topology.command(f("%s.$cmd", self.s.ns.substr(0, delimiter))
+ , command, function(err, result) {
+ callback(err, result ? result.result.n : null)
+ });
+}
+
+define.classMethod('count', {callback: true, promise:true});
+
+/**
+ * Close the cursor, sending a KillCursor command and emitting close.
+ * @method
+ * @param {Cursor~resultCallback} [callback] The result callback.
+ * @return {Promise} returns Promise if no callback passed
+ */
+Cursor.prototype.close = function(callback) {
+ this.s.state = Cursor.CLOSED;
+ // Kill the cursor
+ this.kill();
+ // Emit the close event for the cursor
+ this.emit('close');
+ // Callback if provided
+ if(typeof callback == 'function') return handleCallback(callback, null, this);
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ resolve();
+ });
+}
+
+define.classMethod('close', {callback: true, promise:true});
+
+/**
+ * Map all documents using the provided function
+ * @method
+ * @param {function} [transform] The mapping transformation method.
+ * @return {null}
+ */
+Cursor.prototype.map = function(transform) {
+ this.cursorState.transforms = { doc: transform };
+ return this;
+}
+
+define.classMethod('map', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Is the cursor closed
+ * @method
+ * @return {boolean}
+ */
+Cursor.prototype.isClosed = function() {
+ return this.isDead();
+}
+
+define.classMethod('isClosed', {callback: false, promise:false, returns: [Boolean]});
+
+Cursor.prototype.destroy = function(err) {
+ if(err) this.emit('error', err);
+ this.pause();
+ this.close();
+}
+
+define.classMethod('destroy', {callback: false, promise:false});
+
+/**
+ * Return a modified Readable stream including a possible transform method.
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {function} [options.transform=null] A transformation method applied to each document emitted by the stream.
+ * @return {Cursor}
+ */
+Cursor.prototype.stream = function(options) {
+ this.s.streamOptions = options || {};
+ return this;
+}
+
+define.classMethod('stream', {callback: false, promise:false, returns: [Cursor]});
+
+/**
+ * Execute the explain for the cursor
+ * @method
+ * @param {Cursor~resultCallback} [callback] The result callback.
+ * @return {Promise} returns Promise if no callback passed
+ */
+Cursor.prototype.explain = function(callback) {
+ var self = this;
+ this.s.cmd.explain = true;
+
+ // Do we have a readConcern
+ if(this.s.cmd.readConcern) {
+ delete this.s.cmd['readConcern'];
+ }
+
+ // Execute using callback
+ if(typeof callback == 'function') return this._next(callback);
+
+ // Return a Promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self._next(function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('explain', {callback: true, promise:true});
+
+Cursor.prototype._read = function(n) {
+ var self = this;
+ if(self.s.state == Cursor.CLOSED || self.isDead()) {
+ return self.push(null);
+ }
+
+ // Get the next item
+ self.nextObject(function(err, result) {
+ if(err) {
+ if(self.listeners('error') && self.listeners('error').length > 0) {
+ self.emit('error', err);
+ }
+ if(!self.isDead()) self.close();
+
+ // Emit end event
+ self.emit('end');
+ return self.emit('finish');
+ }
+
+ // If we provided a transformation method
+ if(typeof self.s.streamOptions.transform == 'function' && result != null) {
+ return self.push(self.s.streamOptions.transform(result));
+ }
+
+ // If we provided a map function
+ if(self.cursorState.transforms && typeof self.cursorState.transforms.doc == 'function' && result != null) {
+ return self.push(self.cursorState.transforms.doc(result));
+ }
+
+ // Return the result
+ self.push(result);
+ });
+}
+
+Object.defineProperty(Cursor.prototype, 'readPreference', {
+ enumerable:true,
+ get: function() {
+ if (!this || !this.s) {
+ return null;
+ }
+
+ return this.s.options.readPreference;
+ }
+});
+
+Object.defineProperty(Cursor.prototype, 'namespace', {
+ enumerable: true,
+ get: function() {
+ if (!this || !this.s) {
+ return null;
+ }
+
+ // TODO: refactor this logic into core
+ var ns = this.s.ns || '';
+ var firstDot = ns.indexOf('.');
+ if (firstDot < 0) {
+ return {
+ database: this.s.ns,
+ collection: ''
+ };
+ }
+ return {
+ database: ns.substr(0, firstDot),
+ collection: ns.substr(firstDot + 1)
+ };
+ }
+});
+
+/**
+ * The read() method pulls some data out of the internal buffer and returns it. If there is no data available, then it will return null.
+ * @function external:Readable#read
+ * @param {number} size Optional argument to specify how much data to read.
+ * @return {(String | Buffer | null)}
+ */
+
+/**
+ * Call this function to cause the stream to return strings of the specified encoding instead of Buffer objects.
+ * @function external:Readable#setEncoding
+ * @param {string} encoding The encoding to use.
+ * @return {null}
+ */
+
+/**
+ * This method will cause the readable stream to resume emitting data events.
+ * @function external:Readable#resume
+ * @return {null}
+ */
+
+/**
+ * This method will cause a stream in flowing-mode to stop emitting data events. Any data that becomes available will remain in the internal buffer.
+ * @function external:Readable#pause
+ * @return {null}
+ */
+
+/**
+ * This method pulls all the data out of a readable stream, and writes it to the supplied destination, automatically managing the flow so that the destination is not overwhelmed by a fast readable stream.
+ * @function external:Readable#pipe
+ * @param {Writable} destination The destination for writing data
+ * @param {object} [options] Pipe options
+ * @return {null}
+ */
+
+/**
+ * This method will remove the hooks set up for a previous pipe() call.
+ * @function external:Readable#unpipe
+ * @param {Writable} [destination] The destination for writing data
+ * @return {null}
+ */
+
+/**
+ * This is useful in certain cases where a stream is being consumed by a parser, which needs to "un-consume" some data that it has optimistically pulled out of the source, so that the stream can be passed on to some other party.
+ * @function external:Readable#unshift
+ * @param {(Buffer|string)} chunk Chunk of data to unshift onto the read queue.
+ * @return {null}
+ */
+
+/**
+ * Versions of Node prior to v0.10 had streams that did not implement the entire Streams API as it is today. (See "Compatibility" below for more information.)
+ * @function external:Readable#wrap
+ * @param {Stream} stream An "old style" readable stream.
+ * @return {null}
+ */
+
+Cursor.INIT = 0;
+Cursor.OPEN = 1;
+Cursor.CLOSED = 2;
+Cursor.GET_MORE = 3;
+
+module.exports = Cursor;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/db.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/db.js
new file mode 100644
index 0000000..ca7c486
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/db.js
@@ -0,0 +1,1886 @@
+"use strict";
+
+var EventEmitter = require('events').EventEmitter
+ , inherits = require('util').inherits
+ , getSingleProperty = require('./utils').getSingleProperty
+ , shallowClone = require('./utils').shallowClone
+ , parseIndexOptions = require('./utils').parseIndexOptions
+ , debugOptions = require('./utils').debugOptions
+ , CommandCursor = require('./command_cursor')
+ , handleCallback = require('./utils').handleCallback
+ , filterOptions = require('./utils').filterOptions
+ , toError = require('./utils').toError
+ , ReadPreference = require('./read_preference')
+ , f = require('util').format
+ , Admin = require('./admin')
+ , Code = require('mongodb-core').BSON.Code
+ , CoreReadPreference = require('mongodb-core').ReadPreference
+ , MongoError = require('mongodb-core').MongoError
+ , ObjectID = require('mongodb-core').ObjectID
+ , Define = require('./metadata')
+ , Logger = require('mongodb-core').Logger
+ , Collection = require('./collection')
+ , crypto = require('crypto')
+ , assign = require('./utils').assign;
+
+var debugFields = ['authSource', 'w', 'wtimeout', 'j', 'native_parser', 'forceServerObjectId'
+ , 'serializeFunctions', 'raw', 'promoteLongs', 'promoteValues', 'promoteBuffers', 'bufferMaxEntries', 'numberOfRetries', 'retryMiliSeconds'
+ , 'readPreference', 'pkFactory', 'parentDb', 'promiseLibrary', 'noListener'];
+
+/**
+ * @fileOverview The **Db** class is a class that represents a MongoDB Database.
+ *
+ * @example
+ * var MongoClient = require('mongodb').MongoClient,
+ * test = require('assert');
+ * // Connection url
+ * var url = 'mongodb://localhost:27017/test';
+ * // Connect using MongoClient
+ * MongoClient.connect(url, function(err, db) {
+ * // Get an additional db
+ * var testDb = db.db('test');
+ * db.close();
+ * });
+ */
+
+// Allowed parameters
+var legalOptionNames = ['w', 'wtimeout', 'fsync', 'j', 'readPreference', 'readPreferenceTags', 'native_parser'
+ , 'forceServerObjectId', 'pkFactory', 'serializeFunctions', 'raw', 'bufferMaxEntries', 'authSource'
+ , 'ignoreUndefined', 'promoteLongs', 'promiseLibrary', 'readConcern', 'retryMiliSeconds', 'numberOfRetries'
+ , 'parentDb', 'noListener', 'loggerLevel', 'logger', 'promoteBuffers', 'promoteLongs', 'promoteValues'];
+
+/**
+ * Creates a new Db instance
+ * @class
+ * @param {string} databaseName The name of the database this instance represents.
+ * @param {(Server|ReplSet|Mongos)} topology The server topology for the database.
+ * @param {object} [options=null] Optional settings.
+ * @param {string} [options.authSource=null] If the database authentication is dependent on another databaseName.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.forceServerObjectId=false] Force server to assign _id values instead of driver.
+ * @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {boolean} [options.raw=false] Return document results as raw BSON buffers.
+ * @param {boolean} [options.promoteLongs=true] Promotes Long values to number if they fit inside the 53 bits resolution.
+ * @param {boolean} [options.promoteBuffers=false] Promotes Binary BSON values to native Node Buffers.
+ * @param {boolean} [options.promoteValues=true] Promotes BSON values to native types where possible, set to false to only receive wrapper types.
+ * @param {number} [options.bufferMaxEntries=-1] Sets a cap on how many operations the driver will buffer up before giving up on getting a working connection, default is -1 which is unlimited.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {object} [options.pkFactory=null] A primary key factory object for generation of custom _id keys.
+ * @param {object} [options.promiseLibrary=null] A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible
+ * @param {object} [options.readConcern=null] Specify a read concern for the collection. (only MongoDB 3.2 or higher supported)
+ * @param {object} [options.readConcern.level='local'] Specify a read concern level for the collection operations, one of [local|majority]. (only MongoDB 3.2 or higher supported)
+ * @property {(Server|ReplSet|Mongos)} serverConfig Get the current db topology.
+ * @property {number} bufferMaxEntries Current bufferMaxEntries value for the database
+ * @property {string} databaseName The name of the database this instance represents.
+ * @property {object} options The options associated with the db instance.
+ * @property {boolean} native_parser The current value of the parameter native_parser.
+ * @property {boolean} slaveOk The current slaveOk value for the db instance.
+ * @property {object} writeConcern The current write concern values.
+ * @property {object} topology Access the topology object (single server, replicaset or mongos).
+ * @fires Db#close
+ * @fires Db#authenticated
+ * @fires Db#reconnect
+ * @fires Db#error
+ * @fires Db#timeout
+ * @fires Db#parseError
+ * @fires Db#fullsetup
+ * @return {Db} a Db instance.
+ */
+var Db = function(databaseName, topology, options) {
+ options = options || {};
+ if(!(this instanceof Db)) return new Db(databaseName, topology, options);
+ EventEmitter.call(this);
+ var self = this;
+
+ // Get the promiseLibrary
+ var promiseLibrary = options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // Filter the options
+ options = filterOptions(options, legalOptionNames);
+
+ // Ensure we put the promiseLib in the options
+ options.promiseLibrary = promiseLibrary;
+
+ // var self = this; // Internal state of the db object
+ this.s = {
+ // Database name
+ databaseName: databaseName
+ // DbCache
+ , dbCache: {}
+ // Children db's
+ , children: []
+ // Topology
+ , topology: topology
+ // Options
+ , options: options
+ // Logger instance
+ , logger: Logger('Db', options)
+ // Get the bson parser
+ , bson: topology ? topology.bson : null
+ // Authsource if any
+ , authSource: options.authSource
+ // Unpack read preference
+ , readPreference: options.readPreference
+ // Set buffermaxEntries
+ , bufferMaxEntries: typeof options.bufferMaxEntries == 'number' ? options.bufferMaxEntries : -1
+ // Parent db (if chained)
+ , parentDb: options.parentDb || null
+ // Set up the primary key factory or fallback to ObjectID
+ , pkFactory: options.pkFactory || ObjectID
+ // Get native parser
+ , nativeParser: options.nativeParser || options.native_parser
+ // Promise library
+ , promiseLibrary: promiseLibrary
+ // No listener
+ , noListener: typeof options.noListener == 'boolean' ? options.noListener : false
+ // ReadConcern
+ , readConcern: options.readConcern
+ }
+
+ // Ensure we have a valid db name
+ validateDatabaseName(self.s.databaseName);
+
+ // Add a read Only property
+ getSingleProperty(this, 'serverConfig', self.s.topology);
+ getSingleProperty(this, 'bufferMaxEntries', self.s.bufferMaxEntries);
+ getSingleProperty(this, 'databaseName', self.s.databaseName);
+
+ // This is a child db, do not register any listeners
+ if(options.parentDb) return;
+ if(this.s.noListener) return;
+
+ // Add listeners
+ topology.on('error', createListener(self, 'error', self));
+ topology.on('timeout', createListener(self, 'timeout', self));
+ topology.on('close', createListener(self, 'close', self));
+ topology.on('parseError', createListener(self, 'parseError', self));
+ topology.once('open', createListener(self, 'open', self));
+ topology.once('fullsetup', createListener(self, 'fullsetup', self));
+ topology.once('all', createListener(self, 'all', self));
+ topology.on('reconnect', createListener(self, 'reconnect', self));
+}
+
+inherits(Db, EventEmitter);
+
+var define = Db.define = new Define('Db', Db, false);
+
+// Topology
+Object.defineProperty(Db.prototype, 'topology', {
+ enumerable:true,
+ get: function() { return this.s.topology; }
+});
+
+// Options
+Object.defineProperty(Db.prototype, 'options', {
+ enumerable:true,
+ get: function() { return this.s.options; }
+});
+
+// slaveOk specified
+Object.defineProperty(Db.prototype, 'slaveOk', {
+ enumerable:true,
+ get: function() {
+ if(this.s.options.readPreference != null
+ && (this.s.options.readPreference != 'primary' || this.s.options.readPreference.mode != 'primary')) {
+ return true;
+ }
+ return false;
+ }
+});
+
+// get the write Concern
+Object.defineProperty(Db.prototype, 'writeConcern', {
+ enumerable:true,
+ get: function() {
+ var ops = {};
+ if(this.s.options.w != null) ops.w = this.s.options.w;
+ if(this.s.options.j != null) ops.j = this.s.options.j;
+ if(this.s.options.fsync != null) ops.fsync = this.s.options.fsync;
+ if(this.s.options.wtimeout != null) ops.wtimeout = this.s.options.wtimeout;
+ return ops;
+ }
+});
+
+/**
+ * The callback format for the Db.open method
+ * @callback Db~openCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Db} db The Db instance if the open method was successful.
+ */
+
+// Internal method
+var open = function(self, callback) {
+ self.s.topology.connect(self, self.s.options, function(err, topology) {
+ if(callback == null) return;
+ var internalCallback = callback;
+ callback == null;
+
+ if(err) {
+ self.close();
+ return internalCallback(err);
+ }
+
+ internalCallback(null, self);
+ });
+}
+
+/**
+ * Open the database
+ * @method
+ * @param {Db~openCallback} [callback] Callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.open = function(callback) {
+ var self = this;
+ // We provided a callback leg
+ if(typeof callback == 'function') return open(self, callback);
+ // Return promise
+ return new self.s.promiseLibrary(function(resolve, reject) {
+ open(self, function(err, db) {
+ if(err) return reject(err);
+ resolve(db);
+ })
+ });
+}
+
+define.classMethod('open', {callback: true, promise:true});
+
+/**
+ * Converts provided read preference to CoreReadPreference
+ * @param {(ReadPreference|string|object)} readPreference the user provided read preference
+ * @return {CoreReadPreference}
+ */
+var convertReadPreference = function(readPreference) {
+ if(readPreference && typeof readPreference == 'string') {
+ return new CoreReadPreference(readPreference);
+ } else if(readPreference instanceof ReadPreference) {
+ return new CoreReadPreference(readPreference.mode, readPreference.tags, {maxStalenessMS: readPreference.maxStalenessMS});
+ } else if(readPreference && typeof readPreference == 'object') {
+ var mode = readPreference.mode || readPreference.preference;
+ if (mode && typeof mode == 'string') {
+ readPreference = new CoreReadPreference(mode, readPreference.tags, {maxStalenessMS: readPreference.maxStalenessMS});
+ }
+ }
+ return readPreference;
+}
+
+/**
+ * The callback format for results
+ * @callback Db~resultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {object} result The result object if the command was executed successfully.
+ */
+
+var executeCommand = function(self, command, options, callback) {
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+ // Get the db name we are executing against
+ var dbName = options.dbName || options.authdb || self.s.databaseName;
+
+ // If we have a readPreference set
+ if(options.readPreference == null && self.s.readPreference) {
+ options.readPreference = self.s.readPreference;
+ }
+
+ // Convert the readPreference if its not a write
+ if(options.readPreference) {
+ options.readPreference = convertReadPreference(options.readPreference);
+ } else {
+ options.readPreference = CoreReadPreference.primary;
+ }
+
+ // Debug information
+ if(self.s.logger.isDebug()) self.s.logger.debug(f('executing command %s against %s with options [%s]'
+ , JSON.stringify(command), f('%s.$cmd', dbName), JSON.stringify(debugOptions(debugFields, options))));
+
+ // Execute command
+ self.s.topology.command(f('%s.$cmd', dbName), command, options, function(err, result) {
+ if(err) return handleCallback(callback, err);
+ if(options.full) return handleCallback(callback, null, result);
+ handleCallback(callback, null, result.result);
+ });
+}
+
+/**
+ * Execute a command
+ * @method
+ * @param {object} command The command hash
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {Db~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.command = function(command, options, callback) {
+ var self = this;
+ // Change the callback
+ if(typeof options == 'function') callback = options, options = {};
+ // Clone the options
+ options = shallowClone(options);
+
+ // Do we have a callback
+ if(typeof callback == 'function') return executeCommand(self, command, options, callback);
+ // Return a promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ executeCommand(self, command, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('command', {callback: true, promise:true});
+
+/**
+ * The callback format for results
+ * @callback Db~noResultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {null} result Is not set to a value
+ */
+
+/**
+ * Close the db and its underlying connections
+ * @method
+ * @param {boolean} force Force close, emitting no events
+ * @param {Db~noResultCallback} [callback] The result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.close = function(force, callback) {
+ if(typeof force == 'function') callback = force, force = false;
+ this.s.topology.close(force);
+ var self = this;
+
+ // Fire close event if any listeners
+ if(this.listeners('close').length > 0) {
+ this.emit('close');
+
+ // If it's the top level db emit close on all children
+ if(this.parentDb == null) {
+ // Fire close on all children
+ for(var i = 0; i < this.s.children.length; i++) {
+ this.s.children[i].emit('close');
+ }
+ }
+
+ // Remove listeners after emit
+ self.removeAllListeners('close');
+ }
+
+ // Close parent db if set
+ if(this.s.parentDb) this.s.parentDb.close();
+ // Callback after next event loop tick
+ if(typeof callback == 'function') return process.nextTick(function() {
+ handleCallback(callback, null);
+ })
+
+ // Return dummy promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ resolve();
+ });
+}
+
+define.classMethod('close', {callback: true, promise:true});
+
+/**
+ * Return the Admin db instance
+ * @method
+ * @return {Admin} return the new Admin db instance
+ */
+Db.prototype.admin = function() {
+ return new Admin(this, this.s.topology, this.s.promiseLibrary);
+};
+
+define.classMethod('admin', {callback: false, promise:false, returns: [Admin]});
+
+/**
+ * The callback format for the collection method, must be used if strict is specified
+ * @callback Db~collectionResultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Collection} collection The collection instance.
+ */
+
+/**
+ * Fetch a specific collection (containing the actual collection information). If the application does not use strict mode you can
+ * can use it without a callback in the following way: `var collection = db.collection('mycollection');`
+ *
+ * @method
+ * @param {string} name the collection name we wish to access.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.raw=false] Return document results as raw BSON buffers.
+ * @param {object} [options.pkFactory=null] A primary key factory object for generation of custom _id keys.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
+ * @param {boolean} [options.strict=false] Returns an error if the collection does not exist
+ * @param {object} [options.readConcern=null] Specify a read concern for the collection. (only MongoDB 3.2 or higher supported)
+ * @param {object} [options.readConcern.level='local'] Specify a read concern level for the collection operations, one of [local|majority]. (only MongoDB 3.2 or higher supported)
+ * @param {Db~collectionResultCallback} callback The collection result callback
+ * @return {Collection} return the new Collection instance if not in strict mode
+ */
+Db.prototype.collection = function(name, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+ options = shallowClone(options);
+ // Set the promise library
+ options.promiseLibrary = this.s.promiseLibrary;
+
+ // If we have not set a collection level readConcern set the db level one
+ options.readConcern = options.readConcern || this.s.readConcern;
+
+ // Do we have ignoreUndefined set
+ if(this.s.options.ignoreUndefined) {
+ options.ignoreUndefined = this.s.options.ignoreUndefined;
+ }
+
+ // Execute
+ if(options == null || !options.strict) {
+ try {
+ var collection = new Collection(this, this.s.topology, this.s.databaseName, name, this.s.pkFactory, options);
+ if(callback) callback(null, collection);
+ return collection;
+ } catch(err) {
+ if(callback) return callback(err);
+ throw err;
+ }
+ }
+
+ // Strict mode
+ if(typeof callback != 'function') {
+ throw toError(f("A callback is required in strict mode. While getting collection %s.", name));
+ }
+
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) {
+ return callback(new MongoError('topology was destroyed'));
+ }
+
+ // Strict mode
+ this.listCollections({name:name}).toArray(function(err, collections) {
+ if(err != null) return handleCallback(callback, err, null);
+ if(collections.length == 0) return handleCallback(callback, toError(f("Collection %s does not exist. Currently in strict mode.", name)), null);
+
+ try {
+ return handleCallback(callback, null, new Collection(self, self.s.topology, self.s.databaseName, name, self.s.pkFactory, options));
+ } catch(err) {
+ return handleCallback(callback, err, null);
+ }
+ });
+}
+
+define.classMethod('collection', {callback: true, promise:false, returns: [Collection]});
+
+function decorateWithWriteConcern(command, self, options) {
+ // Do we support write concerns 3.4 and higher
+ if(self.s.topology.capabilities().commandsTakeWriteConcern) {
+ // Get the write concern settings
+ var finalOptions = writeConcern(shallowClone(options), self, options);
+ // Add the write concern to the command
+ if(finalOptions.writeConcern) {
+ command.writeConcern = finalOptions.writeConcern;
+ }
+ }
+}
+
+var createCollection = function(self, name, options, callback) {
+ // Get the write concern options
+ var finalOptions = writeConcern(shallowClone(options), self, options);
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+
+ // Check if we have the name
+ self.listCollections({name: name})
+ .setReadPreference(ReadPreference.PRIMARY)
+ .toArray(function(err, collections) {
+ if(err != null) return handleCallback(callback, err, null);
+ if(collections.length > 0 && finalOptions.strict) {
+ return handleCallback(callback, MongoError.create({message: f("Collection %s already exists. Currently in strict mode.", name), driver:true}), null);
+ } else if (collections.length > 0) {
+ try { return handleCallback(callback, null, new Collection(self, self.s.topology, self.s.databaseName, name, self.s.pkFactory, options)); }
+ catch(err) { return handleCallback(callback, err); }
+ }
+
+ // Create collection command
+ var cmd = {'create':name};
+
+ // Decorate command with writeConcern if supported
+ decorateWithWriteConcern(cmd, self, options);
+
+ // Add all optional parameters
+ for(var n in options) {
+ if(options[n] != null && typeof options[n] != 'function')
+ cmd[n] = options[n];
+ }
+
+ // Force a primary read Preference
+ finalOptions.readPreference = ReadPreference.PRIMARY;
+
+ // Execute command
+ self.command(cmd, finalOptions, function(err, result) {
+ if(err) return handleCallback(callback, err);
+ handleCallback(callback, null, new Collection(self, self.s.topology, self.s.databaseName, name, self.s.pkFactory, options));
+ });
+ });
+}
+
+/**
+ * Create a new collection on a server with the specified options. Use this to create capped collections.
+ *
+ * @method
+ * @param {string} name the collection name we wish to access.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.raw=false] Return document results as raw BSON buffers.
+ * @param {object} [options.pkFactory=null] A primary key factory object for generation of custom _id keys.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {boolean} [options.serializeFunctions=false] Serialize functions on any object.
+ * @param {boolean} [options.strict=false] Returns an error if the collection does not exist
+ * @param {boolean} [options.capped=false] Create a capped collection.
+ * @param {number} [options.size=null] The size of the capped collection in bytes.
+ * @param {number} [options.max=null] The maximum number of documents in the capped collection.
+ * @param {boolean} [options.autoIndexId=true] Create an index on the _id field of the document, True by default on MongoDB 2.2 or higher off for version < 2.2.
+ * @param {object} [options.collation=null] Specify collation (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields).
+ * @param {Db~collectionResultCallback} [callback] The results callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.createCollection = function(name, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 0);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ name = args.length ? args.shift() : null;
+ options = args.length ? args.shift() || {} : {};
+
+ // Do we have a promisesLibrary
+ options.promiseLibrary = options.promiseLibrary || this.s.promiseLibrary;
+
+ // Check if the callback is in fact a string
+ if(typeof callback == 'string') name = callback;
+
+ // Execute the fallback callback
+ if(typeof callback == 'function') return createCollection(self, name, options, callback);
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ createCollection(self, name, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+}
+
+define.classMethod('createCollection', {callback: true, promise:true});
+
+/**
+ * Get all the db statistics.
+ *
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {number} [options.scale=null] Divide the returned sizes by scale value.
+ * @param {Db~resultCallback} [callback] The collection result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.stats = function(options, callback) {
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+ // Build command object
+ var commandObject = { dbStats:true };
+ // Check if we have the scale value
+ if(options['scale'] != null) commandObject['scale'] = options['scale'];
+
+ // If we have a readPreference set
+ if(options.readPreference == null && this.s.readPreference) {
+ options.readPreference = this.s.readPreference;
+ }
+
+ // Execute the command
+ return this.command(commandObject, options, callback);
+}
+
+define.classMethod('stats', {callback: true, promise:true});
+
+// Transformation methods for cursor results
+var listCollectionsTranforms = function(databaseName) {
+ var matching = f('%s.', databaseName);
+
+ return {
+ doc: function(doc) {
+ var index = doc.name.indexOf(matching);
+ // Remove database name if available
+ if(doc.name && index == 0) {
+ doc.name = doc.name.substr(index + matching.length);
+ }
+
+ return doc;
+ }
+ }
+}
+
+/**
+ * Get the list of all collection information for the specified db.
+ *
+ * @method
+ * @param {object} filter Query to filter collections by
+ * @param {object} [options=null] Optional settings.
+ * @param {number} [options.batchSize=null] The batchSize for the returned command cursor or if pre 2.8 the systems batch collection
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @return {CommandCursor}
+ */
+Db.prototype.listCollections = function(filter, options) {
+ filter = filter || {};
+ options = options || {};
+
+ // Shallow clone the object
+ options = shallowClone(options);
+ // Set the promise library
+ options.promiseLibrary = this.s.promiseLibrary;
+
+ // Ensure valid readPreference
+ if(options.readPreference) {
+ options.readPreference = convertReadPreference(options.readPreference);
+ }
+
+ // We have a list collections command
+ if(this.serverConfig.capabilities().hasListCollectionsCommand) {
+ // Cursor options
+ var cursor = options.batchSize ? {batchSize: options.batchSize} : {}
+ // Build the command
+ var command = { listCollections : true, filter: filter, cursor: cursor };
+ // Set the AggregationCursor constructor
+ options.cursorFactory = CommandCursor;
+ // Create the cursor
+ var cursor = this.s.topology.cursor(f('%s.$cmd', this.s.databaseName), command, options);
+ // Do we have a readPreference, apply it
+ if(options.readPreference) {
+ cursor.setReadPreference(options.readPreference);
+ }
+ // Return the cursor
+ return cursor;
+ }
+
+ // We cannot use the listCollectionsCommand
+ if(!this.serverConfig.capabilities().hasListCollectionsCommand) {
+ // If we have legacy mode and have not provided a full db name filter it
+ if(typeof filter.name == 'string' && !(new RegExp('^' + this.databaseName + '\\.').test(filter.name))) {
+ filter = shallowClone(filter);
+ filter.name = f('%s.%s', this.s.databaseName, filter.name);
+ }
+ }
+
+ // No filter, filter by current database
+ if(filter == null) {
+ filter.name = f('/%s/', this.s.databaseName);
+ }
+
+ // Rewrite the filter to use $and to filter out indexes
+ if(filter.name) {
+ filter = {$and: [{name: filter.name}, {name:/^((?!\$).)*$/}]};
+ } else {
+ filter = {name:/^((?!\$).)*$/};
+ }
+
+ // Return options
+ var _options = {transforms: listCollectionsTranforms(this.s.databaseName)}
+ // Get the cursor
+ var cursor = this.collection(Db.SYSTEM_NAMESPACE_COLLECTION).find(filter, _options);
+ // Do we have a readPreference, apply it
+ if(options.readPreference) cursor.setReadPreference(options.readPreference);
+ // Set the passed in batch size if one was provided
+ if(options.batchSize) cursor = cursor.batchSize(options.batchSize);
+ // We have a fallback mode using legacy systems collections
+ return cursor;
+};
+
+define.classMethod('listCollections', {callback: false, promise:false, returns: [CommandCursor]});
+
+var evaluate = function(self, code, parameters, options, callback) {
+ var finalCode = code;
+ var finalParameters = [];
+
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+
+ // If not a code object translate to one
+ if(!(finalCode instanceof Code)) finalCode = new Code(finalCode);
+ // Ensure the parameters are correct
+ if(parameters != null && !Array.isArray(parameters) && typeof parameters !== 'function') {
+ finalParameters = [parameters];
+ } else if(parameters != null && Array.isArray(parameters) && typeof parameters !== 'function') {
+ finalParameters = parameters;
+ }
+
+ // Create execution selector
+ var cmd = {'$eval':finalCode, 'args':finalParameters};
+ // Check if the nolock parameter is passed in
+ if(options['nolock']) {
+ cmd['nolock'] = options['nolock'];
+ }
+
+ // Set primary read preference
+ options.readPreference = new CoreReadPreference(ReadPreference.PRIMARY);
+
+ // Execute the command
+ self.command(cmd, options, function(err, result) {
+ if(err) return handleCallback(callback, err, null);
+ if(result && result.ok == 1) return handleCallback(callback, null, result.retval);
+ if(result) return handleCallback(callback, MongoError.create({message: f("eval failed: %s", result.errmsg), driver:true}), null);
+ handleCallback(callback, err, result);
+ });
+}
+
+/**
+ * Evaluate JavaScript on the server
+ *
+ * @method
+ * @param {Code} code JavaScript to execute on server.
+ * @param {(object|array)} parameters The parameters for the call.
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.nolock=false] Tell MongoDB not to block on the evaulation of the javascript.
+ * @param {Db~resultCallback} [callback] The results callback
+ * @deprecated Eval is deprecated on MongoDB 3.2 and forward
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.eval = function(code, parameters, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ parameters = args.length ? args.shift() : parameters;
+ options = args.length ? args.shift() || {} : {};
+
+ // Check if the callback is in fact a string
+ if(typeof callback == 'function') return evaluate(self, code, parameters, options, callback);
+ // Execute the command
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ evaluate(self, code, parameters, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+define.classMethod('eval', {callback: true, promise:true});
+
+/**
+ * Rename a collection.
+ *
+ * @method
+ * @param {string} fromCollection Name of current collection to rename.
+ * @param {string} toCollection New name of of the collection.
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.dropTarget=false] Drop the target name collection if it previously exists.
+ * @param {Db~collectionResultCallback} [callback] The results callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.renameCollection = function(fromCollection, toCollection, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+ // Add return new collection
+ options.new_collection = true;
+
+ // Check if the callback is in fact a string
+ if(typeof callback == 'function') {
+ return this.collection(fromCollection).rename(toCollection, options, callback);
+ }
+
+ // Return a promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.collection(fromCollection).rename(toCollection, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+define.classMethod('renameCollection', {callback: true, promise:true});
+
+/**
+ * Drop a collection from the database, removing it permanently. New accesses will create a new collection.
+ *
+ * @method
+ * @param {string} name Name of collection to drop
+ * @param {Db~resultCallback} [callback] The results callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.dropCollection = function(name, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // Command to execute
+ var cmd = {'drop':name}
+
+ // Decorate with write concern
+ decorateWithWriteConcern(cmd, self, options);
+
+ // options
+ options = assign({}, this.s.options, {readPreference: ReadPreference.PRIMARY});
+
+ // Check if the callback is in fact a string
+ if(typeof callback == 'function') return this.command(cmd, options, function(err, result) {
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+ if(err) return handleCallback(callback, err);
+ if(result.ok) return handleCallback(callback, null, true);
+ handleCallback(callback, null, false);
+ });
+
+ // Clone the options
+ var options = shallowClone(self.s.options);
+ // Set readPreference PRIMARY
+ options.readPreference = ReadPreference.PRIMARY;
+
+ // Execute the command
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ // Execute command
+ self.command(cmd, options, function(err, result) {
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return reject(new MongoError('topology was destroyed'));
+ if(err) return reject(err);
+ if(result.ok) return resolve(true);
+ resolve(false);
+ });
+ });
+};
+
+define.classMethod('dropCollection', {callback: true, promise:true});
+
+/**
+ * Drop a database, removing it permanently from the server.
+ *
+ * @method
+ * @param {Db~resultCallback} [callback] The results callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.dropDatabase = function(options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+ // Drop database command
+ var cmd = {'dropDatabase':1};
+
+ // Decorate with write concern
+ decorateWithWriteConcern(cmd, self, options);
+
+ // Ensure primary only
+ var options = assign({}, this.s.options, {readPreference: ReadPreference.PRIMARY});
+
+ // Check if the callback is in fact a string
+ if(typeof callback == 'function') return this.command(cmd, options, function(err, result) {
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+ if(callback == null) return;
+ if(err) return handleCallback(callback, err, null);
+ handleCallback(callback, null, result.ok ? true : false);
+ });
+
+ // Execute the command
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ // Execute command
+ self.command(cmd, options, function(err, result) {
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return reject(new MongoError('topology was destroyed'));
+ if(err) return reject(err);
+ if(result.ok) return resolve(true);
+ resolve(false);
+ });
+ });
+}
+
+define.classMethod('dropDatabase', {callback: true, promise:true});
+
+/**
+ * The callback format for the collections method.
+ * @callback Db~collectionsResultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Collection[]} collections An array of all the collections objects for the db instance.
+ */
+var collections = function(self, callback) {
+ // Let's get the collection names
+ self.listCollections().toArray(function(err, documents) {
+ if(err != null) return handleCallback(callback, err, null);
+ // Filter collections removing any illegal ones
+ documents = documents.filter(function(doc) {
+ return doc.name.indexOf('$') == -1;
+ });
+
+ // Return the collection objects
+ handleCallback(callback, null, documents.map(function(d) {
+ return new Collection(self, self.s.topology, self.s.databaseName, d.name.replace(self.s.databaseName + ".", ''), self.s.pkFactory, self.s.options);
+ }));
+ });
+}
+
+/**
+ * Fetch all collections for the current db.
+ *
+ * @method
+ * @param {Db~collectionsResultCallback} [callback] The results callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.collections = function(callback) {
+ var self = this;
+
+ // Return the callback
+ if(typeof callback == 'function') return collections(self, callback);
+ // Return the promise
+ return new self.s.promiseLibrary(function(resolve, reject) {
+ collections(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+define.classMethod('collections', {callback: true, promise:true});
+
+/**
+ * Runs a command on the database as admin.
+ * @method
+ * @param {object} command The command hash
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {Db~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.executeDbAdminCommand = function(selector, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // Return the callback
+ if(typeof callback == 'function') {
+ // Convert read preference
+ if(options.readPreference) {
+ options.readPreference = convertReadPreference(options.readPreference)
+ }
+
+ return self.s.topology.command('admin.$cmd', selector, options, function(err, result) {
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+ if(err) return handleCallback(callback, err);
+ handleCallback(callback, null, result.result);
+ });
+ }
+
+ // Return promise
+ return new self.s.promiseLibrary(function(resolve, reject) {
+ self.s.topology.command('admin.$cmd', selector, options, function(err, result) {
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return reject(new MongoError('topology was destroyed'));
+ if(err) return reject(err);
+ resolve(result.result);
+ });
+ });
+};
+
+define.classMethod('executeDbAdminCommand', {callback: true, promise:true});
+
+/**
+ * Creates an index on the db and collection collection.
+ * @method
+ * @param {string} name Name of the collection to create the index on.
+ * @param {(string|object)} fieldOrSpec Defines the index.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.unique=false] Creates an unique index.
+ * @param {boolean} [options.sparse=false] Creates a sparse index.
+ * @param {boolean} [options.background=false] Creates the index in the background, yielding whenever possible.
+ * @param {boolean} [options.dropDups=false] A unique index cannot be created on a key that has pre-existing duplicate values. If you would like to create the index anyway, keeping the first document the database indexes and deleting all subsequent documents that have duplicate value
+ * @param {number} [options.min=null] For geospatial indexes set the lower bound for the co-ordinates.
+ * @param {number} [options.max=null] For geospatial indexes set the high bound for the co-ordinates.
+ * @param {number} [options.v=null] Specify the format version of the indexes.
+ * @param {number} [options.expireAfterSeconds=null] Allows you to expire data on indexes applied to a data (MongoDB 2.2 or higher)
+ * @param {number} [options.name=null] Override the autogenerated index name (useful if the resulting name is larger than 128 bytes)
+ * @param {object} [options.partialFilterExpression=null] Creates a partial index based on the given filter object (MongoDB 3.2 or higher)
+ * @param {Db~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.createIndex = function(name, fieldOrSpec, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 2);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ options = args.length ? args.shift() || {} : {};
+ options = typeof callback === 'function' ? options : callback;
+ options = options == null ? {} : options;
+ // Shallow clone the options
+ options = shallowClone(options);
+ // Run only against primary
+ options.readPreference = ReadPreference.PRIMARY;
+
+ // If we have a callback fallback
+ if(typeof callback == 'function') return createIndex(self, name, fieldOrSpec, options, callback);
+ // Return a promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ createIndex(self, name, fieldOrSpec, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var createIndex = function(self, name, fieldOrSpec, options, callback) {
+ // Get the write concern options
+ var finalOptions = writeConcern({}, self, options);
+ // Ensure we have a callback
+ if(finalOptions.writeConcern && typeof callback != 'function') {
+ throw MongoError.create({message: "Cannot use a writeConcern without a provided callback", driver:true});
+ }
+
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+
+ // Attempt to run using createIndexes command
+ createIndexUsingCreateIndexes(self, name, fieldOrSpec, options, function(err, result) {
+ if(err == null) return handleCallback(callback, err, result);
+
+ // 67 = 'CannotCreateIndex' (malformed index options)
+ // 85 = 'IndexOptionsConflict' (index already exists with different options)
+ // 11000 = 'DuplicateKey' (couldn't build unique index because of dupes)
+ // These errors mean that the server recognized `createIndex` as a command
+ // and so we don't need to fallback to an insert.
+ if(err.code === 67 || err.code == 11000 || err.code === 85) {
+ return handleCallback(callback, err, result);
+ }
+
+ // Create command
+ var doc = createCreateIndexCommand(self, name, fieldOrSpec, options);
+ // Set no key checking
+ finalOptions.checkKeys = false;
+ // Insert document
+ self.s.topology.insert(f("%s.%s", self.s.databaseName, Db.SYSTEM_INDEX_COLLECTION), doc, finalOptions, function(err, result) {
+ if(callback == null) return;
+ if(err) return handleCallback(callback, err);
+ if(result == null) return handleCallback(callback, null, null);
+ if(result.result.writeErrors) return handleCallback(callback, MongoError.create(result.result.writeErrors[0]), null);
+ handleCallback(callback, null, doc.name);
+ });
+ });
+}
+
+define.classMethod('createIndex', {callback: true, promise:true});
+
+/**
+ * Ensures that an index exists, if it does not it creates it
+ * @method
+ * @deprecated since version 2.0
+ * @param {string} name The index name
+ * @param {(string|object)} fieldOrSpec Defines the index.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.unique=false] Creates an unique index.
+ * @param {boolean} [options.sparse=false] Creates a sparse index.
+ * @param {boolean} [options.background=false] Creates the index in the background, yielding whenever possible.
+ * @param {boolean} [options.dropDups=false] A unique index cannot be created on a key that has pre-existing duplicate values. If you would like to create the index anyway, keeping the first document the database indexes and deleting all subsequent documents that have duplicate value
+ * @param {number} [options.min=null] For geospatial indexes set the lower bound for the co-ordinates.
+ * @param {number} [options.max=null] For geospatial indexes set the high bound for the co-ordinates.
+ * @param {number} [options.v=null] Specify the format version of the indexes.
+ * @param {number} [options.expireAfterSeconds=null] Allows you to expire data on indexes applied to a data (MongoDB 2.2 or higher)
+ * @param {number} [options.name=null] Override the autogenerated index name (useful if the resulting name is larger than 128 bytes)
+ * @param {Db~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.ensureIndex = function(name, fieldOrSpec, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // If we have a callback fallback
+ if(typeof callback == 'function') return ensureIndex(self, name, fieldOrSpec, options, callback);
+
+ // Return a promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ ensureIndex(self, name, fieldOrSpec, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var ensureIndex = function(self, name, fieldOrSpec, options, callback) {
+ // Get the write concern options
+ var finalOptions = writeConcern({}, self, options);
+ // Create command
+ var selector = createCreateIndexCommand(self, name, fieldOrSpec, options);
+ var index_name = selector.name;
+
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+
+ // Default command options
+ var commandOptions = {};
+ // Check if the index allready exists
+ self.indexInformation(name, finalOptions, function(err, indexInformation) {
+ if(err != null && err.code != 26) return handleCallback(callback, err, null);
+ // If the index does not exist, create it
+ if(indexInformation == null || !indexInformation[index_name]) {
+ self.createIndex(name, fieldOrSpec, options, callback);
+ } else {
+ if(typeof callback === 'function') return handleCallback(callback, null, index_name);
+ }
+ });
+}
+
+define.classMethod('ensureIndex', {callback: true, promise:true});
+
+Db.prototype.addChild = function(db) {
+ if(this.s.parentDb) return this.s.parentDb.addChild(db);
+ this.s.children.push(db);
+}
+
+/**
+ * Create a new Db instance sharing the current socket connections. Be aware that the new db instances are
+ * related in a parent-child relationship to the original instance so that events are correctly emitted on child
+ * db instances. Child db instances are cached so performing db('db1') twice will return the same instance.
+ * You can control these behaviors with the options noListener and returnNonCachedInstance.
+ *
+ * @method
+ * @param {string} name The name of the database we want to use.
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.noListener=false] Do not make the db an event listener to the original connection.
+ * @param {boolean} [options.returnNonCachedInstance=false] Control if you want to return a cached instance or have a new one created
+ * @return {Db}
+ */
+Db.prototype.db = function(dbName, options) {
+ options = options || {};
+
+ // Copy the options and add out internal override of the not shared flag
+ var finalOptions = assign({}, this.options, options);
+
+ // Do we have the db in the cache already
+ if(this.s.dbCache[dbName] && finalOptions.returnNonCachedInstance !== true) {
+ return this.s.dbCache[dbName];
+ }
+
+ // Add current db as parentDb
+ if(finalOptions.noListener == null || finalOptions.noListener == false) {
+ finalOptions.parentDb = this;
+ }
+
+ // Add promiseLibrary
+ finalOptions.promiseLibrary = this.s.promiseLibrary;
+
+ // Return the db object
+ var db = new Db(dbName, this.s.topology, finalOptions)
+
+ // Add as child
+ if(finalOptions.noListener == null || finalOptions.noListener == false) {
+ this.addChild(db);
+ }
+
+ // Add the db to the cache
+ this.s.dbCache[dbName] = db;
+ // Return the database
+ return db;
+};
+
+define.classMethod('db', {callback: false, promise:false, returns: [Db]});
+
+var _executeAuthCreateUserCommand = function(self, username, password, options, callback) {
+ // Special case where there is no password ($external users)
+ if(typeof username == 'string'
+ && password != null && typeof password == 'object') {
+ options = password;
+ password = null;
+ }
+
+ // Unpack all options
+ if(typeof options == 'function') {
+ callback = options;
+ options = {};
+ }
+
+ // Error out if we digestPassword set
+ if(options.digestPassword != null) {
+ throw toError("The digestPassword option is not supported via add_user. Please use db.command('createUser', ...) instead for this option.");
+ }
+
+ // Get additional values
+ var customData = options.customData != null ? options.customData : {};
+ var roles = Array.isArray(options.roles) ? options.roles : [];
+ var maxTimeMS = typeof options.maxTimeMS == 'number' ? options.maxTimeMS : null;
+
+ // If not roles defined print deprecated message
+ if(roles.length == 0) {
+ console.log("Creating a user without roles is deprecated in MongoDB >= 2.6");
+ }
+
+ // Get the error options
+ var commandOptions = {writeCommand:true};
+ if(options['dbName']) commandOptions.dbName = options['dbName'];
+
+ // Add maxTimeMS to options if set
+ if(maxTimeMS != null) commandOptions.maxTimeMS = maxTimeMS;
+
+ // Check the db name and add roles if needed
+ if((self.databaseName.toLowerCase() == 'admin' || options.dbName == 'admin') && !Array.isArray(options.roles)) {
+ roles = ['root']
+ } else if(!Array.isArray(options.roles)) {
+ roles = ['dbOwner']
+ }
+
+ // Build the command to execute
+ var command = {
+ createUser: username
+ , customData: customData
+ , roles: roles
+ , digestPassword:false
+ }
+
+ // Apply write concern to command
+ command = writeConcern(command, self, options);
+
+ // Use node md5 generator
+ var md5 = crypto.createHash('md5');
+ // Generate keys used for authentication
+ md5.update(username + ":mongo:" + password);
+ var userPassword = md5.digest('hex');
+
+ // No password
+ if(typeof password == 'string') {
+ command.pwd = userPassword;
+ }
+
+ // Force write using primary
+ commandOptions.readPreference = ReadPreference.primary;
+
+ // Execute the command
+ self.command(command, commandOptions, function(err, result) {
+ if(err && err.ok == 0 && err.code == undefined) return handleCallback(callback, {code: -5000}, null);
+ if(err) return handleCallback(callback, err, null);
+ handleCallback(callback, !result.ok ? toError(result) : null
+ , result.ok ? [{user: username, pwd: ''}] : null);
+ })
+}
+
+var addUser = function(self, username, password, options, callback) {
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+ // Attempt to execute auth command
+ _executeAuthCreateUserCommand(self, username, password, options, function(err, r) {
+ // We need to perform the backward compatible insert operation
+ if(err && err.code == -5000) {
+ var finalOptions = writeConcern(shallowClone(options), self, options);
+ // Use node md5 generator
+ var md5 = crypto.createHash('md5');
+ // Generate keys used for authentication
+ md5.update(username + ":mongo:" + password);
+ var userPassword = md5.digest('hex');
+
+ // If we have another db set
+ var db = options.dbName ? self.db(options.dbName) : self;
+
+ // Fetch a user collection
+ var collection = db.collection(Db.SYSTEM_USER_COLLECTION);
+
+ // Check if we are inserting the first user
+ collection.count({}, function(err, count) {
+ // We got an error (f.ex not authorized)
+ if(err != null) return handleCallback(callback, err, null);
+ // Check if the user exists and update i
+ collection.find({user: username}, {dbName: options['dbName']}).toArray(function(err, documents) {
+ // We got an error (f.ex not authorized)
+ if(err != null) return handleCallback(callback, err, null);
+ // Add command keys
+ finalOptions.upsert = true;
+
+ // We have a user, let's update the password or upsert if not
+ collection.update({user: username},{$set: {user: username, pwd: userPassword}}, finalOptions, function(err, results, full) {
+ if(count == 0 && err) return handleCallback(callback, null, [{user:username, pwd:userPassword}]);
+ if(err) return handleCallback(callback, err, null)
+ handleCallback(callback, null, [{user:username, pwd:userPassword}]);
+ });
+ });
+ });
+
+ return;
+ }
+
+ if(err) return handleCallback(callback, err);
+ handleCallback(callback, err, r);
+ });
+}
+
+/**
+ * Add a user to the database.
+ * @method
+ * @param {string} username The username.
+ * @param {string} password The password.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {object} [options.customData=null] Custom data associated with the user (only Mongodb 2.6 or higher)
+ * @param {object[]} [options.roles=null] Roles associated with the created user (only Mongodb 2.6 or higher)
+ * @param {Db~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.addUser = function(username, password, options, callback) {
+ // Unpack the parameters
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 2);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ options = args.length ? args.shift() || {} : {};
+
+ // If we have a callback fallback
+ if(typeof callback == 'function') return addUser(self, username, password, options, callback);
+
+ // Return a promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ addUser(self, username, password, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+define.classMethod('addUser', {callback: true, promise:true});
+
+var _executeAuthRemoveUserCommand = function(self, username, options, callback) {
+ if(typeof options == 'function') callback = options, options = {};
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+ // Get the error options
+ var commandOptions = {writeCommand:true};
+ if(options['dbName']) commandOptions.dbName = options['dbName'];
+
+ // Get additional values
+ var maxTimeMS = typeof options.maxTimeMS == 'number' ? options.maxTimeMS : null;
+
+ // Add maxTimeMS to options if set
+ if(maxTimeMS != null) commandOptions.maxTimeMS = maxTimeMS;
+
+ // Build the command to execute
+ var command = {
+ dropUser: username
+ }
+
+ // Apply write concern to command
+ command = writeConcern(command, self, options);
+
+ // Force write using primary
+ commandOptions.readPreference = ReadPreference.primary;
+
+ // Execute the command
+ self.command(command, commandOptions, function(err, result) {
+ if(err && !err.ok && err.code == undefined) return handleCallback(callback, {code: -5000});
+ if(err) return handleCallback(callback, err, null);
+ handleCallback(callback, null, result.ok ? true : false);
+ })
+}
+
+var removeUser = function(self, username, options, callback) {
+ // Attempt to execute command
+ _executeAuthRemoveUserCommand(self, username, options, function(err, result) {
+ if(err && err.code == -5000) {
+ var finalOptions = writeConcern(shallowClone(options), self, options);
+ // If we have another db set
+ var db = options.dbName ? self.db(options.dbName) : self;
+
+ // Fetch a user collection
+ var collection = db.collection(Db.SYSTEM_USER_COLLECTION);
+
+ // Locate the user
+ collection.findOne({user: username}, {}, function(err, user) {
+ if(user == null) return handleCallback(callback, err, false);
+ collection.remove({user: username}, finalOptions, function(err, result) {
+ handleCallback(callback, err, true);
+ });
+ });
+
+ return;
+ }
+
+ if(err) return handleCallback(callback, err);
+ handleCallback(callback, err, result);
+ });
+}
+
+define.classMethod('removeUser', {callback: true, promise:true});
+
+/**
+ * Remove a user from a database
+ * @method
+ * @param {string} username The username.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {Db~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.removeUser = function(username, options, callback) {
+ // Unpack the parameters
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ options = args.length ? args.shift() || {} : {};
+
+ // If we have a callback fallback
+ if(typeof callback == 'function') return removeUser(self, username, options, callback);
+
+ // Return a promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ removeUser(self, username, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var authenticate = function(self, username, password, options, callback) {
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+
+ // the default db to authenticate against is 'self'
+ // if authententicate is called from a retry context, it may be another one, like admin
+ var authdb = options.authdb ? options.authdb : options.dbName;
+ authdb = options.authSource ? options.authSource : authdb;
+ authdb = authdb ? authdb : self.databaseName;
+
+ // Callback
+ var _callback = function(err, result) {
+ if(self.listeners('authenticated').length > 0) {
+ self.emit('authenticated', err, result);
+ }
+
+ // Return to caller
+ handleCallback(callback, err, result);
+ }
+
+ // authMechanism
+ var authMechanism = options.authMechanism || '';
+ authMechanism = authMechanism.toUpperCase();
+
+ // If classic auth delegate to auth command
+ if(authMechanism == 'MONGODB-CR') {
+ self.s.topology.auth('mongocr', authdb, username, password, function(err, result) {
+ if(err) return handleCallback(callback, err, false);
+ _callback(null, true);
+ });
+ } else if(authMechanism == 'PLAIN') {
+ self.s.topology.auth('plain', authdb, username, password, function(err, result) {
+ if(err) return handleCallback(callback, err, false);
+ _callback(null, true);
+ });
+ } else if(authMechanism == 'MONGODB-X509') {
+ self.s.topology.auth('x509', authdb, username, password, function(err, result) {
+ if(err) return handleCallback(callback, err, false);
+ _callback(null, true);
+ });
+ } else if(authMechanism == 'SCRAM-SHA-1') {
+ self.s.topology.auth('scram-sha-1', authdb, username, password, function(err, result) {
+ if(err) return handleCallback(callback, err, false);
+ _callback(null, true);
+ });
+ } else if(authMechanism == 'GSSAPI') {
+ if(process.platform == 'win32') {
+ self.s.topology.auth('sspi', authdb, username, password, options, function(err, result) {
+ if(err) return handleCallback(callback, err, false);
+ _callback(null, true);
+ });
+ } else {
+ self.s.topology.auth('gssapi', authdb, username, password, options, function(err, result) {
+ if(err) return handleCallback(callback, err, false);
+ _callback(null, true);
+ });
+ }
+ } else if(authMechanism == 'DEFAULT') {
+ self.s.topology.auth('default', authdb, username, password, function(err, result) {
+ if(err) return handleCallback(callback, err, false);
+ _callback(null, true);
+ });
+ } else {
+ handleCallback(callback, MongoError.create({message: f("authentication mechanism %s not supported", options.authMechanism), driver:true}));
+ }
+}
+
+/**
+ * Authenticate a user against the server.
+ * @method
+ * @param {string} username The username.
+ * @param {string} [password] The password.
+ * @param {object} [options=null] Optional settings.
+ * @param {string} [options.authMechanism=MONGODB-CR] The authentication mechanism to use, GSSAPI, MONGODB-CR, MONGODB-X509, PLAIN
+ * @param {Db~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.authenticate = function(username, password, options, callback) {
+ if(typeof options == 'function') callback = options, options = {};
+ var self = this;
+ // Shallow copy the options
+ options = shallowClone(options);
+
+ // Set default mechanism
+ if(!options.authMechanism) {
+ options.authMechanism = 'DEFAULT';
+ } else if(options.authMechanism != 'GSSAPI'
+ && options.authMechanism != 'DEFAULT'
+ && options.authMechanism != 'MONGODB-CR'
+ && options.authMechanism != 'MONGODB-X509'
+ && options.authMechanism != 'SCRAM-SHA-1'
+ && options.authMechanism != 'PLAIN') {
+ return handleCallback(callback, MongoError.create({message: "only DEFAULT, GSSAPI, PLAIN, MONGODB-X509, SCRAM-SHA-1 or MONGODB-CR is supported by authMechanism", driver:true}));
+ }
+
+ // If we have a callback fallback
+ if(typeof callback == 'function') return authenticate(self, username, password, options, function(err, r) {
+ // Support failed auth method
+ if(err && err.message && err.message.indexOf('saslStart') != -1) err.code = 59;
+ // Reject error
+ if(err) return callback(err, r);
+ callback(null, r);
+ });
+
+ // Return a promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ authenticate(self, username, password, options, function(err, r) {
+ // Support failed auth method
+ if(err && err.message && err.message.indexOf('saslStart') != -1) err.code = 59;
+ // Reject error
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+define.classMethod('authenticate', {callback: true, promise:true});
+
+/**
+ * Logout user from server, fire off on all connections and remove all auth info
+ * @method
+ * @param {object} [options=null] Optional settings.
+ * @param {string} [options.dbName=null] Logout against different database than current.
+ * @param {Db~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.logout = function(options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // Establish the correct database name
+ var dbName = this.s.authSource ? this.s.authSource : this.s.databaseName;
+ dbName = options.dbName ? options.dbName : dbName;
+
+ // If we have a callback
+ if(typeof callback == 'function') {
+ return self.s.topology.logout(dbName, function(err, r) {
+ if(err) return callback(err);
+ callback(null, true);
+ });
+ }
+
+ // Return a promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ self.s.topology.logout(dbName, function(err, r) {
+ if(err) return reject(err);
+ resolve(true);
+ });
+ });
+}
+
+define.classMethod('logout', {callback: true, promise:true});
+
+// Figure out the read preference
+var getReadPreference = function(options, db) {
+ if(options.readPreference) return options;
+ if(db.readPreference) options.readPreference = db.readPreference;
+ return options;
+}
+
+/**
+ * Retrieves this collections index info.
+ * @method
+ * @param {string} name The name of the collection.
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.full=false] Returns the full raw index information.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {Db~resultCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+Db.prototype.indexInformation = function(name, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {};
+ options = options || {};
+
+ // If we have a callback fallback
+ if(typeof callback == 'function') return indexInformation(self, name, options, callback);
+
+ // Return a promise
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ indexInformation(self, name, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ });
+ });
+};
+
+var indexInformation = function(self, name, options, callback) {
+ // If we specified full information
+ var full = options['full'] == null ? false : options['full'];
+
+ // Did the user destroy the topology
+ if(self.serverConfig && self.serverConfig.isDestroyed()) return callback(new MongoError('topology was destroyed'));
+
+ // Process all the results from the index command and collection
+ var processResults = function(indexes) {
+ // Contains all the information
+ var info = {};
+ // Process all the indexes
+ for(var i = 0; i < indexes.length; i++) {
+ var index = indexes[i];
+ // Let's unpack the object
+ info[index.name] = [];
+ for(var name in index.key) {
+ info[index.name].push([name, index.key[name]]);
+ }
+ }
+
+ return info;
+ }
+
+ // Get the list of indexes of the specified collection
+ self.collection(name).listIndexes().toArray(function(err, indexes) {
+ if(err) return callback(toError(err));
+ if(!Array.isArray(indexes)) return handleCallback(callback, null, []);
+ if(full) return handleCallback(callback, null, indexes);
+ handleCallback(callback, null, processResults(indexes));
+ });
+}
+
+define.classMethod('indexInformation', {callback: true, promise:true});
+
+var createCreateIndexCommand = function(db, name, fieldOrSpec, options) {
+ var indexParameters = parseIndexOptions(fieldOrSpec);
+ var fieldHash = indexParameters.fieldHash;
+ var keys = indexParameters.keys;
+
+ // Generate the index name
+ var indexName = typeof options.name == 'string' ? options.name : indexParameters.name;
+ var selector = {
+ 'ns': db.databaseName + "." + name, 'key': fieldHash, 'name': indexName
+ }
+
+ // Ensure we have a correct finalUnique
+ var finalUnique = options == null || 'object' === typeof options ? false : options;
+ // Set up options
+ options = options == null || typeof options == 'boolean' ? {} : options;
+
+ // Add all the options
+ var keysToOmit = Object.keys(selector);
+ for(var optionName in options) {
+ if(keysToOmit.indexOf(optionName) == -1) {
+ selector[optionName] = options[optionName];
+ }
+ }
+
+ if(selector['unique'] == null) selector['unique'] = finalUnique;
+
+ // Remove any write concern operations
+ var removeKeys = ['w', 'wtimeout', 'j', 'fsync', 'readPreference'];
+ for(var i = 0; i < removeKeys.length; i++) {
+ delete selector[removeKeys[i]];
+ }
+
+ // Return the command creation selector
+ return selector;
+}
+
+var createIndexUsingCreateIndexes = function(self, name, fieldOrSpec, options, callback) {
+ // Build the index
+ var indexParameters = parseIndexOptions(fieldOrSpec);
+ // Generate the index name
+ var indexName = typeof options.name == 'string' ? options.name : indexParameters.name;
+ // Set up the index
+ var indexes = [{ name: indexName, key: indexParameters.fieldHash }];
+ // merge all the options
+ var keysToOmit = Object.keys(indexes[0]);
+ for(var optionName in options) {
+ if(keysToOmit.indexOf(optionName) == -1) {
+ indexes[0][optionName] = options[optionName];
+ }
+
+ // Remove any write concern operations
+ var removeKeys = ['w', 'wtimeout', 'j', 'fsync', 'readPreference'];
+ for(var i = 0; i < removeKeys.length; i++) {
+ delete indexes[0][removeKeys[i]];
+ }
+ }
+
+ // Get capabilities
+ var capabilities = self.s.topology.capabilities();
+
+ // Did the user pass in a collation, check if our write server supports it
+ if(indexes[0].collation && capabilities && !capabilities.commandsTakeCollation) {
+ // Create a new error
+ var error = new MongoError(f('server/primary/mongos does not support collation'));
+ error.code = 67;
+ // Return the error
+ return callback(error);
+ }
+
+ // Create command, apply write concern to command
+ var cmd = writeConcern({createIndexes: name, indexes: indexes}, self, options);
+
+ // Decorate command with writeConcern if supported
+ decorateWithWriteConcern(cmd, self, options);
+
+ // ReadPreference primary
+ options.readPreference = ReadPreference.PRIMARY;
+
+ // Build the command
+ self.command(cmd, options, function(err, result) {
+ if(err) return handleCallback(callback, err, null);
+ if(result.ok == 0) return handleCallback(callback, toError(result), null);
+ // Return the indexName for backward compatibility
+ handleCallback(callback, null, indexName);
+ });
+}
+
+// Validate the database name
+var validateDatabaseName = function(databaseName) {
+ if(typeof databaseName !== 'string') throw MongoError.create({message: "database name must be a string", driver:true});
+ if(databaseName.length === 0) throw MongoError.create({message: "database name cannot be the empty string", driver:true});
+ if(databaseName == '$external') return;
+
+ var invalidChars = [" ", ".", "$", "/", "\\"];
+ for(var i = 0; i < invalidChars.length; i++) {
+ if(databaseName.indexOf(invalidChars[i]) != -1) throw MongoError.create({message: "database names cannot contain the character '" + invalidChars[i] + "'", driver:true});
+ }
+}
+
+// Get write concern
+var writeConcern = function(target, db, options) {
+ if(options.w != null || options.j != null || options.fsync != null) {
+ var opts = {};
+ if(options.w) opts.w = options.w;
+ if(options.wtimeout) opts.wtimeout = options.wtimeout;
+ if(options.j) opts.j = options.j;
+ if(options.fsync) opts.fsync = options.fsync;
+ target.writeConcern = opts;
+ } else if(db.writeConcern.w != null || db.writeConcern.j != null || db.writeConcern.fsync != null) {
+ target.writeConcern = db.writeConcern;
+ }
+
+ return target
+}
+
+// Add listeners to topology
+var createListener = function(self, e, object) {
+ var listener = function(err) {
+ if(object.listeners(e).length > 0) {
+ object.emit(e, err, self);
+
+ // Emit on all associated db's if available
+ for(var i = 0; i < self.s.children.length; i++) {
+ self.s.children[i].emit(e, err, self.s.children[i]);
+ }
+ }
+ }
+ return listener;
+}
+
+
+/**
+ * Unref all sockets
+ * @method
+ */
+Db.prototype.unref = function(options, callback) {
+ this.s.topology.unref();
+}
+
+/**
+ * Db close event
+ *
+ * Emitted after a socket closed against a single server or mongos proxy.
+ *
+ * @event Db#close
+ * @type {MongoError}
+ */
+
+/**
+ * Db authenticated event
+ *
+ * Emitted after all server members in the topology (single server, replicaset or mongos) have successfully authenticated.
+ *
+ * @event Db#authenticated
+ * @type {object}
+ */
+
+/**
+ * Db reconnect event
+ *
+ * * Server: Emitted when the driver has reconnected and re-authenticated.
+ * * ReplicaSet: N/A
+ * * Mongos: Emitted when the driver reconnects and re-authenticates successfully against a Mongos.
+ *
+ * @event Db#reconnect
+ * @type {object}
+ */
+
+/**
+ * Db error event
+ *
+ * Emitted after an error occurred against a single server or mongos proxy.
+ *
+ * @event Db#error
+ * @type {MongoError}
+ */
+
+/**
+ * Db timeout event
+ *
+ * Emitted after a socket timeout occurred against a single server or mongos proxy.
+ *
+ * @event Db#timeout
+ * @type {MongoError}
+ */
+
+/**
+ * Db parseError event
+ *
+ * The parseError event is emitted if the driver detects illegal or corrupt BSON being received from the server.
+ *
+ * @event Db#parseError
+ * @type {MongoError}
+ */
+
+/**
+ * Db fullsetup event, emitted when all servers in the topology have been connected to at start up time.
+ *
+ * * Server: Emitted when the driver has connected to the single server and has authenticated.
+ * * ReplSet: Emitted after the driver has attempted to connect to all replicaset members.
+ * * Mongos: Emitted after the driver has attempted to connect to all mongos proxies.
+ *
+ * @event Db#fullsetup
+ * @type {Db}
+ */
+
+// Constants
+Db.SYSTEM_NAMESPACE_COLLECTION = "system.namespaces";
+Db.SYSTEM_INDEX_COLLECTION = "system.indexes";
+Db.SYSTEM_PROFILE_COLLECTION = "system.profile";
+Db.SYSTEM_USER_COLLECTION = "system.users";
+Db.SYSTEM_COMMAND_COLLECTION = "$cmd";
+Db.SYSTEM_JS_COLLECTION = "system.js";
+
+module.exports = Db;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/gridfs-stream/download.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/gridfs-stream/download.js
new file mode 100644
index 0000000..494c34a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/gridfs-stream/download.js
@@ -0,0 +1,399 @@
+var shallowClone = require('../utils').shallowClone;
+var stream = require('stream');
+var util = require('util');
+
+module.exports = GridFSBucketReadStream;
+
+/**
+ * A readable stream that enables you to read buffers from GridFS.
+ *
+ * Do not instantiate this class directly. Use `openDownloadStream()` instead.
+ *
+ * @class
+ * @param {Collection} chunks Handle for chunks collection
+ * @param {Collection} files Handle for files collection
+ * @param {Object} readPreference The read preference to use
+ * @param {Object} filter The query to use to find the file document
+ * @param {Object} [options=null] Optional settings.
+ * @param {Number} [options.sort=null] Optional sort for the file find query
+ * @param {Number} [options.skip=null] Optional skip for the file find query
+ * @param {Number} [options.start=null] Optional 0-based offset in bytes to start streaming from
+ * @param {Number} [options.end=null] Optional 0-based offset in bytes to stop streaming before
+ * @fires GridFSBucketReadStream#error
+ * @fires GridFSBucketReadStream#file
+ * @return {GridFSBucketReadStream} a GridFSBucketReadStream instance.
+ */
+
+function GridFSBucketReadStream(chunks, files, readPreference, filter, options) {
+ var _this = this;
+ this.s = {
+ bytesRead: 0,
+ chunks: chunks,
+ cursor: null,
+ expected: 0,
+ files: files,
+ filter: filter,
+ init: false,
+ expectedEnd: 0,
+ file: null,
+ options: options,
+ readPreference: readPreference
+ };
+
+ stream.Readable.call(this);
+}
+
+util.inherits(GridFSBucketReadStream, stream.Readable);
+
+/**
+ * An error occurred
+ *
+ * @event GridFSBucketReadStream#error
+ * @type {Error}
+ */
+
+/**
+ * Fires when the stream loaded the file document corresponding to the
+ * provided id.
+ *
+ * @event GridFSBucketReadStream#file
+ * @type {object}
+ */
+
+/**
+ * Emitted when a chunk of data is available to be consumed.
+ *
+ * @event GridFSBucketReadStream#data
+ * @type {object}
+ */
+
+/**
+ * Fired when the stream is exhausted (no more data events).
+ *
+ * @event GridFSBucketReadStream#end
+ * @type {object}
+ */
+
+/**
+ * Fired when the stream is exhausted and the underlying cursor is killed
+ *
+ * @event GridFSBucketReadStream#close
+ * @type {object}
+ */
+
+/**
+ * Reads from the cursor and pushes to the stream.
+ * @method
+ */
+
+GridFSBucketReadStream.prototype._read = function() {
+ var _this = this;
+ if (this.destroyed) {
+ return;
+ }
+
+ waitForFile(_this, function() {
+ doRead(_this);
+ });
+};
+
+/**
+ * Sets the 0-based offset in bytes to start streaming from. Throws
+ * an error if this stream has entered flowing mode
+ * (e.g. if you've already called `on('data')`)
+ * @method
+ * @param {Number} start Offset in bytes to start reading at
+ * @return {GridFSBucketReadStream}
+ */
+
+GridFSBucketReadStream.prototype.start = function(start) {
+ throwIfInitialized(this);
+ this.s.options.start = start;
+ return this;
+};
+
+/**
+ * Sets the 0-based offset in bytes to start streaming from. Throws
+ * an error if this stream has entered flowing mode
+ * (e.g. if you've already called `on('data')`)
+ * @method
+ * @param {Number} end Offset in bytes to stop reading at
+ * @return {GridFSBucketReadStream}
+ */
+
+GridFSBucketReadStream.prototype.end = function(end) {
+ throwIfInitialized(this);
+ this.s.options.end = end;
+ return this;
+};
+
+/**
+ * Marks this stream as aborted (will never push another `data` event)
+ * and kills the underlying cursor. Will emit the 'end' event, and then
+ * the 'close' event once the cursor is successfully killed.
+ *
+ * @method
+ * @param {GridFSBucket~errorCallback} [callback] called when the cursor is successfully closed or an error occurred.
+ * @fires GridFSBucketWriteStream#close
+ * @fires GridFSBucketWriteStream#end
+ */
+
+GridFSBucketReadStream.prototype.abort = function(callback) {
+ var _this = this;
+ this.push(null);
+ this.destroyed = true;
+ if (this.s.cursor) {
+ this.s.cursor.close(function(error) {
+ _this.emit('close');
+ callback && callback(error);
+ });
+ } else {
+ if (!this.s.init) {
+ // If not initialized, fire close event because we will never
+ // get a cursor
+ _this.emit('close');
+ }
+ callback && callback();
+ }
+};
+
+/**
+ * @ignore
+ */
+
+function throwIfInitialized(self) {
+ if (self.s.init) {
+ throw new Error('You cannot change options after the stream has entered' +
+ 'flowing mode!');
+ }
+}
+
+/**
+ * @ignore
+ */
+
+function doRead(_this) {
+ if (_this.destroyed) {
+ return;
+ }
+
+ _this.s.cursor.next(function(error, doc) {
+ if (_this.destroyed) {
+ return;
+ }
+ if (error) {
+ return __handleError(_this, error);
+ }
+ if (!doc) {
+ _this.push(null);
+ return _this.s.cursor.close(function(error) {
+ if (error) {
+ return __handleError(_this, error);
+ }
+ _this.emit('close');
+ });
+ }
+
+ var bytesRemaining = _this.s.file.length - _this.s.bytesRead;
+ var expectedN = _this.s.expected++;
+ var expectedLength = Math.min(_this.s.file.chunkSize,
+ bytesRemaining);
+
+ if (doc.n > expectedN) {
+ var errmsg = 'ChunkIsMissing: Got unexpected n: ' + doc.n +
+ ', expected: ' + expectedN;
+ return __handleError(_this, new Error(errmsg));
+ }
+
+ if (doc.n < expectedN) {
+ var errmsg = 'ExtraChunk: Got unexpected n: ' + doc.n +
+ ', expected: ' + expectedN;
+ return __handleError(_this, new Error(errmsg));
+ }
+
+ if (doc.data.length() !== expectedLength) {
+ if (bytesRemaining <= 0) {
+ var errmsg = 'ExtraChunk: Got unexpected n: ' + doc.n;
+ return __handleError(_this, new Error(errmsg));
+ }
+ var errmsg = 'ChunkIsWrongSize: Got unexpected length: ' +
+ doc.data.length() + ', expected: ' + expectedLength;
+ return __handleError(_this, new Error(errmsg));
+ }
+
+ _this.s.bytesRead += doc.data.length();
+
+ if (doc.data.buffer.length === 0) {
+ return _this.push(null);
+ }
+
+ var sliceStart = null;
+ var sliceEnd = null;
+ var buf = doc.data.buffer;
+
+ if (_this.s.bytesToSkip != null) {
+ sliceStart = _this.s.bytesToSkip;
+ _this.s.bytesToSkip = 0;
+ }
+
+ if (expectedN === _this.s.expectedEnd && _this.s.bytesToTrim != null) {
+ sliceEnd = _this.s.bytesToTrim;
+ }
+
+ // If the remaining amount of data left is < chunkSize read the right amount of data
+ if (_this.s.options.end && (
+ (_this.s.options.end - _this.s.bytesToSkip) < doc.data.length()
+ )) {
+ sliceEnd = (_this.s.options.end - _this.s.bytesToSkip);
+ }
+
+ if (sliceStart != null || sliceEnd != null) {
+ buf = buf.slice(sliceStart || 0, sliceEnd || buf.length);
+ }
+
+ _this.push(buf);
+ });
+};
+
+/**
+ * @ignore
+ */
+
+function init(self) {
+ var findOneOptions = {};
+ if (self.s.readPreference) {
+ findOneOptions.readPreference = self.s.readPreference;
+ }
+ if (self.s.options && self.s.options.sort) {
+ findOneOptions.sort = self.s.options.sort;
+ }
+ if (self.s.options && self.s.options.skip) {
+ findOneOptions.skip = self.s.options.skip;
+ }
+
+ self.s.files.findOne(self.s.filter, findOneOptions, function(error, doc) {
+ if (error) {
+ return __handleError(self, error);
+ }
+ if (!doc) {
+ var identifier = self.s.filter._id ?
+ self.s.filter._id.toString() : self.s.filter.filename;
+ var errmsg = 'FileNotFound: file ' + identifier + ' was not found';
+ var err = new Error(errmsg);
+ err.code = 'ENOENT';
+ return __handleError(self, err);
+ }
+
+ // If document is empty, kill the stream immediately and don't
+ // execute any reads
+ if (doc.length <= 0) {
+ self.push(null);
+ return;
+ }
+
+ if (self.destroyed) {
+ // If user destroys the stream before we have a cursor, wait
+ // until the query is done to say we're 'closed' because we can't
+ // cancel a query.
+ self.emit('close');
+ return;
+ }
+
+ self.s.cursor = self.s.chunks.find({ files_id: doc._id }).sort({ n: 1 });
+ if (self.s.readPreference) {
+ self.s.cursor.setReadPreference(self.s.readPreference);
+ }
+
+ self.s.expectedEnd = Math.ceil(doc.length / doc.chunkSize);
+ self.s.file = doc;
+ self.s.bytesToSkip = handleStartOption(self, doc, self.s.cursor,
+ self.s.options);
+ self.s.bytesToTrim = handleEndOption(self, doc, self.s.cursor,
+ self.s.options);
+ self.emit('file', doc);
+ });
+}
+
+/**
+ * @ignore
+ */
+
+function waitForFile(_this, callback) {
+ if (_this.s.file) {
+ return callback();
+ }
+
+ if (!_this.s.init) {
+ init(_this);
+ _this.s.init = true;
+ }
+
+ _this.once('file', function() {
+ callback();
+ });
+};
+
+/**
+ * @ignore
+ */
+
+function handleStartOption(stream, doc, cursor, options) {
+ if (options && options.start != null) {
+ if (options.start > doc.length) {
+ throw new Error('Stream start (' + options.start + ') must not be ' +
+ 'more than the length of the file (' + doc.length +')')
+ }
+ if (options.start < 0) {
+ throw new Error('Stream start (' + options.start + ') must not be ' +
+ 'negative');
+ }
+ if (options.end != null && options.end < options.start) {
+ throw new Error('Stream start (' + options.start + ') must not be ' +
+ 'greater than stream end (' + options.end + ')');
+ }
+
+ cursor.skip(Math.floor(options.start / doc.chunkSize));
+
+ stream.s.bytesRead = Math.floor(options.start / doc.chunkSize) *
+ doc.chunkSize;
+ stream.s.expected = Math.floor(options.start / doc.chunkSize);
+
+ return options.start - stream.s.bytesRead;
+ }
+}
+
+/**
+ * @ignore
+ */
+
+function handleEndOption(stream, doc, cursor, options) {
+ if (options && options.end != null) {
+ if (options.end > doc.length) {
+ throw new Error('Stream end (' + options.end + ') must not be ' +
+ 'more than the length of the file (' + doc.length +')')
+ }
+ if (options.start < 0) {
+ throw new Error('Stream end (' + options.end + ') must not be ' +
+ 'negative');
+ }
+
+ var start = options.start != null ?
+ Math.floor(options.start / doc.chunkSize) :
+ 0;
+
+ cursor.limit(Math.ceil(options.end / doc.chunkSize) - start);
+
+ stream.s.expectedEnd = Math.ceil(options.end / doc.chunkSize);
+
+ return (Math.ceil(options.end / doc.chunkSize) * doc.chunkSize) -
+ options.end;
+ }
+}
+
+/**
+ * @ignore
+ */
+
+function __handleError(_this, error) {
+ _this.emit('error', error);
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/gridfs-stream/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/gridfs-stream/index.js
new file mode 100644
index 0000000..fc388b9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/gridfs-stream/index.js
@@ -0,0 +1,366 @@
+var Emitter = require('events').EventEmitter;
+var GridFSBucketReadStream = require('./download');
+var GridFSBucketWriteStream = require('./upload');
+var shallowClone = require('../utils').shallowClone;
+var toError = require('../utils').toError;
+var util = require('util');
+
+var DEFAULT_GRIDFS_BUCKET_OPTIONS = {
+ bucketName: 'fs',
+ chunkSizeBytes: 255 * 1024
+};
+
+module.exports = GridFSBucket;
+
+/**
+ * Constructor for a streaming GridFS interface
+ * @class
+ * @param {Db} db A db handle
+ * @param {object} [options=null] Optional settings.
+ * @param {string} [options.bucketName="fs"] The 'files' and 'chunks' collections will be prefixed with the bucket name followed by a dot.
+ * @param {number} [options.chunkSizeBytes=255 * 1024] Number of bytes stored in each chunk. Defaults to 255KB
+ * @param {object} [options.writeConcern=null] Optional write concern to be passed to write operations, for instance `{ w: 1 }`
+ * @param {object} [options.readPreference=null] Optional read preference to be passed to read operations
+ * @fires GridFSBucketWriteStream#index
+ * @return {GridFSBucket}
+ */
+
+function GridFSBucket(db, options) {
+ Emitter.apply(this);
+ this.setMaxListeners(0);
+
+ if (options && typeof options === 'object') {
+ options = shallowClone(options);
+ var keys = Object.keys(DEFAULT_GRIDFS_BUCKET_OPTIONS);
+ for (var i = 0; i < keys.length; ++i) {
+ if (!options[keys[i]]) {
+ options[keys[i]] = DEFAULT_GRIDFS_BUCKET_OPTIONS[keys[i]];
+ }
+ }
+ } else {
+ options = DEFAULT_GRIDFS_BUCKET_OPTIONS;
+ }
+
+ this.s = {
+ db: db,
+ options: options,
+ _chunksCollection: db.collection(options.bucketName + '.chunks'),
+ _filesCollection: db.collection(options.bucketName + '.files'),
+ checkedIndexes: false,
+ calledOpenUploadStream: false,
+ promiseLibrary: db.s.promiseLibrary ||
+ (typeof global.Promise == 'function' ? global.Promise : require('es6-promise').Promise)
+ };
+};
+
+util.inherits(GridFSBucket, Emitter);
+
+/**
+ * When the first call to openUploadStream is made, the upload stream will
+ * check to see if it needs to create the proper indexes on the chunks and
+ * files collections. This event is fired either when 1) it determines that
+ * no index creation is necessary, 2) when it successfully creates the
+ * necessary indexes.
+ *
+ * @event GridFSBucket#index
+ * @type {Error}
+ */
+
+/**
+ * Returns a writable stream (GridFSBucketWriteStream) for writing
+ * buffers to GridFS. The stream's 'id' property contains the resulting
+ * file's id.
+ * @method
+ * @param {string} filename The value of the 'filename' key in the files doc
+ * @param {object} [options=null] Optional settings.
+ * @param {number} [options.chunkSizeBytes=null] Optional overwrite this bucket's chunkSizeBytes for this file
+ * @param {object} [options.metadata=null] Optional object to store in the file document's `metadata` field
+ * @param {string} [options.contentType=null] Optional string to store in the file document's `contentType` field
+ * @param {array} [options.aliases=null] Optional array of strings to store in the file document's `aliases` field
+ * @return {GridFSBucketWriteStream}
+ */
+
+GridFSBucket.prototype.openUploadStream = function(filename, options) {
+ if (options) {
+ options = shallowClone(options);
+ } else {
+ options = {};
+ }
+ if (!options.chunkSizeBytes) {
+ options.chunkSizeBytes = this.s.options.chunkSizeBytes;
+ }
+ return new GridFSBucketWriteStream(this, filename, options);
+};
+
+/**
+ * Returns a writable stream (GridFSBucketWriteStream) for writing
+ * buffers to GridFS for a custom file id. The stream's 'id' property contains the resulting
+ * file's id.
+ * @method
+ * @param {string|number|object} id A custom id used to identify the file
+ * @param {string} filename The value of the 'filename' key in the files doc
+ * @param {object} [options=null] Optional settings.
+ * @param {number} [options.chunkSizeBytes=null] Optional overwrite this bucket's chunkSizeBytes for this file
+ * @param {object} [options.metadata=null] Optional object to store in the file document's `metadata` field
+ * @param {string} [options.contentType=null] Optional string to store in the file document's `contentType` field
+ * @param {array} [options.aliases=null] Optional array of strings to store in the file document's `aliases` field
+ * @return {GridFSBucketWriteStream}
+ */
+
+GridFSBucket.prototype.openUploadStreamWithId = function(id, filename, options) {
+ if (options) {
+ options = shallowClone(options);
+ } else {
+ options = {};
+ }
+
+ if (!options.chunkSizeBytes) {
+ options.chunkSizeBytes = this.s.options.chunkSizeBytes;
+ }
+
+ options.id = id;
+
+ return new GridFSBucketWriteStream(this, filename, options);
+};
+
+/**
+ * Returns a readable stream (GridFSBucketReadStream) for streaming file
+ * data from GridFS.
+ * @method
+ * @param {ObjectId} id The id of the file doc
+ * @param {Object} [options=null] Optional settings.
+ * @param {Number} [options.start=null] Optional 0-based offset in bytes to start streaming from
+ * @param {Number} [options.end=null] Optional 0-based offset in bytes to stop streaming before
+ * @return {GridFSBucketReadStream}
+ */
+
+GridFSBucket.prototype.openDownloadStream = function(id, options) {
+ var filter = { _id: id };
+ var options = {
+ start: options && options.start,
+ end: options && options.end
+ };
+ return new GridFSBucketReadStream(this.s._chunksCollection,
+ this.s._filesCollection, this.s.options.readPreference, filter, options);
+};
+
+/**
+ * Deletes a file with the given id
+ * @method
+ * @param {ObjectId} id The id of the file doc
+ * @param {GridFSBucket~errorCallback} [callback]
+ */
+
+GridFSBucket.prototype.delete = function(id, callback) {
+ if (typeof callback === 'function') {
+ return _delete(this, id, callback);
+ }
+
+ var _this = this;
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ _delete(_this, id, function(error, res) {
+ if (error) {
+ reject(error);
+ } else {
+ resolve(res);
+ }
+ });
+ });
+};
+
+/**
+ * @ignore
+ */
+
+function _delete(_this, id, callback) {
+ _this.s._filesCollection.deleteOne({ _id: id }, function(error, res) {
+ if (error) {
+ return callback(error);
+ }
+
+ _this.s._chunksCollection.deleteMany({ files_id: id }, function(error) {
+ if (error) {
+ return callback(error);
+ }
+
+ // Delete orphaned chunks before returning FileNotFound
+ if (!res.result.n) {
+ var errmsg = 'FileNotFound: no file with id ' + id + ' found';
+ return callback(new Error(errmsg));
+ }
+
+ callback();
+ });
+ });
+}
+
+/**
+ * Convenience wrapper around find on the files collection
+ * @method
+ * @param {Object} filter
+ * @param {Object} [options=null] Optional settings for cursor
+ * @param {number} [options.batchSize=null] Optional batch size for cursor
+ * @param {number} [options.limit=null] Optional limit for cursor
+ * @param {number} [options.maxTimeMS=null] Optional maxTimeMS for cursor
+ * @param {boolean} [options.noCursorTimeout=null] Optionally set cursor's `noCursorTimeout` flag
+ * @param {number} [options.skip=null] Optional skip for cursor
+ * @param {object} [options.sort=null] Optional sort for cursor
+ * @return {Cursor}
+ */
+
+GridFSBucket.prototype.find = function(filter, options) {
+ filter = filter || {};
+ options = options || {};
+
+ var cursor = this.s._filesCollection.find(filter);
+
+ if (options.batchSize != null) {
+ cursor.batchSize(options.batchSize);
+ }
+ if (options.limit != null) {
+ cursor.limit(options.limit);
+ }
+ if (options.maxTimeMS != null) {
+ cursor.maxTimeMS(options.maxTimeMS);
+ }
+ if (options.noCursorTimeout != null) {
+ cursor.addCursorFlag('noCursorTimeout', options.noCursorTimeout);
+ }
+ if (options.skip != null) {
+ cursor.skip(options.skip);
+ }
+ if (options.sort != null) {
+ cursor.sort(options.sort);
+ }
+
+ return cursor;
+};
+
+/**
+ * Returns a readable stream (GridFSBucketReadStream) for streaming the
+ * file with the given name from GridFS. If there are multiple files with
+ * the same name, this will stream the most recent file with the given name
+ * (as determined by the `uploadDate` field). You can set the `revision`
+ * option to change this behavior.
+ * @method
+ * @param {String} filename The name of the file to stream
+ * @param {Object} [options=null] Optional settings
+ * @param {number} [options.revision=-1] The revision number relative to the oldest file with the given filename. 0 gets you the oldest file, 1 gets you the 2nd oldest, -1 gets you the newest.
+ * @param {Number} [options.start=null] Optional 0-based offset in bytes to start streaming from
+ * @param {Number} [options.end=null] Optional 0-based offset in bytes to stop streaming before
+ * @return {GridFSBucketReadStream}
+ */
+
+GridFSBucket.prototype.openDownloadStreamByName = function(filename, options) {
+ var sort = { uploadDate: -1 };
+ var skip = null;
+ if (options && options.revision != null) {
+ if (options.revision >= 0) {
+ sort = { uploadDate: 1 };
+ skip = options.revision;
+ } else {
+ skip = -options.revision - 1;
+ }
+ }
+
+ var filter = { filename: filename };
+ var options = {
+ sort: sort,
+ skip: skip,
+ start: options && options.start,
+ end: options && options.end
+ };
+ return new GridFSBucketReadStream(this.s._chunksCollection,
+ this.s._filesCollection, this.s.options.readPreference, filter, options);
+};
+
+/**
+ * Renames the file with the given _id to the given string
+ * @method
+ * @param {ObjectId} id the id of the file to rename
+ * @param {String} filename new name for the file
+ * @param {GridFSBucket~errorCallback} [callback]
+ */
+
+GridFSBucket.prototype.rename = function(id, filename, callback) {
+ if (typeof callback === 'function') {
+ return _rename(this, id, filename, callback);
+ }
+
+ var _this = this;
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ _rename(_this, id, filename, function(error, res) {
+ if (error) {
+ reject(error);
+ } else {
+ resolve(res);
+ }
+ });
+ });
+};
+
+/**
+ * @ignore
+ */
+
+function _rename(_this, id, filename, callback) {
+ var filter = { _id: id };
+ var update = { $set: { filename: filename } };
+ _this.s._filesCollection.updateOne(filter, update, function(error, res) {
+ if (error) {
+ return callback(error);
+ }
+ if (!res.result.n) {
+ return callback(toError('File with id ' + id + ' not found'));
+ }
+ callback();
+ });
+}
+
+/**
+ * Removes this bucket's files collection, followed by its chunks collection.
+ * @method
+ * @param {GridFSBucket~errorCallback} [callback]
+ */
+
+GridFSBucket.prototype.drop = function(callback) {
+ if (typeof callback === 'function') {
+ return _drop(this, callback);
+ }
+
+ var _this = this;
+ return new this.s.promiseLibrary(function(resolve, reject) {
+ _drop(_this, function(error, res) {
+ if (error) {
+ reject(error);
+ } else {
+ resolve(res);
+ }
+ });
+ });
+};
+
+/**
+ * @ignore
+ */
+
+function _drop(_this, callback) {
+ _this.s._filesCollection.drop(function(error) {
+ if (error) {
+ return callback(error);
+ }
+ _this.s._chunksCollection.drop(function(error) {
+ if (error) {
+ return callback(error);
+ }
+
+ return callback();
+ });
+ });
+}
+
+/**
+ * Callback format for all GridFSBucket methods that can accept a callback.
+ * @callback GridFSBucket~errorCallback
+ * @param {MongoError} error An error instance representing any errors that occurred
+ */
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/gridfs-stream/upload.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/gridfs-stream/upload.js
new file mode 100644
index 0000000..7625345
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/gridfs-stream/upload.js
@@ -0,0 +1,525 @@
+var core = require('mongodb-core');
+var crypto = require('crypto');
+var shallowClone = require('../utils').shallowClone;
+var stream = require('stream');
+var util = require('util');
+
+var ERROR_NAMESPACE_NOT_FOUND = 26;
+
+module.exports = GridFSBucketWriteStream;
+
+/**
+ * A writable stream that enables you to write buffers to GridFS.
+ *
+ * Do not instantiate this class directly. Use `openUploadStream()` instead.
+ *
+ * @class
+ * @param {GridFSBucket} bucket Handle for this stream's corresponding bucket
+ * @param {string} filename The value of the 'filename' key in the files doc
+ * @param {object} [options=null] Optional settings.
+ * @param {string|number|object} [options.id=null] Custom file id for the GridFS file.
+ * @param {number} [options.chunkSizeBytes=null] The chunk size to use, in bytes
+ * @param {number} [options.w=null] The write concern
+ * @param {number} [options.wtimeout=null] The write concern timeout
+ * @param {number} [options.j=null] The journal write concern
+ * @fires GridFSBucketWriteStream#error
+ * @fires GridFSBucketWriteStream#finish
+ * @return {GridFSBucketWriteStream} a GridFSBucketWriteStream instance.
+ */
+
+function GridFSBucketWriteStream(bucket, filename, options) {
+ options = options || {};
+ this.bucket = bucket;
+ this.chunks = bucket.s._chunksCollection;
+ this.filename = filename;
+ this.files = bucket.s._filesCollection;
+ this.options = options;
+
+ this.id = options.id ? options.id : core.BSON.ObjectId();
+ this.chunkSizeBytes = this.options.chunkSizeBytes;
+ this.bufToStore = new Buffer(this.chunkSizeBytes);
+ this.length = 0;
+ this.md5 = crypto.createHash('md5');
+ this.n = 0;
+ this.pos = 0;
+ this.state = {
+ streamEnd: false,
+ outstandingRequests: 0,
+ errored: false,
+ aborted: false,
+ promiseLibrary: this.bucket.s.promiseLibrary
+ };
+
+ if (!this.bucket.s.calledOpenUploadStream) {
+ this.bucket.s.calledOpenUploadStream = true;
+
+ var _this = this;
+ checkIndexes(this, function() {
+ _this.bucket.s.checkedIndexes = true;
+ _this.bucket.emit('index');
+ });
+ }
+}
+
+util.inherits(GridFSBucketWriteStream, stream.Writable);
+
+/**
+ * An error occurred
+ *
+ * @event GridFSBucketWriteStream#error
+ * @type {Error}
+ */
+
+/**
+ * `end()` was called and the write stream successfully wrote the file
+ * metadata and all the chunks to MongoDB.
+ *
+ * @event GridFSBucketWriteStream#finish
+ * @type {object}
+ */
+
+/**
+ * Write a buffer to the stream.
+ *
+ * @method
+ * @param {Buffer} chunk Buffer to write
+ * @param {String} encoding Optional encoding for the buffer
+ * @param {Function} callback Function to call when the chunk was added to the buffer, or if the entire chunk was persisted to MongoDB if this chunk caused a flush.
+ * @return {Boolean} False if this write required flushing a chunk to MongoDB. True otherwise.
+ */
+
+GridFSBucketWriteStream.prototype.write = function(chunk, encoding, callback) {
+ var _this = this;
+ return waitForIndexes(this, function() {
+ return doWrite(_this, chunk, encoding, callback);
+ });
+};
+
+/**
+ * Places this write stream into an aborted state (all future writes fail)
+ * and deletes all chunks that have already been written.
+ *
+ * @method
+ * @param {GridFSBucket~errorCallback} callback called when chunks are successfully removed or error occurred
+ * @return {Promise} if no callback specified
+ */
+
+GridFSBucketWriteStream.prototype.abort = function(callback) {
+ if (this.state.streamEnd) {
+ var error = new Error('Cannot abort a stream that has already completed');
+ if (typeof callback == 'function') {
+ return callback(error);
+ }
+ return this.state.promiseLibrary.reject(error);
+ }
+ if (this.state.aborted) {
+ var error = new Error('Cannot call abort() on a stream twice');
+ if (typeof callback == 'function') {
+ return callback(error);
+ }
+ return this.state.promiseLibrary.reject(error);
+ }
+ this.state.aborted = true;
+ this.chunks.deleteMany({ files_id: this.id }, function(error) {
+ if(typeof callback == 'function') callback(error);
+ });
+};
+
+/**
+ * Tells the stream that no more data will be coming in. The stream will
+ * persist the remaining data to MongoDB, write the files document, and
+ * then emit a 'finish' event.
+ *
+ * @method
+ * @param {Buffer} chunk Buffer to write
+ * @param {String} encoding Optional encoding for the buffer
+ * @param {Function} callback Function to call when all files and chunks have been persisted to MongoDB
+ */
+
+GridFSBucketWriteStream.prototype.end = function(chunk, encoding, callback) {
+ if(typeof chunk == 'function') {
+ callback = chunk, chunk = null, encoding = null;
+ } else if(typeof encoding == 'function') {
+ callback = encoding, encoding = null;
+ }
+
+ if (checkAborted(this, callback)) {
+ return;
+ }
+ var _this = this;
+ this.state.streamEnd = true;
+
+ if (callback) {
+ this.once('finish', function(result) {
+ callback(null, result);
+ });
+ }
+
+ if (!chunk) {
+ waitForIndexes(this, function() {
+ writeRemnant(_this);
+ });
+ return;
+ }
+
+ var _this = this;
+ var inputBuf = (Buffer.isBuffer(chunk)) ?
+ chunk : new Buffer(chunk, encoding);
+
+ this.write(chunk, encoding, function() {
+ writeRemnant(_this);
+ });
+};
+
+/**
+ * @ignore
+ */
+
+function __handleError(_this, error, callback) {
+ if (_this.state.errored) {
+ return;
+ }
+ _this.state.errored = true;
+ if (callback) {
+ return callback(error);
+ }
+ _this.emit('error', error);
+}
+
+/**
+ * @ignore
+ */
+
+function createChunkDoc(filesId, n, data) {
+ return {
+ _id: core.BSON.ObjectId(),
+ files_id: filesId,
+ n: n,
+ data: data
+ };
+}
+
+/**
+ * @ignore
+ */
+
+function checkChunksIndex(_this, callback) {
+ _this.chunks.listIndexes().toArray(function(error, indexes) {
+ if (error) {
+ // Collection doesn't exist so create index
+ if (error.code === ERROR_NAMESPACE_NOT_FOUND) {
+ var index = { files_id: 1, n: 1 };
+ _this.chunks.createIndex(index, { background: false, unique: true }, function(error) {
+ if (error) {
+ return callback(error);
+ }
+
+ callback();
+ });
+ return;
+ }
+ return callback(error);
+ }
+
+ var hasChunksIndex = false;
+ indexes.forEach(function(index) {
+ if (index.key) {
+ var keys = Object.keys(index.key);
+ if (keys.length === 2 && index.key.files_id === 1 &&
+ index.key.n === 1) {
+ hasChunksIndex = true;
+ }
+ }
+ });
+
+ if (hasChunksIndex) {
+ callback();
+ } else {
+ var index = { files_id: 1, n: 1 };
+ var indexOptions = getWriteOptions(_this);
+
+ indexOptions.background = false;
+ indexOptions.unique = true;
+
+ _this.chunks.createIndex(index, indexOptions, function(error) {
+ if (error) {
+ return callback(error);
+ }
+
+ callback();
+ });
+ }
+ });
+}
+
+/**
+ * @ignore
+ */
+
+function checkDone(_this, callback) {
+ if (_this.state.streamEnd &&
+ _this.state.outstandingRequests === 0 &&
+ !_this.state.errored) {
+ var filesDoc = createFilesDoc(_this.id, _this.length, _this.chunkSizeBytes,
+ _this.md5.digest('hex'), _this.filename, _this.options.contentType,
+ _this.options.aliases, _this.options.metadata);
+
+ if (checkAborted(_this, callback)) {
+ return false;
+ }
+
+ _this.files.insert(filesDoc, getWriteOptions(_this), function(error) {
+ if (error) {
+ return __handleError(_this, error, callback);
+ }
+ _this.emit('finish', filesDoc);
+ });
+
+ return true;
+ }
+
+ return false;
+}
+
+/**
+ * @ignore
+ */
+
+function checkIndexes(_this, callback) {
+ _this.files.findOne({}, { _id: 1 }, function(error, doc) {
+ if (error) {
+ return callback(error);
+ }
+ if (doc) {
+ return callback();
+ }
+
+ _this.files.listIndexes().toArray(function(error, indexes) {
+ if (error) {
+ // Collection doesn't exist so create index
+ if (error.code === ERROR_NAMESPACE_NOT_FOUND) {
+ var index = { filename: 1, uploadDate: 1 };
+ _this.files.createIndex(index, { background: false }, function(error) {
+ if (error) {
+ return callback(error);
+ }
+
+ checkChunksIndex(_this, callback);
+ });
+ return;
+ }
+ return callback(error);
+ }
+
+ var hasFileIndex = false;
+ indexes.forEach(function(index) {
+ var keys = Object.keys(index.key);
+ if (keys.length === 2 && index.key.filename === 1 &&
+ index.key.uploadDate === 1) {
+ hasFileIndex = true;
+ }
+ });
+
+ if (hasFileIndex) {
+ checkChunksIndex(_this, callback);
+ } else {
+ var index = { filename: 1, uploadDate: 1 };
+
+ var indexOptions = getWriteOptions(_this);
+
+ indexOptions.background = false;
+
+ _this.files.createIndex(index, indexOptions, function(error) {
+ if (error) {
+ return callback(error);
+ }
+
+ checkChunksIndex(_this, callback);
+ });
+ }
+ });
+ });
+}
+
+/**
+ * @ignore
+ */
+
+function createFilesDoc(_id, length, chunkSize, md5, filename, contentType,
+ aliases, metadata) {
+ var ret = {
+ _id: _id,
+ length: length,
+ chunkSize: chunkSize,
+ uploadDate: new Date(),
+ md5: md5,
+ filename: filename
+ };
+
+ if (contentType) {
+ ret.contentType = contentType;
+ }
+
+ if (aliases) {
+ ret.aliases = aliases;
+ }
+
+ if (metadata) {
+ ret.metadata = metadata;
+ }
+
+ return ret;
+}
+
+/**
+ * @ignore
+ */
+
+function doWrite(_this, chunk, encoding, callback) {
+ if (checkAborted(_this, callback)) {
+ return false;
+ }
+
+ var inputBuf = (Buffer.isBuffer(chunk)) ?
+ chunk : new Buffer(chunk, encoding);
+
+ _this.length += inputBuf.length;
+
+ // Input is small enough to fit in our buffer
+ if (_this.pos + inputBuf.length < _this.chunkSizeBytes) {
+ inputBuf.copy(_this.bufToStore, _this.pos);
+ _this.pos += inputBuf.length;
+
+ callback && callback();
+
+ // Note that we reverse the typical semantics of write's return value
+ // to be compatible with node's `.pipe()` function.
+ // True means client can keep writing.
+ return true;
+ }
+
+ // Otherwise, buffer is too big for current chunk, so we need to flush
+ // to MongoDB.
+ var inputBufRemaining = inputBuf.length;
+ var spaceRemaining = _this.chunkSizeBytes - _this.pos;
+ var numToCopy = Math.min(spaceRemaining, inputBuf.length);
+ var outstandingRequests = 0;
+ while (inputBufRemaining > 0) {
+ var inputBufPos = inputBuf.length - inputBufRemaining;
+ inputBuf.copy(_this.bufToStore, _this.pos,
+ inputBufPos, inputBufPos + numToCopy);
+ _this.pos += numToCopy;
+ spaceRemaining -= numToCopy;
+ if (spaceRemaining === 0) {
+ _this.md5.update(_this.bufToStore);
+ var doc = createChunkDoc(_this.id, _this.n, _this.bufToStore);
+ ++_this.state.outstandingRequests;
+ ++outstandingRequests;
+
+ if (checkAborted(_this, callback)) {
+ return false;
+ }
+
+ _this.chunks.insert(doc, getWriteOptions(_this), function(error) {
+ if (error) {
+ return __handleError(_this, error);
+ }
+ --_this.state.outstandingRequests;
+ --outstandingRequests;
+ if (!outstandingRequests) {
+ _this.emit('drain', doc);
+ callback && callback();
+ checkDone(_this);
+ }
+ });
+
+ spaceRemaining = _this.chunkSizeBytes;
+ _this.pos = 0;
+ ++_this.n;
+ }
+ inputBufRemaining -= numToCopy;
+ numToCopy = Math.min(spaceRemaining, inputBufRemaining);
+ }
+
+ // Note that we reverse the typical semantics of write's return value
+ // to be compatible with node's `.pipe()` function.
+ // False means the client should wait for the 'drain' event.
+ return false;
+}
+
+/**
+ * @ignore
+ */
+
+function getWriteOptions(_this) {
+ var obj = {};
+ if (_this.options.writeConcern) {
+ obj.w = concern.w;
+ obj.wtimeout = concern.wtimeout;
+ obj.j = concern.j;
+ }
+ return obj;
+}
+
+/**
+ * @ignore
+ */
+
+function waitForIndexes(_this, callback) {
+ if (_this.bucket.s.checkedIndexes) {
+ return callback(false);
+ }
+
+ _this.bucket.once('index', function() {
+ callback(true);
+ });
+
+ return true;
+}
+
+/**
+ * @ignore
+ */
+
+function writeRemnant(_this, callback) {
+ // Buffer is empty, so don't bother to insert
+ if (_this.pos === 0) {
+ return checkDone(_this, callback);
+ }
+
+ ++_this.state.outstandingRequests;
+
+ // Create a new buffer to make sure the buffer isn't bigger than it needs
+ // to be.
+ var remnant = new Buffer(_this.pos);
+ _this.bufToStore.copy(remnant, 0, 0, _this.pos);
+ _this.md5.update(remnant);
+ var doc = createChunkDoc(_this.id, _this.n, remnant);
+
+ // If the stream was aborted, do not write remnant
+ if (checkAborted(_this, callback)) {
+ return false;
+ }
+
+ _this.chunks.insert(doc, getWriteOptions(_this), function(error) {
+ if (error) {
+ return __handleError(_this, error);
+ }
+ --_this.state.outstandingRequests;
+ checkDone(_this);
+ });
+}
+
+/**
+ * @ignore
+ */
+
+function checkAborted(_this, callback) {
+ if (_this.state.aborted) {
+ if(typeof callback == 'function') {
+ callback(new Error('this stream has been aborted'));
+ }
+ return true;
+ }
+ return false;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/gridfs/chunk.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/gridfs/chunk.js
new file mode 100644
index 0000000..cbd3ee8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/gridfs/chunk.js
@@ -0,0 +1,233 @@
+"use strict";
+
+var Binary = require('mongodb-core').BSON.Binary,
+ ObjectID = require('mongodb-core').BSON.ObjectID;
+
+/**
+ * Class for representing a single chunk in GridFS.
+ *
+ * @class
+ *
+ * @param file {GridStore} The {@link GridStore} object holding this chunk.
+ * @param mongoObject {object} The mongo object representation of this chunk.
+ *
+ * @throws Error when the type of data field for {@link mongoObject} is not
+ * supported. Currently supported types for data field are instances of
+ * {@link String}, {@link Array}, {@link Binary} and {@link Binary}
+ * from the bson module
+ *
+ * @see Chunk#buildMongoObject
+ */
+var Chunk = function(file, mongoObject, writeConcern) {
+ if(!(this instanceof Chunk)) return new Chunk(file, mongoObject);
+
+ this.file = file;
+ var self = this;
+ var mongoObjectFinal = mongoObject == null ? {} : mongoObject;
+ this.writeConcern = writeConcern || {w:1};
+ this.objectId = mongoObjectFinal._id == null ? new ObjectID() : mongoObjectFinal._id;
+ this.chunkNumber = mongoObjectFinal.n == null ? 0 : mongoObjectFinal.n;
+ this.data = new Binary();
+
+ if(mongoObjectFinal.data == null) {
+ } else if(typeof mongoObjectFinal.data == "string") {
+ var buffer = new Buffer(mongoObjectFinal.data.length);
+ buffer.write(mongoObjectFinal.data, 0, mongoObjectFinal.data.length, 'binary');
+ this.data = new Binary(buffer);
+ } else if(Array.isArray(mongoObjectFinal.data)) {
+ var buffer = new Buffer(mongoObjectFinal.data.length);
+ var data = mongoObjectFinal.data.join('');
+ buffer.write(data, 0, data.length, 'binary');
+ this.data = new Binary(buffer);
+ } else if(mongoObjectFinal.data._bsontype === 'Binary') {
+ this.data = mongoObjectFinal.data;
+ } else if(Buffer.isBuffer(mongoObjectFinal.data)) {
+ } else {
+ throw Error("Illegal chunk format");
+ }
+
+ // Update position
+ this.internalPosition = 0;
+};
+
+/**
+ * Writes a data to this object and advance the read/write head.
+ *
+ * @param data {string} the data to write
+ * @param callback {function(*, GridStore)} This will be called after executing
+ * this method. The first parameter will contain null and the second one
+ * will contain a reference to this object.
+ */
+Chunk.prototype.write = function(data, callback) {
+ this.data.write(data, this.internalPosition, data.length, 'binary');
+ this.internalPosition = this.data.length();
+ if(callback != null) return callback(null, this);
+ return this;
+};
+
+/**
+ * Reads data and advances the read/write head.
+ *
+ * @param length {number} The length of data to read.
+ *
+ * @return {string} The data read if the given length will not exceed the end of
+ * the chunk. Returns an empty String otherwise.
+ */
+Chunk.prototype.read = function(length) {
+ // Default to full read if no index defined
+ length = length == null || length == 0 ? this.length() : length;
+
+ if(this.length() - this.internalPosition + 1 >= length) {
+ var data = this.data.read(this.internalPosition, length);
+ this.internalPosition = this.internalPosition + length;
+ return data;
+ } else {
+ return '';
+ }
+};
+
+Chunk.prototype.readSlice = function(length) {
+ if ((this.length() - this.internalPosition) >= length) {
+ var data = null;
+ if (this.data.buffer != null) { //Pure BSON
+ data = this.data.buffer.slice(this.internalPosition, this.internalPosition + length);
+ } else { //Native BSON
+ data = new Buffer(length);
+ length = this.data.readInto(data, this.internalPosition);
+ }
+ this.internalPosition = this.internalPosition + length;
+ return data;
+ } else {
+ return null;
+ }
+};
+
+/**
+ * Checks if the read/write head is at the end.
+ *
+ * @return {boolean} Whether the read/write head has reached the end of this
+ * chunk.
+ */
+Chunk.prototype.eof = function() {
+ return this.internalPosition == this.length() ? true : false;
+};
+
+/**
+ * Reads one character from the data of this chunk and advances the read/write
+ * head.
+ *
+ * @return {string} a single character data read if the the read/write head is
+ * not at the end of the chunk. Returns an empty String otherwise.
+ */
+Chunk.prototype.getc = function() {
+ return this.read(1);
+};
+
+/**
+ * Clears the contents of the data in this chunk and resets the read/write head
+ * to the initial position.
+ */
+Chunk.prototype.rewind = function() {
+ this.internalPosition = 0;
+ this.data = new Binary();
+};
+
+/**
+ * Saves this chunk to the database. Also overwrites existing entries having the
+ * same id as this chunk.
+ *
+ * @param callback {function(*, GridStore)} This will be called after executing
+ * this method. The first parameter will contain null and the second one
+ * will contain a reference to this object.
+ */
+Chunk.prototype.save = function(options, callback) {
+ var self = this;
+ if(typeof options == 'function') {
+ callback = options;
+ options = {};
+ }
+
+ self.file.chunkCollection(function(err, collection) {
+ if(err) return callback(err);
+
+ // Merge the options
+ var writeOptions = { upsert: true };
+ for(var name in options) writeOptions[name] = options[name];
+ for(var name in self.writeConcern) writeOptions[name] = self.writeConcern[name];
+
+ if(self.data.length() > 0) {
+ self.buildMongoObject(function(mongoObject) {
+ var options = {forceServerObjectId:true};
+ for(var name in self.writeConcern) {
+ options[name] = self.writeConcern[name];
+ }
+
+ collection.replaceOne({'_id':self.objectId}, mongoObject, writeOptions, function(err, collection) {
+ callback(err, self);
+ });
+ });
+ } else {
+ callback(null, self);
+ }
+ // });
+ });
+};
+
+/**
+ * Creates a mongoDB object representation of this chunk.
+ *
+ * @param callback {function(Object)} This will be called after executing this
+ * method. The object will be passed to the first parameter and will have
+ * the structure:
+ *
+ * <pre><code>
+ * {
+ * '_id' : , // {number} id for this chunk
+ * 'files_id' : , // {number} foreign key to the file collection
+ * 'n' : , // {number} chunk number
+ * 'data' : , // {bson#Binary} the chunk data itself
+ * }
+ * </code></pre>
+ *
+ * @see <a href="http://www.mongodb.org/display/DOCS/GridFS+Specification#GridFSSpecification-{{chunks}}">MongoDB GridFS Chunk Object Structure</a>
+ */
+Chunk.prototype.buildMongoObject = function(callback) {
+ var mongoObject = {
+ 'files_id': this.file.fileId,
+ 'n': this.chunkNumber,
+ 'data': this.data};
+ // If we are saving using a specific ObjectId
+ if(this.objectId != null) mongoObject._id = this.objectId;
+
+ callback(mongoObject);
+};
+
+/**
+ * @return {number} the length of the data
+ */
+Chunk.prototype.length = function() {
+ return this.data.length();
+};
+
+/**
+ * The position of the read/write head
+ * @name position
+ * @lends Chunk#
+ * @field
+ */
+Object.defineProperty(Chunk.prototype, "position", { enumerable: true
+ , get: function () {
+ return this.internalPosition;
+ }
+ , set: function(value) {
+ this.internalPosition = value;
+ }
+});
+
+/**
+ * The default chunk size
+ * @constant
+ */
+Chunk.DEFAULT_CHUNK_SIZE = 1024 * 255;
+
+module.exports = Chunk;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/gridfs/grid_store.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/gridfs/grid_store.js
new file mode 100644
index 0000000..93afa50
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/gridfs/grid_store.js
@@ -0,0 +1,1956 @@
+"use strict";
+
+/**
+ * @fileOverview GridFS is a tool for MongoDB to store files to the database.
+ * Because of the restrictions of the object size the database can hold, a
+ * facility to split a file into several chunks is needed. The {@link GridStore}
+ * class offers a simplified api to interact with files while managing the
+ * chunks of split files behind the scenes. More information about GridFS can be
+ * found <a href="http://www.mongodb.org/display/DOCS/GridFS">here</a>.
+ *
+ * @example
+ * var MongoClient = require('mongodb').MongoClient,
+ * GridStore = require('mongodb').GridStore,
+ * ObjectID = require('mongodb').ObjectID,
+ * test = require('assert');
+ *
+ * // Connection url
+ * var url = 'mongodb://localhost:27017/test';
+ * // Connect using MongoClient
+ * MongoClient.connect(url, function(err, db) {
+ * var gridStore = new GridStore(db, null, "w");
+ * gridStore.open(function(err, gridStore) {
+ * gridStore.write("hello world!", function(err, gridStore) {
+ * gridStore.close(function(err, result) {
+ *
+ * // Let's read the file using object Id
+ * GridStore.read(db, result._id, function(err, data) {
+ * test.equal('hello world!', data);
+ * db.close();
+ * test.done();
+ * });
+ * });
+ * });
+ * });
+ * });
+ */
+var Chunk = require('./chunk'),
+ ObjectID = require('mongodb-core').BSON.ObjectID,
+ ReadPreference = require('../read_preference'),
+ Buffer = require('buffer').Buffer,
+ Collection = require('../collection'),
+ fs = require('fs'),
+ timers = require('timers'),
+ f = require('util').format,
+ util = require('util'),
+ Define = require('../metadata'),
+ MongoError = require('mongodb-core').MongoError,
+ inherits = util.inherits,
+ Duplex = require('stream').Duplex || require('readable-stream').Duplex,
+ shallowClone = require('../utils').shallowClone;
+
+var REFERENCE_BY_FILENAME = 0,
+ REFERENCE_BY_ID = 1;
+
+/**
+ * Namespace provided by the mongodb-core and node.js
+ * @external Duplex
+ */
+
+/**
+ * Create a new GridStore instance
+ *
+ * Modes
+ * - **"r"** - read only. This is the default mode.
+ * - **"w"** - write in truncate mode. Existing data will be overwriten.
+ *
+ * @class
+ * @param {Db} db A database instance to interact with.
+ * @param {object} [id] optional unique id for this file
+ * @param {string} [filename] optional filename for this file, no unique constrain on the field
+ * @param {string} mode set the mode for this file.
+ * @param {object} [options=null] Optional settings.
+ * @param {(number|string)} [options.w=null] The write concern.
+ * @param {number} [options.wtimeout=null] The write concern timeout.
+ * @param {boolean} [options.j=false] Specify a journal write concern.
+ * @param {boolean} [options.fsync=false] Specify a file sync write concern.
+ * @param {string} [options.root=null] Root collection to use. Defaults to **{GridStore.DEFAULT_ROOT_COLLECTION}**.
+ * @param {string} [options.content_type=null] MIME type of the file. Defaults to **{GridStore.DEFAULT_CONTENT_TYPE}**.
+ * @param {number} [options.chunk_size=261120] Size for the chunk. Defaults to **{Chunk.DEFAULT_CHUNK_SIZE}**.
+ * @param {object} [options.metadata=null] Arbitrary data the user wants to store.
+ * @param {object} [options.promiseLibrary=null] A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @property {number} chunkSize Get the gridstore chunk size.
+ * @property {number} md5 The md5 checksum for this file.
+ * @property {number} chunkNumber The current chunk number the gridstore has materialized into memory
+ * @return {GridStore} a GridStore instance.
+ * @deprecated Use GridFSBucket API instead
+ */
+var GridStore = function GridStore(db, id, filename, mode, options) {
+ if(!(this instanceof GridStore)) return new GridStore(db, id, filename, mode, options);
+ var self = this;
+ this.db = db;
+
+ // Handle options
+ if(typeof options === 'undefined') options = {};
+ // Handle mode
+ if(typeof mode === 'undefined') {
+ mode = filename;
+ filename = undefined;
+ } else if(typeof mode == 'object') {
+ options = mode;
+ mode = filename;
+ filename = undefined;
+ }
+
+ if(id instanceof ObjectID) {
+ this.referenceBy = REFERENCE_BY_ID;
+ this.fileId = id;
+ this.filename = filename;
+ } else if(typeof filename == 'undefined') {
+ this.referenceBy = REFERENCE_BY_FILENAME;
+ this.filename = id;
+ if (mode.indexOf('w') != null) {
+ this.fileId = new ObjectID();
+ }
+ } else {
+ this.referenceBy = REFERENCE_BY_ID;
+ this.fileId = id;
+ this.filename = filename;
+ }
+
+ // Set up the rest
+ this.mode = mode == null ? "r" : mode;
+ this.options = options || {};
+
+ // Opened
+ this.isOpen = false;
+
+ // Set the root if overridden
+ this.root = this.options['root'] == null ? GridStore.DEFAULT_ROOT_COLLECTION : this.options['root'];
+ this.position = 0;
+ this.readPreference = this.options.readPreference || db.options.readPreference || ReadPreference.PRIMARY;
+ this.writeConcern = _getWriteConcern(db, this.options);
+ // Set default chunk size
+ this.internalChunkSize = this.options['chunkSize'] == null ? Chunk.DEFAULT_CHUNK_SIZE : this.options['chunkSize'];
+
+ // Get the promiseLibrary
+ var promiseLibrary = this.options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // Set the promiseLibrary
+ this.promiseLibrary = promiseLibrary;
+
+ Object.defineProperty(this, "chunkSize", { enumerable: true
+ , get: function () {
+ return this.internalChunkSize;
+ }
+ , set: function(value) {
+ if(!(this.mode[0] == "w" && this.position == 0 && this.uploadDate == null)) {
+ this.internalChunkSize = this.internalChunkSize;
+ } else {
+ this.internalChunkSize = value;
+ }
+ }
+ });
+
+ Object.defineProperty(this, "md5", { enumerable: true
+ , get: function () {
+ return this.internalMd5;
+ }
+ });
+
+ Object.defineProperty(this, "chunkNumber", { enumerable: true
+ , get: function () {
+ return this.currentChunk && this.currentChunk.chunkNumber ? this.currentChunk.chunkNumber : null;
+ }
+ });
+}
+
+var define = GridStore.define = new Define('Gridstore', GridStore, true);
+
+/**
+ * The callback format for the Gridstore.open method
+ * @callback GridStore~openCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {GridStore} gridStore The GridStore instance if the open method was successful.
+ */
+
+/**
+ * Opens the file from the database and initialize this object. Also creates a
+ * new one if file does not exist.
+ *
+ * @method
+ * @param {GridStore~openCallback} [callback] this will be called after executing this method
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.open = function(callback) {
+ var self = this;
+ if( this.mode != "w" && this.mode != "w+" && this.mode != "r"){
+ throw MongoError.create({message: "Illegal mode " + this.mode, driver:true});
+ }
+
+ // We provided a callback leg
+ if(typeof callback == 'function') return open(self, callback);
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ open(self, function(err, store) {
+ if(err) return reject(err);
+ resolve(store);
+ })
+ });
+};
+
+var open = function(self, callback) {
+ // Get the write concern
+ var writeConcern = _getWriteConcern(self.db, self.options);
+
+ // If we are writing we need to ensure we have the right indexes for md5's
+ if((self.mode == "w" || self.mode == "w+")) {
+ // Get files collection
+ var collection = self.collection();
+ // Put index on filename
+ collection.ensureIndex([['filename', 1]], writeConcern, function(err, index) {
+ // Get chunk collection
+ var chunkCollection = self.chunkCollection();
+ // Make an unique index for compatibility with mongo-cxx-driver:legacy
+ var chunkIndexOptions = shallowClone(writeConcern);
+ chunkIndexOptions.unique = true;
+ // Ensure index on chunk collection
+ chunkCollection.ensureIndex([['files_id', 1], ['n', 1]], chunkIndexOptions, function(err, index) {
+ // Open the connection
+ _open(self, writeConcern, function(err, r) {
+ if(err) return callback(err);
+ self.isOpen = true;
+ callback(err, r);
+ });
+ });
+ });
+ } else {
+ // Open the gridstore
+ _open(self, writeConcern, function(err, r) {
+ if(err) return callback(err);
+ self.isOpen = true;
+ callback(err, r);
+ });
+ }
+}
+
+// Push the definition for open
+define.classMethod('open', {callback: true, promise:true});
+
+/**
+ * Verify if the file is at EOF.
+ *
+ * @method
+ * @return {boolean} true if the read/write head is at the end of this file.
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.eof = function() {
+ return this.position == this.length ? true : false;
+}
+
+define.classMethod('eof', {callback: false, promise:false, returns: [Boolean]});
+
+/**
+ * The callback result format.
+ * @callback GridStore~resultCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {object} result The result from the callback.
+ */
+
+/**
+ * Retrieves a single character from this file.
+ *
+ * @method
+ * @param {GridStore~resultCallback} [callback] this gets called after this method is executed. Passes null to the first parameter and the character read to the second or null to the second if the read/write head is at the end of the file.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.getc = function(callback) {
+ var self = this;
+ // We provided a callback leg
+ if(typeof callback == 'function') return eof(self, callback);
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ eof(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+}
+
+var eof = function(self, callback) {
+ if(self.eof()) {
+ callback(null, null);
+ } else if(self.currentChunk.eof()) {
+ nthChunk(self, self.currentChunk.chunkNumber + 1, function(err, chunk) {
+ self.currentChunk = chunk;
+ self.position = self.position + 1;
+ callback(err, self.currentChunk.getc());
+ });
+ } else {
+ self.position = self.position + 1;
+ callback(null, self.currentChunk.getc());
+ }
+}
+
+define.classMethod('getc', {callback: true, promise:true});
+
+/**
+ * Writes a string to the file with a newline character appended at the end if
+ * the given string does not have one.
+ *
+ * @method
+ * @param {string} string the string to write.
+ * @param {GridStore~resultCallback} [callback] this will be called after executing this method. The first parameter will contain null and the second one will contain a reference to this object.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.puts = function(string, callback) {
+ var self = this;
+ var finalString = string.match(/\n$/) == null ? string + "\n" : string;
+ // We provided a callback leg
+ if(typeof callback == 'function') return this.write(finalString, callback);
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ self.write(finalString, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+}
+
+define.classMethod('puts', {callback: true, promise:true});
+
+/**
+ * Return a modified Readable stream including a possible transform method.
+ *
+ * @method
+ * @return {GridStoreStream}
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.stream = function() {
+ return new GridStoreStream(this);
+}
+
+define.classMethod('stream', {callback: false, promise:false, returns: [GridStoreStream]});
+
+/**
+ * Writes some data. This method will work properly only if initialized with mode "w" or "w+".
+ *
+ * @method
+ * @param {(string|Buffer)} data the data to write.
+ * @param {boolean} [close] closes this file after writing if set to true.
+ * @param {GridStore~resultCallback} [callback] this will be called after executing this method. The first parameter will contain null and the second one will contain a reference to this object.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.write = function write(data, close, callback) {
+ var self = this;
+ // We provided a callback leg
+ if(typeof callback == 'function') return _writeNormal(this, data, close, callback);
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ _writeNormal(self, data, close, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+}
+
+define.classMethod('write', {callback: true, promise:true});
+
+/**
+ * Handles the destroy part of a stream
+ *
+ * @method
+ * @result {null}
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.destroy = function destroy() {
+ // close and do not emit any more events. queued data is not sent.
+ if(!this.writable) return;
+ this.readable = false;
+ if(this.writable) {
+ this.writable = false;
+ this._q.length = 0;
+ this.emit('close');
+ }
+}
+
+define.classMethod('destroy', {callback: false, promise:false});
+
+/**
+ * Stores a file from the file system to the GridFS database.
+ *
+ * @method
+ * @param {(string|Buffer|FileHandle)} file the file to store.
+ * @param {GridStore~resultCallback} [callback] this will be called after executing this method. The first parameter will contain null and the second one will contain a reference to this object.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.writeFile = function (file, callback) {
+ var self = this;
+ // We provided a callback leg
+ if(typeof callback == 'function') return writeFile(self, file, callback);
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ writeFile(self, file, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+};
+
+var writeFile = function(self, file, callback) {
+ if (typeof file === 'string') {
+ fs.open(file, 'r', function (err, fd) {
+ if(err) return callback(err);
+ self.writeFile(fd, callback);
+ });
+ return;
+ }
+
+ self.open(function (err, self) {
+ if(err) return callback(err, self);
+
+ fs.fstat(file, function (err, stats) {
+ if(err) return callback(err, self);
+
+ var offset = 0;
+ var index = 0;
+ var numberOfChunksLeft = Math.min(stats.size / self.chunkSize);
+
+ // Write a chunk
+ var writeChunk = function() {
+ fs.read(file, self.chunkSize, offset, 'binary', function(err, data, bytesRead) {
+ if(err) return callback(err, self);
+
+ offset = offset + bytesRead;
+
+ // Create a new chunk for the data
+ var chunk = new Chunk(self, {n:index++}, self.writeConcern);
+ chunk.write(data, function(err, chunk) {
+ if(err) return callback(err, self);
+
+ chunk.save({}, function(err, result) {
+ if(err) return callback(err, self);
+
+ self.position = self.position + data.length;
+
+ // Point to current chunk
+ self.currentChunk = chunk;
+
+ if(offset >= stats.size) {
+ fs.close(file);
+ self.close(function(err, result) {
+ if(err) return callback(err, self);
+ return callback(null, self);
+ });
+ } else {
+ return process.nextTick(writeChunk);
+ }
+ });
+ });
+ });
+ }
+
+ // Process the first write
+ process.nextTick(writeChunk);
+ });
+ });
+}
+
+define.classMethod('writeFile', {callback: true, promise:true});
+
+/**
+ * Saves this file to the database. This will overwrite the old entry if it
+ * already exists. This will work properly only if mode was initialized to
+ * "w" or "w+".
+ *
+ * @method
+ * @param {GridStore~resultCallback} [callback] this will be called after executing this method. The first parameter will contain null and the second one will contain a reference to this object.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.close = function(callback) {
+ var self = this;
+ // We provided a callback leg
+ if(typeof callback == 'function') return close(self, callback);
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ close(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+};
+
+var close = function(self, callback) {
+ if(self.mode[0] == "w") {
+ // Set up options
+ var options = self.writeConcern;
+
+ if(self.currentChunk != null && self.currentChunk.position > 0) {
+ self.currentChunk.save({}, function(err, chunk) {
+ if(err && typeof callback == 'function') return callback(err);
+
+ self.collection(function(err, files) {
+ if(err && typeof callback == 'function') return callback(err);
+
+ // Build the mongo object
+ if(self.uploadDate != null) {
+ buildMongoObject(self, function(err, mongoObject) {
+ if(err) {
+ if(typeof callback == 'function') return callback(err); else throw err;
+ }
+
+ files.save(mongoObject, options, function(err) {
+ if(typeof callback == 'function')
+ callback(err, mongoObject);
+ });
+ });
+ } else {
+ self.uploadDate = new Date();
+ buildMongoObject(self, function(err, mongoObject) {
+ if(err) {
+ if(typeof callback == 'function') return callback(err); else throw err;
+ }
+
+ files.save(mongoObject, options, function(err) {
+ if(typeof callback == 'function')
+ callback(err, mongoObject);
+ });
+ });
+ }
+ });
+ });
+ } else {
+ self.collection(function(err, files) {
+ if(err && typeof callback == 'function') return callback(err);
+
+ self.uploadDate = new Date();
+ buildMongoObject(self, function(err, mongoObject) {
+ if(err) {
+ if(typeof callback == 'function') return callback(err); else throw err;
+ }
+
+ files.save(mongoObject, options, function(err) {
+ if(typeof callback == 'function')
+ callback(err, mongoObject);
+ });
+ });
+ });
+ }
+ } else if(self.mode[0] == "r") {
+ if(typeof callback == 'function')
+ callback(null, null);
+ } else {
+ if(typeof callback == 'function')
+ callback(MongoError.create({message: f("Illegal mode %s", self.mode), driver:true}));
+ }
+}
+
+define.classMethod('close', {callback: true, promise:true});
+
+/**
+ * The collection callback format.
+ * @callback GridStore~collectionCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Collection} collection The collection from the command execution.
+ */
+
+/**
+ * Retrieve this file's chunks collection.
+ *
+ * @method
+ * @param {GridStore~collectionCallback} callback the command callback.
+ * @return {Collection}
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.chunkCollection = function(callback) {
+ if(typeof callback == 'function')
+ return this.db.collection((this.root + ".chunks"), callback);
+ return this.db.collection((this.root + ".chunks"));
+};
+
+define.classMethod('chunkCollection', {callback: true, promise:false, returns: [Collection]});
+
+/**
+ * Deletes all the chunks of this file in the database.
+ *
+ * @method
+ * @param {GridStore~resultCallback} [callback] the command callback.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.unlink = function(callback) {
+ var self = this;
+ // We provided a callback leg
+ if(typeof callback == 'function') return unlink(self, callback);
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ unlink(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+};
+
+var unlink = function(self, callback) {
+ deleteChunks(self, function(err) {
+ if(err!==null) {
+ err.message = "at deleteChunks: " + err.message;
+ return callback(err);
+ }
+
+ self.collection(function(err, collection) {
+ if(err!==null) {
+ err.message = "at collection: " + err.message;
+ return callback(err);
+ }
+
+ collection.remove({'_id':self.fileId}, self.writeConcern, function(err) {
+ callback(err, self);
+ });
+ });
+ });
+}
+
+define.classMethod('unlink', {callback: true, promise:true});
+
+/**
+ * Retrieves the file collection associated with this object.
+ *
+ * @method
+ * @param {GridStore~collectionCallback} callback the command callback.
+ * @return {Collection}
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.collection = function(callback) {
+ if(typeof callback == 'function')
+ this.db.collection(this.root + ".files", callback);
+ return this.db.collection(this.root + ".files");
+};
+
+define.classMethod('collection', {callback: true, promise:false, returns: [Collection]});
+
+/**
+ * The readlines callback format.
+ * @callback GridStore~readlinesCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {string[]} strings The array of strings returned.
+ */
+
+/**
+ * Read the entire file as a list of strings splitting by the provided separator.
+ *
+ * @method
+ * @param {string} [separator] The character to be recognized as the newline separator.
+ * @param {GridStore~readlinesCallback} [callback] the command callback.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.readlines = function(separator, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 0);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ separator = args.length ? args.shift() : "\n";
+ separator = separator || "\n";
+
+ // We provided a callback leg
+ if(typeof callback == 'function') return readlines(self, separator, callback);
+
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ readlines(self, separator, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+};
+
+var readlines = function(self, separator, callback) {
+ self.read(function(err, data) {
+ if(err) return callback(err);
+
+ var items = data.toString().split(separator);
+ items = items.length > 0 ? items.splice(0, items.length - 1) : [];
+ for(var i = 0; i < items.length; i++) {
+ items[i] = items[i] + separator;
+ }
+
+ callback(null, items);
+ });
+}
+
+define.classMethod('readlines', {callback: true, promise:true});
+
+/**
+ * Deletes all the chunks of this file in the database if mode was set to "w" or
+ * "w+" and resets the read/write head to the initial position.
+ *
+ * @method
+ * @param {GridStore~resultCallback} [callback] this will be called after executing this method. The first parameter will contain null and the second one will contain a reference to this object.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.rewind = function(callback) {
+ var self = this;
+ // We provided a callback leg
+ if(typeof callback == 'function') return rewind(self, callback);
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ rewind(self, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+};
+
+var rewind = function(self, callback) {
+ if(self.currentChunk.chunkNumber != 0) {
+ if(self.mode[0] == "w") {
+ deleteChunks(self, function(err, gridStore) {
+ if(err) return callback(err);
+ self.currentChunk = new Chunk(self, {'n': 0}, self.writeConcern);
+ self.position = 0;
+ callback(null, self);
+ });
+ } else {
+ self.currentChunk(0, function(err, chunk) {
+ if(err) return callback(err);
+ self.currentChunk = chunk;
+ self.currentChunk.rewind();
+ self.position = 0;
+ callback(null, self);
+ });
+ }
+ } else {
+ self.currentChunk.rewind();
+ self.position = 0;
+ callback(null, self);
+ }
+}
+
+define.classMethod('rewind', {callback: true, promise:true});
+
+/**
+ * The read callback format.
+ * @callback GridStore~readCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Buffer} data The data read from the GridStore object
+ */
+
+/**
+ * Retrieves the contents of this file and advances the read/write head. Works with Buffers only.
+ *
+ * There are 3 signatures for this method:
+ *
+ * (callback)
+ * (length, callback)
+ * (length, buffer, callback)
+ *
+ * @method
+ * @param {number} [length] the number of characters to read. Reads all the characters from the read/write head to the EOF if not specified.
+ * @param {(string|Buffer)} [buffer] a string to hold temporary data. This is used for storing the string data read so far when recursively calling this method.
+ * @param {GridStore~readCallback} [callback] the command callback.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.read = function(length, buffer, callback) {
+ var self = this;
+
+ var args = Array.prototype.slice.call(arguments, 0);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ length = args.length ? args.shift() : null;
+ buffer = args.length ? args.shift() : null;
+ // We provided a callback leg
+ if(typeof callback == 'function') return read(self, length, buffer, callback);
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ read(self, length, buffer, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+}
+
+var read = function(self, length, buffer, callback) {
+ // The data is a c-terminated string and thus the length - 1
+ var finalLength = length == null ? self.length - self.position : length;
+ var finalBuffer = buffer == null ? new Buffer(finalLength) : buffer;
+ // Add a index to buffer to keep track of writing position or apply current index
+ finalBuffer._index = buffer != null && buffer._index != null ? buffer._index : 0;
+
+ if((self.currentChunk.length() - self.currentChunk.position + finalBuffer._index) >= finalLength) {
+ var slice = self.currentChunk.readSlice(finalLength - finalBuffer._index);
+ // Copy content to final buffer
+ slice.copy(finalBuffer, finalBuffer._index);
+ // Update internal position
+ self.position = self.position + finalBuffer.length;
+ // Check if we don't have a file at all
+ if(finalLength == 0 && finalBuffer.length == 0) return callback(MongoError.create({message: "File does not exist", driver:true}), null);
+ // Else return data
+ return callback(null, finalBuffer);
+ }
+
+ // Read the next chunk
+ var slice = self.currentChunk.readSlice(self.currentChunk.length() - self.currentChunk.position);
+ // Copy content to final buffer
+ slice.copy(finalBuffer, finalBuffer._index);
+ // Update index position
+ finalBuffer._index += slice.length;
+
+ // Load next chunk and read more
+ nthChunk(self, self.currentChunk.chunkNumber + 1, function(err, chunk) {
+ if(err) return callback(err);
+
+ if(chunk.length() > 0) {
+ self.currentChunk = chunk;
+ self.read(length, finalBuffer, callback);
+ } else {
+ if(finalBuffer._index > 0) {
+ callback(null, finalBuffer)
+ } else {
+ callback(MongoError.create({message: "no chunks found for file, possibly corrupt", driver:true}), null);
+ }
+ }
+ });
+}
+
+define.classMethod('read', {callback: true, promise:true});
+
+/**
+ * The tell callback format.
+ * @callback GridStore~tellCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {number} position The current read position in the GridStore.
+ */
+
+/**
+ * Retrieves the position of the read/write head of this file.
+ *
+ * @method
+ * @param {number} [length] the number of characters to read. Reads all the characters from the read/write head to the EOF if not specified.
+ * @param {(string|Buffer)} [buffer] a string to hold temporary data. This is used for storing the string data read so far when recursively calling this method.
+ * @param {GridStore~tellCallback} [callback] the command callback.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.tell = function(callback) {
+ var self = this;
+ // We provided a callback leg
+ if(typeof callback == 'function') return callback(null, this.position);
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ resolve(self.position);
+ });
+};
+
+define.classMethod('tell', {callback: true, promise:true});
+
+/**
+ * The tell callback format.
+ * @callback GridStore~gridStoreCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {GridStore} gridStore The gridStore.
+ */
+
+/**
+ * Moves the read/write head to a new location.
+ *
+ * There are 3 signatures for this method
+ *
+ * Seek Location Modes
+ * - **GridStore.IO_SEEK_SET**, **(default)** set the position from the start of the file.
+ * - **GridStore.IO_SEEK_CUR**, set the position from the current position in the file.
+ * - **GridStore.IO_SEEK_END**, set the position from the end of the file.
+ *
+ * @method
+ * @param {number} [position] the position to seek to
+ * @param {number} [seekLocation] seek mode. Use one of the Seek Location modes.
+ * @param {GridStore~gridStoreCallback} [callback] the command callback.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.prototype.seek = function(position, seekLocation, callback) {
+ var self = this;
+
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ seekLocation = args.length ? args.shift() : null;
+
+ // We provided a callback leg
+ if(typeof callback == 'function') return seek(self, position, seekLocation, callback);
+ // Return promise
+ return new self.promiseLibrary(function(resolve, reject) {
+ seek(self, position, seekLocation, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+}
+
+var seek = function(self, position, seekLocation, callback) {
+ // Seek only supports read mode
+ if(self.mode != 'r') {
+ return callback(MongoError.create({message: "seek is only supported for mode r", driver:true}))
+ }
+
+ var seekLocationFinal = seekLocation == null ? GridStore.IO_SEEK_SET : seekLocation;
+ var finalPosition = position;
+ var targetPosition = 0;
+
+ // Calculate the position
+ if(seekLocationFinal == GridStore.IO_SEEK_CUR) {
+ targetPosition = self.position + finalPosition;
+ } else if(seekLocationFinal == GridStore.IO_SEEK_END) {
+ targetPosition = self.length + finalPosition;
+ } else {
+ targetPosition = finalPosition;
+ }
+
+ // Get the chunk
+ var newChunkNumber = Math.floor(targetPosition/self.chunkSize);
+ var seekChunk = function() {
+ nthChunk(self, newChunkNumber, function(err, chunk) {
+ if(err) return callback(err, null);
+ if(chunk == null) return callback(new Error('no chunk found'));
+
+ // Set the current chunk
+ self.currentChunk = chunk;
+ self.position = targetPosition;
+ self.currentChunk.position = (self.position % self.chunkSize);
+ callback(err, self);
+ });
+ };
+
+ seekChunk();
+}
+
+define.classMethod('seek', {callback: true, promise:true});
+
+/**
+ * @ignore
+ */
+var _open = function(self, options, callback) {
+ var collection = self.collection();
+ // Create the query
+ var query = self.referenceBy == REFERENCE_BY_ID ? {_id:self.fileId} : {filename:self.filename};
+ query = null == self.fileId && self.filename == null ? null : query;
+ options.readPreference = self.readPreference;
+
+ // Fetch the chunks
+ if(query != null) {
+ collection.findOne(query, options, function(err, doc) {
+ if(err) return error(err);
+
+ // Check if the collection for the files exists otherwise prepare the new one
+ if(doc != null) {
+ self.fileId = doc._id;
+ // Prefer a new filename over the existing one if this is a write
+ self.filename = ((self.mode == 'r') || (self.filename == undefined)) ? doc.filename : self.filename;
+ self.contentType = doc.contentType;
+ self.internalChunkSize = doc.chunkSize;
+ self.uploadDate = doc.uploadDate;
+ self.aliases = doc.aliases;
+ self.length = doc.length;
+ self.metadata = doc.metadata;
+ self.internalMd5 = doc.md5;
+ } else if (self.mode != 'r') {
+ self.fileId = self.fileId == null ? new ObjectID() : self.fileId;
+ self.contentType = GridStore.DEFAULT_CONTENT_TYPE;
+ self.internalChunkSize = self.internalChunkSize == null ? Chunk.DEFAULT_CHUNK_SIZE : self.internalChunkSize;
+ self.length = 0;
+ } else {
+ self.length = 0;
+ var txtId = self.fileId instanceof ObjectID ? self.fileId.toHexString() : self.fileId;
+ return error(MongoError.create({message: f("file with id %s not opened for writing", (self.referenceBy == REFERENCE_BY_ID ? txtId : self.filename)), driver:true}), self);
+ }
+
+ // Process the mode of the object
+ if(self.mode == "r") {
+ nthChunk(self, 0, options, function(err, chunk) {
+ if(err) return error(err);
+ self.currentChunk = chunk;
+ self.position = 0;
+ callback(null, self);
+ });
+ } else if(self.mode == "w" && doc) {
+ // Delete any existing chunks
+ deleteChunks(self, options, function(err, result) {
+ if(err) return error(err);
+ self.currentChunk = new Chunk(self, {'n':0}, self.writeConcern);
+ self.contentType = self.options['content_type'] == null ? self.contentType : self.options['content_type'];
+ self.internalChunkSize = self.options['chunk_size'] == null ? self.internalChunkSize : self.options['chunk_size'];
+ self.metadata = self.options['metadata'] == null ? self.metadata : self.options['metadata'];
+ self.aliases = self.options['aliases'] == null ? self.aliases : self.options['aliases'];
+ self.position = 0;
+ callback(null, self);
+ });
+ } else if(self.mode == "w") {
+ self.currentChunk = new Chunk(self, {'n':0}, self.writeConcern);
+ self.contentType = self.options['content_type'] == null ? self.contentType : self.options['content_type'];
+ self.internalChunkSize = self.options['chunk_size'] == null ? self.internalChunkSize : self.options['chunk_size'];
+ self.metadata = self.options['metadata'] == null ? self.metadata : self.options['metadata'];
+ self.aliases = self.options['aliases'] == null ? self.aliases : self.options['aliases'];
+ self.position = 0;
+ callback(null, self);
+ } else if(self.mode == "w+") {
+ nthChunk(self, lastChunkNumber(self), options, function(err, chunk) {
+ if(err) return error(err);
+ // Set the current chunk
+ self.currentChunk = chunk == null ? new Chunk(self, {'n':0}, self.writeConcern) : chunk;
+ self.currentChunk.position = self.currentChunk.data.length();
+ self.metadata = self.options['metadata'] == null ? self.metadata : self.options['metadata'];
+ self.aliases = self.options['aliases'] == null ? self.aliases : self.options['aliases'];
+ self.position = self.length;
+ callback(null, self);
+ });
+ }
+ });
+ } else {
+ // Write only mode
+ self.fileId = null == self.fileId ? new ObjectID() : self.fileId;
+ self.contentType = GridStore.DEFAULT_CONTENT_TYPE;
+ self.internalChunkSize = self.internalChunkSize == null ? Chunk.DEFAULT_CHUNK_SIZE : self.internalChunkSize;
+ self.length = 0;
+
+ var collection2 = self.chunkCollection();
+ // No file exists set up write mode
+ if(self.mode == "w") {
+ // Delete any existing chunks
+ deleteChunks(self, options, function(err, result) {
+ if(err) return error(err);
+ self.currentChunk = new Chunk(self, {'n':0}, self.writeConcern);
+ self.contentType = self.options['content_type'] == null ? self.contentType : self.options['content_type'];
+ self.internalChunkSize = self.options['chunk_size'] == null ? self.internalChunkSize : self.options['chunk_size'];
+ self.metadata = self.options['metadata'] == null ? self.metadata : self.options['metadata'];
+ self.aliases = self.options['aliases'] == null ? self.aliases : self.options['aliases'];
+ self.position = 0;
+ callback(null, self);
+ });
+ } else if(self.mode == "w+") {
+ nthChunk(self, lastChunkNumber(self), options, function(err, chunk) {
+ if(err) return error(err);
+ // Set the current chunk
+ self.currentChunk = chunk == null ? new Chunk(self, {'n':0}, self.writeConcern) : chunk;
+ self.currentChunk.position = self.currentChunk.data.length();
+ self.metadata = self.options['metadata'] == null ? self.metadata : self.options['metadata'];
+ self.aliases = self.options['aliases'] == null ? self.aliases : self.options['aliases'];
+ self.position = self.length;
+ callback(null, self);
+ });
+ }
+ }
+
+ // only pass error to callback once
+ function error (err) {
+ if(error.err) return;
+ callback(error.err = err);
+ }
+};
+
+/**
+ * @ignore
+ */
+var writeBuffer = function(self, buffer, close, callback) {
+ if(typeof close === "function") { callback = close; close = null; }
+ var finalClose = typeof close == 'boolean' ? close : false;
+
+ if(self.mode != "w") {
+ callback(MongoError.create({message: f("file with id %s not opened for writing", (self.referenceBy == REFERENCE_BY_ID ? self.referenceBy : self.filename)), driver:true}), null);
+ } else {
+ if(self.currentChunk.position + buffer.length >= self.chunkSize) {
+ // Write out the current Chunk and then keep writing until we have less data left than a chunkSize left
+ // to a new chunk (recursively)
+ var previousChunkNumber = self.currentChunk.chunkNumber;
+ var leftOverDataSize = self.chunkSize - self.currentChunk.position;
+ var firstChunkData = buffer.slice(0, leftOverDataSize);
+ var leftOverData = buffer.slice(leftOverDataSize);
+ // A list of chunks to write out
+ var chunksToWrite = [self.currentChunk.write(firstChunkData)];
+ // If we have more data left than the chunk size let's keep writing new chunks
+ while(leftOverData.length >= self.chunkSize) {
+ // Create a new chunk and write to it
+ var newChunk = new Chunk(self, {'n': (previousChunkNumber + 1)}, self.writeConcern);
+ var firstChunkData = leftOverData.slice(0, self.chunkSize);
+ leftOverData = leftOverData.slice(self.chunkSize);
+ // Update chunk number
+ previousChunkNumber = previousChunkNumber + 1;
+ // Write data
+ newChunk.write(firstChunkData);
+ // Push chunk to save list
+ chunksToWrite.push(newChunk);
+ }
+
+ // Set current chunk with remaining data
+ self.currentChunk = new Chunk(self, {'n': (previousChunkNumber + 1)}, self.writeConcern);
+ // If we have left over data write it
+ if(leftOverData.length > 0) self.currentChunk.write(leftOverData);
+
+ // Update the position for the gridstore
+ self.position = self.position + buffer.length;
+ // Total number of chunks to write
+ var numberOfChunksToWrite = chunksToWrite.length;
+
+ for(var i = 0; i < chunksToWrite.length; i++) {
+ chunksToWrite[i].save({}, function(err, result) {
+ if(err) return callback(err);
+
+ numberOfChunksToWrite = numberOfChunksToWrite - 1;
+
+ if(numberOfChunksToWrite <= 0) {
+ // We care closing the file before returning
+ if(finalClose) {
+ return self.close(function(err, result) {
+ callback(err, self);
+ });
+ }
+
+ // Return normally
+ return callback(null, self);
+ }
+ });
+ }
+ } else {
+ // Update the position for the gridstore
+ self.position = self.position + buffer.length;
+ // We have less data than the chunk size just write it and callback
+ self.currentChunk.write(buffer);
+ // We care closing the file before returning
+ if(finalClose) {
+ return self.close(function(err, result) {
+ callback(err, self);
+ });
+ }
+ // Return normally
+ return callback(null, self);
+ }
+ }
+};
+
+/**
+ * Creates a mongoDB object representation of this object.
+ *
+ * <pre><code>
+ * {
+ * '_id' : , // {number} id for this file
+ * 'filename' : , // {string} name for this file
+ * 'contentType' : , // {string} mime type for this file
+ * 'length' : , // {number} size of this file?
+ * 'chunksize' : , // {number} chunk size used by this file
+ * 'uploadDate' : , // {Date}
+ * 'aliases' : , // {array of string}
+ * 'metadata' : , // {string}
+ * }
+ * </code></pre>
+ *
+ * @ignore
+ */
+var buildMongoObject = function(self, callback) {
+ // Calcuate the length
+ var mongoObject = {
+ '_id': self.fileId,
+ 'filename': self.filename,
+ 'contentType': self.contentType,
+ 'length': self.position ? self.position : 0,
+ 'chunkSize': self.chunkSize,
+ 'uploadDate': self.uploadDate,
+ 'aliases': self.aliases,
+ 'metadata': self.metadata
+ };
+
+ var md5Command = {filemd5:self.fileId, root:self.root};
+ self.db.command(md5Command, function(err, results) {
+ if(err) return callback(err);
+
+ mongoObject.md5 = results.md5;
+ callback(null, mongoObject);
+ });
+};
+
+/**
+ * Gets the nth chunk of this file.
+ * @ignore
+ */
+var nthChunk = function(self, chunkNumber, options, callback) {
+ if(typeof options == 'function') {
+ callback = options;
+ options = {};
+ }
+
+ options = options || self.writeConcern;
+ options.readPreference = self.readPreference;
+ // Get the nth chunk
+ self.chunkCollection().findOne({'files_id':self.fileId, 'n':chunkNumber}, options, function(err, chunk) {
+ if(err) return callback(err);
+
+ var finalChunk = chunk == null ? {} : chunk;
+ callback(null, new Chunk(self, finalChunk, self.writeConcern));
+ });
+};
+
+/**
+ * @ignore
+ */
+var lastChunkNumber = function(self) {
+ return Math.floor((self.length ? self.length - 1 : 0)/self.chunkSize);
+};
+
+/**
+ * Deletes all the chunks of this file in the database.
+ *
+ * @ignore
+ */
+var deleteChunks = function(self, options, callback) {
+ if(typeof options == 'function') {
+ callback = options;
+ options = {};
+ }
+
+ options = options || self.writeConcern;
+
+ if(self.fileId != null) {
+ self.chunkCollection().remove({'files_id':self.fileId}, options, function(err, result) {
+ if(err) return callback(err, false);
+ callback(null, true);
+ });
+ } else {
+ callback(null, true);
+ }
+};
+
+/**
+* The collection to be used for holding the files and chunks collection.
+*
+* @classconstant DEFAULT_ROOT_COLLECTION
+**/
+GridStore.DEFAULT_ROOT_COLLECTION = 'fs';
+
+/**
+* Default file mime type
+*
+* @classconstant DEFAULT_CONTENT_TYPE
+**/
+GridStore.DEFAULT_CONTENT_TYPE = 'binary/octet-stream';
+
+/**
+* Seek mode where the given length is absolute.
+*
+* @classconstant IO_SEEK_SET
+**/
+GridStore.IO_SEEK_SET = 0;
+
+/**
+* Seek mode where the given length is an offset to the current read/write head.
+*
+* @classconstant IO_SEEK_CUR
+**/
+GridStore.IO_SEEK_CUR = 1;
+
+/**
+* Seek mode where the given length is an offset to the end of the file.
+*
+* @classconstant IO_SEEK_END
+**/
+GridStore.IO_SEEK_END = 2;
+
+/**
+ * Checks if a file exists in the database.
+ *
+ * @method
+ * @static
+ * @param {Db} db the database to query.
+ * @param {string} name The name of the file to look for.
+ * @param {string} [rootCollection] The root collection that holds the files and chunks collection. Defaults to **{GridStore.DEFAULT_ROOT_COLLECTION}**.
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {object} [options.promiseLibrary=null] A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible
+ * @param {GridStore~resultCallback} [callback] result from exists.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.exist = function(db, fileIdObject, rootCollection, options, callback) {
+ var args = Array.prototype.slice.call(arguments, 2);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ rootCollection = args.length ? args.shift() : null;
+ options = args.length ? args.shift() : {};
+ options = options || {};
+
+ // Get the promiseLibrary
+ var promiseLibrary = options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // We provided a callback leg
+ if(typeof callback == 'function') return exists(db, fileIdObject, rootCollection, options, callback);
+ // Return promise
+ return new promiseLibrary(function(resolve, reject) {
+ exists(db, fileIdObject, rootCollection, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+};
+
+var exists = function(db, fileIdObject, rootCollection, options, callback) {
+ // Establish read preference
+ var readPreference = options.readPreference || ReadPreference.PRIMARY;
+ // Fetch collection
+ var rootCollectionFinal = rootCollection != null ? rootCollection : GridStore.DEFAULT_ROOT_COLLECTION;
+ db.collection(rootCollectionFinal + ".files", function(err, collection) {
+ if(err) return callback(err);
+
+ // Build query
+ var query = (typeof fileIdObject == 'string' || Object.prototype.toString.call(fileIdObject) == '[object RegExp]' )
+ ? {'filename':fileIdObject}
+ : {'_id':fileIdObject}; // Attempt to locate file
+
+ // We have a specific query
+ if(fileIdObject != null
+ && typeof fileIdObject == 'object'
+ && Object.prototype.toString.call(fileIdObject) != '[object RegExp]') {
+ query = fileIdObject;
+ }
+
+ // Check if the entry exists
+ collection.findOne(query, {readPreference:readPreference}, function(err, item) {
+ if(err) return callback(err);
+ callback(null, item == null ? false : true);
+ });
+ });
+}
+
+define.staticMethod('exist', {callback: true, promise:true});
+
+/**
+ * Gets the list of files stored in the GridFS.
+ *
+ * @method
+ * @static
+ * @param {Db} db the database to query.
+ * @param {string} [rootCollection] The root collection that holds the files and chunks collection. Defaults to **{GridStore.DEFAULT_ROOT_COLLECTION}**.
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {object} [options.promiseLibrary=null] A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible
+ * @param {GridStore~resultCallback} [callback] result from exists.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.list = function(db, rootCollection, options, callback) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ rootCollection = args.length ? args.shift() : null;
+ options = args.length ? args.shift() : {};
+ options = options || {};
+
+ // Get the promiseLibrary
+ var promiseLibrary = options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // We provided a callback leg
+ if(typeof callback == 'function') return list(db, rootCollection, options, callback);
+ // Return promise
+ return new promiseLibrary(function(resolve, reject) {
+ list(db, rootCollection, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+};
+
+var list = function(db, rootCollection, options, callback) {
+ // Ensure we have correct values
+ if(rootCollection != null && typeof rootCollection == 'object') {
+ options = rootCollection;
+ rootCollection = null;
+ }
+
+ // Establish read preference
+ var readPreference = options.readPreference || ReadPreference.PRIMARY;
+ // Check if we are returning by id not filename
+ var byId = options['id'] != null ? options['id'] : false;
+ // Fetch item
+ var rootCollectionFinal = rootCollection != null ? rootCollection : GridStore.DEFAULT_ROOT_COLLECTION;
+ var items = [];
+ db.collection((rootCollectionFinal + ".files"), function(err, collection) {
+ if(err) return callback(err);
+
+ collection.find({}, {readPreference:readPreference}, function(err, cursor) {
+ if(err) return callback(err);
+
+ cursor.each(function(err, item) {
+ if(item != null) {
+ items.push(byId ? item._id : item.filename);
+ } else {
+ callback(err, items);
+ }
+ });
+ });
+ });
+}
+
+define.staticMethod('list', {callback: true, promise:true});
+
+/**
+ * Reads the contents of a file.
+ *
+ * This method has the following signatures
+ *
+ * (db, name, callback)
+ * (db, name, length, callback)
+ * (db, name, length, offset, callback)
+ * (db, name, length, offset, options, callback)
+ *
+ * @method
+ * @static
+ * @param {Db} db the database to query.
+ * @param {string} name The name of the file.
+ * @param {number} [length] The size of data to read.
+ * @param {number} [offset] The offset from the head of the file of which to start reading from.
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {object} [options.promiseLibrary=null] A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible
+ * @param {GridStore~readCallback} [callback] the command callback.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.read = function(db, name, length, offset, options, callback) {
+ var args = Array.prototype.slice.call(arguments, 2);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ length = args.length ? args.shift() : null;
+ offset = args.length ? args.shift() : null;
+ options = args.length ? args.shift() : null;
+ options = options || {};
+
+ // Get the promiseLibrary
+ var promiseLibrary = options ? options.promiseLibrary : null;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // We provided a callback leg
+ if(typeof callback == 'function') return readStatic(db, name, length, offset, options, callback);
+ // Return promise
+ return new promiseLibrary(function(resolve, reject) {
+ readStatic(db, name, length, offset, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+};
+
+var readStatic = function(db, name, length, offset, options, callback) {
+ new GridStore(db, name, "r", options).open(function(err, gridStore) {
+ if(err) return callback(err);
+ // Make sure we are not reading out of bounds
+ if(offset && offset >= gridStore.length) return callback("offset larger than size of file", null);
+ if(length && length > gridStore.length) return callback("length is larger than the size of the file", null);
+ if(offset && length && (offset + length) > gridStore.length) return callback("offset and length is larger than the size of the file", null);
+
+ if(offset != null) {
+ gridStore.seek(offset, function(err, gridStore) {
+ if(err) return callback(err);
+ gridStore.read(length, callback);
+ });
+ } else {
+ gridStore.read(length, callback);
+ }
+ });
+}
+
+define.staticMethod('read', {callback: true, promise:true});
+
+/**
+ * Read the entire file as a list of strings splitting by the provided separator.
+ *
+ * @method
+ * @static
+ * @param {Db} db the database to query.
+ * @param {(String|object)} name the name of the file.
+ * @param {string} [separator] The character to be recognized as the newline separator.
+ * @param {object} [options=null] Optional settings.
+ * @param {(ReadPreference|string)} [options.readPreference=null] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
+ * @param {object} [options.promiseLibrary=null] A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible
+ * @param {GridStore~readlinesCallback} [callback] the command callback.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.readlines = function(db, name, separator, options, callback) {
+ var args = Array.prototype.slice.call(arguments, 2);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ separator = args.length ? args.shift() : null;
+ options = args.length ? args.shift() : null;
+ options = options || {};
+
+ // Get the promiseLibrary
+ var promiseLibrary = options ? options.promiseLibrary : null;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // We provided a callback leg
+ if(typeof callback == 'function') return readlinesStatic(db, name, separator, options, callback);
+ // Return promise
+ return new promiseLibrary(function(resolve, reject) {
+ readlinesStatic(db, name, separator, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+};
+
+var readlinesStatic = function(db, name, separator, options, callback) {
+ var finalSeperator = separator == null ? "\n" : separator;
+ new GridStore(db, name, "r", options).open(function(err, gridStore) {
+ if(err) return callback(err);
+ gridStore.readlines(finalSeperator, callback);
+ });
+}
+
+define.staticMethod('readlines', {callback: true, promise:true});
+
+/**
+ * Deletes the chunks and metadata information of a file from GridFS.
+ *
+ * @method
+ * @static
+ * @param {Db} db The database to query.
+ * @param {(string|array)} names The name/names of the files to delete.
+ * @param {object} [options=null] Optional settings.
+ * @param {object} [options.promiseLibrary=null] A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible
+ * @param {GridStore~resultCallback} [callback] the command callback.
+ * @return {Promise} returns Promise if no callback passed
+ * @deprecated Use GridFSBucket API instead
+ */
+GridStore.unlink = function(db, names, options, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 2);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ options = args.length ? args.shift() : {};
+ options = options || {};
+
+ // Get the promiseLibrary
+ var promiseLibrary = options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // We provided a callback leg
+ if(typeof callback == 'function') return unlinkStatic(self, db, names, options, callback);
+
+ // Return promise
+ return new promiseLibrary(function(resolve, reject) {
+ unlinkStatic(self, db, names, options, function(err, r) {
+ if(err) return reject(err);
+ resolve(r);
+ })
+ });
+};
+
+var unlinkStatic = function(self, db, names, options, callback) {
+ // Get the write concern
+ var writeConcern = _getWriteConcern(db, options);
+
+ // List of names
+ if(names.constructor == Array) {
+ var tc = 0;
+ for(var i = 0; i < names.length; i++) {
+ ++tc;
+ GridStore.unlink(db, names[i], options, function(result) {
+ if(--tc == 0) {
+ callback(null, self);
+ }
+ });
+ }
+ } else {
+ new GridStore(db, names, "w", options).open(function(err, gridStore) {
+ if(err) return callback(err);
+ deleteChunks(gridStore, function(err, result) {
+ if(err) return callback(err);
+ gridStore.collection(function(err, collection) {
+ if(err) return callback(err);
+ collection.remove({'_id':gridStore.fileId}, writeConcern, function(err, result) {
+ callback(err, self);
+ });
+ });
+ });
+ });
+ }
+}
+
+define.staticMethod('unlink', {callback: true, promise:true});
+
+/**
+ * @ignore
+ */
+var _writeNormal = function(self, data, close, callback) {
+ // If we have a buffer write it using the writeBuffer method
+ if(Buffer.isBuffer(data)) {
+ return writeBuffer(self, data, close, callback);
+ } else {
+ return writeBuffer(self, new Buffer(data, 'binary'), close, callback);
+ }
+}
+
+/**
+ * @ignore
+ */
+var _setWriteConcernHash = function(options) {
+ var finalOptions = {};
+ if(options.w != null) finalOptions.w = options.w;
+ if(options.journal == true) finalOptions.j = options.journal;
+ if(options.j == true) finalOptions.j = options.j;
+ if(options.fsync == true) finalOptions.fsync = options.fsync;
+ if(options.wtimeout != null) finalOptions.wtimeout = options.wtimeout;
+ return finalOptions;
+}
+
+/**
+ * @ignore
+ */
+var _getWriteConcern = function(self, options) {
+ // Final options
+ var finalOptions = {w:1};
+ options = options || {};
+
+ // Local options verification
+ if(options.w != null || typeof options.j == 'boolean' || typeof options.journal == 'boolean' || typeof options.fsync == 'boolean') {
+ finalOptions = _setWriteConcernHash(options);
+ } else if(options.safe != null && typeof options.safe == 'object') {
+ finalOptions = _setWriteConcernHash(options.safe);
+ } else if(typeof options.safe == "boolean") {
+ finalOptions = {w: (options.safe ? 1 : 0)};
+ } else if(self.options.w != null || typeof self.options.j == 'boolean' || typeof self.options.journal == 'boolean' || typeof self.options.fsync == 'boolean') {
+ finalOptions = _setWriteConcernHash(self.options);
+ } else if(self.safe && (self.safe.w != null || typeof self.safe.j == 'boolean' || typeof self.safe.journal == 'boolean' || typeof self.safe.fsync == 'boolean')) {
+ finalOptions = _setWriteConcernHash(self.safe);
+ } else if(typeof self.safe == "boolean") {
+ finalOptions = {w: (self.safe ? 1 : 0)};
+ }
+
+ // Ensure we don't have an invalid combination of write concerns
+ if(finalOptions.w < 1
+ && (finalOptions.journal == true || finalOptions.j == true || finalOptions.fsync == true)) throw MongoError.create({message: "No acknowledgement using w < 1 cannot be combined with journal:true or fsync:true", driver:true});
+
+ // Return the options
+ return finalOptions;
+}
+
+/**
+ * Create a new GridStoreStream instance (INTERNAL TYPE, do not instantiate directly)
+ *
+ * @class
+ * @extends external:Duplex
+ * @return {GridStoreStream} a GridStoreStream instance.
+ * @deprecated Use GridFSBucket API instead
+ */
+var GridStoreStream = function(gs) {
+ var self = this;
+ // Initialize the duplex stream
+ Duplex.call(this);
+
+ // Get the gridstore
+ this.gs = gs;
+
+ // End called
+ this.endCalled = false;
+
+ // If we have a seek
+ this.totalBytesToRead = this.gs.length - this.gs.position;
+ this.seekPosition = this.gs.position;
+}
+
+//
+// Inherit duplex
+inherits(GridStoreStream, Duplex);
+
+GridStoreStream.prototype._pipe = GridStoreStream.prototype.pipe;
+
+// Set up override
+GridStoreStream.prototype.pipe = function(destination) {
+ var self = this;
+
+ // Only open gridstore if not already open
+ if(!self.gs.isOpen) {
+ self.gs.open(function(err) {
+ if(err) return self.emit('error', err);
+ self.totalBytesToRead = self.gs.length - self.gs.position;
+ self._pipe.apply(self, [destination]);
+ });
+ } else {
+ self.totalBytesToRead = self.gs.length - self.gs.position;
+ self._pipe.apply(self, [destination]);
+ }
+
+ return destination;
+}
+
+// Called by stream
+GridStoreStream.prototype._read = function(n) {
+ var self = this;
+
+ var read = function() {
+ // Read data
+ self.gs.read(length, function(err, buffer) {
+ if(err && !self.endCalled) return self.emit('error', err);
+
+ // Stream is closed
+ if(self.endCalled || buffer == null) return self.push(null);
+ // Remove bytes read
+ if(buffer.length <= self.totalBytesToRead) {
+ self.totalBytesToRead = self.totalBytesToRead - buffer.length;
+ self.push(buffer);
+ } else if(buffer.length > self.totalBytesToRead) {
+ self.totalBytesToRead = self.totalBytesToRead - buffer._index;
+ self.push(buffer.slice(0, buffer._index));
+ }
+
+ // Finished reading
+ if(self.totalBytesToRead <= 0) {
+ self.endCalled = true;
+ }
+ });
+ }
+
+ // Set read length
+ var length = self.gs.length < self.gs.chunkSize ? self.gs.length - self.seekPosition : self.gs.chunkSize;
+ if(!self.gs.isOpen) {
+ self.gs.open(function(err, gs) {
+ self.totalBytesToRead = self.gs.length - self.gs.position;
+ if(err) return self.emit('error', err);
+ read();
+ });
+ } else {
+ read();
+ }
+}
+
+GridStoreStream.prototype.destroy = function() {
+ this.pause();
+ this.endCalled = true;
+ this.gs.close();
+ this.emit('end');
+}
+
+GridStoreStream.prototype.write = function(chunk, encoding, callback) {
+ var self = this;
+ if(self.endCalled) return self.emit('error', MongoError.create({message: 'attempting to write to stream after end called', driver:true}))
+ // Do we have to open the gridstore
+ if(!self.gs.isOpen) {
+ self.gs.open(function() {
+ self.gs.isOpen = true;
+ self.gs.write(chunk, function() {
+ process.nextTick(function() {
+ self.emit('drain');
+ });
+ });
+ });
+ return false;
+ } else {
+ self.gs.write(chunk, function() {
+ self.emit('drain');
+ });
+ return true;
+ }
+}
+
+GridStoreStream.prototype.end = function(chunk, encoding, callback) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 0);
+ callback = args.pop();
+ if(typeof callback != 'function') args.push(callback);
+ chunk = args.length ? args.shift() : null;
+ encoding = args.length ? args.shift() : null;
+ self.endCalled = true;
+
+ if(chunk) {
+ self.gs.write(chunk, function() {
+ self.gs.close(function() {
+ if(typeof callback == 'function') callback();
+ self.emit('end')
+ });
+ });
+ }
+
+ self.gs.close(function() {
+ if(typeof callback == 'function') callback();
+ self.emit('end')
+ });
+}
+
+/**
+ * The read() method pulls some data out of the internal buffer and returns it. If there is no data available, then it will return null.
+ * @function external:Duplex#read
+ * @param {number} size Optional argument to specify how much data to read.
+ * @return {(String | Buffer | null)}
+ */
+
+/**
+ * Call this function to cause the stream to return strings of the specified encoding instead of Buffer objects.
+ * @function external:Duplex#setEncoding
+ * @param {string} encoding The encoding to use.
+ * @return {null}
+ */
+
+/**
+ * This method will cause the readable stream to resume emitting data events.
+ * @function external:Duplex#resume
+ * @return {null}
+ */
+
+/**
+ * This method will cause a stream in flowing-mode to stop emitting data events. Any data that becomes available will remain in the internal buffer.
+ * @function external:Duplex#pause
+ * @return {null}
+ */
+
+/**
+ * This method pulls all the data out of a readable stream, and writes it to the supplied destination, automatically managing the flow so that the destination is not overwhelmed by a fast readable stream.
+ * @function external:Duplex#pipe
+ * @param {Writable} destination The destination for writing data
+ * @param {object} [options] Pipe options
+ * @return {null}
+ */
+
+/**
+ * This method will remove the hooks set up for a previous pipe() call.
+ * @function external:Duplex#unpipe
+ * @param {Writable} [destination] The destination for writing data
+ * @return {null}
+ */
+
+/**
+ * This is useful in certain cases where a stream is being consumed by a parser, which needs to "un-consume" some data that it has optimistically pulled out of the source, so that the stream can be passed on to some other party.
+ * @function external:Duplex#unshift
+ * @param {(Buffer|string)} chunk Chunk of data to unshift onto the read queue.
+ * @return {null}
+ */
+
+/**
+ * Versions of Node prior to v0.10 had streams that did not implement the entire Streams API as it is today. (See "Compatibility" below for more information.)
+ * @function external:Duplex#wrap
+ * @param {Stream} stream An "old style" readable stream.
+ * @return {null}
+ */
+
+/**
+ * This method writes some data to the underlying system, and calls the supplied callback once the data has been fully handled.
+ * @function external:Duplex#write
+ * @param {(string|Buffer)} chunk The data to write
+ * @param {string} encoding The encoding, if chunk is a String
+ * @param {function} callback Callback for when this chunk of data is flushed
+ * @return {boolean}
+ */
+
+/**
+ * Call this method when no more data will be written to the stream. If supplied, the callback is attached as a listener on the finish event.
+ * @function external:Duplex#end
+ * @param {(string|Buffer)} chunk The data to write
+ * @param {string} encoding The encoding, if chunk is a String
+ * @param {function} callback Callback for when this chunk of data is flushed
+ * @return {null}
+ */
+
+/**
+ * GridStoreStream stream data event, fired for each document in the cursor.
+ *
+ * @event GridStoreStream#data
+ * @type {object}
+ */
+
+/**
+ * GridStoreStream stream end event
+ *
+ * @event GridStoreStream#end
+ * @type {null}
+ */
+
+/**
+ * GridStoreStream stream close event
+ *
+ * @event GridStoreStream#close
+ * @type {null}
+ */
+
+/**
+ * GridStoreStream stream readable event
+ *
+ * @event GridStoreStream#readable
+ * @type {null}
+ */
+
+/**
+ * GridStoreStream stream drain event
+ *
+ * @event GridStoreStream#drain
+ * @type {null}
+ */
+
+/**
+ * GridStoreStream stream finish event
+ *
+ * @event GridStoreStream#finish
+ * @type {null}
+ */
+
+/**
+ * GridStoreStream stream pipe event
+ *
+ * @event GridStoreStream#pipe
+ * @type {null}
+ */
+
+/**
+ * GridStoreStream stream unpipe event
+ *
+ * @event GridStoreStream#unpipe
+ * @type {null}
+ */
+
+/**
+ * GridStoreStream stream error event
+ *
+ * @event GridStoreStream#error
+ * @type {null}
+ */
+
+/**
+ * @ignore
+ */
+module.exports = GridStore;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/metadata.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/metadata.js
new file mode 100644
index 0000000..7dae562
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/metadata.js
@@ -0,0 +1,64 @@
+var f = require('util').format;
+
+var Define = function(name, object, stream) {
+ this.name = name;
+ this.object = object;
+ this.stream = typeof stream == 'boolean' ? stream : false;
+ this.instrumentations = {};
+}
+
+Define.prototype.classMethod = function(name, options) {
+ var keys = Object.keys(options).sort();
+ var key = generateKey(keys, options);
+
+ // Add a list of instrumentations
+ if(this.instrumentations[key] == null) {
+ this.instrumentations[key] = {
+ methods: [], options: options
+ }
+ }
+
+ // Push to list of method for this instrumentation
+ this.instrumentations[key].methods.push(name);
+}
+
+var generateKey = function(keys, options) {
+ var parts = [];
+ for(var i = 0; i < keys.length; i++) {
+ parts.push(f('%s=%s', keys[i], options[keys[i]]));
+ }
+
+ return parts.join();
+}
+
+Define.prototype.staticMethod = function(name, options) {
+ options.static = true;
+ var keys = Object.keys(options).sort();
+ var key = generateKey(keys, options);
+
+ // Add a list of instrumentations
+ if(this.instrumentations[key] == null) {
+ this.instrumentations[key] = {
+ methods: [], options: options
+ }
+ }
+
+ // Push to list of method for this instrumentation
+ this.instrumentations[key].methods.push(name);
+}
+
+Define.prototype.generate = function(keys, options) {
+ // Generate the return object
+ var object = {
+ name: this.name, obj: this.object, stream: this.stream,
+ instrumentations: []
+ }
+
+ for(var name in this.instrumentations) {
+ object.instrumentations.push(this.instrumentations[name]);
+ }
+
+ return object;
+}
+
+module.exports = Define; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/mongo_client.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/mongo_client.js
new file mode 100644
index 0000000..deb1940
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/mongo_client.js
@@ -0,0 +1,328 @@
+"use strict";
+
+var parse = require('./url_parser')
+ , Server = require('./server')
+ , Mongos = require('./mongos')
+ , ReplSet = require('./replset')
+ , Define = require('./metadata')
+ , ReadPreference = require('./read_preference')
+ , Logger = require('mongodb-core').Logger
+ , MongoError = require('mongodb-core').MongoError
+ , Db = require('./db')
+ , dns = require('dns')
+ , f = require('util').format
+ , shallowClone = require('./utils').shallowClone;
+
+/**
+ * @fileOverview The **MongoClient** class is a class that allows for making Connections to MongoDB.
+ *
+ * @example
+ * var MongoClient = require('mongodb').MongoClient,
+ * test = require('assert');
+ * // Connection url
+ * var url = 'mongodb://localhost:27017/test';
+ * // Connect using MongoClient
+ * MongoClient.connect(url, function(err, db) {
+ * // Get an additional db
+ * db.close();
+ * });
+ */
+
+/**
+ * Creates a new MongoClient instance
+ * @class
+ * @return {MongoClient} a MongoClient instance.
+ */
+function MongoClient() {
+ /**
+ * The callback format for results
+ * @callback MongoClient~connectCallback
+ * @param {MongoError} error An error instance representing the error during the execution.
+ * @param {Db} db The connected database.
+ */
+
+ /**
+ * Connect to MongoDB using a url as documented at
+ *
+ * docs.mongodb.org/manual/reference/connection-string/
+ *
+ * Note that for replicasets the replicaSet query parameter is required in the 2.0 driver
+ *
+ * @method
+ * @param {string} url The connection URI string
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.uri_decode_auth=false] Uri decode the user name and password for authentication
+ * @param {object} [options.db=null] A hash of options to set on the db object, see **Db constructor**
+ * @param {object} [options.server=null] A hash of options to set on the server objects, see **Server** constructor**
+ * @param {object} [options.replSet=null] A hash of options to set on the replSet object, see **ReplSet** constructor**
+ * @param {object} [options.mongos=null] A hash of options to set on the mongos object, see **Mongos** constructor**
+ * @param {object} [options.promiseLibrary=null] A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible
+ * @param {MongoClient~connectCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+ this.connect = MongoClient.connect;
+}
+
+var define = MongoClient.define = new Define('MongoClient', MongoClient, false);
+
+/**
+ * Connect to MongoDB using a url as documented at
+ *
+ * docs.mongodb.org/manual/reference/connection-string/
+ *
+ * Note that for replicasets the replicaSet query parameter is required in the 2.0 driver
+ *
+ * @method
+ * @static
+ * @param {string} url The connection URI string
+ * @param {object} [options=null] Optional settings.
+ * @param {boolean} [options.uri_decode_auth=false] Uri decode the user name and password for authentication
+ * @param {object} [options.db=null] A hash of options to set on the db object, see **Db constructor**
+ * @param {object} [options.server=null] A hash of options to set on the server objects, see **Server** constructor**
+ * @param {object} [options.replSet=null] A hash of options to set on the replSet object, see **ReplSet** constructor**
+ * @param {object} [options.mongos=null] A hash of options to set on the mongos object, see **Mongos** constructor**
+ * @param {object} [options.promiseLibrary=null] A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible
+ * @param {MongoClient~connectCallback} [callback] The command result callback
+ * @return {Promise} returns Promise if no callback passed
+ */
+MongoClient.connect = function(url, options, callback) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ callback = typeof args[args.length - 1] == 'function' ? args.pop() : null;
+ options = args.length ? args.shift() : null;
+ options = options || {};
+
+ // Get the promiseLibrary
+ var promiseLibrary = options.promiseLibrary;
+
+ // No promise library selected fall back
+ if(!promiseLibrary) {
+ promiseLibrary = typeof global.Promise == 'function' ?
+ global.Promise : require('es6-promise').Promise;
+ }
+
+ // Return a promise
+ if(typeof callback != 'function') {
+ return new promiseLibrary(function(resolve, reject) {
+ connect(url, options, function(err, db) {
+ if(err) return reject(err);
+ resolve(db);
+ });
+ });
+ }
+
+ // Fallback to callback based connect
+ connect(url, options, callback);
+}
+
+define.staticMethod('connect', {callback: true, promise:true});
+
+var mergeOptions = function(target, source, flatten) {
+ for(var name in source) {
+ if(source[name] && typeof source[name] == 'object' && flatten) {
+ target = mergeOptions(target, source[name], flatten);
+ } else {
+ target[name] = source[name];
+ }
+ }
+
+ return target;
+}
+
+var createUnifiedOptions = function(finalOptions, options) {
+ var childOptions = ['mongos', 'server', 'db'
+ , 'replset', 'db_options', 'server_options', 'rs_options', 'mongos_options'];
+ var noMerge = [];
+
+ for(var name in options) {
+ if(noMerge.indexOf(name.toLowerCase()) != -1) {
+ finalOptions[name] = options[name];
+ } else if(childOptions.indexOf(name.toLowerCase()) != -1) {
+ finalOptions = mergeOptions(finalOptions, options[name], false);
+ } else {
+ if(options[name] && typeof options[name] == 'object' && !Buffer.isBuffer(options[name]) && !Array.isArray(options[name])) {
+ finalOptions = mergeOptions(finalOptions, options[name], true);
+ } else {
+ finalOptions[name] = options[name];
+ }
+ }
+ }
+
+ return finalOptions;
+}
+
+function translateOptions(options) {
+ // If we have a readPreference passed in by the db options
+ if(typeof options.readPreference == 'string' || typeof options.read_preference == 'string') {
+ options.readPreference = new ReadPreference(options.readPreference || options.read_preference);
+ }
+
+ // Do we have readPreference tags, add them
+ if(options.readPreference && (options.readPreferenceTags || options.read_preference_tags)) {
+ options.readPreference.tags = options.readPreferenceTags || options.read_preference_tags;
+ }
+
+ // Do we have maxStalenessMS
+ if(options.maxStalenessMS) {
+ options.readPreference.maxStalenessMS = options.maxStalenessMS;
+ }
+
+ // Set the socket and connection timeouts
+ if(!options.socketTimeoutMS == null) options.socketTimeoutMS = 30000;
+ if(!options.connectTimeoutMS == null) options.connectTimeoutMS = 30000;
+
+ // Create server instances
+ return options.servers.map(function(serverObj) {
+ return serverObj.domain_socket ?
+ new Server(serverObj.domain_socket, 27017, options)
+ : new Server(serverObj.host, serverObj.port, options);
+ });
+}
+
+function createReplicaset(options, callback) {
+ // Set default options
+ var servers = translateOptions(options);
+ // Create Db instance
+ new Db(options.dbName, new ReplSet(servers, options), options).open(callback);
+}
+
+function createMongos(options, callback) {
+ // Set default options
+ var servers = translateOptions(options);
+ // Create Db instance
+ new Db(options.dbName, new Mongos(servers, options), options).open(callback);
+}
+
+function createServer(options, callback) {
+ // Set default options
+ var servers = translateOptions(options);
+ // Create Db instance
+ new Db(options.dbName, servers[0], options).open(function(err, db) {
+ if(err) return callback(err);
+ // Check if we are really speaking to a mongos
+ var ismaster = db.serverConfig.lastIsMaster();
+
+ // Do we actually have a mongos
+ if(ismaster && ismaster.msg == 'isdbgrid') {
+ // Destroy the current connection
+ db.close();
+ // Create mongos connection instead
+ return createMongos(options, callback);
+ }
+
+ // Otherwise callback
+ callback(err, db);
+ });
+}
+
+function connectHandler(options, callback) {
+ return function (err, db) {
+ if(err) {
+ return process.nextTick(function() {
+ try {
+ callback(err, null);
+ } catch (err) {
+ if(db) db.close();
+ throw err
+ }
+ });
+ }
+
+ // No authentication just reconnect
+ if(!options.auth) {
+ return process.nextTick(function() {
+ try {
+ callback(err, db);
+ } catch (err) {
+ if(db) db.close();
+ throw err
+ }
+ })
+ }
+
+ // What db to authenticate against
+ var authentication_db = db;
+ if(options.authSource) {
+ authentication_db = db.db(options.authSource);
+ }
+
+ // Authenticate
+ authentication_db.authenticate(options.user, options.password, options, function(err, success){
+ if(success){
+ process.nextTick(function() {
+ try {
+ callback(null, db);
+ } catch (err) {
+ if(db) db.close();
+ throw err
+ }
+ });
+ } else {
+ if(db) db.close();
+ process.nextTick(function() {
+ try {
+ callback(err ? err : new Error('Could not authenticate user ' + options.auth[0]), null);
+ } catch (err) {
+ if(db) db.close();
+ throw err
+ }
+ });
+ }
+ });
+ }
+}
+
+/*
+ * Connect using MongoClient
+ */
+var connect = function(url, options, callback) {
+ options = options || {};
+ options = shallowClone(options);
+
+ // If callback is null throw an exception
+ if(callback == null) {
+ throw new Error("no callback function provided");
+ }
+
+ // Get a logger for MongoClient
+ var logger = Logger('MongoClient', options);
+
+ // Parse the string
+ var object = parse(url, options);
+ var _finalOptions = createUnifiedOptions({}, object);
+ _finalOptions = mergeOptions(_finalOptions, object, false);
+ _finalOptions = createUnifiedOptions(_finalOptions, options);
+
+ // Check if we have connection and socket timeout set
+ if(!_finalOptions.socketTimeoutMS == null) _finalOptions.socketTimeoutMS = 120000;
+ if(!_finalOptions.connectTimeoutMS == null) _finalOptions.connectTimeoutMS = 120000;
+
+ // Failure modes
+ if(object.servers.length == 0) {
+ throw new Error("connection string must contain at least one seed host");
+ }
+
+ function connectCallback(err, db) {
+ if(err && err.message == 'no mongos proxies found in seed list') {
+ if(logger.isWarn()) {
+ logger.warn(f('seed list contains no mongos proxies, replicaset connections requires the parameter replicaSet to be supplied in the URI or options object, mongodb://server:port/db?replicaSet=name'));
+ }
+
+ // Return a more specific error message for MongoClient.connect
+ return callback(new MongoError('seed list contains no mongos proxies, replicaset connections requires the parameter replicaSet to be supplied in the URI or options object, mongodb://server:port/db?replicaSet=name'));
+ }
+
+ // Return the error and db instance
+ callback(err, db);
+ }
+
+ // Do we have a replicaset then skip discovery and go straight to connectivity
+ if(_finalOptions.replicaSet || _finalOptions.rs_name) {
+ return createReplicaset(_finalOptions, connectHandler(_finalOptions, connectCallback));
+ } else if(object.servers.length > 1) {
+ return createMongos(_finalOptions, connectHandler(_finalOptions, connectCallback));
+ } else {
+ return createServer(_finalOptions, connectHandler(_finalOptions, connectCallback));
+ }
+}
+
+module.exports = MongoClient
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/mongos.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/mongos.js
new file mode 100644
index 0000000..a630b6a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/mongos.js
@@ -0,0 +1,509 @@
+"use strict";
+
+var EventEmitter = require('events').EventEmitter
+ , inherits = require('util').inherits
+ , f = require('util').format
+ , ServerCapabilities = require('./topology_base').ServerCapabilities
+ , MongoCR = require('mongodb-core').MongoCR
+ , MongoError = require('mongodb-core').MongoError
+ , CMongos = require('mongodb-core').Mongos
+ , Cursor = require('./cursor')
+ , AggregationCursor = require('./aggregation_cursor')
+ , CommandCursor = require('./command_cursor')
+ , Define = require('./metadata')
+ , Server = require('./server')
+ , Store = require('./topology_base').Store
+ , shallowClone = require('./utils').shallowClone
+ , MAX_JS_INT = require('./utils').MAX_JS_INT
+ , translateOptions = require('./utils').translateOptions
+ , filterOptions = require('./utils').filterOptions
+ , mergeOptions = require('./utils').mergeOptions
+ , os = require('os');
+
+// Get package.json variable
+var driverVersion = require(__dirname + '/../package.json').version;
+var nodejsversion = f('Node.js %s, %s', process.version, os.endianness());
+var type = os.type();
+var name = process.platform;
+var architecture = process.arch;
+var release = os.release();
+
+/**
+ * @fileOverview The **Mongos** class is a class that represents a Mongos Proxy topology and is
+ * used to construct connections.
+ *
+ * **Mongos Should not be used, use MongoClient.connect**
+ * @example
+ * var Db = require('mongodb').Db,
+ * Mongos = require('mongodb').Mongos,
+ * Server = require('mongodb').Server,
+ * test = require('assert');
+ * // Connect using Mongos
+ * var server = new Server('localhost', 27017);
+ * var db = new Db('test', new Mongos([server]));
+ * db.open(function(err, db) {
+ * // Get an additional db
+ * db.close();
+ * });
+ */
+
+ // Allowed parameters
+ var legalOptionNames = ['ha', 'haInterval', 'acceptableLatencyMS'
+ , 'poolSize', 'ssl', 'checkServerIdentity', 'sslValidate'
+ , 'sslCA', 'sslCert', 'sslKey', 'sslPass', 'socketOptions', 'bufferMaxEntries'
+ , 'store', 'auto_reconnect', 'autoReconnect', 'emitError'
+ , 'keepAlive', 'noDelay', 'connectTimeoutMS', 'socketTimeoutMS'
+ , 'loggerLevel', 'logger', 'reconnectTries', 'appname', 'domainsEnabled'
+ , 'servername', 'promoteLongs', 'promoteValues', 'promoteBuffers'];
+
+/**
+ * Creates a new Mongos instance
+ * @class
+ * @deprecated
+ * @param {Server[]} servers A seedlist of servers participating in the replicaset.
+ * @param {object} [options=null] Optional settings.
+ * @param {booelan} [options.ha=true] Turn on high availability monitoring.
+ * @param {number} [options.haInterval=5000] Time between each replicaset status check.
+ * @param {number} [options.poolSize=5] Number of connections in the connection pool for each server instance, set to 5 as default for legacy reasons.
+ * @param {number} [options.acceptableLatencyMS=15] Cutoff latency point in MS for MongoS proxy selection
+ * @param {boolean} [options.ssl=false] Use ssl connection (needs to have a mongod server with ssl support)
+ * @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
+ * @param {object} [options.sslValidate=true] Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {array} [options.sslCA=null] Array of valid certificates either as Buffers or Strings (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {(Buffer|string)} [options.sslCert=null] String or buffer containing the certificate we wish to present (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {(Buffer|string)} [options.sslKey=null] String or buffer containing the certificate private key we wish to present (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {(Buffer|string)} [options.sslPass=null] String or buffer containing the certificate password (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {string} [options.servername=null] String containing the server name requested via TLS SNI.
+ * @param {object} [options.socketOptions=null] Socket options
+ * @param {boolean} [options.socketOptions.noDelay=true] TCP Socket NoDelay option.
+ * @param {number} [options.socketOptions.keepAlive=0] TCP KeepAlive on the socket with a X ms delay before start.
+ * @param {number} [options.socketOptions.connectTimeoutMS=0] TCP Connection timeout setting
+ * @param {number} [options.socketOptions.socketTimeoutMS=0] TCP Socket timeout setting
+ * @param {boolean} [options.domainsEnabled=false] Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit.
+ * @fires Mongos#connect
+ * @fires Mongos#ha
+ * @fires Mongos#joined
+ * @fires Mongos#left
+ * @fires Mongos#fullsetup
+ * @fires Mongos#open
+ * @fires Mongos#close
+ * @fires Mongos#error
+ * @fires Mongos#timeout
+ * @fires Mongos#parseError
+ * @return {Mongos} a Mongos instance.
+ */
+var Mongos = function(servers, options) {
+ if(!(this instanceof Mongos)) return new Mongos(servers, options);
+ options = options || {};
+ var self = this;
+
+ // Filter the options
+ options = filterOptions(options, legalOptionNames);
+
+ // Ensure all the instances are Server
+ for(var i = 0; i < servers.length; i++) {
+ if(!(servers[i] instanceof Server)) {
+ throw MongoError.create({message: "all seed list instances must be of the Server type", driver:true});
+ }
+ }
+
+ // Stored options
+ var storeOptions = {
+ force: false
+ , bufferMaxEntries: typeof options.bufferMaxEntries == 'number' ? options.bufferMaxEntries : MAX_JS_INT
+ }
+
+ // Shared global store
+ var store = options.store || new Store(self, storeOptions);
+
+ // Set up event emitter
+ EventEmitter.call(this);
+
+ // Build seed list
+ var seedlist = servers.map(function(x) {
+ return {host: x.host, port: x.port}
+ });
+
+ // Get the reconnect option
+ var reconnect = typeof options.auto_reconnect == 'boolean' ? options.auto_reconnect : true;
+ reconnect = typeof options.autoReconnect == 'boolean' ? options.autoReconnect : reconnect;
+
+ // Clone options
+ var clonedOptions = mergeOptions({}, {
+ disconnectHandler: store,
+ cursorFactory: Cursor,
+ reconnect: reconnect,
+ emitError: typeof options.emitError == 'boolean' ? options.emitError : true,
+ size: typeof options.poolSize == 'number' ? options.poolSize : 5
+ });
+
+ // Translate any SSL options and other connectivity options
+ clonedOptions = translateOptions(clonedOptions, options);
+
+ // Socket options
+ var socketOptions = options.socketOptions && Object.keys(options.socketOptions).length > 0
+ ? options.socketOptions : options;
+
+ // Translate all the options to the mongodb-core ones
+ clonedOptions = translateOptions(clonedOptions, socketOptions);
+ if(typeof clonedOptions.keepAlive == 'number') {
+ clonedOptions.keepAliveInitialDelay = clonedOptions.keepAlive;
+ clonedOptions.keepAlive = clonedOptions.keepAlive > 0;
+ }
+
+ // Build default client information
+ this.clientInfo = {
+ driver: {
+ name: "nodejs",
+ version: driverVersion
+ },
+ os: {
+ type: type,
+ name: name,
+ architecture: architecture,
+ version: release
+ },
+ platform: nodejsversion
+ }
+
+ // Build default client information
+ clonedOptions.clientInfo = this.clientInfo;
+ // Do we have an application specific string
+ if(options.appname) {
+ clonedOptions.clientInfo.application = { name: options.appname };
+ }
+
+ // Create the Mongos
+ var mongos = new CMongos(seedlist, clonedOptions)
+ // Server capabilities
+ var sCapabilities = null;
+
+ // Internal state
+ this.s = {
+ // Create the Mongos
+ mongos: mongos
+ // Server capabilities
+ , sCapabilities: sCapabilities
+ // Debug turned on
+ , debug: clonedOptions.debug
+ // Store option defaults
+ , storeOptions: storeOptions
+ // Cloned options
+ , clonedOptions: clonedOptions
+ // Actual store of callbacks
+ , store: store
+ // Options
+ , options: options
+ }
+}
+
+var define = Mongos.define = new Define('Mongos', Mongos, false);
+
+/**
+ * @ignore
+ */
+inherits(Mongos, EventEmitter);
+
+// Last ismaster
+Object.defineProperty(Mongos.prototype, 'isMasterDoc', {
+ enumerable:true, get: function() { return this.s.mongos.lastIsMaster(); }
+});
+
+// BSON property
+Object.defineProperty(Mongos.prototype, 'bson', {
+ enumerable: true, get: function() {
+ return this.s.mongos.s.bson;
+ }
+});
+
+Object.defineProperty(Mongos.prototype, 'haInterval', {
+ enumerable:true, get: function() { return this.s.mongos.s.haInterval; }
+});
+
+// Connect
+Mongos.prototype.connect = function(db, _options, callback) {
+ var self = this;
+ if('function' === typeof _options) callback = _options, _options = {};
+ if(_options == null) _options = {};
+ if(!('function' === typeof callback)) callback = null;
+ self.s.options = _options;
+
+ // Update bufferMaxEntries
+ self.s.storeOptions.bufferMaxEntries = db.bufferMaxEntries;
+
+ // Error handler
+ var connectErrorHandler = function(event) {
+ return function(err) {
+ // Remove all event handlers
+ var events = ['timeout', 'error', 'close'];
+ events.forEach(function(e) {
+ self.removeListener(e, connectErrorHandler);
+ });
+
+ self.s.mongos.removeListener('connect', connectErrorHandler);
+
+ // Try to callback
+ try {
+ callback(err);
+ } catch(err) {
+ process.nextTick(function() { throw err; })
+ }
+ }
+ }
+
+ // Actual handler
+ var errorHandler = function(event) {
+ return function(err) {
+ if(event != 'error') {
+ self.emit(event, err);
+ }
+ }
+ }
+
+ // Error handler
+ var reconnectHandler = function(err) {
+ self.emit('reconnect');
+ self.s.store.execute();
+ }
+
+ // relay the event
+ var relay = function(event) {
+ return function(t, server) {
+ self.emit(event, t, server);
+ }
+ }
+
+ // Connect handler
+ var connectHandler = function() {
+ // Clear out all the current handlers left over
+ ["timeout", "error", "close", 'serverOpening', 'serverDescriptionChanged', 'serverHeartbeatStarted',
+ 'serverHeartbeatSucceeded', 'serverHeartbeatFailed', 'serverClosed', 'topologyOpening',
+ 'topologyClosed', 'topologyDescriptionChanged'].forEach(function(e) {
+ self.s.mongos.removeAllListeners(e);
+ });
+
+ // Set up listeners
+ self.s.mongos.once('timeout', errorHandler('timeout'));
+ self.s.mongos.once('error', errorHandler('error'));
+ self.s.mongos.once('close', errorHandler('close'));
+
+ // Set up SDAM listeners
+ self.s.mongos.on('serverDescriptionChanged', relay('serverDescriptionChanged'));
+ self.s.mongos.on('serverHeartbeatStarted', relay('serverHeartbeatStarted'));
+ self.s.mongos.on('serverHeartbeatSucceeded', relay('serverHeartbeatSucceeded'));
+ self.s.mongos.on('serverHeartbeatFailed', relay('serverHeartbeatFailed'));
+ self.s.mongos.on('serverOpening', relay('serverOpening'));
+ self.s.mongos.on('serverClosed', relay('serverClosed'));
+ self.s.mongos.on('topologyOpening', relay('topologyOpening'));
+ self.s.mongos.on('topologyClosed', relay('topologyClosed'));
+ self.s.mongos.on('topologyDescriptionChanged', relay('topologyDescriptionChanged'));
+
+ // Set up serverConfig listeners
+ self.s.mongos.on('fullsetup', relay('fullsetup'));
+
+ // Emit open event
+ self.emit('open', null, self);
+
+ // Return correctly
+ try {
+ callback(null, self);
+ } catch(err) {
+ process.nextTick(function() { throw err; })
+ }
+ }
+
+ // Set up listeners
+ self.s.mongos.once('timeout', connectErrorHandler('timeout'));
+ self.s.mongos.once('error', connectErrorHandler('error'));
+ self.s.mongos.once('close', connectErrorHandler('close'));
+ self.s.mongos.once('connect', connectHandler);
+ // Join and leave events
+ self.s.mongos.on('joined', relay('joined'));
+ self.s.mongos.on('left', relay('left'));
+
+ // Reconnect server
+ self.s.mongos.on('reconnect', reconnectHandler);
+
+ // Start connection
+ self.s.mongos.connect(_options);
+}
+
+// Server capabilities
+Mongos.prototype.capabilities = function() {
+ if(this.s.sCapabilities) return this.s.sCapabilities;
+ if(this.s.mongos.lastIsMaster() == null) return null;
+ this.s.sCapabilities = new ServerCapabilities(this.s.mongos.lastIsMaster());
+ return this.s.sCapabilities;
+}
+
+define.classMethod('capabilities', {callback: false, promise:false, returns: [ServerCapabilities]});
+
+// Command
+Mongos.prototype.command = function(ns, cmd, options, callback) {
+ this.s.mongos.command(ns, cmd, options, callback);
+}
+
+define.classMethod('command', {callback: true, promise:false});
+
+// Insert
+Mongos.prototype.insert = function(ns, ops, options, callback) {
+ this.s.mongos.insert(ns, ops, options, function(e, m) {
+ callback(e, m)
+ });
+}
+
+define.classMethod('insert', {callback: true, promise:false});
+
+// Update
+Mongos.prototype.update = function(ns, ops, options, callback) {
+ this.s.mongos.update(ns, ops, options, callback);
+}
+
+define.classMethod('update', {callback: true, promise:false});
+
+// Remove
+Mongos.prototype.remove = function(ns, ops, options, callback) {
+ this.s.mongos.remove(ns, ops, options, callback);
+}
+
+define.classMethod('remove', {callback: true, promise:false});
+
+// Destroyed
+Mongos.prototype.isDestroyed = function() {
+ return this.s.mongos.isDestroyed();
+}
+
+// IsConnected
+Mongos.prototype.isConnected = function() {
+ return this.s.mongos.isConnected();
+}
+
+define.classMethod('isConnected', {callback: false, promise:false, returns: [Boolean]});
+
+// Insert
+Mongos.prototype.cursor = function(ns, cmd, options) {
+ options.disconnectHandler = this.s.store;
+ return this.s.mongos.cursor(ns, cmd, options);
+}
+
+define.classMethod('cursor', {callback: false, promise:false, returns: [Cursor, AggregationCursor, CommandCursor]});
+
+Mongos.prototype.lastIsMaster = function() {
+ return this.s.mongos.lastIsMaster();
+}
+
+Mongos.prototype.close = function(forceClosed) {
+ this.s.mongos.destroy();
+ // We need to wash out all stored processes
+ if(forceClosed == true) {
+ this.s.storeOptions.force = forceClosed;
+ this.s.store.flush();
+ }
+}
+
+define.classMethod('close', {callback: false, promise:false});
+
+Mongos.prototype.auth = function() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ this.s.mongos.auth.apply(this.s.mongos, args);
+}
+
+define.classMethod('auth', {callback: true, promise:false});
+
+Mongos.prototype.logout = function() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ this.s.mongos.logout.apply(this.s.mongos, args);
+}
+
+define.classMethod('logout', {callback: true, promise:false});
+
+/**
+ * All raw connections
+ * @method
+ * @return {array}
+ */
+Mongos.prototype.connections = function() {
+ return this.s.mongos.connections();
+}
+
+define.classMethod('connections', {callback: false, promise:false, returns:[Array]});
+
+/**
+ * A mongos connect event, used to verify that the connection is up and running
+ *
+ * @event Mongos#connect
+ * @type {Mongos}
+ */
+
+/**
+ * The mongos high availability event
+ *
+ * @event Mongos#ha
+ * @type {function}
+ * @param {string} type The stage in the high availability event (start|end)
+ * @param {boolean} data.norepeat This is a repeating high availability process or a single execution only
+ * @param {number} data.id The id for this high availability request
+ * @param {object} data.state An object containing the information about the current replicaset
+ */
+
+/**
+ * A server member left the mongos set
+ *
+ * @event Mongos#left
+ * @type {function}
+ * @param {string} type The type of member that left (primary|secondary|arbiter)
+ * @param {Server} server The server object that left
+ */
+
+/**
+ * A server member joined the mongos set
+ *
+ * @event Mongos#joined
+ * @type {function}
+ * @param {string} type The type of member that joined (primary|secondary|arbiter)
+ * @param {Server} server The server object that joined
+ */
+
+/**
+ * Mongos fullsetup event, emitted when all proxies in the topology have been connected to.
+ *
+ * @event Mongos#fullsetup
+ * @type {Mongos}
+ */
+
+/**
+ * Mongos open event, emitted when mongos can start processing commands.
+ *
+ * @event Mongos#open
+ * @type {Mongos}
+ */
+
+/**
+ * Mongos close event
+ *
+ * @event Mongos#close
+ * @type {object}
+ */
+
+/**
+ * Mongos error event, emitted if there is an error listener.
+ *
+ * @event Mongos#error
+ * @type {MongoError}
+ */
+
+/**
+ * Mongos timeout event
+ *
+ * @event Mongos#timeout
+ * @type {object}
+ */
+
+/**
+ * Mongos parseError event
+ *
+ * @event Mongos#parseError
+ * @type {object}
+ */
+
+module.exports = Mongos;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/read_preference.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/read_preference.js
new file mode 100644
index 0000000..1763b2c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/read_preference.js
@@ -0,0 +1,131 @@
+"use strict";
+
+/**
+ * @fileOverview The **ReadPreference** class is a class that represents a MongoDB ReadPreference and is
+ * used to construct connections.
+ *
+ * @example
+ * var Db = require('mongodb').Db,
+ * ReplSet = require('mongodb').ReplSet,
+ * Server = require('mongodb').Server,
+ * ReadPreference = require('mongodb').ReadPreference,
+ * test = require('assert');
+ * // Connect using ReplSet
+ * var server = new Server('localhost', 27017);
+ * var db = new Db('test', new ReplSet([server]));
+ * db.open(function(err, db) {
+ * test.equal(null, err);
+ * // Perform a read
+ * var cursor = db.collection('t').find({});
+ * cursor.setReadPreference(ReadPreference.PRIMARY);
+ * cursor.toArray(function(err, docs) {
+ * test.equal(null, err);
+ * db.close();
+ * });
+ * });
+ */
+
+/**
+ * Creates a new ReadPreference instance
+ *
+ * Read Preferences
+ * - **ReadPreference.PRIMARY**, Read from primary only. All operations produce an error (throw an exception where applicable) if primary is unavailable. Cannot be combined with tags (This is the default.).
+ * - **ReadPreference.PRIMARY_PREFERRED**, Read from primary if available, otherwise a secondary.
+ * - **ReadPreference.SECONDARY**, Read from secondary if available, otherwise error.
+ * - **ReadPreference.SECONDARY_PREFERRED**, Read from a secondary if available, otherwise read from the primary.
+ * - **ReadPreference.NEAREST**, All modes read from among the nearest candidates, but unlike other modes, NEAREST will include both the primary and all secondaries in the random selection.
+ *
+ * @class
+ * @param {string} mode The ReadPreference mode as listed above.
+ * @param {array|object} tags An object representing read preference tags.
+ * @param {object} [options] Additional read preference options
+ * @param {number} [options.maxStalenessMS] Max Secondary Read Stalleness in Miliseconds
+ * @return {ReadPreference} a ReadPreference instance.
+ */
+var ReadPreference = function(mode, tags, options) {
+ if(!(this instanceof ReadPreference)) {
+ return new ReadPreference(mode, tags, options);
+ }
+
+ this._type = 'ReadPreference';
+ this.mode = mode;
+ this.tags = tags;
+ this.options = options;
+
+ // If no tags were passed in
+ if(tags && typeof tags == 'object' && !Array.isArray(tags)) {
+ if(tags.maxStalenessMS) {
+ this.options = tags;
+ this.tags = null;
+ }
+ }
+
+ // Add the maxStalenessMS value to the read Preference
+ if(this.options && this.options.maxStalenessMS) {
+ this.maxStalenessMS = this.options.maxStalenessMS;
+ }
+}
+
+/**
+ * Validate if a mode is legal
+ *
+ * @method
+ * @param {string} mode The string representing the read preference mode.
+ * @return {boolean}
+ */
+ReadPreference.isValid = function(_mode) {
+ return (_mode == ReadPreference.PRIMARY || _mode == ReadPreference.PRIMARY_PREFERRED
+ || _mode == ReadPreference.SECONDARY || _mode == ReadPreference.SECONDARY_PREFERRED
+ || _mode == ReadPreference.NEAREST
+ || _mode == true || _mode == false || _mode == null);
+}
+
+/**
+ * Validate if a mode is legal
+ *
+ * @method
+ * @param {string} mode The string representing the read preference mode.
+ * @return {boolean}
+ */
+ReadPreference.prototype.isValid = function(mode) {
+ var _mode = typeof mode == 'string' ? mode : this.mode;
+ return ReadPreference.isValid(_mode);
+}
+
+/**
+ * @ignore
+ */
+ReadPreference.prototype.toObject = function() {
+ var object = {mode:this.mode};
+
+ if(this.tags != null) {
+ object['tags'] = this.tags;
+ }
+
+ if(this.maxStalenessMS) {
+ object['maxStalenessMS'] = this.maxStalenessMS;
+ }
+
+ return object;
+}
+
+/**
+ * @ignore
+ */
+ReadPreference.prototype.toJSON = function() {
+ return this.toObject();
+}
+
+/**
+ * @ignore
+ */
+ReadPreference.PRIMARY = 'primary';
+ReadPreference.PRIMARY_PREFERRED = 'primaryPreferred';
+ReadPreference.SECONDARY = 'secondary';
+ReadPreference.SECONDARY_PREFERRED = 'secondaryPreferred';
+ReadPreference.NEAREST = 'nearest'
+
+/**
+ * @ignore
+ */
+module.exports = ReadPreference;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/replset.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/replset.js
new file mode 100644
index 0000000..97791bf
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/replset.js
@@ -0,0 +1,559 @@
+"use strict";
+
+var EventEmitter = require('events').EventEmitter
+ , inherits = require('util').inherits
+ , f = require('util').format
+ , Server = require('./server')
+ , Mongos = require('./mongos')
+ , Cursor = require('./cursor')
+ , AggregationCursor = require('./aggregation_cursor')
+ , CommandCursor = require('./command_cursor')
+ , ReadPreference = require('./read_preference')
+ , MongoCR = require('mongodb-core').MongoCR
+ , MongoError = require('mongodb-core').MongoError
+ , ServerCapabilities = require('./topology_base').ServerCapabilities
+ , Store = require('./topology_base').Store
+ , Define = require('./metadata')
+ , CServer = require('mongodb-core').Server
+ , CReplSet = require('mongodb-core').ReplSet
+ , CoreReadPreference = require('mongodb-core').ReadPreference
+ , shallowClone = require('./utils').shallowClone
+ , MAX_JS_INT = require('./utils').MAX_JS_INT
+ , translateOptions = require('./utils').translateOptions
+ , filterOptions = require('./utils').filterOptions
+ , mergeOptions = require('./utils').mergeOptions
+ , os = require('os');
+/**
+ * @fileOverview The **ReplSet** class is a class that represents a Replicaset topology and is
+ * used to construct connections.
+ *
+ * **ReplSet Should not be used, use MongoClient.connect**
+ * @example
+ * var Db = require('mongodb').Db,
+ * ReplSet = require('mongodb').ReplSet,
+ * Server = require('mongodb').Server,
+ * test = require('assert');
+ * // Connect using ReplSet
+ * var server = new Server('localhost', 27017);
+ * var db = new Db('test', new ReplSet([server]));
+ * db.open(function(err, db) {
+ * // Get an additional db
+ * db.close();
+ * });
+ */
+
+// Allowed parameters
+var legalOptionNames = ['ha', 'haInterval', 'replicaSet', 'rs_name', 'secondaryAcceptableLatencyMS'
+ , 'connectWithNoPrimary', 'poolSize', 'ssl', 'checkServerIdentity', 'sslValidate'
+ , 'sslCA', 'sslCert', 'sslKey', 'sslPass', 'socketOptions', 'bufferMaxEntries'
+ , 'store', 'auto_reconnect', 'autoReconnect', 'emitError'
+ , 'keepAlive', 'noDelay', 'connectTimeoutMS', 'socketTimeoutMS', 'strategy', 'debug'
+ , 'loggerLevel', 'logger', 'reconnectTries', 'appname', 'domainsEnabled'
+ , 'servername', 'promoteLongs', 'promoteValues', 'promoteBuffers'];
+
+// Get package.json variable
+var driverVersion = require(__dirname + '/../package.json').version;
+var nodejsversion = f('Node.js %s, %s', process.version, os.endianness());
+var type = os.type();
+var name = process.platform;
+var architecture = process.arch;
+var release = os.release();
+
+/**
+ * Creates a new ReplSet instance
+ * @class
+ * @deprecated
+ * @param {Server[]} servers A seedlist of servers participating in the replicaset.
+ * @param {object} [options=null] Optional settings.
+ * @param {booelan} [options.ha=true] Turn on high availability monitoring.
+ * @param {number} [options.haInterval=10000] Time between each replicaset status check.
+ * @param {string} [options.replicaSet] The name of the replicaset to connect to.
+ * @param {number} [options.secondaryAcceptableLatencyMS=15] Sets the range of servers to pick when using NEAREST (lowest ping ms + the latency fence, ex: range of 1 to (1 + 15) ms)
+ * @param {boolean} [options.connectWithNoPrimary=false] Sets if the driver should connect even if no primary is available
+ * @param {number} [options.poolSize=5] Number of connections in the connection pool for each server instance, set to 5 as default for legacy reasons.
+ * @param {boolean} [options.ssl=false] Use ssl connection (needs to have a mongod server with ssl support)
+ * @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
+ * @param {object} [options.sslValidate=true] Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {array} [options.sslCA=null] Array of valid certificates either as Buffers or Strings (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {(Buffer|string)} [options.sslCert=null] String or buffer containing the certificate we wish to present (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {(Buffer|string)} [options.sslKey=null] String or buffer containing the certificate private key we wish to present (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {(Buffer|string)} [options.sslPass=null] String or buffer containing the certificate password (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {string} [options.servername=null] String containing the server name requested via TLS SNI.
+ * @param {object} [options.socketOptions=null] Socket options
+ * @param {boolean} [options.socketOptions.noDelay=true] TCP Socket NoDelay option.
+ * @param {number} [options.socketOptions.keepAlive=0] TCP KeepAlive on the socket with a X ms delay before start.
+ * @param {number} [options.socketOptions.connectTimeoutMS=10000] TCP Connection timeout setting
+ * @param {number} [options.socketOptions.socketTimeoutMS=0] TCP Socket timeout setting
+ * @param {boolean} [options.domainsEnabled=false] Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit.
+ * @fires ReplSet#connect
+ * @fires ReplSet#ha
+ * @fires ReplSet#joined
+ * @fires ReplSet#left
+ * @fires ReplSet#fullsetup
+ * @fires ReplSet#open
+ * @fires ReplSet#close
+ * @fires ReplSet#error
+ * @fires ReplSet#timeout
+ * @fires ReplSet#parseError
+ * @return {ReplSet} a ReplSet instance.
+ */
+var ReplSet = function(servers, options) {
+ if(!(this instanceof ReplSet)) return new ReplSet(servers, options);
+ options = options || {};
+ var self = this;
+ // Set up event emitter
+ EventEmitter.call(this);
+
+ // Filter the options
+ options = filterOptions(options, legalOptionNames);
+
+ // Ensure all the instances are Server
+ for(var i = 0; i < servers.length; i++) {
+ if(!(servers[i] instanceof Server)) {
+ throw MongoError.create({message: "all seed list instances must be of the Server type", driver:true});
+ }
+ }
+
+ // Stored options
+ var storeOptions = {
+ force: false
+ , bufferMaxEntries: typeof options.bufferMaxEntries == 'number' ? options.bufferMaxEntries : MAX_JS_INT
+ }
+
+ // Shared global store
+ var store = options.store || new Store(self, storeOptions);
+
+ // Build seed list
+ var seedlist = servers.map(function(x) {
+ return {host: x.host, port: x.port}
+ });
+
+ // Clone options
+ var clonedOptions = mergeOptions({}, {
+ disconnectHandler: store,
+ cursorFactory: Cursor,
+ reconnect: false,
+ emitError: typeof options.emitError == 'boolean' ? options.emitError : true,
+ size: typeof options.poolSize == 'number' ? options.poolSize : 5
+ });
+
+ // Translate any SSL options and other connectivity options
+ clonedOptions = translateOptions(clonedOptions, options);
+
+ // Socket options
+ var socketOptions = options.socketOptions && Object.keys(options.socketOptions).length > 0
+ ? options.socketOptions : options;
+
+ // Translate all the options to the mongodb-core ones
+ clonedOptions = translateOptions(clonedOptions, socketOptions);
+ if(typeof clonedOptions.keepAlive == 'number') {
+ clonedOptions.keepAliveInitialDelay = clonedOptions.keepAlive;
+ clonedOptions.keepAlive = clonedOptions.keepAlive > 0;
+ }
+
+ // Client info
+ this.clientInfo = {
+ driver: {
+ name: "nodejs",
+ version: driverVersion
+ },
+ os: {
+ type: type,
+ name: name,
+ architecture: architecture,
+ version: release
+ },
+ platform: nodejsversion
+ }
+
+ // Build default client information
+ clonedOptions.clientInfo = this.clientInfo;
+ // Do we have an application specific string
+ if(options.appname) {
+ clonedOptions.clientInfo.application = { name: options.appname };
+ }
+
+ // Create the ReplSet
+ var replset = new CReplSet(seedlist, clonedOptions);
+ // Server capabilities
+ var sCapabilities = null;
+
+ // Listen to reconnect event
+ replset.on('reconnect', function() {
+ self.emit('reconnect');
+ store.execute();
+ });
+
+ // Internal state
+ this.s = {
+ // Replicaset
+ replset: replset
+ // Server capabilities
+ , sCapabilities: null
+ // Debug tag
+ , tag: options.tag
+ // Store options
+ , storeOptions: storeOptions
+ // Cloned options
+ , clonedOptions: clonedOptions
+ // Store
+ , store: store
+ // Options
+ , options: options
+ }
+
+ // Debug
+ if(clonedOptions.debug) {
+ // Last ismaster
+ Object.defineProperty(this, 'replset', {
+ enumerable:true, get: function() { return replset; }
+ });
+ }
+}
+
+/**
+ * @ignore
+ */
+inherits(ReplSet, EventEmitter);
+
+// Last ismaster
+Object.defineProperty(ReplSet.prototype, 'isMasterDoc', {
+ enumerable:true, get: function() { return this.s.replset.lastIsMaster(); }
+});
+
+// BSON property
+Object.defineProperty(ReplSet.prototype, 'bson', {
+ enumerable: true, get: function() {
+ return this.s.replset.s.bson;
+ }
+});
+
+Object.defineProperty(ReplSet.prototype, 'haInterval', {
+ enumerable:true, get: function() { return this.s.replset.s.haInterval; }
+});
+
+var define = ReplSet.define = new Define('ReplSet', ReplSet, false);
+
+// Ensure the right read Preference object
+var translateReadPreference = function(options) {
+ if(typeof options.readPreference == 'string') {
+ options.readPreference = new CoreReadPreference(options.readPreference);
+ } else if(options.readPreference instanceof ReadPreference) {
+ options.readPreference = new CoreReadPreference(options.readPreference.mode
+ , options.readPreference.tags, {maxStalenessMS: options.readPreference.maxStalenessMS});
+ }
+
+ return options;
+}
+
+// Connect method
+ReplSet.prototype.connect = function(db, _options, callback) {
+ var self = this;
+ if('function' === typeof _options) callback = _options, _options = {};
+ if(_options == null) _options = {};
+ if(!('function' === typeof callback)) callback = null;
+ self.s.options = _options;
+
+ // Update bufferMaxEntries
+ self.s.storeOptions.bufferMaxEntries = db.bufferMaxEntries;
+
+ // Actual handler
+ var errorHandler = function(event) {
+ return function(err) {
+ if(event != 'error') {
+ self.emit(event, err);
+ }
+ }
+ }
+
+ // Connect handler
+ var connectHandler = function() {
+ // Clear out all the current handlers left over
+ ["timeout", "error", "close", 'serverOpening', 'serverDescriptionChanged', 'serverHeartbeatStarted',
+ 'serverHeartbeatSucceeded', 'serverHeartbeatFailed', 'serverClosed', 'topologyOpening',
+ 'topologyClosed', 'topologyDescriptionChanged'].forEach(function(e) {
+ self.s.replset.removeAllListeners(e);
+ });
+
+ // Set up listeners
+ self.s.replset.once('timeout', errorHandler('timeout'));
+ self.s.replset.once('error', errorHandler('error'));
+ self.s.replset.once('close', errorHandler('close'));
+
+ // relay the event
+ var relay = function(event) {
+ return function(t, server) {
+ self.emit(event, t, server);
+ }
+ }
+
+ // Replset events relay
+ var replsetRelay = function(event) {
+ return function(t, server) {
+ self.emit(event, t, server.lastIsMaster(), server);
+ }
+ }
+
+ // Relay ha
+ var relayHa = function(t, state) {
+ self.emit('ha', t, state);
+
+ if(t == 'start') {
+ self.emit('ha_connect', t, state);
+ } else if(t == 'end') {
+ self.emit('ha_ismaster', t, state);
+ }
+ }
+
+ // Set up serverConfig listeners
+ self.s.replset.on('joined', replsetRelay('joined'));
+ self.s.replset.on('left', relay('left'));
+ self.s.replset.on('ping', relay('ping'));
+ self.s.replset.on('ha', relayHa);
+
+ // Set up SDAM listeners
+ self.s.replset.on('serverDescriptionChanged', relay('serverDescriptionChanged'));
+ self.s.replset.on('serverHeartbeatStarted', relay('serverHeartbeatStarted'));
+ self.s.replset.on('serverHeartbeatSucceeded', relay('serverHeartbeatSucceeded'));
+ self.s.replset.on('serverHeartbeatFailed', relay('serverHeartbeatFailed'));
+ self.s.replset.on('serverOpening', relay('serverOpening'));
+ self.s.replset.on('serverClosed', relay('serverClosed'));
+ self.s.replset.on('topologyOpening', relay('topologyOpening'));
+ self.s.replset.on('topologyClosed', relay('topologyClosed'));
+ self.s.replset.on('topologyDescriptionChanged', relay('topologyDescriptionChanged'));
+
+ self.s.replset.on('fullsetup', function(topology) {
+ self.emit('fullsetup', null, self);
+ });
+
+ self.s.replset.on('all', function(topology) {
+ self.emit('all', null, self);
+ });
+
+ // Emit open event
+ self.emit('open', null, self);
+
+ // Return correctly
+ try {
+ callback(null, self);
+ } catch(err) {
+ process.nextTick(function() { throw err; })
+ }
+ }
+
+ // Error handler
+ var connectErrorHandler = function(event) {
+ return function(err) {
+ ['timeout', 'error', 'close'].forEach(function(e) {
+ self.s.replset.removeListener(e, connectErrorHandler);
+ });
+
+ self.s.replset.removeListener('connect', connectErrorHandler);
+ // Destroy the replset
+ self.s.replset.destroy();
+
+ // Try to callback
+ try {
+ callback(err);
+ } catch(err) {
+ if(!self.s.replset.isConnected())
+ process.nextTick(function() { throw err; })
+ }
+ }
+ }
+
+ // Set up listeners
+ self.s.replset.once('timeout', connectErrorHandler('timeout'));
+ self.s.replset.once('error', connectErrorHandler('error'));
+ self.s.replset.once('close', connectErrorHandler('close'));
+ self.s.replset.once('connect', connectHandler);
+
+ // Start connection
+ self.s.replset.connect(_options);
+}
+
+// Server capabilities
+ReplSet.prototype.capabilities = function() {
+ if(this.s.sCapabilities) return this.s.sCapabilities;
+ if(this.s.replset.lastIsMaster() == null) return null;
+ this.s.sCapabilities = new ServerCapabilities(this.s.replset.lastIsMaster());
+ return this.s.sCapabilities;
+}
+
+define.classMethod('capabilities', {callback: false, promise:false, returns: [ServerCapabilities]});
+
+// Command
+ReplSet.prototype.command = function(ns, cmd, options, callback) {
+ options = translateReadPreference(options);
+ this.s.replset.command(ns, cmd, options, callback);
+}
+
+define.classMethod('command', {callback: true, promise:false});
+
+// Insert
+ReplSet.prototype.insert = function(ns, ops, options, callback) {
+ this.s.replset.insert(ns, ops, options, callback);
+}
+
+define.classMethod('insert', {callback: true, promise:false});
+
+// Update
+ReplSet.prototype.update = function(ns, ops, options, callback) {
+ this.s.replset.update(ns, ops, options, callback);
+}
+
+define.classMethod('update', {callback: true, promise:false});
+
+// Remove
+ReplSet.prototype.remove = function(ns, ops, options, callback) {
+ this.s.replset.remove(ns, ops, options, callback);
+}
+
+define.classMethod('remove', {callback: true, promise:false});
+
+// Destroyed
+ReplSet.prototype.isDestroyed = function() {
+ return this.s.replset.isDestroyed();
+}
+
+// IsConnected
+ReplSet.prototype.isConnected = function() {
+ return this.s.replset.isConnected();
+}
+
+define.classMethod('isConnected', {callback: false, promise:false, returns: [Boolean]});
+
+// Insert
+ReplSet.prototype.cursor = function(ns, cmd, options) {
+ options = translateReadPreference(options);
+ options.disconnectHandler = this.s.store;
+ return this.s.replset.cursor(ns, cmd, options);
+}
+
+define.classMethod('cursor', {callback: false, promise:false, returns: [Cursor, AggregationCursor, CommandCursor]});
+
+ReplSet.prototype.lastIsMaster = function() {
+ return this.s.replset.lastIsMaster();
+}
+
+ReplSet.prototype.close = function(forceClosed) {
+ var self = this;
+ this.s.replset.destroy();
+ // We need to wash out all stored processes
+ if(forceClosed == true) {
+ this.s.storeOptions.force = forceClosed;
+ this.s.store.flush();
+ }
+
+ var events = ['timeout', 'error', 'close', 'joined', 'left'];
+ events.forEach(function(e) {
+ self.removeAllListeners(e);
+ });
+}
+
+define.classMethod('close', {callback: false, promise:false});
+
+ReplSet.prototype.auth = function() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ this.s.replset.auth.apply(this.s.replset, args);
+}
+
+define.classMethod('auth', {callback: true, promise:false});
+
+ReplSet.prototype.logout = function() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ this.s.replset.logout.apply(this.s.replset, args);
+}
+
+define.classMethod('logout', {callback: true, promise:false});
+
+/**
+ * All raw connections
+ * @method
+ * @return {array}
+ */
+ReplSet.prototype.connections = function() {
+ return this.s.replset.connections();
+}
+
+define.classMethod('connections', {callback: false, promise:false, returns:[Array]});
+
+/**
+ * A replset connect event, used to verify that the connection is up and running
+ *
+ * @event ReplSet#connect
+ * @type {ReplSet}
+ */
+
+/**
+ * The replset high availability event
+ *
+ * @event ReplSet#ha
+ * @type {function}
+ * @param {string} type The stage in the high availability event (start|end)
+ * @param {boolean} data.norepeat This is a repeating high availability process or a single execution only
+ * @param {number} data.id The id for this high availability request
+ * @param {object} data.state An object containing the information about the current replicaset
+ */
+
+/**
+ * A server member left the replicaset
+ *
+ * @event ReplSet#left
+ * @type {function}
+ * @param {string} type The type of member that left (primary|secondary|arbiter)
+ * @param {Server} server The server object that left
+ */
+
+/**
+ * A server member joined the replicaset
+ *
+ * @event ReplSet#joined
+ * @type {function}
+ * @param {string} type The type of member that joined (primary|secondary|arbiter)
+ * @param {Server} server The server object that joined
+ */
+
+/**
+ * ReplSet open event, emitted when replicaset can start processing commands.
+ *
+ * @event ReplSet#open
+ * @type {Replset}
+ */
+
+/**
+ * ReplSet fullsetup event, emitted when all servers in the topology have been connected to.
+ *
+ * @event ReplSet#fullsetup
+ * @type {Replset}
+ */
+
+/**
+ * ReplSet close event
+ *
+ * @event ReplSet#close
+ * @type {object}
+ */
+
+/**
+ * ReplSet error event, emitted if there is an error listener.
+ *
+ * @event ReplSet#error
+ * @type {MongoError}
+ */
+
+/**
+ * ReplSet timeout event
+ *
+ * @event ReplSet#timeout
+ * @type {object}
+ */
+
+/**
+ * ReplSet parseError event
+ *
+ * @event ReplSet#parseError
+ * @type {object}
+ */
+
+module.exports = ReplSet;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/server.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/server.js
new file mode 100644
index 0000000..127675d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/server.js
@@ -0,0 +1,507 @@
+"use strict";
+
+var EventEmitter = require('events').EventEmitter
+ , inherits = require('util').inherits
+ , CServer = require('mongodb-core').Server
+ , Cursor = require('./cursor')
+ , AggregationCursor = require('./aggregation_cursor')
+ , CommandCursor = require('./command_cursor')
+ , f = require('util').format
+ , ServerCapabilities = require('./topology_base').ServerCapabilities
+ , Store = require('./topology_base').Store
+ , Define = require('./metadata')
+ , MongoError = require('mongodb-core').MongoError
+ , shallowClone = require('./utils').shallowClone
+ , MAX_JS_INT = require('./utils').MAX_JS_INT
+ , translateOptions = require('./utils').translateOptions
+ , filterOptions = require('./utils').filterOptions
+ , mergeOptions = require('./utils').mergeOptions
+ , os = require('os');
+
+// Get package.json variable
+var driverVersion = require(__dirname + '/../package.json').version;
+var nodejsversion = f('Node.js %s, %s', process.version, os.endianness());
+var type = os.type();
+var name = process.platform;
+var architecture = process.arch;
+var release = os.release();
+
+/**
+ * @fileOverview The **Server** class is a class that represents a single server topology and is
+ * used to construct connections.
+ *
+ * **Server Should not be used, use MongoClient.connect**
+ * @example
+ * var Db = require('mongodb').Db,
+ * Server = require('mongodb').Server,
+ * test = require('assert');
+ * // Connect using single Server
+ * var db = new Db('test', new Server('localhost', 27017););
+ * db.open(function(err, db) {
+ * // Get an additional db
+ * db.close();
+ * });
+ */
+
+ // Allowed parameters
+ var legalOptionNames = ['ha', 'haInterval', 'acceptableLatencyMS'
+ , 'poolSize', 'ssl', 'checkServerIdentity', 'sslValidate'
+ , 'sslCA', 'sslCert', 'sslKey', 'sslPass', 'socketOptions', 'bufferMaxEntries'
+ , 'store', 'auto_reconnect', 'autoReconnect', 'emitError'
+ , 'keepAlive', 'noDelay', 'connectTimeoutMS', 'socketTimeoutMS'
+ , 'loggerLevel', 'logger', 'reconnectTries', 'reconnectInterval', 'monitoring'
+ , 'appname', 'domainsEnabled'
+ , 'servername', 'promoteLongs', 'promoteValues', 'promoteBuffers'];
+
+/**
+ * Creates a new Server instance
+ * @class
+ * @deprecated
+ * @param {string} host The host for the server, can be either an IP4, IP6 or domain socket style host.
+ * @param {number} [port] The server port if IP4.
+ * @param {object} [options=null] Optional settings.
+ * @param {number} [options.poolSize=5] Number of connections in the connection pool for each server instance, set to 5 as default for legacy reasons.
+ * @param {boolean} [options.ssl=false] Use ssl connection (needs to have a mongod server with ssl support)
+ * @param {object} [options.sslValidate=true] Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
+ * @param {array} [options.sslCA=null] Array of valid certificates either as Buffers or Strings (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {(Buffer|string)} [options.sslCert=null] String or buffer containing the certificate we wish to present (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {(Buffer|string)} [options.sslKey=null] String or buffer containing the certificate private key we wish to present (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {(Buffer|string)} [options.sslPass=null] String or buffer containing the certificate password (needs to have a mongod server with ssl support, 2.4 or higher)
+ * @param {string} [options.servername=null] String containing the server name requested via TLS SNI.
+ * @param {object} [options.socketOptions=null] Socket options
+ * @param {boolean} [options.socketOptions.autoReconnect=true] Reconnect on error.
+ * @param {boolean} [options.socketOptions.noDelay=true] TCP Socket NoDelay option.
+ * @param {number} [options.socketOptions.keepAlive=0] TCP KeepAlive on the socket with a X ms delay before start.
+ * @param {number} [options.socketOptions.connectTimeoutMS=0] TCP Connection timeout setting
+ * @param {number} [options.socketOptions.socketTimeoutMS=0] TCP Socket timeout setting
+ * @param {number} [options.reconnectTries=30] Server attempt to reconnect #times
+ * @param {number} [options.reconnectInterval=1000] Server will wait # milliseconds between retries
+ * @param {number} [options.monitoring=true] Triggers the server instance to call ismaster
+ * @param {number} [options.haInterval=10000] The interval of calling ismaster when monitoring is enabled.
+ * @param {boolean} [options.domainsEnabled=false] Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit.
+ * @fires Server#connect
+ * @fires Server#close
+ * @fires Server#error
+ * @fires Server#timeout
+ * @fires Server#parseError
+ * @fires Server#reconnect
+ * @return {Server} a Server instance.
+ */
+var Server = function(host, port, options) {
+ options = options || {};
+ if(!(this instanceof Server)) return new Server(host, port, options);
+ EventEmitter.call(this);
+ var self = this;
+
+ // Filter the options
+ options = filterOptions(options, legalOptionNames);
+
+ // Stored options
+ var storeOptions = {
+ force: false
+ , bufferMaxEntries: typeof options.bufferMaxEntries == 'number' ? options.bufferMaxEntries : MAX_JS_INT
+ }
+
+ // Shared global store
+ var store = options.store || new Store(self, storeOptions);
+
+ // Detect if we have a socket connection
+ if(host.indexOf('\/') != -1) {
+ if(port != null && typeof port == 'object') {
+ options = port;
+ port = null;
+ }
+ } else if(port == null) {
+ throw MongoError.create({message: 'port must be specified', driver:true});
+ }
+
+ // Get the reconnect option
+ var reconnect = typeof options.auto_reconnect == 'boolean' ? options.auto_reconnect : true;
+ reconnect = typeof options.autoReconnect == 'boolean' ? options.autoReconnect : reconnect;
+
+ // Clone options
+ var clonedOptions = mergeOptions({}, {
+ host: host, port: port, disconnectHandler: store,
+ cursorFactory: Cursor,
+ reconnect: reconnect,
+ emitError: typeof options.emitError == 'boolean' ? options.emitError : true,
+ size: typeof options.poolSize == 'number' ? options.poolSize : 5
+ });
+
+ // Translate any SSL options and other connectivity options
+ clonedOptions = translateOptions(clonedOptions, options);
+
+ // Socket options
+ var socketOptions = options.socketOptions && Object.keys(options.socketOptions).length > 0
+ ? options.socketOptions : options;
+
+ // Translate all the options to the mongodb-core ones
+ clonedOptions = translateOptions(clonedOptions, socketOptions);
+ if(typeof clonedOptions.keepAlive == 'number') {
+ clonedOptions.keepAliveInitialDelay = clonedOptions.keepAlive;
+ clonedOptions.keepAlive = clonedOptions.keepAlive > 0;
+ }
+
+ // Build default client information
+ this.clientInfo = {
+ driver: {
+ name: "nodejs",
+ version: driverVersion
+ },
+ os: {
+ type: type,
+ name: name,
+ architecture: architecture,
+ version: release
+ },
+ platform: nodejsversion
+ }
+
+ // Build default client information
+ clonedOptions.clientInfo = this.clientInfo;
+ // Do we have an application specific string
+ if(options.appname) {
+ clonedOptions.clientInfo.application = { name: options.appname };
+ }
+
+ // Create an instance of a server instance from mongodb-core
+ var server = new CServer(clonedOptions);
+ // Server capabilities
+ var sCapabilities = null;
+
+ // Define the internal properties
+ this.s = {
+ // Create an instance of a server instance from mongodb-core
+ server: server
+ // Server capabilities
+ , sCapabilities: null
+ // Cloned options
+ , clonedOptions: clonedOptions
+ // Reconnect
+ , reconnect: clonedOptions.reconnect
+ // Emit error
+ , emitError: clonedOptions.emitError
+ // Pool size
+ , poolSize: clonedOptions.size
+ // Store Options
+ , storeOptions: storeOptions
+ // Store
+ , store: store
+ // Host
+ , host: host
+ // Port
+ , port: port
+ // Options
+ , options: options
+ }
+}
+
+inherits(Server, EventEmitter);
+
+var define = Server.define = new Define('Server', Server, false);
+
+// BSON property
+Object.defineProperty(Server.prototype, 'bson', {
+ enumerable: true, get: function() {
+ return this.s.server.s.bson;
+ }
+});
+
+// Last ismaster
+Object.defineProperty(Server.prototype, 'isMasterDoc', {
+ enumerable:true, get: function() {
+ return this.s.server.lastIsMaster();
+ }
+});
+
+// Last ismaster
+Object.defineProperty(Server.prototype, 'poolSize', {
+ enumerable:true, get: function() { return this.s.server.connections().length; }
+});
+
+Object.defineProperty(Server.prototype, 'autoReconnect', {
+ enumerable:true, get: function() { return this.s.reconnect; }
+});
+
+Object.defineProperty(Server.prototype, 'host', {
+ enumerable:true, get: function() { return this.s.host; }
+});
+
+Object.defineProperty(Server.prototype, 'port', {
+ enumerable:true, get: function() { return this.s.port; }
+});
+
+// Connect
+Server.prototype.connect = function(db, _options, callback) {
+ var self = this;
+ if('function' === typeof _options) callback = _options, _options = {};
+ if(_options == null) _options = {};
+ if(!('function' === typeof callback)) callback = null;
+ self.s.options = _options;
+
+ // Update bufferMaxEntries
+ self.s.storeOptions.bufferMaxEntries = db.bufferMaxEntries;
+
+ // Error handler
+ var connectErrorHandler = function(event) {
+ return function(err) {
+ // Remove all event handlers
+ var events = ['timeout', 'error', 'close'];
+ events.forEach(function(e) {
+ self.s.server.removeListener(e, connectHandlers[e]);
+ });
+
+ self.s.server.removeListener('connect', connectErrorHandler);
+
+ // Try to callback
+ try {
+ callback(err);
+ } catch(err) {
+ process.nextTick(function() { throw err; })
+ }
+ }
+ }
+
+ // Actual handler
+ var errorHandler = function(event) {
+ return function(err) {
+ if(event != 'error') {
+ self.emit(event, err);
+ }
+ }
+ }
+
+ // Error handler
+ var reconnectHandler = function(err) {
+ self.emit('reconnect', self);
+ self.s.store.execute();
+ }
+
+ // Reconnect failed
+ var reconnectFailedHandler = function(err) {
+ self.emit('reconnectFailed', err);
+ self.s.store.flush(err);
+ }
+
+ // Destroy called on topology, perform cleanup
+ var destroyHandler = function() {
+ self.s.store.flush();
+ }
+
+ // Connect handler
+ var connectHandler = function() {
+ // Clear out all the current handlers left over
+ ["timeout", "error", "close", 'serverOpening', 'serverDescriptionChanged', 'serverHeartbeatStarted',
+ 'serverHeartbeatSucceeded', 'serverHeartbeatFailed', 'serverClosed', 'topologyOpening',
+ 'topologyClosed', 'topologyDescriptionChanged'].forEach(function(e) {
+ self.s.server.removeAllListeners(e);
+ });
+
+ // Set up listeners
+ self.s.server.once('timeout', errorHandler('timeout'));
+ self.s.server.once('error', errorHandler('error'));
+ self.s.server.on('close', errorHandler('close'));
+ // Only called on destroy
+ self.s.server.once('destroy', destroyHandler);
+
+ // relay the event
+ var relay = function(event) {
+ return function(t, server) {
+ self.emit(event, t, server);
+ }
+ }
+
+ // Set up SDAM listeners
+ self.s.server.on('serverDescriptionChanged', relay('serverDescriptionChanged'));
+ self.s.server.on('serverHeartbeatStarted', relay('serverHeartbeatStarted'));
+ self.s.server.on('serverHeartbeatSucceeded', relay('serverHeartbeatSucceeded'));
+ self.s.server.on('serverHeartbeatFailed', relay('serverHeartbeatFailed'));
+ self.s.server.on('serverOpening', relay('serverOpening'));
+ self.s.server.on('serverClosed', relay('serverClosed'));
+ self.s.server.on('topologyOpening', relay('topologyOpening'));
+ self.s.server.on('topologyClosed', relay('topologyClosed'));
+ self.s.server.on('topologyDescriptionChanged', relay('topologyDescriptionChanged'));
+ self.s.server.on('attemptReconnect', relay('attemptReconnect'));
+ self.s.server.on('monitoring', relay('monitoring'));
+
+ // Emit open event
+ self.emit('open', null, self);
+
+ // Return correctly
+ try {
+ callback(null, self);
+ } catch(err) {
+ console.log(err.stack)
+ process.nextTick(function() { throw err; })
+ }
+ }
+
+ // Set up listeners
+ var connectHandlers = {
+ timeout: connectErrorHandler('timeout'),
+ error: connectErrorHandler('error'),
+ close: connectErrorHandler('close')
+ };
+
+ // Add the event handlers
+ self.s.server.once('timeout', connectHandlers.timeout);
+ self.s.server.once('error', connectHandlers.error);
+ self.s.server.once('close', connectHandlers.close);
+ self.s.server.once('connect', connectHandler);
+ // Reconnect server
+ self.s.server.on('reconnect', reconnectHandler);
+ self.s.server.on('reconnectFailed', reconnectFailedHandler);
+
+ // Start connection
+ self.s.server.connect(_options);
+}
+
+// Server capabilities
+Server.prototype.capabilities = function() {
+ if(this.s.sCapabilities) return this.s.sCapabilities;
+ if(this.s.server.lastIsMaster() == null) return null;
+ this.s.sCapabilities = new ServerCapabilities(this.s.server.lastIsMaster());
+ return this.s.sCapabilities;
+}
+
+define.classMethod('capabilities', {callback: false, promise:false, returns: [ServerCapabilities]});
+
+// Command
+Server.prototype.command = function(ns, cmd, options, callback) {
+ this.s.server.command(ns, cmd, options, callback);
+}
+
+define.classMethod('command', {callback: true, promise:false});
+
+// Insert
+Server.prototype.insert = function(ns, ops, options, callback) {
+ this.s.server.insert(ns, ops, options, callback);
+}
+
+define.classMethod('insert', {callback: true, promise:false});
+
+// Update
+Server.prototype.update = function(ns, ops, options, callback) {
+ this.s.server.update(ns, ops, options, callback);
+}
+
+define.classMethod('update', {callback: true, promise:false});
+
+// Remove
+Server.prototype.remove = function(ns, ops, options, callback) {
+ this.s.server.remove(ns, ops, options, callback);
+}
+
+define.classMethod('remove', {callback: true, promise:false});
+
+// IsConnected
+Server.prototype.isConnected = function() {
+ return this.s.server.isConnected();
+}
+
+Server.prototype.isDestroyed = function() {
+ return this.s.server.isDestroyed();
+}
+
+define.classMethod('isConnected', {callback: false, promise:false, returns: [Boolean]});
+
+// Insert
+Server.prototype.cursor = function(ns, cmd, options) {
+ options.disconnectHandler = this.s.store;
+ return this.s.server.cursor(ns, cmd, options);
+}
+
+define.classMethod('cursor', {callback: false, promise:false, returns: [Cursor, AggregationCursor, CommandCursor]});
+
+Server.prototype.lastIsMaster = function() {
+ return this.s.server.lastIsMaster();
+}
+
+/**
+ * Unref all sockets
+ * @method
+ */
+Server.prototype.unref = function() {
+ this.s.server.unref();
+}
+
+Server.prototype.close = function(forceClosed) {
+ this.s.server.destroy();
+ // We need to wash out all stored processes
+ if(forceClosed == true) {
+ this.s.storeOptions.force = forceClosed;
+ this.s.store.flush();
+ }
+}
+
+define.classMethod('close', {callback: false, promise:false});
+
+Server.prototype.auth = function() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ this.s.server.auth.apply(this.s.server, args);
+}
+
+define.classMethod('auth', {callback: true, promise:false});
+
+Server.prototype.logout = function() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ this.s.server.logout.apply(this.s.server, args);
+}
+
+define.classMethod('logout', {callback: true, promise:false});
+
+/**
+ * All raw connections
+ * @method
+ * @return {array}
+ */
+Server.prototype.connections = function() {
+ return this.s.server.connections();
+}
+
+define.classMethod('connections', {callback: false, promise:false, returns:[Array]});
+
+/**
+ * Server connect event
+ *
+ * @event Server#connect
+ * @type {object}
+ */
+
+/**
+ * Server close event
+ *
+ * @event Server#close
+ * @type {object}
+ */
+
+/**
+ * Server reconnect event
+ *
+ * @event Server#reconnect
+ * @type {object}
+ */
+
+/**
+ * Server error event
+ *
+ * @event Server#error
+ * @type {MongoError}
+ */
+
+/**
+ * Server timeout event
+ *
+ * @event Server#timeout
+ * @type {object}
+ */
+
+/**
+ * Server parseError event
+ *
+ * @event Server#parseError
+ * @type {object}
+ */
+
+module.exports = Server;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/topology_base.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/topology_base.js
new file mode 100644
index 0000000..ebfd616
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/topology_base.js
@@ -0,0 +1,191 @@
+"use strict";
+
+var MongoError = require('mongodb-core').MongoError
+ , f = require('util').format;
+
+// The store of ops
+var Store = function(topology, storeOptions) {
+ var self = this;
+ var storedOps = [];
+ storeOptions = storeOptions || {force:false, bufferMaxEntries: -1}
+
+ // Internal state
+ this.s = {
+ storedOps: storedOps
+ , storeOptions: storeOptions
+ , topology: topology
+ }
+
+ Object.defineProperty(this, 'length', {
+ enumerable:true, get: function() { return self.s.storedOps.length; }
+ });
+}
+
+Store.prototype.add = function(opType, ns, ops, options, callback) {
+ if(this.s.storeOptions.force) {
+ return callback(MongoError.create({message: "db closed by application", driver:true}));
+ }
+
+ if(this.s.storeOptions.bufferMaxEntries == 0) {
+ return callback(MongoError.create({message: f("no connection available for operation and number of stored operation > %s", this.s.storeOptions.bufferMaxEntries), driver:true }));
+ }
+
+ if(this.s.storeOptions.bufferMaxEntries > 0 && this.s.storedOps.length > this.s.storeOptions.bufferMaxEntries) {
+ while(this.s.storedOps.length > 0) {
+ var op = this.s.storedOps.shift();
+ op.c(MongoError.create({message: f("no connection available for operation and number of stored operation > %s", this.s.storeOptions.bufferMaxEntries), driver:true }));
+ }
+
+ return;
+ }
+
+ this.s.storedOps.push({t: opType, n: ns, o: ops, op: options, c: callback})
+}
+
+Store.prototype.addObjectAndMethod = function(opType, object, method, params, callback) {
+ if(this.s.storeOptions.force) {
+ return callback(MongoError.create({message: "db closed by application", driver:true }));
+ }
+
+ if(this.s.storeOptions.bufferMaxEntries == 0) {
+ return callback(MongoError.create({message: f("no connection available for operation and number of stored operation > %s", this.s.storeOptions.bufferMaxEntries), driver:true }));
+ }
+
+ if(this.s.storeOptions.bufferMaxEntries > 0 && this.s.storedOps.length > this.s.storeOptions.bufferMaxEntries) {
+ while(this.s.storedOps.length > 0) {
+ var op = this.s.storedOps.shift();
+ op.c(MongoError.create({message: f("no connection available for operation and number of stored operation > %s", this.s.storeOptions.bufferMaxEntries), driver:true }));
+ }
+
+ return;
+ }
+
+ this.s.storedOps.push({t: opType, m: method, o: object, p: params, c: callback})
+}
+
+Store.prototype.flush = function(err) {
+ while(this.s.storedOps.length > 0) {
+ this.s.storedOps.shift().c(err || MongoError.create({message: f("no connection available for operation"), driver:true }));
+ }
+}
+
+var primaryOptions = ['primary', 'primaryPreferred', 'nearest', 'secondaryPreferred'];
+var secondaryOptions = ['secondary', 'secondaryPreferred'];
+
+Store.prototype.execute = function(options) {
+ options = options || {};
+ // Get current ops
+ var ops = this.s.storedOps;
+ // Reset the ops
+ this.s.storedOps = [];
+
+ // Unpack options
+ var executePrimary = typeof options.executePrimary === 'boolean'
+ ? options.executePrimary : true;
+ var executeSecondary = typeof options.executeSecondary === 'boolean'
+ ? options.executeSecondary : true;
+
+ // Execute all the stored ops
+ while(ops.length > 0) {
+ var op = ops.shift();
+
+ if(op.t == 'cursor') {
+ if(executePrimary && executeSecondary) {
+ op.o[op.m].apply(op.o, op.p);
+ } else if(executePrimary && op.o.options
+ && op.o.options.readPreference
+ && primaryOptions.indexOf(op.o.options.readPreference.mode) != -1) {
+ op.o[op.m].apply(op.o, op.p);
+ } else if(!executePrimary && executeSecondary && op.o.options
+ && op.o.options.readPreference
+ && secondaryOptions.indexOf(op.o.options.readPreference.mode) != -1) {
+ op.o[op.m].apply(op.o, op.p);
+ }
+ } else if(op.t == 'auth') {
+ this.s.topology[op.t].apply(this.s.topology, op.o);
+ } else {
+ if(executePrimary && executeSecondary) {
+ this.s.topology[op.t](op.n, op.o, op.op, op.c);
+ } else if(executePrimary && op.op && op.op.readPreference
+ && primaryOptions.indexOf(op.op.readPreference.mode) != -1) {
+ this.s.topology[op.t](op.n, op.o, op.op, op.c);
+ } else if(!executePrimary && executeSecondary && op.op && op.op.readPreference
+ && secondaryOptions.indexOf(op.op.readPreference.mode) != -1) {
+ this.s.topology[op.t](op.n, op.o, op.op, op.c);
+ }
+ }
+ }
+}
+
+Store.prototype.all = function() {
+ return this.s.storedOps;
+}
+
+// Server capabilities
+var ServerCapabilities = function(ismaster) {
+ var setup_get_property = function(object, name, value) {
+ Object.defineProperty(object, name, {
+ enumerable: true
+ , get: function () { return value; }
+ });
+ }
+
+ // Capabilities
+ var aggregationCursor = false;
+ var writeCommands = false;
+ var textSearch = false;
+ var authCommands = false;
+ var listCollections = false;
+ var listIndexes = false;
+ var maxNumberOfDocsInBatch = ismaster.maxWriteBatchSize || 1000;
+ var commandsTakeWriteConcern = false;
+ var commandsTakeCollation = false;
+
+ if(ismaster.minWireVersion >= 0) {
+ textSearch = true;
+ }
+
+ if(ismaster.maxWireVersion >= 1) {
+ aggregationCursor = true;
+ authCommands = true;
+ }
+
+ if(ismaster.maxWireVersion >= 2) {
+ writeCommands = true;
+ }
+
+ if(ismaster.maxWireVersion >= 3) {
+ listCollections = true;
+ listIndexes = true;
+ }
+
+ if(ismaster.maxWireVersion >= 5) {
+ commandsTakeWriteConcern = true;
+ commandsTakeCollation = true;
+ }
+
+ // If no min or max wire version set to 0
+ if(ismaster.minWireVersion == null) {
+ ismaster.minWireVersion = 0;
+ }
+
+ if(ismaster.maxWireVersion == null) {
+ ismaster.maxWireVersion = 0;
+ }
+
+ // Map up read only parameters
+ setup_get_property(this, "hasAggregationCursor", aggregationCursor);
+ setup_get_property(this, "hasWriteCommands", writeCommands);
+ setup_get_property(this, "hasTextSearch", textSearch);
+ setup_get_property(this, "hasAuthCommands", authCommands);
+ setup_get_property(this, "hasListCollectionsCommand", listCollections);
+ setup_get_property(this, "hasListIndexesCommand", listIndexes);
+ setup_get_property(this, "minWireVersion", ismaster.minWireVersion);
+ setup_get_property(this, "maxWireVersion", ismaster.maxWireVersion);
+ setup_get_property(this, "maxNumberOfDocsInBatch", maxNumberOfDocsInBatch);
+ setup_get_property(this, "commandsTakeWriteConcern", commandsTakeWriteConcern);
+ setup_get_property(this, "commandsTakeCollation", commandsTakeCollation);
+}
+
+exports.Store = Store;
+exports.ServerCapabilities = ServerCapabilities;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/url_parser.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/url_parser.js
new file mode 100644
index 0000000..663e5dc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/url_parser.js
@@ -0,0 +1,406 @@
+"use strict";
+
+var ReadPreference = require('./read_preference'),
+ parser = require('url'),
+ f = require('util').format;
+
+module.exports = function(url, options) {
+ // Ensure we have a default options object if none set
+ options = options || {};
+ // Variables
+ var connection_part = '';
+ var auth_part = '';
+ var query_string_part = '';
+ var dbName = 'admin';
+
+ // Url parser result
+ var result = parser.parse(url, true);
+
+ if(result.protocol != 'mongodb:') {
+ throw new Error('invalid schema, expected mongodb');
+ }
+
+ if((result.hostname == null || result.hostname == '') && url.indexOf('.sock') == -1) {
+ throw new Error('no hostname or hostnames provided in connection string');
+ }
+
+ if(result.port == '0') {
+ throw new Error('invalid port (zero) with hostname');
+ }
+
+ if(!isNaN(parseInt(result.port, 10)) && parseInt(result.port, 10) > 65535) {
+ throw new Error('invalid port (larger than 65535) with hostname');
+ }
+
+ if(result.path
+ && result.path.length > 0
+ && result.path[0] != '/'
+ && url.indexOf('.sock') == -1) {
+ throw new Error('missing delimiting slash between hosts and options');
+ }
+
+ if(result.query) {
+ for(var name in result.query) {
+ if(name.indexOf('::') != -1) {
+ throw new Error('double colon in host identifier');
+ }
+
+ if(result.query[name] == '') {
+ throw new Error('query parameter ' + name + ' is an incomplete value pair');
+ }
+ }
+ }
+
+ if(result.auth) {
+ var parts = result.auth.split(':');
+ if(url.indexOf(result.auth) != -1 && parts.length > 2) {
+ throw new Error('Username with password containing an unescaped colon');
+ }
+
+ if(url.indexOf(result.auth) != -1 && result.auth.indexOf('@') != -1) {
+ throw new Error('Username containing an unescaped at-sign');
+ }
+ }
+
+ // Remove query
+ var clean = url.split('?').shift();
+
+ // Extract the list of hosts
+ var strings = clean.split(',');
+ var hosts = [];
+
+ for(var i = 0; i < strings.length; i++) {
+ var hostString = strings[i];
+
+ if(hostString.indexOf('mongodb') != -1) {
+ if(hostString.indexOf('@') != -1) {
+ hosts.push(hostString.split('@').pop())
+ } else {
+ hosts.push(hostString.substr('mongodb://'.length));
+ }
+ } else if(hostString.indexOf('/') != -1) {
+ hosts.push(hostString.split('/').shift());
+ } else if(hostString.indexOf('/') == -1) {
+ hosts.push(hostString.trim());
+ }
+ }
+
+ for(var i = 0; i < hosts.length; i++) {
+ var r = parser.parse(f('mongodb://%s', hosts[i].trim()));
+ if(r.path && r.path.indexOf(':') != -1) {
+ throw new Error('double colon in host identifier');
+ }
+ }
+
+ // If we have a ? mark cut the query elements off
+ if(url.indexOf("?") != -1) {
+ query_string_part = url.substr(url.indexOf("?") + 1);
+ connection_part = url.substring("mongodb://".length, url.indexOf("?"))
+ } else {
+ connection_part = url.substring("mongodb://".length);
+ }
+
+ // Check if we have auth params
+ if(connection_part.indexOf("@") != -1) {
+ auth_part = connection_part.split("@")[0];
+ connection_part = connection_part.split("@")[1];
+ }
+
+ // Check if the connection string has a db
+ if(connection_part.indexOf(".sock") != -1) {
+ if(connection_part.indexOf(".sock/") != -1) {
+ dbName = connection_part.split(".sock/")[1];
+ // Check if multiple database names provided, or just an illegal trailing backslash
+ if (dbName.indexOf("/") != -1) {
+ if (dbName.split("/").length == 2 && dbName.split("/")[1].length == 0) {
+ throw new Error('Illegal trailing backslash after database name');
+ }
+ throw new Error('More than 1 database name in URL');
+ }
+ connection_part = connection_part.split("/", connection_part.indexOf(".sock") + ".sock".length);
+ }
+ } else if(connection_part.indexOf("/") != -1) {
+ // Check if multiple database names provided, or just an illegal trailing backslash
+ if (connection_part.split("/").length > 2) {
+ if (connection_part.split("/")[2].length == 0) {
+ throw new Error('Illegal trailing backslash after database name');
+ }
+ throw new Error('More than 1 database name in URL');
+ }
+ dbName = connection_part.split("/")[1];
+ connection_part = connection_part.split("/")[0];
+ }
+
+ // Result object
+ var object = {};
+
+ // Pick apart the authentication part of the string
+ var authPart = auth_part || '';
+ var auth = authPart.split(':', 2);
+
+ // Decode the URI components
+ auth[0] = decodeURIComponent(auth[0]);
+ if(auth[1]){
+ auth[1] = decodeURIComponent(auth[1]);
+ }
+
+ // Add auth to final object if we have 2 elements
+ if(auth.length == 2) object.auth = {user: auth[0], password: auth[1]};
+
+ // Variables used for temporary storage
+ var hostPart;
+ var urlOptions;
+ var servers;
+ var serverOptions = {socketOptions: {}};
+ var dbOptions = {read_preference_tags: []};
+ var replSetServersOptions = {socketOptions: {}};
+ var mongosOptions = {socketOptions: {}};
+ // Add server options to final object
+ object.server_options = serverOptions;
+ object.db_options = dbOptions;
+ object.rs_options = replSetServersOptions;
+ object.mongos_options = mongosOptions;
+
+ // Let's check if we are using a domain socket
+ if(url.match(/\.sock/)) {
+ // Split out the socket part
+ var domainSocket = url.substring(
+ url.indexOf("mongodb://") + "mongodb://".length
+ , url.lastIndexOf(".sock") + ".sock".length);
+ // Clean out any auth stuff if any
+ if(domainSocket.indexOf("@") != -1) domainSocket = domainSocket.split("@")[1];
+ servers = [{domain_socket: domainSocket}];
+ } else {
+ // Split up the db
+ hostPart = connection_part;
+ // Deduplicate servers
+ var deduplicatedServers = {};
+
+ // Parse all server results
+ servers = hostPart.split(',').map(function(h) {
+ var _host, _port, ipv6match;
+ //check if it matches [IPv6]:port, where the port number is optional
+ if ((ipv6match = /\[([^\]]+)\](?:\:(.+))?/.exec(h))) {
+ _host = ipv6match[1];
+ _port = parseInt(ipv6match[2], 10) || 27017;
+ } else {
+ //otherwise assume it's IPv4, or plain hostname
+ var hostPort = h.split(':', 2);
+ _host = hostPort[0] || 'localhost';
+ _port = hostPort[1] != null ? parseInt(hostPort[1], 10) : 27017;
+ // Check for localhost?safe=true style case
+ if(_host.indexOf("?") != -1) _host = _host.split(/\?/)[0];
+ }
+
+ // No entry returned for duplicate servr
+ if(deduplicatedServers[_host + "_" + _port]) return null;
+ deduplicatedServers[_host + "_" + _port] = 1;
+
+ // Return the mapped object
+ return {host: _host, port: _port};
+ }).filter(function(x) {
+ return x != null;
+ });
+ }
+
+ // Get the db name
+ object.dbName = dbName || 'admin';
+ // Split up all the options
+ urlOptions = (query_string_part || '').split(/[&;]/);
+ // Ugh, we have to figure out which options go to which constructor manually.
+ urlOptions.forEach(function(opt) {
+ if(!opt) return;
+ var splitOpt = opt.split('='), name = splitOpt[0], value = splitOpt[1];
+ // Options implementations
+ switch(name) {
+ case 'slaveOk':
+ case 'slave_ok':
+ serverOptions.slave_ok = (value == 'true');
+ dbOptions.slaveOk = (value == 'true');
+ break;
+ case 'maxPoolSize':
+ case 'poolSize':
+ serverOptions.poolSize = parseInt(value, 10);
+ replSetServersOptions.poolSize = parseInt(value, 10);
+ break;
+ case 'appname':
+ object.appname = decodeURIComponent(value);
+ case 'autoReconnect':
+ case 'auto_reconnect':
+ serverOptions.auto_reconnect = (value == 'true');
+ break;
+ case 'minPoolSize':
+ throw new Error("minPoolSize not supported");
+ case 'maxIdleTimeMS':
+ throw new Error("maxIdleTimeMS not supported");
+ case 'waitQueueMultiple':
+ throw new Error("waitQueueMultiple not supported");
+ case 'waitQueueTimeoutMS':
+ throw new Error("waitQueueTimeoutMS not supported");
+ case 'uuidRepresentation':
+ throw new Error("uuidRepresentation not supported");
+ case 'ssl':
+ if(value == 'prefer') {
+ serverOptions.ssl = value;
+ replSetServersOptions.ssl = value;
+ mongosOptions.ssl = value;
+ break;
+ }
+ serverOptions.ssl = (value == 'true');
+ replSetServersOptions.ssl = (value == 'true');
+ mongosOptions.ssl = (value == 'true');
+ break;
+ case 'sslValidate':
+ serverOptions.sslValidate = (value == 'true');
+ replSetServersOptions.sslValidate = (value == 'true');
+ mongosOptions.sslValidate = (value == 'true');
+ break;
+ case 'replicaSet':
+ case 'rs_name':
+ replSetServersOptions.rs_name = value;
+ break;
+ case 'reconnectWait':
+ replSetServersOptions.reconnectWait = parseInt(value, 10);
+ break;
+ case 'retries':
+ replSetServersOptions.retries = parseInt(value, 10);
+ break;
+ case 'readSecondary':
+ case 'read_secondary':
+ replSetServersOptions.read_secondary = (value == 'true');
+ break;
+ case 'fsync':
+ dbOptions.fsync = (value == 'true');
+ break;
+ case 'journal':
+ dbOptions.j = (value == 'true');
+ break;
+ case 'safe':
+ dbOptions.safe = (value == 'true');
+ break;
+ case 'nativeParser':
+ case 'native_parser':
+ dbOptions.native_parser = (value == 'true');
+ break;
+ case 'readConcernLevel':
+ dbOptions.readConcern = {level: value};
+ break;
+ case 'connectTimeoutMS':
+ serverOptions.socketOptions.connectTimeoutMS = parseInt(value, 10);
+ replSetServersOptions.socketOptions.connectTimeoutMS = parseInt(value, 10);
+ mongosOptions.socketOptions.connectTimeoutMS = parseInt(value, 10);
+ break;
+ case 'socketTimeoutMS':
+ serverOptions.socketOptions.socketTimeoutMS = parseInt(value, 10);
+ replSetServersOptions.socketOptions.socketTimeoutMS = parseInt(value, 10);
+ mongosOptions.socketOptions.socketTimeoutMS = parseInt(value, 10);
+ break;
+ case 'w':
+ dbOptions.w = parseInt(value, 10);
+ if(isNaN(dbOptions.w)) dbOptions.w = value;
+ break;
+ case 'authSource':
+ dbOptions.authSource = value;
+ break;
+ case 'gssapiServiceName':
+ dbOptions.gssapiServiceName = value;
+ break;
+ case 'authMechanism':
+ if(value == 'GSSAPI') {
+ // If no password provided decode only the principal
+ if(object.auth == null) {
+ var urlDecodeAuthPart = decodeURIComponent(authPart);
+ if(urlDecodeAuthPart.indexOf("@") == -1) throw new Error("GSSAPI requires a provided principal");
+ object.auth = {user: urlDecodeAuthPart, password: null};
+ } else {
+ object.auth.user = decodeURIComponent(object.auth.user);
+ }
+ } else if(value == 'MONGODB-X509') {
+ object.auth = {user: decodeURIComponent(authPart)};
+ }
+
+ // Only support GSSAPI or MONGODB-CR for now
+ if(value != 'GSSAPI'
+ && value != 'MONGODB-X509'
+ && value != 'MONGODB-CR'
+ && value != 'DEFAULT'
+ && value != 'SCRAM-SHA-1'
+ && value != 'PLAIN')
+ throw new Error("only DEFAULT, GSSAPI, PLAIN, MONGODB-X509, SCRAM-SHA-1 or MONGODB-CR is supported by authMechanism");
+
+ // Authentication mechanism
+ dbOptions.authMechanism = value;
+ break;
+ case 'authMechanismProperties':
+ // Split up into key, value pairs
+ var values = value.split(',');
+ var o = {};
+ // For each value split into key, value
+ values.forEach(function(x) {
+ var v = x.split(':');
+ o[v[0]] = v[1];
+ });
+
+ // Set all authMechanismProperties
+ dbOptions.authMechanismProperties = o;
+ // Set the service name value
+ if(typeof o.SERVICE_NAME == 'string') dbOptions.gssapiServiceName = o.SERVICE_NAME;
+ if(typeof o.SERVICE_REALM == 'string') dbOptions.gssapiServiceRealm = o.SERVICE_REALM;
+ if(typeof o.CANONICALIZE_HOST_NAME == 'string') dbOptions.gssapiCanonicalizeHostName = o.CANONICALIZE_HOST_NAME == 'true' ? true : false;
+ break;
+ case 'wtimeoutMS':
+ dbOptions.wtimeout = parseInt(value, 10);
+ break;
+ case 'readPreference':
+ if(!ReadPreference.isValid(value)) throw new Error("readPreference must be either primary/primaryPreferred/secondary/secondaryPreferred/nearest");
+ dbOptions.readPreference = value;
+ break;
+ case 'maxStalenessMS':
+ dbOptions.maxStalenessMS = parseInt(value, 10);
+ break;
+ case 'readPreferenceTags':
+ // Decode the value
+ value = decodeURIComponent(value);
+ // Contains the tag object
+ var tagObject = {};
+ if(value == null || value == '') {
+ dbOptions.read_preference_tags.push(tagObject);
+ break;
+ }
+
+ // Split up the tags
+ var tags = value.split(/\,/);
+ for(var i = 0; i < tags.length; i++) {
+ var parts = tags[i].trim().split(/\:/);
+ tagObject[parts[0]] = parts[1];
+ }
+
+ // Set the preferences tags
+ dbOptions.read_preference_tags.push(tagObject);
+ break;
+ default:
+ break;
+ }
+ });
+
+ // No tags: should be null (not [])
+ if(dbOptions.read_preference_tags.length === 0) {
+ dbOptions.read_preference_tags = null;
+ }
+
+ // Validate if there are an invalid write concern combinations
+ if((dbOptions.w == -1 || dbOptions.w == 0) && (
+ dbOptions.journal == true
+ || dbOptions.fsync == true
+ || dbOptions.safe == true)) throw new Error("w set to -1 or 0 cannot be combined with safe/w/journal/fsync")
+
+ // If no read preference set it to primary
+ if(!dbOptions.readPreference) {
+ dbOptions.readPreference = 'primary';
+ }
+
+ // Add servers to result
+ object.servers = servers;
+ // Returned parsed object
+ return object;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/utils.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/utils.js
new file mode 100644
index 0000000..fcadf8f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/lib/utils.js
@@ -0,0 +1,313 @@
+"use strict";
+
+var MongoError = require('mongodb-core').MongoError,
+ f = require('util').format;
+
+var shallowClone = function(obj) {
+ var copy = {};
+ for(var name in obj) copy[name] = obj[name];
+ return copy;
+}
+
+// Set simple property
+var getSingleProperty = function(obj, name, value) {
+ Object.defineProperty(obj, name, {
+ enumerable:true,
+ get: function() {
+ return value
+ }
+ });
+}
+
+var formatSortValue = exports.formatSortValue = function(sortDirection) {
+ var value = ("" + sortDirection).toLowerCase();
+
+ switch (value) {
+ case 'ascending':
+ case 'asc':
+ case '1':
+ return 1;
+ case 'descending':
+ case 'desc':
+ case '-1':
+ return -1;
+ default:
+ throw new Error("Illegal sort clause, must be of the form "
+ + "[['field1', '(ascending|descending)'], "
+ + "['field2', '(ascending|descending)']]");
+ }
+};
+
+var formattedOrderClause = exports.formattedOrderClause = function(sortValue) {
+ var orderBy = {};
+ if(sortValue == null) return null;
+ if (Array.isArray(sortValue)) {
+ if(sortValue.length === 0) {
+ return null;
+ }
+
+ for(var i = 0; i < sortValue.length; i++) {
+ if(sortValue[i].constructor == String) {
+ orderBy[sortValue[i]] = 1;
+ } else {
+ orderBy[sortValue[i][0]] = formatSortValue(sortValue[i][1]);
+ }
+ }
+ } else if(sortValue != null && typeof sortValue == 'object') {
+ orderBy = sortValue;
+ } else if (typeof sortValue == 'string') {
+ orderBy[sortValue] = 1;
+ } else {
+ throw new Error("Illegal sort clause, must be of the form " +
+ "[['field1', '(ascending|descending)'], ['field2', '(ascending|descending)']]");
+ }
+
+ return orderBy;
+};
+
+var checkCollectionName = function checkCollectionName (collectionName) {
+ if('string' !== typeof collectionName) {
+ throw Error("collection name must be a String");
+ }
+
+ if(!collectionName || collectionName.indexOf('..') != -1) {
+ throw Error("collection names cannot be empty");
+ }
+
+ if(collectionName.indexOf('$') != -1 &&
+ collectionName.match(/((^\$cmd)|(oplog\.\$main))/) == null) {
+ throw Error("collection names must not contain '$'");
+ }
+
+ if(collectionName.match(/^\.|\.$/) != null) {
+ throw Error("collection names must not start or end with '.'");
+ }
+
+ // Validate that we are not passing 0x00 in the colletion name
+ if(!!~collectionName.indexOf("\x00")) {
+ throw new Error("collection names cannot contain a null character");
+ }
+};
+
+var handleCallback = function(callback, err, value1, value2) {
+ try {
+ if(callback == null) return;
+ if(callback) {
+ return value2 ? callback(err, value1, value2) : callback(err, value1);
+ }
+ } catch(err) {
+ process.nextTick(function() { throw err; });
+ return false;
+ }
+
+ return true;
+}
+
+/**
+ * Wrap a Mongo error document in an Error instance
+ * @ignore
+ * @api private
+ */
+var toError = function(error) {
+ if (error instanceof Error) return error;
+
+ var msg = error.err || error.errmsg || error.errMessage || error;
+ var e = MongoError.create({message: msg, driver:true});
+
+ // Get all object keys
+ var keys = typeof error == 'object'
+ ? Object.keys(error)
+ : [];
+
+ for(var i = 0; i < keys.length; i++) {
+ try {
+ e[keys[i]] = error[keys[i]];
+ } catch(err) {
+ // continue
+ }
+ }
+
+ return e;
+}
+
+/**
+ * @ignore
+ */
+var normalizeHintField = function normalizeHintField(hint) {
+ var finalHint = null;
+
+ if(typeof hint == 'string') {
+ finalHint = hint;
+ } else if(Array.isArray(hint)) {
+ finalHint = {};
+
+ hint.forEach(function(param) {
+ finalHint[param] = 1;
+ });
+ } else if(hint != null && typeof hint == 'object') {
+ finalHint = {};
+ for (var name in hint) {
+ finalHint[name] = hint[name];
+ }
+ }
+
+ return finalHint;
+};
+
+/**
+ * Create index name based on field spec
+ *
+ * @ignore
+ * @api private
+ */
+var parseIndexOptions = function(fieldOrSpec) {
+ var fieldHash = {};
+ var indexes = [];
+ var keys;
+
+ // Get all the fields accordingly
+ if('string' == typeof fieldOrSpec) {
+ // 'type'
+ indexes.push(fieldOrSpec + '_' + 1);
+ fieldHash[fieldOrSpec] = 1;
+ } else if(Array.isArray(fieldOrSpec)) {
+ fieldOrSpec.forEach(function(f) {
+ if('string' == typeof f) {
+ // [{location:'2d'}, 'type']
+ indexes.push(f + '_' + 1);
+ fieldHash[f] = 1;
+ } else if(Array.isArray(f)) {
+ // [['location', '2d'],['type', 1]]
+ indexes.push(f[0] + '_' + (f[1] || 1));
+ fieldHash[f[0]] = f[1] || 1;
+ } else if(isObject(f)) {
+ // [{location:'2d'}, {type:1}]
+ keys = Object.keys(f);
+ keys.forEach(function(k) {
+ indexes.push(k + '_' + f[k]);
+ fieldHash[k] = f[k];
+ });
+ } else {
+ // undefined (ignore)
+ }
+ });
+ } else if(isObject(fieldOrSpec)) {
+ // {location:'2d', type:1}
+ keys = Object.keys(fieldOrSpec);
+ keys.forEach(function(key) {
+ indexes.push(key + '_' + fieldOrSpec[key]);
+ fieldHash[key] = fieldOrSpec[key];
+ });
+ }
+
+ return {
+ name: indexes.join("_"), keys: keys, fieldHash: fieldHash
+ }
+}
+
+var isObject = exports.isObject = function (arg) {
+ return '[object Object]' == toString.call(arg)
+}
+
+var debugOptions = function(debugFields, options) {
+ var finaloptions = {};
+ debugFields.forEach(function(n) {
+ finaloptions[n] = options[n];
+ });
+
+ return finaloptions;
+}
+
+var decorateCommand = function(command, options, exclude) {
+ for(var name in options) {
+ if(exclude[name] == null) command[name] = options[name];
+ }
+
+ return command;
+}
+
+var mergeOptions = function(target, source) {
+ for(var name in source) {
+ target[name] = source[name];
+ }
+
+ return target;
+}
+
+// Merge options with translation
+var translateOptions = function(target, source) {
+ var translations = {
+ // SSL translation options
+ 'sslCA': 'ca', 'sslValidate': 'rejectUnauthorized', 'sslKey': 'key', 'sslCert': 'cert', 'sslPass': 'passphrase',
+ // SocketTimeout translation options
+ 'socketTimeoutMS': 'socketTimeout', 'connectTimeoutMS': 'connectionTimeout',
+ // Replicaset options
+ 'replicaSet': 'setName', 'rs_name': 'setName', 'secondaryAcceptableLatencyMS': 'acceptableLatency',
+ 'connectWithNoPrimary': 'secondaryOnlyConnectionAllowed',
+ // Mongos options
+ 'acceptableLatencyMS': 'localThresholdMS'
+ }
+
+ for(var name in source) {
+ if(translations[name]) {
+ target[translations[name]] = source[name];
+ } else {
+ target[name] = source[name];
+ }
+ }
+
+ return target;
+}
+
+var filterOptions = function(options, names) {
+ var filterOptions = {};
+
+ for(var name in options) {
+ if(names.indexOf(name) != -1) filterOptions[name] = options[name];
+ }
+
+ // Filtered options
+ return filterOptions;
+}
+
+// Object.assign method or polyfille
+var assign = Object.assign ? Object.assign : function assign(target, firstSource) {
+ if (target === undefined || target === null) {
+ throw new TypeError('Cannot convert first argument to object');
+ }
+
+ var to = Object(target);
+ for (var i = 1; i < arguments.length; i++) {
+ var nextSource = arguments[i];
+ if (nextSource === undefined || nextSource === null) {
+ continue;
+ }
+
+ var keysArray = Object.keys(Object(nextSource));
+ for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
+ var nextKey = keysArray[nextIndex];
+ var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
+ if (desc !== undefined && desc.enumerable) {
+ to[nextKey] = nextSource[nextKey];
+ }
+ }
+ }
+ return to;
+}
+
+exports.filterOptions = filterOptions;
+exports.mergeOptions = mergeOptions;
+exports.translateOptions = translateOptions;
+exports.shallowClone = shallowClone;
+exports.getSingleProperty = getSingleProperty;
+exports.checkCollectionName = checkCollectionName;
+exports.toError = toError;
+exports.formattedOrderClause = formattedOrderClause;
+exports.parseIndexOptions = parseIndexOptions;
+exports.normalizeHintField = normalizeHintField;
+exports.handleCallback = handleCallback;
+exports.decorateCommand = decorateCommand;
+exports.isObject = isObject;
+exports.debugOptions = debugOptions;
+exports.MAX_JS_INT = 0x20000000000000;
+exports.assign = assign;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/CHANGELOG.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/CHANGELOG.md
new file mode 100644
index 0000000..cc8aa10
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/CHANGELOG.md
@@ -0,0 +1,65 @@
+# Master
+
+# 3.2.0
+
+* improve tamper resistence of Promise.all Promise.race and
+ Promise.prototype.then (note, this isn't complete, but addresses an exception
+ when used \w core-js, follow up work will address entirely)
+* remove spec incompatible then chaining fast-path
+* add eslint
+* update build deps
+
+# 3.1.2
+
+* fix node detection issues with NWJS/electron
+
+# 3.1.0
+
+* improve performance of Promise.all when it encounters a non-promise input object input
+* then/resolve tamper protection
+* reduce AST size of promise constructor, to facilitate more inlining
+* Update README.md with details about PhantomJS requirement for running tests
+* Mangle and compress the minified version
+
+# 3.0.1
+
+* no longer include dist/test in npm releases
+
+# 3.0.0
+
+* use nextTick() instead of setImmediate() to schedule microtasks with node 0.10. Later versions of
+ nodes are not affected as they were already using nextTick(). Note that using nextTick() might
+ trigger a depreciation warning on 0.10 as described at https://github.com/cujojs/when/issues/410.
+ The reason why nextTick() is preferred is that is setImmediate() would schedule a macrotask
+ instead of a microtask and might result in a different scheduling.
+ If needed you can revert to the former behavior as follow:
+
+ var Promise = require('es6-promise').Promise;
+ Promise._setScheduler(setImmediate);
+
+# 2.3.0
+
+* #121: Ability to override the internal asap implementation
+* #120: Use an ascii character for an apostrophe, for source maps
+
+# 2.2.0
+
+* #116: Expose asap() and a way to override the scheduling mechanism on Promise
+* Lock to v0.2.3 of ember-cli
+
+# 2.1.1
+
+* Fix #100 via #105: tell browserify to ignore vertx require
+* Fix #101 via #102: "follow thenable state, not own state"
+
+# 2.1.0
+
+* ? (see the commit log)
+
+# 2.0.0
+
+* re-sync with RSVP. Many large performance improvements and bugfixes.
+
+# 1.0.0
+
+* first subset of RSVP
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/LICENSE
new file mode 100644
index 0000000..954ec59
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/README.md
new file mode 100644
index 0000000..16739ca
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/README.md
@@ -0,0 +1,74 @@
+# ES6-Promise (subset of [rsvp.js](https://github.com/tildeio/rsvp.js))
+
+This is a polyfill of the [ES6 Promise](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-constructor). The implementation is a subset of [rsvp.js](https://github.com/tildeio/rsvp.js) extracted by @jakearchibald, if you're wanting extra features and more debugging options, check out the [full library](https://github.com/tildeio/rsvp.js).
+
+For API details and how to use promises, see the <a href="http://www.html5rocks.com/en/tutorials/es6/promises/">JavaScript Promises HTML5Rocks article</a>.
+
+## Downloads
+
+* [es6-promise](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.js)
+* [es6-promise-min](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.min.js)
+
+## Node.js
+
+To install:
+
+```sh
+npm install es6-promise
+```
+
+To use:
+
+```js
+var Promise = require('es6-promise').Promise;
+```
+
+## Bower
+
+To install:
+
+```sh
+bower install es6-promise --save
+```
+
+
+## Usage in IE<9
+
+`catch` is a reserved word in IE<9, meaning `promise.catch(func)` throws a syntax error. To work around this, you can use a string to access the property as shown in the following example.
+
+However, please remember that such technique is already provided by most common minifiers, making the resulting code safe for old browsers and production:
+
+```js
+promise['catch'](function(err) {
+ // ...
+});
+```
+
+Or use `.then` instead:
+
+```js
+promise.then(undefined, function(err) {
+ // ...
+});
+```
+
+## Auto-polyfill
+
+To polyfill the global environment (either in Node or in the browser via CommonJS) use the following code snippet:
+
+```js
+require('es6-promise').polyfill();
+```
+
+Notice that we don't assign the result of `polyfill()` to any variable. The `polyfill()` method will patch the global environment (in this case to the `Promise` name) when called.
+
+## Building & Testing
+
+You will need to have PhantomJS installed globally in order to run the tests.
+
+`npm install -g phantomjs`
+
+* `npm run build` to build
+* `npm test` to run tests
+* `npm start` to run a build watcher, and webserver to test
+* `npm run test:server` for a testem test runner and watching builder
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/dist/es6-promise.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/dist/es6-promise.js
new file mode 100644
index 0000000..0755e9b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/dist/es6-promise.js
@@ -0,0 +1,959 @@
+/*!
+ * @overview es6-promise - a tiny implementation of Promises/A+.
+ * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
+ * @license Licensed under MIT license
+ * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
+ * @version 3.2.1
+ */
+
+(function() {
+ "use strict";
+ function lib$es6$promise$utils$$objectOrFunction(x) {
+ return typeof x === 'function' || (typeof x === 'object' && x !== null);
+ }
+
+ function lib$es6$promise$utils$$isFunction(x) {
+ return typeof x === 'function';
+ }
+
+ function lib$es6$promise$utils$$isMaybeThenable(x) {
+ return typeof x === 'object' && x !== null;
+ }
+
+ var lib$es6$promise$utils$$_isArray;
+ if (!Array.isArray) {
+ lib$es6$promise$utils$$_isArray = function (x) {
+ return Object.prototype.toString.call(x) === '[object Array]';
+ };
+ } else {
+ lib$es6$promise$utils$$_isArray = Array.isArray;
+ }
+
+ var lib$es6$promise$utils$$isArray = lib$es6$promise$utils$$_isArray;
+ var lib$es6$promise$asap$$len = 0;
+ var lib$es6$promise$asap$$vertxNext;
+ var lib$es6$promise$asap$$customSchedulerFn;
+
+ var lib$es6$promise$asap$$asap = function asap(callback, arg) {
+ lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len] = callback;
+ lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len + 1] = arg;
+ lib$es6$promise$asap$$len += 2;
+ if (lib$es6$promise$asap$$len === 2) {
+ // If len is 2, that means that we need to schedule an async flush.
+ // If additional callbacks are queued before the queue is flushed, they
+ // will be processed by this flush that we are scheduling.
+ if (lib$es6$promise$asap$$customSchedulerFn) {
+ lib$es6$promise$asap$$customSchedulerFn(lib$es6$promise$asap$$flush);
+ } else {
+ lib$es6$promise$asap$$scheduleFlush();
+ }
+ }
+ }
+
+ function lib$es6$promise$asap$$setScheduler(scheduleFn) {
+ lib$es6$promise$asap$$customSchedulerFn = scheduleFn;
+ }
+
+ function lib$es6$promise$asap$$setAsap(asapFn) {
+ lib$es6$promise$asap$$asap = asapFn;
+ }
+
+ var lib$es6$promise$asap$$browserWindow = (typeof window !== 'undefined') ? window : undefined;
+ var lib$es6$promise$asap$$browserGlobal = lib$es6$promise$asap$$browserWindow || {};
+ var lib$es6$promise$asap$$BrowserMutationObserver = lib$es6$promise$asap$$browserGlobal.MutationObserver || lib$es6$promise$asap$$browserGlobal.WebKitMutationObserver;
+ var lib$es6$promise$asap$$isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
+
+ // test for web worker but not in IE10
+ var lib$es6$promise$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' &&
+ typeof importScripts !== 'undefined' &&
+ typeof MessageChannel !== 'undefined';
+
+ // node
+ function lib$es6$promise$asap$$useNextTick() {
+ // node version 0.10.x displays a deprecation warning when nextTick is used recursively
+ // see https://github.com/cujojs/when/issues/410 for details
+ return function() {
+ process.nextTick(lib$es6$promise$asap$$flush);
+ };
+ }
+
+ // vertx
+ function lib$es6$promise$asap$$useVertxTimer() {
+ return function() {
+ lib$es6$promise$asap$$vertxNext(lib$es6$promise$asap$$flush);
+ };
+ }
+
+ function lib$es6$promise$asap$$useMutationObserver() {
+ var iterations = 0;
+ var observer = new lib$es6$promise$asap$$BrowserMutationObserver(lib$es6$promise$asap$$flush);
+ var node = document.createTextNode('');
+ observer.observe(node, { characterData: true });
+
+ return function() {
+ node.data = (iterations = ++iterations % 2);
+ };
+ }
+
+ // web worker
+ function lib$es6$promise$asap$$useMessageChannel() {
+ var channel = new MessageChannel();
+ channel.port1.onmessage = lib$es6$promise$asap$$flush;
+ return function () {
+ channel.port2.postMessage(0);
+ };
+ }
+
+ function lib$es6$promise$asap$$useSetTimeout() {
+ return function() {
+ setTimeout(lib$es6$promise$asap$$flush, 1);
+ };
+ }
+
+ var lib$es6$promise$asap$$queue = new Array(1000);
+ function lib$es6$promise$asap$$flush() {
+ for (var i = 0; i < lib$es6$promise$asap$$len; i+=2) {
+ var callback = lib$es6$promise$asap$$queue[i];
+ var arg = lib$es6$promise$asap$$queue[i+1];
+
+ callback(arg);
+
+ lib$es6$promise$asap$$queue[i] = undefined;
+ lib$es6$promise$asap$$queue[i+1] = undefined;
+ }
+
+ lib$es6$promise$asap$$len = 0;
+ }
+
+ function lib$es6$promise$asap$$attemptVertx() {
+ try {
+ var r = require;
+ var vertx = r('vertx');
+ lib$es6$promise$asap$$vertxNext = vertx.runOnLoop || vertx.runOnContext;
+ return lib$es6$promise$asap$$useVertxTimer();
+ } catch(e) {
+ return lib$es6$promise$asap$$useSetTimeout();
+ }
+ }
+
+ var lib$es6$promise$asap$$scheduleFlush;
+ // Decide what async method to use to triggering processing of queued callbacks:
+ if (lib$es6$promise$asap$$isNode) {
+ lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useNextTick();
+ } else if (lib$es6$promise$asap$$BrowserMutationObserver) {
+ lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useMutationObserver();
+ } else if (lib$es6$promise$asap$$isWorker) {
+ lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useMessageChannel();
+ } else if (lib$es6$promise$asap$$browserWindow === undefined && typeof require === 'function') {
+ lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$attemptVertx();
+ } else {
+ lib$es6$promise$asap$$scheduleFlush = lib$es6$promise$asap$$useSetTimeout();
+ }
+ function lib$es6$promise$then$$then(onFulfillment, onRejection) {
+ var parent = this;
+
+ var child = new this.constructor(lib$es6$promise$$internal$$noop);
+
+ if (child[lib$es6$promise$$internal$$PROMISE_ID] === undefined) {
+ lib$es6$promise$$internal$$makePromise(child);
+ }
+
+ var state = parent._state;
+
+ if (state) {
+ var callback = arguments[state - 1];
+ lib$es6$promise$asap$$asap(function(){
+ lib$es6$promise$$internal$$invokeCallback(state, child, callback, parent._result);
+ });
+ } else {
+ lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection);
+ }
+
+ return child;
+ }
+ var lib$es6$promise$then$$default = lib$es6$promise$then$$then;
+ function lib$es6$promise$promise$resolve$$resolve(object) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (object && typeof object === 'object' && object.constructor === Constructor) {
+ return object;
+ }
+
+ var promise = new Constructor(lib$es6$promise$$internal$$noop);
+ lib$es6$promise$$internal$$resolve(promise, object);
+ return promise;
+ }
+ var lib$es6$promise$promise$resolve$$default = lib$es6$promise$promise$resolve$$resolve;
+ var lib$es6$promise$$internal$$PROMISE_ID = Math.random().toString(36).substring(16);
+
+ function lib$es6$promise$$internal$$noop() {}
+
+ var lib$es6$promise$$internal$$PENDING = void 0;
+ var lib$es6$promise$$internal$$FULFILLED = 1;
+ var lib$es6$promise$$internal$$REJECTED = 2;
+
+ var lib$es6$promise$$internal$$GET_THEN_ERROR = new lib$es6$promise$$internal$$ErrorObject();
+
+ function lib$es6$promise$$internal$$selfFulfillment() {
+ return new TypeError("You cannot resolve a promise with itself");
+ }
+
+ function lib$es6$promise$$internal$$cannotReturnOwn() {
+ return new TypeError('A promises callback cannot return that same promise.');
+ }
+
+ function lib$es6$promise$$internal$$getThen(promise) {
+ try {
+ return promise.then;
+ } catch(error) {
+ lib$es6$promise$$internal$$GET_THEN_ERROR.error = error;
+ return lib$es6$promise$$internal$$GET_THEN_ERROR;
+ }
+ }
+
+ function lib$es6$promise$$internal$$tryThen(then, value, fulfillmentHandler, rejectionHandler) {
+ try {
+ then.call(value, fulfillmentHandler, rejectionHandler);
+ } catch(e) {
+ return e;
+ }
+ }
+
+ function lib$es6$promise$$internal$$handleForeignThenable(promise, thenable, then) {
+ lib$es6$promise$asap$$asap(function(promise) {
+ var sealed = false;
+ var error = lib$es6$promise$$internal$$tryThen(then, thenable, function(value) {
+ if (sealed) { return; }
+ sealed = true;
+ if (thenable !== value) {
+ lib$es6$promise$$internal$$resolve(promise, value);
+ } else {
+ lib$es6$promise$$internal$$fulfill(promise, value);
+ }
+ }, function(reason) {
+ if (sealed) { return; }
+ sealed = true;
+
+ lib$es6$promise$$internal$$reject(promise, reason);
+ }, 'Settle: ' + (promise._label || ' unknown promise'));
+
+ if (!sealed && error) {
+ sealed = true;
+ lib$es6$promise$$internal$$reject(promise, error);
+ }
+ }, promise);
+ }
+
+ function lib$es6$promise$$internal$$handleOwnThenable(promise, thenable) {
+ if (thenable._state === lib$es6$promise$$internal$$FULFILLED) {
+ lib$es6$promise$$internal$$fulfill(promise, thenable._result);
+ } else if (thenable._state === lib$es6$promise$$internal$$REJECTED) {
+ lib$es6$promise$$internal$$reject(promise, thenable._result);
+ } else {
+ lib$es6$promise$$internal$$subscribe(thenable, undefined, function(value) {
+ lib$es6$promise$$internal$$resolve(promise, value);
+ }, function(reason) {
+ lib$es6$promise$$internal$$reject(promise, reason);
+ });
+ }
+ }
+
+ function lib$es6$promise$$internal$$handleMaybeThenable(promise, maybeThenable, then) {
+ if (maybeThenable.constructor === promise.constructor &&
+ then === lib$es6$promise$then$$default &&
+ constructor.resolve === lib$es6$promise$promise$resolve$$default) {
+ lib$es6$promise$$internal$$handleOwnThenable(promise, maybeThenable);
+ } else {
+ if (then === lib$es6$promise$$internal$$GET_THEN_ERROR) {
+ lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$GET_THEN_ERROR.error);
+ } else if (then === undefined) {
+ lib$es6$promise$$internal$$fulfill(promise, maybeThenable);
+ } else if (lib$es6$promise$utils$$isFunction(then)) {
+ lib$es6$promise$$internal$$handleForeignThenable(promise, maybeThenable, then);
+ } else {
+ lib$es6$promise$$internal$$fulfill(promise, maybeThenable);
+ }
+ }
+ }
+
+ function lib$es6$promise$$internal$$resolve(promise, value) {
+ if (promise === value) {
+ lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$selfFulfillment());
+ } else if (lib$es6$promise$utils$$objectOrFunction(value)) {
+ lib$es6$promise$$internal$$handleMaybeThenable(promise, value, lib$es6$promise$$internal$$getThen(value));
+ } else {
+ lib$es6$promise$$internal$$fulfill(promise, value);
+ }
+ }
+
+ function lib$es6$promise$$internal$$publishRejection(promise) {
+ if (promise._onerror) {
+ promise._onerror(promise._result);
+ }
+
+ lib$es6$promise$$internal$$publish(promise);
+ }
+
+ function lib$es6$promise$$internal$$fulfill(promise, value) {
+ if (promise._state !== lib$es6$promise$$internal$$PENDING) { return; }
+
+ promise._result = value;
+ promise._state = lib$es6$promise$$internal$$FULFILLED;
+
+ if (promise._subscribers.length !== 0) {
+ lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, promise);
+ }
+ }
+
+ function lib$es6$promise$$internal$$reject(promise, reason) {
+ if (promise._state !== lib$es6$promise$$internal$$PENDING) { return; }
+ promise._state = lib$es6$promise$$internal$$REJECTED;
+ promise._result = reason;
+
+ lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publishRejection, promise);
+ }
+
+ function lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection) {
+ var subscribers = parent._subscribers;
+ var length = subscribers.length;
+
+ parent._onerror = null;
+
+ subscribers[length] = child;
+ subscribers[length + lib$es6$promise$$internal$$FULFILLED] = onFulfillment;
+ subscribers[length + lib$es6$promise$$internal$$REJECTED] = onRejection;
+
+ if (length === 0 && parent._state) {
+ lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, parent);
+ }
+ }
+
+ function lib$es6$promise$$internal$$publish(promise) {
+ var subscribers = promise._subscribers;
+ var settled = promise._state;
+
+ if (subscribers.length === 0) { return; }
+
+ var child, callback, detail = promise._result;
+
+ for (var i = 0; i < subscribers.length; i += 3) {
+ child = subscribers[i];
+ callback = subscribers[i + settled];
+
+ if (child) {
+ lib$es6$promise$$internal$$invokeCallback(settled, child, callback, detail);
+ } else {
+ callback(detail);
+ }
+ }
+
+ promise._subscribers.length = 0;
+ }
+
+ function lib$es6$promise$$internal$$ErrorObject() {
+ this.error = null;
+ }
+
+ var lib$es6$promise$$internal$$TRY_CATCH_ERROR = new lib$es6$promise$$internal$$ErrorObject();
+
+ function lib$es6$promise$$internal$$tryCatch(callback, detail) {
+ try {
+ return callback(detail);
+ } catch(e) {
+ lib$es6$promise$$internal$$TRY_CATCH_ERROR.error = e;
+ return lib$es6$promise$$internal$$TRY_CATCH_ERROR;
+ }
+ }
+
+ function lib$es6$promise$$internal$$invokeCallback(settled, promise, callback, detail) {
+ var hasCallback = lib$es6$promise$utils$$isFunction(callback),
+ value, error, succeeded, failed;
+
+ if (hasCallback) {
+ value = lib$es6$promise$$internal$$tryCatch(callback, detail);
+
+ if (value === lib$es6$promise$$internal$$TRY_CATCH_ERROR) {
+ failed = true;
+ error = value.error;
+ value = null;
+ } else {
+ succeeded = true;
+ }
+
+ if (promise === value) {
+ lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$cannotReturnOwn());
+ return;
+ }
+
+ } else {
+ value = detail;
+ succeeded = true;
+ }
+
+ if (promise._state !== lib$es6$promise$$internal$$PENDING) {
+ // noop
+ } else if (hasCallback && succeeded) {
+ lib$es6$promise$$internal$$resolve(promise, value);
+ } else if (failed) {
+ lib$es6$promise$$internal$$reject(promise, error);
+ } else if (settled === lib$es6$promise$$internal$$FULFILLED) {
+ lib$es6$promise$$internal$$fulfill(promise, value);
+ } else if (settled === lib$es6$promise$$internal$$REJECTED) {
+ lib$es6$promise$$internal$$reject(promise, value);
+ }
+ }
+
+ function lib$es6$promise$$internal$$initializePromise(promise, resolver) {
+ try {
+ resolver(function resolvePromise(value){
+ lib$es6$promise$$internal$$resolve(promise, value);
+ }, function rejectPromise(reason) {
+ lib$es6$promise$$internal$$reject(promise, reason);
+ });
+ } catch(e) {
+ lib$es6$promise$$internal$$reject(promise, e);
+ }
+ }
+
+ var lib$es6$promise$$internal$$id = 0;
+ function lib$es6$promise$$internal$$nextId() {
+ return lib$es6$promise$$internal$$id++;
+ }
+
+ function lib$es6$promise$$internal$$makePromise(promise) {
+ promise[lib$es6$promise$$internal$$PROMISE_ID] = lib$es6$promise$$internal$$id++;
+ promise._state = undefined;
+ promise._result = undefined;
+ promise._subscribers = [];
+ }
+
+ function lib$es6$promise$promise$all$$all(entries) {
+ return new lib$es6$promise$enumerator$$default(this, entries).promise;
+ }
+ var lib$es6$promise$promise$all$$default = lib$es6$promise$promise$all$$all;
+ function lib$es6$promise$promise$race$$race(entries) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (!lib$es6$promise$utils$$isArray(entries)) {
+ return new Constructor(function(resolve, reject) {
+ reject(new TypeError('You must pass an array to race.'));
+ });
+ } else {
+ return new Constructor(function(resolve, reject) {
+ var length = entries.length;
+ for (var i = 0; i < length; i++) {
+ Constructor.resolve(entries[i]).then(resolve, reject);
+ }
+ });
+ }
+ }
+ var lib$es6$promise$promise$race$$default = lib$es6$promise$promise$race$$race;
+ function lib$es6$promise$promise$reject$$reject(reason) {
+ /*jshint validthis:true */
+ var Constructor = this;
+ var promise = new Constructor(lib$es6$promise$$internal$$noop);
+ lib$es6$promise$$internal$$reject(promise, reason);
+ return promise;
+ }
+ var lib$es6$promise$promise$reject$$default = lib$es6$promise$promise$reject$$reject;
+
+
+ function lib$es6$promise$promise$$needsResolver() {
+ throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
+ }
+
+ function lib$es6$promise$promise$$needsNew() {
+ throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
+ }
+
+ var lib$es6$promise$promise$$default = lib$es6$promise$promise$$Promise;
+ /**
+ Promise objects represent the eventual result of an asynchronous operation. The
+ primary way of interacting with a promise is through its `then` method, which
+ registers callbacks to receive either a promise's eventual value or the reason
+ why the promise cannot be fulfilled.
+
+ Terminology
+ -----------
+
+ - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
+ - `thenable` is an object or function that defines a `then` method.
+ - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
+ - `exception` is a value that is thrown using the throw statement.
+ - `reason` is a value that indicates why a promise was rejected.
+ - `settled` the final resting state of a promise, fulfilled or rejected.
+
+ A promise can be in one of three states: pending, fulfilled, or rejected.
+
+ Promises that are fulfilled have a fulfillment value and are in the fulfilled
+ state. Promises that are rejected have a rejection reason and are in the
+ rejected state. A fulfillment value is never a thenable.
+
+ Promises can also be said to *resolve* a value. If this value is also a
+ promise, then the original promise's settled state will match the value's
+ settled state. So a promise that *resolves* a promise that rejects will
+ itself reject, and a promise that *resolves* a promise that fulfills will
+ itself fulfill.
+
+
+ Basic Usage:
+ ------------
+
+ ```js
+ var promise = new Promise(function(resolve, reject) {
+ // on success
+ resolve(value);
+
+ // on failure
+ reject(reason);
+ });
+
+ promise.then(function(value) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Advanced Usage:
+ ---------------
+
+ Promises shine when abstracting away asynchronous interactions such as
+ `XMLHttpRequest`s.
+
+ ```js
+ function getJSON(url) {
+ return new Promise(function(resolve, reject){
+ var xhr = new XMLHttpRequest();
+
+ xhr.open('GET', url);
+ xhr.onreadystatechange = handler;
+ xhr.responseType = 'json';
+ xhr.setRequestHeader('Accept', 'application/json');
+ xhr.send();
+
+ function handler() {
+ if (this.readyState === this.DONE) {
+ if (this.status === 200) {
+ resolve(this.response);
+ } else {
+ reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
+ }
+ }
+ };
+ });
+ }
+
+ getJSON('/posts.json').then(function(json) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Unlike callbacks, promises are great composable primitives.
+
+ ```js
+ Promise.all([
+ getJSON('/posts'),
+ getJSON('/comments')
+ ]).then(function(values){
+ values[0] // => postsJSON
+ values[1] // => commentsJSON
+
+ return values;
+ });
+ ```
+
+ @class Promise
+ @param {function} resolver
+ Useful for tooling.
+ @constructor
+ */
+ function lib$es6$promise$promise$$Promise(resolver) {
+ this[lib$es6$promise$$internal$$PROMISE_ID] = lib$es6$promise$$internal$$nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
+
+ if (lib$es6$promise$$internal$$noop !== resolver) {
+ typeof resolver !== 'function' && lib$es6$promise$promise$$needsResolver();
+ this instanceof lib$es6$promise$promise$$Promise ? lib$es6$promise$$internal$$initializePromise(this, resolver) : lib$es6$promise$promise$$needsNew();
+ }
+ }
+
+ lib$es6$promise$promise$$Promise.all = lib$es6$promise$promise$all$$default;
+ lib$es6$promise$promise$$Promise.race = lib$es6$promise$promise$race$$default;
+ lib$es6$promise$promise$$Promise.resolve = lib$es6$promise$promise$resolve$$default;
+ lib$es6$promise$promise$$Promise.reject = lib$es6$promise$promise$reject$$default;
+ lib$es6$promise$promise$$Promise._setScheduler = lib$es6$promise$asap$$setScheduler;
+ lib$es6$promise$promise$$Promise._setAsap = lib$es6$promise$asap$$setAsap;
+ lib$es6$promise$promise$$Promise._asap = lib$es6$promise$asap$$asap;
+
+ lib$es6$promise$promise$$Promise.prototype = {
+ constructor: lib$es6$promise$promise$$Promise,
+
+ /**
+ The primary way of interacting with a promise is through its `then` method,
+ which registers callbacks to receive either a promise's eventual value or the
+ reason why the promise cannot be fulfilled.
+
+ ```js
+ findUser().then(function(user){
+ // user is available
+ }, function(reason){
+ // user is unavailable, and you are given the reason why
+ });
+ ```
+
+ Chaining
+ --------
+
+ The return value of `then` is itself a promise. This second, 'downstream'
+ promise is resolved with the return value of the first promise's fulfillment
+ or rejection handler, or rejected if the handler throws an exception.
+
+ ```js
+ findUser().then(function (user) {
+ return user.name;
+ }, function (reason) {
+ return 'default name';
+ }).then(function (userName) {
+ // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
+ // will be `'default name'`
+ });
+
+ findUser().then(function (user) {
+ throw new Error('Found user, but still unhappy');
+ }, function (reason) {
+ throw new Error('`findUser` rejected and we're unhappy');
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
+ // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
+ });
+ ```
+ If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
+
+ ```js
+ findUser().then(function (user) {
+ throw new PedagogicalException('Upstream error');
+ }).then(function (value) {
+ // never reached
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // The `PedgagocialException` is propagated all the way down to here
+ });
+ ```
+
+ Assimilation
+ ------------
+
+ Sometimes the value you want to propagate to a downstream promise can only be
+ retrieved asynchronously. This can be achieved by returning a promise in the
+ fulfillment or rejection handler. The downstream promise will then be pending
+ until the returned promise is settled. This is called *assimilation*.
+
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // The user's comments are now available
+ });
+ ```
+
+ If the assimliated promise rejects, then the downstream promise will also reject.
+
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // If `findCommentsByAuthor` fulfills, we'll have the value here
+ }, function (reason) {
+ // If `findCommentsByAuthor` rejects, we'll have the reason here
+ });
+ ```
+
+ Simple Example
+ --------------
+
+ Synchronous Example
+
+ ```javascript
+ var result;
+
+ try {
+ result = findResult();
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+
+ Errback Example
+
+ ```js
+ findResult(function(result, err){
+ if (err) {
+ // failure
+ } else {
+ // success
+ }
+ });
+ ```
+
+ Promise Example;
+
+ ```javascript
+ findResult().then(function(result){
+ // success
+ }, function(reason){
+ // failure
+ });
+ ```
+
+ Advanced Example
+ --------------
+
+ Synchronous Example
+
+ ```javascript
+ var author, books;
+
+ try {
+ author = findAuthor();
+ books = findBooksByAuthor(author);
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+
+ Errback Example
+
+ ```js
+
+ function foundBooks(books) {
+
+ }
+
+ function failure(reason) {
+
+ }
+
+ findAuthor(function(author, err){
+ if (err) {
+ failure(err);
+ // failure
+ } else {
+ try {
+ findBoooksByAuthor(author, function(books, err) {
+ if (err) {
+ failure(err);
+ } else {
+ try {
+ foundBooks(books);
+ } catch(reason) {
+ failure(reason);
+ }
+ }
+ });
+ } catch(error) {
+ failure(err);
+ }
+ // success
+ }
+ });
+ ```
+
+ Promise Example;
+
+ ```javascript
+ findAuthor().
+ then(findBooksByAuthor).
+ then(function(books){
+ // found books
+ }).catch(function(reason){
+ // something went wrong
+ });
+ ```
+
+ @method then
+ @param {Function} onFulfilled
+ @param {Function} onRejected
+ Useful for tooling.
+ @return {Promise}
+ */
+ then: lib$es6$promise$then$$default,
+
+ /**
+ `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
+ as the catch block of a try/catch statement.
+
+ ```js
+ function findAuthor(){
+ throw new Error('couldn't find that author');
+ }
+
+ // synchronous
+ try {
+ findAuthor();
+ } catch(reason) {
+ // something went wrong
+ }
+
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
+ 'catch': function(onRejection) {
+ return this.then(null, onRejection);
+ }
+ };
+ var lib$es6$promise$enumerator$$default = lib$es6$promise$enumerator$$Enumerator;
+ function lib$es6$promise$enumerator$$Enumerator(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(lib$es6$promise$$internal$$noop);
+
+ if (!this.promise[lib$es6$promise$$internal$$PROMISE_ID]) {
+ lib$es6$promise$$internal$$makePromise(this.promise);
+ }
+
+ if (lib$es6$promise$utils$$isArray(input)) {
+ this._input = input;
+ this.length = input.length;
+ this._remaining = input.length;
+
+ this._result = new Array(this.length);
+
+ if (this.length === 0) {
+ lib$es6$promise$$internal$$fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate();
+ if (this._remaining === 0) {
+ lib$es6$promise$$internal$$fulfill(this.promise, this._result);
+ }
+ }
+ } else {
+ lib$es6$promise$$internal$$reject(this.promise, lib$es6$promise$enumerator$$validationError());
+ }
+ }
+
+ function lib$es6$promise$enumerator$$validationError() {
+ return new Error('Array Methods must be provided an Array');
+ }
+
+ lib$es6$promise$enumerator$$Enumerator.prototype._enumerate = function() {
+ var length = this.length;
+ var input = this._input;
+
+ for (var i = 0; this._state === lib$es6$promise$$internal$$PENDING && i < length; i++) {
+ this._eachEntry(input[i], i);
+ }
+ };
+
+ lib$es6$promise$enumerator$$Enumerator.prototype._eachEntry = function(entry, i) {
+ var c = this._instanceConstructor;
+ var resolve = c.resolve;
+
+ if (resolve === lib$es6$promise$promise$resolve$$default) {
+ var then = lib$es6$promise$$internal$$getThen(entry);
+
+ if (then === lib$es6$promise$then$$default &&
+ entry._state !== lib$es6$promise$$internal$$PENDING) {
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === lib$es6$promise$promise$$default) {
+ var promise = new c(lib$es6$promise$$internal$$noop);
+ lib$es6$promise$$internal$$handleMaybeThenable(promise, entry, then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(function(resolve) { resolve(entry); }), i);
+ }
+ } else {
+ this._willSettleAt(resolve(entry), i);
+ }
+ };
+
+ lib$es6$promise$enumerator$$Enumerator.prototype._settledAt = function(state, i, value) {
+ var promise = this.promise;
+
+ if (promise._state === lib$es6$promise$$internal$$PENDING) {
+ this._remaining--;
+
+ if (state === lib$es6$promise$$internal$$REJECTED) {
+ lib$es6$promise$$internal$$reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
+ }
+
+ if (this._remaining === 0) {
+ lib$es6$promise$$internal$$fulfill(promise, this._result);
+ }
+ };
+
+ lib$es6$promise$enumerator$$Enumerator.prototype._willSettleAt = function(promise, i) {
+ var enumerator = this;
+
+ lib$es6$promise$$internal$$subscribe(promise, undefined, function(value) {
+ enumerator._settledAt(lib$es6$promise$$internal$$FULFILLED, i, value);
+ }, function(reason) {
+ enumerator._settledAt(lib$es6$promise$$internal$$REJECTED, i, reason);
+ });
+ };
+ function lib$es6$promise$polyfill$$polyfill() {
+ var local;
+
+ if (typeof global !== 'undefined') {
+ local = global;
+ } else if (typeof self !== 'undefined') {
+ local = self;
+ } else {
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
+ }
+ }
+
+ var P = local.Promise;
+
+ if (P && Object.prototype.toString.call(P.resolve()) === '[object Promise]' && !P.cast) {
+ return;
+ }
+
+ local.Promise = lib$es6$promise$promise$$default;
+ }
+ var lib$es6$promise$polyfill$$default = lib$es6$promise$polyfill$$polyfill;
+
+ var lib$es6$promise$umd$$ES6Promise = {
+ 'Promise': lib$es6$promise$promise$$default,
+ 'polyfill': lib$es6$promise$polyfill$$default
+ };
+
+ /* global define:true module:true window: true */
+ if (typeof define === 'function' && define['amd']) {
+ define(function() { return lib$es6$promise$umd$$ES6Promise; });
+ } else if (typeof module !== 'undefined' && module['exports']) {
+ module['exports'] = lib$es6$promise$umd$$ES6Promise;
+ } else if (typeof this !== 'undefined') {
+ this['ES6Promise'] = lib$es6$promise$umd$$ES6Promise;
+ }
+
+ lib$es6$promise$polyfill$$default();
+}).call(this);
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/dist/es6-promise.min.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/dist/es6-promise.min.js
new file mode 100644
index 0000000..13151c2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/dist/es6-promise.min.js
@@ -0,0 +1,9 @@
+/*!
+ * @overview es6-promise - a tiny implementation of Promises/A+.
+ * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
+ * @license Licensed under MIT license
+ * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
+ * @version 3.2.1
+ */
+
+(function(){"use strict";function t(t){return"function"==typeof t||"object"==typeof t&&null!==t}function e(t){return"function"==typeof t}function n(t){G=t}function r(t){Q=t}function o(){return function(){process.nextTick(a)}}function i(){return function(){B(a)}}function s(){var t=0,e=new X(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){t.port2.postMessage(0)}}function c(){return function(){setTimeout(a,1)}}function a(){for(var t=0;J>t;t+=2){var e=tt[t],n=tt[t+1];e(n),tt[t]=void 0,tt[t+1]=void 0}J=0}function f(){try{var t=require,e=t("vertx");return B=e.runOnLoop||e.runOnContext,i()}catch(n){return c()}}function l(t,e){var n=this,r=new this.constructor(p);void 0===r[rt]&&k(r);var o=n._state;if(o){var i=arguments[o-1];Q(function(){x(o,r,i,n._result)})}else E(n,r,t,e);return r}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function _(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function v(t){try{return t.then}catch(e){return ut.error=e,ut}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){Q(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===it?S(t,e._result):e._state===st?j(t,e._result):E(e,void 0,function(e){g(t,e)},function(e){j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===et&&constructor.resolve===nt?b(t,n):r===ut?j(t,ut.error):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,_()):t(n)?w(e,n,v(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===ot&&(t._result=e,t._state=it,0!==t._subscribers.length&&Q(T,t))}function j(t,e){t._state===ot&&(t._state=st,t._result=e,Q(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+it]=n,o[i+st]=r,0===i&&t._state&&Q(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r,o,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?x(n,r,o,i):o(i);t._subscribers.length=0}}function M(){this.error=null}function P(t,e){try{return t(e)}catch(n){return ct.error=n,ct}}function x(t,n,r,o){var i,s,u,c,a=e(r);if(a){if(i=P(r,o),i===ct?(c=!0,s=i.error,i=null):u=!0,n===i)return void j(n,d())}else i=o,u=!0;n._state!==ot||(a&&u?g(n,i):c?j(n,s):t===it?S(n,i):t===st&&j(n,i))}function C(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function O(){return at++}function k(t){t[rt]=at++,t._state=void 0,t._result=void 0,t._subscribers=[]}function Y(t){return new _t(this,t).promise}function q(t){var e=this;return new e(I(t)?function(n,r){for(var o=t.length,i=0;o>i;i++)e.resolve(t[i]).then(n,r)}:function(t,e){e(new TypeError("You must pass an array to race."))})}function F(t){var e=this,n=new e(p);return j(n,t),n}function D(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function K(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function L(t){this[rt]=O(),this._result=this._state=void 0,this._subscribers=[],p!==t&&("function"!=typeof t&&D(),this instanceof L?C(this,t):K())}function N(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[rt]||k(this.promise),I(e)?(this._input=e,this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&S(this.promise,this._result))):j(this.promise,U())}function U(){return new Error("Array Methods must be provided an Array")}function W(){var t;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;(!n||"[object Promise]"!==Object.prototype.toString.call(n.resolve())||n.cast)&&(t.Promise=pt)}var z;z=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var B,G,H,I=z,J=0,Q=function(t,e){tt[J]=t,tt[J+1]=e,J+=2,2===J&&(G?G(a):H())},R="undefined"!=typeof window?window:void 0,V=R||{},X=V.MutationObserver||V.WebKitMutationObserver,Z="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),$="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,tt=new Array(1e3);H=Z?o():X?s():$?u():void 0===R&&"function"==typeof require?f():c();var et=l,nt=h,rt=Math.random().toString(36).substring(16),ot=void 0,it=1,st=2,ut=new M,ct=new M,at=0,ft=Y,lt=q,ht=F,pt=L;L.all=ft,L.race=lt,L.resolve=nt,L.reject=ht,L._setScheduler=n,L._setAsap=r,L._asap=Q,L.prototype={constructor:L,then:et,"catch":function(t){return this.then(null,t)}};var _t=N;N.prototype._enumerate=function(){for(var t=this.length,e=this._input,n=0;this._state===ot&&t>n;n++)this._eachEntry(e[n],n)},N.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===nt){var o=v(t);if(o===et&&t._state!==ot)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===pt){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){e(t)}),e)}else this._willSettleAt(r(t),e)},N.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===ot&&(this._remaining--,t===st?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},N.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){n._settledAt(it,e,t)},function(t){n._settledAt(st,e,t)})};var dt=W,vt={Promise:pt,polyfill:dt};"function"==typeof define&&define.amd?define(function(){return vt}):"undefined"!=typeof module&&module.exports?module.exports=vt:"undefined"!=typeof this&&(this.ES6Promise=vt),dt()}).call(this); \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise.umd.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise.umd.js
new file mode 100644
index 0000000..5984f70
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise.umd.js
@@ -0,0 +1,18 @@
+import Promise from './es6-promise/promise';
+import polyfill from './es6-promise/polyfill';
+
+var ES6Promise = {
+ 'Promise': Promise,
+ 'polyfill': polyfill
+};
+
+/* global define:true module:true window: true */
+if (typeof define === 'function' && define['amd']) {
+ define(function() { return ES6Promise; });
+} else if (typeof module !== 'undefined' && module['exports']) {
+ module['exports'] = ES6Promise;
+} else if (typeof this !== 'undefined') {
+ this['ES6Promise'] = ES6Promise;
+}
+
+polyfill();
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/-internal.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/-internal.js
new file mode 100644
index 0000000..aeebf57
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/-internal.js
@@ -0,0 +1,273 @@
+import {
+ objectOrFunction,
+ isFunction
+} from './utils';
+
+import {
+ asap
+} from './asap';
+
+import originalThen from './then';
+import originalResolve from './promise/resolve';
+
+export var PROMISE_ID = Math.random().toString(36).substring(16);
+
+function noop() {}
+
+var PENDING = void 0;
+var FULFILLED = 1;
+var REJECTED = 2;
+
+var GET_THEN_ERROR = new ErrorObject();
+
+function selfFulfillment() {
+ return new TypeError("You cannot resolve a promise with itself");
+}
+
+function cannotReturnOwn() {
+ return new TypeError('A promises callback cannot return that same promise.');
+}
+
+function getThen(promise) {
+ try {
+ return promise.then;
+ } catch(error) {
+ GET_THEN_ERROR.error = error;
+ return GET_THEN_ERROR;
+ }
+}
+
+function tryThen(then, value, fulfillmentHandler, rejectionHandler) {
+ try {
+ then.call(value, fulfillmentHandler, rejectionHandler);
+ } catch(e) {
+ return e;
+ }
+}
+
+function handleForeignThenable(promise, thenable, then) {
+ asap(function(promise) {
+ var sealed = false;
+ var error = tryThen(then, thenable, function(value) {
+ if (sealed) { return; }
+ sealed = true;
+ if (thenable !== value) {
+ resolve(promise, value);
+ } else {
+ fulfill(promise, value);
+ }
+ }, function(reason) {
+ if (sealed) { return; }
+ sealed = true;
+
+ reject(promise, reason);
+ }, 'Settle: ' + (promise._label || ' unknown promise'));
+
+ if (!sealed && error) {
+ sealed = true;
+ reject(promise, error);
+ }
+ }, promise);
+}
+
+function handleOwnThenable(promise, thenable) {
+ if (thenable._state === FULFILLED) {
+ fulfill(promise, thenable._result);
+ } else if (thenable._state === REJECTED) {
+ reject(promise, thenable._result);
+ } else {
+ subscribe(thenable, undefined, function(value) {
+ resolve(promise, value);
+ }, function(reason) {
+ reject(promise, reason);
+ });
+ }
+}
+
+function handleMaybeThenable(promise, maybeThenable, then) {
+ if (maybeThenable.constructor === promise.constructor &&
+ then === originalThen &&
+ constructor.resolve === originalResolve) {
+ handleOwnThenable(promise, maybeThenable);
+ } else {
+ if (then === GET_THEN_ERROR) {
+ reject(promise, GET_THEN_ERROR.error);
+ } else if (then === undefined) {
+ fulfill(promise, maybeThenable);
+ } else if (isFunction(then)) {
+ handleForeignThenable(promise, maybeThenable, then);
+ } else {
+ fulfill(promise, maybeThenable);
+ }
+ }
+}
+
+function resolve(promise, value) {
+ if (promise === value) {
+ reject(promise, selfFulfillment());
+ } else if (objectOrFunction(value)) {
+ handleMaybeThenable(promise, value, getThen(value));
+ } else {
+ fulfill(promise, value);
+ }
+}
+
+function publishRejection(promise) {
+ if (promise._onerror) {
+ promise._onerror(promise._result);
+ }
+
+ publish(promise);
+}
+
+function fulfill(promise, value) {
+ if (promise._state !== PENDING) { return; }
+
+ promise._result = value;
+ promise._state = FULFILLED;
+
+ if (promise._subscribers.length !== 0) {
+ asap(publish, promise);
+ }
+}
+
+function reject(promise, reason) {
+ if (promise._state !== PENDING) { return; }
+ promise._state = REJECTED;
+ promise._result = reason;
+
+ asap(publishRejection, promise);
+}
+
+function subscribe(parent, child, onFulfillment, onRejection) {
+ var subscribers = parent._subscribers;
+ var length = subscribers.length;
+
+ parent._onerror = null;
+
+ subscribers[length] = child;
+ subscribers[length + FULFILLED] = onFulfillment;
+ subscribers[length + REJECTED] = onRejection;
+
+ if (length === 0 && parent._state) {
+ asap(publish, parent);
+ }
+}
+
+function publish(promise) {
+ var subscribers = promise._subscribers;
+ var settled = promise._state;
+
+ if (subscribers.length === 0) { return; }
+
+ var child, callback, detail = promise._result;
+
+ for (var i = 0; i < subscribers.length; i += 3) {
+ child = subscribers[i];
+ callback = subscribers[i + settled];
+
+ if (child) {
+ invokeCallback(settled, child, callback, detail);
+ } else {
+ callback(detail);
+ }
+ }
+
+ promise._subscribers.length = 0;
+}
+
+function ErrorObject() {
+ this.error = null;
+}
+
+var TRY_CATCH_ERROR = new ErrorObject();
+
+function tryCatch(callback, detail) {
+ try {
+ return callback(detail);
+ } catch(e) {
+ TRY_CATCH_ERROR.error = e;
+ return TRY_CATCH_ERROR;
+ }
+}
+
+function invokeCallback(settled, promise, callback, detail) {
+ var hasCallback = isFunction(callback),
+ value, error, succeeded, failed;
+
+ if (hasCallback) {
+ value = tryCatch(callback, detail);
+
+ if (value === TRY_CATCH_ERROR) {
+ failed = true;
+ error = value.error;
+ value = null;
+ } else {
+ succeeded = true;
+ }
+
+ if (promise === value) {
+ reject(promise, cannotReturnOwn());
+ return;
+ }
+
+ } else {
+ value = detail;
+ succeeded = true;
+ }
+
+ if (promise._state !== PENDING) {
+ // noop
+ } else if (hasCallback && succeeded) {
+ resolve(promise, value);
+ } else if (failed) {
+ reject(promise, error);
+ } else if (settled === FULFILLED) {
+ fulfill(promise, value);
+ } else if (settled === REJECTED) {
+ reject(promise, value);
+ }
+}
+
+function initializePromise(promise, resolver) {
+ try {
+ resolver(function resolvePromise(value){
+ resolve(promise, value);
+ }, function rejectPromise(reason) {
+ reject(promise, reason);
+ });
+ } catch(e) {
+ reject(promise, e);
+ }
+}
+
+var id = 0;
+function nextId() {
+ return id++;
+}
+
+function makePromise(promise) {
+ promise[PROMISE_ID] = id++;
+ promise._state = undefined;
+ promise._result = undefined;
+ promise._subscribers = [];
+}
+
+export {
+ nextId,
+ makePromise,
+ getThen,
+ noop,
+ resolve,
+ reject,
+ fulfill,
+ subscribe,
+ publish,
+ publishRejection,
+ initializePromise,
+ invokeCallback,
+ FULFILLED,
+ REJECTED,
+ PENDING,
+ handleMaybeThenable
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/asap.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/asap.js
new file mode 100644
index 0000000..40f1d25
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/asap.js
@@ -0,0 +1,119 @@
+var len = 0;
+var vertxNext;
+var customSchedulerFn;
+
+export var asap = function asap(callback, arg) {
+ queue[len] = callback;
+ queue[len + 1] = arg;
+ len += 2;
+ if (len === 2) {
+ // If len is 2, that means that we need to schedule an async flush.
+ // If additional callbacks are queued before the queue is flushed, they
+ // will be processed by this flush that we are scheduling.
+ if (customSchedulerFn) {
+ customSchedulerFn(flush);
+ } else {
+ scheduleFlush();
+ }
+ }
+}
+
+export function setScheduler(scheduleFn) {
+ customSchedulerFn = scheduleFn;
+}
+
+export function setAsap(asapFn) {
+ asap = asapFn;
+}
+
+var browserWindow = (typeof window !== 'undefined') ? window : undefined;
+var browserGlobal = browserWindow || {};
+var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
+var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
+
+// test for web worker but not in IE10
+var isWorker = typeof Uint8ClampedArray !== 'undefined' &&
+ typeof importScripts !== 'undefined' &&
+ typeof MessageChannel !== 'undefined';
+
+// node
+function useNextTick() {
+ // node version 0.10.x displays a deprecation warning when nextTick is used recursively
+ // see https://github.com/cujojs/when/issues/410 for details
+ return function() {
+ process.nextTick(flush);
+ };
+}
+
+// vertx
+function useVertxTimer() {
+ return function() {
+ vertxNext(flush);
+ };
+}
+
+function useMutationObserver() {
+ var iterations = 0;
+ var observer = new BrowserMutationObserver(flush);
+ var node = document.createTextNode('');
+ observer.observe(node, { characterData: true });
+
+ return function() {
+ node.data = (iterations = ++iterations % 2);
+ };
+}
+
+// web worker
+function useMessageChannel() {
+ var channel = new MessageChannel();
+ channel.port1.onmessage = flush;
+ return function () {
+ channel.port2.postMessage(0);
+ };
+}
+
+function useSetTimeout() {
+ return function() {
+ setTimeout(flush, 1);
+ };
+}
+
+var queue = new Array(1000);
+function flush() {
+ for (var i = 0; i < len; i+=2) {
+ var callback = queue[i];
+ var arg = queue[i+1];
+
+ callback(arg);
+
+ queue[i] = undefined;
+ queue[i+1] = undefined;
+ }
+
+ len = 0;
+}
+
+function attemptVertx() {
+ try {
+ var r = require;
+ var vertx = r('vertx');
+ vertxNext = vertx.runOnLoop || vertx.runOnContext;
+ return useVertxTimer();
+ } catch(e) {
+ return useSetTimeout();
+ }
+}
+
+var scheduleFlush;
+// Decide what async method to use to triggering processing of queued callbacks:
+if (isNode) {
+ scheduleFlush = useNextTick();
+} else if (BrowserMutationObserver) {
+ scheduleFlush = useMutationObserver();
+} else if (isWorker) {
+ scheduleFlush = useMessageChannel();
+} else if (browserWindow === undefined && typeof require === 'function') {
+ scheduleFlush = attemptVertx();
+} else {
+ scheduleFlush = useSetTimeout();
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/enumerator.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/enumerator.js
new file mode 100644
index 0000000..2a7a28f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/enumerator.js
@@ -0,0 +1,118 @@
+import {
+ isArray,
+ isMaybeThenable
+} from './utils';
+
+import {
+ noop,
+ reject,
+ fulfill,
+ subscribe,
+ FULFILLED,
+ REJECTED,
+ PENDING,
+ getThen,
+ handleMaybeThenable
+} from './-internal';
+
+import then from './then';
+import Promise from './promise';
+import originalResolve from './promise/resolve';
+import originalThen from './then';
+import { makePromise, PROMISE_ID } from './-internal';
+
+export default Enumerator;
+function Enumerator(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
+
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
+
+ if (isArray(input)) {
+ this._input = input;
+ this.length = input.length;
+ this._remaining = input.length;
+
+ this._result = new Array(this.length);
+
+ if (this.length === 0) {
+ fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate();
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
+ }
+ } else {
+ reject(this.promise, validationError());
+ }
+}
+
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+};
+
+Enumerator.prototype._enumerate = function() {
+ var length = this.length;
+ var input = this._input;
+
+ for (var i = 0; this._state === PENDING && i < length; i++) {
+ this._eachEntry(input[i], i);
+ }
+};
+
+Enumerator.prototype._eachEntry = function(entry, i) {
+ var c = this._instanceConstructor;
+ var resolve = c.resolve;
+
+ if (resolve === originalResolve) {
+ var then = getThen(entry);
+
+ if (then === originalThen &&
+ entry._state !== PENDING) {
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise) {
+ var promise = new c(noop);
+ handleMaybeThenable(promise, entry, then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(function(resolve) { resolve(entry); }), i);
+ }
+ } else {
+ this._willSettleAt(resolve(entry), i);
+ }
+};
+
+Enumerator.prototype._settledAt = function(state, i, value) {
+ var promise = this.promise;
+
+ if (promise._state === PENDING) {
+ this._remaining--;
+
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
+ }
+
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+};
+
+Enumerator.prototype._willSettleAt = function(promise, i) {
+ var enumerator = this;
+
+ subscribe(promise, undefined, function(value) {
+ enumerator._settledAt(FULFILLED, i, value);
+ }, function(reason) {
+ enumerator._settledAt(REJECTED, i, reason);
+ });
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/polyfill.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/polyfill.js
new file mode 100644
index 0000000..6696dfc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/polyfill.js
@@ -0,0 +1,26 @@
+/*global self*/
+import Promise from './promise';
+
+export default function polyfill() {
+ var local;
+
+ if (typeof global !== 'undefined') {
+ local = global;
+ } else if (typeof self !== 'undefined') {
+ local = self;
+ } else {
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
+ }
+ }
+
+ var P = local.Promise;
+
+ if (P && Object.prototype.toString.call(P.resolve()) === '[object Promise]' && !P.cast) {
+ return;
+ }
+
+ local.Promise = Promise;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise.js
new file mode 100644
index 0000000..d95951e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise.js
@@ -0,0 +1,384 @@
+import {
+ isFunction
+} from './utils';
+
+import {
+ noop,
+ nextId,
+ PROMISE_ID,
+ initializePromise
+} from './-internal';
+
+import {
+ asap,
+ setAsap,
+ setScheduler
+} from './asap';
+
+import all from './promise/all';
+import race from './promise/race';
+import Resolve from './promise/resolve';
+import Reject from './promise/reject';
+import then from './then';
+
+
+function needsResolver() {
+ throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
+}
+
+function needsNew() {
+ throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
+}
+
+export default Promise;
+/**
+ Promise objects represent the eventual result of an asynchronous operation. The
+ primary way of interacting with a promise is through its `then` method, which
+ registers callbacks to receive either a promise's eventual value or the reason
+ why the promise cannot be fulfilled.
+
+ Terminology
+ -----------
+
+ - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
+ - `thenable` is an object or function that defines a `then` method.
+ - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
+ - `exception` is a value that is thrown using the throw statement.
+ - `reason` is a value that indicates why a promise was rejected.
+ - `settled` the final resting state of a promise, fulfilled or rejected.
+
+ A promise can be in one of three states: pending, fulfilled, or rejected.
+
+ Promises that are fulfilled have a fulfillment value and are in the fulfilled
+ state. Promises that are rejected have a rejection reason and are in the
+ rejected state. A fulfillment value is never a thenable.
+
+ Promises can also be said to *resolve* a value. If this value is also a
+ promise, then the original promise's settled state will match the value's
+ settled state. So a promise that *resolves* a promise that rejects will
+ itself reject, and a promise that *resolves* a promise that fulfills will
+ itself fulfill.
+
+
+ Basic Usage:
+ ------------
+
+ ```js
+ var promise = new Promise(function(resolve, reject) {
+ // on success
+ resolve(value);
+
+ // on failure
+ reject(reason);
+ });
+
+ promise.then(function(value) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Advanced Usage:
+ ---------------
+
+ Promises shine when abstracting away asynchronous interactions such as
+ `XMLHttpRequest`s.
+
+ ```js
+ function getJSON(url) {
+ return new Promise(function(resolve, reject){
+ var xhr = new XMLHttpRequest();
+
+ xhr.open('GET', url);
+ xhr.onreadystatechange = handler;
+ xhr.responseType = 'json';
+ xhr.setRequestHeader('Accept', 'application/json');
+ xhr.send();
+
+ function handler() {
+ if (this.readyState === this.DONE) {
+ if (this.status === 200) {
+ resolve(this.response);
+ } else {
+ reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
+ }
+ }
+ };
+ });
+ }
+
+ getJSON('/posts.json').then(function(json) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Unlike callbacks, promises are great composable primitives.
+
+ ```js
+ Promise.all([
+ getJSON('/posts'),
+ getJSON('/comments')
+ ]).then(function(values){
+ values[0] // => postsJSON
+ values[1] // => commentsJSON
+
+ return values;
+ });
+ ```
+
+ @class Promise
+ @param {function} resolver
+ Useful for tooling.
+ @constructor
+*/
+function Promise(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
+
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+}
+
+Promise.all = all;
+Promise.race = race;
+Promise.resolve = Resolve;
+Promise.reject = Reject;
+Promise._setScheduler = setScheduler;
+Promise._setAsap = setAsap;
+Promise._asap = asap;
+
+Promise.prototype = {
+ constructor: Promise,
+
+/**
+ The primary way of interacting with a promise is through its `then` method,
+ which registers callbacks to receive either a promise's eventual value or the
+ reason why the promise cannot be fulfilled.
+
+ ```js
+ findUser().then(function(user){
+ // user is available
+ }, function(reason){
+ // user is unavailable, and you are given the reason why
+ });
+ ```
+
+ Chaining
+ --------
+
+ The return value of `then` is itself a promise. This second, 'downstream'
+ promise is resolved with the return value of the first promise's fulfillment
+ or rejection handler, or rejected if the handler throws an exception.
+
+ ```js
+ findUser().then(function (user) {
+ return user.name;
+ }, function (reason) {
+ return 'default name';
+ }).then(function (userName) {
+ // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
+ // will be `'default name'`
+ });
+
+ findUser().then(function (user) {
+ throw new Error('Found user, but still unhappy');
+ }, function (reason) {
+ throw new Error('`findUser` rejected and we're unhappy');
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
+ // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
+ });
+ ```
+ If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
+
+ ```js
+ findUser().then(function (user) {
+ throw new PedagogicalException('Upstream error');
+ }).then(function (value) {
+ // never reached
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // The `PedgagocialException` is propagated all the way down to here
+ });
+ ```
+
+ Assimilation
+ ------------
+
+ Sometimes the value you want to propagate to a downstream promise can only be
+ retrieved asynchronously. This can be achieved by returning a promise in the
+ fulfillment or rejection handler. The downstream promise will then be pending
+ until the returned promise is settled. This is called *assimilation*.
+
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // The user's comments are now available
+ });
+ ```
+
+ If the assimliated promise rejects, then the downstream promise will also reject.
+
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // If `findCommentsByAuthor` fulfills, we'll have the value here
+ }, function (reason) {
+ // If `findCommentsByAuthor` rejects, we'll have the reason here
+ });
+ ```
+
+ Simple Example
+ --------------
+
+ Synchronous Example
+
+ ```javascript
+ var result;
+
+ try {
+ result = findResult();
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+
+ Errback Example
+
+ ```js
+ findResult(function(result, err){
+ if (err) {
+ // failure
+ } else {
+ // success
+ }
+ });
+ ```
+
+ Promise Example;
+
+ ```javascript
+ findResult().then(function(result){
+ // success
+ }, function(reason){
+ // failure
+ });
+ ```
+
+ Advanced Example
+ --------------
+
+ Synchronous Example
+
+ ```javascript
+ var author, books;
+
+ try {
+ author = findAuthor();
+ books = findBooksByAuthor(author);
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+
+ Errback Example
+
+ ```js
+
+ function foundBooks(books) {
+
+ }
+
+ function failure(reason) {
+
+ }
+
+ findAuthor(function(author, err){
+ if (err) {
+ failure(err);
+ // failure
+ } else {
+ try {
+ findBoooksByAuthor(author, function(books, err) {
+ if (err) {
+ failure(err);
+ } else {
+ try {
+ foundBooks(books);
+ } catch(reason) {
+ failure(reason);
+ }
+ }
+ });
+ } catch(error) {
+ failure(err);
+ }
+ // success
+ }
+ });
+ ```
+
+ Promise Example;
+
+ ```javascript
+ findAuthor().
+ then(findBooksByAuthor).
+ then(function(books){
+ // found books
+ }).catch(function(reason){
+ // something went wrong
+ });
+ ```
+
+ @method then
+ @param {Function} onFulfilled
+ @param {Function} onRejected
+ Useful for tooling.
+ @return {Promise}
+*/
+ then: then,
+
+/**
+ `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
+ as the catch block of a try/catch statement.
+
+ ```js
+ function findAuthor(){
+ throw new Error('couldn't find that author');
+ }
+
+ // synchronous
+ try {
+ findAuthor();
+ } catch(reason) {
+ // something went wrong
+ }
+
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+*/
+ 'catch': function(onRejection) {
+ return this.then(null, onRejection);
+ }
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/all.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/all.js
new file mode 100644
index 0000000..03033f0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/all.js
@@ -0,0 +1,52 @@
+import Enumerator from '../enumerator';
+
+/**
+ `Promise.all` accepts an array of promises, and returns a new promise which
+ is fulfilled with an array of fulfillment values for the passed promises, or
+ rejected with the reason of the first passed promise to be rejected. It casts all
+ elements of the passed iterable to promises as it runs this algorithm.
+
+ Example:
+
+ ```javascript
+ var promise1 = resolve(1);
+ var promise2 = resolve(2);
+ var promise3 = resolve(3);
+ var promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // The array here would be [ 1, 2, 3 ];
+ });
+ ```
+
+ If any of the `promises` given to `all` are rejected, the first promise
+ that is rejected will be given as an argument to the returned promises's
+ rejection handler. For example:
+
+ Example:
+
+ ```javascript
+ var promise1 = resolve(1);
+ var promise2 = reject(new Error("2"));
+ var promise3 = reject(new Error("3"));
+ var promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // Code here never runs because there are rejected promises!
+ }, function(error) {
+ // error.message === "2"
+ });
+ ```
+
+ @method all
+ @static
+ @param {Array} entries array of promises
+ @param {String} label optional string for labeling the promise.
+ Useful for tooling.
+ @return {Promise} promise that is fulfilled when all `promises` have been
+ fulfilled, or rejected if any of them become rejected.
+ @static
+*/
+export default function all(entries) {
+ return new Enumerator(this, entries).promise;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/race.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/race.js
new file mode 100644
index 0000000..8c922e3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/race.js
@@ -0,0 +1,86 @@
+import {
+ isArray
+} from "../utils";
+
+/**
+ `Promise.race` returns a new promise which is settled in the same way as the
+ first passed promise to settle.
+
+ Example:
+
+ ```javascript
+ var promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ var promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 2');
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // result === 'promise 2' because it was resolved before promise1
+ // was resolved.
+ });
+ ```
+
+ `Promise.race` is deterministic in that only the state of the first
+ settled promise matters. For example, even if other promises given to the
+ `promises` array argument are resolved, but the first settled promise has
+ become rejected before the other promises became fulfilled, the returned
+ promise will become rejected:
+
+ ```javascript
+ var promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ var promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ reject(new Error('promise 2'));
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // Code here never runs
+ }, function(reason){
+ // reason.message === 'promise 2' because promise 2 became rejected before
+ // promise 1 became fulfilled
+ });
+ ```
+
+ An example real-world use case is implementing timeouts:
+
+ ```javascript
+ Promise.race([ajax('foo.json'), timeout(5000)])
+ ```
+
+ @method race
+ @static
+ @param {Array} promises array of promises to observe
+ Useful for tooling.
+ @return {Promise} a promise which settles in the same way as the first passed
+ promise to settle.
+*/
+export default function race(entries) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (!isArray(entries)) {
+ return new Constructor(function(resolve, reject) {
+ reject(new TypeError('You must pass an array to race.'));
+ });
+ } else {
+ return new Constructor(function(resolve, reject) {
+ var length = entries.length;
+ for (var i = 0; i < length; i++) {
+ Constructor.resolve(entries[i]).then(resolve, reject);
+ }
+ });
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/reject.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/reject.js
new file mode 100644
index 0000000..63b86cb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/reject.js
@@ -0,0 +1,46 @@
+import {
+ noop,
+ reject as _reject
+} from '../-internal';
+
+/**
+ `Promise.reject` returns a promise rejected with the passed `reason`.
+ It is shorthand for the following:
+
+ ```javascript
+ var promise = new Promise(function(resolve, reject){
+ reject(new Error('WHOOPS'));
+ });
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ var promise = Promise.reject(new Error('WHOOPS'));
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ @method reject
+ @static
+ @param {Any} reason value that the returned promise will be rejected with.
+ Useful for tooling.
+ @return {Promise} a promise rejected with the given `reason`.
+*/
+export default function reject(reason) {
+ /*jshint validthis:true */
+ var Constructor = this;
+ var promise = new Constructor(noop);
+ _reject(promise, reason);
+ return promise;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/resolve.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/resolve.js
new file mode 100644
index 0000000..201a545
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/promise/resolve.js
@@ -0,0 +1,48 @@
+import {
+ noop,
+ resolve as _resolve
+} from '../-internal';
+
+/**
+ `Promise.resolve` returns a promise that will become resolved with the
+ passed `value`. It is shorthand for the following:
+
+ ```javascript
+ var promise = new Promise(function(resolve, reject){
+ resolve(1);
+ });
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ var promise = Promise.resolve(1);
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ @method resolve
+ @static
+ @param {Any} value value that the returned promise will be resolved with
+ Useful for tooling.
+ @return {Promise} a promise that will become fulfilled with the given
+ `value`
+*/
+export default function resolve(object) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (object && typeof object === 'object' && object.constructor === Constructor) {
+ return object;
+ }
+
+ var promise = new Constructor(noop);
+ _resolve(promise, object);
+ return promise;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/then.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/then.js
new file mode 100644
index 0000000..f97e946
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/then.js
@@ -0,0 +1,34 @@
+import {
+ invokeCallback,
+ subscribe,
+ FULFILLED,
+ REJECTED,
+ noop,
+ makePromise,
+ PROMISE_ID
+} from './-internal';
+
+import { asap } from './asap';
+
+export default function then(onFulfillment, onRejection) {
+ var parent = this;
+
+ var child = new this.constructor(noop);
+
+ if (child[PROMISE_ID] === undefined) {
+ makePromise(child);
+ }
+
+ var state = parent._state;
+
+ if (state) {
+ var callback = arguments[state - 1];
+ asap(function(){
+ invokeCallback(state, child, callback, parent._result);
+ });
+ } else {
+ subscribe(parent, child, onFulfillment, onRejection);
+ }
+
+ return child;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/utils.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/utils.js
new file mode 100644
index 0000000..31ec6f9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/lib/es6-promise/utils.js
@@ -0,0 +1,22 @@
+export function objectOrFunction(x) {
+ return typeof x === 'function' || (typeof x === 'object' && x !== null);
+}
+
+export function isFunction(x) {
+ return typeof x === 'function';
+}
+
+export function isMaybeThenable(x) {
+ return typeof x === 'object' && x !== null;
+}
+
+var _isArray;
+if (!Array.isArray) {
+ _isArray = function (x) {
+ return Object.prototype.toString.call(x) === '[object Array]';
+ };
+} else {
+ _isArray = Array.isArray;
+}
+
+export var isArray = _isArray;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/package.json
new file mode 100644
index 0000000..e3ee168
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/es6-promise/package.json
@@ -0,0 +1,95 @@
+{
+ "name": "es6-promise",
+ "namespace": "es6-promise",
+ "version": "3.2.1",
+ "description": "A lightweight library that provides tools for organizing asynchronous code",
+ "main": "dist/es6-promise.js",
+ "directories": {
+ "lib": "lib"
+ },
+ "files": [
+ "dist",
+ "lib",
+ "!dist/test"
+ ],
+ "devDependencies": {
+ "babel-eslint": "^6.0.0",
+ "broccoli-es6-module-transpiler": "^0.5.0",
+ "broccoli-jshint": "^2.1.0",
+ "broccoli-merge-trees": "^1.1.1",
+ "broccoli-replace": "^0.12.0",
+ "broccoli-stew": "^1.2.0",
+ "broccoli-uglify-js": "^0.1.3",
+ "broccoli-watchify": "^0.2.0",
+ "ember-cli": "2.5.0",
+ "ember-publisher": "0.0.7",
+ "git-repo-version": "0.0.3",
+ "json3": "^3.3.2",
+ "mocha": "^1.20.1",
+ "promises-aplus-tests-phantom": "^2.1.0-revise",
+ "release-it": "0.0.10"
+ },
+ "scripts": {
+ "build": "ember build",
+ "build:production": "ember build --environment production",
+ "start": "ember s",
+ "test": "ember test",
+ "test:server": "ember test --server",
+ "test:node": "ember build && mocha ./dist/test/browserify",
+ "lint": "jshint lib",
+ "prepublish": "ember build --environment production",
+ "dry-run-release": "ember build --environment production && release-it --dry-run --non-interactive"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/jakearchibald/ES6-Promises.git"
+ },
+ "bugs": {
+ "url": "https://github.com/jakearchibald/ES6-Promises/issues"
+ },
+ "browser": {
+ "vertx": false
+ },
+ "keywords": [
+ "promises",
+ "futures"
+ ],
+ "author": {
+ "name": "Yehuda Katz, Tom Dale, Stefan Penner and contributors",
+ "url": "Conversion to ES6 API by Jake Archibald"
+ },
+ "license": "MIT",
+ "spm": {
+ "main": "dist/es6-promise.js"
+ },
+ "gitHead": "5df472ec56d5b9fbc76589383852008d46055c61",
+ "homepage": "https://github.com/jakearchibald/ES6-Promises#readme",
+ "_id": "es6-promise@3.2.1",
+ "_shasum": "ec56233868032909207170c39448e24449dd1fc4",
+ "_from": "es6-promise@3.2.1",
+ "_npmVersion": "3.8.8",
+ "_nodeVersion": "5.10.1",
+ "_npmUser": {
+ "name": "stefanpenner",
+ "email": "stefan.penner@gmail.com"
+ },
+ "dist": {
+ "shasum": "ec56233868032909207170c39448e24449dd1fc4",
+ "tarball": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.2.1.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "jaffathecake",
+ "email": "jaffathecake@gmail.com"
+ },
+ {
+ "name": "stefanpenner",
+ "email": "stefan.penner@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/es6-promise-3.2.1.tgz_1463027774105_0.6333294357173145"
+ },
+ "_resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.2.1.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/.coveralls.yml b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/.coveralls.yml
new file mode 100644
index 0000000..a0b4fb6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/.coveralls.yml
@@ -0,0 +1 @@
+repo_token: 47iIZ0B3llo2Wc4dxWRltvgdImqcrVDTi
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/HISTORY.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/HISTORY.md
new file mode 100644
index 0000000..28bd789
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/HISTORY.md
@@ -0,0 +1,559 @@
+2.0.13 2016-10-21
+-----------------
+* Updated bson library to 0.5.6.
+ - Included cyclic dependency detection
+* Fire callback when topology was destroyed (Issue #147, https://github.com/vkarpov15).
+* Refactoring to support pipelining ala 1.4.x branch will retaining the benefits of the growing/shrinking pool (Issue #146).
+* Fix typo in serverHeartbeatFailed event name (Issue #143, https://github.com/jakesjews).
+* NODE-798 Driver hangs on count command in replica set with one member (Issue #141, https://github.com/isayme).
+
+2.0.12 2016-09-15
+-----------------
+* fix debug logging message not printing server name.
+* fixed application metadata being sent by wrong ismaster.
+* NODE-812 Fixed mongos stall due to proxy monitoring ismaster failure causing reconnect.
+* NODE-818 Replicaset timeouts in initial connect sequence can "no primary found".
+* Updated bson library to 0.5.5.
+* Added DBPointer up conversion to DBRef.
+
+2.0.11 2016-08-29
+-----------------
+* NODE-803, Fixed issue in how the latency window is calculated for Mongos topology causing issues for single proxy connections.
+* Avoid timeout in attemptReconnect causing multiple attemptReconnect attempts to happen (Issue #134, https://github.com/dead-horse).
+* Ensure promoteBuffers is propagated in same fashion as promoteValues and promoteLongs
+
+2.0.10 2016-08-23
+-----------------
+* Added promoteValues flag (default to true) to allow user to specify they only want wrapped BSON values back instead of promotion to native types.
+* Do not close mongos proxy connection on failed ismaster check in ha process (Issue #130).
+
+2.0.9 2016-08-19
+----------------
+* Allow promoteLongs to be passed in through Response.parse method and overrides default set on the connection.
+* NODE-798 Driver hangs on count command in replica set with one member.
+* Allow promoteLongs to be passed in through Response.parse method and overrides default set on the connection.
+* Allow passing in servername for TLS connections for SNI support.
+
+2.0.8 2016-08-16
+----------------
+* Allow execution of store operations indepent of having both a primary and secondary available (Issue #123).
+* Fixed command execution issue for mongos to ensure buffering of commands when no mongos available.
+* Added hashed connection names and fullResult.
+* Updated bson library to 0.5.3.
+* Wrap callback in nextTick to ensure exceptions are thrown correctly.
+
+2.0.7 2016-07-28
+----------------
+* Allow primary to be returned when secondaryPreferred is passed (Issue #117, https://github.com/dhendo).
+* Added better warnings when passing in illegal seed list members to a Mongos topology.
+* Minor attemptReconnect bug that would cause multiple attemptReconnect to run in parallel.
+* Fix wrong opType passed to disconnectHandler.add (Issue #121, https://github.com/adrian-gierakowski)
+* Implemented domain backward comp support enabled via domainsEnabled options on Server/ReplSet/Mongos and MongoClient.connect.
+* Initial max staleness implementation for ReplSet and Mongos for 3.4 support.
+* Added handling of collation for 3.4 support.
+
+2.0.6 2016-07-19
+----------------
+* Destroy connection on socket timeout due to newer node versions not closing the socket.
+
+2.0.5 2016-07-15
+----------------
+* Minor fixes to handle faster MongoClient connectivity from the driver, allowing single server instances to detect if they are a proxy.
+* Added numberOfConsecutiveTimeouts to pool that will destroy the pool if the number of consecutive timeouts > reconnectTries.
+* Print warning if seedlist servers host name does not match the one provided in it's ismaster.me field for Replicaset members.
+* Fix issue where Replicaset connection would not succeeed if there the replicaset was a single primary server setup.
+
+2.0.4 2016-07-11
+-----------------
+* Updated bson to version 0.5.1.
+* handle situation where user is providing seedlist names that do not match host list. fix allows for a single full discovery connection sweep before erroring out.
+* NODE-747 Polyfill for Object.assign for 0.12.x or 0.10.x.
+* NODE-746 Improves replicaset errors for wrong setName.
+
+2.0.3 2016-07-08
+-----------------
+* Implemented Server Selection Specification test suite.
+* Added warning level to logger.
+* Added warning message when sockeTimeout < haInterval for Replset/Mongos.
+
+2.0.2 2016-07-06
+-----------------
+* Mongos emits close event on no proxies available or when reconnect attempt fails.
+* Replset emits close event when no servers available or when attemptReconnect fails to reconnect.
+* Don't throw in auth methods but return error in callback.
+
+2.0.1 2016-07-05
+-----------------
+* Added missing logout method on mongos proxy topology.
+* Fixed logger error serialization issue.
+* Documentation fixes.
+
+2.0.0 2016-07-05
+-----------------
+* Moved all authentication and handling of growing/shrinking of pool connections into actual pool.
+* All authentication methods now handle both auth/reauthenticate and logout events.
+* Introduced logout method to get rid of onAll option for logout command.
+* Updated bson to 0.5.0 that includes Decimal128 support.
+
+1.3.21 2016-05-30
+-----------------
+* Pool gets stuck if a connection marked for immediateRelease times out (Issue #99, https://github.com/nbrachet).
+* Make authentication process retry up to authenticationRetries at authenticationRetryIntervalMS interval.
+* Made ismaster replicaset calls operate with connectTimeout or monitorSocketTimeout to lower impact of big socketTimeouts on monitoring performance.
+* Make sure connections mark as "immediateRelease" don't linger the inUserConnections list. Otherwise, after that connection times out, getAll() incorrectly returns more connections than are effectively present, causing the pool to not get restarted by reconnectServer. (Issue #99, https://github.com/nbrachet).
+* Make cursor getMore or killCursor correctly trigger pool reconnect to single server if pool has not been destroyed.
+* Make ismaster monitoring for single server connection default to avoid user confusion due to change in behavior.
+
+1.3.20 2016-05-25
+-----------------
+* NODE-710 Allow setting driver loggerLevel and logger function from MongoClient options.
+* Minor fix for SSL errors on connection attempts, minor fix to reconnect handler for the server.
+* Don't write to socket before having registered the callback for commands, work around for windows issuing error events twice on node.js when socket gets destroyed by firewall.
+* Fix minor issue where connectingServers would not be removed correctly causing single server connections to not auto-reconnect.
+
+1.3.19 2016-05-17
+-----------------
+- Handle situation where a server connection in a replicaset sometimes fails to be destroyed properly due to being in the middle of authentication when the destroy method is called on the replicaset causing it to be orphaned and never collected.
+- Set keepAlive to false by default to work around bug in node.js for Windows XP and Windows 2003.
+- Ensure replicaset topology destroy is never called by SDAM.
+- Ensure all paths are correctly returned on inspectServer in replset.
+
+1.3.18 2016-04-27
+-----------------
+- Hardened cursor connection handling for getMore and killCursor to ensure mid operation connection kill does not throw null exception.
+- Fixes for Node 6.0 support.
+
+1.3.17 2016-04-26
+-----------------
+- Added improved handling of reconnect when topology is a single server.
+- Added better handling of $query queries passed down for 3.2 or higher.
+- Introduced getServerFrom method to topologies to let cursor grab a new pool for getMore and killCursors commands and not use connection pipelining.
+- NODE-693 Move authentication to be after ismaster call to avoid authenticating against arbiters.
+
+1.3.16 2016-04-07
+-----------------
+- Only call unref on destroy if it exists to ensure proper working destroy method on early node v0.10.x versions.
+
+1.3.15 2016-04-06
+-----------------
+- NODE-687 Fixed issue where a server object failed to be destroyed if the replicaset state did not update successfully. This could leave active connections accumulating over time.
+- Fixed some situations where all connections are flushed due to a single connection in the connection pool closing.
+
+1.3.14 2016-04-01
+-----------------
+- Ensure server inquireServerState exits immediately on server.destroy call.
+- Refactored readPreference handling in 2.4, 2.6 and 3.2 wire protocol handling.
+
+1.3.13 2016-03-30
+-----------------
+- Handle missing cursor on getMore when going through a mongos proxy by pinning to socket connection and not server.
+
+1.3.12 2016-03-29
+-----------------
+- Mongos pickProxies fall back to closest mongos if no proxies meet latency window specified.
+
+1.3.11 2016-03-29
+-----------------
+- isConnected method for mongos uses same selection code as getServer.
+- Exceptions in cursor getServer trapped and correctly delegated to high level handler.
+
+1.3.10 2016-03-22
+-----------------
+- SDAM Monitoring emits diff for Replicasets to simplify detecting the state changes.
+- SDAM Monitoring correctly emits Mongos as serverDescriptionEvent.
+
+1.3.9 2016-03-20
+----------------
+- Removed monitoring exclusive connection, should resolve timeouts and reconnects on idle replicasets where haInteval > socketTimeout.
+
+1.3.8 2016-03-18
+----------------
+- Implements the SDAM monitoring specification.
+- Fix issue where cursor would error out and not be buffered when primary is not connected.
+
+1.3.7 2016-03-16
+----------------
+- Fixed issue with replicasetInquirer where it could stop performing monitoring if there was no servers available.
+
+1.3.6 2016-03-15
+----------------
+- Fixed raise condition where multiple replicasetInquirer operations could be started in parallel creating redundant connections.
+
+1.3.5 2016-03-14
+----------------
+- Handle rogue SSL exceptions (Issue #85, https://github.com/durran).
+
+1.3.4 2016-03-14
+----------------
+- Added unref options on server, replicaset and mongos (Issue #81, https://github.com/allevo)
+- cursorNotFound flag always false (Issue #83, https://github.com/xgfd)
+- refactor of events emission of fullsetup and all events (Issue #84, https://github.com/xizhibei)
+
+1.3.3 2016-03-08
+----------------
+- Added support for promoteLongs option for command function.
+- Return connection if no callback available
+- Emit connect event when server reconnects after initial connection failed (Issue #76, https://github.com/vkarpov15)
+- Introduced optional monitoringSocketTimeout option to allow better control of SDAM monitoring timeouts.
+- Made monitoringSocketTimeout default to 30000 if no connectionTimeout value specified or if set to 0.
+- Fixed issue where tailable cursor would not retry even though cursor was still alive.
+- Disabled exhaust flag support to avoid issues where users could easily write code that would cause memory to run out.
+- Handle the case where the first command result document returns an empty list of documents but a live cursor.
+- Allow passing down off CANONICALIZE_HOST_NAME and SERVICE_REALM options for kerberos.
+
+1.3.2 2016-02-09
+----------------
+- Harden MessageHandler in server.js to avoid issues where we cannot find a callback for an operation.
+- Ensure RequestId can never be larger than Max Number integer size.
+
+1.3.1 2016-02-05
+----------------
+- Removed annoying missing Kerberos error (NODE-654).
+
+1.3.0 2016-02-03
+----------------
+- Added raw support for the command function on topologies.
+- Fixed issue where raw results that fell on batchSize boundaries failed (Issue #72)
+- Copy over all the properties to the callback returned from bindToDomain, (Issue #72)
+- Added connection hash id to be able to reference connection host/name without leaking it outside of driver.
+- NODE-638, Cannot authenticate database user with utf-8 password.
+- Refactored pool to be worker queue based, minimizing the impact a slow query have on throughput as long as # slow queries < # connections in the pool.
+- Pool now grows and shrinks correctly depending on demand not causing a full pool reconnect.
+- Improvements in monitoring of a Replicaset where in certain situations the inquiry process could get exited.
+- Switched to using Array.push instead of concat for use cases of a lot of documents.
+- Fixed issue where re-authentication could loose the credentials if whole Replicaset disconnected at once.
+- Added peer optional dependencies support using require_optional module.
+
+1.2.32 2016-01-12
+-----------------
+- Bumped bson to V0.4.21 to allow using minor optimizations.
+
+1.2.31 2016-01-04
+-----------------
+- Allow connection to secondary if primaryPreferred or secondaryPreferred (Issue #70, https://github.com/leichter)
+
+1.2.30 2015-12-23
+-----------------
+- Pool allocates size + 1 connections when using replicasets, reserving additional pool connection for monitoring exclusively.
+- Fixes bug when all replicaset members are down, that would cause it to fail to reconnect using the originally provided seedlist.
+
+1.2.29 2015-12-17
+-----------------
+- Correctly emit close event when calling destroy on server topology.
+
+1.2.28 2015-12-13
+-----------------
+- Backed out Prevent Maximum call stack exceeded by calling all callbacks on nextTick, (Issue #64, https://github.com/iamruinous) as it breaks node 0.10.x support.
+
+1.2.27 2015-12-13
+-----------------
+- Added [options.checkServerIdentity=true] {boolean|function}. Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function, (Issue #29).
+- Prevent Maximum call stack exceeded by calling all callbacks on nextTick, (Issue #64, https://github.com/iamruinous).
+- State is not defined in mongos, (Issue #63, https://github.com/flyingfisher).
+- Fixed corner case issue on exhaust cursors on pre 3.0.x MongoDB.
+
+1.2.26 2015-11-23
+-----------------
+- Converted test suite to use mongodb-topology-manager.
+- Upgraded bson library to V0.4.20.
+- Minor fixes for 3.2 readPreferences.
+
+1.2.25 2015-11-23
+-----------------
+- Correctly error out when passed a seedlist of non-valid server members.
+
+1.2.24 2015-11-20
+-----------------
+- Fix Automattic/mongoose#3481; flush callbacks on error, (Issue #57, https://github.com/vkarpov15).
+- $explain query for wire protocol 2.6 and 2.4 does not set number of returned documents to -1 but to 0.
+
+1.2.23 2015-11-16
+-----------------
+- ismaster runs against admin.$cmd instead of system.$cmd.
+
+1.2.22 2015-11-16
+-----------------
+- Fixes to handle getMore command errors for MongoDB 3.2
+- Allows the process to properly close upon a Db.close() call on the replica set by shutting down the haTimer and closing arbiter connections.
+
+1.2.21 2015-11-07
+-----------------
+- Hardened the checking for replicaset equality checks.
+- OpReplay flag correctly set on Wire protocol query.
+- Mongos load balancing added, introduced localThresholdMS to control the feature.
+- Kerberos now a peerDependency, making it not install it by default in Node 5.0 or higher.
+
+1.2.20 2015-10-28
+-----------------
+- Fixed bug in arbiter connection capping code.
+- NODE-599 correctly handle arrays of server tags in order of priority.
+- Fix for 2.6 wire protocol handler related to readPreference handling.
+- Added maxAwaitTimeMS support for 3.2 getMore to allow for custom timeouts on tailable cursors.
+- Make CoreCursor check for $err before saying that 'next' succeeded (Issue #53, https://github.com/vkarpov15).
+
+1.2.19 2015-10-15
+-----------------
+- Make batchSize always be > 0 for 3.2 wire protocol to make it work consistently with pre 3.2 servers.
+- Locked to bson 0.4.19.
+
+1.2.18 2015-10-15
+-----------------
+- Minor 3.2 fix for handling readPreferences on sharded commands.
+- Minor fixes to correctly pass APM specification test suite.
+
+1.2.17 2015-10-08
+-----------------
+- Connections to arbiters only maintain a single connection.
+
+1.2.15 2015-10-06
+-----------------
+- Set slaveOk to true for getMore and killCursors commands.
+- Don't swallow callback errors for 2.4 single server (Issue #49, https://github.com/vkarpov15).
+- Apply toString('hex') to each buffer in an array when logging (Issue #48, https://github.com/nbrachet).
+
+1.2.14 2015-09-28
+-----------------
+- NODE-547 only emit error if there are any listeners.
+- Fixed APM issue with issuing readConcern.
+
+1.2.13 2015-09-18
+-----------------
+- Added BSON serializer ignoreUndefined option for insert/update/remove/command/cursor.
+
+1.2.12 2015-09-08
+-----------------
+- NODE-541 Added initial support for readConcern.
+
+1.2.11 2015-08-31
+-----------------
+- NODE-535 If connectWithNoPrimary is true then primary-only connection is not allowed.
+- NODE-534 Passive secondaries are not allowed for secondaryOnlyConnectionAllowed.
+- Fixed filtering bug for logging (Issue 30, https://github.com/christkv/mongodb-core/issues/30).
+
+1.2.10 2015-08-14
+-----------------
+- Added missing Mongos.prototype.parserType function.
+
+1.2.9 2015-08-05
+----------------
+- NODE-525 Reset connectionTimeout after it's overwritten by tls.connect.
+- NODE-518 connectTimeoutMS is doubled in 2.0.39.
+
+1.2.8 2015-07-24
+-----------------
+- Minor fix to handle 2.4.x errors better by correctly return driver layer issues.
+
+1.2.7 2015-07-16
+-----------------
+- Refactoring to allow to tap into find/getmore/killcursor in cursors for APM monitoring in driver.
+
+1.2.6 2015-07-14
+-----------------
+- NODE-505 Query fails to find records that have a 'result' property with an array value.
+
+1.2.5 2015-07-14
+-----------------
+- NODE-492 correctly handle hanging replicaset monitoring connections when server is unavailable due to network partitions or firewalls dropping packets, configureable using the connectionTimeoutMS setting.
+
+1.2.4 2015-07-07
+-----------------
+- NODE-493 staggering the socket connections to avoid overwhelming the mongod process.
+
+1.2.3 2015-06-26
+-----------------
+- Minor bug fixes.
+
+1.2.2 2015-06-22
+-----------------
+- Fix issue with SCRAM authentication causing authentication to return true on failed authentication (Issue 26, https://github.com/cglass17).
+
+1.2.1 2015-06-17
+-----------------
+- Ensure serializeFunctions passed down correctly to wire protocol.
+
+1.2.0 2015-06-17
+-----------------
+- Switching to using the 0.4.x pure JS serializer, removing dependency on C++ parser.
+- Refactoring wire protocol messages to avoid expensive size calculations of documents in favor of writing out an array of buffers to the sockets.
+- NODE-486 fixed issue related to limit and skip when calling toArray in 2.0 driver.
+- NODE-483 throw error if capabilities of topology is queries before topology has performed connection setup.
+- NODE-487 fixed issue where killcursor command was not being sent correctly on limit and skip queries.
+
+1.1.33 2015-05-31
+-----------------
+- NODE-478 Work around authentication race condition in mongos authentication due to multi step authentication methods like SCRAM.
+
+1.1.32 2015-05-20
+-----------------
+- After reconnect, it updates the allowable reconnect retries to the option settings (Issue #23, https://github.com/owenallenaz)
+
+1.1.31 2015-05-19
+-----------------
+- Minor fixes for issues with re-authentication of mongos.
+
+1.1.30 2015-05-18
+-----------------
+- Correctly emit 'all' event when primary + all secondaries have connected.
+
+1.1.29 2015-05-17
+-----------------
+- NODE-464 Only use a single socket against arbiters and hidden servers.
+- Ensure we filter out hidden servers from any server queries.
+
+1.1.28 2015-05-12
+-----------------
+- Fixed buffer compare for electionId for < node 12.0.2
+
+1.1.27 2015-05-12
+-----------------
+- NODE-455 Update SDAM specification support to cover electionId and Mongos load balancing.
+
+1.1.26 2015-05-06
+-----------------
+- NODE-456 Allow mongodb-core to pipeline commands (ex findAndModify+GLE) along the same connection and handle the returned results.
+- Fixes to make mongodb-core work for node 0.8.x when using scram and setImmediate.
+
+1.1.25 2015-04-24
+-----------------
+- Handle lack of callback in crud operations when returning error on application closed.
+
+1.1.24 2015-04-22
+-----------------
+- Error out when topology has been destroyed either by connection retries being exhausted or destroy called on topology.
+
+1.1.23 2015-04-15
+-----------------
+- Standardizing mongoErrors and its API (Issue #14)
+- Creating a new connection is slow because of 100ms setTimeout() (Issue #17, https://github.com/vkarpov15)
+- remove mkdirp and rimraf dependencies (Issue #12)
+- Updated default value of param options.rejectUnauthorized to match documentation (Issue #16)
+- ISSUE: NODE-417 Resolution. Improving behavior of thrown errors (Issue #14, https://github.com/owenallenaz)
+- Fix cursor hanging when next() called on exhausted cursor (Issue #18, https://github.com/vkarpov15)
+
+1.1.22 2015-04-10
+-----------------
+- Minor refactorings in cursor code to make extending the cursor simpler.
+- NODE-417 Resolution. Improving behavior of thrown errors using Error.captureStackTrace.
+
+1.1.21 2015-03-26
+-----------------
+- Updated bson module to 0.3.0 that extracted the c++ parser into bson-ext and made it an optional dependency.
+
+1.1.20 2015-03-24
+-----------------
+- NODE-395 Socket Not Closing, db.close called before full set finished initalizing leading to server connections in progress not being closed properly.
+
+1.1.19 2015-03-21
+-----------------
+- Made kerberos module ~0.0 to allow for quicker releases due to io.js of kerberos module.
+
+1.1.18 2015-03-17
+-----------------
+- Added support for minHeartbeatFrequencyMS on server reconnect according to the SDAM specification.
+
+1.1.17 2015-03-16
+-----------------
+- NODE-377, fixed issue where tags would correctly be checked on secondary and nearest to filter out eligible server candidates.
+
+1.1.16 2015-03-06
+-----------------
+- rejectUnauthorized parameter is set to true for ssl certificates by default instead of false.
+
+1.1.15 2015-03-04
+-----------------
+- Removed check for type in replset pickserver function.
+
+1.1.14 2015-02-26
+-----------------
+- NODE-374 correctly adding passive secondaries to the list of eligable servers for reads
+
+1.1.13 2015-02-24
+-----------------
+- NODE-365 mongoDB native node.js driver infinite reconnect attempts (fixed issue around handling of retry attempts)
+
+1.1.12 2015-02-16
+-----------------
+- Fixed cursor transforms for buffered document reads from cursor.
+
+1.1.11 2015-02-02
+-----------------
+- Remove the required setName for replicaset connections, if not set it will pick the first setName returned.
+
+1.1.10 2015-31-01
+-----------------
+- Added tranforms.doc option to cursor to allow for pr. document transformations.
+
+1.1.9 2015-21-01
+----------------
+- Updated BSON dependency to 0.2.18 to fix issues with io.js and node.
+- Updated Kerberos dependency to 0.0.8 to fix issues with io.js and node.
+- Don't treat findOne() as a command cursor.
+- Refactored out state changes into methods to simplify read the next method.
+
+1.1.8 2015-09-12
+----------------
+- Stripped out Object.defineProperty for performance reasons
+- Applied more performance optimizations.
+- properties cursorBatchSize, cursorSkip, cursorLimit are not methods setCursorBatchSize/cursorBatchSize, setCursorSkip/cursorSkip, setCursorLimit/cursorLimit
+
+1.1.7 2014-18-12
+----------------
+- Use ns variable for getMore commands for command cursors to work properly with cursor version of listCollections and listIndexes.
+
+1.1.6 2014-18-12
+----------------
+- Server manager fixed to support 2.2.X servers for travis test matrix.
+
+1.1.5 2014-17-12
+----------------
+- Fall back to errmsg when creating MongoError for command errors
+
+1.1.4 2014-17-12
+----------------
+- Added transform method support for cursor (initially just for initial query results) to support listCollections/listIndexes in 2.8.
+- Fixed variable leak in scram.
+- Fixed server manager to deal better with killing processes.
+- Bumped bson to 0.2.16.
+
+1.1.3 2014-01-12
+----------------
+- Fixed error handling issue with nonce generation in mongocr.
+- Fixed issues with restarting servers when using ssl.
+- Using strict for all classes.
+- Cleaned up any escaping global variables.
+
+1.1.2 2014-20-11
+----------------
+- Correctly encoding UTF8 collection names on wire protocol messages.
+- Added emitClose parameter to topology destroy methods to allow users to specify that they wish the topology to emit the close event to any listeners.
+
+1.1.1 2014-14-11
+----------------
+- Refactored code to use prototype instead of privileged methods.
+- Fixed issue with auth where a runtime condition could leave replicaset members without proper authentication.
+- Several deopt optimizations for v8 to improve performance and reduce GC pauses.
+
+1.0.5 2014-29-10
+----------------
+- Fixed issue with wrong namespace being created for command cursors.
+
+1.0.4 2014-24-10
+----------------
+- switched from using shift for the cursor due to bad slowdown on big batchSizes as shift causes entire array to be copied on each call.
+
+1.0.3 2014-21-10
+----------------
+- fixed error issuing problem on cursor.next when iterating over a huge dataset with a very small batchSize.
+
+1.0.2 2014-07-10
+----------------
+- fullsetup is now defined as a primary and secondary being available allowing for all read preferences to be satisfied.
+- fixed issue with replset_state logging.
+
+1.0.1 2014-07-10
+----------------
+- Dependency issue solved
+
+1.0.0 2014-07-10
+----------------
+- Initial release of mongodb-core
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/LICENSE
new file mode 100644
index 0000000..ad410e1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/LICENSE
@@ -0,0 +1,201 @@
+Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright {yyyy} {name of copyright owner}
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License. \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/Makefile b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/Makefile
new file mode 100644
index 0000000..36e1202
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/Makefile
@@ -0,0 +1,11 @@
+NODE = node
+NPM = npm
+JSDOC = jsdoc
+name = all
+
+generate_docs:
+ # cp -R ./HISTORY.md ./docs/content/meta/release-notes.md
+ hugo -s docs/reference -d ../../public
+ $(JSDOC) -c conf.json -t docs/jsdoc-template/ -d ./public/api
+ cp -R ./public/api/scripts ./public/.
+ cp -R ./public/api/styles ./public/.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/README.md
new file mode 100644
index 0000000..433dd88
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/README.md
@@ -0,0 +1,228 @@
+[![Build Status](https://secure.travis-ci.org/christkv/mongodb-core.png)](http://travis-ci.org/christkv/mongodb-core)
+[![Coverage Status](https://coveralls.io/repos/github/christkv/mongodb-core/badge.svg?branch=1.3)](https://coveralls.io/github/christkv/mongodb-core?branch=1.3)
+
+# Description
+
+The MongoDB Core driver is the low level part of the 2.0 or higher MongoDB driver and is meant for library developers not end users. It does not contain any abstractions or helpers outside of the basic management of MongoDB topology connections, CRUD operations and authentication.
+
+## MongoDB Node.JS Core Driver
+
+| what | where |
+|---------------|------------------------------------------------|
+| documentation | http://mongodb.github.io/node-mongodb-native/ |
+| apidoc | http://mongodb.github.io/node-mongodb-native/ |
+| source | https://github.com/christkv/mongodb-core |
+| mongodb | http://www.mongodb.org/ |
+
+### Blogs of Engineers involved in the driver
+- Christian Kvalheim [@christkv](https://twitter.com/christkv) <http://christiankvalheim.com>
+
+### Bugs / Feature Requests
+
+Think you’ve found a bug? Want to see a new feature in node-mongodb-native? Please open a
+case in our issue management tool, JIRA:
+
+- Create an account and login <https://jira.mongodb.org>.
+- Navigate to the NODE project <https://jira.mongodb.org/browse/NODE>.
+- Click **Create Issue** - Please provide as much information as possible about the issue type and how to reproduce it.
+
+Bug reports in JIRA for all driver projects (i.e. NODE, PYTHON, CSHARP, JAVA) and the
+Core Server (i.e. SERVER) project are **public**.
+
+### Questions and Bug Reports
+
+ * mailing list: https://groups.google.com/forum/#!forum/node-mongodb-native
+ * jira: http://jira.mongodb.org/
+
+### Change Log
+
+http://jira.mongodb.org/browse/NODE
+
+# QuickStart
+
+The quick start guide will show you how to set up a simple application using Core driver and MongoDB. It scope is only how to set up the driver and perform the simple crud operations. For more inn depth coverage we encourage reading the tutorials.
+
+## Create the package.json file
+
+Let's create a directory where our application will live. In our case we will put this under our projects directory.
+
+```
+mkdir myproject
+cd myproject
+```
+
+Create a **package.json** using your favorite text editor and fill it in.
+
+```json
+{
+ "name": "myproject",
+ "version": "1.0.0",
+ "description": "My first project",
+ "main": "index.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/christkv/myfirstproject.git"
+ },
+ "dependencies": {
+ "mongodb-core": "~1.0"
+ },
+ "author": "Christian Kvalheim",
+ "license": "Apache 2.0",
+ "bugs": {
+ "url": "https://github.com/christkv/myfirstproject/issues"
+ },
+ "homepage": "https://github.com/christkv/myfirstproject"
+}
+```
+
+Save the file and return to the shell or command prompt and use **NPM** to install all the dependencies.
+
+```
+npm install
+```
+
+You should see **NPM** download a lot of files. Once it's done you'll find all the downloaded packages under the **node_modules** directory.
+
+Booting up a MongoDB Server
+---------------------------
+Let's boot up a MongoDB server instance. Download the right MongoDB version from [MongoDB](http://www.mongodb.org), open a new shell or command line and ensure the **mongod** command is in the shell or command line path. Now let's create a database directory (in our case under **/data**).
+
+```
+mongod --dbpath=/data --port 27017
+```
+
+You should see the **mongod** process start up and print some status information.
+
+## Connecting to MongoDB
+
+Let's create a new **app.js** file that we will use to show the basic CRUD operations using the MongoDB driver.
+
+First let's add code to connect to the server. Notice that there is no concept of a database here and we use the topology directly to perform the connection.
+
+```js
+var Server = require('mongodb-core').Server
+ , assert = require('assert');
+
+// Set up server connection
+var server = new Server({
+ host: 'localhost'
+ , port: 27017
+ , reconnect: true
+ , reconnectInterval: 50
+});
+
+// Add event listeners
+server.on('connect', function(_server) {
+ console.log('connected');
+ test.done();
+});
+
+server.on('close', function() {
+ console.log('closed');
+});
+
+server.on('reconnect', function() {
+ console.log('reconnect');
+});
+
+// Start connection
+server.connect();
+```
+
+To connect to a replicaset we would use the `ReplSet` class and for a set of Mongos proxies we use the `Mongos` class. Each topology class offer the same CRUD operations and you operate on the topology directly. Let's look at an example exercising all the different available CRUD operations.
+
+```js
+var Server = require('mongodb-core').Server
+ , assert = require('assert');
+
+// Set up server connection
+var server = new Server({
+ host: 'localhost'
+ , port: 27017
+ , reconnect: true
+ , reconnectInterval: 50
+});
+
+// Add event listeners
+server.on('connect', function(_server) {
+ console.log('connected');
+
+ // Execute the ismaster command
+ _server.command('system.$cmd', {ismaster: true}, function(err, result) {
+
+ // Perform a document insert
+ _server.insert('myproject.inserts1', [{a:1}, {a:2}], {
+ writeConcern: {w:1}, ordered:true
+ }, function(err, results) {
+ assert.equal(null, err);
+ assert.equal(2, results.result.n);
+
+ // Perform a document update
+ _server.update('myproject.inserts1', [{
+ q: {a: 1}, u: {'$set': {b:1}}
+ }], {
+ writeConcern: {w:1}, ordered:true
+ }, function(err, results) {
+ assert.equal(null, err);
+ assert.equal(1, results.result.n);
+
+ // Remove a document
+ _server.remove('myproject.inserts1', [{
+ q: {a: 1}, limit: 1
+ }], {
+ writeConcern: {w:1}, ordered:true
+ }, function(err, results) {
+ assert.equal(null, err);
+ assert.equal(1, results.result.n);
+
+ // Get a document
+ var cursor = _server.cursor('integration_tests.inserts_example4', {
+ find: 'integration_tests.example4'
+ , query: {a:1}
+ });
+
+ // Get the first document
+ cursor.next(function(err, doc) {
+ assert.equal(null, err);
+ assert.equal(2, doc.a);
+
+ // Execute the ismaster command
+ _server.command("system.$cmd"
+ , {ismaster: true}, function(err, result) {
+ assert.equal(null, err)
+ _server.destroy();
+ });
+ });
+ });
+ });
+
+ test.done();
+ });
+});
+
+server.on('close', function() {
+ console.log('closed');
+});
+
+server.on('reconnect', function() {
+ console.log('reconnect');
+});
+
+// Start connection
+server.connect();
+```
+
+The core driver does not contain any helpers or abstractions only the core crud operations. These consist of the following commands.
+
+* `insert`, Insert takes an array of 1 or more documents to be inserted against the topology and allows you to specify a write concern and if you wish to execute the inserts in order or out of order.
+* `update`, Update takes an array of 1 or more update commands to be executed against the server topology and also allows you to specify a write concern and if you wish to execute the updates in order or out of order.
+* `remove`, Remove takes an array of 1 or more remove commands to be executed against the server topology and also allows you to specify a write concern and if you wish to execute the removes in order or out of order.
+* `cursor`, Returns you a cursor for either the 'virtual' `find` command, a command that returns a cursor id or a plain cursor id. Read the cursor tutorial for more inn depth coverage.
+* `command`, Executes a command against MongoDB and returns the result.
+* `auth`, Authenticates the current topology using a supported authentication scheme.
+
+The Core Driver is a building block for library builders and is not meant for usage by end users as it lacks a lot of features the end user might need such as automatic buffering of operations when a primary is changing in a replicaset or the db and collections abstraction.
+
+## Next steps
+
+The next step is to get more in depth information about how the different aspects of the core driver works and how to leverage them to extend the functionality of the cursors. Please view the tutorials for more detailed information.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/TESTING.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/TESTING.md
new file mode 100644
index 0000000..fe03ea0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/TESTING.md
@@ -0,0 +1,18 @@
+Testing setup
+=============
+
+Single Server
+-------------
+mongod --dbpath=./db
+
+Replicaset
+----------
+mongo --nodb
+var x = new ReplSetTest({"useHostName":"false", "nodes" : {node0 : {}, node1 : {}, node2 : {}}})
+x.startSet();
+var config = x.getReplSetConfig()
+x.initiate(config);
+
+Mongos
+------
+var s = new ShardingTest( "auth1", 1 , 0 , 2 , {rs: true, noChunkSize : true}); \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/conf.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/conf.json
new file mode 100644
index 0000000..12ce4c7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/conf.json
@@ -0,0 +1,59 @@
+{
+ "plugins": ["plugins/markdown", "docs/lib/jsdoc/examples_plugin.js"],
+ "source": {
+ "include": [
+ "test/tests/functional/operation_example_tests.js",
+ "lib/connection/command_result.js",
+ "lib/topologies/mongos.js",
+ "lib/topologies/read_preference.js",
+ "lib/topologies/replset.js",
+ "lib/topologies/server.js",
+ "lib/topologies/replset_state.js",
+ "lib/connection/logger.js",
+ "lib/connection/connection.js",
+ "lib/cursor.js",
+ "lib/error.js",
+ "node_modules/bson/lib/bson/binary.js",
+ "node_modules/bson/lib/bson/code.js",
+ "node_modules/bson/lib/bson/db_ref.js",
+ "node_modules/bson/lib/bson/double.js",
+ "node_modules/bson/lib/bson/long.js",
+ "node_modules/bson/lib/bson/objectid.js",
+ "node_modules/bson/lib/bson/symbol.js",
+ "node_modules/bson/lib/bson/timestamp.js",
+ "node_modules/bson/lib/bson/max_key.js",
+ "node_modules/bson/lib/bson/min_key.js"
+ ]
+ },
+ "templates": {
+ "cleverLinks": true,
+ "monospaceLinks": true,
+ "default": {
+ "outputSourceFiles" : true
+ },
+ "applicationName": "Node.js MongoDB Driver API",
+ "disqus": true,
+ "googleAnalytics": "UA-29229787-1",
+ "openGraph": {
+ "title": "",
+ "type": "website",
+ "image": "",
+ "site_name": "",
+ "url": ""
+ },
+ "meta": {
+ "title": "",
+ "description": "",
+ "keyword": ""
+ },
+ "linenums": true
+ },
+ "markdown": {
+ "parser": "gfm",
+ "hardwrap": true,
+ "tags": ["examples"]
+ },
+ "examples": {
+ "indent": 4
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/connect_test.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/connect_test.js
new file mode 100644
index 0000000..47ee71e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/connect_test.js
@@ -0,0 +1,72 @@
+var Server = require('./lib/topologies/server');
+
+// Attempt to connect
+var server = new Server({
+ host: 'localhost', port: 27017, socketTimeout: 500
+});
+
+// function executeCursors(_server, cb) {
+// var count = 100;
+//
+// for(var i = 0; i < 100; i++) {
+// // Execute the write
+// var cursor = _server.cursor('test.test', {
+// find: 'test.test'
+// , query: {a:1}
+// }, {readPreference: new ReadPreference('secondary')});
+//
+// // Get the first document
+// cursor.next(function(err, doc) {
+// count = count - 1;
+// if(err) console.dir(err)
+// if(count == 0) return cb();
+// });
+// }
+// }
+
+server.on('connect', function(_server) {
+ // console.log("===== connect")
+ setInterval(function() {
+ _server.insert('test.test', [{a:1}], function(err, r) {
+ console.log("insert")
+ });
+ }, 1000)
+ // console.log("---------------------------------- 0")
+ // // Attempt authentication
+ // _server.auth('scram-sha-1', 'admin', 'root', 'root', function(err, r) {
+ // console.log("---------------------------------- 1")
+ // // console.dir(err)
+ // // console.dir(r)
+ //
+ // _server.insert('test.test', [{a:1}], function(err, r) {
+ // console.log("---------------------------------- 2")
+ // console.dir(err)
+ // if(r)console.dir(r.result)
+ // var name = null;
+ //
+ // _server.on('joined', function(_t, _server) {
+ // if(name == _server.name) {
+ // console.log("=========== joined :: " + _t + " :: " + _server.name)
+ // executeCursors(_server, function() {
+ // });
+ // }
+ // })
+ //
+ // // var s = _server.s.replicaSetState.secondaries[0];
+ // // s.destroy({emitClose:true});
+ // executeCursors(_server, function() {
+ // console.log("============== 0")
+ // // Attempt to force a server reconnect
+ // var s = _server.s.replicaSetState.secondaries[0];
+ // name = s.name;
+ // s.destroy({emitClose:true});
+ // // console.log("============== 1")
+ //
+ // // _server.destroy();
+ // // test.done();
+ // });
+ // });
+ // });
+});
+
+server.connect();
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/index.js
new file mode 100644
index 0000000..5011f4a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/index.js
@@ -0,0 +1,38 @@
+// module.exports = {
+// MongoError: require('./lib/error')
+// , Server: require('./lib/topologies/server')
+// , ReplSet: require('./lib/topologies/replset')
+// , Mongos: require('./lib/topologies/mongos')
+// , Logger: require('./lib/connection/logger')
+// , Cursor: require('./lib/cursor')
+// , ReadPreference: require('./lib/topologies/read_preference')
+// , BSON: require('bson')
+// // Raw operations
+// , Query: require('./lib/connection/commands').Query
+// // Auth mechanisms
+// , MongoCR: require('./lib/auth/mongocr')
+// , X509: require('./lib/auth/x509')
+// , Plain: require('./lib/auth/plain')
+// , GSSAPI: require('./lib/auth/gssapi')
+// , ScramSHA1: require('./lib/auth/scram')
+// }
+
+module.exports = {
+ MongoError: require('./lib/error')
+ , Connection: require('./lib/connection/connection')
+ , Server: require('./lib/topologies/server')
+ , ReplSet: require('./lib/topologies/replset')
+ , Mongos: require('./lib/topologies/mongos')
+ , Logger: require('./lib/connection/logger')
+ , Cursor: require('./lib/cursor')
+ , ReadPreference: require('./lib/topologies/read_preference')
+ , BSON: require('bson')
+ // Raw operations
+ , Query: require('./lib/connection/commands').Query
+ // Auth mechanisms
+ , MongoCR: require('./lib/auth/mongocr')
+ , X509: require('./lib/auth/x509')
+ , Plain: require('./lib/auth/plain')
+ , GSSAPI: require('./lib/auth/gssapi')
+ , ScramSHA1: require('./lib/auth/scram')
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/gssapi.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/gssapi.js
new file mode 100644
index 0000000..e06ce72
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/gssapi.js
@@ -0,0 +1,266 @@
+"use strict";
+
+var f = require('util').format
+ , crypto = require('crypto')
+ , require_optional = require('require_optional')
+ , Query = require('../connection/commands').Query
+ , MongoError = require('../error');
+
+var AuthSession = function(db, username, password, options) {
+ this.db = db;
+ this.username = username;
+ this.password = password;
+ this.options = options;
+}
+
+AuthSession.prototype.equal = function(session) {
+ return session.db == this.db
+ && session.username == this.username
+ && session.password == this.password;
+}
+
+// Kerberos class
+var Kerberos = null;
+var MongoAuthProcess = null;
+
+// Try to grab the Kerberos class
+try {
+ Kerberos = require_optional('kerberos').Kerberos;
+ // Authentication process for Mongo
+ MongoAuthProcess = require_optional('kerberos').processes.MongoAuthProcess
+} catch(err) {}
+
+/**
+ * Creates a new GSSAPI authentication mechanism
+ * @class
+ * @return {GSSAPI} A cursor instance
+ */
+var GSSAPI = function(bson) {
+ this.bson = bson;
+ this.authStore = [];
+}
+
+/**
+ * Authenticate
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {string} db Name of the database
+ * @param {string} username Username
+ * @param {string} password Password
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+GSSAPI.prototype.auth = function(server, connections, db, username, password, options, callback) {
+ var self = this;
+ // We don't have the Kerberos library
+ if(Kerberos == null) return callback(new Error("Kerberos library is not installed"));
+ var gssapiServiceName = options['gssapiServiceName'] || 'mongodb';
+ // Total connections
+ var count = connections.length;
+ if(count == 0) return callback(null, null);
+
+ // Valid connections
+ var numberOfValidConnections = 0;
+ var credentialsValid = false;
+ var errorObject = null;
+
+ // For each connection we need to authenticate
+ while(connections.length > 0) {
+ // Execute MongoCR
+ var execute = function(connection) {
+ // Start Auth process for a connection
+ GSSAPIInitialize(self, db, username, password, db, gssapiServiceName, server, connection, options, function(err, r) {
+ // Adjust count
+ count = count - 1;
+
+ // If we have an error
+ if(err) {
+ errorObject = err;
+ } else if(r.result['$err']) {
+ errorObject = r.result;
+ } else if(r.result['errmsg']) {
+ errorObject = r.result;
+ } else {
+ credentialsValid = true;
+ numberOfValidConnections = numberOfValidConnections + 1;
+ }
+
+ // We have authenticated all connections
+ if(count == 0 && numberOfValidConnections > 0) {
+ // Store the auth details
+ addAuthSession(self.authStore, new AuthSession(db, username, password, options));
+ // Return correct authentication
+ callback(null, true);
+ } else if(count == 0) {
+ if(errorObject == null) errorObject = new MongoError(f("failed to authenticate using mongocr"));
+ callback(errorObject, false);
+ }
+ });
+ }
+
+ var _execute = function(_connection) {
+ process.nextTick(function() {
+ execute(_connection);
+ });
+ }
+
+ _execute(connections.shift());
+ }
+}
+
+//
+// Initialize step
+var GSSAPIInitialize = function(self, db, username, password, authdb, gssapiServiceName, server, connection, options, callback) {
+ // Create authenticator
+ var mongo_auth_process = new MongoAuthProcess(connection.host, connection.port, gssapiServiceName, options);
+
+ // Perform initialization
+ mongo_auth_process.init(username, password, function(err, context) {
+ if(err) return callback(err, false);
+
+ // Perform the first step
+ mongo_auth_process.transition('', function(err, payload) {
+ if(err) return callback(err, false);
+
+ // Call the next db step
+ MongoDBGSSAPIFirstStep(self, mongo_auth_process, payload, db, username, password, authdb, server, connection, callback);
+ });
+ });
+}
+
+//
+// Perform first step against mongodb
+var MongoDBGSSAPIFirstStep = function(self, mongo_auth_process, payload, db, username, password, authdb, server, connection, callback) {
+ // Build the sasl start command
+ var command = {
+ saslStart: 1
+ , mechanism: 'GSSAPI'
+ , payload: payload
+ , autoAuthorize: 1
+ };
+
+ // Write the commmand on the connection
+ server(connection, new Query(self.bson, "$external.$cmd", command, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ if(err) return callback(err, false);
+ var doc = r.result;
+ // Execute mongodb transition
+ mongo_auth_process.transition(r.result.payload, function(err, payload) {
+ if(err) return callback(err, false);
+
+ // MongoDB API Second Step
+ MongoDBGSSAPISecondStep(self, mongo_auth_process, payload, doc, db, username, password, authdb, server, connection, callback);
+ });
+ });
+}
+
+//
+// Perform first step against mongodb
+var MongoDBGSSAPISecondStep = function(self, mongo_auth_process, payload, doc, db, username, password, authdb, server, connection, callback) {
+ // Build Authentication command to send to MongoDB
+ var command = {
+ saslContinue: 1
+ , conversationId: doc.conversationId
+ , payload: payload
+ };
+
+ // Execute the command
+ // Write the commmand on the connection
+ server(connection, new Query(self.bson, "$external.$cmd", command, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ if(err) return callback(err, false);
+ var doc = r.result;
+ // Call next transition for kerberos
+ mongo_auth_process.transition(doc.payload, function(err, payload) {
+ if(err) return callback(err, false);
+
+ // Call the last and third step
+ MongoDBGSSAPIThirdStep(self, mongo_auth_process, payload, doc, db, username, password, authdb, server, connection, callback);
+ });
+ });
+}
+
+var MongoDBGSSAPIThirdStep = function(self, mongo_auth_process, payload, doc, db, username, password, authdb, server, connection, callback) {
+ // Build final command
+ var command = {
+ saslContinue: 1
+ , conversationId: doc.conversationId
+ , payload: payload
+ };
+
+ // Execute the command
+ server(connection, new Query(self.bson, "$external.$cmd", command, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ if(err) return callback(err, false);
+ mongo_auth_process.transition(null, function(err, payload) {
+ if(err) return callback(err, null);
+ callback(null, r);
+ });
+ });
+}
+
+// Add to store only if it does not exist
+var addAuthSession = function(authStore, session) {
+ var found = false;
+
+ for(var i = 0; i < authStore.length; i++) {
+ if(authStore[i].equal(session)) {
+ found = true;
+ break;
+ }
+ }
+
+ if(!found) authStore.push(session);
+}
+
+/**
+ * Remove authStore credentials
+ * @method
+ * @param {string} db Name of database we are removing authStore details about
+ * @return {object}
+ */
+GSSAPI.prototype.logout = function(dbName) {
+ this.authStore = this.authStore.filter(function(x) {
+ return x.db != dbName;
+ });
+}
+
+/**
+ * Re authenticate pool
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+GSSAPI.prototype.reauthenticate = function(server, connections, callback) {
+ var authStore = this.authStore.slice(0);
+ var err = null;
+ var count = authStore.length;
+ if(count == 0) return callback(null, null);
+ // Iterate over all the auth details stored
+ for(var i = 0; i < authStore.length; i++) {
+ this.auth(server, connections, authStore[i].db, authStore[i].username, authStore[i].password, authStore[i].options, function(err, r) {
+ if(err) err = err;
+ count = count - 1;
+ // Done re-authenticating
+ if(count == 0) {
+ callback(err, null);
+ }
+ });
+ }
+}
+
+/**
+ * This is a result from a authentication strategy
+ *
+ * @callback authResultCallback
+ * @param {error} error An error object. Set to null if no error present
+ * @param {boolean} result The result of the authentication process
+ */
+
+module.exports = GSSAPI;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/mongocr.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/mongocr.js
new file mode 100644
index 0000000..0df70a0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/mongocr.js
@@ -0,0 +1,185 @@
+"use strict";
+
+var f = require('util').format
+ , crypto = require('crypto')
+ , Query = require('../connection/commands').Query
+ , MongoError = require('../error');
+
+var AuthSession = function(db, username, password) {
+ this.db = db;
+ this.username = username;
+ this.password = password;
+}
+
+AuthSession.prototype.equal = function(session) {
+ return session.db == this.db
+ && session.username == this.username
+ && session.password == this.password;
+}
+
+/**
+ * Creates a new MongoCR authentication mechanism
+ * @class
+ * @return {MongoCR} A cursor instance
+ */
+var MongoCR = function(bson) {
+ this.bson = bson;
+ this.authStore = [];
+}
+
+// Add to store only if it does not exist
+var addAuthSession = function(authStore, session) {
+ var found = false;
+
+ for(var i = 0; i < authStore.length; i++) {
+ if(authStore[i].equal(session)) {
+ found = true;
+ break;
+ }
+ }
+
+ if(!found) authStore.push(session);
+}
+
+/**
+ * Authenticate
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {string} db Name of the database
+ * @param {string} username Username
+ * @param {string} password Password
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+MongoCR.prototype.auth = function(server, connections, db, username, password, callback) {
+ var self = this;
+ // Total connections
+ var count = connections.length;
+ if(count == 0) return callback(null, null);
+
+ // Valid connections
+ var numberOfValidConnections = 0;
+ var credentialsValid = false;
+ var errorObject = null;
+
+ // For each connection we need to authenticate
+ while(connections.length > 0) {
+ // Execute MongoCR
+ var executeMongoCR = function(connection) {
+ // Write the commmand on the connection
+ server(connection, new Query(self.bson, f("%s.$cmd", db), {
+ getnonce:1
+ }, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ var nonce = null;
+ var key = null;
+
+ // Adjust the number of connections left
+ // Get nonce
+ if(err == null) {
+ nonce = r.result.nonce;
+ // Use node md5 generator
+ var md5 = crypto.createHash('md5');
+ // Generate keys used for authentication
+ md5.update(username + ":mongo:" + password, 'utf8');
+ var hash_password = md5.digest('hex');
+ // Final key
+ md5 = crypto.createHash('md5');
+ md5.update(nonce + username + hash_password, 'utf8');
+ key = md5.digest('hex');
+ }
+
+ // Execute command
+ // Write the commmand on the connection
+ server(connection, new Query(self.bson, f("%s.$cmd", db), {
+ authenticate: 1, user: username, nonce: nonce, key:key
+ }, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ count = count - 1;
+
+ // If we have an error
+ if(err) {
+ errorObject = err;
+ } else if(r.result['$err']) {
+ errorObject = r.result;
+ } else if(r.result['errmsg']) {
+ errorObject = r.result;
+ } else {
+ credentialsValid = true;
+ numberOfValidConnections = numberOfValidConnections + 1;
+ }
+
+ // We have authenticated all connections
+ if(count == 0 && numberOfValidConnections > 0) {
+ // Store the auth details
+ addAuthSession(self.authStore, new AuthSession(db, username, password));
+ // Return correct authentication
+ callback(null, true);
+ } else if(count == 0) {
+ if(errorObject == null) errorObject = new MongoError(f("failed to authenticate using mongocr"));
+ callback(errorObject, false);
+ }
+ });
+ });
+ }
+
+ var _execute = function(_connection) {
+ process.nextTick(function() {
+ executeMongoCR(_connection);
+ });
+ }
+
+ _execute(connections.shift());
+ }
+}
+
+/**
+ * Remove authStore credentials
+ * @method
+ * @param {string} db Name of database we are removing authStore details about
+ * @return {object}
+ */
+MongoCR.prototype.logout = function(dbName) {
+ this.authStore = this.authStore.filter(function(x) {
+ return x.db != dbName;
+ });
+}
+
+/**
+ * Re authenticate pool
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+MongoCR.prototype.reauthenticate = function(server, connections, callback) {
+ var authStore = this.authStore.slice(0);
+ var err = null;
+ var count = authStore.length;
+ if(count == 0) return callback(null, null);
+ // Iterate over all the auth details stored
+ for(var i = 0; i < authStore.length; i++) {
+ this.auth(server, connections, authStore[i].db, authStore[i].username, authStore[i].password, function(err, r) {
+ if(err) err = err;
+ count = count - 1;
+ // Done re-authenticating
+ if(count == 0) {
+ callback(err, null);
+ }
+ });
+ }
+}
+
+/**
+ * This is a result from a authentication strategy
+ *
+ * @callback authResultCallback
+ * @param {error} error An error object. Set to null if no error present
+ * @param {boolean} result The result of the authentication process
+ */
+
+module.exports = MongoCR;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/plain.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/plain.js
new file mode 100644
index 0000000..37bac30
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/plain.js
@@ -0,0 +1,170 @@
+"use strict";
+
+var f = require('util').format
+ , crypto = require('crypto')
+ , Binary = require('bson').Binary
+ , Query = require('../connection/commands').Query
+ , MongoError = require('../error');
+
+var AuthSession = function(db, username, password) {
+ this.db = db;
+ this.username = username;
+ this.password = password;
+}
+
+AuthSession.prototype.equal = function(session) {
+ return session.db == this.db
+ && session.username == this.username
+ && session.password == this.password;
+}
+
+/**
+ * Creates a new Plain authentication mechanism
+ * @class
+ * @return {Plain} A cursor instance
+ */
+var Plain = function(bson) {
+ this.bson = bson;
+ this.authStore = [];
+}
+
+/**
+ * Authenticate
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {string} db Name of the database
+ * @param {string} username Username
+ * @param {string} password Password
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+Plain.prototype.auth = function(server, connections, db, username, password, callback) {
+ var self = this;
+ // Total connections
+ var count = connections.length;
+ if(count == 0) return callback(null, null);
+
+ // Valid connections
+ var numberOfValidConnections = 0;
+ var credentialsValid = false;
+ var errorObject = null;
+
+ // For each connection we need to authenticate
+ while(connections.length > 0) {
+ // Execute MongoCR
+ var execute = function(connection) {
+ // Create payload
+ var payload = new Binary(f("\x00%s\x00%s", username, password));
+
+ // Let's start the sasl process
+ var command = {
+ saslStart: 1
+ , mechanism: 'PLAIN'
+ , payload: payload
+ , autoAuthorize: 1
+ };
+
+ // Let's start the process
+ server(connection, new Query(self.bson, "$external.$cmd", command, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ // Adjust count
+ count = count - 1;
+
+ // If we have an error
+ if(err) {
+ errorObject = err;
+ } else if(r.result['$err']) {
+ errorObject = r.result;
+ } else if(r.result['errmsg']) {
+ errorObject = r.result;
+ } else {
+ credentialsValid = true;
+ numberOfValidConnections = numberOfValidConnections + 1;
+ }
+
+ // We have authenticated all connections
+ if(count == 0 && numberOfValidConnections > 0) {
+ // Store the auth details
+ addAuthSession(self.authStore, new AuthSession(db, username, password));
+ // Return correct authentication
+ callback(null, true);
+ } else if(count == 0) {
+ if(errorObject == null) errorObject = new MongoError(f("failed to authenticate using mongocr"));
+ callback(errorObject, false);
+ }
+ });
+ }
+
+ var _execute = function(_connection) {
+ process.nextTick(function() {
+ execute(_connection);
+ });
+ }
+
+ _execute(connections.shift());
+ }
+}
+
+// Add to store only if it does not exist
+var addAuthSession = function(authStore, session) {
+ var found = false;
+
+ for(var i = 0; i < authStore.length; i++) {
+ if(authStore[i].equal(session)) {
+ found = true;
+ break;
+ }
+ }
+
+ if(!found) authStore.push(session);
+}
+
+/**
+ * Remove authStore credentials
+ * @method
+ * @param {string} db Name of database we are removing authStore details about
+ * @return {object}
+ */
+Plain.prototype.logout = function(dbName) {
+ this.authStore = this.authStore.filter(function(x) {
+ return x.db != dbName;
+ });
+}
+
+/**
+ * Re authenticate pool
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+Plain.prototype.reauthenticate = function(server, connections, callback) {
+ var authStore = this.authStore.slice(0);
+ var err = null;
+ var count = authStore.length;
+ if(count == 0) return callback(null, null);
+ // Iterate over all the auth details stored
+ for(var i = 0; i < authStore.length; i++) {
+ this.auth(server, connections, authStore[i].db, authStore[i].username, authStore[i].password, function(err, r) {
+ if(err) err = err;
+ count = count - 1;
+ // Done re-authenticating
+ if(count == 0) {
+ callback(err, null);
+ }
+ });
+ }
+}
+
+/**
+ * This is a result from a authentication strategy
+ *
+ * @callback authResultCallback
+ * @param {error} error An error object. Set to null if no error present
+ * @param {boolean} result The result of the authentication process
+ */
+
+module.exports = Plain;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/scram.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/scram.js
new file mode 100644
index 0000000..0a620b3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/scram.js
@@ -0,0 +1,345 @@
+"use strict";
+
+var f = require('util').format
+ , crypto = require('crypto')
+ , Query = require('../connection/commands').Query
+ , Binary = require('bson').Binary
+ , MongoError = require('../error');
+
+var AuthSession = function(db, username, password) {
+ this.db = db;
+ this.username = username;
+ this.password = password;
+}
+
+AuthSession.prototype.equal = function(session) {
+ return session.db == this.db
+ && session.username == this.username
+ && session.password == this.password;
+}
+
+var id = 0;
+
+/**
+ * Creates a new ScramSHA1 authentication mechanism
+ * @class
+ * @return {ScramSHA1} A cursor instance
+ */
+var ScramSHA1 = function(bson) {
+ this.bson = bson;
+ this.authStore = [];
+ this.id = id++;
+}
+
+var parsePayload = function(payload) {
+ var dict = {};
+ var parts = payload.split(',');
+
+ for(var i = 0; i < parts.length; i++) {
+ var valueParts = parts[i].split('=');
+ dict[valueParts[0]] = valueParts[1];
+ }
+
+ return dict;
+}
+
+var passwordDigest = function(username, password) {
+ if(typeof username != 'string') throw new MongoError("username must be a string");
+ if(typeof password != 'string') throw new MongoError("password must be a string");
+ if(password.length == 0) throw new MongoError("password cannot be empty");
+ // Use node md5 generator
+ var md5 = crypto.createHash('md5');
+ // Generate keys used for authentication
+ md5.update(username + ":mongo:" + password, 'utf8');
+ return md5.digest('hex');
+}
+
+// XOR two buffers
+var xor = function(a, b) {
+ if (!Buffer.isBuffer(a)) a = new Buffer(a)
+ if (!Buffer.isBuffer(b)) b = new Buffer(b)
+ var res = []
+ if (a.length > b.length) {
+ for (var i = 0; i < b.length; i++) {
+ res.push(a[i] ^ b[i])
+ }
+ } else {
+ for (var i = 0; i < a.length; i++) {
+ res.push(a[i] ^ b[i])
+ }
+ }
+ return new Buffer(res);
+}
+
+// Create a final digest
+var hi = function(data, salt, iterations) {
+ // Create digest
+ var digest = function(msg) {
+ var hmac = crypto.createHmac('sha1', data);
+ hmac.update(msg);
+ return new Buffer(hmac.digest('base64'), 'base64');
+ }
+
+ // Create variables
+ salt = Buffer.concat([salt, new Buffer('\x00\x00\x00\x01')])
+ var ui = digest(salt);
+ var u1 = ui;
+
+ for(var i = 0; i < iterations - 1; i++) {
+ u1 = digest(u1);
+ ui = xor(ui, u1);
+ }
+
+ return ui;
+}
+
+/**
+ * Authenticate
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {string} db Name of the database
+ * @param {string} username Username
+ * @param {string} password Password
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+ScramSHA1.prototype.auth = function(server, connections, db, username, password, callback) {
+ var self = this;
+ // Total connections
+ var count = connections.length;
+ if(count == 0) return callback(null, null);
+
+ // Valid connections
+ var numberOfValidConnections = 0;
+ var credentialsValid = false;
+ var errorObject = null;
+
+ // Execute MongoCR
+ var executeScram = function(connection) {
+ // Clean up the user
+ username = username.replace('=', "=3D").replace(',', '=2C');
+
+ // Create a random nonce
+ var nonce = crypto.randomBytes(24).toString('base64');
+ // var nonce = 'MsQUY9iw0T9fx2MUEz6LZPwGuhVvWAhc'
+ var firstBare = f("n=%s,r=%s", username, nonce);
+
+ // Build command structure
+ var cmd = {
+ saslStart: 1
+ , mechanism: 'SCRAM-SHA-1'
+ , payload: new Binary(f("n,,%s", firstBare))
+ , autoAuthorize: 1
+ }
+
+ // Handle the error
+ var handleError = function(err, r) {
+ if(err) {
+ numberOfValidConnections = numberOfValidConnections - 1;
+ errorObject = err; return false;
+ } else if(r.result['$err']) {
+ errorObject = r.result; return false;
+ } else if(r.result['errmsg']) {
+ errorObject = r.result; return false;
+ } else {
+ credentialsValid = true;
+ numberOfValidConnections = numberOfValidConnections + 1;
+ }
+
+ return true
+ }
+
+ // Finish up
+ var finish = function(_count, _numberOfValidConnections) {
+ if(_count == 0 && _numberOfValidConnections > 0) {
+ // Store the auth details
+ addAuthSession(self.authStore, new AuthSession(db, username, password));
+ // Return correct authentication
+ return callback(null, true);
+ } else if(_count == 0) {
+ if(errorObject == null) errorObject = new MongoError(f("failed to authenticate using scram"));
+ return callback(errorObject, false);
+ }
+ }
+
+ var handleEnd = function(_err, _r) {
+ // Handle any error
+ handleError(_err, _r)
+ // Adjust the number of connections
+ count = count - 1;
+ // Execute the finish
+ finish(count, numberOfValidConnections);
+ }
+
+ // Write the commmand on the connection
+ server(connection, new Query(self.bson, f("%s.$cmd", db), cmd, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ // Do we have an error, handle it
+ if(handleError(err, r) == false) {
+ count = count - 1;
+
+ if(count == 0 && numberOfValidConnections > 0) {
+ // Store the auth details
+ addAuthSession(self.authStore, new AuthSession(db, username, password));
+ // Return correct authentication
+ return callback(null, true);
+ } else if(count == 0) {
+ if(errorObject == null) errorObject = new MongoError(f("failed to authenticate using scram"));
+ return callback(errorObject, false);
+ }
+
+ return;
+ }
+
+ // Get the dictionary
+ var dict = parsePayload(r.result.payload.value())
+
+ // Unpack dictionary
+ var iterations = parseInt(dict.i, 10);
+ var salt = dict.s;
+ var rnonce = dict.r;
+
+ // Set up start of proof
+ var withoutProof = f("c=biws,r=%s", rnonce);
+ var passwordDig = passwordDigest(username, password);
+ var saltedPassword = hi(passwordDig
+ , new Buffer(salt, 'base64')
+ , iterations);
+
+ // Create the client key
+ var hmac = crypto.createHmac('sha1', saltedPassword);
+ hmac.update(new Buffer("Client Key"));
+ var clientKey = new Buffer(hmac.digest('base64'), 'base64');
+
+ // Create the stored key
+ var hash = crypto.createHash('sha1');
+ hash.update(clientKey);
+ var storedKey = new Buffer(hash.digest('base64'), 'base64');
+
+ // Create the authentication message
+ var authMsg = [firstBare, r.result.payload.value().toString('base64'), withoutProof].join(',');
+
+ // Create client signature
+ var hmac = crypto.createHmac('sha1', storedKey);
+ hmac.update(new Buffer(authMsg));
+ var clientSig = new Buffer(hmac.digest('base64'), 'base64');
+
+ // Create client proof
+ var clientProof = f("p=%s", new Buffer(xor(clientKey, clientSig)).toString('base64'));
+
+ // Create client final
+ var clientFinal = [withoutProof, clientProof].join(',');
+
+ // Generate server key
+ var hmac = crypto.createHmac('sha1', saltedPassword);
+ hmac.update(new Buffer('Server Key'))
+ var serverKey = new Buffer(hmac.digest('base64'), 'base64');
+
+ // Generate server signature
+ var hmac = crypto.createHmac('sha1', serverKey);
+ hmac.update(new Buffer(authMsg))
+ var serverSig = new Buffer(hmac.digest('base64'), 'base64');
+
+ //
+ // Create continue message
+ var cmd = {
+ saslContinue: 1
+ , conversationId: r.result.conversationId
+ , payload: new Binary(new Buffer(clientFinal))
+ }
+
+ //
+ // Execute sasl continue
+ // Write the commmand on the connection
+ server(connection, new Query(self.bson, f("%s.$cmd", db), cmd, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ if(r && r.result.done == false) {
+ var cmd = {
+ saslContinue: 1
+ , conversationId: r.result.conversationId
+ , payload: new Buffer(0)
+ }
+
+ // Write the commmand on the connection
+ server(connection, new Query(self.bson, f("%s.$cmd", db), cmd, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ handleEnd(err, r);
+ });
+ } else {
+ handleEnd(err, r);
+ }
+ });
+ });
+ }
+
+ var _execute = function(_connection) {
+ process.nextTick(function() {
+ executeScram(_connection);
+ });
+ }
+
+ // For each connection we need to authenticate
+ while(connections.length > 0) {
+ _execute(connections.shift());
+ }
+}
+
+// Add to store only if it does not exist
+var addAuthSession = function(authStore, session) {
+ var found = false;
+
+ for(var i = 0; i < authStore.length; i++) {
+ if(authStore[i].equal(session)) {
+ found = true;
+ break;
+ }
+ }
+
+ if(!found) authStore.push(session);
+}
+
+/**
+ * Remove authStore credentials
+ * @method
+ * @param {string} db Name of database we are removing authStore details about
+ * @return {object}
+ */
+ScramSHA1.prototype.logout = function(dbName) {
+ this.authStore = this.authStore.filter(function(x) {
+ return x.db != dbName;
+ });
+}
+
+/**
+ * Re authenticate pool
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+ScramSHA1.prototype.reauthenticate = function(server, connections, callback) {
+ var authStore = this.authStore.slice(0);
+ var count = authStore.length;
+ var err = null;
+ // No connections
+ if(count == 0) return callback(null, null);
+ // Iterate over all the auth details stored
+ for(var i = 0; i < authStore.length; i++) {
+ this.auth(server, connections, authStore[i].db, authStore[i].username, authStore[i].password, function(err, r) {
+ if(err) err = err;
+ count = count - 1;
+ // Done re-authenticating
+ if(count == 0) {
+ callback(err, null);
+ }
+ });
+ }
+}
+
+
+module.exports = ScramSHA1;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/sspi.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/sspi.js
new file mode 100644
index 0000000..01be1bf
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/sspi.js
@@ -0,0 +1,255 @@
+"use strict";
+
+var f = require('util').format
+ , crypto = require('crypto')
+ , require_optional = require('require_optional')
+ , Query = require('../connection/commands').Query
+ , MongoError = require('../error');
+
+var AuthSession = function(db, username, password, options) {
+ this.db = db;
+ this.username = username;
+ this.password = password;
+ this.options = options;
+}
+
+AuthSession.prototype.equal = function(session) {
+ return session.db == this.db
+ && session.username == this.username
+ && session.password == this.password;
+}
+
+// Kerberos class
+var Kerberos = null;
+var MongoAuthProcess = null;
+
+// Try to grab the Kerberos class
+try {
+ Kerberos = require_optional('kerberos').Kerberos
+ // Authentication process for Mongo
+ MongoAuthProcess = require_optional('kerberos').processes.MongoAuthProcess
+} catch(err) {}
+
+/**
+ * Creates a new SSPI authentication mechanism
+ * @class
+ * @return {SSPI} A cursor instance
+ */
+var SSPI = function(bson) {
+ this.bson = bson;
+ this.authStore = [];
+}
+
+/**
+ * Authenticate
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {string} db Name of the database
+ * @param {string} username Username
+ * @param {string} password Password
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+SSPI.prototype.auth = function(server, connections, db, username, password, options, callback) {
+ var self = this;
+ // We don't have the Kerberos library
+ if(Kerberos == null) return callback(new Error("Kerberos library is not installed"));
+ var gssapiServiceName = options['gssapiServiceName'] || 'mongodb';
+ // Total connections
+ var count = connections.length;
+ if(count == 0) return callback(null, null);
+
+ // Valid connections
+ var numberOfValidConnections = 0;
+ var credentialsValid = false;
+ var errorObject = null;
+
+ // For each connection we need to authenticate
+ while(connections.length > 0) {
+ // Execute MongoCR
+ var execute = function(connection) {
+ // Start Auth process for a connection
+ SSIPAuthenticate(self, username, password, gssapiServiceName, server, connection, options, function(err, r) {
+ // Adjust count
+ count = count - 1;
+
+ // If we have an error
+ if(err) {
+ errorObject = err;
+ } else if(r && typeof r == 'object' && r.result['$err']) {
+ errorObject = r.result;
+ } else if(r && typeof r == 'object' && r.result['errmsg']) {
+ errorObject = r.result;
+ } else {
+ credentialsValid = true;
+ numberOfValidConnections = numberOfValidConnections + 1;
+ }
+
+ // We have authenticated all connections
+ if(count == 0 && numberOfValidConnections > 0) {
+ // Store the auth details
+ addAuthSession(self.authStore, new AuthSession(db, username, password, options));
+ // Return correct authentication
+ callback(null, true);
+ } else if(count == 0) {
+ if(errorObject == null) errorObject = new MongoError(f("failed to authenticate using mongocr"));
+ callback(errorObject, false);
+ }
+ });
+ }
+
+ var _execute = function(_connection) {
+ process.nextTick(function() {
+ execute(_connection);
+ });
+ }
+
+ _execute(connections.shift());
+ }
+}
+
+var SSIPAuthenticate = function(self, username, password, gssapiServiceName, server, connection, options, callback) {
+ // Build Authentication command to send to MongoDB
+ var command = {
+ saslStart: 1
+ , mechanism: 'GSSAPI'
+ , payload: ''
+ , autoAuthorize: 1
+ };
+
+ // Create authenticator
+ var mongo_auth_process = new MongoAuthProcess(connection.host, connection.port, gssapiServiceName, options);
+
+ // Execute first sasl step
+ server(connection, new Query(self.bson, "$external.$cmd", command, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ if(err) return callback(err, false);
+ var doc = r.result;
+
+ mongo_auth_process.init(username, password, function(err) {
+ if(err) return callback(err);
+
+ mongo_auth_process.transition(doc.payload, function(err, payload) {
+ if(err) return callback(err);
+
+ // Perform the next step against mongod
+ var command = {
+ saslContinue: 1
+ , conversationId: doc.conversationId
+ , payload: payload
+ };
+
+ // Execute the command
+ server(connection, new Query(self.bson, "$external.$cmd", command, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ if(err) return callback(err, false);
+ var doc = r.result;
+
+ mongo_auth_process.transition(doc.payload, function(err, payload) {
+ if(err) return callback(err);
+
+ // Perform the next step against mongod
+ var command = {
+ saslContinue: 1
+ , conversationId: doc.conversationId
+ , payload: payload
+ };
+
+ // Execute the command
+ server(connection, new Query(self.bson, "$external.$cmd", command, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ if(err) return callback(err, false);
+ var doc = r.result;
+
+ mongo_auth_process.transition(doc.payload, function(err, payload) {
+ // Perform the next step against mongod
+ var command = {
+ saslContinue: 1
+ , conversationId: doc.conversationId
+ , payload: payload
+ };
+
+ // Execute the command
+ server(connection, new Query(self.bson, "$external.$cmd", command, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ if(err) return callback(err, false);
+ var doc = r.result;
+
+ if(doc.done) return callback(null, true);
+ callback(new Error("Authentication failed"), false);
+ });
+ });
+ });
+ });
+ });
+ });
+ });
+ });
+}
+
+// Add to store only if it does not exist
+var addAuthSession = function(authStore, session) {
+ var found = false;
+
+ for(var i = 0; i < authStore.length; i++) {
+ if(authStore[i].equal(session)) {
+ found = true;
+ break;
+ }
+ }
+
+ if(!found) authStore.push(session);
+}
+
+/**
+ * Remove authStore credentials
+ * @method
+ * @param {string} db Name of database we are removing authStore details about
+ * @return {object}
+ */
+SSPI.prototype.logout = function(dbName) {
+ this.authStore = this.authStore.filter(function(x) {
+ return x.db != dbName;
+ });
+}
+
+/**
+ * Re authenticate pool
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+SSPI.prototype.reauthenticate = function(server, connections, callback) {
+ var authStore = this.authStore.slice(0);
+ var err = null;
+ var count = authStore.length;
+ if(count == 0) return callback(null, null);
+ // Iterate over all the auth details stored
+ for(var i = 0; i < authStore.length; i++) {
+ this.auth(server, connections, authStore[i].db, authStore[i].username, authStore[i].password, authStore[i].options, function(err, r) {
+ if(err) err = err;
+ count = count - 1;
+ // Done re-authenticating
+ if(count == 0) {
+ callback(err, null);
+ }
+ });
+ }
+}
+
+/**
+ * This is a result from a authentication strategy
+ *
+ * @callback authResultCallback
+ * @param {error} error An error object. Set to null if no error present
+ * @param {boolean} result The result of the authentication process
+ */
+
+module.exports = SSPI;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/x509.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/x509.js
new file mode 100644
index 0000000..e3117c0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/x509.js
@@ -0,0 +1,165 @@
+"use strict";
+
+var f = require('util').format
+ , crypto = require('crypto')
+ , Query = require('../connection/commands').Query
+ , MongoError = require('../error');
+
+var AuthSession = function(db, username, password) {
+ this.db = db;
+ this.username = username;
+ this.password = password;
+}
+
+AuthSession.prototype.equal = function(session) {
+ return session.db == this.db
+ && session.username == this.username
+ && session.password == this.password;
+}
+
+/**
+ * Creates a new X509 authentication mechanism
+ * @class
+ * @return {X509} A cursor instance
+ */
+var X509 = function(bson) {
+ this.bson = bson;
+ this.authStore = [];
+}
+
+/**
+ * Authenticate
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {string} db Name of the database
+ * @param {string} username Username
+ * @param {string} password Password
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+X509.prototype.auth = function(server, connections, db, username, password, callback) {
+ var self = this;
+ // Total connections
+ var count = connections.length;
+ if(count == 0) return callback(null, null);
+
+ // Valid connections
+ var numberOfValidConnections = 0;
+ var credentialsValid = false;
+ var errorObject = null;
+
+ // For each connection we need to authenticate
+ while(connections.length > 0) {
+ // Execute MongoCR
+ var execute = function(connection) {
+ // Let's start the sasl process
+ var command = {
+ authenticate: 1
+ , mechanism: 'MONGODB-X509'
+ , user: username
+ };
+
+ // Let's start the process
+ server(connection, new Query(self.bson, "$external.$cmd", command, {
+ numberToSkip: 0, numberToReturn: 1
+ }), function(err, r) {
+ // Adjust count
+ count = count - 1;
+
+ // If we have an error
+ if(err) {
+ errorObject = err;
+ } else if(r.result['$err']) {
+ errorObject = r.result;
+ } else if(r.result['errmsg']) {
+ errorObject = r.result;
+ } else {
+ credentialsValid = true;
+ numberOfValidConnections = numberOfValidConnections + 1;
+ }
+
+ // We have authenticated all connections
+ if(count == 0 && numberOfValidConnections > 0) {
+ // Store the auth details
+ addAuthSession(self.authStore, new AuthSession(db, username, password));
+ // Return correct authentication
+ callback(null, true);
+ } else if(count == 0) {
+ if(errorObject == null) errorObject = new MongoError(f("failed to authenticate using mongocr"));
+ callback(errorObject, false);
+ }
+ });
+ }
+
+ var _execute = function(_connection) {
+ process.nextTick(function() {
+ execute(_connection);
+ });
+ }
+
+ _execute(connections.shift());
+ }
+}
+
+// Add to store only if it does not exist
+var addAuthSession = function(authStore, session) {
+ var found = false;
+
+ for(var i = 0; i < authStore.length; i++) {
+ if(authStore[i].equal(session)) {
+ found = true;
+ break;
+ }
+ }
+
+ if(!found) authStore.push(session);
+}
+
+/**
+ * Remove authStore credentials
+ * @method
+ * @param {string} db Name of database we are removing authStore details about
+ * @return {object}
+ */
+X509.prototype.logout = function(dbName) {
+ this.authStore = this.authStore.filter(function(x) {
+ return x.db != dbName;
+ });
+}
+
+/**
+ * Re authenticate pool
+ * @method
+ * @param {{Server}|{ReplSet}|{Mongos}} server Topology the authentication method is being called on
+ * @param {[]Connections} connections Connections to authenticate using this authenticator
+ * @param {authResultCallback} callback The callback to return the result from the authentication
+ * @return {object}
+ */
+X509.prototype.reauthenticate = function(server, connections, callback) {
+ var authStore = this.authStore.slice(0);
+ var err = null;
+ var count = authStore.length;
+ if(count == 0) return callback(null, null);
+ // Iterate over all the auth details stored
+ for(var i = 0; i < authStore.length; i++) {
+ this.auth(server, connections, authStore[i].db, authStore[i].username, authStore[i].password, function(err, r) {
+ if(err) err = err;
+ count = count - 1;
+ // Done re-authenticating
+ if(count == 0) {
+ callback(err, null);
+ }
+ });
+ }
+}
+
+/**
+ * This is a result from a authentication strategy
+ *
+ * @callback authResultCallback
+ * @param {error} error An error object. Set to null if no error present
+ * @param {boolean} result The result of the authentication process
+ */
+
+module.exports = X509;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/command_result.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/command_result.js
new file mode 100644
index 0000000..eb7b27a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/command_result.js
@@ -0,0 +1,38 @@
+"use strict";
+
+var setProperty = require('../connection/utils').setProperty
+ , getProperty = require('../connection/utils').getProperty
+ , getSingleProperty = require('../connection/utils').getSingleProperty;
+
+/**
+ * Creates a new CommandResult instance
+ * @class
+ * @param {object} result CommandResult object
+ * @param {Connection} connection A connection instance associated with this result
+ * @return {CommandResult} A cursor instance
+ */
+var CommandResult = function(result, connection, message) {
+ this.result = result;
+ this.connection = connection;
+ this.message = message;
+}
+
+/**
+ * Convert CommandResult to JSON
+ * @method
+ * @return {object}
+ */
+CommandResult.prototype.toJSON = function() {
+ return this.result;
+}
+
+/**
+ * Convert CommandResult to String representation
+ * @method
+ * @return {string}
+ */
+CommandResult.prototype.toString = function() {
+ return JSON.stringify(this.toJSON());
+}
+
+module.exports = CommandResult;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/commands.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/commands.js
new file mode 100644
index 0000000..7999e59
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/commands.js
@@ -0,0 +1,555 @@
+"use strict";
+
+var f = require('util').format
+ , Long = require('bson').Long
+ , setProperty = require('./utils').setProperty
+ , getProperty = require('./utils').getProperty
+ , getSingleProperty = require('./utils').getSingleProperty;
+
+// Incrementing request id
+var _requestId = 0;
+
+// Wire command operation ids
+var OP_QUERY = 2004;
+var OP_GETMORE = 2005;
+var OP_KILL_CURSORS = 2007;
+
+// Query flags
+var OPTS_NONE = 0;
+var OPTS_TAILABLE_CURSOR = 2;
+var OPTS_SLAVE = 4;
+var OPTS_OPLOG_REPLAY = 8;
+var OPTS_NO_CURSOR_TIMEOUT = 16;
+var OPTS_AWAIT_DATA = 32;
+var OPTS_EXHAUST = 64;
+var OPTS_PARTIAL = 128;
+
+// Response flags
+var CURSOR_NOT_FOUND = 0;
+var QUERY_FAILURE = 2;
+var SHARD_CONFIG_STALE = 4;
+var AWAIT_CAPABLE = 8;
+
+/**************************************************************
+ * QUERY
+ **************************************************************/
+var Query = function(bson, ns, query, options) {
+ var self = this;
+ // Basic options needed to be passed in
+ if(ns == null) throw new Error("ns must be specified for query");
+ if(query == null) throw new Error("query must be specified for query");
+
+ // Validate that we are not passing 0x00 in the colletion name
+ if(!!~ns.indexOf("\x00")) {
+ throw new Error("namespace cannot contain a null character");
+ }
+
+ // Basic options
+ this.bson = bson;
+ this.ns = ns;
+ this.query = query;
+
+ // Ensure empty options
+ this.options = options || {};
+
+ // Additional options
+ this.numberToSkip = options.numberToSkip || 0;
+ this.numberToReturn = options.numberToReturn || 0;
+ this.returnFieldSelector = options.returnFieldSelector || null;
+ this.requestId = Query.getRequestId();
+
+ // Serialization option
+ this.serializeFunctions = typeof options.serializeFunctions == 'boolean' ? options.serializeFunctions : false;
+ this.ignoreUndefined = typeof options.ignoreUndefined == 'boolean' ? options.ignoreUndefined : false;
+ this.maxBsonSize = options.maxBsonSize || 1024 * 1024 * 16;
+ this.checkKeys = typeof options.checkKeys == 'boolean' ? options.checkKeys : true;
+ this.batchSize = self.numberToReturn;
+
+ // Flags
+ this.tailable = false;
+ this.slaveOk = typeof options.slaveOk == 'boolean'? options.slaveOk : false;
+ this.oplogReplay = false;
+ this.noCursorTimeout = false;
+ this.awaitData = false;
+ this.exhaust = false;
+ this.partial = false;
+}
+
+//
+// Assign a new request Id
+Query.prototype.incRequestId = function() {
+ this.requestId = _requestId++;
+}
+
+//
+// Assign a new request Id
+Query.nextRequestId = function() {
+ return _requestId + 1;
+}
+
+//
+// Uses a single allocated buffer for the process, avoiding multiple memory allocations
+Query.prototype.toBin = function() {
+ var self = this;
+ var buffers = [];
+ var projection = null;
+
+ // Set up the flags
+ var flags = 0;
+ if(this.tailable) {
+ flags |= OPTS_TAILABLE_CURSOR;
+ }
+
+ if(this.slaveOk) {
+ flags |= OPTS_SLAVE;
+ }
+
+ if(this.oplogReplay) {
+ flags |= OPTS_OPLOG_REPLAY;
+ }
+
+ if(this.noCursorTimeout) {
+ flags |= OPTS_NO_CURSOR_TIMEOUT;
+ }
+
+ if(this.awaitData) {
+ flags |= OPTS_AWAIT_DATA;
+ }
+
+ if(this.exhaust) {
+ flags |= OPTS_EXHAUST;
+ }
+
+ if(this.partial) {
+ flags |= OPTS_PARTIAL;
+ }
+
+ // If batchSize is different to self.numberToReturn
+ if(self.batchSize != self.numberToReturn) self.numberToReturn = self.batchSize;
+
+ // Allocate write protocol header buffer
+ var header = new Buffer(
+ 4 * 4 // Header
+ + 4 // Flags
+ + Buffer.byteLength(self.ns) + 1 // namespace
+ + 4 // numberToSkip
+ + 4 // numberToReturn
+ );
+
+ // Add header to buffers
+ buffers.push(header);
+
+ // Serialize the query
+ var query = self.bson.serialize(this.query
+ , this.checkKeys
+ , true
+ , this.serializeFunctions
+ , 0, this.ignoreUndefined);
+
+ // Add query document
+ buffers.push(query);
+
+ if(self.returnFieldSelector && Object.keys(self.returnFieldSelector).length > 0) {
+ // Serialize the projection document
+ projection = self.bson.serialize(this.returnFieldSelector, this.checkKeys, true, this.serializeFunctions, this.ignoreUndefined);
+ // Add projection document
+ buffers.push(projection);
+ }
+
+ // Total message size
+ var totalLength = header.length + query.length + (projection ? projection.length : 0);
+
+ // Set up the index
+ var index = 4;
+
+ // Write total document length
+ header[3] = (totalLength >> 24) & 0xff;
+ header[2] = (totalLength >> 16) & 0xff;
+ header[1] = (totalLength >> 8) & 0xff;
+ header[0] = (totalLength) & 0xff;
+
+ // Write header information requestId
+ header[index + 3] = (this.requestId >> 24) & 0xff;
+ header[index + 2] = (this.requestId >> 16) & 0xff;
+ header[index + 1] = (this.requestId >> 8) & 0xff;
+ header[index] = (this.requestId) & 0xff;
+ index = index + 4;
+
+ // Write header information responseTo
+ header[index + 3] = (0 >> 24) & 0xff;
+ header[index + 2] = (0 >> 16) & 0xff;
+ header[index + 1] = (0 >> 8) & 0xff;
+ header[index] = (0) & 0xff;
+ index = index + 4;
+
+ // Write header information OP_QUERY
+ header[index + 3] = (OP_QUERY >> 24) & 0xff;
+ header[index + 2] = (OP_QUERY >> 16) & 0xff;
+ header[index + 1] = (OP_QUERY >> 8) & 0xff;
+ header[index] = (OP_QUERY) & 0xff;
+ index = index + 4;
+
+ // Write header information flags
+ header[index + 3] = (flags >> 24) & 0xff;
+ header[index + 2] = (flags >> 16) & 0xff;
+ header[index + 1] = (flags >> 8) & 0xff;
+ header[index] = (flags) & 0xff;
+ index = index + 4;
+
+ // Write collection name
+ index = index + header.write(this.ns, index, 'utf8') + 1;
+ header[index - 1] = 0;
+
+ // Write header information flags numberToSkip
+ header[index + 3] = (this.numberToSkip >> 24) & 0xff;
+ header[index + 2] = (this.numberToSkip >> 16) & 0xff;
+ header[index + 1] = (this.numberToSkip >> 8) & 0xff;
+ header[index] = (this.numberToSkip) & 0xff;
+ index = index + 4;
+
+ // Write header information flags numberToReturn
+ header[index + 3] = (this.numberToReturn >> 24) & 0xff;
+ header[index + 2] = (this.numberToReturn >> 16) & 0xff;
+ header[index + 1] = (this.numberToReturn >> 8) & 0xff;
+ header[index] = (this.numberToReturn) & 0xff;
+ index = index + 4;
+
+ // Return the buffers
+ return buffers;
+}
+
+Query.getRequestId = function() {
+ return ++_requestId;
+}
+
+/**************************************************************
+ * GETMORE
+ **************************************************************/
+var GetMore = function(bson, ns, cursorId, opts) {
+ opts = opts || {};
+ this.numberToReturn = opts.numberToReturn || 0;
+ this.requestId = _requestId++;
+ this.bson = bson;
+ this.ns = ns;
+ this.cursorId = cursorId;
+}
+
+//
+// Uses a single allocated buffer for the process, avoiding multiple memory allocations
+GetMore.prototype.toBin = function() {
+ var length = 4 + Buffer.byteLength(this.ns) + 1 + 4 + 8 + (4 * 4);
+ // Create command buffer
+ var index = 0;
+ // Allocate buffer
+ var _buffer = new Buffer(length);
+
+ // Write header information
+ // index = write32bit(index, _buffer, length);
+ _buffer[index + 3] = (length >> 24) & 0xff;
+ _buffer[index + 2] = (length >> 16) & 0xff;
+ _buffer[index + 1] = (length >> 8) & 0xff;
+ _buffer[index] = (length) & 0xff;
+ index = index + 4;
+
+ // index = write32bit(index, _buffer, requestId);
+ _buffer[index + 3] = (this.requestId >> 24) & 0xff;
+ _buffer[index + 2] = (this.requestId >> 16) & 0xff;
+ _buffer[index + 1] = (this.requestId >> 8) & 0xff;
+ _buffer[index] = (this.requestId) & 0xff;
+ index = index + 4;
+
+ // index = write32bit(index, _buffer, 0);
+ _buffer[index + 3] = (0 >> 24) & 0xff;
+ _buffer[index + 2] = (0 >> 16) & 0xff;
+ _buffer[index + 1] = (0 >> 8) & 0xff;
+ _buffer[index] = (0) & 0xff;
+ index = index + 4;
+
+ // index = write32bit(index, _buffer, OP_GETMORE);
+ _buffer[index + 3] = (OP_GETMORE >> 24) & 0xff;
+ _buffer[index + 2] = (OP_GETMORE >> 16) & 0xff;
+ _buffer[index + 1] = (OP_GETMORE >> 8) & 0xff;
+ _buffer[index] = (OP_GETMORE) & 0xff;
+ index = index + 4;
+
+ // index = write32bit(index, _buffer, 0);
+ _buffer[index + 3] = (0 >> 24) & 0xff;
+ _buffer[index + 2] = (0 >> 16) & 0xff;
+ _buffer[index + 1] = (0 >> 8) & 0xff;
+ _buffer[index] = (0) & 0xff;
+ index = index + 4;
+
+ // Write collection name
+ index = index + _buffer.write(this.ns, index, 'utf8') + 1;
+ _buffer[index - 1] = 0;
+
+ // Write batch size
+ // index = write32bit(index, _buffer, numberToReturn);
+ _buffer[index + 3] = (this.numberToReturn >> 24) & 0xff;
+ _buffer[index + 2] = (this.numberToReturn >> 16) & 0xff;
+ _buffer[index + 1] = (this.numberToReturn >> 8) & 0xff;
+ _buffer[index] = (this.numberToReturn) & 0xff;
+ index = index + 4;
+
+ // Write cursor id
+ // index = write32bit(index, _buffer, cursorId.getLowBits());
+ _buffer[index + 3] = (this.cursorId.getLowBits() >> 24) & 0xff;
+ _buffer[index + 2] = (this.cursorId.getLowBits() >> 16) & 0xff;
+ _buffer[index + 1] = (this.cursorId.getLowBits() >> 8) & 0xff;
+ _buffer[index] = (this.cursorId.getLowBits()) & 0xff;
+ index = index + 4;
+
+ // index = write32bit(index, _buffer, cursorId.getHighBits());
+ _buffer[index + 3] = (this.cursorId.getHighBits() >> 24) & 0xff;
+ _buffer[index + 2] = (this.cursorId.getHighBits() >> 16) & 0xff;
+ _buffer[index + 1] = (this.cursorId.getHighBits() >> 8) & 0xff;
+ _buffer[index] = (this.cursorId.getHighBits()) & 0xff;
+ index = index + 4;
+
+ // Return buffer
+ return _buffer;
+}
+
+/**************************************************************
+ * KILLCURSOR
+ **************************************************************/
+var KillCursor = function(bson, cursorIds) {
+ this.requestId = _requestId++;
+ this.cursorIds = cursorIds;
+}
+
+//
+// Uses a single allocated buffer for the process, avoiding multiple memory allocations
+KillCursor.prototype.toBin = function() {
+ var length = 4 + 4 + (4 * 4) + (this.cursorIds.length * 8);
+
+ // Create command buffer
+ var index = 0;
+ var _buffer = new Buffer(length);
+
+ // Write header information
+ // index = write32bit(index, _buffer, length);
+ _buffer[index + 3] = (length >> 24) & 0xff;
+ _buffer[index + 2] = (length >> 16) & 0xff;
+ _buffer[index + 1] = (length >> 8) & 0xff;
+ _buffer[index] = (length) & 0xff;
+ index = index + 4;
+
+ // index = write32bit(index, _buffer, requestId);
+ _buffer[index + 3] = (this.requestId >> 24) & 0xff;
+ _buffer[index + 2] = (this.requestId >> 16) & 0xff;
+ _buffer[index + 1] = (this.requestId >> 8) & 0xff;
+ _buffer[index] = (this.requestId) & 0xff;
+ index = index + 4;
+
+ // index = write32bit(index, _buffer, 0);
+ _buffer[index + 3] = (0 >> 24) & 0xff;
+ _buffer[index + 2] = (0 >> 16) & 0xff;
+ _buffer[index + 1] = (0 >> 8) & 0xff;
+ _buffer[index] = (0) & 0xff;
+ index = index + 4;
+
+ // index = write32bit(index, _buffer, OP_KILL_CURSORS);
+ _buffer[index + 3] = (OP_KILL_CURSORS >> 24) & 0xff;
+ _buffer[index + 2] = (OP_KILL_CURSORS >> 16) & 0xff;
+ _buffer[index + 1] = (OP_KILL_CURSORS >> 8) & 0xff;
+ _buffer[index] = (OP_KILL_CURSORS) & 0xff;
+ index = index + 4;
+
+ // index = write32bit(index, _buffer, 0);
+ _buffer[index + 3] = (0 >> 24) & 0xff;
+ _buffer[index + 2] = (0 >> 16) & 0xff;
+ _buffer[index + 1] = (0 >> 8) & 0xff;
+ _buffer[index] = (0) & 0xff;
+ index = index + 4;
+
+ // Write batch size
+ // index = write32bit(index, _buffer, this.cursorIds.length);
+ _buffer[index + 3] = (this.cursorIds.length >> 24) & 0xff;
+ _buffer[index + 2] = (this.cursorIds.length >> 16) & 0xff;
+ _buffer[index + 1] = (this.cursorIds.length >> 8) & 0xff;
+ _buffer[index] = (this.cursorIds.length) & 0xff;
+ index = index + 4;
+
+ // Write all the cursor ids into the array
+ for(var i = 0; i < this.cursorIds.length; i++) {
+ // Write cursor id
+ // index = write32bit(index, _buffer, cursorIds[i].getLowBits());
+ _buffer[index + 3] = (this.cursorIds[i].getLowBits() >> 24) & 0xff;
+ _buffer[index + 2] = (this.cursorIds[i].getLowBits() >> 16) & 0xff;
+ _buffer[index + 1] = (this.cursorIds[i].getLowBits() >> 8) & 0xff;
+ _buffer[index] = (this.cursorIds[i].getLowBits()) & 0xff;
+ index = index + 4;
+
+ // index = write32bit(index, _buffer, cursorIds[i].getHighBits());
+ _buffer[index + 3] = (this.cursorIds[i].getHighBits() >> 24) & 0xff;
+ _buffer[index + 2] = (this.cursorIds[i].getHighBits() >> 16) & 0xff;
+ _buffer[index + 1] = (this.cursorIds[i].getHighBits() >> 8) & 0xff;
+ _buffer[index] = (this.cursorIds[i].getHighBits()) & 0xff;
+ index = index + 4;
+ }
+
+ // Return buffer
+ return _buffer;
+}
+
+var Response = function(bson, data, opts) {
+ opts = opts || {promoteLongs: true, promoteValues: true, promoteBuffers: false};
+ this.parsed = false;
+
+ //
+ // Parse Header
+ //
+ this.index = 0;
+ this.raw = data;
+ this.data = data;
+ this.bson = bson;
+ this.opts = opts;
+
+ // Read the message length
+ this.length = data[this.index] | data[this.index + 1] << 8 | data[this.index + 2] << 16 | data[this.index + 3] << 24;
+ this.index = this.index + 4;
+
+ // Fetch the request id for this reply
+ this.requestId = data[this.index] | data[this.index + 1] << 8 | data[this.index + 2] << 16 | data[this.index + 3] << 24;
+ this.index = this.index + 4;
+
+ // Fetch the id of the request that triggered the response
+ this.responseTo = data[this.index] | data[this.index + 1] << 8 | data[this.index + 2] << 16 | data[this.index + 3] << 24;
+ this.index = this.index + 4;
+
+ // Skip op-code field
+ this.index = this.index + 4;
+
+ // Unpack flags
+ this.responseFlags = data[this.index] | data[this.index + 1] << 8 | data[this.index + 2] << 16 | data[this.index + 3] << 24;
+ this.index = this.index + 4;
+
+ // Unpack the cursor
+ var lowBits = data[this.index] | data[this.index + 1] << 8 | data[this.index + 2] << 16 | data[this.index + 3] << 24;
+ this.index = this.index + 4;
+ var highBits = data[this.index] | data[this.index + 1] << 8 | data[this.index + 2] << 16 | data[this.index + 3] << 24;
+ this.index = this.index + 4;
+ // Create long object
+ this.cursorId = new Long(lowBits, highBits);
+
+ // Unpack the starting from
+ this.startingFrom = data[this.index] | data[this.index + 1] << 8 | data[this.index + 2] << 16 | data[this.index + 3] << 24;
+ this.index = this.index + 4;
+
+ // Unpack the number of objects returned
+ this.numberReturned = data[this.index] | data[this.index + 1] << 8 | data[this.index + 2] << 16 | data[this.index + 3] << 24;
+ this.index = this.index + 4;
+
+ // Preallocate document array
+ this.documents = new Array(this.numberReturned);
+
+ // Flag values
+ this.cursorNotFound = (this.responseFlags & CURSOR_NOT_FOUND) != 0;
+ this.queryFailure = (this.responseFlags & QUERY_FAILURE) != 0;
+ this.shardConfigStale = (this.responseFlags & SHARD_CONFIG_STALE) != 0;
+ this.awaitCapable = (this.responseFlags & AWAIT_CAPABLE) != 0;
+ this.promoteLongs = typeof opts.promoteLongs == 'boolean' ? opts.promoteLongs : true;
+ this.promoteValues = typeof opts.promoteValues == 'boolean' ? opts.promoteValues : true;
+ this.promoteBuffers = typeof opts.promoteBuffers == 'boolean' ? opts.promoteBuffers : false;
+}
+
+Response.prototype.isParsed = function() {
+ return this.parsed;
+}
+
+// Validation buffers
+var firstBatch = new Buffer('firstBatch', 'utf8');
+var nextBatch = new Buffer('nextBatch', 'utf8');
+var cursorId = new Buffer('id', 'utf8').toString('hex');
+
+var documentBuffers = {
+ firstBatch: firstBatch.toString('hex'),
+ nextBatch: nextBatch.toString('hex')
+};
+
+Response.prototype.parse = function(options) {
+ // Don't parse again if not needed
+ if(this.parsed) return;
+ options = options || {};
+
+ // Allow the return of raw documents instead of parsing
+ var raw = options.raw || false;
+ var documentsReturnedIn = options.documentsReturnedIn || null;
+ var promoteLongs = typeof options.promoteLongs == 'boolean'
+ ? options.promoteLongs
+ : this.opts.promoteLongs;
+ var promoteValues = typeof options.promoteValues == 'boolean'
+ ? options.promoteValues
+ : this.opts.promoteValues;
+ var promoteBuffers = typeof options.promoteBuffers == 'boolean'
+ ? options.promoteBuffers
+ : this.opts.promoteBuffers
+
+ //
+ // Single document and documentsReturnedIn set
+ //
+ if(this.numberReturned == 1 && documentsReturnedIn != null && raw) {
+ // Calculate the bson size
+ var bsonSize = this.data[this.index] | this.data[this.index + 1] << 8 | this.data[this.index + 2] << 16 | this.data[this.index + 3] << 24;
+ // Slice out the buffer containing the command result document
+ var document = this.data.slice(this.index, this.index + bsonSize);
+ // Set up field we wish to keep as raw
+ var fieldsAsRaw = {}
+ fieldsAsRaw[documentsReturnedIn] = true;
+ // Set up the options
+ var _options = {
+ promoteLongs: promoteLongs,
+ promoteValues: promoteValues,
+ promoteBuffers: promoteBuffers,
+ fieldsAsRaw: fieldsAsRaw
+ };
+
+ // Deserialize but keep the array of documents in non-parsed form
+ var doc = this.bson.deserialize(document, _options);
+
+ // Get the documents
+ this.documents = doc.cursor[documentsReturnedIn];
+ this.numberReturned = this.documents.length;
+ // Ensure we have a Long valie cursor id
+ this.cursorId = typeof doc.cursor.id == 'number'
+ ? Long.fromNumber(doc.cursor.id)
+ : doc.cursor.id;
+
+ // Adjust the index
+ this.index = this.index + bsonSize;
+
+ // Set as parsed
+ this.parsed = true
+ return;
+ }
+
+ //
+ // Parse Body
+ //
+ for(var i = 0; i < this.numberReturned; i++) {
+ var bsonSize = this.data[this.index] | this.data[this.index + 1] << 8 | this.data[this.index + 2] << 16 | this.data[this.index + 3] << 24;
+ // Parse options
+ var _options = {promoteLongs: promoteLongs, promoteValues: promoteValues, promoteBuffers: promoteBuffers};
+
+ // If we have raw results specified slice the return document
+ if(raw) {
+ this.documents[i] = this.data.slice(this.index, this.index + bsonSize);
+ } else {
+ this.documents[i] = this.bson.deserialize(this.data.slice(this.index, this.index + bsonSize), _options);
+ }
+
+ // Adjust the index
+ this.index = this.index + bsonSize;
+ }
+
+ // Set parsed
+ this.parsed = true;
+}
+
+module.exports = {
+ Query: Query
+ , GetMore: GetMore
+ , Response: Response
+ , KillCursor: KillCursor
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js
new file mode 100644
index 0000000..261fd77
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js
@@ -0,0 +1,568 @@
+"use strict";
+
+var inherits = require('util').inherits
+ , EventEmitter = require('events').EventEmitter
+ , net = require('net')
+ , tls = require('tls')
+ , crypto = require('crypto')
+ , f = require('util').format
+ , debugOptions = require('./utils').debugOptions
+ , Response = require('./commands').Response
+ , MongoError = require('../error')
+ , Logger = require('./logger');
+
+var _id = 0;
+var debugFields = ['host', 'port', 'size', 'keepAlive', 'keepAliveInitialDelay', 'noDelay'
+ , 'connectionTimeout', 'socketTimeout', 'singleBufferSerializtion', 'ssl', 'ca', 'cert'
+ , 'rejectUnauthorized', 'promoteLongs', 'promoteValues', 'promoteBuffers', 'checkServerIdentity'];
+var connectionAccounting = false;
+var connections = {};
+
+/**
+ * Creates a new Connection instance
+ * @class
+ * @param {string} options.host The server host
+ * @param {number} options.port The server port
+ * @param {boolean} [options.keepAlive=true] TCP Connection keep alive enabled
+ * @param {number} [options.keepAliveInitialDelay=0] Initial delay before TCP keep alive enabled
+ * @param {boolean} [options.noDelay=true] TCP Connection no delay
+ * @param {number} [options.connectionTimeout=0] TCP Connection timeout setting
+ * @param {number} [options.socketTimeout=0] TCP Socket timeout setting
+ * @param {boolean} [options.singleBufferSerializtion=true] Serialize into single buffer, trade of peak memory for serialization speed
+ * @param {boolean} [options.ssl=false] Use SSL for connection
+ * @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
+ * @param {Buffer} [options.ca] SSL Certificate store binary buffer
+ * @param {Buffer} [options.cert] SSL Certificate binary buffer
+ * @param {Buffer} [options.key] SSL Key file binary buffer
+ * @param {string} [options.passphrase] SSL Certificate pass phrase
+ * @param {boolean} [options.rejectUnauthorized=true] Reject unauthorized server certificates
+ * @param {boolean} [options.promoteLongs=true] Convert Long values from the db into Numbers if they fit into 53 bits
+ * @param {boolean} [options.promoteValues=true] Promotes BSON values to native types where possible, set to false to only receive wrapper types.
+ * @param {boolean} [options.promoteBuffers=false] Promotes Binary BSON values to native Node Buffers.
+ * @fires Connection#connect
+ * @fires Connection#close
+ * @fires Connection#error
+ * @fires Connection#timeout
+ * @fires Connection#parseError
+ * @return {Connection} A cursor instance
+ */
+var Connection = function(messageHandler, options) {
+ // Add event listener
+ EventEmitter.call(this);
+ // Set empty if no options passed
+ this.options = options || {};
+ // Identification information
+ this.id = _id++;
+ // Logger instance
+ this.logger = Logger('Connection', options);
+ // No bson parser passed in
+ if(!options.bson) throw new Error("must pass in valid bson parser");
+ // Get bson parser
+ this.bson = options.bson;
+ // Grouping tag used for debugging purposes
+ this.tag = options.tag;
+ // Message handler
+ this.messageHandler = messageHandler;
+
+ // Max BSON message size
+ this.maxBsonMessageSize = options.maxBsonMessageSize || (1024 * 1024 * 16 * 4);
+ // Debug information
+ if(this.logger.isDebug()) this.logger.debug(f('creating connection %s with options [%s]', this.id, JSON.stringify(debugOptions(debugFields, options))));
+
+ // Default options
+ this.port = options.port || 27017;
+ this.host = options.host || 'localhost';
+ this.keepAlive = typeof options.keepAlive == 'boolean' ? options.keepAlive : true;
+ this.keepAliveInitialDelay = options.keepAliveInitialDelay || 0;
+ this.noDelay = typeof options.noDelay == 'boolean' ? options.noDelay : true;
+ this.connectionTimeout = options.connectionTimeout || 0;
+ this.socketTimeout = options.socketTimeout || 0;
+
+ // If connection was destroyed
+ this.destroyed = false;
+
+ // Check if we have a domain socket
+ this.domainSocket = this.host.indexOf('\/') != -1;
+
+ // Serialize commands using function
+ this.singleBufferSerializtion = typeof options.singleBufferSerializtion == 'boolean' ? options.singleBufferSerializtion : true;
+ this.serializationFunction = this.singleBufferSerializtion ? 'toBinUnified' : 'toBin';
+
+ // SSL options
+ this.ca = options.ca || null;
+ this.cert = options.cert || null;
+ this.key = options.key || null;
+ this.passphrase = options.passphrase || null;
+ this.ssl = typeof options.ssl == 'boolean' ? options.ssl : false;
+ this.rejectUnauthorized = typeof options.rejectUnauthorized == 'boolean' ? options.rejectUnauthorized : true;
+ this.checkServerIdentity = typeof options.checkServerIdentity == 'boolean'
+ || typeof options.checkServerIdentity == 'function' ? options.checkServerIdentity : true;
+
+ // If ssl not enabled
+ if(!this.ssl) this.rejectUnauthorized = false;
+
+ // Response options
+ this.responseOptions = {
+ promoteLongs: typeof options.promoteLongs == 'boolean' ? options.promoteLongs : true,
+ promoteValues: typeof options.promoteValues == 'boolean' ? options.promoteValues : true,
+ promoteBuffers: typeof options.promoteBuffers == 'boolean' ? options.promoteBuffers: false
+ }
+
+ // Flushing
+ this.flushing = false;
+ this.queue = [];
+
+ // Internal state
+ this.connection = null;
+ this.writeStream = null;
+
+ // Create hash method
+ var hash = crypto.createHash('sha1');
+ hash.update(f('%s:%s', this.host, this.port));
+
+ // Create a hash name
+ this.hashedName = hash.digest('hex');
+
+ // All operations in flight on the connection
+ this.workItems = [];
+}
+
+inherits(Connection, EventEmitter);
+
+Connection.prototype.setSocketTimeout = function(value) {
+ if(this.connection) {
+ this.connection.setTimeout(value);
+ }
+}
+
+Connection.prototype.resetSocketTimeout = function(value) {
+ if(this.connection) {
+ this.connection.setTimeout(this.socketTimeout);;
+ }
+}
+
+Connection.enableConnectionAccounting = function() {
+ connectionAccounting = true;
+ connections = {};
+}
+
+Connection.disableConnectionAccounting = function() {
+ connectionAccounting = false;
+}
+
+Connection.connections = function() {
+ return connections;
+}
+
+//
+// Connection handlers
+var errorHandler = function(self) {
+ return function(err) {
+ if(connectionAccounting) delete connections[self.id];
+ // Debug information
+ if(self.logger.isDebug()) self.logger.debug(f('connection %s for [%s:%s] errored out with [%s]', self.id, self.host, self.port, JSON.stringify(err)));
+ // Emit the error
+ if(self.listeners('error').length > 0) self.emit("error", MongoError.create(err), self);
+ }
+}
+
+var timeoutHandler = function(self) {
+ return function(err) {
+ if(connectionAccounting) delete connections[self.id];
+ // Debug information
+ if(self.logger.isDebug()) self.logger.debug(f('connection %s for [%s:%s] timed out', self.id, self.host, self.port));
+ // Emit timeout error
+ self.emit("timeout"
+ , MongoError.create(f("connection %s to %s:%s timed out", self.id, self.host, self.port))
+ , self);
+ }
+}
+
+var closeHandler = function(self) {
+ return function(hadError) {
+ if(connectionAccounting) delete connections[self.id];
+ // Debug information
+ if(self.logger.isDebug()) self.logger.debug(f('connection %s with for [%s:%s] closed', self.id, self.host, self.port));
+
+ // Emit close event
+ if(!hadError) {
+ self.emit("close"
+ , MongoError.create(f("connection %s to %s:%s closed", self.id, self.host, self.port))
+ , self);
+ }
+ }
+}
+
+var dataHandler = function(self) {
+ return function(data) {
+ // Parse until we are done with the data
+ while(data.length > 0) {
+ // If we still have bytes to read on the current message
+ if(self.bytesRead > 0 && self.sizeOfMessage > 0) {
+ // Calculate the amount of remaining bytes
+ var remainingBytesToRead = self.sizeOfMessage - self.bytesRead;
+ // Check if the current chunk contains the rest of the message
+ if(remainingBytesToRead > data.length) {
+ // Copy the new data into the exiting buffer (should have been allocated when we know the message size)
+ data.copy(self.buffer, self.bytesRead);
+ // Adjust the number of bytes read so it point to the correct index in the buffer
+ self.bytesRead = self.bytesRead + data.length;
+
+ // Reset state of buffer
+ data = new Buffer(0);
+ } else {
+ // Copy the missing part of the data into our current buffer
+ data.copy(self.buffer, self.bytesRead, 0, remainingBytesToRead);
+ // Slice the overflow into a new buffer that we will then re-parse
+ data = data.slice(remainingBytesToRead);
+
+ // Emit current complete message
+ try {
+ var emitBuffer = self.buffer;
+ // Reset state of buffer
+ self.buffer = null;
+ self.sizeOfMessage = 0;
+ self.bytesRead = 0;
+ self.stubBuffer = null;
+ // Emit the buffer
+ self.messageHandler(new Response(self.bson, emitBuffer, self.responseOptions), self);
+ } catch(err) {
+ var errorObject = {err:"socketHandler", trace:err, bin:self.buffer, parseState:{
+ sizeOfMessage:self.sizeOfMessage,
+ bytesRead:self.bytesRead,
+ stubBuffer:self.stubBuffer}};
+ // We got a parse Error fire it off then keep going
+ self.emit("parseError", errorObject, self);
+ }
+ }
+ } else {
+ // Stub buffer is kept in case we don't get enough bytes to determine the
+ // size of the message (< 4 bytes)
+ if(self.stubBuffer != null && self.stubBuffer.length > 0) {
+ // If we have enough bytes to determine the message size let's do it
+ if(self.stubBuffer.length + data.length > 4) {
+ // Prepad the data
+ var newData = new Buffer(self.stubBuffer.length + data.length);
+ self.stubBuffer.copy(newData, 0);
+ data.copy(newData, self.stubBuffer.length);
+ // Reassign for parsing
+ data = newData;
+
+ // Reset state of buffer
+ self.buffer = null;
+ self.sizeOfMessage = 0;
+ self.bytesRead = 0;
+ self.stubBuffer = null;
+
+ } else {
+
+ // Add the the bytes to the stub buffer
+ var newStubBuffer = new Buffer(self.stubBuffer.length + data.length);
+ // Copy existing stub buffer
+ self.stubBuffer.copy(newStubBuffer, 0);
+ // Copy missing part of the data
+ data.copy(newStubBuffer, self.stubBuffer.length);
+ // Exit parsing loop
+ data = new Buffer(0);
+ }
+ } else {
+ if(data.length > 4) {
+ // Retrieve the message size
+ // var sizeOfMessage = data.readUInt32LE(0);
+ var sizeOfMessage = data[0] | data[1] << 8 | data[2] << 16 | data[3] << 24;
+ // If we have a negative sizeOfMessage emit error and return
+ if(sizeOfMessage < 0 || sizeOfMessage > self.maxBsonMessageSize) {
+ var errorObject = {err:"socketHandler", trace:'', bin:self.buffer, parseState:{
+ sizeOfMessage: sizeOfMessage,
+ bytesRead: self.bytesRead,
+ stubBuffer: self.stubBuffer}};
+ // We got a parse Error fire it off then keep going
+ self.emit("parseError", errorObject, self);
+ return;
+ }
+
+ // Ensure that the size of message is larger than 0 and less than the max allowed
+ if(sizeOfMessage > 4 && sizeOfMessage < self.maxBsonMessageSize && sizeOfMessage > data.length) {
+ self.buffer = new Buffer(sizeOfMessage);
+ // Copy all the data into the buffer
+ data.copy(self.buffer, 0);
+ // Update bytes read
+ self.bytesRead = data.length;
+ // Update sizeOfMessage
+ self.sizeOfMessage = sizeOfMessage;
+ // Ensure stub buffer is null
+ self.stubBuffer = null;
+ // Exit parsing loop
+ data = new Buffer(0);
+
+ } else if(sizeOfMessage > 4 && sizeOfMessage < self.maxBsonMessageSize && sizeOfMessage == data.length) {
+ try {
+ var emitBuffer = data;
+ // Reset state of buffer
+ self.buffer = null;
+ self.sizeOfMessage = 0;
+ self.bytesRead = 0;
+ self.stubBuffer = null;
+ // Exit parsing loop
+ data = new Buffer(0);
+ // Emit the message
+ self.messageHandler(new Response(self.bson, emitBuffer, self.responseOptions), self);
+ } catch (err) {
+ self.emit("parseError", err, self);
+ }
+ } else if(sizeOfMessage <= 4 || sizeOfMessage > self.maxBsonMessageSize) {
+ var errorObject = {err:"socketHandler", trace:null, bin:data, parseState:{
+ sizeOfMessage:sizeOfMessage,
+ bytesRead:0,
+ buffer:null,
+ stubBuffer:null}};
+ // We got a parse Error fire it off then keep going
+ self.emit("parseError", errorObject, self);
+
+ // Clear out the state of the parser
+ self.buffer = null;
+ self.sizeOfMessage = 0;
+ self.bytesRead = 0;
+ self.stubBuffer = null;
+ // Exit parsing loop
+ data = new Buffer(0);
+ } else {
+ var emitBuffer = data.slice(0, sizeOfMessage);
+ // Reset state of buffer
+ self.buffer = null;
+ self.sizeOfMessage = 0;
+ self.bytesRead = 0;
+ self.stubBuffer = null;
+ // Copy rest of message
+ data = data.slice(sizeOfMessage);
+ // Emit the message
+ self.messageHandler(new Response(self.bson, emitBuffer, self.responseOptions), self);
+ }
+ } else {
+ // Create a buffer that contains the space for the non-complete message
+ self.stubBuffer = new Buffer(data.length)
+ // Copy the data to the stub buffer
+ data.copy(self.stubBuffer, 0);
+ // Exit parsing loop
+ data = new Buffer(0);
+ }
+ }
+ }
+ }
+ }
+}
+
+// List of socket level valid ssl options
+var legalSslSocketOptions = ['pfx', 'key', 'passphrase', 'cert', 'ca', 'ciphers'
+ , 'NPNProtocols', 'ALPNProtocols', 'servername'
+ , 'secureProtocol', 'secureContext', 'session'
+ , 'minDHSize'];
+
+function merge(options1, options2) {
+ // Merge in any allowed ssl options
+ for(var name in options2) {
+ if(options2[name] != null && legalSslSocketOptions.indexOf(name) != -1) {
+ options1[name] = options2[name];
+ }
+ }
+}
+
+/**
+ * Connect
+ * @method
+ */
+Connection.prototype.connect = function(_options) {
+ var self = this;
+ _options = _options || {};
+ // Set the connections
+ if(connectionAccounting) connections[this.id] = this;
+ // Check if we are overriding the promoteLongs
+ if(typeof _options.promoteLongs == 'boolean') {
+ self.responseOptions.promoteLongs = _options.promoteLongs;
+ self.responseOptions.promoteValues = _options.promoteValues;
+ self.responseOptions.promoteBuffers = _options.promoteBuffers;
+ }
+
+ // Create new connection instance
+ self.connection = self.domainSocket
+ ? net.createConnection(self.host)
+ : net.createConnection(self.port, self.host);
+
+ // Set the options for the connection
+ self.connection.setKeepAlive(self.keepAlive, self.keepAliveInitialDelay);
+ self.connection.setTimeout(self.connectionTimeout);
+ self.connection.setNoDelay(self.noDelay);
+
+ // If we have ssl enabled
+ if(self.ssl) {
+ var sslOptions = {
+ socket: self.connection
+ , rejectUnauthorized: self.rejectUnauthorized
+ }
+
+ // Merge in options
+ merge(sslOptions, this.options);
+ merge(sslOptions, _options);
+
+ // Set options for ssl
+ if(self.ca) sslOptions.ca = self.ca;
+ if(self.cert) sslOptions.cert = self.cert;
+ if(self.key) sslOptions.key = self.key;
+ if(self.passphrase) sslOptions.passphrase = self.passphrase;
+
+ // Override checkServerIdentity behavior
+ if(self.checkServerIdentity == false) {
+ // Skip the identiy check by retuning undefined as per node documents
+ // https://nodejs.org/api/tls.html#tls_tls_connect_options_callback
+ sslOptions.checkServerIdentity = function(servername, cert) {
+ return undefined;
+ }
+ } else if(typeof self.checkServerIdentity == 'function') {
+ sslOptions.checkServerIdentity = self.checkServerIdentity;
+ }
+
+ // Attempt SSL connection
+ self.connection = tls.connect(self.port, self.host, sslOptions, function() {
+ // Error on auth or skip
+ if(self.connection.authorizationError && self.rejectUnauthorized) {
+ return self.emit("error", self.connection.authorizationError, self, {ssl:true});
+ }
+
+ // Set socket timeout instead of connection timeout
+ self.connection.setTimeout(self.socketTimeout);
+ // We are done emit connect
+ self.emit('connect', self);
+ });
+ self.connection.setTimeout(self.connectionTimeout);
+ } else {
+ self.connection.on('connect', function() {
+ // Set socket timeout instead of connection timeout
+ self.connection.setTimeout(self.socketTimeout);
+ // Emit connect event
+ self.emit('connect', self);
+ });
+ }
+
+ // Add handlers for events
+ self.connection.once('error', errorHandler(self));
+ self.connection.once('timeout', timeoutHandler(self));
+ self.connection.once('close', closeHandler(self));
+ self.connection.on('data', dataHandler(self));
+}
+
+/**
+ * Unref this connection
+ * @method
+ * @return {boolean}
+ */
+Connection.prototype.unref = function() {
+ if (this.connection) this.connection.unref();
+ else {
+ var self = this;
+ this.once('connect', function() {
+ self.connection.unref();
+ });
+ }
+}
+
+/**
+ * Destroy connection
+ * @method
+ */
+Connection.prototype.destroy = function() {
+ // Set the connections
+ if(connectionAccounting) delete connections[this.id];
+ if(this.connection) {
+ this.connection.end();
+ this.connection.destroy();
+ }
+
+ this.destroyed = true;
+}
+
+/**
+ * Write to connection
+ * @method
+ * @param {Command} command Command to write out need to implement toBin and toBinUnified
+ */
+Connection.prototype.write = function(buffer) {
+ // Debug Log
+ if(this.logger.isDebug()) {
+ if(!Array.isArray(buffer)) {
+ this.logger.debug(f('writing buffer [%s] to %s:%s', buffer.toString('hex'), this.host, this.port));
+ } else {
+ for(var i = 0; i < buffer.length; i++)
+ this.logger.debug(f('writing buffer [%s] to %s:%s', buffer[i].toString('hex'), this.host, this.port));
+ }
+ }
+
+ // Write out the command
+ if(!Array.isArray(buffer)) return this.connection.write(buffer, 'binary');
+ // Iterate over all buffers and write them in order to the socket
+ for(var i = 0; i < buffer.length; i++) this.connection.write(buffer[i], 'binary');
+}
+
+/**
+ * Return id of connection as a string
+ * @method
+ * @return {string}
+ */
+Connection.prototype.toString = function() {
+ return "" + this.id;
+}
+
+/**
+ * Return json object of connection
+ * @method
+ * @return {object}
+ */
+Connection.prototype.toJSON = function() {
+ return {id: this.id, host: this.host, port: this.port};
+}
+
+/**
+ * Is the connection connected
+ * @method
+ * @return {boolean}
+ */
+Connection.prototype.isConnected = function() {
+ if(this.destroyed) return false;
+ return !this.connection.destroyed && this.connection.writable;
+}
+
+/**
+ * A server connect event, used to verify that the connection is up and running
+ *
+ * @event Connection#connect
+ * @type {Connection}
+ */
+
+/**
+ * The server connection closed, all pool connections closed
+ *
+ * @event Connection#close
+ * @type {Connection}
+ */
+
+/**
+ * The server connection caused an error, all pool connections closed
+ *
+ * @event Connection#error
+ * @type {Connection}
+ */
+
+/**
+ * The server connection timed out, all pool connections closed
+ *
+ * @event Connection#timeout
+ * @type {Connection}
+ */
+
+/**
+ * The driver experienced an invalid message, all pool connections closed
+ *
+ * @event Connection#parseError
+ * @type {Connection}
+ */
+
+module.exports = Connection;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/logger.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/logger.js
new file mode 100644
index 0000000..cba8954
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/logger.js
@@ -0,0 +1,229 @@
+"use strict";
+
+var f = require('util').format
+ , MongoError = require('../error');
+
+// Filters for classes
+var classFilters = {};
+var filteredClasses = {};
+var level = null;
+// Save the process id
+var pid = process.pid;
+// current logger
+var currentLogger = null;
+
+/**
+ * Creates a new Logger instance
+ * @class
+ * @param {string} className The Class name associated with the logging instance
+ * @param {object} [options=null] Optional settings.
+ * @param {Function} [options.logger=null] Custom logger function;
+ * @param {string} [options.loggerLevel=error] Override default global log level.
+ * @return {Logger} a Logger instance.
+ */
+var Logger = function(className, options) {
+ if(!(this instanceof Logger)) return new Logger(className, options);
+ options = options || {};
+
+ // Current reference
+ var self = this;
+ this.className = className;
+
+ // Current logger
+ if(options.logger) {
+ currentLogger = options.logger;
+ } else if(currentLogger == null) {
+ currentLogger = console.log;
+ }
+
+ // Set level of logging, default is error
+ if(options.loggerLevel) {
+ level = options.loggerLevel || 'error';
+ }
+
+ // Add all class names
+ if(filteredClasses[this.className] == null) classFilters[this.className] = true;
+}
+
+/**
+ * Log a message at the debug level
+ * @method
+ * @param {string} message The message to log
+ * @param {object} object additional meta data to log
+ * @return {null}
+ */
+Logger.prototype.debug = function(message, object) {
+ if(this.isDebug()
+ && ((Object.keys(filteredClasses).length > 0 && filteredClasses[this.className])
+ || (Object.keys(filteredClasses).length == 0 && classFilters[this.className]))) {
+ var dateTime = new Date().getTime();
+ var msg = f("[%s-%s:%s] %s %s", 'DEBUG', this.className, pid, dateTime, message);
+ var state = {
+ type: 'debug', message: message, className: this.className, pid: pid, date: dateTime
+ };
+ if(object) state.meta = object;
+ currentLogger(msg, state);
+ }
+}
+
+/**
+ * Log a message at the warn level
+ * @method
+ * @param {string} message The message to log
+ * @param {object} object additional meta data to log
+ * @return {null}
+ */
+Logger.prototype.warn = function(message, object) {
+ if(this.isWarn()
+ && ((Object.keys(filteredClasses).length > 0 && filteredClasses[this.className])
+ || (Object.keys(filteredClasses).length == 0 && classFilters[this.className]))) {
+ var dateTime = new Date().getTime();
+ var msg = f("[%s-%s:%s] %s %s", 'WARN', this.className, pid, dateTime, message);
+ var state = {
+ type: 'warn', message: message, className: this.className, pid: pid, date: dateTime
+ };
+ if(object) state.meta = object;
+ currentLogger(msg, state);
+ }
+},
+
+/**
+ * Log a message at the info level
+ * @method
+ * @param {string} message The message to log
+ * @param {object} object additional meta data to log
+ * @return {null}
+ */
+Logger.prototype.info = function(message, object) {
+ if(this.isInfo()
+ && ((Object.keys(filteredClasses).length > 0 && filteredClasses[this.className])
+ || (Object.keys(filteredClasses).length == 0 && classFilters[this.className]))) {
+ var dateTime = new Date().getTime();
+ var msg = f("[%s-%s:%s] %s %s", 'INFO', this.className, pid, dateTime, message);
+ var state = {
+ type: 'info', message: message, className: this.className, pid: pid, date: dateTime
+ };
+ if(object) state.meta = object;
+ currentLogger(msg, state);
+ }
+},
+
+/**
+ * Log a message at the error level
+ * @method
+ * @param {string} message The message to log
+ * @param {object} object additional meta data to log
+ * @return {null}
+ */
+Logger.prototype.error = function(message, object) {
+ if(this.isError()
+ && ((Object.keys(filteredClasses).length > 0 && filteredClasses[this.className])
+ || (Object.keys(filteredClasses).length == 0 && classFilters[this.className]))) {
+ var dateTime = new Date().getTime();
+ var msg = f("[%s-%s:%s] %s %s", 'ERROR', this.className, pid, dateTime, message);
+ var state = {
+ type: 'error', message: message, className: this.className, pid: pid, date: dateTime
+ };
+ if(object) state.meta = object;
+ currentLogger(msg, state);
+ }
+},
+
+/**
+ * Is the logger set at info level
+ * @method
+ * @return {boolean}
+ */
+Logger.prototype.isInfo = function() {
+ return level == 'info' || level == 'debug';
+},
+
+/**
+ * Is the logger set at error level
+ * @method
+ * @return {boolean}
+ */
+Logger.prototype.isError = function() {
+ return level == 'error' || level == 'info' || level == 'debug';
+},
+
+/**
+ * Is the logger set at error level
+ * @method
+ * @return {boolean}
+ */
+Logger.prototype.isWarn = function() {
+ return level == 'error' || level == 'warn' || level == 'info' || level == 'debug';
+},
+
+/**
+ * Is the logger set at debug level
+ * @method
+ * @return {boolean}
+ */
+Logger.prototype.isDebug = function() {
+ return level == 'debug';
+}
+
+/**
+ * Resets the logger to default settings, error and no filtered classes
+ * @method
+ * @return {null}
+ */
+Logger.reset = function() {
+ level = 'error';
+ filteredClasses = {};
+}
+
+/**
+ * Get the current logger function
+ * @method
+ * @return {function}
+ */
+Logger.currentLogger = function() {
+ return currentLogger;
+}
+
+/**
+ * Set the current logger function
+ * @method
+ * @param {function} logger Logger function.
+ * @return {null}
+ */
+Logger.setCurrentLogger = function(logger) {
+ if(typeof logger != 'function') throw new MongoError("current logger must be a function");
+ currentLogger = logger;
+}
+
+/**
+ * Set what classes to log.
+ * @method
+ * @param {string} type The type of filter (currently only class)
+ * @param {string[]} values The filters to apply
+ * @return {null}
+ */
+Logger.filter = function(type, values) {
+ if(type == 'class' && Array.isArray(values)) {
+ filteredClasses = {};
+
+ values.forEach(function(x) {
+ filteredClasses[x] = true;
+ });
+ }
+}
+
+/**
+ * Set the current log level
+ * @method
+ * @param {string} level Set current log level (debug, info, error)
+ * @return {null}
+ */
+Logger.setLevel = function(_level) {
+ if(_level != 'info' && _level != 'error' && _level != 'debug' && _level != 'warn') {
+ throw new Error(f("%s is an illegal logging level", _level));
+ }
+
+ level = _level;
+}
+
+module.exports = Logger;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js
new file mode 100644
index 0000000..4e3ad83
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js
@@ -0,0 +1,1220 @@
+"use strict";
+
+var inherits = require('util').inherits,
+ EventEmitter = require('events').EventEmitter,
+ Connection = require('./connection'),
+ MongoError = require('../error'),
+ Logger = require('./logger'),
+ f = require('util').format,
+ Query = require('./commands').Query,
+ CommandResult = require('./command_result'),
+ assign = require('../topologies/shared').assign;
+
+var MongoCR = require('../auth/mongocr')
+ , X509 = require('../auth/x509')
+ , Plain = require('../auth/plain')
+ , GSSAPI = require('../auth/gssapi')
+ , SSPI = require('../auth/sspi')
+ , ScramSHA1 = require('../auth/scram');
+
+var DISCONNECTED = 'disconnected';
+var CONNECTING = 'connecting';
+var CONNECTED = 'connected';
+var DESTROYING = 'destroying';
+var DESTROYED = 'destroyed';
+
+var _id = 0;
+
+/**
+ * Creates a new Pool instance
+ * @class
+ * @param {string} options.host The server host
+ * @param {number} options.port The server port
+ * @param {number} [options.size=1] Max server connection pool size
+ * @param {boolean} [options.reconnect=true] Server will attempt to reconnect on loss of connection
+ * @param {number} [options.reconnectTries=30] Server attempt to reconnect #times
+ * @param {number} [options.reconnectInterval=1000] Server will wait # milliseconds between retries
+ * @param {boolean} [options.keepAlive=true] TCP Connection keep alive enabled
+ * @param {number} [options.keepAliveInitialDelay=0] Initial delay before TCP keep alive enabled
+ * @param {boolean} [options.noDelay=true] TCP Connection no delay
+ * @param {number} [options.connectionTimeout=0] TCP Connection timeout setting
+ * @param {number} [options.socketTimeout=0] TCP Socket timeout setting
+ * @param {number} [options.monitoringSocketTimeout=30000] TCP Socket timeout setting for replicaset monitoring socket
+ * @param {boolean} [options.ssl=false] Use SSL for connection
+ * @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
+ * @param {Buffer} [options.ca] SSL Certificate store binary buffer
+ * @param {Buffer} [options.cert] SSL Certificate binary buffer
+ * @param {Buffer} [options.key] SSL Key file binary buffer
+ * @param {string} [options.passPhrase] SSL Certificate pass phrase
+ * @param {boolean} [options.rejectUnauthorized=false] Reject unauthorized server certificates
+ * @param {boolean} [options.promoteLongs=true] Convert Long values from the db into Numbers if they fit into 53 bits
+ * @param {boolean} [options.promoteValues=true] Promotes BSON values to native types where possible, set to false to only receive wrapper types.
+ * @param {boolean} [options.promoteBuffers=false] Promotes Binary BSON values to native Node Buffers.
+ * @param {boolean} [options.domainsEnabled=false] Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit.
+ * @fires Pool#connect
+ * @fires Pool#close
+ * @fires Pool#error
+ * @fires Pool#timeout
+ * @fires Pool#parseError
+ * @return {Pool} A cursor instance
+ */
+var Pool = function(options) {
+ var self = this;
+ // Add event listener
+ EventEmitter.call(this);
+ // Add the options
+ this.options = assign({
+ // Host and port settings
+ host: 'localhost',
+ port: 27017,
+ // Pool default max size
+ size: 5,
+ // socket settings
+ connectionTimeout: 30000,
+ socketTimeout: 30000,
+ keepAlive: true,
+ keepAliveInitialDelay: 0,
+ noDelay: true,
+ // SSL Settings
+ ssl: false, checkServerIdentity: true,
+ ca: null, cert: null, key: null, passPhrase: null,
+ rejectUnauthorized: false,
+ promoteLongs: true,
+ promoteValues: true,
+ promoteBuffers: false,
+ // Reconnection options
+ reconnect: true,
+ reconnectInterval: 1000,
+ reconnectTries: 30,
+ // Enable domains
+ domainsEnabled: false
+ }, options);
+
+ // Identification information
+ this.id = _id++;
+ // Current reconnect retries
+ this.retriesLeft = this.options.reconnectTries;
+ this.reconnectId = null;
+ // No bson parser passed in
+ if(!options.bson || (options.bson
+ && (typeof options.bson.serialize != 'function'
+ || typeof options.bson.deserialize != 'function'))) {
+ throw new Error("must pass in valid bson parser");
+ }
+
+ // Logger instance
+ this.logger = Logger('Pool', options);
+ // Pool state
+ this.state = DISCONNECTED;
+ // Connections
+ this.availableConnections = [];
+ this.inUseConnections = [];
+ this.connectingConnections = [];
+ // Currently executing
+ this.executing = false;
+ // Operation work queue
+ this.queue = [];
+
+ // All the authProviders
+ this.authProviders = options.authProviders || {
+ 'mongocr': new MongoCR(options.bson), 'x509': new X509(options.bson)
+ , 'plain': new Plain(options.bson), 'gssapi': new GSSAPI(options.bson)
+ , 'sspi': new SSPI(options.bson), 'scram-sha-1': new ScramSHA1(options.bson)
+ }
+
+ // Are we currently authenticating
+ this.authenticating = false;
+ this.loggingout = false;
+ this.nonAuthenticatedConnections = [];
+ this.authenticatingTimestamp = null;
+ // Number of consecutive timeouts caught
+ this.numberOfConsecutiveTimeouts = 0;
+ // Current pool Index
+ this.connectionIndex = 0;
+}
+
+inherits(Pool, EventEmitter);
+
+Object.defineProperty(Pool.prototype, 'size', {
+ enumerable:true,
+ get: function() { return this.options.size; }
+});
+
+Object.defineProperty(Pool.prototype, 'connectionTimeout', {
+ enumerable:true,
+ get: function() { return this.options.connectionTimeout; }
+});
+
+Object.defineProperty(Pool.prototype, 'socketTimeout', {
+ enumerable:true,
+ get: function() { return this.options.socketTimeout; }
+});
+
+function stateTransition(self, newState) {
+ var legalTransitions = {
+ 'disconnected': [CONNECTING, DESTROYING, DISCONNECTED],
+ 'connecting': [CONNECTING, DESTROYING, CONNECTED, DISCONNECTED],
+ 'connected': [CONNECTED, DISCONNECTED, DESTROYING],
+ 'destroying': [DESTROYING, DESTROYED],
+ 'destroyed': [DESTROYED]
+ }
+
+ // Get current state
+ var legalStates = legalTransitions[self.state];
+ if(legalStates && legalStates.indexOf(newState) != -1) {
+ self.state = newState;
+ } else {
+ self.logger.error(f('Pool with id [%s] failed attempted illegal state transition from [%s] to [%s] only following state allowed [%s]'
+ , self.id, self.state, newState, legalStates));
+ }
+}
+
+function authenticate(pool, auth, connection, cb) {
+ if(auth[0] === undefined) return cb(null);
+ // We need to authenticate the server
+ var mechanism = auth[0];
+ var db = auth[1];
+ // Validate if the mechanism exists
+ if(!pool.authProviders[mechanism]) {
+ throw new MongoError(f('authMechanism %s not supported', mechanism));
+ }
+
+ // Get the provider
+ var provider = pool.authProviders[mechanism];
+
+ // Authenticate using the provided mechanism
+ provider.auth.apply(provider, [write(pool), [connection], db].concat(auth.slice(2)).concat([cb]));
+}
+
+// The write function used by the authentication mechanism (bypasses external)
+function write(self) {
+ return function(connection, command, callback) {
+ // Get the raw buffer
+ // Ensure we stop auth if pool was destroyed
+ if(self.state == DESTROYED || self.state == DESTROYING) {
+ return callback(new MongoError('pool destroyed'));
+ }
+
+ // Set the connection workItem callback
+ connection.workItems.push({
+ cb: callback, command: true, requestId: command.requestId
+ });
+
+ // Write the buffer out to the connection
+ connection.write(command.toBin());
+ };
+}
+
+
+function reauthenticate(pool, connection, cb) {
+ // Authenticate
+ function authenticateAgainstProvider(pool, connection, providers, cb) {
+ // Finished re-authenticating against providers
+ if(providers.length == 0) return cb();
+ // Get the provider name
+ var provider = pool.authProviders[providers.pop()];
+
+ // Auth provider
+ provider.reauthenticate(write(pool), [connection], function(err, r) {
+ // We got an error return immediately
+ if(err) return cb(err);
+ // Continue authenticating the connection
+ authenticateAgainstProvider(pool, connection, providers, cb);
+ });
+ }
+
+ // Start re-authenticating process
+ authenticateAgainstProvider(pool, connection, Object.keys(pool.authProviders), cb);
+}
+
+function connectionFailureHandler(self, event) {
+ return function(err) {
+ if (this._connectionFailHandled) return;
+ this._connectionFailHandled = true;
+ // Destroy the connection
+ this.destroy();
+
+ // Remove the connection
+ removeConnection(self, this);
+
+ // Flush all work Items on this connection
+ while(this.workItems.length > 0) {
+ var workItem = this.workItems.shift();
+ // if(workItem.cb) workItem.cb(err);
+ if(workItem.cb) workItem.cb(err);
+ }
+
+ // Did we catch a timeout, increment the numberOfConsecutiveTimeouts
+ if(event == 'timeout') {
+ self.numberOfConsecutiveTimeouts = self.numberOfConsecutiveTimeouts + 1;
+
+ // Have we timed out more than reconnectTries in a row ?
+ // Force close the pool as we are trying to connect to tcp sink hole
+ if(self.numberOfConsecutiveTimeouts > self.options.reconnectTries) {
+ self.numberOfConsecutiveTimeouts = 0;
+ // Destroy all connections and pool
+ self.destroy(true);
+ // Emit close event
+ return self.emit('close', self);
+ }
+ }
+
+ // No more socket available propegate the event
+ if(self.socketCount() == 0) {
+ if(self.state != DESTROYED && self.state != DESTROYING) {
+ stateTransition(self, DISCONNECTED);
+ }
+
+ // Do not emit error events, they are always close events
+ // do not trigger the low level error handler in node
+ event = event == 'error' ? 'close' : event;
+ self.emit(event, err);
+ }
+
+ // Start reconnection attempts
+ if(!self.reconnectId && self.options.reconnect) {
+ self.reconnectId = setTimeout(attemptReconnect(self), self.options.reconnectInterval);
+ }
+ };
+}
+
+function attemptReconnect(self) {
+ return function() {
+ self.emit('attemptReconnect', self);
+ if(self.state == DESTROYED || self.state == DESTROYING) return;
+
+ // We are connected do not try again
+ if(self.isConnected()) {
+ self.reconnectId = null;
+ return;
+ }
+
+ // If we have failure schedule a retry
+ function _connectionFailureHandler(self, event) {
+ return function() {
+ if (this._connectionFailHandled) return;
+ this._connectionFailHandled = true;
+ // Destroy the connection
+ this.destroy();
+ // Count down the number of reconnects
+ self.retriesLeft = self.retriesLeft - 1;
+ // How many retries are left
+ if(self.retriesLeft == 0) {
+ // Destroy the instance
+ self.destroy();
+ // Emit close event
+ self.emit('reconnectFailed'
+ , new MongoError(f('failed to reconnect after %s attempts with interval %s ms', self.options.reconnectTries, self.options.reconnectInterval)));
+ } else {
+ self.reconnectId = setTimeout(attemptReconnect(self), self.options.reconnectInterval);
+ }
+ }
+ }
+
+ // Got a connect handler
+ function _connectHandler(self) {
+ return function() {
+ // Assign
+ var connection = this;
+
+ // Pool destroyed stop the connection
+ if(self.state == DESTROYED || self.state == DESTROYING) {
+ return connection.destroy();
+ }
+
+ // Clear out all handlers
+ handlers.forEach(function(event) {
+ connection.removeAllListeners(event);
+ });
+
+ // Reset reconnect id
+ self.reconnectId = null;
+
+ // Apply pool connection handlers
+ connection.on('error', connectionFailureHandler(self, 'error'));
+ connection.on('close', connectionFailureHandler(self, 'close'));
+ connection.on('timeout', connectionFailureHandler(self, 'timeout'));
+ connection.on('parseError', connectionFailureHandler(self, 'parseError'));
+
+ // Apply any auth to the connection
+ reauthenticate(self, this, function(err) {
+ // Reset retries
+ self.retriesLeft = self.options.reconnectTries;
+ // Push to available connections
+ self.availableConnections.push(connection);
+ // Emit reconnect event
+ self.emit('reconnect', self);
+ // Trigger execute to start everything up again
+ _execute(self)();
+ });
+ }
+ }
+
+ // Create a connection
+ var connection = new Connection(messageHandler(self), self.options);
+ // Add handlers
+ connection.on('close', _connectionFailureHandler(self, 'close'));
+ connection.on('error', _connectionFailureHandler(self, 'error'));
+ connection.on('timeout', _connectionFailureHandler(self, 'timeout'));
+ connection.on('parseError', _connectionFailureHandler(self, 'parseError'));
+ // On connection
+ connection.on('connect', _connectHandler(self));
+ // Attempt connection
+ connection.connect();
+ }
+}
+
+function moveConnectionBetween(connection, from, to) {
+ var index = from.indexOf(connection);
+ // Move the connection from connecting to available
+ if(index != -1) {
+ from.splice(index, 1);
+ to.push(connection);
+ }
+}
+
+function messageHandler(self) {
+ return function(message, connection) {
+ // workItem to execute
+ var workItem = null;
+
+ // Locate the workItem
+ for(var i = 0; i < connection.workItems.length; i++) {
+ if(connection.workItems[i].requestId == message.responseTo) {
+ // Get the callback
+ var workItem = connection.workItems[i];
+ // Remove from list of workItems
+ connection.workItems.splice(i, 1);
+ }
+ }
+
+ // Reset timeout counter
+ self.numberOfConsecutiveTimeouts = 0;
+
+ // Reset the connection timeout if we modified it for
+ // this operation
+ if(workItem.socketTimeout) {
+ connection.resetSocketTimeout();
+ }
+
+ // Log if debug enabled
+ if(self.logger.isDebug()) {
+ self.logger.debug(f('message [%s] received from %s:%s'
+ , message.raw.toString('hex'), self.options.host, self.options.port));
+ }
+
+ // Authenticate any straggler connections
+ function authenticateStragglers(self, connection, callback) {
+ // Get any non authenticated connections
+ var connections = self.nonAuthenticatedConnections.slice(0);
+ var nonAuthenticatedConnections = self.nonAuthenticatedConnections;
+ self.nonAuthenticatedConnections = [];
+
+ // Establish if the connection need to be authenticated
+ // Add to authentication list if
+ // 1. we were in an authentication process when the operation was executed
+ // 2. our current authentication timestamp is from the workItem one, meaning an auth has happened
+ if(connection.workItems.length == 1 && (connection.workItems[0].authenticating == true
+ || (typeof connection.workItems[0].authenticatingTimestamp == 'number'
+ && connection.workItems[0].authenticatingTimestamp != self.authenticatingTimestamp))) {
+ // Add connection to the list
+ connections.push(connection);
+ }
+
+ // No connections need to be re-authenticated
+ if(connections.length == 0) {
+ // Release the connection back to the pool
+ moveConnectionBetween(connection, self.inUseConnections, self.availableConnections);
+ // Finish
+ return callback();
+ }
+
+ // Apply re-authentication to all connections before releasing back to pool
+ var connectionCount = connections.length;
+ // Authenticate all connections
+ for(var i = 0; i < connectionCount; i++) {
+ reauthenticate(self, connections[i], function(err) {
+ connectionCount = connectionCount - 1;
+
+ if(connectionCount == 0) {
+ // Put non authenticated connections in available connections
+ self.availableConnections = self.availableConnections.concat(nonAuthenticatedConnections);
+ // Release the connection back to the pool
+ moveConnectionBetween(connection, self.inUseConnections, self.availableConnections);
+ // Return
+ callback();
+ }
+ });
+ }
+ }
+
+ function handleOperationCallback(self, cb, err, result) {
+ // No domain enabled
+ if(!self.options.domainsEnabled) {
+ return process.nextTick(function() {
+ return cb(err, result);
+ });
+ }
+
+ // Domain enabled just call the callback
+ cb(err, result);
+ }
+
+ authenticateStragglers(self, connection, function(err) {
+ // Keep executing, ensure current message handler does not stop execution
+ if(!self.executing) {
+ process.nextTick(function() {
+ _execute(self)();
+ });
+ }
+
+ // Time to dispatch the message if we have a callback
+ if(!workItem.immediateRelease) {
+ try {
+ // Parse the message according to the provided options
+ message.parse(workItem);
+ } catch(err) {
+ return handleOperationCallback(self, workItem.cb, MongoError.create(err));
+ }
+
+ // Establish if we have an error
+ if(workItem.command && message.documents[0] && (message.documents[0].ok == 0 || message.documents[0]['$err']
+ || message.documents[0]['errmsg'] || message.documents[0]['code'])) {
+ return handleOperationCallback(self, workItem.cb, MongoError.create(message.documents[0]));
+ }
+
+ // Add the connection details
+ message.hashedName = connection.hashedName;
+
+ // Return the documents
+ handleOperationCallback(self, workItem.cb, null, new CommandResult(workItem.fullResult ? message : message.documents[0], connection, message));
+ }
+ });
+ }
+}
+
+/**
+ * Return the total socket count in the pool.
+ * @method
+ * @return {Number} The number of socket available.
+ */
+Pool.prototype.socketCount = function() {
+ return this.availableConnections.length
+ + this.inUseConnections.length
+ + this.connectingConnections.length;
+}
+
+/**
+ * Return all pool connections
+ * @method
+ * @return {Connectio[]} The pool connections
+ */
+Pool.prototype.allConnections = function() {
+ return this.availableConnections
+ .concat(this.inUseConnections)
+ .concat(this.connectingConnections);
+}
+
+/**
+ * Get a pool connection (round-robin)
+ * @method
+ * @return {Connection}
+ */
+Pool.prototype.get = function() {
+ return this.allConnections()[0];
+}
+
+/**
+ * Is the pool connected
+ * @method
+ * @return {boolean}
+ */
+Pool.prototype.isConnected = function() {
+ // We are in a destroyed state
+ if(this.state == DESTROYED || this.state == DESTROYING) {
+ return false;
+ }
+
+ // Get connections
+ var connections = this.availableConnections
+ .concat(this.inUseConnections);
+
+ for(var i = 0; i < connections.length; i++) {
+ if(connections[i].isConnected()) return true;
+ }
+
+ // Might be authenticating, but we are still connected
+ if(connections.length == 0 && this.authenticating) {
+ return true
+ }
+
+ // Not connected
+ return false;
+}
+
+/**
+ * Was the pool destroyed
+ * @method
+ * @return {boolean}
+ */
+Pool.prototype.isDestroyed = function() {
+ return this.state == DESTROYED || this.state == DESTROYING;
+}
+
+/**
+ * Is the pool in a disconnected state
+ * @method
+ * @return {boolean}
+ */
+Pool.prototype.isDisconnected = function() {
+ return this.state == DISCONNECTED;
+}
+
+/**
+ * Connect pool
+ * @method
+ */
+Pool.prototype.connect = function(auth) {
+ if(this.state != DISCONNECTED) {
+ throw new MongoError('connection in unlawful state ' + this.state);
+ }
+
+ var self = this;
+ // Transition to connecting state
+ stateTransition(this, CONNECTING);
+ // Create an array of the arguments
+ var args = Array.prototype.slice.call(arguments, 0);
+ // Create a connection
+ var connection = new Connection(messageHandler(self), this.options);
+ // Add to list of connections
+ this.connectingConnections.push(connection);
+ // Add listeners to the connection
+ connection.once('connect', function(connection) {
+ if(self.state == DESTROYED || self.state == DESTROYING) return self.destroy();
+
+ // Apply any store credentials
+ reauthenticate(self, connection, function(err) {
+ if(self.state == DESTROYED || self.state == DESTROYING) return self.destroy();
+
+ // We have an error emit it
+ if(err) {
+ // Destroy the pool
+ self.destroy();
+ // Emit the error
+ return self.emit('error', err);
+ }
+
+ // Authenticate
+ authenticate(self, args, connection, function(err) {
+ if(self.state == DESTROYED || self.state == DESTROYING) return self.destroy();
+
+ // We have an error emit it
+ if(err) {
+ // Destroy the pool
+ self.destroy();
+ // Emit the error
+ return self.emit('error', err);
+ }
+ // Set connected mode
+ stateTransition(self, CONNECTED);
+
+ // Move the active connection
+ moveConnectionBetween(connection, self.connectingConnections, self.availableConnections);
+
+ // Emit the connect event
+ self.emit('connect', self);
+ });
+ });
+ });
+
+ // Add error handlers
+ connection.once('error', connectionFailureHandler(this, 'error'));
+ connection.once('close', connectionFailureHandler(this, 'close'));
+ connection.once('timeout', connectionFailureHandler(this, 'timeout'));
+ connection.once('parseError', connectionFailureHandler(this, 'parseError'));
+
+ try {
+ connection.connect();
+ } catch(err) {
+ // SSL or something threw on connect
+ self.emit('error', err);
+ }
+}
+
+/**
+ * Authenticate using a specified mechanism
+ * @method
+ * @param {string} mechanism The Auth mechanism we are invoking
+ * @param {string} db The db we are invoking the mechanism against
+ * @param {...object} param Parameters for the specific mechanism
+ * @param {authResultCallback} callback A callback function
+ */
+Pool.prototype.auth = function(mechanism, db) {
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 0);
+ var callback = args.pop();
+
+ // If we don't have the mechanism fail
+ if(self.authProviders[mechanism] == null && mechanism != 'default') {
+ throw new MongoError(f("auth provider %s does not exist", mechanism));
+ }
+
+ // Signal that we are authenticating a new set of credentials
+ this.authenticating = true;
+ this.authenticatingTimestamp = new Date().getTime();
+
+ // Authenticate all live connections
+ function authenticateLiveConnections(self, args, cb) {
+ // Get the current viable connections
+ var connections = self.availableConnections;
+ // Allow nothing else to use the connections while we authenticate them
+ self.availableConnections = [];
+
+ var connectionsCount = connections.length;
+ var error = null;
+ // No connections available, return
+ if(connectionsCount == 0) return callback(null);
+ // Authenticate the connections
+ for(var i = 0; i < connections.length; i++) {
+ authenticate(self, args, connections[i], function(err) {
+ connectionsCount = connectionsCount - 1;
+
+ // Store the error
+ if(err) error = err;
+
+ // Processed all connections
+ if(connectionsCount == 0) {
+ // Auth finished
+ self.authenticating = false;
+ // Add the connections back to available connections
+ self.availableConnections = self.availableConnections.concat(connections);
+ // We had an error, return it
+ if(error) {
+ // Log the error
+ if(self.logger.isError()) {
+ self.logger.error(f('[%s] failed to authenticate against server %s:%s'
+ , self.id, self.options.host, self.options.port));
+ }
+
+ return cb(error);
+ }
+ cb(null);
+ }
+ });
+ }
+ }
+
+ // Wait for a logout in process to happen
+ function waitForLogout(self, cb) {
+ if(!self.loggingout) return cb();
+ setTimeout(function() {
+ waitForLogout(self, cb);
+ }, 1)
+ }
+
+ // Wait for loggout to finish
+ waitForLogout(self, function() {
+ // Authenticate all live connections
+ authenticateLiveConnections(self, args, function(err) {
+ // Credentials correctly stored in auth provider if successful
+ // Any new connections will now reauthenticate correctly
+ self.authenticating = false;
+ // Return after authentication connections
+ callback(err);
+ });
+ });
+}
+
+/**
+ * Logout all users against a database
+ * @method
+ * @param {string} dbName The database name
+ * @param {authResultCallback} callback A callback function
+ */
+Pool.prototype.logout = function(dbName, callback) {
+ var self = this;
+ if(typeof dbName != 'string') {
+ throw new MongoError('logout method requires a db name as first argument');
+ }
+
+ if(typeof callback != 'function') {
+ throw new MongoError('logout method requires a callback');
+ }
+
+ // Indicate logout in process
+ this.loggingout = true;
+
+ // Get all relevant connections
+ var connections = self.availableConnections.concat(self.inUseConnections);
+ var count = connections.length;
+ // Store any error
+ var error = null;
+
+ // Send logout command over all the connections
+ for(var i = 0; i < connections.length; i++) {
+ write(self)(connections[i], new Query(this.options.bson
+ , f('%s.$cmd', dbName)
+ , {logout:1}, {numberToSkip: 0, numberToReturn: 1}), function(err, r) {
+ count = count - 1;
+ if(err) error = err;
+
+ if(count == 0) {
+ self.loggingout = false;
+ callback(error);
+ };
+ });
+ }
+}
+
+/**
+ * Unref the pool
+ * @method
+ */
+Pool.prototype.unref = function() {
+ // Get all the known connections
+ var connections = this.availableConnections
+ .concat(this.inUseConnections)
+ .concat(this.connectingConnections);
+ connections.forEach(function(c) {
+ c.unref();
+ });
+}
+
+// Events
+var events = ['error', 'close', 'timeout', 'parseError', 'connect'];
+
+// Destroy the connections
+function destroy(self, connections) {
+ // Destroy all connections
+ connections.forEach(function(c) {
+ // Remove all listeners
+ for(var i = 0; i < events.length; i++) {
+ c.removeAllListeners(events[i]);
+ }
+ // Destroy connection
+ c.destroy();
+ });
+
+ // Zero out all connections
+ self.inUseConnections = [];
+ self.availableConnections = [];
+ self.nonAuthenticatedConnections = [];
+ self.connectingConnections = [];
+
+ // Set state to destroyed
+ stateTransition(self, DESTROYED);
+}
+
+/**
+ * Destroy pool
+ * @method
+ */
+Pool.prototype.destroy = function(force) {
+ var self = this;
+ // Do not try again if the pool is already dead
+ if(this.state == DESTROYED || self.state == DESTROYING) return;
+ // Set state to destroyed
+ stateTransition(this, DESTROYING);
+
+ // Are we force closing
+ if(force) {
+ // Get all the known connections
+ var connections = self.availableConnections
+ .concat(self.inUseConnections)
+ .concat(self.nonAuthenticatedConnections)
+ .concat(self.connectingConnections);
+ return destroy(self, connections);
+ }
+
+ // Wait for the operations to drain before we close the pool
+ function checkStatus() {
+ if(self.queue.length == 0) {
+ // Get all the known connections
+ var connections = self.availableConnections
+ .concat(self.inUseConnections)
+ .concat(self.nonAuthenticatedConnections)
+ .concat(self.connectingConnections);
+
+ // Check if we have any in flight operations
+ for(var i = 0; i < connections.length; i++) {
+ // There is an operation still in flight, reschedule a
+ // check waiting for it to drain
+ if(connections[i].workItems.length > 0) {
+ return setTimeout(checkStatus, 1);
+ }
+ }
+
+ destroy(self, connections);
+ } else {
+ setTimeout(checkStatus, 1);
+ }
+ }
+
+ // Initiate drain of operations
+ checkStatus();
+}
+
+/**
+ * Write a message to MongoDB
+ * @method
+ * @return {Connection}
+ */
+Pool.prototype.write = function(commands, options, cb) {
+ var self = this;
+ // Ensure we have a callback
+ if(typeof options == 'function') {
+ cb = options;
+ }
+
+ // Always have options
+ options = options || {};
+
+ // Pool was destroyed error out
+ if(this.state == DESTROYED || this.state == DESTROYING) {
+ // Callback with an error
+ if(cb) {
+ try {
+ cb(new MongoError('pool destroyed'));
+ } catch(err) {
+ process.nextTick(function() {
+ throw err;
+ });
+ }
+ }
+
+ return;
+ }
+
+ if(this.options.domainsEnabled
+ && process.domain && typeof cb === "function") {
+ // if we have a domain bind to it
+ var oldCb = cb;
+ cb = process.domain.bind(function() {
+ // v8 - argumentsToArray one-liner
+ var args = new Array(arguments.length); for(var i = 0; i < arguments.length; i++) { args[i] = arguments[i]; }
+ // bounce off event loop so domain switch takes place
+ process.nextTick(function() {
+ oldCb.apply(null, args);
+ });
+ });
+ }
+
+ // Do we have an operation
+ var operation = {
+ cb: cb, raw: false, promoteLongs: true, promoteValues: true, promoteBuffers: false, fullResult: false
+ };
+
+ var buffer = null
+
+ if(Array.isArray(commands)) {
+ buffer = [];
+
+ for(var i = 0; i < commands.length; i++) {
+ buffer.push(commands[i].toBin());
+ }
+
+ // Get the requestId
+ operation.requestId = commands[commands.length - 1].requestId;
+ } else {
+ operation.requestId = commands.requestId;
+ buffer = commands.toBin();
+ }
+
+ // Set the buffers
+ operation.buffer = buffer;
+
+ // Set the options for the parsing
+ operation.promoteLongs = typeof options.promoteLongs == 'boolean' ? options.promoteLongs : true;
+ operation.promoteValues = typeof options.promoteValues == 'boolean' ? options.promoteValues : true;
+ operation.promoteBuffers = typeof options.promoteBuffers == 'boolean' ? options.promoteBuffers : false;
+ operation.raw = typeof options.raw == 'boolean' ? options.raw : false;
+ operation.immediateRelease = typeof options.immediateRelease == 'boolean' ? options.immediateRelease : false;
+ operation.documentsReturnedIn = options.documentsReturnedIn;
+ operation.command = typeof options.command == 'boolean' ? options.command : false;
+ operation.fullResult = typeof options.fullResult == 'boolean' ? options.fullResult : false;
+ // operation.requestId = options.requestId;
+
+ // Optional per operation socketTimeout
+ operation.socketTimeout = options.socketTimeout;
+ operation.monitoring = options.monitoring;
+
+ // We need to have a callback function unless the message returns no response
+ if(!(typeof cb == 'function') && !options.noResponse) {
+ throw new MongoError('write method must provide a callback');
+ }
+
+ // If we have a monitoring operation schedule as the very first operation
+ // Otherwise add to back of queue
+ if(options.monitoring) {
+ this.queue.unshift(operation);
+ } else {
+ this.queue.push(operation);
+ }
+
+ // Attempt to execute the operation
+ if(!self.executing) {
+ process.nextTick(function() {
+ _execute(self)();
+ });
+ }
+}
+
+// Remove connection method
+function remove(connection, connections) {
+ for(var i = 0; i < connections.length; i++) {
+ if(connections[i] === connection) {
+ connections.splice(i, 1);
+ return true;
+ }
+ }
+}
+
+function removeConnection(self, connection) {
+ if(remove(connection, self.availableConnections)) return;
+ if(remove(connection, self.inUseConnections)) return;
+ if(remove(connection, self.connectingConnections)) return;
+ if(remove(connection, self.nonAuthenticatedConnections)) return;
+}
+
+// All event handlers
+var handlers = ["close", "message", "error", "timeout", "parseError", "connect"];
+
+function _createConnection(self) {
+ var connection = new Connection(messageHandler(self), self.options);
+
+ // Push the connection
+ self.connectingConnections.push(connection);
+
+ // Handle any errors
+ var tempErrorHandler = function(_connection) {
+ return function(err) {
+ // Destroy the connection
+ _connection.destroy();
+ // Remove the connection from the connectingConnections list
+ removeConnection(self, _connection);
+ // Start reconnection attempts
+ if(!self.reconnectId && self.options.reconnect) {
+ self.reconnectId = setTimeout(attemptReconnect(self), self.options.reconnectInterval);
+ }
+ }
+ }
+
+ // Handle successful connection
+ var tempConnectHandler = function(_connection) {
+ return function() {
+ // Destroyed state return
+ if(self.state == DESTROYED || self.state == DESTROYING) {
+ // Remove the connection from the list
+ removeConnection(self, _connection);
+ return _connection.destroy();
+ }
+
+ // Destroy all event emitters
+ handlers.forEach(function(e) {
+ _connection.removeAllListeners(e);
+ });
+
+ // Add the final handlers
+ _connection.once('close', connectionFailureHandler(self, 'close'));
+ _connection.once('error', connectionFailureHandler(self, 'error'));
+ _connection.once('timeout', connectionFailureHandler(self, 'timeout'));
+ _connection.once('parseError', connectionFailureHandler(self, 'parseError'));
+
+ // Signal
+ reauthenticate(self, _connection, function(err) {
+ if(self.state == DESTROYED || self.state == DESTROYING) {
+ return _connection.destroy();
+ }
+ // Remove the connection from the connectingConnections list
+ removeConnection(self, _connection);
+
+ // Handle error
+ if(err) {
+ return _connection.destroy();
+ }
+
+ // If we are authenticating at the moment
+ // Do not automatially put in available connections
+ // As we need to apply the credentials first
+ if(self.authenticating) {
+ self.nonAuthenticatedConnections.push(_connection);
+ } else {
+ // Push to available
+ self.availableConnections.push(_connection);
+ // Execute any work waiting
+ _execute(self)();
+ }
+ });
+ }
+ }
+
+ // Add all handlers
+ connection.once('close', tempErrorHandler(connection));
+ connection.once('error', tempErrorHandler(connection));
+ connection.once('timeout', tempErrorHandler(connection));
+ connection.once('parseError', tempErrorHandler(connection));
+ connection.once('connect', tempConnectHandler(connection));
+
+ // Start connection
+ connection.connect();
+}
+
+function flushMonitoringOperations(queue) {
+ for(var i = 0; i < queue.length; i++) {
+ if(queue[i].monitoring) {
+ var workItem = queue[i];
+ queue.splice(i, 1);
+ workItem.cb(new MongoError({ message: 'no connection available for monitoring', driver:true }));
+ }
+ }
+}
+
+function _execute(self) {
+ return function() {
+ if(self.state == DESTROYED) return;
+ // Already executing, skip
+ if(self.executing) return;
+ // Set pool as executing
+ self.executing = true;
+
+ // Wait for auth to clear before continuing
+ function waitForAuth(cb) {
+ if(!self.authenticating) return cb();
+ // Wait for a milisecond and try again
+ setTimeout(function() {
+ waitForAuth(cb);
+ }, 1);
+ }
+
+ // Block on any auth in process
+ waitForAuth(function() {
+ // As long as we have available connections
+ while(true) {
+ // Total availble connections
+ var totalConnections = self.availableConnections.length
+ + self.connectingConnections.length
+ + self.inUseConnections.length;
+
+ // No available connections available, flush any monitoring ops
+ if(self.availableConnections.length == 0) {
+ // Flush any monitoring operations
+ flushMonitoringOperations(self.queue);
+ break;
+ }
+
+ // No queue break
+ if(self.queue.length == 0) {
+ break;
+ }
+
+ // Get a connection
+ // var connection = self.availableConnections.pop();
+ var connection = self.availableConnections[self.connectionIndex++ % self.availableConnections.length];
+ // Is the connection connected
+ if(connection.isConnected()) {
+ // Get the next work item
+ var workItem = self.queue.shift();
+
+ // Get actual binary commands
+ var buffer = workItem.buffer;
+
+ // Set current status of authentication process
+ workItem.authenticating = self.authenticating;
+ workItem.authenticatingTimestamp = self.authenticatingTimestamp;
+
+ // Add current associated callback to the connection
+ // connection.workItem = workItem
+ connection.workItems.push(workItem);
+
+ // We have a custom socketTimeout
+ if(!workItem.immediateRelease && typeof workItem.socketTimeout == 'number') {
+ connection.setSocketTimeout(workItem.socketTimeout);
+ }
+
+ // Put operation on the wire
+ if(Array.isArray(buffer)) {
+ for(var i = 0; i < buffer.length; i++) {
+ connection.write(buffer[i])
+ }
+ } else {
+ connection.write(buffer);
+ }
+
+ if(workItem.immediateRelease && self.authenticating) {
+ self.nonAuthenticatedConnections.push(connection);
+ }
+
+ // Have we not reached the max connection size yet
+ if(totalConnections < self.options.size
+ && self.queue.length > 0) {
+ // Create a new connection
+ _createConnection(self);
+ }
+ } else {
+ flushMonitoringOperations(self.queue);
+ }
+ }
+ });
+
+ self.executing = false;
+ }
+}
+
+var connectionId = 0
+/**
+ * A server connect event, used to verify that the connection is up and running
+ *
+ * @event Pool#connect
+ * @type {Pool}
+ */
+
+/**
+ * A server reconnect event, used to verify that pool reconnected.
+ *
+ * @event Pool#reconnect
+ * @type {Pool}
+ */
+
+/**
+ * The server connection closed, all pool connections closed
+ *
+ * @event Pool#close
+ * @type {Pool}
+ */
+
+/**
+ * The server connection caused an error, all pool connections closed
+ *
+ * @event Pool#error
+ * @type {Pool}
+ */
+
+/**
+ * The server connection timed out, all pool connections closed
+ *
+ * @event Pool#timeout
+ * @type {Pool}
+ */
+
+/**
+ * The driver experienced an invalid message, all pool connections closed
+ *
+ * @event Pool#parseError
+ * @type {Pool}
+ */
+
+/**
+ * The driver attempted to reconnect
+ *
+ * @event Pool#attemptReconnect
+ * @type {Pool}
+ */
+
+/**
+ * The driver exhausted all reconnect attempts
+ *
+ * @event Pool#reconnectFailed
+ * @type {Pool}
+ */
+
+module.exports = Pool;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/utils.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/utils.js
new file mode 100644
index 0000000..019ef19
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/utils.js
@@ -0,0 +1,67 @@
+"use strict";
+
+// Set property function
+var setProperty = function(obj, prop, flag, values) {
+ Object.defineProperty(obj, prop.name, {
+ enumerable:true,
+ set: function(value) {
+ if(typeof value != 'boolean') throw new Error(f("%s required a boolean", prop.name));
+ // Flip the bit to 1
+ if(value == true) values.flags |= flag;
+ // Flip the bit to 0 if it's set, otherwise ignore
+ if(value == false && (values.flags & flag) == flag) values.flags ^= flag;
+ prop.value = value;
+ }
+ , get: function() { return prop.value; }
+ });
+}
+
+// Set property function
+var getProperty = function(obj, propName, fieldName, values, func) {
+ Object.defineProperty(obj, propName, {
+ enumerable:true,
+ get: function() {
+ // Not parsed yet, parse it
+ if(values[fieldName] == null && obj.isParsed && !obj.isParsed()) {
+ obj.parse();
+ }
+
+ // Do we have a post processing function
+ if(typeof func == 'function') return func(values[fieldName]);
+ // Return raw value
+ return values[fieldName];
+ }
+ });
+}
+
+// Set simple property
+var getSingleProperty = function(obj, name, value) {
+ Object.defineProperty(obj, name, {
+ enumerable:true,
+ get: function() {
+ return value
+ }
+ });
+}
+
+// Shallow copy
+var copy = function(fObj, tObj) {
+ tObj = tObj || {};
+ for(var name in fObj) tObj[name] = fObj[name];
+ return tObj;
+}
+
+var debugOptions = function(debugFields, options) {
+ var finaloptions = {};
+ debugFields.forEach(function(n) {
+ finaloptions[n] = options[n];
+ });
+
+ return finaloptions;
+}
+
+exports.setProperty = setProperty;
+exports.getProperty = getProperty;
+exports.getSingleProperty = getSingleProperty;
+exports.copy = copy;
+exports.debugOptions = debugOptions;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js
new file mode 100644
index 0000000..12c9c27
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js
@@ -0,0 +1,699 @@
+"use strict";
+
+var Long = require('bson').Long
+ , Logger = require('./connection/logger')
+ , MongoError = require('./error')
+ , f = require('util').format;
+
+/**
+ * This is a cursor results callback
+ *
+ * @callback resultCallback
+ * @param {error} error An error object. Set to null if no error present
+ * @param {object} document
+ */
+
+/**
+ * @fileOverview The **Cursor** class is an internal class that embodies a cursor on MongoDB
+ * allowing for iteration over the results returned from the underlying query.
+ *
+ * **CURSORS Cannot directly be instantiated**
+ * @example
+ * var Server = require('mongodb-core').Server
+ * , ReadPreference = require('mongodb-core').ReadPreference
+ * , assert = require('assert');
+ *
+ * var server = new Server({host: 'localhost', port: 27017});
+ * // Wait for the connection event
+ * server.on('connect', function(server) {
+ * assert.equal(null, err);
+ *
+ * // Execute the write
+ * var cursor = _server.cursor('integration_tests.inserts_example4', {
+ * find: 'integration_tests.example4'
+ * , query: {a:1}
+ * }, {
+ * readPreference: new ReadPreference('secondary');
+ * });
+ *
+ * // Get the first document
+ * cursor.next(function(err, doc) {
+ * assert.equal(null, err);
+ * server.destroy();
+ * });
+ * });
+ *
+ * // Start connecting
+ * server.connect();
+ */
+
+/**
+ * Creates a new Cursor, not to be used directly
+ * @class
+ * @param {object} bson An instance of the BSON parser
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {{object}|Long} cmd The selector (can be a command or a cursorId)
+ * @param {object} [options=null] Optional settings.
+ * @param {object} [options.batchSize=1000] Batchsize for the operation
+ * @param {array} [options.documents=[]] Initial documents list for cursor
+ * @param {object} [options.transforms=null] Transform methods for the cursor results
+ * @param {function} [options.transforms.query] Transform the value returned from the initial query
+ * @param {function} [options.transforms.doc] Transform each document returned from Cursor.prototype.next
+ * @param {object} topology The server topology instance.
+ * @param {object} topologyOptions The server topology options.
+ * @return {Cursor} A cursor instance
+ * @property {number} cursorBatchSize The current cursorBatchSize for the cursor
+ * @property {number} cursorLimit The current cursorLimit for the cursor
+ * @property {number} cursorSkip The current cursorSkip for the cursor
+ */
+var Cursor = function(bson, ns, cmd, options, topology, topologyOptions) {
+ options = options || {};
+ // Cursor reference
+ var self = this;
+ // Initial query
+ var query = null;
+
+ // Cursor pool
+ this.pool = null;
+ // Cursor server
+ this.server = null;
+
+ // Do we have a not connected handler
+ this.disconnectHandler = options.disconnectHandler;
+
+ // Set local values
+ this.bson = bson;
+ this.ns = ns;
+ this.cmd = cmd;
+ this.options = options;
+ this.topology = topology;
+
+ // All internal state
+ this.cursorState = {
+ cursorId: null
+ , cmd: cmd
+ , documents: options.documents || []
+ , cursorIndex: 0
+ , dead: false
+ , killed: false
+ , init: false
+ , notified: false
+ , limit: options.limit || cmd.limit || 0
+ , skip: options.skip || cmd.skip || 0
+ , batchSize: options.batchSize || cmd.batchSize || 1000
+ , currentLimit: 0
+ // Result field name if not a cursor (contains the array of results)
+ , transforms: options.transforms
+ }
+
+ // Add promoteLong to cursor state
+ if(typeof topologyOptions.promoteLongs == 'boolean') {
+ this.cursorState.promoteLongs = topologyOptions.promoteLongs;
+ } else if(typeof options.promoteLongs == 'boolean') {
+ this.cursorState.promoteLongs = options.promoteLongs;
+ }
+
+ // Add promoteValues to cursor state
+ if(typeof topologyOptions.promoteValues == 'boolean') {
+ this.cursorState.promoteValues = topologyOptions.promoteValues;
+ } else if(typeof options.promoteValues == 'boolean') {
+ this.cursorState.promoteValues = options.promoteValues;
+ }
+
+ // Add promoteBuffers to cursor state
+ if(typeof topologyOptions.promoteBuffers == 'boolean') {
+ this.cursorState.promoteBuffers = topologyOptions.promoteBuffers;
+ } else if(typeof options.promoteBuffers == 'boolean') {
+ this.cursorState.promoteBuffers = options.promoteBuffers;
+ }
+
+ // Logger
+ this.logger = Logger('Cursor', topologyOptions);
+
+ //
+ // Did we pass in a cursor id
+ if(typeof cmd == 'number') {
+ this.cursorState.cursorId = Long.fromNumber(cmd);
+ this.cursorState.lastCursorId = this.cursorState.cursorId;
+ } else if(cmd instanceof Long) {
+ this.cursorState.cursorId = cmd;
+ this.cursorState.lastCursorId = cmd;
+ }
+}
+
+Cursor.prototype.setCursorBatchSize = function(value) {
+ this.cursorState.batchSize = value;
+}
+
+Cursor.prototype.cursorBatchSize = function() {
+ return this.cursorState.batchSize;
+}
+
+Cursor.prototype.setCursorLimit = function(value) {
+ this.cursorState.limit = value;
+}
+
+Cursor.prototype.cursorLimit = function() {
+ return this.cursorState.limit;
+}
+
+Cursor.prototype.setCursorSkip = function(value) {
+ this.cursorState.skip = value;
+}
+
+Cursor.prototype.cursorSkip = function() {
+ return this.cursorState.skip;
+}
+
+//
+// Handle callback (including any exceptions thrown)
+var handleCallback = function(callback, err, result) {
+ try {
+ callback(err, result);
+ } catch(err) {
+ process.nextTick(function() {
+ throw err;
+ });
+ }
+}
+
+// Internal methods
+Cursor.prototype._find = function(callback) {
+ var self = this;
+
+ if(self.logger.isDebug()) {
+ self.logger.debug(f("issue initial query [%s] with flags [%s]"
+ , JSON.stringify(self.cmd)
+ , JSON.stringify(self.query)));
+ }
+
+ var queryCallback = function(err, r) {
+ if(err) return callback(err);
+
+ // Get the raw message
+ var result = r.message;
+
+ // Query failure bit set
+ if(result.queryFailure) {
+ return callback(MongoError.create(result.documents[0]), null);
+ }
+
+ // Check if we have a command cursor
+ if(Array.isArray(result.documents) && result.documents.length == 1
+ && (!self.cmd.find || (self.cmd.find && self.cmd.virtual == false))
+ && (result.documents[0].cursor != 'string'
+ || result.documents[0]['$err']
+ || result.documents[0]['errmsg']
+ || Array.isArray(result.documents[0].result))
+ ) {
+
+ // We have a an error document return the error
+ if(result.documents[0]['$err']
+ || result.documents[0]['errmsg']) {
+ return callback(MongoError.create(result.documents[0]), null);
+ }
+
+ // We have a cursor document
+ if(result.documents[0].cursor != null
+ && typeof result.documents[0].cursor != 'string') {
+ var id = result.documents[0].cursor.id;
+ // If we have a namespace change set the new namespace for getmores
+ if(result.documents[0].cursor.ns) {
+ self.ns = result.documents[0].cursor.ns;
+ }
+ // Promote id to long if needed
+ self.cursorState.cursorId = typeof id == 'number' ? Long.fromNumber(id) : id;
+ self.cursorState.lastCursorId = self.cursorState.cursorId;
+ // If we have a firstBatch set it
+ if(Array.isArray(result.documents[0].cursor.firstBatch)) {
+ self.cursorState.documents = result.documents[0].cursor.firstBatch;//.reverse();
+ }
+
+ // Return after processing command cursor
+ return callback(null, null);
+ }
+
+ if(Array.isArray(result.documents[0].result)) {
+ self.cursorState.documents = result.documents[0].result;
+ self.cursorState.cursorId = Long.ZERO;
+ return callback(null, null);
+ }
+ }
+
+ // Otherwise fall back to regular find path
+ self.cursorState.cursorId = result.cursorId;
+ self.cursorState.documents = result.documents;
+ self.cursorState.lastCursorId = result.cursorId;
+
+ // Transform the results with passed in transformation method if provided
+ if(self.cursorState.transforms && typeof self.cursorState.transforms.query == 'function') {
+ self.cursorState.documents = self.cursorState.transforms.query(result);
+ }
+
+ // Return callback
+ callback(null, null);
+ }
+
+ // Options passed to the pool
+ var queryOptions = {};
+
+ // If we have a raw query decorate the function
+ if(self.options.raw || self.cmd.raw) {
+ // queryCallback.raw = self.options.raw || self.cmd.raw;
+ queryOptions.raw = self.options.raw || self.cmd.raw;
+ }
+
+ // Do we have documentsReturnedIn set on the query
+ if(typeof self.query.documentsReturnedIn == 'string') {
+ // queryCallback.documentsReturnedIn = self.query.documentsReturnedIn;
+ queryOptions.documentsReturnedIn = self.query.documentsReturnedIn;
+ }
+
+ // Add promote Long value if defined
+ if(typeof self.cursorState.promoteLongs == 'boolean') {
+ queryOptions.promoteLongs = self.cursorState.promoteLongs;
+ }
+
+ // Add promote values if defined
+ if(typeof self.cursorState.promoteValues == 'boolean') {
+ queryOptions.promoteValues = self.cursorState.promoteValues;
+ }
+
+ // Add promote values if defined
+ if(typeof self.cursorState.promoteBuffers == 'boolean') {
+ queryOptions.promoteBuffers = self.cursorState.promoteBuffers;
+ }
+
+ // Write the initial command out
+ self.server.s.pool.write(self.query, queryOptions, queryCallback);
+}
+
+Cursor.prototype._getmore = function(callback) {
+ if(this.logger.isDebug()) this.logger.debug(f("schedule getMore call for query [%s]", JSON.stringify(this.query)))
+ // Determine if it's a raw query
+ var raw = this.options.raw || this.cmd.raw;
+
+ // Set the current batchSize
+ var batchSize = this.cursorState.batchSize;
+ if(this.cursorState.limit > 0
+ && ((this.cursorState.currentLimit + batchSize) > this.cursorState.limit)) {
+ batchSize = this.cursorState.limit - this.cursorState.currentLimit;
+ }
+
+ // Default pool
+ var pool = this.server.s.pool;
+
+ // We have a wire protocol handler
+ this.server.wireProtocolHandler.getMore(this.bson, this.ns, this.cursorState, batchSize, raw, pool, this.options, callback);
+}
+
+Cursor.prototype._killcursor = function(callback) {
+ // Set cursor to dead
+ this.cursorState.dead = true;
+ this.cursorState.killed = true;
+ // Remove documents
+ this.cursorState.documents = [];
+
+ // If no cursor id just return
+ if(this.cursorState.cursorId == null || this.cursorState.cursorId.isZero() || this.cursorState.init == false) {
+ if(callback) callback(null, null);
+ return;
+ }
+
+ // Default pool
+ var pool = this.server.s.pool;
+ // Execute command
+ this.server.wireProtocolHandler.killCursor(this.bson, this.ns, this.cursorState.cursorId, pool, callback);
+}
+
+/**
+ * Clone the cursor
+ * @method
+ * @return {Cursor}
+ */
+Cursor.prototype.clone = function() {
+ return this.topology.cursor(this.ns, this.cmd, this.options);
+}
+
+/**
+ * Checks if the cursor is dead
+ * @method
+ * @return {boolean} A boolean signifying if the cursor is dead or not
+ */
+Cursor.prototype.isDead = function() {
+ return this.cursorState.dead == true;
+}
+
+/**
+ * Checks if the cursor was killed by the application
+ * @method
+ * @return {boolean} A boolean signifying if the cursor was killed by the application
+ */
+Cursor.prototype.isKilled = function() {
+ return this.cursorState.killed == true;
+}
+
+/**
+ * Checks if the cursor notified it's caller about it's death
+ * @method
+ * @return {boolean} A boolean signifying if the cursor notified the callback
+ */
+Cursor.prototype.isNotified = function() {
+ return this.cursorState.notified == true;
+}
+
+/**
+ * Returns current buffered documents length
+ * @method
+ * @return {number} The number of items in the buffered documents
+ */
+Cursor.prototype.bufferedCount = function() {
+ return this.cursorState.documents.length - this.cursorState.cursorIndex;
+}
+
+/**
+ * Returns current buffered documents
+ * @method
+ * @return {Array} An array of buffered documents
+ */
+Cursor.prototype.readBufferedDocuments = function(number) {
+ var unreadDocumentsLength = this.cursorState.documents.length - this.cursorState.cursorIndex;
+ var length = number < unreadDocumentsLength ? number : unreadDocumentsLength;
+ var elements = this.cursorState.documents.slice(this.cursorState.cursorIndex, this.cursorState.cursorIndex + length);
+
+ // Transform the doc with passed in transformation method if provided
+ if(this.cursorState.transforms && typeof this.cursorState.transforms.doc == 'function') {
+ // Transform all the elements
+ for(var i = 0; i < elements.length; i++) {
+ elements[i] = this.cursorState.transforms.doc(elements[i]);
+ }
+ }
+
+ // Ensure we do not return any more documents than the limit imposed
+ // Just return the number of elements up to the limit
+ if(this.cursorState.limit > 0 && (this.cursorState.currentLimit + elements.length) > this.cursorState.limit) {
+ elements = elements.slice(0, (this.cursorState.limit - this.cursorState.currentLimit));
+ this.kill();
+ }
+
+ // Adjust current limit
+ this.cursorState.currentLimit = this.cursorState.currentLimit + elements.length;
+ this.cursorState.cursorIndex = this.cursorState.cursorIndex + elements.length;
+
+ // Return elements
+ return elements;
+}
+
+/**
+ * Kill the cursor
+ * @method
+ * @param {resultCallback} callback A callback function
+ */
+Cursor.prototype.kill = function(callback) {
+ this._killcursor(callback);
+}
+
+/**
+ * Resets the cursor
+ * @method
+ * @return {null}
+ */
+Cursor.prototype.rewind = function() {
+ if(this.cursorState.init) {
+ if(!this.cursorState.dead) {
+ this.kill();
+ }
+
+ this.cursorState.currentLimit = 0;
+ this.cursorState.init = false;
+ this.cursorState.dead = false;
+ this.cursorState.killed = false;
+ this.cursorState.notified = false;
+ this.cursorState.documents = [];
+ this.cursorState.cursorId = null;
+ this.cursorState.cursorIndex = 0;
+ }
+}
+
+/**
+ * Validate if the pool is dead and return error
+ */
+var isConnectionDead = function(self, callback) {
+ if(self.pool
+ && self.pool.isDestroyed()) {
+ self.cursorState.notified = true;
+ self.cursorState.killed = true;
+ self.cursorState.documents = [];
+ self.cursorState.cursorIndex = 0;
+ callback(MongoError.create(f('connection to host %s:%s was destroyed', self.pool.host, self.pool.port)))
+ return true;
+ }
+
+ return false;
+}
+
+/**
+ * Validate if the cursor is dead but was not explicitly killed by user
+ */
+var isCursorDeadButNotkilled = function(self, callback) {
+ // Cursor is dead but not marked killed, return null
+ if(self.cursorState.dead && !self.cursorState.killed) {
+ self.cursorState.notified = true;
+ self.cursorState.killed = true;
+ self.cursorState.documents = [];
+ self.cursorState.cursorIndex = 0;
+ handleCallback(callback, null, null);
+ return true;
+ }
+
+ return false;
+}
+
+/**
+ * Validate if the cursor is dead and was killed by user
+ */
+var isCursorDeadAndKilled = function(self, callback) {
+ if(self.cursorState.dead && self.cursorState.killed) {
+ handleCallback(callback, MongoError.create("cursor is dead"));
+ return true;
+ }
+
+ return false;
+}
+
+/**
+ * Validate if the cursor was killed by the user
+ */
+var isCursorKilled = function(self, callback) {
+ if(self.cursorState.killed) {
+ self.cursorState.notified = true;
+ self.cursorState.documents = [];
+ self.cursorState.cursorIndex = 0;
+ handleCallback(callback, null, null);
+ return true;
+ }
+
+ return false;
+}
+
+/**
+ * Mark cursor as being dead and notified
+ */
+var setCursorDeadAndNotified = function(self, callback) {
+ self.cursorState.dead = true;
+ self.cursorState.notified = true;
+ self.cursorState.documents = [];
+ self.cursorState.cursorIndex = 0;
+ handleCallback(callback, null, null);
+}
+
+/**
+ * Mark cursor as being notified
+ */
+var setCursorNotified = function(self, callback) {
+ self.cursorState.notified = true;
+ self.cursorState.documents = [];
+ self.cursorState.cursorIndex = 0;
+ handleCallback(callback, null, null);
+}
+
+var push = Array.prototype.push;
+
+var nextFunction = function(self, callback) {
+ // We have notified about it
+ if(self.cursorState.notified) {
+ return callback(new Error('cursor is exhausted'));
+ }
+
+ // Cursor is killed return null
+ if(isCursorKilled(self, callback)) return;
+
+ // Cursor is dead but not marked killed, return null
+ if(isCursorDeadButNotkilled(self, callback)) return;
+
+ // We have a dead and killed cursor, attempting to call next should error
+ if(isCursorDeadAndKilled(self, callback)) return;
+
+ // We have just started the cursor
+ if(!self.cursorState.init) {
+ // Topology is not connected, save the call in the provided store to be
+ // Executed at some point when the handler deems it's reconnected
+ if(!self.topology.isConnected(self.options) && self.disconnectHandler != null) {
+ if (self.topology.isDestroyed()) {
+ // Topology was destroyed, so don't try to wait for it to reconnect
+ return callback(new MongoError('Topology was destroyed'));
+ }
+ return self.disconnectHandler.addObjectAndMethod('cursor', self, 'next', [callback], callback);
+ }
+
+ try {
+ self.server = self.topology.getServer(self.options);
+ } catch(err) {
+ // Handle the error and add object to next method call
+ if(self.disconnectHandler != null) {
+ return self.disconnectHandler.addObjectAndMethod('cursor', self, 'next', [callback], callback);
+ }
+
+ // Otherwise return the error
+ return callback(err);
+ }
+
+ // Set as init
+ self.cursorState.init = true;
+
+ // Server does not support server
+ if(self.cmd
+ && self.cmd.collation
+ && self.server.ismaster.maxWireVersion < 5) {
+ return callback(new MongoError(f('server %s does not support collation', self.server.name)));
+ }
+
+ try {
+ self.query = self.server.wireProtocolHandler.command(self.bson, self.ns, self.cmd, self.cursorState, self.topology, self.options);
+ } catch(err) {
+ return callback(err);
+ }
+ }
+
+ // If we don't have a cursorId execute the first query
+ if(self.cursorState.cursorId == null) {
+ // Check if pool is dead and return if not possible to
+ // execute the query against the db
+ if(isConnectionDead(self, callback)) return;
+
+ // Check if topology is destroyed
+ if(self.topology.isDestroyed()) return callback(new MongoError(f('connection destroyed, not possible to instantiate cursor')));
+
+ // query, cmd, options, cursorState, callback
+ self._find(function(err, r) {
+ if(err) return handleCallback(callback, err, null);
+
+ if(self.cursorState.documents.length == 0
+ && self.cursorState.cursorId && self.cursorState.cursorId.isZero()
+ && !self.cmd.tailable && !self.cmd.awaitData) {
+ return setCursorNotified(self, callback);
+ }
+
+ nextFunction(self, callback);
+ });
+ } else if(self.cursorState.limit > 0 && self.cursorState.currentLimit >= self.cursorState.limit) {
+ // Ensure we kill the cursor on the server
+ self.kill();
+ // Set cursor in dead and notified state
+ return setCursorDeadAndNotified(self, callback);
+ } else if(self.cursorState.cursorIndex == self.cursorState.documents.length
+ && !Long.ZERO.equals(self.cursorState.cursorId)) {
+ // Ensure an empty cursor state
+ self.cursorState.documents = [];
+ self.cursorState.cursorIndex = 0;
+
+ // Check if topology is destroyed
+ if(self.topology.isDestroyed()) return callback(new MongoError(f('connection destroyed, not possible to instantiate cursor')));
+
+ // Check if connection is dead and return if not possible to
+ // execute a getmore on this connection
+ if(isConnectionDead(self, callback)) return;
+
+ // Execute the next get more
+ self._getmore(function(err, doc, connection) {
+ if(err) return handleCallback(callback, err);
+
+ // Save the returned connection to ensure all getMore's fire over the same connection
+ self.connection = connection;
+
+ // Tailable cursor getMore result, notify owner about it
+ // No attempt is made here to retry, this is left to the user of the
+ // core module to handle to keep core simple
+ if(self.cursorState.documents.length == 0
+ && self.cmd.tailable && Long.ZERO.equals(self.cursorState.cursorId)) {
+ // No more documents in the tailed cursor
+ return handleCallback(callback, MongoError.create({
+ message: "No more documents in tailed cursor"
+ , tailable: self.cmd.tailable
+ , awaitData: self.cmd.awaitData
+ }));
+ } else if(self.cursorState.documents.length == 0
+ && self.cmd.tailable && !Long.ZERO.equals(self.cursorState.cursorId)) {
+ return nextFunction(self, callback);
+ }
+
+ if(self.cursorState.limit > 0 && self.cursorState.currentLimit >= self.cursorState.limit) {
+ return setCursorDeadAndNotified(self, callback);
+ }
+
+ nextFunction(self, callback);
+ });
+ } else if(self.cursorState.documents.length == self.cursorState.cursorIndex
+ && self.cmd.tailable && Long.ZERO.equals(self.cursorState.cursorId)) {
+ return handleCallback(callback, MongoError.create({
+ message: "No more documents in tailed cursor"
+ , tailable: self.cmd.tailable
+ , awaitData: self.cmd.awaitData
+ }));
+ } else if(self.cursorState.documents.length == self.cursorState.cursorIndex
+ && Long.ZERO.equals(self.cursorState.cursorId)) {
+ setCursorDeadAndNotified(self, callback);
+ } else {
+ if(self.cursorState.limit > 0 && self.cursorState.currentLimit >= self.cursorState.limit) {
+ // Ensure we kill the cursor on the server
+ self.kill();
+ // Set cursor in dead and notified state
+ return setCursorDeadAndNotified(self, callback);
+ }
+
+ // Increment the current cursor limit
+ self.cursorState.currentLimit += 1;
+
+ // Get the document
+ var doc = self.cursorState.documents[self.cursorState.cursorIndex++];
+
+ // Doc overflow
+ if(doc.$err) {
+ // Ensure we kill the cursor on the server
+ self.kill();
+ // Set cursor in dead and notified state
+ return setCursorDeadAndNotified(self, function() {
+ handleCallback(callback, new MongoError(doc.$err));
+ });
+ }
+
+ // Transform the doc with passed in transformation method if provided
+ if(self.cursorState.transforms && typeof self.cursorState.transforms.doc == 'function') {
+ doc = self.cursorState.transforms.doc(doc);
+ }
+
+ // Return the document
+ handleCallback(callback, null, doc);
+ }
+}
+
+/**
+ * Retrieve the next document from the cursor
+ * @method
+ * @param {resultCallback} callback A callback function
+ */
+Cursor.prototype.next = function(callback) {
+ nextFunction(this, callback);
+}
+
+module.exports = Cursor;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/error.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/error.js
new file mode 100644
index 0000000..31ede94
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/error.js
@@ -0,0 +1,44 @@
+"use strict";
+
+/**
+ * Creates a new MongoError
+ * @class
+ * @augments Error
+ * @param {string} message The error message
+ * @return {MongoError} A MongoError instance
+ */
+function MongoError(message) {
+ this.name = 'MongoError';
+ this.message = message;
+ Error.captureStackTrace(this, MongoError);
+}
+
+/**
+ * Creates a new MongoError object
+ * @method
+ * @param {object} options The error options
+ * @return {MongoError} A MongoError instance
+ */
+MongoError.create = function(options) {
+ var err = null;
+
+ if(options instanceof Error) {
+ err = new MongoError(options.message);
+ err.stack = options.stack;
+ } else if(typeof options == 'string') {
+ err = new MongoError(options);
+ } else {
+ err = new MongoError(options.message || options.errmsg || options.$err || "n/a");
+ // Other options
+ for(var name in options) {
+ err[name] = options[name];
+ }
+ }
+
+ return err;
+}
+
+// Extend JavaScript error
+MongoError.prototype = new Error;
+
+module.exports = MongoError;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/tools/smoke_plugin.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/tools/smoke_plugin.js
new file mode 100644
index 0000000..dcceda4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/tools/smoke_plugin.js
@@ -0,0 +1,59 @@
+var fs = require('fs');
+
+/* Note: because this plugin uses process.on('uncaughtException'), only one
+ * of these can exist at any given time. This plugin and anything else that
+ * uses process.on('uncaughtException') will conflict. */
+exports.attachToRunner = function(runner, outputFile) {
+ var smokeOutput = { results : [] };
+ var runningTests = {};
+
+ var integraPlugin = {
+ beforeTest: function(test, callback) {
+ test.startTime = Date.now();
+ runningTests[test.name] = test;
+ callback();
+ },
+ afterTest: function(test, callback) {
+ smokeOutput.results.push({
+ status: test.status,
+ start: test.startTime,
+ end: Date.now(),
+ test_file: test.name,
+ exit_code: 0,
+ url: ""
+ });
+ delete runningTests[test.name];
+ callback();
+ },
+ beforeExit: function(obj, callback) {
+ fs.writeFile(outputFile, JSON.stringify(smokeOutput), function() {
+ callback();
+ });
+ }
+ };
+
+ // In case of exception, make sure we write file
+ process.on('uncaughtException', function(err) {
+ // Mark all currently running tests as failed
+ for (var testName in runningTests) {
+ smokeOutput.results.push({
+ status: "fail",
+ start: runningTests[testName].startTime,
+ end: Date.now(),
+ test_file: testName,
+ exit_code: 0,
+ url: ""
+ });
+ }
+
+ // write file
+ fs.writeFileSync(outputFile, JSON.stringify(smokeOutput));
+
+ // Standard NodeJS uncaught exception handler
+ console.error(err.stack);
+ process.exit(1);
+ });
+
+ runner.plugin(integraPlugin);
+ return integraPlugin;
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/mongos.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/mongos.js
new file mode 100644
index 0000000..7ba6220
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/mongos.js
@@ -0,0 +1,1112 @@
+"use strict"
+
+var inherits = require('util').inherits,
+ f = require('util').format,
+ EventEmitter = require('events').EventEmitter,
+ BSON = require('bson').native().BSON,
+ ReadPreference = require('./read_preference'),
+ BasicCursor = require('../cursor'),
+ Logger = require('../connection/logger'),
+ debugOptions = require('../connection/utils').debugOptions,
+ MongoError = require('../error'),
+ Server = require('./server'),
+ ReplSetState = require('./replset_state'),
+ assign = require('./shared').assign,
+ clone = require('./shared').clone,
+ createClientInfo = require('./shared').createClientInfo;
+
+/**
+ * @fileOverview The **Mongos** class is a class that represents a Mongos Proxy topology and is
+ * used to construct connections.
+ *
+ * @example
+ * var Mongos = require('mongodb-core').Mongos
+ * , ReadPreference = require('mongodb-core').ReadPreference
+ * , assert = require('assert');
+ *
+ * var server = new Mongos([{host: 'localhost', port: 30000}]);
+ * // Wait for the connection event
+ * server.on('connect', function(server) {
+ * server.destroy();
+ * });
+ *
+ * // Start connecting
+ * server.connect();
+ */
+
+var MongoCR = require('../auth/mongocr')
+ , X509 = require('../auth/x509')
+ , Plain = require('../auth/plain')
+ , GSSAPI = require('../auth/gssapi')
+ , SSPI = require('../auth/sspi')
+ , ScramSHA1 = require('../auth/scram');
+
+//
+// States
+var DISCONNECTED = 'disconnected';
+var CONNECTING = 'connecting';
+var CONNECTED = 'connected';
+var DESTROYED = 'destroyed';
+
+function stateTransition(self, newState) {
+ var legalTransitions = {
+ 'disconnected': [CONNECTING, DESTROYED, DISCONNECTED],
+ 'connecting': [CONNECTING, DESTROYED, CONNECTED, DISCONNECTED],
+ 'connected': [CONNECTED, DISCONNECTED, DESTROYED],
+ 'destroyed': [DESTROYED]
+ }
+
+ // Get current state
+ var legalStates = legalTransitions[self.state];
+ if(legalStates && legalStates.indexOf(newState) != -1) {
+ self.state = newState;
+ } else {
+ self.logger.error(f('Pool with id [%s] failed attempted illegal state transition from [%s] to [%s] only following state allowed [%s]'
+ , self.id, self.state, newState, legalStates));
+ }
+}
+
+//
+// ReplSet instance id
+var id = 1;
+var handlers = ['connect', 'close', 'error', 'timeout', 'parseError'];
+
+/**
+ * Creates a new Mongos instance
+ * @class
+ * @param {array} seedlist A list of seeds for the replicaset
+ * @param {number} [options.haInterval=5000] The High availability period for replicaset inquiry
+ * @param {Cursor} [options.cursorFactory=Cursor] The cursor factory class used for all query cursors
+ * @param {number} [options.size=5] Server connection pool size
+ * @param {boolean} [options.keepAlive=true] TCP Connection keep alive enabled
+ * @param {number} [options.keepAliveInitialDelay=0] Initial delay before TCP keep alive enabled
+ * @param {number} [options.localThresholdMS=15] Cutoff latency point in MS for MongoS proxy selection
+ * @param {boolean} [options.noDelay=true] TCP Connection no delay
+ * @param {number} [options.connectionTimeout=1000] TCP Connection timeout setting
+ * @param {number} [options.socketTimeout=0] TCP Socket timeout setting
+ * @param {boolean} [options.singleBufferSerializtion=true] Serialize into single buffer, trade of peak memory for serialization speed
+ * @param {boolean} [options.ssl=false] Use SSL for connection
+ * @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
+ * @param {Buffer} [options.ca] SSL Certificate store binary buffer
+ * @param {Buffer} [options.cert] SSL Certificate binary buffer
+ * @param {Buffer} [options.key] SSL Key file binary buffer
+ * @param {string} [options.passphrase] SSL Certificate pass phrase
+ * @param {string} [options.servername=null] String containing the server name requested via TLS SNI.
+ * @param {boolean} [options.rejectUnauthorized=true] Reject unauthorized server certificates
+ * @param {boolean} [options.promoteLongs=true] Convert Long values from the db into Numbers if they fit into 53 bits
+ * @param {boolean} [options.promoteValues=true] Promotes BSON values to native types where possible, set to false to only receive wrapper types.
+ * @param {boolean} [options.promoteBuffers=false] Promotes Binary BSON values to native Node Buffers.
+ * @param {boolean} [options.domainsEnabled=false] Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit.
+ * @return {Mongos} A cursor instance
+ * @fires Mongos#connect
+ * @fires Mongos#reconnect
+ * @fires Mongos#joined
+ * @fires Mongos#left
+ * @fires Mongos#failed
+ * @fires Mongos#fullsetup
+ * @fires Mongos#all
+ * @fires Mongos#serverHeartbeatStarted
+ * @fires Mongos#serverHeartbeatSucceeded
+ * @fires Mongos#serverHeartbeatFailed
+ * @fires Mongos#topologyOpening
+ * @fires Mongos#topologyClosed
+ * @fires Mongos#topologyDescriptionChanged
+ */
+var Mongos = function(seedlist, options) {
+ var self = this;
+ options = options || {};
+
+ // Get replSet Id
+ this.id = id++;
+
+ // Internal state
+ this.s = {
+ options: assign({}, options),
+ // BSON instance
+ bson: options.bson || new BSON(),
+ // Factory overrides
+ Cursor: options.cursorFactory || BasicCursor,
+ // Logger instance
+ logger: Logger('Mongos', options),
+ // Seedlist
+ seedlist: seedlist,
+ // Ha interval
+ haInterval: options.haInterval ? options.haInterval : 10000,
+ // Disconnect handler
+ disconnectHandler: options.disconnectHandler,
+ // Server selection index
+ index: 0,
+ // Connect function options passed in
+ connectOptions: {},
+ // Are we running in debug mode
+ debug: typeof options.debug == 'boolean' ? options.debug : false,
+ // localThresholdMS
+ localThresholdMS: options.localThresholdMS || 15,
+ // Client info
+ clientInfo: createClientInfo(options)
+ }
+
+ // Set the client info
+ this.s.options.clientInfo = createClientInfo(options);
+
+ // Log info warning if the socketTimeout < haInterval as it will cause
+ // a lot of recycled connections to happen.
+ if(this.s.logger.isWarn()
+ && this.s.options.socketTimeout != 0
+ && this.s.options.socketTimeout < this.s.haInterval) {
+ this.s.logger.warn(f('warning socketTimeout %s is less than haInterval %s. This might cause unnecessary server reconnections due to socket timeouts'
+ , this.s.options.socketTimeout, this.s.haInterval));
+ }
+
+ // All the authProviders
+ this.authProviders = options.authProviders || {
+ 'mongocr': new MongoCR(this.s.bson), 'x509': new X509(this.s.bson)
+ , 'plain': new Plain(this.s.bson), 'gssapi': new GSSAPI(this.s.bson)
+ , 'sspi': new SSPI(this.s.bson), 'scram-sha-1': new ScramSHA1(this.s.bson)
+ }
+
+ // Disconnected state
+ this.state = DISCONNECTED;
+
+ // Current proxies we are connecting to
+ this.connectingProxies = [];
+ // Currently connected proxies
+ this.connectedProxies = [];
+ // Disconnected proxies
+ this.disconnectedProxies = [];
+ // Are we authenticating
+ this.authenticating = false;
+ // Index of proxy to run operations against
+ this.index = 0;
+ // High availability timeout id
+ this.haTimeoutId = null;
+ // Last ismaster
+ this.ismaster = null;
+
+ // Add event listener
+ EventEmitter.call(this);
+}
+
+inherits(Mongos, EventEmitter);
+
+Object.defineProperty(Mongos.prototype, 'type', {
+ enumerable:true, get: function() { return 'mongos'; }
+});
+
+/**
+ * Emit event if it exists
+ * @method
+ */
+function emitSDAMEvent(self, event, description) {
+ if(self.listeners(event).length > 0) {
+ self.emit(event, description);
+ }
+}
+
+/**
+ * Initiate server connect
+ * @method
+ * @param {array} [options.auth=null] Array of auth options to apply on connect
+ */
+Mongos.prototype.connect = function(options) {
+ var self = this;
+ // Add any connect level options to the internal state
+ this.s.connectOptions = options || {};
+ // Set connecting state
+ stateTransition(this, CONNECTING);
+ // Create server instances
+ var servers = this.s.seedlist.map(function(x) {
+ return new Server(assign({}, self.s.options, x, {
+ authProviders: self.authProviders, reconnect:false, monitoring:false, inTopology: true
+ }, {
+ clientInfo: clone(self.s.clientInfo)
+ }));
+ });
+
+ // Emit the topology opening event
+ emitSDAMEvent(this, 'topologyOpening', { topologyId: this.id });
+
+ // Start all server connections
+ connectProxies(self, servers);
+}
+
+function handleEvent(self, event) {
+ return function(err) {
+ if(self.state == DESTROYED) return;
+ // Move to list of disconnectedProxies
+ moveServerFrom(self.connectedProxies, self.disconnectedProxies, this);
+ // Emit the left signal
+ self.emit('left', 'mongos', this);
+ }
+}
+
+function handleInitialConnectEvent(self, event) {
+ return function(err) {
+ // Destroy the instance
+ if(self.state == DESTROYED) {
+ // Move from connectingProxies
+ moveServerFrom(self.connectingProxies, self.disconnectedProxies, this);
+ return this.destroy();
+ }
+
+ // Check the type of server
+ if(event == 'connect') {
+ // Get last known ismaster
+ self.ismaster = this.lastIsMaster();
+
+ // Is this not a proxy, remove t
+ if(self.ismaster.msg == 'isdbgrid') {
+ // Add to the connectd list
+ for(var i = 0; i < self.connectedProxies.length; i++) {
+ if(self.connectedProxies[i].name == this.name) {
+ // Move from connectingProxies
+ moveServerFrom(self.connectingProxies, self.disconnectedProxies, this);
+ this.destroy();
+ return self.emit('failed', this);
+ }
+ }
+
+ // Remove the handlers
+ for(var i = 0; i < handlers.length; i++) {
+ this.removeAllListeners(handlers[i]);
+ }
+
+ // Add stable state handlers
+ this.on('error', handleEvent(self, 'error'));
+ this.on('close', handleEvent(self, 'close'));
+ this.on('timeout', handleEvent(self, 'timeout'));
+ this.on('parseError', handleEvent(self, 'parseError'));
+
+ // Move from connecting proxies connected
+ moveServerFrom(self.connectingProxies, self.connectedProxies, this);
+ // Emit the joined event
+ self.emit('joined', 'mongos', this);
+ } else {
+
+ // Print warning if we did not find a mongos proxy
+ if(self.s.logger.isWarn()) {
+ var message = 'expected mongos proxy, but found replicaset member mongod for server %s';
+ // We have a standalone server
+ if(!self.ismaster.hosts) {
+ message = 'expected mongos proxy, but found standalone mongod for server %s';
+ }
+
+ self.s.logger.warn(f(message, this.name));
+ }
+
+ // This is not a mongos proxy, remove it completely
+ removeProxyFrom(self.connectingProxies, this);
+ // Emit the left event
+ self.emit('left', 'server', this);
+ // Emit failed event
+ self.emit('failed', this);
+ }
+ } else {
+ moveServerFrom(self.connectingProxies, self.disconnectedProxies, this);
+ // Emit the left event
+ self.emit('left', 'mongos', this);
+ // Emit failed event
+ self.emit('failed', this);
+ }
+
+ // Trigger topologyMonitor
+ if(self.connectingProxies.length == 0) {
+ // Emit connected if we are connected
+ if(self.connectedProxies.length > 0) {
+ // Set the state to connected
+ stateTransition(self, CONNECTED);
+ // Emit the connect event
+ self.emit('connect', self);
+ self.emit('fullsetup', self);
+ self.emit('all', self);
+ } else if(self.disconnectedProxies.length == 0) {
+ // Print warning if we did not find a mongos proxy
+ if(self.s.logger.isWarn()) {
+ self.s.logger.warn(f('no mongos proxies found in seed list, did you mean to connect to a replicaset'));
+ }
+
+ // Emit the error that no proxies were found
+ return self.emit('error', new MongoError('no mongos proxies found in seed list'));
+ }
+
+ // Topology monitor
+ topologyMonitor(self, {firstConnect:true});
+ }
+ };
+}
+
+function connectProxies(self, servers) {
+ // Update connectingProxies
+ self.connectingProxies = self.connectingProxies.concat(servers);
+
+ // Index used to interleaf the server connects, avoiding
+ // runtime issues on io constrained vm's
+ var timeoutInterval = 0;
+
+ function connect(server, timeoutInterval) {
+ setTimeout(function() {
+ // Add event handlers
+ server.once('close', handleInitialConnectEvent(self, 'close'));
+ server.once('timeout', handleInitialConnectEvent(self, 'timeout'));
+ server.once('parseError', handleInitialConnectEvent(self, 'parseError'));
+ server.once('error', handleInitialConnectEvent(self, 'error'));
+ server.once('connect', handleInitialConnectEvent(self, 'connect'));
+ // SDAM Monitoring events
+ server.on('serverOpening', function(e) { self.emit('serverOpening', e); });
+ server.on('serverDescriptionChanged', function(e) { self.emit('serverDescriptionChanged', e); });
+ server.on('serverClosed', function(e) { self.emit('serverClosed', e); });
+ // Start connection
+ server.connect(self.s.connectOptions);
+ }, timeoutInterval);
+ }
+ // Start all the servers
+ while(servers.length > 0) {
+ connect(servers.shift(), timeoutInterval++);
+ }
+}
+
+function pickProxy(self) {
+ // Get the currently connected Proxies
+ var connectedProxies = self.connectedProxies.slice(0);
+
+ // Set lower bound
+ var lowerBoundLatency = Number.MAX_VALUE;
+
+ // Determine the lower bound for the Proxies
+ for(var i = 0; i < connectedProxies.length; i++) {
+ if(connectedProxies[i].lastIsMasterMS < lowerBoundLatency) {
+ lowerBoundLatency = connectedProxies[i].lastIsMasterMS;
+ }
+ }
+
+ // Filter out the possible servers
+ connectedProxies = connectedProxies.filter(function(server) {
+ if((server.lastIsMasterMS <= (lowerBoundLatency + self.s.localThresholdMS))
+ && server.isConnected()) {
+ return true;
+ }
+ });
+
+ // We have no connectedProxies pick first of the connected ones
+ if(connectedProxies.length == 0) {
+ return self.connectedProxies[0];
+ }
+
+ // Get proxy
+ var proxy = connectedProxies[self.index % connectedProxies.length];
+ // Update the index
+ self.index = (self.index + 1) % connectedProxies.length;
+ // Return the proxy
+ return proxy;
+}
+
+function moveServerFrom(from, to, proxy) {
+ for(var i = 0; i < from.length; i++) {
+ if(from[i].name == proxy.name) {
+ from.splice(i, 1);
+ }
+ }
+
+ for(var i = 0; i < to.length; i++) {
+ if(to[i].name == proxy.name) {
+ to.splice(i, 1);
+ }
+ }
+
+ to.push(proxy);
+}
+
+function removeProxyFrom(from, proxy) {
+ for(var i = 0; i < from.length; i++) {
+ if(from[i].name == proxy.name) {
+ from.splice(i, 1);
+ }
+ }
+}
+
+function reconnectProxies(self, proxies, callback) {
+ // Count lefts
+ var count = proxies.length;
+
+ // Handle events
+ var _handleEvent = function(self, event) {
+ return function(err, r) {
+ var _self = this;
+ count = count - 1;
+
+ // Destroyed
+ if(self.state == DESTROYED) {
+ moveServerFrom(self.connectingProxies, self.disconnectedProxies, _self);
+ return this.destroy();
+ }
+
+ if(event == 'connect' && !self.authenticating) {
+ // Destroyed
+ if(self.state == DESTROYED) {
+ moveServerFrom(self.connectingProxies, self.disconnectedProxies, _self);
+ return _self.destroy();
+ }
+
+ // Remove the handlers
+ for(var i = 0; i < handlers.length; i++) {
+ _self.removeAllListeners(handlers[i]);
+ }
+
+ // Add stable state handlers
+ _self.on('error', handleEvent(self, 'error'));
+ _self.on('close', handleEvent(self, 'close'));
+ _self.on('timeout', handleEvent(self, 'timeout'));
+ _self.on('parseError', handleEvent(self, 'parseError'));
+
+ // Move to the connected servers
+ moveServerFrom(self.disconnectedProxies, self.connectedProxies, _self);
+ // Emit joined event
+ self.emit('joined', 'mongos', _self);
+ } else if(event == 'connect' && self.authenticating) {
+ // Move from connectingProxies
+ moveServerFrom(self.connectingProxies, self.disconnectedProxies, _self);
+ this.destroy();
+ }
+
+ // Are we done finish up callback
+ if(count == 0) {
+ callback();
+ }
+ }
+ }
+
+ // No new servers
+ if(count == 0) {
+ return callback();
+ }
+
+ // Execute method
+ function execute(_server, i) {
+ setTimeout(function() {
+ // Destroyed
+ if(self.state == DESTROYED) {
+ return;
+ }
+
+ // Create a new server instance
+ var server = new Server(assign({}, self.s.options, {
+ host: _server.name.split(':')[0],
+ port: parseInt(_server.name.split(':')[1], 10)
+ }, {
+ authProviders: self.authProviders, reconnect:false, monitoring: false, inTopology: true
+ }, {
+ clientInfo: clone(self.s.clientInfo)
+ }));
+
+ // Add temp handlers
+ server.once('connect', _handleEvent(self, 'connect'));
+ server.once('close', _handleEvent(self, 'close'));
+ server.once('timeout', _handleEvent(self, 'timeout'));
+ server.once('error', _handleEvent(self, 'error'));
+ server.once('parseError', _handleEvent(self, 'parseError'));
+
+ // SDAM Monitoring events
+ server.on('serverOpening', function(e) { self.emit('serverOpening', e); });
+ server.on('serverDescriptionChanged', function(e) { self.emit('serverDescriptionChanged', e); });
+ server.on('serverClosed', function(e) { self.emit('serverClosed', e); });
+ server.connect(self.s.connectOptions);
+ }, i);
+ }
+
+ // Create new instances
+ for(var i = 0; i < proxies.length; i++) {
+ execute(proxies[i], i);
+ }
+}
+
+function topologyMonitor(self, options) {
+ options = options || {};
+
+ // Set momitoring timeout
+ self.haTimeoutId = setTimeout(function() {
+ if(self.state == DESTROYED) return;
+ // If we have a primary and a disconnect handler, execute
+ // buffered operations
+ if(self.isConnected() && self.s.disconnectHandler) {
+ self.s.disconnectHandler.execute();
+ }
+
+ // Get the connectingServers
+ var proxies = self.connectedProxies.slice(0);
+ // Get the count
+ var count = proxies.length;
+
+ // If the count is zero schedule a new fast
+ function pingServer(_self, _server, cb) {
+ // Measure running time
+ var start = new Date().getTime();
+
+ // Emit the server heartbeat start
+ emitSDAMEvent(self, 'serverHeartbeatStarted', { connectionId: _server.name });
+
+ // Execute ismaster
+ _server.command('admin.$cmd', {ismaster:true}, {monitoring: true}, function(err, r) {
+ if(self.state == DESTROYED) {
+ // Move from connectingProxies
+ moveServerFrom(self.connectedProxies, self.disconnectedProxies, _server);
+ _server.destroy();
+ return cb(err, r);
+ }
+
+ // Calculate latency
+ var latencyMS = new Date().getTime() - start;
+
+ // We had an error, remove it from the state
+ if(err) {
+ // Emit the server heartbeat failure
+ emitSDAMEvent(self, 'serverHeartbeatFailed', { durationMS: latencyMS, failure: err, connectionId: _server.name });
+ } else {
+ // Update the server ismaster
+ _server.ismaster = r.result;
+ _server.lastIsMasterMS = latencyMS;
+
+ // Server heart beat event
+ emitSDAMEvent(self, 'serverHeartbeatSucceeded', { durationMS: latencyMS, reply: r.result, connectionId: _server.name });
+ }
+
+ cb(err, r);
+ });
+ }
+
+ // No proxies initiate monitor again
+ if(proxies.length == 0) {
+ // Emit close event if any listeners registered
+ if(self.listeners("close").length > 0) {
+ self.emit('close', self);
+ }
+
+ // Attempt to connect to any unknown servers
+ return reconnectProxies(self, self.disconnectedProxies, function(err, cb) {
+ if(self.state == DESTROYED) return;
+
+ // Are we connected ? emit connect event
+ if(self.state == CONNECTING && options.firstConnect) {
+ self.emit('connect', self);
+ self.emit('fullsetup', self);
+ self.emit('all', self);
+ } else if(self.isConnected()) {
+ self.emit('reconnect', self);
+ } else if(!self.isConnected() && self.listeners("close").length > 0) {
+ self.emit('close', self);
+ }
+
+ // Perform topology monitor
+ topologyMonitor(self);
+ });
+ }
+
+ // Ping all servers
+ for(var i = 0; i < proxies.length; i++) {
+ pingServer(self, proxies[i], function(err, r) {
+ count = count - 1;
+
+ if(count == 0) {
+ if(self.state == DESTROYED) return;
+
+ // Attempt to connect to any unknown servers
+ reconnectProxies(self, self.disconnectedProxies, function(err, cb) {
+ if(self.state == DESTROYED) return;
+ // Perform topology monitor
+ topologyMonitor(self);
+ });
+ }
+ });
+ }
+ }, self.s.haInterval);
+}
+
+/**
+ * Returns the last known ismaster document for this server
+ * @method
+ * @return {object}
+ */
+Mongos.prototype.lastIsMaster = function() {
+ return this.ismaster;
+}
+
+/**
+ * Unref all connections belong to this server
+ * @method
+ */
+Mongos.prototype.unref = function(emitClose) {
+ // Transition state
+ stateTransition(this, DISCONNECTED);
+ // Get all proxies
+ var proxies = self.connectedProxies.concat(self.connectingProxies);
+ proxies.forEach(function(x) {
+ x.unref();
+ });
+
+ clearTimeout(this.haTimeoutId);
+}
+
+/**
+ * Destroy the server connection
+ * @method
+ */
+Mongos.prototype.destroy = function(emitClose) {
+ // Transition state
+ stateTransition(this, DESTROYED);
+ // Get all proxies
+ var proxies = this.connectedProxies.concat(this.connectingProxies);
+ // Clear out any monitoring process
+ if(this.haTimeoutId) clearTimeout(this.haTimeoutId);
+
+ // Destroy all connecting servers
+ proxies.forEach(function(x) {
+ x.destroy();
+ });
+
+ // Emit toplogy closing event
+ emitSDAMEvent(this, 'topologyClosed', { topologyId: this.id });
+}
+
+/**
+ * Figure out if the server is connected
+ * @method
+ * @return {boolean}
+ */
+Mongos.prototype.isConnected = function(options) {
+ return this.connectedProxies.length > 0;
+}
+
+/**
+ * Figure out if the server instance was destroyed by calling destroy
+ * @method
+ * @return {boolean}
+ */
+Mongos.prototype.isDestroyed = function() {
+ return this.state == DESTROYED;
+}
+
+//
+// Operations
+//
+
+// Execute write operation
+var executeWriteOperation = function(self, op, ns, ops, options, callback) {
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ // Ensure we have no options
+ options = options || {};
+ // Pick a server
+ var server = pickProxy(self);
+ // No server found error out
+ if(!server) return callback(new MongoError('no mongos proxy available'));
+ // Execute the command
+ server[op](ns, ops, options, callback);
+}
+
+/**
+ * Insert one or more documents
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {array} ops An array of documents to insert
+ * @param {boolean} [options.ordered=true] Execute in order or out of order
+ * @param {object} [options.writeConcern={}] Write concern for the operation
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+Mongos.prototype.insert = function(ns, ops, options, callback) {
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ if(this.state == DESTROYED) return callback(new MongoError(f('topology was destroyed')));
+
+ // Not connected but we have a disconnecthandler
+ if(!this.isConnected() && this.s.disconnectHandler != null) {
+ return this.s.disconnectHandler.add('insert', ns, ops, options, callback);
+ }
+
+ // No mongos proxy available
+ if(!this.isConnected()) {
+ return callback(new MongoError('no mongos proxy available'));
+ }
+
+ // Execute write operation
+ executeWriteOperation(this, 'insert', ns, ops, options, callback);
+}
+
+/**
+ * Perform one or more update operations
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {array} ops An array of updates
+ * @param {boolean} [options.ordered=true] Execute in order or out of order
+ * @param {object} [options.writeConcern={}] Write concern for the operation
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+Mongos.prototype.update = function(ns, ops, options, callback) {
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ if(this.state == DESTROYED) return callback(new MongoError(f('topology was destroyed')));
+
+ // Not connected but we have a disconnecthandler
+ if(!this.isConnected() && this.s.disconnectHandler != null) {
+ return this.s.disconnectHandler.add('update', ns, ops, options, callback);
+ }
+
+ // No mongos proxy available
+ if(!this.isConnected()) {
+ return callback(new MongoError('no mongos proxy available'));
+ }
+
+ // Execute write operation
+ executeWriteOperation(this, 'update', ns, ops, options, callback);
+}
+
+/**
+ * Perform one or more remove operations
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {array} ops An array of removes
+ * @param {boolean} [options.ordered=true] Execute in order or out of order
+ * @param {object} [options.writeConcern={}] Write concern for the operation
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+Mongos.prototype.remove = function(ns, ops, options, callback) {
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ if(this.state == DESTROYED) return callback(new MongoError(f('topology was destroyed')));
+
+ // Not connected but we have a disconnecthandler
+ if(!this.isConnected() && this.s.disconnectHandler != null) {
+ return this.s.disconnectHandler.add('remove', ns, ops, options, callback);
+ }
+
+ // No mongos proxy available
+ if(!this.isConnected()) {
+ return callback(new MongoError('no mongos proxy available'));
+ }
+
+ // Execute write operation
+ executeWriteOperation(this, 'remove', ns, ops, options, callback);
+}
+
+/**
+ * Execute a command
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {object} cmd The command hash
+ * @param {ReadPreference} [options.readPreference] Specify read preference if command supports it
+ * @param {Connection} [options.connection] Specify connection object to execute command against
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+Mongos.prototype.command = function(ns, cmd, options, callback) {
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ if(this.state == DESTROYED) return callback(new MongoError(f('topology was destroyed')));
+ var self = this;
+
+ // Establish readPreference
+ var readPreference = options.readPreference ? options.readPreference : ReadPreference.primary;
+
+ // Pick a proxy
+ var server = pickProxy(self);
+
+ // Topology is not connected, save the call in the provided store to be
+ // Executed at some point when the handler deems it's reconnected
+ if((server == null || !server.isConnected()) && this.s.disconnectHandler != null) {
+ return this.s.disconnectHandler.add('command', ns, cmd, options, callback);
+ }
+
+ // No server returned we had an error
+ if(server == null) {
+ return callback(new MongoError('no mongos proxy available'));
+ }
+
+ // Execute the command
+ server.command(ns, cmd, options, callback);
+}
+
+/**
+ * Perform one or more remove operations
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {{object}|{Long}} cmd Can be either a command returning a cursor or a cursorId
+ * @param {object} [options.batchSize=0] Batchsize for the operation
+ * @param {array} [options.documents=[]] Initial documents list for cursor
+ * @param {ReadPreference} [options.readPreference] Specify read preference if command supports it
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+Mongos.prototype.cursor = function(ns, cmd, cursorOptions) {
+ cursorOptions = cursorOptions || {};
+ var FinalCursor = cursorOptions.cursorFactory || this.s.Cursor;
+ return new FinalCursor(this.s.bson, ns, cmd, cursorOptions, this, this.s.options);
+}
+
+/**
+ * Authenticate using a specified mechanism
+ * @method
+ * @param {string} mechanism The Auth mechanism we are invoking
+ * @param {string} db The db we are invoking the mechanism against
+ * @param {...object} param Parameters for the specific mechanism
+ * @param {authResultCallback} callback A callback function
+ */
+Mongos.prototype.auth = function(mechanism, db) {
+ var allArgs = Array.prototype.slice.call(arguments, 0).slice(0);
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 2);
+ var callback = args.pop();
+
+ // If we don't have the mechanism fail
+ if(this.authProviders[mechanism] == null && mechanism != 'default') {
+ return callback(new MongoError(f("auth provider %s does not exist", mechanism)));
+ }
+
+ // Are we already authenticating, throw
+ if(this.authenticating) {
+ return callback(new MongoError('authentication or logout allready in process'));
+ }
+
+ // Topology is not connected, save the call in the provided store to be
+ // Executed at some point when the handler deems it's reconnected
+ if(!self.isConnected() && self.s.disconnectHandler != null) {
+ return self.s.disconnectHandler.add('auth', db, allArgs, {}, callback);
+ }
+
+ // Set to authenticating
+ this.authenticating = true;
+ // All errors
+ var errors = [];
+
+ // Get all the servers
+ var servers = this.connectedProxies.slice(0);
+ // No servers return
+ if(servers.length == 0) {
+ this.authenticating = false;
+ callback(null, true);
+ }
+
+ // Authenticate
+ function auth(server) {
+ // Arguments without a callback
+ var argsWithoutCallback = [mechanism, db].concat(args.slice(0));
+ // Create arguments
+ var finalArguments = argsWithoutCallback.concat([function(err, r) {
+ count = count - 1;
+ // Save all the errors
+ if(err) errors.push({name: server.name, err: err});
+ // We are done
+ if(count == 0) {
+ // Auth is done
+ self.authenticating = false;
+
+ // Return the auth error
+ if(errors.length) return callback(MongoError.create({
+ message: 'authentication fail', errors: errors
+ }), false);
+
+ // Successfully authenticated session
+ callback(null, self);
+ }
+ }]);
+
+ // Execute the auth only against non arbiter servers
+ if(!server.lastIsMaster().arbiterOnly) {
+ server.auth.apply(server, finalArguments);
+ }
+ }
+
+ // Get total count
+ var count = servers.length;
+ // Authenticate against all servers
+ while(servers.length > 0) {
+ auth(servers.shift());
+ }
+}
+
+/**
+ * Logout from a database
+ * @method
+ * @param {string} db The db we are logging out from
+ * @param {authResultCallback} callback A callback function
+ */
+Mongos.prototype.logout = function(dbName, callback) {
+ var self = this;
+ // Are we authenticating or logging out, throw
+ if(this.authenticating) {
+ throw new MongoError('authentication or logout allready in process');
+ }
+
+ // Ensure no new members are processed while logging out
+ this.authenticating = true;
+
+ // Remove from all auth providers (avoid any reaplication of the auth details)
+ var providers = Object.keys(this.authProviders);
+ for(var i = 0; i < providers.length; i++) {
+ this.authProviders[providers[i]].logout(dbName);
+ }
+
+ // Now logout all the servers
+ var servers = this.connectedProxies.slice(0);
+ var count = servers.length;
+ if(count == 0) return callback();
+ var errors = [];
+
+ // Execute logout on all server instances
+ for(var i = 0; i < servers.length; i++) {
+ servers[i].logout(dbName, function(err) {
+ count = count - 1;
+ if(err) errors.push({name: server.name, err: err});
+
+ if(count == 0) {
+ // Do not block new operations
+ self.authenticating = false;
+ // If we have one or more errors
+ if(errors.length) return callback(MongoError.create({
+ message: f('logout failed against db %s', dbName), errors: errors
+ }), false);
+
+ // No errors
+ callback();
+ }
+ });
+ }
+}
+
+/**
+ * Get server
+ * @method
+ * @param {ReadPreference} [options.readPreference] Specify read preference if command supports it
+ * @return {Server}
+ */
+Mongos.prototype.getServer = function() {
+ var server = pickProxy(this);
+ if(this.s.debug) this.emit('pickedServer', null, server);
+ return server;
+}
+
+/**
+ * All raw connections
+ * @method
+ * @return {Connection[]}
+ */
+Mongos.prototype.connections = function() {
+ var connections = [];
+
+ for(var i = 0; i < this.connectedProxies.length; i++) {
+ connections = connections.concat(this.connectedProxies[i].connections());
+ }
+
+ return connections;
+}
+
+/**
+ * A mongos connect event, used to verify that the connection is up and running
+ *
+ * @event Mongos#connect
+ * @type {Mongos}
+ */
+
+/**
+ * A mongos reconnect event, used to verify that the mongos topology has reconnected
+ *
+ * @event Mongos#reconnect
+ * @type {Mongos}
+ */
+
+/**
+ * A mongos fullsetup event, used to signal that all topology members have been contacted.
+ *
+ * @event Mongos#fullsetup
+ * @type {Mongos}
+ */
+
+/**
+ * A mongos all event, used to signal that all topology members have been contacted.
+ *
+ * @event Mongos#all
+ * @type {Mongos}
+ */
+
+/**
+ * A server member left the mongos list
+ *
+ * @event Mongos#left
+ * @type {Mongos}
+ * @param {string} type The type of member that left (mongos)
+ * @param {Server} server The server object that left
+ */
+
+/**
+ * A server member joined the mongos list
+ *
+ * @event Mongos#joined
+ * @type {Mongos}
+ * @param {string} type The type of member that left (mongos)
+ * @param {Server} server The server object that joined
+ */
+
+/**
+ * A server opening SDAM monitoring event
+ *
+ * @event Mongos#serverOpening
+ * @type {object}
+ */
+
+/**
+ * A server closed SDAM monitoring event
+ *
+ * @event Mongos#serverClosed
+ * @type {object}
+ */
+
+/**
+ * A server description SDAM change monitoring event
+ *
+ * @event Mongos#serverDescriptionChanged
+ * @type {object}
+ */
+
+/**
+ * A topology open SDAM event
+ *
+ * @event Mongos#topologyOpening
+ * @type {object}
+ */
+
+/**
+ * A topology closed SDAM event
+ *
+ * @event Mongos#topologyClosed
+ * @type {object}
+ */
+
+/**
+ * A topology structure SDAM change event
+ *
+ * @event Mongos#topologyDescriptionChanged
+ * @type {object}
+ */
+
+/**
+ * A topology serverHeartbeatStarted SDAM event
+ *
+ * @event Mongos#serverHeartbeatStarted
+ * @type {object}
+ */
+
+/**
+ * A topology serverHeartbeatFailed SDAM event
+ *
+ * @event Mongos#serverHeartbeatFailed
+ * @type {object}
+ */
+
+/**
+ * A topology serverHeartbeatSucceeded SDAM change event
+ *
+ * @event Mongos#serverHeartbeatSucceeded
+ * @type {object}
+ */
+
+module.exports = Mongos;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/read_preference.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/read_preference.js
new file mode 100644
index 0000000..a801fbe
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/read_preference.js
@@ -0,0 +1,119 @@
+"use strict";
+
+var needSlaveOk = ['primaryPreferred', 'secondary', 'secondaryPreferred', 'nearest'];
+
+/**
+ * @fileOverview The **ReadPreference** class is a class that represents a MongoDB ReadPreference and is
+ * used to construct connections.
+ *
+ * @example
+ * var ReplSet = require('mongodb-core').ReplSet
+ * , ReadPreference = require('mongodb-core').ReadPreference
+ * , assert = require('assert');
+ *
+ * var server = new ReplSet([{host: 'localhost', port: 30000}], {setName: 'rs'});
+ * // Wait for the connection event
+ * server.on('connect', function(server) {
+ * var cursor = server.cursor('db.test'
+ * , {find: 'db.test', query: {}}
+ * , {readPreference: new ReadPreference('secondary')});
+ * cursor.next(function(err, doc) {
+ * server.destroy();
+ * });
+ * });
+ *
+ * // Start connecting
+ * server.connect();
+ */
+
+/**
+ * Creates a new Pool instance
+ * @class
+ * @param {string} preference A string describing the preference (primary|primaryPreferred|secondary|secondaryPreferred|nearest)
+ * @param {array} tags The tags object
+ * @param {object} [options] Additional read preference options
+ * @param {number} [options.maxStalenessMS] Max Secondary Read Stalleness in Miliseconds
+ * @property {string} preference The preference string (primary|primaryPreferred|secondary|secondaryPreferred|nearest)
+ * @property {array} tags The tags object
+ * @property {object} options Additional read preference options
+ * @property {number} maxStalenessMS MaxStalenessMS value for the read preference
+ * @return {ReadPreference}
+ */
+var ReadPreference = function(preference, tags, options) {
+ this.preference = preference;
+ this.tags = tags;
+ this.options = options;
+
+ // If no tags were passed in
+ if(tags && typeof tags == 'object') {
+ this.options = tags, tags = null;
+ }
+
+ // Add the maxStalenessMS value to the read Preference
+ if(this.options && this.options.maxStalenessMS) {
+ this.maxStalenessMS = this.options.maxStalenessMS;
+ }
+}
+
+/**
+ * This needs slaveOk bit set
+ * @method
+ * @return {boolean}
+ */
+ReadPreference.prototype.slaveOk = function() {
+ return needSlaveOk.indexOf(this.preference) != -1;
+}
+
+/**
+ * Are the two read preference equal
+ * @method
+ * @return {boolean}
+ */
+ReadPreference.prototype.equals = function(readPreference) {
+ return readPreference.preference == this.preference;
+}
+
+/**
+ * Return JSON representation
+ * @method
+ * @return {Object}
+ */
+ReadPreference.prototype.toJSON = function() {
+ var readPreference = {mode: this.preference};
+ if(Array.isArray(this.tags)) readPreference.tags = this.tags;
+ if(this.maxStalenessMS) readPreference.maxStalenessMS = this.maxStalenessMS;
+ return readPreference;
+}
+
+/**
+ * Primary read preference
+ * @method
+ * @return {ReadPreference}
+ */
+ReadPreference.primary = new ReadPreference('primary');
+/**
+ * Primary Preferred read preference
+ * @method
+ * @return {ReadPreference}
+ */
+ReadPreference.primaryPreferred = new ReadPreference('primaryPreferred');
+/**
+ * Secondary read preference
+ * @method
+ * @return {ReadPreference}
+ */
+ReadPreference.secondary = new ReadPreference('secondary');
+/**
+ * Secondary Preferred read preference
+ * @method
+ * @return {ReadPreference}
+ */
+ReadPreference.secondaryPreferred = new ReadPreference('secondaryPreferred');
+/**
+ * Nearest read preference
+ * @method
+ * @return {ReadPreference}
+ */
+ReadPreference.nearest = new ReadPreference('nearest');
+
+module.exports = ReadPreference;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/replset.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/replset.js
new file mode 100644
index 0000000..90a6862
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/replset.js
@@ -0,0 +1,1365 @@
+"use strict"
+
+var inherits = require('util').inherits,
+ f = require('util').format,
+ EventEmitter = require('events').EventEmitter,
+ BSON = require('bson').native().BSON,
+ ReadPreference = require('./read_preference'),
+ BasicCursor = require('../cursor'),
+ Logger = require('../connection/logger'),
+ debugOptions = require('../connection/utils').debugOptions,
+ MongoError = require('../error'),
+ Server = require('./server'),
+ ReplSetState = require('./replset_state'),
+ assign = require('./shared').assign,
+ clone = require('./shared').clone,
+ createClientInfo = require('./shared').createClientInfo;
+
+var MongoCR = require('../auth/mongocr')
+ , X509 = require('../auth/x509')
+ , Plain = require('../auth/plain')
+ , GSSAPI = require('../auth/gssapi')
+ , SSPI = require('../auth/sspi')
+ , ScramSHA1 = require('../auth/scram');
+
+//
+// States
+var DISCONNECTED = 'disconnected';
+var CONNECTING = 'connecting';
+var CONNECTED = 'connected';
+var DESTROYED = 'destroyed';
+
+function stateTransition(self, newState) {
+ var legalTransitions = {
+ 'disconnected': [CONNECTING, DESTROYED, DISCONNECTED],
+ 'connecting': [CONNECTING, DESTROYED, CONNECTED, DISCONNECTED],
+ 'connected': [CONNECTED, DISCONNECTED, DESTROYED],
+ 'destroyed': [DESTROYED]
+ }
+
+ // Get current state
+ var legalStates = legalTransitions[self.state];
+ if(legalStates && legalStates.indexOf(newState) != -1) {
+ self.state = newState;
+ } else {
+ self.logger.error(f('Pool with id [%s] failed attempted illegal state transition from [%s] to [%s] only following state allowed [%s]'
+ , self.id, self.state, newState, legalStates));
+ }
+}
+
+//
+// ReplSet instance id
+var id = 1;
+var handlers = ['connect', 'close', 'error', 'timeout', 'parseError'];
+
+/**
+ * Creates a new Replset instance
+ * @class
+ * @param {array} seedlist A list of seeds for the replicaset
+ * @param {boolean} options.setName The Replicaset set name
+ * @param {boolean} [options.secondaryOnlyConnectionAllowed=false] Allow connection to a secondary only replicaset
+ * @param {number} [options.haInterval=10000] The High availability period for replicaset inquiry
+ * @param {boolean} [options.emitError=false] Server will emit errors events
+ * @param {Cursor} [options.cursorFactory=Cursor] The cursor factory class used for all query cursors
+ * @param {number} [options.size=5] Server connection pool size
+ * @param {boolean} [options.keepAlive=true] TCP Connection keep alive enabled
+ * @param {number} [options.keepAliveInitialDelay=0] Initial delay before TCP keep alive enabled
+ * @param {boolean} [options.noDelay=true] TCP Connection no delay
+ * @param {number} [options.connectionTimeout=10000] TCP Connection timeout setting
+ * @param {number} [options.socketTimeout=0] TCP Socket timeout setting
+ * @param {boolean} [options.singleBufferSerializtion=true] Serialize into single buffer, trade of peak memory for serialization speed
+ * @param {boolean} [options.ssl=false] Use SSL for connection
+ * @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
+ * @param {Buffer} [options.ca] SSL Certificate store binary buffer
+ * @param {Buffer} [options.cert] SSL Certificate binary buffer
+ * @param {Buffer} [options.key] SSL Key file binary buffer
+ * @param {string} [options.passphrase] SSL Certificate pass phrase
+ * @param {string} [options.servername=null] String containing the server name requested via TLS SNI.
+ * @param {boolean} [options.rejectUnauthorized=true] Reject unauthorized server certificates
+ * @param {boolean} [options.promoteLongs=true] Convert Long values from the db into Numbers if they fit into 53 bits
+ * @param {boolean} [options.promoteValues=true] Promotes BSON values to native types where possible, set to false to only receive wrapper types.
+ * @param {boolean} [options.promoteBuffers=false] Promotes Binary BSON values to native Node Buffers.
+ * @param {number} [options.pingInterval=5000] Ping interval to check the response time to the different servers
+ * @param {number} [options.localThresholdMS=15] Cutoff latency point in MS for MongoS proxy selection
+ * @param {boolean} [options.domainsEnabled=false] Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit.
+ * @return {ReplSet} A cursor instance
+ * @fires ReplSet#connect
+ * @fires ReplSet#ha
+ * @fires ReplSet#joined
+ * @fires ReplSet#left
+ * @fires ReplSet#failed
+ * @fires ReplSet#fullsetup
+ * @fires ReplSet#all
+ * @fires ReplSet#error
+ * @fires ReplSet#serverHeartbeatStarted
+ * @fires ReplSet#serverHeartbeatSucceeded
+ * @fires ReplSet#serverHeartbeatFailed
+ * @fires ReplSet#topologyOpening
+ * @fires ReplSet#topologyClosed
+ * @fires ReplSet#topologyDescriptionChanged
+ */
+var ReplSet = function(seedlist, options) {
+ var self = this;
+ options = options || {};
+
+ // Validate seedlist
+ if(!Array.isArray(seedlist)) throw new MongoError("seedlist must be an array");
+ // Validate list
+ if(seedlist.length == 0) throw new MongoError("seedlist must contain at least one entry");
+ // Validate entries
+ seedlist.forEach(function(e) {
+ if(typeof e.host != 'string' || typeof e.port != 'number')
+ throw new MongoError("seedlist entry must contain a host and port");
+ });
+
+ // Add event listener
+ EventEmitter.call(this);
+
+ // Get replSet Id
+ this.id = id++;
+
+ // Get the localThresholdMS
+ var localThresholdMS = options.localThresholdMS || 15;
+ // Backward compatibility
+ if(options.acceptableLatency) localThresholdMS = options.acceptableLatency;
+
+ // Create a logger
+ var logger = Logger('ReplSet', options);
+
+ // Internal state
+ this.s = {
+ options: assign({}, options),
+ // BSON instance
+ bson: options.bson || new BSON(),
+ // Factory overrides
+ Cursor: options.cursorFactory || BasicCursor,
+ // Logger instance
+ logger: logger,
+ // Seedlist
+ seedlist: seedlist,
+ // Replicaset state
+ replicaSetState: new ReplSetState({
+ id: this.id, setName: options.setName,
+ acceptableLatency: localThresholdMS,
+ heartbeatFrequencyMS: options.haInterval ? options.haInterval : 10000,
+ logger: logger
+ }),
+ // Current servers we are connecting to
+ connectingServers: [],
+ // Ha interval
+ haInterval: options.haInterval ? options.haInterval : 10000,
+ // Minimum heartbeat frequency used if we detect a server close
+ minHeartbeatFrequencyMS: 500,
+ // Disconnect handler
+ disconnectHandler: options.disconnectHandler,
+ // Server selection index
+ index: 0,
+ // Connect function options passed in
+ connectOptions: {},
+ // Are we running in debug mode
+ debug: typeof options.debug == 'boolean' ? options.debug : false,
+ // Client info
+ clientInfo: createClientInfo(options)
+ }
+
+ // Add handler for topology change
+ this.s.replicaSetState.on('topologyDescriptionChanged', function(r) { self.emit('topologyDescriptionChanged', r); });
+
+ // Log info warning if the socketTimeout < haInterval as it will cause
+ // a lot of recycled connections to happen.
+ if(this.s.logger.isWarn()
+ && this.s.options.socketTimeout != 0
+ && this.s.options.socketTimeout < this.s.haInterval) {
+ this.s.logger.warn(f('warning socketTimeout %s is less than haInterval %s. This might cause unnecessary server reconnections due to socket timeouts'
+ , this.s.options.socketTimeout, this.s.haInterval));
+ }
+
+ // All the authProviders
+ this.authProviders = options.authProviders || {
+ 'mongocr': new MongoCR(this.s.bson), 'x509': new X509(this.s.bson)
+ , 'plain': new Plain(this.s.bson), 'gssapi': new GSSAPI(this.s.bson)
+ , 'sspi': new SSPI(this.s.bson), 'scram-sha-1': new ScramSHA1(this.s.bson)
+ }
+
+ // Add forwarding of events from state handler
+ var types = ['joined', 'left'];
+ types.forEach(function(x) {
+ self.s.replicaSetState.on(x, function(t, s) {
+ self.emit(x, t, s);
+ });
+ });
+
+ // Connect stat
+ this.initialConnectState = {
+ connect: false, fullsetup: false, all: false
+ }
+
+ // Disconnected state
+ this.state = DISCONNECTED;
+ this.haTimeoutId = null;
+ // Are we authenticating
+ this.authenticating = false;
+ // Last ismaster
+ this.ismaster = null;
+}
+
+inherits(ReplSet, EventEmitter);
+
+Object.defineProperty(ReplSet.prototype, 'type', {
+ enumerable:true, get: function() { return 'replset'; }
+});
+
+function attemptReconnect(self) {
+ if(self.runningAttempReconnect) return;
+ // Set as running
+ self.runningAttempReconnect = true;
+ // Wait before execute
+ self.haTimeoutId = setTimeout(function() {
+ if(self.state == DESTROYED) return;
+
+ // Debug log
+ if(self.s.logger.isDebug()) {
+ self.s.logger.debug(f('attemptReconnect for replset with id %s', self.id));
+ }
+
+ // Get all known hosts
+ var keys = Object.keys(self.s.replicaSetState.set);
+ var servers = keys.map(function(x) {
+ return new Server(assign({}, self.s.options, {
+ host: x.split(':')[0], port: parseInt(x.split(':')[1], 10)
+ }, {
+ authProviders: self.authProviders, reconnect:false, monitoring: false, inTopology: true
+ }, {
+ clientInfo: clone(self.s.clientInfo)
+ }));
+ });
+
+ // Create the list of servers
+ self.s.connectingServers = servers.slice(0);
+
+ // Handle all events coming from servers
+ function _handleEvent(self, event) {
+ return function(err) {
+ // Destroy the instance
+ if(self.state == DESTROYED) {
+ return this.destroy();
+ }
+
+ // Debug log
+ if(self.s.logger.isDebug()) {
+ self.s.logger.debug(f('attemptReconnect for replset with id %s using server %s ended with event %s', self.id, this.name, event));
+ }
+
+ // Check if we are done
+ function done() {
+ // Done with the reconnection attempt
+ if(self.s.connectingServers.length == 0) {
+ if(self.state == DESTROYED) return;
+
+ // If we have a primary and a disconnect handler, execute
+ // buffered operations
+ if(self.s.replicaSetState.hasPrimaryAndSecondary() && self.s.disconnectHandler) {
+ self.s.disconnectHandler.execute();
+ } else if(self.s.replicaSetState.hasPrimary() && self.s.disconnectHandler) {
+ self.s.disconnectHandler.execute({ executePrimary:true });
+ } else if(self.s.replicaSetState.hasSecondary() && self.s.disconnectHandler) {
+ self.s.disconnectHandler.execute({ executeSecondary:true });
+ }
+
+ // Do we have a primary
+ if(self.s.replicaSetState.hasPrimary()) {
+ // Connect any missing servers
+ connectNewServers(self, self.s.replicaSetState.unknownServers, function(err, cb) {
+ // Debug log
+ if(self.s.logger.isDebug()) {
+ self.s.logger.debug(f('attemptReconnect for replset with id successful resuming topologyMonitor', self.id));
+ }
+
+ // Reset the running
+ self.runningAttempReconnect = false;
+ // Go back to normal topology monitoring
+ topologyMonitor(self);
+ });
+ } else {
+ if(self.listeners("close").length > 0) {
+ self.emit('close', self);
+ }
+
+ // Reset the running
+ self.runningAttempReconnect = false;
+ // Attempt a new reconnect
+ attemptReconnect(self);
+ }
+ }
+ }
+
+ // Remove the server from our list
+ for(var i = 0; i < self.s.connectingServers.length; i++) {
+ if(self.s.connectingServers[i].equals(this)) {
+ self.s.connectingServers.splice(i, 1);
+ }
+ }
+
+ // Keep reference to server
+ var _self = this;
+
+ // Debug log
+ if(self.s.logger.isDebug()) {
+ self.s.logger.debug(f('attemptReconnect in replset with id %s for', self.id));
+ }
+
+ // Connect and not authenticating
+ if(event == 'connect' && !self.authenticating) {
+ if(self.state == DESTROYED) {
+ return _self.destroy();
+ }
+
+ // Update the replicaset state
+ if(self.s.replicaSetState.update(_self)) {
+ // Primary lastIsMaster store it
+ if(_self.lastIsMaster() && _self.lastIsMaster().ismaster) {
+ self.ismaster = _self.lastIsMaster();
+ }
+
+ // Remove the handlers
+ for(var i = 0; i < handlers.length; i++) {
+ _self.removeAllListeners(handlers[i]);
+ }
+
+ // Add stable state handlers
+ _self.on('error', handleEvent(self, 'error'));
+ _self.on('close', handleEvent(self, 'close'));
+ _self.on('timeout', handleEvent(self, 'timeout'));
+ _self.on('parseError', handleEvent(self, 'parseError'));
+ } else {
+ _self.destroy();
+ }
+ } else if(event == 'connect' && self.authenticating) {
+ this.destroy();
+ }
+
+ done();
+ }
+ }
+
+ // Index used to interleaf the server connects, avoiding
+ // runtime issues on io constrained vm's
+ var timeoutInterval = 0;
+
+ function connect(server, timeoutInterval) {
+ setTimeout(function() {
+ server.once('connect', _handleEvent(self, 'connect'));
+ server.once('close', _handleEvent(self, 'close'));
+ server.once('timeout', _handleEvent(self, 'timeout'));
+ server.once('error', _handleEvent(self, 'error'));
+ server.once('parseError', _handleEvent(self, 'parseError'));
+
+ // SDAM Monitoring events
+ server.on('serverOpening', function(e) { self.emit('serverOpening', e); });
+ server.on('serverDescriptionChanged', function(e) { self.emit('serverDescriptionChanged', e); });
+ server.on('serverClosed', function(e) { self.emit('serverClosed', e); });
+
+ server.connect(self.s.connectOptions);
+ }, timeoutInterval);
+ }
+
+ // Connect all servers
+ while(servers.length > 0) {
+ connect(servers.shift(), timeoutInterval++);
+ }
+ }, self.s.minHeartbeatFrequencyMS);
+}
+
+function connectNewServers(self, servers, callback) {
+ // Count lefts
+ var count = servers.length;
+
+ // Handle events
+ var _handleEvent = function(self, event) {
+ return function(err, r) {
+ var _self = this;
+ count = count - 1;
+
+ // Destroyed
+ if(self.state == DESTROYED) {
+ return this.destroy();
+ }
+
+ if(event == 'connect' && !self.authenticating) {
+ // Destroyed
+ if(self.state == DESTROYED) {
+ return _self.destroy();
+ }
+
+ var result = self.s.replicaSetState.update(_self);
+ // Update the state with the new server
+ if(result) {
+ // Primary lastIsMaster store it
+ if(_self.lastIsMaster() && _self.lastIsMaster().ismaster) {
+ self.ismaster = _self.lastIsMaster();
+ }
+
+ // Remove the handlers
+ for(var i = 0; i < handlers.length; i++) {
+ _self.removeAllListeners(handlers[i]);
+ }
+
+ // Add stable state handlers
+ _self.on('error', handleEvent(self, 'error'));
+ _self.on('close', handleEvent(self, 'close'));
+ _self.on('timeout', handleEvent(self, 'timeout'));
+ _self.on('parseError', handleEvent(self, 'parseError'));
+ } else {
+ _self.destroy();
+ }
+ } else if(event == 'connect' && self.authenticating) {
+ this.destroy();
+ }
+
+ // Are we done finish up callback
+ if(count == 0) { callback(); }
+ }
+ }
+
+ // No new servers
+ if(count == 0) return callback();
+
+ // Execute method
+ function execute(_server, i) {
+ setTimeout(function() {
+ // Destroyed
+ if(self.state == DESTROYED) {
+ return;
+ }
+
+ // Create a new server instance
+ var server = new Server(assign({}, self.s.options, {
+ host: _server.split(':')[0],
+ port: parseInt(_server.split(':')[1], 10)
+ }, {
+ authProviders: self.authProviders, reconnect:false, monitoring: false, inTopology: true
+ }, {
+ clientInfo: clone(self.s.clientInfo)
+ }));
+
+ // Add temp handlers
+ server.once('connect', _handleEvent(self, 'connect'));
+ server.once('close', _handleEvent(self, 'close'));
+ server.once('timeout', _handleEvent(self, 'timeout'));
+ server.once('error', _handleEvent(self, 'error'));
+ server.once('parseError', _handleEvent(self, 'parseError'));
+
+ // SDAM Monitoring events
+ server.on('serverOpening', function(e) { self.emit('serverOpening', e); });
+ server.on('serverDescriptionChanged', function(e) { self.emit('serverDescriptionChanged', e); });
+ server.on('serverClosed', function(e) { self.emit('serverClosed', e); });
+ server.connect(self.s.connectOptions);
+ }, i);
+ }
+
+ // Create new instances
+ for(var i = 0; i < servers.length; i++) {
+ execute(servers[i], i);
+ }
+}
+
+function topologyMonitor(self, options) {
+ options = options || {};
+
+ // Set momitoring timeout
+ self.haTimeoutId = setTimeout(function() {
+ if(self.state == DESTROYED) return;
+
+ // Is this a on connect topology discovery
+ // Schedule a proper topology monitoring to happen
+ // To ensure any discovered servers do not timeout
+ // while waiting for the initial discovery to happen.
+ if(options.haInterval) {
+ topologyMonitor(self);
+ }
+
+ // If we have a primary and a disconnect handler, execute
+ // buffered operations
+ if(self.s.replicaSetState.hasPrimaryAndSecondary() && self.s.disconnectHandler) {
+ self.s.disconnectHandler.execute();
+ } else if(self.s.replicaSetState.hasPrimary() && self.s.disconnectHandler) {
+ self.s.disconnectHandler.execute({ executePrimary:true });
+ } else if(self.s.replicaSetState.hasSecondary() && self.s.disconnectHandler) {
+ self.s.disconnectHandler.execute({ executeSecondary:true });
+ }
+
+ // Get the connectingServers
+ var connectingServers = self.s.replicaSetState.allServers();
+ // Debug log
+ if(self.s.logger.isDebug()) {
+ self.s.logger.debug(f('topologyMonitor in replset with id %s connected servers [%s]'
+ , self.id
+ , connectingServers.map(function(x) {
+ return x.name;
+ })));
+ }
+ // Get the count
+ var count = connectingServers.length;
+
+ // If we have no servers connected
+ if(count == 0 && !options.haInterval) {
+ if(self.listeners("close").length > 0) {
+ self.emit('close', self);
+ }
+
+ return attemptReconnect(self);
+ }
+
+ // If the count is zero schedule a new fast
+ function pingServer(_self, _server, cb) {
+ // Measure running time
+ var start = new Date().getTime();
+
+ // Emit the server heartbeat start
+ emitSDAMEvent(self, 'serverHeartbeatStarted', { connectionId: _server.name });
+ // Execute ismaster
+ _server.command('admin.$cmd', {ismaster:true}, {monitoring: true}, function(err, r) {
+ if(self.state == DESTROYED) {
+ _server.destroy();
+ return cb(err, r);
+ }
+
+ // Calculate latency
+ var latencyMS = new Date().getTime() - start;
+
+ // Set the last updatedTime
+ var hrTime = process.hrtime();
+ // Calculate the last update time
+ _server.lastUpdateTime = hrTime[0] * 1000 + Math.round(hrTime[1]/1000);
+
+ // We had an error, remove it from the state
+ if(err) {
+ // Emit the server heartbeat failure
+ emitSDAMEvent(self, 'serverHeartbeatFailed', { durationMS: latencyMS, failure: err, connectionId: _server.name });
+ } else {
+ // Update the server ismaster
+ _server.ismaster = r.result;
+
+ // Check if we have a lastWriteDate convert it to MS
+ // and store on the server instance for later use
+ if(_server.ismaster.lastWrite && _server.ismaster.lastWrite.lastWriteDate) {
+ _server.lastWriteDate = _server.ismaster.lastWrite.lastWriteDate.getTime();
+ }
+
+ // Do we have a brand new server
+ if(_server.lastIsMasterMS == -1) {
+ _server.lastIsMasterMS = latencyMS;
+ } else if(_server.lastIsMasterMS) {
+ // After the first measurement, average RTT MUST be computed using an
+ // exponentially-weighted moving average formula, with a weighting factor (alpha) of 0.2.
+ // If the prior average is denoted old_rtt, then the new average (new_rtt) is
+ // computed from a new RTT measurement (x) using the following formula:
+ // alpha = 0.2
+ // new_rtt = alpha * x + (1 - alpha) * old_rtt
+ _server.lastIsMasterMS = 0.2 * latencyMS + (1 - 0.2) * _server.lastIsMasterMS;
+ }
+
+ if(_self.s.replicaSetState.update(_server)) {
+ // Primary lastIsMaster store it
+ if(_server.lastIsMaster() && _server.lastIsMaster().ismaster) {
+ self.ismaster = _server.lastIsMaster();
+ }
+ };
+
+ // Server heart beat event
+ emitSDAMEvent(self, 'serverHeartbeatSucceeded', { durationMS: latencyMS, reply: r.result, connectionId: _server.name });
+ }
+
+ // Calculate the stalness for this server
+ self.s.replicaSetState.updateServerMaxStaleness(_server, self.s.haInterval);
+
+ // Callback
+ cb(err, r);
+ });
+ }
+
+ // Connect any missing servers
+ function connectMissingServers() {
+ if(self.state == DESTROYED) return;
+
+ // Attempt to connect to any unknown servers
+ connectNewServers(self, self.s.replicaSetState.unknownServers, function(err, cb) {
+ if(self.state == DESTROYED) return;
+
+ // Check if we have an options.haInterval (meaning it was triggered from connect)
+ if(options.haInterval) {
+ // Do we have a primary and secondary
+ if(self.state == CONNECTING
+ && self.s.replicaSetState.hasPrimaryAndSecondary()) {
+ // Transition to connected
+ stateTransition(self, CONNECTED);
+ // Update initial state
+ self.initialConnectState.connect = true;
+ self.initialConnectState.fullsetup = true;
+ self.initialConnectState.all = true;
+ // Emit fullsetup and all events
+ process.nextTick(function() {
+ self.emit('connect', self);
+ self.emit('fullsetup', self);
+ self.emit('all', self);
+ });
+ } else if(self.state == CONNECTING
+ && self.s.replicaSetState.hasPrimary()) {
+ // Transition to connected
+ stateTransition(self, CONNECTED);
+ // Update initial state
+ self.initialConnectState.connect = true;
+ // Emit connected sign
+ process.nextTick(function() {
+ self.emit('connect', self);
+ });
+ } else if(self.state == CONNECTING
+ && self.s.replicaSetState.hasSecondary()
+ && self.s.options.secondaryOnlyConnectionAllowed) {
+ // Transition to connected
+ stateTransition(self, CONNECTED);
+ // Update initial state
+ self.initialConnectState.connect = true;
+ // Emit connected sign
+ process.nextTick(function() {
+ self.emit('connect', self);
+ });
+ } else if(self.state == CONNECTING) {
+ self.emit('error', new MongoError('no primary found in replicaset'));
+ // Destroy the topology
+ return self.destroy();
+ } else if(self.state == CONNECTED
+ && self.s.replicaSetState.hasPrimaryAndSecondary()
+ && !self.initialConnectState.fullsetup) {
+ self.initialConnectState.fullsetup = true;
+ // Emit fullsetup and all events
+ process.nextTick(function() {
+ self.emit('fullsetup', self);
+ self.emit('all', self);
+ });
+ }
+ }
+
+ if(!options.haInterval) topologyMonitor(self);
+ });
+ }
+
+ // No connectingServers but unknown servers
+ if(connectingServers.length == 0
+ && self.s.replicaSetState.unknownServers.length > 0 && options.haInterval) {
+ return connectMissingServers();
+ } else if(connectingServers.length == 0 && options.haInterval) {
+ self.destroy();
+ return self.emit('error', new MongoError('no valid replicaset members found'));
+ }
+
+ // Ping all servers
+ for(var i = 0; i < connectingServers.length; i++) {
+ pingServer(self, connectingServers[i], function(err, r) {
+ count = count - 1;
+
+ if(count == 0) {
+ connectMissingServers();
+ }
+ });
+ }
+ }, options.haInterval || self.s.haInterval)
+}
+
+function handleEvent(self, event) {
+ return function(err) {
+ if(self.state == DESTROYED) return;
+ // Debug log
+ if(self.s.logger.isDebug()) {
+ self.s.logger.debug(f('handleEvent %s from server %s in replset with id %s', event, this.name, self.id));
+ }
+
+ self.s.replicaSetState.remove(this);
+ }
+}
+
+function handleInitialConnectEvent(self, event) {
+ return function(err) {
+ // Debug log
+ if(self.s.logger.isDebug()) {
+ self.s.logger.debug(f('handleInitialConnectEvent %s from server %s in replset with id %s', event, this.name, self.id));
+ }
+
+ // Destroy the instance
+ if(self.state == DESTROYED) {
+ return this.destroy();
+ }
+
+ // Check the type of server
+ if(event == 'connect') {
+ // Update the state
+ var result = self.s.replicaSetState.update(this);
+ if(result == true) {
+ // Primary lastIsMaster store it
+ if(this.lastIsMaster() && this.lastIsMaster().ismaster) {
+ self.ismaster = this.lastIsMaster();
+ }
+
+ // Debug log
+ if(self.s.logger.isDebug()) {
+ self.s.logger.debug(f('handleInitialConnectEvent %s from server %s in replset with id %s has state [%s]', event, this.name, self.id, JSON.stringify(self.s.replicaSetState.set)));
+ }
+
+ // Remove the handlers
+ for(var i = 0; i < handlers.length; i++) {
+ this.removeAllListeners(handlers[i]);
+ }
+
+ // Add stable state handlers
+ this.on('error', handleEvent(self, 'error'));
+ this.on('close', handleEvent(self, 'close'));
+ this.on('timeout', handleEvent(self, 'timeout'));
+ this.on('parseError', handleEvent(self, 'parseError'));
+ } else if(result instanceof MongoError) {
+ this.destroy();
+ self.destroy();
+ return self.emit('error', result);
+ } else {
+ this.destroy();
+ }
+ } else {
+ // Emit failure to connect
+ self.emit('failed', this);
+ // Remove from the state
+ self.s.replicaSetState.remove(this);
+ }
+
+ // Remove from the list from connectingServers
+ for(var i = 0; i < self.s.connectingServers.length; i++) {
+ if(self.s.connectingServers[i].equals(this)) {
+ self.s.connectingServers.splice(i, 1);
+ }
+ }
+
+ // Trigger topologyMonitor
+ if(self.s.connectingServers.length == 0) {
+ topologyMonitor(self, {haInterval: 1});
+ }
+ };
+}
+
+function connectServers(self, servers) {
+ // Update connectingServers
+ self.s.connectingServers = self.s.connectingServers.concat(servers);
+
+ // Index used to interleaf the server connects, avoiding
+ // runtime issues on io constrained vm's
+ var timeoutInterval = 0;
+
+ function connect(server, timeoutInterval) {
+ setTimeout(function() {
+ // Add the server to the state
+ if(self.s.replicaSetState.update(server)) {
+ // Primary lastIsMaster store it
+ if(server.lastIsMaster() && server.lastIsMaster().ismaster) {
+ self.ismaster = server.lastIsMaster();
+ }
+ }
+
+ // Add event handlers
+ server.once('close', handleInitialConnectEvent(self, 'close'));
+ server.once('timeout', handleInitialConnectEvent(self, 'timeout'));
+ server.once('parseError', handleInitialConnectEvent(self, 'parseError'));
+ server.once('error', handleInitialConnectEvent(self, 'error'));
+ server.once('connect', handleInitialConnectEvent(self, 'connect'));
+ // SDAM Monitoring events
+ server.on('serverOpening', function(e) { self.emit('serverOpening', e); });
+ server.on('serverDescriptionChanged', function(e) { self.emit('serverDescriptionChanged', e); });
+ server.on('serverClosed', function(e) { self.emit('serverClosed', e); });
+ // Start connection
+ server.connect(self.s.connectOptions);
+ }, timeoutInterval);
+ }
+
+ // Start all the servers
+ while(servers.length > 0) {
+ connect(servers.shift(), timeoutInterval++);
+ }
+}
+
+/**
+ * Emit event if it exists
+ * @method
+ */
+function emitSDAMEvent(self, event, description) {
+ if(self.listeners(event).length > 0) {
+ self.emit(event, description);
+ }
+}
+
+/**
+ * Initiate server connect
+ * @method
+ * @param {array} [options.auth=null] Array of auth options to apply on connect
+ */
+ReplSet.prototype.connect = function(options) {
+ var self = this;
+ // Add any connect level options to the internal state
+ this.s.connectOptions = options || {};
+ // Set connecting state
+ stateTransition(this, CONNECTING);
+ // Create server instances
+ var servers = this.s.seedlist.map(function(x) {
+ return new Server(assign({}, self.s.options, x, {
+ authProviders: self.authProviders, reconnect:false, monitoring:false, inTopology: true
+ }, {
+ clientInfo: clone(self.s.clientInfo)
+ }));
+ });
+
+ // Emit the topology opening event
+ emitSDAMEvent(this, 'topologyOpening', { topologyId: this.id });
+
+ // Start all server connections
+ connectServers(self, servers);
+}
+
+/**
+ * Destroy the server connection
+ * @method
+ */
+ReplSet.prototype.destroy = function() {
+ // Transition state
+ stateTransition(this, DESTROYED);
+ // Clear out any monitoring process
+ if(this.haTimeoutId) clearTimeout(this.haTimeoutId);
+ // Destroy the replicaset
+ this.s.replicaSetState.destroy();
+
+ // Destroy all connecting servers
+ this.s.connectingServers.forEach(function(x) {
+ x.destroy();
+ });
+
+ // Emit toplogy closing event
+ emitSDAMEvent(this, 'topologyClosed', { topologyId: this.id });
+}
+
+/**
+ * Unref all connections belong to this server
+ * @method
+ */
+ReplSet.prototype.unref = function() {
+ // Transition state
+ stateTransition(this, DISCONNECTED);
+
+ this.s.replicaSetState.allServers().forEach(function(x) {
+ x.unref();
+ });
+
+ clearTimeout(this.haTimeoutId);
+}
+
+/**
+ * Returns the last known ismaster document for this server
+ * @method
+ * @return {object}
+ */
+ReplSet.prototype.lastIsMaster = function() {
+ return this.s.replicaSetState.primary
+ ? this.s.replicaSetState.primary.lastIsMaster() : this.ismaster;
+}
+
+/**
+ * All raw connections
+ * @method
+ * @return {Connection[]}
+ */
+ReplSet.prototype.connections = function() {
+ var servers = this.s.replicaSetState.allServers();
+ var connections = [];
+ for(var i = 0; i < servers.length; i++) {
+ connections = connections.concat(servers[i].connections());
+ }
+
+ return connections;
+}
+
+/**
+ * Figure out if the server is connected
+ * @method
+ * @param {ReadPreference} [options.readPreference] Specify read preference if command supports it
+ * @return {boolean}
+ */
+ReplSet.prototype.isConnected = function(options) {
+ options = options || {};
+
+ // If we are authenticating signal not connected
+ // To avoid interleaving of operations
+ if(this.authenticating) return false;
+
+ // If we specified a read preference check if we are connected to something
+ // than can satisfy this
+ if(options.readPreference
+ && options.readPreference.equals(ReadPreference.secondary)) {
+ return this.s.replicaSetState.hasSecondary();
+ }
+
+ if(options.readPreference
+ && options.readPreference.equals(ReadPreference.primary)) {
+ return this.s.replicaSetState.hasPrimary();
+ }
+
+ if(options.readPreference
+ && options.readPreference.equals(ReadPreference.primaryPreferred)) {
+ return this.s.replicaSetState.hasSecondary() || this.s.replicaSetState.hasPrimary();
+ }
+
+ if(options.readPreference
+ && options.readPreference.equals(ReadPreference.secondaryPreferred)) {
+ return this.s.replicaSetState.hasSecondary() || this.s.replicaSetState.hasPrimary();
+ }
+
+ if(this.s.secondaryOnlyConnectionAllowed
+ && this.s.replicaSetState.hasSecondary()) {
+ return true;
+ }
+
+ return this.s.replicaSetState.hasPrimary();
+}
+
+/**
+ * Figure out if the replicaset instance was destroyed by calling destroy
+ * @method
+ * @return {boolean}
+ */
+ReplSet.prototype.isDestroyed = function() {
+ return this.state == DESTROYED;
+}
+
+/**
+ * Get server
+ * @method
+ * @param {ReadPreference} [options.readPreference] Specify read preference if command supports it
+ * @return {Server}
+ */
+ReplSet.prototype.getServer = function(options) {
+ // Ensure we have no options
+ options = options || {};
+
+ // Pick the right server baspickServerd on readPreference
+ var server = this.s.replicaSetState.pickServer(options.readPreference);
+ if(this.s.debug) this.emit('pickedServer', options.readPreference, server);
+ return server;
+}
+
+/**
+ * Get all connected servers
+ * @method
+ * @return {Server[]}
+ */
+ReplSet.prototype.getServers = function() {
+ return this.s.replicaSetState.allServers();
+}
+
+function basicReadPreferenceValidation(self, options) {
+ if(options.readPreference && !(options.readPreference instanceof ReadPreference)) {
+ throw new Error("readPreference must be an instance of ReadPreference");
+ }
+}
+
+//
+// Execute write operation
+var executeWriteOperation = function(self, op, ns, ops, options, callback) {
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ // Ensure we have no options
+ options = options || {};
+
+ // No server returned we had an error
+ if(self.s.replicaSetState.primary == null) {
+ return callback(new MongoError("no primary server found"));
+ }
+
+ // Execute the command
+ self.s.replicaSetState.primary[op](ns, ops, options, callback);
+}
+
+/**
+ * Insert one or more documents
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {array} ops An array of documents to insert
+ * @param {boolean} [options.ordered=true] Execute in order or out of order
+ * @param {object} [options.writeConcern={}] Write concern for the operation
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+ReplSet.prototype.insert = function(ns, ops, options, callback) {
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ if(this.state == DESTROYED) return callback(new MongoError(f('topology was destroyed')));
+
+ // Not connected but we have a disconnecthandler
+ if(!this.s.replicaSetState.hasPrimary() && this.s.disconnectHandler != null) {
+ return this.s.disconnectHandler.add('insert', ns, ops, options, callback);
+ }
+
+ // Execute write operation
+ executeWriteOperation(this, 'insert', ns, ops, options, callback);
+}
+
+/**
+ * Perform one or more update operations
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {array} ops An array of updates
+ * @param {boolean} [options.ordered=true] Execute in order or out of order
+ * @param {object} [options.writeConcern={}] Write concern for the operation
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+ReplSet.prototype.update = function(ns, ops, options, callback) {
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ if(this.state == DESTROYED) return callback(new MongoError(f('topology was destroyed')));
+
+ // Not connected but we have a disconnecthandler
+ if(!this.s.replicaSetState.hasPrimary() && this.s.disconnectHandler != null) {
+ return this.s.disconnectHandler.add('update', ns, ops, options, callback);
+ }
+
+ // Execute write operation
+ executeWriteOperation(this, 'update', ns, ops, options, callback);
+}
+
+/**
+ * Perform one or more remove operations
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {array} ops An array of removes
+ * @param {boolean} [options.ordered=true] Execute in order or out of order
+ * @param {object} [options.writeConcern={}] Write concern for the operation
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+ReplSet.prototype.remove = function(ns, ops, options, callback) {
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ if(this.state == DESTROYED) return callback(new MongoError(f('topology was destroyed')));
+
+ // Not connected but we have a disconnecthandler
+ if(!this.s.replicaSetState.hasPrimary() && this.s.disconnectHandler != null) {
+ return this.s.disconnectHandler.add('remove', ns, ops, options, callback);
+ }
+
+ // Execute write operation
+ executeWriteOperation(this, 'remove', ns, ops, options, callback);
+}
+
+/**
+ * Execute a command
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {object} cmd The command hash
+ * @param {ReadPreference} [options.readPreference] Specify read preference if command supports it
+ * @param {Connection} [options.connection] Specify connection object to execute command against
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+ReplSet.prototype.command = function(ns, cmd, options, callback) {
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ if(this.state == DESTROYED) return callback(new MongoError(f('topology was destroyed')));
+ var self = this;
+
+ // Establish readPreference
+ var readPreference = options.readPreference ? options.readPreference : ReadPreference.primary;
+
+ // If the readPreference is primary and we have no primary, store it
+ if(readPreference.preference == 'primary' && !this.s.replicaSetState.hasPrimary() && this.s.disconnectHandler != null) {
+ return this.s.disconnectHandler.add('command', ns, cmd, options, callback);
+ } else if(readPreference.preference == 'secondary' && !this.s.replicaSetState.hasSecondary() && this.s.disconnectHandler != null) {
+ return this.s.disconnectHandler.add('command', ns, cmd, options, callback);
+ } else if(readPreference.preference != 'primary' && !this.s.replicaSetState.hasSecondary() && !this.s.replicaSetState.hasPrimary() && this.s.disconnectHandler != null) {
+ return this.s.disconnectHandler.add('command', ns, cmd, options, callback);
+ }
+
+ // Pick a server
+ var server = this.s.replicaSetState.pickServer(readPreference);
+ // We received an error, return it
+ if(!(server instanceof Server)) return callback(server);
+ // Emit debug event
+ if(self.s.debug) self.emit('pickedServer', ReadPreference.primary, server);
+
+ // No server returned we had an error
+ if(server == null) {
+ return callback(new MongoError(f("no server found that matches the provided readPreference %s", readPreference)));
+ }
+
+ // Execute the command
+ server.command(ns, cmd, options, callback);
+}
+
+/**
+ * Authenticate using a specified mechanism
+ * @method
+ * @param {string} mechanism The Auth mechanism we are invoking
+ * @param {string} db The db we are invoking the mechanism against
+ * @param {...object} param Parameters for the specific mechanism
+ * @param {authResultCallback} callback A callback function
+ */
+ReplSet.prototype.auth = function(mechanism, db) {
+ var allArgs = Array.prototype.slice.call(arguments, 0).slice(0);
+ var self = this;
+ var args = Array.prototype.slice.call(arguments, 2);
+ var callback = args.pop();
+
+ // If we don't have the mechanism fail
+ if(this.authProviders[mechanism] == null && mechanism != 'default') {
+ return callback(new MongoError(f("auth provider %s does not exist", mechanism)));
+ }
+
+ // Are we already authenticating, throw
+ if(this.authenticating) {
+ return callback(new MongoError('authentication or logout allready in process'));
+ }
+
+ // Topology is not connected, save the call in the provided store to be
+ // Executed at some point when the handler deems it's reconnected
+ if(!self.s.replicaSetState.hasPrimary() && self.s.disconnectHandler != null) {
+ return self.s.disconnectHandler.add('auth', db, allArgs, {}, callback);
+ }
+
+ // Set to authenticating
+ this.authenticating = true;
+ // All errors
+ var errors = [];
+
+ // Get all the servers
+ var servers = this.s.replicaSetState.allServers();
+ // No servers return
+ if(servers.length == 0) {
+ this.authenticating = false;
+ callback(null, true);
+ }
+
+ // Authenticate
+ function auth(server) {
+ // Arguments without a callback
+ var argsWithoutCallback = [mechanism, db].concat(args.slice(0));
+ // Create arguments
+ var finalArguments = argsWithoutCallback.concat([function(err, r) {
+ count = count - 1;
+ // Save all the errors
+ if(err) errors.push({name: server.name, err: err});
+ // We are done
+ if(count == 0) {
+ // Auth is done
+ self.authenticating = false;
+
+ // Return the auth error
+ if(errors.length) return callback(MongoError.create({
+ message: 'authentication fail', errors: errors
+ }), false);
+
+ // Successfully authenticated session
+ callback(null, self);
+ }
+ }]);
+
+ if(!server.lastIsMaster().arbiterOnly) {
+ // Execute the auth only against non arbiter servers
+ server.auth.apply(server, finalArguments);
+ } else {
+ // If we are authenticating against an arbiter just ignore it
+ finalArguments.pop()(null);
+ }
+ }
+
+ // Get total count
+ var count = servers.length;
+ // Authenticate against all servers
+ while(servers.length > 0) {
+ auth(servers.shift());
+ }
+}
+
+/**
+ * Logout from a database
+ * @method
+ * @param {string} db The db we are logging out from
+ * @param {authResultCallback} callback A callback function
+ */
+ReplSet.prototype.logout = function(dbName, callback) {
+ var self = this;
+ // Are we authenticating or logging out, throw
+ if(this.authenticating) {
+ throw new MongoError('authentication or logout allready in process');
+ }
+
+ // Ensure no new members are processed while logging out
+ this.authenticating = true;
+
+ // Remove from all auth providers (avoid any reaplication of the auth details)
+ var providers = Object.keys(this.authProviders);
+ for(var i = 0; i < providers.length; i++) {
+ this.authProviders[providers[i]].logout(dbName);
+ }
+
+ // Now logout all the servers
+ var servers = this.s.replicaSetState.allServers();
+ var count = servers.length;
+ if(count == 0) return callback();
+ var errors = [];
+
+ // Execute logout on all server instances
+ for(var i = 0; i < servers.length; i++) {
+ servers[i].logout(dbName, function(err) {
+ count = count - 1;
+ if(err) errors.push({name: server.name, err: err});
+
+ if(count == 0) {
+ // Do not block new operations
+ self.authenticating = false;
+ // If we have one or more errors
+ if(errors.length) return callback(MongoError.create({
+ message: f('logout failed against db %s', dbName), errors: errors
+ }), false);
+
+ // No errors
+ callback();
+ }
+ });
+ }
+}
+
+/**
+ * Perform one or more remove operations
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {{object}|{Long}} cmd Can be either a command returning a cursor or a cursorId
+ * @param {object} [options.batchSize=0] Batchsize for the operation
+ * @param {array} [options.documents=[]] Initial documents list for cursor
+ * @param {ReadPreference} [options.readPreference] Specify read preference if command supports it
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+ReplSet.prototype.cursor = function(ns, cmd, cursorOptions) {
+ cursorOptions = cursorOptions || {};
+ var FinalCursor = cursorOptions.cursorFactory || this.s.Cursor;
+ return new FinalCursor(this.s.bson, ns, cmd, cursorOptions, this, this.s.options);
+}
+
+/**
+ * A replset connect event, used to verify that the connection is up and running
+ *
+ * @event ReplSet#connect
+ * @type {ReplSet}
+ */
+
+/**
+ * A replset reconnect event, used to verify that the topology reconnected
+ *
+ * @event ReplSet#reconnect
+ * @type {ReplSet}
+ */
+
+/**
+ * A replset fullsetup event, used to signal that all topology members have been contacted.
+ *
+ * @event ReplSet#fullsetup
+ * @type {ReplSet}
+ */
+
+/**
+ * A replset all event, used to signal that all topology members have been contacted.
+ *
+ * @event ReplSet#all
+ * @type {ReplSet}
+ */
+
+/**
+ * A replset failed event, used to signal that initial replset connection failed.
+ *
+ * @event ReplSet#failed
+ * @type {ReplSet}
+ */
+
+/**
+ * A server member left the replicaset
+ *
+ * @event ReplSet#left
+ * @type {function}
+ * @param {string} type The type of member that left (primary|secondary|arbiter)
+ * @param {Server} server The server object that left
+ */
+
+/**
+ * A server member joined the replicaset
+ *
+ * @event ReplSet#joined
+ * @type {function}
+ * @param {string} type The type of member that joined (primary|secondary|arbiter)
+ * @param {Server} server The server object that joined
+ */
+
+/**
+ * A server opening SDAM monitoring event
+ *
+ * @event ReplSet#serverOpening
+ * @type {object}
+ */
+
+/**
+ * A server closed SDAM monitoring event
+ *
+ * @event ReplSet#serverClosed
+ * @type {object}
+ */
+
+/**
+ * A server description SDAM change monitoring event
+ *
+ * @event ReplSet#serverDescriptionChanged
+ * @type {object}
+ */
+
+/**
+ * A topology open SDAM event
+ *
+ * @event ReplSet#topologyOpening
+ * @type {object}
+ */
+
+/**
+ * A topology closed SDAM event
+ *
+ * @event ReplSet#topologyClosed
+ * @type {object}
+ */
+
+/**
+ * A topology structure SDAM change event
+ *
+ * @event ReplSet#topologyDescriptionChanged
+ * @type {object}
+ */
+
+/**
+ * A topology serverHeartbeatStarted SDAM event
+ *
+ * @event ReplSet#serverHeartbeatStarted
+ * @type {object}
+ */
+
+/**
+ * A topology serverHeartbeatFailed SDAM event
+ *
+ * @event ReplSet#serverHeartbeatFailed
+ * @type {object}
+ */
+
+/**
+ * A topology serverHeartbeatSucceeded SDAM change event
+ *
+ * @event ReplSet#serverHeartbeatSucceeded
+ * @type {object}
+ */
+
+module.exports = ReplSet;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/replset_state.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/replset_state.js
new file mode 100644
index 0000000..600e554
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/replset_state.js
@@ -0,0 +1,948 @@
+"use strict"
+
+var inherits = require('util').inherits,
+ f = require('util').format,
+ EventEmitter = require('events').EventEmitter,
+ Logger = require('../connection/logger'),
+ ObjectId = require('bson').ObjectId,
+ ReadPreference = require('./read_preference'),
+ MongoError = require('../error');
+
+var TopologyType = {
+ 'Single': 'Single', 'ReplicaSetNoPrimary': 'ReplicaSetNoPrimary',
+ 'ReplicaSetWithPrimary': 'ReplicaSetWithPrimary', 'Sharded': 'Sharded',
+ 'Unknown': 'Unknown'
+};
+
+var ServerType = {
+ 'Standalone': 'Standalone', 'Mongos': 'Mongos', 'PossiblePrimary': 'PossiblePrimary',
+ 'RSPrimary': 'RSPrimary', 'RSSecondary': 'RSSecondary', 'RSArbiter': 'RSArbiter',
+ 'RSOther': 'RSOther', 'RSGhost': 'RSGhost', 'Unknown': 'Unknown'
+};
+
+var ReplSetState = function(options) {
+ options = options || {};
+ // Add event listener
+ EventEmitter.call(this);
+ // Topology state
+ this.topologyType = TopologyType.ReplicaSetNoPrimary;
+ this.setName = options.setName;
+
+ // Server set
+ this.set = {};
+
+ // Unpacked options
+ this.id = options.id;
+ this.setName = options.setName;
+
+ // Replicaset logger
+ this.logger = options.logger || Logger('ReplSet', options);
+
+ // Server selection index
+ this.index = 0;
+ // Acceptable latency
+ this.acceptableLatency = options.acceptableLatency || 15;
+
+ // heartbeatFrequencyMS
+ this.heartbeatFrequencyMS = options.heartbeatFrequencyMS || 10000;
+
+ // Server side
+ this.primary = null;
+ this.secondaries = [];
+ this.arbiters = [];
+ this.passives = [];
+ this.ghosts = [];
+ // Current unknown hosts
+ this.unknownServers = [];
+ // In set status
+ this.set = {};
+ // Status
+ this.maxElectionId = null;
+ this.maxSetVersion = 0;
+ // Description of the Replicaset
+ this.replicasetDescription = {
+ "topologyType": "Unknown", "servers": []
+ };
+}
+
+inherits(ReplSetState, EventEmitter);
+
+ReplSetState.prototype.hasPrimaryAndSecondary = function(server) {
+ return this.primary != null && this.secondaries.length > 0;
+}
+
+ReplSetState.prototype.hasPrimary = function(server) {
+ return this.primary != null;
+}
+
+ReplSetState.prototype.hasSecondary = function(server) {
+ return this.secondaries.length > 0;
+}
+
+ReplSetState.prototype.allServers = function(options) {
+ options = options || {};
+ var servers = this.primary ? [this.primary] : [];
+ servers = servers.concat(this.secondaries);
+ if(!options.ignoreArbiters) servers = servers.concat(this.arbiters);
+ servers = servers.concat(this.passives);
+ return servers;
+}
+
+ReplSetState.prototype.destroy = function() {
+ // Destroy all sockets
+ if(this.primary) this.primary.destroy();
+ this.secondaries.forEach(function(x) { x.destroy(); });
+ this.arbiters.forEach(function(x) { x.destroy(); });
+ this.passives.forEach(function(x) { x.destroy(); });
+ this.ghosts.forEach(function(x) { x.destroy(); });
+ // Clear out the complete state
+ this.secondaries = [];
+ this.arbiters = [];
+ this.passives = [];
+ this.ghosts = [];
+ this.unknownServers = [];
+ this.set = {};
+}
+
+ReplSetState.prototype.remove = function(server, options) {
+ options = options || {};
+
+ // Only remove if the current server is not connected
+ var servers = this.primary ? [this.primary] : [];
+ servers = servers.concat(this.secondaries);
+ servers = servers.concat(this.arbiters);
+ servers = servers.concat(this.passives);
+
+ // Check if it's active and this is just a failed connection attempt
+ for(var i = 0; i < servers.length; i++) {
+ if(!options.force && servers[i].equals(server) && servers[i].isConnected && servers[i].isConnected()) {
+ return;
+ }
+ }
+
+ // If we have it in the set remove it
+ if(this.set[server.name]) {
+ this.set[server.name].type = ServerType.Unknown;
+ this.set[server.name].electionId = null;
+ this.set[server.name].setName = null;
+ this.set[server.name].setVersion = null;
+ }
+
+ // Remove type
+ var removeType = null;
+
+ // Remove from any lists
+ if(this.primary && this.primary.equals(server)) {
+ this.primary = null;
+ this.topologyType = TopologyType.ReplicaSetNoPrimary;
+ removeType = 'primary';
+ }
+
+ // Remove from any other server lists
+ removeType = removeFrom(server, this.secondaries) ? 'secondary' : removeType;
+ removeType = removeFrom(server, this.arbiters) ? 'arbiter' : removeType;
+ removeType = removeFrom(server, this.passives) ? 'secondary' : removeType;
+ removeFrom(server, this.ghosts);
+ removeFrom(server, this.unknownServers);
+
+ // Do we have a removeType
+ if(removeType) {
+ this.emit('left', removeType, server);
+ }
+}
+
+ReplSetState.prototype.update = function(server) {
+ var self = this;
+ // Get the current ismaster
+ var ismaster = server.lastIsMaster();
+
+ //
+ // Add any hosts
+ //
+ if(ismaster) {
+ // Join all the possible new hosts
+ var hosts = Array.isArray(ismaster.hosts) ? ismaster.hosts : [];
+ hosts = hosts.concat(Array.isArray(ismaster.arbiters) ? ismaster.arbiters : []);
+ hosts = hosts.concat(Array.isArray(ismaster.passives) ? ismaster.passives : []);
+
+ // Add all hosts as unknownServers
+ for(var i = 0; i < hosts.length; i++) {
+ // Add to the list of unknown server
+ if(this.unknownServers.indexOf(hosts[i]) == -1
+ && (!this.set[hosts[i]] || this.set[hosts[i]].type == ServerType.Unknown)) {
+ this.unknownServers.push(hosts[i]);
+ }
+
+ if(!this.set[hosts[i]]) {
+ this.set[hosts[i]] = {
+ type: ServerType.Unknown,
+ electionId: null,
+ setName: null,
+ setVersion: null
+ }
+ }
+ }
+ }
+
+ //
+ // Unknown server
+ //
+ if(!ismaster && !inList(ismaster, server, this.unknownServers)) {
+ self.set[server.name] = {
+ type: ServerType.Unknown, setVersion: null, electionId: null, setName: null
+ }
+ // Update set information about the server instance
+ self.set[server.name].type = ServerType.Unknown;
+ self.set[server.name].electionId = ismaster ? ismaster.electionId : ismaster;
+ self.set[server.name].setName = ismaster ? ismaster.setName : ismaster;
+ self.set[server.name].setVersion = ismaster ? ismaster.setVersion : ismaster;
+
+ if(self.unknownServers.indexOf(server.name) == -1) {
+ self.unknownServers.push(server.name);
+ }
+
+ // Set the topology
+ return false;
+ }
+
+ //
+ // Is this a mongos
+ //
+ if(ismaster && ismaster.msg == 'isdbgrid') {
+ return false;
+ }
+
+ // A RSOther instance
+ if((ismaster.setName && ismaster.hidden)
+ || (ismaster.setName && !ismaster.ismaster && !ismaster.secondary && !ismaster.arbiterOnly && !ismaster.passive)) {
+ self.set[server.name] = {
+ type: ServerType.RSOther, setVersion: null,
+ electionId: null, setName: ismaster.setName
+ }
+ // Set the topology
+ this.topologyType = this.primary ? TopologyType.ReplicaSetWithPrimary : TopologyType.ReplicaSetNoPrimary;
+ if(ismaster.setName) this.setName = ismaster.setName;
+ return false;
+ }
+
+ // A RSGhost instance
+ if(ismaster.isreplicaset) {
+ self.set[server.name] = {
+ type: ServerType.RSGhost, setVersion: null,
+ electionId: null, setName: null
+ }
+
+ // Set the topology
+ this.topologyType = this.primary ? TopologyType.ReplicaSetWithPrimary : TopologyType.ReplicaSetNoPrimary;
+ if(ismaster.setName) this.setName = ismaster.setName;
+
+ // Set the topology
+ return false;
+ }
+
+ //
+ // Standalone server, destroy and return
+ //
+ if(ismaster && ismaster.ismaster && !ismaster.setName) {
+ this.topologyType = this.primary ? TopologyType.ReplicaSetWithPrimary : TopologyType.Unknown;
+ this.remove(server, {force:true});
+ return false;
+ }
+
+ //
+ // Server in maintanance mode
+ //
+ if(ismaster && !ismaster.ismaster && !ismaster.secondary && !ismaster.arbiterOnly) {
+ this.remove(server, {force:true});
+ return false;
+ }
+
+ //
+ // If the .me field does not match the passed in server
+ //
+ if(ismaster.me && ismaster.me != server.name) {
+ if(this.logger.isWarn()) {
+ this.logger.warn(f('the seedlist server was removed due to its address %s not matching its ismaster.me address %s', server.name, ismaster.me));
+ }
+
+ // Set the type of topology we have
+ if(this.primary && !this.primary.equals(server)) {
+ this.topologyType = TopologyType.ReplicaSetWithPrimary;
+ } else {
+ this.topologyType = TopologyType.ReplicaSetNoPrimary;
+ }
+
+ return false;
+ }
+
+ //
+ // Primary handling
+ //
+ if(!this.primary && ismaster.ismaster && ismaster.setName) {
+ var ismasterElectionId = server.lastIsMaster().electionId;
+ if(this.setName && this.setName != ismaster.setName) {
+ this.topologyType = TopologyType.ReplicaSetNoPrimary;
+ return new MongoError(f('setName from ismaster does not match provided connection setName [%s] != [%s]', ismaster.setName, this.setName));
+ }
+
+ if(!this.maxElectionId && ismasterElectionId) {
+ this.maxElectionId = ismasterElectionId;
+ } else if(this.maxElectionId && ismasterElectionId) {
+ var result = compareObjectIds(this.maxElectionId, ismasterElectionId);
+ // Get the electionIds
+ var ismasterSetVersion = server.lastIsMaster().setVersion;
+
+ // if(result == 1 || result == 0) {
+ if(result == 1) {
+ this.topologyType = TopologyType.ReplicaSetNoPrimary;
+ return false;
+ } else if(result == 0 && ismasterSetVersion) {
+ if(ismasterSetVersion < this.maxSetVersion) {
+ this.topologyType = TopologyType.ReplicaSetNoPrimary;
+ return false;
+ }
+ }
+
+ this.maxSetVersion = ismasterSetVersion;
+ this.maxElectionId = ismasterElectionId;
+ }
+
+ self.primary = server;
+ self.set[server.name] = {
+ type: ServerType.RSPrimary,
+ setVersion: ismaster.setVersion,
+ electionId: ismaster.electionId,
+ setName: ismaster.setName
+ }
+
+ // Set the topology
+ this.topologyType = TopologyType.ReplicaSetWithPrimary;
+ if(ismaster.setName) this.setName = ismaster.setName;
+ removeFrom(server, self.unknownServers);
+ removeFrom(server, self.secondaries);
+ removeFrom(server, self.passives);
+ self.emit('joined', 'primary', server);
+ emitTopologyDescriptionChanged(self);
+ return true;
+ } else if(ismaster.ismaster && ismaster.setName) {
+ // Get the electionIds
+ var currentElectionId = self.set[self.primary.name].electionId;
+ var currentSetVersion = self.set[self.primary.name].setVersion;
+ var currentSetName = self.set[self.primary.name].setName;
+ var ismasterElectionId = server.lastIsMaster().electionId;
+ var ismasterSetVersion = server.lastIsMaster().setVersion;
+ var ismasterSetName = server.lastIsMaster().setName;
+
+ // Is it the same server instance
+ if(this.primary.equals(server)
+ && currentSetName == ismasterSetName) {
+ return false;
+ }
+
+ // If we do not have the same rs name
+ if(currentSetName && currentSetName != ismasterSetName) {
+ if(!this.primary.equals(server)) {
+ this.topologyType = TopologyType.ReplicaSetWithPrimary;
+ } else {
+ this.topologyType = TopologyType.ReplicaSetNoPrimary;
+ }
+
+ return false;
+ }
+
+ // Check if we need to replace the server
+ if(currentElectionId && ismasterElectionId) {
+ var result = compareObjectIds(currentElectionId, ismasterElectionId);
+
+ if(result == 1) {
+ return false;
+ } else if(result == 0 && (currentSetVersion > ismasterSetVersion)) {
+ return false;
+ }
+ } else if(!currentElectionId && ismasterElectionId
+ && ismasterSetVersion) {
+ if(ismasterSetVersion < this.maxSetVersion) {
+ return false;
+ }
+ }
+
+ if(!this.maxElectionId && ismasterElectionId) {
+ this.maxElectionId = ismasterElectionId;
+ } else if(this.maxElectionId && ismasterElectionId) {
+ var result = compareObjectIds(this.maxElectionId, ismasterElectionId);
+
+ if(result == 1) {
+ return false;
+ } else if(result == 0 && currentSetVersion && ismasterSetVersion) {
+ if(ismasterSetVersion < this.maxSetVersion) {
+ return false;
+ }
+ } else {
+ if(ismasterSetVersion < this.maxSetVersion) {
+ return false;
+ }
+ }
+
+ this.maxElectionId = ismasterElectionId;
+ this.maxSetVersion = ismasterSetVersion;
+ } else {
+ this.maxSetVersion = ismasterSetVersion;
+ }
+
+ // Modify the entry to unknown
+ self.set[self.primary.name] = {
+ type: ServerType.Unknown, setVersion: null,
+ electionId: null, setName: null
+ }
+
+ // Signal primary left
+ self.emit('left', 'primary', this.primary);
+ // Destroy the instance
+ self.primary.destroy();
+ // Set the new instance
+ self.primary = server;
+ // Set the set information
+ self.set[server.name] = {
+ type: ServerType.RSPrimary, setVersion: ismaster.setVersion,
+ electionId: ismaster.electionId, setName: ismaster.setName
+ }
+
+ // Set the topology
+ this.topologyType = TopologyType.ReplicaSetWithPrimary;
+ if(ismaster.setName) this.setName = ismaster.setName;
+ removeFrom(server, self.unknownServers);
+ removeFrom(server, self.secondaries);
+ removeFrom(server, self.passives);
+ self.emit('joined', 'primary', server);
+ emitTopologyDescriptionChanged(self);
+ return true;
+ }
+
+ // A possible instance
+ if(!this.primary && ismaster.primary) {
+ self.set[ismaster.primary] = {
+ type: ServerType.PossiblePrimary, setVersion: null,
+ electionId: null, setName: null
+ }
+ }
+
+ //
+ // Secondary handling
+ //
+ if(ismaster.secondary && ismaster.setName
+ && !inList(ismaster, server, this.secondaries)
+ && this.setName && this.setName == ismaster.setName) {
+ addToList(self, ServerType.RSSecondary, ismaster, server, this.secondaries);
+ // Set the topology
+ this.topologyType = this.primary ? TopologyType.ReplicaSetWithPrimary : TopologyType.ReplicaSetNoPrimary;
+ if(ismaster.setName) this.setName = ismaster.setName;
+ removeFrom(server, self.unknownServers);
+
+ // Remove primary
+ if(this.primary && this.primary.name == server.name) {
+ server.destroy();
+ this.primary = null;
+ self.emit('left', 'primary', server);
+ }
+
+ self.emit('joined', 'secondary', server);
+ emitTopologyDescriptionChanged(self);
+ return true;
+ }
+
+ //
+ // Arbiter handling
+ //
+ if(ismaster.arbiterOnly && ismaster.setName
+ && !inList(ismaster, server, this.arbiters)
+ && this.setName && this.setName == ismaster.setName) {
+ addToList(self, ServerType.RSArbiter, ismaster, server, this.arbiters);
+ // Set the topology
+ this.topologyType = this.primary ? TopologyType.ReplicaSetWithPrimary : TopologyType.ReplicaSetNoPrimary;
+ if(ismaster.setName) this.setName = ismaster.setName;
+ removeFrom(server, self.unknownServers);
+ self.emit('joined', 'arbiter', server);
+ emitTopologyDescriptionChanged(self);
+ return true;
+ }
+
+ //
+ // Passive handling
+ //
+ if(ismaster.passive && ismaster.setName
+ && !inList(ismaster, server, this.passives)
+ && this.setName && this.setName == ismaster.setName) {
+ addToList(self, ServerType.RSSecondary, ismaster, server, this.passives);
+ // Set the topology
+ this.topologyType = this.primary ? TopologyType.ReplicaSetWithPrimary : TopologyType.ReplicaSetNoPrimary;
+ if(ismaster.setName) this.setName = ismaster.setName;
+ removeFrom(server, self.unknownServers);
+
+ // Remove primary
+ if(this.primary && this.primary.name == server.name) {
+ server.destroy();
+ this.primary = null;
+ self.emit('left', 'primary', server);
+ }
+
+ self.emit('joined', 'secondary', server);
+ emitTopologyDescriptionChanged(self);
+ return true;
+ }
+
+ //
+ // Remove the primary
+ //
+ if(this.set[server.name] && this.set[server.name].type == ServerType.RSPrimary) {
+ self.emit('left', 'primary', this.primary);
+ this.primary.destroy();
+ this.primary = null;
+ this.topologyType = TopologyType.ReplicaSetNoPrimary;
+ return false;
+ }
+
+ this.topologyType = this.primary ? TopologyType.ReplicaSetWithPrimary : TopologyType.ReplicaSetNoPrimary;
+ return false;
+}
+
+/**
+ * Recalculate single server max staleness
+ * @method
+ */
+ReplSetState.prototype.updateServerMaxStaleness = function(server, haInterval) {
+ // Locate the max secondary lastwrite
+ var max = 0;
+ // Go over all secondaries
+ for(var i = 0; i < this.secondaries.length; i++) {
+ max = Math.max(max, this.secondaries[i].lastWriteDate);
+ }
+
+ // Perform this servers staleness calculation
+ if(server.ismaster.maxWireVersion >= 5
+ && server.ismaster.secondary
+ && this.hasPrimary()) {
+ server.staleness = (server.lastUpdateTime - server.lastWriteDate)
+ - (this.primary.lastUpdateTime - this.primary.lastWriteDate)
+ + haInterval;
+ } else if(server.ismaster.maxWireVersion >= 5
+ && server.ismaster.secondary){
+ server.staleness = max - server.lastWriteDate + haInterval;
+ }
+}
+
+/**
+ * Recalculate all the stalness values for secodaries
+ * @method
+ */
+ReplSetState.prototype.updateSecondariesMaxStaleness = function(haInterval) {
+ for(var i = 0; i < this.secondaries.length; i++) {
+ this.updateServerMaxStaleness(this.secondaries[i], haInterval);
+ }
+}
+
+/**
+ * Pick a server by the passed in ReadPreference
+ * @method
+ * @param {ReadPreference} readPreference The ReadPreference instance to use
+ */
+ReplSetState.prototype.pickServer = function(readPreference) {
+ // If no read Preference set to primary by default
+ readPreference = readPreference || ReadPreference.primary;
+
+ // maxStalenessMS is not allowed with a primary read
+ if(readPreference.preference == 'primary' && readPreference.maxStalenessMS) {
+ return new MongoError('primary readPreference incompatible with maxStalenessMS');
+ }
+
+ // Check if we have any non compatible servers for maxStalenessMS
+ var allservers = this.primary ? [this.primary] : [];
+ allservers = allservers.concat(this.secondaries);
+
+ // Does any of the servers not support the right wire protocol version
+ // for maxStalenessMS when maxStalenessMS specified on readPreference. Then error out
+ if(readPreference.maxStalenessMS) {
+ for(var i = 0; i < allservers.length; i++) {
+ if(allservers[i].ismaster.maxWireVersion < 5) {
+ return new MongoError('maxStalenessMS not supported by at least one of the replicaset members');
+ }
+ }
+ }
+
+ // Do we have the nearest readPreference
+ if(readPreference.preference == 'nearest' && !readPreference.maxStalenessMS) {
+ return pickNearest(this, readPreference);
+ } else if(readPreference.preference == 'nearest' && readPreference.maxStalenessMS) {
+ return pickNearestMaxStalenessMS(this, readPreference);
+ }
+
+ // Get all the secondaries
+ var secondaries = this.secondaries;
+
+ // Check if we can satisfy and of the basic read Preferences
+ if(readPreference.equals(ReadPreference.secondary)
+ && secondaries.length == 0) {
+ return new MongoError("no secondary server available");
+ }
+
+ if(readPreference.equals(ReadPreference.secondaryPreferred)
+ && secondaries.length == 0
+ && this.primary == null) {
+ return new MongoError("no secondary or primary server available");
+ }
+
+ if(readPreference.equals(ReadPreference.primary)
+ && this.primary == null) {
+ return new MongoError("no primary server available");
+ }
+
+ // Secondary preferred or just secondaries
+ if(readPreference.equals(ReadPreference.secondaryPreferred)
+ || readPreference.equals(ReadPreference.secondary)) {
+
+ if(secondaries.length > 0 && !readPreference.maxStalenessMS) {
+ // Pick nearest of any other servers available
+ var server = pickNearest(this, readPreference);
+ // No server in the window return primary
+ if(server) {
+ return server;
+ }
+ } else if(secondaries.length > 0 && readPreference.maxStalenessMS) {
+ // Pick nearest of any other servers available
+ var server = pickNearestMaxStalenessMS(this, readPreference);
+ // No server in the window return primary
+ if(server) {
+ return server;
+ }
+ }
+
+ if(readPreference.equals(ReadPreference.secondaryPreferred)){
+ return this.primary;
+ }
+
+ return null;
+ }
+
+ // Primary preferred
+ if(readPreference.equals(ReadPreference.primaryPreferred)) {
+ var server = null;
+
+ // We prefer the primary if it's available
+ if(this.primary) {
+ return this.primary;
+ }
+
+ // Pick a secondary
+ if(secondaries.length > 0 && !readPreference.maxStalenessMS) {
+ server = pickNearest(this, readPreference);
+ } else if(secondaries.length > 0 && readPreference.maxStalenessMS) {
+ server = pickNearestMaxStalenessMS(this, readPreference);
+ }
+
+ // Did we find a server
+ if(server) return server;
+ }
+
+ // Return the primary
+ return this.primary;
+}
+
+//
+// Filter serves by tags
+var filterByTags = function(readPreference, servers) {
+ if(readPreference.tags == null) return servers;
+ var filteredServers = [];
+ var tagsArray = Array.isArray(readPreference.tags) ? readPreference.tags : [readPreference.tags];
+
+ // Iterate over the tags
+ for(var j = 0; j < tagsArray.length; j++) {
+ var tags = tagsArray[j];
+
+ // Iterate over all the servers
+ for(var i = 0; i < servers.length; i++) {
+ var serverTag = servers[i].lastIsMaster().tags || {};
+
+ // Did we find the a matching server
+ var found = true;
+ // Check if the server is valid
+ for(var name in tags) {
+ if(serverTag[name] != tags[name]) found = false;
+ }
+
+ // Add to candidate list
+ if(found) {
+ filteredServers.push(servers[i]);
+ }
+ }
+
+ // We found servers by the highest priority
+ if(found) break;
+ }
+
+ // Returned filtered servers
+ return filteredServers;
+}
+
+function pickNearestMaxStalenessMS(self, readPreference) {
+ // Only get primary and secondaries as seeds
+ var seeds = {};
+ var servers = [];
+ var heartbeatFrequencyMS = self.heartbeatFrequencyMS;
+
+ // Check if the maxStalenessMS > heartbeatFrequencyMS * 2
+ if(readPreference.maxStalenessMS < (heartbeatFrequencyMS * 2)) {
+ return new MongoError('maxStalenessMS must be at least twice the haInterval');
+ }
+
+ // Add primary to list if not a secondary read preference
+ if(self.primary && readPreference.preference != 'secondary') {
+ servers.push(self.primary);
+ }
+
+ // Add all the secondaries
+ for(var i = 0; i < self.secondaries.length; i++) {
+ servers.push(self.secondaries[i]);
+ }
+
+ // Filter by tags
+ servers = filterByTags(readPreference, servers);
+
+ //
+ // Locate lowest time (picked servers are lowest time + acceptable Latency margin)
+ // var lowest = servers.length > 0 ? servers[0].lastIsMasterMS : 0;
+
+ // Filter by latency
+ servers = servers.filter(function(s) {
+ return s.staleness <= readPreference.maxStalenessMS;
+ });
+
+ // Sort by time
+ servers.sort(function(a, b) {
+ // return a.time > b.time;
+ return a.lastIsMasterMS > b.lastIsMasterMS
+ });
+
+ // No servers, default to primary
+ if(servers.length == 0) {
+ return null
+ }
+
+ // Ensure index does not overflow the number of available servers
+ self.index = self.index % servers.length;
+
+ // Get the server
+ var server = servers[self.index];
+ // Add to the index
+ self.index = self.index + 1;
+ // Return the first server of the sorted and filtered list
+ return server;
+}
+
+function pickNearest(self, readPreference) {
+ // Only get primary and secondaries as seeds
+ var seeds = {};
+ var servers = [];
+
+ // Add primary to list if not a secondary read preference
+ if(self.primary && readPreference.preference != 'secondary') {
+ servers.push(self.primary);
+ }
+
+ // Add all the secondaries
+ for(var i = 0; i < self.secondaries.length; i++) {
+ servers.push(self.secondaries[i]);
+ }
+
+ // Filter by tags
+ servers = filterByTags(readPreference, servers);
+
+ // Sort by time
+ servers.sort(function(a, b) {
+ // return a.time > b.time;
+ return a.lastIsMasterMS > b.lastIsMasterMS
+ });
+
+ // Locate lowest time (picked servers are lowest time + acceptable Latency margin)
+ var lowest = servers.length > 0 ? servers[0].lastIsMasterMS : 0;
+
+ // Filter by latency
+ servers = servers.filter(function(s) {
+ return s.lastIsMasterMS <= lowest + self.acceptableLatency;
+ });
+
+ // No servers, default to primary
+ if(servers.length == 0) {
+ return null
+ }
+
+ // Ensure index does not overflow the number of available servers
+ self.index = self.index % servers.length;
+ // Get the server
+ var server = servers[self.index];
+ // Add to the index
+ self.index = self.index + 1;
+ // Return the first server of the sorted and filtered list
+ return server;
+}
+
+function inList(ismaster, server, list) {
+ for(var i = 0; i < list.length; i++) {
+ if(list[i].name == server.name) return true;
+ }
+
+ return false;
+}
+
+function addToList(self, type, ismaster, server, list) {
+ // Update set information about the server instance
+ self.set[server.name].type = type;
+ self.set[server.name].electionId = ismaster ? ismaster.electionId : ismaster;
+ self.set[server.name].setName = ismaster ? ismaster.setName : ismaster;
+ self.set[server.name].setVersion = ismaster ? ismaster.setVersion : ismaster;
+ // Add to the list
+ list.push(server);
+}
+
+function compareObjectIds(id1, id2) {
+ var a = new Buffer(id1.toHexString(), 'hex');
+ var b = new Buffer(id2.toHexString(), 'hex');
+
+ if(a === b) {
+ return 0;
+ }
+
+ if(typeof Buffer.compare === 'function') {
+ return Buffer.compare(a, b);
+ }
+
+ var x = a.length;
+ var y = b.length;
+ var len = Math.min(x, y);
+
+ for (var i = 0; i < len; i++) {
+ if (a[i] !== b[i]) {
+ break;
+ }
+ }
+
+ if (i !== len) {
+ x = a[i];
+ y = b[i];
+ }
+
+ return x < y ? -1 : y < x ? 1 : 0;
+}
+
+function removeFrom(server, list) {
+ for(var i = 0; i < list.length; i++) {
+ if(list[i].equals && list[i].equals(server)) {
+ list.splice(i, 1);
+ return true;
+ } else if(typeof list[i] == 'string' && list[i] == server.name) {
+ list.splice(i, 1);
+ return true;
+ }
+ }
+
+ return false;
+}
+
+function emitTopologyDescriptionChanged(self) {
+ if(self.listeners('topologyDescriptionChanged').length > 0) {
+ var topology = 'Unknown';
+ var setName = self.setName;
+
+ if(self.hasPrimaryAndSecondary()) {
+ topology = 'ReplicaSetWithPrimary';
+ } else if(!self.hasPrimary() && self.hasSecondary()) {
+ topology = 'ReplicaSetNoPrimary';
+ }
+
+ // Generate description
+ var description = {
+ topologyType: topology,
+ setName: setName,
+ servers: []
+ }
+
+ // Add the primary to the list
+ if(self.hasPrimary()) {
+ var desc = self.primary.getDescription();
+ desc.type = 'RSPrimary';
+ description.servers.push(desc);
+ }
+
+ // Add all the secondaries
+ description.servers = description.servers.concat(self.secondaries.map(function(x) {
+ var description = x.getDescription();
+ description.type = 'RSSecondary';
+ return description;
+ }));
+
+ // Add all the arbiters
+ description.servers = description.servers.concat(self.arbiters.map(function(x) {
+ var description = x.getDescription();
+ description.type = 'RSArbiter';
+ return description;
+ }));
+
+ // Add all the passives
+ description.servers = description.servers.concat(self.passives.map(function(x) {
+ var description = x.getDescription();
+ description.type = 'RSSecondary';
+ return description;
+ }));
+
+ // Create the result
+ var result = {
+ topologyId: self.id,
+ previousDescription: self.replicasetDescription,
+ newDescription: description,
+ diff: diff(self.replicasetDescription, description)
+ };
+
+ // Emit the topologyDescription change
+ self.emit('topologyDescriptionChanged', result);
+
+ // Set the new description
+ self.replicasetDescription = description;
+ }
+}
+
+function diff(previous, current) {
+ // Difference document
+ var diff = {
+ servers: []
+ }
+
+ // Previous entry
+ if(!previous) {
+ previous = { servers: [] };
+ }
+
+ // Got through all the servers
+ for(var i = 0; i < previous.servers.length; i++) {
+ var prevServer = previous.servers[i];
+
+ // Go through all current servers
+ for(var j = 0; j < current.servers.length; j++) {
+ var currServer = current.servers[j];
+
+ // Matching server
+ if(prevServer.address === currServer.address) {
+ // We had a change in state
+ if(prevServer.type != currServer.type) {
+ diff.servers.push({
+ address: prevServer.address,
+ from: prevServer.type,
+ to: currServer.type
+ });
+ }
+ }
+ }
+ }
+
+ // Return difference
+ return diff;
+}
+
+module.exports = ReplSetState;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js
new file mode 100644
index 0000000..266b02f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js
@@ -0,0 +1,842 @@
+"use strict"
+
+var inherits = require('util').inherits,
+ f = require('util').format,
+ EventEmitter = require('events').EventEmitter,
+ BSON = require('bson').native().BSON,
+ ReadPreference = require('./read_preference'),
+ Logger = require('../connection/logger'),
+ debugOptions = require('../connection/utils').debugOptions,
+ Pool = require('../connection/pool'),
+ Query = require('../connection/commands').Query,
+ MongoError = require('../error'),
+ PreTwoSixWireProtocolSupport = require('../wireprotocol/2_4_support'),
+ TwoSixWireProtocolSupport = require('../wireprotocol/2_6_support'),
+ ThreeTwoWireProtocolSupport = require('../wireprotocol/3_2_support'),
+ BasicCursor = require('../cursor'),
+ sdam = require('./shared'),
+ assign = require('./shared').assign,
+ createClientInfo = require('./shared').createClientInfo;
+
+// Used for filtering out fields for loggin
+var debugFields = ['reconnect', 'reconnectTries', 'reconnectInterval', 'emitError', 'cursorFactory', 'host'
+ , 'port', 'size', 'keepAlive', 'keepAliveInitialDelay', 'noDelay', 'connectionTimeout', 'checkServerIdentity'
+ , 'socketTimeout', 'singleBufferSerializtion', 'ssl', 'ca', 'cert', 'key', 'rejectUnauthorized', 'promoteLongs', 'promoteValues'
+ , 'promoteBuffers', 'servername'];
+
+// Server instance id
+var id = 0;
+var serverAccounting = false;
+var servers = {};
+
+/**
+ * Creates a new Server instance
+ * @class
+ * @param {boolean} [options.reconnect=true] Server will attempt to reconnect on loss of connection
+ * @param {number} [options.reconnectTries=30] Server attempt to reconnect #times
+ * @param {number} [options.reconnectInterval=1000] Server will wait # milliseconds between retries
+ * @param {number} [options.monitoring=true] Enable the server state monitoring (calling ismaster at monitoringInterval)
+ * @param {number} [options.monitoringInterval=5000] The interval of calling ismaster when monitoring is enabled.
+ * @param {Cursor} [options.cursorFactory=Cursor] The cursor factory class used for all query cursors
+ * @param {string} options.host The server host
+ * @param {number} options.port The server port
+ * @param {number} [options.size=5] Server connection pool size
+ * @param {boolean} [options.keepAlive=true] TCP Connection keep alive enabled
+ * @param {number} [options.keepAliveInitialDelay=0] Initial delay before TCP keep alive enabled
+ * @param {boolean} [options.noDelay=true] TCP Connection no delay
+ * @param {number} [options.connectionTimeout=0] TCP Connection timeout setting
+ * @param {number} [options.socketTimeout=0] TCP Socket timeout setting
+ * @param {boolean} [options.ssl=false] Use SSL for connection
+ * @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
+ * @param {Buffer} [options.ca] SSL Certificate store binary buffer
+ * @param {Buffer} [options.cert] SSL Certificate binary buffer
+ * @param {Buffer} [options.key] SSL Key file binary buffer
+ * @param {string} [options.passphrase] SSL Certificate pass phrase
+ * @param {boolean} [options.rejectUnauthorized=true] Reject unauthorized server certificates
+ * @param {string} [options.servername=null] String containing the server name requested via TLS SNI.
+ * @param {boolean} [options.promoteLongs=true] Convert Long values from the db into Numbers if they fit into 53 bits
+ * @param {boolean} [options.promoteValues=true] Promotes BSON values to native types where possible, set to false to only receive wrapper types.
+ * @param {boolean} [options.promoteBuffers=false] Promotes Binary BSON values to native Node Buffers.
+ * @param {string} [options.appname=null] Application name, passed in on ismaster call and logged in mongod server logs. Maximum size 128 bytes.
+ * @param {boolean} [options.domainsEnabled=false] Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit.
+ * @return {Server} A cursor instance
+ * @fires Server#connect
+ * @fires Server#close
+ * @fires Server#error
+ * @fires Server#timeout
+ * @fires Server#parseError
+ * @fires Server#reconnect
+ * @fires Server#reconnectFailed
+ * @fires Server#serverHeartbeatStarted
+ * @fires Server#serverHeartbeatSucceeded
+ * @fires Server#serverHeartbeatFailed
+ * @fires Server#topologyOpening
+ * @fires Server#topologyClosed
+ * @fires Server#topologyDescriptionChanged
+ */
+var Server = function(options) {
+ options = options || {};
+
+ // Add event listener
+ EventEmitter.call(this);
+
+ // Server instance id
+ this.id = id++;
+
+ // Reconnect retries
+ var reconnectTries = options.reconnectTries || 30;
+
+ // Internal state
+ this.s = {
+ // Options
+ options: options,
+ // Logger
+ logger: Logger('Server', options),
+ // Factory overrides
+ Cursor: options.cursorFactory || BasicCursor,
+ // BSON instance
+ bson: options.bson || new BSON(),
+ // Pool
+ pool: null,
+ // Disconnect handler
+ disconnectHandler: options.disconnectHandler,
+ // Monitor thread (keeps the connection alive)
+ monitoring: typeof options.monitoring == 'boolean' ? options.monitoring : true,
+ // Is the server in a topology
+ inTopology: typeof options.inTopology == 'boolean' ? options.inTopology : false,
+ // Monitoring timeout
+ monitoringInterval: typeof options.monitoringInterval == 'number'
+ ? options.monitoringInterval
+ : 5000,
+ // Topology id
+ topologyId: -1
+ }
+
+ // Curent ismaster
+ this.ismaster = null;
+ // Current ping time
+ this.lastIsMasterMS = -1;
+ // The monitoringProcessId
+ this.monitoringProcessId = null;
+ // Initial connection
+ this.initalConnect = true;
+ // Wire protocol handler, default to oldest known protocol handler
+ // this gets changed when the first ismaster is called.
+ this.wireProtocolHandler = new PreTwoSixWireProtocolSupport();
+ // Default type
+ this._type = 'server';
+ // Set the client info
+ this.clientInfo = createClientInfo(options);
+
+ // Max Stalleness values
+ // last time we updated the ismaster state
+ this.lastUpdateTime = 0;
+ // Last write time
+ this.lastWriteDate = 0;
+ // Stalleness
+ this.staleness = 0;
+}
+
+inherits(Server, EventEmitter);
+
+Object.defineProperty(Server.prototype, 'type', {
+ enumerable:true, get: function() { return this._type; }
+});
+
+Server.enableServerAccounting = function() {
+ serverAccounting = true;
+ servers = {};
+}
+
+Server.disableServerAccounting = function() {
+ serverAccounting = false;
+}
+
+Server.servers = function() {
+ return servers;
+}
+
+Object.defineProperty(Server.prototype, 'name', {
+ enumerable:true,
+ get: function() { return this.s.options.host + ":" + this.s.options.port; }
+});
+
+function configureWireProtocolHandler(self, ismaster) {
+ // 3.2 wire protocol handler
+ if(ismaster.maxWireVersion >= 4) {
+ return new ThreeTwoWireProtocolSupport(new TwoSixWireProtocolSupport());
+ }
+
+ // 2.6 wire protocol handler
+ if(ismaster.maxWireVersion >= 2) {
+ return new TwoSixWireProtocolSupport();
+ }
+
+ // 2.4 or earlier wire protocol handler
+ return new PreTwoSixWireProtocolSupport();
+}
+
+function disconnectHandler(self, type, ns, cmd, options, callback) {
+ // Topology is not connected, save the call in the provided store to be
+ // Executed at some point when the handler deems it's reconnected
+ if(!self.s.pool.isConnected() && self.s.disconnectHandler != null && !options.monitoring) {
+ self.s.disconnectHandler.add(type, ns, cmd, options, callback);
+ return true;
+ }
+
+ // If we have no connection error
+ if(!self.s.pool.isConnected()) {
+ callback(MongoError.create(f("no connection available to server %s", self.name)));
+ return true;
+ }
+}
+
+function monitoringProcess(self) {
+ return function() {
+ // Pool was destroyed do not continue process
+ if(self.s.pool.isDestroyed()) return;
+ // Emit monitoring Process event
+ self.emit('monitoring', self);
+ // Perform ismaster call
+ // Query options
+ var queryOptions = { numberToSkip: 0, numberToReturn: -1, checkKeys: false, slaveOk: true };
+ // Create a query instance
+ var query = new Query(self.s.bson, 'admin.$cmd', {ismaster:true}, queryOptions);
+ // Get start time
+ var start = new Date().getTime();
+ // Execute the ismaster query
+ self.s.pool.write(query, function(err, result) {
+ // Set initial lastIsMasterMS
+ self.lastIsMasterMS = new Date().getTime() - start;
+ if(self.s.pool.isDestroyed()) return;
+ // Update the ismaster view if we have a result
+ if(result) {
+ self.ismaster = result.result;
+ }
+ // Re-schedule the monitoring process
+ self.monitoringProcessId = setTimeout(monitoringProcess(self), self.s.monitoringInterval);
+ });
+ }
+}
+
+var eventHandler = function(self, event) {
+ return function(err) {
+ // Log information of received information if in info mode
+ if(self.s.logger.isInfo()) {
+ var object = err instanceof MongoError ? JSON.stringify(err) : {}
+ self.s.logger.info(f('server %s fired event %s out with message %s'
+ , self.name, event, object));
+ }
+
+ // Handle connect event
+ if(event == 'connect') {
+ // Issue an ismaster command at connect
+ // Query options
+ var queryOptions = { numberToSkip: 0, numberToReturn: -1, checkKeys: false, slaveOk: true };
+ // Create a query instance
+ var query = new Query(self.s.bson, 'admin.$cmd', {ismaster:true, client: self.clientInfo}, queryOptions);
+ // Get start time
+ var start = new Date().getTime();
+ // Execute the ismaster query
+ self.s.pool.write(query, function(err, result) {
+ // Set initial lastIsMasterMS
+ self.lastIsMasterMS = new Date().getTime() - start;
+ if(err) {
+ self.destroy();
+ if(self.listeners('error').length > 0) self.emit('error', err);
+ return;
+ }
+
+ // Ensure no error emitted after initial connect when reconnecting
+ self.initalConnect = false;
+ // Save the ismaster
+ self.ismaster = result.result;
+
+ // It's a proxy change the type so
+ // the wireprotocol will send $readPreference
+ if(self.ismaster.msg == 'isdbgrid') {
+ self._type = 'mongos';
+ }
+ // Add the correct wire protocol handler
+ self.wireProtocolHandler = configureWireProtocolHandler(self, self.ismaster);
+ // Have we defined self monitoring
+ if(self.s.monitoring) {
+ self.monitoringProcessId = setTimeout(monitoringProcess(self), self.s.monitoringInterval);
+ }
+
+ // Emit server description changed if something listening
+ sdam.emitServerDescriptionChanged(self, {
+ address: self.name, arbiters: [], hosts: [], passives: [], type: !self.s.inTopology ? 'Standalone' : sdam.getTopologyType(self)
+ });
+
+ // Emit topology description changed if something listening
+ sdam.emitTopologyDescriptionChanged(self, {
+ topologyType: 'Single', servers: [{address: self.name, arbiters: [], hosts: [], passives: [], type: 'Standalone'}]
+ });
+
+ // Log the ismaster if available
+ if(self.s.logger.isInfo()) {
+ self.s.logger.info(f('server %s connected with ismaster [%s]', self.name, JSON.stringify(self.ismaster)));
+ }
+
+ // Emit connect
+ self.emit('connect', self);
+ });
+ } else if(event == 'error' || event == 'parseError'
+ || event == 'close' || event == 'timeout' || event == 'reconnect'
+ || event == 'attemptReconnect' || 'reconnectFailed') {
+
+ // Remove server instance from accounting
+ if(serverAccounting && ['close', 'timeout', 'error', 'parseError', 'reconnectFailed'].indexOf(event) != -1) {
+ // Emit toplogy opening event if not in topology
+ if(!self.s.inTopology) {
+ self.emit('topologyOpening', { topologyId: self.id });
+ }
+
+ delete servers[self.id];
+ }
+
+ // Reconnect failed return error
+ if(event == 'reconnectFailed') {
+ self.emit('reconnectFailed', err);
+ // Emit error if any listeners
+ if(self.listeners('error').length > 0) {
+ self.emit('error', err);
+ }
+ // Terminate
+ return;
+ }
+
+ // On first connect fail
+ if(self.s.pool.state == 'disconnected' && self.initalConnect && ['close', 'timeout', 'error', 'parseError'].indexOf(event) != -1) {
+ self.initalConnect = false;
+ return self.emit('error', new MongoError(f('failed to connect to server [%s] on first connect', self.name)));
+ }
+
+ // Reconnect event, emit the server
+ if(event == 'reconnect') {
+ return self.emit(event, self);
+ }
+
+ // Emit the event
+ self.emit(event, err);
+ }
+ }
+}
+
+/**
+ * Initiate server connect
+ * @method
+ * @param {array} [options.auth=null] Array of auth options to apply on connect
+ */
+Server.prototype.connect = function(options) {
+ var self = this;
+ options = options || {};
+
+ // Set the connections
+ if(serverAccounting) servers[this.id] = this;
+
+ // Do not allow connect to be called on anything that's not disconnected
+ if(self.s.pool && !self.s.pool.isDisconnected() && !self.s.pool.isDestroyed()) {
+ throw MongoError.create(f('server instance in invalid state %s', self.s.state));
+ }
+
+ // Create a pool
+ self.s.pool = new Pool(assign(self.s.options, options, {bson: this.s.bson}));
+
+ // Set up listeners
+ self.s.pool.on('close', eventHandler(self, 'close'));
+ self.s.pool.on('error', eventHandler(self, 'error'));
+ self.s.pool.on('timeout', eventHandler(self, 'timeout'));
+ self.s.pool.on('parseError', eventHandler(self, 'parseError'));
+ self.s.pool.on('connect', eventHandler(self, 'connect'));
+ self.s.pool.on('reconnect', eventHandler(self, 'reconnect'));
+ self.s.pool.on('reconnectFailed', eventHandler(self, 'reconnectFailed'));
+
+ // Emit toplogy opening event if not in topology
+ if(!self.s.inTopology) {
+ this.emit('topologyOpening', { topologyId: self.id });
+ }
+
+ // Emit opening server event
+ self.emit('serverOpening', {
+ topologyId: self.s.topologyId != -1 ? self.s.topologyId : self.id,
+ address: self.name
+ });
+
+ // Connect with optional auth settings
+ if(options.auth) {
+ self.s.pool.connect.apply(self.s.pool, options.auth);
+ } else {
+ self.s.pool.connect();
+ }
+}
+
+/**
+ * Get the server description
+ * @method
+ * @return {object}
+*/
+Server.prototype.getDescription = function() {
+ var ismaster = this.ismaster || {};
+ var description = {
+ type: sdam.getTopologyType(this),
+ address: this.name,
+ };
+
+ // Add fields if available
+ if(ismaster.hosts) description.hosts = ismaster.hosts;
+ if(ismaster.arbiters) description.arbiters = ismaster.arbiters;
+ if(ismaster.passives) description.passives = ismaster.passives;
+ if(ismaster.setName) description.setName = ismaster.setName;
+ return description;
+}
+
+/**
+ * Returns the last known ismaster document for this server
+ * @method
+ * @return {object}
+ */
+Server.prototype.lastIsMaster = function() {
+ return this.ismaster;
+}
+
+/**
+ * Unref all connections belong to this server
+ * @method
+ */
+Server.prototype.unref = function() {
+ this.s.pool.unref();
+}
+
+/**
+ * Figure out if the server is connected
+ * @method
+ * @return {boolean}
+ */
+Server.prototype.isConnected = function() {
+ if(!this.s.pool) return false;
+ return this.s.pool.isConnected();
+}
+
+/**
+ * Figure out if the server instance was destroyed by calling destroy
+ * @method
+ * @return {boolean}
+ */
+Server.prototype.isDestroyed = function() {
+ if(!this.s.pool) return false;
+ return this.s.pool.isDestroyed();
+}
+
+function basicWriteValidations(self, options) {
+ if(!self.s.pool) return MongoError.create('server instance is not connected');
+ if(self.s.pool.isDestroyed()) return MongoError.create('server instance pool was destroyed');
+}
+
+function basicReadValidations(self, options) {
+ basicWriteValidations(self, options);
+
+ if(options.readPreference && !(options.readPreference instanceof ReadPreference)) {
+ throw new Error("readPreference must be an instance of ReadPreference");
+ }
+}
+
+/**
+ * Execute a command
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {object} cmd The command hash
+ * @param {ReadPreference} [options.readPreference] Specify read preference if command supports it
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {Boolean} [options.fullResult=false] Return the full envelope instead of just the result document.
+ * @param {opResultCallback} callback A callback function
+ */
+Server.prototype.command = function(ns, cmd, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ var result = basicReadValidations(self, options);
+ if(result) return callback(result);
+
+ // Debug log
+ if(self.s.logger.isDebug()) self.s.logger.debug(f('executing command [%s] against %s', JSON.stringify({
+ ns: ns, cmd: cmd, options: debugOptions(debugFields, options)
+ }), self.name));
+
+ // If we are not connected or have a disconnectHandler specified
+ if(disconnectHandler(self, 'command', ns, cmd, options, callback)) return;
+
+ // Check if we have collation support
+ if(this.ismaster && this.ismaster.maxWireVersion < 5 && cmd.collation) {
+ return callback(new MongoError(f('server %s does not support collation', this.name)));
+ }
+
+ // Query options
+ var queryOptions = {
+ numberToSkip: 0,
+ numberToReturn: -1,
+ checkKeys: typeof options.checkKeys == 'boolean' ? options.checkKeys: false,
+ serializeFunctions: typeof options.serializeFunctions == 'boolean' ? options.serializeFunctions : false,
+ ignoreUndefined: typeof options.ignoreUndefined == 'boolean' ? options.ignoreUndefined : false
+ };
+
+ // Create a query instance
+ var query = new Query(self.s.bson, ns, cmd, queryOptions);
+ // Set slave OK of the query
+ query.slaveOk = options.readPreference ? options.readPreference.slaveOk() : false;
+
+ // Write options
+ var writeOptions = {
+ raw: typeof options.raw == 'boolean' ? options.raw : false,
+ promoteLongs: typeof options.promoteLongs == 'boolean' ? options.promoteLongs : true,
+ promoteValues: typeof options.promoteValues == 'boolean' ? options.promoteValues : true,
+ promoteBuffers: typeof options.promoteBuffers == 'boolean' ? options.promoteBuffers : false,
+ command: true,
+ monitoring: typeof options.monitoring == 'boolean' ? options.monitoring : false,
+ fullResult: typeof options.fullResult == 'boolean' ? options.fullResult : false,
+ requestId: query.requestId
+ };
+
+ // Write the operation to the pool
+ self.s.pool.write(query, writeOptions, callback);
+}
+
+/**
+ * Insert one or more documents
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {array} ops An array of documents to insert
+ * @param {boolean} [options.ordered=true] Execute in order or out of order
+ * @param {object} [options.writeConcern={}] Write concern for the operation
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+Server.prototype.insert = function(ns, ops, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ var result = basicWriteValidations(self, options);
+ if(result) return callback(result);
+
+ // If we are not connected or have a disconnectHandler specified
+ if(disconnectHandler(self, 'insert', ns, ops, options, callback)) return;
+
+ // Setup the docs as an array
+ ops = Array.isArray(ops) ? ops : [ops];
+
+ // Execute write
+ return self.wireProtocolHandler.insert(self.s.pool, self.ismaster, ns, self.s.bson, ops, options, callback);
+}
+
+/**
+ * Perform one or more update operations
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {array} ops An array of updates
+ * @param {boolean} [options.ordered=true] Execute in order or out of order
+ * @param {object} [options.writeConcern={}] Write concern for the operation
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+Server.prototype.update = function(ns, ops, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ var result = basicWriteValidations(self, options);
+ if(result) return callback(result);
+
+ // If we are not connected or have a disconnectHandler specified
+ if(disconnectHandler(self, 'update', ns, ops, options, callback)) return;
+
+ // Check if we have collation support
+ if(this.ismaster && this.ismaster.maxWireVersion < 5 && options.collation) {
+ return callback(new MongoError(f('server %s does not support collation', this.name)));
+ }
+
+ // Setup the docs as an array
+ ops = Array.isArray(ops) ? ops : [ops];
+ // Execute write
+ return self.wireProtocolHandler.update(self.s.pool, self.ismaster, ns, self.s.bson, ops, options, callback);
+}
+
+/**
+ * Perform one or more remove operations
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {array} ops An array of removes
+ * @param {boolean} [options.ordered=true] Execute in order or out of order
+ * @param {object} [options.writeConcern={}] Write concern for the operation
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+Server.prototype.remove = function(ns, ops, options, callback) {
+ var self = this;
+ if(typeof options == 'function') callback = options, options = {}, options = options || {};
+ var result = basicWriteValidations(self, options);
+ if(result) return callback(result);
+
+ // If we are not connected or have a disconnectHandler specified
+ if(disconnectHandler(self, 'remove', ns, ops, options, callback)) return;
+
+ // Check if we have collation support
+ if(this.ismaster && this.ismaster.maxWireVersion < 5 && options.collation) {
+ return callback(new MongoError(f('server %s does not support collation', this.name)));
+ }
+
+ // Setup the docs as an array
+ ops = Array.isArray(ops) ? ops : [ops];
+ // Execute write
+ return self.wireProtocolHandler.remove(self.s.pool, self.ismaster, ns, self.s.bson, ops, options, callback);
+}
+
+/**
+ * Get a new cursor
+ * @method
+ * @param {string} ns The MongoDB fully qualified namespace (ex: db1.collection1)
+ * @param {{object}|{Long}} cmd Can be either a command returning a cursor or a cursorId
+ * @param {object} [options.batchSize=0] Batchsize for the operation
+ * @param {array} [options.documents=[]] Initial documents list for cursor
+ * @param {ReadPreference} [options.readPreference] Specify read preference if command supports it
+ * @param {Boolean} [options.serializeFunctions=false] Specify if functions on an object should be serialized.
+ * @param {Boolean} [options.ignoreUndefined=false] Specify if the BSON serializer should ignore undefined fields.
+ * @param {opResultCallback} callback A callback function
+ */
+Server.prototype.cursor = function(ns, cmd, cursorOptions) {
+ var s = this.s;
+ cursorOptions = cursorOptions || {};
+ // Set up final cursor type
+ var FinalCursor = cursorOptions.cursorFactory || s.Cursor;
+ // Return the cursor
+ return new FinalCursor(s.bson, ns, cmd, cursorOptions, this, s.options);
+}
+
+/**
+ * Logout from a database
+ * @method
+ * @param {string} db The db we are logging out from
+ * @param {authResultCallback} callback A callback function
+ */
+Server.prototype.logout = function(dbName, callback) {
+ this.s.pool.logout(dbName, callback);
+}
+
+/**
+ * Authenticate using a specified mechanism
+ * @method
+ * @param {string} mechanism The Auth mechanism we are invoking
+ * @param {string} db The db we are invoking the mechanism against
+ * @param {...object} param Parameters for the specific mechanism
+ * @param {authResultCallback} callback A callback function
+ */
+Server.prototype.auth = function(mechanism, db) {
+ var self = this;
+
+ // If we have the default mechanism we pick mechanism based on the wire
+ // protocol max version. If it's >= 3 then scram-sha1 otherwise mongodb-cr
+ if(mechanism == 'default' && self.ismaster && self.ismaster.maxWireVersion >= 3) {
+ mechanism = 'scram-sha-1';
+ } else if(mechanism == 'default') {
+ mechanism = 'mongocr';
+ }
+
+ // Slice all the arguments off
+ var args = Array.prototype.slice.call(arguments, 0);
+ // Set the mechanism
+ args[0] = mechanism;
+ // Get the callback
+ var callback = args[args.length - 1];
+
+ // If we are not connected or have a disconnectHandler specified
+ if(disconnectHandler(self, 'auth', db, args, {}, callback)) {
+ return;
+ }
+
+ // Do not authenticate if we are an arbiter
+ if(this.lastIsMaster() && this.lastIsMaster().arbiterOnly) {
+ return callback(null, true);
+ }
+
+ // Apply the arguments to the pool
+ self.s.pool.auth.apply(self.s.pool, args);
+}
+
+/**
+ * Compare two server instances
+ * @method
+ * @param {Server} server Server to compare equality against
+ * @return {boolean}
+ */
+Server.prototype.equals = function(server) {
+ if(typeof server == 'string') return this.name == server;
+ if(server.name) return this.name == server.name;
+ return false;
+}
+
+/**
+ * All raw connections
+ * @method
+ * @return {Connection[]}
+ */
+Server.prototype.connections = function() {
+ return this.s.pool.allConnections();
+}
+
+/**
+ * Get server
+ * @method
+ * @return {Server}
+ */
+Server.prototype.getServer = function() {
+ return this;
+}
+
+/**
+ * Get connection
+ * @method
+ * @return {Connection}
+ */
+Server.prototype.getConnection = function() {
+ return this.s.pool.get();
+}
+
+var listeners = ['close', 'error', 'timeout', 'parseError', 'connect'];
+
+/**
+ * Destroy the server connection
+ * @method
+ * @param {boolean} [options.emitClose=false] Emit close event on destroy
+ * @param {boolean} [options.emitDestroy=false] Emit destroy event on destroy
+ * @param {boolean} [options.force=false] Force destroy the pool
+ */
+Server.prototype.destroy = function(options) {
+ options = options || {};
+ var self = this;
+
+ // Set the connections
+ if(serverAccounting) delete servers[this.id];
+
+ // Destroy the monitoring process if any
+ if(this.monitoringProcessId) {
+ clearTimeout(this.monitoringProcessId);
+ }
+
+ // Emit close event
+ if(options.emitClose) {
+ self.emit('close', self);
+ }
+
+ // Emit destroy event
+ if(options.emitDestroy) {
+ self.emit('destroy', self);
+ }
+
+ // Remove all listeners
+ listeners.forEach(function(event) {
+ self.s.pool.removeAllListeners(event);
+ });
+
+ // Emit opening server event
+ if(self.listeners('serverClosed').length > 0) self.emit('serverClosed', {
+ topologyId: self.s.topologyId != -1 ? self.s.topologyId : self.id, address: self.name
+ });
+
+ // Emit toplogy opening event if not in topology
+ if(self.listeners('topologyClosed').length > 0 && !self.s.inTopology) {
+ self.emit('topologyClosed', { topologyId: self.id });
+ }
+
+ if(self.s.logger.isDebug()) {
+ self.s.logger.debug(f('destroy called on server %s', self.name));
+ }
+
+ // Destroy the pool
+ this.s.pool.destroy(options.force);
+}
+
+/**
+ * A server connect event, used to verify that the connection is up and running
+ *
+ * @event Server#connect
+ * @type {Server}
+ */
+
+/**
+ * A server reconnect event, used to verify that the server topology has reconnected
+ *
+ * @event Server#reconnect
+ * @type {Server}
+ */
+
+/**
+ * A server opening SDAM monitoring event
+ *
+ * @event Server#serverOpening
+ * @type {object}
+ */
+
+/**
+ * A server closed SDAM monitoring event
+ *
+ * @event Server#serverClosed
+ * @type {object}
+ */
+
+/**
+ * A server description SDAM change monitoring event
+ *
+ * @event Server#serverDescriptionChanged
+ * @type {object}
+ */
+
+/**
+ * A topology open SDAM event
+ *
+ * @event Server#topologyOpening
+ * @type {object}
+ */
+
+/**
+ * A topology closed SDAM event
+ *
+ * @event Server#topologyClosed
+ * @type {object}
+ */
+
+/**
+ * A topology structure SDAM change event
+ *
+ * @event Server#topologyDescriptionChanged
+ * @type {object}
+ */
+
+/**
+ * Server reconnect failed
+ *
+ * @event Server#reconnectFailed
+ * @type {Error}
+ */
+
+/**
+ * Server connection pool closed
+ *
+ * @event Server#close
+ * @type {object}
+ */
+
+/**
+ * Server connection pool caused an error
+ *
+ * @event Server#error
+ * @type {Error}
+ */
+
+/**
+ * Server destroyed was called
+ *
+ * @event Server#destroy
+ * @type {Server}
+ */
+
+module.exports = Server;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/shared.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/shared.js
new file mode 100644
index 0000000..8506255
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/shared.js
@@ -0,0 +1,225 @@
+"use strict"
+
+var os = require('os'),
+ f = require('util').format;
+
+/**
+ * Emit event if it exists
+ * @method
+ */
+function emitSDAMEvent(self, event, description) {
+ if(self.listeners(event).length > 0) {
+ self.emit(event, description);
+ }
+}
+
+// Get package.json variable
+var driverVersion = require(__dirname + '/../../package.json').version;
+var nodejsversion = f('Node.js %s, %s', process.version, os.endianness());
+var type = os.type();
+var name = process.platform;
+var architecture = process.arch;
+var release = os.release();
+
+function createClientInfo(options) {
+ // Build default client information
+ var clientInfo = options.clientInfo ? clone(options.clientInfo) : {
+ driver: {
+ name: "nodejs-core",
+ version: driverVersion
+ },
+ os: {
+ type: type,
+ name: name,
+ architecture: architecture,
+ version: release
+ }
+ }
+
+ // Is platform specified
+ if(clientInfo.platform && clientInfo.platform.indexOf('mongodb-core') == -1) {
+ clientInfo.platform = f('%s, mongodb-core: %s', clientInfo.platform, driverVersion);
+ } else if(!clientInfo.platform){
+ clientInfo.platform = nodejsversion;
+ }
+
+ // Do we have an application specific string
+ if(options.appname) {
+ // Cut at 128 bytes
+ var buffer = new Buffer(options.appname);
+ // Return the truncated appname
+ var appname = buffer.length > 128 ? buffer.slice(0, 128).toString('utf8') : options.appname;
+ // Add to the clientInfo
+ clientInfo.application = { name: appname };
+ }
+
+ return clientInfo;
+}
+
+function clone(object) {
+ return JSON.parse(JSON.stringify(object));
+}
+
+var getPreviousDescription = function(self) {
+ if(!self.s.serverDescription) {
+ self.s.serverDescription = {
+ address: self.name,
+ arbiters: [], hosts: [], passives: [], type: 'Unknown'
+ }
+ }
+
+ return self.s.serverDescription;
+}
+
+var emitServerDescriptionChanged = function(self, description) {
+ if(self.listeners('serverDescriptionChanged').length > 0) {
+ // Emit the server description changed events
+ self.emit('serverDescriptionChanged', {
+ topologyId: self.s.topologyId != -1 ? self.s.topologyId : self.id, address: self.name,
+ previousDescription: getPreviousDescription(self),
+ newDescription: description
+ });
+
+ self.s.serverDescription = description;
+ }
+}
+
+var getPreviousTopologyDescription = function(self) {
+ if(!self.s.topologyDescription) {
+ self.s.topologyDescription = {
+ topologyType: 'Unknown',
+ servers: [{
+ address: self.name, arbiters: [], hosts: [], passives: [], type: 'Unknown'
+ }]
+ }
+ }
+
+ return self.s.topologyDescription;
+}
+
+var emitTopologyDescriptionChanged = function(self, description) {
+ if(self.listeners('topologyDescriptionChanged').length > 0) {
+ // Emit the server description changed events
+ self.emit('topologyDescriptionChanged', {
+ topologyId: self.s.topologyId != -1 ? self.s.topologyId : self.id, address: self.name,
+ previousDescription: getPreviousTopologyDescription(self),
+ newDescription: description
+ });
+
+ self.s.serverDescription = description;
+ }
+}
+
+var changedIsMaster = function(self, currentIsmaster, ismaster) {
+ var currentType = getTopologyType(self, currentIsmaster);
+ var newType = getTopologyType(self, ismaster);
+ if(newType != currentType) return true;
+ return false;
+}
+
+var getTopologyType = function(self, ismaster) {
+ if(!ismaster) {
+ ismaster = self.ismaster;
+ }
+
+ if(!ismaster) return 'Unknown';
+ if(ismaster.ismaster && !ismaster.hosts) return 'Standalone';
+ if(ismaster.ismaster && ismaster.msg == 'isdbgrid') return 'Mongos';
+ if(ismaster.ismaster) return 'RSPrimary';
+ if(ismaster.secondary) return 'RSSecondary';
+ if(ismaster.arbiterOnly) return 'RSArbiter';
+ return 'Unknown';
+}
+
+var inquireServerState = function(self) {
+ return function(callback) {
+ if(self.s.state == 'destroyed') return;
+ // Record response time
+ var start = new Date().getTime();
+
+ // emitSDAMEvent
+ emitSDAMEvent(self, 'serverHeartbeatStarted', { connectionId: self.name });
+
+ // Attempt to execute ismaster command
+ self.command('admin.$cmd', { ismaster:true }, { monitoring:true }, function(err, r) {
+ if(!err) {
+ // Legacy event sender
+ self.emit('ismaster', r, self);
+
+ // Calculate latencyMS
+ var latencyMS = new Date().getTime() - start;
+
+ // Server heart beat event
+ emitSDAMEvent(self, 'serverHeartbeatSucceeded', { durationMS: latencyMS, reply: r.result, connectionId: self.name });
+
+ // Did the server change
+ if(changedIsMaster(self, self.s.ismaster, r.result)) {
+ // Emit server description changed if something listening
+ emitServerDescriptionChanged(self, {
+ address: self.name, arbiters: [], hosts: [], passives: [], type: !self.s.inTopology ? 'Standalone' : getTopologyType(self)
+ });
+ }
+
+ // Updat ismaster view
+ self.s.ismaster = r.result;
+
+ // Set server response time
+ self.s.isMasterLatencyMS = latencyMS;
+ } else {
+ emitSDAMEvent(self, 'serverHeartbeatFailed', { durationMS: latencyMS, failure: err, connectionId: self.name });
+ }
+
+ // Peforming an ismaster monitoring callback operation
+ if(typeof callback == 'function') {
+ return callback(err, r);
+ }
+
+ // Perform another sweep
+ self.s.inquireServerStateTimeout = setTimeout(inquireServerState(self), self.s.haInterval);
+ });
+ };
+}
+
+// Object.assign method or polyfille
+var assign = Object.assign ? Object.assign : function assign(target, firstSource) {
+ if (target === undefined || target === null) {
+ throw new TypeError('Cannot convert first argument to object');
+ }
+
+ var to = Object(target);
+ for (var i = 1; i < arguments.length; i++) {
+ var nextSource = arguments[i];
+ if (nextSource === undefined || nextSource === null) {
+ continue;
+ }
+
+ var keysArray = Object.keys(Object(nextSource));
+ for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
+ var nextKey = keysArray[nextIndex];
+ var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
+ if (desc !== undefined && desc.enumerable) {
+ to[nextKey] = nextSource[nextKey];
+ }
+ }
+ }
+ return to;
+}
+
+//
+// Clone the options
+var cloneOptions = function(options) {
+ var opts = {};
+ for(var name in options) {
+ opts[name] = options[name];
+ }
+ return opts;
+}
+
+module.exports.inquireServerState = inquireServerState
+module.exports.getTopologyType = getTopologyType;
+module.exports.emitServerDescriptionChanged = emitServerDescriptionChanged;
+module.exports.emitTopologyDescriptionChanged = emitTopologyDescriptionChanged;
+module.exports.cloneOptions = cloneOptions;
+module.exports.assign = assign;
+module.exports.createClientInfo = createClientInfo;
+module.exports.clone = clone;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/2_4_support.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/2_4_support.js
new file mode 100644
index 0000000..abfeb97
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/2_4_support.js
@@ -0,0 +1,569 @@
+"use strict";
+
+var Insert = require('./commands').Insert
+ , Update = require('./commands').Update
+ , Remove = require('./commands').Remove
+ , Query = require('../connection/commands').Query
+ , copy = require('../connection/utils').copy
+ , KillCursor = require('../connection/commands').KillCursor
+ , GetMore = require('../connection/commands').GetMore
+ , Query = require('../connection/commands').Query
+ , ReadPreference = require('../topologies/read_preference')
+ , f = require('util').format
+ , CommandResult = require('../connection/command_result')
+ , MongoError = require('../error')
+ , Long = require('bson').Long
+ , getReadPreference = require('./shared').getReadPreference;
+
+// Write concern fields
+var writeConcernFields = ['w', 'wtimeout', 'j', 'fsync'];
+
+var WireProtocol = function() {}
+
+//
+// Needs to support legacy mass insert as well as ordered/unordered legacy
+// emulation
+//
+WireProtocol.prototype.insert = function(pool, ismaster, ns, bson, ops, options, callback) {
+ options = options || {};
+ // Default is ordered execution
+ var ordered = typeof options.ordered == 'boolean' ? options.ordered : true;
+ var legacy = typeof options.legacy == 'boolean' ? options.legacy : false;
+ ops = Array.isArray(ops) ? ops :[ops];
+
+ // If we have more than a 1000 ops fails
+ if(ops.length > 1000) return callback(new MongoError("exceeded maximum write batch size of 1000"));
+
+ // Write concern
+ var writeConcern = options.writeConcern || {w:1};
+
+ // We are unordered
+ if(!ordered || writeConcern.w == 0) {
+ return executeUnordered('insert', Insert, ismaster, ns, bson, pool, ops, options, callback);
+ }
+
+ return executeOrdered('insert', Insert, ismaster, ns, bson, pool, ops, options, callback);
+}
+
+WireProtocol.prototype.update = function(pool, ismaster, ns, bson, ops, options, callback) {
+ options = options || {};
+ // Default is ordered execution
+ var ordered = typeof options.ordered == 'boolean' ? options.ordered : true;
+ ops = Array.isArray(ops) ? ops :[ops];
+
+ // Write concern
+ var writeConcern = options.writeConcern || {w:1};
+
+ // We are unordered
+ if(!ordered || writeConcern.w == 0) {
+ return executeUnordered('update', Update, ismaster, ns, bson, pool, ops, options, callback);
+ }
+
+ return executeOrdered('update', Update, ismaster, ns, bson, pool, ops, options, callback);
+}
+
+WireProtocol.prototype.remove = function(pool, ismaster, ns, bson, ops, options, callback) {
+ options = options || {};
+ // Default is ordered execution
+ var ordered = typeof options.ordered == 'boolean' ? options.ordered : true;
+ ops = Array.isArray(ops) ? ops :[ops];
+
+ // Write concern
+ var writeConcern = options.writeConcern || {w:1};
+
+ // We are unordered
+ if(!ordered || writeConcern.w == 0) {
+ return executeUnordered('remove', Remove, ismaster, ns, bson, pool, ops, options, callback);
+ }
+
+ return executeOrdered('remove', Remove, ismaster, ns, bson, pool, ops, options, callback);
+}
+
+WireProtocol.prototype.killCursor = function(bson, ns, cursorId, pool, callback) {
+ // Create a kill cursor command
+ var killCursor = new KillCursor(bson, [cursorId]);
+ // Execute the kill cursor command
+ if(pool && pool.isConnected()) {
+ pool.write(killCursor, {
+ immediateRelease:true, noResponse: true
+ });
+ }
+
+ // Callback
+ if(typeof callback == 'function') callback(null, null);
+}
+
+WireProtocol.prototype.getMore = function(bson, ns, cursorState, batchSize, raw, connection, options, callback) {
+ // Create getMore command
+ var getMore = new GetMore(bson, ns, cursorState.cursorId, {numberToReturn: batchSize});
+
+ // Query callback
+ var queryCallback = function(err, result) {
+ if(err) return callback(err);
+ // Get the raw message
+ var r = result.message;
+
+ // If we have a timed out query or a cursor that was killed
+ if((r.responseFlags & (1 << 0)) != 0) {
+ return callback(new MongoError("cursor does not exist, was killed or timed out"), null);
+ }
+
+ // Ensure we have a Long valie cursor id
+ var cursorId = typeof r.cursorId == 'number'
+ ? Long.fromNumber(r.cursorId)
+ : r.cursorId;
+
+ // Set all the values
+ cursorState.documents = r.documents;
+ cursorState.cursorId = cursorId;
+
+ // Return
+ callback(null, null, r.connection);
+ }
+
+ // If we have a raw query decorate the function
+ if(raw) {
+ queryCallback.raw = raw;
+ }
+
+ // Check if we need to promote longs
+ if(typeof cursorState.promoteLongs == 'boolean') {
+ queryCallback.promoteLongs = cursorState.promoteLongs;
+ }
+
+ if(typeof cursorState.promoteValues == 'boolean') {
+ queryCallback.promoteValues = cursorState.promoteValues;
+ }
+
+ if(typeof cursorState.promoteBuffers == 'boolean') {
+ queryCallback.promoteBuffers = cursorState.promoteBuffers;
+ }
+
+ // Write out the getMore command
+ connection.write(getMore, queryCallback);
+}
+
+WireProtocol.prototype.command = function(bson, ns, cmd, cursorState, topology, options) {
+ // Establish type of command
+ if(cmd.find) {
+ return setupClassicFind(bson, ns, cmd, cursorState, topology, options)
+ } else if(cursorState.cursorId != null) {
+ } else if(cmd) {
+ return setupCommand(bson, ns, cmd, cursorState, topology, options);
+ } else {
+ throw new MongoError(f("command %s does not return a cursor", JSON.stringify(cmd)));
+ }
+}
+
+//
+// Execute a find command
+var setupClassicFind = function(bson, ns, cmd, cursorState, topology, options) {
+ // Ensure we have at least some options
+ options = options || {};
+ // Get the readPreference
+ var readPreference = getReadPreference(cmd, options);
+ // Set the optional batchSize
+ cursorState.batchSize = cmd.batchSize || cursorState.batchSize;
+ var numberToReturn = 0;
+
+ // Unpack the limit and batchSize values
+ if(cursorState.limit == 0) {
+ numberToReturn = cursorState.batchSize;
+ } else if(cursorState.limit < 0 || cursorState.limit < cursorState.batchSize || (cursorState.limit > 0 && cursorState.batchSize == 0)) {
+ numberToReturn = cursorState.limit;
+ } else {
+ numberToReturn = cursorState.batchSize;
+ }
+
+ var numberToSkip = cursorState.skip || 0;
+ // Build actual find command
+ var findCmd = {};
+ // Using special modifier
+ var usesSpecialModifier = false;
+
+ // We have a Mongos topology, check if we need to add a readPreference
+ if(topology.type == 'mongos' && readPreference) {
+ findCmd['$readPreference'] = readPreference.toJSON();
+ usesSpecialModifier = true;
+ }
+
+ // Add special modifiers to the query
+ if(cmd.sort) findCmd['orderby'] = cmd.sort, usesSpecialModifier = true;
+ if(cmd.hint) findCmd['$hint'] = cmd.hint, usesSpecialModifier = true;
+ if(cmd.snapshot) findCmd['$snapshot'] = cmd.snapshot, usesSpecialModifier = true;
+ if(cmd.returnKey) findCmd['$returnKey'] = cmd.returnKey, usesSpecialModifier = true;
+ if(cmd.maxScan) findCmd['$maxScan'] = cmd.maxScan, usesSpecialModifier = true;
+ if(cmd.min) findCmd['$min'] = cmd.min, usesSpecialModifier = true;
+ if(cmd.max) findCmd['$max'] = cmd.max, usesSpecialModifier = true;
+ if(cmd.showDiskLoc) findCmd['$showDiskLoc'] = cmd.showDiskLoc, usesSpecialModifier = true;
+ if(cmd.comment) findCmd['$comment'] = cmd.comment, usesSpecialModifier = true;
+ if(cmd.maxTimeMS) findCmd['$maxTimeMS'] = cmd.maxTimeMS, usesSpecialModifier = true;
+
+ if(cmd.explain) {
+ // nToReturn must be 0 (match all) or negative (match N and close cursor)
+ // nToReturn > 0 will give explain results equivalent to limit(0)
+ numberToReturn = -Math.abs(cmd.limit || 0);
+ usesSpecialModifier = true;
+ findCmd['$explain'] = true;
+ }
+
+ // If we have a special modifier
+ if(usesSpecialModifier) {
+ findCmd['$query'] = cmd.query;
+ } else {
+ findCmd = cmd.query;
+ }
+
+ // Throw on majority readConcern passed in
+ if(cmd.readConcern && cmd.readConcern.level != 'local') {
+ throw new MongoError(f('server find command does not support a readConcern level of %s', cmd.readConcern.level));
+ }
+
+ // Remove readConcern, ensure no failing commands
+ if(cmd.readConcern) {
+ cmd = copy(cmd);
+ delete cmd['readConcern'];
+ }
+
+ // Set up the serialize and ignoreUndefined fields
+ var serializeFunctions = typeof options.serializeFunctions == 'boolean'
+ ? options.serializeFunctions : false;
+ var ignoreUndefined = typeof options.ignoreUndefined == 'boolean'
+ ? options.ignoreUndefined : false;
+
+ // Build Query object
+ var query = new Query(bson, ns, findCmd, {
+ numberToSkip: numberToSkip, numberToReturn: numberToReturn
+ , checkKeys: false, returnFieldSelector: cmd.fields
+ , serializeFunctions: serializeFunctions, ignoreUndefined: ignoreUndefined
+ });
+
+ // Set query flags
+ query.slaveOk = readPreference.slaveOk();
+
+ // Set up the option bits for wire protocol
+ if(typeof cmd.tailable == 'boolean') query.tailable = cmd.tailable;
+ if(typeof cmd.oplogReplay == 'boolean') query.oplogReplay = cmd.oplogReplay;
+ if(typeof cmd.noCursorTimeout == 'boolean') query.noCursorTimeout = cmd.noCursorTimeout;
+ if(typeof cmd.awaitData == 'boolean') query.awaitData = cmd.awaitData;
+ if(typeof cmd.partial == 'boolean') query.partial = cmd.partial;
+ // Return the query
+ return query;
+}
+
+//
+// Set up a command cursor
+var setupCommand = function(bson, ns, cmd, cursorState, topology, options) {
+ // Set empty options object
+ options = options || {}
+ // Get the readPreference
+ var readPreference = getReadPreference(cmd, options);
+ // Final query
+ var finalCmd = {};
+ for(var name in cmd) {
+ finalCmd[name] = cmd[name];
+ }
+
+ // Build command namespace
+ var parts = ns.split(/\./);
+
+ // Throw on majority readConcern passed in
+ if(cmd.readConcern && cmd.readConcern.level != 'local') {
+ throw new MongoError(f('server %s command does not support a readConcern level of %s', JSON.stringify(cmd), cmd.readConcern.level));
+ }
+
+ // Remove readConcern, ensure no failing commands
+ if(cmd.readConcern) delete cmd['readConcern'];
+
+ // Serialize functions
+ var serializeFunctions = typeof options.serializeFunctions == 'boolean'
+ ? options.serializeFunctions : false;
+
+ // Set up the serialize and ignoreUndefined fields
+ var ignoreUndefined = typeof options.ignoreUndefined == 'boolean'
+ ? options.ignoreUndefined : false;
+
+ // We have a Mongos topology, check if we need to add a readPreference
+ if(topology.type == 'mongos'
+ && readPreference
+ && readPreference.preference != 'primary') {
+ finalCmd = {
+ '$query': finalCmd,
+ '$readPreference': readPreference.toJSON()
+ };
+ }
+
+ // Build Query object
+ var query = new Query(bson, f('%s.$cmd', parts.shift()), finalCmd, {
+ numberToSkip: 0, numberToReturn: -1
+ , checkKeys: false, serializeFunctions: serializeFunctions
+ , ignoreUndefined: ignoreUndefined
+ });
+
+ // Set query flags
+ query.slaveOk = readPreference.slaveOk();
+
+ // Return the query
+ return query;
+}
+
+var hasWriteConcern = function(writeConcern) {
+ if(writeConcern.w
+ || writeConcern.wtimeout
+ || writeConcern.j == true
+ || writeConcern.fsync == true
+ || Object.keys(writeConcern).length == 0) {
+ return true;
+ }
+ return false;
+}
+
+var cloneWriteConcern = function(writeConcern) {
+ var wc = {};
+ if(writeConcern.w != null) wc.w = writeConcern.w;
+ if(writeConcern.wtimeout != null) wc.wtimeout = writeConcern.wtimeout;
+ if(writeConcern.j != null) wc.j = writeConcern.j;
+ if(writeConcern.fsync != null) wc.fsync = writeConcern.fsync;
+ return wc;
+}
+
+//
+// Aggregate up all the results
+//
+var aggregateWriteOperationResults = function(opType, ops, results, connection) {
+ var finalResult = { ok: 1, n: 0 }
+ if(opType == 'update') {
+ finalResult.nModified = 0;
+ n: 0;
+ };
+
+ // Map all the results coming back
+ for(var i = 0; i < results.length; i++) {
+ var result = results[i];
+ var op = ops[i];
+
+ if((result.upserted || (result.updatedExisting == false)) && finalResult.upserted == null) {
+ finalResult.upserted = [];
+ }
+
+ // Push the upserted document to the list of upserted values
+ if(result.upserted) {
+ finalResult.upserted.push({index: i, _id: result.upserted});
+ }
+
+ // We have an upsert where we passed in a _id
+ if(result.updatedExisting == false && result.n == 1 && result.upserted == null) {
+ finalResult.upserted.push({index: i, _id: op.q._id});
+ } else if(result.updatedExisting == true) {
+ finalResult.nModified += result.n;
+ }
+
+ // We have an insert command
+ if(result.ok == 1 && opType == 'insert' && result.err == null) {
+ finalResult.n = finalResult.n + 1;
+ }
+
+ // We have a command error
+ if(result != null && result.ok == 0 || result.err || result.errmsg) {
+ if(result.ok == 0) finalResult.ok = 0;
+ finalResult.code = result.code;
+ finalResult.errmsg = result.errmsg || result.err || result.errMsg;
+
+ // Check if we have a write error
+ if(result.code == 11000
+ || result.code == 11001
+ || result.code == 12582
+ || result.code == 16544
+ || result.code == 16538
+ || result.code == 16542
+ || result.code == 14
+ || result.code == 13511) {
+ if(finalResult.writeErrors == null) finalResult.writeErrors = [];
+ finalResult.writeErrors.push({
+ index: i
+ , code: result.code
+ , errmsg: result.errmsg || result.err || result.errMsg
+ });
+ } else {
+ finalResult.writeConcernError = {
+ code: result.code
+ , errmsg: result.errmsg || result.err || result.errMsg
+ }
+ }
+ } else if(typeof result.n == 'number') {
+ finalResult.n += result.n;
+ } else {
+ finalResult.n += 1;
+ }
+
+ // Result as expected
+ if(result != null && result.lastOp) finalResult.lastOp = result.lastOp;
+ }
+
+ // Return finalResult aggregated results
+ return new CommandResult(finalResult, connection);
+}
+
+//
+// Execute all inserts in an ordered manner
+//
+var executeOrdered = function(opType ,command, ismaster, ns, bson, pool, ops, options, callback) {
+ var _ops = ops.slice(0);
+ // Collect all the getLastErrors
+ var getLastErrors = [];
+ // Execute an operation
+ var executeOp = function(list, _callback) {
+ // No more items in the list
+ if(list.length == 0) {
+ return process.nextTick(function() {
+ _callback(null, aggregateWriteOperationResults(opType, ops, getLastErrors, null));
+ });
+ }
+
+ // Get the first operation
+ var doc = list.shift();
+ // Create an insert command
+ var op = new command(Query.getRequestId(), ismaster, bson, ns, [doc], options);
+ // Write concern
+ var optionWriteConcern = options.writeConcern || {w:1};
+ // Final write concern
+ var writeConcern = cloneWriteConcern(optionWriteConcern);
+
+ // Get the db name
+ var db = ns.split('.').shift();
+
+ try {
+ // Add binary message to list of commands to execute
+ var commands = [op];
+
+ // Add getLastOrdered
+ var getLastErrorCmd = {getlasterror: 1};
+ // Merge all the fields
+ for(var i = 0; i < writeConcernFields.length; i++) {
+ if(writeConcern[writeConcernFields[i]] != null) {
+ getLastErrorCmd[writeConcernFields[i]] = writeConcern[writeConcernFields[i]];
+ }
+ }
+
+ // Create a getLastError command
+ var getLastErrorOp = new Query(bson, f("%s.$cmd", db), getLastErrorCmd, {numberToReturn: -1});
+ // Add getLastError command to list of ops to execute
+ commands.push(getLastErrorOp);
+
+ // getLastError callback
+ var getLastErrorCallback = function(err, result) {
+ if(err) return callback(err);
+ // Get the document
+ var doc = result.result;
+ // Save the getLastError document
+ getLastErrors.push(doc);
+
+ // If we have an error terminate
+ if(doc.ok == 0 || doc.err || doc.errmsg) {
+ return callback(null, aggregateWriteOperationResults(opType, ops, getLastErrors, result.connection));
+ }
+
+ // Execute the next op in the list
+ executeOp(list, callback);
+ }
+
+ // Write both commands out at the same time
+ pool.write(commands, getLastErrorCallback);
+ } catch(err) {
+ if(typeof err == 'string') err = new MongoError(err);
+ // We have a serialization error, rewrite as a write error to have same behavior as modern
+ // write commands
+ getLastErrors.push({ ok: 1, errmsg: err.message, code: 14 });
+ // Return due to an error
+ process.nextTick(function() {
+ _callback(null, aggregateWriteOperationResults(opType, ops, getLastErrors, null));
+ });
+ }
+ }
+
+ // Execute the operations
+ executeOp(_ops, callback);
+}
+
+var executeUnordered = function(opType, command, ismaster, ns, bson, pool, ops, options, callback) {
+ // Total operations to write
+ var totalOps = ops.length;
+ // Collect all the getLastErrors
+ var getLastErrors = [];
+ // Write concern
+ var optionWriteConcern = options.writeConcern || {w:1};
+ // Final write concern
+ var writeConcern = cloneWriteConcern(optionWriteConcern);
+ // Driver level error
+ var error;
+
+ // Execute all the operations
+ for(var i = 0; i < ops.length; i++) {
+ // Create an insert command
+ var op = new command(Query.getRequestId(), ismaster, bson, ns, [ops[i]], options);
+ // Get db name
+ var db = ns.split('.').shift();
+
+ try {
+ // Add binary message to list of commands to execute
+ var commands = [op];
+
+ // If write concern 0 don't fire getLastError
+ if(hasWriteConcern(writeConcern)) {
+ var getLastErrorCmd = {getlasterror: 1};
+ // Merge all the fields
+ for(var j = 0; j < writeConcernFields.length; j++) {
+ if(writeConcern[writeConcernFields[j]] != null)
+ getLastErrorCmd[writeConcernFields[j]] = writeConcern[writeConcernFields[j]];
+ }
+
+ // Create a getLastError command
+ var getLastErrorOp = new Query(bson, f("%s.$cmd", db), getLastErrorCmd, {numberToReturn: -1});
+ // Add getLastError command to list of ops to execute
+ commands.push(getLastErrorOp);
+
+ // Give the result from getLastError the right index
+ var callbackOp = function(_index) {
+ return function(err, result) {
+ if(err) error = err;
+ // Update the number of operations executed
+ totalOps = totalOps - 1;
+ // Save the getLastError document
+ if(!err) getLastErrors[_index] = result.result;
+ // Check if we are done
+ if(totalOps == 0) {
+ process.nextTick(function() {
+ if(error) return callback(error);
+ callback(null, aggregateWriteOperationResults(opType, ops, getLastErrors, result.connection));
+ });
+ }
+ }
+ }
+
+ // Write both commands out at the same time
+ pool.write(commands, callbackOp(i));
+ } else {
+ pool.write(commands, {immediateRelease:true, noResponse:true});
+ }
+ } catch(err) {
+ if(typeof err == 'string') err = new MongoError(err);
+ // Update the number of operations executed
+ totalOps = totalOps - 1;
+ // We have a serialization error, rewrite as a write error to have same behavior as modern
+ // write commands
+ getLastErrors[i] = { ok: 1, errmsg: err.message, code: 14 };
+ // Check if we are done
+ if(totalOps == 0) {
+ callback(null, aggregateWriteOperationResults(opType, ops, getLastErrors, null));
+ }
+ }
+ }
+
+ // Empty w:0 return
+ if(writeConcern
+ && writeConcern.w == 0 && callback) {
+ callback(null, new CommandResult({ok:1}, null));
+ }
+}
+
+module.exports = WireProtocol;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/2_6_support.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/2_6_support.js
new file mode 100644
index 0000000..8e83eb4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/2_6_support.js
@@ -0,0 +1,332 @@
+"use strict";
+
+var Insert = require('./commands').Insert
+ , Update = require('./commands').Update
+ , Remove = require('./commands').Remove
+ , Query = require('../connection/commands').Query
+ , copy = require('../connection/utils').copy
+ , KillCursor = require('../connection/commands').KillCursor
+ , GetMore = require('../connection/commands').GetMore
+ , Query = require('../connection/commands').Query
+ , ReadPreference = require('../topologies/read_preference')
+ , f = require('util').format
+ , CommandResult = require('../connection/command_result')
+ , MongoError = require('../error')
+ , Long = require('bson').Long
+ , getReadPreference = require('./shared').getReadPreference;
+
+var WireProtocol = function() {}
+
+//
+// Execute a write operation
+var executeWrite = function(pool, bson, type, opsField, ns, ops, options, callback) {
+ if(ops.length == 0) throw new MongoError("insert must contain at least one document");
+ if(typeof options == 'function') {
+ callback = options;
+ options = {};
+ options = options || {};
+ }
+
+ // Split the ns up to get db and collection
+ var p = ns.split(".");
+ var d = p.shift();
+ // Options
+ var ordered = typeof options.ordered == 'boolean' ? options.ordered : true;
+ var writeConcern = options.writeConcern;
+
+ // return skeleton
+ var writeCommand = {};
+ writeCommand[type] = p.join('.');
+ writeCommand[opsField] = ops;
+ writeCommand.ordered = ordered;
+
+ // Did we specify a write concern
+ if(writeConcern && Object.keys(writeConcern).length > 0) {
+ writeCommand.writeConcern = writeConcern;
+ }
+
+ // Do we have bypassDocumentValidation set, then enable it on the write command
+ if(typeof options.bypassDocumentValidation == 'boolean') {
+ writeCommand.bypassDocumentValidation = options.bypassDocumentValidation;
+ }
+
+ // Options object
+ var opts = { command: true };
+ var queryOptions = { checkKeys : false, numberToSkip: 0, numberToReturn: 1 };
+ if(type == 'insert') queryOptions.checkKeys = true;
+ // Ensure we support serialization of functions
+ if(options.serializeFunctions) queryOptions.serializeFunctions = options.serializeFunctions;
+ // Do not serialize the undefined fields
+ if(options.ignoreUndefined) queryOptions.ignoreUndefined = options.ignoreUndefined;
+
+ try {
+ // Create write command
+ var cmd = new Query(bson, f("%s.$cmd", d), writeCommand, queryOptions);
+ // Execute command
+ pool.write(cmd, opts, callback);
+ } catch(err) {
+ callback(err);
+ }
+}
+
+//
+// Needs to support legacy mass insert as well as ordered/unordered legacy
+// emulation
+//
+WireProtocol.prototype.insert = function(pool, ismaster, ns, bson, ops, options, callback) {
+ executeWrite(pool, bson, 'insert', 'documents', ns, ops, options, callback);
+}
+
+WireProtocol.prototype.update = function(pool, ismaster, ns, bson, ops, options, callback) {
+ executeWrite(pool, bson, 'update', 'updates', ns, ops, options, callback);
+}
+
+WireProtocol.prototype.remove = function(pool, ismaster, ns, bson, ops, options, callback) {
+ executeWrite(pool, bson, 'delete', 'deletes', ns, ops, options, callback);
+}
+
+WireProtocol.prototype.killCursor = function(bson, ns, cursorId, pool, callback) {
+ // Create a kill cursor command
+ var killCursor = new KillCursor(bson, [cursorId]);
+ // Execute the kill cursor command
+ if(pool && pool.isConnected()) {
+ pool.write(killCursor, {
+ immediateRelease:true, noResponse: true
+ });
+ }
+
+ // Callback
+ if(typeof callback == 'function') callback(null, null);
+}
+
+WireProtocol.prototype.getMore = function(bson, ns, cursorState, batchSize, raw, connection, options, callback) {
+ // Create getMore command
+ var getMore = new GetMore(bson, ns, cursorState.cursorId, {numberToReturn: batchSize});
+
+ // Query callback
+ var queryCallback = function(err, result) {
+ if(err) return callback(err);
+ // Get the raw message
+ var r = result.message;
+
+ // If we have a timed out query or a cursor that was killed
+ if((r.responseFlags & (1 << 0)) != 0) {
+ return callback(new MongoError("cursor does not exist, was killed or timed out"), null);
+ }
+
+ // Ensure we have a Long valie cursor id
+ var cursorId = typeof r.cursorId == 'number'
+ ? Long.fromNumber(r.cursorId)
+ : r.cursorId;
+
+ // Set all the values
+ cursorState.documents = r.documents;
+ cursorState.cursorId = cursorId;
+
+ // Return
+ callback(null, null, r.connection);
+ }
+
+ // If we have a raw query decorate the function
+ if(raw) {
+ queryCallback.raw = raw;
+ }
+
+ // Check if we need to promote longs
+ if(typeof cursorState.promoteLongs == 'boolean') {
+ queryCallback.promoteLongs = cursorState.promoteLongs;
+ }
+
+ if(typeof cursorState.promoteValues == 'boolean') {
+ queryCallback.promoteValues = cursorState.promoteValues;
+ }
+
+ if(typeof cursorState.promoteBuffers == 'boolean') {
+ queryCallback.promoteBuffers = cursorState.promoteBuffers;
+ }
+
+ // Write out the getMore command
+ connection.write(getMore, queryCallback);
+}
+
+WireProtocol.prototype.command = function(bson, ns, cmd, cursorState, topology, options) {
+ // Establish type of command
+ if(cmd.find) {
+ return setupClassicFind(bson, ns, cmd, cursorState, topology, options)
+ } else if(cursorState.cursorId != null) {
+ } else if(cmd) {
+ return setupCommand(bson, ns, cmd, cursorState, topology, options);
+ } else {
+ throw new MongoError(f("command %s does not return a cursor", JSON.stringify(cmd)));
+ }
+}
+
+//
+// Execute a find command
+var setupClassicFind = function(bson, ns, cmd, cursorState, topology, options) {
+ // Ensure we have at least some options
+ options = options || {};
+ // Get the readPreference
+ var readPreference = getReadPreference(cmd, options);
+ // Set the optional batchSize
+ cursorState.batchSize = cmd.batchSize || cursorState.batchSize;
+ var numberToReturn = 0;
+
+ // Unpack the limit and batchSize values
+ if(cursorState.limit == 0) {
+ numberToReturn = cursorState.batchSize;
+ } else if(cursorState.limit < 0 || cursorState.limit < cursorState.batchSize || (cursorState.limit > 0 && cursorState.batchSize == 0)) {
+ numberToReturn = cursorState.limit;
+ } else {
+ numberToReturn = cursorState.batchSize;
+ }
+
+ var numberToSkip = cursorState.skip || 0;
+ // Build actual find command
+ var findCmd = {};
+ // Using special modifier
+ var usesSpecialModifier = false;
+
+ // We have a Mongos topology, check if we need to add a readPreference
+ if(topology.type == 'mongos' && readPreference) {
+ findCmd['$readPreference'] = readPreference.toJSON();
+ usesSpecialModifier = true;
+ }
+
+ // Add special modifiers to the query
+ if(cmd.sort) findCmd['orderby'] = cmd.sort, usesSpecialModifier = true;
+ if(cmd.hint) findCmd['$hint'] = cmd.hint, usesSpecialModifier = true;
+ if(cmd.snapshot) findCmd['$snapshot'] = cmd.snapshot, usesSpecialModifier = true;
+ if(cmd.returnKey) findCmd['$returnKey'] = cmd.returnKey, usesSpecialModifier = true;
+ if(cmd.maxScan) findCmd['$maxScan'] = cmd.maxScan, usesSpecialModifier = true;
+ if(cmd.min) findCmd['$min'] = cmd.min, usesSpecialModifier = true;
+ if(cmd.max) findCmd['$max'] = cmd.max, usesSpecialModifier = true;
+ if(cmd.showDiskLoc) findCmd['$showDiskLoc'] = cmd.showDiskLoc, usesSpecialModifier = true;
+ if(cmd.comment) findCmd['$comment'] = cmd.comment, usesSpecialModifier = true;
+ if(cmd.maxTimeMS) findCmd['$maxTimeMS'] = cmd.maxTimeMS, usesSpecialModifier = true;
+
+ if(cmd.explain) {
+ // nToReturn must be 0 (match all) or negative (match N and close cursor)
+ // nToReturn > 0 will give explain results equivalent to limit(0)
+ numberToReturn = -Math.abs(cmd.limit || 0);
+ usesSpecialModifier = true;
+ findCmd['$explain'] = true;
+ }
+
+ // If we have a special modifier
+ if(usesSpecialModifier) {
+ findCmd['$query'] = cmd.query;
+ } else {
+ findCmd = cmd.query;
+ }
+
+ // Throw on majority readConcern passed in
+ if(cmd.readConcern && cmd.readConcern.level != 'local') {
+ throw new MongoError(f('server find command does not support a readConcern level of %s', cmd.readConcern.level));
+ }
+
+ // Remove readConcern, ensure no failing commands
+ if(cmd.readConcern) {
+ cmd = copy(cmd);
+ delete cmd['readConcern'];
+ }
+
+ // Serialize functions
+ var serializeFunctions = typeof options.serializeFunctions == 'boolean'
+ ? options.serializeFunctions : false;
+ var ignoreUndefined = typeof options.ignoreUndefined == 'boolean'
+ ? options.ignoreUndefined : false;
+
+ // Build Query object
+ var query = new Query(bson, ns, findCmd, {
+ numberToSkip: numberToSkip, numberToReturn: numberToReturn
+ , checkKeys: false, returnFieldSelector: cmd.fields
+ , serializeFunctions: serializeFunctions
+ , ignoreUndefined: ignoreUndefined
+ });
+
+ // Set query flags
+ query.slaveOk = readPreference.slaveOk();
+
+ // Set up the option bits for wire protocol
+ if(typeof cmd.tailable == 'boolean') {
+ query.tailable = cmd.tailable;
+ }
+
+ if(typeof cmd.oplogReplay == 'boolean') {
+ query.oplogReplay = cmd.oplogReplay;
+ }
+
+ if(typeof cmd.noCursorTimeout == 'boolean') {
+ query.noCursorTimeout = cmd.noCursorTimeout;
+ }
+
+ if(typeof cmd.awaitData == 'boolean') {
+ query.awaitData = cmd.awaitData;
+ }
+
+ if(typeof cmd.partial == 'boolean') {
+ query.partial = cmd.partial;
+ }
+
+ // Return the query
+ return query;
+}
+
+//
+// Set up a command cursor
+var setupCommand = function(bson, ns, cmd, cursorState, topology, options) {
+ // Set empty options object
+ options = options || {}
+ // Get the readPreference
+ var readPreference = getReadPreference(cmd, options);
+
+ // Final query
+ var finalCmd = {};
+ for(var name in cmd) {
+ finalCmd[name] = cmd[name];
+ }
+
+ // Build command namespace
+ var parts = ns.split(/\./);
+
+ // Serialize functions
+ var serializeFunctions = typeof options.serializeFunctions == 'boolean'
+ ? options.serializeFunctions : false;
+
+ var ignoreUndefined = typeof options.ignoreUndefined == 'boolean'
+ ? options.ignoreUndefined : false;
+
+ // Throw on majority readConcern passed in
+ if(cmd.readConcern && cmd.readConcern.level != 'local') {
+ throw new MongoError(f('server %s command does not support a readConcern level of %s', JSON.stringify(cmd), cmd.readConcern.level));
+ }
+
+ // Remove readConcern, ensure no failing commands
+ if(cmd.readConcern) delete cmd['readConcern'];
+
+ // We have a Mongos topology, check if we need to add a readPreference
+ if(topology.type == 'mongos'
+ && readPreference
+ && readPreference.preference != 'primary') {
+ finalCmd = {
+ '$query': finalCmd,
+ '$readPreference': readPreference.toJSON()
+ };
+ }
+
+ // Build Query object
+ var query = new Query(bson, f('%s.$cmd', parts.shift()), finalCmd, {
+ numberToSkip: 0, numberToReturn: -1
+ , checkKeys: false, serializeFunctions: serializeFunctions
+ , ignoreUndefined: ignoreUndefined
+ });
+
+ // Set query flags
+ query.slaveOk = readPreference.slaveOk();
+
+ // Return the query
+ return query;
+}
+
+module.exports = WireProtocol;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/3_2_support.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/3_2_support.js
new file mode 100644
index 0000000..b57048d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/3_2_support.js
@@ -0,0 +1,541 @@
+"use strict";
+
+var Insert = require('./commands').Insert
+ , Update = require('./commands').Update
+ , Remove = require('./commands').Remove
+ , Query = require('../connection/commands').Query
+ , copy = require('../connection/utils').copy
+ , KillCursor = require('../connection/commands').KillCursor
+ , GetMore = require('../connection/commands').GetMore
+ , Query = require('../connection/commands').Query
+ , ReadPreference = require('../topologies/read_preference')
+ , f = require('util').format
+ , CommandResult = require('../connection/command_result')
+ , MongoError = require('../error')
+ , Long = require('bson').Long
+ , getReadPreference = require('./shared').getReadPreference;
+
+var WireProtocol = function(legacyWireProtocol) {
+ this.legacyWireProtocol = legacyWireProtocol;
+}
+
+//
+// Execute a write operation
+var executeWrite = function(pool, bson, type, opsField, ns, ops, options, callback) {
+ if(ops.length == 0) throw new MongoError("insert must contain at least one document");
+ if(typeof options == 'function') {
+ callback = options;
+ options = {};
+ options = options || {};
+ }
+
+ // Split the ns up to get db and collection
+ var p = ns.split(".");
+ var d = p.shift();
+ // Options
+ var ordered = typeof options.ordered == 'boolean' ? options.ordered : true;
+ var writeConcern = options.writeConcern;
+
+ // return skeleton
+ var writeCommand = {};
+ writeCommand[type] = p.join('.');
+ writeCommand[opsField] = ops;
+ writeCommand.ordered = ordered;
+
+ // Did we specify a write concern
+ if(writeConcern && Object.keys(writeConcern).length > 0) {
+ writeCommand.writeConcern = writeConcern;
+ }
+
+ // If we have collation passed in
+ if(options.collation) {
+ for(var i = 0; i < writeCommand[opsField].length; i++) {
+ if(!writeCommand[opsField][i].collation) {
+ writeCommand[opsField][i].collation = options.collation;
+ }
+ }
+ }
+
+ // Do we have bypassDocumentValidation set, then enable it on the write command
+ if(typeof options.bypassDocumentValidation == 'boolean') {
+ writeCommand.bypassDocumentValidation = options.bypassDocumentValidation;
+ }
+
+ // Options object
+ var opts = { command: true };
+ var queryOptions = { checkKeys : false, numberToSkip: 0, numberToReturn: 1 };
+ if(type == 'insert') queryOptions.checkKeys = true;
+
+ // Ensure we support serialization of functions
+ if(options.serializeFunctions) queryOptions.serializeFunctions = options.serializeFunctions;
+ // Do not serialize the undefined fields
+ if(options.ignoreUndefined) queryOptions.ignoreUndefined = options.ignoreUndefined;
+
+ try {
+ // Create write command
+ var cmd = new Query(bson, f("%s.$cmd", d), writeCommand, queryOptions);
+ // Execute command
+ pool.write(cmd, opts, callback);
+ } catch(err) {
+ callback(err);
+ }
+}
+
+//
+// Needs to support legacy mass insert as well as ordered/unordered legacy
+// emulation
+//
+WireProtocol.prototype.insert = function(pool, ismaster, ns, bson, ops, options, callback) {
+ executeWrite(pool, bson, 'insert', 'documents', ns, ops, options, callback);
+}
+
+WireProtocol.prototype.update = function(pool, ismaster, ns, bson, ops, options, callback) {
+ executeWrite(pool, bson, 'update', 'updates', ns, ops, options, callback);
+}
+
+WireProtocol.prototype.remove = function(pool, ismaster, ns, bson, ops, options, callback) {
+ executeWrite(pool, bson, 'delete', 'deletes', ns, ops, options, callback);
+}
+
+WireProtocol.prototype.killCursor = function(bson, ns, cursorId, pool, callback) {
+ // Build command namespace
+ var parts = ns.split(/\./);
+ // Command namespace
+ var commandns = f('%s.$cmd', parts.shift());
+ // Create getMore command
+ var killcursorCmd = {
+ killCursors: parts.join('.'),
+ cursors: [cursorId]
+ }
+
+ // Build Query object
+ var query = new Query(bson, commandns, killcursorCmd, {
+ numberToSkip: 0, numberToReturn: -1
+ , checkKeys: false, returnFieldSelector: null
+ });
+
+ // Set query flags
+ query.slaveOk = true;
+
+ // Kill cursor callback
+ var killCursorCallback = function(err, result) {
+ if(err) {
+ if(typeof callback != 'function') return;
+ return callback(err);
+ }
+
+ // Result
+ var r = result.message;
+ // If we have a timed out query or a cursor that was killed
+ if((r.responseFlags & (1 << 0)) != 0) {
+ if(typeof callback != 'function') return;
+ return callback(new MongoError("cursor killed or timed out"), null);
+ }
+
+ if(!Array.isArray(r.documents) || r.documents.length == 0) {
+ if(typeof callback != 'function') return;
+ return callback(new MongoError(f('invalid killCursors result returned for cursor id %s', cursorState.cursorId)));
+ }
+
+ // Return the result
+ if(typeof callback == 'function') {
+ callback(null, r.documents[0]);
+ }
+ }
+
+ // Execute the kill cursor command
+ if(pool && pool.isConnected()) {
+ pool.write(query, {
+ command: true
+ }, killCursorCallback);
+ }
+}
+
+WireProtocol.prototype.getMore = function(bson, ns, cursorState, batchSize, raw, connection, options, callback) {
+ options = options || {};
+ // Build command namespace
+ var parts = ns.split(/\./);
+ // Command namespace
+ var commandns = f('%s.$cmd', parts.shift());
+
+ // Check if we have an maxTimeMS set
+ var maxTimeMS = typeof cursorState.cmd.maxTimeMS == 'number' ? cursorState.cmd.maxTimeMS : 3000;
+
+ // Create getMore command
+ var getMoreCmd = {
+ getMore: cursorState.cursorId,
+ collection: parts.join('.'),
+ batchSize: Math.abs(batchSize)
+ }
+
+ if(cursorState.cmd.tailable
+ && typeof cursorState.cmd.maxAwaitTimeMS == 'number') {
+ getMoreCmd.maxTimeMS = cursorState.cmd.maxAwaitTimeMS;
+ }
+
+ // Build Query object
+ var query = new Query(bson, commandns, getMoreCmd, {
+ numberToSkip: 0, numberToReturn: -1
+ , checkKeys: false, returnFieldSelector: null
+ });
+
+ // Set query flags
+ query.slaveOk = true;
+
+ // Query callback
+ var queryCallback = function(err, result) {
+ if(err) return callback(err);
+ // Get the raw message
+ var r = result.message;
+
+ // If we have a timed out query or a cursor that was killed
+ if((r.responseFlags & (1 << 0)) != 0) {
+ return callback(new MongoError("cursor killed or timed out"), null);
+ }
+
+ // Raw, return all the extracted documents
+ if(raw) {
+ cursorState.documents = r.documents;
+ cursorState.cursorId = r.cursorId;
+ return callback(null, r.documents);
+ }
+
+ // We have an error detected
+ if(r.documents[0].ok == 0) {
+ return callback(MongoError.create(r.documents[0]));
+ }
+
+ // Ensure we have a Long valid cursor id
+ var cursorId = typeof r.documents[0].cursor.id == 'number'
+ ? Long.fromNumber(r.documents[0].cursor.id)
+ : r.documents[0].cursor.id;
+
+ // Set all the values
+ cursorState.documents = r.documents[0].cursor.nextBatch;
+ cursorState.cursorId = cursorId;
+
+ // Return the result
+ callback(null, r.documents[0], r.connection);
+ }
+
+ // Query options
+ var queryOptions = { command: true };
+
+ // If we have a raw query decorate the function
+ if(raw) {
+ queryOptions.raw = raw;
+ }
+
+ // Add the result field needed
+ queryOptions.documentsReturnedIn = 'nextBatch';
+
+ // Check if we need to promote longs
+ if(typeof cursorState.promoteLongs == 'boolean') {
+ queryOptions.promoteLongs = cursorState.promoteLongs;
+ }
+
+ if(typeof cursorState.promoteValues == 'boolean') {
+ queryCallback.promoteValues = cursorState.promoteValues;
+ }
+
+ if(typeof cursorState.promoteBuffers == 'boolean') {
+ queryCallback.promoteBuffers = cursorState.promoteBuffers;
+ }
+
+ // Write out the getMore command
+ connection.write(query, queryOptions, queryCallback);
+}
+
+WireProtocol.prototype.command = function(bson, ns, cmd, cursorState, topology, options) {
+ // Establish type of command
+ if(cmd.find) {
+ // Create the find command
+ var query = executeFindCommand(bson, ns, cmd, cursorState, topology, options)
+ // Mark the cmd as virtual
+ cmd.virtual = false;
+ // Signal the documents are in the firstBatch value
+ query.documentsReturnedIn = 'firstBatch';
+ // Return the query
+ return query;
+ } else if(cursorState.cursorId != null) {
+ } else if(cmd) {
+ return setupCommand(bson, ns, cmd, cursorState, topology, options);
+ } else {
+ throw new MongoError(f("command %s does not return a cursor", JSON.stringify(cmd)));
+ }
+}
+
+// // Command
+// {
+// find: ns
+// , query: <object>
+// , limit: <n>
+// , fields: <object>
+// , skip: <n>
+// , hint: <string>
+// , explain: <boolean>
+// , snapshot: <boolean>
+// , batchSize: <n>
+// , returnKey: <boolean>
+// , maxScan: <n>
+// , min: <n>
+// , max: <n>
+// , showDiskLoc: <boolean>
+// , comment: <string>
+// , maxTimeMS: <n>
+// , raw: <boolean>
+// , readPreference: <ReadPreference>
+// , tailable: <boolean>
+// , oplogReplay: <boolean>
+// , noCursorTimeout: <boolean>
+// , awaitdata: <boolean>
+// , exhaust: <boolean>
+// , partial: <boolean>
+// }
+
+// FIND/GETMORE SPEC
+// {
+// “findâ€: <string>,
+// “filterâ€: { ... },
+// “sortâ€: { ... },
+// “projectionâ€: { ... },
+// “hintâ€: { ... },
+// “skipâ€: <int>,
+// “limitâ€: <int>,
+// “batchSizeâ€: <int>,
+// “singleBatchâ€: <bool>,
+// “commentâ€: <string>,
+// “maxScanâ€: <int>,
+// “maxTimeMSâ€: <int>,
+// “maxâ€: { ... },
+// “minâ€: { ... },
+// “returnKeyâ€: <bool>,
+// “showRecordIdâ€: <bool>,
+// “snapshotâ€: <bool>,
+// “tailableâ€: <bool>,
+// “oplogReplayâ€: <bool>,
+// “noCursorTimeoutâ€: <bool>,
+// “awaitDataâ€: <bool>,
+// “partialâ€: <bool>,
+// “$readPreferenceâ€: { ... }
+// }
+
+//
+// Execute a find command
+var executeFindCommand = function(bson, ns, cmd, cursorState, topology, options) {
+ // Ensure we have at least some options
+ options = options || {};
+ // Get the readPreference
+ var readPreference = getReadPreference(cmd, options);
+ // Set the optional batchSize
+ cursorState.batchSize = cmd.batchSize || cursorState.batchSize;
+
+ // Build command namespace
+ var parts = ns.split(/\./);
+ // Command namespace
+ var commandns = f('%s.$cmd', parts.shift());
+
+ // Build actual find command
+ var findCmd = {
+ find: parts.join('.')
+ };
+
+ // I we provided a filter
+ if(cmd.query) {
+ // Check if the user is passing in the $query parameter
+ if(cmd.query['$query']) {
+ findCmd.filter = cmd.query['$query'];
+ } else {
+ findCmd.filter = cmd.query;
+ }
+ }
+
+ // Sort value
+ var sortValue = cmd.sort;
+
+ // Handle issue of sort being an Array
+ if(Array.isArray(sortValue)) {
+ var sortObject = {};
+
+ if(sortValue.length > 0 && !Array.isArray(sortValue[0])) {
+ var sortDirection = sortValue[1];
+ // Translate the sort order text
+ if(sortDirection == 'asc') {
+ sortDirection = 1;
+ } else if(sortDirection == 'desc') {
+ sortDirection = -1;
+ }
+
+ // Set the sort order
+ sortObject[sortValue[0]] = sortDirection;
+ } else {
+ for(var i = 0; i < sortValue.length; i++) {
+ var sortDirection = sortValue[i][1];
+ // Translate the sort order text
+ if(sortDirection == 'asc') {
+ sortDirection = 1;
+ } else if(sortDirection == 'desc') {
+ sortDirection = -1;
+ }
+
+ // Set the sort order
+ sortObject[sortValue[i][0]] = sortDirection;
+ }
+ }
+
+ sortValue = sortObject;
+ };
+
+ // Add sort to command
+ if(cmd.sort) findCmd.sort = sortValue;
+ // Add a projection to the command
+ if(cmd.fields) findCmd.projection = cmd.fields;
+ // Add a hint to the command
+ if(cmd.hint) findCmd.hint = cmd.hint;
+ // Add a skip
+ if(cmd.skip) findCmd.skip = cmd.skip;
+ // Add a limit
+ if(cmd.limit) findCmd.limit = cmd.limit;
+ // Add a batchSize
+ if(typeof cmd.batchSize == 'number') findCmd.batchSize = Math.abs(cmd.batchSize);
+
+ // Check if we wish to have a singleBatch
+ if(cmd.limit < 0) {
+ findCmd.limit = Math.abs(cmd.limit);
+ findCmd.singleBatch = true;
+ }
+
+ // If we have comment set
+ if(cmd.comment) findCmd.comment = cmd.comment;
+
+ // If we have maxScan
+ if(cmd.maxScan) findCmd.maxScan = cmd.maxScan;
+
+ // If we have maxTimeMS set
+ if(cmd.maxTimeMS) findCmd.maxTimeMS = cmd.maxTimeMS;
+
+ // If we have min
+ if(cmd.min) findCmd.min = cmd.min;
+
+ // If we have max
+ if(cmd.max) findCmd.max = cmd.max;
+
+ // If we have returnKey set
+ if(cmd.returnKey) findCmd.returnKey = cmd.returnKey;
+
+ // If we have showDiskLoc set
+ if(cmd.showDiskLoc) findCmd.showRecordId = cmd.showDiskLoc;
+
+ // If we have snapshot set
+ if(cmd.snapshot) findCmd.snapshot = cmd.snapshot;
+
+ // If we have tailable set
+ if(cmd.tailable) findCmd.tailable = cmd.tailable;
+
+ // If we have oplogReplay set
+ if(cmd.oplogReplay) findCmd.oplogReplay = cmd.oplogReplay;
+
+ // If we have noCursorTimeout set
+ if(cmd.noCursorTimeout) findCmd.noCursorTimeout = cmd.noCursorTimeout;
+
+ // If we have awaitData set
+ if(cmd.awaitData) findCmd.awaitData = cmd.awaitData;
+ if(cmd.awaitdata) findCmd.awaitData = cmd.awaitdata;
+
+ // If we have partial set
+ if(cmd.partial) findCmd.partial = cmd.partial;
+
+ // If we have collation passed in
+ if(cmd.collation) findCmd.collation = cmd.collation;
+
+ // If we have explain, we need to rewrite the find command
+ // to wrap it in the explain command
+ if(cmd.explain) {
+ findCmd = {
+ explain: findCmd
+ }
+ }
+
+ // Did we provide a readConcern
+ if(cmd.readConcern) findCmd.readConcern = cmd.readConcern;
+
+ // Set up the serialize and ignoreUndefined fields
+ var serializeFunctions = typeof options.serializeFunctions == 'boolean'
+ ? options.serializeFunctions : false;
+ var ignoreUndefined = typeof options.ignoreUndefined == 'boolean'
+ ? options.ignoreUndefined : false;
+
+ // We have a Mongos topology, check if we need to add a readPreference
+ if(topology.type == 'mongos'
+ && readPreference
+ && readPreference.preference != 'primary') {
+ findCmd = {
+ '$query': findCmd,
+ '$readPreference': readPreference.toJSON()
+ };
+ }
+
+ // Build Query object
+ var query = new Query(bson, commandns, findCmd, {
+ numberToSkip: 0, numberToReturn: 1
+ , checkKeys: false, returnFieldSelector: null
+ , serializeFunctions: serializeFunctions, ignoreUndefined: ignoreUndefined
+ });
+
+ // Set query flags
+ query.slaveOk = readPreference.slaveOk();
+
+ // Return the query
+ return query;
+}
+
+//
+// Set up a command cursor
+var setupCommand = function(bson, ns, cmd, cursorState, topology, options) {
+ // Set empty options object
+ options = options || {}
+ // Get the readPreference
+ var readPreference = getReadPreference(cmd, options);
+
+ // Final query
+ var finalCmd = {};
+ for(var name in cmd) {
+ finalCmd[name] = cmd[name];
+ }
+
+ // Build command namespace
+ var parts = ns.split(/\./);
+
+ // Serialize functions
+ var serializeFunctions = typeof options.serializeFunctions == 'boolean'
+ ? options.serializeFunctions : false;
+
+ // Set up the serialize and ignoreUndefined fields
+ var ignoreUndefined = typeof options.ignoreUndefined == 'boolean'
+ ? options.ignoreUndefined : false;
+
+ // We have a Mongos topology, check if we need to add a readPreference
+ if(topology.type == 'mongos'
+ && readPreference
+ && readPreference.preference != 'primary') {
+ finalCmd = {
+ '$query': finalCmd,
+ '$readPreference': readPreference.toJSON()
+ };
+ }
+
+ // Build Query object
+ var query = new Query(bson, f('%s.$cmd', parts.shift()), finalCmd, {
+ numberToSkip: 0, numberToReturn: -1
+ , checkKeys: false, serializeFunctions: serializeFunctions
+ , ignoreUndefined: ignoreUndefined
+ });
+
+ // Set query flags
+ query.slaveOk = readPreference.slaveOk();
+
+ // Return the query
+ return query;
+}
+
+module.exports = WireProtocol;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/commands.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/commands.js
new file mode 100644
index 0000000..9c665ee
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/commands.js
@@ -0,0 +1,357 @@
+"use strict";
+
+var MongoError = require('../error');
+
+// Wire command operation ids
+var OP_UPDATE = 2001;
+var OP_INSERT = 2002;
+var OP_DELETE = 2006;
+
+var Insert = function(requestId, ismaster, bson, ns, documents, options) {
+ // Basic options needed to be passed in
+ if(ns == null) throw new MongoError("ns must be specified for query");
+ if(!Array.isArray(documents) || documents.length == 0) throw new MongoError("documents array must contain at least one document to insert");
+
+ // Validate that we are not passing 0x00 in the colletion name
+ if(!!~ns.indexOf("\x00")) {
+ throw new MongoError("namespace cannot contain a null character");
+ }
+
+ // Set internal
+ this.requestId = requestId;
+ this.bson = bson;
+ this.ns = ns;
+ this.documents = documents;
+ this.ismaster = ismaster;
+
+ // Ensure empty options
+ options = options || {};
+
+ // Unpack options
+ this.serializeFunctions = typeof options.serializeFunctions == 'boolean' ? options.serializeFunctions : false;
+ this.ignoreUndefined = typeof options.ignoreUndefined == 'boolean' ? options.ignoreUndefined : false;
+ this.checkKeys = typeof options.checkKeys == 'boolean' ? options.checkKeys : true;
+ this.continueOnError = typeof options.continueOnError == 'boolean' ? options.continueOnError : false;
+ // Set flags
+ this.flags = this.continueOnError ? 1 : 0;
+}
+
+// To Binary
+Insert.prototype.toBin = function() {
+ // Contains all the buffers to be written
+ var buffers = [];
+
+ // Header buffer
+ var header = new Buffer(
+ 4 * 4 // Header
+ + 4 // Flags
+ + Buffer.byteLength(this.ns) + 1 // namespace
+ );
+
+ // Add header to buffers
+ buffers.push(header);
+
+ // Total length of the message
+ var totalLength = header.length;
+
+ // Serialize all the documents
+ for(var i = 0; i < this.documents.length; i++) {
+ var buffer = this.bson.serialize(this.documents[i]
+ , this.checkKeys
+ , true
+ , this.serializeFunctions
+ , 0, this.ignoreUndefined);
+
+ // Document is larger than maxBsonObjectSize, terminate serialization
+ if(buffer.length > this.ismaster.maxBsonObjectSize) {
+ throw new MongoError("Document exceeds maximum allowed bson size of " + this.ismaster.maxBsonObjectSize + " bytes");
+ }
+
+ // Add to total length of wire protocol message
+ totalLength = totalLength + buffer.length;
+ // Add to buffer
+ buffers.push(buffer);
+ }
+
+ // Command is larger than maxMessageSizeBytes terminate serialization
+ if(totalLength > this.ismaster.maxMessageSizeBytes) {
+ throw new MongoError("Command exceeds maximum message size of " + this.ismaster.maxMessageSizeBytes + " bytes");
+ }
+
+ // Add all the metadata
+ var index = 0;
+
+ // Write header length
+ header[index + 3] = (totalLength >> 24) & 0xff;
+ header[index + 2] = (totalLength >> 16) & 0xff;
+ header[index + 1] = (totalLength >> 8) & 0xff;
+ header[index] = (totalLength) & 0xff;
+ index = index + 4;
+
+ // Write header requestId
+ header[index + 3] = (this.requestId >> 24) & 0xff;
+ header[index + 2] = (this.requestId >> 16) & 0xff;
+ header[index + 1] = (this.requestId >> 8) & 0xff;
+ header[index] = (this.requestId) & 0xff;
+ index = index + 4;
+
+ // No flags
+ header[index + 3] = (0 >> 24) & 0xff;
+ header[index + 2] = (0 >> 16) & 0xff;
+ header[index + 1] = (0 >> 8) & 0xff;
+ header[index] = (0) & 0xff;
+ index = index + 4;
+
+ // Operation
+ header[index + 3] = (OP_INSERT >> 24) & 0xff;
+ header[index + 2] = (OP_INSERT >> 16) & 0xff;
+ header[index + 1] = (OP_INSERT >> 8) & 0xff;
+ header[index] = (OP_INSERT) & 0xff;
+ index = index + 4;
+
+ // Flags
+ header[index + 3] = (this.flags >> 24) & 0xff;
+ header[index + 2] = (this.flags >> 16) & 0xff;
+ header[index + 1] = (this.flags >> 8) & 0xff;
+ header[index] = (this.flags) & 0xff;
+ index = index + 4;
+
+ // Write collection name
+ index = index + header.write(this.ns, index, 'utf8') + 1;
+ header[index - 1] = 0;
+
+ // Return the buffers
+ return buffers;
+}
+
+var Update = function(requestId, ismaster, bson, ns, update, options) {
+ // Basic options needed to be passed in
+ if(ns == null) throw new MongoError("ns must be specified for query");
+
+ // Ensure empty options
+ options = options || {};
+
+ // Set internal
+ this.requestId = requestId;
+ this.bson = bson;
+ this.ns = ns;
+ this.ismaster = ismaster;
+
+ // Unpack options
+ this.serializeFunctions = typeof options.serializeFunctions == 'boolean' ? options.serializeFunctions : false;
+ this.ignoreUndefined = typeof options.ignoreUndefined == 'boolean' ? options.ignoreUndefined : false;
+ this.checkKeys = typeof options.checkKeys == 'boolean' ? options.checkKeys : false;
+
+ // Unpack the update document
+ this.upsert = typeof update[0].upsert == 'boolean' ? update[0].upsert : false;
+ this.multi = typeof update[0].multi == 'boolean' ? update[0].multi : false;
+ this.q = update[0].q;
+ this.u = update[0].u;
+
+ // Create flag value
+ this.flags = this.upsert ? 1 : 0;
+ this.flags = this.multi ? this.flags | 2 : this.flags;
+}
+
+// To Binary
+Update.prototype.toBin = function() {
+ // Contains all the buffers to be written
+ var buffers = [];
+
+ // Header buffer
+ var header = new Buffer(
+ 4 * 4 // Header
+ + 4 // ZERO
+ + Buffer.byteLength(this.ns) + 1 // namespace
+ + 4 // Flags
+ );
+
+ // Add header to buffers
+ buffers.push(header);
+
+ // Total length of the message
+ var totalLength = header.length;
+
+ // Serialize the selector
+ var selector = this.bson.serialize(this.q
+ , this.checkKeys
+ , true
+ , this.serializeFunctions
+ , 0, this.ignoreUndefined);
+ buffers.push(selector);
+ totalLength = totalLength + selector.length;
+
+ // Serialize the update
+ var update = this.bson.serialize(this.u
+ , this.checkKeys
+ , true
+ , this.serializeFunctions
+ , 0, this.ignoreUndefined);
+ buffers.push(update);
+ totalLength = totalLength + update.length;
+
+ // Index in header buffer
+ var index = 0;
+
+ // Write header length
+ header[index + 3] = (totalLength >> 24) & 0xff;
+ header[index + 2] = (totalLength >> 16) & 0xff;
+ header[index + 1] = (totalLength >> 8) & 0xff;
+ header[index] = (totalLength) & 0xff;
+ index = index + 4;
+
+ // Write header requestId
+ header[index + 3] = (this.requestId >> 24) & 0xff;
+ header[index + 2] = (this.requestId >> 16) & 0xff;
+ header[index + 1] = (this.requestId >> 8) & 0xff;
+ header[index] = (this.requestId) & 0xff;
+ index = index + 4;
+
+ // No flags
+ header[index + 3] = (0 >> 24) & 0xff;
+ header[index + 2] = (0 >> 16) & 0xff;
+ header[index + 1] = (0 >> 8) & 0xff;
+ header[index] = (0) & 0xff;
+ index = index + 4;
+
+ // Operation
+ header[index + 3] = (OP_UPDATE >> 24) & 0xff;
+ header[index + 2] = (OP_UPDATE >> 16) & 0xff;
+ header[index + 1] = (OP_UPDATE >> 8) & 0xff;
+ header[index] = (OP_UPDATE) & 0xff;
+ index = index + 4;
+
+ // Write ZERO
+ header[index + 3] = (0 >> 24) & 0xff;
+ header[index + 2] = (0 >> 16) & 0xff;
+ header[index + 1] = (0 >> 8) & 0xff;
+ header[index] = (0) & 0xff;
+ index = index + 4;
+
+ // Write collection name
+ index = index + header.write(this.ns, index, 'utf8') + 1;
+ header[index - 1] = 0;
+
+ // Flags
+ header[index + 3] = (this.flags >> 24) & 0xff;
+ header[index + 2] = (this.flags >> 16) & 0xff;
+ header[index + 1] = (this.flags >> 8) & 0xff;
+ header[index] = (this.flags) & 0xff;
+ index = index + 4;
+
+ // Return the buffers
+ return buffers;
+}
+
+var Remove = function(requestId, ismaster, bson, ns, remove, options) {
+ // Basic options needed to be passed in
+ if(ns == null) throw new MongoError("ns must be specified for query");
+
+ // Ensure empty options
+ options = options || {};
+
+ // Set internal
+ this.requestId = requestId;
+ this.bson = bson;
+ this.ns = ns;
+ this.ismaster = ismaster;
+
+ // Unpack options
+ this.serializeFunctions = typeof options.serializeFunctions == 'boolean' ? options.serializeFunctions : false;
+ this.ignoreUndefined = typeof options.ignoreUndefined == 'boolean' ? options.ignoreUndefined : false;
+ this.checkKeys = typeof options.checkKeys == 'boolean' ? options.checkKeys : false;
+
+ // Unpack the update document
+ this.limit = typeof remove[0].limit == 'number' ? remove[0].limit : 1;
+ this.q = remove[0].q;
+
+ // Create flag value
+ this.flags = this.limit == 1 ? 1 : 0;
+}
+
+// To Binary
+Remove.prototype.toBin = function() {
+ // Contains all the buffers to be written
+ var buffers = [];
+
+ // Header buffer
+ var header = new Buffer(
+ 4 * 4 // Header
+ + 4 // ZERO
+ + Buffer.byteLength(this.ns) + 1 // namespace
+ + 4 // Flags
+ );
+
+ // Add header to buffers
+ buffers.push(header);
+
+ // Total length of the message
+ var totalLength = header.length;
+
+ // Serialize the selector
+ var selector = this.bson.serialize(this.q
+ , this.checkKeys
+ , true
+ , this.serializeFunctions
+ , 0, this.ignoreUndefined);
+ buffers.push(selector);
+ totalLength = totalLength + selector.length;
+
+ // Index in header buffer
+ var index = 0;
+
+ // Write header length
+ header[index + 3] = (totalLength >> 24) & 0xff;
+ header[index + 2] = (totalLength >> 16) & 0xff;
+ header[index + 1] = (totalLength >> 8) & 0xff;
+ header[index] = (totalLength) & 0xff;
+ index = index + 4;
+
+ // Write header requestId
+ header[index + 3] = (this.requestId >> 24) & 0xff;
+ header[index + 2] = (this.requestId >> 16) & 0xff;
+ header[index + 1] = (this.requestId >> 8) & 0xff;
+ header[index] = (this.requestId) & 0xff;
+ index = index + 4;
+
+ // No flags
+ header[index + 3] = (0 >> 24) & 0xff;
+ header[index + 2] = (0 >> 16) & 0xff;
+ header[index + 1] = (0 >> 8) & 0xff;
+ header[index] = (0) & 0xff;
+ index = index + 4;
+
+ // Operation
+ header[index + 3] = (OP_DELETE >> 24) & 0xff;
+ header[index + 2] = (OP_DELETE >> 16) & 0xff;
+ header[index + 1] = (OP_DELETE >> 8) & 0xff;
+ header[index] = (OP_DELETE) & 0xff;
+ index = index + 4;
+
+ // Write ZERO
+ header[index + 3] = (0 >> 24) & 0xff;
+ header[index + 2] = (0 >> 16) & 0xff;
+ header[index + 1] = (0 >> 8) & 0xff;
+ header[index] = (0) & 0xff;
+ index = index + 4;
+
+ // Write collection name
+ index = index + header.write(this.ns, index, 'utf8') + 1;
+ header[index - 1] = 0;
+
+ // Write ZERO
+ header[index + 3] = (this.flags >> 24) & 0xff;
+ header[index + 2] = (this.flags >> 16) & 0xff;
+ header[index + 1] = (this.flags >> 8) & 0xff;
+ header[index] = (this.flags) & 0xff;
+ index = index + 4;
+
+ // Return the buffers
+ return buffers;
+}
+
+module.exports = {
+ Insert: Insert
+ , Update: Update
+ , Remove: Remove
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/shared.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/shared.js
new file mode 100644
index 0000000..3a20f51
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/shared.js
@@ -0,0 +1,26 @@
+"use strict"
+
+var ReadPreference = require('../topologies/read_preference');
+
+var getReadPreference = function(cmd, options) {
+ // Default to command version of the readPreference
+ var readPreference = cmd.readPreference || new ReadPreference('primary');
+ // If we have an option readPreference override the command one
+ if(options.readPreference) {
+ readPreference = options.readPreference;
+ }
+
+ if(typeof readPreference == 'string') {
+ readPreference = new ReadPreference(readPreference);
+ }
+
+ if(!(readPreference instanceof ReadPreference)) {
+ throw new MongoError('readPreference must be a ReadPreference instance');
+ }
+
+ return readPreference;
+}
+
+module.exports = {
+ getReadPreference: getReadPreference
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/.npmignore
new file mode 100644
index 0000000..e920c16
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/.npmignore
@@ -0,0 +1,33 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+
+# Runtime data
+pids
+*.pid
+*.seed
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+
+# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (http://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directory
+node_modules
+
+# Optional npm cache directory
+.npm
+
+# Optional REPL history
+.node_repl_history
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/.travis.yml b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/.travis.yml
new file mode 100644
index 0000000..38de5c6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.12"
+ - "4.2.1"
+sudo: false
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/LICENSE
new file mode 100644
index 0000000..8dada3e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright {yyyy} {name of copyright owner}
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/README.md
new file mode 100644
index 0000000..c0323f0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/README.md
@@ -0,0 +1,2 @@
+# require_optional
+Work around the problem that we do not have a optionalPeerDependencies concept in node.js making it a hassle to optionally include native modules
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/index.js
new file mode 100644
index 0000000..9754581
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/index.js
@@ -0,0 +1,109 @@
+var path = require('path'),
+ fs = require('fs'),
+ f = require('util').format,
+ resolveFrom = require('resolve-from'),
+ semver = require('semver');
+
+var exists = fs.existsSync || path.existsSync;
+
+var find_package_json = function(location) {
+ var found = false;
+
+ while(!found) {
+ if (exists(location + '/package.json')) {
+ found = location;
+ } else if (location !== '/') {
+ location = path.dirname(location);
+ } else {
+ return false;
+ }
+ }
+
+ return location;
+}
+
+var require_optional = function(name, options) {
+ options = options || {};
+ options.strict = typeof options.strict == 'boolean' ? options.strict : true;
+
+ // Current location
+ var location = __dirname;
+ // Check if we have a parent
+ if(module.parent) {
+ location = module.parent.filename;
+ }
+
+ // Locate this module's package.json file
+ var location = find_package_json(location);
+ if(!location) {
+ throw new Error('package.json can not be located');
+ }
+
+ // Read the package.json file
+ var object = JSON.parse(fs.readFileSync(f('%s/package.json', location)));
+ // Is the name defined by interal file references
+ var parts = name.split(/\//);
+
+ // Optional dependencies exist
+ if(!object.peerOptionalDependencies) {
+ throw new Error(f('no optional dependency [%s] defined in peerOptionalDependencies in package.json', parts[0]));
+ } else if(object.peerOptionalDependencies && !object.peerOptionalDependencies[parts[0]]) {
+ throw new Error(f('no optional dependency [%s] defined in peerOptionalDependencies in package.json', parts[0]));
+ }
+
+ // Unpack the expected version
+ var expectedVersions = object.peerOptionalDependencies[parts[0]];
+ // The resolved package
+ var moduleEntry = undefined;
+ // Module file
+ var moduleEntryFile = name;
+
+ try {
+ // Validate if it's possible to read the module
+ moduleEntry = require(moduleEntryFile);
+ } catch(err) {
+ // Attempt to resolve in top level package
+ try {
+ // Get the module entry file
+ moduleEntryFile = resolveFrom(process.cwd(), name);
+ if(moduleEntryFile == null) return undefined;
+ // Attempt to resolve the module
+ moduleEntry = require(moduleEntryFile);
+ } catch(err) {
+ if(err.code === 'MODULE_NOT_FOUND') return undefined;
+ }
+ }
+
+ // Resolve the location of the module's package.json file
+ var location = find_package_json(require.resolve(moduleEntryFile));
+ if(!location) {
+ throw new Error('package.json can not be located');
+ }
+
+ // Read the module file
+ var dependentOnModule = JSON.parse(fs.readFileSync(f('%s/package.json', location)));
+ // Get the version
+ var version = dependentOnModule.version;
+ // Validate if the found module satisfies the version id
+ if(semver.satisfies(version, expectedVersions) == false
+ && options.strict) {
+ var error = new Error(f('optional dependency [%s] found but version [%s] did not satisfy constraint [%s]', parts[0], version, expectedVersions));
+ error.code = 'OPTIONAL_MODULE_NOT_FOUND';
+ throw error;
+ }
+
+ // Satifies the module requirement
+ return moduleEntry;
+}
+
+require_optional.exists = function(name) {
+ try {
+ var m = require_optional(name);
+ if(m === undefined) return false;
+ return true;
+ } catch(err) {
+ return false;
+ }
+}
+
+module.exports = require_optional;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/.bin/semver b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/.bin/semver
new file mode 100644
index 0000000..d592e69
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/.bin/semver
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../semver/bin/semver" "$@"
+ ret=$?
+else
+ node "$basedir/../semver/bin/semver" "$@"
+ ret=$?
+fi
+exit $ret
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/.bin/semver.cmd b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/.bin/semver.cmd
new file mode 100644
index 0000000..eabc737
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/.bin/semver.cmd
@@ -0,0 +1,7 @@
+@IF EXIST "%~dp0\node.exe" (
+ "%~dp0\node.exe" "%~dp0\..\semver\bin\semver" %*
+) ELSE (
+ @SETLOCAL
+ @SET PATHEXT=%PATHEXT:;.JS;=;%
+ node "%~dp0\..\semver\bin\semver" %*
+) \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/index.js
new file mode 100644
index 0000000..434159f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/index.js
@@ -0,0 +1,23 @@
+'use strict';
+var path = require('path');
+var Module = require('module');
+
+module.exports = function (fromDir, moduleId) {
+ if (typeof fromDir !== 'string' || typeof moduleId !== 'string') {
+ throw new TypeError('Expected `fromDir` and `moduleId` to be a string');
+ }
+
+ fromDir = path.resolve(fromDir);
+
+ var fromFile = path.join(fromDir, 'noop.js');
+
+ try {
+ return Module._resolveFilename(moduleId, {
+ id: fromFile,
+ filename: fromFile,
+ paths: Module._nodeModulePaths(fromDir)
+ });
+ } catch (err) {
+ return null;
+ }
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/license b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/package.json
new file mode 100644
index 0000000..c7a957b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/package.json
@@ -0,0 +1,63 @@
+{
+ "name": "resolve-from",
+ "version": "2.0.0",
+ "description": "Resolve the path of a module like require.resolve() but from a given path",
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/sindresorhus/resolve-from"
+ },
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "require",
+ "resolve",
+ "path",
+ "module",
+ "from",
+ "like",
+ "path"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "gitHead": "583e0f8df06e1bc4d1c96d8d4f2484c745f522c3",
+ "bugs": {
+ "url": "https://github.com/sindresorhus/resolve-from/issues"
+ },
+ "homepage": "https://github.com/sindresorhus/resolve-from",
+ "_id": "resolve-from@2.0.0",
+ "_shasum": "9480ab20e94ffa1d9e80a804c7ea147611966b57",
+ "_from": "resolve-from@>=2.0.0 <3.0.0",
+ "_npmVersion": "2.14.7",
+ "_nodeVersion": "4.2.1",
+ "_npmUser": {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ },
+ "dist": {
+ "shasum": "9480ab20e94ffa1d9e80a804c7ea147611966b57",
+ "tarball": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ }
+ ],
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/readme.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/readme.md
new file mode 100644
index 0000000..bb4ca91
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from/readme.md
@@ -0,0 +1,58 @@
+# resolve-from [![Build Status](https://travis-ci.org/sindresorhus/resolve-from.svg?branch=master)](https://travis-ci.org/sindresorhus/resolve-from)
+
+> Resolve the path of a module like [`require.resolve()`](http://nodejs.org/api/globals.html#globals_require_resolve) but from a given path
+
+Unlike `require.resolve()` it returns `null` instead of throwing when the module can't be found.
+
+
+## Install
+
+```
+$ npm install --save resolve-from
+```
+
+
+## Usage
+
+```js
+const resolveFrom = require('resolve-from');
+
+// there's a file at `./foo/bar.js`
+
+resolveFrom('foo', './bar');
+//=> '/Users/sindresorhus/dev/test/foo/bar.js'
+```
+
+
+## API
+
+### resolveFrom(fromDir, moduleId)
+
+#### fromDir
+
+Type: `string`
+
+Directory to resolve from.
+
+#### moduleId
+
+Type: `string`
+
+What you would use in `require()`.
+
+
+## Tip
+
+Create a partial using a bound function if you want to require from the same `fromDir` multiple times:
+
+```js
+const resolveFromFoo = resolveFrom.bind(null, 'foo');
+
+resolveFromFoo('./bar');
+resolveFromFoo('./baz');
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/README.md
new file mode 100644
index 0000000..cbd9565
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/README.md
@@ -0,0 +1,350 @@
+semver(1) -- The semantic versioner for npm
+===========================================
+
+## Usage
+
+ $ npm install semver
+ $ node
+ var semver = require('semver')
+
+ semver.valid('1.2.3') // '1.2.3'
+ semver.valid('a.b.c') // null
+ semver.clean(' =v1.2.3 ') // '1.2.3'
+ semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
+ semver.gt('1.2.3', '9.8.7') // false
+ semver.lt('1.2.3', '9.8.7') // true
+
+As a command-line utility:
+
+ $ semver -h
+
+ SemVer 5.1.0
+
+ A JavaScript implementation of the http://semver.org/ specification
+ Copyright Isaac Z. Schlueter
+
+ Usage: semver [options] <version> [<version> [...]]
+ Prints valid versions sorted by SemVer precedence
+
+ Options:
+ -r --range <range>
+ Print versions that match the specified range.
+
+ -i --increment [<level>]
+ Increment a version by the specified level. Level can
+ be one of: major, minor, patch, premajor, preminor,
+ prepatch, or prerelease. Default level is 'patch'.
+ Only one version may be specified.
+
+ --preid <identifier>
+ Identifier to be used to prefix premajor, preminor,
+ prepatch or prerelease version increments.
+
+ -l --loose
+ Interpret versions and ranges loosely
+
+ Program exits successfully if any valid version satisfies
+ all supplied ranges, and prints all satisfying versions.
+
+ If no satisfying versions are found, then exits failure.
+
+ Versions are printed in ascending order, so supplying
+ multiple versions to the utility will just sort them.
+
+## Versions
+
+A "version" is described by the `v2.0.0` specification found at
+<http://semver.org/>.
+
+A leading `"="` or `"v"` character is stripped off and ignored.
+
+## Ranges
+
+A `version range` is a set of `comparators` which specify versions
+that satisfy the range.
+
+A `comparator` is composed of an `operator` and a `version`. The set
+of primitive `operators` is:
+
+* `<` Less than
+* `<=` Less than or equal to
+* `>` Greater than
+* `>=` Greater than or equal to
+* `=` Equal. If no operator is specified, then equality is assumed,
+ so this operator is optional, but MAY be included.
+
+For example, the comparator `>=1.2.7` would match the versions
+`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
+or `1.1.0`.
+
+Comparators can be joined by whitespace to form a `comparator set`,
+which is satisfied by the **intersection** of all of the comparators
+it includes.
+
+A range is composed of one or more comparator sets, joined by `||`. A
+version matches a range if and only if every comparator in at least
+one of the `||`-separated comparator sets is satisfied by the version.
+
+For example, the range `>=1.2.7 <1.3.0` would match the versions
+`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
+or `1.1.0`.
+
+The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
+`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
+
+### Prerelease Tags
+
+If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
+it will only be allowed to satisfy comparator sets if at least one
+comparator with the same `[major, minor, patch]` tuple also has a
+prerelease tag.
+
+For example, the range `>1.2.3-alpha.3` would be allowed to match the
+version `1.2.3-alpha.7`, but it would *not* be satisfied by
+`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
+than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
+range only accepts prerelease tags on the `1.2.3` version. The
+version `3.4.5` *would* satisfy the range, because it does not have a
+prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
+
+The purpose for this behavior is twofold. First, prerelease versions
+frequently are updated very quickly, and contain many breaking changes
+that are (by the author's design) not yet fit for public consumption.
+Therefore, by default, they are excluded from range matching
+semantics.
+
+Second, a user who has opted into using a prerelease version has
+clearly indicated the intent to use *that specific* set of
+alpha/beta/rc versions. By including a prerelease tag in the range,
+the user is indicating that they are aware of the risk. However, it
+is still not appropriate to assume that they have opted into taking a
+similar risk on the *next* set of prerelease versions.
+
+#### Prerelease Identifiers
+
+The method `.inc` takes an additional `identifier` string argument that
+will append the value of the string as a prerelease identifier:
+
+```javascript
+> semver.inc('1.2.3', 'prerelease', 'beta')
+'1.2.4-beta.0'
+```
+
+command-line example:
+
+```shell
+$ semver 1.2.3 -i prerelease --preid beta
+1.2.4-beta.0
+```
+
+Which then can be used to increment further:
+
+```shell
+$ semver 1.2.4-beta.0 -i prerelease
+1.2.4-beta.1
+```
+
+### Advanced Range Syntax
+
+Advanced range syntax desugars to primitive comparators in
+deterministic ways.
+
+Advanced ranges may be combined in the same way as primitive
+comparators using white space or `||`.
+
+#### Hyphen Ranges `X.Y.Z - A.B.C`
+
+Specifies an inclusive set.
+
+* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
+
+If a partial version is provided as the first version in the inclusive
+range, then the missing pieces are replaced with zeroes.
+
+* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
+
+If a partial version is provided as the second version in the
+inclusive range, then all versions that start with the supplied parts
+of the tuple are accepted, but nothing that would be greater than the
+provided tuple parts.
+
+* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
+* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
+
+#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
+
+Any of `X`, `x`, or `*` may be used to "stand in" for one of the
+numeric values in the `[major, minor, patch]` tuple.
+
+* `*` := `>=0.0.0` (Any version satisfies)
+* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
+* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
+
+A partial version range is treated as an X-Range, so the special
+character is in fact optional.
+
+* `""` (empty string) := `*` := `>=0.0.0`
+* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
+* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
+
+#### Tilde Ranges `~1.2.3` `~1.2` `~1`
+
+Allows patch-level changes if a minor version is specified on the
+comparator. Allows minor-level changes if not.
+
+* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
+* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
+* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
+* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
+* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
+* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
+* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+
+#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
+
+Allows changes that do not modify the left-most non-zero digit in the
+`[major, minor, patch]` tuple. In other words, this allows patch and
+minor updates for versions `1.0.0` and above, patch updates for
+versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
+
+Many authors treat a `0.x` version as if the `x` were the major
+"breaking-change" indicator.
+
+Caret ranges are ideal when an author may make breaking changes
+between `0.2.4` and `0.3.0` releases, which is a common practice.
+However, it presumes that there will *not* be breaking changes between
+`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
+additive (but non-breaking), according to commonly observed practices.
+
+* `^1.2.3` := `>=1.2.3 <2.0.0`
+* `^0.2.3` := `>=0.2.3 <0.3.0`
+* `^0.0.3` := `>=0.0.3 <0.0.4`
+* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
+ `0.0.3` version *only* will be allowed, if they are greater than or
+ equal to `beta`. So, `0.0.3-pr.2` would be allowed.
+
+When parsing caret ranges, a missing `patch` value desugars to the
+number `0`, but will allow flexibility within that value, even if the
+major and minor versions are both `0`.
+
+* `^1.2.x` := `>=1.2.0 <2.0.0`
+* `^0.0.x` := `>=0.0.0 <0.1.0`
+* `^0.0` := `>=0.0.0 <0.1.0`
+
+A missing `minor` and `patch` values will desugar to zero, but also
+allow flexibility within those values, even if the major version is
+zero.
+
+* `^1.x` := `>=1.0.0 <2.0.0`
+* `^0.x` := `>=0.0.0 <1.0.0`
+
+### Range Grammar
+
+Putting all this together, here is a Backus-Naur grammar for ranges,
+for the benefit of parser authors:
+
+```bnf
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
+```
+
+## Functions
+
+All methods and classes take a final `loose` boolean argument that, if
+true, will be more forgiving about not-quite-valid semver strings.
+The resulting output will always be 100% strict, of course.
+
+Strict-mode Comparators and Ranges will be strict about the SemVer
+strings that they parse.
+
+* `valid(v)`: Return the parsed version, or null if it's not valid.
+* `inc(v, release)`: Return the version incremented by the release
+ type (`major`, `premajor`, `minor`, `preminor`, `patch`,
+ `prepatch`, or `prerelease`), or null if it's not valid
+ * `premajor` in one call will bump the version up to the next major
+ version and down to a prerelease of that major version.
+ `preminor`, and `prepatch` work the same way.
+ * If called from a non-prerelease version, the `prerelease` will work the
+ same as `prepatch`. It increments the patch version, then makes a
+ prerelease. If the input version is already a prerelease it simply
+ increments it.
+* `prerelease(v)`: Returns an array of prerelease components, or null
+ if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
+* `major(v)`: Return the major version number.
+* `minor(v)`: Return the minor version number.
+* `patch(v)`: Return the patch version number.
+
+### Comparison
+
+* `gt(v1, v2)`: `v1 > v2`
+* `gte(v1, v2)`: `v1 >= v2`
+* `lt(v1, v2)`: `v1 < v2`
+* `lte(v1, v2)`: `v1 <= v2`
+* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
+ even if they're not the exact same string. You already know how to
+ compare strings.
+* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
+* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
+ the corresponding function above. `"==="` and `"!=="` do simple
+ string comparison, but are included for completeness. Throws if an
+ invalid comparison string is provided.
+* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
+ `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
+* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
+ in descending order when passed to `Array.sort()`.
+* `diff(v1, v2)`: Returns difference between two versions by the release type
+ (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
+ or null if the versions are the same.
+
+
+### Ranges
+
+* `validRange(range)`: Return the valid range or null if it's not valid
+* `satisfies(version, range)`: Return true if the version satisfies the
+ range.
+* `maxSatisfying(versions, range)`: Return the highest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `minSatisfying(versions, range)`: Return the lowest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `gtr(version, range)`: Return `true` if version is greater than all the
+ versions possible in the range.
+* `ltr(version, range)`: Return `true` if version is less than all the
+ versions possible in the range.
+* `outside(version, range, hilo)`: Return true if the version is outside
+ the bounds of the range in either the high or low direction. The
+ `hilo` argument must be either the string `'>'` or `'<'`. (This is
+ the function called by `gtr` and `ltr`.)
+
+Note that, since ranges may be non-contiguous, a version might not be
+greater than a range, less than a range, *or* satisfy a range! For
+example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
+until `2.0.0`, so the version `1.2.10` would not be greater than the
+range (because `2.0.1` satisfies, which is higher), nor less than the
+range (since `1.2.8` satisfies, which is lower), and it also does not
+satisfy the range.
+
+If you want to know if a version satisfies or does not satisfy a
+range, use the `satisfies(version, range)` function.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/bin/semver b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/bin/semver
new file mode 100644
index 0000000..c5f2e85
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/bin/semver
@@ -0,0 +1,133 @@
+#!/usr/bin/env node
+// Standalone semver comparison program.
+// Exits successfully and prints matching version(s) if
+// any supplied version is valid and passes all tests.
+
+var argv = process.argv.slice(2)
+ , versions = []
+ , range = []
+ , gt = []
+ , lt = []
+ , eq = []
+ , inc = null
+ , version = require("../package.json").version
+ , loose = false
+ , identifier = undefined
+ , semver = require("../semver")
+ , reverse = false
+
+main()
+
+function main () {
+ if (!argv.length) return help()
+ while (argv.length) {
+ var a = argv.shift()
+ var i = a.indexOf('=')
+ if (i !== -1) {
+ a = a.slice(0, i)
+ argv.unshift(a.slice(i + 1))
+ }
+ switch (a) {
+ case "-rv": case "-rev": case "--rev": case "--reverse":
+ reverse = true
+ break
+ case "-l": case "--loose":
+ loose = true
+ break
+ case "-v": case "--version":
+ versions.push(argv.shift())
+ break
+ case "-i": case "--inc": case "--increment":
+ switch (argv[0]) {
+ case "major": case "minor": case "patch": case "prerelease":
+ case "premajor": case "preminor": case "prepatch":
+ inc = argv.shift()
+ break
+ default:
+ inc = "patch"
+ break
+ }
+ break
+ case "--preid":
+ identifier = argv.shift()
+ break
+ case "-r": case "--range":
+ range.push(argv.shift())
+ break
+ case "-h": case "--help": case "-?":
+ return help()
+ default:
+ versions.push(a)
+ break
+ }
+ }
+
+ versions = versions.filter(function (v) {
+ return semver.valid(v, loose)
+ })
+ if (!versions.length) return fail()
+ if (inc && (versions.length !== 1 || range.length))
+ return failInc()
+
+ for (var i = 0, l = range.length; i < l ; i ++) {
+ versions = versions.filter(function (v) {
+ return semver.satisfies(v, range[i], loose)
+ })
+ if (!versions.length) return fail()
+ }
+ return success(versions)
+}
+
+function failInc () {
+ console.error("--inc can only be used on a single version with no range")
+ fail()
+}
+
+function fail () { process.exit(1) }
+
+function success () {
+ var compare = reverse ? "rcompare" : "compare"
+ versions.sort(function (a, b) {
+ return semver[compare](a, b, loose)
+ }).map(function (v) {
+ return semver.clean(v, loose)
+ }).map(function (v) {
+ return inc ? semver.inc(v, inc, loose, identifier) : v
+ }).forEach(function (v,i,_) { console.log(v) })
+}
+
+function help () {
+ console.log(["SemVer " + version
+ ,""
+ ,"A JavaScript implementation of the http://semver.org/ specification"
+ ,"Copyright Isaac Z. Schlueter"
+ ,""
+ ,"Usage: semver [options] <version> [<version> [...]]"
+ ,"Prints valid versions sorted by SemVer precedence"
+ ,""
+ ,"Options:"
+ ,"-r --range <range>"
+ ," Print versions that match the specified range."
+ ,""
+ ,"-i --increment [<level>]"
+ ," Increment a version by the specified level. Level can"
+ ," be one of: major, minor, patch, premajor, preminor,"
+ ," prepatch, or prerelease. Default level is 'patch'."
+ ," Only one version may be specified."
+ ,""
+ ,"--preid <identifier>"
+ ," Identifier to be used to prefix premajor, preminor,"
+ ," prepatch or prerelease version increments."
+ ,""
+ ,"-l --loose"
+ ," Interpret versions and ranges loosely"
+ ,""
+ ,"Program exits successfully if any valid version satisfies"
+ ,"all supplied ranges, and prints all satisfying versions."
+ ,""
+ ,"If no satisfying versions are found, then exits failure."
+ ,""
+ ,"Versions are printed in ascending order, so supplying"
+ ,"multiple versions to the utility will just sort them."
+ ].join("\n"))
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/package.json
new file mode 100644
index 0000000..0924041
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/package.json
@@ -0,0 +1,59 @@
+{
+ "name": "semver",
+ "version": "5.3.0",
+ "description": "The semantic version parser used by npm.",
+ "main": "semver.js",
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "devDependencies": {
+ "tap": "^2.0.0"
+ },
+ "license": "ISC",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/node-semver.git"
+ },
+ "bin": {
+ "semver": "./bin/semver"
+ },
+ "files": [
+ "bin",
+ "range.bnf",
+ "semver.js"
+ ],
+ "gitHead": "d21444a0658224b152ce54965d02dbe0856afb84",
+ "bugs": {
+ "url": "https://github.com/npm/node-semver/issues"
+ },
+ "homepage": "https://github.com/npm/node-semver#readme",
+ "_id": "semver@5.3.0",
+ "_shasum": "9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f",
+ "_from": "semver@>=5.1.0 <6.0.0",
+ "_npmVersion": "3.10.6",
+ "_nodeVersion": "4.4.4",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "dist": {
+ "shasum": "9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f",
+ "tarball": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "isaacs@npmjs.com"
+ },
+ {
+ "name": "othiym23",
+ "email": "ogd@aoaioxxysz.net"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/semver-5.3.0.tgz_1468515166602_0.9155273644719273"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/range.bnf b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/range.bnf
new file mode 100644
index 0000000..25ebd5c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/range.bnf
@@ -0,0 +1,16 @@
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/semver.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/semver.js
new file mode 100644
index 0000000..5f1a3c5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver/semver.js
@@ -0,0 +1,1203 @@
+exports = module.exports = SemVer;
+
+// The debug function is excluded entirely from the minified version.
+/* nomin */ var debug;
+/* nomin */ if (typeof process === 'object' &&
+ /* nomin */ process.env &&
+ /* nomin */ process.env.NODE_DEBUG &&
+ /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG))
+ /* nomin */ debug = function() {
+ /* nomin */ var args = Array.prototype.slice.call(arguments, 0);
+ /* nomin */ args.unshift('SEMVER');
+ /* nomin */ console.log.apply(console, args);
+ /* nomin */ };
+/* nomin */ else
+ /* nomin */ debug = function() {};
+
+// Note: this is the semver.org version of the spec that it implements
+// Not necessarily the package version of this code.
+exports.SEMVER_SPEC_VERSION = '2.0.0';
+
+var MAX_LENGTH = 256;
+var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
+
+// The actual regexps go on exports.re
+var re = exports.re = [];
+var src = exports.src = [];
+var R = 0;
+
+// The following Regular Expressions can be used for tokenizing,
+// validating, and parsing SemVer version strings.
+
+// ## Numeric Identifier
+// A single `0`, or a non-zero digit followed by zero or more digits.
+
+var NUMERICIDENTIFIER = R++;
+src[NUMERICIDENTIFIER] = '0|[1-9]\\d*';
+var NUMERICIDENTIFIERLOOSE = R++;
+src[NUMERICIDENTIFIERLOOSE] = '[0-9]+';
+
+
+// ## Non-numeric Identifier
+// Zero or more digits, followed by a letter or hyphen, and then zero or
+// more letters, digits, or hyphens.
+
+var NONNUMERICIDENTIFIER = R++;
+src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
+
+
+// ## Main Version
+// Three dot-separated numeric identifiers.
+
+var MAINVERSION = R++;
+src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')';
+
+var MAINVERSIONLOOSE = R++;
+src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')';
+
+// ## Pre-release Version Identifier
+// A numeric identifier, or a non-numeric identifier.
+
+var PRERELEASEIDENTIFIER = R++;
+src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')';
+
+var PRERELEASEIDENTIFIERLOOSE = R++;
+src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')';
+
+
+// ## Pre-release Version
+// Hyphen, followed by one or more dot-separated pre-release version
+// identifiers.
+
+var PRERELEASE = R++;
+src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))';
+
+var PRERELEASELOOSE = R++;
+src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))';
+
+// ## Build Metadata Identifier
+// Any combination of digits, letters, or hyphens.
+
+var BUILDIDENTIFIER = R++;
+src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
+
+// ## Build Metadata
+// Plus sign, followed by one or more period-separated build metadata
+// identifiers.
+
+var BUILD = R++;
+src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
+ '(?:\\.' + src[BUILDIDENTIFIER] + ')*))';
+
+
+// ## Full Version String
+// A main version, followed optionally by a pre-release version and
+// build metadata.
+
+// Note that the only major, minor, patch, and pre-release sections of
+// the version string are capturing groups. The build metadata is not a
+// capturing group, because it should not ever be used in version
+// comparison.
+
+var FULL = R++;
+var FULLPLAIN = 'v?' + src[MAINVERSION] +
+ src[PRERELEASE] + '?' +
+ src[BUILD] + '?';
+
+src[FULL] = '^' + FULLPLAIN + '$';
+
+// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
+// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
+// common in the npm registry.
+var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
+ src[PRERELEASELOOSE] + '?' +
+ src[BUILD] + '?';
+
+var LOOSE = R++;
+src[LOOSE] = '^' + LOOSEPLAIN + '$';
+
+var GTLT = R++;
+src[GTLT] = '((?:<|>)?=?)';
+
+// Something like "2.*" or "1.2.x".
+// Note that "x.x" is a valid xRange identifer, meaning "any version"
+// Only the first item is strictly required.
+var XRANGEIDENTIFIERLOOSE = R++;
+src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
+var XRANGEIDENTIFIER = R++;
+src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*';
+
+var XRANGEPLAIN = R++;
+src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:' + src[PRERELEASE] + ')?' +
+ src[BUILD] + '?' +
+ ')?)?';
+
+var XRANGEPLAINLOOSE = R++;
+src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:' + src[PRERELEASELOOSE] + ')?' +
+ src[BUILD] + '?' +
+ ')?)?';
+
+var XRANGE = R++;
+src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$';
+var XRANGELOOSE = R++;
+src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$';
+
+// Tilde ranges.
+// Meaning is "reasonably at or greater than"
+var LONETILDE = R++;
+src[LONETILDE] = '(?:~>?)';
+
+var TILDETRIM = R++;
+src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+';
+re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g');
+var tildeTrimReplace = '$1~';
+
+var TILDE = R++;
+src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';
+var TILDELOOSE = R++;
+src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$';
+
+// Caret ranges.
+// Meaning is "at least and backwards compatible with"
+var LONECARET = R++;
+src[LONECARET] = '(?:\\^)';
+
+var CARETTRIM = R++;
+src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+';
+re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g');
+var caretTrimReplace = '$1^';
+
+var CARET = R++;
+src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$';
+var CARETLOOSE = R++;
+src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$';
+
+// A simple gt/lt/eq thing, or just "" to indicate "any version"
+var COMPARATORLOOSE = R++;
+src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$';
+var COMPARATOR = R++;
+src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$';
+
+
+// An expression to strip any whitespace between the gtlt and the thing
+// it modifies, so that `> 1.2.3` ==> `>1.2.3`
+var COMPARATORTRIM = R++;
+src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
+ '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')';
+
+// this one has to use the /g flag
+re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');
+var comparatorTrimReplace = '$1$2$3';
+
+
+// Something like `1.2.3 - 1.2.4`
+// Note that these all use the loose form, because they'll be
+// checked against either the strict or loose comparator form
+// later.
+var HYPHENRANGE = R++;
+src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAIN] + ')' +
+ '\\s*$';
+
+var HYPHENRANGELOOSE = R++;
+src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s*$';
+
+// Star ranges basically just allow anything at all.
+var STAR = R++;
+src[STAR] = '(<|>)?=?\\s*\\*';
+
+// Compile to actual regexp objects.
+// All are flag-free, unless they were created above with a flag.
+for (var i = 0; i < R; i++) {
+ debug(i, src[i]);
+ if (!re[i])
+ re[i] = new RegExp(src[i]);
+}
+
+exports.parse = parse;
+function parse(version, loose) {
+ if (version instanceof SemVer)
+ return version;
+
+ if (typeof version !== 'string')
+ return null;
+
+ if (version.length > MAX_LENGTH)
+ return null;
+
+ var r = loose ? re[LOOSE] : re[FULL];
+ if (!r.test(version))
+ return null;
+
+ try {
+ return new SemVer(version, loose);
+ } catch (er) {
+ return null;
+ }
+}
+
+exports.valid = valid;
+function valid(version, loose) {
+ var v = parse(version, loose);
+ return v ? v.version : null;
+}
+
+
+exports.clean = clean;
+function clean(version, loose) {
+ var s = parse(version.trim().replace(/^[=v]+/, ''), loose);
+ return s ? s.version : null;
+}
+
+exports.SemVer = SemVer;
+
+function SemVer(version, loose) {
+ if (version instanceof SemVer) {
+ if (version.loose === loose)
+ return version;
+ else
+ version = version.version;
+ } else if (typeof version !== 'string') {
+ throw new TypeError('Invalid Version: ' + version);
+ }
+
+ if (version.length > MAX_LENGTH)
+ throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
+
+ if (!(this instanceof SemVer))
+ return new SemVer(version, loose);
+
+ debug('SemVer', version, loose);
+ this.loose = loose;
+ var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);
+
+ if (!m)
+ throw new TypeError('Invalid Version: ' + version);
+
+ this.raw = version;
+
+ // these are actually numbers
+ this.major = +m[1];
+ this.minor = +m[2];
+ this.patch = +m[3];
+
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0)
+ throw new TypeError('Invalid major version')
+
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)
+ throw new TypeError('Invalid minor version')
+
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)
+ throw new TypeError('Invalid patch version')
+
+ // numberify any prerelease numeric ids
+ if (!m[4])
+ this.prerelease = [];
+ else
+ this.prerelease = m[4].split('.').map(function(id) {
+ if (/^[0-9]+$/.test(id)) {
+ var num = +id;
+ if (num >= 0 && num < MAX_SAFE_INTEGER)
+ return num;
+ }
+ return id;
+ });
+
+ this.build = m[5] ? m[5].split('.') : [];
+ this.format();
+}
+
+SemVer.prototype.format = function() {
+ this.version = this.major + '.' + this.minor + '.' + this.patch;
+ if (this.prerelease.length)
+ this.version += '-' + this.prerelease.join('.');
+ return this.version;
+};
+
+SemVer.prototype.toString = function() {
+ return this.version;
+};
+
+SemVer.prototype.compare = function(other) {
+ debug('SemVer.compare', this.version, this.loose, other);
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ return this.compareMain(other) || this.comparePre(other);
+};
+
+SemVer.prototype.compareMain = function(other) {
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ return compareIdentifiers(this.major, other.major) ||
+ compareIdentifiers(this.minor, other.minor) ||
+ compareIdentifiers(this.patch, other.patch);
+};
+
+SemVer.prototype.comparePre = function(other) {
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ // NOT having a prerelease is > having one
+ if (this.prerelease.length && !other.prerelease.length)
+ return -1;
+ else if (!this.prerelease.length && other.prerelease.length)
+ return 1;
+ else if (!this.prerelease.length && !other.prerelease.length)
+ return 0;
+
+ var i = 0;
+ do {
+ var a = this.prerelease[i];
+ var b = other.prerelease[i];
+ debug('prerelease compare', i, a, b);
+ if (a === undefined && b === undefined)
+ return 0;
+ else if (b === undefined)
+ return 1;
+ else if (a === undefined)
+ return -1;
+ else if (a === b)
+ continue;
+ else
+ return compareIdentifiers(a, b);
+ } while (++i);
+};
+
+// preminor will bump the version up to the next minor release, and immediately
+// down to pre-release. premajor and prepatch work the same way.
+SemVer.prototype.inc = function(release, identifier) {
+ switch (release) {
+ case 'premajor':
+ this.prerelease.length = 0;
+ this.patch = 0;
+ this.minor = 0;
+ this.major++;
+ this.inc('pre', identifier);
+ break;
+ case 'preminor':
+ this.prerelease.length = 0;
+ this.patch = 0;
+ this.minor++;
+ this.inc('pre', identifier);
+ break;
+ case 'prepatch':
+ // If this is already a prerelease, it will bump to the next version
+ // drop any prereleases that might already exist, since they are not
+ // relevant at this point.
+ this.prerelease.length = 0;
+ this.inc('patch', identifier);
+ this.inc('pre', identifier);
+ break;
+ // If the input is a non-prerelease version, this acts the same as
+ // prepatch.
+ case 'prerelease':
+ if (this.prerelease.length === 0)
+ this.inc('patch', identifier);
+ this.inc('pre', identifier);
+ break;
+
+ case 'major':
+ // If this is a pre-major version, bump up to the same major version.
+ // Otherwise increment major.
+ // 1.0.0-5 bumps to 1.0.0
+ // 1.1.0 bumps to 2.0.0
+ if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0)
+ this.major++;
+ this.minor = 0;
+ this.patch = 0;
+ this.prerelease = [];
+ break;
+ case 'minor':
+ // If this is a pre-minor version, bump up to the same minor version.
+ // Otherwise increment minor.
+ // 1.2.0-5 bumps to 1.2.0
+ // 1.2.1 bumps to 1.3.0
+ if (this.patch !== 0 || this.prerelease.length === 0)
+ this.minor++;
+ this.patch = 0;
+ this.prerelease = [];
+ break;
+ case 'patch':
+ // If this is not a pre-release version, it will increment the patch.
+ // If it is a pre-release it will bump up to the same patch version.
+ // 1.2.0-5 patches to 1.2.0
+ // 1.2.0 patches to 1.2.1
+ if (this.prerelease.length === 0)
+ this.patch++;
+ this.prerelease = [];
+ break;
+ // This probably shouldn't be used publicly.
+ // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
+ case 'pre':
+ if (this.prerelease.length === 0)
+ this.prerelease = [0];
+ else {
+ var i = this.prerelease.length;
+ while (--i >= 0) {
+ if (typeof this.prerelease[i] === 'number') {
+ this.prerelease[i]++;
+ i = -2;
+ }
+ }
+ if (i === -1) // didn't increment anything
+ this.prerelease.push(0);
+ }
+ if (identifier) {
+ // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
+ // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
+ if (this.prerelease[0] === identifier) {
+ if (isNaN(this.prerelease[1]))
+ this.prerelease = [identifier, 0];
+ } else
+ this.prerelease = [identifier, 0];
+ }
+ break;
+
+ default:
+ throw new Error('invalid increment argument: ' + release);
+ }
+ this.format();
+ this.raw = this.version;
+ return this;
+};
+
+exports.inc = inc;
+function inc(version, release, loose, identifier) {
+ if (typeof(loose) === 'string') {
+ identifier = loose;
+ loose = undefined;
+ }
+
+ try {
+ return new SemVer(version, loose).inc(release, identifier).version;
+ } catch (er) {
+ return null;
+ }
+}
+
+exports.diff = diff;
+function diff(version1, version2) {
+ if (eq(version1, version2)) {
+ return null;
+ } else {
+ var v1 = parse(version1);
+ var v2 = parse(version2);
+ if (v1.prerelease.length || v2.prerelease.length) {
+ for (var key in v1) {
+ if (key === 'major' || key === 'minor' || key === 'patch') {
+ if (v1[key] !== v2[key]) {
+ return 'pre'+key;
+ }
+ }
+ }
+ return 'prerelease';
+ }
+ for (var key in v1) {
+ if (key === 'major' || key === 'minor' || key === 'patch') {
+ if (v1[key] !== v2[key]) {
+ return key;
+ }
+ }
+ }
+ }
+}
+
+exports.compareIdentifiers = compareIdentifiers;
+
+var numeric = /^[0-9]+$/;
+function compareIdentifiers(a, b) {
+ var anum = numeric.test(a);
+ var bnum = numeric.test(b);
+
+ if (anum && bnum) {
+ a = +a;
+ b = +b;
+ }
+
+ return (anum && !bnum) ? -1 :
+ (bnum && !anum) ? 1 :
+ a < b ? -1 :
+ a > b ? 1 :
+ 0;
+}
+
+exports.rcompareIdentifiers = rcompareIdentifiers;
+function rcompareIdentifiers(a, b) {
+ return compareIdentifiers(b, a);
+}
+
+exports.major = major;
+function major(a, loose) {
+ return new SemVer(a, loose).major;
+}
+
+exports.minor = minor;
+function minor(a, loose) {
+ return new SemVer(a, loose).minor;
+}
+
+exports.patch = patch;
+function patch(a, loose) {
+ return new SemVer(a, loose).patch;
+}
+
+exports.compare = compare;
+function compare(a, b, loose) {
+ return new SemVer(a, loose).compare(b);
+}
+
+exports.compareLoose = compareLoose;
+function compareLoose(a, b) {
+ return compare(a, b, true);
+}
+
+exports.rcompare = rcompare;
+function rcompare(a, b, loose) {
+ return compare(b, a, loose);
+}
+
+exports.sort = sort;
+function sort(list, loose) {
+ return list.sort(function(a, b) {
+ return exports.compare(a, b, loose);
+ });
+}
+
+exports.rsort = rsort;
+function rsort(list, loose) {
+ return list.sort(function(a, b) {
+ return exports.rcompare(a, b, loose);
+ });
+}
+
+exports.gt = gt;
+function gt(a, b, loose) {
+ return compare(a, b, loose) > 0;
+}
+
+exports.lt = lt;
+function lt(a, b, loose) {
+ return compare(a, b, loose) < 0;
+}
+
+exports.eq = eq;
+function eq(a, b, loose) {
+ return compare(a, b, loose) === 0;
+}
+
+exports.neq = neq;
+function neq(a, b, loose) {
+ return compare(a, b, loose) !== 0;
+}
+
+exports.gte = gte;
+function gte(a, b, loose) {
+ return compare(a, b, loose) >= 0;
+}
+
+exports.lte = lte;
+function lte(a, b, loose) {
+ return compare(a, b, loose) <= 0;
+}
+
+exports.cmp = cmp;
+function cmp(a, op, b, loose) {
+ var ret;
+ switch (op) {
+ case '===':
+ if (typeof a === 'object') a = a.version;
+ if (typeof b === 'object') b = b.version;
+ ret = a === b;
+ break;
+ case '!==':
+ if (typeof a === 'object') a = a.version;
+ if (typeof b === 'object') b = b.version;
+ ret = a !== b;
+ break;
+ case '': case '=': case '==': ret = eq(a, b, loose); break;
+ case '!=': ret = neq(a, b, loose); break;
+ case '>': ret = gt(a, b, loose); break;
+ case '>=': ret = gte(a, b, loose); break;
+ case '<': ret = lt(a, b, loose); break;
+ case '<=': ret = lte(a, b, loose); break;
+ default: throw new TypeError('Invalid operator: ' + op);
+ }
+ return ret;
+}
+
+exports.Comparator = Comparator;
+function Comparator(comp, loose) {
+ if (comp instanceof Comparator) {
+ if (comp.loose === loose)
+ return comp;
+ else
+ comp = comp.value;
+ }
+
+ if (!(this instanceof Comparator))
+ return new Comparator(comp, loose);
+
+ debug('comparator', comp, loose);
+ this.loose = loose;
+ this.parse(comp);
+
+ if (this.semver === ANY)
+ this.value = '';
+ else
+ this.value = this.operator + this.semver.version;
+
+ debug('comp', this);
+}
+
+var ANY = {};
+Comparator.prototype.parse = function(comp) {
+ var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
+ var m = comp.match(r);
+
+ if (!m)
+ throw new TypeError('Invalid comparator: ' + comp);
+
+ this.operator = m[1];
+ if (this.operator === '=')
+ this.operator = '';
+
+ // if it literally is just '>' or '' then allow anything.
+ if (!m[2])
+ this.semver = ANY;
+ else
+ this.semver = new SemVer(m[2], this.loose);
+};
+
+Comparator.prototype.toString = function() {
+ return this.value;
+};
+
+Comparator.prototype.test = function(version) {
+ debug('Comparator.test', version, this.loose);
+
+ if (this.semver === ANY)
+ return true;
+
+ if (typeof version === 'string')
+ version = new SemVer(version, this.loose);
+
+ return cmp(version, this.operator, this.semver, this.loose);
+};
+
+
+exports.Range = Range;
+function Range(range, loose) {
+ if ((range instanceof Range) && range.loose === loose)
+ return range;
+
+ if (!(this instanceof Range))
+ return new Range(range, loose);
+
+ this.loose = loose;
+
+ // First, split based on boolean or ||
+ this.raw = range;
+ this.set = range.split(/\s*\|\|\s*/).map(function(range) {
+ return this.parseRange(range.trim());
+ }, this).filter(function(c) {
+ // throw out any that are not relevant for whatever reason
+ return c.length;
+ });
+
+ if (!this.set.length) {
+ throw new TypeError('Invalid SemVer Range: ' + range);
+ }
+
+ this.format();
+}
+
+Range.prototype.format = function() {
+ this.range = this.set.map(function(comps) {
+ return comps.join(' ').trim();
+ }).join('||').trim();
+ return this.range;
+};
+
+Range.prototype.toString = function() {
+ return this.range;
+};
+
+Range.prototype.parseRange = function(range) {
+ var loose = this.loose;
+ range = range.trim();
+ debug('range', range, loose);
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
+ var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
+ range = range.replace(hr, hyphenReplace);
+ debug('hyphen replace', range);
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
+ range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);
+ debug('comparator trim', range, re[COMPARATORTRIM]);
+
+ // `~ 1.2.3` => `~1.2.3`
+ range = range.replace(re[TILDETRIM], tildeTrimReplace);
+
+ // `^ 1.2.3` => `^1.2.3`
+ range = range.replace(re[CARETTRIM], caretTrimReplace);
+
+ // normalize spaces
+ range = range.split(/\s+/).join(' ');
+
+ // At this point, the range is completely trimmed and
+ // ready to be split into comparators.
+
+ var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
+ var set = range.split(' ').map(function(comp) {
+ return parseComparator(comp, loose);
+ }).join(' ').split(/\s+/);
+ if (this.loose) {
+ // in loose mode, throw out any that are not valid comparators
+ set = set.filter(function(comp) {
+ return !!comp.match(compRe);
+ });
+ }
+ set = set.map(function(comp) {
+ return new Comparator(comp, loose);
+ });
+
+ return set;
+};
+
+// Mostly just for testing and legacy API reasons
+exports.toComparators = toComparators;
+function toComparators(range, loose) {
+ return new Range(range, loose).set.map(function(comp) {
+ return comp.map(function(c) {
+ return c.value;
+ }).join(' ').trim().split(' ');
+ });
+}
+
+// comprised of xranges, tildes, stars, and gtlt's at this point.
+// already replaced the hyphen ranges
+// turn into a set of JUST comparators.
+function parseComparator(comp, loose) {
+ debug('comp', comp);
+ comp = replaceCarets(comp, loose);
+ debug('caret', comp);
+ comp = replaceTildes(comp, loose);
+ debug('tildes', comp);
+ comp = replaceXRanges(comp, loose);
+ debug('xrange', comp);
+ comp = replaceStars(comp, loose);
+ debug('stars', comp);
+ return comp;
+}
+
+function isX(id) {
+ return !id || id.toLowerCase() === 'x' || id === '*';
+}
+
+// ~, ~> --> * (any, kinda silly)
+// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
+// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
+// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
+// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
+// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
+function replaceTildes(comp, loose) {
+ return comp.trim().split(/\s+/).map(function(comp) {
+ return replaceTilde(comp, loose);
+ }).join(' ');
+}
+
+function replaceTilde(comp, loose) {
+ var r = loose ? re[TILDELOOSE] : re[TILDE];
+ return comp.replace(r, function(_, M, m, p, pr) {
+ debug('tilde', comp, _, M, m, p, pr);
+ var ret;
+
+ if (isX(M))
+ ret = '';
+ else if (isX(m))
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
+ else if (isX(p))
+ // ~1.2 == >=1.2.0 <1.3.0
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
+ else if (pr) {
+ debug('replaceTilde pr', pr);
+ if (pr.charAt(0) !== '-')
+ pr = '-' + pr;
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + M + '.' + (+m + 1) + '.0';
+ } else
+ // ~1.2.3 == >=1.2.3 <1.3.0
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + (+m + 1) + '.0';
+
+ debug('tilde return', ret);
+ return ret;
+ });
+}
+
+// ^ --> * (any, kinda silly)
+// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
+// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
+// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
+// ^1.2.3 --> >=1.2.3 <2.0.0
+// ^1.2.0 --> >=1.2.0 <2.0.0
+function replaceCarets(comp, loose) {
+ return comp.trim().split(/\s+/).map(function(comp) {
+ return replaceCaret(comp, loose);
+ }).join(' ');
+}
+
+function replaceCaret(comp, loose) {
+ debug('caret', comp, loose);
+ var r = loose ? re[CARETLOOSE] : re[CARET];
+ return comp.replace(r, function(_, M, m, p, pr) {
+ debug('caret', comp, _, M, m, p, pr);
+ var ret;
+
+ if (isX(M))
+ ret = '';
+ else if (isX(m))
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
+ else if (isX(p)) {
+ if (M === '0')
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
+ else
+ ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
+ } else if (pr) {
+ debug('replaceCaret pr', pr);
+ if (pr.charAt(0) !== '-')
+ pr = '-' + pr;
+ if (M === '0') {
+ if (m === '0')
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + M + '.' + m + '.' + (+p + 1);
+ else
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + M + '.' + (+m + 1) + '.0';
+ } else
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + (+M + 1) + '.0.0';
+ } else {
+ debug('no pr');
+ if (M === '0') {
+ if (m === '0')
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + m + '.' + (+p + 1);
+ else
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + (+m + 1) + '.0';
+ } else
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + (+M + 1) + '.0.0';
+ }
+
+ debug('caret return', ret);
+ return ret;
+ });
+}
+
+function replaceXRanges(comp, loose) {
+ debug('replaceXRanges', comp, loose);
+ return comp.split(/\s+/).map(function(comp) {
+ return replaceXRange(comp, loose);
+ }).join(' ');
+}
+
+function replaceXRange(comp, loose) {
+ comp = comp.trim();
+ var r = loose ? re[XRANGELOOSE] : re[XRANGE];
+ return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
+ debug('xRange', comp, ret, gtlt, M, m, p, pr);
+ var xM = isX(M);
+ var xm = xM || isX(m);
+ var xp = xm || isX(p);
+ var anyX = xp;
+
+ if (gtlt === '=' && anyX)
+ gtlt = '';
+
+ if (xM) {
+ if (gtlt === '>' || gtlt === '<') {
+ // nothing is allowed
+ ret = '<0.0.0';
+ } else {
+ // nothing is forbidden
+ ret = '*';
+ }
+ } else if (gtlt && anyX) {
+ // replace X with 0
+ if (xm)
+ m = 0;
+ if (xp)
+ p = 0;
+
+ if (gtlt === '>') {
+ // >1 => >=2.0.0
+ // >1.2 => >=1.3.0
+ // >1.2.3 => >= 1.2.4
+ gtlt = '>=';
+ if (xm) {
+ M = +M + 1;
+ m = 0;
+ p = 0;
+ } else if (xp) {
+ m = +m + 1;
+ p = 0;
+ }
+ } else if (gtlt === '<=') {
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
+ gtlt = '<';
+ if (xm)
+ M = +M + 1;
+ else
+ m = +m + 1;
+ }
+
+ ret = gtlt + M + '.' + m + '.' + p;
+ } else if (xm) {
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
+ } else if (xp) {
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
+ }
+
+ debug('xRange return', ret);
+
+ return ret;
+ });
+}
+
+// Because * is AND-ed with everything else in the comparator,
+// and '' means "any version", just remove the *s entirely.
+function replaceStars(comp, loose) {
+ debug('replaceStars', comp, loose);
+ // Looseness is ignored here. star is always as loose as it gets!
+ return comp.trim().replace(re[STAR], '');
+}
+
+// This function is passed to string.replace(re[HYPHENRANGE])
+// M, m, patch, prerelease, build
+// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
+// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
+// 1.2 - 3.4 => >=1.2.0 <3.5.0
+function hyphenReplace($0,
+ from, fM, fm, fp, fpr, fb,
+ to, tM, tm, tp, tpr, tb) {
+
+ if (isX(fM))
+ from = '';
+ else if (isX(fm))
+ from = '>=' + fM + '.0.0';
+ else if (isX(fp))
+ from = '>=' + fM + '.' + fm + '.0';
+ else
+ from = '>=' + from;
+
+ if (isX(tM))
+ to = '';
+ else if (isX(tm))
+ to = '<' + (+tM + 1) + '.0.0';
+ else if (isX(tp))
+ to = '<' + tM + '.' + (+tm + 1) + '.0';
+ else if (tpr)
+ to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
+ else
+ to = '<=' + to;
+
+ return (from + ' ' + to).trim();
+}
+
+
+// if ANY of the sets match ALL of its comparators, then pass
+Range.prototype.test = function(version) {
+ if (!version)
+ return false;
+
+ if (typeof version === 'string')
+ version = new SemVer(version, this.loose);
+
+ for (var i = 0; i < this.set.length; i++) {
+ if (testSet(this.set[i], version))
+ return true;
+ }
+ return false;
+};
+
+function testSet(set, version) {
+ for (var i = 0; i < set.length; i++) {
+ if (!set[i].test(version))
+ return false;
+ }
+
+ if (version.prerelease.length) {
+ // Find the set of versions that are allowed to have prereleases
+ // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
+ // That should allow `1.2.3-pr.2` to pass.
+ // However, `1.2.4-alpha.notready` should NOT be allowed,
+ // even though it's within the range set by the comparators.
+ for (var i = 0; i < set.length; i++) {
+ debug(set[i].semver);
+ if (set[i].semver === ANY)
+ continue;
+
+ if (set[i].semver.prerelease.length > 0) {
+ var allowed = set[i].semver;
+ if (allowed.major === version.major &&
+ allowed.minor === version.minor &&
+ allowed.patch === version.patch)
+ return true;
+ }
+ }
+
+ // Version has a -pre, but it's not one of the ones we like.
+ return false;
+ }
+
+ return true;
+}
+
+exports.satisfies = satisfies;
+function satisfies(version, range, loose) {
+ try {
+ range = new Range(range, loose);
+ } catch (er) {
+ return false;
+ }
+ return range.test(version);
+}
+
+exports.maxSatisfying = maxSatisfying;
+function maxSatisfying(versions, range, loose) {
+ return versions.filter(function(version) {
+ return satisfies(version, range, loose);
+ }).sort(function(a, b) {
+ return rcompare(a, b, loose);
+ })[0] || null;
+}
+
+exports.minSatisfying = minSatisfying;
+function minSatisfying(versions, range, loose) {
+ return versions.filter(function(version) {
+ return satisfies(version, range, loose);
+ }).sort(function(a, b) {
+ return compare(a, b, loose);
+ })[0] || null;
+}
+
+exports.validRange = validRange;
+function validRange(range, loose) {
+ try {
+ // Return '*' instead of '' so that truthiness works.
+ // This will throw if it's invalid anyway
+ return new Range(range, loose).range || '*';
+ } catch (er) {
+ return null;
+ }
+}
+
+// Determine if version is less than all the versions possible in the range
+exports.ltr = ltr;
+function ltr(version, range, loose) {
+ return outside(version, range, '<', loose);
+}
+
+// Determine if version is greater than all the versions possible in the range.
+exports.gtr = gtr;
+function gtr(version, range, loose) {
+ return outside(version, range, '>', loose);
+}
+
+exports.outside = outside;
+function outside(version, range, hilo, loose) {
+ version = new SemVer(version, loose);
+ range = new Range(range, loose);
+
+ var gtfn, ltefn, ltfn, comp, ecomp;
+ switch (hilo) {
+ case '>':
+ gtfn = gt;
+ ltefn = lte;
+ ltfn = lt;
+ comp = '>';
+ ecomp = '>=';
+ break;
+ case '<':
+ gtfn = lt;
+ ltefn = gte;
+ ltfn = gt;
+ comp = '<';
+ ecomp = '<=';
+ break;
+ default:
+ throw new TypeError('Must provide a hilo val of "<" or ">"');
+ }
+
+ // If it satisifes the range it is not outside
+ if (satisfies(version, range, loose)) {
+ return false;
+ }
+
+ // From now on, variable terms are as if we're in "gtr" mode.
+ // but note that everything is flipped for the "ltr" function.
+
+ for (var i = 0; i < range.set.length; ++i) {
+ var comparators = range.set[i];
+
+ var high = null;
+ var low = null;
+
+ comparators.forEach(function(comparator) {
+ if (comparator.semver === ANY) {
+ comparator = new Comparator('>=0.0.0')
+ }
+ high = high || comparator;
+ low = low || comparator;
+ if (gtfn(comparator.semver, high.semver, loose)) {
+ high = comparator;
+ } else if (ltfn(comparator.semver, low.semver, loose)) {
+ low = comparator;
+ }
+ });
+
+ // If the edge version comparator has a operator then our version
+ // isn't outside it
+ if (high.operator === comp || high.operator === ecomp) {
+ return false;
+ }
+
+ // If the lowest version comparator has an operator and our version
+ // is less than it then it isn't higher than the range
+ if ((!low.operator || low.operator === comp) &&
+ ltefn(version, low.semver)) {
+ return false;
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+exports.prerelease = prerelease;
+function prerelease(version, loose) {
+ var parsed = parse(version, loose);
+ return (parsed && parsed.prerelease.length) ? parsed.prerelease : null;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/package.json
new file mode 100644
index 0000000..9eed5fe
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/package.json
@@ -0,0 +1,68 @@
+{
+ "name": "require_optional",
+ "version": "1.0.0",
+ "description": "Allows you declare optionalPeerDependencies that can be satisfied by the top level module but ignored if they are not.",
+ "main": "index.js",
+ "scripts": {
+ "test": "mocha"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/christkv/require_optional.git"
+ },
+ "keywords": [
+ "optional",
+ "require",
+ "optionalPeerDependencies"
+ ],
+ "author": {
+ "name": "Christian Kvalheim Amor"
+ },
+ "license": "Apache-2.0",
+ "bugs": {
+ "url": "https://github.com/christkv/require_optional/issues"
+ },
+ "homepage": "https://github.com/christkv/require_optional",
+ "dependencies": {
+ "semver": "^5.1.0",
+ "resolve-from": "^2.0.0"
+ },
+ "devDependencies": {
+ "bson": "0.4.21",
+ "co": "4.6.0",
+ "es6-promise": "^3.0.2",
+ "mocha": "^2.4.5"
+ },
+ "peerOptionalDependencies": {
+ "co": ">=5.6.0",
+ "es6-promise": "^3.0.2",
+ "es6-promise2": "^4.0.2",
+ "bson": "0.4.21"
+ },
+ "gitHead": "8eac964c8e31166a8fb483d0d56025b185cee03f",
+ "_id": "require_optional@1.0.0",
+ "_shasum": "52a86137a849728eb60a55533617f8f914f59abf",
+ "_from": "require_optional@>=1.0.0 <1.1.0",
+ "_npmVersion": "2.14.12",
+ "_nodeVersion": "4.2.4",
+ "_npmUser": {
+ "name": "christkv",
+ "email": "christkv@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "christkv",
+ "email": "christkv@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "52a86137a849728eb60a55533617f8f914f59abf",
+ "tarball": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.0.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-5-east.internal.npmjs.com",
+ "tmp": "tmp/require_optional-1.0.0.tgz_1454503936164_0.7571216486394405"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/test/require_optional_tests.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/test/require_optional_tests.js
new file mode 100644
index 0000000..181d834
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/test/require_optional_tests.js
@@ -0,0 +1,42 @@
+var assert = require('assert'),
+ require_optional = require('../');
+
+describe('Require Optional', function() {
+ describe('top level require', function() {
+ it('should correctly require co library', function() {
+ var promise = require_optional('es6-promise');
+ assert.ok(promise);
+ });
+
+ it('should fail to require es6-promise library', function() {
+ try {
+ require_optional('co');
+ } catch(e) {
+ assert.equal('OPTIONAL_MODULE_NOT_FOUND', e.code);
+ return;
+ }
+
+ assert.ok(false);
+ });
+
+ it('should ignore optional library not defined', function() {
+ assert.equal(undefined, require_optional('es6-promise2'));
+ });
+ });
+
+ describe('internal module file require', function() {
+ it('should correctly require co library', function() {
+ var Long = require_optional('bson/lib/bson/long.js');
+ assert.ok(Long);
+ });
+ });
+
+ describe('top level resolve', function() {
+ it('should correctly use exists method', function() {
+ assert.equal(false, require_optional.exists('co'));
+ assert.equal(true, require_optional.exists('es6-promise'));
+ assert.equal(true, require_optional.exists('bson/lib/bson/long.js'));
+ assert.equal(false, require_optional.exists('es6-promise2'));
+ });
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/package.json
new file mode 100644
index 0000000..57276c9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/package.json
@@ -0,0 +1,74 @@
+{
+ "name": "mongodb-core",
+ "version": "2.0.13",
+ "description": "Core MongoDB driver functionality, no bells and whistles and meant for integration not end applications",
+ "main": "index.js",
+ "scripts": {
+ "test": "node test/runner.js -t functional",
+ "coverage": "nyc node test/runner.js -t functional -l && node_modules/.bin/nyc report --reporter=text-lcov | node_modules/.bin/coveralls"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/christkv/mongodb-core.git"
+ },
+ "keywords": [
+ "mongodb",
+ "core"
+ ],
+ "dependencies": {
+ "bson": "~0.5.6",
+ "require_optional": "~1.0.0"
+ },
+ "devDependencies": {
+ "co": "^4.5.4",
+ "coveralls": "^2.11.6",
+ "es6-promise": "^3.0.2",
+ "gleak": "0.5.0",
+ "integra": "0.1.8",
+ "jsdoc": "3.3.0-alpha8",
+ "mkdirp": "0.5.0",
+ "mongodb-topology-manager": "1.0.x",
+ "mongodb-version-manager": "^1.x",
+ "nyc": "^5.5.0",
+ "optimist": "latest",
+ "rimraf": "2.2.6",
+ "semver": "4.1.0"
+ },
+ "peerOptionalDependencies": {
+ "kerberos": "~0.0"
+ },
+ "author": {
+ "name": "Christian Kvalheim"
+ },
+ "license": "Apache-2.0",
+ "bugs": {
+ "url": "https://github.com/christkv/mongodb-core/issues"
+ },
+ "homepage": "https://github.com/christkv/mongodb-core",
+ "gitHead": "319f26dcbdf71a13f234ca33aac2a49642984b5b",
+ "_id": "mongodb-core@2.0.13",
+ "_shasum": "f9394b588dce0e579482e53d74dbc7d7a9d4519c",
+ "_from": "mongodb-core@2.0.13",
+ "_npmVersion": "3.10.8",
+ "_nodeVersion": "6.8.1",
+ "_npmUser": {
+ "name": "christkv",
+ "email": "christkv@gmail.com"
+ },
+ "dist": {
+ "shasum": "f9394b588dce0e579482e53d74dbc7d7a9d4519c",
+ "tarball": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-2.0.13.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "christkv",
+ "email": "christkv@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/mongodb-core-2.0.13.tgz_1477055863501_0.10637361486442387"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-2.0.13.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/simple_2_document_limit_toArray.dat b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/simple_2_document_limit_toArray.dat
new file mode 100644
index 0000000..25ccf0b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/simple_2_document_limit_toArray.dat
@@ -0,0 +1,11000 @@
+1 2
+2 1
+3 0
+4 0
+5 1
+6 0
+7 0
+8 0
+9 0
+10 1
+11 0
+12 0
+13 0
+14 1
+15 0
+16 0
+17 0
+18 1
+19 0
+20 0
+21 0
+22 1
+23 0
+24 0
+25 0
+26 0
+27 1
+28 0
+29 0
+30 0
+31 1
+32 0
+33 0
+34 0
+35 0
+36 0
+37 1
+38 0
+39 0
+40 0
+41 0
+42 0
+43 1
+44 0
+45 0
+46 0
+47 0
+48 0
+49 0
+50 0
+51 0
+52 0
+53 0
+54 0
+55 0
+56 0
+57 0
+58 0
+59 1
+60 0
+61 2
+62 0
+63 0
+64 1
+65 0
+66 0
+67 0
+68 1
+69 0
+70 0
+71 0
+72 0
+73 1
+74 0
+75 0
+76 0
+77 0
+78 0
+79 1
+80 0
+81 0
+82 0
+83 0
+84 0
+85 0
+86 1
+87 0
+88 0
+89 0
+90 0
+91 0
+92 0
+93 1
+94 0
+95 0
+96 0
+97 0
+98 0
+99 0
+100 0
+101 1
+102 0
+103 0
+104 0
+105 0
+106 0
+107 0
+108 1
+109 0
+110 0
+111 0
+112 0
+113 0
+114 0
+115 1
+116 0
+117 0
+118 0
+119 1
+120 0
+121 0
+122 0
+123 0
+124 0
+125 0
+126 1
+127 0
+128 1
+129 0
+130 0
+131 0
+132 1
+133 1
+134 0
+135 0
+136 0
+137 1
+138 0
+139 0
+140 0
+141 0
+142 0
+143 0
+144 1
+145 0
+146 0
+147 0
+148 0
+149 0
+150 0
+151 0
+152 0
+153 1
+154 0
+155 0
+156 0
+157 0
+158 0
+159 0
+160 0
+161 0
+162 0
+163 0
+164 0
+165 0
+166 0
+167 0
+168 0
+169 0
+170 1
+171 0
+172 0
+173 0
+174 0
+175 0
+176 0
+177 0
+178 1
+179 0
+180 0
+181 0
+182 0
+183 0
+184 0
+185 0
+186 1
+187 0
+188 0
+189 0
+190 0
+191 0
+192 1
+193 0
+194 0
+195 0
+196 1
+197 0
+198 0
+199 0
+200 1
+201 0
+202 0
+203 0
+204 0
+205 0
+206 0
+207 1
+208 0
+209 0
+210 0
+211 0
+212 0
+213 0
+214 0
+215 1
+216 0
+217 0
+218 0
+219 0
+220 0
+221 0
+222 0
+223 1
+224 0
+225 0
+226 0
+227 0
+228 0
+229 0
+230 1
+231 0
+232 0
+233 0
+234 0
+235 0
+236 0
+237 1
+238 0
+239 0
+240 0
+241 0
+242 0
+243 0
+244 0
+245 1
+246 0
+247 0
+248 0
+249 0
+250 0
+251 0
+252 0
+253 0
+254 1
+255 0
+256 0
+257 0
+258 0
+259 1
+260 0
+261 0
+262 0
+263 0
+264 0
+265 1
+266 0
+267 0
+268 0
+269 0
+270 0
+271 0
+272 1
+273 0
+274 0
+275 0
+276 0
+277 0
+278 0
+279 0
+280 0
+281 1
+282 0
+283 1
+284 0
+285 0
+286 1
+287 0
+288 0
+289 0
+290 0
+291 1
+292 0
+293 0
+294 0
+295 0
+296 1
+297 0
+298 0
+299 0
+300 0
+301 0
+302 0
+303 1
+304 0
+305 0
+306 0
+307 0
+308 0
+309 1
+310 0
+311 0
+312 0
+313 0
+314 0
+315 0
+316 1
+317 0
+318 0
+319 0
+320 0
+321 0
+322 0
+323 0
+324 0
+325 1
+326 0
+327 0
+328 0
+329 0
+330 0
+331 0
+332 0
+333 0
+334 1
+335 0
+336 0
+337 0
+338 0
+339 0
+340 0
+341 0
+342 0
+343 1
+344 0
+345 0
+346 0
+347 0
+348 0
+349 0
+350 0
+351 0
+352 1
+353 0
+354 0
+355 0
+356 0
+357 0
+358 0
+359 0
+360 0
+361 1
+362 0
+363 0
+364 0
+365 0
+366 0
+367 0
+368 0
+369 1
+370 0
+371 0
+372 0
+373 0
+374 0
+375 0
+376 0
+377 1
+378 0
+379 0
+380 0
+381 0
+382 0
+383 0
+384 0
+385 1
+386 0
+387 0
+388 0
+389 0
+390 1
+391 0
+392 0
+393 0
+394 0
+395 0
+396 0
+397 0
+398 0
+399 0
+400 0
+401 0
+402 1
+403 0
+404 0
+405 0
+406 0
+407 0
+408 0
+409 0
+410 1
+411 0
+412 0
+413 0
+414 0
+415 0
+416 0
+417 0
+418 0
+419 1
+420 0
+421 0
+422 0
+423 0
+424 0
+425 0
+426 0
+427 1
+428 0
+429 0
+430 0
+431 0
+432 0
+433 0
+434 0
+435 1
+436 0
+437 0
+438 0
+439 0
+440 0
+441 0
+442 0
+443 1
+444 0
+445 0
+446 0
+447 0
+448 0
+449 0
+450 1
+451 0
+452 0
+453 0
+454 0
+455 0
+456 1
+457 0
+458 0
+459 0
+460 0
+461 0
+462 0
+463 0
+464 1
+465 0
+466 0
+467 0
+468 0
+469 0
+470 0
+471 0
+472 0
+473 1
+474 0
+475 0
+476 0
+477 0
+478 0
+479 0
+480 0
+481 1
+482 0
+483 0
+484 0
+485 0
+486 0
+487 0
+488 0
+489 0
+490 1
+491 0
+492 0
+493 0
+494 0
+495 0
+496 0
+497 0
+498 0
+499 0
+500 0
+501 0
+502 0
+503 0
+504 1
+505 0
+506 0
+507 0
+508 0
+509 0
+510 0
+511 0
+512 1
+513 0
+514 0
+515 0
+516 0
+517 0
+518 0
+519 4
+520 0
+521 1
+522 0
+523 0
+524 0
+525 1
+526 0
+527 0
+528 0
+529 0
+530 1
+531 0
+532 0
+533 0
+534 1
+535 0
+536 0
+537 0
+538 0
+539 1
+540 0
+541 0
+542 0
+543 0
+544 0
+545 1
+546 0
+547 0
+548 0
+549 0
+550 0
+551 1
+552 0
+553 0
+554 0
+555 0
+556 0
+557 0
+558 0
+559 1
+560 0
+561 0
+562 0
+563 0
+564 0
+565 0
+566 0
+567 1
+568 0
+569 0
+570 0
+571 0
+572 0
+573 0
+574 0
+575 0
+576 1
+577 0
+578 0
+579 0
+580 0
+581 0
+582 0
+583 0
+584 0
+585 0
+586 0
+587 0
+588 0
+589 0
+590 0
+591 0
+592 0
+593 1
+594 0
+595 0
+596 0
+597 0
+598 0
+599 0
+600 0
+601 0
+602 1
+603 0
+604 0
+605 0
+606 0
+607 0
+608 0
+609 0
+610 0
+611 1
+612 0
+613 0
+614 0
+615 0
+616 0
+617 0
+618 0
+619 0
+620 1
+621 0
+622 0
+623 0
+624 0
+625 0
+626 0
+627 0
+628 0
+629 1
+630 0
+631 0
+632 0
+633 0
+634 0
+635 0
+636 0
+637 0
+638 0
+639 1
+640 0
+641 0
+642 0
+643 0
+644 0
+645 0
+646 1
+647 0
+648 0
+649 0
+650 0
+651 0
+652 1
+653 1
+654 0
+655 0
+656 1
+657 0
+658 1
+659 0
+660 0
+661 0
+662 0
+663 0
+664 1
+665 0
+666 0
+667 0
+668 0
+669 0
+670 0
+671 0
+672 0
+673 0
+674 0
+675 0
+676 0
+677 1
+678 0
+679 0
+680 0
+681 0
+682 0
+683 0
+684 0
+685 0
+686 1
+687 0
+688 0
+689 0
+690 0
+691 0
+692 0
+693 0
+694 0
+695 1
+696 0
+697 0
+698 0
+699 0
+700 0
+701 0
+702 0
+703 1
+704 0
+705 0
+706 0
+707 0
+708 0
+709 0
+710 0
+711 0
+712 1
+713 0
+714 0
+715 0
+716 0
+717 0
+718 0
+719 0
+720 1
+721 0
+722 0
+723 0
+724 0
+725 0
+726 0
+727 0
+728 1
+729 0
+730 0
+731 0
+732 0
+733 0
+734 0
+735 0
+736 0
+737 1
+738 0
+739 0
+740 0
+741 0
+742 0
+743 0
+744 0
+745 1
+746 0
+747 0
+748 0
+749 0
+750 0
+751 0
+752 0
+753 1
+754 0
+755 0
+756 0
+757 0
+758 0
+759 0
+760 0
+761 1
+762 0
+763 0
+764 0
+765 0
+766 0
+767 0
+768 1
+769 0
+770 0
+771 0
+772 0
+773 0
+774 0
+775 0
+776 0
+777 1
+778 0
+779 0
+780 0
+781 0
+782 0
+783 0
+784 0
+785 0
+786 1
+787 0
+788 0
+789 0
+790 0
+791 0
+792 1
+793 0
+794 0
+795 0
+796 0
+797 0
+798 0
+799 0
+800 0
+801 1
+802 0
+803 0
+804 0
+805 0
+806 0
+807 0
+808 0
+809 0
+810 0
+811 0
+812 0
+813 0
+814 0
+815 0
+816 0
+817 0
+818 0
+819 0
+820 1
+821 0
+822 0
+823 0
+824 0
+825 0
+826 0
+827 0
+828 0
+829 1
+830 0
+831 0
+832 0
+833 0
+834 0
+835 0
+836 0
+837 1
+838 0
+839 0
+840 0
+841 0
+842 0
+843 0
+844 0
+845 0
+846 1
+847 0
+848 0
+849 0
+850 0
+851 0
+852 0
+853 0
+854 0
+855 2
+856 0
+857 0
+858 0
+859 0
+860 0
+861 0
+862 1
+863 0
+864 0
+865 0
+866 0
+867 0
+868 0
+869 0
+870 0
+871 1
+872 0
+873 0
+874 0
+875 0
+876 0
+877 0
+878 1
+879 0
+880 0
+881 0
+882 0
+883 0
+884 0
+885 0
+886 0
+887 0
+888 0
+889 0
+890 0
+891 0
+892 0
+893 0
+894 0
+895 0
+896 1
+897 0
+898 0
+899 0
+900 0
+901 0
+902 0
+903 0
+904 0
+905 0
+906 1
+907 0
+908 0
+909 0
+910 0
+911 0
+912 0
+913 0
+914 0
+915 1
+916 0
+917 0
+918 0
+919 0
+920 0
+921 0
+922 1
+923 0
+924 0
+925 0
+926 0
+927 0
+928 0
+929 0
+930 1
+931 0
+932 0
+933 0
+934 0
+935 0
+936 0
+937 0
+938 0
+939 1
+940 0
+941 0
+942 0
+943 0
+944 0
+945 0
+946 0
+947 0
+948 0
+949 1
+950 0
+951 0
+952 0
+953 0
+954 0
+955 0
+956 0
+957 0
+958 1
+959 0
+960 0
+961 0
+962 0
+963 0
+964 0
+965 0
+966 0
+967 0
+968 1
+969 0
+970 0
+971 0
+972 0
+973 0
+974 0
+975 0
+976 0
+977 0
+978 1
+979 0
+980 0
+981 0
+982 0
+983 0
+984 0
+985 0
+986 0
+987 0
+988 1
+989 0
+990 0
+991 0
+992 0
+993 0
+994 0
+995 0
+996 0
+997 1
+998 0
+999 0
+1000 0
+1001 0
+1002 0
+1003 0
+1004 0
+1005 1
+1006 0
+1007 0
+1008 0
+1009 0
+1010 0
+1011 0
+1012 1
+1013 0
+1014 0
+1015 0
+1016 0
+1017 0
+1018 0
+1019 0
+1020 0
+1021 0
+1022 0
+1023 0
+1024 0
+1025 0
+1026 0
+1027 0
+1028 0
+1029 0
+1030 0
+1031 1
+1032 0
+1033 0
+1034 0
+1035 0
+1036 0
+1037 0
+1038 0
+1039 0
+1040 0
+1041 0
+1042 1
+1043 0
+1044 0
+1045 0
+1046 0
+1047 0
+1048 0
+1049 0
+1050 1
+1051 0
+1052 0
+1053 0
+1054 0
+1055 0
+1056 0
+1057 1
+1058 0
+1059 0
+1060 0
+1061 0
+1062 0
+1063 0
+1064 0
+1065 0
+1066 0
+1067 1
+1068 0
+1069 0
+1070 0
+1071 0
+1072 0
+1073 0
+1074 0
+1075 0
+1076 0
+1077 1
+1078 0
+1079 0
+1080 0
+1081 0
+1082 0
+1083 0
+1084 0
+1085 0
+1086 0
+1087 1
+1088 0
+1089 0
+1090 0
+1091 0
+1092 0
+1093 0
+1094 1
+1095 0
+1096 0
+1097 0
+1098 0
+1099 0
+1100 0
+1101 0
+1102 1
+1103 0
+1104 0
+1105 0
+1106 0
+1107 0
+1108 0
+1109 0
+1110 0
+1111 1
+1112 0
+1113 0
+1114 0
+1115 0
+1116 0
+1117 0
+1118 0
+1119 0
+1120 1
+1121 0
+1122 0
+1123 0
+1124 0
+1125 0
+1126 0
+1127 0
+1128 0
+1129 0
+1130 1
+1131 0
+1132 0
+1133 0
+1134 0
+1135 0
+1136 0
+1137 0
+1138 0
+1139 0
+1140 1
+1141 0
+1142 0
+1143 0
+1144 0
+1145 0
+1146 0
+1147 0
+1148 0
+1149 0
+1150 0
+1151 1
+1152 0
+1153 0
+1154 0
+1155 0
+1156 0
+1157 0
+1158 0
+1159 0
+1160 1
+1161 0
+1162 0
+1163 0
+1164 0
+1165 0
+1166 0
+1167 1
+1168 0
+1169 0
+1170 0
+1171 0
+1172 0
+1173 0
+1174 0
+1175 0
+1176 1
+1177 0
+1178 0
+1179 0
+1180 0
+1181 0
+1182 1
+1183 0
+1184 0
+1185 0
+1186 0
+1187 0
+1188 0
+1189 0
+1190 1
+1191 0
+1192 0
+1193 0
+1194 0
+1195 0
+1196 0
+1197 0
+1198 1
+1199 0
+1200 0
+1201 0
+1202 0
+1203 0
+1204 0
+1205 0
+1206 1
+1207 0
+1208 0
+1209 0
+1210 0
+1211 0
+1212 0
+1213 0
+1214 0
+1215 0
+1216 1
+1217 0
+1218 0
+1219 0
+1220 0
+1221 0
+1222 0
+1223 0
+1224 0
+1225 0
+1226 1
+1227 0
+1228 0
+1229 0
+1230 0
+1231 0
+1232 0
+1233 0
+1234 0
+1235 0
+1236 0
+1237 0
+1238 0
+1239 1
+1240 0
+1241 0
+1242 0
+1243 0
+1244 0
+1245 0
+1246 0
+1247 0
+1248 1
+1249 0
+1250 0
+1251 0
+1252 0
+1253 0
+1254 0
+1255 0
+1256 0
+1257 1
+1258 0
+1259 0
+1260 0
+1261 0
+1262 0
+1263 0
+1264 0
+1265 0
+1266 1
+1267 0
+1268 0
+1269 0
+1270 0
+1271 0
+1272 0
+1273 0
+1274 0
+1275 1
+1276 0
+1277 0
+1278 0
+1279 0
+1280 0
+1281 0
+1282 0
+1283 0
+1284 0
+1285 0
+1286 0
+1287 0
+1288 0
+1289 0
+1290 0
+1291 0
+1292 0
+1293 1
+1294 0
+1295 0
+1296 0
+1297 0
+1298 0
+1299 0
+1300 0
+1301 0
+1302 0
+1303 0
+1304 0
+1305 0
+1306 0
+1307 0
+1308 0
+1309 0
+1310 1
+1311 0
+1312 0
+1313 0
+1314 0
+1315 0
+1316 0
+1317 0
+1318 1
+1319 0
+1320 0
+1321 0
+1322 0
+1323 0
+1324 0
+1325 0
+1326 0
+1327 1
+1328 0
+1329 0
+1330 0
+1331 0
+1332 0
+1333 0
+1334 0
+1335 0
+1336 1
+1337 0
+1338 0
+1339 0
+1340 0
+1341 0
+1342 0
+1343 0
+1344 0
+1345 0
+1346 1
+1347 0
+1348 0
+1349 0
+1350 0
+1351 0
+1352 0
+1353 0
+1354 0
+1355 0
+1356 1
+1357 0
+1358 0
+1359 0
+1360 0
+1361 0
+1362 0
+1363 0
+1364 0
+1365 1
+1366 0
+1367 0
+1368 0
+1369 0
+1370 0
+1371 0
+1372 0
+1373 1
+1374 0
+1375 0
+1376 0
+1377 0
+1378 0
+1379 0
+1380 0
+1381 0
+1382 0
+1383 1
+1384 0
+1385 0
+1386 0
+1387 0
+1388 0
+1389 0
+1390 0
+1391 0
+1392 1
+1393 0
+1394 0
+1395 0
+1396 0
+1397 0
+1398 0
+1399 0
+1400 1
+1401 0
+1402 0
+1403 0
+1404 0
+1405 0
+1406 0
+1407 0
+1408 0
+1409 0
+1410 1
+1411 0
+1412 0
+1413 0
+1414 0
+1415 0
+1416 0
+1417 0
+1418 0
+1419 0
+1420 1
+1421 0
+1422 0
+1423 0
+1424 0
+1425 0
+1426 0
+1427 0
+1428 0
+1429 0
+1430 0
+1431 1
+1432 0
+1433 0
+1434 0
+1435 0
+1436 0
+1437 0
+1438 0
+1439 0
+1440 0
+1441 1
+1442 0
+1443 0
+1444 0
+1445 0
+1446 0
+1447 2
+1448 0
+1449 0
+1450 0
+1451 0
+1452 0
+1453 0
+1454 0
+1455 1
+1456 0
+1457 0
+1458 0
+1459 0
+1460 0
+1461 0
+1462 0
+1463 0
+1464 0
+1465 1
+1466 0
+1467 0
+1468 0
+1469 0
+1470 0
+1471 0
+1472 0
+1473 0
+1474 0
+1475 1
+1476 0
+1477 0
+1478 0
+1479 0
+1480 0
+1481 0
+1482 0
+1483 0
+1484 0
+1485 1
+1486 0
+1487 0
+1488 0
+1489 0
+1490 0
+1491 0
+1492 0
+1493 0
+1494 1
+1495 0
+1496 0
+1497 0
+1498 0
+1499 0
+1500 0
+1501 0
+1502 0
+1503 1
+1504 0
+1505 0
+1506 0
+1507 0
+1508 0
+1509 0
+1510 0
+1511 0
+1512 0
+1513 0
+1514 0
+1515 0
+1516 0
+1517 0
+1518 0
+1519 0
+1520 1
+1521 0
+1522 0
+1523 0
+1524 0
+1525 0
+1526 0
+1527 0
+1528 0
+1529 1
+1530 0
+1531 0
+1532 0
+1533 0
+1534 0
+1535 0
+1536 0
+1537 0
+1538 0
+1539 1
+1540 0
+1541 0
+1542 0
+1543 0
+1544 0
+1545 0
+1546 0
+1547 0
+1548 1
+1549 0
+1550 0
+1551 0
+1552 0
+1553 0
+1554 0
+1555 0
+1556 0
+1557 1
+1558 0
+1559 0
+1560 0
+1561 0
+1562 0
+1563 0
+1564 0
+1565 0
+1566 0
+1567 1
+1568 0
+1569 0
+1570 0
+1571 0
+1572 0
+1573 0
+1574 0
+1575 1
+1576 0
+1577 0
+1578 0
+1579 0
+1580 0
+1581 0
+1582 0
+1583 0
+1584 1
+1585 0
+1586 0
+1587 0
+1588 0
+1589 0
+1590 0
+1591 0
+1592 0
+1593 1
+1594 0
+1595 0
+1596 0
+1597 0
+1598 0
+1599 0
+1600 0
+1601 0
+1602 1
+1603 0
+1604 0
+1605 0
+1606 0
+1607 0
+1608 0
+1609 0
+1610 0
+1611 1
+1612 0
+1613 0
+1614 0
+1615 0
+1616 0
+1617 0
+1618 0
+1619 0
+1620 0
+1621 1
+1622 0
+1623 0
+1624 0
+1625 0
+1626 0
+1627 0
+1628 0
+1629 0
+1630 0
+1631 1
+1632 0
+1633 0
+1634 0
+1635 0
+1636 0
+1637 0
+1638 0
+1639 0
+1640 1
+1641 0
+1642 0
+1643 0
+1644 0
+1645 0
+1646 0
+1647 0
+1648 0
+1649 0
+1650 1
+1651 0
+1652 0
+1653 0
+1654 0
+1655 0
+1656 0
+1657 0
+1658 0
+1659 0
+1660 1
+1661 0
+1662 0
+1663 0
+1664 0
+1665 0
+1666 0
+1667 0
+1668 0
+1669 0
+1670 1
+1671 0
+1672 0
+1673 0
+1674 0
+1675 0
+1676 0
+1677 0
+1678 0
+1679 0
+1680 1
+1681 0
+1682 0
+1683 0
+1684 0
+1685 0
+1686 0
+1687 0
+1688 0
+1689 0
+1690 1
+1691 0
+1692 0
+1693 0
+1694 0
+1695 0
+1696 0
+1697 0
+1698 0
+1699 0
+1700 0
+1701 1
+1702 0
+1703 0
+1704 0
+1705 0
+1706 0
+1707 0
+1708 1
+1709 0
+1710 0
+1711 0
+1712 0
+1713 0
+1714 0
+1715 0
+1716 1
+1717 0
+1718 0
+1719 0
+1720 0
+1721 0
+1722 0
+1723 0
+1724 0
+1725 0
+1726 0
+1727 0
+1728 0
+1729 0
+1730 0
+1731 0
+1732 0
+1733 0
+1734 1
+1735 0
+1736 0
+1737 0
+1738 0
+1739 0
+1740 0
+1741 0
+1742 0
+1743 1
+1744 0
+1745 0
+1746 0
+1747 0
+1748 0
+1749 0
+1750 0
+1751 0
+1752 0
+1753 1
+1754 0
+1755 0
+1756 0
+1757 0
+1758 0
+1759 0
+1760 0
+1761 0
+1762 0
+1763 1
+1764 0
+1765 0
+1766 0
+1767 0
+1768 0
+1769 0
+1770 0
+1771 0
+1772 0
+1773 1
+1774 0
+1775 0
+1776 0
+1777 0
+1778 0
+1779 0
+1780 0
+1781 0
+1782 0
+1783 1
+1784 0
+1785 0
+1786 0
+1787 0
+1788 0
+1789 0
+1790 0
+1791 0
+1792 0
+1793 1
+1794 0
+1795 0
+1796 0
+1797 0
+1798 0
+1799 0
+1800 0
+1801 0
+1802 0
+1803 1
+1804 0
+1805 0
+1806 0
+1807 0
+1808 0
+1809 0
+1810 0
+1811 0
+1812 0
+1813 1
+1814 0
+1815 0
+1816 0
+1817 0
+1818 0
+1819 0
+1820 0
+1821 0
+1822 1
+1823 0
+1824 0
+1825 0
+1826 0
+1827 0
+1828 0
+1829 1
+1830 0
+1831 0
+1832 0
+1833 0
+1834 0
+1835 0
+1836 0
+1837 0
+1838 0
+1839 1
+1840 0
+1841 0
+1842 0
+1843 0
+1844 0
+1845 0
+1846 0
+1847 0
+1848 0
+1849 1
+1850 0
+1851 0
+1852 0
+1853 0
+1854 0
+1855 0
+1856 0
+1857 0
+1858 0
+1859 1
+1860 0
+1861 0
+1862 0
+1863 0
+1864 0
+1865 0
+1866 0
+1867 0
+1868 0
+1869 1
+1870 0
+1871 0
+1872 0
+1873 0
+1874 0
+1875 0
+1876 0
+1877 0
+1878 0
+1879 1
+1880 0
+1881 0
+1882 0
+1883 0
+1884 0
+1885 0
+1886 0
+1887 0
+1888 0
+1889 1
+1890 0
+1891 0
+1892 0
+1893 0
+1894 0
+1895 0
+1896 0
+1897 0
+1898 0
+1899 0
+1900 0
+1901 0
+1902 0
+1903 0
+1904 0
+1905 0
+1906 0
+1907 0
+1908 0
+1909 0
+1910 1
+1911 0
+1912 0
+1913 0
+1914 0
+1915 0
+1916 0
+1917 0
+1918 0
+1919 0
+1920 0
+1921 0
+1922 0
+1923 0
+1924 0
+1925 0
+1926 0
+1927 0
+1928 0
+1929 0
+1930 1
+1931 0
+1932 0
+1933 0
+1934 0
+1935 0
+1936 0
+1937 0
+1938 0
+1939 1
+1940 0
+1941 0
+1942 0
+1943 0
+1944 0
+1945 0
+1946 0
+1947 0
+1948 0
+1949 1
+1950 0
+1951 0
+1952 0
+1953 0
+1954 0
+1955 0
+1956 0
+1957 0
+1958 1
+1959 0
+1960 0
+1961 0
+1962 0
+1963 0
+1964 0
+1965 0
+1966 0
+1967 0
+1968 1
+1969 0
+1970 0
+1971 0
+1972 0
+1973 0
+1974 0
+1975 0
+1976 0
+1977 0
+1978 1
+1979 0
+1980 0
+1981 0
+1982 0
+1983 0
+1984 0
+1985 0
+1986 0
+1987 0
+1988 1
+1989 0
+1990 0
+1991 0
+1992 0
+1993 0
+1994 0
+1995 0
+1996 1
+1997 0
+1998 0
+1999 0
+2000 0
+2001 0
+2002 0
+2003 0
+2004 1
+2005 0
+2006 0
+2007 0
+2008 0
+2009 0
+2010 0
+2011 0
+2012 0
+2013 0
+2014 1
+2015 0
+2016 0
+2017 0
+2018 0
+2019 0
+2020 0
+2021 0
+2022 0
+2023 0
+2024 1
+2025 0
+2026 0
+2027 0
+2028 0
+2029 0
+2030 0
+2031 0
+2032 0
+2033 1
+2034 0
+2035 0
+2036 0
+2037 0
+2038 0
+2039 0
+2040 0
+2041 2
+2042 0
+2043 0
+2044 0
+2045 0
+2046 0
+2047 0
+2048 0
+2049 1
+2050 0
+2051 0
+2052 0
+2053 0
+2054 0
+2055 0
+2056 0
+2057 0
+2058 0
+2059 0
+2060 0
+2061 0
+2062 0
+2063 0
+2064 0
+2065 0
+2066 0
+2067 1
+2068 0
+2069 0
+2070 0
+2071 0
+2072 0
+2073 0
+2074 0
+2075 0
+2076 1
+2077 0
+2078 0
+2079 0
+2080 0
+2081 0
+2082 0
+2083 0
+2084 0
+2085 0
+2086 1
+2087 0
+2088 0
+2089 0
+2090 0
+2091 0
+2092 0
+2093 0
+2094 0
+2095 0
+2096 1
+2097 0
+2098 0
+2099 0
+2100 0
+2101 0
+2102 0
+2103 0
+2104 0
+2105 1
+2106 0
+2107 0
+2108 0
+2109 0
+2110 0
+2111 0
+2112 0
+2113 0
+2114 0
+2115 0
+2116 1
+2117 0
+2118 0
+2119 0
+2120 0
+2121 0
+2122 0
+2123 0
+2124 0
+2125 1
+2126 0
+2127 0
+2128 0
+2129 0
+2130 0
+2131 0
+2132 0
+2133 1
+2134 0
+2135 0
+2136 0
+2137 0
+2138 0
+2139 0
+2140 0
+2141 1
+2142 0
+2143 0
+2144 0
+2145 0
+2146 0
+2147 0
+2148 0
+2149 0
+2150 1
+2151 0
+2152 0
+2153 0
+2154 0
+2155 0
+2156 0
+2157 0
+2158 0
+2159 1
+2160 0
+2161 0
+2162 0
+2163 0
+2164 0
+2165 0
+2166 0
+2167 0
+2168 0
+2169 1
+2170 0
+2171 0
+2172 0
+2173 0
+2174 0
+2175 0
+2176 0
+2177 1
+2178 0
+2179 0
+2180 0
+2181 0
+2182 0
+2183 0
+2184 0
+2185 0
+2186 0
+2187 1
+2188 0
+2189 0
+2190 0
+2191 0
+2192 0
+2193 0
+2194 0
+2195 0
+2196 1
+2197 0
+2198 0
+2199 0
+2200 0
+2201 0
+2202 0
+2203 0
+2204 1
+2205 0
+2206 0
+2207 0
+2208 0
+2209 0
+2210 0
+2211 0
+2212 0
+2213 0
+2214 1
+2215 0
+2216 0
+2217 0
+2218 0
+2219 0
+2220 0
+2221 0
+2222 0
+2223 0
+2224 1
+2225 0
+2226 0
+2227 0
+2228 0
+2229 0
+2230 0
+2231 0
+2232 0
+2233 1
+2234 0
+2235 0
+2236 0
+2237 0
+2238 0
+2239 0
+2240 0
+2241 0
+2242 1
+2243 0
+2244 0
+2245 0
+2246 0
+2247 0
+2248 0
+2249 0
+2250 1
+2251 0
+2252 0
+2253 0
+2254 0
+2255 0
+2256 0
+2257 0
+2258 0
+2259 0
+2260 1
+2261 0
+2262 0
+2263 0
+2264 0
+2265 0
+2266 0
+2267 0
+2268 0
+2269 0
+2270 1
+2271 0
+2272 0
+2273 0
+2274 0
+2275 0
+2276 0
+2277 0
+2278 0
+2279 0
+2280 1
+2281 0
+2282 0
+2283 0
+2284 0
+2285 0
+2286 0
+2287 0
+2288 0
+2289 0
+2290 1
+2291 0
+2292 0
+2293 0
+2294 0
+2295 0
+2296 0
+2297 0
+2298 1
+2299 0
+2300 0
+2301 0
+2302 0
+2303 0
+2304 0
+2305 0
+2306 1
+2307 0
+2308 0
+2309 0
+2310 0
+2311 0
+2312 0
+2313 0
+2314 0
+2315 1
+2316 0
+2317 0
+2318 0
+2319 0
+2320 0
+2321 0
+2322 0
+2323 0
+2324 0
+2325 1
+2326 0
+2327 0
+2328 0
+2329 0
+2330 0
+2331 0
+2332 0
+2333 0
+2334 0
+2335 1
+2336 0
+2337 0
+2338 0
+2339 0
+2340 0
+2341 0
+2342 0
+2343 0
+2344 0
+2345 1
+2346 0
+2347 0
+2348 0
+2349 0
+2350 0
+2351 0
+2352 0
+2353 1
+2354 0
+2355 0
+2356 0
+2357 0
+2358 0
+2359 0
+2360 0
+2361 1
+2362 0
+2363 0
+2364 0
+2365 0
+2366 0
+2367 0
+2368 0
+2369 0
+2370 0
+2371 1
+2372 0
+2373 0
+2374 0
+2375 0
+2376 0
+2377 0
+2378 0
+2379 0
+2380 0
+2381 1
+2382 0
+2383 0
+2384 0
+2385 0
+2386 0
+2387 0
+2388 0
+2389 0
+2390 1
+2391 0
+2392 0
+2393 0
+2394 0
+2395 0
+2396 0
+2397 0
+2398 0
+2399 0
+2400 0
+2401 0
+2402 0
+2403 0
+2404 0
+2405 0
+2406 0
+2407 0
+2408 0
+2409 0
+2410 0
+2411 1
+2412 0
+2413 0
+2414 0
+2415 0
+2416 0
+2417 0
+2418 0
+2419 0
+2420 0
+2421 1
+2422 0
+2423 0
+2424 0
+2425 0
+2426 0
+2427 0
+2428 0
+2429 0
+2430 0
+2431 0
+2432 0
+2433 0
+2434 0
+2435 0
+2436 0
+2437 0
+2438 0
+2439 0
+2440 1
+2441 0
+2442 0
+2443 0
+2444 0
+2445 0
+2446 0
+2447 0
+2448 0
+2449 0
+2450 0
+2451 1
+2452 0
+2453 0
+2454 0
+2455 0
+2456 0
+2457 0
+2458 0
+2459 0
+2460 0
+2461 1
+2462 0
+2463 0
+2464 0
+2465 0
+2466 0
+2467 0
+2468 0
+2469 1
+2470 0
+2471 0
+2472 0
+2473 0
+2474 0
+2475 0
+2476 0
+2477 1
+2478 0
+2479 0
+2480 0
+2481 0
+2482 0
+2483 0
+2484 0
+2485 0
+2486 1
+2487 0
+2488 0
+2489 0
+2490 0
+2491 0
+2492 0
+2493 0
+2494 0
+2495 0
+2496 1
+2497 0
+2498 0
+2499 0
+2500 0
+2501 0
+2502 0
+2503 0
+2504 0
+2505 0
+2506 1
+2507 0
+2508 0
+2509 0
+2510 0
+2511 0
+2512 0
+2513 0
+2514 0
+2515 0
+2516 1
+2517 0
+2518 0
+2519 0
+2520 0
+2521 0
+2522 0
+2523 0
+2524 0
+2525 0
+2526 0
+2527 1
+2528 0
+2529 0
+2530 0
+2531 0
+2532 0
+2533 0
+2534 0
+2535 0
+2536 0
+2537 1
+2538 0
+2539 0
+2540 0
+2541 0
+2542 0
+2543 0
+2544 0
+2545 0
+2546 0
+2547 0
+2548 0
+2549 0
+2550 0
+2551 0
+2552 0
+2553 0
+2554 0
+2555 0
+2556 0
+2557 1
+2558 0
+2559 0
+2560 0
+2561 0
+2562 0
+2563 0
+2564 0
+2565 0
+2566 1
+2567 0
+2568 0
+2569 0
+2570 0
+2571 0
+2572 0
+2573 0
+2574 0
+2575 1
+2576 0
+2577 0
+2578 0
+2579 0
+2580 0
+2581 0
+2582 0
+2583 0
+2584 1
+2585 0
+2586 0
+2587 0
+2588 0
+2589 0
+2590 0
+2591 0
+2592 0
+2593 0
+2594 0
+2595 1
+2596 0
+2597 0
+2598 0
+2599 0
+2600 0
+2601 0
+2602 0
+2603 0
+2604 0
+2605 1
+2606 0
+2607 0
+2608 0
+2609 0
+2610 0
+2611 0
+2612 0
+2613 0
+2614 0
+2615 0
+2616 0
+2617 0
+2618 0
+2619 0
+2620 0
+2621 0
+2622 0
+2623 0
+2624 0
+2625 1
+2626 0
+2627 0
+2628 0
+2629 0
+2630 0
+2631 0
+2632 0
+2633 0
+2634 0
+2635 1
+2636 0
+2637 0
+2638 0
+2639 1
+2640 0
+2641 0
+2642 0
+2643 1
+2644 0
+2645 0
+2646 0
+2647 0
+2648 0
+2649 0
+2650 0
+2651 0
+2652 0
+2653 1
+2654 0
+2655 0
+2656 0
+2657 0
+2658 0
+2659 0
+2660 0
+2661 0
+2662 0
+2663 1
+2664 0
+2665 0
+2666 0
+2667 0
+2668 0
+2669 0
+2670 0
+2671 1
+2672 0
+2673 0
+2674 0
+2675 0
+2676 0
+2677 0
+2678 0
+2679 1
+2680 0
+2681 0
+2682 0
+2683 0
+2684 0
+2685 0
+2686 0
+2687 0
+2688 0
+2689 1
+2690 0
+2691 0
+2692 0
+2693 0
+2694 0
+2695 0
+2696 0
+2697 0
+2698 0
+2699 1
+2700 0
+2701 0
+2702 0
+2703 0
+2704 0
+2705 0
+2706 0
+2707 0
+2708 0
+2709 1
+2710 0
+2711 0
+2712 0
+2713 0
+2714 0
+2715 0
+2716 1
+2717 0
+2718 0
+2719 0
+2720 0
+2721 0
+2722 0
+2723 0
+2724 1
+2725 0
+2726 0
+2727 0
+2728 0
+2729 0
+2730 0
+2731 0
+2732 0
+2733 0
+2734 1
+2735 0
+2736 0
+2737 0
+2738 0
+2739 0
+2740 0
+2741 0
+2742 0
+2743 0
+2744 1
+2745 0
+2746 0
+2747 0
+2748 0
+2749 0
+2750 0
+2751 0
+2752 0
+2753 1
+2754 0
+2755 0
+2756 0
+2757 0
+2758 0
+2759 0
+2760 0
+2761 0
+2762 0
+2763 1
+2764 0
+2765 0
+2766 0
+2767 0
+2768 0
+2769 0
+2770 0
+2771 0
+2772 0
+2773 1
+2774 0
+2775 0
+2776 0
+2777 0
+2778 0
+2779 0
+2780 0
+2781 0
+2782 0
+2783 1
+2784 0
+2785 0
+2786 0
+2787 0
+2788 0
+2789 0
+2790 0
+2791 0
+2792 1
+2793 0
+2794 0
+2795 0
+2796 0
+2797 0
+2798 0
+2799 0
+2800 0
+2801 0
+2802 0
+2803 0
+2804 0
+2805 0
+2806 0
+2807 0
+2808 0
+2809 0
+2810 0
+2811 0
+2812 0
+2813 0
+2814 0
+2815 0
+2816 0
+2817 0
+2818 0
+2819 0
+2820 0
+2821 1
+2822 0
+2823 0
+2824 0
+2825 0
+2826 0
+2827 0
+2828 0
+2829 0
+2830 0
+2831 1
+2832 0
+2833 0
+2834 0
+2835 0
+2836 0
+2837 0
+2838 0
+2839 0
+2840 0
+2841 1
+2842 0
+2843 0
+2844 0
+2845 0
+2846 0
+2847 0
+2848 0
+2849 0
+2850 0
+2851 1
+2852 0
+2853 0
+2854 0
+2855 0
+2856 0
+2857 0
+2858 0
+2859 0
+2860 0
+2861 1
+2862 0
+2863 0
+2864 0
+2865 0
+2866 0
+2867 0
+2868 0
+2869 0
+2870 0
+2871 1
+2872 0
+2873 0
+2874 0
+2875 0
+2876 0
+2877 0
+2878 0
+2879 0
+2880 1
+2881 0
+2882 0
+2883 0
+2884 0
+2885 0
+2886 0
+2887 0
+2888 1
+2889 0
+2890 0
+2891 0
+2892 0
+2893 0
+2894 0
+2895 0
+2896 0
+2897 1
+2898 0
+2899 0
+2900 0
+2901 0
+2902 0
+2903 0
+2904 0
+2905 0
+2906 1
+2907 0
+2908 0
+2909 0
+2910 0
+2911 0
+2912 0
+2913 0
+2914 1
+2915 0
+2916 0
+2917 0
+2918 0
+2919 0
+2920 0
+2921 0
+2922 1
+2923 0
+2924 0
+2925 0
+2926 0
+2927 0
+2928 0
+2929 0
+2930 0
+2931 0
+2932 0
+2933 0
+2934 0
+2935 0
+2936 0
+2937 0
+2938 1
+2939 0
+2940 0
+2941 0
+2942 0
+2943 0
+2944 0
+2945 0
+2946 0
+2947 0
+2948 0
+2949 1
+2950 0
+2951 0
+2952 0
+2953 0
+2954 0
+2955 0
+2956 0
+2957 0
+2958 0
+2959 1
+2960 0
+2961 0
+2962 0
+2963 0
+2964 0
+2965 0
+2966 0
+2967 0
+2968 1
+2969 0
+2970 0
+2971 0
+2972 0
+2973 0
+2974 0
+2975 0
+2976 0
+2977 1
+2978 0
+2979 0
+2980 0
+2981 0
+2982 0
+2983 0
+2984 0
+2985 0
+2986 0
+2987 1
+2988 0
+2989 0
+2990 0
+2991 0
+2992 0
+2993 0
+2994 0
+2995 0
+2996 0
+2997 1
+2998 0
+2999 0
+3000 0
+3001 0
+3002 0
+3003 0
+3004 0
+3005 0
+3006 0
+3007 0
+3008 0
+3009 0
+3010 0
+3011 0
+3012 0
+3013 0
+3014 0
+3015 1
+3016 0
+3017 0
+3018 0
+3019 0
+3020 0
+3021 0
+3022 0
+3023 0
+3024 0
+3025 1
+3026 0
+3027 0
+3028 0
+3029 0
+3030 0
+3031 0
+3032 0
+3033 0
+3034 1
+3035 0
+3036 0
+3037 0
+3038 0
+3039 0
+3040 0
+3041 0
+3042 1
+3043 0
+3044 0
+3045 0
+3046 0
+3047 0
+3048 0
+3049 0
+3050 0
+3051 0
+3052 1
+3053 0
+3054 0
+3055 0
+3056 0
+3057 0
+3058 0
+3059 0
+3060 0
+3061 0
+3062 1
+3063 0
+3064 0
+3065 0
+3066 0
+3067 0
+3068 0
+3069 0
+3070 0
+3071 0
+3072 1
+3073 0
+3074 0
+3075 0
+3076 0
+3077 0
+3078 0
+3079 0
+3080 0
+3081 0
+3082 1
+3083 0
+3084 0
+3085 0
+3086 0
+3087 0
+3088 0
+3089 0
+3090 0
+3091 0
+3092 1
+3093 0
+3094 0
+3095 0
+3096 0
+3097 0
+3098 0
+3099 0
+3100 0
+3101 0
+3102 1
+3103 0
+3104 0
+3105 0
+3106 0
+3107 0
+3108 0
+3109 0
+3110 0
+3111 0
+3112 1
+3113 0
+3114 0
+3115 0
+3116 0
+3117 0
+3118 0
+3119 0
+3120 1
+3121 0
+3122 0
+3123 0
+3124 0
+3125 0
+3126 0
+3127 0
+3128 0
+3129 1
+3130 0
+3131 0
+3132 0
+3133 0
+3134 0
+3135 0
+3136 0
+3137 0
+3138 0
+3139 1
+3140 0
+3141 0
+3142 0
+3143 0
+3144 0
+3145 0
+3146 0
+3147 0
+3148 0
+3149 1
+3150 0
+3151 0
+3152 0
+3153 0
+3154 0
+3155 0
+3156 0
+3157 1
+3158 0
+3159 0
+3160 0
+3161 0
+3162 0
+3163 0
+3164 0
+3165 1
+3166 0
+3167 0
+3168 0
+3169 0
+3170 0
+3171 0
+3172 0
+3173 0
+3174 0
+3175 1
+3176 0
+3177 0
+3178 0
+3179 0
+3180 0
+3181 0
+3182 0
+3183 0
+3184 0
+3185 1
+3186 0
+3187 0
+3188 0
+3189 0
+3190 0
+3191 0
+3192 0
+3193 0
+3194 0
+3195 0
+3196 1
+3197 0
+3198 0
+3199 0
+3200 0
+3201 0
+3202 0
+3203 0
+3204 0
+3205 0
+3206 0
+3207 1
+3208 0
+3209 0
+3210 0
+3211 0
+3212 0
+3213 0
+3214 0
+3215 1
+3216 0
+3217 0
+3218 0
+3219 0
+3220 0
+3221 0
+3222 0
+3223 1
+3224 0
+3225 0
+3226 0
+3227 0
+3228 0
+3229 0
+3230 0
+3231 0
+3232 1
+3233 0
+3234 1
+3235 0
+3236 0
+3237 0
+3238 0
+3239 1
+3240 0
+3241 0
+3242 0
+3243 0
+3244 0
+3245 0
+3246 0
+3247 0
+3248 1
+3249 0
+3250 0
+3251 0
+3252 0
+3253 0
+3254 0
+3255 0
+3256 0
+3257 0
+3258 1
+3259 0
+3260 0
+3261 0
+3262 0
+3263 0
+3264 0
+3265 0
+3266 0
+3267 0
+3268 0
+3269 1
+3270 0
+3271 0
+3272 0
+3273 0
+3274 0
+3275 0
+3276 0
+3277 0
+3278 1
+3279 0
+3280 0
+3281 0
+3282 0
+3283 0
+3284 0
+3285 0
+3286 0
+3287 1
+3288 0
+3289 0
+3290 0
+3291 0
+3292 0
+3293 0
+3294 0
+3295 0
+3296 0
+3297 1
+3298 0
+3299 0
+3300 0
+3301 0
+3302 0
+3303 0
+3304 0
+3305 0
+3306 0
+3307 1
+3308 0
+3309 0
+3310 0
+3311 0
+3312 0
+3313 0
+3314 0
+3315 0
+3316 0
+3317 1
+3318 0
+3319 0
+3320 0
+3321 0
+3322 0
+3323 0
+3324 0
+3325 1
+3326 0
+3327 0
+3328 0
+3329 0
+3330 0
+3331 0
+3332 0
+3333 0
+3334 0
+3335 1
+3336 0
+3337 0
+3338 0
+3339 0
+3340 0
+3341 0
+3342 0
+3343 0
+3344 1
+3345 0
+3346 0
+3347 0
+3348 0
+3349 0
+3350 0
+3351 0
+3352 0
+3353 0
+3354 1
+3355 0
+3356 0
+3357 0
+3358 0
+3359 0
+3360 0
+3361 0
+3362 0
+3363 0
+3364 0
+3365 1
+3366 0
+3367 0
+3368 0
+3369 0
+3370 0
+3371 0
+3372 0
+3373 0
+3374 0
+3375 1
+3376 0
+3377 0
+3378 0
+3379 0
+3380 0
+3381 0
+3382 0
+3383 0
+3384 0
+3385 0
+3386 1
+3387 0
+3388 0
+3389 0
+3390 0
+3391 0
+3392 0
+3393 0
+3394 0
+3395 0
+3396 0
+3397 1
+3398 0
+3399 0
+3400 0
+3401 0
+3402 0
+3403 0
+3404 0
+3405 0
+3406 0
+3407 1
+3408 0
+3409 0
+3410 0
+3411 0
+3412 0
+3413 0
+3414 0
+3415 0
+3416 0
+3417 1
+3418 0
+3419 0
+3420 0
+3421 0
+3422 0
+3423 0
+3424 0
+3425 0
+3426 0
+3427 0
+3428 1
+3429 0
+3430 0
+3431 0
+3432 0
+3433 0
+3434 0
+3435 0
+3436 0
+3437 1
+3438 0
+3439 0
+3440 0
+3441 0
+3442 0
+3443 0
+3444 0
+3445 1
+3446 0
+3447 0
+3448 0
+3449 0
+3450 0
+3451 0
+3452 0
+3453 0
+3454 1
+3455 0
+3456 0
+3457 0
+3458 0
+3459 0
+3460 0
+3461 0
+3462 0
+3463 0
+3464 1
+3465 0
+3466 0
+3467 0
+3468 0
+3469 0
+3470 0
+3471 0
+3472 0
+3473 0
+3474 1
+3475 0
+3476 0
+3477 0
+3478 0
+3479 0
+3480 0
+3481 0
+3482 0
+3483 0
+3484 1
+3485 0
+3486 0
+3487 0
+3488 0
+3489 0
+3490 0
+3491 0
+3492 0
+3493 0
+3494 1
+3495 0
+3496 0
+3497 0
+3498 0
+3499 0
+3500 0
+3501 0
+3502 0
+3503 0
+3504 1
+3505 0
+3506 0
+3507 0
+3508 0
+3509 0
+3510 0
+3511 0
+3512 0
+3513 0
+3514 1
+3515 0
+3516 0
+3517 0
+3518 0
+3519 0
+3520 0
+3521 0
+3522 0
+3523 0
+3524 1
+3525 0
+3526 0
+3527 0
+3528 0
+3529 0
+3530 0
+3531 0
+3532 0
+3533 1
+3534 0
+3535 0
+3536 0
+3537 0
+3538 0
+3539 0
+3540 0
+3541 0
+3542 0
+3543 0
+3544 0
+3545 0
+3546 0
+3547 0
+3548 0
+3549 0
+3550 0
+3551 1
+3552 0
+3553 0
+3554 0
+3555 0
+3556 0
+3557 0
+3558 0
+3559 0
+3560 0
+3561 1
+3562 0
+3563 0
+3564 0
+3565 0
+3566 0
+3567 0
+3568 0
+3569 0
+3570 1
+3571 0
+3572 0
+3573 0
+3574 0
+3575 0
+3576 0
+3577 0
+3578 0
+3579 0
+3580 1
+3581 0
+3582 0
+3583 0
+3584 0
+3585 0
+3586 0
+3587 0
+3588 0
+3589 0
+3590 1
+3591 0
+3592 0
+3593 0
+3594 0
+3595 0
+3596 0
+3597 0
+3598 0
+3599 1
+3600 0
+3601 0
+3602 0
+3603 0
+3604 0
+3605 0
+3606 0
+3607 0
+3608 0
+3609 1
+3610 0
+3611 0
+3612 0
+3613 0
+3614 0
+3615 0
+3616 0
+3617 0
+3618 0
+3619 0
+3620 1
+3621 0
+3622 0
+3623 0
+3624 0
+3625 0
+3626 0
+3627 0
+3628 0
+3629 0
+3630 1
+3631 0
+3632 0
+3633 0
+3634 0
+3635 0
+3636 0
+3637 0
+3638 0
+3639 1
+3640 0
+3641 0
+3642 0
+3643 0
+3644 0
+3645 1
+3646 0
+3647 0
+3648 0
+3649 0
+3650 0
+3651 1
+3652 0
+3653 0
+3654 0
+3655 0
+3656 0
+3657 0
+3658 1
+3659 0
+3660 0
+3661 0
+3662 0
+3663 0
+3664 0
+3665 0
+3666 1
+3667 0
+3668 0
+3669 0
+3670 0
+3671 0
+3672 0
+3673 0
+3674 0
+3675 0
+3676 1
+3677 0
+3678 0
+3679 0
+3680 0
+3681 0
+3682 0
+3683 0
+3684 0
+3685 1
+3686 0
+3687 0
+3688 0
+3689 0
+3690 0
+3691 0
+3692 0
+3693 0
+3694 0
+3695 1
+3696 0
+3697 0
+3698 0
+3699 0
+3700 0
+3701 0
+3702 0
+3703 0
+3704 0
+3705 0
+3706 1
+3707 0
+3708 0
+3709 0
+3710 0
+3711 0
+3712 0
+3713 0
+3714 0
+3715 0
+3716 1
+3717 0
+3718 0
+3719 0
+3720 0
+3721 0
+3722 0
+3723 0
+3724 0
+3725 0
+3726 0
+3727 0
+3728 0
+3729 0
+3730 0
+3731 0
+3732 0
+3733 0
+3734 0
+3735 0
+3736 1
+3737 0
+3738 0
+3739 0
+3740 0
+3741 0
+3742 0
+3743 0
+3744 0
+3745 0
+3746 1
+3747 0
+3748 0
+3749 0
+3750 0
+3751 0
+3752 0
+3753 0
+3754 0
+3755 0
+3756 1
+3757 0
+3758 0
+3759 0
+3760 0
+3761 0
+3762 0
+3763 1
+3764 0
+3765 0
+3766 0
+3767 0
+3768 0
+3769 0
+3770 0
+3771 1
+3772 0
+3773 0
+3774 0
+3775 0
+3776 0
+3777 0
+3778 1
+3779 0
+3780 0
+3781 0
+3782 0
+3783 0
+3784 0
+3785 0
+3786 0
+3787 0
+3788 0
+3789 0
+3790 0
+3791 0
+3792 0
+3793 0
+3794 0
+3795 0
+3796 0
+3797 1
+3798 0
+3799 0
+3800 0
+3801 0
+3802 0
+3803 0
+3804 0
+3805 0
+3806 1
+3807 0
+3808 0
+3809 0
+3810 0
+3811 0
+3812 0
+3813 0
+3814 0
+3815 0
+3816 0
+3817 1
+3818 0
+3819 0
+3820 0
+3821 0
+3822 0
+3823 0
+3824 0
+3825 0
+3826 0
+3827 1
+3828 0
+3829 1
+3830 0
+3831 0
+3832 0
+3833 0
+3834 1
+3835 0
+3836 0
+3837 0
+3838 0
+3839 0
+3840 0
+3841 0
+3842 0
+3843 0
+3844 0
+3845 1
+3846 0
+3847 0
+3848 0
+3849 0
+3850 0
+3851 0
+3852 0
+3853 0
+3854 0
+3855 1
+3856 0
+3857 0
+3858 0
+3859 0
+3860 0
+3861 0
+3862 0
+3863 1
+3864 0
+3865 0
+3866 0
+3867 0
+3868 0
+3869 0
+3870 0
+3871 0
+3872 0
+3873 1
+3874 0
+3875 0
+3876 0
+3877 0
+3878 0
+3879 0
+3880 0
+3881 0
+3882 0
+3883 1
+3884 0
+3885 0
+3886 0
+3887 0
+3888 0
+3889 0
+3890 0
+3891 0
+3892 0
+3893 0
+3894 1
+3895 0
+3896 0
+3897 0
+3898 0
+3899 0
+3900 0
+3901 0
+3902 0
+3903 0
+3904 0
+3905 1
+3906 0
+3907 0
+3908 0
+3909 0
+3910 0
+3911 0
+3912 0
+3913 0
+3914 1
+3915 0
+3916 0
+3917 0
+3918 0
+3919 0
+3920 0
+3921 0
+3922 0
+3923 0
+3924 0
+3925 1
+3926 0
+3927 0
+3928 0
+3929 0
+3930 0
+3931 0
+3932 0
+3933 0
+3934 1
+3935 0
+3936 0
+3937 0
+3938 0
+3939 0
+3940 0
+3941 0
+3942 0
+3943 0
+3944 0
+3945 1
+3946 0
+3947 0
+3948 0
+3949 0
+3950 0
+3951 0
+3952 0
+3953 0
+3954 0
+3955 1
+3956 0
+3957 0
+3958 0
+3959 0
+3960 0
+3961 0
+3962 0
+3963 0
+3964 0
+3965 0
+3966 1
+3967 0
+3968 0
+3969 0
+3970 0
+3971 0
+3972 0
+3973 0
+3974 0
+3975 1
+3976 0
+3977 0
+3978 0
+3979 0
+3980 0
+3981 0
+3982 0
+3983 0
+3984 1
+3985 0
+3986 0
+3987 0
+3988 0
+3989 0
+3990 0
+3991 0
+3992 0
+3993 0
+3994 1
+3995 0
+3996 0
+3997 0
+3998 0
+3999 0
+4000 0
+4001 0
+4002 0
+4003 0
+4004 0
+4005 0
+4006 0
+4007 0
+4008 0
+4009 0
+4010 0
+4011 0
+4012 0
+4013 0
+4014 1
+4015 0
+4016 0
+4017 0
+4018 0
+4019 0
+4020 0
+4021 0
+4022 0
+4023 0
+4024 1
+4025 0
+4026 0
+4027 0
+4028 0
+4029 0
+4030 0
+4031 0
+4032 0
+4033 0
+4034 0
+4035 1
+4036 0
+4037 0
+4038 0
+4039 0
+4040 0
+4041 0
+4042 0
+4043 0
+4044 0
+4045 1
+4046 0
+4047 0
+4048 0
+4049 0
+4050 0
+4051 0
+4052 0
+4053 0
+4054 0
+4055 0
+4056 1
+4057 0
+4058 0
+4059 0
+4060 0
+4061 0
+4062 0
+4063 0
+4064 0
+4065 0
+4066 1
+4067 0
+4068 0
+4069 0
+4070 0
+4071 0
+4072 0
+4073 0
+4074 1
+4075 0
+4076 0
+4077 0
+4078 0
+4079 0
+4080 0
+4081 0
+4082 0
+4083 0
+4084 1
+4085 0
+4086 0
+4087 0
+4088 0
+4089 0
+4090 0
+4091 0
+4092 0
+4093 1
+4094 0
+4095 0
+4096 0
+4097 0
+4098 0
+4099 0
+4100 0
+4101 0
+4102 1
+4103 0
+4104 0
+4105 0
+4106 0
+4107 0
+4108 0
+4109 0
+4110 0
+4111 0
+4112 1
+4113 0
+4114 0
+4115 0
+4116 0
+4117 0
+4118 0
+4119 0
+4120 0
+4121 0
+4122 1
+4123 0
+4124 0
+4125 0
+4126 0
+4127 0
+4128 0
+4129 0
+4130 0
+4131 0
+4132 0
+4133 1
+4134 0
+4135 0
+4136 0
+4137 0
+4138 0
+4139 0
+4140 0
+4141 0
+4142 0
+4143 0
+4144 1
+4145 0
+4146 0
+4147 0
+4148 0
+4149 0
+4150 0
+4151 0
+4152 0
+4153 0
+4154 1
+4155 0
+4156 0
+4157 0
+4158 0
+4159 0
+4160 0
+4161 0
+4162 0
+4163 0
+4164 0
+4165 1
+4166 0
+4167 0
+4168 0
+4169 0
+4170 0
+4171 0
+4172 0
+4173 0
+4174 0
+4175 0
+4176 1
+4177 0
+4178 0
+4179 0
+4180 0
+4181 0
+4182 0
+4183 0
+4184 0
+4185 1
+4186 0
+4187 0
+4188 0
+4189 0
+4190 0
+4191 0
+4192 0
+4193 0
+4194 0
+4195 1
+4196 0
+4197 0
+4198 0
+4199 0
+4200 0
+4201 0
+4202 0
+4203 0
+4204 0
+4205 0
+4206 0
+4207 0
+4208 0
+4209 0
+4210 0
+4211 0
+4212 1
+4213 0
+4214 0
+4215 0
+4216 0
+4217 0
+4218 0
+4219 0
+4220 0
+4221 1
+4222 0
+4223 0
+4224 0
+4225 0
+4226 0
+4227 0
+4228 0
+4229 0
+4230 1
+4231 0
+4232 0
+4233 0
+4234 0
+4235 0
+4236 0
+4237 0
+4238 0
+4239 1
+4240 0
+4241 0
+4242 0
+4243 0
+4244 0
+4245 0
+4246 0
+4247 0
+4248 0
+4249 1
+4250 0
+4251 0
+4252 0
+4253 0
+4254 0
+4255 0
+4256 0
+4257 0
+4258 1
+4259 0
+4260 0
+4261 0
+4262 0
+4263 0
+4264 0
+4265 0
+4266 0
+4267 0
+4268 1
+4269 0
+4270 0
+4271 0
+4272 0
+4273 0
+4274 0
+4275 0
+4276 0
+4277 0
+4278 1
+4279 0
+4280 0
+4281 0
+4282 0
+4283 0
+4284 0
+4285 0
+4286 0
+4287 0
+4288 0
+4289 1
+4290 0
+4291 0
+4292 0
+4293 0
+4294 0
+4295 0
+4296 0
+4297 0
+4298 0
+4299 1
+4300 0
+4301 0
+4302 0
+4303 0
+4304 0
+4305 0
+4306 0
+4307 0
+4308 0
+4309 1
+4310 0
+4311 0
+4312 0
+4313 0
+4314 0
+4315 0
+4316 0
+4317 0
+4318 1
+4319 0
+4320 0
+4321 0
+4322 0
+4323 0
+4324 0
+4325 0
+4326 0
+4327 1
+4328 0
+4329 0
+4330 0
+4331 0
+4332 0
+4333 0
+4334 0
+4335 0
+4336 0
+4337 1
+4338 0
+4339 0
+4340 0
+4341 0
+4342 0
+4343 0
+4344 0
+4345 0
+4346 0
+4347 1
+4348 0
+4349 0
+4350 0
+4351 0
+4352 0
+4353 0
+4354 0
+4355 1
+4356 0
+4357 0
+4358 0
+4359 0
+4360 0
+4361 0
+4362 0
+4363 0
+4364 0
+4365 0
+4366 0
+4367 0
+4368 0
+4369 0
+4370 0
+4371 0
+4372 0
+4373 0
+4374 1
+4375 0
+4376 0
+4377 0
+4378 0
+4379 0
+4380 0
+4381 0
+4382 0
+4383 0
+4384 1
+4385 0
+4386 0
+4387 0
+4388 0
+4389 0
+4390 0
+4391 0
+4392 0
+4393 1
+4394 0
+4395 0
+4396 0
+4397 0
+4398 0
+4399 0
+4400 0
+4401 0
+4402 0
+4403 1
+4404 0
+4405 0
+4406 0
+4407 0
+4408 0
+4409 0
+4410 0
+4411 0
+4412 1
+4413 0
+4414 0
+4415 0
+4416 0
+4417 0
+4418 0
+4419 0
+4420 0
+4421 0
+4422 0
+4423 1
+4424 0
+4425 0
+4426 0
+4427 0
+4428 0
+4429 0
+4430 2
+4431 0
+4432 0
+4433 0
+4434 0
+4435 0
+4436 0
+4437 1
+4438 0
+4439 0
+4440 0
+4441 0
+4442 0
+4443 0
+4444 0
+4445 1
+4446 0
+4447 0
+4448 0
+4449 0
+4450 0
+4451 0
+4452 0
+4453 0
+4454 1
+4455 0
+4456 0
+4457 0
+4458 0
+4459 0
+4460 0
+4461 0
+4462 1
+4463 0
+4464 0
+4465 0
+4466 0
+4467 0
+4468 0
+4469 0
+4470 0
+4471 1
+4472 0
+4473 0
+4474 0
+4475 0
+4476 0
+4477 0
+4478 0
+4479 0
+4480 1
+4481 0
+4482 0
+4483 0
+4484 0
+4485 0
+4486 0
+4487 0
+4488 1
+4489 0
+4490 0
+4491 0
+4492 0
+4493 0
+4494 0
+4495 0
+4496 0
+4497 1
+4498 0
+4499 0
+4500 0
+4501 0
+4502 0
+4503 0
+4504 0
+4505 1
+4506 0
+4507 0
+4508 0
+4509 0
+4510 0
+4511 0
+4512 0
+4513 1
+4514 0
+4515 0
+4516 0
+4517 0
+4518 0
+4519 0
+4520 1
+4521 0
+4522 0
+4523 0
+4524 0
+4525 0
+4526 0
+4527 0
+4528 0
+4529 1
+4530 0
+4531 0
+4532 0
+4533 0
+4534 0
+4535 0
+4536 0
+4537 0
+4538 1
+4539 0
+4540 0
+4541 0
+4542 0
+4543 0
+4544 0
+4545 0
+4546 1
+4547 0
+4548 0
+4549 0
+4550 0
+4551 0
+4552 1
+4553 0
+4554 0
+4555 0
+4556 0
+4557 0
+4558 0
+4559 1
+4560 0
+4561 0
+4562 0
+4563 0
+4564 0
+4565 0
+4566 0
+4567 1
+4568 0
+4569 0
+4570 0
+4571 0
+4572 0
+4573 0
+4574 0
+4575 1
+4576 0
+4577 0
+4578 0
+4579 0
+4580 0
+4581 0
+4582 0
+4583 1
+4584 0
+4585 0
+4586 0
+4587 0
+4588 0
+4589 0
+4590 0
+4591 1
+4592 0
+4593 0
+4594 0
+4595 0
+4596 0
+4597 0
+4598 0
+4599 0
+4600 1
+4601 0
+4602 0
+4603 0
+4604 0
+4605 0
+4606 0
+4607 1
+4608 0
+4609 0
+4610 0
+4611 0
+4612 0
+4613 0
+4614 0
+4615 0
+4616 1
+4617 0
+4618 0
+4619 0
+4620 0
+4621 0
+4622 0
+4623 0
+4624 0
+4625 1
+4626 0
+4627 0
+4628 0
+4629 0
+4630 0
+4631 0
+4632 0
+4633 0
+4634 1
+4635 0
+4636 0
+4637 0
+4638 0
+4639 0
+4640 0
+4641 0
+4642 0
+4643 0
+4644 0
+4645 0
+4646 0
+4647 0
+4648 0
+4649 0
+4650 0
+4651 0
+4652 1
+4653 0
+4654 0
+4655 0
+4656 0
+4657 0
+4658 0
+4659 0
+4660 0
+4661 1
+4662 0
+4663 0
+4664 0
+4665 1
+4666 0
+4667 0
+4668 0
+4669 0
+4670 0
+4671 0
+4672 1
+4673 0
+4674 0
+4675 0
+4676 0
+4677 0
+4678 1
+4679 0
+4680 0
+4681 0
+4682 0
+4683 0
+4684 0
+4685 0
+4686 1
+4687 0
+4688 0
+4689 0
+4690 0
+4691 0
+4692 0
+4693 0
+4694 1
+4695 0
+4696 0
+4697 0
+4698 0
+4699 0
+4700 0
+4701 0
+4702 1
+4703 0
+4704 0
+4705 0
+4706 0
+4707 0
+4708 0
+4709 1
+4710 0
+4711 0
+4712 0
+4713 0
+4714 0
+4715 0
+4716 0
+4717 1
+4718 0
+4719 0
+4720 0
+4721 0
+4722 0
+4723 0
+4724 0
+4725 1
+4726 0
+4727 0
+4728 0
+4729 0
+4730 0
+4731 0
+4732 0
+4733 0
+4734 1
+4735 0
+4736 0
+4737 0
+4738 0
+4739 0
+4740 0
+4741 0
+4742 0
+4743 0
+4744 1
+4745 0
+4746 0
+4747 0
+4748 0
+4749 0
+4750 0
+4751 0
+4752 1
+4753 0
+4754 0
+4755 0
+4756 0
+4757 0
+4758 0
+4759 0
+4760 1
+4761 0
+4762 0
+4763 0
+4764 0
+4765 0
+4766 0
+4767 0
+4768 0
+4769 1
+4770 0
+4771 0
+4772 0
+4773 0
+4774 0
+4775 0
+4776 0
+4777 0
+4778 1
+4779 0
+4780 0
+4781 0
+4782 0
+4783 0
+4784 0
+4785 0
+4786 1
+4787 0
+4788 0
+4789 0
+4790 0
+4791 0
+4792 0
+4793 0
+4794 0
+4795 0
+4796 1
+4797 0
+4798 0
+4799 0
+4800 0
+4801 0
+4802 0
+4803 0
+4804 1
+4805 0
+4806 0
+4807 0
+4808 0
+4809 0
+4810 0
+4811 0
+4812 0
+4813 1
+4814 0
+4815 0
+4816 0
+4817 0
+4818 0
+4819 0
+4820 0
+4821 0
+4822 1
+4823 0
+4824 0
+4825 0
+4826 0
+4827 0
+4828 0
+4829 0
+4830 0
+4831 1
+4832 0
+4833 0
+4834 0
+4835 0
+4836 0
+4837 0
+4838 0
+4839 0
+4840 0
+4841 0
+4842 0
+4843 0
+4844 0
+4845 0
+4846 0
+4847 0
+4848 0
+4849 0
+4850 0
+4851 0
+4852 0
+4853 0
+4854 0
+4855 0
+4856 0
+4857 0
+4858 0
+4859 0
+4860 0
+4861 0
+4862 0
+4863 0
+4864 0
+4865 1
+4866 0
+4867 0
+4868 0
+4869 0
+4870 0
+4871 0
+4872 1
+4873 0
+4874 0
+4875 0
+4876 0
+4877 0
+4878 0
+4879 0
+4880 1
+4881 0
+4882 0
+4883 0
+4884 0
+4885 0
+4886 0
+4887 0
+4888 0
+4889 0
+4890 1
+4891 0
+4892 0
+4893 0
+4894 0
+4895 0
+4896 0
+4897 0
+4898 1
+4899 0
+4900 0
+4901 0
+4902 0
+4903 0
+4904 0
+4905 1
+4906 0
+4907 0
+4908 0
+4909 0
+4910 0
+4911 0
+4912 0
+4913 1
+4914 0
+4915 0
+4916 0
+4917 0
+4918 0
+4919 0
+4920 0
+4921 0
+4922 0
+4923 1
+4924 0
+4925 0
+4926 0
+4927 0
+4928 0
+4929 0
+4930 0
+4931 0
+4932 0
+4933 1
+4934 0
+4935 0
+4936 0
+4937 0
+4938 0
+4939 0
+4940 0
+4941 0
+4942 0
+4943 0
+4944 0
+4945 0
+4946 0
+4947 0
+4948 1
+4949 0
+4950 0
+4951 0
+4952 0
+4953 0
+4954 0
+4955 0
+4956 1
+4957 0
+4958 0
+4959 0
+4960 0
+4961 0
+4962 0
+4963 0
+4964 1
+4965 0
+4966 0
+4967 0
+4968 0
+4969 0
+4970 0
+4971 0
+4972 1
+4973 0
+4974 0
+4975 0
+4976 0
+4977 0
+4978 0
+4979 1
+4980 0
+4981 0
+4982 0
+4983 0
+4984 0
+4985 0
+4986 0
+4987 1
+4988 0
+4989 0
+4990 0
+4991 0
+4992 0
+4993 0
+4994 1
+4995 0
+4996 0
+4997 0
+4998 0
+4999 0
+5000 0
+5001 0
+5002 0
+5003 1
+5004 0
+5005 0
+5006 0
+5007 0
+5008 0
+5009 0
+5010 0
+5011 0
+5012 1
+5013 0
+5014 0
+5015 0
+5016 0
+5017 0
+5018 0
+5019 0
+5020 1
+5021 0
+5022 0
+5023 0
+5024 0
+5025 0
+5026 0
+5027 0
+5028 0
+5029 1
+5030 0
+5031 0
+5032 0
+5033 0
+5034 0
+5035 0
+5036 0
+5037 1
+5038 0
+5039 0
+5040 0
+5041 0
+5042 0
+5043 0
+5044 0
+5045 1
+5046 0
+5047 0
+5048 0
+5049 0
+5050 0
+5051 0
+5052 0
+5053 1
+5054 0
+5055 0
+5056 0
+5057 0
+5058 0
+5059 0
+5060 0
+5061 0
+5062 1
+5063 0
+5064 0
+5065 0
+5066 0
+5067 0
+5068 0
+5069 0
+5070 0
+5071 0
+5072 0
+5073 0
+5074 0
+5075 0
+5076 0
+5077 0
+5078 0
+5079 1
+5080 0
+5081 0
+5082 0
+5083 0
+5084 0
+5085 0
+5086 1
+5087 0
+5088 0
+5089 0
+5090 0
+5091 0
+5092 0
+5093 0
+5094 1
+5095 0
+5096 0
+5097 0
+5098 0
+5099 0
+5100 0
+5101 0
+5102 0
+5103 1
+5104 0
+5105 0
+5106 0
+5107 0
+5108 0
+5109 0
+5110 1
+5111 0
+5112 0
+5113 0
+5114 0
+5115 0
+5116 0
+5117 0
+5118 1
+5119 0
+5120 0
+5121 0
+5122 0
+5123 0
+5124 0
+5125 0
+5126 0
+5127 1
+5128 0
+5129 0
+5130 0
+5131 0
+5132 0
+5133 0
+5134 1
+5135 0
+5136 0
+5137 0
+5138 0
+5139 0
+5140 0
+5141 1
+5142 0
+5143 0
+5144 0
+5145 0
+5146 0
+5147 0
+5148 0
+5149 1
+5150 0
+5151 0
+5152 0
+5153 0
+5154 0
+5155 0
+5156 0
+5157 0
+5158 1
+5159 0
+5160 0
+5161 0
+5162 0
+5163 0
+5164 0
+5165 0
+5166 0
+5167 1
+5168 0
+5169 0
+5170 0
+5171 0
+5172 0
+5173 0
+5174 0
+5175 1
+5176 0
+5177 0
+5178 0
+5179 0
+5180 0
+5181 0
+5182 1
+5183 0
+5184 0
+5185 0
+5186 0
+5187 0
+5188 0
+5189 0
+5190 1
+5191 0
+5192 0
+5193 0
+5194 0
+5195 0
+5196 0
+5197 0
+5198 0
+5199 1
+5200 0
+5201 0
+5202 0
+5203 0
+5204 0
+5205 0
+5206 0
+5207 0
+5208 1
+5209 0
+5210 0
+5211 0
+5212 0
+5213 0
+5214 0
+5215 0
+5216 0
+5217 0
+5218 1
+5219 0
+5220 0
+5221 0
+5222 0
+5223 0
+5224 0
+5225 0
+5226 1
+5227 0
+5228 0
+5229 0
+5230 0
+5231 0
+5232 0
+5233 0
+5234 1
+5235 0
+5236 0
+5237 0
+5238 0
+5239 0
+5240 0
+5241 0
+5242 1
+5243 0
+5244 0
+5245 0
+5246 0
+5247 0
+5248 0
+5249 0
+5250 0
+5251 1
+5252 0
+5253 0
+5254 0
+5255 0
+5256 0
+5257 0
+5258 0
+5259 0
+5260 0
+5261 0
+5262 0
+5263 0
+5264 0
+5265 0
+5266 0
+5267 0
+5268 1
+5269 0
+5270 0
+5271 0
+5272 0
+5273 0
+5274 0
+5275 0
+5276 1
+5277 0
+5278 0
+5279 0
+5280 0
+5281 0
+5282 0
+5283 1
+5284 0
+5285 0
+5286 0
+5287 0
+5288 0
+5289 0
+5290 0
+5291 0
+5292 0
+5293 1
+5294 0
+5295 0
+5296 0
+5297 0
+5298 0
+5299 0
+5300 0
+5301 1
+5302 0
+5303 0
+5304 0
+5305 0
+5306 0
+5307 0
+5308 0
+5309 0
+5310 1
+5311 0
+5312 0
+5313 0
+5314 0
+5315 0
+5316 0
+5317 0
+5318 1
+5319 0
+5320 0
+5321 0
+5322 0
+5323 0
+5324 0
+5325 1
+5326 0
+5327 0
+5328 0
+5329 0
+5330 0
+5331 0
+5332 0
+5333 0
+5334 0
+5335 0
+5336 0
+5337 0
+5338 0
+5339 0
+5340 0
+5341 0
+5342 1
+5343 0
+5344 0
+5345 0
+5346 0
+5347 0
+5348 0
+5349 1
+5350 0
+5351 0
+5352 0
+5353 0
+5354 0
+5355 0
+5356 0
+5357 0
+5358 1
+5359 0
+5360 0
+5361 0
+5362 0
+5363 0
+5364 0
+5365 0
+5366 1
+5367 0
+5368 0
+5369 0
+5370 0
+5371 0
+5372 0
+5373 1
+5374 0
+5375 0
+5376 0
+5377 0
+5378 0
+5379 0
+5380 0
+5381 1
+5382 0
+5383 0
+5384 0
+5385 0
+5386 0
+5387 0
+5388 0
+5389 0
+5390 1
+5391 0
+5392 0
+5393 0
+5394 0
+5395 0
+5396 0
+5397 0
+5398 1
+5399 0
+5400 0
+5401 0
+5402 0
+5403 0
+5404 0
+5405 0
+5406 1
+5407 0
+5408 0
+5409 0
+5410 0
+5411 0
+5412 0
+5413 0
+5414 1
+5415 0
+5416 0
+5417 0
+5418 0
+5419 0
+5420 0
+5421 0
+5422 1
+5423 0
+5424 0
+5425 0
+5426 0
+5427 0
+5428 0
+5429 0
+5430 0
+5431 0
+5432 0
+5433 0
+5434 0
+5435 0
+5436 0
+5437 0
+5438 1
+5439 0
+5440 0
+5441 0
+5442 0
+5443 0
+5444 0
+5445 0
+5446 0
+5447 1
+5448 0
+5449 0
+5450 0
+5451 0
+5452 0
+5453 0
+5454 0
+5455 0
+5456 1
+5457 0
+5458 0
+5459 0
+5460 0
+5461 0
+5462 0
+5463 0
+5464 1
+5465 0
+5466 0
+5467 0
+5468 0
+5469 0
+5470 0
+5471 0
+5472 1
+5473 0
+5474 0
+5475 0
+5476 0
+5477 0
+5478 0
+5479 0
+5480 0
+5481 1
+5482 0
+5483 0
+5484 0
+5485 0
+5486 0
+5487 0
+5488 0
+5489 1
+5490 0
+5491 0
+5492 0
+5493 0
+5494 0
+5495 0
+5496 0
+5497 0
+5498 1
+5499 0
+5500 0
+5501 0
+5502 0
+5503 0
+5504 0
+5505 0
+5506 1
+5507 0
+5508 0
+5509 0
+5510 0
+5511 0
+5512 0
+5513 0
+5514 1
+5515 0
+5516 0
+5517 0
+5518 0
+5519 0
+5520 0
+5521 0
+5522 0
+5523 1
+5524 0
+5525 0
+5526 0
+5527 0
+5528 0
+5529 0
+5530 0
+5531 1
+5532 0
+5533 0
+5534 0
+5535 0
+5536 0
+5537 0
+5538 0
+5539 0
+5540 1
+5541 0
+5542 0
+5543 0
+5544 0
+5545 0
+5546 0
+5547 0
+5548 0
+5549 1
+5550 0
+5551 0
+5552 0
+5553 0
+5554 0
+5555 0
+5556 0
+5557 0
+5558 0
+5559 0
+5560 0
+5561 0
+5562 0
+5563 0
+5564 0
+5565 1
+5566 0
+5567 0
+5568 0
+5569 0
+5570 0
+5571 1
+5572 0
+5573 0
+5574 0
+5575 0
+5576 0
+5577 0
+5578 0
+5579 1
+5580 0
+5581 0
+5582 0
+5583 0
+5584 0
+5585 0
+5586 0
+5587 0
+5588 1
+5589 0
+5590 0
+5591 0
+5592 0
+5593 0
+5594 0
+5595 0
+5596 1
+5597 0
+5598 0
+5599 0
+5600 0
+5601 0
+5602 0
+5603 0
+5604 0
+5605 0
+5606 1
+5607 0
+5608 0
+5609 0
+5610 0
+5611 0
+5612 0
+5613 0
+5614 1
+5615 0
+5616 0
+5617 0
+5618 0
+5619 0
+5620 0
+5621 0
+5622 1
+5623 0
+5624 0
+5625 0
+5626 0
+5627 0
+5628 0
+5629 0
+5630 0
+5631 0
+5632 0
+5633 0
+5634 0
+5635 0
+5636 0
+5637 0
+5638 1
+5639 0
+5640 0
+5641 0
+5642 0
+5643 0
+5644 0
+5645 0
+5646 0
+5647 1
+5648 0
+5649 0
+5650 0
+5651 0
+5652 0
+5653 0
+5654 1
+5655 0
+5656 0
+5657 0
+5658 0
+5659 0
+5660 0
+5661 0
+5662 1
+5663 0
+5664 0
+5665 0
+5666 0
+5667 0
+5668 0
+5669 0
+5670 1
+5671 0
+5672 0
+5673 0
+5674 0
+5675 0
+5676 0
+5677 0
+5678 0
+5679 1
+5680 2
+5681 1
+5682 0
+5683 0
+5684 0
+5685 0
+5686 0
+5687 1
+5688 0
+5689 0
+5690 0
+5691 0
+5692 1
+5693 0
+5694 0
+5695 0
+5696 0
+5697 1
+5698 0
+5699 0
+5700 0
+5701 0
+5702 0
+5703 0
+5704 0
+5705 1
+5706 0
+5707 0
+5708 0
+5709 0
+5710 0
+5711 1
+5712 0
+5713 0
+5714 0
+5715 0
+5716 0
+5717 0
+5718 0
+5719 0
+5720 0
+5721 0
+5722 0
+5723 0
+5724 0
+5725 0
+5726 1
+5727 0
+5728 0
+5729 0
+5730 0
+5731 0
+5732 0
+5733 0
+5734 1
+5735 0
+5736 0
+5737 0
+5738 0
+5739 0
+5740 0
+5741 0
+5742 1
+5743 0
+5744 0
+5745 0
+5746 0
+5747 0
+5748 0
+5749 0
+5750 0
+5751 1
+5752 0
+5753 0
+5754 0
+5755 0
+5756 0
+5757 0
+5758 0
+5759 1
+5760 0
+5761 0
+5762 0
+5763 0
+5764 0
+5765 0
+5766 1
+5767 0
+5768 0
+5769 0
+5770 0
+5771 0
+5772 0
+5773 0
+5774 1
+5775 0
+5776 0
+5777 0
+5778 0
+5779 0
+5780 0
+5781 0
+5782 1
+5783 0
+5784 0
+5785 0
+5786 0
+5787 0
+5788 0
+5789 0
+5790 0
+5791 1
+5792 0
+5793 0
+5794 0
+5795 0
+5796 0
+5797 0
+5798 0
+5799 0
+5800 1
+5801 0
+5802 0
+5803 0
+5804 0
+5805 0
+5806 0
+5807 0
+5808 0
+5809 1
+5810 0
+5811 0
+5812 0
+5813 0
+5814 0
+5815 0
+5816 1
+5817 0
+5818 0
+5819 0
+5820 0
+5821 0
+5822 0
+5823 0
+5824 0
+5825 1
+5826 0
+5827 0
+5828 0
+5829 0
+5830 0
+5831 0
+5832 0
+5833 0
+5834 1
+5835 0
+5836 0
+5837 0
+5838 0
+5839 0
+5840 0
+5841 0
+5842 1
+5843 0
+5844 0
+5845 0
+5846 0
+5847 0
+5848 0
+5849 0
+5850 1
+5851 0
+5852 0
+5853 0
+5854 0
+5855 0
+5856 0
+5857 0
+5858 1
+5859 0
+5860 0
+5861 0
+5862 0
+5863 0
+5864 0
+5865 0
+5866 0
+5867 1
+5868 0
+5869 0
+5870 0
+5871 0
+5872 0
+5873 0
+5874 0
+5875 1
+5876 0
+5877 0
+5878 0
+5879 0
+5880 0
+5881 0
+5882 0
+5883 0
+5884 1
+5885 0
+5886 0
+5887 0
+5888 0
+5889 0
+5890 0
+5891 1
+5892 0
+5893 0
+5894 0
+5895 0
+5896 0
+5897 0
+5898 0
+5899 0
+5900 1
+5901 0
+5902 0
+5903 0
+5904 0
+5905 0
+5906 0
+5907 0
+5908 0
+5909 1
+5910 0
+5911 0
+5912 0
+5913 0
+5914 0
+5915 0
+5916 0
+5917 1
+5918 0
+5919 0
+5920 0
+5921 0
+5922 0
+5923 0
+5924 0
+5925 0
+5926 1
+5927 0
+5928 0
+5929 0
+5930 0
+5931 0
+5932 0
+5933 0
+5934 1
+5935 0
+5936 0
+5937 0
+5938 0
+5939 0
+5940 0
+5941 0
+5942 0
+5943 0
+5944 1
+5945 0
+5946 0
+5947 0
+5948 0
+5949 0
+5950 0
+5951 0
+5952 0
+5953 0
+5954 0
+5955 0
+5956 0
+5957 0
+5958 0
+5959 0
+5960 0
+5961 0
+5962 0
+5963 0
+5964 0
+5965 0
+5966 0
+5967 0
+5968 0
+5969 0
+5970 1
+5971 0
+5972 0
+5973 0
+5974 0
+5975 0
+5976 0
+5977 0
+5978 1
+5979 0
+5980 0
+5981 0
+5982 0
+5983 0
+5984 0
+5985 0
+5986 0
+5987 1
+5988 0
+5989 0
+5990 0
+5991 0
+5992 0
+5993 0
+5994 0
+5995 0
+5996 1
+5997 0
+5998 0
+5999 0
+6000 0
+6001 0
+6002 0
+6003 0
+6004 0
+6005 0
+6006 1
+6007 0
+6008 0
+6009 0
+6010 0
+6011 0
+6012 0
+6013 0
+6014 1
+6015 0
+6016 0
+6017 0
+6018 0
+6019 0
+6020 0
+6021 0
+6022 0
+6023 1
+6024 0
+6025 0
+6026 0
+6027 0
+6028 0
+6029 0
+6030 0
+6031 1
+6032 0
+6033 0
+6034 0
+6035 0
+6036 0
+6037 0
+6038 1
+6039 0
+6040 0
+6041 0
+6042 0
+6043 0
+6044 0
+6045 0
+6046 0
+6047 0
+6048 1
+6049 0
+6050 0
+6051 0
+6052 0
+6053 0
+6054 0
+6055 1
+6056 0
+6057 0
+6058 0
+6059 0
+6060 0
+6061 1
+6062 0
+6063 0
+6064 0
+6065 0
+6066 0
+6067 0
+6068 1
+6069 0
+6070 0
+6071 0
+6072 0
+6073 0
+6074 0
+6075 0
+6076 1
+6077 0
+6078 0
+6079 0
+6080 0
+6081 0
+6082 0
+6083 0
+6084 0
+6085 1
+6086 0
+6087 0
+6088 0
+6089 0
+6090 0
+6091 0
+6092 0
+6093 0
+6094 0
+6095 1
+6096 0
+6097 0
+6098 0
+6099 0
+6100 0
+6101 0
+6102 0
+6103 0
+6104 1
+6105 0
+6106 0
+6107 0
+6108 0
+6109 0
+6110 0
+6111 0
+6112 1
+6113 0
+6114 0
+6115 0
+6116 0
+6117 0
+6118 0
+6119 0
+6120 0
+6121 0
+6122 0
+6123 0
+6124 0
+6125 1
+6126 0
+6127 0
+6128 0
+6129 0
+6130 0
+6131 0
+6132 0
+6133 0
+6134 0
+6135 0
+6136 0
+6137 0
+6138 0
+6139 0
+6140 0
+6141 0
+6142 1
+6143 0
+6144 0
+6145 0
+6146 0
+6147 0
+6148 0
+6149 0
+6150 1
+6151 0
+6152 0
+6153 0
+6154 0
+6155 0
+6156 0
+6157 0
+6158 0
+6159 1
+6160 0
+6161 0
+6162 0
+6163 0
+6164 0
+6165 0
+6166 0
+6167 1
+6168 0
+6169 0
+6170 0
+6171 0
+6172 0
+6173 0
+6174 0
+6175 1
+6176 0
+6177 0
+6178 0
+6179 0
+6180 0
+6181 0
+6182 0
+6183 1
+6184 0
+6185 0
+6186 0
+6187 0
+6188 0
+6189 0
+6190 0
+6191 0
+6192 1
+6193 0
+6194 0
+6195 0
+6196 0
+6197 0
+6198 0
+6199 0
+6200 0
+6201 1
+6202 0
+6203 0
+6204 0
+6205 0
+6206 0
+6207 0
+6208 0
+6209 0
+6210 1
+6211 0
+6212 0
+6213 0
+6214 0
+6215 0
+6216 0
+6217 1
+6218 0
+6219 0
+6220 0
+6221 0
+6222 0
+6223 0
+6224 0
+6225 1
+6226 0
+6227 0
+6228 0
+6229 0
+6230 0
+6231 0
+6232 0
+6233 0
+6234 1
+6235 0
+6236 0
+6237 0
+6238 0
+6239 0
+6240 0
+6241 1
+6242 0
+6243 0
+6244 0
+6245 0
+6246 0
+6247 0
+6248 0
+6249 0
+6250 1
+6251 0
+6252 0
+6253 0
+6254 0
+6255 0
+6256 0
+6257 0
+6258 1
+6259 0
+6260 0
+6261 0
+6262 0
+6263 0
+6264 0
+6265 0
+6266 0
+6267 0
+6268 1
+6269 0
+6270 0
+6271 0
+6272 0
+6273 0
+6274 0
+6275 0
+6276 0
+6277 1
+6278 0
+6279 0
+6280 0
+6281 0
+6282 0
+6283 0
+6284 0
+6285 1
+6286 0
+6287 0
+6288 0
+6289 0
+6290 0
+6291 0
+6292 1
+6293 0
+6294 0
+6295 0
+6296 0
+6297 0
+6298 0
+6299 1
+6300 0
+6301 0
+6302 0
+6303 0
+6304 0
+6305 0
+6306 0
+6307 1
+6308 0
+6309 0
+6310 0
+6311 0
+6312 0
+6313 0
+6314 0
+6315 1
+6316 0
+6317 0
+6318 0
+6319 0
+6320 0
+6321 0
+6322 0
+6323 0
+6324 1
+6325 0
+6326 0
+6327 0
+6328 0
+6329 0
+6330 0
+6331 0
+6332 1
+6333 0
+6334 0
+6335 0
+6336 0
+6337 0
+6338 0
+6339 0
+6340 0
+6341 1
+6342 0
+6343 0
+6344 0
+6345 0
+6346 0
+6347 0
+6348 0
+6349 0
+6350 1
+6351 0
+6352 0
+6353 0
+6354 0
+6355 0
+6356 0
+6357 0
+6358 1
+6359 0
+6360 0
+6361 0
+6362 0
+6363 0
+6364 0
+6365 0
+6366 1
+6367 0
+6368 0
+6369 0
+6370 0
+6371 0
+6372 0
+6373 0
+6374 0
+6375 1
+6376 0
+6377 0
+6378 0
+6379 0
+6380 0
+6381 0
+6382 0
+6383 1
+6384 0
+6385 0
+6386 0
+6387 0
+6388 0
+6389 0
+6390 0
+6391 4
+6392 0
+6393 1
+6394 0
+6395 0
+6396 0
+6397 1
+6398 0
+6399 0
+6400 0
+6401 0
+6402 1
+6403 0
+6404 0
+6405 0
+6406 0
+6407 1
+6408 0
+6409 0
+6410 0
+6411 0
+6412 1
+6413 0
+6414 0
+6415 0
+6416 0
+6417 0
+6418 1
+6419 0
+6420 0
+6421 0
+6422 0
+6423 0
+6424 0
+6425 1
+6426 0
+6427 0
+6428 0
+6429 0
+6430 0
+6431 0
+6432 0
+6433 0
+6434 1
+6435 0
+6436 0
+6437 0
+6438 0
+6439 0
+6440 0
+6441 0
+6442 0
+6443 1
+6444 0
+6445 0
+6446 0
+6447 0
+6448 0
+6449 0
+6450 0
+6451 0
+6452 1
+6453 0
+6454 0
+6455 0
+6456 0
+6457 0
+6458 0
+6459 0
+6460 0
+6461 0
+6462 0
+6463 1
+6464 0
+6465 0
+6466 0
+6467 0
+6468 0
+6469 0
+6470 0
+6471 0
+6472 1
+6473 0
+6474 0
+6475 0
+6476 0
+6477 0
+6478 0
+6479 0
+6480 0
+6481 0
+6482 1
+6483 0
+6484 0
+6485 0
+6486 0
+6487 0
+6488 0
+6489 0
+6490 0
+6491 0
+6492 1
+6493 0
+6494 0
+6495 0
+6496 0
+6497 0
+6498 0
+6499 0
+6500 0
+6501 0
+6502 0
+6503 0
+6504 0
+6505 0
+6506 0
+6507 0
+6508 0
+6509 0
+6510 0
+6511 0
+6512 1
+6513 0
+6514 0
+6515 0
+6516 0
+6517 0
+6518 0
+6519 0
+6520 0
+6521 1
+6522 0
+6523 0
+6524 0
+6525 0
+6526 0
+6527 0
+6528 0
+6529 0
+6530 0
+6531 1
+6532 0
+6533 0
+6534 0
+6535 0
+6536 0
+6537 0
+6538 0
+6539 0
+6540 1
+6541 0
+6542 0
+6543 0
+6544 0
+6545 0
+6546 0
+6547 0
+6548 0
+6549 0
+6550 1
+6551 0
+6552 0
+6553 0
+6554 0
+6555 0
+6556 0
+6557 0
+6558 0
+6559 0
+6560 1
+6561 0
+6562 0
+6563 0
+6564 0
+6565 0
+6566 0
+6567 0
+6568 0
+6569 1
+6570 0
+6571 0
+6572 0
+6573 0
+6574 0
+6575 0
+6576 0
+6577 1
+6578 0
+6579 0
+6580 0
+6581 0
+6582 0
+6583 0
+6584 0
+6585 0
+6586 1
+6587 0
+6588 0
+6589 0
+6590 0
+6591 0
+6592 0
+6593 0
+6594 0
+6595 1
+6596 0
+6597 0
+6598 0
+6599 0
+6600 0
+6601 0
+6602 0
+6603 0
+6604 1
+6605 0
+6606 0
+6607 0
+6608 0
+6609 0
+6610 0
+6611 0
+6612 0
+6613 1
+6614 0
+6615 0
+6616 0
+6617 0
+6618 0
+6619 0
+6620 0
+6621 0
+6622 1
+6623 0
+6624 0
+6625 0
+6626 0
+6627 0
+6628 0
+6629 0
+6630 0
+6631 1
+6632 0
+6633 0
+6634 0
+6635 0
+6636 0
+6637 0
+6638 0
+6639 0
+6640 1
+6641 0
+6642 0
+6643 0
+6644 0
+6645 0
+6646 0
+6647 0
+6648 0
+6649 0
+6650 1
+6651 0
+6652 0
+6653 0
+6654 0
+6655 0
+6656 0
+6657 0
+6658 0
+6659 0
+6660 1
+6661 0
+6662 0
+6663 0
+6664 0
+6665 0
+6666 0
+6667 0
+6668 0
+6669 1
+6670 0
+6671 0
+6672 0
+6673 0
+6674 0
+6675 0
+6676 0
+6677 0
+6678 0
+6679 1
+6680 0
+6681 0
+6682 0
+6683 0
+6684 0
+6685 0
+6686 0
+6687 0
+6688 1
+6689 0
+6690 0
+6691 0
+6692 0
+6693 0
+6694 0
+6695 0
+6696 0
+6697 0
+6698 1
+6699 0
+6700 0
+6701 0
+6702 0
+6703 0
+6704 0
+6705 0
+6706 1
+6707 0
+6708 0
+6709 0
+6710 0
+6711 0
+6712 0
+6713 0
+6714 0
+6715 0
+6716 1
+6717 0
+6718 0
+6719 0
+6720 0
+6721 0
+6722 0
+6723 0
+6724 0
+6725 0
+6726 1
+6727 0
+6728 0
+6729 0
+6730 0
+6731 0
+6732 0
+6733 0
+6734 0
+6735 0
+6736 0
+6737 1
+6738 0
+6739 0
+6740 0
+6741 0
+6742 0
+6743 0
+6744 0
+6745 0
+6746 1
+6747 0
+6748 0
+6749 0
+6750 0
+6751 0
+6752 0
+6753 0
+6754 0
+6755 0
+6756 1
+6757 0
+6758 0
+6759 0
+6760 0
+6761 0
+6762 0
+6763 0
+6764 0
+6765 0
+6766 1
+6767 0
+6768 0
+6769 0
+6770 0
+6771 0
+6772 0
+6773 0
+6774 0
+6775 1
+6776 0
+6777 0
+6778 0
+6779 0
+6780 0
+6781 0
+6782 0
+6783 0
+6784 1
+6785 0
+6786 0
+6787 0
+6788 0
+6789 0
+6790 0
+6791 0
+6792 0
+6793 0
+6794 1
+6795 0
+6796 0
+6797 0
+6798 0
+6799 0
+6800 0
+6801 0
+6802 0
+6803 1
+6804 0
+6805 0
+6806 0
+6807 0
+6808 0
+6809 0
+6810 0
+6811 0
+6812 0
+6813 1
+6814 0
+6815 0
+6816 0
+6817 0
+6818 0
+6819 0
+6820 0
+6821 0
+6822 0
+6823 0
+6824 1
+6825 0
+6826 0
+6827 0
+6828 0
+6829 0
+6830 0
+6831 0
+6832 1
+6833 0
+6834 0
+6835 0
+6836 0
+6837 0
+6838 0
+6839 0
+6840 0
+6841 0
+6842 1
+6843 0
+6844 0
+6845 0
+6846 0
+6847 0
+6848 0
+6849 0
+6850 0
+6851 1
+6852 0
+6853 0
+6854 0
+6855 0
+6856 0
+6857 0
+6858 0
+6859 0
+6860 0
+6861 0
+6862 1
+6863 0
+6864 0
+6865 0
+6866 0
+6867 0
+6868 0
+6869 0
+6870 0
+6871 1
+6872 0
+6873 0
+6874 0
+6875 0
+6876 0
+6877 0
+6878 0
+6879 1
+6880 0
+6881 0
+6882 0
+6883 0
+6884 0
+6885 0
+6886 1
+6887 0
+6888 0
+6889 0
+6890 0
+6891 0
+6892 0
+6893 0
+6894 0
+6895 1
+6896 0
+6897 0
+6898 0
+6899 0
+6900 0
+6901 0
+6902 0
+6903 0
+6904 0
+6905 0
+6906 0
+6907 0
+6908 0
+6909 0
+6910 0
+6911 0
+6912 0
+6913 0
+6914 1
+6915 0
+6916 0
+6917 0
+6918 0
+6919 0
+6920 0
+6921 0
+6922 0
+6923 1
+6924 0
+6925 0
+6926 0
+6927 0
+6928 0
+6929 0
+6930 0
+6931 0
+6932 0
+6933 0
+6934 1
+6935 0
+6936 0
+6937 0
+6938 0
+6939 0
+6940 0
+6941 0
+6942 0
+6943 0
+6944 1
+6945 0
+6946 0
+6947 0
+6948 0
+6949 0
+6950 0
+6951 0
+6952 0
+6953 0
+6954 1
+6955 0
+6956 0
+6957 0
+6958 0
+6959 0
+6960 0
+6961 0
+6962 0
+6963 0
+6964 1
+6965 0
+6966 0
+6967 0
+6968 0
+6969 0
+6970 0
+6971 0
+6972 0
+6973 0
+6974 1
+6975 0
+6976 0
+6977 0
+6978 0
+6979 0
+6980 0
+6981 0
+6982 0
+6983 1
+6984 0
+6985 0
+6986 0
+6987 0
+6988 0
+6989 0
+6990 0
+6991 0
+6992 1
+6993 0
+6994 0
+6995 0
+6996 0
+6997 0
+6998 0
+6999 0
+7000 0
+7001 1
+7002 0
+7003 0
+7004 0
+7005 0
+7006 0
+7007 0
+7008 0
+7009 0
+7010 1
+7011 0
+7012 0
+7013 0
+7014 0
+7015 0
+7016 0
+7017 0
+7018 0
+7019 0
+7020 1
+7021 0
+7022 0
+7023 0
+7024 0
+7025 0
+7026 0
+7027 0
+7028 0
+7029 0
+7030 1
+7031 0
+7032 0
+7033 0
+7034 0
+7035 0
+7036 0
+7037 0
+7038 0
+7039 1
+7040 0
+7041 0
+7042 0
+7043 0
+7044 0
+7045 0
+7046 0
+7047 0
+7048 1
+7049 0
+7050 0
+7051 0
+7052 0
+7053 0
+7054 0
+7055 0
+7056 0
+7057 0
+7058 0
+7059 1
+7060 0
+7061 0
+7062 0
+7063 0
+7064 0
+7065 0
+7066 0
+7067 0
+7068 0
+7069 1
+7070 0
+7071 0
+7072 0
+7073 0
+7074 0
+7075 0
+7076 0
+7077 0
+7078 0
+7079 1
+7080 0
+7081 0
+7082 0
+7083 0
+7084 0
+7085 0
+7086 0
+7087 1
+7088 0
+7089 0
+7090 0
+7091 0
+7092 0
+7093 0
+7094 0
+7095 0
+7096 0
+7097 1
+7098 0
+7099 0
+7100 0
+7101 0
+7102 0
+7103 0
+7104 0
+7105 1
+7106 0
+7107 0
+7108 0
+7109 0
+7110 0
+7111 0
+7112 0
+7113 0
+7114 1
+7115 0
+7116 0
+7117 0
+7118 0
+7119 0
+7120 0
+7121 0
+7122 0
+7123 0
+7124 1
+7125 0
+7126 0
+7127 0
+7128 0
+7129 0
+7130 0
+7131 0
+7132 0
+7133 0
+7134 1
+7135 0
+7136 0
+7137 0
+7138 0
+7139 0
+7140 0
+7141 0
+7142 0
+7143 1
+7144 0
+7145 0
+7146 0
+7147 0
+7148 0
+7149 0
+7150 0
+7151 0
+7152 1
+7153 0
+7154 0
+7155 0
+7156 0
+7157 0
+7158 0
+7159 0
+7160 0
+7161 0
+7162 1
+7163 0
+7164 0
+7165 0
+7166 0
+7167 0
+7168 0
+7169 0
+7170 0
+7171 0
+7172 1
+7173 0
+7174 0
+7175 0
+7176 0
+7177 0
+7178 0
+7179 0
+7180 0
+7181 0
+7182 1
+7183 0
+7184 0
+7185 0
+7186 0
+7187 0
+7188 0
+7189 0
+7190 0
+7191 0
+7192 0
+7193 1
+7194 0
+7195 0
+7196 0
+7197 0
+7198 0
+7199 0
+7200 0
+7201 0
+7202 0
+7203 1
+7204 0
+7205 0
+7206 0
+7207 0
+7208 0
+7209 0
+7210 0
+7211 0
+7212 0
+7213 0
+7214 0
+7215 0
+7216 0
+7217 0
+7218 0
+7219 0
+7220 0
+7221 0
+7222 1
+7223 0
+7224 0
+7225 0
+7226 0
+7227 0
+7228 0
+7229 0
+7230 0
+7231 0
+7232 1
+7233 0
+7234 0
+7235 0
+7236 0
+7237 0
+7238 0
+7239 0
+7240 0
+7241 0
+7242 0
+7243 1
+7244 0
+7245 0
+7246 0
+7247 0
+7248 0
+7249 0
+7250 0
+7251 0
+7252 0
+7253 1
+7254 0
+7255 0
+7256 0
+7257 0
+7258 0
+7259 0
+7260 0
+7261 0
+7262 0
+7263 0
+7264 1
+7265 0
+7266 0
+7267 0
+7268 0
+7269 0
+7270 0
+7271 0
+7272 0
+7273 0
+7274 1
+7275 0
+7276 0
+7277 0
+7278 0
+7279 0
+7280 0
+7281 0
+7282 0
+7283 0
+7284 0
+7285 1
+7286 0
+7287 0
+7288 0
+7289 0
+7290 0
+7291 0
+7292 0
+7293 0
+7294 0
+7295 0
+7296 0
+7297 0
+7298 0
+7299 0
+7300 0
+7301 0
+7302 0
+7303 0
+7304 1
+7305 0
+7306 0
+7307 0
+7308 0
+7309 0
+7310 0
+7311 0
+7312 0
+7313 0
+7314 0
+7315 1
+7316 0
+7317 0
+7318 0
+7319 0
+7320 0
+7321 0
+7322 0
+7323 0
+7324 1
+7325 0
+7326 0
+7327 0
+7328 0
+7329 0
+7330 0
+7331 0
+7332 0
+7333 1
+7334 0
+7335 0
+7336 0
+7337 0
+7338 0
+7339 0
+7340 0
+7341 0
+7342 1
+7343 0
+7344 0
+7345 0
+7346 0
+7347 0
+7348 0
+7349 0
+7350 0
+7351 0
+7352 1
+7353 0
+7354 0
+7355 0
+7356 0
+7357 0
+7358 0
+7359 0
+7360 0
+7361 0
+7362 0
+7363 1
+7364 0
+7365 0
+7366 0
+7367 0
+7368 0
+7369 0
+7370 0
+7371 0
+7372 1
+7373 0
+7374 0
+7375 0
+7376 0
+7377 0
+7378 0
+7379 0
+7380 0
+7381 0
+7382 1
+7383 0
+7384 0
+7385 0
+7386 0
+7387 0
+7388 0
+7389 0
+7390 0
+7391 1
+7392 0
+7393 0
+7394 0
+7395 0
+7396 0
+7397 0
+7398 0
+7399 0
+7400 0
+7401 1
+7402 0
+7403 0
+7404 0
+7405 0
+7406 0
+7407 0
+7408 0
+7409 0
+7410 0
+7411 0
+7412 1
+7413 0
+7414 0
+7415 0
+7416 0
+7417 0
+7418 0
+7419 0
+7420 0
+7421 0
+7422 1
+7423 0
+7424 0
+7425 0
+7426 0
+7427 0
+7428 0
+7429 0
+7430 0
+7431 0
+7432 1
+7433 0
+7434 0
+7435 0
+7436 0
+7437 0
+7438 0
+7439 0
+7440 0
+7441 1
+7442 0
+7443 0
+7444 0
+7445 0
+7446 0
+7447 0
+7448 0
+7449 1
+7450 0
+7451 0
+7452 0
+7453 0
+7454 0
+7455 0
+7456 0
+7457 0
+7458 0
+7459 0
+7460 1
+7461 0
+7462 0
+7463 0
+7464 0
+7465 0
+7466 0
+7467 0
+7468 0
+7469 1
+7470 0
+7471 0
+7472 0
+7473 0
+7474 0
+7475 0
+7476 0
+7477 0
+7478 1
+7479 0
+7480 0
+7481 0
+7482 0
+7483 0
+7484 0
+7485 0
+7486 0
+7487 1
+7488 0
+7489 0
+7490 0
+7491 0
+7492 0
+7493 0
+7494 0
+7495 0
+7496 0
+7497 1
+7498 0
+7499 0
+7500 0
+7501 0
+7502 0
+7503 0
+7504 0
+7505 0
+7506 0
+7507 0
+7508 1
+7509 0
+7510 0
+7511 0
+7512 0
+7513 0
+7514 0
+7515 0
+7516 0
+7517 0
+7518 1
+7519 0
+7520 0
+7521 0
+7522 0
+7523 0
+7524 0
+7525 0
+7526 0
+7527 0
+7528 0
+7529 0
+7530 0
+7531 0
+7532 0
+7533 0
+7534 0
+7535 0
+7536 0
+7537 0
+7538 0
+7539 1
+7540 0
+7541 0
+7542 0
+7543 0
+7544 0
+7545 0
+7546 0
+7547 0
+7548 0
+7549 2
+7550 0
+7551 0
+7552 0
+7553 0
+7554 0
+7555 0
+7556 0
+7557 1
+7558 0
+7559 0
+7560 0
+7561 0
+7562 0
+7563 0
+7564 0
+7565 0
+7566 0
+7567 0
+7568 1
+7569 0
+7570 0
+7571 0
+7572 0
+7573 0
+7574 0
+7575 0
+7576 0
+7577 0
+7578 0
+7579 0
+7580 0
+7581 0
+7582 0
+7583 0
+7584 0
+7585 0
+7586 0
+7587 0
+7588 1
+7589 0
+7590 0
+7591 0
+7592 0
+7593 0
+7594 0
+7595 0
+7596 0
+7597 0
+7598 0
+7599 1
+7600 0
+7601 0
+7602 0
+7603 0
+7604 0
+7605 0
+7606 0
+7607 0
+7608 0
+7609 0
+7610 1
+7611 0
+7612 0
+7613 0
+7614 0
+7615 0
+7616 0
+7617 0
+7618 0
+7619 0
+7620 0
+7621 1
+7622 0
+7623 0
+7624 0
+7625 0
+7626 0
+7627 1
+7628 0
+7629 0
+7630 0
+7631 0
+7632 0
+7633 0
+7634 1
+7635 0
+7636 0
+7637 0
+7638 0
+7639 0
+7640 0
+7641 1
+7642 0
+7643 0
+7644 0
+7645 0
+7646 0
+7647 0
+7648 0
+7649 1
+7650 0
+7651 0
+7652 0
+7653 0
+7654 0
+7655 0
+7656 0
+7657 0
+7658 0
+7659 0
+7660 1
+7661 0
+7662 0
+7663 0
+7664 0
+7665 0
+7666 0
+7667 0
+7668 0
+7669 0
+7670 1
+7671 0
+7672 0
+7673 0
+7674 0
+7675 0
+7676 0
+7677 0
+7678 0
+7679 0
+7680 0
+7681 1
+7682 0
+7683 0
+7684 0
+7685 0
+7686 0
+7687 0
+7688 0
+7689 0
+7690 0
+7691 1
+7692 0
+7693 0
+7694 0
+7695 0
+7696 0
+7697 0
+7698 0
+7699 0
+7700 0
+7701 0
+7702 1
+7703 0
+7704 0
+7705 0
+7706 0
+7707 0
+7708 0
+7709 0
+7710 0
+7711 0
+7712 1
+7713 0
+7714 0
+7715 0
+7716 0
+7717 0
+7718 0
+7719 0
+7720 0
+7721 0
+7722 1
+7723 0
+7724 0
+7725 0
+7726 0
+7727 0
+7728 0
+7729 0
+7730 0
+7731 0
+7732 1
+7733 0
+7734 0
+7735 0
+7736 0
+7737 0
+7738 0
+7739 0
+7740 0
+7741 0
+7742 1
+7743 0
+7744 0
+7745 0
+7746 0
+7747 0
+7748 0
+7749 0
+7750 0
+7751 0
+7752 1
+7753 0
+7754 0
+7755 0
+7756 0
+7757 0
+7758 0
+7759 0
+7760 0
+7761 1
+7762 0
+7763 0
+7764 0
+7765 0
+7766 0
+7767 0
+7768 0
+7769 0
+7770 1
+7771 0
+7772 0
+7773 0
+7774 0
+7775 0
+7776 0
+7777 0
+7778 0
+7779 1
+7780 0
+7781 0
+7782 0
+7783 0
+7784 0
+7785 0
+7786 0
+7787 0
+7788 0
+7789 1
+7790 0
+7791 0
+7792 0
+7793 0
+7794 0
+7795 0
+7796 0
+7797 0
+7798 0
+7799 1
+7800 0
+7801 0
+7802 0
+7803 0
+7804 0
+7805 0
+7806 0
+7807 0
+7808 0
+7809 0
+7810 1
+7811 0
+7812 0
+7813 0
+7814 0
+7815 0
+7816 0
+7817 0
+7818 0
+7819 1
+7820 0
+7821 0
+7822 0
+7823 0
+7824 0
+7825 0
+7826 0
+7827 0
+7828 1
+7829 0
+7830 0
+7831 0
+7832 0
+7833 0
+7834 0
+7835 0
+7836 0
+7837 0
+7838 0
+7839 1
+7840 0
+7841 0
+7842 0
+7843 0
+7844 0
+7845 0
+7846 0
+7847 0
+7848 0
+7849 1
+7850 0
+7851 0
+7852 0
+7853 0
+7854 0
+7855 0
+7856 0
+7857 0
+7858 1
+7859 0
+7860 0
+7861 0
+7862 0
+7863 0
+7864 0
+7865 0
+7866 0
+7867 0
+7868 1
+7869 0
+7870 0
+7871 0
+7872 0
+7873 0
+7874 0
+7875 0
+7876 0
+7877 0
+7878 0
+7879 0
+7880 0
+7881 0
+7882 0
+7883 0
+7884 0
+7885 0
+7886 0
+7887 1
+7888 0
+7889 0
+7890 0
+7891 0
+7892 0
+7893 0
+7894 0
+7895 0
+7896 0
+7897 0
+7898 1
+7899 0
+7900 0
+7901 0
+7902 0
+7903 0
+7904 0
+7905 0
+7906 0
+7907 0
+7908 1
+7909 0
+7910 0
+7911 0
+7912 0
+7913 0
+7914 0
+7915 0
+7916 0
+7917 0
+7918 1
+7919 0
+7920 0
+7921 0
+7922 0
+7923 0
+7924 0
+7925 0
+7926 0
+7927 0
+7928 1
+7929 0
+7930 0
+7931 0
+7932 0
+7933 0
+7934 0
+7935 0
+7936 0
+7937 0
+7938 1
+7939 0
+7940 0
+7941 0
+7942 0
+7943 0
+7944 0
+7945 0
+7946 0
+7947 0
+7948 1
+7949 0
+7950 0
+7951 0
+7952 0
+7953 0
+7954 0
+7955 0
+7956 0
+7957 0
+7958 1
+7959 0
+7960 0
+7961 0
+7962 0
+7963 0
+7964 0
+7965 0
+7966 0
+7967 0
+7968 1
+7969 0
+7970 0
+7971 0
+7972 0
+7973 0
+7974 0
+7975 0
+7976 0
+7977 0
+7978 1
+7979 0
+7980 0
+7981 0
+7982 0
+7983 0
+7984 0
+7985 1
+7986 0
+7987 0
+7988 0
+7989 0
+7990 0
+7991 0
+7992 0
+7993 0
+7994 0
+7995 1
+7996 0
+7997 0
+7998 0
+7999 0
+8000 0
+8001 0
+8002 0
+8003 0
+8004 0
+8005 0
+8006 1
+8007 0
+8008 0
+8009 0
+8010 0
+8011 0
+8012 0
+8013 0
+8014 0
+8015 1
+8016 0
+8017 0
+8018 0
+8019 0
+8020 0
+8021 0
+8022 0
+8023 0
+8024 0
+8025 1
+8026 0
+8027 0
+8028 0
+8029 0
+8030 0
+8031 0
+8032 0
+8033 0
+8034 0
+8035 0
+8036 1
+8037 0
+8038 0
+8039 0
+8040 0
+8041 0
+8042 0
+8043 0
+8044 0
+8045 0
+8046 1
+8047 0
+8048 0
+8049 0
+8050 0
+8051 0
+8052 0
+8053 0
+8054 0
+8055 0
+8056 0
+8057 1
+8058 0
+8059 0
+8060 0
+8061 0
+8062 0
+8063 0
+8064 0
+8065 0
+8066 0
+8067 1
+8068 0
+8069 0
+8070 0
+8071 0
+8072 0
+8073 0
+8074 0
+8075 0
+8076 0
+8077 0
+8078 1
+8079 0
+8080 0
+8081 0
+8082 0
+8083 0
+8084 0
+8085 0
+8086 0
+8087 0
+8088 1
+8089 0
+8090 0
+8091 0
+8092 0
+8093 0
+8094 0
+8095 0
+8096 0
+8097 0
+8098 1
+8099 0
+8100 0
+8101 0
+8102 0
+8103 0
+8104 0
+8105 1
+8106 0
+8107 0
+8108 0
+8109 0
+8110 0
+8111 0
+8112 0
+8113 0
+8114 0
+8115 1
+8116 0
+8117 0
+8118 0
+8119 0
+8120 0
+8121 0
+8122 0
+8123 0
+8124 0
+8125 1
+8126 0
+8127 0
+8128 0
+8129 0
+8130 0
+8131 0
+8132 0
+8133 0
+8134 1
+8135 0
+8136 0
+8137 0
+8138 0
+8139 0
+8140 0
+8141 0
+8142 0
+8143 0
+8144 0
+8145 1
+8146 0
+8147 0
+8148 0
+8149 0
+8150 0
+8151 0
+8152 0
+8153 0
+8154 0
+8155 0
+8156 1
+8157 0
+8158 0
+8159 0
+8160 0
+8161 0
+8162 0
+8163 0
+8164 0
+8165 0
+8166 1
+8167 0
+8168 0
+8169 0
+8170 0
+8171 0
+8172 0
+8173 0
+8174 0
+8175 0
+8176 1
+8177 0
+8178 0
+8179 0
+8180 0
+8181 0
+8182 0
+8183 0
+8184 0
+8185 0
+8186 1
+8187 0
+8188 0
+8189 0
+8190 0
+8191 0
+8192 0
+8193 0
+8194 0
+8195 0
+8196 0
+8197 1
+8198 0
+8199 0
+8200 0
+8201 0
+8202 0
+8203 0
+8204 0
+8205 0
+8206 0
+8207 1
+8208 0
+8209 0
+8210 0
+8211 0
+8212 0
+8213 0
+8214 0
+8215 0
+8216 1
+8217 0
+8218 0
+8219 0
+8220 0
+8221 0
+8222 0
+8223 0
+8224 0
+8225 1
+8226 0
+8227 0
+8228 0
+8229 0
+8230 0
+8231 0
+8232 0
+8233 0
+8234 0
+8235 1
+8236 0
+8237 0
+8238 0
+8239 0
+8240 0
+8241 0
+8242 0
+8243 0
+8244 1
+8245 0
+8246 0
+8247 0
+8248 0
+8249 0
+8250 0
+8251 0
+8252 0
+8253 0
+8254 1
+8255 0
+8256 0
+8257 0
+8258 0
+8259 0
+8260 0
+8261 0
+8262 0
+8263 0
+8264 0
+8265 1
+8266 0
+8267 0
+8268 0
+8269 0
+8270 0
+8271 0
+8272 0
+8273 0
+8274 0
+8275 1
+8276 0
+8277 0
+8278 0
+8279 0
+8280 0
+8281 0
+8282 0
+8283 0
+8284 0
+8285 0
+8286 1
+8287 0
+8288 0
+8289 0
+8290 0
+8291 0
+8292 0
+8293 0
+8294 0
+8295 0
+8296 1
+8297 0
+8298 0
+8299 0
+8300 0
+8301 0
+8302 0
+8303 0
+8304 1
+8305 0
+8306 0
+8307 0
+8308 0
+8309 0
+8310 0
+8311 0
+8312 0
+8313 0
+8314 1
+8315 0
+8316 0
+8317 0
+8318 0
+8319 0
+8320 0
+8321 0
+8322 0
+8323 0
+8324 1
+8325 0
+8326 0
+8327 0
+8328 0
+8329 0
+8330 0
+8331 0
+8332 0
+8333 0
+8334 0
+8335 0
+8336 0
+8337 0
+8338 0
+8339 0
+8340 0
+8341 0
+8342 1
+8343 0
+8344 0
+8345 0
+8346 0
+8347 0
+8348 0
+8349 0
+8350 0
+8351 1
+8352 0
+8353 0
+8354 0
+8355 0
+8356 0
+8357 0
+8358 0
+8359 0
+8360 0
+8361 1
+8362 0
+8363 0
+8364 0
+8365 0
+8366 0
+8367 0
+8368 0
+8369 0
+8370 0
+8371 1
+8372 0
+8373 0
+8374 0
+8375 0
+8376 0
+8377 0
+8378 0
+8379 0
+8380 1
+8381 0
+8382 0
+8383 0
+8384 0
+8385 0
+8386 0
+8387 0
+8388 0
+8389 1
+8390 0
+8391 0
+8392 0
+8393 0
+8394 0
+8395 0
+8396 0
+8397 0
+8398 0
+8399 1
+8400 0
+8401 0
+8402 0
+8403 0
+8404 0
+8405 0
+8406 0
+8407 0
+8408 0
+8409 1
+8410 0
+8411 0
+8412 0
+8413 0
+8414 0
+8415 0
+8416 0
+8417 0
+8418 0
+8419 1
+8420 0
+8421 0
+8422 0
+8423 0
+8424 0
+8425 0
+8426 0
+8427 0
+8428 0
+8429 0
+8430 1
+8431 0
+8432 0
+8433 0
+8434 0
+8435 0
+8436 0
+8437 0
+8438 1
+8439 0
+8440 0
+8441 0
+8442 0
+8443 0
+8444 0
+8445 0
+8446 0
+8447 1
+8448 0
+8449 0
+8450 0
+8451 0
+8452 0
+8453 0
+8454 0
+8455 0
+8456 0
+8457 1
+8458 0
+8459 0
+8460 0
+8461 0
+8462 0
+8463 0
+8464 0
+8465 0
+8466 0
+8467 1
+8468 0
+8469 0
+8470 0
+8471 0
+8472 0
+8473 0
+8474 0
+8475 0
+8476 0
+8477 1
+8478 0
+8479 0
+8480 0
+8481 0
+8482 0
+8483 0
+8484 0
+8485 0
+8486 1
+8487 0
+8488 0
+8489 0
+8490 0
+8491 0
+8492 0
+8493 0
+8494 0
+8495 0
+8496 0
+8497 0
+8498 0
+8499 0
+8500 0
+8501 0
+8502 0
+8503 0
+8504 0
+8505 0
+8506 1
+8507 0
+8508 0
+8509 0
+8510 0
+8511 0
+8512 0
+8513 0
+8514 0
+8515 0
+8516 0
+8517 0
+8518 0
+8519 0
+8520 0
+8521 0
+8522 0
+8523 1
+8524 0
+8525 0
+8526 0
+8527 0
+8528 0
+8529 0
+8530 0
+8531 0
+8532 1
+8533 0
+8534 0
+8535 0
+8536 0
+8537 0
+8538 0
+8539 0
+8540 0
+8541 1
+8542 0
+8543 0
+8544 0
+8545 0
+8546 0
+8547 0
+8548 0
+8549 1
+8550 0
+8551 0
+8552 0
+8553 0
+8554 0
+8555 0
+8556 0
+8557 0
+8558 0
+8559 1
+8560 0
+8561 0
+8562 0
+8563 0
+8564 0
+8565 0
+8566 0
+8567 0
+8568 1
+8569 0
+8570 0
+8571 0
+8572 0
+8573 0
+8574 0
+8575 0
+8576 0
+8577 1
+8578 0
+8579 0
+8580 0
+8581 0
+8582 0
+8583 0
+8584 0
+8585 0
+8586 1
+8587 0
+8588 0
+8589 0
+8590 0
+8591 0
+8592 0
+8593 0
+8594 0
+8595 0
+8596 1
+8597 0
+8598 0
+8599 0
+8600 0
+8601 0
+8602 0
+8603 0
+8604 0
+8605 0
+8606 1
+8607 0
+8608 0
+8609 0
+8610 0
+8611 0
+8612 0
+8613 0
+8614 0
+8615 0
+8616 1
+8617 0
+8618 0
+8619 0
+8620 0
+8621 0
+8622 0
+8623 0
+8624 0
+8625 1
+8626 0
+8627 0
+8628 0
+8629 0
+8630 0
+8631 0
+8632 0
+8633 1
+8634 0
+8635 0
+8636 0
+8637 0
+8638 0
+8639 0
+8640 0
+8641 0
+8642 0
+8643 1
+8644 0
+8645 0
+8646 0
+8647 0
+8648 0
+8649 0
+8650 0
+8651 1
+8652 0
+8653 0
+8654 0
+8655 0
+8656 0
+8657 0
+8658 0
+8659 0
+8660 1
+8661 0
+8662 0
+8663 0
+8664 0
+8665 0
+8666 0
+8667 0
+8668 0
+8669 1
+8670 0
+8671 0
+8672 0
+8673 0
+8674 0
+8675 0
+8676 0
+8677 1
+8678 0
+8679 0
+8680 0
+8681 0
+8682 0
+8683 0
+8684 0
+8685 0
+8686 1
+8687 0
+8688 0
+8689 0
+8690 0
+8691 0
+8692 0
+8693 0
+8694 0
+8695 0
+8696 1
+8697 0
+8698 0
+8699 0
+8700 0
+8701 0
+8702 0
+8703 0
+8704 0
+8705 1
+8706 0
+8707 0
+8708 0
+8709 0
+8710 0
+8711 0
+8712 0
+8713 0
+8714 0
+8715 1
+8716 0
+8717 0
+8718 0
+8719 0
+8720 0
+8721 0
+8722 0
+8723 0
+8724 0
+8725 1
+8726 0
+8727 0
+8728 0
+8729 0
+8730 0
+8731 0
+8732 0
+8733 0
+8734 0
+8735 1
+8736 0
+8737 0
+8738 0
+8739 0
+8740 0
+8741 0
+8742 0
+8743 0
+8744 0
+8745 1
+8746 0
+8747 0
+8748 0
+8749 0
+8750 0
+8751 0
+8752 0
+8753 0
+8754 0
+8755 1
+8756 0
+8757 0
+8758 0
+8759 0
+8760 0
+8761 0
+8762 0
+8763 1
+8764 0
+8765 0
+8766 0
+8767 0
+8768 0
+8769 0
+8770 1
+8771 0
+8772 0
+8773 0
+8774 0
+8775 0
+8776 0
+8777 0
+8778 0
+8779 0
+8780 1
+8781 0
+8782 0
+8783 0
+8784 0
+8785 0
+8786 0
+8787 0
+8788 0
+8789 1
+8790 0
+8791 0
+8792 0
+8793 0
+8794 0
+8795 0
+8796 0
+8797 0
+8798 1
+8799 0
+8800 0
+8801 0
+8802 0
+8803 0
+8804 0
+8805 0
+8806 0
+8807 3
+8808 0
+8809 0
+8810 1
+8811 0
+8812 0
+8813 0
+8814 0
+8815 1
+8816 0
+8817 0
+8818 0
+8819 0
+8820 1
+8821 0
+8822 0
+8823 0
+8824 1
+8825 0
+8826 0
+8827 0
+8828 0
+8829 0
+8830 1
+8831 0
+8832 0
+8833 0
+8834 0
+8835 0
+8836 0
+8837 1
+8838 0
+8839 0
+8840 0
+8841 0
+8842 0
+8843 0
+8844 0
+8845 1
+8846 0
+8847 0
+8848 0
+8849 0
+8850 0
+8851 0
+8852 0
+8853 0
+8854 0
+8855 1
+8856 0
+8857 0
+8858 0
+8859 0
+8860 0
+8861 0
+8862 0
+8863 0
+8864 0
+8865 1
+8866 0
+8867 0
+8868 0
+8869 0
+8870 0
+8871 0
+8872 1
+8873 0
+8874 0
+8875 0
+8876 0
+8877 0
+8878 0
+8879 0
+8880 1
+8881 0
+8882 0
+8883 0
+8884 0
+8885 0
+8886 0
+8887 0
+8888 1
+8889 0
+8890 0
+8891 0
+8892 0
+8893 0
+8894 0
+8895 0
+8896 0
+8897 0
+8898 0
+8899 0
+8900 0
+8901 0
+8902 0
+8903 0
+8904 0
+8905 1
+8906 0
+8907 0
+8908 0
+8909 0
+8910 0
+8911 0
+8912 1
+8913 0
+8914 0
+8915 0
+8916 0
+8917 0
+8918 0
+8919 0
+8920 1
+8921 0
+8922 0
+8923 0
+8924 0
+8925 0
+8926 0
+8927 0
+8928 0
+8929 1
+8930 0
+8931 0
+8932 0
+8933 0
+8934 0
+8935 0
+8936 0
+8937 0
+8938 0
+8939 1
+8940 0
+8941 0
+8942 0
+8943 0
+8944 0
+8945 0
+8946 0
+8947 0
+8948 0
+8949 1
+8950 0
+8951 0
+8952 0
+8953 0
+8954 0
+8955 0
+8956 0
+8957 0
+8958 0
+8959 1
+8960 0
+8961 0
+8962 0
+8963 0
+8964 0
+8965 0
+8966 0
+8967 0
+8968 0
+8969 1
+8970 0
+8971 0
+8972 0
+8973 0
+8974 0
+8975 0
+8976 0
+8977 0
+8978 1
+8979 0
+8980 0
+8981 0
+8982 0
+8983 0
+8984 0
+8985 0
+8986 0
+8987 1
+8988 0
+8989 0
+8990 0
+8991 0
+8992 0
+8993 0
+8994 0
+8995 0
+8996 0
+8997 1
+8998 0
+8999 0
+9000 0
+9001 0
+9002 0
+9003 0
+9004 0
+9005 0
+9006 1
+9007 0
+9008 0
+9009 0
+9010 0
+9011 0
+9012 0
+9013 0
+9014 1
+9015 0
+9016 0
+9017 0
+9018 0
+9019 0
+9020 0
+9021 0
+9022 1
+9023 0
+9024 0
+9025 0
+9026 0
+9027 0
+9028 0
+9029 0
+9030 1
+9031 0
+9032 0
+9033 0
+9034 0
+9035 0
+9036 0
+9037 0
+9038 1
+9039 0
+9040 0
+9041 0
+9042 0
+9043 0
+9044 0
+9045 0
+9046 0
+9047 1
+9048 0
+9049 0
+9050 0
+9051 0
+9052 0
+9053 0
+9054 0
+9055 1
+9056 0
+9057 0
+9058 0
+9059 0
+9060 0
+9061 0
+9062 0
+9063 1
+9064 0
+9065 0
+9066 0
+9067 0
+9068 0
+9069 0
+9070 0
+9071 0
+9072 0
+9073 1
+9074 0
+9075 0
+9076 0
+9077 0
+9078 0
+9079 0
+9080 0
+9081 0
+9082 0
+9083 0
+9084 0
+9085 0
+9086 0
+9087 0
+9088 0
+9089 0
+9090 0
+9091 0
+9092 1
+9093 0
+9094 0
+9095 0
+9096 0
+9097 0
+9098 0
+9099 0
+9100 1
+9101 0
+9102 0
+9103 0
+9104 0
+9105 0
+9106 0
+9107 0
+9108 1
+9109 0
+9110 0
+9111 0
+9112 0
+9113 0
+9114 0
+9115 0
+9116 0
+9117 1
+9118 0
+9119 0
+9120 0
+9121 0
+9122 0
+9123 0
+9124 0
+9125 0
+9126 1
+9127 0
+9128 0
+9129 0
+9130 0
+9131 0
+9132 0
+9133 0
+9134 0
+9135 1
+9136 0
+9137 0
+9138 0
+9139 0
+9140 0
+9141 0
+9142 0
+9143 1
+9144 0
+9145 0
+9146 0
+9147 0
+9148 0
+9149 0
+9150 0
+9151 0
+9152 1
+9153 0
+9154 0
+9155 0
+9156 0
+9157 0
+9158 0
+9159 0
+9160 0
+9161 1
+9162 0
+9163 0
+9164 0
+9165 0
+9166 0
+9167 0
+9168 0
+9169 1
+9170 0
+9171 0
+9172 0
+9173 0
+9174 0
+9175 0
+9176 0
+9177 0
+9178 1
+9179 0
+9180 0
+9181 0
+9182 0
+9183 0
+9184 0
+9185 0
+9186 0
+9187 0
+9188 1
+9189 0
+9190 0
+9191 0
+9192 0
+9193 0
+9194 0
+9195 0
+9196 0
+9197 1
+9198 0
+9199 0
+9200 0
+9201 0
+9202 0
+9203 0
+9204 0
+9205 0
+9206 0
+9207 0
+9208 0
+9209 0
+9210 0
+9211 0
+9212 0
+9213 0
+9214 0
+9215 0
+9216 0
+9217 0
+9218 0
+9219 0
+9220 0
+9221 1
+9222 0
+9223 0
+9224 0
+9225 0
+9226 0
+9227 0
+9228 1
+9229 0
+9230 0
+9231 0
+9232 0
+9233 0
+9234 0
+9235 0
+9236 0
+9237 1
+9238 0
+9239 0
+9240 0
+9241 0
+9242 0
+9243 0
+9244 0
+9245 0
+9246 1
+9247 0
+9248 0
+9249 0
+9250 0
+9251 0
+9252 0
+9253 0
+9254 0
+9255 1
+9256 0
+9257 0
+9258 0
+9259 0
+9260 0
+9261 1
+9262 0
+9263 0
+9264 0
+9265 0
+9266 0
+9267 0
+9268 0
+9269 0
+9270 0
+9271 0
+9272 0
+9273 0
+9274 0
+9275 0
+9276 1
+9277 0
+9278 0
+9279 0
+9280 0
+9281 0
+9282 0
+9283 0
+9284 0
+9285 0
+9286 0
+9287 0
+9288 0
+9289 0
+9290 1
+9291 0
+9292 0
+9293 0
+9294 0
+9295 0
+9296 0
+9297 0
+9298 0
+9299 0
+9300 1
+9301 0
+9302 0
+9303 0
+9304 0
+9305 0
+9306 0
+9307 0
+9308 1
+9309 0
+9310 0
+9311 0
+9312 0
+9313 0
+9314 0
+9315 0
+9316 1
+9317 0
+9318 0
+9319 0
+9320 0
+9321 0
+9322 0
+9323 1
+9324 0
+9325 0
+9326 0
+9327 0
+9328 0
+9329 0
+9330 0
+9331 1
+9332 0
+9333 0
+9334 0
+9335 0
+9336 0
+9337 0
+9338 1
+9339 0
+9340 0
+9341 0
+9342 0
+9343 0
+9344 0
+9345 1
+9346 0
+9347 0
+9348 0
+9349 0
+9350 0
+9351 0
+9352 0
+9353 0
+9354 0
+9355 1
+9356 0
+9357 0
+9358 0
+9359 0
+9360 0
+9361 0
+9362 0
+9363 1
+9364 0
+9365 0
+9366 0
+9367 0
+9368 0
+9369 0
+9370 1
+9371 0
+9372 0
+9373 0
+9374 0
+9375 0
+9376 0
+9377 0
+9378 1
+9379 0
+9380 0
+9381 0
+9382 0
+9383 0
+9384 0
+9385 0
+9386 0
+9387 0
+9388 0
+9389 0
+9390 0
+9391 0
+9392 0
+9393 0
+9394 0
+9395 1
+9396 0
+9397 0
+9398 0
+9399 0
+9400 0
+9401 0
+9402 0
+9403 1
+9404 0
+9405 0
+9406 0
+9407 0
+9408 0
+9409 0
+9410 0
+9411 0
+9412 1
+9413 0
+9414 0
+9415 0
+9416 0
+9417 0
+9418 0
+9419 0
+9420 1
+9421 0
+9422 0
+9423 0
+9424 0
+9425 0
+9426 0
+9427 0
+9428 0
+9429 1
+9430 0
+9431 0
+9432 0
+9433 0
+9434 0
+9435 0
+9436 0
+9437 0
+9438 0
+9439 1
+9440 0
+9441 0
+9442 0
+9443 0
+9444 0
+9445 0
+9446 0
+9447 0
+9448 0
+9449 1
+9450 0
+9451 0
+9452 0
+9453 0
+9454 0
+9455 0
+9456 0
+9457 1
+9458 0
+9459 0
+9460 0
+9461 0
+9462 0
+9463 0
+9464 1
+9465 0
+9466 0
+9467 0
+9468 0
+9469 0
+9470 0
+9471 0
+9472 0
+9473 1
+9474 0
+9475 0
+9476 0
+9477 0
+9478 0
+9479 0
+9480 0
+9481 1
+9482 0
+9483 0
+9484 0
+9485 0
+9486 0
+9487 0
+9488 1
+9489 0
+9490 0
+9491 0
+9492 0
+9493 0
+9494 0
+9495 0
+9496 0
+9497 1
+9498 0
+9499 0
+9500 0
+9501 0
+9502 0
+9503 0
+9504 0
+9505 0
+9506 0
+9507 0
+9508 0
+9509 0
+9510 0
+9511 0
+9512 0
+9513 0
+9514 1
+9515 0
+9516 0
+9517 0
+9518 0
+9519 0
+9520 0
+9521 0
+9522 1
+9523 0
+9524 0
+9525 0
+9526 0
+9527 0
+9528 0
+9529 0
+9530 1
+9531 0
+9532 0
+9533 0
+9534 0
+9535 0
+9536 0
+9537 0
+9538 1
+9539 0
+9540 0
+9541 0
+9542 0
+9543 0
+9544 0
+9545 0
+9546 0
+9547 1
+9548 0
+9549 0
+9550 0
+9551 0
+9552 0
+9553 0
+9554 0
+9555 1
+9556 0
+9557 0
+9558 0
+9559 0
+9560 0
+9561 0
+9562 0
+9563 1
+9564 0
+9565 0
+9566 0
+9567 0
+9568 0
+9569 0
+9570 0
+9571 0
+9572 1
+9573 0
+9574 0
+9575 0
+9576 0
+9577 0
+9578 0
+9579 0
+9580 1
+9581 0
+9582 0
+9583 0
+9584 0
+9585 0
+9586 0
+9587 0
+9588 0
+9589 1
+9590 0
+9591 0
+9592 0
+9593 0
+9594 0
+9595 0
+9596 0
+9597 0
+9598 0
+9599 0
+9600 0
+9601 0
+9602 0
+9603 0
+9604 0
+9605 0
+9606 0
+9607 0
+9608 1
+9609 0
+9610 0
+9611 0
+9612 0
+9613 0
+9614 0
+9615 1
+9616 0
+9617 0
+9618 0
+9619 0
+9620 0
+9621 0
+9622 1
+9623 0
+9624 0
+9625 0
+9626 0
+9627 0
+9628 0
+9629 0
+9630 1
+9631 0
+9632 0
+9633 0
+9634 0
+9635 0
+9636 0
+9637 0
+9638 0
+9639 1
+9640 0
+9641 0
+9642 0
+9643 0
+9644 0
+9645 0
+9646 0
+9647 0
+9648 1
+9649 0
+9650 0
+9651 0
+9652 0
+9653 0
+9654 0
+9655 0
+9656 1
+9657 0
+9658 0
+9659 0
+9660 0
+9661 0
+9662 0
+9663 1
+9664 0
+9665 0
+9666 0
+9667 0
+9668 0
+9669 0
+9670 0
+9671 0
+9672 0
+9673 1
+9674 0
+9675 0
+9676 0
+9677 0
+9678 0
+9679 0
+9680 0
+9681 1
+9682 0
+9683 0
+9684 0
+9685 0
+9686 0
+9687 0
+9688 0
+9689 1
+9690 0
+9691 0
+9692 0
+9693 0
+9694 0
+9695 0
+9696 1
+9697 0
+9698 0
+9699 0
+9700 0
+9701 0
+9702 0
+9703 0
+9704 1
+9705 0
+9706 0
+9707 0
+9708 0
+9709 0
+9710 0
+9711 0
+9712 1
+9713 0
+9714 0
+9715 0
+9716 0
+9717 0
+9718 0
+9719 0
+9720 0
+9721 0
+9722 1
+9723 0
+9724 0
+9725 0
+9726 0
+9727 0
+9728 0
+9729 0
+9730 0
+9731 1
+9732 0
+9733 0
+9734 0
+9735 0
+9736 0
+9737 0
+9738 0
+9739 0
+9740 1
+9741 0
+9742 0
+9743 0
+9744 0
+9745 0
+9746 0
+9747 0
+9748 0
+9749 1
+9750 0
+9751 0
+9752 0
+9753 0
+9754 0
+9755 0
+9756 1
+9757 0
+9758 0
+9759 0
+9760 0
+9761 0
+9762 0
+9763 0
+9764 0
+9765 0
+9766 0
+9767 0
+9768 0
+9769 0
+9770 0
+9771 0
+9772 0
+9773 1
+9774 0
+9775 0
+9776 0
+9777 0
+9778 0
+9779 0
+9780 1
+9781 0
+9782 0
+9783 0
+9784 0
+9785 0
+9786 0
+9787 0
+9788 1
+9789 0
+9790 0
+9791 0
+9792 0
+9793 0
+9794 0
+9795 0
+9796 0
+9797 0
+9798 0
+9799 0
+9800 0
+9801 0
+9802 0
+9803 1
+9804 0
+9805 0
+9806 0
+9807 0
+9808 0
+9809 0
+9810 0
+9811 0
+9812 1
+9813 0
+9814 0
+9815 0
+9816 0
+9817 0
+9818 0
+9819 0
+9820 1
+9821 0
+9822 0
+9823 0
+9824 0
+9825 0
+9826 0
+9827 0
+9828 0
+9829 1
+9830 0
+9831 0
+9832 0
+9833 0
+9834 0
+9835 0
+9836 0
+9837 0
+9838 1
+9839 0
+9840 0
+9841 0
+9842 0
+9843 0
+9844 0
+9845 0
+9846 0
+9847 0
+9848 1
+9849 0
+9850 0
+9851 0
+9852 0
+9853 0
+9854 4
+9855 0
+9856 0
+9857 1
+9858 0
+9859 0
+9860 0
+9861 0
+9862 1
+9863 0
+9864 0
+9865 0
+9866 0
+9867 0
+9868 1
+9869 0
+9870 0
+9871 0
+9872 0
+9873 1
+9874 0
+9875 0
+9876 0
+9877 0
+9878 1
+9879 0
+9880 0
+9881 0
+9882 0
+9883 0
+9884 0
+9885 0
+9886 1
+9887 0
+9888 0
+9889 0
+9890 0
+9891 0
+9892 0
+9893 0
+9894 0
+9895 1
+9896 0
+9897 0
+9898 0
+9899 0
+9900 0
+9901 0
+9902 0
+9903 0
+9904 1
+9905 0
+9906 0
+9907 0
+9908 0
+9909 0
+9910 0
+9911 0
+9912 0
+9913 0
+9914 0
+9915 0
+9916 0
+9917 0
+9918 0
+9919 0
+9920 0
+9921 0
+9922 0
+9923 0
+9924 1
+9925 0
+9926 0
+9927 0
+9928 0
+9929 0
+9930 0
+9931 0
+9932 0
+9933 0
+9934 1
+9935 0
+9936 0
+9937 0
+9938 0
+9939 0
+9940 0
+9941 0
+9942 0
+9943 0
+9944 1
+9945 0
+9946 0
+9947 0
+9948 0
+9949 0
+9950 0
+9951 0
+9952 0
+9953 0
+9954 1
+9955 0
+9956 0
+9957 0
+9958 0
+9959 0
+9960 0
+9961 0
+9962 0
+9963 1
+9964 0
+9965 0
+9966 0
+9967 0
+9968 0
+9969 0
+9970 0
+9971 0
+9972 1
+9973 0
+9974 0
+9975 0
+9976 0
+9977 0
+9978 0
+9979 0
+9980 0
+9981 0
+9982 0
+9983 1
+9984 0
+9985 0
+9986 0
+9987 0
+9988 0
+9989 0
+9990 0
+9991 0
+9992 0
+9993 1
+9994 0
+9995 0
+9996 0
+9997 0
+9998 0
+9999 0
+10000 0
+10001 0
+10002 0
+10003 0
+10004 1
+10005 0
+10006 0
+10007 0
+10008 0
+10009 0
+10010 0
+10011 0
+10012 0
+10013 1
+10014 0
+10015 0
+10016 0
+10017 0
+10018 0
+10019 0
+10020 0
+10021 0
+10022 0
+10023 1
+10024 0
+10025 0
+10026 0
+10027 0
+10028 0
+10029 0
+10030 0
+10031 1
+10032 0
+10033 0
+10034 0
+10035 0
+10036 0
+10037 0
+10038 0
+10039 0
+10040 0
+10041 1
+10042 0
+10043 0
+10044 0
+10045 0
+10046 0
+10047 0
+10048 0
+10049 0
+10050 0
+10051 1
+10052 0
+10053 0
+10054 0
+10055 0
+10056 0
+10057 0
+10058 0
+10059 0
+10060 1
+10061 0
+10062 0
+10063 0
+10064 0
+10065 0
+10066 0
+10067 0
+10068 0
+10069 1
+10070 0
+10071 0
+10072 0
+10073 0
+10074 0
+10075 0
+10076 0
+10077 0
+10078 1
+10079 0
+10080 0
+10081 0
+10082 0
+10083 0
+10084 0
+10085 0
+10086 0
+10087 1
+10088 0
+10089 0
+10090 0
+10091 0
+10092 0
+10093 0
+10094 0
+10095 0
+10096 0
+10097 1
+10098 0
+10099 0
+10100 0
+10101 0
+10102 0
+10103 0
+10104 0
+10105 0
+10106 0
+10107 0
+10108 1
+10109 0
+10110 0
+10111 0
+10112 0
+10113 0
+10114 0
+10115 0
+10116 0
+10117 0
+10118 1
+10119 0
+10120 0
+10121 0
+10122 0
+10123 0
+10124 0
+10125 0
+10126 0
+10127 1
+10128 0
+10129 0
+10130 0
+10131 0
+10132 0
+10133 0
+10134 0
+10135 0
+10136 0
+10137 1
+10138 0
+10139 0
+10140 0
+10141 0
+10142 0
+10143 0
+10144 0
+10145 0
+10146 0
+10147 1
+10148 0
+10149 0
+10150 0
+10151 0
+10152 0
+10153 0
+10154 0
+10155 0
+10156 0
+10157 1
+10158 0
+10159 0
+10160 0
+10161 0
+10162 0
+10163 0
+10164 0
+10165 0
+10166 0
+10167 1
+10168 0
+10169 0
+10170 0
+10171 0
+10172 0
+10173 0
+10174 0
+10175 0
+10176 1
+10177 0
+10178 0
+10179 0
+10180 0
+10181 0
+10182 0
+10183 0
+10184 0
+10185 1
+10186 0
+10187 0
+10188 0
+10189 0
+10190 0
+10191 0
+10192 0
+10193 1
+10194 0
+10195 0
+10196 0
+10197 0
+10198 0
+10199 0
+10200 0
+10201 1
+10202 0
+10203 0
+10204 0
+10205 0
+10206 0
+10207 0
+10208 0
+10209 0
+10210 0
+10211 1
+10212 0
+10213 0
+10214 0
+10215 0
+10216 0
+10217 0
+10218 0
+10219 0
+10220 1
+10221 0
+10222 0
+10223 0
+10224 0
+10225 0
+10226 0
+10227 0
+10228 0
+10229 0
+10230 1
+10231 0
+10232 0
+10233 0
+10234 0
+10235 0
+10236 0
+10237 0
+10238 0
+10239 0
+10240 1
+10241 0
+10242 0
+10243 0
+10244 0
+10245 0
+10246 0
+10247 0
+10248 0
+10249 0
+10250 1
+10251 0
+10252 0
+10253 0
+10254 0
+10255 0
+10256 0
+10257 0
+10258 0
+10259 0
+10260 1
+10261 0
+10262 0
+10263 0
+10264 1
+10265 0
+10266 0
+10267 0
+10268 0
+10269 0
+10270 1
+10271 0
+10272 0
+10273 0
+10274 0
+10275 0
+10276 0
+10277 0
+10278 1
+10279 0
+10280 0
+10281 0
+10282 0
+10283 0
+10284 0
+10285 0
+10286 1
+10287 0
+10288 0
+10289 0
+10290 0
+10291 0
+10292 0
+10293 0
+10294 0
+10295 0
+10296 1
+10297 0
+10298 0
+10299 0
+10300 0
+10301 0
+10302 0
+10303 0
+10304 0
+10305 1
+10306 0
+10307 0
+10308 0
+10309 0
+10310 0
+10311 0
+10312 0
+10313 0
+10314 1
+10315 0
+10316 0
+10317 0
+10318 0
+10319 0
+10320 0
+10321 0
+10322 0
+10323 1
+10324 0
+10325 0
+10326 0
+10327 0
+10328 0
+10329 0
+10330 0
+10331 0
+10332 0
+10333 1
+10334 0
+10335 0
+10336 0
+10337 0
+10338 0
+10339 0
+10340 0
+10341 0
+10342 0
+10343 0
+10344 0
+10345 0
+10346 0
+10347 0
+10348 0
+10349 0
+10350 0
+10351 1
+10352 0
+10353 0
+10354 0
+10355 0
+10356 0
+10357 0
+10358 0
+10359 0
+10360 1
+10361 0
+10362 0
+10363 0
+10364 0
+10365 0
+10366 0
+10367 0
+10368 0
+10369 0
+10370 1
+10371 0
+10372 0
+10373 0
+10374 0
+10375 0
+10376 0
+10377 0
+10378 0
+10379 0
+10380 1
+10381 0
+10382 0
+10383 0
+10384 0
+10385 0
+10386 0
+10387 1
+10388 0
+10389 0
+10390 0
+10391 0
+10392 0
+10393 0
+10394 0
+10395 1
+10396 0
+10397 0
+10398 0
+10399 0
+10400 0
+10401 0
+10402 0
+10403 0
+10404 1
+10405 0
+10406 0
+10407 0
+10408 0
+10409 0
+10410 0
+10411 0
+10412 0
+10413 0
+10414 1
+10415 0
+10416 0
+10417 0
+10418 0
+10419 0
+10420 0
+10421 0
+10422 0
+10423 1
+10424 0
+10425 0
+10426 0
+10427 0
+10428 0
+10429 0
+10430 0
+10431 0
+10432 0
+10433 1
+10434 0
+10435 0
+10436 0
+10437 0
+10438 0
+10439 0
+10440 0
+10441 0
+10442 0
+10443 1
+10444 0
+10445 0
+10446 0
+10447 0
+10448 0
+10449 0
+10450 0
+10451 0
+10452 1
+10453 0
+10454 0
+10455 0
+10456 0
+10457 0
+10458 0
+10459 0
+10460 1
+10461 0
+10462 0
+10463 0
+10464 0
+10465 0
+10466 0
+10467 0
+10468 0
+10469 1
+10470 0
+10471 0
+10472 0
+10473 0
+10474 0
+10475 0
+10476 0
+10477 0
+10478 0
+10479 1
+10480 0
+10481 0
+10482 0
+10483 0
+10484 0
+10485 0
+10486 0
+10487 0
+10488 0
+10489 1
+10490 0
+10491 0
+10492 0
+10493 0
+10494 0
+10495 0
+10496 0
+10497 0
+10498 1
+10499 0
+10500 0
+10501 0
+10502 0
+10503 0
+10504 0
+10505 0
+10506 1
+10507 0
+10508 0
+10509 0
+10510 0
+10511 0
+10512 0
+10513 0
+10514 0
+10515 0
+10516 0
+10517 1
+10518 0
+10519 0
+10520 0
+10521 0
+10522 0
+10523 0
+10524 0
+10525 0
+10526 0
+10527 1
+10528 0
+10529 0
+10530 0
+10531 0
+10532 0
+10533 0
+10534 0
+10535 0
+10536 1
+10537 0
+10538 0
+10539 0
+10540 0
+10541 0
+10542 0
+10543 0
+10544 0
+10545 1
+10546 0
+10547 0
+10548 0
+10549 0
+10550 0
+10551 0
+10552 0
+10553 0
+10554 0
+10555 1
+10556 0
+10557 0
+10558 0
+10559 0
+10560 0
+10561 0
+10562 0
+10563 0
+10564 0
+10565 0
+10566 1
+10567 0
+10568 0
+10569 0
+10570 0
+10571 0
+10572 0
+10573 0
+10574 0
+10575 0
+10576 0
+10577 0
+10578 0
+10579 0
+10580 0
+10581 0
+10582 0
+10583 0
+10584 0
+10585 0
+10586 0
+10587 1
+10588 0
+10589 0
+10590 0
+10591 0
+10592 0
+10593 0
+10594 0
+10595 0
+10596 0
+10597 0
+10598 1
+10599 0
+10600 0
+10601 0
+10602 0
+10603 0
+10604 0
+10605 0
+10606 0
+10607 0
+10608 0
+10609 1
+10610 0
+10611 0
+10612 0
+10613 0
+10614 0
+10615 0
+10616 0
+10617 1
+10618 0
+10619 0
+10620 0
+10621 0
+10622 0
+10623 0
+10624 0
+10625 1
+10626 0
+10627 0
+10628 0
+10629 0
+10630 0
+10631 0
+10632 0
+10633 0
+10634 1
+10635 0
+10636 0
+10637 0
+10638 0
+10639 0
+10640 0
+10641 0
+10642 0
+10643 0
+10644 1
+10645 0
+10646 0
+10647 0
+10648 0
+10649 0
+10650 0
+10651 0
+10652 0
+10653 1
+10654 0
+10655 0
+10656 0
+10657 0
+10658 0
+10659 0
+10660 0
+10661 1
+10662 0
+10663 0
+10664 0
+10665 0
+10666 0
+10667 0
+10668 0
+10669 0
+10670 0
+10671 1
+10672 0
+10673 0
+10674 0
+10675 0
+10676 0
+10677 0
+10678 0
+10679 0
+10680 0
+10681 1
+10682 0
+10683 0
+10684 0
+10685 0
+10686 0
+10687 0
+10688 0
+10689 0
+10690 0
+10691 0
+10692 0
+10693 0
+10694 0
+10695 0
+10696 0
+10697 0
+10698 0
+10699 0
+10700 0
+10701 1
+10702 0
+10703 0
+10704 0
+10705 0
+10706 0
+10707 0
+10708 0
+10709 0
+10710 0
+10711 1
+10712 0
+10713 0
+10714 0
+10715 0
+10716 0
+10717 0
+10718 0
+10719 0
+10720 0
+10721 1
+10722 0
+10723 0
+10724 0
+10725 0
+10726 0
+10727 0
+10728 0
+10729 0
+10730 1
+10731 0
+10732 0
+10733 0
+10734 0
+10735 0
+10736 0
+10737 0
+10738 0
+10739 0
+10740 1
+10741 0
+10742 0
+10743 0
+10744 0
+10745 0
+10746 0
+10747 0
+10748 0
+10749 1
+10750 0
+10751 0
+10752 0
+10753 0
+10754 0
+10755 0
+10756 0
+10757 0
+10758 0
+10759 1
+10760 0
+10761 0
+10762 0
+10763 0
+10764 0
+10765 0
+10766 0
+10767 0
+10768 0
+10769 0
+10770 1
+10771 0
+10772 0
+10773 0
+10774 0
+10775 0
+10776 0
+10777 0
+10778 0
+10779 0
+10780 1
+10781 0
+10782 0
+10783 0
+10784 0
+10785 0
+10786 0
+10787 0
+10788 0
+10789 0
+10790 1
+10791 0
+10792 0
+10793 0
+10794 0
+10795 0
+10796 0
+10797 0
+10798 0
+10799 0
+10800 1
+10801 0
+10802 0
+10803 0
+10804 0
+10805 0
+10806 0
+10807 0
+10808 0
+10809 0
+10810 0
+10811 0
+10812 0
+10813 0
+10814 0
+10815 0
+10816 0
+10817 0
+10818 0
+10819 0
+10820 1
+10821 0
+10822 0
+10823 0
+10824 0
+10825 0
+10826 0
+10827 0
+10828 0
+10829 0
+10830 0
+10831 1
+10832 0
+10833 0
+10834 0
+10835 0
+10836 0
+10837 0
+10838 0
+10839 0
+10840 1
+10841 0
+10842 0
+10843 0
+10844 0
+10845 0
+10846 0
+10847 0
+10848 0
+10849 0
+10850 0
+10851 0
+10852 0
+10853 0
+10854 0
+10855 0
+10856 0
+10857 0
+10858 0
+10859 0
+10860 1
+10861 0
+10862 0
+10863 0
+10864 0
+10865 0
+10866 0
+10867 0
+10868 0
+10869 1
+10870 0
+10871 0
+10872 0
+10873 0
+10874 0
+10875 0
+10876 0
+10877 0
+10878 0
+10879 0
+10880 1
+10881 0
+10882 0
+10883 0
+10884 0
+10885 0
+10886 0
+10887 0
+10888 0
+10889 0
+10890 1
+10891 0
+10892 0
+10893 0
+10894 0
+10895 0
+10896 0
+10897 0
+10898 0
+10899 0
+10900 1
+10901 0
+10902 0
+10903 0
+10904 0
+10905 0
+10906 0
+10907 0
+10908 0
+10909 0
+10910 0
+10911 1
+10912 0
+10913 0
+10914 0
+10915 0
+10916 0
+10917 0
+10918 0
+10919 0
+10920 0
+10921 1
+10922 0
+10923 0
+10924 0
+10925 0
+10926 0
+10927 0
+10928 0
+10929 0
+10930 0
+10931 1
+10932 0
+10933 0
+10934 0
+10935 0
+10936 0
+10937 0
+10938 0
+10939 0
+10940 1
+10941 0
+10942 0
+10943 0
+10944 0
+10945 0
+10946 0
+10947 0
+10948 0
+10949 1
+10950 0
+10951 0
+10952 0
+10953 0
+10954 0
+10955 0
+10956 0
+10957 0
+10958 1
+10959 0
+10960 0
+10961 0
+10962 0
+10963 0
+10964 0
+10965 0
+10966 0
+10967 0
+10968 1
+10969 0
+10970 0
+10971 0
+10972 0
+10973 0
+10974 0
+10975 0
+10976 0
+10977 0
+10978 1
+10979 0
+10980 0
+10981 0
+10982 0
+10983 0
+10984 0
+10985 0
+10986 0
+10987 0
+10988 0
+10989 1
+10990 0
+10991 0
+10992 0
+10993 0
+10994 0
+10995 0
+10996 0
+10997 0
+10998 0
+10999 0
+11000 1 \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/test.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/test.js
new file mode 100644
index 0000000..8864284
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/test.js
@@ -0,0 +1,71 @@
+var ReplSet = require('./lib2/topologies/replset'),
+ ReadPreference = require('./lib2/topologies/read_preference');
+
+// Attempt to connect
+var server = new ReplSet([{
+ host: 'localhost', port: 31000
+}, {
+ host: 'localhost', port: 31001
+}], {
+ setName: 'rs'
+});
+
+function executeCursors(_server, cb) {
+ var count = 100;
+
+ for(var i = 0; i < 100; i++) {
+ // Execute the write
+ var cursor = _server.cursor('test.test', {
+ find: 'test.test'
+ , query: {a:1}
+ }, {readPreference: new ReadPreference('secondary')});
+
+ // Get the first document
+ cursor.next(function(err, doc) {
+ count = count - 1;
+ if(err) console.dir(err)
+ if(count == 0) return cb();
+ });
+ }
+}
+
+server.on('connect', function(_server) {
+ console.log("---------------------------------- 0")
+ // Attempt authentication
+ _server.auth('scram-sha-1', 'admin', 'root', 'root', function(err, r) {
+ console.log("---------------------------------- 1")
+ // console.dir(err)
+ // console.dir(r)
+
+ _server.insert('test.test', [{a:1}], function(err, r) {
+ console.log("---------------------------------- 2")
+ console.dir(err)
+ if(r)console.dir(r.result)
+ var name = null;
+
+ _server.on('joined', function(_t, _server) {
+ if(name == _server.name) {
+ console.log("=========== joined :: " + _t + " :: " + _server.name)
+ executeCursors(_server, function() {
+ });
+ }
+ })
+
+ // var s = _server.s.replicaSetState.secondaries[0];
+ // s.destroy({emitClose:true});
+ executeCursors(_server, function() {
+ console.log("============== 0")
+ // Attempt to force a server reconnect
+ var s = _server.s.replicaSetState.secondaries[0];
+ name = s.name;
+ s.destroy({emitClose:true});
+ // console.log("============== 1")
+
+ // _server.destroy();
+ // test.done();
+ });
+ });
+ });
+});
+
+server.connect();
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/test1.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/test1.js
new file mode 100644
index 0000000..6e05ebd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/test1.js
@@ -0,0 +1,72 @@
+var Server = require('./lib/topologies/server');
+
+// Attempt to connect
+var server = new Server({
+ host: 'localhost', port: 27017, socketTimeout: 500
+});
+
+// function executeCursors(_server, cb) {
+// var count = 100;
+//
+// for(var i = 0; i < 100; i++) {
+// // Execute the write
+// var cursor = _server.cursor('test.test', {
+// find: 'test.test'
+// , query: {a:1}
+// }, {readPreference: new ReadPreference('secondary')});
+//
+// // Get the first document
+// cursor.next(function(err, doc) {
+// count = count - 1;
+// if(err) console.dir(err)
+// if(count == 0) return cb();
+// });
+// }
+// }
+
+server.on('connect', function(_server) {
+
+ setInterval(function() {
+ _server.insert('test.test', [{a:1}], function(err, r) {
+ console.log("insert")
+ });
+ }, 1000)
+ // console.log("---------------------------------- 0")
+ // // Attempt authentication
+ // _server.auth('scram-sha-1', 'admin', 'root', 'root', function(err, r) {
+ // console.log("---------------------------------- 1")
+ // // console.dir(err)
+ // // console.dir(r)
+ //
+ // _server.insert('test.test', [{a:1}], function(err, r) {
+ // console.log("---------------------------------- 2")
+ // console.dir(err)
+ // if(r)console.dir(r.result)
+ // var name = null;
+ //
+ // _server.on('joined', function(_t, _server) {
+ // if(name == _server.name) {
+ // console.log("=========== joined :: " + _t + " :: " + _server.name)
+ // executeCursors(_server, function() {
+ // });
+ // }
+ // })
+ //
+ // // var s = _server.s.replicaSetState.secondaries[0];
+ // // s.destroy({emitClose:true});
+ // executeCursors(_server, function() {
+ // console.log("============== 0")
+ // // Attempt to force a server reconnect
+ // var s = _server.s.replicaSetState.secondaries[0];
+ // name = s.name;
+ // s.destroy({emitClose:true});
+ // // console.log("============== 1")
+ //
+ // // _server.destroy();
+ // // test.done();
+ // });
+ // });
+ // });
+});
+
+server.connect();
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/.npmignore
new file mode 100644
index 0000000..265ff73
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/.npmignore
@@ -0,0 +1,8 @@
+build/
+test/
+examples/
+fs.js
+zlib.js
+.zuul.yml
+.nyc_output
+coverage
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/.travis.yml b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/.travis.yml
new file mode 100644
index 0000000..84504c9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/.travis.yml
@@ -0,0 +1,49 @@
+sudo: false
+language: node_js
+before_install:
+ - npm install -g npm@2
+ - npm install -g npm
+notifications:
+ email: false
+matrix:
+ fast_finish: true
+ include:
+ - node_js: '0.8'
+ env: TASK=test
+ - node_js: '0.10'
+ env: TASK=test
+ - node_js: '0.11'
+ env: TASK=test
+ - node_js: '0.12'
+ env: TASK=test
+ - node_js: 1
+ env: TASK=test
+ - node_js: 2
+ env: TASK=test
+ - node_js: 3
+ env: TASK=test
+ - node_js: 4
+ env: TASK=test
+ - node_js: 5
+ env: TASK=test
+ - node_js: 6
+ env: TASK=test
+ - node_js: 5
+ env: TASK=browser BROWSER_NAME=android BROWSER_VERSION="4.0..latest"
+ - node_js: 5
+ env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest"
+ - node_js: 5
+ env: TASK=browser BROWSER_NAME=opera BROWSER_VERSION="11..latest"
+ - node_js: 5
+ env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="-3..latest"
+ - node_js: 5
+ env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="-3..latest"
+ - node_js: 5
+ env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest"
+ - node_js: 5
+ env: TASK=browser BROWSER_NAME=microsoftedge BROWSER_VERSION=latest
+script: "npm run $TASK"
+env:
+ global:
+ - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc=
+ - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI=
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/LICENSE
new file mode 100644
index 0000000..e3d4e69
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/LICENSE
@@ -0,0 +1,18 @@
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/README.md
new file mode 100644
index 0000000..9fb4fea
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/README.md
@@ -0,0 +1,36 @@
+# readable-stream
+
+***Node-core v6.3.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
+
+
+[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
+[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)
+
+
+[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream)
+
+```bash
+npm install --save readable-stream
+```
+
+***Node-core streams for userland***
+
+This package is a mirror of the Streams2 and Streams3 implementations in
+Node-core, including [documentation](doc/stream.md).
+
+If you want to guarantee a stable streams base, regardless of what version of
+Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
+
+As of version 2.0.0 **readable-stream** uses semantic versioning.
+
+# Streams WG Team Members
+
+* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) &lt;christopher.s.dickinson@gmail.com&gt;
+ - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B
+* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) &lt;calvin.metcalf@gmail.com&gt;
+ - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
+* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) &lt;rod@vagg.org&gt;
+ - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D
+* **Sam Newman** ([@sonewman](https://github.com/sonewman)) &lt;newmansam@outlook.com&gt;
+* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) &lt;mathiasbuus@gmail.com&gt;
+* **Domenic Denicola** ([@domenic](https://github.com/domenic)) &lt;d@domenic.me&gt;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/doc/stream.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/doc/stream.md
new file mode 100644
index 0000000..fc269c8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/doc/stream.md
@@ -0,0 +1,2015 @@
+# Stream
+
+ Stability: 2 - Stable
+
+A stream is an abstract interface for working with streaming data in Node.js.
+The `stream` module provides a base API that makes it easy to build objects
+that implement the stream interface.
+
+There are many stream objects provided by Node.js. For instance, a
+[request to an HTTP server][http-incoming-message] and [`process.stdout`][]
+are both stream instances.
+
+Streams can be readable, writable, or both. All streams are instances of
+[`EventEmitter`][].
+
+The `stream` module can be accessed using:
+
+```js
+const stream = require('stream');
+```
+
+While it is important for all Node.js users to understand how streams works,
+the `stream` module itself is most useful for developer's that are creating new
+types of stream instances. Developer's who are primarily *consuming* stream
+objects will rarely (if ever) have need to use the `stream` module directly.
+
+## Organization of this document
+
+This document is divided into two primary sections and third section for
+additional notes. The first section explains the elements of the stream API that
+are required to *use* streams within an application. The second section explains
+the elements of the API that are required to *implement* new types of streams.
+
+## Types of Streams
+
+There are four fundamental stream types within Node.js:
+
+* [Readable][] - streams from which data can be read (for example
+ [`fs.createReadStream()`][]).
+* [Writable][] - streams to which data can be written (for example
+ [`fs.createWriteStream()`][]).
+* [Duplex][] - streams that are both Readable and Writable (for example
+ [`net.Socket`][]).
+* [Transform][] - Duplex streams that can modify or transform the data as it
+ is written and read (for example [`zlib.createDeflate()`][]).
+
+### Object Mode
+
+All streams created by Node.js APIs operate exclusively on strings and `Buffer`
+objects. It is possible, however, for stream implementations to work with other
+types of JavaScript values (with the exception of `null` which serves a special
+purpose within streams). Such streams are considered to operate in "object
+mode".
+
+Stream instances are switched into object mode using the `objectMode` option
+when the stream is created. Attempting to switch an existing stream into
+object mode is not safe.
+
+### Buffering
+
+<!--type=misc-->
+
+Both [Writable][] and [Readable][] streams will store data in an internal
+buffer that can be retrieved using `writable._writableState.getBuffer()` or
+`readable._readableState.buffer`, respectively.
+
+The amount of data potentially buffered depends on the `highWaterMark` option
+passed into the streams constructor. For normal streams, the `highWaterMark`
+option specifies a total number of bytes. For streams operating in object mode,
+the `highWaterMark` specifies a total number of objects.
+
+Data is buffered in Readable streams when the implementation calls
+[`stream.push(chunk)`][stream-push]. If the consumer of the Stream does not
+call [`stream.read()`][stream-read], the data will sit in the internal
+queue until it is consumed.
+
+Once the total size of the internal read buffer reaches the threshold specified
+by `highWaterMark`, the stream will temporarily stop reading data from the
+underlying resource until the data currently buffered can be consumed (that is,
+the stream will stop calling the internal `readable._read()` method that is
+used to fill the read buffer).
+
+Data is buffered in Writable streams when the
+[`writable.write(chunk)`][stream-write] method is called repeatedly. While the
+total size of the internal write buffer is below the threshold set by
+`highWaterMark`, calls to `writable.write()` will return `true`. Once the
+the size of the internal buffer reaches or exceeds the `highWaterMark`, `false`
+will be returned.
+
+A key goal of the `stream` API, and in particular the [`stream.pipe()`] method,
+is to limit the buffering of data to acceptable levels such that sources and
+destinations of differing speeds will not overwhelm the available memory.
+
+Because [Duplex][] and [Transform][] streams are both Readable and Writable,
+each maintain *two* separate internal buffers used for reading and writing,
+allowing each side to operate independently of the other while maintaining an
+appropriate and efficient flow of data. For example, [`net.Socket`][] instances
+are [Duplex][] streams whose Readable side allows consumption of data received
+*from* the socket and whose Writable side allows writing data *to* the socket.
+Because data may be written to the socket at a faster or slower rate than data
+is received, it is important each side operate (and buffer) independently of
+the other.
+
+## API for Stream Consumers
+
+<!--type=misc-->
+
+Almost all Node.js applications, no matter how simple, use streams in some
+manner. The following is an example of using streams in a Node.js application
+that implements an HTTP server:
+
+```js
+const http = require('http');
+
+const server = http.createServer( (req, res) => {
+ // req is an http.IncomingMessage, which is a Readable Stream
+ // res is an http.ServerResponse, which is a Writable Stream
+
+ let body = '';
+ // Get the data as utf8 strings.
+ // If an encoding is not set, Buffer objects will be received.
+ req.setEncoding('utf8');
+
+ // Readable streams emit 'data' events once a listener is added
+ req.on('data', (chunk) => {
+ body += chunk;
+ });
+
+ // the end event indicates that the entire body has been received
+ req.on('end', () => {
+ try {
+ const data = JSON.parse(body);
+ } catch (er) {
+ // uh oh! bad json!
+ res.statusCode = 400;
+ return res.end(`error: ${er.message}`);
+ }
+
+ // write back something interesting to the user:
+ res.write(typeof data);
+ res.end();
+ });
+});
+
+server.listen(1337);
+
+// $ curl localhost:1337 -d '{}'
+// object
+// $ curl localhost:1337 -d '"foo"'
+// string
+// $ curl localhost:1337 -d 'not json'
+// error: Unexpected token o
+```
+
+[Writable][] streams (such as `res` in the example) expose methods such as
+`write()` and `end()` that are used to write data onto the stream.
+
+[Readable][] streams use the [`EventEmitter`][] API for notifying application
+code when data is available to be read off the stream. That available data can
+be read from the stream in multiple ways.
+
+Both [Writable][] and [Readable][] streams use the [`EventEmitter`][] API in
+various ways to communicate the current state of the stream.
+
+[Duplex][] and [Transform][] streams are both [Writable][] and [Readable][].
+
+Applications that are either writing data to or consuming data from a stream
+are not required to implement the stream interfaces directly and will generally
+have no reason to call `require('stream')`.
+
+Developers wishing to implement new types of streams should refer to the
+section [API for Stream Implementers][].
+
+### Writable Streams
+
+Writable streams are an abstraction for a *destination* to which data is
+written.
+
+Examples of [Writable][] streams include:
+
+* [HTTP requests, on the client][]
+* [HTTP responses, on the server][]
+* [fs write streams][]
+* [zlib streams][zlib]
+* [crypto streams][crypto]
+* [TCP sockets][]
+* [child process stdin][]
+* [`process.stdout`][], [`process.stderr`][]
+
+*Note*: Some of these examples are actually [Duplex][] streams that implement
+the [Writable][] interface.
+
+All [Writable][] streams implement the interface defined by the
+`stream.Writable` class.
+
+While specific instances of [Writable][] streams may differ in various ways,
+all Writable streams follow the same fundamental usage pattern as illustrated
+in the example below:
+
+```js
+const myStream = getWritableStreamSomehow();
+myStream.write('some data');
+myStream.write('some more data');
+myStream.end('done writing data');
+```
+
+#### Class: stream.Writable
+<!-- YAML
+added: v0.9.4
+-->
+
+<!--type=class-->
+
+##### Event: 'close'
+<!-- YAML
+added: v0.9.4
+-->
+
+The `'close'` event is emitted when the stream and any of its underlying
+resources (a file descriptor, for example) have been closed. The event indicates
+that no more events will be emitted, and no further computation will occur.
+
+Not all Writable streams will emit the `'close'` event.
+
+##### Event: 'drain'
+<!-- YAML
+added: v0.9.4
+-->
+
+If a call to [`stream.write(chunk)`][stream-write] returns `false`, the
+`'drain'` event will be emitted when it is appropriate to resume writing data
+to the stream.
+
+```js
+// Write the data to the supplied writable stream one million times.
+// Be attentive to back-pressure.
+function writeOneMillionTimes(writer, data, encoding, callback) {
+ let i = 1000000;
+ write();
+ function write() {
+ var ok = true;
+ do {
+ i--;
+ if (i === 0) {
+ // last time!
+ writer.write(data, encoding, callback);
+ } else {
+ // see if we should continue, or wait
+ // don't pass the callback, because we're not done yet.
+ ok = writer.write(data, encoding);
+ }
+ } while (i > 0 && ok);
+ if (i > 0) {
+ // had to stop early!
+ // write some more once it drains
+ writer.once('drain', write);
+ }
+ }
+}
+```
+
+##### Event: 'error'
+<!-- YAML
+added: v0.9.4
+-->
+
+* {Error}
+
+The `'error'` event is emitted if an error occurred while writing or piping
+data. The listener callback is passed a single `Error` argument when called.
+
+*Note*: The stream is not closed when the `'error'` event is emitted.
+
+##### Event: 'finish'
+<!-- YAML
+added: v0.9.4
+-->
+
+The `'finish'` event is emitted after the [`stream.end()`][stream-end] method
+has been called, and all data has been flushed to the underlying system.
+
+```js
+const writer = getWritableStreamSomehow();
+for (var i = 0; i < 100; i ++) {
+ writer.write('hello, #${i}!\n');
+}
+writer.end('This is the end\n');
+writer.on('finish', () => {
+ console.error('All writes are now complete.');
+});
+```
+
+##### Event: 'pipe'
+<!-- YAML
+added: v0.9.4
+-->
+
+* `src` {stream.Readable} source stream that is piping to this writable
+
+The `'pipe'` event is emitted when the [`stream.pipe()`][] method is called on
+a readable stream, adding this writable to its set of destinations.
+
+```js
+const writer = getWritableStreamSomehow();
+const reader = getReadableStreamSomehow();
+writer.on('pipe', (src) => {
+ console.error('something is piping into the writer');
+ assert.equal(src, reader);
+});
+reader.pipe(writer);
+```
+
+##### Event: 'unpipe'
+<!-- YAML
+added: v0.9.4
+-->
+
+* `src` {[Readable][] Stream} The source stream that
+ [unpiped][`stream.unpipe()`] this writable
+
+The `'unpipe'` event is emitted when the [`stream.unpipe()`][] method is called
+on a [Readable][] stream, removing this [Writable][] from its set of
+destinations.
+
+```js
+const writer = getWritableStreamSomehow();
+const reader = getReadableStreamSomehow();
+writer.on('unpipe', (src) => {
+ console.error('Something has stopped piping into the writer.');
+ assert.equal(src, reader);
+});
+reader.pipe(writer);
+reader.unpipe(writer);
+```
+
+##### writable.cork()
+<!-- YAML
+added: v0.11.2
+-->
+
+The `writable.cork()` method forces all written data to be buffered in memory.
+The buffered data will be flushed when either the [`stream.uncork()`][] or
+[`stream.end()`][stream-end] methods are called.
+
+The primary intent of `writable.cork()` is to avoid a situation where writing
+many small chunks of data to a stream do not cause an backup in the internal
+buffer that would have an adverse impact on performance. In such situations,
+implementations that implement the `writable._writev()` method can perform
+buffered writes in a more optimized manner.
+
+##### writable.end([chunk][, encoding][, callback])
+<!-- YAML
+added: v0.9.4
+-->
+
+* `chunk` {String|Buffer|any} Optional data to write. For streams not operating
+ in object mode, `chunk` must be a string or a `Buffer`. For object mode
+ streams, `chunk` may be any JavaScript value other than `null`.
+* `encoding` {String} The encoding, if `chunk` is a String
+* `callback` {Function} Optional callback for when the stream is finished
+
+Calling the `writable.end()` method signals that no more data will be written
+to the [Writable][]. The optional `chunk` and `encoding` arguments allow one
+final additional chunk of data to be written immediately before closing the
+stream. If provided, the optional `callback` function is attached as a listener
+for the [`'finish'`][] event.
+
+Calling the [`stream.write()`][stream-write] method after calling
+[`stream.end()`][stream-end] will raise an error.
+
+```js
+// write 'hello, ' and then end with 'world!'
+const file = fs.createWriteStream('example.txt');
+file.write('hello, ');
+file.end('world!');
+// writing more now is not allowed!
+```
+
+##### writable.setDefaultEncoding(encoding)
+<!-- YAML
+added: v0.11.15
+-->
+
+* `encoding` {String} The new default encoding
+* Return: `this`
+
+The `writable.setDefaultEncoding()` method sets the default `encoding` for a
+[Writable][] stream.
+
+##### writable.uncork()
+<!-- YAML
+added: v0.11.2
+-->
+
+The `writable.uncork()` method flushes all data buffered since
+[`stream.cork()`][] was called.
+
+When using `writable.cork()` and `writable.uncork()` to manage the buffering
+of writes to a stream, it is recommended that calls to `writable.uncork()` be
+deferred using `process.nextTick()`. Doing so allows batching of all
+`writable.write()` calls that occur within a given Node.js event loop phase.
+
+```js
+stream.cork();
+stream.write('some ');
+stream.write('data ');
+process.nextTick(() => stream.uncork());
+```
+
+If the `writable.cork()` method is called multiple times on a stream, the same
+number of calls to `writable.uncork()` must be called to flush the buffered
+data.
+
+```
+stream.cork();
+stream.write('some ');
+stream.cork();
+stream.write('data ');
+process.nextTick(() => {
+ stream.uncork();
+ // The data will not be flushed until uncork() is called a second time.
+ stream.uncork();
+});
+```
+
+##### writable.write(chunk[, encoding][, callback])
+<!-- YAML
+added: v0.9.4
+-->
+
+* `chunk` {String|Buffer} The data to write
+* `encoding` {String} The encoding, if `chunk` is a String
+* `callback` {Function} Callback for when this chunk of data is flushed
+* Returns: {Boolean} `false` if the stream wishes for the calling code to
+ wait for the `'drain'` event to be emitted before continuing to write
+ additional data; otherwise `true`.
+
+The `writable.write()` method writes some data to the stream, and calls the
+supplied `callback` once the data has been fully handled. If an error
+occurs, the `callback` *may or may not* be called with the error as its
+first argument. To reliably detect write errors, add a listener for the
+`'error'` event.
+
+The return value indicates whether the written `chunk` was buffered internally
+and the buffer has exceeded the `highWaterMark` configured when the stream was
+created. If `false` is returned, further attempts to write data to the stream
+should be paused until the `'drain'` event is emitted.
+
+A Writable stream in object mode will always ignore the `encoding` argument.
+
+### Readable Streams
+
+Readable streams are an abstraction for a *source* from which data is
+consumed.
+
+Examples of Readable streams include:
+
+* [HTTP responses, on the client][http-incoming-message]
+* [HTTP requests, on the server][http-incoming-message]
+* [fs read streams][]
+* [zlib streams][zlib]
+* [crypto streams][crypto]
+* [TCP sockets][]
+* [child process stdout and stderr][]
+* [`process.stdin`][]
+
+All [Readable][] streams implement the interface defined by the
+`stream.Readable` class.
+
+#### Two Modes
+
+Readable streams effectively operate in one of two modes: flowing and paused.
+
+When in flowing mode, data is read from the underlying system automatically
+and provided to an application as quickly as possible using events via the
+[`EventEmitter`][] interface.
+
+In paused mode, the [`stream.read()`][stream-read] method must be called
+explicitly to read chunks of data from the stream.
+
+All [Readable][] streams begin in paused mode but can be switched to flowing
+mode in one of the following ways:
+
+* Adding a [`'data'`][] event handler.
+* Calling the [`stream.resume()`][stream-resume] method.
+* Calling the [`stream.pipe()`][] method to send the data to a [Writable][].
+
+The Readable can switch back to paused mode using one of the following:
+
+* If there are no pipe destinations, by calling the
+ [`stream.pause()`][stream-pause] method.
+* If there are pipe destinations, by removing any [`'data'`][] event
+ handlers, and removing all pipe destinations by calling the
+ [`stream.unpipe()`][] method.
+
+The important concept to remember is that a Readable will not generate data
+until a mechanism for either consuming or ignoring that data is provided. If
+the consuming mechanism is disabled or taken away, the Readable will *attempt*
+to stop generating the data.
+
+*Note*: For backwards compatibility reasons, removing [`'data'`][] event
+handlers will **not** automatically pause the stream. Also, if there are piped
+destinations, then calling [`stream.pause()`][stream-pause] will not guarantee
+that the stream will *remain* paused once those destinations drain and ask for
+more data.
+
+*Note*: If a [Readable][] is switched into flowing mode and there are no
+consumers available handle the data, that data will be lost. This can occur,
+for instance, when the `readable.resume()` method is called without a listener
+attached to the `'data'` event, or when a `'data'` event handler is removed
+from the stream.
+
+#### Three States
+
+The "two modes" of operation for a Readable stream are a simplified abstraction
+for the more complicated internal state management that is happening within the
+Readable stream implementation.
+
+Specifically, at any given point in time, every Readable is in one of three
+possible states:
+
+* `readable._readableState.flowing = null`
+* `readable._readableState.flowing = false`
+* `readable._readableState.flowing = true`
+
+When `readable._readableState.flowing` is `null`, no mechanism for consuming the
+streams data is provided so the stream will not generate its data.
+
+Attaching a listener for the `'data'` event, calling the `readable.pipe()`
+method, or calling the `readable.resume()` method will switch
+`readable._readableState.flowing` to `true`, causing the Readable to begin
+actively emitting events as data is generated.
+
+Calling `readable.pause()`, `readable.unpipe()`, or receiving "back pressure"
+will cause the `readable._readableState.flowing` to be set as `false`,
+temporarily halting the flowing of events but *not* halting the generation of
+data.
+
+While `readable._readableState.flowing` is `false`, data may be accumulating
+within the streams internal buffer.
+
+#### Choose One
+
+The Readable stream API evolved across multiple Node.js versions and provides
+multiple methods of consuming stream data. In general, developers should choose
+*one* of the methods of consuming data and *should never* use multiple methods
+to consume data from a single stream.
+
+Use of the `readable.pipe()` method is recommended for most users as it has been
+implemented to provide the easiest way of consuming stream data. Developers that
+require more fine-grained control over the transfer and generation of data can
+use the [`EventEmitter`][] and `readable.pause()`/`readable.resume()` APIs.
+
+#### Class: stream.Readable
+<!-- YAML
+added: v0.9.4
+-->
+
+<!--type=class-->
+
+##### Event: 'close'
+<!-- YAML
+added: v0.9.4
+-->
+
+The `'close'` event is emitted when the stream and any of its underlying
+resources (a file descriptor, for example) have been closed. The event indicates
+that no more events will be emitted, and no further computation will occur.
+
+Not all [Readable][] streams will emit the `'close'` event.
+
+##### Event: 'data'
+<!-- YAML
+added: v0.9.4
+-->
+
+* `chunk` {Buffer|String|any} The chunk of data. For streams that are not
+ operating in object mode, the chunk will be either a string or `Buffer`.
+ For streams that are in object mode, the chunk can be any JavaScript value
+ other than `null`.
+
+The `'data'` event is emitted whenever the stream is relinquishing ownership of
+a chunk of data to a consumer. This may occur whenever the stream is switched
+in flowing mode by calling `readable.pipe()`, `readable.resume()`, or by
+attaching a listener callback to the `'data'` event. The `'data'` event will
+also be emitted whenever the `readable.read()` method is called and a chunk of
+data is available to be returned.
+
+Attaching a `'data'` event listener to a stream that has not been explicitly
+paused will switch the stream into flowing mode. Data will then be passed as
+soon as it is available.
+
+The listener callback will be passed the chunk of data as a string if a default
+encoding has been specified for the stream using the
+`readable.setEncoding()` method; otherwise the data will be passed as a
+`Buffer`.
+
+```js
+const readable = getReadableStreamSomehow();
+readable.on('data', (chunk) => {
+ console.log(`Received ${chunk.length} bytes of data.`);
+});
+```
+
+##### Event: 'end'
+<!-- YAML
+added: v0.9.4
+-->
+
+The `'end'` event is emitted when there is no more data to be consumed from
+the stream.
+
+*Note*: The `'end'` event **will not be emitted** unless the data is
+completely consumed. This can be accomplished by switching the stream into
+flowing mode, or by calling [`stream.read()`][stream-read] repeatedly until
+all data has been consumed.
+
+```js
+const readable = getReadableStreamSomehow();
+readable.on('data', (chunk) => {
+ console.log(`Received ${chunk.length} bytes of data.`);
+});
+readable.on('end', () => {
+ console.log('There will be no more data.');
+});
+```
+
+##### Event: 'error'
+<!-- YAML
+added: v0.9.4
+-->
+
+* {Error}
+
+The `'error'` event may be emitted by a Readable implementation at any time.
+Typically, this may occur if the underlying stream in unable to generate data
+due to an underlying internal failure, or when a stream implementation attempts
+to push an invalid chunk of data.
+
+The listener callback will be passed a single `Error` object.
+
+##### Event: 'readable'
+<!-- YAML
+added: v0.9.4
+-->
+
+The `'readable'` event is emitted when there is data available to be read from
+the stream. In some cases, attaching a listener for the `'readable'` event will
+cause some amount of data to be read into an internal buffer.
+
+```javascript
+const readable = getReadableStreamSomehow();
+readable.on('readable', () => {
+ // there is some data to read now
+});
+```
+The `'readable'` event will also be emitted once the end of the stream data
+has been reached but before the `'end'` event is emitted.
+
+Effectively, the `'readable'` event indicates that the stream has new
+information: either new data is available or the end of the stream has been
+reached. In the former case, [`stream.read()`][stream-read] will return the
+available data. In the latter case, [`stream.read()`][stream-read] will return
+`null`. For instance, in the following example, `foo.txt` is an empty file:
+
+```js
+const fs = require('fs');
+const rr = fs.createReadStream('foo.txt');
+rr.on('readable', () => {
+ console.log('readable:', rr.read());
+});
+rr.on('end', () => {
+ console.log('end');
+});
+```
+
+The output of running this script is:
+
+```
+$ node test.js
+readable: null
+end
+```
+
+*Note*: In general, the `readable.pipe()` and `'data'` event mechanisms are
+preferred over the use of the `'readable'` event.
+
+##### readable.isPaused()
+<!--
+added: v0.11.14
+-->
+
+* Return: {Boolean}
+
+The `readable.isPaused()` method returns the current operating state of the
+Readable. This is used primarily by the mechanism that underlies the
+`readable.pipe()` method. In most typical cases, there will be no reason to
+use this method directly.
+
+```js
+const readable = new stream.Readable
+
+readable.isPaused() // === false
+readable.pause()
+readable.isPaused() // === true
+readable.resume()
+readable.isPaused() // === false
+```
+
+##### readable.pause()
+<!-- YAML
+added: v0.9.4
+-->
+
+* Return: `this`
+
+The `readable.pause()` method will cause a stream in flowing mode to stop
+emitting [`'data'`][] events, switching out of flowing mode. Any data that
+becomes available will remain in the internal buffer.
+
+```js
+const readable = getReadableStreamSomehow();
+readable.on('data', (chunk) => {
+ console.log(`Received ${chunk.length} bytes of data.`);
+ readable.pause();
+ console.log('There will be no additional data for 1 second.');
+ setTimeout(() => {
+ console.log('Now data will start flowing again.');
+ readable.resume();
+ }, 1000);
+});
+```
+
+##### readable.pipe(destination[, options])
+<!-- YAML
+added: v0.9.4
+-->
+
+* `destination` {stream.Writable} The destination for writing data
+* `options` {Object} Pipe options
+ * `end` {Boolean} End the writer when the reader ends. Defaults to `true`.
+
+The `readable.pipe()` method attaches a [Writable][] stream to the `readable`,
+causing it to switch automatically into flowing mode and push all of its data
+to the attached [Writable][]. The flow of data will be automatically managed so
+that the destination Writable stream is not overwhelmed by a faster Readable
+stream.
+
+The following example pipes all of the data from the `readable` into a file
+named `file.txt`:
+
+```js
+const readable = getReadableStreamSomehow();
+const writable = fs.createWriteStream('file.txt');
+// All the data from readable goes into 'file.txt'
+readable.pipe(writable);
+```
+It is possible to attach multiple Writable streams to a single Readable stream.
+
+The `readable.pipe()` method returns a reference to the *destination* stream
+making it possible to set up chains of piped streams:
+
+```js
+const r = fs.createReadStream('file.txt');
+const z = zlib.createGzip();
+const w = fs.createWriteStream('file.txt.gz');
+r.pipe(z).pipe(w);
+```
+
+By default, [`stream.end()`][stream-end] is called on the destination Writable
+stream when the source Readable stream emits [`'end'`][], so that the
+destination is no longer writable. To disable this default behavior, the `end`
+option can be passed as `false`, causing the destination stream to remain open,
+as illustrated in the following example:
+
+```js
+reader.pipe(writer, { end: false });
+reader.on('end', () => {
+ writer.end('Goodbye\n');
+});
+```
+
+One important caveat is that if the Readable stream emits an error during
+processing, the Writable destination *is not closed* automatically. If an
+error occurs, it will be necessary to *manually* close each stream in order
+to prevent memory leaks.
+
+*Note*: The [`process.stderr`][] and [`process.stdout`][] Writable streams are
+never closed until the Node.js process exits, regardless of the specified
+options.
+
+##### readable.read([size])
+<!-- YAML
+added: v0.9.4
+-->
+
+* `size` {Number} Optional argument to specify how much data to read.
+* Return {String|Buffer|Null}
+
+The `readable.read()` method pulls some data out of the internal buffer and
+returns it. If no data available to be read, `null` is returned. By default,
+the data will be returned as a `Buffer` object unless an encoding has been
+specified using the `readable.setEncoding()` method or the stream is operating
+in object mode.
+
+The optional `size` argument specifies a specific number of bytes to read. If
+`size` bytes are not available to be read, `null` will be returned *unless*
+the stream has ended, in which case all of the data remaining in the internal
+buffer will be returned (*even if it exceeds `size` bytes*).
+
+If the `size` argument is not specified, all of the data contained in the
+internal buffer will be returned.
+
+The `readable.read()` method should only be called on Readable streams operating
+in paused mode. In flowing mode, `readable.read()` is called automatically until
+the internal buffer is fully drained.
+
+```js
+const readable = getReadableStreamSomehow();
+readable.on('readable', () => {
+ var chunk;
+ while (null !== (chunk = readable.read())) {
+ console.log(`Received ${chunk.length} bytes of data.`);
+ }
+});
+```
+
+In general, it is recommended that developers avoid the use of the `'readable'`
+event and the `readable.read()` method in favor of using either
+`readable.pipe()` or the `'data'` event.
+
+A Readable stream in object mode will always return a single item from
+a call to [`readable.read(size)`][stream-read], regardless of the value of the
+`size` argument.
+
+*Note:* If the `readable.read()` method returns a chunk of data, a `'data'`
+event will also be emitted.
+
+*Note*: Calling [`stream.read([size])`][stream-read] after the [`'end'`][]
+event has been emitted will return `null`. No runtime error will be raised.
+
+##### readable.resume()
+<!-- YAML
+added: v0.9.4
+-->
+
+* Return: `this`
+
+The `readable.resume()` method causes an explicitly paused Readable stream to
+resume emitting [`'data'`][] events, switching the stream into flowing mode.
+
+The `readable.resume()` method can be used to fully consume the data from a
+stream without actually processing any of that data as illustrated in the
+following example:
+
+```js
+getReadableStreamSomehow()
+ .resume()
+ .on('end', () => {
+ console.log('Reached the end, but did not read anything.');
+ });
+```
+
+##### readable.setEncoding(encoding)
+<!-- YAML
+added: v0.9.4
+-->
+
+* `encoding` {String} The encoding to use.
+* Return: `this`
+
+The `readable.setEncoding()` method sets the default character encoding for
+data read from the Readable stream.
+
+Setting an encoding causes the stream data
+to be returned as string of the specified encoding rather than as `Buffer`
+objects. For instance, calling `readable.setEncoding('utf8')` will cause the
+output data will be interpreted as UTF-8 data, and passed as strings. Calling
+`readable.setEncoding('hex')` will cause the data to be encoded in hexadecimal
+string format.
+
+The Readable stream will properly handle multi-byte characters delivered through
+the stream that would otherwise become improperly decoded if simply pulled from
+the stream as `Buffer` objects.
+
+Encoding can be disabled by calling `readable.setEncoding(null)`. This approach
+is useful when working with binary data or with large multi-byte strings spread
+out over multiple chunks.
+
+```js
+const readable = getReadableStreamSomehow();
+readable.setEncoding('utf8');
+readable.on('data', (chunk) => {
+ assert.equal(typeof chunk, 'string');
+ console.log('got %d characters of string data', chunk.length);
+});
+```
+
+##### readable.unpipe([destination])
+<!-- YAML
+added: v0.9.4
+-->
+
+* `destination` {stream.Writable} Optional specific stream to unpipe
+
+The `readable.unpipe()` method detaches a Writable stream previously attached
+using the [`stream.pipe()`][] method.
+
+If the `destination` is not specified, then *all* pipes are detached.
+
+If the `destination` is specified, but no pipe is set up for it, then
+the method does nothing.
+
+```js
+const readable = getReadableStreamSomehow();
+const writable = fs.createWriteStream('file.txt');
+// All the data from readable goes into 'file.txt',
+// but only for the first second
+readable.pipe(writable);
+setTimeout(() => {
+ console.log('Stop writing to file.txt');
+ readable.unpipe(writable);
+ console.log('Manually close the file stream');
+ writable.end();
+}, 1000);
+```
+
+##### readable.unshift(chunk)
+<!-- YAML
+added: v0.9.11
+-->
+
+* `chunk` {Buffer|String} Chunk of data to unshift onto the read queue
+
+The `readable.unshift()` method pushes a chunk of data back into the internal
+buffer. This is useful in certain situations where a stream is being consumed by
+code that needs to "un-consume" some amount of data that it has optimistically
+pulled out of the source, so that the data can be passed on to some other party.
+
+*Note*: The `stream.unshift(chunk)` method cannot be called after the
+[`'end'`][] event has been emitted or a runtime error will be thrown.
+
+Developers using `stream.unshift()` often should consider switching to
+use of a [Transform][] stream instead. See the [API for Stream Implementers][]
+section for more information.
+
+```js
+// Pull off a header delimited by \n\n
+// use unshift() if we get too much
+// Call the callback with (error, header, stream)
+const StringDecoder = require('string_decoder').StringDecoder;
+function parseHeader(stream, callback) {
+ stream.on('error', callback);
+ stream.on('readable', onReadable);
+ const decoder = new StringDecoder('utf8');
+ var header = '';
+ function onReadable() {
+ var chunk;
+ while (null !== (chunk = stream.read())) {
+ var str = decoder.write(chunk);
+ if (str.match(/\n\n/)) {
+ // found the header boundary
+ var split = str.split(/\n\n/);
+ header += split.shift();
+ const remaining = split.join('\n\n');
+ const buf = Buffer.from(remaining, 'utf8');
+ if (buf.length)
+ stream.unshift(buf);
+ stream.removeListener('error', callback);
+ stream.removeListener('readable', onReadable);
+ // now the body of the message can be read from the stream.
+ callback(null, header, stream);
+ } else {
+ // still reading the header.
+ header += str;
+ }
+ }
+ }
+}
+```
+
+*Note*: Unlike [`stream.push(chunk)`][stream-push], `stream.unshift(chunk)`
+will not end the reading process by resetting the internal reading state of the
+stream. This can cause unexpected results if `readable.unshift()` is called
+during a read (i.e. from within a [`stream._read()`][stream-_read]
+implementation on a custom stream). Following the call to `readable.unshift()`
+with an immediate [`stream.push('')`][stream-push] will reset the reading state
+appropriately, however it is best to simply avoid calling `readable.unshift()`
+while in the process of performing a read.
+
+##### readable.wrap(stream)
+<!-- YAML
+added: v0.9.4
+-->
+
+* `stream` {Stream} An "old style" readable stream
+
+Versions of Node.js prior to v0.10 had streams that did not implement the
+entire `stream` module API as it is currently defined. (See [Compatibility][]
+for more information.)
+
+When using an older Node.js library that emits [`'data'`][] events and has a
+[`stream.pause()`][stream-pause] method that is advisory only, the
+`readable.wrap()` method can be used to create a [Readable][] stream that uses
+the old stream as its data source.
+
+It will rarely be necessary to use `readable.wrap()` but the method has been
+provided as a convenience for interacting with older Node.js applications and
+libraries.
+
+For example:
+
+```js
+const OldReader = require('./old-api-module.js').OldReader;
+const Readable = require('stream').Readable;
+const oreader = new OldReader;
+const myReader = new Readable().wrap(oreader);
+
+myReader.on('readable', () => {
+ myReader.read(); // etc.
+});
+```
+
+### Duplex and Transform Streams
+
+#### Class: stream.Duplex
+<!-- YAML
+added: v0.9.4
+-->
+
+<!--type=class-->
+
+Duplex streams are streams that implement both the [Readable][] and
+[Writable][] interfaces.
+
+Examples of Duplex streams include:
+
+* [TCP sockets][]
+* [zlib streams][zlib]
+* [crypto streams][crypto]
+
+#### Class: stream.Transform
+<!-- YAML
+added: v0.9.4
+-->
+
+<!--type=class-->
+
+Transform streams are [Duplex][] streams where the output is in some way
+related to the input. Like all [Duplex][] streams, Transform streams
+implement both the [Readable][] and [Writable][] interfaces.
+
+Examples of Transform streams include:
+
+* [zlib streams][zlib]
+* [crypto streams][crypto]
+
+
+## API for Stream Implementers
+
+<!--type=misc-->
+
+The `stream` module API has been designed to make it possible to easily
+implement streams using JavaScript's prototypical inheritance model.
+
+First, a stream developer would declare a new JavaScript class that extends one
+of the four basic stream classes (`stream.Writable`, `stream.Readable`,
+`stream.Duplex`, or `stream.Transform`), making sure the call the appropriate
+parent class constructor:
+
+```js
+const Writable = require('stream').Writable;
+
+class MyWritable extends Writable {
+ constructor(options) {
+ super(options);
+ }
+}
+```
+
+The new stream class must then implement one or more specific methods, depending
+on the type of stream being created, as detailed in the chart below:
+
+<table>
+ <thead>
+ <tr>
+ <th>
+ <p>Use-case</p>
+ </th>
+ <th>
+ <p>Class</p>
+ </th>
+ <th>
+ <p>Method(s) to implement</p>
+ </th>
+ </tr>
+ </thead>
+ <tr>
+ <td>
+ <p>Reading only</p>
+ </td>
+ <td>
+ <p>[Readable](#stream_class_stream_readable)</p>
+ </td>
+ <td>
+ <p><code>[_read][stream-_read]</code></p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>Writing only</p>
+ </td>
+ <td>
+ <p>[Writable](#stream_class_stream_writable)</p>
+ </td>
+ <td>
+ <p><code>[_write][stream-_write]</code>, <code>[_writev][stream-_writev]</code></p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>Reading and writing</p>
+ </td>
+ <td>
+ <p>[Duplex](#stream_class_stream_duplex)</p>
+ </td>
+ <td>
+ <p><code>[_read][stream-_read]</code>, <code>[_write][stream-_write]</code>, <code>[_writev][stream-_writev]</code></p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>Operate on written data, then read the result</p>
+ </td>
+ <td>
+ <p>[Transform](#stream_class_stream_transform)</p>
+ </td>
+ <td>
+ <p><code>[_transform][stream-_transform]</code>, <code>[_flush][stream-_flush]</code></p>
+ </td>
+ </tr>
+</table>
+
+*Note*: The implementation code for a stream should *never* call the "public"
+methods of a stream that are intended for use by consumers (as described in
+the [API for Stream Consumers][] section). Doing so may lead to adverse
+side effects in application code consuming the stream.
+
+### Simplified Construction
+
+For many simple cases, it is possible to construct a stream without relying on
+inheritance. This can be accomplished by directly creating instances of the
+`stream.Writable`, `stream.Readable`, `stream.Duplex` or `stream.Transform`
+objects and passing appropriate methods as constructor options.
+
+For example:
+
+```js
+const Writable = require('stream').Writable;
+
+const myWritable = new Writable({
+ write(chunk, encoding, callback) {
+ // ...
+ }
+});
+```
+
+### Implementing a Writable Stream
+
+The `stream.Writable` class is extended to implement a [Writable][] stream.
+
+Custom Writable streams *must* call the `new stream.Writable([options])`
+constructor and implement the `writable._write()` method. The
+`writable._writev()` method *may* also be implemented.
+
+#### Constructor: new stream.Writable([options])
+
+* `options` {Object}
+ * `highWaterMark` {Number} Buffer level when
+ [`stream.write()`][stream-write] starts returning `false`. Defaults to
+ `16384` (16kb), or `16` for `objectMode` streams.
+ * `decodeStrings` {Boolean} Whether or not to decode strings into
+ Buffers before passing them to [`stream._write()`][stream-_write].
+ Defaults to `true`
+ * `objectMode` {Boolean} Whether or not the
+ [`stream.write(anyObj)`][stream-write] is a valid operation. When set,
+ it becomes possible to write JavaScript values other than string or
+ `Buffer` if supported by the stream implementation. Defaults to `false`
+ * `write` {Function} Implementation for the
+ [`stream._write()`][stream-_write] method.
+ * `writev` {Function} Implementation for the
+ [`stream._writev()`][stream-_writev] method.
+
+For example:
+
+```js
+const Writable = require('stream').Writable;
+
+class MyWritable extends Writable {
+ constructor(options) {
+ // Calls the stream.Writable() constructor
+ super(options);
+ }
+}
+```
+
+Or, when using pre-ES6 style constructors:
+
+```js
+const Writable = require('stream').Writable;
+const util = require('util');
+
+function MyWritable(options) {
+ if (!(this instanceof MyWritable))
+ return new MyWritable(options);
+ Writable.call(this, options);
+}
+util.inherits(MyWritable, Writable);
+```
+
+Or, using the Simplified Constructor approach:
+
+```js
+const Writable = require('stream').Writable;
+
+const myWritable = new Writable({
+ write(chunk, encoding, callback) {
+ // ...
+ },
+ writev(chunks, callback) {
+ // ...
+ }
+});
+```
+
+#### writable.\_write(chunk, encoding, callback)
+
+* `chunk` {Buffer|String} The chunk to be written. Will **always**
+ be a buffer unless the `decodeStrings` option was set to `false`.
+* `encoding` {String} If the chunk is a string, then `encoding` is the
+ character encoding of that string. If chunk is a `Buffer`, or if the
+ stream is operating in object mode, `encoding` may be ignored.
+* `callback` {Function} Call this function (optionally with an error
+ argument) when processing is complete for the supplied chunk.
+
+All Writable stream implementations must provide a
+[`writable._write()`][stream-_write] method to send data to the underlying
+resource.
+
+*Note*: [Transform][] streams provide their own implementation of the
+[`writable._write()`][stream-_write].
+
+*Note*: **This function MUST NOT be called by application code directly.** It
+should be implemented by child classes, and called only by the internal Writable
+class methods only.
+
+The `callback` method must be called to signal either that the write completed
+successfully or failed with an error. The first argument passed to the
+`callback` must be the `Error` object if the call failed or `null` if the
+write succeeded.
+
+It is important to note that all calls to `writable.write()` that occur between
+the time `writable._write()` is called and the `callback` is called will cause
+the written data to be buffered. Once the `callback` is invoked, the stream will
+emit a `'drain'` event. If a stream implementation is capable of processing
+multiple chunks of data at once, the `writable._writev()` method should be
+implemented.
+
+If the `decodeStrings` property is set in the constructor options, then
+`chunk` may be a string rather than a Buffer, and `encoding` will
+indicate the character encoding of the string. This is to support
+implementations that have an optimized handling for certain string
+data encodings. If the `decodeStrings` property is explicitly set to `false`,
+the `encoding` argument can be safely ignored, and `chunk` will always be a
+`Buffer`.
+
+The `writable._write()` method is prefixed with an underscore because it is
+internal to the class that defines it, and should never be called directly by
+user programs.
+
+#### writable.\_writev(chunks, callback)
+
+* `chunks` {Array} The chunks to be written. Each chunk has following
+ format: `{ chunk: ..., encoding: ... }`.
+* `callback` {Function} A callback function (optionally with an error
+ argument) to be invoked when processing is complete for the supplied chunks.
+
+*Note*: **This function MUST NOT be called by application code directly.** It
+should be implemented by child classes, and called only by the internal Writable
+class methods only.
+
+The `writable._writev()` method may be implemented in addition to
+`writable._write()` in stream implementations that are capable of processing
+multiple chunks of data at once. If implemented, the method will be called with
+all chunks of data currently buffered in the write queue.
+
+The `writable._writev()` method is prefixed with an underscore because it is
+internal to the class that defines it, and should never be called directly by
+user programs.
+
+#### Errors While Writing
+
+It is recommended that errors occurring during the processing of the
+`writable._write()` and `writable._writev()` methods are reported by invoking
+the callback and passing the error as the first argument. This will cause an
+`'error'` event to be emitted by the Writable. Throwing an Error from within
+`writable._write()` can result in expected and inconsistent behavior depending
+on how the stream is being used. Using the callback ensures consistent and
+predictable handling of errors.
+
+```js
+const Writable = require('stream').Writable;
+
+const myWritable = new Writable({
+ write(chunk, encoding, callback) {
+ if (chunk.toString().indexOf('a') >= 0) {
+ callback(new Error('chunk is invalid'));
+ } else {
+ callback();
+ }
+ }
+});
+```
+
+#### An Example Writable Stream
+
+The following illustrates a rather simplistic (and somewhat pointless) custom
+Writable stream implementation. While this specific Writable stream instance
+is not of any real particular usefulness, the example illustrates each of the
+required elements of a custom [Writable][] stream instance:
+
+```js
+const Writable = require('stream').Writable;
+
+class MyWritable extends Writable {
+ constructor(options) {
+ super(options);
+ }
+
+ _write(chunk, encoding, callback) {
+ if (chunk.toString().indexOf('a') >= 0) {
+ callback(new Error('chunk is invalid'));
+ } else {
+ callback();
+ }
+ }
+}
+```
+
+### Implementing a Readable Stream
+
+The `stream.Readable` class is extended to implement a [Readable][] stream.
+
+Custom Readable streams *must* call the `new stream.Readable([options])`
+constructor and implement the `readable._read()` method.
+
+#### new stream.Readable([options])
+
+* `options` {Object}
+ * `highWaterMark` {Number} The maximum number of bytes to store in
+ the internal buffer before ceasing to read from the underlying
+ resource. Defaults to `16384` (16kb), or `16` for `objectMode` streams
+ * `encoding` {String} If specified, then buffers will be decoded to
+ strings using the specified encoding. Defaults to `null`
+ * `objectMode` {Boolean} Whether this stream should behave
+ as a stream of objects. Meaning that [`stream.read(n)`][stream-read] returns
+ a single value instead of a Buffer of size n. Defaults to `false`
+ * `read` {Function} Implementation for the [`stream._read()`][stream-_read]
+ method.
+
+For example:
+
+```js
+const Readable = require('stream').Readable;
+
+class MyReadable extends Readable {
+ constructor(options) {
+ // Calls the stream.Readable(options) constructor
+ super(options);
+ }
+}
+```
+
+Or, when using pre-ES6 style constructors:
+
+```js
+const Readable = require('stream').Readable;
+const util = require('util');
+
+function MyReadable(options) {
+ if (!(this instanceof MyReadable))
+ return new MyReadable(options);
+ Readable.call(this, options);
+}
+util.inherits(MyReadable, Readable);
+```
+
+Or, using the Simplified Constructor approach:
+
+```js
+const Readable = require('stream').Readable;
+
+const myReadable = new Readable({
+ read(size) {
+ // ...
+ }
+});
+```
+
+#### readable.\_read(size)
+
+* `size` {Number} Number of bytes to read asynchronously
+
+*Note*: **This function MUST NOT be called by application code directly.** It
+should be implemented by child classes, and called only by the internal Readable
+class methods only.
+
+All Readable stream implementations must provide an implementation of the
+`readable._read()` method to fetch data from the underlying resource.
+
+When `readable._read()` is called, if data is available from the resource, the
+implementation should begin pushing that data into the read queue using the
+[`this.push(dataChunk)`][stream-push] method. `_read()` should continue reading
+from the resource and pushing data until `readable.push()` returns `false`. Only
+when `_read()` is called again after it has stopped should it resume pushing
+additional data onto the queue.
+
+*Note*: Once the `readable._read()` method has been called, it will not be
+called again until the [`readable.push()`][stream-push] method is called.
+
+The `size` argument is advisory. For implementations where a "read" is a
+single operation that returns data can use the `size` argument to determine how
+much data to fetch. Other implementations may ignore this argument and simply
+provide data whenever it becomes available. There is no need to "wait" until
+`size` bytes are available before calling [`stream.push(chunk)`][stream-push].
+
+The `readable._read()` method is prefixed with an underscore because it is
+internal to the class that defines it, and should never be called directly by
+user programs.
+
+#### readable.push(chunk[, encoding])
+
+* `chunk` {Buffer|Null|String} Chunk of data to push into the read queue
+* `encoding` {String} Encoding of String chunks. Must be a valid
+ Buffer encoding, such as `'utf8'` or `'ascii'`
+* Returns {Boolean} `true` if additional chunks of data may continued to be
+ pushed; `false` otherwise.
+
+When `chunk` is a `Buffer` or `string`, the `chunk` of data will be added to the
+internal queue for users of the stream to consume. Passing `chunk` as `null`
+signals the end of the stream (EOF), after which no more data can be written.
+
+When the Readable is operating in paused mode, the data added with
+`readable.push()` can be read out by calling the
+[`readable.read()`][stream-read] method when the [`'readable'`][] event is
+emitted.
+
+When the Readable is operating in flowing mode, the data added with
+`readable.push()` will be delivered by emitting a `'data'` event.
+
+The `readable.push()` method is designed to be as flexible as possible. For
+example, when wrapping a lower-level source that provides some form of
+pause/resume mechanism, and a data callback, the low-level source can be wrapped
+by the custom Readable instance as illustrated in the following example:
+
+```js
+// source is an object with readStop() and readStart() methods,
+// and an `ondata` member that gets called when it has data, and
+// an `onend` member that gets called when the data is over.
+
+class SourceWrapper extends Readable {
+ constructor(options) {
+ super(options);
+
+ this._source = getLowlevelSourceObject();
+
+ // Every time there's data, push it into the internal buffer.
+ this._source.ondata = (chunk) => {
+ // if push() returns false, then stop reading from source
+ if (!this.push(chunk))
+ this._source.readStop();
+ };
+
+ // When the source ends, push the EOF-signaling `null` chunk
+ this._source.onend = () => {
+ this.push(null);
+ };
+ }
+ // _read will be called when the stream wants to pull more data in
+ // the advisory size argument is ignored in this case.
+ _read(size) {
+ this._source.readStart();
+ }
+}
+```
+*Note*: The `readable.push()` method is intended be called only by Readable
+Implementers, and only from within the `readable._read()` method.
+
+#### Errors While Reading
+
+It is recommended that errors occurring during the processing of the
+`readable._read()` method are emitted using the `'error'` event rather than
+being thrown. Throwing an Error from within `readable._read()` can result in
+expected and inconsistent behavior depending on whether the stream is operating
+in flowing or paused mode. Using the `'error'` event ensures consistent and
+predictable handling of errors.
+
+```js
+const Readable = require('stream').Readable;
+
+const myReadable = new Readable({
+ read(size) {
+ if (checkSomeErrorCondition()) {
+ process.nextTick(() => this.emit('error', err));
+ return;
+ }
+ // do some work
+ }
+});
+```
+
+#### An Example Counting Stream
+
+<!--type=example-->
+
+The following is a basic example of a Readable stream that emits the numerals
+from 1 to 1,000,000 in ascending order, and then ends.
+
+```js
+const Readable = require('stream').Readable;
+
+class Counter extends Readable {
+ constructor(opt) {
+ super(opt);
+ this._max = 1000000;
+ this._index = 1;
+ }
+
+ _read() {
+ var i = this._index++;
+ if (i > this._max)
+ this.push(null);
+ else {
+ var str = '' + i;
+ var buf = Buffer.from(str, 'ascii');
+ this.push(buf);
+ }
+ }
+}
+```
+
+### Implementing a Duplex Stream
+
+A [Duplex][] stream is one that implements both [Readable][] and [Writable][],
+such as a TCP socket connection.
+
+Because Javascript does not have support for multiple inheritance, the
+`stream.Duplex` class is extended to implement a [Duplex][] stream (as opposed
+to extending the `stream.Readable` *and* `stream.Writable` classes).
+
+*Note*: The `stream.Duplex` class prototypically inherits from `stream.Readable`
+and parasitically from `stream.Writable`.
+
+Custom Duplex streams *must* call the `new stream.Duplex([options])`
+constructor and implement *both* the `readable._read()` and
+`writable._write()` methods.
+
+#### new stream.Duplex(options)
+
+* `options` {Object} Passed to both Writable and Readable
+ constructors. Also has the following fields:
+ * `allowHalfOpen` {Boolean} Defaults to `true`. If set to `false`, then
+ the stream will automatically end the readable side when the
+ writable side ends and vice versa.
+ * `readableObjectMode` {Boolean} Defaults to `false`. Sets `objectMode`
+ for readable side of the stream. Has no effect if `objectMode`
+ is `true`.
+ * `writableObjectMode` {Boolean} Defaults to `false`. Sets `objectMode`
+ for writable side of the stream. Has no effect if `objectMode`
+ is `true`.
+
+For example:
+
+```js
+const Duplex = require('stream').Duplex;
+
+class MyDuplex extends Duplex {
+ constructor(options) {
+ super(options);
+ }
+}
+```
+
+Or, when using pre-ES6 style constructors:
+
+```js
+const Duplex = require('stream').Duplex;
+const util = require('util');
+
+function MyDuplex(options) {
+ if (!(this instanceof MyDuplex))
+ return new MyDuplex(options);
+ Duplex.call(this, options);
+}
+util.inherits(MyDuplex, Duplex);
+```
+
+Or, using the Simplified Constructor approach:
+
+```js
+const Duplex = require('stream').Duplex;
+
+const myDuplex = new Duplex({
+ read(size) {
+ // ...
+ },
+ write(chunk, encoding, callback) {
+ // ...
+ }
+});
+```
+
+#### An Example Duplex Stream
+
+The following illustrates a simple example of a Duplex stream that wraps a
+hypothetical lower-level source object to which data can be written, and
+from which data can be read, albeit using an API that is not compatible with
+Node.js streams.
+The following illustrates a simple example of a Duplex stream that buffers
+incoming written data via the [Writable][] interface that is read back out
+via the [Readable][] interface.
+
+```js
+const Duplex = require('stream').Duplex;
+const kSource = Symbol('source');
+
+class MyDuplex extends Duplex {
+ constructor(source, options) {
+ super(options);
+ this[kSource] = source;
+ }
+
+ _write(chunk, encoding, callback) {
+ // The underlying source only deals with strings
+ if (Buffer.isBuffer(chunk))
+ chunk = chunk.toString(encoding);
+ this[kSource].writeSomeData(chunk, encoding);
+ callback();
+ }
+
+ _read(size) {
+ this[kSource].fetchSomeData(size, (data, encoding) => {
+ this.push(Buffer.from(data, encoding));
+ });
+ }
+}
+```
+
+The most important aspect of a Duplex stream is that the Readable and Writable
+sides operate independently of one another despite co-existing within a single
+object instance.
+
+#### Object Mode Duplex Streams
+
+For Duplex streams, `objectMode` can be set exclusively for either the Readable
+or Writable side using the `readableObjectMode` and `writableObjectMode` options
+respectively.
+
+In the following example, for instance, a new Transform stream (which is a
+type of [Duplex][] stream) is created that has an object mode Writable side
+that accepts JavaScript numbers that are converted to hexidecimal strings on
+the Readable side.
+
+```js
+const Transform = require('stream').Transform;
+
+// All Transform streams are also Duplex Streams
+const myTransform = new Transform({
+ writableObjectMode: true,
+
+ transform(chunk, encoding, callback) {
+ // Coerce the chunk to a number if necessary
+ chunk |= 0;
+
+ // Transform the chunk into something else.
+ const data = chunk.toString(16);
+
+ // Push the data onto the readable queue.
+ callback(null, '0'.repeat(data.length % 2) + data);
+ }
+});
+
+myTransform.setEncoding('ascii');
+myTransform.on('data', (chunk) => console.log(chunk));
+
+myTransform.write(1);
+ // Prints: 01
+myTransform.write(10);
+ // Prints: 0a
+myTransform.write(100);
+ // Prints: 64
+```
+
+### Implementing a Transform Stream
+
+A [Transform][] stream is a [Duplex][] stream where the output is computed
+in some way from the input. Examples include [zlib][] streams or [crypto][]
+streams that compress, encrypt, or decrypt data.
+
+*Note*: There is no requirement that the output be the same size as the input,
+the same number of chunks, or arrive at the same time. For example, a
+Hash stream will only ever have a single chunk of output which is
+provided when the input is ended. A `zlib` stream will produce output
+that is either much smaller or much larger than its input.
+
+The `stream.Transform` class is extended to implement a [Transform][] stream.
+
+The `stream.Transform` class prototypically inherits from `stream.Duplex` and
+implements its own versions of the `writable._write()` and `readable._read()`
+methods. Custom Transform implementations *must* implement the
+[`transform._transform()`][stream-_transform] method and *may* also implement
+the [`transform._flush()`][stream-_flush] method.
+
+*Note*: Care must be taken when using Transform streams in that data written
+to the stream can cause the Writable side of the stream to become paused if
+the output on the Readable side is not consumed.
+
+#### new stream.Transform([options])
+
+* `options` {Object} Passed to both Writable and Readable
+ constructors. Also has the following fields:
+ * `transform` {Function} Implementation for the
+ [`stream._transform()`][stream-_transform] method.
+ * `flush` {Function} Implementation for the [`stream._flush()`][stream-_flush]
+ method.
+
+For example:
+
+```js
+const Transform = require('stream').Transform;
+
+class MyTransform extends Transform {
+ constructor(options) {
+ super(options);
+ }
+}
+```
+
+Or, when using pre-ES6 style constructors:
+
+```js
+const Transform = require('stream').Transform;
+const util = require('util');
+
+function MyTransform(options) {
+ if (!(this instanceof MyTransform))
+ return new MyTransform(options);
+ Transform.call(this, options);
+}
+util.inherits(MyTransform, Transform);
+```
+
+Or, using the Simplified Constructor approach:
+
+```js
+const Transform = require('stream').Transform;
+
+const myTransform = new Transform({
+ transform(chunk, encoding, callback) {
+ // ...
+ }
+});
+```
+
+#### Events: 'finish' and 'end'
+
+The [`'finish'`][] and [`'end'`][] events are from the `stream.Writable`
+and `stream.Readable` classes, respectively. The `'finish'` event is emitted
+after [`stream.end()`][stream-end] is called and all chunks have been processed
+by [`stream._transform()`][stream-_transform]. The `'end'` event is emitted
+after all data has been output, which occurs after the callback in
+[`transform._flush()`][stream-_flush] has been called.
+
+#### transform.\_flush(callback)
+
+* `callback` {Function} A callback function (optionally with an error
+ argument) to be called when remaining data has been flushed.
+
+*Note*: **This function MUST NOT be called by application code directly.** It
+should be implemented by child classes, and called only by the internal Readable
+class methods only.
+
+In some cases, a transform operation may need to emit an additional bit of
+data at the end of the stream. For example, a `zlib` compression stream will
+store an amount of internal state used to optimally compress the output. When
+the stream ends, however, that additional data needs to be flushed so that the
+compressed data will be complete.
+
+Custom [Transform][] implementations *may* implement the `transform._flush()`
+method. This will be called when there is no more written data to be consumed,
+but before the [`'end'`][] event is emitted signaling the end of the
+[Readable][] stream.
+
+Within the `transform._flush()` implementation, the `readable.push()` method
+may be called zero or more times, as appropriate. The `callback` function must
+be called when the flush operation is complete.
+
+The `transform._flush()` method is prefixed with an underscore because it is
+internal to the class that defines it, and should never be called directly by
+user programs.
+
+#### transform.\_transform(chunk, encoding, callback)
+
+* `chunk` {Buffer|String} The chunk to be transformed. Will **always**
+ be a buffer unless the `decodeStrings` option was set to `false`.
+* `encoding` {String} If the chunk is a string, then this is the
+ encoding type. If chunk is a buffer, then this is the special
+ value - 'buffer', ignore it in this case.
+* `callback` {Function} A callback function (optionally with an error
+ argument and data) to be called after the supplied `chunk` has been
+ processed.
+
+*Note*: **This function MUST NOT be called by application code directly.** It
+should be implemented by child classes, and called only by the internal Readable
+class methods only.
+
+All Transform stream implementations must provide a `_transform()`
+method to accept input and produce output. The `transform._transform()`
+implementation handles the bytes being written, computes an output, then passes
+that output off to the readable portion using the `readable.push()` method.
+
+The `transform.push()` method may be called zero or more times to generate
+output from a single input chunk, depending on how much is to be output
+as a result of the chunk.
+
+It is possible that no output is generated from any given chunk of input data.
+
+The `callback` function must be called only when the current chunk is completely
+consumed. The first argument passed to the `callback` must be an `Error` object
+if an error occurred while processing the input or `null` otherwise. If a second
+argument is passed to the `callback`, it will be forwarded on to the
+`readable.push()` method. In other words the following are equivalent:
+
+```js
+transform.prototype._transform = function (data, encoding, callback) {
+ this.push(data);
+ callback();
+};
+
+transform.prototype._transform = function (data, encoding, callback) {
+ callback(null, data);
+};
+```
+
+The `transform._transform()` method is prefixed with an underscore because it
+is internal to the class that defines it, and should never be called directly by
+user programs.
+
+#### Class: stream.PassThrough
+
+The `stream.PassThrough` class is a trivial implementation of a [Transform][]
+stream that simply passes the input bytes across to the output. Its purpose is
+primarily for examples and testing, but there are some use cases where
+`stream.PassThrough` is useful as a building block for novel sorts of streams.
+
+## Additional Notes
+
+<!--type=misc-->
+
+### Compatibility with Older Node.js Versions
+
+<!--type=misc-->
+
+In versions of Node.js prior to v0.10, the Readable stream interface was
+simpler, but also less powerful and less useful.
+
+* Rather than waiting for calls the [`stream.read()`][stream-read] method,
+ [`'data'`][] events would begin emitting immediately. Applications that
+ would need to perform some amount of work to decide how to handle data
+ were required to store read data into buffers so the data would not be lost.
+* The [`stream.pause()`][stream-pause] method was advisory, rather than
+ guaranteed. This meant that it was still necessary to be prepared to receive
+ [`'data'`][] events *even when the stream was in a paused state*.
+
+In Node.js v0.10, the [Readable][] class was added. For backwards compatibility
+with older Node.js programs, Readable streams switch into "flowing mode" when a
+[`'data'`][] event handler is added, or when the
+[`stream.resume()`][stream-resume] method is called. The effect is that, even
+when not using the new [`stream.read()`][stream-read] method and
+[`'readable'`][] event, it is no longer necessary to worry about losing
+[`'data'`][] chunks.
+
+While most applications will continue to function normally, this introduces an
+edge case in the following conditions:
+
+* No [`'data'`][] event listener is added.
+* The [`stream.resume()`][stream-resume] method is never called.
+* The stream is not piped to any writable destination.
+
+For example, consider the following code:
+
+```js
+// WARNING! BROKEN!
+net.createServer((socket) => {
+
+ // we add an 'end' method, but never consume the data
+ socket.on('end', () => {
+ // It will never get here.
+ socket.end('The message was received but was not processed.\n');
+ });
+
+}).listen(1337);
+```
+
+In versions of Node.js prior to v0.10, the incoming message data would be
+simply discarded. However, in Node.js v0.10 and beyond, the socket remains
+paused forever.
+
+The workaround in this situation is to call the
+[`stream.resume()`][stream-resume] method to begin the flow of data:
+
+```js
+// Workaround
+net.createServer((socket) => {
+
+ socket.on('end', () => {
+ socket.end('The message was received but was not processed.\n');
+ });
+
+ // start the flow of data, discarding it.
+ socket.resume();
+
+}).listen(1337);
+```
+
+In addition to new Readable streams switching into flowing mode,
+pre-v0.10 style streams can be wrapped in a Readable class using the
+[`readable.wrap()`][`stream.wrap()`] method.
+
+
+### `readable.read(0)`
+
+There are some cases where it is necessary to trigger a refresh of the
+underlying readable stream mechanisms, without actually consuming any
+data. In such cases, it is possible to call `readable.read(0)`, which will
+always return `null`.
+
+If the internal read buffer is below the `highWaterMark`, and the
+stream is not currently reading, then calling `stream.read(0)` will trigger
+a low-level [`stream._read()`][stream-_read] call.
+
+While most applications will almost never need to do this, there are
+situations within Node.js where this is done, particularly in the
+Readable stream class internals.
+
+### `readable.push('')`
+
+Use of `readable.push('')` is not recommended.
+
+Pushing a zero-byte string or `Buffer` to a stream that is not in object mode
+has an interesting side effect. Because it *is* a call to
+[`readable.push()`][stream-push], the call will end the reading process.
+However, because the argument is an empty string, no data is added to the
+readable buffer so there is nothing for a user to consume.
+
+[`'data'`]: #stream_event_data
+[`'drain'`]: #stream_event_drain
+[`'end'`]: #stream_event_end
+[`'finish'`]: #stream_event_finish
+[`'readable'`]: #stream_event_readable
+[`buf.toString(encoding)`]: https://nodejs.org/docs/v6.3.1/api/buffer.html#buffer_buf_tostring_encoding_start_end
+[`EventEmitter`]: https://nodejs.org/docs/v6.3.1/api/events.html#events_class_eventemitter
+[`process.stderr`]: https://nodejs.org/docs/v6.3.1/api/process.html#process_process_stderr
+[`process.stdin`]: https://nodejs.org/docs/v6.3.1/api/process.html#process_process_stdin
+[`process.stdout`]: https://nodejs.org/docs/v6.3.1/api/process.html#process_process_stdout
+[`stream.cork()`]: #stream_writable_cork
+[`stream.pipe()`]: #stream_readable_pipe_destination_options
+[`stream.uncork()`]: #stream_writable_uncork
+[`stream.unpipe()`]: #stream_readable_unpipe_destination
+[`stream.wrap()`]: #stream_readable_wrap_stream
+[`tls.CryptoStream`]: https://nodejs.org/docs/v6.3.1/api/tls.html#tls_class_cryptostream
+[API for Stream Consumers]: #stream_api_for_stream_consumers
+[API for Stream Implementers]: #stream_api_for_stream_implementers
+[child process stdin]: https://nodejs.org/docs/v6.3.1/api/child_process.html#child_process_child_stdin
+[child process stdout and stderr]: https://nodejs.org/docs/v6.3.1/api/child_process.html#child_process_child_stdout
+[Compatibility]: #stream_compatibility_with_older_node_js_versions
+[crypto]: crypto.html
+[Duplex]: #stream_class_stream_duplex
+[fs read streams]: https://nodejs.org/docs/v6.3.1/api/fs.html#fs_class_fs_readstream
+[fs write streams]: https://nodejs.org/docs/v6.3.1/api/fs.html#fs_class_fs_writestream
+[`fs.createReadStream()`]: https://nodejs.org/docs/v6.3.1/api/fs.html#fs_fs_createreadstream_path_options
+[`fs.createWriteStream()`]: https://nodejs.org/docs/v6.3.1/api/fs.html#fs_fs_createwritestream_path_options
+[`net.Socket`]: https://nodejs.org/docs/v6.3.1/api/net.html#net_class_net_socket
+[`zlib.createDeflate()`]: https://nodejs.org/docs/v6.3.1/api/zlib.html#zlib_zlib_createdeflate_options
+[HTTP requests, on the client]: https://nodejs.org/docs/v6.3.1/api/http.html#http_class_http_clientrequest
+[HTTP responses, on the server]: https://nodejs.org/docs/v6.3.1/api/http.html#http_class_http_serverresponse
+[http-incoming-message]: https://nodejs.org/docs/v6.3.1/api/http.html#http_class_http_incomingmessage
+[Object mode]: #stream_object_mode
+[Readable]: #stream_class_stream_readable
+[SimpleProtocol v2]: #stream_example_simpleprotocol_parser_v2
+[stream-_flush]: #stream_transform_flush_callback
+[stream-_read]: #stream_readable_read_size_1
+[stream-_transform]: #stream_transform_transform_chunk_encoding_callback
+[stream-_write]: #stream_writable_write_chunk_encoding_callback_1
+[stream-_writev]: #stream_writable_writev_chunks_callback
+[stream-end]: #stream_writable_end_chunk_encoding_callback
+[stream-pause]: #stream_readable_pause
+[stream-push]: #stream_readable_push_chunk_encoding
+[stream-read]: #stream_readable_read_size
+[stream-resume]: #stream_readable_resume
+[stream-write]: #stream_writable_write_chunk_encoding_callback
+[TCP sockets]: https://nodejs.org/docs/v6.3.1/api/net.html#net_class_net_socket
+[Transform]: #stream_class_stream_transform
+[Writable]: #stream_class_stream_writable
+[zlib]: zlib.html
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
new file mode 100644
index 0000000..83275f1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
@@ -0,0 +1,60 @@
+# streams WG Meeting 2015-01-30
+
+## Links
+
+* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg
+* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106
+* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/
+
+## Agenda
+
+Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting.
+
+* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105)
+* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101)
+* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102)
+* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99)
+
+## Minutes
+
+### adopt a charter
+
+* group: +1's all around
+
+### What versioning scheme should be adopted?
+* group: +1’s 3.0.0
+* domenic+group: pulling in patches from other sources where appropriate
+* mikeal: version independently, suggesting versions for io.js
+* mikeal+domenic: work with TC to notify in advance of changes
+simpler stream creation
+
+### streamline creation of streams
+* sam: streamline creation of streams
+* domenic: nice simple solution posted
+ but, we lose the opportunity to change the model
+ may not be backwards incompatible (double check keys)
+
+ **action item:** domenic will check
+
+### remove implicit flowing of streams on(‘data’)
+* add isFlowing / isPaused
+* mikeal: worrying that we’re documenting polyfill methods – confuses users
+* domenic: more reflective API is probably good, with warning labels for users
+* new section for mad scientists (reflective stream access)
+* calvin: name the “third stateâ€
+* mikeal: maybe borrow the name from whatwg?
+* domenic: we’re missing the “third stateâ€
+* consensus: kind of difficult to name the third state
+* mikeal: figure out differences in states / compat
+* mathias: always flow on data – eliminates third state
+ * explore what it breaks
+
+**action items:**
+* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream)
+* ask rod/build for infrastructure
+* **chris**: explore the “flow on data†approach
+* add isPaused/isFlowing
+* add new docs section
+* move isPaused to that section
+
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/duplex.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/duplex.js
new file mode 100644
index 0000000..ca807af
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/duplex.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_duplex.js")
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/_stream_duplex.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/_stream_duplex.js
new file mode 100644
index 0000000..736693b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/_stream_duplex.js
@@ -0,0 +1,75 @@
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+
+'use strict';
+
+/*<replacement>*/
+
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) {
+ keys.push(key);
+ }return keys;
+};
+/*</replacement>*/
+
+module.exports = Duplex;
+
+/*<replacement>*/
+var processNextTick = require('process-nextick-args');
+/*</replacement>*/
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var Readable = require('./_stream_readable');
+var Writable = require('./_stream_writable');
+
+util.inherits(Duplex, Readable);
+
+var keys = objectKeys(Writable.prototype);
+for (var v = 0; v < keys.length; v++) {
+ var method = keys[v];
+ if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
+}
+
+function Duplex(options) {
+ if (!(this instanceof Duplex)) return new Duplex(options);
+
+ Readable.call(this, options);
+ Writable.call(this, options);
+
+ if (options && options.readable === false) this.readable = false;
+
+ if (options && options.writable === false) this.writable = false;
+
+ this.allowHalfOpen = true;
+ if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
+
+ this.once('end', onend);
+}
+
+// the no-half-open enforcer
+function onend() {
+ // if we allow half-open state, or if the writable side ended,
+ // then we're ok.
+ if (this.allowHalfOpen || this._writableState.ended) return;
+
+ // no more data can be written.
+ // But allow more writes to happen in this tick.
+ processNextTick(onEndNT, this);
+}
+
+function onEndNT(self) {
+ self.end();
+}
+
+function forEach(xs, f) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ f(xs[i], i);
+ }
+} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/_stream_passthrough.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/_stream_passthrough.js
new file mode 100644
index 0000000..d06f71f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/_stream_passthrough.js
@@ -0,0 +1,26 @@
+// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+
+'use strict';
+
+module.exports = PassThrough;
+
+var Transform = require('./_stream_transform');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(PassThrough, Transform);
+
+function PassThrough(options) {
+ if (!(this instanceof PassThrough)) return new PassThrough(options);
+
+ Transform.call(this, options);
+}
+
+PassThrough.prototype._transform = function (chunk, encoding, cb) {
+ cb(null, chunk);
+}; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/_stream_readable.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/_stream_readable.js
new file mode 100644
index 0000000..208cc65
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/_stream_readable.js
@@ -0,0 +1,937 @@
+'use strict';
+
+module.exports = Readable;
+
+/*<replacement>*/
+var processNextTick = require('process-nextick-args');
+/*</replacement>*/
+
+/*<replacement>*/
+var isArray = require('isarray');
+/*</replacement>*/
+
+Readable.ReadableState = ReadableState;
+
+/*<replacement>*/
+var EE = require('events').EventEmitter;
+
+var EElistenerCount = function (emitter, type) {
+ return emitter.listeners(type).length;
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream;
+(function () {
+ try {
+ Stream = require('st' + 'ream');
+ } catch (_) {} finally {
+ if (!Stream) Stream = require('events').EventEmitter;
+ }
+})();
+/*</replacement>*/
+
+var Buffer = require('buffer').Buffer;
+/*<replacement>*/
+var bufferShim = require('buffer-shims');
+/*</replacement>*/
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var debugUtil = require('util');
+var debug = void 0;
+if (debugUtil && debugUtil.debuglog) {
+ debug = debugUtil.debuglog('stream');
+} else {
+ debug = function () {};
+}
+/*</replacement>*/
+
+var BufferList = require('./internal/streams/BufferList');
+var StringDecoder;
+
+util.inherits(Readable, Stream);
+
+function prependListener(emitter, event, fn) {
+ if (typeof emitter.prependListener === 'function') {
+ return emitter.prependListener(event, fn);
+ } else {
+ // This is a hack to make sure that our error handler is attached before any
+ // userland ones. NEVER DO THIS. This is here only because this code needs
+ // to continue to work with older versions of Node.js that do not include
+ // the prependListener() method. The goal is to eventually remove this hack.
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+ }
+}
+
+var Duplex;
+function ReadableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+ this.objectMode = !!options.objectMode;
+
+ if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
+
+ // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+ var hwm = options.highWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+ this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = ~ ~this.highWaterMark;
+
+ // A linked list is used to store data chunks instead of an array because the
+ // linked list can remove elements from the beginning faster than
+ // array.shift()
+ this.buffer = new BufferList();
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = null;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+ this.resumeScheduled = false;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // when piping, we only care about 'readable' events that happen
+ // after read()ing all the bytes and not getting any pushback.
+ this.ranOut = false;
+
+ // the number of writers that are awaiting a drain event in .pipe()s
+ this.awaitDrain = 0;
+
+ // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
+
+ this.decoder = null;
+ this.encoding = null;
+ if (options.encoding) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
+ }
+}
+
+var Duplex;
+function Readable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ if (!(this instanceof Readable)) return new Readable(options);
+
+ this._readableState = new ReadableState(options, this);
+
+ // legacy
+ this.readable = true;
+
+ if (options && typeof options.read === 'function') this._read = options.read;
+
+ Stream.call(this);
+}
+
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function (chunk, encoding) {
+ var state = this._readableState;
+
+ if (!state.objectMode && typeof chunk === 'string') {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = bufferShim.from(chunk, encoding);
+ encoding = '';
+ }
+ }
+
+ return readableAddChunk(this, state, chunk, encoding, false);
+};
+
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function (chunk) {
+ var state = this._readableState;
+ return readableAddChunk(this, state, chunk, '', true);
+};
+
+Readable.prototype.isPaused = function () {
+ return this._readableState.flowing === false;
+};
+
+function readableAddChunk(stream, state, chunk, encoding, addToFront) {
+ var er = chunkInvalid(state, chunk);
+ if (er) {
+ stream.emit('error', er);
+ } else if (chunk === null) {
+ state.reading = false;
+ onEofChunk(stream, state);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (state.ended && !addToFront) {
+ var e = new Error('stream.push() after EOF');
+ stream.emit('error', e);
+ } else if (state.endEmitted && addToFront) {
+ var _e = new Error('stream.unshift() after end event');
+ stream.emit('error', _e);
+ } else {
+ var skipAdd;
+ if (state.decoder && !addToFront && !encoding) {
+ chunk = state.decoder.write(chunk);
+ skipAdd = !state.objectMode && chunk.length === 0;
+ }
+
+ if (!addToFront) state.reading = false;
+
+ // Don't add to the buffer if we've decoded to an empty string chunk and
+ // we're not in object mode
+ if (!skipAdd) {
+ // if we want the data now, just emit it.
+ if (state.flowing && state.length === 0 && !state.sync) {
+ stream.emit('data', chunk);
+ stream.read(0);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
+
+ if (state.needReadable) emitReadable(stream);
+ }
+ }
+
+ maybeReadMore(stream, state);
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
+
+ return needMoreData(state);
+}
+
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes. This is to work around cases where hwm=0,
+// such as the repl. Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+ return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
+}
+
+// backwards compatibility.
+Readable.prototype.setEncoding = function (enc) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
+ return this;
+};
+
+// Don't raise the hwm > 8MB
+var MAX_HWM = 0x800000;
+function computeNewHighWaterMark(n) {
+ if (n >= MAX_HWM) {
+ n = MAX_HWM;
+ } else {
+ // Get the next highest power of 2 to prevent increasing hwm excessively in
+ // tiny amounts
+ n--;
+ n |= n >>> 1;
+ n |= n >>> 2;
+ n |= n >>> 4;
+ n |= n >>> 8;
+ n |= n >>> 16;
+ n++;
+ }
+ return n;
+}
+
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function howMuchToRead(n, state) {
+ if (n <= 0 || state.length === 0 && state.ended) return 0;
+ if (state.objectMode) return 1;
+ if (n !== n) {
+ // Only flow one buffer at a time
+ if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
+ }
+ // If we're asking for more than the current hwm, then raise the hwm.
+ if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
+ if (n <= state.length) return n;
+ // Don't have enough
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ }
+ return state.length;
+}
+
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function (n) {
+ debug('read', n);
+ n = parseInt(n, 10);
+ var state = this._readableState;
+ var nOrig = n;
+
+ if (n !== 0) state.emittedReadable = false;
+
+ // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+ if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
+ return null;
+ }
+
+ n = howMuchToRead(n, state);
+
+ // if we've ended, and we're now clear, then finish it up.
+ if (n === 0 && state.ended) {
+ if (state.length === 0) endReadable(this);
+ return null;
+ }
+
+ // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
+
+ // if we need a readable event, then we need to do some reading.
+ var doRead = state.needReadable;
+ debug('need readable', doRead);
+
+ // if we currently have less than the highWaterMark, then also read some
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
+ doRead = true;
+ debug('length less than watermark', doRead);
+ }
+
+ // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+ if (state.ended || state.reading) {
+ doRead = false;
+ debug('reading or ended', doRead);
+ } else if (doRead) {
+ debug('do read');
+ state.reading = true;
+ state.sync = true;
+ // if the length is currently zero, then we *need* a readable event.
+ if (state.length === 0) state.needReadable = true;
+ // call internal read method
+ this._read(state.highWaterMark);
+ state.sync = false;
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (!state.reading) n = howMuchToRead(nOrig, state);
+ }
+
+ var ret;
+ if (n > 0) ret = fromList(n, state);else ret = null;
+
+ if (ret === null) {
+ state.needReadable = true;
+ n = 0;
+ } else {
+ state.length -= n;
+ }
+
+ if (state.length === 0) {
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (!state.ended) state.needReadable = true;
+
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended) endReadable(this);
+ }
+
+ if (ret !== null) this.emit('data', ret);
+
+ return ret;
+};
+
+function chunkInvalid(state, chunk) {
+ var er = null;
+ if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ return er;
+}
+
+function onEofChunk(stream, state) {
+ if (state.ended) return;
+ if (state.decoder) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? 1 : chunk.length;
+ }
+ }
+ state.ended = true;
+
+ // emit 'readable' now to make sure it gets picked up.
+ emitReadable(stream);
+}
+
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+ var state = stream._readableState;
+ state.needReadable = false;
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);
+ }
+}
+
+function emitReadable_(stream) {
+ debug('emit readable');
+ stream.emit('readable');
+ flow(stream);
+}
+
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ processNextTick(maybeReadMore_, stream, state);
+ }
+}
+
+function maybeReadMore_(stream, state) {
+ var len = state.length;
+ while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length)
+ // didn't get any data, stop spinning.
+ break;else len = state.length;
+ }
+ state.readingMore = false;
+}
+
+// abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = function (n) {
+ this.emit('error', new Error('not implemented'));
+};
+
+Readable.prototype.pipe = function (dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
+
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+ default:
+ state.pipes.push(dest);
+ break;
+ }
+ state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
+
+ var endFn = doEnd ? onend : cleanup;
+ if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn);
+
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable) {
+ debug('onunpipe');
+ if (readable === src) {
+ cleanup();
+ }
+ }
+
+ function onend() {
+ debug('onend');
+ dest.end();
+ }
+
+ // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+
+ var cleanedUp = false;
+ function cleanup() {
+ debug('cleanup');
+ // cleanup event handlers once the pipe is broken
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', cleanup);
+ src.removeListener('data', ondata);
+
+ cleanedUp = true;
+
+ // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+ if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
+ }
+
+ // If the user pushes more data while we're writing to dest then we'll end up
+ // in ondata again. However, we only want to increase awaitDrain once because
+ // dest will only emit one 'drain' event for the multiple writes.
+ // => Introduce a guard on increasing awaitDrain.
+ var increasedAwaitDrain = false;
+ src.on('data', ondata);
+ function ondata(chunk) {
+ debug('ondata');
+ increasedAwaitDrain = false;
+ var ret = dest.write(chunk);
+ if (false === ret && !increasedAwaitDrain) {
+ // If the user unpiped during `dest.write()`, it is possible
+ // to get stuck in a permanently paused state if that write
+ // also returned false.
+ // => Check whether `dest` is still a piping destination.
+ if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
+ debug('false write response, pause', src._readableState.awaitDrain);
+ src._readableState.awaitDrain++;
+ increasedAwaitDrain = true;
+ }
+ src.pause();
+ }
+ }
+
+ // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+ function onerror(er) {
+ debug('onerror', er);
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
+ }
+
+ // Make sure our error handler is attached before userland ones.
+ prependListener(dest, 'error', onerror);
+
+ // Both close and finish should trigger unpipe, but only once.
+ function onclose() {
+ dest.removeListener('finish', onfinish);
+ unpipe();
+ }
+ dest.once('close', onclose);
+ function onfinish() {
+ debug('onfinish');
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+ dest.once('finish', onfinish);
+
+ function unpipe() {
+ debug('unpipe');
+ src.unpipe(dest);
+ }
+
+ // tell the dest that it's being piped to
+ dest.emit('pipe', src);
+
+ // start the flow if it hasn't been started already.
+ if (!state.flowing) {
+ debug('pipe resume');
+ src.resume();
+ }
+
+ return dest;
+};
+
+function pipeOnDrain(src) {
+ return function () {
+ var state = src._readableState;
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain) state.awaitDrain--;
+ if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
+ state.flowing = true;
+ flow(src);
+ }
+ };
+}
+
+Readable.prototype.unpipe = function (dest) {
+ var state = this._readableState;
+
+ // if we're not piping anywhere, then do nothing.
+ if (state.pipesCount === 0) return this;
+
+ // just one destination. most common case.
+ if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ if (dest && dest !== state.pipes) return this;
+
+ if (!dest) dest = state.pipes;
+
+ // got a match.
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+ if (dest) dest.emit('unpipe', this);
+ return this;
+ }
+
+ // slow case. multiple pipe destinations.
+
+ if (!dest) {
+ // remove all.
+ var dests = state.pipes;
+ var len = state.pipesCount;
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+
+ for (var _i = 0; _i < len; _i++) {
+ dests[_i].emit('unpipe', this);
+ }return this;
+ }
+
+ // try to find the right one.
+ var i = indexOf(state.pipes, dest);
+ if (i === -1) return this;
+
+ state.pipes.splice(i, 1);
+ state.pipesCount -= 1;
+ if (state.pipesCount === 1) state.pipes = state.pipes[0];
+
+ dest.emit('unpipe', this);
+
+ return this;
+};
+
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function (ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
+
+ if (ev === 'data') {
+ // Start flowing on next tick if stream isn't explicitly paused
+ if (this._readableState.flowing !== false) this.resume();
+ } else if (ev === 'readable') {
+ var state = this._readableState;
+ if (!state.endEmitted && !state.readableListening) {
+ state.readableListening = state.needReadable = true;
+ state.emittedReadable = false;
+ if (!state.reading) {
+ processNextTick(nReadingNextTick, this);
+ } else if (state.length) {
+ emitReadable(this, state);
+ }
+ }
+ }
+
+ return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
+
+function nReadingNextTick(self) {
+ debug('readable nexttick read 0');
+ self.read(0);
+}
+
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function () {
+ var state = this._readableState;
+ if (!state.flowing) {
+ debug('resume');
+ state.flowing = true;
+ resume(this, state);
+ }
+ return this;
+};
+
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ processNextTick(resume_, stream, state);
+ }
+}
+
+function resume_(stream, state) {
+ if (!state.reading) {
+ debug('resume read 0');
+ stream.read(0);
+ }
+
+ state.resumeScheduled = false;
+ state.awaitDrain = 0;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing && !state.reading) stream.read(0);
+}
+
+Readable.prototype.pause = function () {
+ debug('call pause flowing=%j', this._readableState.flowing);
+ if (false !== this._readableState.flowing) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+ return this;
+};
+
+function flow(stream) {
+ var state = stream._readableState;
+ debug('flow', state.flowing);
+ while (state.flowing && stream.read() !== null) {}
+}
+
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function (stream) {
+ var state = this._readableState;
+ var paused = false;
+
+ var self = this;
+ stream.on('end', function () {
+ debug('wrapped end');
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) self.push(chunk);
+ }
+
+ self.push(null);
+ });
+
+ stream.on('data', function (chunk) {
+ debug('wrapped data');
+ if (state.decoder) chunk = state.decoder.write(chunk);
+
+ // don't skip over falsy values in objectMode
+ if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
+
+ var ret = self.push(chunk);
+ if (!ret) {
+ paused = true;
+ stream.pause();
+ }
+ });
+
+ // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+ for (var i in stream) {
+ if (this[i] === undefined && typeof stream[i] === 'function') {
+ this[i] = function (method) {
+ return function () {
+ return stream[method].apply(stream, arguments);
+ };
+ }(i);
+ }
+ }
+
+ // proxy certain important events.
+ var events = ['error', 'close', 'destroy', 'pause', 'resume'];
+ forEach(events, function (ev) {
+ stream.on(ev, self.emit.bind(self, ev));
+ });
+
+ // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+ self._read = function (n) {
+ debug('wrapped _read', n);
+ if (paused) {
+ paused = false;
+ stream.resume();
+ }
+ };
+
+ return self;
+};
+
+// exposed for testing purposes only.
+Readable._fromList = fromList;
+
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromList(n, state) {
+ // nothing buffered
+ if (state.length === 0) return null;
+
+ var ret;
+ if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
+ // read it all, truncate the list
+ if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
+ state.buffer.clear();
+ } else {
+ // read part of list
+ ret = fromListPartial(n, state.buffer, state.decoder);
+ }
+
+ return ret;
+}
+
+// Extracts only enough buffered data to satisfy the amount requested.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromListPartial(n, list, hasStrings) {
+ var ret;
+ if (n < list.head.data.length) {
+ // slice is the same for buffers and strings
+ ret = list.head.data.slice(0, n);
+ list.head.data = list.head.data.slice(n);
+ } else if (n === list.head.data.length) {
+ // first chunk is a perfect match
+ ret = list.shift();
+ } else {
+ // result spans more than one buffer
+ ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
+ }
+ return ret;
+}
+
+// Copies a specified amount of characters from the list of buffered data
+// chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBufferString(n, list) {
+ var p = list.head;
+ var c = 1;
+ var ret = p.data;
+ n -= ret.length;
+ while (p = p.next) {
+ var str = p.data;
+ var nb = n > str.length ? str.length : n;
+ if (nb === str.length) ret += str;else ret += str.slice(0, n);
+ n -= nb;
+ if (n === 0) {
+ if (nb === str.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = str.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+// Copies a specified amount of bytes from the list of buffered data chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBuffer(n, list) {
+ var ret = bufferShim.allocUnsafe(n);
+ var p = list.head;
+ var c = 1;
+ p.data.copy(ret);
+ n -= p.data.length;
+ while (p = p.next) {
+ var buf = p.data;
+ var nb = n > buf.length ? buf.length : n;
+ buf.copy(ret, ret.length - n, 0, nb);
+ n -= nb;
+ if (n === 0) {
+ if (nb === buf.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = buf.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+function endReadable(stream) {
+ var state = stream._readableState;
+
+ // If we get here before consuming all the bytes, then that is a
+ // bug in node. Should never happen.
+ if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
+
+ if (!state.endEmitted) {
+ state.ended = true;
+ processNextTick(endReadableNT, state, stream);
+ }
+}
+
+function endReadableNT(state, stream) {
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
+}
+
+function forEach(xs, f) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ f(xs[i], i);
+ }
+}
+
+function indexOf(xs, x) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) return i;
+ }
+ return -1;
+} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/_stream_transform.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/_stream_transform.js
new file mode 100644
index 0000000..dbc996e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/_stream_transform.js
@@ -0,0 +1,180 @@
+// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+
+'use strict';
+
+module.exports = Transform;
+
+var Duplex = require('./_stream_duplex');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(Transform, Duplex);
+
+function TransformState(stream) {
+ this.afterTransform = function (er, data) {
+ return afterTransform(stream, er, data);
+ };
+
+ this.needTransform = false;
+ this.transforming = false;
+ this.writecb = null;
+ this.writechunk = null;
+ this.writeencoding = null;
+}
+
+function afterTransform(stream, er, data) {
+ var ts = stream._transformState;
+ ts.transforming = false;
+
+ var cb = ts.writecb;
+
+ if (!cb) return stream.emit('error', new Error('no writecb in Transform class'));
+
+ ts.writechunk = null;
+ ts.writecb = null;
+
+ if (data !== null && data !== undefined) stream.push(data);
+
+ cb(er);
+
+ var rs = stream._readableState;
+ rs.reading = false;
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
+ stream._read(rs.highWaterMark);
+ }
+}
+
+function Transform(options) {
+ if (!(this instanceof Transform)) return new Transform(options);
+
+ Duplex.call(this, options);
+
+ this._transformState = new TransformState(this);
+
+ // when the writable side finishes, then flush out anything remaining.
+ var stream = this;
+
+ // start out asking for a readable event once data is transformed.
+ this._readableState.needReadable = true;
+
+ // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+ this._readableState.sync = false;
+
+ if (options) {
+ if (typeof options.transform === 'function') this._transform = options.transform;
+
+ if (typeof options.flush === 'function') this._flush = options.flush;
+ }
+
+ this.once('prefinish', function () {
+ if (typeof this._flush === 'function') this._flush(function (er) {
+ done(stream, er);
+ });else done(stream);
+ });
+}
+
+Transform.prototype.push = function (chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
+};
+
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = function (chunk, encoding, cb) {
+ throw new Error('Not implemented');
+};
+
+Transform.prototype._write = function (chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+ if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
+ }
+};
+
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function (n) {
+ var ts = this._transformState;
+
+ if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
+ ts.transforming = true;
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
+
+function done(stream, er) {
+ if (er) return stream.emit('error', er);
+
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+ var ws = stream._writableState;
+ var ts = stream._transformState;
+
+ if (ws.length) throw new Error('Calling transform done when ws.length != 0');
+
+ if (ts.transforming) throw new Error('Calling transform done when still transforming');
+
+ return stream.push(null);
+} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/_stream_writable.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/_stream_writable.js
new file mode 100644
index 0000000..ed5efcb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/_stream_writable.js
@@ -0,0 +1,526 @@
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, encoding, cb), and it'll handle all
+// the drain event emission and buffering.
+
+'use strict';
+
+module.exports = Writable;
+
+/*<replacement>*/
+var processNextTick = require('process-nextick-args');
+/*</replacement>*/
+
+/*<replacement>*/
+var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick;
+/*</replacement>*/
+
+Writable.WritableState = WritableState;
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var internalUtil = {
+ deprecate: require('util-deprecate')
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream;
+(function () {
+ try {
+ Stream = require('st' + 'ream');
+ } catch (_) {} finally {
+ if (!Stream) Stream = require('events').EventEmitter;
+ }
+})();
+/*</replacement>*/
+
+var Buffer = require('buffer').Buffer;
+/*<replacement>*/
+var bufferShim = require('buffer-shims');
+/*</replacement>*/
+
+util.inherits(Writable, Stream);
+
+function nop() {}
+
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+ this.next = null;
+}
+
+var Duplex;
+function WritableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // object stream flag to indicate whether or not this stream
+ // contains buffers or objects.
+ this.objectMode = !!options.objectMode;
+
+ if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
+
+ // the point at which write() starts returning false
+ // Note: 0 is a valid value, means that we always return false if
+ // the entire buffer is not flushed immediately on write()
+ var hwm = options.highWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+ this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = ~ ~this.highWaterMark;
+
+ this.needDrain = false;
+ // at the start of calling end()
+ this.ending = false;
+ // when end() has been called, and returned
+ this.ended = false;
+ // when 'finish' is emitted
+ this.finished = false;
+
+ // should we decode strings into buffers before passing to _write?
+ // this is here so that some node-core streams can optimize string
+ // handling at a lower level.
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // not an actual buffer we keep track of, but a measurement
+ // of how much we're waiting to get pushed to some underlying
+ // socket or file.
+ this.length = 0;
+
+ // a flag to see when we're in the middle of a write.
+ this.writing = false;
+
+ // when true all writes will be buffered until .uncork() call
+ this.corked = 0;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // a flag to know if we're processing previously buffered items, which
+ // may call the _write() callback in the same tick, so that we don't
+ // end up in an overlapped onwrite situation.
+ this.bufferProcessing = false;
+
+ // the callback that's passed to _write(chunk,cb)
+ this.onwrite = function (er) {
+ onwrite(stream, er);
+ };
+
+ // the callback that the user supplies to write(chunk,encoding,cb)
+ this.writecb = null;
+
+ // the amount that is being written when _write is called.
+ this.writelen = 0;
+
+ this.bufferedRequest = null;
+ this.lastBufferedRequest = null;
+
+ // number of pending user-supplied write callbacks
+ // this must be 0 before 'finish' can be emitted
+ this.pendingcb = 0;
+
+ // emit prefinish if the only thing we're waiting for is _write cbs
+ // This is relevant for synchronous Transform streams
+ this.prefinished = false;
+
+ // True if the error was already emitted and should not be thrown again
+ this.errorEmitted = false;
+
+ // count buffered requests
+ this.bufferedRequestCount = 0;
+
+ // allocate the first CorkedRequest, there is always
+ // one allocated and free to use, and we maintain at most two
+ this.corkedRequestsFree = new CorkedRequest(this);
+}
+
+WritableState.prototype.getBuffer = function writableStateGetBuffer() {
+ var current = this.bufferedRequest;
+ var out = [];
+ while (current) {
+ out.push(current);
+ current = current.next;
+ }
+ return out;
+};
+
+(function () {
+ try {
+ Object.defineProperty(WritableState.prototype, 'buffer', {
+ get: internalUtil.deprecate(function () {
+ return this.getBuffer();
+ }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.')
+ });
+ } catch (_) {}
+})();
+
+var Duplex;
+function Writable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ // Writable ctor is applied to Duplexes, though they're not
+ // instanceof Writable, they're instanceof Readable.
+ if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options);
+
+ this._writableState = new WritableState(options, this);
+
+ // legacy.
+ this.writable = true;
+
+ if (options) {
+ if (typeof options.write === 'function') this._write = options.write;
+
+ if (typeof options.writev === 'function') this._writev = options.writev;
+ }
+
+ Stream.call(this);
+}
+
+// Otherwise people can pipe Writable streams, which is just wrong.
+Writable.prototype.pipe = function () {
+ this.emit('error', new Error('Cannot pipe, not readable'));
+};
+
+function writeAfterEnd(stream, cb) {
+ var er = new Error('write after end');
+ // TODO: defer error events consistently everywhere, not just the cb
+ stream.emit('error', er);
+ processNextTick(cb, er);
+}
+
+// If we get something that is not a buffer, string, null, or undefined,
+// and we're not in objectMode, then that's an error.
+// Otherwise stream chunks are all considered to be of length=1, and the
+// watermarks determine how many objects to keep in the buffer, rather than
+// how many bytes or characters.
+function validChunk(stream, state, chunk, cb) {
+ var valid = true;
+ var er = false;
+ // Always throw error if a null is written
+ // if we are not in object mode then throw
+ // if it is not a buffer, string, or undefined.
+ if (chunk === null) {
+ er = new TypeError('May not write null values to stream');
+ } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ if (er) {
+ stream.emit('error', er);
+ processNextTick(cb, er);
+ valid = false;
+ }
+ return valid;
+}
+
+Writable.prototype.write = function (chunk, encoding, cb) {
+ var state = this._writableState;
+ var ret = false;
+
+ if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
+
+ if (typeof cb !== 'function') cb = nop;
+
+ if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) {
+ state.pendingcb++;
+ ret = writeOrBuffer(this, state, chunk, encoding, cb);
+ }
+
+ return ret;
+};
+
+Writable.prototype.cork = function () {
+ var state = this._writableState;
+
+ state.corked++;
+};
+
+Writable.prototype.uncork = function () {
+ var state = this._writableState;
+
+ if (state.corked) {
+ state.corked--;
+
+ if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
+ }
+};
+
+Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
+ // node::ParseEncoding() requires lower case.
+ if (typeof encoding === 'string') encoding = encoding.toLowerCase();
+ if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
+ this._writableState.defaultEncoding = encoding;
+ return this;
+};
+
+function decodeChunk(state, chunk, encoding) {
+ if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
+ chunk = bufferShim.from(chunk, encoding);
+ }
+ return chunk;
+}
+
+// if we're already writing something, then just put this
+// in the queue, and wait our turn. Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+function writeOrBuffer(stream, state, chunk, encoding, cb) {
+ chunk = decodeChunk(state, chunk, encoding);
+
+ if (Buffer.isBuffer(chunk)) encoding = 'buffer';
+ var len = state.objectMode ? 1 : chunk.length;
+
+ state.length += len;
+
+ var ret = state.length < state.highWaterMark;
+ // we must ensure that previous needDrain will not be reset to false.
+ if (!ret) state.needDrain = true;
+
+ if (state.writing || state.corked) {
+ var last = state.lastBufferedRequest;
+ state.lastBufferedRequest = new WriteReq(chunk, encoding, cb);
+ if (last) {
+ last.next = state.lastBufferedRequest;
+ } else {
+ state.bufferedRequest = state.lastBufferedRequest;
+ }
+ state.bufferedRequestCount += 1;
+ } else {
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ }
+
+ return ret;
+}
+
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+ state.writelen = len;
+ state.writecb = cb;
+ state.writing = true;
+ state.sync = true;
+ if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
+ state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+ --state.pendingcb;
+ if (sync) processNextTick(cb, er);else cb(er);
+
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+}
+
+function onwriteStateUpdate(state) {
+ state.writing = false;
+ state.writecb = null;
+ state.length -= state.writelen;
+ state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+ var state = stream._writableState;
+ var sync = state.sync;
+ var cb = state.writecb;
+
+ onwriteStateUpdate(state);
+
+ if (er) onwriteError(stream, state, sync, er, cb);else {
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(state);
+
+ if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
+ clearBuffer(stream, state);
+ }
+
+ if (sync) {
+ /*<replacement>*/
+ asyncWrite(afterWrite, stream, state, finished, cb);
+ /*</replacement>*/
+ } else {
+ afterWrite(stream, state, finished, cb);
+ }
+ }
+}
+
+function afterWrite(stream, state, finished, cb) {
+ if (!finished) onwriteDrain(stream, state);
+ state.pendingcb--;
+ cb();
+ finishMaybe(stream, state);
+}
+
+// Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+function onwriteDrain(stream, state) {
+ if (state.length === 0 && state.needDrain) {
+ state.needDrain = false;
+ stream.emit('drain');
+ }
+}
+
+// if there's something in the buffer waiting, then process it
+function clearBuffer(stream, state) {
+ state.bufferProcessing = true;
+ var entry = state.bufferedRequest;
+
+ if (stream._writev && entry && entry.next) {
+ // Fast case, write everything using _writev()
+ var l = state.bufferedRequestCount;
+ var buffer = new Array(l);
+ var holder = state.corkedRequestsFree;
+ holder.entry = entry;
+
+ var count = 0;
+ while (entry) {
+ buffer[count] = entry;
+ entry = entry.next;
+ count += 1;
+ }
+
+ doWrite(stream, state, true, state.length, buffer, '', holder.finish);
+
+ // doWrite is almost always async, defer these to save a bit of time
+ // as the hot path ends with doWrite
+ state.pendingcb++;
+ state.lastBufferedRequest = null;
+ if (holder.next) {
+ state.corkedRequestsFree = holder.next;
+ holder.next = null;
+ } else {
+ state.corkedRequestsFree = new CorkedRequest(state);
+ }
+ } else {
+ // Slow case, write chunks one-by-one
+ while (entry) {
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ entry = entry.next;
+ // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+ if (state.writing) {
+ break;
+ }
+ }
+
+ if (entry === null) state.lastBufferedRequest = null;
+ }
+
+ state.bufferedRequestCount = 0;
+ state.bufferedRequest = entry;
+ state.bufferProcessing = false;
+}
+
+Writable.prototype._write = function (chunk, encoding, cb) {
+ cb(new Error('not implemented'));
+};
+
+Writable.prototype._writev = null;
+
+Writable.prototype.end = function (chunk, encoding, cb) {
+ var state = this._writableState;
+
+ if (typeof chunk === 'function') {
+ cb = chunk;
+ chunk = null;
+ encoding = null;
+ } else if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
+
+ // .end() fully uncorks
+ if (state.corked) {
+ state.corked = 1;
+ this.uncork();
+ }
+
+ // ignore unnecessary end() calls.
+ if (!state.ending && !state.finished) endWritable(this, state, cb);
+};
+
+function needFinish(state) {
+ return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
+}
+
+function prefinish(stream, state) {
+ if (!state.prefinished) {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+}
+
+function finishMaybe(stream, state) {
+ var need = needFinish(state);
+ if (need) {
+ if (state.pendingcb === 0) {
+ prefinish(stream, state);
+ state.finished = true;
+ stream.emit('finish');
+ } else {
+ prefinish(stream, state);
+ }
+ }
+ return need;
+}
+
+function endWritable(stream, state, cb) {
+ state.ending = true;
+ finishMaybe(stream, state);
+ if (cb) {
+ if (state.finished) processNextTick(cb);else stream.once('finish', cb);
+ }
+ state.ended = true;
+ stream.writable = false;
+}
+
+// It seems a linked list but it is not
+// there will be only 2 of these for each stream
+function CorkedRequest(state) {
+ var _this = this;
+
+ this.next = null;
+ this.entry = null;
+
+ this.finish = function (err) {
+ var entry = _this.entry;
+ _this.entry = null;
+ while (entry) {
+ var cb = entry.callback;
+ state.pendingcb--;
+ cb(err);
+ entry = entry.next;
+ }
+ if (state.corkedRequestsFree) {
+ state.corkedRequestsFree.next = _this;
+ } else {
+ state.corkedRequestsFree = _this;
+ }
+ };
+} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/internal/streams/BufferList.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/internal/streams/BufferList.js
new file mode 100644
index 0000000..e4bfcf0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/lib/internal/streams/BufferList.js
@@ -0,0 +1,64 @@
+'use strict';
+
+var Buffer = require('buffer').Buffer;
+/*<replacement>*/
+var bufferShim = require('buffer-shims');
+/*</replacement>*/
+
+module.exports = BufferList;
+
+function BufferList() {
+ this.head = null;
+ this.tail = null;
+ this.length = 0;
+}
+
+BufferList.prototype.push = function (v) {
+ var entry = { data: v, next: null };
+ if (this.length > 0) this.tail.next = entry;else this.head = entry;
+ this.tail = entry;
+ ++this.length;
+};
+
+BufferList.prototype.unshift = function (v) {
+ var entry = { data: v, next: this.head };
+ if (this.length === 0) this.tail = entry;
+ this.head = entry;
+ ++this.length;
+};
+
+BufferList.prototype.shift = function () {
+ if (this.length === 0) return;
+ var ret = this.head.data;
+ if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
+ --this.length;
+ return ret;
+};
+
+BufferList.prototype.clear = function () {
+ this.head = this.tail = null;
+ this.length = 0;
+};
+
+BufferList.prototype.join = function (s) {
+ if (this.length === 0) return '';
+ var p = this.head;
+ var ret = '' + p.data;
+ while (p = p.next) {
+ ret += s + p.data;
+ }return ret;
+};
+
+BufferList.prototype.concat = function (n) {
+ if (this.length === 0) return bufferShim.alloc(0);
+ if (this.length === 1) return this.head.data;
+ var ret = bufferShim.allocUnsafe(n >>> 0);
+ var p = this.head;
+ var i = 0;
+ while (p) {
+ p.data.copy(ret, i);
+ i += p.data.length;
+ p = p.next;
+ }
+ return ret;
+}; \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/index.js
new file mode 100644
index 0000000..1cab4c0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/index.js
@@ -0,0 +1,108 @@
+'use strict';
+
+var buffer = require('buffer');
+var Buffer = buffer.Buffer;
+var SlowBuffer = buffer.SlowBuffer;
+var MAX_LEN = buffer.kMaxLength || 2147483647;
+exports.alloc = function alloc(size, fill, encoding) {
+ if (typeof Buffer.alloc === 'function') {
+ return Buffer.alloc(size, fill, encoding);
+ }
+ if (typeof encoding === 'number') {
+ throw new TypeError('encoding must not be number');
+ }
+ if (typeof size !== 'number') {
+ throw new TypeError('size must be a number');
+ }
+ if (size > MAX_LEN) {
+ throw new RangeError('size is too large');
+ }
+ var enc = encoding;
+ var _fill = fill;
+ if (_fill === undefined) {
+ enc = undefined;
+ _fill = 0;
+ }
+ var buf = new Buffer(size);
+ if (typeof _fill === 'string') {
+ var fillBuf = new Buffer(_fill, enc);
+ var flen = fillBuf.length;
+ var i = -1;
+ while (++i < size) {
+ buf[i] = fillBuf[i % flen];
+ }
+ } else {
+ buf.fill(_fill);
+ }
+ return buf;
+}
+exports.allocUnsafe = function allocUnsafe(size) {
+ if (typeof Buffer.allocUnsafe === 'function') {
+ return Buffer.allocUnsafe(size);
+ }
+ if (typeof size !== 'number') {
+ throw new TypeError('size must be a number');
+ }
+ if (size > MAX_LEN) {
+ throw new RangeError('size is too large');
+ }
+ return new Buffer(size);
+}
+exports.from = function from(value, encodingOrOffset, length) {
+ if (typeof Buffer.from === 'function' && (!global.Uint8Array || Uint8Array.from !== Buffer.from)) {
+ return Buffer.from(value, encodingOrOffset, length);
+ }
+ if (typeof value === 'number') {
+ throw new TypeError('"value" argument must not be a number');
+ }
+ if (typeof value === 'string') {
+ return new Buffer(value, encodingOrOffset);
+ }
+ if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
+ var offset = encodingOrOffset;
+ if (arguments.length === 1) {
+ return new Buffer(value);
+ }
+ if (typeof offset === 'undefined') {
+ offset = 0;
+ }
+ var len = length;
+ if (typeof len === 'undefined') {
+ len = value.byteLength - offset;
+ }
+ if (offset >= value.byteLength) {
+ throw new RangeError('\'offset\' is out of bounds');
+ }
+ if (len > value.byteLength - offset) {
+ throw new RangeError('\'length\' is out of bounds');
+ }
+ return new Buffer(value.slice(offset, offset + len));
+ }
+ if (Buffer.isBuffer(value)) {
+ var out = new Buffer(value.length);
+ value.copy(out, 0, 0, value.length);
+ return out;
+ }
+ if (value) {
+ if (Array.isArray(value) || (typeof ArrayBuffer !== 'undefined' && value.buffer instanceof ArrayBuffer) || 'length' in value) {
+ return new Buffer(value);
+ }
+ if (value.type === 'Buffer' && Array.isArray(value.data)) {
+ return new Buffer(value.data);
+ }
+ }
+
+ throw new TypeError('First argument must be a string, Buffer, ' + 'ArrayBuffer, Array, or array-like object.');
+}
+exports.allocUnsafeSlow = function allocUnsafeSlow(size) {
+ if (typeof Buffer.allocUnsafeSlow === 'function') {
+ return Buffer.allocUnsafeSlow(size);
+ }
+ if (typeof size !== 'number') {
+ throw new TypeError('size must be a number');
+ }
+ if (size >= MAX_LEN) {
+ throw new RangeError('size is too large');
+ }
+ return new SlowBuffer(size);
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/license.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/license.md
new file mode 100644
index 0000000..01cfaef
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/license.md
@@ -0,0 +1,19 @@
+# Copyright (c) 2016 Calvin Metcalf
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.**
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/package.json
new file mode 100644
index 0000000..63307f6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/package.json
@@ -0,0 +1,49 @@
+{
+ "name": "buffer-shims",
+ "version": "1.0.0",
+ "description": "some shims for node buffers",
+ "main": "index.js",
+ "scripts": {
+ "test": "tape test/*.js"
+ },
+ "files": [
+ "index.js"
+ ],
+ "license": "MIT",
+ "devDependencies": {
+ "tape": "^4.5.1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git@github.com:calvinmetcalf/buffer-shims.git"
+ },
+ "gitHead": "ea89b3857ab5b8203957922a84e9a48cf4c47e0a",
+ "bugs": {
+ "url": "https://github.com/calvinmetcalf/buffer-shims/issues"
+ },
+ "_id": "buffer-shims@1.0.0",
+ "_shasum": "9978ce317388c649ad8793028c3477ef044a8b51",
+ "_from": "buffer-shims@>=1.0.0 <2.0.0",
+ "_npmVersion": "3.8.6",
+ "_nodeVersion": "5.11.0",
+ "_npmUser": {
+ "name": "cwmma",
+ "email": "calvin.metcalf@gmail.com"
+ },
+ "dist": {
+ "shasum": "9978ce317388c649ad8793028c3477ef044a8b51",
+ "tarball": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "cwmma",
+ "email": "calvin.metcalf@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/buffer-shims-1.0.0.tgz_1462560889323_0.8640750856138766"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/readme.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/readme.md
new file mode 100644
index 0000000..7ea6475
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/buffer-shims/readme.md
@@ -0,0 +1,21 @@
+buffer-shims
+===
+
+functions to make sure the new buffer methods work in older browsers.
+
+```js
+var bufferShim = require('buffer-shims');
+bufferShim.from('foo');
+bufferShim.alloc(9, 'cafeface', 'hex');
+bufferShim.allocUnsafe(15);
+bufferShim.allocUnsafeSlow(21);
+```
+
+should just use the original in newer nodes and on older nodes uses fallbacks.
+
+Known Issues
+===
+- this does not patch the buffer object, only the constructor stuff
+- it's actually a polyfill
+
+![](https://i.imgur.com/zxII3jJ.gif)
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/LICENSE
new file mode 100644
index 0000000..d8d7f94
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/LICENSE
@@ -0,0 +1,19 @@
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/README.md
new file mode 100644
index 0000000..5a76b41
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/README.md
@@ -0,0 +1,3 @@
+# core-util-is
+
+The `util.is*` functions introduced in Node v0.12.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/float.patch b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/float.patch
new file mode 100644
index 0000000..a06d5c0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/float.patch
@@ -0,0 +1,604 @@
+diff --git a/lib/util.js b/lib/util.js
+index a03e874..9074e8e 100644
+--- a/lib/util.js
++++ b/lib/util.js
+@@ -19,430 +19,6 @@
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+-var formatRegExp = /%[sdj%]/g;
+-exports.format = function(f) {
+- if (!isString(f)) {
+- var objects = [];
+- for (var i = 0; i < arguments.length; i++) {
+- objects.push(inspect(arguments[i]));
+- }
+- return objects.join(' ');
+- }
+-
+- var i = 1;
+- var args = arguments;
+- var len = args.length;
+- var str = String(f).replace(formatRegExp, function(x) {
+- if (x === '%%') return '%';
+- if (i >= len) return x;
+- switch (x) {
+- case '%s': return String(args[i++]);
+- case '%d': return Number(args[i++]);
+- case '%j':
+- try {
+- return JSON.stringify(args[i++]);
+- } catch (_) {
+- return '[Circular]';
+- }
+- default:
+- return x;
+- }
+- });
+- for (var x = args[i]; i < len; x = args[++i]) {
+- if (isNull(x) || !isObject(x)) {
+- str += ' ' + x;
+- } else {
+- str += ' ' + inspect(x);
+- }
+- }
+- return str;
+-};
+-
+-
+-// Mark that a method should not be used.
+-// Returns a modified function which warns once by default.
+-// If --no-deprecation is set, then it is a no-op.
+-exports.deprecate = function(fn, msg) {
+- // Allow for deprecating things in the process of starting up.
+- if (isUndefined(global.process)) {
+- return function() {
+- return exports.deprecate(fn, msg).apply(this, arguments);
+- };
+- }
+-
+- if (process.noDeprecation === true) {
+- return fn;
+- }
+-
+- var warned = false;
+- function deprecated() {
+- if (!warned) {
+- if (process.throwDeprecation) {
+- throw new Error(msg);
+- } else if (process.traceDeprecation) {
+- console.trace(msg);
+- } else {
+- console.error(msg);
+- }
+- warned = true;
+- }
+- return fn.apply(this, arguments);
+- }
+-
+- return deprecated;
+-};
+-
+-
+-var debugs = {};
+-var debugEnviron;
+-exports.debuglog = function(set) {
+- if (isUndefined(debugEnviron))
+- debugEnviron = process.env.NODE_DEBUG || '';
+- set = set.toUpperCase();
+- if (!debugs[set]) {
+- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
+- var pid = process.pid;
+- debugs[set] = function() {
+- var msg = exports.format.apply(exports, arguments);
+- console.error('%s %d: %s', set, pid, msg);
+- };
+- } else {
+- debugs[set] = function() {};
+- }
+- }
+- return debugs[set];
+-};
+-
+-
+-/**
+- * Echos the value of a value. Trys to print the value out
+- * in the best way possible given the different types.
+- *
+- * @param {Object} obj The object to print out.
+- * @param {Object} opts Optional options object that alters the output.
+- */
+-/* legacy: obj, showHidden, depth, colors*/
+-function inspect(obj, opts) {
+- // default options
+- var ctx = {
+- seen: [],
+- stylize: stylizeNoColor
+- };
+- // legacy...
+- if (arguments.length >= 3) ctx.depth = arguments[2];
+- if (arguments.length >= 4) ctx.colors = arguments[3];
+- if (isBoolean(opts)) {
+- // legacy...
+- ctx.showHidden = opts;
+- } else if (opts) {
+- // got an "options" object
+- exports._extend(ctx, opts);
+- }
+- // set default options
+- if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
+- if (isUndefined(ctx.depth)) ctx.depth = 2;
+- if (isUndefined(ctx.colors)) ctx.colors = false;
+- if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
+- if (ctx.colors) ctx.stylize = stylizeWithColor;
+- return formatValue(ctx, obj, ctx.depth);
+-}
+-exports.inspect = inspect;
+-
+-
+-// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
+-inspect.colors = {
+- 'bold' : [1, 22],
+- 'italic' : [3, 23],
+- 'underline' : [4, 24],
+- 'inverse' : [7, 27],
+- 'white' : [37, 39],
+- 'grey' : [90, 39],
+- 'black' : [30, 39],
+- 'blue' : [34, 39],
+- 'cyan' : [36, 39],
+- 'green' : [32, 39],
+- 'magenta' : [35, 39],
+- 'red' : [31, 39],
+- 'yellow' : [33, 39]
+-};
+-
+-// Don't use 'blue' not visible on cmd.exe
+-inspect.styles = {
+- 'special': 'cyan',
+- 'number': 'yellow',
+- 'boolean': 'yellow',
+- 'undefined': 'grey',
+- 'null': 'bold',
+- 'string': 'green',
+- 'date': 'magenta',
+- // "name": intentionally not styling
+- 'regexp': 'red'
+-};
+-
+-
+-function stylizeWithColor(str, styleType) {
+- var style = inspect.styles[styleType];
+-
+- if (style) {
+- return '\u001b[' + inspect.colors[style][0] + 'm' + str +
+- '\u001b[' + inspect.colors[style][1] + 'm';
+- } else {
+- return str;
+- }
+-}
+-
+-
+-function stylizeNoColor(str, styleType) {
+- return str;
+-}
+-
+-
+-function arrayToHash(array) {
+- var hash = {};
+-
+- array.forEach(function(val, idx) {
+- hash[val] = true;
+- });
+-
+- return hash;
+-}
+-
+-
+-function formatValue(ctx, value, recurseTimes) {
+- // Provide a hook for user-specified inspect functions.
+- // Check that value is an object with an inspect function on it
+- if (ctx.customInspect &&
+- value &&
+- isFunction(value.inspect) &&
+- // Filter out the util module, it's inspect function is special
+- value.inspect !== exports.inspect &&
+- // Also filter out any prototype objects using the circular check.
+- !(value.constructor && value.constructor.prototype === value)) {
+- var ret = value.inspect(recurseTimes, ctx);
+- if (!isString(ret)) {
+- ret = formatValue(ctx, ret, recurseTimes);
+- }
+- return ret;
+- }
+-
+- // Primitive types cannot have properties
+- var primitive = formatPrimitive(ctx, value);
+- if (primitive) {
+- return primitive;
+- }
+-
+- // Look up the keys of the object.
+- var keys = Object.keys(value);
+- var visibleKeys = arrayToHash(keys);
+-
+- if (ctx.showHidden) {
+- keys = Object.getOwnPropertyNames(value);
+- }
+-
+- // Some type of object without properties can be shortcutted.
+- if (keys.length === 0) {
+- if (isFunction(value)) {
+- var name = value.name ? ': ' + value.name : '';
+- return ctx.stylize('[Function' + name + ']', 'special');
+- }
+- if (isRegExp(value)) {
+- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+- }
+- if (isDate(value)) {
+- return ctx.stylize(Date.prototype.toString.call(value), 'date');
+- }
+- if (isError(value)) {
+- return formatError(value);
+- }
+- }
+-
+- var base = '', array = false, braces = ['{', '}'];
+-
+- // Make Array say that they are Array
+- if (isArray(value)) {
+- array = true;
+- braces = ['[', ']'];
+- }
+-
+- // Make functions say that they are functions
+- if (isFunction(value)) {
+- var n = value.name ? ': ' + value.name : '';
+- base = ' [Function' + n + ']';
+- }
+-
+- // Make RegExps say that they are RegExps
+- if (isRegExp(value)) {
+- base = ' ' + RegExp.prototype.toString.call(value);
+- }
+-
+- // Make dates with properties first say the date
+- if (isDate(value)) {
+- base = ' ' + Date.prototype.toUTCString.call(value);
+- }
+-
+- // Make error with message first say the error
+- if (isError(value)) {
+- base = ' ' + formatError(value);
+- }
+-
+- if (keys.length === 0 && (!array || value.length == 0)) {
+- return braces[0] + base + braces[1];
+- }
+-
+- if (recurseTimes < 0) {
+- if (isRegExp(value)) {
+- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+- } else {
+- return ctx.stylize('[Object]', 'special');
+- }
+- }
+-
+- ctx.seen.push(value);
+-
+- var output;
+- if (array) {
+- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
+- } else {
+- output = keys.map(function(key) {
+- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
+- });
+- }
+-
+- ctx.seen.pop();
+-
+- return reduceToSingleString(output, base, braces);
+-}
+-
+-
+-function formatPrimitive(ctx, value) {
+- if (isUndefined(value))
+- return ctx.stylize('undefined', 'undefined');
+- if (isString(value)) {
+- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
+- .replace(/'/g, "\\'")
+- .replace(/\\"/g, '"') + '\'';
+- return ctx.stylize(simple, 'string');
+- }
+- if (isNumber(value)) {
+- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0,
+- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 .
+- if (value === 0 && 1 / value < 0)
+- return ctx.stylize('-0', 'number');
+- return ctx.stylize('' + value, 'number');
+- }
+- if (isBoolean(value))
+- return ctx.stylize('' + value, 'boolean');
+- // For some reason typeof null is "object", so special case here.
+- if (isNull(value))
+- return ctx.stylize('null', 'null');
+-}
+-
+-
+-function formatError(value) {
+- return '[' + Error.prototype.toString.call(value) + ']';
+-}
+-
+-
+-function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
+- var output = [];
+- for (var i = 0, l = value.length; i < l; ++i) {
+- if (hasOwnProperty(value, String(i))) {
+- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
+- String(i), true));
+- } else {
+- output.push('');
+- }
+- }
+- keys.forEach(function(key) {
+- if (!key.match(/^\d+$/)) {
+- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
+- key, true));
+- }
+- });
+- return output;
+-}
+-
+-
+-function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
+- var name, str, desc;
+- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
+- if (desc.get) {
+- if (desc.set) {
+- str = ctx.stylize('[Getter/Setter]', 'special');
+- } else {
+- str = ctx.stylize('[Getter]', 'special');
+- }
+- } else {
+- if (desc.set) {
+- str = ctx.stylize('[Setter]', 'special');
+- }
+- }
+- if (!hasOwnProperty(visibleKeys, key)) {
+- name = '[' + key + ']';
+- }
+- if (!str) {
+- if (ctx.seen.indexOf(desc.value) < 0) {
+- if (isNull(recurseTimes)) {
+- str = formatValue(ctx, desc.value, null);
+- } else {
+- str = formatValue(ctx, desc.value, recurseTimes - 1);
+- }
+- if (str.indexOf('\n') > -1) {
+- if (array) {
+- str = str.split('\n').map(function(line) {
+- return ' ' + line;
+- }).join('\n').substr(2);
+- } else {
+- str = '\n' + str.split('\n').map(function(line) {
+- return ' ' + line;
+- }).join('\n');
+- }
+- }
+- } else {
+- str = ctx.stylize('[Circular]', 'special');
+- }
+- }
+- if (isUndefined(name)) {
+- if (array && key.match(/^\d+$/)) {
+- return str;
+- }
+- name = JSON.stringify('' + key);
+- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
+- name = name.substr(1, name.length - 2);
+- name = ctx.stylize(name, 'name');
+- } else {
+- name = name.replace(/'/g, "\\'")
+- .replace(/\\"/g, '"')
+- .replace(/(^"|"$)/g, "'");
+- name = ctx.stylize(name, 'string');
+- }
+- }
+-
+- return name + ': ' + str;
+-}
+-
+-
+-function reduceToSingleString(output, base, braces) {
+- var numLinesEst = 0;
+- var length = output.reduce(function(prev, cur) {
+- numLinesEst++;
+- if (cur.indexOf('\n') >= 0) numLinesEst++;
+- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
+- }, 0);
+-
+- if (length > 60) {
+- return braces[0] +
+- (base === '' ? '' : base + '\n ') +
+- ' ' +
+- output.join(',\n ') +
+- ' ' +
+- braces[1];
+- }
+-
+- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
+-}
+-
+-
+ // NOTE: These type checking functions intentionally don't use `instanceof`
+ // because it is fragile and can be easily faked with `Object.create()`.
+ function isArray(ar) {
+@@ -522,166 +98,10 @@ function isPrimitive(arg) {
+ exports.isPrimitive = isPrimitive;
+
+ function isBuffer(arg) {
+- return arg instanceof Buffer;
++ return Buffer.isBuffer(arg);
+ }
+ exports.isBuffer = isBuffer;
+
+ function objectToString(o) {
+ return Object.prototype.toString.call(o);
+-}
+-
+-
+-function pad(n) {
+- return n < 10 ? '0' + n.toString(10) : n.toString(10);
+-}
+-
+-
+-var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
+- 'Oct', 'Nov', 'Dec'];
+-
+-// 26 Feb 16:19:34
+-function timestamp() {
+- var d = new Date();
+- var time = [pad(d.getHours()),
+- pad(d.getMinutes()),
+- pad(d.getSeconds())].join(':');
+- return [d.getDate(), months[d.getMonth()], time].join(' ');
+-}
+-
+-
+-// log is just a thin wrapper to console.log that prepends a timestamp
+-exports.log = function() {
+- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
+-};
+-
+-
+-/**
+- * Inherit the prototype methods from one constructor into another.
+- *
+- * The Function.prototype.inherits from lang.js rewritten as a standalone
+- * function (not on Function.prototype). NOTE: If this file is to be loaded
+- * during bootstrapping this function needs to be rewritten using some native
+- * functions as prototype setup using normal JavaScript does not work as
+- * expected during bootstrapping (see mirror.js in r114903).
+- *
+- * @param {function} ctor Constructor function which needs to inherit the
+- * prototype.
+- * @param {function} superCtor Constructor function to inherit prototype from.
+- */
+-exports.inherits = function(ctor, superCtor) {
+- ctor.super_ = superCtor;
+- ctor.prototype = Object.create(superCtor.prototype, {
+- constructor: {
+- value: ctor,
+- enumerable: false,
+- writable: true,
+- configurable: true
+- }
+- });
+-};
+-
+-exports._extend = function(origin, add) {
+- // Don't do anything if add isn't an object
+- if (!add || !isObject(add)) return origin;
+-
+- var keys = Object.keys(add);
+- var i = keys.length;
+- while (i--) {
+- origin[keys[i]] = add[keys[i]];
+- }
+- return origin;
+-};
+-
+-function hasOwnProperty(obj, prop) {
+- return Object.prototype.hasOwnProperty.call(obj, prop);
+-}
+-
+-
+-// Deprecated old stuff.
+-
+-exports.p = exports.deprecate(function() {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- console.error(exports.inspect(arguments[i]));
+- }
+-}, 'util.p: Use console.error() instead');
+-
+-
+-exports.exec = exports.deprecate(function() {
+- return require('child_process').exec.apply(this, arguments);
+-}, 'util.exec is now called `child_process.exec`.');
+-
+-
+-exports.print = exports.deprecate(function() {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- process.stdout.write(String(arguments[i]));
+- }
+-}, 'util.print: Use console.log instead');
+-
+-
+-exports.puts = exports.deprecate(function() {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- process.stdout.write(arguments[i] + '\n');
+- }
+-}, 'util.puts: Use console.log instead');
+-
+-
+-exports.debug = exports.deprecate(function(x) {
+- process.stderr.write('DEBUG: ' + x + '\n');
+-}, 'util.debug: Use console.error instead');
+-
+-
+-exports.error = exports.deprecate(function(x) {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- process.stderr.write(arguments[i] + '\n');
+- }
+-}, 'util.error: Use console.error instead');
+-
+-
+-exports.pump = exports.deprecate(function(readStream, writeStream, callback) {
+- var callbackCalled = false;
+-
+- function call(a, b, c) {
+- if (callback && !callbackCalled) {
+- callback(a, b, c);
+- callbackCalled = true;
+- }
+- }
+-
+- readStream.addListener('data', function(chunk) {
+- if (writeStream.write(chunk) === false) readStream.pause();
+- });
+-
+- writeStream.addListener('drain', function() {
+- readStream.resume();
+- });
+-
+- readStream.addListener('end', function() {
+- writeStream.end();
+- });
+-
+- readStream.addListener('close', function() {
+- call();
+- });
+-
+- readStream.addListener('error', function(err) {
+- writeStream.end();
+- call(err);
+- });
+-
+- writeStream.addListener('error', function(err) {
+- readStream.destroy();
+- call(err);
+- });
+-}, 'util.pump(): Use readableStream.pipe() instead');
+-
+-
+-var uv;
+-exports._errnoException = function(err, syscall) {
+- if (isUndefined(uv)) uv = process.binding('uv');
+- var errname = uv.errname(err);
+- var e = new Error(syscall + ' ' + errname);
+- e.code = errname;
+- e.errno = errname;
+- e.syscall = syscall;
+- return e;
+-};
++} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/lib/util.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/lib/util.js
new file mode 100644
index 0000000..ff4c851
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/lib/util.js
@@ -0,0 +1,107 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// NOTE: These type checking functions intentionally don't use `instanceof`
+// because it is fragile and can be easily faked with `Object.create()`.
+
+function isArray(arg) {
+ if (Array.isArray) {
+ return Array.isArray(arg);
+ }
+ return objectToString(arg) === '[object Array]';
+}
+exports.isArray = isArray;
+
+function isBoolean(arg) {
+ return typeof arg === 'boolean';
+}
+exports.isBoolean = isBoolean;
+
+function isNull(arg) {
+ return arg === null;
+}
+exports.isNull = isNull;
+
+function isNullOrUndefined(arg) {
+ return arg == null;
+}
+exports.isNullOrUndefined = isNullOrUndefined;
+
+function isNumber(arg) {
+ return typeof arg === 'number';
+}
+exports.isNumber = isNumber;
+
+function isString(arg) {
+ return typeof arg === 'string';
+}
+exports.isString = isString;
+
+function isSymbol(arg) {
+ return typeof arg === 'symbol';
+}
+exports.isSymbol = isSymbol;
+
+function isUndefined(arg) {
+ return arg === void 0;
+}
+exports.isUndefined = isUndefined;
+
+function isRegExp(re) {
+ return objectToString(re) === '[object RegExp]';
+}
+exports.isRegExp = isRegExp;
+
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+}
+exports.isObject = isObject;
+
+function isDate(d) {
+ return objectToString(d) === '[object Date]';
+}
+exports.isDate = isDate;
+
+function isError(e) {
+ return (objectToString(e) === '[object Error]' || e instanceof Error);
+}
+exports.isError = isError;
+
+function isFunction(arg) {
+ return typeof arg === 'function';
+}
+exports.isFunction = isFunction;
+
+function isPrimitive(arg) {
+ return arg === null ||
+ typeof arg === 'boolean' ||
+ typeof arg === 'number' ||
+ typeof arg === 'string' ||
+ typeof arg === 'symbol' || // ES6 symbol
+ typeof arg === 'undefined';
+}
+exports.isPrimitive = isPrimitive;
+
+exports.isBuffer = Buffer.isBuffer;
+
+function objectToString(o) {
+ return Object.prototype.toString.call(o);
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/package.json
new file mode 100644
index 0000000..f65d83f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/package.json
@@ -0,0 +1,59 @@
+{
+ "name": "core-util-is",
+ "version": "1.0.2",
+ "description": "The `util.is*` functions introduced in Node v0.12.",
+ "main": "lib/util.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/core-util-is.git"
+ },
+ "keywords": [
+ "util",
+ "isBuffer",
+ "isArray",
+ "isNumber",
+ "isString",
+ "isRegExp",
+ "isThis",
+ "isThat",
+ "polyfill"
+ ],
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/isaacs/core-util-is/issues"
+ },
+ "scripts": {
+ "test": "tap test.js"
+ },
+ "devDependencies": {
+ "tap": "^2.3.0"
+ },
+ "gitHead": "a177da234df5638b363ddc15fa324619a38577c8",
+ "homepage": "https://github.com/isaacs/core-util-is#readme",
+ "_id": "core-util-is@1.0.2",
+ "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7",
+ "_from": "core-util-is@>=1.0.0 <1.1.0",
+ "_npmVersion": "3.3.2",
+ "_nodeVersion": "4.0.0",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "dist": {
+ "shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7",
+ "tarball": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/test.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/test.js
new file mode 100644
index 0000000..1a490c6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/core-util-is/test.js
@@ -0,0 +1,68 @@
+var assert = require('tap');
+
+var t = require('./lib/util');
+
+assert.equal(t.isArray([]), true);
+assert.equal(t.isArray({}), false);
+
+assert.equal(t.isBoolean(null), false);
+assert.equal(t.isBoolean(true), true);
+assert.equal(t.isBoolean(false), true);
+
+assert.equal(t.isNull(null), true);
+assert.equal(t.isNull(undefined), false);
+assert.equal(t.isNull(false), false);
+assert.equal(t.isNull(), false);
+
+assert.equal(t.isNullOrUndefined(null), true);
+assert.equal(t.isNullOrUndefined(undefined), true);
+assert.equal(t.isNullOrUndefined(false), false);
+assert.equal(t.isNullOrUndefined(), true);
+
+assert.equal(t.isNumber(null), false);
+assert.equal(t.isNumber('1'), false);
+assert.equal(t.isNumber(1), true);
+
+assert.equal(t.isString(null), false);
+assert.equal(t.isString('1'), true);
+assert.equal(t.isString(1), false);
+
+assert.equal(t.isSymbol(null), false);
+assert.equal(t.isSymbol('1'), false);
+assert.equal(t.isSymbol(1), false);
+assert.equal(t.isSymbol(Symbol()), true);
+
+assert.equal(t.isUndefined(null), false);
+assert.equal(t.isUndefined(undefined), true);
+assert.equal(t.isUndefined(false), false);
+assert.equal(t.isUndefined(), true);
+
+assert.equal(t.isRegExp(null), false);
+assert.equal(t.isRegExp('1'), false);
+assert.equal(t.isRegExp(new RegExp()), true);
+
+assert.equal(t.isObject({}), true);
+assert.equal(t.isObject([]), true);
+assert.equal(t.isObject(new RegExp()), true);
+assert.equal(t.isObject(new Date()), true);
+
+assert.equal(t.isDate(null), false);
+assert.equal(t.isDate('1'), false);
+assert.equal(t.isDate(new Date()), true);
+
+assert.equal(t.isError(null), false);
+assert.equal(t.isError({ err: true }), false);
+assert.equal(t.isError(new Error()), true);
+
+assert.equal(t.isFunction(null), false);
+assert.equal(t.isFunction({ }), false);
+assert.equal(t.isFunction(function() {}), true);
+
+assert.equal(t.isPrimitive(null), true);
+assert.equal(t.isPrimitive(''), true);
+assert.equal(t.isPrimitive(0), true);
+assert.equal(t.isPrimitive(new Date()), false);
+
+assert.equal(t.isBuffer(null), false);
+assert.equal(t.isBuffer({}), false);
+assert.equal(t.isBuffer(new Buffer(0)), true);
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/LICENSE
new file mode 100644
index 0000000..dea3013
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/LICENSE
@@ -0,0 +1,16 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/README.md
new file mode 100644
index 0000000..b1c5665
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/README.md
@@ -0,0 +1,42 @@
+Browser-friendly inheritance fully compatible with standard node.js
+[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).
+
+This package exports standard `inherits` from node.js `util` module in
+node environment, but also provides alternative browser-friendly
+implementation through [browser
+field](https://gist.github.com/shtylman/4339901). Alternative
+implementation is a literal copy of standard one located in standalone
+module to avoid requiring of `util`. It also has a shim for old
+browsers with no `Object.create` support.
+
+While keeping you sure you are using standard `inherits`
+implementation in node.js environment, it allows bundlers such as
+[browserify](https://github.com/substack/node-browserify) to not
+include full `util` package to your client code if all you need is
+just `inherits` function. It worth, because browser shim for `util`
+package is large and `inherits` is often the single function you need
+from it.
+
+It's recommended to use this package instead of
+`require('util').inherits` for any code that has chances to be used
+not only in node.js but in browser too.
+
+## usage
+
+```js
+var inherits = require('inherits');
+// then use exactly as the standard one
+```
+
+## note on version ~1.0
+
+Version ~1.0 had completely different motivation and is not compatible
+neither with 2.0 nor with standard node.js `inherits`.
+
+If you are using version ~1.0 and planning to switch to ~2.0, be
+careful:
+
+* new version uses `super_` instead of `super` for referencing
+ superclass
+* new version overwrites current prototype while old one preserves any
+ existing fields on it
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/inherits.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/inherits.js
new file mode 100644
index 0000000..3b94763
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/inherits.js
@@ -0,0 +1,7 @@
+try {
+ var util = require('util');
+ if (typeof util.inherits !== 'function') throw '';
+ module.exports = util.inherits;
+} catch (e) {
+ module.exports = require('./inherits_browser.js');
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/inherits_browser.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/inherits_browser.js
new file mode 100644
index 0000000..c1e78a7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/inherits_browser.js
@@ -0,0 +1,23 @@
+if (typeof Object.create === 'function') {
+ // implementation from standard node.js 'util' module
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ };
+} else {
+ // old school shim for old browsers
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ var TempCtor = function () {}
+ TempCtor.prototype = superCtor.prototype
+ ctor.prototype = new TempCtor()
+ ctor.prototype.constructor = ctor
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/package.json
new file mode 100644
index 0000000..9146e75
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/inherits/package.json
@@ -0,0 +1,63 @@
+{
+ "name": "inherits",
+ "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
+ "version": "2.0.3",
+ "keywords": [
+ "inheritance",
+ "class",
+ "klass",
+ "oop",
+ "object-oriented",
+ "inherits",
+ "browser",
+ "browserify"
+ ],
+ "main": "./inherits.js",
+ "browser": "./inherits_browser.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/inherits.git"
+ },
+ "license": "ISC",
+ "scripts": {
+ "test": "node test"
+ },
+ "devDependencies": {
+ "tap": "^7.1.0"
+ },
+ "files": [
+ "inherits.js",
+ "inherits_browser.js"
+ ],
+ "gitHead": "e05d0fb27c61a3ec687214f0476386b765364d5f",
+ "bugs": {
+ "url": "https://github.com/isaacs/inherits/issues"
+ },
+ "homepage": "https://github.com/isaacs/inherits#readme",
+ "_id": "inherits@2.0.3",
+ "_shasum": "633c2c83e3da42a502f52466022480f4208261de",
+ "_from": "inherits@>=2.0.1 <2.1.0",
+ "_npmVersion": "3.10.7",
+ "_nodeVersion": "6.5.0",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "dist": {
+ "shasum": "633c2c83e3da42a502f52466022480f4208261de",
+ "tarball": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/.npmignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/.travis.yml b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/.travis.yml
new file mode 100644
index 0000000..cc4dba2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/Makefile b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/Makefile
new file mode 100644
index 0000000..787d56e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/Makefile
@@ -0,0 +1,6 @@
+
+test:
+ @node_modules/.bin/tape test.js
+
+.PHONY: test
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/README.md
new file mode 100644
index 0000000..16d2c59
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/README.md
@@ -0,0 +1,60 @@
+
+# isarray
+
+`Array#isArray` for older browsers.
+
+[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray)
+[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray)
+
+[![browser support](https://ci.testling.com/juliangruber/isarray.png)
+](https://ci.testling.com/juliangruber/isarray)
+
+## Usage
+
+```js
+var isArray = require('isarray');
+
+console.log(isArray([])); // => true
+console.log(isArray({})); // => false
+```
+
+## Installation
+
+With [npm](http://npmjs.org) do
+
+```bash
+$ npm install isarray
+```
+
+Then bundle for the browser with
+[browserify](https://github.com/substack/browserify).
+
+With [component](http://component.io) do
+
+```bash
+$ component install juliangruber/isarray
+```
+
+## License
+
+(MIT)
+
+Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/component.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/component.json
new file mode 100644
index 0000000..9e31b68
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/component.json
@@ -0,0 +1,19 @@
+{
+ "name" : "isarray",
+ "description" : "Array#isArray for older browsers",
+ "version" : "0.0.1",
+ "repository" : "juliangruber/isarray",
+ "homepage": "https://github.com/juliangruber/isarray",
+ "main" : "index.js",
+ "scripts" : [
+ "index.js"
+ ],
+ "dependencies" : {},
+ "keywords": ["browser","isarray","array"],
+ "author": {
+ "name": "Julian Gruber",
+ "email": "mail@juliangruber.com",
+ "url": "http://juliangruber.com"
+ },
+ "license": "MIT"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/index.js
new file mode 100644
index 0000000..a57f634
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/index.js
@@ -0,0 +1,5 @@
+var toString = {}.toString;
+
+module.exports = Array.isArray || function (arr) {
+ return toString.call(arr) == '[object Array]';
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/package.json
new file mode 100644
index 0000000..d4834ea
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/package.json
@@ -0,0 +1,70 @@
+{
+ "name": "isarray",
+ "description": "Array#isArray for older browsers",
+ "version": "1.0.0",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/juliangruber/isarray.git"
+ },
+ "homepage": "https://github.com/juliangruber/isarray",
+ "main": "index.js",
+ "dependencies": {},
+ "devDependencies": {
+ "tape": "~2.13.4"
+ },
+ "keywords": [
+ "browser",
+ "isarray",
+ "array"
+ ],
+ "author": {
+ "name": "Julian Gruber",
+ "email": "mail@juliangruber.com",
+ "url": "http://juliangruber.com"
+ },
+ "license": "MIT",
+ "testling": {
+ "files": "test.js",
+ "browsers": [
+ "ie/8..latest",
+ "firefox/17..latest",
+ "firefox/nightly",
+ "chrome/22..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2..latest"
+ ]
+ },
+ "scripts": {
+ "test": "tape test.js"
+ },
+ "gitHead": "2a23a281f369e9ae06394c0fb4d2381355a6ba33",
+ "bugs": {
+ "url": "https://github.com/juliangruber/isarray/issues"
+ },
+ "_id": "isarray@1.0.0",
+ "_shasum": "bb935d48582cba168c06834957a54a3e07124f11",
+ "_from": "isarray@>=1.0.0 <1.1.0",
+ "_npmVersion": "3.3.12",
+ "_nodeVersion": "5.1.0",
+ "_npmUser": {
+ "name": "juliangruber",
+ "email": "julian@juliangruber.com"
+ },
+ "dist": {
+ "shasum": "bb935d48582cba168c06834957a54a3e07124f11",
+ "tarball": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "juliangruber",
+ "email": "julian@juliangruber.com"
+ }
+ ],
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/test.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/test.js
new file mode 100644
index 0000000..e0c3444
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/isarray/test.js
@@ -0,0 +1,20 @@
+var isArray = require('./');
+var test = require('tape');
+
+test('is array', function(t){
+ t.ok(isArray([]));
+ t.notOk(isArray({}));
+ t.notOk(isArray(null));
+ t.notOk(isArray(false));
+
+ var obj = {};
+ obj[0] = true;
+ t.notOk(isArray(obj));
+
+ var arr = [];
+ arr.foo = 'bar';
+ t.ok(isArray(arr));
+
+ t.end();
+});
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml
new file mode 100644
index 0000000..36201b1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml
@@ -0,0 +1,12 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
+ - "0.11"
+ - "0.12"
+ - "1.7.1"
+ - 1
+ - 2
+ - 3
+ - 4
+ - 5
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/index.js
new file mode 100644
index 0000000..a4f40f8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/index.js
@@ -0,0 +1,43 @@
+'use strict';
+
+if (!process.version ||
+ process.version.indexOf('v0.') === 0 ||
+ process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
+ module.exports = nextTick;
+} else {
+ module.exports = process.nextTick;
+}
+
+function nextTick(fn, arg1, arg2, arg3) {
+ if (typeof fn !== 'function') {
+ throw new TypeError('"callback" argument must be a function');
+ }
+ var len = arguments.length;
+ var args, i;
+ switch (len) {
+ case 0:
+ case 1:
+ return process.nextTick(fn);
+ case 2:
+ return process.nextTick(function afterTickOne() {
+ fn.call(null, arg1);
+ });
+ case 3:
+ return process.nextTick(function afterTickTwo() {
+ fn.call(null, arg1, arg2);
+ });
+ case 4:
+ return process.nextTick(function afterTickThree() {
+ fn.call(null, arg1, arg2, arg3);
+ });
+ default:
+ args = new Array(len - 1);
+ i = 0;
+ while (i < args.length) {
+ args[i++] = arguments[i];
+ }
+ return process.nextTick(function afterTick() {
+ fn.apply(null, args);
+ });
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/license.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/license.md
new file mode 100644
index 0000000..c67e353
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/license.md
@@ -0,0 +1,19 @@
+# Copyright (c) 2015 Calvin Metcalf
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.**
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/package.json
new file mode 100644
index 0000000..ea49e09
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "process-nextick-args",
+ "version": "1.0.7",
+ "description": "process.nextTick but always with args",
+ "main": "index.js",
+ "scripts": {
+ "test": "node test.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/calvinmetcalf/process-nextick-args.git"
+ },
+ "author": "",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/calvinmetcalf/process-nextick-args/issues"
+ },
+ "homepage": "https://github.com/calvinmetcalf/process-nextick-args",
+ "devDependencies": {
+ "tap": "~0.2.6"
+ },
+ "gitHead": "5c00899ab01dd32f93ad4b5743da33da91404f39",
+ "_id": "process-nextick-args@1.0.7",
+ "_shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3",
+ "_from": "process-nextick-args@>=1.0.6 <1.1.0",
+ "_npmVersion": "3.8.6",
+ "_nodeVersion": "5.11.0",
+ "_npmUser": {
+ "name": "cwmma",
+ "email": "calvin.metcalf@gmail.com"
+ },
+ "dist": {
+ "shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3",
+ "tarball": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "cwmma",
+ "email": "calvin.metcalf@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/process-nextick-args-1.0.7.tgz_1462394251778_0.36989671061746776"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/readme.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/readme.md
new file mode 100644
index 0000000..78e7cfa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/readme.md
@@ -0,0 +1,18 @@
+process-nextick-args
+=====
+
+[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args)
+
+```bash
+npm install --save process-nextick-args
+```
+
+Always be able to pass arguments to process.nextTick, no matter the platform
+
+```js
+var nextTick = require('process-nextick-args');
+
+nextTick(function (a, b, c) {
+ console.log(a, b, c);
+}, 'step', 3, 'profit');
+```
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/test.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/test.js
new file mode 100644
index 0000000..ef15721
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/process-nextick-args/test.js
@@ -0,0 +1,24 @@
+var test = require("tap").test;
+var nextTick = require('./');
+
+test('should work', function (t) {
+ t.plan(5);
+ nextTick(function (a) {
+ t.ok(a);
+ nextTick(function (thing) {
+ t.equals(thing, 7);
+ }, 7);
+ }, true);
+ nextTick(function (a, b, c) {
+ t.equals(a, 'step');
+ t.equals(b, 3);
+ t.equals(c, 'profit');
+ }, 'step', 3, 'profit');
+});
+
+test('correct number of arguments', function (t) {
+ t.plan(1);
+ nextTick(function () {
+ t.equals(2, arguments.length, 'correct number');
+ }, 1, 2);
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/.npmignore
new file mode 100644
index 0000000..206320c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/.npmignore
@@ -0,0 +1,2 @@
+build
+test
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/LICENSE
new file mode 100644
index 0000000..6de584a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/LICENSE
@@ -0,0 +1,20 @@
+Copyright Joyent, Inc. and other Node contributors.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to permit
+persons to whom the Software is furnished to do so, subject to the
+following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/README.md
new file mode 100644
index 0000000..4d2aa00
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/README.md
@@ -0,0 +1,7 @@
+**string_decoder.js** (`require('string_decoder')`) from Node.js core
+
+Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details.
+
+Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.**
+
+The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/index.js
new file mode 100644
index 0000000..b00e54f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/index.js
@@ -0,0 +1,221 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+var Buffer = require('buffer').Buffer;
+
+var isBufferEncoding = Buffer.isEncoding
+ || function(encoding) {
+ switch (encoding && encoding.toLowerCase()) {
+ case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;
+ default: return false;
+ }
+ }
+
+
+function assertEncoding(encoding) {
+ if (encoding && !isBufferEncoding(encoding)) {
+ throw new Error('Unknown encoding: ' + encoding);
+ }
+}
+
+// StringDecoder provides an interface for efficiently splitting a series of
+// buffers into a series of JS strings without breaking apart multi-byte
+// characters. CESU-8 is handled as part of the UTF-8 encoding.
+//
+// @TODO Handling all encodings inside a single object makes it very difficult
+// to reason about this code, so it should be split up in the future.
+// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code
+// points as used by CESU-8.
+var StringDecoder = exports.StringDecoder = function(encoding) {
+ this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');
+ assertEncoding(encoding);
+ switch (this.encoding) {
+ case 'utf8':
+ // CESU-8 represents each of Surrogate Pair by 3-bytes
+ this.surrogateSize = 3;
+ break;
+ case 'ucs2':
+ case 'utf16le':
+ // UTF-16 represents each of Surrogate Pair by 2-bytes
+ this.surrogateSize = 2;
+ this.detectIncompleteChar = utf16DetectIncompleteChar;
+ break;
+ case 'base64':
+ // Base-64 stores 3 bytes in 4 chars, and pads the remainder.
+ this.surrogateSize = 3;
+ this.detectIncompleteChar = base64DetectIncompleteChar;
+ break;
+ default:
+ this.write = passThroughWrite;
+ return;
+ }
+
+ // Enough space to store all bytes of a single character. UTF-8 needs 4
+ // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).
+ this.charBuffer = new Buffer(6);
+ // Number of bytes received for the current incomplete multi-byte character.
+ this.charReceived = 0;
+ // Number of bytes expected for the current incomplete multi-byte character.
+ this.charLength = 0;
+};
+
+
+// write decodes the given buffer and returns it as JS string that is
+// guaranteed to not contain any partial multi-byte characters. Any partial
+// character found at the end of the buffer is buffered up, and will be
+// returned when calling write again with the remaining bytes.
+//
+// Note: Converting a Buffer containing an orphan surrogate to a String
+// currently works, but converting a String to a Buffer (via `new Buffer`, or
+// Buffer#write) will replace incomplete surrogates with the unicode
+// replacement character. See https://codereview.chromium.org/121173009/ .
+StringDecoder.prototype.write = function(buffer) {
+ var charStr = '';
+ // if our last write ended with an incomplete multibyte character
+ while (this.charLength) {
+ // determine how many remaining bytes this buffer has to offer for this char
+ var available = (buffer.length >= this.charLength - this.charReceived) ?
+ this.charLength - this.charReceived :
+ buffer.length;
+
+ // add the new bytes to the char buffer
+ buffer.copy(this.charBuffer, this.charReceived, 0, available);
+ this.charReceived += available;
+
+ if (this.charReceived < this.charLength) {
+ // still not enough chars in this buffer? wait for more ...
+ return '';
+ }
+
+ // remove bytes belonging to the current character from the buffer
+ buffer = buffer.slice(available, buffer.length);
+
+ // get the character that was split
+ charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);
+
+ // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
+ var charCode = charStr.charCodeAt(charStr.length - 1);
+ if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+ this.charLength += this.surrogateSize;
+ charStr = '';
+ continue;
+ }
+ this.charReceived = this.charLength = 0;
+
+ // if there are no more bytes in this buffer, just emit our char
+ if (buffer.length === 0) {
+ return charStr;
+ }
+ break;
+ }
+
+ // determine and set charLength / charReceived
+ this.detectIncompleteChar(buffer);
+
+ var end = buffer.length;
+ if (this.charLength) {
+ // buffer the incomplete character bytes we got
+ buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);
+ end -= this.charReceived;
+ }
+
+ charStr += buffer.toString(this.encoding, 0, end);
+
+ var end = charStr.length - 1;
+ var charCode = charStr.charCodeAt(end);
+ // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
+ if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+ var size = this.surrogateSize;
+ this.charLength += size;
+ this.charReceived += size;
+ this.charBuffer.copy(this.charBuffer, size, 0, size);
+ buffer.copy(this.charBuffer, 0, 0, size);
+ return charStr.substring(0, end);
+ }
+
+ // or just emit the charStr
+ return charStr;
+};
+
+// detectIncompleteChar determines if there is an incomplete UTF-8 character at
+// the end of the given buffer. If so, it sets this.charLength to the byte
+// length that character, and sets this.charReceived to the number of bytes
+// that are available for this character.
+StringDecoder.prototype.detectIncompleteChar = function(buffer) {
+ // determine how many bytes we have to check at the end of this buffer
+ var i = (buffer.length >= 3) ? 3 : buffer.length;
+
+ // Figure out if one of the last i bytes of our buffer announces an
+ // incomplete char.
+ for (; i > 0; i--) {
+ var c = buffer[buffer.length - i];
+
+ // See http://en.wikipedia.org/wiki/UTF-8#Description
+
+ // 110XXXXX
+ if (i == 1 && c >> 5 == 0x06) {
+ this.charLength = 2;
+ break;
+ }
+
+ // 1110XXXX
+ if (i <= 2 && c >> 4 == 0x0E) {
+ this.charLength = 3;
+ break;
+ }
+
+ // 11110XXX
+ if (i <= 3 && c >> 3 == 0x1E) {
+ this.charLength = 4;
+ break;
+ }
+ }
+ this.charReceived = i;
+};
+
+StringDecoder.prototype.end = function(buffer) {
+ var res = '';
+ if (buffer && buffer.length)
+ res = this.write(buffer);
+
+ if (this.charReceived) {
+ var cr = this.charReceived;
+ var buf = this.charBuffer;
+ var enc = this.encoding;
+ res += buf.slice(0, cr).toString(enc);
+ }
+
+ return res;
+};
+
+function passThroughWrite(buffer) {
+ return buffer.toString(this.encoding);
+}
+
+function utf16DetectIncompleteChar(buffer) {
+ this.charReceived = buffer.length % 2;
+ this.charLength = this.charReceived ? 2 : 0;
+}
+
+function base64DetectIncompleteChar(buffer) {
+ this.charReceived = buffer.length % 3;
+ this.charLength = this.charReceived ? 3 : 0;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/package.json
new file mode 100644
index 0000000..fdf923e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/string_decoder/package.json
@@ -0,0 +1,53 @@
+{
+ "name": "string_decoder",
+ "version": "0.10.31",
+ "description": "The string_decoder module from Node core",
+ "main": "index.js",
+ "dependencies": {},
+ "devDependencies": {
+ "tap": "~0.4.8"
+ },
+ "scripts": {
+ "test": "tap test/simple/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/rvagg/string_decoder.git"
+ },
+ "homepage": "https://github.com/rvagg/string_decoder",
+ "keywords": [
+ "string",
+ "decoder",
+ "browser",
+ "browserify"
+ ],
+ "license": "MIT",
+ "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0",
+ "bugs": {
+ "url": "https://github.com/rvagg/string_decoder/issues"
+ },
+ "_id": "string_decoder@0.10.31",
+ "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94",
+ "_from": "string_decoder@>=0.10.0 <0.11.0",
+ "_npmVersion": "1.4.23",
+ "_npmUser": {
+ "name": "rvagg",
+ "email": "rod@vagg.org"
+ },
+ "maintainers": [
+ {
+ "name": "substack",
+ "email": "mail@substack.net"
+ },
+ {
+ "name": "rvagg",
+ "email": "rod@vagg.org"
+ }
+ ],
+ "dist": {
+ "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94",
+ "tarball": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/History.md
new file mode 100644
index 0000000..acc8675
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/History.md
@@ -0,0 +1,16 @@
+
+1.0.2 / 2015-10-07
+==================
+
+ * use try/catch when checking `localStorage` (#3, @kumavis)
+
+1.0.1 / 2014-11-25
+==================
+
+ * browser: use `console.warn()` for deprecation calls
+ * browser: more jsdocs
+
+1.0.0 / 2014-04-30
+==================
+
+ * initial commit
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/LICENSE
new file mode 100644
index 0000000..6a60e8c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/LICENSE
@@ -0,0 +1,24 @@
+(The MIT License)
+
+Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/README.md
new file mode 100644
index 0000000..75622fa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/README.md
@@ -0,0 +1,53 @@
+util-deprecate
+==============
+### The Node.js `util.deprecate()` function with browser support
+
+In Node.js, this module simply re-exports the `util.deprecate()` function.
+
+In the web browser (i.e. via browserify), a browser-specific implementation
+of the `util.deprecate()` function is used.
+
+
+## API
+
+A `deprecate()` function is the only thing exposed by this module.
+
+``` javascript
+// setup:
+exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead');
+
+
+// users see:
+foo();
+// foo() is deprecated, use bar() instead
+foo();
+foo();
+```
+
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/browser.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/browser.js
new file mode 100644
index 0000000..549ae2f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/browser.js
@@ -0,0 +1,67 @@
+
+/**
+ * Module exports.
+ */
+
+module.exports = deprecate;
+
+/**
+ * Mark that a method should not be used.
+ * Returns a modified function which warns once by default.
+ *
+ * If `localStorage.noDeprecation = true` is set, then it is a no-op.
+ *
+ * If `localStorage.throwDeprecation = true` is set, then deprecated functions
+ * will throw an Error when invoked.
+ *
+ * If `localStorage.traceDeprecation = true` is set, then deprecated functions
+ * will invoke `console.trace()` instead of `console.error()`.
+ *
+ * @param {Function} fn - the function to deprecate
+ * @param {String} msg - the string to print to the console when `fn` is invoked
+ * @returns {Function} a new "deprecated" version of `fn`
+ * @api public
+ */
+
+function deprecate (fn, msg) {
+ if (config('noDeprecation')) {
+ return fn;
+ }
+
+ var warned = false;
+ function deprecated() {
+ if (!warned) {
+ if (config('throwDeprecation')) {
+ throw new Error(msg);
+ } else if (config('traceDeprecation')) {
+ console.trace(msg);
+ } else {
+ console.warn(msg);
+ }
+ warned = true;
+ }
+ return fn.apply(this, arguments);
+ }
+
+ return deprecated;
+}
+
+/**
+ * Checks `localStorage` for boolean values for the given `name`.
+ *
+ * @param {String} name
+ * @returns {Boolean}
+ * @api private
+ */
+
+function config (name) {
+ // accessing global.localStorage can trigger a DOMException in sandboxed iframes
+ try {
+ if (!global.localStorage) return false;
+ } catch (_) {
+ return false;
+ }
+ var val = global.localStorage[name];
+ if (null == val) return false;
+ return String(val).toLowerCase() === 'true';
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/node.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/node.js
new file mode 100644
index 0000000..5e6fcff
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/node.js
@@ -0,0 +1,6 @@
+
+/**
+ * For Node.js, simply re-export the core `util.deprecate` function.
+ */
+
+module.exports = require('util').deprecate;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/package.json
new file mode 100644
index 0000000..5decbec
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/node_modules/util-deprecate/package.json
@@ -0,0 +1,53 @@
+{
+ "name": "util-deprecate",
+ "version": "1.0.2",
+ "description": "The Node.js `util.deprecate()` function with browser support",
+ "main": "node.js",
+ "browser": "browser.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/TooTallNate/util-deprecate.git"
+ },
+ "keywords": [
+ "util",
+ "deprecate",
+ "browserify",
+ "browser",
+ "node"
+ ],
+ "author": {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io/"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/TooTallNate/util-deprecate/issues"
+ },
+ "homepage": "https://github.com/TooTallNate/util-deprecate",
+ "gitHead": "475fb6857cd23fafff20c1be846c1350abf8e6d4",
+ "_id": "util-deprecate@1.0.2",
+ "_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf",
+ "_from": "util-deprecate@>=1.0.1 <1.1.0",
+ "_npmVersion": "2.14.4",
+ "_nodeVersion": "4.1.2",
+ "_npmUser": {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ },
+ "maintainers": [
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ }
+ ],
+ "dist": {
+ "shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf",
+ "tarball": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/package.json
new file mode 100644
index 0000000..542aa38
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/package.json
@@ -0,0 +1,90 @@
+{
+ "name": "readable-stream",
+ "version": "2.1.5",
+ "description": "Streams3, a user-land copy of the stream library from Node.js",
+ "main": "readable.js",
+ "dependencies": {
+ "buffer-shims": "^1.0.0",
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.1",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~1.0.6",
+ "string_decoder": "~0.10.x",
+ "util-deprecate": "~1.0.1"
+ },
+ "devDependencies": {
+ "assert": "~1.4.0",
+ "babel-polyfill": "^6.9.1",
+ "nyc": "^6.4.0",
+ "tap": "~0.7.1",
+ "tape": "~4.5.1",
+ "zuul": "~3.10.0"
+ },
+ "scripts": {
+ "test": "tap test/parallel/*.js test/ours/*.js",
+ "browser": "npm run write-zuul && zuul --browser-retries 2 -- test/browser.js",
+ "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml",
+ "local": "zuul --local 3000 --no-coverage -- test/browser.js",
+ "cover": "nyc npm test",
+ "report": "nyc report --reporter=lcov"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/readable-stream"
+ },
+ "keywords": [
+ "readable",
+ "stream",
+ "pipe"
+ ],
+ "browser": {
+ "util": false
+ },
+ "nyc": {
+ "include": [
+ "lib/**.js"
+ ]
+ },
+ "license": "MIT",
+ "gitHead": "758c8b3845af855fde736b6a7f58a15fba00d1e7",
+ "bugs": {
+ "url": "https://github.com/nodejs/readable-stream/issues"
+ },
+ "_id": "readable-stream@2.1.5",
+ "_shasum": "66fa8b720e1438b364681f2ad1a63c618448c9d0",
+ "_from": "readable-stream@2.1.5",
+ "_npmVersion": "3.8.6",
+ "_nodeVersion": "5.12.0",
+ "_npmUser": {
+ "name": "cwmma",
+ "email": "calvin.metcalf@gmail.com"
+ },
+ "dist": {
+ "shasum": "66fa8b720e1438b364681f2ad1a63c618448c9d0",
+ "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "isaacs@npmjs.com"
+ },
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ },
+ {
+ "name": "rvagg",
+ "email": "rod@vagg.org"
+ },
+ {
+ "name": "cwmma",
+ "email": "calvin.metcalf@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/readable-stream-2.1.5.tgz_1471463532993_0.15824943827465177"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/passthrough.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/passthrough.js
new file mode 100644
index 0000000..27e8d8a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/passthrough.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_passthrough.js")
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/readable.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/readable.js
new file mode 100644
index 0000000..be2688a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/readable.js
@@ -0,0 +1,16 @@
+var Stream = (function (){
+ try {
+ return require('st' + 'ream'); // hack to fix a circular dependency issue when used with browserify
+ } catch(_){}
+}());
+exports = module.exports = require('./lib/_stream_readable.js');
+exports.Stream = Stream || exports;
+exports.Readable = exports;
+exports.Writable = require('./lib/_stream_writable.js');
+exports.Duplex = require('./lib/_stream_duplex.js');
+exports.Transform = require('./lib/_stream_transform.js');
+exports.PassThrough = require('./lib/_stream_passthrough.js');
+
+if (!process.browser && process.env.READABLE_STREAM === 'disable' && Stream) {
+ module.exports = Stream;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/transform.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/transform.js
new file mode 100644
index 0000000..5d482f0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/transform.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_transform.js")
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/writable.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/writable.js
new file mode 100644
index 0000000..e1e9efd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/node_modules/readable-stream/writable.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_writable.js")
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/package.json
new file mode 100644
index 0000000..18f0906
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mongodb/package.json
@@ -0,0 +1,90 @@
+{
+ "name": "mongodb",
+ "version": "2.2.11",
+ "description": "The official MongoDB driver for Node.js",
+ "main": "index.js",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/mongodb/node-mongodb-native.git"
+ },
+ "keywords": [
+ "mongodb",
+ "driver",
+ "official"
+ ],
+ "dependencies": {
+ "es6-promise": "3.2.1",
+ "mongodb-core": "2.0.13",
+ "readable-stream": "2.1.5"
+ },
+ "devDependencies": {
+ "JSONStream": "^1.0.7",
+ "betterbenchmarks": "^0.1.0",
+ "bluebird": "3.4.6",
+ "bson": "^0.5.1",
+ "cli-table": "^0.3.1",
+ "co": "4.6.0",
+ "colors": "^1.1.2",
+ "coveralls": "^2.11.6",
+ "event-stream": "^3.3.2",
+ "gleak": "0.5.0",
+ "integra": "0.1.8",
+ "jsdoc": "3.4.0",
+ "ldjson-stream": "^1.2.1",
+ "mongodb-extended-json": "1.7.1",
+ "mongodb-topology-manager": "1.0.x",
+ "mongodb-version-manager": "^1.0.6",
+ "nyc": "^8.1.0",
+ "optimist": "0.6.1",
+ "rimraf": "2.5.4",
+ "semver": "5.3.0",
+ "worker-farm": "^1.3.1"
+ },
+ "author": {
+ "name": "Christian Kvalheim"
+ },
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=0.10.3"
+ },
+ "bugs": {
+ "url": "https://github.com/mongodb/node-mongodb-native/issues"
+ },
+ "scripts": {
+ "test": "node test/runner.js -t functional",
+ "coverage": "nyc node test/runner.js -t functional && node_modules/.bin/nyc report --reporter=text-lcov | node_modules/.bin/coveralls"
+ },
+ "nyc": {
+ "include": [
+ "lib/**/*.js"
+ ]
+ },
+ "homepage": "https://github.com/mongodb/node-mongodb-native",
+ "gitHead": "3bf21eeeece3bc5b361732a9be28109a790673e7",
+ "_id": "mongodb@2.2.11",
+ "_shasum": "a828b036fe6a437a35e723af5f81781c4976306c",
+ "_from": "mongodb@2.2.11",
+ "_npmVersion": "3.10.8",
+ "_nodeVersion": "6.8.1",
+ "_npmUser": {
+ "name": "christkv",
+ "email": "christkv@gmail.com"
+ },
+ "dist": {
+ "shasum": "a828b036fe6a437a35e723af5f81781c4976306c",
+ "tarball": "https://registry.npmjs.org/mongodb/-/mongodb-2.2.11.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "christkv",
+ "email": "christkv@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/mongodb-2.2.11.tgz_1477061498561_0.7655699723400176"
+ },
+ "deprecated": "please upgrade to 2.2.12 or higher",
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mongodb/-/mongodb-2.2.11.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/.npmignore
new file mode 100644
index 0000000..be106ca
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/.npmignore
@@ -0,0 +1,2 @@
+*.sw*
+node_modules/
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/.travis.yml b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/.travis.yml
new file mode 100644
index 0000000..895dbd3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - 0.6
+ - 0.8
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/History.md
new file mode 100644
index 0000000..87de484
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/History.md
@@ -0,0 +1,30 @@
+
+0.2.1 / 2013-03-22
+==================
+
+ * test; added for #5
+ * fix typo that breaks set #5 [Contra](https://github.com/Contra)
+
+0.2.0 / 2013-03-15
+==================
+
+ * added; adapter support for set
+ * added; adapter support for get
+ * add basic benchmarks
+ * add support for using module as a component #2 [Contra](https://github.com/Contra)
+
+0.1.1 / 2012-12-21
+==================
+
+ * added; map support
+
+0.1.0 / 2012-12-13
+==================
+
+ * added; set('array.property', val, object) support
+ * added; get('array.property', object) support
+
+0.0.1 / 2012-11-03
+==================
+
+ * initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/LICENSE
new file mode 100644
index 0000000..38c529d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2012 [Aaron Heckmann](aaron.heckmann+github@gmail.com)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/Makefile b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/Makefile
new file mode 100644
index 0000000..314c361
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/Makefile
@@ -0,0 +1,8 @@
+
+test:
+ @node_modules/mocha/bin/mocha -A $(T)
+
+bench:
+ node bench.js
+
+.PHONY: test
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/README.md
new file mode 100644
index 0000000..9831dd0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/README.md
@@ -0,0 +1,278 @@
+#mpath
+
+{G,S}et javascript object values using MongoDB-like path notation.
+
+###Getting
+
+```js
+var mpath = require('mpath');
+
+var obj = {
+ comments: [
+ { title: 'funny' },
+ { title: 'exciting!' }
+ ]
+}
+
+mpath.get('comments.1.title', obj) // 'exciting!'
+```
+
+`mpath.get` supports array property notation as well.
+
+```js
+var obj = {
+ comments: [
+ { title: 'funny' },
+ { title: 'exciting!' }
+ ]
+}
+
+mpath.get('comments.title', obj) // ['funny', 'exciting!']
+```
+
+Array property and indexing syntax, when used together, are very powerful.
+
+```js
+var obj = {
+ array: [
+ { o: { array: [{x: {b: [4,6,8]}}, { y: 10} ] }}
+ , { o: { array: [{x: {b: [1,2,3]}}, { x: {z: 10 }}, { x: 'Turkey Day' }] }}
+ , { o: { array: [{x: {b: null }}, { x: { b: [null, 1]}}] }}
+ , { o: { array: [{x: null }] }}
+ , { o: { array: [{y: 3 }] }}
+ , { o: { array: [3, 0, null] }}
+ , { o: { name: 'ha' }}
+ ];
+}
+
+var found = mpath.get('array.o.array.x.b.1', obj);
+
+console.log(found); // prints..
+
+ [ [6, undefined]
+ , [2, undefined, undefined]
+ , [null, 1]
+ , [null]
+ , [undefined]
+ , [undefined, undefined, undefined]
+ , undefined
+ ]
+
+```
+
+#####Field selection rules:
+
+The following rules are iteratively applied to each `segment` in the passed `path`. For example:
+
+```js
+var path = 'one.two.14'; // path
+'one' // segment 0
+'two' // segment 1
+14 // segment 2
+```
+
+- 1) when value of the segment parent is not an array, return the value of `parent.segment`
+- 2) when value of the segment parent is an array
+ - a) if the segment is an integer, replace the parent array with the value at `parent[segment]`
+ - b) if not an integer, keep the array but replace each array `item` with the value returned from calling `get(remainingSegments, item)` or undefined if falsey.
+
+#####Maps
+
+`mpath.get` also accepts an optional `map` argument which receives each individual found value. The value returned from the `map` function will be used in the original found values place.
+
+```js
+var obj = {
+ comments: [
+ { title: 'funny' },
+ { title: 'exciting!' }
+ ]
+}
+
+mpath.get('comments.title', obj, function (val) {
+ return 'funny' == val
+ ? 'amusing'
+ : val;
+});
+// ['amusing', 'exciting!']
+```
+
+###Setting
+
+```js
+var obj = {
+ comments: [
+ { title: 'funny' },
+ { title: 'exciting!' }
+ ]
+}
+
+mpath.set('comments.1.title', 'hilarious', obj)
+console.log(obj.comments[1].title) // 'hilarious'
+```
+
+`mpath.set` supports the same array property notation as `mpath.get`.
+
+```js
+var obj = {
+ comments: [
+ { title: 'funny' },
+ { title: 'exciting!' }
+ ]
+}
+
+mpath.set('comments.title', ['hilarious', 'fruity'], obj);
+
+console.log(obj); // prints..
+
+ { comments: [
+ { title: 'hilarious' },
+ { title: 'fruity' }
+ ]}
+```
+
+Array property and indexing syntax can be used together also when setting.
+
+```js
+var obj = {
+ array: [
+ { o: { array: [{x: {b: [4,6,8]}}, { y: 10} ] }}
+ , { o: { array: [{x: {b: [1,2,3]}}, { x: {z: 10 }}, { x: 'Turkey Day' }] }}
+ , { o: { array: [{x: {b: null }}, { x: { b: [null, 1]}}] }}
+ , { o: { array: [{x: null }] }}
+ , { o: { array: [{y: 3 }] }}
+ , { o: { array: [3, 0, null] }}
+ , { o: { name: 'ha' }}
+ ]
+}
+
+mpath.set('array.1.o', 'this was changed', obj);
+
+console.log(require('util').inspect(obj, false, 1000)); // prints..
+
+{
+ array: [
+ { o: { array: [{x: {b: [4,6,8]}}, { y: 10} ] }}
+ , { o: 'this was changed' }
+ , { o: { array: [{x: {b: null }}, { x: { b: [null, 1]}}] }}
+ , { o: { array: [{x: null }] }}
+ , { o: { array: [{y: 3 }] }}
+ , { o: { array: [3, 0, null] }}
+ , { o: { name: 'ha' }}
+ ];
+}
+
+mpath.set('array.o.array.x', 'this was changed too', obj);
+
+console.log(require('util').inspect(obj, false, 1000)); // prints..
+
+{
+ array: [
+ { o: { array: [{x: 'this was changed too'}, { y: 10, x: 'this was changed too'} ] }}
+ , { o: 'this was changed' }
+ , { o: { array: [{x: 'this was changed too'}, { x: 'this was changed too'}] }}
+ , { o: { array: [{x: 'this was changed too'}] }}
+ , { o: { array: [{x: 'this was changed too', y: 3 }] }}
+ , { o: { array: [3, 0, null] }}
+ , { o: { name: 'ha' }}
+ ];
+}
+```
+
+####Setting arrays
+
+By default, setting a property within an array to another array results in each element of the new array being set to the item in the destination array at the matching index. An example is helpful.
+
+```js
+var obj = {
+ comments: [
+ { title: 'funny' },
+ { title: 'exciting!' }
+ ]
+}
+
+mpath.set('comments.title', ['hilarious', 'fruity'], obj);
+
+console.log(obj); // prints..
+
+ { comments: [
+ { title: 'hilarious' },
+ { title: 'fruity' }
+ ]}
+```
+
+If we do not desire this destructuring-like assignment behavior we may instead specify the `$` operator in the path being set to force the array to be copied directly.
+
+```js
+var obj = {
+ comments: [
+ { title: 'funny' },
+ { title: 'exciting!' }
+ ]
+}
+
+mpath.set('comments.$.title', ['hilarious', 'fruity'], obj);
+
+console.log(obj); // prints..
+
+ { comments: [
+ { title: ['hilarious', 'fruity'] },
+ { title: ['hilarious', 'fruity'] }
+ ]}
+```
+
+####Field assignment rules
+
+The rules utilized mirror those used on `mpath.get`, meaning we can take values returned from `mpath.get`, update them, and reassign them using `mpath.set`. Note that setting nested arrays of arrays can get unweildy quickly. Check out the [tests](https://github.com/aheckmann/mpath/blob/master/test/index.js) for more extreme examples.
+
+#####Maps
+
+`mpath.set` also accepts an optional `map` argument which receives each individual value being set. The value returned from the `map` function will be used in the original values place.
+
+```js
+var obj = {
+ comments: [
+ { title: 'funny' },
+ { title: 'exciting!' }
+ ]
+}
+
+mpath.set('comments.title', ['hilarious', 'fruity'], obj, function (val) {
+ return val.length;
+});
+
+console.log(obj); // prints..
+
+ { comments: [
+ { title: 9 },
+ { title: 6 }
+ ]}
+```
+
+### Custom object types
+
+Sometimes you may want to enact the same functionality on custom object types that store all their real data internally, say for an ODM type object. No fear, `mpath` has you covered. Simply pass the name of the property being used to store the internal data and it will be traversed instead:
+
+```js
+var mpath = require('mpath');
+
+var obj = {
+ comments: [
+ { title: 'exciting!', _doc: { title: 'great!' }}
+ ]
+}
+
+mpath.get('comments.0.title', obj, '_doc') // 'great!'
+mpath.set('comments.0.title', 'nov 3rd', obj, '_doc')
+mpath.get('comments.0.title', obj, '_doc') // 'nov 3rd'
+mpath.get('comments.0.title', obj) // 'exciting'
+```
+
+When used with a `map`, the `map` argument comes last.
+
+```js
+mpath.get(path, obj, '_doc', map);
+mpath.set(path, val, obj, '_doc', map);
+```
+
+[LICENSE](https://github.com/aheckmann/mpath/blob/master/LICENSE)
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/bench.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/bench.js
new file mode 100644
index 0000000..7ec6a87
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/bench.js
@@ -0,0 +1,109 @@
+
+var mpath = require('./')
+var Bench = require('benchmark');
+var sha = require('child_process').exec("git log --pretty=format:'%h' -n 1", function (err, sha) {
+ if (err) throw err;
+
+ var fs = require('fs')
+ var filename = __dirname + '/bench.out';
+ var out = fs.createWriteStream(filename, { flags: 'a', encoding: 'utf8' });
+
+ /**
+ * test doc creator
+ */
+
+ function doc () {
+ var o = { first: { second: { third: [3,{ name: 'aaron' }, 9] }}};
+ o.comments = [
+ { name: 'one' }
+ , { name: 'two', _doc: { name: '2' }}
+ , { name: 'three'
+ , comments: [{},{ comments: [{val: 'twoo'}]}]
+ , _doc: { name: '3', comments: [{},{ _doc: { comments: [{ val: 2 }] }}] }}
+ ];
+ o.name = 'jiro';
+ o.array = [
+ { o: { array: [{x: {b: [4,6,8]}}, { y: 10} ] }}
+ , { o: { array: [{x: {b: [1,2,3]}}, { x: {z: 10 }}, { x: {b: 'hi'}}] }}
+ , { o: { array: [{x: {b: null }}, { x: { b: [null, 1]}}] }}
+ , { o: { array: [{x: null }] }}
+ , { o: { array: [{y: 3 }] }}
+ , { o: { array: [3, 0, null] }}
+ , { o: { name: 'ha' }}
+ ];
+ o.arr = [
+ { arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+ , { yep: true }
+ ]
+ return o;
+ }
+
+ var o = doc();
+
+ var s = new Bench.Suite;
+ s.add('mpath.get("first", obj)', function () {
+ mpath.get('first', o);
+ })
+ s.add('mpath.get("first.second", obj)', function () {
+ mpath.get('first.second', o);
+ })
+ s.add('mpath.get("first.second.third.1.name", obj)', function () {
+ mpath.get('first.second.third.1.name', o);
+ })
+ s.add('mpath.get("comments", obj)', function () {
+ mpath.get('comments', o);
+ })
+ s.add('mpath.get("comments.1", obj)', function () {
+ mpath.get('comments.1', o);
+ })
+ s.add('mpath.get("comments.2.name", obj)', function () {
+ mpath.get('comments.2.name', o);
+ })
+ s.add('mpath.get("comments.2.comments.1.comments.0.val", obj)', function () {
+ mpath.get('comments.2.comments.1.comments.0.val', o);
+ })
+ s.add('mpath.get("comments.name", obj)', function () {
+ mpath.get('comments.name', o);
+ })
+
+ s.add('mpath.set("first", obj, val)', function () {
+ mpath.set('first', o, 1);
+ })
+ s.add('mpath.set("first.second", obj, val)', function () {
+ mpath.set('first.second', o, 1);
+ })
+ s.add('mpath.set("first.second.third.1.name", obj, val)', function () {
+ mpath.set('first.second.third.1.name', o, 1);
+ })
+ s.add('mpath.set("comments", obj, val)', function () {
+ mpath.set('comments', o, 1);
+ })
+ s.add('mpath.set("comments.1", obj, val)', function () {
+ mpath.set('comments.1', o, 1);
+ })
+ s.add('mpath.set("comments.2.name", obj, val)', function () {
+ mpath.set('comments.2.name', o, 1);
+ })
+ s.add('mpath.set("comments.2.comments.1.comments.0.val", obj, val)', function () {
+ mpath.set('comments.2.comments.1.comments.0.val', o, 1);
+ })
+ s.add('mpath.set("comments.name", obj, val)', function () {
+ mpath.set('comments.name', o, 1);
+ })
+
+ s.on('start', function () {
+ console.log('starting...');
+ out.write('*' + sha + ': ' + String(new Date()) + '\n');
+ });
+ s.on('cycle', function (e) {
+ var s = String(e.target);
+ console.log(s);
+ out.write(s + '\n');
+ })
+ s.on('complete', function () {
+ console.log('done')
+ out.end('');
+ })
+ s.run()
+})
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/bench.log b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/bench.log
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/bench.log
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/bench.out b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/bench.out
new file mode 100644
index 0000000..40d3c31
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/bench.out
@@ -0,0 +1,69 @@
+*b566c26: Fri Mar 15 2013 14:14:04 GMT-0700 (PDT)
+mpath.get("first", obj) x 3,827,405 ops/sec ±0.91% (90 runs sampled)
+mpath.get("first.second", obj) x 4,930,222 ops/sec ±1.92% (91 runs sampled)
+mpath.get("first.second.third.1.name", obj) x 3,070,837 ops/sec ±1.45% (97 runs sampled)
+mpath.get("comments", obj) x 3,649,771 ops/sec ±1.71% (93 runs sampled)
+mpath.get("comments.1", obj) x 3,846,728 ops/sec ±0.86% (94 runs sampled)
+mpath.get("comments.2.name", obj) x 3,527,680 ops/sec ±0.95% (96 runs sampled)
+mpath.get("comments.2.comments.1.comments.0.val", obj) x 2,046,982 ops/sec ±0.80% (96 runs sampled)
+mpath.get("comments.name", obj) x 625,546 ops/sec ±2.02% (82 runs sampled)
+*e42bdb1: Fri Mar 15 2013 14:19:28 GMT-0700 (PDT)
+mpath.get("first", obj) x 3,700,783 ops/sec ±1.30% (95 runs sampled)
+mpath.get("first.second", obj) x 4,621,795 ops/sec ±0.86% (95 runs sampled)
+mpath.get("first.second.third.1.name", obj) x 3,012,671 ops/sec ±1.21% (100 runs sampled)
+mpath.get("comments", obj) x 3,677,694 ops/sec ±0.80% (96 runs sampled)
+mpath.get("comments.1", obj) x 3,798,862 ops/sec ±0.81% (91 runs sampled)
+mpath.get("comments.2.name", obj) x 3,489,356 ops/sec ±0.66% (98 runs sampled)
+mpath.get("comments.2.comments.1.comments.0.val", obj) x 2,004,076 ops/sec ±0.85% (99 runs sampled)
+mpath.get("comments.name", obj) x 613,270 ops/sec ±1.33% (83 runs sampled)
+*0521aac: Fri Mar 15 2013 16:37:16 GMT-0700 (PDT)
+mpath.get("first", obj) x 3,834,755 ops/sec ±0.70% (100 runs sampled)
+mpath.get("first.second", obj) x 4,999,965 ops/sec ±1.01% (98 runs sampled)
+mpath.get("first.second.third.1.name", obj) x 3,125,953 ops/sec ±0.97% (100 runs sampled)
+mpath.get("comments", obj) x 3,759,233 ops/sec ±0.81% (97 runs sampled)
+mpath.get("comments.1", obj) x 3,894,893 ops/sec ±0.76% (96 runs sampled)
+mpath.get("comments.2.name", obj) x 3,576,929 ops/sec ±0.68% (98 runs sampled)
+mpath.get("comments.2.comments.1.comments.0.val", obj) x 2,149,610 ops/sec ±0.67% (97 runs sampled)
+mpath.get("comments.name", obj) x 629,259 ops/sec ±1.30% (87 runs sampled)
+mpath.set("first", obj, val) x 2,869,477 ops/sec ±0.63% (97 runs sampled)
+mpath.set("first.second", obj, val) x 2,418,751 ops/sec ±0.62% (98 runs sampled)
+mpath.set("first.second.third.1.name", obj, val) x 2,313,099 ops/sec ±0.69% (94 runs sampled)
+mpath.set("comments", obj, val) x 2,680,882 ops/sec ±0.76% (99 runs sampled)
+mpath.set("comments.1", obj, val) x 2,401,829 ops/sec ±0.68% (98 runs sampled)
+mpath.set("comments.2.name", obj, val) x 2,335,081 ops/sec ±1.07% (96 runs sampled)
+mpath.set("comments.2.comments.1.comments.0.val", obj, val) x 2,245,436 ops/sec ±0.76% (92 runs sampled)
+mpath.set("comments.name", obj, val) x 2,356,278 ops/sec ±1.15% (100 runs sampled)
+*97e85d3: Fri Mar 15 2013 16:39:21 GMT-0700 (PDT)
+mpath.get("first", obj) x 3,837,614 ops/sec ±0.74% (99 runs sampled)
+mpath.get("first.second", obj) x 4,991,779 ops/sec ±1.01% (94 runs sampled)
+mpath.get("first.second.third.1.name", obj) x 3,078,455 ops/sec ±1.17% (96 runs sampled)
+mpath.get("comments", obj) x 3,770,961 ops/sec ±0.45% (101 runs sampled)
+mpath.get("comments.1", obj) x 3,832,814 ops/sec ±0.67% (92 runs sampled)
+mpath.get("comments.2.name", obj) x 3,536,436 ops/sec ±0.49% (100 runs sampled)
+mpath.get("comments.2.comments.1.comments.0.val", obj) x 2,141,947 ops/sec ±0.72% (98 runs sampled)
+mpath.get("comments.name", obj) x 667,898 ops/sec ±1.62% (85 runs sampled)
+mpath.set("first", obj, val) x 2,642,517 ops/sec ±0.72% (98 runs sampled)
+mpath.set("first.second", obj, val) x 2,502,124 ops/sec ±1.28% (99 runs sampled)
+mpath.set("first.second.third.1.name", obj, val) x 2,426,804 ops/sec ±0.55% (99 runs sampled)
+mpath.set("comments", obj, val) x 2,699,478 ops/sec ±0.85% (98 runs sampled)
+mpath.set("comments.1", obj, val) x 2,494,454 ops/sec ±1.05% (96 runs sampled)
+mpath.set("comments.2.name", obj, val) x 2,463,894 ops/sec ±0.86% (98 runs sampled)
+mpath.set("comments.2.comments.1.comments.0.val", obj, val) x 2,320,398 ops/sec ±0.82% (95 runs sampled)
+mpath.set("comments.name", obj, val) x 2,512,408 ops/sec ±0.77% (95 runs sampled)
+*2368a6d: Fri Mar 22 2013 14:07:40 GMT-0700 (PDT)
+mpath.get("first", obj) x 3,932,284 ops/sec ±0.65% (98 runs sampled)
+mpath.get("first.second", obj) x 4,982,307 ops/sec ±1.52% (91 runs sampled)
+mpath.get("first.second.third.1.name", obj) x 3,094,619 ops/sec ±1.17% (95 runs sampled)
+mpath.get("comments", obj) x 3,843,924 ops/sec ±0.76% (95 runs sampled)
+mpath.get("comments.1", obj) x 3,864,491 ops/sec ±1.03% (96 runs sampled)
+mpath.get("comments.2.name", obj) x 3,568,867 ops/sec ±0.79% (96 runs sampled)
+mpath.get("comments.2.comments.1.comments.0.val", obj) x 2,120,898 ops/sec ±0.94% (95 runs sampled)
+mpath.get("comments.name", obj) x 623,508 ops/sec ±1.95% (80 runs sampled)
+mpath.set("first", obj, val) x 2,780,551 ops/sec ±1.23% (97 runs sampled)
+mpath.set("first.second", obj, val) x 2,227,087 ops/sec ±0.59% (97 runs sampled)
+mpath.set("first.second.third.1.name", obj, val) x 2,145,494 ops/sec ±0.86% (96 runs sampled)
+mpath.set("comments", obj, val) x 2,768,894 ops/sec ±0.90% (98 runs sampled)
+mpath.set("comments.1", obj, val) x 2,202,542 ops/sec ±0.92% (95 runs sampled)
+mpath.set("comments.2.name", obj, val) x 2,169,428 ops/sec ±1.10% (96 runs sampled)
+mpath.set("comments.2.comments.1.comments.0.val", obj, val) x 2,060,389 ops/sec ±0.72% (100 runs sampled)
+mpath.set("comments.name", obj, val) x 2,128,875 ops/sec ±1.16% (97 runs sampled)
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/component.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/component.json
new file mode 100644
index 0000000..53c2846
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/component.json
@@ -0,0 +1,8 @@
+{
+ "name": "mpath",
+ "version": "0.2.1",
+ "main": "lib/index.js",
+ "scripts": [
+ "lib/index.js"
+ ]
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/index.js
new file mode 100644
index 0000000..f7b65dd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/index.js
@@ -0,0 +1 @@
+module.exports = exports = require('./lib');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/lib/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/lib/index.js
new file mode 100644
index 0000000..1b755b7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/lib/index.js
@@ -0,0 +1,215 @@
+/**
+ * Returns the value of object `o` at the given `path`.
+ *
+ * ####Example:
+ *
+ * var obj = {
+ * comments: [
+ * { title: 'exciting!', _doc: { title: 'great!' }}
+ * , { title: 'number dos' }
+ * ]
+ * }
+ *
+ * mpath.get('comments.0.title', o) // 'exciting!'
+ * mpath.get('comments.0.title', o, '_doc') // 'great!'
+ * mpath.get('comments.title', o) // ['exciting!', 'number dos']
+ *
+ * // summary
+ * mpath.get(path, o)
+ * mpath.get(path, o, special)
+ * mpath.get(path, o, map)
+ * mpath.get(path, o, special, map)
+ *
+ * @param {String} path
+ * @param {Object} o
+ * @param {String} [special] When this property name is present on any object in the path, walking will continue on the value of this property.
+ * @param {Function} [map] Optional function which receives each individual found value. The value returned from `map` is used in the original values place.
+ */
+
+exports.get = function (path, o, special, map) {
+ var lookup;
+
+ if ('function' == typeof special) {
+ if (special.length < 2) {
+ map = special;
+ special = undefined;
+ } else {
+ lookup = special;
+ special = undefined;
+ }
+ }
+
+ map || (map = K);
+
+ var parts = 'string' == typeof path
+ ? path.split('.')
+ : path
+
+ if (!Array.isArray(parts)) {
+ throw new TypeError('Invalid `path`. Must be either string or array');
+ }
+
+ var obj = o
+ , part;
+
+ for (var i = 0; i < parts.length; ++i) {
+ part = parts[i];
+
+ if (Array.isArray(obj) && !/^\d+$/.test(part)) {
+ // reading a property from the array items
+ var paths = parts.slice(i);
+
+ return obj.map(function (item) {
+ return item
+ ? exports.get(paths, item, special || lookup, map)
+ : map(undefined);
+ });
+ }
+
+ if (lookup) {
+ obj = lookup(obj, part);
+ } else {
+ obj = special && obj[special]
+ ? obj[special][part]
+ : obj[part];
+ }
+
+ if (!obj) return map(obj);
+ }
+
+ return map(obj);
+}
+
+/**
+ * Sets the `val` at the given `path` of object `o`.
+ *
+ * @param {String} path
+ * @param {Anything} val
+ * @param {Object} o
+ * @param {String} [special] When this property name is present on any object in the path, walking will continue on the value of this property.
+ * @param {Function} [map] Optional function which is passed each individual value before setting it. The value returned from `map` is used in the original values place.
+ */
+
+exports.set = function (path, val, o, special, map, _copying) {
+ var lookup;
+
+ if ('function' == typeof special) {
+ if (special.length < 2) {
+ map = special;
+ special = undefined;
+ } else {
+ lookup = special;
+ special = undefined;
+ }
+ }
+
+ map || (map = K);
+
+ var parts = 'string' == typeof path
+ ? path.split('.')
+ : path
+
+ if (!Array.isArray(parts)) {
+ throw new TypeError('Invalid `path`. Must be either string or array');
+ }
+
+ if (null == o) return;
+
+ // the existance of $ in a path tells us if the user desires
+ // the copying of an array instead of setting each value of
+ // the array to the one by one to matching positions of the
+ // current array.
+ var copy = _copying || /\$/.test(path)
+ , obj = o
+ , part
+
+ for (var i = 0, len = parts.length - 1; i < len; ++i) {
+ part = parts[i];
+
+ if ('$' == part) {
+ if (i == len - 1) {
+ break;
+ } else {
+ continue;
+ }
+ }
+
+ if (Array.isArray(obj) && !/^\d+$/.test(part)) {
+ var paths = parts.slice(i);
+ if (!copy && Array.isArray(val)) {
+ for (var j = 0; j < obj.length && j < val.length; ++j) {
+ // assignment of single values of array
+ exports.set(paths, val[j], obj[j], special || lookup, map, copy);
+ }
+ } else {
+ for (var j = 0; j < obj.length; ++j) {
+ // assignment of entire value
+ exports.set(paths, val, obj[j], special || lookup, map, copy);
+ }
+ }
+ return;
+ }
+
+ if (lookup) {
+ obj = lookup(obj, part);
+ } else {
+ obj = special && obj[special]
+ ? obj[special][part]
+ : obj[part];
+ }
+
+ if (!obj) return;
+ }
+
+ // process the last property of the path
+
+ part = parts[len];
+
+ // use the special property if exists
+ if (special && obj[special]) {
+ obj = obj[special];
+ }
+
+ // set the value on the last branch
+ if (Array.isArray(obj) && !/^\d+$/.test(part)) {
+ if (!copy && Array.isArray(val)) {
+ for (var item, j = 0; j < obj.length && j < val.length; ++j) {
+ item = obj[j];
+ if (item) {
+ if (lookup) {
+ lookup(item, part, map(val[j]));
+ } else {
+ if (item[special]) item = item[special];
+ item[part] = map(val[j]);
+ }
+ }
+ }
+ } else {
+ for (var j = 0; j < obj.length; ++j) {
+ item = obj[j];
+ if (item) {
+ if (lookup) {
+ lookup(item, part, map(val));
+ } else {
+ if (item[special]) item = item[special];
+ item[part] = map(val);
+ }
+ }
+ }
+ }
+ } else {
+ if (lookup) {
+ lookup(obj, part, map(val));
+ } else {
+ obj[part] = map(val);
+ }
+ }
+}
+
+/*!
+ * Returns the value passed to it.
+ */
+
+function K (v) {
+ return v;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/package.json
new file mode 100644
index 0000000..b17f0fc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "mpath",
+ "version": "0.2.1",
+ "description": "{G,S}et object values using MongoDB-like path notation",
+ "main": "index.js",
+ "scripts": {
+ "test": "make test"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/aheckmann/mpath.git"
+ },
+ "keywords": [
+ "mongodb",
+ "path",
+ "get",
+ "set"
+ ],
+ "author": {
+ "name": "Aaron Heckmann",
+ "email": "aaron.heckmann+github@gmail.com"
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "mocha": "1.8.1",
+ "benchmark": "~1.0.0"
+ },
+ "_id": "mpath@0.2.1",
+ "dist": {
+ "shasum": "3a4e829359801de96309c27a6b2e102e89f9e96e",
+ "tarball": "https://registry.npmjs.org/mpath/-/mpath-0.2.1.tgz"
+ },
+ "_from": "mpath@0.2.1",
+ "_npmVersion": "1.2.15",
+ "_npmUser": {
+ "name": "aaron",
+ "email": "aaron.heckmann+github@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "aaron",
+ "email": "aaron.heckmann+github@gmail.com"
+ }
+ ],
+ "directories": {},
+ "_shasum": "3a4e829359801de96309c27a6b2e102e89f9e96e",
+ "_resolved": "https://registry.npmjs.org/mpath/-/mpath-0.2.1.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/test/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/test/index.js
new file mode 100644
index 0000000..53bdbd7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpath/test/index.js
@@ -0,0 +1,1790 @@
+
+/**
+ * Test dependencies.
+ */
+
+var mpath = require('../')
+var assert = require('assert')
+
+/**
+ * logging helper
+ */
+
+function log (o) {
+ console.log();
+ console.log(require('util').inspect(o, false, 1000));
+}
+
+/**
+ * special path for override tests
+ */
+
+var special = '_doc';
+
+/**
+ * Tests
+ */
+
+describe('mpath', function(){
+
+ /**
+ * test doc creator
+ */
+
+ function doc () {
+ var o = { first: { second: { third: [3,{ name: 'aaron' }, 9] }}};
+ o.comments = [
+ { name: 'one' }
+ , { name: 'two', _doc: { name: '2' }}
+ , { name: 'three'
+ , comments: [{},{ comments: [{val: 'twoo'}]}]
+ , _doc: { name: '3', comments: [{},{ _doc: { comments: [{ val: 2 }] }}] }}
+ ];
+ o.name = 'jiro';
+ o.array = [
+ { o: { array: [{x: {b: [4,6,8]}}, { y: 10} ] }}
+ , { o: { array: [{x: {b: [1,2,3]}}, { x: {z: 10 }}, { x: {b: 'hi'}}] }}
+ , { o: { array: [{x: {b: null }}, { x: { b: [null, 1]}}] }}
+ , { o: { array: [{x: null }] }}
+ , { o: { array: [{y: 3 }] }}
+ , { o: { array: [3, 0, null] }}
+ , { o: { name: 'ha' }}
+ ];
+ o.arr = [
+ { arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+ , { yep: true }
+ ]
+ return o;
+ }
+
+ describe('get', function(){
+ var o = doc();
+
+ it('`path` must be a string or array', function(done){
+ assert.throws(function () {
+ mpath.get({}, o);
+ }, /Must be either string or array/);
+ assert.throws(function () {
+ mpath.get(4, o);
+ }, /Must be either string or array/);
+ assert.throws(function () {
+ mpath.get(function(){}, o);
+ }, /Must be either string or array/);
+ assert.throws(function () {
+ mpath.get(/asdf/, o);
+ }, /Must be either string or array/);
+ assert.throws(function () {
+ mpath.get(Math, o);
+ }, /Must be either string or array/);
+ assert.throws(function () {
+ mpath.get(Buffer, o);
+ }, /Must be either string or array/);
+ assert.doesNotThrow(function () {
+ mpath.get('string', o);
+ });
+ assert.doesNotThrow(function () {
+ mpath.get([], o);
+ });
+ done();
+ })
+
+ describe('without `special`', function(){
+ it('works', function(done){
+ assert.equal('jiro', mpath.get('name', o));
+
+ assert.deepEqual(
+ { second: { third: [3,{ name: 'aaron' }, 9] }}
+ , mpath.get('first', o)
+ );
+
+ assert.deepEqual(
+ { third: [3,{ name: 'aaron' }, 9] }
+ , mpath.get('first.second', o)
+ );
+
+ assert.deepEqual(
+ [3,{ name: 'aaron' }, 9]
+ , mpath.get('first.second.third', o)
+ );
+
+ assert.deepEqual(
+ 3
+ , mpath.get('first.second.third.0', o)
+ );
+
+ assert.deepEqual(
+ 9
+ , mpath.get('first.second.third.2', o)
+ );
+
+ assert.deepEqual(
+ { name: 'aaron' }
+ , mpath.get('first.second.third.1', o)
+ );
+
+ assert.deepEqual(
+ 'aaron'
+ , mpath.get('first.second.third.1.name', o)
+ );
+
+ assert.deepEqual([
+ { name: 'one' }
+ , { name: 'two', _doc: { name: '2' }}
+ , { name: 'three'
+ , comments: [{},{ comments: [{val: 'twoo'}]}]
+ , _doc: { name: '3', comments: [{},{ _doc: { comments: [{ val: 2 }] }}]}}],
+ mpath.get('comments', o));
+
+ assert.deepEqual({ name: 'one' }, mpath.get('comments.0', o));
+ assert.deepEqual('one', mpath.get('comments.0.name', o));
+ assert.deepEqual('two', mpath.get('comments.1.name', o));
+ assert.deepEqual('three', mpath.get('comments.2.name', o));
+
+ assert.deepEqual([{},{ comments: [{val: 'twoo'}]}]
+ , mpath.get('comments.2.comments', o));
+
+ assert.deepEqual({ comments: [{val: 'twoo'}]}
+ , mpath.get('comments.2.comments.1', o));
+
+ assert.deepEqual('twoo', mpath.get('comments.2.comments.1.comments.0.val', o));
+
+ done();
+ })
+
+ it('handles array.property dot-notation', function(done){
+ assert.deepEqual(
+ ['one', 'two', 'three']
+ , mpath.get('comments.name', o)
+ );
+ done();
+ })
+
+ it('handles array.array notation', function(done){
+ assert.deepEqual(
+ [undefined, undefined, [{}, {comments:[{val:'twoo'}]}]]
+ , mpath.get('comments.comments', o)
+ );
+ done();
+ })
+
+ it('handles prop.prop.prop.arrayProperty notation', function(done){
+ assert.deepEqual(
+ [undefined, 'aaron', undefined]
+ , mpath.get('first.second.third.name', o)
+ );
+ assert.deepEqual(
+ [1, 'aaron', 1]
+ , mpath.get('first.second.third.name', o, function (v) {
+ return undefined === v ? 1 : v;
+ })
+ );
+ done();
+ })
+
+ it('handles array.prop.array', function(done){
+ assert.deepEqual(
+ [ [{x: {b: [4,6,8]}}, { y: 10} ]
+ , [{x: {b: [1,2,3]}}, { x: {z: 10 }}, { x: {b: 'hi'}}]
+ , [{x: {b: null }}, { x: { b: [null, 1]}}]
+ , [{x: null }]
+ , [{y: 3 }]
+ , [3, 0, null]
+ , undefined
+ ]
+ , mpath.get('array.o.array', o)
+ );
+ done();
+ })
+
+ it('handles array.prop.array.index', function(done){
+ assert.deepEqual(
+ [ {x: {b: [4,6,8]}}
+ , {x: {b: [1,2,3]}}
+ , {x: {b: null }}
+ , {x: null }
+ , {y: 3 }
+ , 3
+ , undefined
+ ]
+ , mpath.get('array.o.array.0', o)
+ );
+ done();
+ })
+
+ it('handles array.prop.array.index.prop', function(done){
+ assert.deepEqual(
+ [ {b: [4,6,8]}
+ , {b: [1,2,3]}
+ , {b: null }
+ , null
+ , undefined
+ , undefined
+ , undefined
+ ]
+ , mpath.get('array.o.array.0.x', o)
+ );
+ done();
+ })
+
+ it('handles array.prop.array.prop', function(done){
+ assert.deepEqual(
+ [ [undefined, 10 ]
+ , [undefined, undefined, undefined]
+ , [undefined, undefined]
+ , [undefined]
+ , [3]
+ , [undefined, undefined, undefined]
+ , undefined
+ ]
+ , mpath.get('array.o.array.y', o)
+ );
+ assert.deepEqual(
+ [ [{b: [4,6,8]}, undefined]
+ , [{b: [1,2,3]}, {z: 10 }, {b: 'hi'}]
+ , [{b: null }, { b: [null, 1]}]
+ , [null]
+ , [undefined]
+ , [undefined, undefined, undefined]
+ , undefined
+ ]
+ , mpath.get('array.o.array.x', o)
+ );
+ done();
+ })
+
+ it('handles array.prop.array.prop.prop', function(done){
+ assert.deepEqual(
+ [ [[4,6,8], undefined]
+ , [[1,2,3], undefined, 'hi']
+ , [null, [null, 1]]
+ , [null]
+ , [undefined]
+ , [undefined, undefined, undefined]
+ , undefined
+ ]
+ , mpath.get('array.o.array.x.b', o)
+ );
+ done();
+ })
+
+ it('handles array.prop.array.prop.prop.index', function(done){
+ assert.deepEqual(
+ [ [6, undefined]
+ , [2, undefined, 'i'] // undocumented feature (string indexing)
+ , [null, 1]
+ , [null]
+ , [undefined]
+ , [undefined, undefined, undefined]
+ , undefined
+ ]
+ , mpath.get('array.o.array.x.b.1', o)
+ );
+ assert.deepEqual(
+ [ [6, 0]
+ , [2, 0, 'i'] // undocumented feature (string indexing)
+ , [null, 1]
+ , [null]
+ , [0]
+ , [0, 0, 0]
+ , 0
+ ]
+ , mpath.get('array.o.array.x.b.1', o, function (v) {
+ return undefined === v ? 0 : v;
+ })
+ );
+ done();
+ })
+
+ it('handles array.index.prop.prop', function(done){
+ assert.deepEqual(
+ [{x: {b: [1,2,3]}}, { x: {z: 10 }}, { x: {b: 'hi'}}]
+ , mpath.get('array.1.o.array', o)
+ );
+ assert.deepEqual(
+ ['hi','hi','hi']
+ , mpath.get('array.1.o.array', o, function (v) {
+ if (Array.isArray(v)) {
+ return v.map(function (val) {
+ return 'hi';
+ })
+ }
+ return v;
+ })
+ );
+ done();
+ })
+
+ it('handles array.array.index', function(done){
+ assert.deepEqual(
+ [{ a: { c: 48 }}, undefined]
+ , mpath.get('arr.arr.1', o)
+ );
+ assert.deepEqual(
+ ['woot', undefined]
+ , mpath.get('arr.arr.1', o, function (v) {
+ if (v && v.a && v.a.c) return 'woot';
+ return v;
+ })
+ );
+ done();
+ })
+
+ it('handles array.array.index.prop', function(done){
+ assert.deepEqual(
+ [{ c: 48 }, 'woot']
+ , mpath.get('arr.arr.1.a', o, function (v) {
+ if (undefined === v) return 'woot';
+ return v;
+ })
+ );
+ assert.deepEqual(
+ [{ c: 48 }, undefined]
+ , mpath.get('arr.arr.1.a', o)
+ );
+ mpath.set('arr.arr.1.a', [{c:49},undefined], o)
+ assert.deepEqual(
+ [{ c: 49 }, undefined]
+ , mpath.get('arr.arr.1.a', o)
+ );
+ mpath.set('arr.arr.1.a', [{c:48},undefined], o)
+ done();
+ })
+
+ it('handles array.array.index.prop.prop', function(done){
+ assert.deepEqual(
+ [48, undefined]
+ , mpath.get('arr.arr.1.a.c', o)
+ );
+ assert.deepEqual(
+ [48, 'woot']
+ , mpath.get('arr.arr.1.a.c', o, function (v) {
+ if (undefined === v) return 'woot';
+ return v;
+ })
+ );
+ done();
+ })
+
+ })
+
+ describe('with `special`', function(){
+ describe('that is a string', function(){
+ it('works', function(done){
+ assert.equal('jiro', mpath.get('name', o, special));
+
+ assert.deepEqual(
+ { second: { third: [3,{ name: 'aaron' }, 9] }}
+ , mpath.get('first', o, special)
+ );
+
+ assert.deepEqual(
+ { third: [3,{ name: 'aaron' }, 9] }
+ , mpath.get('first.second', o, special)
+ );
+
+ assert.deepEqual(
+ [3,{ name: 'aaron' }, 9]
+ , mpath.get('first.second.third', o, special)
+ );
+
+ assert.deepEqual(
+ 3
+ , mpath.get('first.second.third.0', o, special)
+ );
+
+ assert.deepEqual(
+ 4
+ , mpath.get('first.second.third.0', o, special, function (v) {
+ return 3 === v ? 4 : v;
+ })
+ );
+
+ assert.deepEqual(
+ 9
+ , mpath.get('first.second.third.2', o, special)
+ );
+
+ assert.deepEqual(
+ { name: 'aaron' }
+ , mpath.get('first.second.third.1', o, special)
+ );
+
+ assert.deepEqual(
+ 'aaron'
+ , mpath.get('first.second.third.1.name', o, special)
+ );
+
+ assert.deepEqual([
+ { name: 'one' }
+ , { name: 'two', _doc: { name: '2' }}
+ , { name: 'three'
+ , comments: [{},{ comments: [{val: 'twoo'}]}]
+ , _doc: { name: '3', comments: [{},{ _doc: { comments: [{ val: 2 }] }}]}}],
+ mpath.get('comments', o, special));
+
+ assert.deepEqual({ name: 'one' }, mpath.get('comments.0', o, special));
+ assert.deepEqual('one', mpath.get('comments.0.name', o, special));
+ assert.deepEqual('2', mpath.get('comments.1.name', o, special));
+ assert.deepEqual('3', mpath.get('comments.2.name', o, special));
+ assert.deepEqual('nice', mpath.get('comments.2.name', o, special, function (v) {
+ return '3' === v ? 'nice' : v;
+ }));
+
+ assert.deepEqual([{},{ _doc: { comments: [{ val: 2 }] }}]
+ , mpath.get('comments.2.comments', o, special));
+
+ assert.deepEqual({ _doc: { comments: [{val: 2}]}}
+ , mpath.get('comments.2.comments.1', o, special));
+
+ assert.deepEqual(2, mpath.get('comments.2.comments.1.comments.0.val', o, special));
+ done();
+ })
+
+ it('handles array.property dot-notation', function(done){
+ assert.deepEqual(
+ ['one', '2', '3']
+ , mpath.get('comments.name', o, special)
+ );
+ assert.deepEqual(
+ ['one', 2, '3']
+ , mpath.get('comments.name', o, special, function (v) {
+ return '2' === v ? 2 : v
+ })
+ );
+ done();
+ })
+
+ it('handles array.array notation', function(done){
+ assert.deepEqual(
+ [undefined, undefined, [{}, {_doc: { comments:[{val:2}]}}]]
+ , mpath.get('comments.comments', o, special)
+ );
+ done();
+ })
+
+ it('handles array.array.index.array', function(done){
+ assert.deepEqual(
+ [undefined, undefined, [{val:2}]]
+ , mpath.get('comments.comments.1.comments', o, special)
+ );
+ done();
+ })
+
+ it('handles array.array.index.array.prop', function(done){
+ assert.deepEqual(
+ [undefined, undefined, [2]]
+ , mpath.get('comments.comments.1.comments.val', o, special)
+ );
+ assert.deepEqual(
+ ['nil', 'nil', [2]]
+ , mpath.get('comments.comments.1.comments.val', o, special, function (v) {
+ return undefined === v ? 'nil' : v;
+ })
+ );
+ done();
+ })
+ })
+
+ describe('that is a function', function(){
+ var special = function (obj, key) {
+ return obj[key]
+ }
+
+ it('works', function(done){
+ assert.equal('jiro', mpath.get('name', o, special));
+
+ assert.deepEqual(
+ { second: { third: [3,{ name: 'aaron' }, 9] }}
+ , mpath.get('first', o, special)
+ );
+
+ assert.deepEqual(
+ { third: [3,{ name: 'aaron' }, 9] }
+ , mpath.get('first.second', o, special)
+ );
+
+ assert.deepEqual(
+ [3,{ name: 'aaron' }, 9]
+ , mpath.get('first.second.third', o, special)
+ );
+
+ assert.deepEqual(
+ 3
+ , mpath.get('first.second.third.0', o, special)
+ );
+
+ assert.deepEqual(
+ 4
+ , mpath.get('first.second.third.0', o, special, function (v) {
+ return 3 === v ? 4 : v;
+ })
+ );
+
+ assert.deepEqual(
+ 9
+ , mpath.get('first.second.third.2', o, special)
+ );
+
+ assert.deepEqual(
+ { name: 'aaron' }
+ , mpath.get('first.second.third.1', o, special)
+ );
+
+ assert.deepEqual(
+ 'aaron'
+ , mpath.get('first.second.third.1.name', o, special)
+ );
+
+ assert.deepEqual([
+ { name: 'one' }
+ , { name: 'two', _doc: { name: '2' }}
+ , { name: 'three'
+ , comments: [{},{ comments: [{val: 'twoo'}]}]
+ , _doc: { name: '3', comments: [{},{ _doc: { comments: [{ val: 2 }] }}]}}],
+ mpath.get('comments', o, special));
+
+ assert.deepEqual({ name: 'one' }, mpath.get('comments.0', o, special));
+ assert.deepEqual('one', mpath.get('comments.0.name', o, special));
+ assert.deepEqual('two', mpath.get('comments.1.name', o, special));
+ assert.deepEqual('three', mpath.get('comments.2.name', o, special));
+ assert.deepEqual('nice', mpath.get('comments.2.name', o, special, function (v) {
+ return 'three' === v ? 'nice' : v;
+ }));
+
+ assert.deepEqual([{},{ comments: [{ val: 'twoo' }] }]
+ , mpath.get('comments.2.comments', o, special));
+
+ assert.deepEqual({ comments: [{val: 'twoo'}]}
+ , mpath.get('comments.2.comments.1', o, special));
+
+ assert.deepEqual('twoo', mpath.get('comments.2.comments.1.comments.0.val', o, special));
+
+ var overide = false;
+ assert.deepEqual('twoo', mpath.get('comments.8.comments.1.comments.0.val', o, function (obj, path) {
+ if (Array.isArray(obj) && 8 == path) {
+ overide = true;
+ return obj[2];
+ }
+ return obj[path];
+ }));
+ assert.ok(overide);
+
+ done();
+ })
+
+ it('in combination with map', function(done){
+ var special = function (obj, key) {
+ if (Array.isArray(obj)) return obj[key];
+ return obj.mpath;
+ }
+ var map = function (val) {
+ return 'convert' == val
+ ? 'mpath'
+ : val;
+ }
+ var o = { mpath: [{ mpath: 'converse' }, { mpath: 'convert' }] }
+
+ assert.equal('mpath', mpath.get('something.1.kewl', o, special, map));
+ done();
+ })
+ })
+ })
+ })
+
+ describe('set', function(){
+ describe('without `special`', function(){
+ var o = doc();
+
+ it('works', function(done){
+ mpath.set('name', 'a new val', o, function (v) {
+ return 'a new val' === v ? 'changed' : v;
+ });
+ assert.deepEqual('changed', o.name);
+
+ mpath.set('name', 'changed', o);
+ assert.deepEqual('changed', o.name);
+
+ mpath.set('first.second.third', [1,{name:'x'},9], o);
+ assert.deepEqual([1,{name:'x'},9], o.first.second.third);
+
+ mpath.set('first.second.third.1.name', 'y', o)
+ assert.deepEqual([1,{name:'y'},9], o.first.second.third);
+
+ mpath.set('comments.1.name', 'ttwwoo', o);
+ assert.deepEqual({ name: 'ttwwoo', _doc: { name: '2' }}, o.comments[1]);
+
+ mpath.set('comments.2.comments.1.comments.0.expand', 'added', o);
+ assert.deepEqual(
+ { val: 'twoo', expand: 'added'}
+ , o.comments[2].comments[1].comments[0]);
+
+ mpath.set('comments.2.comments.1.comments.2', 'added', o);
+ assert.equal(3, o.comments[2].comments[1].comments.length);
+ assert.deepEqual(
+ { val: 'twoo', expand: 'added'}
+ , o.comments[2].comments[1].comments[0]);
+ assert.deepEqual(
+ undefined
+ , o.comments[2].comments[1].comments[1]);
+ assert.deepEqual(
+ 'added'
+ , o.comments[2].comments[1].comments[2]);
+
+ done();
+ })
+
+ describe('array.path', function(){
+ describe('with single non-array value', function(){
+ it('works', function(done){
+ mpath.set('arr.yep', false, o, function (v) {
+ return false === v ? true: v;
+ });
+ assert.deepEqual([
+ { yep: true, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+ , { yep: true }
+ ], o.arr);
+
+ mpath.set('arr.yep', false, o);
+
+ assert.deepEqual([
+ { yep: false, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+ , { yep: false }
+ ], o.arr);
+
+ done();
+ })
+ })
+ describe('with array of values', function(){
+ it('that are equal in length', function(done){
+ mpath.set('arr.yep', ['one',2], o, function (v) {
+ return 'one' === v ? 1 : v;
+ });
+ assert.deepEqual([
+ { yep: 1, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+ , { yep: 2 }
+ ], o.arr);
+ mpath.set('arr.yep', ['one',2], o);
+
+ assert.deepEqual([
+ { yep: 'one', arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+ , { yep: 2 }
+ ], o.arr);
+
+ done();
+ })
+
+ it('that is less than length', function(done){
+ mpath.set('arr.yep', [47], o, function (v) {
+ return 47 === v ? 4 : v;
+ });
+ assert.deepEqual([
+ { yep: 4, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+ , { yep: 2 }
+ ], o.arr);
+
+ mpath.set('arr.yep', [47], o);
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+ , { yep: 2 }
+ ], o.arr);
+
+ done();
+ })
+
+ it('that is greater than length', function(done){
+ mpath.set('arr.yep', [5,6,7], o, function (v) {
+ return 5 === v ? 'five' : v;
+ });
+ assert.deepEqual([
+ { yep: 'five', arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+ , { yep: 6 }
+ ], o.arr);
+
+ mpath.set('arr.yep', [5,6,7], o);
+ assert.deepEqual([
+ { yep: 5, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+ , { yep: 6 }
+ ], o.arr);
+
+ done();
+ })
+ })
+ })
+
+ describe('array.$.path', function(){
+ describe('with single non-array value', function(){
+ it('copies the value to each item in array', function(done){
+ mpath.set('arr.$.yep', {xtra: 'double good'}, o, function (v) {
+ return v && v.xtra ? 'hi' : v;
+ });
+ assert.deepEqual([
+ { yep: 'hi', arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+ , { yep: 'hi'}
+ ], o.arr);
+
+ mpath.set('arr.$.yep', {xtra: 'double good'}, o);
+ assert.deepEqual([
+ { yep: {xtra:'double good'}, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+ , { yep: {xtra:'double good'}}
+ ], o.arr);
+
+ done();
+ })
+ })
+ describe('with array of values', function(){
+ it('copies the value to each item in array', function(done){
+ mpath.set('arr.$.yep', [15], o, function (v) {
+ return v.length === 1 ? [] : v;
+ });
+ assert.deepEqual([
+ { yep: [], arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+ , { yep: []}
+ ], o.arr);
+
+ mpath.set('arr.$.yep', [15], o);
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+ , { yep: [15]}
+ ], o.arr);
+
+ done();
+ })
+ })
+ })
+
+ describe('array.index.path', function(){
+ it('works', function(done){
+ mpath.set('arr.1.yep', 0, o, function (v) {
+ return 0 === v ? 'zero' : v;
+ });
+ assert.deepEqual([
+ { yep: [15] , arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+ , { yep: 'zero' }
+ ], o.arr);
+
+ mpath.set('arr.1.yep', 0, o);
+ assert.deepEqual([
+ { yep: [15] , arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+ , { yep: 0 }
+ ], o.arr);
+
+ done();
+ })
+ })
+
+ describe('array.index.array.path', function(){
+ it('with single value', function(done){
+ mpath.set('arr.0.arr.e', 35, o, function (v) {
+ return 35 === v ? 3 : v;
+ });
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: { b: 47 }, e: 3}, { a: { c: 48 }, e: 3}, { d: 'yep', e: 3 }] }
+ , { yep: 0 }
+ ], o.arr);
+
+ mpath.set('arr.0.arr.e', 35, o);
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: { b: 47 }, e: 35}, { a: { c: 48 }, e: 35}, { d: 'yep', e: 35 }] }
+ , { yep: 0 }
+ ], o.arr);
+
+ done();
+ })
+ it('with array', function(done){
+ mpath.set('arr.0.arr.e', ['a','b'], o, function (v) {
+ return 'a' === v ? 'x' : v;
+ });
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: { b: 47 }, e: 'x'}, { a: { c: 48 }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: 0 }
+ ], o.arr);
+
+ mpath.set('arr.0.arr.e', ['a','b'], o);
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: { b: 47 }, e: 'a'}, { a: { c: 48 }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: 0 }
+ ], o.arr);
+
+ done();
+ })
+ })
+
+ describe('array.index.array.path.path', function(){
+ it('with single value', function(done){
+ mpath.set('arr.0.arr.a.b', 36, o, function (v) {
+ return 36 === v ? 3 : v;
+ });
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: { b: 3 }, e: 'a'}, { a: { c: 48, b: 3 }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: 0 }
+ ], o.arr);
+
+ mpath.set('arr.0.arr.a.b', 36, o);
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: { b: 36 }, e: 'a'}, { a: { c: 48, b: 36 }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: 0 }
+ ], o.arr);
+
+ done();
+ })
+ it('with array', function(done){
+ mpath.set('arr.0.arr.a.b', [1,2,3,4], o, function (v) {
+ return 2 === v ? 'two' : v;
+ });
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: { b: 1 }, e: 'a'}, { a: { c: 48, b: 'two' }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: 0 }
+ ], o.arr);
+
+ mpath.set('arr.0.arr.a.b', [1,2,3,4], o);
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: { b: 1 }, e: 'a'}, { a: { c: 48, b: 2 }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: 0 }
+ ], o.arr);
+
+ done();
+ })
+ })
+
+ describe('array.index.array.$.path.path', function(){
+ it('with single value', function(done){
+ mpath.set('arr.0.arr.$.a.b', '$', o, function (v) {
+ return '$' === v ? 'dolla billz' : v;
+ });
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: { b: 'dolla billz' }, e: 'a'}, { a: { c: 48, b: 'dolla billz' }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: 0 }
+ ], o.arr);
+
+ mpath.set('arr.0.arr.$.a.b', '$', o);
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: { b: '$' }, e: 'a'}, { a: { c: 48, b: '$' }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: 0 }
+ ], o.arr);
+
+ done();
+ })
+ it('with array', function(done){
+ mpath.set('arr.0.arr.$.a.b', [1], o, function (v) {
+ return Array.isArray(v) ? {} : v;
+ });
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: { b: {} }, e: 'a'}, { a: { c: 48, b: {} }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: 0 }
+ ], o.arr);
+
+ mpath.set('arr.0.arr.$.a.b', [1], o);
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: { b: [1] }, e: 'a'}, { a: { c: 48, b: [1] }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: 0 }
+ ], o.arr);
+
+ done();
+ })
+ })
+
+ describe('array.array.index.path', function(){
+ it('with single value', function(done){
+ mpath.set('arr.arr.0.a', 'single', o, function (v) {
+ return 'single' === v ? 'double' : v;
+ });
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: 'double', e: 'a'}, { a: { c: 48, b: [1] }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: 0 }
+ ], o.arr);
+
+ mpath.set('arr.arr.0.a', 'single', o);
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: 'single', e: 'a'}, { a: { c: 48, b: [1] }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: 0 }
+ ], o.arr);
+
+ done();
+ })
+ it('with array', function(done){
+ mpath.set('arr.arr.0.a', [4,8,15,16,23,42], o, function (v) {
+ return 4 === v ? 3 : v;
+ });
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: 3, e: 'a'}, { a: { c: 48, b: [1] }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: false }
+ ], o.arr);
+
+ mpath.set('arr.arr.0.a', [4,8,15,16,23,42], o);
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: 4, e: 'a'}, { a: { c: 48, b: [1] }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: false }
+ ], o.arr);
+
+ done();
+ })
+ })
+
+ describe('array.array.$.index.path', function(){
+ it('with single value', function(done){
+ mpath.set('arr.arr.$.0.a', 'singles', o, function (v) {
+ return 0;
+ });
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: 0, e: 'a'}, { a: { c: 48, b: [1] }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: 0 }
+ ], o.arr);
+
+ mpath.set('arr.arr.$.0.a', 'singles', o);
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: 'singles', e: 'a'}, { a: { c: 48, b: [1] }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: 0 }
+ ], o.arr);
+
+ mpath.set('$.arr.arr.0.a', 'single', o);
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: 'single', e: 'a'}, { a: { c: 48, b: [1] }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: 0 }
+ ], o.arr);
+
+ done();
+ })
+ it('with array', function(done){
+ mpath.set('arr.arr.$.0.a', [4,8,15,16,23,42], o, function (v) {
+ return 'nope'
+ });
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: 'nope', e: 'a'}, { a: { c: 48, b: [1] }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: 0}
+ ], o.arr);
+
+ mpath.set('arr.arr.$.0.a', [4,8,15,16,23,42], o);
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: [4,8,15,16,23,42], e: 'a'}, { a: { c: 48, b: [1] }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: 0}
+ ], o.arr);
+
+ mpath.set('arr.$.arr.0.a', [4,8,15,16,23,42,108], o);
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: [4,8,15,16,23,42,108], e: 'a'}, { a: { c: 48, b: [1] }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: 0}
+ ], o.arr);
+
+ done();
+ })
+ })
+
+ describe('array.array.path.index', function(){
+ it('with single value', function(done){
+ mpath.set('arr.arr.a.7', 47, o, function (v) {
+ return 1
+ });
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: [4,8,15,16,23,42,108,1], e: 'a'}, { a: { c: 48, b: [1], '7': 1 }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: 0}
+ ], o.arr);
+
+ mpath.set('arr.arr.a.7', 47, o);
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: [4,8,15,16,23,42,108,47], e: 'a'}, { a: { c: 48, b: [1], '7': 47 }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: 0}
+ ], o.arr);
+
+ done();
+ })
+ it('with array', function(done){
+ o.arr[1].arr = [{ a: [] }, { a: [] }, { a: null }];
+ mpath.set('arr.arr.a.7', [[null,46], [undefined, 'woot']], o);
+
+ var a1 = [];
+ var a2 = [];
+ a1[7] = undefined;
+ a2[7] = 'woot';
+
+ assert.deepEqual([
+ { yep: [15], arr: [{ a: [4,8,15,16,23,42,108,null], e: 'a'}, { a: { c: 48, b: [1], '7': 46 }, e: 'b'}, { d: 'yep', e: 35 }] }
+ , { yep: 0, arr: [{a:a1},{a:a2},{a:null}] }
+ ], o.arr);
+
+ done();
+ })
+ })
+
+ describe('handles array.array.path', function(){
+ it('with single', function(done){
+ o.arr[1].arr = [{},{}];
+ assert.deepEqual([{},{}], o.arr[1].arr);
+ o.arr.push({ arr: 'something else' });
+ o.arr.push({ arr: ['something else'] });
+ o.arr.push({ arr: [[]] });
+ o.arr.push({ arr: [5] });
+
+ var weird = [];
+ weird.e = 'xmas';
+
+ // test
+ mpath.set('arr.arr.e', 47, o, function (v) {
+ return 'xmas'
+ });
+ assert.deepEqual([
+ { yep: [15], arr: [
+ { a: [4,8,15,16,23,42,108,null], e: 'xmas'}
+ , { a: { c: 48, b: [1], '7': 46 }, e: 'xmas'}
+ , { d: 'yep', e: 'xmas' }
+ ]
+ }
+ , { yep: 0, arr: [{e: 'xmas'}, {e:'xmas'}] }
+ , { arr: 'something else' }
+ , { arr: ['something else'] }
+ , { arr: [weird] }
+ , { arr: [5] }
+ ]
+ , o.arr);
+
+ weird.e = 47;
+
+ mpath.set('arr.arr.e', 47, o);
+ assert.deepEqual([
+ { yep: [15], arr: [
+ { a: [4,8,15,16,23,42,108,null], e: 47}
+ , { a: { c: 48, b: [1], '7': 46 }, e: 47}
+ , { d: 'yep', e: 47 }
+ ]
+ }
+ , { yep: 0, arr: [{e: 47}, {e:47}] }
+ , { arr: 'something else' }
+ , { arr: ['something else'] }
+ , { arr: [weird] }
+ , { arr: [5] }
+ ]
+ , o.arr);
+
+ done();
+ })
+ it('with arrays', function(done){
+ mpath.set('arr.arr.e', [[1,2,3],[4,5],null,[],[6], [7,8,9]], o, function (v) {
+ return 10;
+ });
+
+ var weird = [];
+ weird.e = 10;
+
+ assert.deepEqual([
+ { yep: [15], arr: [
+ { a: [4,8,15,16,23,42,108,null], e: 10}
+ , { a: { c: 48, b: [1], '7': 46 }, e: 10}
+ , { d: 'yep', e: 10 }
+ ]
+ }
+ , { yep: 0, arr: [{e: 10}, {e:10}] }
+ , { arr: 'something else' }
+ , { arr: ['something else'] }
+ , { arr: [weird] }
+ , { arr: [5] }
+ ]
+ , o.arr);
+
+ mpath.set('arr.arr.e', [[1,2,3],[4,5],null,[],[6], [7,8,9]], o);
+
+ weird.e = 6;
+
+ assert.deepEqual([
+ { yep: [15], arr: [
+ { a: [4,8,15,16,23,42,108,null], e: 1}
+ , { a: { c: 48, b: [1], '7': 46 }, e: 2}
+ , { d: 'yep', e: 3 }
+ ]
+ }
+ , { yep: 0, arr: [{e: 4}, {e:5}] }
+ , { arr: 'something else' }
+ , { arr: ['something else'] }
+ , { arr: [weird] }
+ , { arr: [5] }
+ ]
+ , o.arr);
+
+ done();
+ })
+ })
+ })
+
+ describe('with `special`', function(){
+ var o = doc();
+
+ it('works', function(done){
+ mpath.set('name', 'chan', o, special, function (v) {
+ return 'hi';
+ });
+ assert.deepEqual('hi', o.name);
+
+ mpath.set('name', 'changer', o, special);
+ assert.deepEqual('changer', o.name);
+
+ mpath.set('first.second.third', [1,{name:'y'},9], o, special);
+ assert.deepEqual([1,{name:'y'},9], o.first.second.third);
+
+ mpath.set('first.second.third.1.name', 'z', o, special)
+ assert.deepEqual([1,{name:'z'},9], o.first.second.third);
+
+ mpath.set('comments.1.name', 'ttwwoo', o, special);
+ assert.deepEqual({ name: 'two', _doc: { name: 'ttwwoo' }}, o.comments[1]);
+
+ mpath.set('comments.2.comments.1.comments.0.expander', 'adder', o, special, function (v) {
+ return 'super'
+ });
+ assert.deepEqual(
+ { val: 2, expander: 'super'}
+ , o.comments[2]._doc.comments[1]._doc.comments[0]);
+
+ mpath.set('comments.2.comments.1.comments.0.expander', 'adder', o, special);
+ assert.deepEqual(
+ { val: 2, expander: 'adder'}
+ , o.comments[2]._doc.comments[1]._doc.comments[0]);
+
+ mpath.set('comments.2.comments.1.comments.2', 'set', o, special);
+ assert.equal(3, o.comments[2]._doc.comments[1]._doc.comments.length);
+ assert.deepEqual(
+ { val: 2, expander: 'adder'}
+ , o.comments[2]._doc.comments[1]._doc.comments[0]);
+ assert.deepEqual(
+ undefined
+ , o.comments[2]._doc.comments[1]._doc.comments[1]);
+ assert.deepEqual(
+ 'set'
+ , o.comments[2]._doc.comments[1]._doc.comments[2]);
+ done();
+ })
+
+ describe('array.path', function(){
+ describe('with single non-array value', function(){
+ it('works', function(done){
+ o.arr[1]._doc = { special: true }
+
+ mpath.set('arr.yep', false, o, special, function (v) {
+ return 'yes';
+ });
+ assert.deepEqual([
+ { yep: 'yes', arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+ , { yep: true, _doc: { special: true, yep: 'yes'}}
+ ], o.arr);
+
+ mpath.set('arr.yep', false, o, special);
+ assert.deepEqual([
+ { yep: false, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+ , { yep: true, _doc: { special: true, yep: false }}
+ ], o.arr);
+
+ done();
+ })
+ })
+ describe('with array of values', function(){
+ it('that are equal in length', function(done){
+ mpath.set('arr.yep', ['one',2], o, special, function (v) {
+ return 2 === v ? 20 : v;
+ });
+ assert.deepEqual([
+ { yep: 'one', arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+ , { yep: true, _doc: { special: true, yep: 20}}
+ ], o.arr);
+
+ mpath.set('arr.yep', ['one',2], o, special);
+ assert.deepEqual([
+ { yep: 'one', arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+ , { yep: true, _doc: { special: true, yep: 2}}
+ ], o.arr);
+
+ done();
+ })
+
+ it('that is less than length', function(done){
+ mpath.set('arr.yep', [47], o, special, function (v) {
+ return 80;
+ });
+ assert.deepEqual([
+ { yep: 80, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+ , { yep: true, _doc: { special: true, yep: 2}}
+ ], o.arr);
+
+ mpath.set('arr.yep', [47], o, special);
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+ , { yep: true, _doc: { special: true, yep: 2}}
+ ], o.arr);
+
+ // add _doc to first element
+ o.arr[0]._doc = { yep: 46, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] }
+
+ mpath.set('arr.yep', [20], o, special);
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }], _doc: { yep: 20, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] } }
+ , { yep: true, _doc: { special: true, yep: 2}}
+ ], o.arr);
+
+ done();
+ })
+
+ it('that is greater than length', function(done){
+ mpath.set('arr.yep', [5,6,7], o, special, function () {
+ return 'x';
+ });
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }], _doc: { yep: 'x', arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] } }
+ , { yep: true, _doc: { special: true, yep: 'x'}}
+ ], o.arr);
+
+ mpath.set('arr.yep', [5,6,7], o, special);
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }], _doc: { yep: 5, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] } }
+ , { yep: true, _doc: { special: true, yep: 6}}
+ ], o.arr);
+
+ done();
+ })
+ })
+ })
+
+ describe('array.$.path', function(){
+ describe('with single non-array value', function(){
+ it('copies the value to each item in array', function(done){
+ mpath.set('arr.$.yep', {xtra: 'double good'}, o, special, function (v) {
+ return 9;
+ });
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: 9, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] } }
+ , { yep: true, _doc: { special: true, yep: 9}}
+ ], o.arr);
+
+ mpath.set('arr.$.yep', {xtra: 'double good'}, o, special);
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: {xtra:'double good'}, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] } }
+ , { yep: true, _doc: { special: true, yep: {xtra:'double good'}}}
+ ], o.arr);
+
+ done();
+ })
+ })
+ describe('with array of values', function(){
+ it('copies the value to each item in array', function(done){
+ mpath.set('arr.$.yep', [15], o, special, function (v) {
+ return 'array'
+ });
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: 'array', arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] } }
+ , { yep: true, _doc: { special: true, yep: 'array'}}
+ ], o.arr);
+
+ mpath.set('arr.$.yep', [15], o, special);
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] } }
+ , { yep: true, _doc: { special: true, yep: [15]}}
+ ], o.arr);
+
+ done();
+ })
+ })
+ })
+
+ describe('array.index.path', function(){
+ it('works', function(done){
+ mpath.set('arr.1.yep', 0, o, special, function (v) {
+ return 1;
+ });
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] } }
+ , { yep: true, _doc: { special: true, yep: 1}}
+ ], o.arr);
+
+ mpath.set('arr.1.yep', 0, o, special);
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ done();
+ })
+ })
+
+ describe('array.index.array.path', function(){
+ it('with single value', function(done){
+ mpath.set('arr.0.arr.e', 35, o, special, function (v) {
+ return 30
+ });
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: { b: 47 }, e: 30}, { a: { c: 48 }, e: 30}, { d: 'yep', e: 30 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ mpath.set('arr.0.arr.e', 35, o, special);
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: { b: 47 }, e: 35}, { a: { c: 48 }, e: 35}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ done();
+ })
+ it('with array', function(done){
+ mpath.set('arr.0.arr.e', ['a','b'], o, special, function (v) {
+ return 'a' === v ? 'A' : v;
+ });
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: { b: 47 }, e: 'A'}, { a: { c: 48 }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ mpath.set('arr.0.arr.e', ['a','b'], o, special);
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: { b: 47 }, e: 'a'}, { a: { c: 48 }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ done();
+ })
+ })
+
+ describe('array.index.array.path.path', function(){
+ it('with single value', function(done){
+ mpath.set('arr.0.arr.a.b', 36, o, special, function (v) {
+ return 20
+ });
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: { b: 20 }, e: 'a'}, { a: { c: 48, b: 20 }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ mpath.set('arr.0.arr.a.b', 36, o, special);
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: { b: 36 }, e: 'a'}, { a: { c: 48, b: 36 }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ done();
+ })
+ it('with array', function(done){
+ mpath.set('arr.0.arr.a.b', [1,2,3,4], o, special, function (v) {
+ return v*2;
+ });
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: { b: 2 }, e: 'a'}, { a: { c: 48, b: 4 }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ mpath.set('arr.0.arr.a.b', [1,2,3,4], o, special);
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: { b: 1 }, e: 'a'}, { a: { c: 48, b: 2 }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ done();
+ })
+ })
+
+ describe('array.index.array.$.path.path', function(){
+ it('with single value', function(done){
+ mpath.set('arr.0.arr.$.a.b', '$', o, special, function (v) {
+ return 'dollaz'
+ });
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: { b: 'dollaz' }, e: 'a'}, { a: { c: 48, b: 'dollaz' }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ mpath.set('arr.0.arr.$.a.b', '$', o, special);
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: { b: '$' }, e: 'a'}, { a: { c: 48, b: '$' }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ done();
+ })
+ it('with array', function(done){
+ mpath.set('arr.0.arr.$.a.b', [1], o, special, function (v) {
+ return {};
+ });
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: { b: {} }, e: 'a'}, { a: { c: 48, b: {} }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ mpath.set('arr.0.arr.$.a.b', [1], o, special);
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: { b: [1] }, e: 'a'}, { a: { c: 48, b: [1] }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ done();
+ })
+ })
+
+ describe('array.array.index.path', function(){
+ it('with single value', function(done){
+ mpath.set('arr.arr.0.a', 'single', o, special, function (v) {
+ return 88;
+ });
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: 88, e: 'a'}, { a: { c: 48, b: [1] }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ mpath.set('arr.arr.0.a', 'single', o, special);
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: 'single', e: 'a'}, { a: { c: 48, b: [1] }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ done();
+ })
+ it('with array', function(done){
+ mpath.set('arr.arr.0.a', [4,8,15,16,23,42], o, special, function (v) {
+ return v*2;
+ });
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: 8, e: 'a'}, { a: { c: 48, b: [1] }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ mpath.set('arr.arr.0.a', [4,8,15,16,23,42], o, special);
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: 4, e: 'a'}, { a: { c: 48, b: [1] }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ done();
+ })
+ })
+
+ describe('array.array.$.index.path', function(){
+ it('with single value', function(done){
+ mpath.set('arr.arr.$.0.a', 'singles', o, special, function (v) {
+ return v.toUpperCase();
+ });
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: 'SINGLES', e: 'a'}, { a: { c: 48, b: [1] }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ mpath.set('arr.arr.$.0.a', 'singles', o, special);
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: 'singles', e: 'a'}, { a: { c: 48, b: [1] }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ mpath.set('$.arr.arr.0.a', 'single', o, special);
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: 'single', e: 'a'}, { a: { c: 48, b: [1] }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ done();
+ })
+ it('with array', function(done){
+ mpath.set('arr.arr.$.0.a', [4,8,15,16,23,42], o, special, function (v) {
+ return Array
+ });
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: Array, e: 'a'}, { a: { c: 48, b: [1] }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ mpath.set('arr.arr.$.0.a', [4,8,15,16,23,42], o, special);
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: [4,8,15,16,23,42], e: 'a'}, { a: { c: 48, b: [1] }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ mpath.set('arr.$.arr.0.a', [4,8,15,16,23,42,108], o, special);
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: [4,8,15,16,23,42,108], e: 'a'}, { a: { c: 48, b: [1] }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ done();
+ })
+ })
+
+ describe('array.array.path.index', function(){
+ it('with single value', function(done){
+ mpath.set('arr.arr.a.7', 47, o, special, function (v) {
+ return Object;
+ });
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: [4,8,15,16,23,42,108,Object], e: 'a'}, { a: { c: 48, b: [1], '7': Object }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ mpath.set('arr.arr.a.7', 47, o, special);
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: [4,8,15,16,23,42,108,47], e: 'a'}, { a: { c: 48, b: [1], '7': 47 }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { special: true, yep: 0}}
+ ], o.arr);
+
+ done();
+ })
+ it('with array', function(done){
+ o.arr[1]._doc.arr = [{ a: [] }, { a: [] }, { a: null }];
+ mpath.set('arr.arr.a.7', [[null,46], [undefined, 'woot']], o, special, function (v) {
+ return undefined === v ? 'nope' : v;
+ });
+
+ var a1 = [];
+ var a2 = [];
+ a1[7] = 'nope';
+ a2[7] = 'woot';
+
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: [4,8,15,16,23,42,108,null], e: 'a'}, { a: { c: 48, b: [1], '7': 46 }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { arr: [{a:a1},{a:a2},{a:null}], special: true, yep: 0}}
+ ], o.arr);
+
+ mpath.set('arr.arr.a.7', [[null,46], [undefined, 'woot']], o, special);
+
+ a1[7] = undefined;
+
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: { yep: [15], arr: [{ a: [4,8,15,16,23,42,108,null], e: 'a'}, { a: { c: 48, b: [1], '7': 46 }, e: 'b'}, { d: 'yep', e: 35 }] } }
+ , { yep: true, _doc: { arr: [{a:a1},{a:a2},{a:null}], special: true, yep: 0}}
+ ], o.arr);
+
+ done();
+ })
+ })
+
+ describe('handles array.array.path', function(){
+ it('with single', function(done){
+ o.arr[1]._doc.arr = [{},{}];
+ assert.deepEqual([{},{}], o.arr[1]._doc.arr);
+ o.arr.push({ _doc: { arr: 'something else' }});
+ o.arr.push({ _doc: { arr: ['something else'] }});
+ o.arr.push({ _doc: { arr: [[]] }});
+ o.arr.push({ _doc: { arr: [5] }});
+
+ // test
+ mpath.set('arr.arr.e', 47, o, special);
+
+ var weird = [];
+ weird.e = 47;
+
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: {
+ yep: [15]
+ , arr: [
+ { a: [4,8,15,16,23,42,108,null], e: 47}
+ , { a: { c: 48, b: [1], '7': 46 }, e: 47}
+ , { d: 'yep', e: 47 }
+ ]
+ }
+ }
+ , { yep: true
+ , _doc: {
+ arr: [
+ {e:47}
+ , {e:47}
+ ]
+ , special: true
+ , yep: 0
+ }
+ }
+ , { _doc: { arr: 'something else' }}
+ , { _doc: { arr: ['something else'] }}
+ , { _doc: { arr: [weird] }}
+ , { _doc: { arr: [5] }}
+ ]
+ , o.arr);
+
+ done();
+ })
+ it('with arrays', function(done){
+ mpath.set('arr.arr.e', [[1,2,3],[4,5],null,[],[6], [7,8,9]], o, special);
+
+ var weird = [];
+ weird.e = 6;
+
+ assert.deepEqual([
+ { yep: 47, arr: [{ a: { b: 47 }}, { a: { c: 48 }}, { d: 'yep' }]
+ , _doc: {
+ yep: [15]
+ , arr: [
+ { a: [4,8,15,16,23,42,108,null], e: 1}
+ , { a: { c: 48, b: [1], '7': 46 }, e: 2}
+ , { d: 'yep', e: 3 }
+ ]
+ }
+ }
+ , { yep: true
+ , _doc: {
+ arr: [
+ {e:4}
+ , {e:5}
+ ]
+ , special: true
+ , yep: 0
+ }
+ }
+ , { _doc: { arr: 'something else' }}
+ , { _doc: { arr: ['something else'] }}
+ , { _doc: { arr: [weird] }}
+ , { _doc: { arr: [5] }}
+ ]
+ , o.arr);
+
+ done();
+ })
+ })
+
+ describe('that is a function', function(){
+ describe('without map', function(){
+ it('works on array value', function(done){
+ var o = { hello: { world: [{ how: 'are' }, { you: '?' }] }};
+ var special = function (obj, key, val) {
+ if (val) {
+ obj[key] = val;
+ } else {
+ return 'thing' == key
+ ? obj.world
+ : obj[key]
+ }
+ }
+ mpath.set('hello.thing.how', 'arrrr', o, special);
+ assert.deepEqual(o, { hello: { world: [{ how: 'arrrr' }, { you: '?', how: 'arrrr' }] }});
+ done();
+ })
+ it('works on non-array value', function(done){
+ var o = { hello: { world: { how: 'are you' }}};
+ var special = function (obj, key, val) {
+ if (val) {
+ obj[key] = val;
+ } else {
+ return 'thing' == key
+ ? obj.world
+ : obj[key]
+ }
+ }
+ mpath.set('hello.thing.how', 'RU', o, special);
+ assert.deepEqual(o, { hello: { world: { how: 'RU' }}});
+ done();
+ })
+ })
+ it('works with map', function(done){
+ var o = { hello: { world: [{ how: 'are' }, { you: '?' }] }};
+ var special = function (obj, key, val) {
+ if (val) {
+ obj[key] = val;
+ } else {
+ return 'thing' == key
+ ? obj.world
+ : obj[key]
+ }
+ }
+ var map = function (val) {
+ return 'convert' == val
+ ? 'ºº'
+ : val
+ }
+ mpath.set('hello.thing.how', 'convert', o, special, map);
+ assert.deepEqual(o, { hello: { world: [{ how: 'ºº' }, { you: '?', how: 'ºº' }] }});
+ done();
+ })
+ })
+
+ })
+
+ describe('get/set integration', function(){
+ var o = doc();
+
+ it('works', function(done){
+ var vals = mpath.get('array.o.array.x.b', o);
+
+ vals[0][0][2] = 10;
+ vals[1][0][1] = 0;
+ vals[1][1] = 'Rambaldi';
+ vals[1][2] = [12,14];
+ vals[2] = [{changed:true}, [null, ['changed','to','array']]];
+
+ mpath.set('array.o.array.x.b', vals, o);
+
+ var t = [
+ { o: { array: [{x: {b: [4,6,10]}}, { y: 10} ] }}
+ , { o: { array: [{x: {b: [1,0,3]}}, { x: {b:'Rambaldi',z: 10 }}, { x: {b: [12,14]}}] }}
+ , { o: { array: [{x: {b: {changed:true}}}, { x: { b: [null, ['changed','to','array']]}}]}}
+ , { o: { array: [{x: null }] }}
+ , { o: { array: [{y: 3 }] }}
+ , { o: { array: [3, 0, null] }}
+ , { o: { name: 'ha' }}
+ ];
+ assert.deepEqual(t, o.array);
+ done();
+ })
+
+ it('array.prop', function(done){
+ mpath.set('comments.name', ['this', 'was', 'changed'], o);
+
+ assert.deepEqual([
+ { name: 'this' }
+ , { name: 'was', _doc: { name: '2' }}
+ , { name: 'changed'
+ , comments: [{},{ comments: [{val: 'twoo'}]}]
+ , _doc: { name: '3', comments: [{},{ _doc: { comments: [{ val: 2 }] }}] }}
+ ], o.comments);
+
+ mpath.set('comments.name', ['also', 'changed', 'this'], o, special);
+
+ assert.deepEqual([
+ { name: 'also' }
+ , { name: 'was', _doc: { name: 'changed' }}
+ , { name: 'changed'
+ , comments: [{},{ comments: [{val: 'twoo'}]}]
+ , _doc: { name: 'this', comments: [{},{ _doc: { comments: [{ val: 2 }] }}] }}
+ ], o.comments);
+
+ done();
+ })
+
+ })
+
+ describe('multiple $ use', function(){
+ var o = doc();
+ it('is ok', function(done){
+ assert.doesNotThrow(function () {
+ mpath.set('arr.$.arr.$.a', 35, o);
+ });
+ done();
+ })
+ })
+
+ it('ignores setting a nested path that doesnt exist', function(done){
+ var o = doc();
+ assert.doesNotThrow(function(){
+ mpath.set('thing.that.is.new', 10, o);
+ })
+ done();
+ })
+ })
+
+})
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/.npmignore
new file mode 100644
index 0000000..e86496f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/.npmignore
@@ -0,0 +1,4 @@
+*.sw*
+node_modules/
+.DS_Store
+.idea \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/.travis.yml b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/.travis.yml
new file mode 100644
index 0000000..d63ba09
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - 0.8
+ - 0.10
+ - 0.11
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/History.md
new file mode 100644
index 0000000..12c0dc3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/History.md
@@ -0,0 +1,80 @@
+0.5.5 / 2014-09-19
+==================
+
+ * change `end()` semantics
+ * add `catch()` as in ES6
+
+0.5.1 / 2014-01-20
+==================
+
+ * fixed; `end` is much more consistent (especially for `then` chains)
+
+0.4.4 / 2014-01-20
+==================
+
+ * fixed; `end` is much more consistent (especially for `then` chains)
+
+0.4.3 / 2013-12-17
+==================
+
+ * fixed; non-A+ behavior on fulfill and reject [lbeschastny](https://github.com/lbeschastny)
+ * tests; simplified harness + compatible with travis + compatible with windows
+
+0.5.0 / 2013-12-14
+==================
+
+ * fixed; non-A+ behavior on fulfill and reject [lbeschastny](https://github.com/lbeschastny)
+ * tests; simplified harness + compatible with travis + compatible with windows
+
+0.4.2 / 2013-11-26
+==================
+
+ * fixed; enter the domain only if not the present domain
+ * added; `end` returns the promise
+
+0.4.1 / 2013-10-26
+==================
+
+ * Add `all`
+ * Longjohn for easier debugging
+ * can end a promise chain with an error handler
+ * Add ```chain```
+
+0.4.0 / 2013-10-24
+==================
+
+ * fixed; now plays nice with domains #3 [refack](https://github.com/refack)
+ * updated; compatibility for Promises A+ 2.0.0 [refack](https://github.com/refack)
+ * updated; guard against invalid arguments [refack](https://github.com/refack)
+
+0.3.0 / 2013-07-25
+==================
+
+ * updated; sliced to 0.0.5
+ * fixed; then is passed all fulfillment values
+ * use setImmediate if available
+ * conform to Promises A+ 1.1
+
+0.2.1 / 2013-02-09
+==================
+
+ * fixed; conformancy with A+ 1.2
+
+0.2.0 / 2013-01-09
+==================
+
+ * added; .end()
+ * fixed; only catch handler executions
+
+0.1.0 / 2013-01-08
+==================
+
+ * cleaned up API
+ * customizable event names
+ * docs
+
+0.0.1 / 2013-01-07
+==================
+
+ * original release
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/LICENSE
new file mode 100644
index 0000000..38c529d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2012 [Aaron Heckmann](aaron.heckmann+github@gmail.com)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/README.md
new file mode 100644
index 0000000..2906f56
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/README.md
@@ -0,0 +1,224 @@
+#mpromise
+==========
+
+[![Build Status](https://travis-ci.org/aheckmann/mpromise.png)](https://travis-ci.org/aheckmann/mpromise)
+
+A [promises/A+](https://github.com/promises-aplus/promises-spec) conformant implementation, written for [mongoose](http://mongoosejs.com).
+
+## installation
+
+```
+$ npm install mpromise
+```
+
+## docs
+
+An `mpromise` can be in any of three states, pending, fulfilled (success), or rejected (error). Once it is either fulfilled or rejected it's state can no longer be changed.
+
+The exports object is the Promise constructor.
+
+```js
+var Promise = require('mpromise');
+```
+
+The constructor accepts an optional function which is executed when the promise is first resolved (either fulfilled or rejected).
+
+```js
+var promise = new Promise(fn);
+```
+
+This is the same as passing the `fn` to `onResolve` directly.
+
+```js
+var promise = new Promise;
+promise.onResolve(function (err, args..) {
+ ...
+});
+```
+
+### Methods
+
+####fulfill
+
+Fulfilling a promise with values:
+
+```js
+var promise = new Promise;
+promise.fulfill(args...);
+```
+
+If the promise has already been fulfilled or rejected, no action is taken.
+
+####reject
+
+Rejecting a promise with a reason:
+
+```js
+var promise = new Promise;
+promise.reject(reason);
+```
+
+If the promise has already been fulfilled or rejected, no action is taken.
+
+####resolve
+
+Node.js callback style promise resolution `(err, args...)`:
+
+```js
+var promise = new Promise;
+promise.resolve([reason], [arg1, arg2, ...]);
+```
+
+If the promise has already been fulfilled or rejected, no action is taken.
+
+####onFulfill
+
+To register a function for execution when the promise is fulfilled, pass it to `onFulfill`. When executed it will receive the arguments passed to `fulfill()`.
+
+```js
+var promise = new Promise;
+promise.onFulfill(function (a, b) {
+ assert.equal(3, a + b);
+});
+promise.fulfill(1, 2);
+```
+
+The function will only be called once when the promise is fulfilled, never when rejected.
+
+Registering a function with `onFulfill` after the promise has already been fulfilled results in the immediate execution of the function with the original arguments used to fulfill the promise.
+
+```js
+var promise = new Promise;
+promise.fulfill(" :D ");
+promise.onFulfill(function (arg) {
+ console.log(arg); // logs " :D "
+})
+```
+
+####onReject
+
+To register a function for execution when the promise is rejected, pass it to `onReject`. When executed it will receive the argument passed to `reject()`.
+
+```js
+var promise = new Promise;
+promise.onReject(function (reason) {
+ assert.equal('sad', reason);
+});
+promise.reject('sad');
+```
+
+The function will only be called once when the promise is rejected, never when fulfilled.
+
+Registering a function with `onReject` after the promise has already been rejected results in the immediate execution of the function with the original argument used to reject the promise.
+
+```js
+var promise = new Promise;
+promise.reject(" :( ");
+promise.onReject(function (reason) {
+ console.log(reason); // logs " :( "
+})
+```
+
+####onResolve
+
+Allows registration of node.js style callbacks `(err, args..)` to handle either promise resolution type (fulfill or reject).
+
+```js
+// fulfillment
+var promise = new Promise;
+promise.onResolve(function (err, a, b) {
+ console.log(a + b); // logs 3
+});
+promise.fulfill(1, 2);
+
+// rejection
+var promise = new Promise;
+promise.onResolve(function (err) {
+ if (err) {
+ console.log(err.message); // logs "failed"
+ }
+});
+promise.reject(new Error('failed'));
+```
+
+####then
+
+Creates a new promise and returns it. If `onFulfill` or `onReject` are passed, they are added as SUCCESS/ERROR callbacks to this promise after the nextTick.
+
+Conforms to [promises/A+](https://github.com/promises-aplus/promises-spec) specification and passes its [tests](https://github.com/promises-aplus/promises-tests).
+
+```js
+// promise.then(onFulfill, onReject);
+
+var p = new Promise;
+
+p.then(function (arg) {
+ return arg + 1;
+}).then(function (arg) {
+ throw new Error(arg + ' is an error!');
+}).then(null, function (err) {
+ assert.ok(err instanceof Error);
+ assert.equal('2 is an error', err.message);
+});
+p.fullfill(1);
+```
+
+####end
+
+Signifies that this promise was the last in a chain of `then()s`: if a handler passed to the call to `then` which produced this promise throws, the exception be rethrown.
+You can pass an OnReject handler to `end` so that exceptions will be handled (like a final catch clause);
+This method returns it's promise for easy use with `return`.
+
+```js
+var p = new Promise;
+p.then(function(){ throw new Error('shucks') });
+setTimeout(function () {
+ p.fulfill();
+ // error was caught and swallowed by the promise returned from
+ // p.then(). we either have to always register handlers on
+ // the returned promises or we can do the following...
+}, 10);
+
+// this time we use .end() which prevents catching thrown errors
+var p = new Promise;
+setTimeout(function () {
+ p.fulfill(); // throws "shucks"
+}, 10);
+return p.then(function(){ throw new Error('shucks') }).end(); // <--
+```
+
+
+### chain
+
+Allows direct promise to promise chaining (especially useful by a outside aggregating function). It doesn't use the asynchronous `resolve` algorithm and so excepts only another Promise as it's argument.
+
+```js
+function makeMeAPromise(i) {
+ var p = new Promise;
+ p.fulfill(i);
+ return p;
+}
+
+var returnPromise = initialPromise = new Promise;
+for (i=0; i<10; ++i)
+ returnPromise = returnPromise.chain(makeMeAPromise(i));
+
+initialPromise.fulfill();
+return returnPromise;
+```
+
+###Event names
+
+If you'd like to alter this implementations event names used to signify success and failure you may do so by setting `Promise.SUCCESS` or `Promise.FAILURE` respectively.
+
+```js
+Promise.SUCCESS = 'complete';
+Promise.FAILURE = 'err';
+```
+
+###Luke, use the Source
+For more ideas read the [source](https://github.com/aheckmann/mpromise/blob/master/lib), [tests](https://github.com/aheckmann/mpromise/blob/master/test), or the [mongoose implementation](https://github.com/LearnBoost/mongoose/blob/3.6x/lib/promise.js).
+
+## license
+
+[MIT](https://github.com/aheckmann/mpromise/blob/master/LICENSE)
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/lib/promise.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/lib/promise.js
new file mode 100644
index 0000000..3cb4419
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/lib/promise.js
@@ -0,0 +1,445 @@
+'use strict';
+var util = require('util');
+var EventEmitter = require('events').EventEmitter;
+function toArray(arr, start, end) {
+ return Array.prototype.slice.call(arr, start, end)
+}
+function strongUnshift(x, arrLike) {
+ var arr = toArray(arrLike);
+ arr.unshift(x);
+ return arr;
+}
+
+
+/**
+ * MPromise constructor.
+ *
+ * _NOTE: The success and failure event names can be overridden by setting `Promise.SUCCESS` and `Promise.FAILURE` respectively._
+ *
+ * @param {Function} back a function that accepts `fn(err, ...){}` as signature
+ * @inherits NodeJS EventEmitter http://nodejs.org/api/events.html#events_class_events_eventemitter
+ * @event `reject`: Emits when the promise is rejected (event name may be overridden)
+ * @event `fulfill`: Emits when the promise is fulfilled (event name may be overridden)
+ * @api public
+ */
+function Promise(back) {
+ this.emitter = new EventEmitter();
+ this.emitted = {};
+ this.ended = false;
+ if ('function' == typeof back) {
+ this.ended = true;
+ this.onResolve(back);
+ }
+}
+
+
+/*
+ * Module exports.
+ */
+module.exports = Promise;
+
+
+/*!
+ * event names
+ */
+Promise.SUCCESS = 'fulfill';
+Promise.FAILURE = 'reject';
+
+
+/**
+ * Adds `listener` to the `event`.
+ *
+ * If `event` is either the success or failure event and the event has already been emitted, the`listener` is called immediately and passed the results of the original emitted event.
+ *
+ * @param {String} event
+ * @param {Function} callback
+ * @return {MPromise} this
+ * @api private
+ */
+Promise.prototype.on = function (event, callback) {
+ if (this.emitted[event])
+ callback.apply(undefined, this.emitted[event]);
+ else
+ this.emitter.on(event, callback);
+
+ return this;
+};
+
+
+/**
+ * Keeps track of emitted events to run them on `on`.
+ *
+ * @api private
+ */
+Promise.prototype.safeEmit = function (event) {
+ // ensures a promise can't be fulfill() or reject() more than once
+ if (event == Promise.SUCCESS || event == Promise.FAILURE) {
+ if (this.emitted[Promise.SUCCESS] || this.emitted[Promise.FAILURE]) {
+ return this;
+ }
+ this.emitted[event] = toArray(arguments, 1);
+ }
+
+ this.emitter.emit.apply(this.emitter, arguments);
+ return this;
+};
+
+
+/**
+ * @api private
+ */
+Promise.prototype.hasRejectListeners = function () {
+ return EventEmitter.listenerCount(this.emitter, Promise.FAILURE) > 0;
+};
+
+
+/**
+ * Fulfills this promise with passed arguments.
+ *
+ * If this promise has already been fulfilled or rejected, no action is taken.
+ *
+ * @api public
+ */
+Promise.prototype.fulfill = function () {
+ return this.safeEmit.apply(this, strongUnshift(Promise.SUCCESS, arguments));
+};
+
+
+/**
+ * Rejects this promise with `reason`.
+ *
+ * If this promise has already been fulfilled or rejected, no action is taken.
+ *
+ * @api public
+ * @param {Object|String} reason
+ * @return {MPromise} this
+ */
+Promise.prototype.reject = function (reason) {
+ if (this.ended && !this.hasRejectListeners())
+ throw reason;
+ return this.safeEmit(Promise.FAILURE, reason);
+};
+
+
+/**
+ * Resolves this promise to a rejected state if `err` is passed or
+ * fulfilled state if no `err` is passed.
+ *
+ * @param {Error} [err] error or null
+ * @param {Object} [val] value to fulfill the promise with
+ * @api public
+ */
+Promise.prototype.resolve = function (err, val) {
+ if (err) return this.reject(err);
+ return this.fulfill(val);
+};
+
+
+/**
+ * Adds a listener to the SUCCESS event.
+ *
+ * @return {MPromise} this
+ * @api public
+ */
+Promise.prototype.onFulfill = function (fn) {
+ if (!fn) return this;
+ if ('function' != typeof fn) throw new TypeError("fn should be a function");
+ return this.on(Promise.SUCCESS, fn);
+};
+
+
+/**
+ * Adds a listener to the FAILURE event.
+ *
+ * @return {MPromise} this
+ * @api public
+ */
+Promise.prototype.onReject = function (fn) {
+ if (!fn) return this;
+ if ('function' != typeof fn) throw new TypeError("fn should be a function");
+ return this.on(Promise.FAILURE, fn);
+};
+
+
+/**
+ * Adds a single function as a listener to both SUCCESS and FAILURE.
+ *
+ * It will be executed with traditional node.js argument position:
+ * function (err, args...) {}
+ *
+ * Also marks the promise as `end`ed, since it's the common use-case, and yet has no
+ * side effects unless `fn` is undefined or null.
+ *
+ * @param {Function} fn
+ * @return {MPromise} this
+ */
+Promise.prototype.onResolve = function (fn) {
+ if (!fn) return this;
+ if ('function' != typeof fn) throw new TypeError("fn should be a function");
+ this.on(Promise.FAILURE, function (err) { fn.call(this, err); });
+ this.on(Promise.SUCCESS, function () { fn.apply(this, strongUnshift(null, arguments)); });
+ return this;
+};
+
+
+/**
+ * Creates a new promise and returns it. If `onFulfill` or
+ * `onReject` are passed, they are added as SUCCESS/ERROR callbacks
+ * to this promise after the next tick.
+ *
+ * Conforms to [promises/A+](https://github.com/promises-aplus/promises-spec) specification. Read for more detail how to use this method.
+ *
+ * ####Example:
+ *
+ * var p = new Promise;
+ * p.then(function (arg) {
+ * return arg + 1;
+ * }).then(function (arg) {
+ * throw new Error(arg + ' is an error!');
+ * }).then(null, function (err) {
+ * assert.ok(err instanceof Error);
+ * assert.equal('2 is an error', err.message);
+ * });
+ * p.complete(1);
+ *
+ * @see promises-A+ https://github.com/promises-aplus/promises-spec
+ * @param {Function} onFulfill
+ * @param {Function} [onReject]
+ * @return {MPromise} newPromise
+ */
+Promise.prototype.then = function (onFulfill, onReject) {
+ var newPromise = new Promise;
+
+ if ('function' == typeof onFulfill) {
+ this.onFulfill(handler(newPromise, onFulfill));
+ } else {
+ this.onFulfill(newPromise.fulfill.bind(newPromise));
+ }
+
+ if ('function' == typeof onReject) {
+ this.onReject(handler(newPromise, onReject));
+ } else {
+ this.onReject(newPromise.reject.bind(newPromise));
+ }
+
+ return newPromise;
+};
+
+
+function handler(promise, fn) {
+ function newTickHandler() {
+ var pDomain = promise.emitter.domain;
+ if (pDomain && pDomain !== process.domain) pDomain.enter();
+ try {
+ var x = fn.apply(undefined, boundHandler.args);
+ } catch (err) {
+ promise.reject(err);
+ return;
+ }
+ resolve(promise, x);
+ }
+ function boundHandler() {
+ boundHandler.args = arguments;
+ process.nextTick(newTickHandler);
+ }
+ return boundHandler;
+}
+
+
+function resolve(promise, x) {
+ function fulfillOnce() {
+ if (done++) return;
+ resolve.apply(undefined, strongUnshift(promise, arguments));
+ }
+ function rejectOnce(reason) {
+ if (done++) return;
+ promise.reject(reason);
+ }
+
+ if (promise === x) {
+ promise.reject(new TypeError("promise and x are the same"));
+ return;
+ }
+ var rest = toArray(arguments, 1);
+ var type = typeof x;
+ if ('undefined' == type || null == x || !('object' == type || 'function' == type)) {
+ promise.fulfill.apply(promise, rest);
+ return;
+ }
+
+ try {
+ var theThen = x.then;
+ } catch (err) {
+ promise.reject(err);
+ return;
+ }
+
+ if ('function' != typeof theThen) {
+ promise.fulfill.apply(promise, rest);
+ return;
+ }
+
+ var done = 0;
+ try {
+ var ret = theThen.call(x, fulfillOnce, rejectOnce);
+ return ret;
+ } catch (err) {
+ if (done++) return;
+ promise.reject(err);
+ }
+}
+
+
+/**
+ * Signifies that this promise was the last in a chain of `then()s`: if a handler passed to the call to `then` which produced this promise throws, the exception will go uncaught.
+ *
+ * ####Example:
+ *
+ * var p = new Promise;
+ * p.then(function(){ throw new Error('shucks') });
+ * setTimeout(function () {
+ * p.fulfill();
+ * // error was caught and swallowed by the promise returned from
+ * // p.then(). we either have to always register handlers on
+ * // the returned promises or we can do the following...
+ * }, 10);
+ *
+ * // this time we use .end() which prevents catching thrown errors
+ * var p = new Promise;
+ * var p2 = p.then(function(){ throw new Error('shucks') }).end(); // <--
+ * setTimeout(function () {
+ * p.fulfill(); // throws "shucks"
+ * }, 10);
+ *
+ * @api public
+ * @param {Function} [onReject]
+ * @return {MPromise} this
+ */
+Promise.prototype.end = Promise.prototype['catch'] = function (onReject) {
+ if (!onReject && !this.hasRejectListeners())
+ onReject = function idRejector(e) { throw e; };
+ this.onReject(onReject);
+ this.ended = true;
+ return this;
+};
+
+
+/**
+ * A debug utility function that adds handlers to a promise that will log some output to the `console`
+ *
+ * ####Example:
+ *
+ * var p = new Promise;
+ * p.then(function(){ throw new Error('shucks') });
+ * setTimeout(function () {
+ * p.fulfill();
+ * // error was caught and swallowed by the promise returned from
+ * // p.then(). we either have to always register handlers on
+ * // the returned promises or we can do the following...
+ * }, 10);
+ *
+ * // this time we use .end() which prevents catching thrown errors
+ * var p = new Promise;
+ * var p2 = p.then(function(){ throw new Error('shucks') }).end(); // <--
+ * setTimeout(function () {
+ * p.fulfill(); // throws "shucks"
+ * }, 10);
+ *
+ * @api public
+ * @param {MPromise} p
+ * @param {String} name
+ * @return {MPromise} this
+ */
+Promise.trace = function (p, name) {
+ p.then(
+ function () {
+ console.log("%s fulfill %j", name, toArray(arguments));
+ },
+ function () {
+ console.log("%s reject %j", name, toArray(arguments));
+ }
+ )
+};
+
+
+Promise.prototype.chain = function (p2) {
+ var p1 = this;
+ p1.onFulfill(p2.fulfill.bind(p2));
+ p1.onReject(p2.reject.bind(p2));
+ return p2;
+};
+
+
+Promise.prototype.all = function (promiseOfArr) {
+ var pRet = new Promise;
+ this.then(promiseOfArr).then(
+ function (promiseArr) {
+ var count = 0;
+ var ret = [];
+ var errSentinel;
+ if (!promiseArr.length) pRet.resolve();
+ promiseArr.forEach(function (promise, index) {
+ if (errSentinel) return;
+ count++;
+ promise.then(
+ function (val) {
+ if (errSentinel) return;
+ ret[index] = val;
+ --count;
+ if (count == 0) pRet.fulfill(ret);
+ },
+ function (err) {
+ if (errSentinel) return;
+ errSentinel = err;
+ pRet.reject(err);
+ }
+ );
+ });
+ return pRet;
+ }
+ , pRet.reject.bind(pRet)
+ );
+ return pRet;
+};
+
+
+Promise.hook = function (arr) {
+ var p1 = new Promise;
+ var pFinal = new Promise;
+ var signalP = function () {
+ --count;
+ if (count == 0)
+ pFinal.fulfill();
+ return pFinal;
+ };
+ var count = 1;
+ var ps = p1;
+ arr.forEach(function (hook) {
+ ps = ps.then(
+ function () {
+ var p = new Promise;
+ count++;
+ hook(p.resolve.bind(p), signalP);
+ return p;
+ }
+ )
+ });
+ ps = ps.then(signalP);
+ p1.resolve();
+ return ps;
+};
+
+
+/* This is for the A+ tests, but it's very useful as well */
+Promise.fulfilled = function fulfilled() { var p = new Promise; p.fulfill.apply(p, arguments); return p; };
+Promise.rejected = function rejected(reason) { return new Promise().reject(reason); };
+Promise.deferred = function deferred() {
+ var p = new Promise;
+ return {
+ promise: p,
+ reject: p.reject.bind(p),
+ resolve: p.fulfill.bind(p),
+ callback: p.resolve.bind(p)
+ }
+};
+/* End A+ tests adapter bit */
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/package.json
new file mode 100644
index 0000000..8e56fe4
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/package.json
@@ -0,0 +1,65 @@
+{
+ "name": "mpromise",
+ "version": "0.5.5",
+ "description": "Promises A+ conformant implementation",
+ "main": "lib/promise.js",
+ "scripts": {
+ "test": "mocha"
+ },
+ "devDependencies": {
+ "promises-aplus-tests": "2.1.0",
+ "mocha": "1.21.4"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/aheckmann/mpromise"
+ },
+ "keywords": [
+ "promise",
+ "mongoose",
+ "aplus",
+ "a+",
+ "plus"
+ ],
+ "author": {
+ "name": "Aaron Heckmann",
+ "email": "aaron.heckmann+github@gmail.com"
+ },
+ "contributors": [
+ {
+ "name": "Refael Ackermann",
+ "email": "refack@gmail",
+ "url": "http://node.org.il/"
+ }
+ ],
+ "license": "MIT",
+ "gitHead": "c8842ff1065e9fceef0eef7e97bdb291b7c2550e",
+ "bugs": {
+ "url": "https://github.com/aheckmann/mpromise/issues"
+ },
+ "homepage": "https://github.com/aheckmann/mpromise",
+ "_id": "mpromise@0.5.5",
+ "_shasum": "f5b24259d763acc2257b0a0c8c6d866fd51732e6",
+ "_from": "mpromise@0.5.5",
+ "_npmVersion": "2.0.0-beta.2",
+ "_npmUser": {
+ "name": "refack",
+ "email": "refael@empeeric.com"
+ },
+ "maintainers": [
+ {
+ "name": "aaron",
+ "email": "aaron.heckmann+github@gmail.com"
+ },
+ {
+ "name": "refack",
+ "email": "refael@empeeric.com"
+ }
+ ],
+ "dist": {
+ "shasum": "f5b24259d763acc2257b0a0c8c6d866fd51732e6",
+ "tarball": "https://registry.npmjs.org/mpromise/-/mpromise-0.5.5.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mpromise/-/mpromise-0.5.5.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/test/promise.domain.test.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/test/promise.domain.test.js
new file mode 100644
index 0000000..a6a6be7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/test/promise.domain.test.js
@@ -0,0 +1,28 @@
+var Promise = require('../')
+ , Domain = require('domain').Domain
+ , assert = require('assert');
+
+
+describe("domains", function () {
+ it("exceptions should not breakout of domain boundaries", function (done) {
+ if (process.version.indexOf('v0.10') != 0) return done();
+ var d = new Domain;
+ d.on('error', function (err) {
+ assert.equal(err.message, 'gaga');
+ done()
+ });
+
+ var p = new Promise();
+ d.run(function () {
+ p.then(
+ function () {}
+ ).then(
+ function () { throw new Error('gaga'); }
+ ).end();
+ });
+
+ process.nextTick(function () {
+ p.fulfill();
+ });
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/test/promise.test.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/test/promise.test.js
new file mode 100644
index 0000000..bf3044d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/test/promise.test.js
@@ -0,0 +1,554 @@
+/*global describe,it */
+/**
+ * Module dependencies.
+ */
+
+var assert = require('assert');
+var MPromise = require('../');
+
+/**
+ * Test.
+ */
+
+describe('promise', function () {
+ it('events fire right after fulfill()', function (done) {
+ var promise = new MPromise()
+ , called = 0;
+
+ promise.on('fulfill', function (a, b) {
+ assert.equal(a, '1');
+ assert.equal(b, '2');
+ called++;
+ });
+
+ promise.fulfill('1', '2');
+
+ promise.on('fulfill', function (a, b) {
+ assert.equal(a, '1');
+ assert.equal(b, '2');
+ called++;
+ });
+
+ assert.equal(2, called);
+ done();
+ });
+
+ it('events fire right after reject()', function (done) {
+ var promise = new MPromise()
+ , called = 0;
+
+ promise.on('reject', function (err) {
+ assert.ok(err instanceof Error);
+ called++;
+ });
+
+ promise.reject(new Error('booyah'));
+
+ promise.on('reject', function (err) {
+ assert.ok(err instanceof Error);
+ called++;
+ });
+
+ assert.equal(2, called);
+ done()
+ });
+
+ describe('onResolve()', function () {
+ it('from constructor works', function (done) {
+ var called = 0;
+
+ var promise = new MPromise(function (err) {
+ assert.ok(err instanceof Error);
+ called++;
+ });
+
+ promise.reject(new Error('dawg'));
+
+ assert.equal(1, called);
+ done();
+ });
+
+ it('after fulfill()', function (done) {
+ var promise = new MPromise()
+ , called = 0;
+
+ promise.fulfill('woot');
+
+ promise.onResolve(function (err, data) {
+ assert.equal(data, 'woot');
+ called++;
+ });
+
+ promise.onResolve(function (err) {
+ assert.strictEqual(err, null);
+ called++;
+ });
+
+ assert.equal(2, called);
+ done();
+ })
+ });
+
+ describe('onFulfill shortcut', function () {
+ it('works', function (done) {
+ var promise = new MPromise()
+ , called = 0;
+
+ promise.onFulfill(function (woot) {
+ assert.strictEqual(woot, undefined);
+ called++;
+ });
+
+ promise.fulfill();
+
+ assert.equal(1, called);
+ done();
+ });
+ });
+
+ describe('onReject shortcut', function () {
+ it('works', function (done) {
+ var promise = new MPromise()
+ , called = 0;
+
+ promise.onReject(function (err) {
+ assert.ok(err instanceof Error);
+ called++;
+ });
+
+ promise.reject(new Error);
+ assert.equal(1, called);
+ done();
+ })
+ });
+
+ describe('return values', function () {
+ it('on()', function (done) {
+ var promise = new MPromise();
+ assert.ok(promise.on('jump', function () {}) instanceof MPromise);
+ done()
+ });
+
+ it('onFulfill()', function (done) {
+ var promise = new MPromise();
+ assert.ok(promise.onFulfill(function () {}) instanceof MPromise);
+ done();
+ });
+ it('onReject()', function (done) {
+ var promise = new MPromise();
+ assert.ok(promise.onReject(function () {}) instanceof MPromise);
+ done();
+ });
+ it('onResolve()', function (done) {
+ var promise = new MPromise();
+ assert.ok(promise.onResolve(function () {}) instanceof MPromise);
+ done();
+ })
+ });
+
+ describe('casting errors', function () {
+ describe('reject()', function () {
+ it('does not cast arguments to Error', function (done) {
+ var p = new MPromise(function (err) {
+ assert.equal(3, err);
+ done();
+ });
+
+ p.reject(3);
+ })
+ })
+ });
+
+ describe('then', function () {
+ describe('catching', function () {
+ it('should not catch returned promise fulfillments', function (done) {
+ var errorSentinal
+ , p = new MPromise;
+ p.then(function () { throw errorSentinal = new Error("boo!") });
+
+ p.fulfill();
+ done();
+ });
+
+
+ it('should not catch returned promise fulfillments even async', function (done) {
+ var errorSentinal
+ , p = new MPromise;
+ p.then(function () { throw errorSentinal = new Error("boo!") });
+
+ setTimeout(function () {
+ p.fulfill();
+ done();
+ }, 10);
+ });
+
+
+ it('can be disabled using .end()', function (done) {
+ if (process.version.indexOf('v0.8') == 0) return done();
+ var errorSentinal
+ , overTimeout
+ , domain = require('domain').create();
+
+ domain.once('error', function (err) {
+ assert(err, errorSentinal);
+ clearTimeout(overTimeout);
+ done()
+ });
+
+ domain.run(function () {
+ var p = new MPromise;
+ var p2 = p.then(function () {
+ throw errorSentinal = new Error('shucks')
+ });
+ p2.end();
+
+ p.fulfill();
+ });
+ overTimeout = setTimeout(function () { done(new Error('error was swallowed')); }, 10);
+ });
+
+
+ it('can be disabled using .end() even when async', function (done) {
+ if (process.version.indexOf('v0.10') != 0) return done();
+ var errorSentinal
+ , overTimeout
+ , domain = require('domain').create();
+
+ domain.on('error', function (err) {
+ assert(err, errorSentinal);
+ clearTimeout(overTimeout);
+ done()
+ });
+
+ domain.run(function () {
+ var p = new MPromise;
+ var p2 = p.then(function () {
+ throw errorSentinal = new Error("boo!")
+ });
+ p2.end();
+
+ setTimeout(function () {p.fulfill();}, 10);
+ });
+ overTimeout = setTimeout(function () { done(new Error('error was swallowed')); }, 20);
+ });
+
+
+ it('can be handled using .end() so no throwing', function (done) {
+ var errorSentinal
+ , overTimeout
+ , domain = require('domain').create();
+
+ domain.run(function () {
+ var p = new MPromise;
+ var p2 = p.then(function () {
+ throw errorSentinal = new Error("boo!")
+ });
+ p2.end(function (err) {
+ assert.equal(err, errorSentinal);
+ clearTimeout(overTimeout);
+ done()
+ });
+
+ setTimeout(function () {p.fulfill();}, 10);
+ });
+ overTimeout = setTimeout(function () { done(new Error('error was swallowed')); }, 20);
+ });
+
+ });
+
+ it('persistent', function (done) {
+ var p = new MPromise;
+ v = null;
+
+ function ensure(val) {
+ v = v || val;
+ assert.equal(v, val);
+ }
+
+ function guard() {
+ throw new Error('onReject should not be called');
+ }
+
+ p.then(ensure, guard).end();
+
+ p.fulfill('foo');
+ p.fulfill('bar');
+ p.reject(new Error('baz'));
+
+ p.then(ensure, guard).end();
+
+ setTimeout(done, 0);
+ });
+
+
+ it('accepts multiple completion values', function (done) {
+ var p = new MPromise;
+
+ p.then(function (a, b) {
+ assert.equal(2, arguments.length);
+ assert.equal('hi', a);
+ assert.equal(4, b);
+ done();
+ }, done).end();
+
+ p.fulfill('hi', 4);
+ })
+ });
+
+ describe('fulfill values and splats', function () {
+ it('should handle multiple values', function (done) {
+ var p = new MPromise;
+ p.onFulfill(function (a, b, c) {
+ assert.equal('a', a);
+ assert.equal('b', b);
+ assert.equal('c', c);
+ done();
+ });
+ p.fulfill('a', 'b', 'c');
+ });
+
+ it('should handle multiple values from a then', function (done) {
+ MPromise.fulfilled().then(
+ function () {
+ return MPromise.fulfilled().then(
+ function () {
+ var p = new MPromise;
+ p.fulfill('a', 'b', 'c');
+ return p;
+ }
+ );
+ }
+ ).onFulfill(
+ function (a, b, c) {
+ assert.equal('a', a);
+ assert.equal('b', b);
+ assert.equal('c', c);
+ done();
+ }
+ ).end()
+ });
+
+ it('should work with `fulfilled` convenience method', function (done) {
+ MPromise.fulfilled('a', 'b', 'c').then(function (a, b, c) {
+ assert.equal('a', a);
+ assert.equal('b', b);
+ assert.equal('c', c);
+ done();
+ })
+ });
+ });
+
+
+ describe('end', function () {
+ it("should return the promise", function (done) {
+ var p = new MPromise;
+ var p1 = p.end();
+ assert.equal(p, p1);
+ done();
+ });
+
+
+ it("should throw for chain", function (done) {
+ var p = new MPromise;
+ p.then().then().then().then().end();
+ try {
+ p.reject('bad');
+ } catch (e) {
+ done();
+ }
+ });
+
+
+ it("should not throw for chain with reject handler", function (done) {
+ var p = new MPromise;
+ p.then().then().then().then().end(function () {
+ done();
+ });
+ try {
+ p.reject('bad');
+ } catch (e) {
+ done(e);
+ }
+ });
+ });
+
+
+ describe('chain', function () {
+ it('should propagate fulfillment', function (done) {
+ var varSentinel = {a: 'a'};
+ var p1 = new MPromise;
+ p1.chain(new MPromise(function (err, doc) {
+ assert.equal(doc, varSentinel);
+ done();
+ }));
+ p1.fulfill(varSentinel);
+ });
+
+
+ it('should propagate rejection', function (done) {
+ var e = new Error("gaga");
+ var p1 = new MPromise;
+ p1.chain(new MPromise(function (err) {
+ assert.equal(err, e);
+ done();
+ }));
+ p1.reject(e);
+ });
+
+
+ it('should propagate resolution err', function (done) {
+ var e = new Error("gaga");
+ var p1 = new MPromise;
+ p1.chain(new MPromise(function (err) {
+ assert.equal(err, e);
+ done();
+ }));
+ p1.resolve(e);
+ });
+
+
+ it('should propagate resolution val', function (done) {
+ var varSentinel = {a: 'a'};
+ var p1 = new MPromise;
+ p1.chain(new MPromise(function (err, val) {
+ assert.equal(val, varSentinel);
+ done();
+ }));
+ p1.resolve(null, varSentinel);
+ })
+ });
+
+
+ describe("all", function () {
+ it("works", function (done) {
+ var count = 0;
+ var p = new MPromise;
+ var p2 = p.all(function () {
+ return [
+ (function () {
+ var p = new MPromise();
+ count++;
+ p.resolve();
+ return p;
+ })()
+ , (function () {
+ var p = new MPromise();
+ count++;
+ p.resolve();
+ return p;
+ })()
+ ];
+ });
+ p2.then(function () {
+ assert.equal(count, 2);
+ done();
+ });
+ p.resolve();
+ });
+
+
+ it("handles rejects", function (done) {
+ var count = 0;
+ var p = new MPromise;
+ var p2 = p.all(function () {
+ return [
+ (function () {
+ var p = new MPromise();
+ count++;
+ p.resolve();
+ return p;
+ })()
+ , (function () {
+ count++;
+ throw new Error("gaga");
+ })()
+ ];
+ });
+ p2.onReject(function (err) {
+ assert(err.message, "gaga");
+ assert.equal(count, 2);
+ done();
+ });
+ p.resolve();
+ });
+ });
+
+
+ describe("deferred", function () {
+ it("works", function (done) {
+ var d = MPromise.deferred();
+ assert.ok(d.promise instanceof MPromise);
+ assert.ok(d.reject instanceof Function);
+ assert.ok(d.resolve instanceof Function);
+ assert.ok(d.callback instanceof Function);
+ done();
+ });
+ });
+
+
+ describe("hook", function () {
+ it("works", function (done) {
+ var run = 0;
+ var l1 = function (ser, par) {
+ run++;
+ ser();
+ par();
+ };
+ MPromise.hook([l1, l1, l1]).then(function () {
+ assert(run, 3);
+ done();
+ })
+
+ });
+
+
+ it("works with async serial hooks", function (done) {
+ this.timeout(800);
+ var run = 0;
+ var l1 = function (ser, par) {
+ run++;
+ setTimeout(function () {ser();}, 200);
+ par();
+ };
+ MPromise.hook([l1, l1, l1]).then(function () {
+ assert(run, 3);
+ done();
+ })
+ });
+
+
+ it("works with async parallel hooks", function (done) {
+ this.timeout(400);
+ var run = 0;
+ var l1 = function (ser, par) {
+ run++;
+ ser();
+ setTimeout(function () {par();}, 200);
+ };
+ MPromise.hook([l1, l1, l1]).then(function () {
+ assert(run, 3);
+ done();
+ })
+ });
+
+
+ it("catches errors in hook logic", function (done) {
+ var run = 0;
+ var l1 = function (ser, par) {
+ run++;
+ ser();
+ par();
+ };
+ var l2 = function (ser, par) {
+ run++;
+ ser();
+ par();
+ throw new Error("err")
+ };
+ MPromise.hook([l1, l2, l1]).end(function (err) {
+ assert(run, 2);
+ done();
+ });
+ });
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/test/promises.Aplus.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/test/promises.Aplus.js
new file mode 100644
index 0000000..d30bb32
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mpromise/test/promises.Aplus.js
@@ -0,0 +1,15 @@
+/**
+ * Module dependencies.
+ */
+var Promise = require('../lib/promise');
+var aplus = require('promises-aplus-tests');
+
+// tests
+describe("run A+ suite", function () {
+ aplus.mocha({
+ fulfilled: Promise.fulfilled,
+ rejected: Promise.rejected,
+ deferred: Promise.deferred
+ });
+});
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/.npmignore
new file mode 100644
index 0000000..5a14ae1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/.npmignore
@@ -0,0 +1,3 @@
+*.sw*
+node_modules/
+coverage/
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/.travis.yml b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/.travis.yml
new file mode 100644
index 0000000..54f54a5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.12"
+ - "4"
+ - "5"
+services:
+ - mongodb
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/History.md
new file mode 100644
index 0000000..1b9f1de
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/History.md
@@ -0,0 +1,265 @@
+2.0.0 / 2016-09-25
+==================
+ * added; support for mongodb driver 2.0 streams
+
+1.12.0 / 2016-09-25
+===================
+ * added; `retainKeyOrder` option re: Automattic/mongoose#4542
+
+1.11.0 / 2016-06-04
+===================
+ * added; `.minDistance()` helper and minDistance for `.near()` Automattic/mongoose#4179
+
+1.10.1 / 2016-04-26
+===================
+ * fixed; ensure conditions is an object before assigning #75
+
+1.10.0 / 2016-03-16
+==================
+
+ * updated; bluebird to latest 2.10.2 version #74 [matskiv](https://github.com/matskiv)
+
+1.9.0 / 2016-03-15
+==================
+ * added; `.eq` as a shortcut for `.equals` #72 [Fonger](https://github.com/Fonger)
+ * added; ability to use array syntax for sort re: https://jira.mongodb.org/browse/NODE-578 #67
+
+1.8.0 / 2016-03-01
+==================
+ * fixed; dont throw an error if count used with sort or select Automattic/mongoose#3914
+
+1.7.0 / 2016-02-23
+==================
+ * fixed; don't treat objects with a length property as argument objects #70
+ * added; `.findCursor()` method #69 [nswbmw](https://github.com/nswbmw)
+ * added; `_compiledUpdate` property #68 [nswbmw](https://github.com/nswbmw)
+
+1.6.2 / 2015-07-12
+==================
+
+ * fixed; support exec cb being called synchronously #66
+
+1.6.1 / 2015-06-16
+==================
+
+ * fixed; do not treat $meta projection as inclusive [vkarpov15](https://github.com/vkarpov15)
+
+1.6.0 / 2015-05-27
+==================
+
+ * update dependencies #65 [bachp](https://github.com/bachp)
+
+1.5.0 / 2015-03-31
+==================
+
+ * fixed; debug output
+ * fixed; allow hint usage with count #61 [trueinsider](https://github.com/trueinsider)
+
+1.4.0 / 2015-03-29
+==================
+
+ * added; object support to slice() #60 [vkarpov15](https://github.com/vkarpov15)
+ * debug; improved output #57 [flyvictor](https://github.com/flyvictor)
+
+1.3.0 / 2014-11-06
+==================
+
+ * added; setTraceFunction() #53 from [jlai](https://github.com/jlai)
+
+1.2.1 / 2014-09-26
+==================
+
+ * fixed; distinct assignment in toConstructor() #51 from [esco](https://github.com/esco)
+
+1.2.0 / 2014-09-18
+==================
+
+ * added; stream() support for find()
+
+1.1.0 / 2014-09-15
+==================
+
+ * add #then for co / koa support
+ * start checking code coverage
+
+1.0.0 / 2014-07-07
+==================
+
+ * Remove broken require() calls until they're actually implemented #48 [vkarpov15](https://github.com/vkarpov15)
+
+0.9.0 / 2014-05-22
+==================
+
+ * added; thunk() support
+ * release 0.8.0
+
+0.8.0 / 2014-05-15
+==================
+
+ * added; support for maxTimeMS #44 [yoitsro](https://github.com/yoitsro)
+ * updated; devDependency (driver to 1.4.4)
+
+0.7.0 / 2014-05-02
+==================
+
+ * fixed; pass $maxDistance in $near object as described in docs #43 [vkarpov15](https://github.com/vkarpov15)
+ * fixed; cloning buffers #42 [gjohnson](https://github.com/gjohnson)
+ * tests; a little bit more `mongodb` agnostic #34 [refack](https://github.com/refack)
+
+0.6.0 / 2014-04-01
+==================
+
+ * fixed; Allow $meta args in sort() so text search sorting works #37 [vkarpov15](https://github.com/vkarpov15)
+
+0.5.3 / 2014-02-22
+==================
+
+ * fixed; cloning mongodb.Binary
+
+0.5.2 / 2014-01-30
+==================
+
+ * fixed; cloning ObjectId constructors
+ * fixed; cloning of ReadPreferences #30 [ashtuchkin](https://github.com/ashtuchkin)
+ * tests; use specific mongodb version #29 [AvianFlu](https://github.com/AvianFlu)
+ * tests; remove dependency on ObjectId #28 [refack](https://github.com/refack)
+ * tests; add failing ReadPref test
+
+0.5.1 / 2014-01-17
+==================
+
+ * added; deprecation notice to tags parameter #27 [ashtuchkin](https://github.com/ashtuchkin)
+ * readme; add links
+
+0.5.0 / 2014-01-16
+==================
+
+ * removed; mongodb driver dependency #26 [ashtuchkin](https://github.com/ashtuchkin)
+ * removed; first class support of read preference tags #26 (still supported though) [ashtuchkin](https://github.com/ashtuchkin)
+ * added; better ObjectId clone support
+ * fixed; cloning objects that have no constructor #21
+ * docs; cleaned up [ashtuchkin](https://github.com/ashtuchkin)
+
+0.4.2 / 2014-01-08
+==================
+
+ * updated; debug module 0.7.4 [refack](https://github.com/refack)
+
+0.4.1 / 2014-01-07
+==================
+
+ * fixed; inclusive/exclusive logic
+
+0.4.0 / 2014-01-06
+==================
+
+ * added; selected()
+ * added; selectedInclusively()
+ * added; selectedExclusively()
+
+0.3.3 / 2013-11-14
+==================
+
+ * Fix Mongo DB Dependency #20 [rschmukler](https://github.com/rschmukler)
+
+0.3.2 / 2013-09-06
+==================
+
+ * added; geometry support for near()
+
+0.3.1 / 2013-08-22
+==================
+
+ * fixed; update retains key order #19
+
+0.3.0 / 2013-08-22
+==================
+
+ * less hardcoded isNode env detection #18 [vshulyak](https://github.com/vshulyak)
+ * added; validation of findAndModify varients
+ * clone update doc before execution
+ * stricter env checks
+
+0.2.7 / 2013-08-2
+==================
+
+ * Now support GeoJSON point values for Query#near
+
+0.2.6 / 2013-07-30
+==================
+
+ * internally, 'asc' and 'desc' for sorts are now converted into 1 and -1, respectively
+
+0.2.5 / 2013-07-30
+==================
+
+ * updated docs
+ * changed internal representation of `sort` to use objects instead of arrays
+
+0.2.4 / 2013-07-25
+==================
+
+ * updated; sliced to 0.0.5
+
+0.2.3 / 2013-07-09
+==================
+
+ * now using a callback in collection.find instead of directly calling toArray() on the cursor [ebensing](https://github.com/ebensing)
+
+0.2.2 / 2013-07-09
+==================
+
+ * now exposing mongodb export to allow for better testing [ebensing](https://github.com/ebensing)
+
+0.2.1 / 2013-07-08
+==================
+
+ * select no longer accepts arrays as parameters [ebensing](https://github.com/ebensing)
+
+0.2.0 / 2013-07-05
+==================
+
+ * use $geoWithin by default
+
+0.1.2 / 2013-07-02
+==================
+
+ * added use$geoWithin flag [ebensing](https://github.com/ebensing)
+ * fix read preferences typo [ebensing](https://github.com/ebensing)
+ * fix reference to old param name in exists() [ebensing](https://github.com/ebensing)
+
+0.1.1 / 2013-06-24
+==================
+
+ * fixed; $intersects -> $geoIntersects #14 [ebensing](https://github.com/ebensing)
+ * fixed; Retain key order when copying objects #15 [ebensing](https://github.com/ebensing)
+ * bump mongodb dev dep
+
+0.1.0 / 2013-05-06
+==================
+
+ * findAndModify; return the query
+ * move mquery.proto.canMerge to mquery.canMerge
+ * overwrite option now works with non-empty objects
+ * use strict mode
+ * validate count options
+ * validate distinct options
+ * add aggregate to base collection methods
+ * clone merge arguments
+ * clone merged update arguments
+ * move subclass to mquery.prototype.toConstructor
+ * fixed; maxScan casing
+ * use regexp-clone
+ * added; geometry/intersects support
+ * support $and
+ * near: do not use "radius"
+ * callbacks always fire on next turn of loop
+ * defined collection interface
+ * remove time from tests
+ * clarify goals
+ * updated docs;
+
+0.0.1 / 2012-12-15
+==================
+
+ * initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/LICENSE
new file mode 100644
index 0000000..38c529d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2012 [Aaron Heckmann](aaron.heckmann+github@gmail.com)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/Makefile b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/Makefile
new file mode 100644
index 0000000..dbb2831
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/Makefile
@@ -0,0 +1,22 @@
+
+test:
+ @NODE_ENV=test ./node_modules/.bin/mocha $(T) $(TESTS)
+
+test-cov:
+ @NODE_ENV=test node \
+ node_modules/.bin/istanbul cover \
+ ./node_modules/.bin/_mocha \
+ -- -u exports \
+
+open-cov:
+ open coverage/lcov-report/index.html
+
+test-travis:
+ @NODE_ENV=test node \
+ node_modules/.bin/istanbul cover \
+ ./node_modules/.bin/_mocha \
+ --report lcovonly \
+ -- -u exports \
+ --bail
+
+.PHONY: test test-cov open-cov test-travis
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/README.md
new file mode 100644
index 0000000..f9a06f0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/README.md
@@ -0,0 +1,1219 @@
+#mquery
+
+`mquery` is a fluent mongodb query builder designed to run in multiple environments. As of v0.1, `mquery` runs on `Node.js` only with support for the MongoDB shell and browser environments planned for upcoming releases.
+
+##Features
+
+ - fluent query builder api
+ - custom base query support
+ - MongoDB 2.4 geoJSON support
+ - method + option combinations validation
+ - node.js driver compatibility
+ - environment detection
+ - [debug](https://github.com/visionmedia/debug) support
+ - separated collection implementations for maximum flexibility
+
+[![Build Status](https://travis-ci.org/aheckmann/mquery.png)](https://travis-ci.org/aheckmann/mquery)
+
+##Use
+
+```js
+require('mongodb').connect(uri, function (err, db) {
+ if (err) return handleError(err);
+
+ // get a collection
+ var collection = db.collection('artists');
+
+ // pass it to the constructor
+ mquery(collection).find({..}, callback);
+
+ // or pass it to the collection method
+ mquery().find({..}).collection(collection).exec(callback)
+
+ // or better yet, create a custom query constructor that has it always set
+ var Artist = mquery(collection).toConstructor();
+ Artist().find(..).where(..).exec(callback)
+})
+```
+
+`mquery` requires a collection object to work with. In the example above we just pass the collection object created using the official [MongoDB driver](https://github.com/mongodb/node-mongodb-native).
+
+
+##Fluent API
+
+- [find](#find)
+- [findOne](#findOne)
+- [count](#count)
+- [remove](#remove)
+- [update](#update)
+- [findOneAndUpdate](#findoneandupdate)
+- [findOneAndRemove](#findoneandremove)
+- [distinct](#distinct)
+- [exec](#exec)
+- [stream](#stream)
+- [all](#all)
+- [and](#and)
+- [box](#box)
+- [circle](#circle)
+- [elemMatch](#elemmatch)
+- [equals](#equals)
+- [exists](#exists)
+- [geometry](#geometry)
+- [gt](#gt)
+- [gte](#gte)
+- [in](#in)
+- [intersects](#intersects)
+- [lt](#lt)
+- [lte](#lte)
+- [maxDistance](#maxdistance)
+- [mod](#mod)
+- [ne](#ne)
+- [nin](#nin)
+- [nor](#nor)
+- [near](#near)
+- [or](#or)
+- [polygon](#polygon)
+- [regex](#regex)
+- [select](#select)
+- [selected](#selected)
+- [selectedInclusively](#selectedinclusively)
+- [selectedExclusively](#selectedexclusively)
+- [size](#size)
+- [slice](#slice)
+- [within](#within)
+- [where](#where)
+- [$where](#where-1)
+- [batchSize](#batchsize)
+- [comment](#comment)
+- [hint](#hint)
+- [limit](#limit)
+- [maxScan](#maxscan)
+- [maxTime](#maxtime)
+- [skip](#skip)
+- [sort](#sort)
+- [read](#read)
+- [slaveOk](#slaveok)
+- [snapshot](#snapshot)
+- [tailable](#tailable)
+
+## Helpers
+
+- [collection](#collection)
+- [then](#then)
+- [thunk](#thunk)
+- [merge](#mergeobject)
+- [setOptions](#setoptionsoptions)
+- [setTraceFunction](#settracefunctionfunc)
+- [mquery.setGlobalTraceFunction](#mquerysetglobaltracefunctionfunc)
+- [mquery.canMerge](#mquerycanmerge)
+- [mquery.use$geoWithin](#mqueryusegeowithin)
+
+###find()
+
+Declares this query a _find_ query. Optionally pass a match clause and / or callback. If a callback is passed the query is executed.
+
+```js
+mquery().find()
+mquery().find(match)
+mquery().find(callback)
+mquery().find(match, function (err, docs) {
+ assert(Array.isArray(docs));
+})
+```
+
+###findOne()
+
+Declares this query a _findOne_ query. Optionally pass a match clause and / or callback. If a callback is passed the query is executed.
+
+```js
+mquery().findOne()
+mquery().findOne(match)
+mquery().findOne(callback)
+mquery().findOne(match, function (err, doc) {
+ if (doc) {
+ // the document may not be found
+ console.log(doc);
+ }
+})
+```
+
+###count()
+
+Declares this query a _count_ query. Optionally pass a match clause and / or callback. If a callback is passed the query is executed.
+
+```js
+mquery().count()
+mquery().count(match)
+mquery().count(callback)
+mquery().count(match, function (err, number){
+ console.log('we found %d matching documents', number);
+})
+```
+
+###remove()
+
+Declares this query a _remove_ query. Optionally pass a match clause and / or callback. If a callback is passed the query is executed.
+
+```js
+mquery().remove()
+mquery().remove(match)
+mquery().remove(callback)
+mquery().remove(match, function (err){})
+```
+
+###update()
+
+Declares this query an _update_ query. Optionally pass an update document, match clause, options or callback. If a callback is passed, the query is executed. To force execution without passing a callback, run `update(true)`.
+
+```js
+mquery().update()
+mquery().update(match, updateDocument)
+mquery().update(match, updateDocument, options)
+
+// the following all execute the command
+mquery().update(callback)
+mquery().update({$set: updateDocument, callback)
+mquery().update(match, updateDocument, callback)
+mquery().update(match, updateDocument, options, function (err, result){})
+mquery().update(true) // executes (unsafe write)
+```
+
+#####the update document
+
+All paths passed that are not `$atomic` operations will become `$set` ops. For example:
+
+```js
+mquery(collection).where({ _id: id }).update({ title: 'words' }, callback)
+```
+
+becomes
+
+```js
+collection.update({ _id: id }, { $set: { title: 'words' }}, callback)
+```
+
+This behavior can be overridden using the `overwrite` option (see below).
+
+#####options
+
+Options are passed to the `setOptions()` method.
+
+- overwrite
+
+Passing an empty object `{ }` as the update document will result in a no-op unless the `overwrite` option is passed. Without the `overwrite` option, the update operation will be ignored and the callback executed without sending the command to MongoDB to prevent accidently overwritting documents in the collection.
+
+```js
+var q = mquery(collection).where({ _id: id }).setOptions({ overwrite: true });
+q.update({ }, callback); // overwrite with an empty doc
+```
+
+The `overwrite` option isn't just for empty objects, it also provides a means to override the default `$set` conversion and send the update document as is.
+
+```js
+// create a base query
+var base = mquery({ _id: 108 }).collection(collection).toConstructor();
+
+base().findOne(function (err, doc) {
+ console.log(doc); // { _id: 108, name: 'cajon' })
+
+ base().setOptions({ overwrite: true }).update({ changed: true }, function (err) {
+ base.findOne(function (err, doc) {
+ console.log(doc); // { _id: 108, changed: true }) - the doc was overwritten
+ });
+ });
+})
+```
+
+- multi
+
+Updates only modify a single document by default. To update multiple documents, set the `multi` option to `true`.
+
+```js
+mquery()
+ .collection(coll)
+ .update({ name: /^match/ }, { $addToSet: { arr: 4 }}, { multi: true }, callback)
+
+// another way of doing it
+mquery({ name: /^match/ })
+ .collection(coll)
+ .setOptions({ multi: true })
+ .update({ $addToSet: { arr: 4 }}, callback)
+
+// update multiple documents with an empty doc
+var q = mquery(collection).where({ name: /^match/ });
+q.setOptions({ multi: true, overwrite: true })
+q.update({ });
+q.update(function (err, result) {
+ console.log(arguments);
+});
+```
+
+###findOneAndUpdate()
+
+Declares this query a _findAndModify_ with update query. Optionally pass a match clause, update document, options, or callback. If a callback is passed, the query is executed.
+
+When executed, the first matching document (if found) is modified according to the update document and passed back to the callback.
+
+#####options
+
+Options are passed to the `setOptions()` method.
+
+- `new`: boolean - true to return the modified document rather than the original. defaults to true
+- `upsert`: boolean - creates the object if it doesn't exist. defaults to false
+- `sort`: if multiple docs are found by the match condition, sets the sort order to choose which doc to update
+
+```js
+query.findOneAndUpdate()
+query.findOneAndUpdate(updateDocument)
+query.findOneAndUpdate(match, updateDocument)
+query.findOneAndUpdate(match, updateDocument, options)
+
+// the following all execute the command
+query.findOneAndUpdate(callback)
+query.findOneAndUpdate(updateDocument, callback)
+query.findOneAndUpdate(match, updateDocument, callback)
+query.findOneAndUpdate(match, updateDocument, options, function (err, doc) {
+ if (doc) {
+ // the document may not be found
+ console.log(doc);
+ }
+})
+ ```
+
+###findOneAndRemove()
+
+Declares this query a _findAndModify_ with remove query. Optionally pass a match clause, options, or callback. If a callback is passed, the query is executed.
+
+When executed, the first matching document (if found) is modified according to the update document, removed from the collection and passed to the callback.
+
+#####options
+
+Options are passed to the `setOptions()` method.
+
+- `sort`: if multiple docs are found by the condition, sets the sort order to choose which doc to modify and remove
+
+```js
+A.where().findOneAndRemove()
+A.where().findOneAndRemove(match)
+A.where().findOneAndRemove(match, options)
+
+// the following all execute the command
+A.where().findOneAndRemove(callback)
+A.where().findOneAndRemove(match, callback)
+A.where().findOneAndRemove(match, options, function (err, doc) {
+ if (doc) {
+ // the document may not be found
+ console.log(doc);
+ }
+})
+ ```
+
+###distinct()
+
+Declares this query a _distinct_ query. Optionally pass the distinct field, a match clause or callback. If a callback is passed the query is executed.
+
+```js
+mquery().distinct()
+mquery().distinct(match)
+mquery().distinct(match, field)
+mquery().distinct(field)
+
+// the following all execute the command
+mquery().distinct(callback)
+mquery().distinct(field, callback)
+mquery().distinct(match, callback)
+mquery().distinct(match, field, function (err, result) {
+ console.log(result);
+})
+```
+
+###exec()
+
+Executes the query.
+
+```js
+mquery().findOne().where('route').intersects(polygon).exec(function (err, docs){})
+```
+
+###stream()
+
+Executes the query and returns a stream.
+
+```js
+var stream = mquery().find().stream(options);
+stream.on('data', cb);
+stream.on('close', fn);
+```
+
+Note: this only works with `find()` operations.
+
+Note: returns the stream object directly from the node-mongodb-native driver. (currently streams1 type stream). Any options will be passed along to the [driver method](http://mongodb.github.io/node-mongodb-native/api-generated/cursor.html#stream).
+
+-------------
+
+###all()
+
+Specifies an `$all` query condition
+
+```js
+mquery().where('permission').all(['read', 'write'])
+```
+
+[MongoDB documentation](http://docs.mongodb.org/manual/reference/operator/all/)
+
+###and()
+
+Specifies arguments for an `$and` condition
+
+```js
+mquery().and([{ color: 'green' }, { status: 'ok' }])
+```
+
+[MongoDB documentation](http://docs.mongodb.org/manual/reference/operator/and/)
+
+###box()
+
+Specifies a `$box` condition
+
+```js
+var lowerLeft = [40.73083, -73.99756]
+var upperRight= [40.741404, -73.988135]
+
+mquery().where('location').within().box(lowerLeft, upperRight)
+```
+
+[MongoDB Documentation](http://docs.mongodb.org/manual/reference/operator/box/)
+
+###circle()
+
+Specifies a `$center` or `$centerSphere` condition.
+
+```js
+var area = { center: [50, 50], radius: 10, unique: true }
+query.where('loc').within().circle(area)
+query.circle('loc', area);
+
+// for spherical calculations
+var area = { center: [50, 50], radius: 10, unique: true, spherical: true }
+query.where('loc').within().circle(area)
+query.circle('loc', area);
+```
+
+- [MongoDB Documentation - center](http://docs.mongodb.org/manual/reference/operator/center/)
+- [MongoDB Documentation - centerSphere](http://docs.mongodb.org/manual/reference/operator/centerSphere/)
+
+###elemMatch()
+
+Specifies an `$elemMatch` condition
+
+```js
+query.where('comment').elemMatch({ author: 'autobot', votes: {$gte: 5}})
+
+query.elemMatch('comment', function (elem) {
+ elem.where('author').equals('autobot');
+ elem.where('votes').gte(5);
+})
+```
+
+[MongoDB Documentation](http://docs.mongodb.org/manual/reference/operator/elemMatch/)
+
+###equals()
+
+Specifies the complementary comparison value for the path specified with `where()`.
+
+```js
+mquery().where('age').equals(49);
+
+// is the same as
+
+mquery().where({ 'age': 49 });
+```
+
+###exists()
+
+Specifies an `$exists` condition
+
+```js
+// { name: { $exists: true }}
+mquery().where('name').exists()
+mquery().where('name').exists(true)
+mquery().exists('name')
+
+// { name: { $exists: false }}
+mquery().where('name').exists(false);
+mquery().exists('name', false);
+```
+
+[MongoDB Documentation](http://docs.mongodb.org/manual/reference/operator/exists/)
+
+###geometry()
+
+Specifies a `$geometry` condition
+
+```js
+var polyA = [[[ 10, 20 ], [ 10, 40 ], [ 30, 40 ], [ 30, 20 ]]]
+query.where('loc').within().geometry({ type: 'Polygon', coordinates: polyA })
+
+// or
+var polyB = [[ 0, 0 ], [ 1, 1 ]]
+query.where('loc').within().geometry({ type: 'LineString', coordinates: polyB })
+
+// or
+var polyC = [ 0, 0 ]
+query.where('loc').within().geometry({ type: 'Point', coordinates: polyC })
+
+// or
+query.where('loc').intersects().geometry({ type: 'Point', coordinates: polyC })
+
+// or
+query.where('loc').near().geometry({ type: 'Point', coordinates: [3,5] })
+```
+
+`geometry()` **must** come after `intersects()`, `within()`, or `near()`.
+
+The `object` argument must contain `type` and `coordinates` properties.
+
+- type `String`
+- coordinates `Array`
+
+[MongoDB Documentation](http://docs.mongodb.org/manual/reference/operator/geometry/)
+
+###gt()
+
+Specifies a `$gt` query condition.
+
+```js
+mquery().where('clicks').gt(999)
+```
+
+[MongoDB Documentation](http://docs.mongodb.org/manual/reference/operator/gt/)
+
+###gte()
+
+Specifies a `$gte` query condition.
+
+[MongoDB Documentation](http://docs.mongodb.org/manual/reference/operator/gte/)
+
+```js
+mquery().where('clicks').gte(1000)
+```
+
+###in()
+
+Specifies an `$in` query condition.
+
+```js
+mquery().where('author_id').in([3, 48901, 761])
+```
+
+[MongoDB Documentation](http://docs.mongodb.org/manual/reference/operator/in/)
+
+###intersects()
+
+Declares an `$geoIntersects` query for `geometry()`.
+
+```js
+query.where('path').intersects().geometry({
+ type: 'LineString'
+ , coordinates: [[180.0, 11.0], [180, 9.0]]
+})
+
+// geometry arguments are supported
+query.where('path').intersects({
+ type: 'LineString'
+ , coordinates: [[180.0, 11.0], [180, 9.0]]
+})
+```
+
+**Must** be used after `where()`.
+
+[MongoDB Documentation](http://docs.mongodb.org/manual/reference/operator/geoIntersects/)
+
+###lt()
+
+Specifies a `$lt` query condition.
+
+```js
+mquery().where('clicks').lt(50)
+```
+
+[MongoDB Documentation](http://docs.mongodb.org/manual/reference/operator/lt/)
+
+###lte()
+
+Specifies a `$lte` query condition.
+
+```js
+mquery().where('clicks').lte(49)
+```
+
+[MongoDB Documentation](http://docs.mongodb.org/manual/reference/operator/lte/)
+
+###maxDistance()
+
+Specifies a `$maxDistance` query condition.
+
+```js
+mquery().where('location').near({ center: [139, 74.3] }).maxDistance(5)
+```
+
+[MongoDB Documentation](http://docs.mongodb.org/manual/reference/operator/maxDistance/)
+
+###mod()
+
+Specifies a `$mod` condition
+
+```js
+mquery().where('count').mod(2, 0)
+```
+
+[MongoDB Documentation](http://docs.mongodb.org/manual/reference/operator/mod/)
+
+###ne()
+
+Specifies a `$ne` query condition.
+
+```js
+mquery().where('status').ne('ok')
+```
+
+[MongoDB Documentation](http://docs.mongodb.org/manual/reference/operator/ne/)
+
+###nin()
+
+Specifies an `$nin` query condition.
+
+```js
+mquery().where('author_id').nin([3, 48901, 761])
+```
+
+[MongoDB Documentation](http://docs.mongodb.org/manual/reference/operator/nin/)
+
+###nor()
+
+Specifies arguments for an `$nor` condition.
+
+```js
+mquery().nor([{ color: 'green' }, { status: 'ok' }])
+```
+
+[MongoDB Documentation](http://docs.mongodb.org/manual/reference/operator/nor/)
+
+###near()
+
+Specifies arguments for a `$near` or `$nearSphere` condition.
+
+These operators return documents sorted by distance.
+
+####Example
+
+```js
+query.where('loc').near({ center: [10, 10] });
+query.where('loc').near({ center: [10, 10], maxDistance: 5 });
+query.near('loc', { center: [10, 10], maxDistance: 5 });
+
+// GeoJSON
+query.where('loc').near({ center: { type: 'Point', coordinates: [10, 10] }});
+query.where('loc').near({ center: { type: 'Point', coordinates: [10, 10] }, maxDistance: 5, spherical: true });
+query.where('loc').near().geometry({ type: 'Point', coordinates: [10, 10] });
+
+// For a $nearSphere condition, pass the `spherical` option.
+query.near({ center: [10, 10], maxDistance: 5, spherical: true });
+```
+
+[MongoDB Documentation](http://www.mongodb.org/display/DOCS/Geospatial+Indexing)
+
+###or()
+
+Specifies arguments for an `$or` condition.
+
+```js
+mquery().or([{ color: 'red' }, { status: 'emergency' }])
+```
+
+[MongoDB Documentation](http://docs.mongodb.org/manual/reference/operator/or/)
+
+###polygon()
+
+Specifies a `$polygon` condition
+
+```js
+mquery().where('loc').within().polygon([10,20], [13, 25], [7,15])
+mquery().polygon('loc', [10,20], [13, 25], [7,15])
+```
+
+[MongoDB Documentation](http://docs.mongodb.org/manual/reference/operator/polygon/)
+
+###regex()
+
+Specifies a `$regex` query condition.
+
+```js
+mquery().where('name').regex(/^sixstepsrecords/)
+```
+
+[MongoDB Documentation](http://docs.mongodb.org/manual/reference/operator/regex/)
+
+###select()
+
+Specifies which document fields to include or exclude
+
+```js
+// 1 means include, 0 means exclude
+mquery().select({ name: 1, address: 1, _id: 0 })
+
+// or
+
+mquery().select('name address -_id')
+```
+
+#####String syntax
+
+When passing a string, prefixing a path with `-` will flag that path as excluded. When a path does not have the `-` prefix, it is included.
+
+```js
+// include a and b, exclude c
+query.select('a b -c');
+
+// or you may use object notation, useful when
+// you have keys already prefixed with a "-"
+query.select({a: 1, b: 1, c: 0});
+```
+
+_Cannot be used with `distinct()`._
+
+###selected()
+
+Determines if the query has selected any fields.
+
+```js
+var query = mquery();
+query.selected() // false
+query.select('-name');
+query.selected() // true
+```
+
+###selectedInclusively()
+
+Determines if the query has selected any fields inclusively.
+
+```js
+var query = mquery().select('name');
+query.selectedInclusively() // true
+
+var query = mquery();
+query.selected() // false
+query.select('-name');
+query.selectedInclusively() // false
+query.selectedExclusively() // true
+```
+
+###selectedExclusively()
+
+Determines if the query has selected any fields exclusively.
+
+```js
+var query = mquery().select('-name');
+query.selectedExclusively() // true
+
+var query = mquery();
+query.selected() // false
+query.select('name');
+query.selectedExclusively() // false
+query.selectedInclusively() // true
+```
+
+###size()
+
+Specifies a `$size` query condition.
+
+```js
+mquery().where('someArray').size(6)
+```
+
+[MongoDB Documentation](http://docs.mongodb.org/manual/reference/operator/size/)
+
+###slice()
+
+Specifies a `$slice` projection for a `path`
+
+```js
+mquery().where('comments').slice(5)
+mquery().where('comments').slice(-5)
+mquery().where('comments').slice([-10, 5])
+```
+
+[MongoDB Documentation](http://docs.mongodb.org/manual/reference/projection/slice/)
+
+###within()
+
+Sets a `$geoWithin` or `$within` argument for geo-spatial queries.
+
+```js
+mquery().within().box()
+mquery().within().circle()
+mquery().within().geometry()
+
+mquery().where('loc').within({ center: [50,50], radius: 10, unique: true, spherical: true });
+mquery().where('loc').within({ box: [[40.73, -73.9], [40.7, -73.988]] });
+mquery().where('loc').within({ polygon: [[],[],[],[]] });
+
+mquery().where('loc').within([], [], []) // polygon
+mquery().where('loc').within([], []) // box
+mquery().where('loc').within({ type: 'LineString', coordinates: [...] }); // geometry
+```
+
+As of mquery 2.0, `$geoWithin` is used by default. This impacts you if running MongoDB < 2.4. To alter this behavior, see [mquery.use$geoWithin](#mqueryusegeowithin).
+
+**Must** be used after `where()`.
+
+[MongoDB Documentation](http://docs.mongodb.org/manual/reference/operator/geoWithin/)
+
+###where()
+
+Specifies a `path` for use with chaining
+
+```js
+// instead of writing:
+mquery().find({age: {$gte: 21, $lte: 65}});
+
+// we can instead write:
+mquery().where('age').gte(21).lte(65);
+
+// passing query conditions is permitted too
+mquery().find().where({ name: 'vonderful' })
+
+// chaining
+mquery()
+.where('age').gte(21).lte(65)
+.where({ 'name': /^vonderful/i })
+.where('friends').slice(10)
+.exec(callback)
+```
+
+###$where()
+
+Specifies a `$where` condition.
+
+Use `$where` when you need to select documents using a JavaScript expression.
+
+```js
+query.$where('this.comments.length > 10 || this.name.length > 5').exec(callback)
+
+query.$where(function () {
+ return this.comments.length > 10 || this.name.length > 5;
+})
+```
+
+Only use `$where` when you have a condition that cannot be met using other MongoDB operators like `$lt`. Be sure to read about all of [its caveats](http://docs.mongodb.org/manual/reference/operator/where/) before using.
+
+-----------
+
+###batchSize()
+
+Specifies the batchSize option.
+
+```js
+query.batchSize(100)
+```
+
+_Cannot be used with `distinct()`._
+
+[MongoDB documentation](http://docs.mongodb.org/manual/reference/method/cursor.batchSize/)
+
+###comment()
+
+Specifies the comment option.
+
+```js
+query.comment('login query');
+```
+
+_Cannot be used with `distinct()`._
+
+[MongoDB documentation](http://docs.mongodb.org/manual/reference/operator/)
+
+###hint()
+
+Sets query hints.
+
+```js
+mquery().hint({ indexA: 1, indexB: -1 })
+```
+
+_Cannot be used with `distinct()`._
+
+[MongoDB documentation](http://docs.mongodb.org/manual/reference/operator/hint/)
+
+###limit()
+
+Specifies the limit option.
+
+```js
+query.limit(20)
+```
+
+_Cannot be used with `distinct()`._
+
+[MongoDB documentation](http://docs.mongodb.org/manual/reference/method/cursor.limit/)
+
+###maxScan()
+
+Specifies the maxScan option.
+
+```js
+query.maxScan(100)
+```
+
+_Cannot be used with `distinct()`._
+
+[MongoDB documentation](http://docs.mongodb.org/manual/reference/operator/maxScan/)
+
+###maxTime()
+
+Specifies the maxTimeMS option.
+
+```js
+query.maxTime(100)
+```
+
+[MongoDB documentation](http://docs.mongodb.org/manual/reference/method/cursor.maxTimeMS/)
+
+
+###skip()
+
+Specifies the skip option.
+
+```js
+query.skip(100).limit(20)
+```
+
+_Cannot be used with `distinct()`._
+
+[MongoDB documentation](http://docs.mongodb.org/manual/reference/method/cursor.skip/)
+
+###sort()
+
+Sets the query sort order.
+
+If an object is passed, key values allowed are `asc`, `desc`, `ascending`, `descending`, `1`, and `-1`.
+
+If a string is passed, it must be a space delimited list of path names. The sort order of each path is ascending unless the path name is prefixed with `-` which will be treated as descending.
+
+```js
+// these are equivalent
+query.sort({ field: 'asc', test: -1 });
+query.sort('field -test');
+```
+
+_Cannot be used with `distinct()`._
+
+[MongoDB documentation](http://docs.mongodb.org/manual/reference/method/cursor.sort/)
+
+###read()
+
+Sets the readPreference option for the query.
+
+```js
+mquery().read('primary')
+mquery().read('p') // same as primary
+
+mquery().read('primaryPreferred')
+mquery().read('pp') // same as primaryPreferred
+
+mquery().read('secondary')
+mquery().read('s') // same as secondary
+
+mquery().read('secondaryPreferred')
+mquery().read('sp') // same as secondaryPreferred
+
+mquery().read('nearest')
+mquery().read('n') // same as nearest
+```
+
+#####Preferences:
+
+- `primary` - (default) Read from primary only. Operations will produce an error if primary is unavailable. Cannot be combined with tags.
+- `secondary` - Read from secondary if available, otherwise error.
+- `primaryPreferred` - Read from primary if available, otherwise a secondary.
+- `secondaryPreferred` - Read from a secondary if available, otherwise read from the primary.
+- `nearest` - All operations read from among the nearest candidates, but unlike other modes, this option will include both the primary and all secondaries in the random selection.
+
+Aliases
+
+- `p` primary
+- `pp` primaryPreferred
+- `s` secondary
+- `sp` secondaryPreferred
+- `n` nearest
+
+#####Preference Tags:
+
+To keep the separation of concerns between `mquery` and your driver
+clean, `mquery#read()` no longer handles specifying a second `tags` argument as of version 0.5.
+If you need to specify tags, pass any non-string argument as the first argument.
+`mquery` will pass this argument untouched to your collections methods later.
+For example:
+
+```js
+// example of specifying tags using the Node.js driver
+var ReadPref = require('mongodb').ReadPreference;
+var preference = new ReadPref('secondary', [{ dc:'sf', s: 1 },{ dc:'ma', s: 2 }]);
+mquery(..).read(preference).exec();
+```
+
+Read more about how to use read preferences [here](http://docs.mongodb.org/manual/applications/replication/#read-preference) and [here](http://mongodb.github.com/node-mongodb-native/driver-articles/anintroductionto1_1and2_2.html#read-preferences).
+
+###slaveOk()
+
+Sets the slaveOk option. `true` allows reading from secondaries.
+
+**deprecated** use [read()](#read) preferences instead if on mongodb >= 2.2
+
+```js
+query.slaveOk() // true
+query.slaveOk(true)
+query.slaveOk(false)
+```
+
+[MongoDB documentation](http://docs.mongodb.org/manual/reference/method/rs.slaveOk/)
+
+###snapshot()
+
+Specifies this query as a snapshot query.
+
+```js
+mquery().snapshot() // true
+mquery().snapshot(true)
+mquery().snapshot(false)
+```
+
+_Cannot be used with `distinct()`._
+
+[MongoDB documentation](http://docs.mongodb.org/manual/reference/operator/snapshot/)
+
+###tailable()
+
+Sets tailable option.
+
+```js
+mquery().tailable() <== true
+mquery().tailable(true)
+mquery().tailable(false)
+```
+
+_Cannot be used with `distinct()`._
+
+[MongoDB Documentation](http://docs.mongodb.org/manual/tutorial/create-tailable-cursor/)
+
+##Helpers
+
+###collection()
+
+Sets the querys collection.
+
+```js
+mquery().collection(aCollection)
+```
+
+###then()
+
+Executes the query and returns a promise which will be resolved with the query results or rejected if the query responds with an error.
+
+```js
+mquery().find(..).then(success, error);
+```
+
+This is very useful when combined with [co](https://github.com/visionmedia/co) or [koa](https://github.com/koajs/koa), which automatically resolve promise-like objects for you.
+
+```js
+co(function*(){
+ var doc = yield mquery().findOne({ _id: 499 });
+ console.log(doc); // { _id: 499, name: 'amazing', .. }
+})();
+```
+
+_NOTE_:
+The returned promise is a [bluebird](https://github.com/petkaantonov/bluebird/) promise but this is customizable. If you want to
+use your favorite promise library, simply set `mquery.Promise = YourPromiseConstructor`.
+Your `Promise` must be [promises A+](http://promisesaplus.com/) compliant.
+
+###thunk()
+
+Returns a thunk which when called runs the query's `exec` method passing the results to the callback.
+
+```js
+var thunk = mquery(collection).find({..}).thunk();
+
+thunk(function(err, results) {
+
+})
+```
+
+###merge(object)
+
+Merges other mquery or match condition objects into this one. When an muery instance is passed, its match conditions, field selection and options are merged.
+
+```js
+var drum = mquery({ type: 'drum' }).collection(instruments);
+var redDrum = mqery({ color: 'red' }).merge(drum);
+redDrum.count(function (err, n) {
+ console.log('there are %d red drums', n);
+})
+```
+
+Internally uses `mquery.canMerge` to determine validity.
+
+###setOptions(options)
+
+Sets query options.
+
+```js
+mquery().setOptions({ collection: coll, limit: 20 })
+```
+
+#####options
+
+- [tailable](#tailable) *
+- [sort](#sort) *
+- [limit](#limit) *
+- [skip](#skip) *
+- [maxScan](#maxscan) *
+- [maxTime](#maxtime) *
+- [batchSize](#batchSize) *
+- [comment](#comment) *
+- [snapshot](#snapshot) *
+- [hint](#hint) *
+- [slaveOk](#slaveOk) *
+- [safe](http://docs.mongodb.org/manual/reference/write-concern/): Boolean - passed through to the collection. Setting to `true` is equivalent to `{ w: 1 }`
+- [collection](#collection): the collection to query against
+
+_* denotes a query helper method is also available_
+
+###setTraceFunction(func)
+
+Set a function to trace this query. Useful for profiling or logging.
+
+```js
+function traceFunction (method, queryInfo, query) {
+ console.log('starting ' + method + ' query');
+
+ return function (err, result, millis) {
+ console.log('finished ' + method + ' query in ' + millis + 'ms');
+ };
+}
+
+mquery().setTraceFunction(traceFunction).findOne({name: 'Joe'}, cb);
+```
+
+The trace function is passed (method, queryInfo, query)
+
+- method is the name of the method being called (e.g. findOne)
+- queryInfo contains information about the query:
+ - conditions: query conditions/criteria
+ - options: options such as sort, fields, etc
+ - doc: document being updated
+- query is the query object
+
+The trace function should return a callback function which accepts:
+- err: error, if any
+- result: result, if any
+- millis: time spent waiting for query result
+
+NOTE: stream requests are not traced.
+
+###mquery.setGlobalTraceFunction(func)
+
+Similar to `setTraceFunction()` but automatically applied to all queries.
+
+```js
+mquery.setTraceFunction(traceFunction);
+```
+
+###mquery.canMerge(conditions)
+
+Determines if `conditions` can be merged using `mquery().merge()`.
+
+```js
+var query = mquery({ type: 'drum' });
+var okToMerge = mquery.canMerge(anObject)
+if (okToMerge) {
+ query.merge(anObject);
+}
+```
+
+##mquery.use$geoWithin
+
+MongoDB 2.4 introduced the `$geoWithin` operator which replaces and is 100% backward compatible with `$within`. As of mquery 0.2, we default to using `$geoWithin` for all `within()` calls.
+
+If you are running MongoDB < 2.4 this will be problematic. To force `mquery` to be backward compatible and always use `$within`, set the `mquery.use$geoWithin` flag to `false`.
+
+```js
+mquery.use$geoWithin = false;
+```
+
+##Custom Base Queries
+
+Often times we want custom base queries that encapsulate predefined criteria. With `mquery` this is easy. First create the query you want to reuse and call its `toConstructor()` method which returns a new subclass of `mquery` that retains all options and criteria of the original.
+
+```js
+var greatMovies = mquery(movieCollection).where('rating').gte(4.5).toConstructor();
+
+// use it!
+greatMovies().count(function (err, n) {
+ console.log('There are %d great movies', n);
+});
+
+greatMovies().where({ name: /^Life/ }).select('name').find(function (err, docs) {
+ console.log(docs);
+});
+```
+
+##Validation
+
+Method and options combinations are checked for validity at runtime to prevent creation of invalid query constructs. For example, a `distinct` query does not support specifying options like `hint` or field selection. In this case an error will be thrown so you can catch these mistakes in development.
+
+##Debug support
+
+Debug mode is provided through the use of the [debug](https://github.com/visionmedia/debug) module. To enable:
+
+ DEBUG=mquery node yourprogram.js
+
+Read the debug module documentation for more details.
+
+## General compatibility
+
+#### ObjectIds
+
+`mquery` clones query arguments before passing them to a `collection` method for execution.
+This prevents accidental side-affects to the objects you pass.
+To clone `ObjectIds` we need to make some assumptions.
+
+First, to check if an object is an `ObjectId`, we check its constructors name. If it matches either
+`ObjectId` or `ObjectID` we clone it.
+
+To clone `ObjectIds`, we call its optional `clone` method. If a `clone` method does not exist, we fall
+back to calling `new obj.constructor(obj.id)`. We assume, for compatibility with the
+Node.js driver, that the `ObjectId` instance has a public `id` property and that
+when creating an `ObjectId` instance we can pass that `id` as an argument.
+
+#### Read Preferences
+
+`mquery` supports specifying [Read Preferences]() to control from which MongoDB node your query will read.
+The Read Preferences spec also support specifying tags. To pass tags, some
+drivers (Node.js driver) require passing a special constructor that handles both the read preference and its tags.
+If you need to specify tags, pass an instance of your drivers ReadPreference constructor or roll your own. `mquery` will store whatever you provide and pass later to your collection during execution.
+
+##Future goals
+
+ - mongo shell compatibility
+ - browser compatibility
+
+## Installation
+
+ $ npm install mquery
+
+## License
+
+[MIT](https://github.com/aheckmann/mquery/blob/master/LICENSE)
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/collection/collection.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/collection/collection.js
new file mode 100644
index 0000000..bce3c38
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/collection/collection.js
@@ -0,0 +1,42 @@
+'use strict';
+
+/**
+ * methods a collection must implement
+ */
+
+var methods = [
+ 'find'
+ , 'findOne'
+ , 'update'
+ , 'remove'
+ , 'count'
+ , 'distinct'
+ , 'findAndModify'
+ , 'aggregate'
+ , 'findStream'
+];
+
+/**
+ * Collection base class from which implementations inherit
+ */
+
+function Collection () {}
+
+for (var i = 0, len = methods.length; i < len; ++i) {
+ var method = methods[i];
+ Collection.prototype[method] = notImplemented(method);
+}
+
+module.exports = exports = Collection;
+Collection.methods = methods;
+
+/**
+ * creates a function which throws an implementation error
+ */
+
+function notImplemented (method) {
+ return function () {
+ throw new Error('collection.' + method + ' not implemented');
+ }
+}
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/collection/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/collection/index.js
new file mode 100644
index 0000000..e3cf44d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/collection/index.js
@@ -0,0 +1,13 @@
+'use strict';
+
+var env = require('../env')
+
+if ('unknown' == env.type) {
+ throw new Error('Unknown environment')
+}
+
+module.exports =
+ env.isNode ? require('./node') :
+ env.isMongo ? require('./collection') :
+ require('./collection');
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/collection/node.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/collection/node.js
new file mode 100644
index 0000000..7ba04cf
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/collection/node.js
@@ -0,0 +1,108 @@
+'use strict';
+
+/**
+ * Module dependencies
+ */
+
+var Collection = require('./collection');
+var utils = require('../utils');
+
+function NodeCollection (col) {
+ this.collection = col;
+ this.collectionName = col.collectionName;
+}
+
+/**
+ * inherit from collection base class
+ */
+
+utils.inherits(NodeCollection, Collection);
+
+/**
+ * find(match, options, function(err, docs))
+ */
+
+NodeCollection.prototype.find = function (match, options, cb) {
+ this.collection.find(match, options, function (err, cursor) {
+ if (err) return cb(err);
+
+ cursor.toArray(cb);
+ });
+}
+
+/**
+ * findOne(match, options, function(err, doc))
+ */
+
+NodeCollection.prototype.findOne = function (match, options, cb) {
+ this.collection.findOne(match, options, cb);
+}
+
+/**
+ * count(match, options, function(err, count))
+ */
+
+NodeCollection.prototype.count = function (match, options, cb) {
+ this.collection.count(match, options, cb);
+}
+
+/**
+ * distinct(prop, match, options, function(err, count))
+ */
+
+NodeCollection.prototype.distinct = function (prop, match, options, cb) {
+ this.collection.distinct(prop, match, options, cb);
+}
+
+/**
+ * update(match, update, options, function(err[, result]))
+ */
+
+NodeCollection.prototype.update = function (match, update, options, cb) {
+ this.collection.update(match, update, options, cb);
+}
+
+/**
+ * remove(match, options, function(err[, result])
+ */
+
+NodeCollection.prototype.remove = function (match, options, cb) {
+ this.collection.remove(match, options, cb);
+}
+
+/**
+ * findAndModify(match, update, options, function(err, doc))
+ */
+
+NodeCollection.prototype.findAndModify = function (match, update, options, cb) {
+ var sort = Array.isArray(options.sort) ? options.sort : [];
+ this.collection.findAndModify(match, sort, update, options, cb);
+}
+
+/**
+ * var stream = findStream(match, findOptions, streamOptions)
+ */
+
+NodeCollection.prototype.findStream = function(match, findOptions, streamOptions) {
+ return this.collection.find(match, findOptions);
+}
+
+/**
+ * var cursor = findCursor(match, findOptions)
+ */
+
+NodeCollection.prototype.findCursor = function(match, findOptions) {
+ return this.collection.find(match, findOptions);
+}
+
+/**
+ * aggregation(operators..., function(err, doc))
+ * TODO
+ */
+
+/**
+ * Expose
+ */
+
+module.exports = exports = NodeCollection;
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/env.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/env.js
new file mode 100644
index 0000000..3313b46
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/env.js
@@ -0,0 +1,22 @@
+'use strict';
+
+exports.isNode = 'undefined' != typeof process
+ && 'object' == typeof module
+ && 'object' == typeof global
+ && 'function' == typeof Buffer
+ && process.argv
+
+exports.isMongo = !exports.isNode
+ && 'function' == typeof printjson
+ && 'function' == typeof ObjectId
+ && 'function' == typeof rs
+ && 'function' == typeof sh;
+
+exports.isBrowser = !exports.isNode
+ && !exports.isMongo
+ && 'undefined' != typeof window;
+
+exports.type = exports.isNode ? 'node'
+ : exports.isMongo ? 'mongo'
+ : exports.isBrowser ? 'browser'
+ : 'unknown'
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/mquery.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/mquery.js
new file mode 100644
index 0000000..63d2c51
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/mquery.js
@@ -0,0 +1,2728 @@
+'use strict';
+
+/**
+ * Dependencies
+ */
+
+var slice = require('sliced')
+var assert = require('assert')
+var util = require('util')
+var utils = require('./utils')
+var debug = require('debug')('mquery');
+
+/**
+ * Query constructor used for building queries.
+ *
+ * ####Example:
+ *
+ * var query = new Query({ name: 'mquery' });
+ * query.setOptions({ collection: moduleCollection })
+ * query.where('age').gte(21).exec(callback);
+ *
+ * @param {Object} [criteria]
+ * @param {Object} [options]
+ * @api public
+ */
+
+function Query (criteria, options) {
+ if (!(this instanceof Query))
+ return new Query(criteria, options);
+
+ var proto = this.constructor.prototype;
+
+ this.op = proto.op || undefined;
+
+ this.options = {};
+ this.setOptions(proto.options);
+
+ this._conditions = proto._conditions
+ ? utils.clone(proto._conditions, { retainKeyOrder: this.options.retainKeyOrder })
+ : {};
+
+ this._fields = proto._fields
+ ? utils.clone(proto._fields, { retainKeyOrder: this.options.retainKeyOrder })
+ : undefined;
+
+ this._update = proto._update
+ ? utils.clone(proto._update, { retainKeyOrder: this.options.retainKeyOrder })
+ : undefined;
+
+ this._path = proto._path || undefined;
+ this._distinct = proto._distinct || undefined;
+ this._collection = proto._collection || undefined;
+ this._traceFunction = proto._traceFunction || undefined;
+
+ if (options) {
+ this.setOptions(options);
+ }
+
+ if (criteria) {
+ if (criteria.find && criteria.remove && criteria.update) {
+ // quack quack!
+ this.collection(criteria);
+ } else {
+ this.find(criteria);
+ }
+ }
+}
+
+/**
+ * This is a parameter that the user can set which determines if mquery
+ * uses $within or $geoWithin for queries. It defaults to true which
+ * means $geoWithin will be used. If using MongoDB < 2.4 you should
+ * set this to false.
+ *
+ * @api public
+ * @property use$geoWithin
+ */
+
+var $withinCmd = '$geoWithin';
+Object.defineProperty(Query, 'use$geoWithin', {
+ get: function ( ) { return $withinCmd == '$geoWithin' }
+ , set: function (v) {
+ if (true === v) {
+ // mongodb >= 2.4
+ $withinCmd = '$geoWithin';
+ } else {
+ $withinCmd = '$within';
+ }
+ }
+});
+
+/**
+ * Converts this query to a constructor function with all arguments and options retained.
+ *
+ * ####Example
+ *
+ * // Create a query that will read documents with a "video" category from
+ * // `aCollection` on the primary node in the replica-set unless it is down,
+ * // in which case we'll read from a secondary node.
+ * var query = mquery({ category: 'video' })
+ * query.setOptions({ collection: aCollection, read: 'primaryPreferred' });
+ *
+ * // create a constructor based off these settings
+ * var Video = query.toConstructor();
+ *
+ * // Video is now a subclass of mquery() and works the same way but with the
+ * // default query parameters and options set.
+ *
+ * // run a query with the previous settings but filter for movies with names
+ * // that start with "Life".
+ * Video().where({ name: /^Life/ }).exec(cb);
+ *
+ * @return {Query} new Query
+ * @api public
+ */
+
+Query.prototype.toConstructor = function toConstructor () {
+ function CustomQuery (criteria, options) {
+ if (!(this instanceof CustomQuery))
+ return new CustomQuery(criteria, options);
+ Query.call(this, criteria, options);
+ }
+
+ utils.inherits(CustomQuery, Query);
+
+ // set inherited defaults
+ var p = CustomQuery.prototype;
+
+ p.options = {};
+ p.setOptions(this.options);
+
+ p.op = this.op;
+ p._conditions = utils.clone(this._conditions, { retainKeyOrder: this.options.retainKeyOrder });
+ p._fields = utils.clone(this._fields, { retainKeyOrder: this.options.retainKeyOrder });
+ p._update = utils.clone(this._update, { retainKeyOrder: this.options.retainKeyOrder });
+ p._path = this._path;
+ p._distinct = this._distinct;
+ p._collection = this._collection;
+ p._traceFunction = this._traceFunction;
+
+ return CustomQuery;
+}
+
+/**
+ * Sets query options.
+ *
+ * ####Options:
+ *
+ * - [tailable](http://www.mongodb.org/display/DOCS/Tailable+Cursors) *
+ * - [sort](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%7B%7Bsort(\)%7D%7D) *
+ * - [limit](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%7B%7Blimit%28%29%7D%7D) *
+ * - [skip](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%7B%7Bskip%28%29%7D%7D) *
+ * - [maxScan](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24maxScan) *
+ * - [maxTime](http://docs.mongodb.org/manual/reference/operator/meta/maxTimeMS/#op._S_maxTimeMS) *
+ * - [batchSize](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%7B%7BbatchSize%28%29%7D%7D) *
+ * - [comment](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24comment) *
+ * - [snapshot](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%7B%7Bsnapshot%28%29%7D%7D) *
+ * - [hint](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24hint) *
+ * - [slaveOk](http://docs.mongodb.org/manual/applications/replication/#read-preference) *
+ * - [safe](http://www.mongodb.org/display/DOCS/getLastError+Command)
+ * - collection the collection to query against
+ *
+ * _* denotes a query helper method is also available_
+ *
+ * @param {Object} options
+ * @api public
+ */
+
+Query.prototype.setOptions = function (options) {
+ if (!(options && utils.isObject(options)))
+ return this;
+
+ // set arbitrary options
+ var methods = utils.keys(options)
+ , method
+
+ for (var i = 0; i < methods.length; ++i) {
+ method = methods[i];
+
+ // use methods if exist (safer option manipulation)
+ if ('function' == typeof this[method]) {
+ var args = utils.isArray(options[method])
+ ? options[method]
+ : [options[method]];
+ this[method].apply(this, args)
+ } else {
+ this.options[method] = options[method];
+ }
+ }
+
+ return this;
+}
+
+/**
+ * Sets this Querys collection.
+ *
+ * @param {Collection} coll
+ * @return {Query} this
+ */
+
+Query.prototype.collection = function collection (coll) {
+ this._collection = new Query.Collection(coll);
+
+ return this;
+}
+
+/**
+ * Specifies a `$where` condition
+ *
+ * Use `$where` when you need to select documents using a JavaScript expression.
+ *
+ * ####Example
+ *
+ * query.$where('this.comments.length > 10 || this.name.length > 5')
+ *
+ * query.$where(function () {
+ * return this.comments.length > 10 || this.name.length > 5;
+ * })
+ *
+ * @param {String|Function} js javascript string or function
+ * @return {Query} this
+ * @memberOf Query
+ * @method $where
+ * @api public
+ */
+
+Query.prototype.$where = function (js) {
+ this._conditions.$where = js;
+ return this;
+}
+
+/**
+ * Specifies a `path` for use with chaining.
+ *
+ * ####Example
+ *
+ * // instead of writing:
+ * User.find({age: {$gte: 21, $lte: 65}}, callback);
+ *
+ * // we can instead write:
+ * User.where('age').gte(21).lte(65);
+ *
+ * // passing query conditions is permitted
+ * User.find().where({ name: 'vonderful' })
+ *
+ * // chaining
+ * User
+ * .where('age').gte(21).lte(65)
+ * .where('name', /^vonderful/i)
+ * .where('friends').slice(10)
+ * .exec(callback)
+ *
+ * @param {String} [path]
+ * @param {Object} [val]
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.where = function () {
+ if (!arguments.length) return this;
+ if (!this.op) this.op = 'find';
+
+ var type = typeof arguments[0];
+
+ if ('string' == type) {
+ this._path = arguments[0];
+
+ if (2 === arguments.length) {
+ this._conditions[this._path] = arguments[1];
+ }
+
+ return this;
+ }
+
+ if ('object' == type && !Array.isArray(arguments[0])) {
+ return this.merge(arguments[0]);
+ }
+
+ throw new TypeError('path must be a string or object');
+}
+
+/**
+ * Specifies the complementary comparison value for paths specified with `where()`
+ *
+ * ####Example
+ *
+ * User.where('age').equals(49);
+ *
+ * // is the same as
+ *
+ * User.where('age', 49);
+ *
+ * @param {Object} val
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.equals = function equals (val) {
+ this._ensurePath('equals');
+ var path = this._path;
+ this._conditions[path] = val;
+ return this;
+}
+
+/**
+ * Specifies the complementary comparison value for paths specified with `where()`
+ * This is alias of `equals`
+ *
+ * ####Example
+ *
+ * User.where('age').eq(49);
+ *
+ * // is the same as
+ *
+ * User.shere('age').equals(49);
+ *
+ * // is the same as
+ *
+ * User.where('age', 49);
+ *
+ * @param {Object} val
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.eq = function eq (val) {
+ this._ensurePath('eq');
+ var path = this._path;
+ this._conditions[path] = val;
+ return this;
+}
+
+/**
+ * Specifies arguments for an `$or` condition.
+ *
+ * ####Example
+ *
+ * query.or([{ color: 'red' }, { status: 'emergency' }])
+ *
+ * @param {Array} array array of conditions
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.or = function or (array) {
+ var or = this._conditions.$or || (this._conditions.$or = []);
+ if (!utils.isArray(array)) array = [array];
+ or.push.apply(or, array);
+ return this;
+}
+
+/**
+ * Specifies arguments for a `$nor` condition.
+ *
+ * ####Example
+ *
+ * query.nor([{ color: 'green' }, { status: 'ok' }])
+ *
+ * @param {Array} array array of conditions
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.nor = function nor (array) {
+ var nor = this._conditions.$nor || (this._conditions.$nor = []);
+ if (!utils.isArray(array)) array = [array];
+ nor.push.apply(nor, array);
+ return this;
+}
+
+/**
+ * Specifies arguments for a `$and` condition.
+ *
+ * ####Example
+ *
+ * query.and([{ color: 'green' }, { status: 'ok' }])
+ *
+ * @see $and http://docs.mongodb.org/manual/reference/operator/and/
+ * @param {Array} array array of conditions
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.and = function and (array) {
+ var and = this._conditions.$and || (this._conditions.$and = []);
+ if (!Array.isArray(array)) array = [array];
+ and.push.apply(and, array);
+ return this;
+}
+
+/**
+ * Specifies a $gt query condition.
+ *
+ * When called with one argument, the most recent path passed to `where()` is used.
+ *
+ * ####Example
+ *
+ * Thing.find().where('age').gt(21)
+ *
+ * // or
+ * Thing.find().gt('age', 21)
+ *
+ * @method gt
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @api public
+ */
+
+/**
+ * Specifies a $gte query condition.
+ *
+ * When called with one argument, the most recent path passed to `where()` is used.
+ *
+ * @method gte
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @api public
+ */
+
+/**
+ * Specifies a $lt query condition.
+ *
+ * When called with one argument, the most recent path passed to `where()` is used.
+ *
+ * @method lt
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @api public
+ */
+
+/**
+ * Specifies a $lte query condition.
+ *
+ * When called with one argument, the most recent path passed to `where()` is used.
+ *
+ * @method lte
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @api public
+ */
+
+/**
+ * Specifies a $ne query condition.
+ *
+ * When called with one argument, the most recent path passed to `where()` is used.
+ *
+ * @method ne
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @api public
+ */
+
+/**
+ * Specifies an $in query condition.
+ *
+ * When called with one argument, the most recent path passed to `where()` is used.
+ *
+ * @method in
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @api public
+ */
+
+/**
+ * Specifies an $nin query condition.
+ *
+ * When called with one argument, the most recent path passed to `where()` is used.
+ *
+ * @method nin
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @api public
+ */
+
+/**
+ * Specifies an $all query condition.
+ *
+ * When called with one argument, the most recent path passed to `where()` is used.
+ *
+ * @method all
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @api public
+ */
+
+/**
+ * Specifies a $size query condition.
+ *
+ * When called with one argument, the most recent path passed to `where()` is used.
+ *
+ * @method size
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @api public
+ */
+
+/**
+ * Specifies a $regex query condition.
+ *
+ * When called with one argument, the most recent path passed to `where()` is used.
+ *
+ * @method regex
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @api public
+ */
+
+/**
+ * Specifies a $maxDistance query condition.
+ *
+ * When called with one argument, the most recent path passed to `where()` is used.
+ *
+ * @method maxDistance
+ * @memberOf Query
+ * @param {String} [path]
+ * @param {Number} val
+ * @api public
+ */
+
+/*!
+ * gt, gte, lt, lte, ne, in, nin, all, regex, size, maxDistance
+ *
+ * Thing.where('type').nin(array)
+ */
+
+'gt gte lt lte ne in nin all regex size maxDistance minDistance'.split(' ').forEach(function ($conditional) {
+ Query.prototype[$conditional] = function () {
+ var path, val;
+
+ if (1 === arguments.length) {
+ this._ensurePath($conditional);
+ val = arguments[0];
+ path = this._path;
+ } else {
+ val = arguments[1];
+ path = arguments[0];
+ }
+
+ var conds = this._conditions[path] === null || typeof this._conditions[path] === 'object' ?
+ this._conditions[path] :
+ (this._conditions[path] = {});
+ conds['$' + $conditional] = val;
+ return this;
+ };
+})
+
+/**
+ * Specifies a `$mod` condition
+ *
+ * @param {String} [path]
+ * @param {Number} val
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.mod = function () {
+ var val, path;
+
+ if (1 === arguments.length) {
+ this._ensurePath('mod')
+ val = arguments[0];
+ path = this._path;
+ } else if (2 === arguments.length && !utils.isArray(arguments[1])) {
+ this._ensurePath('mod')
+ val = slice(arguments);
+ path = this._path;
+ } else if (3 === arguments.length) {
+ val = slice(arguments, 1);
+ path = arguments[0];
+ } else {
+ val = arguments[1];
+ path = arguments[0];
+ }
+
+ var conds = this._conditions[path] || (this._conditions[path] = {});
+ conds.$mod = val;
+ return this;
+}
+
+/**
+ * Specifies an `$exists` condition
+ *
+ * ####Example
+ *
+ * // { name: { $exists: true }}
+ * Thing.where('name').exists()
+ * Thing.where('name').exists(true)
+ * Thing.find().exists('name')
+ *
+ * // { name: { $exists: false }}
+ * Thing.where('name').exists(false);
+ * Thing.find().exists('name', false);
+ *
+ * @param {String} [path]
+ * @param {Number} val
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.exists = function () {
+ var path, val;
+
+ if (0 === arguments.length) {
+ this._ensurePath('exists');
+ path = this._path;
+ val = true;
+ } else if (1 === arguments.length) {
+ if ('boolean' === typeof arguments[0]) {
+ this._ensurePath('exists');
+ path = this._path;
+ val = arguments[0];
+ } else {
+ path = arguments[0];
+ val = true;
+ }
+ } else if (2 === arguments.length) {
+ path = arguments[0];
+ val = arguments[1];
+ }
+
+ var conds = this._conditions[path] || (this._conditions[path] = {});
+ conds.$exists = val;
+ return this;
+}
+
+/**
+ * Specifies an `$elemMatch` condition
+ *
+ * ####Example
+ *
+ * query.elemMatch('comment', { author: 'autobot', votes: {$gte: 5}})
+ *
+ * query.where('comment').elemMatch({ author: 'autobot', votes: {$gte: 5}})
+ *
+ * query.elemMatch('comment', function (elem) {
+ * elem.where('author').equals('autobot');
+ * elem.where('votes').gte(5);
+ * })
+ *
+ * query.where('comment').elemMatch(function (elem) {
+ * elem.where({ author: 'autobot' });
+ * elem.where('votes').gte(5);
+ * })
+ *
+ * @param {String|Object|Function} path
+ * @param {Object|Function} criteria
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.elemMatch = function () {
+ if (null == arguments[0])
+ throw new TypeError("Invalid argument");
+
+ var fn, path, criteria;
+
+ if ('function' === typeof arguments[0]) {
+ this._ensurePath('elemMatch');
+ path = this._path;
+ fn = arguments[0];
+ } else if (utils.isObject(arguments[0])) {
+ this._ensurePath('elemMatch');
+ path = this._path;
+ criteria = arguments[0];
+ } else if ('function' === typeof arguments[1]) {
+ path = arguments[0];
+ fn = arguments[1];
+ } else if (arguments[1] && utils.isObject(arguments[1])) {
+ path = arguments[0];
+ criteria = arguments[1];
+ } else {
+ throw new TypeError("Invalid argument");
+ }
+
+ if (fn) {
+ criteria = new Query;
+ fn(criteria);
+ criteria = criteria._conditions;
+ }
+
+ var conds = this._conditions[path] || (this._conditions[path] = {});
+ conds.$elemMatch = criteria;
+ return this;
+}
+
+// Spatial queries
+
+/**
+ * Sugar for geo-spatial queries.
+ *
+ * ####Example
+ *
+ * query.within().box()
+ * query.within().circle()
+ * query.within().geometry()
+ *
+ * query.where('loc').within({ center: [50,50], radius: 10, unique: true, spherical: true });
+ * query.where('loc').within({ box: [[40.73, -73.9], [40.7, -73.988]] });
+ * query.where('loc').within({ polygon: [[],[],[],[]] });
+ *
+ * query.where('loc').within([], [], []) // polygon
+ * query.where('loc').within([], []) // box
+ * query.where('loc').within({ type: 'LineString', coordinates: [...] }); // geometry
+ *
+ * ####NOTE:
+ *
+ * Must be used after `where()`.
+ *
+ * @memberOf Query
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.within = function within () {
+ // opinionated, must be used after where
+ this._ensurePath('within');
+ this._geoComparison = $withinCmd;
+
+ if (0 === arguments.length) {
+ return this;
+ }
+
+ if (2 === arguments.length) {
+ return this.box.apply(this, arguments);
+ } else if (2 < arguments.length) {
+ return this.polygon.apply(this, arguments);
+ }
+
+ var area = arguments[0];
+
+ if (!area)
+ throw new TypeError('Invalid argument');
+
+ if (area.center)
+ return this.circle(area);
+
+ if (area.box)
+ return this.box.apply(this, area.box);
+
+ if (area.polygon)
+ return this.polygon.apply(this, area.polygon);
+
+ if (area.type && area.coordinates)
+ return this.geometry(area);
+
+ throw new TypeError('Invalid argument');
+}
+
+/**
+ * Specifies a $box condition
+ *
+ * ####Example
+ *
+ * var lowerLeft = [40.73083, -73.99756]
+ * var upperRight= [40.741404, -73.988135]
+ *
+ * query.where('loc').within().box(lowerLeft, upperRight)
+ * query.box('loc', lowerLeft, upperRight )
+ *
+ * @see http://www.mongodb.org/display/DOCS/Geospatial+Indexing
+ * @see Query#within #query_Query-within
+ * @param {String} path
+ * @param {Object} val
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.box = function () {
+ var path, box;
+
+ if (3 === arguments.length) {
+ // box('loc', [], [])
+ path = arguments[0];
+ box = [arguments[1], arguments[2]];
+ } else if (2 === arguments.length) {
+ // box([], [])
+ this._ensurePath('box');
+ path = this._path;
+ box = [arguments[0], arguments[1]];
+ } else {
+ throw new TypeError("Invalid argument");
+ }
+
+ var conds = this._conditions[path] || (this._conditions[path] = {});
+ conds[this._geoComparison || $withinCmd] = { '$box': box };
+ return this;
+}
+
+/**
+ * Specifies a $polygon condition
+ *
+ * ####Example
+ *
+ * query.where('loc').within().polygon([10,20], [13, 25], [7,15])
+ * query.polygon('loc', [10,20], [13, 25], [7,15])
+ *
+ * @param {String|Array} [path]
+ * @param {Array|Object} [val]
+ * @return {Query} this
+ * @see http://www.mongodb.org/display/DOCS/Geospatial+Indexing
+ * @api public
+ */
+
+Query.prototype.polygon = function () {
+ var val, path;
+
+ if ('string' == typeof arguments[0]) {
+ // polygon('loc', [],[],[])
+ path = arguments[0];
+ val = slice(arguments, 1);
+ } else {
+ // polygon([],[],[])
+ this._ensurePath('polygon');
+ path = this._path;
+ val = slice(arguments);
+ }
+
+ var conds = this._conditions[path] || (this._conditions[path] = {});
+ conds[this._geoComparison || $withinCmd] = { '$polygon': val };
+ return this;
+}
+
+/**
+ * Specifies a $center or $centerSphere condition.
+ *
+ * ####Example
+ *
+ * var area = { center: [50, 50], radius: 10, unique: true }
+ * query.where('loc').within().circle(area)
+ * query.center('loc', area);
+ *
+ * // for spherical calculations
+ * var area = { center: [50, 50], radius: 10, unique: true, spherical: true }
+ * query.where('loc').within().circle(area)
+ * query.center('loc', area);
+ *
+ * @param {String} [path]
+ * @param {Object} area
+ * @return {Query} this
+ * @see http://www.mongodb.org/display/DOCS/Geospatial+Indexing
+ * @api public
+ */
+
+Query.prototype.circle = function () {
+ var path, val;
+
+ if (1 === arguments.length) {
+ this._ensurePath('circle');
+ path = this._path;
+ val = arguments[0];
+ } else if (2 === arguments.length) {
+ path = arguments[0];
+ val = arguments[1];
+ } else {
+ throw new TypeError("Invalid argument");
+ }
+
+ if (!('radius' in val && val.center))
+ throw new Error('center and radius are required');
+
+ var conds = this._conditions[path] || (this._conditions[path] = {});
+
+ var type = val.spherical
+ ? '$centerSphere'
+ : '$center';
+
+ var wKey = this._geoComparison || $withinCmd;
+ conds[wKey] = {};
+ conds[wKey][type] = [val.center, val.radius];
+
+ if ('unique' in val)
+ conds[wKey].$uniqueDocs = !! val.unique;
+
+ return this;
+}
+
+/**
+ * Specifies a `$near` or `$nearSphere` condition
+ *
+ * These operators return documents sorted by distance.
+ *
+ * ####Example
+ *
+ * query.where('loc').near({ center: [10, 10] });
+ * query.where('loc').near({ center: [10, 10], maxDistance: 5 });
+ * query.where('loc').near({ center: [10, 10], maxDistance: 5, spherical: true });
+ * query.near('loc', { center: [10, 10], maxDistance: 5 });
+ * query.near({ center: { type: 'Point', coordinates: [..] }})
+ * query.near().geometry({ type: 'Point', coordinates: [..] })
+ *
+ * @param {String} [path]
+ * @param {Object} val
+ * @return {Query} this
+ * @see http://www.mongodb.org/display/DOCS/Geospatial+Indexing
+ * @api public
+ */
+
+Query.prototype.near = function near () {
+ var path, val;
+
+ this._geoComparison = '$near';
+
+ if (0 === arguments.length) {
+ return this;
+ } else if (1 === arguments.length) {
+ this._ensurePath('near');
+ path = this._path;
+ val = arguments[0];
+ } else if (2 === arguments.length) {
+ path = arguments[0];
+ val = arguments[1];
+ } else {
+ throw new TypeError("Invalid argument");
+ }
+
+ if (!val.center) {
+ throw new Error('center is required');
+ }
+
+ var conds = this._conditions[path] || (this._conditions[path] = {});
+
+ var type = val.spherical
+ ? '$nearSphere'
+ : '$near';
+
+ // center could be a GeoJSON object or an Array
+ if (Array.isArray(val.center)) {
+ conds[type] = val.center;
+
+ var radius = 'maxDistance' in val
+ ? val.maxDistance
+ : null;
+
+ if (null != radius) {
+ conds.$maxDistance = radius;
+ }
+ if (null != val.minDistance) {
+ conds.$minDistance = val.minDistance;
+ }
+ } else {
+ // GeoJSON?
+ if (val.center.type != 'Point' || !Array.isArray(val.center.coordinates)) {
+ throw new Error(util.format("Invalid GeoJSON specified for %s", type));
+ }
+ conds[type] = { $geometry : val.center };
+
+ // MongoDB 2.6 insists on maxDistance being in $near / $nearSphere
+ if ('maxDistance' in val) {
+ conds[type]['$maxDistance'] = val.maxDistance;
+ }
+ if ('minDistance' in val) {
+ conds[type]['$minDistance'] = val.minDistance;
+ }
+ }
+
+ return this;
+}
+
+/**
+ * Declares an intersects query for `geometry()`.
+ *
+ * ####Example
+ *
+ * query.where('path').intersects().geometry({
+ * type: 'LineString'
+ * , coordinates: [[180.0, 11.0], [180, 9.0]]
+ * })
+ *
+ * query.where('path').intersects({
+ * type: 'LineString'
+ * , coordinates: [[180.0, 11.0], [180, 9.0]]
+ * })
+ *
+ * @param {Object} [arg]
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.intersects = function intersects () {
+ // opinionated, must be used after where
+ this._ensurePath('intersects');
+
+ this._geoComparison = '$geoIntersects';
+
+ if (0 === arguments.length) {
+ return this;
+ }
+
+ var area = arguments[0];
+
+ if (null != area && area.type && area.coordinates)
+ return this.geometry(area);
+
+ throw new TypeError('Invalid argument');
+}
+
+/**
+ * Specifies a `$geometry` condition
+ *
+ * ####Example
+ *
+ * var polyA = [[[ 10, 20 ], [ 10, 40 ], [ 30, 40 ], [ 30, 20 ]]]
+ * query.where('loc').within().geometry({ type: 'Polygon', coordinates: polyA })
+ *
+ * // or
+ * var polyB = [[ 0, 0 ], [ 1, 1 ]]
+ * query.where('loc').within().geometry({ type: 'LineString', coordinates: polyB })
+ *
+ * // or
+ * var polyC = [ 0, 0 ]
+ * query.where('loc').within().geometry({ type: 'Point', coordinates: polyC })
+ *
+ * // or
+ * query.where('loc').intersects().geometry({ type: 'Point', coordinates: polyC })
+ *
+ * ####NOTE:
+ *
+ * `geometry()` **must** come after either `intersects()` or `within()`.
+ *
+ * The `object` argument must contain `type` and `coordinates` properties.
+ * - type {String}
+ * - coordinates {Array}
+ *
+ * The most recent path passed to `where()` is used.
+ *
+ * @param {Object} object Must contain a `type` property which is a String and a `coordinates` property which is an Array. See the examples.
+ * @return {Query} this
+ * @see http://docs.mongodb.org/manual/release-notes/2.4/#new-geospatial-indexes-with-geojson-and-improved-spherical-geometry
+ * @see http://www.mongodb.org/display/DOCS/Geospatial+Indexing
+ * @see $geometry http://docs.mongodb.org/manual/reference/operator/geometry/
+ * @api public
+ */
+
+Query.prototype.geometry = function geometry () {
+ if (!('$within' == this._geoComparison ||
+ '$geoWithin' == this._geoComparison ||
+ '$near' == this._geoComparison ||
+ '$geoIntersects' == this._geoComparison)) {
+ throw new Error('geometry() must come after `within()`, `intersects()`, or `near()');
+ }
+
+ var val, path;
+
+ if (1 === arguments.length) {
+ this._ensurePath('geometry');
+ path = this._path;
+ val = arguments[0];
+ } else {
+ throw new TypeError("Invalid argument");
+ }
+
+ if (!(val.type && Array.isArray(val.coordinates))) {
+ throw new TypeError('Invalid argument');
+ }
+
+ var conds = this._conditions[path] || (this._conditions[path] = {});
+ conds[this._geoComparison] = { $geometry: val };
+
+ return this;
+}
+
+// end spatial
+
+/**
+ * Specifies which document fields to include or exclude
+ *
+ * ####String syntax
+ *
+ * When passing a string, prefixing a path with `-` will flag that path as excluded. When a path does not have the `-` prefix, it is included.
+ *
+ * ####Example
+ *
+ * // include a and b, exclude c
+ * query.select('a b -c');
+ *
+ * // or you may use object notation, useful when
+ * // you have keys already prefixed with a "-"
+ * query.select({a: 1, b: 1, c: 0});
+ *
+ * ####Note
+ *
+ * Cannot be used with `distinct()`
+ *
+ * @param {Object|String} arg
+ * @return {Query} this
+ * @see SchemaType
+ * @api public
+ */
+
+Query.prototype.select = function select () {
+ var arg = arguments[0];
+ if (!arg) return this;
+
+ if (arguments.length !== 1) {
+ throw new Error("Invalid select: select only takes 1 argument");
+ }
+
+ this._validate('select');
+
+ var fields = this._fields || (this._fields = {});
+ var type = typeof arg;
+
+ if (('string' == type || utils.isArgumentsObject(arg)) &&
+ 'number' == typeof arg.length) {
+ if ('string' == type)
+ arg = arg.split(/\s+/);
+
+ for (var i = 0, len = arg.length; i < len; ++i) {
+ var field = arg[i];
+ if (!field) continue;
+ var include = '-' == field[0] ? 0 : 1;
+ if (include === 0) field = field.substring(1);
+ fields[field] = include;
+ }
+
+ return this;
+ }
+
+ if (utils.isObject(arg) && !Array.isArray(arg)) {
+ var keys = utils.keys(arg);
+ for (var i = 0; i < keys.length; ++i) {
+ fields[keys[i]] = arg[keys[i]];
+ }
+ return this;
+ }
+
+ throw new TypeError('Invalid select() argument. Must be string or object.');
+}
+
+/**
+ * Specifies a $slice condition for a `path`
+ *
+ * ####Example
+ *
+ * query.slice('comments', 5)
+ * query.slice('comments', -5)
+ * query.slice('comments', [10, 5])
+ * query.where('comments').slice(5)
+ * query.where('comments').slice([-10, 5])
+ *
+ * @param {String} [path]
+ * @param {Number} val number/range of elements to slice
+ * @return {Query} this
+ * @see mongodb http://www.mongodb.org/display/DOCS/Retrieving+a+Subset+of+Fields#RetrievingaSubsetofFields-RetrievingaSubrangeofArrayElements
+ * @api public
+ */
+
+Query.prototype.slice = function () {
+ if (0 === arguments.length)
+ return this;
+
+ this._validate('slice');
+
+ var path, val;
+
+ if (1 === arguments.length) {
+ var arg = arguments[0];
+ if (typeof arg === 'object' && !Array.isArray(arg)) {
+ var keys = Object.keys(arg);
+ var numKeys = keys.length;
+ for (var i = 0; i < numKeys; ++i) {
+ this.slice(keys[i], arg[keys[i]]);
+ }
+ return this;
+ }
+ this._ensurePath('slice');
+ path = this._path;
+ val = arguments[0];
+ } else if (2 === arguments.length) {
+ if ('number' === typeof arguments[0]) {
+ this._ensurePath('slice');
+ path = this._path;
+ val = slice(arguments);
+ } else {
+ path = arguments[0];
+ val = arguments[1];
+ }
+ } else if (3 === arguments.length) {
+ path = arguments[0];
+ val = slice(arguments, 1);
+ }
+
+ var myFields = this._fields || (this._fields = {});
+ myFields[path] = { '$slice': val };
+ return this;
+}
+
+/**
+ * Sets the sort order
+ *
+ * If an object is passed, values allowed are 'asc', 'desc', 'ascending', 'descending', 1, and -1.
+ *
+ * If a string is passed, it must be a space delimited list of path names. The sort order of each path is ascending unless the path name is prefixed with `-` which will be treated as descending.
+ *
+ * ####Example
+ *
+ * // these are equivalent
+ * query.sort({ field: 'asc', test: -1 });
+ * query.sort('field -test');
+ * query.sort([['field', 1], ['test', -1]]);
+ *
+ * ####Note
+ *
+ * - The array syntax `.sort([['field', 1], ['test', -1]])` can only be used with [mongodb driver >= 2.0.46](https://github.com/mongodb/node-mongodb-native/blob/2.1/HISTORY.md#2046-2015-10-15).
+ * - Cannot be used with `distinct()`
+ *
+ * @param {Object|String|Array} arg
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.sort = function (arg) {
+ if (!arg) return this;
+ var len;
+
+ this._validate('sort');
+
+ var type = typeof arg;
+
+ // .sort([['field', 1], ['test', -1]])
+ if (Array.isArray(arg)) {
+ len = arg.length;
+ for (var i = 0; i < arg.length; ++i) {
+ _pushArr(this.options, arg[i][0], arg[i][1]);
+ }
+ return this;
+ }
+
+ // .sort('field -test')
+ if (1 === arguments.length && 'string' == type) {
+ arg = arg.split(/\s+/);
+ len = arg.length;
+ for (var i = 0; i < len; ++i) {
+ var field = arg[i];
+ if (!field) continue;
+ var ascend = '-' == field[0] ? -1 : 1;
+ if (ascend === -1) field = field.substring(1);
+ push(this.options, field, ascend);
+ }
+
+ return this;
+ }
+
+ // .sort({ field: 1, test: -1 })
+ if (utils.isObject(arg)) {
+ var keys = utils.keys(arg);
+ for (var i = 0; i < keys.length; ++i) {
+ var field = keys[i];
+ push(this.options, field, arg[field]);
+ }
+
+ return this;
+ }
+
+ throw new TypeError('Invalid sort() argument. Must be a string, object, or array.');
+}
+
+/*!
+ * @ignore
+ */
+
+function push (opts, field, value) {
+ if (Array.isArray(opts.sort)) {
+ throw new TypeError("Can't mix sort syntaxes. Use either array or object:" +
+ "\n- `.sort([['field', 1], ['test', -1]])`" +
+ "\n- `.sort({ field: 1, test: -1 })`");
+ }
+
+ if (value && value.$meta) {
+ var s = opts.sort || (opts.sort = {});
+ s[field] = { $meta : value.$meta };
+ return;
+ }
+
+ var val = String(value || 1).toLowerCase();
+ if (!/^(?:ascending|asc|descending|desc|1|-1)$/.test(val)) {
+ if (utils.isArray(value)) value = '['+value+']';
+ throw new TypeError('Invalid sort value: {' + field + ': ' + value + ' }');
+ }
+ // store `sort` in a sane format
+ var s = opts.sort || (opts.sort = {});
+ var valueStr = value.toString()
+ .replace("asc", "1")
+ .replace("ascending", "1")
+ .replace("desc", "-1")
+ .replace("descending", "-1");
+ s[field] = parseInt(valueStr, 10);
+}
+
+function _pushArr (opts, field, value) {
+ opts.sort = opts.sort || [];
+ if (!Array.isArray(opts.sort)) {
+ throw new TypeError("Can't mix sort syntaxes. Use either array or object:" +
+ "\n- `.sort([['field', 1], ['test', -1]])`" +
+ "\n- `.sort({ field: 1, test: -1 })`");
+ }
+ var valueStr = value.toString()
+ .replace("asc", "1")
+ .replace("ascending", "1")
+ .replace("desc", "-1")
+ .replace("descending", "-1");
+ opts.sort.push([field, value]);
+}
+
+/**
+ * Specifies the limit option.
+ *
+ * ####Example
+ *
+ * query.limit(20)
+ *
+ * ####Note
+ *
+ * Cannot be used with `distinct()`
+ *
+ * @method limit
+ * @memberOf Query
+ * @param {Number} val
+ * @see mongodb http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%7B%7Blimit%28%29%7D%7D
+ * @api public
+ */
+/**
+ * Specifies the skip option.
+ *
+ * ####Example
+ *
+ * query.skip(100).limit(20)
+ *
+ * ####Note
+ *
+ * Cannot be used with `distinct()`
+ *
+ * @method skip
+ * @memberOf Query
+ * @param {Number} val
+ * @see mongodb http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%7B%7Bskip%28%29%7D%7D
+ * @api public
+ */
+/**
+ * Specifies the maxScan option.
+ *
+ * ####Example
+ *
+ * query.maxScan(100)
+ *
+ * ####Note
+ *
+ * Cannot be used with `distinct()`
+ *
+ * @method maxScan
+ * @memberOf Query
+ * @param {Number} val
+ * @see mongodb http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24maxScan
+ * @api public
+ */
+/**
+ * Specifies the batchSize option.
+ *
+ * ####Example
+ *
+ * query.batchSize(100)
+ *
+ * ####Note
+ *
+ * Cannot be used with `distinct()`
+ *
+ * @method batchSize
+ * @memberOf Query
+ * @param {Number} val
+ * @see mongodb http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%7B%7BbatchSize%28%29%7D%7D
+ * @api public
+ */
+/**
+ * Specifies the `comment` option.
+ *
+ * ####Example
+ *
+ * query.comment('login query')
+ *
+ * ####Note
+ *
+ * Cannot be used with `distinct()`
+ *
+ * @method comment
+ * @memberOf Query
+ * @param {Number} val
+ * @see mongodb http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24comment
+ * @api public
+ */
+
+/*!
+ * limit, skip, maxScan, batchSize, comment
+ *
+ * Sets these associated options.
+ *
+ * query.comment('feed query');
+ */
+
+;['limit', 'skip', 'maxScan', 'batchSize', 'comment'].forEach(function (method) {
+ Query.prototype[method] = function (v) {
+ this._validate(method);
+ this.options[method] = v;
+ return this;
+ };
+})
+
+/**
+ * Specifies the maxTimeMS option.
+ *
+ * ####Example
+ *
+ * query.maxTime(100)
+ *
+ * @method maxTime
+ * @memberOf Query
+ * @param {Number} val
+ * @see mongodb http://docs.mongodb.org/manual/reference/operator/meta/maxTimeMS/#op._S_maxTimeMS
+ * @api public
+ */
+
+Query.prototype.maxTime = function (v) {
+ this._validate('maxTime');
+ this.options.maxTimeMS = v;
+ return this;
+};
+
+/**
+ * Specifies this query as a `snapshot` query.
+ *
+ * ####Example
+ *
+ * mquery().snapshot() // true
+ * mquery().snapshot(true)
+ * mquery().snapshot(false)
+ *
+ * ####Note
+ *
+ * Cannot be used with `distinct()`
+ *
+ * @see mongodb http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%7B%7Bsnapshot%28%29%7D%7D
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.snapshot = function () {
+ this._validate('snapshot');
+
+ this.options.snapshot = arguments.length
+ ? !! arguments[0]
+ : true
+
+ return this;
+}
+
+/**
+ * Sets query hints.
+ *
+ * ####Example
+ *
+ * query.hint({ indexA: 1, indexB: -1})
+ *
+ * ####Note
+ *
+ * Cannot be used with `distinct()`
+ *
+ * @param {Object} val a hint object
+ * @return {Query} this
+ * @see mongodb http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24hint
+ * @api public
+ */
+
+Query.prototype.hint = function () {
+ if (0 === arguments.length) return this;
+
+ this._validate('hint');
+
+ var arg = arguments[0];
+ if (utils.isObject(arg)) {
+ var hint = this.options.hint || (this.options.hint = {});
+
+ // must keep object keys in order so don't use Object.keys()
+ for (var k in arg) {
+ hint[k] = arg[k];
+ }
+
+ return this;
+ }
+
+ throw new TypeError('Invalid hint. ' + arg);
+}
+
+/**
+ * Sets the slaveOk option. _Deprecated_ in MongoDB 2.2 in favor of read preferences.
+ *
+ * ####Example:
+ *
+ * query.slaveOk() // true
+ * query.slaveOk(true)
+ * query.slaveOk(false)
+ *
+ * @deprecated use read() preferences instead if on mongodb >= 2.2
+ * @param {Boolean} v defaults to true
+ * @see mongodb http://docs.mongodb.org/manual/applications/replication/#read-preference
+ * @see read()
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.slaveOk = function (v) {
+ this.options.slaveOk = arguments.length ? !!v : true;
+ return this;
+}
+
+/**
+ * Sets the readPreference option for the query.
+ *
+ * ####Example:
+ *
+ * new Query().read('primary')
+ * new Query().read('p') // same as primary
+ *
+ * new Query().read('primaryPreferred')
+ * new Query().read('pp') // same as primaryPreferred
+ *
+ * new Query().read('secondary')
+ * new Query().read('s') // same as secondary
+ *
+ * new Query().read('secondaryPreferred')
+ * new Query().read('sp') // same as secondaryPreferred
+ *
+ * new Query().read('nearest')
+ * new Query().read('n') // same as nearest
+ *
+ * // you can also use mongodb.ReadPreference class to also specify tags
+ * new Query().read(mongodb.ReadPreference('secondary', [{ dc:'sf', s: 1 },{ dc:'ma', s: 2 }]))
+ *
+ * ####Preferences:
+ *
+ * primary - (default) Read from primary only. Operations will produce an error if primary is unavailable. Cannot be combined with tags.
+ * secondary Read from secondary if available, otherwise error.
+ * primaryPreferred Read from primary if available, otherwise a secondary.
+ * secondaryPreferred Read from a secondary if available, otherwise read from the primary.
+ * nearest All operations read from among the nearest candidates, but unlike other modes, this option will include both the primary and all secondaries in the random selection.
+ *
+ * Aliases
+ *
+ * p primary
+ * pp primaryPreferred
+ * s secondary
+ * sp secondaryPreferred
+ * n nearest
+ *
+ * Read more about how to use read preferences [here](http://docs.mongodb.org/manual/applications/replication/#read-preference) and [here](http://mongodb.github.com/node-mongodb-native/driver-articles/anintroductionto1_1and2_2.html#read-preferences).
+ *
+ * @param {String|ReadPreference} pref one of the listed preference options or their aliases
+ * @see mongodb http://docs.mongodb.org/manual/applications/replication/#read-preference
+ * @see driver http://mongodb.github.com/node-mongodb-native/driver-articles/anintroductionto1_1and2_2.html#read-preferences
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.read = function (pref) {
+ if (arguments.length > 1 && !Query.prototype.read.deprecationWarningIssued) {
+ console.error("Deprecation warning: 'tags' argument is not supported anymore in Query.read() method. Please use mongodb.ReadPreference object instead.");
+ Query.prototype.read.deprecationWarningIssued = true;
+ }
+ this.options.readPreference = utils.readPref(pref);
+ return this;
+}
+
+/**
+ * Sets tailable option.
+ *
+ * ####Example
+ *
+ * query.tailable() <== true
+ * query.tailable(true)
+ * query.tailable(false)
+ *
+ * ####Note
+ *
+ * Cannot be used with `distinct()`
+ *
+ * @param {Boolean} v defaults to true
+ * @see mongodb http://www.mongodb.org/display/DOCS/Tailable+Cursors
+ * @api public
+ */
+
+Query.prototype.tailable = function () {
+ this._validate('tailable');
+
+ this.options.tailable = arguments.length
+ ? !! arguments[0]
+ : true;
+
+ return this;
+}
+
+/**
+ * Merges another Query or conditions object into this one.
+ *
+ * When a Query is passed, conditions, field selection and options are merged.
+ *
+ * @param {Query|Object} source
+ * @return {Query} this
+ */
+
+Query.prototype.merge = function (source) {
+ if (!source)
+ return this;
+
+ if (!Query.canMerge(source))
+ throw new TypeError('Invalid argument. Expected instanceof mquery or plain object');
+
+ if (source instanceof Query) {
+ // if source has a feature, apply it to ourselves
+
+ if (source._conditions) {
+ utils.merge(this._conditions, source._conditions);
+ }
+
+ if (source._fields) {
+ this._fields || (this._fields = {});
+ utils.merge(this._fields, source._fields);
+ }
+
+ if (source.options) {
+ this.options || (this.options = {});
+ utils.merge(this.options, source.options);
+ }
+
+ if (source._update) {
+ this._update || (this._update = {});
+ utils.mergeClone(this._update, source._update);
+ }
+
+ if (source._distinct) {
+ this._distinct = source._distinct;
+ }
+
+ return this;
+ }
+
+ // plain object
+ utils.merge(this._conditions, source);
+
+ return this;
+}
+
+/**
+ * Finds documents.
+ *
+ * Passing a `callback` executes the query.
+ *
+ * ####Example
+ *
+ * query.find()
+ * query.find(callback)
+ * query.find({ name: 'Burning Lights' }, callback)
+ *
+ * @param {Object} [criteria] mongodb selector
+ * @param {Function} [callback]
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.find = function (criteria, callback) {
+ this.op = 'find';
+
+ if ('function' === typeof criteria) {
+ callback = criteria;
+ criteria = undefined;
+ } else if (Query.canMerge(criteria)) {
+ this.merge(criteria);
+ }
+
+ if (!callback) return this;
+
+ var self = this
+ , conds = this._conditions
+ , options = this._optionsForExec()
+
+ options.fields = this._fieldsForExec()
+
+ debug('find', this._collection.collectionName, conds, options);
+ callback = this._wrapCallback('find', callback, {
+ conditions: conds
+ , options: options
+ });
+
+ this._collection.find(conds, options, utils.tick(callback));
+ return this;
+}
+
+/**
+ * Returns the query cursor
+ *
+ * ####Examples
+ *
+ * query.find().cursor();
+ * query.cursor({ name: 'Burning Lights' });
+ *
+ * @param {Object} [criteria] mongodb selector
+ * @return {Object} cursor
+ * @api public
+ */
+
+Query.prototype.cursor = function cursor (criteria) {
+ if (this.op) {
+ if (this.op !== 'find') {
+ throw new TypeError(".cursor only support .find method");
+ }
+ } else {
+ this.find(criteria);
+ }
+
+ var conds = this._conditions
+ , options = this._optionsForExec()
+
+ options.fields = this._fieldsForExec()
+
+ debug('findCursor', this._collection.collectionName, conds, options);
+ return this._collection.findCursor(conds, options);
+}
+
+/**
+ * Executes the query as a findOne() operation.
+ *
+ * Passing a `callback` executes the query.
+ *
+ * ####Example
+ *
+ * query.findOne().where('name', /^Burning/);
+ *
+ * query.findOne({ name: /^Burning/ })
+ *
+ * query.findOne({ name: /^Burning/ }, callback); // executes
+ *
+ * query.findOne(function (err, doc) {
+ * if (err) return handleError(err);
+ * if (doc) {
+ * // doc may be null if no document matched
+ *
+ * }
+ * });
+ *
+ * @param {Object|Query} [criteria] mongodb selector
+ * @param {Function} [callback]
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.findOne = function (criteria, callback) {
+ this.op = 'findOne';
+
+ if ('function' === typeof criteria) {
+ callback = criteria;
+ criteria = undefined;
+ } else if (Query.canMerge(criteria)) {
+ this.merge(criteria);
+ }
+
+ if (!callback) return this;
+
+ var self = this
+ , conds = this._conditions
+ , options = this._optionsForExec()
+
+ options.fields = this._fieldsForExec();
+
+ debug('findOne', this._collection.collectionName, conds, options);
+ callback = this._wrapCallback('findOne', callback, {
+ conditions: conds
+ , options: options
+ });
+
+ this._collection.findOne(conds, options, utils.tick(callback));
+
+ return this;
+}
+
+/**
+ * Exectues the query as a count() operation.
+ *
+ * Passing a `callback` executes the query.
+ *
+ * ####Example
+ *
+ * query.count().where('color', 'black').exec(callback);
+ *
+ * query.count({ color: 'black' }).count(callback)
+ *
+ * query.count({ color: 'black' }, callback)
+ *
+ * query.where('color', 'black').count(function (err, count) {
+ * if (err) return handleError(err);
+ * console.log('there are %d kittens', count);
+ * })
+ *
+ * @param {Object} [criteria] mongodb selector
+ * @param {Function} [callback]
+ * @return {Query} this
+ * @see mongodb http://www.mongodb.org/display/DOCS/Aggregation#Aggregation-Count
+ * @api public
+ */
+
+Query.prototype.count = function (criteria, callback) {
+ this.op = 'count';
+ this._validate();
+
+ if ('function' === typeof criteria) {
+ callback = criteria;
+ criteria = undefined;
+ } else if (Query.canMerge(criteria)) {
+ this.merge(criteria);
+ }
+
+ if (!callback) return this;
+
+ var conds = this._conditions
+ , options = this._optionsForExec()
+
+ debug('count', this._collection.collectionName, conds, options);
+ callback = this._wrapCallback('count', callback, {
+ conditions: conds
+ , options: options
+ });
+
+ this._collection.count(conds, options, utils.tick(callback));
+ return this;
+}
+
+/**
+ * Declares or executes a distinct() operation.
+ *
+ * Passing a `callback` executes the query.
+ *
+ * ####Example
+ *
+ * distinct(criteria, field, fn)
+ * distinct(criteria, field)
+ * distinct(field, fn)
+ * distinct(field)
+ * distinct(fn)
+ * distinct()
+ *
+ * @param {Object|Query} [criteria]
+ * @param {String} [field]
+ * @param {Function} [callback]
+ * @return {Query} this
+ * @see mongodb http://www.mongodb.org/display/DOCS/Aggregation#Aggregation-Distinct
+ * @api public
+ */
+
+Query.prototype.distinct = function (criteria, field, callback) {
+ this.op = 'distinct';
+ this._validate();
+
+ if (!callback) {
+ switch (typeof field) {
+ case 'function':
+ callback = field;
+ if ('string' == typeof criteria) {
+ field = criteria;
+ criteria = undefined;
+ }
+ break;
+ case 'undefined':
+ case 'string':
+ break;
+ default:
+ throw new TypeError('Invalid `field` argument. Must be string or function')
+ break;
+ }
+
+ switch (typeof criteria) {
+ case 'function':
+ callback = criteria;
+ criteria = field = undefined;
+ break;
+ case 'string':
+ field = criteria;
+ criteria = undefined;
+ break;
+ }
+ }
+
+ if ('string' == typeof field) {
+ this._distinct = field;
+ }
+
+ if (Query.canMerge(criteria)) {
+ this.merge(criteria);
+ }
+
+ if (!callback) {
+ return this;
+ }
+
+ if (!this._distinct) {
+ throw new Error('No value for `distinct` has been declared');
+ }
+
+ var conds = this._conditions
+ , options = this._optionsForExec()
+
+ debug('distinct', this._collection.collectionName, conds, options);
+ callback = this._wrapCallback('distinct', callback, {
+ conditions: conds
+ , options: options
+ });
+
+ this._collection.distinct(this._distinct, conds, options, utils.tick(callback));
+
+ return this;
+}
+
+/**
+ * Declare and/or execute this query as an update() operation.
+ *
+ * _All paths passed that are not $atomic operations will become $set ops._
+ *
+ * ####Example
+ *
+ * mquery({ _id: id }).update({ title: 'words' }, ...)
+ *
+ * becomes
+ *
+ * collection.update({ _id: id }, { $set: { title: 'words' }}, ...)
+ *
+ * ####Note
+ *
+ * Passing an empty object `{}` as the doc will result in a no-op unless the `overwrite` option is passed. Without the `overwrite` option set, the update operation will be ignored and the callback executed without sending the command to MongoDB so as to prevent accidently overwritting documents in the collection.
+ *
+ * ####Note
+ *
+ * The operation is only executed when a callback is passed. To force execution without a callback (which would be an unsafe write), we must first call update() and then execute it by using the `exec()` method.
+ *
+ * var q = mquery(collection).where({ _id: id });
+ * q.update({ $set: { name: 'bob' }}).update(); // not executed
+ *
+ * var q = mquery(collection).where({ _id: id });
+ * q.update({ $set: { name: 'bob' }}).exec(); // executed as unsafe
+ *
+ * // keys that are not $atomic ops become $set.
+ * // this executes the same command as the previous example.
+ * q.update({ name: 'bob' }).where({ _id: id }).exec();
+ *
+ * var q = mquery(collection).update(); // not executed
+ *
+ * // overwriting with empty docs
+ * var q.where({ _id: id }).setOptions({ overwrite: true })
+ * q.update({ }, callback); // executes
+ *
+ * // multi update with overwrite to empty doc
+ * var q = mquery(collection).where({ _id: id });
+ * q.setOptions({ multi: true, overwrite: true })
+ * q.update({ });
+ * q.update(callback); // executed
+ *
+ * // multi updates
+ * mquery()
+ * .collection(coll)
+ * .update({ name: /^match/ }, { $set: { arr: [] }}, { multi: true }, callback)
+ * // more multi updates
+ * mquery({ })
+ * .collection(coll)
+ * .setOptions({ multi: true })
+ * .update({ $set: { arr: [] }}, callback)
+ *
+ * // single update by default
+ * mquery({ email: 'address@example.com' })
+ * .collection(coll)
+ * .update({ $inc: { counter: 1 }}, callback)
+ *
+ * // summary
+ * update(criteria, doc, opts, cb) // executes
+ * update(criteria, doc, opts)
+ * update(criteria, doc, cb) // executes
+ * update(criteria, doc)
+ * update(doc, cb) // executes
+ * update(doc)
+ * update(cb) // executes
+ * update(true) // executes (unsafe write)
+ * update()
+ *
+ * @param {Object} [criteria]
+ * @param {Object} [doc] the update command
+ * @param {Object} [options]
+ * @param {Function} [callback]
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.update = function update (criteria, doc, options, callback) {
+ this.op = 'update';
+ var force;
+
+ switch (arguments.length) {
+ case 3:
+ if ('function' == typeof options) {
+ callback = options;
+ options = undefined;
+ }
+ break;
+ case 2:
+ if ('function' == typeof doc) {
+ callback = doc;
+ doc = criteria;
+ criteria = undefined;
+ }
+ break;
+ case 1:
+ switch (typeof criteria) {
+ case 'function':
+ callback = criteria;
+ criteria = options = doc = undefined;
+ break;
+ case 'boolean':
+ // execution with no callback (unsafe write)
+ force = criteria;
+ criteria = undefined;
+ break;
+ default:
+ doc = criteria;
+ criteria = options = undefined;
+ break;
+ }
+ }
+
+ if (Query.canMerge(criteria)) {
+ this.merge(criteria);
+ }
+
+ if (doc) {
+ this._mergeUpdate(doc);
+ }
+
+ if (utils.isObject(options)) {
+ // { overwrite: true }
+ this.setOptions(options);
+ }
+
+ // we are done if we don't have callback and they are
+ // not forcing an unsafe write.
+ if (!(force || callback))
+ return this;
+
+ if (!this._update ||
+ !this.options.overwrite && 0 === utils.keys(this._update).length) {
+ callback && utils.soon(callback.bind(null, null, 0));
+ return this;
+ }
+
+ options = this._optionsForExec();
+ if (!callback) options.safe = false;
+
+ var criteria = this._conditions;
+ doc = this._updateForExec();
+
+ debug('update', this._collection.collectionName, criteria, doc, options);
+ callback = this._wrapCallback('update', callback, {
+ conditions: criteria
+ , doc: doc
+ , options: options
+ });
+
+ this._collection.update(criteria, doc, options, utils.tick(callback));
+
+ return this;
+}
+
+/**
+ * Declare and/or execute this query as a remove() operation.
+ *
+ * ####Example
+ *
+ * mquery(collection).remove({ artist: 'Anne Murray' }, callback)
+ *
+ * ####Note
+ *
+ * The operation is only executed when a callback is passed. To force execution without a callback (which would be an unsafe write), we must first call remove() and then execute it by using the `exec()` method.
+ *
+ * // not executed
+ * var query = mquery(collection).remove({ name: 'Anne Murray' })
+ *
+ * // executed
+ * mquery(collection).remove({ name: 'Anne Murray' }, callback)
+ * mquery(collection).remove({ name: 'Anne Murray' }).remove(callback)
+ *
+ * // executed without a callback (unsafe write)
+ * query.exec()
+ *
+ * // summary
+ * query.remove(conds, fn); // executes
+ * query.remove(conds)
+ * query.remove(fn) // executes
+ * query.remove()
+ *
+ * @param {Object|Query} [criteria] mongodb selector
+ * @param {Function} [callback]
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.remove = function (criteria, callback) {
+ this.op = 'remove';
+ var force;
+
+ if ('function' === typeof criteria) {
+ callback = criteria;
+ criteria = undefined;
+ } else if (Query.canMerge(criteria)) {
+ this.merge(criteria);
+ } else if (true === criteria) {
+ force = criteria;
+ criteria = undefined;
+ }
+
+ if (!(force || callback))
+ return this;
+
+ var options = this._optionsForExec()
+ if (!callback) options.safe = false;
+
+ var conds = this._conditions;
+
+ debug('remove', this._collection.collectionName, conds, options);
+ callback = this._wrapCallback('remove', callback, {
+ conditions: conds
+ , options: options
+ });
+
+ this._collection.remove(conds, options, utils.tick(callback));
+
+ return this;
+}
+
+/**
+ * Issues a mongodb [findAndModify](http://www.mongodb.org/display/DOCS/findAndModify+Command) update command.
+ *
+ * Finds a matching document, updates it according to the `update` arg, passing any `options`, and returns the found document (if any) to the callback. The query executes immediately if `callback` is passed.
+ *
+ * ####Available options
+ *
+ * - `new`: bool - true to return the modified document rather than the original. defaults to true
+ * - `upsert`: bool - creates the object if it doesn't exist. defaults to false.
+ * - `sort`: if multiple docs are found by the conditions, sets the sort order to choose which doc to update
+ *
+ * ####Examples
+ *
+ * query.findOneAndUpdate(conditions, update, options, callback) // executes
+ * query.findOneAndUpdate(conditions, update, options) // returns Query
+ * query.findOneAndUpdate(conditions, update, callback) // executes
+ * query.findOneAndUpdate(conditions, update) // returns Query
+ * query.findOneAndUpdate(update, callback) // returns Query
+ * query.findOneAndUpdate(update) // returns Query
+ * query.findOneAndUpdate(callback) // executes
+ * query.findOneAndUpdate() // returns Query
+ *
+ * @param {Object|Query} [query]
+ * @param {Object} [doc]
+ * @param {Object} [options]
+ * @param {Function} [callback]
+ * @see mongodb http://www.mongodb.org/display/DOCS/findAndModify+Command
+ * @return {Query} this
+ * @api public
+ */
+
+Query.prototype.findOneAndUpdate = function (criteria, doc, options, callback) {
+ this.op = 'findOneAndUpdate';
+ this._validate();
+
+ switch (arguments.length) {
+ case 3:
+ if ('function' == typeof options) {
+ callback = options;
+ options = {};
+ }
+ break;
+ case 2:
+ if ('function' == typeof doc) {
+ callback = doc;
+ doc = criteria;
+ criteria = undefined;
+ }
+ options = undefined;
+ break;
+ case 1:
+ if ('function' == typeof criteria) {
+ callback = criteria;
+ criteria = options = doc = undefined;
+ } else {
+ doc = criteria;
+ criteria = options = undefined;
+ }
+ }
+
+ if (Query.canMerge(criteria)) {
+ this.merge(criteria);
+ }
+
+ // apply doc
+ if (doc) {
+ this._mergeUpdate(doc);
+ }
+
+ options && this.setOptions(options);
+
+ if (!callback) return this;
+ return this._findAndModify('update', callback);
+}
+
+/**
+ * Issues a mongodb [findAndModify](http://www.mongodb.org/display/DOCS/findAndModify+Command) remove command.
+ *
+ * Finds a matching document, removes it, passing the found document (if any) to the callback. Executes immediately if `callback` is passed.
+ *
+ * ####Available options
+ *
+ * - `sort`: if multiple docs are found by the conditions, sets the sort order to choose which doc to update
+ *
+ * ####Examples
+ *
+ * A.where().findOneAndRemove(conditions, options, callback) // executes
+ * A.where().findOneAndRemove(conditions, options) // return Query
+ * A.where().findOneAndRemove(conditions, callback) // executes
+ * A.where().findOneAndRemove(conditions) // returns Query
+ * A.where().findOneAndRemove(callback) // executes
+ * A.where().findOneAndRemove() // returns Query
+ *
+ * @param {Object} [conditions]
+ * @param {Object} [options]
+ * @param {Function} [callback]
+ * @return {Query} this
+ * @see mongodb http://www.mongodb.org/display/DOCS/findAndModify+Command
+ * @api public
+ */
+
+Query.prototype.findOneAndRemove = function (conditions, options, callback) {
+ this.op = 'findOneAndRemove';
+ this._validate();
+
+ if ('function' == typeof options) {
+ callback = options;
+ options = undefined;
+ } else if ('function' == typeof conditions) {
+ callback = conditions;
+ conditions = undefined;
+ }
+
+ // apply conditions
+ if (Query.canMerge(conditions)) {
+ this.merge(conditions);
+ }
+
+ // apply options
+ options && this.setOptions(options);
+
+ if (!callback) return this;
+
+ return this._findAndModify('remove', callback);
+}
+
+/**
+ * _findAndModify
+ *
+ * @param {String} type - either "remove" or "update"
+ * @param {Function} callback
+ * @api private
+ */
+
+Query.prototype._findAndModify = function (type, callback) {
+ assert.equal('function', typeof callback);
+
+ var opts = this._optionsForExec()
+ , self = this
+ , fields
+ , sort
+ , doc
+
+ if ('remove' == type) {
+ opts.remove = true;
+ } else {
+ if (!('new' in opts)) opts.new = true;
+ if (!('upsert' in opts)) opts.upsert = false;
+
+ doc = this._updateForExec()
+ if (!doc) {
+ if (opts.upsert) {
+ // still need to do the upsert to empty doc
+ doc = { $set: {} };
+ } else {
+ return this.findOne(callback);
+ }
+ }
+ }
+
+ var fields = this._fieldsForExec();
+ if (fields) {
+ opts.fields = fields;
+ }
+
+ var conds = this._conditions;
+
+ debug('findAndModify', this._collection.collectionName, conds, doc, opts);
+ callback = this._wrapCallback('findAndModify', callback, {
+ conditions: conds
+ , doc: doc
+ , options: opts
+ });
+
+ this._collection
+ .findAndModify(conds, doc, opts, utils.tick(callback));
+
+ return this;
+}
+
+/**
+ * Wrap callback to add tracing
+ *
+ * @param {Function} callback
+ * @param {Object} [queryInfo]
+ * @api private
+ */
+Query.prototype._wrapCallback = function (method, callback, queryInfo) {
+ var traceFunction = this._traceFunction || Query.traceFunction;
+
+ if (traceFunction) {
+ queryInfo.collectionName = this._collection.collectionName;
+
+ var traceCallback = traceFunction &&
+ traceFunction.call(null, method, queryInfo, this);
+
+ var startTime = new Date().getTime();
+
+ return function wrapperCallback (err, result) {
+ if (traceCallback) {
+ var millis = new Date().getTime() - startTime;
+ traceCallback.call(null, err, result, millis);
+ }
+
+ if (callback) {
+ callback.apply(null, arguments);
+ }
+ };
+ }
+
+ return callback;
+}
+
+/**
+ * Add trace function that gets called when the query is executed.
+ * The function will be called with (method, queryInfo, query) and
+ * should return a callback function which will be called
+ * with (err, result, millis) when the query is complete.
+ *
+ * queryInfo is an object containing: {
+ * collectionName: <name of the collection>,
+ * conditions: <query criteria>,
+ * options: <comment, fields, readPreference, etc>,
+ * doc: [document to update, if applicable]
+ * }
+ *
+ * NOTE: Does not trace stream queries.
+ *
+ * @param {Function} traceFunction
+ * @return {Query} this
+ * @api public
+ */
+Query.prototype.setTraceFunction = function (traceFunction) {
+ this._traceFunction = traceFunction;
+ return this;
+}
+
+/**
+ * Executes the query
+ *
+ * ####Examples
+ *
+ * query.exec();
+ * query.exec(callback);
+ * query.exec('update');
+ * query.exec('find', callback);
+ *
+ * @param {String|Function} [operation]
+ * @param {Function} [callback]
+ * @api public
+ */
+
+Query.prototype.exec = function exec (op, callback) {
+ switch (typeof op) {
+ case 'function':
+ callback = op;
+ op = null;
+ break;
+ case 'string':
+ this.op = op;
+ break;
+ }
+
+ assert.ok(this.op, "Missing query type: (find, update, etc)");
+
+ if ('update' == this.op || 'remove' == this.op) {
+ callback || (callback = true);
+ }
+
+ var self = this;
+
+ if ('function' == typeof callback) {
+ this[this.op](callback);
+ } else {
+ return new Query.Promise(function(success, error) {
+ self[self.op](function(err, val) {
+ if (err) error(err);
+ else success(val);
+ self = success = error = null;
+ });
+ });
+ }
+}
+
+/**
+ * Returns a thunk which when called runs this.exec()
+ *
+ * The thunk receives a callback function which will be
+ * passed to `this.exec()`
+ *
+ * @return {Function}
+ * @api public
+ */
+
+Query.prototype.thunk = function() {
+ var self = this;
+ return function(cb) {
+ self.exec(cb);
+ }
+}
+
+/**
+ * Executes the query returning a `Promise` which will be
+ * resolved with either the doc(s) or rejected with the error.
+ *
+ * @param {Function} [resolve]
+ * @param {Function} [reject]
+ * @return {Promise}
+ * @api public
+ */
+
+Query.prototype.then = function(resolve, reject) {
+ var self = this;
+ var promise = new Query.Promise(function(success, error) {
+ self.exec(function(err, val) {
+ if (err) error(err);
+ else success(val);
+ self = success = error = null;
+ });
+ });
+ return promise.then(resolve, reject);
+}
+
+/**
+ * Returns a stream for the given find query.
+ *
+ * @throws Error if operation is not a find
+ * @returns {Stream} Node 0.8 style
+ */
+
+Query.prototype.stream = function(streamOptions) {
+ if ('find' != this.op)
+ throw new Error('stream() is only available for find');
+
+ var conds = this._conditions;
+
+ var options = this._optionsForExec()
+ options.fields = this._fieldsForExec()
+
+ debug('stream', this._collection.collectionName, conds, options, streamOptions);
+
+ return this._collection.findStream(conds, options, streamOptions);
+}
+
+/**
+ * Determines if field selection has been made.
+ *
+ * @return {Boolean}
+ * @api public
+ */
+
+Query.prototype.selected = function selected () {
+ return !! (this._fields && Object.keys(this._fields).length > 0);
+}
+
+/**
+ * Determines if inclusive field selection has been made.
+ *
+ * query.selectedInclusively() // false
+ * query.select('name')
+ * query.selectedInclusively() // true
+ * query.selectedExlusively() // false
+ *
+ * @returns {Boolean}
+ */
+
+Query.prototype.selectedInclusively = function selectedInclusively () {
+ if (!this._fields) return false;
+
+ var keys = Object.keys(this._fields);
+ if (0 === keys.length) return false;
+
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (0 === this._fields[key]) return false;
+ if (this._fields[key] &&
+ typeof this._fields[key] === 'object' &&
+ this._fields[key].$meta) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+/**
+ * Determines if exclusive field selection has been made.
+ *
+ * query.selectedExlusively() // false
+ * query.select('-name')
+ * query.selectedExlusively() // true
+ * query.selectedInclusively() // false
+ *
+ * @returns {Boolean}
+ */
+
+Query.prototype.selectedExclusively = function selectedExclusively () {
+ if (!this._fields) return false;
+
+ var keys = Object.keys(this._fields);
+ if (0 === keys.length) return false;
+
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (0 === this._fields[key]) return true;
+ }
+
+ return false;
+}
+
+/**
+ * Merges `doc` with the current update object.
+ *
+ * @param {Object} doc
+ */
+
+Query.prototype._mergeUpdate = function (doc) {
+ if (!this._update) this._update = {};
+ if (doc instanceof Query) {
+ if (doc._update) {
+ utils.mergeClone(this._update, doc._update);
+ }
+ } else {
+ utils.mergeClone(this._update, doc);
+ }
+}
+
+/**
+ * Returns default options.
+ *
+ * @return {Object}
+ * @api private
+ */
+
+Query.prototype._optionsForExec = function () {
+ var options = utils.clone(this.options, { retainKeyOrder: true });
+ return options;
+}
+
+/**
+ * Returns fields selection for this query.
+ *
+ * @return {Object}
+ * @api private
+ */
+
+Query.prototype._fieldsForExec = function () {
+ return utils.clone(this._fields, { retainKeyOrder: true });
+}
+
+/**
+ * Return an update document with corrected $set operations.
+ *
+ * @api private
+ */
+
+Query.prototype._updateForExec = function () {
+ var update = utils.clone(this._update, { retainKeyOrder: true })
+ , ops = utils.keys(update)
+ , i = ops.length
+ , ret = {}
+ , hasKeys
+ , val
+
+ while (i--) {
+ var op = ops[i];
+
+ if (this.options.overwrite) {
+ ret[op] = update[op];
+ continue;
+ }
+
+ if ('$' !== op[0]) {
+ // fix up $set sugar
+ if (!ret.$set) {
+ if (update.$set) {
+ ret.$set = update.$set;
+ } else {
+ ret.$set = {};
+ }
+ }
+ ret.$set[op] = update[op];
+ ops.splice(i, 1);
+ if (!~ops.indexOf('$set')) ops.push('$set');
+ } else if ('$set' === op) {
+ if (!ret.$set) {
+ ret[op] = update[op];
+ }
+ } else {
+ ret[op] = update[op];
+ }
+ }
+
+ this._compiledUpdate = ret;
+ return ret;
+}
+
+/**
+ * Make sure _path is set.
+ *
+ * @parmam {String} method
+ */
+
+Query.prototype._ensurePath = function (method) {
+ if (!this._path) {
+ var msg = method + '() must be used after where() '
+ + 'when called with these arguments'
+ throw new Error(msg);
+ }
+}
+
+/*!
+ * Permissions
+ */
+
+Query.permissions = require('./permissions');
+
+Query._isPermitted = function (a, b) {
+ var denied = Query.permissions[b];
+ if (!denied) return true;
+ return true !== denied[a];
+}
+
+Query.prototype._validate = function (action) {
+ var fail;
+ var validator;
+
+ if (undefined === action) {
+
+ validator = Query.permissions[this.op];
+ if ('function' != typeof validator) return true;
+
+ fail = validator(this);
+
+ } else if (!Query._isPermitted(action, this.op)) {
+ fail = action;
+ }
+
+ if (fail) {
+ throw new Error(fail + ' cannot be used with ' + this.op);
+ }
+}
+
+/**
+ * Determines if `conds` can be merged using `mquery().merge()`
+ *
+ * @param {Object} conds
+ * @return {Boolean}
+ */
+
+Query.canMerge = function (conds) {
+ return conds instanceof Query || utils.isObject(conds);
+}
+
+/**
+ * Set a trace function that will get called whenever a
+ * query is executed.
+ *
+ * See `setTraceFunction()` for details.
+ *
+ * @param {Object} conds
+ * @return {Boolean}
+ */
+Query.setGlobalTraceFunction = function (traceFunction) {
+ Query.traceFunction = traceFunction;
+}
+
+/*!
+ * Exports.
+ */
+
+Query.utils = utils;
+Query.env = require('./env')
+Query.Collection = require('./collection');
+Query.BaseCollection = require('./collection/collection');
+Query.Promise = require('bluebird');
+module.exports = exports = Query;
+
+// TODO
+// test utils
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/permissions.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/permissions.js
new file mode 100644
index 0000000..d46f7ae
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/permissions.js
@@ -0,0 +1,88 @@
+'use strict';
+
+var denied = exports;
+
+denied.distinct = function (self) {
+ if (self._fields && Object.keys(self._fields).length > 0) {
+ return 'field selection and slice'
+ }
+
+ var keys = Object.keys(denied.distinct);
+ var err;
+
+ keys.every(function (option) {
+ if (self.options[option]) {
+ err = option;
+ return false;
+ }
+ return true;
+ });
+
+ return err;
+};
+denied.distinct.select =
+denied.distinct.slice =
+denied.distinct.sort =
+denied.distinct.limit =
+denied.distinct.skip =
+denied.distinct.batchSize =
+denied.distinct.comment =
+denied.distinct.maxScan =
+denied.distinct.snapshot =
+denied.distinct.hint =
+denied.distinct.tailable = true;
+
+
+// aggregation integration
+
+
+denied.findOneAndUpdate =
+denied.findOneAndRemove = function (self) {
+ var keys = Object.keys(denied.findOneAndUpdate);
+ var err;
+
+ keys.every(function (option) {
+ if (self.options[option]) {
+ err = option;
+ return false;
+ }
+ return true;
+ });
+
+ return err;
+}
+denied.findOneAndUpdate.limit =
+denied.findOneAndUpdate.skip =
+denied.findOneAndUpdate.batchSize =
+denied.findOneAndUpdate.maxScan =
+denied.findOneAndUpdate.snapshot =
+denied.findOneAndUpdate.hint =
+denied.findOneAndUpdate.tailable =
+denied.findOneAndUpdate.comment = true;
+
+
+denied.count = function (self) {
+ if (self._fields && Object.keys(self._fields).length > 0) {
+ return 'field selection and slice'
+ }
+
+ var keys = Object.keys(denied.count);
+ var err;
+
+ keys.every(function (option) {
+ if (self.options[option]) {
+ err = option;
+ return false;
+ }
+ return true;
+ });
+
+ return err;
+}
+
+denied.count.slice =
+denied.count.batchSize =
+denied.count.comment =
+denied.count.maxScan =
+denied.count.snapshot =
+denied.count.tailable = true;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/utils.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/utils.js
new file mode 100644
index 0000000..f0337b6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/lib/utils.js
@@ -0,0 +1,342 @@
+'use strict';
+
+/*!
+ * Module dependencies.
+ */
+
+var RegExpClone = require('regexp-clone')
+
+/**
+ * Clones objects
+ *
+ * @param {Object} obj the object to clone
+ * @param {Object} options
+ * @return {Object} the cloned object
+ * @api private
+ */
+
+var clone = exports.clone = function clone (obj, options) {
+ if (obj === undefined || obj === null)
+ return obj;
+
+ if (Array.isArray(obj))
+ return exports.cloneArray(obj, options);
+
+ if (obj.constructor) {
+ if (/ObjectI[dD]$/.test(obj.constructor.name)) {
+ return 'function' == typeof obj.clone
+ ? obj.clone()
+ : new obj.constructor(obj.id);
+ }
+
+ if ('ReadPreference' === obj._type && obj.isValid && obj.toObject) {
+ return 'function' == typeof obj.clone
+ ? obj.clone()
+ : new obj.constructor(obj.mode, clone(obj.tags, options));
+ }
+
+ if ('Binary' == obj._bsontype && obj.buffer && obj.value) {
+ return 'function' == typeof obj.clone
+ ? obj.clone()
+ : new obj.constructor(obj.value(true), obj.sub_type);
+ }
+
+ if ('Date' === obj.constructor.name || 'Function' === obj.constructor.name)
+ return new obj.constructor(+obj);
+
+ if ('RegExp' === obj.constructor.name)
+ return RegExpClone(obj);
+
+ if ('Buffer' === obj.constructor.name)
+ return exports.cloneBuffer(obj);
+ }
+
+ if (isObject(obj))
+ return exports.cloneObject(obj, options);
+
+ if (obj.valueOf)
+ return obj.valueOf();
+};
+
+/*!
+ * ignore
+ */
+
+var cloneObject = exports.cloneObject = function cloneObject (obj, options) {
+ var retainKeyOrder = options && options.retainKeyOrder
+ , minimize = options && options.minimize
+ , ret = {}
+ , hasKeys
+ , keys
+ , val
+ , k
+ , i
+
+ if (retainKeyOrder) {
+ for (k in obj) {
+ val = clone(obj[k], options);
+
+ if (!minimize || ('undefined' !== typeof val)) {
+ hasKeys || (hasKeys = true);
+ ret[k] = val;
+ }
+ }
+ } else {
+ // faster
+
+ keys = Object.keys(obj);
+ i = keys.length;
+
+ while (i--) {
+ k = keys[i];
+ val = clone(obj[k], options);
+
+ if (!minimize || ('undefined' !== typeof val)) {
+ if (!hasKeys) hasKeys = true;
+ ret[k] = val;
+ }
+ }
+ }
+
+ return minimize
+ ? hasKeys && ret
+ : ret;
+};
+
+var cloneArray = exports.cloneArray = function cloneArray (arr, options) {
+ var ret = [];
+ for (var i = 0, l = arr.length; i < l; i++)
+ ret.push(clone(arr[i], options));
+ return ret;
+};
+
+/**
+ * process.nextTick helper.
+ *
+ * Wraps the given `callback` in a try/catch. If an error is
+ * caught it will be thrown on nextTick.
+ *
+ * node-mongodb-native had a habit of state corruption when
+ * an error was immediately thrown from within a collection
+ * method (find, update, etc) callback.
+ *
+ * @param {Function} [callback]
+ * @api private
+ */
+
+var tick = exports.tick = function tick (callback) {
+ if ('function' !== typeof callback) return;
+ return function () {
+ // callbacks should always be fired on the next
+ // turn of the event loop. A side benefit is
+ // errors thrown from executing the callback
+ // will not cause drivers state to be corrupted
+ // which has historically been a problem.
+ var args = arguments;
+ soon(function(){
+ callback.apply(this, args);
+ });
+ }
+}
+
+/**
+ * Merges `from` into `to` without overwriting existing properties.
+ *
+ * @param {Object} to
+ * @param {Object} from
+ * @api private
+ */
+
+var merge = exports.merge = function merge (to, from) {
+ var keys = Object.keys(from)
+ , i = keys.length
+ , key
+
+ while (i--) {
+ key = keys[i];
+ if ('undefined' === typeof to[key]) {
+ to[key] = from[key];
+ } else {
+ if (exports.isObject(from[key])) {
+ merge(to[key], from[key]);
+ } else {
+ to[key] = from[key];
+ }
+ }
+ }
+}
+
+/**
+ * Same as merge but clones the assigned values.
+ *
+ * @param {Object} to
+ * @param {Object} from
+ * @api private
+ */
+
+var mergeClone = exports.mergeClone = function mergeClone (to, from) {
+ var keys = Object.keys(from)
+ , i = keys.length
+ , key
+
+ while (i--) {
+ key = keys[i];
+ if ('undefined' === typeof to[key]) {
+ // make sure to retain key order here because of a bug handling the $each
+ // operator in mongodb 2.4.4
+ to[key] = clone(from[key], { retainKeyOrder : 1});
+ } else {
+ if (exports.isObject(from[key])) {
+ mergeClone(to[key], from[key]);
+ } else {
+ // make sure to retain key order here because of a bug handling the
+ // $each operator in mongodb 2.4.4
+ to[key] = clone(from[key], { retainKeyOrder : 1});
+ }
+ }
+ }
+}
+
+/**
+ * Read pref helper (mongo 2.2 drivers support this)
+ *
+ * Allows using aliases instead of full preference names:
+ *
+ * p primary
+ * pp primaryPreferred
+ * s secondary
+ * sp secondaryPreferred
+ * n nearest
+ *
+ * @param {String} pref
+ */
+
+exports.readPref = function readPref (pref) {
+ switch (pref) {
+ case 'p':
+ pref = 'primary';
+ break;
+ case 'pp':
+ pref = 'primaryPreferred';
+ break;
+ case 's':
+ pref = 'secondary';
+ break;
+ case 'sp':
+ pref = 'secondaryPreferred';
+ break;
+ case 'n':
+ pref = 'nearest';
+ break;
+ }
+
+ return pref;
+}
+
+/**
+ * Object.prototype.toString.call helper
+ */
+
+var _toString = Object.prototype.toString;
+var toString = exports.toString = function (arg) {
+ return _toString.call(arg);
+}
+
+/**
+ * Determines if `arg` is an object.
+ *
+ * @param {Object|Array|String|Function|RegExp|any} arg
+ * @return {Boolean}
+ */
+
+var isObject = exports.isObject = function (arg) {
+ return '[object Object]' == exports.toString(arg);
+}
+
+/**
+ * Determines if `arg` is an array.
+ *
+ * @param {Object}
+ * @return {Boolean}
+ * @see nodejs utils
+ */
+
+var isArray = exports.isArray = function (arg) {
+ return Array.isArray(arg) ||
+ 'object' == typeof arg && '[object Array]' == exports.toString(arg);
+}
+
+/**
+ * Object.keys helper
+ */
+
+exports.keys = Object.keys || function (obj) {
+ var keys = [];
+ for (var k in obj) if (obj.hasOwnProperty(k)) {
+ keys.push(k);
+ }
+ return keys;
+}
+
+/**
+ * Basic Object.create polyfill.
+ * Only one argument is supported.
+ *
+ * Based on https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/create
+ */
+
+exports.create = 'function' == typeof Object.create
+ ? Object.create
+ : create;
+
+function create (proto) {
+ if (arguments.length > 1) {
+ throw new Error("Adding properties is not supported")
+ }
+
+ function F () {}
+ F.prototype = proto;
+ return new F;
+}
+
+/**
+ * inheritance
+ */
+
+exports.inherits = function (ctor, superCtor) {
+ ctor.prototype = exports.create(superCtor.prototype);
+ ctor.prototype.constructor = ctor;
+}
+
+/**
+ * nextTick helper
+ * compat with node 0.10 which behaves differently than previous versions
+ */
+
+var soon = exports.soon = 'function' == typeof setImmediate
+ ? setImmediate
+ : process.nextTick;
+
+/**
+ * Clones the contents of a buffer.
+ *
+ * @param {Buffer} buff
+ * @return {Buffer}
+ */
+
+exports.cloneBuffer = function (buff) {
+ var dupe = new Buffer(buff.length);
+ buff.copy(dupe, 0, 0, buff.length);
+ return dupe;
+};
+
+/**
+ * Check if this object is an arguments object
+ *
+ * @param {Any} v
+ * @return {Boolean}
+ */
+
+exports.isArgumentsObject = function(v) {
+ return Object.prototype.toString.call(v) === '[object Arguments]';
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/LICENSE
new file mode 100644
index 0000000..4182a1e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2013-2015 Petka Antonov
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/README.md
new file mode 100644
index 0000000..e1447bf
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/README.md
@@ -0,0 +1,679 @@
+<a href="http://promisesaplus.com/">
+ <img src="http://promisesaplus.com/assets/logo-small.png" alt="Promises/A+ logo"
+ title="Promises/A+ 1.1 compliant" align="right" />
+</a>
+[![Build Status](https://travis-ci.org/petkaantonov/bluebird.svg?branch=master)](https://travis-ci.org/petkaantonov/bluebird)
+[![coverage-98%](http://img.shields.io/badge/coverage-98%-brightgreen.svg?style=flat)](http://petkaantonov.github.io/bluebird/coverage/debug/index.html)
+
+**Got a question?** Join us on [stackoverflow](http://stackoverflow.com/questions/tagged/bluebird), the [mailing list](https://groups.google.com/forum/#!forum/bluebird-js) or chat on [IRC](https://webchat.freenode.net/?channels=#promises)
+
+# Introduction
+
+Bluebird is a fully featured [promise](#what-are-promises-and-why-should-i-use-them) library with focus on innovative features and performance
+
+
+
+# Topics
+
+- [Features](#features)
+- [Quick start](#quick-start)
+- [API Reference and examples](API.md)
+- [Support](#support)
+- [What are promises and why should I use them?](#what-are-promises-and-why-should-i-use-them)
+- [Questions and issues](#questions-and-issues)
+- [Error handling](#error-handling)
+- [Development](#development)
+ - [Testing](#testing)
+ - [Benchmarking](#benchmarks)
+ - [Custom builds](#custom-builds)
+ - [For library authors](#for-library-authors)
+- [What is the sync build?](#what-is-the-sync-build)
+- [License](#license)
+- [Snippets for common problems](https://github.com/petkaantonov/bluebird/wiki/Snippets)
+- [Promise anti-patterns](https://github.com/petkaantonov/bluebird/wiki/Promise-anti-patterns)
+- [Changelog](changelog.md)
+- [Optimization guide](#optimization-guide)
+
+# Features
+<img src="http://petkaantonov.github.io/bluebird/logo.png" alt="bluebird logo" align="right" />
+
+- [Promises A+](http://promisesaplus.com)
+- [Synchronous inspection](API.md#synchronous-inspection)
+- [Concurrency coordination](API.md#collections)
+- [Promisification on steroids](API.md#promisification)
+- [Resource management through a parallel of python `with`/C# `using`](API.md#resource-management)
+- [Cancellation and timeouts](API.md#cancellation)
+- [Parallel for C# `async` and `await`](API.md#generators)
+- Mind blowing utilities such as
+ - [`.bind()`](API.md#binddynamic-thisarg---promise)
+ - [`.call()`](API.md#callstring-propertyname--dynamic-arg---promise)
+ - [`Promise.join()`](API.md#promisejoinpromisethenablevalue-promises-function-handler---promise)
+ - [And](API.md#core) [much](API.md#timers) [more](API.md#utility)!
+- [Practical debugging solutions and sane defaults](#error-handling)
+- [Sick performance](benchmark/)
+
+<hr>
+
+# Quick start
+
+## Node.js
+
+ npm install bluebird
+
+Then:
+
+```js
+var Promise = require("bluebird");
+```
+
+## Browsers
+
+There are many ways to use bluebird in browsers:
+
+- Direct downloads
+ - Full build [bluebird.js](https://cdn.jsdelivr.net/bluebird/latest/bluebird.js)
+ - Full build minified [bluebird.min.js](https://cdn.jsdelivr.net/bluebird/latest/bluebird.min.js)
+ - Core build [bluebird.core.js](https://cdn.jsdelivr.net/bluebird/latest/bluebird.core.js)
+ - Core build minified [bluebird.core.min.js](https://cdn.jsdelivr.net/bluebird/latest/bluebird.core.min.js)
+- You may use browserify on the main export
+- You may use the [bower](http://bower.io) package.
+
+When using script tags the global variables `Promise` and `P` (alias for `Promise`) become available.
+
+A [minimal bluebird browser build](#custom-builds) is &asymp;38.92KB minified*, 11.65KB gzipped and has no external dependencies.
+
+*Google Closure Compiler using Simple.
+
+#### Browser support
+
+Browsers that [implement ECMA-262, edition 3](http://en.wikipedia.org/wiki/Ecmascript#Implementations) and later are supported.
+
+[![Selenium Test Status](https://saucelabs.com/browser-matrix/petka_antonov.svg)](https://saucelabs.com/u/petka_antonov)
+
+**Note** that in ECMA-262, edition 3 (IE7, IE8 etc.) it is not possible to use methods that have keyword names like `.catch` and `.finally`. The [API documentation](API.md) always lists a compatible alternative name that you can use if you need to support these browsers. For example `.catch` is replaced with `.caught` and `.finally` with `.lastly`.
+
+Also, [long stack trace](API.md#promiselongstacktraces---void) support is only available in Chrome, Firefox and Internet Explorer 10+.
+
+After quick start, see [API Reference and examples](API.md)
+
+<hr>
+
+# Support
+
+- Mailing list: [bluebird-js@googlegroups.com](https://groups.google.com/forum/#!forum/bluebird-js)
+- IRC: #promises @freenode
+- StackOverflow: [bluebird tag](http://stackoverflow.com/questions/tagged/bluebird)
+- Bugs and feature requests: [github issue tracker](https://github.com/petkaantonov/bluebird/issues?state=open)
+
+<hr>
+
+# What are promises and why should I use them?
+
+You should use promises to turn this:
+
+```js
+fs.readFile("file.json", function(err, val) {
+ if( err ) {
+ console.error("unable to read file");
+ }
+ else {
+ try {
+ val = JSON.parse(val);
+ console.log(val.success);
+ }
+ catch( e ) {
+ console.error("invalid json in file");
+ }
+ }
+});
+```
+
+Into this:
+
+```js
+fs.readFileAsync("file.json").then(JSON.parse).then(function(val) {
+ console.log(val.success);
+})
+.catch(SyntaxError, function(e) {
+ console.error("invalid json in file");
+})
+.catch(function(e) {
+ console.error("unable to read file");
+});
+```
+
+*If you are wondering "there is no `readFileAsync` method on `fs` that returns a promise", see [promisification](API.md#promisification)*
+
+Actually you might notice the latter has a lot in common with code that would do the same using synchronous I/O:
+
+```js
+try {
+ var val = JSON.parse(fs.readFileSync("file.json"));
+ console.log(val.success);
+}
+//Syntax actually not supported in JS but drives the point
+catch(SyntaxError e) {
+ console.error("invalid json in file");
+}
+catch(Error e) {
+ console.error("unable to read file");
+}
+```
+
+And that is the point - being able to have something that is a lot like `return` and `throw` in synchronous code.
+
+You can also use promises to improve code that was written with callback helpers:
+
+
+```js
+//Copyright Plato http://stackoverflow.com/a/19385911/995876
+//CC BY-SA 2.5
+mapSeries(URLs, function (URL, done) {
+ var options = {};
+ needle.get(URL, options, function (error, response, body) {
+ if (error) {
+ return done(error);
+ }
+ try {
+ var ret = JSON.parse(body);
+ return done(null, ret);
+ }
+ catch (e) {
+ done(e);
+ }
+ });
+}, function (err, results) {
+ if (err) {
+ console.log(err);
+ } else {
+ console.log('All Needle requests successful');
+ // results is a 1 to 1 mapping in order of URLs > needle.body
+ processAndSaveAllInDB(results, function (err) {
+ if (err) {
+ return done(err);
+ }
+ console.log('All Needle requests saved');
+ done(null);
+ });
+ }
+});
+```
+
+Is more pleasing to the eye when done with promises:
+
+```js
+Promise.promisifyAll(needle);
+var options = {};
+
+var current = Promise.resolve();
+Promise.map(URLs, function(URL) {
+ current = current.then(function () {
+ return needle.getAsync(URL, options);
+ });
+ return current;
+}).map(function(responseAndBody){
+ return JSON.parse(responseAndBody[1]);
+}).then(function (results) {
+ return processAndSaveAllInDB(results);
+}).then(function(){
+ console.log('All Needle requests saved');
+}).catch(function (e) {
+ console.log(e);
+});
+```
+
+Also promises don't just give you correspondences for synchronous features but can also be used as limited event emitters or callback aggregators.
+
+More reading:
+
+ - [Promise nuggets](https://promise-nuggets.github.io/)
+ - [Why I am switching to promises](http://spion.github.io/posts/why-i-am-switching-to-promises.html)
+ - [What is the the point of promises](http://domenic.me/2012/10/14/youre-missing-the-point-of-promises/#toc_1)
+ - [Snippets for common problems](https://github.com/petkaantonov/bluebird/wiki/Snippets)
+ - [Promise anti-patterns](https://github.com/petkaantonov/bluebird/wiki/Promise-anti-patterns)
+
+# Questions and issues
+
+The [github issue tracker](https://github.com/petkaantonov/bluebird/issues) is **_only_** for bug reports and feature requests. Anything else, such as questions for help in using the library, should be posted in [StackOverflow](http://stackoverflow.com/questions/tagged/bluebird) under tags `promise` and `bluebird`.
+
+# Error handling
+
+This is a problem every promise library needs to handle in some way. Unhandled rejections/exceptions don't really have a good agreed-on asynchronous correspondence. The problem is that it is impossible to predict the future and know if a rejected promise will eventually be handled.
+
+There are two common pragmatic attempts at solving the problem that promise libraries do.
+
+The more popular one is to have the user explicitly communicate that they are done and any unhandled rejections should be thrown, like so:
+
+```js
+download().then(...).then(...).done();
+```
+
+For handling this problem, in my opinion, this is completely unacceptable and pointless. The user must remember to explicitly call `.done` and that cannot be justified when the problem is forgetting to create an error handler in the first place.
+
+The second approach, which is what bluebird by default takes, is to call a registered handler if a rejection is unhandled by the start of a second turn. The default handler is to write the stack trace to `stderr` or `console.error` in browsers. This is close to what happens with synchronous code - your code doesn't work as expected and you open console and see a stack trace. Nice.
+
+Of course this is not perfect, if your code for some reason needs to swoop in and attach error handler to some promise after the promise has been hanging around a while then you will see annoying messages. In that case you can use the `.done()` method to signal that any hanging exceptions should be thrown.
+
+If you want to override the default handler for these possibly unhandled rejections, you can pass yours like so:
+
+```js
+Promise.onPossiblyUnhandledRejection(function(error){
+ throw error;
+});
+```
+
+If you want to also enable long stack traces, call:
+
+```js
+Promise.longStackTraces();
+```
+
+right after the library is loaded.
+
+In node.js use the environment flag `BLUEBIRD_DEBUG`:
+
+```
+BLUEBIRD_DEBUG=1 node server.js
+```
+
+to enable long stack traces in all instances of bluebird.
+
+Long stack traces cannot be disabled after being enabled, and cannot be enabled after promises have already been created. Long stack traces imply a substantial performance penalty, even after using every trick to optimize them.
+
+Long stack traces are enabled by default in the debug build.
+
+#### Expected and unexpected errors
+
+A practical problem with Promises/A+ is that it models Javascript `try-catch` too closely for its own good. Therefore by default promises inherit `try-catch` warts such as the inability to specify the error types that the catch block is eligible for. It is an anti-pattern in every other language to use catch-all handlers because they swallow exceptions that you might not know about.
+
+Now, Javascript does have a perfectly fine and working way of creating error type hierarchies. It is still quite awkward to use them with the built-in `try-catch` however:
+
+```js
+try {
+ //code
+}
+catch(e) {
+ if( e instanceof WhatIWantError) {
+ //handle
+ }
+ else {
+ throw e;
+ }
+}
+```
+
+Without such checking, unexpected errors would be silently swallowed. However, with promises, bluebird brings the future (hopefully) here now and extends the `.catch` to [accept potential error type eligibility](API.md#catchfunction-errorclass-function-handler---promise).
+
+For instance here it is expected that some evil or incompetent entity will try to crash our server from `SyntaxError` by providing syntactically invalid JSON:
+
+```js
+getJSONFromSomewhere().then(function(jsonString) {
+ return JSON.parse(jsonString);
+}).then(function(object) {
+ console.log("it was valid json: ", object);
+}).catch(SyntaxError, function(e){
+ console.log("don't be evil");
+});
+```
+
+Here any kind of unexpected error will be automatically reported on `stderr` along with a stack trace because we only register a handler for the expected `SyntaxError`.
+
+Ok, so, that's pretty neat. But actually not many libraries define error types and it is in fact a complete ghetto out there with ad hoc strings being attached as some arbitrary property name like `.name`, `.type`, `.code`, not having any property at all or even throwing strings as errors and so on. So how can we still listen for expected errors?
+
+Bluebird defines a special error type `OperationalError` (you can get a reference from `Promise.OperationalError`). This type of error is given as rejection reason by promisified methods when
+their underlying library gives an untyped, but expected error. Primitives such as strings, and error objects that are directly created like `new Error("database didn't respond")` are considered untyped.
+
+Example of such library is the node core library `fs`. So if we promisify it, we can catch just the errors we want pretty easily and have programmer errors be redirected to unhandled rejection handler so that we notice them:
+
+```js
+//Read more about promisification in the API Reference:
+//API.md
+var fs = Promise.promisifyAll(require("fs"));
+
+fs.readFileAsync("myfile.json").then(JSON.parse).then(function (json) {
+ console.log("Successful json");
+}).catch(SyntaxError, function (e) {
+ console.error("file contains invalid json");
+}).catch(Promise.OperationalError, function (e) {
+ console.error("unable to read file, because: ", e.message);
+});
+```
+
+The last `catch` handler is only invoked when the `fs` module explicitly used the `err` argument convention of async callbacks to inform of an expected error. The `OperationalError` instance will contain the original error in its `.cause` property but it does have a direct copy of the `.message` and `.stack` too. In this code any unexpected error - be it in our code or the `fs` module - would not be caught by these handlers and therefore not swallowed.
+
+Since a `catch` handler typed to `Promise.OperationalError` is expected to be used very often, it has a neat shorthand:
+
+```js
+.error(function (e) {
+ console.error("unable to read file, because: ", e.message);
+});
+```
+
+See [API documentation for `.error()`](API.md#error-rejectedhandler----promise)
+
+Finally, Bluebird also supports predicate-based filters. If you pass a
+predicate function instead of an error type, the predicate will receive
+the error as an argument. The return result will be used to determine whether
+the error handler should be called.
+
+Predicates should allow for very fine grained control over caught errors:
+pattern matching, error typesets with set operations and many other techniques
+can be implemented on top of them.
+
+Example of using a predicate-based filter:
+
+```js
+var Promise = require("bluebird");
+var request = Promise.promisify(require("request"));
+
+function clientError(e) {
+ return e.code >= 400 && e.code < 500;
+}
+
+request("http://www.google.com").then(function(contents){
+ console.log(contents);
+}).catch(clientError, function(e){
+ //A client error like 400 Bad Request happened
+});
+```
+
+**Danger:** The JavaScript language allows throwing primitive values like strings. Throwing primitives can lead to worse or no stack traces. Primitives [are not exceptions](http://www.devthought.com/2011/12/22/a-string-is-not-an-error/). You should consider always throwing Error objects when handling exceptions.
+
+<hr>
+
+#### How do long stack traces differ from e.g. Q?
+
+Bluebird attempts to have more elaborate traces. Consider:
+
+```js
+Error.stackTraceLimit = 25;
+Q.longStackSupport = true;
+Q().then(function outer() {
+ return Q().then(function inner() {
+ return Q().then(function evenMoreInner() {
+ a.b.c.d();
+ }).catch(function catcher(e){
+ console.error(e.stack);
+ });
+ })
+});
+```
+
+You will see
+
+ ReferenceError: a is not defined
+ at evenMoreInner (<anonymous>:7:13)
+ From previous event:
+ at inner (<anonymous>:6:20)
+
+Compare to:
+
+```js
+Error.stackTraceLimit = 25;
+Promise.longStackTraces();
+Promise.resolve().then(function outer() {
+ return Promise.resolve().then(function inner() {
+ return Promise.resolve().then(function evenMoreInner() {
+ a.b.c.d();
+ }).catch(function catcher(e){
+ console.error(e.stack);
+ });
+ });
+});
+```
+
+ ReferenceError: a is not defined
+ at evenMoreInner (<anonymous>:7:13)
+ From previous event:
+ at inner (<anonymous>:6:36)
+ From previous event:
+ at outer (<anonymous>:5:32)
+ From previous event:
+ at <anonymous>:4:21
+ at Object.InjectedScript._evaluateOn (<anonymous>:572:39)
+ at Object.InjectedScript._evaluateAndWrap (<anonymous>:531:52)
+ at Object.InjectedScript.evaluate (<anonymous>:450:21)
+
+
+A better and more practical example of the differences can be seen in gorgikosev's [debuggability competition](https://github.com/spion/async-compare#debuggability).
+
+<hr>
+
+# Development
+
+For development tasks such as running benchmarks or testing, you need to clone the repository and install dev-dependencies.
+
+Install [node](http://nodejs.org/) and [npm](https://npmjs.org/)
+
+ git clone git@github.com:petkaantonov/bluebird.git
+ cd bluebird
+ npm install
+
+## Testing
+
+To run all tests, run
+
+ node tools/test
+
+If you need to run generator tests run the `tool/test.js` script with `--harmony` argument and node 0.11+:
+
+ node-dev --harmony tools/test
+
+You may specify an individual test file to run with the `--run` script flag:
+
+ node tools/test --run=cancel.js
+
+
+This enables output from the test and may give a better idea where the test is failing. The parameter to `--run` can be any file name located in `test/mocha` folder.
+
+#### Testing in browsers
+
+To run the test in a browser instead of node, pass the flag `--browser` to the test tool
+
+ node tools/test --run=cancel.js --browser
+
+This will automatically create a server (default port 9999) and open it in your default browser once the tests have been compiled.
+
+Keep the test tab active because some tests are timing-sensitive and will fail if the browser is throttling timeouts. Chrome will do this for example when the tab is not active.
+
+#### Supported options by the test tool
+
+The value of boolean flags is determined by presence, if you want to pass false value for a boolean flag, use the `no-`-prefix e.g. `--no-browser`.
+
+ - `--run=String` - Which tests to run (or compile when testing in browser). Default `"all"`. Can also be a glob string (relative to ./test/mocha folder).
+ - `--cover=String`. Create code coverage using the String as istanbul reporter. Coverage is created in the ./coverage folder. No coverage is created by default, default reporter is `"html"` (use `--cover` to use default reporter).
+ - `--browser` - Whether to compile tests for browsers. Default `false`.
+ - `--port=Number` - Port where local server is hosted when testing in browser. Default `9999`
+ - `--execute-browser-tests` - Whether to execute the compiled tests for browser when using `--browser`. Default `true`.
+ - `--open-browser` - Whether to open the default browser when executing browser tests. Default `true`.
+ - `--fake-timers` - Whether to use fake timers (`setTimeout` etc) when running tests in node. Default `true`.
+ - `--js-hint` - Whether to run JSHint on source files. Default `true`.
+ - `--saucelabs` - Whether to create a tunnel to sauce labs and run tests in their VMs instead of your browser when compiling tests for browser. Default `false`.
+
+## Benchmarks
+
+To run a benchmark, run the given command for a benchmark while on the project root. Requires bash (on windows the mingw32 that comes with git works fine too).
+
+Node 0.11.2+ is required to run the generator examples.
+
+### 1\. DoxBee sequential
+
+Currently the most relevant benchmark is @gorkikosev's benchmark in the article [Analysis of generators and other async patterns in node](http://spion.github.io/posts/analysis-generators-and-other-async-patterns-node.html). The benchmark emulates a situation where n amount of users are making a request in parallel to execute some mixed async/sync action. The benchmark has been modified to include a warm-up phase to minimize any JITing during timed sections.
+
+Command: `bench doxbee`
+
+### 2\. Made-up parallel
+
+This made-up scenario runs 15 shimmed queries in parallel.
+
+Command: `bench parallel`
+
+## Custom builds
+
+Custom builds for browsers are supported through a command-line utility.
+
+
+<table>
+ <caption>The following features can be disabled</caption>
+ <thead>
+ <tr>
+ <th>Feature(s)</th>
+ <th>Command line identifier</th>
+ </tr>
+ </thead>
+ <tbody>
+
+ <tr><td><a href="API.md#any---promise"><code>.any</code></a> and <a href="API.md#promiseanyarraydynamicpromise-values---promise"><code>Promise.any</code></a></td><td><code>any</code></td></tr>
+ <tr><td><a href="API.md#race---promise"><code>.race</code></a> and <a href="API.md#promiseracearraypromise-promises---promise"><code>Promise.race</code></a></td><td><code>race</code></td></tr>
+ <tr><td><a href="API.md#callstring-propertyname--dynamic-arg---promise"><code>.call</code></a> and <a href="API.md#getstring-propertyname---promise"><code>.get</code></a></td><td><code>call_get</code></td></tr>
+ <tr><td><a href="API.md#filterfunction-filterer---promise"><code>.filter</code></a> and <a href="API.md#promisefilterarraydynamicpromise-values-function-filterer---promise"><code>Promise.filter</code></a></td><td><code>filter</code></td></tr>
+ <tr><td><a href="API.md#mapfunction-mapper---promise"><code>.map</code></a> and <a href="API.md#promisemaparraydynamicpromise-values-function-mapper---promise"><code>Promise.map</code></a></td><td><code>map</code></td></tr>
+ <tr><td><a href="API.md#reducefunction-reducer--dynamic-initialvalue---promise"><code>.reduce</code></a> and <a href="API.md#promisereducearraydynamicpromise-values-function-reducer--dynamic-initialvalue---promise"><code>Promise.reduce</code></a></td><td><code>reduce</code></td></tr>
+ <tr><td><a href="API.md#props---promise"><code>.props</code></a> and <a href="API.md#promisepropsobjectpromise-object---promise"><code>Promise.props</code></a></td><td><code>props</code></td></tr>
+ <tr><td><a href="API.md#settle---promise"><code>.settle</code></a> and <a href="API.md#promisesettlearraydynamicpromise-values---promise"><code>Promise.settle</code></a></td><td><code>settle</code></td></tr>
+ <tr><td><a href="API.md#someint-count---promise"><code>.some</code></a> and <a href="API.md#promisesomearraydynamicpromise-values-int-count---promise"><code>Promise.some</code></a></td><td><code>some</code></td></tr>
+ <tr><td><a href="API.md#nodeifyfunction-callback---promise"><code>.nodeify</code></a></td><td><code>nodeify</code></td></tr>
+ <tr><td><a href="API.md#promisecoroutinegeneratorfunction-generatorfunction---function"><code>Promise.coroutine</code></a> and <a href="API.md#promisespawngeneratorfunction-generatorfunction---promise"><code>Promise.spawn</code></a></td><td><code>generators</code></td></tr>
+ <tr><td><a href="API.md#progression">Progression</a></td><td><code>progress</code></td></tr>
+ <tr><td><a href="API.md#promisification">Promisification</a></td><td><code>promisify</code></td></tr>
+ <tr><td><a href="API.md#cancellation">Cancellation</a></td><td><code>cancel</code></td></tr>
+ <tr><td><a href="API.md#timers">Timers</a></td><td><code>timers</code></td></tr>
+ <tr><td><a href="API.md#resource-management">Resource management</a></td><td><code>using</code></td></tr>
+
+ </tbody>
+</table>
+
+
+Make sure you have cloned the repo somewhere and did `npm install` successfully.
+
+After that you can run:
+
+ node tools/build --features="core"
+
+
+The above builds the most minimal build you can get. You can add more features separated by spaces from the above list:
+
+ node tools/build --features="core filter map reduce"
+
+The custom build file will be found from `/js/browser/bluebird.js`. It will have a comment that lists the disabled and enabled features.
+
+Note that the build leaves the `/js/main` etc folders with same features so if you use the folder for node.js at the same time, don't forget to build
+a full version afterwards (after having taken a copy of the bluebird.js somewhere):
+
+ node tools/build --debug --main --zalgo --browser --minify
+
+#### Supported options by the build tool
+
+The value of boolean flags is determined by presence, if you want to pass false value for a boolean flag, use the `no-`-prefix e.g. `--no-debug`.
+
+ - `--main` - Whether to build the main build. The main build is placed at `js/main` directory. Default `false`.
+ - `--debug` - Whether to build the debug build. The debug build is placed at `js/debug` directory. Default `false`.
+ - `--zalgo` - Whether to build the zalgo build. The zalgo build is placed at `js/zalgo` directory. Default `false`.
+ - `--browser` - Whether to compile the browser build. The browser build file is placed at `js/browser/bluebird.js` Default `false`.
+ - `--minify` - Whether to minify the compiled browser build. The minified browser build file is placed at `js/browser/bluebird.min.js` Default `true`.
+ - `--features=String` - See [custom builds](#custom-builds)
+
+<hr>
+
+## For library authors
+
+Building a library that depends on bluebird? You should know about a few features.
+
+If your library needs to do something obtrusive like adding or modifying methods on the `Promise` prototype, uses long stack traces or uses a custom unhandled rejection handler then... that's totally ok as long as you don't use `require("bluebird")`. Instead you should create a file
+that creates an isolated copy. For example, creating a file called `bluebird-extended.js` that contains:
+
+```js
+ //NOTE the function call right after
+module.exports = require("bluebird/js/main/promise")();
+```
+
+Your library can then use `var Promise = require("bluebird-extended");` and do whatever it wants with it. Then if the application or other library uses their own bluebird promises they will all play well together because of Promises/A+ thenable assimilation magic.
+
+You should also know about [`.nodeify()`](API.md#nodeifyfunction-callback---promise) which makes it easy to provide a dual callback/promise API.
+
+<hr>
+
+## What is the sync build?
+
+You may now use sync build by:
+
+ var Promise = require("bluebird/zalgo");
+
+The sync build is provided to see how forced asynchronity affects benchmarks. It should not be used in real code due to the implied hazards.
+
+The normal async build gives Promises/A+ guarantees about asynchronous resolution of promises. Some people think this affects performance or just plain love their code having a possibility
+of stack overflow errors and non-deterministic behavior.
+
+The sync build skips the async call trampoline completely, e.g code like:
+
+ async.invoke( this.fn, this, val );
+
+Appears as this in the sync build:
+
+ this.fn(val);
+
+This should pressure the CPU slightly less and thus the sync build should perform better. Indeed it does, but only marginally. The biggest performance boosts are from writing efficient Javascript, not from compromising determinism.
+
+Note that while some benchmarks are waiting for the next event tick, the CPU is actually not in use during that time. So the resulting benchmark result is not completely accurate because on node.js you only care about how much the CPU is taxed. Any time spent on CPU is time the whole process (or server) is paralyzed. And it is not graceful like it would be with threads.
+
+
+```js
+var cache = new Map(); //ES6 Map or DataStructures/Map or whatever...
+function getResult(url) {
+ var resolver = Promise.pending();
+ if (cache.has(url)) {
+ resolver.resolve(cache.get(url));
+ }
+ else {
+ http.get(url, function(err, content) {
+ if (err) resolver.reject(err);
+ else {
+ cache.set(url, content);
+ resolver.resolve(content);
+ }
+ });
+ }
+ return resolver.promise;
+}
+
+
+
+//The result of console.log is truly random without async guarantees
+function guessWhatItPrints( url ) {
+ var i = 3;
+ getResult(url).then(function(){
+ i = 4;
+ });
+ console.log(i);
+}
+```
+
+# Optimization guide
+
+Articles about optimization will be periodically posted in [the wiki section](https://github.com/petkaantonov/bluebird/wiki), polishing edits are welcome.
+
+A single cohesive guide compiled from the articles will probably be done eventually.
+
+# License
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Petka Antonov
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/changelog.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/changelog.md
new file mode 100644
index 0000000..5f6e348
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/changelog.md
@@ -0,0 +1,1723 @@
+## 2.10.2 (2015-10-01)
+
+Features:
+
+ - `.timeout()` now takes a custom error object as second argument
+
+## 2.10.1 (2015-09-21)
+
+ - Fix error "Cannot promisify an API that has normal methods with 'Async'-suffix" when promisifying certain objects with a custom promisifier
+
+## 2.10.0 (2015-09-08)
+
+Features:
+
+ - `Promise.using` can now take the promises-for-resources as an array ([#733](.)).
+ - Browser builds for minimal core are now hosted on CDN ([#724](.)).
+
+Bugfixes:
+
+ - Disabling debug mode with `BLUEBIRD_DEBUG=0` environment variable now works ([#719](.)).
+ - Fix unhandled rejection reporting when passing rejected promise to `.return()` ([#721](.)).
+ - Fix unbound promise's then handlers being called with wrong `this` value ([#738](.)).
+
+## 2.9.34 (2015-07-15)
+
+Bugfixes:
+
+- Correct domain for .map, .each, .filter, .reduce callbacks ([#701](.)).
+ - Preserve bound-with-promise promises across the entire chain ([#702](.)).
+
+## 2.9.33 (2015-07-09)
+
+Bugfixes:
+
+ - Methods on `Function.prototype` are no longer promisified ([#680](.)).
+
+## 2.9.32 (2015-07-03)
+
+Bugfixes:
+
+ - Fix `.return(primitiveValue)` returning a wrapped version of the primitive value when a Node.js domain is active ([#689](.)).
+
+## 2.9.31 (2015-07-03)
+
+Bugfixes:
+
+ - Fix Promises/A+ compliance issue regarding circular thenables: the correct behavior is to go into an infinite loop instead of warning with an error (Fixes [#682](.)).
+ - Fix "(node) warning: possible EventEmitter memory leak detected" ([#661](.)).
+ - Fix callbacks sometimes being called with a wrong node.js domain ([#664](.)).
+ - Fix callbacks sometimes not being called at all in iOS 8.1 WebApp mode ([#666](.), [#687](.)).
+
+## 2.9.30 (2015-06-14)
+
+Bugfixes:
+
+ - Fix regression with `promisifyAll` not promisifying certain methods
+
+## 2.9.29 (2015-06-14)
+
+Bugfixes:
+
+ - Improve `promisifyAll` detection of functions that are class constructors. Fixes mongodb 2.x promisification.
+
+## 2.9.28 (2015-06-14)
+
+Bugfixes:
+
+ - Fix handled rejection being reported as unhandled in certain scenarios when using [.all](.) or [Promise.join](.) ([#645](.))
+ - Fix custom scheduler not being called in Google Chrome when long stack traces are enabled ([#650](.))
+
+## 2.9.27 (2015-05-30)
+
+Bugfixes:
+
+ - Fix `sinon.useFakeTimers()` breaking scheduler ([#631](.))
+
+Misc:
+
+ - Add nw testing facilities (`node tools/test --nw`)
+
+## 2.9.26 (2015-05-25)
+
+Bugfixes:
+
+ - Fix crash in NW [#624](.)
+ - Fix [`.return()`](.) not supporting `undefined` as return value [#627](.)
+
+## 2.9.25 (2015-04-28)
+
+Bugfixes:
+
+ - Fix crash in node 0.8
+
+## 2.9.24 (2015-04-02)
+
+Bugfixes:
+
+ - Fix not being able to load multiple bluebird copies introduced in 2.9.22 ([#559](.), [#561](.), [#560](.)).
+
+## 2.9.23 (2015-04-02)
+
+Bugfixes:
+
+ - Fix node.js domain propagation ([#521](.)).
+
+## 2.9.22 (2015-04-02)
+
+ - Fix `.promisify` crashing in phantom JS ([#556](.))
+
+## 2.9.21 (2015-03-30)
+
+ - Fix error object's `'stack'`' overwriting causing an error when its defined to be a setter that throws an error ([#552](.)).
+
+## 2.9.20 (2015-03-29)
+
+Bugfixes:
+
+ - Fix regression where there is a long delay between calling `.cancel()` and promise actually getting cancelled in Chrome when long stack traces are enabled
+
+## 2.9.19 (2015-03-29)
+
+Bugfixes:
+
+ - Fix crashing in Chrome when long stack traces are disabled
+
+## 2.9.18 (2015-03-29)
+
+Bugfixes:
+
+ - Fix settlePromises using trampoline
+
+## 2.9.17 (2015-03-29)
+
+
+Bugfixes:
+
+ - Fix Chrome DevTools async stack traceability ([#542](.)).
+
+## 2.9.16 (2015-03-28)
+
+Features:
+
+ - Use setImmediate if available
+
+## 2.9.15 (2015-03-26)
+
+Features:
+
+ - Added `.asCallback` alias for `.nodeify`.
+
+Bugfixes:
+
+ - Don't always use nextTick, but try to pick up setImmediate or setTimeout in NW. Fixes [#534](.), [#525](.)
+ - Make progress a core feature. Fixes [#535](.) Note that progress has been removed in 3.x - this is only a fix necessary for 2.x custom builds.
+
+## 2.9.14 (2015-03-12)
+
+Bugfixes:
+
+ - Always use process.nextTick. Fixes [#525](.)
+
+## 2.9.13 (2015-02-27)
+
+Bugfixes:
+
+ - Fix .each, .filter, .reduce and .map callbacks being called synchornously if the input is immediate. ([#513](.))
+
+## 2.9.12 (2015-02-19)
+
+Bugfixes:
+
+ - Fix memory leak introduced in 2.9.0 ([#502](.))
+
+## 2.9.11 (2015-02-19)
+
+Bugfixes:
+
+ - Fix [#503](.)
+
+## 2.9.10 (2015-02-18)
+
+Bugfixes:
+
+ - Fix [#501](.)
+
+## 2.9.9 (2015-02-12)
+
+Bugfixes:
+
+ - Fix `TypeError: Cannot assign to read only property 'length'` when jsdom has declared a read-only length for all objects to inherit.
+
+## 2.9.8 (2015-02-10)
+
+Bugfixes:
+
+ - Fix regression introduced in 2.9.7 where promisify didn't properly dynamically look up methods on `this`
+
+## 2.9.7 (2015-02-08)
+
+Bugfixes:
+
+ - Fix `promisify` not retaining custom properties of the function. This enables promisifying the `"request"` module's export function and its methods at the same time.
+ - Fix `promisifyAll` methods being dependent on `this` when they are not originally dependent on `this`. This enables e.g. passing promisified `fs` functions directly as callbacks without having to bind them to `fs`.
+ - Fix `process.nextTick` being used over `setImmediate` in node.
+
+## 2.9.6 (2015-02-02)
+
+Bugfixes:
+
+ - Node environment detection can no longer be fooled
+
+## 2.9.5 (2015-02-02)
+
+Misc:
+
+ - Warn when [`.then()`](.) is passed non-functions
+
+## 2.9.4 (2015-01-30)
+
+Bugfixes:
+
+ - Fix [.timeout()](.) not calling `clearTimeout` with the proper handle in node causing the process to wait for unneeded timeout. This was a regression introduced in 2.9.1.
+
+## 2.9.3 (2015-01-27)
+
+Bugfixes:
+
+ - Fix node-webkit compatibility issue ([#467](https://github.com/petkaantonov/bluebird/pull/467))
+ - Fix long stack trace support in recent firefox versions
+
+## 2.9.2 (2015-01-26)
+
+Bugfixes:
+
+ - Fix critical bug regarding to using promisifyAll in browser that was introduced in 2.9.0 ([#466](https://github.com/petkaantonov/bluebird/issues/466)).
+
+Misc:
+
+ - Add `"browser"` entry point to package.json
+
+## 2.9.1 (2015-01-24)
+
+Features:
+
+ - If a bound promise is returned by the callback to [`Promise.method`](#promisemethodfunction-fn---function) and [`Promise.try`](#promisetryfunction-fn--arraydynamicdynamic-arguments--dynamic-ctx----promise), the returned promise will be bound to the same value
+
+## 2.9.0 (2015-01-24)
+
+Features:
+
+ - Add [`Promise.fromNode`](API.md#promisefromnodefunction-resolver---promise)
+ - Add new paramter `value` for [`Promise.bind`](API.md#promisebinddynamic-thisarg--dynamic-value---promise)
+
+Bugfixes:
+
+ - Fix several issues with [`cancellation`](API.md#cancellation) and [`.bind()`](API.md#binddynamic-thisarg---promise) interoperation when `thisArg` is a promise or thenable
+ - Fix promises created in [`disposers`](API#disposerfunction-disposer---disposer) not having proper long stack trace context
+ - Fix [`Promise.join`](API.md#promisejoinpromisethenablevalue-promises-function-handler---promise) sometimes passing the passed in callback function as the last argument to itself.
+
+Misc:
+
+ - Reduce minified full browser build file size by not including unused code generation functionality.
+ - Major internal refactoring related to testing code and source code file layout
+
+## 2.8.2 (2015-01-20)
+
+Features:
+
+ - [Global rejection events](https://github.com/petkaantonov/bluebird/blob/master/API.md#global-rejection-events) are now fired both as DOM3 events and as legacy events in browsers
+
+## 2.8.1 (2015-01-20)
+
+Bugfixes:
+
+ - Fix long stack trace stiching consistency when rejected from thenables
+
+## 2.8.0 (2015-01-19)
+
+Features:
+
+ - Major debuggability improvements:
+ - Long stack traces have been re-designed. They are now much more readable,
+ succint, relevant and consistent across bluebird features.
+ - Long stack traces are supported now in IE10+
+
+## 2.7.1 (2015-01-15)
+
+Bugfixes:
+
+ - Fix [#447](https://github.com/petkaantonov/bluebird/issues/447)
+
+## 2.7.0 (2015-01-15)
+
+Features:
+
+ - Added more context to stack traces originating from coroutines ([#421](https://github.com/petkaantonov/bluebird/issues/421))
+ - Implemented [global rejection events](https://github.com/petkaantonov/bluebird/blob/master/API.md#global-rejection-events) ([#428](https://github.com/petkaantonov/bluebird/issues/428), [#357](https://github.com/petkaantonov/bluebird/issues/357))
+ - [Custom promisifiers](https://github.com/petkaantonov/bluebird/blob/master/API.md#option-promisifier) are now passed the default promisifier which can be used to add enhancements on top of normal node promisification
+ - [Promisification filters](https://github.com/petkaantonov/bluebird/blob/master/API.md#option-filter) are now passed `passesDefaultFilter` boolean
+
+Bugfixes:
+
+ - Fix `.noConflict()` call signature ([#446]())
+ - Fix `Promise.method`ified functions being called with `undefined` when they were called with no arguments
+
+## 2.6.4 (2015-01-12)
+
+Bugfixes:
+
+ - `OperationalErrors` thrown by promisified functions retain custom properties, such as `.code` and `.path`.
+
+## 2.6.3 (2015-01-12)
+
+Bugfixes:
+
+ - Fix [#429](https://github.com/petkaantonov/bluebird/issues/429)
+ - Fix [#432](https://github.com/petkaantonov/bluebird/issues/432)
+ - Fix [#433](https://github.com/petkaantonov/bluebird/issues/433)
+
+## 2.6.2 (2015-01-07)
+
+Bugfixes:
+
+ - Fix [#426](https://github.com/petkaantonov/bluebird/issues/426)
+
+## 2.6.1 (2015-01-07)
+
+Bugfixes:
+
+ - Fixed built browser files not being included in the git tag release for bower
+
+## 2.6.0 (2015-01-06)
+
+Features:
+
+ - Significantly improve parallel promise performance and memory usage (+50% faster, -50% less memory)
+
+
+## 2.5.3 (2014-12-30)
+
+## 2.5.2 (2014-12-29)
+
+Bugfixes:
+
+ - Fix bug where already resolved promise gets attached more handlers while calling its handlers resulting in some handlers not being called
+ - Fix bug where then handlers are not called in the same order as they would run if Promises/A+ 2.3.2 was implemented as adoption
+ - Fix bug where using `Object.create(null)` as a rejection reason would crash bluebird
+
+## 2.5.1 (2014-12-29)
+
+Bugfixes:
+
+ - Fix `.finally` throwing null error when it is derived from a promise that is resolved with a promise that is resolved with a promise
+
+## 2.5.0 (2014-12-28)
+
+Features:
+
+ - [`.get`](#API.md#https://github.com/petkaantonov/bluebird/blob/master/API.md#getstring-propertyname---promise) now supports negative indexing.
+
+Bugfixes:
+
+ - Fix bug with `Promise.method` wrapped function returning a promise that never resolves if the function returns a promise that is resolved with another promise
+ - Fix bug with `Promise.delay` never resolving if the value is a promise that is resolved with another promise
+
+## 2.4.3 (2014-12-28)
+
+Bugfixes:
+
+ - Fix memory leak as described in [this Promises/A+ spec issue](https://github.com/promises-aplus/promises-spec/issues/179).
+
+## 2.4.2 (2014-12-21)
+
+Bugfixes:
+
+ - Fix bug where spread rejected handler is ignored in case of rejection
+ - Fix synchronous scheduler passed to `setScheduler` causing infinite loop
+
+## 2.4.1 (2014-12-20)
+
+Features:
+
+ - Error messages now have links to wiki pages for additional information
+ - Promises now clean up all references (to handlers, child promises etc) as soon as possible.
+
+## 2.4.0 (2014-12-18)
+
+Features:
+
+ - Better filtering of bluebird internal calls in long stack traces, especially when using minified file in browsers
+ - Small performance improvements for all collection methods
+ - Promises now delete references to handlers attached to them as soon as possible
+ - Additional stack traces are now output on stderr/`console.warn` for errors that are thrown in the process/window from rejected `.done()` promises. See [#411](https://github.com/petkaantonov/bluebird/issues/411)
+
+## 2.3.11 (2014-10-31)
+
+Bugfixes:
+
+ - Fix [#371](https://github.com/petkaantonov/bluebird/issues/371), [#373](https://github.com/petkaantonov/bluebird/issues/373)
+
+
+## 2.3.10 (2014-10-28)
+
+Features:
+
+ - `Promise.method` no longer wraps primitive errors
+ - `Promise.try` no longer wraps primitive errors
+
+## 2.3.7 (2014-10-25)
+
+Bugfixes:
+
+ - Fix [#359](https://github.com/petkaantonov/bluebird/issues/359), [#362](https://github.com/petkaantonov/bluebird/issues/362) and [#364](https://github.com/petkaantonov/bluebird/issues/364)
+
+## 2.3.6 (2014-10-15)
+
+Features:
+
+ - Implement [`.reflect()`](API.md#reflect---promisepromiseinspection)
+
+## 2.3.5 (2014-10-06)
+
+Bugfixes:
+
+ - Fix issue when promisifying methods whose names contain the string 'args'
+
+## 2.3.4 (2014-09-27)
+
+ - `P` alias was not declared inside WebWorkers
+
+## 2.3.3 (2014-09-27)
+
+Bugfixes:
+
+ - Fix [#318](https://github.com/petkaantonov/bluebird/issues/318), [#314](https://github.com/petkaantonov/bluebird/issues/#314)
+
+## 2.3.2 (2014-08-25)
+
+Bugfixes:
+
+ - `P` alias for `Promise` now exists in global scope when using browser builds without a module loader, fixing an issue with firefox extensions
+
+## 2.3.1 (2014-08-23)
+
+Features:
+
+ - `.using` can now be used with disposers created from different bluebird copy
+
+## 2.3.0 (2014-08-13)
+
+Features:
+
+ - [`.bind()`](API.md#binddynamic-thisarg---promise) and [`Promise.bind()`](API.md#promisebinddynamic-thisarg---promise) now await for the resolution of the `thisArg` if it's a promise or a thenable
+
+Bugfixes:
+
+ - Fix [#276](https://github.com/petkaantonov/bluebird/issues/276)
+
+## 2.2.2 (2014-07-14)
+
+ - Fix [#259](https://github.com/petkaantonov/bluebird/issues/259)
+
+## 2.2.1 (2014-07-07)
+
+ - Fix multiline error messages only showing the first line
+
+## 2.2.0 (2014-07-07)
+
+Bugfixes:
+
+ - `.any` and `.some` now consistently reject with RangeError when input array contains too few promises
+ - Fix iteration bug with `.reduce` when input array contains already fulfilled promises
+
+## 2.1.3 (2014-06-18)
+
+Bugfixes:
+
+ - Fix [#235](https://github.com/petkaantonov/bluebird/issues/235)
+
+## 2.1.2 (2014-06-15)
+
+Bugfixes:
+
+ - Fix [#232](https://github.com/petkaantonov/bluebird/issues/232)
+
+## 2.1.1 (2014-06-11)
+
+## 2.1.0 (2014-06-11)
+
+Features:
+
+ - Add [`promisifier`](API.md#option-promisifier) option to `Promise.promisifyAll()`
+ - Improve performance of `.props()` and collection methods when used with immediate values
+
+
+Bugfixes:
+
+ - Fix a bug where .reduce calls the callback for an already visited item
+ - Fix a bug where stack trace limit is calculated to be too small, which resulted in too short stack traces
+
+<sub>Add undocumented experimental `yieldHandler` option to `Promise.coroutine`</sub>
+
+## 2.0.7 (2014-06-08)
+## 2.0.6 (2014-06-07)
+## 2.0.5 (2014-06-05)
+## 2.0.4 (2014-06-05)
+## 2.0.3 (2014-06-05)
+## 2.0.2 (2014-06-04)
+## 2.0.1 (2014-06-04)
+
+## 2.0.0 (2014-06-04)
+
+#What's new in 2.0
+
+- [Resource management](API.md#resource-management) - never leak resources again
+- [Promisification](API.md#promisification) on steroids - entire modules can now be promisified with one line of code
+- [`.map()`](API.md#mapfunction-mapper--object-options---promise), [`.each()`](API.md#eachfunction-iterator---promise), [`.filter()`](API.md#filterfunction-filterer--object-options---promise), [`.reduce()`](API.md#reducefunction-reducer--dynamic-initialvalue---promise) reimagined from simple sugar to powerful concurrency coordination tools
+- [API Documentation](API.md) has been reorganized and more elaborate examples added
+- Deprecated [progression](#progression-migration) and [deferreds](#deferred-migration)
+- Improved performance and readability
+
+Features:
+
+- Added [`using()`](API.md#promiseusingpromisedisposer-promise-promisedisposer-promise--function-handler---promise) and [`disposer()`](API.md#disposerfunction-disposer---disposer)
+- [`.map()`](API.md#mapfunction-mapper--object-options---promise) now calls the handler as soon as items in the input array become fulfilled
+- Added a concurrency option to [`.map()`](API.md#mapfunction-mapper--object-options---promise)
+- [`.filter()`](API.md#filterfunction-filterer--object-options---promise) now calls the handler as soon as items in the input array become fulfilled
+- Added a concurrency option to [`.filter()`](API.md#filterfunction-filterer--object-options---promise)
+- [`.reduce()`](API.md#reducefunction-reducer--dynamic-initialvalue---promise) now calls the handler as soon as items in the input array become fulfilled, but in-order
+- Added [`.each()`](API.md#eachfunction-iterator---promise)
+- [`Promise.resolve()`](API.md#promiseresolvedynamic-value---promise) behaves like `Promise.cast`. `Promise.cast` deprecated.
+- [Synchronous inspection](API.md#synchronous-inspection): Removed `.inspect()`, added [`.value()`](API.md#value---dynamic) and [`.reason()`](API.md#reason---dynamic)
+- [`Promise.join()`](API.md#promisejoinpromisethenablevalue-promises-function-handler---promise) now takes a function as the last argument
+- Added [`Promise.setScheduler()`](API.md#promisesetschedulerfunction-scheduler---void)
+- [`.cancel()`](API.md#cancelerror-reason---promise) supports a custom cancellation reason
+- [`.timeout()`](API.md#timeoutint-ms--string-message---promise) now cancels the promise instead of rejecting it
+- [`.nodeify()`](API.md#nodeifyfunction-callback--object-options---promise) now supports passing multiple success results when mapping promises to nodebacks
+- Added `suffix` and `filter` options to [`Promise.promisifyAll()`](API.md#promisepromisifyallobject-target--object-options---object)
+
+Breaking changes:
+
+- Sparse array holes are not skipped by collection methods but treated as existing elements with `undefined` value
+- `.map()` and `.filter()` do not call the given mapper or filterer function in any specific order
+- Removed the `.inspect()` method
+- Yielding an array from a coroutine is not supported by default. You can use [`coroutine.addYieldHandler()`](API.md#promisecoroutineaddyieldhandlerfunction-handler---void) to configure the old behavior (or any behavior you want).
+- [`.any()`](API.md#any---promise) and [`.some()`](API.md#someint-count---promise) no longer use an array as the rejection reason. [`AggregateError`](API.md#aggregateerror) is used instead.
+
+
+## 1.2.4 (2014-04-27)
+
+Bugfixes:
+
+ - Fix promisifyAll causing a syntax error when a method name is not a valid identifier
+ - Fix syntax error when es5.js is used in strict mode
+
+## 1.2.3 (2014-04-17)
+
+Bugfixes:
+
+ - Fix [#179](https://github.com/petkaantonov/bluebird/issues/179)
+
+## 1.2.2 (2014-04-09)
+
+Bugfixes:
+
+ - Promisified methods from promisifyAll no longer call the original method when it is overriden
+ - Nodeify doesn't pass second argument to the callback if the promise is fulfilled with `undefined`
+
+## 1.2.1 (2014-03-31)
+
+Bugfixes:
+
+ - Fix [#168](https://github.com/petkaantonov/bluebird/issues/168)
+
+## 1.2.0 (2014-03-29)
+
+Features:
+
+ - New method: [`.value()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#value---dynamic)
+ - New method: [`.reason()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#reason---dynamic)
+ - New method: [`Promise.onUnhandledRejectionHandled()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#promiseonunhandledrejectionhandledfunction-handler---undefined)
+ - `Promise.map()`, `.map()`, `Promise.filter()` and `.filter()` start calling their callbacks as soon as possible while retaining a correct order. See [`8085922f`](https://github.com/petkaantonov/bluebird/commit/8085922fb95a9987fda0cf2337598ab4a98dc315).
+
+Bugfixes:
+
+ - Fix [#165](https://github.com/petkaantonov/bluebird/issues/165)
+ - Fix [#166](https://github.com/petkaantonov/bluebird/issues/166)
+
+## 1.1.1 (2014-03-18)
+
+Bugfixes:
+
+ - [#138](https://github.com/petkaantonov/bluebird/issues/138)
+ - [#144](https://github.com/petkaantonov/bluebird/issues/144)
+ - [#148](https://github.com/petkaantonov/bluebird/issues/148)
+ - [#151](https://github.com/petkaantonov/bluebird/issues/151)
+
+## 1.1.0 (2014-03-08)
+
+Features:
+
+ - Implement [`Promise.prototype.tap()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#tapfunction-handler---promise)
+ - Implement [`Promise.coroutine.addYieldHandler()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#promisecoroutineaddyieldhandlerfunction-handler---void)
+ - Deprecate `Promise.prototype.spawn`
+
+Bugfixes:
+
+ - Fix already rejected promises being reported as unhandled when handled through collection methods
+ - Fix browserisfy crashing from checking `process.version.indexOf`
+
+## 1.0.8 (2014-03-03)
+
+Bugfixes:
+
+ - Fix active domain being lost across asynchronous boundaries in Node.JS 10.xx
+
+## 1.0.7 (2014-02-25)
+
+Bugfixes:
+
+ - Fix handled errors being reported
+
+## 1.0.6 (2014-02-17)
+
+Bugfixes:
+
+ - Fix bug with unhandled rejections not being reported
+ when using `Promise.try` or `Promise.method` without
+ attaching further handlers
+
+## 1.0.5 (2014-02-15)
+
+Features:
+
+ - Node.js performance: promisified functions try to check amount of passed arguments in most optimal order
+ - Node.js promisified functions will have same `.length` as the original function minus one (for the callback parameter)
+
+## 1.0.4 (2014-02-09)
+
+Features:
+
+ - Possibly unhandled rejection handler will always get a stack trace, even if the rejection or thrown error was not an error
+ - Unhandled rejections are tracked per promise, not per error. So if you create multiple branches from a single ancestor and that ancestor gets rejected, each branch with no error handler with the end will cause a possibly unhandled rejection handler invocation
+
+Bugfixes:
+
+ - Fix unhandled non-writable objects or primitives not reported by possibly unhandled rejection handler
+
+## 1.0.3 (2014-02-05)
+
+Bugfixes:
+
+ - [#93](https://github.com/petkaantonov/bluebird/issues/88)
+
+## 1.0.2 (2014-02-04)
+
+Features:
+
+ - Significantly improve performance of foreign bluebird thenables
+
+Bugfixes:
+
+ - [#88](https://github.com/petkaantonov/bluebird/issues/88)
+
+## 1.0.1 (2014-01-28)
+
+Features:
+
+ - Error objects that have property `.isAsync = true` will now be caught by `.error()`
+
+Bugfixes:
+
+ - Fix TypeError and RangeError shims not working without `new` operator
+
+## 1.0.0 (2014-01-12)
+
+Features:
+
+ - `.filter`, `.map`, and `.reduce` no longer skip sparse array holes. This is a backwards incompatible change.
+ - Like `.map` and `.filter`, `.reduce` now allows returning promises and thenables from the iteration function.
+
+Bugfixes:
+
+ - [#58](https://github.com/petkaantonov/bluebird/issues/58)
+ - [#61](https://github.com/petkaantonov/bluebird/issues/61)
+ - [#64](https://github.com/petkaantonov/bluebird/issues/64)
+ - [#60](https://github.com/petkaantonov/bluebird/issues/60)
+
+## 0.11.6-1 (2013-12-29)
+
+## 0.11.6-0 (2013-12-29)
+
+Features:
+
+ - You may now return promises and thenables from the filterer function used in `Promise.filter` and `Promise.prototype.filter`.
+
+ - `.error()` now catches additional sources of rejections:
+
+ - Rejections originating from `Promise.reject`
+
+ - Rejections originating from thenables using
+ the `reject` callback
+
+ - Rejections originating from promisified callbacks
+ which use the `errback` argument
+
+ - Rejections originating from `new Promise` constructor
+ where the `reject` callback is called explicitly
+
+ - Rejections originating from `PromiseResolver` where
+ `.reject()` method is called explicitly
+
+Bugfixes:
+
+ - Fix `captureStackTrace` being called when it was `null`
+ - Fix `Promise.map` not unwrapping thenables
+
+## 0.11.5-1 (2013-12-15)
+
+## 0.11.5-0 (2013-12-03)
+
+Features:
+
+ - Improve performance of collection methods
+ - Improve performance of promise chains
+
+## 0.11.4-1 (2013-12-02)
+
+## 0.11.4-0 (2013-12-02)
+
+Bugfixes:
+
+ - Fix `Promise.some` behavior with arguments like negative integers, 0...
+ - Fix stack traces of synchronously throwing promisified functions'
+
+## 0.11.3-0 (2013-12-02)
+
+Features:
+
+ - Improve performance of generators
+
+Bugfixes:
+
+ - Fix critical bug with collection methods.
+
+## 0.11.2-0 (2013-12-02)
+
+Features:
+
+ - Improve performance of all collection methods
+
+## 0.11.1-0 (2013-12-02)
+
+Features:
+
+- Improve overall performance.
+- Improve performance of promisified functions.
+- Improve performance of catch filters.
+- Improve performance of .finally.
+
+Bugfixes:
+
+- Fix `.finally()` rejecting if passed non-function. It will now ignore non-functions like `.then`.
+- Fix `.finally()` not converting thenables returned from the handler to promises.
+- `.spread()` now rejects if the ultimate value given to it is not spreadable.
+
+## 0.11.0-0 (2013-12-02)
+
+Features:
+
+ - Improve overall performance when not using `.bind()` or cancellation.
+ - Promises are now not cancellable by default. This is backwards incompatible change - see [`.cancellable()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#cancellable---promise)
+ - [`Promise.delay`](https://github.com/petkaantonov/bluebird/blob/master/API.md#promisedelaydynamic-value-int-ms---promise)
+ - [`.delay()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#delayint-ms---promise)
+ - [`.timeout()`](https://github.com/petkaantonov/bluebird/blob/master/API.md#timeoutint-ms--string-message---promise)
+
+## 0.10.14-0 (2013-12-01)
+
+Bugfixes:
+
+ - Fix race condition when mixing 3rd party asynchrony.
+
+## 0.10.13-1 (2013-11-30)
+
+## 0.10.13-0 (2013-11-30)
+
+Bugfixes:
+
+ - Fix another bug with progression.
+
+## 0.10.12-0 (2013-11-30)
+
+Bugfixes:
+
+ - Fix bug with progression.
+
+## 0.10.11-4 (2013-11-29)
+
+## 0.10.11-2 (2013-11-29)
+
+Bugfixes:
+
+ - Fix `.race()` not propagating bound values.
+
+## 0.10.11-1 (2013-11-29)
+
+Features:
+
+ - Improve performance of `Promise.race`
+
+## 0.10.11-0 (2013-11-29)
+
+Bugfixes:
+
+ - Fixed `Promise.promisifyAll` invoking property accessors. Only data properties with function values are considered.
+
+## 0.10.10-0 (2013-11-28)
+
+Features:
+
+ - Disable long stack traces in browsers by default. Call `Promise.longStackTraces()` to enable them.
+
+## 0.10.9-1 (2013-11-27)
+
+Bugfixes:
+
+ - Fail early when `new Promise` is constructed incorrectly
+
+## 0.10.9-0 (2013-11-27)
+
+Bugfixes:
+
+ - Promise.props now takes a [thenable-for-collection](https://github.com/petkaantonov/bluebird/blob/f41edac61b7c421608ff439bb5a09b7cffeadcf9/test/mocha/props.js#L197-L217)
+ - All promise collection methods now reject when a promise-or-thenable-for-collection turns out not to give a collection
+
+## 0.10.8-0 (2013-11-25)
+
+Features:
+
+ - All static collection methods take thenable-for-collection
+
+## 0.10.7-0 (2013-11-25)
+
+Features:
+
+ - throw TypeError when thenable resolves with itself
+ - Make .race() and Promise.race() forever pending on empty collections
+
+## 0.10.6-0 (2013-11-25)
+
+Bugfixes:
+
+ - Promise.resolve and PromiseResolver.resolve follow thenables too.
+
+## 0.10.5-0 (2013-11-24)
+
+Bugfixes:
+
+ - Fix infinite loop when thenable resolves with itself
+
+## 0.10.4-1 (2013-11-24)
+
+Bugfixes:
+
+ - Fix a file missing from build. (Critical fix)
+
+## 0.10.4-0 (2013-11-24)
+
+Features:
+
+ - Remove dependency of es5-shim and es5-sham when using ES3.
+
+## 0.10.3-0 (2013-11-24)
+
+Features:
+
+ - Improve performance of `Promise.method`
+
+## 0.10.2-1 (2013-11-24)
+
+Features:
+
+ - Rename PromiseResolver#asCallback to PromiseResolver#callback
+
+## 0.10.2-0 (2013-11-24)
+
+Features:
+
+ - Remove memoization of thenables
+
+## 0.10.1-0 (2013-11-21)
+
+Features:
+
+ - Add methods `Promise.resolve()`, `Promise.reject()`, `Promise.defer()` and `.resolve()`.
+
+## 0.10.0-1 (2013-11-17)
+
+## 0.10.0-0 (2013-11-17)
+
+Features:
+
+ - Implement `Promise.method()`
+ - Implement `.return()`
+ - Implement `.throw()`
+
+Bugfixes:
+
+ - Fix promises being able to use themselves as resolution or follower value
+
+## 0.9.11-1 (2013-11-14)
+
+Features:
+
+ - Implicit `Promise.all()` when yielding an array from generators
+
+## 0.9.11-0 (2013-11-13)
+
+Bugfixes:
+
+ - Fix `.spread` not unwrapping thenables
+
+## 0.9.10-2 (2013-11-13)
+
+Features:
+
+ - Improve performance of promisified functions on V8
+
+Bugfixes:
+
+ - Report unhandled rejections even when long stack traces are disabled
+ - Fix `.error()` showing up in stack traces
+
+## 0.9.10-1 (2013-11-05)
+
+Bugfixes:
+
+ - Catch filter method calls showing in stack traces
+
+## 0.9.10-0 (2013-11-05)
+
+Bugfixes:
+
+ - Support primitives in catch filters
+
+## 0.9.9-0 (2013-11-05)
+
+Features:
+
+ - Add `Promise.race()` and `.race()`
+
+## 0.9.8-0 (2013-11-01)
+
+Bugfixes:
+
+ - Fix bug with `Promise.try` not unwrapping returned promises and thenables
+
+## 0.9.7-0 (2013-10-29)
+
+Bugfixes:
+
+ - Fix bug with build files containing duplicated code for promise.js
+
+## 0.9.6-0 (2013-10-28)
+
+Features:
+
+ - Improve output of reporting unhandled non-errors
+ - Implement RejectionError wrapping and `.error()` method
+
+## 0.9.5-0 (2013-10-27)
+
+Features:
+
+ - Allow fresh copies of the library to be made
+
+## 0.9.4-1 (2013-10-27)
+
+## 0.9.4-0 (2013-10-27)
+
+Bugfixes:
+
+ - Rollback non-working multiple fresh copies feature
+
+## 0.9.3-0 (2013-10-27)
+
+Features:
+
+ - Allow fresh copies of the library to be made
+ - Add more components to customized builds
+
+## 0.9.2-1 (2013-10-25)
+
+## 0.9.2-0 (2013-10-25)
+
+Features:
+
+ - Allow custom builds
+
+## 0.9.1-1 (2013-10-22)
+
+Bugfixes:
+
+ - Fix unhandled rethrown exceptions not reported
+
+## 0.9.1-0 (2013-10-22)
+
+Features:
+
+ - Improve performance of `Promise.try`
+ - Extend `Promise.try` to accept arguments and ctx to make it more usable in promisification of synchronous functions.
+
+## 0.9.0-0 (2013-10-18)
+
+Features:
+
+ - Implement `.bind` and `Promise.bind`
+
+Bugfixes:
+
+ - Fix `.some()` when argument is a pending promise that later resolves to an array
+
+## 0.8.5-1 (2013-10-17)
+
+Features:
+
+ - Enable process wide long stack traces through BLUEBIRD_DEBUG environment variable
+
+## 0.8.5-0 (2013-10-16)
+
+Features:
+
+ - Improve performance of all collection methods
+
+Bugfixes:
+
+ - Fix .finally passing the value to handlers
+ - Remove kew from benchmarks due to bugs in the library breaking the benchmark
+ - Fix some bluebird library calls potentially appearing in stack traces
+
+## 0.8.4-1 (2013-10-15)
+
+Bugfixes:
+
+ - Fix .pending() call showing in long stack traces
+
+## 0.8.4-0 (2013-10-15)
+
+Bugfixes:
+
+ - Fix PromiseArray and its sub-classes swallowing possibly unhandled rejections
+
+## 0.8.3-3 (2013-10-14)
+
+Bugfixes:
+
+ - Fix AMD-declaration using named module.
+
+## 0.8.3-2 (2013-10-14)
+
+Features:
+
+ - The mortals that can handle it may now release Zalgo by `require("bluebird/zalgo");`
+
+## 0.8.3-1 (2013-10-14)
+
+Bugfixes:
+
+ - Fix memory leak when using the same promise to attach handlers over and over again
+
+## 0.8.3-0 (2013-10-13)
+
+Features:
+
+ - Add `Promise.props()` and `Promise.prototype.props()`. They work like `.all()` for object properties.
+
+Bugfixes:
+
+ - Fix bug with .some returning garbage when sparse arrays have rejections
+
+## 0.8.2-2 (2013-10-13)
+
+Features:
+
+ - Improve performance of `.reduce()` when `initialValue` can be synchronously cast to a value
+
+## 0.8.2-1 (2013-10-12)
+
+Bugfixes:
+
+ - Fix .npmignore having irrelevant files
+
+## 0.8.2-0 (2013-10-12)
+
+Features:
+
+ - Improve performance of `.some()`
+
+## 0.8.1-0 (2013-10-11)
+
+Bugfixes:
+
+ - Remove uses of dynamic evaluation (`new Function`, `eval` etc) when strictly not necessary. Use feature detection to use static evaluation to avoid errors when dynamic evaluation is prohibited.
+
+## 0.8.0-3 (2013-10-10)
+
+Features:
+
+ - Add `.asCallback` property to `PromiseResolver`s
+
+## 0.8.0-2 (2013-10-10)
+
+## 0.8.0-1 (2013-10-09)
+
+Features:
+
+ - Improve overall performance. Be able to sustain infinite recursion when using promises.
+
+## 0.8.0-0 (2013-10-09)
+
+Bugfixes:
+
+ - Fix stackoverflow error when function calls itself "synchronously" from a promise handler
+
+## 0.7.12-2 (2013-10-09)
+
+Bugfixes:
+
+ - Fix safari 6 not using `MutationObserver` as a scheduler
+ - Fix process exceptions interfering with internal queue flushing
+
+## 0.7.12-1 (2013-10-09)
+
+Bugfixes:
+
+ - Don't try to detect if generators are available to allow shims to be used
+
+## 0.7.12-0 (2013-10-08)
+
+Features:
+
+ - Promisification now consider all functions on the object and its prototype chain
+ - Individual promisifcation uses current `this` if no explicit receiver is given
+ - Give better stack traces when promisified callbacks throw or errback primitives such as strings by wrapping them in an `Error` object.
+
+Bugfixes:
+
+ - Fix runtime APIs throwing synchronous errors
+
+## 0.7.11-0 (2013-10-08)
+
+Features:
+
+ - Deprecate `Promise.promisify(Object target)` in favor of `Promise.promisifyAll(Object target)` to avoid confusion with function objects
+ - Coroutines now throw error when a non-promise is `yielded`
+
+## 0.7.10-1 (2013-10-05)
+
+Features:
+
+ - Make tests pass Internet Explorer 8
+
+## 0.7.10-0 (2013-10-05)
+
+Features:
+
+ - Create browser tests
+
+## 0.7.9-1 (2013-10-03)
+
+Bugfixes:
+
+ - Fix promise cast bug when thenable fulfills using itself as the fulfillment value
+
+## 0.7.9-0 (2013-10-03)
+
+Features:
+
+ - More performance improvements when long stack traces are enabled
+
+## 0.7.8-1 (2013-10-02)
+
+Features:
+
+ - Performance improvements when long stack traces are enabled
+
+## 0.7.8-0 (2013-10-02)
+
+Bugfixes:
+
+ - Fix promisified methods not turning synchronous exceptions into rejections
+
+## 0.7.7-1 (2013-10-02)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.7-0 (2013-10-01)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.6-0 (2013-09-29)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.5-0 (2013-09-28)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.4-1 (2013-09-28)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.4-0 (2013-09-28)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.3-1 (2013-09-28)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.3-0 (2013-09-27)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.2-0 (2013-09-27)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.1-5 (2013-09-26)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.1-4 (2013-09-25)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.1-3 (2013-09-25)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.1-2 (2013-09-24)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.1-1 (2013-09-24)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.1-0 (2013-09-24)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.0-1 (2013-09-23)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.7.0-0 (2013-09-23)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.5-2 (2013-09-20)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.5-1 (2013-09-18)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.5-0 (2013-09-18)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.4-1 (2013-09-18)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.4-0 (2013-09-18)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.3-4 (2013-09-18)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.3-3 (2013-09-18)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.3-2 (2013-09-16)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.3-1 (2013-09-16)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.3-0 (2013-09-15)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.2-1 (2013-09-14)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.2-0 (2013-09-14)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.1-0 (2013-09-14)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.6.0-0 (2013-09-13)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.9-6 (2013-09-12)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.9-5 (2013-09-12)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.9-4 (2013-09-12)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.9-3 (2013-09-11)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.9-2 (2013-09-11)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.9-1 (2013-09-11)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.9-0 (2013-09-11)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.8-1 (2013-09-11)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.8-0 (2013-09-11)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.7-0 (2013-09-11)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.6-1 (2013-09-10)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.6-0 (2013-09-10)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.5-1 (2013-09-10)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.5-0 (2013-09-09)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.4-1 (2013-09-08)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.4-0 (2013-09-08)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.3-0 (2013-09-07)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.2-0 (2013-09-07)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.1-0 (2013-09-07)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.5.0-0 (2013-09-07)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.4.0-0 (2013-09-06)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.3.0-1 (2013-09-06)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
+## 0.3.0 (2013-09-06)
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/browser/bluebird.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/browser/bluebird.js
new file mode 100644
index 0000000..58a08a3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/browser/bluebird.js
@@ -0,0 +1,4887 @@
+/* @preserve
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2013-2015 Petka Antonov
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ */
+/**
+ * bluebird build version 2.10.2
+ * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, cancel, using, filter, any, each, timers
+*/
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_=="function"&&_dereq_;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise) {
+var SomePromiseArray = Promise._SomePromiseArray;
+function any(promises) {
+ var ret = new SomePromiseArray(promises);
+ var promise = ret.promise();
+ ret.setHowMany(1);
+ ret.setUnwrap();
+ ret.init();
+ return promise;
+}
+
+Promise.any = function (promises) {
+ return any(promises);
+};
+
+Promise.prototype.any = function () {
+ return any(this);
+};
+
+};
+
+},{}],2:[function(_dereq_,module,exports){
+"use strict";
+var firstLineError;
+try {throw new Error(); } catch (e) {firstLineError = e;}
+var schedule = _dereq_("./schedule.js");
+var Queue = _dereq_("./queue.js");
+var util = _dereq_("./util.js");
+
+function Async() {
+ this._isTickUsed = false;
+ this._lateQueue = new Queue(16);
+ this._normalQueue = new Queue(16);
+ this._trampolineEnabled = true;
+ var self = this;
+ this.drainQueues = function () {
+ self._drainQueues();
+ };
+ this._schedule =
+ schedule.isStatic ? schedule(this.drainQueues) : schedule;
+}
+
+Async.prototype.disableTrampolineIfNecessary = function() {
+ if (util.hasDevTools) {
+ this._trampolineEnabled = false;
+ }
+};
+
+Async.prototype.enableTrampoline = function() {
+ if (!this._trampolineEnabled) {
+ this._trampolineEnabled = true;
+ this._schedule = function(fn) {
+ setTimeout(fn, 0);
+ };
+ }
+};
+
+Async.prototype.haveItemsQueued = function () {
+ return this._normalQueue.length() > 0;
+};
+
+Async.prototype.throwLater = function(fn, arg) {
+ if (arguments.length === 1) {
+ arg = fn;
+ fn = function () { throw arg; };
+ }
+ if (typeof setTimeout !== "undefined") {
+ setTimeout(function() {
+ fn(arg);
+ }, 0);
+ } else try {
+ this._schedule(function() {
+ fn(arg);
+ });
+ } catch (e) {
+ throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/m3OTXk\u000a");
+ }
+};
+
+function AsyncInvokeLater(fn, receiver, arg) {
+ this._lateQueue.push(fn, receiver, arg);
+ this._queueTick();
+}
+
+function AsyncInvoke(fn, receiver, arg) {
+ this._normalQueue.push(fn, receiver, arg);
+ this._queueTick();
+}
+
+function AsyncSettlePromises(promise) {
+ this._normalQueue._pushOne(promise);
+ this._queueTick();
+}
+
+if (!util.hasDevTools) {
+ Async.prototype.invokeLater = AsyncInvokeLater;
+ Async.prototype.invoke = AsyncInvoke;
+ Async.prototype.settlePromises = AsyncSettlePromises;
+} else {
+ if (schedule.isStatic) {
+ schedule = function(fn) { setTimeout(fn, 0); };
+ }
+ Async.prototype.invokeLater = function (fn, receiver, arg) {
+ if (this._trampolineEnabled) {
+ AsyncInvokeLater.call(this, fn, receiver, arg);
+ } else {
+ this._schedule(function() {
+ setTimeout(function() {
+ fn.call(receiver, arg);
+ }, 100);
+ });
+ }
+ };
+
+ Async.prototype.invoke = function (fn, receiver, arg) {
+ if (this._trampolineEnabled) {
+ AsyncInvoke.call(this, fn, receiver, arg);
+ } else {
+ this._schedule(function() {
+ fn.call(receiver, arg);
+ });
+ }
+ };
+
+ Async.prototype.settlePromises = function(promise) {
+ if (this._trampolineEnabled) {
+ AsyncSettlePromises.call(this, promise);
+ } else {
+ this._schedule(function() {
+ promise._settlePromises();
+ });
+ }
+ };
+}
+
+Async.prototype.invokeFirst = function (fn, receiver, arg) {
+ this._normalQueue.unshift(fn, receiver, arg);
+ this._queueTick();
+};
+
+Async.prototype._drainQueue = function(queue) {
+ while (queue.length() > 0) {
+ var fn = queue.shift();
+ if (typeof fn !== "function") {
+ fn._settlePromises();
+ continue;
+ }
+ var receiver = queue.shift();
+ var arg = queue.shift();
+ fn.call(receiver, arg);
+ }
+};
+
+Async.prototype._drainQueues = function () {
+ this._drainQueue(this._normalQueue);
+ this._reset();
+ this._drainQueue(this._lateQueue);
+};
+
+Async.prototype._queueTick = function () {
+ if (!this._isTickUsed) {
+ this._isTickUsed = true;
+ this._schedule(this.drainQueues);
+ }
+};
+
+Async.prototype._reset = function () {
+ this._isTickUsed = false;
+};
+
+module.exports = new Async();
+module.exports.firstLineError = firstLineError;
+
+},{"./queue.js":28,"./schedule.js":31,"./util.js":38}],3:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL, tryConvertToPromise) {
+var rejectThis = function(_, e) {
+ this._reject(e);
+};
+
+var targetRejected = function(e, context) {
+ context.promiseRejectionQueued = true;
+ context.bindingPromise._then(rejectThis, rejectThis, null, this, e);
+};
+
+var bindingResolved = function(thisArg, context) {
+ if (this._isPending()) {
+ this._resolveCallback(context.target);
+ }
+};
+
+var bindingRejected = function(e, context) {
+ if (!context.promiseRejectionQueued) this._reject(e);
+};
+
+Promise.prototype.bind = function (thisArg) {
+ var maybePromise = tryConvertToPromise(thisArg);
+ var ret = new Promise(INTERNAL);
+ ret._propagateFrom(this, 1);
+ var target = this._target();
+
+ ret._setBoundTo(maybePromise);
+ if (maybePromise instanceof Promise) {
+ var context = {
+ promiseRejectionQueued: false,
+ promise: ret,
+ target: target,
+ bindingPromise: maybePromise
+ };
+ target._then(INTERNAL, targetRejected, ret._progress, ret, context);
+ maybePromise._then(
+ bindingResolved, bindingRejected, ret._progress, ret, context);
+ } else {
+ ret._resolveCallback(target);
+ }
+ return ret;
+};
+
+Promise.prototype._setBoundTo = function (obj) {
+ if (obj !== undefined) {
+ this._bitField = this._bitField | 131072;
+ this._boundTo = obj;
+ } else {
+ this._bitField = this._bitField & (~131072);
+ }
+};
+
+Promise.prototype._isBound = function () {
+ return (this._bitField & 131072) === 131072;
+};
+
+Promise.bind = function (thisArg, value) {
+ var maybePromise = tryConvertToPromise(thisArg);
+ var ret = new Promise(INTERNAL);
+
+ ret._setBoundTo(maybePromise);
+ if (maybePromise instanceof Promise) {
+ maybePromise._then(function() {
+ ret._resolveCallback(value);
+ }, ret._reject, ret._progress, ret, null);
+ } else {
+ ret._resolveCallback(value);
+ }
+ return ret;
+};
+};
+
+},{}],4:[function(_dereq_,module,exports){
+"use strict";
+var old;
+if (typeof Promise !== "undefined") old = Promise;
+function noConflict() {
+ try { if (Promise === bluebird) Promise = old; }
+ catch (e) {}
+ return bluebird;
+}
+var bluebird = _dereq_("./promise.js")();
+bluebird.noConflict = noConflict;
+module.exports = bluebird;
+
+},{"./promise.js":23}],5:[function(_dereq_,module,exports){
+"use strict";
+var cr = Object.create;
+if (cr) {
+ var callerCache = cr(null);
+ var getterCache = cr(null);
+ callerCache[" size"] = getterCache[" size"] = 0;
+}
+
+module.exports = function(Promise) {
+var util = _dereq_("./util.js");
+var canEvaluate = util.canEvaluate;
+var isIdentifier = util.isIdentifier;
+
+var getMethodCaller;
+var getGetter;
+if (!true) {
+var makeMethodCaller = function (methodName) {
+ return new Function("ensureMethod", " \n\
+ return function(obj) { \n\
+ 'use strict' \n\
+ var len = this.length; \n\
+ ensureMethod(obj, 'methodName'); \n\
+ switch(len) { \n\
+ case 1: return obj.methodName(this[0]); \n\
+ case 2: return obj.methodName(this[0], this[1]); \n\
+ case 3: return obj.methodName(this[0], this[1], this[2]); \n\
+ case 0: return obj.methodName(); \n\
+ default: \n\
+ return obj.methodName.apply(obj, this); \n\
+ } \n\
+ }; \n\
+ ".replace(/methodName/g, methodName))(ensureMethod);
+};
+
+var makeGetter = function (propertyName) {
+ return new Function("obj", " \n\
+ 'use strict'; \n\
+ return obj.propertyName; \n\
+ ".replace("propertyName", propertyName));
+};
+
+var getCompiled = function(name, compiler, cache) {
+ var ret = cache[name];
+ if (typeof ret !== "function") {
+ if (!isIdentifier(name)) {
+ return null;
+ }
+ ret = compiler(name);
+ cache[name] = ret;
+ cache[" size"]++;
+ if (cache[" size"] > 512) {
+ var keys = Object.keys(cache);
+ for (var i = 0; i < 256; ++i) delete cache[keys[i]];
+ cache[" size"] = keys.length - 256;
+ }
+ }
+ return ret;
+};
+
+getMethodCaller = function(name) {
+ return getCompiled(name, makeMethodCaller, callerCache);
+};
+
+getGetter = function(name) {
+ return getCompiled(name, makeGetter, getterCache);
+};
+}
+
+function ensureMethod(obj, methodName) {
+ var fn;
+ if (obj != null) fn = obj[methodName];
+ if (typeof fn !== "function") {
+ var message = "Object " + util.classString(obj) + " has no method '" +
+ util.toString(methodName) + "'";
+ throw new Promise.TypeError(message);
+ }
+ return fn;
+}
+
+function caller(obj) {
+ var methodName = this.pop();
+ var fn = ensureMethod(obj, methodName);
+ return fn.apply(obj, this);
+}
+Promise.prototype.call = function (methodName) {
+ var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}
+ if (!true) {
+ if (canEvaluate) {
+ var maybeCaller = getMethodCaller(methodName);
+ if (maybeCaller !== null) {
+ return this._then(
+ maybeCaller, undefined, undefined, args, undefined);
+ }
+ }
+ }
+ args.push(methodName);
+ return this._then(caller, undefined, undefined, args, undefined);
+};
+
+function namedGetter(obj) {
+ return obj[this];
+}
+function indexedGetter(obj) {
+ var index = +this;
+ if (index < 0) index = Math.max(0, index + obj.length);
+ return obj[index];
+}
+Promise.prototype.get = function (propertyName) {
+ var isIndex = (typeof propertyName === "number");
+ var getter;
+ if (!isIndex) {
+ if (canEvaluate) {
+ var maybeGetter = getGetter(propertyName);
+ getter = maybeGetter !== null ? maybeGetter : namedGetter;
+ } else {
+ getter = namedGetter;
+ }
+ } else {
+ getter = indexedGetter;
+ }
+ return this._then(getter, undefined, undefined, propertyName, undefined);
+};
+};
+
+},{"./util.js":38}],6:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise) {
+var errors = _dereq_("./errors.js");
+var async = _dereq_("./async.js");
+var CancellationError = errors.CancellationError;
+
+Promise.prototype._cancel = function (reason) {
+ if (!this.isCancellable()) return this;
+ var parent;
+ var promiseToReject = this;
+ while ((parent = promiseToReject._cancellationParent) !== undefined &&
+ parent.isCancellable()) {
+ promiseToReject = parent;
+ }
+ this._unsetCancellable();
+ promiseToReject._target()._rejectCallback(reason, false, true);
+};
+
+Promise.prototype.cancel = function (reason) {
+ if (!this.isCancellable()) return this;
+ if (reason === undefined) reason = new CancellationError();
+ async.invokeLater(this._cancel, this, reason);
+ return this;
+};
+
+Promise.prototype.cancellable = function () {
+ if (this._cancellable()) return this;
+ async.enableTrampoline();
+ this._setCancellable();
+ this._cancellationParent = undefined;
+ return this;
+};
+
+Promise.prototype.uncancellable = function () {
+ var ret = this.then();
+ ret._unsetCancellable();
+ return ret;
+};
+
+Promise.prototype.fork = function (didFulfill, didReject, didProgress) {
+ var ret = this._then(didFulfill, didReject, didProgress,
+ undefined, undefined);
+
+ ret._setCancellable();
+ ret._cancellationParent = undefined;
+ return ret;
+};
+};
+
+},{"./async.js":2,"./errors.js":13}],7:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function() {
+var async = _dereq_("./async.js");
+var util = _dereq_("./util.js");
+var bluebirdFramePattern =
+ /[\\\/]bluebird[\\\/]js[\\\/](main|debug|zalgo|instrumented)/;
+var stackFramePattern = null;
+var formatStack = null;
+var indentStackFrames = false;
+var warn;
+
+function CapturedTrace(parent) {
+ this._parent = parent;
+ var length = this._length = 1 + (parent === undefined ? 0 : parent._length);
+ captureStackTrace(this, CapturedTrace);
+ if (length > 32) this.uncycle();
+}
+util.inherits(CapturedTrace, Error);
+
+CapturedTrace.prototype.uncycle = function() {
+ var length = this._length;
+ if (length < 2) return;
+ var nodes = [];
+ var stackToIndex = {};
+
+ for (var i = 0, node = this; node !== undefined; ++i) {
+ nodes.push(node);
+ node = node._parent;
+ }
+ length = this._length = i;
+ for (var i = length - 1; i >= 0; --i) {
+ var stack = nodes[i].stack;
+ if (stackToIndex[stack] === undefined) {
+ stackToIndex[stack] = i;
+ }
+ }
+ for (var i = 0; i < length; ++i) {
+ var currentStack = nodes[i].stack;
+ var index = stackToIndex[currentStack];
+ if (index !== undefined && index !== i) {
+ if (index > 0) {
+ nodes[index - 1]._parent = undefined;
+ nodes[index - 1]._length = 1;
+ }
+ nodes[i]._parent = undefined;
+ nodes[i]._length = 1;
+ var cycleEdgeNode = i > 0 ? nodes[i - 1] : this;
+
+ if (index < length - 1) {
+ cycleEdgeNode._parent = nodes[index + 1];
+ cycleEdgeNode._parent.uncycle();
+ cycleEdgeNode._length =
+ cycleEdgeNode._parent._length + 1;
+ } else {
+ cycleEdgeNode._parent = undefined;
+ cycleEdgeNode._length = 1;
+ }
+ var currentChildLength = cycleEdgeNode._length + 1;
+ for (var j = i - 2; j >= 0; --j) {
+ nodes[j]._length = currentChildLength;
+ currentChildLength++;
+ }
+ return;
+ }
+ }
+};
+
+CapturedTrace.prototype.parent = function() {
+ return this._parent;
+};
+
+CapturedTrace.prototype.hasParent = function() {
+ return this._parent !== undefined;
+};
+
+CapturedTrace.prototype.attachExtraTrace = function(error) {
+ if (error.__stackCleaned__) return;
+ this.uncycle();
+ var parsed = CapturedTrace.parseStackAndMessage(error);
+ var message = parsed.message;
+ var stacks = [parsed.stack];
+
+ var trace = this;
+ while (trace !== undefined) {
+ stacks.push(cleanStack(trace.stack.split("\n")));
+ trace = trace._parent;
+ }
+ removeCommonRoots(stacks);
+ removeDuplicateOrEmptyJumps(stacks);
+ util.notEnumerableProp(error, "stack", reconstructStack(message, stacks));
+ util.notEnumerableProp(error, "__stackCleaned__", true);
+};
+
+function reconstructStack(message, stacks) {
+ for (var i = 0; i < stacks.length - 1; ++i) {
+ stacks[i].push("From previous event:");
+ stacks[i] = stacks[i].join("\n");
+ }
+ if (i < stacks.length) {
+ stacks[i] = stacks[i].join("\n");
+ }
+ return message + "\n" + stacks.join("\n");
+}
+
+function removeDuplicateOrEmptyJumps(stacks) {
+ for (var i = 0; i < stacks.length; ++i) {
+ if (stacks[i].length === 0 ||
+ ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) {
+ stacks.splice(i, 1);
+ i--;
+ }
+ }
+}
+
+function removeCommonRoots(stacks) {
+ var current = stacks[0];
+ for (var i = 1; i < stacks.length; ++i) {
+ var prev = stacks[i];
+ var currentLastIndex = current.length - 1;
+ var currentLastLine = current[currentLastIndex];
+ var commonRootMeetPoint = -1;
+
+ for (var j = prev.length - 1; j >= 0; --j) {
+ if (prev[j] === currentLastLine) {
+ commonRootMeetPoint = j;
+ break;
+ }
+ }
+
+ for (var j = commonRootMeetPoint; j >= 0; --j) {
+ var line = prev[j];
+ if (current[currentLastIndex] === line) {
+ current.pop();
+ currentLastIndex--;
+ } else {
+ break;
+ }
+ }
+ current = prev;
+ }
+}
+
+function cleanStack(stack) {
+ var ret = [];
+ for (var i = 0; i < stack.length; ++i) {
+ var line = stack[i];
+ var isTraceLine = stackFramePattern.test(line) ||
+ " (No stack trace)" === line;
+ var isInternalFrame = isTraceLine && shouldIgnore(line);
+ if (isTraceLine && !isInternalFrame) {
+ if (indentStackFrames && line.charAt(0) !== " ") {
+ line = " " + line;
+ }
+ ret.push(line);
+ }
+ }
+ return ret;
+}
+
+function stackFramesAsArray(error) {
+ var stack = error.stack.replace(/\s+$/g, "").split("\n");
+ for (var i = 0; i < stack.length; ++i) {
+ var line = stack[i];
+ if (" (No stack trace)" === line || stackFramePattern.test(line)) {
+ break;
+ }
+ }
+ if (i > 0) {
+ stack = stack.slice(i);
+ }
+ return stack;
+}
+
+CapturedTrace.parseStackAndMessage = function(error) {
+ var stack = error.stack;
+ var message = error.toString();
+ stack = typeof stack === "string" && stack.length > 0
+ ? stackFramesAsArray(error) : [" (No stack trace)"];
+ return {
+ message: message,
+ stack: cleanStack(stack)
+ };
+};
+
+CapturedTrace.formatAndLogError = function(error, title) {
+ if (typeof console !== "undefined") {
+ var message;
+ if (typeof error === "object" || typeof error === "function") {
+ var stack = error.stack;
+ message = title + formatStack(stack, error);
+ } else {
+ message = title + String(error);
+ }
+ if (typeof warn === "function") {
+ warn(message);
+ } else if (typeof console.log === "function" ||
+ typeof console.log === "object") {
+ console.log(message);
+ }
+ }
+};
+
+CapturedTrace.unhandledRejection = function (reason) {
+ CapturedTrace.formatAndLogError(reason, "^--- With additional stack trace: ");
+};
+
+CapturedTrace.isSupported = function () {
+ return typeof captureStackTrace === "function";
+};
+
+CapturedTrace.fireRejectionEvent =
+function(name, localHandler, reason, promise) {
+ var localEventFired = false;
+ try {
+ if (typeof localHandler === "function") {
+ localEventFired = true;
+ if (name === "rejectionHandled") {
+ localHandler(promise);
+ } else {
+ localHandler(reason, promise);
+ }
+ }
+ } catch (e) {
+ async.throwLater(e);
+ }
+
+ var globalEventFired = false;
+ try {
+ globalEventFired = fireGlobalEvent(name, reason, promise);
+ } catch (e) {
+ globalEventFired = true;
+ async.throwLater(e);
+ }
+
+ var domEventFired = false;
+ if (fireDomEvent) {
+ try {
+ domEventFired = fireDomEvent(name.toLowerCase(), {
+ reason: reason,
+ promise: promise
+ });
+ } catch (e) {
+ domEventFired = true;
+ async.throwLater(e);
+ }
+ }
+
+ if (!globalEventFired && !localEventFired && !domEventFired &&
+ name === "unhandledRejection") {
+ CapturedTrace.formatAndLogError(reason, "Unhandled rejection ");
+ }
+};
+
+function formatNonError(obj) {
+ var str;
+ if (typeof obj === "function") {
+ str = "[function " +
+ (obj.name || "anonymous") +
+ "]";
+ } else {
+ str = obj.toString();
+ var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/;
+ if (ruselessToString.test(str)) {
+ try {
+ var newStr = JSON.stringify(obj);
+ str = newStr;
+ }
+ catch(e) {
+
+ }
+ }
+ if (str.length === 0) {
+ str = "(empty array)";
+ }
+ }
+ return ("(<" + snip(str) + ">, no stack trace)");
+}
+
+function snip(str) {
+ var maxChars = 41;
+ if (str.length < maxChars) {
+ return str;
+ }
+ return str.substr(0, maxChars - 3) + "...";
+}
+
+var shouldIgnore = function() { return false; };
+var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;
+function parseLineInfo(line) {
+ var matches = line.match(parseLineInfoRegex);
+ if (matches) {
+ return {
+ fileName: matches[1],
+ line: parseInt(matches[2], 10)
+ };
+ }
+}
+CapturedTrace.setBounds = function(firstLineError, lastLineError) {
+ if (!CapturedTrace.isSupported()) return;
+ var firstStackLines = firstLineError.stack.split("\n");
+ var lastStackLines = lastLineError.stack.split("\n");
+ var firstIndex = -1;
+ var lastIndex = -1;
+ var firstFileName;
+ var lastFileName;
+ for (var i = 0; i < firstStackLines.length; ++i) {
+ var result = parseLineInfo(firstStackLines[i]);
+ if (result) {
+ firstFileName = result.fileName;
+ firstIndex = result.line;
+ break;
+ }
+ }
+ for (var i = 0; i < lastStackLines.length; ++i) {
+ var result = parseLineInfo(lastStackLines[i]);
+ if (result) {
+ lastFileName = result.fileName;
+ lastIndex = result.line;
+ break;
+ }
+ }
+ if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName ||
+ firstFileName !== lastFileName || firstIndex >= lastIndex) {
+ return;
+ }
+
+ shouldIgnore = function(line) {
+ if (bluebirdFramePattern.test(line)) return true;
+ var info = parseLineInfo(line);
+ if (info) {
+ if (info.fileName === firstFileName &&
+ (firstIndex <= info.line && info.line <= lastIndex)) {
+ return true;
+ }
+ }
+ return false;
+ };
+};
+
+var captureStackTrace = (function stackDetection() {
+ var v8stackFramePattern = /^\s*at\s*/;
+ var v8stackFormatter = function(stack, error) {
+ if (typeof stack === "string") return stack;
+
+ if (error.name !== undefined &&
+ error.message !== undefined) {
+ return error.toString();
+ }
+ return formatNonError(error);
+ };
+
+ if (typeof Error.stackTraceLimit === "number" &&
+ typeof Error.captureStackTrace === "function") {
+ Error.stackTraceLimit = Error.stackTraceLimit + 6;
+ stackFramePattern = v8stackFramePattern;
+ formatStack = v8stackFormatter;
+ var captureStackTrace = Error.captureStackTrace;
+
+ shouldIgnore = function(line) {
+ return bluebirdFramePattern.test(line);
+ };
+ return function(receiver, ignoreUntil) {
+ Error.stackTraceLimit = Error.stackTraceLimit + 6;
+ captureStackTrace(receiver, ignoreUntil);
+ Error.stackTraceLimit = Error.stackTraceLimit - 6;
+ };
+ }
+ var err = new Error();
+
+ if (typeof err.stack === "string" &&
+ err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) {
+ stackFramePattern = /@/;
+ formatStack = v8stackFormatter;
+ indentStackFrames = true;
+ return function captureStackTrace(o) {
+ o.stack = new Error().stack;
+ };
+ }
+
+ var hasStackAfterThrow;
+ try { throw new Error(); }
+ catch(e) {
+ hasStackAfterThrow = ("stack" in e);
+ }
+ if (!("stack" in err) && hasStackAfterThrow &&
+ typeof Error.stackTraceLimit === "number") {
+ stackFramePattern = v8stackFramePattern;
+ formatStack = v8stackFormatter;
+ return function captureStackTrace(o) {
+ Error.stackTraceLimit = Error.stackTraceLimit + 6;
+ try { throw new Error(); }
+ catch(e) { o.stack = e.stack; }
+ Error.stackTraceLimit = Error.stackTraceLimit - 6;
+ };
+ }
+
+ formatStack = function(stack, error) {
+ if (typeof stack === "string") return stack;
+
+ if ((typeof error === "object" ||
+ typeof error === "function") &&
+ error.name !== undefined &&
+ error.message !== undefined) {
+ return error.toString();
+ }
+ return formatNonError(error);
+ };
+
+ return null;
+
+})([]);
+
+var fireDomEvent;
+var fireGlobalEvent = (function() {
+ if (util.isNode) {
+ return function(name, reason, promise) {
+ if (name === "rejectionHandled") {
+ return process.emit(name, promise);
+ } else {
+ return process.emit(name, reason, promise);
+ }
+ };
+ } else {
+ var customEventWorks = false;
+ var anyEventWorks = true;
+ try {
+ var ev = new self.CustomEvent("test");
+ customEventWorks = ev instanceof CustomEvent;
+ } catch (e) {}
+ if (!customEventWorks) {
+ try {
+ var event = document.createEvent("CustomEvent");
+ event.initCustomEvent("testingtheevent", false, true, {});
+ self.dispatchEvent(event);
+ } catch (e) {
+ anyEventWorks = false;
+ }
+ }
+ if (anyEventWorks) {
+ fireDomEvent = function(type, detail) {
+ var event;
+ if (customEventWorks) {
+ event = new self.CustomEvent(type, {
+ detail: detail,
+ bubbles: false,
+ cancelable: true
+ });
+ } else if (self.dispatchEvent) {
+ event = document.createEvent("CustomEvent");
+ event.initCustomEvent(type, false, true, detail);
+ }
+
+ return event ? !self.dispatchEvent(event) : false;
+ };
+ }
+
+ var toWindowMethodNameMap = {};
+ toWindowMethodNameMap["unhandledRejection"] = ("on" +
+ "unhandledRejection").toLowerCase();
+ toWindowMethodNameMap["rejectionHandled"] = ("on" +
+ "rejectionHandled").toLowerCase();
+
+ return function(name, reason, promise) {
+ var methodName = toWindowMethodNameMap[name];
+ var method = self[methodName];
+ if (!method) return false;
+ if (name === "rejectionHandled") {
+ method.call(self, promise);
+ } else {
+ method.call(self, reason, promise);
+ }
+ return true;
+ };
+ }
+})();
+
+if (typeof console !== "undefined" && typeof console.warn !== "undefined") {
+ warn = function (message) {
+ console.warn(message);
+ };
+ if (util.isNode && process.stderr.isTTY) {
+ warn = function(message) {
+ process.stderr.write("\u001b[31m" + message + "\u001b[39m\n");
+ };
+ } else if (!util.isNode && typeof (new Error().stack) === "string") {
+ warn = function(message) {
+ console.warn("%c" + message, "color: red");
+ };
+ }
+}
+
+return CapturedTrace;
+};
+
+},{"./async.js":2,"./util.js":38}],8:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(NEXT_FILTER) {
+var util = _dereq_("./util.js");
+var errors = _dereq_("./errors.js");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+var keys = _dereq_("./es5.js").keys;
+var TypeError = errors.TypeError;
+
+function CatchFilter(instances, callback, promise) {
+ this._instances = instances;
+ this._callback = callback;
+ this._promise = promise;
+}
+
+function safePredicate(predicate, e) {
+ var safeObject = {};
+ var retfilter = tryCatch(predicate).call(safeObject, e);
+
+ if (retfilter === errorObj) return retfilter;
+
+ var safeKeys = keys(safeObject);
+ if (safeKeys.length) {
+ errorObj.e = new TypeError("Catch filter must inherit from Error or be a simple predicate function\u000a\u000a See http://goo.gl/o84o68\u000a");
+ return errorObj;
+ }
+ return retfilter;
+}
+
+CatchFilter.prototype.doFilter = function (e) {
+ var cb = this._callback;
+ var promise = this._promise;
+ var boundTo = promise._boundValue();
+ for (var i = 0, len = this._instances.length; i < len; ++i) {
+ var item = this._instances[i];
+ var itemIsErrorType = item === Error ||
+ (item != null && item.prototype instanceof Error);
+
+ if (itemIsErrorType && e instanceof item) {
+ var ret = tryCatch(cb).call(boundTo, e);
+ if (ret === errorObj) {
+ NEXT_FILTER.e = ret.e;
+ return NEXT_FILTER;
+ }
+ return ret;
+ } else if (typeof item === "function" && !itemIsErrorType) {
+ var shouldHandle = safePredicate(item, e);
+ if (shouldHandle === errorObj) {
+ e = errorObj.e;
+ break;
+ } else if (shouldHandle) {
+ var ret = tryCatch(cb).call(boundTo, e);
+ if (ret === errorObj) {
+ NEXT_FILTER.e = ret.e;
+ return NEXT_FILTER;
+ }
+ return ret;
+ }
+ }
+ }
+ NEXT_FILTER.e = e;
+ return NEXT_FILTER;
+};
+
+return CatchFilter;
+};
+
+},{"./errors.js":13,"./es5.js":14,"./util.js":38}],9:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, CapturedTrace, isDebugging) {
+var contextStack = [];
+function Context() {
+ this._trace = new CapturedTrace(peekContext());
+}
+Context.prototype._pushContext = function () {
+ if (!isDebugging()) return;
+ if (this._trace !== undefined) {
+ contextStack.push(this._trace);
+ }
+};
+
+Context.prototype._popContext = function () {
+ if (!isDebugging()) return;
+ if (this._trace !== undefined) {
+ contextStack.pop();
+ }
+};
+
+function createContext() {
+ if (isDebugging()) return new Context();
+}
+
+function peekContext() {
+ var lastIndex = contextStack.length - 1;
+ if (lastIndex >= 0) {
+ return contextStack[lastIndex];
+ }
+ return undefined;
+}
+
+Promise.prototype._peekContext = peekContext;
+Promise.prototype._pushContext = Context.prototype._pushContext;
+Promise.prototype._popContext = Context.prototype._popContext;
+
+return createContext;
+};
+
+},{}],10:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, CapturedTrace) {
+var getDomain = Promise._getDomain;
+var async = _dereq_("./async.js");
+var Warning = _dereq_("./errors.js").Warning;
+var util = _dereq_("./util.js");
+var canAttachTrace = util.canAttachTrace;
+var unhandledRejectionHandled;
+var possiblyUnhandledRejection;
+var debugging = false || (util.isNode &&
+ (!!process.env["BLUEBIRD_DEBUG"] ||
+ process.env["NODE_ENV"] === "development"));
+
+if (util.isNode && process.env["BLUEBIRD_DEBUG"] == 0) debugging = false;
+
+if (debugging) {
+ async.disableTrampolineIfNecessary();
+}
+
+Promise.prototype._ignoreRejections = function() {
+ this._unsetRejectionIsUnhandled();
+ this._bitField = this._bitField | 16777216;
+};
+
+Promise.prototype._ensurePossibleRejectionHandled = function () {
+ if ((this._bitField & 16777216) !== 0) return;
+ this._setRejectionIsUnhandled();
+ async.invokeLater(this._notifyUnhandledRejection, this, undefined);
+};
+
+Promise.prototype._notifyUnhandledRejectionIsHandled = function () {
+ CapturedTrace.fireRejectionEvent("rejectionHandled",
+ unhandledRejectionHandled, undefined, this);
+};
+
+Promise.prototype._notifyUnhandledRejection = function () {
+ if (this._isRejectionUnhandled()) {
+ var reason = this._getCarriedStackTrace() || this._settledValue;
+ this._setUnhandledRejectionIsNotified();
+ CapturedTrace.fireRejectionEvent("unhandledRejection",
+ possiblyUnhandledRejection, reason, this);
+ }
+};
+
+Promise.prototype._setUnhandledRejectionIsNotified = function () {
+ this._bitField = this._bitField | 524288;
+};
+
+Promise.prototype._unsetUnhandledRejectionIsNotified = function () {
+ this._bitField = this._bitField & (~524288);
+};
+
+Promise.prototype._isUnhandledRejectionNotified = function () {
+ return (this._bitField & 524288) > 0;
+};
+
+Promise.prototype._setRejectionIsUnhandled = function () {
+ this._bitField = this._bitField | 2097152;
+};
+
+Promise.prototype._unsetRejectionIsUnhandled = function () {
+ this._bitField = this._bitField & (~2097152);
+ if (this._isUnhandledRejectionNotified()) {
+ this._unsetUnhandledRejectionIsNotified();
+ this._notifyUnhandledRejectionIsHandled();
+ }
+};
+
+Promise.prototype._isRejectionUnhandled = function () {
+ return (this._bitField & 2097152) > 0;
+};
+
+Promise.prototype._setCarriedStackTrace = function (capturedTrace) {
+ this._bitField = this._bitField | 1048576;
+ this._fulfillmentHandler0 = capturedTrace;
+};
+
+Promise.prototype._isCarryingStackTrace = function () {
+ return (this._bitField & 1048576) > 0;
+};
+
+Promise.prototype._getCarriedStackTrace = function () {
+ return this._isCarryingStackTrace()
+ ? this._fulfillmentHandler0
+ : undefined;
+};
+
+Promise.prototype._captureStackTrace = function () {
+ if (debugging) {
+ this._trace = new CapturedTrace(this._peekContext());
+ }
+ return this;
+};
+
+Promise.prototype._attachExtraTrace = function (error, ignoreSelf) {
+ if (debugging && canAttachTrace(error)) {
+ var trace = this._trace;
+ if (trace !== undefined) {
+ if (ignoreSelf) trace = trace._parent;
+ }
+ if (trace !== undefined) {
+ trace.attachExtraTrace(error);
+ } else if (!error.__stackCleaned__) {
+ var parsed = CapturedTrace.parseStackAndMessage(error);
+ util.notEnumerableProp(error, "stack",
+ parsed.message + "\n" + parsed.stack.join("\n"));
+ util.notEnumerableProp(error, "__stackCleaned__", true);
+ }
+ }
+};
+
+Promise.prototype._warn = function(message) {
+ var warning = new Warning(message);
+ var ctx = this._peekContext();
+ if (ctx) {
+ ctx.attachExtraTrace(warning);
+ } else {
+ var parsed = CapturedTrace.parseStackAndMessage(warning);
+ warning.stack = parsed.message + "\n" + parsed.stack.join("\n");
+ }
+ CapturedTrace.formatAndLogError(warning, "");
+};
+
+Promise.onPossiblyUnhandledRejection = function (fn) {
+ var domain = getDomain();
+ possiblyUnhandledRejection =
+ typeof fn === "function" ? (domain === null ? fn : domain.bind(fn))
+ : undefined;
+};
+
+Promise.onUnhandledRejectionHandled = function (fn) {
+ var domain = getDomain();
+ unhandledRejectionHandled =
+ typeof fn === "function" ? (domain === null ? fn : domain.bind(fn))
+ : undefined;
+};
+
+Promise.longStackTraces = function () {
+ if (async.haveItemsQueued() &&
+ debugging === false
+ ) {
+ throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/DT1qyG\u000a");
+ }
+ debugging = CapturedTrace.isSupported();
+ if (debugging) {
+ async.disableTrampolineIfNecessary();
+ }
+};
+
+Promise.hasLongStackTraces = function () {
+ return debugging && CapturedTrace.isSupported();
+};
+
+if (!CapturedTrace.isSupported()) {
+ Promise.longStackTraces = function(){};
+ debugging = false;
+}
+
+return function() {
+ return debugging;
+};
+};
+
+},{"./async.js":2,"./errors.js":13,"./util.js":38}],11:[function(_dereq_,module,exports){
+"use strict";
+var util = _dereq_("./util.js");
+var isPrimitive = util.isPrimitive;
+
+module.exports = function(Promise) {
+var returner = function () {
+ return this;
+};
+var thrower = function () {
+ throw this;
+};
+var returnUndefined = function() {};
+var throwUndefined = function() {
+ throw undefined;
+};
+
+var wrapper = function (value, action) {
+ if (action === 1) {
+ return function () {
+ throw value;
+ };
+ } else if (action === 2) {
+ return function () {
+ return value;
+ };
+ }
+};
+
+
+Promise.prototype["return"] =
+Promise.prototype.thenReturn = function (value) {
+ if (value === undefined) return this.then(returnUndefined);
+
+ if (isPrimitive(value)) {
+ return this._then(
+ wrapper(value, 2),
+ undefined,
+ undefined,
+ undefined,
+ undefined
+ );
+ } else if (value instanceof Promise) {
+ value._ignoreRejections();
+ }
+ return this._then(returner, undefined, undefined, value, undefined);
+};
+
+Promise.prototype["throw"] =
+Promise.prototype.thenThrow = function (reason) {
+ if (reason === undefined) return this.then(throwUndefined);
+
+ if (isPrimitive(reason)) {
+ return this._then(
+ wrapper(reason, 1),
+ undefined,
+ undefined,
+ undefined,
+ undefined
+ );
+ }
+ return this._then(thrower, undefined, undefined, reason, undefined);
+};
+};
+
+},{"./util.js":38}],12:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var PromiseReduce = Promise.reduce;
+
+Promise.prototype.each = function (fn) {
+ return PromiseReduce(this, fn, null, INTERNAL);
+};
+
+Promise.each = function (promises, fn) {
+ return PromiseReduce(promises, fn, null, INTERNAL);
+};
+};
+
+},{}],13:[function(_dereq_,module,exports){
+"use strict";
+var es5 = _dereq_("./es5.js");
+var Objectfreeze = es5.freeze;
+var util = _dereq_("./util.js");
+var inherits = util.inherits;
+var notEnumerableProp = util.notEnumerableProp;
+
+function subError(nameProperty, defaultMessage) {
+ function SubError(message) {
+ if (!(this instanceof SubError)) return new SubError(message);
+ notEnumerableProp(this, "message",
+ typeof message === "string" ? message : defaultMessage);
+ notEnumerableProp(this, "name", nameProperty);
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ } else {
+ Error.call(this);
+ }
+ }
+ inherits(SubError, Error);
+ return SubError;
+}
+
+var _TypeError, _RangeError;
+var Warning = subError("Warning", "warning");
+var CancellationError = subError("CancellationError", "cancellation error");
+var TimeoutError = subError("TimeoutError", "timeout error");
+var AggregateError = subError("AggregateError", "aggregate error");
+try {
+ _TypeError = TypeError;
+ _RangeError = RangeError;
+} catch(e) {
+ _TypeError = subError("TypeError", "type error");
+ _RangeError = subError("RangeError", "range error");
+}
+
+var methods = ("join pop push shift unshift slice filter forEach some " +
+ "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" ");
+
+for (var i = 0; i < methods.length; ++i) {
+ if (typeof Array.prototype[methods[i]] === "function") {
+ AggregateError.prototype[methods[i]] = Array.prototype[methods[i]];
+ }
+}
+
+es5.defineProperty(AggregateError.prototype, "length", {
+ value: 0,
+ configurable: false,
+ writable: true,
+ enumerable: true
+});
+AggregateError.prototype["isOperational"] = true;
+var level = 0;
+AggregateError.prototype.toString = function() {
+ var indent = Array(level * 4 + 1).join(" ");
+ var ret = "\n" + indent + "AggregateError of:" + "\n";
+ level++;
+ indent = Array(level * 4 + 1).join(" ");
+ for (var i = 0; i < this.length; ++i) {
+ var str = this[i] === this ? "[Circular AggregateError]" : this[i] + "";
+ var lines = str.split("\n");
+ for (var j = 0; j < lines.length; ++j) {
+ lines[j] = indent + lines[j];
+ }
+ str = lines.join("\n");
+ ret += str + "\n";
+ }
+ level--;
+ return ret;
+};
+
+function OperationalError(message) {
+ if (!(this instanceof OperationalError))
+ return new OperationalError(message);
+ notEnumerableProp(this, "name", "OperationalError");
+ notEnumerableProp(this, "message", message);
+ this.cause = message;
+ this["isOperational"] = true;
+
+ if (message instanceof Error) {
+ notEnumerableProp(this, "message", message.message);
+ notEnumerableProp(this, "stack", message.stack);
+ } else if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ }
+
+}
+inherits(OperationalError, Error);
+
+var errorTypes = Error["__BluebirdErrorTypes__"];
+if (!errorTypes) {
+ errorTypes = Objectfreeze({
+ CancellationError: CancellationError,
+ TimeoutError: TimeoutError,
+ OperationalError: OperationalError,
+ RejectionError: OperationalError,
+ AggregateError: AggregateError
+ });
+ notEnumerableProp(Error, "__BluebirdErrorTypes__", errorTypes);
+}
+
+module.exports = {
+ Error: Error,
+ TypeError: _TypeError,
+ RangeError: _RangeError,
+ CancellationError: errorTypes.CancellationError,
+ OperationalError: errorTypes.OperationalError,
+ TimeoutError: errorTypes.TimeoutError,
+ AggregateError: errorTypes.AggregateError,
+ Warning: Warning
+};
+
+},{"./es5.js":14,"./util.js":38}],14:[function(_dereq_,module,exports){
+var isES5 = (function(){
+ "use strict";
+ return this === undefined;
+})();
+
+if (isES5) {
+ module.exports = {
+ freeze: Object.freeze,
+ defineProperty: Object.defineProperty,
+ getDescriptor: Object.getOwnPropertyDescriptor,
+ keys: Object.keys,
+ names: Object.getOwnPropertyNames,
+ getPrototypeOf: Object.getPrototypeOf,
+ isArray: Array.isArray,
+ isES5: isES5,
+ propertyIsWritable: function(obj, prop) {
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop);
+ return !!(!descriptor || descriptor.writable || descriptor.set);
+ }
+ };
+} else {
+ var has = {}.hasOwnProperty;
+ var str = {}.toString;
+ var proto = {}.constructor.prototype;
+
+ var ObjectKeys = function (o) {
+ var ret = [];
+ for (var key in o) {
+ if (has.call(o, key)) {
+ ret.push(key);
+ }
+ }
+ return ret;
+ };
+
+ var ObjectGetDescriptor = function(o, key) {
+ return {value: o[key]};
+ };
+
+ var ObjectDefineProperty = function (o, key, desc) {
+ o[key] = desc.value;
+ return o;
+ };
+
+ var ObjectFreeze = function (obj) {
+ return obj;
+ };
+
+ var ObjectGetPrototypeOf = function (obj) {
+ try {
+ return Object(obj).constructor.prototype;
+ }
+ catch (e) {
+ return proto;
+ }
+ };
+
+ var ArrayIsArray = function (obj) {
+ try {
+ return str.call(obj) === "[object Array]";
+ }
+ catch(e) {
+ return false;
+ }
+ };
+
+ module.exports = {
+ isArray: ArrayIsArray,
+ keys: ObjectKeys,
+ names: ObjectKeys,
+ defineProperty: ObjectDefineProperty,
+ getDescriptor: ObjectGetDescriptor,
+ freeze: ObjectFreeze,
+ getPrototypeOf: ObjectGetPrototypeOf,
+ isES5: isES5,
+ propertyIsWritable: function() {
+ return true;
+ }
+ };
+}
+
+},{}],15:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var PromiseMap = Promise.map;
+
+Promise.prototype.filter = function (fn, options) {
+ return PromiseMap(this, fn, options, INTERNAL);
+};
+
+Promise.filter = function (promises, fn, options) {
+ return PromiseMap(promises, fn, options, INTERNAL);
+};
+};
+
+},{}],16:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, NEXT_FILTER, tryConvertToPromise) {
+var util = _dereq_("./util.js");
+var isPrimitive = util.isPrimitive;
+var thrower = util.thrower;
+
+function returnThis() {
+ return this;
+}
+function throwThis() {
+ throw this;
+}
+function return$(r) {
+ return function() {
+ return r;
+ };
+}
+function throw$(r) {
+ return function() {
+ throw r;
+ };
+}
+function promisedFinally(ret, reasonOrValue, isFulfilled) {
+ var then;
+ if (isPrimitive(reasonOrValue)) {
+ then = isFulfilled ? return$(reasonOrValue) : throw$(reasonOrValue);
+ } else {
+ then = isFulfilled ? returnThis : throwThis;
+ }
+ return ret._then(then, thrower, undefined, reasonOrValue, undefined);
+}
+
+function finallyHandler(reasonOrValue) {
+ var promise = this.promise;
+ var handler = this.handler;
+
+ var ret = promise._isBound()
+ ? handler.call(promise._boundValue())
+ : handler();
+
+ if (ret !== undefined) {
+ var maybePromise = tryConvertToPromise(ret, promise);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ return promisedFinally(maybePromise, reasonOrValue,
+ promise.isFulfilled());
+ }
+ }
+
+ if (promise.isRejected()) {
+ NEXT_FILTER.e = reasonOrValue;
+ return NEXT_FILTER;
+ } else {
+ return reasonOrValue;
+ }
+}
+
+function tapHandler(value) {
+ var promise = this.promise;
+ var handler = this.handler;
+
+ var ret = promise._isBound()
+ ? handler.call(promise._boundValue(), value)
+ : handler(value);
+
+ if (ret !== undefined) {
+ var maybePromise = tryConvertToPromise(ret, promise);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ return promisedFinally(maybePromise, value, true);
+ }
+ }
+ return value;
+}
+
+Promise.prototype._passThroughHandler = function (handler, isFinally) {
+ if (typeof handler !== "function") return this.then();
+
+ var promiseAndHandler = {
+ promise: this,
+ handler: handler
+ };
+
+ return this._then(
+ isFinally ? finallyHandler : tapHandler,
+ isFinally ? finallyHandler : undefined, undefined,
+ promiseAndHandler, undefined);
+};
+
+Promise.prototype.lastly =
+Promise.prototype["finally"] = function (handler) {
+ return this._passThroughHandler(handler, true);
+};
+
+Promise.prototype.tap = function (handler) {
+ return this._passThroughHandler(handler, false);
+};
+};
+
+},{"./util.js":38}],17:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise,
+ apiRejection,
+ INTERNAL,
+ tryConvertToPromise) {
+var errors = _dereq_("./errors.js");
+var TypeError = errors.TypeError;
+var util = _dereq_("./util.js");
+var errorObj = util.errorObj;
+var tryCatch = util.tryCatch;
+var yieldHandlers = [];
+
+function promiseFromYieldHandler(value, yieldHandlers, traceParent) {
+ for (var i = 0; i < yieldHandlers.length; ++i) {
+ traceParent._pushContext();
+ var result = tryCatch(yieldHandlers[i])(value);
+ traceParent._popContext();
+ if (result === errorObj) {
+ traceParent._pushContext();
+ var ret = Promise.reject(errorObj.e);
+ traceParent._popContext();
+ return ret;
+ }
+ var maybePromise = tryConvertToPromise(result, traceParent);
+ if (maybePromise instanceof Promise) return maybePromise;
+ }
+ return null;
+}
+
+function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) {
+ var promise = this._promise = new Promise(INTERNAL);
+ promise._captureStackTrace();
+ this._stack = stack;
+ this._generatorFunction = generatorFunction;
+ this._receiver = receiver;
+ this._generator = undefined;
+ this._yieldHandlers = typeof yieldHandler === "function"
+ ? [yieldHandler].concat(yieldHandlers)
+ : yieldHandlers;
+}
+
+PromiseSpawn.prototype.promise = function () {
+ return this._promise;
+};
+
+PromiseSpawn.prototype._run = function () {
+ this._generator = this._generatorFunction.call(this._receiver);
+ this._receiver =
+ this._generatorFunction = undefined;
+ this._next(undefined);
+};
+
+PromiseSpawn.prototype._continue = function (result) {
+ if (result === errorObj) {
+ return this._promise._rejectCallback(result.e, false, true);
+ }
+
+ var value = result.value;
+ if (result.done === true) {
+ this._promise._resolveCallback(value);
+ } else {
+ var maybePromise = tryConvertToPromise(value, this._promise);
+ if (!(maybePromise instanceof Promise)) {
+ maybePromise =
+ promiseFromYieldHandler(maybePromise,
+ this._yieldHandlers,
+ this._promise);
+ if (maybePromise === null) {
+ this._throw(
+ new TypeError(
+ "A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/4Y4pDk\u000a\u000a".replace("%s", value) +
+ "From coroutine:\u000a" +
+ this._stack.split("\n").slice(1, -7).join("\n")
+ )
+ );
+ return;
+ }
+ }
+ maybePromise._then(
+ this._next,
+ this._throw,
+ undefined,
+ this,
+ null
+ );
+ }
+};
+
+PromiseSpawn.prototype._throw = function (reason) {
+ this._promise._attachExtraTrace(reason);
+ this._promise._pushContext();
+ var result = tryCatch(this._generator["throw"])
+ .call(this._generator, reason);
+ this._promise._popContext();
+ this._continue(result);
+};
+
+PromiseSpawn.prototype._next = function (value) {
+ this._promise._pushContext();
+ var result = tryCatch(this._generator.next).call(this._generator, value);
+ this._promise._popContext();
+ this._continue(result);
+};
+
+Promise.coroutine = function (generatorFunction, options) {
+ if (typeof generatorFunction !== "function") {
+ throw new TypeError("generatorFunction must be a function\u000a\u000a See http://goo.gl/6Vqhm0\u000a");
+ }
+ var yieldHandler = Object(options).yieldHandler;
+ var PromiseSpawn$ = PromiseSpawn;
+ var stack = new Error().stack;
+ return function () {
+ var generator = generatorFunction.apply(this, arguments);
+ var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler,
+ stack);
+ spawn._generator = generator;
+ spawn._next(undefined);
+ return spawn.promise();
+ };
+};
+
+Promise.coroutine.addYieldHandler = function(fn) {
+ if (typeof fn !== "function") throw new TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ yieldHandlers.push(fn);
+};
+
+Promise.spawn = function (generatorFunction) {
+ if (typeof generatorFunction !== "function") {
+ return apiRejection("generatorFunction must be a function\u000a\u000a See http://goo.gl/6Vqhm0\u000a");
+ }
+ var spawn = new PromiseSpawn(generatorFunction, this);
+ var ret = spawn.promise();
+ spawn._run(Promise.spawn);
+ return ret;
+};
+};
+
+},{"./errors.js":13,"./util.js":38}],18:[function(_dereq_,module,exports){
+"use strict";
+module.exports =
+function(Promise, PromiseArray, tryConvertToPromise, INTERNAL) {
+var util = _dereq_("./util.js");
+var canEvaluate = util.canEvaluate;
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+var reject;
+
+if (!true) {
+if (canEvaluate) {
+ var thenCallback = function(i) {
+ return new Function("value", "holder", " \n\
+ 'use strict'; \n\
+ holder.pIndex = value; \n\
+ holder.checkFulfillment(this); \n\
+ ".replace(/Index/g, i));
+ };
+
+ var caller = function(count) {
+ var values = [];
+ for (var i = 1; i <= count; ++i) values.push("holder.p" + i);
+ return new Function("holder", " \n\
+ 'use strict'; \n\
+ var callback = holder.fn; \n\
+ return callback(values); \n\
+ ".replace(/values/g, values.join(", ")));
+ };
+ var thenCallbacks = [];
+ var callers = [undefined];
+ for (var i = 1; i <= 5; ++i) {
+ thenCallbacks.push(thenCallback(i));
+ callers.push(caller(i));
+ }
+
+ var Holder = function(total, fn) {
+ this.p1 = this.p2 = this.p3 = this.p4 = this.p5 = null;
+ this.fn = fn;
+ this.total = total;
+ this.now = 0;
+ };
+
+ Holder.prototype.callers = callers;
+ Holder.prototype.checkFulfillment = function(promise) {
+ var now = this.now;
+ now++;
+ var total = this.total;
+ if (now >= total) {
+ var handler = this.callers[total];
+ promise._pushContext();
+ var ret = tryCatch(handler)(this);
+ promise._popContext();
+ if (ret === errorObj) {
+ promise._rejectCallback(ret.e, false, true);
+ } else {
+ promise._resolveCallback(ret);
+ }
+ } else {
+ this.now = now;
+ }
+ };
+
+ var reject = function (reason) {
+ this._reject(reason);
+ };
+}
+}
+
+Promise.join = function () {
+ var last = arguments.length - 1;
+ var fn;
+ if (last > 0 && typeof arguments[last] === "function") {
+ fn = arguments[last];
+ if (!true) {
+ if (last < 6 && canEvaluate) {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ var holder = new Holder(last, fn);
+ var callbacks = thenCallbacks;
+ for (var i = 0; i < last; ++i) {
+ var maybePromise = tryConvertToPromise(arguments[i], ret);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ if (maybePromise._isPending()) {
+ maybePromise._then(callbacks[i], reject,
+ undefined, ret, holder);
+ } else if (maybePromise._isFulfilled()) {
+ callbacks[i].call(ret,
+ maybePromise._value(), holder);
+ } else {
+ ret._reject(maybePromise._reason());
+ }
+ } else {
+ callbacks[i].call(ret, maybePromise, holder);
+ }
+ }
+ return ret;
+ }
+ }
+ }
+ var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len; ++$_i) {args[$_i] = arguments[$_i];}
+ if (fn) args.pop();
+ var ret = new PromiseArray(args).promise();
+ return fn !== undefined ? ret.spread(fn) : ret;
+};
+
+};
+
+},{"./util.js":38}],19:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise,
+ PromiseArray,
+ apiRejection,
+ tryConvertToPromise,
+ INTERNAL) {
+var getDomain = Promise._getDomain;
+var async = _dereq_("./async.js");
+var util = _dereq_("./util.js");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+var PENDING = {};
+var EMPTY_ARRAY = [];
+
+function MappingPromiseArray(promises, fn, limit, _filter) {
+ this.constructor$(promises);
+ this._promise._captureStackTrace();
+ var domain = getDomain();
+ this._callback = domain === null ? fn : domain.bind(fn);
+ this._preservedValues = _filter === INTERNAL
+ ? new Array(this.length())
+ : null;
+ this._limit = limit;
+ this._inFlight = 0;
+ this._queue = limit >= 1 ? [] : EMPTY_ARRAY;
+ async.invoke(init, this, undefined);
+}
+util.inherits(MappingPromiseArray, PromiseArray);
+function init() {this._init$(undefined, -2);}
+
+MappingPromiseArray.prototype._init = function () {};
+
+MappingPromiseArray.prototype._promiseFulfilled = function (value, index) {
+ var values = this._values;
+ var length = this.length();
+ var preservedValues = this._preservedValues;
+ var limit = this._limit;
+ if (values[index] === PENDING) {
+ values[index] = value;
+ if (limit >= 1) {
+ this._inFlight--;
+ this._drainQueue();
+ if (this._isResolved()) return;
+ }
+ } else {
+ if (limit >= 1 && this._inFlight >= limit) {
+ values[index] = value;
+ this._queue.push(index);
+ return;
+ }
+ if (preservedValues !== null) preservedValues[index] = value;
+
+ var callback = this._callback;
+ var receiver = this._promise._boundValue();
+ this._promise._pushContext();
+ var ret = tryCatch(callback).call(receiver, value, index, length);
+ this._promise._popContext();
+ if (ret === errorObj) return this._reject(ret.e);
+
+ var maybePromise = tryConvertToPromise(ret, this._promise);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ if (maybePromise._isPending()) {
+ if (limit >= 1) this._inFlight++;
+ values[index] = PENDING;
+ return maybePromise._proxyPromiseArray(this, index);
+ } else if (maybePromise._isFulfilled()) {
+ ret = maybePromise._value();
+ } else {
+ return this._reject(maybePromise._reason());
+ }
+ }
+ values[index] = ret;
+ }
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= length) {
+ if (preservedValues !== null) {
+ this._filter(values, preservedValues);
+ } else {
+ this._resolve(values);
+ }
+
+ }
+};
+
+MappingPromiseArray.prototype._drainQueue = function () {
+ var queue = this._queue;
+ var limit = this._limit;
+ var values = this._values;
+ while (queue.length > 0 && this._inFlight < limit) {
+ if (this._isResolved()) return;
+ var index = queue.pop();
+ this._promiseFulfilled(values[index], index);
+ }
+};
+
+MappingPromiseArray.prototype._filter = function (booleans, values) {
+ var len = values.length;
+ var ret = new Array(len);
+ var j = 0;
+ for (var i = 0; i < len; ++i) {
+ if (booleans[i]) ret[j++] = values[i];
+ }
+ ret.length = j;
+ this._resolve(ret);
+};
+
+MappingPromiseArray.prototype.preservedValues = function () {
+ return this._preservedValues;
+};
+
+function map(promises, fn, options, _filter) {
+ var limit = typeof options === "object" && options !== null
+ ? options.concurrency
+ : 0;
+ limit = typeof limit === "number" &&
+ isFinite(limit) && limit >= 1 ? limit : 0;
+ return new MappingPromiseArray(promises, fn, limit, _filter);
+}
+
+Promise.prototype.map = function (fn, options) {
+ if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+
+ return map(this, fn, options, null).promise();
+};
+
+Promise.map = function (promises, fn, options, _filter) {
+ if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ return map(promises, fn, options, _filter).promise();
+};
+
+
+};
+
+},{"./async.js":2,"./util.js":38}],20:[function(_dereq_,module,exports){
+"use strict";
+module.exports =
+function(Promise, INTERNAL, tryConvertToPromise, apiRejection) {
+var util = _dereq_("./util.js");
+var tryCatch = util.tryCatch;
+
+Promise.method = function (fn) {
+ if (typeof fn !== "function") {
+ throw new Promise.TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ }
+ return function () {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._pushContext();
+ var value = tryCatch(fn).apply(this, arguments);
+ ret._popContext();
+ ret._resolveFromSyncValue(value);
+ return ret;
+ };
+};
+
+Promise.attempt = Promise["try"] = function (fn, args, ctx) {
+ if (typeof fn !== "function") {
+ return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ }
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._pushContext();
+ var value = util.isArray(args)
+ ? tryCatch(fn).apply(ctx, args)
+ : tryCatch(fn).call(ctx, args);
+ ret._popContext();
+ ret._resolveFromSyncValue(value);
+ return ret;
+};
+
+Promise.prototype._resolveFromSyncValue = function (value) {
+ if (value === util.errorObj) {
+ this._rejectCallback(value.e, false, true);
+ } else {
+ this._resolveCallback(value, true);
+ }
+};
+};
+
+},{"./util.js":38}],21:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise) {
+var util = _dereq_("./util.js");
+var async = _dereq_("./async.js");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+
+function spreadAdapter(val, nodeback) {
+ var promise = this;
+ if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback);
+ var ret =
+ tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val));
+ if (ret === errorObj) {
+ async.throwLater(ret.e);
+ }
+}
+
+function successAdapter(val, nodeback) {
+ var promise = this;
+ var receiver = promise._boundValue();
+ var ret = val === undefined
+ ? tryCatch(nodeback).call(receiver, null)
+ : tryCatch(nodeback).call(receiver, null, val);
+ if (ret === errorObj) {
+ async.throwLater(ret.e);
+ }
+}
+function errorAdapter(reason, nodeback) {
+ var promise = this;
+ if (!reason) {
+ var target = promise._target();
+ var newReason = target._getCarriedStackTrace();
+ newReason.cause = reason;
+ reason = newReason;
+ }
+ var ret = tryCatch(nodeback).call(promise._boundValue(), reason);
+ if (ret === errorObj) {
+ async.throwLater(ret.e);
+ }
+}
+
+Promise.prototype.asCallback =
+Promise.prototype.nodeify = function (nodeback, options) {
+ if (typeof nodeback == "function") {
+ var adapter = successAdapter;
+ if (options !== undefined && Object(options).spread) {
+ adapter = spreadAdapter;
+ }
+ this._then(
+ adapter,
+ errorAdapter,
+ undefined,
+ this,
+ nodeback
+ );
+ }
+ return this;
+};
+};
+
+},{"./async.js":2,"./util.js":38}],22:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, PromiseArray) {
+var util = _dereq_("./util.js");
+var async = _dereq_("./async.js");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+
+Promise.prototype.progressed = function (handler) {
+ return this._then(undefined, undefined, handler, undefined, undefined);
+};
+
+Promise.prototype._progress = function (progressValue) {
+ if (this._isFollowingOrFulfilledOrRejected()) return;
+ this._target()._progressUnchecked(progressValue);
+
+};
+
+Promise.prototype._progressHandlerAt = function (index) {
+ return index === 0
+ ? this._progressHandler0
+ : this[(index << 2) + index - 5 + 2];
+};
+
+Promise.prototype._doProgressWith = function (progression) {
+ var progressValue = progression.value;
+ var handler = progression.handler;
+ var promise = progression.promise;
+ var receiver = progression.receiver;
+
+ var ret = tryCatch(handler).call(receiver, progressValue);
+ if (ret === errorObj) {
+ if (ret.e != null &&
+ ret.e.name !== "StopProgressPropagation") {
+ var trace = util.canAttachTrace(ret.e)
+ ? ret.e : new Error(util.toString(ret.e));
+ promise._attachExtraTrace(trace);
+ promise._progress(ret.e);
+ }
+ } else if (ret instanceof Promise) {
+ ret._then(promise._progress, null, null, promise, undefined);
+ } else {
+ promise._progress(ret);
+ }
+};
+
+
+Promise.prototype._progressUnchecked = function (progressValue) {
+ var len = this._length();
+ var progress = this._progress;
+ for (var i = 0; i < len; i++) {
+ var handler = this._progressHandlerAt(i);
+ var promise = this._promiseAt(i);
+ if (!(promise instanceof Promise)) {
+ var receiver = this._receiverAt(i);
+ if (typeof handler === "function") {
+ handler.call(receiver, progressValue, promise);
+ } else if (receiver instanceof PromiseArray &&
+ !receiver._isResolved()) {
+ receiver._promiseProgressed(progressValue, promise);
+ }
+ continue;
+ }
+
+ if (typeof handler === "function") {
+ async.invoke(this._doProgressWith, this, {
+ handler: handler,
+ promise: promise,
+ receiver: this._receiverAt(i),
+ value: progressValue
+ });
+ } else {
+ async.invoke(progress, promise, progressValue);
+ }
+ }
+};
+};
+
+},{"./async.js":2,"./util.js":38}],23:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function() {
+var makeSelfResolutionError = function () {
+ return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/LhFpo0\u000a");
+};
+var reflect = function() {
+ return new Promise.PromiseInspection(this._target());
+};
+var apiRejection = function(msg) {
+ return Promise.reject(new TypeError(msg));
+};
+
+var util = _dereq_("./util.js");
+
+var getDomain;
+if (util.isNode) {
+ getDomain = function() {
+ var ret = process.domain;
+ if (ret === undefined) ret = null;
+ return ret;
+ };
+} else {
+ getDomain = function() {
+ return null;
+ };
+}
+util.notEnumerableProp(Promise, "_getDomain", getDomain);
+
+var UNDEFINED_BINDING = {};
+var async = _dereq_("./async.js");
+var errors = _dereq_("./errors.js");
+var TypeError = Promise.TypeError = errors.TypeError;
+Promise.RangeError = errors.RangeError;
+Promise.CancellationError = errors.CancellationError;
+Promise.TimeoutError = errors.TimeoutError;
+Promise.OperationalError = errors.OperationalError;
+Promise.RejectionError = errors.OperationalError;
+Promise.AggregateError = errors.AggregateError;
+var INTERNAL = function(){};
+var APPLY = {};
+var NEXT_FILTER = {e: null};
+var tryConvertToPromise = _dereq_("./thenables.js")(Promise, INTERNAL);
+var PromiseArray =
+ _dereq_("./promise_array.js")(Promise, INTERNAL,
+ tryConvertToPromise, apiRejection);
+var CapturedTrace = _dereq_("./captured_trace.js")();
+var isDebugging = _dereq_("./debuggability.js")(Promise, CapturedTrace);
+ /*jshint unused:false*/
+var createContext =
+ _dereq_("./context.js")(Promise, CapturedTrace, isDebugging);
+var CatchFilter = _dereq_("./catch_filter.js")(NEXT_FILTER);
+var PromiseResolver = _dereq_("./promise_resolver.js");
+var nodebackForPromise = PromiseResolver._nodebackForPromise;
+var errorObj = util.errorObj;
+var tryCatch = util.tryCatch;
+function Promise(resolver) {
+ if (typeof resolver !== "function") {
+ throw new TypeError("the promise constructor requires a resolver function\u000a\u000a See http://goo.gl/EC22Yn\u000a");
+ }
+ if (this.constructor !== Promise) {
+ throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/KsIlge\u000a");
+ }
+ this._bitField = 0;
+ this._fulfillmentHandler0 = undefined;
+ this._rejectionHandler0 = undefined;
+ this._progressHandler0 = undefined;
+ this._promise0 = undefined;
+ this._receiver0 = undefined;
+ this._settledValue = undefined;
+ if (resolver !== INTERNAL) this._resolveFromResolver(resolver);
+}
+
+Promise.prototype.toString = function () {
+ return "[object Promise]";
+};
+
+Promise.prototype.caught = Promise.prototype["catch"] = function (fn) {
+ var len = arguments.length;
+ if (len > 1) {
+ var catchInstances = new Array(len - 1),
+ j = 0, i;
+ for (i = 0; i < len - 1; ++i) {
+ var item = arguments[i];
+ if (typeof item === "function") {
+ catchInstances[j++] = item;
+ } else {
+ return Promise.reject(
+ new TypeError("Catch filter must inherit from Error or be a simple predicate function\u000a\u000a See http://goo.gl/o84o68\u000a"));
+ }
+ }
+ catchInstances.length = j;
+ fn = arguments[i];
+ var catchFilter = new CatchFilter(catchInstances, fn, this);
+ return this._then(undefined, catchFilter.doFilter, undefined,
+ catchFilter, undefined);
+ }
+ return this._then(undefined, fn, undefined, undefined, undefined);
+};
+
+Promise.prototype.reflect = function () {
+ return this._then(reflect, reflect, undefined, this, undefined);
+};
+
+Promise.prototype.then = function (didFulfill, didReject, didProgress) {
+ if (isDebugging() && arguments.length > 0 &&
+ typeof didFulfill !== "function" &&
+ typeof didReject !== "function") {
+ var msg = ".then() only accepts functions but was passed: " +
+ util.classString(didFulfill);
+ if (arguments.length > 1) {
+ msg += ", " + util.classString(didReject);
+ }
+ this._warn(msg);
+ }
+ return this._then(didFulfill, didReject, didProgress,
+ undefined, undefined);
+};
+
+Promise.prototype.done = function (didFulfill, didReject, didProgress) {
+ var promise = this._then(didFulfill, didReject, didProgress,
+ undefined, undefined);
+ promise._setIsFinal();
+};
+
+Promise.prototype.spread = function (didFulfill, didReject) {
+ return this.all()._then(didFulfill, didReject, undefined, APPLY, undefined);
+};
+
+Promise.prototype.isCancellable = function () {
+ return !this.isResolved() &&
+ this._cancellable();
+};
+
+Promise.prototype.toJSON = function () {
+ var ret = {
+ isFulfilled: false,
+ isRejected: false,
+ fulfillmentValue: undefined,
+ rejectionReason: undefined
+ };
+ if (this.isFulfilled()) {
+ ret.fulfillmentValue = this.value();
+ ret.isFulfilled = true;
+ } else if (this.isRejected()) {
+ ret.rejectionReason = this.reason();
+ ret.isRejected = true;
+ }
+ return ret;
+};
+
+Promise.prototype.all = function () {
+ return new PromiseArray(this).promise();
+};
+
+Promise.prototype.error = function (fn) {
+ return this.caught(util.originatesFromRejection, fn);
+};
+
+Promise.is = function (val) {
+ return val instanceof Promise;
+};
+
+Promise.fromNode = function(fn) {
+ var ret = new Promise(INTERNAL);
+ var result = tryCatch(fn)(nodebackForPromise(ret));
+ if (result === errorObj) {
+ ret._rejectCallback(result.e, true, true);
+ }
+ return ret;
+};
+
+Promise.all = function (promises) {
+ return new PromiseArray(promises).promise();
+};
+
+Promise.defer = Promise.pending = function () {
+ var promise = new Promise(INTERNAL);
+ return new PromiseResolver(promise);
+};
+
+Promise.cast = function (obj) {
+ var ret = tryConvertToPromise(obj);
+ if (!(ret instanceof Promise)) {
+ var val = ret;
+ ret = new Promise(INTERNAL);
+ ret._fulfillUnchecked(val);
+ }
+ return ret;
+};
+
+Promise.resolve = Promise.fulfilled = Promise.cast;
+
+Promise.reject = Promise.rejected = function (reason) {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._rejectCallback(reason, true);
+ return ret;
+};
+
+Promise.setScheduler = function(fn) {
+ if (typeof fn !== "function") throw new TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ var prev = async._schedule;
+ async._schedule = fn;
+ return prev;
+};
+
+Promise.prototype._then = function (
+ didFulfill,
+ didReject,
+ didProgress,
+ receiver,
+ internalData
+) {
+ var haveInternalData = internalData !== undefined;
+ var ret = haveInternalData ? internalData : new Promise(INTERNAL);
+
+ if (!haveInternalData) {
+ ret._propagateFrom(this, 4 | 1);
+ ret._captureStackTrace();
+ }
+
+ var target = this._target();
+ if (target !== this) {
+ if (receiver === undefined) receiver = this._boundTo;
+ if (!haveInternalData) ret._setIsMigrated();
+ }
+
+ var callbackIndex = target._addCallbacks(didFulfill,
+ didReject,
+ didProgress,
+ ret,
+ receiver,
+ getDomain());
+
+ if (target._isResolved() && !target._isSettlePromisesQueued()) {
+ async.invoke(
+ target._settlePromiseAtPostResolution, target, callbackIndex);
+ }
+
+ return ret;
+};
+
+Promise.prototype._settlePromiseAtPostResolution = function (index) {
+ if (this._isRejectionUnhandled()) this._unsetRejectionIsUnhandled();
+ this._settlePromiseAt(index);
+};
+
+Promise.prototype._length = function () {
+ return this._bitField & 131071;
+};
+
+Promise.prototype._isFollowingOrFulfilledOrRejected = function () {
+ return (this._bitField & 939524096) > 0;
+};
+
+Promise.prototype._isFollowing = function () {
+ return (this._bitField & 536870912) === 536870912;
+};
+
+Promise.prototype._setLength = function (len) {
+ this._bitField = (this._bitField & -131072) |
+ (len & 131071);
+};
+
+Promise.prototype._setFulfilled = function () {
+ this._bitField = this._bitField | 268435456;
+};
+
+Promise.prototype._setRejected = function () {
+ this._bitField = this._bitField | 134217728;
+};
+
+Promise.prototype._setFollowing = function () {
+ this._bitField = this._bitField | 536870912;
+};
+
+Promise.prototype._setIsFinal = function () {
+ this._bitField = this._bitField | 33554432;
+};
+
+Promise.prototype._isFinal = function () {
+ return (this._bitField & 33554432) > 0;
+};
+
+Promise.prototype._cancellable = function () {
+ return (this._bitField & 67108864) > 0;
+};
+
+Promise.prototype._setCancellable = function () {
+ this._bitField = this._bitField | 67108864;
+};
+
+Promise.prototype._unsetCancellable = function () {
+ this._bitField = this._bitField & (~67108864);
+};
+
+Promise.prototype._setIsMigrated = function () {
+ this._bitField = this._bitField | 4194304;
+};
+
+Promise.prototype._unsetIsMigrated = function () {
+ this._bitField = this._bitField & (~4194304);
+};
+
+Promise.prototype._isMigrated = function () {
+ return (this._bitField & 4194304) > 0;
+};
+
+Promise.prototype._receiverAt = function (index) {
+ var ret = index === 0
+ ? this._receiver0
+ : this[
+ index * 5 - 5 + 4];
+ if (ret === UNDEFINED_BINDING) {
+ return undefined;
+ } else if (ret === undefined && this._isBound()) {
+ return this._boundValue();
+ }
+ return ret;
+};
+
+Promise.prototype._promiseAt = function (index) {
+ return index === 0
+ ? this._promise0
+ : this[index * 5 - 5 + 3];
+};
+
+Promise.prototype._fulfillmentHandlerAt = function (index) {
+ return index === 0
+ ? this._fulfillmentHandler0
+ : this[index * 5 - 5 + 0];
+};
+
+Promise.prototype._rejectionHandlerAt = function (index) {
+ return index === 0
+ ? this._rejectionHandler0
+ : this[index * 5 - 5 + 1];
+};
+
+Promise.prototype._boundValue = function() {
+ var ret = this._boundTo;
+ if (ret !== undefined) {
+ if (ret instanceof Promise) {
+ if (ret.isFulfilled()) {
+ return ret.value();
+ } else {
+ return undefined;
+ }
+ }
+ }
+ return ret;
+};
+
+Promise.prototype._migrateCallbacks = function (follower, index) {
+ var fulfill = follower._fulfillmentHandlerAt(index);
+ var reject = follower._rejectionHandlerAt(index);
+ var progress = follower._progressHandlerAt(index);
+ var promise = follower._promiseAt(index);
+ var receiver = follower._receiverAt(index);
+ if (promise instanceof Promise) promise._setIsMigrated();
+ if (receiver === undefined) receiver = UNDEFINED_BINDING;
+ this._addCallbacks(fulfill, reject, progress, promise, receiver, null);
+};
+
+Promise.prototype._addCallbacks = function (
+ fulfill,
+ reject,
+ progress,
+ promise,
+ receiver,
+ domain
+) {
+ var index = this._length();
+
+ if (index >= 131071 - 5) {
+ index = 0;
+ this._setLength(0);
+ }
+
+ if (index === 0) {
+ this._promise0 = promise;
+ if (receiver !== undefined) this._receiver0 = receiver;
+ if (typeof fulfill === "function" && !this._isCarryingStackTrace()) {
+ this._fulfillmentHandler0 =
+ domain === null ? fulfill : domain.bind(fulfill);
+ }
+ if (typeof reject === "function") {
+ this._rejectionHandler0 =
+ domain === null ? reject : domain.bind(reject);
+ }
+ if (typeof progress === "function") {
+ this._progressHandler0 =
+ domain === null ? progress : domain.bind(progress);
+ }
+ } else {
+ var base = index * 5 - 5;
+ this[base + 3] = promise;
+ this[base + 4] = receiver;
+ if (typeof fulfill === "function") {
+ this[base + 0] =
+ domain === null ? fulfill : domain.bind(fulfill);
+ }
+ if (typeof reject === "function") {
+ this[base + 1] =
+ domain === null ? reject : domain.bind(reject);
+ }
+ if (typeof progress === "function") {
+ this[base + 2] =
+ domain === null ? progress : domain.bind(progress);
+ }
+ }
+ this._setLength(index + 1);
+ return index;
+};
+
+Promise.prototype._setProxyHandlers = function (receiver, promiseSlotValue) {
+ var index = this._length();
+
+ if (index >= 131071 - 5) {
+ index = 0;
+ this._setLength(0);
+ }
+ if (index === 0) {
+ this._promise0 = promiseSlotValue;
+ this._receiver0 = receiver;
+ } else {
+ var base = index * 5 - 5;
+ this[base + 3] = promiseSlotValue;
+ this[base + 4] = receiver;
+ }
+ this._setLength(index + 1);
+};
+
+Promise.prototype._proxyPromiseArray = function (promiseArray, index) {
+ this._setProxyHandlers(promiseArray, index);
+};
+
+Promise.prototype._resolveCallback = function(value, shouldBind) {
+ if (this._isFollowingOrFulfilledOrRejected()) return;
+ if (value === this)
+ return this._rejectCallback(makeSelfResolutionError(), false, true);
+ var maybePromise = tryConvertToPromise(value, this);
+ if (!(maybePromise instanceof Promise)) return this._fulfill(value);
+
+ var propagationFlags = 1 | (shouldBind ? 4 : 0);
+ this._propagateFrom(maybePromise, propagationFlags);
+ var promise = maybePromise._target();
+ if (promise._isPending()) {
+ var len = this._length();
+ for (var i = 0; i < len; ++i) {
+ promise._migrateCallbacks(this, i);
+ }
+ this._setFollowing();
+ this._setLength(0);
+ this._setFollowee(promise);
+ } else if (promise._isFulfilled()) {
+ this._fulfillUnchecked(promise._value());
+ } else {
+ this._rejectUnchecked(promise._reason(),
+ promise._getCarriedStackTrace());
+ }
+};
+
+Promise.prototype._rejectCallback =
+function(reason, synchronous, shouldNotMarkOriginatingFromRejection) {
+ if (!shouldNotMarkOriginatingFromRejection) {
+ util.markAsOriginatingFromRejection(reason);
+ }
+ var trace = util.ensureErrorObject(reason);
+ var hasStack = trace === reason;
+ this._attachExtraTrace(trace, synchronous ? hasStack : false);
+ this._reject(reason, hasStack ? undefined : trace);
+};
+
+Promise.prototype._resolveFromResolver = function (resolver) {
+ var promise = this;
+ this._captureStackTrace();
+ this._pushContext();
+ var synchronous = true;
+ var r = tryCatch(resolver)(function(value) {
+ if (promise === null) return;
+ promise._resolveCallback(value);
+ promise = null;
+ }, function (reason) {
+ if (promise === null) return;
+ promise._rejectCallback(reason, synchronous);
+ promise = null;
+ });
+ synchronous = false;
+ this._popContext();
+
+ if (r !== undefined && r === errorObj && promise !== null) {
+ promise._rejectCallback(r.e, true, true);
+ promise = null;
+ }
+};
+
+Promise.prototype._settlePromiseFromHandler = function (
+ handler, receiver, value, promise
+) {
+ if (promise._isRejected()) return;
+ promise._pushContext();
+ var x;
+ if (receiver === APPLY && !this._isRejected()) {
+ x = tryCatch(handler).apply(this._boundValue(), value);
+ } else {
+ x = tryCatch(handler).call(receiver, value);
+ }
+ promise._popContext();
+
+ if (x === errorObj || x === promise || x === NEXT_FILTER) {
+ var err = x === promise ? makeSelfResolutionError() : x.e;
+ promise._rejectCallback(err, false, true);
+ } else {
+ promise._resolveCallback(x);
+ }
+};
+
+Promise.prototype._target = function() {
+ var ret = this;
+ while (ret._isFollowing()) ret = ret._followee();
+ return ret;
+};
+
+Promise.prototype._followee = function() {
+ return this._rejectionHandler0;
+};
+
+Promise.prototype._setFollowee = function(promise) {
+ this._rejectionHandler0 = promise;
+};
+
+Promise.prototype._cleanValues = function () {
+ if (this._cancellable()) {
+ this._cancellationParent = undefined;
+ }
+};
+
+Promise.prototype._propagateFrom = function (parent, flags) {
+ if ((flags & 1) > 0 && parent._cancellable()) {
+ this._setCancellable();
+ this._cancellationParent = parent;
+ }
+ if ((flags & 4) > 0 && parent._isBound()) {
+ this._setBoundTo(parent._boundTo);
+ }
+};
+
+Promise.prototype._fulfill = function (value) {
+ if (this._isFollowingOrFulfilledOrRejected()) return;
+ this._fulfillUnchecked(value);
+};
+
+Promise.prototype._reject = function (reason, carriedStackTrace) {
+ if (this._isFollowingOrFulfilledOrRejected()) return;
+ this._rejectUnchecked(reason, carriedStackTrace);
+};
+
+Promise.prototype._settlePromiseAt = function (index) {
+ var promise = this._promiseAt(index);
+ var isPromise = promise instanceof Promise;
+
+ if (isPromise && promise._isMigrated()) {
+ promise._unsetIsMigrated();
+ return async.invoke(this._settlePromiseAt, this, index);
+ }
+ var handler = this._isFulfilled()
+ ? this._fulfillmentHandlerAt(index)
+ : this._rejectionHandlerAt(index);
+
+ var carriedStackTrace =
+ this._isCarryingStackTrace() ? this._getCarriedStackTrace() : undefined;
+ var value = this._settledValue;
+ var receiver = this._receiverAt(index);
+ this._clearCallbackDataAtIndex(index);
+
+ if (typeof handler === "function") {
+ if (!isPromise) {
+ handler.call(receiver, value, promise);
+ } else {
+ this._settlePromiseFromHandler(handler, receiver, value, promise);
+ }
+ } else if (receiver instanceof PromiseArray) {
+ if (!receiver._isResolved()) {
+ if (this._isFulfilled()) {
+ receiver._promiseFulfilled(value, promise);
+ }
+ else {
+ receiver._promiseRejected(value, promise);
+ }
+ }
+ } else if (isPromise) {
+ if (this._isFulfilled()) {
+ promise._fulfill(value);
+ } else {
+ promise._reject(value, carriedStackTrace);
+ }
+ }
+
+ if (index >= 4 && (index & 31) === 4)
+ async.invokeLater(this._setLength, this, 0);
+};
+
+Promise.prototype._clearCallbackDataAtIndex = function(index) {
+ if (index === 0) {
+ if (!this._isCarryingStackTrace()) {
+ this._fulfillmentHandler0 = undefined;
+ }
+ this._rejectionHandler0 =
+ this._progressHandler0 =
+ this._receiver0 =
+ this._promise0 = undefined;
+ } else {
+ var base = index * 5 - 5;
+ this[base + 3] =
+ this[base + 4] =
+ this[base + 0] =
+ this[base + 1] =
+ this[base + 2] = undefined;
+ }
+};
+
+Promise.prototype._isSettlePromisesQueued = function () {
+ return (this._bitField &
+ -1073741824) === -1073741824;
+};
+
+Promise.prototype._setSettlePromisesQueued = function () {
+ this._bitField = this._bitField | -1073741824;
+};
+
+Promise.prototype._unsetSettlePromisesQueued = function () {
+ this._bitField = this._bitField & (~-1073741824);
+};
+
+Promise.prototype._queueSettlePromises = function() {
+ async.settlePromises(this);
+ this._setSettlePromisesQueued();
+};
+
+Promise.prototype._fulfillUnchecked = function (value) {
+ if (value === this) {
+ var err = makeSelfResolutionError();
+ this._attachExtraTrace(err);
+ return this._rejectUnchecked(err, undefined);
+ }
+ this._setFulfilled();
+ this._settledValue = value;
+ this._cleanValues();
+
+ if (this._length() > 0) {
+ this._queueSettlePromises();
+ }
+};
+
+Promise.prototype._rejectUncheckedCheckError = function (reason) {
+ var trace = util.ensureErrorObject(reason);
+ this._rejectUnchecked(reason, trace === reason ? undefined : trace);
+};
+
+Promise.prototype._rejectUnchecked = function (reason, trace) {
+ if (reason === this) {
+ var err = makeSelfResolutionError();
+ this._attachExtraTrace(err);
+ return this._rejectUnchecked(err);
+ }
+ this._setRejected();
+ this._settledValue = reason;
+ this._cleanValues();
+
+ if (this._isFinal()) {
+ async.throwLater(function(e) {
+ if ("stack" in e) {
+ async.invokeFirst(
+ CapturedTrace.unhandledRejection, undefined, e);
+ }
+ throw e;
+ }, trace === undefined ? reason : trace);
+ return;
+ }
+
+ if (trace !== undefined && trace !== reason) {
+ this._setCarriedStackTrace(trace);
+ }
+
+ if (this._length() > 0) {
+ this._queueSettlePromises();
+ } else {
+ this._ensurePossibleRejectionHandled();
+ }
+};
+
+Promise.prototype._settlePromises = function () {
+ this._unsetSettlePromisesQueued();
+ var len = this._length();
+ for (var i = 0; i < len; i++) {
+ this._settlePromiseAt(i);
+ }
+};
+
+util.notEnumerableProp(Promise,
+ "_makeSelfResolutionError",
+ makeSelfResolutionError);
+
+_dereq_("./progress.js")(Promise, PromiseArray);
+_dereq_("./method.js")(Promise, INTERNAL, tryConvertToPromise, apiRejection);
+_dereq_("./bind.js")(Promise, INTERNAL, tryConvertToPromise);
+_dereq_("./finally.js")(Promise, NEXT_FILTER, tryConvertToPromise);
+_dereq_("./direct_resolve.js")(Promise);
+_dereq_("./synchronous_inspection.js")(Promise);
+_dereq_("./join.js")(Promise, PromiseArray, tryConvertToPromise, INTERNAL);
+Promise.Promise = Promise;
+_dereq_('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL);
+_dereq_('./cancel.js')(Promise);
+_dereq_('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext);
+_dereq_('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise);
+_dereq_('./nodeify.js')(Promise);
+_dereq_('./call_get.js')(Promise);
+_dereq_('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection);
+_dereq_('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection);
+_dereq_('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL);
+_dereq_('./settle.js')(Promise, PromiseArray);
+_dereq_('./some.js')(Promise, PromiseArray, apiRejection);
+_dereq_('./promisify.js')(Promise, INTERNAL);
+_dereq_('./any.js')(Promise);
+_dereq_('./each.js')(Promise, INTERNAL);
+_dereq_('./timers.js')(Promise, INTERNAL);
+_dereq_('./filter.js')(Promise, INTERNAL);
+
+ util.toFastProperties(Promise);
+ util.toFastProperties(Promise.prototype);
+ function fillTypes(value) {
+ var p = new Promise(INTERNAL);
+ p._fulfillmentHandler0 = value;
+ p._rejectionHandler0 = value;
+ p._progressHandler0 = value;
+ p._promise0 = value;
+ p._receiver0 = value;
+ p._settledValue = value;
+ }
+ // Complete slack tracking, opt out of field-type tracking and
+ // stabilize map
+ fillTypes({a: 1});
+ fillTypes({b: 2});
+ fillTypes({c: 3});
+ fillTypes(1);
+ fillTypes(function(){});
+ fillTypes(undefined);
+ fillTypes(false);
+ fillTypes(new Promise(INTERNAL));
+ CapturedTrace.setBounds(async.firstLineError, util.lastLineError);
+ return Promise;
+
+};
+
+},{"./any.js":1,"./async.js":2,"./bind.js":3,"./call_get.js":5,"./cancel.js":6,"./captured_trace.js":7,"./catch_filter.js":8,"./context.js":9,"./debuggability.js":10,"./direct_resolve.js":11,"./each.js":12,"./errors.js":13,"./filter.js":15,"./finally.js":16,"./generators.js":17,"./join.js":18,"./map.js":19,"./method.js":20,"./nodeify.js":21,"./progress.js":22,"./promise_array.js":24,"./promise_resolver.js":25,"./promisify.js":26,"./props.js":27,"./race.js":29,"./reduce.js":30,"./settle.js":32,"./some.js":33,"./synchronous_inspection.js":34,"./thenables.js":35,"./timers.js":36,"./using.js":37,"./util.js":38}],24:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL, tryConvertToPromise,
+ apiRejection) {
+var util = _dereq_("./util.js");
+var isArray = util.isArray;
+
+function toResolutionValue(val) {
+ switch(val) {
+ case -2: return [];
+ case -3: return {};
+ }
+}
+
+function PromiseArray(values) {
+ var promise = this._promise = new Promise(INTERNAL);
+ var parent;
+ if (values instanceof Promise) {
+ parent = values;
+ promise._propagateFrom(parent, 1 | 4);
+ }
+ this._values = values;
+ this._length = 0;
+ this._totalResolved = 0;
+ this._init(undefined, -2);
+}
+PromiseArray.prototype.length = function () {
+ return this._length;
+};
+
+PromiseArray.prototype.promise = function () {
+ return this._promise;
+};
+
+PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) {
+ var values = tryConvertToPromise(this._values, this._promise);
+ if (values instanceof Promise) {
+ values = values._target();
+ this._values = values;
+ if (values._isFulfilled()) {
+ values = values._value();
+ if (!isArray(values)) {
+ var err = new Promise.TypeError("expecting an array, a promise or a thenable\u000a\u000a See http://goo.gl/s8MMhc\u000a");
+ this.__hardReject__(err);
+ return;
+ }
+ } else if (values._isPending()) {
+ values._then(
+ init,
+ this._reject,
+ undefined,
+ this,
+ resolveValueIfEmpty
+ );
+ return;
+ } else {
+ this._reject(values._reason());
+ return;
+ }
+ } else if (!isArray(values)) {
+ this._promise._reject(apiRejection("expecting an array, a promise or a thenable\u000a\u000a See http://goo.gl/s8MMhc\u000a")._reason());
+ return;
+ }
+
+ if (values.length === 0) {
+ if (resolveValueIfEmpty === -5) {
+ this._resolveEmptyArray();
+ }
+ else {
+ this._resolve(toResolutionValue(resolveValueIfEmpty));
+ }
+ return;
+ }
+ var len = this.getActualLength(values.length);
+ this._length = len;
+ this._values = this.shouldCopyValues() ? new Array(len) : this._values;
+ var promise = this._promise;
+ for (var i = 0; i < len; ++i) {
+ var isResolved = this._isResolved();
+ var maybePromise = tryConvertToPromise(values[i], promise);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ if (isResolved) {
+ maybePromise._ignoreRejections();
+ } else if (maybePromise._isPending()) {
+ maybePromise._proxyPromiseArray(this, i);
+ } else if (maybePromise._isFulfilled()) {
+ this._promiseFulfilled(maybePromise._value(), i);
+ } else {
+ this._promiseRejected(maybePromise._reason(), i);
+ }
+ } else if (!isResolved) {
+ this._promiseFulfilled(maybePromise, i);
+ }
+ }
+};
+
+PromiseArray.prototype._isResolved = function () {
+ return this._values === null;
+};
+
+PromiseArray.prototype._resolve = function (value) {
+ this._values = null;
+ this._promise._fulfill(value);
+};
+
+PromiseArray.prototype.__hardReject__ =
+PromiseArray.prototype._reject = function (reason) {
+ this._values = null;
+ this._promise._rejectCallback(reason, false, true);
+};
+
+PromiseArray.prototype._promiseProgressed = function (progressValue, index) {
+ this._promise._progress({
+ index: index,
+ value: progressValue
+ });
+};
+
+
+PromiseArray.prototype._promiseFulfilled = function (value, index) {
+ this._values[index] = value;
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= this._length) {
+ this._resolve(this._values);
+ }
+};
+
+PromiseArray.prototype._promiseRejected = function (reason, index) {
+ this._totalResolved++;
+ this._reject(reason);
+};
+
+PromiseArray.prototype.shouldCopyValues = function () {
+ return true;
+};
+
+PromiseArray.prototype.getActualLength = function (len) {
+ return len;
+};
+
+return PromiseArray;
+};
+
+},{"./util.js":38}],25:[function(_dereq_,module,exports){
+"use strict";
+var util = _dereq_("./util.js");
+var maybeWrapAsError = util.maybeWrapAsError;
+var errors = _dereq_("./errors.js");
+var TimeoutError = errors.TimeoutError;
+var OperationalError = errors.OperationalError;
+var haveGetters = util.haveGetters;
+var es5 = _dereq_("./es5.js");
+
+function isUntypedError(obj) {
+ return obj instanceof Error &&
+ es5.getPrototypeOf(obj) === Error.prototype;
+}
+
+var rErrorKey = /^(?:name|message|stack|cause)$/;
+function wrapAsOperationalError(obj) {
+ var ret;
+ if (isUntypedError(obj)) {
+ ret = new OperationalError(obj);
+ ret.name = obj.name;
+ ret.message = obj.message;
+ ret.stack = obj.stack;
+ var keys = es5.keys(obj);
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (!rErrorKey.test(key)) {
+ ret[key] = obj[key];
+ }
+ }
+ return ret;
+ }
+ util.markAsOriginatingFromRejection(obj);
+ return obj;
+}
+
+function nodebackForPromise(promise) {
+ return function(err, value) {
+ if (promise === null) return;
+
+ if (err) {
+ var wrapped = wrapAsOperationalError(maybeWrapAsError(err));
+ promise._attachExtraTrace(wrapped);
+ promise._reject(wrapped);
+ } else if (arguments.length > 2) {
+ var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}
+ promise._fulfill(args);
+ } else {
+ promise._fulfill(value);
+ }
+
+ promise = null;
+ };
+}
+
+
+var PromiseResolver;
+if (!haveGetters) {
+ PromiseResolver = function (promise) {
+ this.promise = promise;
+ this.asCallback = nodebackForPromise(promise);
+ this.callback = this.asCallback;
+ };
+}
+else {
+ PromiseResolver = function (promise) {
+ this.promise = promise;
+ };
+}
+if (haveGetters) {
+ var prop = {
+ get: function() {
+ return nodebackForPromise(this.promise);
+ }
+ };
+ es5.defineProperty(PromiseResolver.prototype, "asCallback", prop);
+ es5.defineProperty(PromiseResolver.prototype, "callback", prop);
+}
+
+PromiseResolver._nodebackForPromise = nodebackForPromise;
+
+PromiseResolver.prototype.toString = function () {
+ return "[object PromiseResolver]";
+};
+
+PromiseResolver.prototype.resolve =
+PromiseResolver.prototype.fulfill = function (value) {
+ if (!(this instanceof PromiseResolver)) {
+ throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\u000a\u000a See http://goo.gl/sdkXL9\u000a");
+ }
+ this.promise._resolveCallback(value);
+};
+
+PromiseResolver.prototype.reject = function (reason) {
+ if (!(this instanceof PromiseResolver)) {
+ throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\u000a\u000a See http://goo.gl/sdkXL9\u000a");
+ }
+ this.promise._rejectCallback(reason);
+};
+
+PromiseResolver.prototype.progress = function (value) {
+ if (!(this instanceof PromiseResolver)) {
+ throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\u000a\u000a See http://goo.gl/sdkXL9\u000a");
+ }
+ this.promise._progress(value);
+};
+
+PromiseResolver.prototype.cancel = function (err) {
+ this.promise.cancel(err);
+};
+
+PromiseResolver.prototype.timeout = function () {
+ this.reject(new TimeoutError("timeout"));
+};
+
+PromiseResolver.prototype.isResolved = function () {
+ return this.promise.isResolved();
+};
+
+PromiseResolver.prototype.toJSON = function () {
+ return this.promise.toJSON();
+};
+
+module.exports = PromiseResolver;
+
+},{"./errors.js":13,"./es5.js":14,"./util.js":38}],26:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var THIS = {};
+var util = _dereq_("./util.js");
+var nodebackForPromise = _dereq_("./promise_resolver.js")
+ ._nodebackForPromise;
+var withAppended = util.withAppended;
+var maybeWrapAsError = util.maybeWrapAsError;
+var canEvaluate = util.canEvaluate;
+var TypeError = _dereq_("./errors").TypeError;
+var defaultSuffix = "Async";
+var defaultPromisified = {__isPromisified__: true};
+var noCopyProps = [
+ "arity", "length",
+ "name",
+ "arguments",
+ "caller",
+ "callee",
+ "prototype",
+ "__isPromisified__"
+];
+var noCopyPropsPattern = new RegExp("^(?:" + noCopyProps.join("|") + ")$");
+
+var defaultFilter = function(name) {
+ return util.isIdentifier(name) &&
+ name.charAt(0) !== "_" &&
+ name !== "constructor";
+};
+
+function propsFilter(key) {
+ return !noCopyPropsPattern.test(key);
+}
+
+function isPromisified(fn) {
+ try {
+ return fn.__isPromisified__ === true;
+ }
+ catch (e) {
+ return false;
+ }
+}
+
+function hasPromisified(obj, key, suffix) {
+ var val = util.getDataPropertyOrDefault(obj, key + suffix,
+ defaultPromisified);
+ return val ? isPromisified(val) : false;
+}
+function checkValid(ret, suffix, suffixRegexp) {
+ for (var i = 0; i < ret.length; i += 2) {
+ var key = ret[i];
+ if (suffixRegexp.test(key)) {
+ var keyWithoutAsyncSuffix = key.replace(suffixRegexp, "");
+ for (var j = 0; j < ret.length; j += 2) {
+ if (ret[j] === keyWithoutAsyncSuffix) {
+ throw new TypeError("Cannot promisify an API that has normal methods with '%s'-suffix\u000a\u000a See http://goo.gl/iWrZbw\u000a"
+ .replace("%s", suffix));
+ }
+ }
+ }
+ }
+}
+
+function promisifiableMethods(obj, suffix, suffixRegexp, filter) {
+ var keys = util.inheritedDataKeys(obj);
+ var ret = [];
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ var value = obj[key];
+ var passesDefaultFilter = filter === defaultFilter
+ ? true : defaultFilter(key, value, obj);
+ if (typeof value === "function" &&
+ !isPromisified(value) &&
+ !hasPromisified(obj, key, suffix) &&
+ filter(key, value, obj, passesDefaultFilter)) {
+ ret.push(key, value);
+ }
+ }
+ checkValid(ret, suffix, suffixRegexp);
+ return ret;
+}
+
+var escapeIdentRegex = function(str) {
+ return str.replace(/([$])/, "\\$");
+};
+
+var makeNodePromisifiedEval;
+if (!true) {
+var switchCaseArgumentOrder = function(likelyArgumentCount) {
+ var ret = [likelyArgumentCount];
+ var min = Math.max(0, likelyArgumentCount - 1 - 3);
+ for(var i = likelyArgumentCount - 1; i >= min; --i) {
+ ret.push(i);
+ }
+ for(var i = likelyArgumentCount + 1; i <= 3; ++i) {
+ ret.push(i);
+ }
+ return ret;
+};
+
+var argumentSequence = function(argumentCount) {
+ return util.filledRange(argumentCount, "_arg", "");
+};
+
+var parameterDeclaration = function(parameterCount) {
+ return util.filledRange(
+ Math.max(parameterCount, 3), "_arg", "");
+};
+
+var parameterCount = function(fn) {
+ if (typeof fn.length === "number") {
+ return Math.max(Math.min(fn.length, 1023 + 1), 0);
+ }
+ return 0;
+};
+
+makeNodePromisifiedEval =
+function(callback, receiver, originalName, fn) {
+ var newParameterCount = Math.max(0, parameterCount(fn) - 1);
+ var argumentOrder = switchCaseArgumentOrder(newParameterCount);
+ var shouldProxyThis = typeof callback === "string" || receiver === THIS;
+
+ function generateCallForArgumentCount(count) {
+ var args = argumentSequence(count).join(", ");
+ var comma = count > 0 ? ", " : "";
+ var ret;
+ if (shouldProxyThis) {
+ ret = "ret = callback.call(this, {{args}}, nodeback); break;\n";
+ } else {
+ ret = receiver === undefined
+ ? "ret = callback({{args}}, nodeback); break;\n"
+ : "ret = callback.call(receiver, {{args}}, nodeback); break;\n";
+ }
+ return ret.replace("{{args}}", args).replace(", ", comma);
+ }
+
+ function generateArgumentSwitchCase() {
+ var ret = "";
+ for (var i = 0; i < argumentOrder.length; ++i) {
+ ret += "case " + argumentOrder[i] +":" +
+ generateCallForArgumentCount(argumentOrder[i]);
+ }
+
+ ret += " \n\
+ default: \n\
+ var args = new Array(len + 1); \n\
+ var i = 0; \n\
+ for (var i = 0; i < len; ++i) { \n\
+ args[i] = arguments[i]; \n\
+ } \n\
+ args[i] = nodeback; \n\
+ [CodeForCall] \n\
+ break; \n\
+ ".replace("[CodeForCall]", (shouldProxyThis
+ ? "ret = callback.apply(this, args);\n"
+ : "ret = callback.apply(receiver, args);\n"));
+ return ret;
+ }
+
+ var getFunctionCode = typeof callback === "string"
+ ? ("this != null ? this['"+callback+"'] : fn")
+ : "fn";
+
+ return new Function("Promise",
+ "fn",
+ "receiver",
+ "withAppended",
+ "maybeWrapAsError",
+ "nodebackForPromise",
+ "tryCatch",
+ "errorObj",
+ "notEnumerableProp",
+ "INTERNAL","'use strict'; \n\
+ var ret = function (Parameters) { \n\
+ 'use strict'; \n\
+ var len = arguments.length; \n\
+ var promise = new Promise(INTERNAL); \n\
+ promise._captureStackTrace(); \n\
+ var nodeback = nodebackForPromise(promise); \n\
+ var ret; \n\
+ var callback = tryCatch([GetFunctionCode]); \n\
+ switch(len) { \n\
+ [CodeForSwitchCase] \n\
+ } \n\
+ if (ret === errorObj) { \n\
+ promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n\
+ } \n\
+ return promise; \n\
+ }; \n\
+ notEnumerableProp(ret, '__isPromisified__', true); \n\
+ return ret; \n\
+ "
+ .replace("Parameters", parameterDeclaration(newParameterCount))
+ .replace("[CodeForSwitchCase]", generateArgumentSwitchCase())
+ .replace("[GetFunctionCode]", getFunctionCode))(
+ Promise,
+ fn,
+ receiver,
+ withAppended,
+ maybeWrapAsError,
+ nodebackForPromise,
+ util.tryCatch,
+ util.errorObj,
+ util.notEnumerableProp,
+ INTERNAL
+ );
+};
+}
+
+function makeNodePromisifiedClosure(callback, receiver, _, fn) {
+ var defaultThis = (function() {return this;})();
+ var method = callback;
+ if (typeof method === "string") {
+ callback = fn;
+ }
+ function promisified() {
+ var _receiver = receiver;
+ if (receiver === THIS) _receiver = this;
+ var promise = new Promise(INTERNAL);
+ promise._captureStackTrace();
+ var cb = typeof method === "string" && this !== defaultThis
+ ? this[method] : callback;
+ var fn = nodebackForPromise(promise);
+ try {
+ cb.apply(_receiver, withAppended(arguments, fn));
+ } catch(e) {
+ promise._rejectCallback(maybeWrapAsError(e), true, true);
+ }
+ return promise;
+ }
+ util.notEnumerableProp(promisified, "__isPromisified__", true);
+ return promisified;
+}
+
+var makeNodePromisified = canEvaluate
+ ? makeNodePromisifiedEval
+ : makeNodePromisifiedClosure;
+
+function promisifyAll(obj, suffix, filter, promisifier) {
+ var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$");
+ var methods =
+ promisifiableMethods(obj, suffix, suffixRegexp, filter);
+
+ for (var i = 0, len = methods.length; i < len; i+= 2) {
+ var key = methods[i];
+ var fn = methods[i+1];
+ var promisifiedKey = key + suffix;
+ if (promisifier === makeNodePromisified) {
+ obj[promisifiedKey] =
+ makeNodePromisified(key, THIS, key, fn, suffix);
+ } else {
+ var promisified = promisifier(fn, function() {
+ return makeNodePromisified(key, THIS, key, fn, suffix);
+ });
+ util.notEnumerableProp(promisified, "__isPromisified__", true);
+ obj[promisifiedKey] = promisified;
+ }
+ }
+ util.toFastProperties(obj);
+ return obj;
+}
+
+function promisify(callback, receiver) {
+ return makeNodePromisified(callback, receiver, undefined, callback);
+}
+
+Promise.promisify = function (fn, receiver) {
+ if (typeof fn !== "function") {
+ throw new TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ }
+ if (isPromisified(fn)) {
+ return fn;
+ }
+ var ret = promisify(fn, arguments.length < 2 ? THIS : receiver);
+ util.copyDescriptors(fn, ret, propsFilter);
+ return ret;
+};
+
+Promise.promisifyAll = function (target, options) {
+ if (typeof target !== "function" && typeof target !== "object") {
+ throw new TypeError("the target of promisifyAll must be an object or a function\u000a\u000a See http://goo.gl/9ITlV0\u000a");
+ }
+ options = Object(options);
+ var suffix = options.suffix;
+ if (typeof suffix !== "string") suffix = defaultSuffix;
+ var filter = options.filter;
+ if (typeof filter !== "function") filter = defaultFilter;
+ var promisifier = options.promisifier;
+ if (typeof promisifier !== "function") promisifier = makeNodePromisified;
+
+ if (!util.isIdentifier(suffix)) {
+ throw new RangeError("suffix must be a valid identifier\u000a\u000a See http://goo.gl/8FZo5V\u000a");
+ }
+
+ var keys = util.inheritedDataKeys(target);
+ for (var i = 0; i < keys.length; ++i) {
+ var value = target[keys[i]];
+ if (keys[i] !== "constructor" &&
+ util.isClass(value)) {
+ promisifyAll(value.prototype, suffix, filter, promisifier);
+ promisifyAll(value, suffix, filter, promisifier);
+ }
+ }
+
+ return promisifyAll(target, suffix, filter, promisifier);
+};
+};
+
+
+},{"./errors":13,"./promise_resolver.js":25,"./util.js":38}],27:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(
+ Promise, PromiseArray, tryConvertToPromise, apiRejection) {
+var util = _dereq_("./util.js");
+var isObject = util.isObject;
+var es5 = _dereq_("./es5.js");
+
+function PropertiesPromiseArray(obj) {
+ var keys = es5.keys(obj);
+ var len = keys.length;
+ var values = new Array(len * 2);
+ for (var i = 0; i < len; ++i) {
+ var key = keys[i];
+ values[i] = obj[key];
+ values[i + len] = key;
+ }
+ this.constructor$(values);
+}
+util.inherits(PropertiesPromiseArray, PromiseArray);
+
+PropertiesPromiseArray.prototype._init = function () {
+ this._init$(undefined, -3) ;
+};
+
+PropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) {
+ this._values[index] = value;
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= this._length) {
+ var val = {};
+ var keyOffset = this.length();
+ for (var i = 0, len = this.length(); i < len; ++i) {
+ val[this._values[i + keyOffset]] = this._values[i];
+ }
+ this._resolve(val);
+ }
+};
+
+PropertiesPromiseArray.prototype._promiseProgressed = function (value, index) {
+ this._promise._progress({
+ key: this._values[index + this.length()],
+ value: value
+ });
+};
+
+PropertiesPromiseArray.prototype.shouldCopyValues = function () {
+ return false;
+};
+
+PropertiesPromiseArray.prototype.getActualLength = function (len) {
+ return len >> 1;
+};
+
+function props(promises) {
+ var ret;
+ var castValue = tryConvertToPromise(promises);
+
+ if (!isObject(castValue)) {
+ return apiRejection("cannot await properties of a non-object\u000a\u000a See http://goo.gl/OsFKC8\u000a");
+ } else if (castValue instanceof Promise) {
+ ret = castValue._then(
+ Promise.props, undefined, undefined, undefined, undefined);
+ } else {
+ ret = new PropertiesPromiseArray(castValue).promise();
+ }
+
+ if (castValue instanceof Promise) {
+ ret._propagateFrom(castValue, 4);
+ }
+ return ret;
+}
+
+Promise.prototype.props = function () {
+ return props(this);
+};
+
+Promise.props = function (promises) {
+ return props(promises);
+};
+};
+
+},{"./es5.js":14,"./util.js":38}],28:[function(_dereq_,module,exports){
+"use strict";
+function arrayMove(src, srcIndex, dst, dstIndex, len) {
+ for (var j = 0; j < len; ++j) {
+ dst[j + dstIndex] = src[j + srcIndex];
+ src[j + srcIndex] = void 0;
+ }
+}
+
+function Queue(capacity) {
+ this._capacity = capacity;
+ this._length = 0;
+ this._front = 0;
+}
+
+Queue.prototype._willBeOverCapacity = function (size) {
+ return this._capacity < size;
+};
+
+Queue.prototype._pushOne = function (arg) {
+ var length = this.length();
+ this._checkCapacity(length + 1);
+ var i = (this._front + length) & (this._capacity - 1);
+ this[i] = arg;
+ this._length = length + 1;
+};
+
+Queue.prototype._unshiftOne = function(value) {
+ var capacity = this._capacity;
+ this._checkCapacity(this.length() + 1);
+ var front = this._front;
+ var i = (((( front - 1 ) &
+ ( capacity - 1) ) ^ capacity ) - capacity );
+ this[i] = value;
+ this._front = i;
+ this._length = this.length() + 1;
+};
+
+Queue.prototype.unshift = function(fn, receiver, arg) {
+ this._unshiftOne(arg);
+ this._unshiftOne(receiver);
+ this._unshiftOne(fn);
+};
+
+Queue.prototype.push = function (fn, receiver, arg) {
+ var length = this.length() + 3;
+ if (this._willBeOverCapacity(length)) {
+ this._pushOne(fn);
+ this._pushOne(receiver);
+ this._pushOne(arg);
+ return;
+ }
+ var j = this._front + length - 3;
+ this._checkCapacity(length);
+ var wrapMask = this._capacity - 1;
+ this[(j + 0) & wrapMask] = fn;
+ this[(j + 1) & wrapMask] = receiver;
+ this[(j + 2) & wrapMask] = arg;
+ this._length = length;
+};
+
+Queue.prototype.shift = function () {
+ var front = this._front,
+ ret = this[front];
+
+ this[front] = undefined;
+ this._front = (front + 1) & (this._capacity - 1);
+ this._length--;
+ return ret;
+};
+
+Queue.prototype.length = function () {
+ return this._length;
+};
+
+Queue.prototype._checkCapacity = function (size) {
+ if (this._capacity < size) {
+ this._resizeTo(this._capacity << 1);
+ }
+};
+
+Queue.prototype._resizeTo = function (capacity) {
+ var oldCapacity = this._capacity;
+ this._capacity = capacity;
+ var front = this._front;
+ var length = this._length;
+ var moveItemsCount = (front + length) & (oldCapacity - 1);
+ arrayMove(this, 0, this, oldCapacity, moveItemsCount);
+};
+
+module.exports = Queue;
+
+},{}],29:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(
+ Promise, INTERNAL, tryConvertToPromise, apiRejection) {
+var isArray = _dereq_("./util.js").isArray;
+
+var raceLater = function (promise) {
+ return promise.then(function(array) {
+ return race(array, promise);
+ });
+};
+
+function race(promises, parent) {
+ var maybePromise = tryConvertToPromise(promises);
+
+ if (maybePromise instanceof Promise) {
+ return raceLater(maybePromise);
+ } else if (!isArray(promises)) {
+ return apiRejection("expecting an array, a promise or a thenable\u000a\u000a See http://goo.gl/s8MMhc\u000a");
+ }
+
+ var ret = new Promise(INTERNAL);
+ if (parent !== undefined) {
+ ret._propagateFrom(parent, 4 | 1);
+ }
+ var fulfill = ret._fulfill;
+ var reject = ret._reject;
+ for (var i = 0, len = promises.length; i < len; ++i) {
+ var val = promises[i];
+
+ if (val === undefined && !(i in promises)) {
+ continue;
+ }
+
+ Promise.cast(val)._then(fulfill, reject, undefined, ret, null);
+ }
+ return ret;
+}
+
+Promise.race = function (promises) {
+ return race(promises, undefined);
+};
+
+Promise.prototype.race = function () {
+ return race(this, undefined);
+};
+
+};
+
+},{"./util.js":38}],30:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise,
+ PromiseArray,
+ apiRejection,
+ tryConvertToPromise,
+ INTERNAL) {
+var getDomain = Promise._getDomain;
+var async = _dereq_("./async.js");
+var util = _dereq_("./util.js");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+function ReductionPromiseArray(promises, fn, accum, _each) {
+ this.constructor$(promises);
+ this._promise._captureStackTrace();
+ this._preservedValues = _each === INTERNAL ? [] : null;
+ this._zerothIsAccum = (accum === undefined);
+ this._gotAccum = false;
+ this._reducingIndex = (this._zerothIsAccum ? 1 : 0);
+ this._valuesPhase = undefined;
+ var maybePromise = tryConvertToPromise(accum, this._promise);
+ var rejected = false;
+ var isPromise = maybePromise instanceof Promise;
+ if (isPromise) {
+ maybePromise = maybePromise._target();
+ if (maybePromise._isPending()) {
+ maybePromise._proxyPromiseArray(this, -1);
+ } else if (maybePromise._isFulfilled()) {
+ accum = maybePromise._value();
+ this._gotAccum = true;
+ } else {
+ this._reject(maybePromise._reason());
+ rejected = true;
+ }
+ }
+ if (!(isPromise || this._zerothIsAccum)) this._gotAccum = true;
+ var domain = getDomain();
+ this._callback = domain === null ? fn : domain.bind(fn);
+ this._accum = accum;
+ if (!rejected) async.invoke(init, this, undefined);
+}
+function init() {
+ this._init$(undefined, -5);
+}
+util.inherits(ReductionPromiseArray, PromiseArray);
+
+ReductionPromiseArray.prototype._init = function () {};
+
+ReductionPromiseArray.prototype._resolveEmptyArray = function () {
+ if (this._gotAccum || this._zerothIsAccum) {
+ this._resolve(this._preservedValues !== null
+ ? [] : this._accum);
+ }
+};
+
+ReductionPromiseArray.prototype._promiseFulfilled = function (value, index) {
+ var values = this._values;
+ values[index] = value;
+ var length = this.length();
+ var preservedValues = this._preservedValues;
+ var isEach = preservedValues !== null;
+ var gotAccum = this._gotAccum;
+ var valuesPhase = this._valuesPhase;
+ var valuesPhaseIndex;
+ if (!valuesPhase) {
+ valuesPhase = this._valuesPhase = new Array(length);
+ for (valuesPhaseIndex=0; valuesPhaseIndex<length; ++valuesPhaseIndex) {
+ valuesPhase[valuesPhaseIndex] = 0;
+ }
+ }
+ valuesPhaseIndex = valuesPhase[index];
+
+ if (index === 0 && this._zerothIsAccum) {
+ this._accum = value;
+ this._gotAccum = gotAccum = true;
+ valuesPhase[index] = ((valuesPhaseIndex === 0)
+ ? 1 : 2);
+ } else if (index === -1) {
+ this._accum = value;
+ this._gotAccum = gotAccum = true;
+ } else {
+ if (valuesPhaseIndex === 0) {
+ valuesPhase[index] = 1;
+ } else {
+ valuesPhase[index] = 2;
+ this._accum = value;
+ }
+ }
+ if (!gotAccum) return;
+
+ var callback = this._callback;
+ var receiver = this._promise._boundValue();
+ var ret;
+
+ for (var i = this._reducingIndex; i < length; ++i) {
+ valuesPhaseIndex = valuesPhase[i];
+ if (valuesPhaseIndex === 2) {
+ this._reducingIndex = i + 1;
+ continue;
+ }
+ if (valuesPhaseIndex !== 1) return;
+ value = values[i];
+ this._promise._pushContext();
+ if (isEach) {
+ preservedValues.push(value);
+ ret = tryCatch(callback).call(receiver, value, i, length);
+ }
+ else {
+ ret = tryCatch(callback)
+ .call(receiver, this._accum, value, i, length);
+ }
+ this._promise._popContext();
+
+ if (ret === errorObj) return this._reject(ret.e);
+
+ var maybePromise = tryConvertToPromise(ret, this._promise);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ if (maybePromise._isPending()) {
+ valuesPhase[i] = 4;
+ return maybePromise._proxyPromiseArray(this, i);
+ } else if (maybePromise._isFulfilled()) {
+ ret = maybePromise._value();
+ } else {
+ return this._reject(maybePromise._reason());
+ }
+ }
+
+ this._reducingIndex = i + 1;
+ this._accum = ret;
+ }
+
+ this._resolve(isEach ? preservedValues : this._accum);
+};
+
+function reduce(promises, fn, initialValue, _each) {
+ if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ var array = new ReductionPromiseArray(promises, fn, initialValue, _each);
+ return array.promise();
+}
+
+Promise.prototype.reduce = function (fn, initialValue) {
+ return reduce(this, fn, initialValue, null);
+};
+
+Promise.reduce = function (promises, fn, initialValue, _each) {
+ return reduce(promises, fn, initialValue, _each);
+};
+};
+
+},{"./async.js":2,"./util.js":38}],31:[function(_dereq_,module,exports){
+"use strict";
+var schedule;
+var util = _dereq_("./util");
+var noAsyncScheduler = function() {
+ throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/m3OTXk\u000a");
+};
+if (util.isNode && typeof MutationObserver === "undefined") {
+ var GlobalSetImmediate = global.setImmediate;
+ var ProcessNextTick = process.nextTick;
+ schedule = util.isRecentNode
+ ? function(fn) { GlobalSetImmediate.call(global, fn); }
+ : function(fn) { ProcessNextTick.call(process, fn); };
+} else if ((typeof MutationObserver !== "undefined") &&
+ !(typeof window !== "undefined" &&
+ window.navigator &&
+ window.navigator.standalone)) {
+ schedule = function(fn) {
+ var div = document.createElement("div");
+ var observer = new MutationObserver(fn);
+ observer.observe(div, {attributes: true});
+ return function() { div.classList.toggle("foo"); };
+ };
+ schedule.isStatic = true;
+} else if (typeof setImmediate !== "undefined") {
+ schedule = function (fn) {
+ setImmediate(fn);
+ };
+} else if (typeof setTimeout !== "undefined") {
+ schedule = function (fn) {
+ setTimeout(fn, 0);
+ };
+} else {
+ schedule = noAsyncScheduler;
+}
+module.exports = schedule;
+
+},{"./util":38}],32:[function(_dereq_,module,exports){
+"use strict";
+module.exports =
+ function(Promise, PromiseArray) {
+var PromiseInspection = Promise.PromiseInspection;
+var util = _dereq_("./util.js");
+
+function SettledPromiseArray(values) {
+ this.constructor$(values);
+}
+util.inherits(SettledPromiseArray, PromiseArray);
+
+SettledPromiseArray.prototype._promiseResolved = function (index, inspection) {
+ this._values[index] = inspection;
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= this._length) {
+ this._resolve(this._values);
+ }
+};
+
+SettledPromiseArray.prototype._promiseFulfilled = function (value, index) {
+ var ret = new PromiseInspection();
+ ret._bitField = 268435456;
+ ret._settledValue = value;
+ this._promiseResolved(index, ret);
+};
+SettledPromiseArray.prototype._promiseRejected = function (reason, index) {
+ var ret = new PromiseInspection();
+ ret._bitField = 134217728;
+ ret._settledValue = reason;
+ this._promiseResolved(index, ret);
+};
+
+Promise.settle = function (promises) {
+ return new SettledPromiseArray(promises).promise();
+};
+
+Promise.prototype.settle = function () {
+ return new SettledPromiseArray(this).promise();
+};
+};
+
+},{"./util.js":38}],33:[function(_dereq_,module,exports){
+"use strict";
+module.exports =
+function(Promise, PromiseArray, apiRejection) {
+var util = _dereq_("./util.js");
+var RangeError = _dereq_("./errors.js").RangeError;
+var AggregateError = _dereq_("./errors.js").AggregateError;
+var isArray = util.isArray;
+
+
+function SomePromiseArray(values) {
+ this.constructor$(values);
+ this._howMany = 0;
+ this._unwrap = false;
+ this._initialized = false;
+}
+util.inherits(SomePromiseArray, PromiseArray);
+
+SomePromiseArray.prototype._init = function () {
+ if (!this._initialized) {
+ return;
+ }
+ if (this._howMany === 0) {
+ this._resolve([]);
+ return;
+ }
+ this._init$(undefined, -5);
+ var isArrayResolved = isArray(this._values);
+ if (!this._isResolved() &&
+ isArrayResolved &&
+ this._howMany > this._canPossiblyFulfill()) {
+ this._reject(this._getRangeError(this.length()));
+ }
+};
+
+SomePromiseArray.prototype.init = function () {
+ this._initialized = true;
+ this._init();
+};
+
+SomePromiseArray.prototype.setUnwrap = function () {
+ this._unwrap = true;
+};
+
+SomePromiseArray.prototype.howMany = function () {
+ return this._howMany;
+};
+
+SomePromiseArray.prototype.setHowMany = function (count) {
+ this._howMany = count;
+};
+
+SomePromiseArray.prototype._promiseFulfilled = function (value) {
+ this._addFulfilled(value);
+ if (this._fulfilled() === this.howMany()) {
+ this._values.length = this.howMany();
+ if (this.howMany() === 1 && this._unwrap) {
+ this._resolve(this._values[0]);
+ } else {
+ this._resolve(this._values);
+ }
+ }
+
+};
+SomePromiseArray.prototype._promiseRejected = function (reason) {
+ this._addRejected(reason);
+ if (this.howMany() > this._canPossiblyFulfill()) {
+ var e = new AggregateError();
+ for (var i = this.length(); i < this._values.length; ++i) {
+ e.push(this._values[i]);
+ }
+ this._reject(e);
+ }
+};
+
+SomePromiseArray.prototype._fulfilled = function () {
+ return this._totalResolved;
+};
+
+SomePromiseArray.prototype._rejected = function () {
+ return this._values.length - this.length();
+};
+
+SomePromiseArray.prototype._addRejected = function (reason) {
+ this._values.push(reason);
+};
+
+SomePromiseArray.prototype._addFulfilled = function (value) {
+ this._values[this._totalResolved++] = value;
+};
+
+SomePromiseArray.prototype._canPossiblyFulfill = function () {
+ return this.length() - this._rejected();
+};
+
+SomePromiseArray.prototype._getRangeError = function (count) {
+ var message = "Input array must contain at least " +
+ this._howMany + " items but contains only " + count + " items";
+ return new RangeError(message);
+};
+
+SomePromiseArray.prototype._resolveEmptyArray = function () {
+ this._reject(this._getRangeError(0));
+};
+
+function some(promises, howMany) {
+ if ((howMany | 0) !== howMany || howMany < 0) {
+ return apiRejection("expecting a positive integer\u000a\u000a See http://goo.gl/1wAmHx\u000a");
+ }
+ var ret = new SomePromiseArray(promises);
+ var promise = ret.promise();
+ ret.setHowMany(howMany);
+ ret.init();
+ return promise;
+}
+
+Promise.some = function (promises, howMany) {
+ return some(promises, howMany);
+};
+
+Promise.prototype.some = function (howMany) {
+ return some(this, howMany);
+};
+
+Promise._SomePromiseArray = SomePromiseArray;
+};
+
+},{"./errors.js":13,"./util.js":38}],34:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise) {
+function PromiseInspection(promise) {
+ if (promise !== undefined) {
+ promise = promise._target();
+ this._bitField = promise._bitField;
+ this._settledValue = promise._settledValue;
+ }
+ else {
+ this._bitField = 0;
+ this._settledValue = undefined;
+ }
+}
+
+PromiseInspection.prototype.value = function () {
+ if (!this.isFulfilled()) {
+ throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/hc1DLj\u000a");
+ }
+ return this._settledValue;
+};
+
+PromiseInspection.prototype.error =
+PromiseInspection.prototype.reason = function () {
+ if (!this.isRejected()) {
+ throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/hPuiwB\u000a");
+ }
+ return this._settledValue;
+};
+
+PromiseInspection.prototype.isFulfilled =
+Promise.prototype._isFulfilled = function () {
+ return (this._bitField & 268435456) > 0;
+};
+
+PromiseInspection.prototype.isRejected =
+Promise.prototype._isRejected = function () {
+ return (this._bitField & 134217728) > 0;
+};
+
+PromiseInspection.prototype.isPending =
+Promise.prototype._isPending = function () {
+ return (this._bitField & 402653184) === 0;
+};
+
+PromiseInspection.prototype.isResolved =
+Promise.prototype._isResolved = function () {
+ return (this._bitField & 402653184) > 0;
+};
+
+Promise.prototype.isPending = function() {
+ return this._target()._isPending();
+};
+
+Promise.prototype.isRejected = function() {
+ return this._target()._isRejected();
+};
+
+Promise.prototype.isFulfilled = function() {
+ return this._target()._isFulfilled();
+};
+
+Promise.prototype.isResolved = function() {
+ return this._target()._isResolved();
+};
+
+Promise.prototype._value = function() {
+ return this._settledValue;
+};
+
+Promise.prototype._reason = function() {
+ this._unsetRejectionIsUnhandled();
+ return this._settledValue;
+};
+
+Promise.prototype.value = function() {
+ var target = this._target();
+ if (!target.isFulfilled()) {
+ throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/hc1DLj\u000a");
+ }
+ return target._settledValue;
+};
+
+Promise.prototype.reason = function() {
+ var target = this._target();
+ if (!target.isRejected()) {
+ throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/hPuiwB\u000a");
+ }
+ target._unsetRejectionIsUnhandled();
+ return target._settledValue;
+};
+
+
+Promise.PromiseInspection = PromiseInspection;
+};
+
+},{}],35:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var util = _dereq_("./util.js");
+var errorObj = util.errorObj;
+var isObject = util.isObject;
+
+function tryConvertToPromise(obj, context) {
+ if (isObject(obj)) {
+ if (obj instanceof Promise) {
+ return obj;
+ }
+ else if (isAnyBluebirdPromise(obj)) {
+ var ret = new Promise(INTERNAL);
+ obj._then(
+ ret._fulfillUnchecked,
+ ret._rejectUncheckedCheckError,
+ ret._progressUnchecked,
+ ret,
+ null
+ );
+ return ret;
+ }
+ var then = util.tryCatch(getThen)(obj);
+ if (then === errorObj) {
+ if (context) context._pushContext();
+ var ret = Promise.reject(then.e);
+ if (context) context._popContext();
+ return ret;
+ } else if (typeof then === "function") {
+ return doThenable(obj, then, context);
+ }
+ }
+ return obj;
+}
+
+function getThen(obj) {
+ return obj.then;
+}
+
+var hasProp = {}.hasOwnProperty;
+function isAnyBluebirdPromise(obj) {
+ return hasProp.call(obj, "_promise0");
+}
+
+function doThenable(x, then, context) {
+ var promise = new Promise(INTERNAL);
+ var ret = promise;
+ if (context) context._pushContext();
+ promise._captureStackTrace();
+ if (context) context._popContext();
+ var synchronous = true;
+ var result = util.tryCatch(then).call(x,
+ resolveFromThenable,
+ rejectFromThenable,
+ progressFromThenable);
+ synchronous = false;
+ if (promise && result === errorObj) {
+ promise._rejectCallback(result.e, true, true);
+ promise = null;
+ }
+
+ function resolveFromThenable(value) {
+ if (!promise) return;
+ promise._resolveCallback(value);
+ promise = null;
+ }
+
+ function rejectFromThenable(reason) {
+ if (!promise) return;
+ promise._rejectCallback(reason, synchronous, true);
+ promise = null;
+ }
+
+ function progressFromThenable(value) {
+ if (!promise) return;
+ if (typeof promise._progress === "function") {
+ promise._progress(value);
+ }
+ }
+ return ret;
+}
+
+return tryConvertToPromise;
+};
+
+},{"./util.js":38}],36:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var util = _dereq_("./util.js");
+var TimeoutError = Promise.TimeoutError;
+
+var afterTimeout = function (promise, message) {
+ if (!promise.isPending()) return;
+
+ var err;
+ if(!util.isPrimitive(message) && (message instanceof Error)) {
+ err = message;
+ } else {
+ if (typeof message !== "string") {
+ message = "operation timed out";
+ }
+ err = new TimeoutError(message);
+ }
+ util.markAsOriginatingFromRejection(err);
+ promise._attachExtraTrace(err);
+ promise._cancel(err);
+};
+
+var afterValue = function(value) { return delay(+this).thenReturn(value); };
+var delay = Promise.delay = function (value, ms) {
+ if (ms === undefined) {
+ ms = value;
+ value = undefined;
+ var ret = new Promise(INTERNAL);
+ setTimeout(function() { ret._fulfill(); }, ms);
+ return ret;
+ }
+ ms = +ms;
+ return Promise.resolve(value)._then(afterValue, null, null, ms, undefined);
+};
+
+Promise.prototype.delay = function (ms) {
+ return delay(this, ms);
+};
+
+function successClear(value) {
+ var handle = this;
+ if (handle instanceof Number) handle = +handle;
+ clearTimeout(handle);
+ return value;
+}
+
+function failureClear(reason) {
+ var handle = this;
+ if (handle instanceof Number) handle = +handle;
+ clearTimeout(handle);
+ throw reason;
+}
+
+Promise.prototype.timeout = function (ms, message) {
+ ms = +ms;
+ var ret = this.then().cancellable();
+ ret._cancellationParent = this;
+ var handle = setTimeout(function timeoutTimeout() {
+ afterTimeout(ret, message);
+ }, ms);
+ return ret._then(successClear, failureClear, undefined, handle, undefined);
+};
+
+};
+
+},{"./util.js":38}],37:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function (Promise, apiRejection, tryConvertToPromise,
+ createContext) {
+ var TypeError = _dereq_("./errors.js").TypeError;
+ var inherits = _dereq_("./util.js").inherits;
+ var PromiseInspection = Promise.PromiseInspection;
+
+ function inspectionMapper(inspections) {
+ var len = inspections.length;
+ for (var i = 0; i < len; ++i) {
+ var inspection = inspections[i];
+ if (inspection.isRejected()) {
+ return Promise.reject(inspection.error());
+ }
+ inspections[i] = inspection._settledValue;
+ }
+ return inspections;
+ }
+
+ function thrower(e) {
+ setTimeout(function(){throw e;}, 0);
+ }
+
+ function castPreservingDisposable(thenable) {
+ var maybePromise = tryConvertToPromise(thenable);
+ if (maybePromise !== thenable &&
+ typeof thenable._isDisposable === "function" &&
+ typeof thenable._getDisposer === "function" &&
+ thenable._isDisposable()) {
+ maybePromise._setDisposable(thenable._getDisposer());
+ }
+ return maybePromise;
+ }
+ function dispose(resources, inspection) {
+ var i = 0;
+ var len = resources.length;
+ var ret = Promise.defer();
+ function iterator() {
+ if (i >= len) return ret.resolve();
+ var maybePromise = castPreservingDisposable(resources[i++]);
+ if (maybePromise instanceof Promise &&
+ maybePromise._isDisposable()) {
+ try {
+ maybePromise = tryConvertToPromise(
+ maybePromise._getDisposer().tryDispose(inspection),
+ resources.promise);
+ } catch (e) {
+ return thrower(e);
+ }
+ if (maybePromise instanceof Promise) {
+ return maybePromise._then(iterator, thrower,
+ null, null, null);
+ }
+ }
+ iterator();
+ }
+ iterator();
+ return ret.promise;
+ }
+
+ function disposerSuccess(value) {
+ var inspection = new PromiseInspection();
+ inspection._settledValue = value;
+ inspection._bitField = 268435456;
+ return dispose(this, inspection).thenReturn(value);
+ }
+
+ function disposerFail(reason) {
+ var inspection = new PromiseInspection();
+ inspection._settledValue = reason;
+ inspection._bitField = 134217728;
+ return dispose(this, inspection).thenThrow(reason);
+ }
+
+ function Disposer(data, promise, context) {
+ this._data = data;
+ this._promise = promise;
+ this._context = context;
+ }
+
+ Disposer.prototype.data = function () {
+ return this._data;
+ };
+
+ Disposer.prototype.promise = function () {
+ return this._promise;
+ };
+
+ Disposer.prototype.resource = function () {
+ if (this.promise().isFulfilled()) {
+ return this.promise().value();
+ }
+ return null;
+ };
+
+ Disposer.prototype.tryDispose = function(inspection) {
+ var resource = this.resource();
+ var context = this._context;
+ if (context !== undefined) context._pushContext();
+ var ret = resource !== null
+ ? this.doDispose(resource, inspection) : null;
+ if (context !== undefined) context._popContext();
+ this._promise._unsetDisposable();
+ this._data = null;
+ return ret;
+ };
+
+ Disposer.isDisposer = function (d) {
+ return (d != null &&
+ typeof d.resource === "function" &&
+ typeof d.tryDispose === "function");
+ };
+
+ function FunctionDisposer(fn, promise, context) {
+ this.constructor$(fn, promise, context);
+ }
+ inherits(FunctionDisposer, Disposer);
+
+ FunctionDisposer.prototype.doDispose = function (resource, inspection) {
+ var fn = this.data();
+ return fn.call(resource, resource, inspection);
+ };
+
+ function maybeUnwrapDisposer(value) {
+ if (Disposer.isDisposer(value)) {
+ this.resources[this.index]._setDisposable(value);
+ return value.promise();
+ }
+ return value;
+ }
+
+ Promise.using = function () {
+ var len = arguments.length;
+ if (len < 2) return apiRejection(
+ "you must pass at least 2 arguments to Promise.using");
+ var fn = arguments[len - 1];
+ if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+
+ var input;
+ var spreadArgs = true;
+ if (len === 2 && Array.isArray(arguments[0])) {
+ input = arguments[0];
+ len = input.length;
+ spreadArgs = false;
+ } else {
+ input = arguments;
+ len--;
+ }
+ var resources = new Array(len);
+ for (var i = 0; i < len; ++i) {
+ var resource = input[i];
+ if (Disposer.isDisposer(resource)) {
+ var disposer = resource;
+ resource = resource.promise();
+ resource._setDisposable(disposer);
+ } else {
+ var maybePromise = tryConvertToPromise(resource);
+ if (maybePromise instanceof Promise) {
+ resource =
+ maybePromise._then(maybeUnwrapDisposer, null, null, {
+ resources: resources,
+ index: i
+ }, undefined);
+ }
+ }
+ resources[i] = resource;
+ }
+
+ var promise = Promise.settle(resources)
+ .then(inspectionMapper)
+ .then(function(vals) {
+ promise._pushContext();
+ var ret;
+ try {
+ ret = spreadArgs
+ ? fn.apply(undefined, vals) : fn.call(undefined, vals);
+ } finally {
+ promise._popContext();
+ }
+ return ret;
+ })
+ ._then(
+ disposerSuccess, disposerFail, undefined, resources, undefined);
+ resources.promise = promise;
+ return promise;
+ };
+
+ Promise.prototype._setDisposable = function (disposer) {
+ this._bitField = this._bitField | 262144;
+ this._disposer = disposer;
+ };
+
+ Promise.prototype._isDisposable = function () {
+ return (this._bitField & 262144) > 0;
+ };
+
+ Promise.prototype._getDisposer = function () {
+ return this._disposer;
+ };
+
+ Promise.prototype._unsetDisposable = function () {
+ this._bitField = this._bitField & (~262144);
+ this._disposer = undefined;
+ };
+
+ Promise.prototype.disposer = function (fn) {
+ if (typeof fn === "function") {
+ return new FunctionDisposer(fn, this, createContext());
+ }
+ throw new TypeError();
+ };
+
+};
+
+},{"./errors.js":13,"./util.js":38}],38:[function(_dereq_,module,exports){
+"use strict";
+var es5 = _dereq_("./es5.js");
+var canEvaluate = typeof navigator == "undefined";
+var haveGetters = (function(){
+ try {
+ var o = {};
+ es5.defineProperty(o, "f", {
+ get: function () {
+ return 3;
+ }
+ });
+ return o.f === 3;
+ }
+ catch (e) {
+ return false;
+ }
+
+})();
+
+var errorObj = {e: {}};
+var tryCatchTarget;
+function tryCatcher() {
+ try {
+ var target = tryCatchTarget;
+ tryCatchTarget = null;
+ return target.apply(this, arguments);
+ } catch (e) {
+ errorObj.e = e;
+ return errorObj;
+ }
+}
+function tryCatch(fn) {
+ tryCatchTarget = fn;
+ return tryCatcher;
+}
+
+var inherits = function(Child, Parent) {
+ var hasProp = {}.hasOwnProperty;
+
+ function T() {
+ this.constructor = Child;
+ this.constructor$ = Parent;
+ for (var propertyName in Parent.prototype) {
+ if (hasProp.call(Parent.prototype, propertyName) &&
+ propertyName.charAt(propertyName.length-1) !== "$"
+ ) {
+ this[propertyName + "$"] = Parent.prototype[propertyName];
+ }
+ }
+ }
+ T.prototype = Parent.prototype;
+ Child.prototype = new T();
+ return Child.prototype;
+};
+
+
+function isPrimitive(val) {
+ return val == null || val === true || val === false ||
+ typeof val === "string" || typeof val === "number";
+
+}
+
+function isObject(value) {
+ return !isPrimitive(value);
+}
+
+function maybeWrapAsError(maybeError) {
+ if (!isPrimitive(maybeError)) return maybeError;
+
+ return new Error(safeToString(maybeError));
+}
+
+function withAppended(target, appendee) {
+ var len = target.length;
+ var ret = new Array(len + 1);
+ var i;
+ for (i = 0; i < len; ++i) {
+ ret[i] = target[i];
+ }
+ ret[i] = appendee;
+ return ret;
+}
+
+function getDataPropertyOrDefault(obj, key, defaultValue) {
+ if (es5.isES5) {
+ var desc = Object.getOwnPropertyDescriptor(obj, key);
+
+ if (desc != null) {
+ return desc.get == null && desc.set == null
+ ? desc.value
+ : defaultValue;
+ }
+ } else {
+ return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined;
+ }
+}
+
+function notEnumerableProp(obj, name, value) {
+ if (isPrimitive(obj)) return obj;
+ var descriptor = {
+ value: value,
+ configurable: true,
+ enumerable: false,
+ writable: true
+ };
+ es5.defineProperty(obj, name, descriptor);
+ return obj;
+}
+
+function thrower(r) {
+ throw r;
+}
+
+var inheritedDataKeys = (function() {
+ var excludedPrototypes = [
+ Array.prototype,
+ Object.prototype,
+ Function.prototype
+ ];
+
+ var isExcludedProto = function(val) {
+ for (var i = 0; i < excludedPrototypes.length; ++i) {
+ if (excludedPrototypes[i] === val) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ if (es5.isES5) {
+ var getKeys = Object.getOwnPropertyNames;
+ return function(obj) {
+ var ret = [];
+ var visitedKeys = Object.create(null);
+ while (obj != null && !isExcludedProto(obj)) {
+ var keys;
+ try {
+ keys = getKeys(obj);
+ } catch (e) {
+ return ret;
+ }
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (visitedKeys[key]) continue;
+ visitedKeys[key] = true;
+ var desc = Object.getOwnPropertyDescriptor(obj, key);
+ if (desc != null && desc.get == null && desc.set == null) {
+ ret.push(key);
+ }
+ }
+ obj = es5.getPrototypeOf(obj);
+ }
+ return ret;
+ };
+ } else {
+ var hasProp = {}.hasOwnProperty;
+ return function(obj) {
+ if (isExcludedProto(obj)) return [];
+ var ret = [];
+
+ /*jshint forin:false */
+ enumeration: for (var key in obj) {
+ if (hasProp.call(obj, key)) {
+ ret.push(key);
+ } else {
+ for (var i = 0; i < excludedPrototypes.length; ++i) {
+ if (hasProp.call(excludedPrototypes[i], key)) {
+ continue enumeration;
+ }
+ }
+ ret.push(key);
+ }
+ }
+ return ret;
+ };
+ }
+
+})();
+
+var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/;
+function isClass(fn) {
+ try {
+ if (typeof fn === "function") {
+ var keys = es5.names(fn.prototype);
+
+ var hasMethods = es5.isES5 && keys.length > 1;
+ var hasMethodsOtherThanConstructor = keys.length > 0 &&
+ !(keys.length === 1 && keys[0] === "constructor");
+ var hasThisAssignmentAndStaticMethods =
+ thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0;
+
+ if (hasMethods || hasMethodsOtherThanConstructor ||
+ hasThisAssignmentAndStaticMethods) {
+ return true;
+ }
+ }
+ return false;
+ } catch (e) {
+ return false;
+ }
+}
+
+function toFastProperties(obj) {
+ /*jshint -W027,-W055,-W031*/
+ function f() {}
+ f.prototype = obj;
+ var l = 8;
+ while (l--) new f();
+ return obj;
+ eval(obj);
+}
+
+var rident = /^[a-z$_][a-z$_0-9]*$/i;
+function isIdentifier(str) {
+ return rident.test(str);
+}
+
+function filledRange(count, prefix, suffix) {
+ var ret = new Array(count);
+ for(var i = 0; i < count; ++i) {
+ ret[i] = prefix + i + suffix;
+ }
+ return ret;
+}
+
+function safeToString(obj) {
+ try {
+ return obj + "";
+ } catch (e) {
+ return "[no string representation]";
+ }
+}
+
+function markAsOriginatingFromRejection(e) {
+ try {
+ notEnumerableProp(e, "isOperational", true);
+ }
+ catch(ignore) {}
+}
+
+function originatesFromRejection(e) {
+ if (e == null) return false;
+ return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) ||
+ e["isOperational"] === true);
+}
+
+function canAttachTrace(obj) {
+ return obj instanceof Error && es5.propertyIsWritable(obj, "stack");
+}
+
+var ensureErrorObject = (function() {
+ if (!("stack" in new Error())) {
+ return function(value) {
+ if (canAttachTrace(value)) return value;
+ try {throw new Error(safeToString(value));}
+ catch(err) {return err;}
+ };
+ } else {
+ return function(value) {
+ if (canAttachTrace(value)) return value;
+ return new Error(safeToString(value));
+ };
+ }
+})();
+
+function classString(obj) {
+ return {}.toString.call(obj);
+}
+
+function copyDescriptors(from, to, filter) {
+ var keys = es5.names(from);
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (filter(key)) {
+ try {
+ es5.defineProperty(to, key, es5.getDescriptor(from, key));
+ } catch (ignore) {}
+ }
+ }
+}
+
+var ret = {
+ isClass: isClass,
+ isIdentifier: isIdentifier,
+ inheritedDataKeys: inheritedDataKeys,
+ getDataPropertyOrDefault: getDataPropertyOrDefault,
+ thrower: thrower,
+ isArray: es5.isArray,
+ haveGetters: haveGetters,
+ notEnumerableProp: notEnumerableProp,
+ isPrimitive: isPrimitive,
+ isObject: isObject,
+ canEvaluate: canEvaluate,
+ errorObj: errorObj,
+ tryCatch: tryCatch,
+ inherits: inherits,
+ withAppended: withAppended,
+ maybeWrapAsError: maybeWrapAsError,
+ toFastProperties: toFastProperties,
+ filledRange: filledRange,
+ toString: safeToString,
+ canAttachTrace: canAttachTrace,
+ ensureErrorObject: ensureErrorObject,
+ originatesFromRejection: originatesFromRejection,
+ markAsOriginatingFromRejection: markAsOriginatingFromRejection,
+ classString: classString,
+ copyDescriptors: copyDescriptors,
+ hasDevTools: typeof chrome !== "undefined" && chrome &&
+ typeof chrome.loadTimes === "function",
+ isNode: typeof process !== "undefined" &&
+ classString(process).toLowerCase() === "[object process]"
+};
+ret.isRecentNode = ret.isNode && (function() {
+ var version = process.versions.node.split(".").map(Number);
+ return (version[0] === 0 && version[1] > 10) || (version[0] > 0);
+})();
+
+if (ret.isNode) ret.toFastProperties(process);
+
+try {throw new Error(); } catch (e) {ret.lastLineError = e;}
+module.exports = ret;
+
+},{"./es5.js":14}]},{},[4])(4)
+}); ;if (typeof window !== 'undefined' && window !== null) { window.P = window.Promise; } else if (typeof self !== 'undefined' && self !== null) { self.P = self.Promise; } \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/browser/bluebird.min.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/browser/bluebird.min.js
new file mode 100644
index 0000000..9d066dd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/browser/bluebird.min.js
@@ -0,0 +1,31 @@
+/* @preserve
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2013-2015 Petka Antonov
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ */
+/**
+ * bluebird build version 2.10.2
+ * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, cancel, using, filter, any, each, timers
+*/
+!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,r;return function n(t,e,r){function i(s,a){if(!e[s]){if(!t[s]){var u="function"==typeof _dereq_&&_dereq_;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=e[s]={exports:{}};t[s][0].call(l.exports,function(e){var r=t[s][1][e];return i(r?r:e)},l,l.exports,n,t,e,r)}return e[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(t,e){"use strict";e.exports=function(t){function e(t){var e=new r(t),n=e.promise();return e.setHowMany(1),e.setUnwrap(),e.init(),n}var r=t._SomePromiseArray;t.any=function(t){return e(t)},t.prototype.any=function(){return e(this)}}},{}],2:[function(t,e){"use strict";function r(){this._isTickUsed=!1,this._lateQueue=new c(16),this._normalQueue=new c(16),this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=u.isStatic?u(this.drainQueues):u}function n(t,e,r){this._lateQueue.push(t,e,r),this._queueTick()}function i(t,e,r){this._normalQueue.push(t,e,r),this._queueTick()}function o(t){this._normalQueue._pushOne(t),this._queueTick()}var s;try{throw new Error}catch(a){s=a}var u=t("./schedule.js"),c=t("./queue.js"),l=t("./util.js");r.prototype.disableTrampolineIfNecessary=function(){l.hasDevTools&&(this._trampolineEnabled=!1)},r.prototype.enableTrampoline=function(){this._trampolineEnabled||(this._trampolineEnabled=!0,this._schedule=function(t){setTimeout(t,0)})},r.prototype.haveItemsQueued=function(){return this._normalQueue.length()>0},r.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(r){throw new Error("No async scheduler available\n\n See http://goo.gl/m3OTXk\n")}},l.hasDevTools?(u.isStatic&&(u=function(t){setTimeout(t,0)}),r.prototype.invokeLater=function(t,e,r){this._trampolineEnabled?n.call(this,t,e,r):this._schedule(function(){setTimeout(function(){t.call(e,r)},100)})},r.prototype.invoke=function(t,e,r){this._trampolineEnabled?i.call(this,t,e,r):this._schedule(function(){t.call(e,r)})},r.prototype.settlePromises=function(t){this._trampolineEnabled?o.call(this,t):this._schedule(function(){t._settlePromises()})}):(r.prototype.invokeLater=n,r.prototype.invoke=i,r.prototype.settlePromises=o),r.prototype.invokeFirst=function(t,e,r){this._normalQueue.unshift(t,e,r),this._queueTick()},r.prototype._drainQueue=function(t){for(;t.length()>0;){var e=t.shift();if("function"==typeof e){var r=t.shift(),n=t.shift();e.call(r,n)}else e._settlePromises()}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=new r,e.exports.firstLineError=s},{"./queue.js":28,"./schedule.js":31,"./util.js":38}],3:[function(t,e){"use strict";e.exports=function(t,e,r){var n=function(t,e){this._reject(e)},i=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(n,n,null,this,t)},o=function(t,e){this._isPending()&&this._resolveCallback(e.target)},s=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(n){var a=r(n),u=new t(e);u._propagateFrom(this,1);var c=this._target();if(u._setBoundTo(a),a instanceof t){var l={promiseRejectionQueued:!1,promise:u,target:c,bindingPromise:a};c._then(e,i,u._progress,u,l),a._then(o,s,u._progress,u,l)}else u._resolveCallback(c);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=131072|this._bitField,this._boundTo=t):this._bitField=-131073&this._bitField},t.prototype._isBound=function(){return 131072===(131072&this._bitField)},t.bind=function(n,i){var o=r(n),s=new t(e);return s._setBoundTo(o),o instanceof t?o._then(function(){s._resolveCallback(i)},s._reject,s._progress,s,null):s._resolveCallback(i),s}}},{}],4:[function(t,e){"use strict";function r(){try{Promise===i&&(Promise=n)}catch(t){}return i}var n;"undefined"!=typeof Promise&&(n=Promise);var i=t("./promise.js")();i.noConflict=r,e.exports=i},{"./promise.js":23}],5:[function(t,e){"use strict";var r=Object.create;if(r){var n=r(null),i=r(null);n[" size"]=i[" size"]=0}e.exports=function(e){function r(t,r){var n;if(null!=t&&(n=t[r]),"function"!=typeof n){var i="Object "+a.classString(t)+" has no method '"+a.toString(r)+"'";throw new e.TypeError(i)}return n}function n(t){var e=this.pop(),n=r(t,e);return n.apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return 0>e&&(e=Math.max(0,e+t.length)),t[e]}{var s,a=t("./util.js"),u=a.canEvaluate;a.isIdentifier}e.prototype.call=function(t){for(var e=arguments.length,r=new Array(e-1),i=1;e>i;++i)r[i-1]=arguments[i];return r.push(t),this._then(n,void 0,void 0,r,void 0)},e.prototype.get=function(t){var e,r="number"==typeof t;if(r)e=o;else if(u){var n=s(t);e=null!==n?n:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util.js":38}],6:[function(t,e){"use strict";e.exports=function(e){var r=t("./errors.js"),n=t("./async.js"),i=r.CancellationError;e.prototype._cancel=function(t){if(!this.isCancellable())return this;for(var e,r=this;void 0!==(e=r._cancellationParent)&&e.isCancellable();)r=e;this._unsetCancellable(),r._target()._rejectCallback(t,!1,!0)},e.prototype.cancel=function(t){return this.isCancellable()?(void 0===t&&(t=new i),n.invokeLater(this._cancel,this,t),this):this},e.prototype.cancellable=function(){return this._cancellable()?this:(n.enableTrampoline(),this._setCancellable(),this._cancellationParent=void 0,this)},e.prototype.uncancellable=function(){var t=this.then();return t._unsetCancellable(),t},e.prototype.fork=function(t,e,r){var n=this._then(t,e,r,void 0,void 0);return n._setCancellable(),n._cancellationParent=void 0,n}}},{"./async.js":2,"./errors.js":13}],7:[function(t,e){"use strict";e.exports=function(){function e(t){this._parent=t;var r=this._length=1+(void 0===t?0:t._length);j(this,e),r>32&&this.uncycle()}function r(t,e){for(var r=0;r<e.length-1;++r)e[r].push("From previous event:"),e[r]=e[r].join("\n");return r<e.length&&(e[r]=e[r].join("\n")),t+"\n"+e.join("\n")}function n(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}function i(t){for(var e=t[0],r=1;r<t.length;++r){for(var n=t[r],i=e.length-1,o=e[i],s=-1,a=n.length-1;a>=0;--a)if(n[a]===o){s=a;break}for(var a=s;a>=0;--a){var u=n[a];if(e[i]!==u)break;e.pop(),i--}e=n}}function o(t){for(var e=[],r=0;r<t.length;++r){var n=t[r],i=_.test(n)||" (No stack trace)"===n,o=i&&y(n);i&&!o&&(v&&" "!==n.charAt(0)&&(n=" "+n),e.push(n))}return e}function s(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),r=0;r<e.length;++r){var n=e[r];if(" (No stack trace)"===n||_.test(n))break}return r>0&&(e=e.slice(r)),e}function a(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t.toString();var r=/\[object [a-zA-Z0-9$_]+\]/;if(r.test(e))try{var n=JSON.stringify(t);e=n}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+u(e)+">, no stack trace)"}function u(t){var e=41;return t.length<e?t:t.substr(0,e-3)+"..."}function c(t){var e=t.match(g);return e?{fileName:e[1],line:parseInt(e[2],10)}:void 0}var l,h=t("./async.js"),p=t("./util.js"),f=/[\\\/]bluebird[\\\/]js[\\\/](main|debug|zalgo|instrumented)/,_=null,d=null,v=!1;p.inherits(e,Error),e.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],r={},n=0,i=this;void 0!==i;++n)e.push(i),i=i._parent;t=this._length=n;for(var n=t-1;n>=0;--n){var o=e[n].stack;void 0===r[o]&&(r[o]=n)}for(var n=0;t>n;++n){var s=e[n].stack,a=r[s];if(void 0!==a&&a!==n){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[n]._parent=void 0,e[n]._length=1;var u=n>0?e[n-1]:this;t-1>a?(u._parent=e[a+1],u._parent.uncycle(),u._length=u._parent._length+1):(u._parent=void 0,u._length=1);for(var c=u._length+1,l=n-2;l>=0;--l)e[l]._length=c,c++;return}}}},e.prototype.parent=function(){return this._parent},e.prototype.hasParent=function(){return void 0!==this._parent},e.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var s=e.parseStackAndMessage(t),a=s.message,u=[s.stack],c=this;void 0!==c;)u.push(o(c.stack.split("\n"))),c=c._parent;i(u),n(u),p.notEnumerableProp(t,"stack",r(a,u)),p.notEnumerableProp(t,"__stackCleaned__",!0)}},e.parseStackAndMessage=function(t){var e=t.stack,r=t.toString();return e="string"==typeof e&&e.length>0?s(t):[" (No stack trace)"],{message:r,stack:o(e)}},e.formatAndLogError=function(t,e){if("undefined"!=typeof console){var r;if("object"==typeof t||"function"==typeof t){var n=t.stack;r=e+d(n,t)}else r=e+String(t);"function"==typeof l?l(r):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}},e.unhandledRejection=function(t){e.formatAndLogError(t,"^--- With additional stack trace: ")},e.isSupported=function(){return"function"==typeof j},e.fireRejectionEvent=function(t,r,n,i){var o=!1;try{"function"==typeof r&&(o=!0,"rejectionHandled"===t?r(i):r(n,i))}catch(s){h.throwLater(s)}var a=!1;try{a=b(t,n,i)}catch(s){a=!0,h.throwLater(s)}var u=!1;if(m)try{u=m(t.toLowerCase(),{reason:n,promise:i})}catch(s){u=!0,h.throwLater(s)}a||o||u||"unhandledRejection"!==t||e.formatAndLogError(n,"Unhandled rejection ")};var y=function(){return!1},g=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;e.setBounds=function(t,r){if(e.isSupported()){for(var n,i,o=t.stack.split("\n"),s=r.stack.split("\n"),a=-1,u=-1,l=0;l<o.length;++l){var h=c(o[l]);if(h){n=h.fileName,a=h.line;break}}for(var l=0;l<s.length;++l){var h=c(s[l]);if(h){i=h.fileName,u=h.line;break}}0>a||0>u||!n||!i||n!==i||a>=u||(y=function(t){if(f.test(t))return!0;var e=c(t);return e&&e.fileName===n&&a<=e.line&&e.line<=u?!0:!1})}};var m,j=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():a(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit=Error.stackTraceLimit+6,_=t,d=e;var r=Error.captureStackTrace;return y=function(t){return f.test(t)},function(t,e){Error.stackTraceLimit=Error.stackTraceLimit+6,r(t,e),Error.stackTraceLimit=Error.stackTraceLimit-6}}var n=new Error;if("string"==typeof n.stack&&n.stack.split("\n")[0].indexOf("stackDetection@")>=0)return _=/@/,d=e,v=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in n||!i||"number"!=typeof Error.stackTraceLimit?(d=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?a(e):e.toString()},null):(_=t,d=e,function(t){Error.stackTraceLimit=Error.stackTraceLimit+6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit=Error.stackTraceLimit-6})}([]),b=function(){if(p.isNode)return function(t,e,r){return"rejectionHandled"===t?process.emit(t,r):process.emit(t,e,r)};var t=!1,e=!0;try{var r=new self.CustomEvent("test");t=r instanceof CustomEvent}catch(n){}if(!t)try{var i=document.createEvent("CustomEvent");i.initCustomEvent("testingtheevent",!1,!0,{}),self.dispatchEvent(i)}catch(n){e=!1}e&&(m=function(e,r){var n;return t?n=new self.CustomEvent(e,{detail:r,bubbles:!1,cancelable:!0}):self.dispatchEvent&&(n=document.createEvent("CustomEvent"),n.initCustomEvent(e,!1,!0,r)),n?!self.dispatchEvent(n):!1});var o={};return o.unhandledRejection="onunhandledRejection".toLowerCase(),o.rejectionHandled="onrejectionHandled".toLowerCase(),function(t,e,r){var n=o[t],i=self[n];return i?("rejectionHandled"===t?i.call(self,r):i.call(self,e,r),!0):!1}}();return"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(l=function(t){console.warn(t)},p.isNode&&process.stderr.isTTY?l=function(t){process.stderr.write(""+t+"\n")}:p.isNode||"string"!=typeof(new Error).stack||(l=function(t){console.warn("%c"+t,"color: red")})),e}},{"./async.js":2,"./util.js":38}],8:[function(t,e){"use strict";e.exports=function(e){function r(t,e,r){this._instances=t,this._callback=e,this._promise=r}function n(t,e){var r={},n=s(t).call(r,e);if(n===a)return n;var i=u(r);return i.length?(a.e=new c("Catch filter must inherit from Error or be a simple predicate function\n\n See http://goo.gl/o84o68\n"),a):n}var i=t("./util.js"),o=t("./errors.js"),s=i.tryCatch,a=i.errorObj,u=t("./es5.js").keys,c=o.TypeError;return r.prototype.doFilter=function(t){for(var r=this._callback,i=this._promise,o=i._boundValue(),u=0,c=this._instances.length;c>u;++u){var l=this._instances[u],h=l===Error||null!=l&&l.prototype instanceof Error;if(h&&t instanceof l){var p=s(r).call(o,t);return p===a?(e.e=p.e,e):p}if("function"==typeof l&&!h){var f=n(l,t);if(f===a){t=a.e;break}if(f){var p=s(r).call(o,t);return p===a?(e.e=p.e,e):p}}}return e.e=t,e},r}},{"./errors.js":13,"./es5.js":14,"./util.js":38}],9:[function(t,e){"use strict";e.exports=function(t,e,r){function n(){this._trace=new e(o())}function i(){return r()?new n:void 0}function o(){var t=s.length-1;return t>=0?s[t]:void 0}var s=[];return n.prototype._pushContext=function(){r()&&void 0!==this._trace&&s.push(this._trace)},n.prototype._popContext=function(){r()&&void 0!==this._trace&&s.pop()},t.prototype._peekContext=o,t.prototype._pushContext=n.prototype._pushContext,t.prototype._popContext=n.prototype._popContext,i}},{}],10:[function(t,e){"use strict";e.exports=function(e,r){var n,i,o=e._getDomain,s=t("./async.js"),a=t("./errors.js").Warning,u=t("./util.js"),c=u.canAttachTrace,l=!1||u.isNode&&(!!process.env.BLUEBIRD_DEBUG||"development"===process.env.NODE_ENV);return u.isNode&&0==process.env.BLUEBIRD_DEBUG&&(l=!1),l&&s.disableTrampolineIfNecessary(),e.prototype._ignoreRejections=function(){this._unsetRejectionIsUnhandled(),this._bitField=16777216|this._bitField},e.prototype._ensurePossibleRejectionHandled=function(){0===(16777216&this._bitField)&&(this._setRejectionIsUnhandled(),s.invokeLater(this._notifyUnhandledRejection,this,void 0))},e.prototype._notifyUnhandledRejectionIsHandled=function(){r.fireRejectionEvent("rejectionHandled",n,void 0,this)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._getCarriedStackTrace()||this._settledValue;this._setUnhandledRejectionIsNotified(),r.fireRejectionEvent("unhandledRejection",i,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=524288|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-524289&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(524288&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=2097152|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-2097153&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(2097152&this._bitField)>0},e.prototype._setCarriedStackTrace=function(t){this._bitField=1048576|this._bitField,this._fulfillmentHandler0=t},e.prototype._isCarryingStackTrace=function(){return(1048576&this._bitField)>0},e.prototype._getCarriedStackTrace=function(){return this._isCarryingStackTrace()?this._fulfillmentHandler0:void 0},e.prototype._captureStackTrace=function(){return l&&(this._trace=new r(this._peekContext())),this},e.prototype._attachExtraTrace=function(t,e){if(l&&c(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var i=r.parseStackAndMessage(t);u.notEnumerableProp(t,"stack",i.message+"\n"+i.stack.join("\n")),u.notEnumerableProp(t,"__stackCleaned__",!0)}}},e.prototype._warn=function(t){var e=new a(t),n=this._peekContext();if(n)n.attachExtraTrace(e);else{var i=r.parseStackAndMessage(e);e.stack=i.message+"\n"+i.stack.join("\n")}r.formatAndLogError(e,"")},e.onPossiblyUnhandledRejection=function(t){var e=o();i="function"==typeof t?null===e?t:e.bind(t):void 0},e.onUnhandledRejectionHandled=function(t){var e=o();n="function"==typeof t?null===e?t:e.bind(t):void 0},e.longStackTraces=function(){if(s.haveItemsQueued()&&l===!1)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/DT1qyG\n");l=r.isSupported(),l&&s.disableTrampolineIfNecessary()},e.hasLongStackTraces=function(){return l&&r.isSupported()},r.isSupported()||(e.longStackTraces=function(){},l=!1),function(){return l}}},{"./async.js":2,"./errors.js":13,"./util.js":38}],11:[function(t,e){"use strict";var r=t("./util.js"),n=r.isPrimitive;e.exports=function(t){var e=function(){return this},r=function(){throw this},i=function(){},o=function(){throw void 0},s=function(t,e){return 1===e?function(){throw t}:2===e?function(){return t}:void 0};t.prototype["return"]=t.prototype.thenReturn=function(r){return void 0===r?this.then(i):n(r)?this._then(s(r,2),void 0,void 0,void 0,void 0):(r instanceof t&&r._ignoreRejections(),this._then(e,void 0,void 0,r,void 0))},t.prototype["throw"]=t.prototype.thenThrow=function(t){return void 0===t?this.then(o):n(t)?this._then(s(t,1),void 0,void 0,void 0,void 0):this._then(r,void 0,void 0,t,void 0)}}},{"./util.js":38}],12:[function(t,e){"use strict";e.exports=function(t,e){var r=t.reduce;t.prototype.each=function(t){return r(this,t,null,e)},t.each=function(t,n){return r(t,n,null,e)}}},{}],13:[function(t,e){"use strict";function r(t,e){function r(n){return this instanceof r?(l(this,"message","string"==typeof n?n:e),l(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new r(n)}return c(r,Error),r}function n(t){return this instanceof n?(l(this,"name","OperationalError"),l(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(l(this,"message",t.message),l(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new n(t)}var i,o,s=t("./es5.js"),a=s.freeze,u=t("./util.js"),c=u.inherits,l=u.notEnumerableProp,h=r("Warning","warning"),p=r("CancellationError","cancellation error"),f=r("TimeoutError","timeout error"),_=r("AggregateError","aggregate error");try{i=TypeError,o=RangeError}catch(d){i=r("TypeError","type error"),o=r("RangeError","range error")}for(var v="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),y=0;y<v.length;++y)"function"==typeof Array.prototype[v[y]]&&(_.prototype[v[y]]=Array.prototype[v[y]]);s.defineProperty(_.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),_.prototype.isOperational=!0;var g=0;_.prototype.toString=function(){var t=Array(4*g+1).join(" "),e="\n"+t+"AggregateError of:\n";g++,t=Array(4*g+1).join(" ");for(var r=0;r<this.length;++r){for(var n=this[r]===this?"[Circular AggregateError]":this[r]+"",i=n.split("\n"),o=0;o<i.length;++o)i[o]=t+i[o];n=i.join("\n"),e+=n+"\n"}return g--,e},c(n,Error);var m=Error.__BluebirdErrorTypes__;m||(m=a({CancellationError:p,TimeoutError:f,OperationalError:n,RejectionError:n,AggregateError:_}),l(Error,"__BluebirdErrorTypes__",m)),e.exports={Error:Error,TypeError:i,RangeError:o,CancellationError:m.CancellationError,OperationalError:m.OperationalError,TimeoutError:m.TimeoutError,AggregateError:m.AggregateError,Warning:h}},{"./es5.js":14,"./util.js":38}],14:[function(t,e){var r=function(){"use strict";return void 0===this}();if(r)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:r,propertyIsWritable:function(t,e){var r=Object.getOwnPropertyDescriptor(t,e);return!(r&&!r.writable&&!r.set)}};else{var n={}.hasOwnProperty,i={}.toString,o={}.constructor.prototype,s=function(t){var e=[];for(var r in t)n.call(t,r)&&e.push(r);return e},a=function(t,e){return{value:t[e]}},u=function(t,e,r){return t[e]=r.value,t},c=function(t){return t},l=function(t){try{return Object(t).constructor.prototype}catch(e){return o}},h=function(t){try{return"[object Array]"===i.call(t)}catch(e){return!1}};e.exports={isArray:h,keys:s,names:s,defineProperty:u,getDescriptor:a,freeze:c,getPrototypeOf:l,isES5:r,propertyIsWritable:function(){return!0}}}},{}],15:[function(t,e){"use strict";e.exports=function(t,e){var r=t.map;t.prototype.filter=function(t,n){return r(this,t,n,e)},t.filter=function(t,n,i){return r(t,n,i,e)}}},{}],16:[function(t,e){"use strict";e.exports=function(e,r,n){function i(){return this}function o(){throw this}function s(t){return function(){return t}}function a(t){return function(){throw t}}function u(t,e,r){var n;return n=p(e)?r?s(e):a(e):r?i:o,t._then(n,f,void 0,e,void 0)}function c(t){var i=this.promise,o=this.handler,s=i._isBound()?o.call(i._boundValue()):o();if(void 0!==s){var a=n(s,i);if(a instanceof e)return a=a._target(),u(a,t,i.isFulfilled())}return i.isRejected()?(r.e=t,r):t}function l(t){var r=this.promise,i=this.handler,o=r._isBound()?i.call(r._boundValue(),t):i(t);if(void 0!==o){var s=n(o,r);if(s instanceof e)return s=s._target(),u(s,t,!0)}return t}var h=t("./util.js"),p=h.isPrimitive,f=h.thrower;e.prototype._passThroughHandler=function(t,e){if("function"!=typeof t)return this.then();var r={promise:this,handler:t};return this._then(e?c:l,e?c:void 0,void 0,r,void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThroughHandler(t,!0)},e.prototype.tap=function(t){return this._passThroughHandler(t,!1)}}},{"./util.js":38}],17:[function(t,e){"use strict";e.exports=function(e,r,n,i){function o(t,r,n){for(var o=0;o<r.length;++o){n._pushContext();var s=h(r[o])(t);if(n._popContext(),s===l){n._pushContext();var a=e.reject(l.e);return n._popContext(),a}var u=i(s,n);if(u instanceof e)return u}return null}function s(t,r,i,o){var s=this._promise=new e(n);s._captureStackTrace(),this._stack=o,this._generatorFunction=t,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(p):p}var a=t("./errors.js"),u=a.TypeError,c=t("./util.js"),l=c.errorObj,h=c.tryCatch,p=[];s.prototype.promise=function(){return this._promise},s.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._next(void 0)},s.prototype._continue=function(t){if(t===l)return this._promise._rejectCallback(t.e,!1,!0);var r=t.value;if(t.done===!0)this._promise._resolveCallback(r);else{var n=i(r,this._promise);if(!(n instanceof e)&&(n=o(n,this._yieldHandlers,this._promise),null===n))return void this._throw(new u("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/4Y4pDk\n\n".replace("%s",r)+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")));n._then(this._next,this._throw,void 0,this,null)}},s.prototype._throw=function(t){this._promise._attachExtraTrace(t),this._promise._pushContext();var e=h(this._generator["throw"]).call(this._generator,t);this._promise._popContext(),this._continue(e)},s.prototype._next=function(t){this._promise._pushContext();var e=h(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},e.coroutine=function(t,e){if("function"!=typeof t)throw new u("generatorFunction must be a function\n\n See http://goo.gl/6Vqhm0\n");var r=Object(e).yieldHandler,n=s,i=(new Error).stack;return function(){var e=t.apply(this,arguments),o=new n(void 0,void 0,r,i);return o._generator=e,o._next(void 0),o.promise()}},e.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new u("fn must be a function\n\n See http://goo.gl/916lJJ\n");p.push(t)},e.spawn=function(t){if("function"!=typeof t)return r("generatorFunction must be a function\n\n See http://goo.gl/6Vqhm0\n");var n=new s(t,this),i=n.promise();return n._run(e.spawn),i}}},{"./errors.js":13,"./util.js":38}],18:[function(t,e){"use strict";e.exports=function(e,r,n,i){{var o=t("./util.js");o.canEvaluate,o.tryCatch,o.errorObj}e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var n}for(var i=arguments.length,o=new Array(i),s=0;i>s;++s)o[s]=arguments[s];t&&o.pop();var n=new r(o).promise();return void 0!==t?n.spread(t):n}}},{"./util.js":38}],19:[function(t,e){"use strict";e.exports=function(e,r,n,i,o){function s(t,e,r,n){this.constructor$(t),this._promise._captureStackTrace();var i=c();this._callback=null===i?e:i.bind(e),this._preservedValues=n===o?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=r>=1?[]:d,l.invoke(a,this,void 0)}function a(){this._init$(void 0,-2)}function u(t,e,r,n){var i="object"==typeof r&&null!==r?r.concurrency:0;return i="number"==typeof i&&isFinite(i)&&i>=1?i:0,new s(t,e,i,n)}var c=e._getDomain,l=t("./async.js"),h=t("./util.js"),p=h.tryCatch,f=h.errorObj,_={},d=[];h.inherits(s,r),s.prototype._init=function(){},s.prototype._promiseFulfilled=function(t,r){var n=this._values,o=this.length(),s=this._preservedValues,a=this._limit;if(n[r]===_){if(n[r]=t,a>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return}else{if(a>=1&&this._inFlight>=a)return n[r]=t,void this._queue.push(r);null!==s&&(s[r]=t);var u=this._callback,c=this._promise._boundValue();this._promise._pushContext();var l=p(u).call(c,t,r,o);if(this._promise._popContext(),l===f)return this._reject(l.e);var h=i(l,this._promise);if(h instanceof e){if(h=h._target(),h._isPending())return a>=1&&this._inFlight++,n[r]=_,h._proxyPromiseArray(this,r);if(!h._isFulfilled())return this._reject(h._reason());l=h._value()}n[r]=l}var d=++this._totalResolved;d>=o&&(null!==s?this._filter(n,s):this._resolve(n))},s.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,r=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var n=t.pop();this._promiseFulfilled(r[n],n)}},s.prototype._filter=function(t,e){for(var r=e.length,n=new Array(r),i=0,o=0;r>o;++o)t[o]&&(n[i++]=e[o]);n.length=i,this._resolve(n)},s.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return"function"!=typeof t?n("fn must be a function\n\n See http://goo.gl/916lJJ\n"):u(this,t,e,null).promise()},e.map=function(t,e,r,i){return"function"!=typeof e?n("fn must be a function\n\n See http://goo.gl/916lJJ\n"):u(t,e,r,i).promise()}}},{"./async.js":2,"./util.js":38}],20:[function(t,e){"use strict";e.exports=function(e,r,n,i){var o=t("./util.js"),s=o.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("fn must be a function\n\n See http://goo.gl/916lJJ\n");return function(){var n=new e(r);n._captureStackTrace(),n._pushContext();var i=s(t).apply(this,arguments);return n._popContext(),n._resolveFromSyncValue(i),n}},e.attempt=e["try"]=function(t,n,a){if("function"!=typeof t)return i("fn must be a function\n\n See http://goo.gl/916lJJ\n");var u=new e(r);u._captureStackTrace(),u._pushContext();var c=o.isArray(n)?s(t).apply(a,n):s(t).call(a,n);return u._popContext(),u._resolveFromSyncValue(c),u},e.prototype._resolveFromSyncValue=function(t){t===o.errorObj?this._rejectCallback(t.e,!1,!0):this._resolveCallback(t,!0)}}},{"./util.js":38}],21:[function(t,e){"use strict";e.exports=function(e){function r(t,e){var r=this;if(!o.isArray(t))return n.call(r,t,e);var i=a(e).apply(r._boundValue(),[null].concat(t));i===u&&s.throwLater(i.e)}function n(t,e){var r=this,n=r._boundValue(),i=void 0===t?a(e).call(n,null):a(e).call(n,null,t);i===u&&s.throwLater(i.e)}function i(t,e){var r=this;if(!t){var n=r._target(),i=n._getCarriedStackTrace();i.cause=t,t=i}var o=a(e).call(r._boundValue(),t);o===u&&s.throwLater(o.e)}var o=t("./util.js"),s=t("./async.js"),a=o.tryCatch,u=o.errorObj;e.prototype.asCallback=e.prototype.nodeify=function(t,e){if("function"==typeof t){var o=n;void 0!==e&&Object(e).spread&&(o=r),this._then(o,i,void 0,this,t)}return this}}},{"./async.js":2,"./util.js":38}],22:[function(t,e){"use strict";e.exports=function(e,r){var n=t("./util.js"),i=t("./async.js"),o=n.tryCatch,s=n.errorObj;e.prototype.progressed=function(t){return this._then(void 0,void 0,t,void 0,void 0)},e.prototype._progress=function(t){this._isFollowingOrFulfilledOrRejected()||this._target()._progressUnchecked(t)},e.prototype._progressHandlerAt=function(t){return 0===t?this._progressHandler0:this[(t<<2)+t-5+2]},e.prototype._doProgressWith=function(t){var r=t.value,i=t.handler,a=t.promise,u=t.receiver,c=o(i).call(u,r);if(c===s){if(null!=c.e&&"StopProgressPropagation"!==c.e.name){var l=n.canAttachTrace(c.e)?c.e:new Error(n.toString(c.e));a._attachExtraTrace(l),a._progress(c.e)}}else c instanceof e?c._then(a._progress,null,null,a,void 0):a._progress(c)},e.prototype._progressUnchecked=function(t){for(var n=this._length(),o=this._progress,s=0;n>s;s++){var a=this._progressHandlerAt(s),u=this._promiseAt(s);if(u instanceof e)"function"==typeof a?i.invoke(this._doProgressWith,this,{handler:a,promise:u,receiver:this._receiverAt(s),value:t}):i.invoke(o,u,t);else{var c=this._receiverAt(s);"function"==typeof a?a.call(c,t,u):c instanceof r&&!c._isResolved()&&c._promiseProgressed(t,u)}}}}},{"./async.js":2,"./util.js":38}],23:[function(t,e){"use strict";e.exports=function(){function e(t){if("function"!=typeof t)throw new h("the promise constructor requires a resolver function\n\n See http://goo.gl/EC22Yn\n");if(this.constructor!==e)throw new h("the promise constructor cannot be invoked directly\n\n See http://goo.gl/KsIlge\n");this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._progressHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._settledValue=void 0,t!==p&&this._resolveFromResolver(t)}function r(t){var r=new e(p);r._fulfillmentHandler0=t,r._rejectionHandler0=t,r._progressHandler0=t,r._promise0=t,r._receiver0=t,r._settledValue=t}var n,i=function(){return new h("circular promise resolution chain\n\n See http://goo.gl/LhFpo0\n")},o=function(){return new e.PromiseInspection(this._target())},s=function(t){return e.reject(new h(t))},a=t("./util.js");n=a.isNode?function(){var t=process.domain;return void 0===t&&(t=null),t}:function(){return null},a.notEnumerableProp(e,"_getDomain",n);var u={},c=t("./async.js"),l=t("./errors.js"),h=e.TypeError=l.TypeError;e.RangeError=l.RangeError,e.CancellationError=l.CancellationError,e.TimeoutError=l.TimeoutError,e.OperationalError=l.OperationalError,e.RejectionError=l.OperationalError,e.AggregateError=l.AggregateError;var p=function(){},f={},_={e:null},d=t("./thenables.js")(e,p),v=t("./promise_array.js")(e,p,d,s),y=t("./captured_trace.js")(),g=t("./debuggability.js")(e,y),m=t("./context.js")(e,y,g),j=t("./catch_filter.js")(_),b=t("./promise_resolver.js"),w=b._nodebackForPromise,k=a.errorObj,E=a.tryCatch;return e.prototype.toString=function(){return"[object Promise]"},e.prototype.caught=e.prototype["catch"]=function(t){var r=arguments.length;if(r>1){var n,i=new Array(r-1),o=0;for(n=0;r-1>n;++n){var s=arguments[n];if("function"!=typeof s)return e.reject(new h("Catch filter must inherit from Error or be a simple predicate function\n\n See http://goo.gl/o84o68\n"));i[o++]=s}i.length=o,t=arguments[n];var a=new j(i,t,this);return this._then(void 0,a.doFilter,void 0,a,void 0)}return this._then(void 0,t,void 0,void 0,void 0)},e.prototype.reflect=function(){return this._then(o,o,void 0,this,void 0)},e.prototype.then=function(t,e,r){if(g()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+a.classString(t);arguments.length>1&&(n+=", "+a.classString(e)),this._warn(n)}return this._then(t,e,r,void 0,void 0)},e.prototype.done=function(t,e,r){var n=this._then(t,e,r,void 0,void 0);
+n._setIsFinal()},e.prototype.spread=function(t,e){return this.all()._then(t,e,void 0,f,void 0)},e.prototype.isCancellable=function(){return!this.isResolved()&&this._cancellable()},e.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},e.prototype.all=function(){return new v(this).promise()},e.prototype.error=function(t){return this.caught(a.originatesFromRejection,t)},e.is=function(t){return t instanceof e},e.fromNode=function(t){var r=new e(p),n=E(t)(w(r));return n===k&&r._rejectCallback(n.e,!0,!0),r},e.all=function(t){return new v(t).promise()},e.defer=e.pending=function(){var t=new e(p);return new b(t)},e.cast=function(t){var r=d(t);if(!(r instanceof e)){var n=r;r=new e(p),r._fulfillUnchecked(n)}return r},e.resolve=e.fulfilled=e.cast,e.reject=e.rejected=function(t){var r=new e(p);return r._captureStackTrace(),r._rejectCallback(t,!0),r},e.setScheduler=function(t){if("function"!=typeof t)throw new h("fn must be a function\n\n See http://goo.gl/916lJJ\n");var e=c._schedule;return c._schedule=t,e},e.prototype._then=function(t,r,i,o,s){var a=void 0!==s,u=a?s:new e(p);a||(u._propagateFrom(this,5),u._captureStackTrace());var l=this._target();l!==this&&(void 0===o&&(o=this._boundTo),a||u._setIsMigrated());var h=l._addCallbacks(t,r,i,u,o,n());return l._isResolved()&&!l._isSettlePromisesQueued()&&c.invoke(l._settlePromiseAtPostResolution,l,h),u},e.prototype._settlePromiseAtPostResolution=function(t){this._isRejectionUnhandled()&&this._unsetRejectionIsUnhandled(),this._settlePromiseAt(t)},e.prototype._length=function(){return 131071&this._bitField},e.prototype._isFollowingOrFulfilledOrRejected=function(){return(939524096&this._bitField)>0},e.prototype._isFollowing=function(){return 536870912===(536870912&this._bitField)},e.prototype._setLength=function(t){this._bitField=-131072&this._bitField|131071&t},e.prototype._setFulfilled=function(){this._bitField=268435456|this._bitField},e.prototype._setRejected=function(){this._bitField=134217728|this._bitField},e.prototype._setFollowing=function(){this._bitField=536870912|this._bitField},e.prototype._setIsFinal=function(){this._bitField=33554432|this._bitField},e.prototype._isFinal=function(){return(33554432&this._bitField)>0},e.prototype._cancellable=function(){return(67108864&this._bitField)>0},e.prototype._setCancellable=function(){this._bitField=67108864|this._bitField},e.prototype._unsetCancellable=function(){this._bitField=-67108865&this._bitField},e.prototype._setIsMigrated=function(){this._bitField=4194304|this._bitField},e.prototype._unsetIsMigrated=function(){this._bitField=-4194305&this._bitField},e.prototype._isMigrated=function(){return(4194304&this._bitField)>0},e.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[5*t-5+4];return e===u?void 0:void 0===e&&this._isBound()?this._boundValue():e},e.prototype._promiseAt=function(t){return 0===t?this._promise0:this[5*t-5+3]},e.prototype._fulfillmentHandlerAt=function(t){return 0===t?this._fulfillmentHandler0:this[5*t-5+0]},e.prototype._rejectionHandlerAt=function(t){return 0===t?this._rejectionHandler0:this[5*t-5+1]},e.prototype._boundValue=function(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t},e.prototype._migrateCallbacks=function(t,r){var n=t._fulfillmentHandlerAt(r),i=t._rejectionHandlerAt(r),o=t._progressHandlerAt(r),s=t._promiseAt(r),a=t._receiverAt(r);s instanceof e&&s._setIsMigrated(),void 0===a&&(a=u),this._addCallbacks(n,i,o,s,a,null)},e.prototype._addCallbacks=function(t,e,r,n,i,o){var s=this._length();if(s>=131066&&(s=0,this._setLength(0)),0===s)this._promise0=n,void 0!==i&&(this._receiver0=i),"function"!=typeof t||this._isCarryingStackTrace()||(this._fulfillmentHandler0=null===o?t:o.bind(t)),"function"==typeof e&&(this._rejectionHandler0=null===o?e:o.bind(e)),"function"==typeof r&&(this._progressHandler0=null===o?r:o.bind(r));else{var a=5*s-5;this[a+3]=n,this[a+4]=i,"function"==typeof t&&(this[a+0]=null===o?t:o.bind(t)),"function"==typeof e&&(this[a+1]=null===o?e:o.bind(e)),"function"==typeof r&&(this[a+2]=null===o?r:o.bind(r))}return this._setLength(s+1),s},e.prototype._setProxyHandlers=function(t,e){var r=this._length();if(r>=131066&&(r=0,this._setLength(0)),0===r)this._promise0=e,this._receiver0=t;else{var n=5*r-5;this[n+3]=e,this[n+4]=t}this._setLength(r+1)},e.prototype._proxyPromiseArray=function(t,e){this._setProxyHandlers(t,e)},e.prototype._resolveCallback=function(t,r){if(!this._isFollowingOrFulfilledOrRejected()){if(t===this)return this._rejectCallback(i(),!1,!0);var n=d(t,this);if(!(n instanceof e))return this._fulfill(t);var o=1|(r?4:0);this._propagateFrom(n,o);var s=n._target();if(s._isPending()){for(var a=this._length(),u=0;a>u;++u)s._migrateCallbacks(this,u);this._setFollowing(),this._setLength(0),this._setFollowee(s)}else s._isFulfilled()?this._fulfillUnchecked(s._value()):this._rejectUnchecked(s._reason(),s._getCarriedStackTrace())}},e.prototype._rejectCallback=function(t,e,r){r||a.markAsOriginatingFromRejection(t);var n=a.ensureErrorObject(t),i=n===t;this._attachExtraTrace(n,e?i:!1),this._reject(t,i?void 0:n)},e.prototype._resolveFromResolver=function(t){var e=this;this._captureStackTrace(),this._pushContext();var r=!0,n=E(t)(function(t){null!==e&&(e._resolveCallback(t),e=null)},function(t){null!==e&&(e._rejectCallback(t,r),e=null)});r=!1,this._popContext(),void 0!==n&&n===k&&null!==e&&(e._rejectCallback(n.e,!0,!0),e=null)},e.prototype._settlePromiseFromHandler=function(t,e,r,n){if(!n._isRejected()){n._pushContext();var o;if(o=e!==f||this._isRejected()?E(t).call(e,r):E(t).apply(this._boundValue(),r),n._popContext(),o===k||o===n||o===_){var s=o===n?i():o.e;n._rejectCallback(s,!1,!0)}else n._resolveCallback(o)}},e.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},e.prototype._followee=function(){return this._rejectionHandler0},e.prototype._setFollowee=function(t){this._rejectionHandler0=t},e.prototype._cleanValues=function(){this._cancellable()&&(this._cancellationParent=void 0)},e.prototype._propagateFrom=function(t,e){(1&e)>0&&t._cancellable()&&(this._setCancellable(),this._cancellationParent=t),(4&e)>0&&t._isBound()&&this._setBoundTo(t._boundTo)},e.prototype._fulfill=function(t){this._isFollowingOrFulfilledOrRejected()||this._fulfillUnchecked(t)},e.prototype._reject=function(t,e){this._isFollowingOrFulfilledOrRejected()||this._rejectUnchecked(t,e)},e.prototype._settlePromiseAt=function(t){var r=this._promiseAt(t),n=r instanceof e;if(n&&r._isMigrated())return r._unsetIsMigrated(),c.invoke(this._settlePromiseAt,this,t);var i=this._isFulfilled()?this._fulfillmentHandlerAt(t):this._rejectionHandlerAt(t),o=this._isCarryingStackTrace()?this._getCarriedStackTrace():void 0,s=this._settledValue,a=this._receiverAt(t);this._clearCallbackDataAtIndex(t),"function"==typeof i?n?this._settlePromiseFromHandler(i,a,s,r):i.call(a,s,r):a instanceof v?a._isResolved()||(this._isFulfilled()?a._promiseFulfilled(s,r):a._promiseRejected(s,r)):n&&(this._isFulfilled()?r._fulfill(s):r._reject(s,o)),t>=4&&4===(31&t)&&c.invokeLater(this._setLength,this,0)},e.prototype._clearCallbackDataAtIndex=function(t){if(0===t)this._isCarryingStackTrace()||(this._fulfillmentHandler0=void 0),this._rejectionHandler0=this._progressHandler0=this._receiver0=this._promise0=void 0;else{var e=5*t-5;this[e+3]=this[e+4]=this[e+0]=this[e+1]=this[e+2]=void 0}},e.prototype._isSettlePromisesQueued=function(){return-1073741824===(-1073741824&this._bitField)},e.prototype._setSettlePromisesQueued=function(){this._bitField=-1073741824|this._bitField},e.prototype._unsetSettlePromisesQueued=function(){this._bitField=1073741823&this._bitField},e.prototype._queueSettlePromises=function(){c.settlePromises(this),this._setSettlePromisesQueued()},e.prototype._fulfillUnchecked=function(t){if(t===this){var e=i();return this._attachExtraTrace(e),this._rejectUnchecked(e,void 0)}this._setFulfilled(),this._settledValue=t,this._cleanValues(),this._length()>0&&this._queueSettlePromises()},e.prototype._rejectUncheckedCheckError=function(t){var e=a.ensureErrorObject(t);this._rejectUnchecked(t,e===t?void 0:e)},e.prototype._rejectUnchecked=function(t,e){if(t===this){var r=i();return this._attachExtraTrace(r),this._rejectUnchecked(r)}return this._setRejected(),this._settledValue=t,this._cleanValues(),this._isFinal()?void c.throwLater(function(t){throw"stack"in t&&c.invokeFirst(y.unhandledRejection,void 0,t),t},void 0===e?t:e):(void 0!==e&&e!==t&&this._setCarriedStackTrace(e),void(this._length()>0?this._queueSettlePromises():this._ensurePossibleRejectionHandled()))},e.prototype._settlePromises=function(){this._unsetSettlePromisesQueued();for(var t=this._length(),e=0;t>e;e++)this._settlePromiseAt(e)},a.notEnumerableProp(e,"_makeSelfResolutionError",i),t("./progress.js")(e,v),t("./method.js")(e,p,d,s),t("./bind.js")(e,p,d),t("./finally.js")(e,_,d),t("./direct_resolve.js")(e),t("./synchronous_inspection.js")(e),t("./join.js")(e,v,d,p),e.Promise=e,t("./map.js")(e,v,s,d,p),t("./cancel.js")(e),t("./using.js")(e,s,d,m),t("./generators.js")(e,s,p,d),t("./nodeify.js")(e),t("./call_get.js")(e),t("./props.js")(e,v,d,s),t("./race.js")(e,p,d,s),t("./reduce.js")(e,v,s,d,p),t("./settle.js")(e,v),t("./some.js")(e,v,s),t("./promisify.js")(e,p),t("./any.js")(e),t("./each.js")(e,p),t("./timers.js")(e,p),t("./filter.js")(e,p),a.toFastProperties(e),a.toFastProperties(e.prototype),r({a:1}),r({b:2}),r({c:3}),r(1),r(function(){}),r(void 0),r(!1),r(new e(p)),y.setBounds(c.firstLineError,a.lastLineError),e}},{"./any.js":1,"./async.js":2,"./bind.js":3,"./call_get.js":5,"./cancel.js":6,"./captured_trace.js":7,"./catch_filter.js":8,"./context.js":9,"./debuggability.js":10,"./direct_resolve.js":11,"./each.js":12,"./errors.js":13,"./filter.js":15,"./finally.js":16,"./generators.js":17,"./join.js":18,"./map.js":19,"./method.js":20,"./nodeify.js":21,"./progress.js":22,"./promise_array.js":24,"./promise_resolver.js":25,"./promisify.js":26,"./props.js":27,"./race.js":29,"./reduce.js":30,"./settle.js":32,"./some.js":33,"./synchronous_inspection.js":34,"./thenables.js":35,"./timers.js":36,"./using.js":37,"./util.js":38}],24:[function(t,e){"use strict";e.exports=function(e,r,n,i){function o(t){switch(t){case-2:return[];case-3:return{}}}function s(t){var n,i=this._promise=new e(r);t instanceof e&&(n=t,i._propagateFrom(n,5)),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var a=t("./util.js"),u=a.isArray;return s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function c(t,r){var s=n(this._values,this._promise);if(s instanceof e){if(s=s._target(),this._values=s,!s._isFulfilled())return s._isPending()?void s._then(c,this._reject,void 0,this,r):void this._reject(s._reason());if(s=s._value(),!u(s)){var a=new e.TypeError("expecting an array, a promise or a thenable\n\n See http://goo.gl/s8MMhc\n");return void this.__hardReject__(a)}}else if(!u(s))return void this._promise._reject(i("expecting an array, a promise or a thenable\n\n See http://goo.gl/s8MMhc\n")._reason());if(0===s.length)return void(-5===r?this._resolveEmptyArray():this._resolve(o(r)));var l=this.getActualLength(s.length);this._length=l,this._values=this.shouldCopyValues()?new Array(l):this._values;for(var h=this._promise,p=0;l>p;++p){var f=this._isResolved(),_=n(s[p],h);_ instanceof e?(_=_._target(),f?_._ignoreRejections():_._isPending()?_._proxyPromiseArray(this,p):_._isFulfilled()?this._promiseFulfilled(_._value(),p):this._promiseRejected(_._reason(),p)):f||this._promiseFulfilled(_,p)}},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},s.prototype.__hardReject__=s.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1,!0)},s.prototype._promiseProgressed=function(t,e){this._promise._progress({index:e,value:t})},s.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var r=++this._totalResolved;r>=this._length&&this._resolve(this._values)},s.prototype._promiseRejected=function(t){this._totalResolved++,this._reject(t)},s.prototype.shouldCopyValues=function(){return!0},s.prototype.getActualLength=function(t){return t},s}},{"./util.js":38}],25:[function(t,e){"use strict";function r(t){return t instanceof Error&&p.getPrototypeOf(t)===Error.prototype}function n(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=p.keys(t),i=0;i<n.length;++i){var o=n[i];f.test(o)||(e[o]=t[o])}return e}return s.markAsOriginatingFromRejection(t),t}function i(t){return function(e,r){if(null!==t){if(e){var i=n(a(e));t._attachExtraTrace(i),t._reject(i)}else if(arguments.length>2){for(var o=arguments.length,s=new Array(o-1),u=1;o>u;++u)s[u-1]=arguments[u];t._fulfill(s)}else t._fulfill(r);t=null}}}var o,s=t("./util.js"),a=s.maybeWrapAsError,u=t("./errors.js"),c=u.TimeoutError,l=u.OperationalError,h=s.haveGetters,p=t("./es5.js"),f=/^(?:name|message|stack|cause)$/;if(o=h?function(t){this.promise=t}:function(t){this.promise=t,this.asCallback=i(t),this.callback=this.asCallback},h){var _={get:function(){return i(this.promise)}};p.defineProperty(o.prototype,"asCallback",_),p.defineProperty(o.prototype,"callback",_)}o._nodebackForPromise=i,o.prototype.toString=function(){return"[object PromiseResolver]"},o.prototype.resolve=o.prototype.fulfill=function(t){if(!(this instanceof o))throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\n\n See http://goo.gl/sdkXL9\n");this.promise._resolveCallback(t)},o.prototype.reject=function(t){if(!(this instanceof o))throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\n\n See http://goo.gl/sdkXL9\n");this.promise._rejectCallback(t)},o.prototype.progress=function(t){if(!(this instanceof o))throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\n\n See http://goo.gl/sdkXL9\n");this.promise._progress(t)},o.prototype.cancel=function(t){this.promise.cancel(t)},o.prototype.timeout=function(){this.reject(new c("timeout"))},o.prototype.isResolved=function(){return this.promise.isResolved()},o.prototype.toJSON=function(){return this.promise.toJSON()},e.exports=o},{"./errors.js":13,"./es5.js":14,"./util.js":38}],26:[function(t,e){"use strict";e.exports=function(e,r){function n(t){return!w.test(t)}function i(t){try{return t.__isPromisified__===!0}catch(e){return!1}}function o(t,e,r){var n=f.getDataPropertyOrDefault(t,e+r,j);return n?i(n):!1}function s(t,e,r){for(var n=0;n<t.length;n+=2){var i=t[n];if(r.test(i))for(var o=i.replace(r,""),s=0;s<t.length;s+=2)if(t[s]===o)throw new g("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/iWrZbw\n".replace("%s",e))}}function a(t,e,r,n){for(var a=f.inheritedDataKeys(t),u=[],c=0;c<a.length;++c){var l=a[c],h=t[l],p=n===k?!0:k(l,h,t);"function"!=typeof h||i(h)||o(t,l,e)||!n(l,h,t,p)||u.push(l,h)}return s(u,e,r),u}function u(t,n,i,o){function s(){var i=n;n===p&&(i=this);var o=new e(r);o._captureStackTrace();var s="string"==typeof u&&this!==a?this[u]:t,c=_(o);try{s.apply(i,d(arguments,c))}catch(l){o._rejectCallback(v(l),!0,!0)}return o}var a=function(){return this}(),u=t;return"string"==typeof u&&(t=o),f.notEnumerableProp(s,"__isPromisified__",!0),s}function c(t,e,r,n){for(var i=new RegExp(E(e)+"$"),o=a(t,e,i,r),s=0,u=o.length;u>s;s+=2){var c=o[s],l=o[s+1],h=c+e;if(n===F)t[h]=F(c,p,c,l,e);else{var _=n(l,function(){return F(c,p,c,l,e)});f.notEnumerableProp(_,"__isPromisified__",!0),t[h]=_}}return f.toFastProperties(t),t}function l(t,e){return F(t,e,void 0,t)}var h,p={},f=t("./util.js"),_=t("./promise_resolver.js")._nodebackForPromise,d=f.withAppended,v=f.maybeWrapAsError,y=f.canEvaluate,g=t("./errors").TypeError,m="Async",j={__isPromisified__:!0},b=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],w=new RegExp("^(?:"+b.join("|")+")$"),k=function(t){return f.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},E=function(t){return t.replace(/([$])/,"\\$")},F=y?h:u;e.promisify=function(t,e){if("function"!=typeof t)throw new g("fn must be a function\n\n See http://goo.gl/916lJJ\n");if(i(t))return t;var r=l(t,arguments.length<2?p:e);return f.copyDescriptors(t,r,n),r},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new g("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/9ITlV0\n");e=Object(e);var r=e.suffix;"string"!=typeof r&&(r=m);var n=e.filter;"function"!=typeof n&&(n=k);var i=e.promisifier;if("function"!=typeof i&&(i=F),!f.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/8FZo5V\n");for(var o=f.inheritedDataKeys(t),s=0;s<o.length;++s){var a=t[o[s]];"constructor"!==o[s]&&f.isClass(a)&&(c(a.prototype,r,n,i),c(a,r,n,i))}return c(t,r,n,i)}}},{"./errors":13,"./promise_resolver.js":25,"./util.js":38}],27:[function(t,e){"use strict";e.exports=function(e,r,n,i){function o(t){for(var e=c.keys(t),r=e.length,n=new Array(2*r),i=0;r>i;++i){var o=e[i];n[i]=t[o],n[i+r]=o}this.constructor$(n)}function s(t){var r,s=n(t);return u(s)?(r=s instanceof e?s._then(e.props,void 0,void 0,void 0,void 0):new o(s).promise(),s instanceof e&&r._propagateFrom(s,4),r):i("cannot await properties of a non-object\n\n See http://goo.gl/OsFKC8\n")}var a=t("./util.js"),u=a.isObject,c=t("./es5.js");a.inherits(o,r),o.prototype._init=function(){this._init$(void 0,-3)},o.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var r=++this._totalResolved;if(r>=this._length){for(var n={},i=this.length(),o=0,s=this.length();s>o;++o)n[this._values[o+i]]=this._values[o];this._resolve(n)}},o.prototype._promiseProgressed=function(t,e){this._promise._progress({key:this._values[e+this.length()],value:t})},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return s(this)},e.props=function(t){return s(t)}}},{"./es5.js":14,"./util.js":38}],28:[function(t,e){"use strict";function r(t,e,r,n,i){for(var o=0;i>o;++o)r[o+n]=t[o+e],t[o+e]=void 0}function n(t){this._capacity=t,this._length=0,this._front=0}n.prototype._willBeOverCapacity=function(t){return this._capacity<t},n.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1);var r=this._front+e&this._capacity-1;this[r]=t,this._length=e+1},n.prototype._unshiftOne=function(t){var e=this._capacity;this._checkCapacity(this.length()+1);var r=this._front,n=(r-1&e-1^e)-e;this[n]=t,this._front=n,this._length=this.length()+1},n.prototype.unshift=function(t,e,r){this._unshiftOne(r),this._unshiftOne(e),this._unshiftOne(t)},n.prototype.push=function(t,e,r){var n=this.length()+3;if(this._willBeOverCapacity(n))return this._pushOne(t),this._pushOne(e),void this._pushOne(r);var i=this._front+n-3;this._checkCapacity(n);var o=this._capacity-1;this[i+0&o]=t,this[i+1&o]=e,this[i+2&o]=r,this._length=n},n.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},n.prototype.length=function(){return this._length},n.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},n.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t;var n=this._front,i=this._length,o=n+i&e-1;r(this,0,this,e,o)},e.exports=n},{}],29:[function(t,e){"use strict";e.exports=function(e,r,n,i){function o(t,o){var u=n(t);if(u instanceof e)return a(u);if(!s(t))return i("expecting an array, a promise or a thenable\n\n See http://goo.gl/s8MMhc\n");var c=new e(r);void 0!==o&&c._propagateFrom(o,5);for(var l=c._fulfill,h=c._reject,p=0,f=t.length;f>p;++p){var _=t[p];(void 0!==_||p in t)&&e.cast(_)._then(l,h,void 0,c,null)}return c}var s=t("./util.js").isArray,a=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util.js":38}],30:[function(t,e){"use strict";e.exports=function(e,r,n,i,o){function s(t,r,n,s){this.constructor$(t),this._promise._captureStackTrace(),this._preservedValues=s===o?[]:null,this._zerothIsAccum=void 0===n,this._gotAccum=!1,this._reducingIndex=this._zerothIsAccum?1:0,this._valuesPhase=void 0;var u=i(n,this._promise),h=!1,p=u instanceof e;p&&(u=u._target(),u._isPending()?u._proxyPromiseArray(this,-1):u._isFulfilled()?(n=u._value(),this._gotAccum=!0):(this._reject(u._reason()),h=!0)),p||this._zerothIsAccum||(this._gotAccum=!0);var f=c();this._callback=null===f?r:f.bind(r),this._accum=n,h||l.invoke(a,this,void 0)}function a(){this._init$(void 0,-5)}function u(t,e,r,i){if("function"!=typeof e)return n("fn must be a function\n\n See http://goo.gl/916lJJ\n");var o=new s(t,e,r,i);return o.promise()}var c=e._getDomain,l=t("./async.js"),h=t("./util.js"),p=h.tryCatch,f=h.errorObj;h.inherits(s,r),s.prototype._init=function(){},s.prototype._resolveEmptyArray=function(){(this._gotAccum||this._zerothIsAccum)&&this._resolve(null!==this._preservedValues?[]:this._accum)},s.prototype._promiseFulfilled=function(t,r){var n=this._values;n[r]=t;var o,s=this.length(),a=this._preservedValues,u=null!==a,c=this._gotAccum,l=this._valuesPhase;if(!l)for(l=this._valuesPhase=new Array(s),o=0;s>o;++o)l[o]=0;if(o=l[r],0===r&&this._zerothIsAccum?(this._accum=t,this._gotAccum=c=!0,l[r]=0===o?1:2):-1===r?(this._accum=t,this._gotAccum=c=!0):0===o?l[r]=1:(l[r]=2,this._accum=t),c){for(var h,_=this._callback,d=this._promise._boundValue(),v=this._reducingIndex;s>v;++v)if(o=l[v],2!==o){if(1!==o)return;if(t=n[v],this._promise._pushContext(),u?(a.push(t),h=p(_).call(d,t,v,s)):h=p(_).call(d,this._accum,t,v,s),this._promise._popContext(),h===f)return this._reject(h.e);var y=i(h,this._promise);if(y instanceof e){if(y=y._target(),y._isPending())return l[v]=4,y._proxyPromiseArray(this,v);if(!y._isFulfilled())return this._reject(y._reason());h=y._value()}this._reducingIndex=v+1,this._accum=h}else this._reducingIndex=v+1;this._resolve(u?a:this._accum)}},e.prototype.reduce=function(t,e){return u(this,t,e,null)},e.reduce=function(t,e,r,n){return u(t,e,r,n)}}},{"./async.js":2,"./util.js":38}],31:[function(t,e){"use strict";var r,n=t("./util"),i=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/m3OTXk\n")};if(n.isNode&&"undefined"==typeof MutationObserver){var o=global.setImmediate,s=process.nextTick;r=n.isRecentNode?function(t){o.call(global,t)}:function(t){s.call(process,t)}}else"undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&window.navigator.standalone?r="undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:i:(r=function(t){var e=document.createElement("div"),r=new MutationObserver(t);return r.observe(e,{attributes:!0}),function(){e.classList.toggle("foo")}},r.isStatic=!0);e.exports=r},{"./util":38}],32:[function(t,e){"use strict";e.exports=function(e,r){function n(t){this.constructor$(t)}var i=e.PromiseInspection,o=t("./util.js");o.inherits(n,r),n.prototype._promiseResolved=function(t,e){this._values[t]=e;var r=++this._totalResolved;r>=this._length&&this._resolve(this._values)},n.prototype._promiseFulfilled=function(t,e){var r=new i;r._bitField=268435456,r._settledValue=t,this._promiseResolved(e,r)},n.prototype._promiseRejected=function(t,e){var r=new i;r._bitField=134217728,r._settledValue=t,this._promiseResolved(e,r)},e.settle=function(t){return new n(t).promise()},e.prototype.settle=function(){return new n(this).promise()}}},{"./util.js":38}],33:[function(t,e){"use strict";e.exports=function(e,r,n){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||0>e)return n("expecting a positive integer\n\n See http://goo.gl/1wAmHx\n");var r=new i(t),o=r.promise();return r.setHowMany(e),r.init(),o}var s=t("./util.js"),a=t("./errors.js").RangeError,u=t("./errors.js").AggregateError,c=s.isArray;s.inherits(i,r),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=c(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),this._resolve(1===this.howMany()&&this._unwrap?this._values[0]:this._values))},i.prototype._promiseRejected=function(t){if(this._addRejected(t),this.howMany()>this._canPossiblyFulfill()){for(var e=new u,r=this.length();r<this._values.length;++r)e.push(this._values[r]);this._reject(e)}},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=i}},{"./errors.js":13,"./util.js":38}],34:[function(t,e){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValue=t._settledValue):(this._bitField=0,this._settledValue=void 0)}e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/hc1DLj\n");return this._settledValue},e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/hPuiwB\n");return this._settledValue},e.prototype.isFulfilled=t.prototype._isFulfilled=function(){return(268435456&this._bitField)>0},e.prototype.isRejected=t.prototype._isRejected=function(){return(134217728&this._bitField)>0},e.prototype.isPending=t.prototype._isPending=function(){return 0===(402653184&this._bitField)},e.prototype.isResolved=t.prototype._isResolved=function(){return(402653184&this._bitField)>0},t.prototype.isPending=function(){return this._target()._isPending()},t.prototype.isRejected=function(){return this._target()._isRejected()},t.prototype.isFulfilled=function(){return this._target()._isFulfilled()},t.prototype.isResolved=function(){return this._target()._isResolved()},t.prototype._value=function(){return this._settledValue},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue},t.prototype.value=function(){var t=this._target();if(!t.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/hc1DLj\n");return t._settledValue},t.prototype.reason=function(){var t=this._target();if(!t.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/hPuiwB\n");return t._unsetRejectionIsUnhandled(),t._settledValue},t.PromiseInspection=e}},{}],35:[function(t,e){"use strict";e.exports=function(e,r){function n(t,n){if(c(t)){if(t instanceof e)return t;if(o(t)){var l=new e(r);return t._then(l._fulfillUnchecked,l._rejectUncheckedCheckError,l._progressUnchecked,l,null),l}var h=a.tryCatch(i)(t);if(h===u){n&&n._pushContext();var l=e.reject(h.e);return n&&n._popContext(),l}if("function"==typeof h)return s(t,h,n)}return t}function i(t){return t.then}function o(t){return l.call(t,"_promise0")}function s(t,n,i){function o(t){l&&(l._resolveCallback(t),l=null)}function s(t){l&&(l._rejectCallback(t,p,!0),l=null)}function c(t){l&&"function"==typeof l._progress&&l._progress(t)}var l=new e(r),h=l;i&&i._pushContext(),l._captureStackTrace(),i&&i._popContext();var p=!0,f=a.tryCatch(n).call(t,o,s,c);return p=!1,l&&f===u&&(l._rejectCallback(f.e,!0,!0),l=null),h}var a=t("./util.js"),u=a.errorObj,c=a.isObject,l={}.hasOwnProperty;return n}},{"./util.js":38}],36:[function(t,e){"use strict";e.exports=function(e,r){function n(t){var e=this;return e instanceof Number&&(e=+e),clearTimeout(e),t}function i(t){var e=this;throw e instanceof Number&&(e=+e),clearTimeout(e),t}var o=t("./util.js"),s=e.TimeoutError,a=function(t,e){if(t.isPending()){var r;!o.isPrimitive(e)&&e instanceof Error?r=e:("string"!=typeof e&&(e="operation timed out"),r=new s(e)),o.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._cancel(r)}},u=function(t){return c(+this).thenReturn(t)},c=e.delay=function(t,n){if(void 0===n){n=t,t=void 0;var i=new e(r);return setTimeout(function(){i._fulfill()},n),i}return n=+n,e.resolve(t)._then(u,null,null,n,void 0)};e.prototype.delay=function(t){return c(this,t)},e.prototype.timeout=function(t,e){t=+t;var r=this.then().cancellable();r._cancellationParent=this;var o=setTimeout(function(){a(r,e)},t);return r._then(n,i,void 0,o,void 0)}}},{"./util.js":38}],37:[function(t,e){"use strict";e.exports=function(e,r,n,i){function o(t){for(var r=t.length,n=0;r>n;++n){var i=t[n];if(i.isRejected())return e.reject(i.error());t[n]=i._settledValue}return t}function s(t){setTimeout(function(){throw t},0)}function a(t){var e=n(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function u(t,r){function i(){if(o>=u)return c.resolve();var l=a(t[o++]);if(l instanceof e&&l._isDisposable()){try{l=n(l._getDisposer().tryDispose(r),t.promise)}catch(h){return s(h)}if(l instanceof e)return l._then(i,s,null,null,null)}i()}var o=0,u=t.length,c=e.defer();return i(),c.promise}function c(t){var e=new v;return e._settledValue=t,e._bitField=268435456,u(this,e).thenReturn(t)}function l(t){var e=new v;return e._settledValue=t,e._bitField=134217728,u(this,e).thenThrow(t)}function h(t,e,r){this._data=t,this._promise=e,this._context=r}function p(t,e,r){this.constructor$(t,e,r)}function f(t){return h.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}var _=t("./errors.js").TypeError,d=t("./util.js").inherits,v=e.PromiseInspection;h.prototype.data=function(){return this._data},h.prototype.promise=function(){return this._promise},h.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():null},h.prototype.tryDispose=function(t){var e=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=null!==e?this.doDispose(e,t):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},h.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},d(p,h),p.prototype.doDispose=function(t,e){var r=this.data();return r.call(t,t,e)},e.using=function(){var t=arguments.length;if(2>t)return r("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return r("fn must be a function\n\n See http://goo.gl/916lJJ\n");var s,a=!0;2===t&&Array.isArray(arguments[0])?(s=arguments[0],t=s.length,a=!1):(s=arguments,t--);for(var u=new Array(t),p=0;t>p;++p){var _=s[p];if(h.isDisposer(_)){var d=_;_=_.promise(),_._setDisposable(d)
+}else{var v=n(_);v instanceof e&&(_=v._then(f,null,null,{resources:u,index:p},void 0))}u[p]=_}var y=e.settle(u).then(o).then(function(t){y._pushContext();var e;try{e=a?i.apply(void 0,t):i.call(void 0,t)}finally{y._popContext()}return e})._then(c,l,void 0,u,void 0);return u.promise=y,y},e.prototype._setDisposable=function(t){this._bitField=262144|this._bitField,this._disposer=t},e.prototype._isDisposable=function(){return(262144&this._bitField)>0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-262145&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new p(t,this,i());throw new _}}},{"./errors.js":13,"./util.js":38}],38:[function(t,e,r){"use strict";function n(){try{var t=C;return C=null,t.apply(this,arguments)}catch(e){return F.e=e,F}}function i(t){return C=t,n}function o(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function s(t){return!o(t)}function a(t){return o(t)?new Error(v(t)):t}function u(t,e){var r,n=t.length,i=new Array(n+1);for(r=0;n>r;++r)i[r]=t[r];return i[r]=e,i}function c(t,e,r){if(!w.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var n=Object.getOwnPropertyDescriptor(t,e);return null!=n?null==n.get&&null==n.set?n.value:r:void 0}function l(t,e,r){if(o(t))return t;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return w.defineProperty(t,e,n),t}function h(t){throw t}function p(t){try{if("function"==typeof t){var e=w.names(t.prototype),r=w.isES5&&e.length>1,n=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=x.test(t+"")&&w.names(t).length>0;if(r||n||i)return!0}return!1}catch(o){return!1}}function f(t){function e(){}e.prototype=t;for(var r=8;r--;)new e;return t}function _(t){return R.test(t)}function d(t,e,r){for(var n=new Array(t),i=0;t>i;++i)n[i]=e+i+r;return n}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){try{l(t,"isOperational",!0)}catch(e){}}function g(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function m(t){return t instanceof Error&&w.propertyIsWritable(t,"stack")}function j(t){return{}.toString.call(t)}function b(t,e,r){for(var n=w.names(t),i=0;i<n.length;++i){var o=n[i];if(r(o))try{w.defineProperty(e,o,w.getDescriptor(t,o))}catch(s){}}}var w=t("./es5.js"),k="undefined"==typeof navigator,E=function(){try{var t={};return w.defineProperty(t,"f",{get:function(){return 3}}),3===t.f}catch(e){return!1}}(),F={e:{}},C,P=function(t,e){function r(){this.constructor=t,this.constructor$=e;for(var r in e.prototype)n.call(e.prototype,r)&&"$"!==r.charAt(r.length-1)&&(this[r+"$"]=e.prototype[r])}var n={}.hasOwnProperty;return r.prototype=e.prototype,t.prototype=new r,t.prototype},T=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var r=0;r<t.length;++r)if(t[r]===e)return!0;return!1};if(w.isES5){var r=Object.getOwnPropertyNames;return function(t){for(var n=[],i=Object.create(null);null!=t&&!e(t);){var o;try{o=r(t)}catch(s){return n}for(var a=0;a<o.length;++a){var u=o[a];if(!i[u]){i[u]=!0;var c=Object.getOwnPropertyDescriptor(t,u);null!=c&&null==c.get&&null==c.set&&n.push(u)}}t=w.getPrototypeOf(t)}return n}}var n={}.hasOwnProperty;return function(r){if(e(r))return[];var i=[];t:for(var o in r)if(n.call(r,o))i.push(o);else{for(var s=0;s<t.length;++s)if(n.call(t[s],o))continue t;i.push(o)}return i}}(),x=/this\s*\.\s*\S+\s*=/,R=/^[a-z$_][a-z$_0-9]*$/i,S=function(){return"stack"in new Error?function(t){return m(t)?t:new Error(v(t))}:function(t){if(m(t))return t;try{throw new Error(v(t))}catch(e){return e}}}(),A={isClass:p,isIdentifier:_,inheritedDataKeys:T,getDataPropertyOrDefault:c,thrower:h,isArray:w.isArray,haveGetters:E,notEnumerableProp:l,isPrimitive:o,isObject:s,canEvaluate:k,errorObj:F,tryCatch:i,inherits:P,withAppended:u,maybeWrapAsError:a,toFastProperties:f,filledRange:d,toString:v,canAttachTrace:m,ensureErrorObject:S,originatesFromRejection:g,markAsOriginatingFromRejection:y,classString:j,copyDescriptors:b,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:"undefined"!=typeof process&&"[object process]"===j(process).toLowerCase()};A.isRecentNode=A.isNode&&function(){var t=process.versions.node.split(".").map(Number);return 0===t[0]&&t[1]>10||t[0]>0}(),A.isNode&&A.toFastProperties(process);try{throw new Error}catch(O){A.lastLineError=O}e.exports=A},{"./es5.js":14}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/any.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/any.js
new file mode 100644
index 0000000..05a6228
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/any.js
@@ -0,0 +1,21 @@
+"use strict";
+module.exports = function(Promise) {
+var SomePromiseArray = Promise._SomePromiseArray;
+function any(promises) {
+ var ret = new SomePromiseArray(promises);
+ var promise = ret.promise();
+ ret.setHowMany(1);
+ ret.setUnwrap();
+ ret.init();
+ return promise;
+}
+
+Promise.any = function (promises) {
+ return any(promises);
+};
+
+Promise.prototype.any = function () {
+ return any(this);
+};
+
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/assert.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/assert.js
new file mode 100644
index 0000000..a98955c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/assert.js
@@ -0,0 +1,55 @@
+"use strict";
+module.exports = (function(){
+var AssertionError = (function() {
+ function AssertionError(a) {
+ this.constructor$(a);
+ this.message = a;
+ this.name = "AssertionError";
+ }
+ AssertionError.prototype = new Error();
+ AssertionError.prototype.constructor = AssertionError;
+ AssertionError.prototype.constructor$ = Error;
+ return AssertionError;
+})();
+
+function getParams(args) {
+ var params = [];
+ for (var i = 0; i < args.length; ++i) params.push("arg" + i);
+ return params;
+}
+
+function nativeAssert(callName, args, expect) {
+ try {
+ var params = getParams(args);
+ var constructorArgs = params;
+ constructorArgs.push("return " +
+ callName + "("+ params.join(",") + ");");
+ var fn = Function.apply(null, constructorArgs);
+ return fn.apply(null, args);
+ } catch (e) {
+ if (!(e instanceof SyntaxError)) {
+ throw e;
+ } else {
+ return expect;
+ }
+ }
+}
+
+return function assert(boolExpr, message) {
+ if (boolExpr === true) return;
+
+ if (typeof boolExpr === "string" &&
+ boolExpr.charAt(0) === "%") {
+ var nativeCallName = boolExpr;
+ var $_len = arguments.length;var args = new Array($_len - 2); for(var $_i = 2; $_i < $_len; ++$_i) {args[$_i - 2] = arguments[$_i];}
+ if (nativeAssert(nativeCallName, args, message) === message) return;
+ message = (nativeCallName + " !== " + message);
+ }
+
+ var ret = new AssertionError(message);
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(ret, assert);
+ }
+ throw ret;
+};
+})();
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/async.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/async.js
new file mode 100644
index 0000000..0104459
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/async.js
@@ -0,0 +1,150 @@
+"use strict";
+var firstLineError;
+try {throw new Error(); } catch (e) {firstLineError = e;}
+var schedule = require("./schedule.js");
+var Queue = require("./queue.js");
+var util = require("./util.js");
+
+function Async() {
+ this._isTickUsed = false;
+ this._lateQueue = new Queue(16);
+ this._normalQueue = new Queue(16);
+ this._trampolineEnabled = true;
+ var self = this;
+ this.drainQueues = function () {
+ self._drainQueues();
+ };
+ this._schedule =
+ schedule.isStatic ? schedule(this.drainQueues) : schedule;
+}
+
+Async.prototype.disableTrampolineIfNecessary = function() {
+ if (util.hasDevTools) {
+ this._trampolineEnabled = false;
+ }
+};
+
+Async.prototype.enableTrampoline = function() {
+ if (!this._trampolineEnabled) {
+ this._trampolineEnabled = true;
+ this._schedule = function(fn) {
+ setTimeout(fn, 0);
+ };
+ }
+};
+
+Async.prototype.haveItemsQueued = function () {
+ return this._normalQueue.length() > 0;
+};
+
+Async.prototype.throwLater = function(fn, arg) {
+ if (arguments.length === 1) {
+ arg = fn;
+ fn = function () { throw arg; };
+ }
+ if (typeof setTimeout !== "undefined") {
+ setTimeout(function() {
+ fn(arg);
+ }, 0);
+ } else try {
+ this._schedule(function() {
+ fn(arg);
+ });
+ } catch (e) {
+ throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/m3OTXk\u000a");
+ }
+};
+
+function AsyncInvokeLater(fn, receiver, arg) {
+ this._lateQueue.push(fn, receiver, arg);
+ this._queueTick();
+}
+
+function AsyncInvoke(fn, receiver, arg) {
+ this._normalQueue.push(fn, receiver, arg);
+ this._queueTick();
+}
+
+function AsyncSettlePromises(promise) {
+ this._normalQueue._pushOne(promise);
+ this._queueTick();
+}
+
+if (!util.hasDevTools) {
+ Async.prototype.invokeLater = AsyncInvokeLater;
+ Async.prototype.invoke = AsyncInvoke;
+ Async.prototype.settlePromises = AsyncSettlePromises;
+} else {
+ if (schedule.isStatic) {
+ schedule = function(fn) { setTimeout(fn, 0); };
+ }
+ Async.prototype.invokeLater = function (fn, receiver, arg) {
+ if (this._trampolineEnabled) {
+ AsyncInvokeLater.call(this, fn, receiver, arg);
+ } else {
+ this._schedule(function() {
+ setTimeout(function() {
+ fn.call(receiver, arg);
+ }, 100);
+ });
+ }
+ };
+
+ Async.prototype.invoke = function (fn, receiver, arg) {
+ if (this._trampolineEnabled) {
+ AsyncInvoke.call(this, fn, receiver, arg);
+ } else {
+ this._schedule(function() {
+ fn.call(receiver, arg);
+ });
+ }
+ };
+
+ Async.prototype.settlePromises = function(promise) {
+ if (this._trampolineEnabled) {
+ AsyncSettlePromises.call(this, promise);
+ } else {
+ this._schedule(function() {
+ promise._settlePromises();
+ });
+ }
+ };
+}
+
+Async.prototype.invokeFirst = function (fn, receiver, arg) {
+ this._normalQueue.unshift(fn, receiver, arg);
+ this._queueTick();
+};
+
+Async.prototype._drainQueue = function(queue) {
+ while (queue.length() > 0) {
+ var fn = queue.shift();
+ if (typeof fn !== "function") {
+ fn._settlePromises();
+ continue;
+ }
+ var receiver = queue.shift();
+ var arg = queue.shift();
+ fn.call(receiver, arg);
+ }
+};
+
+Async.prototype._drainQueues = function () {
+ this._drainQueue(this._normalQueue);
+ this._reset();
+ this._drainQueue(this._lateQueue);
+};
+
+Async.prototype._queueTick = function () {
+ if (!this._isTickUsed) {
+ this._isTickUsed = true;
+ this._schedule(this.drainQueues);
+ }
+};
+
+Async.prototype._reset = function () {
+ this._isTickUsed = false;
+};
+
+module.exports = new Async();
+module.exports.firstLineError = firstLineError;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/bind.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/bind.js
new file mode 100644
index 0000000..9d8257a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/bind.js
@@ -0,0 +1,72 @@
+"use strict";
+module.exports = function(Promise, INTERNAL, tryConvertToPromise) {
+var rejectThis = function(_, e) {
+ this._reject(e);
+};
+
+var targetRejected = function(e, context) {
+ context.promiseRejectionQueued = true;
+ context.bindingPromise._then(rejectThis, rejectThis, null, this, e);
+};
+
+var bindingResolved = function(thisArg, context) {
+ if (this._isPending()) {
+ this._resolveCallback(context.target);
+ }
+};
+
+var bindingRejected = function(e, context) {
+ if (!context.promiseRejectionQueued) this._reject(e);
+};
+
+Promise.prototype.bind = function (thisArg) {
+ var maybePromise = tryConvertToPromise(thisArg);
+ var ret = new Promise(INTERNAL);
+ ret._propagateFrom(this, 1);
+ var target = this._target();
+
+ ret._setBoundTo(maybePromise);
+ if (maybePromise instanceof Promise) {
+ var context = {
+ promiseRejectionQueued: false,
+ promise: ret,
+ target: target,
+ bindingPromise: maybePromise
+ };
+ target._then(INTERNAL, targetRejected, ret._progress, ret, context);
+ maybePromise._then(
+ bindingResolved, bindingRejected, ret._progress, ret, context);
+ } else {
+ ret._resolveCallback(target);
+ }
+ return ret;
+};
+
+Promise.prototype._setBoundTo = function (obj) {
+ if (obj !== undefined) {
+ this._bitField = this._bitField | 131072;
+ this._boundTo = obj;
+ } else {
+ this._bitField = this._bitField & (~131072);
+ }
+};
+
+Promise.prototype._isBound = function () {
+ return (this._bitField & 131072) === 131072;
+};
+
+Promise.bind = function (thisArg, value) {
+ var maybePromise = tryConvertToPromise(thisArg);
+ var ret = new Promise(INTERNAL);
+
+ ret._setBoundTo(maybePromise);
+ if (maybePromise instanceof Promise) {
+ maybePromise._then(function() {
+ ret._resolveCallback(value);
+ }, ret._reject, ret._progress, ret, null);
+ } else {
+ ret._resolveCallback(value);
+ }
+ return ret;
+};
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/bluebird.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/bluebird.js
new file mode 100644
index 0000000..ed6226e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/bluebird.js
@@ -0,0 +1,11 @@
+"use strict";
+var old;
+if (typeof Promise !== "undefined") old = Promise;
+function noConflict() {
+ try { if (Promise === bluebird) Promise = old; }
+ catch (e) {}
+ return bluebird;
+}
+var bluebird = require("./promise.js")();
+bluebird.noConflict = noConflict;
+module.exports = bluebird;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/call_get.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/call_get.js
new file mode 100644
index 0000000..62c166d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/call_get.js
@@ -0,0 +1,123 @@
+"use strict";
+var cr = Object.create;
+if (cr) {
+ var callerCache = cr(null);
+ var getterCache = cr(null);
+ callerCache[" size"] = getterCache[" size"] = 0;
+}
+
+module.exports = function(Promise) {
+var util = require("./util.js");
+var canEvaluate = util.canEvaluate;
+var isIdentifier = util.isIdentifier;
+
+var getMethodCaller;
+var getGetter;
+if (!false) {
+var makeMethodCaller = function (methodName) {
+ return new Function("ensureMethod", " \n\
+ return function(obj) { \n\
+ 'use strict' \n\
+ var len = this.length; \n\
+ ensureMethod(obj, 'methodName'); \n\
+ switch(len) { \n\
+ case 1: return obj.methodName(this[0]); \n\
+ case 2: return obj.methodName(this[0], this[1]); \n\
+ case 3: return obj.methodName(this[0], this[1], this[2]); \n\
+ case 0: return obj.methodName(); \n\
+ default: \n\
+ return obj.methodName.apply(obj, this); \n\
+ } \n\
+ }; \n\
+ ".replace(/methodName/g, methodName))(ensureMethod);
+};
+
+var makeGetter = function (propertyName) {
+ return new Function("obj", " \n\
+ 'use strict'; \n\
+ return obj.propertyName; \n\
+ ".replace("propertyName", propertyName));
+};
+
+var getCompiled = function(name, compiler, cache) {
+ var ret = cache[name];
+ if (typeof ret !== "function") {
+ if (!isIdentifier(name)) {
+ return null;
+ }
+ ret = compiler(name);
+ cache[name] = ret;
+ cache[" size"]++;
+ if (cache[" size"] > 512) {
+ var keys = Object.keys(cache);
+ for (var i = 0; i < 256; ++i) delete cache[keys[i]];
+ cache[" size"] = keys.length - 256;
+ }
+ }
+ return ret;
+};
+
+getMethodCaller = function(name) {
+ return getCompiled(name, makeMethodCaller, callerCache);
+};
+
+getGetter = function(name) {
+ return getCompiled(name, makeGetter, getterCache);
+};
+}
+
+function ensureMethod(obj, methodName) {
+ var fn;
+ if (obj != null) fn = obj[methodName];
+ if (typeof fn !== "function") {
+ var message = "Object " + util.classString(obj) + " has no method '" +
+ util.toString(methodName) + "'";
+ throw new Promise.TypeError(message);
+ }
+ return fn;
+}
+
+function caller(obj) {
+ var methodName = this.pop();
+ var fn = ensureMethod(obj, methodName);
+ return fn.apply(obj, this);
+}
+Promise.prototype.call = function (methodName) {
+ var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}
+ if (!false) {
+ if (canEvaluate) {
+ var maybeCaller = getMethodCaller(methodName);
+ if (maybeCaller !== null) {
+ return this._then(
+ maybeCaller, undefined, undefined, args, undefined);
+ }
+ }
+ }
+ args.push(methodName);
+ return this._then(caller, undefined, undefined, args, undefined);
+};
+
+function namedGetter(obj) {
+ return obj[this];
+}
+function indexedGetter(obj) {
+ var index = +this;
+ if (index < 0) index = Math.max(0, index + obj.length);
+ return obj[index];
+}
+Promise.prototype.get = function (propertyName) {
+ var isIndex = (typeof propertyName === "number");
+ var getter;
+ if (!isIndex) {
+ if (canEvaluate) {
+ var maybeGetter = getGetter(propertyName);
+ getter = maybeGetter !== null ? maybeGetter : namedGetter;
+ } else {
+ getter = namedGetter;
+ }
+ } else {
+ getter = indexedGetter;
+ }
+ return this._then(getter, undefined, undefined, propertyName, undefined);
+};
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/cancel.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/cancel.js
new file mode 100644
index 0000000..9eb40b6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/cancel.js
@@ -0,0 +1,48 @@
+"use strict";
+module.exports = function(Promise) {
+var errors = require("./errors.js");
+var async = require("./async.js");
+var CancellationError = errors.CancellationError;
+
+Promise.prototype._cancel = function (reason) {
+ if (!this.isCancellable()) return this;
+ var parent;
+ var promiseToReject = this;
+ while ((parent = promiseToReject._cancellationParent) !== undefined &&
+ parent.isCancellable()) {
+ promiseToReject = parent;
+ }
+ this._unsetCancellable();
+ promiseToReject._target()._rejectCallback(reason, false, true);
+};
+
+Promise.prototype.cancel = function (reason) {
+ if (!this.isCancellable()) return this;
+ if (reason === undefined) reason = new CancellationError();
+ async.invokeLater(this._cancel, this, reason);
+ return this;
+};
+
+Promise.prototype.cancellable = function () {
+ if (this._cancellable()) return this;
+ async.enableTrampoline();
+ this._setCancellable();
+ this._cancellationParent = undefined;
+ return this;
+};
+
+Promise.prototype.uncancellable = function () {
+ var ret = this.then();
+ ret._unsetCancellable();
+ return ret;
+};
+
+Promise.prototype.fork = function (didFulfill, didReject, didProgress) {
+ var ret = this._then(didFulfill, didReject, didProgress,
+ undefined, undefined);
+
+ ret._setCancellable();
+ ret._cancellationParent = undefined;
+ return ret;
+};
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/captured_trace.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/captured_trace.js
new file mode 100644
index 0000000..802acd3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/captured_trace.js
@@ -0,0 +1,493 @@
+"use strict";
+module.exports = function() {
+var async = require("./async.js");
+var util = require("./util.js");
+var bluebirdFramePattern =
+ /[\\\/]bluebird[\\\/]js[\\\/](main|debug|zalgo|instrumented)/;
+var stackFramePattern = null;
+var formatStack = null;
+var indentStackFrames = false;
+var warn;
+
+function CapturedTrace(parent) {
+ this._parent = parent;
+ var length = this._length = 1 + (parent === undefined ? 0 : parent._length);
+ captureStackTrace(this, CapturedTrace);
+ if (length > 32) this.uncycle();
+}
+util.inherits(CapturedTrace, Error);
+
+CapturedTrace.prototype.uncycle = function() {
+ var length = this._length;
+ if (length < 2) return;
+ var nodes = [];
+ var stackToIndex = {};
+
+ for (var i = 0, node = this; node !== undefined; ++i) {
+ nodes.push(node);
+ node = node._parent;
+ }
+ length = this._length = i;
+ for (var i = length - 1; i >= 0; --i) {
+ var stack = nodes[i].stack;
+ if (stackToIndex[stack] === undefined) {
+ stackToIndex[stack] = i;
+ }
+ }
+ for (var i = 0; i < length; ++i) {
+ var currentStack = nodes[i].stack;
+ var index = stackToIndex[currentStack];
+ if (index !== undefined && index !== i) {
+ if (index > 0) {
+ nodes[index - 1]._parent = undefined;
+ nodes[index - 1]._length = 1;
+ }
+ nodes[i]._parent = undefined;
+ nodes[i]._length = 1;
+ var cycleEdgeNode = i > 0 ? nodes[i - 1] : this;
+
+ if (index < length - 1) {
+ cycleEdgeNode._parent = nodes[index + 1];
+ cycleEdgeNode._parent.uncycle();
+ cycleEdgeNode._length =
+ cycleEdgeNode._parent._length + 1;
+ } else {
+ cycleEdgeNode._parent = undefined;
+ cycleEdgeNode._length = 1;
+ }
+ var currentChildLength = cycleEdgeNode._length + 1;
+ for (var j = i - 2; j >= 0; --j) {
+ nodes[j]._length = currentChildLength;
+ currentChildLength++;
+ }
+ return;
+ }
+ }
+};
+
+CapturedTrace.prototype.parent = function() {
+ return this._parent;
+};
+
+CapturedTrace.prototype.hasParent = function() {
+ return this._parent !== undefined;
+};
+
+CapturedTrace.prototype.attachExtraTrace = function(error) {
+ if (error.__stackCleaned__) return;
+ this.uncycle();
+ var parsed = CapturedTrace.parseStackAndMessage(error);
+ var message = parsed.message;
+ var stacks = [parsed.stack];
+
+ var trace = this;
+ while (trace !== undefined) {
+ stacks.push(cleanStack(trace.stack.split("\n")));
+ trace = trace._parent;
+ }
+ removeCommonRoots(stacks);
+ removeDuplicateOrEmptyJumps(stacks);
+ util.notEnumerableProp(error, "stack", reconstructStack(message, stacks));
+ util.notEnumerableProp(error, "__stackCleaned__", true);
+};
+
+function reconstructStack(message, stacks) {
+ for (var i = 0; i < stacks.length - 1; ++i) {
+ stacks[i].push("From previous event:");
+ stacks[i] = stacks[i].join("\n");
+ }
+ if (i < stacks.length) {
+ stacks[i] = stacks[i].join("\n");
+ }
+ return message + "\n" + stacks.join("\n");
+}
+
+function removeDuplicateOrEmptyJumps(stacks) {
+ for (var i = 0; i < stacks.length; ++i) {
+ if (stacks[i].length === 0 ||
+ ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) {
+ stacks.splice(i, 1);
+ i--;
+ }
+ }
+}
+
+function removeCommonRoots(stacks) {
+ var current = stacks[0];
+ for (var i = 1; i < stacks.length; ++i) {
+ var prev = stacks[i];
+ var currentLastIndex = current.length - 1;
+ var currentLastLine = current[currentLastIndex];
+ var commonRootMeetPoint = -1;
+
+ for (var j = prev.length - 1; j >= 0; --j) {
+ if (prev[j] === currentLastLine) {
+ commonRootMeetPoint = j;
+ break;
+ }
+ }
+
+ for (var j = commonRootMeetPoint; j >= 0; --j) {
+ var line = prev[j];
+ if (current[currentLastIndex] === line) {
+ current.pop();
+ currentLastIndex--;
+ } else {
+ break;
+ }
+ }
+ current = prev;
+ }
+}
+
+function cleanStack(stack) {
+ var ret = [];
+ for (var i = 0; i < stack.length; ++i) {
+ var line = stack[i];
+ var isTraceLine = stackFramePattern.test(line) ||
+ " (No stack trace)" === line;
+ var isInternalFrame = isTraceLine && shouldIgnore(line);
+ if (isTraceLine && !isInternalFrame) {
+ if (indentStackFrames && line.charAt(0) !== " ") {
+ line = " " + line;
+ }
+ ret.push(line);
+ }
+ }
+ return ret;
+}
+
+function stackFramesAsArray(error) {
+ var stack = error.stack.replace(/\s+$/g, "").split("\n");
+ for (var i = 0; i < stack.length; ++i) {
+ var line = stack[i];
+ if (" (No stack trace)" === line || stackFramePattern.test(line)) {
+ break;
+ }
+ }
+ if (i > 0) {
+ stack = stack.slice(i);
+ }
+ return stack;
+}
+
+CapturedTrace.parseStackAndMessage = function(error) {
+ var stack = error.stack;
+ var message = error.toString();
+ stack = typeof stack === "string" && stack.length > 0
+ ? stackFramesAsArray(error) : [" (No stack trace)"];
+ return {
+ message: message,
+ stack: cleanStack(stack)
+ };
+};
+
+CapturedTrace.formatAndLogError = function(error, title) {
+ if (typeof console !== "undefined") {
+ var message;
+ if (typeof error === "object" || typeof error === "function") {
+ var stack = error.stack;
+ message = title + formatStack(stack, error);
+ } else {
+ message = title + String(error);
+ }
+ if (typeof warn === "function") {
+ warn(message);
+ } else if (typeof console.log === "function" ||
+ typeof console.log === "object") {
+ console.log(message);
+ }
+ }
+};
+
+CapturedTrace.unhandledRejection = function (reason) {
+ CapturedTrace.formatAndLogError(reason, "^--- With additional stack trace: ");
+};
+
+CapturedTrace.isSupported = function () {
+ return typeof captureStackTrace === "function";
+};
+
+CapturedTrace.fireRejectionEvent =
+function(name, localHandler, reason, promise) {
+ var localEventFired = false;
+ try {
+ if (typeof localHandler === "function") {
+ localEventFired = true;
+ if (name === "rejectionHandled") {
+ localHandler(promise);
+ } else {
+ localHandler(reason, promise);
+ }
+ }
+ } catch (e) {
+ async.throwLater(e);
+ }
+
+ var globalEventFired = false;
+ try {
+ globalEventFired = fireGlobalEvent(name, reason, promise);
+ } catch (e) {
+ globalEventFired = true;
+ async.throwLater(e);
+ }
+
+ var domEventFired = false;
+ if (fireDomEvent) {
+ try {
+ domEventFired = fireDomEvent(name.toLowerCase(), {
+ reason: reason,
+ promise: promise
+ });
+ } catch (e) {
+ domEventFired = true;
+ async.throwLater(e);
+ }
+ }
+
+ if (!globalEventFired && !localEventFired && !domEventFired &&
+ name === "unhandledRejection") {
+ CapturedTrace.formatAndLogError(reason, "Unhandled rejection ");
+ }
+};
+
+function formatNonError(obj) {
+ var str;
+ if (typeof obj === "function") {
+ str = "[function " +
+ (obj.name || "anonymous") +
+ "]";
+ } else {
+ str = obj.toString();
+ var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/;
+ if (ruselessToString.test(str)) {
+ try {
+ var newStr = JSON.stringify(obj);
+ str = newStr;
+ }
+ catch(e) {
+
+ }
+ }
+ if (str.length === 0) {
+ str = "(empty array)";
+ }
+ }
+ return ("(<" + snip(str) + ">, no stack trace)");
+}
+
+function snip(str) {
+ var maxChars = 41;
+ if (str.length < maxChars) {
+ return str;
+ }
+ return str.substr(0, maxChars - 3) + "...";
+}
+
+var shouldIgnore = function() { return false; };
+var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;
+function parseLineInfo(line) {
+ var matches = line.match(parseLineInfoRegex);
+ if (matches) {
+ return {
+ fileName: matches[1],
+ line: parseInt(matches[2], 10)
+ };
+ }
+}
+CapturedTrace.setBounds = function(firstLineError, lastLineError) {
+ if (!CapturedTrace.isSupported()) return;
+ var firstStackLines = firstLineError.stack.split("\n");
+ var lastStackLines = lastLineError.stack.split("\n");
+ var firstIndex = -1;
+ var lastIndex = -1;
+ var firstFileName;
+ var lastFileName;
+ for (var i = 0; i < firstStackLines.length; ++i) {
+ var result = parseLineInfo(firstStackLines[i]);
+ if (result) {
+ firstFileName = result.fileName;
+ firstIndex = result.line;
+ break;
+ }
+ }
+ for (var i = 0; i < lastStackLines.length; ++i) {
+ var result = parseLineInfo(lastStackLines[i]);
+ if (result) {
+ lastFileName = result.fileName;
+ lastIndex = result.line;
+ break;
+ }
+ }
+ if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName ||
+ firstFileName !== lastFileName || firstIndex >= lastIndex) {
+ return;
+ }
+
+ shouldIgnore = function(line) {
+ if (bluebirdFramePattern.test(line)) return true;
+ var info = parseLineInfo(line);
+ if (info) {
+ if (info.fileName === firstFileName &&
+ (firstIndex <= info.line && info.line <= lastIndex)) {
+ return true;
+ }
+ }
+ return false;
+ };
+};
+
+var captureStackTrace = (function stackDetection() {
+ var v8stackFramePattern = /^\s*at\s*/;
+ var v8stackFormatter = function(stack, error) {
+ if (typeof stack === "string") return stack;
+
+ if (error.name !== undefined &&
+ error.message !== undefined) {
+ return error.toString();
+ }
+ return formatNonError(error);
+ };
+
+ if (typeof Error.stackTraceLimit === "number" &&
+ typeof Error.captureStackTrace === "function") {
+ Error.stackTraceLimit = Error.stackTraceLimit + 6;
+ stackFramePattern = v8stackFramePattern;
+ formatStack = v8stackFormatter;
+ var captureStackTrace = Error.captureStackTrace;
+
+ shouldIgnore = function(line) {
+ return bluebirdFramePattern.test(line);
+ };
+ return function(receiver, ignoreUntil) {
+ Error.stackTraceLimit = Error.stackTraceLimit + 6;
+ captureStackTrace(receiver, ignoreUntil);
+ Error.stackTraceLimit = Error.stackTraceLimit - 6;
+ };
+ }
+ var err = new Error();
+
+ if (typeof err.stack === "string" &&
+ err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) {
+ stackFramePattern = /@/;
+ formatStack = v8stackFormatter;
+ indentStackFrames = true;
+ return function captureStackTrace(o) {
+ o.stack = new Error().stack;
+ };
+ }
+
+ var hasStackAfterThrow;
+ try { throw new Error(); }
+ catch(e) {
+ hasStackAfterThrow = ("stack" in e);
+ }
+ if (!("stack" in err) && hasStackAfterThrow &&
+ typeof Error.stackTraceLimit === "number") {
+ stackFramePattern = v8stackFramePattern;
+ formatStack = v8stackFormatter;
+ return function captureStackTrace(o) {
+ Error.stackTraceLimit = Error.stackTraceLimit + 6;
+ try { throw new Error(); }
+ catch(e) { o.stack = e.stack; }
+ Error.stackTraceLimit = Error.stackTraceLimit - 6;
+ };
+ }
+
+ formatStack = function(stack, error) {
+ if (typeof stack === "string") return stack;
+
+ if ((typeof error === "object" ||
+ typeof error === "function") &&
+ error.name !== undefined &&
+ error.message !== undefined) {
+ return error.toString();
+ }
+ return formatNonError(error);
+ };
+
+ return null;
+
+})([]);
+
+var fireDomEvent;
+var fireGlobalEvent = (function() {
+ if (util.isNode) {
+ return function(name, reason, promise) {
+ if (name === "rejectionHandled") {
+ return process.emit(name, promise);
+ } else {
+ return process.emit(name, reason, promise);
+ }
+ };
+ } else {
+ var customEventWorks = false;
+ var anyEventWorks = true;
+ try {
+ var ev = new self.CustomEvent("test");
+ customEventWorks = ev instanceof CustomEvent;
+ } catch (e) {}
+ if (!customEventWorks) {
+ try {
+ var event = document.createEvent("CustomEvent");
+ event.initCustomEvent("testingtheevent", false, true, {});
+ self.dispatchEvent(event);
+ } catch (e) {
+ anyEventWorks = false;
+ }
+ }
+ if (anyEventWorks) {
+ fireDomEvent = function(type, detail) {
+ var event;
+ if (customEventWorks) {
+ event = new self.CustomEvent(type, {
+ detail: detail,
+ bubbles: false,
+ cancelable: true
+ });
+ } else if (self.dispatchEvent) {
+ event = document.createEvent("CustomEvent");
+ event.initCustomEvent(type, false, true, detail);
+ }
+
+ return event ? !self.dispatchEvent(event) : false;
+ };
+ }
+
+ var toWindowMethodNameMap = {};
+ toWindowMethodNameMap["unhandledRejection"] = ("on" +
+ "unhandledRejection").toLowerCase();
+ toWindowMethodNameMap["rejectionHandled"] = ("on" +
+ "rejectionHandled").toLowerCase();
+
+ return function(name, reason, promise) {
+ var methodName = toWindowMethodNameMap[name];
+ var method = self[methodName];
+ if (!method) return false;
+ if (name === "rejectionHandled") {
+ method.call(self, promise);
+ } else {
+ method.call(self, reason, promise);
+ }
+ return true;
+ };
+ }
+})();
+
+if (typeof console !== "undefined" && typeof console.warn !== "undefined") {
+ warn = function (message) {
+ console.warn(message);
+ };
+ if (util.isNode && process.stderr.isTTY) {
+ warn = function(message) {
+ process.stderr.write("\u001b[31m" + message + "\u001b[39m\n");
+ };
+ } else if (!util.isNode && typeof (new Error().stack) === "string") {
+ warn = function(message) {
+ console.warn("%c" + message, "color: red");
+ };
+ }
+}
+
+return CapturedTrace;
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/catch_filter.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/catch_filter.js
new file mode 100644
index 0000000..df12733
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/catch_filter.js
@@ -0,0 +1,66 @@
+"use strict";
+module.exports = function(NEXT_FILTER) {
+var util = require("./util.js");
+var errors = require("./errors.js");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+var keys = require("./es5.js").keys;
+var TypeError = errors.TypeError;
+
+function CatchFilter(instances, callback, promise) {
+ this._instances = instances;
+ this._callback = callback;
+ this._promise = promise;
+}
+
+function safePredicate(predicate, e) {
+ var safeObject = {};
+ var retfilter = tryCatch(predicate).call(safeObject, e);
+
+ if (retfilter === errorObj) return retfilter;
+
+ var safeKeys = keys(safeObject);
+ if (safeKeys.length) {
+ errorObj.e = new TypeError("Catch filter must inherit from Error or be a simple predicate function\u000a\u000a See http://goo.gl/o84o68\u000a");
+ return errorObj;
+ }
+ return retfilter;
+}
+
+CatchFilter.prototype.doFilter = function (e) {
+ var cb = this._callback;
+ var promise = this._promise;
+ var boundTo = promise._boundValue();
+ for (var i = 0, len = this._instances.length; i < len; ++i) {
+ var item = this._instances[i];
+ var itemIsErrorType = item === Error ||
+ (item != null && item.prototype instanceof Error);
+
+ if (itemIsErrorType && e instanceof item) {
+ var ret = tryCatch(cb).call(boundTo, e);
+ if (ret === errorObj) {
+ NEXT_FILTER.e = ret.e;
+ return NEXT_FILTER;
+ }
+ return ret;
+ } else if (typeof item === "function" && !itemIsErrorType) {
+ var shouldHandle = safePredicate(item, e);
+ if (shouldHandle === errorObj) {
+ e = errorObj.e;
+ break;
+ } else if (shouldHandle) {
+ var ret = tryCatch(cb).call(boundTo, e);
+ if (ret === errorObj) {
+ NEXT_FILTER.e = ret.e;
+ return NEXT_FILTER;
+ }
+ return ret;
+ }
+ }
+ }
+ NEXT_FILTER.e = e;
+ return NEXT_FILTER;
+};
+
+return CatchFilter;
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/context.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/context.js
new file mode 100644
index 0000000..ccd7702
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/context.js
@@ -0,0 +1,38 @@
+"use strict";
+module.exports = function(Promise, CapturedTrace, isDebugging) {
+var contextStack = [];
+function Context() {
+ this._trace = new CapturedTrace(peekContext());
+}
+Context.prototype._pushContext = function () {
+ if (!isDebugging()) return;
+ if (this._trace !== undefined) {
+ contextStack.push(this._trace);
+ }
+};
+
+Context.prototype._popContext = function () {
+ if (!isDebugging()) return;
+ if (this._trace !== undefined) {
+ contextStack.pop();
+ }
+};
+
+function createContext() {
+ if (isDebugging()) return new Context();
+}
+
+function peekContext() {
+ var lastIndex = contextStack.length - 1;
+ if (lastIndex >= 0) {
+ return contextStack[lastIndex];
+ }
+ return undefined;
+}
+
+Promise.prototype._peekContext = peekContext;
+Promise.prototype._pushContext = Context.prototype._pushContext;
+Promise.prototype._popContext = Context.prototype._popContext;
+
+return createContext;
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/debuggability.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/debuggability.js
new file mode 100644
index 0000000..106baf6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/debuggability.js
@@ -0,0 +1,162 @@
+"use strict";
+module.exports = function(Promise, CapturedTrace) {
+var getDomain = Promise._getDomain;
+var async = require("./async.js");
+var Warning = require("./errors.js").Warning;
+var util = require("./util.js");
+var canAttachTrace = util.canAttachTrace;
+var unhandledRejectionHandled;
+var possiblyUnhandledRejection;
+var debugging = false || (util.isNode &&
+ (!!process.env["BLUEBIRD_DEBUG"] ||
+ process.env["NODE_ENV"] === "development"));
+
+if (util.isNode && process.env["BLUEBIRD_DEBUG"] == 0) debugging = false;
+
+if (debugging) {
+ async.disableTrampolineIfNecessary();
+}
+
+Promise.prototype._ignoreRejections = function() {
+ this._unsetRejectionIsUnhandled();
+ this._bitField = this._bitField | 16777216;
+};
+
+Promise.prototype._ensurePossibleRejectionHandled = function () {
+ if ((this._bitField & 16777216) !== 0) return;
+ this._setRejectionIsUnhandled();
+ async.invokeLater(this._notifyUnhandledRejection, this, undefined);
+};
+
+Promise.prototype._notifyUnhandledRejectionIsHandled = function () {
+ CapturedTrace.fireRejectionEvent("rejectionHandled",
+ unhandledRejectionHandled, undefined, this);
+};
+
+Promise.prototype._notifyUnhandledRejection = function () {
+ if (this._isRejectionUnhandled()) {
+ var reason = this._getCarriedStackTrace() || this._settledValue;
+ this._setUnhandledRejectionIsNotified();
+ CapturedTrace.fireRejectionEvent("unhandledRejection",
+ possiblyUnhandledRejection, reason, this);
+ }
+};
+
+Promise.prototype._setUnhandledRejectionIsNotified = function () {
+ this._bitField = this._bitField | 524288;
+};
+
+Promise.prototype._unsetUnhandledRejectionIsNotified = function () {
+ this._bitField = this._bitField & (~524288);
+};
+
+Promise.prototype._isUnhandledRejectionNotified = function () {
+ return (this._bitField & 524288) > 0;
+};
+
+Promise.prototype._setRejectionIsUnhandled = function () {
+ this._bitField = this._bitField | 2097152;
+};
+
+Promise.prototype._unsetRejectionIsUnhandled = function () {
+ this._bitField = this._bitField & (~2097152);
+ if (this._isUnhandledRejectionNotified()) {
+ this._unsetUnhandledRejectionIsNotified();
+ this._notifyUnhandledRejectionIsHandled();
+ }
+};
+
+Promise.prototype._isRejectionUnhandled = function () {
+ return (this._bitField & 2097152) > 0;
+};
+
+Promise.prototype._setCarriedStackTrace = function (capturedTrace) {
+ this._bitField = this._bitField | 1048576;
+ this._fulfillmentHandler0 = capturedTrace;
+};
+
+Promise.prototype._isCarryingStackTrace = function () {
+ return (this._bitField & 1048576) > 0;
+};
+
+Promise.prototype._getCarriedStackTrace = function () {
+ return this._isCarryingStackTrace()
+ ? this._fulfillmentHandler0
+ : undefined;
+};
+
+Promise.prototype._captureStackTrace = function () {
+ if (debugging) {
+ this._trace = new CapturedTrace(this._peekContext());
+ }
+ return this;
+};
+
+Promise.prototype._attachExtraTrace = function (error, ignoreSelf) {
+ if (debugging && canAttachTrace(error)) {
+ var trace = this._trace;
+ if (trace !== undefined) {
+ if (ignoreSelf) trace = trace._parent;
+ }
+ if (trace !== undefined) {
+ trace.attachExtraTrace(error);
+ } else if (!error.__stackCleaned__) {
+ var parsed = CapturedTrace.parseStackAndMessage(error);
+ util.notEnumerableProp(error, "stack",
+ parsed.message + "\n" + parsed.stack.join("\n"));
+ util.notEnumerableProp(error, "__stackCleaned__", true);
+ }
+ }
+};
+
+Promise.prototype._warn = function(message) {
+ var warning = new Warning(message);
+ var ctx = this._peekContext();
+ if (ctx) {
+ ctx.attachExtraTrace(warning);
+ } else {
+ var parsed = CapturedTrace.parseStackAndMessage(warning);
+ warning.stack = parsed.message + "\n" + parsed.stack.join("\n");
+ }
+ CapturedTrace.formatAndLogError(warning, "");
+};
+
+Promise.onPossiblyUnhandledRejection = function (fn) {
+ var domain = getDomain();
+ possiblyUnhandledRejection =
+ typeof fn === "function" ? (domain === null ? fn : domain.bind(fn))
+ : undefined;
+};
+
+Promise.onUnhandledRejectionHandled = function (fn) {
+ var domain = getDomain();
+ unhandledRejectionHandled =
+ typeof fn === "function" ? (domain === null ? fn : domain.bind(fn))
+ : undefined;
+};
+
+Promise.longStackTraces = function () {
+ if (async.haveItemsQueued() &&
+ debugging === false
+ ) {
+ throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/DT1qyG\u000a");
+ }
+ debugging = CapturedTrace.isSupported();
+ if (debugging) {
+ async.disableTrampolineIfNecessary();
+ }
+};
+
+Promise.hasLongStackTraces = function () {
+ return debugging && CapturedTrace.isSupported();
+};
+
+if (!CapturedTrace.isSupported()) {
+ Promise.longStackTraces = function(){};
+ debugging = false;
+}
+
+return function() {
+ return debugging;
+};
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/direct_resolve.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/direct_resolve.js
new file mode 100644
index 0000000..054685a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/direct_resolve.js
@@ -0,0 +1,63 @@
+"use strict";
+var util = require("./util.js");
+var isPrimitive = util.isPrimitive;
+
+module.exports = function(Promise) {
+var returner = function () {
+ return this;
+};
+var thrower = function () {
+ throw this;
+};
+var returnUndefined = function() {};
+var throwUndefined = function() {
+ throw undefined;
+};
+
+var wrapper = function (value, action) {
+ if (action === 1) {
+ return function () {
+ throw value;
+ };
+ } else if (action === 2) {
+ return function () {
+ return value;
+ };
+ }
+};
+
+
+Promise.prototype["return"] =
+Promise.prototype.thenReturn = function (value) {
+ if (value === undefined) return this.then(returnUndefined);
+
+ if (isPrimitive(value)) {
+ return this._then(
+ wrapper(value, 2),
+ undefined,
+ undefined,
+ undefined,
+ undefined
+ );
+ } else if (value instanceof Promise) {
+ value._ignoreRejections();
+ }
+ return this._then(returner, undefined, undefined, value, undefined);
+};
+
+Promise.prototype["throw"] =
+Promise.prototype.thenThrow = function (reason) {
+ if (reason === undefined) return this.then(throwUndefined);
+
+ if (isPrimitive(reason)) {
+ return this._then(
+ wrapper(reason, 1),
+ undefined,
+ undefined,
+ undefined,
+ undefined
+ );
+ }
+ return this._then(thrower, undefined, undefined, reason, undefined);
+};
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/each.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/each.js
new file mode 100644
index 0000000..a37e22c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/each.js
@@ -0,0 +1,12 @@
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var PromiseReduce = Promise.reduce;
+
+Promise.prototype.each = function (fn) {
+ return PromiseReduce(this, fn, null, INTERNAL);
+};
+
+Promise.each = function (promises, fn) {
+ return PromiseReduce(promises, fn, null, INTERNAL);
+};
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/errors.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/errors.js
new file mode 100644
index 0000000..c334bb1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/errors.js
@@ -0,0 +1,111 @@
+"use strict";
+var es5 = require("./es5.js");
+var Objectfreeze = es5.freeze;
+var util = require("./util.js");
+var inherits = util.inherits;
+var notEnumerableProp = util.notEnumerableProp;
+
+function subError(nameProperty, defaultMessage) {
+ function SubError(message) {
+ if (!(this instanceof SubError)) return new SubError(message);
+ notEnumerableProp(this, "message",
+ typeof message === "string" ? message : defaultMessage);
+ notEnumerableProp(this, "name", nameProperty);
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ } else {
+ Error.call(this);
+ }
+ }
+ inherits(SubError, Error);
+ return SubError;
+}
+
+var _TypeError, _RangeError;
+var Warning = subError("Warning", "warning");
+var CancellationError = subError("CancellationError", "cancellation error");
+var TimeoutError = subError("TimeoutError", "timeout error");
+var AggregateError = subError("AggregateError", "aggregate error");
+try {
+ _TypeError = TypeError;
+ _RangeError = RangeError;
+} catch(e) {
+ _TypeError = subError("TypeError", "type error");
+ _RangeError = subError("RangeError", "range error");
+}
+
+var methods = ("join pop push shift unshift slice filter forEach some " +
+ "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" ");
+
+for (var i = 0; i < methods.length; ++i) {
+ if (typeof Array.prototype[methods[i]] === "function") {
+ AggregateError.prototype[methods[i]] = Array.prototype[methods[i]];
+ }
+}
+
+es5.defineProperty(AggregateError.prototype, "length", {
+ value: 0,
+ configurable: false,
+ writable: true,
+ enumerable: true
+});
+AggregateError.prototype["isOperational"] = true;
+var level = 0;
+AggregateError.prototype.toString = function() {
+ var indent = Array(level * 4 + 1).join(" ");
+ var ret = "\n" + indent + "AggregateError of:" + "\n";
+ level++;
+ indent = Array(level * 4 + 1).join(" ");
+ for (var i = 0; i < this.length; ++i) {
+ var str = this[i] === this ? "[Circular AggregateError]" : this[i] + "";
+ var lines = str.split("\n");
+ for (var j = 0; j < lines.length; ++j) {
+ lines[j] = indent + lines[j];
+ }
+ str = lines.join("\n");
+ ret += str + "\n";
+ }
+ level--;
+ return ret;
+};
+
+function OperationalError(message) {
+ if (!(this instanceof OperationalError))
+ return new OperationalError(message);
+ notEnumerableProp(this, "name", "OperationalError");
+ notEnumerableProp(this, "message", message);
+ this.cause = message;
+ this["isOperational"] = true;
+
+ if (message instanceof Error) {
+ notEnumerableProp(this, "message", message.message);
+ notEnumerableProp(this, "stack", message.stack);
+ } else if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ }
+
+}
+inherits(OperationalError, Error);
+
+var errorTypes = Error["__BluebirdErrorTypes__"];
+if (!errorTypes) {
+ errorTypes = Objectfreeze({
+ CancellationError: CancellationError,
+ TimeoutError: TimeoutError,
+ OperationalError: OperationalError,
+ RejectionError: OperationalError,
+ AggregateError: AggregateError
+ });
+ notEnumerableProp(Error, "__BluebirdErrorTypes__", errorTypes);
+}
+
+module.exports = {
+ Error: Error,
+ TypeError: _TypeError,
+ RangeError: _RangeError,
+ CancellationError: errorTypes.CancellationError,
+ OperationalError: errorTypes.OperationalError,
+ TimeoutError: errorTypes.TimeoutError,
+ AggregateError: errorTypes.AggregateError,
+ Warning: Warning
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/es5.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/es5.js
new file mode 100644
index 0000000..ea41d5a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/es5.js
@@ -0,0 +1,80 @@
+var isES5 = (function(){
+ "use strict";
+ return this === undefined;
+})();
+
+if (isES5) {
+ module.exports = {
+ freeze: Object.freeze,
+ defineProperty: Object.defineProperty,
+ getDescriptor: Object.getOwnPropertyDescriptor,
+ keys: Object.keys,
+ names: Object.getOwnPropertyNames,
+ getPrototypeOf: Object.getPrototypeOf,
+ isArray: Array.isArray,
+ isES5: isES5,
+ propertyIsWritable: function(obj, prop) {
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop);
+ return !!(!descriptor || descriptor.writable || descriptor.set);
+ }
+ };
+} else {
+ var has = {}.hasOwnProperty;
+ var str = {}.toString;
+ var proto = {}.constructor.prototype;
+
+ var ObjectKeys = function (o) {
+ var ret = [];
+ for (var key in o) {
+ if (has.call(o, key)) {
+ ret.push(key);
+ }
+ }
+ return ret;
+ };
+
+ var ObjectGetDescriptor = function(o, key) {
+ return {value: o[key]};
+ };
+
+ var ObjectDefineProperty = function (o, key, desc) {
+ o[key] = desc.value;
+ return o;
+ };
+
+ var ObjectFreeze = function (obj) {
+ return obj;
+ };
+
+ var ObjectGetPrototypeOf = function (obj) {
+ try {
+ return Object(obj).constructor.prototype;
+ }
+ catch (e) {
+ return proto;
+ }
+ };
+
+ var ArrayIsArray = function (obj) {
+ try {
+ return str.call(obj) === "[object Array]";
+ }
+ catch(e) {
+ return false;
+ }
+ };
+
+ module.exports = {
+ isArray: ArrayIsArray,
+ keys: ObjectKeys,
+ names: ObjectKeys,
+ defineProperty: ObjectDefineProperty,
+ getDescriptor: ObjectGetDescriptor,
+ freeze: ObjectFreeze,
+ getPrototypeOf: ObjectGetPrototypeOf,
+ isES5: isES5,
+ propertyIsWritable: function() {
+ return true;
+ }
+ };
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/filter.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/filter.js
new file mode 100644
index 0000000..ed57bf0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/filter.js
@@ -0,0 +1,12 @@
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var PromiseMap = Promise.map;
+
+Promise.prototype.filter = function (fn, options) {
+ return PromiseMap(this, fn, options, INTERNAL);
+};
+
+Promise.filter = function (promises, fn, options) {
+ return PromiseMap(promises, fn, options, INTERNAL);
+};
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/finally.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/finally.js
new file mode 100644
index 0000000..c9342bc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/finally.js
@@ -0,0 +1,98 @@
+"use strict";
+module.exports = function(Promise, NEXT_FILTER, tryConvertToPromise) {
+var util = require("./util.js");
+var isPrimitive = util.isPrimitive;
+var thrower = util.thrower;
+
+function returnThis() {
+ return this;
+}
+function throwThis() {
+ throw this;
+}
+function return$(r) {
+ return function() {
+ return r;
+ };
+}
+function throw$(r) {
+ return function() {
+ throw r;
+ };
+}
+function promisedFinally(ret, reasonOrValue, isFulfilled) {
+ var then;
+ if (isPrimitive(reasonOrValue)) {
+ then = isFulfilled ? return$(reasonOrValue) : throw$(reasonOrValue);
+ } else {
+ then = isFulfilled ? returnThis : throwThis;
+ }
+ return ret._then(then, thrower, undefined, reasonOrValue, undefined);
+}
+
+function finallyHandler(reasonOrValue) {
+ var promise = this.promise;
+ var handler = this.handler;
+
+ var ret = promise._isBound()
+ ? handler.call(promise._boundValue())
+ : handler();
+
+ if (ret !== undefined) {
+ var maybePromise = tryConvertToPromise(ret, promise);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ return promisedFinally(maybePromise, reasonOrValue,
+ promise.isFulfilled());
+ }
+ }
+
+ if (promise.isRejected()) {
+ NEXT_FILTER.e = reasonOrValue;
+ return NEXT_FILTER;
+ } else {
+ return reasonOrValue;
+ }
+}
+
+function tapHandler(value) {
+ var promise = this.promise;
+ var handler = this.handler;
+
+ var ret = promise._isBound()
+ ? handler.call(promise._boundValue(), value)
+ : handler(value);
+
+ if (ret !== undefined) {
+ var maybePromise = tryConvertToPromise(ret, promise);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ return promisedFinally(maybePromise, value, true);
+ }
+ }
+ return value;
+}
+
+Promise.prototype._passThroughHandler = function (handler, isFinally) {
+ if (typeof handler !== "function") return this.then();
+
+ var promiseAndHandler = {
+ promise: this,
+ handler: handler
+ };
+
+ return this._then(
+ isFinally ? finallyHandler : tapHandler,
+ isFinally ? finallyHandler : undefined, undefined,
+ promiseAndHandler, undefined);
+};
+
+Promise.prototype.lastly =
+Promise.prototype["finally"] = function (handler) {
+ return this._passThroughHandler(handler, true);
+};
+
+Promise.prototype.tap = function (handler) {
+ return this._passThroughHandler(handler, false);
+};
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/generators.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/generators.js
new file mode 100644
index 0000000..4c0568d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/generators.js
@@ -0,0 +1,136 @@
+"use strict";
+module.exports = function(Promise,
+ apiRejection,
+ INTERNAL,
+ tryConvertToPromise) {
+var errors = require("./errors.js");
+var TypeError = errors.TypeError;
+var util = require("./util.js");
+var errorObj = util.errorObj;
+var tryCatch = util.tryCatch;
+var yieldHandlers = [];
+
+function promiseFromYieldHandler(value, yieldHandlers, traceParent) {
+ for (var i = 0; i < yieldHandlers.length; ++i) {
+ traceParent._pushContext();
+ var result = tryCatch(yieldHandlers[i])(value);
+ traceParent._popContext();
+ if (result === errorObj) {
+ traceParent._pushContext();
+ var ret = Promise.reject(errorObj.e);
+ traceParent._popContext();
+ return ret;
+ }
+ var maybePromise = tryConvertToPromise(result, traceParent);
+ if (maybePromise instanceof Promise) return maybePromise;
+ }
+ return null;
+}
+
+function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) {
+ var promise = this._promise = new Promise(INTERNAL);
+ promise._captureStackTrace();
+ this._stack = stack;
+ this._generatorFunction = generatorFunction;
+ this._receiver = receiver;
+ this._generator = undefined;
+ this._yieldHandlers = typeof yieldHandler === "function"
+ ? [yieldHandler].concat(yieldHandlers)
+ : yieldHandlers;
+}
+
+PromiseSpawn.prototype.promise = function () {
+ return this._promise;
+};
+
+PromiseSpawn.prototype._run = function () {
+ this._generator = this._generatorFunction.call(this._receiver);
+ this._receiver =
+ this._generatorFunction = undefined;
+ this._next(undefined);
+};
+
+PromiseSpawn.prototype._continue = function (result) {
+ if (result === errorObj) {
+ return this._promise._rejectCallback(result.e, false, true);
+ }
+
+ var value = result.value;
+ if (result.done === true) {
+ this._promise._resolveCallback(value);
+ } else {
+ var maybePromise = tryConvertToPromise(value, this._promise);
+ if (!(maybePromise instanceof Promise)) {
+ maybePromise =
+ promiseFromYieldHandler(maybePromise,
+ this._yieldHandlers,
+ this._promise);
+ if (maybePromise === null) {
+ this._throw(
+ new TypeError(
+ "A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/4Y4pDk\u000a\u000a".replace("%s", value) +
+ "From coroutine:\u000a" +
+ this._stack.split("\n").slice(1, -7).join("\n")
+ )
+ );
+ return;
+ }
+ }
+ maybePromise._then(
+ this._next,
+ this._throw,
+ undefined,
+ this,
+ null
+ );
+ }
+};
+
+PromiseSpawn.prototype._throw = function (reason) {
+ this._promise._attachExtraTrace(reason);
+ this._promise._pushContext();
+ var result = tryCatch(this._generator["throw"])
+ .call(this._generator, reason);
+ this._promise._popContext();
+ this._continue(result);
+};
+
+PromiseSpawn.prototype._next = function (value) {
+ this._promise._pushContext();
+ var result = tryCatch(this._generator.next).call(this._generator, value);
+ this._promise._popContext();
+ this._continue(result);
+};
+
+Promise.coroutine = function (generatorFunction, options) {
+ if (typeof generatorFunction !== "function") {
+ throw new TypeError("generatorFunction must be a function\u000a\u000a See http://goo.gl/6Vqhm0\u000a");
+ }
+ var yieldHandler = Object(options).yieldHandler;
+ var PromiseSpawn$ = PromiseSpawn;
+ var stack = new Error().stack;
+ return function () {
+ var generator = generatorFunction.apply(this, arguments);
+ var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler,
+ stack);
+ spawn._generator = generator;
+ spawn._next(undefined);
+ return spawn.promise();
+ };
+};
+
+Promise.coroutine.addYieldHandler = function(fn) {
+ if (typeof fn !== "function") throw new TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ yieldHandlers.push(fn);
+};
+
+Promise.spawn = function (generatorFunction) {
+ if (typeof generatorFunction !== "function") {
+ return apiRejection("generatorFunction must be a function\u000a\u000a See http://goo.gl/6Vqhm0\u000a");
+ }
+ var spawn = new PromiseSpawn(generatorFunction, this);
+ var ret = spawn.promise();
+ spawn._run(Promise.spawn);
+ return ret;
+};
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/join.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/join.js
new file mode 100644
index 0000000..cf33eb1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/join.js
@@ -0,0 +1,107 @@
+"use strict";
+module.exports =
+function(Promise, PromiseArray, tryConvertToPromise, INTERNAL) {
+var util = require("./util.js");
+var canEvaluate = util.canEvaluate;
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+var reject;
+
+if (!false) {
+if (canEvaluate) {
+ var thenCallback = function(i) {
+ return new Function("value", "holder", " \n\
+ 'use strict'; \n\
+ holder.pIndex = value; \n\
+ holder.checkFulfillment(this); \n\
+ ".replace(/Index/g, i));
+ };
+
+ var caller = function(count) {
+ var values = [];
+ for (var i = 1; i <= count; ++i) values.push("holder.p" + i);
+ return new Function("holder", " \n\
+ 'use strict'; \n\
+ var callback = holder.fn; \n\
+ return callback(values); \n\
+ ".replace(/values/g, values.join(", ")));
+ };
+ var thenCallbacks = [];
+ var callers = [undefined];
+ for (var i = 1; i <= 5; ++i) {
+ thenCallbacks.push(thenCallback(i));
+ callers.push(caller(i));
+ }
+
+ var Holder = function(total, fn) {
+ this.p1 = this.p2 = this.p3 = this.p4 = this.p5 = null;
+ this.fn = fn;
+ this.total = total;
+ this.now = 0;
+ };
+
+ Holder.prototype.callers = callers;
+ Holder.prototype.checkFulfillment = function(promise) {
+ var now = this.now;
+ now++;
+ var total = this.total;
+ if (now >= total) {
+ var handler = this.callers[total];
+ promise._pushContext();
+ var ret = tryCatch(handler)(this);
+ promise._popContext();
+ if (ret === errorObj) {
+ promise._rejectCallback(ret.e, false, true);
+ } else {
+ promise._resolveCallback(ret);
+ }
+ } else {
+ this.now = now;
+ }
+ };
+
+ var reject = function (reason) {
+ this._reject(reason);
+ };
+}
+}
+
+Promise.join = function () {
+ var last = arguments.length - 1;
+ var fn;
+ if (last > 0 && typeof arguments[last] === "function") {
+ fn = arguments[last];
+ if (!false) {
+ if (last < 6 && canEvaluate) {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ var holder = new Holder(last, fn);
+ var callbacks = thenCallbacks;
+ for (var i = 0; i < last; ++i) {
+ var maybePromise = tryConvertToPromise(arguments[i], ret);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ if (maybePromise._isPending()) {
+ maybePromise._then(callbacks[i], reject,
+ undefined, ret, holder);
+ } else if (maybePromise._isFulfilled()) {
+ callbacks[i].call(ret,
+ maybePromise._value(), holder);
+ } else {
+ ret._reject(maybePromise._reason());
+ }
+ } else {
+ callbacks[i].call(ret, maybePromise, holder);
+ }
+ }
+ return ret;
+ }
+ }
+ }
+ var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len; ++$_i) {args[$_i] = arguments[$_i];}
+ if (fn) args.pop();
+ var ret = new PromiseArray(args).promise();
+ return fn !== undefined ? ret.spread(fn) : ret;
+};
+
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/map.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/map.js
new file mode 100644
index 0000000..2f40efd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/map.js
@@ -0,0 +1,133 @@
+"use strict";
+module.exports = function(Promise,
+ PromiseArray,
+ apiRejection,
+ tryConvertToPromise,
+ INTERNAL) {
+var getDomain = Promise._getDomain;
+var async = require("./async.js");
+var util = require("./util.js");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+var PENDING = {};
+var EMPTY_ARRAY = [];
+
+function MappingPromiseArray(promises, fn, limit, _filter) {
+ this.constructor$(promises);
+ this._promise._captureStackTrace();
+ var domain = getDomain();
+ this._callback = domain === null ? fn : domain.bind(fn);
+ this._preservedValues = _filter === INTERNAL
+ ? new Array(this.length())
+ : null;
+ this._limit = limit;
+ this._inFlight = 0;
+ this._queue = limit >= 1 ? [] : EMPTY_ARRAY;
+ async.invoke(init, this, undefined);
+}
+util.inherits(MappingPromiseArray, PromiseArray);
+function init() {this._init$(undefined, -2);}
+
+MappingPromiseArray.prototype._init = function () {};
+
+MappingPromiseArray.prototype._promiseFulfilled = function (value, index) {
+ var values = this._values;
+ var length = this.length();
+ var preservedValues = this._preservedValues;
+ var limit = this._limit;
+ if (values[index] === PENDING) {
+ values[index] = value;
+ if (limit >= 1) {
+ this._inFlight--;
+ this._drainQueue();
+ if (this._isResolved()) return;
+ }
+ } else {
+ if (limit >= 1 && this._inFlight >= limit) {
+ values[index] = value;
+ this._queue.push(index);
+ return;
+ }
+ if (preservedValues !== null) preservedValues[index] = value;
+
+ var callback = this._callback;
+ var receiver = this._promise._boundValue();
+ this._promise._pushContext();
+ var ret = tryCatch(callback).call(receiver, value, index, length);
+ this._promise._popContext();
+ if (ret === errorObj) return this._reject(ret.e);
+
+ var maybePromise = tryConvertToPromise(ret, this._promise);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ if (maybePromise._isPending()) {
+ if (limit >= 1) this._inFlight++;
+ values[index] = PENDING;
+ return maybePromise._proxyPromiseArray(this, index);
+ } else if (maybePromise._isFulfilled()) {
+ ret = maybePromise._value();
+ } else {
+ return this._reject(maybePromise._reason());
+ }
+ }
+ values[index] = ret;
+ }
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= length) {
+ if (preservedValues !== null) {
+ this._filter(values, preservedValues);
+ } else {
+ this._resolve(values);
+ }
+
+ }
+};
+
+MappingPromiseArray.prototype._drainQueue = function () {
+ var queue = this._queue;
+ var limit = this._limit;
+ var values = this._values;
+ while (queue.length > 0 && this._inFlight < limit) {
+ if (this._isResolved()) return;
+ var index = queue.pop();
+ this._promiseFulfilled(values[index], index);
+ }
+};
+
+MappingPromiseArray.prototype._filter = function (booleans, values) {
+ var len = values.length;
+ var ret = new Array(len);
+ var j = 0;
+ for (var i = 0; i < len; ++i) {
+ if (booleans[i]) ret[j++] = values[i];
+ }
+ ret.length = j;
+ this._resolve(ret);
+};
+
+MappingPromiseArray.prototype.preservedValues = function () {
+ return this._preservedValues;
+};
+
+function map(promises, fn, options, _filter) {
+ var limit = typeof options === "object" && options !== null
+ ? options.concurrency
+ : 0;
+ limit = typeof limit === "number" &&
+ isFinite(limit) && limit >= 1 ? limit : 0;
+ return new MappingPromiseArray(promises, fn, limit, _filter);
+}
+
+Promise.prototype.map = function (fn, options) {
+ if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+
+ return map(this, fn, options, null).promise();
+};
+
+Promise.map = function (promises, fn, options, _filter) {
+ if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ return map(promises, fn, options, _filter).promise();
+};
+
+
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/method.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/method.js
new file mode 100644
index 0000000..3d3eeb1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/method.js
@@ -0,0 +1,44 @@
+"use strict";
+module.exports =
+function(Promise, INTERNAL, tryConvertToPromise, apiRejection) {
+var util = require("./util.js");
+var tryCatch = util.tryCatch;
+
+Promise.method = function (fn) {
+ if (typeof fn !== "function") {
+ throw new Promise.TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ }
+ return function () {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._pushContext();
+ var value = tryCatch(fn).apply(this, arguments);
+ ret._popContext();
+ ret._resolveFromSyncValue(value);
+ return ret;
+ };
+};
+
+Promise.attempt = Promise["try"] = function (fn, args, ctx) {
+ if (typeof fn !== "function") {
+ return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ }
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._pushContext();
+ var value = util.isArray(args)
+ ? tryCatch(fn).apply(ctx, args)
+ : tryCatch(fn).call(ctx, args);
+ ret._popContext();
+ ret._resolveFromSyncValue(value);
+ return ret;
+};
+
+Promise.prototype._resolveFromSyncValue = function (value) {
+ if (value === util.errorObj) {
+ this._rejectCallback(value.e, false, true);
+ } else {
+ this._resolveCallback(value, true);
+ }
+};
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/nodeify.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/nodeify.js
new file mode 100644
index 0000000..257565d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/nodeify.js
@@ -0,0 +1,59 @@
+"use strict";
+module.exports = function(Promise) {
+var util = require("./util.js");
+var async = require("./async.js");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+
+function spreadAdapter(val, nodeback) {
+ var promise = this;
+ if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback);
+ var ret =
+ tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val));
+ if (ret === errorObj) {
+ async.throwLater(ret.e);
+ }
+}
+
+function successAdapter(val, nodeback) {
+ var promise = this;
+ var receiver = promise._boundValue();
+ var ret = val === undefined
+ ? tryCatch(nodeback).call(receiver, null)
+ : tryCatch(nodeback).call(receiver, null, val);
+ if (ret === errorObj) {
+ async.throwLater(ret.e);
+ }
+}
+function errorAdapter(reason, nodeback) {
+ var promise = this;
+ if (!reason) {
+ var target = promise._target();
+ var newReason = target._getCarriedStackTrace();
+ newReason.cause = reason;
+ reason = newReason;
+ }
+ var ret = tryCatch(nodeback).call(promise._boundValue(), reason);
+ if (ret === errorObj) {
+ async.throwLater(ret.e);
+ }
+}
+
+Promise.prototype.asCallback =
+Promise.prototype.nodeify = function (nodeback, options) {
+ if (typeof nodeback == "function") {
+ var adapter = successAdapter;
+ if (options !== undefined && Object(options).spread) {
+ adapter = spreadAdapter;
+ }
+ this._then(
+ adapter,
+ errorAdapter,
+ undefined,
+ this,
+ nodeback
+ );
+ }
+ return this;
+};
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/progress.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/progress.js
new file mode 100644
index 0000000..2e3e95e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/progress.js
@@ -0,0 +1,76 @@
+"use strict";
+module.exports = function(Promise, PromiseArray) {
+var util = require("./util.js");
+var async = require("./async.js");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+
+Promise.prototype.progressed = function (handler) {
+ return this._then(undefined, undefined, handler, undefined, undefined);
+};
+
+Promise.prototype._progress = function (progressValue) {
+ if (this._isFollowingOrFulfilledOrRejected()) return;
+ this._target()._progressUnchecked(progressValue);
+
+};
+
+Promise.prototype._progressHandlerAt = function (index) {
+ return index === 0
+ ? this._progressHandler0
+ : this[(index << 2) + index - 5 + 2];
+};
+
+Promise.prototype._doProgressWith = function (progression) {
+ var progressValue = progression.value;
+ var handler = progression.handler;
+ var promise = progression.promise;
+ var receiver = progression.receiver;
+
+ var ret = tryCatch(handler).call(receiver, progressValue);
+ if (ret === errorObj) {
+ if (ret.e != null &&
+ ret.e.name !== "StopProgressPropagation") {
+ var trace = util.canAttachTrace(ret.e)
+ ? ret.e : new Error(util.toString(ret.e));
+ promise._attachExtraTrace(trace);
+ promise._progress(ret.e);
+ }
+ } else if (ret instanceof Promise) {
+ ret._then(promise._progress, null, null, promise, undefined);
+ } else {
+ promise._progress(ret);
+ }
+};
+
+
+Promise.prototype._progressUnchecked = function (progressValue) {
+ var len = this._length();
+ var progress = this._progress;
+ for (var i = 0; i < len; i++) {
+ var handler = this._progressHandlerAt(i);
+ var promise = this._promiseAt(i);
+ if (!(promise instanceof Promise)) {
+ var receiver = this._receiverAt(i);
+ if (typeof handler === "function") {
+ handler.call(receiver, progressValue, promise);
+ } else if (receiver instanceof PromiseArray &&
+ !receiver._isResolved()) {
+ receiver._promiseProgressed(progressValue, promise);
+ }
+ continue;
+ }
+
+ if (typeof handler === "function") {
+ async.invoke(this._doProgressWith, this, {
+ handler: handler,
+ promise: promise,
+ receiver: this._receiverAt(i),
+ value: progressValue
+ });
+ } else {
+ async.invoke(progress, promise, progressValue);
+ }
+ }
+};
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/promise.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/promise.js
new file mode 100644
index 0000000..96bd545
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/promise.js
@@ -0,0 +1,754 @@
+"use strict";
+module.exports = function() {
+var makeSelfResolutionError = function () {
+ return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/LhFpo0\u000a");
+};
+var reflect = function() {
+ return new Promise.PromiseInspection(this._target());
+};
+var apiRejection = function(msg) {
+ return Promise.reject(new TypeError(msg));
+};
+
+var util = require("./util.js");
+
+var getDomain;
+if (util.isNode) {
+ getDomain = function() {
+ var ret = process.domain;
+ if (ret === undefined) ret = null;
+ return ret;
+ };
+} else {
+ getDomain = function() {
+ return null;
+ };
+}
+util.notEnumerableProp(Promise, "_getDomain", getDomain);
+
+var UNDEFINED_BINDING = {};
+var async = require("./async.js");
+var errors = require("./errors.js");
+var TypeError = Promise.TypeError = errors.TypeError;
+Promise.RangeError = errors.RangeError;
+Promise.CancellationError = errors.CancellationError;
+Promise.TimeoutError = errors.TimeoutError;
+Promise.OperationalError = errors.OperationalError;
+Promise.RejectionError = errors.OperationalError;
+Promise.AggregateError = errors.AggregateError;
+var INTERNAL = function(){};
+var APPLY = {};
+var NEXT_FILTER = {e: null};
+var tryConvertToPromise = require("./thenables.js")(Promise, INTERNAL);
+var PromiseArray =
+ require("./promise_array.js")(Promise, INTERNAL,
+ tryConvertToPromise, apiRejection);
+var CapturedTrace = require("./captured_trace.js")();
+var isDebugging = require("./debuggability.js")(Promise, CapturedTrace);
+ /*jshint unused:false*/
+var createContext =
+ require("./context.js")(Promise, CapturedTrace, isDebugging);
+var CatchFilter = require("./catch_filter.js")(NEXT_FILTER);
+var PromiseResolver = require("./promise_resolver.js");
+var nodebackForPromise = PromiseResolver._nodebackForPromise;
+var errorObj = util.errorObj;
+var tryCatch = util.tryCatch;
+function Promise(resolver) {
+ if (typeof resolver !== "function") {
+ throw new TypeError("the promise constructor requires a resolver function\u000a\u000a See http://goo.gl/EC22Yn\u000a");
+ }
+ if (this.constructor !== Promise) {
+ throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/KsIlge\u000a");
+ }
+ this._bitField = 0;
+ this._fulfillmentHandler0 = undefined;
+ this._rejectionHandler0 = undefined;
+ this._progressHandler0 = undefined;
+ this._promise0 = undefined;
+ this._receiver0 = undefined;
+ this._settledValue = undefined;
+ if (resolver !== INTERNAL) this._resolveFromResolver(resolver);
+}
+
+Promise.prototype.toString = function () {
+ return "[object Promise]";
+};
+
+Promise.prototype.caught = Promise.prototype["catch"] = function (fn) {
+ var len = arguments.length;
+ if (len > 1) {
+ var catchInstances = new Array(len - 1),
+ j = 0, i;
+ for (i = 0; i < len - 1; ++i) {
+ var item = arguments[i];
+ if (typeof item === "function") {
+ catchInstances[j++] = item;
+ } else {
+ return Promise.reject(
+ new TypeError("Catch filter must inherit from Error or be a simple predicate function\u000a\u000a See http://goo.gl/o84o68\u000a"));
+ }
+ }
+ catchInstances.length = j;
+ fn = arguments[i];
+ var catchFilter = new CatchFilter(catchInstances, fn, this);
+ return this._then(undefined, catchFilter.doFilter, undefined,
+ catchFilter, undefined);
+ }
+ return this._then(undefined, fn, undefined, undefined, undefined);
+};
+
+Promise.prototype.reflect = function () {
+ return this._then(reflect, reflect, undefined, this, undefined);
+};
+
+Promise.prototype.then = function (didFulfill, didReject, didProgress) {
+ if (isDebugging() && arguments.length > 0 &&
+ typeof didFulfill !== "function" &&
+ typeof didReject !== "function") {
+ var msg = ".then() only accepts functions but was passed: " +
+ util.classString(didFulfill);
+ if (arguments.length > 1) {
+ msg += ", " + util.classString(didReject);
+ }
+ this._warn(msg);
+ }
+ return this._then(didFulfill, didReject, didProgress,
+ undefined, undefined);
+};
+
+Promise.prototype.done = function (didFulfill, didReject, didProgress) {
+ var promise = this._then(didFulfill, didReject, didProgress,
+ undefined, undefined);
+ promise._setIsFinal();
+};
+
+Promise.prototype.spread = function (didFulfill, didReject) {
+ return this.all()._then(didFulfill, didReject, undefined, APPLY, undefined);
+};
+
+Promise.prototype.isCancellable = function () {
+ return !this.isResolved() &&
+ this._cancellable();
+};
+
+Promise.prototype.toJSON = function () {
+ var ret = {
+ isFulfilled: false,
+ isRejected: false,
+ fulfillmentValue: undefined,
+ rejectionReason: undefined
+ };
+ if (this.isFulfilled()) {
+ ret.fulfillmentValue = this.value();
+ ret.isFulfilled = true;
+ } else if (this.isRejected()) {
+ ret.rejectionReason = this.reason();
+ ret.isRejected = true;
+ }
+ return ret;
+};
+
+Promise.prototype.all = function () {
+ return new PromiseArray(this).promise();
+};
+
+Promise.prototype.error = function (fn) {
+ return this.caught(util.originatesFromRejection, fn);
+};
+
+Promise.is = function (val) {
+ return val instanceof Promise;
+};
+
+Promise.fromNode = function(fn) {
+ var ret = new Promise(INTERNAL);
+ var result = tryCatch(fn)(nodebackForPromise(ret));
+ if (result === errorObj) {
+ ret._rejectCallback(result.e, true, true);
+ }
+ return ret;
+};
+
+Promise.all = function (promises) {
+ return new PromiseArray(promises).promise();
+};
+
+Promise.defer = Promise.pending = function () {
+ var promise = new Promise(INTERNAL);
+ return new PromiseResolver(promise);
+};
+
+Promise.cast = function (obj) {
+ var ret = tryConvertToPromise(obj);
+ if (!(ret instanceof Promise)) {
+ var val = ret;
+ ret = new Promise(INTERNAL);
+ ret._fulfillUnchecked(val);
+ }
+ return ret;
+};
+
+Promise.resolve = Promise.fulfilled = Promise.cast;
+
+Promise.reject = Promise.rejected = function (reason) {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._rejectCallback(reason, true);
+ return ret;
+};
+
+Promise.setScheduler = function(fn) {
+ if (typeof fn !== "function") throw new TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ var prev = async._schedule;
+ async._schedule = fn;
+ return prev;
+};
+
+Promise.prototype._then = function (
+ didFulfill,
+ didReject,
+ didProgress,
+ receiver,
+ internalData
+) {
+ var haveInternalData = internalData !== undefined;
+ var ret = haveInternalData ? internalData : new Promise(INTERNAL);
+
+ if (!haveInternalData) {
+ ret._propagateFrom(this, 4 | 1);
+ ret._captureStackTrace();
+ }
+
+ var target = this._target();
+ if (target !== this) {
+ if (receiver === undefined) receiver = this._boundTo;
+ if (!haveInternalData) ret._setIsMigrated();
+ }
+
+ var callbackIndex = target._addCallbacks(didFulfill,
+ didReject,
+ didProgress,
+ ret,
+ receiver,
+ getDomain());
+
+ if (target._isResolved() && !target._isSettlePromisesQueued()) {
+ async.invoke(
+ target._settlePromiseAtPostResolution, target, callbackIndex);
+ }
+
+ return ret;
+};
+
+Promise.prototype._settlePromiseAtPostResolution = function (index) {
+ if (this._isRejectionUnhandled()) this._unsetRejectionIsUnhandled();
+ this._settlePromiseAt(index);
+};
+
+Promise.prototype._length = function () {
+ return this._bitField & 131071;
+};
+
+Promise.prototype._isFollowingOrFulfilledOrRejected = function () {
+ return (this._bitField & 939524096) > 0;
+};
+
+Promise.prototype._isFollowing = function () {
+ return (this._bitField & 536870912) === 536870912;
+};
+
+Promise.prototype._setLength = function (len) {
+ this._bitField = (this._bitField & -131072) |
+ (len & 131071);
+};
+
+Promise.prototype._setFulfilled = function () {
+ this._bitField = this._bitField | 268435456;
+};
+
+Promise.prototype._setRejected = function () {
+ this._bitField = this._bitField | 134217728;
+};
+
+Promise.prototype._setFollowing = function () {
+ this._bitField = this._bitField | 536870912;
+};
+
+Promise.prototype._setIsFinal = function () {
+ this._bitField = this._bitField | 33554432;
+};
+
+Promise.prototype._isFinal = function () {
+ return (this._bitField & 33554432) > 0;
+};
+
+Promise.prototype._cancellable = function () {
+ return (this._bitField & 67108864) > 0;
+};
+
+Promise.prototype._setCancellable = function () {
+ this._bitField = this._bitField | 67108864;
+};
+
+Promise.prototype._unsetCancellable = function () {
+ this._bitField = this._bitField & (~67108864);
+};
+
+Promise.prototype._setIsMigrated = function () {
+ this._bitField = this._bitField | 4194304;
+};
+
+Promise.prototype._unsetIsMigrated = function () {
+ this._bitField = this._bitField & (~4194304);
+};
+
+Promise.prototype._isMigrated = function () {
+ return (this._bitField & 4194304) > 0;
+};
+
+Promise.prototype._receiverAt = function (index) {
+ var ret = index === 0
+ ? this._receiver0
+ : this[
+ index * 5 - 5 + 4];
+ if (ret === UNDEFINED_BINDING) {
+ return undefined;
+ } else if (ret === undefined && this._isBound()) {
+ return this._boundValue();
+ }
+ return ret;
+};
+
+Promise.prototype._promiseAt = function (index) {
+ return index === 0
+ ? this._promise0
+ : this[index * 5 - 5 + 3];
+};
+
+Promise.prototype._fulfillmentHandlerAt = function (index) {
+ return index === 0
+ ? this._fulfillmentHandler0
+ : this[index * 5 - 5 + 0];
+};
+
+Promise.prototype._rejectionHandlerAt = function (index) {
+ return index === 0
+ ? this._rejectionHandler0
+ : this[index * 5 - 5 + 1];
+};
+
+Promise.prototype._boundValue = function() {
+ var ret = this._boundTo;
+ if (ret !== undefined) {
+ if (ret instanceof Promise) {
+ if (ret.isFulfilled()) {
+ return ret.value();
+ } else {
+ return undefined;
+ }
+ }
+ }
+ return ret;
+};
+
+Promise.prototype._migrateCallbacks = function (follower, index) {
+ var fulfill = follower._fulfillmentHandlerAt(index);
+ var reject = follower._rejectionHandlerAt(index);
+ var progress = follower._progressHandlerAt(index);
+ var promise = follower._promiseAt(index);
+ var receiver = follower._receiverAt(index);
+ if (promise instanceof Promise) promise._setIsMigrated();
+ if (receiver === undefined) receiver = UNDEFINED_BINDING;
+ this._addCallbacks(fulfill, reject, progress, promise, receiver, null);
+};
+
+Promise.prototype._addCallbacks = function (
+ fulfill,
+ reject,
+ progress,
+ promise,
+ receiver,
+ domain
+) {
+ var index = this._length();
+
+ if (index >= 131071 - 5) {
+ index = 0;
+ this._setLength(0);
+ }
+
+ if (index === 0) {
+ this._promise0 = promise;
+ if (receiver !== undefined) this._receiver0 = receiver;
+ if (typeof fulfill === "function" && !this._isCarryingStackTrace()) {
+ this._fulfillmentHandler0 =
+ domain === null ? fulfill : domain.bind(fulfill);
+ }
+ if (typeof reject === "function") {
+ this._rejectionHandler0 =
+ domain === null ? reject : domain.bind(reject);
+ }
+ if (typeof progress === "function") {
+ this._progressHandler0 =
+ domain === null ? progress : domain.bind(progress);
+ }
+ } else {
+ var base = index * 5 - 5;
+ this[base + 3] = promise;
+ this[base + 4] = receiver;
+ if (typeof fulfill === "function") {
+ this[base + 0] =
+ domain === null ? fulfill : domain.bind(fulfill);
+ }
+ if (typeof reject === "function") {
+ this[base + 1] =
+ domain === null ? reject : domain.bind(reject);
+ }
+ if (typeof progress === "function") {
+ this[base + 2] =
+ domain === null ? progress : domain.bind(progress);
+ }
+ }
+ this._setLength(index + 1);
+ return index;
+};
+
+Promise.prototype._setProxyHandlers = function (receiver, promiseSlotValue) {
+ var index = this._length();
+
+ if (index >= 131071 - 5) {
+ index = 0;
+ this._setLength(0);
+ }
+ if (index === 0) {
+ this._promise0 = promiseSlotValue;
+ this._receiver0 = receiver;
+ } else {
+ var base = index * 5 - 5;
+ this[base + 3] = promiseSlotValue;
+ this[base + 4] = receiver;
+ }
+ this._setLength(index + 1);
+};
+
+Promise.prototype._proxyPromiseArray = function (promiseArray, index) {
+ this._setProxyHandlers(promiseArray, index);
+};
+
+Promise.prototype._resolveCallback = function(value, shouldBind) {
+ if (this._isFollowingOrFulfilledOrRejected()) return;
+ if (value === this)
+ return this._rejectCallback(makeSelfResolutionError(), false, true);
+ var maybePromise = tryConvertToPromise(value, this);
+ if (!(maybePromise instanceof Promise)) return this._fulfill(value);
+
+ var propagationFlags = 1 | (shouldBind ? 4 : 0);
+ this._propagateFrom(maybePromise, propagationFlags);
+ var promise = maybePromise._target();
+ if (promise._isPending()) {
+ var len = this._length();
+ for (var i = 0; i < len; ++i) {
+ promise._migrateCallbacks(this, i);
+ }
+ this._setFollowing();
+ this._setLength(0);
+ this._setFollowee(promise);
+ } else if (promise._isFulfilled()) {
+ this._fulfillUnchecked(promise._value());
+ } else {
+ this._rejectUnchecked(promise._reason(),
+ promise._getCarriedStackTrace());
+ }
+};
+
+Promise.prototype._rejectCallback =
+function(reason, synchronous, shouldNotMarkOriginatingFromRejection) {
+ if (!shouldNotMarkOriginatingFromRejection) {
+ util.markAsOriginatingFromRejection(reason);
+ }
+ var trace = util.ensureErrorObject(reason);
+ var hasStack = trace === reason;
+ this._attachExtraTrace(trace, synchronous ? hasStack : false);
+ this._reject(reason, hasStack ? undefined : trace);
+};
+
+Promise.prototype._resolveFromResolver = function (resolver) {
+ var promise = this;
+ this._captureStackTrace();
+ this._pushContext();
+ var synchronous = true;
+ var r = tryCatch(resolver)(function(value) {
+ if (promise === null) return;
+ promise._resolveCallback(value);
+ promise = null;
+ }, function (reason) {
+ if (promise === null) return;
+ promise._rejectCallback(reason, synchronous);
+ promise = null;
+ });
+ synchronous = false;
+ this._popContext();
+
+ if (r !== undefined && r === errorObj && promise !== null) {
+ promise._rejectCallback(r.e, true, true);
+ promise = null;
+ }
+};
+
+Promise.prototype._settlePromiseFromHandler = function (
+ handler, receiver, value, promise
+) {
+ if (promise._isRejected()) return;
+ promise._pushContext();
+ var x;
+ if (receiver === APPLY && !this._isRejected()) {
+ x = tryCatch(handler).apply(this._boundValue(), value);
+ } else {
+ x = tryCatch(handler).call(receiver, value);
+ }
+ promise._popContext();
+
+ if (x === errorObj || x === promise || x === NEXT_FILTER) {
+ var err = x === promise ? makeSelfResolutionError() : x.e;
+ promise._rejectCallback(err, false, true);
+ } else {
+ promise._resolveCallback(x);
+ }
+};
+
+Promise.prototype._target = function() {
+ var ret = this;
+ while (ret._isFollowing()) ret = ret._followee();
+ return ret;
+};
+
+Promise.prototype._followee = function() {
+ return this._rejectionHandler0;
+};
+
+Promise.prototype._setFollowee = function(promise) {
+ this._rejectionHandler0 = promise;
+};
+
+Promise.prototype._cleanValues = function () {
+ if (this._cancellable()) {
+ this._cancellationParent = undefined;
+ }
+};
+
+Promise.prototype._propagateFrom = function (parent, flags) {
+ if ((flags & 1) > 0 && parent._cancellable()) {
+ this._setCancellable();
+ this._cancellationParent = parent;
+ }
+ if ((flags & 4) > 0 && parent._isBound()) {
+ this._setBoundTo(parent._boundTo);
+ }
+};
+
+Promise.prototype._fulfill = function (value) {
+ if (this._isFollowingOrFulfilledOrRejected()) return;
+ this._fulfillUnchecked(value);
+};
+
+Promise.prototype._reject = function (reason, carriedStackTrace) {
+ if (this._isFollowingOrFulfilledOrRejected()) return;
+ this._rejectUnchecked(reason, carriedStackTrace);
+};
+
+Promise.prototype._settlePromiseAt = function (index) {
+ var promise = this._promiseAt(index);
+ var isPromise = promise instanceof Promise;
+
+ if (isPromise && promise._isMigrated()) {
+ promise._unsetIsMigrated();
+ return async.invoke(this._settlePromiseAt, this, index);
+ }
+ var handler = this._isFulfilled()
+ ? this._fulfillmentHandlerAt(index)
+ : this._rejectionHandlerAt(index);
+
+ var carriedStackTrace =
+ this._isCarryingStackTrace() ? this._getCarriedStackTrace() : undefined;
+ var value = this._settledValue;
+ var receiver = this._receiverAt(index);
+ this._clearCallbackDataAtIndex(index);
+
+ if (typeof handler === "function") {
+ if (!isPromise) {
+ handler.call(receiver, value, promise);
+ } else {
+ this._settlePromiseFromHandler(handler, receiver, value, promise);
+ }
+ } else if (receiver instanceof PromiseArray) {
+ if (!receiver._isResolved()) {
+ if (this._isFulfilled()) {
+ receiver._promiseFulfilled(value, promise);
+ }
+ else {
+ receiver._promiseRejected(value, promise);
+ }
+ }
+ } else if (isPromise) {
+ if (this._isFulfilled()) {
+ promise._fulfill(value);
+ } else {
+ promise._reject(value, carriedStackTrace);
+ }
+ }
+
+ if (index >= 4 && (index & 31) === 4)
+ async.invokeLater(this._setLength, this, 0);
+};
+
+Promise.prototype._clearCallbackDataAtIndex = function(index) {
+ if (index === 0) {
+ if (!this._isCarryingStackTrace()) {
+ this._fulfillmentHandler0 = undefined;
+ }
+ this._rejectionHandler0 =
+ this._progressHandler0 =
+ this._receiver0 =
+ this._promise0 = undefined;
+ } else {
+ var base = index * 5 - 5;
+ this[base + 3] =
+ this[base + 4] =
+ this[base + 0] =
+ this[base + 1] =
+ this[base + 2] = undefined;
+ }
+};
+
+Promise.prototype._isSettlePromisesQueued = function () {
+ return (this._bitField &
+ -1073741824) === -1073741824;
+};
+
+Promise.prototype._setSettlePromisesQueued = function () {
+ this._bitField = this._bitField | -1073741824;
+};
+
+Promise.prototype._unsetSettlePromisesQueued = function () {
+ this._bitField = this._bitField & (~-1073741824);
+};
+
+Promise.prototype._queueSettlePromises = function() {
+ async.settlePromises(this);
+ this._setSettlePromisesQueued();
+};
+
+Promise.prototype._fulfillUnchecked = function (value) {
+ if (value === this) {
+ var err = makeSelfResolutionError();
+ this._attachExtraTrace(err);
+ return this._rejectUnchecked(err, undefined);
+ }
+ this._setFulfilled();
+ this._settledValue = value;
+ this._cleanValues();
+
+ if (this._length() > 0) {
+ this._queueSettlePromises();
+ }
+};
+
+Promise.prototype._rejectUncheckedCheckError = function (reason) {
+ var trace = util.ensureErrorObject(reason);
+ this._rejectUnchecked(reason, trace === reason ? undefined : trace);
+};
+
+Promise.prototype._rejectUnchecked = function (reason, trace) {
+ if (reason === this) {
+ var err = makeSelfResolutionError();
+ this._attachExtraTrace(err);
+ return this._rejectUnchecked(err);
+ }
+ this._setRejected();
+ this._settledValue = reason;
+ this._cleanValues();
+
+ if (this._isFinal()) {
+ async.throwLater(function(e) {
+ if ("stack" in e) {
+ async.invokeFirst(
+ CapturedTrace.unhandledRejection, undefined, e);
+ }
+ throw e;
+ }, trace === undefined ? reason : trace);
+ return;
+ }
+
+ if (trace !== undefined && trace !== reason) {
+ this._setCarriedStackTrace(trace);
+ }
+
+ if (this._length() > 0) {
+ this._queueSettlePromises();
+ } else {
+ this._ensurePossibleRejectionHandled();
+ }
+};
+
+Promise.prototype._settlePromises = function () {
+ this._unsetSettlePromisesQueued();
+ var len = this._length();
+ for (var i = 0; i < len; i++) {
+ this._settlePromiseAt(i);
+ }
+};
+
+util.notEnumerableProp(Promise,
+ "_makeSelfResolutionError",
+ makeSelfResolutionError);
+
+require("./progress.js")(Promise, PromiseArray);
+require("./method.js")(Promise, INTERNAL, tryConvertToPromise, apiRejection);
+require("./bind.js")(Promise, INTERNAL, tryConvertToPromise);
+require("./finally.js")(Promise, NEXT_FILTER, tryConvertToPromise);
+require("./direct_resolve.js")(Promise);
+require("./synchronous_inspection.js")(Promise);
+require("./join.js")(Promise, PromiseArray, tryConvertToPromise, INTERNAL);
+Promise.Promise = Promise;
+require('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL);
+require('./cancel.js')(Promise);
+require('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext);
+require('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise);
+require('./nodeify.js')(Promise);
+require('./call_get.js')(Promise);
+require('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection);
+require('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection);
+require('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL);
+require('./settle.js')(Promise, PromiseArray);
+require('./some.js')(Promise, PromiseArray, apiRejection);
+require('./promisify.js')(Promise, INTERNAL);
+require('./any.js')(Promise);
+require('./each.js')(Promise, INTERNAL);
+require('./timers.js')(Promise, INTERNAL);
+require('./filter.js')(Promise, INTERNAL);
+
+ util.toFastProperties(Promise);
+ util.toFastProperties(Promise.prototype);
+ function fillTypes(value) {
+ var p = new Promise(INTERNAL);
+ p._fulfillmentHandler0 = value;
+ p._rejectionHandler0 = value;
+ p._progressHandler0 = value;
+ p._promise0 = value;
+ p._receiver0 = value;
+ p._settledValue = value;
+ }
+ // Complete slack tracking, opt out of field-type tracking and
+ // stabilize map
+ fillTypes({a: 1});
+ fillTypes({b: 2});
+ fillTypes({c: 3});
+ fillTypes(1);
+ fillTypes(function(){});
+ fillTypes(undefined);
+ fillTypes(false);
+ fillTypes(new Promise(INTERNAL));
+ CapturedTrace.setBounds(async.firstLineError, util.lastLineError);
+ return Promise;
+
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/promise_array.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/promise_array.js
new file mode 100644
index 0000000..b2e8f1c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/promise_array.js
@@ -0,0 +1,142 @@
+"use strict";
+module.exports = function(Promise, INTERNAL, tryConvertToPromise,
+ apiRejection) {
+var util = require("./util.js");
+var isArray = util.isArray;
+
+function toResolutionValue(val) {
+ switch(val) {
+ case -2: return [];
+ case -3: return {};
+ }
+}
+
+function PromiseArray(values) {
+ var promise = this._promise = new Promise(INTERNAL);
+ var parent;
+ if (values instanceof Promise) {
+ parent = values;
+ promise._propagateFrom(parent, 1 | 4);
+ }
+ this._values = values;
+ this._length = 0;
+ this._totalResolved = 0;
+ this._init(undefined, -2);
+}
+PromiseArray.prototype.length = function () {
+ return this._length;
+};
+
+PromiseArray.prototype.promise = function () {
+ return this._promise;
+};
+
+PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) {
+ var values = tryConvertToPromise(this._values, this._promise);
+ if (values instanceof Promise) {
+ values = values._target();
+ this._values = values;
+ if (values._isFulfilled()) {
+ values = values._value();
+ if (!isArray(values)) {
+ var err = new Promise.TypeError("expecting an array, a promise or a thenable\u000a\u000a See http://goo.gl/s8MMhc\u000a");
+ this.__hardReject__(err);
+ return;
+ }
+ } else if (values._isPending()) {
+ values._then(
+ init,
+ this._reject,
+ undefined,
+ this,
+ resolveValueIfEmpty
+ );
+ return;
+ } else {
+ this._reject(values._reason());
+ return;
+ }
+ } else if (!isArray(values)) {
+ this._promise._reject(apiRejection("expecting an array, a promise or a thenable\u000a\u000a See http://goo.gl/s8MMhc\u000a")._reason());
+ return;
+ }
+
+ if (values.length === 0) {
+ if (resolveValueIfEmpty === -5) {
+ this._resolveEmptyArray();
+ }
+ else {
+ this._resolve(toResolutionValue(resolveValueIfEmpty));
+ }
+ return;
+ }
+ var len = this.getActualLength(values.length);
+ this._length = len;
+ this._values = this.shouldCopyValues() ? new Array(len) : this._values;
+ var promise = this._promise;
+ for (var i = 0; i < len; ++i) {
+ var isResolved = this._isResolved();
+ var maybePromise = tryConvertToPromise(values[i], promise);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ if (isResolved) {
+ maybePromise._ignoreRejections();
+ } else if (maybePromise._isPending()) {
+ maybePromise._proxyPromiseArray(this, i);
+ } else if (maybePromise._isFulfilled()) {
+ this._promiseFulfilled(maybePromise._value(), i);
+ } else {
+ this._promiseRejected(maybePromise._reason(), i);
+ }
+ } else if (!isResolved) {
+ this._promiseFulfilled(maybePromise, i);
+ }
+ }
+};
+
+PromiseArray.prototype._isResolved = function () {
+ return this._values === null;
+};
+
+PromiseArray.prototype._resolve = function (value) {
+ this._values = null;
+ this._promise._fulfill(value);
+};
+
+PromiseArray.prototype.__hardReject__ =
+PromiseArray.prototype._reject = function (reason) {
+ this._values = null;
+ this._promise._rejectCallback(reason, false, true);
+};
+
+PromiseArray.prototype._promiseProgressed = function (progressValue, index) {
+ this._promise._progress({
+ index: index,
+ value: progressValue
+ });
+};
+
+
+PromiseArray.prototype._promiseFulfilled = function (value, index) {
+ this._values[index] = value;
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= this._length) {
+ this._resolve(this._values);
+ }
+};
+
+PromiseArray.prototype._promiseRejected = function (reason, index) {
+ this._totalResolved++;
+ this._reject(reason);
+};
+
+PromiseArray.prototype.shouldCopyValues = function () {
+ return true;
+};
+
+PromiseArray.prototype.getActualLength = function (len) {
+ return len;
+};
+
+return PromiseArray;
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/promise_resolver.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/promise_resolver.js
new file mode 100644
index 0000000..b180a32
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/promise_resolver.js
@@ -0,0 +1,123 @@
+"use strict";
+var util = require("./util.js");
+var maybeWrapAsError = util.maybeWrapAsError;
+var errors = require("./errors.js");
+var TimeoutError = errors.TimeoutError;
+var OperationalError = errors.OperationalError;
+var haveGetters = util.haveGetters;
+var es5 = require("./es5.js");
+
+function isUntypedError(obj) {
+ return obj instanceof Error &&
+ es5.getPrototypeOf(obj) === Error.prototype;
+}
+
+var rErrorKey = /^(?:name|message|stack|cause)$/;
+function wrapAsOperationalError(obj) {
+ var ret;
+ if (isUntypedError(obj)) {
+ ret = new OperationalError(obj);
+ ret.name = obj.name;
+ ret.message = obj.message;
+ ret.stack = obj.stack;
+ var keys = es5.keys(obj);
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (!rErrorKey.test(key)) {
+ ret[key] = obj[key];
+ }
+ }
+ return ret;
+ }
+ util.markAsOriginatingFromRejection(obj);
+ return obj;
+}
+
+function nodebackForPromise(promise) {
+ return function(err, value) {
+ if (promise === null) return;
+
+ if (err) {
+ var wrapped = wrapAsOperationalError(maybeWrapAsError(err));
+ promise._attachExtraTrace(wrapped);
+ promise._reject(wrapped);
+ } else if (arguments.length > 2) {
+ var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}
+ promise._fulfill(args);
+ } else {
+ promise._fulfill(value);
+ }
+
+ promise = null;
+ };
+}
+
+
+var PromiseResolver;
+if (!haveGetters) {
+ PromiseResolver = function (promise) {
+ this.promise = promise;
+ this.asCallback = nodebackForPromise(promise);
+ this.callback = this.asCallback;
+ };
+}
+else {
+ PromiseResolver = function (promise) {
+ this.promise = promise;
+ };
+}
+if (haveGetters) {
+ var prop = {
+ get: function() {
+ return nodebackForPromise(this.promise);
+ }
+ };
+ es5.defineProperty(PromiseResolver.prototype, "asCallback", prop);
+ es5.defineProperty(PromiseResolver.prototype, "callback", prop);
+}
+
+PromiseResolver._nodebackForPromise = nodebackForPromise;
+
+PromiseResolver.prototype.toString = function () {
+ return "[object PromiseResolver]";
+};
+
+PromiseResolver.prototype.resolve =
+PromiseResolver.prototype.fulfill = function (value) {
+ if (!(this instanceof PromiseResolver)) {
+ throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\u000a\u000a See http://goo.gl/sdkXL9\u000a");
+ }
+ this.promise._resolveCallback(value);
+};
+
+PromiseResolver.prototype.reject = function (reason) {
+ if (!(this instanceof PromiseResolver)) {
+ throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\u000a\u000a See http://goo.gl/sdkXL9\u000a");
+ }
+ this.promise._rejectCallback(reason);
+};
+
+PromiseResolver.prototype.progress = function (value) {
+ if (!(this instanceof PromiseResolver)) {
+ throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\u000a\u000a See http://goo.gl/sdkXL9\u000a");
+ }
+ this.promise._progress(value);
+};
+
+PromiseResolver.prototype.cancel = function (err) {
+ this.promise.cancel(err);
+};
+
+PromiseResolver.prototype.timeout = function () {
+ this.reject(new TimeoutError("timeout"));
+};
+
+PromiseResolver.prototype.isResolved = function () {
+ return this.promise.isResolved();
+};
+
+PromiseResolver.prototype.toJSON = function () {
+ return this.promise.toJSON();
+};
+
+module.exports = PromiseResolver;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/promisify.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/promisify.js
new file mode 100644
index 0000000..86763d6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/promisify.js
@@ -0,0 +1,307 @@
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var THIS = {};
+var util = require("./util.js");
+var nodebackForPromise = require("./promise_resolver.js")
+ ._nodebackForPromise;
+var withAppended = util.withAppended;
+var maybeWrapAsError = util.maybeWrapAsError;
+var canEvaluate = util.canEvaluate;
+var TypeError = require("./errors").TypeError;
+var defaultSuffix = "Async";
+var defaultPromisified = {__isPromisified__: true};
+var noCopyProps = [
+ "arity", "length",
+ "name",
+ "arguments",
+ "caller",
+ "callee",
+ "prototype",
+ "__isPromisified__"
+];
+var noCopyPropsPattern = new RegExp("^(?:" + noCopyProps.join("|") + ")$");
+
+var defaultFilter = function(name) {
+ return util.isIdentifier(name) &&
+ name.charAt(0) !== "_" &&
+ name !== "constructor";
+};
+
+function propsFilter(key) {
+ return !noCopyPropsPattern.test(key);
+}
+
+function isPromisified(fn) {
+ try {
+ return fn.__isPromisified__ === true;
+ }
+ catch (e) {
+ return false;
+ }
+}
+
+function hasPromisified(obj, key, suffix) {
+ var val = util.getDataPropertyOrDefault(obj, key + suffix,
+ defaultPromisified);
+ return val ? isPromisified(val) : false;
+}
+function checkValid(ret, suffix, suffixRegexp) {
+ for (var i = 0; i < ret.length; i += 2) {
+ var key = ret[i];
+ if (suffixRegexp.test(key)) {
+ var keyWithoutAsyncSuffix = key.replace(suffixRegexp, "");
+ for (var j = 0; j < ret.length; j += 2) {
+ if (ret[j] === keyWithoutAsyncSuffix) {
+ throw new TypeError("Cannot promisify an API that has normal methods with '%s'-suffix\u000a\u000a See http://goo.gl/iWrZbw\u000a"
+ .replace("%s", suffix));
+ }
+ }
+ }
+ }
+}
+
+function promisifiableMethods(obj, suffix, suffixRegexp, filter) {
+ var keys = util.inheritedDataKeys(obj);
+ var ret = [];
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ var value = obj[key];
+ var passesDefaultFilter = filter === defaultFilter
+ ? true : defaultFilter(key, value, obj);
+ if (typeof value === "function" &&
+ !isPromisified(value) &&
+ !hasPromisified(obj, key, suffix) &&
+ filter(key, value, obj, passesDefaultFilter)) {
+ ret.push(key, value);
+ }
+ }
+ checkValid(ret, suffix, suffixRegexp);
+ return ret;
+}
+
+var escapeIdentRegex = function(str) {
+ return str.replace(/([$])/, "\\$");
+};
+
+var makeNodePromisifiedEval;
+if (!false) {
+var switchCaseArgumentOrder = function(likelyArgumentCount) {
+ var ret = [likelyArgumentCount];
+ var min = Math.max(0, likelyArgumentCount - 1 - 3);
+ for(var i = likelyArgumentCount - 1; i >= min; --i) {
+ ret.push(i);
+ }
+ for(var i = likelyArgumentCount + 1; i <= 3; ++i) {
+ ret.push(i);
+ }
+ return ret;
+};
+
+var argumentSequence = function(argumentCount) {
+ return util.filledRange(argumentCount, "_arg", "");
+};
+
+var parameterDeclaration = function(parameterCount) {
+ return util.filledRange(
+ Math.max(parameterCount, 3), "_arg", "");
+};
+
+var parameterCount = function(fn) {
+ if (typeof fn.length === "number") {
+ return Math.max(Math.min(fn.length, 1023 + 1), 0);
+ }
+ return 0;
+};
+
+makeNodePromisifiedEval =
+function(callback, receiver, originalName, fn) {
+ var newParameterCount = Math.max(0, parameterCount(fn) - 1);
+ var argumentOrder = switchCaseArgumentOrder(newParameterCount);
+ var shouldProxyThis = typeof callback === "string" || receiver === THIS;
+
+ function generateCallForArgumentCount(count) {
+ var args = argumentSequence(count).join(", ");
+ var comma = count > 0 ? ", " : "";
+ var ret;
+ if (shouldProxyThis) {
+ ret = "ret = callback.call(this, {{args}}, nodeback); break;\n";
+ } else {
+ ret = receiver === undefined
+ ? "ret = callback({{args}}, nodeback); break;\n"
+ : "ret = callback.call(receiver, {{args}}, nodeback); break;\n";
+ }
+ return ret.replace("{{args}}", args).replace(", ", comma);
+ }
+
+ function generateArgumentSwitchCase() {
+ var ret = "";
+ for (var i = 0; i < argumentOrder.length; ++i) {
+ ret += "case " + argumentOrder[i] +":" +
+ generateCallForArgumentCount(argumentOrder[i]);
+ }
+
+ ret += " \n\
+ default: \n\
+ var args = new Array(len + 1); \n\
+ var i = 0; \n\
+ for (var i = 0; i < len; ++i) { \n\
+ args[i] = arguments[i]; \n\
+ } \n\
+ args[i] = nodeback; \n\
+ [CodeForCall] \n\
+ break; \n\
+ ".replace("[CodeForCall]", (shouldProxyThis
+ ? "ret = callback.apply(this, args);\n"
+ : "ret = callback.apply(receiver, args);\n"));
+ return ret;
+ }
+
+ var getFunctionCode = typeof callback === "string"
+ ? ("this != null ? this['"+callback+"'] : fn")
+ : "fn";
+
+ return new Function("Promise",
+ "fn",
+ "receiver",
+ "withAppended",
+ "maybeWrapAsError",
+ "nodebackForPromise",
+ "tryCatch",
+ "errorObj",
+ "notEnumerableProp",
+ "INTERNAL","'use strict'; \n\
+ var ret = function (Parameters) { \n\
+ 'use strict'; \n\
+ var len = arguments.length; \n\
+ var promise = new Promise(INTERNAL); \n\
+ promise._captureStackTrace(); \n\
+ var nodeback = nodebackForPromise(promise); \n\
+ var ret; \n\
+ var callback = tryCatch([GetFunctionCode]); \n\
+ switch(len) { \n\
+ [CodeForSwitchCase] \n\
+ } \n\
+ if (ret === errorObj) { \n\
+ promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n\
+ } \n\
+ return promise; \n\
+ }; \n\
+ notEnumerableProp(ret, '__isPromisified__', true); \n\
+ return ret; \n\
+ "
+ .replace("Parameters", parameterDeclaration(newParameterCount))
+ .replace("[CodeForSwitchCase]", generateArgumentSwitchCase())
+ .replace("[GetFunctionCode]", getFunctionCode))(
+ Promise,
+ fn,
+ receiver,
+ withAppended,
+ maybeWrapAsError,
+ nodebackForPromise,
+ util.tryCatch,
+ util.errorObj,
+ util.notEnumerableProp,
+ INTERNAL
+ );
+};
+}
+
+function makeNodePromisifiedClosure(callback, receiver, _, fn) {
+ var defaultThis = (function() {return this;})();
+ var method = callback;
+ if (typeof method === "string") {
+ callback = fn;
+ }
+ function promisified() {
+ var _receiver = receiver;
+ if (receiver === THIS) _receiver = this;
+ var promise = new Promise(INTERNAL);
+ promise._captureStackTrace();
+ var cb = typeof method === "string" && this !== defaultThis
+ ? this[method] : callback;
+ var fn = nodebackForPromise(promise);
+ try {
+ cb.apply(_receiver, withAppended(arguments, fn));
+ } catch(e) {
+ promise._rejectCallback(maybeWrapAsError(e), true, true);
+ }
+ return promise;
+ }
+ util.notEnumerableProp(promisified, "__isPromisified__", true);
+ return promisified;
+}
+
+var makeNodePromisified = canEvaluate
+ ? makeNodePromisifiedEval
+ : makeNodePromisifiedClosure;
+
+function promisifyAll(obj, suffix, filter, promisifier) {
+ var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$");
+ var methods =
+ promisifiableMethods(obj, suffix, suffixRegexp, filter);
+
+ for (var i = 0, len = methods.length; i < len; i+= 2) {
+ var key = methods[i];
+ var fn = methods[i+1];
+ var promisifiedKey = key + suffix;
+ if (promisifier === makeNodePromisified) {
+ obj[promisifiedKey] =
+ makeNodePromisified(key, THIS, key, fn, suffix);
+ } else {
+ var promisified = promisifier(fn, function() {
+ return makeNodePromisified(key, THIS, key, fn, suffix);
+ });
+ util.notEnumerableProp(promisified, "__isPromisified__", true);
+ obj[promisifiedKey] = promisified;
+ }
+ }
+ util.toFastProperties(obj);
+ return obj;
+}
+
+function promisify(callback, receiver) {
+ return makeNodePromisified(callback, receiver, undefined, callback);
+}
+
+Promise.promisify = function (fn, receiver) {
+ if (typeof fn !== "function") {
+ throw new TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ }
+ if (isPromisified(fn)) {
+ return fn;
+ }
+ var ret = promisify(fn, arguments.length < 2 ? THIS : receiver);
+ util.copyDescriptors(fn, ret, propsFilter);
+ return ret;
+};
+
+Promise.promisifyAll = function (target, options) {
+ if (typeof target !== "function" && typeof target !== "object") {
+ throw new TypeError("the target of promisifyAll must be an object or a function\u000a\u000a See http://goo.gl/9ITlV0\u000a");
+ }
+ options = Object(options);
+ var suffix = options.suffix;
+ if (typeof suffix !== "string") suffix = defaultSuffix;
+ var filter = options.filter;
+ if (typeof filter !== "function") filter = defaultFilter;
+ var promisifier = options.promisifier;
+ if (typeof promisifier !== "function") promisifier = makeNodePromisified;
+
+ if (!util.isIdentifier(suffix)) {
+ throw new RangeError("suffix must be a valid identifier\u000a\u000a See http://goo.gl/8FZo5V\u000a");
+ }
+
+ var keys = util.inheritedDataKeys(target);
+ for (var i = 0; i < keys.length; ++i) {
+ var value = target[keys[i]];
+ if (keys[i] !== "constructor" &&
+ util.isClass(value)) {
+ promisifyAll(value.prototype, suffix, filter, promisifier);
+ promisifyAll(value, suffix, filter, promisifier);
+ }
+ }
+
+ return promisifyAll(target, suffix, filter, promisifier);
+};
+};
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/props.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/props.js
new file mode 100644
index 0000000..d6f9e64
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/props.js
@@ -0,0 +1,79 @@
+"use strict";
+module.exports = function(
+ Promise, PromiseArray, tryConvertToPromise, apiRejection) {
+var util = require("./util.js");
+var isObject = util.isObject;
+var es5 = require("./es5.js");
+
+function PropertiesPromiseArray(obj) {
+ var keys = es5.keys(obj);
+ var len = keys.length;
+ var values = new Array(len * 2);
+ for (var i = 0; i < len; ++i) {
+ var key = keys[i];
+ values[i] = obj[key];
+ values[i + len] = key;
+ }
+ this.constructor$(values);
+}
+util.inherits(PropertiesPromiseArray, PromiseArray);
+
+PropertiesPromiseArray.prototype._init = function () {
+ this._init$(undefined, -3) ;
+};
+
+PropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) {
+ this._values[index] = value;
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= this._length) {
+ var val = {};
+ var keyOffset = this.length();
+ for (var i = 0, len = this.length(); i < len; ++i) {
+ val[this._values[i + keyOffset]] = this._values[i];
+ }
+ this._resolve(val);
+ }
+};
+
+PropertiesPromiseArray.prototype._promiseProgressed = function (value, index) {
+ this._promise._progress({
+ key: this._values[index + this.length()],
+ value: value
+ });
+};
+
+PropertiesPromiseArray.prototype.shouldCopyValues = function () {
+ return false;
+};
+
+PropertiesPromiseArray.prototype.getActualLength = function (len) {
+ return len >> 1;
+};
+
+function props(promises) {
+ var ret;
+ var castValue = tryConvertToPromise(promises);
+
+ if (!isObject(castValue)) {
+ return apiRejection("cannot await properties of a non-object\u000a\u000a See http://goo.gl/OsFKC8\u000a");
+ } else if (castValue instanceof Promise) {
+ ret = castValue._then(
+ Promise.props, undefined, undefined, undefined, undefined);
+ } else {
+ ret = new PropertiesPromiseArray(castValue).promise();
+ }
+
+ if (castValue instanceof Promise) {
+ ret._propagateFrom(castValue, 4);
+ }
+ return ret;
+}
+
+Promise.prototype.props = function () {
+ return props(this);
+};
+
+Promise.props = function (promises) {
+ return props(promises);
+};
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/queue.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/queue.js
new file mode 100644
index 0000000..84d57d5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/queue.js
@@ -0,0 +1,90 @@
+"use strict";
+function arrayMove(src, srcIndex, dst, dstIndex, len) {
+ for (var j = 0; j < len; ++j) {
+ dst[j + dstIndex] = src[j + srcIndex];
+ src[j + srcIndex] = void 0;
+ }
+}
+
+function Queue(capacity) {
+ this._capacity = capacity;
+ this._length = 0;
+ this._front = 0;
+}
+
+Queue.prototype._willBeOverCapacity = function (size) {
+ return this._capacity < size;
+};
+
+Queue.prototype._pushOne = function (arg) {
+ var length = this.length();
+ this._checkCapacity(length + 1);
+ var i = (this._front + length) & (this._capacity - 1);
+ this[i] = arg;
+ this._length = length + 1;
+};
+
+Queue.prototype._unshiftOne = function(value) {
+ var capacity = this._capacity;
+ this._checkCapacity(this.length() + 1);
+ var front = this._front;
+ var i = (((( front - 1 ) &
+ ( capacity - 1) ) ^ capacity ) - capacity );
+ this[i] = value;
+ this._front = i;
+ this._length = this.length() + 1;
+};
+
+Queue.prototype.unshift = function(fn, receiver, arg) {
+ this._unshiftOne(arg);
+ this._unshiftOne(receiver);
+ this._unshiftOne(fn);
+};
+
+Queue.prototype.push = function (fn, receiver, arg) {
+ var length = this.length() + 3;
+ if (this._willBeOverCapacity(length)) {
+ this._pushOne(fn);
+ this._pushOne(receiver);
+ this._pushOne(arg);
+ return;
+ }
+ var j = this._front + length - 3;
+ this._checkCapacity(length);
+ var wrapMask = this._capacity - 1;
+ this[(j + 0) & wrapMask] = fn;
+ this[(j + 1) & wrapMask] = receiver;
+ this[(j + 2) & wrapMask] = arg;
+ this._length = length;
+};
+
+Queue.prototype.shift = function () {
+ var front = this._front,
+ ret = this[front];
+
+ this[front] = undefined;
+ this._front = (front + 1) & (this._capacity - 1);
+ this._length--;
+ return ret;
+};
+
+Queue.prototype.length = function () {
+ return this._length;
+};
+
+Queue.prototype._checkCapacity = function (size) {
+ if (this._capacity < size) {
+ this._resizeTo(this._capacity << 1);
+ }
+};
+
+Queue.prototype._resizeTo = function (capacity) {
+ var oldCapacity = this._capacity;
+ this._capacity = capacity;
+ var front = this._front;
+ var length = this._length;
+ var moveItemsCount = (front + length) & (oldCapacity - 1);
+ arrayMove(this, 0, this, oldCapacity, moveItemsCount);
+};
+
+module.exports = Queue;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/race.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/race.js
new file mode 100644
index 0000000..30e7bb0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/race.js
@@ -0,0 +1,47 @@
+"use strict";
+module.exports = function(
+ Promise, INTERNAL, tryConvertToPromise, apiRejection) {
+var isArray = require("./util.js").isArray;
+
+var raceLater = function (promise) {
+ return promise.then(function(array) {
+ return race(array, promise);
+ });
+};
+
+function race(promises, parent) {
+ var maybePromise = tryConvertToPromise(promises);
+
+ if (maybePromise instanceof Promise) {
+ return raceLater(maybePromise);
+ } else if (!isArray(promises)) {
+ return apiRejection("expecting an array, a promise or a thenable\u000a\u000a See http://goo.gl/s8MMhc\u000a");
+ }
+
+ var ret = new Promise(INTERNAL);
+ if (parent !== undefined) {
+ ret._propagateFrom(parent, 4 | 1);
+ }
+ var fulfill = ret._fulfill;
+ var reject = ret._reject;
+ for (var i = 0, len = promises.length; i < len; ++i) {
+ var val = promises[i];
+
+ if (val === undefined && !(i in promises)) {
+ continue;
+ }
+
+ Promise.cast(val)._then(fulfill, reject, undefined, ret, null);
+ }
+ return ret;
+}
+
+Promise.race = function (promises) {
+ return race(promises, undefined);
+};
+
+Promise.prototype.race = function () {
+ return race(this, undefined);
+};
+
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/reduce.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/reduce.js
new file mode 100644
index 0000000..1f92daf
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/reduce.js
@@ -0,0 +1,148 @@
+"use strict";
+module.exports = function(Promise,
+ PromiseArray,
+ apiRejection,
+ tryConvertToPromise,
+ INTERNAL) {
+var getDomain = Promise._getDomain;
+var async = require("./async.js");
+var util = require("./util.js");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+function ReductionPromiseArray(promises, fn, accum, _each) {
+ this.constructor$(promises);
+ this._promise._captureStackTrace();
+ this._preservedValues = _each === INTERNAL ? [] : null;
+ this._zerothIsAccum = (accum === undefined);
+ this._gotAccum = false;
+ this._reducingIndex = (this._zerothIsAccum ? 1 : 0);
+ this._valuesPhase = undefined;
+ var maybePromise = tryConvertToPromise(accum, this._promise);
+ var rejected = false;
+ var isPromise = maybePromise instanceof Promise;
+ if (isPromise) {
+ maybePromise = maybePromise._target();
+ if (maybePromise._isPending()) {
+ maybePromise._proxyPromiseArray(this, -1);
+ } else if (maybePromise._isFulfilled()) {
+ accum = maybePromise._value();
+ this._gotAccum = true;
+ } else {
+ this._reject(maybePromise._reason());
+ rejected = true;
+ }
+ }
+ if (!(isPromise || this._zerothIsAccum)) this._gotAccum = true;
+ var domain = getDomain();
+ this._callback = domain === null ? fn : domain.bind(fn);
+ this._accum = accum;
+ if (!rejected) async.invoke(init, this, undefined);
+}
+function init() {
+ this._init$(undefined, -5);
+}
+util.inherits(ReductionPromiseArray, PromiseArray);
+
+ReductionPromiseArray.prototype._init = function () {};
+
+ReductionPromiseArray.prototype._resolveEmptyArray = function () {
+ if (this._gotAccum || this._zerothIsAccum) {
+ this._resolve(this._preservedValues !== null
+ ? [] : this._accum);
+ }
+};
+
+ReductionPromiseArray.prototype._promiseFulfilled = function (value, index) {
+ var values = this._values;
+ values[index] = value;
+ var length = this.length();
+ var preservedValues = this._preservedValues;
+ var isEach = preservedValues !== null;
+ var gotAccum = this._gotAccum;
+ var valuesPhase = this._valuesPhase;
+ var valuesPhaseIndex;
+ if (!valuesPhase) {
+ valuesPhase = this._valuesPhase = new Array(length);
+ for (valuesPhaseIndex=0; valuesPhaseIndex<length; ++valuesPhaseIndex) {
+ valuesPhase[valuesPhaseIndex] = 0;
+ }
+ }
+ valuesPhaseIndex = valuesPhase[index];
+
+ if (index === 0 && this._zerothIsAccum) {
+ this._accum = value;
+ this._gotAccum = gotAccum = true;
+ valuesPhase[index] = ((valuesPhaseIndex === 0)
+ ? 1 : 2);
+ } else if (index === -1) {
+ this._accum = value;
+ this._gotAccum = gotAccum = true;
+ } else {
+ if (valuesPhaseIndex === 0) {
+ valuesPhase[index] = 1;
+ } else {
+ valuesPhase[index] = 2;
+ this._accum = value;
+ }
+ }
+ if (!gotAccum) return;
+
+ var callback = this._callback;
+ var receiver = this._promise._boundValue();
+ var ret;
+
+ for (var i = this._reducingIndex; i < length; ++i) {
+ valuesPhaseIndex = valuesPhase[i];
+ if (valuesPhaseIndex === 2) {
+ this._reducingIndex = i + 1;
+ continue;
+ }
+ if (valuesPhaseIndex !== 1) return;
+ value = values[i];
+ this._promise._pushContext();
+ if (isEach) {
+ preservedValues.push(value);
+ ret = tryCatch(callback).call(receiver, value, i, length);
+ }
+ else {
+ ret = tryCatch(callback)
+ .call(receiver, this._accum, value, i, length);
+ }
+ this._promise._popContext();
+
+ if (ret === errorObj) return this._reject(ret.e);
+
+ var maybePromise = tryConvertToPromise(ret, this._promise);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ if (maybePromise._isPending()) {
+ valuesPhase[i] = 4;
+ return maybePromise._proxyPromiseArray(this, i);
+ } else if (maybePromise._isFulfilled()) {
+ ret = maybePromise._value();
+ } else {
+ return this._reject(maybePromise._reason());
+ }
+ }
+
+ this._reducingIndex = i + 1;
+ this._accum = ret;
+ }
+
+ this._resolve(isEach ? preservedValues : this._accum);
+};
+
+function reduce(promises, fn, initialValue, _each) {
+ if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+ var array = new ReductionPromiseArray(promises, fn, initialValue, _each);
+ return array.promise();
+}
+
+Promise.prototype.reduce = function (fn, initialValue) {
+ return reduce(this, fn, initialValue, null);
+};
+
+Promise.reduce = function (promises, fn, initialValue, _each) {
+ return reduce(promises, fn, initialValue, _each);
+};
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/schedule.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/schedule.js
new file mode 100644
index 0000000..bb04a8a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/schedule.js
@@ -0,0 +1,35 @@
+"use strict";
+var schedule;
+var util = require("./util");
+var noAsyncScheduler = function() {
+ throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/m3OTXk\u000a");
+};
+if (util.isNode && typeof MutationObserver === "undefined") {
+ var GlobalSetImmediate = global.setImmediate;
+ var ProcessNextTick = process.nextTick;
+ schedule = util.isRecentNode
+ ? function(fn) { GlobalSetImmediate.call(global, fn); }
+ : function(fn) { ProcessNextTick.call(process, fn); };
+} else if ((typeof MutationObserver !== "undefined") &&
+ !(typeof window !== "undefined" &&
+ window.navigator &&
+ window.navigator.standalone)) {
+ schedule = function(fn) {
+ var div = document.createElement("div");
+ var observer = new MutationObserver(fn);
+ observer.observe(div, {attributes: true});
+ return function() { div.classList.toggle("foo"); };
+ };
+ schedule.isStatic = true;
+} else if (typeof setImmediate !== "undefined") {
+ schedule = function (fn) {
+ setImmediate(fn);
+ };
+} else if (typeof setTimeout !== "undefined") {
+ schedule = function (fn) {
+ setTimeout(fn, 0);
+ };
+} else {
+ schedule = noAsyncScheduler;
+}
+module.exports = schedule;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/settle.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/settle.js
new file mode 100644
index 0000000..f9299c2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/settle.js
@@ -0,0 +1,40 @@
+"use strict";
+module.exports =
+ function(Promise, PromiseArray) {
+var PromiseInspection = Promise.PromiseInspection;
+var util = require("./util.js");
+
+function SettledPromiseArray(values) {
+ this.constructor$(values);
+}
+util.inherits(SettledPromiseArray, PromiseArray);
+
+SettledPromiseArray.prototype._promiseResolved = function (index, inspection) {
+ this._values[index] = inspection;
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= this._length) {
+ this._resolve(this._values);
+ }
+};
+
+SettledPromiseArray.prototype._promiseFulfilled = function (value, index) {
+ var ret = new PromiseInspection();
+ ret._bitField = 268435456;
+ ret._settledValue = value;
+ this._promiseResolved(index, ret);
+};
+SettledPromiseArray.prototype._promiseRejected = function (reason, index) {
+ var ret = new PromiseInspection();
+ ret._bitField = 134217728;
+ ret._settledValue = reason;
+ this._promiseResolved(index, ret);
+};
+
+Promise.settle = function (promises) {
+ return new SettledPromiseArray(promises).promise();
+};
+
+Promise.prototype.settle = function () {
+ return new SettledPromiseArray(this).promise();
+};
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/some.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/some.js
new file mode 100644
index 0000000..f3968cf
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/some.js
@@ -0,0 +1,125 @@
+"use strict";
+module.exports =
+function(Promise, PromiseArray, apiRejection) {
+var util = require("./util.js");
+var RangeError = require("./errors.js").RangeError;
+var AggregateError = require("./errors.js").AggregateError;
+var isArray = util.isArray;
+
+
+function SomePromiseArray(values) {
+ this.constructor$(values);
+ this._howMany = 0;
+ this._unwrap = false;
+ this._initialized = false;
+}
+util.inherits(SomePromiseArray, PromiseArray);
+
+SomePromiseArray.prototype._init = function () {
+ if (!this._initialized) {
+ return;
+ }
+ if (this._howMany === 0) {
+ this._resolve([]);
+ return;
+ }
+ this._init$(undefined, -5);
+ var isArrayResolved = isArray(this._values);
+ if (!this._isResolved() &&
+ isArrayResolved &&
+ this._howMany > this._canPossiblyFulfill()) {
+ this._reject(this._getRangeError(this.length()));
+ }
+};
+
+SomePromiseArray.prototype.init = function () {
+ this._initialized = true;
+ this._init();
+};
+
+SomePromiseArray.prototype.setUnwrap = function () {
+ this._unwrap = true;
+};
+
+SomePromiseArray.prototype.howMany = function () {
+ return this._howMany;
+};
+
+SomePromiseArray.prototype.setHowMany = function (count) {
+ this._howMany = count;
+};
+
+SomePromiseArray.prototype._promiseFulfilled = function (value) {
+ this._addFulfilled(value);
+ if (this._fulfilled() === this.howMany()) {
+ this._values.length = this.howMany();
+ if (this.howMany() === 1 && this._unwrap) {
+ this._resolve(this._values[0]);
+ } else {
+ this._resolve(this._values);
+ }
+ }
+
+};
+SomePromiseArray.prototype._promiseRejected = function (reason) {
+ this._addRejected(reason);
+ if (this.howMany() > this._canPossiblyFulfill()) {
+ var e = new AggregateError();
+ for (var i = this.length(); i < this._values.length; ++i) {
+ e.push(this._values[i]);
+ }
+ this._reject(e);
+ }
+};
+
+SomePromiseArray.prototype._fulfilled = function () {
+ return this._totalResolved;
+};
+
+SomePromiseArray.prototype._rejected = function () {
+ return this._values.length - this.length();
+};
+
+SomePromiseArray.prototype._addRejected = function (reason) {
+ this._values.push(reason);
+};
+
+SomePromiseArray.prototype._addFulfilled = function (value) {
+ this._values[this._totalResolved++] = value;
+};
+
+SomePromiseArray.prototype._canPossiblyFulfill = function () {
+ return this.length() - this._rejected();
+};
+
+SomePromiseArray.prototype._getRangeError = function (count) {
+ var message = "Input array must contain at least " +
+ this._howMany + " items but contains only " + count + " items";
+ return new RangeError(message);
+};
+
+SomePromiseArray.prototype._resolveEmptyArray = function () {
+ this._reject(this._getRangeError(0));
+};
+
+function some(promises, howMany) {
+ if ((howMany | 0) !== howMany || howMany < 0) {
+ return apiRejection("expecting a positive integer\u000a\u000a See http://goo.gl/1wAmHx\u000a");
+ }
+ var ret = new SomePromiseArray(promises);
+ var promise = ret.promise();
+ ret.setHowMany(howMany);
+ ret.init();
+ return promise;
+}
+
+Promise.some = function (promises, howMany) {
+ return some(promises, howMany);
+};
+
+Promise.prototype.some = function (howMany) {
+ return some(this, howMany);
+};
+
+Promise._SomePromiseArray = SomePromiseArray;
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/synchronous_inspection.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/synchronous_inspection.js
new file mode 100644
index 0000000..7aac149
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/synchronous_inspection.js
@@ -0,0 +1,94 @@
+"use strict";
+module.exports = function(Promise) {
+function PromiseInspection(promise) {
+ if (promise !== undefined) {
+ promise = promise._target();
+ this._bitField = promise._bitField;
+ this._settledValue = promise._settledValue;
+ }
+ else {
+ this._bitField = 0;
+ this._settledValue = undefined;
+ }
+}
+
+PromiseInspection.prototype.value = function () {
+ if (!this.isFulfilled()) {
+ throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/hc1DLj\u000a");
+ }
+ return this._settledValue;
+};
+
+PromiseInspection.prototype.error =
+PromiseInspection.prototype.reason = function () {
+ if (!this.isRejected()) {
+ throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/hPuiwB\u000a");
+ }
+ return this._settledValue;
+};
+
+PromiseInspection.prototype.isFulfilled =
+Promise.prototype._isFulfilled = function () {
+ return (this._bitField & 268435456) > 0;
+};
+
+PromiseInspection.prototype.isRejected =
+Promise.prototype._isRejected = function () {
+ return (this._bitField & 134217728) > 0;
+};
+
+PromiseInspection.prototype.isPending =
+Promise.prototype._isPending = function () {
+ return (this._bitField & 402653184) === 0;
+};
+
+PromiseInspection.prototype.isResolved =
+Promise.prototype._isResolved = function () {
+ return (this._bitField & 402653184) > 0;
+};
+
+Promise.prototype.isPending = function() {
+ return this._target()._isPending();
+};
+
+Promise.prototype.isRejected = function() {
+ return this._target()._isRejected();
+};
+
+Promise.prototype.isFulfilled = function() {
+ return this._target()._isFulfilled();
+};
+
+Promise.prototype.isResolved = function() {
+ return this._target()._isResolved();
+};
+
+Promise.prototype._value = function() {
+ return this._settledValue;
+};
+
+Promise.prototype._reason = function() {
+ this._unsetRejectionIsUnhandled();
+ return this._settledValue;
+};
+
+Promise.prototype.value = function() {
+ var target = this._target();
+ if (!target.isFulfilled()) {
+ throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/hc1DLj\u000a");
+ }
+ return target._settledValue;
+};
+
+Promise.prototype.reason = function() {
+ var target = this._target();
+ if (!target.isRejected()) {
+ throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/hPuiwB\u000a");
+ }
+ target._unsetRejectionIsUnhandled();
+ return target._settledValue;
+};
+
+
+Promise.PromiseInspection = PromiseInspection;
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/thenables.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/thenables.js
new file mode 100644
index 0000000..eadfffb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/thenables.js
@@ -0,0 +1,84 @@
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var util = require("./util.js");
+var errorObj = util.errorObj;
+var isObject = util.isObject;
+
+function tryConvertToPromise(obj, context) {
+ if (isObject(obj)) {
+ if (obj instanceof Promise) {
+ return obj;
+ }
+ else if (isAnyBluebirdPromise(obj)) {
+ var ret = new Promise(INTERNAL);
+ obj._then(
+ ret._fulfillUnchecked,
+ ret._rejectUncheckedCheckError,
+ ret._progressUnchecked,
+ ret,
+ null
+ );
+ return ret;
+ }
+ var then = util.tryCatch(getThen)(obj);
+ if (then === errorObj) {
+ if (context) context._pushContext();
+ var ret = Promise.reject(then.e);
+ if (context) context._popContext();
+ return ret;
+ } else if (typeof then === "function") {
+ return doThenable(obj, then, context);
+ }
+ }
+ return obj;
+}
+
+function getThen(obj) {
+ return obj.then;
+}
+
+var hasProp = {}.hasOwnProperty;
+function isAnyBluebirdPromise(obj) {
+ return hasProp.call(obj, "_promise0");
+}
+
+function doThenable(x, then, context) {
+ var promise = new Promise(INTERNAL);
+ var ret = promise;
+ if (context) context._pushContext();
+ promise._captureStackTrace();
+ if (context) context._popContext();
+ var synchronous = true;
+ var result = util.tryCatch(then).call(x,
+ resolveFromThenable,
+ rejectFromThenable,
+ progressFromThenable);
+ synchronous = false;
+ if (promise && result === errorObj) {
+ promise._rejectCallback(result.e, true, true);
+ promise = null;
+ }
+
+ function resolveFromThenable(value) {
+ if (!promise) return;
+ promise._resolveCallback(value);
+ promise = null;
+ }
+
+ function rejectFromThenable(reason) {
+ if (!promise) return;
+ promise._rejectCallback(reason, synchronous, true);
+ promise = null;
+ }
+
+ function progressFromThenable(value) {
+ if (!promise) return;
+ if (typeof promise._progress === "function") {
+ promise._progress(value);
+ }
+ }
+ return ret;
+}
+
+return tryConvertToPromise;
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/timers.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/timers.js
new file mode 100644
index 0000000..f26431a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/timers.js
@@ -0,0 +1,64 @@
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var util = require("./util.js");
+var TimeoutError = Promise.TimeoutError;
+
+var afterTimeout = function (promise, message) {
+ if (!promise.isPending()) return;
+
+ var err;
+ if(!util.isPrimitive(message) && (message instanceof Error)) {
+ err = message;
+ } else {
+ if (typeof message !== "string") {
+ message = "operation timed out";
+ }
+ err = new TimeoutError(message);
+ }
+ util.markAsOriginatingFromRejection(err);
+ promise._attachExtraTrace(err);
+ promise._cancel(err);
+};
+
+var afterValue = function(value) { return delay(+this).thenReturn(value); };
+var delay = Promise.delay = function (value, ms) {
+ if (ms === undefined) {
+ ms = value;
+ value = undefined;
+ var ret = new Promise(INTERNAL);
+ setTimeout(function() { ret._fulfill(); }, ms);
+ return ret;
+ }
+ ms = +ms;
+ return Promise.resolve(value)._then(afterValue, null, null, ms, undefined);
+};
+
+Promise.prototype.delay = function (ms) {
+ return delay(this, ms);
+};
+
+function successClear(value) {
+ var handle = this;
+ if (handle instanceof Number) handle = +handle;
+ clearTimeout(handle);
+ return value;
+}
+
+function failureClear(reason) {
+ var handle = this;
+ if (handle instanceof Number) handle = +handle;
+ clearTimeout(handle);
+ throw reason;
+}
+
+Promise.prototype.timeout = function (ms, message) {
+ ms = +ms;
+ var ret = this.then().cancellable();
+ ret._cancellationParent = this;
+ var handle = setTimeout(function timeoutTimeout() {
+ afterTimeout(ret, message);
+ }, ms);
+ return ret._then(successClear, failureClear, undefined, handle, undefined);
+};
+
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/using.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/using.js
new file mode 100644
index 0000000..957182d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/using.js
@@ -0,0 +1,213 @@
+"use strict";
+module.exports = function (Promise, apiRejection, tryConvertToPromise,
+ createContext) {
+ var TypeError = require("./errors.js").TypeError;
+ var inherits = require("./util.js").inherits;
+ var PromiseInspection = Promise.PromiseInspection;
+
+ function inspectionMapper(inspections) {
+ var len = inspections.length;
+ for (var i = 0; i < len; ++i) {
+ var inspection = inspections[i];
+ if (inspection.isRejected()) {
+ return Promise.reject(inspection.error());
+ }
+ inspections[i] = inspection._settledValue;
+ }
+ return inspections;
+ }
+
+ function thrower(e) {
+ setTimeout(function(){throw e;}, 0);
+ }
+
+ function castPreservingDisposable(thenable) {
+ var maybePromise = tryConvertToPromise(thenable);
+ if (maybePromise !== thenable &&
+ typeof thenable._isDisposable === "function" &&
+ typeof thenable._getDisposer === "function" &&
+ thenable._isDisposable()) {
+ maybePromise._setDisposable(thenable._getDisposer());
+ }
+ return maybePromise;
+ }
+ function dispose(resources, inspection) {
+ var i = 0;
+ var len = resources.length;
+ var ret = Promise.defer();
+ function iterator() {
+ if (i >= len) return ret.resolve();
+ var maybePromise = castPreservingDisposable(resources[i++]);
+ if (maybePromise instanceof Promise &&
+ maybePromise._isDisposable()) {
+ try {
+ maybePromise = tryConvertToPromise(
+ maybePromise._getDisposer().tryDispose(inspection),
+ resources.promise);
+ } catch (e) {
+ return thrower(e);
+ }
+ if (maybePromise instanceof Promise) {
+ return maybePromise._then(iterator, thrower,
+ null, null, null);
+ }
+ }
+ iterator();
+ }
+ iterator();
+ return ret.promise;
+ }
+
+ function disposerSuccess(value) {
+ var inspection = new PromiseInspection();
+ inspection._settledValue = value;
+ inspection._bitField = 268435456;
+ return dispose(this, inspection).thenReturn(value);
+ }
+
+ function disposerFail(reason) {
+ var inspection = new PromiseInspection();
+ inspection._settledValue = reason;
+ inspection._bitField = 134217728;
+ return dispose(this, inspection).thenThrow(reason);
+ }
+
+ function Disposer(data, promise, context) {
+ this._data = data;
+ this._promise = promise;
+ this._context = context;
+ }
+
+ Disposer.prototype.data = function () {
+ return this._data;
+ };
+
+ Disposer.prototype.promise = function () {
+ return this._promise;
+ };
+
+ Disposer.prototype.resource = function () {
+ if (this.promise().isFulfilled()) {
+ return this.promise().value();
+ }
+ return null;
+ };
+
+ Disposer.prototype.tryDispose = function(inspection) {
+ var resource = this.resource();
+ var context = this._context;
+ if (context !== undefined) context._pushContext();
+ var ret = resource !== null
+ ? this.doDispose(resource, inspection) : null;
+ if (context !== undefined) context._popContext();
+ this._promise._unsetDisposable();
+ this._data = null;
+ return ret;
+ };
+
+ Disposer.isDisposer = function (d) {
+ return (d != null &&
+ typeof d.resource === "function" &&
+ typeof d.tryDispose === "function");
+ };
+
+ function FunctionDisposer(fn, promise, context) {
+ this.constructor$(fn, promise, context);
+ }
+ inherits(FunctionDisposer, Disposer);
+
+ FunctionDisposer.prototype.doDispose = function (resource, inspection) {
+ var fn = this.data();
+ return fn.call(resource, resource, inspection);
+ };
+
+ function maybeUnwrapDisposer(value) {
+ if (Disposer.isDisposer(value)) {
+ this.resources[this.index]._setDisposable(value);
+ return value.promise();
+ }
+ return value;
+ }
+
+ Promise.using = function () {
+ var len = arguments.length;
+ if (len < 2) return apiRejection(
+ "you must pass at least 2 arguments to Promise.using");
+ var fn = arguments[len - 1];
+ if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
+
+ var input;
+ var spreadArgs = true;
+ if (len === 2 && Array.isArray(arguments[0])) {
+ input = arguments[0];
+ len = input.length;
+ spreadArgs = false;
+ } else {
+ input = arguments;
+ len--;
+ }
+ var resources = new Array(len);
+ for (var i = 0; i < len; ++i) {
+ var resource = input[i];
+ if (Disposer.isDisposer(resource)) {
+ var disposer = resource;
+ resource = resource.promise();
+ resource._setDisposable(disposer);
+ } else {
+ var maybePromise = tryConvertToPromise(resource);
+ if (maybePromise instanceof Promise) {
+ resource =
+ maybePromise._then(maybeUnwrapDisposer, null, null, {
+ resources: resources,
+ index: i
+ }, undefined);
+ }
+ }
+ resources[i] = resource;
+ }
+
+ var promise = Promise.settle(resources)
+ .then(inspectionMapper)
+ .then(function(vals) {
+ promise._pushContext();
+ var ret;
+ try {
+ ret = spreadArgs
+ ? fn.apply(undefined, vals) : fn.call(undefined, vals);
+ } finally {
+ promise._popContext();
+ }
+ return ret;
+ })
+ ._then(
+ disposerSuccess, disposerFail, undefined, resources, undefined);
+ resources.promise = promise;
+ return promise;
+ };
+
+ Promise.prototype._setDisposable = function (disposer) {
+ this._bitField = this._bitField | 262144;
+ this._disposer = disposer;
+ };
+
+ Promise.prototype._isDisposable = function () {
+ return (this._bitField & 262144) > 0;
+ };
+
+ Promise.prototype._getDisposer = function () {
+ return this._disposer;
+ };
+
+ Promise.prototype._unsetDisposable = function () {
+ this._bitField = this._bitField & (~262144);
+ this._disposer = undefined;
+ };
+
+ Promise.prototype.disposer = function (fn) {
+ if (typeof fn === "function") {
+ return new FunctionDisposer(fn, this, createContext());
+ }
+ throw new TypeError();
+ };
+
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/util.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/util.js
new file mode 100644
index 0000000..ea39344
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/js/main/util.js
@@ -0,0 +1,321 @@
+"use strict";
+var es5 = require("./es5.js");
+var canEvaluate = typeof navigator == "undefined";
+var haveGetters = (function(){
+ try {
+ var o = {};
+ es5.defineProperty(o, "f", {
+ get: function () {
+ return 3;
+ }
+ });
+ return o.f === 3;
+ }
+ catch (e) {
+ return false;
+ }
+
+})();
+
+var errorObj = {e: {}};
+var tryCatchTarget;
+function tryCatcher() {
+ try {
+ var target = tryCatchTarget;
+ tryCatchTarget = null;
+ return target.apply(this, arguments);
+ } catch (e) {
+ errorObj.e = e;
+ return errorObj;
+ }
+}
+function tryCatch(fn) {
+ tryCatchTarget = fn;
+ return tryCatcher;
+}
+
+var inherits = function(Child, Parent) {
+ var hasProp = {}.hasOwnProperty;
+
+ function T() {
+ this.constructor = Child;
+ this.constructor$ = Parent;
+ for (var propertyName in Parent.prototype) {
+ if (hasProp.call(Parent.prototype, propertyName) &&
+ propertyName.charAt(propertyName.length-1) !== "$"
+ ) {
+ this[propertyName + "$"] = Parent.prototype[propertyName];
+ }
+ }
+ }
+ T.prototype = Parent.prototype;
+ Child.prototype = new T();
+ return Child.prototype;
+};
+
+
+function isPrimitive(val) {
+ return val == null || val === true || val === false ||
+ typeof val === "string" || typeof val === "number";
+
+}
+
+function isObject(value) {
+ return !isPrimitive(value);
+}
+
+function maybeWrapAsError(maybeError) {
+ if (!isPrimitive(maybeError)) return maybeError;
+
+ return new Error(safeToString(maybeError));
+}
+
+function withAppended(target, appendee) {
+ var len = target.length;
+ var ret = new Array(len + 1);
+ var i;
+ for (i = 0; i < len; ++i) {
+ ret[i] = target[i];
+ }
+ ret[i] = appendee;
+ return ret;
+}
+
+function getDataPropertyOrDefault(obj, key, defaultValue) {
+ if (es5.isES5) {
+ var desc = Object.getOwnPropertyDescriptor(obj, key);
+
+ if (desc != null) {
+ return desc.get == null && desc.set == null
+ ? desc.value
+ : defaultValue;
+ }
+ } else {
+ return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined;
+ }
+}
+
+function notEnumerableProp(obj, name, value) {
+ if (isPrimitive(obj)) return obj;
+ var descriptor = {
+ value: value,
+ configurable: true,
+ enumerable: false,
+ writable: true
+ };
+ es5.defineProperty(obj, name, descriptor);
+ return obj;
+}
+
+function thrower(r) {
+ throw r;
+}
+
+var inheritedDataKeys = (function() {
+ var excludedPrototypes = [
+ Array.prototype,
+ Object.prototype,
+ Function.prototype
+ ];
+
+ var isExcludedProto = function(val) {
+ for (var i = 0; i < excludedPrototypes.length; ++i) {
+ if (excludedPrototypes[i] === val) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ if (es5.isES5) {
+ var getKeys = Object.getOwnPropertyNames;
+ return function(obj) {
+ var ret = [];
+ var visitedKeys = Object.create(null);
+ while (obj != null && !isExcludedProto(obj)) {
+ var keys;
+ try {
+ keys = getKeys(obj);
+ } catch (e) {
+ return ret;
+ }
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (visitedKeys[key]) continue;
+ visitedKeys[key] = true;
+ var desc = Object.getOwnPropertyDescriptor(obj, key);
+ if (desc != null && desc.get == null && desc.set == null) {
+ ret.push(key);
+ }
+ }
+ obj = es5.getPrototypeOf(obj);
+ }
+ return ret;
+ };
+ } else {
+ var hasProp = {}.hasOwnProperty;
+ return function(obj) {
+ if (isExcludedProto(obj)) return [];
+ var ret = [];
+
+ /*jshint forin:false */
+ enumeration: for (var key in obj) {
+ if (hasProp.call(obj, key)) {
+ ret.push(key);
+ } else {
+ for (var i = 0; i < excludedPrototypes.length; ++i) {
+ if (hasProp.call(excludedPrototypes[i], key)) {
+ continue enumeration;
+ }
+ }
+ ret.push(key);
+ }
+ }
+ return ret;
+ };
+ }
+
+})();
+
+var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/;
+function isClass(fn) {
+ try {
+ if (typeof fn === "function") {
+ var keys = es5.names(fn.prototype);
+
+ var hasMethods = es5.isES5 && keys.length > 1;
+ var hasMethodsOtherThanConstructor = keys.length > 0 &&
+ !(keys.length === 1 && keys[0] === "constructor");
+ var hasThisAssignmentAndStaticMethods =
+ thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0;
+
+ if (hasMethods || hasMethodsOtherThanConstructor ||
+ hasThisAssignmentAndStaticMethods) {
+ return true;
+ }
+ }
+ return false;
+ } catch (e) {
+ return false;
+ }
+}
+
+function toFastProperties(obj) {
+ /*jshint -W027,-W055,-W031*/
+ function f() {}
+ f.prototype = obj;
+ var l = 8;
+ while (l--) new f();
+ return obj;
+ eval(obj);
+}
+
+var rident = /^[a-z$_][a-z$_0-9]*$/i;
+function isIdentifier(str) {
+ return rident.test(str);
+}
+
+function filledRange(count, prefix, suffix) {
+ var ret = new Array(count);
+ for(var i = 0; i < count; ++i) {
+ ret[i] = prefix + i + suffix;
+ }
+ return ret;
+}
+
+function safeToString(obj) {
+ try {
+ return obj + "";
+ } catch (e) {
+ return "[no string representation]";
+ }
+}
+
+function markAsOriginatingFromRejection(e) {
+ try {
+ notEnumerableProp(e, "isOperational", true);
+ }
+ catch(ignore) {}
+}
+
+function originatesFromRejection(e) {
+ if (e == null) return false;
+ return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) ||
+ e["isOperational"] === true);
+}
+
+function canAttachTrace(obj) {
+ return obj instanceof Error && es5.propertyIsWritable(obj, "stack");
+}
+
+var ensureErrorObject = (function() {
+ if (!("stack" in new Error())) {
+ return function(value) {
+ if (canAttachTrace(value)) return value;
+ try {throw new Error(safeToString(value));}
+ catch(err) {return err;}
+ };
+ } else {
+ return function(value) {
+ if (canAttachTrace(value)) return value;
+ return new Error(safeToString(value));
+ };
+ }
+})();
+
+function classString(obj) {
+ return {}.toString.call(obj);
+}
+
+function copyDescriptors(from, to, filter) {
+ var keys = es5.names(from);
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (filter(key)) {
+ try {
+ es5.defineProperty(to, key, es5.getDescriptor(from, key));
+ } catch (ignore) {}
+ }
+ }
+}
+
+var ret = {
+ isClass: isClass,
+ isIdentifier: isIdentifier,
+ inheritedDataKeys: inheritedDataKeys,
+ getDataPropertyOrDefault: getDataPropertyOrDefault,
+ thrower: thrower,
+ isArray: es5.isArray,
+ haveGetters: haveGetters,
+ notEnumerableProp: notEnumerableProp,
+ isPrimitive: isPrimitive,
+ isObject: isObject,
+ canEvaluate: canEvaluate,
+ errorObj: errorObj,
+ tryCatch: tryCatch,
+ inherits: inherits,
+ withAppended: withAppended,
+ maybeWrapAsError: maybeWrapAsError,
+ toFastProperties: toFastProperties,
+ filledRange: filledRange,
+ toString: safeToString,
+ canAttachTrace: canAttachTrace,
+ ensureErrorObject: ensureErrorObject,
+ originatesFromRejection: originatesFromRejection,
+ markAsOriginatingFromRejection: markAsOriginatingFromRejection,
+ classString: classString,
+ copyDescriptors: copyDescriptors,
+ hasDevTools: typeof chrome !== "undefined" && chrome &&
+ typeof chrome.loadTimes === "function",
+ isNode: typeof process !== "undefined" &&
+ classString(process).toLowerCase() === "[object process]"
+};
+ret.isRecentNode = ret.isNode && (function() {
+ var version = process.versions.node.split(".").map(Number);
+ return (version[0] === 0 && version[1] > 10) || (version[0] > 0);
+})();
+
+if (ret.isNode) ret.toFastProperties(process);
+
+try {throw new Error(); } catch (e) {ret.lastLineError = e;}
+module.exports = ret;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/package.json
new file mode 100644
index 0000000..776bc8e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/bluebird/package.json
@@ -0,0 +1,100 @@
+{
+ "name": "bluebird",
+ "description": "Full featured Promises/A+ implementation with exceptionally good performance",
+ "version": "2.10.2",
+ "keywords": [
+ "promise",
+ "performance",
+ "promises",
+ "promises-a",
+ "promises-aplus",
+ "async",
+ "await",
+ "deferred",
+ "deferreds",
+ "future",
+ "flow control",
+ "dsl",
+ "fluent interface",
+ "parallel",
+ "thread",
+ "concurrency"
+ ],
+ "scripts": {
+ "lint": "node scripts/jshint.js",
+ "test": "node tools/test.js",
+ "istanbul": "istanbul",
+ "prepublish": "node tools/build.js --no-debug --main --zalgo --browser --minify",
+ "generate-browser-core": "node tools/build.js --features=core --no-debug --main --zalgo --browser --minify && mv js/browser/bluebird.js js/browser/bluebird.core.js && mv js/browser/bluebird.min.js js/browser/bluebird.core.min.js"
+ },
+ "homepage": "https://github.com/petkaantonov/bluebird",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/petkaantonov/bluebird.git"
+ },
+ "bugs": {
+ "url": "http://github.com/petkaantonov/bluebird/issues"
+ },
+ "license": "MIT",
+ "author": {
+ "name": "Petka Antonov",
+ "email": "petka_antonov@hotmail.com",
+ "url": "http://github.com/petkaantonov/"
+ },
+ "devDependencies": {
+ "acorn": "~0.6.0",
+ "baconjs": "^0.7.43",
+ "bluebird": "^2.9.2",
+ "body-parser": "^1.10.2",
+ "browserify": "^8.1.1",
+ "cli-table": "~0.3.1",
+ "co": "^4.2.0",
+ "cross-spawn": "^0.2.3",
+ "glob": "^4.3.2",
+ "grunt-saucelabs": "~8.4.1",
+ "highland": "^2.3.0",
+ "istanbul": "^0.3.5",
+ "jshint": "^2.6.0",
+ "jshint-stylish": "~0.2.0",
+ "mkdirp": "~0.5.0",
+ "mocha": "~2.1",
+ "open": "~0.0.5",
+ "optimist": "~0.6.1",
+ "rimraf": "~2.2.6",
+ "rx": "^2.3.25",
+ "serve-static": "^1.7.1",
+ "sinon": "~1.7.3",
+ "uglify-js": "~2.4.16",
+ "kefir": "^2.4.1"
+ },
+ "main": "./js/main/bluebird.js",
+ "browser": "./js/browser/bluebird.js",
+ "files": [
+ "js/browser",
+ "js/main",
+ "js/zalgo",
+ "zalgo.js"
+ ],
+ "gitHead": "02c0fd252cf7c0c86e6b27bb06422c404829b539",
+ "_id": "bluebird@2.10.2",
+ "_shasum": "024a5517295308857f14f91f1106fc3b555f446b",
+ "_from": "bluebird@2.10.2",
+ "_npmVersion": "2.11.1",
+ "_nodeVersion": "2.3.0",
+ "_npmUser": {
+ "name": "esailija",
+ "email": "petka_antonov@hotmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "esailija",
+ "email": "petka_antonov@hotmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "024a5517295308857f14f91f1106fc3b555f446b",
+ "tarball": "https://registry.npmjs.org/bluebird/-/bluebird-2.10.2.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.10.2.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/.jshintrc b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/.jshintrc
new file mode 100644
index 0000000..299877f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/.jshintrc
@@ -0,0 +1,3 @@
+{
+ "laxbreak": true
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/.npmignore
new file mode 100644
index 0000000..7e6163d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/.npmignore
@@ -0,0 +1,6 @@
+support
+test
+examples
+example
+*.sock
+dist
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/History.md
new file mode 100644
index 0000000..854c971
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/History.md
@@ -0,0 +1,195 @@
+
+2.2.0 / 2015-05-09
+==================
+
+ * package: update "ms" to v0.7.1 (#202, @dougwilson)
+ * README: add logging to file example (#193, @DanielOchoa)
+ * README: fixed a typo (#191, @amir-s)
+ * browser: expose `storage` (#190, @stephenmathieson)
+ * Makefile: add a `distclean` target (#189, @stephenmathieson)
+
+2.1.3 / 2015-03-13
+==================
+
+ * Updated stdout/stderr example (#186)
+ * Updated example/stdout.js to match debug current behaviour
+ * Renamed example/stderr.js to stdout.js
+ * Update Readme.md (#184)
+ * replace high intensity foreground color for bold (#182, #183)
+
+2.1.2 / 2015-03-01
+==================
+
+ * dist: recompile
+ * update "ms" to v0.7.0
+ * package: update "browserify" to v9.0.3
+ * component: fix "ms.js" repo location
+ * changed bower package name
+ * updated documentation about using debug in a browser
+ * fix: security error on safari (#167, #168, @yields)
+
+2.1.1 / 2014-12-29
+==================
+
+ * browser: use `typeof` to check for `console` existence
+ * browser: check for `console.log` truthiness (fix IE 8/9)
+ * browser: add support for Chrome apps
+ * Readme: added Windows usage remarks
+ * Add `bower.json` to properly support bower install
+
+2.1.0 / 2014-10-15
+==================
+
+ * node: implement `DEBUG_FD` env variable support
+ * package: update "browserify" to v6.1.0
+ * package: add "license" field to package.json (#135, @panuhorsmalahti)
+
+2.0.0 / 2014-09-01
+==================
+
+ * package: update "browserify" to v5.11.0
+ * node: use stderr rather than stdout for logging (#29, @stephenmathieson)
+
+1.0.4 / 2014-07-15
+==================
+
+ * dist: recompile
+ * example: remove `console.info()` log usage
+ * example: add "Content-Type" UTF-8 header to browser example
+ * browser: place %c marker after the space character
+ * browser: reset the "content" color via `color: inherit`
+ * browser: add colors support for Firefox >= v31
+ * debug: prefer an instance `log()` function over the global one (#119)
+ * Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
+
+1.0.3 / 2014-07-09
+==================
+
+ * Add support for multiple wildcards in namespaces (#122, @seegno)
+ * browser: fix lint
+
+1.0.2 / 2014-06-10
+==================
+
+ * browser: update color palette (#113, @gscottolson)
+ * common: make console logging function configurable (#108, @timoxley)
+ * node: fix %o colors on old node <= 0.8.x
+ * Makefile: find node path using shell/which (#109, @timoxley)
+
+1.0.1 / 2014-06-06
+==================
+
+ * browser: use `removeItem()` to clear localStorage
+ * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
+ * package: add "contributors" section
+ * node: fix comment typo
+ * README: list authors
+
+1.0.0 / 2014-06-04
+==================
+
+ * make ms diff be global, not be scope
+ * debug: ignore empty strings in enable()
+ * node: make DEBUG_COLORS able to disable coloring
+ * *: export the `colors` array
+ * npmignore: don't publish the `dist` dir
+ * Makefile: refactor to use browserify
+ * package: add "browserify" as a dev dependency
+ * Readme: add Web Inspector Colors section
+ * node: reset terminal color for the debug content
+ * node: map "%o" to `util.inspect()`
+ * browser: map "%j" to `JSON.stringify()`
+ * debug: add custom "formatters"
+ * debug: use "ms" module for humanizing the diff
+ * Readme: add "bash" syntax highlighting
+ * browser: add Firebug color support
+ * browser: add colors for WebKit browsers
+ * node: apply log to `console`
+ * rewrite: abstract common logic for Node & browsers
+ * add .jshintrc file
+
+0.8.1 / 2014-04-14
+==================
+
+ * package: re-add the "component" section
+
+0.8.0 / 2014-03-30
+==================
+
+ * add `enable()` method for nodejs. Closes #27
+ * change from stderr to stdout
+ * remove unnecessary index.js file
+
+0.7.4 / 2013-11-13
+==================
+
+ * remove "browserify" key from package.json (fixes something in browserify)
+
+0.7.3 / 2013-10-30
+==================
+
+ * fix: catch localStorage security error when cookies are blocked (Chrome)
+ * add debug(err) support. Closes #46
+ * add .browser prop to package.json. Closes #42
+
+0.7.2 / 2013-02-06
+==================
+
+ * fix package.json
+ * fix: Mobile Safari (private mode) is broken with debug
+ * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript
+
+0.7.1 / 2013-02-05
+==================
+
+ * add repository URL to package.json
+ * add DEBUG_COLORED to force colored output
+ * add browserify support
+ * fix component. Closes #24
+
+0.7.0 / 2012-05-04
+==================
+
+ * Added .component to package.json
+ * Added debug.component.js build
+
+0.6.0 / 2012-03-16
+==================
+
+ * Added support for "-" prefix in DEBUG [Vinay Pulim]
+ * Added `.enabled` flag to the node version [TooTallNate]
+
+0.5.0 / 2012-02-02
+==================
+
+ * Added: humanize diffs. Closes #8
+ * Added `debug.disable()` to the CS variant
+ * Removed padding. Closes #10
+ * Fixed: persist client-side variant again. Closes #9
+
+0.4.0 / 2012-02-01
+==================
+
+ * Added browser variant support for older browsers [TooTallNate]
+ * Added `debug.enable('project:*')` to browser variant [TooTallNate]
+ * Added padding to diff (moved it to the right)
+
+0.3.0 / 2012-01-26
+==================
+
+ * Added millisecond diff when isatty, otherwise UTC string
+
+0.2.0 / 2012-01-22
+==================
+
+ * Added wildcard support
+
+0.1.0 / 2011-12-02
+==================
+
+ * Added: remove colors unless stderr isatty [TooTallNate]
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/Makefile b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/Makefile
new file mode 100644
index 0000000..5cf4a59
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/Makefile
@@ -0,0 +1,36 @@
+
+# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
+THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
+THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
+
+# BIN directory
+BIN := $(THIS_DIR)/node_modules/.bin
+
+# applications
+NODE ?= $(shell which node)
+NPM ?= $(NODE) $(shell which npm)
+BROWSERIFY ?= $(NODE) $(BIN)/browserify
+
+all: dist/debug.js
+
+install: node_modules
+
+clean:
+ @rm -rf dist
+
+dist:
+ @mkdir -p $@
+
+dist/debug.js: node_modules browser.js debug.js dist
+ @$(BROWSERIFY) \
+ --standalone debug \
+ . > $@
+
+distclean: clean
+ @rm -rf node_modules
+
+node_modules: package.json
+ @NODE_ENV= $(NPM) install
+ @touch node_modules
+
+.PHONY: all install clean distclean
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/Readme.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/Readme.md
new file mode 100644
index 0000000..b4f45e3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/Readme.md
@@ -0,0 +1,188 @@
+# debug
+
+ tiny node.js debugging utility modelled after node core's debugging technique.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+ With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility.
+
+Example _app.js_:
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %s', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example _worker.js_:
+
+```js
+var debug = require('debug')('worker');
+
+setInterval(function(){
+ debug('doing some work');
+}, 1000);
+```
+
+ The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:
+
+ ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)
+
+ ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)
+
+#### Windows note
+
+ On Windows the environment variable is set using the `set` command.
+
+ ```cmd
+ set DEBUG=*,-not_this
+ ```
+
+Then, run the program to be debugged as usual.
+
+## Millisecond diff
+
+ When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+ ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)
+
+ When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:
+
+ ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)
+
+## Conventions
+
+ If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".
+
+## Wildcards
+
+ The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+ You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:".
+
+## Browser support
+
+ Debug works in the browser as well, currently persisted by `localStorage`. Consider the situation shown below where you have `worker:a` and `worker:b`, and wish to debug both. Somewhere in the code on your page, include:
+
+```js
+window.myDebug = require("debug");
+```
+
+ ("debug" is a global object in the browser so we give this object a different name.) When your page is open in the browser, type the following in the console:
+
+```js
+myDebug.enable("worker:*")
+```
+
+ Refresh the page. Debug output will continue to be sent to the console until it is disabled by typing `myDebug.disable()` in the console.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+#### Web Inspector Colors
+
+ Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+ option. These are WebKit web inspectors, Firefox ([since version
+ 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+ and the Firebug plugin for Firefox (any version).
+
+ Colored output looks something like:
+
+ ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png)
+
+### stderr vs stdout
+
+You can set an alternative logging method per-namespace by overriding the `log` method on a per-namespace or globally:
+
+Example _stdout.js_:
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+### Save debug output to a file
+
+You can save all debug statements to a file by piping them.
+
+Example:
+
+```bash
+$ DEBUG_FD=3 node your-app.js 3> whatever.log
+```
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/bower.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/bower.json
new file mode 100644
index 0000000..6af573f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/bower.json
@@ -0,0 +1,28 @@
+{
+ "name": "visionmedia-debug",
+ "main": "dist/debug.js",
+ "version": "2.2.0",
+ "homepage": "https://github.com/visionmedia/debug",
+ "authors": [
+ "TJ Holowaychuk <tj@vision-media.ca>"
+ ],
+ "description": "visionmedia-debug",
+ "moduleType": [
+ "amd",
+ "es6",
+ "globals",
+ "node"
+ ],
+ "keywords": [
+ "visionmedia",
+ "debug"
+ ],
+ "license": "MIT",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ]
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/browser.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/browser.js
new file mode 100644
index 0000000..7c76452
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/browser.js
@@ -0,0 +1,168 @@
+
+/**
+ * This is the web browser implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = 'undefined' != typeof chrome
+ && 'undefined' != typeof chrome.storage
+ ? chrome.storage.local
+ : localstorage();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ 'lightseagreen',
+ 'forestgreen',
+ 'goldenrod',
+ 'dodgerblue',
+ 'darkorchid',
+ 'crimson'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+function useColors() {
+ // is webkit? http://stackoverflow.com/a/16459606/376773
+ return ('WebkitAppearance' in document.documentElement.style) ||
+ // is firebug? http://stackoverflow.com/a/398120/376773
+ (window.console && (console.firebug || (console.exception && console.table))) ||
+ // is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31);
+}
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+exports.formatters.j = function(v) {
+ return JSON.stringify(v);
+};
+
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs() {
+ var args = arguments;
+ var useColors = this.useColors;
+
+ args[0] = (useColors ? '%c' : '')
+ + this.namespace
+ + (useColors ? ' %c' : ' ')
+ + args[0]
+ + (useColors ? '%c ' : ' ')
+ + '+' + exports.humanize(this.diff);
+
+ if (!useColors) return args;
+
+ var c = 'color: ' + this.color;
+ args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));
+
+ // the final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ var index = 0;
+ var lastC = 0;
+ args[0].replace(/%[a-z%]/g, function(match) {
+ if ('%%' === match) return;
+ index++;
+ if ('%c' === match) {
+ // we only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+ return args;
+}
+
+/**
+ * Invokes `console.log()` when available.
+ * No-op when `console.log` is not a "function".
+ *
+ * @api public
+ */
+
+function log() {
+ // this hackery is required for IE8/9, where
+ // the `console.log` function doesn't have 'apply'
+ return 'object' === typeof console
+ && console.log
+ && Function.prototype.apply.call(console.log, console, arguments);
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ try {
+ if (null == namespaces) {
+ exports.storage.removeItem('debug');
+ } else {
+ exports.storage.debug = namespaces;
+ }
+ } catch(e) {}
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ var r;
+ try {
+ r = exports.storage.debug;
+ } catch(e) {}
+ return r;
+}
+
+/**
+ * Enable namespaces listed in `localStorage.debug` initially.
+ */
+
+exports.enable(load());
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage(){
+ try {
+ return window.localStorage;
+ } catch (e) {}
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/component.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/component.json
new file mode 100644
index 0000000..ca10637
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/component.json
@@ -0,0 +1,19 @@
+{
+ "name": "debug",
+ "repo": "visionmedia/debug",
+ "description": "small debugging utility",
+ "version": "2.2.0",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "main": "browser.js",
+ "scripts": [
+ "browser.js",
+ "debug.js"
+ ],
+ "dependencies": {
+ "rauchg/ms.js": "0.7.1"
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/debug.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/debug.js
new file mode 100644
index 0000000..7571a86
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/debug.js
@@ -0,0 +1,197 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = debug;
+exports.coerce = coerce;
+exports.disable = disable;
+exports.enable = enable;
+exports.enabled = enabled;
+exports.humanize = require('ms');
+
+/**
+ * The currently active debug mode names, and names to skip.
+ */
+
+exports.names = [];
+exports.skips = [];
+
+/**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lowercased letter, i.e. "n".
+ */
+
+exports.formatters = {};
+
+/**
+ * Previously assigned color.
+ */
+
+var prevColor = 0;
+
+/**
+ * Previous log timestamp.
+ */
+
+var prevTime;
+
+/**
+ * Select a color.
+ *
+ * @return {Number}
+ * @api private
+ */
+
+function selectColor() {
+ return exports.colors[prevColor++ % exports.colors.length];
+}
+
+/**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+
+function debug(namespace) {
+
+ // define the `disabled` version
+ function disabled() {
+ }
+ disabled.enabled = false;
+
+ // define the `enabled` version
+ function enabled() {
+
+ var self = enabled;
+
+ // set `diff` timestamp
+ var curr = +new Date();
+ var ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ // add the `color` if not set
+ if (null == self.useColors) self.useColors = exports.useColors();
+ if (null == self.color && self.useColors) self.color = selectColor();
+
+ var args = Array.prototype.slice.call(arguments);
+
+ args[0] = exports.coerce(args[0]);
+
+ if ('string' !== typeof args[0]) {
+ // anything else let's inspect with %o
+ args = ['%o'].concat(args);
+ }
+
+ // apply any `formatters` transformations
+ var index = 0;
+ args[0] = args[0].replace(/%([a-z%])/g, function(match, format) {
+ // if we encounter an escaped % then don't increase the array index
+ if (match === '%%') return match;
+ index++;
+ var formatter = exports.formatters[format];
+ if ('function' === typeof formatter) {
+ var val = args[index];
+ match = formatter.call(self, val);
+
+ // now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ if ('function' === typeof exports.formatArgs) {
+ args = exports.formatArgs.apply(self, args);
+ }
+ var logFn = enabled.log || exports.log || console.log.bind(console);
+ logFn.apply(self, args);
+ }
+ enabled.enabled = true;
+
+ var fn = exports.enabled(namespace) ? enabled : disabled;
+
+ fn.namespace = namespace;
+
+ return fn;
+}
+
+/**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+
+function enable(namespaces) {
+ exports.save(namespaces);
+
+ var split = (namespaces || '').split(/[\s,]+/);
+ var len = split.length;
+
+ for (var i = 0; i < len; i++) {
+ if (!split[i]) continue; // ignore empty strings
+ namespaces = split[i].replace(/\*/g, '.*?');
+ if (namespaces[0] === '-') {
+ exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+ } else {
+ exports.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+}
+
+/**
+ * Disable debug output.
+ *
+ * @api public
+ */
+
+function disable() {
+ exports.enable('');
+}
+
+/**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+
+function enabled(name) {
+ var i, len;
+ for (i = 0, len = exports.skips.length; i < len; i++) {
+ if (exports.skips[i].test(name)) {
+ return false;
+ }
+ }
+ for (i = 0, len = exports.names.length; i < len; i++) {
+ if (exports.names[i].test(name)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+
+function coerce(val) {
+ if (val instanceof Error) return val.stack || val.message;
+ return val;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/node.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/node.js
new file mode 100644
index 0000000..1d392a8
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/node.js
@@ -0,0 +1,209 @@
+
+/**
+ * Module dependencies.
+ */
+
+var tty = require('tty');
+var util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+/**
+ * The file descriptor to write the `debug()` calls to.
+ * Set the `DEBUG_FD` env variable to override with another value. i.e.:
+ *
+ * $ DEBUG_FD=3 node script.js 3>debug.log
+ */
+
+var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
+var stream = 1 === fd ? process.stdout :
+ 2 === fd ? process.stderr :
+ createWritableStdioStream(fd);
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ var debugColors = (process.env.DEBUG_COLORS || '').trim().toLowerCase();
+ if (0 === debugColors.length) {
+ return tty.isatty(fd);
+ } else {
+ return '0' !== debugColors
+ && 'no' !== debugColors
+ && 'false' !== debugColors
+ && 'disabled' !== debugColors;
+ }
+}
+
+/**
+ * Map %o to `util.inspect()`, since Node doesn't do that out of the box.
+ */
+
+var inspect = (4 === util.inspect.length ?
+ // node <= 0.8.x
+ function (v, colors) {
+ return util.inspect(v, void 0, void 0, colors);
+ } :
+ // node > 0.8.x
+ function (v, colors) {
+ return util.inspect(v, { colors: colors });
+ }
+);
+
+exports.formatters.o = function(v) {
+ return inspect(v, this.useColors)
+ .replace(/\s*\n\s*/g, ' ');
+};
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs() {
+ var args = arguments;
+ var useColors = this.useColors;
+ var name = this.namespace;
+
+ if (useColors) {
+ var c = this.color;
+
+ args[0] = ' \u001b[3' + c + ';1m' + name + ' '
+ + '\u001b[0m'
+ + args[0] + '\u001b[3' + c + 'm'
+ + ' +' + exports.humanize(this.diff) + '\u001b[0m';
+ } else {
+ args[0] = new Date().toUTCString()
+ + ' ' + name + ' ' + args[0];
+ }
+ return args;
+}
+
+/**
+ * Invokes `console.error()` with the specified arguments.
+ */
+
+function log() {
+ return stream.write(util.format.apply(this, arguments) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ if (null == namespaces) {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ } else {
+ process.env.DEBUG = namespaces;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Copied from `node/src/node.js`.
+ *
+ * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
+ * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
+ */
+
+function createWritableStdioStream (fd) {
+ var stream;
+ var tty_wrap = process.binding('tty_wrap');
+
+ // Note stream._type is used for test-module-load-list.js
+
+ switch (tty_wrap.guessHandleType(fd)) {
+ case 'TTY':
+ stream = new tty.WriteStream(fd);
+ stream._type = 'tty';
+
+ // Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ case 'FILE':
+ var fs = require('fs');
+ stream = new fs.SyncWriteStream(fd, { autoClose: false });
+ stream._type = 'fs';
+ break;
+
+ case 'PIPE':
+ case 'TCP':
+ var net = require('net');
+ stream = new net.Socket({
+ fd: fd,
+ readable: false,
+ writable: true
+ });
+
+ // FIXME Should probably have an option in net.Socket to create a
+ // stream from an existing fd which is writable only. But for now
+ // we'll just add this hack and set the `readable` member to false.
+ // Test: ./node test/fixtures/echo.js < /etc/passwd
+ stream.readable = false;
+ stream.read = null;
+ stream._type = 'pipe';
+
+ // FIXME Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ default:
+ // Probably an error on in uv_guess_handle()
+ throw new Error('Implement me. Unknown stream file type!');
+ }
+
+ // For supporting legacy API we put the FD here.
+ stream.fd = fd;
+
+ stream._isStdio = true;
+
+ return stream;
+}
+
+/**
+ * Enable namespaces listed in `process.env.DEBUG` initially.
+ */
+
+exports.enable(load());
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/package.json
new file mode 100644
index 0000000..46ce4c5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/debug/package.json
@@ -0,0 +1,73 @@
+{
+ "name": "debug",
+ "version": "2.2.0",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/visionmedia/debug.git"
+ },
+ "description": "small debugging utility",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "contributors": [
+ {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "ms": "0.7.1"
+ },
+ "devDependencies": {
+ "browserify": "9.0.3",
+ "mocha": "*"
+ },
+ "main": "./node.js",
+ "browser": "./browser.js",
+ "component": {
+ "scripts": {
+ "debug/index.js": "browser.js",
+ "debug/debug.js": "debug.js"
+ }
+ },
+ "gitHead": "b38458422b5aa8aa6d286b10dfe427e8a67e2b35",
+ "bugs": {
+ "url": "https://github.com/visionmedia/debug/issues"
+ },
+ "homepage": "https://github.com/visionmedia/debug",
+ "_id": "debug@2.2.0",
+ "scripts": {},
+ "_shasum": "f87057e995b1a1f6ae6a4960664137bc56f039da",
+ "_from": "debug@2.2.0",
+ "_npmVersion": "2.7.4",
+ "_nodeVersion": "0.12.2",
+ "_npmUser": {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ }
+ ],
+ "dist": {
+ "shasum": "f87057e995b1a1f6ae6a4960664137bc56f039da",
+ "tarball": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/.npmignore
new file mode 100644
index 0000000..be106ca
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/.npmignore
@@ -0,0 +1,2 @@
+*.sw*
+node_modules/
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/.travis.yml b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/.travis.yml
new file mode 100644
index 0000000..895dbd3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - 0.6
+ - 0.8
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/History.md
new file mode 100644
index 0000000..33abe6d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/History.md
@@ -0,0 +1,30 @@
+
+0.0.5 / 2013-02-05
+==================
+
+ * optimization: remove use of arguments [jkroso](https://github.com/jkroso)
+ * add scripts to component.json [jkroso](https://github.com/jkroso)
+ * tests; remove time for travis
+
+0.0.4 / 2013-01-07
+==================
+
+ * added component.json #1 [jkroso](https://github.com/jkroso)
+ * reversed array loop #1 [jkroso](https://github.com/jkroso)
+ * remove fn params
+
+0.0.3 / 2012-09-29
+==================
+
+ * faster with negative start args
+
+0.0.2 / 2012-09-29
+==================
+
+ * support full [].slice semantics
+
+0.0.1 / 2012-09-29
+===================
+
+ * initial release
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/LICENSE
new file mode 100644
index 0000000..38c529d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2012 [Aaron Heckmann](aaron.heckmann+github@gmail.com)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/Makefile b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/Makefile
new file mode 100644
index 0000000..2ad4e47
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/Makefile
@@ -0,0 +1,5 @@
+
+test:
+ @./node_modules/.bin/mocha $(T) $(TESTS)
+
+.PHONY: test
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/README.md
new file mode 100644
index 0000000..6605c39
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/README.md
@@ -0,0 +1,62 @@
+#sliced
+==========
+
+A faster alternative to `[].slice.call(arguments)`.
+
+[![Build Status](https://secure.travis-ci.org/aheckmann/sliced.png)](http://travis-ci.org/aheckmann/sliced)
+
+Example output from [benchmark.js](https://github.com/bestiejs/benchmark.js)
+
+ Array.prototype.slice.call x 1,320,205 ops/sec ±2.35% (92 runs sampled)
+ [].slice.call x 1,314,605 ops/sec ±1.60% (95 runs sampled)
+ cached slice.call x 10,468,380 ops/sec ±1.45% (95 runs sampled)
+ sliced x 16,608,237 ops/sec ±1.40% (92 runs sampled)
+ fastest is sliced
+
+ Array.prototype.slice.call(arguments, 1) x 1,383,584 ops/sec ±1.73% (97 runs sampled)
+ [].slice.call(arguments, 1) x 1,494,735 ops/sec ±1.33% (95 runs sampled)
+ cached slice.call(arguments, 1) x 10,085,270 ops/sec ±1.51% (97 runs sampled)
+ sliced(arguments, 1) x 16,620,480 ops/sec ±1.29% (95 runs sampled)
+ fastest is sliced(arguments, 1)
+
+ Array.prototype.slice.call(arguments, -1) x 1,303,262 ops/sec ±1.62% (94 runs sampled)
+ [].slice.call(arguments, -1) x 1,325,615 ops/sec ±1.36% (97 runs sampled)
+ cached slice.call(arguments, -1) x 9,673,603 ops/sec ±1.70% (96 runs sampled)
+ sliced(arguments, -1) x 16,384,575 ops/sec ±1.06% (91 runs sampled)
+ fastest is sliced(arguments, -1)
+
+ Array.prototype.slice.call(arguments, -2, -10) x 1,404,390 ops/sec ±1.61% (95 runs sampled)
+ [].slice.call(arguments, -2, -10) x 1,514,367 ops/sec ±1.21% (96 runs sampled)
+ cached slice.call(arguments, -2, -10) x 9,836,017 ops/sec ±1.21% (95 runs sampled)
+ sliced(arguments, -2, -10) x 18,544,882 ops/sec ±1.30% (91 runs sampled)
+ fastest is sliced(arguments, -2, -10)
+
+ Array.prototype.slice.call(arguments, -2, -1) x 1,458,604 ops/sec ±1.41% (97 runs sampled)
+ [].slice.call(arguments, -2, -1) x 1,536,547 ops/sec ±1.63% (99 runs sampled)
+ cached slice.call(arguments, -2, -1) x 10,060,633 ops/sec ±1.37% (96 runs sampled)
+ sliced(arguments, -2, -1) x 18,608,712 ops/sec ±1.08% (93 runs sampled)
+ fastest is sliced(arguments, -2, -1)
+
+_Benchmark [source](https://github.com/aheckmann/sliced/blob/master/bench.js)._
+
+##Usage
+
+`sliced` accepts the same arguments as `Array#slice` so you can easily swap it out.
+
+```js
+function zing () {
+ var slow = [].slice.call(arguments, 1, 8);
+ var args = slice(arguments, 1, 8);
+
+ var slow = Array.prototype.slice.call(arguments);
+ var args = slice(arguments);
+ // etc
+}
+```
+
+## install
+
+ npm install sliced
+
+
+[LICENSE](https://github.com/aheckmann/sliced/blob/master/LICENSE)
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/bench.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/bench.js
new file mode 100644
index 0000000..f201d16
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/bench.js
@@ -0,0 +1,95 @@
+
+var sliced = require('./')
+var Bench = require('benchmark');
+var s = new Bench.Suite;
+var slice = [].slice;
+
+s.add('Array.prototype.slice.call', function () {
+ Array.prototype.slice.call(arguments);
+}).add('[].slice.call', function () {
+ [].slice.call(arguments);
+}).add('cached slice.call', function () {
+ slice.call(arguments)
+}).add('sliced', function () {
+ sliced(arguments)
+}).on('cycle', function (evt) {
+ console.log(String(evt.target));
+}).on('complete', function () {
+ console.log('fastest is %s', this.filter('fastest').pluck('name'));
+})
+.run();
+
+var s = new Bench.Suite;
+s.add('Array.prototype.slice.call(arguments, 1)', function () {
+ Array.prototype.slice.call(arguments, 1);
+}).add('[].slice.call(arguments, 1)', function () {
+ [].slice.call(arguments, 1);
+}).add('cached slice.call(arguments, 1)', function () {
+ slice.call(arguments, 1)
+}).add('sliced(arguments, 1)', function () {
+ sliced(arguments, 1)
+}).on('cycle', function (evt) {
+ console.log(String(evt.target));
+}).on('complete', function () {
+ console.log('fastest is %s', this.filter('fastest').pluck('name'));
+})
+.run();
+
+var s = new Bench.Suite;
+s.add('Array.prototype.slice.call(arguments, -1)', function () {
+ Array.prototype.slice.call(arguments, -1);
+}).add('[].slice.call(arguments, -1)', function () {
+ [].slice.call(arguments, -1);
+}).add('cached slice.call(arguments, -1)', function () {
+ slice.call(arguments, -1)
+}).add('sliced(arguments, -1)', function () {
+ sliced(arguments, -1)
+}).on('cycle', function (evt) {
+ console.log(String(evt.target));
+}).on('complete', function () {
+ console.log('fastest is %s', this.filter('fastest').pluck('name'));
+})
+.run();
+
+var s = new Bench.Suite;
+s.add('Array.prototype.slice.call(arguments, -2, -10)', function () {
+ Array.prototype.slice.call(arguments, -2, -10);
+}).add('[].slice.call(arguments, -2, -10)', function () {
+ [].slice.call(arguments, -2, -10);
+}).add('cached slice.call(arguments, -2, -10)', function () {
+ slice.call(arguments, -2, -10)
+}).add('sliced(arguments, -2, -10)', function () {
+ sliced(arguments, -2, -10)
+}).on('cycle', function (evt) {
+ console.log(String(evt.target));
+}).on('complete', function () {
+ console.log('fastest is %s', this.filter('fastest').pluck('name'));
+})
+.run();
+
+var s = new Bench.Suite;
+s.add('Array.prototype.slice.call(arguments, -2, -1)', function () {
+ Array.prototype.slice.call(arguments, -2, -1);
+}).add('[].slice.call(arguments, -2, -1)', function () {
+ [].slice.call(arguments, -2, -1);
+}).add('cached slice.call(arguments, -2, -1)', function () {
+ slice.call(arguments, -2, -1)
+}).add('sliced(arguments, -2, -1)', function () {
+ sliced(arguments, -2, -1)
+}).on('cycle', function (evt) {
+ console.log(String(evt.target));
+}).on('complete', function () {
+ console.log('fastest is %s', this.filter('fastest').pluck('name'));
+})
+.run();
+
+/**
+ * Output:
+ *
+ * Array.prototype.slice.call x 1,289,592 ops/sec ±2.88% (87 runs sampled)
+ * [].slice.call x 1,345,451 ops/sec ±1.68% (97 runs sampled)
+ * cached slice.call x 10,719,886 ops/sec ±1.04% (99 runs sampled)
+ * sliced x 15,809,545 ops/sec ±1.46% (93 runs sampled)
+ * fastest is sliced
+ *
+ */
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/component.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/component.json
new file mode 100644
index 0000000..57e9e0c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/component.json
@@ -0,0 +1,14 @@
+{
+ "name": "sliced",
+ "version": "0.0.5",
+ "description": "A faster Node.js alternative to Array.prototype.slice.call(arguments)",
+ "repo" : "aheckmann/sliced",
+ "keywords": [
+ "arguments",
+ "slice",
+ "array"
+ ],
+ "scripts": ["lib/sliced.js", "index.js"],
+ "author": "Aaron Heckmann <aaron.heckmann+github@gmail.com>",
+ "license": "MIT"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/index.js
new file mode 100644
index 0000000..3b90ae7
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/index.js
@@ -0,0 +1 @@
+module.exports = exports = require('./lib/sliced');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/lib/sliced.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/lib/sliced.js
new file mode 100644
index 0000000..d88c85b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/lib/sliced.js
@@ -0,0 +1,33 @@
+
+/**
+ * An Array.prototype.slice.call(arguments) alternative
+ *
+ * @param {Object} args something with a length
+ * @param {Number} slice
+ * @param {Number} sliceEnd
+ * @api public
+ */
+
+module.exports = function (args, slice, sliceEnd) {
+ var ret = [];
+ var len = args.length;
+
+ if (0 === len) return ret;
+
+ var start = slice < 0
+ ? Math.max(0, slice + len)
+ : slice || 0;
+
+ if (sliceEnd !== undefined) {
+ len = sliceEnd < 0
+ ? sliceEnd + len
+ : sliceEnd
+ }
+
+ while (len-- > start) {
+ ret[len - start] = args[len];
+ }
+
+ return ret;
+}
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/package.json
new file mode 100644
index 0000000..cc39bb0
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/package.json
@@ -0,0 +1,47 @@
+{
+ "name": "sliced",
+ "version": "0.0.5",
+ "description": "A faster Node.js alternative to Array.prototype.slice.call(arguments)",
+ "main": "index.js",
+ "scripts": {
+ "test": "make test"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/aheckmann/sliced"
+ },
+ "keywords": [
+ "arguments",
+ "slice",
+ "array"
+ ],
+ "author": {
+ "name": "Aaron Heckmann",
+ "email": "aaron.heckmann+github@gmail.com"
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "mocha": "1.5.0",
+ "benchmark": "~1.0.0"
+ },
+ "_id": "sliced@0.0.5",
+ "dist": {
+ "shasum": "5edc044ca4eb6f7816d50ba2fc63e25d8fe4707f",
+ "tarball": "https://registry.npmjs.org/sliced/-/sliced-0.0.5.tgz"
+ },
+ "_npmVersion": "1.1.59",
+ "_npmUser": {
+ "name": "aaron",
+ "email": "aaron.heckmann+github@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "aaron",
+ "email": "aaron.heckmann+github@gmail.com"
+ }
+ ],
+ "directories": {},
+ "_shasum": "5edc044ca4eb6f7816d50ba2fc63e25d8fe4707f",
+ "_resolved": "https://registry.npmjs.org/sliced/-/sliced-0.0.5.tgz",
+ "_from": "sliced@0.0.5"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/test/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/test/index.js
new file mode 100644
index 0000000..33d36a1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/node_modules/sliced/test/index.js
@@ -0,0 +1,80 @@
+
+var sliced = require('../')
+var assert = require('assert')
+
+describe('sliced', function(){
+ it('exports a function', function(){
+ assert.equal('function', typeof sliced);
+ })
+ describe('with 1 arg', function(){
+ it('returns an array of the arg', function(){
+ var o = [3, "4", {}];
+ var r = sliced(o);
+ assert.equal(3, r.length);
+ assert.equal(o[0], r[0]);
+ assert.equal(o[1], r[1]);
+ assert.equal(o[1], r[1]);
+ })
+ })
+ describe('with 2 args', function(){
+ it('returns an array of the arg starting at the 2nd arg', function(){
+ var o = [3, "4", 5, null];
+ var r = sliced(o, 2);
+ assert.equal(2, r.length);
+ assert.equal(o[2], r[0]);
+ assert.equal(o[3], r[1]);
+ })
+ })
+ describe('with 3 args', function(){
+ it('returns an array of the arg from the 2nd to the 3rd arg', function(){
+ var o = [3, "4", 5, null];
+ var r = sliced(o, 1, 2);
+ assert.equal(1, r.length);
+ assert.equal(o[1], r[0]);
+ })
+ })
+ describe('with negative start and no end', function(){
+ it('begins at an offset from the end and includes all following elements', function(){
+ var o = [3, "4", 5, null];
+ var r = sliced(o, -2);
+ assert.equal(2, r.length);
+ assert.equal(o[2], r[0]);
+ assert.equal(o[3], r[1]);
+
+ var r = sliced(o, -12);
+ assert.equal(4, r.length);
+ assert.equal(o[0], r[0]);
+ assert.equal(o[1], r[1]);
+ })
+ })
+ describe('with negative start and positive end', function(){
+ it('begins at an offset from the end and includes `end` elements', function(){
+ var o = [3, "4", {x:1}, null];
+
+ var r = sliced(o, -2, 1);
+ assert.equal(0, r.length);
+
+ var r = sliced(o, -2, 2);
+ assert.equal(0, r.length);
+
+ var r = sliced(o, -2, 3);
+ assert.equal(1, r.length);
+ assert.equal(o[2], r[0]);
+ })
+ })
+ describe('with negative start and negative end', function(){
+ it('begins at `start` offset from the end and includes all elements up to `end` offset from the end', function(){
+ var o = [3, "4", {x:1}, null];
+ var r = sliced(o, -3, -1);
+ assert.equal(2, r.length);
+ assert.equal(o[1], r[0]);
+ assert.equal(o[2], r[1]);
+
+ var r = sliced(o, -3, -3);
+ assert.equal(0, r.length);
+
+ var r = sliced(o, -3, -4);
+ assert.equal(0, r.length);
+ })
+ })
+})
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/package.json
new file mode 100644
index 0000000..87b3422
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/package.json
@@ -0,0 +1,72 @@
+{
+ "name": "mquery",
+ "version": "2.0.0",
+ "description": "Expressive query building for MongoDB",
+ "main": "lib/mquery.js",
+ "scripts": {
+ "test": "mocha test/index.js test/*.test.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/aheckmann/mquery.git"
+ },
+ "dependencies": {
+ "bluebird": "2.10.2",
+ "debug": "2.2.0",
+ "regexp-clone": "0.0.1",
+ "sliced": "0.0.5"
+ },
+ "devDependencies": {
+ "mongodb": "~2.2",
+ "mocha": "1.9.x",
+ "istanbul": "0.3.2"
+ },
+ "bugs": {
+ "url": "https://github.com/aheckmann/mquery/issues/new"
+ },
+ "author": {
+ "name": "Aaron Heckmann",
+ "email": "aaron.heckmann+github@gmail.com"
+ },
+ "license": "MIT",
+ "keywords": [
+ "mongodb",
+ "query",
+ "builder"
+ ],
+ "homepage": "https://github.com/aheckmann/mquery/",
+ "gitHead": "2da32ab0c16efa531dad69a34113424858b6bd97",
+ "_id": "mquery@2.0.0",
+ "_shasum": "b5abc850b90dffc3e10ae49b4b6e7a479752df22",
+ "_from": "mquery@2.0.0",
+ "_npmVersion": "3.9.5",
+ "_nodeVersion": "6.2.2",
+ "_npmUser": {
+ "name": "vkarpov15",
+ "email": "val@karpov.io"
+ },
+ "dist": {
+ "shasum": "b5abc850b90dffc3e10ae49b4b6e7a479752df22",
+ "tarball": "https://registry.npmjs.org/mquery/-/mquery-2.0.0.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "aaron",
+ "email": "aaron.heckmann+github@gmail.com"
+ },
+ {
+ "name": "ebensing",
+ "email": "ebensing38@gmail.com"
+ },
+ {
+ "name": "vkarpov15",
+ "email": "valkar207@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/mquery-2.0.0.tgz_1474848720074_0.5682471790350974"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mquery/-/mquery-2.0.0.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/collection/browser.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/collection/browser.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/collection/browser.js
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/collection/mongo.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/collection/mongo.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/collection/mongo.js
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/collection/node.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/collection/node.js
new file mode 100644
index 0000000..c6ad119
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/collection/node.js
@@ -0,0 +1,28 @@
+
+var assert = require('assert')
+var slice = require('sliced')
+var mongo = require('mongodb')
+var utils = require('../../').utils;
+
+var uri = process.env.MQUERY_URI || 'mongodb://localhost/mquery';
+var db;
+
+exports.getCollection = function (cb) {
+ mongo.MongoClient.connect(uri, function (err, db_) {
+ assert.ifError(err);
+ db = db_;
+
+ var collection = db.collection('stuff');
+
+ // clean test db before starting
+ db.dropDatabase(function () {
+ cb(null, collection);
+ });
+ })
+}
+
+exports.dropCollection = function (cb) {
+ db.dropDatabase(function () {
+ db.close(cb);
+ })
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/env.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/env.js
new file mode 100644
index 0000000..9b9b80b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/env.js
@@ -0,0 +1,20 @@
+
+var assert = require('assert')
+var env = require('../').env;
+
+console.log('environment: %s', env.type);
+
+var col;
+switch (env.type) {
+ case 'node':
+ col = require('./collection/node');
+ break;
+ case 'mongo':
+ col = require('./collection/mongo');
+ case 'browser':
+ col = require('./collection/browser');
+ default:
+ throw new Error('missing collection implementation for environment: ' + env.type);
+}
+
+module.exports = exports = col;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/index.js
new file mode 100644
index 0000000..7c18bf1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/index.js
@@ -0,0 +1,2857 @@
+var mquery = require('../');
+var assert = require('assert');
+
+describe('mquery', function(){
+ var col;
+
+ before(function(done){
+ // get the env specific collection interface
+ require('./env').getCollection(function (err, collection) {
+ assert.ifError(err);
+ col = collection;
+ done();
+ });
+ })
+
+ after(function(done){
+ require('./env').dropCollection(done);
+ })
+
+ describe('mquery', function(){
+ it('is a function', function(){
+ assert.equal('function', typeof mquery);
+ })
+ it('creates instances with the `new` keyword', function(){
+ assert.ok(mquery() instanceof mquery);
+ })
+ describe('defaults', function(){
+ it('are set', function(){
+ var m = mquery();
+ assert.strictEqual(undefined, m.op);
+ assert.deepEqual({}, m.options);
+ })
+ })
+ describe('criteria', function(){
+ it('if collection-like is used as collection', function(){
+ var m = mquery(col);
+ assert.equal(col, m._collection.collection);
+ })
+ it('non-collection-like is used as criteria', function(){
+ var m = mquery({ works: true });
+ assert.ok(!m._collection);
+ assert.deepEqual({ works: true }, m._conditions);
+ })
+ })
+ describe('options', function(){
+ it('are merged when passed', function(){
+ var m = mquery(col, { safe: true });
+ assert.deepEqual({ safe: true }, m.options);
+ var m = mquery({ name: 'mquery' }, { safe: true });
+ assert.deepEqual({ safe: true }, m.options);
+ })
+ })
+ })
+
+ describe('toConstructor', function(){
+ it('creates subclasses of mquery', function(){
+ var opts = { safe: { w: 'majority' }, readPreference: 'p' };
+ var match = { name: 'test', count: { $gt: 101 }};
+ var select = { name: 1, count: 0 }
+ var update = { $set: { x: true }};
+ var path = 'street';
+
+ var q = mquery().setOptions(opts);
+ q.where(match);
+ q.select(select);
+ q.update(update);
+ q.where(path);
+ q.find();
+
+ var M = q.toConstructor();
+ var m = M();
+
+ assert.ok(m instanceof mquery);
+ assert.deepEqual(opts, m.options);
+ assert.deepEqual(match, m._conditions);
+ assert.deepEqual(select, m._fields);
+ assert.deepEqual(update, m._update);
+ assert.equal(path, m._path);
+ assert.equal('find', m.op);
+ })
+ })
+
+ describe('setOptions', function(){
+ it('calls associated methods', function(){
+ var m = mquery();
+ assert.equal(m._collection, null);
+ m.setOptions({ collection: col });
+ assert.equal(m._collection.collection, col);
+ })
+ it('directly sets option when no method exists', function(){
+ var m = mquery();
+ assert.equal(m.options.woot, null);
+ m.setOptions({ woot: 'yay' });
+ assert.equal(m.options.woot, 'yay');
+ })
+ it('is chainable', function(){
+ var m = mquery();
+ var n = m.setOptions();
+ assert.equal(m, n);
+ var n = m.setOptions({ x: 1 });
+ assert.equal(m, n);
+ })
+ })
+
+ describe('collection', function(){
+ it('sets the _collection', function(){
+ var m = mquery();
+ m.collection(col);
+ assert.equal(m._collection.collection, col);
+ })
+ it('is chainable', function(){
+ var m = mquery();
+ var n = m.collection(col);
+ assert.equal(m, n);
+ })
+ })
+
+ describe('$where', function(){
+ it('sets the $where condition', function(){
+ var m = mquery();
+ function go () {}
+ m.$where(go);
+ assert.ok(go === m._conditions.$where);
+ })
+ it('is chainable', function(){
+ var m = mquery();
+ var n = m.$where('x');
+ assert.equal(m, n);
+ })
+ })
+
+ describe('where', function(){
+ it('without arguments', function(){
+ var m = mquery();
+ m.where();
+ assert.deepEqual({}, m._conditions);
+ })
+ it('with non-string/object argument', function(){
+ var m = mquery();
+
+ assert.throws(function(){
+ m.where([]);
+ }, /path must be a string or object/);
+ })
+ describe('with one argument', function(){
+ it('that is an object', function(){
+ var m = mquery();
+ m.where({ name: 'flawed' });
+ assert.strictEqual(m._conditions.name, 'flawed');
+ })
+ it('that is a query', function(){
+ var m = mquery({ name: 'first' });
+ var n = mquery({ name: 'changed' });
+ m.where(n);
+ assert.strictEqual(m._conditions.name, 'changed');
+ })
+ it('that is a string', function(){
+ var m = mquery();
+ m.where('name');
+ assert.equal('name', m._path);
+ assert.strictEqual(m._conditions.name, undefined);
+ })
+ })
+ it('with two arguments', function(){
+ var m = mquery();
+ m.where('name', 'The Great Pumpkin');
+ assert.equal('name', m._path);
+ assert.strictEqual(m._conditions.name, 'The Great Pumpkin');
+ })
+ it('is chainable', function(){
+ var m = mquery();
+ var n = m.where('x', 'y');
+ assert.equal(m, n);
+ var n = m.where()
+ assert.equal(m, n);
+ })
+ })
+ describe('equals', function(){
+ it('must be called after where()', function(){
+ var m = mquery();
+ assert.throws(function () {
+ m.equals();
+ }, /must be used after where/)
+ })
+ it('sets value of path set with where()', function(){
+ var m = mquery();
+ m.where('age').equals(1000);
+ assert.deepEqual({ age: 1000 }, m._conditions);
+ })
+ it('is chainable', function(){
+ var m = mquery();
+ var n = m.where('x').equals(3);
+ assert.equal(m, n);
+ })
+ })
+ describe('eq', function(){
+ it('is alias of equals', function(){
+ var m = mquery();
+ m.where('age').eq(1000);
+ assert.deepEqual({ age: 1000 }, m._conditions);
+ })
+ })
+ describe('or', function(){
+ it('pushes onto the internal $or condition', function(){
+ var m = mquery();
+ m.or({ 'Nightmare Before Christmas': true });
+ assert.deepEqual([{'Nightmare Before Christmas': true }], m._conditions.$or)
+ })
+ it('allows passing arrays', function(){
+ var m = mquery();
+ var arg = [{ 'Nightmare Before Christmas': true }, { x: 1 }];
+ m.or(arg);
+ assert.deepEqual(arg, m._conditions.$or)
+ })
+ it('allows calling multiple times', function(){
+ var m = mquery();
+ var arg = [{ looper: true }, { x: 1 }];
+ m.or(arg);
+ m.or({ y: 1 })
+ m.or([{ w: 'oo' }, { z: 'oo'} ])
+ assert.deepEqual([{looper:true},{x:1},{y:1},{w:'oo'},{z:'oo'}], m._conditions.$or)
+ })
+ it('is chainable', function(){
+ var m = mquery();
+ m.or({ o: "k"}).where('name', 'table');
+ assert.deepEqual({ name: 'table', $or: [{ o: 'k' }] }, m._conditions)
+ })
+ })
+
+ describe('nor', function(){
+ it('pushes onto the internal $nor condition', function(){
+ var m = mquery();
+ m.nor({ 'Nightmare Before Christmas': true });
+ assert.deepEqual([{'Nightmare Before Christmas': true }], m._conditions.$nor)
+ })
+ it('allows passing arrays', function(){
+ var m = mquery();
+ var arg = [{ 'Nightmare Before Christmas': true }, { x: 1 }];
+ m.nor(arg);
+ assert.deepEqual(arg, m._conditions.$nor)
+ })
+ it('allows calling multiple times', function(){
+ var m = mquery();
+ var arg = [{ looper: true }, { x: 1 }];
+ m.nor(arg);
+ m.nor({ y: 1 })
+ m.nor([{ w: 'oo' }, { z: 'oo'} ])
+ assert.deepEqual([{looper:true},{x:1},{y:1},{w:'oo'},{z:'oo'}], m._conditions.$nor)
+ })
+ it('is chainable', function(){
+ var m = mquery();
+ m.nor({ o: "k"}).where('name', 'table');
+ assert.deepEqual({ name: 'table', $nor: [{ o: 'k' }] }, m._conditions)
+ })
+ })
+
+ describe('and', function(){
+ it('pushes onto the internal $and condition', function(){
+ var m = mquery();
+ m.and({ 'Nightmare Before Christmas': true });
+ assert.deepEqual([{'Nightmare Before Christmas': true }], m._conditions.$and)
+ })
+ it('allows passing arrays', function(){
+ var m = mquery();
+ var arg = [{ 'Nightmare Before Christmas': true }, { x: 1 }];
+ m.and(arg);
+ assert.deepEqual(arg, m._conditions.$and)
+ })
+ it('allows calling multiple times', function(){
+ var m = mquery();
+ var arg = [{ looper: true }, { x: 1 }];
+ m.and(arg);
+ m.and({ y: 1 })
+ m.and([{ w: 'oo' }, { z: 'oo'} ])
+ assert.deepEqual([{looper:true},{x:1},{y:1},{w:'oo'},{z:'oo'}], m._conditions.$and)
+ })
+ it('is chainable', function(){
+ var m = mquery();
+ m.and({ o: "k"}).where('name', 'table');
+ assert.deepEqual({ name: 'table', $and: [{ o: 'k' }] }, m._conditions)
+ })
+ })
+
+ function generalCondition (type) {
+ return function () {
+ it('accepts 2 args', function(){
+ var m = mquery()[type]('count', 3);
+ var check = {};
+ check['$' + type] = 3;
+ assert.deepEqual(m._conditions.count, check);
+ })
+ it('uses previously set `where` path if 1 arg passed', function(){
+ var m = mquery().where('count')[type](3);
+ var check = {};
+ check['$' + type] = 3;
+ assert.deepEqual(m._conditions.count, check);
+ })
+ it('throws if 1 arg was passed but no previous `where` was used', function(){
+ assert.throws(function(){
+ mquery()[type](3);
+ }, /must be used after where/);
+ })
+ it('is chainable', function(){
+ var m = mquery().where('count')[type](3).where('x', 8);
+ var check = {x: 8, count: {}};
+ check.count['$' + type] = 3;
+ assert.deepEqual(m._conditions, check);
+ })
+ it('overwrites previous value', function(){
+ var m = mquery().where('count')[type](3)[type](8);
+ var check = {};
+ check['$' + type] = 8;
+ assert.deepEqual(m._conditions.count, check);
+ })
+ }
+ }
+
+ 'gt gte lt lte ne in nin regex size maxDistance minDistance'.split(' ').forEach(function (type) {
+ describe(type, generalCondition(type))
+ })
+
+ describe('mod', function () {
+ describe('with 1 argument', function(){
+ it('requires a previous where()', function(){
+ assert.throws(function () {
+ mquery().mod([30, 10])
+ }, /must be used after where/);
+ })
+ it('works', function(){
+ var m = mquery().where('madmen').mod([10,20]);
+ assert.deepEqual(m._conditions, { madmen: { $mod: [10,20] }})
+ })
+ })
+
+ describe('with 2 arguments and second is non-Array', function(){
+ it('requires a previous where()', function(){
+ assert.throws(function () {
+ mquery().mod('x', 10)
+ }, /must be used after where/);
+ })
+ it('works', function(){
+ var m = mquery().where('madmen').mod(10, 20);
+ assert.deepEqual(m._conditions, { madmen: { $mod: [10,20] }})
+ })
+ })
+
+ it('with 2 arguments and second is an array', function(){
+ var m = mquery().mod('madmen', [10,20]);
+ assert.deepEqual(m._conditions, { madmen: { $mod: [10,20] }})
+ })
+
+ it('with 3 arguments', function(){
+ var m = mquery().mod('madmen', 10, 20);
+ assert.deepEqual(m._conditions, { madmen: { $mod: [10,20] }})
+ })
+
+ it('is chainable', function(){
+ var m = mquery().mod('madmen', 10, 20).where('x', 8);
+ var check = { madmen: { $mod: [10,20] }, x: 8};
+ assert.deepEqual(m._conditions, check);
+ })
+ })
+
+ describe('exists', function(){
+ it('with 0 args', function(){
+ it('throws if not used after where()', function(){
+ assert.throws(function () {
+ mquery().exists()
+ }, /must be used after where/);
+ })
+ it('works', function(){
+ var m = mquery().where('name').exists();
+ var check = { name: { $exists: true }};
+ assert.deepEqual(m._conditions, check);
+ })
+ })
+
+ describe('with 1 arg', function(){
+ describe('that is boolean', function(){
+ it('throws if not used after where()', function(){
+ assert.throws(function () {
+ mquery().exists()
+ }, /must be used after where/);
+ })
+ it('works', function(){
+ var m = mquery().exists('name', false);
+ var check = { name: { $exists: false }};
+ assert.deepEqual(m._conditions, check);
+ })
+ })
+ describe('that is not boolean', function(){
+ it('sets the value to `true`', function(){
+ var m = mquery().where('name').exists('yummy');
+ var check = { yummy: { $exists: true }};
+ assert.deepEqual(m._conditions, check);
+ })
+ })
+ })
+
+ describe('with 2 args', function(){
+ it('works', function(){
+ var m = mquery().exists('yummy', false);
+ var check = { yummy: { $exists: false }};
+ assert.deepEqual(m._conditions, check);
+ })
+ })
+
+ it('is chainable', function(){
+ var m = mquery().where('name').exists().find({ x: 1 });
+ var check = { name: { $exists: true }, x: 1};
+ assert.deepEqual(m._conditions, check);
+ })
+ })
+
+ describe('elemMatch', function(){
+ describe('with null/undefined first argument', function(){
+ assert.throws(function () {
+ mquery().elemMatch();
+ }, /Invalid argument/);
+ assert.throws(function () {
+ mquery().elemMatch(null);
+ }, /Invalid argument/);
+ assert.doesNotThrow(function () {
+ mquery().elemMatch('', {});
+ });
+ })
+
+ describe('with 1 argument', function(){
+ it('throws if not a function or object', function(){
+ assert.throws(function () {
+ mquery().elemMatch([]);
+ }, /Invalid argument/);
+ })
+
+ describe('that is an object', function(){
+ it('throws if no previous `where` was used', function(){
+ assert.throws(function () {
+ mquery().elemMatch({});
+ }, /must be used after where/);
+ })
+ it('works', function(){
+ var m = mquery().where('comment').elemMatch({ author: 'joe', votes: {$gte: 3 }});
+ assert.deepEqual({ comment: { $elemMatch: { author: 'joe', votes: {$gte: 3}}}}, m._conditions);
+ })
+ })
+ describe('that is a function', function(){
+ it('throws if no previous `where` was used', function(){
+ assert.throws(function () {
+ mquery().elemMatch(function(){});
+ }, /must be used after where/);
+ })
+ it('works', function(){
+ var m = mquery().where('comment').elemMatch(function (query) {
+ query.where({ author: 'joe', votes: {$gte: 3 }})
+ });
+ assert.deepEqual({ comment: { $elemMatch: { author: 'joe', votes: {$gte: 3}}}}, m._conditions);
+ })
+ })
+ })
+
+ describe('with 2 arguments', function(){
+ describe('and the 2nd is an object', function(){
+ it('works', function(){
+ var m = mquery().elemMatch('comment', { author: 'joe', votes: {$gte: 3 }});
+ assert.deepEqual({ comment: { $elemMatch: { author: 'joe', votes: {$gte: 3}}}}, m._conditions);
+ })
+ })
+ describe('and the 2nd is a function', function(){
+ it('works', function(){
+ var m = mquery().elemMatch('comment', function (query) {
+ query.where({ author: 'joe', votes: {$gte: 3 }})
+ });
+ assert.deepEqual({ comment: { $elemMatch: { author: 'joe', votes: {$gte: 3}}}}, m._conditions);
+ })
+ })
+ it('and the 2nd is not a function or object', function(){
+ assert.throws(function () {
+ mquery().elemMatch('comment', []);
+ }, /Invalid argument/);
+ })
+ })
+ })
+
+ describe('within', function(){
+ it('is chainable', function(){
+ var m = mquery();
+ assert.equal(m.where('a').within(), m);
+ })
+ describe('when called with arguments', function(){
+ it('must follow where()', function(){
+ assert.throws(function () {
+ mquery().within([]);
+ }, /must be used after where/);
+ })
+
+ describe('of length 1', function(){
+ it('throws if not a recognized shape', function(){
+ assert.throws(function () {
+ mquery().where('loc').within({});
+ }, /Invalid argument/)
+ assert.throws(function () {
+ mquery().where('loc').within(null);
+ }, /Invalid argument/)
+ })
+ it('delegates to circle when center exists', function(){
+ var m = mquery().where('loc').within({ center: [10,10], radius: 3 });
+ assert.deepEqual({ $geoWithin: {$center:[[10,10], 3]}}, m._conditions.loc);
+ })
+ it('delegates to box when exists', function(){
+ var m = mquery().where('loc').within({ box: [[10,10], [11,14]] });
+ assert.deepEqual({ $geoWithin: {$box:[[10,10], [11,14]]}}, m._conditions.loc);
+ })
+ it('delegates to polygon when exists', function(){
+ var m = mquery().where('loc').within({ polygon: [[10,10], [11,14],[10,9]] });
+ assert.deepEqual({ $geoWithin: {$polygon:[[10,10], [11,14],[10,9]]}}, m._conditions.loc);
+ })
+ it('delegates to geometry when exists', function(){
+ var m = mquery().where('loc').within({ type: 'Polygon', coordinates: [[10,10], [11,14],[10,9]] });
+ assert.deepEqual({ $geoWithin: {$geometry: {type:'Polygon', coordinates: [[10,10], [11,14],[10,9]]}}}, m._conditions.loc);
+ })
+ })
+
+ describe('of length 2', function(){
+ it('delegates to box()', function(){
+ var m = mquery().where('loc').within([1,2],[2,5]);
+ assert.deepEqual(m._conditions.loc, { $geoWithin: { $box: [[1,2],[2,5]]}});
+ })
+ })
+
+ describe('of length > 2', function(){
+ it('delegates to polygon()', function(){
+ var m = mquery().where('loc').within([1,2],[2,5],[2,4],[1,3]);
+ assert.deepEqual(m._conditions.loc, { $geoWithin: { $polygon: [[1,2],[2,5],[2,4],[1,3]]}});
+ })
+ })
+ })
+ })
+
+ describe('geoWithin', function(){
+ before(function(){
+ mquery.use$geoWithin = false;
+ })
+ after(function(){
+ mquery.use$geoWithin = true;
+ })
+ describe('when called with arguments', function(){
+ describe('of length 1', function(){
+ it('delegates to circle when center exists', function(){
+ var m = mquery().where('loc').within({ center: [10,10], radius: 3 });
+ assert.deepEqual({ $within: {$center:[[10,10], 3]}}, m._conditions.loc);
+ })
+ it('delegates to box when exists', function(){
+ var m = mquery().where('loc').within({ box: [[10,10], [11,14]] });
+ assert.deepEqual({ $within: {$box:[[10,10], [11,14]]}}, m._conditions.loc);
+ })
+ it('delegates to polygon when exists', function(){
+ var m = mquery().where('loc').within({ polygon: [[10,10], [11,14],[10,9]] });
+ assert.deepEqual({ $within: {$polygon:[[10,10], [11,14],[10,9]]}}, m._conditions.loc);
+ })
+ it('delegates to geometry when exists', function(){
+ var m = mquery().where('loc').within({ type: 'Polygon', coordinates: [[10,10], [11,14],[10,9]] });
+ assert.deepEqual({ $within: {$geometry: {type:'Polygon', coordinates: [[10,10], [11,14],[10,9]]}}}, m._conditions.loc);
+ })
+ })
+
+ describe('of length 2', function(){
+ it('delegates to box()', function(){
+ var m = mquery().where('loc').within([1,2],[2,5]);
+ assert.deepEqual(m._conditions.loc, { $within: { $box: [[1,2],[2,5]]}});
+ })
+ })
+
+ describe('of length > 2', function(){
+ it('delegates to polygon()', function(){
+ var m = mquery().where('loc').within([1,2],[2,5],[2,4],[1,3]);
+ assert.deepEqual(m._conditions.loc, { $within: { $polygon: [[1,2],[2,5],[2,4],[1,3]]}});
+ })
+ })
+ })
+ })
+
+ describe('box', function(){
+ describe('with 1 argument', function(){
+ it('throws', function(){
+ assert.throws(function () {
+ mquery().box('sometihng');
+ }, /Invalid argument/);
+ })
+ })
+ describe('with > 3 arguments', function(){
+ it('throws', function(){
+ assert.throws(function () {
+ mquery().box(1,2,3,4);
+ }, /Invalid argument/);
+ })
+ })
+
+ describe('with 2 arguments', function(){
+ it('throws if not used after where()', function(){
+ assert.throws(function () {
+ mquery().box([],[]);
+ }, /must be used after where/);
+ })
+ it('works', function(){
+ var m = mquery().where('loc').box([1,2],[3,4]);
+ assert.deepEqual(m._conditions.loc, { $geoWithin: { $box: [[1,2],[3,4]] }});
+ })
+ })
+
+ describe('with 3 arguments', function(){
+ it('works', function(){
+ var m = mquery().box('loc', [1,2],[3,4]);
+ assert.deepEqual(m._conditions.loc, { $geoWithin: { $box: [[1,2],[3,4]] }});
+ })
+ })
+ })
+
+ describe('polygon', function(){
+ describe('when first argument is not a string', function(){
+ it('throws if not used after where()', function(){
+ assert.throws(function () {
+ mquery().polygon({});
+ }, /must be used after where/);
+
+ assert.doesNotThrow(function () {
+ mquery().where('loc').polygon([1,2], [2,3], [3,6]);
+ });
+ })
+
+ it('assigns arguments to within polygon condition', function(){
+ var m = mquery().where('loc').polygon([1,2], [2,3], [3,6]);
+ assert.deepEqual(m._conditions, { loc: {$geoWithin: {$polygon: [[1,2],[2,3],[3,6]]}} });
+ })
+ })
+
+ describe('when first arg is a string', function(){
+ it('assigns remaining arguments to within polygon condition', function(){
+ var m = mquery().polygon('loc', [1,2], [2,3], [3,6]);
+ assert.deepEqual(m._conditions, { loc: {$geoWithin: {$polygon: [[1,2],[2,3],[3,6]]}} });
+ })
+ })
+ })
+
+ describe('circle', function(){
+ describe('with one arg', function(){
+ it('must follow where()', function(){
+ assert.throws(function () {
+ mquery().circle('x');
+ }, /must be used after where/);
+ assert.doesNotThrow(function () {
+ mquery().where('loc').circle({center:[0,0], radius: 3 });
+ });
+ })
+ it('works', function(){
+ var m = mquery().where('loc').circle({center:[0,0], radius: 3 });
+ assert.deepEqual(m._conditions, { loc: { $geoWithin: {$center: [[0,0],3] }}});
+ })
+ })
+ describe('with 3 args', function(){
+ it('throws', function(){
+ assert.throws(function () {
+ mquery().where('loc').circle(1,2,3);
+ }, /Invalid argument/);
+ })
+ })
+ describe('requires radius and center', function(){
+ assert.throws(function () {
+ mquery().circle('loc', { center: 1 });
+ }, /center and radius are required/);
+ assert.throws(function () {
+ mquery().circle('loc', { radius: 1 });
+ }, /center and radius are required/);
+ assert.doesNotThrow(function () {
+ mquery().circle('loc', { center: [1,2], radius: 1 });
+ });
+ })
+ })
+
+ describe('geometry', function(){
+ // within + intersects
+ var point = { type: 'Point', coordinates: [[0,0],[1,1]] };
+
+ it('must be called after within or intersects', function(done){
+ assert.throws(function () {
+ mquery().where('a').geometry(point);
+ }, /must come after/);
+
+ assert.doesNotThrow(function () {
+ mquery().where('a').within().geometry(point);
+ });
+
+ assert.doesNotThrow(function () {
+ mquery().where('a').intersects().geometry(point);
+ });
+
+ done();
+ })
+
+ describe('when called with one argument', function(){
+ describe('after within()', function(){
+ it('and arg quacks like geoJSON', function(done){
+ var m = mquery().where('a').within().geometry(point);
+ assert.deepEqual({ a: { $geoWithin: { $geometry: point }}}, m._conditions);
+ done();
+ })
+ })
+
+ describe('after intersects()', function(){
+ it('and arg quacks like geoJSON', function(done){
+ var m = mquery().where('a').intersects().geometry(point);
+ assert.deepEqual({ a: { $geoIntersects: { $geometry: point }}}, m._conditions);
+ done();
+ })
+ })
+
+ it('and arg does not quack like geoJSON', function(done){
+ assert.throws(function () {
+ mquery().where('b').within().geometry({type:1, coordinates:2});
+ }, /Invalid argument/);
+ done();
+ })
+ })
+
+ describe('when called with zero arguments', function(){
+ it('throws', function(done){
+ assert.throws(function () {
+ mquery().where('a').within().geometry();
+ }, /Invalid argument/);
+
+ done();
+ })
+ })
+
+ describe('when called with more than one arguments', function(){
+ it('throws', function(done){
+ assert.throws(function () {
+ mquery().where('a').within().geometry({type:'a',coordinates:[]}, 2);
+ }, /Invalid argument/);
+ done();
+ })
+ })
+ })
+
+ describe('intersects', function(){
+ it('must be used after where()', function(done){
+ var m = mquery();
+ assert.throws(function () {
+ m.intersects();
+ }, /must be used after where/)
+ done();
+ })
+
+ it('sets geo comparison to "$intersects"', function(done){
+ var n = mquery().where('a').intersects();
+ assert.equal('$geoIntersects', n._geoComparison);
+ done();
+ })
+
+ it('is chainable', function(){
+ var m = mquery();
+ assert.equal(m.where('a').intersects(), m);
+ })
+
+ it('calls geometry if argument quacks like geojson', function(done){
+ var m = mquery();
+ var o = { type: 'LineString', coordinates: [[0,1],[3,40]] };
+ var ran = false;
+
+ m.geometry = function (arg) {
+ ran = true;
+ assert.deepEqual(o, arg);
+ }
+
+ m.where('a').intersects(o);
+ assert.ok(ran);
+
+ done();
+ })
+
+ it('throws if argument is not geometry-like', function(done){
+ var m = mquery().where('a');
+
+ assert.throws(function () {
+ m.intersects(null);
+ }, /Invalid argument/);
+
+ assert.throws(function () {
+ m.intersects(undefined);
+ }, /Invalid argument/);
+
+ assert.throws(function () {
+ m.intersects(false);
+ }, /Invalid argument/);
+
+ assert.throws(function () {
+ m.intersects({});
+ }, /Invalid argument/);
+
+ assert.throws(function () {
+ m.intersects([]);
+ }, /Invalid argument/);
+
+ assert.throws(function () {
+ m.intersects(function(){});
+ }, /Invalid argument/);
+
+ assert.throws(function () {
+ m.intersects(NaN);
+ }, /Invalid argument/);
+
+ done();
+ })
+ })
+
+ describe('near', function(){
+ // near nearSphere
+ describe('with 0 args', function(){
+ it('is compatible with geometry()', function(done){
+ var q = mquery().where('x').near().geometry({ type: 'Point', coordinates: [180, 11] });
+ assert.deepEqual({ $near: {$geometry: {type:'Point', coordinates: [180,11]}}}, q._conditions.x);
+ done();
+ })
+ })
+
+ describe('with 1 arg', function(){
+ it('throws if not used after where()', function(){
+ assert.throws(function () {
+ mquery().near(1);
+ }, /must be used after where/)
+ })
+ it('does not throw if used after where()', function(){
+ assert.doesNotThrow(function () {
+ mquery().where('loc').near({center:[1,1]});
+ })
+ })
+ })
+ describe('with > 2 args', function(){
+ it('throws', function(){
+ assert.throws(function () {
+ mquery().near(1,2,3);
+ }, /Invalid argument/)
+ })
+ })
+
+ it('creates $geometry args for GeoJSON', function(){
+ var m = mquery().where('loc').near({ center: { type: 'Point', coordinates: [10,10] }});
+ assert.deepEqual({ $near: {$geometry: {type:'Point', coordinates: [10,10]}}}, m._conditions.loc);
+ })
+
+ it('expects `center`', function(){
+ assert.throws(function () {
+ mquery().near('loc', { maxDistance: 3 });
+ }, /center is required/)
+ assert.doesNotThrow(function () {
+ mquery().near('loc', { center: [3,4] });
+ })
+ })
+
+ it('accepts spherical conditions', function(){
+ var m = mquery().where('loc').near({ center: [1,2], spherical: true });
+ assert.deepEqual(m._conditions, { loc: { $nearSphere: [1,2]}});
+ })
+
+ it('is non-spherical by default', function(){
+ var m = mquery().where('loc').near({ center: [1,2] });
+ assert.deepEqual(m._conditions, { loc: { $near: [1,2]}});
+ })
+
+ it('supports maxDistance', function(){
+ var m = mquery().where('loc').near({ center: [1,2], maxDistance:4 });
+ assert.deepEqual(m._conditions, { loc: { $near: [1,2], $maxDistance: 4}});
+ })
+
+ it('supports minDistance', function(){
+ var m = mquery().where('loc').near({ center: [1,2], minDistance:4 });
+ assert.deepEqual(m._conditions, { loc: { $near: [1,2], $minDistance: 4}});
+ })
+
+ it('is chainable', function(){
+ var m = mquery().where('loc').near({ center: [1,2], maxDistance:4 }).find({ x: 1 });
+ assert.deepEqual(m._conditions, { loc: { $near: [1,2], $maxDistance: 4}, x: 1});
+ })
+
+ describe('supports passing GeoJSON, gh-13', function(){
+ it('with center', function(){
+ var m = mquery().where('loc').near({
+ center: { type: 'Point', coordinates: [1,1] }
+ , maxDistance: 2
+ });
+
+ var expect = {
+ loc: {
+ $near: {
+ $geometry: {
+ type: 'Point'
+ , coordinates : [1,1]
+ }
+ , $maxDistance : 2
+ }
+ }
+ }
+
+ assert.deepEqual(m._conditions, expect);
+ })
+ })
+ })
+
+ // fields
+
+ describe('select', function(){
+ describe('with 0 args', function(){
+ it('is chainable', function(){
+ var m = mquery()
+ assert.equal(m, m.select());
+ })
+ })
+
+ it('accepts an object', function(){
+ var o = { x: 1, y: 1 }
+ var m = mquery().select(o);
+ assert.deepEqual(m._fields, o);
+ })
+
+ it('accepts a string', function(){
+ var o = 'x -y';
+ var m = mquery().select(o);
+ assert.deepEqual(m._fields, { x: 1, y: 0 });
+ })
+
+ it('does not accept an array', function(done){
+ assert.throws(function () {
+ var o = ['x', '-y'];
+ var m = mquery().select(o);
+ }, /Invalid select/);
+ done();
+ })
+
+ it('merges previous arguments', function(){
+ var o = { x: 1, y: 0, a: 1 }
+ var m = mquery().select(o);
+ m.select('z -u w').select({ x: 0 })
+ assert.deepEqual(m._fields, {
+ x: 0
+ , y: 0
+ , z: 1
+ , u: 0
+ , w: 1
+ , a: 1
+ });
+ })
+
+ it('rejects non-string, object, arrays', function(){
+ assert.throws(function () {
+ mquery().select(function(){});
+ }, /Invalid select\(\) argument/);
+ })
+
+ it('accepts arguments objects', function(){
+ var m = mquery();
+ function t () {
+ m.select(arguments);
+ assert.deepEqual(m._fields, { x: 1, y: 0 });
+ }
+ t('x', '-y');
+ })
+
+ noDistinct('select');
+ })
+
+ describe('selected', function() {
+ it('returns true when fields have been selected', function(done) {
+ var m = mquery().select({ name: 1 });
+ assert.ok(m.selected());
+
+ var m = mquery().select('name');
+ assert.ok(m.selected());
+
+ done();
+ });
+
+ it('returns false when no fields have been selected', function(done) {
+ var m = mquery();
+ assert.strictEqual(false, m.selected());
+ done();
+ });
+ });
+
+ describe('selectedInclusively', function() {
+ describe('returns false', function(){
+ it('when no fields have been selected', function(done) {
+ assert.strictEqual(false, mquery().selectedInclusively());
+ assert.equal(false, mquery().select({}).selectedInclusively());
+ done();
+ });
+ it('when any fields have been excluded', function(done) {
+ assert.strictEqual(false, mquery().select('-name').selectedInclusively());
+ assert.strictEqual(false, mquery().select({ name: 0 }).selectedInclusively());
+ assert.strictEqual(false, mquery().select('name bio -_id').selectedInclusively());
+ assert.strictEqual(false, mquery().select({ name: 1, _id: 0 }).selectedInclusively());
+ done();
+ });
+ it('when using $meta', function(done) {
+ assert.strictEqual(false, mquery().select({ name: { $meta: 'textScore' } }).selectedInclusively());
+ done();
+ });
+ });
+
+ describe('returns true', function() {
+ it('when fields have been included', function(done) {
+ assert.equal(true, mquery().select('name').selectedInclusively());
+ assert.equal(true, mquery().select({ name:1 }).selectedInclusively());
+ done();
+ });
+ });
+ });
+
+ describe('selectedExclusively', function() {
+ describe('returns false', function(){
+ it('when no fields have been selected', function(done) {
+ assert.equal(false, mquery().selectedExclusively());
+ assert.equal(false, mquery().select({}).selectedExclusively());
+ done();
+ });
+ it('when fields have only been included', function(done) {
+ assert.equal(false, mquery().select('name').selectedExclusively());
+ assert.equal(false, mquery().select({ name: 1 }).selectedExclusively());
+ done();
+ });
+ });
+
+ describe('returns true', function() {
+ it('when any field has been excluded', function(done) {
+ assert.equal(true, mquery().select('-name').selectedExclusively());
+ assert.equal(true, mquery().select({ name:0 }).selectedExclusively());
+ assert.equal(true, mquery().select('-_id').selectedExclusively());
+ assert.strictEqual(true, mquery().select('name bio -_id').selectedExclusively());
+ assert.strictEqual(true, mquery().select({ name: 1, _id: 0 }).selectedExclusively());
+ done();
+ });
+ });
+ });
+
+ describe('slice', function(){
+ describe('with 0 args', function(){
+ it('is chainable', function(){
+ var m = mquery()
+ assert.equal(m, m.slice());
+ })
+ it('is a noop', function(){
+ var m = mquery().slice();
+ assert.deepEqual(m._fields, undefined);
+ })
+ })
+
+ describe('with 1 arg', function(){
+ it('throws if not called after where()', function(){
+ assert.throws(function () {
+ mquery().slice(1);
+ }, /must be used after where/);
+ assert.doesNotThrow(function () {
+ mquery().where('a').slice(1);
+ });
+ })
+ it('that is a number', function(){
+ var query = mquery();
+ query.where('collection').slice(5);
+ assert.deepEqual(query._fields, {collection: {$slice: 5}});
+ })
+ it('that is an array', function(){
+ var query = mquery();
+ query.where('collection').slice([5,10]);
+ assert.deepEqual(query._fields, {collection: {$slice: [5,10]}});
+ })
+ it('that is an object', function() {
+ var query = mquery();
+ query.slice({ collection: [5, 10] });
+ assert.deepEqual(query._fields, {collection: {$slice: [5,10]}});
+ })
+ })
+
+ describe('with 2 args', function(){
+ describe('and first is a number', function(){
+ it('throws if not called after where', function(){
+ assert.throws(function () {
+ mquery().slice(2,3);
+ }, /must be used after where/);
+ })
+ it('does not throw if used after where', function(){
+ var query = mquery();
+ query.where('collection').slice(2,3);
+ assert.deepEqual(query._fields, {collection: {$slice: [2,3]}});
+ })
+ })
+ it('and first is not a number', function(){
+ var query = mquery().slice('collection', [-5, 2]);
+ assert.deepEqual(query._fields, {collection: {$slice: [-5,2]}});
+ })
+ })
+
+ describe('with 3 args', function(){
+ it('works', function(){
+ var query = mquery();
+ query.slice('collection', 14, 10);
+ assert.deepEqual(query._fields, {collection: {$slice: [14, 10]}});
+ })
+ })
+
+ noDistinct('slice');
+ no('count', 'slice');
+ })
+
+ // options
+
+ describe('sort', function(){
+ describe('with 0 args', function(){
+ it('chains', function(){
+ var m = mquery();
+ assert.equal(m, m.sort());
+ })
+ it('has no affect', function(){
+ var m = mquery();
+ assert.equal(m.options.sort, undefined);
+ })
+ });
+
+ it('works', function(){
+ var query = mquery();
+ query.sort('a -c b');
+ assert.deepEqual(query.options.sort, { a : 1, b: 1, c : -1});
+
+ query = mquery();
+ query.sort({'a': 1, 'c': -1, 'b': 'asc', e: 'descending', f: 'ascending'});
+ assert.deepEqual(query.options.sort, {'a': 1, 'c': -1, 'b': 1, 'e': -1, 'f': 1});
+
+ query = mquery();
+ var e= undefined;
+
+ e= undefined;
+ try {
+ query.sort('a', 1, 'c', -1, 'b', 1);
+ } catch (err) {
+ e= err;
+ }
+ assert.ok(e, 'uh oh. no error was thrown');
+ assert.equal(e.message, 'Invalid sort() argument. Must be a string, object, or array.');
+ });
+
+ it('handles $meta sort options', function(){
+ var query = mquery();
+ query.sort({ score: { $meta : "textScore" } });
+ assert.deepEqual(query.options.sort, { score : { $meta : "textScore" } });
+ });
+
+ it('array syntax', function(){
+ var query = mquery();
+ query.sort([['field', 1], ['test', -1]]);
+ assert.deepEqual(query.options.sort, [['field', 1], ['test', -1]]);
+ });
+
+ it('throws with mixed array/object syntax', function(){
+ var query = mquery();
+ assert.throws(function() {
+ query.sort({ field: 1 }).sort([['test', -1]]);
+ }, /Can't mix sort syntaxes/);
+ assert.throws(function() {
+ query.sort([['field', 1]]).sort({ test: 1 });
+ }, /Can't mix sort syntaxes/);
+ });
+ })
+
+ function simpleOption (type, options) {
+ describe(type, function(){
+ it('sets the ' + type + ' option', function(){
+ var m = mquery()[type](2);
+ var optionName = options.name || type;
+ assert.equal(2, m.options[optionName]);
+ })
+ it('is chainable', function(){
+ var m = mquery();
+ assert.equal(m[type](3), m);
+ })
+
+ if (!options.distinct) noDistinct(type);
+ if (!options.count) no('count', type);
+ })
+ }
+
+ var negated = {
+ limit: {distinct: false, count: true}
+ , skip: {distinct: false, count: true}
+ , maxScan: {distinct: false, count: false}
+ , batchSize: {distinct: false, count: false}
+ , maxTime: {distinct: true, count: true, name: 'maxTimeMS' }
+ , comment: {distinct: false, count: false}
+ };
+ Object.keys(negated).forEach(function (key) {
+ simpleOption(key, negated[key]);
+ })
+
+ describe('snapshot', function(){
+ it('works', function(){
+ var query = mquery();
+ query.snapshot();
+ assert.equal(true, query.options.snapshot);
+
+ var query = mquery()
+ query.snapshot(true);
+ assert.equal(true, query.options.snapshot);
+
+ var query = mquery()
+ query.snapshot(false);
+ assert.equal(false, query.options.snapshot);
+ })
+ noDistinct('snapshot');
+ no('count', 'snapshot');
+ })
+
+ describe('hint', function(){
+ it('accepts an object', function(){
+ var query2 = mquery();
+ query2.hint({'a': 1, 'b': -1});
+ assert.deepEqual(query2.options.hint, {'a': 1, 'b': -1});
+ })
+
+ it('rejects everything else', function(){
+ assert.throws(function(){
+ mquery().hint('c');
+ }, /Invalid hint./);
+ assert.throws(function(){
+ mquery().hint(['c']);
+ }, /Invalid hint./);
+ assert.throws(function(){
+ mquery().hint(1);
+ }, /Invalid hint./);
+ })
+
+ describe('does not have side affects', function(){
+ it('on invalid arg', function(){
+ var m = mquery();
+ try {
+ m.hint(1);
+ } catch (err) {
+ // ignore
+ }
+ assert.equal(undefined, m.options.hint);
+ })
+ it('on missing arg', function(){
+ var m = mquery().hint();
+ assert.equal(undefined, m.options.hint);
+ })
+ })
+
+ noDistinct('hint');
+ })
+
+ describe('slaveOk', function(){
+ it('works', function(){
+ var query = mquery();
+ query.slaveOk();
+ assert.equal(true, query.options.slaveOk);
+
+ var query = mquery()
+ query.slaveOk(true);
+ assert.equal(true, query.options.slaveOk);
+
+ var query = mquery()
+ query.slaveOk(false);
+ assert.equal(false, query.options.slaveOk);
+ })
+ })
+
+ describe('read', function(){
+ it('sets associated readPreference option', function(){
+ var m = mquery();
+ m.read('p');
+ assert.equal('primary', m.options.readPreference);
+ })
+ it('is chainable', function(){
+ var m = mquery();
+ assert.equal(m, m.read('sp'));
+ })
+ })
+
+ describe('tailable', function(){
+ it('works', function(){
+ var query = mquery();
+ query.tailable();
+ assert.equal(true, query.options.tailable);
+
+ var query = mquery()
+ query.tailable(true);
+ assert.equal(true, query.options.tailable);
+
+ var query = mquery()
+ query.tailable(false);
+ assert.equal(false, query.options.tailable);
+ })
+ it('is chainable', function(){
+ var m = mquery();
+ assert.equal(m, m.tailable());
+ })
+ noDistinct('tailable');
+ no('count', 'tailable');
+ })
+
+ // query utilities
+
+ describe('merge', function(){
+ describe('with falsy arg', function(){
+ it('returns itself', function(){
+ var m = mquery();
+ assert.equal(m, m.merge());
+ assert.equal(m, m.merge(null));
+ assert.equal(m, m.merge(0));
+ })
+ })
+ describe('with an argument', function(){
+ describe('that is not a query or plain object', function(){
+ it('throws', function(){
+ assert.throws(function () {
+ mquery().merge([]);
+ }, /Invalid argument/);
+ assert.throws(function () {
+ mquery().merge('merge');
+ }, /Invalid argument/);
+ assert.doesNotThrow(function () {
+ mquery().merge({});
+ }, /Invalid argument/);
+ })
+ })
+
+ describe('that is a query', function(){
+ it('merges conditions, field selection, and options', function(){
+ var m = mquery({ x: 'hi' }, { select: 'x y', another: true })
+ var n = mquery().merge(m);
+ assert.deepEqual(n._conditions, m._conditions);
+ assert.deepEqual(n._fields, m._fields);
+ assert.deepEqual(n.options, m.options);
+ })
+ it('clones update arguments', function(done){
+ var original = { $set: { iTerm: true }}
+ var m = mquery().update(original);
+ var n = mquery().merge(m);
+ m.update({ $set: { x: 2 }})
+ assert.notDeepEqual(m._update, n._update);
+ done();
+ })
+ it('is chainable', function(){
+ var m = mquery({ x: 'hi' });
+ var n = mquery();
+ assert.equal(n, n.merge(m));
+ })
+ })
+
+ describe('that is an object', function(){
+ it('merges', function(){
+ var m = { x: 'hi' };
+ var n = mquery().merge(m);
+ assert.deepEqual(n._conditions, { x: 'hi' });
+ })
+ it('clones update arguments', function(done){
+ var original = { $set: { iTerm: true }}
+ var m = mquery().update(original);
+ var n = mquery().merge(original);
+ m.update({ $set: { x: 2 }})
+ assert.notDeepEqual(m._update, n._update);
+ done();
+ })
+ it('is chainable', function(){
+ var m = { x: 'hi' };
+ var n = mquery();
+ assert.equal(n, n.merge(m));
+ })
+ })
+ })
+ })
+
+ // queries
+
+ describe('find', function(){
+ describe('with no callback', function(){
+ it('does not execute', function(){
+ var m = mquery();
+ assert.doesNotThrow(function () {
+ m.find()
+ })
+ assert.doesNotThrow(function () {
+ m.find({ x: 1 })
+ })
+ })
+ })
+
+ it('is chainable', function(){
+ var m = mquery().find({ x: 1 }).find().find({ y: 2 });
+ assert.deepEqual(m._conditions, {x:1,y:2});
+ })
+
+ it('merges other queries', function(){
+ var m = mquery({ name: 'mquery' });
+ m.tailable();
+ m.select('_id');
+ var a = mquery().find(m);
+ assert.deepEqual(a._conditions, m._conditions);
+ assert.deepEqual(a.options, m.options);
+ assert.deepEqual(a._fields, m._fields);
+ })
+
+ describe('executes', function(){
+ before(function (done) {
+ col.insert({ name: 'mquery' }, { safe: true }, done);
+ });
+
+ after(function(done){
+ col.remove({ name: 'mquery' }, done);
+ })
+
+ it('when criteria is passed with a callback', function(done){
+ mquery(col).find({ name: 'mquery' }, function (err, docs) {
+ assert.ifError(err);
+ assert.equal(1, docs.length);
+ done();
+ })
+ })
+ it('when Query is passed with a callback', function(done){
+ var m = mquery({ name: 'mquery' });
+ mquery(col).find(m, function (err, docs) {
+ assert.ifError(err);
+ assert.equal(1, docs.length);
+ done();
+ })
+ })
+ it('when just a callback is passed', function(done){
+ mquery({ name: 'mquery' }).collection(col).find(function (err, docs) {
+ assert.ifError(err);
+ assert.equal(1, docs.length);
+ done();
+ });
+ })
+ })
+ })
+
+ describe('findOne', function(){
+ describe('with no callback', function(){
+ it('does not execute', function(){
+ var m = mquery();
+ assert.doesNotThrow(function () {
+ m.findOne()
+ })
+ assert.doesNotThrow(function () {
+ m.findOne({ x: 1 })
+ })
+ })
+ })
+
+ it('is chainable', function(){
+ var m = mquery();
+ var n = m.findOne({ x: 1 }).findOne().findOne({ y: 2 });
+ assert.equal(m, n);
+ assert.deepEqual(m._conditions, {x:1,y:2});
+ assert.equal('findOne', m.op);
+ })
+
+ it('merges other queries', function(){
+ var m = mquery({ name: 'mquery' });
+ m.read('nearest');
+ m.select('_id');
+ var a = mquery().findOne(m);
+ assert.deepEqual(a._conditions, m._conditions);
+ assert.deepEqual(a.options, m.options);
+ assert.deepEqual(a._fields, m._fields);
+ })
+
+ describe('executes', function(){
+ before(function (done) {
+ col.insert({ name: 'mquery findone' }, { safe: true }, done);
+ });
+
+ after(function(done){
+ col.remove({ name: 'mquery findone' }, done);
+ })
+
+ it('when criteria is passed with a callback', function(done){
+ mquery(col).findOne({ name: 'mquery findone' }, function (err, doc) {
+ assert.ifError(err);
+ assert.ok(doc);
+ assert.equal('mquery findone', doc.name);
+ done();
+ })
+ })
+ it('when Query is passed with a callback', function(done){
+ var m = mquery(col).where({ name: 'mquery findone' });
+ mquery(col).findOne(m, function (err, doc) {
+ assert.ifError(err);
+ assert.ok(doc);
+ assert.equal('mquery findone', doc.name);
+ done();
+ })
+ })
+ it('when just a callback is passed', function(done){
+ mquery({ name: 'mquery findone' }).collection(col).findOne(function (err, doc) {
+ assert.ifError(err);
+ assert.ok(doc);
+ assert.equal('mquery findone', doc.name);
+ done();
+ });
+ })
+ })
+ })
+
+ describe('count', function(){
+ describe('with no callback', function(){
+ it('does not execute', function(){
+ var m = mquery();
+ assert.doesNotThrow(function () {
+ m.count()
+ })
+ assert.doesNotThrow(function () {
+ m.count({ x: 1 })
+ })
+ })
+ })
+
+ it('is chainable', function(){
+ var m = mquery();
+ var n = m.count({ x: 1 }).count().count({ y: 2 });
+ assert.equal(m, n);
+ assert.deepEqual(m._conditions, {x:1,y:2});
+ assert.equal('count', m.op);
+ })
+
+ it('merges other queries', function(){
+ var m = mquery({ name: 'mquery' });
+ m.read('nearest');
+ m.select('_id');
+ var a = mquery().count(m);
+ assert.deepEqual(a._conditions, m._conditions);
+ assert.deepEqual(a.options, m.options);
+ assert.deepEqual(a._fields, m._fields);
+ })
+
+ describe('executes', function(){
+ before(function (done) {
+ col.insert({ name: 'mquery count' }, { safe: true }, done);
+ });
+
+ after(function(done){
+ col.remove({ name: 'mquery count' }, done);
+ })
+
+ it('when criteria is passed with a callback', function(done){
+ mquery(col).count({ name: 'mquery count' }, function (err, count) {
+ assert.ifError(err);
+ assert.ok(count);
+ assert.ok(1 === count);
+ done();
+ })
+ })
+ it('when Query is passed with a callback', function(done){
+ var m = mquery({ name: 'mquery count' });
+ mquery(col).count(m, function (err, count) {
+ assert.ifError(err);
+ assert.ok(count);
+ assert.ok(1 === count);
+ done();
+ })
+ })
+ it('when just a callback is passed', function(done){
+ mquery({ name: 'mquery count' }).collection(col).count(function (err, count) {
+ assert.ifError(err);
+ assert.ok(1 === count);
+ done();
+ });
+ })
+ })
+
+ describe('validates its option', function(){
+ it('sort', function(done){
+ assert.doesNotThrow(function(){
+ var m = mquery().sort('x').count();
+ });
+ done();
+ })
+
+ it('select', function(done){
+ assert.throws(function(){
+ var m = mquery().select('x').count();
+ }, /field selection and slice cannot be used with count/);
+ done();
+ })
+
+ it('slice', function(done){
+ assert.throws(function(){
+ var m = mquery().where('x').slice(-3).count();
+ }, /field selection and slice cannot be used with count/);
+ done();
+ })
+
+ it('limit', function(done){
+ assert.doesNotThrow(function(){
+ var m = mquery().limit(3).count();
+ })
+ done();
+ })
+
+ it('skip', function(done){
+ assert.doesNotThrow(function(){
+ var m = mquery().skip(3).count();
+ })
+ done();
+ })
+
+ it('batchSize', function(done){
+ assert.throws(function(){
+ var m = mquery({}, { batchSize: 3 }).count();
+ }, /batchSize cannot be used with count/);
+ done();
+ })
+
+ it('comment', function(done){
+ assert.throws(function(){
+ var m = mquery().comment('mquery').count();
+ }, /comment cannot be used with count/);
+ done();
+ })
+
+ it('maxScan', function(done){
+ assert.throws(function(){
+ var m = mquery().maxScan(300).count();
+ }, /maxScan cannot be used with count/);
+ done();
+ })
+
+ it('snapshot', function(done){
+ assert.throws(function(){
+ var m = mquery().snapshot().count();
+ }, /snapshot cannot be used with count/);
+ done();
+ })
+
+ it('tailable', function(done){
+ assert.throws(function(){
+ var m = mquery().tailable().count();
+ }, /tailable cannot be used with count/);
+ done();
+ })
+ })
+ })
+
+ describe('distinct', function(){
+ describe('with no callback', function(){
+ it('does not execute', function(){
+ var m = mquery();
+ assert.doesNotThrow(function () {
+ m.distinct()
+ })
+ assert.doesNotThrow(function () {
+ m.distinct('name')
+ })
+ assert.doesNotThrow(function () {
+ m.distinct({ name: 'mquery distinct' })
+ })
+ assert.doesNotThrow(function () {
+ m.distinct({ name: 'mquery distinct' }, 'name')
+ })
+ })
+ })
+
+ it('is chainable', function(){
+ var m = mquery({x:1}).distinct('name');
+ var n = m.distinct({y:2});
+ assert.equal(m, n);
+ assert.deepEqual(n._conditions, {x:1, y:2});
+ assert.equal('name', n._distinct);
+ assert.equal('distinct', n.op);
+ });
+
+ it('overwrites field', function(){
+ var m = mquery({ name: 'mquery' }).distinct('name');
+ m.distinct('rename');
+ assert.equal(m._distinct, 'rename');
+ m.distinct({x:1}, 'renamed');
+ assert.equal(m._distinct, 'renamed');
+ })
+
+ it('merges other queries', function(){
+ var m = mquery().distinct({ name: 'mquery' }, 'age')
+ m.read('nearest');
+ var a = mquery().distinct(m);
+ assert.deepEqual(a._conditions, m._conditions);
+ assert.deepEqual(a.options, m.options);
+ assert.deepEqual(a._fields, m._fields);
+ assert.deepEqual(a._distinct, m._distinct);
+ })
+
+ describe('executes', function(){
+ before(function (done) {
+ col.insert({ name: 'mquery distinct', age: 1 }, { safe: true }, done);
+ });
+
+ after(function(done){
+ col.remove({ name: 'mquery distinct' }, done);
+ })
+
+ it('when distinct arg is passed with a callback', function(done){
+ mquery(col).distinct('distinct', function (err, doc) {
+ assert.ifError(err);
+ assert.ok(doc);
+ done();
+ })
+ })
+ describe('when criteria is passed with a callback', function(){
+ it('if distinct arg was declared', function(done){
+ mquery(col).distinct('age').distinct({ name: 'mquery distinct' }, function (err, doc) {
+ assert.ifError(err);
+ assert.ok(doc);
+ done();
+ })
+ })
+ it('but not if distinct arg was not declared', function(){
+ assert.throws(function(){
+ mquery(col).distinct({ name: 'mquery distinct' }, function(){})
+ }, /No value for `distinct`/)
+ })
+ })
+ describe('when Query is passed with a callback', function(){
+ var m = mquery({ name: 'mquery distinct' });
+ it('if distinct arg was declared', function(done){
+ mquery(col).distinct('age').distinct(m, function (err, doc) {
+ assert.ifError(err);
+ assert.ok(doc);
+ done();
+ })
+ })
+ it('but not if distinct arg was not declared', function(){
+ assert.throws(function(){
+ mquery(col).distinct(m, function(){})
+ }, /No value for `distinct`/)
+ })
+ })
+ describe('when just a callback is passed', function(done){
+ it('if distinct arg was declared', function(done){
+ var m = mquery({ name: 'mquery distinct' });
+ m.collection(col);
+ m.distinct('age');
+ m.distinct(function (err, doc) {
+ assert.ifError(err);
+ assert.ok(doc);
+ done();
+ });
+ })
+ it('but not if no distinct arg was declared', function(){
+ var m = mquery();
+ m.collection(col);
+ assert.throws(function () {
+ m.distinct(function(){});
+ }, /No value for `distinct`/);
+ })
+ })
+ })
+
+ describe('validates its option', function(){
+ it('sort', function(done){
+ assert.throws(function(){
+ var m = mquery().sort('x').distinct();
+ }, /sort cannot be used with distinct/);
+ done();
+ })
+
+ it('select', function(done){
+ assert.throws(function(){
+ var m = mquery().select('x').distinct();
+ }, /field selection and slice cannot be used with distinct/);
+ done();
+ })
+
+ it('slice', function(done){
+ assert.throws(function(){
+ var m = mquery().where('x').slice(-3).distinct();
+ }, /field selection and slice cannot be used with distinct/);
+ done();
+ })
+
+ it('limit', function(done){
+ assert.throws(function(){
+ var m = mquery().limit(3).distinct();
+ }, /limit cannot be used with distinct/);
+ done();
+ })
+
+ it('skip', function(done){
+ assert.throws(function(){
+ var m = mquery().skip(3).distinct();
+ }, /skip cannot be used with distinct/);
+ done();
+ })
+
+ it('batchSize', function(done){
+ assert.throws(function(){
+ var m = mquery({}, { batchSize: 3 }).distinct();
+ }, /batchSize cannot be used with distinct/);
+ done();
+ })
+
+ it('comment', function(done){
+ assert.throws(function(){
+ var m = mquery().comment('mquery').distinct();
+ }, /comment cannot be used with distinct/);
+ done();
+ })
+
+ it('maxScan', function(done){
+ assert.throws(function(){
+ var m = mquery().maxScan(300).distinct();
+ }, /maxScan cannot be used with distinct/);
+ done();
+ })
+
+ it('snapshot', function(done){
+ assert.throws(function(){
+ var m = mquery().snapshot().distinct();
+ }, /snapshot cannot be used with distinct/);
+ done();
+ })
+
+ it('hint', function(done){
+ assert.throws(function(){
+ var m = mquery().hint({ x: 1 }).distinct();
+ }, /hint cannot be used with distinct/);
+ done();
+ })
+
+ it('tailable', function(done){
+ assert.throws(function(){
+ var m = mquery().tailable().distinct();
+ }, /tailable cannot be used with distinct/);
+ done();
+ })
+ })
+ })
+
+ describe('update', function(){
+ describe('with no callback', function(){
+ it('does not execute', function(){
+ var m = mquery();
+ assert.doesNotThrow(function () {
+ m.update({ name: 'old' }, { name: 'updated' }, { multi: true })
+ })
+ assert.doesNotThrow(function () {
+ m.update({ name: 'old' }, { name: 'updated' })
+ })
+ assert.doesNotThrow(function () {
+ m.update({ name: 'updated' })
+ })
+ assert.doesNotThrow(function () {
+ m.update()
+ })
+ })
+ })
+
+ it('is chainable', function(){
+ var m = mquery({x:1}).update({ y: 2 });
+ var n = m.where({y:2});
+ assert.equal(m, n);
+ assert.deepEqual(n._conditions, {x:1, y:2});
+ assert.deepEqual({ y: 2 }, n._update);
+ assert.equal('update', n.op);
+ });
+
+ it('merges update doc arg', function(){
+ var a = [1,2];
+ var m = mquery().where({ name: 'mquery' }).update({ x: 'stuff', a: a });
+ m.update({ z: 'stuff' });
+ assert.deepEqual(m._update, { z: 'stuff', x: 'stuff', a: a });
+ assert.deepEqual(m._conditions, { name: 'mquery' });
+ assert.ok(!m.options.overwrite);
+ m.update({}, { z: 'renamed' }, { overwrite: true });
+ assert.ok(m.options.overwrite === true);
+ assert.deepEqual(m._conditions, { name: 'mquery' });
+ assert.deepEqual(m._update, { z: 'renamed', x: 'stuff', a: a });
+ a.push(3);
+ assert.notDeepEqual(m._update, { z: 'renamed', x: 'stuff', a: a });
+ })
+
+ it('merges other options', function(){
+ var m = mquery();
+ m.setOptions({ overwrite: true });
+ m.update({ age: 77 }, { name: 'pagemill' }, { multi: true })
+ assert.deepEqual({ age: 77 }, m._conditions);
+ assert.deepEqual({ name: 'pagemill' }, m._update);
+ assert.deepEqual({ overwrite: true, multi: true }, m.options);
+ })
+
+ describe('executes', function(){
+ var id;
+ before(function (done) {
+ col.insert({ name: 'mquery update', age: 1 }, { safe: true }, function (err, res) {
+ id = res.insertedIds[0];
+ done();
+ });
+ });
+
+ after(function(done){
+ col.remove({ _id: id }, done);
+ })
+
+ describe('when conds + doc + opts + callback passed', function(){
+ it('works', function(done){
+ var m = mquery(col).where({ _id: id })
+ m.update({}, { name: 'Sparky' }, { safe: true }, function (err, res) {
+ assert.ifError(err);
+ assert.equal(res.result.n, 1);
+ m.findOne(function (err, doc) {
+ assert.ifError(err);
+ assert.equal(doc.name, 'Sparky');
+ done();
+ })
+ })
+ })
+ })
+
+ describe('when conds + doc + callback passed', function(){
+ it('works', function (done) {
+ var m = mquery(col).update({ _id: id }, { name: 'fairgrounds' }, function (err, num, doc) {
+ assert.ifError(err);
+ assert.ok(1, num);
+ m.findOne(function (err, doc) {
+ assert.ifError(err);
+ assert.equal(doc.name, 'fairgrounds');
+ done();
+ })
+ })
+ })
+ })
+
+ describe('when doc + callback passed', function(){
+ it('works', function (done) {
+ var m = mquery(col).where({ _id: id }).update({ name: 'changed' }, function (err, num, doc) {
+ assert.ifError(err);
+ assert.ok(1, num);
+ m.findOne(function (err, doc) {
+ assert.ifError(err);
+ assert.equal(doc.name, 'changed');
+ done();
+ })
+ })
+ })
+ })
+
+ describe('when just callback passed', function(){
+ it('works', function (done) {
+ var m = mquery(col).where({ _id: id });
+ m.setOptions({ safe: true });
+ m.update({ name: 'Frankenweenie' });
+ m.update(function (err, res) {
+ assert.ifError(err);
+ assert.equal(res.result.n, 1);
+ m.findOne(function (err, doc) {
+ assert.ifError(err);
+ assert.equal(doc.name, 'Frankenweenie');
+ done();
+ })
+ })
+ })
+ })
+
+ describe('without a callback', function(){
+ it('when forced by exec()', function(done){
+ var m = mquery(col).where({ _id: id });
+ m.setOptions({ safe: true, multi: true });
+ m.update({ name: 'forced' });
+
+ var update = m._collection.update;
+ m._collection.update = function (conds, doc, opts, cb) {
+ m._collection.update = update;
+
+ assert.ok(opts.safe);
+ assert.ok(true === opts.multi);
+ assert.equal('forced', doc.$set.name);
+ done();
+ }
+
+ m.exec()
+ })
+ })
+
+ describe('except when update doc is empty and missing overwrite flag', function(){
+ it('works', function (done) {
+ var m = mquery(col).where({ _id: id });
+ m.setOptions({ safe: true });
+ m.update({ }, function (err, num) {
+ assert.ifError(err);
+ assert.ok(0 === num);
+ setTimeout(function(){
+ m.findOne(function (err, doc) {
+ assert.ifError(err);
+ assert.equal(3, mquery.utils.keys(doc).length);
+ assert.equal(id, doc._id.toString());
+ assert.equal('Frankenweenie', doc.name);
+ done();
+ })
+ }, 300);
+ })
+ })
+ });
+
+ describe('when update doc is set with overwrite flag', function(){
+ it('works', function (done) {
+ var m = mquery(col).where({ _id: id });
+ m.setOptions({ safe: true, overwrite: true });
+ m.update({ all: 'yep', two: 2 }, function (err, res) {
+ assert.ifError(err);
+ assert.equal(res.result.n, 1);
+ m.findOne(function (err, doc) {
+ assert.ifError(err);
+ assert.equal(3, mquery.utils.keys(doc).length);
+ assert.equal('yep', doc.all);
+ assert.equal(2, doc.two);
+ assert.equal(id, doc._id.toString());
+ done();
+ })
+ })
+ })
+ })
+
+ describe('when update doc is empty with overwrite flag', function(){
+ it('works', function (done) {
+ var m = mquery(col).where({ _id: id });
+ m.setOptions({ safe: true, overwrite: true });
+ m.update({ }, function (err, res) {
+ assert.ifError(err);
+ assert.equal(res.result.n, 1);
+ m.findOne(function (err, doc) {
+ assert.ifError(err);
+ assert.equal(1, mquery.utils.keys(doc).length);
+ assert.equal(id, doc._id.toString());
+ done();
+ })
+ })
+ })
+ })
+
+ describe('when boolean (true) - exec()', function(){
+ it('works', function(done){
+ var m = mquery(col).where({ _id: id });
+ m.update({ name: 'bool' }).update(true);
+ setTimeout(function () {
+ m.findOne(function (err, doc) {
+ assert.ifError(err);
+ assert.ok(doc);
+ assert.equal('bool', doc.name);
+ done();
+ })
+ }, 300)
+ })
+ })
+ })
+ })
+
+ describe('remove', function(){
+ describe('with 0 args', function(){
+ var name = 'remove: no args test'
+ before(function(done){
+ col.insert({ name: name }, { safe: true }, done)
+ })
+ after(function(done){
+ col.remove({ name: name }, { safe: true }, done)
+ })
+
+ it('does not execute', function(done){
+ var remove = col.remove;
+ col.remove = function () {
+ col.remove = remove;
+ done(new Error('remove executed!'));
+ }
+
+ var m = mquery(col).where({ name: name }).remove()
+ setTimeout(function () {
+ col.remove = remove;
+ done();
+ }, 10);
+ })
+
+ it('chains', function(){
+ var m = mquery();
+ assert.equal(m, m.remove());
+ })
+ })
+
+ describe('with 1 argument', function(){
+ var name = 'remove: 1 arg test'
+ before(function(done){
+ col.insert({ name: name }, { safe: true }, done)
+ })
+ after(function(done){
+ col.remove({ name: name }, { safe: true }, done)
+ })
+
+ describe('that is a', function(){
+ it('plain object', function(){
+ var m = mquery(col).remove({ name: 'Whiskers' });
+ m.remove({ color: '#fff' })
+ assert.deepEqual({ name: 'Whiskers', color: '#fff' }, m._conditions);
+ })
+
+ it('query', function(){
+ var q = mquery({ color: '#fff' });
+ var m = mquery(col).remove({ name: 'Whiskers' });
+ m.remove(q)
+ assert.deepEqual({ name: 'Whiskers', color: '#fff' }, m._conditions);
+ })
+
+ it('function', function(done){
+ mquery(col, { safe: true }).where({name: name}).remove(function (err) {
+ assert.ifError(err);
+ mquery(col).findOne({ name: name }, function (err, doc) {
+ assert.ifError(err);
+ assert.equal(null, doc);
+ done();
+ })
+ });
+ })
+
+ it('boolean (true) - execute', function(done){
+ col.insert({ name: name }, { safe: true }, function (err) {
+ assert.ifError(err);
+ mquery(col).findOne({ name: name }, function (err, doc) {
+ assert.ifError(err);
+ assert.ok(doc);
+ mquery(col).remove(true);
+ setTimeout(function () {
+ mquery(col).find(function (err, docs) {
+ assert.ifError(err);
+ assert.ok(docs);
+ assert.equal(0, docs.length);
+ done();
+ })
+ }, 300)
+ })
+ })
+ })
+ })
+ })
+
+ describe('with 2 arguments', function(){
+ var name = 'remove: 2 arg test'
+ beforeEach(function(done){
+ col.remove({}, { safe: true }, function (err) {
+ assert.ifError(err);
+ col.insert([{ name: 'shelly' }, { name: name }], { safe: true }, function (err) {
+ assert.ifError(err);
+ mquery(col).find(function (err, docs) {
+ assert.ifError(err);
+ assert.equal(2, docs.length);
+ done();
+ })
+ })
+ })
+ })
+
+ describe('plain object + callback', function(){
+ it('works', function(done){
+ mquery(col).remove({ name: name }, function (err) {
+ assert.ifError(err);
+ mquery(col).find(function (err, docs) {
+ assert.ifError(err);
+ assert.ok(docs);
+ assert.equal(1, docs.length);
+ assert.equal('shelly', docs[0].name);
+ done();
+ })
+ });
+ })
+ })
+
+ describe('mquery + callback', function(){
+ it('works', function(done){
+ var m = mquery({ name: name });
+ mquery(col).remove(m, function (err) {
+ assert.ifError(err);
+ mquery(col).find(function (err, docs) {
+ assert.ifError(err);
+ assert.ok(docs);
+ assert.equal(1, docs.length);
+ assert.equal('shelly', docs[0].name);
+ done();
+ })
+ });
+ })
+ })
+ })
+ })
+
+ function validateFindAndModifyOptions (method) {
+ describe('validates its option', function(){
+ it('sort', function(done){
+ assert.doesNotThrow(function(){
+ var m = mquery().sort('x')[method]();
+ })
+ done();
+ })
+
+ it('select', function(done){
+ assert.doesNotThrow(function(){
+ var m = mquery().select('x')[method]();
+ })
+ done();
+ })
+
+ it('limit', function(done){
+ assert.throws(function(){
+ var m = mquery().limit(3)[method]();
+ }, new RegExp('limit cannot be used with ' + method));
+ done();
+ })
+
+ it('skip', function(done){
+ assert.throws(function(){
+ var m = mquery().skip(3)[method]();
+ }, new RegExp('skip cannot be used with ' + method));
+ done();
+ })
+
+ it('batchSize', function(done){
+ assert.throws(function(){
+ var m = mquery({}, { batchSize: 3 })[method]();
+ }, new RegExp('batchSize cannot be used with ' + method));
+ done();
+ })
+
+ it('maxScan', function(done){
+ assert.throws(function(){
+ var m = mquery().maxScan(300)[method]();
+ }, new RegExp('maxScan cannot be used with ' + method));
+ done();
+ })
+
+ it('snapshot', function(done){
+ assert.throws(function(){
+ var m = mquery().snapshot()[method]();
+ }, new RegExp('snapshot cannot be used with ' + method));
+ done();
+ })
+
+ it('hint', function(done){
+ assert.throws(function(){
+ var m = mquery().hint({ x: 1 })[method]();
+ }, new RegExp('hint cannot be used with ' + method));
+ done();
+ })
+
+ it('tailable', function(done){
+ assert.throws(function(){
+ var m = mquery().tailable()[method]();
+ }, new RegExp('tailable cannot be used with ' + method));
+ done();
+ })
+
+ it('comment', function(done){
+ assert.throws(function(){
+ var m = mquery().comment('mquery')[method]();
+ }, new RegExp('comment cannot be used with ' + method));
+ done();
+ })
+ })
+ }
+
+ describe('findOneAndUpdate', function(){
+ var name = 'findOneAndUpdate + fn'
+
+ validateFindAndModifyOptions('findOneAndUpdate');
+
+ describe('with 0 args', function(){
+ it('makes no changes', function(){
+ var m = mquery();
+ var n = m.findOneAndUpdate();
+ assert.deepEqual(m, n);
+ })
+ })
+ describe('with 1 arg', function(){
+ describe('that is an object', function(){
+ it('updates the doc', function(){
+ var m = mquery();
+ var n = m.findOneAndUpdate({ $set: { name: '1 arg' }});
+ assert.deepEqual(n._update, { $set: { name: '1 arg' }});
+ })
+ })
+ describe('that is a query', function(){
+ it('updates the doc', function(){
+ var m = mquery({ name: name }).update({ x: 1 });
+ var n = mquery().findOneAndUpdate(m);
+ assert.deepEqual(n._update, { x: 1 });
+ })
+ })
+ it('that is a function', function(done){
+ col.insert({ name: name }, { safe: true }, function (err) {
+ assert.ifError(err);
+ var m = mquery({ name: name }).collection(col);
+ name = '1 arg';
+ var n = m.update({ $set: { name: name }});
+ n.findOneAndUpdate(function (err, res) {
+ assert.ifError(err);
+ assert.ok(res.value);
+ assert.equal(name, res.value.name);
+ done();
+ });
+ })
+ })
+ })
+ describe('with 2 args', function(){
+ it('conditions + update', function(){
+ var m = mquery(col);
+ m.findOneAndUpdate({ name: name }, { age: 100 });
+ assert.deepEqual({ name: name }, m._conditions);
+ assert.deepEqual({ age: 100 }, m._update);
+ })
+ it('query + update', function(){
+ var n = mquery({ name: name });
+ var m = mquery(col);
+ m.findOneAndUpdate(n, { age: 100 });
+ assert.deepEqual({ name: name }, m._conditions);
+ assert.deepEqual({ age: 100 }, m._update);
+ })
+ it('update + callback', function(done){
+ var m = mquery(col).where({ name: name });
+ m.findOneAndUpdate({}, { $inc: { age: 10 }}, { new: true }, function (err, res) {
+ assert.ifError(err);
+ assert.equal(10, res.value.age);
+ done();
+ });
+ })
+ })
+ describe('with 3 args', function(){
+ it('conditions + update + options', function(){
+ var m = mquery();
+ var n = m.findOneAndUpdate({ name: name }, { works: true }, { new: false });
+ assert.deepEqual({ name: name}, n._conditions);
+ assert.deepEqual({ works: true }, n._update);
+ assert.deepEqual({ new: false }, n.options);
+ })
+ it('conditions + update + callback', function(done){
+ var m = mquery(col);
+ m.findOneAndUpdate({ name: name }, { works: true }, { new: true }, function (err, res) {
+ assert.ifError(err);
+ assert.ok(res.value);
+ assert.equal(name, res.value.name);
+ assert.ok(true === res.value.works);
+ done();
+ });
+ })
+ })
+ describe('with 4 args', function(){
+ it('conditions + update + options + callback', function(done){
+ var m = mquery(col);
+ m.findOneAndUpdate({ name: name }, { works: false }, { new: false }, function (err, res) {
+ assert.ifError(err);
+ assert.ok(res.value);
+ assert.equal(name, res.value.name);
+ assert.ok(true === res.value.works);
+ done();
+ });
+ })
+ })
+ })
+
+ describe('findOneAndRemove', function(){
+ var name = 'findOneAndRemove'
+
+ validateFindAndModifyOptions('findOneAndRemove');
+
+ describe('with 0 args', function(){
+ it('makes no changes', function(){
+ var m = mquery();
+ var n = m.findOneAndRemove();
+ assert.deepEqual(m, n);
+ })
+ })
+ describe('with 1 arg', function(){
+ describe('that is an object', function(){
+ it('updates the doc', function(){
+ var m = mquery();
+ var n = m.findOneAndRemove({ name: '1 arg' });
+ assert.deepEqual(n._conditions, { name: '1 arg' });
+ })
+ })
+ describe('that is a query', function(){
+ it('updates the doc', function(){
+ var m = mquery({ name: name });
+ var n = m.findOneAndRemove(m);
+ assert.deepEqual(n._conditions, { name: name });
+ })
+ })
+ it('that is a function', function(done){
+ col.insert({ name: name }, { safe: true }, function (err) {
+ assert.ifError(err);
+ var m = mquery({ name: name }).collection(col);
+ m.findOneAndRemove(function (err, res) {
+ assert.ifError(err);
+ assert.ok(res.value);
+ assert.equal(name, res.value.name);
+ done();
+ });
+ })
+ })
+ })
+ describe('with 2 args', function(){
+ it('conditions + options', function(){
+ var m = mquery(col);
+ m.findOneAndRemove({ name: name }, { new: false });
+ assert.deepEqual({ name: name }, m._conditions);
+ assert.deepEqual({ new: false }, m.options);
+ })
+ it('query + options', function(){
+ var n = mquery({ name: name });
+ var m = mquery(col);
+ m.findOneAndRemove(n, { sort: { x: 1 }});
+ assert.deepEqual({ name: name }, m._conditions);
+ assert.deepEqual({ sort: { 'x': 1 }}, m.options);
+ })
+ it('conditions + callback', function(done){
+ col.insert({ name: name }, { safe: true }, function (err) {
+ assert.ifError(err);
+ var m = mquery(col);
+ m.findOneAndRemove({ name: name }, function (err, res) {
+ assert.ifError(err);
+ assert.equal(name, res.value.name);
+ done();
+ });
+ });
+ })
+ it('query + callback', function(done){
+ col.insert({ name: name }, { safe: true }, function (err) {
+ assert.ifError(err);
+ var n = mquery({ name: name })
+ var m = mquery(col);
+ m.findOneAndRemove(n, function (err, res) {
+ assert.ifError(err);
+ assert.equal(name, res.value.name);
+ done();
+ });
+ });
+ })
+ })
+ describe('with 3 args', function(){
+ it('conditions + options + callback', function(done){
+ name = 'findOneAndRemove + conds + options + cb';
+ col.insert([{ name: name }, { name: 'a' }], { safe: true }, function (err) {
+ assert.ifError(err);
+ var m = mquery(col);
+ m.findOneAndRemove({ name: name }, { sort: { name: 1 }}, function (err, res) {
+ assert.ifError(err);
+ assert.ok(res.value);
+ assert.equal(name, res.value.name);
+ done();
+ });
+ })
+ })
+ })
+ })
+
+ describe('exec', function(){
+ beforeEach(function(done){
+ col.insert([{ name: 'exec', age: 1 }, { name: 'exec', age: 2 }], done);
+ })
+
+ afterEach(function(done){
+ mquery(col).remove(done);
+ })
+
+ it('requires an op', function(){
+ assert.throws(function () {
+ mquery().exec()
+ }, /Missing query type/);
+ })
+
+ describe('find', function() {
+ it('works', function(done){
+ var m = mquery(col).find({ name: 'exec' });
+ m.exec(function (err, docs) {
+ assert.ifError(err);
+ assert.equal(2, docs.length);
+ done();
+ })
+ })
+
+ it('works with readPreferences', function (done) {
+ var m = mquery(col).find({ name: 'exec' });
+ try {
+ var rp = new require('mongodb').ReadPreference('primary');
+ m.read(rp);
+ } catch (e) {
+ if (e.code === 'MODULE_NOT_FOUND')
+ e = null;
+ done(e);
+ return;
+ }
+ m.exec(function (err, docs) {
+ assert.ifError(err);
+ assert.equal(2, docs.length);
+ done();
+ })
+ })
+ });
+
+ it('findOne', function(done){
+ var m = mquery(col).findOne({ age: 2 });
+ m.exec(function (err, doc) {
+ assert.ifError(err);
+ assert.equal(2, doc.age);
+ done();
+ })
+ })
+
+ it('count', function(done){
+ var m = mquery(col).count({ name: 'exec' });
+ m.exec(function (err, count) {
+ assert.ifError(err);
+ assert.equal(2, count);
+ done();
+ })
+ })
+
+ it('distinct', function(done){
+ var m = mquery({ name: 'exec' });
+ m.collection(col);
+ m.distinct('age');
+ m.exec(function (err, array) {
+ assert.ifError(err);
+ assert.ok(Array.isArray(array));
+ assert.equal(2, array.length);
+ assert(~array.indexOf(1));
+ assert(~array.indexOf(2));
+ done();
+ });
+ })
+
+ describe('update', function(){
+ var num;
+
+ it('with a callback', function(done){
+ var m = mquery(col);
+ m.where({ name: 'exec' })
+
+ m.count(function (err, _num) {
+ assert.ifError(err);
+ num = _num;
+ m.setOptions({ multi: true })
+ m.update({ name: 'exec + update' });
+ m.exec(function (err, res) {
+ assert.ifError(err);
+ assert.equal(num, res.result.n);
+ mquery(col).find({ name: 'exec + update' }, function (err, docs) {
+ assert.ifError(err);
+ assert.equal(num, docs.length);
+ done();
+ })
+ })
+ })
+ })
+
+ it('without a callback', function(done){
+ var m = mquery(col)
+ m.where({ name: 'exec + update' }).setOptions({ multi: true })
+ m.update({ name: 'exec' });
+
+ // unsafe write
+ m.exec();
+
+ setTimeout(function () {
+ mquery(col).find({ name: 'exec' }, function (err, docs) {
+ assert.ifError(err);
+ assert.equal(2, docs.length);
+ done();
+ })
+ }, 200)
+ })
+ it('preserves key ordering', function(done) {
+ var m = mquery(col);
+
+ var m2 = m.update({ _id : 'something' }, { '1' : 1, '2' : 2, '3' : 3});
+ var doc = m2._updateForExec().$set;
+ var count = 0;
+ for (var i in doc) {
+ if (count == 0) {
+ assert.equal('1', i);
+ } else if (count == 1) {
+ assert.equal('2', i);
+ } else if (count ==2) {
+ assert.equal('3', i);
+ }
+ count++;
+ }
+ done();
+ });
+ })
+
+ describe('remove', function(){
+ it('with a callback', function(done){
+ var m = mquery(col).where({ age: 2 }).remove();
+ m.exec(function (err, res) {
+ assert.ifError(err);
+ assert.equal(1, res.result.n);
+ done();
+ })
+ })
+
+ it('without a callback', function(done){
+ var m = mquery(col).where({ age: 1 }).remove();
+ m.exec();
+
+ setTimeout(function () {
+ mquery(col).where('name', 'exec').count(function(err, num) {
+ assert.equal(1, num);
+ done();
+ })
+ }, 200)
+ })
+ })
+
+ describe('findOneAndUpdate', function(){
+ it('with a callback', function(done){
+ var m = mquery(col);
+ m.findOneAndUpdate({ name: 'exec', age: 1 }, { $set: { name: 'findOneAndUpdate' }});
+ m.exec(function (err, res) {
+ assert.ifError(err);
+ assert.equal('findOneAndUpdate', res.value.name);
+ done();
+ });
+ })
+ })
+
+ describe('findOneAndRemove', function(){
+ it('with a callback', function(done){
+ var m = mquery(col);
+ m.findOneAndRemove({ name: 'exec', age: 2 });
+ m.exec(function (err, res) {
+ assert.ifError(err);
+ assert.equal('exec', res.value.name);
+ assert.equal(2, res.value.age);
+ mquery(col).count({ name: 'exec' }, function (err, num) {
+ assert.ifError(err);
+ assert.equal(1, num);
+ done();
+ });
+ });
+ })
+ })
+ })
+
+ describe('setTraceFunction', function() {
+ beforeEach(function(done){
+ col.insert([{ name: 'trace', age: 93 }], done);
+ })
+
+ it('calls trace function when executing query', function(done) {
+ var m = mquery(col);
+
+ var resultTraceCalled;
+
+ m.setTraceFunction(function (method, queryInfo) {
+ try {
+ assert.equal('findOne', method);
+ assert.equal('trace', queryInfo.conditions.name);
+ } catch (e) {
+ done(e);
+ }
+
+ return function(err, result, millis) {
+ try {
+ assert.equal(93, result.age);
+ } catch (e) {
+ done(e);
+ }
+ resultTraceCalled = true;
+ };
+ });
+
+ m.findOne({name: 'trace'}, function (err, doc) {
+ assert.ifError(err);
+ assert.equal(resultTraceCalled, true);
+ assert.equal(93, doc.age);
+ done();
+ });
+ });
+
+ it('inherits trace function when calling toConstructor', function(done) {
+ function traceFunction () { return function() {} };
+
+ var tracedQuery = mquery().setTraceFunction(traceFunction).toConstructor();
+
+ var query = tracedQuery();
+ assert.equal(traceFunction, query._traceFunction);
+
+ done();
+ });
+ });
+
+ describe('thunk', function() {
+ it('returns a function', function(done) {
+ assert.equal('function', typeof mquery().thunk());
+ done();
+ });
+
+ it('passes the fn arg to `exec`', function(done) {
+ function cb() {}
+ var m = mquery();
+
+ m.exec = function testing(fn) {
+ assert.equal(this, m);
+ assert.equal(cb, fn);
+ done();
+ }
+
+ m.thunk()(cb);
+ });
+ });
+
+ describe('then', function() {
+ before(function(done){
+ col.insert([{ name: 'then', age: 1 }, { name: 'then', age: 2 }], done);
+ })
+
+ after(function(done){
+ mquery(col).remove({ name: 'then' }).exec(done);
+ })
+
+ it('returns a promise A+ compat object', function(done) {
+ var m = mquery(col).find();
+ assert.equal('function', typeof m.then);
+ done();
+ });
+
+ it('creates a promise that is resolved on success', function(done) {
+ var promise = mquery(col).count({ name: 'then' }).then();
+ promise.then(function(count){
+ assert.equal(2, count);
+ done();
+ }, done);
+ });
+
+ it('supports exec() cb being called synchronously #66', function(done) {
+ var query = mquery(col).count({ name: 'then' });
+ query.exec = function(cb) {
+ cb(null, 66);
+ }
+
+ query.then(success, done);
+ function success(count){
+ assert.equal(66, count);
+ done();
+ }
+ });
+
+ it('supports other Promise libs', function(done) {
+ var bluebird = mquery.Promise;
+
+ // hack for testing
+ mquery.Promise = function P() {
+ mquery.Promise = bluebird;
+ this.then = function(x, y) {
+ return x + y;
+ }
+ }
+
+ var val = mquery(col).count({ name: 'exec' }).then(1, 2);
+ assert.equal(val, 3);
+ done();
+ });
+ });
+
+ describe('stream', function() {
+ before(function(done){
+ col.insert([{ name: 'stream', age: 1 }, { name: 'stream', age: 2 }], done);
+ })
+
+ after(function(done){
+ mquery(col).remove({ name: 'stream' }).exec(done);
+ })
+
+ describe('throws', function() {
+ describe('if used with non-find operations', function() {
+ var ops = ['update', 'findOneAndUpdate', 'remove', 'count', 'distinct'];
+
+ ops.forEach(function(op) {
+ assert.throws(function(){
+ mquery(col)[op]().stream();
+ });
+ });
+ });
+ });
+
+ it('returns a stream', function(done) {
+ var stream = mquery(col).find({ name: 'stream' }).stream();
+ var count = 0;
+ var err;
+
+ stream.on('data', function(doc){
+ assert.equal('stream', doc.name);
+ ++count;
+ });
+
+ stream.on('error', function(er) {
+ err = er;
+ });
+
+ stream.on('end', function(){
+ if (err) return done(err);
+ assert.equal(2, count);
+ done();
+ });
+ });
+ });
+
+ function noDistinct (type) {
+ it('cannot be used with distinct()', function(done){
+ assert.throws(function () {
+ mquery().distinct('name')[type](4);
+ }, new RegExp(type + ' cannot be used with distinct'));
+ done();
+ })
+ }
+
+ function no (method, type) {
+ it('cannot be used with ' + method + '()', function(done){
+ assert.throws(function () {
+ mquery()[method]()[type](4);
+ }, new RegExp(type + ' cannot be used with ' + method));
+ done();
+ })
+ }
+
+ // query internal
+
+ describe('_updateForExec', function(){
+ it('returns a clone of the update object with same key order #19', function(done){
+ var update = {};
+ update.$push = { n: { $each: [{x:10}], $slice: -1, $sort: {x:1}}};
+
+ var q = mquery().update({ x: 1 }, update);
+
+ // capture original key order
+ var order = [];
+ for (var key in q._update.$push.n) {
+ order.push(key);
+ }
+
+ // compare output
+ var doc = q._updateForExec();
+ var i = 0;
+ for (var key in doc.$push.n) {
+ assert.equal(key, order[i]);
+ i++;
+ }
+
+ done();
+ })
+ })
+})
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/utils.test.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/utils.test.js
new file mode 100644
index 0000000..fa5972a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/mquery/test/utils.test.js
@@ -0,0 +1,143 @@
+
+var utils = require('../lib/utils');
+var assert = require('assert');
+
+var mongo;
+try {
+ mongo = new require('mongodb');
+} catch (e) {}
+
+describe('lib/utils', function() {
+ describe('clone', function() {
+ it('clones constructors named ObjectId', function(done) {
+ function ObjectId (id) {
+ this.id = id;
+ }
+
+ var o1 = new ObjectId('1234');
+ var o2 = utils.clone(o1);
+ assert.ok(o2 instanceof ObjectId);
+
+ done();
+ });
+
+ it('clones constructors named ObjectID', function(done) {
+ function ObjectID (id) {
+ this.id = id;
+ }
+
+ var o1 = new ObjectID('1234');
+ var o2 = utils.clone(o1);
+
+ assert.ok(o2 instanceof ObjectID);
+ done();
+ });
+
+ it('does not clone constructors named ObjectIdd', function(done) {
+ function ObjectIdd (id) {
+ this.id = id;
+ }
+
+ var o1 = new ObjectIdd('1234');
+ var o2 = utils.clone(o1);
+ assert.ok(!(o2 instanceof ObjectIdd));
+
+ done();
+ });
+
+ it('optionally clones ObjectId constructors using its clone method', function(done) {
+ function ObjectID (id) {
+ this.id = id;
+ this.cloned = false;
+ }
+
+ ObjectID.prototype.clone = function () {
+ var ret = new ObjectID(this.id);
+ ret.cloned = true;
+ return ret;
+ }
+
+ var id = 1234;
+ var o1 = new ObjectID(id);
+ assert.equal(id, o1.id);
+ assert.equal(false, o1.cloned);
+
+ var o2 = utils.clone(o1);
+ assert.ok(o2 instanceof ObjectID);
+ assert.equal(id, o2.id);
+ assert.ok(o2.cloned);
+ done();
+ });
+
+ it('clones mongodb.ReadPreferences', function (done) {
+ if (!mongo) return done();
+
+ var tags = [
+ {dc: 'tag1'}
+ ];
+ var prefs = [
+ new mongo.ReadPreference("primary"),
+ new mongo.ReadPreference(mongo.ReadPreference.PRIMARY_PREFERRED),
+ new mongo.ReadPreference("primary", tags),
+ mongo.ReadPreference("primary", tags)
+ ];
+
+ var prefsCloned = utils.clone(prefs);
+
+ for (var i = 0; i < prefsCloned.length; i++) {
+ assert.notEqual(prefs[i], prefsCloned[i]);
+ assert.ok(prefsCloned[i] instanceof mongo.ReadPreference);
+ assert.ok(prefsCloned[i].isValid());
+ if (prefs[i].tags) {
+ assert.ok(prefsCloned[i].tags);
+ assert.notEqual(prefs[i].tags, prefsCloned[i].tags);
+ assert.notEqual(prefs[i].tags[0], prefsCloned[i].tags[0]);
+ } else {
+ assert.equal(prefsCloned[i].tags, null);
+ }
+ }
+
+ done();
+ });
+
+ it('clones mongodb.Binary', function(done){
+ if (!mongo) return done();
+
+ var buf = new Buffer('hi');
+ var binary= new mongo.Binary(buf, 2);
+ var clone = utils.clone(binary);
+ assert.equal(binary.sub_type, clone.sub_type);
+ assert.equal(String(binary.buffer), String(buf));
+ assert.ok(binary !== clone);
+ done();
+ })
+
+ it('handles objects with no constructor', function(done) {
+ var name ='335';
+
+ var o = Object.create(null);
+ o.name = name;
+
+ var clone;
+ assert.doesNotThrow(function() {
+ clone = utils.clone(o);
+ });
+
+ assert.equal(name, clone.name);
+ assert.ok(o != clone);
+ done();
+ });
+
+ it('handles buffers', function(done){
+ var buff = new Buffer(10);
+ buff.fill(1);
+ var clone = utils.clone(buff);
+
+ for (var i = 0; i < buff.length; i++) {
+ assert.equal(buff[i], clone[i]);
+ }
+
+ done();
+ });
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/.npmignore
new file mode 100644
index 0000000..d1aa0ce
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/.npmignore
@@ -0,0 +1,5 @@
+node_modules
+test
+History.md
+Makefile
+component.json
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/History.md
new file mode 100644
index 0000000..32fdfc1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/History.md
@@ -0,0 +1,66 @@
+
+0.7.1 / 2015-04-20
+==================
+
+ * prevent extraordinary long inputs (@evilpacket)
+ * Fixed broken readme link
+
+0.7.0 / 2014-11-24
+==================
+
+ * add time abbreviations, updated tests and readme for the new units
+ * fix example in the readme.
+ * add LICENSE file
+
+0.6.2 / 2013-12-05
+==================
+
+ * Adding repository section to package.json to suppress warning from NPM.
+
+0.6.1 / 2013-05-10
+==================
+
+ * fix singularization [visionmedia]
+
+0.6.0 / 2013-03-15
+==================
+
+ * fix minutes
+
+0.5.1 / 2013-02-24
+==================
+
+ * add component namespace
+
+0.5.0 / 2012-11-09
+==================
+
+ * add short formatting as default and .long option
+ * add .license property to component.json
+ * add version to component.json
+
+0.4.0 / 2012-10-22
+==================
+
+ * add rounding to fix crazy decimals
+
+0.3.0 / 2012-09-07
+==================
+
+ * fix `ms(<String>)` [visionmedia]
+
+0.2.0 / 2012-09-03
+==================
+
+ * add component.json [visionmedia]
+ * add days support [visionmedia]
+ * add hours support [visionmedia]
+ * add minutes support [visionmedia]
+ * add seconds support [visionmedia]
+ * add ms string support [visionmedia]
+ * refactor tests to facilitate ms(number) [visionmedia]
+
+0.1.0 / 2012-03-07
+==================
+
+ * Initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/LICENSE
new file mode 100644
index 0000000..6c07561
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2014 Guillermo Rauch <rauchg@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/README.md
new file mode 100644
index 0000000..9b4fd03
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/README.md
@@ -0,0 +1,35 @@
+# ms.js: miliseconds conversion utility
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('100') // 100
+```
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(ms('10 hours')) // "10h"
+```
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+- Node/Browser compatible. Published as [`ms`](https://www.npmjs.org/package/ms) in [NPM](http://nodejs.org/download).
+- If a number is supplied to `ms`, a string with a unit is returned.
+- If a string that contains the number is supplied, it returns it as
+a number (e.g: it returns `100` for `'100'`).
+- If you pass a string with a number and a valid unit, the number of
+equivalent ms is returned.
+
+## License
+
+MIT
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/index.js
new file mode 100644
index 0000000..4f92771
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/index.js
@@ -0,0 +1,125 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} options
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options){
+ options = options || {};
+ if ('string' == typeof val) return parse(val);
+ return options.long
+ ? long(val)
+ : short(val);
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = '' + str;
+ if (str.length > 10000) return;
+ var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
+ if (!match) return;
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function short(ms) {
+ if (ms >= d) return Math.round(ms / d) + 'd';
+ if (ms >= h) return Math.round(ms / h) + 'h';
+ if (ms >= m) return Math.round(ms / m) + 'm';
+ if (ms >= s) return Math.round(ms / s) + 's';
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function long(ms) {
+ return plural(ms, d, 'day')
+ || plural(ms, h, 'hour')
+ || plural(ms, m, 'minute')
+ || plural(ms, s, 'second')
+ || ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, n, name) {
+ if (ms < n) return;
+ if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name;
+ return Math.ceil(ms / n) + ' ' + name + 's';
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/package.json
new file mode 100644
index 0000000..e36489e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/ms/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "ms",
+ "version": "0.7.1",
+ "description": "Tiny ms conversion utility",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/guille/ms.js.git"
+ },
+ "main": "./index",
+ "devDependencies": {
+ "mocha": "*",
+ "expect.js": "*",
+ "serve": "*"
+ },
+ "component": {
+ "scripts": {
+ "ms/index.js": "index.js"
+ }
+ },
+ "gitHead": "713dcf26d9e6fd9dbc95affe7eff9783b7f1b909",
+ "bugs": {
+ "url": "https://github.com/guille/ms.js/issues"
+ },
+ "homepage": "https://github.com/guille/ms.js",
+ "_id": "ms@0.7.1",
+ "scripts": {},
+ "_shasum": "9cd13c03adbff25b65effde7ce864ee952017098",
+ "_from": "ms@0.7.1",
+ "_npmVersion": "2.7.5",
+ "_nodeVersion": "0.12.2",
+ "_npmUser": {
+ "name": "rauchg",
+ "email": "rauchg@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "rauchg",
+ "email": "rauchg@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "9cd13c03adbff25b65effde7ce864ee952017098",
+ "tarball": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/.npmignore
new file mode 100644
index 0000000..be106ca
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/.npmignore
@@ -0,0 +1,2 @@
+*.sw*
+node_modules/
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/.travis.yml b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/.travis.yml
new file mode 100644
index 0000000..895dbd3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - 0.6
+ - 0.8
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/History.md
new file mode 100644
index 0000000..f04c05d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/History.md
@@ -0,0 +1,59 @@
+1.1.1 / 2016-09-26
+==================
+ * fixed; handle parsing of replicaSet with leading number #8
+
+1.1.0 / 2015-04-13
+==================
+ * added; parse ipv6 addresses
+
+1.0.0 / 2014-10-18
+==================
+
+ * fixed; compatibility w/ strict mode #4 [vkarpov15](https://github.com/vkarpov15)
+
+0.3.1 / 2013-02-17
+==================
+
+ * fixed; allow '#' in username and password #3
+
+0.3.0 / 2013-01-14
+==================
+
+ * fixed; default db logic #2
+
+0.2.0 / 2013-01-09
+==================
+
+ * changed; default db is now 'test'
+
+0.1.0 / 2012-12-18
+==================
+
+ * changed; include .sock in UDS
+
+0.0.5 / 2012-12-18
+==================
+
+ * fixed; unix domain sockets used with db names
+
+0.0.4 / 2012-12-01
+==================
+
+ * handle multple specified protocols
+
+0.0.3 / 2012-11-29
+==================
+
+ * validate mongodb:///db
+ * more detailed error message
+
+0.0.2 / 2012-11-02
+==================
+
+ * add readPreferenceTags support
+ * add unix domain support
+
+0.0.1 / 2012-11-01
+==================
+
+ * initial release
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/LICENSE
new file mode 100644
index 0000000..38c529d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2012 [Aaron Heckmann](aaron.heckmann+github@gmail.com)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/Makefile b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/Makefile
new file mode 100644
index 0000000..e6337bd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/Makefile
@@ -0,0 +1,5 @@
+
+test:
+ @node_modules/mocha/bin/mocha $(T)
+
+.PHONY: test
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/README.md
new file mode 100644
index 0000000..3757419
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/README.md
@@ -0,0 +1,46 @@
+#Meet Muri!
+
+Muri is your friendly neighborhood [MongoDB URI](http://www.mongodb.org/display/DOCS/Connections) parser for Node.js.
+
+
+###Install
+
+ $ npm install muri
+
+###Use
+
+```js
+ var muri = require('muri');
+ var o = muri('mongodb://user:pass@local,remote:27018,japan:27019/neatdb?replicaSet=myreplset&journal=true&w=2&wtimeoutMS=50');
+
+ console.log(o);
+
+ { hosts: [ { host: 'local', port: 27017 },
+ { host: 'remote', port: 27018 },
+ { host: 'japan', port: 27019 } ],
+ db: 'neatdb',
+ options: {
+ replicaSet: 'myreplset',
+ journal: true,
+ w: 2,
+ wtimeoutMS: 50
+ },
+ auth: {
+ user: 'user',
+ pass: 'pass'
+ }
+ }
+```
+
+### Details
+
+The returned object contains the following properties:
+
+- db: the name of the database. defaults to "admin" if not specified
+- auth: if auth is specified, this object will exist `{ user: 'username', pass: 'password' }`
+- hosts: array of host/port objects, one for each specified `[{ host: 'local', port: 27107 }, { host: '..', port: port }]`
+ - if a port is not specified for a given host, the default port (27017) is used
+ - if a unix domain socket is passed, host/port will be undefined and `ipc` will be set to the value specified `[{ ipc: '/tmp/mongodb-27017' }]`
+- options: this is a hash of all options specified in the querystring
+
+[LICENSE](https://github.com/aheckmann/muri/blob/master/LICENSE)
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/index.js
new file mode 100644
index 0000000..f7b65dd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/index.js
@@ -0,0 +1 @@
+module.exports = exports = require('./lib');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/lib/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/lib/index.js
new file mode 100644
index 0000000..410399e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/lib/index.js
@@ -0,0 +1,241 @@
+// muri
+
+/**
+ * MongoDB URI parser as described here:
+ * http://www.mongodb.org/display/DOCS/Connections
+ */
+
+/**
+ * Module dependencies
+ */
+
+var qs = require('querystring');
+
+/**
+ * Defaults
+ */
+
+var DEFAULT_PORT = 27017;
+var DEFAULT_DB = 'test';
+var ADMIN_DB = 'admin';
+
+/**
+ * Muri
+ */
+
+module.exports = exports = function muri (str) {
+ if (!/^mongodb:\/\//.test(str)) {
+ throw new Error('Invalid mongodb uri. Must begin with "mongodb://"'
+ + '\n Received: ' + str);
+ }
+
+ var ret = {
+ hosts: []
+ , db: DEFAULT_DB
+ , options: {}
+ }
+
+ var match = /^mongodb:\/\/([^?]+)(\??.*)$/.exec(str);
+ if (!match || '/' == match[1]) {
+ throw new Error('Invalid mongodb uri. Missing hostname');
+ }
+
+ var uris = match[1];
+ var path = match[2];
+ var db;
+
+ uris.split(',').forEach(function (uri) {
+ var o = parse(uri);
+
+ if (o.host) {
+ ret.hosts.push({
+ host: o.host
+ , port: parseInt(o.port, 10)
+ })
+
+ if (!db && o.db) {
+ db = o.db;
+ }
+ } else if (o.ipc) {
+ ret.hosts.push({ ipc: o.ipc });
+ }
+
+ if (o.auth) {
+ ret.auth = {
+ user: o.auth.user
+ , pass: o.auth.pass
+ }
+ }
+ })
+
+ if (!ret.hosts.length) {
+ throw new Error('Invalid mongodb uri. Missing hostname');
+ }
+
+ var parts = path.split('?');
+
+ if (!db) {
+ if (parts[0]) {
+ db = parts[0].replace(/^\//, '');
+ } else {
+ // deal with ipc formats
+ db = /\/([^\.]+)$/.exec(match[1]);
+ if (db && db[1]) {
+ db = db[1];
+ }
+ }
+ }
+
+ if (db) {
+ ret.db = db;
+ } else if (ret.auth) {
+ ret.db = ADMIN_DB;
+ }
+
+ if (parts[1]) {
+ ret.options = options(parts[1]);
+ }
+
+ return ret;
+}
+
+/**
+ * Parse str into key/val pairs casting values appropriately.
+ */
+
+function options (str) {
+ var sep = /;/.test(str)
+ ? ';'
+ : '&';
+
+ var ret = qs.parse(str, sep);
+
+ Object.keys(ret).forEach(function (key) {
+ var val = ret[key];
+ if ('readPreferenceTags' == key) {
+ val = readPref(val);
+ if (val) {
+ ret[key] = Array.isArray(val)
+ ? val
+ : [val];
+ }
+ } else {
+ ret[key] = format(val);
+ }
+ });
+
+ return ret;
+}
+
+function format (val) {
+ var num;
+
+ if ('true' == val) {
+ return true;
+ } else if ('false' == val) {
+ return false;
+ } else {
+ num = parseInt(+val, 10);
+ if (!isNaN(num)) {
+ return num;
+ }
+ }
+
+ return val;
+}
+
+function readPref (val) {
+ var ret;
+
+ if (Array.isArray(val)) {
+ ret = val.map(readPref).filter(Boolean);
+ return ret.length
+ ? ret
+ : undefined
+ }
+
+ var pair = val.split(',');
+ var hasKeys;
+ ret = {};
+
+ pair.forEach(function (kv) {
+ kv = (kv || '').trim();
+ if (!kv) return;
+ hasKeys = true;
+ var split = kv.split(':');
+ ret[split[0]] = format(split[1]);
+ });
+
+ return hasKeys && ret;
+}
+
+var ipcRgx = /\.sock/;
+
+function parse (uriString) {
+ // do not use require('url').parse b/c it can't handle # in username or pwd
+ // mongo uris are strange
+
+ var uri = uriString;
+ var ret = {};
+ var parts;
+ var auth;
+ var ipcs;
+
+ // skip protocol
+ uri = uri.replace(/^mongodb:\/\//, '');
+
+ // auth
+ if (/@/.test(uri)) {
+ parts = uri.split(/@/);
+ auth = parts[0];
+ uri = parts[1];
+
+ parts = auth.split(':');
+ ret.auth = {};
+ ret.auth.user = parts[0];
+ ret.auth.pass = parts[1];
+ }
+
+ // unix domain sockets
+ if (ipcRgx.test(uri)) {
+ ipcs = uri.split(ipcRgx);
+ ret.ipc = ipcs[0] + '.sock';
+
+ // included a database?
+ if (ipcs[1]) {
+ // strip leading / from database name
+ ipcs[1] = ipcs[1].replace(/^\//, '');
+
+ if (ipcs[1]) {
+ ret.db = ipcs[1];
+ }
+ }
+
+ return ret;
+ }
+
+ // database name
+ parts = uri.split('/');
+ if (parts[1]) ret.db = parts[1];
+
+ // ipv6, [ip]:host
+ if (/^\[[^\]]+\]:\d+/.test(parts[0])) {
+ ret.host = parts[0].substring(1, parts[0].indexOf(']:'));
+ ret.port = parts[0].substring(parts[0].indexOf(']:') + ']:'.length);
+ } else {
+ // host:port
+ parts = parts[0].split(':');
+ ret.host = parts[0];
+ ret.port = parts[1] || DEFAULT_PORT;
+ }
+
+ return ret;
+}
+
+/**
+ * Version
+ */
+
+module.exports.version = JSON.parse(
+ require('fs').readFileSync(__dirname + '/../package.json', 'utf8')
+).version;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/package.json
new file mode 100644
index 0000000..998f4ff
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/package.json
@@ -0,0 +1,60 @@
+{
+ "name": "muri",
+ "version": "1.1.1",
+ "description": "MongoDB URI parser",
+ "main": "index.js",
+ "scripts": {
+ "test": "make test"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/aheckmann/muri.git"
+ },
+ "keywords": [
+ "mongodb",
+ "uri",
+ "parser"
+ ],
+ "author": {
+ "name": "Aaron Heckmann",
+ "email": "aaron.heckmann+github@gmail.com"
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "mocha": "1.21.5"
+ },
+ "gitHead": "21e47551051dfed98a441c152066a5ab3229a1ce",
+ "bugs": {
+ "url": "https://github.com/aheckmann/muri/issues"
+ },
+ "homepage": "https://github.com/aheckmann/muri#readme",
+ "_id": "muri@1.1.1",
+ "_shasum": "64bd904eaf8ff89600c994441fad3c5195905ac2",
+ "_from": "muri@1.1.1",
+ "_npmVersion": "3.9.5",
+ "_nodeVersion": "6.2.2",
+ "_npmUser": {
+ "name": "vkarpov15",
+ "email": "val@karpov.io"
+ },
+ "dist": {
+ "shasum": "64bd904eaf8ff89600c994441fad3c5195905ac2",
+ "tarball": "https://registry.npmjs.org/muri/-/muri-1.1.1.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "aaron",
+ "email": "aaron.heckmann+github@gmail.com"
+ },
+ {
+ "name": "vkarpov15",
+ "email": "val@karpov.io"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/muri-1.1.1.tgz_1474924467144_0.3518297451082617"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/muri/-/muri-1.1.1.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/test/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/test/index.js
new file mode 100644
index 0000000..7fc1e3e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/muri/test/index.js
@@ -0,0 +1,328 @@
+
+var muri = require('../')
+var assert = require('assert')
+
+describe('muri', function(){
+ it('must begin with mongodb://', function(done){
+ assert.throws(function () {
+ muri('localhost:27017');
+ }, /Invalid mongodb uri/);
+ assert.doesNotThrow(function () {
+ muri('mongodb://localhost:27017');
+ })
+ done();
+ })
+
+ describe('user:password', function(done){
+ it('is optional', function(done){
+ var uri = 'mongodb://local:27017';
+ var val = muri(uri);
+ assert.ok(!val.auth);
+ done();
+ })
+
+ it('parses properly', function(done){
+ var uri = 'mongodb://user:password@local:27017';
+ var val = muri(uri);
+ assert.ok(val.auth);
+ assert.equal('user', val.auth.user);
+ assert.equal('password', val.auth.pass);
+ done();
+ })
+
+ it('handles # in the username', function(done){
+ var uri = 'mongodb://us#er:password@local:27017';
+ var val = muri(uri);
+ assert.ok(val.auth);
+ assert.equal('us#er', val.auth.user);
+ assert.equal('password', val.auth.pass);
+ done();
+ })
+
+ it('handles # in the password', function(done){
+ var uri = 'mongodb://user:pa#ssword@local:27017';
+ var val = muri(uri);
+ assert.ok(val.auth);
+ assert.equal('user', val.auth.user);
+ assert.equal('pa#ssword', val.auth.pass);
+ done();
+ })
+ })
+
+ describe('host', function(){
+ it('must be specified', function(done){
+ assert.throws(function () {
+ muri('mongodb://');
+ }, /Missing host/)
+ assert.throws(function () {
+ muri('mongodb:///fake');
+ }, /Missing host/)
+ assert.throws(function () {
+ muri('mongodb://?yep');
+ }, /Missing host/)
+ assert.throws(function () {
+ muri('mongodb:///?yep');
+ }, /Missing host/)
+
+ var val = muri('mongodb://local');
+ assert.ok(Array.isArray(val.hosts));
+ assert.equal(1, val.hosts.length);
+ assert.equal('local', val.hosts[0].host);
+ done();
+ })
+
+ it('supports replica sets', function(done){
+ var val = muri('mongodb://local:27017,remote:27018,japan:99999');
+ assert.ok(Array.isArray(val.hosts));
+ assert.equal(3, val.hosts.length);
+ assert.equal('local', val.hosts[0].host);
+ assert.equal(27017, val.hosts[0].port);
+ assert.equal('remote', val.hosts[1].host);
+ assert.equal(27018, val.hosts[1].port);
+ assert.equal('japan', val.hosts[2].host);
+ assert.equal(99999, val.hosts[2].port);
+ done();
+ })
+ })
+
+ describe('port', function(){
+
+ describe('with single host', function(){
+ it('defaults to 27017 if not specified', function(done){
+ var val = muri('mongodb://local/');
+ assert.equal(27017, val.hosts[0].port);
+ done();
+ })
+
+ it('uses what is specified', function(done){
+ var val = muri('mongodb://local:27018');
+ assert.equal(27018, val.hosts[0].port);
+ done();
+ })
+ })
+
+ describe('with replica sets', function(){
+ var val;
+
+ before(function(){
+ val = muri('mongodb://local,remote:27018,another');
+ })
+
+ it('defaults to 27017 if not specified', function(done){
+ assert.equal(27017, val.hosts[0].port);
+ assert.equal(27017, val.hosts[2].port);
+ done();
+ })
+
+ it('uses what is specified', function(done){
+ assert.equal(27018, val.hosts[1].port);
+ done();
+ })
+ })
+ })
+
+ describe('database', function(){
+ it('default', function(done){
+ var val = muri('mongodb://localhost/');
+ assert.equal('test', val.db);
+ var val = muri('mongodb://localhost');
+ assert.equal('test', val.db);
+ done();
+ })
+ it('is overridable', function(done){
+ var val = muri('mongodb://localhost,a,x:34343,b/muri');
+ assert.equal('muri', val.db);
+ done();
+ })
+ it('works with multiple specified protocols', function(done){
+ var uri = 'mongodb://localhost:27020/testing,mongodb://localhost:27019,mongodb://localhost:27018'
+ var val = muri(uri);
+ assert.equal('testing', val.db);
+ done();
+ })
+ })
+
+ describe('querystring separator', function(){
+ it('can be ; ', function(done){
+ var val = muri('mongodb://muri/?replicaSet=myreplset;slaveOk=true;x=1');
+ assert.ok(val.options);
+ assert.equal(true, val.options.slaveOk);
+ assert.equal('myreplset', val.options.replicaSet);
+ assert.equal(1, val.options.x);
+ done();
+ })
+ it('can be & ', function(done){
+ var val = muri('mongodb://muri/?replicaSet=myreplset&slaveOk=true&x=1');
+ assert.ok(val.options);
+ assert.equal(true, val.options.slaveOk);
+ assert.equal('myreplset', val.options.replicaSet);
+ assert.equal(1, val.options.x);
+ done();
+ })
+ })
+
+ describe('readPref tags', function(){
+ describe('with & ', function(){
+ it('mongodb://localhost/?readPreferenceTags=dc:ny', function(done){
+ var val = muri('mongodb://localhost/?readPreferenceTags=dc:ny');
+ assert.equal('test', val.db);
+ assert.deepEqual([{ dc: 'ny' }], val.options.readPreferenceTags);
+ done();
+ })
+ it('mongodb://localhost/?readPreferenceTags=dc:ny,rack:1', function(done){
+ var val = muri('mongodb://localhost/?readPreferenceTags=dc:ny,rack:1');
+ assert.deepEqual([{ dc: 'ny', rack: 1 }], val.options.readPreferenceTags);
+ done();
+ })
+ it('mongodb://localhost/?readPreferenceTags=dc:ny,rack:1&readPreferenceTags=dc:sf,rack:2', function(done){
+ var val = muri('mongodb://localhost/?readPreferenceTags=dc:ny,rack:1&readPreferenceTags=dc:sf,rack:2');
+ assert.deepEqual([{ dc: 'ny', rack: 1 }, { dc: 'sf', rack: 2 }], val.options.readPreferenceTags);
+ done();
+ })
+ it('mongodb://localhost/db?readPreferenceTags=dc:ny,rack:1&readPreferenceTags=dc:sf,rack:2&readPreferenceTags=', function(done){
+ var val = muri('mongodb://localhost/db?readPreferenceTags=dc:ny,rack:1&readPreferenceTags=dc:sf,rack:2&readPreferenceTags=');
+ assert.deepEqual([{ dc: 'ny', rack: 1 }, { dc: 'sf', rack: 2 }], val.options.readPreferenceTags);
+ done();
+ })
+ it('mongodb://localhost/?readPreferenceTags=dc:ny,rack:1&readPreferenceTags=dc:ny&readPreferenceTags=', function(done){
+ var val = muri('mongodb://localhost/?readPreferenceTags=dc:ny,rack:1&readPreferenceTags=dc:ny&readPreferenceTags=');
+ assert.deepEqual([{ dc: 'ny', rack: 1 }, { dc: 'ny' }], val.options.readPreferenceTags);
+ done();
+ })
+ })
+ describe('with ; ', function(){
+ it('mongodb://localhost/?readPreferenceTags=dc:ny,rack:1;readPreferenceTags=dc:sf,rack:2', function(done){
+ var val = muri('mongodb://localhost/?readPreferenceTags=dc:ny,rack:1;readPreferenceTags=dc:sf,rack:2');
+ assert.deepEqual([{ dc: 'ny', rack: 1 }, { dc: 'sf', rack: 2 }], val.options.readPreferenceTags);
+ done();
+ })
+ it('mongodb://localhost/db?readPreferenceTags=dc:ny,rack:1;readPreferenceTags=dc:sf,rack:2;readPreferenceTags=', function(done){
+ var val = muri('mongodb://localhost/db?readPreferenceTags=dc:ny,rack:1;readPreferenceTags=dc:sf,rack:2;readPreferenceTags=');
+ assert.deepEqual([{ dc: 'ny', rack: 1 }, { dc: 'sf', rack: 2 }], val.options.readPreferenceTags);
+ done();
+ })
+ it('mongodb://localhost/?readPreferenceTags=dc:ny,rack:1;readPreferenceTags=dc:ny;readPreferenceTags=', function(done){
+ var val = muri('mongodb://localhost/?readPreferenceTags=dc:ny,rack:1;readPreferenceTags=dc:ny;readPreferenceTags=');
+ assert.deepEqual([{ dc: 'ny', rack: 1 }, { dc: 'ny' }], val.options.readPreferenceTags);
+ done();
+ })
+ })
+ })
+
+ describe('unix domain sockets', function(){
+ it('without auth', function(done){
+ var val = muri('mongodb:///tmp/mongodb-27017.sock?safe=false');
+ assert.equal(val.db, 'test')
+ assert.ok(Array.isArray(val.hosts));
+ assert.equal(1, val.hosts.length);
+ assert.equal(val.hosts[0].ipc, '/tmp/mongodb-27017.sock')
+ assert.equal(val.hosts[0].host, undefined);
+ assert.equal(val.hosts[0].port, undefined);
+ assert.equal(false, val.options.safe);
+ done();
+ })
+ it('without auth with a database name', function(done){
+ var val = muri('mongodb:///tmp/mongodb-27017.sock/tester?safe=false');
+ assert.equal(val.db, 'tester')
+ assert.ok(Array.isArray(val.hosts));
+ assert.equal(1, val.hosts.length);
+ assert.equal(val.hosts[0].ipc, '/tmp/mongodb-27017.sock')
+ assert.equal(val.hosts[0].host, undefined);
+ assert.equal(val.hosts[0].port, undefined);
+ assert.equal(false, val.options.safe);
+ done();
+ })
+ it('with auth', function(done){
+ var val = muri('mongodb://user:password@/tmp/mongodb-27017.sock?safe=false');
+ assert.equal(val.db, 'admin')
+ assert.ok(Array.isArray(val.hosts));
+ assert.equal(1, val.hosts.length);
+ assert.equal(val.hosts[0].ipc, '/tmp/mongodb-27017.sock')
+ assert.equal(val.hosts[0].host, undefined);
+ assert.equal(val.hosts[0].port, undefined);
+ assert.equal(false, val.options.safe);
+ done();
+ })
+ it('with auth with a db name', function(done){
+ var val = muri('mongodb://user:password@/tmp/mongodb-27017.sock/tester?safe=false');
+ assert.equal(val.db, 'tester')
+ assert.ok(Array.isArray(val.hosts));
+ assert.equal(1, val.hosts.length);
+ assert.equal(val.hosts[0].ipc, '/tmp/mongodb-27017.sock')
+ assert.equal(val.hosts[0].host, undefined);
+ assert.equal(val.hosts[0].port, undefined);
+ assert.equal(false, val.options.safe);
+ done();
+ })
+ it('with auth + repl sets', function(done){
+ var val = muri('mongodb://user:password@/tmp/mongodb-27017.sock,/tmp/another-27018.sock?safe=false');
+ assert.equal(val.db, 'admin')
+ assert.ok(Array.isArray(val.hosts));
+ assert.equal(2, val.hosts.length);
+ assert.equal(val.hosts[0].ipc, '/tmp/mongodb-27017.sock')
+ assert.equal(val.hosts[0].host, undefined);
+ assert.equal(val.hosts[0].port, undefined);
+ assert.equal(val.hosts[1].ipc, '/tmp/another-27018.sock')
+ assert.equal(val.hosts[1].host, undefined);
+ assert.equal(val.hosts[1].port, undefined);
+ assert.equal(false, val.options.safe);
+ done();
+ })
+ it('with auth + repl sets with a db name', function(done){
+ var val = muri('mongodb://user:password@/tmp/mongodb-27017.sock,/tmp/another-27018.sock/tester?safe=false');
+ assert.equal(val.db, 'tester')
+ assert.ok(Array.isArray(val.hosts));
+ assert.equal(2, val.hosts.length);
+ assert.equal(val.hosts[0].ipc, '/tmp/mongodb-27017.sock')
+ assert.equal(val.hosts[0].host, undefined);
+ assert.equal(val.hosts[0].port, undefined);
+ assert.equal(val.hosts[1].ipc, '/tmp/another-27018.sock')
+ assert.equal(val.hosts[1].host, undefined);
+ assert.equal(val.hosts[1].port, undefined);
+ assert.equal(false, val.options.safe);
+ done();
+ })
+ })
+
+ it('all together now', function(done){
+ var uri = 'mongodb://u#ser:pas#s@local,remote:27018,japan:27019/neatdb'
+ uri += '?replicaSet=myreplset&journal=true&w=2&wtimeoutMS=50'
+ var val = muri(uri);
+
+ assert.equal('u#ser', val.auth.user);
+ assert.equal('pas#s', val.auth.pass);
+ assert.equal('neatdb', val.db);
+ assert.equal(3, val.hosts.length);
+ assert.equal('local', val.hosts[0].host);
+ assert.strictEqual(27017, val.hosts[0].port);
+ assert.equal('remote', val.hosts[1].host);
+ assert.strictEqual(27018, val.hosts[1].port);
+ assert.equal('japan', val.hosts[2].host);
+ assert.strictEqual(27019, val.hosts[2].port);
+ assert.equal('myreplset', val.options.replicaSet);
+ assert.equal(true, val.options.journal);
+ assert.equal(50, val.options.wtimeoutMS);
+ done();
+ });
+
+ it('ipv6', function(done) {
+ var uri = 'mongodb://[::1]:27017/test';
+ var val = muri(uri);
+ assert.equal(1, val.hosts.length);
+ assert.equal('::1', val.hosts[0].host);
+ assert.equal(27017, val.hosts[0].port);
+ done();
+ });
+
+ it('has a version', function(done){
+ assert.ok(muri.version);
+ done();
+ })
+
+ it('replica set name with a leading number', function(done){
+ var uri = 'mongodb://localhost:27017/test?replicaSet=1800-shard-0';
+ var val = muri(uri);
+ assert.equal('1800-shard-0', val.options.replicaSet);
+ done()
+ })
+})
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/.npmignore
new file mode 100644
index 0000000..be106ca
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/.npmignore
@@ -0,0 +1,2 @@
+*.sw*
+node_modules/
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/.travis.yml b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/.travis.yml
new file mode 100644
index 0000000..58f2371
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - 0.6
+ - 0.8
+ - 0.10
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/History.md
new file mode 100644
index 0000000..0beedfc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/History.md
@@ -0,0 +1,5 @@
+
+0.0.1 / 2013-04-17
+==================
+
+ * initial commit
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/LICENSE
new file mode 100644
index 0000000..98c7c89
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2013 [Aaron Heckmann](aaron.heckmann+github@gmail.com)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/Makefile b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/Makefile
new file mode 100644
index 0000000..6c8fb75
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/Makefile
@@ -0,0 +1,5 @@
+
+test:
+ @./node_modules/.bin/mocha $(T) --async-only $(TESTS)
+
+.PHONY: test
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/README.md
new file mode 100644
index 0000000..2aabe5c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/README.md
@@ -0,0 +1,18 @@
+#regexp-clone
+==============
+
+Clones RegExps with flag preservation
+
+```js
+var regexpClone = require('regexp-clone');
+
+var a = /somethin/g;
+console.log(a.global); // true
+
+var b = regexpClone(a);
+console.log(b.global); // true
+```
+
+## License
+
+[MIT](https://github.com/aheckmann/regexp-clone/blob/master/LICENSE)
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/index.js
new file mode 100644
index 0000000..e5850ca
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/index.js
@@ -0,0 +1,20 @@
+
+var toString = Object.prototype.toString;
+
+function isRegExp (o) {
+ return 'object' == typeof o
+ && '[object RegExp]' == toString.call(o);
+}
+
+module.exports = exports = function (regexp) {
+ if (!isRegExp(regexp)) {
+ throw new TypeError('Not a RegExp');
+ }
+
+ var flags = [];
+ if (regexp.global) flags.push('g');
+ if (regexp.multiline) flags.push('m');
+ if (regexp.ignoreCase) flags.push('i');
+ return new RegExp(regexp.source, flags.join(''));
+}
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/package.json
new file mode 100644
index 0000000..6b5f72c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/package.json
@@ -0,0 +1,47 @@
+{
+ "name": "regexp-clone",
+ "version": "0.0.1",
+ "description": "Clone RegExps with options",
+ "main": "index.js",
+ "scripts": {
+ "test": "make test"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/aheckmann/regexp-clone.git"
+ },
+ "keywords": [
+ "RegExp",
+ "clone"
+ ],
+ "author": {
+ "name": "Aaron Heckmann",
+ "email": "aaron.heckmann+github@gmail.com"
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "mocha": "1.8.1"
+ },
+ "readme": "#regexp-clone\n==============\n\nClones RegExps with flag preservation\n\n```js\nvar regexpClone = require('regexp-clone');\n\nvar a = /somethin/g;\nconsole.log(a.global); // true\n\nvar b = regexpClone(a);\nconsole.log(b.global); // true\n```\n\n## License\n\n[MIT](https://github.com/aheckmann/regexp-clone/blob/master/LICENSE)\n",
+ "readmeFilename": "README.md",
+ "_id": "regexp-clone@0.0.1",
+ "dist": {
+ "shasum": "a7c2e09891fdbf38fbb10d376fb73003e68ac589",
+ "tarball": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-0.0.1.tgz"
+ },
+ "_from": "regexp-clone@0.0.1",
+ "_npmVersion": "1.2.14",
+ "_npmUser": {
+ "name": "aaron",
+ "email": "aaron.heckmann+github@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "aaron",
+ "email": "aaron.heckmann+github@gmail.com"
+ }
+ ],
+ "directories": {},
+ "_shasum": "a7c2e09891fdbf38fbb10d376fb73003e68ac589",
+ "_resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-0.0.1.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/test/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/test/index.js
new file mode 100644
index 0000000..264a776
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/regexp-clone/test/index.js
@@ -0,0 +1,112 @@
+
+var assert = require('assert')
+var clone = require('../');
+
+describe('regexp-clone', function(){
+ function hasEqualSource (a, b) {
+ assert.ok(a !== b);
+ assert.equal(a.source, b.source);
+ }
+
+ function isInsensitive (a) {
+ assert.ok(a.ignoreCase);
+ }
+
+ function isGlobal (a) {
+ assert.ok(a.global);
+ }
+
+ function isMultiline (a) {
+ assert.ok(a.multiline);
+ }
+
+ function insensitiveFlag (a) {
+ var b = clone(a);
+ hasEqualSource(a, b);
+ isInsensitive(a);
+ isInsensitive(b);
+ }
+
+ function globalFlag (a) {
+ var b = clone(a);
+ hasEqualSource(a, b);
+ isGlobal(a);
+ isGlobal(b);
+ }
+
+ function multilineFlag (a) {
+ var b = clone(a);
+ hasEqualSource(a, b);
+ isMultiline(a);
+ isMultiline(b);
+ }
+
+ describe('literals', function(){
+ it('insensitive flag', function(done){
+ var a = /hello/i;
+ insensitiveFlag(a);
+ done();
+ })
+ it('global flag', function(done){
+ var a = /hello/g;
+ globalFlag(a);
+ done();
+ })
+ it('multiline flag', function(done){
+ var a = /hello/m;
+ multilineFlag(a);
+ done();
+ })
+ it('no flags', function(done){
+ var a = /hello/;
+ var b = clone(a);
+ hasEqualSource(a, b);
+ assert.ok(!a.insensitive);
+ assert.ok(!a.global);
+ assert.ok(!a.global);
+ done();
+ })
+ it('all flags', function(done){
+ var a = /hello/gim;
+ insensitiveFlag(a);
+ globalFlag(a);
+ multilineFlag(a);
+ done();
+ })
+ })
+
+ describe('instances', function(){
+ it('insensitive flag', function(done){
+ var a = new RegExp('hello', 'i');
+ insensitiveFlag(a);
+ done();
+ })
+ it('global flag', function(done){
+ var a = new RegExp('hello', 'g');
+ globalFlag(a);
+ done();
+ })
+ it('multiline flag', function(done){
+ var a = new RegExp('hello', 'm');
+ multilineFlag(a);
+ done();
+ })
+ it('no flags', function(done){
+ var a = new RegExp('hmm');
+ var b = clone(a);
+ hasEqualSource(a, b);
+ assert.ok(!a.insensitive);
+ assert.ok(!a.global);
+ assert.ok(!a.global);
+ done();
+ })
+ it('all flags', function(done){
+ var a = new RegExp('hello', 'gim');
+ insensitiveFlag(a);
+ globalFlag(a);
+ multilineFlag(a);
+ done();
+ })
+ })
+})
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/sliced/History.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/sliced/History.md
new file mode 100644
index 0000000..e45cefe
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/sliced/History.md
@@ -0,0 +1,41 @@
+
+1.0.1 / 2015-07-14
+==================
+
+ * fixed; missing file introduced in 4f5cea1
+
+1.0.0 / 2015-07-12
+==================
+
+ * Remove unnecessary files from npm package - #6 via joaquimserafim
+ * updated readme stats
+
+0.0.5 / 2013-02-05
+==================
+
+ * optimization: remove use of arguments [jkroso](https://github.com/jkroso)
+ * add scripts to component.json [jkroso](https://github.com/jkroso)
+ * tests; remove time for travis
+
+0.0.4 / 2013-01-07
+==================
+
+ * added component.json #1 [jkroso](https://github.com/jkroso)
+ * reversed array loop #1 [jkroso](https://github.com/jkroso)
+ * remove fn params
+
+0.0.3 / 2012-09-29
+==================
+
+ * faster with negative start args
+
+0.0.2 / 2012-09-29
+==================
+
+ * support full [].slice semantics
+
+0.0.1 / 2012-09-29
+===================
+
+ * initial release
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/sliced/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/sliced/LICENSE
new file mode 100644
index 0000000..38c529d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/sliced/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2012 [Aaron Heckmann](aaron.heckmann+github@gmail.com)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/sliced/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/sliced/README.md
new file mode 100644
index 0000000..b6ff85e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/sliced/README.md
@@ -0,0 +1,62 @@
+#sliced
+==========
+
+A faster alternative to `[].slice.call(arguments)`.
+
+[![Build Status](https://secure.travis-ci.org/aheckmann/sliced.png)](http://travis-ci.org/aheckmann/sliced)
+
+Example output from [benchmark.js](https://github.com/bestiejs/benchmark.js)
+
+ Array.prototype.slice.call x 1,401,820 ops/sec ±2.16% (90 runs sampled)
+ [].slice.call x 1,313,116 ops/sec ±2.04% (96 runs sampled)
+ cached slice.call x 10,297,910 ops/sec ±1.81% (96 runs sampled)
+ sliced x 19,906,019 ops/sec ±1.23% (89 runs sampled)
+ fastest is sliced
+
+ Array.prototype.slice.call(arguments, 1) x 1,373,238 ops/sec ±1.84% (95 runs sampled)
+ [].slice.call(arguments, 1) x 1,395,336 ops/sec ±1.36% (93 runs sampled)
+ cached slice.call(arguments, 1) x 9,926,018 ops/sec ±1.67% (92 runs sampled)
+ sliced(arguments, 1) x 20,747,990 ops/sec ±1.16% (93 runs sampled)
+ fastest is sliced(arguments, 1)
+
+ Array.prototype.slice.call(arguments, -1) x 1,319,908 ops/sec ±2.12% (91 runs sampled)
+ [].slice.call(arguments, -1) x 1,336,170 ops/sec ±1.33% (97 runs sampled)
+ cached slice.call(arguments, -1) x 10,078,718 ops/sec ±1.21% (98 runs sampled)
+ sliced(arguments, -1) x 20,471,474 ops/sec ±1.81% (92 runs sampled)
+ fastest is sliced(arguments, -1)
+
+ Array.prototype.slice.call(arguments, -2, -10) x 1,369,246 ops/sec ±1.68% (97 runs sampled)
+ [].slice.call(arguments, -2, -10) x 1,387,935 ops/sec ±1.70% (95 runs sampled)
+ cached slice.call(arguments, -2, -10) x 9,593,428 ops/sec ±1.23% (97 runs sampled)
+ sliced(arguments, -2, -10) x 23,178,931 ops/sec ±1.70% (92 runs sampled)
+ fastest is sliced(arguments, -2, -10)
+
+ Array.prototype.slice.call(arguments, -2, -1) x 1,441,300 ops/sec ±1.26% (98 runs sampled)
+ [].slice.call(arguments, -2, -1) x 1,410,326 ops/sec ±1.96% (93 runs sampled)
+ cached slice.call(arguments, -2, -1) x 9,854,419 ops/sec ±1.02% (97 runs sampled)
+ sliced(arguments, -2, -1) x 22,550,801 ops/sec ±1.86% (91 runs sampled)
+ fastest is sliced(arguments, -2, -1)
+
+_Benchmark [source](https://github.com/aheckmann/sliced/blob/master/bench.js)._
+
+##Usage
+
+`sliced` accepts the same arguments as `Array#slice` so you can easily swap it out.
+
+```js
+function zing () {
+ var slow = [].slice.call(arguments, 1, 8);
+ var args = slice(arguments, 1, 8);
+
+ var slow = Array.prototype.slice.call(arguments);
+ var args = slice(arguments);
+ // etc
+}
+```
+
+## install
+
+ npm install sliced
+
+
+[LICENSE](https://github.com/aheckmann/sliced/blob/master/LICENSE)
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/sliced/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/sliced/index.js
new file mode 100644
index 0000000..d88c85b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/sliced/index.js
@@ -0,0 +1,33 @@
+
+/**
+ * An Array.prototype.slice.call(arguments) alternative
+ *
+ * @param {Object} args something with a length
+ * @param {Number} slice
+ * @param {Number} sliceEnd
+ * @api public
+ */
+
+module.exports = function (args, slice, sliceEnd) {
+ var ret = [];
+ var len = args.length;
+
+ if (0 === len) return ret;
+
+ var start = slice < 0
+ ? Math.max(0, slice + len)
+ : slice || 0;
+
+ if (sliceEnd !== undefined) {
+ len = sliceEnd < 0
+ ? sliceEnd + len
+ : sliceEnd
+ }
+
+ while (len-- > start) {
+ ret[len - start] = args[len];
+ }
+
+ return ret;
+}
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/sliced/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/sliced/package.json
new file mode 100644
index 0000000..1d8cffc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/node_modules/sliced/package.json
@@ -0,0 +1,59 @@
+{
+ "name": "sliced",
+ "version": "1.0.1",
+ "description": "A faster Node.js alternative to Array.prototype.slice.call(arguments)",
+ "main": "index.js",
+ "files": [
+ "LICENSE",
+ "README.md",
+ "index.js"
+ ],
+ "scripts": {
+ "test": "make test"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/aheckmann/sliced"
+ },
+ "keywords": [
+ "arguments",
+ "slice",
+ "array"
+ ],
+ "author": {
+ "name": "Aaron Heckmann",
+ "email": "aaron.heckmann+github@gmail.com"
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "mocha": "1.5.0",
+ "benchmark": "~1.0.0"
+ },
+ "dependencies": {},
+ "gitHead": "e7c989016d2062995cd102322b65784ba8977ee3",
+ "bugs": {
+ "url": "https://github.com/aheckmann/sliced/issues"
+ },
+ "homepage": "https://github.com/aheckmann/sliced",
+ "_id": "sliced@1.0.1",
+ "_shasum": "0b3a662b5d04c3177b1926bea82b03f837a2ef41",
+ "_from": "sliced@1.0.1",
+ "_npmVersion": "2.8.3",
+ "_nodeVersion": "1.8.1",
+ "_npmUser": {
+ "name": "aaron",
+ "email": "aaron.heckmann+github@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "aaron",
+ "email": "aaron.heckmann+github@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "0b3a662b5d04c3177b1926bea82b03f837a2ef41",
+ "tarball": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/package.json
new file mode 100644
index 0000000..33534f1
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/package.json
@@ -0,0 +1,135 @@
+{
+ "name": "mongoose",
+ "description": "Mongoose MongoDB ODM",
+ "version": "4.7.1",
+ "author": {
+ "name": "Guillermo Rauch",
+ "email": "guillermo@learnboost.com"
+ },
+ "keywords": [
+ "mongodb",
+ "document",
+ "model",
+ "schema",
+ "database",
+ "odm",
+ "data",
+ "datastore",
+ "query",
+ "nosql",
+ "orm",
+ "db"
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "async": "2.1.2",
+ "bson": "~0.5.4",
+ "hooks-fixed": "1.2.0",
+ "kareem": "1.1.3",
+ "mongodb": "2.2.11",
+ "mpath": "0.2.1",
+ "mpromise": "0.5.5",
+ "mquery": "2.0.0",
+ "ms": "0.7.1",
+ "muri": "1.1.1",
+ "regexp-clone": "0.0.1",
+ "sliced": "1.0.1"
+ },
+ "devDependencies": {
+ "acquit": "0.4.1",
+ "acquit-ignore": "0.0.3",
+ "bluebird": "3.4.6",
+ "co": "4.6.0",
+ "dox": "0.3.1",
+ "eslint": "2.4.0",
+ "highlight.js": "7.0.1",
+ "istanbul": "0.4.4",
+ "jade": "0.26.3",
+ "lodash": "4.16.6",
+ "markdown": "0.3.1",
+ "marked": "0.3.6",
+ "mocha": "3.1.2",
+ "mongoose-long": "0.1.1",
+ "node-static": "0.7.7",
+ "power-assert": "1.4.1",
+ "q": "1.4.1",
+ "tbd": "0.6.4",
+ "uglify-js": "2.7.0",
+ "uuid": "2.0.3",
+ "validator": "5.4.0"
+ },
+ "browserDependencies": {
+ "browserify": "4.1.10",
+ "chai": "3.5.0",
+ "karma": "0.12.16",
+ "karma-chai": "0.1.0",
+ "karma-mocha": "0.1.4",
+ "karma-chrome-launcher": "0.1.4",
+ "karma-sauce-launcher": "0.2.8"
+ },
+ "directories": {
+ "lib": "./lib/mongoose"
+ },
+ "scripts": {
+ "fix-lint": "eslint . --fix",
+ "install-browser": "npm install `node format_deps.js`",
+ "test": "mocha test/*.test.js test/**/*.test.js",
+ "posttest": "eslint . --quiet",
+ "test-cov": "istanbul cover --report text --report html _mocha test/*.test.js"
+ },
+ "main": "./index.js",
+ "engines": {
+ "node": ">=0.6.19"
+ },
+ "bugs": {
+ "url": "https://github.com/Automattic/mongoose/issues/new",
+ "email": "mongoose-orm@googlegroups.com"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/Automattic/mongoose.git"
+ },
+ "homepage": "http://mongoosejs.com",
+ "browser": "lib/browser.js",
+ "gitHead": "8fabb12172b006624081bae32a76b49af7dcd415",
+ "_id": "mongoose@4.7.1",
+ "_shasum": "3842df23f5eb5db31d27311d2a3fb4cca2b5cd9e",
+ "_from": "mongoose@>=4.0.0 <5.0.0",
+ "_npmVersion": "3.10.8",
+ "_nodeVersion": "6.9.0",
+ "_npmUser": {
+ "name": "vkarpov15",
+ "email": "val@karpov.io"
+ },
+ "dist": {
+ "shasum": "3842df23f5eb5db31d27311d2a3fb4cca2b5cd9e",
+ "tarball": "https://registry.npmjs.org/mongoose/-/mongoose-4.7.1.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "rauchg",
+ "email": "rauchg@gmail.com"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "aaron",
+ "email": "aaron.heckmann+github@gmail.com"
+ },
+ {
+ "name": "vkarpov15",
+ "email": "val@karpov.io"
+ },
+ {
+ "name": "defunctzombie",
+ "email": "shtylman@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-18-east.internal.npmjs.com",
+ "tmp": "tmp/mongoose-4.7.1.tgz_1480555349621_0.35412858170457184"
+ },
+ "_resolved": "https://registry.npmjs.org/mongoose/-/mongoose-4.7.1.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/release-items.md b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/release-items.md
new file mode 100644
index 0000000..4d0471a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/release-items.md
@@ -0,0 +1,29 @@
+## mongoose release procedure
+
+1. tests must pass
+2. update package.json version
+3. update History.md using `git changelog` or similar. list the related ticket(s) #<TICKET_NUMBER> as well as a link to the github user who fixed it if applicable.
+4. git commit -m 'release x.x.x'
+5. git tag x.x.x
+6. git push origin BRANCH --tags && npm publish
+7. update mongoosejs.com (see "updating the website" below)
+8. tweet changelog link from [@mongoosejs](https://twitter.com/mongoosejs)
+9. Announce on mongoosejsteam slack channel
+10. change package.json version to next patch version suffixed with '-pre' and commit "now working on x.x.x"
+11. if this is a legacy release, `git merge` changes into master.
+
+## updating the website
+
+For 4.x
+
+0. Change to the master branch
+1. execute `make docs` (when this process completes you'll be on the gh-pages branch)
+2. `git commit -a -m 'docs: release 4.x.x'`
+3. `git push origin gh-pages`
+
+For 3.8.x:
+
+0. Change to the 3.8.x branch
+1. execute `make docs_legacy` (when this process completes you'll be on the gh-pages branch)
+2. `git commit -a -m 'website; regen <x.x.x>'`
+3. `git push origin gh-pages`
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/static.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/static.js
new file mode 100644
index 0000000..d84e59f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/static.js
@@ -0,0 +1,24 @@
+
+var static = require('node-static');
+var server = new static.Server('.', {cache: 0});
+
+require('http').createServer(function(req, res) {
+ if (req.url === '/favicon.ico') {
+ req.destroy();
+ res.statusCode = 204;
+ return res.end();
+ }
+
+ req.on('end', function() {
+ server.serve(req, res, function(err) {
+ if (err) {
+ console.error(err, req.url);
+ res.writeHead(err.status, err.headers);
+ res.end();
+ }
+ });
+ });
+ req.resume();
+}).listen(8088);
+
+console.error('now listening on http://localhost:8088');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/website.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/website.js
new file mode 100644
index 0000000..a1186a5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/website.js
@@ -0,0 +1,87 @@
+var fs = require('fs');
+var jade = require('jade');
+var package = require('./package');
+var hl = require('./docs/helpers/highlight');
+var linktype = require('./docs/helpers/linktype');
+var href = require('./docs/helpers/href');
+var klass = require('./docs/helpers/klass');
+
+// add custom jade filters
+require('./docs/helpers/filters')(jade);
+
+function getVersion() {
+ var hist = fs.readFileSync('./History.md', 'utf8').replace(/\r/g, '\n').split('\n');
+ for (var i = 0; i < hist.length; ++i) {
+ var line = (hist[i] || '').trim();
+ if (!line) {
+ continue;
+ }
+ var match = /^\s*([^\s]+)\s/.exec(line);
+ if (match && match[1]) {
+ return match[1];
+ }
+ }
+ throw new Error('no match found');
+}
+
+function getUnstable(ver) {
+ ver = ver.replace('-pre');
+ var spl = ver.split('.');
+ spl = spl.map(function(i) {
+ return parseInt(i, 10);
+ });
+ spl[1]++;
+ spl[2] = 'x';
+ return spl.join('.');
+}
+
+// use last release
+package.version = getVersion();
+package.unstable = getUnstable(package.version);
+
+var filemap = require('./docs/source');
+var files = Object.keys(filemap);
+
+function jadeify(filename, options, newfile) {
+ options = options || {};
+ options.package = package;
+ options.hl = hl;
+ options.linktype = linktype;
+ options.href = href;
+ options.klass = klass;
+ jade.renderFile(filename, options, function(err, str) {
+ if (err) {
+ console.error(err.stack);
+ return;
+ }
+
+ newfile = newfile || filename.replace('.jade', '.html');
+ fs.writeFile(newfile, str, function(err) {
+ if (err) {
+ console.error('could not write', err.stack);
+ } else {
+ console.log('%s : rendered ', new Date, newfile);
+ }
+ });
+ });
+}
+
+files.forEach(function(file) {
+ var filename = __dirname + '/' + file;
+ jadeify(filename, filemap[file]);
+
+ if (process.argv[2] === '--watch') {
+ fs.watchFile(filename, {interval: 1000}, function(cur, prev) {
+ if (cur.mtime > prev.mtime) {
+ jadeify(filename, filemap[file]);
+ }
+ });
+ }
+});
+
+var acquit = require('./docs/source/acquit');
+var acquitFiles = Object.keys(acquit);
+acquitFiles.forEach(function(file) {
+ var filename = __dirname + '/docs/acquit.jade';
+ jadeify(filename, acquit[file], __dirname + '/docs/' + file);
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/.npmignore b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/.npmignore
new file mode 100644
index 0000000..ecb3771
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/.npmignore
@@ -0,0 +1,18 @@
+lib-cov
+*.seed
+*.log
+*.csv
+*.dat
+*.out
+*.pid
+*.gz
+
+pids
+logs
+results
+
+npm-debug.log
+
+node_modules/
+
+coverage.html
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/.travis.yml b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/.travis.yml
new file mode 100644
index 0000000..a055764
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/.travis.yml
@@ -0,0 +1,5 @@
+services: mongodb
+language: node_js
+node_js:
+ - 0.11
+ - 0.10
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/Makefile b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/Makefile
new file mode 100644
index 0000000..2b17262
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/Makefile
@@ -0,0 +1,29 @@
+MOCHA_OPTS=
+REPORTER = dot
+
+check: test
+
+test: test-unit
+
+test-unit:
+ @NODE_ENV=test ./node_modules/.bin/mocha \
+ --reporter $(REPORTER) \
+ $(MOCHA_OPTS)
+
+test-acceptance:
+ @NODE_ENV=test ./node_modules/.bin/mocha \
+ --reporter $(REPORTER) \
+ --bail \
+ test/acceptance/*.js
+
+test-cov: lib-cov
+ @RESTFUL_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html
+
+lib-cov:
+ @jscoverage lib lib-cov
+
+clean:
+ rm -f coverage.html
+ rm -rf lib-cov
+
+.PHONY: test test-unit clean
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/README.md
new file mode 100644
index 0000000..ca59376
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/README.md
@@ -0,0 +1,254 @@
+[![build status](https://secure.travis-ci.org/baugarten/node-restful.png?branch=master)](http://travis-ci.org/baugarten/node-restful)
+
+node-restful
+============
+
+Create awesome APIs using express.
+
+Register mongoose resources and default RESTful routes are automatically made
+
+```js
+var express = require('express'),
+ bodyParser = require('body-parser'),
+ methodOverride = require('method-override'),
+ morgan = require('morgan'),
+ restful = require('node-restful'),
+ mongoose = restful.mongoose;
+var app = express();
+
+app.use(morgan('dev'));
+app.use(bodyParser.urlencoded({'extended':'true'}));
+app.use(bodyParser.json());
+app.use(bodyParser.json({type:'application/vnd.api+json'}));
+app.use(methodOverride());
+
+mongoose.connect("mongodb://localhost/resources");
+
+var Resource = app.resource = restful.model('resource', mongoose.Schema({
+ title: String,
+ year: Number,
+ }))
+ .methods(['get', 'post', 'put', 'delete']);
+
+Resource.register(app, '/resources');
+
+app.listen(3000);
+```
+
+Registers the following routes:
+
+ GET /resources
+ GET /resources/:id
+ POST /resources
+ PUT /resources/:id
+ DELETE /resources/:id
+
+which do exactly what you think they do!
+
+The best part is that `restful.model` returns a Mongoose model, so you can interact with it the same way that you're already accustomed to! (i.e. `new Resource`, `Resource.findById`, etc.)
+
+## Support
+
+This library is currently supported through complaint driven development, so if you see something, have a feature request, open an issue and if it seems to jive with the mission of the library, I'll prioritize it.
+
+## Install
+
+```
+npm install node-restful
+```
+
+## Usage
+
+There is a good example application under examples/movies.
+
+I will also show some features and use cases for them, how to set up routes, etc.
+
+### API
+
+There are a few functions that are available after we register the mongoose schema. The first one we already saw.
+
+`.methods([...])` takes a list of methods that should be available on the resource. Future calls to methods will override previously set values
+To disallow `delete` operations, simply run
+
+```js
+Resource.methods(['get', 'post', 'put'])
+```
+
+We can also run custom routes. We can add custom routes by calling `.route(path, handler)`
+
+```js
+Resource.route('recommend', function(req, res, next) {
+ res.send('I have a recommendation for you!');
+});
+```
+
+This will set up a route at `/resources/recommend`, which will be called on all HTTP methods. We can also restrict the HTTP method by adding it to the path:
+
+```js
+Resource.route('recommend.get', function(req, res, next) {
+ res.send('GET a recommendation');
+});
+Resource.route('recommend', ['get', 'put', 'delete'], function(req, res, next) { ... });
+```
+
+Or do some combination of HTTP methods.
+
+Now. Lets say we have to run arbitrary code before or after a route. Lets say we need to hash a password before a POST or PUT operation. Well, easy.
+
+```js
+Resource.before('post', hash_password)
+ .before('put', hash_password);
+
+function hash_password(req, res, next) {
+ req.body.password = hash(req.body.password);
+ next();
+}
+```
+
+Boy. That was easy. What about doing stuff after request, but before its sent back to the user? Restful stores the bundle of data to be returned in `res.locals` (see [express docs](http://expressjs.com/api.html#res.locals)). `res.locals.status_code` is the returned status code and `res.locals.bundle` is the bundle of data. In every before and after call, you are free to modify these are you see fit!
+
+```js
+Resource.after('get', function(req, res, next) {
+ var tmp = res.locals.bundle.title; // Lets swap the title and year fields because we're funny!
+ res.locals.bundle.title = res.locals.bundle.year;
+ res.locals.bundle.year = tmp;
+ next(); // Don't forget to call next!
+});
+
+Resource.after('recommend', do_something); // Runs after all HTTP verbs
+```
+
+Now, this is all great. But up until now we've really only talked about defining list routes, those at `/resources/route_name`. We can also define detail routes. Those look like this
+
+```js
+Resource.route('moreinfo', {
+ detail: true,
+ handler: function(req, res, next) {
+ // req.params.id holds the resource's id
+ res.send("I'm at /resources/:id/moreinfo!")
+ }
+});
+```
+I don't think this is the prettiest, and I'd be open to suggestions on how to beautify detail route definition...
+
+And that's everything for now!
+
+### Built-in Filters
+
+Node-restful accepts many options to manipulate the list results. These options can be added to your request either via the querystring or the POST body. They are passed into the mongoose query to filter your resultset.
+
+#### Selecting the entity-properties you need
+
+If you only need a few properties instead of the entire model, you can ask the service to only give just the properties you need:
+
+A `GET` request to `/users/?select=name%20email` will result in:
+
+```json
+[
+ {
+ "_id": "543adb9c7a0f149e3ac29438",
+ "name": "user1",
+ "email": "user1@test.com"
+ },
+ {
+ "_id": "543adb9c7a0f149e3ac2943b",
+ "name": "user2",
+ "email": "user2@test.com"
+ }
+]
+```
+
+#### Limiting the number and skipping items
+
+When implementing pagination you might want to use `skip` and `limit` filters. Both do exactly what their name says and just skip given amount of items or limit to a set amount of items.
+
+`/users/?limit=5` will give you the first 5 items
+`/users/?skip=5` will skip the first 5 and give you the rest
+`/users/?limit=5&skip=5` will skip the first 5 and then give you the second 5
+
+#### Sorting the result
+
+Getting a sorted list is as easy as adding a `sort` querystring parameter with the property you want to sort on. `/users/?sort=name` will give you a list sorted on the name property, with an ascending sort order.
+
+Changing the sort order uses the same rules as the string notation of [mongoose's sort filter](http://mongoosejs.com/docs/api.html#query_Query-sort). `/users/?sort=-name` will return the same list as before with a descending sort order.
+
+#### Filtering the results
+
+Sometimes you just want to get all people older than 18, or you are want to get all people living in a certain city. Then you would want to
+use filters for that. You can ask the service for equality, or values greater or less than, give it an array of values it should match to, or even a regex.
+
+| Filter | Query | Example | Description |
+|------------------------------|--------|------------------------------------------------------|---------------------------------|
+| **equal** | `equals` | `/users?gender=male` or `/users?gender__equals=male` | both return all male users |
+| **not equal** | `ne` | `/users?gender__ne=male` | returns all users who are not male (`female` and `x`) |
+| **greater than** | `gt` | `/users?age__gt=18` | returns all users older than 18 |
+| **greater than or equal to** | `gte` | `/users?age__gte=18` | returns all users 18 and older (age should be a number property) |
+| **less than** | `lt` | `/users?age__lt=30` | returns all users age 29 and younger |
+| **less than or equal to** | `lte` | `/users?age__lte=30` | returns all users age 30 and younger |
+| **in** | `in` | `/users?gender__in=female,male` | returns all female and male users |
+| **nin** | `nin` | `/users?age__nin=18,30` | returns all users with age other than 18 or 30 |
+| **Regex** | `regex` | `/users?username__regex=/^baugarten/i` | returns all users with a username starting with baugarten |
+
+### Populating a sub-entity
+
+When you have setup a mongoose Schema with properties referencing other entities, you can ask the service to populate them for you.
+
+A `GET` request to `/users/542edff9fffc55dd29d99346` will result in:
+
+```json
+{
+ "_id": "542edff9fffc55dd29d99346",
+ "name": "the employee",
+ "email": "employee@company.com",
+ "boss": "542edff9fffc55dd29d99343",
+ "__v": 0
+}
+```
+A `GET` request to `/users/542edff9fffc55dd29d99346?populate=boss` will result in:
+
+```json
+{
+ "_id": "542edff9fffc55dd29d99346",
+ "name": "the employee",
+ "email": "employee@company.com",
+ "boss": {
+ "_id": "542edff9fffc55dd29d99343",
+ "name": "the boss",
+ "email": "boss@company.com",
+ "__v": 0
+ },
+ "__v": 0
+}
+```
+
+
+
+---
+
+## Contributing
+
+You can view the issue list for what I'm working on, or contact me to help!
+
+Just reach out to [me](https://github.com/baugarten)
+
+## MIT License
+Copyright (c) 2012 by Ben Augarten
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/movies/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/movies/index.js
new file mode 100644
index 0000000..c3140fa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/movies/index.js
@@ -0,0 +1,132 @@
+var express = require('express'),
+ bodyParser = require('body-parser'),
+ methodOverride = require('method-override'),
+ mongoose = require('mongoose'),
+ morgan = require('morgan'),
+ restful = require('../../');
+var app = module.exports = express();
+
+app.use(morgan('dev'));
+app.use(bodyParser.urlencoded({'extended':'true'}));
+app.use(bodyParser.json());
+app.use(bodyParser.json({type:'application/vnd.api+json'}));
+app.use(methodOverride());
+app.set('view engine', 'jade');
+
+app.mongoose = mongoose; // used for testing
+
+mongoose.connect("mongodb://localhost/movies_test");
+
+var user = app.user = restful.model('users', mongoose.Schema({
+ username: { type: 'string', required: true },
+ pass_hash: { type: 'number', required: true }
+ }))
+ .methods(['get', 'post', 'put', 'delete'])
+ .before('get', function(req, res, next) {
+ req.body.limit = 1;
+ next()
+ })
+ .removeOptions({
+ sort: 'field -username'
+ })
+ .includeSchema(false);
+
+
+var movie = app.movie = restful.model("movies", mongoose.Schema({
+ title: { type: 'string', required: true },
+ year: { type: 'number', required: true },
+ creator: {type: 'ObjectId', ref: 'users' },
+ genre: {type: 'ObjectId', ref: 'genres'},
+ comments: [{
+ body: {type: 'String'},
+ date: {type: 'Date'},
+ author: { type: 'ObjectId', ref: 'users' }
+ }],
+ meta: {
+ productionco: 'string',
+ director: { type: 'ObjectId', ref: 'users' }
+ },
+ secret: { type: 'string', select: false }
+ }));
+
+movie.methods([
+ {
+ method: 'get',
+ before: noop,
+ after: noop
+ },
+ 'post',
+ 'put',
+ 'delete'])
+ .updateOptions({ new: true })
+ .route('recommend', function(req, res, next) {
+ res.locals.status_code = 200;
+ res.locals.bundle.recommend = 'called';
+ next();
+ })
+ .route('anotherroute', function(req, res, next) {
+ res.writeHead(200, {'Content-Type': 'application/json' });
+ res.write(JSON.stringify({
+ anotherroute: "called"
+ }));
+ res.end(); // This ends the request and prevents any after filters from executing
+ })
+ .route('athirdroute', {
+ handler: function(req, res, next) {
+ res.locals.status_code = 200; // Store response status code
+ res.locals.bundle = {
+ athirdroute: "called" // And response data
+ };
+ next(); // Call *after* filters and then return the response
+ },
+ methods: ['get', 'post'],
+ detail: true // Will mount the route at the detail endpoint /movies/:id/athirdroute
+ })
+ .route('pshh', {
+ handler: [function(req, res, next) {
+ next();
+ }, function(req, res, next) {
+ next();
+ }, function(req, res, next) {
+ res.locals.status_code = 200;
+ res.locals.bundle = {
+ pshh: "called"
+ };
+ next();
+ }],
+ methods: ['get', 'post']
+ })
+ .before('post', noop) // before a POST, execute noop
+ .after('post', noop)
+ .before('put', noop)
+ .after('put', noop)
+ .after('recommend', after)
+ .after('athirdroute', after);
+
+var genre = app.genre = restful.model("genres", mongoose.Schema({
+ name: { type: 'string', required: true }
+ }));
+genre.methods(['get', 'put', 'delete']);
+genre.shouldUseAtomicUpdate = false;
+
+var review = app.genre = restful.model("reviews", mongoose.Schema({
+ body: { type: 'string', required: true },
+ length: { type: Number, min: 0, required: true} // https://github.com/baugarten/node-restful/issues/116
+ }));
+review.methods(['get', 'put', 'delete']);
+
+user.register(app, '/users');
+movie.register(app, '/api/movies');
+genre.register(app, '/api/genres');
+review.register(app, '/api/reviews');
+
+if (!module.parent) {
+ app.listen(3000);
+}
+
+function noop(req, res, next) { next(); }
+function after(req, res, next) {
+ res.locals.bundle.after = 'called';
+ next();
+}
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes.js
new file mode 100644
index 0000000..57efc5b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes.js
@@ -0,0 +1,79 @@
+var express = require('express'),
+ bodyParser = require('body-parser'),
+ methodOverride = require('method-override'),
+ mongoose = require('mongoose'),
+ morgan = require('morgan'),
+ restful = require('../');
+// Make a new Express app
+var app = module.exports = express();
+
+// Connect to mongodb
+mongoose.connect("mongodb://localhost/restful");
+
+// Use middleware to parse POST data and use custom HTTP methods
+app.use(morgan('dev'));
+app.use(bodyParser.urlencoded({'extended':'true'}));
+app.use(bodyParser.json());
+app.use(bodyParser.json({type:'application/vnd.api+json'}));
+app.use(methodOverride());
+
+var hashPassword = function(req, res, next) {
+ if (!req.body.password)
+ return next({ status: 400, err: "No password!" }); // We can also throw an error from a before route
+ req.body.password = bcrypt.hashSync(req.body.password, 10); // Using bcrypt
+ return next(); // Call the handler
+}
+
+var sendEmail = function(req, res, next) {
+ // We can get the user from res.bundle and status code from res.status and
+ // trigger an error by calling next(err) or populate information that would otherwise be miggins
+ next(); // I'll just pass though
+}
+
+var User = restful.model( "users", mongoose.Schema({
+ username: 'string',
+ password_hash: 'string',
+ }))
+ .methods(['get', 'put', 'delete', {
+ method: 'post',
+ before: hashPassword, // Before we make run the default POST to create a user, we want to hash the password (implementation omitted)
+ after: sendEmail, // After we register them, we will send them a confirmation email
+ }]);
+
+User.register(app, '/user'); // Register the user model at the localhost:3000/user
+
+var validateUser = function(req, res, next) {
+ if (!req.body.creator) {
+ return next({ status: 400, err: "Notes need a creator" });
+ }
+ User.Model.findById(req.body.creator, function(err, model) {
+ if (!model) return next(restful.objectNotFound());
+ return next();
+ });
+}
+
+var Note = restful.model("note", mongoose.Schema({
+ title: { type: 'string', required: true},
+ body: { type: 'string', required: true},
+ creator: { type: 'ObjectId', ref: 'user', require: true},
+ }))
+ .methods(['get', 'delete', { method: 'post', before: validateUser }, { method: 'put', before: validateUser }]);
+
+Note.register(app, '/note');
+
+User.route("notes", {
+ handler: function(req, res, next, err, model) { // we get err and model parameters on detail routes (model being the one model that was found)
+ Note.Model.find({ creator: model._id }, function(err, list) {
+ if (err) return next({ status: 500, err: "Something went wrong" });
+ //res.status is the status code
+ res.status = 200;
+
+ // res.bundle is what is returned, serialized to JSON
+ res.bundle = list;
+ return next();
+ });
+ },
+ detail: true, // detail routes operate on a single instance, i.e. /user/:id
+ methods: ['get'], // only respond to GET requests
+});
+app.listen(3000);
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/index.js
new file mode 100644
index 0000000..6299c33
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/index.js
@@ -0,0 +1,25 @@
+var express = require('express'),
+ bodyParser = require('body-parser'),
+ methodOverride = require('method-override'),
+ mongoose = require('mongoose'),
+ morgan = require('morgan'),
+ restful = require('../');
+var app = module.exports = express();
+
+// Connect to mongodb -- used to store the models
+mongoose.connect("mongodb://localhost/expressmvc");
+
+app.use(morgan('dev'));
+app.use(bodyParser.urlencoded({'extended':'true'}));
+app.use(bodyParser.json());
+app.use(bodyParser.json({type:'application/vnd.api+json'}));
+app.use(methodOverride());
+
+// expose a list of models to register
+var models = require('./models/index');
+models.forEach(function(model) {
+ console.log("Register " + model.resourceName);
+ model.register(app, '/' + model.resourceName);
+});
+
+app.listen(3000);
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/models/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/models/index.js
new file mode 100644
index 0000000..203375e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/models/index.js
@@ -0,0 +1,11 @@
+var User = require('./user'),
+ Notes = require('./note'),
+ userroutes = require('../routes/user');
+
+console.log(userroutes);
+for (var route in userroutes) {
+ User.userroute(route, userroutes[route]);
+}
+
+exports = module.exports = [User, Notes];
+
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/models/note.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/models/note.js
new file mode 100644
index 0000000..b62861a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/models/note.js
@@ -0,0 +1,28 @@
+var restful = require('../../../'),
+ mongoose = require('mongoose'),
+ User = require('./user');
+
+var validateUser = function(req, res, next) {
+ console.log("Add User");
+ if (req.body.creator) {
+ User.Obj.findById(req.body.creator, function(err, model) {
+ if (!model) {
+ return next(restful.objectNotFound());
+ }
+ next();
+ });
+ }
+ next(); // Required, so error later
+}
+
+var Note = new restful.Model({
+ title: "note",
+ methods: ['get', 'delete', { type: 'post', before: validateUser }, { type: 'put', before: validateUser }],
+ schema: mongoose.Schema({
+ title: { type: 'string', required: true},
+ body: { type: 'string', required: true},
+ creator: { type: 'ObjectId', ref: 'user', require: true},
+ }),
+});
+
+exports = module.exports = Note;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/models/user.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/models/user.js
new file mode 100644
index 0000000..384e318
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/models/user.js
@@ -0,0 +1,13 @@
+var restful = require('../../..'),
+ mongoose = require('mongoose');
+
+var User = new restful.Model({
+ title: 'user',
+ methods: ['get', 'post', 'put', 'delete'],
+ schema: mongoose.Schema({
+ username: 'string',
+ password: 'string',
+ }),
+});
+
+exports = module.exports = User;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/routes/user.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/routes/user.js
new file mode 100644
index 0000000..f9ad33e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/routes/user.js
@@ -0,0 +1,22 @@
+var User = require('../models/user'),
+ Note = require('../models/note');
+
+// Here we can add custom route endpoints
+exports = module.exports = {
+ // an endpoint called notes
+ notes: {
+ handler: function(req, res, next, err, model) {
+ Note.Obj.find({ creator: model._id }, function(err, list) {
+ if (err) next({ status: 404 }); // Error handling
+ //res.status is the status code
+ res.status = 200;
+
+ // res.bundle is what is returned
+ res.bundle = list;
+ next();
+ });
+ },
+ detail: true, // detail makes sure we have one model to work on i.e. /user/:id/note is the uri
+ methods: ['get'], // only respond to GET requests
+ },
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/index.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/index.js
new file mode 100644
index 0000000..08a6795
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/index.js
@@ -0,0 +1,3 @@
+module.exports = process.env.RESTFUL_COV
+ ? require('./lib-cov/restful')
+ : require('./lib/restful');
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/lib/handlers.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/lib/handlers.js
new file mode 100644
index 0000000..8423310
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/lib/handlers.js
@@ -0,0 +1,221 @@
+var _ = require('underscore');
+
+/*
+ * The last handler to be called in the chain of middleware
+ * This figures out what response format it should be in and sends it
+ */
+exports.last = function(req, res, next) {
+ if (res.locals.bundle) {
+ if (req.body.format === 'js') {
+ return res.send(res.locals.bundle);
+ } else if (req.body.format === 'html' || req.query.format === 'html') {
+ return res.render(this.templateRoot + '/' + req.templatePath, res.locals.bundle);
+ } else {
+ return res.status(res.locals.status_code).json(res.locals.bundle);
+ }
+ }
+ res.send();
+};
+
+exports.schema = function(req, res, next) {
+ // We can mount a model to multiple apps, so we need to get the base url from the request url
+ var baseuri = req.url.split('/');
+ baseuri = baseuri.slice(0, baseuri.length - 1).join('/');
+ var detailuri = baseuri + '/:id';
+ exports.respond(res, 200, {
+ resource: this.modelName,
+ allowed_methods: Object.keys(this.allowed_methods),
+ list_uri: baseuri,
+ detail_uri: detailuri,
+ fields: keep(this.schema.paths, ['regExp', 'path', 'instance', 'isRequired'])
+ });
+ next();
+};
+
+exports.get = function(req, res, next) {
+ req.quer.exec(function(err, list) {
+ if (err) {
+ exports.respond(res, 500, err);
+ } else if (req.params.id) {
+ exports.respondOrErr(res, 404, !list && exports.objectNotFound(), 200, (list && _.isArray(list)) ? list[0] : list);
+ } else {
+ exports.respondOrErr(res, 500, err, 200, list);
+ }
+ next();
+ });
+};
+
+exports.getDetail = function(req, res, next) {
+ req.quer.exec(function(err, one) {
+ exports.respondOrErr(res, 500, err, 200, one);
+ next();
+ });
+};
+
+/**
+ * Generates a handler that returns the object at @param pathName
+ * where pathName is the path to an objectId field
+ */
+exports.getPath = function(pathName) {
+ return function(req, res, next) {
+ req.quer = req.quer.populate(pathName);
+ req.quer.exec(function(err, one) {
+ var errStatus = ((err && err.status) ? err.status : 500);
+ exports.respondOrErr(res, errStatus, err, 200, (one && one.get(pathName)) || {});
+ next();
+ });
+ };
+};
+
+exports.post = function(req, res, next) {
+ var obj = new this(req.body);
+ obj.save(function(err) {
+ exports.respondOrErr(res, 400, err, 201, obj);
+ next();
+ });
+};
+
+exports.put = function(req, res, next) {
+ // Remove immutable ObjectId from update attributes to prevent request failure
+ if (req.body._id && req.body._id === req.params.id) {
+ delete req.body._id;
+ }
+
+ // Update in 1 atomic operation on the database if not specified otherwise
+ if (this.shouldUseAtomicUpdate) {
+ req.quer.findOneAndUpdate({}, req.body, this.update_options, function(err, newObj) {
+ if (err) {
+ exports.respond(res, 500, err);
+ } else if (!newObj) {
+ exports.respond(res, 404, exports.objectNotFound());
+ } else {
+ exports.respond(res, 200, newObj);
+ }
+ next();
+ });
+ } else {
+ // Preform the update in two operations allowing mongoose to fire its schema update hook
+ req.quer.findOne({"_id": req.params.id}, function(err, docToUpdate) {
+ if (err) {
+ exports.respond(res, 500, err);
+ }
+ var objNotFound = !docToUpdate && exports.objectNotFound();
+ if (objNotFound) {
+ exports.respond(res, 404, objNotFound);
+ return next();
+ }
+
+ docToUpdate.set(req.body);
+ docToUpdate.save(function (err, obj) {
+ exports.respondOrErr(res, 400, err, 200, obj);
+ next();
+ });
+ });
+ }
+};
+
+exports.delete = function(req, res, next) {
+ // Delete in 1 atomic operation on the database if not specified otherwise
+ if (this.shouldUseAtomicUpdate) {
+ req.quer.findOneAndRemove({}, this.delete_options, function(err, obj) {
+ if (err) {
+ exports.respond(res, 500, err);
+ }
+ exports.respondOrErr(res, 404, !obj && exports.objectNotFound(), 204, {});
+ next();
+ });
+ } else {
+ // Preform the remove in two steps allowing mongoose to fire its schema update hook
+ req.quer.findOne({"_id": req.params.id}, function(err, docToRemove) {
+ if (err) {
+ exports.respond(res, 500, err);
+ }
+ var objNotFound = !docToRemove && exports.objectNotFound();
+ if (objNotFound) {
+ exports.respond(res, 404, objNotFound);
+ return next();
+ }
+
+ docToRemove.remove(function (err, obj) {
+ exports.respondOrErr(res, 400, err, 204, {});
+ next();
+ });
+ });
+ }
+};
+
+// I'm going to leave these here because it might be nice to have standardized
+// error messages for common failures
+
+exports.objectNotFound = function() {
+ return {
+ status: 404,
+ message: 'Object not found',
+ name: 'ObjectNotFound',
+ errors: {
+ _id: {
+ message: "Could not find object with specified attributes"
+ }
+ }
+ };
+};
+exports.respond404 = function() {
+ return {
+ status: 404,
+ message: 'Page Not Found',
+ name: "PageNotFound",
+ errors: 'Endpoint not found for model ' + this.modelName
+ };
+};
+exports.authFailure = function() {
+ return {
+ status: 401,
+ message: 'Unauthorized',
+ name: "Unauthorized",
+ errors: 'Operation not authorzed on ' + this.modelName
+ };
+};
+exports.badRequest = function(errobj) {
+ return {
+ status: 400,
+ message: 'Bad Request',
+ name: "BadRequest",
+ errors: errobj || "Your request was invalid"
+ };
+};
+
+/**
+ * Takes a response, error, success statusCode and success payload
+ *
+ * If there is an error, it returns a 400 with the error as the payload
+ * If there is no error, it returns statusCode with the specified payload
+ *
+ */
+exports.respondOrErr = function(res, errStatusCode, err, statusCode, content) {
+ if (err) {
+ exports.respond(res, errStatusCode, err);
+ } else {
+ exports.respond(res, statusCode, content);
+ }
+};
+
+exports.respond = function(res, statusCode, content) {
+ res.locals.status_code = statusCode;
+ res.locals.bundle = content;
+};
+
+function keep(obj, keepers) {
+ var result = {};
+ for (var key in obj) {
+ result[key] = {};
+ for (var key2 in obj[key]) {
+ if (keepers.indexOf(key2) > -1) {
+ result[key][key2] = obj[key][key2];
+ }
+ if ('schema' === key2) {
+ result[key][key2] = keep(obj[key][key2].paths, keepers);
+ }
+ }
+ }
+ return result;
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/lib/model.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/lib/model.js
new file mode 100644
index 0000000..1531498
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/lib/model.js
@@ -0,0 +1,479 @@
+var mongoose = require('mongoose'),
+ _ = require('underscore'),
+ Model = mongoose.Model,
+ handlers = require('./handlers');
+
+exports = module.exports = model;
+
+var methods = ['get', 'post', 'put', 'delete'], // All HTTP methods, PATCH not currently supported
+ endpoints = ['get', 'post', 'put', 'delete', 'getDetail'],
+ defaultroutes = ['schema'],
+ lookup = {
+ 'get': 'index',
+ 'getDetail': 'show',
+ 'put': 'updated',
+ 'post': 'created',
+ 'delete': 'deleted'
+ },
+ valid_alterables = filterable({
+ 'populate': query('populate'),
+ }, {});
+ valid_filters = filterable({
+ 'limit': query('limit'),
+ 'skip': query('skip'),
+ 'offset': query('offset'),
+ 'select': query('select'),
+ 'sort': query('sort'),
+ }, {
+ 'equals': query('equals'),
+ 'gte': query('gte'),
+ 'gt': query('gt'),
+ 'lt': query('lt'),
+ 'lte': query('lte'),
+ 'ne': query('ne'),
+ 'regex': function(val, query) {
+ var regParts = val.match(/^\/(.*?)\/([gim]*)$/);
+ if (regParts) {
+ // the parsed pattern had delimiters and modifiers. handle them.
+ val = new RegExp(regParts[1], regParts[2]);
+ } else {
+ // we got pattern string without delimiters
+ val = new RegExp(val);
+ }
+
+ return query.regex(val);
+ },
+ 'in': query('in'),
+ 'nin': query('nin'),
+ });
+ defaults = function() {
+ return {
+ routes: {},
+ allowed_methods: {
+ get: { detail: false }
+ },
+ update_options: {},
+ remove_options: {},
+ templateRoot: '',
+ shouldIncludeSchema: true,
+ shouldUseAtomicUpdate: true
+ };
+ };
+
+/**
+ * Returns the model associated with the given name or
+ * registers the model with mongoose
+ */
+function model() {
+ var result = mongoose.model.apply(mongoose, arguments),
+ default_properties = defaults();
+ if (1 === arguments.length) return result;
+
+ for (var key in default_properties) {
+ result[key] = default_properties[key];
+ }
+
+ return result;
+}
+
+Model.includeSchema = function(shouldIncludeSchema) {
+ this.shouldIncludeSchema = shouldIncludeSchema;
+ return this;
+};
+
+Model.methods = function(newmethods) {
+ var self = this,
+ get = contains(newmethods, 'get');
+
+ methods.forEach(function(method) {
+ delete self.routes[method];
+ });
+
+ this.allowed_methods = [];
+ if (!Array.isArray(newmethods)) {
+ newmethods = [newmethods];
+ }
+ if (get && !contains(newmethods, 'getDetail')) {
+ newmethods.push({
+ method: 'getDetail',
+ before: (typeof get !== 'string') ? get.before : null,
+ after: (typeof get !== 'string') ? get.after : null
+ });
+ }
+ newmethods.forEach(function(meth) {
+ var method = meth.method;
+ if ('string' === typeof meth) {
+ method = meth;
+ meth = {};
+ }
+ if (!method) throw new Error("Method object must have a method property");
+ self.allowed_methods.push(method);
+
+ meth.handler = handlers[method];
+ meth.detail = (method !== 'get' && method !== 'post');
+ self.route(method, meth);
+ });
+ return this;
+};
+
+Model.updateOptions = function(options) {
+ this['update_options'] = options;
+ return this;
+};
+
+Model.removeOptions = function(options) {
+ this['remove_options'] = options;
+ return this;
+};
+
+Model.template = function(templatePath) {
+ if (templatePath.substr(-1) == '/') {
+ templatePath = templatePath.substr(0, templatePath.length - 1);
+ }
+ this.templateRoot = templatePath;
+ return this;
+};
+
+/**
+ * Adds the default routes for the HTTP methods and one to get the schema
+ */
+Model.addDefaultRoutes = function() {
+ if (this.shouldIncludeSchema) {
+ this.route('schema', handlers.schema);
+ }
+ this.addSchemaRoutes();
+};
+
+Model.addSchemaRoutes = function() {
+ var self = this;
+ this.schema.eachPath(function(pathName, schemaType) {
+ if (pathName.indexOf('_id') === -1 && schemaType.instance === 'ObjectID') {
+ // Right now, getting nested models is the only operation supported
+ ['get'].forEach(function(method) {
+ self.route(pathName, method , {
+ handler: handlers[method + 'Path'].call(self, pathName),
+ detail: true
+ });
+ });
+ }
+ });
+};
+
+/**
+ * Adds an internal route for a path and method or methods to a function
+ *
+ * @param {String|Object} path: absolute path (including method) or object of routes
+ * @param {String|Function} method: the method to route to or the handler function
+ * @param {Function} fn: The handler function
+ * @return {Model} for chaining
+ * @api public
+ */
+Model.route = function(path, method, fn) {
+ var route = getRoute(this.routes, path),
+ meths = methods, // Default to all methods
+ lastPath = path.substr(path.lastIndexOf('.') + 1);
+
+ if (2 === arguments.length) {
+ fn = method;
+ if (!fn.methods && endpoints.indexOf(lastPath) > -1) {
+ meths = [lastPath];
+ } else if (fn.methods) {
+ meths = fn.methods;
+ }
+ } else {
+ meths = [method];
+ }
+
+ if (fn) {
+ fn = normalizeHandler(fn);
+
+ meths.forEach(function(meth) {
+ route[meth] = merge(route[meth], fn);
+ });
+ }
+ return this;
+};
+
+Model.before = function(path, method, fn) {
+ if (2 == arguments.length) {
+ arguments[1] = { before: arguments[1] };
+ }
+ return this.route.apply(this, arguments);
+};
+
+Model.after = function(path, method, fn) {
+ if (2 == arguments.length) {
+ arguments[1] = { after: arguments[1] };
+ }
+ return this.route.apply(this, arguments);
+};
+
+/**
+ * Registers all of the routes in routeObj to the given app
+ *
+ * TODO(baugarten): refactor to make less ugly
+ *
+ * if (isEndpoint(routeObj, path)) { handleRegistration(app, prefix, path, routeObj); }
+ * else {
+ * for (var key in routeObj) { recurse }
+ * }
+ */
+Model.registerRoutes = function(app, prefix, path, routeObj) {
+ var self = this;
+ for (var key in routeObj) {
+ if (isEndpoint(routeObj, key)) {
+ var route = routeObj[key];
+ var routehandlers = _.isArray(route.handler) ? route.handler : [route.handler];
+ routehandlers = _.map(routehandlers, function(handler) { return handler.bind(self); });
+ var detailGet = !route.detail && !path && key === 'get',
+ handlerlist = route.before.concat(
+ [preprocess.bind(self)],
+ routehandlers,
+ route.after,
+ [handlers.last]
+ );
+ /**
+ * TODO(baugarten): Add an enum type-thing to specify detail route, detail optional or list
+ * aka prettify this
+ */
+ if (route.detail) {
+ app[key](prefix + '/:id([0-9a-fA-F]{0,24})' + path , handlerlist);
+ } else if (detailGet) {
+ app[key](prefix + '/:id([0-9a-fA-F]{0,24}$)?', handlerlist);
+ } else {
+ app[key](prefix + path, handlerlist);
+ }
+ } else {
+ this.registerRoutes(app, prefix, path + '/' + key, routeObj[key]);
+ }
+ }
+};
+
+/**
+ * Registers this model to the given app
+ *
+ * This includes registering endpoints for all the methods desired
+ * in the model definition
+ *
+ */
+Model.register = function(app, url) {
+ this.addDefaultRoutes();
+ app.getDetail = app.get;
+ this.registerRoutes(app, url, '', this.routes);
+};
+
+// Will I still support handle()? I think maybe for default routes it might be nice, but
+// exposed via model.get, model.post, etc.
+/*Model.prototype.handle = function(route, filters, data, callback) {
+ if (arguments.length === 3) {
+ callback = data;
+ data = {};
+ } else if (arguments.length === 2) {
+ callback = filters;
+ filters = [];
+ data = {};
+ }
+ route = route.replace(/\//g, /\./);
+ data.format = 'js';
+ var req = {
+ url: route,
+ filters: filters,
+ body: data,
+ format: 'js',
+ }
+ var res = {
+ writeHeader: function() { },
+ write: function(ret) { callback(ret); },
+ send: function() {},
+ };
+ this.send(route.split(/\./), req, res);
+}
+
+Model.prototype.send = function(routes, req, res, next) {
+ var handler = this.routes;
+ req.quer = this.filter(req.filters, req.body, req.query, this.Model.find({}));
+ req.templatePath = this.template(routes, req.filters);
+ routes.forEach(function(route) {
+ if (route in handler) handler = handler[route];
+ else if (!('all' in handler)) {
+ handlers.respond(res, 404, handlers.respond404());
+ handlers.last(req, res);
+ }
+ });
+ if ('all' in handler) handler = handler.all;
+
+ if ('function' === typeof handler) {
+ return handler.call(this, req, res, next);
+ }
+
+ handlers.respond(res, 404, handlers.respond404());
+ handlers.last(req, res);
+}*/
+
+/**
+ * Returns a query filtered by the data in the request
+ * Looks in req.body and req.query to get the filterable data
+ * Filters the query based on functions in valid_filters
+ */
+Model.filter = function(req, quer) {
+ var detail = false; // detail route
+ // filter by id
+ if (req.params.id) {
+ quer = this.findById(req.params.id);
+ detail = true
+ }
+
+ [req.body, req.query, req.headers].forEach(function(alterableResponse) {
+ Object.keys(alterableResponse).filter(function(potential) {
+ return valid_alterables.contains(potential, quer);
+ }).forEach(function(valid_key) {
+ query = valid_alterables.filter(valid_key, alterableResponse[valid_key], quer);
+ });
+ });
+
+ if (!detail) {
+ [req.body, req.query, req.headers].forEach(function(filterableData) {
+ Object.keys(filterableData).filter(function(potential_filter) {
+ return valid_filters.contains(potential_filter, quer);
+ }).forEach(function(valid_key) {
+ quer = valid_filters.filter(valid_key, filterableData[valid_key], quer);
+ });
+ });
+ }
+ return quer;
+}
+
+function preprocess(req, res, next) {
+ req.body = req.body || {};
+ req.query = req.query || {};
+ req.quer = this.filter(req, this.find({}));
+ if (!('locals' in res)) {
+ res.locals = {};
+ }
+ res.locals.bundle = {};
+
+ req.templatePath = resolveTemplate(req);
+ next();
+}
+
+function query(key) {
+ return function(val, query) {
+ return query[key](val);
+ };
+}
+
+function haveOneModel(req) {
+ return !!req.params.id;
+}
+
+function resolveTemplate(req) {
+ var method = req.method.toLowerCase(),
+ tmplName;
+ if (methods.indexOf(method) > -1) {
+ if (haveOneModel(req) && method === 'get') {
+ method += 'Detail';
+ }
+ tmplName = lookup[method];
+ }
+ return tmplName;
+}
+
+/**
+ * Merges a route with another function object
+ * fn.before is called after the old before
+ * fn.after is called before the old after
+ * If fn.handler is specified, then route.handler is overwritten
+ */
+function merge(route, fn) {
+ if (!route) return fn;
+
+ route.before = route.before.concat(fn.before);
+ route.handler = fn.handler || route.handler;
+ route.after = fn.after.concat(route.after);
+ return route;
+}
+
+function getRoute(routes, path) {
+ path = path.replace(/\//g, /\./).split(/\./);
+ if (1 === path.length && '' === path[0]) { // we got the empty string
+ path = [];
+ }
+ if (endpoints.indexOf(path[path.length - 1]) > -1) {
+ path.splice(path.length - 1, 1);
+ }
+ path.forEach(function(sub, i) {
+ if (!routes[sub]) routes[sub] = {};
+ routes = routes[sub];
+ });
+ return routes;
+}
+
+function normalizeHandler(fn) {
+ var result = {};
+ result.handler = fn.handler;
+ result.detail = fn.detail;
+ if ({}.toString.call(fn) == '[object Function]') {
+ result = {
+ handler: fn
+ };
+ }
+ ['before', 'after'].forEach(function(hook) {
+ result[hook] = fn[hook] || [];
+ if (!Array.isArray(result[hook])) {
+ result[hook] = [ result[hook] ];
+ }
+ });
+ return result;
+}
+
+function isEndpoint(route, method) {
+ return endpoints.indexOf(method) > -1 && route[method].handler;
+}
+
+function contains(arr, key) {
+ if (arr.indexOf(key) > -1) return true;
+ for (var obj in arr) {
+ if (obj.method === key) {
+ return true;
+ }
+ }
+ return false;
+};
+
+function coerceData(filter_func, data) {
+ // Assume data is a string
+ if (data && data.toLowerCase && data.toLowerCase() === 'true') {
+ return true;
+ } else if (data && data.toLowerCase && data.toLowerCase() === 'false') {
+ return false;
+ } else if (filter_func === 'limit' || filter_func === 'skip') {
+ return parseInt(data);
+ }
+ return data;
+};
+
+function filterable(props, subfilters) {
+ return {
+ filter: function(key, val, quer) {
+ if (props[key]) {
+ return props[key](val, quer);
+ }
+ var field = key.split('__'),
+ filter_func = field[1] || 'equals',
+ data = coerceData(filter_func, val);
+
+ // Turn data into array for $in and $nin clause
+ if (filter_func === 'in' || filter_func === 'nin') {
+ data = data.split(',');
+ }
+
+ return subfilters[filter_func](data, quer.where(field[0]));
+ },
+ contains: function(key, quer) {
+ if (key in props) return true;
+ var field = key.split('__');
+ var filter_func = field[1] || 'equals';
+ return field[0] in quer.model.schema.paths && filter_func in subfilters;
+ }
+ }
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/lib/restful.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/lib/restful.js
new file mode 100644
index 0000000..0194a5b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/lib/restful.js
@@ -0,0 +1,7 @@
+var model = require('./model'),
+ handlers = require('./handlers'),
+ mongoose = require('mongoose');
+
+exports = module.exports = handlers;
+exports.model = model;
+exports.mongoose = mongoose;
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/LICENSE b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/LICENSE
new file mode 100644
index 0000000..ad0e71b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/LICENSE
@@ -0,0 +1,23 @@
+Copyright (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative
+Reporters & Editors
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/README.md b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/README.md
new file mode 100644
index 0000000..c2ba259
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/README.md
@@ -0,0 +1,22 @@
+ __
+ /\ \ __
+ __ __ ___ \_\ \ __ _ __ ____ ___ ___ _ __ __ /\_\ ____
+ /\ \/\ \ /' _ `\ /'_ \ /'__`\/\ __\/ ,__\ / ___\ / __`\/\ __\/'__`\ \/\ \ /',__\
+ \ \ \_\ \/\ \/\ \/\ \ \ \/\ __/\ \ \//\__, `\/\ \__//\ \ \ \ \ \//\ __/ __ \ \ \/\__, `\
+ \ \____/\ \_\ \_\ \___,_\ \____\\ \_\\/\____/\ \____\ \____/\ \_\\ \____\/\_\ _\ \ \/\____/
+ \/___/ \/_/\/_/\/__,_ /\/____/ \/_/ \/___/ \/____/\/___/ \/_/ \/____/\/_//\ \_\ \/___/
+ \ \____/
+ \/___/
+
+Underscore.js is a utility-belt library for JavaScript that provides
+support for the usual functional suspects (each, map, reduce, filter...)
+without extending any core JavaScript objects.
+
+For Docs, License, Tests, and pre-packed downloads, see:
+http://underscorejs.org
+
+Underscore is an open-sourced component of DocumentCloud:
+https://github.com/documentcloud
+
+Many thanks to our contributors:
+https://github.com/jashkenas/underscore/contributors
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/package.json
new file mode 100644
index 0000000..b4f3bda
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/package.json
@@ -0,0 +1,69 @@
+{
+ "name": "underscore",
+ "description": "JavaScript's functional programming helper library.",
+ "homepage": "http://underscorejs.org",
+ "keywords": [
+ "util",
+ "functional",
+ "server",
+ "client",
+ "browser"
+ ],
+ "author": {
+ "name": "Jeremy Ashkenas",
+ "email": "jeremy@documentcloud.org"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/jashkenas/underscore.git"
+ },
+ "main": "underscore.js",
+ "version": "1.8.3",
+ "devDependencies": {
+ "docco": "*",
+ "eslint": "0.6.x",
+ "karma": "~0.12.31",
+ "karma-qunit": "~0.1.4",
+ "qunit-cli": "~0.2.0",
+ "uglify-js": "2.4.x"
+ },
+ "scripts": {
+ "test": "npm run test-node && npm run lint",
+ "lint": "eslint underscore.js test/*.js",
+ "test-node": "qunit-cli test/*.js",
+ "test-browser": "npm i karma-phantomjs-launcher && ./node_modules/karma/bin/karma start",
+ "build": "uglifyjs underscore.js -c \"evaluate=false\" --comments \"/ .*/\" -m --source-map underscore-min.map -o underscore-min.js",
+ "doc": "docco underscore.js"
+ },
+ "license": "MIT",
+ "files": [
+ "underscore.js",
+ "underscore-min.js",
+ "underscore-min.map",
+ "LICENSE"
+ ],
+ "gitHead": "e4743ab712b8ab42ad4ccb48b155034d02394e4d",
+ "bugs": {
+ "url": "https://github.com/jashkenas/underscore/issues"
+ },
+ "_id": "underscore@1.8.3",
+ "_shasum": "4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022",
+ "_from": "underscore@1.8.3",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "jashkenas",
+ "email": "jashkenas@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "jashkenas",
+ "email": "jashkenas@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022",
+ "tarball": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/underscore-min.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/underscore-min.js
new file mode 100644
index 0000000..f01025b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/underscore-min.js
@@ -0,0 +1,6 @@
+// Underscore.js 1.8.3
+// http://underscorejs.org
+// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+// Underscore may be freely distributed under the MIT license.
+(function(){function n(n){function t(t,r,e,u,i,o){for(;i>=0&&o>i;i+=n){var a=u?u[i]:i;e=r(e,t[a],a,t)}return e}return function(r,e,u,i){e=b(e,i,4);var o=!k(r)&&m.keys(r),a=(o||r).length,c=n>0?0:a-1;return arguments.length<3&&(u=r[o?o[c]:c],c+=n),t(r,e,u,o,c,a)}}function t(n){return function(t,r,e){r=x(r,e);for(var u=O(t),i=n>0?0:u-1;i>=0&&u>i;i+=n)if(r(t[i],i,t))return i;return-1}}function r(n,t,r){return function(e,u,i){var o=0,a=O(e);if("number"==typeof i)n>0?o=i>=0?i:Math.max(i+a,o):a=i>=0?Math.min(i+1,a):i+a+1;else if(r&&i&&a)return i=r(e,u),e[i]===u?i:-1;if(u!==u)return i=t(l.call(e,o,a),m.isNaN),i>=0?i+o:-1;for(i=n>0?o:a-1;i>=0&&a>i;i+=n)if(e[i]===u)return i;return-1}}function e(n,t){var r=I.length,e=n.constructor,u=m.isFunction(e)&&e.prototype||a,i="constructor";for(m.has(n,i)&&!m.contains(t,i)&&t.push(i);r--;)i=I[r],i in n&&n[i]!==u[i]&&!m.contains(t,i)&&t.push(i)}var u=this,i=u._,o=Array.prototype,a=Object.prototype,c=Function.prototype,f=o.push,l=o.slice,s=a.toString,p=a.hasOwnProperty,h=Array.isArray,v=Object.keys,g=c.bind,y=Object.create,d=function(){},m=function(n){return n instanceof m?n:this instanceof m?void(this._wrapped=n):new m(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=m),exports._=m):u._=m,m.VERSION="1.8.3";var b=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}},x=function(n,t,r){return null==n?m.identity:m.isFunction(n)?b(n,t,r):m.isObject(n)?m.matcher(n):m.property(n)};m.iteratee=function(n,t){return x(n,t,1/0)};var _=function(n,t){return function(r){var e=arguments.length;if(2>e||null==r)return r;for(var u=1;e>u;u++)for(var i=arguments[u],o=n(i),a=o.length,c=0;a>c;c++){var f=o[c];t&&r[f]!==void 0||(r[f]=i[f])}return r}},j=function(n){if(!m.isObject(n))return{};if(y)return y(n);d.prototype=n;var t=new d;return d.prototype=null,t},w=function(n){return function(t){return null==t?void 0:t[n]}},A=Math.pow(2,53)-1,O=w("length"),k=function(n){var t=O(n);return"number"==typeof t&&t>=0&&A>=t};m.each=m.forEach=function(n,t,r){t=b(t,r);var e,u;if(k(n))for(e=0,u=n.length;u>e;e++)t(n[e],e,n);else{var i=m.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},m.map=m.collect=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=Array(u),o=0;u>o;o++){var a=e?e[o]:o;i[o]=t(n[a],a,n)}return i},m.reduce=m.foldl=m.inject=n(1),m.reduceRight=m.foldr=n(-1),m.find=m.detect=function(n,t,r){var e;return e=k(n)?m.findIndex(n,t,r):m.findKey(n,t,r),e!==void 0&&e!==-1?n[e]:void 0},m.filter=m.select=function(n,t,r){var e=[];return t=x(t,r),m.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e},m.reject=function(n,t,r){return m.filter(n,m.negate(x(t)),r)},m.every=m.all=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(!t(n[o],o,n))return!1}return!0},m.some=m.any=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(t(n[o],o,n))return!0}return!1},m.contains=m.includes=m.include=function(n,t,r,e){return k(n)||(n=m.values(n)),("number"!=typeof r||e)&&(r=0),m.indexOf(n,t,r)>=0},m.invoke=function(n,t){var r=l.call(arguments,2),e=m.isFunction(t);return m.map(n,function(n){var u=e?t:n[t];return null==u?u:u.apply(n,r)})},m.pluck=function(n,t){return m.map(n,m.property(t))},m.where=function(n,t){return m.filter(n,m.matcher(t))},m.findWhere=function(n,t){return m.find(n,m.matcher(t))},m.max=function(n,t,r){var e,u,i=-1/0,o=-1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],e>i&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(u>o||u===-1/0&&i===-1/0)&&(i=n,o=u)});return i},m.min=function(n,t,r){var e,u,i=1/0,o=1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],i>e&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(o>u||1/0===u&&1/0===i)&&(i=n,o=u)});return i},m.shuffle=function(n){for(var t,r=k(n)?n:m.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=m.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},m.sample=function(n,t,r){return null==t||r?(k(n)||(n=m.values(n)),n[m.random(n.length-1)]):m.shuffle(n).slice(0,Math.max(0,t))},m.sortBy=function(n,t,r){return t=x(t,r),m.pluck(m.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={};return r=x(r,e),m.each(t,function(e,i){var o=r(e,i,t);n(u,e,o)}),u}};m.groupBy=F(function(n,t,r){m.has(n,r)?n[r].push(t):n[r]=[t]}),m.indexBy=F(function(n,t,r){n[r]=t}),m.countBy=F(function(n,t,r){m.has(n,r)?n[r]++:n[r]=1}),m.toArray=function(n){return n?m.isArray(n)?l.call(n):k(n)?m.map(n,m.identity):m.values(n):[]},m.size=function(n){return null==n?0:k(n)?n.length:m.keys(n).length},m.partition=function(n,t,r){t=x(t,r);var e=[],u=[];return m.each(n,function(n,r,i){(t(n,r,i)?e:u).push(n)}),[e,u]},m.first=m.head=m.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:m.initial(n,n.length-t)},m.initial=function(n,t,r){return l.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},m.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:m.rest(n,Math.max(0,n.length-t))},m.rest=m.tail=m.drop=function(n,t,r){return l.call(n,null==t||r?1:t)},m.compact=function(n){return m.filter(n,m.identity)};var S=function(n,t,r,e){for(var u=[],i=0,o=e||0,a=O(n);a>o;o++){var c=n[o];if(k(c)&&(m.isArray(c)||m.isArguments(c))){t||(c=S(c,t,r));var f=0,l=c.length;for(u.length+=l;l>f;)u[i++]=c[f++]}else r||(u[i++]=c)}return u};m.flatten=function(n,t){return S(n,t,!1)},m.without=function(n){return m.difference(n,l.call(arguments,1))},m.uniq=m.unique=function(n,t,r,e){m.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=x(r,e));for(var u=[],i=[],o=0,a=O(n);a>o;o++){var c=n[o],f=r?r(c,o,n):c;t?(o&&i===f||u.push(c),i=f):r?m.contains(i,f)||(i.push(f),u.push(c)):m.contains(u,c)||u.push(c)}return u},m.union=function(){return m.uniq(S(arguments,!0,!0))},m.intersection=function(n){for(var t=[],r=arguments.length,e=0,u=O(n);u>e;e++){var i=n[e];if(!m.contains(t,i)){for(var o=1;r>o&&m.contains(arguments[o],i);o++);o===r&&t.push(i)}}return t},m.difference=function(n){var t=S(arguments,!0,!0,1);return m.filter(n,function(n){return!m.contains(t,n)})},m.zip=function(){return m.unzip(arguments)},m.unzip=function(n){for(var t=n&&m.max(n,O).length||0,r=Array(t),e=0;t>e;e++)r[e]=m.pluck(n,e);return r},m.object=function(n,t){for(var r={},e=0,u=O(n);u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},m.findIndex=t(1),m.findLastIndex=t(-1),m.sortedIndex=function(n,t,r,e){r=x(r,e,1);for(var u=r(t),i=0,o=O(n);o>i;){var a=Math.floor((i+o)/2);r(n[a])<u?i=a+1:o=a}return i},m.indexOf=r(1,m.findIndex,m.sortedIndex),m.lastIndexOf=r(-1,m.findLastIndex),m.range=function(n,t,r){null==t&&(t=n||0,n=0),r=r||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=Array(e),i=0;e>i;i++,n+=r)u[i]=n;return u};var E=function(n,t,r,e,u){if(!(e instanceof t))return n.apply(r,u);var i=j(n.prototype),o=n.apply(i,u);return m.isObject(o)?o:i};m.bind=function(n,t){if(g&&n.bind===g)return g.apply(n,l.call(arguments,1));if(!m.isFunction(n))throw new TypeError("Bind must be called on a function");var r=l.call(arguments,2),e=function(){return E(n,e,t,this,r.concat(l.call(arguments)))};return e},m.partial=function(n){var t=l.call(arguments,1),r=function(){for(var e=0,u=t.length,i=Array(u),o=0;u>o;o++)i[o]=t[o]===m?arguments[e++]:t[o];for(;e<arguments.length;)i.push(arguments[e++]);return E(n,r,this,this,i)};return r},m.bindAll=function(n){var t,r,e=arguments.length;if(1>=e)throw new Error("bindAll must be passed function names");for(t=1;e>t;t++)r=arguments[t],n[r]=m.bind(n[r],n);return n},m.memoize=function(n,t){var r=function(e){var u=r.cache,i=""+(t?t.apply(this,arguments):e);return m.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},m.delay=function(n,t){var r=l.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},m.defer=m.partial(m.delay,m,1),m.throttle=function(n,t,r){var e,u,i,o=null,a=0;r||(r={});var c=function(){a=r.leading===!1?0:m.now(),o=null,i=n.apply(e,u),o||(e=u=null)};return function(){var f=m.now();a||r.leading!==!1||(a=f);var l=t-(f-a);return e=this,u=arguments,0>=l||l>t?(o&&(clearTimeout(o),o=null),a=f,i=n.apply(e,u),o||(e=u=null)):o||r.trailing===!1||(o=setTimeout(c,l)),i}},m.debounce=function(n,t,r){var e,u,i,o,a,c=function(){var f=m.now()-o;t>f&&f>=0?e=setTimeout(c,t-f):(e=null,r||(a=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,o=m.now();var f=r&&!e;return e||(e=setTimeout(c,t)),f&&(a=n.apply(i,u),i=u=null),a}},m.wrap=function(n,t){return m.partial(t,n)},m.negate=function(n){return function(){return!n.apply(this,arguments)}},m.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},m.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},m.before=function(n,t){var r;return function(){return--n>0&&(r=t.apply(this,arguments)),1>=n&&(t=null),r}},m.once=m.partial(m.before,2);var M=!{toString:null}.propertyIsEnumerable("toString"),I=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];m.keys=function(n){if(!m.isObject(n))return[];if(v)return v(n);var t=[];for(var r in n)m.has(n,r)&&t.push(r);return M&&e(n,t),t},m.allKeys=function(n){if(!m.isObject(n))return[];var t=[];for(var r in n)t.push(r);return M&&e(n,t),t},m.values=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},m.mapObject=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=u.length,o={},a=0;i>a;a++)e=u[a],o[e]=t(n[e],e,n);return o},m.pairs=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},m.invert=function(n){for(var t={},r=m.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},m.functions=m.methods=function(n){var t=[];for(var r in n)m.isFunction(n[r])&&t.push(r);return t.sort()},m.extend=_(m.allKeys),m.extendOwn=m.assign=_(m.keys),m.findKey=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=0,o=u.length;o>i;i++)if(e=u[i],t(n[e],e,n))return e},m.pick=function(n,t,r){var e,u,i={},o=n;if(null==o)return i;m.isFunction(t)?(u=m.allKeys(o),e=b(t,r)):(u=S(arguments,!1,!1,1),e=function(n,t,r){return t in r},o=Object(o));for(var a=0,c=u.length;c>a;a++){var f=u[a],l=o[f];e(l,f,o)&&(i[f]=l)}return i},m.omit=function(n,t,r){if(m.isFunction(t))t=m.negate(t);else{var e=m.map(S(arguments,!1,!1,1),String);t=function(n,t){return!m.contains(e,t)}}return m.pick(n,t,r)},m.defaults=_(m.allKeys,!0),m.create=function(n,t){var r=j(n);return t&&m.extendOwn(r,t),r},m.clone=function(n){return m.isObject(n)?m.isArray(n)?n.slice():m.extend({},n):n},m.tap=function(n,t){return t(n),n},m.isMatch=function(n,t){var r=m.keys(t),e=r.length;if(null==n)return!e;for(var u=Object(n),i=0;e>i;i++){var o=r[i];if(t[o]!==u[o]||!(o in u))return!1}return!0};var N=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof m&&(n=n._wrapped),t instanceof m&&(t=t._wrapped);var u=s.call(n);if(u!==s.call(t))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case"[object Date]":case"[object Boolean]":return+n===+t}var i="[object Array]"===u;if(!i){if("object"!=typeof n||"object"!=typeof t)return!1;var o=n.constructor,a=t.constructor;if(o!==a&&!(m.isFunction(o)&&o instanceof o&&m.isFunction(a)&&a instanceof a)&&"constructor"in n&&"constructor"in t)return!1}r=r||[],e=e||[];for(var c=r.length;c--;)if(r[c]===n)return e[c]===t;if(r.push(n),e.push(t),i){if(c=n.length,c!==t.length)return!1;for(;c--;)if(!N(n[c],t[c],r,e))return!1}else{var f,l=m.keys(n);if(c=l.length,m.keys(t).length!==c)return!1;for(;c--;)if(f=l[c],!m.has(t,f)||!N(n[f],t[f],r,e))return!1}return r.pop(),e.pop(),!0};m.isEqual=function(n,t){return N(n,t)},m.isEmpty=function(n){return null==n?!0:k(n)&&(m.isArray(n)||m.isString(n)||m.isArguments(n))?0===n.length:0===m.keys(n).length},m.isElement=function(n){return!(!n||1!==n.nodeType)},m.isArray=h||function(n){return"[object Array]"===s.call(n)},m.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},m.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(n){m["is"+n]=function(t){return s.call(t)==="[object "+n+"]"}}),m.isArguments(arguments)||(m.isArguments=function(n){return m.has(n,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(m.isFunction=function(n){return"function"==typeof n||!1}),m.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},m.isNaN=function(n){return m.isNumber(n)&&n!==+n},m.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===s.call(n)},m.isNull=function(n){return null===n},m.isUndefined=function(n){return n===void 0},m.has=function(n,t){return null!=n&&p.call(n,t)},m.noConflict=function(){return u._=i,this},m.identity=function(n){return n},m.constant=function(n){return function(){return n}},m.noop=function(){},m.property=w,m.propertyOf=function(n){return null==n?function(){}:function(t){return n[t]}},m.matcher=m.matches=function(n){return n=m.extendOwn({},n),function(t){return m.isMatch(t,n)}},m.times=function(n,t,r){var e=Array(Math.max(0,n));t=b(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},m.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},m.now=Date.now||function(){return(new Date).getTime()};var B={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},T=m.invert(B),R=function(n){var t=function(t){return n[t]},r="(?:"+m.keys(n).join("|")+")",e=RegExp(r),u=RegExp(r,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};m.escape=R(B),m.unescape=R(T),m.result=function(n,t,r){var e=null==n?void 0:n[t];return e===void 0&&(e=r),m.isFunction(e)?e.call(n):e};var q=0;m.uniqueId=function(n){var t=++q+"";return n?n+t:t},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var K=/(.)^/,z={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\u2028|\u2029/g,L=function(n){return"\\"+z[n]};m.template=function(n,t,r){!t&&r&&(t=r),t=m.defaults({},t,m.templateSettings);var e=RegExp([(t.escape||K).source,(t.interpolate||K).source,(t.evaluate||K).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,o,a){return i+=n.slice(u,a).replace(D,L),u=a+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":o&&(i+="';\n"+o+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var o=new Function(t.variable||"obj","_",i)}catch(a){throw a.source=i,a}var c=function(n){return o.call(this,n,m)},f=t.variable||"obj";return c.source="function("+f+"){\n"+i+"}",c},m.chain=function(n){var t=m(n);return t._chain=!0,t};var P=function(n,t){return n._chain?m(t).chain():t};m.mixin=function(n){m.each(m.functions(n),function(t){var r=m[t]=n[t];m.prototype[t]=function(){var n=[this._wrapped];return f.apply(n,arguments),P(this,r.apply(m,n))}})},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=o[n];m.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==n&&"splice"!==n||0!==r.length||delete r[0],P(this,r)}}),m.each(["concat","join","slice"],function(n){var t=o[n];m.prototype[n]=function(){return P(this,t.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return m})}).call(this);
+//# sourceMappingURL=underscore-min.map \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/underscore-min.map b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/underscore-min.map
new file mode 100644
index 0000000..cf356bf
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/underscore-min.map
@@ -0,0 +1 @@
+{"version":3,"file":"underscore-min.js","sources":["underscore.js"],"names":["createReduce","dir","iterator","obj","iteratee","memo","keys","index","length","currentKey","context","optimizeCb","isArrayLike","_","arguments","createPredicateIndexFinder","array","predicate","cb","getLength","createIndexFinder","predicateFind","sortedIndex","item","idx","i","Math","max","min","slice","call","isNaN","collectNonEnumProps","nonEnumIdx","nonEnumerableProps","constructor","proto","isFunction","prototype","ObjProto","prop","has","contains","push","root","this","previousUnderscore","ArrayProto","Array","Object","FuncProto","Function","toString","hasOwnProperty","nativeIsArray","isArray","nativeKeys","nativeBind","bind","nativeCreate","create","Ctor","_wrapped","exports","module","VERSION","func","argCount","value","other","collection","accumulator","apply","identity","isObject","matcher","property","Infinity","createAssigner","keysFunc","undefinedOnly","source","l","key","baseCreate","result","MAX_ARRAY_INDEX","pow","each","forEach","map","collect","results","reduce","foldl","inject","reduceRight","foldr","find","detect","findIndex","findKey","filter","select","list","reject","negate","every","all","some","any","includes","include","fromIndex","guard","values","indexOf","invoke","method","args","isFunc","pluck","where","attrs","findWhere","computed","lastComputed","shuffle","rand","set","shuffled","random","sample","n","sortBy","criteria","sort","left","right","a","b","group","behavior","groupBy","indexBy","countBy","toArray","size","partition","pass","fail","first","head","take","initial","last","rest","tail","drop","compact","flatten","input","shallow","strict","startIndex","output","isArguments","j","len","without","difference","uniq","unique","isSorted","isBoolean","seen","union","intersection","argsLength","zip","unzip","object","findLastIndex","low","high","mid","floor","lastIndexOf","range","start","stop","step","ceil","executeBound","sourceFunc","boundFunc","callingContext","self","TypeError","bound","concat","partial","boundArgs","position","bindAll","Error","memoize","hasher","cache","address","delay","wait","setTimeout","defer","throttle","options","timeout","previous","later","leading","now","remaining","clearTimeout","trailing","debounce","immediate","timestamp","callNow","wrap","wrapper","compose","after","times","before","once","hasEnumBug","propertyIsEnumerable","allKeys","mapObject","pairs","invert","functions","methods","names","extend","extendOwn","assign","pick","oiteratee","omit","String","defaults","props","clone","tap","interceptor","isMatch","eq","aStack","bStack","className","areArrays","aCtor","bCtor","pop","isEqual","isEmpty","isString","isElement","nodeType","type","name","Int8Array","isFinite","parseFloat","isNumber","isNull","isUndefined","noConflict","constant","noop","propertyOf","matches","accum","Date","getTime","escapeMap","&","<",">","\"","'","`","unescapeMap","createEscaper","escaper","match","join","testRegexp","RegExp","replaceRegexp","string","test","replace","escape","unescape","fallback","idCounter","uniqueId","prefix","id","templateSettings","evaluate","interpolate","noMatch","escapes","\\","\r","\n","
","
","escapeChar","template","text","settings","oldSettings","offset","variable","render","e","data","argument","chain","instance","_chain","mixin","valueOf","toJSON","define","amd"],"mappings":";;;;CAKC,WA4KC,QAASA,GAAaC,GAGpB,QAASC,GAASC,EAAKC,EAAUC,EAAMC,EAAMC,EAAOC,GAClD,KAAOD,GAAS,GAAaC,EAARD,EAAgBA,GAASN,EAAK,CACjD,GAAIQ,GAAaH,EAAOA,EAAKC,GAASA,CACtCF,GAAOD,EAASC,EAAMF,EAAIM,GAAaA,EAAYN,GAErD,MAAOE,GAGT,MAAO,UAASF,EAAKC,EAAUC,EAAMK,GACnCN,EAAWO,EAAWP,EAAUM,EAAS,EACzC,IAAIJ,IAAQM,EAAYT,IAAQU,EAAEP,KAAKH,GACnCK,GAAUF,GAAQH,GAAKK,OACvBD,EAAQN,EAAM,EAAI,EAAIO,EAAS,CAMnC,OAJIM,WAAUN,OAAS,IACrBH,EAAOF,EAAIG,EAAOA,EAAKC,GAASA,GAChCA,GAASN,GAEJC,EAASC,EAAKC,EAAUC,EAAMC,EAAMC,EAAOC,IA+ZtD,QAASO,GAA2Bd,GAClC,MAAO,UAASe,EAAOC,EAAWP,GAChCO,EAAYC,EAAGD,EAAWP,EAG1B,KAFA,GAAIF,GAASW,EAAUH,GACnBT,EAAQN,EAAM,EAAI,EAAIO,EAAS,EAC5BD,GAAS,GAAaC,EAARD,EAAgBA,GAASN,EAC5C,GAAIgB,EAAUD,EAAMT,GAAQA,EAAOS,GAAQ,MAAOT,EAEpD,QAAQ,GAsBZ,QAASa,GAAkBnB,EAAKoB,EAAeC,GAC7C,MAAO,UAASN,EAAOO,EAAMC,GAC3B,GAAIC,GAAI,EAAGjB,EAASW,EAAUH,EAC9B,IAAkB,gBAAPQ,GACLvB,EAAM,EACNwB,EAAID,GAAO,EAAIA,EAAME,KAAKC,IAAIH,EAAMhB,EAAQiB,GAE5CjB,EAASgB,GAAO,EAAIE,KAAKE,IAAIJ,EAAM,EAAGhB,GAAUgB,EAAMhB,EAAS,MAE9D,IAAIc,GAAeE,GAAOhB,EAE/B,MADAgB,GAAMF,EAAYN,EAAOO,GAClBP,EAAMQ,KAASD,EAAOC,GAAO,CAEtC,IAAID,IAASA,EAEX,MADAC,GAAMH,EAAcQ,EAAMC,KAAKd,EAAOS,EAAGjB,GAASK,EAAEkB,OAC7CP,GAAO,EAAIA,EAAMC,GAAK,CAE/B,KAAKD,EAAMvB,EAAM,EAAIwB,EAAIjB,EAAS,EAAGgB,GAAO,GAAWhB,EAANgB,EAAcA,GAAOvB,EACpE,GAAIe,EAAMQ,KAASD,EAAM,MAAOC,EAElC,QAAQ,GAqPZ,QAASQ,GAAoB7B,EAAKG,GAChC,GAAI2B,GAAaC,EAAmB1B,OAChC2B,EAAchC,EAAIgC,YAClBC,EAASvB,EAAEwB,WAAWF,IAAgBA,EAAYG,WAAcC,EAGhEC,EAAO,aAGX,KAFI3B,EAAE4B,IAAItC,EAAKqC,KAAU3B,EAAE6B,SAASpC,EAAMkC,IAAOlC,EAAKqC,KAAKH,GAEpDP,KACLO,EAAON,EAAmBD,GACtBO,IAAQrC,IAAOA,EAAIqC,KAAUJ,EAAMI,KAAU3B,EAAE6B,SAASpC,EAAMkC,IAChElC,EAAKqC,KAAKH,GA74BhB,GAAII,GAAOC,KAGPC,EAAqBF,EAAK/B,EAG1BkC,EAAaC,MAAMV,UAAWC,EAAWU,OAAOX,UAAWY,EAAYC,SAASb,UAIlFK,EAAmBI,EAAWJ,KAC9Bd,EAAmBkB,EAAWlB,MAC9BuB,EAAmBb,EAASa,SAC5BC,EAAmBd,EAASc,eAK5BC,EAAqBN,MAAMO,QAC3BC,EAAqBP,OAAO3C,KAC5BmD,EAAqBP,EAAUQ,KAC/BC,EAAqBV,OAAOW,OAG1BC,EAAO,aAGPhD,EAAI,SAASV,GACf,MAAIA,aAAeU,GAAUV,EACvB0C,eAAgBhC,QACtBgC,KAAKiB,SAAW3D,GADiB,GAAIU,GAAEV,GAOlB,oBAAZ4D,UACa,mBAAXC,SAA0BA,OAAOD,UAC1CA,QAAUC,OAAOD,QAAUlD,GAE7BkD,QAAQlD,EAAIA,GAEZ+B,EAAK/B,EAAIA,EAIXA,EAAEoD,QAAU,OAKZ,IAAItD,GAAa,SAASuD,EAAMxD,EAASyD,GACvC,GAAIzD,QAAiB,GAAG,MAAOwD,EAC/B,QAAoB,MAAZC,EAAmB,EAAIA,GAC7B,IAAK,GAAG,MAAO,UAASC,GACtB,MAAOF,GAAKpC,KAAKpB,EAAS0D,GAE5B,KAAK,GAAG,MAAO,UAASA,EAAOC,GAC7B,MAAOH,GAAKpC,KAAKpB,EAAS0D,EAAOC,GAEnC,KAAK,GAAG,MAAO,UAASD,EAAO7D,EAAO+D,GACpC,MAAOJ,GAAKpC,KAAKpB,EAAS0D,EAAO7D,EAAO+D,GAE1C,KAAK,GAAG,MAAO,UAASC,EAAaH,EAAO7D,EAAO+D,GACjD,MAAOJ,GAAKpC,KAAKpB,EAAS6D,EAAaH,EAAO7D,EAAO+D,IAGzD,MAAO,YACL,MAAOJ,GAAKM,MAAM9D,EAASI,aAO3BI,EAAK,SAASkD,EAAO1D,EAASyD,GAChC,MAAa,OAATC,EAAsBvD,EAAE4D,SACxB5D,EAAEwB,WAAW+B,GAAezD,EAAWyD,EAAO1D,EAASyD,GACvDtD,EAAE6D,SAASN,GAAevD,EAAE8D,QAAQP,GACjCvD,EAAE+D,SAASR,GAEpBvD,GAAET,SAAW,SAASgE,EAAO1D,GAC3B,MAAOQ,GAAGkD,EAAO1D,EAASmE,KAI5B,IAAIC,GAAiB,SAASC,EAAUC,GACtC,MAAO,UAAS7E,GACd,GAAIK,GAASM,UAAUN,MACvB,IAAa,EAATA,GAAqB,MAAPL,EAAa,MAAOA,EACtC,KAAK,GAAII,GAAQ,EAAWC,EAARD,EAAgBA,IAIlC,IAAK,GAHD0E,GAASnE,UAAUP,GACnBD,EAAOyE,EAASE,GAChBC,EAAI5E,EAAKE,OACJiB,EAAI,EAAOyD,EAAJzD,EAAOA,IAAK,CAC1B,GAAI0D,GAAM7E,EAAKmB,EACVuD,IAAiB7E,EAAIgF,SAAc,KAAGhF,EAAIgF,GAAOF,EAAOE,IAGjE,MAAOhF,KAKPiF,EAAa,SAAS9C,GACxB,IAAKzB,EAAE6D,SAASpC,GAAY,QAC5B,IAAIqB,EAAc,MAAOA,GAAarB,EACtCuB,GAAKvB,UAAYA,CACjB,IAAI+C,GAAS,GAAIxB,EAEjB,OADAA,GAAKvB,UAAY,KACV+C,GAGLT,EAAW,SAASO,GACtB,MAAO,UAAShF,GACd,MAAc,OAAPA,MAAmB,GAAIA,EAAIgF,KAQlCG,EAAkB5D,KAAK6D,IAAI,EAAG,IAAM,EACpCpE,EAAYyD,EAAS,UACrBhE,EAAc,SAAS0D,GACzB,GAAI9D,GAASW,EAAUmD,EACvB,OAAwB,gBAAV9D,IAAsBA,GAAU,GAAe8E,GAAV9E,EASrDK,GAAE2E,KAAO3E,EAAE4E,QAAU,SAAStF,EAAKC,EAAUM,GAC3CN,EAAWO,EAAWP,EAAUM,EAChC,IAAIe,GAAGjB,CACP,IAAII,EAAYT,GACd,IAAKsB,EAAI,EAAGjB,EAASL,EAAIK,OAAYA,EAAJiB,EAAYA,IAC3CrB,EAASD,EAAIsB,GAAIA,EAAGtB,OAEjB,CACL,GAAIG,GAAOO,EAAEP,KAAKH,EAClB,KAAKsB,EAAI,EAAGjB,EAASF,EAAKE,OAAYA,EAAJiB,EAAYA,IAC5CrB,EAASD,EAAIG,EAAKmB,IAAKnB,EAAKmB,GAAItB,GAGpC,MAAOA,IAITU,EAAE6E,IAAM7E,EAAE8E,QAAU,SAASxF,EAAKC,EAAUM,GAC1CN,EAAWc,EAAGd,EAAUM,EAIxB,KAAK,GAHDJ,IAAQM,EAAYT,IAAQU,EAAEP,KAAKH,GACnCK,GAAUF,GAAQH,GAAKK,OACvBoF,EAAU5C,MAAMxC,GACXD,EAAQ,EAAWC,EAARD,EAAgBA,IAAS,CAC3C,GAAIE,GAAaH,EAAOA,EAAKC,GAASA,CACtCqF,GAAQrF,GAASH,EAASD,EAAIM,GAAaA,EAAYN,GAEzD,MAAOyF,IA+BT/E,EAAEgF,OAAShF,EAAEiF,MAAQjF,EAAEkF,OAAS/F,EAAa,GAG7Ca,EAAEmF,YAAcnF,EAAEoF,MAAQjG,GAAc,GAGxCa,EAAEqF,KAAOrF,EAAEsF,OAAS,SAAShG,EAAKc,EAAWP,GAC3C,GAAIyE,EAMJ,OAJEA,GADEvE,EAAYT,GACRU,EAAEuF,UAAUjG,EAAKc,EAAWP,GAE5BG,EAAEwF,QAAQlG,EAAKc,EAAWP,GAE9ByE,QAAa,IAAKA,KAAS,EAAUhF,EAAIgF,GAA7C,QAKFtE,EAAEyF,OAASzF,EAAE0F,OAAS,SAASpG,EAAKc,EAAWP,GAC7C,GAAIkF,KAKJ,OAJA3E,GAAYC,EAAGD,EAAWP,GAC1BG,EAAE2E,KAAKrF,EAAK,SAASiE,EAAO7D,EAAOiG,GAC7BvF,EAAUmD,EAAO7D,EAAOiG,IAAOZ,EAAQjD,KAAKyB,KAE3CwB,GAIT/E,EAAE4F,OAAS,SAAStG,EAAKc,EAAWP,GAClC,MAAOG,GAAEyF,OAAOnG,EAAKU,EAAE6F,OAAOxF,EAAGD,IAAaP,IAKhDG,EAAE8F,MAAQ9F,EAAE+F,IAAM,SAASzG,EAAKc,EAAWP,GACzCO,EAAYC,EAAGD,EAAWP,EAG1B,KAAK,GAFDJ,IAAQM,EAAYT,IAAQU,EAAEP,KAAKH,GACnCK,GAAUF,GAAQH,GAAKK,OAClBD,EAAQ,EAAWC,EAARD,EAAgBA,IAAS,CAC3C,GAAIE,GAAaH,EAAOA,EAAKC,GAASA,CACtC,KAAKU,EAAUd,EAAIM,GAAaA,EAAYN,GAAM,OAAO,EAE3D,OAAO,GAKTU,EAAEgG,KAAOhG,EAAEiG,IAAM,SAAS3G,EAAKc,EAAWP,GACxCO,EAAYC,EAAGD,EAAWP,EAG1B,KAAK,GAFDJ,IAAQM,EAAYT,IAAQU,EAAEP,KAAKH,GACnCK,GAAUF,GAAQH,GAAKK,OAClBD,EAAQ,EAAWC,EAARD,EAAgBA,IAAS,CAC3C,GAAIE,GAAaH,EAAOA,EAAKC,GAASA,CACtC,IAAIU,EAAUd,EAAIM,GAAaA,EAAYN,GAAM,OAAO,EAE1D,OAAO,GAKTU,EAAE6B,SAAW7B,EAAEkG,SAAWlG,EAAEmG,QAAU,SAAS7G,EAAKoB,EAAM0F,EAAWC,GAGnE,MAFKtG,GAAYT,KAAMA,EAAMU,EAAEsG,OAAOhH,KACd,gBAAb8G,IAAyBC,KAAOD,EAAY,GAChDpG,EAAEuG,QAAQjH,EAAKoB,EAAM0F,IAAc,GAI5CpG,EAAEwG,OAAS,SAASlH,EAAKmH,GACvB,GAAIC,GAAO1F,EAAMC,KAAKhB,UAAW,GAC7B0G,EAAS3G,EAAEwB,WAAWiF,EAC1B,OAAOzG,GAAE6E,IAAIvF,EAAK,SAASiE,GACzB,GAAIF,GAAOsD,EAASF,EAASlD,EAAMkD,EACnC,OAAe,OAARpD,EAAeA,EAAOA,EAAKM,MAAMJ,EAAOmD,MAKnD1G,EAAE4G,MAAQ,SAAStH,EAAKgF,GACtB,MAAOtE,GAAE6E,IAAIvF,EAAKU,EAAE+D,SAASO,KAK/BtE,EAAE6G,MAAQ,SAASvH,EAAKwH,GACtB,MAAO9G,GAAEyF,OAAOnG,EAAKU,EAAE8D,QAAQgD,KAKjC9G,EAAE+G,UAAY,SAASzH,EAAKwH,GAC1B,MAAO9G,GAAEqF,KAAK/F,EAAKU,EAAE8D,QAAQgD,KAI/B9G,EAAEc,IAAM,SAASxB,EAAKC,EAAUM,GAC9B,GACI0D,GAAOyD,EADPxC,GAAUR,IAAUiD,GAAgBjD,GAExC,IAAgB,MAAZzE,GAA2B,MAAPD,EAAa,CACnCA,EAAMS,EAAYT,GAAOA,EAAMU,EAAEsG,OAAOhH,EACxC,KAAK,GAAIsB,GAAI,EAAGjB,EAASL,EAAIK,OAAYA,EAAJiB,EAAYA,IAC/C2C,EAAQjE,EAAIsB,GACR2C,EAAQiB,IACVA,EAASjB,OAIbhE,GAAWc,EAAGd,EAAUM,GACxBG,EAAE2E,KAAKrF,EAAK,SAASiE,EAAO7D,EAAOiG,GACjCqB,EAAWzH,EAASgE,EAAO7D,EAAOiG,IAC9BqB,EAAWC,GAAgBD,KAAchD,KAAYQ,KAAYR,OACnEQ,EAASjB,EACT0D,EAAeD,IAIrB,OAAOxC,IAITxE,EAAEe,IAAM,SAASzB,EAAKC,EAAUM,GAC9B,GACI0D,GAAOyD,EADPxC,EAASR,IAAUiD,EAAejD,GAEtC,IAAgB,MAAZzE,GAA2B,MAAPD,EAAa,CACnCA,EAAMS,EAAYT,GAAOA,EAAMU,EAAEsG,OAAOhH,EACxC,KAAK,GAAIsB,GAAI,EAAGjB,EAASL,EAAIK,OAAYA,EAAJiB,EAAYA,IAC/C2C,EAAQjE,EAAIsB,GACA4D,EAARjB,IACFiB,EAASjB,OAIbhE,GAAWc,EAAGd,EAAUM,GACxBG,EAAE2E,KAAKrF,EAAK,SAASiE,EAAO7D,EAAOiG,GACjCqB,EAAWzH,EAASgE,EAAO7D,EAAOiG,IACnBsB,EAAXD,GAAwChD,MAAbgD,GAAoChD,MAAXQ,KACtDA,EAASjB,EACT0D,EAAeD,IAIrB,OAAOxC,IAKTxE,EAAEkH,QAAU,SAAS5H,GAInB,IAAK,GAAe6H,GAHhBC,EAAMrH,EAAYT,GAAOA,EAAMU,EAAEsG,OAAOhH,GACxCK,EAASyH,EAAIzH,OACb0H,EAAWlF,MAAMxC,GACZD,EAAQ,EAAiBC,EAARD,EAAgBA,IACxCyH,EAAOnH,EAAEsH,OAAO,EAAG5H,GACfyH,IAASzH,IAAO2H,EAAS3H,GAAS2H,EAASF,IAC/CE,EAASF,GAAQC,EAAI1H,EAEvB,OAAO2H,IAMTrH,EAAEuH,OAAS,SAASjI,EAAKkI,EAAGnB,GAC1B,MAAS,OAALmB,GAAanB,GACVtG,EAAYT,KAAMA,EAAMU,EAAEsG,OAAOhH,IAC/BA,EAAIU,EAAEsH,OAAOhI,EAAIK,OAAS,KAE5BK,EAAEkH,QAAQ5H,GAAK0B,MAAM,EAAGH,KAAKC,IAAI,EAAG0G,KAI7CxH,EAAEyH,OAAS,SAASnI,EAAKC,EAAUM,GAEjC,MADAN,GAAWc,EAAGd,EAAUM,GACjBG,EAAE4G,MAAM5G,EAAE6E,IAAIvF,EAAK,SAASiE,EAAO7D,EAAOiG,GAC/C,OACEpC,MAAOA,EACP7D,MAAOA,EACPgI,SAAUnI,EAASgE,EAAO7D,EAAOiG,MAElCgC,KAAK,SAASC,EAAMC,GACrB,GAAIC,GAAIF,EAAKF,SACTK,EAAIF,EAAMH,QACd,IAAII,IAAMC,EAAG,CACX,GAAID,EAAIC,GAAKD,QAAW,GAAG,MAAO,EAClC,IAAQC,EAAJD,GAASC,QAAW,GAAG,OAAQ,EAErC,MAAOH,GAAKlI,MAAQmI,EAAMnI,QACxB,SAIN,IAAIsI,GAAQ,SAASC,GACnB,MAAO,UAAS3I,EAAKC,EAAUM,GAC7B,GAAI2E,KAMJ,OALAjF,GAAWc,EAAGd,EAAUM,GACxBG,EAAE2E,KAAKrF,EAAK,SAASiE,EAAO7D,GAC1B,GAAI4E,GAAM/E,EAASgE,EAAO7D,EAAOJ,EACjC2I,GAASzD,EAAQjB,EAAOe,KAEnBE,GAMXxE,GAAEkI,QAAUF,EAAM,SAASxD,EAAQjB,EAAOe,GACpCtE,EAAE4B,IAAI4C,EAAQF,GAAME,EAAOF,GAAKxC,KAAKyB,GAAaiB,EAAOF,IAAQf,KAKvEvD,EAAEmI,QAAUH,EAAM,SAASxD,EAAQjB,EAAOe,GACxCE,EAAOF,GAAOf,IAMhBvD,EAAEoI,QAAUJ,EAAM,SAASxD,EAAQjB,EAAOe,GACpCtE,EAAE4B,IAAI4C,EAAQF,GAAME,EAAOF,KAAaE,EAAOF,GAAO,IAI5DtE,EAAEqI,QAAU,SAAS/I,GACnB,MAAKA,GACDU,EAAE0C,QAAQpD,GAAa0B,EAAMC,KAAK3B,GAClCS,EAAYT,GAAaU,EAAE6E,IAAIvF,EAAKU,EAAE4D,UACnC5D,EAAEsG,OAAOhH,OAIlBU,EAAEsI,KAAO,SAAShJ,GAChB,MAAW,OAAPA,EAAoB,EACjBS,EAAYT,GAAOA,EAAIK,OAASK,EAAEP,KAAKH,GAAKK,QAKrDK,EAAEuI,UAAY,SAASjJ,EAAKc,EAAWP,GACrCO,EAAYC,EAAGD,EAAWP,EAC1B,IAAI2I,MAAWC,IAIf,OAHAzI,GAAE2E,KAAKrF,EAAK,SAASiE,EAAOe,EAAKhF,IAC9Bc,EAAUmD,EAAOe,EAAKhF,GAAOkJ,EAAOC,GAAM3G,KAAKyB,MAE1CiF,EAAMC,IAShBzI,EAAE0I,MAAQ1I,EAAE2I,KAAO3I,EAAE4I,KAAO,SAASzI,EAAOqH,EAAGnB,GAC7C,MAAa,OAATlG,MAA2B,GACtB,MAALqH,GAAanB,EAAclG,EAAM,GAC9BH,EAAE6I,QAAQ1I,EAAOA,EAAMR,OAAS6H,IAMzCxH,EAAE6I,QAAU,SAAS1I,EAAOqH,EAAGnB,GAC7B,MAAOrF,GAAMC,KAAKd,EAAO,EAAGU,KAAKC,IAAI,EAAGX,EAAMR,QAAe,MAAL6H,GAAanB,EAAQ,EAAImB,MAKnFxH,EAAE8I,KAAO,SAAS3I,EAAOqH,EAAGnB,GAC1B,MAAa,OAATlG,MAA2B,GACtB,MAALqH,GAAanB,EAAclG,EAAMA,EAAMR,OAAS,GAC7CK,EAAE+I,KAAK5I,EAAOU,KAAKC,IAAI,EAAGX,EAAMR,OAAS6H,KAMlDxH,EAAE+I,KAAO/I,EAAEgJ,KAAOhJ,EAAEiJ,KAAO,SAAS9I,EAAOqH,EAAGnB,GAC5C,MAAOrF,GAAMC,KAAKd,EAAY,MAALqH,GAAanB,EAAQ,EAAImB,IAIpDxH,EAAEkJ,QAAU,SAAS/I,GACnB,MAAOH,GAAEyF,OAAOtF,EAAOH,EAAE4D,UAI3B,IAAIuF,GAAU,SAASC,EAAOC,EAASC,EAAQC,GAE7C,IAAK,GADDC,MAAa7I,EAAM,EACdC,EAAI2I,GAAc,EAAG5J,EAASW,EAAU8I,GAAYzJ,EAAJiB,EAAYA,IAAK,CACxE,GAAI2C,GAAQ6F,EAAMxI,EAClB,IAAIb,EAAYwD,KAAWvD,EAAE0C,QAAQa,IAAUvD,EAAEyJ,YAAYlG,IAAS,CAE/D8F,IAAS9F,EAAQ4F,EAAQ5F,EAAO8F,EAASC,GAC9C,IAAII,GAAI,EAAGC,EAAMpG,EAAM5D,MAEvB,KADA6J,EAAO7J,QAAUgK,EACNA,EAAJD,GACLF,EAAO7I,KAAS4C,EAAMmG,SAEdJ,KACVE,EAAO7I,KAAS4C,GAGpB,MAAOiG,GAITxJ,GAAEmJ,QAAU,SAAShJ,EAAOkJ,GAC1B,MAAOF,GAAQhJ,EAAOkJ,GAAS,IAIjCrJ,EAAE4J,QAAU,SAASzJ,GACnB,MAAOH,GAAE6J,WAAW1J,EAAOa,EAAMC,KAAKhB,UAAW,KAMnDD,EAAE8J,KAAO9J,EAAE+J,OAAS,SAAS5J,EAAO6J,EAAUzK,EAAUM,GACjDG,EAAEiK,UAAUD,KACfnK,EAAUN,EACVA,EAAWyK,EACXA,GAAW,GAEG,MAAZzK,IAAkBA,EAAWc,EAAGd,EAAUM,GAG9C,KAAK,GAFD2E,MACA0F,KACKtJ,EAAI,EAAGjB,EAASW,EAAUH,GAAYR,EAAJiB,EAAYA,IAAK,CAC1D,GAAI2C,GAAQpD,EAAMS,GACdoG,EAAWzH,EAAWA,EAASgE,EAAO3C,EAAGT,GAASoD,CAClDyG,IACGpJ,GAAKsJ,IAASlD,GAAUxC,EAAO1C,KAAKyB,GACzC2G,EAAOlD,GACEzH,EACJS,EAAE6B,SAASqI,EAAMlD,KACpBkD,EAAKpI,KAAKkF,GACVxC,EAAO1C,KAAKyB,IAEJvD,EAAE6B,SAAS2C,EAAQjB,IAC7BiB,EAAO1C,KAAKyB,GAGhB,MAAOiB,IAKTxE,EAAEmK,MAAQ,WACR,MAAOnK,GAAE8J,KAAKX,EAAQlJ,WAAW,GAAM,KAKzCD,EAAEoK,aAAe,SAASjK,GAGxB,IAAK,GAFDqE,MACA6F,EAAapK,UAAUN,OAClBiB,EAAI,EAAGjB,EAASW,EAAUH,GAAYR,EAAJiB,EAAYA,IAAK,CAC1D,GAAIF,GAAOP,EAAMS,EACjB,KAAIZ,EAAE6B,SAAS2C,EAAQ9D,GAAvB,CACA,IAAK,GAAIgJ,GAAI,EAAOW,EAAJX,GACT1J,EAAE6B,SAAS5B,UAAUyJ,GAAIhJ,GADAgJ,KAG5BA,IAAMW,GAAY7F,EAAO1C,KAAKpB,IAEpC,MAAO8D,IAKTxE,EAAE6J,WAAa,SAAS1J,GACtB,GAAI4I,GAAOI,EAAQlJ,WAAW,GAAM,EAAM,EAC1C,OAAOD,GAAEyF,OAAOtF,EAAO,SAASoD,GAC9B,OAAQvD,EAAE6B,SAASkH,EAAMxF,MAM7BvD,EAAEsK,IAAM,WACN,MAAOtK,GAAEuK,MAAMtK,YAKjBD,EAAEuK,MAAQ,SAASpK,GAIjB,IAAK,GAHDR,GAASQ,GAASH,EAAEc,IAAIX,EAAOG,GAAWX,QAAU,EACpD6E,EAASrC,MAAMxC,GAEVD,EAAQ,EAAWC,EAARD,EAAgBA,IAClC8E,EAAO9E,GAASM,EAAE4G,MAAMzG,EAAOT,EAEjC,OAAO8E,IAMTxE,EAAEwK,OAAS,SAAS7E,EAAMW,GAExB,IAAK,GADD9B,MACK5D,EAAI,EAAGjB,EAASW,EAAUqF,GAAWhG,EAAJiB,EAAYA,IAChD0F,EACF9B,EAAOmB,EAAK/E,IAAM0F,EAAO1F,GAEzB4D,EAAOmB,EAAK/E,GAAG,IAAM+E,EAAK/E,GAAG,EAGjC,OAAO4D,IAiBTxE,EAAEuF,UAAYrF,EAA2B,GACzCF,EAAEyK,cAAgBvK,GAA4B,GAI9CF,EAAES,YAAc,SAASN,EAAOb,EAAKC,EAAUM,GAC7CN,EAAWc,EAAGd,EAAUM,EAAS,EAGjC,KAFA,GAAI0D,GAAQhE,EAASD,GACjBoL,EAAM,EAAGC,EAAOrK,EAAUH,GACjBwK,EAAND,GAAY,CACjB,GAAIE,GAAM/J,KAAKgK,OAAOH,EAAMC,GAAQ,EAChCpL,GAASY,EAAMyK,IAAQrH,EAAOmH,EAAME,EAAM,EAAQD,EAAOC,EAE/D,MAAOF,IAgCT1K,EAAEuG,QAAUhG,EAAkB,EAAGP,EAAEuF,UAAWvF,EAAES,aAChDT,EAAE8K,YAAcvK,GAAmB,EAAGP,EAAEyK,eAKxCzK,EAAE+K,MAAQ,SAASC,EAAOC,EAAMC,GAClB,MAARD,IACFA,EAAOD,GAAS,EAChBA,EAAQ,GAEVE,EAAOA,GAAQ,CAKf,KAAK,GAHDvL,GAASkB,KAAKC,IAAID,KAAKsK,MAAMF,EAAOD,GAASE,GAAO,GACpDH,EAAQ5I,MAAMxC,GAETgB,EAAM,EAAShB,EAANgB,EAAcA,IAAOqK,GAASE,EAC9CH,EAAMpK,GAAOqK,CAGf,OAAOD,GAQT,IAAIK,GAAe,SAASC,EAAYC,EAAWzL,EAAS0L,EAAgB7E,GAC1E,KAAM6E,YAA0BD,IAAY,MAAOD,GAAW1H,MAAM9D,EAAS6G,EAC7E,IAAI8E,GAAOjH,EAAW8G,EAAW5J,WAC7B+C,EAAS6G,EAAW1H,MAAM6H,EAAM9E,EACpC,OAAI1G,GAAE6D,SAASW,GAAgBA,EACxBgH,EAMTxL,GAAE6C,KAAO,SAASQ,EAAMxD,GACtB,GAAI+C,GAAcS,EAAKR,OAASD,EAAY,MAAOA,GAAWe,MAAMN,EAAMrC,EAAMC,KAAKhB,UAAW,GAChG,KAAKD,EAAEwB,WAAW6B,GAAO,KAAM,IAAIoI,WAAU,oCAC7C,IAAI/E,GAAO1F,EAAMC,KAAKhB,UAAW,GAC7ByL,EAAQ,WACV,MAAON,GAAa/H,EAAMqI,EAAO7L,EAASmC,KAAM0E,EAAKiF,OAAO3K,EAAMC,KAAKhB,aAEzE,OAAOyL,IAMT1L,EAAE4L,QAAU,SAASvI,GACnB,GAAIwI,GAAY7K,EAAMC,KAAKhB,UAAW,GAClCyL,EAAQ,WAGV,IAAK,GAFDI,GAAW,EAAGnM,EAASkM,EAAUlM,OACjC+G,EAAOvE,MAAMxC,GACRiB,EAAI,EAAOjB,EAAJiB,EAAYA,IAC1B8F,EAAK9F,GAAKiL,EAAUjL,KAAOZ,EAAIC,UAAU6L,KAAcD,EAAUjL,EAEnE,MAAOkL,EAAW7L,UAAUN,QAAQ+G,EAAK5E,KAAK7B,UAAU6L,KACxD,OAAOV,GAAa/H,EAAMqI,EAAO1J,KAAMA,KAAM0E,GAE/C,OAAOgF,IAMT1L,EAAE+L,QAAU,SAASzM,GACnB,GAAIsB,GAA8B0D,EAA3B3E,EAASM,UAAUN,MAC1B,IAAc,GAAVA,EAAa,KAAM,IAAIqM,OAAM,wCACjC,KAAKpL,EAAI,EAAOjB,EAAJiB,EAAYA,IACtB0D,EAAMrE,UAAUW,GAChBtB,EAAIgF,GAAOtE,EAAE6C,KAAKvD,EAAIgF,GAAMhF,EAE9B,OAAOA,IAITU,EAAEiM,QAAU,SAAS5I,EAAM6I,GACzB,GAAID,GAAU,SAAS3H,GACrB,GAAI6H,GAAQF,EAAQE,MAChBC,EAAU,IAAMF,EAASA,EAAOvI,MAAM3B,KAAM/B,WAAaqE,EAE7D,OADKtE,GAAE4B,IAAIuK,EAAOC,KAAUD,EAAMC,GAAW/I,EAAKM,MAAM3B,KAAM/B,YACvDkM,EAAMC,GAGf,OADAH,GAAQE,SACDF,GAKTjM,EAAEqM,MAAQ,SAAShJ,EAAMiJ,GACvB,GAAI5F,GAAO1F,EAAMC,KAAKhB,UAAW,EACjC,OAAOsM,YAAW,WAChB,MAAOlJ,GAAKM,MAAM,KAAM+C,IACvB4F,IAKLtM,EAAEwM,MAAQxM,EAAE4L,QAAQ5L,EAAEqM,MAAOrM,EAAG,GAOhCA,EAAEyM,SAAW,SAASpJ,EAAMiJ,EAAMI,GAChC,GAAI7M,GAAS6G,EAAMlC,EACfmI,EAAU,KACVC,EAAW,CACVF,KAASA,KACd,IAAIG,GAAQ,WACVD,EAAWF,EAAQI,WAAY,EAAQ,EAAI9M,EAAE+M,MAC7CJ,EAAU,KACVnI,EAASnB,EAAKM,MAAM9D,EAAS6G,GACxBiG,IAAS9M,EAAU6G,EAAO,MAEjC,OAAO,YACL,GAAIqG,GAAM/M,EAAE+M,KACPH,IAAYF,EAAQI,WAAY,IAAOF,EAAWG,EACvD,IAAIC,GAAYV,GAAQS,EAAMH,EAc9B,OAbA/M,GAAUmC,KACV0E,EAAOzG,UACU,GAAb+M,GAAkBA,EAAYV,GAC5BK,IACFM,aAAaN,GACbA,EAAU,MAEZC,EAAWG,EACXvI,EAASnB,EAAKM,MAAM9D,EAAS6G,GACxBiG,IAAS9M,EAAU6G,EAAO,OACrBiG,GAAWD,EAAQQ,YAAa,IAC1CP,EAAUJ,WAAWM,EAAOG,IAEvBxI,IAQXxE,EAAEmN,SAAW,SAAS9J,EAAMiJ,EAAMc,GAChC,GAAIT,GAASjG,EAAM7G,EAASwN,EAAW7I,EAEnCqI,EAAQ,WACV,GAAI/D,GAAO9I,EAAE+M,MAAQM,CAEVf,GAAPxD,GAAeA,GAAQ,EACzB6D,EAAUJ,WAAWM,EAAOP,EAAOxD,IAEnC6D,EAAU,KACLS,IACH5I,EAASnB,EAAKM,MAAM9D,EAAS6G,GACxBiG,IAAS9M,EAAU6G,EAAO,QAKrC,OAAO,YACL7G,EAAUmC,KACV0E,EAAOzG,UACPoN,EAAYrN,EAAE+M,KACd,IAAIO,GAAUF,IAAcT,CAO5B,OANKA,KAASA,EAAUJ,WAAWM,EAAOP,IACtCgB,IACF9I,EAASnB,EAAKM,MAAM9D,EAAS6G,GAC7B7G,EAAU6G,EAAO,MAGZlC,IAOXxE,EAAEuN,KAAO,SAASlK,EAAMmK,GACtB,MAAOxN,GAAE4L,QAAQ4B,EAASnK,IAI5BrD,EAAE6F,OAAS,SAASzF,GAClB,MAAO,YACL,OAAQA,EAAUuD,MAAM3B,KAAM/B,aAMlCD,EAAEyN,QAAU,WACV,GAAI/G,GAAOzG,UACP+K,EAAQtE,EAAK/G,OAAS,CAC1B,OAAO,YAGL,IAFA,GAAIiB,GAAIoK,EACJxG,EAASkC,EAAKsE,GAAOrH,MAAM3B,KAAM/B,WAC9BW,KAAK4D,EAASkC,EAAK9F,GAAGK,KAAKe,KAAMwC,EACxC,OAAOA,KAKXxE,EAAE0N,MAAQ,SAASC,EAAOtK,GACxB,MAAO,YACL,QAAMsK,EAAQ,EACLtK,EAAKM,MAAM3B,KAAM/B,WAD1B,SAOJD,EAAE4N,OAAS,SAASD,EAAOtK,GACzB,GAAI7D,EACJ,OAAO,YAKL,QAJMmO,EAAQ,IACZnO,EAAO6D,EAAKM,MAAM3B,KAAM/B,YAEb,GAAT0N,IAAYtK,EAAO,MAChB7D,IAMXQ,EAAE6N,KAAO7N,EAAE4L,QAAQ5L,EAAE4N,OAAQ,EAM7B,IAAIE,KAAevL,SAAU,MAAMwL,qBAAqB,YACpD1M,GAAsB,UAAW,gBAAiB,WAClC,uBAAwB,iBAAkB,iBAqB9DrB,GAAEP,KAAO,SAASH,GAChB,IAAKU,EAAE6D,SAASvE,GAAM,QACtB,IAAIqD,EAAY,MAAOA,GAAWrD,EAClC,IAAIG,KACJ,KAAK,GAAI6E,KAAOhF,GAASU,EAAE4B,IAAItC,EAAKgF,IAAM7E,EAAKqC,KAAKwC,EAGpD,OADIwJ,IAAY3M,EAAoB7B,EAAKG,GAClCA,GAITO,EAAEgO,QAAU,SAAS1O,GACnB,IAAKU,EAAE6D,SAASvE,GAAM,QACtB,IAAIG,KACJ,KAAK,GAAI6E,KAAOhF,GAAKG,EAAKqC,KAAKwC,EAG/B,OADIwJ,IAAY3M,EAAoB7B,EAAKG,GAClCA,GAITO,EAAEsG,OAAS,SAAShH,GAIlB,IAAK,GAHDG,GAAOO,EAAEP,KAAKH,GACdK,EAASF,EAAKE,OACd2G,EAASnE,MAAMxC,GACViB,EAAI,EAAOjB,EAAJiB,EAAYA,IAC1B0F,EAAO1F,GAAKtB,EAAIG,EAAKmB,GAEvB,OAAO0F,IAKTtG,EAAEiO,UAAY,SAAS3O,EAAKC,EAAUM,GACpCN,EAAWc,EAAGd,EAAUM,EAKtB,KAAK,GADDD,GAHFH,EAAQO,EAAEP,KAAKH,GACbK,EAASF,EAAKE,OACdoF,KAEKrF,EAAQ,EAAWC,EAARD,EAAgBA,IAClCE,EAAaH,EAAKC,GAClBqF,EAAQnF,GAAcL,EAASD,EAAIM,GAAaA,EAAYN,EAE9D,OAAOyF,IAIX/E,EAAEkO,MAAQ,SAAS5O,GAIjB,IAAK,GAHDG,GAAOO,EAAEP,KAAKH,GACdK,EAASF,EAAKE,OACduO,EAAQ/L,MAAMxC,GACTiB,EAAI,EAAOjB,EAAJiB,EAAYA,IAC1BsN,EAAMtN,IAAMnB,EAAKmB,GAAItB,EAAIG,EAAKmB,IAEhC,OAAOsN,IAITlO,EAAEmO,OAAS,SAAS7O,GAGlB,IAAK,GAFDkF,MACA/E,EAAOO,EAAEP,KAAKH,GACTsB,EAAI,EAAGjB,EAASF,EAAKE,OAAYA,EAAJiB,EAAYA,IAChD4D,EAAOlF,EAAIG,EAAKmB,KAAOnB,EAAKmB,EAE9B,OAAO4D,IAKTxE,EAAEoO,UAAYpO,EAAEqO,QAAU,SAAS/O,GACjC,GAAIgP,KACJ,KAAK,GAAIhK,KAAOhF,GACVU,EAAEwB,WAAWlC,EAAIgF,KAAOgK,EAAMxM,KAAKwC,EAEzC,OAAOgK,GAAM3G,QAIf3H,EAAEuO,OAAStK,EAAejE,EAAEgO,SAI5BhO,EAAEwO,UAAYxO,EAAEyO,OAASxK,EAAejE,EAAEP,MAG1CO,EAAEwF,QAAU,SAASlG,EAAKc,EAAWP,GACnCO,EAAYC,EAAGD,EAAWP,EAE1B,KAAK,GADmByE,GAApB7E,EAAOO,EAAEP,KAAKH,GACTsB,EAAI,EAAGjB,EAASF,EAAKE,OAAYA,EAAJiB,EAAYA,IAEhD,GADA0D,EAAM7E,EAAKmB,GACPR,EAAUd,EAAIgF,GAAMA,EAAKhF,GAAM,MAAOgF,IAK9CtE,EAAE0O,KAAO,SAASlE,EAAQmE,EAAW9O,GACnC,GAA+BN,GAAUE,EAArC+E,KAAalF,EAAMkL,CACvB,IAAW,MAAPlL,EAAa,MAAOkF,EACpBxE,GAAEwB,WAAWmN,IACflP,EAAOO,EAAEgO,QAAQ1O,GACjBC,EAAWO,EAAW6O,EAAW9O,KAEjCJ,EAAO0J,EAAQlJ,WAAW,GAAO,EAAO,GACxCV,EAAW,SAASgE,EAAOe,EAAKhF,GAAO,MAAOgF,KAAOhF,IACrDA,EAAM8C,OAAO9C,GAEf,KAAK,GAAIsB,GAAI,EAAGjB,EAASF,EAAKE,OAAYA,EAAJiB,EAAYA,IAAK,CACrD,GAAI0D,GAAM7E,EAAKmB,GACX2C,EAAQjE,EAAIgF,EACZ/E,GAASgE,EAAOe,EAAKhF,KAAMkF,EAAOF,GAAOf,GAE/C,MAAOiB,IAITxE,EAAE4O,KAAO,SAAStP,EAAKC,EAAUM,GAC/B,GAAIG,EAAEwB,WAAWjC,GACfA,EAAWS,EAAE6F,OAAOtG,OACf,CACL,GAAIE,GAAOO,EAAE6E,IAAIsE,EAAQlJ,WAAW,GAAO,EAAO,GAAI4O,OACtDtP,GAAW,SAASgE,EAAOe,GACzB,OAAQtE,EAAE6B,SAASpC,EAAM6E,IAG7B,MAAOtE,GAAE0O,KAAKpP,EAAKC,EAAUM,IAI/BG,EAAE8O,SAAW7K,EAAejE,EAAEgO,SAAS,GAKvChO,EAAE+C,OAAS,SAAStB,EAAWsN,GAC7B,GAAIvK,GAASD,EAAW9C,EAExB,OADIsN,IAAO/O,EAAEwO,UAAUhK,EAAQuK,GACxBvK,GAITxE,EAAEgP,MAAQ,SAAS1P,GACjB,MAAKU,GAAE6D,SAASvE,GACTU,EAAE0C,QAAQpD,GAAOA,EAAI0B,QAAUhB,EAAEuO,UAAWjP,GADtBA,GAO/BU,EAAEiP,IAAM,SAAS3P,EAAK4P,GAEpB,MADAA,GAAY5P,GACLA,GAITU,EAAEmP,QAAU,SAAS3E,EAAQ1D,GAC3B,GAAIrH,GAAOO,EAAEP,KAAKqH,GAAQnH,EAASF,EAAKE,MACxC,IAAc,MAAV6K,EAAgB,OAAQ7K,CAE5B,KAAK,GADDL,GAAM8C,OAAOoI,GACR5J,EAAI,EAAOjB,EAAJiB,EAAYA,IAAK,CAC/B,GAAI0D,GAAM7E,EAAKmB,EACf,IAAIkG,EAAMxC,KAAShF,EAAIgF,MAAUA,IAAOhF,IAAM,OAAO,EAEvD,OAAO,EAKT,IAAI8P,GAAK,SAAStH,EAAGC,EAAGsH,EAAQC,GAG9B,GAAIxH,IAAMC,EAAG,MAAa,KAAND,GAAW,EAAIA,IAAM,EAAIC,CAE7C,IAAS,MAALD,GAAkB,MAALC,EAAW,MAAOD,KAAMC,CAErCD,aAAa9H,KAAG8H,EAAIA,EAAE7E,UACtB8E,YAAa/H,KAAG+H,EAAIA,EAAE9E,SAE1B,IAAIsM,GAAYhN,EAAStB,KAAK6G,EAC9B,IAAIyH,IAAchN,EAAStB,KAAK8G,GAAI,OAAO,CAC3C,QAAQwH,GAEN,IAAK,kBAEL,IAAK,kBAGH,MAAO,GAAKzH,GAAM,GAAKC,CACzB,KAAK,kBAGH,OAAKD,KAAOA,GAAWC,KAAOA,EAEhB,KAAND,EAAU,GAAKA,IAAM,EAAIC,GAAKD,KAAOC,CAC/C,KAAK,gBACL,IAAK,mBAIH,OAAQD,KAAOC,EAGnB,GAAIyH,GAA0B,mBAAdD,CAChB,KAAKC,EAAW,CACd,GAAgB,gBAAL1H,IAA6B,gBAALC,GAAe,OAAO,CAIzD,IAAI0H,GAAQ3H,EAAExG,YAAaoO,EAAQ3H,EAAEzG,WACrC,IAAImO,IAAUC,KAAW1P,EAAEwB,WAAWiO,IAAUA,YAAiBA,IACxCzP,EAAEwB,WAAWkO,IAAUA,YAAiBA,KACzC,eAAiB5H,IAAK,eAAiBC,GAC7D,OAAO,EAQXsH,EAASA,MACTC,EAASA,KAET,KADA,GAAI3P,GAAS0P,EAAO1P,OACbA,KAGL,GAAI0P,EAAO1P,KAAYmI,EAAG,MAAOwH,GAAO3P,KAAYoI,CAQtD,IAJAsH,EAAOvN,KAAKgG,GACZwH,EAAOxN,KAAKiG,GAGRyH,EAAW,CAGb,GADA7P,EAASmI,EAAEnI,OACPA,IAAWoI,EAAEpI,OAAQ,OAAO,CAEhC,MAAOA,KACL,IAAKyP,EAAGtH,EAAEnI,GAASoI,EAAEpI,GAAS0P,EAAQC,GAAS,OAAO,MAEnD,CAEL,GAAsBhL,GAAlB7E,EAAOO,EAAEP,KAAKqI,EAGlB,IAFAnI,EAASF,EAAKE,OAEVK,EAAEP,KAAKsI,GAAGpI,SAAWA,EAAQ,OAAO,CACxC,MAAOA,KAGL,GADA2E,EAAM7E,EAAKE,IACLK,EAAE4B,IAAImG,EAAGzD,KAAQ8K,EAAGtH,EAAExD,GAAMyD,EAAEzD,GAAM+K,EAAQC,GAAU,OAAO,EAMvE,MAFAD,GAAOM,MACPL,EAAOK,OACA,EAIT3P,GAAE4P,QAAU,SAAS9H,EAAGC,GACtB,MAAOqH,GAAGtH,EAAGC,IAKf/H,EAAE6P,QAAU,SAASvQ,GACnB,MAAW,OAAPA,GAAoB,EACpBS,EAAYT,KAASU,EAAE0C,QAAQpD,IAAQU,EAAE8P,SAASxQ,IAAQU,EAAEyJ,YAAYnK,IAA6B,IAAfA,EAAIK,OAChE,IAAvBK,EAAEP,KAAKH,GAAKK,QAIrBK,EAAE+P,UAAY,SAASzQ,GACrB,SAAUA,GAAwB,IAAjBA,EAAI0Q,WAKvBhQ,EAAE0C,QAAUD,GAAiB,SAASnD,GACpC,MAA8B,mBAAvBiD,EAAStB,KAAK3B,IAIvBU,EAAE6D,SAAW,SAASvE,GACpB,GAAI2Q,SAAc3Q,EAClB,OAAgB,aAAT2Q,GAAgC,WAATA,KAAuB3Q,GAIvDU,EAAE2E,MAAM,YAAa,WAAY,SAAU,SAAU,OAAQ,SAAU,SAAU,SAASuL,GACxFlQ,EAAE,KAAOkQ,GAAQ,SAAS5Q,GACxB,MAAOiD,GAAStB,KAAK3B,KAAS,WAAa4Q,EAAO,OAMjDlQ,EAAEyJ,YAAYxJ,aACjBD,EAAEyJ,YAAc,SAASnK,GACvB,MAAOU,GAAE4B,IAAItC,EAAK,YAMJ,kBAAP,KAAyC,gBAAb6Q,aACrCnQ,EAAEwB,WAAa,SAASlC,GACtB,MAAqB,kBAAPA,KAAqB,IAKvCU,EAAEoQ,SAAW,SAAS9Q,GACpB,MAAO8Q,UAAS9Q,KAAS4B,MAAMmP,WAAW/Q,KAI5CU,EAAEkB,MAAQ,SAAS5B,GACjB,MAAOU,GAAEsQ,SAAShR,IAAQA,KAASA,GAIrCU,EAAEiK,UAAY,SAAS3K,GACrB,MAAOA,MAAQ,GAAQA,KAAQ,GAAgC,qBAAvBiD,EAAStB,KAAK3B,IAIxDU,EAAEuQ,OAAS,SAASjR,GAClB,MAAe,QAARA,GAITU,EAAEwQ,YAAc,SAASlR,GACvB,MAAOA,SAAa,IAKtBU,EAAE4B,IAAM,SAAStC,EAAKgF,GACpB,MAAc,OAAPhF,GAAekD,EAAevB,KAAK3B,EAAKgF,IAQjDtE,EAAEyQ,WAAa,WAEb,MADA1O,GAAK/B,EAAIiC,EACFD,MAIThC,EAAE4D,SAAW,SAASL,GACpB,MAAOA,IAITvD,EAAE0Q,SAAW,SAASnN,GACpB,MAAO,YACL,MAAOA,KAIXvD,EAAE2Q,KAAO,aAET3Q,EAAE+D,SAAWA,EAGb/D,EAAE4Q,WAAa,SAAStR,GACtB,MAAc,OAAPA,EAAc,aAAe,SAASgF,GAC3C,MAAOhF,GAAIgF,KAMftE,EAAE8D,QAAU9D,EAAE6Q,QAAU,SAAS/J,GAE/B,MADAA,GAAQ9G,EAAEwO,aAAc1H,GACjB,SAASxH,GACd,MAAOU,GAAEmP,QAAQ7P,EAAKwH,KAK1B9G,EAAE2N,MAAQ,SAASnG,EAAGjI,EAAUM,GAC9B,GAAIiR,GAAQ3O,MAAMtB,KAAKC,IAAI,EAAG0G,GAC9BjI,GAAWO,EAAWP,EAAUM,EAAS,EACzC,KAAK,GAAIe,GAAI,EAAO4G,EAAJ5G,EAAOA,IAAKkQ,EAAMlQ,GAAKrB,EAASqB,EAChD,OAAOkQ,IAIT9Q,EAAEsH,OAAS,SAASvG,EAAKD,GAKvB,MAJW,OAAPA,IACFA,EAAMC,EACNA,EAAM,GAEDA,EAAMF,KAAKgK,MAAMhK,KAAKyG,UAAYxG,EAAMC,EAAM,KAIvDf,EAAE+M,IAAMgE,KAAKhE,KAAO,WAClB,OAAO,GAAIgE,OAAOC,UAIpB,IAAIC,IACFC,IAAK,QACLC,IAAK,OACLC,IAAK,OACLC,IAAK,SACLC,IAAK,SACLC,IAAK,UAEHC,EAAcxR,EAAEmO,OAAO8C,GAGvBQ,EAAgB,SAAS5M,GAC3B,GAAI6M,GAAU,SAASC,GACrB,MAAO9M,GAAI8M,IAGTvN,EAAS,MAAQpE,EAAEP,KAAKoF,GAAK+M,KAAK,KAAO,IACzCC,EAAaC,OAAO1N,GACpB2N,EAAgBD,OAAO1N,EAAQ,IACnC,OAAO,UAAS4N,GAEd,MADAA,GAAmB,MAAVA,EAAiB,GAAK,GAAKA,EAC7BH,EAAWI,KAAKD,GAAUA,EAAOE,QAAQH,EAAeL,GAAWM,GAG9EhS,GAAEmS,OAASV,EAAcR,GACzBjR,EAAEoS,SAAWX,EAAcD,GAI3BxR,EAAEwE,OAAS,SAASgG,EAAQzG,EAAUsO,GACpC,GAAI9O,GAAkB,MAAViH,MAAsB,GAAIA,EAAOzG,EAI7C,OAHIR,SAAe,KACjBA,EAAQ8O,GAEHrS,EAAEwB,WAAW+B,GAASA,EAAMtC,KAAKuJ,GAAUjH,EAKpD,IAAI+O,GAAY,CAChBtS,GAAEuS,SAAW,SAASC,GACpB,GAAIC,KAAOH,EAAY,EACvB,OAAOE,GAASA,EAASC,EAAKA,GAKhCzS,EAAE0S,kBACAC,SAAc,kBACdC,YAAc,mBACdT,OAAc,mBAMhB,IAAIU,GAAU,OAIVC,GACFxB,IAAU,IACVyB,KAAU,KACVC,KAAU,IACVC,KAAU,IACVC,SAAU,QACVC,SAAU,SAGRzB,EAAU,4BAEV0B,EAAa,SAASzB,GACxB,MAAO,KAAOmB,EAAQnB,GAOxB3R,GAAEqT,SAAW,SAASC,EAAMC,EAAUC,IAC/BD,GAAYC,IAAaD,EAAWC,GACzCD,EAAWvT,EAAE8O,YAAayE,EAAUvT,EAAE0S,iBAGtC,IAAI5O,GAAUgO,SACXyB,EAASpB,QAAUU,GAASzO,QAC5BmP,EAASX,aAAeC,GAASzO,QACjCmP,EAASZ,UAAYE,GAASzO,QAC/BwN,KAAK,KAAO,KAAM,KAGhBlS,EAAQ,EACR0E,EAAS,QACbkP,GAAKpB,QAAQpO,EAAS,SAAS6N,EAAOQ,EAAQS,EAAaD,EAAUc,GAanE,MAZArP,IAAUkP,EAAKtS,MAAMtB,EAAO+T,GAAQvB,QAAQR,EAAS0B,GACrD1T,EAAQ+T,EAAS9B,EAAMhS,OAEnBwS,EACF/N,GAAU,cAAgB+N,EAAS,iCAC1BS,EACTxO,GAAU,cAAgBwO,EAAc,uBAC/BD,IACTvO,GAAU,OAASuO,EAAW,YAIzBhB,IAETvN,GAAU,OAGLmP,EAASG,WAAUtP,EAAS,mBAAqBA,EAAS,OAE/DA,EAAS,2CACP,oDACAA,EAAS,eAEX,KACE,GAAIuP,GAAS,GAAIrR,UAASiR,EAASG,UAAY,MAAO,IAAKtP,GAC3D,MAAOwP,GAEP,KADAA,GAAExP,OAASA,EACLwP,EAGR,GAAIP,GAAW,SAASQ,GACtB,MAAOF,GAAO1S,KAAKe,KAAM6R,EAAM7T,IAI7B8T,EAAWP,EAASG,UAAY,KAGpC,OAFAL,GAASjP,OAAS,YAAc0P,EAAW,OAAS1P,EAAS,IAEtDiP,GAITrT,EAAE+T,MAAQ,SAASzU,GACjB,GAAI0U,GAAWhU,EAAEV,EAEjB,OADA0U,GAASC,QAAS,EACXD,EAUT,IAAIxP,GAAS,SAASwP,EAAU1U,GAC9B,MAAO0U,GAASC,OAASjU,EAAEV,GAAKyU,QAAUzU,EAI5CU,GAAEkU,MAAQ,SAAS5U,GACjBU,EAAE2E,KAAK3E,EAAEoO,UAAU9O,GAAM,SAAS4Q,GAChC,GAAI7M,GAAOrD,EAAEkQ,GAAQ5Q,EAAI4Q,EACzBlQ,GAAEyB,UAAUyO,GAAQ,WAClB,GAAIxJ,IAAQ1E,KAAKiB,SAEjB,OADAnB,GAAK6B,MAAM+C,EAAMzG,WACVuE,EAAOxC,KAAMqB,EAAKM,MAAM3D,EAAG0G,QAMxC1G,EAAEkU,MAAMlU,GAGRA,EAAE2E,MAAM,MAAO,OAAQ,UAAW,QAAS,OAAQ,SAAU,WAAY,SAASuL,GAChF,GAAIzJ,GAASvE,EAAWgO,EACxBlQ,GAAEyB,UAAUyO,GAAQ,WAClB,GAAI5Q,GAAM0C,KAAKiB,QAGf,OAFAwD,GAAO9C,MAAMrE,EAAKW,WACJ,UAATiQ,GAA6B,WAATA,GAAqC,IAAf5Q,EAAIK,cAAqBL,GAAI,GACrEkF,EAAOxC,KAAM1C,MAKxBU,EAAE2E,MAAM,SAAU,OAAQ,SAAU,SAASuL,GAC3C,GAAIzJ,GAASvE,EAAWgO,EACxBlQ,GAAEyB,UAAUyO,GAAQ,WAClB,MAAO1L,GAAOxC,KAAMyE,EAAO9C,MAAM3B,KAAKiB,SAAUhD,eAKpDD,EAAEyB,UAAU8B,MAAQ,WAClB,MAAOvB,MAAKiB,UAKdjD,EAAEyB,UAAU0S,QAAUnU,EAAEyB,UAAU2S,OAASpU,EAAEyB,UAAU8B,MAEvDvD,EAAEyB,UAAUc,SAAW,WACrB,MAAO,GAAKP,KAAKiB,UAUG,kBAAXoR,SAAyBA,OAAOC,KACzCD,OAAO,gBAAkB,WACvB,MAAOrU,OAGXiB,KAAKe"} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/underscore.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/underscore.js
new file mode 100644
index 0000000..b29332f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/node_modules/underscore/underscore.js
@@ -0,0 +1,1548 @@
+// Underscore.js 1.8.3
+// http://underscorejs.org
+// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+// Underscore may be freely distributed under the MIT license.
+
+(function() {
+
+ // Baseline setup
+ // --------------
+
+ // Establish the root object, `window` in the browser, or `exports` on the server.
+ var root = this;
+
+ // Save the previous value of the `_` variable.
+ var previousUnderscore = root._;
+
+ // Save bytes in the minified (but not gzipped) version:
+ var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
+
+ // Create quick reference variables for speed access to core prototypes.
+ var
+ push = ArrayProto.push,
+ slice = ArrayProto.slice,
+ toString = ObjProto.toString,
+ hasOwnProperty = ObjProto.hasOwnProperty;
+
+ // All **ECMAScript 5** native function implementations that we hope to use
+ // are declared here.
+ var
+ nativeIsArray = Array.isArray,
+ nativeKeys = Object.keys,
+ nativeBind = FuncProto.bind,
+ nativeCreate = Object.create;
+
+ // Naked function reference for surrogate-prototype-swapping.
+ var Ctor = function(){};
+
+ // Create a safe reference to the Underscore object for use below.
+ var _ = function(obj) {
+ if (obj instanceof _) return obj;
+ if (!(this instanceof _)) return new _(obj);
+ this._wrapped = obj;
+ };
+
+ // Export the Underscore object for **Node.js**, with
+ // backwards-compatibility for the old `require()` API. If we're in
+ // the browser, add `_` as a global object.
+ if (typeof exports !== 'undefined') {
+ if (typeof module !== 'undefined' && module.exports) {
+ exports = module.exports = _;
+ }
+ exports._ = _;
+ } else {
+ root._ = _;
+ }
+
+ // Current version.
+ _.VERSION = '1.8.3';
+
+ // Internal function that returns an efficient (for current engines) version
+ // of the passed-in callback, to be repeatedly applied in other Underscore
+ // functions.
+ var optimizeCb = function(func, context, argCount) {
+ if (context === void 0) return func;
+ switch (argCount == null ? 3 : argCount) {
+ case 1: return function(value) {
+ return func.call(context, value);
+ };
+ case 2: return function(value, other) {
+ return func.call(context, value, other);
+ };
+ case 3: return function(value, index, collection) {
+ return func.call(context, value, index, collection);
+ };
+ case 4: return function(accumulator, value, index, collection) {
+ return func.call(context, accumulator, value, index, collection);
+ };
+ }
+ return function() {
+ return func.apply(context, arguments);
+ };
+ };
+
+ // A mostly-internal function to generate callbacks that can be applied
+ // to each element in a collection, returning the desired result — either
+ // identity, an arbitrary callback, a property matcher, or a property accessor.
+ var cb = function(value, context, argCount) {
+ if (value == null) return _.identity;
+ if (_.isFunction(value)) return optimizeCb(value, context, argCount);
+ if (_.isObject(value)) return _.matcher(value);
+ return _.property(value);
+ };
+ _.iteratee = function(value, context) {
+ return cb(value, context, Infinity);
+ };
+
+ // An internal function for creating assigner functions.
+ var createAssigner = function(keysFunc, undefinedOnly) {
+ return function(obj) {
+ var length = arguments.length;
+ if (length < 2 || obj == null) return obj;
+ for (var index = 1; index < length; index++) {
+ var source = arguments[index],
+ keys = keysFunc(source),
+ l = keys.length;
+ for (var i = 0; i < l; i++) {
+ var key = keys[i];
+ if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key];
+ }
+ }
+ return obj;
+ };
+ };
+
+ // An internal function for creating a new object that inherits from another.
+ var baseCreate = function(prototype) {
+ if (!_.isObject(prototype)) return {};
+ if (nativeCreate) return nativeCreate(prototype);
+ Ctor.prototype = prototype;
+ var result = new Ctor;
+ Ctor.prototype = null;
+ return result;
+ };
+
+ var property = function(key) {
+ return function(obj) {
+ return obj == null ? void 0 : obj[key];
+ };
+ };
+
+ // Helper for collection methods to determine whether a collection
+ // should be iterated as an array or as an object
+ // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength
+ // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094
+ var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
+ var getLength = property('length');
+ var isArrayLike = function(collection) {
+ var length = getLength(collection);
+ return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;
+ };
+
+ // Collection Functions
+ // --------------------
+
+ // The cornerstone, an `each` implementation, aka `forEach`.
+ // Handles raw objects in addition to array-likes. Treats all
+ // sparse array-likes as if they were dense.
+ _.each = _.forEach = function(obj, iteratee, context) {
+ iteratee = optimizeCb(iteratee, context);
+ var i, length;
+ if (isArrayLike(obj)) {
+ for (i = 0, length = obj.length; i < length; i++) {
+ iteratee(obj[i], i, obj);
+ }
+ } else {
+ var keys = _.keys(obj);
+ for (i = 0, length = keys.length; i < length; i++) {
+ iteratee(obj[keys[i]], keys[i], obj);
+ }
+ }
+ return obj;
+ };
+
+ // Return the results of applying the iteratee to each element.
+ _.map = _.collect = function(obj, iteratee, context) {
+ iteratee = cb(iteratee, context);
+ var keys = !isArrayLike(obj) && _.keys(obj),
+ length = (keys || obj).length,
+ results = Array(length);
+ for (var index = 0; index < length; index++) {
+ var currentKey = keys ? keys[index] : index;
+ results[index] = iteratee(obj[currentKey], currentKey, obj);
+ }
+ return results;
+ };
+
+ // Create a reducing function iterating left or right.
+ function createReduce(dir) {
+ // Optimized iterator function as using arguments.length
+ // in the main function will deoptimize the, see #1991.
+ function iterator(obj, iteratee, memo, keys, index, length) {
+ for (; index >= 0 && index < length; index += dir) {
+ var currentKey = keys ? keys[index] : index;
+ memo = iteratee(memo, obj[currentKey], currentKey, obj);
+ }
+ return memo;
+ }
+
+ return function(obj, iteratee, memo, context) {
+ iteratee = optimizeCb(iteratee, context, 4);
+ var keys = !isArrayLike(obj) && _.keys(obj),
+ length = (keys || obj).length,
+ index = dir > 0 ? 0 : length - 1;
+ // Determine the initial value if none is provided.
+ if (arguments.length < 3) {
+ memo = obj[keys ? keys[index] : index];
+ index += dir;
+ }
+ return iterator(obj, iteratee, memo, keys, index, length);
+ };
+ }
+
+ // **Reduce** builds up a single result from a list of values, aka `inject`,
+ // or `foldl`.
+ _.reduce = _.foldl = _.inject = createReduce(1);
+
+ // The right-associative version of reduce, also known as `foldr`.
+ _.reduceRight = _.foldr = createReduce(-1);
+
+ // Return the first value which passes a truth test. Aliased as `detect`.
+ _.find = _.detect = function(obj, predicate, context) {
+ var key;
+ if (isArrayLike(obj)) {
+ key = _.findIndex(obj, predicate, context);
+ } else {
+ key = _.findKey(obj, predicate, context);
+ }
+ if (key !== void 0 && key !== -1) return obj[key];
+ };
+
+ // Return all the elements that pass a truth test.
+ // Aliased as `select`.
+ _.filter = _.select = function(obj, predicate, context) {
+ var results = [];
+ predicate = cb(predicate, context);
+ _.each(obj, function(value, index, list) {
+ if (predicate(value, index, list)) results.push(value);
+ });
+ return results;
+ };
+
+ // Return all the elements for which a truth test fails.
+ _.reject = function(obj, predicate, context) {
+ return _.filter(obj, _.negate(cb(predicate)), context);
+ };
+
+ // Determine whether all of the elements match a truth test.
+ // Aliased as `all`.
+ _.every = _.all = function(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var keys = !isArrayLike(obj) && _.keys(obj),
+ length = (keys || obj).length;
+ for (var index = 0; index < length; index++) {
+ var currentKey = keys ? keys[index] : index;
+ if (!predicate(obj[currentKey], currentKey, obj)) return false;
+ }
+ return true;
+ };
+
+ // Determine if at least one element in the object matches a truth test.
+ // Aliased as `any`.
+ _.some = _.any = function(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var keys = !isArrayLike(obj) && _.keys(obj),
+ length = (keys || obj).length;
+ for (var index = 0; index < length; index++) {
+ var currentKey = keys ? keys[index] : index;
+ if (predicate(obj[currentKey], currentKey, obj)) return true;
+ }
+ return false;
+ };
+
+ // Determine if the array or object contains a given item (using `===`).
+ // Aliased as `includes` and `include`.
+ _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) {
+ if (!isArrayLike(obj)) obj = _.values(obj);
+ if (typeof fromIndex != 'number' || guard) fromIndex = 0;
+ return _.indexOf(obj, item, fromIndex) >= 0;
+ };
+
+ // Invoke a method (with arguments) on every item in a collection.
+ _.invoke = function(obj, method) {
+ var args = slice.call(arguments, 2);
+ var isFunc = _.isFunction(method);
+ return _.map(obj, function(value) {
+ var func = isFunc ? method : value[method];
+ return func == null ? func : func.apply(value, args);
+ });
+ };
+
+ // Convenience version of a common use case of `map`: fetching a property.
+ _.pluck = function(obj, key) {
+ return _.map(obj, _.property(key));
+ };
+
+ // Convenience version of a common use case of `filter`: selecting only objects
+ // containing specific `key:value` pairs.
+ _.where = function(obj, attrs) {
+ return _.filter(obj, _.matcher(attrs));
+ };
+
+ // Convenience version of a common use case of `find`: getting the first object
+ // containing specific `key:value` pairs.
+ _.findWhere = function(obj, attrs) {
+ return _.find(obj, _.matcher(attrs));
+ };
+
+ // Return the maximum element (or element-based computation).
+ _.max = function(obj, iteratee, context) {
+ var result = -Infinity, lastComputed = -Infinity,
+ value, computed;
+ if (iteratee == null && obj != null) {
+ obj = isArrayLike(obj) ? obj : _.values(obj);
+ for (var i = 0, length = obj.length; i < length; i++) {
+ value = obj[i];
+ if (value > result) {
+ result = value;
+ }
+ }
+ } else {
+ iteratee = cb(iteratee, context);
+ _.each(obj, function(value, index, list) {
+ computed = iteratee(value, index, list);
+ if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
+ result = value;
+ lastComputed = computed;
+ }
+ });
+ }
+ return result;
+ };
+
+ // Return the minimum element (or element-based computation).
+ _.min = function(obj, iteratee, context) {
+ var result = Infinity, lastComputed = Infinity,
+ value, computed;
+ if (iteratee == null && obj != null) {
+ obj = isArrayLike(obj) ? obj : _.values(obj);
+ for (var i = 0, length = obj.length; i < length; i++) {
+ value = obj[i];
+ if (value < result) {
+ result = value;
+ }
+ }
+ } else {
+ iteratee = cb(iteratee, context);
+ _.each(obj, function(value, index, list) {
+ computed = iteratee(value, index, list);
+ if (computed < lastComputed || computed === Infinity && result === Infinity) {
+ result = value;
+ lastComputed = computed;
+ }
+ });
+ }
+ return result;
+ };
+
+ // Shuffle a collection, using the modern version of the
+ // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
+ _.shuffle = function(obj) {
+ var set = isArrayLike(obj) ? obj : _.values(obj);
+ var length = set.length;
+ var shuffled = Array(length);
+ for (var index = 0, rand; index < length; index++) {
+ rand = _.random(0, index);
+ if (rand !== index) shuffled[index] = shuffled[rand];
+ shuffled[rand] = set[index];
+ }
+ return shuffled;
+ };
+
+ // Sample **n** random values from a collection.
+ // If **n** is not specified, returns a single random element.
+ // The internal `guard` argument allows it to work with `map`.
+ _.sample = function(obj, n, guard) {
+ if (n == null || guard) {
+ if (!isArrayLike(obj)) obj = _.values(obj);
+ return obj[_.random(obj.length - 1)];
+ }
+ return _.shuffle(obj).slice(0, Math.max(0, n));
+ };
+
+ // Sort the object's values by a criterion produced by an iteratee.
+ _.sortBy = function(obj, iteratee, context) {
+ iteratee = cb(iteratee, context);
+ return _.pluck(_.map(obj, function(value, index, list) {
+ return {
+ value: value,
+ index: index,
+ criteria: iteratee(value, index, list)
+ };
+ }).sort(function(left, right) {
+ var a = left.criteria;
+ var b = right.criteria;
+ if (a !== b) {
+ if (a > b || a === void 0) return 1;
+ if (a < b || b === void 0) return -1;
+ }
+ return left.index - right.index;
+ }), 'value');
+ };
+
+ // An internal function used for aggregate "group by" operations.
+ var group = function(behavior) {
+ return function(obj, iteratee, context) {
+ var result = {};
+ iteratee = cb(iteratee, context);
+ _.each(obj, function(value, index) {
+ var key = iteratee(value, index, obj);
+ behavior(result, value, key);
+ });
+ return result;
+ };
+ };
+
+ // Groups the object's values by a criterion. Pass either a string attribute
+ // to group by, or a function that returns the criterion.
+ _.groupBy = group(function(result, value, key) {
+ if (_.has(result, key)) result[key].push(value); else result[key] = [value];
+ });
+
+ // Indexes the object's values by a criterion, similar to `groupBy`, but for
+ // when you know that your index values will be unique.
+ _.indexBy = group(function(result, value, key) {
+ result[key] = value;
+ });
+
+ // Counts instances of an object that group by a certain criterion. Pass
+ // either a string attribute to count by, or a function that returns the
+ // criterion.
+ _.countBy = group(function(result, value, key) {
+ if (_.has(result, key)) result[key]++; else result[key] = 1;
+ });
+
+ // Safely create a real, live array from anything iterable.
+ _.toArray = function(obj) {
+ if (!obj) return [];
+ if (_.isArray(obj)) return slice.call(obj);
+ if (isArrayLike(obj)) return _.map(obj, _.identity);
+ return _.values(obj);
+ };
+
+ // Return the number of elements in an object.
+ _.size = function(obj) {
+ if (obj == null) return 0;
+ return isArrayLike(obj) ? obj.length : _.keys(obj).length;
+ };
+
+ // Split a collection into two arrays: one whose elements all satisfy the given
+ // predicate, and one whose elements all do not satisfy the predicate.
+ _.partition = function(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var pass = [], fail = [];
+ _.each(obj, function(value, key, obj) {
+ (predicate(value, key, obj) ? pass : fail).push(value);
+ });
+ return [pass, fail];
+ };
+
+ // Array Functions
+ // ---------------
+
+ // Get the first element of an array. Passing **n** will return the first N
+ // values in the array. Aliased as `head` and `take`. The **guard** check
+ // allows it to work with `_.map`.
+ _.first = _.head = _.take = function(array, n, guard) {
+ if (array == null) return void 0;
+ if (n == null || guard) return array[0];
+ return _.initial(array, array.length - n);
+ };
+
+ // Returns everything but the last entry of the array. Especially useful on
+ // the arguments object. Passing **n** will return all the values in
+ // the array, excluding the last N.
+ _.initial = function(array, n, guard) {
+ return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
+ };
+
+ // Get the last element of an array. Passing **n** will return the last N
+ // values in the array.
+ _.last = function(array, n, guard) {
+ if (array == null) return void 0;
+ if (n == null || guard) return array[array.length - 1];
+ return _.rest(array, Math.max(0, array.length - n));
+ };
+
+ // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.
+ // Especially useful on the arguments object. Passing an **n** will return
+ // the rest N values in the array.
+ _.rest = _.tail = _.drop = function(array, n, guard) {
+ return slice.call(array, n == null || guard ? 1 : n);
+ };
+
+ // Trim out all falsy values from an array.
+ _.compact = function(array) {
+ return _.filter(array, _.identity);
+ };
+
+ // Internal implementation of a recursive `flatten` function.
+ var flatten = function(input, shallow, strict, startIndex) {
+ var output = [], idx = 0;
+ for (var i = startIndex || 0, length = getLength(input); i < length; i++) {
+ var value = input[i];
+ if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) {
+ //flatten current level of array or arguments object
+ if (!shallow) value = flatten(value, shallow, strict);
+ var j = 0, len = value.length;
+ output.length += len;
+ while (j < len) {
+ output[idx++] = value[j++];
+ }
+ } else if (!strict) {
+ output[idx++] = value;
+ }
+ }
+ return output;
+ };
+
+ // Flatten out an array, either recursively (by default), or just one level.
+ _.flatten = function(array, shallow) {
+ return flatten(array, shallow, false);
+ };
+
+ // Return a version of the array that does not contain the specified value(s).
+ _.without = function(array) {
+ return _.difference(array, slice.call(arguments, 1));
+ };
+
+ // Produce a duplicate-free version of the array. If the array has already
+ // been sorted, you have the option of using a faster algorithm.
+ // Aliased as `unique`.
+ _.uniq = _.unique = function(array, isSorted, iteratee, context) {
+ if (!_.isBoolean(isSorted)) {
+ context = iteratee;
+ iteratee = isSorted;
+ isSorted = false;
+ }
+ if (iteratee != null) iteratee = cb(iteratee, context);
+ var result = [];
+ var seen = [];
+ for (var i = 0, length = getLength(array); i < length; i++) {
+ var value = array[i],
+ computed = iteratee ? iteratee(value, i, array) : value;
+ if (isSorted) {
+ if (!i || seen !== computed) result.push(value);
+ seen = computed;
+ } else if (iteratee) {
+ if (!_.contains(seen, computed)) {
+ seen.push(computed);
+ result.push(value);
+ }
+ } else if (!_.contains(result, value)) {
+ result.push(value);
+ }
+ }
+ return result;
+ };
+
+ // Produce an array that contains the union: each distinct element from all of
+ // the passed-in arrays.
+ _.union = function() {
+ return _.uniq(flatten(arguments, true, true));
+ };
+
+ // Produce an array that contains every item shared between all the
+ // passed-in arrays.
+ _.intersection = function(array) {
+ var result = [];
+ var argsLength = arguments.length;
+ for (var i = 0, length = getLength(array); i < length; i++) {
+ var item = array[i];
+ if (_.contains(result, item)) continue;
+ for (var j = 1; j < argsLength; j++) {
+ if (!_.contains(arguments[j], item)) break;
+ }
+ if (j === argsLength) result.push(item);
+ }
+ return result;
+ };
+
+ // Take the difference between one array and a number of other arrays.
+ // Only the elements present in just the first array will remain.
+ _.difference = function(array) {
+ var rest = flatten(arguments, true, true, 1);
+ return _.filter(array, function(value){
+ return !_.contains(rest, value);
+ });
+ };
+
+ // Zip together multiple lists into a single array -- elements that share
+ // an index go together.
+ _.zip = function() {
+ return _.unzip(arguments);
+ };
+
+ // Complement of _.zip. Unzip accepts an array of arrays and groups
+ // each array's elements on shared indices
+ _.unzip = function(array) {
+ var length = array && _.max(array, getLength).length || 0;
+ var result = Array(length);
+
+ for (var index = 0; index < length; index++) {
+ result[index] = _.pluck(array, index);
+ }
+ return result;
+ };
+
+ // Converts lists into objects. Pass either a single array of `[key, value]`
+ // pairs, or two parallel arrays of the same length -- one of keys, and one of
+ // the corresponding values.
+ _.object = function(list, values) {
+ var result = {};
+ for (var i = 0, length = getLength(list); i < length; i++) {
+ if (values) {
+ result[list[i]] = values[i];
+ } else {
+ result[list[i][0]] = list[i][1];
+ }
+ }
+ return result;
+ };
+
+ // Generator function to create the findIndex and findLastIndex functions
+ function createPredicateIndexFinder(dir) {
+ return function(array, predicate, context) {
+ predicate = cb(predicate, context);
+ var length = getLength(array);
+ var index = dir > 0 ? 0 : length - 1;
+ for (; index >= 0 && index < length; index += dir) {
+ if (predicate(array[index], index, array)) return index;
+ }
+ return -1;
+ };
+ }
+
+ // Returns the first index on an array-like that passes a predicate test
+ _.findIndex = createPredicateIndexFinder(1);
+ _.findLastIndex = createPredicateIndexFinder(-1);
+
+ // Use a comparator function to figure out the smallest index at which
+ // an object should be inserted so as to maintain order. Uses binary search.
+ _.sortedIndex = function(array, obj, iteratee, context) {
+ iteratee = cb(iteratee, context, 1);
+ var value = iteratee(obj);
+ var low = 0, high = getLength(array);
+ while (low < high) {
+ var mid = Math.floor((low + high) / 2);
+ if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
+ }
+ return low;
+ };
+
+ // Generator function to create the indexOf and lastIndexOf functions
+ function createIndexFinder(dir, predicateFind, sortedIndex) {
+ return function(array, item, idx) {
+ var i = 0, length = getLength(array);
+ if (typeof idx == 'number') {
+ if (dir > 0) {
+ i = idx >= 0 ? idx : Math.max(idx + length, i);
+ } else {
+ length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
+ }
+ } else if (sortedIndex && idx && length) {
+ idx = sortedIndex(array, item);
+ return array[idx] === item ? idx : -1;
+ }
+ if (item !== item) {
+ idx = predicateFind(slice.call(array, i, length), _.isNaN);
+ return idx >= 0 ? idx + i : -1;
+ }
+ for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {
+ if (array[idx] === item) return idx;
+ }
+ return -1;
+ };
+ }
+
+ // Return the position of the first occurrence of an item in an array,
+ // or -1 if the item is not included in the array.
+ // If the array is large and already in sort order, pass `true`
+ // for **isSorted** to use binary search.
+ _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex);
+ _.lastIndexOf = createIndexFinder(-1, _.findLastIndex);
+
+ // Generate an integer Array containing an arithmetic progression. A port of
+ // the native Python `range()` function. See
+ // [the Python documentation](http://docs.python.org/library/functions.html#range).
+ _.range = function(start, stop, step) {
+ if (stop == null) {
+ stop = start || 0;
+ start = 0;
+ }
+ step = step || 1;
+
+ var length = Math.max(Math.ceil((stop - start) / step), 0);
+ var range = Array(length);
+
+ for (var idx = 0; idx < length; idx++, start += step) {
+ range[idx] = start;
+ }
+
+ return range;
+ };
+
+ // Function (ahem) Functions
+ // ------------------
+
+ // Determines whether to execute a function as a constructor
+ // or a normal function with the provided arguments
+ var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) {
+ if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
+ var self = baseCreate(sourceFunc.prototype);
+ var result = sourceFunc.apply(self, args);
+ if (_.isObject(result)) return result;
+ return self;
+ };
+
+ // Create a function bound to a given object (assigning `this`, and arguments,
+ // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if
+ // available.
+ _.bind = function(func, context) {
+ if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
+ if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');
+ var args = slice.call(arguments, 2);
+ var bound = function() {
+ return executeBound(func, bound, context, this, args.concat(slice.call(arguments)));
+ };
+ return bound;
+ };
+
+ // Partially apply a function by creating a version that has had some of its
+ // arguments pre-filled, without changing its dynamic `this` context. _ acts
+ // as a placeholder, allowing any combination of arguments to be pre-filled.
+ _.partial = function(func) {
+ var boundArgs = slice.call(arguments, 1);
+ var bound = function() {
+ var position = 0, length = boundArgs.length;
+ var args = Array(length);
+ for (var i = 0; i < length; i++) {
+ args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i];
+ }
+ while (position < arguments.length) args.push(arguments[position++]);
+ return executeBound(func, bound, this, this, args);
+ };
+ return bound;
+ };
+
+ // Bind a number of an object's methods to that object. Remaining arguments
+ // are the method names to be bound. Useful for ensuring that all callbacks
+ // defined on an object belong to it.
+ _.bindAll = function(obj) {
+ var i, length = arguments.length, key;
+ if (length <= 1) throw new Error('bindAll must be passed function names');
+ for (i = 1; i < length; i++) {
+ key = arguments[i];
+ obj[key] = _.bind(obj[key], obj);
+ }
+ return obj;
+ };
+
+ // Memoize an expensive function by storing its results.
+ _.memoize = function(func, hasher) {
+ var memoize = function(key) {
+ var cache = memoize.cache;
+ var address = '' + (hasher ? hasher.apply(this, arguments) : key);
+ if (!_.has(cache, address)) cache[address] = func.apply(this, arguments);
+ return cache[address];
+ };
+ memoize.cache = {};
+ return memoize;
+ };
+
+ // Delays a function for the given number of milliseconds, and then calls
+ // it with the arguments supplied.
+ _.delay = function(func, wait) {
+ var args = slice.call(arguments, 2);
+ return setTimeout(function(){
+ return func.apply(null, args);
+ }, wait);
+ };
+
+ // Defers a function, scheduling it to run after the current call stack has
+ // cleared.
+ _.defer = _.partial(_.delay, _, 1);
+
+ // Returns a function, that, when invoked, will only be triggered at most once
+ // during a given window of time. Normally, the throttled function will run
+ // as much as it can, without ever going more than once per `wait` duration;
+ // but if you'd like to disable the execution on the leading edge, pass
+ // `{leading: false}`. To disable execution on the trailing edge, ditto.
+ _.throttle = function(func, wait, options) {
+ var context, args, result;
+ var timeout = null;
+ var previous = 0;
+ if (!options) options = {};
+ var later = function() {
+ previous = options.leading === false ? 0 : _.now();
+ timeout = null;
+ result = func.apply(context, args);
+ if (!timeout) context = args = null;
+ };
+ return function() {
+ var now = _.now();
+ if (!previous && options.leading === false) previous = now;
+ var remaining = wait - (now - previous);
+ context = this;
+ args = arguments;
+ if (remaining <= 0 || remaining > wait) {
+ if (timeout) {
+ clearTimeout(timeout);
+ timeout = null;
+ }
+ previous = now;
+ result = func.apply(context, args);
+ if (!timeout) context = args = null;
+ } else if (!timeout && options.trailing !== false) {
+ timeout = setTimeout(later, remaining);
+ }
+ return result;
+ };
+ };
+
+ // Returns a function, that, as long as it continues to be invoked, will not
+ // be triggered. The function will be called after it stops being called for
+ // N milliseconds. If `immediate` is passed, trigger the function on the
+ // leading edge, instead of the trailing.
+ _.debounce = function(func, wait, immediate) {
+ var timeout, args, context, timestamp, result;
+
+ var later = function() {
+ var last = _.now() - timestamp;
+
+ if (last < wait && last >= 0) {
+ timeout = setTimeout(later, wait - last);
+ } else {
+ timeout = null;
+ if (!immediate) {
+ result = func.apply(context, args);
+ if (!timeout) context = args = null;
+ }
+ }
+ };
+
+ return function() {
+ context = this;
+ args = arguments;
+ timestamp = _.now();
+ var callNow = immediate && !timeout;
+ if (!timeout) timeout = setTimeout(later, wait);
+ if (callNow) {
+ result = func.apply(context, args);
+ context = args = null;
+ }
+
+ return result;
+ };
+ };
+
+ // Returns the first function passed as an argument to the second,
+ // allowing you to adjust arguments, run code before and after, and
+ // conditionally execute the original function.
+ _.wrap = function(func, wrapper) {
+ return _.partial(wrapper, func);
+ };
+
+ // Returns a negated version of the passed-in predicate.
+ _.negate = function(predicate) {
+ return function() {
+ return !predicate.apply(this, arguments);
+ };
+ };
+
+ // Returns a function that is the composition of a list of functions, each
+ // consuming the return value of the function that follows.
+ _.compose = function() {
+ var args = arguments;
+ var start = args.length - 1;
+ return function() {
+ var i = start;
+ var result = args[start].apply(this, arguments);
+ while (i--) result = args[i].call(this, result);
+ return result;
+ };
+ };
+
+ // Returns a function that will only be executed on and after the Nth call.
+ _.after = function(times, func) {
+ return function() {
+ if (--times < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+ };
+
+ // Returns a function that will only be executed up to (but not including) the Nth call.
+ _.before = function(times, func) {
+ var memo;
+ return function() {
+ if (--times > 0) {
+ memo = func.apply(this, arguments);
+ }
+ if (times <= 1) func = null;
+ return memo;
+ };
+ };
+
+ // Returns a function that will be executed at most one time, no matter how
+ // often you call it. Useful for lazy initialization.
+ _.once = _.partial(_.before, 2);
+
+ // Object Functions
+ // ----------------
+
+ // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.
+ var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
+ var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
+ 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
+
+ function collectNonEnumProps(obj, keys) {
+ var nonEnumIdx = nonEnumerableProps.length;
+ var constructor = obj.constructor;
+ var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto;
+
+ // Constructor is a special case.
+ var prop = 'constructor';
+ if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);
+
+ while (nonEnumIdx--) {
+ prop = nonEnumerableProps[nonEnumIdx];
+ if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {
+ keys.push(prop);
+ }
+ }
+ }
+
+ // Retrieve the names of an object's own properties.
+ // Delegates to **ECMAScript 5**'s native `Object.keys`
+ _.keys = function(obj) {
+ if (!_.isObject(obj)) return [];
+ if (nativeKeys) return nativeKeys(obj);
+ var keys = [];
+ for (var key in obj) if (_.has(obj, key)) keys.push(key);
+ // Ahem, IE < 9.
+ if (hasEnumBug) collectNonEnumProps(obj, keys);
+ return keys;
+ };
+
+ // Retrieve all the property names of an object.
+ _.allKeys = function(obj) {
+ if (!_.isObject(obj)) return [];
+ var keys = [];
+ for (var key in obj) keys.push(key);
+ // Ahem, IE < 9.
+ if (hasEnumBug) collectNonEnumProps(obj, keys);
+ return keys;
+ };
+
+ // Retrieve the values of an object's properties.
+ _.values = function(obj) {
+ var keys = _.keys(obj);
+ var length = keys.length;
+ var values = Array(length);
+ for (var i = 0; i < length; i++) {
+ values[i] = obj[keys[i]];
+ }
+ return values;
+ };
+
+ // Returns the results of applying the iteratee to each element of the object
+ // In contrast to _.map it returns an object
+ _.mapObject = function(obj, iteratee, context) {
+ iteratee = cb(iteratee, context);
+ var keys = _.keys(obj),
+ length = keys.length,
+ results = {},
+ currentKey;
+ for (var index = 0; index < length; index++) {
+ currentKey = keys[index];
+ results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
+ }
+ return results;
+ };
+
+ // Convert an object into a list of `[key, value]` pairs.
+ _.pairs = function(obj) {
+ var keys = _.keys(obj);
+ var length = keys.length;
+ var pairs = Array(length);
+ for (var i = 0; i < length; i++) {
+ pairs[i] = [keys[i], obj[keys[i]]];
+ }
+ return pairs;
+ };
+
+ // Invert the keys and values of an object. The values must be serializable.
+ _.invert = function(obj) {
+ var result = {};
+ var keys = _.keys(obj);
+ for (var i = 0, length = keys.length; i < length; i++) {
+ result[obj[keys[i]]] = keys[i];
+ }
+ return result;
+ };
+
+ // Return a sorted list of the function names available on the object.
+ // Aliased as `methods`
+ _.functions = _.methods = function(obj) {
+ var names = [];
+ for (var key in obj) {
+ if (_.isFunction(obj[key])) names.push(key);
+ }
+ return names.sort();
+ };
+
+ // Extend a given object with all the properties in passed-in object(s).
+ _.extend = createAssigner(_.allKeys);
+
+ // Assigns a given object with all the own properties in the passed-in object(s)
+ // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
+ _.extendOwn = _.assign = createAssigner(_.keys);
+
+ // Returns the first key on an object that passes a predicate test
+ _.findKey = function(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var keys = _.keys(obj), key;
+ for (var i = 0, length = keys.length; i < length; i++) {
+ key = keys[i];
+ if (predicate(obj[key], key, obj)) return key;
+ }
+ };
+
+ // Return a copy of the object only containing the whitelisted properties.
+ _.pick = function(object, oiteratee, context) {
+ var result = {}, obj = object, iteratee, keys;
+ if (obj == null) return result;
+ if (_.isFunction(oiteratee)) {
+ keys = _.allKeys(obj);
+ iteratee = optimizeCb(oiteratee, context);
+ } else {
+ keys = flatten(arguments, false, false, 1);
+ iteratee = function(value, key, obj) { return key in obj; };
+ obj = Object(obj);
+ }
+ for (var i = 0, length = keys.length; i < length; i++) {
+ var key = keys[i];
+ var value = obj[key];
+ if (iteratee(value, key, obj)) result[key] = value;
+ }
+ return result;
+ };
+
+ // Return a copy of the object without the blacklisted properties.
+ _.omit = function(obj, iteratee, context) {
+ if (_.isFunction(iteratee)) {
+ iteratee = _.negate(iteratee);
+ } else {
+ var keys = _.map(flatten(arguments, false, false, 1), String);
+ iteratee = function(value, key) {
+ return !_.contains(keys, key);
+ };
+ }
+ return _.pick(obj, iteratee, context);
+ };
+
+ // Fill in a given object with default properties.
+ _.defaults = createAssigner(_.allKeys, true);
+
+ // Creates an object that inherits from the given prototype object.
+ // If additional properties are provided then they will be added to the
+ // created object.
+ _.create = function(prototype, props) {
+ var result = baseCreate(prototype);
+ if (props) _.extendOwn(result, props);
+ return result;
+ };
+
+ // Create a (shallow-cloned) duplicate of an object.
+ _.clone = function(obj) {
+ if (!_.isObject(obj)) return obj;
+ return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
+ };
+
+ // Invokes interceptor with the obj, and then returns obj.
+ // The primary purpose of this method is to "tap into" a method chain, in
+ // order to perform operations on intermediate results within the chain.
+ _.tap = function(obj, interceptor) {
+ interceptor(obj);
+ return obj;
+ };
+
+ // Returns whether an object has a given set of `key:value` pairs.
+ _.isMatch = function(object, attrs) {
+ var keys = _.keys(attrs), length = keys.length;
+ if (object == null) return !length;
+ var obj = Object(object);
+ for (var i = 0; i < length; i++) {
+ var key = keys[i];
+ if (attrs[key] !== obj[key] || !(key in obj)) return false;
+ }
+ return true;
+ };
+
+
+ // Internal recursive comparison function for `isEqual`.
+ var eq = function(a, b, aStack, bStack) {
+ // Identical objects are equal. `0 === -0`, but they aren't identical.
+ // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).
+ if (a === b) return a !== 0 || 1 / a === 1 / b;
+ // A strict comparison is necessary because `null == undefined`.
+ if (a == null || b == null) return a === b;
+ // Unwrap any wrapped objects.
+ if (a instanceof _) a = a._wrapped;
+ if (b instanceof _) b = b._wrapped;
+ // Compare `[[Class]]` names.
+ var className = toString.call(a);
+ if (className !== toString.call(b)) return false;
+ switch (className) {
+ // Strings, numbers, regular expressions, dates, and booleans are compared by value.
+ case '[object RegExp]':
+ // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
+ case '[object String]':
+ // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
+ // equivalent to `new String("5")`.
+ return '' + a === '' + b;
+ case '[object Number]':
+ // `NaN`s are equivalent, but non-reflexive.
+ // Object(NaN) is equivalent to NaN
+ if (+a !== +a) return +b !== +b;
+ // An `egal` comparison is performed for other numeric values.
+ return +a === 0 ? 1 / +a === 1 / b : +a === +b;
+ case '[object Date]':
+ case '[object Boolean]':
+ // Coerce dates and booleans to numeric primitive values. Dates are compared by their
+ // millisecond representations. Note that invalid dates with millisecond representations
+ // of `NaN` are not equivalent.
+ return +a === +b;
+ }
+
+ var areArrays = className === '[object Array]';
+ if (!areArrays) {
+ if (typeof a != 'object' || typeof b != 'object') return false;
+
+ // Objects with different constructors are not equivalent, but `Object`s or `Array`s
+ // from different frames are.
+ var aCtor = a.constructor, bCtor = b.constructor;
+ if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor &&
+ _.isFunction(bCtor) && bCtor instanceof bCtor)
+ && ('constructor' in a && 'constructor' in b)) {
+ return false;
+ }
+ }
+ // Assume equality for cyclic structures. The algorithm for detecting cyclic
+ // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
+
+ // Initializing stack of traversed objects.
+ // It's done here since we only need them for objects and arrays comparison.
+ aStack = aStack || [];
+ bStack = bStack || [];
+ var length = aStack.length;
+ while (length--) {
+ // Linear search. Performance is inversely proportional to the number of
+ // unique nested structures.
+ if (aStack[length] === a) return bStack[length] === b;
+ }
+
+ // Add the first object to the stack of traversed objects.
+ aStack.push(a);
+ bStack.push(b);
+
+ // Recursively compare objects and arrays.
+ if (areArrays) {
+ // Compare array lengths to determine if a deep comparison is necessary.
+ length = a.length;
+ if (length !== b.length) return false;
+ // Deep compare the contents, ignoring non-numeric properties.
+ while (length--) {
+ if (!eq(a[length], b[length], aStack, bStack)) return false;
+ }
+ } else {
+ // Deep compare objects.
+ var keys = _.keys(a), key;
+ length = keys.length;
+ // Ensure that both objects contain the same number of properties before comparing deep equality.
+ if (_.keys(b).length !== length) return false;
+ while (length--) {
+ // Deep compare each member
+ key = keys[length];
+ if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
+ }
+ }
+ // Remove the first object from the stack of traversed objects.
+ aStack.pop();
+ bStack.pop();
+ return true;
+ };
+
+ // Perform a deep comparison to check if two objects are equal.
+ _.isEqual = function(a, b) {
+ return eq(a, b);
+ };
+
+ // Is a given array, string, or object empty?
+ // An "empty" object has no enumerable own-properties.
+ _.isEmpty = function(obj) {
+ if (obj == null) return true;
+ if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0;
+ return _.keys(obj).length === 0;
+ };
+
+ // Is a given value a DOM element?
+ _.isElement = function(obj) {
+ return !!(obj && obj.nodeType === 1);
+ };
+
+ // Is a given value an array?
+ // Delegates to ECMA5's native Array.isArray
+ _.isArray = nativeIsArray || function(obj) {
+ return toString.call(obj) === '[object Array]';
+ };
+
+ // Is a given variable an object?
+ _.isObject = function(obj) {
+ var type = typeof obj;
+ return type === 'function' || type === 'object' && !!obj;
+ };
+
+ // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError.
+ _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) {
+ _['is' + name] = function(obj) {
+ return toString.call(obj) === '[object ' + name + ']';
+ };
+ });
+
+ // Define a fallback version of the method in browsers (ahem, IE < 9), where
+ // there isn't any inspectable "Arguments" type.
+ if (!_.isArguments(arguments)) {
+ _.isArguments = function(obj) {
+ return _.has(obj, 'callee');
+ };
+ }
+
+ // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,
+ // IE 11 (#1621), and in Safari 8 (#1929).
+ if (typeof /./ != 'function' && typeof Int8Array != 'object') {
+ _.isFunction = function(obj) {
+ return typeof obj == 'function' || false;
+ };
+ }
+
+ // Is a given object a finite number?
+ _.isFinite = function(obj) {
+ return isFinite(obj) && !isNaN(parseFloat(obj));
+ };
+
+ // Is the given value `NaN`? (NaN is the only number which does not equal itself).
+ _.isNaN = function(obj) {
+ return _.isNumber(obj) && obj !== +obj;
+ };
+
+ // Is a given value a boolean?
+ _.isBoolean = function(obj) {
+ return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
+ };
+
+ // Is a given value equal to null?
+ _.isNull = function(obj) {
+ return obj === null;
+ };
+
+ // Is a given variable undefined?
+ _.isUndefined = function(obj) {
+ return obj === void 0;
+ };
+
+ // Shortcut function for checking if an object has a given property directly
+ // on itself (in other words, not on a prototype).
+ _.has = function(obj, key) {
+ return obj != null && hasOwnProperty.call(obj, key);
+ };
+
+ // Utility Functions
+ // -----------------
+
+ // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
+ // previous owner. Returns a reference to the Underscore object.
+ _.noConflict = function() {
+ root._ = previousUnderscore;
+ return this;
+ };
+
+ // Keep the identity function around for default iteratees.
+ _.identity = function(value) {
+ return value;
+ };
+
+ // Predicate-generating functions. Often useful outside of Underscore.
+ _.constant = function(value) {
+ return function() {
+ return value;
+ };
+ };
+
+ _.noop = function(){};
+
+ _.property = property;
+
+ // Generates a function for a given object that returns a given property.
+ _.propertyOf = function(obj) {
+ return obj == null ? function(){} : function(key) {
+ return obj[key];
+ };
+ };
+
+ // Returns a predicate for checking whether an object has a given set of
+ // `key:value` pairs.
+ _.matcher = _.matches = function(attrs) {
+ attrs = _.extendOwn({}, attrs);
+ return function(obj) {
+ return _.isMatch(obj, attrs);
+ };
+ };
+
+ // Run a function **n** times.
+ _.times = function(n, iteratee, context) {
+ var accum = Array(Math.max(0, n));
+ iteratee = optimizeCb(iteratee, context, 1);
+ for (var i = 0; i < n; i++) accum[i] = iteratee(i);
+ return accum;
+ };
+
+ // Return a random integer between min and max (inclusive).
+ _.random = function(min, max) {
+ if (max == null) {
+ max = min;
+ min = 0;
+ }
+ return min + Math.floor(Math.random() * (max - min + 1));
+ };
+
+ // A (possibly faster) way to get the current timestamp as an integer.
+ _.now = Date.now || function() {
+ return new Date().getTime();
+ };
+
+ // List of HTML entities for escaping.
+ var escapeMap = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#x27;',
+ '`': '&#x60;'
+ };
+ var unescapeMap = _.invert(escapeMap);
+
+ // Functions for escaping and unescaping strings to/from HTML interpolation.
+ var createEscaper = function(map) {
+ var escaper = function(match) {
+ return map[match];
+ };
+ // Regexes for identifying a key that needs to be escaped
+ var source = '(?:' + _.keys(map).join('|') + ')';
+ var testRegexp = RegExp(source);
+ var replaceRegexp = RegExp(source, 'g');
+ return function(string) {
+ string = string == null ? '' : '' + string;
+ return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
+ };
+ };
+ _.escape = createEscaper(escapeMap);
+ _.unescape = createEscaper(unescapeMap);
+
+ // If the value of the named `property` is a function then invoke it with the
+ // `object` as context; otherwise, return it.
+ _.result = function(object, property, fallback) {
+ var value = object == null ? void 0 : object[property];
+ if (value === void 0) {
+ value = fallback;
+ }
+ return _.isFunction(value) ? value.call(object) : value;
+ };
+
+ // Generate a unique integer id (unique within the entire client session).
+ // Useful for temporary DOM ids.
+ var idCounter = 0;
+ _.uniqueId = function(prefix) {
+ var id = ++idCounter + '';
+ return prefix ? prefix + id : id;
+ };
+
+ // By default, Underscore uses ERB-style template delimiters, change the
+ // following template settings to use alternative delimiters.
+ _.templateSettings = {
+ evaluate : /<%([\s\S]+?)%>/g,
+ interpolate : /<%=([\s\S]+?)%>/g,
+ escape : /<%-([\s\S]+?)%>/g
+ };
+
+ // When customizing `templateSettings`, if you don't want to define an
+ // interpolation, evaluation or escaping regex, we need one that is
+ // guaranteed not to match.
+ var noMatch = /(.)^/;
+
+ // Certain characters need to be escaped so that they can be put into a
+ // string literal.
+ var escapes = {
+ "'": "'",
+ '\\': '\\',
+ '\r': 'r',
+ '\n': 'n',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+ };
+
+ var escaper = /\\|'|\r|\n|\u2028|\u2029/g;
+
+ var escapeChar = function(match) {
+ return '\\' + escapes[match];
+ };
+
+ // JavaScript micro-templating, similar to John Resig's implementation.
+ // Underscore templating handles arbitrary delimiters, preserves whitespace,
+ // and correctly escapes quotes within interpolated code.
+ // NB: `oldSettings` only exists for backwards compatibility.
+ _.template = function(text, settings, oldSettings) {
+ if (!settings && oldSettings) settings = oldSettings;
+ settings = _.defaults({}, settings, _.templateSettings);
+
+ // Combine delimiters into one regular expression via alternation.
+ var matcher = RegExp([
+ (settings.escape || noMatch).source,
+ (settings.interpolate || noMatch).source,
+ (settings.evaluate || noMatch).source
+ ].join('|') + '|$', 'g');
+
+ // Compile the template source, escaping string literals appropriately.
+ var index = 0;
+ var source = "__p+='";
+ text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
+ source += text.slice(index, offset).replace(escaper, escapeChar);
+ index = offset + match.length;
+
+ if (escape) {
+ source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
+ } else if (interpolate) {
+ source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
+ } else if (evaluate) {
+ source += "';\n" + evaluate + "\n__p+='";
+ }
+
+ // Adobe VMs need the match returned to produce the correct offest.
+ return match;
+ });
+ source += "';\n";
+
+ // If a variable is not specified, place data values in local scope.
+ if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
+
+ source = "var __t,__p='',__j=Array.prototype.join," +
+ "print=function(){__p+=__j.call(arguments,'');};\n" +
+ source + 'return __p;\n';
+
+ try {
+ var render = new Function(settings.variable || 'obj', '_', source);
+ } catch (e) {
+ e.source = source;
+ throw e;
+ }
+
+ var template = function(data) {
+ return render.call(this, data, _);
+ };
+
+ // Provide the compiled source as a convenience for precompilation.
+ var argument = settings.variable || 'obj';
+ template.source = 'function(' + argument + '){\n' + source + '}';
+
+ return template;
+ };
+
+ // Add a "chain" function. Start chaining a wrapped Underscore object.
+ _.chain = function(obj) {
+ var instance = _(obj);
+ instance._chain = true;
+ return instance;
+ };
+
+ // OOP
+ // ---------------
+ // If Underscore is called as a function, it returns a wrapped object that
+ // can be used OO-style. This wrapper holds altered versions of all the
+ // underscore functions. Wrapped objects may be chained.
+
+ // Helper function to continue chaining intermediate results.
+ var result = function(instance, obj) {
+ return instance._chain ? _(obj).chain() : obj;
+ };
+
+ // Add your own custom functions to the Underscore object.
+ _.mixin = function(obj) {
+ _.each(_.functions(obj), function(name) {
+ var func = _[name] = obj[name];
+ _.prototype[name] = function() {
+ var args = [this._wrapped];
+ push.apply(args, arguments);
+ return result(this, func.apply(_, args));
+ };
+ });
+ };
+
+ // Add all of the Underscore functions to the wrapper object.
+ _.mixin(_);
+
+ // Add all mutator Array functions to the wrapper.
+ _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
+ var method = ArrayProto[name];
+ _.prototype[name] = function() {
+ var obj = this._wrapped;
+ method.apply(obj, arguments);
+ if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];
+ return result(this, obj);
+ };
+ });
+
+ // Add all accessor Array functions to the wrapper.
+ _.each(['concat', 'join', 'slice'], function(name) {
+ var method = ArrayProto[name];
+ _.prototype[name] = function() {
+ return result(this, method.apply(this._wrapped, arguments));
+ };
+ });
+
+ // Extracts the result from a wrapped and chained object.
+ _.prototype.value = function() {
+ return this._wrapped;
+ };
+
+ // Provide unwrapping proxy for some methods used in engine operations
+ // such as arithmetic and JSON stringification.
+ _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
+
+ _.prototype.toString = function() {
+ return '' + this._wrapped;
+ };
+
+ // AMD registration happens at the end for compatibility with AMD loaders
+ // that may not enforce next-turn semantics on modules. Even though general
+ // practice for AMD registration is to be anonymous, underscore registers
+ // as a named module because, like jQuery, it is a base library that is
+ // popular enough to be bundled in a third party lib, but not be part of
+ // an AMD load request. Those cases could generate an error when an
+ // anonymous define() is called outside of a loader request.
+ if (typeof define === 'function' && define.amd) {
+ define('underscore', [], function() {
+ return _;
+ });
+ }
+}.call(this));
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/package.json b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/package.json
new file mode 100644
index 0000000..1361d30
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/package.json
@@ -0,0 +1,65 @@
+{
+ "name": "node-restful",
+ "description": "A library for making REST API's in node.js with express",
+ "version": "0.2.5",
+ "peerDependencies": {
+ "mongoose": "~4"
+ },
+ "devDependencies": {
+ "express": "4.12.4",
+ "body-parser": "1.12.4",
+ "method-override": "2.3.3",
+ "mongodb": "2.0.33",
+ "jade": "1.11.0",
+ "mocha": "2.2.5",
+ "mongoose": "~4",
+ "should": "6.0.3",
+ "supertest": "1.0.1",
+ "sinon": "1.15.3",
+ "pow-mongodb-fixtures": "git+https://github.com/riyadhalnur/pow-mongodb-fixtures.git#upgrade-mongodb-drivers",
+ "morgan": "1.5.3"
+ },
+ "keywords": [
+ "node-restful",
+ "restful",
+ "framework",
+ "rest",
+ "api"
+ ],
+ "scripts": {
+ "test": "make test"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/baugarten/node-restful"
+ },
+ "main": "index.js",
+ "dependencies": {
+ "underscore": "1.8.3"
+ },
+ "gitHead": "d5277ae484cfb43ddb71dd97580a6989ca281e76",
+ "bugs": {
+ "url": "https://github.com/baugarten/node-restful/issues"
+ },
+ "homepage": "https://github.com/baugarten/node-restful",
+ "_id": "node-restful@0.2.5",
+ "_shasum": "8cfe2ff4b7d769e58e319a50ab15a694107eda53",
+ "_from": "node-restful@latest",
+ "_npmVersion": "1.4.16",
+ "_npmUser": {
+ "name": "baugarten",
+ "email": "baugarten@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "baugarten",
+ "email": "baugarten@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "8cfe2ff4b7d769e58e319a50ab15a694107eda53",
+ "tarball": "https://registry.npmjs.org/node-restful/-/node-restful-0.2.5.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/node-restful/-/node-restful-0.2.5.tgz"
+}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/fixtures/config.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/fixtures/config.js
new file mode 100644
index 0000000..bdb1208
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/fixtures/config.js
@@ -0,0 +1,32 @@
+var express = require('express'),
+ fixtures = require('pow-mongodb-fixtures'),
+ app = require('../../examples/movies/'),
+ data = require('./data'),
+ done = false,
+ mongoose,
+ callback;
+
+
+exports.app = app;
+exports.movie = app.movie;
+exports.user = app.user;
+exports.review = app.review
+mongoose = app.mongoose;
+fixtures = fixtures.connect(mongoose.connection.name);
+
+fixtures.load(data, function(err) {
+ exports.users = data.users;
+ exports.movies = data.movies;
+ exports.reviews = data.reviews;
+ done = true;
+ if (callback) return callback();
+});
+
+exports.movies = data.movies;
+exports.users = data.users;
+exports.reviews = data.reviews;
+
+exports.ready = function(cb) {
+ callback = cb;
+ if (done) callback();
+};
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/fixtures/data.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/fixtures/data.js
new file mode 100644
index 0000000..7beafd9
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/fixtures/data.js
@@ -0,0 +1,101 @@
+var ObjectId = require('mongodb').ObjectID;
+
+exports.users = [
+ {
+ _id: new ObjectId(),
+ username: "test",
+ pass_hash: 12374238719845134515,
+ },
+ {
+ _id: new ObjectId(),
+ username: "test2",
+ pass_hash: 1237987381263189273123,
+ }
+];
+
+exports.movies = [
+ {
+ _id: new ObjectId(),
+ title: "Title1",
+ year: 2012,
+ meta: {
+ productionco: "idk",
+ director: exports.users[1]._id,
+ },
+ creator: exports.users[0]._id,
+ secret: "A SECRET STRING",
+ },
+ {
+ _id: new ObjectId(),
+ title: "Title2",
+ year: 2011
+ },
+ {
+ _id: new ObjectId(),
+ title: "Title3",
+ year: 2013
+ },
+ {
+ _id: new ObjectId(),
+ title: "Title4",
+ year: 2013
+ },
+ {
+ _id: new ObjectId(),
+ title: "Title5",
+ year: 2013
+ },
+ {
+ _id: new ObjectId(),
+ title: "Title6",
+ year: 2010
+ },
+ {
+ _id: new ObjectId(),
+ title: "Title7",
+ year: 2011
+ },
+ {
+ _id: new ObjectId(),
+ title: "Title8",
+ year: 2012
+ },
+ {
+ _id: new ObjectId(),
+ title: "Title9",
+ year: 2010
+ },
+ {
+ _id: new ObjectId(),
+ title: "Title10",
+ year: 2011
+ },
+ {
+ _id: new ObjectId(),
+ title: "Title11",
+ year: 2012
+ },
+ {
+ _id: new ObjectId(),
+ title: "Title12",
+ year: 2010
+ },
+ {
+ _id: new ObjectId(),
+ title: "Title13",
+ year: 2011
+ },
+ {
+ _id: new ObjectId(),
+ title: "Title14",
+ year: 2009
+ }
+];
+
+exports.reviews = [
+ {
+ _id: new ObjectId(),
+ body: "This is a movie review!",
+ length: 127
+ }
+];
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/fixtures/movies/index.jade b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/fixtures/movies/index.jade
new file mode 100644
index 0000000..a17ae31
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/fixtures/movies/index.jade
@@ -0,0 +1,4 @@
+h1 index
+
+each item, i in locals
+ li #{item.title}: #{i}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/fixtures/movies/show.jade b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/fixtures/movies/show.jade
new file mode 100644
index 0000000..7cb6b3c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/fixtures/movies/show.jade
@@ -0,0 +1,3 @@
+h1 show
+
+#{title}
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.chainable.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.chainable.js
new file mode 100644
index 0000000..89b083f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.chainable.js
@@ -0,0 +1,48 @@
+var should = require('should'),
+ request = require('supertest'),
+ restful = require('../'),
+ mongoose = require('mongoose'),
+ sinon = require('sinon');
+
+describe('Model', function() {
+
+ before(function() {
+ restful.model('posts', mongoose.Schema({ title: 'string' }));
+ });
+ it('should return a mongoose model', function() {
+ var posts = restful.model('posts');
+
+ posts.should.have.property('methods');
+ posts.should.have.property('update');
+ posts.should.have.property('remove');
+ posts.should.have.property('updateOptions');
+ posts.should.have.property('removeOptions');
+ });
+ it('should add methods in a chainable way', function() {
+ var posts = restful.model('posts');
+ posts.allowed_methods.should.have.property('get');
+ posts.methods(['get', 'post', 'put'])
+ .updateOptions({})
+ .removeOptions({})
+ .template('/idk/where/this/goes/');
+ posts.allowed_methods.should.containEql('get');
+ posts.allowed_methods.should.containEql('post');
+ posts.allowed_methods.should.containEql('put');
+ posts.update_options.should.be.an.instanceOf(Object);
+ posts.remove_options.should.be.an.instanceOf(Object);
+ posts.templateRoot.should.eql('/idk/where/this/goes');
+
+ });
+ it('should be updateable', function(done) {
+ var Posts = restful.model('posts');
+ Posts.create({
+ title: "First post"
+ }, function(err, post) {
+ post.title.should.equal('First post');
+ Posts.update({_id: post._id}, { title: "Second post"}, function(err, count, resp) {
+ count.n.should.equal(1);
+ done()
+ });
+ })
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.excludes.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.excludes.js
new file mode 100644
index 0000000..ca5e902
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.excludes.js
@@ -0,0 +1,21 @@
+var config = require('./fixtures/config'),
+ request = require('supertest');
+
+describe('Model', function() {
+ var app, movie, user;
+ before(function() {
+ app = config.app;
+ movie = config.movie;
+ user = config.user;
+ });
+ describe('excludes', function() {
+ it('should exclude the excluded fields', function(done) {
+ request(app)
+ .get('/api/movies/' + config.movies[0]._id + '/')
+ .end(function(err, res) {
+ res.body.should.not.have.property('secret');
+ done();
+ });
+ });
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.filters.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.filters.js
new file mode 100644
index 0000000..5cab60d
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.filters.js
@@ -0,0 +1,191 @@
+var should = require('should'),
+ request = require('supertest'),
+ sinon = require('sinon');
+
+describe('Model', function() {
+ var config,
+ movies,
+ users,
+ app,
+ movie1,
+ movie2,
+ movie3,
+ user1,
+ user2;
+ before(function(done) {
+ config = require('./fixtures/config');
+ config.ready(function() {
+ app = config.app;
+ movies = config.movie;
+ users = config.user;
+ movie1 = config.movies[0];
+ movie2 = config.movies[1];
+ movie3 = config.movies[2];
+ user1 = config.users[0];
+ user2 = config.users[1];
+ done();
+ });
+ });
+ describe('filters', function() {
+ it('should limit GET to 10', function(done) {
+ request(app)
+ .get('/api/movies?limit=10')
+ .end(function(err, res) {
+ res.body.length.should.equal(10);
+ done();
+ });
+ });
+ it('should limit GET to 1', function(done) {
+ request(app)
+ .get('/api/movies?limit=1')
+ .end(function(err, res) {
+ res.body.length.should.equal(1);
+ done();
+ });
+ });
+ it('should skip by 5', function(done) {
+ request(app)
+ .get('/api/movies?limit=1&skip=5')
+ .end(function(err, res) {
+ request(app)
+ .get('/api/movies?limit=6')
+ .end(function(err2, res2) {
+ res.body[0].should.eql(res2.body[res2.body.length-1]);
+ done();
+ });
+ });
+ });
+ it('should select fields', function(done) {
+ request(app)
+ .get('/api/movies?select=year')
+ .end(function(err, res) {
+ res.body.forEach(function(movie) {
+ movie.should.not.have.property('title');
+ movie.should.have.property('year');
+ });
+ done();
+ });
+ });
+ it('should sort documents', function(done) {
+ request(app)
+ .get('/api/movies?sort=year')
+ .end(function(err, res) {
+ for(var i = 1; i < res.body.length; i++) {
+ (res.body[i].year >= res.body[i-1].year).should.be.true;
+ }
+ done();
+ });
+ });
+ it('should filter fields using equal', function(done) {
+ request(app)
+ .get('/api/movies?year=2011')
+ .end(function(err, res) {
+ res.body.forEach(function(movie) {
+ movie.year.should.equal(2011);
+ });
+ done();
+ });
+ });
+ it('should filter fields using gte', function(done) {
+ request(app)
+ .get('/api/movies?year__gte=2012')
+ .end(function(err, res) {
+ res.body.forEach(function(movie) {
+ movie.year.should.be.above(2011);
+ });
+ done();
+ });
+ });
+ it('should filter fields using gt', function(done) {
+ request(app)
+ .get('/api/movies?year__gt=2011')
+ .end(function(err, res) {
+ res.body.forEach(function(movie) {
+ movie.year.should.be.above(2011);
+ });
+ done();
+ });
+ });
+ it('should filter fields using lt', function(done) {
+ request(app)
+ .get('/api/movies?year__lt=2013')
+ .end(function(err, res) {
+ res.body.forEach(function(movie) {
+ movie.year.should.be.below(2013);
+ });
+ done();
+ });
+ });
+ it('should filter fields using lte', function(done) {
+ request(app)
+ .get('/api/movies?year__lte=2012')
+ .end(function(err, res) {
+ res.body.forEach(function(movie) {
+ movie.year.should.be.below(2013);
+ });
+ done();
+ });
+ });
+ it('should filter fields using ne', function(done) {
+ request(app)
+ .get('/api/movies?year__ne=2013')
+ .end(function(err, res) {
+ res.body.forEach(function(movie) {
+ movie.year.should.not.equal(2013);
+ });
+ done();
+ });
+ });
+ it('should filter fields using regex', function(done) {
+ request(app)
+ .get('/api/movies?title__regex=2')
+ .end(function(err, res) {
+ res.body.forEach(function(movie) {
+ movie.title.should.containEql('2');
+ });
+ done();
+ });
+ });
+ it('should filter fields using regex with options', function(done) {
+ request(app)
+ .get('/api/movies?title__regex=' + encodeURIComponent("/tITLE/i"))
+ .end(function(err, res) {
+ res.body.length.should.be.above(0);
+ res.body.forEach(function(movie) {
+ movie.title.toLowerCase().should.containEql('title');
+ });
+ done();
+ });
+ });
+ it('should populate an objectId', function(done) {
+ request(app)
+ .get('/api/movies/' + movie1._id + '?populate=creator')
+ .end(function(err, res) {
+ res.body.creator.username.should.equal(user1.username);
+ res.body.creator.pass_hash.should.equal(user1.pass_hash);
+ done();
+ });
+ });
+ it('should filter using in', function(done) {
+ request(app)
+ .get('/api/movies?year__in=2010,2011')
+ .end(function(err, res) {
+ res.body.forEach(function(movie) {
+ [2010,2011].indexOf(movie.year).should.be.above(-1);
+ });
+ done();
+ });
+ });
+ it('should filter using nin', function(done) {
+ request(app)
+ .get('/api/movies?year__nin=2012,2013,2014')
+ .end(function(err, res) {
+ res.body.length.should.be.above(0)
+ res.body.forEach(function(movie) {
+ [2012,2013,2014].indexOf(movie.year).should.equal(-1);
+ });
+ done();
+ });
+ });
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.handle.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.handle.js
new file mode 100644
index 0000000..10b0e22
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.handle.js
@@ -0,0 +1,54 @@
+var should = require('should'),
+ request = require('supertest'),
+ config = require('./fixtures/config'),
+ sinon = require('sinon');
+
+describe.skip('Model', function() {
+ var movies,
+ users,
+ app,
+ movie1,
+ movie2,
+ movie3,
+ user1,
+ user2;
+ before(function() {
+ app = config.app;
+ movies = config.movie;
+ users = config.user;
+ movie1 = config.movies[0];
+ movie2 = config.movies[1];
+ movie3 = config.movies[2];
+ user1 = config.users[0];
+ user2 = config.users[1];
+ });
+ describe('.handle', function() {
+ it('should handle a pseudo-get route', function(done) {
+ request(app)
+ .get('/api/movies/fakeget')
+ .end(function(err, res) {
+ request(app)
+ .get('/api/movies')
+ .end(function(err2, res2) {
+ res.body.should.eql(res2.body);
+ done();
+ });
+ });
+ });
+ it('should handle a pseudo-postroute', function(done) {
+ request(app)
+ .post('/api/movies/fakepost')
+ .send({
+ title: "A very stupid movie",
+ })
+ .end(function(err, res) {
+ res.body.title.should.equal('A very stupid movie');
+ res.body._id.should.not.be.empty;
+ movies.Model.findById(res.body._id, function(err, model) {
+ model.title.should.equal('A very stupid movie');
+ done();
+ });
+ });
+ });
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.hooks.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.hooks.js
new file mode 100644
index 0000000..9207cbc
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.hooks.js
@@ -0,0 +1,52 @@
+var config = require('./fixtures/config'),
+ request = require('supertest'),
+ sinon = require('sinon');
+
+describe('Model', function() {
+ var app, movie, user;
+ before(function() {
+ app = config.app;
+ movie = config.movie;
+ user = config.user;
+ });
+ describe('before hook', function() {
+ it('should call the before hook on a GET', function() {
+ movie.routes.get.before.length.should.equal(1);
+ movie.routes.get.after.length.should.equal(1);
+ });
+ it('should call the before hook on a POST', function() {
+ movie.routes.post.before.length.should.equal(1);
+ movie.routes.post.after.length.should.equal(1);
+ });
+ it('should call the before hook on a PUT', function() {
+ movie.routes.put.before.length.should.equal(1);
+ movie.routes.put.after.length.should.equal(1);
+ });
+ it('should call after all hook on user defined all route', function(done) {
+ request(app)
+ .get('/api/movies/recommend')
+ .end(function(err, res) {
+ res.body.recommend.should.equal('called');
+ res.body.after.should.equal('called');
+ done();
+ });
+ });
+ it('should call before all hook on user defined get route', function(done) {
+ request(app)
+ .get('/api/movies/' + config.movies[2]._id + '/athirdroute')
+ .end(function(err, res) {
+ res.body.athirdroute.should.equal('called');
+ res.body.after.should.equal('called');
+ done();
+ });
+ });
+ it('should use the properties set in a before route for filtering', function(done) {
+ request(app)
+ .get('/users')
+ .end(function(err, res) {
+ res.body.should.have.length(1);
+ done(err);
+ });
+ });
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.js
new file mode 100644
index 0000000..a51d6cb
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.js
@@ -0,0 +1,301 @@
+var should = require('should'),
+ request = require('supertest'),
+ config = require('./fixtures/config'),
+ sinon = require('sinon'),
+ checkForHexRegExp = new RegExp("^[0-9a-fA-F]{24}$");
+
+var oldA = should.Assertion.prototype.a;
+should.Assertion.prototype.a = function(type, desc) {
+ if (type === '_id') {
+ this.assert(checkForHexRegExp.test(this.obj),
+ function() { return 'expected ' + this.inspect + ' to be a ' + type + (desc ? " | " + desc : ""); },
+ function(){ return 'expected ' + this.inspect + ' not to be a ' + type + (desc ? " | " + desc : ""); });
+ return this;
+ }
+ return oldA.call(this, type, desc);
+};
+
+describe('Model', function() {
+ var movies,
+ users,
+ app,
+ movie1,
+ movie2,
+ movie3,
+ user1,
+ user2,
+ review;
+ before(function(done) {
+ config.ready(function() {
+ app = config.app;
+ movies = config.movie;
+ users = config.user;
+ movie1 = config.movies[0];
+ movie2 = config.movies[1];
+ movie3 = config.movies[2];
+ user1 = config.users[0];
+ user2 = config.users[1];
+ review = config.reviews[0];
+ done();
+ });
+ });
+ describe('handlers', function() {
+ it('should handle schema request', function(done) {
+ request(app)
+ .get('/api/movies/schema')
+ .expect('Content-Type', /json/)
+ .expect(200)
+ .end(function(err, res) {
+ res.body.resource.should.equal('movies');
+ res.body.allowed_methods.should.eql(Object.keys(movies.allowed_methods));
+ res.body.fields.should.be.an.instanceOf(Object);
+ Object.keys(movies.schema.paths).forEach(function(path) {
+ res.body.fields.should.have.property(path);
+ });
+ res.body.list_uri.should.equal('/api/movies');
+ res.body.detail_uri.should.equal('/api/movies/:id');
+ done();
+ });
+ });
+
+ it('should dispatch to GET', function(done) {
+ request(app)
+ .get('/api/movies')
+ .expect('Content-Type', /json/)
+ .expect(200, done);
+ });
+ it('should fail POST with no data', function(done) {
+ request(app)
+ .post('/api/movies')
+ .expect('Content-Type', /json/)
+ .expect(400, done);
+ });
+ it('should POST with data', function(done) {
+ request(app)
+ .post('/api/movies')
+ .send({
+ title: "A very stupid movie",
+ year: "214243"
+ })
+ .expect('Content-Type', /json/)
+ .expect(201 )
+ .end(function(err, res) {
+ res.body.title.should.equal('A very stupid movie');
+ res.body._id.should.type('string');
+ done(err);
+ });
+ });
+ it('should PUT data', function(done) {
+ request(app)
+ .put('/api/movies/' + movie2._id)
+ .send({
+ title: 'I changed the movie title'
+ })
+ .expect('Content-Type', /json/)
+ .expect(200)
+ .end(function(err, res) {
+ res.body.title.should.equal('I changed the movie title');
+ movies.findById(movie2._id, function(err, movie) {
+ movie.title.should.equal('I changed the movie title');
+ done();
+ });
+ });
+ });
+ it('should fail on GET missing resource', function(done) {
+ request(app)
+ .get('/api/movies/55e8169191ad293c221a6c9d')
+ .expect(404, done);
+ });
+ it('should fail on PUT missing resource (shouldUseAtomicUpdate=false)', function(done) {
+ request(app)
+ .put('/api/genres/55e8169191ad293c221a6c9d')
+ .send({
+ name: "Mysterious genre"
+ })
+ .expect(404, done);
+ });
+ it('should fail on PUT missing resource (shouldUseAtomicUpdate=true)', function(done) {
+ request(app)
+ .put('/api/movies/55e8169191ad293c221a6c9d')
+ .send({
+ title: "Mysterious genre"
+ })
+ .expect(404, done);
+ });
+ it('should fail on DELETE missing resource (shouldUseAtomicUpdate=false)', function(done) {
+ request(app)
+ .del('/api/genres/55e8169191ad293c221a6c9d')
+ .expect(404, done);
+ });
+ it('should fail on PUT without filter on unsortable model', function(done) {
+ request(app)
+ .put('/api/movies')
+ .send({
+ title: "A very stupid movie"
+ })
+ .expect(404, done);
+ });
+ it('should fail on DELETE without a filter', function(done) {
+ request(app)
+ .del('/users')
+ .expect(404, done);
+ });
+ it('should DELETE a movie', function(done) {
+ request(app)
+ .del('/api/movies/' + movie3._id)
+ .expect(200)
+ .expect('Content-Type', /json/)
+ .end(function(err, res) {
+ movies.findById(movie3._id, function(err, movie) {
+ should.not.exist(movie);
+ done();
+ });
+ });
+ });
+ it("shouldn't put data on deleted resource", function(done) {
+ request(app)
+ .del('/api/movies/' + config.movies[5]._id)
+ .end(function(err, res) {
+ request(app)
+ .put('/api/movies/' + config.movies[5]._id)
+ .send({
+ title: 'But I already deleted you'
+ })
+ .expect(404, done);
+ });
+ });
+ it('should 400 deleting a resource twice', function(done) {
+ request(app)
+ .del('/api/movies/' + config.movies[6]._id)
+ .end(function() {
+ request(app)
+ .del('/api/movies/' + config.movies[6]._id)
+ .expect(404, done);
+ });
+ });
+ it('should 404 on undefined route', function(done) {
+ request(app)
+ .del('/api/movies')
+ .expect(404, done);
+ });
+ it('should return a nested model at the generated endpoint creator', function(done) {
+ request(app)
+ .get('/api/movies/' + movie1._id + '/creator')
+ .expect('Content-Type', /json/)
+ .expect(200)
+ .end(function(err, res) {
+ if (err) return done(err);
+ res.should.be.json;
+ res.body.username.should.equal('test');
+ res.body.pass_hash.should.equal(12374238719845134515);
+ done();
+ });
+ });
+ it('should 404 if we request an object endpoint without a filter', function(done) {
+ request(app)
+ .get('/api/movies/creator')
+ .expect(404, done);
+ });
+ it('should retrieve a deeply nested endpoint', function(done) {
+ request(app)
+ .get('/api/movies/' + movie1._id + '/meta/director')
+ .expect('Content-Type', /json/)
+ .expect(200)
+ .end(function(err, res) {
+ res.should.be.json;
+ res.body.username.should.equal('test2');
+ res.body.pass_hash.should.equal(1237987381263189273123);
+ done();
+ });
+
+ });
+ it('should 404 on a nested object', function(done) {
+ request(app)
+ .get('/api/movies/' + movie1._id + '/meta')
+ .expect(404, done)
+ });
+ it('should get a user defined route', function(done) {
+ request(app)
+ .get('/api/movies/recommend')
+ .expect('Content-Type', /json/)
+ .expect(200)
+ .end(function(err, res) {
+ res.should.be.json;
+ res.body.recommend.should.equal("called");
+ done();
+ });
+ });
+ it('should get anotheroute (user defined route)', function(done) {
+ request(app)
+ .get('/api/movies/anotherroute')
+ .expect('Content-Type', /json/)
+ .expect(200)
+ .end(function(err, res) {
+ res.should.be.json;
+ res.body.anotherroute.should.equal("called");
+ done();
+ });
+ });
+ it('should get athirdroute (user defined route)', function(done) {
+ request(app)
+ .get('/api/movies/' + movie1._id + '/athirdroute')
+ .expect('Content-Type', /json/)
+ .expect(200)
+ .end(function(err, res) {
+ res.should.be.json;
+ res.body.athirdroute.should.equal("called");
+ done();
+ });
+ });
+ it('should fail athirdroute (user defined route)', function(done) {
+ request(app)
+ .get('/api/movies/athirdroute')
+ .expect(404, done);
+ });
+ it('should fail athirdroute (user defined route)', function(done) {
+ request(app)
+ .put('/api/movies/' + movie1._id + '/athirdroute')
+ .expect(404, done);
+ });
+ it('should allow put of entire object', function(done) {
+ request(app)
+ .get('/api/movies/' + config.movies[7]._id)
+ .end(function(err, res) {
+ var movie = res.body;
+ movie.title = 'A different title';
+ request(app)
+ .put('/api/movies/' + movie._id)
+ .send(movie)
+ .expect('Content-Type', /json/)
+ .expect(201)
+ .end(function(err, res) {
+ res.body.title.should.equal('A different title');
+ done();
+ });
+ });
+ });
+ it('should allow overriding of schema route', function(done) {
+ request(app)
+ .get('/users/schema')
+ .expect(404, done);
+ });
+ it('should allow multiple handlers to be called on a single route', function(done) {
+ request(app)
+ .get('/api/movies/pshh')
+ .expect(200)
+ .end(function(err, res) {
+ res.body.pshh.should.equal('called');
+ done(err);
+ });
+ });
+ it('should allow get request for model with field named `length`', function(done) {
+ request(app)
+ .get('/api/reviews/' + review._id)
+ .expect(200)
+ .end(function(err, res) {
+ res.body.body.should.equal('This is a movie review!');
+ done(err);
+ });
+ });
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.template.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.template.js
new file mode 100644
index 0000000..8174391
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/test/model.template.js
@@ -0,0 +1,62 @@
+var should = require('should'),
+ request = require('supertest'),
+ config = require('./fixtures/config'),
+ sinon = require('sinon');
+
+describe.skip('Model', function() {
+ var movies,
+ users,
+ app,
+ movie1,
+ movie2,
+ movie3,
+ user1,
+ user2;
+ before(function() {
+ app = config.app;
+ movies = config.movie;
+ users = config.user;
+ movie1 = config.movies[0];
+ movie2 = config.movies[1];
+ movie3 = config.movies[2];
+ user1 = config.users[0];
+ user2 = config.users[1];
+ });
+ describe('.template(route, filters)', function() {
+ it('should work for get', function() {
+ var template = movies.template(['get'], []);
+ template.should.equal('index');
+ });
+ it('should work for getDetail', function() {
+ var template = movies.template(['get'], [{ key: '_id', value: 'ad' }]);
+ template.should.equal('show');
+ });
+ });
+ describe('format=html', function() {
+ it('should render index', function(done) {
+ request(app)
+ .get('/api/movies?format=html')
+ .expect('Content-Type', /html/)
+ .end(function(err, res) {
+ res.text.should.match(/index/);
+ res.text.should.match(new RegExp(movie1.title));
+ res.text.should.match(new RegExp(movie2.title));
+ res.text.should.match(new RegExp(movie3.title));
+ done();
+ });
+ });
+ it('should render show', function(done) {
+ request(app)
+ .get('/api/movies/' + movie1._id + '/?format=html')
+ .expect('Content-Type', /html/)
+ .end(function(err, res) {
+ res.text.should.match(/show/);
+ res.text.should.match(new RegExp(movie1.title));
+ res.text.should.not.match(new RegExp(movie2.title));
+ res.text.should.not.match(new RegExp(movie3.title));
+ done();
+ });
+
+ });
+ });
+});
diff --git a/common/src/main/webapp/usageguide/appserver/server.js b/common/src/main/webapp/usageguide/appserver/server.js
new file mode 100644
index 0000000..019b9f3
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/server.js
@@ -0,0 +1,52 @@
+/*
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*/
+
+// Dependencies
+var express = require('express');
+var bodyParser = require('body-parser');
+var http=require("http");
+var path=require('path');
+
+
+// Express
+var app = express();
+app.use(bodyParser.urlencoded({ extended: true}));
+app.use(bodyParser.json());
+app.use(function(req, res, next) {
+ res.header("Access-Control-Allow-Origin", "*");
+ res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
+ next();
+});
+//app.use(express.static(path.join(__dirname, '../' , 'browser')));
+app.use(express.static(path.join(__dirname, '../../../', 'webapp')));
+app.use(express.static(path.join(__dirname, '../' , 'browser')));
+
+// Routes
+app.use('/api', require('./api'));
+
+// viewed at http://localhost:3000
+app.get('/', function(req, res) {
+ //res.sendFile(path.join(__dirname, '../' , 'browser/index.html'));
+ //res.sendFile(__dirname + '/../browser/index.html');
+ res.sendFile(path.join(__dirname, '../' , 'browser/index.html'));
+});
+
+// Start server
+app.listen(4000);
+console.log('API is running on port 4000');
+console.log('API @@@@'); \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/start_node.bat b/common/src/main/webapp/usageguide/appserver/start_node.bat
new file mode 100644
index 0000000..d5f863a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/start_node.bat
@@ -0,0 +1,19 @@
+::
+:: Copyright 2017, Huawei Technologies Co., Ltd.
+::
+:: Licensed under the Apache License, Version 2.0 (the "License");
+:: you may not use this file except in compliance with the License.
+:: You may obtain a copy of the License at
+::
+:: http://www.apache.org/licenses/LICENSE-2.0
+::
+:: Unless required by applicable law or agreed to in writing, software
+:: distributed under the License is distributed on an "AS IS" BASIS,
+:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+:: See the License for the specific language governing permissions and
+:: limitations under the License.
+
+@ECHO OFF
+echo "Starting Node Server"
+node server.js
+exit \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/appserver/start_node.sh b/common/src/main/webapp/usageguide/appserver/start_node.sh
new file mode 100644
index 0000000..58d24bd
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/start_node.sh
@@ -0,0 +1,19 @@
+#*******************************************************************************
+# Copyright 2016 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#*******************************************************************************
+#!/bin/bash
+echo "Starting Node Server"
+node server.js
+exit \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/browser/index.html b/common/src/main/webapp/usageguide/browser/index.html
new file mode 100644
index 0000000..891ae0e
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/index.html
@@ -0,0 +1,52 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head lang="en">
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Usage Guide</title>
+ <link href="thirdparty/css/bootstrap.min.css" rel="stylesheet"/>
+ <!--Pulling Awesome Font -->
+ <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
+
+ <link href="thirdparty/css/zTreeStyle.css" rel="stylesheet"/>
+ <link href="thirdparty/css/magic-check.css" rel="stylesheet"/>
+ <link rel="stylesheet"; href="https://unpkg.com/ng-table@2.0.2/bundles/ng-table.min.css">
+ <link href="framework/css/open-ostyle.css" rel="stylesheet"/>
+
+ <script src="thirdparty/js/angular.min.js"></script>
+ <script src="thirdparty/js/angular-ui-router.min.js"></script>
+ <script src="https://unpkg.com/ng-table@2.0.2/bundles/ng-table.min.js"></script>
+ <script src="thirdparty/js/jquery_1.12.4.min.js"></script>
+ <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
+ <script type="text/javascript" src="thirdparty/js/bootstrap.min.js"></script>
+ <script src="js/app.js"></script>
+ <script src="js/rest.js"></script>
+ <script src="thirdparty/js/mustache.js"></script>
+ <script src="thirdparty/js/jquery.ztree.core-3.5.js"></script>
+
+</head>
+
+<body ng-app="POCApp" onload="loadTemplate()">
+
+<ui-view></ui-view>
+</body>
+</html> \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/browser/js/app.js b/common/src/main/webapp/usageguide/browser/js/app.js
new file mode 100644
index 0000000..75c95fe
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/js/app.js
@@ -0,0 +1,1484 @@
+/*
+
+ Copyright 2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*/
+
+
+var app = angular.module("POCApp", ["ui.router", "ngTable"])
+
+ /*.run(function($rootScope, $location, $state, LoginService) {
+ $rootScope.$on("$stateChangeStart", function(event, toState, toParams, fromState, fromParams){
+ if (toState.authenticate && !LoginService.isAuthenticated()){
+ // User isn’t authenticated
+ $state.transitionTo("login");
+ event.preventDefault();
+ }
+ });
+ })*/
+ .config(function($stateProvider, $urlRouterProvider, $urlMatcherFactoryProvider){
+ //$routeProvider.caseInsensitiveMatch = true;
+ $urlMatcherFactoryProvider.caseInsensitive(true);
+ $urlRouterProvider.otherwise('/login');
+ //$locationProvider.html5Mode(true).hashPrefix('!');
+ $stateProvider
+ .state('login', {
+ url : '/login',
+ templateUrl : 'templates/login.html',
+ controller : 'LoginController',
+ authenticate: false
+ })
+ .state('register', {
+ url : '/register',
+ templateUrl : 'templates/register.html',
+ controller : 'registerController',
+ authenticate: false
+ })
+ .state("home", {
+ url: "/home",
+ templateUrl : "templates/home.html",
+ controller : "homeCtrl",
+ authenticate: true
+ })
+ .state("home.tree", {
+ url: "/tree",
+ templateUrl : "templates/tree.html",
+ controller : "treeCtrl",
+ authenticate: true
+ })
+ .state("home.accordion", {
+ url: "/accordion",
+ templateUrl : "templates/accordion.html",
+ controller : "accordionCtrl",
+ authenticate: true
+ })
+ .state("home.tabs", {
+ url: "/tabs",
+ templateUrl : "templates/tabs.html",
+ controller : "tabsCtrl",
+ authenticate: true
+ })
+ .state("home.vtabs", {
+ url: "/vtabs",
+ templateUrl : "templates/verticalTab.html",
+ controller : "vTabCtrl",
+ authenticate: true
+ })
+ .state("home.table", {
+ url: "/table",
+ templateUrl : "templates/table.html",
+ controller : "tableCtrl",
+ authenticate: true
+ })
+ .state("home.buttons", {
+ url: "/buttons",
+ templateUrl : "templates/buttons.html",
+ controller : "buttonsCtrl",
+ authenticate: true
+ })
+ /*state for radio button and checkboxes-------------------------------------------------*/
+ .state("home.radiobuttons", {
+ url: "/radiobuttons",
+ templateUrl : "templates/radioButtons.html",
+ controller : "radioCtrl",
+ authenticate: true
+ })
+ .state("home.checkboxes", {
+ url: "/checkboxes",
+ templateUrl : "templates/checkBoxes.html",
+ controller : "checkBoxCtrl",
+ authenticate: true
+ })
+ .state("home.dropdown", {
+ url: "/dropdown",
+ templateUrl: "templates/dropdown.html",
+ controller: "dropdownCtrl",
+ authenticate: true
+ })
+
+ .state("home.list", {
+ url: "/list",
+ /*template:"<h3>Under Progress</h3>",*/
+ templateUrl : "templates/list.html",
+ controller : "listCtrl",
+ authenticate: true
+ })
+
+ .state("home.provinceMgmt", {
+ url: "/management",
+ templateUrl : "templates/management.html",
+ controller : "managementCtrl",
+ authenticate: true
+ })
+ .state("home.tooltip", {
+ url: "/textarea",
+ templateUrl : "templates/textarea.html",
+ controller : "toolCtrl",
+ authenticate: true
+ })
+
+ .state("home.notification", {
+ url: "/notification",
+ templateUrl : "templates/notification.html",
+ controller : "notificationCtrl",
+ authenticate: true
+ })
+ .state("home.functional", {
+ url: "/functional",
+ templateUrl : "templates/functional.html",
+ controller : "functionalCtrl",
+ authenticate: true
+ })
+ .state("home.labels", {
+ url: "/labels",
+ templateUrl : "templates/label.html",
+ authenticate: true
+ })
+
+
+ })
+ .controller('LoginController', function($scope, $rootScope, $stateParams, $state, LoginService) {
+ $rootScope.title = "AngularJS Login Sample";
+
+ $scope.formSubmit = function() {
+ LoginService.login($scope.user)
+ .then(function (data) {
+ if (data) {
+ $scope.error = '';
+ $scope.user.username = '';
+ $scope.user.password = '';
+ $state.transitionTo('home.tree');
+ }
+ else {
+ $scope.error = "Incorrect username/password !";
+ }
+ }, function (reason) {
+ $scope.error = "Incorrect username/password !";
+ });
+ };
+
+ })
+ .controller('registerController', function($scope, $state, LoginService){
+ $scope.formSubmit = function() {
+ if($scope.user.password === $scope.user.confpassword) {
+ LoginService.registerUser($scope.user)
+ .then(function (data) {
+ $state.transitionTo("login");
+ }, function () {
+ console.log("Failed to register");
+ });
+ }
+ else {
+ console.log("Password not matched...");
+ var dialog_tpl = $(modelTemplate).filter('#personDialog').html();
+ var data = {'title':'Error',showClose:true, 'closeBtnTxt':'Ok', 'icon':'glyphicon glyphicon-exclamation-sign','iconColor':'icon_error','msg':'Password and Confirm password does not match.', buttons:[]};
+ var html = Mustache.to_html(dialog_tpl, data);
+ $(html).modal({backdrop: "static"}); //backdrop: "static" - for grayed out and no outside click work, backdrop: false - no grayed out*/
+ }
+ };
+ })
+ .controller("homeCtrl", function($scope, $state, DataService){
+ $scope.message = "Home Page";
+
+ /*$scope.geticonClass = function() {
+ if($( "#panel1" ).hasClass( "in" )){
+ return "openo_accordion_ui-icon-expand";
+ }
+ else{
+ return "openo_accordion_ui-icon-expand.current";
+ }
+
+
+ }*/
+
+
+
+ /* $scope.accordionLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("left menu loading..");
+ menuaccordion();
+ return true;
+ }
+ console.log("left menu not loading..");
+ return false;
+ }
+
+ function menuaccordion() {
+ var accordion_tpl = $(modelTemplate).filter('#menu_accordion').html();
+
+ $.getJSON('./data/homelinks.json', function (accordion) {
+ var html = Mustache.to_html(accordion_tpl, accordion.accordion_data);
+ $('#accordionmenuid').html(html);
+ });
+ }*/
+
+ })
+
+ /* Tree Controller */
+ .controller("treeCtrl", function($scope,DataService,$log){
+ $scope.message = "Tree Data";
+ var setting = {};
+ /*$scope.treeLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("Tree data loading..");
+ tree();
+ return true;
+ }
+ console.log("Tree data not loading..");
+ return false;
+ }*/
+ $scope.init = function() {
+ $scope.param="treeData";
+ $scope.shortNote="shortNote";
+ DataService.getAllJSONData($scope.param)
+ .then(function(data){
+ $scope.treeData = data.data;
+ tree();
+ console.log("inside tree");
+ $log.info($scope.treeData);
+ });
+ DataService.getAllJSONData($scope.shortNote)
+ .then(function(data1){
+ $scope.treeTip = data1.data.treeTip;
+ console.log("inside treeTip");
+ $log.info(data1);
+ });
+ }
+ function tree() {
+ zNodes = $scope.treeData;
+ $.fn.zTree.init($("#tree1"), setting, zNodes);
+
+ }
+ })
+
+ /* Accordian Controller */
+ .controller("accordionCtrl", function($scope,DataService, $log){
+
+ $scope.message = "Accordion";
+
+ $scope.accordionLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("accordion loading..");
+
+ accordion();
+ return true;
+ }
+ console.log("accordion not loading..");
+ return false;
+ }
+
+ $scope.init = function() {
+ $scope.param="accordionData";
+ $scope.accordionTip="shortNote";
+ DataService.getAllJSONData($scope.param)
+ .then(function(data){
+ $scope.accordion = data.data;
+ accordion();
+ console.log("inside accordion");
+ $log.info(data);
+ });
+ DataService.getAllJSONData($scope.accordionTip)
+ .then(function(data){
+ $scope.accordionTipData = data.data.accordionTip;
+ console.log("inside accordion");
+ $log.info(data);
+ });
+ }
+
+ function accordion() {
+
+ var accordion_tpl = $(modelTemplate).filter('#accordion').html();
+ console.log("in acc" );
+ var html = Mustache.to_html(accordion_tpl, $scope.accordion.accordion_data);
+ $('#accordion').html(html);
+ }
+ })
+ .controller("tabsCtrl", function($scope, $state, DataService, $log){
+ $scope.message = "Tabs";
+ $scope.tabLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("Tab is loading..");
+ loadTabData();
+ return true;
+ }
+ console.log("Not ready..");
+ return false;
+ }
+
+ $scope.init = function() {
+ $scope.param="tabData";
+ $scope.tabTip="shortNote";
+ DataService.getAllJSONData($scope.param)
+ .then(function(data){
+ $scope.tabdata = data.data;
+ loadTabData();
+ console.log("inside tabs");
+ $log.info(data);
+ });
+ DataService.getAllJSONData($scope.tabTip)
+ .then(function(data){
+ $scope.tabTipData = data.data.tabTip;
+ $log.info(data);
+ });
+ }
+
+ function loadTabData() {
+ var tab_tpl = $(modelTemplate).filter('#tabs').html();
+ var html = Mustache.to_html(tab_tpl, $scope.tabdata.tabData);
+ $('#tabArea').html(html);
+ }
+
+ })
+ .controller("vTabCtrl", function($scope, $state, DataService){
+ $scope.message = "Vertical Tabs";
+
+ $scope.vtabLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("Vertical Tab is loading..");
+ loadvTabData();
+ return true;
+ }
+ console.log("Not ready..");
+ return false;
+ }
+
+ $scope.init = function() {
+ $scope.param="vtabData";
+ $scope.vtabTip="shortNote";
+ DataService.getAllJSONData($scope.param)
+ .then(function(vtabdata){
+ $scope.data = vtabdata.data;
+ loadvTabData();
+ console.log("inside vTab");
+ });
+ DataService.getAllJSONData($scope.vtabTip)
+ .then(function(vtabdata){
+ $scope.vtabTipdata = vtabdata.data.vtabTip;
+ console.log("inside vTab");
+ });
+ }
+
+ function loadvTabData() {
+
+ var vtab_tpl = $(modelTemplate).filter('#vtabs').html();
+ var html = Mustache.to_html(vtab_tpl, $scope.data.vtabData);
+ $('#vtabArea').html(html);
+ }
+ })
+ .controller("tableCtrl", function($scope, $state, DataService, NgTableParams){
+ $scope.message = "Tables";
+
+ $scope.tableLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("Table is loading..");
+ loadTableData();
+ return true;
+ }
+ console.log("Not ready..");
+ return false;
+ }
+
+ $scope.init = function() {
+ $scope.param="tableData";
+ $scope.tableTip="shortNote";
+ DataService.getAllJSONData($scope.param)
+ .then(function(data){
+ $scope.tableData = data.data;
+ loadTableData();
+ console.log("inside table");
+ });
+
+ DataService.getAllJSONData($scope.tableTip)
+ .then(function(data){
+ $scope.tableTipData = data.data.tableTip;
+ console.log("inside table");
+ });
+ }
+
+ function loadTableData() {
+
+ var table_tpl = $(modelTemplate).filter('#table').html();
+
+ var html = Mustache.to_html(table_tpl, $scope.tableData.basic_table_data);
+ $('#basictableArea').html(html);
+
+ var html = Mustache.to_html(table_tpl, $scope.tableData.str_table_data);
+ $('#strippedtableArea').html(html);
+ /* $scope.tableParams = new NgTableParams({count: 5, sorting: {FirstName: 'asc'} //{page: 1,count: 10,filter: {name: 'M'},sorting: {name: 'desc'}
+ }, { counts:[5, 10, 20, 50], dataset: $scope.tableData.str_table_data});*/
+
+
+ /*var html = Mustache.to_html(table_tpl, $scope.tableData.cond_table_data);
+ $('#condensedtableArea').html(html);*/
+ $scope.tableParams = new NgTableParams({
+ count: 5, sorting: {language: 'asc'} //{page: 1,count: 10,filter: {name: 'M'},sorting: {name: 'desc'}
+ }, {counts: [5, 10, 20, 50], dataset: $scope.tableData.cond_table_data});
+ }
+ }
+ )
+
+ /* Buttons Controller */
+ .controller("buttonsCtrl", function($scope,DataService,$log){
+ $scope.message = "Types of Buttons";
+ $scope.buttonTip="shortNote";
+
+ $scope.init = function() {
+ $scope.param="buttonsData";
+ DataService.getAllJSONData($scope.param)
+ .then(function(data){
+ $scope.buttons = data.data;
+ defaultButtons();
+ visualButtons();
+ sizeButtons();
+ iconButtons();
+ console.log("inside accordion");
+ $log.info(data);
+ });
+ DataService.getAllJSONData($scope.buttonTip)
+ .then(function(data){
+ $scope.buttonTipData = data.data.buttonTip;
+ console.log("inside table");
+ });
+ }
+
+ function defaultButtons(){
+ console.log("Default buttons Loaded..");
+ //Here your view content is fully loaded !!
+ var def_button_tpl = $(modelTemplate).filter('#defaultButtons').html();
+ var def_icon_button_tpl = $(modelTemplate).filter('#defaultIconButtons').html();
+
+ var html = Mustache.to_html(def_button_tpl, $scope.buttons.default_btn_data.def_button);
+ $('#defaultButtonArea').html(html);
+
+ var html = Mustache.to_html(def_icon_button_tpl, $scope.buttons.default_btn_data.def_print_button);
+ $('#defaultButtonArea').append(html);
+
+ var html = Mustache.to_html(def_icon_button_tpl, $scope.buttons.default_btn_data.def_print_button_right);
+ $('#defaultButtonArea').append(html);
+ }
+
+
+ function visualButtons(){
+ console.log("Loaded..");
+ //Here your view content is fully loaded !!
+ var visual_button_tpl = $(modelTemplate).filter('#visualButtons').html();
+
+ var html = Mustache.to_html(visual_button_tpl, $scope.buttons.visual_btn_data.vis_pri_btn_data);
+ $('#visualButtonArea').html(html);
+
+ var html = Mustache.to_html(visual_button_tpl, $scope.buttons.visual_btn_data.vis_sec_btn_data);
+ $('#visualButtonArea').append(html);
+
+ var html = Mustache.to_html(visual_button_tpl, $scope.buttons.visual_btn_data.vis_succ_btn_data);
+ $('#visualButtonArea').append(html);
+
+ var html = Mustache.to_html(visual_button_tpl, $scope.buttons.visual_btn_data.vis_inf_btn_data);
+ $('#visualButtonArea').append(html);
+
+ var html = Mustache.to_html(visual_button_tpl, $scope.buttons.visual_btn_data.vis_warn_btn_data);
+ $('#visualButtonArea').append(html);
+
+ var html = Mustache.to_html(visual_button_tpl, $scope.buttons.visual_btn_data.vis_dang_btn_data);
+ $('#visualButtonArea').append(html);
+
+ var html = Mustache.to_html(visual_button_tpl, $scope.buttons.visual_btn_data.vis_link_btn_data);
+ $('#visualButtonArea').append(html);
+ }
+
+ function sizeButtons() {
+ var size_button_tpl = $(modelTemplate).filter('#sizeButtons').html();
+
+ var html = Mustache.to_html(size_button_tpl, $scope.buttons.diffSize_btn_data.size_small_btn_data);
+ $('#sizeButtonArea').html(html);
+
+ var html = Mustache.to_html(size_button_tpl, $scope.buttons.diffSize_btn_data.size_large_btn_data);
+ $('#sizeButtonArea').append(html);
+
+ var html = Mustache.to_html(size_button_tpl, $scope.buttons.diffSize_btn_data.size_block_btn_data);
+ $('#sizeButtonArea').append(html);
+
+ }
+
+ function iconButtons() {
+ var icon_button_tpl = $(modelTemplate).filter('#iconButtons').html();
+
+ var html = Mustache.to_html(icon_button_tpl, $scope.buttons.icon_btn_data.search_icon_btn_data);
+ $('#iconButtonArea').html(html);
+
+ var html = Mustache.to_html(icon_button_tpl, $scope.buttons.icon_btn_data.search_icon_styled_btn_data);
+ $('#iconButtonArea').append(html);
+
+ var html = Mustache.to_html(icon_button_tpl, $scope.buttons.icon_btn_data.print_icon_btn_data);
+ $('#iconButtonArea').append(html);
+
+ }
+
+ $scope.defaultButtonsLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("default buttons loading..");
+ defaultButtons();
+ return true;
+ }
+ console.log("default buttons not loading..");
+ return false;
+ }
+
+ $scope.visualButtonsLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("visual buttons loading..");
+ visualButtons();
+ return true;
+ }
+ console.log("visual buttons not loading..");
+ return false;
+ }
+
+ $scope.sizeButtonsLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("size buttons loading..");
+ sizeButtons();
+ return true;
+ }
+ console.log("size buttons not loading..");
+ return false;
+ }
+
+ $scope.iconButtonsLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("icon buttons loading..");
+ iconButtons();
+ return true;
+ }
+ console.log("icon buttons not loading..");
+ return false;
+ }
+ })
+ /* Drop down----------------------*/
+ .controller("dropdownCtrl", function($scope, DataService) {
+ $scope.message = "You selected drop down";
+ $scope.subIsLoaded = function () {
+ if (modelTemplate != null) {
+ console.log("Loading..");
+ loadDrop();
+ return true;
+ }
+ console.log("Not Loaded..");
+ return false;
+ }
+
+ $scope.init = function() {
+ $scope.param="dropdownData";
+ $scope.dropdownTip="shortNote";
+ DataService.getAllJSONData($scope.param)
+ .then(function(data){
+ $scope.dropdown = data.data;
+ loadDrop();
+ });
+ DataService.getAllJSONData($scope.dropdownTip)
+ .then(function(data){
+ $scope.dropdownTipData = data.data.dropdownTip;
+ console.log("inside table");
+ });
+ }
+ function loadDrop() {
+ var drop_tpl = $(modelTemplate).filter('#dropDown').html();
+ var dropHeader_tpl = $(modelTemplate).filter('#dropDownHeader').html();
+ var dropSimple_tpl = $(modelTemplate).filter('#simpleDropdownTmpl').html();
+
+ var html = Mustache.to_html(drop_tpl, $scope.dropdown.dropped_down_data);
+ $('#dropArea').html(html);
+
+ var html = Mustache.to_html(drop_tpl, $scope.dropdown.dropped_up_data);
+ $('#dropAreaUP').html(html);
+
+ var html = Mustache.to_html(dropHeader_tpl, $scope.dropdown.dropHeader_data);
+ $('#dropAreaHeader').html(html);
+
+ var html = Mustache.to_html(dropSimple_tpl, $scope.dropdown.dropSimple_data);
+ $('#plainDropDown').html(html);
+
+ }
+ })
+ .controller("radioCtrl", function($scope, DataService, $log) {
+ $scope.message = "You selected radio button tab";
+ var lodedOnce = false;
+ $scope.subIsLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("Loading..");
+ loadRadioBtn();
+ return true;
+ }
+ console.log("Not Loaded..");
+ return false;
+ }
+
+ $scope.init = function() {
+ $scope.param="radioData";
+ $scope.radioTip="shortNote";
+ DataService.getAllJSONData($scope.param)
+ .then(function(data){
+ $scope.radioButton = data.data;
+ loadRadioBtn();
+ console.log("inside button");
+ $log.info(data);
+ });
+
+ DataService.getAllJSONData($scope.radioTip)
+ .then(function(data){
+ $scope.radioTipData = data.data.radioTip;
+ console.log("inside table");
+ });
+ }
+ function loadRadioBtn(){
+ console.log("lodedOnce : "+lodedOnce);
+
+ var radio_button_tpl = $(modelTemplate).filter('#radioButtons').html();
+ var html = Mustache.to_html(radio_button_tpl, $scope.radioButton .radio_btn_default_data);
+ $('#radioBtnArea').html(html);
+
+ var html = Mustache.to_html(radio_button_tpl, $scope.radioButton .radio_btn_primary_data);
+ $('#radioBtnArea').append(html);
+
+ var html = Mustache.to_html(radio_button_tpl, $scope.radioButton .radio_btn_success_data);
+ $('#radioBtnArea').append(html);
+
+ var html = Mustache.to_html(radio_button_tpl, $scope.radioButton .radio_btn_danger_data);
+ $('#radioBtnArea').append(html);
+
+ var html = Mustache.to_html(radio_button_tpl, $scope.radioButton .radio_btn_Warn_data);
+ $('#radioBtnArea').append(html);
+
+ var html = Mustache.to_html(radio_button_tpl, $scope.radioButton .radio_btn_info_data);
+ $('#radioBtnArea').append(html);
+
+ }
+ })
+ .controller("checkBoxCtrl", function($scope, DataService) {
+ $scope.message = "You selected checkbox tab";
+ $scope.subIsLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("Loading..");
+ loadCheckBox();
+ return true;
+ }
+ console.log("Not Loaded..");
+ return false;
+ }
+ $scope.init = function() {
+ $scope.param="checkboxData";
+ $scope.checkboxTip="shortNote";
+ DataService.getAllJSONData($scope.param)
+ .then(function(data){
+ $scope.checkBox = data.data;
+ loadCheckBox();
+ });
+ DataService.getAllJSONData($scope.checkboxTip)
+ .then(function(data){
+ $scope.checkboxTipData = data.data.checkboxTip;
+ console.log("inside table");
+ });
+ }
+ function loadCheckBox() {
+ var check_box_tpl = $(modelTemplate).filter('#checkBoxes').html();
+
+ var html = Mustache.to_html(check_box_tpl, $scope.checkBox.checkbox_default_data);
+ $('#CheckBoxArea').html(html);
+
+ var html = Mustache.to_html(check_box_tpl, $scope.checkBox.checkbox_primary_data);
+ $('#CheckBoxArea').append(html);
+
+ var html = Mustache.to_html(check_box_tpl, $scope.checkBox.checkbox_success_data);
+ $('#CheckBoxArea').append(html);
+
+ var html = Mustache.to_html(check_box_tpl, $scope.checkBox.checkbox_danger_data);
+ $('#CheckBoxArea').append(html);
+
+ var html = Mustache.to_html(check_box_tpl, $scope.checkBox.checkbox_warn_data);
+ $('#CheckBoxArea').append(html);
+
+ var html = Mustache.to_html(check_box_tpl, $scope.checkBox.checkbox_info_data);
+ $('#CheckBoxArea').append(html);
+
+ /*$.getJSON('./data/checkboxData.json', function(c_data) {
+ var html = Mustache.to_html(check_box_tpl, c_data.checkbox_default_data);
+ $('#CheckBoxArea').html(html);
+
+ var html = Mustache.to_html(check_box_tpl, c_data.checkbox_primary_data);
+ $('#CheckBoxArea').append(html);
+
+ var html = Mustache.to_html(check_box_tpl, c_data.checkbox_success_data);
+ $('#CheckBoxArea').append(html);
+
+ var html = Mustache.to_html(check_box_tpl, c_data.checkbox_danger_data);
+ $('#CheckBoxArea').append(html);
+
+ var html = Mustache.to_html(check_box_tpl, c_data.checkbox_warn_data);
+ $('#CheckBoxArea').append(html);
+
+ var html = Mustache.to_html(check_box_tpl, c_data.checkbox_info_data);
+ $('#CheckBoxArea').append(html);
+ });*/
+ }
+ })
+
+ /* Reference Code -- Remove after use */
+ .controller("coursesCtrl", function($scope, DataService){
+ $scope.message = "Courses Offered";
+ $scope.courses = ["Java", "C/C++", "JavaScript", "AngularJS", "NodeJS", "HTML", "Python", "Action Script"];
+ $scope.showDialog = function() {
+ /*var dialog_tpl = $(modelTemplate).filter('#personDialog').html();
+ var data = {'title':'Shahid Noor','showClose':true,'closeBtnTxt':'Cancel','icon':'glyphicon glyphicon-off','iconColor':'icon_warn','msg':'Good! There is a message that can be used to show on the screen. There is a message that can be used to show on the screen', buttons:[{"text": "Ok", 'action':'callThis()'},{"text": "Show"}]};
+ var html = Mustache.to_html(dialog_tpl, data);
+ $(html).modal({backdrop: "static"}); //backdrop: "static" - for grayed out and no outside click work, backdrop: false - no grayed out*/
+
+ var def_button_tpl = $(modelTemplate).filter('#visualButtons').html();
+ var def_btn_data = {'title':"asas", 'type':'primary'};
+ var html = Mustache.to_html(def_button_tpl, def_btn_data);
+ $('#sampleArea').html(html);
+ };
+
+ // $scope.$on('$viewContentLoaded', function(){
+ function loaded(){
+ console.log("Loaded..");
+ //Here your view content is fully loaded !!
+ var def_button_tpl = $(modelTemplate).filter('#dropDown').html();
+ var def_btn_data = {'title':'Shahid Noor','position':'down', items:[{"itemLabel": "Ok"},{"itemLabel": "Show"}]};
+ var html = Mustache.to_html(def_button_tpl, def_btn_data);
+ $('#sampleArea').html(html);
+
+ }
+ $scope.subIsLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("Loading..");
+ loaded();
+ return true;
+ }
+ console.log("Not Loaded..");
+ return false;
+ }
+ })
+
+ .controller("toolCtrl", function($scope, DataService, $compile, $log){
+ $scope.toolTip = "shortNote";
+ $scope.toolTipContent = "textArea";
+
+ DataService.getAllJSONData($scope.toolTipContent)
+ .then(function(data){
+ $log.info(data.data.Note.placement);
+ $scope.noteContent = data.data.Note.message;
+ $scope.notePlacement = data.data.Note.placement;
+ $scope.textareaContent = data.data;
+ console.log($scope.noteContent + " " + $scope.notePlacement);
+ loadTextArea();
+ });
+ DataService.getAllJSONData($scope.toolTip)
+ .then(function(data){
+ $scope.toolTipData = data.data.toolTip;
+ //loadTextArea();
+ });
+
+ //$('[data-toggle="popover"]').popover();
+
+
+
+ function loadTextArea() {
+ var text = $(modelTemplate).filter('#textfield').html();
+ var email = $(modelTemplate).filter('#email').html();
+ var url = $(modelTemplate).filter('#url').html();
+ var password = $(modelTemplate).filter('#password').html();
+ var numeric = $(modelTemplate).filter('#numeric').html();
+ var dot = $(modelTemplate).filter('#dot').html();
+ var dateinput = $(modelTemplate).filter('#dateinput').html();
+ var monthinput = $(modelTemplate).filter('#monthinput').html();
+ var weekinput = $(modelTemplate).filter('#weekinput').html();
+ var timeinput = $(modelTemplate).filter('#timeinput').html();
+ var ipv4 = $(modelTemplate).filter('#ipv4').html();
+ var ipv6 = $(modelTemplate).filter('#ipv6').html();
+ var textarea = $(modelTemplate).filter('#textarea').html();
+
+ var note = $(modelTemplate).filter('#note').html();
+
+ var html = Mustache.to_html(text, $scope.textareaContent.Textbox);
+ $('#fname').html($compile(html)($scope));
+
+ var html = Mustache.to_html(email, $scope.textareaContent.Email);
+ $('#email').html($compile(html)($scope));
+
+ var html = Mustache.to_html(url, $scope.textareaContent.Url);
+ $('#url').html($compile(html)($scope));
+
+ var html = Mustache.to_html(password, $scope.textareaContent.Password);
+ $('#password').html($compile(html)($scope));
+
+
+ var html = Mustache.to_html(numeric, $scope.textareaContent.Number);
+ $('#numeric').html($compile(html)($scope));
+
+
+ var html = Mustache.to_html(dot, $scope.textareaContent.Datetime);
+ $('#dot').html($compile(html)($scope));
+
+ var html = Mustache.to_html(dateinput, $scope.textareaContent.Date);
+ $('#dateinput').html($compile(html)($scope));
+
+ var html = Mustache.to_html(monthinput, $scope.textareaContent.Month);
+ $('#monthinput').html($compile(html)($scope));
+
+ var html = Mustache.to_html(weekinput, $scope.textareaContent.Week);
+ $('#weekinput').html($compile(html)($scope));
+
+ var html = Mustache.to_html(timeinput, $scope.textareaContent.Time);
+ $('#timeinput').html($compile(html)($scope));
+
+
+ var html = Mustache.to_html(ipv4, $scope.textareaContent.Ipv4);
+ $('#ipv4').html($compile(html)($scope));
+
+ var html = Mustache.to_html(ipv6, $scope.textareaContent.Ipv6);
+ $('#ipv6').html($compile(html)($scope));
+
+ var html = Mustache.to_html(textarea, $scope.textareaContent.TextArea);
+ $('#textarea').html($compile(html)($scope));
+
+
+
+ var html = Mustache.to_html(note, {"placement":$scope.notePlacement});
+ $('#note').html(html);
+ $("#noteanchor").popover({
+ template: '<div class="popover fade bottom in customPopover"><div class="arrow"></div>'+$scope.noteContent+'</div>'
+ });
+
+ $scope.validatetextbox = function (value){
+ if($scope.textbox) {
+ $scope.textboxErr = false;
+ }
+ else
+ $scope.textboxErr = true;
+
+ }
+ $scope.validateemail = function (value){
+ if($scope.email) {
+ $scope.emailErr = false;
+ }
+ else
+ $scope.emailErr = true;
+
+ }
+ $scope.validateurl = function (value){
+ if($scope.url) {
+ $scope.urlErr = false;
+ }
+ else
+ $scope.urlErr = true;
+
+ }
+ $scope.validatepassword = function (value){
+ if($scope.password) {
+ $scope.passwordErr = false;
+ }
+ else
+ $scope.passwordErr = true;
+
+ }
+ $scope.validatenumeric = function (value){
+ if($scope.number) {
+ $scope.numericErr = false;
+ }
+ else
+ $scope.numericErr = true;
+
+ }
+ $scope.validatedot = function (value){
+ if($scope.datetime) {
+ $scope.dotErr = false;
+ }
+ else
+ $scope.dotErr = true;
+
+ }
+ $scope.validatedateinput = function (value){
+ if($scope.date) {
+ $scope.dateinputErr = false;
+ }
+ else
+ $scope.dateinputErr = true;
+
+ }
+ $scope.validatemonthinput = function (value){
+ if($scope.month) {
+ $scope.monthinputErr = false;
+ }
+ else
+ $scope.monthinputErr = true;
+
+ }
+ $scope.validateweek = function (value){
+ if($scope.week) {
+ $scope.weekinputErr = false;
+ }
+ else
+ $scope.weekinputErr = true;
+
+ }
+ $scope.validatetime = function (value){
+ if($scope.time) {
+ $scope.timeinputErr = false;
+ }
+ else
+ $scope.timeinputErr = true;
+
+ }
+ $scope.validateipv4 = function (value){
+ if($scope.ipv4) {
+ $scope.ipv4Err = false;
+ }
+ else
+ $scope.ipv4Err = true;
+
+ }
+ $scope.validateipv6 = function (value){
+ if($scope.ipv6) {
+ $scope.ipv6Err = false;
+ }
+ else
+ $scope.ipv6Err = true;
+
+ }
+
+ $scope.validatetextarea = function (value){
+ if($scope.textarea) {
+ $scope.textareaErr = false;
+ }
+ else
+ $scope.textareaErr = true;
+
+ }
+
+
+
+ }
+
+
+ })
+
+ .controller("notificationCtrl", function($scope, DataService){
+ $scope.message = "Notification and Messages";
+ $scope.notificationTip = "shortNote";
+
+ var dialog_tpl;
+ $scope.templateLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("Loading..");
+
+ return true;
+ }
+ console.log("Not Loaded..");
+ return false;
+ }
+ $scope.init = function() {
+ $scope.param="notificationData";
+ $scope.notificationTip="shortNote";
+ DataService.getAllJSONData($scope.param)
+ .then(function(data){
+ $scope.notification = data.data;
+ });
+ DataService.getAllJSONData($scope.notificationTip)
+ .then(function(data){
+ $scope.notificationTipData = data.data.notificationTip;
+ });
+ }
+
+ $scope.showError = function() {
+ dialog_tpl = $(modelTemplate).filter('#personDialog').html();
+ var html = Mustache.to_html(dialog_tpl, $scope.notification.err_data);
+ $(html).modal({backdrop: "static"});//backdrop: "static" - for grayed out and no outside click work, backdrop: false - no grayed out*!
+ }
+
+ $scope.showWarning = function() {
+ dialog_tpl = $(modelTemplate).filter('#personDialog').html();
+ var html = Mustache.to_html(dialog_tpl, $scope.notification.warn_data);
+ $(html).modal();
+ }
+
+ $scope.showInfo = function() {
+ dialog_tpl = $(modelTemplate).filter('#personDialog').html();
+ var html = Mustache.to_html(dialog_tpl, $scope.notification.info_data);
+ $(html).modal();
+ }
+ $scope.showConfirm = function() {
+ dialog_tpl = $(modelTemplate).filter('#personDialog').html();
+ var html = Mustache.to_html(dialog_tpl, $scope.notification.confirm_data);
+ $(html).modal({backdrop: "static"}); //backdrop: "static" - for grayed out and no outside click work, backdrop: false - no grayed out*!/
+ }
+
+ })
+
+ .controller("functionalCtrl", function($scope, DataService, $compile){
+ $scope.message = "Functional Flow";
+
+ var dialog_tpl;
+ $scope.templateLoaded = function() {
+ if(modelTemplate != null) {
+ console.log("Loading..");
+
+ return true;
+ }
+ console.log("Not Loaded..");
+ return false;
+ }
+
+ $scope.init = function() {
+ $scope.param="functionalData";
+ $scope.functionalTip="shortNote";
+ DataService.getAllJSONData($scope.param)
+ .then(function(data){
+ $scope.functional = data.data;
+ addButtons();
+ });
+ DataService.getAllJSONData($scope.functionalTip)
+ .then(function(data){
+ $scope.functionalTipData = data.data.functionalTip;
+ });
+ }
+ function addButtons() {
+ var def_button_tpl = $(modelTemplate).filter('#defaultButtons').html();
+ var def_iconbutton_tpl = $(modelTemplate).filter('#defaultIconButtons').html();
+ var add_data = {"title":"Create", "type":"btn btn-default", "gType": "plus-icon", "iconPosition":"left", "clickAction":"showCreate()"};
+ var edit_data={"title":"Modify", "type":"btn btn-default", "gType": "edit-icon", "iconPosition":"left", "clickAction":"showModify()"};
+ var delete_data = {"title":"Delete", "type":"btn btn-default", "gType": "delete-icon", "iconPosition":"left", "clickAction":"showDelete()"};
+ var workflow_data = {"title":"WorkFlow", "type":"btn btn-default", "clickAction":"showWorkflow()"};
+ var addhtml = Mustache.to_html(def_iconbutton_tpl, add_data);
+ var edithtml = Mustache.to_html(def_iconbutton_tpl, edit_data);
+ var deletehtml = Mustache.to_html(def_iconbutton_tpl, delete_data);
+ var workflowhtml = Mustache.to_html(def_button_tpl, workflow_data);
+ $('#functionalArea #buttonArea').html($compile(addhtml)($scope));
+ $('#functionalArea #buttonArea').append($compile(edithtml)($scope));
+ $('#functionalArea #buttonArea').append($compile(deletehtml)($scope));
+ $('#functionalArea #buttonArea').append($compile(workflowhtml)($scope));
+ }
+
+ $scope.showCreate = function() {
+ dialog_tpl = $(modelTemplate).filter('#functionalDialog').html();
+ var html = Mustache.to_html(dialog_tpl, $scope.functional.create_data);
+ $(html).modal();
+ }
+ $scope.showModify = function() {
+ dialog_tpl = $(modelTemplate).filter('#functionalDialog').html();
+ var html = Mustache.to_html(dialog_tpl, $scope.functional.modify_data);
+ $(html).modal();
+ }
+ $scope.showDelete = function() {
+ dialog_tpl = $(modelTemplate).filter('#functionalDialog').html();
+ var html = Mustache.to_html(dialog_tpl, $scope.functional.delete_data);
+ $(html).modal();
+ }
+ $scope.showWorkflow = function() {
+ dialog_tpl = $(modelTemplate).filter('#functionalDialog').html();
+ var html = Mustache.to_html(dialog_tpl, $scope.functional.workflow_data);
+ $(html).modal();
+ }
+ })
+
+ .controller("listCtrl", function($scope, $log, DataService){
+ $scope.message = "List Page";
+ $scope.listTip = "shortNote";
+ $scope.init = function() {
+ console.log("Shahid... ng-init");
+ $scope.param="list";
+ DataService.getAllJSONData($scope.param)
+ .then(function(data){
+ $scope.mainlistItem = data.data;
+ }, function(reason){
+ $scope.portfolios = [];
+
+ });
+
+ DataService.getAllJSONData($scope.listTip)
+ .then(function(data){
+ $scope.listTipData = data.data.listTip;
+ });
+ }
+ $scope.loadSubMenuPage = function(index) {
+ $log.info($scope.mainlistItem);
+ $scope.subMenuListItem = $scope.mainlistItem[index].subMenu;
+ $scope.subsubMenuListItem = [];
+ }
+ $scope.loadSubSubMenuPage = function(index) {
+ $log.info($scope.subMenuListItem);
+ console.log("index: "+index);
+ $scope.subsubMenuListItem = $scope.subMenuListItem[index].subsubMenu;
+ }
+ })
+
+ .controller("managementCtrl", function($scope, $log, DataService, $state, $compile, NgTableParams){
+ $scope.message = "Management";
+ $scope.provinceTip = "shortNote";
+ /*$scope.provinceData = [
+ {id:1, province_name:'First', ip:'192.168.1.45', port:'8080'},
+ {id:2, province_name:'Second', ip:'192.168.1.5', port:'8081'},
+ {id:3, province_name:'Third', ip:'192.168.1.15', port:'8082'},
+ {id:4, province_name:'Fourth', ip:'192.168.1.28', port:'8083'},
+ {id:5, province_name:'Fifth', ip:'192.168.1.19', port:'8084'}
+ ];*/
+
+ $scope.init = function() {
+ //console.log("Shahid... ng-init");
+ DataService.getAllProvinceData()
+ .then(function(data){
+ $scope.provinceData = data.provinceData;
+ console.log("Data: ");
+ loadButtons();
+ $log.info(data.provinceData);
+ }, function(reason){
+ $scope.message = "Error is :" + JSON.stringify(reason);
+ });
+
+ DataService.getAllJSONData($scope.provinceTip)
+ .then(function(data){
+ $scope.provinceTipData = data.data.provinceTip;
+ });
+ }
+
+ /*DataService.getAllProvinceData()
+ .then(function(data){
+ $scope.provinceData = data.provinceData;
+ console.log("Data: ");
+ $log.info(data.provinceData);
+ }, function(reason){
+ $scope.message = "Error is :" + JSON.stringify(reason);
+ });*/
+ /*DataService.getAllData($scope.provinceTip)
+ .then(function(data){
+ $scope.provinceTipData = data.provinceTip;
+ });*/
+
+ function loadButtons() {
+ /*console.log("modelTemplate in ProvinceMgmt is :"+modelTemplate);
+ var def_button_tpl = $(modelTemplate).filter('#defaultButtons').html();
+ var dialog = $(modelTemplate).filter('#dialog').html();
+ var add_data = {"title":"Add", "clickAction":"showAddModal()"};
+ var delete_data = {"title":"Delete Selected", "clickAction":"deleteData()"};
+ var addhtml = Mustache.to_html(def_button_tpl, add_data);
+ var deletehtml = Mustache.to_html(def_button_tpl, delete_data);
+ $('#provinceAction').html($compile(addhtml)($scope));
+ $('#provinceAction').append($compile(deletehtml)($scope));*/
+ console.log("modelTemplate in ProvinceMgmt is :"+modelTemplate);
+ var def_button_tpl = $(modelTemplate).filter('#defaultButtons').html();
+ var def_iconbutton_tpl = $(modelTemplate).filter('#defaultIconButtons').html();
+ var dialog = $(modelTemplate).filter('#dialog').html();
+ /*var add_data = {"title":"Add", "clickAction":"showAddModal()"};*/
+ var add_data = {"title":"Create", "type":"btn btn-default", "gType": "plus-icon", "iconPosition":"left", "clickAction":"showAddModal()"};
+ /*var delete_data = {"title":"Delete Selected", "clickAction":"deleteData()"};*/
+ var delete_data = {"title":"Delete Selected", "type":"btn btn-default", "gType": "delete-icon", "iconPosition":"left", "clickAction":"deleteData()"};
+ var addhtml = Mustache.to_html(def_iconbutton_tpl, add_data);
+ var deletehtml = Mustache.to_html(def_iconbutton_tpl, delete_data);
+ $('#provinceAction').html($compile(addhtml)($scope));
+
+ //$('#provinceAction #iconBtn').append('<img src="thirdparty/images/add.png" height="15" hspace="5" vertical-align="left"/>');
+
+ $('#provinceAction').append($compile(deletehtml)($scope));
+ //$('#provinceAction #iconBtn').append('<img src="thirdparty/images/delete.png" height="15" hspace="5" vertical-align="left"/>');
+ $('#managementDialog').html($compile(dialog)($scope));
+
+ $scope.checkboxes = { 'checked': false, items: {} };
+
+ //var data = [{id: 1, name: "Moroni", age: 50}, {id: 2, name: "ABC", age: 30}, {id: 3, name: "Morhoni", age: 10}, {id: 4, name: "DABC", age: 31}, {id: 5, name: "Noor", age: 30}, {id: 6, name: "ABCD", age: 40}, {id: 7, name: "DABC", age: 31}, {id: 8, name: "Noor", age: 30}, {id: 9, name: "ABCD", age: 40}, {id: 10, name: "DABC", age: 31}, {id: 11, name: "Noor", age: 30}, {id: 12, name: "ABCD", age: 40}];
+ $scope.tableParams = new NgTableParams({count: 5, sorting: {province_name: 'asc'} //{page: 1,count: 10,filter: {name: 'M'},sorting: {name: 'desc'}
+ }, { counts:[5, 10, 20, 50], dataset: $scope.provinceData});
+
+ $scope.$watch('checkboxes.checked', function(value) {
+ angular.forEach($scope.provinceData, function(item) {
+ if (angular.isDefined(item.id)) {
+ $scope.checkboxes.items[item.id] = value;
+ }
+ });
+ });
+
+ var text = $(modelTemplate).filter('#textfield').html();
+ var ipv4 = $(modelTemplate).filter('#ipv4').html();
+ var number = $(modelTemplate).filter('#numeric').html();
+
+ $('#managementDialog .modalHeader').html('<h5 class="modal-title titlestyle">Modal Header</h5>');
+ $('#managementDialog .modalBodyContent').html('<div class="form-group row"> <label class="col-xs-4 col-form-label labelstyle">Name</label> <div class="col-xs-8 provinceName" > </div> </div>');
+ $('#managementDialog .modalBodyContent').append('<div class="form-group row"> <label class="col-xs-4 col-form-label labelstyle">IP Address</label> <div class="col-xs-8 ipAddress" > </div> </div>');
+ $('#managementDialog .modalBodyContent').append(' <div class="form-group row"> <label for="port" class="col-xs-4 col-form-label labelstyle">Port</label> <div class="col-xs-8 port" > </div> </div>');
+
+
+
+
+ var dataText = {"ErrMsg" : {"errmsg" : "Please input Name.", "modalVar":"province.province_name", "placeholder":"Name", "errtag":"ptextboxErr", "errfunc":"validatetextbox"}};
+ $('#managementDialog .provinceName').html($compile(Mustache.to_html(text, dataText.ErrMsg))($scope));
+
+
+
+ var dataIP = {"ErrMsg" : {"errmsg" : "Please input IP Address.", "modalVar":"province.ip", "placeholder":"IP Address", "errtag":"pipv4Err", "errfunc":"validateipv4"}};
+ $('#managementDialog .ipAddress').html($compile(Mustache.to_html(ipv4, dataIP.ErrMsg))($scope));
+
+ var dataNum = {"ErrMsg" : {"errmsg" : "Please input port.", "modalVar":"province.port", "placeholder":"Port", "errtag":"pnumericErr", "errfunc":"validatenumeric"}};
+ $('#managementDialog .port').html($compile(Mustache.to_html(number, dataNum.ErrMsg))($scope));
+
+ var modelSubmit_data = {"title":"OK", "clickAction":"saveData(province.id)"};
+ var modelSubmit_html = Mustache.to_html(def_button_tpl, modelSubmit_data);
+ $('#managementDialog #footerBtns').html($compile(modelSubmit_html)($scope));
+
+ var modelDelete_data = {"title":"Cancel", "clickAction":"closeModal()"};
+ var modelDelete_html = Mustache.to_html(def_button_tpl, modelDelete_data);
+ $('#managementDialog #footerBtns').append($compile(modelDelete_html)($scope));
+ }
+
+ $scope.validatetextbox = function (value){
+ if($scope.province.province_name) {
+ $scope.ptextboxErr = false;
+ }
+ else
+ $scope.ptextboxErr = true;
+ }
+
+
+
+ $scope.validateipv4 = function (value){
+ if($scope.province.ip) {
+ $scope.pipv4Err = false;
+ }
+ else
+ $scope.pipv4Err = true;
+ }
+ $scope.validatenumeric = function (value){
+ if($scope.province.port) {
+ $scope.pnumericErr = false;
+ }
+ else
+ $scope.pnumericErr = true;
+ }
+
+ $scope.closeModal = function() {
+ console.log("Closing Modal...");
+ $('#uniModal').modal('hide');
+ }
+
+
+ $scope.checkAll = function() {
+ console.log("Checked ..");
+ angular.forEach($scope.provinceData, function(data) {
+ //data.select = $scope.selectAll;
+ $scope.checkboxes.items[user.id]
+ });
+ };
+
+ $scope.showAddModal = function() {
+ console.log("Showing Modal to Add data");
+ $scope.province = {};
+ $scope.textboxErr = false;
+ $scope.ipv4Err = false;
+ $scope.numericErr = false;
+ //$("#myModal").modal();
+ $("#uniModal").modal({}).draggable();
+ }
+ $scope.saveData = function(id) {
+ if(id) {
+ //edit data
+ console.log("Editing data.." + JSON.stringify($scope.province));
+ DataService.editProvinceData($scope.province)
+ .then(function (data) {
+ $scope.message = "Success :-)";
+ $state.reload();
+ //$state.go($state.current.name, {}, {reload: true})
+ },
+ function (reason) {
+ //$log.info(reason);
+ $scope.message = reason.status + " " + reason.statusText;
+ });
+ }
+ else {
+ console.log("Adding data.." + JSON.stringify($scope.province));
+ DataService.addProvinceData($scope.province)
+ .then(function (data) {
+ $scope.message = "Success :-)";
+ $state.reload();
+ //$state.go($state.current.name, {}, {reload: true})
+ },
+ function (reason) {
+ //$log.info(reason);
+ $scope.message = reason.status + " " + reason.statusText;
+ });
+ }
+ $('#uniModal').modal('hide');
+ }
+
+ /*$scope.deleteData = function() {
+ var deleteArr = [];
+ //$log.info($scope.checkboxes);
+ angular.forEach($scope.checkboxes.items, function(value , key) {
+ //$log.info(data);
+ if(value) {
+ deleteArr.push(key);
+ }
+ });
+
+ console.log("To be deleted : "+deleteArr);
+ //$log.info(deleteArr);
+ DataService.deleteProvinceData(deleteArr)
+ .then(function(data){
+ $scope.message = "Successfully deleted :-)";
+ $state.reload();
+ },
+ function(reason){
+ //$log.info(reason);
+ $scope.message = reason.status + " " + reason.statusText;
+ });
+ }*/
+
+ $scope.deleteIndividualData = function(id) {
+ var deleteArr = [];
+ //$log.info($scope.checkboxes);
+ deleteArr.push(id);
+
+ console.log("To be deleted : "+deleteArr);
+ //$log.info(deleteArr);
+
+
+ DataService.deleteProvinceData(deleteArr)
+ .then(function(data){
+ $scope.message = "Successfully deleted :-)";
+ $state.reload();
+ },
+ function(reason){
+ //$log.info(reason);
+ $scope.message = reason.status + " " + reason.statusText;
+ });
+ }
+ $scope.deleteData = function(id) {
+ var confirmation=false;
+ var dialog_tpl = $(modelTemplate).filter('#personDialog').html();
+ var error = {"err_data" : { "title": "Error",
+ "showClose": "true",
+ "closeBtnTxt": "Cancel",
+ "icon": "glyphicon glyphicon-exclamation-sign",
+ "iconColor": "icon_error",
+ "msg": "Do you really wanted to Delete?.",
+ "buttons": [
+ {
+ "text": "OK", "action": "deleteConfirmation("+id+")"
+ }]
+ }};
+ var html = Mustache.to_html(dialog_tpl, error.err_data);
+ $($compile(html)($scope)).modal({backdrop: "static"});
+ }
+
+ $scope.deleteConfirmation = function(id) {
+ console.log("data in province data is :");
+ $log.info($scope.provinceData);
+ var deleteArr = [];
+ if (typeof id !== "undefined"){
+
+ deleteArr.push(id);
+ }else{
+ angular.forEach($scope.checkboxes.items, function (value, key) {
+ if (value) {
+ console.log("deleting name is :" + key);
+ deleteArr.push(key);
+ }
+ });
+
+ }
+
+ console.log("To be deleted : " + deleteArr);
+ DataService.deleteProvinceData(deleteArr)
+ .then(function (data) {
+ $scope.message = "Successfully deleted :-)";
+ $state.reload();
+ },
+ function (reason) {
+ $scope.message = reason.status + " " + reason.statusText;
+ });
+ }
+
+ $scope.editData = function(id) {
+ $scope.textboxErr = false;
+ $scope.ipv4Err = false;
+ $scope.numericErr = false;
+ console.log("To be edited : " + id);
+ var dataFound = false;
+ angular.forEach($scope.provinceData, function(data) {
+ if(!dataFound) {
+ if (data.id == id) {
+ console.log("Found : " + data.id);
+ $scope.province = data;
+ /*$scope.province.province_name = data.province_name;
+ $scope.province.ip = data.ip;
+ $scope.province.port = data.port;*/
+
+ $("#uniModal").modal();
+ dataFound = true;
+ }
+ }
+ });
+ }
+
+ })
+
+/*var modelTemplate;
+function loadTemplate() {
+ $.get('template.html', function(template) {
+ modelTemplate = template;
+ });
+}*/
+
+var modelTemplate = "";
+function loadTemplate() {
+ $.get('/framework/template.html', function (template) {
+ modelTemplate += template;
+ });
+ $.get('/framework/templateContainer.html', function (template) {
+ modelTemplate += template;
+ });
+ $.get('/framework/templateWidget.html', function (template) {
+ //console.log("Template is : "+template);
+ modelTemplate += template;
+ });
+ $.get('/framework/templateNotification.html', function (template) {
+ modelTemplate += template;
+ });
+ $.get('/framework/templateFunctional.html', function (template) {
+ modelTemplate += template;
+ });
+}
+
+function callThis() {
+ alert("Going Great!");
+}
+
+function searchTable() {
+ var filter, table, tr, td;
+ filter = $("#myInput").val().toUpperCase();
+ table = $("#myTable_search");
+ tr = $("#myTable_search tr");
+
+ // Loop through all table rows, and hide those who don't match the search query
+ for (var i = 0; i < tr.length; i++) {
+ td = tr[i].getElementsByTagName("td")[0];
+ if (td) {
+ if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
+ tr[i].style.display = "";
+ } else {
+ tr[i].style.display = "none";
+ }
+ }
+ }
+}
+
+function linkClicked(state) {
+ console.log("State to : " + state);
+} \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/browser/js/rest.js b/common/src/main/webapp/usageguide/browser/js/rest.js
new file mode 100644
index 0000000..a963792
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/js/rest.js
@@ -0,0 +1,150 @@
+/*
+
+ Copyright 2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*/
+
+
+
+app.factory("DataService", function($http, $log){
+ return {
+ /*getAllData: function (value) {
+ //var value = $scope.param;
+ return $http({
+ url: 'http://localhost:8080/POC_NodeToServletPorting_Server/?widgetType=' + value,
+ headers: {'Content-Type': 'application/json'},
+ method: 'GET'
+ }).then(function (response) {
+ $log.info(response.data);
+ return response.data;
+ })
+ },*/
+ getAllJSONData : function(wdgtType) {
+ return $http({
+ url: 'http://localhost:4000/api/getAllJSONData',
+ method: 'POST',
+ data: {"wdgtType":wdgtType},
+ headers: {'Content-Type': 'application/json '}
+ }).then(function(response){
+ console.log("Response : ");
+ $log.info(response.data);
+ return response.data;
+ });
+ },
+ getAllProvinceData : function() {
+ return $http({
+ url: 'http://localhost:4000/api/getAllProvinceData',
+ method: 'GET',
+ headers: {'Content-Type': 'application/json'}
+ }).then(function(response){
+ //$log.info(response);
+ return response.data;
+ });
+ },
+ addProvinceData : function(provinceDetail) {
+ return $http({
+ url: 'http://localhost:4000/api/addProvinceData',
+ method: 'POST',
+ data: provinceDetail,
+ headers: {'Content-Type': 'application/json '}
+ }).then(function(response){
+ console.log("Response : ");
+ $log.info(response.data);
+ return response.data;
+ });
+ },
+ deleteProvinceData : function(idList) {
+ return $http({
+ url: 'http://localhost:4000/api/deleteProvinceData',
+ method: 'POST',
+ data: {'idList':idList},
+ headers: {'Content-Type': 'application/json'}
+ }).then(function(response){
+ console.log("Successfully Deleted..");
+ $log.info(response);
+ return response.data;
+ });
+ },
+ editProvinceData : function(provinceDetail) {
+ return $http({
+ url: 'http://localhost:4000/api/editProvinceData',
+ method: 'POST',
+ data: provinceDetail,
+ headers: {'Content-Type': 'application/json'}
+ }).then(function(response){
+ console.log("Successfully Edited...");
+ $log.info(response);
+ return response.data;
+ });
+ }
+ }
+});
+
+app.factory('LoginService', function($http, $log) {
+ var admin = 'admin';
+ var pass = 'pass';
+ var isAuthenticated = false;
+
+ return {
+ login : function(user) {
+ console.log(user);
+ return $http({
+ url: 'http://localhost:8081/api/signin',//http://192.168.4.161:3000/api/login
+ method: 'POST',
+ data: {'name':user.username, 'pswd':user.password},
+ headers: {'Content-Type': 'application/json'}
+ }).then(function(response){
+ $log.info(response);
+ if(response.status == 200) {
+ console.log("Success");
+ //Success
+ isAuthenticated = true;
+ }
+ else {
+ console.log("Fail");
+ isAuthenticated = false;
+ }
+ console.log("isAuthenticated: " + isAuthenticated);
+ return isAuthenticated;
+ }, function(reason){
+ $log.info(reason);
+ console.log("Fail");
+ isAuthenticated = false;
+ return reason;
+ });
+ /*isAuthenticated = user.username === admin && user.password === pass;
+ return isAuthenticated;*/
+ },
+ isAuthenticated : function() {
+ return isAuthenticated;
+ },
+ registerUser: function(user){
+ console.log("New Registration: " + JSON.stringify(user));
+ return $http({
+ url: 'http://localhost:8081/api/signup',//http://192.168.4.161:3000/api/login
+ method: 'POST',
+ data: {'name':user.username, 'pswd':user.password, 'email':user.email},
+ headers: {'Content-Type': 'application/json'}
+ }).then(function(response){
+ $log.info(response);
+ },function(reason){
+ $log.info(reason);
+ });
+
+
+ }
+ };
+
+}); \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/browser/templates/accordion.html b/common/src/main/webapp/usageguide/browser/templates/accordion.html
new file mode 100644
index 0000000..e081c0f
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/templates/accordion.html
@@ -0,0 +1,46 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<div id="accordionArea" class="container col-sm-12 col-md-12 col-lg-12" ng-init="init()"><!--ng-if="accordionLoaded()"-->
+ <h4>Accordion</h4>
+ <div class="panel-group" id="accordion"></div>
+ <div class="shortnote">
+ <div class="shortnoteHeader">Usage</div>
+ <div class="shortnoteText">Create a div tag in html file with specific id for example accordionArea and write a specific function in javascript file to perform your business logic. An sample example as shown below:</div>
+ <br>
+ <div>HTML file:</div>
+ <pre><code>&ltdiv id="accordionArea" ng-init="init()"&gt&lt/div&gt</code></pre>
+ <br>
+ <div>Javascript file:</div>
+ <pre><code>
+ var data ={"accordion_data": {"items": [{"tabId": "tab1","header": "Tab1","isActive": true,
+ "msg": "This is in Collapsible Group 1 and this attribute makes sure that all collapsible elements under the specified parent will be closed when one of the collapsible item is shown."};
+
+ $scope.init = function() {
+ accordion();
+ }
+
+ function accordion() {
+ var accordion_tpl = $(modelTemplate).filter('#accordion').html();
+ var html = Mustache.to_html(accordion_tpl, data.accordion_data);
+ $('#accordion').html(html);
+ }</code></pre>
+
+ </div>
+ </div>
+</div>
diff --git a/common/src/main/webapp/usageguide/browser/templates/buttons.html b/common/src/main/webapp/usageguide/browser/templates/buttons.html
new file mode 100644
index 0000000..6261d5a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/templates/buttons.html
@@ -0,0 +1,130 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<h4>Types of Buttons</h4>
+
+<div id="buttonArea" ng-init="init()">
+ <h3> Default Buttons</h3>
+ <div id="defaultButtonArea"></div>
+ <h3>Visual Buttons</h3>
+ <div id="visualButtonArea"></div>
+ <h3>Different Sized Buttons</h3>
+ <div id="sizeButtonArea"></div>
+ <h3>Icon Buttons</h3>
+ <div id="iconButtonArea"></div>
+
+</div>
+<div class="shortnote">
+ <div class="shortnoteHeader">Usage</div>
+ <div class="shortnoteText">Create a div tag in html file with specific id for example defaultButtonArea,visualButtonArea, sizeButtonArea,iconButtonArea and write a specific function in javascript file to perform your business logic. An sample example as shown below:</div>
+ <br>
+ <div>HTML file:</div>
+ <pre><code>&ltdiv id="buttonArea" ng-init="init()"&gt&lt/div&gt</code></pre>
+ <pre><code>&ltdiv id="defaultButtonArea" &gt&lt/div&gt</code></pre>
+ <pre><code>&ltdiv id="visualButtonArea" &gt&lt/div&gt</code></pre>
+ <pre><code>&ltdiv id="sizeButtonArea" &gt&lt/div&gt</code></pre>
+ <pre><code>&ltdiv id="iconButtonArea" &gt&lt/div&gt</code></pre>
+ <br>
+ <div>Javascript file:</div>
+ <pre><code>
+ var data ={"default_btn_data" : {"def_button" : {"title":"Default"},"def_print_button" : {"title":"Print", "type":"btn btn-default", "gType": "glyphicon-print", "iconPosition":"left"},"def_print_button_right" : {"title":"Search", "type":"btn btn-default", "gType": "glyphicon-search", "iconPosition":"right"}},"visual_btn_data" : { "vis_pri_btn_data" : {"title":"Primary", "type":"primary"},"vis_sec_btn_data" : {"title":"Secondary", "type":"secondary"},"vis_succ_btn_data" : {"title":"Success", "type":"success"},"vis_inf_btn_data" : {"title":"Info", "type":"info"},"vis_warn_btn_data" : {"title":"Warning", "type":"warning"},"vis_dang_btn_data" : {"title":"Danger", "type":"danger"},"vis_link_btn_data" : {"title":"Link", "type":"link"}},"diffSize_btn_data" : {"size_small_btn_data" : {"title": "Small Button", "type": "primary", "size": "btn-sm"},"size_large_btn_data" : {"title": "Large Button", "type": "primary", "size": "btn-lg"},"size_block_btn_data" : {"title": "Large Block Button", "type": "primary", "size": "btn-lg btn-block"}},"icon_btn_data" : {"search_icon_btn_data" : {"title": "Search Icon", "type": "btn-default", "gType": "glyphicon-search"},"search_icon_styled_btn_data" : {"title": "Styled Search Icon", "type": "primary", "gType": "glyphicon-search"},"print_icon_btn_data" : {"title": "Print", "type": "primary btn-lg", "gType": "glyphicon-print"}}};
+
+ $scope.init = function() {
+ defaultButtons();
+ visualButtons();
+ sizeButtons();
+ iconButtons();
+ }
+
+ function defaultButtons(){
+ var def_button_tpl = $(modelTemplate).filter('#defaultButtons').html();
+ var def_icon_button_tpl = $(modelTemplate).filter('#defaultIconButtons').html();
+
+ var html = Mustache.to_html(def_button_tpl, data.default_btn_data.def_button);
+ $('#defaultButtonArea').html(html);
+
+ var html = Mustache.to_html(def_icon_button_tpl, data.default_btn_data.def_print_button);
+ $('#defaultButtonArea').append(html);
+
+ var html = Mustache.to_html(def_icon_button_tpl, data.default_btn_data.def_print_button_right);
+ $('#defaultButtonArea').append(html);
+ }
+
+
+ function visualButtons(){
+
+ var visual_button_tpl = $(modelTemplate).filter('#visualButtons').html();
+
+ var html = Mustache.to_html(visual_button_tpl, data.visual_btn_data.vis_pri_btn_data);
+ $('#visualButtonArea').html(html);
+
+ var html = Mustache.to_html(visual_button_tpl, data.visual_btn_data.vis_sec_btn_data);
+ $('#visualButtonArea').append(html);
+
+ var html = Mustache.to_html(visual_button_tpl, data.visual_btn_data.vis_succ_btn_data);
+ $('#visualButtonArea').append(html);
+
+ var html = Mustache.to_html(visual_button_tpl, data.visual_btn_data.vis_inf_btn_data);
+ $('#visualButtonArea').append(html);
+
+ var html = Mustache.to_html(visual_button_tpl, data.visual_btn_data.vis_warn_btn_data);
+ $('#visualButtonArea').append(html);
+
+ var html = Mustache.to_html(visual_button_tpl, data.visual_btn_data.vis_dang_btn_data);
+ $('#visualButtonArea').append(html);
+
+ var html = Mustache.to_html(visual_button_tpl, data.visual_btn_data.vis_link_btn_data);
+ $('#visualButtonArea').append(html);
+ }
+
+ function sizeButtons() {
+ var size_button_tpl = $(modelTemplate).filter('#sizeButtons').html();
+
+ var html = Mustache.to_html(size_button_tpl, data.diffSize_btn_data.size_small_btn_data);
+ $('#sizeButtonArea').html(html);
+
+ var html = Mustache.to_html(size_button_tpl, data.diffSize_btn_data.size_large_btn_data);
+ $('#sizeButtonArea').append(html);
+
+ var html = Mustache.to_html(size_button_tpl, data.diffSize_btn_data.size_block_btn_data);
+ $('#sizeButtonArea').append(html);
+
+ }
+
+ function iconButtons() {
+ var icon_button_tpl = $(modelTemplate).filter('#iconButtons').html();
+
+ var html = Mustache.to_html(icon_button_tpl, data.icon_btn_data.search_icon_btn_data);
+ $('#iconButtonArea').html(html);
+
+ var html = Mustache.to_html(icon_button_tpl, data.icon_btn_data.search_icon_styled_btn_data);
+ $('#iconButtonArea').append(html);
+
+ var html = Mustache.to_html(icon_button_tpl, data.icon_btn_data.print_icon_btn_data);
+ $('#iconButtonArea').append(html);
+
+ }</code></pre>
+
+
+
+
+ </div>
+</div>
+
+
+
diff --git a/common/src/main/webapp/usageguide/browser/templates/checkBoxes.html b/common/src/main/webapp/usageguide/browser/templates/checkBoxes.html
new file mode 100644
index 0000000..aab3bfe
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/templates/checkBoxes.html
@@ -0,0 +1,60 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<h4>Checkboxes</h4>
+
+<div id="CheckBoxArea" class="funkyradio" ng-init="init()"></div>
+<div class="shortnote">
+ <div class="shortnoteHeader">Usage</div>
+ <div class="shortnoteText">Create a div tag in html file with specific id for example CheckBoxArea and write a specific function in javascript file to perform your business logic. An sample example as shown below:</div>
+ <br>
+ <div>HTML file:</div>
+ <pre><code>&ltdiv id="CheckBoxArea" ng-init="init()"&gt&lt/div&gt</code></pre>
+ <br>
+ <div>Javascript file:</div>
+ <pre><code>
+ var data ={"checkbox_default_data" : {"id":1, "label":"Default check box", "type":"default", "checked":true},"checkbox_primary_data" : {"id":2, "label":"Primary check box", "type":"primary", "checked":false},"checkbox_success_data" : {"id":3, "label":"Success check box", "type":"success", "checked":true},"checkbox_danger_data" : {"id":4, "label":"Error check box", "type":"danger", "checked":true},"checkbox_warn_data" : {"id":5, "label":"Warn check box", "type":"warning", "checked":false},"checkbox_info_data" : {"id":6, "label":"Info check box", "type":"info", "checked":true}};
+
+ $scope.init = function() {
+ loadCheckBox();
+ }
+
+ function loadCheckBox() {
+ var check_box_tpl = $(modelTemplate).filter('#checkBoxes').html();
+
+ var html = Mustache.to_html(check_box_tpl, data.checkbox_default_data);
+ $('#CheckBoxArea').html(html);
+
+ var html = Mustache.to_html(check_box_tpl, data.checkbox_primary_data);
+ $('#CheckBoxArea').append(html);
+
+ var html = Mustache.to_html(check_box_tpl, data.checkbox_success_data);
+ $('#CheckBoxArea').append(html);
+
+ var html = Mustache.to_html(check_box_tpl, data.checkbox_danger_data);
+ $('#CheckBoxArea').append(html);
+
+ var html = Mustache.to_html(check_box_tpl, data.checkbox_warn_data);
+ $('#CheckBoxArea').append(html);
+
+ var html = Mustache.to_html(check_box_tpl, data.checkbox_info_data);
+ $('#CheckBoxArea').append(html);
+ }</code></pre>
+
+</div>
+</div>
diff --git a/common/src/main/webapp/usageguide/browser/templates/courses.html b/common/src/main/webapp/usageguide/browser/templates/courses.html
new file mode 100644
index 0000000..34dde6c
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/templates/courses.html
@@ -0,0 +1,32 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+
+<h1>{{message}}</h1>
+<ul ng-repeat="course in courses | orderBy : course : false">
+ <li>{{course}}</li>
+</ul>
+<button ng-click="showDialog()">Test</button>
+
+<!--<a ui-sref=".list">List</a>
+<a ui-sref=".details">Paragraph</a>
+
+<div ui-view></div>-->
+
+
+<div id="sampleArea" ng-if="subIsLoaded()"></div>
diff --git a/common/src/main/webapp/usageguide/browser/templates/dropdown.html b/common/src/main/webapp/usageguide/browser/templates/dropdown.html
new file mode 100644
index 0000000..cb97477
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/templates/dropdown.html
@@ -0,0 +1,83 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+
+<div class="container col-sm-12 col-md-12 col-lg-12">
+ <h4>Drop Down</h4>
+
+ <div id="dropdown" class="container col-sm-12 col-md-12 col-lg-12" ng-init="init()">
+ <h3>Simple Dropdown</h3>
+ <div id="plainDropDown"></div>
+ <h3>Dropdown</h3>
+ <div id="dropArea" type="button"></div>
+ <h3>Dropup</h3>
+ <div id="dropAreaUP" type="button"></div>
+ <h3>Dropdown Header</h3>
+ <div id="dropAreaHeader" type="button"></div>
+
+ </div>
+ <div class="col-sm-12 col-md-12 col-lg-12 shortnote">
+ <div class="shortnoteHeader">Usage</div>
+ <div class="shortnoteText">Create a div tag in html file with specific id for example plainDropDown,dropArea,dropAreaUP,dropAreaHeader and write a specific function in javascript file to perform your business logic. An sample example as shown below:</div>
+ <br>
+ <div>HTML file:</div>
+ <pre><code>&ltdiv id="dropdown" ng-init="init()"&gt&lt/div&gt</code></pre>
+ <pre><code>&ltdiv id="plainDropDown" &gt&lt/div&gt</code></pre>
+ <pre><code>&ltdiv id="dropArea" &gt&lt/div&gt</code></pre>
+ <pre><code>&ltdiv id="dropAreaUP" &gt&lt/div&gt</code></pre>
+ <pre><code>&ltdiv id="dropAreaHeader" &gt&lt/div&gt</code></pre>
+
+
+ <br>
+ <div>Javascript file:</div>
+ <pre><code>
+ var data ={"dropped_down_data" :{"title":"DropDown","position":"down", "items":[{"itemLabel": "Node JS"},{"itemLabel": "JS"}]},"dropped_up_data" :{"title":"DropUp","position":"up", "items":[{"itemLabel": "PHP"},{"itemLabel": "ASP"}]},"dropHeader_data" :{"title":"DropHeader","position":"down","items":[{"itemLabel": "Web UI", "isheader":true},{"itemLabel": "HTML", "isheader":false},{"itemLabel": "CSS", "isheader":false},{"itemLabel": "JS", "isheader":false},{"itemLabel": "Programming", "isheader":true},{"itemLabel": "C", "isheader":false},{"itemLabel": "C++", "isheader":false}]},"dropSimple_data" : {"title":"--PleaseSelect--","items":[{"itemLabel": "Cameras"},{"itemLabel": "Mobile Phones"},{"itemLabel": "Computers"},{"itemLabel": "Monitors"},{"itemLabel": "Tablets"},{"itemLabel": "Others"}]}};
+
+ $scope.init = function() {
+ loadDrop();
+ }
+
+ function loadDrop() {
+ var drop_tpl = $(modelTemplate).filter('#dropDown').html();
+ var dropHeader_tpl = $(modelTemplate).filter('#dropDownHeader').html();
+ var dropSimple_tpl = $(modelTemplate).filter('#simpleDropdownTmpl').html();
+
+ var html = Mustache.to_html(drop_tpl, data.dropped_down_data);
+ $('#dropArea').html(html);
+
+ var html = Mustache.to_html(drop_tpl, data.dropped_up_data);
+ $('#dropAreaUP').html(html);
+
+ var html = Mustache.to_html(dropHeader_tpl, data.dropHeader_data);
+ $('#dropAreaHeader').html(html);
+
+ var html = Mustache.to_html(dropSimple_tpl, data.dropSimple_data);
+ $('#plainDropDown').html(html);
+
+ }</code></pre>
+
+
+
+
+ </div>
+ </div>
+</div>
+
+
+
+
diff --git a/common/src/main/webapp/usageguide/browser/templates/functional.html b/common/src/main/webapp/usageguide/browser/templates/functional.html
new file mode 100644
index 0000000..126deed
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/templates/functional.html
@@ -0,0 +1,48 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<h4>{{message}}</h4>
+
+<div id="functionalArea" ng-init="init()">
+ <!--<button type="button" class="btn btn-default" ng-click="showCreate()">Create</button>
+ <button type="button" class="btn btn-default" ng-click="showModify()">Modify</button>
+ <button type="button" class="btn btn-default" ng-click="showDelete()">Delete</button>
+ <button type="button" class="btn btn-default" ng-click="showWorkflow()">Workflow</button>-->
+ <div id="buttonArea"></div>
+ <div class="shortnote">
+ <div class="shortnoteHeader">Usage</div>
+ <div class="shortnoteText">Create a button in html file and write a specific function in javascript file to perform your business logic. An sample example as shown below:</div>
+ <br>
+ <div>HTML file:</div>
+ <pre><code>&ltbutton type="button" class="btn btn-default" ng-click="showCreate()"&gtCreate&lt/button&gt</code></pre>
+ <br>
+ <div>Javascript file:</div>
+ <pre><code>
+ var data={"create_data" : {"title":"Create", "labels":[{"text": "Username", "input_id":"username", "type":"text"},{"text": "Password", "input_id":"username", "type":"password"}], "showClose":"true","closeBtnTxt":"Cancel","msg":"This is Create dialog box", "buttons":[{"text": "Ok"}]}};
+
+ $scope.showCreate = function() {
+ dialog_tpl = $(modelTemplate).filter('#functionalDialog').html();
+ var html = Mustache.to_html(dialog_tpl, data.create_data);
+ $(html).modal();
+ } </code></pre>
+
+
+ </div>
+</div>
+
+
diff --git a/common/src/main/webapp/usageguide/browser/templates/home.html b/common/src/main/webapp/usageguide/browser/templates/home.html
new file mode 100644
index 0000000..1f65dfa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/templates/home.html
@@ -0,0 +1,159 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<div class="homecontent center" ng-init="loadTemplate()">
+ <div class="container">
+ <div class="row">
+ <div class="col-sm-4 col-md-3 col-lg-3 rmpadding">
+ <div id="menu_accordion" class="openoAccordian_accordionmenu">
+ <div id="container" class="panel panel-default panelbr">
+ <h5 class="panel-title">
+ <a data-toggle="collapse" data-target="#panel1"><span>Container</span></a>
+ </h5>
+ <div id="panel1" class="panel-collapse collapse in">
+ <ul>
+ <li>
+ <a ui-sref=".tree" ui-sref-active="link_active">Tree</a>
+ </li>
+ <li>
+ <a ui-sref=".accordion" ui-sref-active="link_active">Accordion</a>
+ </li>
+ <li>
+ <a ui-sref=".tabs" ui-sref-active="link_active">Tabs</a>
+ </li>
+ <li>
+ <a ui-sref=".vtabs" ui-sref-active="link_active">Vertical Tab</a>
+ </li>
+ <li>
+ <a ui-sref=".table" ui-sref-active="link_active">Table</a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="widgets" class="panel panel-default panelbr">
+ <h5 class="panel-title">
+ <a data-toggle="collapse" data-target="#panel2"><span>Widgets</span></a>
+ </h5>
+ <div id="panel2" class="panel-collapse collapse in">
+ <li>
+ <a ui-sref=".buttons" ui-sref-active="link_active">Buttons</a>
+ </li>
+ <li>
+ <a ui-sref=".dropdown" ui-sref-active="link_active">Drop Down</a>
+ </li>
+ <li>
+ <a ui-sref=".radiobuttons" ui-sref-active="link_active">Radio Button</a>
+ </li>
+ <li>
+ <a ui-sref=".checkboxes" ui-sref-active="link_active">Check Box</a>
+ </li>
+ <li>
+ <a ui-sref=".tooltip" ui-sref-active="link_active">Text Fields</a>
+ </li>
+ <li>
+ <a ui-sref=".list" ui-sref-active="link_active">List</a>
+ </li>
+ <li>
+ <a ui-sref=".provinceMgmt" ui-sref-active="link_active">Management</a>
+ </li>
+ </div>
+ </div>
+ <div id="notifications" class="panel panel-default panelbr">
+ <h5 class="panel-title">
+ <a data-toggle="collapse" data-target="#panel3"><span>Notifications</span></a>
+ </h5>
+ <div id="panel3" class="panel-collapse collapse in">
+ <li>
+ <a ui-sref=".notification" ui-sref-active="link_active">Notification & Messages</a>
+ </li>
+ <li>
+ <a ui-sref=".labels" ui-sref-active="link_active">Labels</a>
+ </li>
+ </div>
+ </div>
+ <div id="functional" class="panel panel-default panelbr">
+ <h5 class="panel-title">
+ <a ui-sref=".functional" ui-sref-active="noChild_link_active">Functional Flow</a>
+
+ </h5>
+ </div>
+ </div>
+ <!--<div id="accordionmenuid" allow-resize="true" dataset="dataArr" height="resHeight"
+ listeners="callBacklisteners" resize-callback="resizehandler"
+ current-select="currentselect" click="clickHandler"
+ class="ng-isolate-scope accordion_parent openo_accordion_main_menu">
+ <div class="openo-accordion-resizable-handle" style="cursor: auto;"></div>
+ <ul id="accordionmenuid_ul" class="openoAccordian_accordionmenu">
+ <li id="accordionmenuid_ul_0_0_brAppTopMenuID" nodeid="brAppTopMenuID">
+ &lt;!&ndash;<span class="openo_accordion_ui-icon-expand" style="padding-left: 20px;cursor: pointer;"></span>&ndash;&gt;
+ <span class="openoAccordian_showHideArrow_hide" id="accordionmenuid_arrow" style="cursor: pointer;"></span>
+ <a title="brApp" class="header opened" style="padding-left: 10px; cursor: pointer;">Container</a>
+ <ul>
+ <li nodeid="brAppSiteMenuID" class="" style="display: list-item;">
+ <a ui-sref=".tree" ui-sref-active="link_active" class="" style="padding-left: 62px;">Tree</a>
+ </li>
+ <li nodeid="brAppMeMenuID" style="display: list-item;">
+ <a ui-sref=".accordion" ui-sref-active="link_active" style="padding-left: 62px;">Accordian</a>
+ </li>
+ <li nodeid="brAppTpMenuID" style="display: list-item;">
+ <a ui-sref=".tabs" ui-sref-active="link_active" style="padding-left: 62px;">Tabs</a>
+ </li>
+ <li nodeid="brAppTlMenuID" style="display: list-item;">
+ <a ui-sref=".vtabs" ui-sref-active="link_active" style="padding-left: 62px;">Vertical Tab</a>
+ </li>
+ <li nodeid="brAppTlMenuID" style="display: list-item;">
+ <a ui-sref=".table" ui-sref-active="link_active" style="padding-left: 62px;">Table</a>
+ </li>
+ </ul>
+ <a title="brApp" class="header opened" style="padding-left: 10px; cursor: pointer;">Widgets</a>
+ <ul>
+ <li nodeid="brAppSiteMenuID" class="" style="display: list-item;">
+ <a ui-sref=".buttons" ui-sref-active="link_active" style="padding-left: 62px;">Buttons</a>
+ </li>
+ <li nodeid="brAppMeMenuID" style="display: list-item;">
+ <a ui-sref=".dropdown" ui-sref-active="link_active" style="padding-left: 62px;">Drop Down</a>
+ </li>
+ <li nodeid="brAppTpMenuID" style="display: list-item;">
+ <a ui-sref=".radiobuttons" ui-sref-active="link_active" style="padding-left: 62px;">Radio Button</a>
+ </li>
+ <li nodeid="brAppTlMenuID" style="display: list-item;">
+ <a ui-sref=".checkboxes" ui-sref-active="link_active" style="padding-left: 62px;">Check Box</a>
+ </li>
+ <li nodeid="brAppTlMenuID" style="display: list-item;">
+ <a ui-sref=".tooltip" ui-sref-active="link_active" style="padding-left: 62px;">Tool Tip</a>
+ </li>
+ <li nodeid="brAppTlMenuID" style="display: list-item;">
+ <a ui-sref=".list" ui-sref-active="link_active" style="padding-left: 62px;">List</a>
+ </li>
+ </li>
+
+ </ul>
+ <a ui-sref=".notification" ui-sref-active="link_active" class="header opened" style="padding-left: 10px; cursor: pointer;">Notification & Messages</a>
+ <a ui-sref=".functional" ui-sref-active="link_active" class="header opened" style="padding-left: 10px; cursor: pointer;">Functional Flow</a>
+
+ </li>
+ </ul>
+ </div>-->
+ </div>
+ <div id="rightContainer" class="col-sm-8 col-md-9 col-lg-9">
+ <!--<div id="sampleArea"></div>-->
+ <ui-view></ui-view>
+ </div>
+ </div>
+ </div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/browser/templates/label.html b/common/src/main/webapp/usageguide/browser/templates/label.html
new file mode 100644
index 0000000..4128212
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/templates/label.html
@@ -0,0 +1,94 @@
+
+
+<!--<h4>Header</h4>-->
+<div id="headerArea" class="header" ><!--ng-init="init()"-->
+ <!--<label class="titlestyle">Note</label>-->
+ <span class="labelHeader">OPEN-O</span>
+</div>
+
+<div class="titlestyle">
+ Info: This Header is using labelHeader as CSS
+</div>
+<br>
+<div>Use <b>labelHeader</b> class of open-ostye.css for all the message information</div>
+<br>
+<pre><code>&ltspan class="labelHeader"&gtOPEN-O&lt/span&gt</code></pre>
+
+<br>
+<br>
+
+<div class="header" ><!--ng-init="init()"-->
+ <span class="labelTitle">OPEN-O</span>
+</div>
+
+<div class="titlestyle">
+ Info: This Title is using labelTitle as CSS
+</div>
+<br>
+<div>Use <b>labelTitle</b> class of open-ostye.css for all the message information</div>
+<br>
+<pre><code>&ltspan class="labelTitle"&gtOPEN-O&lt/span&gt</code></pre>
+<br>
+<br>
+
+<!--<h5>Message</h5>-->
+<div id="messageArea" ><!--ng-init="init()"-->
+ <span class="message">OPEN-O</span>
+</div>
+<div class="titlestyle">
+ Info: This Message is using titlestyle as CSS
+</div>
+<br>
+<div>Use <b>message</b> class of open-ostye.css for all the message information</div>
+<br>
+<pre><code>&ltspan class="message"&gtOPEN-O&lt/span&gt</code></pre>
+<br>
+<br>
+
+<!--<h5>Lables</h5>-->
+<div id="labelArea" ><!--ng-init="init()"-->
+ <span class="labelstyle">OPEN-O</span>
+</div>
+<div class="titlestyle">
+ Info: This label is using labelstyle as CSS
+</div>
+<br>
+<div>Use <b>labelstyle</b> class of open-ostye.css for all the message information</div>
+<br>
+<pre><code>&ltspan class="labelstyle"&gtOPEN-O&lt/span&gt</code></pre>
+<br>
+<br>
+
+<!--<h5>Note</h5>-->
+<div id="noteArea" ><!--ng-init="init()"-->
+ <span class="shortnoteText">OPEN-O</span>
+</div>
+<div class="titlestyle">
+ Info: This Note is using shortnoteText as CSS
+</div>
+<br>
+<div>Use <b>shortnoteText</b> class of open-ostye.css for all the message information</div>
+<br>
+<pre><code>&ltspan class="shortnoteText"&gtOPEN-O&lt/span&gt</code></pre>
+<br>
+<br>
+
+<!--
+<h2>Notes</h2>
+<div class="danger">
+ <p><strong>Danger!</strong> Some text...</p>
+</div>
+
+<div class="success">
+ <p><strong>Success!</strong> Some text...</p>
+</div>
+
+<div class="info">
+ <p><strong>Info!</strong> Some text...</p>
+</div>
+
+<div class="warning">
+ <p><strong>Warning!</strong> Some text...</p>
+</div>
+-->
+
diff --git a/common/src/main/webapp/usageguide/browser/templates/list.html b/common/src/main/webapp/usageguide/browser/templates/list.html
new file mode 100644
index 0000000..6b4fb8a
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/templates/list.html
@@ -0,0 +1,93 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<div class="container col-sm-12 col-md-12 col-lg-12">
+ <h4>{{message}}</h4>
+
+ <div id="listArea" class="container col-sm-12 col-md-12 col-lg-12" ng-init="init()">
+ <div id="list1" class="list col-sm-4 col-md-4 col-lg-4">
+ <div ng-repeat="item in mainlistItem">
+ <button type="button" class="btn btn-primary btn-block" ng-click="loadSubMenuPage($index)">{{item.title}}</button>
+ </div>
+ </div>
+ <div id="list2" class="list col-sm-4 col-md-4 col-lg-4">
+ <div ng-repeat="subitem in subMenuListItem">
+ <button type="button" class="btn btn-primary btn-block" ng-click="loadSubSubMenuPage($index)">{{subitem.title}}</button>
+ </div>
+ </div>
+ <div id="list3" class="list col-sm-4 col-md-4 col-lg-4">
+ <div ng-repeat="subsubitem in subsubMenuListItem">
+ <button type="button" class="btn btn-primary btn-block">{{subsubitem.title}}</button>
+ </div>
+ </div>
+
+ </div>
+
+ <!-- <test method='parentClick()'></test>-->
+ <div class="col-sm-12 col-md-12 col-lg-12 shortnote">
+ <div class="shortnoteHeader">Usage</div>
+ <div class="shortnoteText">Create a div tag in html file with specific id for example listArea and write a specific function in javascript file to perform your business logic. An sample example as shown below:</div>
+ <br>
+ <div>HTML file:</div>
+ <pre><code> &ltdiv id="listArea" ng-init="init()"&gt
+ &ltdiv id="list1"&gt
+ &ltdiv ng-repeat="item in mainlistItem"&gt
+ &ltbutton type="button" class="btn btn-primary btn-block" ng-click="loadSubMenuPage($index)"&gt&#123 &#123item.title&#125 &#125&lt/button&gt
+ &lt/div&gt
+ &lt/div&gt
+ &ltdiv id="list2"&gt
+ &ltdiv ng-repeat="subitem in subMenuListItem"&gt
+ &ltbutton type="button" class="btn btn-primary btn-block" ng-click="loadSubSubMenuPage($index)"&gt&#123 &#123subitem.title&#125 &#125&lt/button&gt
+ &lt/div&gt
+ &lt/div&gt
+ &ltdiv id="list3"&gt
+ &ltdiv ng-repeat="subsubitem in subsubMenuListItem"&gt
+ &ltbutton type="button" class="btn btn-primary btn-block"&gt&#123 &#123subsubitem.title&#125 &#125&lt/button&gt
+ &lt/div&gt
+ &lt/div&gt
+
+ &lt/div&gt</code></pre>
+ <br>
+ <div>Javascript file:</div>
+ <pre><code>
+ var data ={"id": "113","title": "Movies","subMenu": [{"title":"Sci-fi","subsubMenu":[{"title":"Intersteller"},{"title":"Inception"},{"title":"The Arrival"},
+ {"title":"The Paycheck"}]}};
+
+ $scope.init = function() {
+ $scope.mainlistItem = data;
+ }
+
+ $scope.loadSubMenuPage = function(index) {
+ $log.info($scope.mainlistItem);
+ $scope.subMenuListItem = $scope.mainlistItem[index].subMenu;
+ $scope.subsubMenuListItem = [];
+ }
+ $scope.loadSubSubMenuPage = function(index) {
+ $log.info($scope.subMenuListItem);
+ console.log("index: "+index);
+ $scope.subsubMenuListItem = $scope.subMenuListItem[index].subsubMenu;
+ }</code></pre>
+
+
+
+
+
+ </div>
+ </div>
+</div>
+
diff --git a/common/src/main/webapp/usageguide/browser/templates/login.html b/common/src/main/webapp/usageguide/browser/templates/login.html
new file mode 100644
index 0000000..026b670
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/templates/login.html
@@ -0,0 +1,40 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<div class="col-sm-offset-3 col-sm-6 col-md-offset-3 col-md-6 col-lg-offset-4 col-lg-4">
+ <h3>Login</h3>
+
+ <form ng-submit="formSubmit()" class="form">
+ <div class="col-sm-12 col-md-12 col-lg-12">
+ <div class="form-group">
+ <input type="text" class="form-control" ng-model="user.username" placeholder="username" required=""/>
+ </div>
+
+ <div class="form-group">
+ <input type="password" class="form-control" ng-model="user.password" placeholder="password" required=""/>
+ </div>
+
+ <div class="form-group">
+ <button type="submit" class="btn btn-success">Login</button>
+ <span class="text-danger">{{ error }}</span>
+ </div>
+ <a ui-sref="register">Register</a>
+
+ </div>
+ </form>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/browser/templates/management.html b/common/src/main/webapp/usageguide/browser/templates/management.html
new file mode 100644
index 0000000..59d8e58
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/templates/management.html
@@ -0,0 +1,173 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<h4>{{message}}</h4>
+<br><br>
+<div id="provinceAction" ng-init="init()">
+ <!--<button ng-click="showAddModal()" class="btnDefault pull-left">Add</button>-->
+ <!--<button ng-click="deleteData()" class="btnDefault pull-left prvdel">Delete Selected</button>-->
+</div>
+<br>
+<br>
+<!--<table id="provinceTable" class="table table-bordered table-striped">
+ <tr>
+ <th class="chkboxAlign"><input type="checkbox" ng-model="selectAll" ng-click="checkAll()" /></th>
+ <th>Province Name</th>
+ <th>IP Address</th>
+ <th>Port</th>
+ <th></th>
+ </tr>
+ <tr ng-repeat="data in provinceData">
+ <td>
+ <input type="checkbox" ng-model="data.select">&lt;!&ndash;ng-true-value="'data.id'" ng-false-value="''" ng-model="province.rows[$index]"&ndash;&gt;
+ </td>
+ <td class="tableAlign">{{data.province_name}}</td>
+ <td class="tableAlign">{{data.ip}}</td>
+ <td class="tableAlign">{{data.port}}</td>
+ <td>
+ <span class="pull-right glyphicon glyphicon-edit" ng-click="editData(data.id)" style="cursor: pointer;margin: 0 5px"></span>
+ <span class="pull-right glyphicon glyphicon-trash" ng-click="editData(data.id)" style="cursor: pointer;margin: 0 5px"></span>
+ </td>
+ </tr>
+</table>-->
+
+<table ng-table="tableParams" class="table table-bordered table-striped customtable" show-filter="true">
+ <tr ng-repeat="provinceData in $data">
+ <td header="'ng-table/headers/checkbox.html'">
+ <input type="checkbox" ng-model="checkboxes.items[provinceData.id]" />
+ </td>
+ <td title="'Name'" filter="{ province_name: 'text'}" sortable="'province_name'">
+ {{provinceData.province_name}}
+ </td>
+ <td title="'IP Address'" filter="{ ip: 'text'}" sortable="'ip'">
+ {{provinceData.ip}}
+ </td>
+ <td title="'Port'" filter="{ port: 'number'}" sortable="'port'">
+ {{provinceData.port}}
+ </td>
+ <td title="'Action'">
+ <span ng-click="editData(provinceData.id)" style="cursor: pointer;margin: 0 5px"> <img src="thirdparty/images/edit.png" height="15" align="left"/></span>
+ <span ng-click="deleteIndividualData(provinceData.id)" style="cursor: pointer;margin: 0 5px"><img src="thirdparty/images/delete.png" height="15" align="middle"/></span>
+ </td>
+ </tr>
+</table>
+
+
+<script type="text/ng-template" id="ng-table/headers/checkbox.html">
+ <input type="checkbox" ng-model="checkboxes.checked" name="filter-checkbox" value="" />
+</script>
+
+<div id="myTable"></div>
+
+
+<!-- Modal
+<div id="myModal" class="modal fade" role="dialog">
+ <div class="modal-dialog">
+
+ &lt;!&ndash; Modal content&ndash;&gt;
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">&times;</button>
+ <h5 class="modal-title titlestyle">Modal Header</h5>
+ </div>
+ <form name="provinceForm" method="post">&lt;!&ndash; ng-submit="saveData(province.id)"&ndash;&gt;
+ <div class="modal-body">
+
+ <div class="form-group row">
+ <label class="col-xs-4 col-form-label labelstyle">Name</label>
+ <div class="col-xs-8 provinceName" >
+ &lt;!&ndash;<input class="form-control" ng-model="province.province_name" type="text" value="" placeholder="Province Name" id="pname" required><br>&ndash;&gt;
+ </div>
+ </div>
+ <div class="form-group row">
+ <label class="col-xs-4 col-form-label labelstyle">IP Address</label>
+ <div class="col-xs-8 ipAddress" >
+ &lt;!&ndash;<input class="form-control" ng-model="province.ip" type="ipv4" pattern="((^|\.)((25[0-5])|(2[0-4]\d)|(1\d\d)|([1-9]?\d))){4}$" value="" placeholder="IP Address" id="ipaddress" required><br>&ndash;&gt;
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="port" class="col-xs-4 col-form-label labelstyle">Port</label>
+ <div class="col-xs-8 port" >
+ &lt;!&ndash;<input class="form-control" ng-model="province.port" type="number" value="" placeholder="Port" id="port" required>&ndash;&gt;
+
+ </div>
+ </div>
+
+ &lt;!&ndash;<input type="submit" class="btn btn-default" value="validate"/>&ndash;&gt;
+
+ </div>
+
+ <div id="footerBtns" class="modal-footer">
+ &lt;!&ndash;<button type="button" class="btn btn-default" ng-click="addData(province._id)" data-dismiss="modal" ng-disabled="provinceForm.$invalid">OK</button>&ndash;&gt;
+ &lt;!&ndash;<input type="submit" class="btn btn-default" value="Submit"/>&ndash;&gt;
+ &lt;!&ndash;<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>&ndash;&gt;
+ </div>
+ </form>
+ </div>
+
+
+ </div>
+</div>-->
+<div id="managementDialog"></div>
+<div class="shortnote">
+ <div class="shortnoteHeader">Usage</div>
+ <div class="shortnoteText">Create a div tag in html file with specific id for example managementDialog and write a specific function in javascript file to perform your business logic. An sample example as shown below:</div>
+ <br>
+ <div class="shortnoteText">NOTE: Creation of Table and Buttons are explained in previous sections</div>
+ <br>
+ <div>HTML file:</div>
+ <pre><code>&ltdiv id="provinceAction" ng-init="init()"&gt&lt/div&gt</code></pre>
+ <pre><code>&ltdiv id="managementDialog"&gt&lt/div&gt</code></pre>
+ <br>
+ <div>Javascript file:</div>
+ <pre><code>
+
+ $scope.init = function() {
+ loadprv();
+ }
+
+ function loadprv() {
+ var dialog = $(modelTemplate).filter('#dialog').html();
+ var def_button_tpl = $(modelTemplate).filter('#defaultButtons').html();
+ $('#managementDialog').html($compile(dialog)($scope));
+ $('#managementDialog .modalHeader').html('&lth5 class="modal-title titlestyle"&gtModal Header&lt/h5&gt');
+ $('#managementDialog .modalBodyContent').html('&ltdiv class="form-group row"&gt &ltlabel class="col-xs-4 col-form-label labelstyle"&gtName&lt/label&gt &ltdiv class="col-xs-8 provinceName" &gt &lt/div&gt &lt/div&gt');
+ var dataText = {"ErrMsg" : {"errmsg" : "Please input Name.", "modalVar":"province.province_name", "placeholder":"Name", "errtag":"ptextboxErr", "errfunc":"validatetextbox"}};
+ $('#managementDialog .provinceName').html($compile(Mustache.to_html(text, dataText.ErrMsg))($scope));
+ var modelSubmit_data = {"title":"OK", "clickAction":"saveData(province.id)"};
+ var modelSubmit_html = Mustache.to_html(def_button_tpl, modelSubmit_data);
+ $('#managementDialog #footerBtns').html($compile(modelSubmit_html)($scope));
+ var modelDelete_data = {"title":"Cancel", "clickAction":"closeModal()"};
+ var modelDelete_html = Mustache.to_html(def_button_tpl, modelDelete_data);
+ $('#managementDialog #footerBtns').append($compile(modelDelete_html)($scope));
+ $scope.validatetextbox = function (value){
+ if($scope.province.province_name) {
+ $scope.ptextboxErr = false;
+ }
+ else
+ $scope.ptextboxErr = true;
+ }
+ }
+ </code></pre>
+
+
+
+
+
+ </div>
+</div>
diff --git a/common/src/main/webapp/usageguide/browser/templates/notification.html b/common/src/main/webapp/usageguide/browser/templates/notification.html
new file mode 100644
index 0000000..a4b9cee
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/templates/notification.html
@@ -0,0 +1,48 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<h4>{{message}}</h4>
+
+<div id="notificationArea" ng-init="init()">
+ <button type="button" class="btn btnDefault btnmrg" ng-click="showError()">Error</button>
+ <button type="button" class="btn btnDefault btnmrg" ng-click="showWarning()">Warning</button>
+ <button type="button" class="btn btnDefault btnmrg" ng-click="showInfo()">Information</button>
+ <button type="button" class="btn btnDefault btnmrg" ng-click="showConfirm()">Confirm</button>
+
+ <!-- <label class="labelstyle">Label</label>-->
+
+ <div class="shortnote">
+ <div class="shortnoteHeader">Usage</div>
+ <div class="shortnoteText">Create a button in html file and write a specific function in javascript file to perform your business logic. An sample example as shown below:</div>
+ <br>
+ <div>HTML file:</div>
+ <pre><code>&ltbutton type="button" class="btn btn-default" ng-click="showError()"&gtCreate&lt/button&gt</code></pre>
+ <br>
+ <div>Javascript file:</div>
+ <pre><code>
+ var data = {"err_data" : {"title": "Error","showClose": "true","closeBtnTxt": "Ok","icon": "glyphicon glyphicon-exclamation-sign","iconColor": "icon_error","msg":"<<Please input your message here>>","buttons": []}};
+
+ $scope.showError = function() {
+ dialog_tpl = $(modelTemplate).filter('#personDialog').html();
+ var html = Mustache.to_html(dialog_tpl, data.err_data);
+ $(html).modal({backdrop: "static"});//backdrop: "static" - for grayed out and no outside click work, backdrop: false - no grayed out*!
+ }</code></pre>
+
+ </div>
+ </div>
+</div>
diff --git a/common/src/main/webapp/usageguide/browser/templates/radioButtons.html b/common/src/main/webapp/usageguide/browser/templates/radioButtons.html
new file mode 100644
index 0000000..8747718
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/templates/radioButtons.html
@@ -0,0 +1,58 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+
+<h4>Radio Buttons</h4>
+
+<div id="radioBtnArea" ng-init="init()"></div>
+<div class="shortnote">
+ <div class="shortnoteHeader">Usage</div>
+ <div class="shortnoteText">Create a div tag in html file with specific id for example radioBtnArea and write a specific function in javascript file to perform your business logic. An sample example as shown below:</div>
+ <br>
+ <div>HTML file:</div>
+ <pre><code>&ltdiv id="radioBtnArea" ng-init="init()"&gt&lt/div&gt</code></pre>
+ <br>
+ <div>Javascript file:</div>
+ <pre><code>
+ var data ={"radio_btn_default_data" : {"id":1, "label":"Default Radio Btn"},"radio_btn_primary_data" : {"id":2, "label":"Primary Radio Btn"}};
+
+ $scope.init = function() {
+ loadRadioBtn();
+ }
+
+ function loadRadioBtn(){
+
+ var radio_button_tpl = $(modelTemplate).filter('#radioButtons').html();
+ var html = Mustache.to_html(radio_button_tpl, data.radio_btn_default_data);
+ $('#radioBtnArea').html(html);
+
+ var html = Mustache.to_html(radio_button_tpl, data.radio_btn_primary_data);
+ $('#radioBtnArea').append(html);
+
+
+ }</code></pre>
+
+
+
+
+
+
+</div>
+</div>
+
+
diff --git a/common/src/main/webapp/usageguide/browser/templates/register.html b/common/src/main/webapp/usageguide/browser/templates/register.html
new file mode 100644
index 0000000..ff93426
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/templates/register.html
@@ -0,0 +1,47 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<div class="col-sm-offset-3 col-sm-6 col-md-offset-3 col-md-6 col-lg-offset-4 col-lg-4">
+ <h3>Register</h3>
+
+ <form ng-submit="formSubmit()" class="form">
+ <div class="col-sm-12 col-md-12 col-lg-12">
+ <div class="form-group">
+ <input type="text" class="form-control" ng-model="user.username" placeholder="Username" required=""/>
+ </div>
+
+ <div class="form-group">
+ <input type="email" class="form-control" ng-model="user.email" placeholder="Email" required=""/>
+ </div>
+
+ <div class="form-group">
+ <input type="password" class="form-control" ng-model="user.password" placeholder="Password" required=""/>
+ </div>
+
+ <div class="form-group">
+ <input type="password" class="form-control" ng-model="user.confpassword" placeholder="Confirm password" required=""/>
+ </div>
+
+ <div class="form-group">
+ <button type="submit" class="btn btn-success">Register</button>
+ </div>
+ <a ui-sref="login">Login</a>
+
+ </div>
+ </form>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/browser/templates/table.html b/common/src/main/webapp/usageguide/browser/templates/table.html
new file mode 100644
index 0000000..3daa2a5
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/templates/table.html
@@ -0,0 +1,90 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<div class="container col-sm-12 col-md-12 col-lg-12">
+ <h4>{{message}}</h4>
+
+ <div id="tableArea" class="container col-sm-12 col-md-12 col-lg-12" ng-init="init()">
+
+ <h3 class="col-sm-12 col-md-12 col-lg-12">Basic Table<span> (with hover)</span></h3>
+ <div id="basictableArea" class="col-sm-12 col-md-12 col-lg-12"></div>
+
+ <h3 class="col-sm-12 col-md-12 col-lg-12">Stripped Table<span> (Condensed & with border)</span></h3>
+ <div id="strippedtableArea" class="col-sm-12 col-md-12 col-lg-12"></div>
+
+ <h3 class="col-sm-12 col-md-12 col-lg-12">Search Table</h3>
+ <div id="condensedtableArea" class="col-sm-12 col-md-12 col-lg-12">
+ <table ng-table="tableParams" class="table table-bordered table-striped customtable" show-filter="true">
+ <tr ng-repeat="siteData in $data">
+ <td title="'Country'" filter="{ countryName: 'text'}" sortable="'countryName'">
+ {{siteData.countryName}}
+ </td>
+ <td title="'Language'" filter="{ type: 'text'}" sortable="'type'">
+ {{siteData.language}}
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ <div class="col-sm-12 col-md-12 col-lg-12 shortnote">
+ <div class="shortnoteHeader">Usage</div>
+ <div class="shortnoteText">Create a div tag in html file with specific id for example basictableArea,strippedtableArea,condensedtableArea and write a specific function in javascript file to perform your business logic. An sample example as shown below:</div>
+ <br>
+ <div>HTML file:</div>
+ <pre><code>&ltdiv id="basictableArea"&gt&lt/div&gt</code></pre>
+ <pre><code>&ltdiv id="strippedtableArea"&gt&lt/div&gt</code></pre>
+ <pre><code>&ltdiv id="condensedtableArea"&gt&lt/div&gt
+ &lttable ng-table="tableParams" class="table table-bordered table-striped customtable" show-filter="true"&gt
+ &lttr ng-repeat="siteData in $data"&gt
+ &lttd title="'Country'" filter="{ countryName: 'text'}" sortable="'countryName'"&gt&#123 &#123siteData.countryName&#125 &#125&lt/td&gt
+ &lttd title="'Language'" filter="{ type: 'text'}" sortable="'type'"&gt&#123 &#123siteData.language&#125 &#125&lt/td&gt
+ &lt/tr&gt
+ &lt/table&gt</code></pre>
+ <br>
+ <div>Javascript file:</div>
+ <pre><code>
+
+ var data ={"basic_table_data": {"itemHeader": ["First Name", "Last Name", "Age"],"rowitem": [{"values": ["A", "B","1"]},{"values": ["C", "D", "2"]},{"values": ["E", "F", "3"]}],"striped": false,"border": false,"hover": true,"condensed": false,"filter": false,"action": "","searchField": ""},
+ "str_table_data": {"itemHeader": ["First Name","Last Name","Age"],"rowitem": [{"values": ["A","B","1"]},{"values": ["C","D","2"]},{"values": ["E","F","3"]}],"striped": true,"border": true,"hover": false,"condensed": true,"filter": false,"action": "","searchField": ""},"cond_table_data": [{
+ "countryName": "China","language": "Mandrain"},{"countryName": "India","language": "English"},{"countryName": "USA","language": "English"}]};
+
+
+ $scope.init = function() {
+ loadTableData();
+ }
+
+ function loadTableData() {
+
+ var table_tpl = $(modelTemplate).filter('#table').html();
+
+ var html = Mustache.to_html(table_tpl, data.basic_table_data);
+ $('#basictableArea').html(html);
+
+ var html = Mustache.to_html(table_tpl,data.str_table_data);
+ $('#strippedtableArea').html(html);
+
+ $scope.tableParams = new NgTableParams({
+ count: 5, sorting: {language: 'asc'}
+ }, {counts: [5, 10, 20, 50], dataset: data.cond_table_data});
+ }</code></pre>
+
+
+
+ </div>
+ </div>
+</div>
diff --git a/common/src/main/webapp/usageguide/browser/templates/tabs.html b/common/src/main/webapp/usageguide/browser/templates/tabs.html
new file mode 100644
index 0000000..3b28471
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/templates/tabs.html
@@ -0,0 +1,53 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<div class="container col-sm-12 col-md-12 col-lg-12">
+ <h4>{{message}}</h4>
+ <div id="tabArea" ng-init="init()"></div>
+
+ <div class="col-sm-12 col-md-12 col-lg-12 shortnote">
+ <div class="shortnoteHeader">Usage</div>
+ <div class="shortnoteText">Create a div tag in html file with specific id for example tabArea and write a specific function in javascript file to perform your business logic. An sample example as shown below:</div>
+ <br>
+ <div>HTML file:</div>
+ <pre><code>&ltdiv id="tabArea" ng-init="init()"&gt&lt/div&gt</code></pre>
+ <br>
+ <div>Javascript file:</div>
+ <pre><code>
+ var data ={"tabData":{"items": [{"tablabel": "Why AngularJS?","isActive": true,"target": "tab1",
+ "msg": "HTML is great for declaring static documents, but it falters when we try to use it for declaring dynamic views in web-applications. AngularJS lets you extend HTML vocabulary for your application. The resulting environment is extraordinarily expressive, readable, and quick to develop."};
+
+ $scope.init = function() {
+ loadTabData();
+ }
+
+ function loadTabData() {
+ var tab_tpl = $(modelTemplate).filter('#tabs').html();
+ var html = Mustache.to_html(tab_tpl, data.tabData);
+ $('#tabArea').html(html);
+ }</code></pre>
+
+
+
+
+
+
+
+ </div>
+ </div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/browser/templates/textarea.html b/common/src/main/webapp/usageguide/browser/templates/textarea.html
new file mode 100644
index 0000000..9d885e6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/templates/textarea.html
@@ -0,0 +1,150 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<h4>Text Area</h4>
+<body>
+<div name="myForm" method="post">
+ <div class="form-group row">
+ <label for="fname" class="col-xs-2 col-form-label labelstyle">Text</label>
+ <div class="col-xs-10">
+ <div id="fname"></div>
+
+ </div>
+ </div>
+
+ <div class="form-group row">
+ <label for="email" class="col-xs-2 col-form-label labelstyle">Email</label>
+ <div class="col-xs-10">
+ <div id="email" ></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="url" class="col-xs-2 col-form-label labelstyle">URL</label>
+ <div class="col-xs-10">
+ <div id="url"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="password" class="col-xs-2 col-form-label labelstyle">Password</label>
+ <div class="col-xs-10">
+ <div id="password"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="numeric" class="col-xs-2 col-form-label labelstyle">Numeric</label>
+ <div class="col-xs-10">
+ <div id="numeric"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="dot" class="col-xs-2 col-form-label labelstyle">Date and time</label>
+ <div class="col-xs-10">
+ <div id="dot"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="dateinput" class="col-xs-2 col-form-label labelstyle">Date</label>
+ <div class="col-xs-10">
+ <div id="dateinput"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="monthinput" class="col-xs-2 col-form-label labelstyle">Month</label>
+ <div class="col-xs-10">
+ <div id="monthinput"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="weekinput" class="col-xs-2 col-form-label labelstyle">Week</label>
+ <div class="col-xs-10">
+ <div id="weekinput"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="timeinput" class="col-xs-2 col-form-label labelstyle">Time</label>
+ <div class="col-xs-10">
+ <div id="timeinput"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="ipv4" class="col-xs-2 col-form-label labelstyle">IPV4 Address</label>
+ <div class="col-xs-10">
+ <div id="ipv4"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="ipv6" class="col-xs-2 col-form-label labelstyle">IPV6 Address</label>
+ <div class="col-xs-10">
+ <div id="ipv6"></div>
+ </div>
+ </div>
+
+
+ <div class="form-group row">
+ <label for="textarea" class="col-xs-2 col-form-label labelstyle">Text Area</label>
+ <div class="col-xs-10">
+ <div id="textarea"></div>
+
+ </div>
+ </div>
+
+ <div class="form-group row">
+ <label for="note" class="col-xs-2 col-form-label labelstyle">Note</label>
+ <div class="col-xs-10">
+ <div id="note">
+ </div>
+
+ </div>
+ </div>
+
+</div>
+<div class="shortnote">
+ <div class="shortnoteHeader">Usage</div>
+ <div class="shortnoteText">Create a div tag in html file with specific id for example Email and write a specific function in javascript file to perform your business logic. An sample example as shown below for Email and Note, the same logic can be followed by all remaining text fields:</div>
+ <br>
+ <div>HTML file:</div>
+ <pre><code>&ltdiv id="textArea" ng-init="init()"&gt&lt/div&gt</code></pre>
+ <pre><code>&ltdiv id="Email"&gt&lt/div&gt</code></pre>
+ <pre><code>&ltdiv id="note"&gt&lt/div&gt</code></pre>
+ <br>
+ <div>Javascript file:</div>
+ <pre><code>
+ var data ={"Note" : {"message" : "Hi I am Note","placement" : "bottom"},"Email" : {"errmsg" : "The email is required.","placeholder" : "Email","modalVar":"email","errtag":"emailErr","errfunc":"validateemail"}};
+
+ $scope.init = function() {
+ loadTextArea();
+ }
+
+ function loadTextArea() {
+ var note = $(modelTemplate).filter('#note').html();
+ var email = $(modelTemplate).filter('#email').html();
+ var html = Mustache.to_html(email, data.Email);
+ $('#email').html($compile(html)($scope));
+ var html = Mustache.to_html(note, {"placement":data.Note.placement});
+ $('#note').html(html);
+ $("#noteanchor").popover({
+ template: '<div class="popover fade bottom in customPopover"><div class="arrow"></div>'+data.Note.message+'</div>'
+ });
+
+ }</code></pre>
+
+
+</div>
+</div>
+</body>
+
diff --git a/common/src/main/webapp/usageguide/browser/templates/tree.html b/common/src/main/webapp/usageguide/browser/templates/tree.html
new file mode 100644
index 0000000..41a09b2
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/templates/tree.html
@@ -0,0 +1,41 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<h4>{{message}}</h4>
+<div id="tree1" class="ztree" ng-init="init()"></div><!-- ng-if="treeLoaded()"-->
+
+<div class="shortnote">
+ <div class="shortnoteHeader">Usage</div>
+ <div class="shortnoteText">Create a div tag in html file with specific id for example tree1 and write a specific function in javascript file to perform your business logic. An sample example as shown below:</div>
+ <br>
+ <div>HTML file:</div>
+ <pre><code>&ltdiv id="tree1" class="ztree" ng-init="init()"&gt&lt/div&gt</code></pre>
+ <br>
+ <div>Javascript file:</div>
+ <pre><code>
+ var data = {"name": "Java and its divisions","open": true,"children": [{ "name": "Java Standard Edition, J2SE" },{ "name": "Java Enterprise Edition, J2EE" },{ "name": "Java Mobile Edition, J2ME"}]};
+ $scope.init = function() {
+ tree();
+ }
+ function tree() {
+ zNodes = data;
+ $.fn.zTree.init($("#tree1"), setting, zNodes);
+ }</code></pre>
+
+</div>
+</div>
diff --git a/common/src/main/webapp/usageguide/browser/templates/verticalTab.html b/common/src/main/webapp/usageguide/browser/templates/verticalTab.html
new file mode 100644
index 0000000..784475b
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/templates/verticalTab.html
@@ -0,0 +1,47 @@
+<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<div class="container col-sm-12 col-md-12 col-lg-12">
+ <h4>{{message}}</h4>
+
+ <div id="vtabArea" class="col-sm-12 col-md-12 col-lg-12" ng-init="init()"></div>
+
+ <div class="col-sm-12 col-md-12 col-lg-12 shortnote">
+ <div class="shortnoteHeader">Usage</div>
+ <div class="shortnoteText">Create a div tag in html file with specific id for example vtabArea and write a specific function in javascript file to perform your business logic. An sample example as shown below:</div>
+ <br>
+ <div>HTML file:</div>
+ <pre><code>&ltdiv id="vtabArea" ng-init="init()"&gt&lt/div&gt</code></pre>
+ <br>
+ <div>Javascript file:</div>
+ <pre><code>
+ var data= {"vtabData":{"items": [{"tablabel": "Why AngularJS?","isActive": true,"target": "tab1","msg": "HTML is great for declaring static documents, but it falters when we try to use it for declaring dynamic views in web-applications. AngularJS lets you extend HTML vocabulary for your application. The resulting environment is extraordinarily expressive, readable, and quick to develop."};
+
+ $scope.init = function() {
+ loadvTabData();
+ }
+
+ function loadvTabData() {
+ var vtab_tpl = $(modelTemplate).filter('#vtabs').html();
+ var html = Mustache.to_html(vtab_tpl, data.vtabData);
+ $('#vtabArea').html(html);
+ }</code></pre>
+
+ </div>
+ </div>
+</div> \ No newline at end of file
diff --git a/common/src/main/webapp/usageguide/readme.txt b/common/src/main/webapp/usageguide/readme.txt
new file mode 100644
index 0000000..a3c08f6
--- /dev/null
+++ b/common/src/main/webapp/usageguide/readme.txt
@@ -0,0 +1,43 @@
+#
+# Copyright 2017, Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+
+
+__________HOW TO LAUNCH___________________:
+
+
+Step 1:
+Install the Nodejs in the system
+https://github.com/nodejs/node/wiki/Installation
+
+
+Step 2:
+Launch the node server from the lcoation
+
+\appserver\start_node.sh or \appserver\start_node.sh
+
+based on the operating system.
+
+Step 3:
+Open the browser and enter the URL to get the login page
+
+http://localhost:4000/
+
+Step 4:
+
+User name : admin
+Password : admin
+